[
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]\npatreon: # Replace with a single Patreon username\nopen_collective: # Replace with a single Open Collective username\nko_fi: # Replace with a single Ko-fi username\ntidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel\ncommunity_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry\nliberapay: # Replace with a single Liberapay username\nissuehunt: # Replace with a single IssueHunt username\notechie: # Replace with a single Otechie username\nlfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry\ncustom: https://visualfc.github.io/support/\n"
  },
  {
    "path": ".gitignore",
    "content": "/build-liteidex-Desktop*\n# C++ objects and libs\n\n*.slo\n*.lo\n*.o\n*.a\n*.la\n*.lai\n*.so\n*.dll\n*.dylib\n*.7z\n\n#Emacs\n*~\n\n# Qt-es\n\n*.pro.user\n*.pro.user.*\nmoc_*.cpp\nqrc_*.cpp\nMakefile\n*-build-*\n\n# hg\n.hg*\n\n#liteide\n*.exe\nliteidex/bin\nliteidex/liteide\nliteidex/src/github.com\nliteidex/src/golang.org/\n\n#macosx\n.DS_Store\n"
  },
  {
    "path": "CONTRIBUTORS",
    "content": "# LiteIDE Contributor List:\n# This is the official list of people who can contribute\n# (and typically have contributed) code to the LiteIDE repository.\n#\n# Names should be added to this file like so:\n#     Individual's name <submission email address>\n#     Individual's name <github.com address> \n#\n\n# Please keep the list sorted.\n\nappajee <github.com/appajee>\nAddxtoy <pollux@lavabit.com>\nAhmed (OneOfOne) W <oneofone@gmail.com>\nAlexander Rødseth <rodseth@gmail.com>\nАлександр Павлов <pavlov@itoolabs.com>\nbombless <bombless@126.com>\nb-s-a <github.com/b-s-a>\ndevshell <root@devshell.org>\ncusta <github.com/custa>\ncl0ne <cl0ne@mithril.org.ua>\nDaniel Theophanes kardianos <kardianos@gmail.com>\nDobrosław Żybort <bitbucket.org/matrixik/>\nDumitru Ungureanu <itmitica@gmail.com>\nDvir Volk <github.com/dvirsky>\nelfgoh <elfgoh@yahoo.com>\neugoss <github.com/eugoss>\nElgs Qian Chen <elgs1980@gmail.com>\nFan Yang <github.com/missdeer>\nFeelGo <github.com/uin57>\nFred Foonly <kmikep@live.com>\nGoEddie <goeddieuk@gmail.com>\nGuolei <github.com/xiaozi0lei>\nGeorges Varouchas <gvarouchas@2000ecoles.net>\nhopehook <hopehook@qq.com>\nHai Thanh Nguyen <phaikawl@gmail.com>\nHarald Leinders <harald.leinders@denkwerk.com>\nHelge Plaschke <github.com/HelgePlaschke>\nHenson Lu <henson.lu@gmail.com>\nidsol <idsolcn@gmail.com>\njsuppe <jon.suppe@gmail.com>\nJeremy Harris <github.com/cillosis>\nJon Suppe <github.com/jsuppe>\nJon Suppe <jon.suppe@gmail.com>\nlixiaolong <github.com/lixiaolong>\nLuther Goh <lutherglf@spgroup.com.sg>\nLee Forest <lee8oi@gmail.com>\nLaurent Saint-Félix <anaethelion@gmail.com>\nLockals <lockalsash@gmail.com>\nLauri Ojansivu <github.com/xet7>\nLucio M. Tato <github.com/luciotato>\nmattn <mattn.jp@gmail.com>\nmars <marshalys@gmail.com>\nMarc Abramowitz <abramowi@adobe.com>\nMarius Karnauskas <marius.karnauskas@gmail.com>\nmax <max.huang@aihuishou.com>\nMaxim Perenesenko <github.com/maximp>\nMichael Käufl <michael-k@users.noreply.github.com>\nMr Tom <github.com/smileytom>\nNik U <niku@vaxxine.com>\nPhilippe Lhoste <philho@gmx.net>\nPeter Gloor <petergloor@users.noreply.github.com>\nRoman Shmelev <rshmelev@gmail.com>\nRoland Illig <github.com/rillig>\nSergey Belyashov <Sergey.Belyashov@gmail.com>\nShauvik Roy Choudhary <shauvik@gmail.com>\nSantiago Corredoira Lascaray <scorredoira@gmail.com>\nSlene <vslene@gmail.com>\nstemd <stemdd@gmail.com>\nstemd <stem@vip.hr>\ntupunco <github.com/tupunco>\nTimothy Lin <zh9102@gmail.com>\nTomBoss <tomboss@gmx.com>\nTylor Arndt <github.com/tarndt>\nvanackere <github.com/vanackere>\nVincent Vanackere <vincent.vanackere@gmail.com>\nVladimir Timofeev <vovkasm@gmail.com>\nVedran Vuk <vedranvuk82@gmail.com>\nvahid <vahid@dobisel.com>\nVahid pylover <vahid.mardani@gmail.com>\nVince Yuan <vince.yuan@gmail.com>\nYuwen Shen <github.com/losas>\nYılmaz <github.com/edigu>\nUnknown <github.com/Unknwon>\nWilliam Kennedy <bill@ardanstudios.com>\nWanpat Anantapan <github.com/oneplus1000>\nzigal <janiiik@hotmail.com>\nZach Collier <github.com/Zamicol>\n\n\n# All contributors that provided patches.\n# If they are missing, please let me know.\n"
  },
  {
    "path": "ISSUE_TEMPLATE.md",
    "content": "Please answer these questions before submitting your issue. Thanks!\nPlease download LiteIDE latest version and test before submitting your issue. Thanks!\n\n### What version of LiteIDE are you using (LiteIDE About - Version and Build Qt Version)?\n\n\n### What version of Go are you using (`go version`)?\n\n\n### What operating system and processor architecture are you using(`go env`)?\n\n\n### What did you do?\n\nIf possible, provide a recipe for reproducing the error.\n\n\n### What did you expect to see?\n\n\n### What did you see instead?\n"
  },
  {
    "path": "LICENSE.LGPL",
    "content": "\t\t  GNU LESSER GENERAL PUBLIC LICENSE\n\t\t       Version 2.1, February 1999\n\n Copyright (C) 1991, 1999 Free Software Foundation, Inc.\n 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n[This is the first released version of the Lesser GPL.  It also counts\n as the successor of the GNU Library Public License, version 2, hence\n the version number 2.1.]\n\n\t\t\t    Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicenses are intended to guarantee your freedom to share and change\nfree software--to make sure the software is free for all its users.\n\n  This license, the Lesser General Public License, applies to some\nspecially designated software packages--typically libraries--of the\nFree Software Foundation and other authors who decide to use it.  You\ncan use it too, but we suggest you first think carefully about whether\nthis license or the ordinary General Public License is the better\nstrategy to use in any particular case, based on the explanations below.\n\n  When we speak of free software, we are referring to freedom of use,\nnot price.  Our General Public Licenses are designed to make sure that\nyou have the freedom to distribute copies of free software (and charge\nfor this service if you wish); that you receive source code or can get\nit if you want it; that you can change the software and use pieces of\nit in new free programs; and that you are informed that you can do\nthese things.\n\n  To protect your rights, we need to make restrictions that forbid\ndistributors to deny you these rights or to ask you to surrender these\nrights.  These restrictions translate to certain responsibilities for\nyou if you distribute copies of the library or if you modify it.\n\n  For example, if you distribute copies of the library, whether gratis\nor for a fee, you must give the recipients all the rights that we gave\nyou.  You must make sure that they, too, receive or can get the source\ncode.  If you link other code with the library, you must provide\ncomplete object files to the recipients, so that they can relink them\nwith the library after making changes to the library and recompiling\nit.  And you must show them these terms so they know their rights.\n\n  We protect your rights with a two-step method: (1) we copyright the\nlibrary, and (2) we offer you this license, which gives you legal\npermission to copy, distribute and/or modify the library.\n\n  To protect each distributor, we want to make it very clear that\nthere is no warranty for the free library.  Also, if the library is\nmodified by someone else and passed on, the recipients should know\nthat what they have is not the original version, so that the original\nauthor's reputation will not be affected by problems that might be\nintroduced by others.\n\f\n  Finally, software patents pose a constant threat to the existence of\nany free program.  We wish to make sure that a company cannot\neffectively restrict the users of a free program by obtaining a\nrestrictive license from a patent holder.  Therefore, we insist that\nany patent license obtained for a version of the library must be\nconsistent with the full freedom of use specified in this license.\n\n  Most GNU software, including some libraries, is covered by the\nordinary GNU General Public License.  This license, the GNU Lesser\nGeneral Public License, applies to certain designated libraries, and\nis quite different from the ordinary General Public License.  We use\nthis license for certain libraries in order to permit linking those\nlibraries into non-free programs.\n\n  When a program is linked with a library, whether statically or using\na shared library, the combination of the two is legally speaking a\ncombined work, a derivative of the original library.  The ordinary\nGeneral Public License therefore permits such linking only if the\nentire combination fits its criteria of freedom.  The Lesser General\nPublic License permits more lax criteria for linking other code with\nthe library.\n\n  We call this license the \"Lesser\" General Public License because it\ndoes Less to protect the user's freedom than the ordinary General\nPublic License.  It also provides other free software developers Less\nof an advantage over competing non-free programs.  These disadvantages\nare the reason we use the ordinary General Public License for many\nlibraries.  However, the Lesser license provides advantages in certain\nspecial circumstances.\n\n  For example, on rare occasions, there may be a special need to\nencourage the widest possible use of a certain library, so that it becomes\na de-facto standard.  To achieve this, non-free programs must be\nallowed to use the library.  A more frequent case is that a free\nlibrary does the same job as widely used non-free libraries.  In this\ncase, there is little to gain by limiting the free library to free\nsoftware only, so we use the Lesser General Public License.\n\n  In other cases, permission to use a particular library in non-free\nprograms enables a greater number of people to use a large body of\nfree software.  For example, permission to use the GNU C Library in\nnon-free programs enables many more people to use the whole GNU\noperating system, as well as its variant, the GNU/Linux operating\nsystem.\n\n  Although the Lesser General Public License is Less protective of the\nusers' freedom, it does ensure that the user of a program that is\nlinked with the Library has the freedom and the wherewithal to run\nthat program using a modified version of the Library.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.  Pay close attention to the difference between a\n\"work based on the library\" and a \"work that uses the library\".  The\nformer contains code derived from the library, whereas the latter must\nbe combined with the library in order to run.\n\f\n\t\t  GNU LESSER GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License Agreement applies to any software library or other\nprogram which contains a notice placed by the copyright holder or\nother authorized party saying it may be distributed under the terms of\nthis Lesser General Public License (also called \"this License\").\nEach licensee is addressed as \"you\".\n\n  A \"library\" means a collection of software functions and/or data\nprepared so as to be conveniently linked with application programs\n(which use some of those functions and data) to form executables.\n\n  The \"Library\", below, refers to any such software library or work\nwhich has been distributed under these terms.  A \"work based on the\nLibrary\" means either the Library or any derivative work under\ncopyright law: that is to say, a work containing the Library or a\nportion of it, either verbatim or with modifications and/or translated\nstraightforwardly into another language.  (Hereinafter, translation is\nincluded without limitation in the term \"modification\".)\n\n  \"Source code\" for a work means the preferred form of the work for\nmaking modifications to it.  For a library, complete source code means\nall the source code for all modules it contains, plus any associated\ninterface definition files, plus the scripts used to control compilation\nand installation of the library.\n\n  Activities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning a program using the Library is not restricted, and output from\nsuch a program is covered only if its contents constitute a work based\non the Library (independent of the use of the Library in a tool for\nwriting it).  Whether that is true depends on what the Library does\nand what the program that uses the Library does.\n\n  1. You may copy and distribute verbatim copies of the Library's\ncomplete source code as you receive it, in any medium, provided that\nyou conspicuously and appropriately publish on each copy an\nappropriate copyright notice and disclaimer of warranty; keep intact\nall the notices that refer to this License and to the absence of any\nwarranty; and distribute a copy of this License along with the\nLibrary.\n\n  You may charge a fee for the physical act of transferring a copy,\nand you may at your option offer warranty protection in exchange for a\nfee.\n\f\n  2. You may modify your copy or copies of the Library or any portion\nof it, thus forming a work based on the Library, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) The modified work must itself be a software library.\n\n    b) You must cause the files modified to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    c) You must cause the whole of the work to be licensed at no\n    charge to all third parties under the terms of this License.\n\n    d) If a facility in the modified Library refers to a function or a\n    table of data to be supplied by an application program that uses\n    the facility, other than as an argument passed when the facility\n    is invoked, then you must make a good faith effort to ensure that,\n    in the event an application does not supply such function or\n    table, the facility still operates, and performs whatever part of\n    its purpose remains meaningful.\n\n    (For example, a function in a library to compute square roots has\n    a purpose that is entirely well-defined independent of the\n    application.  Therefore, Subsection 2d requires that any\n    application-supplied function or table used by this function must\n    be optional: if the application does not supply it, the square\n    root function must still compute square roots.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Library,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Library, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote\nit.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Library.\n\nIn addition, mere aggregation of another work not based on the Library\nwith the Library (or with a work based on the Library) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may opt to apply the terms of the ordinary GNU General Public\nLicense instead of this License to a given copy of the Library.  To do\nthis, you must alter all the notices that refer to this License, so\nthat they refer to the ordinary GNU General Public License, version 2,\ninstead of to this License.  (If a newer version than version 2 of the\nordinary GNU General Public License has appeared, then you can specify\nthat version instead if you wish.)  Do not make any other change in\nthese notices.\n\f\n  Once this change is made in a given copy, it is irreversible for\nthat copy, so the ordinary GNU General Public License applies to all\nsubsequent copies and derivative works made from that copy.\n\n  This option is useful when you wish to copy part of the code of\nthe Library into a program that is not a library.\n\n  4. You may copy and distribute the Library (or a portion or\nderivative of it, under Section 2) in object code or executable form\nunder the terms of Sections 1 and 2 above provided that you accompany\nit with the complete corresponding machine-readable source code, which\nmust be distributed under the terms of Sections 1 and 2 above on a\nmedium customarily used for software interchange.\n\n  If distribution of object code is made by offering access to copy\nfrom a designated place, then offering equivalent access to copy the\nsource code from the same place satisfies the requirement to\ndistribute the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  5. A program that contains no derivative of any portion of the\nLibrary, but is designed to work with the Library by being compiled or\nlinked with it, is called a \"work that uses the Library\".  Such a\nwork, in isolation, is not a derivative work of the Library, and\ntherefore falls outside the scope of this License.\n\n  However, linking a \"work that uses the Library\" with the Library\ncreates an executable that is a derivative of the Library (because it\ncontains portions of the Library), rather than a \"work that uses the\nlibrary\".  The executable is therefore covered by this License.\nSection 6 states terms for distribution of such executables.\n\n  When a \"work that uses the Library\" uses material from a header file\nthat is part of the Library, the object code for the work may be a\nderivative work of the Library even though the source code is not.\nWhether this is true is especially significant if the work can be\nlinked without the Library, or if the work is itself a library.  The\nthreshold for this to be true is not precisely defined by law.\n\n  If such an object file uses only numerical parameters, data\nstructure layouts and accessors, and small macros and small inline\nfunctions (ten lines or less in length), then the use of the object\nfile is unrestricted, regardless of whether it is legally a derivative\nwork.  (Executables containing this object code plus portions of the\nLibrary will still fall under Section 6.)\n\n  Otherwise, if the work is a derivative of the Library, you may\ndistribute the object code for the work under the terms of Section 6.\nAny executables containing that work also fall under Section 6,\nwhether or not they are linked directly with the Library itself.\n\f\n  6. As an exception to the Sections above, you may also combine or\nlink a \"work that uses the Library\" with the Library to produce a\nwork containing portions of the Library, and distribute that work\nunder terms of your choice, provided that the terms permit\nmodification of the work for the customer's own use and reverse\nengineering for debugging such modifications.\n\n  You must give prominent notice with each copy of the work that the\nLibrary is used in it and that the Library and its use are covered by\nthis License.  You must supply a copy of this License.  If the work\nduring execution displays copyright notices, you must include the\ncopyright notice for the Library among them, as well as a reference\ndirecting the user to the copy of this License.  Also, you must do one\nof these things:\n\n    a) Accompany the work with the complete corresponding\n    machine-readable source code for the Library including whatever\n    changes were used in the work (which must be distributed under\n    Sections 1 and 2 above); and, if the work is an executable linked\n    with the Library, with the complete machine-readable \"work that\n    uses the Library\", as object code and/or source code, so that the\n    user can modify the Library and then relink to produce a modified\n    executable containing the modified Library.  (It is understood\n    that the user who changes the contents of definitions files in the\n    Library will not necessarily be able to recompile the application\n    to use the modified definitions.)\n\n    b) Use a suitable shared library mechanism for linking with the\n    Library.  A suitable mechanism is one that (1) uses at run time a\n    copy of the library already present on the user's computer system,\n    rather than copying library functions into the executable, and (2)\n    will operate properly with a modified version of the library, if\n    the user installs one, as long as the modified version is\n    interface-compatible with the version that the work was made with.\n\n    c) Accompany the work with a written offer, valid for at\n    least three years, to give the same user the materials\n    specified in Subsection 6a, above, for a charge no more\n    than the cost of performing this distribution.\n\n    d) If distribution of the work is made by offering access to copy\n    from a designated place, offer equivalent access to copy the above\n    specified materials from the same place.\n\n    e) Verify that the user has already received a copy of these\n    materials or that you have already sent this user a copy.\n\n  For an executable, the required form of the \"work that uses the\nLibrary\" must include any data and utility programs needed for\nreproducing the executable from it.  However, as a special exception,\nthe materials to be distributed need not include anything that is\nnormally distributed (in either source or binary form) with the major\ncomponents (compiler, kernel, and so on) of the operating system on\nwhich the executable runs, unless that component itself accompanies\nthe executable.\n\n  It may happen that this requirement contradicts the license\nrestrictions of other proprietary libraries that do not normally\naccompany the operating system.  Such a contradiction means you cannot\nuse both them and the Library together in an executable that you\ndistribute.\n\f\n  7. You may place library facilities that are a work based on the\nLibrary side-by-side in a single library together with other library\nfacilities not covered by this License, and distribute such a combined\nlibrary, provided that the separate distribution of the work based on\nthe Library and of the other library facilities is otherwise\npermitted, and provided that you do these two things:\n\n    a) Accompany the combined library with a copy of the same work\n    based on the Library, uncombined with any other library\n    facilities.  This must be distributed under the terms of the\n    Sections above.\n\n    b) Give prominent notice with the combined library of the fact\n    that part of it is a work based on the Library, and explaining\n    where to find the accompanying uncombined form of the same work.\n\n  8. You may not copy, modify, sublicense, link with, or distribute\nthe Library except as expressly provided under this License.  Any\nattempt otherwise to copy, modify, sublicense, link with, or\ndistribute the Library is void, and will automatically terminate your\nrights under this License.  However, parties who have received copies,\nor rights, from you under this License will not have their licenses\nterminated so long as such parties remain in full compliance.\n\n  9. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Library or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Library (or any work based on the\nLibrary), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Library or works based on it.\n\n  10. Each time you redistribute the Library (or any work based on the\nLibrary), the recipient automatically receives a license from the\noriginal licensor to copy, distribute, link with or modify the Library\nsubject to these terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties with\nthis License.\n\f\n  11. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Library at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Library by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Library.\n\nIf any portion of this section is held invalid or unenforceable under any\nparticular circumstance, the balance of the section is intended to apply,\nand the section as a whole is intended to apply in other circumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  12. If the distribution and/or use of the Library is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Library under this License may add\nan explicit geographical distribution limitation excluding those countries,\nso that distribution is permitted only in or among countries not thus\nexcluded.  In such case, this License incorporates the limitation as if\nwritten in the body of this License.\n\n  13. The Free Software Foundation may publish revised and/or new\nversions of the Lesser General Public License from time to time.\nSuch new versions will be similar in spirit to the present version,\nbut may differ in detail to address new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Library\nspecifies a version number of this License which applies to it and\n\"any later version\", you have the option of following the terms and\nconditions either of that version or of any later version published by\nthe Free Software Foundation.  If the Library does not specify a\nlicense version number, you may choose any version ever published by\nthe Free Software Foundation.\n\f\n  14. If you wish to incorporate parts of the Library into other free\nprograms whose distribution conditions are incompatible with these,\nwrite to the author to ask for permission.  For software which is\ncopyrighted by the Free Software Foundation, write to the Free\nSoftware Foundation; we sometimes make exceptions for this.  Our\ndecision will be guided by the two goals of preserving the free status\nof all derivatives of our free software and of promoting the sharing\nand reuse of software generally.\n\n\t\t\t    NO WARRANTY\n\n  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\nWARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\nEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\nOTHER PARTIES PROVIDE THE LIBRARY \"AS IS\" WITHOUT WARRANTY OF ANY\nKIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\nLIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\nWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\nAND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\nFOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\nCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\nLIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\nRENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\nFAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\nSUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGES.\n\n\t\t     END OF TERMS AND CONDITIONS\n\f\n           How to Apply These Terms to Your New Libraries\n\n  If you develop a new library, and you want it to be of the greatest\npossible use to the public, we recommend making it free software that\neveryone can redistribute and change.  You can do so by permitting\nredistribution under these terms (or, alternatively, under the terms of the\nordinary General Public License).\n\n  To apply these terms, attach the following notices to the library.  It is\nsafest to attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least the\n\"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the library's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\nAlso add information on how to contact you by electronic and paper mail.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the library, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the\n  library `Frob' (a library for tweaking knobs) written by James Random Hacker.\n\n  <signature of Ty Coon>, 1 April 1990\n  Ty Coon, President of Vice\n\nThat's all there is to it!\n\n\n"
  },
  {
    "path": "README.md",
    "content": "<!-- Welcome to LiteIDE X -->\n\nLiteIDE X\n=========\n\n![liteide-logo](liteidex/liteide-logo/liteide.png)\n\n### Introduction\n\n_LiteIDE is a simple, open source, cross-platform Go IDE._\n\n* Version: X38.4\n* Author: [visualfc](mailto:visualfc@gmail.com)\n\n### Features\n\n* Core features\n    * System environment management\n    * MIME type management \n    * Configurable build commands\n    * Support files search replace and revert\n    * Quick open file, symbol and commands\n    * Plug-in system\n    * Integrated terminal\n\n* Advanced code editor\n    * Code editor supports Golang, Markdown and Golang Present\n    * Rapid code navigation tools\n    * Syntax highlighting and color scheme\n    * Code completion\n    * Code folding\n    * Display save revision\n    * Reload file by internal diff way\n\n* Golang support\n    * Support Go1.18~Go1.21 generics\n    * Support Go1.18 go.work\n    * Support Go1.11 Go modules\n    * Support Go1.5 Go vendor\n    * Support Go1 GOPATH\n    * Golang build environment management\n    * Compile and test using standard Golang tools\n    * Custom GOPATH support system, IDE and project\n    * Custom project build configuration\n    * Golang package browser\n    * Golang class view and outline\n    * Golang doc search and api index\n    * Source code navigation and information tips\n    * Source code find usages\n    * Source code refactoring and revert\n    * Integrated  [gocode](https://github.com/visualfc/gocode) clone of [nsf/gocode](https://github.com/nsf/gocode)\n    * Integrated [gomodifytags](https://github.com/fatih/gomodifytags)\n    * Support source query tools guru\n    * Debug with GDB and [Delve](https://github.com/derekparker/delve)\n\n### Supported Systems\n* Windows x86 (32-bit or 64-bit)\n* Linux x86 (32-bit or 64-bit)\n* MacOS X10.6 or higher (64-bit)\n* FreeBSD 9.2 or higher (32-bit or 64-bit)\n* OpenBSD 5.6 or higher (64-bit)\n\n### Latest Release Supported Platform Details\n* Windows\n    * liteide-latest.windows-qt5.zip -> WindowsXP, Windows 7 8 10\n    * liteide-latest.windows-qt4.zip -> WindowsXP, Windows 7\n* macOS\n    * liteide-latest.macosx-qt5.zip -> macOS 10.8 or higher\n* Linux x64\n    * liteide-latest.linux-64-qt4.tar.bz2 -> Linux (64 bit) build on ubuntu 16.04\n    * liteide-latest.linux-64-qt5.tar.bz2 -> Linux (64 bit) build on ubuntu 16.04\n* Linux x32\n    * liteide-latest.linux-32-qt4.tar.bz2 -> Linux (32 bit) build on ubuntu 16.04\n    * liteide-latest.linux-32-qt5.tar.bz2 -> Linux (32 bit) build on ubuntu 16.04\n* ArchLinux\n    * liteide-latest.archlinux-pkgbuild.zip -> ArchLinux (64 bit) PKGBUILD\n\n### LiteIDE Command Line\n\tliteide [files|folder] [--select-env id] [--local-setting] [--user-setting] [--reset-setting]\n\n\t--select-env [system|win32|cross-linux64|...]     select init environment id\n\t--local-setting   force use local setting\n\t--user-setting    force use user setting\n\t--reset-setting   reset current setting ( clear setting file)\t\n\t\n### Update liteide tools for support new Golang Version\t\n\n\tgo install github.com/visualfc/gotools@latest\n\tgo install github.com/visualfc/gocode@latest\n\t\n\tWindows/Linux: copy GOPATH/bin gotools and gocode to liteide/bin\n\tMacOS: copy GOPATH/bin gotools and gocode to LiteIDE.app/Contents/MacOS\n\n### Documents\n* How to Install\n<https://github.com/visualfc/liteide/blob/master/liteidex/deploy/welcome/en/install.md>\n* FAQ\n<https://github.com/visualfc/liteide/blob/master/liteidex/deploy/welcome/en/guide.md>\n* 安装 LiteIDE\n<https://github.com/visualfc/liteide/blob/master/liteidex/deploy/welcome/zh_CN/install.md>\n* FAQ 中文\n<https://github.com/visualfc/liteide/blob/master/liteidex/deploy/welcome/zh_CN/guide.md>\n\n### Links\n* LiteIDE Source code\n<https://github.com/visualfc/liteide>\n* Gotools Source code\n<https://github.com/visualfc/gotools>\n* Gocode Source code\n<https://github.com/visualfc/gocode>\n* Release downloads\n    * <https://github.com/visualfc/liteide/releases/latest>\n    * <https://sourceforge.net/projects/liteide/files>\n    * [百度网盘](https://pan.baidu.com/s/1wYHSEfG1TJRC2iOkE_saJg)  密码:jzrc\n* Google group\n<https://groups.google.com/group/liteide-dev>\n* Changes\n<https://github.com/visualfc/liteide/blob/master/liteidex/deploy/welcome/en/changes.md>\n\n\n### Donate\n* https://visualfc.github.io/support\n"
  },
  {
    "path": "build/.gitignore",
    "content": "*\n!*/\n!.gitignore\n!*.sh\n\n"
  },
  {
    "path": "build/build_freebsd.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho build liteide\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\necho qmake-qt5 liteide ...\necho .\nqmake-qt5 $LITEIDE_ROOT \"CONFIG+=release\"\n\nif [ $? -ge 1 ]; then\n\techo 'error, qmake fail'\n\texit 1\nfi\n\necho make liteide ...\necho .\nmake\n\nif [ $? -ge 1 ]; then\n\techo 'error, make fail'\n\texit 1\nfi\n\ngo version\nif [ $? -ge 1 ]; then\n\techo 'error, not find go in PATH'\n\texit 1\nfi\n\necho build liteide tools ...\ncd $LITEIDE_ROOT\n\nif [ -z $GOPATH ]; then\n\texport GOPATH=$PWD\nelse\n\texport GOPATH=$PWD:$GOPATH\nfi\n\n#(cd \"$PWD/src/github.com/visualfc/gotools\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/visualfc/gocode\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/fatih/gomodifytags\" && go install -ldflags \"-s\" -v)\n\nif [ $? -ge 1 ]; then\n\techo 'error, go install fail'\n\texit 1\nfi\n\n\necho export qrc images\ngo run src/tools/exportqrc/main.go -root .\n\nif [ $? -ge 1 ]; then\n\techo 'error, go run fail'\n\texit 1\nfi\n\necho deploy ...\n\ncd $BUILD_ROOT\n\nrm -r liteide\nmkdir -p liteide\nmkdir -p liteide/bin\nmkdir -p liteide/share/liteide\nmkdir -p liteide/lib/liteide/plugins\n\ncp -a -v $LITEIDE_ROOT/LICENSE.LGPL liteide\ncp -a -v $LITEIDE_ROOT/LGPL_EXCEPTION.TXT liteide\ncp -a -v $LITEIDE_ROOT/../README.md liteide\ncp -a -v $LITEIDE_ROOT/../CONTRIBUTORS liteide\n\ncp -a -v $LITEIDE_ROOT/liteide/bin/liteide liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gotools liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gocode liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gomodifytags liteide/bin\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/libliteapp.* liteide/lib/liteide\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/plugins/*.so liteide/lib/liteide/plugins\n\ncp -r -v $LITEIDE_ROOT/deploy/* liteide/share/liteide/\ncp -r -v $LITEIDE_ROOT/os_deploy/freebsd/* liteide/share/liteide/\n"
  },
  {
    "path": "build/build_freebsd_g++.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho build liteide\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\necho qmake liteide ...\necho .\nqmake $LITEIDE_ROOT -spec freebsd-g++ \"CONFIG+=release\"\n\nif [ $? -ge 1 ]; then\n\techo 'error, qmake fail'\n\texit 1\nfi\n\necho make liteide ...\necho .\nmake\n\nif [ $? -ge 1 ]; then\n\techo 'error, make fail'\n\texit 1\nfi\n\ngo version\nif [ $? -ge 1 ]; then\n\techo 'error, not find go in PATH'\n\texit 1\nfi\n\necho build liteide tools ...\ncd $LITEIDE_ROOT\n\nif [ -z $GOPATH ]; then\n\texport GOPATH=$PWD\nelse\n\texport GOPATH=$PWD:$GOPATH\nfi\n\n#(cd \"$PWD/src/github.com/visualfc/gotools\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/visualfc/gocode\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/fatih/gomodifytags\" && go install -ldflags \"-s\" -v)\n\nif [ $? -ge 1 ]; then\n\techo 'error, go install fail'\n\texit 1\nfi\n\n\necho export qrc images\ngo run src/tools/exportqrc/main.go -root .\n\nif [ $? -ge 1 ]; then\n\techo 'error, go run fail'\n\texit 1\nfi\n\necho deploy ...\n\ncd $BUILD_ROOT\n\nrm -r liteide\nmkdir -p liteide\nmkdir -p liteide/bin\nmkdir -p liteide/share/liteide\nmkdir -p liteide/lib/liteide/plugins\n\ncp -a -v $LITEIDE_ROOT/LICENSE.LGPL liteide\ncp -a -v $LITEIDE_ROOT/LGPL_EXCEPTION.TXT liteide\ncp -a -v $LITEIDE_ROOT/../README.md liteide\ncp -a -v $LITEIDE_ROOT/../CONTRIBUTORS liteide\n\ncp -a -v $LITEIDE_ROOT/liteide/bin/liteide liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gotools liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gocode liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gomodifytags liteide/bin\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/libliteapp.* liteide/lib/liteide\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/plugins/*.so liteide/lib/liteide/plugins\n\ncp -r -v $LITEIDE_ROOT/deploy/* liteide/share/liteide/\ncp -r -v $LITEIDE_ROOT/os_deploy/freebsd/* liteide/share/liteide/\n"
  },
  {
    "path": "build/build_linux.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho build liteide\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\necho qmake liteide ...\necho .\nqmake $LITEIDE_ROOT -spec linux-g++ \"CONFIG+=release\"\n\nif [ $? -ge 1 ]; then\n\techo 'error, qmake fail'\n\texit 1\nfi\n\necho make liteide ...\necho .\nmake\n\nif [ $? -ge 1 ]; then\n\techo 'error, make fail'\n\texit 1\nfi\n\ngo version\nif [ $? -ge 1 ]; then\n\techo 'error, not find go in PATH'\n\texit 1\nfi\n\necho build liteide tools ...\ncd $LITEIDE_ROOT\n\nif [ -z $GOPATH ]; then\n\texport GOPATH=$PWD\nelse\n\texport GOPATH=$PWD:$GOPATH\nfi\n\n#(cd \"$PWD/src/github.com/visualfc/gotools\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/visualfc/gocode\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/fatih/gomodifytags\" && go install -ldflags \"-s\" -v)\n\nif [ $? -ge 1 ]; then\n\techo 'error, go install fail'\n\texit 1\nfi\n\necho export qrc images\ngo run src/tools/exportqrc/main.go -root .\n\nif [ $? -ge 1 ]; then\n\techo 'error, go run fail'\n\texit 1\nfi\n\necho deploy ...\n\ncd $BUILD_ROOT\n\nrm -r liteide\nmkdir -p liteide\nmkdir -p liteide/bin\nmkdir -p liteide/share/liteide\nmkdir -p liteide/lib/liteide/plugins\n\ncp -a -v $LITEIDE_ROOT/LICENSE.LGPL liteide\ncp -a -v $LITEIDE_ROOT/LGPL_EXCEPTION.TXT liteide\ncp -a -v $LITEIDE_ROOT/../README.md liteide\ncp -a -v $LITEIDE_ROOT/../CONTRIBUTORS liteide\ncp -a -v $LITEIDE_ROOT/liteide.desktop liteide\ncp -a -v $LITEIDE_ROOT/install_icon.sh liteide\n\ncp -a -v $LITEIDE_ROOT/liteide/bin/liteide liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gotools liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gocode liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gomodifytags liteide/bin\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/libliteapp.* liteide/lib/liteide\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/plugins/*.so liteide/lib/liteide/plugins\n\ncp -r -v $LITEIDE_ROOT/deploy/* liteide/share/liteide/\ncp -r -v $LITEIDE_ROOT/os_deploy/linux/* liteide/share/liteide/\n"
  },
  {
    "path": "build/build_linux_debian72_x64.sh",
    "content": "#!/bin/sh\n\nexport QTDIR=/usr/share/qt4\n\necho\necho \"Using QTDIR=$QTDIR here.\"\necho\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho build liteide\necho QTDIR=$QTDIR\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QTDIR ]; then\n\techo 'error, QTDIR is null'\n\texit 1\nfi\n\nexport PATH=$QTDIR/bin:$PATH\n\necho qmake liteide ...\necho .\nqmake $LITEIDE_ROOT -spec linux-g++ \"CONFIG+=release\"\n\nif [ $? -ge 1 ]; then\n\techo 'error, qmake fail'\n\texit 1\nfi\n\necho make liteide ...\necho .\nmake\n\nif [ $? -ge 1 ]; then\n\techo 'error, make fail'\n\texit 1\nfi\n\ngo version\nif [ $? -ge 1 ]; then\n\techo 'error, not find go in PATH'\n\texit 1\nfi\n\necho build liteide tools ...\ncd $LITEIDE_ROOT\n\nif [ -z $GOPATH ]; then\n\texport GOPATH=$PWD\nelse\n\texport GOPATH=$PWD:$GOPATH\nfi\n\n#(cd \"$PWD/src/github.com/visualfc/gotools\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/visualfc/gocode\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/fatih/gomodifytags\" && go install -ldflags \"-s\" -v)\n\nif [ $? -ge 1 ]; then\n\techo 'error, go install fail'\n\texit 1\nfi\n\n\necho export qrc images\ngo run src/tools/exportqrc/main.go -root .\n\nif [ $? -ge 1 ]; then\n\techo 'error, go run fail'\n\texit 1\nfi\n\necho deploy ...\n\ncd $BUILD_ROOT\n\nrm -r liteide\nmkdir -p liteide\nmkdir -p liteide/bin\nmkdir -p liteide/share/liteide\nmkdir -p liteide/lib/liteide/plugins\n\ncp -a -v $LITEIDE_ROOT/LICENSE.LGPL liteide\ncp -a -v $LITEIDE_ROOT/LGPL_EXCEPTION.TXT liteide\ncp -a -v $LITEIDE_ROOT/../README.md liteide\ncp -a -v $LITEIDE_ROOT/../CONTRIBUTORS liteide\n\ncp -a -v $LITEIDE_ROOT/liteide/bin/liteide liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gotools liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gocode liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gomodifytags liteide/bin\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/libliteapp.* liteide/lib/liteide\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/plugins/*.so liteide/lib/liteide/plugins\n\ncp -r -v $LITEIDE_ROOT/deploy/* liteide/share/liteide/\ncp -r -v $LITEIDE_ROOT/os_deploy/linux/* liteide/share/liteide/\n"
  },
  {
    "path": "build/build_linux_fedora27_x64.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho build liteide\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\necho qmake-qt4 liteide ...\necho .\nqmake-qt4 $LITEIDE_ROOT -spec linux-g++ \"CONFIG+=release\"\n\nif [ $? -ge 1 ]; then\n\techo 'error, qmake fail'\n\texit 1\nfi\n\necho make liteide ...\necho .\nmake\n\nif [ $? -ge 1 ]; then\n\techo 'error, make fail'\n\texit 1\nfi\n\ngo version\nif [ $? -ge 1 ]; then\n\techo 'error, not find go in PATH'\n\texit 1\nfi\n\necho build liteide tools ...\ncd $LITEIDE_ROOT\n\nif [ -z $GOPATH ]; then\n\texport GOPATH=$PWD\nelse\n\texport GOPATH=$PWD:$GOPATH\nfi\n\n#(cd \"$PWD/src/github.com/visualfc/gotools\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/visualfc/gocode\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/fatih/gomodifytags\" && go install -ldflags \"-s\" -v)\n\nif [ $? -ge 1 ]; then\n\techo 'error, go install fail'\n\texit 1\nfi\n\necho export qrc images\ngo run src/tools/exportqrc/main.go -root .\n\nif [ $? -ge 1 ]; then\n\techo 'error, go run fail'\n\texit 1\nfi\n\necho deploy ...\n\ncd $BUILD_ROOT\n\nrm -r liteide\nmkdir -p liteide\nmkdir -p liteide/bin\nmkdir -p liteide/share/liteide\nmkdir -p liteide/lib/liteide/plugins\n\ncp -a -v $LITEIDE_ROOT/LICENSE.LGPL liteide\ncp -a -v $LITEIDE_ROOT/LGPL_EXCEPTION.TXT liteide\ncp -a -v $LITEIDE_ROOT/../README.md liteide\ncp -a -v $LITEIDE_ROOT/../CONTRIBUTORS liteide\ncp -a -v $LITEIDE_ROOT/liteide.desktop liteide\ncp -a -v $LITEIDE_ROOT/install_icon.sh liteide\n\ncp -a -v $LITEIDE_ROOT/liteide/bin/liteide liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gotools liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gocode liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gomodifytags liteide/bin\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/libliteapp.* liteide/lib/liteide\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/plugins/*.so liteide/lib/liteide/plugins\n\ncp -r -v $LITEIDE_ROOT/deploy/* liteide/share/liteide/\ncp -r -v $LITEIDE_ROOT/os_deploy/linux/* liteide/share/liteide/\n"
  },
  {
    "path": "build/build_linux_qt4.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho build liteide\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nexport PATH=$QTDIR/bin:$PATH\n\necho qmake liteide ...\necho .\nqtchooser -qt=qt4 -run-tool=qmake $LITEIDE_ROOT -spec linux-g++ \"CONFIG+=release\"\n\nif [ $? -ge 1 ]; then\n\techo 'error, qmake fail'\n\texit 1\nfi\n\necho make liteide ...\necho .\nmake\n\nif [ $? -ge 1 ]; then\n\techo 'error, make fail'\n\texit 1\nfi\n\ngo version\nif [ $? -ge 1 ]; then\n\techo 'error, not find go in PATH'\n\texit 1\nfi\n\necho build liteide tools ...\ncd $LITEIDE_ROOT\n\nif [ -z $GOPATH ]; then\n\texport GOPATH=$PWD\nelse\n\texport GOPATH=$PWD:$GOPATH\nfi\n\n#(cd \"$PWD/src/github.com/visualfc/gotools\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/visualfc/gocode\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/fatih/gomodifytags\" && go install -ldflags \"-s\" -v)\n\nif [ $? -ge 1 ]; then\n\techo 'error, go install fail'\n\texit 1\nfi\n\n\necho export qrc images\ngo run src/tools/exportqrc/main.go -root .\n\nif [ $? -ge 1 ]; then\n\techo 'error, go run fail'\n\texit 1\nfi\n\necho deploy ...\n\ncd $BUILD_ROOT\n\nrm -r liteide\nmkdir -p liteide\nmkdir -p liteide/bin\nmkdir -p liteide/share/liteide\nmkdir -p liteide/lib/liteide/plugins\n\ncp -a -v $LITEIDE_ROOT/LICENSE.LGPL liteide\ncp -a -v $LITEIDE_ROOT/LGPL_EXCEPTION.TXT liteide\ncp -a -v $LITEIDE_ROOT/../README.md liteide\ncp -a -v $LITEIDE_ROOT/../CONTRIBUTORS liteide\n\ncp -a -v $LITEIDE_ROOT/liteide/bin/liteide liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gotools liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gocode liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gomodifytags liteide/bin\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/libliteapp.* liteide/lib/liteide\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/plugins/*.so liteide/lib/liteide/plugins\n\ncp -r -v $LITEIDE_ROOT/deploy/* liteide/share/liteide/\ncp -r -v $LITEIDE_ROOT/os_deploy/linux/* liteide/share/liteide/\n"
  },
  {
    "path": "build/build_linux_qt4_webkit.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho build liteide\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nexport PATH=$QTDIR/bin:$PATH\n\necho qmake liteide ...\necho .\nqtchooser -qt=qt4 -run-tool=qmake $LITEIDE_ROOT -spec linux-g++ \"CONFIG+=release liteide_qtwebkit\"\n\nif [ $? -ge 1 ]; then\n\techo 'error, qmake fail'\n\texit 1\nfi\n\necho make liteide ...\necho .\nmake\n\nif [ $? -ge 1 ]; then\n\techo 'error, make fail'\n\texit 1\nfi\n\ngo version\nif [ $? -ge 1 ]; then\n\techo 'error, not find go in PATH'\n\texit 1\nfi\n\necho build liteide tools ...\ncd $LITEIDE_ROOT\n\nif [ -z $GOPATH ]; then\n\texport GOPATH=$PWD\nelse\n\texport GOPATH=$PWD:$GOPATH\nfi\n\n#(cd \"$PWD/src/github.com/visualfc/gotools\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/visualfc/gocode\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/fatih/gomodifytags\" && go install -ldflags \"-s\" -v)\n\nif [ $? -ge 1 ]; then\n\techo 'error, go install fail'\n\texit 1\nfi\n\n\necho export qrc images\ngo run src/tools/exportqrc/main.go -root .\n\nif [ $? -ge 1 ]; then\n\techo 'error, go run fail'\n\texit 1\nfi\n\necho deploy ...\n\ncd $BUILD_ROOT\n\nrm -r liteide\nmkdir -p liteide\nmkdir -p liteide/bin\nmkdir -p liteide/share/liteide\nmkdir -p liteide/lib/liteide/plugins\n\ncp -a -v $LITEIDE_ROOT/LICENSE.LGPL liteide\ncp -a -v $LITEIDE_ROOT/LGPL_EXCEPTION.TXT liteide\ncp -a -v $LITEIDE_ROOT/../README.md liteide\ncp -a -v $LITEIDE_ROOT/../CONTRIBUTORS liteide\n\ncp -a -v $LITEIDE_ROOT/liteide/bin/liteide liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gotools liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gocode liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gomodifytags liteide/bin\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/libliteapp.* liteide/lib/liteide\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/plugins/*.so liteide/lib/liteide/plugins\n\ncp -r -v $LITEIDE_ROOT/deploy/* liteide/share/liteide/\ncp -r -v $LITEIDE_ROOT/os_deploy/linux/* liteide/share/liteide/\n"
  },
  {
    "path": "build/build_linux_qt5.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho build liteide\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nexport PATH=$QTDIR/bin:$PATH\n\necho qmake liteide ...\necho .\nqtchooser -qt=qt5 -run-tool=qmake $LITEIDE_ROOT -spec linux-g++ \"CONFIG+=release\"\n\nif [ $? -ge 1 ]; then\n\techo 'error, qmake fail'\n\texit 1\nfi\n\necho make liteide ...\necho .\nmake\n\nif [ $? -ge 1 ]; then\n\techo 'error, make fail'\n\texit 1\nfi\n\ngo version\nif [ $? -ge 1 ]; then\n\techo 'error, not find go in PATH'\n\texit 1\nfi\n\necho build liteide tools ...\ncd $LITEIDE_ROOT\n\nif [ -z $GOPATH ]; then\n\texport GOPATH=$PWD\nelse\n\texport GOPATH=$PWD:$GOPATH\nfi\n\n#(cd \"$PWD/src/github.com/visualfc/gotools\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/visualfc/gocode\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/fatih/gomodifytags\" && go install -ldflags \"-s\" -v)\n\nif [ $? -ge 1 ]; then\n\techo 'error, go install fail'\n\texit 1\nfi\n\n\necho export qrc images\ngo run src/tools/exportqrc/main.go -root .\n\nif [ $? -ge 1 ]; then\n\techo 'error, go run fail'\n\texit 1\nfi\n\necho deploy ...\n\ncd $BUILD_ROOT\n\nrm -r liteide\nmkdir -p liteide\nmkdir -p liteide/bin\nmkdir -p liteide/share/liteide\nmkdir -p liteide/lib/liteide/plugins\n\ncp -a -v $LITEIDE_ROOT/LICENSE.LGPL liteide\ncp -a -v $LITEIDE_ROOT/LGPL_EXCEPTION.TXT liteide\ncp -a -v $LITEIDE_ROOT/../README.md liteide\ncp -a -v $LITEIDE_ROOT/../CONTRIBUTORS liteide\n\ncp -a -v $LITEIDE_ROOT/liteide/bin/liteide liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gotools liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gocode liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gomodifytags liteide/bin\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/libliteapp.* liteide/lib/liteide\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/plugins/*.so liteide/lib/liteide/plugins\n\ncp -r -v $LITEIDE_ROOT/deploy/* liteide/share/liteide/\ncp -r -v $LITEIDE_ROOT/os_deploy/linux/* liteide/share/liteide/\n"
  },
  {
    "path": "build/build_linux_webkit.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho build liteide\necho QTDIR=$QTDIR\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QTDIR ]; then\n\techo 'error, QTDIR is null'\n\texit 1\nfi\n\nexport PATH=$QTDIR/bin:$PATH\n\necho qmake liteide ...\necho .\nqmake $LITEIDE_ROOT -spec linux-g++ \"CONFIG+=release liteide_qtwebkit\"\n\nif [ $? -ge 1 ]; then\n\techo 'error, qmake fail'\n\texit 1\nfi\n\necho make liteide ...\necho .\nmake\n\nif [ $? -ge 1 ]; then\n\techo 'error, make fail'\n\texit 1\nfi\n\ngo version\nif [ $? -ge 1 ]; then\n\techo 'error, not find go in PATH'\n\texit 1\nfi\n\necho build liteide tools ...\ncd $LITEIDE_ROOT\n\nif [ -z $GOPATH ]; then\n\texport GOPATH=$PWD\nelse\n\texport GOPATH=$PWD:$GOPATH\nfi\n\n#(cd \"$PWD/src/github.com/visualfc/gotools\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/visualfc/gocode\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/fatih/gomodifytags\" && go install -ldflags \"-s\" -v)\n\nif [ $? -ge 1 ]; then\n\techo 'error, go install fail'\n\texit 1\nfi\n\n\necho export qrc images\ngo run src/tools/exportqrc/main.go -root .\n\nif [ $? -ge 1 ]; then\n\techo 'error, go run fail'\n\texit 1\nfi\n\necho deploy ...\n\ncd $BUILD_ROOT\n\nrm -r liteide\nmkdir -p liteide\nmkdir -p liteide/bin\nmkdir -p liteide/share/liteide\nmkdir -p liteide/lib/liteide/plugins\n\ncp -a -v $LITEIDE_ROOT/LICENSE.LGPL liteide\ncp -a -v $LITEIDE_ROOT/LGPL_EXCEPTION.TXT liteide\ncp -a -v $LITEIDE_ROOT/../README.md liteide\ncp -a -v $LITEIDE_ROOT/../CONTRIBUTORS liteide\n\ncp -a -v $LITEIDE_ROOT/liteide/bin/liteide liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gotools liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gocode liteide/bin\ncp -a -v $LITEIDE_ROOT/bin/gomodifytags liteide/bin\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/libliteapp.* liteide/lib/liteide\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/plugins/*.so liteide/lib/liteide/plugins\n\ncp -r -v $LITEIDE_ROOT/deploy/* liteide/share/liteide/\ncp -r -v $LITEIDE_ROOT/os_deploy/linux/* liteide/share/liteide/\n"
  },
  {
    "path": "build/build_macos_qt4.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho build liteide\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QTDIR ]; then\n\techo 'error, QTDIR is null'\n\texit 1\nfi\n\nexport PATH=$QTDIR/bin:$PATH\n\necho qmake liteide ...\necho .\nqmake $LITEIDE_ROOT -spec macx-g++ \"CONFIG+=release\"\n\nif [ $? -ge 1 ]; then\n\techo 'error, qmake fail'\n\texit 1\nfi\n\necho make liteide ...\necho .\nmake\n\nif [ $? -ge 1 ]; then\n\techo 'error, make fail'\n\texit 1\nfi\n\ngo version\nif [ $? -ge 1 ]; then\n\techo 'error, not find go in PATH'\n\texit 1\nfi\n\necho build liteide tools ...\ncd $LITEIDE_ROOT\n\n\nif [ -z $GOPATH ]; then\n\texport GOPATH=$PWD\nelse\n\texport GOPATH=$PWD:$GOPATH\nfi\n\n#(cd \"$PWD/src/github.com/visualfc/gotools\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/visualfc/gocode\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/fatih/gomodifytags\" && go install -ldflags \"-s\" -v)\n\nif [ $? -ge 1 ]; then\n\techo 'error, go install fail'\n\texit 1\nfi\n\n\necho export qrc images\ngo run src/tools/exportqrc/main.go -root .\n\nif [ $? -ge 1 ]; then\n\techo 'error, go run fail'\n\texit 1\nfi\n\necho deploy ...\n\ncd $BUILD_ROOT\n\nrm -r liteide\nmkdir -p liteide\n\ncp -R -v $LITEIDE_ROOT/liteide/bin/LiteIDE.app liteide\nrm liteide/LiteIDE.app/Contents/PlugIns/*.a\n\ncp -R -v $LITEIDE_ROOT/src/liteide/Info.plist liteide/LiteIDE.app/Contents\ncp -R -v $LITEIDE_ROOT/LICENSE.LGPL liteide\ncp -R -v $LITEIDE_ROOT/LGPL_EXCEPTION.TXT liteide\ncp -R -v $LITEIDE_ROOT/../README.md liteide\ncp -R -v $LITEIDE_ROOT/../CONTRIBUTORS liteide\n\ncp -R -v $LITEIDE_ROOT/bin/gotools liteide/LiteIDE.app/Contents/MacOS\ncp -R -v $LITEIDE_ROOT/bin/gocode liteide/LiteIDE.app/Contents/MacOS\ncp -R -v $LITEIDE_ROOT/bin/gomodifytags liteide/LiteIDE.app/Contents/MacOS\ncp -R -v $LITEIDE_ROOT/deploy/* liteide/LiteIDE.app/Contents/Resources\ncp -R -v $LITEIDE_ROOT/os_deploy/macosx/* liteide/LiteIDE.app/Contents/Resources\n\n"
  },
  {
    "path": "build/build_macos_qt5.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho build liteide\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QTDIR ]; then\n\techo 'error, QTDIR is null'\n\texit 1\nfi\n\nexport PATH=$QTDIR/bin:$PATH\n\necho qmake liteide ...\necho .\nqmake $LITEIDE_ROOT -spec macx-clang CONFIG+=X86_64\n\nif [ $? -ge 1 ]; then\n\techo 'error, qmake fail'\n\texit 1\nfi\n\necho make liteide ...\necho .\nmake\n\nif [ $? -ge 1 ]; then\n\techo 'error, make fail'\n\texit 1\nfi\n\ngo version\nif [ $? -ge 1 ]; then\n\techo 'error, not find go in PATH'\n\texit 1\nfi\n\necho build liteide tools ...\ncd $LITEIDE_ROOT\n\n\nif [ -z $GOPATH ]; then\n\texport GOPATH=$PWD\nelse\n\texport GOPATH=$PWD:$GOPATH\nfi\n\n#(cd \"$PWD/src/github.com/visualfc/gotools\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/visualfc/gocode\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/fatih/gomodifytags\" && go install -ldflags \"-s\" -v)\n\nif [ $? -ge 1 ]; then\n\techo 'error, go install fail'\n\texit 1\nfi\n\necho export qrc images\ngo run src/tools/exportqrc/main.go -root .\n\nif [ $? -ge 1 ]; then\n\techo 'error, go run fail'\n\texit 1\nfi\n\necho deploy ...\n\ncd $BUILD_ROOT\n\nrm -r liteide\nmkdir -p liteide\n\ncp -R -v $LITEIDE_ROOT/liteide/bin/LiteIDE.app liteide\nrm liteide/LiteIDE.app/Contents/PlugIns/*.a\n\ncp -R -v $LITEIDE_ROOT/src/liteide/Info.plist liteide/LiteIDE.app/Contents\ncp -R -v $LITEIDE_ROOT/LICENSE.LGPL liteide\ncp -R -v $LITEIDE_ROOT/LGPL_EXCEPTION.TXT liteide\ncp -R -v $LITEIDE_ROOT/../README.md liteide\ncp -R -v $LITEIDE_ROOT/../CONTRIBUTORS liteide\n\ncp -R -v $LITEIDE_ROOT/bin/gotools liteide/LiteIDE.app/Contents/MacOS\ncp -R -v $LITEIDE_ROOT/bin/gocode liteide/LiteIDE.app/Contents/MacOS\ncp -R -v $LITEIDE_ROOT/bin/gomodifytags liteide/LiteIDE.app/Contents/MacOS\ncp -R -v $LITEIDE_ROOT/deploy/* liteide/LiteIDE.app/Contents/Resources\ncp -R -v $LITEIDE_ROOT/os_deploy/macosx/* liteide/LiteIDE.app/Contents/Resources\n\n"
  },
  {
    "path": "build/build_netbsd.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\nif [ -z $QTDIR ]; then\n\texport QTDIR=/usr/pkg/qt5\nfi\n\nexport PATH=$PATH:$QTDIR/bin\n\necho build liteide\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\necho qmake-qt5 liteide ...\necho .\nqmake $LITEIDE_ROOT \"CONFIG+=release\"\n\nif [ $? -ge 1 ]; then\n\techo 'error, qmake fail'\n\texit 1\nfi\n\necho make liteide ...\necho .\nmake\n\nif [ $? -ge 1 ]; then\n\techo 'error, make fail'\n\texit 1\nfi\n\ngo version\nif [ $? -ge 1 ]; then\n\techo 'error, not find go in PATH'\n\texit 1\nfi\n\necho build liteide tools ...\ncd $LITEIDE_ROOT\n\n\nif [ -z $GOPATH ]; then\n\texport GOPATH=$PWD\nelse\n\texport GOPATH=$PWD:$GOPATH\nfi\n\n#(cd \"$PWD/src/github.com/visualfc/gotools\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/visualfc/gocode\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/fatih/gomodifytags\" && go install -ldflags \"-s\" -v)\n\nif [ $? -ge 1 ]; then\n\techo 'error, go install fail'\n\texit 1\nfi\n\necho export qrc images\ngo run src/tools/exportqrc/main.go -root .\n\nif [ $? -ge 1 ]; then\n\techo 'error, go run fail'\n\texit 1\nfi\n\necho deploy ...\n\ncd $BUILD_ROOT\n\nrm -r liteide\nmkdir -p liteide\nmkdir -p liteide/local/bin\nmkdir -p liteide/local/share/liteide\nmkdir -p liteide/local/share/pixmaps\nmkdir -p liteide/local/lib/liteide/plugins\n\ncp -a -v $LITEIDE_ROOT/LICENSE.LGPL liteide\ncp -a -v $LITEIDE_ROOT/LGPL_EXCEPTION.TXT liteide\ncp -a -v $LITEIDE_ROOT/../README.md liteide\ncp -a -v $LITEIDE_ROOT/../CONTRIBUTORS liteide\n\ncp -a -v $LITEIDE_ROOT/liteide/bin/liteide liteide/local/bin\ncp -a -v $LITEIDE_ROOT/bin/gotools liteide/local/bin\ncp -a -v $LITEIDE_ROOT/bin/gocode liteide/local/bin\ncp -a -v $LITEIDE_ROOT/bin/gomodifytags liteide/local/bin\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/libliteapp.* liteide/local/lib/liteide\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/plugins/*.so liteide/local/lib/liteide/plugins\n\ncp -r -v $LITEIDE_ROOT/deploy/* liteide/local/share/liteide/\ncp -r -v $LITEIDE_ROOT/os_deploy/openbsd/* liteide/local/share/liteide/\ncp -r -v $LITEIDE_ROOT/deploy/welcome/images/liteide-logo*.png liteide/local/share/pixmaps\n\n"
  },
  {
    "path": "build/build_openbsd.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho build liteide\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\necho qmake-qt5 liteide ...\necho .\nqmake-qt5 $LITEIDE_ROOT \"CONFIG+=release\"\n\nif [ $? -ge 1 ]; then\n\techo 'error, qmake fail'\n\texit 1\nfi\n\necho make liteide ...\necho .\nmake\n\nif [ $? -ge 1 ]; then\n\techo 'error, make fail'\n\texit 1\nfi\n\ngo version\nif [ $? -ge 1 ]; then\n\techo 'error, not find go in PATH'\n\texit 1\nfi\n\necho build liteide tools ...\ncd $LITEIDE_ROOT\n\n\nif [ -z $GOPATH ]; then\n\texport GOPATH=$PWD\nelse\n\texport GOPATH=$PWD:$GOPATH\nfi\n\n#(cd \"$PWD/src/github.com/visualfc/gotools\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/visualfc/gocode\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/fatih/gomodifytags\" && go install -ldflags \"-s\" -v)\n\nif [ $? -ge 1 ]; then\n\techo 'error, go install fail'\n\texit 1\nfi\n\necho export qrc images\ngo run src/tools/exportqrc/main.go -root .\n\nif [ $? -ge 1 ]; then\n\techo 'error, go run fail'\n\texit 1\nfi\n\necho deploy ...\n\ncd $BUILD_ROOT\n\nrm -r liteide\nmkdir -p liteide\nmkdir -p liteide/local/bin\nmkdir -p liteide/local/share/liteide\nmkdir -p liteide/local/share/pixmaps\nmkdir -p liteide/local/lib/liteide/plugins\n\ncp -a -v $LITEIDE_ROOT/LICENSE.LGPL liteide\ncp -a -v $LITEIDE_ROOT/LGPL_EXCEPTION.TXT liteide\ncp -a -v $LITEIDE_ROOT/../README.md liteide\ncp -a -v $LITEIDE_ROOT/../CONTRIBUTORS liteide\n\ncp -a -v $LITEIDE_ROOT/liteide/bin/liteide liteide/local/bin\ncp -a -v $LITEIDE_ROOT/bin/gotools liteide/local/bin\ncp -a -v $LITEIDE_ROOT/bin/gocode liteide/local/bin\ncp -a -v $LITEIDE_ROOT/bin/gomodifytags liteide/local/bin\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/libliteapp.* liteide/local/lib/liteide\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/plugins/*.so liteide/local/lib/liteide/plugins\n\ncp -r -v $LITEIDE_ROOT/deploy/* liteide/local/share/liteide/\ncp -r -v $LITEIDE_ROOT/os_deploy/openbsd/* liteide/local/share/liteide/\ncp -r -v $LITEIDE_ROOT/deploy/welcome/images/liteide-logo*.png liteide/local/share/pixmaps\n\n"
  },
  {
    "path": "build/build_openbsd_g++.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho build liteide\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\necho qmake liteide ...\necho .\nqmake $LITEIDE_ROOT -spec openbsd-g++ \"CONFIG+=release\"\n\nif [ $? -ge 1 ]; then\n\techo 'error, qmake fail'\n\texit 1\nfi\n\necho make liteide ...\necho .\nmake\n\nif [ $? -ge 1 ]; then\n\techo 'error, make fail'\n\texit 1\nfi\n\ngo version\nif [ $? -ge 1 ]; then\n\techo 'error, not find go in PATH'\n\texit 1\nfi\n\necho build liteide tools ...\ncd $LITEIDE_ROOT\n\n\nif [ -z $GOPATH ]; then\n\texport GOPATH=$PWD\nelse\n\texport GOPATH=$PWD:$GOPATH\nfi\n\n#(cd \"$PWD/src/github.com/visualfc/gotools\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/visualfc/gocode\" && go install -ldflags \"-s\" -v)\n#(cd \"$PWD/src/github.com/fatih/gomodifytags\" && go install -ldflags \"-s\" -v)\n\nif [ $? -ge 1 ]; then\n\techo 'error, go install fail'\n\texit 1\nfi\n\necho export qrc images\ngo run src/tools/exportqrc/main.go -root .\n\nif [ $? -ge 1 ]; then\n\techo 'error, go run fail'\n\texit 1\nfi\n\necho deploy ...\n\ncd $BUILD_ROOT\n\nrm -r liteide\nmkdir -p liteide\nmkdir -p liteide/local/bin\nmkdir -p liteide/local/share/liteide\nmkdir -p liteide/local/share/pixmaps\nmkdir -p liteide/local/lib/liteide/plugins\n\ncp -a -v $LITEIDE_ROOT/LICENSE.LGPL liteide\ncp -a -v $LITEIDE_ROOT/LGPL_EXCEPTION.TXT liteide\ncp -a -v $LITEIDE_ROOT/../README.md liteide\ncp -a -v $LITEIDE_ROOT/../CONTRIBUTORS liteide\n\ncp -a -v $LITEIDE_ROOT/liteide/bin/liteide liteide/local/bin\ncp -a -v $LITEIDE_ROOT/bin/gotools liteide/local/bin\ncp -a -v $LITEIDE_ROOT/bin/gocode liteide/local/bin\ncp -a -v $LITEIDE_ROOT/bin/gomodifytags liteide/local/bin\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/libliteapp.* liteide/local/lib/liteide\ncp -a -v $LITEIDE_ROOT/liteide/lib/liteide/plugins/*.so liteide/local/lib/liteide/plugins\n\ncp -r -v $LITEIDE_ROOT/deploy/* liteide/local/share/liteide/\ncp -r -v $LITEIDE_ROOT/os_deploy/openbsd/* liteide/local/share/liteide/\ncp -r -v $LITEIDE_ROOT/deploy/welcome/images/liteide-logo*.png liteide/local/share/pixmaps\n"
  },
  {
    "path": "build/build_windows_386_mingw32.cmd",
    "content": "set GOARCH=386\r\ncall build_windows_mingw32.cmd\r\ncall update_pkg.cmd\r\n\r\nif x%LITEIDE_ROOT%==x set LITEIDE_ROOT=%CD%\\..\\liteidex\r\nxcopy %LITEIDE_ROOT%\\bin\\windows_386\\gotools.exe liteide\\bin /y\r\nxcopy %LITEIDE_ROOT%\\bin\\windows_386\\gocode.exe liteide\\bin /y\r\nxcopy %LITEIDE_ROOT%\\bin\\windows_386\\gomodifytags.exe liteide\\bin /y\r\n"
  },
  {
    "path": "build/build_windows_mingw32.cmd",
    "content": "@echo off\r\n\r\nsetlocal\r\n\r\nset BUILD_ROOT=%CD%\r\nif x%LITEIDE_ROOT%==x set LITEIDE_ROOT=%CD%\\..\\liteidex\r\n\r\necho build liteide\r\necho QTDIR=%QTDIR%\r\necho GOROOT=%GOROOT%\r\necho BUILD_ROOT=%BUILD_ROOT%\r\necho LITEIDE_ROOT=%LITEIDE_ROOT%\r\necho MINGWDIR=%MINGWDIR%\r\necho .\r\n\r\nif x%QTDIR%==x goto qtdir_fail\r\nif x%MINGWDIR%==x goto mwdir_fail\r\n\r\nset PATH=%QTDIR%/bin;%MINGWDIR%/bin;%PATH%\r\n\r\necho qmake liteide ...\r\necho .\r\nqmake %LITEIDE_ROOT% -spec win32-g++ \"CONFIG+=release\"\r\n\r\nif ERRORLEVEL 1 goto qmake_fail\r\n\r\necho make liteide ...\r\necho .\r\nmingw32-make\r\n\r\nif ERRORLEVEL 1 goto make_fail\r\n\r\ngo version\r\n\r\nif ERRORLEVEL 1 goto go_fail\r\n\r\necho build liteide tools\r\necho .\r\n\r\ncd %LITEIDE_ROOT%\r\n\r\nif defined %GOPATH (\r\n\tset GOPATH=%CD%;%GOPATH%\r\n) else (\r\n\tset GOPATH=%CD%\r\n)\r\n\r\n:: (cd \"%CD%/src/github.com/visualfc/gotools\" & go install -ldflags \"-s\" -v & cd %CD%)\r\n:: (cd \"%CD%/src/github.com/visualfc/gocode\" & go install -ldflags \"-s\" -v & cd %CD%)\r\n:: (cd \"%CD%/src/github.com/fatih/gomodifytags\" & go install -ldflags \"-s\" -v & cd %CD%)\r\n\r\nif ERRORLEVEL 1 goto go_fail\r\n\r\necho export qrc images\r\ngo run src/tools/exportqrc/main.go -root .\r\nif ERRORLEVEL 1 goto go_fail\r\n\r\ncd %BUILD_ROOT%\r\necho deploy liteide ...\r\necho .\r\n\r\nif exist liteide rmdir /q /s liteide\r\n\r\nif not exist liteide mkdir liteide\r\nif not exist liteide\\bin mkdir liteide\\bin\r\nif not exist liteide\\lib mkdir liteide\\lib\r\nif not exist liteide\\lib\\liteide mkdir liteide\\lib\\liteide\r\nif not exist liteide\\lib\\liteide\\plugins mkdir liteide\\lib\\liteide\\plugins\r\n\r\nxcopy %LITEIDE_ROOT%\\LICENSE.LGPL liteide /y\r\nxcopy %LITEIDE_ROOT%\\LGPL_EXCEPTION.TXT liteide /y\r\nxcopy %LITEIDE_ROOT%\\..\\README.MD liteide /y\r\nxcopy %LITEIDE_ROOT%\\..\\CONTRIBUTORS liteide /y\r\n\r\nxcopy %LITEIDE_ROOT%\\liteide\\bin\\* liteide\\bin /y\r\nxcopy %LITEIDE_ROOT%\\bin\\gotools.exe liteide\\bin /y\r\nxcopy %LITEIDE_ROOT%\\bin\\gocode.exe liteide\\bin /y\r\nxcopy %LITEIDE_ROOT%\\bin\\gomodifytags.exe liteide\\bin /y\r\nxcopy %LITEIDE_ROOT%\\liteide\\lib\\liteide\\plugins\\*.dll liteide\\lib\\liteide\\plugins /y\r\n\r\nxcopy %LITEIDE_ROOT%\\deploy liteide\\share\\liteide /e /y /i\r\nxcopy %LITEIDE_ROOT%\\os_deploy\\windows liteide\\share\\liteide  /e /y /i\r\n\r\ngoto end\r\n\r\n:qtdir_fail\r\necho error, QTDIR is null\r\ngoto end\r\n\r\n:mwdir_fail\r\necho error, MINGWDIR is null\r\ngoto end\r\n\r\n:qmake_fail\r\necho error, qmake fail\r\ngoto end\r\n\r\n:make_fail\r\necho error, make fail\r\ngoto end\r\n\r\n:go_fail\r\necho error, go fail\r\ngoto end\r\n\r\n:end\r\n"
  },
  {
    "path": "build/build_windows_msvc.cmd",
    "content": "@echo off\r\n\r\nsetlocal\r\n\r\nset BUILD_ROOT=%CD%\r\nif x%LITEIDE_ROOT%==x set LITEIDE_ROOT=%CD%\\..\\liteidex\r\n\r\necho build liteide\r\necho QTDIR=%QTDIR%\r\necho GOROOT=%GOROOT%\r\necho BUILD_ROOT=%BUILD_ROOT%\r\necho LITEIDE_ROOT=%LITEIDE_ROOT%\r\necho .\r\n\r\nif x%QTDIR%==x goto qtdir_fail\r\n\r\nset PATH=%QTDIR%/bin;%PATH%\r\n\r\necho qmake liteide ...\r\necho .\r\nqmake %LITEIDE_ROOT% \"CONFIG+=release\"\r\n\r\nif ERRORLEVEL 1 goto qmake_fail\r\n\r\necho make liteide ...\r\necho .\r\nnmake\r\n\r\nif ERRORLEVEL 1 goto make_fail\r\n\r\ngo version\r\n\r\nif ERRORLEVEL 1 goto go_fail\r\n\r\necho build liteide tools\r\necho .\r\n\r\ncd %LITEIDE_ROOT%\r\nif defined %GOPATH (\r\n\tset GOPATH=%CD%;%GOPATH%\r\n) else (\r\n\tset GOPATH=%CD%\r\n)\r\n\r\n:: (cd \"%CD%/src/github.com/visualfc/gotools\" & go install -ldflags \"-s\" -v & cd %CD%)\r\n:: (cd \"%CD%/src/github.com/visualfc/gocode\" & go install -ldflags \"-s\" -v & cd %CD%)\r\n:: (cd \"%CD%/src/github.com/fatih/gomodifytags\" & go install -ldflags \"-s\" -v & cd %CD%)\r\n\r\nif ERRORLEVEL 1 goto go_fail\r\n\r\necho export qrc images\r\ngo run src/tools/exportqrc/main.go -root .\r\nif ERRORLEVEL 1 goto go_fail\r\n\r\ncd %BUILD_ROOT%\r\n\r\necho deploy liteide ...\r\necho .\r\n\r\nif exist liteide rmdir /q /s liteide\r\n\r\nif not exist liteide mkdir liteide\r\nif not exist liteide\\bin mkdir liteide\\bin\r\nif not exist liteide\\lib mkdir liteide\\lib\r\nif not exist liteide\\lib\\liteide mkdir liteide\\lib\\liteide\r\nif not exist liteide\\lib\\liteide\\plugins mkdir liteide\\lib\\liteide\\plugins\r\n\r\nxcopy %LITEIDE_ROOT%\\LICENSE.LGPL liteide /y\r\nxcopy %LITEIDE_ROOT%\\LGPL_EXCEPTION.TXT liteide /y\r\nxcopy %LITEIDE_ROOT%\\..\\README.MD liteide /y\r\nxcopy %LITEIDE_ROOT%\\..\\CONTRIBUTORS liteide /y\r\n\r\nxcopy %LITEIDE_ROOT%\\liteide\\bin\\* liteide\\bin /y\r\nxcopy %LITEIDE_ROOT%\\bin\\gotools.exe liteide\\bin /y\r\nxcopy %LITEIDE_ROOT%\\bin\\gocode.exe liteide\\bin /y\r\nxcopy %LITEIDE_ROOT%\\bin\\gomodifytags.exe liteide\\bin /y\r\nxcopy %LITEIDE_ROOT%\\liteide\\lib\\liteide\\plugins\\*.dll liteide\\lib\\liteide\\plugins /y\r\n\r\nxcopy %LITEIDE_ROOT%\\deploy liteide\\share\\liteide /e /y /i\r\nxcopy %LITEIDE_ROOT%\\os_deploy\\windows liteide\\share\\liteide  /e /y /i\r\n\r\ngoto end\r\n\r\n:qtdir_fail\r\necho error, QTDIR is null\r\ngoto end\r\n\r\n:qmake_fail\r\necho error, qmake fail\r\ngoto end\r\n\r\n:make_fail\r\necho error, make fail\r\ngoto end\r\n\r\n:go_fail\r\necho error, go fail\r\ngoto end\r\n\r\n:end\r\n"
  },
  {
    "path": "build/deploy_linux_bundle.sh",
    "content": "#!/bin/sh\n\nlinuxdeployqt liteide/bin/liteide -bundle-non-qt-libs\n"
  },
  {
    "path": "build/deploy_linux_debian72_x64_qt4.8_webkit.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\nDEBIANQTLIBS=/usr/lib/x86_64-linux-gnu\necho \"Setting DEBIANQTLIBS=$DEBIANQTLIBS\"\n\necho build liteide \necho DEBIANQTLIBS=$DEBIANQTLIBS\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $DEBIANQTLIBS ]; then\n\techo 'error, DEBIANQTLIBS is null'\n\texit 1\nfi\n\ncp -a -v $DEBIANQTLIBS/libQtCore.so* liteide/lib/liteide\ncp -a -v $DEBIANQTLIBS/libQtGui.so* liteide/lib/liteide\ncp -a -v $DEBIANQTLIBS/libQtXml.so* liteide/lib/liteide\n\ncp -a -v $DEBIANQTLIBS/libQtNetwork.so* liteide/lib/liteide\ncp -a -v $DEBIANQTLIBS/libQtWebKit.so* liteide/lib/liteide\n"
  },
  {
    "path": "build/deploy_linux_qt4.7_webkit.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho build liteide \necho QTDIR=$QTDIR\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QTDIR ]; then\n\techo 'error, QTDIR is null'\n\texit 1\nfi\n\ncp -a -v $QTDIR/lib/libQtCore.so* liteide/lib/liteide\ncp -a -v $QTDIR/lib/libQtGui.so* liteide/lib/liteide\ncp -a -v $QTDIR/lib/libQtXml.so* liteide/lib/liteide\n\ncp -a -v $QTDIR/lib/libphonon.so* liteide/lib/liteide\ncp -a -v $QTDIR/lib/libQtNetwork.so* liteide/lib/liteide\ncp -a -v $QTDIR/lib/libQtWebKit.so* liteide/lib/liteide\ncp -a -v $QTDIR/lib/libQtDBus.so* liteide/lib/liteide\n"
  },
  {
    "path": "build/deploy_linux_qt4.8_webkit.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho build liteide \necho QTDIR=$QTDIR\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QTDIR ]; then\n\techo 'error, QTDIR is null'\n\texit 1\nfi\n\ncp -a -v $QTDIR/lib/libQtCore.so* liteide/lib/liteide\ncp -a -v $QTDIR/lib/libQtGui.so* liteide/lib/liteide\ncp -a -v $QTDIR/lib/libQtXml.so* liteide/lib/liteide\n\ncp -a -v $QTDIR/lib/libQtNetwork.so* liteide/lib/liteide\ncp -a -v $QTDIR/lib/libQtWebKit.so* liteide/lib/liteide"
  },
  {
    "path": "build/deploy_linux_qt4.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho build liteide\necho QTDIR=$QTDIR\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QTDIR ]; then\n\techo 'error, QTDIR is null'\n\texit 1\nfi\n\ncp -a -v $QTDIR/lib/libQtCore.so* liteide/lib/liteide\ncp -a -v $QTDIR/lib/libQtGui.so* liteide/lib/liteide\ncp -a -v $QTDIR/lib/libQtXml.so* liteide/lib/liteide\n"
  },
  {
    "path": "build/deploy_linux_x32_appimage.sh",
    "content": "#!/bin/sh\n\nmkdir liteide.AppDir\nmkdir liteide.AppDir/usr\ncp -r liteide/* liteide.AppDir/usr \nlinuxdeployqt liteide.AppDir/usr/bin/liteide -bundle-non-qt-libs\ncp liteide.desktop liteide.AppDir\ncp liteide.png liteide.AppDir\ncd liteide.AppDir\nln -s -f usr/bin/liteide AppRun\ncd ..\nappimagetool-i686.AppImage liteide.AppDir\nrm -r liteide.AppDir\n"
  },
  {
    "path": "build/deploy_linux_x32_qt4.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\nQT4LIBS=/usr/lib/i386-linux-gnu\necho \"Setting QT4LIBS=$QT4LIBS\"\n\necho build liteide\necho QT4LIBS=$QT4LIBS\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QT4LIBS ]; then\n\techo 'error, QT4LIBS is null'\n\texit 1\nfi\n\ncp -a -v $QT4LIBS/libQtCore.so* liteide/lib/liteide\ncp -a -v $QT4LIBS/libQtGui.so* liteide/lib/liteide\ncp -a -v $QT4LIBS/libQtXml.so* liteide/lib/liteide\n"
  },
  {
    "path": "build/deploy_linux_x32_qt5.5.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\nQT5LIBS=/usr/lib/i386-linux-gnu\necho \"Setting QT5LIBS=$QT5LIBS\"\n\necho build liteide\necho QT5LIBS=$QT5LIBS\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QT5LIBS ]; then\n\techo 'error, QT5LIBS is null'\n\texit 1\nfi\n\ncp -a -v $QT5LIBS/libQt5Core.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libQt5Gui.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libQt5Widgets.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libQt5Xml.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libicudata.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libicui18n.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libicuuc.so* liteide/lib/liteide\n"
  },
  {
    "path": "build/deploy_linux_x32_qt5.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\nQT5LIBS=/usr/lib/i386-linux-gnu\necho \"Setting QT5LIBS=$QT5LIBS\"\n\necho build liteide\necho QT5LIBS=$QT5LIBS\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QT5LIBS ]; then\n\techo 'error, QT5LIBS is null'\n\texit 1\nfi\n\ncp -a -v $QT5LIBS/libQt5Core.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libQt5Gui.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libQt5Widgets.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libQt5Xml.so* liteide/lib/liteide\n"
  },
  {
    "path": "build/deploy_linux_x64_appimage.sh",
    "content": "#!/bin/sh\n\nmkdir liteide.AppDir\nmkdir liteide.AppDir/usr\ncp -r liteide/* liteide.AppDir/usr \nlinuxdeployqt liteide.AppDir/usr/bin/liteide -bundle-non-qt-libs\ncp liteide.desktop liteide.AppDir\ncp liteide.png liteide.AppDir\ncd liteide.AppDir\nln -s -f usr/bin/liteide AppRun\ncd ..\nappimagetool-x86_64.AppImage liteide.AppDir\nrm -r liteide.AppDir"
  },
  {
    "path": "build/deploy_linux_x64_qt4.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\nQT4LIBS=/usr/lib/x86_64-linux-gnu\necho \"Setting QT4LIBS=$QT4LIBS\"\n\necho build liteide\necho QT4LIBS=$QT4LIBS\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QT4LIBS ]; then\n\techo 'error, QT4LIBS is null'\n\texit 1\nfi\n\ncp -a -v $QT4LIBS/libQtCore.so* liteide/lib/liteide\ncp -a -v $QT4LIBS/libQtGui.so* liteide/lib/liteide\ncp -a -v $QT4LIBS/libQtXml.so* liteide/lib/liteide\n"
  },
  {
    "path": "build/deploy_linux_x64_qt4_webkit.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\nQT4LIBS=/usr/lib/x86_64-linux-gnu\necho \"Setting QT4LIBS=$QT4LIBS\"\n\necho build liteide\necho QT4LIBS=$QT4LIBS\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QT4LIBS ]; then\n\techo 'error, QT4LIBS is null'\n\texit 1\nfi\n\ncp -a -v $QT4LIBS/libQtCore.so* liteide/lib/liteide\ncp -a -v $QT4LIBS/libQtGui.so* liteide/lib/liteide\ncp -a -v $QT4LIBS/libQtXml.so* liteide/lib/liteide\n\ncp -a -v $QT4LIBS/libQtNetwork.so* liteide/lib/liteide\ncp -a -v $QT4LIBS/libQtWebKit.so* liteide/lib/liteide\n"
  },
  {
    "path": "build/deploy_linux_x64_qt5.5.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\nQT5LIBS=/usr/lib/x86_64-linux-gnu\necho \"Setting QT5LIBS=$QT5LIBS\"\n\necho build liteide\necho QT5LIBS=$QT5LIBS\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QT5LIBS ]; then\n\techo 'error, QT5LIBS is null'\n\texit 1\nfi\n\ncp -a -v $QT5LIBS/libQt5Core.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libQt5Gui.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libQt5Widgets.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libQt5Xml.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libicudata.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libicui18n.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libicuuc.so* liteide/lib/liteide\n"
  },
  {
    "path": "build/deploy_linux_x64_qt5.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\nQT5LIBS=/usr/lib/x86_64-linux-gnu\necho \"Setting QT5LIBS=$QT5LIBS\"\n\necho build liteide\necho QT5LIBS=$QT5LIBS\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QT5LIBS ]; then\n\techo 'error, QT5LIBS is null'\n\texit 1\nfi\n\ncp -a -v $QT5LIBS/libQt5Core.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libQt5Gui.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libQt5Widgets.so* liteide/lib/liteide\ncp -a -v $QT5LIBS/libQt5Xml.so* liteide/lib/liteide\n"
  },
  {
    "path": "build/deploy_macos_qt4.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho deploy liteide/LiteIDE.app\necho QTDIR=$QTDIR\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QTDIR ]; then\n\techo 'error, QTDIR is null'\n\texit 1\nfi\n\nexport PATH=$QTDIR/bin:$PATH\n\nmacdeployqt liteide/LiteIDE.app\n"
  },
  {
    "path": "build/deploy_macos_qt5.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho deploy liteide/LiteIDE.app\necho QTDIR=$QTDIR\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QTDIR ]; then\n\techo 'error, QTDIR is null'\n\texit 1\nfi\n\nexport PATH=$QTDIR/bin:$PATH\n\nrm liteide/LiteIDE.app/Contents/Resources/qt.conf\nmacdeployqt liteide/LiteIDE.app"
  },
  {
    "path": "build/deploy_windows_qt4.8.cmd",
    "content": "@echo off\r\n\r\nsetlocal\r\n\r\nset BUILD_ROOT=%CD%\r\nif x%LITEIDE_ROOT%==x set LITEIDE_ROOT=%CD%\\..\\liteidex\r\n\r\necho build liteide\r\necho QTDIR=%QTDIR%\r\necho .\r\n\r\nif x%QTDIR%==x goto qtdir_fail\r\n\r\nxcopy %QTDIR%\\bin\\QtCore4.dll liteide\\bin /y\r\nxcopy %QTDIR%\\bin\\QtGui4.dll liteide\\bin /y\r\nxcopy %QTDIR%\\bin\\QtXml4.dll liteide\\bin /y\r\nxcopy %QTDIR%\\bin\\mingwm10.dll liteide\\bin /y\r\nxcopy %QTDIR%\\bin\\libgcc_s_dw2-1.dll liteide\\bin /y\r\n\r\nxcopy %QTDIR%\\bin\\QtNetwork4.dll liteide\\bin /y\r\nxcopy %QTDIR%\\bin\\QtWebkit4.dll liteide\\bin /y\r\n\r\ngoto end\r\n\r\n:qtdir_fail\r\necho error, QTDIR is null\r\ngoto end\r\n\r\n:end\r\n"
  },
  {
    "path": "build/deploy_windows_qt4.8_msvc.cmd",
    "content": "@echo off\r\n\r\nsetlocal\r\n\r\nset BUILD_ROOT=%CD%\r\nif x%LITEIDE_ROOT%==x set LITEIDE_ROOT=%CD%\\..\\liteidex\r\n\r\necho build liteide\r\necho QTDIR=%QTDIR%\r\necho .\r\n\r\nif x%QTDIR%==x goto qtdir_fail\r\n\r\nxcopy %QTDIR%\\bin\\QtCore4.dll liteide\\bin /y\r\nxcopy %QTDIR%\\bin\\QtGui4.dll liteide\\bin /y\r\nxcopy %QTDIR%\\bin\\QtXml4.dll liteide\\bin /y\r\n\r\nxcopy %QTDIR%\\bin\\QtNetwork4.dll liteide\\bin /y\r\nxcopy %QTDIR%\\bin\\QtWebkit4.dll liteide\\bin /y\r\n\r\ngoto end\r\n\r\n:qtdir_fail\r\necho error, QTDIR is null\r\ngoto end\r\n\r\n:end\r\n"
  },
  {
    "path": "build/deploy_windows_qt5.15.2.cmd",
    "content": "@echo off\r\n\r\nsetlocal\r\n\r\nset BUILD_ROOT=%CD%\r\nif x%LITEIDE_ROOT%==x set LITEIDE_ROOT=%CD%\\..\\liteidex\r\n\r\necho build liteide \r\necho QTDIR=%QTDIR%\r\necho .\r\n\r\nif x%QTDIR%==x goto qtdir_fail\r\n\r\nwindeployqt --no-angle --no-opengl-sw --dir liteide/bin liteide/lib/liteide/plugins/liteeditor.dll\r\n\r\nwindeployqt --no-angle --no-opengl-sw --dir liteide/bin liteide/lib/liteide/plugins/welcome.dll\r\n\r\nwindeployqt --no-angle --no-opengl-sw --dir liteide/bin liteide/lib/liteide/plugins/litebuild.dll\r\n\r\nwindeployqt --no-angle --no-opengl-sw --dir liteide/bin liteide/lib/liteide/plugins/dlvdebugger.dll\r\n\r\nwindeployqt --no-angle --no-opengl-sw --dir liteide/bin liteide/bin/liteapp.dll\r\n\r\n\r\n\r\ngoto end\r\n\r\n:qtdir_fail\r\necho error, QTDIR is null\r\ngoto end\r\n\r\n:end\r\n"
  },
  {
    "path": "build/deploy_windows_qt5.9.cmd",
    "content": "@echo off\r\n\r\nsetlocal\r\n\r\nset BUILD_ROOT=%CD%\r\nif x%LITEIDE_ROOT%==x set LITEIDE_ROOT=%CD%\\..\\liteidex\r\n\r\necho build liteide \r\necho QTDIR=%QTDIR%\r\necho .\r\n\r\nif x%QTDIR%==x goto qtdir_fail\r\n\r\nwindeployqt --no-angle --no-opengl-sw --dir liteide/bin liteide/lib/liteide/plugins/liteeditor.dll\r\n\r\nwindeployqt --no-angle --no-opengl-sw --dir liteide/bin liteide/lib/liteide/plugins/welcome.dll\r\n\r\nwindeployqt --no-angle --no-opengl-sw --dir liteide/bin liteide/lib/liteide/plugins/litebuild.dll\r\n\r\nwindeployqt --no-angle --no-opengl-sw --dir liteide/bin liteide/lib/liteide/plugins/dlvdebugger.dll\r\n\r\nwindeployqt --no-angle --no-opengl-sw --dir liteide/bin liteide/bin/liteapp.dll\r\n\r\n\r\n\r\ngoto end\r\n\r\n:qtdir_fail\r\necho error, QTDIR is null\r\ngoto end\r\n\r\n:end\r\n"
  },
  {
    "path": "build/liteide.desktop",
    "content": "[Desktop Entry]\nType=Application\nName=liteide\nExec=liteide\nIcon=liteide\nComment=LiteIDE is a simple, open source, cross-platform Go IDE.\nTerminal=false\nCategories=Development;\nName[zh_CN]=liteide\n"
  },
  {
    "path": "build/liteide_archlinux/PKGBUILD",
    "content": "# $Id$\n# Maintainer: Alexander F Rødseth <xyproto@archlinux.org>\n# Contributor: spambanane <happy.house@gmx.de>\n# Contributor: Matteo <matteo.dek@gmail.com>\n# Contributor: Matthew Zimmerman <mzimmerman@gmail.com>\n\npkgname=liteide\npkgver=38.3\npkgrel=1\npkgdesc='IDE for editing and building projects written in the Go programming language'\nlicense=('LGPL')\narch=('x86_64')\nurl='https://github.com/visualfc/liteide'\nmakedepends=('go' 'gendesk' 'git')\ndepends=('go-tools' 'qt5-base')\noptdepends=('go: go compiler'\n            'gcc-go: go compiler')\noptions=('!strip' '!emptydirs')\nsource=(\"$pkgname-x$pkgver::git+https://github.com/visualfc/liteide.git#tag=x$pkgver\")\nmd5sums=('SKIP')\n\nprepare() {\n  gendesk -f -n --name LiteIDE --pkgname \"$pkgname\" --pkgdesc \"$pkgdesc\"\n  chmod +x \"liteide-x$pkgver/build/\"*_*.sh\n\n  # Fix for FS#4662 until fixed by upstream\n  cd \"liteide-x$pkgver/liteidex/os_deploy/linux/liteenv\"\n  sed -i 's|^GOROOT|#GOROOT|g' linux32.env\n  sed -i 's|^GOROOT|#GOROOT|g' linux64.env\n\n  # Fix the libpng warning: iCCP: known incorrect sRGB profile\n  find \"$srcdir\" -type f -iname \"*.png\" -exec mogrify -strip '{}' \\;\n}\n\nbuild() {\n  cd \"liteide-x$pkgver/build\"\n\n  mkdir -p go\n  export GOPATH=\"$(pwd)/go\"\n  export QTDIR=/usr\n\n  ./update_pkg.sh\n  ./build_linux.sh\n\n}\n\npackage() {\n  cd \"liteide-x$pkgver/build/liteide\"\n\n  msg2 'Creating directories...'\n  mkdir -p \\\n    \"$pkgdir/usr/lib/liteide\" \\\n    \"$pkgdir/usr/share/liteide\" \\\n    \"$pkgdir/usr/share/doc/$pkgname\"\n\n  msg2 'Packaging executables...'\n  for binary in gomodifytags gotools gocode liteide; do # goimports\n    install -Dm755 \"bin/$binary\" \"$pkgdir/usr/bin/$binary\"\n  done\n  ln -s /usr/bin/liteide \"$pkgdir/usr/bin/golangide\"\n\n  cd \"$srcdir/liteide-x$pkgver/liteidex\"\n\n  msg2 'Packaging resources...'\n  cp -r deploy/* os_deploy/* \"$pkgdir/usr/share/liteide\"\n\n  msg2 'Packaging libraries and plugins...'\n  cp -r liteide/lib/liteide/* \"$pkgdir/usr/lib/liteide\"\n  chmod -x \"$pkgdir/usr/lib/liteide/plugins/\"*\n\n  msg2 'Packaging license and license exception...'\n  install -Dm644 LICENSE.LGPL \\\n    \"$pkgdir/usr/share/licenses/$pkgname/LICENSE\"\n  install -Dm644 LGPL_EXCEPTION.TXT \\\n    \"$pkgdir/usr/share/licenses/$pkgname/LGPL_EXCEPTION\"\n\n  cd \"$srcdir\"\n\n  msg2 'Packaging desktop shortcut...'\n  install -Dm644 \"$pkgname.desktop\" \\\n    \"$pkgdir/usr/share/applications/$pkgname.desktop\"\n  install -d \"$pkgdir/usr/share/pixmaps\"\n  ln -s /usr/share/liteide/welcome/images/liteide400.png \\\n    \"$pkgdir/usr/share/pixmaps/$pkgname.png\"\n\n  msg2 'Cleaning up...'\n  rm -rf \"$pkgdir/usr/share/$pkgname/doc\"\n\n  # Fix for FS#38781\n  mv \"$pkgdir/usr/share/liteide/linux/liteenv\" \\\n    \"$pkgdir/usr/share/liteide/liteenv\"\n}\n\n# vim: ts=2 sw=2 et:\n"
  },
  {
    "path": "build/liteide_archlinux/liteide.md",
    "content": "LiteIDE\n=======\n\n### Introduction\n\n_LiteIDE is a simple, open source, cross-platform Go IDE._\n\nhttps://github.com/visualfc/liteide\n\n### Install LiteIDE for ArchLinux\n\n\t$ makepkg -sri"
  },
  {
    "path": "build/update_pkg.cmd",
    "content": "@echo off\r\n\r\nsetlocal\r\n\r\nset BUILD_ROOT=%CD%\r\nif x%LITEIDE_ROOT%==x set LITEIDE_ROOT=%CD%\\..\\liteidex\r\n\r\necho GOROOT=%GOROOT%\r\necho BUILD_ROOT=%BUILD_ROOT%\r\necho LITEIDE_ROOT=%LITEIDE_ROOT%\r\necho .\r\n\r\ngo version\r\n\r\nif ERRORLEVEL 1 goto go_fail\r\n\r\necho update liteide tools ...\r\n\r\ncd %LITEIDE_ROOT%\r\n\r\nset GOBIN=%CD%\\bin\r\n\r\necho install gocode ...\r\ngo install -v github.com/visualfc/gocode@latest\r\necho install gotools ...\r\ngo install -v github.com/visualfc/gotools@latest\r\necho install gomodifytags ...\r\ngo install -v github.com/fatih/gomodifytags@latest\r\n\r\ncd %BUILD_ROOT%\r\n\r\ngoto end\r\n\r\n:go_fail\r\necho error, go fail\r\ngoto end\r\n\r\n:end\r\n"
  },
  {
    "path": "build/update_pkg.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho GOROOT=$GOROOT\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\ngo version\nif [ $? -ge 1 ]; then\n\techo 'error, not find go in PATH'\n\texit 1\nfi\n\necho update liteide tools ...\ncd $LITEIDE_ROOT\n\nexport GOBIN=$PWD/bin\n\necho install gocode ...\ngo install -v github.com/visualfc/gocode@latest\necho install gotools ...\ngo install -v github.com/visualfc/gotools@latest\necho install gomodifytags ...\ngo install -v github.com/fatih/gomodifytags@latest\n\nif [ $? -ge 1 ]; then\n\techo 'error, go install fail'\n\texit 1\nfi\n\ncd $BUILD_ROOT\n"
  },
  {
    "path": "build/update_tr.cmd",
    "content": "@echo off\r\n\r\n@echo off\r\n\r\nsetlocal\r\n\r\nset BUILD_ROOT=%CD%\r\nif x%LITEIDE_ROOT%==x set LITEIDE_ROOT=%CD%\\..\\liteidex\r\n\r\necho QTDIR=%QTDIR%\r\necho GOROOT=%GOROOT%\r\necho BUILD_ROOT=%BUILD_ROOT%\r\necho LITEIDE_ROOT=%LITEIDE_ROOT%\r\necho .\r\n\r\nif x%QTDIR%==x goto qtdir_fail\r\n\r\nset PATH=%QTDIR%/bin;%PATH%\r\n\r\necho compress translator files\r\nlrelease -compress %LITEIDE_ROOT%\\liteide_zh.ts -qm %LITEIDE_ROOT%\\deploy\\translations\\liteide_zh.qm\r\nlrelease -compress %LITEIDE_ROOT%\\liteide_zh_TW.ts -qm %LITEIDE_ROOT%\\deploy\\translations\\liteide_zh_TW.qm\r\nlrelease -compress %LITEIDE_ROOT%\\liteide_de.ts -qm %LITEIDE_ROOT%\\deploy\\translations\\liteide_de.qm\r\nlrelease -compress %LITEIDE_ROOT%\\liteide_fr.ts -qm %LITEIDE_ROOT%\\deploy\\translations\\liteide_fr.qm\r\nlrelease -compress %LITEIDE_ROOT%\\liteide_ja.ts -qm %LITEIDE_ROOT%\\deploy\\translations\\liteide_ja.qm\r\nlrelease -compress %LITEIDE_ROOT%\\liteide_ru.ts -qm %LITEIDE_ROOT%\\deploy\\translations\\liteide_ru.qm\r\nlrelease -compress %LITEIDE_ROOT%\\liteide_uk.ts -qm %LITEIDE_ROOT%\\deploy\\translations\\liteide_uk.qm\r\n\r\ngoto end\r\n\r\n:go_fail\r\necho error, go fail\r\ngoto end\r\n\r\n:end\r\n"
  },
  {
    "path": "build/update_tr.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho GOROOT=$GOROOT\necho QTDIR=$QTDIR\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QTDIR ]; then\n\techo 'error, QTDIR is null'\n\texit 1\nfi\n\nexport PATH=$QTDIR/bin:$PATH\n\necho compress translator files\n\nlrelease -compress $LITEIDE_ROOT/liteide_zh.ts -qm $LITEIDE_ROOT/deploy/translations/liteide_zh.qm\nlrelease -compress $LITEIDE_ROOT/liteide_zh_TW.ts -qm $LITEIDE_ROOT/deploy/translations/liteide_zh_TW.qm\nlrelease -compress $LITEIDE_ROOT/liteide_de.ts -qm $LITEIDE_ROOT/deploy/translations/liteide_de.qm\nlrelease -compress $LITEIDE_ROOT/liteide_fr.ts -qm $LITEIDE_ROOT/deploy/translations/liteide_fr.qm\nlrelease -compress $LITEIDE_ROOT/liteide_ja.ts -qm $LITEIDE_ROOT/deploy/translations/liteide_ja.qm\nlrelease -compress $LITEIDE_ROOT/liteide_ru.ts -qm $LITEIDE_ROOT/deploy/translations/liteide_ru.qm\n\n"
  },
  {
    "path": "build/update_ts.cmd",
    "content": "@echo off\r\n\r\n@echo off\r\n\r\nsetlocal\r\n\r\nset BUILD_ROOT=%CD%\r\nif x%LITEIDE_ROOT%==x set LITEIDE_ROOT=%CD%\\..\\liteidex\r\n\r\necho QTDIR=%QTDIR%\r\necho GOROOT=%GOROOT%\r\necho BUILD_ROOT=%BUILD_ROOT%\r\necho LITEIDE_ROOT=%LITEIDE_ROOT%\r\necho .\r\n\r\nif x%QTDIR%==x goto qtdir_fail\r\n\r\nset PATH=%QTDIR%/bin;%PATH%\r\n\r\necho update translator files\r\nlupdate %LITEIDE_ROOT%\\liteidex.pro\r\n\r\ngoto end\r\n\r\n:go_fail\r\necho error, go fail\r\ngoto end\r\n\r\n:end\r\n"
  },
  {
    "path": "build/update_ts.sh",
    "content": "#!/bin/sh\n\nexport BUILD_ROOT=$PWD\n\nif [ -z $LITEIDE_ROOT ]; then\n\texport LITEIDE_ROOT=$PWD/../liteidex\nfi\n\necho GOROOT=$GOROOT\necho QTDIR=$QTDIR\necho BUILD_ROOT=$BUILD_ROOT\necho LITEIDE_ROOT=$LITEIDE_ROOT\necho .\n\nif [ -z $QTDIR ]; then\n\techo 'error, QTDIR is null'\n\texit 1\nfi\n\nexport PATH=$QTDIR/bin:$PATH\n\necho update translator files\n\nlupdate -no-obsolete $LITEIDE_ROOT/liteidex.pro\n"
  },
  {
    "path": "build/vars4.8.5.cmd",
    "content": "@echo off\r\nset QTDIR=C:\\Qt\\4.8.5\r\nset MINGWDIR=C:\\Qt\\mingw\r\nset PATH=%MINGWDIR%\\bin;%QTDIR%\\bin;%PATH%;c:\\go\\bin;"
  },
  {
    "path": "build/vars5.15.2.cmd",
    "content": "@echo off\r\nset QTDIR=C:\\Qt\\5.15.2\\msvc2019_64\r\nset PATH=%QTDIR%\\bin;%PATH%"
  },
  {
    "path": "build/vars5.15.2_msvc.cmd",
    "content": "@echo off\r\nset QTDIR=C:\\Qt\\5.15.2\\msvc2019_64\r\nset PATH=%QTDIR%\\bin;%PATH%\r\n"
  },
  {
    "path": "build/vars5.15.2_x64.cmd",
    "content": "@echo off\r\nset QTDIR=C:\\Qt\\5.15.2\\mingw81_64\r\nset MINGWDIR=C:\\Qt\\Tools\\mingw810_64\r\nset PATH=%QTDIR%\\bin;%MINGWDIR%\\bin;%PATH%"
  },
  {
    "path": "build/vars5.9.6.cmd",
    "content": "@echo off\r\nset QTDIR=C:\\Qt\\Qt5.9.6\\5.9.6\\mingw53_32\r\nset MINGWDIR=C:\\Qt\\Qt5.9.6\\Tools\\mingw530_32\r\nset PATH=%QTDIR%\\bin;%MINGWDIR%\\bin;%PATH%"
  },
  {
    "path": "liteidex/LGPL_EXCEPTION.TXT",
    "content": "LiteIDE is distributed under the terms of the LGPLv2.1 license with an exception:\n\nLicense exception:\nIn addition, as a special exception,  that plugins developed for LiteIDE,\nare allowed to remain closed sourced and can be distributed under any license .\n"
  },
  {
    "path": "liteidex/LICENSE.LGPL",
    "content": "\t\t  GNU LESSER GENERAL PUBLIC LICENSE\n\t\t       Version 2.1, February 1999\n\n Copyright (C) 1991, 1999 Free Software Foundation, Inc.\n 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n[This is the first released version of the Lesser GPL.  It also counts\n as the successor of the GNU Library Public License, version 2, hence\n the version number 2.1.]\n\n\t\t\t    Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicenses are intended to guarantee your freedom to share and change\nfree software--to make sure the software is free for all its users.\n\n  This license, the Lesser General Public License, applies to some\nspecially designated software packages--typically libraries--of the\nFree Software Foundation and other authors who decide to use it.  You\ncan use it too, but we suggest you first think carefully about whether\nthis license or the ordinary General Public License is the better\nstrategy to use in any particular case, based on the explanations below.\n\n  When we speak of free software, we are referring to freedom of use,\nnot price.  Our General Public Licenses are designed to make sure that\nyou have the freedom to distribute copies of free software (and charge\nfor this service if you wish); that you receive source code or can get\nit if you want it; that you can change the software and use pieces of\nit in new free programs; and that you are informed that you can do\nthese things.\n\n  To protect your rights, we need to make restrictions that forbid\ndistributors to deny you these rights or to ask you to surrender these\nrights.  These restrictions translate to certain responsibilities for\nyou if you distribute copies of the library or if you modify it.\n\n  For example, if you distribute copies of the library, whether gratis\nor for a fee, you must give the recipients all the rights that we gave\nyou.  You must make sure that they, too, receive or can get the source\ncode.  If you link other code with the library, you must provide\ncomplete object files to the recipients, so that they can relink them\nwith the library after making changes to the library and recompiling\nit.  And you must show them these terms so they know their rights.\n\n  We protect your rights with a two-step method: (1) we copyright the\nlibrary, and (2) we offer you this license, which gives you legal\npermission to copy, distribute and/or modify the library.\n\n  To protect each distributor, we want to make it very clear that\nthere is no warranty for the free library.  Also, if the library is\nmodified by someone else and passed on, the recipients should know\nthat what they have is not the original version, so that the original\nauthor's reputation will not be affected by problems that might be\nintroduced by others.\n\f\n  Finally, software patents pose a constant threat to the existence of\nany free program.  We wish to make sure that a company cannot\neffectively restrict the users of a free program by obtaining a\nrestrictive license from a patent holder.  Therefore, we insist that\nany patent license obtained for a version of the library must be\nconsistent with the full freedom of use specified in this license.\n\n  Most GNU software, including some libraries, is covered by the\nordinary GNU General Public License.  This license, the GNU Lesser\nGeneral Public License, applies to certain designated libraries, and\nis quite different from the ordinary General Public License.  We use\nthis license for certain libraries in order to permit linking those\nlibraries into non-free programs.\n\n  When a program is linked with a library, whether statically or using\na shared library, the combination of the two is legally speaking a\ncombined work, a derivative of the original library.  The ordinary\nGeneral Public License therefore permits such linking only if the\nentire combination fits its criteria of freedom.  The Lesser General\nPublic License permits more lax criteria for linking other code with\nthe library.\n\n  We call this license the \"Lesser\" General Public License because it\ndoes Less to protect the user's freedom than the ordinary General\nPublic License.  It also provides other free software developers Less\nof an advantage over competing non-free programs.  These disadvantages\nare the reason we use the ordinary General Public License for many\nlibraries.  However, the Lesser license provides advantages in certain\nspecial circumstances.\n\n  For example, on rare occasions, there may be a special need to\nencourage the widest possible use of a certain library, so that it becomes\na de-facto standard.  To achieve this, non-free programs must be\nallowed to use the library.  A more frequent case is that a free\nlibrary does the same job as widely used non-free libraries.  In this\ncase, there is little to gain by limiting the free library to free\nsoftware only, so we use the Lesser General Public License.\n\n  In other cases, permission to use a particular library in non-free\nprograms enables a greater number of people to use a large body of\nfree software.  For example, permission to use the GNU C Library in\nnon-free programs enables many more people to use the whole GNU\noperating system, as well as its variant, the GNU/Linux operating\nsystem.\n\n  Although the Lesser General Public License is Less protective of the\nusers' freedom, it does ensure that the user of a program that is\nlinked with the Library has the freedom and the wherewithal to run\nthat program using a modified version of the Library.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.  Pay close attention to the difference between a\n\"work based on the library\" and a \"work that uses the library\".  The\nformer contains code derived from the library, whereas the latter must\nbe combined with the library in order to run.\n\f\n\t\t  GNU LESSER GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License Agreement applies to any software library or other\nprogram which contains a notice placed by the copyright holder or\nother authorized party saying it may be distributed under the terms of\nthis Lesser General Public License (also called \"this License\").\nEach licensee is addressed as \"you\".\n\n  A \"library\" means a collection of software functions and/or data\nprepared so as to be conveniently linked with application programs\n(which use some of those functions and data) to form executables.\n\n  The \"Library\", below, refers to any such software library or work\nwhich has been distributed under these terms.  A \"work based on the\nLibrary\" means either the Library or any derivative work under\ncopyright law: that is to say, a work containing the Library or a\nportion of it, either verbatim or with modifications and/or translated\nstraightforwardly into another language.  (Hereinafter, translation is\nincluded without limitation in the term \"modification\".)\n\n  \"Source code\" for a work means the preferred form of the work for\nmaking modifications to it.  For a library, complete source code means\nall the source code for all modules it contains, plus any associated\ninterface definition files, plus the scripts used to control compilation\nand installation of the library.\n\n  Activities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning a program using the Library is not restricted, and output from\nsuch a program is covered only if its contents constitute a work based\non the Library (independent of the use of the Library in a tool for\nwriting it).  Whether that is true depends on what the Library does\nand what the program that uses the Library does.\n\n  1. You may copy and distribute verbatim copies of the Library's\ncomplete source code as you receive it, in any medium, provided that\nyou conspicuously and appropriately publish on each copy an\nappropriate copyright notice and disclaimer of warranty; keep intact\nall the notices that refer to this License and to the absence of any\nwarranty; and distribute a copy of this License along with the\nLibrary.\n\n  You may charge a fee for the physical act of transferring a copy,\nand you may at your option offer warranty protection in exchange for a\nfee.\n\f\n  2. You may modify your copy or copies of the Library or any portion\nof it, thus forming a work based on the Library, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) The modified work must itself be a software library.\n\n    b) You must cause the files modified to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    c) You must cause the whole of the work to be licensed at no\n    charge to all third parties under the terms of this License.\n\n    d) If a facility in the modified Library refers to a function or a\n    table of data to be supplied by an application program that uses\n    the facility, other than as an argument passed when the facility\n    is invoked, then you must make a good faith effort to ensure that,\n    in the event an application does not supply such function or\n    table, the facility still operates, and performs whatever part of\n    its purpose remains meaningful.\n\n    (For example, a function in a library to compute square roots has\n    a purpose that is entirely well-defined independent of the\n    application.  Therefore, Subsection 2d requires that any\n    application-supplied function or table used by this function must\n    be optional: if the application does not supply it, the square\n    root function must still compute square roots.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Library,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Library, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote\nit.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Library.\n\nIn addition, mere aggregation of another work not based on the Library\nwith the Library (or with a work based on the Library) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may opt to apply the terms of the ordinary GNU General Public\nLicense instead of this License to a given copy of the Library.  To do\nthis, you must alter all the notices that refer to this License, so\nthat they refer to the ordinary GNU General Public License, version 2,\ninstead of to this License.  (If a newer version than version 2 of the\nordinary GNU General Public License has appeared, then you can specify\nthat version instead if you wish.)  Do not make any other change in\nthese notices.\n\f\n  Once this change is made in a given copy, it is irreversible for\nthat copy, so the ordinary GNU General Public License applies to all\nsubsequent copies and derivative works made from that copy.\n\n  This option is useful when you wish to copy part of the code of\nthe Library into a program that is not a library.\n\n  4. You may copy and distribute the Library (or a portion or\nderivative of it, under Section 2) in object code or executable form\nunder the terms of Sections 1 and 2 above provided that you accompany\nit with the complete corresponding machine-readable source code, which\nmust be distributed under the terms of Sections 1 and 2 above on a\nmedium customarily used for software interchange.\n\n  If distribution of object code is made by offering access to copy\nfrom a designated place, then offering equivalent access to copy the\nsource code from the same place satisfies the requirement to\ndistribute the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  5. A program that contains no derivative of any portion of the\nLibrary, but is designed to work with the Library by being compiled or\nlinked with it, is called a \"work that uses the Library\".  Such a\nwork, in isolation, is not a derivative work of the Library, and\ntherefore falls outside the scope of this License.\n\n  However, linking a \"work that uses the Library\" with the Library\ncreates an executable that is a derivative of the Library (because it\ncontains portions of the Library), rather than a \"work that uses the\nlibrary\".  The executable is therefore covered by this License.\nSection 6 states terms for distribution of such executables.\n\n  When a \"work that uses the Library\" uses material from a header file\nthat is part of the Library, the object code for the work may be a\nderivative work of the Library even though the source code is not.\nWhether this is true is especially significant if the work can be\nlinked without the Library, or if the work is itself a library.  The\nthreshold for this to be true is not precisely defined by law.\n\n  If such an object file uses only numerical parameters, data\nstructure layouts and accessors, and small macros and small inline\nfunctions (ten lines or less in length), then the use of the object\nfile is unrestricted, regardless of whether it is legally a derivative\nwork.  (Executables containing this object code plus portions of the\nLibrary will still fall under Section 6.)\n\n  Otherwise, if the work is a derivative of the Library, you may\ndistribute the object code for the work under the terms of Section 6.\nAny executables containing that work also fall under Section 6,\nwhether or not they are linked directly with the Library itself.\n\f\n  6. As an exception to the Sections above, you may also combine or\nlink a \"work that uses the Library\" with the Library to produce a\nwork containing portions of the Library, and distribute that work\nunder terms of your choice, provided that the terms permit\nmodification of the work for the customer's own use and reverse\nengineering for debugging such modifications.\n\n  You must give prominent notice with each copy of the work that the\nLibrary is used in it and that the Library and its use are covered by\nthis License.  You must supply a copy of this License.  If the work\nduring execution displays copyright notices, you must include the\ncopyright notice for the Library among them, as well as a reference\ndirecting the user to the copy of this License.  Also, you must do one\nof these things:\n\n    a) Accompany the work with the complete corresponding\n    machine-readable source code for the Library including whatever\n    changes were used in the work (which must be distributed under\n    Sections 1 and 2 above); and, if the work is an executable linked\n    with the Library, with the complete machine-readable \"work that\n    uses the Library\", as object code and/or source code, so that the\n    user can modify the Library and then relink to produce a modified\n    executable containing the modified Library.  (It is understood\n    that the user who changes the contents of definitions files in the\n    Library will not necessarily be able to recompile the application\n    to use the modified definitions.)\n\n    b) Use a suitable shared library mechanism for linking with the\n    Library.  A suitable mechanism is one that (1) uses at run time a\n    copy of the library already present on the user's computer system,\n    rather than copying library functions into the executable, and (2)\n    will operate properly with a modified version of the library, if\n    the user installs one, as long as the modified version is\n    interface-compatible with the version that the work was made with.\n\n    c) Accompany the work with a written offer, valid for at\n    least three years, to give the same user the materials\n    specified in Subsection 6a, above, for a charge no more\n    than the cost of performing this distribution.\n\n    d) If distribution of the work is made by offering access to copy\n    from a designated place, offer equivalent access to copy the above\n    specified materials from the same place.\n\n    e) Verify that the user has already received a copy of these\n    materials or that you have already sent this user a copy.\n\n  For an executable, the required form of the \"work that uses the\nLibrary\" must include any data and utility programs needed for\nreproducing the executable from it.  However, as a special exception,\nthe materials to be distributed need not include anything that is\nnormally distributed (in either source or binary form) with the major\ncomponents (compiler, kernel, and so on) of the operating system on\nwhich the executable runs, unless that component itself accompanies\nthe executable.\n\n  It may happen that this requirement contradicts the license\nrestrictions of other proprietary libraries that do not normally\naccompany the operating system.  Such a contradiction means you cannot\nuse both them and the Library together in an executable that you\ndistribute.\n\f\n  7. You may place library facilities that are a work based on the\nLibrary side-by-side in a single library together with other library\nfacilities not covered by this License, and distribute such a combined\nlibrary, provided that the separate distribution of the work based on\nthe Library and of the other library facilities is otherwise\npermitted, and provided that you do these two things:\n\n    a) Accompany the combined library with a copy of the same work\n    based on the Library, uncombined with any other library\n    facilities.  This must be distributed under the terms of the\n    Sections above.\n\n    b) Give prominent notice with the combined library of the fact\n    that part of it is a work based on the Library, and explaining\n    where to find the accompanying uncombined form of the same work.\n\n  8. You may not copy, modify, sublicense, link with, or distribute\nthe Library except as expressly provided under this License.  Any\nattempt otherwise to copy, modify, sublicense, link with, or\ndistribute the Library is void, and will automatically terminate your\nrights under this License.  However, parties who have received copies,\nor rights, from you under this License will not have their licenses\nterminated so long as such parties remain in full compliance.\n\n  9. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Library or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Library (or any work based on the\nLibrary), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Library or works based on it.\n\n  10. Each time you redistribute the Library (or any work based on the\nLibrary), the recipient automatically receives a license from the\noriginal licensor to copy, distribute, link with or modify the Library\nsubject to these terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties with\nthis License.\n\f\n  11. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Library at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Library by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Library.\n\nIf any portion of this section is held invalid or unenforceable under any\nparticular circumstance, the balance of the section is intended to apply,\nand the section as a whole is intended to apply in other circumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  12. If the distribution and/or use of the Library is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Library under this License may add\nan explicit geographical distribution limitation excluding those countries,\nso that distribution is permitted only in or among countries not thus\nexcluded.  In such case, this License incorporates the limitation as if\nwritten in the body of this License.\n\n  13. The Free Software Foundation may publish revised and/or new\nversions of the Lesser General Public License from time to time.\nSuch new versions will be similar in spirit to the present version,\nbut may differ in detail to address new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Library\nspecifies a version number of this License which applies to it and\n\"any later version\", you have the option of following the terms and\nconditions either of that version or of any later version published by\nthe Free Software Foundation.  If the Library does not specify a\nlicense version number, you may choose any version ever published by\nthe Free Software Foundation.\n\f\n  14. If you wish to incorporate parts of the Library into other free\nprograms whose distribution conditions are incompatible with these,\nwrite to the author to ask for permission.  For software which is\ncopyrighted by the Free Software Foundation, write to the Free\nSoftware Foundation; we sometimes make exceptions for this.  Our\ndecision will be guided by the two goals of preserving the free status\nof all derivatives of our free software and of promoting the sharing\nand reuse of software generally.\n\n\t\t\t    NO WARRANTY\n\n  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\nWARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\nEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\nOTHER PARTIES PROVIDE THE LIBRARY \"AS IS\" WITHOUT WARRANTY OF ANY\nKIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\nLIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\nWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\nAND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\nFOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\nCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\nLIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\nRENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\nFAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\nSUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGES.\n\n\t\t     END OF TERMS AND CONDITIONS\n\f\n           How to Apply These Terms to Your New Libraries\n\n  If you develop a new library, and you want it to be of the greatest\npossible use to the public, we recommend making it free software that\neveryone can redistribute and change.  You can do so by permitting\nredistribution under these terms (or, alternatively, under the terms of the\nordinary General Public License).\n\n  To apply these terms, attach the following notices to the library.  It is\nsafest to attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least the\n\"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the library's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\nAlso add information on how to contact you by electronic and paper mail.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the library, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the\n  library `Frob' (a library for tweaking knobs) written by James Random Hacker.\n\n  <signature of Ty Coon>, 1 April 1990\n  Ty Coon, President of Vice\n\nThat's all there is to it!\n\n\n"
  },
  {
    "path": "liteidex/bash.bat",
    "content": "cmd.exe /c c:\\mingw\\msys\\1.0\\bin\\sh --login -c \"cd '%cd%';exec bash --rcfile ~/.bashrc\""
  },
  {
    "path": "liteidex/deploy/liteapp/kms/default.kms",
    "content": "[liteidex]\nversion=1\n\n[Find]\nFileSearch=Ctrl+Shift+F\n\n[Build]\nBench=\nBuild=\"Ctrl+B; F7\"\nBuildAndRun=\"Ctrl+R; Ctrl+F7\"\nClean=\nCleanAll=\nClearOutput=\nConfig=\nFileRun=Alt+F6\nFmt=\nGet=\nInstall=Ctrl+F8\nRun=\"Alt+F5; Ctrl+R\"\nRunTerm=Alt+Shift+F5\nStop=\nTest=Ctrl+T\nVet=\nExecuteFile=\"Ctrl+,\"\nBuildTests=\nCover=\nCoverFunc=\nGet%20Force=\nGopm%20Build=\nGopm%20Gen=\nGopm%20Help=\nTestCover=\n\n[Editor]\nDecreaseFontSize=Ctrl+-\nDeleteLine=Ctrl+Shift+K\nDuplicate=Ctrl+D\nFold=Ctrl+<\nFoldAll=\nGotoLine=Ctrl+L\nGotoMatchBrace=Ctrl+E\nGotoNextBlock=Ctrl+]\nGotoPreviousBlock=Ctrl+[\nIncreaseFontSize=\"Ctrl++; Ctrl+=\"\nPaste=\"Shift+Insert; Ctrl+V\"\nRedo=\"Ctrl+Shift+Z; Ctrl+Y\"\nResetFontSize=Ctrl+0\nSelectBlock=Ctrl+U\nUnfold=Ctrl+>\nUnfoldAll=\nCleanWhitespace=\nInsertLineAfter=Ctrl+Return\nInsertLineBefore=Ctrl+Shift+Return\nWordWrap=\n\n[Document]\nDecreaseFontSize=Ctrl+-\nIncreaseFontSize=\"Ctrl++; Ctrl+=\"\nResizeFontSize=Ctrl+0\n\n[App]\nAbout=\nAboutPlugins=\nBackward=Alt+Left\nCloseAllFiles=\nCloseFile=Ctrl+W\nForward=Alt+Right\nFullScreen=Ctrl+Shift+F11\nOpenFolder=\nSaveAllFiles=\nAddFolder=\nCloseAllFolders=\nCloseProject=\nCloseWindow=Ctrl+Shift+W\nEscape=Esc\nNewWindow=Ctrl+Shift+N\nOpenFolderNewWindow=\nToolWindow_HtmlPreview=Alt+6\nToolWindow_WebKitBrowser=Alt+5\nToolWindow_buildoutput=Alt+2\nToolWindow_classview=Alt+3\nToolWindow_debugoutput=Alt+7\nToolWindow_eventlog=Alt+1\nToolWindow_folders=Alt+0\nToolWindow_godocfind=Alt+9\nToolWindow_gopackbrowser=Alt+8\nToolWindow_outline=Alt+4\n\n[GoPkg]\nSetupGOPATH=\n\n[GoDoc]\nJumpToDeclaration=F2\n\n[Debug]\nBreakpoint=F9\nContinue=F5\nLiteDebug.StepOver=F10\nRemoveAllBreakPoints=\nRunToLine=Ctrl+F10\nShowLine=\nStartDebug=F5\nStartDebugExternal=\nStepInfo=F11\nStepOut=Shift+F11\nStopDebug=Shift+F5\nStartDebugTests=F6\n\n[GoFmt]\nGofmt=Shift+F7\nGoplayfmt=Shift+F7\n\n[Markdown]\nBlockquote=Ctrl+Shift+Q\nHeader1=Ctrl+1\nHeader2=Ctrl+2\nHeader3=Ctrl+3\nHeader4=Ctrl+4\nHeader5=Ctrl+5\nHeader6=Ctrl+6\nHorizontalRule=Ctrl+Shift+H\nImage=Ctrl+Shift+I\nInlineCode=Ctrl+K\nLink=Ctrl+Shift+L\nOrderedList=Ctrl+Shift+O\nUnorderedList=Ctrl+Shift+U\n"
  },
  {
    "path": "liteidex/deploy/liteapp/mimetype/folderproject.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n  <mime-type type=\"folder/x-path\" scheme=\"folder\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Folder Project</comment>\n  </mime-type>\n</mime-info>\n"
  },
  {
    "path": "liteidex/deploy/liteapp/mimetype/gopackage.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n  <mime-type type=\"text/x-gopackage\" scheme=\"gopkg\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Golang Package Project</comment>\n  </mime-type>\n</mime-info>\n"
  },
  {
    "path": "liteidex/deploy/liteapp/mimetype/liteeditor.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n  <mime-type type=\"text/x-gosrc\" codec=\"utf-8\" package=\"go\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Golang Source File</comment>\n    <glob pattern=\"*.go\"/>\n  </mime-type>\n  <mime-type type=\"text/x-qlang\" codec=\"utf-8\" package=\"qlang\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Qlang Source File</comment>\n    <glob pattern=\"*.ql\"/>\n  </mime-type>\n  <mime-type type=\"text/x-gomod\" codec=\"utf-8\" package=\"gomod\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Golang module</comment>\n    <glob pattern=\"go.mod\"/>\n  </mime-type>\n  <mime-type type=\"text/x-rust\" codec=\"utf-8\" package=\"rust\" tabtospace=\"true\" tabwidth=\"4\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Rust Source File</comment>\n    <glob pattern=\"*.rs\"/>\n  </mime-type>\n  <mime-type type=\"text/x-lua\" codec=\"utf-8\" package=\"lua\" tabtospace=\"false\" tabwidth=\"4\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Lua Source File</comment>\n    <glob pattern=\"*.lua\"/>\n    <glob pattern=\"*.wlua\"/>\n  </mime-type>\n  <mime-type type=\"text/x-python\" codec=\"utf-8\" package=\"lua\" tabtospace=\"true\" tabwidth=\"4\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Python Source File</comment>\n    <glob pattern=\"*.py\"/>\n    <glob pattern=\"*.wpy\"/>\n  </mime-type>\n  <mime-type type=\"text/html\" codec=\"utf-8\" package=\"html\" tabtospace=\"true\" tabwidth=\"2\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>HTML Source File</comment>\n    <glob pattern=\"*.htm\"/>\n    <glob pattern=\"*.html\"/>\n    <glob pattern=\"*.shtml\"/>\n    <glob pattern=\"*.shtm\"/>\n  </mime-type>\n  <mime-type type=\"text/gohtml\" codec=\"utf-8\" package=\"gohtml\" tabtospace=\"true\" tabwidth=\"2\">\n    <sub-class-of type=\"text/html\"/>\n    <comment>Go HTML Template File</comment>\n    <glob pattern=\"*.gohtml\"/>\n    <glob pattern=\"*.html.tmpl\"/>\n    <glob pattern=\"*.html.tpl\"/>\n    <glob pattern=\"*.tpl\"/>\n    <glob pattern=\"*.tmpl\"/>\n  </mime-type>\n  <mime-type type=\"text/xml\" codec=\"utf-8\" package=\"xml\" tabtospace=\"true\" tabwidth=\"2\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>XML Source File</comment>\n    <glob pattern=\"*.docbook\"/>\n    <glob pattern=\"*.xml\"/>\n    <glob pattern=\"*.rc\"/>\n    <glob pattern=\"*.daml\"/>\n    <glob pattern=\"*.rdf\"/>\n    <glob pattern=\"*.rss\"/>\n    <glob pattern=\"*.xspf\"/>\n    <glob pattern=\"*.plist\"/>\n  </mime-type>\n  <mime-type type=\"text/x-csrc\" codec=\"utf-8\" package=\"c\" tabtospace=\"true\" tabwidth=\"4\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>C Source File</comment>\n    <glob pattern=\"*.c\"/>\n    <glob pattern=\"*.cpp\"/>\n    <glob pattern=\"*.cxx\"/>\n    <glob pattern=\"*.cc\"/>\n    <glob pattern=\"*.c++\"/>\n    <glob pattern=\"*.h\"/>\n    <glob pattern=\"*.hpp\"/>\n    <glob pattern=\"*.hh\"/>\n    <glob pattern=\"*.hxx\"/>\n    <glob pattern=\"*.h++\"/>\n    <glob pattern=\"*.hcc\"/>\n    <glob pattern=\"*.moc\"/>\n  </mime-type>\n  <mime-type type=\"text/yaml\" codec=\"utf-8\" package=\"yaml\" tabtospace=\"true\" tabwidth=\"2\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>YAML Source File</comment>\n    <glob pattern=\"*.yaml\"/>\n    <glob pattern=\"*.yml\"/>\n  </mime-type>\n</mime-info>\n"
  },
  {
    "path": "liteidex/deploy/liteapp/mimetype/qsqleditor.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n  <mime-type type=\"database/sqlite\" codec=\"utf-8\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>SQLite Database File</comment>\n    <glob pattern=\"*.db\"/>\n\t<glob pattern=\"*.db3\"/>\n\t<glob pattern=\"*.sqlite\"/>\n  </mime-type>\n</mime-info>\n"
  },
  {
    "path": "liteidex/deploy/liteapp/qss/black.qss",
    "content": "\n/* === Shared === */\nQStackedWidget, QLabel, QPushButton, QRadioButton, QCheckBox, \nQGroupBox, QStatusBar, QToolButton, QComboBox, QDialog {\n\tbackground-color: #222222;\n\tcolor: #BBBBBB;\n\tfont-family: \"Segoe UI\";\n}\n\n/* === QWidget === */\nQWidget:window {\n\tbackground: #222222;\n\tcolor: #BBBBBB;\n\tfont-family: \"Segoe UI\";\n}\n\n/* === WebView === */\nQTextBrowser, QWebView {\n    background-color: #BBBBBB;\n    selection-color: #0a214c; \n    selection-background-color: #C19A6B;\n}\n\n/* === QToolTip === */\nQToolTip {\n\tbackground-color: #000000;\n    border: 2px solid #333333;\n\tcolor: yellow;\n}\n\n/* === QPushButton === */\nQPushButton {\n\tborder: 1px solid #333333;\n\tpadding: 4px;\n\tmin-width: 65px;\n\tmin-height: 12px;\n}\n\nQPushButton:hover {\n\tbackground-color: #333333;\n\tborder-color: #444444;\n}\n\nQPushButton:pressed {\n\tbackground-color: #111111;\n\tborder-color: #333333;\n\tcolor: yellow;\n}\n\nQPushButton:disabled {\n\tcolor: #333333;\n}\n\n/* === Checkable items === */\nQCheckBox::indicator, QRadioButton::indicator, QTreeView::indicator {\n\twidth: 16px;\n\theight: 16px;\n\tbackground-color: #111111;\n\tborder: 1px solid #333333;\n}\n\nQRadioButton::indicator {\n\tborder-radius: 8px;\n}\n\nQCheckBox::indicator::checked, QRadioButton::indicator::checked, QTreeView::indicator::checked {\n\tbackground-color: qradialgradient(cx:0.5, cy:0.5, fx:0.25, fy:0.15, radius:0.3, stop:0 #BBBBBB, stop:1 #111111);\n}\n\nQCheckBox::indicator:disabled, QRadioButton::indicator:disabled, QTreeView::indicator:disabled {\n\tbackground-color: #444444;\n}\n\nQCheckBox::indicator::checked:disabled, QRadioButton::indicator::checked:disabled, QTreeView::indicator::checked:disabled {\n\tbackground-color: qradialgradient(cx:0.5, cy:0.5, fx:0.25, fy:0.15, radius:0.3, stop:0 #BBBBBB, stop:1 #444444);\n}\n\n/* === QComboBox === */\nQComboBox {\n\tbackground-color: black;\n\tborder: 1px solid #333333;\n\tcolor: white;\n\tpadding:1px 2em 1px 3px;\n}\n\nQComboBox::drop-down {\n\tsubcontrol-origin: padding;\n\tsubcontrol-position: top right;\n\tborder-left: 1px solid #333333;\n}\n\nQComboBox::down-arrow {\n\tborder: 2px solid #333333;\n\twidth: 6px;\n\theight: 6px;\n\tbackground: #5f5f5f;\n}\n\n/* === QGroupBox === */\nQGroupBox {\n\tborder: 2px solid #333333;\n\tmargin-top: 2ex;\n}\n\nQGroupBox::title {\n\tcolor: yellow;\n\tsubcontrol-origin: margin;\n\tsubcontrol-position: top left;\n\tmargin-left: 5px;\n}\n\n/* === QTabWidget === */\nQTabWidget::pane {\n\tbackground: #222222;\n\tborder: 2px solid #333333;\n}\n\n/* === QTabBar === */\nQTabBar::tab {\n\tbackground: transparent;\n\tborder: 1px solid #333333;\n\tborder-bottom: none;\n\tcolor: #BBBBBB;\n\tpadding-left: 5px;\n\tpadding-right: 10px;\n\tpadding-top: 3px;\n\tpadding-bottom: 3px;\n}\n\nQTabBar::tab:hover {\n\tbackground-color: #333333;\n\tborder: 1px solid #444444;\n\tborder-bottom: none;\n}\n\nQTabBar::tab:selected {\n\tbackground-color: #111111;\n\tborder: solid #fff;\n\tborder-width: 1px 1px 0px;\n\tcolor: yellow\n}\n\n/* === QToolBar === */\nQToolBar {\n\tbackground-color: #222222;\n\tborder: none;\n\tpadding: 1px;\n}\n\nQToolBar:handle {\n\tbackground: #222222;\n\tborder-left: 1px dotted yellow;\n\tcolor: #BBBBBB;\n}\n\nQToolBar::separator {\n\twidth: 6px;\n\tbackground-color: #222222;\n}\n\n/* === QToolButton === */\nQToolButton {\n\tborder: 1px solid #333333;\n\tmargin: 1px;\n}\n\nQToolButton:hover {\n\tbackground-color: #333333;\n\tborder: 1px solid #444444;\n}\n\nQToolButton[popupMode=\"1\"] { /* only for MenuButtonPopup */\n\tpadding-right: 20px; /* make way for the popup button */\n}\n\nQToolButton::menu-button {\n\tborder-left: 1px solid #333333;\n\tbackground: transparent;\n    width: 16px;\n}\n\nQToolButton::menu-button:hover {\n\tborder-left: 1px solid #444444;\n\tbackground: transparent;\n    width: 16px;\n}\n\nQToolButton:checked, QToolButton:pressed {\n\tbackground-color: #111111;\n\tcolor: yellow;\n}\n\n/* === QMenu === */\nQMenu {\n\tbackground-color: black;\n\tborder: 1px solid gray;\n\tcolor: white;\n\tpadding: 1px;\n}\n\nQMenu::item {\n\tpadding: 2px 25px 2px 20px;\n\tborder: 1px solid transparent;\n}\n\nQMenu::item:disabled {\n\tcolor: #666666;\n}\n\nQMenu::item:selected {\n\tborder-color: gray;\n\tbackground: #222222;\n}\n\nQMenu::icon:checked {\n\n}\n\nQMenu::separator {\n\theight: 1px;\n\tbackground: #222222;\n\tmargin-left: 10px;\n\tmargin-right: 10px;\n\tmargin-top: 1px;\n\tmargin-bottom: 1px;\n}\n\nQMenu::indicator {\n\twidth: 13px;\n\theight: 13px;\n}\n\n/* === QMenuBar === */\nQMenuBar {\n\tbackground-color: black;\n\tcolor: white;\n}\n\nQMenuBar::item {\n\tbackground: transparent;\n}\n\nQMenuBar::item:disabled {\n\tcolor: gray;\n}\n\nQMenuBar::item:selected {\n\tbackground: #222222;\n}\n\nQMenuBar::item:pressed {\n\tbackground: #444444;\n}\n \n/* === QScrollBar:vertical === */\nQScrollBar:vertical {\n\tbackground: #111111;\n\twidth: 16px;\n\tmargin: 16px 0 16px 0;\n}\n\nQScrollBar::handle:vertical {\n    background: #555555;\n    min-height: 16px;\n}\n\nQScrollBar::add-line:vertical {\n    background: #444444;\n    height: 16px;\n    subcontrol-position: bottom;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::sub-line:vertical {\n    background: #444444;\n    height: 16px;\n    subcontrol-position: top;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {\n\tbackground: none;\n}\n\nQScrollBar:up-arrow:vertical, QScrollBar:down-arrow:vertical {\n\tborder: 2px solid #333333;\n\twidth: 6px;\n\theight: 6px;\n\tbackground: #5f5f5f;\n}\n\n/* === QScrollBar:horizontal === */\nQScrollBar:horizontal {\n\tbackground: #111111;\n\theight: 16px;\n\tmargin: 0 16px 0 16px;\n}\n\nQScrollBar::handle:horizontal {\n    background: #555555;\n    min-width: 16px;\n}\n\nQScrollBar::add-line:horizontal {\n    background: #444444;\n    width: 16px;\n    subcontrol-position: right;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::sub-line:horizontal {\n    background: #444444;\n    width: 16px;\n    subcontrol-position: left;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {\n\tbackground: none;\n}\n\nQScrollBar:left-arrow:horizontal, QScrollBar:right-arrow:horizontal {\n\tborder: 2px solid #333333;\n\twidth: 6px;\n\theight: 6px;\n\tbackground: #5f5f5f;\n}\n\n/* =================== */\nQLineEdit, QListView, QTreeView, QTableView, QAbstractSpinBox {\n\tbackground-color: black;\n\tcolor: #BBBBBB;\n\tborder: 1px solid #333333;\n}\n\nQAbstractScrollArea, QLineEdit, QTextEdit, QAbstractSpinBox, QComboBox {\n\tborder-color: #333333;\n\tborder: 1px solid #333333;\n\n}\n\n/* === QHeaderView === */\nQHeaderView::section {\n\tbackground: #222222;\n\tborder: 0;\n\tcolor: #BBBBBB;\n\tpadding: 3px 0 3px 4px;\n}\n\n/* === QListView === */\nQListView::item:hover {\n\tbackground: #333333;\n}\n\nQListView::item:selected {\n\tbackground: #111111;\n\tcolor: yellow;\n}\n\n/* === QTableView === */\nQTableView::item:hover {\n\tbackground: #333333;\n}\n\nQTableView::item:hover {\n\tbackground: #111111;\n\tcolor: yellow;\n}\n\n/* === QTreeView === */\nQTreeView::item {\n\tbackground: black;\n}\n\nQTreeView::item:hover {\n\tbackground: #333333;\n}\n\nQTreeView::item:selected {\n\tbackground: #111111;\n\tcolor: yellow;\n}\n\nQTreeView::branch {\n\n}\n\nQTreeView::branch:has-siblings:adjoins-item {\n\n}\n\nQTreeView::branch:has-siblings:!adjoins-item {\n\n}\n\nQTreeView::branch:closed:has-children:has-siblings {\n\n}\n\nQTreeView::branch:has-children:!has-siblings:closed {\n\n}\n\nQTreeView::branch:!has-children:!has-siblings:adjoins-item {\n\n}\n\nQTreeView::branch:open:has-children:has-siblings {\n\n}\n\nQTreeView::branch:open:has-children:!has-siblings {\n\n}\n\n/* === Customizations === */\nQFrame#infoLabel {\n\tborder: 1px inset #333333;\n}\n"
  },
  {
    "path": "liteidex/deploy/liteapp/qss/carbon.qss",
    "content": "/* === Shared === */\nQStackedWidget, QLabel, QPushButton, QRadioButton, QCheckBox, \nQGroupBox, QStatusBar, QToolButton, QComboBox, QDialog {\n\tbackground-color: #303030;\n\tcolor: #BBBBBB;\n}\n\n/* === QWidget === */\nQWidget:window {\n\tbackground: #303030;\n\tcolor: #BBBBBB;\n}\n\n/* === WebView === */\nQTextBrowser, QWebView {\n    background-color: #BBBBBB;\n    selection-color: #0a214c; \n    selection-background-color: #C19A6B;\n}\n\n/* === QPushButton === */\nQPushButton {\n\tborder: 0.5px solid #303030;\n\tpadding: 4px;\n\tmin-width: 65px;\n\tmin-height: 12px;\n}\n\nQPushButton:hover {\n\tbackground-color: #303030;\n\tborder-color: #444444;\n}\n\nQPushButton:pressed {\n\tbackground-color: #222222;\n\tborder-color: #303030;\n\tcolor: white;\n}\n\nQPushButton:disabled {\n\tcolor: #303030;\n}\n\n\n/* === QComboBox === */\nQComboBox {\n\tbackground-color: #282828;\n\tborder: 1px solid #303030;\n\tcolor: white;\n\tpadding:1px 2em 1px 3px;\n}\n\nQComboBox::drop-down {\n\tsubcontrol-origin: padding;\n\tsubcontrol-position: top right;\n\tborder-left: 1px solid #303030;\n}\n\nQComboBox::down-arrow {\n\tborder: 2px solid #303030;\n\twidth: 6px;\n\theight: 6px;\n\tbackground: #5f5f5f;\n}\n\n\n/* === QTabBar === */\nQTabBar::tab {\n\tbackground: transparent;\n\tborder: 1px solid #303030;\n\tborder-bottom: none;\n\tcolor: #BBBBBB;\n\tpadding-left: 5px;\n\tpadding-right: 10px;\n\tpadding-top: 3px;\n\tpadding-bottom: 3px;\n}\n\nQTabBar::tab:hover {\n\tbackground-color: #303030;\n\tborder: 1px solid #444444;\n\tborder-bottom: none;\n}\n\nQTabBar::tab:selected {\n\tbackground-color: #282828;\n\tborder: 1px solid #303030;\n\tborder-top: 1px solid white;\n\tborder-bottom: none;\n\tcolor: white\n}\n\n\n/* === QToolBar === */\nQToolBar {\n\tbackground-color: #303030;\n\tborder: none;\n\tpadding: 1px;\n}\n\n\n\nQToolBar::separator {\n\twidth: 6px;\n\tbackground-color: #303030;\n}\n\n/* === QToolButton === */\nQToolButton {\n\tborder: 1px solid #303030;\n\tmargin: 1px;\n}\n\nQToolButton:hover {\n\tbackground-color: #303030;\n\tborder: 1px solid #444444;\n}\n\nQToolButton[popupMode=\"1\"] { /* only for MenuButtonPopup */\n\tpadding-right: 20px; /* make way for the popup button */\n}\n\nQToolButton::menu-button {\n\tborder-left: 1px solid #303030;\n\tbackground: transparent;\n    width: 16px;\n}\n\nQToolButton::menu-button:hover {\n\tborder-left: 1px solid #444444;\n\tbackground: transparent;\n    width: 16px;\n}\n\nQToolButton:checked, QToolButton:pressed {\n\tbackground-color: #222222;\n\tcolor: white;\n}\n\n/* === QMenu === */\nQMenu {\n\tbackground-color: #282828;\n\tborder: 1px solid gray;\n\tcolor: white;\n\tpadding: 1px;\n}\n\nQMenu::item {\n\tpadding: 2px 25px 2px 20px;\n\tborder: 1px solid transparent;\n}\n\nQMenu::item:disabled {\n\tcolor: #666666;\n}\n\nQMenu::item:selected {\n\tborder-color: gray;\n\tbackground: #303030;\n}\n\nQMenu::icon:checked {\n\n}\n\nQMenu::separator {\n\theight: 1px;\n\tbackground: #303030;\n\tmargin-left: 10px;\n\tmargin-right: 10px;\n\tmargin-top: 1px;\n\tmargin-bottom: 1px;\n}\n\nQMenu::indicator {\n\twidth: 13px;\n\theight: 13px;\n}\n\n/* === QMenuBar === */\nQMenuBar {\n\tbackground-color: #282828;\n\tcolor: white;\n}\n\nQMenuBar::item {\n\tbackground: transparent;\n}\n\nQMenuBar::item:disabled {\n\tcolor: gray;\n}\n\nQMenuBar::item:selected {\n\tbackground: #303030;\n}\n\nQMenuBar::item:pressed {\n\tbackground: #444444;\n}\n \n/* === QScrollBar:vertical === */\nQScrollBar:vertical {\n\tbackground: #282828;\n\twidth: 16px;\n\tmargin: 16px 0 16px 0;\n}\n\nQScrollBar::handle:vertical {\n    background: #303030;\n    min-height: 16px;\n}\n\nQScrollBar::add-line:vertical {\n    background: #444444;\n    height: 16px;\n    subcontrol-position: bottom;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::sub-line:vertical {\n    background: #444444;\n    height: 16px;\n    subcontrol-position: top;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {\n\tbackground: none;\n}\n\nQScrollBar:up-arrow:vertical, QScrollBar:down-arrow:vertical {\n\tborder: 2px solid #303030;\n\twidth: 6px;\n\theight: 6px;\n\tbackground: #5f5f5f;\n}\n\n/* === QScrollBar:horizontal === */\nQScrollBar:horizontal {\n\tbackground: #282828;\n\theight: 16px;\n\tmargin: 0 16px 0 16px;\n}\n\nQScrollBar::handle:horizontal {\n    background: #303030;\n    min-width: 16px;\n}\n\nQScrollBar::add-line:horizontal {\n    background: #444444;\n    width: 16px;\n    subcontrol-position: right;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::sub-line:horizontal {\n    background: #444444;\n    width: 16px;\n    subcontrol-position: left;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {\n\tbackground: none;\n}\n\nQScrollBar:left-arrow:horizontal, QScrollBar:right-arrow:horizontal {\n\tborder: 2px solid #303030;\n\twidth: 6px;\n\theight: 6px;\n\tbackground: #5f5f5f;\n}\n\n/* =================== */\nQLineEdit, QListView, QTreeView, QTableView, QAbstractSpinBox {\n\tbackground-color: #282828;\n\tcolor: #BBBBBB;\n\tborder: 1px solid #303030;\n}\n\nQAbstractScrollArea, QLineEdit, QTextEdit, QAbstractSpinBox, QComboBox {\n\tborder-color: #303030;\n\tborder: 1px solid #303030;\n\n}\n\n/* === QHeaderView === */\nQHeaderView {\n\tbackground: #303030;\n}\n\nQHeaderView::section {\n\tbackground: #303030;\n\tborder: 0;\n\tcolor: #BBBBBB;\n\tpadding: 3px 0 3px 4px;\n}\n\n/* === Customizations === */\nQFrame#infoLabel {\n\tborder: 1px inset #303030;\n}\n"
  },
  {
    "path": "liteidex/deploy/liteapp/qss/coffee.qss",
    "content": ".QWidget {\n   background-color: beige;\n}\n\nQToolBar {\n\tbackground-color: beige;\n}\n\nQDialog, QFileDialog {\n\tbackground-color: beige;\n}\n\nQTabWidget::pane { /* The tab widget frame */\n    border-top: 2px solid #C2C7CB;\n}\n\nQTabWidget::tab-bar {\n    left: 5px; /* move to the right by 5px */\n}\n\nQTabBar, QTabWidget {\n\tbackground-color: beige;\n}\nQTabBar::tab {\n     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\n                                 stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,\n                                 stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);\n     border: 1px solid darkkhaki;\n     border-bottom-color: #C2C7CB; /* same as the pane color */\n     border-top-left-radius: 4px;\n     border-top-right-radius: 4px;\n     min-width: 8ex;\n     padding: 2px;\n }\nQTabBar::tab:selected, QTabBar::tab:hover {\n    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\n                                stop: 0 #fafafa, stop: 0.4 #f4f4f4,\n                                stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);\n}\n\nQTabBar::tab:selected {\n    border-color: #9B9B9B;\n    border-bottom-color: #C2C7CB; /* same as pane color */\n}\n\nQTabBar::tab:!selected {\n    margin-top: 2px; /* make non-selected tabs look smaller */\n}\n\n/* Nice Windows-XP-style password character. */\nQLineEdit[echoMode=\"2\"] {\n    lineedit-password-character: 9679;\n}\n\nQHeaderView::section {\n     background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,\n                                       stop:0 #616161, stop: 0.5 #505050,\n                                       stop: 0.6 #434343, stop:1 #656565);\n     color: white;\n     padding-left: 4px;\n     border: 1px solid #6c6c6c;\n }\n\n QHeaderView::section:checked\n {\n     background-color: red;\n }\n\n\n/* We provide a min-width and min-height for push buttons\n   so that they look elegant regardless of the width of the text. */\nQPushButton {\n    background-color: palegoldenrod;\n    border-width: 2px;\n    border-color: darkkhaki;\n    border-style: solid;\n    border-radius: 5;\n    padding: 3px;\n    min-width: 9ex;\n    min-height: 2.5ex;\n}\n\nQPushButton:hover {\n   background-color: khaki;\n}\n\n/* Increase the padding, so the text is shifted when the button is\n   pressed. */\nQPushButton:pressed {\n    padding-left: 5px;\n    padding-top: 5px;\n    background-color: #d0d67c;\n}\n\nQLabel, QAbstractButton {\n    font: bold;\n}\n\n/* Mark mandatory fields with a brownish color. */\n.mandatory {\n    color: brown;\n}\n\n/* Bold text on status bar looks awful. */\nQStatusBar QLabel {\n   font: normal;\n}\n\nQStatusBar::item {\n    border-width: 1;\n    border-color: darkkhaki;\n    border-style: solid;\n    border-radius: 2;\n}\n\nQStackedWidget, QComboBox, QLineEdit, QSpinBox, QTextEdit, QListView, QWebView, QTreeView, QHeaderView {\n    background-color: cornsilk;\n    selection-color: #0a214c; \n    selection-background-color: #C19A6B;\n}\n\nQListView {\n    show-decoration-selected: 1;\n}\n\nQListView::item:hover {\n    background-color: wheat;\n}\n\n/* We reserve 1 pixel space in padding. When we get the focus,\n   we kill the padding and enlarge the border. This makes the items\n   glow. */\nQLineEdit, QFrame {\n    border-width: 1px;\n    padding: 1px;\n    border-style: solid;\n    border-color: darkkhaki;\n    border-radius: 5px;\n}\n\n/* As mentioned above, eliminate the padding and increase the border. */\nQLineEdit:focus, QFrame:focus {\n    border-width: 3px;\n    padding: 0px;\n}\n\n/* A QLabel is a QFrame ... */\nQLabel {\n    border: none;\n    padding: 0;\n    background: none;\n}\n\n/* A QToolTip is a QLabel ... */\nQToolTip {\n    border: 2px solid darkkhaki;\n    padding: 5px;\n    border-radius: 3px;\n    opacity: 200;\n}\n\n/* Nice to have the background color change when hovered. */\nQRadioButton:hover, QCheckBox:hover {\n    background-color: wheat;\n}\n\n/* Force the dialog's buttons to follow the Windows guidelines. */\nQDialogButtonBox {\n    button-layout: 0;\n}\n\n\n"
  },
  {
    "path": "liteidex/deploy/liteapp/qss/default.qss",
    "content": "/* empty stylesheet */"
  },
  {
    "path": "liteidex/deploy/liteapp/qss/default_macos.qss",
    "content": "/* Tab bar style copied from https://github.com/visualfc/liteide/blob/master/liteidex/deploy/liteapp/qss/coffee.qss */\nQTabBar::tab {\n     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\n                                 stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,\n                                 stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);\n     border: 1px solid darkkhaki;\n     border-bottom-color: #C2C7CB; /* same as the pane color */\n     min-width: 8ex;\n     padding: 4px 2px 4px 2px;\n}\nQTabBar::tab:selected, QTabBar::tab:hover {\n    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\n                                stop: 0 #fafafa, stop: 0.4 #f4f4f4,\n                                stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);\n}\n\nQTabBar::tab:selected {\n    border-color: #9B9B9B;\n    border-bottom-color: #C2C7CB; /* same as pane color */\n}\n\nQTabBar::tab:!selected {\n    margin-top: 2px; /* make non-selected tabs look smaller */\n}\n"
  },
  {
    "path": "liteidex/deploy/liteapp/qss/detroit-future.qss",
    "content": "/*\n\n\tDetroit Future\n\tgithub.com/donuts-are-good\n\t(MIT License)\n\n*/\n\n/* === Shared === */\nQStackedWidget, QLabel, QPushButton, QRadioButton, QCheckBox, \nQGroupBox, QStatusBar, QToolButton, QComboBox, QDialog {\n\tbackground-color: #000000;\n\tcolor: #DCCBF6;\n\tfont-family: \"Monospace\";\n}\n\n/* === QWidget === */\nQWidget:window {\n\tbackground: #000000;\n\tcolor: #DCCBF6;\n\tfont-family: \"Monospace\";\n}\n\n/* === WebView === */\nQTextBrowser, QWebView {\n    background-color: #000000;\n    selection-color: #ffee52; \n    selection-background-color: #2A0F52;\n}\n\n/* === QToolTip === */\nQToolTip {\n\tbackground-color: #000000;\n    border: 2px solid #000000;\n\tcolor: #23F4AE;\n}\n\n/* === QPushButton === */\nQPushButton {\n\tborder: 1px solid #000000;\n\tpadding: 4px;\n\tmin-width: 65px;\n\tmin-height: 12px;\n}\n\nQPushButton:hover {\n\tbackground-color: #03041A;\n\tborder-color: #03041A;\n\tcolor: #23F4AE;\n}\n\nQPushButton:pressed {\n\tbackground-color: #03041A;\n\tborder-color: #03041A;\n\tcolor: #5B20B1;\n}\n\nQPushButton:disabled {\n\tcolor: #2A0F52;\n}\n\n/* === Checkable items === */\nQCheckBox::indicator, QRadioButton::indicator, QTreeView::indicator {\n\twidth: 10px;\n\theight: 10px;\n\tbackground-color: #000000;\n\tborder: 1px solid #000000;\n}\n\nQRadioButton::indicator {\n\tborder-radius: 8px;\n}\n\nQCheckBox::indicator::checked, QRadioButton::indicator::checked, QTreeView::indicator::checked {\n\tbackground-color: qradialgradient(cx:0.5, cy:0.5, fx:0.25, fy:0.15, radius:0.3, stop:0 #DCCBF6, stop:1 #111111);\n}\n\nQCheckBox::indicator:disabled, QRadioButton::indicator:disabled, QTreeView::indicator:disabled {\n\tbackground-color: #000000;\n}\n\nQCheckBox::indicator::checked:disabled, QRadioButton::indicator::checked:disabled, QTreeView::indicator::checked:disabled {\n\tbackground-color: qradialgradient(cx:0.5, cy:0.5, fx:0.25, fy:0.15, radius:0.3, stop:0 #DCCBF6, stop:1 #444444);\n}\n\n/* === QComboBox === */\nQComboBox {\n\tbackground-color: #000000;\n\tborder: 1px solid #000000;\n\tcolor: #719ef7;\n\tpadding:1px 2em 1px 3px;\n}\n\nQComboBox::drop-down {\n\tsubcontrol-origin: padding;\n\tsubcontrol-position: top right;\n\tborder-left: 1px solid #000000;\n}\n\nQComboBox::down-arrow {\n\tborder: 2px solid #000000;\n\twidth: 6px;\n\theight: 6px;\n\tbackground: #23F4AE;\n}\n\n/* === QGroupBox === */\nQGroupBox {\n\tborder: 2px solid #000000;\n\tmargin-top: 2em;\n}\n\nQGroupBox::title {\n\tcolor: #23F4AE;\n\tsubcontrol-origin: margin;\n\tsubcontrol-position: top left;\n\tmargin-left: 5px;\n}\n\n/* === QTabWidget === */\nQTabWidget::pane {\n\tbackground: #000000;\n\tborder: 2px solid #000000;\n}\n\n/* === QTabBar === */\nQTabBar::tab {\n\tbackground-color: #000000;\n\tbackground: transparent;\n\tborder: 1px solid #000000;\n\tborder-bottom: none;\n\tcolor: #DCCBF6;\n\tpadding-left: 5px;\n\tpadding-right: 10px;\n\tpadding-top: 3px;\n\tpadding-bottom: 3px;\n}\n\nQTabBar::tab:hover {\n\tbackground-color: #03041A;\n\tborder: 1px solid #03041A;\n\tborder-bottom: none;\n}\n\nQTabBar::tab:selected {\n\tbackground-color: #000000;\n\tborder: solid #000000;\n\tborder-width: 1px 1px 0px;\n\tcolor: #23F4AE;\n}\n\n/* === QToolBar === */\nQToolBar {\n\tbackground-color: #000000;\n\tborder: none;\n\tpadding: 1px;\n}\n\nQToolBar:handle {\n\tbackground: #000000;\n\tborder-left: 1px dotted #23F4AE;\n\tcolor: #DCCBF6;\n}\n\nQToolBar::separator {\n\twidth: 6px;\n\tbackground-color: #000000;\n}\n\n/* === QToolButton === */\nQToolButton {\n\tborder: 1px solid #000000;\n\tmargin: 1px;\n}\n\nQToolButton:hover {\n\tbackground-color: #03041A;\n\tborder: 1px solid #03041A;\n}\n\nQToolButton[popupMode=\"1\"] { /* only for MenuButtonPopup */\n\tpadding-right: 20px; /* make way for the popup button */\n}\n\nQToolButton::menu-button {\n\tborder-left: 1px solid #000000;\n\tbackground: transparent;\n    width: 10px;\n}\n\nQToolButton::menu-button:hover {\n\tborder-left: 1px solid #03041A;\n\tcolor: #23F4AE;\n\tbackground: transparent;\n    width: 10px;\n}\n\nQToolButton:checked, QToolButton:pressed {\n\tbackground-color: #000000;\n\tcolor: #5B20B1;\n}\n\n/* === QMenu === */\nQMenu {\n\tbackground-color: #000000;\n\tborder: 1px solid #000000;\n\tcolor: #8888ff;\n\tpadding: 1px;\n}\n\nQMenu::item {\n\tpadding: 2px 25px 2px 20px;\n\tborder: 1px solid transparent;\n}\n\nQMenu::item:disabled {\n\tcolor: #2A0F52;\n}\n\nQMenu::item:selected {\n\tborder-color: #2A0F52;\n\tbackground: #2A0F52;\n\tcolor: #ffee52;\n}\n\nQMenu::icon:checked {\n\n}\n\nQMenu::separator {\n\theight: 1px;\n\tbackground: #000000;\n\tmargin-left: 10px;\n\tmargin-right: 10px;\n\tmargin-top: 1px;\n\tmargin-bottom: 1px;\n}\n\nQMenu::indicator {\n\twidth: 13px;\n\theight: 13px;\n}\n\n/* === QMenuBar === */\nQMenuBar {\n\tbackground-color: #000000;\n\tcolor: #666699;\n}\n\nQMenuBar::item {\n\tbackground: transparent;\n}\n\nQMenuBar::item:disabled {\n\tcolor: #03041A;\n}\n\nQMenuBar::item:selected {\n\tbackground: #000000;\n}\n\nQMenuBar::item:pressed {\n\tbackground: #000000;\n\tcolor: #5B20B1;\n}\n \n/* === QScrollBar:vertical === */\nQScrollBar:vertical {\n\tbackground: #03041A;\n\twidth: 10px;\n\tmargin: 10px 0 10px 0;\n\tborder-radius: 8px;\n}\n\nQScrollBar::handle:vertical {\n    background: #5B20B1;\n    min-height: 10px;\n\tborder-radius: 8px;\n}\n\nQScrollBar::add-line:vertical {\n    background: #03041A;\n    height: 10px;\n    subcontrol-position: bottom;\n    subcontrol-origin: margin;\n\tborder-radius: 8px;\n}\n\nQScrollBar::sub-line:vertical {\n    background: #03041A;\n    height: 10px;\n    subcontrol-position: top;\n    subcontrol-origin: margin;\n\tborder-radius: 8px;\n}\n\nQScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {\n\tbackground: none;\n}\n\nQScrollBar:up-arrow:vertical, QScrollBar:down-arrow:vertical {\n\tborder: 2px solid #03041A;\n\twidth: 6px;\n\theight: 6px;\n\tbackground: #23F4AE;\n\tborder-radius: 8px;\n}\n\n/* === QScrollBar:horizontal === */\nQScrollBar:horizontal {\n\tbackground: #03041A;\n\theight: 10px;\n\tmargin: 0 10px 0 10px;\n\tborder-radius: 8px;\n}\n\nQScrollBar::handle:horizontal {\n    background: #03041A;\n    min-width: 10px;\n\tborder-radius: 8px;\n}\n\nQScrollBar::add-line:horizontal {\n    background: #03041A;\n    width: 10px;\n    subcontrol-position: right;\n    subcontrol-origin: margin;\n\tborder-radius: 8px;\n}\n\nQScrollBar::sub-line:horizontal {\n    background: #03041A;\n    width: 10px;\n    subcontrol-position: left;\n    subcontrol-origin: margin;\n\tborder-radius: 8px;\n}\n\nQScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {\n\tbackground: none;\n\tborder-radius: 8px;\n}\n\nQScrollBar:left-arrow:horizontal, QScrollBar:right-arrow:horizontal {\n\tborder: 2px solid #000000;\n\twidth: 6px;\n\theight: 6px;\n\tbackground: #23F4AE;\n\tborder-radius: 8px;\n}\n\n/* =================== */\nQLineEdit, QListView, QTreeView, QTableView, QAbstractSpinBox {\n\tbackground-color: #000000;\n\tcolor: #DCCBF6;\n\tborder: 1px solid #000000;\n}\n\nQAbstractScrollArea, QLineEdit, QTextEdit, QAbstractSpinBox, QComboBox {\n\tborder-color: #000000;\n\tborder: 1px solid #000000;\n\n}\n\n/* === QHeaderView === */\nQHeaderView::section {\n\tbackground: #000000;\n\tborder: 0;\n\tcolor: #DCCBF6;\n\tpadding: 3px 0 3px 4px;\n}\n\n/* === QListView === */\nQListView::item:hover {\n\tbackground: #03041A;\n\tcolor: #23F4AE;\n}\n\nQListView::item:selected {\n\tbackground: #000000;\n\tcolor: #23F4AE;\n}\n\n/* === QTableView === */\nQTableView::item:hover {\n\tbackground: #03041A;\n}\n\nQTableView::item:hover {\n\tbackground: #03041A;\n\tcolor: #23F4AE;\n}\n\n/* === QTreeView === */\nQTreeView::item {\n\tbackground: #000000;\n}\n\nQTreeView::item:hover {\n\tbackground: #03041A;\n}\n\nQTreeView::item:selected {\n\tbackground: #000000;\n\tcolor: #23F4AE;\n}\n\nQTreeView::branch {\n\n}\n\nQTreeView::branch:has-siblings:adjoins-item {\n\n}\n\nQTreeView::branch:has-siblings:!adjoins-item {\n\n}\n\nQTreeView::branch:closed:has-children:has-siblings {\n\n}\n\nQTreeView::branch:has-children:!has-siblings:closed {\n\n}\n\nQTreeView::branch:!has-children:!has-siblings:adjoins-item {\n\n}\n\nQTreeView::branch:open:has-children:has-siblings {\n\n}\n\nQTreeView::branch:open:has-children:!has-siblings {\n\n}\n\n/* === Customizations === */\nQFrame#infoLabel {\n\tborder: 1px inset #000000;\n}\n"
  },
  {
    "path": "liteidex/deploy/liteapp/qss/evilworks.qss",
    "content": "/*\n\tStyle by evilworks, 2012-2013. pollux@lavabit.com\n\tThis file is Public Domain.\n*/\n\n/* === Shared === */\nQStackedWidget, QLabel, QPushButton, QRadioButton, QCheckBox, \nQGroupBox, QStatusBar, QToolButton, QComboBox, QDialog, QTabBar {\n\tfont-family: \"Segoe UI\";\n\tbackground-color: #888;\n\tcolor: #000;\n}\n\n/* === QWidget === */\nQWidget:window {\n\tfont-family: 'Segoe UI';\n\tbackground-color: #888;\n}\n\n/* === WebView === */\nQTextBrowser, QWebView {\n    background-color: #BBBBBB;\n    selection-color: #0a214c; \n    selection-background-color: #C19A6B;\n}\n\n/* === QPushButton === */\nQPushButton {\n\tborder: 1px solid #555;\n\tpadding: 4px;\n\tmin-width: 65px;\n\tmin-height: 12px;\n}\n\nQPushButton:hover {\n\tbackground-color: #999;\n}\n\nQPushButton:pressed {\n\tbackground-color: #333;\n\tborder-color: #555;\n\tcolor: #AAA;\n}\n\nQPushButton:disabled {\n\tcolor: #333333;\n}\n\n/* === QComboBox === \nQComboBox {\n\tbackground-color: #AAA;\n\tborder: 1px solid #555;\n\tcolor: black;\n}\n\nQComboBox::drop-down {\n\tsubcontrol-origin: padding;\n\tsubcontrol-position: top right;\n\tborder-left: 1px solid #333333;\n}\n*/\n/* === QGroupBox === */\nQGroupBox {\n\tborder: 1px solid #555;\n\tmargin-top: 2ex;\n}\n\nQGroupBox::title {\n\tcolor: black;\n\tsubcontrol-origin: margin;\n\tsubcontrol-position: top left;\t\n\tborder: 1px solid #555;\n}\n\n/* === QTabBar === */\nQTabBar::tab {\n\tborder-bottom: none;\n\tcolor: #000;\n\tpadding: 4px;\n\tbackground-color: #888;\n\tborder: 1px solid #555;\n}\n\nQTabBar::tab:hover {\n\tbackground-color: #AAA;\n}\n\nQTabBar::tab:selected {\n\tbackground-color: #000;\n\tborder: solid #fff;\n\tborder-width: 1px 1px 0px;\n\tcolor: white;\n}\n\n/* === QTabWidget === */\nQTabWidget::pane {\n\tbackground: #888;\n\tborder: 1px solid #555;\n}\n\n\n/* === QToolBar === */\nQToolBar {\n\tbackground: #949494;\n\tborder: none;\n\tpadding-left: 0px;\n\tpadding-right: 0px;\n\tmargin: 2px;\n}\n\nQToolBar::separator {\n\twidth: 1px;\n\tmargin-left: 3px;\n\tmargin-right: 3px;\n\tbackground-color: #555;\n}\n\n/* === QToolButton === */\nQToolButton {\n\tborder: 1px solid #666;\n\tmargin: 1px;\n}\n\nQToolButton:hover {\n\tbackground-color: #AAA;\n}\n\nQToolButton[popupMode=\"1\"] { /* only for MenuButtonPopup */\n\tpadding-right: 20px; /* make way for the popup button */\n}\n\nQToolButton::menu-button {\n\tborder-left: 1px solid #666;\n\tbackground: transparent;\n    width: 16px;\n}\n\nQToolButton::menu-button:hover {\n\tborder-left: 1px solid #666;\n\tbackground: transparent;\n    width: 16px;\n}\n\nQToolButton:checked, QToolButton:pressed {\n\tbackground-color: #000;\n\tborder: 1px solid #555;\n\tcolor: white;\n}\n\n/* === QScrollBar:vertical === */\nQScrollBar:vertical {\n\twidth: 16px;\n\tmargin: 16px 0 16px 0;\n\tbackground: #333;\n}\n\nQScrollBar::handle:vertical {\n    background: #888;\n    min-height: 16px;\n\tborder-top: 1px solid #666;\n\tborder-bottom: 1px solid #666;\n}\n\nQScrollBar::add-line:vertical {\n    background: #888;\n    height: 16px;\n    subcontrol-position: bottom;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::sub-line:vertical {\n    background: #888;\n    height: 16px;\n    subcontrol-position: top;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {\n\tbackground: none;\n}\n\n/* === QScrollBar:horizontal === */\nQScrollBar:horizontal {\n\theight: 16px;\n\tmargin: 0 16px 0 16px;\n\tbackground: #333;\n}\n\nQScrollBar::handle:horizontal {\n    background: #888;\n    min-width: 16px;\n\tborder-left: 1px solid #666;\n\tborder-right: 1px solid #666;\n}\n\nQScrollBar::add-line:horizontal {\n    background: #888;\n    width: 16px;\n    subcontrol-position: right;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::sub-line:horizontal {\n    background: #888;\n    width: 16px;\n    subcontrol-position: left;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {\n\tbackground: none;\n}\n\n/* === QMenu === */\nQMenu {\n\tbackground-color: black;\n\tborder: 1px solid gray;\n\tcolor: white;\n\tpadding: 1px;\n}\n\nQMenu::item {\n\tpadding: 2px 25px 2px 20px;\n\tborder: 1px solid transparent;\n}\n\nQMenu::item:disabled {\n\tcolor: #666666;\n}\n\nQMenu::item:selected {\n\tborder-color: gray;\n\tbackground: #222222;\n}\n\nQMenu::icon:checked {\n\n}\n\nQMenu::separator {\n\theight: 1px;\n\tbackground: #222222;\n\tmargin-left: 10px;\n\tmargin-right: 10px;\n\tmargin-top: 1px;\n\tmargin-bottom: 1px;\n}\n\nQMenu::indicator {\n\twidth: 13px;\n\theight: 13px;\n}\n\n/* === QMenuBar === */\nQMenuBar {\n\tbackground-color: black;\n\tcolor: white;\n}\n\nQMenuBar::item {\n\tbackground: transparent;\n}\n\nQMenuBar::item:disabled {\n\tcolor: gray;\n}\n\nQMenuBar::item:selected {\n\tbackground: #222222;\n}\n\nQMenuBar::item:pressed {\n\tbackground: #444444;\n}\n/* =================== */\nQLineEdit, QListView, QTreeView, QTableView, QAbstractSpinBox {\n\tbackground-color: #AAA;\n\tcolor: #000;\n\tborder: 1px solid #555;\n}\n\nQAbstractScrollArea, QLineEdit, QTextEdit, QAbstractSpinBox, QComboBox {\n\tborder: 1px solid #555;\n}\n\n/* === QHeaderView === */\nQHeaderView {\n\tbackground: #666;\n}\n\nQHeaderView::section {\n\theight: 20px;\n}\n\nQHeaderView::section {\n\tbackground: #666;\n\tborder: 0;\n\tcolor: #000;\n\tpadding-left: 4px;\n}\n\n/* === QListView === */\nQListView::item:hover {\n\tbackground: #AAA;\n}\n\nQListView::item:selected {\n\tbackground: #333;\n\tcolor: #AAA;\n}\n\n/* === QTableView === */\nQTableView::item:hover {\n\tbackground: #333333;\n}\n\nQTableView::item:hover {\n\tbackground: #111111;\n\tcolor: white;\n}\n\n/* === QTreeView === */\nQTreeView::item {\n}\n\nQTreeView::item:hover {\n}\n\nQTreeView::item:selected {\n}\n\nQTreeView::branch {\n\n}\n\nQTreeView::branch:has-siblings:adjoins-item {\n\n}\n\nQTreeView::branch:has-siblings:!adjoins-item {\n\n}\n\nQTreeView::branch:closed:has-children:has-siblings {\n\n}\n\nQTreeView::branch:has-children:!has-siblings:closed {\n\n}\n\nQTreeView::branch:!has-children:!has-siblings:adjoins-item {\n\n}\n\nQTreeView::branch:open:has-children:has-siblings {\n\n}\n\nQTreeView::branch:open:has-children:!has-siblings {\n\n}\n"
  },
  {
    "path": "liteidex/deploy/liteapp/qss/gray.qss",
    "content": "/* === Shared === */\nQStackedWidget, QLabel, QPushButton, QRadioButton, QCheckBox, \nQGroupBox, QStatusBar, QToolButton, QDialog {\n\tbackground-color: #232323;\n\tcolor: #BBBBBB;\n}\n\n/* === QWidget === */\nQWidget:window {\n\tbackground: #232323;\n\tcolor: #BBBBBB;\n}\n\n/* === WebView === */\nQTextBrowser, QWebView {\n    background-color: #BBBBBB;\n    selection-color: #0a214c; \n    selection-background-color: #C19A6B;\n}\n\n/* === QPushButton === */\nQPushButton {\n\tborder: 0.5px solid #232323;\n\tpadding: 4px;\n\tmin-width: 65px;\n\tmin-height: 12px;\n}\n\nQPushButton:hover {\n\tbackground-color: #232323;\n\tborder-color: #444444;\n}\n\nQPushButton:pressed {\n\tbackground-color: #111111;\n\tborder-color: #444444;\n\tcolor: white;\n}\n\nQPushButton:disabled {\n\tcolor: #232323;\n}\n\n\n/* === QComboBox === */\nQComboBox {\n\tbackground-color: #282828;\n\tborder: 1px solid #232323;\n\tcolor: white;\n\tpadding:1px 2em 1px 3px;\n}\n\nQComboBox::drop-down {\n\tsubcontrol-origin: padding;\n\tsubcontrol-position: top right;\n\tborder-left: 1px solid #232323;\n}\n\nQComboBox::down-arrow {\n\tborder: 2px solid #232323;\n\twidth: 6px;\n\theight: 6px;\n\tbackground: #5f5f5f;\n}\n\n\n/* === QTabBar === */\nQTabBar::tab {\n\tbackground: transparent;\n\tborder: 1px solid #232323;\n\tborder-bottom: none;\n\tcolor: #BBBBBB;\n\tpadding-left: 5px;\n\tpadding-right: 10px;\n\tpadding-top: 3px;\n\tpadding-bottom: 3px;\n}\n\nQTabBar::tab:hover {\n\tbackground-color: #232323;\n\tborder: 1px solid #444444;\n\tborder-bottom: none;\n}\n\nQTabBar::tab:selected {\n\tbackground-color: #111111;\n\tborder: 1px solid #232323;\n\tborder-top: 0px;\n\tborder-bottom: none;\n\tcolor: white\n}\n\n\n/* === QToolBar === */\nQToolBar {\n\tbackground-color: #232323;\n\tborder: none;\n\tpadding: 1px;\n}\n\nQToolBar::separator {\n\twidth: 6px;\n\tbackground-color: #232323;\n}\n\n/* === QToolButton === */\nQToolButton {\n\tborder: 1px solid #232323;\n\tmargin: 1px;\n}\n\nQToolButton:hover {\n\tbackground-color: #232323;\n\tborder: 1px solid #444444;\n}\n\nQToolButton[popupMode=\"1\"] { /* only for MenuButtonPopup */\n\tpadding-right: 20px; /* make way for the popup button */\n}\n\nQToolButton::menu-button {\n\tborder-left: 1px solid #232323;\n\tbackground: transparent;\n    width: 16px;\n}\n\nQToolButton::menu-button:hover {\n\tborder-left: 1px solid #444444;\n\tbackground: transparent;\n    width: 16px;\n}\n\nQToolButton:checked, QToolButton:pressed {\n\tbackground-color: #111111;\n\tcolor: white;\n}\n\n\n/* === QMenu === */\nQMenu {\n\tbackground-color: #282828;\n\tborder: 1px solid gray;\n\tcolor: white;\n\tpadding: 1px;\n}\n\nQMenu::item {\n\tpadding: 2px 25px 2px 20px;\n\tborder: 1px solid transparent;\n}\n\nQMenu::item:disabled {\n\tcolor: #666666;\n}\n\nQMenu::item:selected {\n\tborder-color: gray;\n\tbackground: #232323;\n}\n\nQMenu::icon:checked {\n\n}\n\nQMenu::separator {\n\theight: 1px;\n\tbackground: #232323;\n\tmargin-left: 10px;\n\tmargin-right: 10px;\n\tmargin-top: 1px;\n\tmargin-bottom: 1px;\n}\n\nQMenu::indicator {\n\twidth: 13px;\n\theight: 13px;\n}\n\n/* === QMenuBar === */\nQMenuBar {\n\tbackground-color: #282828;\n\tcolor: white;\n}\n\nQMenuBar::item {\n\tbackground: transparent;\n}\n\nQMenuBar::item:disabled {\n\tcolor: gray;\n}\n\nQMenuBar::item:selected {\n\tbackground: #232323;\n}\n\nQMenuBar::item:pressed {\n\tbackground: #444444;\n}\n\n/* === QScrollBar:vertical === */\nQScrollBar:vertical {\n\tbackground: #303030;\n\twidth: 16px;\n\tmargin: 16px 0 16px 0;\n}\n\nQScrollBar::handle:vertical {\n    background: #232323;\n    min-height: 16px;\n}\n\nQScrollBar::add-line:vertical {\n    background: #444444;\n    height: 16px;\n    subcontrol-position: bottom;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::sub-line:vertical {\n    background: #444444;\n    height: 16px;\n    subcontrol-position: top;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {\n\tbackground: none;\n}\n\nQScrollBar:up-arrow:vertical, QScrollBar:down-arrow:vertical {\n\tborder: 2px solid #232323;\n\twidth: 6px;\n\theight: 6px;\n\tbackground: #5f5f5f;\n}\n\n/* === QScrollBar:horizontal === */\nQScrollBar:horizontal {\n\tbackground: #303030;\n\theight: 16px;\n\tmargin: 0 16px 0 16px;\n}\n\nQScrollBar::handle:horizontal {\n    background: #232323;\n    min-width: 16px;\n}\n\nQScrollBar::add-line:horizontal {\n    background: #444444;\n    width: 16px;\n    subcontrol-position: right;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::sub-line:horizontal {\n    background: #444444;\n    width: 16px;\n    subcontrol-position: left;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {\n\tbackground: none;\n}\n\nQScrollBar:left-arrow:horizontal, QScrollBar:right-arrow:horizontal {\n\tborder: 2px solid #232323;\n\twidth: 6px;\n\theight: 6px;\n\tbackground: #5f5f5f;\n}\n\n/* =================== */\nQLineEdit, QListView, QTreeView, QTableView, QAbstractSpinBox {\n\tbackground-color: #282828;\n\tcolor: #BBBBBB;\n\tborder: 1px solid #232323;\n}\n\nQAbstractScrollArea, QLineEdit, QTextEdit, QAbstractSpinBox {\n\tborder-color: #232323;\n\tborder: 1px solid #232323;\n}\n\n\n/* === QHeaderView === */\nQHeaderView {\n\tbackground: #232323;\n}\n\nQHeaderView::section {\n\tbackground: #232323;\n\tborder: 0;\n\tcolor: #BBBBBB;\n\tpadding: 3px 0 3px 4px;\n}\n\n/* === Customizations === */\nQFrame#infoLabel {\n\tborder: 1px inset #232323;\n}\n"
  },
  {
    "path": "liteidex/deploy/liteapp/qss/one-dark.qss",
    "content": "/*    One Dark - https://github.com/atom/one-dark-ui    */\n/*    Author: Lofanmi - https://github.com/Lofanmi      */\n/*    MIT License                                       */\n\nQWidget,\nQToolBar,\nQFileDialog,\nQStackedWidget,\nQTextBrowser,\nQLabel,\nQPushButton,\nQRadioButton,\nQCheckBox,\nQStatusBar,\nQToolButton,\nQComboBox,\nQTabBar,\nQTabWidget,\nQLineEdit,\nQFrame,\nQSpinBox,\nQTextEdit,\nQListView,\nQWebView,\nQTreeView,\nQHeaderView,\nQDialog {\n  background-color: #282c34;\n  border-color: #464c55;\n  border-radius: 6px;\n  color: #b9b9b9;\n}\n\nQWidget:window {\n  background: #282c34;\n  border-color: #464c55;\n  color: #b9b9b9;\n}\n\nQTabWidget::pane {\n  background: #282c34;\n  border: 1px solid #464c55;\n  border-radius: 6px;\n}\n\nQPushButton {\n  border: 1px solid #464c55;\n  border-radius: 6px;\n  padding: 4px;\n  min-width: 65px;\n  min-height: 12px;\n}\n\nQPushButton:hover {\n  background-color: #282c34;\n}\n\nQPushButton:pressed {\n  background-color: #282c34;\n  color: white;\n}\n\nQPushButton:disabled {\n  color: #282c34;\n}\n\nQComboBox {\n  background-color: #282c34;\n  border: 1px solid #464c55;\n  border-radius: 6px;\n  color: #b9b9b9;\n  padding: 1px 2em 1px 3px;\n}\n\nQComboBox::drop-down {\n  subcontrol-origin: padding;\n  subcontrol-position: top right;\n  border-left: 1px solid #464c55;\n}\n\nQComboBox::down-arrow {\n  border: 1px solid #464c55;\n  border-radius: 6px;\n  width: 6px;\n  height: 6px;\n  background: #495162;\n}\n\nQTabBar::tab {\n  background: #282C34;\n  border: 1px solid #464c55;\n  border-radius: 6px;\n  border-top-left-radius: 6px;\n  border-top-right-radius: 6px;\n  border-bottom-left-radius: 0;\n  border-bottom-right-radius: 0;\n  border-bottom: none;\n  color: #b9b9b9;\n  padding-left: 5px;\n  padding-right: 10px;\n  padding-top: 3px;\n  padding-bottom: 3px;\n}\n\nQTabBar::tab:hover {\n  background-color: #282c34;\n  border: 1px solid #464c55;\n  border-bottom: none;\n}\n\nQTabBar::tab:selected {\n  background-color: #22252C;\n  border: 1px solid #464c55;\n  border-bottom: none;\n  color: white;\n}\n\nQToolBar {\n  background-color: #282c34;\n  border: none;\n  padding: 1px;\n}\n\nQToolBar::separator {\n  width: 6px;\n  background-color: #282c34;\n}\n\nQToolButton {\n  border: 1px solid #464c55;\n  border-radius: 6px;\n  margin: 1px;\n}\n\nQToolButton:hover {\n  background-color: #282c34;\n  border: 1px solid #464c55;\n}\n\nQToolButton::menu-button {\n  border-left: 1px solid #282c34;\n  border-radius: 6px;\n  background: #282C34;\n  width: 16px;\n}\n\nQToolButton::menu-button:hover {\n  border-left: 1px solid #464c55;\n  background: #282C34;\n  width: 16px;\n}\n\nQToolButton:checked,\nQToolButton:pressed {\n  background-color: #282c34;\n  color: white;\n}\n\nQMenu {\n  background-color: #282c34;\n  border: 1px solid #404859;\n  border-radius: 6px;\n  color: white;\n  padding: 1px;\n}\n\nQMenu::item {\n  padding: 2px 25px 2px 20px;\n  border: 1px solid #282C34;\n  border-radius: 6px;\n}\n\nQMenu::item:disabled {\n  color: #666666;\n}\n\nQMenu::item:selected {\n  border-color: #404859;\n  background: #282c34;\n}\n\nQMenu::separator {\n  height: 1px;\n  background: #282c34;\n  margin-left: 10px;\n  margin-right: 10px;\n  margin-top: 1px;\n  margin-bottom: 1px;\n}\n\nQMenu::indicator {\n  width: 13px;\n  height: 13px;\n}\n\nQMenuBar {\n  background-color: #282c34;\n  color: white;\n}\n\nQMenuBar::item {\n  background: #282C34;\n}\n\nQMenuBar::item:disabled {\n  color: #404859;\n}\n\nQMenuBar::item:selected {\n  background: #282c34;\n}\n\nQMenuBar::item:pressed {\n  background: #464c55;\n}\n\nQLineEdit,\nQListView,\nQTreeView,\nQTableView,\nQAbstractSpinBox {\n  background-color: #282c34;\n  color: #b9b9b9;\n  border: 1px solid #464c55;\n  border-radius: 6px;\n}\n\nQAbstractScrollArea,\nQLineEdit,\nQTextEdit,\nQAbstractSpinBox,\nQComboBox {\n  border: 1px solid #464c55;\n  border-radius: 6px;\n}\n\nQScrollBar:vertical {\n  background-color: #282c34;\n  border: 1px solid #464c55;\n  border-radius: 6px;\n  width: 18px;\n  margin: 18px 0 18px 0px;\n}\n\nQScrollBar::handle:vertical {\n  background-color: #464c55;\n  min-height: 20px;\n}\n\nQScrollBar::add-line:vertical {\n  border: none;\n  height: 18px;\n  subcontrol-position: bottom;\n  subcontrol-origin: margin;\n}\n\nQScrollBar::sub-line:vertical {\n  border: none;\n  height: 18px;\n  subcontrol-position: top;\n  subcontrol-origin: margin;\n}\n\nQScrollBar::add-page:vertical,\nQScrollBar::sub-page:vertical {\n  background: none;\n}\n\nQScrollBar:up-arrow:vertical,\nQScrollBar:down-arrow:vertical {\n  border: 1px solid #464c55;\n  border-radius: 6px;\n  width: 14px;\n  height: 14px;\n  background-color: #282c34;\n}\n\nQScrollBar:horizontal {\n  background-color: #282c34;\n  border: 1px solid #464c55;\n  border-radius: 6px;\n  height: 18px;\n  margin: 0px 18px 0 18px;\n}\n\nQScrollBar::handle:horizontal {\n  background-color: #282c34;\n  min-width: 20px;\n}\n\nQScrollBar::add-line:horizontal {\n  border: none;\n  width: 18px;\n  subcontrol-position: right;\n  subcontrol-origin: margin;\n}\n\nQScrollBar::sub-line:horizontal {\n  border: none;\n  width: 18px;\n  subcontrol-position: left;\n  subcontrol-origin: margin;\n}\n\nQScrollBar::add-page:horizontal,\nQScrollBar::sub-page:horizontal {\n  background: none;\n}\n\nQScrollBar:left-arrow:horizontal,\nQScrollBar:right-arrow:horizontal {\n  border: 1px solid #464c55;\n  border-radius: 6px;\n  width: 14px;\n  height: 14px;\n  background-color: #282c34;\n}\n\nQHeaderView {\n  background: #282c34;\n}\nQHeaderView::section {\n  background: #282c34;\n  border: 0;\n  color: #b9b9b9;\n  padding: 3px 0 3px 4px;\n}\n\nQFrame#infoLabel {\n  border: 1px inset #464c55;\n  border-radius: 6px;\n}\n\nQGroupBox {\n  margin-top: 1ex;\n  border: 1px solid #464c55;\n  border-radius: 6px;\n}\n\nQGroupBox::title {\n  subcontrol-origin: margin;\n  subcontrol-position: top left;\n  margin-bottom: 6px;\n}\n"
  },
  {
    "path": "liteidex/deploy/liteapp/qss/sublime.qss",
    "content": "/* === Shared === */\nQStackedWidget, QLabel, QPushButton, QRadioButton, QCheckBox,\nQGroupBox, QStatusBar, QToolButton, QComboBox, QDialog {\n\tbackground-color: #333333;\n\tcolor: #BBBBBB;\n}\n\n/* === QWidget === */\nQWidget:window {\n\tbackground: #333333;\n\tcolor: #BBBBBB;\n}\n\n/* === WebView === */\nQTextBrowser, QWebView {\n\tbackground-color: #BBBBBB;\n\tselection-color: #0a214c;\n\tselection-background-color: #C19A6B;\n}\n\n/* === QPushButton === */\nQPushButton {\n\tborder: 0.5px solid #333333;\n\tpadding: 4px;\n\tmin-width: 65px;\n\tmin-height: 12px;\n}\n\nQPushButton:hover {\n\tbackground-color: #333333;\n\tborder-color: #444444;\n}\n\nQPushButton:pressed {\n\tbackground-color: #222222;\n\tborder-color: #333333;\n\tcolor: white;\n}\n\nQPushButton:disabled {\n\tcolor: #333333;\n}\n\n\n/* === QComboBox === */\nQComboBox {\n\tbackground-color: #272822;\n\tborder: 1px solid #333333;\n\tcolor: #BBBBBB;\n\tpadding:1px 2em 1px 3px;\n}\n\nQComboBox::drop-down {\n\tsubcontrol-origin: padding;\n\tsubcontrol-position: top right;\n\tborder-left: 1px solid #333333;\n}\n\nQComboBox::down-arrow {\n\tborder: 2px solid #333333;\n\twidth: 6px;\n\theight: 6px;\n\tbackground: #5f5f5f;\n}\n\n\n/* === QTabBar === */\nQTabBar::tab {\n\tbackground: transparent;\n\tborder: 1px solid #333333;\n\tborder-bottom: none;\n\tcolor: #BBBBBB;\n\tpadding-left: 5px;\n\tpadding-right: 10px;\n\tpadding-top: 3px;\n\tpadding-bottom: 3px;\n}\n\nQTabBar::tab:hover {\n\tbackground-color: #333333;\n\tborder: 1px solid #444444;\n\tborder-bottom: none;\n}\n\nQTabBar::tab:selected {\n\tbackground-color: #272822;\n\tborder: 1px solid #333333;\n\tborder-bottom: none;\n\tcolor: white\n}\n\n\n/* === QToolBar === */\nQToolBar {\n\tbackground-color: #333333;\n\tborder: none;\n\tpadding: 1px;\n}\n\n\n\nQToolBar::separator {\n\twidth: 6px;\n\tbackground-color: #333333;\n}\n\n/* === QToolButton === */\nQToolButton {\n\tborder: 1px solid #333333;\n\tmargin: 1px;\n}\n\nQToolButton:hover {\n\tbackground-color: #333333;\n\tborder: 1px solid #444444;\n}\n\nQToolButton[popupMode=\"1\"] { /* only for MenuButtonPopup */\n\tpadding-right: 20px; /* make way for the popup button */\n}\n\nQToolButton::menu-button {\n\tborder-left: 1px solid #333333;\n\tbackground: transparent;\n\twidth: 16px;\n}\n\nQToolButton::menu-button:hover {\n\tborder-left: 1px solid #444444;\n\tbackground: transparent;\n\twidth: 16px;\n}\n\nQToolButton:checked, QToolButton:pressed {\n\tbackground-color: #222222;\n\tcolor: white;\n}\n\n/* === QMenu === */\nQMenu {\n\tbackground-color: #272822;\n\tborder: 1px solid gray;\n\tcolor: white;\n\tpadding: 1px;\n}\n\nQMenu::item {\n\tpadding: 2px 25px 2px 20px;\n\tborder: 1px solid transparent;\n}\n\nQMenu::item:disabled {\n\tcolor: #666666;\n}\n\nQMenu::item:selected {\n\tborder-color: gray;\n\tbackground: #333333;\n}\n\nQMenu::icon:checked {\n\n}\n\nQMenu::separator {\n\theight: 1px;\n\tbackground: #333333;\n\tmargin-left: 10px;\n\tmargin-right: 10px;\n\tmargin-top: 1px;\n\tmargin-bottom: 1px;\n}\n\nQMenu::indicator {\n\twidth: 13px;\n\theight: 13px;\n}\n\n/* === QMenuBar === */\nQMenuBar {\n\tbackground-color: #272822;\n\tcolor: white;\n}\n\nQMenuBar::item {\n\tbackground: transparent;\n}\n\nQMenuBar::item:disabled {\n\tcolor: gray;\n}\n\nQMenuBar::item:selected {\n\tbackground: #333333;\n}\n\nQMenuBar::item:pressed {\n\tbackground: #444444;\n}\n\n\n/* =================== */\nQLineEdit, QListView, QTreeView, QTableView, QAbstractSpinBox {\n\tbackground-color: #272822;\n\tcolor: #BBBBBB;\n\tborder: 1px solid #333333;\n}\n\nQAbstractScrollArea, QLineEdit, QTextEdit, QAbstractSpinBox, QComboBox {\n\tborder-color: #333333;\n\tborder: 1px solid #333333;\n\n}\n\n/* === QScrollBar - Vertical === */\nQScrollBar:vertical {\n\tbackground-color: #272822;\n\tborder: 2px solid #272822;\n\twidth: 18px;\n\tmargin: 18px 0 18px 0px;\n}\n\n\tQScrollBar::handle:vertical {\n\t\tbackground-color: #333333;\n\t\tmin-height: 20px;\n\t}\n\n\tQScrollBar::add-line:vertical {\n\t\tborder: none;\n\t\theight: 18px;\n\t\tsubcontrol-position: bottom;\n\t\tsubcontrol-origin: margin;\n\t}\n\n\tQScrollBar::sub-line:vertical {\n\t\tborder: none;\n\t\theight: 18px;\n\t\tsubcontrol-position: top;\n\t\tsubcontrol-origin: margin;\n\t}\n\n\tQScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {\n\t\tbackground: none;\n\t}\n\n\tQScrollBar:up-arrow:vertical, QScrollBar:down-arrow:vertical {\n\t\tborder: 2px solid #272822;\n\t\twidth: 14px;\n\t\theight: 14px;\n\t\tbackground-color: #333333;\n\t}\n\n/* === QScrollBar - Horizontal === */\nQScrollBar:horizontal {\n\tbackground-color: #272822;\n\tborder: 2px solid #272822;\n\theight: 18px;\n\tmargin: 0px 18px 0 18px;\n}\n\n\tQScrollBar::handle:horizontal {\n\t\tbackground-color: #333333;\n\t\tmin-width: 20px;\n\t}\n\n\tQScrollBar::add-line:horizontal {\n\t\tborder: none;\n\t\twidth: 18px;\n\t\tsubcontrol-position: right;\n\t\tsubcontrol-origin: margin;\n\t}\n\n\tQScrollBar::sub-line:horizontal {\n\t\tborder: none;\n\t\twidth: 18px;\n\t\tsubcontrol-position: left;\n\t\tsubcontrol-origin: margin;\n\t}\n\n\tQScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {\n\t\tbackground: none;\n\t}\n\n\tQScrollBar:left-arrow:horizontal, QScrollBar:right-arrow:horizontal {\n\t\tborder: 2px solid #272822;\n\t\twidth: 14px;\n\t\theight: 14px;\n\t\tbackground-color: #333333;\n\t}\n\n/* === QHeaderView === */\nQHeaderView {\n\tbackground: #333333;\n}\n\nQHeaderView::section {\n\tbackground: #333333;\n\tborder: 0;\n\tcolor: #BBBBBB;\n\tpadding: 3px 0 3px 4px;\n}\n\n/* === Customizations === */\nQFrame#infoLabel {\n\tborder: 1px inset #333333;\n}\n"
  },
  {
    "path": "liteidex/deploy/liteapp/qss/vs-dark-hdpi.qss",
    "content": "/* ===add file: \\liteide\\share\\liteide\\liteapp\\qss\\vs-dark.qss ===*/\n/* ===FROM: https://gist.github.com/tupunco/fdb713ec9c6189a877e5eb003bd0457d ===*/\n\n/* === Shared === */\nQMainWindow{\n    background-color: #252526;\n    color: #BBBBBB;\n}\n\nQStackedWidget, QLabel, QPushButton, QRadioButton, QCheckBox, \nQGroupBox, QStatusBar, QToolButton, QComboBox, QDialog, QListView,\nQTabBar, QMenu, QMenuBar, QWidget::window  {\n    background-color: #252526;\n    color: #BBBBBB;\n}\n\n/* === QWidget === */\nQWidget:window {\n}\n\n/* === WebView === */\nQTextBrowser, QWebView {\n    background-color: #BBBBBB;\n    selection-color: #0a214c; \n    selection-background-color: #C19A6B;\n}\n\n/* === QToolTip === */\nQToolTip {\n    background-color: #EAEBF3;\n    border: 1px solid #767676;\n    color: #575757;\n}\n\n/* === QPushButton === */\nQPushButton {\n    border: 1px solid #333333;\n    padding: 1ex 4ex;\n    min-width: 12ex;\n    min-height: 4ex;\n    background-color: #333333;\n    margin: 0 2px;\n}\n\nQPushButton:hover {\n    background-color: #333333;\n    border-color: #444444;\n}\n\nQPushButton:pressed {\n    background-color: #2D2D30;\n    border-color: #333333;\n  color: #BBBBBB;\n}\n\nQPushButton:disabled {\n    color: #333333;\n}\n\n/* === Checkable items === */\nQCheckBox::indicator, QRadioButton::indicator, QTreeView::indicator {\n    width: 4ex;\n    height: 4ex;\n    background-color: #2D2D30;\n    border: 1px solid #434346;\n}\n\nQRadioButton::indicator {\n    border-radius: 2px;\n}\n\nQCheckBox::indicator::checked, QRadioButton::indicator::checked, QTreeView::indicator::checked {\n    background-color: qradialgradient(cx:0.5, cy:0.5, fx:0.5, fy:0.5, radius:1.0, stop:0.25 #BBBBBB, stop:0.3 #444444);\n}\n\nQCheckBox::indicator:disabled, QRadioButton::indicator:disabled, QTreeView::indicator:disabled {\n    background-color: #333333;\n}\n\nQCheckBox::indicator::checked:disabled, QRadioButton::indicator::checked:disabled, QTreeView::indicator::checked:disabled {\n    background-color: qradialgradient(cx:0.5, cy:0.5, fx:0.25, fy:0.15, radius:0.3, stop:0 #BBBBBB, stop:1 #444444);\n}\n\n/* === QComboBox === */\nQComboBox {\n    background-color: #333337;\n    border: 1px solid #434346;\n  color: #BBBBBB;\n    padding:0.8ex 3ex;\n}\n\nQComboBox:hover {\n    background-color: #3F3F46;\n}\n\nQComboBox::drop-down {\n    background-color: #333337;\n    subcontrol-origin: padding;\n    subcontrol-position: top right;\n    border-left: 1px solid #333333;\n}\n\nQComboBox::drop-down:hover {\n    background-color: #1F1F20;\n    border-left: 1px solid #007ACC;\n}\n\nQComboBox::down-arrow {\n    border: 2px solid #999999;\n    width: 1ex;\n    height: 1ex;\n    background: #999999;\n}\n\nQComboBox::down-arrow:hover {\n    border: 2px solid #007ACC;\n    background: #007ACC;\n}\n\n/* === QGroupBox === */\nQGroupBox {\n    border: 2px solid #333333;\n    margin-top: 2ex;\n}\n\nQGroupBox::title {\n    color: #FFFFFF;\n    subcontrol-origin: margin;\n    subcontrol-position: top left;\n    margin-left: 5px;\n}\n\n/* === QTabWidget === */\nQTabWidget::pane {\n    background: #222222;\n    border: 2px solid #333333;\n    color: #BBBBBB;\n}\n\n/* === QTabBar === */\nQTabBar::tab {\n    background: transparent;\n    border: 1px solid transparent;\n    /*border-bottom: 2px solid #007ACC;*/\n    color: #BBBBBB;\n    min-width: 10ex;\n    padding: 1ex 4ex;\n}\n\nQTabBar::tab:hover {\n    background-color: #1C97EA;\n    /*border-bottom: 2px solid #007ACC;*/\n    border-bottom: none;\n}\n\nQTabBar::tab:selected {\n    background-color: #2D2D30;\n    border: 2px solid #3D3D3D;\n    border-top: none;\n    border-top: 1px solid #3D3D3D;\n    border-bottom: 0px solid #3D3D3D;\n    color: #AAAAAA;\n}\n\n/* === QToolBar === */\nQToolBar {\n    background-color: #2D2D30;\n    border: none;\n    padding: 1px;\n    min-height: 6ex;\n}\n\nQToolBar:handle {\n    background: transparent;\n    border-left: 1px solid #3D3D3D;\n}\n\nQToolBar::separator {\n    width: 6px;\n    background-color: transparent;\n}\n\n/* === QToolButton === */\nQToolButton {\n    background-color: #2D2D30; \n    border: none;\n    margin: 1px;\n    padding: 3px;\n    min-width: 4ex;\n    min-height: 4ex;\n}\n\nQToolButton:hover {\n    background-color: #3E3E40;\n    border: 1px solid #3E3E40;\n}\n\nQToolButton[popupMode=\"1\"] {\n    padding-right: 20px;\n}\nQToolButton[popupMode=\"2\"] {\n    padding-right: 10px;\n    background-color: #3E3E40; \n}\nQToolButton[popupMode=\"2\"]:hover {\n    background-color: #333337; \n}\n\nQToolButton::menu-button {\n    border-left: 1px solid #333333;\n    background: #333337;\n}\n\nQToolButton::menu-button:hover {\n    border-left: 1px solid #444444;\n    background: #3F3F46;\n}\n\nQToolButton:pressed {\n    background-color: #2D2D30;\n    color: #FFFFFF;\n}\n\nQToolButton:checked {\n    border: 1px solid transparent;\n    background-color: transparent;\n    color: #FFFFFF;\n}\n\nRotationToolButton, RotationToolButton:pressed, RotationToolButton:hover, RotationToolButton:checked {\n    border-top-width: 1ex;\n    border-top-style: solid;\n    border-top-color: transparent;\n    background-color: transparent;\n    color: #AAAAAA;\n}\nRotationToolButton:pressed {\n    color: #BBBBBB;\n}\nRotationToolButton:hover,RotationToolButton:checked:hover {\n    border-top-color: #007ACC;\n    color: #007ACC;\n}\nRotationToolButton:checked  {\n    border: 1px solid #444444;\n    border-bottom: 0px solid #000000;\n    color: #BBBBBB;\n}\n\n\n/* === QMenu === */\nQMenu {\n    background-color: #1B1B1C;\n    border: 1px solid #1B1B1C;\n    color: #BBBBBB;\n    padding: 2px;\n}\n\nQMenu::item {\n    padding: 2px 7ex 4px 7ex;\n    border: 1px solid transparent;\n}\n\nQMenu::item:disabled {\n    color: #656565;\n}\n\nQMenu::item:selected {\n    border-color: #3D3D3D;\n    background: #3D3D3D;\n}\nQMenu::item:checked {\n}\n\nQMenu::icon:checked {\n    background: #FFFFFF;\n}\n\nQMenu::separator {\n    height: 1px;\n    background: #222222;\n    margin: 1px 10px;\n}\n\nQMenu::indicator {\n    width: 13px;\n    height: 13px;\n}\n\n/* === QMenuBar === */\nQMenuBar {\n    background-color: #2D2D30;\n    color: #BBBBBB;\n}\n\nQMenuBar::item {\n    background: transparent;\n}\n\nQMenuBar::item:disabled {\n    color: gray;\n}\n\nQMenuBar::item:selected {\n    background: #444444;\n}\n\nQMenuBar::item:pressed {\n    background: #1B1B1C;\n}\n \n/* === QScrollBar:vertical === */\nQScrollBar:vertical {\n    background: #3E3E42;\n    width: 4ex;\n    margin: 16px 0 16px 0;\n}\n\nQScrollBar::handle:vertical {\n    background: #686868;\n    min-height: 4ex;\n    border: 2px solid #3E3E42;\n}\n\nQScrollBar::add-line:vertical {\n    background: #3E3E42;\n    height: 4ex;\n    subcontrol-position: bottom;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::sub-line:vertical {\n    background: #3E3E42;\n    height: 4ex;\n    subcontrol-position: top;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {\n    background: #3E3E42;\n}\n\nQScrollBar:up-arrow:vertical, QScrollBar:down-arrow:vertical {\n    border: 2px solid #686868;\n    width: 6px;\n    height: 6px;\n    background: #686868;\n}\n\n/* === QScrollBar:horizontal === */\nQScrollBar:horizontal {\n    background: #3E3E42;\n    height: 4ex;\n    margin: 0 16px 0 16px;\n}\n\nQScrollBar::handle:horizontal {\n    background: #686868;\n    min-width: 4ex;\n    border: 2px solid #3E3E42;\n}\n\nQScrollBar::add-line:horizontal {\n    background: #3E3E42;\n    width: 4ex;\n    subcontrol-position: right;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::sub-line:horizontal {\n    background: #3E3E42;\n    width: 4ex;\n    subcontrol-position: left;\n    subcontrol-origin: margin;\n}\n\nQScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {\n    background: #3E3E42;\n}\n\nQScrollBar:left-arrow:horizontal, QScrollBar:right-arrow:horizontal {\n    border: 2px solid #686868;\n    width: 6px;\n    height: 6px;\n    background: #686868;\n}\n\n/* =================== */\nQLineEdit, QListView, QTreeView, QTableView, QAbstractSpinBox {\n    background-color: #2D2D30;\n    color: #BBBBBB;\n    border: 1px solid #333333;\n}\n\nQAbstractScrollArea, QLineEdit, QTextEdit, QAbstractSpinBox {\n    border-color: #333333;\n    border: 1px solid #333333;\n}\n\n/* === QHeaderView ===*/\nQHeaderView {\n    background: #222222;\n} \nQHeaderView::section {\n    background: #222222;\n    border: 0;\n    color: #BBBBBB;\n    padding: 3px 0 3px 4px;\n}\n\n/* === QListView === */\nQListView::item:hover {\n    background: #333333;\n}\n\nQListView::item:selected {\n    background: #2D2D30;\n    color: #FFFFFF;\n}\n\n/* === QTableView === */\nQTableView::item:hover {\n    background: #333333;\n}\n\nQTableView::item:hover {\n    background: #2D2D30;\n    color: #FFFFFF;\n}\n\n/* === QTreeView === */\nQTreeView::item {\n    background: #2D2D30;\n}\n\nQTreeView::item:hover {\n    background: #333333;\n}\n\nQTreeView::item:selected {\n    background: #2D2D30;\n    color: #FFFFFF;\n}\n\nQTreeView::branch {\n\n}\n\nQTreeView::branch:has-siblings:adjoins-item {\n\n}\n\nQTreeView::branch:has-siblings:!adjoins-item {\n\n}\n\nQTreeView::branch:closed:has-children:has-siblings {\n\n}\n\nQTreeView::branch:has-children:!has-siblings:closed {\n\n}\n\nQTreeView::branch:!has-children:!has-siblings:adjoins-item {\n\n}\n\nQTreeView::branch:open:has-children:has-siblings {\n\n}\n\nQTreeView::branch:open:has-children:!has-siblings {\n\n}\n\n/* === Customizations === */\nQFrame#infoLabel {\n    border: 1px inset #333333;\n}"
  },
  {
    "path": "liteidex/deploy/liteapp/qss/vs-dark.qss",
    "content": "/* ===add file: \\liteide\\share\\liteide\\liteapp\\qss\\vs-dark.qss ===*/\r\n/* ===FROM: https://gist.github.com/tupunco/fdb713ec9c6189a877e5eb003bd0457d ===*/\r\n\r\n/* === Shared === */\r\nQStackedWidget, QLabel, QPushButton, QRadioButton, QCheckBox, \r\nQGroupBox, QStatusBar, QToolButton, QComboBox, QDialog, QListView,\r\nQTabBar, QMenu, QMenuBar, QWidget::window  {\r\n    background-color: #252526;\r\n    color: #F1F1F1;\r\n    font-size: 14px;\r\n    font-family: \"微软雅黑;Segoe UI\";\r\n}\r\n\r\n/* === QWidget === */\r\nQWidget:window {\r\n}\r\n\r\n/* === WebView === */\r\nQTextBrowser, QWebView {\r\n    background-color: #BBBBBB;\r\n    selection-color: #0a214c; \r\n    selection-background-color: #C19A6B;\r\n}\r\n\r\n/* === QToolTip === */\r\nQToolTip {\r\n    background-color: #EAEBF3;\r\n    border: 1px solid #767676;\r\n    color: #575757;\r\n}\r\n\r\n/* === QPushButton === */\r\nQPushButton {\r\n    border: 1px solid #333333;\r\n    padding: 4px;\r\n    min-width: 65px;\r\n    min-height: 12px;\r\n    background-color: #333333;\r\n}\r\n\r\nQPushButton:hover {\r\n    background-color: #333333;\r\n    border-color: #444444;\r\n}\r\n\r\nQPushButton:pressed {\r\n    background-color: #2D2D30;\r\n    border-color: #333333;\r\n    color: #FFFFFF;\r\n}\r\n\r\nQPushButton:disabled {\r\n    color: #333333;\r\n}\r\n\r\n/* === Checkable items === \r\nQCheckBox::indicator, QRadioButton::indicator, QTreeView::indicator {\r\n    width: 16px;\r\n    height: 16px;\r\n    background-color: #2D2D30;\r\n    border: 1px solid #434346;\r\n}\r\n\r\nQRadioButton::indicator {\r\n    border-radius: 2px;\r\n}\r\n\r\nQCheckBox::indicator::checked, QRadioButton::indicator::checked, QTreeView::indicator::checked {\r\n    background-color: qradialgradient(cx:0.5, cy:0.5, fx:0.25, fy:0.15, radius:0.3, stop:0 #CFCFCF, stop:1 #2D2D30);\r\n}\r\n\r\nQCheckBox::indicator:disabled, QRadioButton::indicator:disabled, QTreeView::indicator:disabled {\r\n    background-color: #333333;\r\n}\r\n\r\nQCheckBox::indicator::checked:disabled, QRadioButton::indicator::checked:disabled, QTreeView::indicator::checked:disabled {\r\n    background-color: qradialgradient(cx:0.5, cy:0.5, fx:0.25, fy:0.15, radius:0.3, stop:0 #BBBBBB, stop:1 #444444);\r\n}\r\n*/\r\n\r\n/* === QComboBox === */\r\nQComboBox {\r\n    background-color: #333337;\r\n    border: 1px solid #434346;\r\n    color: white;\r\n    padding:1px 2em 1px 3px;\r\n}\r\n\r\nQComboBox:hover {\r\n    background-color: #3F3F46;\r\n}\r\n\r\nQComboBox::drop-down {\r\n    background-color: #333337;\r\n\r\n    subcontrol-origin: padding;\r\n    subcontrol-position: top right;\r\n    border-left: 1px solid #333333;\r\n}\r\n\r\nQComboBox::drop-down:hover {\r\n    background-color: #1F1F20;\r\n    border-left: 1px solid #007ACC;\r\n}\r\n\r\nQComboBox::down-arrow {\r\n    border: 2px solid #999999;\r\n    width: 4px;\r\n    height: 4px;\r\n    background: #999999;\r\n}\r\n\r\nQComboBox::down-arrow:hover {\r\n    border: 2px solid #007ACC;\r\n    background: #007ACC;\r\n}\r\n\r\n\r\n/* === QGroupBox === */\r\nQGroupBox {\r\n    border: 2px solid #333333;\r\n    margin-top: 2ex;\r\n}\r\n\r\nQGroupBox::title {\r\n    color: #FFFFFF;\r\n    subcontrol-origin: margin;\r\n    subcontrol-position: top left;\r\n    margin-left: 5px;\r\n}\r\n\r\n/* === QTabWidget === */\r\nQTabWidget::pane {\r\n    background: #222222;\r\n    border: 2px solid #333333;\r\n}\r\n\r\n/* === QTabBar === */\r\nQTabBar::tab {\r\n    background: transparent;\r\n    border: 1px solid transparent;\r\n    border-bottom: 2px solid #007ACC;\r\n    color: #FFFFFF;\r\n    padding-left: 6px;\r\n    padding-right: 6px;\r\n    padding-top: 4px;\r\n    padding-bottom: 4px;\r\n}\r\n\r\nQTabBar::tab:hover {\r\n    background-color: #1C97EA;\r\n    border-bottom: 2px solid #007ACC;\r\n    border-bottom: none;\r\n}\r\n\r\nQTabBar::tab:selected {\r\n    background-color: #007ACC;\r\n    border: 2px solid #007ACC;\r\n    border-top: none;\r\n    border-bottom: 1px solid #007ACC;\r\n    color: #FFFFFF;\r\n}\r\n\r\n/* === QToolBar === */\r\nQToolBar {\r\n    background-color: #2D2D30;\r\n    border: none;\r\n    padding: 1px;\r\n}\r\n\r\nQToolBar:handle {\r\n    background: transparent;\r\n    border-left: 1px solid #3D3D3D;\r\n}\r\n\r\nQToolBar::separator {\r\n    width: 6px;\r\n    background-color: transparent;\r\n}\r\n\r\n/* === QToolButton === */\r\nQToolButton {\r\n    background-color: #2D2D30;\r\n    border: none;\r\n    margin: 1px;\r\n    padding: 3px;\r\n}\r\n\r\nQToolButton:hover {\r\n    background-color: #3E3E40;\r\n    border: 1px solid #3E3E40;\r\n}\r\n\r\nQToolButton[popupMode=\"1\"] { /* only for MenuButtonPopup */\r\n    padding-right: 20px; /* make way for the popup button */\r\n}\r\nQToolButton[popupMode=\"2\"] { /* only for InstantPopup */\r\n    padding-right: 10px; /* make way for the InstantPopup button */\r\n}\r\n\r\nQToolButton::menu-button {\r\n    border-left: 1px solid #333333;\r\n    background: #333337;\r\n    width: 16px;\r\n}\r\n\r\nQToolButton::menu-button:hover {\r\n    border-left: 1px solid #444444;\r\n    background: #3F3F46;\r\n    width: 16px;\r\n}\r\n\r\nQToolButton:pressed {\r\n    background-color: #2D2D30;\r\n    color: #FFFFFF;\r\n}\r\n\r\nQToolButton:checked {\r\n    border: 1px solid #434346;\r\n    background-color: #444444;\r\n    color: #FFFFFF;\r\n}\r\n\r\n/* === QMenu === */\r\nQMenu {\r\n    background-color: #1B1B1C;\r\n    border: 1px solid #1B1B1C;\r\n    color: #F1F1F1;\r\n    padding: 2px;\r\n}\r\n\r\nQMenu::item {\r\n    padding: 2px 25px 4px 20px;\r\n    border: 1px solid transparent;\r\n}\r\n\r\nQMenu::item:disabled {\r\n    color: #656565;\r\n}\r\n\r\nQMenu::item:selected {\r\n    border-color: #3D3D3D;\r\n    background: #3D3D3D;\r\n}\r\nQMenu::item:checked {\r\n}\r\n\r\nQMenu::icon:checked {\r\n    background: #FFFFFF;\r\n}\r\n\r\nQMenu::separator {\r\n    height: 1px;\r\n    background: #222222;\r\n    margin-left: 10px;\r\n    margin-right: 10px;\r\n    margin-top: 1px;\r\n    margin-bottom: 1px;\r\n}\r\n\r\nQMenu::indicator {\r\n    width: 13px;\r\n    height: 13px;\r\n}\r\n\r\n/* === QMenuBar === */\r\nQMenuBar {\r\n    background-color: #2D2D30;\r\n    color: white;\r\n}\r\n\r\nQMenuBar::item {\r\n    background: transparent;\r\n}\r\n\r\nQMenuBar::item:disabled {\r\n    color: gray;\r\n}\r\n\r\nQMenuBar::item:selected {\r\n    background: #222222;\r\n}\r\n\r\nQMenuBar::item:pressed {\r\n    background: #444444;\r\n}\r\n \r\n/* === QScrollBar:vertical === */\r\nQScrollBar:vertical {\r\n    background: #3E3E42;\r\n    width: 16px;\r\n    margin: 16px 0 16px 0;\r\n}\r\n\r\nQScrollBar::handle:vertical {\r\n    background: #686868;\r\n    min-height: 16px;\r\n    border: 2px solid #3E3E42;\r\n}\r\n\r\nQScrollBar::add-line:vertical {\r\n    background: #3E3E42;\r\n    height: 16px;\r\n    subcontrol-position: bottom;\r\n    subcontrol-origin: margin;\r\n}\r\n\r\nQScrollBar::sub-line:vertical {\r\n    background: #3E3E42;\r\n    height: 16px;\r\n    subcontrol-position: top;\r\n    subcontrol-origin: margin;\r\n}\r\n\r\nQScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {\r\n    background: #3E3E42;\r\n}\r\n\r\nQScrollBar:up-arrow:vertical, QScrollBar:down-arrow:vertical {\r\n    border: 2px solid #686868;\r\n    width: 6px;\r\n    height: 6px;\r\n    background: #686868;\r\n}\r\n\r\n/* === QScrollBar:horizontal === */\r\nQScrollBar:horizontal {\r\n    background: #3E3E42;\r\n    height: 16px;\r\n    margin: 0 16px 0 16px;\r\n}\r\n\r\nQScrollBar::handle:horizontal {\r\n    background: #686868;\r\n    min-width: 16px;\r\n    border: 2px solid #3E3E42;\r\n}\r\n\r\nQScrollBar::add-line:horizontal {\r\n    background: #3E3E42;\r\n    width: 16px;\r\n    subcontrol-position: right;\r\n    subcontrol-origin: margin;\r\n}\r\n\r\nQScrollBar::sub-line:horizontal {\r\n    background: #3E3E42;\r\n    width: 16px;\r\n    subcontrol-position: left;\r\n    subcontrol-origin: margin;\r\n}\r\n\r\nQScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {\r\n    background: #3E3E42;\r\n}\r\n\r\nQScrollBar:left-arrow:horizontal, QScrollBar:right-arrow:horizontal {\r\n    border: 2px solid #686868;\r\n    width: 6px;\r\n    height: 6px;\r\n    background: #686868;\r\n}\r\n\r\n/* =================== */\r\nQLineEdit, QListView, QTreeView, QTableView, QAbstractSpinBox {\r\n    background-color: #2D2D30;\r\n    color: #BBBBBB;\r\n    border: 1px solid #333333;\r\n}\r\n\r\nQAbstractScrollArea, QLineEdit, QTextEdit, QAbstractSpinBox {\r\n    border-color: #333333;\r\n    border: 1px solid #333333;\r\n\r\n}\r\n\r\n/* === QHeaderView === */\r\nQHeaderView {\r\n    background: #222222;\r\n}\r\n\r\nQHeaderView::section {\r\n    background: #222222;\r\n    border: 0;\r\n    color: #BBBBBB;\r\n    padding: 3px 0 3px 4px;\r\n}\r\n\r\n/* === QListView === */\r\nQListView::item:hover {\r\n    background: #333333;\r\n}\r\n\r\nQListView::item:selected {\r\n    background: #2D2D30;\r\n    color: #FFFFFF;\r\n}\r\n\r\n/* === QTableView === */\r\nQTableView::item:hover {\r\n    background: #333333;\r\n}\r\n\r\nQTableView::item:hover {\r\n    background: #2D2D30;\r\n    color: #FFFFFF;\r\n}\r\n\r\n/* === QTreeView === */\r\nQTreeView::item {\r\n}\r\n\r\nQTreeView::item:hover {\r\n}\r\n\r\nQTreeView::item:selected {\r\n}\r\n\r\nQTreeView::branch {\r\n\r\n}\r\n\r\nQTreeView::branch:has-siblings:adjoins-item {\r\n\r\n}\r\n\r\nQTreeView::branch:has-siblings:!adjoins-item {\r\n\r\n}\r\n\r\nQTreeView::branch:closed:has-children:has-siblings {\r\n\r\n}\r\n\r\nQTreeView::branch:has-children:!has-siblings:closed {\r\n\r\n}\r\n\r\nQTreeView::branch:!has-children:!has-siblings:adjoins-item {\r\n\r\n}\r\n\r\nQTreeView::branch:open:has-children:has-siblings {\r\n\r\n}\r\n\r\nQTreeView::branch:open:has-children:!has-siblings {\r\n\r\n}\r\n\r\n/* === Customizations === */\r\nQFrame#infoLabel {\r\n    border: 1px inset #333333;\r\n}\r\n"
  },
  {
    "path": "liteidex/deploy/liteapp/template/empty/root",
    "content": ""
  },
  {
    "path": "liteidex/deploy/liteapp/template/empty/setup.inf",
    "content": "[SETUP]\nNAME = \"Empty File\"\nAUTHOR = visualfc\nINFO = create a new empty file\nTYPE = file\nFILES = root\nOPEN = root"
  },
  {
    "path": "liteidex/deploy/liteapp/template/file.sub",
    "content": "empty\ngosrc\nluasrc\nmdsrc\ngoslide\ngoarticle"
  },
  {
    "path": "liteidex/deploy/liteapp/template/goarticle/root.article",
    "content": "# http://godoc.org/golang.org/x/tools/present\n# Present files have the following format. \n# The first non-blank non-comment line is the title.\n# The subtitle, date, and tags lines are optional.\nTitle of document\nSubtitle of document\n$DATETIME$\nTags: foo, bar, baz\n\nAuthor Name\nJob title, Company\njoe@example.com\nhttp://url/\n@twitter_name\n\n* Section1\n\n* Section2"
  },
  {
    "path": "liteidex/deploy/liteapp/template/goarticle/setup.inf",
    "content": "[SETUP]\nNAME = \"Go Present Article File\"\nAUTHOR = visualfc\nINFO = go article file(*.article)\nTYPE = file\nFILES = root.article\nOPEN = root.article"
  },
  {
    "path": "liteidex/deploy/liteapp/template/gocmd/doc.go",
    "content": "// $ROOT$ project doc.go\n\n/*\n$ROOT$ document\n*/\npackage main\n"
  },
  {
    "path": "liteidex/deploy/liteapp/template/gocmd/main.go",
    "content": "// $ROOT$ project main.go\npackage main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tfmt.Println(\"Hello World!\")\n}\n"
  },
  {
    "path": "liteidex/deploy/liteapp/template/gocmd/setup.inf",
    "content": "[SETUP]\nNAME = \"Go1 Command Project\"\nAUTHOR = visualfc\nINFO = create Go command project GOPATH/src\nTYPE = gopath\nFILES = main.go doc.go\nOPEN = main.go\nSCHEME=folder"
  },
  {
    "path": "liteidex/deploy/liteapp/template/gocmdex/doc.go",
    "content": "// $ROOT$ project doc.go\n\n/*\n$ROOT$ document\n*/\npackage main\n"
  },
  {
    "path": "liteidex/deploy/liteapp/template/gocmdex/main.go",
    "content": "// $ROOT$ project main.go\npackage main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tfmt.Println(\"Hello World!\")\n}\n"
  },
  {
    "path": "liteidex/deploy/liteapp/template/gocmdex/setup.inf",
    "content": "[SETUP]\nNAME = \"Go1 Command Project (Anywhere)\"\nAUTHOR = visualfc\nINFO = create Go command project anywhere\nTYPE = project\nFILES = main.go doc.go\nOPEN = main.go\nSCHEME=folderex"
  },
  {
    "path": "liteidex/deploy/liteapp/template/gopkg/doc.go",
    "content": "// $ROOT$ project doc.go\n\n/*\n$ROOT$ document\n*/\npackage $ROOT$\n"
  },
  {
    "path": "liteidex/deploy/liteapp/template/gopkg/root.go",
    "content": "// $ROOT$ project $ROOT$.go\npackage $ROOT$\n"
  },
  {
    "path": "liteidex/deploy/liteapp/template/gopkg/setup.inf",
    "content": "[SETUP]\nNAME = \"Go1 Package Project\"\nAUTHOR = visualfc\nINFO = create Go package project GOPATH/src\nTYPE = gopath\nFILES = root.go doc.go\nOPEN = root.go\nSCHEME=folder"
  },
  {
    "path": "liteidex/deploy/liteapp/template/gopkgex/doc.go",
    "content": "// $ROOT$ project doc.go\n\n/*\n$ROOT$ document\n*/\npackage $ROOT$\n"
  },
  {
    "path": "liteidex/deploy/liteapp/template/gopkgex/root.go",
    "content": "// $ROOT$ project $ROOT$.go\npackage $ROOT$\n"
  },
  {
    "path": "liteidex/deploy/liteapp/template/gopkgex/setup.inf",
    "content": "[SETUP]\nNAME = \"Go1 Package Project (Anywhere)\"\nAUTHOR = visualfc\nINFO = create Go package project anywhere\nTYPE = project\nFILES = root.go doc.go\nOPEN = root.go\nSCHEME=folderex"
  },
  {
    "path": "liteidex/deploy/liteapp/template/goslide/root.slide",
    "content": "# http://godoc.org/golang.org/x/tools/present\n# Present files have the following format. \n# The first non-blank non-comment line is the title.\n# The subtitle, date, and tags lines are optional.\nTitle of document\nSubtitle of document\n$DATETIME$\nTags: foo, bar, baz\n\nAuthor Name\nJob title, Company\njoe@example.com\nhttp://url/\n@twitter_name\n\n* Section1\n\n* Section2"
  },
  {
    "path": "liteidex/deploy/liteapp/template/goslide/setup.inf",
    "content": "[SETUP]\nNAME = \"Go Present Slide File\"\nAUTHOR = visualfc\nINFO = go slide file(*.slide)\nTYPE = file\nFILES = root.slide\nOPEN = root.slide"
  },
  {
    "path": "liteidex/deploy/liteapp/template/gosrc/root.go",
    "content": "// $ROOT$\npackage main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tfmt.Println(\"Hello World!\")\n}\n"
  },
  {
    "path": "liteidex/deploy/liteapp/template/gosrc/setup.inf",
    "content": "[SETUP]\nNAME = \"Go Source File\"\nAUTHOR = visualfc\nINFO = make new golang source(*.go)\nTYPE = file\nFILES = root.go\nOPEN = root.go"
  },
  {
    "path": "liteidex/deploy/liteapp/template/luasrc/root.lua",
    "content": "\n"
  },
  {
    "path": "liteidex/deploy/liteapp/template/luasrc/setup.inf",
    "content": "[SETUP]\nNAME = \"LUA Source File\"\nAUTHOR = visualfc\nINFO = new lua source(*.lua)\nTYPE = file\nFILES = root.lua\nOPEN = root.lua"
  },
  {
    "path": "liteidex/deploy/liteapp/template/mdsrc/root.md",
    "content": "$ROOT$\n========\n"
  },
  {
    "path": "liteidex/deploy/liteapp/template/mdsrc/setup.inf",
    "content": "[SETUP]\nNAME = \"Markdown File\"\nAUTHOR = visualfc\nINFO = new markdown file(*.md)\nTYPE = file\nFILES = root.md\nOPEN = root.md"
  },
  {
    "path": "liteidex/deploy/liteapp/template/project.sub",
    "content": "gocmd\ngocmdex\ngopkg\ngopkgex\n"
  },
  {
    "path": "liteidex/deploy/litebuild/build.md",
    "content": "### LiteEdit Build Environment\n\n***\n\n### liteide app info\n\n\tLITEIDE_BIN_DIR\n\tLITEIDE_RES_DIR\n\n### build dir info\n\n\tBUILD_DIR_PATH\n\tBUILD_DIR_NAME\n\tBUILD_DIR_BASENAME\n\n### editor file info\n\n\tEDITOR_FILE_PATH\n\tEDITOR_FILE_NAME\n\tEDITOR_FILE_BASENAME\n\tEDITOR_FILE_SUFFIX\n\n### editor dir info\n\n\tEDITOR_DIR_PATH\n\tEDITOR_DIR_NAME\n\tEDITOR_DIR_BASENAME\n"
  },
  {
    "path": "liteidex/deploy/litebuild/command/go.api",
    "content": "go\ngo test\ngo test -test.bench=.*\ngo test -test.bench=.* -test.benchmem\ngo test -cover\ngo install\ngo get\ngo clean\ngo env\ngo version\ngo build\ngo build -ldflags \"\ngo build -ldflags \"-r .\"\ngo build -ldflags \"-H windowsgui\"\ngo build -ldflags \"-H windowsgui -r .\"\ngo build -ldflags \"-w -s\"\ngo build -gcflags \"\ngo mod init\ngo mod tidy\ngo mod download\ngo mod verify\ngo mod graph\ngo mod why"
  },
  {
    "path": "liteidex/deploy/litebuild/gomod.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n\t<mime-type type=\"text/x-gomod\" id=\"go tool\" work=\"$(BUILD_DIR_PATH)\" lock=\"file\" ver=\"2\">\n\t\t<config id=\"Go\" name=\"GO\" value=\"go\"/>\n\t\t<config id=\"GoFmt\" name=\"GOFMT\" value=\"gofmt\"/>\n\t\t<config id=\"GoTools\" name=\"GOTOOLS\" value=\"$(LITEIDE_TOOL_PATH)/gotools\"/>\n\t\t<config id=\"ErrRegex\" name=\"ERRREGEX\" value=\"((?:[a-zA-Z]:)?[\\w\\d_@\\-\\\\\\/\\.]+):(\\d+)\\b\"/>\n\t\t<custom id=\"TargetBaseName\" name=\"TARGETBASENAME\" value=\"$(BUILD_DIR_NAME)\"/>\n\t\t<custom id=\"TargetName\" name = \"TARGETNAME\" value=\"$(TARGETBASENAME)$(GOEXE)\" readonly=\"true\" escaped=\"true\"/>\n\t\t<custom id=\"TargetArgs\" name=\"TARGETARGS\" value=\"\"/>\n\t\t<custom id=\"DebugName\" name = \"DEBUGNAME\" value=\"$(TARGETBASENAME).debug$(GOEXE)\" readonly=\"true\" escaped=\"true\"/>\n\t\t<custom id=\"DebugTestName\" name = \"DEBUGTESTNAME\" value=\"$(TARGETBASENAME).test$(GOEXE)\" readonly=\"true\" escaped=\"true\"/>\n\t\t<custom id=\"BuildFlags\" name=\"BUILDFLAGS\" value=\"\"/>\n\t\t<custom id=\"BuildArgs\" name=\"BUILDARGS\" value=\"\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"ForceBuildArgs\" name=\"FORCEBUILDARGS\" value=\"-a -v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"InstallArgs\" name=\"INSTALLARGS\" value=\"-v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"GetArgs\" name=\"GETARGS\" value=\"-v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"ForceGetArgs\" name=\"FORCEGETARGS\" value=\"-a -v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"UpdateGetArgs\" name=\"UPDATEGETARGS\" value=\"-u -v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"TestArgs\" name=\"TESTARGS\" value=\"-v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"BenchmarkArgs\" name=\"BENCHMARKARGS\" value=\"-test.bench=.* \" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"TestBuildArgs\" name=\"TESTBUILDARGS\" value=\"-c -gcflags &quot;-N -l&quot;\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"TestCoverArgs\" name=\"TESTCOVERARGS\" value=\"-coverprofile cover.out\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"ToolCoverArgs\" name=\"TOOLCOVERARGS\" value=\"-func=cover.out\"/>\n\t\t<custom id=\"VetArgs\" name=\"VETARGS\" value=\"-v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"ToolVetArgs\" name=\"TOOLVETARGS\" value=\"-all -v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"GenerateArgs\" name=\"GENERATEARGS\" value=\"-v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"GolintArgs\" name=\"GOLINTARGS\" value=\"-min_confidence=0.8\"/>\n\t\t<custom id=\"DebugBuildArgs\" name = \"DEBUGBUILDARGS\" value=\"$(LITEIDE_DEBUG_GCFLAGS) -v -o $(DEBUGNAME)\"/>\n\t\t<custom id=\"DebugTestBuildArgs\" name=\"DEBUGTESTBUILDARGS\" value=\"$(LITEIDE_DEBUG_GCFLAGS) -c -o $(DEBUGTESTNAME)\"/>\n\t\t<action id=\"BuildAndRun\" img=\"buildrun.png\" key=\"Ctrl+R;Ctrl+F7\" task=\"Build;Run\" killold=\"true\"/>\n\t\t<action id=\"Run\" img=\"run.png\" key=\"Ctrl+Alt+R;Ctrl+F5\" cmd=\"$(TARGETNAME)\" args=\"$(TARGETARGS)\" output=\"true\" codec=\"utf-8\" readline=\"true\"/>\n\t\t<action id=\"RunTerm\" img=\"runterm.png\" key=\"Ctrl+Shift+F5\" cmd=\"$(LITEIDE_EXEC)\" args=\"$(LITEIDE_EXECOPT) $(GOTOOLS) runcmd $(TARGETNAME) $(TARGETARGS)\" output=\"false\" readline=\"true\"/>\n\t\t<action id=\"RunTerm\" os=\"macosx\" img=\"runterm.png\" key=\"Ctrl+Shift+F5\" cmd=\"/usr/bin/open\" args=\"$(TARGETNAME)\" output=\"false\" readline=\"true\"/>\n\t\t<action id=\"Build\" img=\"build.png\" key=\"Ctrl+B;F7\" cmd=\"$(GO)\" args=\"build $(BUILDARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"ForceBuild\" img=\"rebuild.png\" menu=\"Build\" key=\"Ctrl+Alt+B\" cmd=\"$(GO)\" args=\"build $(FORCEBUILDARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"BuildAll\" img=\"buildall.png\" menu=\"Build\" key=\"\" cmd=\"$(GO)\" args=\"build -v ./...\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"Install\" menu=\"Build\" img=\"install.png\" key=\"Ctrl+F8\" cmd=\"$(GO)\" args=\"install $(INSTALLARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"Clean\" menu=\"Build\" img=\"clean.png\" cmd=\"$(GO)\" args=\"clean\" save=\"all\" output=\"true\"/>\n\t\t<action id=\"CleanAll\" menu=\"Build\" img=\"cleanall.png\" cmd=\"$(GO)\" args=\"clean -i\" save=\"all\" output=\"true\"/>\n\t\t<action id=\"Get\" img=\"get.png\" cmd=\"$(GO)\" args=\"get $(GETARGS) .\" save=\"all\" output=\"true\" codec=\"utf-8\"/>\n\t\t<action id=\"Get Update Network\" menu=\"Get\" img=\"get.png\" cmd=\"$(GO)\" args=\"get $(UPDATEGETARGS) .\" save=\"all\" output=\"true\" codec=\"utf-8\"/>\n\t\t<action id=\"Get Force Rebuilding\" menu=\"Get\" img=\"reget.png\" cmd=\"$(GO)\" args=\"get $(FORCEGETARGS) .\" save=\"all\" output=\"true\" codec=\"utf-8\"/>\n\t\t<action id=\"Test\" img=\"test.png\" key = \"Ctrl+T\" cmd=\"$(GO)\" args=\"test $(TESTARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" takeall=\"true\" navigate=\"true\"/>\n\t\t<action id=\"TestAll\" menu=\"Test\" img=\"test.png\" key = \"Ctrl+Alt+T\" cmd=\"$(GO)\" args=\"test $(TESTARGS) ./...\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" takeall=\"true\" navigate=\"true\"/>\n\t\t<action id=\"TestBench\" menu=\"Test\" img=\"testbench.png\" cmd=\"$(GO)\" args=\"test $(BENCHMARKARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"TestBuild\" menu=\"Test\" img=\"buildtest.png\" cmd=\"$(GO)\" args=\"test $(TESTBUILDARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\"/>\n\t\t<action id=\"TestCover\" menu=\"Test\" img=\"testcover.png\" key=\"\" task=\"Cover;ToolCover\" killold=\"true\"/>\n\t\t<action id=\"Cover\" menu=\"Test\" img=\"cover.png\" key = \"\" cmd=\"$(GO)\" args=\"test $(TESTCOVERARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"ToolCover\" menu=\"Test\" img=\"cover.png\" key = \"\" cmd=\"$(GO)\" args=\"tool cover $(TOOLCOVERARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"Utils\" folder=\"true\" img=\"utils.png\"/>\n\t\t<action id=\"GoFmtAll\" menu=\"Utils\" img=\"fmt.png\" cmd=\"$(GOFMT)\" args=\"-l -w .\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"GoVet\" menu=\"Utils\" img=\"vet.png\" cmd=\"$(GO)\" args=\"vet $(VETARGS)\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"GoToolVet\" menu=\"Utils\" img=\"vet.png\" cmd=\"$(GO)\" args=\"tool vet $(TOOLVETARGS) .\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"GoGenerate\" menu=\"Utils\" img=\"get.png\" cmd=\"$(GO)\" args=\"generate $(GENERATEARGS)\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" takeall=\"true\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"GoLint\" menu=\"Utils\" img=\"lint.png\" cmd=\"golint\" args=\"$(GOLINTARGS) $(EDITOR_FILE_NAME)\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" takeall=\"true\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"buildDebug\" cmd=\"$(GO)\" args=\"build $(DEBUGBUILDARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"runDebug\" debug=\"true\" cmd=\"$(DEBUGNAME)\" args=\"$(TARGETARGS)\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"buildDebugTest\" cmd=\"$(GO)\" args=\"test $(DEBUGTESTBUILDARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"runDebugTest\" debug=\"true\" cmd=\"$(DEBUGTESTNAME)\" args=\"\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"DebugUtils\" img=\"debug.png\" folder=\"true\"/>\n\t\t<action id=\"Debug\" menu=\"DebugUtils\" img=\"debug.png\" debug=\"true\" key=\"\" task=\"buildDebug;runDebug\" killold=\"true\"/>\n\t\t<action id=\"DebugTest\" menu=\"DebugUtils\" img=\"test.png\" debug=\"true\" key=\"\" task=\"buildDebugTest;runDebugTest\" killold=\"true\"/>\n\t\t<action id=\"Module\" img=\"module.png\" folder=\"true\"/>\n\t\t<action id=\"Go Module Tidy\" menu=\"Module\" img=\"tidy.png\" cmd=\"$(GO)\" args=\"mod tidy\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"Go Module Verify\" menu=\"Module\" img=\"ver.png\" cmd=\"$(GO)\" args=\"mod verify\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"Go Module Graph\" menu=\"Module\" img=\"graph.png\" cmd=\"$(GO)\" args=\"mod graph\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"Go Module Vendor\" menu=\"Module\" img=\"ver.png\" cmd=\"$(GO)\" args=\"mod vendor -v\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<target id=\"Target\" cmd=\"$(TARGETNAME)\" debug=\"$(DEBUGNAME)\" args=\"$(TARGETARGS)\" build=\"$(DEBUGDEBUGARGS)\" work=\"$(BUILD_DIR_PATH)\"/>\n\t</mime-type>\n</mime-info>\n"
  },
  {
    "path": "liteidex/deploy/litebuild/goplus.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n\t<mime-type type=\"text/x-goplus\" id=\"goplus tool\" work=\"$(BUILD_DIR_PATH)\" lock=\"dir\" ver=\"2\">\n\t\t<config id=\"gop\" name=\"GOP\" value=\"gop\"/>\n\t\t<config id=\"GoTools\" name=\"GOTOOLS\" value=\"$(LITEIDE_TOOL_PATH)/gotools\"/>\n\t\t<config id=\"ErrRegex\" name=\"ERRREGEX\" value=\"((?:[a-zA-Z]:)?[\\w\\d_@\\-\\\\\\/\\.]+):(\\d+)\\b\"/>\n\t\t<action id=\"Run\" img=\"run.png\" key=\"Ctrl+R\" cmd=\"$(GOP)\" args=\"run .\" output=\"true\" codec=\"utf-8\" save=\"all\" readline=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"FileRun\" img=\"filerun.png\" key=\"Shift+Alt+R\" cmd=\"$(GOP)\" args=\"run $(EDITOR_FILE_NAME)\" save=\"all\" output=\"true\" codec=\"utf-8\" readline=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"Build\" img=\"build.png\" key=\"Ctrl+B\" cmd=\"$(GOP)\" args=\"build .\" output=\"true\" codec=\"utf-8\" save=\"all\" readline=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"GenGo\" menu=\"\" img=\"get.png\" cmd=\"$(GOP)\" args=\"go .\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"Format\" menu=\"\" img=\"fmt.png\" cmd=\"$(GOP)\" args=\"fmt .\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t</mime-type>\n</mime-info>\n"
  },
  {
    "path": "liteidex/deploy/litebuild/gosrc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n\t<mime-type type=\"text/x-gosrc\" id=\"go tool\" work=\"$(BUILD_DIR_PATH)\" lock=\"dir\" ver=\"2\">\n\n\t\t<config id=\"Go\" name=\"GO\" value=\"go\"/>\n\t\t<config id=\"GoFmt\" name=\"GOFMT\" value=\"gofmt\"/>\n\t\t<config id=\"GoTools\" name=\"GOTOOLS\" value=\"$(LITEIDE_TOOL_PATH)/gotools\"/>\n\t\t<config id=\"ErrRegex\" name=\"ERRREGEX\" value=\"((?:[a-zA-Z]:)?[\\w\\d_@\\-\\\\\\/\\.]+):(\\d+)\\b\"/>\n\t\t<custom id=\"TargetBaseName\" name=\"TARGETBASENAME\" value=\"$(BUILD_DIR_NAME)\"/>\n\t\t<custom id=\"TargetName\" name = \"TARGETNAME\" value=\"$(BUILD_DIR_PATH)/$(TARGETBASENAME)$(GOEXE)\" readonly=\"true\" escaped=\"true\"/>\n\t\t<custom id=\"TargetArgs\" name=\"TARGETARGS\" value=\"\"/>\n\t\t<custom id=\"TargetWorkDir\" name = \"TARGTWORKDIR\" value=\"$(BUILD_DIR_PATH)\"/>\n\t\t<custom id=\"BuildFlags\" name=\"BUILDFLAGS\" value=\"\"/>\n\t\t<custom id=\"BuildArgs\" name=\"BUILDARGS\" value=\"\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"ForceBuildArgs\" name=\"FORCEBUILDARGS\" value=\"-a -v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"InstallArgs\" name=\"INSTALLARGS\" value=\"-v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"GetArgs\" name=\"GETARGS\" value=\"-v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"ForceGetArgs\" name=\"FORCEGETARGS\" value=\"-a -v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"UpdateGetArgs\" name=\"UPDATEGETARGS\" value=\"-u -v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"TestArgs\" name=\"TESTARGS\" value=\"-v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"BenchmarkArgs\" name=\"BENCHMARKARGS\" value=\"-test.bench=.* \" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"TestBuildArgs\" name=\"TESTBUILDARGS\" value=\"-c -gcflags &quot;-N -l&quot;\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"TestCoverArgs\" name=\"TESTCOVERARGS\" value=\"-coverprofile cover.out\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"ToolCoverArgs\" name=\"TOOLCOVERARGS\" value=\"-func=cover.out\"/>\n\t\t<custom id=\"ToolCoverHtmlArgs\" name=\"TOOLCOVERHTMLARGS\" value=\"-html=cover.out\"/>\n\t\t<custom id=\"VetArgs\" name=\"VETARGS\" value=\"-v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"ToolVetArgs\" name=\"TOOLVETARGS\" value=\"-all -v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"GenerateArgs\" name=\"GENERATEARGS\" value=\"-v\" shared-value=\"$(BUILDFLAGS)\"/>\n\t\t<custom id=\"GolintArgs\" name=\"GOLINTARGS\" value=\"-min_confidence=0.8\"/>\n\t\t<custom id=\"DebugName\" name = \"DEBUGNAME\" value=\"$(BUILD_DIR_PATH)/$(TARGETBASENAME).debug$(GOEXE)\" readonly=\"true\" escaped=\"true\"/>\n\t\t<custom id=\"DebugTestName\" name = \"DEBUGTESTNAME\" value=\"$(BUILD_DIR_PATH)/$(TARGETBASENAME).test$(GOEXE)\" readonly=\"true\" escaped=\"true\"/>\n\t\t<custom id=\"DebugWorkDir\" name = \"DEBUGWORKDIR\" value=\"$(TARGTWORKDIR)\"/>\n\t\t<custom id=\"DebugBuildArgs\" name = \"DEBUGBUILDARGS\" value=\"$(LITEIDE_DEBUG_GCFLAGS) -v -o $(DEBUGNAME)\"/>\n\t\t<custom id=\"DebugTestBuildArgs\" name=\"DEBUGTESTBUILDARGS\" value=\"$(LITEIDE_DEBUG_GCFLAGS) -c -o $(DEBUGTESTNAME)\"/>\n\t\t<custom id=\"Makefile\" name=\"MAKEFILE\" value=\"Makefile\" />\n\t\t<custom id=\"MakeArgs\" name=\"MAKEARGS\" value=\"\" />\n\t\t<action id=\"BuildAndRun\" img=\"buildrun.png\" key=\"Ctrl+R;Ctrl+F7\" task=\"Build;Run\" killold=\"true\"/>\n\t\t<action id=\"Run\" img=\"run.png\" key=\"Ctrl+Alt+R;Ctrl+F5\" cmd=\"$(TARGETNAME)\" args=\"$(TARGETARGS)\" output=\"true\" codec=\"utf-8\" readline=\"true\" work=\"$(TARGTWORKDIR)\"/>\n\t\t<action id=\"RunTerm\" img=\"runterm.png\" key=\"Ctrl+Shift+F5\" cmd=\"$(LITEIDE_EXEC)\" args=\"$(LITEIDE_EXECOPT) $(GOTOOLS) runcmd $(TARGETNAME) $(TARGETARGS)\" output=\"false\" readline=\"true\" work=\"$(TARGTWORKDIR)\"/>\n\t\t<action id=\"RunTerm\" os=\"macosx\" img=\"runterm.png\" key=\"Ctrl+Shift+F5\" cmd=\"/usr/bin/open\" args=\"$(TARGETNAME)\" output=\"false\" readline=\"true\" work=\"$(TARGTWORKDIR)\"/>\n\t\t<action id=\"FileRun\" img=\"filerun.png\" key=\"Shift+Alt+R;Alt+F6\" cmd=\"$(GO)\" args=\"run $(EDITOR_FILE_NAME)\" save=\"editor\" output=\"true\" codec=\"utf-8\" readline=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"Build\" img=\"build.png\" key=\"Ctrl+B;F7\" cmd=\"$(GO)\" args=\"build $(BUILDARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"ForceBuild\" img=\"rebuild.png\" menu=\"Build\" key=\"Ctrl+Alt+B\" cmd=\"$(GO)\" args=\"build $(FORCEBUILDARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"BuildAll\" img=\"buildall.png\" menu=\"Build\" key=\"\" cmd=\"$(GO)\" args=\"build -v ./...\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"FileBuild\" img=\"filebuild.png\" menu=\"Build\" key=\"Shift+Alt+B;Alt+F7\" cmd=\"$(GO)\" args=\"build $(EDITOR_FILE_NAME)\" save=\"editor\" output=\"true\" codec=\"utf-8\" readline=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"Install\" menu=\"Build\" img=\"install.png\" key=\"Ctrl+F8\" cmd=\"$(GO)\" args=\"install $(INSTALLARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"Clean\" menu=\"Build\" img=\"clean.png\" cmd=\"$(GO)\" args=\"clean\" save=\"all\" output=\"true\"/>\n\t\t<action id=\"CleanAll\" menu=\"Build\" img=\"cleanall.png\" cmd=\"$(GO)\" args=\"clean -i\" save=\"all\" output=\"true\"/>\n\t\t<action id=\"Get\" img=\"get.png\" cmd=\"$(GO)\" args=\"get $(GETARGS) .\" save=\"all\" output=\"true\" codec=\"utf-8\"/>\n\t\t<action id=\"Get Update Network\" menu=\"Get\" img=\"get.png\" cmd=\"$(GO)\" args=\"get $(UPDATEGETARGS) .\" save=\"all\" output=\"true\" codec=\"utf-8\"/>\n\t\t<action id=\"Get Force Rebuilding\" menu=\"Get\" img=\"reget.png\" cmd=\"$(GO)\" args=\"get $(FORCEGETARGS) .\" save=\"all\" output=\"true\" codec=\"utf-8\"/>\n\t\t<action id=\"Test\" img=\"test.png\" key = \"Ctrl+T\" cmd=\"$(GO)\" args=\"test $(TESTARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" takeall=\"true\" navigate=\"true\"/>\n\t\t<action id=\"FileTest\" menu=\"Test\" img=\"filetest.png\" key = \"Alt+T\" cmd=\"$(GOTOOLS)\" args=\"gotest -f $(EDITOR_FILE_NAME) $(TESTARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" takeall=\"true\" navigate=\"true\"/>\n\t\t<action id=\"TestAll\" menu=\"Test\" img=\"test.png\" key = \"Ctrl+Alt+T\" cmd=\"$(GO)\" args=\"test $(TESTARGS) ./...\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" takeall=\"true\" navigate=\"true\"/>\n\t\t<action id=\"TestBench\" menu=\"Test\" img=\"testbench.png\" cmd=\"$(GO)\" args=\"test $(BENCHMARKARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"TestBuild\" menu=\"Test\" img=\"buildtest.png\" cmd=\"$(GO)\" args=\"test $(TESTBUILDARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\"/>\n\t\t<action id=\"TestCover\" menu=\"Test\" img=\"testcover.png\" key=\"\" task=\"Cover;ToolCover\" killold=\"true\"/>\n\t\t<action id=\"TestCoverHtml\" menu=\"Test\" img=\"testcover.png\" key=\"\" task=\"Cover;ToolCoverHtml\" killold=\"true\"/>\n\t\t<action id=\"Cover\" menu=\"Test\" img=\"cover.png\" key = \"\" cmd=\"$(GO)\" args=\"test $(TESTCOVERARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"ToolCover\" menu=\"Test\" img=\"cover.png\" key = \"\" cmd=\"$(GO)\" args=\"tool cover $(TOOLCOVERARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"ToolCoverHtml\" menu=\"Test\" img=\"cover.png\" key = \"\" cmd=\"$(GO)\" args=\"tool cover $(TOOLCOVERHTMLARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"Utils\" folder=\"true\" img=\"utils.png\"/>\n\t\t<action id=\"GoFmt\" menu=\"Utils\" img=\"fmt.png\" cmd=\"$(GO)\" args=\"fmt\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"GoFmtAll\" menu=\"Utils\" img=\"fmt.png\" cmd=\"$(GOFMT)\" args=\"-l -w .\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"GoVet\" menu=\"Utils\" img=\"vet.png\" cmd=\"$(GO)\" args=\"vet $(VETARGS)\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"GoToolVet\" menu=\"Utils\" img=\"vet.png\" cmd=\"$(GO)\" args=\"tool vet $(TOOLVETARGS) .\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"GoGenerate\" menu=\"Utils\" img=\"get.png\" cmd=\"$(GO)\" args=\"generate $(GENERATEARGS)\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" takeall=\"true\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"GoLint\" menu=\"Utils\" img=\"lint.png\" cmd=\"golint\" args=\"$(GOLINTARGS) $(EDITOR_FILE_NAME)\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" takeall=\"true\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"Make\" key=\"\" menu=\"Utils\" img=\"module.png\" cmd=\"make\" args=\"-f $(MAKEFILE) $(MAKEARGS)\" save=\"editor\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" readline=\"true\" />\n\t\t<action id=\"buildDebug\" cmd=\"$(GO)\" args=\"build $(DEBUGBUILDARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"runDebug\" debug=\"true\" cmd=\"$(DEBUGNAME)\" args=\"$(TARGETARGS)\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(DEBUGWORKDIR)\"/>\n\t\t<action id=\"buildDebugTest\" cmd=\"$(GO)\" args=\"test $(DEBUGTESTBUILDARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"runDebugTest\" debug=\"true\" cmd=\"$(DEBUGTESTNAME)\" args=\"\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"DebugUtils\" img=\"debug.png\" folder=\"true\"/>\n\t\t<action id=\"Debug\" menu=\"DebugUtils\" img=\"debug.png\" debug=\"true\" key=\"\" task=\"buildDebug;runDebug\" killold=\"true\"/>\n\t\t<action id=\"DebugTest\" menu=\"DebugUtils\" img=\"test.png\" debug=\"true\" key=\"\" task=\"buildDebugTest;runDebugTest\" killold=\"true\"/>\n\t\t<action id=\"Module\" img=\"module.png\" folder=\"true\"/>\n\t\t<action id=\"Go Module Init\" menu=\"Module\" img=\"module.png\" cmd=\"$(GO)\" args=\"mod init $(BUILD_DIR_NAME)\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"Go Module Tidy\" menu=\"Module\" img=\"tidy.png\" cmd=\"$(GO)\" args=\"mod tidy\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"Go Module Verify\" menu=\"Module\" img=\"ver.png\" cmd=\"$(GO)\" args=\"mod verify\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"Go Module Graph\" menu=\"Module\" img=\"graph.png\" cmd=\"$(GO)\" args=\"mod graph\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<action id=\"Go Module Vendor\" menu=\"Module\" img=\"ver.png\" cmd=\"$(GO)\" args=\"mod vendor -v\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\" work=\"$(EDITOR_DIR_PATH)\"/>\n\t\t<target id=\"Target\" cmd=\"$(TARGETNAME)\" debug=\"$(DEBUGNAME)\" args=\"$(TARGETARGS)\" build=\"$(DEBUGDEBUGARGS)\" work=\"$(BUILD_DIR_PATH)\"/>\n\t</mime-type>\n</mime-info>\n"
  },
  {
    "path": "liteidex/deploy/litebuild/lua.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n\t<mime-type type=\"text/x-lua\" id=\"lua\" work=\"$(EDITOR_DIR_PATH)\" lock=\"file\" ver=\"2\">\n\t\t<config id=\"GoTools\" name=\"GOTOOLS\" value=\"$(LITEIDE_TOOL_PATH)/gotools\"/>\n\t\t<action id=\"Run\" key=\"Ctrl+R\" img=\"run.png\" cmd=\"lua\" args=\"-e io.stdout:setvbuf('no') $(EDITOR_FILE_NAME)\" save=\"editor\" output=\"true\" codec=\"utf-8\" regex=\"([\\w\\d:_\\-\\\\/\\.]+):(\\d+)\" readline=\"true\" />\n\t\t<action id=\"RunTerm\" key=\"Ctrl+Shift+F5\" img=\"runterm.png\" cmd=\"$(LITEIDE_EXEC)\" args=\"$(LITEIDE_EXECOPT) $(GOTOOLS) runcmd lua -e io.stdout:setvbuf(&quot;no&quot;) $(EDITOR_FILE_NAME)\" save=\"editor\" output=\"false\" readline=\"true\"/>\n\t</mime-type>\n</mime-info>"
  },
  {
    "path": "liteidex/deploy/litebuild/python.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n\t<mime-type type=\"text/x-python\" id=\"python\" work=\"$(EDITOR_DIR_PATH)\" lock=\"file\" ver=\"2\">\n    <config id=\"ErrRegex\" name=\"ERRREGEX\" value=\"\\&quot;([\\w\\.]+)\\&quot;\\,\\s*line\\s*(\\d+)\"/>\n\t\t<config id=\"GoTools\" name=\"GOTOOLS\" value=\"$(LITEIDE_TOOL_PATH)/gotools\"/>\n\t\t<custom id=\"python\" name=\"PYTHON\" value=\"python\"/>\n\t\t<custom id=\"TargetArgs\" name=\"TARGETARGS\" value=\"\"/>\t\t\n\t\t<action id=\"Run\" key=\"Ctrl+R\" img=\"run.png\" cmd=\"$(PYTHON)\" args=\"$(EDITOR_FILE_NAME) $(TARGETARGS)\" save=\"editor\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" readline=\"true\" />\n\t\t<action id=\"RunTerm\" key=\"Ctrl+Shift+F5\" img=\"runterm.png\" cmd=\"$(LITEIDE_EXEC)\" args=\"$(LITEIDE_EXECOPT) $(GOTOOLS) runcmd python $(EDITOR_FILE_NAME)\" save=\"editor\" output=\"false\" readline=\"true\"/>\n\t\t<action id=\"RunTerm\" os=\"macosx\" img=\"runterm.png\" key=\"Ctrl+Shift+F5\" cmd=\"/usr/bin/open\" args=\"-a Terminal $(EDITOR_FILE_NAME)\" output=\"false\" readline=\"true\"/>\n\t</mime-type>\n</mime-info>\n"
  },
  {
    "path": "liteidex/deploy/litebuild/qlang.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n\t<mime-type type=\"text/x-qlang\" id=\"qlang\" work=\"$(EDITOR_DIR_PATH)\" lock=\"file\" ver=\"2\">\n\t\t<config id=\"GoTools\" name=\"GOTOOLS\" value=\"$(LITEIDE_TOOL_PATH)/gotools\"/>\n\t\t<config id=\"qlang\" name=\"QLANG\" value=\"qlang\"/>\n\t\t<custom id=\"TargetArgs\" name=\"TARGETARGS\" value=\"\"/>\n\t\t<action id=\"Run\" key=\"Ctrl+R\" img=\"run.png\" cmd=\"$(QLANG)\" args=\"$(EDITOR_FILE_NAME) $(TARGETARGS)\" save=\"editor\" output=\"true\" codec=\"utf-8\" regex=\"([\\w\\d:_\\-\\\\/\\.]+):(\\d+)\" readline=\"true\" />\n\t\t<action id=\"RunTerm\" img=\"runterm.png\" key=\"Ctrl+Shift+F5\" cmd=\"$(LITEIDE_EXEC)\" args=\"$(LITEIDE_EXECOPT) $(GOTOOLS) runcmd $(QLANG) $(EDITOR_FILE_NAME) $(TARGETARGS)\" output=\"false\" readline=\"true\"/>\n\t\t<action id=\"RunTerm\" os=\"macosx\" img=\"runterm.png\" key=\"Ctrl+Shift+F5\" cmd=\"/usr/bin/open\" args=\"$(QLANG) $(EDITOR_FILE_NAME) $(TARGETARGS)\" output=\"false\" readline=\"true\"/>\n\t</mime-type>\n</mime-info>"
  },
  {
    "path": "liteidex/deploy/litebuild/rust.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n\t<mime-type type=\"text/x-rust\" id=\"rust cargo\" work=\"$(BUILD_DIR_PATH)\" lock=\"dir\" ver=\"2\">\n\t\t<config id=\"Rustc\" name=\"RUSTC\" value=\"rustc\"/>\n\t\t<config id=\"Cargo\" name=\"CARGO\" value=\"cargo\"/>\n\t\t<config id=\"GoTools\" name=\"GOTOOLS\" value=\"$(LITEIDE_TOOL_PATH)/gotools\"/>\n\t\t<config id=\"ErrRegex\" name=\"ERRREGEX\" value=\"((?:[a-zA-Z]:)?[\\w\\d_\\-\\\\\\/\\.]+):(\\d+)\\b\"/>\n\t\t<custom id=\"TargetArgs\" name=\"TARGETARGS\" value=\"\"/>\n\t\t<custom id=\"BuildArgs\" name=\"BUILDARGS\" value=\"\"/>\n\t\t<custom id=\"CleanArgs\" name=\"CLEANARGS\" value=\"\"/>\n\t\t<custom id=\"TestArgs\" name=\"TESTARGS\" value=\"\"/>\n\t\t<custom id=\"UpdateArgs\" name=\"UPDATEARGS\" value=\"\"/>\n\t\t<custom id=\"BenchmarkArgs\" name=\"BENCHMARKARGS\" value=\"\"/>\n\t\t<custom id=\"DocArgs\" name=\"DOCARGS\" value=\"\"/>\n\t\t<action id=\"BuildAndRun\" img=\"buildrun.png\" key=\"Ctrl+R;Ctrl+F7\" cmd=\"$(CARGO)\" args=\"run $(BUILDARGS) $(TARGETARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\" readline=\"true\"/>\n\t\t<action id=\"Build\" img=\"build.png\" key=\"Ctrl+B;F7\" cmd=\"$(CARGO)\" args=\"build $(BUILDARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"Clean\" img=\"clean.png\" key=\"\" cmd=\"$(CARGO)\" args=\"clean $(CLEANARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"Test\" img=\"test.png\" key=\"\" cmd=\"$(CARGO)\" args=\"test $(TESTARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"Bench\" img=\"testbench.png\" key=\"\" cmd=\"$(CARGO)\" args=\"bench $(BENCHMARKARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"Update\" img=\"update.png\" key=\"\" cmd=\"$(CARGO)\" args=\"update $(UPDATEARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t<action id=\"Doc\" img=\"doc.png\" key=\"\" cmd=\"$(CARGO)\" args=\"doc $(DOCARGS)\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t</mime-type>\n</mime-info>\n"
  },
  {
    "path": "liteidex/deploy/litebuild/tcl.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\r\n\t<mime-type type=\"text/x-tcl\" id=\"tcl\" work=\"$(EDITOR_DIR_PATH)\" lock=\"file\" ver=\"2\">\r\n    <config id=\"ErrRegex\" name=\"ERRREGEX\" value=\"file\\s*\\&quot;([\\w\\.]+)\\&quot;\\s*line\\s*(\\d+)\"/>\r\n\t\t<config id=\"GoTools\" name=\"GOTOOLS\" value=\"$(LITEIDE_TOOL_PATH)/gotools\"/>\r\n\t\t<custom id=\"tclsh\" name=\"TCLSH\" value=\"tclsh\"/>\r\n\t\t<custom id=\"wish\" name=\"WISH\" value=\"wish\"/>\r\n\t\t<custom id=\"TargetArgs\" name=\"TARGETARGS\" value=\"\"/>\t\t\r\n\t\t<action id=\"RunWish\" key=\"Ctrl+R\" img=\"run.png\" cmd=\"$(WISH)\" args=\"$(EDITOR_FILE_NAME) $(TARGETARGS)\" save=\"editor\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" readline=\"true\" />\r\n\t\t<action id=\"RunTclsh\" key=\"Ctrl+Shift+R\" img=\"runterm.png\" cmd=\"$(TCLSH)\" args=\"$(EDITOR_FILE_NAME) $(TARGETARGS)\" save=\"editor\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" readline=\"true\" />\r\n\t</mime-type>\r\n</mime-info>\r\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/carbon.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"carbon\">\n  <!--\n  Used by ArdanStudios\n  Improvements are welcome\n  Public Domain, Ardan Studios, 2014\n  -->\n  <style name=\"Text\" foreground=\"#efefef\" background=\"#282828\"/>\n  <style name=\"Extra\" foreground=\"#ffffff\" background=\"#303030\"/> \n  <style name=\"Selection\" background=\"#143a87\"/>\n  <style name=\"CurrentLine\" background=\"#555555\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#555555\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#555555\"/>\n  <style name=\"Keyword\" foreground=\"#fc9d4a\" bold=\"false\"/>\n  <style name=\"DataType\" foreground=\"#fc9d4a\" bold=\"false\" /> \n  <style name=\"Decimal\" foreground=\"#ffc874\" bold=\"false\"/>\n  <style name=\"BaseN\" foreground=\"#ffc874\" bold=\"false\"/>\n  <style name=\"Float\" foreground=\"#ffc874\" bold=\"false\"/>\n  <style name=\"Char\" foreground=\"#d6d5b3\"/>\n  <style name=\"String\" foreground=\"#d6d5b3\"/>\n  <style name=\"Comment\" foreground=\"#a1a1a1\" italic=\"true\"/>\n  <style name=\"Alert\" foreground=\"yellow\"/>\n  <style name=\"Error\" foreground=\"red\"/>\n  <style name=\"Function\" foreground=\"#ffffff\"/>\n  <style name=\"RegionMarker\" foreground=\"#ffffff\"/>\n  <style name=\"Symbol\" foreground=\"#a394cb\" bold=\"true\"/> \n  <style name=\"BuiltinFunc\" foreground=\"#fbebce\" bold=\"false\"/>\n  <style name=\"Predeclared\" foreground=\"#099\" bold=\"false\"/>\n  <style name=\"FuncDecl\" foreground=\"#fbebce\"/>\n  <style name=\"Placeholder\" foreground=\"#ffc874\"/>\n  <style name=\"ToDo\" foreground=\"#ffffff\" background=\"#666666\" bold=\"true\"/>\n</style-scheme>"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/clearday.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Default\">\n  <!-- clearday color scheme -->\n  <style name=\"Text\" foreground=\"#333333\" background=\"#ffffdd\"/>\n  <style name=\"Extra\" foreground=\"#008B8B\" background=\"\"/>\n  <style name=\"Selection\" foreground=\"#333333\" background=\"#b5d5ff\"/>\n  <style name=\"CurrentLine\" background=\"#cddbdb\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#008B8B\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#c0c0c0\"/>\n  <style name=\"Keyword\" foreground=\"#049695\"/>\n  <style name=\"DataType\" foreground=\"#4982c4\" /> \n  <style name=\"Decimal\" foreground=\"#800080\"/>\n  <style name=\"BaseN\" foreground=\"#800080\"/>\n  <style name=\"Float\" foreground=\"#800080\"/>\n  <style name=\"Char\" foreground=\"#800000\"/>\n  <style name=\"String\" foreground=\"#f57d00\"/>\n  <style name=\"Comment\" foreground=\"#008000\" />\n  <style name=\"Alert\" foreground=\"#ff0000\"/>\n  <style name=\"Error\" foreground=\"#ff0000\"/>\n  <style name=\"Function\" foreground=\"#3364a4\"/>\n  <style name=\"RegionMarker\" foreground=\"#333333\"/>\n  <style name=\"Symbol\" foreground=\"#3364a4\"/> \n  <style name=\"BuiltinFunc\" foreground=\"#3364a4\"/>\n  <style name=\"Predeclared\" foreground=\"#3364a4\"/>\n  <style name=\"FuncDecl\" foreground=\"#3364a4\"/>\n  <style name=\"Placeholder\" foreground=\"#008080\"/>\n  <style name=\"ToDo\" foreground=\"#006000\" background=\"#e0e0e0\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/cobalt black.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Cobalt (black)\">\n  <!-- Cobalt blue variation\n       vcrobe@gmail.com\n   -->\n  <style name=\"Text\" foreground=\"#bbbbbb\" background=\"#000000\"/>\n  <style name=\"Extra\" foreground=\"#008B8B\" background=\"#111111\"/>\n  <style name=\"Selection\" background=\"#505050\"/>\n  <style name=\"CurrentLine\" background=\"#252525\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#008B8B\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#c0c0c0\"/>\n  <style name=\"Keyword\" foreground=\"#ff9d04\" />\n  <style name=\"DataType\" foreground=\"#70ffaa\" /> \n  <style name=\"Decimal\" foreground=\"#00ffff\"/>\n  <style name=\"BaseN\" foreground=\"#ff55ff\"/>\n  <style name=\"Float\" foreground=\"#ff55ff\"/>\n  <style name=\"Char\" foreground=\"#55ff55\"/>\n  <style name=\"String\" foreground=\"#38d81b\"/>\n  <style name=\"Comment\" foreground=\"#0088ff\"/>\n  <style name=\"Alert\" foreground=\"#ff0000\"/>\n  <style name=\"Error\" foreground=\"#ffff55\"/>\n  <style name=\"Function\" foreground=\"#ffff55\"/>\n  <style name=\"RegionMarker\" foreground=\"#bbbbbb\"/>\n  <style name=\"Symbol\" foreground=\"#bbbbbb\"/>\n  <style name=\"BuiltinFunc\" foreground=\"#aa00aa\"/>\n  <style name=\"Predeclared\" foreground=\"#ff0040\"/>\n  <style name=\"FuncDecl\" foreground=\"#ffffff\"/>\n  <style name=\"Placeholder\" foreground=\"#a75454\"/>\n  <style name=\"ToDo\" foreground=\"#5555ff\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/cobalt blue.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Cobalt blue\">\n  <!-- \n       Based on the colors of Ubuntu's GEdit \n       vcrobe@gmail.com\n   -->\n  <style name=\"Text\" foreground=\"#bbbbbb\" background=\"#001b33\"/>\n  <style name=\"Extra\" foreground=\"#008B8B\" background=\"#111111\"/>\n  <style name=\"Selection\" background=\"#505050\"/>\n  <style name=\"CurrentLine\" background=\"#003B70\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#008B8B\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#c0c0c0\"/>\n  <style name=\"Keyword\" foreground=\"#ff9d04\"/>\n  <style name=\"DataType\" foreground=\"#80ffbb\" /> \n  <style name=\"Decimal\" foreground=\"#00ffff\"/>\n  <style name=\"BaseN\" foreground=\"#ff55ff\"/>\n  <style name=\"Float\" foreground=\"#ff55ff\"/>\n  <style name=\"Char\" foreground=\"#55ff55\"/>\n  <style name=\"String\" foreground=\"#38d81b\"/>\n  <style name=\"Comment\" foreground=\"#0088ff\"/>\n  <style name=\"Alert\" foreground=\"#ff0000\"/>\n  <style name=\"Error\" foreground=\"#ffff55\"/>\n  <style name=\"Function\" foreground=\"#ffff55\"/>\n  <style name=\"RegionMarker\" foreground=\"#bbbbbb\"/>\n  <style name=\"Symbol\" foreground=\"#bbbbbb\"/>\n  <style name=\"BuiltinFunc\" foreground=\"#aa00aa\"/>\n  <style name=\"Predeclared\" foreground=\"#ff0040\"/>\n  <style name=\"FuncDecl\" foreground=\"#ffffff\"/>\n  <style name=\"Placeholder\" foreground=\"#a75454\"/>\n  <style name=\"ToDo\" foreground=\"#5555ff\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/colorhelp.md",
    "content": "LiteIDE Color Scheme\n===================\n\n### item name\n\n* fb foreground,background\n* f foreground\n* b background\n\n**base color**\n\n\tText\t\t(fb)\n\tExtra\t\t(fb)\n\tSelection\t(fb)\n\tCurrentLine (b)\n\tIndentLine  (f)\n\n**kate color:** (f,bold,italic)\n\n\tVisualWhitespace\n\tKeyword\n\tDataType\n\tDecimal\n\tBaseN\n\tFloat\n\tChar\n\tString\n\tComment\n\tAlert\n\tError\n\tFunction\n\tRegionMarker\n\tSymbol\n\tBuiltinFunc\n\tPredeclared\n\tFuncDecl\n\tPlaceholder\n\tToDo\n\n### item attribute\n\n\tforeground\n\tbackground\n\tbold\n\titalic\n\n### item example\n\n\t<style name=\"Keyword\" foreground=\"#000000\" background=\"#ffffff\" bold=\"true\" italic=\"true\"/>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/dark-blue.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"dark\">\n<!--\nDark blue color scheme by qAison\nPublic Domain, 2021\n-->\n\t<style name=\"Text\" foreground=\"#dedcee\" background=\"#24292E\"/>\n\t<style name=\"Extra\" foreground=\"#3B9A9C\" background=\"#1F2428\"/>\n\t<style name=\"Selection\" background=\"#214283\"/>\n\t<style name=\"CurrentLine\" background=\"#3F3F3F\"/>\n\t<style name=\"MatchBrackets\" background=\"#808080\"/>\n\t<style name=\"IndentLine\" foreground=\"#008B8B\"/>\n\t<style name=\"VisualWhitespace\" foreground=\"#F92672\"/>\n\t<style name=\"Keyword\" foreground=\"#F8D267\" />\n\t<style name=\"DataType\" foreground=\"#FD971F\" bold=\"true\" />\n\t<style name=\"Decimal\" foreground=\"#D5A4CF\" />\n\t<style name=\"BaseN\" foreground=\"#0000FF\"/>\n\t<style name=\"Float\" foreground=\"#ff55ff\"/>\n\t<style name=\"Char\" foreground=\"#CE7DDB\"/>\n\t<style name=\"String\" foreground=\"#7EBC59\"/>\n\t<style name=\"Comment\" foreground=\"#7F848E\"/>\n\t<style name=\"Alert\" foreground=\"#ff0000\"/>\n\t<style name=\"Error\" foreground=\"#ff0000\"/>\n\t<style name=\"Function\" foreground=\"#41B6E6\"/>\n\t<style name=\"RegionMarker\" foreground=\"#F92672\"/>\n\t<style name=\"Symbol\" foreground=\"#F92672\"/>\n\t<style name=\"BuiltinFunc\" foreground=\"#AE81FF\" bold=\"true\"/>\n\t<style name=\"Predeclared\" foreground=\"#FF5F0E\" bold=\"true\" />\n\t<style name=\"FuncDecl\" foreground=\"#60C5BA\" />\n\t<style name=\"Placeholder\" foreground=\"#CC2E05\"/>\n\t<style name=\"ToDo\" foreground=\"#C7C7FF\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/dark-gray.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<style-scheme version=\"1.0\" name=\"dark\">\r\n<!--\r\nDark gray color scheme by qAison\r\nPublic Domain, 2020\r\n-->\r\n\t<style name=\"Text\" foreground=\"#dedcee\" background=\"#272822\"/>\r\n\t<style name=\"Extra\" foreground=\"#3B9A9C\" background=\"#272822\"/>\r\n\t<style name=\"Selection\" background=\"#214283\"/>\r\n\t<style name=\"CurrentLine\" background=\"#3F3F3F\"/>\r\n\t<style name=\"MatchBrackets\" background=\"#808080\"/>\r\n\t<style name=\"IndentLine\" foreground=\"#008B8B\"/>\r\n\t<style name=\"VisualWhitespace\" foreground=\"#F92672\"/>\r\n\t<style name=\"Keyword\" foreground=\"#F8D267\" />\r\n\t<style name=\"DataType\" foreground=\"#FD971F\" bold=\"true\" />\r\n\t<style name=\"Decimal\" foreground=\"#D5A4CF\" />\r\n\t<style name=\"BaseN\" foreground=\"#0000FF\"/>\r\n\t<style name=\"Float\" foreground=\"#ff55ff\"/>\r\n\t<style name=\"Char\" foreground=\"#CE7DDB\"/>\r\n\t<style name=\"String\" foreground=\"#7EBC59\"/>\r\n\t<style name=\"Comment\" foreground=\"#75715E\"/>\r\n\t<style name=\"Alert\" foreground=\"#ff0000\"/>\r\n\t<style name=\"Error\" foreground=\"#ff0000\"/>\r\n\t<style name=\"Function\" foreground=\"#41B6E6\"/>\r\n\t<style name=\"RegionMarker\" foreground=\"#F92672\"/> \r\n\t<style name=\"Symbol\" foreground=\"#F92672\"/>\r\n\t<style name=\"BuiltinFunc\" foreground=\"#AE81FF\" bold=\"true\"/> \r\n\t<style name=\"Predeclared\" foreground=\"#FF5F0E\" bold=\"true\" /> \r\n\t<style name=\"FuncDecl\" foreground=\"#60C5BA\" /> \r\n\t<style name=\"Placeholder\" foreground=\"#CC2E05\"/>\r\n\t<style name=\"ToDo\" foreground=\"#C7C7FF\" bold=\"true\"/>\r\n</style-scheme>\r\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/dark.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<style-scheme version=\"1.0\" name=\"dark\">\r\n\t<style name=\"Text\" foreground=\"#F8F8F2\" background=\"#000000\"/>\r\n\t<style name=\"Extra\" foreground=\"#008B8B\" background=\"#000000\"/>\r\n\t<style name=\"Selection\" background=\"#214283\"/>\r\n\t<style name=\"CurrentLine\" background=\"#212628\"/>\r\n\t<style name=\"MatchBrackets\" background=\"#808080\"/>\r\n\t<style name=\"IndentLine\" foreground=\"#008B8B\"/>\r\n\t<style name=\"VisualWhitespace\" foreground=\"#F92672\"/>\r\n\t<style name=\"Keyword\" foreground=\"#ffff55\" />\r\n\t<style name=\"DataType\" foreground=\"#FD971F\" bold=\"true\" />\r\n\t<style name=\"Decimal\" foreground=\"#4E81FF\" />\r\n\t<style name=\"BaseN\" foreground=\"#0000FF\"/>\r\n\t<style name=\"Float\" foreground=\"#ff55ff\"/>\r\n\t<style name=\"Char\" foreground=\"#CE7DDB\"/>\r\n\t<style name=\"String\" foreground=\"#66FF00\"/>\r\n\t<style name=\"Comment\" foreground=\"#808080\"/>\r\n\t<style name=\"Alert\" foreground=\"#ff0000\"/>\r\n\t<style name=\"Error\" foreground=\"#ff0000\"/>\r\n\t<style name=\"Function\" foreground=\"#55ffff\"/>\r\n\t<style name=\"RegionMarker\" foreground=\"#F92672\"/>\r\n\t<style name=\"Symbol\" foreground=\"#F92672\"/>\r\n\t<style name=\"BuiltinFunc\" foreground=\"#AE81FF\" bold=\"true\"/>\r\n\t<style name=\"Predeclared\" foreground=\"#FF5F0E\" bold=\"true\" />\r\n\t<style name=\"FuncDecl\" foreground=\"#55ffff\"/>\r\n\t<style name=\"Placeholder\" foreground=\"#CC2E05\"/>\r\n\t<style name=\"ToDo\" foreground=\"#C7C7FF\" bold=\"true\"/>\r\n</style-scheme>\r\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/darktango.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Tango (dark)\">\n  <!--\n  Based on the kib_darktango theme for emacs/vim\n  Improvements are welcome\n  Public Domain, Dumitru UNGUREANU, 2012\n  -->\n  <style name=\"Text\" foreground=\"#bbbbbb\" background=\"#2e3436\"/>\n  <style name=\"Extra\" foreground=\"#008B8B\" background=\"#2e3436\"/>\n  <style name=\"Selection\" background=\"#995511\"/>\n  <style name=\"CurrentLine\" background=\"#212628\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#008B8B\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#FF00DC\"/>\n  <style name=\"Keyword\" foreground=\"#f57900\"/>\n  <style name=\"DataType\" foreground=\"#FF00DC\" /> \n  <style name=\"Decimal\" foreground=\"#e9b96e\"/>\n  <style name=\"BaseN\" foreground=\"#e9b96e\"/>\n  <style name=\"Float\" foreground=\"#e9b96e\"/>\n  <style name=\"Char\" foreground=\"#72cf72\"/>\n  <style name=\"String\" foreground=\"#729fcf\"/>\n  <style name=\"Comment\" foreground=\"#edd400\"/>\n  <style name=\"Alert\" foreground=\"#ff0000\"/>\n  <style name=\"Error\" foreground=\"#ff0000\"/>\n  <style name=\"Function\" foreground=\"#f57900\"/>\n  <style name=\"RegionMarker\" foreground=\"#bbbbbb\"/>\n  <style name=\"Symbol\" foreground=\"#bbbbbb\"/>\n  <style name=\"BuiltinFunc\" foreground=\"#f57900\"/>\n  <style name=\"Predeclared\" foreground=\"#f57900\"/>\n  <style name=\"FuncDecl\" foreground=\"#bbbbbb\"/>\n  <style name=\"Placeholder\" foreground=\"#cf9fcf\"/>\n  <style name=\"ToDo\" foreground=\"#aaff00\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/darkvim.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Vim (dark)\">\n  <!--\n  Based on the default vim theme for a dark background, Linux console colors.\n  -->\n  <style name=\"Text\" foreground=\"#bbbbbb\" background=\"#000000\"/>\n  <style name=\"Extra\" foreground=\"#008B8B\" background=\"#000000\"/>\n  <style name=\"Selection\" background=\"#666666\"/>\n  <style name=\"CurrentLine\" background=\"#212628\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#008B8B\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#c0c0c0\"/>\n  <style name=\"Keyword\" foreground=\"#ffff55\"/>\n  <style name=\"DataType\" foreground=\"#55ff55\" /> \n  <style name=\"Decimal\" foreground=\"#800080\"/>\n  <style name=\"BaseN\" foreground=\"#ff55ff\"/>\n  <style name=\"Float\" foreground=\"#ff55ff\"/>\n  <style name=\"Char\" foreground=\"#ff0055\"/>\n  <style name=\"String\" foreground=\"#ff55ff\"/>\n  <style name=\"Comment\" foreground=\"#55ffff\"/>\n  <style name=\"Alert\" foreground=\"#ff0000\"/>\n  <style name=\"Error\" foreground=\"#ff0000\"/>\n  <style name=\"Function\" foreground=\"#ffff55\"/>\n  <style name=\"RegionMarker\" foreground=\"#bbbbbb\"/>\n  <style name=\"Symbol\" foreground=\"#bbbbbb\"/>  \n  <style name=\"BuiltinFunc\" foreground=\"#ffff55\"/>\n  <style name=\"Predeclared\" foreground=\"#ffff55\"/>\n  <style name=\"FuncDecl\" foreground=\"#bbbbbb\"/>\n  <style name=\"Placeholder\" foreground=\"#55ff55\"/>\n  <style name=\"ToDo\" foreground=\"#5555ff\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/default-func.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Default\">\n  <!-- default color scheme -->\n  <style name=\"Text\" foreground=\"#000000\" background=\"#ffffff\"/>\n  <style name=\"Extra\" foreground=\"#008B8B\" background=\"\"/>\n  <style name=\"Selection\" background=\"#3399FF\"/>\n  <style name=\"CurrentLine\" background=\"#B4C8C8\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#008B8B\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#c0c0c0\"/>\n  <style name=\"Keyword\" foreground=\"#000080\" bold=\"true\"/>\n  <style name=\"DataType\" foreground=\"#000080\" /> \n  <style name=\"Decimal\" foreground=\"#800080\"/>\n  <style name=\"BaseN\" foreground=\"#800080\"/>\n  <style name=\"Float\" foreground=\"#800080\"/>\n  <style name=\"Char\" foreground=\"#800000\"/>\n  <style name=\"String\" foreground=\"#008000\"/>\n  <style name=\"Comment\" foreground=\"#008000\"/>\n  <style name=\"Alert\" foreground=\"#ff0000\"/>\n  <style name=\"Error\" foreground=\"#ff0000\"/>\n  <style name=\"Function\" foreground=\"#000080\"/>\n  <style name=\"RegionMarker\" foreground=\"#000000\"/>\n  <style name=\"Symbol\" foreground=\"#000000\"/> \n  <style name=\"BuiltinFunc\" foreground=\"#000080\"/>\n  <style name=\"Predeclared\" foreground=\"#000080\"/>\n  <style name=\"FuncDecl\" foreground=\"#000080\"/>\n  <style name=\"Placeholder\" foreground=\"#008080\"/>\n  <style name=\"ToDo\" foreground=\"#006000\" background=\"#e0e0e0\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/default.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Default\">\n  <!-- default color scheme -->\n  <style name=\"Text\" foreground=\"#000000\" background=\"#ffffff\"/>\n  <style name=\"Extra\" foreground=\"#008B8B\" background=\"\"/>\n  <style name=\"Selection\" background=\"#3399FF\"/>\n  <style name=\"CurrentLine\" background=\"#B4C8C8\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#008B8B\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#c0c0c0\"/>\n  <style name=\"Keyword\" foreground=\"#000080\" bold=\"true\"/>\n  <style name=\"DataType\" foreground=\"#000080\" /> \n  <style name=\"Decimal\" foreground=\"#800080\"/>\n  <style name=\"BaseN\" foreground=\"#800080\"/>\n  <style name=\"Float\" foreground=\"#800080\"/>\n  <style name=\"Char\" foreground=\"#800000\"/>\n  <style name=\"String\" foreground=\"#008000\"/>\n  <style name=\"Comment\" foreground=\"#008000\"/>\n  <style name=\"Alert\" foreground=\"#ff0000\"/>\n  <style name=\"Error\" foreground=\"#ff0000\"/>\n  <style name=\"Function\" foreground=\"#000000\"/>\n  <style name=\"RegionMarker\" foreground=\"#000000\"/>\n  <style name=\"Symbol\" foreground=\"#000000\"/> \n  <style name=\"BuiltinFunc\" foreground=\"#000080\"/>\n  <style name=\"Predeclared\" foreground=\"#000080\"/>\n  <style name=\"FuncDecl\" foreground=\"#000000\"/>\n  <style name=\"Placeholder\" foreground=\"#008080\"/>\n  <style name=\"ToDo\" foreground=\"#006000\" background=\"#e0e0e0\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/detroit-future.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Detroit Future\">\n  <!-- \n  \n    Detroit Future\n    github.com/donuts-are-good\n    (MIT License)\n  \n  -->\n  <style name=\"Text\" foreground=\"#5d31ed\" background=\"#000000\"/>\n  <style name=\"Extra\" foreground=\"#2A0F52\" background=\"#000000\"/>\n  <style name=\"Selection\" foreground=\"#ffee52\" background=\"#2A0F52\"/>\n  <style name=\"CurrentLine\" background=\"#2A0F52\"/>\n  <style name=\"MatchBrackets\" background=\"#2A0F52\"/>\n  <style name=\"IndentLine\" foreground=\"#2A0F52\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#2A0F52\"/>\n  <style name=\"Keyword\" foreground=\"#14CBD9\" />\n  <style name=\"DataType\" foreground=\"#70ffaa\" /> \n  <style name=\"Decimal\" foreground=\"#00ffff\"/>\n  <style name=\"BaseN\" foreground=\"#ff55ff\"/>\n  <style name=\"Float\" foreground=\"#ff55ff\"/>\n  <style name=\"Char\" foreground=\"#55ff55\"/>\n  <style name=\"String\" foreground=\"#23F4AE\"/>\n  <style name=\"Comment\" foreground=\"#421882\"/>\n  <style name=\"Alert\" foreground=\"#ff0040\"/>\n  <style name=\"Error\" foreground=\"#ffff55\"/>\n  <style name=\"Function\" foreground=\"#8871f7\"/>\n  <style name=\"RegionMarker\" foreground=\"#bb33ee\"/>\n  <style name=\"Symbol\" foreground=\"#DCCBF6\"/>\n  <style name=\"BuiltinFunc\" foreground=\"#aa00aa\"/>\n  <style name=\"Predeclared\" foreground=\"#ff0040\"/>\n  <style name=\"FuncDecl\" foreground=\"#8871f7\"/>\n  <style name=\"Placeholder\" foreground=\"#421882\"/>\n  <style name=\"ToDo\" foreground=\"#ff5500\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/evilworks.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"evilworks\">\n  <!-- \n    Style by evilworks, 2012-2013. pollux@lavabit.com\n    This file is Public Domain.\n  -->\n  <style name=\"Alert\" foreground=\"#FF0000\"/>\n  <style name=\"BaseN\" foreground=\"#FFAA00\"/>\n  <style name=\"BuiltinFunc\" foreground=\"#80FFFF\"/>\n  <style name=\"Char\" foreground=\"#EAFF00\"/>\n  <style name=\"Comment\" foreground=\"#00FF00\"/>\n  <style name=\"CurrentLine\" background=\"#333333\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"DataType\" foreground=\"#FF00FF\" bold=\"true\"/> \n  <style name=\"Decimal\" foreground=\"#FFAA00\"/>\n  <style name=\"Error\" foreground=\"#FF0000\" bold=\"true\"/>\n  <style name=\"Extra\" foreground=\"#FFFFFF\" background=\"#222222\"/>\n  <style name=\"Float\" foreground=\"#FFAA00\"/>\n  <style name=\"FuncDecl\" foreground=\"#FFFFFF\"/>\n  <style name=\"Function\" foreground=\"#80FFFF\"/>\n  <style name=\"InactiveSelection\" foreground=\"#808000\" background=\"#602020\"/>\n  <style name=\"IndentLine\" foreground=\"#64B1FF\"/>\n  <style name=\"Keyword\" foreground=\"#64B1FF\" bold=\"true\"/>\n  <style name=\"Number\" foreground=\"#64B1FF\"/>\n  <style name=\"Placeholder\" foreground=\"#EAFF00\"/>\n  <style name=\"Predeclared\" foreground=\"#FF00FF\" bold=\"true\"/>\n  <style name=\"RegionMarker\" foreground=\"#FF0000\"/>\n  <style name=\"Selection\" foreground=\"#FFFF00\" background=\"#800000\"/>\n  <style name=\"String\" foreground=\"#EAFF00\"/>\n  <style name=\"Symbol\" foreground=\"#FF0000\" bold=\"true\"/>\n  <style name=\"Text\" foreground=\"#FFFFFF\" background=\"#000000\"/>\n  <style name=\"ToDo\" foreground=\"#000000\" background=\"#00FF00\" bold=\"true\" italic=\"true\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#FFFFFF\" background=\"#0000000\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/gist-github.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Gist Github\">\n  <!--\n  Based on Gist Github\n  Improvements are welcome\n  Public Domain, Ardan Studios, 2014\n\tf8f8ff\n  -->\n  <style name=\"Text\" foreground=\"#000000\" background=\"#ffffff\"/>\n  <style name=\"Extra\" foreground=\"#008B8B\" background=\"\"/>\n  <style name=\"Selection\" background=\"#ADD6FF\"/>\n  <style name=\"CurrentLine\" background=\"#B4C8C8\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#008B8B\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#f57900\"/>\n  <style name=\"Keyword\" foreground=\"#a71d5d\" bold=\"true\"/>\n  <style name=\"DataType\" foreground=\"#A71D5D\" bold=\"true\" /> \n  <style name=\"Decimal\" foreground=\"#0086B3\" bold=\"true\"/>\n  <style name=\"BaseN\" foreground=\"#099\" bold=\"true\"/>\n  <style name=\"Float\" foreground=\"#099\" bold=\"true\"/>\n  <style name=\"Char\" foreground=\"#d14\"/>\n  <style name=\"String\" foreground=\"#DF5000\"/>\n  <style name=\"Comment\" foreground=\"#7a7a6c\" italic=\"true\"/>\n  <style name=\"Alert\" foreground=\"#ff0000\"/>\n  <style name=\"Error\" foreground=\"#ff0000\"/>\n  <style name=\"Function\" foreground=\"#000000\"/>\n  <style name=\"RegionMarker\" foreground=\"#000000\"/>\n  <style name=\"Symbol\" foreground=\"#000000\"/> \n  <style name=\"BuiltinFunc\" foreground=\"#644A9B\" bold=\"true\"/>\n  <style name=\"Predeclared\" foreground=\"#0086B3\" bold=\"true\"/>\n  <style name=\"FuncDecl\" foreground=\"#795DA3\"/>\n  <style name=\"Placeholder\" foreground=\"#d14\"/>\n  <style name=\"ToDo\" foreground=\"#006000\" background=\"#e0e0e0\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/highcontrastdark.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Default\">\n  <style name=\"Text\" foreground=\"#FFFFFF\" background=\"#000000\"/>\n  <style name=\"Selection\" background=\"#800000\"/>\n  <style name=\"Extra\" foreground=\"#FFFFFF\" background=\"#222222\"/>\n  <style name=\"CurrentLine\" background=\"#222222\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#64B1FF\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#FFFFFF\"/>\n  <style name=\"Keyword\" foreground=\"#64B1FF\" bold=\"true\"/>\n  <style name=\"DataType\" foreground=\"#FF00FF\" /> \n  <style name=\"Decimal\" foreground=\"#64B1FF\"/>\n  <style name=\"BaseN\" foreground=\"#64B1FF\"/>\n  <style name=\"Float\" foreground=\"#64B1FF\"/>\n  <style name=\"Char\" foreground=\"#FF7700\"/>\n  <style name=\"String\" foreground=\"#FFFF00\"/>\n  <style name=\"Comment\" foreground=\"#00FF00\"/>\n  <style name=\"Alert\" foreground=\"#ff0000\"/>\n  <style name=\"Error\" foreground=\"#ff0000\"/>\n  <style name=\"Function\" foreground=\"#FF8000\"/>\n  <style name=\"RegionMarker\" foreground=\"#FF0000\"/>\n  <style name=\"Symbol\" foreground=\"#FF0000\"/>\n  <style name=\"BuiltinFunc\" foreground=\"#FF8000\"/>\n  <style name=\"Predeclared\" foreground=\"#FF8000\"/>\n  <style name=\"FuncDecl\" foreground=\"#FF8000\"/>\n  <style name=\"Placeholder\" foreground=\"#00FFFF\"/>\n  <style name=\"ToDo\" foreground=\"#FF00FF\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/one-dark.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<style-scheme version=\"1.0\" name=\"One Dark\">\r\n  <!--\r\n  <    One Dark - https://github.com/atom/one-dark-ui\r\n  <\r\n  <    Author: Lofanmi - https://github.com/Lofanmi\r\n  <    MIT License\r\n  -->\r\n  <style name=\"Text\" foreground=\"#B9B9B9\" background=\"#282C34\" />\r\n  <style name=\"Extra\" foreground=\"#495162\" background=\"#282C34\" />\r\n  <style name=\"Selection\" background=\"#404859\" />\r\n  <style name=\"CurrentLine\" background=\"#495162\" />\r\n  <style name=\"MatchBrackets\" background=\"#495162\" />\r\n  <style name=\"IndentLine\" foreground=\"#495162\" />\r\n  <style name=\"VisualWhitespace\" foreground=\"#495162\" />\r\n  <style name=\"Keyword\" foreground=\"#C678DD\" />\r\n  <style name=\"DataType\" foreground=\"#E5C07B\" />\r\n  <style name=\"Decimal\" foreground=\"#CD9765\" />\r\n  <style name=\"BaseN\" foreground=\"#CD9765\" />\r\n  <style name=\"Float\" foreground=\"#CD9765\" />\r\n  <style name=\"Char\" foreground=\"#98C379\" />\r\n  <style name=\"String\" foreground=\"#98C379\" />\r\n  <style name=\"Comment\" foreground=\"#555C69\" />\r\n  <style name=\"Alert\" foreground=\"#E5C07B\" />\r\n  <style name=\"Error\" foreground=\"#E06C75\" />\r\n  <style name=\"Function\" foreground=\"#61AFEF\" />\r\n  <style name=\"RegionMarker\" foreground=\"#B9B9B9\" />\r\n  <style name=\"Symbol\" foreground=\"#DCCBF6\" />\r\n  <style name=\"BuiltinFunc\" foreground=\"#61AFEF\" />\r\n  <style name=\"Predeclared\" foreground=\"#E5C07B\" />\r\n  <style name=\"FuncDecl\" foreground=\"#61AFEF\" />\r\n  <style name=\"Placeholder\" foreground=\"#555C69\" />\r\n  <style name=\"ToDo\" foreground=\"#FE8C00\" bold=\"true\" />\r\n</style-scheme>\r\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/railscast.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Railscast\">\n  <!--\n  Based on the railscast theme for emacs/vim\n  Improvements are welcome\n  Public Domain, Alexander Rødseth, 2012\n  -->\n  <style name=\"Text\" foreground=\"#bbbbbb\" background=\"#232323\"/>\n  <style name=\"Extra\" foreground=\"#008B8B\" background=\"#232323\"/>\n  <style name=\"Selection\" background=\"#555577\"/>\n  <style name=\"CurrentLine\" background=\"#000000\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#008B8B\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#c0c0c0\"/>\n  <style name=\"Keyword\" foreground=\"#cc7833\"/>\n  <style name=\"DataType\" foreground=\"#white\" /> \n  <style name=\"Decimal\" foreground=\"#6d9cbe\"/>\n  <style name=\"BaseN\" foreground=\"#6d9cbe\"/>\n  <style name=\"Float\" foreground=\"#6d9cbe\"/>\n  <style name=\"Char\" foreground=\"#55c2bb\"/>\n  <style name=\"String\" foreground=\"#a5c261\"/>\n  <style name=\"Comment\" foreground=\"#bc9458\"/>\n  <style name=\"Alert\" foreground=\"#ff0000\"/>\n  <style name=\"Error\" foreground=\"#ff0000\"/>\n  <style name=\"Function\" foreground=\"#ffc66d\"/>\n  <style name=\"RegionMarker\" foreground=\"#bbbbbb\"/>\n  <style name=\"Symbol\" foreground=\"#bbbbbb\"/>  \n  <style name=\"BuiltinFunc\" foreground=\"#ffc66d\"/>\n  <style name=\"Predeclared\" foreground=\"#ffc66d\"/>\n  <style name=\"FuncDecl\" foreground=\"#bbbbbb\"/>\n  <style name=\"Placeholder\" foreground=\"#c261c2\"/>\n  <style name=\"ToDo\" foreground=\"#ff5523\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/solarized-dark.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Solarized-Dark\">\n        <!-- Based on the Solarized color scheme by Ethan Schoonover:\n             http://ethanschoonover.com/solarized                     -->\n  <style name=\"Text\" foreground=\"#839496\" background=\"#002b36\"/>\n  <style name=\"Extra\" foreground=\"#839496\" background=\"#073642\"/>\n  <style name=\"Selection\" background=\"#77ddff\"/>\n  <style name=\"CurrentLine\" background=\"#002b36\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#008B8B\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#c0c0c0\"/>\n  <style name=\"Keyword\" foreground=\"#cb4b16\"/>\n  <style name=\"DataType\" foreground=\"#b58900\" /> \n  <style name=\"Decimal\" foreground=\"#268bd2\"/>\n  <style name=\"BaseN\" foreground=\"#268bd2\"/>\n  <style name=\"Float\" foreground=\"#268bd2\"/>\n  <style name=\"Char\" foreground=\"#a17b2a\"/>\n  <style name=\"String\" foreground=\"#2aa198\"/>\n  <style name=\"Comment\" foreground=\"#586e75\"/>\n  <style name=\"Alert\" foreground=\"#ff0000\"/>\n  <style name=\"Error\" foreground=\"#dc322f\"/>\n  <style name=\"Function\" foreground=\"#859900\"/>\n  <style name=\"RegionMarker\" foreground=\"#839496\"/>\n  <style name=\"Symbol\" foreground=\"#839496\"/>   \n  <style name=\"BuiltinFunc\" foreground=\"#859900\"/>\n  <style name=\"Predeclared\" foreground=\"#859900\"/>\n  <style name=\"FuncDecl\" foreground=\"#839496\"/>\n  <style name=\"Placeholder\" foreground=\"#a165a1\"/>\n  <style name=\"ToDo\" foreground=\"#536161\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/solarized-light.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Solarized-Light\">\n\t<!-- Based on the Solarized color scheme by Ethan Schoonover:\n\t     http://ethanschoonover.com/solarized                     -->\n  <style name=\"Text\" foreground=\"#657b83\" background=\"#fdf6e3\"/>\n  <style name=\"Extra\" foreground=\"#657b83\" background=\"#eee8d5\"/>\n  <style name=\"Selection\" background=\"#3399ff\"/>\n  <style name=\"CurrentLine\" background=\"#B4C8C8\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#008B8B\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#c0c0c0\"/>\n  <style name=\"Keyword\" foreground=\"#cb4b16\"/>\n  <style name=\"DataType\" foreground=\"#b58900\" /> \n  <style name=\"Decimal\" foreground=\"#268bd2\"/>\n  <style name=\"BaseN\" foreground=\"#268bd2\"/>\n  <style name=\"Float\" foreground=\"#268bd2\"/>\n  <style name=\"Char\" foreground=\"#a17b2a\"/>\n  <style name=\"String\" foreground=\"#2aa198\"/>\n  <style name=\"Comment\" foreground=\"#93a1a1\"/>\n  <style name=\"Alert\" foreground=\"#ff0000\"/>\n  <style name=\"Error\" foreground=\"#dc322f\"/>\n  <style name=\"Function\" foreground=\"#859900\"/>\n  <style name=\"RegionMarker\" foreground=\"#657b83\"/>\n  <style name=\"Symbol\" foreground=\"#657b83\"/>   \n  <style name=\"BuiltinFunc\" foreground=\"#859900\"/>\n  <style name=\"Predeclared\" foreground=\"#859900\"/>\n  <style name=\"FuncDecl\" foreground=\"#657b83\"/>\n  <style name=\"Placeholder\" foreground=\"#a165a1\"/>\n  <style name=\"ToDo\" foreground=\"#536161\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/solarsooty.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Solar Sooty\">\n  <!--\n  Based on Solar Sooty\n  Improvements are welcome\n  Public Domain, Unknown, 2014\n  -->\n  <style name=\"Text\" foreground=\"#F8F8F2\" background=\"#111\"/>\n  <style name=\"Extra\" foreground=\"#008B8B\" background=\"\"/>\n  <style name=\"Selection\" background=\"#2D5D2D\"/>\n  <style name=\"CurrentLine\" background=\"#2D2D2D\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#008B8B\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#f57900\"/>\n  <style name=\"Keyword\" foreground=\"#EC7600\" bold=\"false\"/>\n  <style name=\"DataType\" foreground=\"#2aa2d4\" /> \n  <style name=\"Decimal\" foreground=\"#AE81FF\"/>\n  <style name=\"BaseN\" foreground=\"#FFFFFF\"/>\n  <style name=\"Float\" foreground=\"#FFFFFF\"/>\n  <style name=\"Char\" foreground=\"#a5120b\"/>\n  <style name=\"String\" foreground=\"#F3E87E\"/>\n  <style name=\"Comment\" foreground=\"#999999\"/>\n  <style name=\"Alert\" foreground=\"#ff0000\"/>\n  <style name=\"Error\" foreground=\"#ff0000\"/>\n  <style name=\"Function\" foreground=\"#A6E22E\"/>\n  <style name=\"RegionMarker\" foreground=\"#AE81FF\"/>\n  <style name=\"Symbol\" foreground=\"#FFFFFF\"/> \n  <style name=\"BuiltinFunc\" foreground=\"#AE81FF\"/>\n  <style name=\"Predeclared\" foreground=\"#3085c6\"/>\n  <style name=\"FuncDecl\" foreground=\"#A6E22E\"/>\n  <style name=\"Placeholder\" foreground=\"#a5120b\"/>\n  <style name=\"ToDo\" foreground=\"#006000\" background=\"#e0e0e0\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/sublime-bold.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Sublime Text 2 bold\">\n  <!--\n  Based on the Sublime Text2 theme for liteide\n  Improvements are welcome\n  Public Domain, Henson Lu, 2012\n  -->\n  <style name=\"Text\" foreground=\"#ffffff\" background=\"#272822\"/>\n  <style name=\"Extra\" foreground=\"#90908A\" background=\"#272822\"/>\n  <style name=\"Selection\" background=\"#775511\"/>\n  <style name=\"CurrentLine\" background=\"#333333\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#008B8B\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#c0c0c0\"/>\n  <style name=\"Keyword\" foreground=\"#f92672\" bold=\"true\"/>\n  <style name=\"DataType\" foreground=\"#64b72d\" /> \n  <style name=\"Decimal\" foreground=\"#e6db74\" bold=\"true\"/>\n  <style name=\"BaseN\" foreground=\"#e6db74\" bold=\"true\"/>\n  <style name=\"Float\" foreground=\"#e6db74\" bold=\"true\"/>\n  <style name=\"Char\" foreground=\"#e2a32e\" bold=\"true\"/>\n  <style name=\"String\" foreground=\"#a3e22e\" bold=\"true\"/>\n  <style name=\"Comment\" foreground=\"#729fcf\"/>\n  <style name=\"Alert\" foreground=\"#ff0000\"/>\n  <style name=\"Error\" foreground=\"#ff0000\"/>\n  <style name=\"Function\" foreground=\"#4cb8e3\"/>\n  <style name=\"RegionMarker\" foreground=\"#ffffff\"/>\n  <style name=\"Symbol\" foreground=\"#ffffff\"/>     \n  <style name=\"BuiltinFunc\" foreground=\"#4cb8e3\" bold=\"true\"/>\n  <style name=\"Predeclared\" foreground=\"#4cb8e3\"/>\n  <style name=\"FuncDecl\" foreground=\"#4cb8e3\"/>\n  <style name=\"Placeholder\" foreground=\"#e274e2\"/>\n  <style name=\"ToDo\" foreground=\"#7272ff\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/sublime.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Sublime Text 2\">\n  <!--\n  Based on the Sublime Text2 theme for liteide\n  Improvements are welcome\n  Public Domain, Henson Lu, 2012\n  -->\n  <style name=\"Text\" foreground=\"#ffffff\" background=\"#272822\"/>\n  <style name=\"Extra\" foreground=\"#90908A\" background=\"#272822\"/>\n  <style name=\"Selection\" background=\"#775511\"/>\n  <style name=\"CurrentLine\" background=\"#333333\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#008B8B\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#c0c0c0\"/>\n  <style name=\"Keyword\" foreground=\"#f92672\"/>\n  <style name=\"DataType\" foreground=\"#64b72d\" /> \n  <style name=\"Decimal\" foreground=\"#e6db74\"/>\n  <style name=\"BaseN\" foreground=\"#e6db74\"/>\n  <style name=\"Float\" foreground=\"#e6db74\"/>\n  <style name=\"Char\" foreground=\"#e2a32e\"/>\n  <style name=\"String\" foreground=\"#a3e22e\"/>\n  <style name=\"Comment\" foreground=\"#729fcf\"/>\n  <style name=\"Alert\" foreground=\"#ff0000\"/>\n  <style name=\"Error\" foreground=\"#ff0000\"/>\n  <style name=\"Function\" foreground=\"#4cb8e3\"/>\n  <style name=\"RegionMarker\" foreground=\"#ffffff\"/>\n  <style name=\"Symbol\" foreground=\"#ffffff\"/>       \n  <style name=\"BuiltinFunc\" foreground=\"#4cb8e3\"/>\n  <style name=\"Predeclared\" foreground=\"#4cb8e3\"/>\n  <style name=\"FuncDecl\" foreground=\"#4cb8e3\"/>\n  <style name=\"Placeholder\" foreground=\"#e274e2\"/>\n  <style name=\"ToDo\" foreground=\"#7272ff\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/color/visualstudio.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<style-scheme version=\"1.0\" name=\"Visual Studio\">\n  <!--\n  Based on Visual Studio\n  Improvements are welcome\n  Public Domain, Ardan Studios, 2013\n  -->\n  <style name=\"Text\" foreground=\"#000000\" background=\"#f2f2f2\"/>\n  <style name=\"Extra\" foreground=\"#008B8B\" background=\"\"/>\n  <style name=\"Selection\" background=\"#ADD6FF\"/>\n  <style name=\"CurrentLine\" background=\"#B4C8C8\"/>\n  <style name=\"MatchBrackets\" background=\"#808080\"/>\n  <style name=\"IndentLine\" foreground=\"#008B8B\"/>\n  <style name=\"VisualWhitespace\" foreground=\"#f57900\"/>\n  <style name=\"Keyword\" foreground=\"#0000ff\" bold=\"false\"/>\n  <style name=\"DataType\" foreground=\"#2aa2d4\" /> \n  <style name=\"Decimal\" foreground=\"#000000\"/>\n  <style name=\"BaseN\" foreground=\"#000000\"/>\n  <style name=\"Float\" foreground=\"#000000\"/>\n  <style name=\"Char\" foreground=\"#a5120b\"/>\n  <style name=\"String\" foreground=\"#a5120b\"/>\n  <style name=\"Comment\" foreground=\"#008000\"/>\n  <style name=\"Alert\" foreground=\"#ff0000\"/>\n  <style name=\"Error\" foreground=\"#ff0000\"/>\n  <style name=\"Function\" foreground=\"#f57900\"/>\n  <style name=\"RegionMarker\" foreground=\"#000000\"/>\n  <style name=\"Symbol\" foreground=\"#000000\"/> \n  <style name=\"BuiltinFunc\" foreground=\"#3085c6\"/>\n  <style name=\"Predeclared\" foreground=\"#3085c6\"/>\n  <style name=\"FuncDecl\" foreground=\"#000000\"/>\n  <style name=\"Placeholder\" foreground=\"#a5120b\"/>\n  <style name=\"ToDo\" foreground=\"#006000\" background=\"#e0e0e0\" bold=\"true\"/>\n</style-scheme>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/alert.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<!--\n  This file is part of KDE's kate project.\n\n  copyright   : (C) 2004 by Dominik Haumann\n  email       : dhdev at gmx dot de\n\n **********************************************************************\n * This library is free software; you can redistribute it and/or      *\n * modify it under the terms of the GNU Library General Public        *\n * License as published by the Free Software Foundation; either       *\n * version 2 of the License, or (at your option) any later version.   *\n *                                                                    *\n * This library is distributed in the hope that it will be useful,    *\n * but WITHOUT ANY WARRANTY; without even the implied warranty of     *\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  *\n * Library General Public License for more details.                   *\n *                                                                    *\n * You should have received a copy of the GNU Library General Public  *\n * License along with this library; if not, write to the              *\n * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,   *\n * Boston, MA  02110-1301, USA.                                       *\n **********************************************************************\n\n This file is included in every file that highlights the \"alerts\" keywords.\n That's why extensions and mimetype are empty.\n\n Changes by Alex Turbov:\n  Introduce 3 alert levels and sort keywords according importance.\n  Few more keywords has been added.\n-->\n<language version=\"1.11\" kateversion=\"3.1\" name=\"Alerts\" section=\"Other\" extensions=\"\" mimetype=\"\" author=\"Dominik Haumann (dhdev@gmx.de)\" license=\"LGPL\" hidden=\"true\">\n  <highlighting>\n    <list name=\"alerts_hi\">\n      <item> ALERT </item>\n      <item> ATTENTION </item>\n      <item> DANGER </item>\n      <item> HACK </item>\n      <item> SECURITY </item>\n    </list>\n    <list name=\"alerts_mid\">\n      <item> BUG </item>\n      <item> FIXME </item>\n      <item> DEPRECATED </item>\n      <item> TASK </item>\n      <item> TODO </item>\n      <item> TBD </item>\n      <item> WARNING </item>\n      <item> CAUTION </item>\n      <item> NOLINT </item>\n    </list>\n    <list name=\"alerts_lo\">\n      <item> ### </item>\n      <item> NOTE </item>\n      <item> NOTICE </item>\n      <item> TEST </item>\n      <item> TESTING </item>\n    </list>\n    <contexts>\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"Normal Text\" >\n        <StringDetect attribute=\"Region Marker\" context=\"#stay\" String=\"{{{\" beginRegion=\"AlertRegion1\" />\n        <StringDetect attribute=\"Region Marker\" context=\"#stay\" String=\"}}}\" endRegion=\"AlertRegion1\" />\n        <StringDetect attribute=\"Region Marker\" context=\"#stay\" String=\"BEGIN\" beginRegion=\"AlertRegion2\" />\n        <StringDetect attribute=\"Region Marker\" context=\"#stay\" String=\"END\" endRegion=\"AlertRegion2\" />\n        <keyword attribute=\"Alert Level 1\" context=\"#stay\" String=\"alerts_hi\" />\n        <keyword attribute=\"Alert Level 2\" context=\"#stay\" String=\"alerts_mid\" />\n        <keyword attribute=\"Alert Level 3\" context=\"#stay\" String=\"alerts_lo\" />\n      </context>\n    </contexts>\n    <itemDatas>\n      <itemData name=\"Normal Text\"   defStyleNum=\"dsNormal\"/>\n      <itemData name=\"Alert Level 1\" defStyleNum=\"dsAlert\" color=\"#e85848\" selColor=\"#e85848\" backgroundColor=\"#451e1a\" />\n      <itemData name=\"Alert Level 2\" defStyleNum=\"dsAlert\" color=\"#ca9219\" selColor=\"#ca9219\" backgroundColor=\"#451e1a\" />\n      <itemData name=\"Alert Level 3\" defStyleNum=\"dsAlert\" color=\"#81ca2d\" selColor=\"#81ca2d\" />\n      <itemData name=\"Region Marker\" defStyleNum=\"dsRegionMarker\"/>\n    </itemDatas>\n  </highlighting>\n  <general>\n    <keywords casesensitive=\"1\"/>\n  </general>\n</language>\n<!-- kate: indent-width 2; -->\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/alert_indent.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<!--\n  This file is part of KDE's kate project.\n\n  copyright   : (C) 2004 by Dominik Haumann\n  email       : dhdev at gmx dot de\n\n **********************************************************************\n * This library is free software; you can redistribute it and/or      *\n * modify it under the terms of the GNU Library General Public        *\n * License as published by the Free Software Foundation; either       *\n * version 2 of the License, or (at your option) any later version.   *\n *                                                                    *\n * This library is distributed in the hope that it will be useful,    *\n * but WITHOUT ANY WARRANTY; without even the implied warranty of     *\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  *\n * Library General Public License for more details.                   *\n *                                                                    *\n * You should have received a copy of the GNU Library General Public  *\n * License along with this library; if not, write to the              *\n * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,   *\n * Boston, MA  02110-1301, USA.                                       *\n **********************************************************************\n\n This file is included in every file that highlights the \"alerts\" keywords.\n That's why extensions and mimetype are empty.\n-->\n<language version=\"1.10\" kateversion=\"2.4\" name=\"Alerts_indent\" section=\"Other\" extensions=\"\" mimetype=\"\" author=\"Dominik Haumann (dhdev@gmx.de)\" license=\"LGPL\" hidden=\"true\">\n  <highlighting>\n    <contexts>\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"Normal Text\" >\n        <IncludeRules context=\"##Alerts\" />\n      </context>\n    </contexts>\n    <itemDatas>\n      <itemData name=\"Normal Text\" defStyleNum=\"dsNormal\"/>\n    </itemDatas>\n  </highlighting>\n  <general>\n    <folding indentationsensitive=\"1\" />\n  </general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/awk.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<language name=\"AWK\" version=\"0.90\" kateversion=\"2.3\" section=\"Scripts\" extensions=\"*.awk\" mimetype=\"text/x-awk\">\n  <highlighting>\n    <list name=\"keywords\">\n      <item>if</item>\n      <item>else</item>\n      <item>while</item>\n      <item>do</item>\n      <item>for</item>\n      <item>in</item>\n      <item>continue</item>\n      <item>break</item>\n      <item>print</item>\n      <item>printf</item>\n      <item>getline</item>\n      <item>function</item>\n      <item>return</item>\n      <item>next</item>\n      <item>exit</item>\n    </list>\n    <list name=\"builtins\">\n      <item>ARGC</item>\n      <item>ARGV</item>\n      <item>CONVFMT</item>\n      <item>ENVIRON</item>\n      <item>FILENAME</item>\n      <item>FNR</item>\n      <item>FS</item>\n      <item>NF</item>\n      <item>NR</item>\n      <item>OFMT</item>\n      <item>OFS</item>\n      <item>ORS</item>\n      <item>RS</item>\n      <item>RSTART</item>\n      <item>RLENGTH</item>\n      <item>SUBSEP</item>\n    </list>\n    <list name=\"functions\">\n      <item>gsub</item>\n      <item>gensub</item>\n      <item>index</item>\n      <item>length</item>\n      <item>match</item>\n      <item>split</item>\n      <item>sprintf</item>\n      <item>sub</item>\n      <item>substr</item>\n      <item>tolower</item>\n      <item>toupper</item>\n      <item>atan2</item>\n      <item>cos</item>\n      <item>exp</item>\n      <item>int</item>\n      <item>log</item>\n      <item>rand</item>\n      <item>sin</item>\n      <item>sqrt</item>\n      <item>srand</item>\n      <item>close</item>\n      <item>fflush</item>\n      <item>system</item>\n    </list>\n\n    <contexts>\n\n      <context name=\"Base\" attribute=\"Normal\" lineEndContext=\"#stay\">\n\t<RegExpr String=\"\\b(BEGIN|END)\\b\" attribute=\"Pattern\" context=\"#stay\" />\n\t<RegExpr String=\"/([^\\/[]|\\\\.|\\[\\]?(\\[[^]]+\\]|.)+\\])+/\" attribute=\"Pattern\" context=\"#stay\" />\n\t<DetectChar char=\"{\" attribute=\"Keyword\" context=\"#stay\" beginRegion=\"block\" />\n\t<DetectChar char=\"}\" attribute=\"Keyword\" context=\"#stay\" endRegion=\"block\" />\n\t<DetectChar char=\"#\" attribute=\"Comment\" context=\"Comment\" />\n        <DetectChar char=\"&quot;\" attribute=\"String\"  context=\"String\"/>\n        <keyword String=\"keywords\" attribute=\"Keyword\" context=\"#stay\"/>\n        <keyword String=\"builtins\" attribute=\"Builtin\" context=\"#stay\"/>\n        <keyword String=\"functions\" attribute=\"Function\" context=\"#stay\"/>\n        <Float attribute=\"Float\"   context=\"#stay\"/>\n        <Int   attribute=\"Decimal\" context=\"#stay\"/>\n        <RegExpr String=\"\\$[A-Za-z0-9_]+\" attribute=\"Field\" context=\"#stay\"/>\n      </context>\n\n      <context name=\"String\" attribute=\"String\" lineEndContext=\"#stay\">\n        <DetectChar char=\"&quot;\" attribute=\"String\" context=\"#pop\"/>\n        <HlCStringChar attribute=\"String\" context=\"#stay\"/>\n      </context>\n\n      <context name=\"Comment\" attribute=\"Comment\" lineEndContext=\"#pop\">\n\t<IncludeRules context=\"##Alerts\" />\n      </context>\n\n    </contexts>\n    <itemDatas>\n      <itemData name=\"Normal\"   defStyleNum=\"dsNormal\"/>\n      <itemData name=\"Keyword\"  defStyleNum=\"dsKeyword\"/>\n      <itemData name=\"Builtin\"  defStyleNum=\"dsDataType\"/>\n      <itemData name=\"Function\" defStyleNum=\"dsFunction\"/>\n      <itemData name=\"Decimal\"  defStyleNum=\"dsDecVal\"/>\n      <itemData name=\"Float\"    defStyleNum=\"dsFloat\"/>\n      <itemData name=\"String\"   defStyleNum=\"dsString\"/>\n      <itemData name=\"Comment\"  defStyleNum=\"dsComment\"/>\n      <itemData name=\"Pattern\"  defStyleNum=\"dsString\"/>\n      <itemData name=\"Field\"    defStyleNum=\"dsOthers\"/>\n    </itemDatas>\n  </highlighting>\n  <general>\n    <comments>\n      <comment name=\"singleLine\" start=\"#\"/>\n    </comments>\n    <keywords casesensitive=\"1\" />\n  </general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/bash.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\"\n[\n        <!ENTITY funcname \"[A-Za-z_:][A-Za-z0-9_:#&#37;@-]*\">\n        <!ENTITY varname  \"[A-Za-z_][A-Za-z0-9_]*\">\n        <!ENTITY word     \"[^|&amp;;()&lt;&gt;\\s]+\">    <!-- see man bash -->\n        <!ENTITY eos      \"(?=($|\\s))\">                 <!-- eol or space following -->\n        <!ENTITY noword   \"(?![\\w$+-])\">                <!-- no word, $, + or - following -->\n        <!ENTITY pathpart \"([\\w_@.&#37;*?+-]|\\\\ )\">     <!-- valid character in a file name -->\n]>\n<language name=\"Bash\" version=\"2.16\" kateversion=\"2.4\" section=\"Scripts\" extensions=\"*.sh;*.bash;*.ebuild;*.eclass;.bashrc;.bash_profile;.bash_login;.profile\" mimetype=\"application/x-shellscript\" casesensitive=\"1\" author=\"Wilbert Berendsen (wilbert@kde.nl)\" license=\"LGPL\">\n\n<!-- (c) 2004 by Wilbert Berendsen (wilbert@kde.nl)\n    Changes by Matthew Woehlke (mw_triad@users.sourceforge.net)\n    Changes by Sebastian Pipping (webmaster@hartwork.org)\n    Changes by Luiz Angelo Daros de Luca (luizluca@gmail.com)\n    Released under the LGPL, part of kdelibs/kate -->\n\n  <highlighting>\n    <list name=\"keywords\">\n      <item> else </item>\n      <item> for </item>\n      <item> function </item>\n      <item> in </item>\n      <item> select </item>\n      <item> until </item>\n      <item> while </item>\n      <item> elif </item>\n      <item> then </item>\n      <item> set </item>\n    </list>\n\n    <list name=\"builtins\">\n      <item> : </item>\n      <item> source </item>\n      <item> alias </item>\n      <item> bg </item>\n      <item> bind </item>\n      <item> break </item>\n      <item> builtin </item>\n      <item> cd </item>\n      <item> caller </item>\n      <item> command </item>\n      <item> compgen </item>\n      <item> complete </item>\n      <item> continue </item>\n      <item> dirs </item>\n      <item> disown </item>\n      <item> echo </item>\n      <item> enable </item>\n      <item> eval </item>\n      <item> exec </item>\n      <item> exit </item>\n      <item> fc </item>\n      <item> fg </item>\n      <item> getopts </item>\n      <item> hash </item>\n      <item> help </item>\n      <item> history </item>\n      <item> jobs </item>\n      <item> kill </item>\n      <item> let </item>\n      <item> logout </item>\n      <item> popd </item>\n      <item> printf </item>\n      <item> pushd </item>\n      <item> pwd </item>\n      <item> return </item>\n      <item> set </item>\n      <item> shift </item>\n      <item> shopt </item>\n      <item> suspend </item>\n      <item> test </item>\n      <item> time </item>\n      <item> times </item>\n      <item> trap </item>\n      <item> type </item>\n      <item> ulimit </item>\n      <item> umask </item>\n      <item> unalias </item>\n      <item> wait </item>\n    </list>\n\n    <list name=\"builtins_var\">\n      <item> export </item>\n      <item> unset </item>\n      <item> declare </item>\n      <item> typeset </item>\n      <item> local </item>\n      <item> read </item>\n      <item> readonly </item>\n    </list>\n\n    <list name=\"unixcommands\">\n      <!-- /bin -->\n      <item> arch </item>\n      <item> awk </item>\n      <item> bash </item>\n      <item> bunzip2 </item>\n      <item> bzcat </item>\n      <item> bzcmp </item>\n      <item> bzdiff </item>\n      <item> bzegrep </item>\n      <item> bzfgrep </item>\n      <item> bzgrep </item>\n      <item> bzip2 </item>\n      <item> bzip2recover </item>\n      <item> bzless </item>\n      <item> bzmore </item>\n      <item> cat </item>\n      <item> chattr </item>\n      <item> chgrp </item>\n      <item> chmod </item>\n      <item> chown </item>\n      <item> chvt </item>\n      <item> cp </item>\n      <item> date </item>\n      <item> dd </item>\n      <item> deallocvt </item>\n      <item> df </item>\n      <item> dir </item>\n      <item> dircolors </item>\n      <item> dmesg </item>\n      <item> dnsdomainname </item>\n      <item> domainname </item>\n      <item> du </item>\n      <item> dumpkeys </item>\n      <item> echo </item>\n      <item> ed </item>\n      <item> egrep </item>\n      <item> false </item>\n      <item> fgconsole </item>\n      <item> fgrep </item>\n      <item> fuser </item>\n      <item> gawk </item>\n      <item> getkeycodes </item>\n      <item> gocr </item>\n      <item> grep </item>\n      <item> groff </item>\n      <item> groups </item>\n      <item> gunzip </item>\n      <item> gzexe </item>\n      <item> gzip </item>\n      <item> hostname </item>\n      <item> igawk </item>\n      <item> install </item>\n      <item> kbd_mode </item>\n      <item> kbdrate </item>\n      <item> killall </item>\n      <item> last </item>\n      <item> lastb </item>\n      <item> link </item>\n      <item> ln </item>\n      <item> loadkeys </item>\n      <item> loadunimap </item>\n      <item> login </item>\n      <item> ls </item>\n      <item> lsattr </item>\n      <item> lsmod </item>\n      <item> lsmod.old </item>\n      <item> lzcat </item>\n      <item> lzcmp </item>\n      <item> lzdiff </item>\n      <item> lzegrep </item>\n      <item> lzfgrep </item>\n      <item> lzgrep </item>\n      <item> lzless </item>\n      <item> lzcat </item>\n      <item> lzma </item>\n      <item> lzmainfo </item>\n      <item> lzmore </item>\n      <item> mapscrn </item>\n      <item> mesg </item>\n      <item> mkdir </item>\n      <item> mkfifo </item>\n      <item> mknod </item>\n      <item> mktemp </item>\n      <item> more </item>\n      <item> mount </item>\n      <item> mv </item>\n      <item> nano </item>\n      <item> netstat </item>\n      <item> nisdomainname </item>\n      <item> nroff </item>\n      <item> openvt </item>\n      <item> pgawk </item>\n      <item> pidof </item>\n      <item> ping </item>\n      <item> ps </item>\n      <item> pstree </item>\n      <item> pwd </item>\n      <item> rbash </item>\n      <item> readlink </item>\n      <item> red </item>\n      <item> resizecons </item>\n      <item> rm </item>\n      <item> rmdir </item>\n      <item> run-parts </item>\n      <item> sash </item>\n      <item> sed </item>\n      <item> setfont </item>\n      <item> setkeycodes </item>\n      <item> setleds </item>\n      <item> setmetamode </item>\n      <item> setserial </item>\n      <item> sh </item>\n      <item> showkey </item>\n      <item> shred </item>\n      <item> sleep </item>\n      <item> ssed </item>\n      <item> stat </item>\n      <item> stty </item>\n      <item> su </item>\n      <item> sync </item>\n      <item> tar </item>\n      <item> tempfile </item>\n      <item> touch </item>\n      <item> troff </item>\n      <item> true </item>\n      <item> umount </item>\n      <item> uname </item>\n      <item> unicode_start </item>\n      <item> unicode_stop </item>\n      <item> unlink </item>\n      <item> unlzma </item>\n      <item> unxz </item>\n      <item> utmpdump </item>\n      <item> uuidgen </item>\n      <item> vdir </item>\n      <item> wall </item>\n      <item> wc </item>\n      <item> xz </item>\n      <item> xzcat </item>\n      <item> ypdomainname </item>\n      <item> zcat </item>\n      <item> zcmp </item>\n      <item> zdiff </item>\n      <item> zegrep </item>\n      <item> zfgrep </item>\n      <item> zforce </item>\n      <item> zgrep </item>\n      <item> zless </item>\n      <item> zmore </item>\n      <item> znew </item>\n      <item> zsh </item>\n\n      <!-- some from /usr/bin -->\n      <item> aclocal </item>\n      <item> aconnect </item>\n      <item> aplay </item>\n      <item> apm </item>\n      <item> apmsleep </item>\n      <item> apropos </item>\n      <item> ar </item>\n      <item> arecord </item>\n      <item> as </item>\n      <item> as86 </item>\n      <item> autoconf </item>\n      <item> autoheader </item>\n      <item> automake </item>\n      <item> awk </item>\n      <item> basename </item>\n      <item> bc </item>\n      <item> bison </item>\n      <item> c++ </item>\n      <item> cal </item>\n      <item> cat </item>\n      <item> cc </item>\n      <item> cdda2wav </item>\n      <item> cdparanoia </item>\n      <item> cdrdao </item>\n      <item> cd-read </item>\n      <item> cdrecord </item>\n      <item> chfn </item>\n      <item> chgrp </item>\n      <item> chmod </item>\n      <item> chown </item>\n      <item> chroot </item>\n      <item> chsh </item>\n      <item> clear </item>\n      <item> cmp </item>\n      <item> co </item>\n      <item> col </item>\n      <item> comm </item>\n      <item> cp </item>\n      <item> cpio </item>\n      <item> cpp </item>\n      <item> cut </item>\n      <item> dc </item>\n      <item> dd </item>\n      <item> df </item>\n      <item> diff </item>\n      <item> diff3 </item>\n      <item> dir </item>\n      <item> dircolors </item>\n      <item> directomatic </item>\n      <item> dirname </item>\n      <item> du </item>\n      <item> env </item>\n      <item> expr </item>\n      <item> fbset </item>\n      <item> file </item>\n      <item> find </item>\n      <item> flex </item>\n      <item> flex++ </item>\n      <item> fmt </item>\n      <item> free </item>\n      <item> ftp </item>\n      <item> funzip </item>\n      <item> fuser </item>\n      <item> g++ </item>\n      <item> gawk </item>\n      <item> gc </item>\n      <item> gcc </item>\n      <item> gdb </item>\n      <item> getent </item>\n      <item> getopt </item>\n      <item> gettext </item>\n      <item> gettextize </item>\n      <item> gimp </item>\n      <item> gimp-remote </item>\n      <item> gimptool </item>\n      <item> gmake </item>\n      <item> gs </item>\n      <item> head </item>\n      <item> hexdump </item>\n      <item> id </item>\n      <item> install </item>\n      <item> join </item>\n      <item> kill </item>\n      <item> killall </item>\n      <item> ld </item>\n      <item> ld86 </item>\n      <item> ldd </item>\n      <item> less </item>\n      <item> lex </item>\n      <item> ln </item>\n      <item> locate </item>\n      <item> lockfile </item>\n      <item> logname </item>\n      <item> lp </item>\n      <item> lpr </item>\n      <item> ls </item>\n      <item> lynx </item>\n      <item> m4 </item>\n      <item> make </item>\n      <item> man </item>\n      <item> mkdir </item>\n      <item> mknod </item>\n      <item> msgfmt </item>\n      <item> mv </item>\n      <item> namei </item>\n      <item> nasm </item>\n      <item> nawk </item>\n      <item> nice </item>\n      <item> nl </item>\n      <item> nm </item>\n      <item> nm86 </item>\n      <item> nmap </item>\n      <item> nohup </item>\n      <item> nop </item>\n      <item> od </item>\n      <item> passwd </item>\n      <item> patch </item>\n      <item> pcregrep </item>\n      <item> pcretest </item>\n      <item> perl </item>\n      <item> perror </item>\n      <item> pidof </item>\n      <item> pr </item>\n      <item> printf </item>\n      <item> procmail </item>\n      <item> prune </item>\n      <item> ps2ascii </item>\n      <item> ps2epsi </item>\n      <item> ps2frag </item>\n      <item> ps2pdf </item>\n      <item> ps2ps </item>\n      <item> psbook </item>\n      <item> psmerge </item>\n      <item> psnup </item>\n      <item> psresize </item>\n      <item> psselect </item>\n      <item> pstops </item>\n      <item> rcs </item>\n      <item> rev </item>\n      <item> rm </item>\n      <item> scp </item>\n      <item> sed </item>\n      <item> seq </item>\n      <item> setterm </item>\n      <item> shred </item>\n      <item> size </item>\n      <item> size86 </item>\n      <item> skill </item>\n      <item> slogin </item>\n      <item> snice </item>\n      <item> sort </item>\n      <item> sox </item>\n      <item> split </item>\n      <item> ssh </item>\n      <item> ssh-add </item>\n      <item> ssh-agent </item>\n      <item> ssh-keygen </item>\n      <item> ssh-keyscan </item>\n      <item> stat </item>\n      <item> strings </item>\n      <item> strip </item>\n      <item> sudo </item>\n      <item> suidperl </item>\n      <item> sum </item>\n      <item> tac </item>\n      <item> tail </item>\n      <item> tee </item>\n      <item> test </item>\n      <item> tr </item>\n      <item> uniq </item>\n      <item> unlink </item>\n      <item> unzip </item>\n      <item> updatedb </item>\n      <item> updmap </item>\n      <item> uptime </item>\n      <item> users </item>\n      <item> vmstat </item>\n      <item> w </item>\n      <item> wc </item>\n      <item> wget </item>\n      <item> whatis </item>\n      <item> whereis </item>\n      <item> which </item>\n      <item> who </item>\n      <item> whoami </item>\n      <item> write </item>\n      <item> xargs </item>\n      <item> yacc </item>\n      <item> yes </item>\n      <item> zip </item>\n      <item> zsoelim </item>\n\n      <!-- others -->\n      <item> dcop </item>\n      <item> kdialog </item>\n      <item> kfile </item>\n      <item> xhost </item>\n      <item> xmodmap </item>\n      <item> xset </item>\n    </list>\n\n\n    <contexts>\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Start\">\n        <IncludeRules context=\"FindAll\" />\n      </context>\n\n<!-- ====== The following rulessets are meant to be included ======== -->\n      <!-- FindAll tries to interpret everything -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindAll\">\n        <IncludeRules context=\"FindComments\" />\n        <IncludeRules context=\"FindCommands\" />\n        <IncludeRules context=\"FindStrings\" />\n        <IncludeRules context=\"FindSubstitutions\" />\n        <IncludeRules context=\"FindOthers\" />\n      </context>\n\n      <!-- FindMost tries to interpret anything except commands -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindMost\">\n        <IncludeRules context=\"FindComments\" />\n        <IncludeRules context=\"FindStrings\" />\n        <IncludeRules context=\"FindSubstitutions\" />\n        <IncludeRules context=\"FindOthers\" />\n      </context>\n\n\n      <!-- FindComments consumes shell comments till EOL -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"FindComments\">\n        <DetectChar attribute=\"Comment\" context=\"Comment\" char=\"#\" firstNonSpace=\"true\"/>\n        <RegExpr attribute=\"Normal Text\" context=\"Comment\" String=\"[\\s;](?=#)\" />\n      </context>\n      <context attribute=\"Comment\" lineEndContext=\"#pop\" name=\"Comment\">\n        <IncludeRules context=\"##Alerts\" />\n      </context>\n\n      <!-- FindCommentsParen consumes shell comments till EOL or a closing parenthese -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"FindCommentsParen\">\n        <DetectChar attribute=\"Comment\" context=\"CommentParen\" char=\"#\" firstNonSpace=\"true\"/>\n        <RegExpr attribute=\"Normal Text\" context=\"CommentParen\" String=\"[\\s;](?=#)\" />\n      </context>\n      <context attribute=\"Comment\" lineEndContext=\"#pop\" name=\"CommentParen\">\n        <RegExpr attribute=\"Comment\" context=\"#pop\" String=\"[^)](?=\\))\" />\n        <IncludeRules context=\"##Alerts\" />\n      </context>\n\n      <!-- FindCommentsBackq consumes shell comments till EOL or a backquote -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"FindCommentsBackq\">\n        <DetectChar attribute=\"Comment\" context=\"CommentBackq\" char=\"#\" firstNonSpace=\"true\"/>\n        <RegExpr attribute=\"Normal Text\" context=\"CommentBackq\" String=\"[\\s;](?=#)\" />\n      </context>\n      <context attribute=\"Comment\" lineEndContext=\"#pop\" name=\"CommentBackq\">\n        <RegExpr attribute=\"Comment\" context=\"#pop\" String=\"[^`](?=`)\" />\n        <IncludeRules context=\"##Alerts\" />\n      </context>\n\n\n      <!-- FindCommands matches many items that can be expected outside strings, substitutions etc. -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindCommands\">\n        <IncludeRules context=\"FindSpecialCommands\" />\n        <IncludeRules context=\"FindNormalCommands\" />\n      </context>\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindSpecialCommands\">\n        <!-- start expression in double parentheses -->\n        <Detect2Chars attribute=\"Keyword\" context=\"ExprDblParen\" char=\"(\" char1=\"(\" beginRegion=\"expression\" />\n        <!-- start expression in double brackets -->\n        <RegExpr attribute=\"Keyword\" context=\"ExprDblBracket\" String=\"\\[\\[&eos;\" beginRegion=\"expression\" column=\"0\"/>\n        <RegExpr attribute=\"Keyword\" context=\"ExprDblBracket\" String=\"\\s\\[\\[&eos;\" beginRegion=\"expression\" />\n        <!-- start expression in single brackets -->\n        <RegExpr attribute=\"Builtin\" context=\"ExprBracket\" String=\"\\[&eos;\" beginRegion=\"expression\" column=\"0\"/>\n        <RegExpr attribute=\"Builtin\" context=\"ExprBracket\" String=\"\\s\\[&eos;\" beginRegion=\"expression\" />\n        <!-- start a group command with { -->\n        <RegExpr attribute=\"Keyword\" context=\"Group\" String=\"\\{&eos;\" beginRegion=\"group\" />\n        <!-- start a subshell -->\n        <DetectChar attribute=\"Keyword\" context=\"SubShell\" char=\"(\" beginRegion=\"subshell\" />\n        <!-- match do and if blocks -->\n        <RegExpr attribute=\"Keyword\" context=\"#stay\" String=\"\\bdo&noword;\" beginRegion=\"do\" />\n        <RegExpr attribute=\"Keyword\" context=\"#stay\" String=\"\\bdone&noword;\" endRegion=\"do\" />\n        <RegExpr attribute=\"Keyword\" context=\"#stay\" String=\"\\bif&eos;\" beginRegion=\"if\" />\n        <RegExpr attribute=\"Keyword\" context=\"#stay\" String=\"\\bfi&noword;\" endRegion=\"if\" />\n        <!-- handle case as a special case -->\n        <RegExpr attribute=\"Keyword\" context=\"Case\" String=\"\\bcase&noword;\" beginRegion=\"case\" />\n        <!-- handle variable assignments -->\n        <RegExpr attribute=\"Variable\" context=\"Assign\" String=\"\\b&varname;\\+?=\" />\n        <RegExpr attribute=\"Variable\" context=\"AssignSubscr\" String=\"\\b&varname;(?=\\[.+\\]\\+?=)\" />\n        <!-- handle functions with function keyword before keywords -->\n        <StringDetect attribute=\"Function\" context=\"#stay\" String=\":()\" />\n        <RegExpr attribute=\"Keyword\" context=\"FunctionDef\" String=\"\\bfunction\\b\" />\n        <!-- mark function definitions without function keyword -->\n        <RegExpr attribute=\"Function\" context=\"#stay\" String=\"&funcname;\\s*\\(\\)\" />\n        <!-- handle keywords -->\n        <keyword attribute=\"Keyword\" context=\"#stay\" String=\"keywords\" />\n        <RegExpr attribute=\"Builtin\" context=\"#stay\" String=\"\\.(?=\\s)\" />\n        <!-- handle commands that have variable names as argument -->\n        <keyword attribute=\"Builtin\" context=\"VarName\" String=\"builtins_var\" />\n        <!-- handle here-string -->\n        <RegExpr attribute=\"Redirection\" context=\"#stay\" String=\"\\d*&lt;&lt;&lt;\" />\n        <!-- handle here document -->\n        <StringDetect attribute=\"Redirection\" context=\"HereDoc\" String=\"&lt;&lt;\" lookAhead=\"true\" />\n        <!-- handle process subst -->\n        <RegExpr attribute=\"Redirection\" context=\"ProcessSubst\" String=\"[&lt;&gt;]\\(\" />\n        <!-- handle redirection -->\n        <RegExpr attribute=\"Redirection\" context=\"#stay\" String=\"([0-9]*(&gt;{1,2}|&lt;)(&amp;[0-9]+-?)?|&amp;&gt;|&gt;&amp;|[0-9]*&lt;&gt;)\" />\n        <!-- handle &, &&, | and || -->\n        <RegExpr attribute=\"Control\" context=\"#stay\" String=\"([|&amp;])\\1?\" />\n      </context>      \n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindNormalCommands\">\n        <keyword attribute=\"Builtin\" context=\"CommandArgs\" String=\"builtins\" />\n        <keyword attribute=\"Command\" context=\"CommandArgs\" String=\"unixcommands\" />\n        <RegExpr attribute=\"OtherCommand\" context=\"#stay\" String=\"&pathpart;*(?=/)\" />\n        <RegExpr attribute=\"OtherCommand\" context=\"#stay\" String=\"~\\w*\" />\n        <RegExpr attribute=\"OtherCommand\" context=\"#stay\" String=\"/&pathpart;*(?=([/);$`'&quot;]|$))\" />\n        <RegExpr attribute=\"OtherCommand\" context=\"CommandArgs\" String=\"/&pathpart;*(?=([\\s);$`'&quot;]|$))\" />\n        <!-- This list is not complete. ie, \":\" is missing but as it is in bash completition. -->\n        <RegExpr attribute=\"OtherCommand\" context=\"CommandArgs\" String=\"&pathpart;*\" />        \n      </context>\n      \n      <!-- CommandArgs matches the items after a command -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"CommandArgs\">  \n        <LineContinue />\n        <IncludeRules context=\"FindMost\" />\n        <RegExpr attribute=\"Keyword\" context=\"#stay\" String=\"\\\\$\" />\n        <!-- handle keywords -->\n        <RegExpr attribute=\"Option\" context=\"#stay\" String=\"\\.(?=\\s)\" />\n        <!-- handle here-string -->\n        <RegExpr attribute=\"Redirection\" context=\"#stay\" String=\"\\d*&lt;&lt;&lt;\" />\n        <!-- handle here document -->\n        <StringDetect attribute=\"Redirection\" context=\"HereDoc\" String=\"&lt;&lt;\" lookAhead=\"true\" />\n        <!-- handle process subst -->\n        <RegExpr attribute=\"Redirection\" context=\"ProcessSubst\" String=\"[&lt;&gt;]\\(\" />\n        <!-- handle redirection -->\n        <RegExpr attribute=\"Redirection\" context=\"#stay\" String=\"([0-9]*(&gt;{1,2}|&lt;)(&amp;[0-9]+-?)?|&amp;&gt;|&gt;&amp;|[0-9]*&lt;&gt;)\" />\n        <!-- handle &, &&, | and || -->\n        <RegExpr attribute=\"Control\" context=\"#pop\" String=\"([|&amp;;])\\1?\" />        \n        <RegExpr attribute=\"Option\" context=\"#stay\" String=\"-?-[a-z][A-Za-z0-9_-]*\" />\n        <keyword attribute=\"Option\" context=\"#stay\" String=\"keywords\" />\n        <AnyChar String=\")}\" context=\"#pop\" lookAhead=\"true\"/>\n      </context>\n      \n      <!-- FindCommands matches many items that can be expected outside strings, substitutions etc, when inside a Backquote -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindCommandsBackq\">\n        <IncludeRules context=\"FindSpecialCommands\" />\n        <IncludeRules context=\"FindNormalCommandsBackq\" />\n      </context>\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindNormalCommandsBackq\">\n        <keyword attribute=\"Builtin\" context=\"CommandArgsBackq\" String=\"builtins\" />\n        <keyword attribute=\"Command\" context=\"CommandArgsBackq\" String=\"unixcommands\" />\n        <RegExpr attribute=\"OtherCommand\" context=\"#stay\" String=\"&pathpart;*(?=/)\" />\n        <RegExpr attribute=\"OtherCommand\" context=\"#stay\" String=\"~\\w*\" />\n        <RegExpr attribute=\"OtherCommand\" context=\"#stay\" String=\"/&pathpart;*(?=([/);$`'&quot;]|$))\" />\n        <RegExpr attribute=\"OtherCommand\" context=\"CommandArgsBackq\" String=\"/&pathpart;*(?=([\\s);$`'&quot;]|$))\" />\n        <RegExpr attribute=\"OtherCommand\" context=\"CommandArgsBackq\" String=\"&pathpart;*\" />\n      </context>\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"CommandArgsBackq\"> \n        <LineContinue />\n        <DetectChar attribute=\"Keyword\" context=\"#pop\" char=\"`\" lookAhead=\"true\"/>\n        <IncludeRules context=\"CommandArgs\" />\n      </context>\n          \n      <!-- FindOthers contains various rules to mark different shell input -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindOthers\">\n        <RegExpr attribute=\"Escape\" context=\"#stay\" String=\"\\\\[][;\\\\$`{}()|&amp;&lt;&gt;* ]\" />\n        <RegExpr attribute=\"Keyword\" context=\"#stay\" String=\"\\\\$\" />\n        <RegExpr attribute=\"Escape\" context=\"#stay\" String=\"\\{(?!(\\s|$))\\S*\\}\" />\n        <RegExpr attribute=\"Path\" context=\"#stay\" String=\"&pathpart;*(?=/)\" />\n        <RegExpr attribute=\"Path\" context=\"#stay\" String=\"~\\w*\" />\n        <RegExpr attribute=\"Path\" context=\"#stay\" String=\"/&pathpart;*(?=([\\s/):;$`'&quot;]|$))\" />\n        <!-- TODO: shell globs beside * and ? (in Path's) -->\n      </context>\n\n      <!-- FindStrings looks for single and double quoted strings, also with $-prefix -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindStrings\">\n        <Detect2Chars attribute=\"Escape\" context=\"#stay\" char=\"\\\\\" char1=\"'\" />\n        <Detect2Chars attribute=\"Escape\" context=\"#stay\" char=\"\\\\\" char1=\"&quot;\" />\n        <DetectChar attribute=\"String SingleQ\" context=\"StringSQ\" char=\"'\" />\n        <DetectChar attribute=\"String DoubleQ\" context=\"StringDQ\" char=\"&quot;\" />\n        <Detect2Chars attribute=\"String SingleQ\" context=\"StringEsc\" char=\"$\" char1=\"'\" />\n        <Detect2Chars attribute=\"String Transl.\" context=\"StringDQ\" char=\"$\" char1=\"&quot;\" />\n      </context>\n\n      <!-- FindSubstitutions goes after anything starting with $ and ` and their escapes -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindSubstitutions\">\n        <RegExpr attribute=\"Variable\" context=\"Subscript\" String=\"\\$&varname;\\[\" />\n        <RegExpr attribute=\"Variable\" context=\"#stay\" String=\"\\$&varname;\" />\n        <RegExpr attribute=\"Variable\" context=\"#stay\" String=\"\\$[*@#?$!_0-9-]\" />\n        <RegExpr attribute=\"Variable\" context=\"#stay\" String=\"\\$\\{[*@#?$!_0-9-]\\}\" />\n        <RegExpr attribute=\"Variable\" context=\"#stay\" String=\"\\$\\{#&varname;(\\[[*@]\\])?\\}\" />\n        <RegExpr attribute=\"Variable\" context=\"#stay\" String=\"\\$\\{!&varname;(\\[[*@]\\]|[*@])?\\}\" />\n        <RegExpr attribute=\"Variable\" context=\"VarBrace\" String=\"\\$\\{&varname;\" />\n        <RegExpr attribute=\"Variable\" context=\"VarBrace\" String=\"\\$\\{[*@#?$!_0-9-](?=[:#%/=?+-])\" />\n        <StringDetect attribute=\"Variable\" context=\"ExprDblParenSubst\" String=\"$((\" beginRegion=\"expression\" />\n        <StringDetect attribute=\"Redirection\" context=\"SubstFile\" String=\"$(&lt;\" />\n        <StringDetect attribute=\"Variable\" context=\"SubstCommand\" String=\"$(\" />\n        <DetectChar attribute=\"Backquote\" context=\"SubstBackq\" char=\"`\" />\n        <RegExpr attribute=\"Escape\" context=\"#stay\" String=\"\\\\[`$\\\\]\" />\n      </context>\n\n      <!-- FindTests finds operators valid in tests -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindTests\">\n        <RegExpr attribute=\"Expression\" context=\"#stay\" String=\"-[abcdefghkprstuwxOGLSNozn](?=\\s)\"/>\n        <RegExpr attribute=\"Expression\" context=\"#stay\" String=\"-([no]t|ef)(?=\\s)\"/>\n        <RegExpr attribute=\"Expression\" context=\"#stay\" String=\"([!=]=?|[&gt;&lt;])(?=\\s)\"/>\n        <RegExpr attribute=\"Expression\" context=\"#stay\" String=\"-(eq|ne|[gl][te])(?=\\s)\"/>\n      </context>\n\n\n<!-- ====== These are the contexts that can be branched to ======= -->\n\n      <!-- ExprDblParen consumes an expression started in command mode till )) -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"ExprDblParen\">\n        <Detect2Chars attribute=\"Keyword\" context=\"#pop\" char=\")\" char1=\")\" endRegion=\"expression\" />\n        <DetectChar attribute=\"Normal Text\" context=\"ExprSubParen\" char=\"(\" />\n        <IncludeRules context=\"FindMost\" />\n      </context>\n\n      <!-- ExprDblParenSubst like ExprDblParen but matches )) as Variable -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"ExprDblParenSubst\">\n        <Detect2Chars attribute=\"Variable\" context=\"#pop\" char=\")\" char1=\")\" endRegion=\"expression\" />\n        <DetectChar attribute=\"Normal Text\" context=\"ExprSubParen\" char=\"(\" />\n        <IncludeRules context=\"FindMost\" />\n      </context>\n\n      <!-- ExprSubParen consumes an expression till ) -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"ExprSubParen\">\n        <DetectChar attribute=\"Normal Text\" context=\"#pop\" char=\")\" />\n        <DetectChar attribute=\"Normal Text\" context=\"ExprSubParen\" char=\"(\" />\n        <IncludeRules context=\"FindMost\" />\n      </context>\n\n      <!-- ExprBracket consumes an expression till ] -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"ExprBracket\">\n        <RegExpr attribute=\"Builtin\" context=\"#pop\" String=\"\\s\\](?=($|[\\s;|&amp;]))\" endRegion=\"expression\" />\n        <RegExpr attribute=\"Builtin\" context=\"#pop\" String=\"\\](?=($|[\\s;|&amp;]))\" endRegion=\"expression\" column=\"0\"/>\n        <DetectChar attribute=\"Normal Text\" context=\"ExprSubParen\" char=\"(\" />\n        <IncludeRules context=\"FindTests\" />\n        <IncludeRules context=\"FindMost\" />\n      </context>\n\n      <!-- ExprDblBracket consumes an expression till ]] -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"ExprDblBracket\">\n        <RegExpr attribute=\"Keyword\" context=\"#pop\" String=\"\\s\\]\\](?=($|[\\s;|&amp;]))\" endRegion=\"expression\" />\n        <RegExpr attribute=\"Keyword\" context=\"#pop\" String=\"\\]\\](?=($|[\\s;|&amp;]))\" endRegion=\"expression\" column=\"0\"/>\n        <DetectChar attribute=\"Normal Text\" context=\"ExprSubParen\" char=\"(\" />\n        <IncludeRules context=\"FindTests\" />\n        <IncludeRules context=\"FindMost\" />\n      </context>\n\n      <!-- Group consumes shell input till } -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Group\">\n        <DetectChar attribute=\"Keyword\" context=\"#pop\" char=\"}\" endRegion=\"group\" />\n        <IncludeRules context=\"FindAll\" />\n      </context>\n\n      <!-- SubShell consumes shell input till ) -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"SubShell\">\n        <DetectChar attribute=\"Keyword\" context=\"#pop\" char=\")\" endRegion=\"subshell\" />\n        <IncludeRules context=\"FindAll\" />\n      </context>\n\n      <!-- Assign consumes an expression till EOL or whitespace -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"Assign\" fallthrough=\"true\" fallthroughContext=\"#pop\">\n        <DetectChar attribute=\"Variable\" context=\"AssignArray\" char=\"(\" />\n        <IncludeRules context=\"FindStrings\" />\n        <IncludeRules context=\"FindSubstitutions\" />\n        <IncludeRules context=\"FindOthers\" />\n        <RegExpr attribute=\"Normal Text\" context=\"#stay\" String=\"[\\w:,+_./-]\" />\n      </context>\n\n      <!-- AssignArray consumes everything till ), marking assignments -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"AssignArray\">\n        <DetectChar attribute=\"Variable\" context=\"#pop\" char=\")\" />\n        <DetectChar attribute=\"Variable\" context=\"Subscript\" char=\"[\" />\n        <DetectChar attribute=\"Variable\" context=\"Assign\" char=\"=\" />\n        <IncludeRules context=\"FindMost\" />\n      </context>\n\n      <!-- AssignSubscr first expects a [ then parses subscript and continues with '=value' -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"AssignSubscr\" fallthrough=\"true\" fallthroughContext=\"#pop\">\n        <DetectChar attribute=\"Variable\" context=\"Subscript\" char=\"[\" />\n        <Detect2Chars attribute=\"Variable\" context=\"Assign\" char=\"+\" char1=\"=\" />\n        <DetectChar attribute=\"Variable\" context=\"Assign\" char=\"=\" />\n        <IncludeRules context=\"FindStrings\" />\n        <IncludeRules context=\"FindSubstitutions\" />\n        <IncludeRules context=\"FindOthers\" />\n      </context>\n\n      <!-- Subscript consumes anything till ], marks as Variable -->\n      <context attribute=\"Variable\" lineEndContext=\"#stay\" name=\"Subscript\">\n        <DetectChar attribute=\"Variable\" context=\"#pop\" char=\"]\" />\n        <IncludeRules context=\"FindStrings\" />\n        <IncludeRules context=\"FindSubstitutions\" />\n        <IncludeRules context=\"FindOthers\" />\n      </context>\n\n      <!-- FunctionDef consumes a name, possibly with (), marks as Function -->\n      <context attribute=\"Function\" lineEndContext=\"#pop\" name=\"FunctionDef\" fallthrough=\"true\" fallthroughContext=\"#pop\">\n        <RegExpr attribute=\"Function\" context=\"#pop\" String=\"\\s+&funcname;(\\s*\\(\\))?\" />\n      </context>\n\n      <!-- VarName consumes spare variable names and assignments -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"VarName\" fallthrough=\"true\" fallthroughContext=\"#pop\">\n        <!-- handle command line options -->\n        <RegExpr attribute=\"Option\" context=\"#stay\" String=\"-[A-Za-z0-9]+\" />\n        <RegExpr attribute=\"Option\" context=\"#stay\" String=\"--[a-z][A-Za-z0-9_-]*\" />\n        <RegExpr attribute=\"Variable\" context=\"#stay\" String=\"\\b&varname;\" />\n        <DetectChar attribute=\"Variable\" context=\"Subscript\" char=\"[\" />\n        <DetectChar attribute=\"Variable\" context=\"Assign\" char=\"=\" />\n        <IncludeRules context=\"FindMost\" />\n        <!-- stay here in spaces and other safe characters -->\n        <RegExpr attribute=\"Normal Text\" context=\"#stay\" String=\"[^]})|;`&amp;&gt;&lt;]\" />\n      </context>\n\n      <!-- ProcessSubst handles <(command) and >(command) -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"ProcessSubst\">\n        <DetectChar attribute=\"Redirection\" context=\"#pop\" char=\")\" />\n        <IncludeRules context=\"FindCommentsParen\" />\n        <IncludeRules context=\"FindCommands\" />\n        <IncludeRules context=\"FindStrings\" />\n        <IncludeRules context=\"FindSubstitutions\" />\n        <IncludeRules context=\"FindOthers\" />\n      </context>\n\n      <!-- StringSQ consumes anything till ' -->\n      <context attribute=\"String SingleQ\" lineEndContext=\"#stay\" name=\"StringSQ\">\n        <DetectChar attribute=\"String SingleQ\" context=\"#pop\" char=\"'\" />\n      </context>\n\n      <!-- StringDQ consumes anything till \", substitutes vars and expressions -->\n      <context attribute=\"String DoubleQ\" lineEndContext=\"#stay\" name=\"StringDQ\">\n        <DetectChar attribute=\"String DoubleQ\" context=\"#pop\" char=\"&quot;\" />\n        <RegExpr attribute=\"String Escape\" context=\"#stay\" String=\"\\\\[`&quot;\\\\$\\n]\" />\n        <IncludeRules context=\"FindSubstitutions\" />\n      </context>\n\n      <!-- StringEsc eats till ', but escaping many characters -->\n      <context attribute=\"String SingleQ\" lineEndContext=\"#stay\" name=\"StringEsc\">\n        <DetectChar attribute=\"String SingleQ\" context=\"#pop\" char=\"'\" />\n        <RegExpr attribute=\"String Escape\" context=\"#stay\" String=\"\\\\[abefnrtv\\\\']\" />\n        <RegExpr attribute=\"String Escape\" context=\"#stay\" String=\"\\\\([0-7]{1,3}|x[A-Fa-f0-9]{1,2}|c.)\" />\n      </context>\n\n      <!-- VarBrace is called as soon as ${xxx is encoutered -->\n      <context attribute=\"Error\" lineEndContext=\"#stay\" name=\"VarBrace\">\n        <DetectChar attribute=\"Variable\" context=\"#pop\" char=\"}\" />\n        <DetectChar attribute=\"Variable\" context=\"Subscript\" char=\"[\" />\n        <RegExpr attribute=\"Variable\" context=\"VarAlt\" String=\"(:?[-=?+]|##?|%%?)\" />\n        <RegExpr attribute=\"Variable\" context=\"VarSubst\" String=\"//?\" />\n        <DetectChar attribute=\"Variable\" context=\"VarSub\" char=\":\" />\n      </context>\n\n      <!-- VarAlt is to handle default/alternate/etc values of variables -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"VarAlt\">\n        <DetectChar attribute=\"Variable\" context=\"#pop#pop\" char=\"}\" />\n        <IncludeRules context=\"FindStrings\" />\n        <IncludeRules context=\"FindSubstitutions\" />\n      </context>\n\n      <!-- VarSubst is to handle substitutions on variables -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"VarSubst\">\n        <DetectChar attribute=\"Variable\" context=\"#pop#pop\" char=\"}\" />\n        <DetectChar attribute=\"Variable\" context=\"VarSubst2\" char=\"/\" />\n        <IncludeRules context=\"FindStrings\" />\n        <IncludeRules context=\"FindSubstitutions\" />\n      </context>\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"VarSubst2\">\n        <DetectChar attribute=\"Variable\" context=\"#pop#pop#pop\" char=\"}\" />\n        <IncludeRules context=\"FindStrings\" />\n        <IncludeRules context=\"FindSubstitutions\" />\n      </context>\n\n      <!-- VarSub is to substrings of variables -->\n      <context attribute=\"Error\" lineEndContext=\"#stay\" name=\"VarSub\">\n        <DetectChar attribute=\"Variable\" context=\"VarSub2\" char=\":\" />\n        <DetectChar attribute=\"Variable\" context=\"#pop#pop\" char=\"}\" />\n        <RegExpr attribute=\"Variable\" context=\"#stay\" String=\"&varname;\" />\n        <RegExpr attribute=\"Variable\" context=\"#stay\" String=\"[0-9]+(?=[:}])\" />\n        <IncludeRules context=\"FindSubstitutions\" />\n      </context>\n      <context attribute=\"Error\" lineEndContext=\"#stay\" name=\"VarSub2\">\n        <DetectChar attribute=\"Variable\" context=\"#pop#pop#pop\" char=\"}\" />\n        <RegExpr attribute=\"Variable\" context=\"#stay\" String=\"&varname;\" />\n        <RegExpr attribute=\"Variable\" context=\"#stay\" String=\"[0-9](?=[:}])\" />\n        <IncludeRules context=\"FindSubstitutions\" />\n      </context>\n\n\n      <!-- SubstFile is called after a <( or >( is encoutered -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"SubstFile\">\n        <DetectChar attribute=\"Redirection\" context=\"#pop\" char=\")\" />\n        <IncludeRules context=\"FindCommentsParen\" />\n        <IncludeRules context=\"FindStrings\" />\n        <IncludeRules context=\"FindSubstitutions\" />\n        <IncludeRules context=\"FindOthers\" />\n      </context>\n\n      <!-- SubstCommand is called after a $( is encountered -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"SubstCommand\">\n        <DetectChar attribute=\"Variable\" context=\"#pop\" char=\")\" />\n        <IncludeRules context=\"FindCommentsParen\" />\n        <IncludeRules context=\"FindCommands\" />\n        <IncludeRules context=\"FindStrings\" />\n        <IncludeRules context=\"FindSubstitutions\" />\n        <IncludeRules context=\"FindOthers\" />\n      </context>\n\n      <!-- SubstBackq is called when a backquote is encountered -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"SubstBackq\">\n        <DetectChar attribute=\"Backquote\" context=\"#pop\" char=\"`\" />\n        <IncludeRules context=\"FindCommentsBackq\" />\n        <IncludeRules context=\"FindCommandsBackq\" />\n        <IncludeRules context=\"FindStrings\" />\n        <IncludeRules context=\"FindSubstitutions\" />\n        <IncludeRules context=\"FindOthers\" />\n      </context>\n\n      <!-- Case is called after the case keyword is encoutered. We handle this because of\n           the lonely closing parentheses that would otherwise disturb the expr matching -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Case\">\n        <RegExpr attribute=\"Keyword\" context=\"CaseIn\" String=\"\\sin\\b\" />\n        <IncludeRules context=\"FindMost\" />\n      </context>\n\n      <!-- CaseIn is called when the construct 'case ... in' has been found. -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"CaseIn\">\n        <RegExpr attribute=\"Keyword\" context=\"#pop#pop\" String=\"\\besac(?=$|[\\s;)])\" endRegion=\"case\" />\n        <DetectChar attribute=\"Keyword\" context=\"CaseExpr\" char=\")\" beginRegion=\"caseexpr\" />\n        <AnyChar attribute=\"Keyword\" context=\"#stay\" String=\"(|\" />\n        <IncludeRules context=\"FindMost\" />\n      </context>\n\n      <!-- CaseExpr eats shell input till ;; -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"CaseExpr\">\n        <Detect2Chars attribute=\"Keyword\" context=\"#pop\" char=\";\" char1=\";\" endRegion=\"caseexpr\" />\n        <RegExpr attribute=\"Keyword\" context=\"#pop\" String=\"esac(?=$|[\\s;)])\" lookAhead=\"true\" firstNonSpace=\"true\" endRegion=\"caseexpr\"/>\n        <IncludeRules context=\"FindAll\" />\n      </context>\n\n      <!-- HereDoc consumes Here-documents. It is called at the beginning of the \"<<\" construct. -->\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"HereDoc\">\n        <RegExpr attribute=\"Redirection\" context=\"HereDocIQ\"  String=\"(&lt;&lt;-\\s*&quot;(&word;)&quot;)\" lookAhead=\"true\" />\n        <RegExpr attribute=\"Redirection\" context=\"HereDocIQ\"  String=\"(&lt;&lt;-\\s*'(&word;)')\" lookAhead=\"true\" />\n        <RegExpr attribute=\"Redirection\" context=\"HereDocIQ\"  String=\"(&lt;&lt;-\\s*\\\\(&word;))\" lookAhead=\"true\" />\n        <RegExpr attribute=\"Redirection\" context=\"HereDocINQ\" String=\"(&lt;&lt;-\\s*(&word;))\" lookAhead=\"true\" />\n        <RegExpr attribute=\"Redirection\" context=\"HereDocQ\"   String=\"(&lt;&lt;\\s*&quot;(&word;)&quot;)\" lookAhead=\"true\" />\n        <RegExpr attribute=\"Redirection\" context=\"HereDocQ\"   String=\"(&lt;&lt;\\s*'(&word;)')\" lookAhead=\"true\" />\n        <RegExpr attribute=\"Redirection\" context=\"HereDocQ\"   String=\"(&lt;&lt;\\s*\\\\(&word;))\" lookAhead=\"true\" />\n        <RegExpr attribute=\"Redirection\" context=\"HereDocNQ\"  String=\"(&lt;&lt;\\s*(&word;))\" lookAhead=\"true\" />\n        <StringDetect attribute=\"Redirection\" context=\"#pop\"  String=\"&lt;&lt;\" /><!-- always met -->\n      </context>\n\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"HereDocRemainder\">\n        <IncludeRules context=\"FindAll\" />\n      </context>\n\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"HereDocQ\" dynamic=\"true\">\n        <RegExpr attribute=\"Redirection\" context=\"HereDocRemainder\" String=\"%1\" dynamic=\"true\" />\n        <RegExpr attribute=\"Redirection\" context=\"#pop#pop\" String=\"^%2\\b\" dynamic=\"true\" column=\"0\"/>\n      </context>\n\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"HereDocNQ\" dynamic=\"true\">\n        <RegExpr attribute=\"Redirection\" context=\"HereDocRemainder\" String=\"%1\" dynamic=\"true\" />\n        <RegExpr attribute=\"Redirection\" context=\"#pop#pop\" String=\"^%2\\b\" dynamic=\"true\" column=\"0\"/>\n        <IncludeRules context=\"FindSubstitutions\" />\n      </context>\n\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"HereDocIQ\" dynamic=\"true\">\n        <RegExpr attribute=\"Redirection\" context=\"HereDocRemainder\" String=\"%1\" dynamic=\"true\" />\n        <RegExpr attribute=\"Redirection\" context=\"#pop#pop\" String=\"^\\t*%2\\b\" dynamic=\"true\" column=\"0\"/>\n      </context>\n\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"HereDocINQ\" dynamic=\"true\">\n        <RegExpr attribute=\"Redirection\" context=\"HereDocRemainder\" String=\"%1\" dynamic=\"true\" />\n        <RegExpr attribute=\"Redirection\" context=\"#pop#pop\" String=\"^\\t*%2\\b\" dynamic=\"true\" column=\"0\"/>\n        <IncludeRules context=\"FindSubstitutions\" />\n      </context>\n\n    </contexts>\n\n    <itemDatas>\n      <itemData name=\"Normal Text\"\tdefStyleNum=\"dsNormal\" />\n      <itemData name=\"Comment\"\t\tdefStyleNum=\"dsComment\" />\n      <itemData name=\"Keyword\"\t\tdefStyleNum=\"dsKeyword\" />\n      <itemData name=\"Control\"\t\tdefStyleNum=\"dsKeyword\" />\n      <itemData name=\"Builtin\"\t\tdefStyleNum=\"dsKeyword\" color=\"#808\" />\n      <itemData name=\"Command\"\t\tdefStyleNum=\"dsKeyword\" color=\"#c0c\" />\n      <itemData name=\"OtherCommand\"\tdefStyleNum=\"dsKeyword\" color=\"#303\" />\n      <itemData name=\"Redirection\"\tdefStyleNum=\"dsKeyword\" color=\"#238\" />\n      <itemData name=\"Escape\"\t\tdefStyleNum=\"dsDataType\" />\n      <itemData name=\"String SingleQ\"\tdefStyleNum=\"dsString\" />\n      <itemData name=\"String DoubleQ\"\tdefStyleNum=\"dsString\" />\n      <itemData name=\"Backquote\"\tdefStyleNum=\"dsKeyword\" />\n      <itemData name=\"String Transl.\"\tdefStyleNum=\"dsString\" />\n      <itemData name=\"String Escape\"\tdefStyleNum=\"dsDataType\" />\n      <itemData name=\"Variable\" \tdefStyleNum=\"dsOthers\" />\n      <itemData name=\"Expression\"\tdefStyleNum=\"dsOthers\" />\n      <itemData name=\"Function\" \tdefStyleNum=\"dsFunction\" />\n      <itemData name=\"Path\"\t\tdefStyleNum=\"dsNormal\" />\n      <itemData name=\"Option\"\t\tdefStyleNum=\"dsNormal\" />\n      <itemData name=\"Error\"\t\tdefStyleNum=\"dsError\" />\n    </itemDatas>\n  </highlighting>\n  <general>\n    <comments>\n      <comment name=\"singleLine\" start=\"#\"/>\n    </comments>\n    <keywords casesensitive=\"1\" weakDeliminator=\"^%#[]$._{}:-/\" additionalDeliminator=\"`\"/>\n  </general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/c.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<language name=\"C\" section=\"Sources\"\n          version=\"1.44\" kateversion=\"2.4\"\n          indenter=\"cstyle\"\n          extensions=\"*.c;*.C;*.h\"\n          mimetype=\"text/x-csrc;text/x-c++src;text/x-chdr\"\n          priority=\"5\">\n<!--\n##########################################################################\n## Fixes by Sebastian Pipping (webmaster@hartwork.org)\n##\n## NOTE: Keep in sync with C++ highlighter! (cpp.xml)\n##########################################################################\n-->\n  <highlighting>\n    <list name=\"keywords\">\n      <item> break </item>\n      <item> case </item>\n      <item> continue </item>\n      <item> default </item>\n      <item> do </item>\n      <item> else </item>\n      <item> enum </item>\n      <item> extern </item>\n      <item> for </item>\n      <item> goto </item>\n      <item> if </item>\n      <item> inline </item>\n      <item> return </item>\n      <item> sizeof </item>\n      <item> struct </item>\n      <item> switch </item>\n      <item> typedef </item>\n      <item> union </item>\n      <item> while </item>\n    </list>\n    <list name=\"types\">\n      <item> auto </item>\n      <item> char </item>\n      <item> const </item>\n      <item> double </item>\n      <item> float </item>\n      <item> int </item>\n      <item> long </item>\n      <item> register </item>\n      <item> restrict </item>\n      <item> short </item>\n      <item> signed </item>\n      <item> static </item>\n      <item> unsigned </item>\n      <item> void </item>\n      <item> volatile </item>\n      <item> int8_t </item>\n      <item> int16_t </item>\n      <item> int32_t </item>\n      <item> int64_t </item>\n      <item> uint8_t </item>\n      <item> uint16_t </item>\n      <item> uint32_t </item>\n      <item> uint64_t </item>\n      <item> wchar_t </item>\n      <item> _Imaginary </item>\n      <item> _Complex </item>\n      <item> _Bool </item>\n    </list>\n    <contexts>\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Normal\">\n        <DetectSpaces />\n\t<RegExpr attribute=\"Preprocessor\" context=\"Outscoped\" String=\"#\\s*if\\s+0\\s*$\" beginRegion=\"PP\" firstNonSpace=\"true\" />\n        <DetectChar context=\"AfterHash\" char=\"#\" firstNonSpace=\"true\" lookAhead=\"true\" />\n        <StringDetect attribute=\"Region Marker\" context=\"Region Marker\" String=\"//BEGIN\" beginRegion=\"Region1\" firstNonSpace=\"true\" />\n        <StringDetect attribute=\"Region Marker\" context=\"Region Marker\" String=\"//END\" endRegion=\"Region1\" firstNonSpace=\"true\" />\n        <keyword attribute=\"Keyword\" context=\"#stay\" String=\"keywords\"/>\n        <keyword attribute=\"Data Type\" context=\"#stay\" String=\"types\"/>\n        <DetectIdentifier />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"{\" beginRegion=\"Brace1\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"}\" endRegion=\"Brace1\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"(\" beginRegion=\"Brace2\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\")\" endRegion=\"Brace2\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"[\" beginRegion=\"Brace3\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"]\" endRegion=\"Brace3\" />\n        <Float attribute=\"Float\" context=\"#stay\">\n          <AnyChar String=\"fF\" attribute=\"Float\" context=\"#stay\"/>\n        </Float>\n        <HlCOct attribute=\"Octal\" context=\"#stay\"/>\n        <HlCHex attribute=\"Hex\" context=\"#stay\"/>\n        <Int attribute=\"Decimal\" context=\"#stay\" >\n          <StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"ULL\" insensitive=\"TRUE\"/>\n          <StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"LUL\" insensitive=\"TRUE\"/>\n          <StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"LLU\" insensitive=\"TRUE\"/>\n          <StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"UL\" insensitive=\"TRUE\"/>\n          <StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"LU\" insensitive=\"TRUE\"/>\n          <StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"LL\" insensitive=\"TRUE\"/>\n          <StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"U\" insensitive=\"TRUE\"/>\n          <StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"L\" insensitive=\"TRUE\"/>\n        </Int>\n        <HlCChar attribute=\"Char\" context=\"#stay\"/>\n        <DetectChar attribute=\"String\" context=\"String\" char=\"&quot;\"/>\n        <IncludeRules context=\"##Doxygen\" />\n        <Detect2Chars attribute=\"Comment\" context=\"Commentar 1\" char=\"/\" char1=\"/\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"Commentar 2\" char=\"/\" char1=\"*\" beginRegion=\"Comment\"/>\n        <AnyChar attribute=\"Symbol\" context=\"#stay\" String=\":!%&amp;()+,-/.*&lt;=&gt;?[]|~^&#59;\"/>\n      </context>\n\n      <context attribute=\"String\" lineEndContext=\"#pop\" name=\"String\">\n        <LineContinue attribute=\"String\" context=\"#stay\"/>\n        <HlCStringChar attribute=\"String Char\" context=\"#stay\"/>\n        <DetectChar attribute=\"String\" context=\"#pop\" char=\"&quot;\"/>\n      </context>\n\n      <context attribute=\"Region Marker\" lineEndContext=\"#pop\" name=\"Region Marker\">\n      </context>\n\n      <context attribute=\"Comment\" lineEndContext=\"#pop\" name=\"Commentar 1\">\n        <LineContinue attribute=\"Comment\" context=\"#stay\"/>\n        <IncludeRules context=\"##Alerts\" />\n      </context>\n\n      <context attribute=\"Comment\" lineEndContext=\"#stay\" name=\"Commentar 2\">\n        <Detect2Chars attribute=\"Comment\" context=\"#pop\" char=\"*\" char1=\"/\" endRegion=\"Comment\"/>\n        <IncludeRules context=\"##Alerts\" />\n      </context>\n\n      <context attribute=\"Error\" lineEndContext=\"#pop\" name=\"AfterHash\">\n        <!-- define, elif, else, endif, error, if, ifdef, ifndef, include, include_next, line, pragma, undef, warning -->\n        <RegExpr attribute=\"Preprocessor\" context=\"Preprocessor\" String=\"#\\s*if(?:def|ndef)?(?=\\s+\\S)\" insensitive=\"true\" beginRegion=\"PP\" firstNonSpace=\"true\" />\n        <RegExpr attribute=\"Preprocessor\" context=\"Preprocessor\" String=\"#\\s*endif\" insensitive=\"true\" endRegion=\"PP\" firstNonSpace=\"true\" />\n        <RegExpr attribute=\"Preprocessor\" context=\"Define\" String=\"#\\s*define.*((?=\\\\))\" insensitive=\"true\" firstNonSpace=\"true\" />\n        <RegExpr attribute=\"Preprocessor\" context=\"Preprocessor\" String=\"#\\s*(?:el(?:se|if)|include(?:_next)?|define|undef|line|error|warning|pragma)\" insensitive=\"true\" firstNonSpace=\"true\" />\n        <RegExpr attribute=\"Preprocessor\" context=\"Preprocessor\" String=\"#\\s+[0-9]+\" insensitive=\"true\" firstNonSpace=\"true\" />\n      </context>\n\n      <context attribute=\"Preprocessor\" lineEndContext=\"#pop\" name=\"Preprocessor\">\n        <LineContinue attribute=\"Preprocessor\" context=\"#stay\"/>\n        <RangeDetect attribute=\"Prep. Lib\" context=\"#stay\" char=\"&quot;\" char1=\"&quot;\"/>\n        <RangeDetect attribute=\"Prep. Lib\" context=\"#stay\" char=\"&lt;\" char1=\"&gt;\"/>\n        <IncludeRules context=\"##Doxygen\" />\n        <Detect2Chars attribute=\"Comment\" context=\"Commentar/Preprocessor\" char=\"/\" char1=\"*\" beginRegion=\"Comment2\" />\n      </context>\n\n      <context attribute=\"Preprocessor\" lineEndContext=\"#pop\" name=\"Define\">\n        <LineContinue attribute=\"Preprocessor\" context=\"#stay\"/>\n      </context>\n\n      <context attribute=\"Comment\" lineEndContext=\"#stay\" name=\"Commentar/Preprocessor\">\n        <Detect2Chars attribute=\"Comment\" context=\"#pop\" char=\"*\" char1=\"/\" endRegion=\"Comment2\" />\n      </context>\n\n      <context attribute=\"Comment\" lineEndContext=\"#stay\" name=\"Outscoped\" >\n        <DetectSpaces />\n        <IncludeRules context=\"##Alerts\" />\n        <DetectIdentifier />\n        <DetectChar attribute=\"String\" context=\"String\" char=\"&quot;\"/>\n        <IncludeRules context=\"##Doxygen\" />\n        <Detect2Chars attribute=\"Comment\" context=\"Commentar 1\" char=\"/\" char1=\"/\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"Commentar 2\" char=\"/\" char1=\"*\" beginRegion=\"Comment\"/>\n        <RegExpr attribute=\"Comment\" context=\"Outscoped intern\" String=\"#\\s*if\" beginRegion=\"PP\" firstNonSpace=\"true\" />\n        <RegExpr attribute=\"Preprocessor\" context=\"#pop\" String=\"#\\s*el(?:se|if)\" firstNonSpace=\"true\" />\n        <RegExpr attribute=\"Preprocessor\" context=\"#pop\" String=\"#\\s*endif\" endRegion=\"PP\" firstNonSpace=\"true\" />\n      </context>\n\n      <context attribute=\"Comment\" lineEndContext=\"#stay\" name=\"Outscoped intern\">\n        <DetectSpaces />\n        <IncludeRules context=\"##Alerts\" />\n        <DetectIdentifier />\n        <DetectChar attribute=\"String\" context=\"String\" char=\"&quot;\"/>\n        <IncludeRules context=\"##Doxygen\" />\n        <Detect2Chars attribute=\"Comment\" context=\"Commentar 1\" char=\"/\" char1=\"/\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"Commentar 2\" char=\"/\" char1=\"*\" beginRegion=\"Comment\"/>\n        <RegExpr attribute=\"Comment\" context=\"Outscoped intern\" String=\"#\\s*if\" beginRegion=\"PP\" firstNonSpace=\"true\" />\n        <RegExpr attribute=\"Comment\" context=\"#pop\" String=\"#\\s*endif\" endRegion=\"PP\" firstNonSpace=\"true\" />\n      </context>\n    </contexts>\n    <itemDatas>\n      <itemData name=\"Normal Text\"  defStyleNum=\"dsNormal\" spellChecking=\"false\"/>\n      <itemData name=\"Keyword\"      defStyleNum=\"dsKeyword\" spellChecking=\"false\"/>\n      <itemData name=\"Data Type\"    defStyleNum=\"dsDataType\" spellChecking=\"false\"/>\n      <itemData name=\"Decimal\"      defStyleNum=\"dsDecVal\" spellChecking=\"false\"/>\n      <itemData name=\"Octal\"        defStyleNum=\"dsBaseN\" spellChecking=\"false\"/>\n      <itemData name=\"Hex\"          defStyleNum=\"dsBaseN\" spellChecking=\"false\"/>\n      <itemData name=\"Float\"        defStyleNum=\"dsFloat\" spellChecking=\"false\"/>\n      <itemData name=\"Char\"         defStyleNum=\"dsChar\" spellChecking=\"false\"/>\n      <itemData name=\"String\"       defStyleNum=\"dsString\"/>\n      <itemData name=\"String Char\"  defStyleNum=\"dsChar\"/>\n      <itemData name=\"Comment\"      defStyleNum=\"dsComment\"/>\n      <itemData name=\"Symbol\"       defStyleNum=\"dsNormal\" spellChecking=\"false\"/>\n      <itemData name=\"Preprocessor\" defStyleNum=\"dsOthers\" spellChecking=\"false\"/>\n      <itemData name=\"Prep. Lib\"    defStyleNum=\"dsOthers\" spellChecking=\"false\"/> <!--,Qt::darkYellow,Qt::yellow,false,false)); -->\n      <itemData name=\"Alert\"        defStyleNum=\"dsAlert\" spellChecking=\"false\"/>\n      <itemData name=\"Region Marker\" defStyleNum=\"dsRegionMarker\" spellChecking=\"false\"/>\n      <itemData name=\"Error\"        defStyleNum=\"dsError\" spellChecking=\"false\"/>\n    </itemDatas>\n  </highlighting>\n  <general>\n    <comments>\n      <comment name=\"singleLine\" start=\"//\" />\n      <comment name=\"multiLine\" start=\"/*\" end=\"*/\" />\n    </comments>\n    <keywords casesensitive=\"1\" additionalDeliminator=\"'&quot;\" />\n  </general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/cmake.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<!--\n  This file is part of KDE's kate project.\n\n  Copyright 2004 Alexander Neundorf (neundorf@kde.org)\n  Copyright 2005 Dominik Haumann (dhdev@gmx.de)\n  Copyright 2007,2008 Matthew Woehlke (mw_triad@users.sourceforge.net)\n\n **********************************************************************\n * This library is free software; you can redistribute it and/or      *\n * modify it under the terms of the GNU Lesser General Public         *\n * License as published by the Free Software Foundation; either       *\n * version 2 of the License, or (at your option) any later version.   *\n *                                                                    *\n * This library is distributed in the hope that it will be useful,    *\n * but WITHOUT ANY WARRANTY; without even the implied warranty of     *\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  *\n * Lesser General Public License for more details.                    *\n *                                                                    *\n * You should have received a copy of the GNU Lesser General Public   *\n * License along with this library; if not, write to the              *\n * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,   *\n * Boston, MA  02110-1301, USA.                                       *\n **********************************************************************\n -->\n<!-- generated for \"cmake version 2.8.10.2\" -->\n<language name=\"CMake\" version=\"1.14\" kateversion=\"2.4\" section=\"Other\" extensions=\"CMakeLists.txt;*.cmake;\" mimetype=\"\" author=\"Alexander Neundorf (neundorf@kde.org)\" license=\"LGPL\">\n  <highlighting>\n\n    <list name = \"commands\">\n      <!-- generated list -->\n      <item> add_custom_command </item>\n      <item> add_custom_target </item>\n      <item> add_definitions </item>\n      <item> add_dependencies </item>\n      <item> add_executable </item>\n      <item> add_library </item>\n      <item> add_subdirectory </item>\n      <item> add_test </item>\n      <item> aux_source_directory </item>\n      <item> break </item>\n      <item> build_command </item>\n      <item> build_name </item>\n      <item> cmake_minimum_required </item>\n      <item> cmake_policy </item>\n      <item> configure_file </item>\n      <item> create_test_sourcelist </item>\n      <item> define_property </item>\n      <item> else </item>\n      <item> elseif </item>\n      <item> enable_language </item>\n      <item> enable_testing </item>\n      <item> endforeach </item>\n      <item> endfunction </item>\n      <item> endif </item>\n      <item> endmacro </item>\n      <item> endwhile </item>\n      <item> exec_program </item>\n      <item> execute_process </item>\n      <item> export </item>\n      <item> export_library_dependencies </item>\n      <item> file </item>\n      <item> find_file </item>\n      <item> find_library </item>\n      <item> find_package </item>\n      <item> find_path </item>\n      <item> find_program </item>\n      <item> fltk_wrap_ui </item>\n      <item> foreach </item>\n      <item> function </item>\n      <item> get_cmake_property </item>\n      <item> get_directory_property </item>\n      <item> get_filename_component </item>\n      <item> get_property </item>\n      <item> get_source_file_property </item>\n      <item> get_target_property </item>\n      <item> get_test_property </item>\n      <item> if </item>\n      <item> include </item>\n      <item> include_directories </item>\n      <item> include_external_msproject </item>\n      <item> include_regular_expression </item>\n      <item> install </item>\n      <item> install_files </item>\n      <item> install_programs </item>\n      <item> install_targets </item>\n      <item> link_directories </item>\n      <item> link_libraries </item>\n      <item> list </item>\n      <item> load_cache </item>\n      <item> load_command </item>\n      <item> macro </item>\n      <item> make_directory </item>\n      <item> mark_as_advanced </item>\n      <item> math </item>\n      <item> message </item>\n      <item> option </item>\n      <item> output_required_files </item>\n      <item> project </item>\n      <item> qt_wrap_cpp </item>\n      <item> qt_wrap_ui </item>\n      <item> remove </item>\n      <item> remove_definitions </item>\n      <item> return </item>\n      <item> separate_arguments </item>\n      <item> set </item>\n      <item> set_directory_properties </item>\n      <item> set_property </item>\n      <item> set_source_files_properties </item>\n      <item> set_target_properties </item>\n      <item> set_tests_properties </item>\n      <item> site_name </item>\n      <item> source_group </item>\n      <item> string </item>\n      <item> subdir_depends </item>\n      <item> subdirs </item>\n      <item> target_link_libraries </item>\n      <item> try_compile </item>\n      <item> try_run </item>\n      <item> unset </item>\n      <item> use_mangled_mesa </item>\n      <item> utility_source </item>\n      <item> variable_requires </item>\n      <item> variable_watch </item>\n      <item> while </item>\n      <item> write_file </item>\n    </list>\n\n    <list name=\"itkvtk_commands\">\n      <item> itk_wrap_tcl </item>\n      <item> vtk_make_instantiator </item>\n      <item> vtk_wrap_java </item>\n      <item> vtk_wrap_python </item>\n      <item> vtk_wrap_tcl </item>\n    </list>\n\n    <list name=\"special_args\">\n      <!-- generated list -->\n      <item> A </item>\n      <item> ABSOLUTE </item>\n      <item> AFTER </item>\n      <item> ALL </item>\n      <item> ALPHABET </item>\n      <item> AND </item>\n      <item> APPEND </item>\n      <item> APPEND_STRING </item>\n      <item> ARCHIVE </item>\n      <item> ARGS </item>\n      <item> ASCII </item>\n      <item> AUTHOR_WARNING </item>\n      <item> B </item>\n      <item> BEFORE </item>\n      <item> BRIEF_DOCS </item>\n      <item> BUNDLE </item>\n      <item> CACHE </item>\n      <item> CLEAR </item>\n      <item> CMAKE_FIND_ROOT_PATH_BOTH </item>\n      <item> CMAKE_FLAGS </item>\n      <item> CODE </item>\n      <item> COMMAND </item>\n      <item> COMMAND_NAME </item>\n      <item> COMMENT </item>\n      <item> COMPARE </item>\n      <item> COMPILE_DEFINITIONS </item>\n      <item> COMPILE_OUTPUT_VARIABLE </item>\n      <item> COMPILE_RESULT_VAR </item>\n      <item> COMPONENT </item>\n      <item> COMPONENTS </item>\n      <item> CONFIG </item>\n      <item> CONFIGS </item>\n      <item> CONFIGURATION </item>\n      <item> CONFIGURATIONS </item>\n      <item> CONFIGURE </item>\n      <item> COPYONLY </item>\n      <item> COPY_FILE </item>\n      <item> CRLF </item>\n      <item> DEFINED </item>\n      <item> DEFINITION </item>\n      <item> DEPENDS </item>\n      <item> DESTINATION </item>\n      <item> DIRECTORY </item>\n      <item> DIRECTORY_PERMISSIONS </item>\n      <item> DOC </item>\n      <item> DOS </item>\n      <item> DOWNLOAD </item>\n      <item> ENV </item>\n      <item> EQUAL </item>\n      <item> ERROR_FILE </item>\n      <item> ERROR_QUIET </item>\n      <item> ERROR_STRIP_TRAILING_WHITESPACE </item>\n      <item> ERROR_VARIABLE </item>\n      <item> ESCAPE_QUOTES </item>\n      <item> EXACT </item>\n      <item> EXCLUDE </item>\n      <item> EXCLUDE_FROM_ALL </item>\n      <item> EXISTS </item>\n      <item> EXPECTED_HASH </item>\n      <item> EXPECTED_MD5 </item>\n      <item> EXPORT </item>\n      <item> EXPR </item>\n      <item> EXT </item>\n      <item> EXTRA_INCLUDE </item>\n      <item> FATAL_ERROR </item>\n      <item> FILE </item>\n      <item> FILES </item>\n      <item> FILES_MATCHING </item>\n      <item> FILE_PERMISSIONS </item>\n      <item> FIND </item>\n      <item> FOLLOW_SYMLINKS </item>\n      <item> FOO </item>\n      <item> FORCE </item>\n      <item> FRAMEWORK </item>\n      <item> FULL_DOCS </item>\n      <item> FUNCTION </item>\n      <item> GET </item>\n      <item> GLOB </item>\n      <item> GLOBAL </item>\n      <item> GLOB_RECURSE </item>\n      <item> GREATER </item>\n      <item> GROUP_EXECUTE </item>\n      <item> GROUP_READ </item>\n      <item> GUID </item>\n      <item> HEX </item>\n      <item> HINTS </item>\n      <item> IMPLICIT_DEPENDS </item>\n      <item> IMPORTED </item>\n      <item> IN </item>\n      <item> INACTIVITY_TIMEOUT </item>\n      <item> INCLUDE_INTERNALS </item>\n      <item> INHERITED </item>\n      <item> INPUT_FILE </item>\n      <item> INSERT </item>\n      <item> IS_ABSOLUTE </item>\n      <item> IS_DIRECTORY </item>\n      <item> IS_NEWER_THAN </item>\n      <item> IS_SYMLINK </item>\n      <item> ITEMS </item>\n      <item> LENGTH </item>\n      <item> LENGTH_MAXIMUM </item>\n      <item> LENGTH_MINIMUM </item>\n      <item> LESS </item>\n      <item> LF </item>\n      <item> LIBRARY </item>\n      <item> LIMIT </item>\n      <item> LIMIT_COUNT </item>\n      <item> LIMIT_INPUT </item>\n      <item> LIMIT_OUTPUT </item>\n      <item> LINK_INTERFACE_LIBRARIES </item>\n      <item> LISTS </item>\n      <item> LOG </item>\n      <item> MACOSX_BUNDLE </item>\n      <item> MAIN_DEPENDENCY </item>\n      <item> MAKE_DIRECTORY </item>\n      <item> MATCH </item>\n      <item> MATCHALL </item>\n      <item> MATCHES </item>\n      <item> MODULE </item>\n      <item> NAME </item>\n      <item> NAMELINK_ONLY </item>\n      <item> NAMELINK_SKIP </item>\n      <item> NAMES </item>\n      <item> NAMESPACE </item>\n      <item> NAME_WE </item>\n      <item> NEW </item>\n      <item> NEWLINE_CONSUME </item>\n      <item> NEWLINE_STYLE </item>\n      <item> NOT </item>\n      <item> NOTEQUAL </item>\n      <item> NO_CMAKE_BUILDS_PATH </item>\n      <item> NO_CMAKE_ENVIRONMENT_PATH </item>\n      <item> NO_CMAKE_FIND_ROOT_PATH </item>\n      <item> NO_CMAKE_PACKAGE_REGISTRY </item>\n      <item> NO_CMAKE_PATH </item>\n      <item> NO_CMAKE_SYSTEM_PACKAGE_REGISTRY </item>\n      <item> NO_CMAKE_SYSTEM_PATH </item>\n      <item> NO_DEFAULT_PATH </item>\n      <item> NO_HEX_CONVERSION </item>\n      <item> NO_MODULE </item>\n      <item> NO_POLICY_SCOPE </item>\n      <item> NO_SOURCE_PERMISSIONS </item>\n      <item> NO_SYSTEM_ENVIRONMENT_PATH </item>\n      <item> OBJECT </item>\n      <item> OFFSET </item>\n      <item> OLD </item>\n      <item> ONLY_CMAKE_FIND_ROOT_PATH </item>\n      <item> OPTIONAL </item>\n      <item> OPTIONAL_COMPONENTS </item>\n      <item> OR </item>\n      <item> OUTPUT </item>\n      <item> OUTPUT_DIRECTORY </item>\n      <item> OUTPUT_FILE </item>\n      <item> OUTPUT_QUIET </item>\n      <item> OUTPUT_STRIP_TRAILING_WHITESPACE </item>\n      <item> OUTPUT_VARIABLE </item>\n      <item> OWNER_EXECUTE </item>\n      <item> OWNER_READ </item>\n      <item> OWNER_WRITE </item>\n      <item> PACKAGE </item>\n      <item> PARENT_SCOPE </item>\n      <item> PATH </item>\n      <item> PATHS </item>\n      <item> PATH_SUFFIXES </item>\n      <item> PATH_TO_MESA </item>\n      <item> PATTERN </item>\n      <item> PERMISSIONS </item>\n      <item> PLATFORM </item>\n      <item> POLICY </item>\n      <item> POP </item>\n      <item> POST_BUILD </item>\n      <item> PREORDER </item>\n      <item> PRE_BUILD </item>\n      <item> PRE_LINK </item>\n      <item> PRIVATE_HEADER </item>\n      <item> PROGRAM </item>\n      <item> PROGRAMS </item>\n      <item> PROGRAM_ARGS </item>\n      <item> PROJECT_NAME </item>\n      <item> PROPERTIES </item>\n      <item> PROPERTY </item>\n      <item> PUBLIC_HEADER </item>\n      <item> PUSH </item>\n      <item> QUIET </item>\n      <item> RANDOM </item>\n      <item> RANDOM_SEED </item>\n      <item> RANGE </item>\n      <item> READ </item>\n      <item> READ_WITH_PREFIX </item>\n      <item> REALPATH </item>\n      <item> REGEX </item>\n      <item> REGULAR_EXPRESSION </item>\n      <item> RELATIVE </item>\n      <item> RELATIVE_PATH </item>\n      <item> REMOVE </item>\n      <item> REMOVE_AT </item>\n      <item> REMOVE_DUPLICATES </item>\n      <item> REMOVE_ITEM </item>\n      <item> REMOVE_RECURSE </item>\n      <item> RENAME </item>\n      <item> REPLACE </item>\n      <item> REQUIRED </item>\n      <item> REQUIRED_VARIABLE1 </item>\n      <item> REQUIRED_VARIABLE2 </item>\n      <item> RESOURCE </item>\n      <item> RESULT_VAR </item>\n      <item> RESULT_VARIABLE </item>\n      <item> RETURN_VALUE </item>\n      <item> REVERSE </item>\n      <item> RUNTIME </item>\n      <item> RUNTIME_DIRECTORY </item>\n      <item> RUN_OUTPUT_VARIABLE </item>\n      <item> RUN_RESULT_VAR </item>\n      <item> SCRIPT </item>\n      <item> SEND_ERROR </item>\n      <item> SET </item>\n      <item> SHA1 </item>\n      <item> SHA224 </item>\n      <item> SHA256 </item>\n      <item> SHA384 </item>\n      <item> SHARED </item>\n      <item> SHOW_PROGRESS </item>\n      <item> SORT </item>\n      <item> SOURCE </item>\n      <item> SOURCES </item>\n      <item> STATIC </item>\n      <item> STATUS </item>\n      <item> STREQUAL </item>\n      <item> STRGREATER </item>\n      <item> STRINGS </item>\n      <item> STRIP </item>\n      <item> STRLESS </item>\n      <item> SUBSTRING </item>\n      <item> SYSTEM </item>\n      <item> TARGET </item>\n      <item> TARGETS </item>\n      <item> TEST </item>\n      <item> TEST_VARIABLE </item>\n      <item> TIMEOUT </item>\n      <item> TLS_CAINFO </item>\n      <item> TLS_VERIFY </item>\n      <item> TOLOWER </item>\n      <item> TOUPPER </item>\n      <item> TO_CMAKE_PATH </item>\n      <item> TO_NATIVE_PATH </item>\n      <item> TYPE </item>\n      <item> UNIX </item>\n      <item> UPLOAD </item>\n      <item> USE_SOURCE_PERMISSIONS </item>\n      <item> VALUE </item>\n      <item> VAR </item>\n      <item> VAR2 </item>\n      <item> VARIABLE </item>\n      <item> VERBATIM </item>\n      <item> VERSION </item>\n      <item> VERSION_EQUAL </item>\n      <item> VERSION_GREATER </item>\n      <item> VERSION_LESS </item>\n      <item> WARNING </item>\n      <item> WIN32 </item>\n      <item> WORKING_DIRECTORY </item>\n      <item> WRITE </item>\n    </list>\n\n    <!-- these are \"special\" and don't show up in the generated lists -->\n    <list name=\"extra_special_args\">\n      <item> GLOBAL </item>\n      <item> INTERNAL </item>\n    </list>\n\n    <list name=\"properties\">\n      <!-- generated list -->\n      <item> ABSTRACT </item>\n      <item> ADDITIONAL_MAKE_CLEAN_FILES </item>\n      <item> ADVANCED </item>\n      <item> ALLOW_DUPLICATE_CUSTOM_TARGETS </item>\n      <item> ARCHIVE_OUTPUT_DIRECTORY </item>\n      <item> ARCHIVE_OUTPUT_NAME </item>\n      <item> ATTACHED_FILES </item>\n      <item> ATTACHED_FILES_ON_FAIL </item>\n      <item> AUTOMOC </item>\n      <item> AUTOMOC_MOC_OPTIONS </item>\n      <item> BUILD_WITH_INSTALL_RPATH </item>\n      <item> BUNDLE </item>\n      <item> BUNDLE_EXTENSION </item>\n      <item> CACHE_VARIABLES </item>\n      <item> CLEAN_NO_CUSTOM </item>\n      <item> COMPILE_DEFINITIONS </item>\n      <item> COMPILE_FLAGS </item>\n      <item> COST </item>\n      <item> DEBUG_CONFIGURATIONS </item>\n      <item> DEBUG_POSTFIX </item>\n      <item> DEFINE_SYMBOL </item>\n      <item> DEFINITIONS </item>\n      <item> DEPENDS </item>\n      <item> DISABLED_FEATURES </item>\n      <item> ENABLED_FEATURES </item>\n      <item> ENABLED_LANGUAGES </item>\n      <item> ENABLE_EXPORTS </item>\n      <item> ENVIRONMENT </item>\n      <item> EXCLUDE_FROM_ALL </item>\n      <item> EXTERNAL_OBJECT </item>\n      <item> EchoString </item>\n      <item> FAIL_REGULAR_EXPRESSION </item>\n      <item> FIND_LIBRARY_USE_LIB64_PATHS </item>\n      <item> FIND_LIBRARY_USE_OPENBSD_VERSIONING </item>\n      <item> FOLDER </item>\n      <item> FRAMEWORK </item>\n      <item> Fortran_FORMAT </item>\n      <item> Fortran_MODULE_DIRECTORY </item>\n      <item> GENERATED </item>\n      <item> GENERATOR_FILE_NAME </item>\n      <item> GLOBAL_DEPENDS_DEBUG_MODE </item>\n      <item> GLOBAL_DEPENDS_NO_CYCLES </item>\n      <item> GNUtoMS </item>\n      <item> HAS_CXX </item>\n      <item> HEADER_FILE_ONLY </item>\n      <item> HELPSTRING </item>\n      <item> IMPLICIT_DEPENDS_INCLUDE_TRANSFORM </item>\n      <item> IMPORTED </item>\n      <item> IMPORTED_CONFIGURATIONS </item>\n      <item> IMPORTED_IMPLIB </item>\n      <item> IMPORTED_LINK_DEPENDENT_LIBRARIES </item>\n      <item> IMPORTED_LINK_INTERFACE_LANGUAGES </item>\n      <item> IMPORTED_LINK_INTERFACE_LIBRARIES </item>\n      <item> IMPORTED_LINK_INTERFACE_MULTIPLICITY </item>\n      <item> IMPORTED_LOCATION </item>\n      <item> IMPORTED_NO_SONAME </item>\n      <item> IMPORTED_SONAME </item>\n      <item> IMPORT_PREFIX </item>\n      <item> IMPORT_SUFFIX </item>\n      <item> INCLUDE_DIRECTORIES </item>\n      <item> INCLUDE_REGULAR_EXPRESSION </item>\n      <item> INSTALL_NAME_DIR </item>\n      <item> INSTALL_RPATH </item>\n      <item> INSTALL_RPATH_USE_LINK_PATH </item>\n      <item> INTERPROCEDURAL_OPTIMIZATION </item>\n      <item> IN_TRY_COMPILE </item>\n      <item> KEEP_EXTENSION </item>\n      <item> LABELS </item>\n      <item> LANGUAGE </item>\n      <item> LIBRARY_OUTPUT_DIRECTORY </item>\n      <item> LIBRARY_OUTPUT_NAME </item>\n      <item> LINKER_LANGUAGE </item>\n      <item> LINK_DEPENDS </item>\n      <item> LINK_DIRECTORIES </item>\n      <item> LINK_FLAGS </item>\n      <item> LINK_INTERFACE_LIBRARIES </item>\n      <item> LINK_INTERFACE_MULTIPLICITY </item>\n      <item> LINK_SEARCH_END_STATIC </item>\n      <item> LINK_SEARCH_START_STATIC </item>\n      <item> LISTFILE_STACK </item>\n      <item> LOCATION </item>\n      <item> MACOSX_BUNDLE </item>\n      <item> MACOSX_BUNDLE_INFO_PLIST </item>\n      <item> MACOSX_FRAMEWORK_INFO_PLIST </item>\n      <item> MACOSX_PACKAGE_LOCATION </item>\n      <item> MACROS </item>\n      <item> MEASUREMENT </item>\n      <item> MODIFIED </item>\n      <item> NO_SONAME </item>\n      <item> OBJECT_DEPENDS </item>\n      <item> OBJECT_OUTPUTS </item>\n      <item> OSX_ARCHITECTURES </item>\n      <item> OUTPUT_NAME </item>\n      <item> PACKAGES_FOUND </item>\n      <item> PACKAGES_NOT_FOUND </item>\n      <item> PARENT_DIRECTORY </item>\n      <item> PASS_REGULAR_EXPRESSION </item>\n      <item> PDB_NAME </item>\n      <item> PDB_OUTPUT_DIRECTORY </item>\n      <item> POSITION_INDEPENDENT_CODE </item>\n      <item> POST_INSTALL_SCRIPT </item>\n      <item> PREDEFINED_TARGETS_FOLDER </item>\n      <item> PREFIX </item>\n      <item> PRE_INSTALL_SCRIPT </item>\n      <item> PRIVATE_HEADER </item>\n      <item> PROCESSORS </item>\n      <item> PROJECT_LABEL </item>\n      <item> PUBLIC_HEADER </item>\n      <item> REPORT_UNDEFINED_PROPERTIES </item>\n      <item> REQUIRED_FILES </item>\n      <item> RESOURCE </item>\n      <item> RESOURCE_LOCK </item>\n      <item> RULE_LAUNCH_COMPILE </item>\n      <item> RULE_LAUNCH_CUSTOM </item>\n      <item> RULE_LAUNCH_LINK </item>\n      <item> RULE_MESSAGES </item>\n      <item> RUNTIME_OUTPUT_DIRECTORY </item>\n      <item> RUNTIME_OUTPUT_NAME </item>\n      <item> RUN_SERIAL </item>\n      <item> SKIP_BUILD_RPATH </item>\n      <item> SOURCES </item>\n      <item> SOVERSION </item>\n      <item> STATIC_LIBRARY_FLAGS </item>\n      <item> STRINGS </item>\n      <item> SUFFIX </item>\n      <item> SYMBOLIC </item>\n      <item> TARGET_ARCHIVES_MAY_BE_SHARED_LIBS </item>\n      <item> TARGET_SUPPORTS_SHARED_LIBS </item>\n      <item> TEST_INCLUDE_FILE </item>\n      <item> TIMEOUT </item>\n      <item> TYPE </item>\n      <item> USE_FOLDERS </item>\n      <item> VALUE </item>\n      <item> VARIABLES </item>\n      <item> VERSION </item>\n      <item> VS_DOTNET_REFERENCES </item>\n      <item> VS_GLOBAL_KEYWORD </item>\n      <item> VS_GLOBAL_PROJECT_TYPES </item>\n      <item> VS_KEYWORD </item>\n      <item> VS_SCC_AUXPATH </item>\n      <item> VS_SCC_LOCALPATH </item>\n      <item> VS_SCC_PROJECTNAME </item>\n      <item> VS_SCC_PROVIDER </item>\n      <item> VS_WINRT_EXTENSIONS </item>\n      <item> VS_WINRT_REFERENCES </item>\n      <item> WILL_FAIL </item>\n      <item> WIN32_EXECUTABLE </item>\n      <item> WORKING_DIRECTORY </item>\n      <item> WRAP_EXCLUDE </item>\n      <item> __CMAKE_DELETE_CACHE_CHANGE_VARS_ </item>\n    </list>\n\n    <!-- these are \"special\" and don't show up in the generated lists -->\n    <list name=\"extra_properties\">\n      <item> COMMANDS </item> <!-- WARNING: this one looks like a cmake bug, watch for it to migrate to the generated list! -->\n      <item> DEFINITION </item>\n    </list>\n\n    <contexts>\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Normal Text\">\n        <DetectSpaces/>\n        <keyword attribute=\"Commands\" context=\"Command Args\" String=\"commands\" insensitive=\"true\"/>\n        <keyword attribute=\"Third-Party Commands\" context=\"#stay\" String=\"itkvtk_commands\" insensitive=\"true\"/>\n        <RegExpr attribute=\"Region Marker\" context=\"#stay\" String=\"#\\s*BEGIN.*$\" beginRegion=\"block\" firstNonSpace=\"true\"/>\n        <RegExpr attribute=\"Region Marker\" context=\"#stay\" String=\"#\\s*END.*$\" endRegion=\"block\" firstNonSpace=\"true\"/>\n        <DetectChar attribute=\"Comment\" context=\"Comment\" char=\"#\"/>\n        <IncludeRules context=\"Detect Variables\"/>\n        <RegExpr attribute=\"Macros\" context=\"Macro Args\" String=\"\\w+\\s*(?=\\()\"/>\n      </context>\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Detect Variables\">\n        <RegExpr attribute=\"Environment Variable\" context=\"#stay\" String=\"\\$ENV\\{\\s*\\w+\\s*\\}\"/>\n        <RegExpr attribute=\"CMake Variable\" context=\"#stay\" String=\"\\$\\{\\s*\\w+\\s*\\}\"/>\n      </context>\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Command Args\">\n        <keyword attribute=\"Special Args\" context=\"#stay\" String=\"special_args\"/>\n        <keyword attribute=\"Special Args\" context=\"#stay\" String=\"extra_special_args\"/>\n        <keyword attribute=\"Properties\" context=\"#stay\" String=\"properties\"/>\n        <keyword attribute=\"Properties\" context=\"#stay\" String=\"extra_properties\"/>\n        <IncludeRules context=\"Macro Args\"/>\n      </context>\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Macro Args\">\n        <DetectChar attribute=\"Normal Text\" context=\"#pop\" char=\")\"/>\n        <StringDetect attribute=\"Escapes\" context=\"#stay\" String=\"\\&quot;\"/>\n        <DetectChar attribute=\"Strings\" context=\"String\" char=\"&quot;\"/>\n        <RegExpr attribute=\"Comment\" context=\"#stay\" String=\"#.*$\"/>\n        <IncludeRules context=\"Detect Variables\"/>\n      </context>\n      <context attribute=\"Comment\" lineEndContext=\"#pop\" name=\"Comment\">\n        <IncludeRules context=\"##Alerts\" />\n      </context>\n      <context attribute=\"Strings\" lineEndContext=\"#stay\" name=\"String\">\n        <RegExpr attribute=\"Strings\" context=\"#pop\" String=\"&quot;(?=[ );]|$)\" />\n        <RegExpr attribute=\"Escapes\" context=\"#stay\" String=\"\\\\[&quot;$n\\\\]\" />\n        <IncludeRules context=\"Detect Variables\"/>\n      </context>\n\n    </contexts>\n    <itemDatas>\n      <itemData name=\"Normal Text\" defStyleNum=\"dsNormal\"/>\n      <itemData name=\"Special Args\" defStyleNum=\"dsOthers\"/>\n      <itemData name=\"Properties\" defStyleNum=\"dsOthers\"/>\n      <itemData name=\"Commands\" defStyleNum=\"dsKeyword\"/>\n      <itemData name=\"Third-Party Commands\" defStyleNum=\"dsFunction\"/>\n      <itemData name=\"Macros\"  defStyleNum=\"dsFunction\"/>\n      <itemData name=\"Strings\" defStyleNum=\"dsString\"/>\n      <itemData name=\"Escapes\" defStyleNum=\"dsChar\"/>\n      <itemData name=\"CMake Variable\" defStyleNum=\"dsDecVal\"/>\n      <itemData name=\"Environment Variable\" defStyleNum=\"dsFloat\"/>\n      <itemData name=\"Comment\" defStyleNum=\"dsComment\"/>\n      <itemData name=\"Region Marker\" defStyleNum=\"dsRegionMarker\"/>\n    </itemDatas>\n  </highlighting>\n\n  <general>\n    <comments>\n      <comment name=\"singleLine\" start=\"#\"/>\n    </comments>\n    <keywords casesensitive=\"1\"/>\n  </general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/cpp.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<language name=\"C++\" section=\"Sources\"\n          version=\"1.47\" kateversion=\"2.4\"\n          indenter=\"cstyle\"\n          mimetype=\"text/x-c++src;text/x-c++hdr;text/x-chdr\"\n          extensions=\"*.c++;*.cxx;*.cpp;*.cc;*.C;*.h;*.hh;*.H;*.h++;*.hxx;*.hpp;*.hcc;*.moc\"\n          priority=\"9\">\n<!--\n##########################################################################\n## Fixes by Sebastian Pipping (webmaster@hartwork.org)\n##\n## NOTE: Keep in sync with C highlighter! (c.xml)\n##########################################################################\n-->\n  <highlighting>\n    <list name=\"keywords\">\n      <item> asm </item>\n      <item> break </item>\n      <item> case </item>\n      <item> catch </item>\n      <item> class </item>\n      <item> const_cast </item>\n      <item> continue </item>\n      <item> default </item>\n      <item> delete </item>\n      <item> do </item>\n      <item> dynamic_cast</item>\n      <item> else </item>\n      <item> enum </item>\n      <item> explicit </item>\n      <item> export </item>\n      <item> extern </item>\n      <item> false </item>\n      <item> friend </item>\n      <item> for </item>\n      <item> goto </item>\n      <item> if </item>\n      <item> inline </item>\n      <item> namespace </item>\n      <item> new </item>\n      <item> operator </item>\n      <item> private </item>\n      <item> protected </item>\n      <item> public </item>\n      <item> qobject_cast </item>\n      <item> reinterpret_cast </item>\n      <item> return </item>\n      <item> sizeof </item>\n      <item> static_cast </item>\n      <item> struct </item>\n      <item> switch </item>\n      <item> template </item>\n      <item> this </item>\n      <item> throw </item>\n      <item> true </item>\n      <item> try </item>\n      <item> typedef </item>\n      <item> typeid </item>\n      <item> type_info </item>\n      <item> typename </item>\n      <item> union </item>\n      <item> using </item>\n      <item> virtual </item>\n      <item> while </item>\n\n      <item> and </item>\n      <item> and_eq </item>\n      <item> bad_cast </item>\n      <item> bad_typeid </item>\n      <item> bitand </item>\n      <item> bitor </item>\n      <item> compl </item>\n      <item> not </item>\n      <item> not_eq </item>\n      <item> or </item>\n      <item> or_eq </item>\n      <item> xor </item>\n      <item> xor_eq </item>\n    </list>\n    <list name=\"extensions\">\n      <item> K_DCOP </item>\n      <item> Q_ARG </item>\n      <item> Q_ASSERT </item>\n      <item> Q_ASSERT_X </item>\n      <item> Q_CHECK_PTR </item>\n      <item> Q_CLASSINFO </item>\n      <item> Q_CLEANUP_RESOURCE </item>\n      <item> Q_D </item>\n      <item> Q_DECLARE_FLAGS </item>\n      <item> Q_DECLARE_FLAGS </item>\n      <item> Q_DECLARE_INTERFACE </item>\n      <item> Q_DECLARE_METATYPE </item>\n      <item> Q_DECLARE_OPERATORS_FOR_FLAGS </item>\n      <item> Q_DECLARE_PRIVATE </item>\n      <item> Q_DECLARE_PUBLIC </item>\n      <item> Q_DECLARE_SHARED </item>\n      <item> Q_DECLARE_TYPEINFO </item>\n      <item> Q_DISABLE_COPY </item>\n      <item> Q_ENUMS </item>\n      <item> Q_EXPORT </item>\n      <item> Q_FLAGS </item>\n      <item> Q_FOREACH </item>\n      <item> Q_FOREVER </item>\n      <item> Q_GADGET </item>\n      <item> Q_GLOBAL_STATIC </item>\n      <item> Q_GLOBAL_STATIC_WITH_ARGS </item>\n      <item> Q_INIT_RESOURCE </item>\n      <item> Q_INTERFACES </item>\n      <item> Q_INVOKABLE </item>\n      <item> Q_NOREPLY </item>\n      <item> Q_OBJECT </item>\n      <item> Q_OVERRIDE </item>\n      <item> Q_PRIVATE_SLOT </item>\n      <item> Q_PROPERTY </item>\n      <item> Q_Q </item>\n      <item> Q_RETURN_ARG </item>\n      <item> Q_SCRIPTABLE </item>\n      <item> Q_SETS </item>\n      <item> Q_SIGNALS </item>\n      <item> Q_SLOTS </item>\n      <item> Q_UNUSED </item>\n      <item> SIGNAL </item>\n      <item> SLOT </item>\n      <item> TRUE </item>\n      <item> FALSE </item>\n      <item> connect </item>\n      <item> disconnect </item>\n      <item> emit </item>\n      <item> signals </item>\n      <item> slots </item>\n      <item> foreach </item>\n      <item> forever </item>\n\n      <item> qint8 </item>\n      <item> qint16 </item>\n      <item> qint32 </item>\n      <item> qint64 </item>\n      <item> qlonglong </item>\n      <item> qptrdiff </item>\n      <item> qreal </item>\n      <item> quint8 </item>\n      <item> quint16 </item>\n      <item> quint32 </item>\n      <item> quint64 </item>\n      <item> quintptr </item>\n      <item> qulonglong </item>\n    </list>\n    <list name=\"types\">\n      <item> auto </item>\n      <item> bool </item>\n      <item> char </item>\n      <item> const </item>\n      <item> double </item>\n      <item> float </item>\n      <item> int </item>\n      <item> long </item>\n      <item> mutable </item>\n      <item> register </item>\n      <item> short </item>\n      <item> signed </item>\n      <item> static </item>\n      <item> unsigned </item>\n      <item> void </item>\n      <item> volatile </item>\n      <item> uchar </item>\n      <item> uint </item>\n      <item> int8_t </item>\n      <item> int16_t </item>\n      <item> int32_t </item>\n      <item> int64_t </item>\n      <item> uint8_t </item>\n      <item> uint16_t </item>\n      <item> uint32_t </item>\n      <item> uint64_t </item>\n      <item> wchar_t </item>\n    </list>\n    <contexts>\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Normal\">\n        <DetectSpaces />\n        <RegExpr attribute=\"Preprocessor\" context=\"Outscoped\" String=\"#\\s*if\\s+0\\s*$\" beginRegion=\"PP\" firstNonSpace=\"true\" />\n        <DetectChar context=\"AfterHash\" char=\"#\" firstNonSpace=\"true\" lookAhead=\"true\" />\n        <StringDetect attribute=\"Region Marker\" context=\"Region Marker\" String=\"//BEGIN\" beginRegion=\"Region1\" firstNonSpace=\"true\" />\n        <StringDetect attribute=\"Region Marker\" context=\"Region Marker\" String=\"//END\" endRegion=\"Region1\" firstNonSpace=\"true\" />\n        <keyword attribute=\"Keyword\" context=\"#stay\" String=\"keywords\" />\n        <keyword attribute=\"Extensions\" context=\"#stay\" String=\"extensions\" />\n        <keyword attribute=\"Data Type\" context=\"#stay\" String=\"types\" />\n        <HlCChar attribute=\"Char\" context=\"#stay\"/>\n        <DetectChar attribute=\"String\" context=\"String\" char=\"&quot;\"/>\n        <DetectIdentifier />\n        <Float attribute=\"Float\" context=\"#stay\">\n          <AnyChar String=\"fF\" attribute=\"Float\" context=\"#stay\"/>\n        </Float>\n        <HlCOct attribute=\"Octal\" context=\"#stay\"/>\n        <HlCHex attribute=\"Hex\" context=\"#stay\"/>\n        <Int attribute=\"Decimal\" context=\"#stay\">\n          <StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"ULL\" insensitive=\"TRUE\"/>\n          <StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"LUL\" insensitive=\"TRUE\"/>\n          <StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"LLU\" insensitive=\"TRUE\"/>\n          <StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"UL\" insensitive=\"TRUE\"/>\n          <StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"LU\" insensitive=\"TRUE\"/>\n          <StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"LL\" insensitive=\"TRUE\"/>\n          <StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"U\" insensitive=\"TRUE\"/>\n          <StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"L\" insensitive=\"TRUE\"/>\n        </Int>\n        <IncludeRules context=\"##Doxygen\" />\n        <Detect2Chars attribute=\"Comment\" context=\"Commentar 1\" char=\"/\" char1=\"/\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"Commentar 2\" char=\"/\" char1=\"*\" beginRegion=\"Comment\"/>\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"{\" beginRegion=\"Brace1\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"}\" endRegion=\"Brace1\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"(\" beginRegion=\"Brace2\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\")\" endRegion=\"Brace2\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"[\" beginRegion=\"Brace3\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"]\" endRegion=\"Brace3\" />\n        <AnyChar attribute=\"Symbol\" context=\"#stay\" String=\":!%&amp;()+,-/.*&lt;=&gt;?[]{|}~^&#59;\"/>\n      </context>\n\n      <context attribute=\"String\" lineEndContext=\"#pop\" name=\"String\">\n        <LineContinue attribute=\"String\" context=\"#stay\"/>\n        <HlCStringChar attribute=\"String Char\" context=\"#stay\"/>\n        <DetectChar attribute=\"String\" context=\"#pop\" char=\"&quot;\"/>\n      </context>\n\n      <context attribute=\"Region Marker\" lineEndContext=\"#pop\" name=\"Region Marker\">\n      </context>\n\n      <context attribute=\"Comment\" lineEndContext=\"#pop\" name=\"Commentar 1\">\n        <LineContinue attribute=\"Comment\" context=\"#stay\"/>\n        <DetectSpaces />\n        <IncludeRules context=\"##Alerts\" />\n        <DetectIdentifier />\n      </context>\n\n      <context attribute=\"Comment\" lineEndContext=\"#stay\" name=\"Commentar 2\">\n        <DetectSpaces />\n        <Detect2Chars attribute=\"Comment\" context=\"#pop\" char=\"*\" char1=\"/\" endRegion=\"Comment\"/>\n        <IncludeRules context=\"##Alerts\" />\n        <DetectIdentifier />\n      </context>\n\n      <context attribute=\"Error\" lineEndContext=\"#pop\" name=\"AfterHash\">\n        <!-- define, elif, else, endif, error, if, ifdef, ifndef, include, include_next, line, pragma, undef, warning -->\n        <RegExpr attribute=\"Preprocessor\" context=\"Preprocessor\" String=\"#\\s*if(?:def|ndef)?(?=\\s+\\S)\" insensitive=\"true\" beginRegion=\"PP\" firstNonSpace=\"true\" />\n        <RegExpr attribute=\"Preprocessor\" context=\"Preprocessor\" String=\"#\\s*endif\" insensitive=\"true\" endRegion=\"PP\" firstNonSpace=\"true\" />\n        <RegExpr attribute=\"Preprocessor\" context=\"Define\" String=\"#\\s*define.*((?=\\\\))\" insensitive=\"true\" firstNonSpace=\"true\" />\n        <RegExpr attribute=\"Preprocessor\" context=\"Preprocessor\" String=\"#\\s*(?:el(?:se|if)|include(?:_next)?|define|undef|line|error|warning|pragma)\" insensitive=\"true\" firstNonSpace=\"true\" />\n        <RegExpr attribute=\"Preprocessor\" context=\"Preprocessor\" String=\"#\\s+[0-9]+\" insensitive=\"true\" firstNonSpace=\"true\" />\n      </context>\n\n      <context attribute=\"Preprocessor\" lineEndContext=\"#pop\" name=\"Preprocessor\">\n        <LineContinue attribute=\"Preprocessor\" context=\"#stay\"/>\n        <RangeDetect attribute=\"Prep. Lib\" context=\"#stay\" char=\"&quot;\" char1=\"&quot;\"/>\n        <RangeDetect attribute=\"Prep. Lib\" context=\"#stay\" char=\"&lt;\" char1=\"&gt;\"/>\n        <IncludeRules context=\"##Doxygen\" />\n        <Detect2Chars attribute=\"Comment\" context=\"Commentar/Preprocessor\" char=\"/\" char1=\"*\" beginRegion=\"Comment2\" />\n\n        <Detect2Chars attribute=\"Comment\" context=\"Commentar 1\" char=\"/\" char1=\"/\"/>\n      </context>\n\n      <context attribute=\"Preprocessor\" lineEndContext=\"#pop\" name=\"Define\">\n        <LineContinue attribute=\"Preprocessor\" context=\"#stay\"/>\n      </context>\n\n      <context attribute=\"Comment\" lineEndContext=\"#stay\" name=\"Commentar/Preprocessor\">\n        <DetectSpaces />\n        <Detect2Chars attribute=\"Comment\" context=\"#pop\" char=\"*\" char1=\"/\" endRegion=\"Comment2\" />\n        <DetectIdentifier />\n      </context>\n\n      <context attribute=\"Comment\" lineEndContext=\"#stay\" name=\"Outscoped\" >\n        <DetectSpaces />\n        <IncludeRules context=\"##Alerts\" />\n        <DetectIdentifier />\n        <IncludeRules context=\"##Doxygen\" />\n        <Detect2Chars attribute=\"Comment\" context=\"Commentar 1\" char=\"/\" char1=\"/\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"Commentar 2\" char=\"/\" char1=\"*\" beginRegion=\"Comment\"/>\n        <RegExpr attribute=\"Comment\" context=\"Outscoped intern\" String=\"#\\s*if\" beginRegion=\"PP\" firstNonSpace=\"true\" />\n        <RegExpr attribute=\"Preprocessor\" context=\"#pop\" String=\"#\\s*el(?:se|if)\" firstNonSpace=\"true\" />\n        <RegExpr attribute=\"Preprocessor\" context=\"#pop\" String=\"#\\s*endif\" endRegion=\"PP\" firstNonSpace=\"true\" />\n      </context>\n\n      <context attribute=\"Comment\" lineEndContext=\"#stay\" name=\"Outscoped intern\">\n        <DetectSpaces />\n        <IncludeRules context=\"##Alerts\" />\n        <DetectIdentifier />\n        <DetectChar attribute=\"String\" context=\"String\" char=\"&quot;\"/>\n        <IncludeRules context=\"##Doxygen\" />\n        <Detect2Chars attribute=\"Comment\" context=\"Commentar 1\" char=\"/\" char1=\"/\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"Commentar 2\" char=\"/\" char1=\"*\" beginRegion=\"Comment\"/>\n        <RegExpr attribute=\"Comment\" context=\"Outscoped intern\" String=\"#\\s*if\" beginRegion=\"PP\" firstNonSpace=\"true\" />\n        <RegExpr attribute=\"Comment\" context=\"#pop\" String=\"#\\s*endif\" endRegion=\"PP\" firstNonSpace=\"true\" />\n      </context>\n    </contexts>\n    <itemDatas>\n      <itemData name=\"Normal Text\"  defStyleNum=\"dsNormal\" spellChecking=\"false\"/>\n      <itemData name=\"Keyword\"      defStyleNum=\"dsKeyword\" spellChecking=\"false\"/>\n      <itemData name=\"Extensions\"   defStyleNum=\"dsKeyword\" color=\"#0095ff\" selColor=\"#ffffff\" bold=\"1\" italic=\"0\" spellChecking=\"false\"/>\n      <itemData name=\"Data Type\"    defStyleNum=\"dsDataType\" spellChecking=\"false\"/>\n      <itemData name=\"Decimal\"      defStyleNum=\"dsDecVal\" spellChecking=\"false\"/>\n      <itemData name=\"Octal\"        defStyleNum=\"dsBaseN\" spellChecking=\"false\"/>\n      <itemData name=\"Hex\"          defStyleNum=\"dsBaseN\" spellChecking=\"false\"/>\n      <itemData name=\"Float\"        defStyleNum=\"dsFloat\" spellChecking=\"false\"/>\n      <itemData name=\"Char\"         defStyleNum=\"dsChar\" spellChecking=\"false\"/>\n      <itemData name=\"String\"       defStyleNum=\"dsString\"/>\n      <itemData name=\"String Char\"  defStyleNum=\"dsChar\"/>\n      <itemData name=\"Comment\"      defStyleNum=\"dsComment\"/>\n      <itemData name=\"Symbol\"       defStyleNum=\"dsNormal\" spellChecking=\"false\"/>\n      <itemData name=\"Preprocessor\" defStyleNum=\"dsOthers\" spellChecking=\"false\"/>\n      <itemData name=\"Prep. Lib\"    defStyleNum=\"dsOthers\" spellChecking=\"false\"/>\n      <itemData name=\"Region Marker\" defStyleNum=\"dsRegionMarker\" spellChecking=\"false\"/>\n      <itemData name=\"Error\"        defStyleNum=\"dsError\" spellChecking=\"false\"/>\n    </itemDatas>\n  </highlighting>\n  <general>\n    <comments>\n      <comment name=\"singleLine\" start=\"//\" />\n      <comment name=\"multiLine\" start=\"/*\" end=\"*/\" region=\"Comment\"/>\n    </comments>\n    <keywords casesensitive=\"1\" />\n  </general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/css.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n\n<!--\n\nKate CSS syntax highlighting definition\n\nChangelog:\n\n- Version 2.06, by Mte90:\n- CSS3 tag\n\n- Version 2.03, by Milian Wolff:\n- Make it spelling aware\n\n-->\n\n<language name=\"CSS\" version=\"2.06\" kateversion=\"2.4\" section=\"Markup\" extensions=\"*.css;*.qss\" indenter=\"cstyle\" mimetype=\"text/css\" author=\"Wilbert Berendsen (wilbert@kde.nl)\" license=\"LGPL\">\n\n\t<highlighting>\n\t\t<list name=\"properties\">\n\t\t\t<!-- CSS2 -->\n\t\t\t<item> azimuth </item>\n\t\t\t<item> background </item>\n\t\t\t<item> background-attachment </item>\n\t\t\t<item> background-break </item>\n\t\t\t<item> background-clip </item>\n\t\t\t<item> background-color </item>\n\t\t\t<item> background-image </item>\n\t\t\t<item> background-position </item>\n\t\t\t<item> background-origin </item>\n\t\t\t<item> background-repeat </item>\n\t\t\t<item> border </item>\n\t\t\t<item> border-bottom </item>\n\t\t\t<item> border-bottom-color </item>\n\t\t\t<item> border-bottom-style </item>\n\t\t\t<item> border-bottom-width </item>\n\t\t\t<item> border-collapse </item>\n\t\t\t<item> border-color </item>\n\t\t\t<item> border-left </item>\n\t\t\t<item> border-left-color </item>\n\t\t\t<item> border-left-style </item>\n\t\t\t<item> border-left-width </item>\n\t\t\t<item> border-right </item>\n\t\t\t<item> border-right-color </item>\n\t\t\t<item> border-right-style </item>\n\t\t\t<item> border-right-width </item>\n\t\t\t<item> border-spacing </item>\n\t\t\t<item> border-style </item>\n\t\t\t<item> border-top </item>\n\t\t\t<item> border-top-color </item>\n\t\t\t<item> border-top-style </item>\n\t\t\t<item> border-top-width </item>\n\t\t\t<item> border-width </item>\n\t\t\t<item> bottom </item>\n\t\t\t<item> caption-side </item>\n\t\t\t<item> clear </item>\n\t\t\t<item> clip </item>\n\t\t\t<item> color </item>\n\t\t\t<item> content </item>\n\t\t\t<item> counter-increment </item>\n\t\t\t<item> counter-reset </item>\n\t\t\t<item> cue </item>\n\t\t\t<item> cue-after </item>\n\t\t\t<item> cue-before </item>\n\t\t\t<item> cursor </item>\n\t\t\t<item> direction </item>\n\t\t\t<item> display </item>\n\t\t\t<item> elevation </item>\n\t\t\t<item> empty-cells </item>\n\t\t\t<item> float </item>\n\t\t\t<item> font </item>\n\t\t\t<item> font-family </item>\n\t\t\t<item> font-size </item>\n\t\t\t<item> font-size-adjust </item>\n\t\t\t<item> font-stretch </item>\n\t\t\t<item> font-style </item>\n\t\t\t<item> font-variant </item>\n\t\t\t<item> font-weight </item>\n\t\t\t<item> font-stretch </item>\n\t\t\t<item> height </item>\n\t\t\t<item> left </item>\n\t\t\t<item> letter-spacing </item>\n\t\t\t<item> line-height </item>\n\t\t\t<item> list-style </item>\n\t\t\t<item> list-style-image </item>\n\t\t\t<item> list-style-keyword </item>\n\t\t\t<item> list-style-position </item>\n\t\t\t<item> list-style-type  </item>\n\t\t\t<item> margin </item>\n\t\t\t<item> margin-bottom </item>\n\t\t\t<item> margin-left </item>\n\t\t\t<item> margin-right </item>\n\t\t\t<item> margin-top </item>\n\t\t\t<item> marker-offset </item>\n\t\t\t<item> max-height </item>\n\t\t\t<item> max-width </item>\n\t\t\t<item> min-height </item>\n\t\t\t<item> min-width </item>\n\t\t\t<item> orphans </item>\n\t\t\t<item> outline </item>\n\t\t\t<item> outline-color </item>\n\t\t\t<item> outline-style </item>\n\t\t\t<item> outline-width </item>\n\t\t\t<item> overflow </item>\n\t\t\t<item> padding </item>\n\t\t\t<item> padding-bottom </item>\n\t\t\t<item> padding-left </item>\n\t\t\t<item> padding-right </item>\n\t\t\t<item> padding-top </item>\n\t\t\t<item> page </item>\n\t\t\t<item> page-break-after </item>\n\t\t\t<item> page-break-before </item>\n\t\t\t<item> page-break-inside </item>\n\t\t\t<item> pause </item>\n\t\t\t<item> pause-after </item>\n\t\t\t<item> pause-before </item>\n\t\t\t<item> pitch </item>\n\t\t\t<item> pitch-range </item>\n\t\t\t<item> play-during </item>\n\t\t\t<item> position </item>\n\t\t\t<item> quotes </item>\n\t\t\t<item> richness </item>\n\t\t\t<item> right </item>\n\t\t\t<item> size </item>\n\t\t\t<item> speak </item>\n\t\t\t<item> speak-header </item>\n\t\t\t<item> speak-numeral </item>\n\t\t\t<item> speak-punctuation </item>\n\t\t\t<item> speech-rate </item>\n\t\t\t<item> stress </item>\n\t\t\t<item> table-layout </item>\n\t\t\t<item> text-align </item>\n\t\t\t<item> text-decoration </item>\n\t\t\t<item> text-decoration-color </item>\n\t\t\t<item> text-indent </item>\n\t\t\t<item> text-shadow </item>\n\t\t\t<item> text-transform </item>\n\t\t\t<item> top </item>\n\t\t\t<item> unicode-bidi </item>\n\t\t\t<item> vertical-align </item>\n\t\t\t<item> visibility </item>\n\t\t\t<item> voice-family </item>\n\t\t\t<item> volume </item>\n\t\t\t<item> white-space </item>\n\t\t\t<item> widows </item>\n\t\t\t<item> width </item>\n\t\t\t<item> word-spacing </item>\n\t\t\t<item> z-index </item>\n\n\t\t\t<!-- CSS3 -->\n\t\t\t<item> animation-name </item>\n\t\t\t<item> animation-duration </item>\n\t\t\t<item> animation-iteration </item>\n\t\t\t<item> animation-direction </item>\n\t\t\t<item> animation-delay </item>\n\t\t\t<item> animation-play-state </item>\n\t\t\t<item> animation-fill-mode </item>\n\t\t\t<item> animation-timing-function </item>\n\t\t\t<item> background-size </item>\n\t\t\t<item> border-bottom-image </item>\n\t\t\t<item> border-bottom-left-image </item>\n\t\t\t<item> border-bottom-left-radius </item>\n\t\t\t<item> border-bottom-right-image </item>\n\t\t\t<item> border-bottom-right-radius </item>\n\t\t\t<item> border-collapse </item>\n\t\t\t<item> border-corner-image </item>\n\t\t\t<item> border-image </item>\n\t\t\t<item> border-left-image </item>\n\t\t\t<item> border-radius </item>\n\t\t\t<item> border-right-image </item>\n\t\t\t<item> border-top-image </item>\n\t\t\t<item> border-top-left-image </item>\n\t\t\t<item> border-top-left-radius </item>\n\t\t\t<item> border-top-right-image </item>\n\t\t\t<item> border-top-right-radius </item>\n\t\t\t<item> box-align </item>\n\t\t\t<item> box-direction </item>\n\t\t\t<item> box-flex </item>\n\t\t\t<item> box-shadow </item>\n\t\t\t<item> box-sizing </item>\n\t\t\t<item> column-count </item>\n\t\t\t<item> column-fill </item>\n\t\t\t<item> column-gap </item>\n\t\t\t<item> column-rule-color </item>\n\t\t\t<item> column-rule-style </item>\n\t\t\t<item> column-rule-width </item>\n\t\t\t<item> column-span </item>\n\t\t\t<item> column-wisth </item>\n\t\t\t<item> hyphens </item>\n\t\t\t<item> linear-gradient </item>\n\t\t\t<item> opacity </item>\n\t\t\t<item> outline </item>\n\t\t\t<item> outline-offset </item>\n\t\t\t<item> overflow-x </item>\n\t\t\t<item> overflow-y </item>\n\t\t\t<item> pointer-events </item>\n\t\t\t<item> resize </item>\n\t\t\t<item> rotation </item>\n\t\t\t<item> rotation-point </item>\n\t\t\t<item> table-layout </item>\n\t\t\t<item> text-overflow </item>\n\t\t\t<item> text-shadow </item>\n\t\t\t<item> text-wrap </item>\n\t\t\t<item> transform-origin </item>\n\t\t\t<item> transition </item>\n\t\t\t<item> transition-property </item>\n\t\t\t<item> transition-duration </item>\n\t\t\t<item> word-wrap </item>\n\n\t\t\t<!-- Gecko rendering engine CSS property extensions -->\n\t\t\t<item> -moz-animation-name </item>\n\t\t\t<item> -moz-animation-duration </item>\n\t\t\t<item> -moz-animation-iteration </item>\n\t\t\t<item> -moz-animation-direction </item>\n\t\t\t<item> -moz-animation-delay </item>\n\t\t\t<item> -moz-animation-play-state </item>\n\t\t\t<item> -moz-animation-fill-mode </item>\n\t\t\t<item> -moz-background-size </item>\n\t\t\t<item> -moz-border-image </item>\n\t\t\t<item> -moz-border-bottom-colors </item>\n\t\t\t<item> -moz-border-left-colors </item>\n\t\t\t<item> -moz-border-radius </item>\n\t\t\t<item> -moz-border-radius-topleft </item>\n\t\t\t<item> -moz-border-radius-topright </item>\n\t\t\t<item> -moz-border-radius-bottomleft </item>\n\t\t\t<item> -moz-border-radius-bottomright </item>\n\t\t\t<item> -moz-border-right-colors </item>\n\t\t\t<item> -moz-border-top-colors </item>\n\t\t\t<item> -moz-box </item>\n\t\t\t<item> -moz-box-flex </item>\n\t\t\t<item> -moz-box-shadow </item>\n\t\t\t<item> -moz-box-sizing </item>\n\t\t\t<item> -moz-column-count </item>\n\t\t\t<item> -moz-column-gap </item>\n\t\t\t<item> -moz-hyphens </item>\n\t\t\t<item> -moz-linear-gradient </item>\n\t\t\t<item> -moz-opacity </item>\n\t\t\t<item> -moz-outline-style </item>\n\t\t\t<item> -moz-perspective </item>\n\t\t\t<item> -moz-radial-gradient </item>\n\t\t\t<item> -moz-resize </item>\n\t\t\t<item> -moz-transform </item>\n\t\t\t<item> -moz-transform-origin </item>\n\t\t\t<item> -moz-transform-style </item>\n\t\t\t<item> -moz-transition </item>\n\t\t\t<item> -moz-transition-property </item>\n\t\t\t<item> -moz-transition-duration </item>\n\n\t\t\t<!-- Opera rendering engine CSS property extensions -->\n\t\t\t<item> -o-background-size </item>\n\t\t\t<item> -o-linear-gradient </item>\n\t\t\t<item> -o-text-overflow </item>\n\t\t\t<item> -o-transition </item>\n\t\t\t<item> -o-transform-origin </item>\n\n\t\t\t<!-- konq specific -->\n\t\t\t<item> konq_bgpos_x </item>\n\t\t\t<item> konq_bgpos_y </item>\n\t\t\t<item> -khtml-background-size </item>\n\t\t\t<item> -khtml-border-top-left-radius </item>\n\t\t\t<item> -khtml-border-top-right-radius </item>\n\t\t\t<item> -khtml-border-bottom-left-radius </item>\n\t\t\t<item> -khtml-border-bottom-right-radius </item>\n\t\t\t<item> -khtml-border-radius </item>\n\t\t\t<item> -khtml-box-shadow </item>\n\t\t\t<item> -khtml-opacity </item>\n\n\t\t\t<!-- Webkit rendering engine CSS property extensions -->\n\t\t\t<item> -webkit-appearance </item>\n\t\t\t<item> -webkit-animation-name </item>\n\t\t\t<item> -webkit-animation-duration </item>\n\t\t\t<item> -webkit-animation-iteration </item>\n\t\t\t<item> -webkit-animation-direction </item>\n\t\t\t<item> -webkit-animation-delay </item>\n\t\t\t<item> -webkit-animation-play-state </item>\n\t\t\t<item> -webkit-animation-fill-mode </item>\n\t\t\t<item> -webkit-background-size </item>\n\t\t\t<item> -webkit-border-image </item>\n\t\t\t<item> -webkit-border-bottom-colors </item>\n\t\t\t<item> -webkit-border-left-colors </item>\n\t\t\t<item> -webkit-border-radius </item>\n\t\t\t<item> -webkit-border-right-colors </item>\n\t\t\t<item> -webkit-border-top-colors </item>\n\t\t\t<item> -webkit-border-top-left-radius </item>\n\t\t\t<item> -webkit-border-top-right-radius </item>\n\t\t\t<item> -webkit-border-bottom-left-radius </item>\n\t\t\t<item> -webkit-border-bottom-right-radius </item>\n\t\t\t<item> -webkit-border-radius-bottomleft </item>\n\t\t\t<item> -webkit-border-radius-bottomright </item>\n\t\t\t<item> -webkit-box-flex </item>\n\t\t\t<item> -webkit-box-reflect</item>\n\t\t\t<item> -webkit-box-shadow </item>\n\t\t\t<item> -webkit-box-sizing </item>\n\t\t\t<item> -webkit-column-count </item>\n\t\t\t<item> -webkit-column-gap </item>\n\t\t\t<item> -webkit-hyphens </item>\n\t\t\t<item> -webkit-linear-gradient </item>\n\t\t\t<item> -webkit-gradient </item>\n\t\t\t<item> -webkit-perspective </item>\n\t\t\t<item> -webkit-text-fill-color </item>\n\t\t\t<item> -webkit-text-stroke-color </item>\n\t\t\t<item> -webkit-text-stroke-width </item>\n\t\t\t<item> -webkit-text-size-adjust </item>\n\t\t\t<item> -webkit-transform </item>\n\t\t\t<item> -webkit-transform-origin </item>\n\t\t\t<item> -webkit-transform-style </item>\n\t\t\t<item> -webkit-transition </item>\n\t\t\t<item> -webkit-transition-property </item>\n\t\t\t<item> -webkit-transition-duration </item>\n\n\t\t\t<!-- Trident (a.k.a., MSHTML) CSS property extensions -->\n\t\t\t<item> filter </item>\n\t\t\t<item> zoom </item>\n\t\t\t<item> -ms-animation-name </item>\n\t\t\t<item> -ms-animation-duration </item>\n\t\t\t<item> -ms-animation-iteration </item>\n\t\t\t<item> -ms-animation-direction </item>\n\t\t\t<item> -ms-animation-delay </item>\n\t\t\t<item> -ms-animation-play-state </item>\n\t\t\t<item> -ms-animation-fill-mode </item>\n\t\t\t<item> -ms-box-sizing </item>\n\t\t\t<item> -ms-filter </item>\n\t\t\t<item> -ms-interpolation-mode </item>\n\t\t\t<item> -ms-linear-gradient </item>\n\t\t\t<item> -ms-text-size-adjust </item>\n\t\t\t<item> -ms-transform </item>\n\t\t\t<item> -ms-transition </item>\n\n\t\t\t<!-- font properties in @font-face -->\n\t\t\t<item> font-family </item>\n\t\t\t<item> font-size </item>\n\t\t\t<item> font-stretch </item>\n\t\t\t<item> font-style </item>\n\t\t\t<item> font-variant </item>\n\t\t\t<item> font-weight </item>\n\t\t\t<item> unicode-range </item>\n\t\t\t<item> units-per-em </item>\n\t\t\t<item> src </item>\n\t\t\t<item> panose-1 </item>\n\t\t\t<item> stemv </item>\n\t\t\t<item> stemh </item>\n\t\t\t<item> slope </item>\n\t\t\t<item> cap-height </item>\n\t\t\t<item> x-height </item>\n\t\t\t<item> ascent </item>\n\t\t\t<item> descent </item>\n\t\t\t<item> widths </item>\n\t\t\t<item> bbox </item>\n\t\t\t<item> definition-src </item>\n\t\t\t<item> baseline </item>\n\t\t\t<item> centerline </item>\n\t\t\t<item> mathline </item>\n\t\t\t<item> topline </item>\n\t\t</list>\n\n\t\t<list name=\"types\">\n\t\t\t<item> inherit </item>\n\t\t\t<item> none </item>\n\t\t\t<item> hidden </item>\n\t\t\t<item> dotted </item>\n\t\t\t<item> dashed </item>\n\t\t\t<item> solid </item>\n\t\t\t<item> double </item>\n\t\t\t<item> groove </item>\n\t\t\t<item> ridge </item>\n\t\t\t<item> inset </item>\n\t\t\t<item> outset </item>\n\t\t\t<item> xx-small </item>\n\t\t\t<item> x-small </item>\n\t\t\t<item> small </item>\n\t\t\t<item> medium </item>\n\t\t\t<item> large </item>\n\t\t\t<item> x-large </item>\n\t\t\t<item> xx-large </item>\n\t\t\t<item> smaller </item>\n\t\t\t<item> larger </item>\n\t\t\t<item> italic </item>\n\t\t\t<item> oblique </item>\n\t\t\t<item> small-caps </item>\n\t\t\t<item> normal </item>\n\t\t\t<item> bold </item>\n\t\t\t<item> bolder </item>\n\t\t\t<item> lighter </item>\n\t\t\t<item> light </item>\n\t\t\t<item> 100 </item>\n\t\t\t<item> 200 </item>\n\t\t\t<item> 300 </item>\n\t\t\t<item> 400 </item>\n\t\t\t<item> 500 </item>\n\t\t\t<item> 600 </item>\n\t\t\t<item> 700 </item>\n\t\t\t<item> 800 </item>\n\t\t\t<item> 900 </item>\n\t\t\t<item> transparent </item>\n\t\t\t<item> repeat </item>\n\t\t\t<item> repeat-x </item>\n\t\t\t<item> repeat-y </item>\n\t\t\t<item> no-repeat </item>\n\t\t\t<item> baseline </item>\n\t\t\t<item> sub </item>\n\t\t\t<item> super </item>\n\t\t\t<item> top </item>\n\t\t\t<item> text-top </item>\n\t\t\t<item> middle </item>\n\t\t\t<item> bottom </item>\n\t\t\t<item> text-bottom </item>\n\t\t\t<item> left </item>\n\t\t\t<item> right </item>\n\t\t\t<item> center </item>\n\t\t\t<item> justify </item>\n\t\t\t<item> konq-center </item>\n\t\t\t<item> disc </item>\n\t\t\t<item> circle </item>\n\t\t\t<item> square </item>\n\t\t\t<item> box </item>\n\t\t\t<item> decimal </item>\n\t\t\t<item> decimal-leading-zero </item>\n\t\t\t<item> lower-roman </item>\n\t\t\t<item> upper-roman </item>\n\t\t\t<item> lower-greek </item>\n\t\t\t<item> lower-alpha </item>\n\t\t\t<item> lower-latin </item>\n\t\t\t<item> upper-alpha </item>\n\t\t\t<item> upper-latin </item>\n\t\t\t<item> hebrew </item>\n\t\t\t<item> armenian </item>\n\t\t\t<item> georgian </item>\n\t\t\t<item> cjk-ideographic </item>\n\t\t\t<item> hiragana </item>\n\t\t\t<item> katakana </item>\n\t\t\t<item> hiragana-iroha </item>\n\t\t\t<item> katakana-iroha </item>\n\t\t\t<item> inline </item>\n\t\t\t<item> inline-block </item>\n\t\t\t<item> block </item>\n\t\t\t<item> list-item </item>\n\t\t\t<item> run-in </item>\n\t\t\t<item> compact </item>\n\t\t\t<item> marker </item>\n\t\t\t<item> table </item>\n\t\t\t<item> inline-table </item>\n\t\t\t<item> table-row-group </item>\n\t\t\t<item> table-header-group </item>\n\t\t\t<item> table-footer-group </item>\n\t\t\t<item> table-row </item>\n\t\t\t<item> table-column-group </item>\n\t\t\t<item> table-column </item>\n\t\t\t<item> table-cell </item>\n\t\t\t<item> table-caption </item>\n\t\t\t<item> auto </item>\n\t\t\t<item> crosshair </item>\n\t\t\t<item> default </item>\n\t\t\t<item> pointer </item>\n\t\t\t<item> move </item>\n\t\t\t<item> e-resize </item>\n\t\t\t<item> ne-resize </item>\n\t\t\t<item> nw-resize </item>\n\t\t\t<item> n-resize </item>\n\t\t\t<item> se-resize </item>\n\t\t\t<item> sw-resize </item>\n\t\t\t<item> s-resize </item>\n\t\t\t<item> w-resize </item>\n\t\t\t<item> text </item>\n\t\t\t<item> wait </item>\n\t\t\t<item> help </item>\n\t\t\t<item> above </item>\n\t\t\t<item> absolute </item>\n\t\t\t<item> always </item>\n\t\t\t<item> avoid </item>\n\t\t\t<item> below </item>\n\t\t\t<item> bidi-override </item>\n\t\t\t<item> blink </item>\n\t\t\t<item> both </item>\n\t\t\t<item> capitalize </item>\n\t\t\t<item> caption </item>\n\t\t\t<item> clip </item>\n\t\t\t<item> close-quote </item>\n\t\t\t<item> collapse </item>\n\t\t\t<item> condensed </item>\n\t\t\t<item> crop </item>\n\t\t\t<item> cross </item>\n\t\t\t<item> ellipsis </item>\n\t\t\t<item> ellipsis-word </item>\n\t\t\t<item> embed </item>\n\t\t\t<item> expanded </item>\n\t\t\t<item> extra-condensed </item>\n\t\t\t<item> extra-expanded </item>\n\t\t\t<item> fixed </item>\n\t\t\t<item> hand </item>\n\t\t\t<item> hide </item>\n\t\t\t<item> higher </item>\n\t\t\t<item> icon </item>\n\t\t\t<item> inside </item>\n\t\t\t<item> invert </item>\n\t\t\t<item> landscape </item>\n\t\t\t<item> level </item>\n\t\t\t<item> line-through </item>\n\t\t\t<item> loud </item>\n\t\t\t<item> lower </item>\n\t\t\t<item> lowercase </item>\n\t\t\t<item> ltr </item>\n\t\t\t<item> menu </item>\n\t\t\t<item> message-box </item>\n\t\t\t<item> mix </item>\n\t\t\t<item> narrower </item>\n\t\t\t<item> no-close-quote </item>\n\t\t\t<item> no-open-quote </item>\n\t\t\t<item> nowrap </item>\n\t\t\t<item> open-quote </item>\n\t\t\t<item> outside </item>\n\t\t\t<item> overline </item>\n\t\t\t<item> portrait </item>\n\t\t\t<item> pre </item>\n\t\t\t<item> pre-line </item>\n\t\t\t<item> pre-wrap </item>\n\t\t\t<item> relative </item>\n\t\t\t<item> rtl </item>\n\t\t\t<item> scroll </item>\n\t\t\t<item> semi-condensed </item>\n\t\t\t<item> semi-expanded </item>\n\t\t\t<item> separate </item>\n\t\t\t<item> show </item>\n\t\t\t<item> small-caption </item>\n\t\t\t<item> static </item>\n\t\t\t<item> static-position </item>\n\t\t\t<item> status-bar </item>\n\t\t\t<item> thick </item>\n\t\t\t<item> thin </item>\n\t\t\t<item> ultra-condensed </item>\n\t\t\t<item> ultra-expanded </item>\n\t\t\t<item> underline </item>\n\t\t\t<item> uppercase </item>\n\t\t\t<item> visible </item>\n\t\t\t<item> wider </item>\n\t\t\t<item> break </item>\n\t\t\t<item> serif </item>\n\t\t\t<item> sans-serif </item>\n\t\t\t<item> cursive </item>\n\t\t\t<item> fantasy </item>\n\t\t\t<item> monospace </item>\n\t\t\t<item> border-box </item>\n\t\t\t<item> content-box </item>\n\t\t\t<item> -epub-hyphens </item>\n\t\t</list>\n\n\n\t\t<list name=\"colors\">\n\t\t\t<item> aqua </item>\n\t\t\t<item> black </item>\n\t\t\t<item> blue </item>\n\t\t\t<item> cyan </item>\n\t\t\t<item> fuchsia </item>\n\t\t\t<item> gray </item>\n\t\t\t<item> green </item>\n\t\t\t<item> lime </item>\n\t\t\t<item> maroon </item>\n\t\t\t<item> navy </item>\n\t\t\t<item> olive </item>\n\t\t\t<item> purple </item>\n\t\t\t<item> red </item>\n\t\t\t<item> silver </item>\n\t\t\t<item> teal </item>\n\t\t\t<item> white </item>\n\t\t\t<item> yellow </item>\n\t\t\t<item> ActiveBorder  </item>\n\t\t\t<item> ActiveCaption  </item>\n\t\t\t<item> AppWorkspace  </item>\n\t\t\t<item> Background  </item>\n\t\t\t<item> ButtonFace  </item>\n\t\t\t<item> ButtonHighlight  </item>\n\t\t\t<item> ButtonShadow  </item>\n\t\t\t<item> ButtonText  </item>\n\t\t\t<item> CaptionText  </item>\n\t\t\t<item> GrayText  </item>\n\t\t\t<item> Highlight  </item>\n\t\t\t<item> HighlightText  </item>\n\t\t\t<item> InactiveBorder  </item>\n\t\t\t<item> InactiveCaption  </item>\n\t\t\t<item> InactiveCaptionText  </item>\n\t\t\t<item> InfoBackground  </item>\n\t\t\t<item> InfoText  </item>\n\t\t\t<item> Menu  </item>\n\t\t\t<item> MenuText  </item>\n\t\t\t<item> Scrollbar  </item>\n\t\t\t<item> ThreeDDarkShadow  </item>\n\t\t\t<item> ThreeDFace  </item>\n\t\t\t<item> ThreeDHighlight  </item>\n\t\t\t<item> ThreeDLightShadow  </item>\n\t\t\t<item> ThreeDShadow  </item>\n\t\t\t<item> Window  </item>\n\t\t\t<item> WindowFrame  </item>\n\t\t\t<item> WindowText  </item>\n\t\t</list>\n\n\t\t<list name=\"paren\">\n\t\t\t<item> url </item>\n\t\t\t<item> attr </item>\n\t\t\t<item> rect </item>\n\t\t\t<item> rgb </item>\n\t\t\t<item> rgba </item>\n\t\t\t<item> hsl </item>\n\t\t\t<item> hsla </item>\n\t\t\t<item> counter </item>\n\t\t\t<item> counters </item>\n\n\t\t\t<!-- in @font-face -->\n\t\t\t<item> local </item>\n\t\t\t<item> format </item>\n\n\t\t\t<!-- Trident (a.k.a., MSHTML) rendering engine functional notation extensions -->\n\t\t\t<item> expression </item>\n\n\t\t</list>\n\n\t\t<list name=\"mediatypes\">\n\t\t\t<item> all </item>\n\t\t\t<item> aural </item>\n\t\t\t<item> braille </item>\n\t\t\t<item> embossed </item>\n\t\t\t<item> handheld </item>\n\t\t\t<item> print </item>\n\t\t\t<item> projection </item>\n\t\t\t<item> screen </item>\n\t\t\t<item> tty </item>\n\t\t\t<item> tv </item>\n\t\t</list>\n\n\t\t<list name=\"pseudoclasses\">\n\t\t\t<item> hover </item>\n\t\t\t<item> link </item>\n\t\t\t<item> visited </item>\n\t\t\t<item> active </item>\n\t\t\t<item> focus </item>\n\t\t\t<item> first-child </item>\n\t\t\t<item> last-child </item>\n\t\t\t<item> only-child </item>\n\t\t\t<item> first-of-type </item>\n\t\t\t<item> last-of-type </item>\n\t\t\t<item> only-of-type </item>\n\t\t\t<item> first-letter </item>\n\t\t\t<item> first-line </item>\n\t\t\t<item> before </item>\n\t\t\t<item> after </item>\n\t\t\t<item> selection </item>\n\t\t\t<item> root </item>\n\t\t\t<item> empty </item>\n\t\t\t<item> target </item>\n\t\t\t<item> enabled </item>\n\t\t\t<item> disabled </item>\n\t\t\t<item> checked </item>\n\t\t\t<item> indeterminate </item>\n\t\t\t<item> nth-child </item>\n\t\t\t<item> nth-last-child </item>\n\t\t\t<item> nth-of-type </item>\n\t\t\t<item> nth-last-of-type </item>\n\t\t\t<item> not </item>\n\t\t</list>\n\n\t\t<contexts>\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Base\">\n\t\t\t\t<LineContinue/>\n\t\t\t\t<DetectSpaces/>\n\t\t\t\t<IncludeRules context=\"FindRuleSets\" />\n\t\t\t</context>\n\n\t\t\t<!-- to be included -->\n\t\t\t<!-- finds rules and detects nesting -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindRuleSets\">\n\t\t\t\t<RegExpr attribute=\"Media\" context=\"Media\" String=\"@media\\b\" />\n\t\t\t\t<RegExpr attribute=\"At Rule\" context=\"Import\" String=\"@import\\b\" />\n\t\t\t\t<RegExpr attribute=\"At Rule\" context=\"#stay\" String=\"@(font-face|charset)\\b\" />\n\t\t\t\t<DetectChar attribute=\"Property\" context=\"RuleSet\" char=\"{\" beginRegion=\"ruleset\" />\n\t\t\t\t<!--parse selectors-->\n\t\t\t\t<DetectChar attribute=\"Selector Attr\" context=\"SelAttr\" char=\"[\" />\n\t\t\t\t<RegExpr attribute=\"Selector Id\" context=\"#stay\" String=\"#([a-zA-Z0-9\\-_]|[\\x80-\\xFF]|\\\\[0-9A-Fa-f]{1,6})*\" />\n\t\t\t\t<RegExpr attribute=\"Selector Class\" context=\"#stay\" String=\"\\.([a-zA-Z0-9\\-_]|[\\x80-\\xFF]|\\\\[0-9A-Fa-f]{1,6})*\" />\n\t\t\t\t<RegExpr attribute=\"Selector Pseudo\" context=\"#stay\" String=\":lang\\([\\w_-]+\\)\" />\n\t\t\t\t<DetectChar attribute=\"Selector Pseudo\" context=\"SelPseudo\" char=\":\" />\n\t\t\t\t<IncludeRules context=\"FindStrings\" />\n\t\t\t\t<IncludeRules context=\"FindComments\" />\n\t\t\t</context>\n\n\t\t\t<!-- finds arguments to properties -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindValues\">\n\t\t\t\t<RegExpr attribute=\"Value\" context=\"#stay\" String=\"[-+]?[0-9.]+(em|ex|ch|rem|vw|vh|vm|px|in|cm|mm|pt|pc|deg|rad|grad|turn|ms|s|Hz|kHz)\\b\" />\n\t\t\t\t<RegExpr attribute=\"Value\" context=\"#stay\" String=\"[-+]?[0-9.]+[%]?\" />\n\t\t\t\t<RegExpr attribute=\"Normal Text\" context=\"#stay\" String=\"[\\w\\-]+\" />\n\t\t\t</context>\n\n\t\t\t<!-- finds strings -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindStrings\">\n\t\t\t\t<DetectChar attribute=\"String\" context=\"StringDQ\" char=\"&quot;\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"StringSQ\" char=\"'\" />\n\t\t\t</context>\n\n\t\t\t<!-- finds comments -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindComments\">\n\t\t\t\t<RegExpr attribute=\"Region Marker\" context=\"#stay\" String=\"/\\*BEGIN.*\\*/\" beginRegion=\"UserDefined\" />\n\t\t\t\t<RegExpr attribute=\"Region Marker\" context=\"#stay\" String=\"/\\*END.*\\*/\" endRegion=\"UserDefined\" />\n\t\t\t\t<Detect2Chars attribute=\"Comment\" context=\"Comment\" char=\"/\" char1=\"*\" beginRegion=\"comment\" />\n\t\t\t</context>\n\n\t\t\t<!-- other contexts -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Media\">\n\t\t\t\t<DetectChar attribute=\"Media\" context=\"Media2\" char=\"{\" beginRegion=\"media\" />\n\t\t\t\t<keyword attribute=\"Media\" context=\"#stay\" String=\"mediatypes\" />\n\t\t\t\t<DetectChar attribute=\"Media\" context=\"#stay\" char=\",\" />\n\t\t\t\t<IncludeRules context=\"FindComments\" />\n\t\t\t\t<RegExpr attribute=\"Error\" context=\"#stay\" String=\"\\S+\" />\n\t\t\t</context>\n\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Media2\">\n\t\t\t\t<DetectChar attribute=\"Media\" context=\"#pop#pop\" char=\"}\" endRegion=\"media\" />\n\t\t\t\t<IncludeRules context=\"FindRuleSets\" />\n\t\t\t</context>\n\n\t\t\t<context attribute=\"Selector Attr\" lineEndContext=\"#stay\" name=\"SelAttr\">\n\t\t\t\t<DetectChar attribute=\"Selector Attr\" context=\"#pop\" char=\"]\" />\n\t\t\t\t<IncludeRules context=\"FindStrings\" />\n\t\t\t</context>\n\n\t\t\t<context attribute=\"Selector Pseudo\" lineEndContext=\"#pop\" name=\"SelPseudo\"\n\t\t\t\t\tfallthrough=\"true\" fallthroughContext=\"#pop\">\n\t\t\t\t\t<keyword attribute=\"Selector Pseudo\" context=\"#pop\" String=\"pseudoclasses\" />\n\t\t\t\t</context>\n\n\t\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Import\">\n\t\t\t\t\t<DetectChar attribute=\"At Rule\" context=\"#pop\" char=\";\" />\n\t\t\t\t\t<keyword attribute=\"Media\" context=\"#stay\" String=\"mediatypes\" />\n\t\t\t\t\t<IncludeRules context=\"FindValues\" />\n\t\t\t\t\t<IncludeRules context=\"FindStrings\" />\n\t\t\t\t\t<IncludeRules context=\"FindComments\" />\n\t\t\t\t</context>\n\n\t\t\t\t<context attribute=\"Comment\" lineEndContext=\"#stay\" name=\"Comment\">\n\t\t\t\t\t<DetectSpaces/>\n\t\t\t\t\t<Detect2Chars attribute=\"Comment\" context=\"#pop\" char=\"*\" char1=\"/\" endRegion=\"comment\" />\n\t\t\t\t\t<IncludeRules context=\"##Alerts\" />\n\t\t\t\t\t<DetectIdentifier/>\n\t\t\t\t</context>\n\n\t\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"RuleSet\">\n\t\t\t\t\t<DetectChar attribute=\"Property\" context=\"#pop\" char=\"}\" endRegion=\"ruleset\" />\n\t\t\t\t\t<keyword attribute=\"Property\" context=\"Rule\" String=\"properties\" />\n\t\t\t\t\t<RegExpr attribute=\"Unknown Property\" context=\"Rule\" String=\"-?[A-Za-z_-]+(?=\\s*:)\" />\n\t\t\t\t\t<IncludeRules context=\"FindComments\" />\n\t\t\t\t\t<RegExpr attribute=\"Error\" context=\"#stay\" String=\"\\S\" />\n\t\t\t\t</context>\n\n\t\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Rule\">\n\t\t\t\t\t<DetectChar attribute=\"Property\" context=\"Rule2\" char=\":\" />\n\t\t\t\t\t<RegExpr attribute=\"Error\" context=\"#stay\" String=\"\\S\" />\n\t\t\t\t</context>\n\n\t\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Rule2\">\n\t\t\t\t\t<DetectChar attribute=\"Property\" context=\"#pop#pop\" char=\";\" />\n\t\t\t\t\t<DetectChar attribute=\"Property\" context=\"#pop#pop#pop\" char=\"}\" endRegion=\"ruleset\" />\n\t\t\t\t\t<!-- parse property values -->\n\t\t\t\t\t<keyword attribute=\"Value\" context=\"#stay\" String=\"types\" />\n\t\t\t\t\t<keyword attribute=\"Value\" context=\"#stay\" String=\"colors\" />\n\t\t\t\t\t<RegExpr attribute=\"Value\" context=\"#stay\" String=\"#([0-9A-Fa-f]{3}){1,4}\\b\" />\n\t\t\t\t\t<keyword attribute=\"Value\" context=\"PropParen\" String=\"paren\" />\n\t\t\t\t\t<RegExpr attribute=\"Important\" context=\"#stay\" String=\"!important\\b\" />\n\t\t\t\t\t<IncludeRules context=\"FindValues\" />\n\t\t\t\t\t<IncludeRules context=\"FindStrings\" />\n\t\t\t\t\t<IncludeRules context=\"FindComments\" />\n\t\t\t\t</context>\n\n\t\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"PropParen\">\n\t\t\t\t\t<DetectChar attribute=\"Value\" context=\"PropParen2\" char=\"(\" />\n\t\t\t\t\t<IncludeRules context=\"FindComments\" />\n\t\t\t\t\t<RegExpr attribute=\"Error\" context=\"#stay\" String=\"\\S\" />\n\t\t\t\t</context>\n\n\t\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"PropParen2\">\n\t\t\t\t\t<DetectChar attribute=\"Value\" context=\"#pop#pop\" char=\")\" />\n\t\t\t\t\t<IncludeRules context=\"FindValues\" />\n\t\t\t\t\t<IncludeRules context=\"FindStrings\" />\n\t\t\t\t\t<IncludeRules context=\"FindComments\" />\n\t\t\t\t</context>\n\n\t\t\t\t<!-- string contexts -->\n\t\t\t\t<context attribute=\"String\" lineEndContext=\"#stay\" name=\"StringDQ\">\n\t\t\t\t\t<DetectChar attribute=\"String\" context=\"#pop\" char=\"&quot;\" />\n\t\t\t\t\t<IncludeRules context=\"InsideString\" />\n\t\t\t\t</context>\n\n\t\t\t\t<context attribute=\"String\" lineEndContext=\"#stay\" name=\"StringSQ\">\n\t\t\t\t\t<DetectChar attribute=\"String\" context=\"#pop\" char=\"'\" />\n\t\t\t\t\t<IncludeRules context=\"InsideString\" />\n\t\t\t\t</context>\n\n\t\t\t\t<context attribute=\"String\" lineEndContext=\"#stay\" name=\"InsideString\">\n\t\t\t\t\t<RegExpr attribute=\"String\" context=\"#stay\" String=\"\\\\[&quot;']\" />\n\t\t\t\t\t<DetectIdentifier/>\n\t\t\t\t</context>\n\n\t\t\t</contexts>\n\t\t\t<itemDatas>\n\t\t\t\t<itemData name=\"Normal Text\" defStyleNum=\"dsNormal\" spellChecking=\"false\"/>\n\t\t\t\t<itemData name=\"Property\"  defStyleNum=\"dsKeyword\" spellChecking=\"false\"/>\n\t\t\t\t<itemData name=\"Unknown Property\"  defStyleNum=\"dsKeyword\" italic=\"1\" spellChecking=\"false\"/>\n\t\t\t\t<itemData name=\"Media\"  defStyleNum=\"dsDecVal\" bold=\"1\" spellChecking=\"false\"/>\n\t\t\t\t<itemData name=\"At Rule\"  defStyleNum=\"dsDecVal\" spellChecking=\"false\"/>\n\t\t\t\t<itemData name=\"String\"  defStyleNum=\"dsString\"/>\n\t\t\t\t<itemData name=\"Value\"  defStyleNum=\"dsDataType\" spellChecking=\"false\"/>\n\t\t\t\t<itemData name=\"Important\" defStyleNum=\"dsKeyword\" spellChecking=\"false\"/>\n\t\t\t\t<itemData name=\"Selector Attr\" defStyleNum=\"dsChar\" spellChecking=\"false\"/>\n\t\t\t\t<itemData name=\"Selector Id\"  defStyleNum=\"dsFloat\" bold=\"1\" spellChecking=\"false\"/>\n\t\t\t\t<itemData name=\"Selector Class\"  defStyleNum=\"dsFloat\" spellChecking=\"false\"/>\n\t\t\t\t<itemData name=\"Selector Pseudo\"  defStyleNum=\"dsDecVal\" spellChecking=\"false\"/>\n\t\t\t\t<itemData name=\"Comment\" defStyleNum=\"dsComment\" />\n\t\t\t\t<itemData name=\"Region Marker\" defStyleNum=\"dsRegionMarker\" spellChecking=\"false\"/>\n\t\t\t\t<itemData name=\"Alert\" defStyleNum=\"dsAlert\" spellChecking=\"false\"/>\n\t\t\t\t<itemData name=\"Error\" defStyleNum=\"dsError\" spellChecking=\"false\"/>\n\t\t\t</itemDatas>\n\t\t</highlighting>\n\t\t<general>\n\t\t\t<keywords casesensitive=\"0\" weakDeliminator=\"-%\"/>\n\t\t\t<comments>\n\t\t\t\t<comment name=\"multiLine\" start=\"/*\" end=\"*/\" />\n\t\t\t</comments>\n\t\t</general>\n\t</language>"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/go.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<language name=\"Go\" section=\"Sources\"\n          version=\"1.00\" kateversion=\"2.4\"\n          indenter=\"cstyle\"\n          extensions=\"*.go\"\n          mimetype=\"text/x-gosrc\"\n\t\t  package=\"go\"\n          priority=\"5\"\n          author=\"The Go Authors\"\n          license=\"BSD\">\n  <highlighting>\n    <list name=\"keywords\">\n      <item> break </item>\n      <item> case </item>\n      <item> chan </item>\n      <item> const </item>\n      <item> continue </item>\n      <item> default </item>\n      <item> defer </item>\n      <item> else </item>\n      <item> fallthrough </item>\n      <item> for </item>\n      <item> func </item>\n      <item> go </item>\n      <item> goto </item>\n      <item> if </item>\n      <item> import </item>\n      <item> interface </item>\n      <item> map </item>\n      <item> package </item>\n      <item> range </item>\n      <item> return </item>\n      <item> select </item>\n      <item> struct </item>\n      <item> switch </item>\n      <item> type </item>\n      <item> var </item>\n    </list>\n    <list name=\"predeclared\">\n      <item> false </item>\n      <item> iota </item>\n      <item> nil </item>\n      <item> true </item>\n    </list>\n    <list name=\"types\">\n      <item> bool </item>\n      <item> byte </item>\n      <item> complex64 </item>\n      <item> complex128 </item>\n      <item> error </item>\n      <item> float32 </item>\n      <item> float64 </item>\n      <item> int </item>\n      <item> int8 </item>\n      <item> int16 </item>\n      <item> int32 </item>\n      <item> int64 </item>\n      <item> rune </item>\n      <item> string </item>\n      <item> uint </item>\n      <item> uintptr </item>\n      <item> uint8 </item>\n      <item> uint16 </item>\n      <item> uint32 </item>\n      <item> uint64 </item>\n    </list>\n    <list name=\"builtin\">\n      <item> append </item>\n  \t  <item> delete </item>\n      <item> cap </item>\n      <item> close </item>\n      <item> complex </item>\n      <item> copy </item>\n      <item> imag </item>\n      <item> len </item>\n      <item> make </item>\n      <item> new </item>\n      <item> panic </item>\n      <item> print </item>\n      <item> println </item>\n      <item> real </item>\n      <item> recover </item>\n    </list>\n    <contexts>\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"Normal\">\n        <DetectSpaces/>\n        <RegExpr attribute=\"Keyword\" context=\"FuncDecl\" String=\"^func\\s*\"/>\n        <keyword attribute=\"Keyword\" context=\"#pop\" String=\"keywords\"/>\n        <keyword attribute=\"Predeclared Identifier\" context=\"#stay\" String=\"predeclared\"/>\n        <keyword attribute=\"Data Type\" context=\"#stay\" String=\"types\"/>\n        <keyword attribute=\"Builtin Function\" context=\"#stay\" String=\"builtin\"/>\n        <DetectIdentifier/>\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"{\" beginRegion=\"Brace1\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"}\" endRegion=\"Brace1\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"(\" beginRegion=\"Brace2\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\")\" endRegion=\"Brace2\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"[\" beginRegion=\"Brace3\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"]\" endRegion=\"Brace3\" />\n        <RegExpr attribute=\"Numbers\"  context=\"#stay\" String=\"\\-?\\.\\d*(e|e\\-|e\\+)?\\d+i?\\b\"/>\n        <RegExpr attribute=\"Numbers\"  context=\"#stay\" String=\"\\-\\d*\\.?\\d*(e|e\\-|e\\+)?\\d+i?\\b\"/>\n        <RegExpr attribute=\"Numbers\"  context=\"#stay\" String=\"\\b\\d*\\.?\\d*(e|e\\-|e\\+)?\\d+i?\\b\"/>\n        <RegExpr attribute=\"Numbers\"  context=\"#stay\" String=\"\\b-?0[xX][0-9a-fA-F]+\\b\"/>\n        <HlCOct attribute=\"Octal\" context=\"#stay\"/>\n        <HlCHex attribute=\"Hex\" context=\"#stay\"/>\n        <HlCChar attribute=\"Char\" context=\"#stay\"/>\n        <DetectChar attribute=\"String\" context=\"String\" char=\"&quot;\"/>\n        <DetectChar attribute=\"String\" context=\"Multiline String\" char=\"`\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"Comment 1\" char=\"/\" char1=\"/\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"Comment 2\" char=\"/\" char1=\"*\" beginRegion=\"Comment\"/>\n        <AnyChar attribute=\"Symbol\" context=\"#stay\" String=\":!%&amp;()+,-/.*&lt;=&gt;?[]|~^&#59;\"/>\n      </context>\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FuncDecl\">\n        <DetectChar attribute=\"Symbol\" context=\"MethodDecl\" char=\"(\" beginRegion=\"Brace2\" />\n        <DetectChar attribute=\"Symbol\" context=\"#pop\" char=\")\" endRegion=\"Brace2\" />\n        <RegExpr attribute=\"FuncDecl\" context=\"#pop\" String=\"[\\w]+\"/>\n      </context>\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"MethodDecl\">\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"(\" beginRegion=\"Brace2\" />\n        <DetectChar attribute=\"Symbol\" context=\"#pop\" char=\")\" endRegion=\"Brace2\" />\n        <RegExpr attribute=\"Normal Text\" context=\"#stay\" String=\"\\b[\\w]+\\s*\\*?\\w+\\b\"/>\n        <RegExpr attribute=\"FuncDecl\" context=\"#pop\" String=\"[\\w]+\"/>\n      </context>\n      <context attribute=\"String\" lineEndContext=\"#pop\" name=\"String\">\n        <!--LineContinue attribute=\"String\" context=\"#stay\"/-->\n        <HlCStringChar attribute=\"String Char\" context=\"#stay\"/>\n        <RegExpr attribute=\"String Fmt\" String=\"\\%[+\\-# 0]*(?:[0-9]*|\\*)\\.?(?:[0-9]*|\\*)[vT%tbcdoqxXUeEfgGsp]\" context=\"#stay\"/>\n        <DetectChar attribute=\"String\" context=\"#pop\" char=\"&quot;\"/>\n      </context>\n      <context attribute=\"String\" lineEndContext=\"#stay\" name=\"Multiline String\">\n        <!--LineContinue attribute=\"String\" context=\"#stay\"/-->\n        <!-- HlCStringChar attribute=\"String Char\" context=\"#stay\"/-->\n        <DetectChar attribute=\"String\" context=\"#pop\" char=\"`\"/>\n      </context>\n      <context attribute=\"Comment\" lineEndContext=\"#pop\" name=\"Comment 1\">\n        <!--LineContinue attribute=\"Comment\" context=\"#stay\"/-->\n        <RegExpr attribute=\"TODO\" String=\"\\bTODO(?:\\([^\\)]+\\)|\\b)\\:?\" insensitive=\"true\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bBUG(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bNOTE(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bSECBUG(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bFIXME(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\W!!!\\:\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\W\\?\\?\\?\\:\" context=\"#stay\"/>\n      </context>\n      <context attribute=\"Comment\" lineEndContext=\"#stay\" name=\"Comment 2\">\n        <RegExpr attribute=\"TODO\" String=\"\\bTODO(?:\\([^\\)]+\\)|\\b)\\:?\" insensitive=\"true\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bBUG(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bNOTE(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bSECBUG(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bFIXME(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\W!!!\\:\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\W\\?\\?\\?\\:\" context=\"#stay\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"#pop\" char=\"*\" char1=\"/\" endRegion=\"Comment\"/>\n      </context>\n    </contexts>\n    <itemDatas>\n      <itemData name=\"Normal Text\"  defStyleNum=\"dsNormal\" spellChecking=\"false\"/>\n      <itemData name=\"Keyword\"      defStyleNum=\"dsKeyword\" spellChecking=\"false\"/>\n      <itemData name=\"Predeclared Identifier\" defStyleNum=\"dsPredeclared\" spellChecking=\"false\"/>\n      <itemData name=\"Builtin Function\" defStyleNum=\"dsBuiltinFunc\" spellChecking=\"false\"/>\n      <itemData name=\"Data Type\"    defStyleNum=\"dsDataType\" spellChecking=\"false\"/>\n      <itemData name=\"Numbers\"      defStyleNum=\"dsDecVal\" spellChecking=\"false\"/>\n      <itemData name=\"Decimal\"      defStyleNum=\"dsDecVal\" spellChecking=\"false\"/>\n      <itemData name=\"Octal\"        defStyleNum=\"dsBaseN\" spellChecking=\"false\"/>\n      <itemData name=\"Hex\"          defStyleNum=\"dsBaseN\" spellChecking=\"false\"/>\n      <itemData name=\"Float\"        defStyleNum=\"dsFloat\" spellChecking=\"false\"/>\n      <itemData name=\"Char\"         defStyleNum=\"dsChar\" spellChecking=\"false\"/>\n      <itemData name=\"String\"       defStyleNum=\"dsString\"/>\n      <itemData name=\"FuncDecl\"     defStyleNum=\"dsFuncDecl\"/>\n      <itemData name=\"String Char\"  defStyleNum=\"dsChar\"/>\n      <itemData name=\"String Fmt\"   defStyleNum=\"dsPlaceholder\"/>\n      <itemData name=\"Comment\"      defStyleNum=\"dsComment\"/>\n      <itemData name=\"TODO\"         defStyleNum=\"dsToDo\"/>\n      <itemData name=\"Symbol\"       defStyleNum=\"dsSymbol\" spellChecking=\"false\"/>\n      <itemData name=\"Error\"        defStyleNum=\"dsError\" spellChecking=\"false\"/>\n    </itemDatas>\n  </highlighting>\n  <general>\n    <comments>\n      <comment name=\"singleLine\" start=\"//\" />\n      <comment name=\"multiLine\" start=\"/*\" end=\"*/\" />\n    </comments>\n    <keywords casesensitive=\"1\" additionalDeliminator=\"'&quot;\" />\n  </general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/gohtml.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<language name=\"GOHTML\" version=\"1.99\" kateversion=\"2.4\" section=\"Markup\" extensions=\"*.gohtml;*.html.tmpl;*.html.tpl\" mimetype=\"text/gohtml\"  author=\"Sam Schurter\" license=\"LGPL\" priority=\"10\">\n\n<highlighting>\n  <list name=\"go_words\"> \n    <item> define </item> \n    <item> template </item>\n    <item> range </item> \n    <item> if </item> \n    <item> else </item> \n    <item> end </item>\n    <item> block </item>\n    <item> with </item> \n    <item> and </item>\n    <item> call </item>\n    <item> html </item>\n    <item> index </item>\n    <item> slice </item>\n    <item> js </item>\n    <item> len </item>\n    <item> not </item>\n    <item> or </item>\n    <item> print </item>\n    <item> printf </item>\n    <item> println </item>\n    <item> urlquery </item>\n    <item> eq </item>\n    <item> ne </item>\n    <item> lt </item>\n    <item> le </item>\n    <item> gt </item>\n    <item> ge </item>\n  </list> \n<contexts>\n  <context name=\"Start\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <IncludeRules context=\"##HTML\" includeAttrib=\"true\" />\n    <IncludeRules context=\"FindGo\" />\n  </context>\n\n  <context name=\"FindGo\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <Detect2Chars attribute=\"Command\" context=\"Golang\" char=\"{\" char1=\"{\" beginRegion=\"goCommand\" />\n  </context>\n\n  <context name=\"Golang\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <keyword attribute=\"Keyword\" context=\"#stay\" String=\"go_words\" />\n    <Detect2Chars attribute=\"Command\" context=\"#pop\" char=\"}\" char1=\"}\" endRegion=\"goCommand\" />\n    <RegExpr attribute=\"Dot\" context=\"#stay\" String=\"\\.[a-z]*\\b\" insensitive=\"true\" />\n    <RegExpr attribute=\"Variable\" context=\"#stay\" String=\"\\$[a-z]*\\b\" insensitive=\"true\" />\n  </context>\n</contexts>\n\n<itemDatas>\n  <itemData name=\"Command\" defStyleNum=\"dsBaseN\" bold=\"1\" />\n  <itemData name=\"Keyword\" defStyleNum=\"dsFunction\" />\n  <itemData name=\"Dot\" defStyleNum=\"dsKeyword\" color=\"#B470C0\" selColor=\"#00ffff\" bold=\"0\" italic=\"0\" spellChecking=\"false\" />\n  <itemData name=\"Variable\" defStyleNum=\"dsChar\" />\n</itemDatas>\n\n</highlighting>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/gomod.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<language name=\"GoMod\" section=\"Sources\"\n          version=\"1.00\" kateversion=\"2.4\"\n          indenter=\"cstyle\"\n          extensions=\"go.mod\"\n          mimetype=\"text/x-gomod\"\n          priority=\"5\"\n          author=\"visualfc\"\n          license=\"BSD\">\n  <highlighting>\n    <list name=\"keywords\">\n      <item> go </item>\n      <item> module </item>\n      <item> require </item>\n      <item> replace </item>\n      <item> exclude </item>\n      <item> retract </item>\n    </list>\n  <contexts>\n      <context name=\"Normal\"        attribute=\"Normal Text\" lineEndContext=\"#stay\">\n        <keyword      attribute=\"Keyword\"  context=\"#stay\" String=\"keywords\" />\n        <Detect2Chars attribute=\"Symbol\" context=\"#stay\" char=\"=\" char1=\">\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"(\" beginRegion=\"Brace1\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\")\" endRegion=\"Brace1\" />\n        <Detect2Chars attribute=\"Comment\" context=\"Comment\" char=\"/\" char1=\"/\"/>\n      </context>\n\t\t<context name=\"Comment\" attribute=\"Comment\" lineEndContext=\"#pop\">\n\t\t</context>\n    </contexts>\n    <itemDatas>\n      <itemData name=\"Normal Text\"  defStyleNum=\"dsNormal\" spellChecking=\"false\"/>\n      <itemData name=\"Keyword\"      defStyleNum=\"dsKeyword\" spellChecking=\"false\"/>\n      <itemData name=\"Symbol\"       defStyleNum=\"dsSymbol\" spellChecking=\"false\"/>\n      <itemData name=\"Comment\"      defStyleNum=\"dsComment\" afterwhitespace=\"true\"/>\n    </itemDatas>\n  </highlighting>\n  <general>\n    <comments>\n      <comment name=\"singleLine\" start=\"//\" position=\"afterwhitespace\"/>\n    </comments>\n  </general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/goplus.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<language name=\"GoPlus\" section=\"Sources\"\n          version=\"1.00\" kateversion=\"2.4\"\n          indenter=\"cstyle\"\n          extensions=\"*.gop\"\n          mimetype=\"text/x-goplus\"\n\t\t  package=\"goplus\"\n          priority=\"5\"\n          author=\"The Go Authors\"\n          license=\"BSD\">\n  <highlighting>\n    <list name=\"keywords\">\n      <item> break </item>\n      <item> case </item>\n      <item> chan </item>\n      <item> const </item>\n      <item> continue </item>\n      <item> default </item>\n      <item> defer </item>\n      <item> else </item>\n      <item> fallthrough </item>\n      <item> for </item>\n      <item> func </item>\n      <item> go </item>\n      <item> goto </item>\n      <item> if </item>\n      <item> import </item>\n      <item> interface </item>\n      <item> map </item>\n      <item> package </item>\n      <item> range </item>\n      <item> return </item>\n      <item> select </item>\n      <item> struct </item>\n      <item> switch </item>\n      <item> type </item>\n      <item> var </item>\n    </list>\n    <list name=\"predeclared\">\n      <item> false </item>\n      <item> iota </item>\n      <item> nil </item>\n      <item> true </item>\n    </list>\n    <list name=\"types\">\n      <item> bool </item>\n      <item> byte </item>\n      <item> complex64 </item>\n      <item> complex128 </item>\n      <item> error </item>\n      <item> float32 </item>\n      <item> float64 </item>\n      <item> int </item>\n      <item> int8 </item>\n      <item> int16 </item>\n      <item> int32 </item>\n      <item> int64 </item>\n      <item> rune </item>\n      <item> string </item>\n      <item> uint </item>\n      <item> uintptr </item>\n      <item> uint8 </item>\n      <item> uint16 </item>\n      <item> uint32 </item>\n      <item> uint64 </item>\n    </list>\n    <list name=\"builtin\">\n      <item> append </item>\n  \t  <item> delete </item>\n      <item> cap </item>\n      <item> close </item>\n      <item> complex </item>\n      <item> copy </item>\n      <item> imag </item>\n      <item> len </item>\n      <item> make </item>\n      <item> new </item>\n      <item> panic </item>\n      <item> print </item>\n      <item> println </item>\n      <item> real </item>\n      <item> recover </item>\n    </list>\n    <contexts>\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"Normal\">\n        <DetectSpaces/>\n        <RegExpr attribute=\"Keyword\" context=\"FuncDecl\" String=\"^func\\s*\"/>\n        <keyword attribute=\"Keyword\" context=\"#pop\" String=\"keywords\"/>\n        <keyword attribute=\"Predeclared Identifier\" context=\"#stay\" String=\"predeclared\"/>\n        <keyword attribute=\"Data Type\" context=\"#stay\" String=\"types\"/>\n        <keyword attribute=\"Builtin Function\" context=\"#stay\" String=\"builtin\"/>\n        <DetectIdentifier/>\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"{\" beginRegion=\"Brace1\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"}\" endRegion=\"Brace1\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"(\" beginRegion=\"Brace2\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\")\" endRegion=\"Brace2\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"[\" beginRegion=\"Brace3\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"]\" endRegion=\"Brace3\" />\n        <RegExpr attribute=\"Numbers\"  context=\"#stay\" String=\"\\-?\\.\\d*(e|e\\-|e\\+)?\\d+i?\\b\"/>\n        <RegExpr attribute=\"Numbers\"  context=\"#stay\" String=\"\\-\\d*\\.?\\d*(e|e\\-|e\\+)?\\d+i?\\b\"/>\n        <RegExpr attribute=\"Numbers\"  context=\"#stay\" String=\"\\b\\d*\\.?\\d*(e|e\\-|e\\+)?\\d+i?\\b\"/>\n        <RegExpr attribute=\"Numbers\"  context=\"#stay\" String=\"\\b-?0[xX][0-9a-fA-F]+\\b\"/>\n        <RegExpr attribute=\"Numbers\"  context=\"#stay\" String=\"\\b-?\\d*r?/\\d*r\\b\"/>\n        <RegExpr attribute=\"Numbers\"  context=\"#stay\" String=\"\\b-?\\d*r/\\d*r?\\b\"/>\n        <RegExpr attribute=\"Numbers\"  context=\"#stay\" String=\"\\b-?\\d*r\\b\"/>\n        <HlCOct attribute=\"Octal\" context=\"#stay\"/>\n        <HlCHex attribute=\"Hex\" context=\"#stay\"/>\n        <HlCChar attribute=\"Char\" context=\"#stay\"/>\n        <DetectChar attribute=\"String\" context=\"String\" char=\"&quot;\"/>\n        <DetectChar attribute=\"String\" context=\"Multiline String\" char=\"`\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"Comment 1\" char=\"/\" char1=\"/\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"Comment 2\" char=\"/\" char1=\"*\" beginRegion=\"Comment\"/>\n        <AnyChar attribute=\"Symbol\" context=\"#stay\" String=\":!%&amp;()+,-/.*&lt;=&gt;?[]|~^&#59;\"/>\n      </context>\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FuncDecl\">\n        <DetectChar attribute=\"Symbol\" context=\"MethodDecl\" char=\"(\" beginRegion=\"Brace2\" />\n        <DetectChar attribute=\"Symbol\" context=\"#pop\" char=\")\" endRegion=\"Brace2\" />\n        <RegExpr attribute=\"FuncDecl\" context=\"#pop\" String=\"[\\w]+\"/>\n      </context>\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"MethodDecl\">\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"(\" beginRegion=\"Brace2\" />\n        <DetectChar attribute=\"Symbol\" context=\"#pop\" char=\")\" endRegion=\"Brace2\" />\n        <RegExpr attribute=\"Normal Text\" context=\"#stay\" String=\"\\b[\\w]+\\s*\\*?\\w+\\b\"/>\n        <RegExpr attribute=\"FuncDecl\" context=\"#pop\" String=\"[\\w]+\"/>\n      </context>\n      <context attribute=\"String\" lineEndContext=\"#pop\" name=\"String\">\n        <!--LineContinue attribute=\"String\" context=\"#stay\"/-->\n        <HlCStringChar attribute=\"String Char\" context=\"#stay\"/>\n        <RegExpr attribute=\"String Fmt\" String=\"\\%[+\\-# 0]*(?:[0-9]*|\\*)\\.?(?:[0-9]*|\\*)[vT%tbcdoqxXUeEfgGsp]\" context=\"#stay\"/>\n        <DetectChar attribute=\"String\" context=\"#pop\" char=\"&quot;\"/>\n      </context>\n      <context attribute=\"String\" lineEndContext=\"#stay\" name=\"Multiline String\">\n        <!--LineContinue attribute=\"String\" context=\"#stay\"/-->\n        <!-- HlCStringChar attribute=\"String Char\" context=\"#stay\"/-->\n        <DetectChar attribute=\"String\" context=\"#pop\" char=\"`\"/>\n      </context>\n      <context attribute=\"Comment\" lineEndContext=\"#pop\" name=\"Comment 1\">\n        <!--LineContinue attribute=\"Comment\" context=\"#stay\"/-->\n        <RegExpr attribute=\"TODO\" String=\"\\bTODO(?:\\([^\\)]+\\)|\\b)\\:?\" insensitive=\"true\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bBUG(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bNOTE(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bSECBUG(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bFIXME(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\W!!!\\:\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\W\\?\\?\\?\\:\" context=\"#stay\"/>\n      </context>\n      <context attribute=\"Comment\" lineEndContext=\"#stay\" name=\"Comment 2\">\n        <RegExpr attribute=\"TODO\" String=\"\\bTODO(?:\\([^\\)]+\\)|\\b)\\:?\" insensitive=\"true\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bBUG(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bNOTE(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bSECBUG(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bFIXME(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\W!!!\\:\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\W\\?\\?\\?\\:\" context=\"#stay\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"#pop\" char=\"*\" char1=\"/\" endRegion=\"Comment\"/>\n      </context>\n    </contexts>\n    <itemDatas>\n      <itemData name=\"Normal Text\"  defStyleNum=\"dsNormal\" spellChecking=\"false\"/>\n      <itemData name=\"Keyword\"      defStyleNum=\"dsKeyword\" spellChecking=\"false\"/>\n      <itemData name=\"Predeclared Identifier\" defStyleNum=\"dsPredeclared\" spellChecking=\"false\"/>\n      <itemData name=\"Builtin Function\" defStyleNum=\"dsBuiltinFunc\" spellChecking=\"false\"/>\n      <itemData name=\"Data Type\"    defStyleNum=\"dsDataType\" spellChecking=\"false\"/>\n      <itemData name=\"Numbers\"      defStyleNum=\"dsDecVal\" spellChecking=\"false\"/>\n      <itemData name=\"Decimal\"      defStyleNum=\"dsDecVal\" spellChecking=\"false\"/>\n      <itemData name=\"Octal\"        defStyleNum=\"dsBaseN\" spellChecking=\"false\"/>\n      <itemData name=\"Hex\"          defStyleNum=\"dsBaseN\" spellChecking=\"false\"/>\n      <itemData name=\"Float\"        defStyleNum=\"dsFloat\" spellChecking=\"false\"/>\n      <itemData name=\"Char\"         defStyleNum=\"dsChar\" spellChecking=\"false\"/>\n      <itemData name=\"String\"       defStyleNum=\"dsString\"/>\n      <itemData name=\"FuncDecl\"     defStyleNum=\"dsFuncDecl\"/>\n      <itemData name=\"String Char\"  defStyleNum=\"dsChar\"/>\n      <itemData name=\"String Fmt\"   defStyleNum=\"dsPlaceholder\"/>\n      <itemData name=\"Comment\"      defStyleNum=\"dsComment\"/>\n      <itemData name=\"TODO\"         defStyleNum=\"dsToDo\"/>\n      <itemData name=\"Symbol\"       defStyleNum=\"dsSymbol\" spellChecking=\"false\"/>\n      <itemData name=\"Error\"        defStyleNum=\"dsError\" spellChecking=\"false\"/>\n    </itemDatas>\n  </highlighting>\n  <general>\n    <comments>\n      <comment name=\"singleLine\" start=\"//\" />\n      <comment name=\"multiLine\" start=\"/*\" end=\"*/\" />\n    </comments>\n    <keywords casesensitive=\"1\" additionalDeliminator=\"'&quot;\" />\n  </general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/gopresent.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\tKate syntax highlight filter for Golang present documents.\n\n\tKate syntax highlight filter for Markdown/MultiMarkdown documents.\n\n\tCopyright 2008 Darrin Yeager. http://www.dyeager.org/\n\tDual-Licensed under both GPL and BSD licenses.\n\n\tExtended 2009 Claes Holmerson. http://github.com/claes/kate-markdown/\n\n\tExtended 2013 visualfc. http://github.com/visualfc/liteide/\n-->\n\n\n<!-- the [^\\s]{1} is in the regex to avoid interfering with bullet list which\n\t  starts \"* item\". Thus emphasis/strong MUST be formed like *words here*\n\t  with the asterisks next to the beginning of the first word.\n\n\t  Match space or newline, followed by \"*\", followed by one non-space,\n\t  followed by anything non-asterisk, followed by \"*\", followed by\n\t  space, end-of-sentence punctuation, or the end of the line.\n-->\n<!DOCTYPE language SYSTEM \"language.dtd\"\n\t\t\t [\n\t\t\t <!ENTITY strongemphasisregex \"(\\s|^)[\\*_]{3}[^\\*_]+[\\*_]{3}(\\s|\\.|,|;|:|\\-|\\?|$)\">\n\t\t\t <!ENTITY strongregex \"(\\s|^)[\\*_]{1}[^\\s]{1}[^\\*_]+{1}(\\s|\\.|,|;|:|\\-|\\?|$)\">\n\t\t\t <!ENTITY emphasisregex \"(\\s|^)[\\*_]{1}[^\\s]{1}[^\\*_]+[\\*_]{1}(\\s|\\.|,|;|:|\\-|\\?|$)\">\n\t\t\t <!ENTITY reflinkregex '\\[[^\\]\\^]+\\]\\s*\\[[^\\]]*\\]\\s*(\\s+\\\"[^\\\"]*\\\"){0,1}'>\n\t\t\t <!ENTITY reflinktargetregex '\\[[^\\]\\^]+\\]\\:\\s+[^\\s]+(\\s+\\\"[^\\\"]*\\\"){0,1}'>\n\t\t\t <!ENTITY footnoteregex \"\\[\\^[^\\]]+\\]\">\n\t\t\t <!ENTITY inlinelinkregex '\\[[^\\]\\^]+\\]\\s*\\([^\\(]*\\)'>\n\t\t\t <!ENTITY inlineimageregex '\\!\\[[^\\]\\^]+\\]\\([^\\(]*\\)'>\n\t\t\t <!ENTITY refimageregex '\\!\\[[^\\]\\^]+\\]\\[[^\\[]*\\]'>\n\t\t\t <!ENTITY autolinkregex '&lt;(https?|ftp):[^\\\"&gt;\\s]+&gt;'>\n\t\t\t <!ENTITY mailtolinkregex '&lt;(?:mailto:)?([-.\\w]+\\@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)&gt;'>\n\t\t\t <!ENTITY rulerregex '\\s*([\\*\\-_]\\s?){3,}\\s*'>\n\t\t\t <!-- two spaces at end of line generates linebreak -->\n\t\t\t <!ENTITY linebreakregex \"  $\">\n\t\t\t <!ENTITY strikeoutregex \"[~]{2}[^~].*[^~][~]{2}\"> <!-- pandoc style -->\n]>\n\n<language name=\"Go-Slide\" version=\"1.0\" section=\"Markup\"\n\t\textensions=\"*.slide;*.article\"\n\t\tmimetype=\"text/x-goslide\"\n\t\tpackage=\"gopresent\"\n\t\tpriority=\"15\"\n\t\tauthor=\"Darrin Yeager, Claes Holmerson, visualfc\"\n\t\tlicense=\"GPL,BSD\" >\n\n\t<highlighting>\n\n\t\t<contexts>\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Normal Text\" >\n\t\t\t\t<DetectChar context=\"blockquote\" char=\"&gt;\" column=\"0\"/>\n\t\t\t\t<RegExpr attribute=\"s1\" String=\"^\\*\\s.*$\"  endRegion=\"section\" beginRegion=\"section\"/>\n\t\t\t\t<RegExpr attribute=\"s2\" String=\"^\\*\\*\\s.*$\"/>\n\t\t\t\t<RegExpr attribute=\"s3\" String=\"^\\*\\*\\*\\s.*$\"/>\n\t\t\t\t<RegExpr attribute=\"comment\" String=\"^#.*$\" />\n\t\t\t\t<RegExpr attribute=\"strong\" String=\"(^|\\s)\\*[&quot;\\'\\`\\w\\*\\-\\;\\:\\?\\.\\,]+\\*(\\s|\\.|,|;|:|\\-|\\?|$)\"/>\n\t\t\t\t<RegExpr attribute=\"italic\" String=\"(^|\\s)\\_[&quot;\\'\\`\\w\\*\\-\\;\\:\\?\\.\\,]+\\_(\\s|\\.|,|;|:|\\-|\\?|$)\"/>\n\t\t\t\t<!--RegExpr attribute=\"ruler\" String=\"&rulerregex;\" /-->\n\t\t\t\t<!--RegExpr attribute=\"strong\" String=\"&strongregex;\" /-->\n\t\t\t\t<!--RegExpr attribute=\"emphasis\" String=\"&emphasisregex;\" /-->\n\t\t\t\t<!--RegExpr attribute=\"strongemphasis\" String=\"&strongemphasisregex;\" /-->\n\t\t\t\t<RegExpr attribute=\"code\" String=\"^([\\s]{2,}|\\t+).*$\" />\n\t\t\t\t<RegExpr context=\"bullet\" String=\"^\\-\\s.*$\" />\n\t\t\t\t<RegExpr attribute=\"meta\" String=\"^\\.(code|play|image|iframe|link|html)\\s+(.*)+$\" />\n\t\t\t\t<IncludeRules context=\"inc\" />\n\n\t\t\t\t<!-- GitHub highlighted code -->\n\t\t\t\t<RegExpr attribute=\"code\" context=\"highlightcpp\" String=\"^```c\\+\\+$\" beginRegion=\"code\" />\n\t\t\t\t<RegExpr attribute=\"code\" context=\"highlightnone\" String=\"^```[^\\s]*\" beginRegion=\"code\" />\n\t\t\t</context>\n\n\t\t\t<context attribute=\"blockquote\" lineEndContext=\"#pop\" name=\"blockquote\">\n\t\t\t\t<RegExpr attribute=\"bq-strong\" String=\"&strongregex;\" />\n\t\t\t\t<RegExpr attribute=\"bq-emphasis\" String=\"&emphasisregex;\" />\n\t\t\t\t<IncludeRules context=\"inc\" />\n\t\t\t</context>\n\n\t\t\t<context attribute=\"bullet\" lineEndContext=\"#pop\" name=\"bullet\" >\n\t\t\t\t<RegExpr attribute=\"bl-strong\" String=\"&strongregex;\" />\n\t\t\t\t<RegExpr attribute=\"bl-emphasis\" String=\"&emphasisregex;\" />\n\t\t\t\t<IncludeRules context=\"inc\" />\n\t\t\t</context>\n\n\t\t\t<context attribute=\"numlist\" lineEndContext=\"#pop\" name=\"numlist\" >\n\t\t\t\t<RegExpr attribute=\"nl-strong\" String=\"&strongregex;\" />\n\t\t\t\t<RegExpr attribute=\"nl-emphasis\" String=\"&emphasisregex;\" />\n\t\t\t\t<IncludeRules context=\"inc\" />\n\t\t\t</context>\n\n\t\t\t<context attribute=\"comment\" lineEndContext=\"#stay\" name=\"comment\" >\n\t\t\t\t<RegExpr String=\"--&gt;\" attribute=\"comment\" context=\"#pop\" endRegion=\"comment\"/>\n\t\t\t</context>\n\n\t\t\t<context attribute=\"common\" name=\"inc\" lineEndContext=\"#stay\" >\n\t\t\t\t<RegExpr attribute=\"code\" String=\"`[^`]+`\" />\n\t\t\t\t<RegExpr context=\"comment\" String=\"&lt;!--\" beginRegion=\"comment\" />\n\t\t\t\t<RegExpr attribute=\"reflink\" String=\"&reflinkregex;\" />\n\t\t\t\t<RegExpr attribute=\"footnote\" String=\"&footnoteregex;\" />\n\t\t\t\t<RegExpr attribute=\"inlinelink\" String=\"&inlinelinkregex;\"/>\n\t\t\t\t<RegExpr attribute=\"reflinktarget\" String=\"&reflinktargetregex;\"/>\n\t\t\t\t<RegExpr attribute=\"inlineimage\" String=\"&inlineimageregex;\"/>\n\t\t\t\t<RegExpr attribute=\"refimage\" String=\"&refimageregex;\"/>\n\t\t\t\t<RegExpr attribute=\"autolink\" String=\"&autolinkregex;\"/>\n\t\t\t\t<RegExpr attribute=\"mailtolink\" String=\"&mailtolinkregex;\"/>\n\t\t\t\t<RegExpr attribute=\"strikeout\" minimal=\"true\" String=\"&strikeoutregex;\"/>\n\t\t\t\t<RegExpr attribute=\"linebreak\" minimal=\"true\" String=\"&linebreakregex;\"/>\n\t\t\t</context>\n\n\t\t\t<!-- GitHub highlighted code -->\n\n\t\t\t<context attribute=\"Normal Text\" name=\"highlightnone\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"inccode\" />\n\t\t\t</context>\n\n\t\t\t<context attribute=\"Normal Text\" name=\"highlightcpp\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"##C++\" />\n\t\t\t\t<IncludeRules context=\"inccode\" />\n\t\t\t</context>\n\n\t\t\t<context attribute=\"common\" name=\"inccode\" lineEndContext=\"#stay\" >\n\t\t\t\t<RegExpr attribute=\"code\" context=\"#pop\" String=\"^```$\" endRegion=\"code\" />\n\t\t\t</context>\n\t\t</contexts>\n\n\t\t<itemDatas>\n\t\t\t<itemData name=\"Normal Text\" defStyleNum=\"dsNormal\"/>\n\t\t\t<itemData name=\"common\" defStyleNum=\"dsNormal\" />\n\t\t\t<itemData name=\"strongemphasis\" defStyleNum=\"dsNormal\" italic=\"true\" bold=\"true\"/>\n\t\t\t<itemData name=\"italic\" defStyleNum=\"dsNormal\" italic=\"true\" />\n\t\t\t<itemData name=\"strong\" defStyleNum=\"dsNormal\" bold=\"true\" />\n\t\t\t<itemData name=\"ruler\" defStyleNum=\"dsNormal\" bold=\"true\" />\n\t\t\t<itemData name=\"strikeout\" defStyleNum=\"dsNormal\" strikeOut=\"true\" />\n\t\t\t<itemData name=\"linebreak\" defStyleNum=\"dsNormal\" underline=\"true\" color=\"#999999\"/>\n\t\t\t<itemData name=\"s1\" defStyleNum=\"dsFunction\" bold=\"true\" />\n\t\t\t<itemData name=\"s2\" defStyleNum=\"dsFunction\" bold=\"true\" />\n\t\t\t<itemData name=\"s3\" defStyleNum=\"dsFunction\" bold=\"true\" />\n\t\t\t<itemData name=\"blockquote\" defStyleNum=\"dsDataType\" />\n\t\t\t<itemData name=\"bq-emphasis\" defStyleNum=\"dsDataType\" italic=\"true\" />\n\t\t\t<itemData name=\"bq-strong\" defStyleNum=\"dsDataType\" bold=\"true\" />\n\t\t\t<itemData name=\"bullet\" defStyleNum=\"dsFloat\" />\n\t\t\t<itemData name=\"bl-emphasis\" defStyleNum=\"dsFloat\" italic=\"true\" />\n\t\t\t<itemData name=\"bl-strong\" defStyleNum=\"dsFloat\" bold=\"true\" />\n\t\t\t<itemData name=\"numlist\" defStyleNum=\"dsFloat\" />\n\t\t\t<itemData name=\"nl-emphasis\" defStyleNum=\"dsFloat\" italic=\"true\" />\n\t\t\t<itemData name=\"nl-strong\" defStyleNum=\"dsFloat\" bold=\"true\" />\n\t\t\t<itemData name=\"comment\"  defStyleNum=\"dsComment\" />\n\t\t\t<itemData name=\"code\" defStyleNum=\"dsBaseN\" />\n\t\t\t<itemData name=\"reflink\" defStyleNum=\"dsOthers\" underline=\"true\" />\n\t\t\t<itemData name=\"inlinelink\" defStyleNum=\"dsOthers\" underline=\"true\" />\n\t\t\t<itemData name=\"autolink\" defStyleNum=\"dsOthers\" underline=\"true\" />\n\t\t\t<itemData name=\"mailtolink\" defStyleNum=\"dsOthers\" underline=\"true\" />\n\t\t\t<itemData name=\"footnote\" defStyleNum=\"dsOthers\" italic=\"true\" />\n\t\t\t<itemData name=\"meta\"  defStyleNum=\"dsComment\" bold=\"true\" />\n\t\t\t<itemData name=\"reflinktarget\" defStyleNum=\"dsOthers\" italic=\"false\" bold=\"false\" />\n\t\t\t<itemData name=\"inlineimage\" defStyleNum=\"dsAlert\" italic=\"false\" bold=\"false\" />\n\t\t\t<itemData name=\"refimage\" defStyleNum=\"dsAlert\" italic=\"false\" bold=\"false\" />\n\t\t</itemDatas>\n\n\t</highlighting>\n\n\t<general>\n\t\t<comments>\n\t\t\t<comment name=\"multiLine\" start=\"&lt;!--\" end=\"--&gt;\" region=\"comment\" />\n\t\t</comments>\n\t</general>\n\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/gowork.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<language name=\"GoWork\" section=\"Sources\"\n          version=\"1.00\" kateversion=\"2.4\"\n          indenter=\"cstyle\"\n          extensions=\"go.work\"\n          mimetype=\"text/x-gowork\"\n          priority=\"5\"\n          author=\"visualfc\"\n          license=\"BSD\">\n  <highlighting>\n    <list name=\"keywords\">\n      <item> go </item>\n      <item> use </item>\n      <item> replace </item>\n    </list>\n  <contexts>\n      <context name=\"Normal\"        attribute=\"Normal Text\" lineEndContext=\"#stay\">\n        <keyword      attribute=\"Keyword\"  context=\"#stay\" String=\"keywords\" />\n        <Detect2Chars attribute=\"Symbol\" context=\"#stay\" char=\"=\" char1=\">\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"(\" beginRegion=\"Brace1\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\")\" endRegion=\"Brace1\" />\n        <Detect2Chars attribute=\"Comment\" context=\"Comment\" char=\"/\" char1=\"/\"/>\n      </context>\n\t\t<context name=\"Comment\" attribute=\"Comment\" lineEndContext=\"#pop\">\n\t\t</context>\n    </contexts>\n    <itemDatas>\n      <itemData name=\"Normal Text\"  defStyleNum=\"dsNormal\" spellChecking=\"false\"/>\n      <itemData name=\"Keyword\"      defStyleNum=\"dsKeyword\" spellChecking=\"false\"/>\n      <itemData name=\"Symbol\"       defStyleNum=\"dsSymbol\" spellChecking=\"false\"/>\n      <itemData name=\"Comment\"      defStyleNum=\"dsComment\" afterwhitespace=\"true\"/>\n    </itemDatas>\n  </highlighting>\n  <general>\n    <comments>\n      <comment name=\"singleLine\" start=\"//\" position=\"afterwhitespace\"/>\n    </comments>\n  </general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/html.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\"\n[\n\t<!ENTITY name    \"[A-Za-z_:][\\w.:_-]*\">\n\t<!ENTITY entref  \"&amp;(#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);\">\n]>\n<language name=\"HTML\" version=\"1.99\" kateversion=\"2.4\" section=\"Markup\" extensions=\"*.htm;*.html;*.shtml;*.shtm\" mimetype=\"text/html\"  author=\"Wilbert Berendsen (wilbert@kde.nl)\" license=\"LGPL\" priority=\"10\">\n\n<highlighting>\n<contexts>\n  <context name=\"Start\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <IncludeRules context=\"FindHTML\" />\n  </context>\n\n  <context name=\"FindHTML\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectSpaces/>\n    <DetectIdentifier/>\n    <StringDetect attribute=\"Comment\" context=\"Comment\" String=\"&lt;!--\" beginRegion=\"comment\" />\n    <StringDetect attribute=\"CDATA\" context=\"CDATA\" String=\"&lt;![CDATA[\" beginRegion=\"cdata\" />\n    <RegExpr attribute=\"Doctype\" context=\"Doctype\" String=\"&lt;!DOCTYPE\\s+\" beginRegion=\"doctype\" />\n    <RegExpr attribute=\"Processing Instruction\" context=\"PI\" String=\"&lt;\\?[\\w:-]*\" beginRegion=\"pi\" />\n    <RegExpr attribute=\"Element\" context=\"CSS\" String=\"&lt;style\\b\" insensitive=\"TRUE\" beginRegion=\"style\" />\n    <RegExpr attribute=\"Element\" context=\"JS\" String=\"&lt;script\\b\" insensitive=\"TRUE\" beginRegion=\"script\" />\n    <RegExpr attribute=\"Element\" context=\"El Open\" String=\"&lt;pre\\b\" insensitive=\"TRUE\" beginRegion=\"pre\" />\n    <RegExpr attribute=\"Element\" context=\"El Open\" String=\"&lt;div\\b\" insensitive=\"TRUE\" beginRegion=\"div\" />\n    <RegExpr attribute=\"Element\" context=\"El Open\" String=\"&lt;table\\b\" insensitive=\"TRUE\" beginRegion=\"table\" />\n    <RegExpr attribute=\"Element\" context=\"El Open\" String=\"&lt;ul\\b\" insensitive=\"TRUE\" beginRegion=\"ul\" />\n    <RegExpr attribute=\"Element\" context=\"El Open\" String=\"&lt;ol\\b\" insensitive=\"TRUE\" beginRegion=\"ol\" />\n    <RegExpr attribute=\"Element\" context=\"El Open\" String=\"&lt;dl\\b\" insensitive=\"TRUE\" beginRegion=\"dl\" />\n    <RegExpr attribute=\"Element\" context=\"El Open\" String=\"&lt;&name;\" />\n    <RegExpr attribute=\"Element\" context=\"El Close\" String=\"&lt;/pre\\b\" insensitive=\"TRUE\" endRegion=\"pre\" />\n    <RegExpr attribute=\"Element\" context=\"El Close\" String=\"&lt;/div\\b\" insensitive=\"TRUE\" endRegion=\"div\" />\n    <RegExpr attribute=\"Element\" context=\"El Close\" String=\"&lt;/table\\b\" insensitive=\"TRUE\" endRegion=\"table\" />\n    <RegExpr attribute=\"Element\" context=\"El Close\" String=\"&lt;/ul\\b\" insensitive=\"TRUE\" endRegion=\"ul\" />\n    <RegExpr attribute=\"Element\" context=\"El Close\" String=\"&lt;/ol\\b\" insensitive=\"TRUE\" endRegion=\"ol\" />\n    <RegExpr attribute=\"Element\" context=\"El Close\" String=\"&lt;/dl\\b\" insensitive=\"TRUE\" endRegion=\"dl\" />\n    <RegExpr attribute=\"Element\" context=\"El Close\" String=\"&lt;/&name;\" />\n    <!-- as long as kde gives DTDs the text/html mimetype--><IncludeRules context=\"FindDTDRules\" />\n    <IncludeRules context=\"FindEntityRefs\" />\n  </context>\n\n  <context name=\"FindEntityRefs\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <RegExpr attribute=\"EntityRef\" context=\"#stay\" String=\"&entref;\" />\n    <AnyChar attribute=\"Error\" context=\"#stay\" String=\"&amp;&lt;\" />\n  </context>\n\n  <context name=\"FindPEntityRefs\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <RegExpr attribute=\"EntityRef\" context=\"#stay\" String=\"&entref;\" />\n    <RegExpr attribute=\"PEntityRef\" context=\"#stay\" String=\"%&name;;\" />\n    <AnyChar attribute=\"Error\" context=\"#stay\" String=\"&amp;%\" />\n  </context>\n\n  <context name=\"FindAttributes\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <RegExpr attribute=\"Attribute\" context=\"#stay\" String=\"&name;\" column=\"0\"/>\n    <RegExpr attribute=\"Attribute\" context=\"#stay\" String=\"\\s+&name;\" />\n    <DetectChar attribute=\"Attribute\" context=\"Value\" char=\"=\" />\n  </context>\n\n  <context name=\"FindDTDRules\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <RegExpr attribute=\"Doctype\" context=\"Doctype Markupdecl\" String=\"&lt;!(ELEMENT|ENTITY|ATTLIST|NOTATION)\\b\" />\n  </context>\n\n\n  <context name=\"Comment\" attribute=\"Comment\" lineEndContext=\"#stay\">\n    <DetectSpaces/>\n    <IncludeRules context=\"##Alerts\" />\n    <DetectIdentifier/>\n    <StringDetect attribute=\"Comment\" context=\"#pop\" String=\"--&gt;\" endRegion=\"comment\" />\n    <RegExpr attribute=\"Error\" context=\"#stay\" String=\"-(-(?!-&gt;))+\" />\n  </context>\n\n  <context name=\"CDATA\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectSpaces/>\n    <DetectIdentifier/>\n    <StringDetect attribute=\"CDATA\" context=\"#pop\" String=\"]]&gt;\" endRegion=\"cdata\" />\n    <StringDetect attribute=\"EntityRef\" context=\"#stay\" String=\"]]&amp;gt;\" />\n  </context>\n\n  <context name=\"PI\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <Detect2Chars attribute=\"Processing Instruction\" context=\"#pop\" char=\"?\" char1=\"&gt;\" endRegion=\"pi\" />\n  </context>\n\n  <context name=\"Doctype\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Doctype\" context=\"#pop\" char=\"&gt;\" endRegion=\"doctype\" />\n    <DetectChar attribute=\"Doctype\" context=\"Doctype Internal Subset\" char=\"[\" beginRegion=\"int_subset\" />\n  </context>\n\n  <context name=\"Doctype Internal Subset\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Doctype\" context=\"#pop\" char=\"]\" endRegion=\"int_subset\" />\n    <IncludeRules context=\"FindDTDRules\" />\n    <StringDetect attribute=\"Comment\" context=\"Comment\" String=\"&lt;!--\" beginRegion=\"comment\" />\n    <RegExpr attribute=\"Processing Instruction\" context=\"PI\" String=\"&lt;\\?[\\w:-]*\" beginRegion=\"pi\" />\n    <IncludeRules context=\"FindPEntityRefs\" />\n  </context>\n\n  <context name=\"Doctype Markupdecl\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Doctype\" context=\"#pop\" char=\"&gt;\" />\n    <DetectChar attribute=\"Value\" context=\"Doctype Markupdecl DQ\" char=\"&quot;\" />\n    <DetectChar attribute=\"Value\" context=\"Doctype Markupdecl SQ\" char=\"&apos;\" />\n  </context>\n\n  <context name=\"Doctype Markupdecl DQ\" attribute=\"Value\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Value\" context=\"#pop\" char=\"&quot;\" />\n    <IncludeRules context=\"FindPEntityRefs\" />\n  </context>\n\n  <context name=\"Doctype Markupdecl SQ\" attribute=\"Value\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Value\" context=\"#pop\" char=\"&apos;\" />\n    <IncludeRules context=\"FindPEntityRefs\" />\n  </context>\n\n  <context name=\"El Open\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <Detect2Chars attribute=\"Element\" context=\"#pop\" char=\"/\" char1=\"&gt;\" />\n    <DetectChar attribute=\"Element\" context=\"#pop\" char=\"&gt;\" />\n    <IncludeRules context=\"FindAttributes\" />\n    <RegExpr attribute=\"Error\" context=\"#stay\" String=\"\\S\" />\n  </context>\n\n  <context name=\"El Close\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Element\" context=\"#pop\" char=\"&gt;\" />\n    <RegExpr attribute=\"Error\" context=\"#stay\" String=\"\\S\" />\n  </context>\n\n  <context name=\"El Close 2\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Element\" context=\"#pop#pop#pop\" char=\"&gt;\" />\n    <RegExpr attribute=\"Error\" context=\"#stay\" String=\"\\S\" />\n  </context>\n\n  <context name=\"El Close 3\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Element\" context=\"#pop#pop#pop#pop\" char=\"&gt;\" />\n    <RegExpr attribute=\"Error\" context=\"#stay\" String=\"\\S\" />\n  </context>\n\n  <context name=\"CSS\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <Detect2Chars attribute=\"Element\" context=\"#pop\" char=\"/\" char1=\"&gt;\" endRegion=\"style\" />\n    <DetectChar attribute=\"Element\" context=\"CSS content\" char=\"&gt;\" />\n    <IncludeRules context=\"FindAttributes\" />\n    <RegExpr attribute=\"Error\" context=\"#stay\" String=\"\\S\" />\n  </context>\n\n  <context name=\"CSS content\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <RegExpr attribute=\"Element\" context=\"El Close 2\" String=\"&lt;/style\\b\" insensitive=\"TRUE\" endRegion=\"style\" />\n    <IncludeRules context=\"##CSS\" includeAttrib=\"true\"/>\n  </context>\n\n  <context name=\"JS\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <Detect2Chars attribute=\"Element\" context=\"#pop\" char=\"/\" char1=\"&gt;\" endRegion=\"script\" />\n    <DetectChar attribute=\"Element\" context=\"JS content\" char=\"&gt;\" />\n    <IncludeRules context=\"FindAttributes\" />\n    <RegExpr attribute=\"Error\" context=\"#stay\" String=\"\\S\" />\n  </context>\n\n  <context name=\"JS content\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <RegExpr attribute=\"Element\" context=\"El Close 2\" String=\"&lt;/script\\b\" insensitive=\"TRUE\" endRegion=\"script\" />\n    <RegExpr attribute=\"Comment\" context=\"JS comment close\" String=\"//(?=.*&lt;/script\\b)\" insensitive=\"TRUE\" />\n    <IncludeRules context=\"##JavaScript\" includeAttrib=\"true\"/>\n  </context>\n\n  <context name=\"JS comment close\" attribute=\"Comment\" lineEndContext=\"#pop\">\n    <RegExpr attribute=\"Element\" context=\"El Close 3\" String=\"&lt;/script\\b\" insensitive=\"TRUE\" endRegion=\"script\" />\n    <IncludeRules context=\"##Alerts\" />\n  </context>\n\n  <context name=\"Value\" attribute=\"Normal Text\" lineEndContext=\"#stay\" fallthrough=\"true\" fallthroughContext=\"Value NQ\">\n    <DetectChar attribute=\"Value\" context=\"Value DQ\" char=\"&quot;\" />\n    <DetectChar attribute=\"Value\" context=\"Value SQ\" char=\"&apos;\" />\n    <DetectSpaces />\n  </context>\n\n  <context name=\"Value NQ\" attribute=\"Normal Text\" lineEndContext=\"#pop#pop\" fallthrough=\"true\" fallthroughContext=\"#pop#pop\">\n    <IncludeRules context=\"FindEntityRefs\" />\n    <RegExpr attribute=\"Value\" context=\"#stay\" String=\"/(?!&gt;)\" />\n    <RegExpr attribute=\"Value\" context=\"#stay\" String=\"[^/&gt;&lt;&quot;&apos;\\s]\" />\n  </context>\n\n  <context name=\"Value DQ\" attribute=\"Value\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Value\" context=\"#pop#pop\" char=\"&quot;\" />\n    <IncludeRules context=\"FindEntityRefs\" />\n  </context>\n\n  <context name=\"Value SQ\" attribute=\"Value\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Value\" context=\"#pop#pop\" char=\"&apos;\" />\n    <IncludeRules context=\"FindEntityRefs\" />\n  </context>\n\n</contexts>\n<itemDatas>\n  <itemData name=\"Normal Text\" defStyleNum=\"dsNormal\" />\n  <itemData name=\"Comment\" defStyleNum=\"dsComment\" />\n  <itemData name=\"CDATA\" defStyleNum=\"dsBaseN\" bold=\"1\" />\n  <itemData name=\"Processing Instruction\" defStyleNum=\"dsKeyword\" />\n  <itemData name=\"Doctype\" defStyleNum=\"dsDataType\" bold=\"1\" />\n  <itemData name=\"Element\" defStyleNum=\"dsKeyword\" />\n  <itemData name=\"Attribute\" defStyleNum=\"dsOthers\" />\n  <itemData name=\"Value\" defStyleNum=\"dsString\"/>\n  <itemData name=\"EntityRef\" defStyleNum=\"dsDecVal\" />\n  <itemData name=\"PEntityRef\" defStyleNum=\"dsDecVal\" />\n  <itemData name=\"Error\" defStyleNum=\"dsError\" />\n</itemDatas>\n\n</highlighting>\n<general>\n  <comments>\n    <comment name=\"multiLine\" start=\"&lt;!--\" end=\"--&gt;\" />\n  </comments>\n</general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/java.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<language name=\"Java\" version=\"1.21\" kateversion=\"2.4\" section=\"Sources\" extensions=\"*.java\" mimetype=\"text/x-java\" license=\"LGPL\" author=\"Alfredo Luiz Foltran Fialho (alfoltran@ig.com.br)\">\n\t<highlighting>\n\t\t<list name=\"java15\">\n\t\t\t<item> ACTIVE </item>\n\t\t\t<item> ACTIVITY_COMPLETED </item>\n\t\t\t<item> ACTIVITY_REQUIRED </item>\n\t\t\t<item> ARG_IN </item>\n\t\t\t<item> ARG_INOUT </item>\n\t\t\t<item> ARG_OUT </item>\n\t\t\t<item> AWTError </item>\n\t\t\t<item> AWTEvent </item>\n\t\t\t<item> AWTEventListener </item>\n\t\t\t<item> AWTEventListenerProxy </item>\n\t\t\t<item> AWTEventMulticaster </item>\n\t\t\t<item> AWTException </item>\n\t\t\t<item> AWTKeyStroke </item>\n\t\t\t<item> AWTPermission </item>\n\t\t\t<item> AbstractAction </item>\n\t\t\t<item> AbstractBorder </item>\n\t\t\t<item> AbstractButton </item>\n\t\t\t<item> AbstractCellEditor </item>\n\t\t\t<item> AbstractCollection </item>\n\t\t\t<item> AbstractColorChooserPanel </item>\n\t\t\t<item> AbstractDocument </item>\n\t\t\t<item> AbstractDocument.AttributeContext </item>\n\t\t\t<item> AbstractDocument.Content </item>\n\t\t\t<item> AbstractDocument.ElementEdit </item>\n\t\t\t<item> AbstractExecutorService </item>\n\t\t\t<item> AbstractInterruptibleChannel </item>\n\t\t\t<item> AbstractLayoutCache </item>\n\t\t\t<item> AbstractLayoutCache.NodeDimensions </item>\n\t\t\t<item> AbstractList </item>\n\t\t\t<item> AbstractListModel </item>\n\t\t\t<item> AbstractMap </item>\n\t\t\t<item> AbstractMethodError </item>\n\t\t\t<item> AbstractPreferences </item>\n\t\t\t<item> AbstractQueue </item>\n\t\t\t<item> AbstractQueuedSynchronizer </item>\n\t\t\t<item> AbstractSelectableChannel </item>\n\t\t\t<item> AbstractSelectionKey </item>\n\t\t\t<item> AbstractSelector </item>\n\t\t\t<item> AbstractSequentialList </item>\n\t\t\t<item> AbstractSet </item>\n\t\t\t<item> AbstractSpinnerModel </item>\n\t\t\t<item> AbstractTableModel </item>\n\t\t\t<item> AbstractUndoableEdit </item>\n\t\t\t<item> AbstractWriter </item>\n\t\t\t<item> AccessControlContext </item>\n\t\t\t<item> AccessControlException </item>\n\t\t\t<item> AccessController </item>\n\t\t\t<item> AccessException </item>\n\t\t\t<item> Accessible </item>\n\t\t\t<item> AccessibleAction </item>\n\t\t\t<item> AccessibleAttributeSequence </item>\n\t\t\t<item> AccessibleBundle </item>\n\t\t\t<item> AccessibleComponent </item>\n\t\t\t<item> AccessibleContext </item>\n\t\t\t<item> AccessibleEditableText </item>\n\t\t\t<item> AccessibleExtendedComponent </item>\n\t\t\t<item> AccessibleExtendedTable </item>\n\t\t\t<item> AccessibleExtendedText </item>\n\t\t\t<item> AccessibleHyperlink </item>\n\t\t\t<item> AccessibleHypertext </item>\n\t\t\t<item> AccessibleIcon </item>\n\t\t\t<item> AccessibleKeyBinding </item>\n\t\t\t<item> AccessibleObject </item>\n\t\t\t<item> AccessibleRelation </item>\n\t\t\t<item> AccessibleRelationSet </item>\n\t\t\t<item> AccessibleResourceBundle </item>\n\t\t\t<item> AccessibleRole </item>\n\t\t\t<item> AccessibleSelection </item>\n\t\t\t<item> AccessibleState </item>\n\t\t\t<item> AccessibleStateSet </item>\n\t\t\t<item> AccessibleStreamable </item>\n\t\t\t<item> AccessibleTable </item>\n\t\t\t<item> AccessibleTableModelChange </item>\n\t\t\t<item> AccessibleText </item>\n\t\t\t<item> AccessibleTextSequence </item>\n\t\t\t<item> AccessibleValue </item>\n\t\t\t<item> AccountException </item>\n\t\t\t<item> AccountExpiredException </item>\n\t\t\t<item> AccountLockedException </item>\n\t\t\t<item> AccountNotFoundException </item>\n\t\t\t<item> Acl </item>\n\t\t\t<item> AclEntry </item>\n\t\t\t<item> AclNotFoundException </item>\n\t\t\t<item> Action </item>\n\t\t\t<item> ActionEvent </item>\n\t\t\t<item> ActionListener </item>\n\t\t\t<item> ActionMap </item>\n\t\t\t<item> ActionMapUIResource </item>\n\t\t\t<item> Activatable </item>\n\t\t\t<item> ActivateFailedException </item>\n\t\t\t<item> ActivationDesc </item>\n\t\t\t<item> ActivationException </item>\n\t\t\t<item> ActivationGroup </item>\n\t\t\t<item> ActivationGroupDesc </item>\n\t\t\t<item> ActivationGroupDesc.CommandEnvironment </item>\n\t\t\t<item> ActivationGroupID </item>\n\t\t\t<item> ActivationGroup_Stub </item>\n\t\t\t<item> ActivationID </item>\n\t\t\t<item> ActivationInstantiator </item>\n\t\t\t<item> ActivationMonitor </item>\n\t\t\t<item> ActivationSystem </item>\n\t\t\t<item> Activator </item>\n\t\t\t<item> ActiveEvent </item>\n\t\t\t<item> ActivityCompletedException </item>\n\t\t\t<item> ActivityRequiredException </item>\n\t\t\t<item> AdapterActivator </item>\n\t\t\t<item> AdapterActivatorOperations </item>\n\t\t\t<item> AdapterAlreadyExists </item>\n\t\t\t<item> AdapterAlreadyExistsHelper </item>\n\t\t\t<item> AdapterInactive </item>\n\t\t\t<item> AdapterInactiveHelper </item>\n\t\t\t<item> AdapterManagerIdHelper </item>\n\t\t\t<item> AdapterNameHelper </item>\n\t\t\t<item> AdapterNonExistent </item>\n\t\t\t<item> AdapterNonExistentHelper </item>\n\t\t\t<item> AdapterStateHelper </item>\n\t\t\t<item> AddressHelper </item>\n\t\t\t<item> Adjustable </item>\n\t\t\t<item> AdjustmentEvent </item>\n\t\t\t<item> AdjustmentListener </item>\n\t\t\t<item> Adler32 </item>\n\t\t\t<item> AffineTransform </item>\n\t\t\t<item> AffineTransformOp </item>\n\t\t\t<item> AlgorithmParameterGenerator </item>\n\t\t\t<item> AlgorithmParameterGeneratorSpi </item>\n\t\t\t<item> AlgorithmParameterSpec </item>\n\t\t\t<item> AlgorithmParameters </item>\n\t\t\t<item> AlgorithmParametersSpi </item>\n\t\t\t<item> AllPermission </item>\n\t\t\t<item> AlphaComposite </item>\n\t\t\t<item> AlreadyBound </item>\n\t\t\t<item> AlreadyBoundException </item>\n\t\t\t<item> AlreadyBoundHelper </item>\n\t\t\t<item> AlreadyBoundHolder </item>\n\t\t\t<item> AlreadyConnectedException </item>\n\t\t\t<item> AncestorEvent </item>\n\t\t\t<item> AncestorListener </item>\n\t\t\t<item> AnnotatedElement </item>\n\t\t\t<item> Annotation </item>\n\t\t\t<item> AnnotationFormatError </item>\n\t\t\t<item> AnnotationTypeMismatchException </item>\n\t\t\t<item> Any </item>\n\t\t\t<item> AnyHolder </item>\n\t\t\t<item> AnySeqHelper </item>\n\t\t\t<item> AnySeqHelper </item>\n\t\t\t<item> AnySeqHolder </item>\n\t\t\t<item> AppConfigurationEntry </item>\n\t\t\t<item> AppConfigurationEntry.LoginModuleControlFlag </item>\n\t\t\t<item> Appendable </item>\n\t\t\t<item> Applet </item>\n\t\t\t<item> AppletContext </item>\n\t\t\t<item> AppletInitializer </item>\n\t\t\t<item> AppletStub </item>\n\t\t\t<item> ApplicationException </item>\n\t\t\t<item> Arc2D </item>\n\t\t\t<item> Arc2D.Double </item>\n\t\t\t<item> Arc2D.Float </item>\n\t\t\t<item> Area </item>\n\t\t\t<item> AreaAveragingScaleFilter </item>\n\t\t\t<item> ArithmeticException </item>\n\t\t\t<item> Array </item>\n\t\t\t<item> Array </item>\n\t\t\t<item> ArrayBlockingQueue </item>\n\t\t\t<item> ArrayIndexOutOfBoundsException </item>\n\t\t\t<item> ArrayList </item>\n\t\t\t<item> ArrayStoreException </item>\n\t\t\t<item> ArrayType </item>\n\t\t\t<item> Arrays </item>\n\t\t\t<item> AssertionError </item>\n\t\t\t<item> AsyncBoxView </item>\n\t\t\t<item> AsynchronousCloseException </item>\n\t\t\t<item> AtomicBoolean </item>\n\t\t\t<item> AtomicInteger </item>\n\t\t\t<item> AtomicIntegerArray </item>\n\t\t\t<item> AtomicIntegerFieldUpdater </item>\n\t\t\t<item> AtomicLong </item>\n\t\t\t<item> AtomicLongArray </item>\n\t\t\t<item> AtomicLongFieldUpdater </item>\n\t\t\t<item> AtomicMarkableReference </item>\n\t\t\t<item> AtomicReference </item>\n\t\t\t<item> AtomicReferenceArray </item>\n\t\t\t<item> AtomicReferenceFieldUpdater </item>\n\t\t\t<item> AtomicStampedReference </item>\n\t\t\t<item> Attr </item>\n\t\t\t<item> Attribute </item>\n\t\t\t<item> Attribute </item>\n\t\t\t<item> Attribute </item>\n\t\t\t<item> AttributeChangeNotification </item>\n\t\t\t<item> AttributeChangeNotificationFilter </item>\n\t\t\t<item> AttributeException </item>\n\t\t\t<item> AttributeInUseException </item>\n\t\t\t<item> AttributeList </item>\n\t\t\t<item> AttributeList </item>\n\t\t\t<item> AttributeList </item>\n\t\t\t<item> AttributeListImpl </item>\n\t\t\t<item> AttributeModificationException </item>\n\t\t\t<item> AttributeNotFoundException </item>\n\t\t\t<item> AttributeSet </item>\n\t\t\t<item> AttributeSet </item>\n\t\t\t<item> AttributeSet.CharacterAttribute </item>\n\t\t\t<item> AttributeSet.ColorAttribute </item>\n\t\t\t<item> AttributeSet.FontAttribute </item>\n\t\t\t<item> AttributeSet.ParagraphAttribute </item>\n\t\t\t<item> AttributeSetUtilities </item>\n\t\t\t<item> AttributeValueExp </item>\n\t\t\t<item> AttributedCharacterIterator </item>\n\t\t\t<item> AttributedCharacterIterator.Attribute </item>\n\t\t\t<item> AttributedString </item>\n\t\t\t<item> Attributes </item>\n\t\t\t<item> Attributes </item>\n\t\t\t<item> Attributes </item>\n\t\t\t<item> Attributes.Name </item>\n\t\t\t<item> Attributes2 </item>\n\t\t\t<item> Attributes2Impl </item>\n\t\t\t<item> AttributesImpl </item>\n\t\t\t<item> AudioClip </item>\n\t\t\t<item> AudioFileFormat </item>\n\t\t\t<item> AudioFileFormat.Type </item>\n\t\t\t<item> AudioFileReader </item>\n\t\t\t<item> AudioFileWriter </item>\n\t\t\t<item> AudioFormat </item>\n\t\t\t<item> AudioFormat.Encoding </item>\n\t\t\t<item> AudioInputStream </item>\n\t\t\t<item> AudioPermission </item>\n\t\t\t<item> AudioSystem </item>\n\t\t\t<item> AuthPermission </item>\n\t\t\t<item> AuthProvider </item>\n\t\t\t<item> AuthenticationException </item>\n\t\t\t<item> AuthenticationException </item>\n\t\t\t<item> AuthenticationNotSupportedException </item>\n\t\t\t<item> Authenticator </item>\n\t\t\t<item> Authenticator.RequestorType </item>\n\t\t\t<item> AuthorizeCallback </item>\n\t\t\t<item> Autoscroll </item>\n\t\t\t<item> BAD_CONTEXT </item>\n\t\t\t<item> BAD_INV_ORDER </item>\n\t\t\t<item> BAD_OPERATION </item>\n\t\t\t<item> BAD_PARAM </item>\n\t\t\t<item> BAD_POLICY </item>\n\t\t\t<item> BAD_POLICY_TYPE </item>\n\t\t\t<item> BAD_POLICY_VALUE </item>\n\t\t\t<item> BAD_QOS </item>\n\t\t\t<item> BAD_TYPECODE </item>\n\t\t\t<item> BMPImageWriteParam </item>\n\t\t\t<item> BackingStoreException </item>\n\t\t\t<item> BadAttributeValueExpException </item>\n\t\t\t<item> BadBinaryOpValueExpException </item>\n\t\t\t<item> BadKind </item>\n\t\t\t<item> BadLocationException </item>\n\t\t\t<item> BadPaddingException </item>\n\t\t\t<item> BadStringOperationException </item>\n\t\t\t<item> BandCombineOp </item>\n\t\t\t<item> BandedSampleModel </item>\n\t\t\t<item> BaseRowSet </item>\n\t\t\t<item> BasicArrowButton </item>\n\t\t\t<item> BasicAttribute </item>\n\t\t\t<item> BasicAttributes </item>\n\t\t\t<item> BasicBorders </item>\n\t\t\t<item> BasicBorders.ButtonBorder </item>\n\t\t\t<item> BasicBorders.FieldBorder </item>\n\t\t\t<item> BasicBorders.MarginBorder </item>\n\t\t\t<item> BasicBorders.MenuBarBorder </item>\n\t\t\t<item> BasicBorders.RadioButtonBorder </item>\n\t\t\t<item> BasicBorders.RolloverButtonBorder </item>\n\t\t\t<item> BasicBorders.SplitPaneBorder </item>\n\t\t\t<item> BasicBorders.ToggleButtonBorder </item>\n\t\t\t<item> BasicButtonListener </item>\n\t\t\t<item> BasicButtonUI </item>\n\t\t\t<item> BasicCheckBoxMenuItemUI </item>\n\t\t\t<item> BasicCheckBoxUI </item>\n\t\t\t<item> BasicColorChooserUI </item>\n\t\t\t<item> BasicComboBoxEditor </item>\n\t\t\t<item> BasicComboBoxEditor.UIResource </item>\n\t\t\t<item> BasicComboBoxRenderer </item>\n\t\t\t<item> BasicComboBoxRenderer.UIResource </item>\n\t\t\t<item> BasicComboBoxUI </item>\n\t\t\t<item> BasicComboPopup </item>\n\t\t\t<item> BasicControl </item>\n\t\t\t<item> BasicDesktopIconUI </item>\n\t\t\t<item> BasicDesktopPaneUI </item>\n\t\t\t<item> BasicDirectoryModel </item>\n\t\t\t<item> BasicEditorPaneUI </item>\n\t\t\t<item> BasicFileChooserUI </item>\n\t\t\t<item> BasicFormattedTextFieldUI </item>\n\t\t\t<item> BasicGraphicsUtils </item>\n\t\t\t<item> BasicHTML </item>\n\t\t\t<item> BasicIconFactory </item>\n\t\t\t<item> BasicInternalFrameTitlePane </item>\n\t\t\t<item> BasicInternalFrameUI </item>\n\t\t\t<item> BasicLabelUI </item>\n\t\t\t<item> BasicListUI </item>\n\t\t\t<item> BasicLookAndFeel </item>\n\t\t\t<item> BasicMenuBarUI </item>\n\t\t\t<item> BasicMenuItemUI </item>\n\t\t\t<item> BasicMenuUI </item>\n\t\t\t<item> BasicOptionPaneUI </item>\n\t\t\t<item> BasicOptionPaneUI.ButtonAreaLayout </item>\n\t\t\t<item> BasicPanelUI </item>\n\t\t\t<item> BasicPasswordFieldUI </item>\n\t\t\t<item> BasicPermission </item>\n\t\t\t<item> BasicPopupMenuSeparatorUI </item>\n\t\t\t<item> BasicPopupMenuUI </item>\n\t\t\t<item> BasicProgressBarUI </item>\n\t\t\t<item> BasicRadioButtonMenuItemUI </item>\n\t\t\t<item> BasicRadioButtonUI </item>\n\t\t\t<item> BasicRootPaneUI </item>\n\t\t\t<item> BasicScrollBarUI </item>\n\t\t\t<item> BasicScrollPaneUI </item>\n\t\t\t<item> BasicSeparatorUI </item>\n\t\t\t<item> BasicSliderUI </item>\n\t\t\t<item> BasicSpinnerUI </item>\n\t\t\t<item> BasicSplitPaneDivider </item>\n\t\t\t<item> BasicSplitPaneUI </item>\n\t\t\t<item> BasicStroke </item>\n\t\t\t<item> BasicTabbedPaneUI </item>\n\t\t\t<item> BasicTableHeaderUI </item>\n\t\t\t<item> BasicTableUI </item>\n\t\t\t<item> BasicTextAreaUI </item>\n\t\t\t<item> BasicTextFieldUI </item>\n\t\t\t<item> BasicTextPaneUI </item>\n\t\t\t<item> BasicTextUI </item>\n\t\t\t<item> BasicTextUI.BasicCaret </item>\n\t\t\t<item> BasicTextUI.BasicHighlighter </item>\n\t\t\t<item> BasicToggleButtonUI </item>\n\t\t\t<item> BasicToolBarSeparatorUI </item>\n\t\t\t<item> BasicToolBarUI </item>\n\t\t\t<item> BasicToolTipUI </item>\n\t\t\t<item> BasicTreeUI </item>\n\t\t\t<item> BasicViewportUI </item>\n\t\t\t<item> BatchUpdateException </item>\n\t\t\t<item> BeanContext </item>\n\t\t\t<item> BeanContextChild </item>\n\t\t\t<item> BeanContextChildComponentProxy </item>\n\t\t\t<item> BeanContextChildSupport </item>\n\t\t\t<item> BeanContextContainerProxy </item>\n\t\t\t<item> BeanContextEvent </item>\n\t\t\t<item> BeanContextMembershipEvent </item>\n\t\t\t<item> BeanContextMembershipListener </item>\n\t\t\t<item> BeanContextProxy </item>\n\t\t\t<item> BeanContextServiceAvailableEvent </item>\n\t\t\t<item> BeanContextServiceProvider </item>\n\t\t\t<item> BeanContextServiceProviderBeanInfo </item>\n\t\t\t<item> BeanContextServiceRevokedEvent </item>\n\t\t\t<item> BeanContextServiceRevokedListener </item>\n\t\t\t<item> BeanContextServices </item>\n\t\t\t<item> BeanContextServicesListener </item>\n\t\t\t<item> BeanContextServicesSupport </item>\n\t\t\t<item> BeanContextServicesSupport.BCSSServiceProvider </item>\n\t\t\t<item> BeanContextSupport </item>\n\t\t\t<item> BeanContextSupport.BCSIterator </item>\n\t\t\t<item> BeanDescriptor </item>\n\t\t\t<item> BeanInfo </item>\n\t\t\t<item> Beans </item>\n\t\t\t<item> BevelBorder </item>\n\t\t\t<item> Bidi </item>\n\t\t\t<item> BigDecimal </item>\n\t\t\t<item> BigInteger </item>\n\t\t\t<item> BinaryRefAddr </item>\n\t\t\t<item> BindException </item>\n\t\t\t<item> Binding </item>\n\t\t\t<item> Binding </item>\n\t\t\t<item> BindingHelper </item>\n\t\t\t<item> BindingHolder </item>\n\t\t\t<item> BindingIterator </item>\n\t\t\t<item> BindingIteratorHelper </item>\n\t\t\t<item> BindingIteratorHolder </item>\n\t\t\t<item> BindingIteratorOperations </item>\n\t\t\t<item> BindingIteratorPOA </item>\n\t\t\t<item> BindingListHelper </item>\n\t\t\t<item> BindingListHolder </item>\n\t\t\t<item> BindingType </item>\n\t\t\t<item> BindingTypeHelper </item>\n\t\t\t<item> BindingTypeHolder </item>\n\t\t\t<item> BitSet </item>\n\t\t\t<item> Blob </item>\n\t\t\t<item> BlockView </item>\n\t\t\t<item> BlockingQueue </item>\n\t\t\t<item> Book </item>\n\t\t\t<item> Boolean </item>\n\t\t\t<item> BooleanControl </item>\n\t\t\t<item> BooleanControl.Type </item>\n\t\t\t<item> BooleanHolder </item>\n\t\t\t<item> BooleanSeqHelper </item>\n\t\t\t<item> BooleanSeqHolder </item>\n\t\t\t<item> Border </item>\n\t\t\t<item> BorderFactory </item>\n\t\t\t<item> BorderLayout </item>\n\t\t\t<item> BorderUIResource </item>\n\t\t\t<item> BorderUIResource.BevelBorderUIResource </item>\n\t\t\t<item> BorderUIResource.CompoundBorderUIResource </item>\n\t\t\t<item> BorderUIResource.EmptyBorderUIResource </item>\n\t\t\t<item> BorderUIResource.EtchedBorderUIResource </item>\n\t\t\t<item> BorderUIResource.LineBorderUIResource </item>\n\t\t\t<item> BorderUIResource.MatteBorderUIResource </item>\n\t\t\t<item> BorderUIResource.TitledBorderUIResource </item>\n\t\t\t<item> BoundedRangeModel </item>\n\t\t\t<item> Bounds </item>\n\t\t\t<item> Bounds </item>\n\t\t\t<item> Box </item>\n\t\t\t<item> Box.Filler </item>\n\t\t\t<item> BoxLayout </item>\n\t\t\t<item> BoxView </item>\n\t\t\t<item> BoxedValueHelper </item>\n\t\t\t<item> BreakIterator </item>\n\t\t\t<item> BrokenBarrierException </item>\n\t\t\t<item> Buffer </item>\n\t\t\t<item> BufferCapabilities </item>\n\t\t\t<item> BufferCapabilities.FlipContents </item>\n\t\t\t<item> BufferOverflowException </item>\n\t\t\t<item> BufferStrategy </item>\n\t\t\t<item> BufferUnderflowException </item>\n\t\t\t<item> BufferedImage </item>\n\t\t\t<item> BufferedImageFilter </item>\n\t\t\t<item> BufferedImageOp </item>\n\t\t\t<item> BufferedInputStream </item>\n\t\t\t<item> BufferedOutputStream </item>\n\t\t\t<item> BufferedReader </item>\n\t\t\t<item> BufferedWriter </item>\n\t\t\t<item> Button </item>\n\t\t\t<item> ButtonGroup </item>\n\t\t\t<item> ButtonModel </item>\n\t\t\t<item> ButtonUI </item>\n\t\t\t<item> Byte </item>\n\t\t\t<item> ByteArrayInputStream </item>\n\t\t\t<item> ByteArrayOutputStream </item>\n\t\t\t<item> ByteBuffer </item>\n\t\t\t<item> ByteChannel </item>\n\t\t\t<item> ByteHolder </item>\n\t\t\t<item> ByteLookupTable </item>\n\t\t\t<item> ByteOrder </item>\n\t\t\t<item> CDATASection </item>\n\t\t\t<item> CMMException </item>\n\t\t\t<item> CODESET_INCOMPATIBLE </item>\n\t\t\t<item> COMM_FAILURE </item>\n\t\t\t<item> CRC32 </item>\n\t\t\t<item> CRL </item>\n\t\t\t<item> CRLException </item>\n\t\t\t<item> CRLSelector </item>\n\t\t\t<item> CSS </item>\n\t\t\t<item> CSS.Attribute </item>\n\t\t\t<item> CTX_RESTRICT_SCOPE </item>\n\t\t\t<item> CacheRequest </item>\n\t\t\t<item> CacheResponse </item>\n\t\t\t<item> CachedRowSet </item>\n\t\t\t<item> Calendar </item>\n\t\t\t<item> Callable </item>\n\t\t\t<item> CallableStatement </item>\n\t\t\t<item> Callback </item>\n\t\t\t<item> CallbackHandler </item>\n\t\t\t<item> CancelablePrintJob </item>\n\t\t\t<item> CancellationException </item>\n\t\t\t<item> CancelledKeyException </item>\n\t\t\t<item> CannotProceed </item>\n\t\t\t<item> CannotProceedException </item>\n\t\t\t<item> CannotProceedHelper </item>\n\t\t\t<item> CannotProceedHolder </item>\n\t\t\t<item> CannotRedoException </item>\n\t\t\t<item> CannotUndoException </item>\n\t\t\t<item> Canvas </item>\n\t\t\t<item> CardLayout </item>\n\t\t\t<item> Caret </item>\n\t\t\t<item> CaretEvent </item>\n\t\t\t<item> CaretListener </item>\n\t\t\t<item> CellEditor </item>\n\t\t\t<item> CellEditorListener </item>\n\t\t\t<item> CellRendererPane </item>\n\t\t\t<item> CertPath </item>\n\t\t\t<item> CertPath.CertPathRep </item>\n\t\t\t<item> CertPathBuilder </item>\n\t\t\t<item> CertPathBuilderException </item>\n\t\t\t<item> CertPathBuilderResult </item>\n\t\t\t<item> CertPathBuilderSpi </item>\n\t\t\t<item> CertPathParameters </item>\n\t\t\t<item> CertPathTrustManagerParameters </item>\n\t\t\t<item> CertPathValidator </item>\n\t\t\t<item> CertPathValidatorException </item>\n\t\t\t<item> CertPathValidatorResult </item>\n\t\t\t<item> CertPathValidatorSpi </item>\n\t\t\t<item> CertSelector </item>\n\t\t\t<item> CertStore </item>\n\t\t\t<item> CertStoreException </item>\n\t\t\t<item> CertStoreParameters </item>\n\t\t\t<item> CertStoreSpi </item>\n\t\t\t<item> Certificate </item>\n\t\t\t<item> Certificate </item>\n\t\t\t<item> Certificate </item>\n\t\t\t<item> Certificate.CertificateRep </item>\n\t\t\t<item> CertificateEncodingException </item>\n\t\t\t<item> CertificateEncodingException </item>\n\t\t\t<item> CertificateException </item>\n\t\t\t<item> CertificateException </item>\n\t\t\t<item> CertificateExpiredException </item>\n\t\t\t<item> CertificateExpiredException </item>\n\t\t\t<item> CertificateFactory </item>\n\t\t\t<item> CertificateFactorySpi </item>\n\t\t\t<item> CertificateNotYetValidException </item>\n\t\t\t<item> CertificateNotYetValidException </item>\n\t\t\t<item> CertificateParsingException </item>\n\t\t\t<item> CertificateParsingException </item>\n\t\t\t<item> ChangeEvent </item>\n\t\t\t<item> ChangeListener </item>\n\t\t\t<item> ChangedCharSetException </item>\n\t\t\t<item> Channel </item>\n\t\t\t<item> ChannelBinding </item>\n\t\t\t<item> Channels </item>\n\t\t\t<item> CharArrayReader </item>\n\t\t\t<item> CharArrayWriter </item>\n\t\t\t<item> CharBuffer </item>\n\t\t\t<item> CharConversionException </item>\n\t\t\t<item> CharHolder </item>\n\t\t\t<item> CharSeqHelper </item>\n\t\t\t<item> CharSeqHolder </item>\n\t\t\t<item> CharSequence </item>\n\t\t\t<item> Character </item>\n\t\t\t<item> Character.Subset </item>\n\t\t\t<item> Character.UnicodeBlock </item>\n\t\t\t<item> CharacterCodingException </item>\n\t\t\t<item> CharacterData </item>\n\t\t\t<item> CharacterIterator </item>\n\t\t\t<item> Charset </item>\n\t\t\t<item> CharsetDecoder </item>\n\t\t\t<item> CharsetEncoder </item>\n\t\t\t<item> CharsetProvider </item>\n\t\t\t<item> Checkbox </item>\n\t\t\t<item> CheckboxGroup </item>\n\t\t\t<item> CheckboxMenuItem </item>\n\t\t\t<item> CheckedInputStream </item>\n\t\t\t<item> CheckedOutputStream </item>\n\t\t\t<item> Checksum </item>\n\t\t\t<item> Choice </item>\n\t\t\t<item> ChoiceCallback </item>\n\t\t\t<item> ChoiceFormat </item>\n\t\t\t<item> Chromaticity </item>\n\t\t\t<item> Cipher </item>\n\t\t\t<item> CipherInputStream </item>\n\t\t\t<item> CipherOutputStream </item>\n\t\t\t<item> CipherSpi </item>\n\t\t\t<item> Class </item>\n\t\t\t<item> ClassCastException </item>\n\t\t\t<item> ClassCircularityError </item>\n\t\t\t<item> ClassDefinition </item>\n\t\t\t<item> ClassDesc </item>\n\t\t\t<item> ClassFileTransformer </item>\n\t\t\t<item> ClassFormatError </item>\n\t\t\t<item> ClassLoader </item>\n\t\t\t<item> ClassLoaderRepository </item>\n\t\t\t<item> ClassLoadingMXBean </item>\n\t\t\t<item> ClassNotFoundException </item>\n\t\t\t<item> ClientRequestInfo </item>\n\t\t\t<item> ClientRequestInfoOperations </item>\n\t\t\t<item> ClientRequestInterceptor </item>\n\t\t\t<item> ClientRequestInterceptorOperations </item>\n\t\t\t<item> Clip </item>\n\t\t\t<item> Clipboard </item>\n\t\t\t<item> ClipboardOwner </item>\n\t\t\t<item> Clob </item>\n\t\t\t<item> CloneNotSupportedException </item>\n\t\t\t<item> Cloneable </item>\n\t\t\t<item> Closeable </item>\n\t\t\t<item> ClosedByInterruptException </item>\n\t\t\t<item> ClosedChannelException </item>\n\t\t\t<item> ClosedSelectorException </item>\n\t\t\t<item> CodeSets </item>\n\t\t\t<item> CodeSigner </item>\n\t\t\t<item> CodeSource </item>\n\t\t\t<item> Codec </item>\n\t\t\t<item> CodecFactory </item>\n\t\t\t<item> CodecFactoryHelper </item>\n\t\t\t<item> CodecFactoryOperations </item>\n\t\t\t<item> CodecOperations </item>\n\t\t\t<item> CoderMalfunctionError </item>\n\t\t\t<item> CoderResult </item>\n\t\t\t<item> CodingErrorAction </item>\n\t\t\t<item> CollationElementIterator </item>\n\t\t\t<item> CollationKey </item>\n\t\t\t<item> Collator </item>\n\t\t\t<item> Collection </item>\n\t\t\t<item> CollectionCertStoreParameters </item>\n\t\t\t<item> Collections </item>\n\t\t\t<item> Color </item>\n\t\t\t<item> ColorChooserComponentFactory </item>\n\t\t\t<item> ColorChooserUI </item>\n\t\t\t<item> ColorConvertOp </item>\n\t\t\t<item> ColorModel </item>\n\t\t\t<item> ColorSelectionModel </item>\n\t\t\t<item> ColorSpace </item>\n\t\t\t<item> ColorSupported </item>\n\t\t\t<item> ColorType </item>\n\t\t\t<item> ColorUIResource </item>\n\t\t\t<item> ComboBoxEditor </item>\n\t\t\t<item> ComboBoxModel </item>\n\t\t\t<item> ComboBoxUI </item>\n\t\t\t<item> ComboPopup </item>\n\t\t\t<item> Comment </item>\n\t\t\t<item> CommunicationException </item>\n\t\t\t<item> Comparable </item>\n\t\t\t<item> Comparator </item>\n\t\t\t<item> CompilationMXBean </item>\n\t\t\t<item> Compiler </item>\n\t\t\t<item> CompletionService </item>\n\t\t\t<item> CompletionStatus </item>\n\t\t\t<item> CompletionStatusHelper </item>\n\t\t\t<item> Component </item>\n\t\t\t<item> ComponentAdapter </item>\n\t\t\t<item> ComponentColorModel </item>\n\t\t\t<item> ComponentEvent </item>\n\t\t\t<item> ComponentIdHelper </item>\n\t\t\t<item> ComponentInputMap </item>\n\t\t\t<item> ComponentInputMapUIResource </item>\n\t\t\t<item> ComponentListener </item>\n\t\t\t<item> ComponentOrientation </item>\n\t\t\t<item> ComponentSampleModel </item>\n\t\t\t<item> ComponentUI </item>\n\t\t\t<item> ComponentView </item>\n\t\t\t<item> Composite </item>\n\t\t\t<item> CompositeContext </item>\n\t\t\t<item> CompositeData </item>\n\t\t\t<item> CompositeDataSupport </item>\n\t\t\t<item> CompositeName </item>\n\t\t\t<item> CompositeType </item>\n\t\t\t<item> CompositeView </item>\n\t\t\t<item> CompoundBorder </item>\n\t\t\t<item> CompoundControl </item>\n\t\t\t<item> CompoundControl.Type </item>\n\t\t\t<item> CompoundEdit </item>\n\t\t\t<item> CompoundName </item>\n\t\t\t<item> Compression </item>\n\t\t\t<item> ConcurrentHashMap </item>\n\t\t\t<item> ConcurrentLinkedQueue </item>\n\t\t\t<item> ConcurrentMap </item>\n\t\t\t<item> ConcurrentModificationException </item>\n\t\t\t<item> Condition </item>\n\t\t\t<item> Configuration </item>\n\t\t\t<item> ConfigurationException </item>\n\t\t\t<item> ConfirmationCallback </item>\n\t\t\t<item> ConnectException </item>\n\t\t\t<item> ConnectException </item>\n\t\t\t<item> ConnectIOException </item>\n\t\t\t<item> Connection </item>\n\t\t\t<item> ConnectionEvent </item>\n\t\t\t<item> ConnectionEventListener </item>\n\t\t\t<item> ConnectionPendingException </item>\n\t\t\t<item> ConnectionPoolDataSource </item>\n\t\t\t<item> ConsoleHandler </item>\n\t\t\t<item> Constructor </item>\n\t\t\t<item> Container </item>\n\t\t\t<item> ContainerAdapter </item>\n\t\t\t<item> ContainerEvent </item>\n\t\t\t<item> ContainerListener </item>\n\t\t\t<item> ContainerOrderFocusTraversalPolicy </item>\n\t\t\t<item> ContentHandler </item>\n\t\t\t<item> ContentHandler </item>\n\t\t\t<item> ContentHandlerFactory </item>\n\t\t\t<item> ContentModel </item>\n\t\t\t<item> Context </item>\n\t\t\t<item> Context </item>\n\t\t\t<item> ContextList </item>\n\t\t\t<item> ContextNotEmptyException </item>\n\t\t\t<item> ContextualRenderedImageFactory </item>\n\t\t\t<item> Control </item>\n\t\t\t<item> Control </item>\n\t\t\t<item> Control.Type </item>\n\t\t\t<item> ControlFactory </item>\n\t\t\t<item> ControllerEventListener </item>\n\t\t\t<item> ConvolveOp </item>\n\t\t\t<item> CookieHandler </item>\n\t\t\t<item> CookieHolder </item>\n\t\t\t<item> Copies </item>\n\t\t\t<item> CopiesSupported </item>\n\t\t\t<item> CopyOnWriteArrayList </item>\n\t\t\t<item> CopyOnWriteArraySet </item>\n\t\t\t<item> CountDownLatch </item>\n\t\t\t<item> CounterMonitor </item>\n\t\t\t<item> CounterMonitorMBean </item>\n\t\t\t<item> CredentialException </item>\n\t\t\t<item> CredentialExpiredException </item>\n\t\t\t<item> CredentialNotFoundException </item>\n\t\t\t<item> CropImageFilter </item>\n\t\t\t<item> CubicCurve2D </item>\n\t\t\t<item> CubicCurve2D.Double </item>\n\t\t\t<item> CubicCurve2D.Float </item>\n\t\t\t<item> Currency </item>\n\t\t\t<item> Current </item>\n\t\t\t<item> Current </item>\n\t\t\t<item> Current </item>\n\t\t\t<item> CurrentHelper </item>\n\t\t\t<item> CurrentHelper </item>\n\t\t\t<item> CurrentHelper </item>\n\t\t\t<item> CurrentHolder </item>\n\t\t\t<item> CurrentOperations </item>\n\t\t\t<item> CurrentOperations </item>\n\t\t\t<item> CurrentOperations </item>\n\t\t\t<item> Cursor </item>\n\t\t\t<item> CustomMarshal </item>\n\t\t\t<item> CustomValue </item>\n\t\t\t<item> Customizer </item>\n\t\t\t<item> CyclicBarrier </item>\n\t\t\t<item> DATA_CONVERSION </item>\n\t\t\t<item> DESKeySpec </item>\n\t\t\t<item> DESedeKeySpec </item>\n\t\t\t<item> DGC </item>\n\t\t\t<item> DHGenParameterSpec </item>\n\t\t\t<item> DHKey </item>\n\t\t\t<item> DHParameterSpec </item>\n\t\t\t<item> DHPrivateKey </item>\n\t\t\t<item> DHPrivateKeySpec </item>\n\t\t\t<item> DHPublicKey </item>\n\t\t\t<item> DHPublicKeySpec </item>\n\t\t\t<item> DISCARDING </item>\n\t\t\t<item> DOMConfiguration </item>\n\t\t\t<item> DOMError </item>\n\t\t\t<item> DOMErrorHandler </item>\n\t\t\t<item> DOMException </item>\n\t\t\t<item> DOMImplementation </item>\n\t\t\t<item> DOMImplementationLS </item>\n\t\t\t<item> DOMImplementationList </item>\n\t\t\t<item> DOMImplementationRegistry </item>\n\t\t\t<item> DOMImplementationSource </item>\n\t\t\t<item> DOMLocator </item>\n\t\t\t<item> DOMLocator </item>\n\t\t\t<item> DOMResult </item>\n\t\t\t<item> DOMSource </item>\n\t\t\t<item> DOMStringList </item>\n\t\t\t<item> DSAKey </item>\n\t\t\t<item> DSAKeyPairGenerator </item>\n\t\t\t<item> DSAParameterSpec </item>\n\t\t\t<item> DSAParams </item>\n\t\t\t<item> DSAPrivateKey </item>\n\t\t\t<item> DSAPrivateKeySpec </item>\n\t\t\t<item> DSAPublicKey </item>\n\t\t\t<item> DSAPublicKeySpec </item>\n\t\t\t<item> DTD </item>\n\t\t\t<item> DTDConstants </item>\n\t\t\t<item> DTDHandler </item>\n\t\t\t<item> DataBuffer </item>\n\t\t\t<item> DataBufferByte </item>\n\t\t\t<item> DataBufferDouble </item>\n\t\t\t<item> DataBufferFloat </item>\n\t\t\t<item> DataBufferInt </item>\n\t\t\t<item> DataBufferShort </item>\n\t\t\t<item> DataBufferUShort </item>\n\t\t\t<item> DataFlavor </item>\n\t\t\t<item> DataFormatException </item>\n\t\t\t<item> DataInput </item>\n\t\t\t<item> DataInputStream </item>\n\t\t\t<item> DataInputStream </item>\n\t\t\t<item> DataLine </item>\n\t\t\t<item> DataLine.Info </item>\n\t\t\t<item> DataOutput </item>\n\t\t\t<item> DataOutputStream </item>\n\t\t\t<item> DataOutputStream </item>\n\t\t\t<item> DataSource </item>\n\t\t\t<item> DataTruncation </item>\n\t\t\t<item> DatabaseMetaData </item>\n\t\t\t<item> DatagramChannel </item>\n\t\t\t<item> DatagramPacket </item>\n\t\t\t<item> DatagramSocket </item>\n\t\t\t<item> DatagramSocketImpl </item>\n\t\t\t<item> DatagramSocketImplFactory </item>\n\t\t\t<item> DatatypeConfigurationException </item>\n\t\t\t<item> DatatypeConstants </item>\n\t\t\t<item> DatatypeConstants.Field </item>\n\t\t\t<item> DatatypeFactory </item>\n\t\t\t<item> Date </item>\n\t\t\t<item> Date </item>\n\t\t\t<item> DateFormat </item>\n\t\t\t<item> DateFormat.Field </item>\n\t\t\t<item> DateFormatSymbols </item>\n\t\t\t<item> DateFormatter </item>\n\t\t\t<item> DateTimeAtCompleted </item>\n\t\t\t<item> DateTimeAtCreation </item>\n\t\t\t<item> DateTimeAtProcessing </item>\n\t\t\t<item> DateTimeSyntax </item>\n\t\t\t<item> DebugGraphics </item>\n\t\t\t<item> DecimalFormat </item>\n\t\t\t<item> DecimalFormatSymbols </item>\n\t\t\t<item> DeclHandler </item>\n\t\t\t<item> DefaultBoundedRangeModel </item>\n\t\t\t<item> DefaultButtonModel </item>\n\t\t\t<item> DefaultCaret </item>\n\t\t\t<item> DefaultCellEditor </item>\n\t\t\t<item> DefaultColorSelectionModel </item>\n\t\t\t<item> DefaultComboBoxModel </item>\n\t\t\t<item> DefaultDesktopManager </item>\n\t\t\t<item> DefaultEditorKit </item>\n\t\t\t<item> DefaultEditorKit.BeepAction </item>\n\t\t\t<item> DefaultEditorKit.CopyAction </item>\n\t\t\t<item> DefaultEditorKit.CutAction </item>\n\t\t\t<item> DefaultEditorKit.DefaultKeyTypedAction </item>\n\t\t\t<item> DefaultEditorKit.InsertBreakAction </item>\n\t\t\t<item> DefaultEditorKit.InsertContentAction </item>\n\t\t\t<item> DefaultEditorKit.InsertTabAction </item>\n\t\t\t<item> DefaultEditorKit.PasteAction </item>\n\t\t\t<item> DefaultFocusManager </item>\n\t\t\t<item> DefaultFocusTraversalPolicy </item>\n\t\t\t<item> DefaultFormatter </item>\n\t\t\t<item> DefaultFormatterFactory </item>\n\t\t\t<item> DefaultHandler </item>\n\t\t\t<item> DefaultHandler2 </item>\n\t\t\t<item> DefaultHighlighter </item>\n\t\t\t<item> DefaultHighlighter.DefaultHighlightPainter </item>\n\t\t\t<item> DefaultKeyboardFocusManager </item>\n\t\t\t<item> DefaultListCellRenderer </item>\n\t\t\t<item> DefaultListCellRenderer.UIResource </item>\n\t\t\t<item> DefaultListModel </item>\n\t\t\t<item> DefaultListSelectionModel </item>\n\t\t\t<item> DefaultLoaderRepository </item>\n\t\t\t<item> DefaultLoaderRepository </item>\n\t\t\t<item> DefaultMenuLayout </item>\n\t\t\t<item> DefaultMetalTheme </item>\n\t\t\t<item> DefaultMutableTreeNode </item>\n\t\t\t<item> DefaultPersistenceDelegate </item>\n\t\t\t<item> DefaultSingleSelectionModel </item>\n\t\t\t<item> DefaultStyledDocument </item>\n\t\t\t<item> DefaultStyledDocument.AttributeUndoableEdit </item>\n\t\t\t<item> DefaultStyledDocument.ElementSpec </item>\n\t\t\t<item> DefaultTableCellRenderer </item>\n\t\t\t<item> DefaultTableCellRenderer.UIResource </item>\n\t\t\t<item> DefaultTableColumnModel </item>\n\t\t\t<item> DefaultTableModel </item>\n\t\t\t<item> DefaultTextUI </item>\n\t\t\t<item> DefaultTreeCellEditor </item>\n\t\t\t<item> DefaultTreeCellRenderer </item>\n\t\t\t<item> DefaultTreeModel </item>\n\t\t\t<item> DefaultTreeSelectionModel </item>\n\t\t\t<item> DefinitionKind </item>\n\t\t\t<item> DefinitionKindHelper </item>\n\t\t\t<item> Deflater </item>\n\t\t\t<item> DeflaterOutputStream </item>\n\t\t\t<item> DelayQueue </item>\n\t\t\t<item> Delayed </item>\n\t\t\t<item> Delegate </item>\n\t\t\t<item> Delegate </item>\n\t\t\t<item> Delegate </item>\n\t\t\t<item> DelegationPermission </item>\n\t\t\t<item> Deprecated </item>\n\t\t\t<item> Descriptor </item>\n\t\t\t<item> DescriptorAccess </item>\n\t\t\t<item> DescriptorSupport </item>\n\t\t\t<item> DesignMode </item>\n\t\t\t<item> DesktopIconUI </item>\n\t\t\t<item> DesktopManager </item>\n\t\t\t<item> DesktopPaneUI </item>\n\t\t\t<item> Destination </item>\n\t\t\t<item> DestroyFailedException </item>\n\t\t\t<item> Destroyable </item>\n\t\t\t<item> Dialog </item>\n\t\t\t<item> Dictionary </item>\n\t\t\t<item> DigestException </item>\n\t\t\t<item> DigestInputStream </item>\n\t\t\t<item> DigestOutputStream </item>\n\t\t\t<item> Dimension </item>\n\t\t\t<item> Dimension2D </item>\n\t\t\t<item> DimensionUIResource </item>\n\t\t\t<item> DirContext </item>\n\t\t\t<item> DirObjectFactory </item>\n\t\t\t<item> DirStateFactory </item>\n\t\t\t<item> DirStateFactory.Result </item>\n\t\t\t<item> DirectColorModel </item>\n\t\t\t<item> DirectoryManager </item>\n\t\t\t<item> DisplayMode </item>\n\t\t\t<item> DnDConstants </item>\n\t\t\t<item> Doc </item>\n\t\t\t<item> DocAttribute </item>\n\t\t\t<item> DocAttributeSet </item>\n\t\t\t<item> DocFlavor </item>\n\t\t\t<item> DocFlavor.BYTE_ARRAY </item>\n\t\t\t<item> DocFlavor.CHAR_ARRAY </item>\n\t\t\t<item> DocFlavor.INPUT_STREAM </item>\n\t\t\t<item> DocFlavor.READER </item>\n\t\t\t<item> DocFlavor.SERVICE_FORMATTED </item>\n\t\t\t<item> DocFlavor.STRING </item>\n\t\t\t<item> DocFlavor.URL </item>\n\t\t\t<item> DocPrintJob </item>\n\t\t\t<item> Document </item>\n\t\t\t<item> Document </item>\n\t\t\t<item> DocumentBuilder </item>\n\t\t\t<item> DocumentBuilderFactory </item>\n\t\t\t<item> DocumentEvent </item>\n\t\t\t<item> DocumentEvent.ElementChange </item>\n\t\t\t<item> DocumentEvent.EventType </item>\n\t\t\t<item> DocumentFilter </item>\n\t\t\t<item> DocumentFilter.FilterBypass </item>\n\t\t\t<item> DocumentFragment </item>\n\t\t\t<item> DocumentHandler </item>\n\t\t\t<item> DocumentListener </item>\n\t\t\t<item> DocumentName </item>\n\t\t\t<item> DocumentParser </item>\n\t\t\t<item> DocumentType </item>\n\t\t\t<item> Documented </item>\n\t\t\t<item> DomainCombiner </item>\n\t\t\t<item> DomainManager </item>\n\t\t\t<item> DomainManagerOperations </item>\n\t\t\t<item> Double </item>\n\t\t\t<item> DoubleBuffer </item>\n\t\t\t<item> DoubleHolder </item>\n\t\t\t<item> DoubleSeqHelper </item>\n\t\t\t<item> DoubleSeqHolder </item>\n\t\t\t<item> DragGestureEvent </item>\n\t\t\t<item> DragGestureListener </item>\n\t\t\t<item> DragGestureRecognizer </item>\n\t\t\t<item> DragSource </item>\n\t\t\t<item> DragSourceAdapter </item>\n\t\t\t<item> DragSourceContext </item>\n\t\t\t<item> DragSourceDragEvent </item>\n\t\t\t<item> DragSourceDropEvent </item>\n\t\t\t<item> DragSourceEvent </item>\n\t\t\t<item> DragSourceListener </item>\n\t\t\t<item> DragSourceMotionListener </item>\n\t\t\t<item> Driver </item>\n\t\t\t<item> DriverManager </item>\n\t\t\t<item> DriverPropertyInfo </item>\n\t\t\t<item> DropTarget </item>\n\t\t\t<item> DropTarget.DropTargetAutoScroller </item>\n\t\t\t<item> DropTargetAdapter </item>\n\t\t\t<item> DropTargetContext </item>\n\t\t\t<item> DropTargetDragEvent </item>\n\t\t\t<item> DropTargetDropEvent </item>\n\t\t\t<item> DropTargetEvent </item>\n\t\t\t<item> DropTargetListener </item>\n\t\t\t<item> DuplicateFormatFlagsException </item>\n\t\t\t<item> DuplicateName </item>\n\t\t\t<item> DuplicateNameHelper </item>\n\t\t\t<item> Duration </item>\n\t\t\t<item> DynAny </item>\n\t\t\t<item> DynAny </item>\n\t\t\t<item> DynAnyFactory </item>\n\t\t\t<item> DynAnyFactoryHelper </item>\n\t\t\t<item> DynAnyFactoryOperations </item>\n\t\t\t<item> DynAnyHelper </item>\n\t\t\t<item> DynAnyOperations </item>\n\t\t\t<item> DynAnySeqHelper </item>\n\t\t\t<item> DynArray </item>\n\t\t\t<item> DynArray </item>\n\t\t\t<item> DynArrayHelper </item>\n\t\t\t<item> DynArrayOperations </item>\n\t\t\t<item> DynEnum </item>\n\t\t\t<item> DynEnum </item>\n\t\t\t<item> DynEnumHelper </item>\n\t\t\t<item> DynEnumOperations </item>\n\t\t\t<item> DynFixed </item>\n\t\t\t<item> DynFixed </item>\n\t\t\t<item> DynFixedHelper </item>\n\t\t\t<item> DynFixedOperations </item>\n\t\t\t<item> DynSequence </item>\n\t\t\t<item> DynSequence </item>\n\t\t\t<item> DynSequenceHelper </item>\n\t\t\t<item> DynSequenceOperations </item>\n\t\t\t<item> DynStruct </item>\n\t\t\t<item> DynStruct </item>\n\t\t\t<item> DynStructHelper </item>\n\t\t\t<item> DynStructOperations </item>\n\t\t\t<item> DynUnion </item>\n\t\t\t<item> DynUnion </item>\n\t\t\t<item> DynUnionHelper </item>\n\t\t\t<item> DynUnionOperations </item>\n\t\t\t<item> DynValue </item>\n\t\t\t<item> DynValue </item>\n\t\t\t<item> DynValueBox </item>\n\t\t\t<item> DynValueBoxOperations </item>\n\t\t\t<item> DynValueCommon </item>\n\t\t\t<item> DynValueCommonOperations </item>\n\t\t\t<item> DynValueHelper </item>\n\t\t\t<item> DynValueOperations </item>\n\t\t\t<item> DynamicImplementation </item>\n\t\t\t<item> DynamicImplementation </item>\n\t\t\t<item> DynamicMBean </item>\n\t\t\t<item> ECField </item>\n\t\t\t<item> ECFieldF2m </item>\n\t\t\t<item> ECFieldFp </item>\n\t\t\t<item> ECGenParameterSpec </item>\n\t\t\t<item> ECKey </item>\n\t\t\t<item> ECParameterSpec </item>\n\t\t\t<item> ECPoint </item>\n\t\t\t<item> ECPrivateKey </item>\n\t\t\t<item> ECPrivateKeySpec </item>\n\t\t\t<item> ECPublicKey </item>\n\t\t\t<item> ECPublicKeySpec </item>\n\t\t\t<item> ENCODING_CDR_ENCAPS </item>\n\t\t\t<item> EOFException </item>\n\t\t\t<item> EditorKit </item>\n\t\t\t<item> Element </item>\n\t\t\t<item> Element </item>\n\t\t\t<item> Element </item>\n\t\t\t<item> ElementIterator </item>\n\t\t\t<item> ElementType </item>\n\t\t\t<item> Ellipse2D </item>\n\t\t\t<item> Ellipse2D.Double </item>\n\t\t\t<item> Ellipse2D.Float </item>\n\t\t\t<item> EllipticCurve </item>\n\t\t\t<item> EmptyBorder </item>\n\t\t\t<item> EmptyStackException </item>\n\t\t\t<item> EncodedKeySpec </item>\n\t\t\t<item> Encoder </item>\n\t\t\t<item> Encoding </item>\n\t\t\t<item> EncryptedPrivateKeyInfo </item>\n\t\t\t<item> Entity </item>\n\t\t\t<item> Entity </item>\n\t\t\t<item> EntityReference </item>\n\t\t\t<item> EntityResolver </item>\n\t\t\t<item> EntityResolver2 </item>\n\t\t\t<item> Enum </item>\n\t\t\t<item> EnumConstantNotPresentException </item>\n\t\t\t<item> EnumControl </item>\n\t\t\t<item> EnumControl.Type </item>\n\t\t\t<item> EnumMap </item>\n\t\t\t<item> EnumSet </item>\n\t\t\t<item> EnumSyntax </item>\n\t\t\t<item> Enumeration </item>\n\t\t\t<item> Environment </item>\n\t\t\t<item> Error </item>\n\t\t\t<item> ErrorHandler </item>\n\t\t\t<item> ErrorListener </item>\n\t\t\t<item> ErrorManager </item>\n\t\t\t<item> EtchedBorder </item>\n\t\t\t<item> Event </item>\n\t\t\t<item> EventContext </item>\n\t\t\t<item> EventDirContext </item>\n\t\t\t<item> EventHandler </item>\n\t\t\t<item> EventListener </item>\n\t\t\t<item> EventListenerList </item>\n\t\t\t<item> EventListenerProxy </item>\n\t\t\t<item> EventObject </item>\n\t\t\t<item> EventQueue </item>\n\t\t\t<item> EventSetDescriptor </item>\n\t\t\t<item> Exception </item>\n\t\t\t<item> ExceptionDetailMessage </item>\n\t\t\t<item> ExceptionInInitializerError </item>\n\t\t\t<item> ExceptionList </item>\n\t\t\t<item> ExceptionListener </item>\n\t\t\t<item> Exchanger </item>\n\t\t\t<item> ExecutionException </item>\n\t\t\t<item> Executor </item>\n\t\t\t<item> ExecutorCompletionService </item>\n\t\t\t<item> ExecutorService </item>\n\t\t\t<item> Executors </item>\n\t\t\t<item> ExemptionMechanism </item>\n\t\t\t<item> ExemptionMechanismException </item>\n\t\t\t<item> ExemptionMechanismSpi </item>\n\t\t\t<item> ExpandVetoException </item>\n\t\t\t<item> ExportException </item>\n\t\t\t<item> Expression </item>\n\t\t\t<item> ExtendedRequest </item>\n\t\t\t<item> ExtendedResponse </item>\n\t\t\t<item> Externalizable </item>\n\t\t\t<item> FREE_MEM </item>\n\t\t\t<item> FactoryConfigurationError </item>\n\t\t\t<item> FailedLoginException </item>\n\t\t\t<item> FeatureDescriptor </item>\n\t\t\t<item> Fidelity </item>\n\t\t\t<item> Field </item>\n\t\t\t<item> FieldNameHelper </item>\n\t\t\t<item> FieldNameHelper </item>\n\t\t\t<item> FieldPosition </item>\n\t\t\t<item> FieldView </item>\n\t\t\t<item> File </item>\n\t\t\t<item> FileCacheImageInputStream </item>\n\t\t\t<item> FileCacheImageOutputStream </item>\n\t\t\t<item> FileChannel </item>\n\t\t\t<item> FileChannel.MapMode </item>\n\t\t\t<item> FileChooserUI </item>\n\t\t\t<item> FileDescriptor </item>\n\t\t\t<item> FileDialog </item>\n\t\t\t<item> FileFilter </item>\n\t\t\t<item> FileFilter </item>\n\t\t\t<item> FileHandler </item>\n\t\t\t<item> FileImageInputStream </item>\n\t\t\t<item> FileImageOutputStream </item>\n\t\t\t<item> FileInputStream </item>\n\t\t\t<item> FileLock </item>\n\t\t\t<item> FileLockInterruptionException </item>\n\t\t\t<item> FileNameMap </item>\n\t\t\t<item> FileNotFoundException </item>\n\t\t\t<item> FileOutputStream </item>\n\t\t\t<item> FilePermission </item>\n\t\t\t<item> FileReader </item>\n\t\t\t<item> FileSystemView </item>\n\t\t\t<item> FileView </item>\n\t\t\t<item> FileWriter </item>\n\t\t\t<item> FilenameFilter </item>\n\t\t\t<item> Filter </item>\n\t\t\t<item> FilterInputStream </item>\n\t\t\t<item> FilterOutputStream </item>\n\t\t\t<item> FilterReader </item>\n\t\t\t<item> FilterWriter </item>\n\t\t\t<item> FilteredImageSource </item>\n\t\t\t<item> FilteredRowSet </item>\n\t\t\t<item> Finishings </item>\n\t\t\t<item> FixedHeightLayoutCache </item>\n\t\t\t<item> FixedHolder </item>\n\t\t\t<item> FlatteningPathIterator </item>\n\t\t\t<item> FlavorEvent </item>\n\t\t\t<item> FlavorException </item>\n\t\t\t<item> FlavorListener </item>\n\t\t\t<item> FlavorMap </item>\n\t\t\t<item> FlavorTable </item>\n\t\t\t<item> Float </item>\n\t\t\t<item> FloatBuffer </item>\n\t\t\t<item> FloatControl </item>\n\t\t\t<item> FloatControl.Type </item>\n\t\t\t<item> FloatHolder </item>\n\t\t\t<item> FloatSeqHelper </item>\n\t\t\t<item> FloatSeqHolder </item>\n\t\t\t<item> FlowLayout </item>\n\t\t\t<item> FlowView </item>\n\t\t\t<item> FlowView.FlowStrategy </item>\n\t\t\t<item> Flushable </item>\n\t\t\t<item> FocusAdapter </item>\n\t\t\t<item> FocusEvent </item>\n\t\t\t<item> FocusListener </item>\n\t\t\t<item> FocusManager </item>\n\t\t\t<item> FocusTraversalPolicy </item>\n\t\t\t<item> Font </item>\n\t\t\t<item> FontFormatException </item>\n\t\t\t<item> FontMetrics </item>\n\t\t\t<item> FontRenderContext </item>\n\t\t\t<item> FontUIResource </item>\n\t\t\t<item> FormSubmitEvent </item>\n\t\t\t<item> FormSubmitEvent.MethodType </item>\n\t\t\t<item> FormView </item>\n\t\t\t<item> Format </item>\n\t\t\t<item> Format.Field </item>\n\t\t\t<item> FormatConversionProvider </item>\n\t\t\t<item> FormatFlagsConversionMismatchException </item>\n\t\t\t<item> FormatMismatch </item>\n\t\t\t<item> FormatMismatchHelper </item>\n\t\t\t<item> Formattable </item>\n\t\t\t<item> FormattableFlags </item>\n\t\t\t<item> Formatter </item>\n\t\t\t<item> Formatter </item>\n\t\t\t<item> FormatterClosedException </item>\n\t\t\t<item> ForwardRequest </item>\n\t\t\t<item> ForwardRequest </item>\n\t\t\t<item> ForwardRequestHelper </item>\n\t\t\t<item> ForwardRequestHelper </item>\n\t\t\t<item> Frame </item>\n\t\t\t<item> Future </item>\n\t\t\t<item> FutureTask </item>\n\t\t\t<item> GSSContext </item>\n\t\t\t<item> GSSCredential </item>\n\t\t\t<item> GSSException </item>\n\t\t\t<item> GSSManager </item>\n\t\t\t<item> GSSName </item>\n\t\t\t<item> GZIPInputStream </item>\n\t\t\t<item> GZIPOutputStream </item>\n\t\t\t<item> GapContent </item>\n\t\t\t<item> GarbageCollectorMXBean </item>\n\t\t\t<item> GatheringByteChannel </item>\n\t\t\t<item> GaugeMonitor </item>\n\t\t\t<item> GaugeMonitorMBean </item>\n\t\t\t<item> GeneralPath </item>\n\t\t\t<item> GeneralSecurityException </item>\n\t\t\t<item> GenericArrayType </item>\n\t\t\t<item> GenericDeclaration </item>\n\t\t\t<item> GenericSignatureFormatError </item>\n\t\t\t<item> GlyphJustificationInfo </item>\n\t\t\t<item> GlyphMetrics </item>\n\t\t\t<item> GlyphVector </item>\n\t\t\t<item> GlyphView </item>\n\t\t\t<item> GlyphView.GlyphPainter </item>\n\t\t\t<item> GradientPaint </item>\n\t\t\t<item> GraphicAttribute </item>\n\t\t\t<item> Graphics </item>\n\t\t\t<item> Graphics2D </item>\n\t\t\t<item> GraphicsConfigTemplate </item>\n\t\t\t<item> GraphicsConfiguration </item>\n\t\t\t<item> GraphicsDevice </item>\n\t\t\t<item> GraphicsEnvironment </item>\n\t\t\t<item> GrayFilter </item>\n\t\t\t<item> GregorianCalendar </item>\n\t\t\t<item> GridBagConstraints </item>\n\t\t\t<item> GridBagLayout </item>\n\t\t\t<item> GridLayout </item>\n\t\t\t<item> Group </item>\n\t\t\t<item> Guard </item>\n\t\t\t<item> GuardedObject </item>\n\t\t\t<item> HOLDING </item>\n\t\t\t<item> HTML </item>\n\t\t\t<item> HTML.Attribute </item>\n\t\t\t<item> HTML.Tag </item>\n\t\t\t<item> HTML.UnknownTag </item>\n\t\t\t<item> HTMLDocument </item>\n\t\t\t<item> HTMLDocument.Iterator </item>\n\t\t\t<item> HTMLEditorKit </item>\n\t\t\t<item> HTMLEditorKit.HTMLFactory </item>\n\t\t\t<item> HTMLEditorKit.HTMLTextAction </item>\n\t\t\t<item> HTMLEditorKit.InsertHTMLTextAction </item>\n\t\t\t<item> HTMLEditorKit.LinkController </item>\n\t\t\t<item> HTMLEditorKit.Parser </item>\n\t\t\t<item> HTMLEditorKit.ParserCallback </item>\n\t\t\t<item> HTMLFrameHyperlinkEvent </item>\n\t\t\t<item> HTMLWriter </item>\n\t\t\t<item> Handler </item>\n\t\t\t<item> HandlerBase </item>\n\t\t\t<item> HandshakeCompletedEvent </item>\n\t\t\t<item> HandshakeCompletedListener </item>\n\t\t\t<item> HasControls </item>\n\t\t\t<item> HashAttributeSet </item>\n\t\t\t<item> HashDocAttributeSet </item>\n\t\t\t<item> HashMap </item>\n\t\t\t<item> HashPrintJobAttributeSet </item>\n\t\t\t<item> HashPrintRequestAttributeSet </item>\n\t\t\t<item> HashPrintServiceAttributeSet </item>\n\t\t\t<item> HashSet </item>\n\t\t\t<item> Hashtable </item>\n\t\t\t<item> HeadlessException </item>\n\t\t\t<item> HierarchyBoundsAdapter </item>\n\t\t\t<item> HierarchyBoundsListener </item>\n\t\t\t<item> HierarchyEvent </item>\n\t\t\t<item> HierarchyListener </item>\n\t\t\t<item> Highlighter </item>\n\t\t\t<item> Highlighter.Highlight </item>\n\t\t\t<item> Highlighter.HighlightPainter </item>\n\t\t\t<item> HostnameVerifier </item>\n\t\t\t<item> HttpRetryException </item>\n\t\t\t<item> HttpURLConnection </item>\n\t\t\t<item> HttpsURLConnection </item>\n\t\t\t<item> HyperlinkEvent </item>\n\t\t\t<item> HyperlinkEvent.EventType </item>\n\t\t\t<item> HyperlinkListener </item>\n\t\t\t<item> ICC_ColorSpace </item>\n\t\t\t<item> ICC_Profile </item>\n\t\t\t<item> ICC_ProfileGray </item>\n\t\t\t<item> ICC_ProfileRGB </item>\n\t\t\t<item> IDLEntity </item>\n\t\t\t<item> IDLType </item>\n\t\t\t<item> IDLTypeHelper </item>\n\t\t\t<item> IDLTypeOperations </item>\n\t\t\t<item> ID_ASSIGNMENT_POLICY_ID </item>\n\t\t\t<item> ID_UNIQUENESS_POLICY_ID </item>\n\t\t\t<item> IIOByteBuffer </item>\n\t\t\t<item> IIOException </item>\n\t\t\t<item> IIOImage </item>\n\t\t\t<item> IIOInvalidTreeException </item>\n\t\t\t<item> IIOMetadata </item>\n\t\t\t<item> IIOMetadataController </item>\n\t\t\t<item> IIOMetadataFormat </item>\n\t\t\t<item> IIOMetadataFormatImpl </item>\n\t\t\t<item> IIOMetadataNode </item>\n\t\t\t<item> IIOParam </item>\n\t\t\t<item> IIOParamController </item>\n\t\t\t<item> IIOReadProgressListener </item>\n\t\t\t<item> IIOReadUpdateListener </item>\n\t\t\t<item> IIOReadWarningListener </item>\n\t\t\t<item> IIORegistry </item>\n\t\t\t<item> IIOServiceProvider </item>\n\t\t\t<item> IIOWriteProgressListener </item>\n\t\t\t<item> IIOWriteWarningListener </item>\n\t\t\t<item> IMPLICIT_ACTIVATION_POLICY_ID </item>\n\t\t\t<item> IMP_LIMIT </item>\n\t\t\t<item> INACTIVE </item>\n\t\t\t<item> INITIALIZE </item>\n\t\t\t<item> INTERNAL </item>\n\t\t\t<item> INTF_REPOS </item>\n\t\t\t<item> INVALID_ACTIVITY </item>\n\t\t\t<item> INVALID_TRANSACTION </item>\n\t\t\t<item> INV_FLAG </item>\n\t\t\t<item> INV_IDENT </item>\n\t\t\t<item> INV_OBJREF </item>\n\t\t\t<item> INV_POLICY </item>\n\t\t\t<item> IOException </item>\n\t\t\t<item> IOR </item>\n\t\t\t<item> IORHelper </item>\n\t\t\t<item> IORHolder </item>\n\t\t\t<item> IORInfo </item>\n\t\t\t<item> IORInfoOperations </item>\n\t\t\t<item> IORInterceptor </item>\n\t\t\t<item> IORInterceptorOperations </item>\n\t\t\t<item> IORInterceptor_3_0 </item>\n\t\t\t<item> IORInterceptor_3_0Helper </item>\n\t\t\t<item> IORInterceptor_3_0Holder </item>\n\t\t\t<item> IORInterceptor_3_0Operations </item>\n\t\t\t<item> IRObject </item>\n\t\t\t<item> IRObjectOperations </item>\n\t\t\t<item> Icon </item>\n\t\t\t<item> IconUIResource </item>\n\t\t\t<item> IconView </item>\n\t\t\t<item> IdAssignmentPolicy </item>\n\t\t\t<item> IdAssignmentPolicyOperations </item>\n\t\t\t<item> IdAssignmentPolicyValue </item>\n\t\t\t<item> IdUniquenessPolicy </item>\n\t\t\t<item> IdUniquenessPolicyOperations </item>\n\t\t\t<item> IdUniquenessPolicyValue </item>\n\t\t\t<item> IdentifierHelper </item>\n\t\t\t<item> Identity </item>\n\t\t\t<item> IdentityHashMap </item>\n\t\t\t<item> IdentityScope </item>\n\t\t\t<item> IllegalAccessError </item>\n\t\t\t<item> IllegalAccessException </item>\n\t\t\t<item> IllegalArgumentException </item>\n\t\t\t<item> IllegalBlockSizeException </item>\n\t\t\t<item> IllegalBlockingModeException </item>\n\t\t\t<item> IllegalCharsetNameException </item>\n\t\t\t<item> IllegalClassFormatException </item>\n\t\t\t<item> IllegalComponentStateException </item>\n\t\t\t<item> IllegalFormatCodePointException </item>\n\t\t\t<item> IllegalFormatConversionException </item>\n\t\t\t<item> IllegalFormatException </item>\n\t\t\t<item> IllegalFormatFlagsException </item>\n\t\t\t<item> IllegalFormatPrecisionException </item>\n\t\t\t<item> IllegalFormatWidthException </item>\n\t\t\t<item> IllegalMonitorStateException </item>\n\t\t\t<item> IllegalPathStateException </item>\n\t\t\t<item> IllegalSelectorException </item>\n\t\t\t<item> IllegalStateException </item>\n\t\t\t<item> IllegalThreadStateException </item>\n\t\t\t<item> Image </item>\n\t\t\t<item> ImageCapabilities </item>\n\t\t\t<item> ImageConsumer </item>\n\t\t\t<item> ImageFilter </item>\n\t\t\t<item> ImageGraphicAttribute </item>\n\t\t\t<item> ImageIO </item>\n\t\t\t<item> ImageIcon </item>\n\t\t\t<item> ImageInputStream </item>\n\t\t\t<item> ImageInputStreamImpl </item>\n\t\t\t<item> ImageInputStreamSpi </item>\n\t\t\t<item> ImageObserver </item>\n\t\t\t<item> ImageOutputStream </item>\n\t\t\t<item> ImageOutputStreamImpl </item>\n\t\t\t<item> ImageOutputStreamSpi </item>\n\t\t\t<item> ImageProducer </item>\n\t\t\t<item> ImageReadParam </item>\n\t\t\t<item> ImageReader </item>\n\t\t\t<item> ImageReaderSpi </item>\n\t\t\t<item> ImageReaderWriterSpi </item>\n\t\t\t<item> ImageTranscoder </item>\n\t\t\t<item> ImageTranscoderSpi </item>\n\t\t\t<item> ImageTypeSpecifier </item>\n\t\t\t<item> ImageView </item>\n\t\t\t<item> ImageWriteParam </item>\n\t\t\t<item> ImageWriter </item>\n\t\t\t<item> ImageWriterSpi </item>\n\t\t\t<item> ImagingOpException </item>\n\t\t\t<item> ImplicitActivationPolicy </item>\n\t\t\t<item> ImplicitActivationPolicyOperations </item>\n\t\t\t<item> ImplicitActivationPolicyValue </item>\n\t\t\t<item> IncompatibleClassChangeError </item>\n\t\t\t<item> IncompleteAnnotationException </item>\n\t\t\t<item> InconsistentTypeCode </item>\n\t\t\t<item> InconsistentTypeCode </item>\n\t\t\t<item> InconsistentTypeCodeHelper </item>\n\t\t\t<item> IndexColorModel </item>\n\t\t\t<item> IndexOutOfBoundsException </item>\n\t\t\t<item> IndexedPropertyChangeEvent </item>\n\t\t\t<item> IndexedPropertyDescriptor </item>\n\t\t\t<item> IndirectionException </item>\n\t\t\t<item> Inet4Address </item>\n\t\t\t<item> Inet6Address </item>\n\t\t\t<item> InetAddress </item>\n\t\t\t<item> InetSocketAddress </item>\n\t\t\t<item> Inflater </item>\n\t\t\t<item> InflaterInputStream </item>\n\t\t\t<item> InheritableThreadLocal </item>\n\t\t\t<item> Inherited </item>\n\t\t\t<item> InitialContext </item>\n\t\t\t<item> InitialContextFactory </item>\n\t\t\t<item> InitialContextFactoryBuilder </item>\n\t\t\t<item> InitialDirContext </item>\n\t\t\t<item> InitialLdapContext </item>\n\t\t\t<item> InlineView </item>\n\t\t\t<item> InputContext </item>\n\t\t\t<item> InputEvent </item>\n\t\t\t<item> InputMap </item>\n\t\t\t<item> InputMapUIResource </item>\n\t\t\t<item> InputMethod </item>\n\t\t\t<item> InputMethodContext </item>\n\t\t\t<item> InputMethodDescriptor </item>\n\t\t\t<item> InputMethodEvent </item>\n\t\t\t<item> InputMethodHighlight </item>\n\t\t\t<item> InputMethodListener </item>\n\t\t\t<item> InputMethodRequests </item>\n\t\t\t<item> InputMismatchException </item>\n\t\t\t<item> InputSource </item>\n\t\t\t<item> InputStream </item>\n\t\t\t<item> InputStream </item>\n\t\t\t<item> InputStream </item>\n\t\t\t<item> InputStreamReader </item>\n\t\t\t<item> InputSubset </item>\n\t\t\t<item> InputVerifier </item>\n\t\t\t<item> Insets </item>\n\t\t\t<item> InsetsUIResource </item>\n\t\t\t<item> InstanceAlreadyExistsException </item>\n\t\t\t<item> InstanceNotFoundException </item>\n\t\t\t<item> InstantiationError </item>\n\t\t\t<item> InstantiationException </item>\n\t\t\t<item> Instrument </item>\n\t\t\t<item> Instrumentation </item>\n\t\t\t<item> InsufficientResourcesException </item>\n\t\t\t<item> IntBuffer </item>\n\t\t\t<item> IntHolder </item>\n\t\t\t<item> Integer </item>\n\t\t\t<item> IntegerSyntax </item>\n\t\t\t<item> Interceptor </item>\n\t\t\t<item> InterceptorOperations </item>\n\t\t\t<item> InternalError </item>\n\t\t\t<item> InternalFrameAdapter </item>\n\t\t\t<item> InternalFrameEvent </item>\n\t\t\t<item> InternalFrameFocusTraversalPolicy </item>\n\t\t\t<item> InternalFrameListener </item>\n\t\t\t<item> InternalFrameUI </item>\n\t\t\t<item> InternationalFormatter </item>\n\t\t\t<item> InterruptedException </item>\n\t\t\t<item> InterruptedIOException </item>\n\t\t\t<item> InterruptedNamingException </item>\n\t\t\t<item> InterruptibleChannel </item>\n\t\t\t<item> IntrospectionException </item>\n\t\t\t<item> IntrospectionException </item>\n\t\t\t<item> Introspector </item>\n\t\t\t<item> Invalid </item>\n\t\t\t<item> InvalidActivityException </item>\n\t\t\t<item> InvalidAddress </item>\n\t\t\t<item> InvalidAddressHelper </item>\n\t\t\t<item> InvalidAddressHolder </item>\n\t\t\t<item> InvalidAlgorithmParameterException </item>\n\t\t\t<item> InvalidApplicationException </item>\n\t\t\t<item> InvalidAttributeIdentifierException </item>\n\t\t\t<item> InvalidAttributeValueException </item>\n\t\t\t<item> InvalidAttributeValueException </item>\n\t\t\t<item> InvalidAttributesException </item>\n\t\t\t<item> InvalidClassException </item>\n\t\t\t<item> InvalidDnDOperationException </item>\n\t\t\t<item> InvalidKeyException </item>\n\t\t\t<item> InvalidKeyException </item>\n\t\t\t<item> InvalidKeySpecException </item>\n\t\t\t<item> InvalidMarkException </item>\n\t\t\t<item> InvalidMidiDataException </item>\n\t\t\t<item> InvalidName </item>\n\t\t\t<item> InvalidName </item>\n\t\t\t<item> InvalidName </item>\n\t\t\t<item> InvalidNameException </item>\n\t\t\t<item> InvalidNameHelper </item>\n\t\t\t<item> InvalidNameHelper </item>\n\t\t\t<item> InvalidNameHolder </item>\n\t\t\t<item> InvalidObjectException </item>\n\t\t\t<item> InvalidOpenTypeException </item>\n\t\t\t<item> InvalidParameterException </item>\n\t\t\t<item> InvalidParameterSpecException </item>\n\t\t\t<item> InvalidPolicy </item>\n\t\t\t<item> InvalidPolicyHelper </item>\n\t\t\t<item> InvalidPreferencesFormatException </item>\n\t\t\t<item> InvalidPropertiesFormatException </item>\n\t\t\t<item> InvalidRelationIdException </item>\n\t\t\t<item> InvalidRelationServiceException </item>\n\t\t\t<item> InvalidRelationTypeException </item>\n\t\t\t<item> InvalidRoleInfoException </item>\n\t\t\t<item> InvalidRoleValueException </item>\n\t\t\t<item> InvalidSearchControlsException </item>\n\t\t\t<item> InvalidSearchFilterException </item>\n\t\t\t<item> InvalidSeq </item>\n\t\t\t<item> InvalidSlot </item>\n\t\t\t<item> InvalidSlotHelper </item>\n\t\t\t<item> InvalidTargetObjectTypeException </item>\n\t\t\t<item> InvalidTransactionException </item>\n\t\t\t<item> InvalidTypeForEncoding </item>\n\t\t\t<item> InvalidTypeForEncodingHelper </item>\n\t\t\t<item> InvalidValue </item>\n\t\t\t<item> InvalidValue </item>\n\t\t\t<item> InvalidValueHelper </item>\n\t\t\t<item> InvocationEvent </item>\n\t\t\t<item> InvocationHandler </item>\n\t\t\t<item> InvocationTargetException </item>\n\t\t\t<item> InvokeHandler </item>\n\t\t\t<item> IstringHelper </item>\n\t\t\t<item> ItemEvent </item>\n\t\t\t<item> ItemListener </item>\n\t\t\t<item> ItemSelectable </item>\n\t\t\t<item> Iterable </item>\n\t\t\t<item> Iterator </item>\n\t\t\t<item> IvParameterSpec </item>\n\t\t\t<item> JApplet </item>\n\t\t\t<item> JButton </item>\n\t\t\t<item> JCheckBox </item>\n\t\t\t<item> JCheckBoxMenuItem </item>\n\t\t\t<item> JColorChooser </item>\n\t\t\t<item> JComboBox </item>\n\t\t\t<item> JComboBox.KeySelectionManager </item>\n\t\t\t<item> JComponent </item>\n\t\t\t<item> JDesktopPane </item>\n\t\t\t<item> JDialog </item>\n\t\t\t<item> JEditorPane </item>\n\t\t\t<item> JFileChooser </item>\n\t\t\t<item> JFormattedTextField </item>\n\t\t\t<item> JFormattedTextField.AbstractFormatter </item>\n\t\t\t<item> JFormattedTextField.AbstractFormatterFactory </item>\n\t\t\t<item> JFrame </item>\n\t\t\t<item> JInternalFrame </item>\n\t\t\t<item> JInternalFrame.JDesktopIcon </item>\n\t\t\t<item> JLabel </item>\n\t\t\t<item> JLayeredPane </item>\n\t\t\t<item> JList </item>\n\t\t\t<item> JMException </item>\n\t\t\t<item> JMRuntimeException </item>\n\t\t\t<item> JMXAuthenticator </item>\n\t\t\t<item> JMXConnectionNotification </item>\n\t\t\t<item> JMXConnector </item>\n\t\t\t<item> JMXConnectorFactory </item>\n\t\t\t<item> JMXConnectorProvider </item>\n\t\t\t<item> JMXConnectorServer </item>\n\t\t\t<item> JMXConnectorServerFactory </item>\n\t\t\t<item> JMXConnectorServerMBean </item>\n\t\t\t<item> JMXConnectorServerProvider </item>\n\t\t\t<item> JMXPrincipal </item>\n\t\t\t<item> JMXProviderException </item>\n\t\t\t<item> JMXServerErrorException </item>\n\t\t\t<item> JMXServiceURL </item>\n\t\t\t<item> JMenu </item>\n\t\t\t<item> JMenuBar </item>\n\t\t\t<item> JMenuItem </item>\n\t\t\t<item> JOptionPane </item>\n\t\t\t<item> JPEGHuffmanTable </item>\n\t\t\t<item> JPEGImageReadParam </item>\n\t\t\t<item> JPEGImageWriteParam </item>\n\t\t\t<item> JPEGQTable </item>\n\t\t\t<item> JPanel </item>\n\t\t\t<item> JPasswordField </item>\n\t\t\t<item> JPopupMenu </item>\n\t\t\t<item> JPopupMenu.Separator </item>\n\t\t\t<item> JProgressBar </item>\n\t\t\t<item> JRadioButton </item>\n\t\t\t<item> JRadioButtonMenuItem </item>\n\t\t\t<item> JRootPane </item>\n\t\t\t<item> JScrollBar </item>\n\t\t\t<item> JScrollPane </item>\n\t\t\t<item> JSeparator </item>\n\t\t\t<item> JSlider </item>\n\t\t\t<item> JSpinner </item>\n\t\t\t<item> JSpinner.DateEditor </item>\n\t\t\t<item> JSpinner.DefaultEditor </item>\n\t\t\t<item> JSpinner.ListEditor </item>\n\t\t\t<item> JSpinner.NumberEditor </item>\n\t\t\t<item> JSplitPane </item>\n\t\t\t<item> JTabbedPane </item>\n\t\t\t<item> JTable </item>\n\t\t\t<item> JTable.PrintMode </item>\n\t\t\t<item> JTableHeader </item>\n\t\t\t<item> JTextArea </item>\n\t\t\t<item> JTextComponent </item>\n\t\t\t<item> JTextComponent.KeyBinding </item>\n\t\t\t<item> JTextField </item>\n\t\t\t<item> JTextPane </item>\n\t\t\t<item> JToggleButton </item>\n\t\t\t<item> JToggleButton.ToggleButtonModel </item>\n\t\t\t<item> JToolBar </item>\n\t\t\t<item> JToolBar.Separator </item>\n\t\t\t<item> JToolTip </item>\n\t\t\t<item> JTree </item>\n\t\t\t<item> JTree.DynamicUtilTreeNode </item>\n\t\t\t<item> JTree.EmptySelectionModel </item>\n\t\t\t<item> JViewport </item>\n\t\t\t<item> JWindow </item>\n\t\t\t<item> JarEntry </item>\n\t\t\t<item> JarException </item>\n\t\t\t<item> JarFile </item>\n\t\t\t<item> JarInputStream </item>\n\t\t\t<item> JarOutputStream </item>\n\t\t\t<item> JarURLConnection </item>\n\t\t\t<item> JdbcRowSet </item>\n\t\t\t<item> JobAttributes </item>\n\t\t\t<item> JobAttributes.DefaultSelectionType </item>\n\t\t\t<item> JobAttributes.DestinationType </item>\n\t\t\t<item> JobAttributes.DialogType </item>\n\t\t\t<item> JobAttributes.MultipleDocumentHandlingType </item>\n\t\t\t<item> JobAttributes.SidesType </item>\n\t\t\t<item> JobHoldUntil </item>\n\t\t\t<item> JobImpressions </item>\n\t\t\t<item> JobImpressionsCompleted </item>\n\t\t\t<item> JobImpressionsSupported </item>\n\t\t\t<item> JobKOctets </item>\n\t\t\t<item> JobKOctetsProcessed </item>\n\t\t\t<item> JobKOctetsSupported </item>\n\t\t\t<item> JobMediaSheets </item>\n\t\t\t<item> JobMediaSheetsCompleted </item>\n\t\t\t<item> JobMediaSheetsSupported </item>\n\t\t\t<item> JobMessageFromOperator </item>\n\t\t\t<item> JobName </item>\n\t\t\t<item> JobOriginatingUserName </item>\n\t\t\t<item> JobPriority </item>\n\t\t\t<item> JobPrioritySupported </item>\n\t\t\t<item> JobSheets </item>\n\t\t\t<item> JobState </item>\n\t\t\t<item> JobStateReason </item>\n\t\t\t<item> JobStateReasons </item>\n\t\t\t<item> JoinRowSet </item>\n\t\t\t<item> Joinable </item>\n\t\t\t<item> KerberosKey </item>\n\t\t\t<item> KerberosPrincipal </item>\n\t\t\t<item> KerberosTicket </item>\n\t\t\t<item> Kernel </item>\n\t\t\t<item> Key </item>\n\t\t\t<item> KeyAdapter </item>\n\t\t\t<item> KeyAgreement </item>\n\t\t\t<item> KeyAgreementSpi </item>\n\t\t\t<item> KeyAlreadyExistsException </item>\n\t\t\t<item> KeyEvent </item>\n\t\t\t<item> KeyEventDispatcher </item>\n\t\t\t<item> KeyEventPostProcessor </item>\n\t\t\t<item> KeyException </item>\n\t\t\t<item> KeyFactory </item>\n\t\t\t<item> KeyFactorySpi </item>\n\t\t\t<item> KeyGenerator </item>\n\t\t\t<item> KeyGeneratorSpi </item>\n\t\t\t<item> KeyListener </item>\n\t\t\t<item> KeyManagementException </item>\n\t\t\t<item> KeyManager </item>\n\t\t\t<item> KeyManagerFactory </item>\n\t\t\t<item> KeyManagerFactorySpi </item>\n\t\t\t<item> KeyPair </item>\n\t\t\t<item> KeyPairGenerator </item>\n\t\t\t<item> KeyPairGeneratorSpi </item>\n\t\t\t<item> KeyRep </item>\n\t\t\t<item> KeyRep.Type </item>\n\t\t\t<item> KeySpec </item>\n\t\t\t<item> KeyStore </item>\n\t\t\t<item> KeyStore.Builder </item>\n\t\t\t<item> KeyStore.CallbackHandlerProtection </item>\n\t\t\t<item> KeyStore.Entry </item>\n\t\t\t<item> KeyStore.LoadStoreParameter </item>\n\t\t\t<item> KeyStore.PasswordProtection </item>\n\t\t\t<item> KeyStore.PrivateKeyEntry </item>\n\t\t\t<item> KeyStore.ProtectionParameter </item>\n\t\t\t<item> KeyStore.SecretKeyEntry </item>\n\t\t\t<item> KeyStore.TrustedCertificateEntry </item>\n\t\t\t<item> KeyStoreBuilderParameters </item>\n\t\t\t<item> KeyStoreException </item>\n\t\t\t<item> KeyStoreSpi </item>\n\t\t\t<item> KeyStroke </item>\n\t\t\t<item> KeyboardFocusManager </item>\n\t\t\t<item> Keymap </item>\n\t\t\t<item> LDAPCertStoreParameters </item>\n\t\t\t<item> LIFESPAN_POLICY_ID </item>\n\t\t\t<item> LOCATION_FORWARD </item>\n\t\t\t<item> LSException </item>\n\t\t\t<item> LSInput </item>\n\t\t\t<item> LSLoadEvent </item>\n\t\t\t<item> LSOutput </item>\n\t\t\t<item> LSParser </item>\n\t\t\t<item> LSParserFilter </item>\n\t\t\t<item> LSProgressEvent </item>\n\t\t\t<item> LSResourceResolver </item>\n\t\t\t<item> LSSerializer </item>\n\t\t\t<item> LSSerializerFilter </item>\n\t\t\t<item> Label </item>\n\t\t\t<item> LabelUI </item>\n\t\t\t<item> LabelView </item>\n\t\t\t<item> LanguageCallback </item>\n\t\t\t<item> LastOwnerException </item>\n\t\t\t<item> LayeredHighlighter </item>\n\t\t\t<item> LayeredHighlighter.LayerPainter </item>\n\t\t\t<item> LayoutFocusTraversalPolicy </item>\n\t\t\t<item> LayoutManager </item>\n\t\t\t<item> LayoutManager2 </item>\n\t\t\t<item> LayoutQueue </item>\n\t\t\t<item> LdapContext </item>\n\t\t\t<item> LdapName </item>\n\t\t\t<item> LdapReferralException </item>\n\t\t\t<item> Lease </item>\n\t\t\t<item> Level </item>\n\t\t\t<item> LexicalHandler </item>\n\t\t\t<item> LifespanPolicy </item>\n\t\t\t<item> LifespanPolicyOperations </item>\n\t\t\t<item> LifespanPolicyValue </item>\n\t\t\t<item> LimitExceededException </item>\n\t\t\t<item> Line </item>\n\t\t\t<item> Line.Info </item>\n\t\t\t<item> Line2D </item>\n\t\t\t<item> Line2D.Double </item>\n\t\t\t<item> Line2D.Float </item>\n\t\t\t<item> LineBorder </item>\n\t\t\t<item> LineBreakMeasurer </item>\n\t\t\t<item> LineEvent </item>\n\t\t\t<item> LineEvent.Type </item>\n\t\t\t<item> LineListener </item>\n\t\t\t<item> LineMetrics </item>\n\t\t\t<item> LineNumberInputStream </item>\n\t\t\t<item> LineNumberReader </item>\n\t\t\t<item> LineUnavailableException </item>\n\t\t\t<item> LinkException </item>\n\t\t\t<item> LinkLoopException </item>\n\t\t\t<item> LinkRef </item>\n\t\t\t<item> LinkageError </item>\n\t\t\t<item> LinkedBlockingQueue </item>\n\t\t\t<item> LinkedHashMap </item>\n\t\t\t<item> LinkedHashSet </item>\n\t\t\t<item> LinkedList </item>\n\t\t\t<item> List </item>\n\t\t\t<item> List </item>\n\t\t\t<item> ListCellRenderer </item>\n\t\t\t<item> ListDataEvent </item>\n\t\t\t<item> ListDataListener </item>\n\t\t\t<item> ListIterator </item>\n\t\t\t<item> ListModel </item>\n\t\t\t<item> ListResourceBundle </item>\n\t\t\t<item> ListSelectionEvent </item>\n\t\t\t<item> ListSelectionListener </item>\n\t\t\t<item> ListSelectionModel </item>\n\t\t\t<item> ListUI </item>\n\t\t\t<item> ListView </item>\n\t\t\t<item> ListenerNotFoundException </item>\n\t\t\t<item> LoaderHandler </item>\n\t\t\t<item> LocalObject </item>\n\t\t\t<item> Locale </item>\n\t\t\t<item> LocateRegistry </item>\n\t\t\t<item> Locator </item>\n\t\t\t<item> Locator2 </item>\n\t\t\t<item> Locator2Impl </item>\n\t\t\t<item> LocatorImpl </item>\n\t\t\t<item> Lock </item>\n\t\t\t<item> LockSupport </item>\n\t\t\t<item> LogManager </item>\n\t\t\t<item> LogRecord </item>\n\t\t\t<item> LogStream </item>\n\t\t\t<item> Logger </item>\n\t\t\t<item> LoggingMXBean </item>\n\t\t\t<item> LoggingPermission </item>\n\t\t\t<item> LoginContext </item>\n\t\t\t<item> LoginException </item>\n\t\t\t<item> LoginModule </item>\n\t\t\t<item> Long </item>\n\t\t\t<item> LongBuffer </item>\n\t\t\t<item> LongHolder </item>\n\t\t\t<item> LongLongSeqHelper </item>\n\t\t\t<item> LongLongSeqHolder </item>\n\t\t\t<item> LongSeqHelper </item>\n\t\t\t<item> LongSeqHolder </item>\n\t\t\t<item> LookAndFeel </item>\n\t\t\t<item> LookupOp </item>\n\t\t\t<item> LookupTable </item>\n\t\t\t<item> MARSHAL </item>\n\t\t\t<item> MBeanAttributeInfo </item>\n\t\t\t<item> MBeanConstructorInfo </item>\n\t\t\t<item> MBeanException </item>\n\t\t\t<item> MBeanFeatureInfo </item>\n\t\t\t<item> MBeanInfo </item>\n\t\t\t<item> MBeanNotificationInfo </item>\n\t\t\t<item> MBeanOperationInfo </item>\n\t\t\t<item> MBeanParameterInfo </item>\n\t\t\t<item> MBeanPermission </item>\n\t\t\t<item> MBeanRegistration </item>\n\t\t\t<item> MBeanRegistrationException </item>\n\t\t\t<item> MBeanServer </item>\n\t\t\t<item> MBeanServerBuilder </item>\n\t\t\t<item> MBeanServerConnection </item>\n\t\t\t<item> MBeanServerDelegate </item>\n\t\t\t<item> MBeanServerDelegateMBean </item>\n\t\t\t<item> MBeanServerFactory </item>\n\t\t\t<item> MBeanServerForwarder </item>\n\t\t\t<item> MBeanServerInvocationHandler </item>\n\t\t\t<item> MBeanServerNotification </item>\n\t\t\t<item> MBeanServerNotificationFilter </item>\n\t\t\t<item> MBeanServerPermission </item>\n\t\t\t<item> MBeanTrustPermission </item>\n\t\t\t<item> MGF1ParameterSpec </item>\n\t\t\t<item> MLet </item>\n\t\t\t<item> MLetMBean </item>\n\t\t\t<item> Mac </item>\n\t\t\t<item> MacSpi </item>\n\t\t\t<item> MalformedInputException </item>\n\t\t\t<item> MalformedLinkException </item>\n\t\t\t<item> MalformedObjectNameException </item>\n\t\t\t<item> MalformedParameterizedTypeException </item>\n\t\t\t<item> MalformedURLException </item>\n\t\t\t<item> ManageReferralControl </item>\n\t\t\t<item> ManagementFactory </item>\n\t\t\t<item> ManagementPermission </item>\n\t\t\t<item> ManagerFactoryParameters </item>\n\t\t\t<item> Manifest </item>\n\t\t\t<item> Map </item>\n\t\t\t<item> Map.Entry </item>\n\t\t\t<item> MappedByteBuffer </item>\n\t\t\t<item> MarshalException </item>\n\t\t\t<item> MarshalledObject </item>\n\t\t\t<item> MaskFormatter </item>\n\t\t\t<item> MatchResult </item>\n\t\t\t<item> Matcher </item>\n\t\t\t<item> Math </item>\n\t\t\t<item> MathContext </item>\n\t\t\t<item> MatteBorder </item>\n\t\t\t<item> Media </item>\n\t\t\t<item> MediaName </item>\n\t\t\t<item> MediaPrintableArea </item>\n\t\t\t<item> MediaSize </item>\n\t\t\t<item> MediaSize.Engineering </item>\n\t\t\t<item> MediaSize.ISO </item>\n\t\t\t<item> MediaSize.JIS </item>\n\t\t\t<item> MediaSize.NA </item>\n\t\t\t<item> MediaSize.Other </item>\n\t\t\t<item> MediaSizeName </item>\n\t\t\t<item> MediaTracker </item>\n\t\t\t<item> MediaTray </item>\n\t\t\t<item> Member </item>\n\t\t\t<item> MemoryCacheImageInputStream </item>\n\t\t\t<item> MemoryCacheImageOutputStream </item>\n\t\t\t<item> MemoryHandler </item>\n\t\t\t<item> MemoryImageSource </item>\n\t\t\t<item> MemoryMXBean </item>\n\t\t\t<item> MemoryManagerMXBean </item>\n\t\t\t<item> MemoryNotificationInfo </item>\n\t\t\t<item> MemoryPoolMXBean </item>\n\t\t\t<item> MemoryType </item>\n\t\t\t<item> MemoryUsage </item>\n\t\t\t<item> Menu </item>\n\t\t\t<item> MenuBar </item>\n\t\t\t<item> MenuBarUI </item>\n\t\t\t<item> MenuComponent </item>\n\t\t\t<item> MenuContainer </item>\n\t\t\t<item> MenuDragMouseEvent </item>\n\t\t\t<item> MenuDragMouseListener </item>\n\t\t\t<item> MenuElement </item>\n\t\t\t<item> MenuEvent </item>\n\t\t\t<item> MenuItem </item>\n\t\t\t<item> MenuItemUI </item>\n\t\t\t<item> MenuKeyEvent </item>\n\t\t\t<item> MenuKeyListener </item>\n\t\t\t<item> MenuListener </item>\n\t\t\t<item> MenuSelectionManager </item>\n\t\t\t<item> MenuShortcut </item>\n\t\t\t<item> MessageDigest </item>\n\t\t\t<item> MessageDigestSpi </item>\n\t\t\t<item> MessageFormat </item>\n\t\t\t<item> MessageFormat.Field </item>\n\t\t\t<item> MessageProp </item>\n\t\t\t<item> MetaEventListener </item>\n\t\t\t<item> MetaMessage </item>\n\t\t\t<item> MetalBorders </item>\n\t\t\t<item> MetalBorders.ButtonBorder </item>\n\t\t\t<item> MetalBorders.Flush3DBorder </item>\n\t\t\t<item> MetalBorders.InternalFrameBorder </item>\n\t\t\t<item> MetalBorders.MenuBarBorder </item>\n\t\t\t<item> MetalBorders.MenuItemBorder </item>\n\t\t\t<item> MetalBorders.OptionDialogBorder </item>\n\t\t\t<item> MetalBorders.PaletteBorder </item>\n\t\t\t<item> MetalBorders.PopupMenuBorder </item>\n\t\t\t<item> MetalBorders.RolloverButtonBorder </item>\n\t\t\t<item> MetalBorders.ScrollPaneBorder </item>\n\t\t\t<item> MetalBorders.TableHeaderBorder </item>\n\t\t\t<item> MetalBorders.TextFieldBorder </item>\n\t\t\t<item> MetalBorders.ToggleButtonBorder </item>\n\t\t\t<item> MetalBorders.ToolBarBorder </item>\n\t\t\t<item> MetalButtonUI </item>\n\t\t\t<item> MetalCheckBoxIcon </item>\n\t\t\t<item> MetalCheckBoxUI </item>\n\t\t\t<item> MetalComboBoxButton </item>\n\t\t\t<item> MetalComboBoxEditor </item>\n\t\t\t<item> MetalComboBoxEditor.UIResource </item>\n\t\t\t<item> MetalComboBoxIcon </item>\n\t\t\t<item> MetalComboBoxUI </item>\n\t\t\t<item> MetalDesktopIconUI </item>\n\t\t\t<item> MetalFileChooserUI </item>\n\t\t\t<item> MetalIconFactory </item>\n\t\t\t<item> MetalIconFactory.FileIcon16 </item>\n\t\t\t<item> MetalIconFactory.FolderIcon16 </item>\n\t\t\t<item> MetalIconFactory.PaletteCloseIcon </item>\n\t\t\t<item> MetalIconFactory.TreeControlIcon </item>\n\t\t\t<item> MetalIconFactory.TreeFolderIcon </item>\n\t\t\t<item> MetalIconFactory.TreeLeafIcon </item>\n\t\t\t<item> MetalInternalFrameTitlePane </item>\n\t\t\t<item> MetalInternalFrameUI </item>\n\t\t\t<item> MetalLabelUI </item>\n\t\t\t<item> MetalLookAndFeel </item>\n\t\t\t<item> MetalMenuBarUI </item>\n\t\t\t<item> MetalPopupMenuSeparatorUI </item>\n\t\t\t<item> MetalProgressBarUI </item>\n\t\t\t<item> MetalRadioButtonUI </item>\n\t\t\t<item> MetalRootPaneUI </item>\n\t\t\t<item> MetalScrollBarUI </item>\n\t\t\t<item> MetalScrollButton </item>\n\t\t\t<item> MetalScrollPaneUI </item>\n\t\t\t<item> MetalSeparatorUI </item>\n\t\t\t<item> MetalSliderUI </item>\n\t\t\t<item> MetalSplitPaneUI </item>\n\t\t\t<item> MetalTabbedPaneUI </item>\n\t\t\t<item> MetalTextFieldUI </item>\n\t\t\t<item> MetalTheme </item>\n\t\t\t<item> MetalToggleButtonUI </item>\n\t\t\t<item> MetalToolBarUI </item>\n\t\t\t<item> MetalToolTipUI </item>\n\t\t\t<item> MetalTreeUI </item>\n\t\t\t<item> Method </item>\n\t\t\t<item> MethodDescriptor </item>\n\t\t\t<item> MidiChannel </item>\n\t\t\t<item> MidiDevice </item>\n\t\t\t<item> MidiDevice.Info </item>\n\t\t\t<item> MidiDeviceProvider </item>\n\t\t\t<item> MidiEvent </item>\n\t\t\t<item> MidiFileFormat </item>\n\t\t\t<item> MidiFileReader </item>\n\t\t\t<item> MidiFileWriter </item>\n\t\t\t<item> MidiMessage </item>\n\t\t\t<item> MidiSystem </item>\n\t\t\t<item> MidiUnavailableException </item>\n\t\t\t<item> MimeTypeParseException </item>\n\t\t\t<item> MinimalHTMLWriter </item>\n\t\t\t<item> MissingFormatArgumentException </item>\n\t\t\t<item> MissingFormatWidthException </item>\n\t\t\t<item> MissingResourceException </item>\n\t\t\t<item> Mixer </item>\n\t\t\t<item> Mixer.Info </item>\n\t\t\t<item> MixerProvider </item>\n\t\t\t<item> ModelMBean </item>\n\t\t\t<item> ModelMBeanAttributeInfo </item>\n\t\t\t<item> ModelMBeanConstructorInfo </item>\n\t\t\t<item> ModelMBeanInfo </item>\n\t\t\t<item> ModelMBeanInfoSupport </item>\n\t\t\t<item> ModelMBeanNotificationBroadcaster </item>\n\t\t\t<item> ModelMBeanNotificationInfo </item>\n\t\t\t<item> ModelMBeanOperationInfo </item>\n\t\t\t<item> ModificationItem </item>\n\t\t\t<item> Modifier </item>\n\t\t\t<item> Monitor </item>\n\t\t\t<item> MonitorMBean </item>\n\t\t\t<item> MonitorNotification </item>\n\t\t\t<item> MonitorSettingException </item>\n\t\t\t<item> MouseAdapter </item>\n\t\t\t<item> MouseDragGestureRecognizer </item>\n\t\t\t<item> MouseEvent </item>\n\t\t\t<item> MouseInfo </item>\n\t\t\t<item> MouseInputAdapter </item>\n\t\t\t<item> MouseInputListener </item>\n\t\t\t<item> MouseListener </item>\n\t\t\t<item> MouseMotionAdapter </item>\n\t\t\t<item> MouseMotionListener </item>\n\t\t\t<item> MouseWheelEvent </item>\n\t\t\t<item> MouseWheelListener </item>\n\t\t\t<item> MultiButtonUI </item>\n\t\t\t<item> MultiColorChooserUI </item>\n\t\t\t<item> MultiComboBoxUI </item>\n\t\t\t<item> MultiDesktopIconUI </item>\n\t\t\t<item> MultiDesktopPaneUI </item>\n\t\t\t<item> MultiDoc </item>\n\t\t\t<item> MultiDocPrintJob </item>\n\t\t\t<item> MultiDocPrintService </item>\n\t\t\t<item> MultiFileChooserUI </item>\n\t\t\t<item> MultiInternalFrameUI </item>\n\t\t\t<item> MultiLabelUI </item>\n\t\t\t<item> MultiListUI </item>\n\t\t\t<item> MultiLookAndFeel </item>\n\t\t\t<item> MultiMenuBarUI </item>\n\t\t\t<item> MultiMenuItemUI </item>\n\t\t\t<item> MultiOptionPaneUI </item>\n\t\t\t<item> MultiPanelUI </item>\n\t\t\t<item> MultiPixelPackedSampleModel </item>\n\t\t\t<item> MultiPopupMenuUI </item>\n\t\t\t<item> MultiProgressBarUI </item>\n\t\t\t<item> MultiRootPaneUI </item>\n\t\t\t<item> MultiScrollBarUI </item>\n\t\t\t<item> MultiScrollPaneUI </item>\n\t\t\t<item> MultiSeparatorUI </item>\n\t\t\t<item> MultiSliderUI </item>\n\t\t\t<item> MultiSpinnerUI </item>\n\t\t\t<item> MultiSplitPaneUI </item>\n\t\t\t<item> MultiTabbedPaneUI </item>\n\t\t\t<item> MultiTableHeaderUI </item>\n\t\t\t<item> MultiTableUI </item>\n\t\t\t<item> MultiTextUI </item>\n\t\t\t<item> MultiToolBarUI </item>\n\t\t\t<item> MultiToolTipUI </item>\n\t\t\t<item> MultiTreeUI </item>\n\t\t\t<item> MultiViewportUI </item>\n\t\t\t<item> MulticastSocket </item>\n\t\t\t<item> MultipleComponentProfileHelper </item>\n\t\t\t<item> MultipleComponentProfileHolder </item>\n\t\t\t<item> MultipleDocumentHandling </item>\n\t\t\t<item> MultipleMaster </item>\n\t\t\t<item> MutableAttributeSet </item>\n\t\t\t<item> MutableComboBoxModel </item>\n\t\t\t<item> MutableTreeNode </item>\n\t\t\t<item> NON_EXISTENT </item>\n\t\t\t<item> NO_IMPLEMENT </item>\n\t\t\t<item> NO_MEMORY </item>\n\t\t\t<item> NO_PERMISSION </item>\n\t\t\t<item> NO_RESOURCES </item>\n\t\t\t<item> NO_RESPONSE </item>\n\t\t\t<item> NVList </item>\n\t\t\t<item> Name </item>\n\t\t\t<item> NameAlreadyBoundException </item>\n\t\t\t<item> NameCallback </item>\n\t\t\t<item> NameClassPair </item>\n\t\t\t<item> NameComponent </item>\n\t\t\t<item> NameComponentHelper </item>\n\t\t\t<item> NameComponentHolder </item>\n\t\t\t<item> NameDynAnyPair </item>\n\t\t\t<item> NameDynAnyPairHelper </item>\n\t\t\t<item> NameDynAnyPairSeqHelper </item>\n\t\t\t<item> NameHelper </item>\n\t\t\t<item> NameHolder </item>\n\t\t\t<item> NameList </item>\n\t\t\t<item> NameNotFoundException </item>\n\t\t\t<item> NameParser </item>\n\t\t\t<item> NameValuePair </item>\n\t\t\t<item> NameValuePair </item>\n\t\t\t<item> NameValuePairHelper </item>\n\t\t\t<item> NameValuePairHelper </item>\n\t\t\t<item> NameValuePairSeqHelper </item>\n\t\t\t<item> NamedNodeMap </item>\n\t\t\t<item> NamedValue </item>\n\t\t\t<item> NamespaceChangeListener </item>\n\t\t\t<item> NamespaceContext </item>\n\t\t\t<item> NamespaceSupport </item>\n\t\t\t<item> Naming </item>\n\t\t\t<item> NamingContext </item>\n\t\t\t<item> NamingContextExt </item>\n\t\t\t<item> NamingContextExtHelper </item>\n\t\t\t<item> NamingContextExtHolder </item>\n\t\t\t<item> NamingContextExtOperations </item>\n\t\t\t<item> NamingContextExtPOA </item>\n\t\t\t<item> NamingContextHelper </item>\n\t\t\t<item> NamingContextHolder </item>\n\t\t\t<item> NamingContextOperations </item>\n\t\t\t<item> NamingContextPOA </item>\n\t\t\t<item> NamingEnumeration </item>\n\t\t\t<item> NamingEvent </item>\n\t\t\t<item> NamingException </item>\n\t\t\t<item> NamingExceptionEvent </item>\n\t\t\t<item> NamingListener </item>\n\t\t\t<item> NamingManager </item>\n\t\t\t<item> NamingSecurityException </item>\n\t\t\t<item> NavigationFilter </item>\n\t\t\t<item> NavigationFilter.FilterBypass </item>\n\t\t\t<item> NegativeArraySizeException </item>\n\t\t\t<item> NetPermission </item>\n\t\t\t<item> NetworkInterface </item>\n\t\t\t<item> NoClassDefFoundError </item>\n\t\t\t<item> NoConnectionPendingException </item>\n\t\t\t<item> NoContext </item>\n\t\t\t<item> NoContextHelper </item>\n\t\t\t<item> NoInitialContextException </item>\n\t\t\t<item> NoPermissionException </item>\n\t\t\t<item> NoRouteToHostException </item>\n\t\t\t<item> NoServant </item>\n\t\t\t<item> NoServantHelper </item>\n\t\t\t<item> NoSuchAlgorithmException </item>\n\t\t\t<item> NoSuchAttributeException </item>\n\t\t\t<item> NoSuchElementException </item>\n\t\t\t<item> NoSuchFieldError </item>\n\t\t\t<item> NoSuchFieldException </item>\n\t\t\t<item> NoSuchMethodError </item>\n\t\t\t<item> NoSuchMethodException </item>\n\t\t\t<item> NoSuchObjectException </item>\n\t\t\t<item> NoSuchPaddingException </item>\n\t\t\t<item> NoSuchProviderException </item>\n\t\t\t<item> Node </item>\n\t\t\t<item> NodeChangeEvent </item>\n\t\t\t<item> NodeChangeListener </item>\n\t\t\t<item> NodeList </item>\n\t\t\t<item> NonReadableChannelException </item>\n\t\t\t<item> NonWritableChannelException </item>\n\t\t\t<item> NoninvertibleTransformException </item>\n\t\t\t<item> NotActiveException </item>\n\t\t\t<item> NotBoundException </item>\n\t\t\t<item> NotCompliantMBeanException </item>\n\t\t\t<item> NotContextException </item>\n\t\t\t<item> NotEmpty </item>\n\t\t\t<item> NotEmptyHelper </item>\n\t\t\t<item> NotEmptyHolder </item>\n\t\t\t<item> NotFound </item>\n\t\t\t<item> NotFoundHelper </item>\n\t\t\t<item> NotFoundHolder </item>\n\t\t\t<item> NotFoundReason </item>\n\t\t\t<item> NotFoundReasonHelper </item>\n\t\t\t<item> NotFoundReasonHolder </item>\n\t\t\t<item> NotOwnerException </item>\n\t\t\t<item> NotSerializableException </item>\n\t\t\t<item> NotYetBoundException </item>\n\t\t\t<item> NotYetConnectedException </item>\n\t\t\t<item> Notation </item>\n\t\t\t<item> Notification </item>\n\t\t\t<item> NotificationBroadcaster </item>\n\t\t\t<item> NotificationBroadcasterSupport </item>\n\t\t\t<item> NotificationEmitter </item>\n\t\t\t<item> NotificationFilter </item>\n\t\t\t<item> NotificationFilterSupport </item>\n\t\t\t<item> NotificationListener </item>\n\t\t\t<item> NotificationResult </item>\n\t\t\t<item> NullCipher </item>\n\t\t\t<item> NullPointerException </item>\n\t\t\t<item> Number </item>\n\t\t\t<item> NumberFormat </item>\n\t\t\t<item> NumberFormat.Field </item>\n\t\t\t<item> NumberFormatException </item>\n\t\t\t<item> NumberFormatter </item>\n\t\t\t<item> NumberOfDocuments </item>\n\t\t\t<item> NumberOfInterveningJobs </item>\n\t\t\t<item> NumberUp </item>\n\t\t\t<item> NumberUpSupported </item>\n\t\t\t<item> NumericShaper </item>\n\t\t\t<item> OAEPParameterSpec </item>\n\t\t\t<item> OBJECT_NOT_EXIST </item>\n\t\t\t<item> OBJ_ADAPTER </item>\n\t\t\t<item> OMGVMCID </item>\n\t\t\t<item> ORB </item>\n\t\t\t<item> ORB </item>\n\t\t\t<item> ORBIdHelper </item>\n\t\t\t<item> ORBInitInfo </item>\n\t\t\t<item> ORBInitInfoOperations </item>\n\t\t\t<item> ORBInitializer </item>\n\t\t\t<item> ORBInitializerOperations </item>\n\t\t\t<item> ObjID </item>\n\t\t\t<item> Object </item>\n\t\t\t<item> Object </item>\n\t\t\t<item> ObjectAlreadyActive </item>\n\t\t\t<item> ObjectAlreadyActiveHelper </item>\n\t\t\t<item> ObjectChangeListener </item>\n\t\t\t<item> ObjectFactory </item>\n\t\t\t<item> ObjectFactoryBuilder </item>\n\t\t\t<item> ObjectHelper </item>\n\t\t\t<item> ObjectHolder </item>\n\t\t\t<item> ObjectIdHelper </item>\n\t\t\t<item> ObjectIdHelper </item>\n\t\t\t<item> ObjectImpl </item>\n\t\t\t<item> ObjectImpl </item>\n\t\t\t<item> ObjectInput </item>\n\t\t\t<item> ObjectInputStream </item>\n\t\t\t<item> ObjectInputStream.GetField </item>\n\t\t\t<item> ObjectInputValidation </item>\n\t\t\t<item> ObjectInstance </item>\n\t\t\t<item> ObjectName </item>\n\t\t\t<item> ObjectNotActive </item>\n\t\t\t<item> ObjectNotActiveHelper </item>\n\t\t\t<item> ObjectOutput </item>\n\t\t\t<item> ObjectOutputStream </item>\n\t\t\t<item> ObjectOutputStream.PutField </item>\n\t\t\t<item> ObjectReferenceFactory </item>\n\t\t\t<item> ObjectReferenceFactoryHelper </item>\n\t\t\t<item> ObjectReferenceFactoryHolder </item>\n\t\t\t<item> ObjectReferenceTemplate </item>\n\t\t\t<item> ObjectReferenceTemplateHelper </item>\n\t\t\t<item> ObjectReferenceTemplateHolder </item>\n\t\t\t<item> ObjectReferenceTemplateSeqHelper </item>\n\t\t\t<item> ObjectReferenceTemplateSeqHolder </item>\n\t\t\t<item> ObjectStreamClass </item>\n\t\t\t<item> ObjectStreamConstants </item>\n\t\t\t<item> ObjectStreamException </item>\n\t\t\t<item> ObjectStreamField </item>\n\t\t\t<item> ObjectView </item>\n\t\t\t<item> Observable </item>\n\t\t\t<item> Observer </item>\n\t\t\t<item> OceanTheme </item>\n\t\t\t<item> OctetSeqHelper </item>\n\t\t\t<item> OctetSeqHolder </item>\n\t\t\t<item> Oid </item>\n\t\t\t<item> OpenDataException </item>\n\t\t\t<item> OpenMBeanAttributeInfo </item>\n\t\t\t<item> OpenMBeanAttributeInfoSupport </item>\n\t\t\t<item> OpenMBeanConstructorInfo </item>\n\t\t\t<item> OpenMBeanConstructorInfoSupport </item>\n\t\t\t<item> OpenMBeanInfo </item>\n\t\t\t<item> OpenMBeanInfoSupport </item>\n\t\t\t<item> OpenMBeanOperationInfo </item>\n\t\t\t<item> OpenMBeanOperationInfoSupport </item>\n\t\t\t<item> OpenMBeanParameterInfo </item>\n\t\t\t<item> OpenMBeanParameterInfoSupport </item>\n\t\t\t<item> OpenType </item>\n\t\t\t<item> OpenType </item>\n\t\t\t<item> OperatingSystemMXBean </item>\n\t\t\t<item> Operation </item>\n\t\t\t<item> OperationNotSupportedException </item>\n\t\t\t<item> OperationsException </item>\n\t\t\t<item> Option </item>\n\t\t\t<item> OptionPaneUI </item>\n\t\t\t<item> OptionalDataException </item>\n\t\t\t<item> OrientationRequested </item>\n\t\t\t<item> OutOfMemoryError </item>\n\t\t\t<item> OutputDeviceAssigned </item>\n\t\t\t<item> OutputKeys </item>\n\t\t\t<item> OutputStream </item>\n\t\t\t<item> OutputStream </item>\n\t\t\t<item> OutputStream </item>\n\t\t\t<item> OutputStreamWriter </item>\n\t\t\t<item> OverlappingFileLockException </item>\n\t\t\t<item> OverlayLayout </item>\n\t\t\t<item> Override </item>\n\t\t\t<item> Owner </item>\n\t\t\t<item> PBEKey </item>\n\t\t\t<item> PBEKeySpec </item>\n\t\t\t<item> PBEParameterSpec </item>\n\t\t\t<item> PDLOverrideSupported </item>\n\t\t\t<item> PERSIST_STORE </item>\n\t\t\t<item> PKCS8EncodedKeySpec </item>\n\t\t\t<item> PKIXBuilderParameters </item>\n\t\t\t<item> PKIXCertPathBuilderResult </item>\n\t\t\t<item> PKIXCertPathChecker </item>\n\t\t\t<item> PKIXCertPathValidatorResult </item>\n\t\t\t<item> PKIXParameters </item>\n\t\t\t<item> POA </item>\n\t\t\t<item> POAHelper </item>\n\t\t\t<item> POAManager </item>\n\t\t\t<item> POAManagerOperations </item>\n\t\t\t<item> POAOperations </item>\n\t\t\t<item> PRIVATE_MEMBER </item>\n\t\t\t<item> PSSParameterSpec </item>\n\t\t\t<item> PSource </item>\n\t\t\t<item> PSource.PSpecified </item>\n\t\t\t<item> PUBLIC_MEMBER </item>\n\t\t\t<item> Pack200 </item>\n\t\t\t<item> Pack200.Packer </item>\n\t\t\t<item> Pack200.Unpacker </item>\n\t\t\t<item> Package </item>\n\t\t\t<item> PackedColorModel </item>\n\t\t\t<item> PageAttributes </item>\n\t\t\t<item> PageAttributes.ColorType </item>\n\t\t\t<item> PageAttributes.MediaType </item>\n\t\t\t<item> PageAttributes.OrientationRequestedType </item>\n\t\t\t<item> PageAttributes.OriginType </item>\n\t\t\t<item> PageAttributes.PrintQualityType </item>\n\t\t\t<item> PageFormat </item>\n\t\t\t<item> PageRanges </item>\n\t\t\t<item> Pageable </item>\n\t\t\t<item> PagedResultsControl </item>\n\t\t\t<item> PagedResultsResponseControl </item>\n\t\t\t<item> PagesPerMinute </item>\n\t\t\t<item> PagesPerMinuteColor </item>\n\t\t\t<item> Paint </item>\n\t\t\t<item> PaintContext </item>\n\t\t\t<item> PaintEvent </item>\n\t\t\t<item> Panel </item>\n\t\t\t<item> PanelUI </item>\n\t\t\t<item> Paper </item>\n\t\t\t<item> ParagraphView </item>\n\t\t\t<item> ParagraphView </item>\n\t\t\t<item> Parameter </item>\n\t\t\t<item> ParameterBlock </item>\n\t\t\t<item> ParameterDescriptor </item>\n\t\t\t<item> ParameterMetaData </item>\n\t\t\t<item> ParameterMode </item>\n\t\t\t<item> ParameterModeHelper </item>\n\t\t\t<item> ParameterModeHolder </item>\n\t\t\t<item> ParameterizedType </item>\n\t\t\t<item> ParseException </item>\n\t\t\t<item> ParsePosition </item>\n\t\t\t<item> Parser </item>\n\t\t\t<item> Parser </item>\n\t\t\t<item> ParserAdapter </item>\n\t\t\t<item> ParserConfigurationException </item>\n\t\t\t<item> ParserDelegator </item>\n\t\t\t<item> ParserFactory </item>\n\t\t\t<item> PartialResultException </item>\n\t\t\t<item> PasswordAuthentication </item>\n\t\t\t<item> PasswordCallback </item>\n\t\t\t<item> PasswordView </item>\n\t\t\t<item> Patch </item>\n\t\t\t<item> PathIterator </item>\n\t\t\t<item> Pattern </item>\n\t\t\t<item> PatternSyntaxException </item>\n\t\t\t<item> Permission </item>\n\t\t\t<item> Permission </item>\n\t\t\t<item> PermissionCollection </item>\n\t\t\t<item> Permissions </item>\n\t\t\t<item> PersistenceDelegate </item>\n\t\t\t<item> PersistentMBean </item>\n\t\t\t<item> PhantomReference </item>\n\t\t\t<item> Pipe </item>\n\t\t\t<item> Pipe.SinkChannel </item>\n\t\t\t<item> Pipe.SourceChannel </item>\n\t\t\t<item> PipedInputStream </item>\n\t\t\t<item> PipedOutputStream </item>\n\t\t\t<item> PipedReader </item>\n\t\t\t<item> PipedWriter </item>\n\t\t\t<item> PixelGrabber </item>\n\t\t\t<item> PixelInterleavedSampleModel </item>\n\t\t\t<item> PlainDocument </item>\n\t\t\t<item> PlainView </item>\n\t\t\t<item> Point </item>\n\t\t\t<item> Point2D </item>\n\t\t\t<item> Point2D.Double </item>\n\t\t\t<item> Point2D.Float </item>\n\t\t\t<item> PointerInfo </item>\n\t\t\t<item> Policy </item>\n\t\t\t<item> Policy </item>\n\t\t\t<item> Policy </item>\n\t\t\t<item> PolicyError </item>\n\t\t\t<item> PolicyErrorCodeHelper </item>\n\t\t\t<item> PolicyErrorHelper </item>\n\t\t\t<item> PolicyErrorHolder </item>\n\t\t\t<item> PolicyFactory </item>\n\t\t\t<item> PolicyFactoryOperations </item>\n\t\t\t<item> PolicyHelper </item>\n\t\t\t<item> PolicyHolder </item>\n\t\t\t<item> PolicyListHelper </item>\n\t\t\t<item> PolicyListHolder </item>\n\t\t\t<item> PolicyNode </item>\n\t\t\t<item> PolicyOperations </item>\n\t\t\t<item> PolicyQualifierInfo </item>\n\t\t\t<item> PolicyTypeHelper </item>\n\t\t\t<item> Polygon </item>\n\t\t\t<item> PooledConnection </item>\n\t\t\t<item> Popup </item>\n\t\t\t<item> PopupFactory </item>\n\t\t\t<item> PopupMenu </item>\n\t\t\t<item> PopupMenuEvent </item>\n\t\t\t<item> PopupMenuListener </item>\n\t\t\t<item> PopupMenuUI </item>\n\t\t\t<item> Port </item>\n\t\t\t<item> Port.Info </item>\n\t\t\t<item> PortUnreachableException </item>\n\t\t\t<item> PortableRemoteObject </item>\n\t\t\t<item> PortableRemoteObjectDelegate </item>\n\t\t\t<item> Position </item>\n\t\t\t<item> Position.Bias </item>\n\t\t\t<item> Predicate </item>\n\t\t\t<item> PreferenceChangeEvent </item>\n\t\t\t<item> PreferenceChangeListener </item>\n\t\t\t<item> Preferences </item>\n\t\t\t<item> PreferencesFactory </item>\n\t\t\t<item> PreparedStatement </item>\n\t\t\t<item> PresentationDirection </item>\n\t\t\t<item> Principal </item>\n\t\t\t<item> Principal </item>\n\t\t\t<item> PrincipalHolder </item>\n\t\t\t<item> PrintEvent </item>\n\t\t\t<item> PrintException </item>\n\t\t\t<item> PrintGraphics </item>\n\t\t\t<item> PrintJob </item>\n\t\t\t<item> PrintJobAdapter </item>\n\t\t\t<item> PrintJobAttribute </item>\n\t\t\t<item> PrintJobAttributeEvent </item>\n\t\t\t<item> PrintJobAttributeListener </item>\n\t\t\t<item> PrintJobAttributeSet </item>\n\t\t\t<item> PrintJobEvent </item>\n\t\t\t<item> PrintJobListener </item>\n\t\t\t<item> PrintQuality </item>\n\t\t\t<item> PrintRequestAttribute </item>\n\t\t\t<item> PrintRequestAttributeSet </item>\n\t\t\t<item> PrintService </item>\n\t\t\t<item> PrintServiceAttribute </item>\n\t\t\t<item> PrintServiceAttributeEvent </item>\n\t\t\t<item> PrintServiceAttributeListener </item>\n\t\t\t<item> PrintServiceAttributeSet </item>\n\t\t\t<item> PrintServiceLookup </item>\n\t\t\t<item> PrintStream </item>\n\t\t\t<item> PrintWriter </item>\n\t\t\t<item> Printable </item>\n\t\t\t<item> PrinterAbortException </item>\n\t\t\t<item> PrinterException </item>\n\t\t\t<item> PrinterGraphics </item>\n\t\t\t<item> PrinterIOException </item>\n\t\t\t<item> PrinterInfo </item>\n\t\t\t<item> PrinterIsAcceptingJobs </item>\n\t\t\t<item> PrinterJob </item>\n\t\t\t<item> PrinterLocation </item>\n\t\t\t<item> PrinterMakeAndModel </item>\n\t\t\t<item> PrinterMessageFromOperator </item>\n\t\t\t<item> PrinterMoreInfo </item>\n\t\t\t<item> PrinterMoreInfoManufacturer </item>\n\t\t\t<item> PrinterName </item>\n\t\t\t<item> PrinterResolution </item>\n\t\t\t<item> PrinterState </item>\n\t\t\t<item> PrinterStateReason </item>\n\t\t\t<item> PrinterStateReasons </item>\n\t\t\t<item> PrinterURI </item>\n\t\t\t<item> PriorityBlockingQueue </item>\n\t\t\t<item> PriorityQueue </item>\n\t\t\t<item> PrivateClassLoader </item>\n\t\t\t<item> PrivateCredentialPermission </item>\n\t\t\t<item> PrivateKey </item>\n\t\t\t<item> PrivateMLet </item>\n\t\t\t<item> PrivilegedAction </item>\n\t\t\t<item> PrivilegedActionException </item>\n\t\t\t<item> PrivilegedExceptionAction </item>\n\t\t\t<item> Process </item>\n\t\t\t<item> ProcessBuilder </item>\n\t\t\t<item> ProcessingInstruction </item>\n\t\t\t<item> ProfileDataException </item>\n\t\t\t<item> ProfileIdHelper </item>\n\t\t\t<item> ProgressBarUI </item>\n\t\t\t<item> ProgressMonitor </item>\n\t\t\t<item> ProgressMonitorInputStream </item>\n\t\t\t<item> Properties </item>\n\t\t\t<item> PropertyChangeEvent </item>\n\t\t\t<item> PropertyChangeListener </item>\n\t\t\t<item> PropertyChangeListenerProxy </item>\n\t\t\t<item> PropertyChangeSupport </item>\n\t\t\t<item> PropertyDescriptor </item>\n\t\t\t<item> PropertyEditor </item>\n\t\t\t<item> PropertyEditorManager </item>\n\t\t\t<item> PropertyEditorSupport </item>\n\t\t\t<item> PropertyPermission </item>\n\t\t\t<item> PropertyResourceBundle </item>\n\t\t\t<item> PropertyVetoException </item>\n\t\t\t<item> ProtectionDomain </item>\n\t\t\t<item> ProtocolException </item>\n\t\t\t<item> Provider </item>\n\t\t\t<item> Provider.Service </item>\n\t\t\t<item> ProviderException </item>\n\t\t\t<item> Proxy </item>\n\t\t\t<item> Proxy </item>\n\t\t\t<item> Proxy.Type </item>\n\t\t\t<item> ProxySelector </item>\n\t\t\t<item> PublicKey </item>\n\t\t\t<item> PushbackInputStream </item>\n\t\t\t<item> PushbackReader </item>\n\t\t\t<item> QName </item>\n\t\t\t<item> QuadCurve2D </item>\n\t\t\t<item> QuadCurve2D.Double </item>\n\t\t\t<item> QuadCurve2D.Float </item>\n\t\t\t<item> Query </item>\n\t\t\t<item> QueryEval </item>\n\t\t\t<item> QueryExp </item>\n\t\t\t<item> Queue </item>\n\t\t\t<item> QueuedJobCount </item>\n\t\t\t<item> RC2ParameterSpec </item>\n\t\t\t<item> RC5ParameterSpec </item>\n\t\t\t<item> REBIND </item>\n\t\t\t<item> REQUEST_PROCESSING_POLICY_ID </item>\n\t\t\t<item> RGBImageFilter </item>\n\t\t\t<item> RMIClassLoader </item>\n\t\t\t<item> RMIClassLoaderSpi </item>\n\t\t\t<item> RMIClientSocketFactory </item>\n\t\t\t<item> RMIConnection </item>\n\t\t\t<item> RMIConnectionImpl </item>\n\t\t\t<item> RMIConnectionImpl_Stub </item>\n\t\t\t<item> RMIConnector </item>\n\t\t\t<item> RMIConnectorServer </item>\n\t\t\t<item> RMICustomMaxStreamFormat </item>\n\t\t\t<item> RMIFailureHandler </item>\n\t\t\t<item> RMIIIOPServerImpl </item>\n\t\t\t<item> RMIJRMPServerImpl </item>\n\t\t\t<item> RMISecurityException </item>\n\t\t\t<item> RMISecurityManager </item>\n\t\t\t<item> RMIServer </item>\n\t\t\t<item> RMIServerImpl </item>\n\t\t\t<item> RMIServerImpl_Stub </item>\n\t\t\t<item> RMIServerSocketFactory </item>\n\t\t\t<item> RMISocketFactory </item>\n\t\t\t<item> RSAKey </item>\n\t\t\t<item> RSAKeyGenParameterSpec </item>\n\t\t\t<item> RSAMultiPrimePrivateCrtKey </item>\n\t\t\t<item> RSAMultiPrimePrivateCrtKeySpec </item>\n\t\t\t<item> RSAOtherPrimeInfo </item>\n\t\t\t<item> RSAPrivateCrtKey </item>\n\t\t\t<item> RSAPrivateCrtKeySpec </item>\n\t\t\t<item> RSAPrivateKey </item>\n\t\t\t<item> RSAPrivateKeySpec </item>\n\t\t\t<item> RSAPublicKey </item>\n\t\t\t<item> RSAPublicKeySpec </item>\n\t\t\t<item> RTFEditorKit </item>\n\t\t\t<item> Random </item>\n\t\t\t<item> RandomAccess </item>\n\t\t\t<item> RandomAccessFile </item>\n\t\t\t<item> Raster </item>\n\t\t\t<item> RasterFormatException </item>\n\t\t\t<item> RasterOp </item>\n\t\t\t<item> Rdn </item>\n\t\t\t<item> ReadOnlyBufferException </item>\n\t\t\t<item> ReadWriteLock </item>\n\t\t\t<item> Readable </item>\n\t\t\t<item> ReadableByteChannel </item>\n\t\t\t<item> Reader </item>\n\t\t\t<item> RealmCallback </item>\n\t\t\t<item> RealmChoiceCallback </item>\n\t\t\t<item> Receiver </item>\n\t\t\t<item> Rectangle </item>\n\t\t\t<item> Rectangle2D </item>\n\t\t\t<item> Rectangle2D.Double </item>\n\t\t\t<item> Rectangle2D.Float </item>\n\t\t\t<item> RectangularShape </item>\n\t\t\t<item> ReentrantLock </item>\n\t\t\t<item> ReentrantReadWriteLock </item>\n\t\t\t<item> ReentrantReadWriteLock.ReadLock </item>\n\t\t\t<item> ReentrantReadWriteLock.WriteLock </item>\n\t\t\t<item> Ref </item>\n\t\t\t<item> RefAddr </item>\n\t\t\t<item> Reference </item>\n\t\t\t<item> Reference </item>\n\t\t\t<item> ReferenceQueue </item>\n\t\t\t<item> ReferenceUriSchemesSupported </item>\n\t\t\t<item> Referenceable </item>\n\t\t\t<item> ReferralException </item>\n\t\t\t<item> ReflectPermission </item>\n\t\t\t<item> ReflectionException </item>\n\t\t\t<item> RefreshFailedException </item>\n\t\t\t<item> Refreshable </item>\n\t\t\t<item> Region </item>\n\t\t\t<item> RegisterableService </item>\n\t\t\t<item> Registry </item>\n\t\t\t<item> RegistryHandler </item>\n\t\t\t<item> RejectedExecutionException </item>\n\t\t\t<item> RejectedExecutionHandler </item>\n\t\t\t<item> Relation </item>\n\t\t\t<item> RelationException </item>\n\t\t\t<item> RelationNotFoundException </item>\n\t\t\t<item> RelationNotification </item>\n\t\t\t<item> RelationService </item>\n\t\t\t<item> RelationServiceMBean </item>\n\t\t\t<item> RelationServiceNotRegisteredException </item>\n\t\t\t<item> RelationSupport </item>\n\t\t\t<item> RelationSupportMBean </item>\n\t\t\t<item> RelationType </item>\n\t\t\t<item> RelationTypeNotFoundException </item>\n\t\t\t<item> RelationTypeSupport </item>\n\t\t\t<item> RemarshalException </item>\n\t\t\t<item> Remote </item>\n\t\t\t<item> RemoteCall </item>\n\t\t\t<item> RemoteException </item>\n\t\t\t<item> RemoteObject </item>\n\t\t\t<item> RemoteObjectInvocationHandler </item>\n\t\t\t<item> RemoteRef </item>\n\t\t\t<item> RemoteServer </item>\n\t\t\t<item> RemoteStub </item>\n\t\t\t<item> RenderContext </item>\n\t\t\t<item> RenderableImage </item>\n\t\t\t<item> RenderableImageOp </item>\n\t\t\t<item> RenderableImageProducer </item>\n\t\t\t<item> RenderedImage </item>\n\t\t\t<item> RenderedImageFactory </item>\n\t\t\t<item> Renderer </item>\n\t\t\t<item> RenderingHints </item>\n\t\t\t<item> RenderingHints.Key </item>\n\t\t\t<item> RepaintManager </item>\n\t\t\t<item> ReplicateScaleFilter </item>\n\t\t\t<item> RepositoryIdHelper </item>\n\t\t\t<item> Request </item>\n\t\t\t<item> RequestInfo </item>\n\t\t\t<item> RequestInfoOperations </item>\n\t\t\t<item> RequestProcessingPolicy </item>\n\t\t\t<item> RequestProcessingPolicyOperations </item>\n\t\t\t<item> RequestProcessingPolicyValue </item>\n\t\t\t<item> RequestingUserName </item>\n\t\t\t<item> RequiredModelMBean </item>\n\t\t\t<item> RescaleOp </item>\n\t\t\t<item> ResolutionSyntax </item>\n\t\t\t<item> ResolveResult </item>\n\t\t\t<item> Resolver </item>\n\t\t\t<item> ResourceBundle </item>\n\t\t\t<item> ResponseCache </item>\n\t\t\t<item> ResponseHandler </item>\n\t\t\t<item> Result </item>\n\t\t\t<item> ResultSet </item>\n\t\t\t<item> ResultSetMetaData </item>\n\t\t\t<item> Retention </item>\n\t\t\t<item> RetentionPolicy </item>\n\t\t\t<item> ReverbType </item>\n\t\t\t<item> Robot </item>\n\t\t\t<item> Role </item>\n\t\t\t<item> RoleInfo </item>\n\t\t\t<item> RoleInfoNotFoundException </item>\n\t\t\t<item> RoleList </item>\n\t\t\t<item> RoleNotFoundException </item>\n\t\t\t<item> RoleResult </item>\n\t\t\t<item> RoleStatus </item>\n\t\t\t<item> RoleUnresolved </item>\n\t\t\t<item> RoleUnresolvedList </item>\n\t\t\t<item> RootPaneContainer </item>\n\t\t\t<item> RootPaneUI </item>\n\t\t\t<item> RoundRectangle2D </item>\n\t\t\t<item> RoundRectangle2D.Double </item>\n\t\t\t<item> RoundRectangle2D.Float </item>\n\t\t\t<item> RoundingMode </item>\n\t\t\t<item> RowMapper </item>\n\t\t\t<item> RowSet </item>\n\t\t\t<item> RowSetEvent </item>\n\t\t\t<item> RowSetInternal </item>\n\t\t\t<item> RowSetListener </item>\n\t\t\t<item> RowSetMetaData </item>\n\t\t\t<item> RowSetMetaDataImpl </item>\n\t\t\t<item> RowSetReader </item>\n\t\t\t<item> RowSetWarning </item>\n\t\t\t<item> RowSetWriter </item>\n\t\t\t<item> RuleBasedCollator </item>\n\t\t\t<item> RunTime </item>\n\t\t\t<item> RunTimeOperations </item>\n\t\t\t<item> Runnable </item>\n\t\t\t<item> Runtime </item>\n\t\t\t<item> RuntimeErrorException </item>\n\t\t\t<item> RuntimeException </item>\n\t\t\t<item> RuntimeMBeanException </item>\n\t\t\t<item> RuntimeMXBean </item>\n\t\t\t<item> RuntimeOperationsException </item>\n\t\t\t<item> RuntimePermission </item>\n\t\t\t<item> SAXException </item>\n\t\t\t<item> SAXNotRecognizedException </item>\n\t\t\t<item> SAXNotSupportedException </item>\n\t\t\t<item> SAXParseException </item>\n\t\t\t<item> SAXParser </item>\n\t\t\t<item> SAXParserFactory </item>\n\t\t\t<item> SAXResult </item>\n\t\t\t<item> SAXSource </item>\n\t\t\t<item> SAXTransformerFactory </item>\n\t\t\t<item> SERVANT_RETENTION_POLICY_ID </item>\n\t\t\t<item> SQLData </item>\n\t\t\t<item> SQLException </item>\n\t\t\t<item> SQLInput </item>\n\t\t\t<item> SQLInputImpl </item>\n\t\t\t<item> SQLOutput </item>\n\t\t\t<item> SQLOutputImpl </item>\n\t\t\t<item> SQLPermission </item>\n\t\t\t<item> SQLWarning </item>\n\t\t\t<item> SSLContext </item>\n\t\t\t<item> SSLContextSpi </item>\n\t\t\t<item> SSLEngine </item>\n\t\t\t<item> SSLEngineResult </item>\n\t\t\t<item> SSLEngineResult.HandshakeStatus </item>\n\t\t\t<item> SSLEngineResult.Status </item>\n\t\t\t<item> SSLException </item>\n\t\t\t<item> SSLHandshakeException </item>\n\t\t\t<item> SSLKeyException </item>\n\t\t\t<item> SSLPeerUnverifiedException </item>\n\t\t\t<item> SSLPermission </item>\n\t\t\t<item> SSLProtocolException </item>\n\t\t\t<item> SSLServerSocket </item>\n\t\t\t<item> SSLServerSocketFactory </item>\n\t\t\t<item> SSLSession </item>\n\t\t\t<item> SSLSessionBindingEvent </item>\n\t\t\t<item> SSLSessionBindingListener </item>\n\t\t\t<item> SSLSessionContext </item>\n\t\t\t<item> SSLSocket </item>\n\t\t\t<item> SSLSocketFactory </item>\n\t\t\t<item> SUCCESSFUL </item>\n\t\t\t<item> SYNC_WITH_TRANSPORT </item>\n\t\t\t<item> SYSTEM_EXCEPTION </item>\n\t\t\t<item> SampleModel </item>\n\t\t\t<item> Sasl </item>\n\t\t\t<item> SaslClient </item>\n\t\t\t<item> SaslClientFactory </item>\n\t\t\t<item> SaslException </item>\n\t\t\t<item> SaslServer </item>\n\t\t\t<item> SaslServerFactory </item>\n\t\t\t<item> Savepoint </item>\n\t\t\t<item> Scanner </item>\n\t\t\t<item> ScatteringByteChannel </item>\n\t\t\t<item> ScheduledExecutorService </item>\n\t\t\t<item> ScheduledFuture </item>\n\t\t\t<item> ScheduledThreadPoolExecutor </item>\n\t\t\t<item> Schema </item>\n\t\t\t<item> SchemaFactory </item>\n\t\t\t<item> SchemaFactoryLoader </item>\n\t\t\t<item> SchemaViolationException </item>\n\t\t\t<item> ScrollBarUI </item>\n\t\t\t<item> ScrollPane </item>\n\t\t\t<item> ScrollPaneAdjustable </item>\n\t\t\t<item> ScrollPaneConstants </item>\n\t\t\t<item> ScrollPaneLayout </item>\n\t\t\t<item> ScrollPaneLayout.UIResource </item>\n\t\t\t<item> ScrollPaneUI </item>\n\t\t\t<item> Scrollable </item>\n\t\t\t<item> Scrollbar </item>\n\t\t\t<item> SealedObject </item>\n\t\t\t<item> SearchControls </item>\n\t\t\t<item> SearchResult </item>\n\t\t\t<item> SecretKey </item>\n\t\t\t<item> SecretKeyFactory </item>\n\t\t\t<item> SecretKeyFactorySpi </item>\n\t\t\t<item> SecretKeySpec </item>\n\t\t\t<item> SecureCacheResponse </item>\n\t\t\t<item> SecureClassLoader </item>\n\t\t\t<item> SecureRandom </item>\n\t\t\t<item> SecureRandomSpi </item>\n\t\t\t<item> Security </item>\n\t\t\t<item> SecurityException </item>\n\t\t\t<item> SecurityManager </item>\n\t\t\t<item> SecurityPermission </item>\n\t\t\t<item> Segment </item>\n\t\t\t<item> SelectableChannel </item>\n\t\t\t<item> SelectionKey </item>\n\t\t\t<item> Selector </item>\n\t\t\t<item> SelectorProvider </item>\n\t\t\t<item> Semaphore </item>\n\t\t\t<item> SeparatorUI </item>\n\t\t\t<item> Sequence </item>\n\t\t\t<item> SequenceInputStream </item>\n\t\t\t<item> Sequencer </item>\n\t\t\t<item> Sequencer.SyncMode </item>\n\t\t\t<item> SerialArray </item>\n\t\t\t<item> SerialBlob </item>\n\t\t\t<item> SerialClob </item>\n\t\t\t<item> SerialDatalink </item>\n\t\t\t<item> SerialException </item>\n\t\t\t<item> SerialJavaObject </item>\n\t\t\t<item> SerialRef </item>\n\t\t\t<item> SerialStruct </item>\n\t\t\t<item> Serializable </item>\n\t\t\t<item> SerializablePermission </item>\n\t\t\t<item> Servant </item>\n\t\t\t<item> ServantActivator </item>\n\t\t\t<item> ServantActivatorHelper </item>\n\t\t\t<item> ServantActivatorOperations </item>\n\t\t\t<item> ServantActivatorPOA </item>\n\t\t\t<item> ServantAlreadyActive </item>\n\t\t\t<item> ServantAlreadyActiveHelper </item>\n\t\t\t<item> ServantLocator </item>\n\t\t\t<item> ServantLocatorHelper </item>\n\t\t\t<item> ServantLocatorOperations </item>\n\t\t\t<item> ServantLocatorPOA </item>\n\t\t\t<item> ServantManager </item>\n\t\t\t<item> ServantManagerOperations </item>\n\t\t\t<item> ServantNotActive </item>\n\t\t\t<item> ServantNotActiveHelper </item>\n\t\t\t<item> ServantObject </item>\n\t\t\t<item> ServantRetentionPolicy </item>\n\t\t\t<item> ServantRetentionPolicyOperations </item>\n\t\t\t<item> ServantRetentionPolicyValue </item>\n\t\t\t<item> ServerCloneException </item>\n\t\t\t<item> ServerError </item>\n\t\t\t<item> ServerException </item>\n\t\t\t<item> ServerIdHelper </item>\n\t\t\t<item> ServerNotActiveException </item>\n\t\t\t<item> ServerRef </item>\n\t\t\t<item> ServerRequest </item>\n\t\t\t<item> ServerRequestInfo </item>\n\t\t\t<item> ServerRequestInfoOperations </item>\n\t\t\t<item> ServerRequestInterceptor </item>\n\t\t\t<item> ServerRequestInterceptorOperations </item>\n\t\t\t<item> ServerRuntimeException </item>\n\t\t\t<item> ServerSocket </item>\n\t\t\t<item> ServerSocketChannel </item>\n\t\t\t<item> ServerSocketFactory </item>\n\t\t\t<item> ServiceContext </item>\n\t\t\t<item> ServiceContextHelper </item>\n\t\t\t<item> ServiceContextHolder </item>\n\t\t\t<item> ServiceContextListHelper </item>\n\t\t\t<item> ServiceContextListHolder </item>\n\t\t\t<item> ServiceDetail </item>\n\t\t\t<item> ServiceDetailHelper </item>\n\t\t\t<item> ServiceIdHelper </item>\n\t\t\t<item> ServiceInformation </item>\n\t\t\t<item> ServiceInformationHelper </item>\n\t\t\t<item> ServiceInformationHolder </item>\n\t\t\t<item> ServiceNotFoundException </item>\n\t\t\t<item> ServicePermission </item>\n\t\t\t<item> ServiceRegistry </item>\n\t\t\t<item> ServiceRegistry.Filter </item>\n\t\t\t<item> ServiceUI </item>\n\t\t\t<item> ServiceUIFactory </item>\n\t\t\t<item> ServiceUnavailableException </item>\n\t\t\t<item> Set </item>\n\t\t\t<item> SetOfIntegerSyntax </item>\n\t\t\t<item> SetOverrideType </item>\n\t\t\t<item> SetOverrideTypeHelper </item>\n\t\t\t<item> Severity </item>\n\t\t\t<item> Shape </item>\n\t\t\t<item> ShapeGraphicAttribute </item>\n\t\t\t<item> SheetCollate </item>\n\t\t\t<item> Short </item>\n\t\t\t<item> ShortBuffer </item>\n\t\t\t<item> ShortBufferException </item>\n\t\t\t<item> ShortHolder </item>\n\t\t\t<item> ShortLookupTable </item>\n\t\t\t<item> ShortMessage </item>\n\t\t\t<item> ShortSeqHelper </item>\n\t\t\t<item> ShortSeqHolder </item>\n\t\t\t<item> Sides </item>\n\t\t\t<item> Signature </item>\n\t\t\t<item> SignatureException </item>\n\t\t\t<item> SignatureSpi </item>\n\t\t\t<item> SignedObject </item>\n\t\t\t<item> Signer </item>\n\t\t\t<item> SimpleAttributeSet </item>\n\t\t\t<item> SimpleBeanInfo </item>\n\t\t\t<item> SimpleDateFormat </item>\n\t\t\t<item> SimpleDoc </item>\n\t\t\t<item> SimpleFormatter </item>\n\t\t\t<item> SimpleTimeZone </item>\n\t\t\t<item> SimpleType </item>\n\t\t\t<item> SinglePixelPackedSampleModel </item>\n\t\t\t<item> SingleSelectionModel </item>\n\t\t\t<item> Size2DSyntax </item>\n\t\t\t<item> SizeLimitExceededException </item>\n\t\t\t<item> SizeRequirements </item>\n\t\t\t<item> SizeSequence </item>\n\t\t\t<item> Skeleton </item>\n\t\t\t<item> SkeletonMismatchException </item>\n\t\t\t<item> SkeletonNotFoundException </item>\n\t\t\t<item> SliderUI </item>\n\t\t\t<item> Socket </item>\n\t\t\t<item> SocketAddress </item>\n\t\t\t<item> SocketChannel </item>\n\t\t\t<item> SocketException </item>\n\t\t\t<item> SocketFactory </item>\n\t\t\t<item> SocketHandler </item>\n\t\t\t<item> SocketImpl </item>\n\t\t\t<item> SocketImplFactory </item>\n\t\t\t<item> SocketOptions </item>\n\t\t\t<item> SocketPermission </item>\n\t\t\t<item> SocketSecurityException </item>\n\t\t\t<item> SocketTimeoutException </item>\n\t\t\t<item> SoftBevelBorder </item>\n\t\t\t<item> SoftReference </item>\n\t\t\t<item> SortControl </item>\n\t\t\t<item> SortKey </item>\n\t\t\t<item> SortResponseControl </item>\n\t\t\t<item> SortedMap </item>\n\t\t\t<item> SortedSet </item>\n\t\t\t<item> SortingFocusTraversalPolicy </item>\n\t\t\t<item> Soundbank </item>\n\t\t\t<item> SoundbankReader </item>\n\t\t\t<item> SoundbankResource </item>\n\t\t\t<item> Source </item>\n\t\t\t<item> SourceDataLine </item>\n\t\t\t<item> SourceLocator </item>\n\t\t\t<item> SpinnerDateModel </item>\n\t\t\t<item> SpinnerListModel </item>\n\t\t\t<item> SpinnerModel </item>\n\t\t\t<item> SpinnerNumberModel </item>\n\t\t\t<item> SpinnerUI </item>\n\t\t\t<item> SplitPaneUI </item>\n\t\t\t<item> Spring </item>\n\t\t\t<item> SpringLayout </item>\n\t\t\t<item> SpringLayout.Constraints </item>\n\t\t\t<item> SslRMIClientSocketFactory </item>\n\t\t\t<item> SslRMIServerSocketFactory </item>\n\t\t\t<item> Stack </item>\n\t\t\t<item> StackOverflowError </item>\n\t\t\t<item> StackTraceElement </item>\n\t\t\t<item> StandardMBean </item>\n\t\t\t<item> StartTlsRequest </item>\n\t\t\t<item> StartTlsResponse </item>\n\t\t\t<item> State </item>\n\t\t\t<item> StateEdit </item>\n\t\t\t<item> StateEditable </item>\n\t\t\t<item> StateFactory </item>\n\t\t\t<item> Statement </item>\n\t\t\t<item> Statement </item>\n\t\t\t<item> StreamCorruptedException </item>\n\t\t\t<item> StreamHandler </item>\n\t\t\t<item> StreamPrintService </item>\n\t\t\t<item> StreamPrintServiceFactory </item>\n\t\t\t<item> StreamResult </item>\n\t\t\t<item> StreamSource </item>\n\t\t\t<item> StreamTokenizer </item>\n\t\t\t<item> Streamable </item>\n\t\t\t<item> StreamableValue </item>\n\t\t\t<item> StrictMath </item>\n\t\t\t<item> String </item>\n\t\t\t<item> StringBuffer </item>\n\t\t\t<item> StringBufferInputStream </item>\n\t\t\t<item> StringBuilder </item>\n\t\t\t<item> StringCharacterIterator </item>\n\t\t\t<item> StringContent </item>\n\t\t\t<item> StringHolder </item>\n\t\t\t<item> StringIndexOutOfBoundsException </item>\n\t\t\t<item> StringMonitor </item>\n\t\t\t<item> StringMonitorMBean </item>\n\t\t\t<item> StringNameHelper </item>\n\t\t\t<item> StringReader </item>\n\t\t\t<item> StringRefAddr </item>\n\t\t\t<item> StringSelection </item>\n\t\t\t<item> StringSeqHelper </item>\n\t\t\t<item> StringSeqHolder </item>\n\t\t\t<item> StringTokenizer </item>\n\t\t\t<item> StringValueExp </item>\n\t\t\t<item> StringValueHelper </item>\n\t\t\t<item> StringWriter </item>\n\t\t\t<item> Stroke </item>\n\t\t\t<item> Struct </item>\n\t\t\t<item> StructMember </item>\n\t\t\t<item> StructMemberHelper </item>\n\t\t\t<item> Stub </item>\n\t\t\t<item> StubDelegate </item>\n\t\t\t<item> StubNotFoundException </item>\n\t\t\t<item> Style </item>\n\t\t\t<item> StyleConstants </item>\n\t\t\t<item> StyleConstants.CharacterConstants </item>\n\t\t\t<item> StyleConstants.ColorConstants </item>\n\t\t\t<item> StyleConstants.FontConstants </item>\n\t\t\t<item> StyleConstants.ParagraphConstants </item>\n\t\t\t<item> StyleContext </item>\n\t\t\t<item> StyleSheet </item>\n\t\t\t<item> StyleSheet.BoxPainter </item>\n\t\t\t<item> StyleSheet.ListPainter </item>\n\t\t\t<item> StyledDocument </item>\n\t\t\t<item> StyledEditorKit </item>\n\t\t\t<item> StyledEditorKit.AlignmentAction </item>\n\t\t\t<item> StyledEditorKit.BoldAction </item>\n\t\t\t<item> StyledEditorKit.FontFamilyAction </item>\n\t\t\t<item> StyledEditorKit.FontSizeAction </item>\n\t\t\t<item> StyledEditorKit.ForegroundAction </item>\n\t\t\t<item> StyledEditorKit.ItalicAction </item>\n\t\t\t<item> StyledEditorKit.StyledTextAction </item>\n\t\t\t<item> StyledEditorKit.UnderlineAction </item>\n\t\t\t<item> Subject </item>\n\t\t\t<item> SubjectDelegationPermission </item>\n\t\t\t<item> SubjectDomainCombiner </item>\n\t\t\t<item> SupportedValuesAttribute </item>\n\t\t\t<item> SuppressWarnings </item>\n\t\t\t<item> SwingConstants </item>\n\t\t\t<item> SwingPropertyChangeSupport </item>\n\t\t\t<item> SwingUtilities </item>\n\t\t\t<item> SyncFactory </item>\n\t\t\t<item> SyncFactoryException </item>\n\t\t\t<item> SyncFailedException </item>\n\t\t\t<item> SyncProvider </item>\n\t\t\t<item> SyncProviderException </item>\n\t\t\t<item> SyncResolver </item>\n\t\t\t<item> SyncScopeHelper </item>\n\t\t\t<item> SynchronousQueue </item>\n\t\t\t<item> SynthConstants </item>\n\t\t\t<item> SynthContext </item>\n\t\t\t<item> SynthGraphicsUtils </item>\n\t\t\t<item> SynthLookAndFeel </item>\n\t\t\t<item> SynthPainter </item>\n\t\t\t<item> SynthStyle </item>\n\t\t\t<item> SynthStyleFactory </item>\n\t\t\t<item> Synthesizer </item>\n\t\t\t<item> SysexMessage </item>\n\t\t\t<item> System </item>\n\t\t\t<item> SystemColor </item>\n\t\t\t<item> SystemException </item>\n\t\t\t<item> SystemFlavorMap </item>\n\t\t\t<item> TAG_ALTERNATE_IIOP_ADDRESS </item>\n\t\t\t<item> TAG_CODE_SETS </item>\n\t\t\t<item> TAG_INTERNET_IOP </item>\n\t\t\t<item> TAG_JAVA_CODEBASE </item>\n\t\t\t<item> TAG_MULTIPLE_COMPONENTS </item>\n\t\t\t<item> TAG_ORB_TYPE </item>\n\t\t\t<item> TAG_POLICIES </item>\n\t\t\t<item> TAG_RMI_CUSTOM_MAX_STREAM_FORMAT </item>\n\t\t\t<item> TCKind </item>\n\t\t\t<item> THREAD_POLICY_ID </item>\n\t\t\t<item> TIMEOUT </item>\n\t\t\t<item> TRANSACTION_MODE </item>\n\t\t\t<item> TRANSACTION_REQUIRED </item>\n\t\t\t<item> TRANSACTION_ROLLEDBACK </item>\n\t\t\t<item> TRANSACTION_UNAVAILABLE </item>\n\t\t\t<item> TRANSIENT </item>\n\t\t\t<item> TRANSPORT_RETRY </item>\n\t\t\t<item> TabExpander </item>\n\t\t\t<item> TabSet </item>\n\t\t\t<item> TabStop </item>\n\t\t\t<item> TabableView </item>\n\t\t\t<item> TabbedPaneUI </item>\n\t\t\t<item> TableCellEditor </item>\n\t\t\t<item> TableCellRenderer </item>\n\t\t\t<item> TableColumn </item>\n\t\t\t<item> TableColumnModel </item>\n\t\t\t<item> TableColumnModelEvent </item>\n\t\t\t<item> TableColumnModelListener </item>\n\t\t\t<item> TableHeaderUI </item>\n\t\t\t<item> TableModel </item>\n\t\t\t<item> TableModelEvent </item>\n\t\t\t<item> TableModelListener </item>\n\t\t\t<item> TableUI </item>\n\t\t\t<item> TableView </item>\n\t\t\t<item> TabularData </item>\n\t\t\t<item> TabularDataSupport </item>\n\t\t\t<item> TabularType </item>\n\t\t\t<item> TagElement </item>\n\t\t\t<item> TaggedComponent </item>\n\t\t\t<item> TaggedComponentHelper </item>\n\t\t\t<item> TaggedComponentHolder </item>\n\t\t\t<item> TaggedProfile </item>\n\t\t\t<item> TaggedProfileHelper </item>\n\t\t\t<item> TaggedProfileHolder </item>\n\t\t\t<item> Target </item>\n\t\t\t<item> TargetDataLine </item>\n\t\t\t<item> TargetedNotification </item>\n\t\t\t<item> Templates </item>\n\t\t\t<item> TemplatesHandler </item>\n\t\t\t<item> Text </item>\n\t\t\t<item> TextAction </item>\n\t\t\t<item> TextArea </item>\n\t\t\t<item> TextAttribute </item>\n\t\t\t<item> TextComponent </item>\n\t\t\t<item> TextEvent </item>\n\t\t\t<item> TextField </item>\n\t\t\t<item> TextHitInfo </item>\n\t\t\t<item> TextInputCallback </item>\n\t\t\t<item> TextLayout </item>\n\t\t\t<item> TextLayout.CaretPolicy </item>\n\t\t\t<item> TextListener </item>\n\t\t\t<item> TextMeasurer </item>\n\t\t\t<item> TextOutputCallback </item>\n\t\t\t<item> TextSyntax </item>\n\t\t\t<item> TextUI </item>\n\t\t\t<item> TexturePaint </item>\n\t\t\t<item> Thread </item>\n\t\t\t<item> Thread.State </item>\n\t\t\t<item> Thread.UncaughtExceptionHandler </item>\n\t\t\t<item> ThreadDeath </item>\n\t\t\t<item> ThreadFactory </item>\n\t\t\t<item> ThreadGroup </item>\n\t\t\t<item> ThreadInfo </item>\n\t\t\t<item> ThreadLocal </item>\n\t\t\t<item> ThreadMXBean </item>\n\t\t\t<item> ThreadPolicy </item>\n\t\t\t<item> ThreadPolicyOperations </item>\n\t\t\t<item> ThreadPolicyValue </item>\n\t\t\t<item> ThreadPoolExecutor </item>\n\t\t\t<item> ThreadPoolExecutor.AbortPolicy </item>\n\t\t\t<item> ThreadPoolExecutor.CallerRunsPolicy </item>\n\t\t\t<item> ThreadPoolExecutor.DiscardOldestPolicy </item>\n\t\t\t<item> ThreadPoolExecutor.DiscardPolicy </item>\n\t\t\t<item> Throwable </item>\n\t\t\t<item> Tie </item>\n\t\t\t<item> TileObserver </item>\n\t\t\t<item> Time </item>\n\t\t\t<item> TimeLimitExceededException </item>\n\t\t\t<item> TimeUnit </item>\n\t\t\t<item> TimeZone </item>\n\t\t\t<item> TimeoutException </item>\n\t\t\t<item> Timer </item>\n\t\t\t<item> Timer </item>\n\t\t\t<item> Timer </item>\n\t\t\t<item> TimerAlarmClockNotification </item>\n\t\t\t<item> TimerMBean </item>\n\t\t\t<item> TimerNotification </item>\n\t\t\t<item> TimerTask </item>\n\t\t\t<item> Timestamp </item>\n\t\t\t<item> Timestamp </item>\n\t\t\t<item> TitledBorder </item>\n\t\t\t<item> TooManyListenersException </item>\n\t\t\t<item> ToolBarUI </item>\n\t\t\t<item> ToolTipManager </item>\n\t\t\t<item> ToolTipUI </item>\n\t\t\t<item> Toolkit </item>\n\t\t\t<item> Track </item>\n\t\t\t<item> TransactionRequiredException </item>\n\t\t\t<item> TransactionRolledbackException </item>\n\t\t\t<item> TransactionService </item>\n\t\t\t<item> TransactionalWriter </item>\n\t\t\t<item> TransferHandler </item>\n\t\t\t<item> Transferable </item>\n\t\t\t<item> TransformAttribute </item>\n\t\t\t<item> Transformer </item>\n\t\t\t<item> TransformerConfigurationException </item>\n\t\t\t<item> TransformerException </item>\n\t\t\t<item> TransformerFactory </item>\n\t\t\t<item> TransformerFactoryConfigurationError </item>\n\t\t\t<item> TransformerHandler </item>\n\t\t\t<item> Transmitter </item>\n\t\t\t<item> Transparency </item>\n\t\t\t<item> TreeCellEditor </item>\n\t\t\t<item> TreeCellRenderer </item>\n\t\t\t<item> TreeExpansionEvent </item>\n\t\t\t<item> TreeExpansionListener </item>\n\t\t\t<item> TreeMap </item>\n\t\t\t<item> TreeModel </item>\n\t\t\t<item> TreeModelEvent </item>\n\t\t\t<item> TreeModelListener </item>\n\t\t\t<item> TreeNode </item>\n\t\t\t<item> TreePath </item>\n\t\t\t<item> TreeSelectionEvent </item>\n\t\t\t<item> TreeSelectionListener </item>\n\t\t\t<item> TreeSelectionModel </item>\n\t\t\t<item> TreeSet </item>\n\t\t\t<item> TreeUI </item>\n\t\t\t<item> TreeWillExpandListener </item>\n\t\t\t<item> TrustAnchor </item>\n\t\t\t<item> TrustManager </item>\n\t\t\t<item> TrustManagerFactory </item>\n\t\t\t<item> TrustManagerFactorySpi </item>\n\t\t\t<item> Type </item>\n\t\t\t<item> TypeCode </item>\n\t\t\t<item> TypeCodeHolder </item>\n\t\t\t<item> TypeInfo </item>\n\t\t\t<item> TypeInfoProvider </item>\n\t\t\t<item> TypeMismatch </item>\n\t\t\t<item> TypeMismatch </item>\n\t\t\t<item> TypeMismatch </item>\n\t\t\t<item> TypeMismatchHelper </item>\n\t\t\t<item> TypeMismatchHelper </item>\n\t\t\t<item> TypeNotPresentException </item>\n\t\t\t<item> TypeVariable </item>\n\t\t\t<item> Types </item>\n\t\t\t<item> UID </item>\n\t\t\t<item> UIDefaults </item>\n\t\t\t<item> UIDefaults.ActiveValue </item>\n\t\t\t<item> UIDefaults.LazyInputMap </item>\n\t\t\t<item> UIDefaults.LazyValue </item>\n\t\t\t<item> UIDefaults.ProxyLazyValue </item>\n\t\t\t<item> UIManager </item>\n\t\t\t<item> UIManager.LookAndFeelInfo </item>\n\t\t\t<item> UIResource </item>\n\t\t\t<item> ULongLongSeqHelper </item>\n\t\t\t<item> ULongLongSeqHolder </item>\n\t\t\t<item> ULongSeqHelper </item>\n\t\t\t<item> ULongSeqHolder </item>\n\t\t\t<item> UNKNOWN </item>\n\t\t\t<item> UNKNOWN </item>\n\t\t\t<item> UNSUPPORTED_POLICY </item>\n\t\t\t<item> UNSUPPORTED_POLICY_VALUE </item>\n\t\t\t<item> URI </item>\n\t\t\t<item> URIException </item>\n\t\t\t<item> URIResolver </item>\n\t\t\t<item> URISyntax </item>\n\t\t\t<item> URISyntaxException </item>\n\t\t\t<item> URL </item>\n\t\t\t<item> URLClassLoader </item>\n\t\t\t<item> URLConnection </item>\n\t\t\t<item> URLDecoder </item>\n\t\t\t<item> URLEncoder </item>\n\t\t\t<item> URLStreamHandler </item>\n\t\t\t<item> URLStreamHandlerFactory </item>\n\t\t\t<item> URLStringHelper </item>\n\t\t\t<item> USER_EXCEPTION </item>\n\t\t\t<item> UShortSeqHelper </item>\n\t\t\t<item> UShortSeqHolder </item>\n\t\t\t<item> UTFDataFormatException </item>\n\t\t\t<item> UUID </item>\n\t\t\t<item> UndeclaredThrowableException </item>\n\t\t\t<item> UndoManager </item>\n\t\t\t<item> UndoableEdit </item>\n\t\t\t<item> UndoableEditEvent </item>\n\t\t\t<item> UndoableEditListener </item>\n\t\t\t<item> UndoableEditSupport </item>\n\t\t\t<item> UnexpectedException </item>\n\t\t\t<item> UnicastRemoteObject </item>\n\t\t\t<item> UnionMember </item>\n\t\t\t<item> UnionMemberHelper </item>\n\t\t\t<item> UnknownEncoding </item>\n\t\t\t<item> UnknownEncodingHelper </item>\n\t\t\t<item> UnknownError </item>\n\t\t\t<item> UnknownException </item>\n\t\t\t<item> UnknownFormatConversionException </item>\n\t\t\t<item> UnknownFormatFlagsException </item>\n\t\t\t<item> UnknownGroupException </item>\n\t\t\t<item> UnknownHostException </item>\n\t\t\t<item> UnknownHostException </item>\n\t\t\t<item> UnknownObjectException </item>\n\t\t\t<item> UnknownServiceException </item>\n\t\t\t<item> UnknownUserException </item>\n\t\t\t<item> UnknownUserExceptionHelper </item>\n\t\t\t<item> UnknownUserExceptionHolder </item>\n\t\t\t<item> UnmappableCharacterException </item>\n\t\t\t<item> UnmarshalException </item>\n\t\t\t<item> UnmodifiableClassException </item>\n\t\t\t<item> UnmodifiableSetException </item>\n\t\t\t<item> UnrecoverableEntryException </item>\n\t\t\t<item> UnrecoverableKeyException </item>\n\t\t\t<item> Unreferenced </item>\n\t\t\t<item> UnresolvedAddressException </item>\n\t\t\t<item> UnresolvedPermission </item>\n\t\t\t<item> UnsatisfiedLinkError </item>\n\t\t\t<item> UnsolicitedNotification </item>\n\t\t\t<item> UnsolicitedNotificationEvent </item>\n\t\t\t<item> UnsolicitedNotificationListener </item>\n\t\t\t<item> UnsupportedAddressTypeException </item>\n\t\t\t<item> UnsupportedAudioFileException </item>\n\t\t\t<item> UnsupportedCallbackException </item>\n\t\t\t<item> UnsupportedCharsetException </item>\n\t\t\t<item> UnsupportedClassVersionError </item>\n\t\t\t<item> UnsupportedEncodingException </item>\n\t\t\t<item> UnsupportedFlavorException </item>\n\t\t\t<item> UnsupportedLookAndFeelException </item>\n\t\t\t<item> UnsupportedOperationException </item>\n\t\t\t<item> UserDataHandler </item>\n\t\t\t<item> UserException </item>\n\t\t\t<item> Util </item>\n\t\t\t<item> UtilDelegate </item>\n\t\t\t<item> Utilities </item>\n\t\t\t<item> VMID </item>\n\t\t\t<item> VM_ABSTRACT </item>\n\t\t\t<item> VM_CUSTOM </item>\n\t\t\t<item> VM_NONE </item>\n\t\t\t<item> VM_TRUNCATABLE </item>\n\t\t\t<item> Validator </item>\n\t\t\t<item> ValidatorHandler </item>\n\t\t\t<item> ValueBase </item>\n\t\t\t<item> ValueBaseHelper </item>\n\t\t\t<item> ValueBaseHolder </item>\n\t\t\t<item> ValueExp </item>\n\t\t\t<item> ValueFactory </item>\n\t\t\t<item> ValueHandler </item>\n\t\t\t<item> ValueHandlerMultiFormat </item>\n\t\t\t<item> ValueInputStream </item>\n\t\t\t<item> ValueMember </item>\n\t\t\t<item> ValueMemberHelper </item>\n\t\t\t<item> ValueOutputStream </item>\n\t\t\t<item> VariableHeightLayoutCache </item>\n\t\t\t<item> Vector </item>\n\t\t\t<item> VerifyError </item>\n\t\t\t<item> VersionSpecHelper </item>\n\t\t\t<item> VetoableChangeListener </item>\n\t\t\t<item> VetoableChangeListenerProxy </item>\n\t\t\t<item> VetoableChangeSupport </item>\n\t\t\t<item> View </item>\n\t\t\t<item> ViewFactory </item>\n\t\t\t<item> ViewportLayout </item>\n\t\t\t<item> ViewportUI </item>\n\t\t\t<item> VirtualMachineError </item>\n\t\t\t<item> Visibility </item>\n\t\t\t<item> VisibilityHelper </item>\n\t\t\t<item> VoiceStatus </item>\n\t\t\t<item> Void </item>\n\t\t\t<item> VolatileImage </item>\n\t\t\t<item> WCharSeqHelper </item>\n\t\t\t<item> WCharSeqHolder </item>\n\t\t\t<item> WStringSeqHelper </item>\n\t\t\t<item> WStringSeqHolder </item>\n\t\t\t<item> WStringValueHelper </item>\n\t\t\t<item> WeakHashMap </item>\n\t\t\t<item> WeakReference </item>\n\t\t\t<item> WebRowSet </item>\n\t\t\t<item> WildcardType </item>\n\t\t\t<item> Window </item>\n\t\t\t<item> WindowAdapter </item>\n\t\t\t<item> WindowConstants </item>\n\t\t\t<item> WindowEvent </item>\n\t\t\t<item> WindowFocusListener </item>\n\t\t\t<item> WindowListener </item>\n\t\t\t<item> WindowStateListener </item>\n\t\t\t<item> WrappedPlainView </item>\n\t\t\t<item> WritableByteChannel </item>\n\t\t\t<item> WritableRaster </item>\n\t\t\t<item> WritableRenderedImage </item>\n\t\t\t<item> WriteAbortedException </item>\n\t\t\t<item> Writer </item>\n\t\t\t<item> WrongAdapter </item>\n\t\t\t<item> WrongAdapterHelper </item>\n\t\t\t<item> WrongPolicy </item>\n\t\t\t<item> WrongPolicyHelper </item>\n\t\t\t<item> WrongTransaction </item>\n\t\t\t<item> WrongTransactionHelper </item>\n\t\t\t<item> WrongTransactionHolder </item>\n\t\t\t<item> X500Principal </item>\n\t\t\t<item> X500PrivateCredential </item>\n\t\t\t<item> X509CRL </item>\n\t\t\t<item> X509CRLEntry </item>\n\t\t\t<item> X509CRLSelector </item>\n\t\t\t<item> X509CertSelector </item>\n\t\t\t<item> X509Certificate </item>\n\t\t\t<item> X509Certificate </item>\n\t\t\t<item> X509EncodedKeySpec </item>\n\t\t\t<item> X509ExtendedKeyManager </item>\n\t\t\t<item> X509Extension </item>\n\t\t\t<item> X509KeyManager </item>\n\t\t\t<item> X509TrustManager </item>\n\t\t\t<item> XAConnection </item>\n\t\t\t<item> XADataSource </item>\n\t\t\t<item> XAException </item>\n\t\t\t<item> XAResource </item>\n\t\t\t<item> XMLConstants </item>\n\t\t\t<item> XMLDecoder </item>\n\t\t\t<item> XMLEncoder </item>\n\t\t\t<item> XMLFilter </item>\n\t\t\t<item> XMLFilterImpl </item>\n\t\t\t<item> XMLFormatter </item>\n\t\t\t<item> XMLGregorianCalendar </item>\n\t\t\t<item> XMLParseException </item>\n\t\t\t<item> XMLReader </item>\n\t\t\t<item> XMLReaderAdapter </item>\n\t\t\t<item> XMLReaderFactory </item>\n\t\t\t<item> XPath </item>\n\t\t\t<item> XPathConstants </item>\n\t\t\t<item> XPathException </item>\n\t\t\t<item> XPathExpression </item>\n\t\t\t<item> XPathExpressionException </item>\n\t\t\t<item> XPathFactory </item>\n\t\t\t<item> XPathFactoryConfigurationException </item>\n\t\t\t<item> XPathFunction </item>\n\t\t\t<item> XPathFunctionException </item>\n\t\t\t<item> XPathFunctionResolver </item>\n\t\t\t<item> XPathVariableResolver </item>\n\t\t\t<item> Xid </item>\n\t\t\t<item> XmlReader </item>\n\t\t\t<item> XmlWriter </item>\n\t\t\t<item> ZipEntry </item>\n\t\t\t<item> ZipException </item>\n\t\t\t<item> ZipFile </item>\n\t\t\t<item> ZipInputStream </item>\n\t\t\t<item> ZipOutputStream </item>\n\t\t\t<item> ZoneView </item>\n\t\t\t<item> _BindingIteratorImplBase </item>\n\t\t\t<item> _BindingIteratorStub </item>\n\t\t\t<item> _DynAnyFactoryStub </item>\n\t\t\t<item> _DynAnyStub </item>\n\t\t\t<item> _DynArrayStub </item>\n\t\t\t<item> _DynEnumStub </item>\n\t\t\t<item> _DynFixedStub </item>\n\t\t\t<item> _DynSequenceStub </item>\n\t\t\t<item> _DynStructStub </item>\n\t\t\t<item> _DynUnionStub </item>\n\t\t\t<item> _DynValueStub </item>\n\t\t\t<item> _IDLTypeStub </item>\n\t\t\t<item> _NamingContextExtStub </item>\n\t\t\t<item> _NamingContextImplBase </item>\n\t\t\t<item> _NamingContextStub </item>\n\t\t\t<item> _PolicyStub </item>\n\t\t\t<item> _Remote_Stub </item>\n\t\t\t<item> _ServantActivatorStub </item>\n\t\t\t<item> _ServantLocatorStub </item>\n\t\t\t\n<!-- \t\t\tnew classes of jdk 6.0 -->\n\n\t\t\t<item> AbstractAnnotationValueVisitor6 </item>\n\t\t\t<item> AbstractElementVisitor6 </item>\n\t\t\t<item> AbstractMarshallerImpl </item>\n\t\t\t<item> AbstractOwnableSynchronizer </item>\n\t\t\t<item> AbstractProcessor </item>\n\t\t\t<item> AbstractQueuedLongSynchronizer </item>\n\t\t\t<item> AbstractScriptEngine </item>\n\t\t\t<item> AbstractTypeVisitor6 </item>\n\t\t\t<item> AbstractUnmarshallerImpl </item>\n\t\t\t<item> ActivationDataFlavor </item>\n\t\t\t<item> AlgorithmMethod </item>\n\t\t\t<item> AnnotationMirror </item>\n\t\t\t<item> AnnotationValue </item>\n\t\t\t<item> AnnotationValueVisitor </item>\n\t\t\t<item> ArrayDeque </item>\n\t\t\t<item> AsyncHandler </item>\n\t\t\t<item> AttachmentMarshaller </item>\n\t\t\t<item> AttachmentPart </item>\n\t\t\t<item> AttachmentUnmarshaller </item>\n\t\t\t<item> Binder </item>\n\t\t\t<item> BindingProvider </item>\n\t\t\t<item> Bindings </item>\n\t\t\t<item> BlockingDeque </item>\n\t\t\t<item> BreakIteratorProvider </item>\n\t\t\t<item> C14NMethodParameterSpec </item>\n\t\t\t<item> CanonicalizationMethod </item>\n\t\t\t<item> Characters </item>\n\t\t\t<item> ClientInfoStatus </item>\n\t\t\t<item> CollapsedStringAdapter </item>\n\t\t\t<item> CollatorProvider </item>\n\t\t\t<item> CommandInfo </item>\n\t\t\t<item> CommandMap </item>\n\t\t\t<item> CommandObject </item>\n\t\t\t<item> CommonDataSource </item>\n\t\t\t<item> Compilable </item>\n\t\t\t<item> CompiledScript </item>\n\t\t\t<item> Completion </item>\n\t\t\t<item> Completions </item>\n\t\t\t<item> CompositeDataInvocationHandler </item>\n\t\t\t<item> CompositeDataView </item>\n\t\t\t<item> ConcurrentNavigableMap </item>\n\t\t\t<item> ConcurrentSkipListMap </item>\n\t\t\t<item> ConcurrentSkipListSet </item>\n\t\t\t<item> ConfigurationSpi </item>\n\t\t\t<item> Console </item>\n\t\t\t<item> ConstructorProperties </item>\n\t\t\t<item> CookieManager </item>\n\t\t\t<item> CookiePolicy </item>\n\t\t\t<item> CookieStore </item>\n\t\t\t<item> CurrencyNameProvider </item>\n\t\t\t<item> Data </item>\n\t\t\t<item> DataContentHandler </item>\n\t\t\t<item> DataContentHandlerFactory </item>\n\t\t\t<item> DataHandler </item>\n\t\t\t<item> DatatypeConverter </item>\n\t\t\t<item> DatatypeConverterInterface </item>\n\t\t\t<item> DateFormatProvider </item>\n\t\t\t<item> DateFormatSymbolsProvider </item>\n\t\t\t<item> DecimalFormatSymbolsProvider </item>\n\t\t\t<item> DeclaredType </item>\n\t\t\t<item> DefaultRowSorter </item>\n\t\t\t<item> DefaultValidationEventHandler </item>\n\t\t\t<item> DeflaterInputStream </item>\n\t\t\t<item> Deque </item>\n\t\t\t<item> DescriptorKey </item>\n\t\t\t<item> DescriptorRead </item>\n\t\t\t<item> Desktop </item>\n\t\t\t<item> Detail </item>\n\t\t\t<item> DetailEntry </item>\n\t\t\t<item> Diagnostic </item>\n\t\t\t<item> DiagnosticCollector </item>\n\t\t\t<item> DiagnosticListener </item>\n\t\t\t<item> DigestMethod </item>\n\t\t\t<item> DigestMethodParameterSpec </item>\n\t\t\t<item> Dispatch </item>\n\t\t\t<item> DOMCryptoContext </item>\n\t\t\t<item> DomHandler </item>\n\t\t\t<item> DOMSignContext </item>\n\t\t\t<item> DOMStructure </item>\n\t\t\t<item> DOMURIReference </item>\n\t\t\t<item> DOMValidateContext </item>\n\t\t\t<item> DropMode </item>\n\t\t\t<item> ElementFilter </item>\n\t\t\t<item> ElementKind </item>\n\t\t\t<item> ElementKindVisitor6 </item>\n\t\t\t<item> Elements </item>\n\t\t\t<item> ElementScanner6 </item>\n\t\t\t<item> ElementVisitor </item>\n\t\t\t<item> EndDocument </item>\n\t\t\t<item> EndElement </item>\n\t\t\t<item> Endpoint </item>\n\t\t\t<item> EntityDeclaration </item>\n\t\t\t<item> ErrorType </item>\n\t\t\t<item> EventException </item>\n\t\t\t<item> EventFilter </item>\n\t\t\t<item> EventReaderDelegate </item>\n\t\t\t<item> EventTarget </item>\n\t\t\t<item> ExcC14NParameterSpec </item>\n\t\t\t<item> ExecutableElement </item>\n\t\t\t<item> ExecutableType </item>\n\t\t\t<item> FileDataSource </item>\n\t\t\t<item> FileNameExtensionFilter </item>\n\t\t\t<item> FileObject </item>\n\t\t\t<item> Filer </item>\n\t\t\t<item> FilerException </item>\n\t\t\t<item> FileTypeMap </item>\n\t\t\t<item> ForwardingFileObject </item>\n\t\t\t<item> ForwardingJavaFileManager </item>\n\t\t\t<item> ForwardingJavaFileObject </item>\n\t\t\t<item> Generated </item>\n\t\t\t<item> GridBagLayoutInfo </item>\n\t\t\t<item> GroupLayout </item>\n\t\t\t<item> HandlerChain </item>\n\t\t\t<item> HandlerResolver </item>\n\t\t\t<item> HexBinaryAdapter </item>\n\t\t\t<item> HMACParameterSpec </item>\n\t\t\t<item> Holder </item>\n\t\t\t<item> HTTPBinding </item>\n\t\t\t<item> HttpCookie </item>\n\t\t\t<item> HTTPException </item>\n\t\t\t<item> IDN </item>\n\t\t\t<item> ImmutableDescriptor </item>\n\t\t\t<item> InflaterOutputStream </item>\n\t\t\t<item> InitParam </item>\n\t\t\t<item> InterfaceAddress </item>\n\t\t\t<item> Invocable </item>\n\t\t\t<item> IOError </item>\n\t\t\t<item> JavaCompiler </item>\n\t\t\t<item> JavaFileManager </item>\n\t\t\t<item> JavaFileObject </item>\n\t\t\t<item> JAXBContext </item>\n\t\t\t<item> JAXBElement </item>\n\t\t\t<item> JAXBException </item>\n\t\t\t<item> JAXBIntrospector </item>\n\t\t\t<item> JAXBResult </item>\n\t\t\t<item> JAXBSource </item>\n\t\t\t<item> JMX </item>\n\t\t\t<item> JMXAddressable </item>\n\t\t\t<item> KeyInfo </item>\n\t\t\t<item> KeyInfoFactory </item>\n\t\t\t<item> KeyName </item>\n\t\t\t<item> KeySelector </item>\n\t\t\t<item> KeySelectorException </item>\n\t\t\t<item> KeySelectorResult </item>\n\t\t\t<item> KeyValue </item>\n\t\t\t<item> LayoutPath </item>\n\t\t\t<item> LayoutStyle </item>\n\t\t\t<item> LinearGradientPaint </item>\n\t\t\t<item> LinkedBlockingDeque </item>\n\t\t\t<item> LocaleNameProvider </item>\n\t\t\t<item> LocaleServiceProvider </item>\n\t\t\t<item> Location </item>\n\t\t\t<item> LockInfo </item>\n\t\t\t<item> LogicalHandler </item>\n\t\t\t<item> LogicalMessage </item>\n\t\t\t<item> LogicalMessageContext </item>\n\t\t\t<item> MailcapCommandMap </item>\n\t\t\t<item> Marshaller </item>\n\t\t\t<item> MessageContext </item>\n\t\t\t<item> MessageFactory </item>\n\t\t\t<item> Messager </item>\n\t\t\t<item> MimeHeader </item>\n\t\t\t<item> MimeHeaders </item>\n\t\t\t<item> MimeType </item>\n\t\t\t<item> MimeTypeParameterList </item>\n\t\t\t<item> MimetypesFileTypeMap </item>\n\t\t\t<item> MirroredTypeException </item>\n\t\t\t<item> MirroredTypesException </item>\n\t\t\t<item> MLetContent </item>\n\t\t\t<item> MonitorInfo </item>\n\t\t\t<item> MultipleGradientPaint </item>\n\t\t\t<item> MutationEvent </item>\n\t\t\t<item> MXBean </item>\n\t\t\t<item> Namespace </item>\n\t\t\t<item> NavigableMap </item>\n\t\t\t<item> NavigableSet </item>\n\t\t\t<item> NClob </item>\n\t\t\t<item> NestingKind </item>\n\t\t\t<item> NodeSetData </item>\n\t\t\t<item> NormalizedStringAdapter </item>\n\t\t\t<item> Normalizer </item>\n\t\t\t<item> NoSuchMechanismException </item>\n\t\t\t<item> NotationDeclaration </item>\n\t\t\t<item> NotIdentifiableEvent </item>\n\t\t\t<item> NotIdentifiableEventImpl </item>\n\t\t\t<item> NoType </item>\n\t\t\t<item> NullType </item>\n\t\t\t<item> NumberFormatProvider </item>\n\t\t\t<item> OctetStreamData </item>\n\t\t\t<item> Oneway </item>\n\t\t\t<item> OptionChecker </item>\n\t\t\t<item> PackageElement </item>\n\t\t\t<item> ParseConversionEvent </item>\n\t\t\t<item> ParseConversionEventImpl </item>\n\t\t\t<item> Path2D </item>\n\t\t\t<item> PGPData </item>\n\t\t\t<item> PolicySpi </item>\n\t\t\t<item> PortInfo </item>\n\t\t\t<item> PostConstruct </item>\n\t\t\t<item> PreDestroy </item>\n\t\t\t<item> PrimitiveType </item>\n\t\t\t<item> PrintConversionEvent </item>\n\t\t\t<item> PrintConversionEventImpl </item>\n\t\t\t<item> ProcessingEnvironment </item>\n\t\t\t<item> Processor </item>\n\t\t\t<item> PropertyException </item>\n\t\t\t<item> RadialGradientPaint </item>\n\t\t\t<item> ReferenceType </item>\n\t\t\t<item> RequestWrapper </item>\n\t\t\t<item> Resource </item>\n\t\t\t<item> Resources </item>\n\t\t\t<item> Response </item>\n\t\t\t<item> ResponseWrapper </item>\n\t\t\t<item> RetrievalMethod </item>\n\t\t\t<item> RoundEnvironment </item>\n\t\t\t<item> RowFilter </item>\n\t\t\t<item> RowId </item>\n\t\t\t<item> RowIdLifetime </item>\n\t\t\t<item> RowSorter </item>\n\t\t\t<item> RowSorterEvent </item>\n\t\t\t<item> RowSorterListener </item>\n\t\t\t<item> RunnableFuture </item>\n\t\t\t<item> RunnableScheduledFuture </item>\n\t\t\t<item> SAAJMetaFactory </item>\n\t\t\t<item> SAAJResult </item>\n\t\t\t<item> SchemaOutputResolver </item>\n\t\t\t<item> ScriptContext </item>\n\t\t\t<item> ScriptEngine </item>\n\t\t\t<item> ScriptEngineFactory </item>\n\t\t\t<item> ScriptEngineManager </item>\n\t\t\t<item> ScriptException </item>\n\t\t\t<item> Service </item>\n\t\t\t<item> ServiceConfigurationError </item>\n\t\t\t<item> ServiceDelegate </item>\n\t\t\t<item> ServiceLoader </item>\n\t\t\t<item> ServiceMode </item>\n\t\t\t<item> SignatureMethod </item>\n\t\t\t<item> SignatureMethodParameterSpec </item>\n\t\t\t<item> SignatureProperties </item>\n\t\t\t<item> SignatureProperty </item>\n\t\t\t<item> SignedInfo </item>\n\t\t\t<item> SimpleAnnotationValueVisitor6 </item>\n\t\t\t<item> SimpleBindings </item>\n\t\t\t<item> SimpleElementVisitor6 </item>\n\t\t\t<item> SimpleJavaFileObject </item>\n\t\t\t<item> SimpleScriptContext </item>\n\t\t\t<item> SimpleTypeVisitor6 </item>\n\t\t\t<item> SOAPBinding </item>\n\t\t\t<item> SOAPBinding </item>\n\t\t\t<item> SOAPBody </item>\n\t\t\t<item> SOAPBodyElement </item>\n\t\t\t<item> SOAPConnection </item>\n\t\t\t<item> SOAPConnectionFactory </item>\n\t\t\t<item> SOAPConstants </item>\n\t\t\t<item> SOAPElement </item>\n\t\t\t<item> SOAPElementFactory </item>\n\t\t\t<item> SOAPEnvelope </item>\n\t\t\t<item> SOAPException </item>\n\t\t\t<item> SOAPFactory </item>\n\t\t\t<item> SOAPFault </item>\n\t\t\t<item> SOAPFaultElement </item>\n\t\t\t<item> SOAPFaultException </item>\n\t\t\t<item> SOAPHandler </item>\n\t\t\t<item> SOAPHeader </item>\n\t\t\t<item> SOAPHeaderElement </item>\n\t\t\t<item> SOAPMessage </item>\n\t\t\t<item> SOAPMessageContext </item>\n\t\t\t<item> SOAPMessageHandler </item>\n\t\t\t<item> SOAPMessageHandlers </item>\n\t\t\t<item> SOAPPart </item>\n\t\t\t<item> SortOrder </item>\n\t\t\t<item> SourceVersion </item>\n\t\t\t<item> SplashScreen </item>\n\t\t\t<item> SQLClientInfoException </item>\n\t\t\t<item> SQLDataException </item>\n\t\t\t<item> SQLFeatureNotSupportedException </item>\n\t\t\t<item> SQLIntegrityConstraintViolationException </item>\n\t\t\t<item> SQLInvalidAuthorizationSpecException </item>\n\t\t\t<item> SQLNonTransientConnectionException </item>\n\t\t\t<item> SQLNonTransientException </item>\n\t\t\t<item> SQLRecoverableException </item>\n\t\t\t<item> SQLSyntaxErrorException </item>\n\t\t\t<item> SQLTimeoutException </item>\n\t\t\t<item> SQLTransactionRollbackException </item>\n\t\t\t<item> SQLTransientConnectionException </item>\n\t\t\t<item> SQLTransientException </item>\n\t\t\t<item> SQLXML </item>\n\t\t\t<item> SSLParameters </item>\n\t\t\t<item> StandardEmitterMBean </item>\n\t\t\t<item> StandardJavaFileManager </item>\n\t\t\t<item> StandardLocation </item>\n\t\t\t<item> StartDocument </item>\n\t\t\t<item> StartElement </item>\n\t\t\t<item> StatementEvent </item>\n\t\t\t<item> StatementEventListener </item>\n\t\t\t<item> StAXResult </item>\n\t\t\t<item> StAXSource </item>\n\t\t\t<item> StreamFilter </item>\n\t\t\t<item> StreamReaderDelegate </item>\n\t\t\t<item> SupportedAnnotationTypes </item>\n\t\t\t<item> SupportedOptions </item>\n\t\t\t<item> SupportedSourceVersion </item>\n\t\t\t<item> SwingWorker </item>\n\t\t\t<item> SystemTray </item>\n\t\t\t<item> TableRowSorter </item>\n\t\t\t<item> TableStringConverter </item>\n\t\t\t<item> TimeZoneNameProvider </item>\n\t\t\t<item> Tool </item>\n\t\t\t<item> ToolProvider </item>\n\t\t\t<item> Transform </item>\n\t\t\t<item> TransformException </item>\n\t\t\t<item> TransformParameterSpec </item>\n\t\t\t<item> TransformService </item>\n\t\t\t<item> TrayIcon </item>\n\t\t\t<item> TypeConstraintException </item>\n\t\t\t<item> TypeElement </item>\n\t\t\t<item> TypeKind </item>\n\t\t\t<item> TypeKindVisitor6 </item>\n\t\t\t<item> TypeMirror </item>\n\t\t\t<item> TypeParameterElement </item>\n\t\t\t<item> TypeVisitor </item>\n\t\t\t<item> UIEvent </item>\n\t\t\t<item> UnknownAnnotationValueException </item>\n\t\t\t<item> UnknownElementException </item>\n\t\t\t<item> UnknownTypeException </item>\n\t\t\t<item> Unmarshaller </item>\n\t\t\t<item> UnmarshallerHandler </item>\n\t\t\t<item> UnsupportedDataTypeException </item>\n\t\t\t<item> URIDereferencer </item>\n\t\t\t<item> URIParameter </item>\n\t\t\t<item> URIReference </item>\n\t\t\t<item> URIReferenceException </item>\n\t\t\t<item> URLDataSource </item>\n\t\t\t<item> ValidationEvent </item>\n\t\t\t<item> ValidationEventCollector </item>\n\t\t\t<item> ValidationEventHandler </item>\n\t\t\t<item> ValidationEventImpl </item>\n\t\t\t<item> ValidationEventLocator </item>\n\t\t\t<item> ValidationEventLocatorImpl </item>\n\t\t\t<item> ValidationException </item>\n\t\t\t<item> VariableElement </item>\n\t\t\t<item> W3CDomHandler </item>\n\t\t\t<item> WebEndpoint </item>\n\t\t\t<item> WebFault </item>\n\t\t\t<item> WebMethod </item>\n\t\t\t<item> WebParam </item>\n\t\t\t<item> WebResult </item>\n\t\t\t<item> WebService </item>\n\t\t\t<item> WebServiceClient </item>\n\t\t\t<item> WebServiceContext </item>\n\t\t\t<item> WebServiceException </item>\n\t\t\t<item> WebServicePermission </item>\n\t\t\t<item> WebServiceProvider </item>\n\t\t\t<item> WebServiceRef </item>\n\t\t\t<item> WebServiceRefs </item>\n\t\t\t<item> Wrapper </item>\n\t\t\t<item> X509Data </item>\n\t\t\t<item> X509IssuerSerial </item>\n\t\t\t<item> XmlAccessOrder </item>\n\t\t\t<item> XmlAccessorOrder </item>\n\t\t\t<item> XmlAccessorType </item>\n\t\t\t<item> XmlAccessType </item>\n\t\t\t<item> XmlAdapter </item>\n\t\t\t<item> XmlAnyAttribute </item>\n\t\t\t<item> XmlAnyElement </item>\n\t\t\t<item> XmlAttachmentRef </item>\n\t\t\t<item> XmlAttribute </item>\n\t\t\t<item> XMLCryptoContext </item>\n\t\t\t<item> XmlElement </item>\n\t\t\t<item> XmlElementDecl </item>\n\t\t\t<item> XmlElementRef </item>\n\t\t\t<item> XmlElementRefs </item>\n\t\t\t<item> XmlElements </item>\n\t\t\t<item> XmlElementWrapper </item>\n\t\t\t<item> XmlEnum </item>\n\t\t\t<item> XmlEnumValue </item>\n\t\t\t<item> XMLEvent </item>\n\t\t\t<item> XMLEventAllocator </item>\n\t\t\t<item> XMLEventConsumer </item>\n\t\t\t<item> XMLEventFactory </item>\n\t\t\t<item> XMLEventReader </item>\n\t\t\t<item> XMLEventWriter </item>\n\t\t\t<item> XmlID </item>\n\t\t\t<item> XmlIDREF </item>\n\t\t\t<item> XmlInlineBinaryData </item>\n\t\t\t<item> XMLInputFactory </item>\n\t\t\t<item> XmlJavaTypeAdapter </item>\n\t\t\t<item> XmlJavaTypeAdapters </item>\n\t\t\t<item> XmlList </item>\n\t\t\t<item> XmlMimeType </item>\n\t\t\t<item> XmlMixed </item>\n\t\t\t<item> XmlNs </item>\n\t\t\t<item> XmlNsForm </item>\n\t\t\t<item> XMLObject </item>\n\t\t\t<item> XMLOutputFactory </item>\n\t\t\t<item> XmlRegistry </item>\n\t\t\t<item> XMLReporter </item>\n\t\t\t<item> XMLResolver </item>\n\t\t\t<item> XmlRootElement </item>\n\t\t\t<item> XmlSchema </item>\n\t\t\t<item> XmlSchemaType </item>\n\t\t\t<item> XmlSchemaTypes </item>\n\t\t\t<item> XMLSignature </item>\n\t\t\t<item> XMLSignatureException </item>\n\t\t\t<item> XMLSignatureFactory </item>\n\t\t\t<item> XMLSignContext </item>\n\t\t\t<item> XMLStreamConstants </item>\n\t\t\t<item> XMLStreamException </item>\n\t\t\t<item> XMLStreamReader </item>\n\t\t\t<item> XMLStreamWriter </item>\n\t\t\t<item> XMLStructure </item>\n\t\t\t<item> XmlTransient </item>\n\t\t\t<item> XmlType </item>\n\t\t\t<item> XMLValidateContext </item>\n\t\t\t<item> XmlValue </item>\n\t\t\t<item> XPathFilter2ParameterSpec </item>\n\t\t\t<item> XPathFilterParameterSpec </item>\n\t\t\t<item> XPathType </item>\n\t\t\t<item> XSLTTransformParameterSpec </item>\n\t\t\t<item> ZipError </item>\n\t\t\t\n<!-- \t\t\tend new classes -->\n\t\t</list>\n\t\t<list name=\"keywords\">\n\t\t\t<item> abstract </item>\n\t\t\t<item> break </item>\n\t\t\t<item> case </item>\n\t\t\t<item> catch </item>\n\t\t\t<item> class </item>\n\t\t\t<item> continue </item>\n\t\t\t<item> default </item>\n\t\t\t<item> do </item>\n\t\t\t<item> else </item>\n\t\t\t<item> enum </item>\n\t\t\t<item> extends </item>\n\t\t\t<item> false </item>\n\t\t\t<item> finally </item>\n\t\t\t<item> for </item>\n\t\t\t<item> goto </item>\n\t\t\t<item> if </item>\n\t\t\t<item> implements </item>\n\t\t\t<item> instanceof </item>\n\t\t\t<item> @interface </item>\n\t\t\t<item> interface </item>\n\t\t\t<item> native </item>\n\t\t\t<item> new </item>\n\t\t\t<item> null </item>\n\t\t\t<item> private </item>\n\t\t\t<item> protected </item>\n\t\t\t<item> public </item>\n\t\t\t<item> return </item>\n\t\t\t<item> super </item>\n\t\t\t<item> strictfp </item>\n\t\t\t<item> switch </item>\n\t\t\t<item> synchronized </item>\n\t\t\t<item> this </item>\n\t\t\t<item> throws </item>\n\t\t\t<item> throw </item>\n\t\t\t<item> transient </item>\n\t\t\t<item> true </item>\n\t\t\t<item> try </item>\n\t\t\t<item> volatile </item>\n\t\t\t<item> while </item>\n\t\t</list>\n\t\t<list name=\"types\">\n\t\t\t<item> boolean </item>\n\t\t\t<item> byte </item>\n\t\t\t<item> char </item>\n\t\t\t<item> const </item>\n\t\t\t<item> double </item>\n\t\t\t<item> final </item>\n\t\t\t<item> float </item>\n\t\t\t<item> int </item>\n\t\t\t<item> long </item>\n\t\t\t<item> short </item>\n\t\t\t<item> static </item>\n\t\t\t<item> void </item>\n\t\t</list>\n\t\t<contexts>\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Normal\">\n\t\t\t\t<!-- Comment next line if you don't use Javadoc tool -->\n\t\t\t\t<IncludeRules context=\"##Javadoc\"/>\n\t\t\t\t<keyword attribute=\"Keyword\" context=\"#stay\" String=\"keywords\"/>\n\t\t\t\t<keyword attribute=\"Data Type\" context=\"#stay\" String=\"types\"/>\n\t\t\t\t<keyword attribute=\"Java15\" context=\"#stay\" String=\"java15\"/>\n\t\t\t\t<Float attribute=\"Float\" context=\"#stay\">\n\t\t\t\t\t<AnyChar String=\"fF\" attribute=\"Float\" context=\"#stay\"/>\n\t\t\t\t</Float>\n\t\t\t\t<HlCOct attribute=\"Octal\" context=\"#stay\"/>\n\t\t\t\t<HlCHex attribute=\"Hex\" context=\"#stay\"/>\n\t\t\t\t<Int attribute=\"Decimal\" context=\"#stay\">\n\t\t\t\t\t<StringDetect attribute=\"Decimal\" context=\"#stay\" String=\"L\" insensitive=\"TRUE\"/>\n\t\t\t\t</Int>\n\t\t\t\t<HlCChar attribute=\"Char\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"Char\" context=\"#stay\" String=\"'\\\\u[0-9a-fA-F]{4}'\"/>\n\t\t\t\t<RegExpr attribute=\"Decimal\" context=\"#stay\" String=\"//\\s*BEGIN.*$\" beginRegion=\"Region1\"/>\n\t\t\t\t<RegExpr attribute=\"Decimal\" context=\"#stay\" String=\"//\\s*END.*$\" endRegion=\"Region1\"/>\n\t\t\t\t<DetectChar attribute=\"String\" context=\"String\" char=\"&quot;\"/>\n\t\t\t\t<RegExpr attribute=\"Function\" context=\"EnterPrintf\" String=\"\\.(format|printf)\\b\"/>\n\t\t\t\t<Detect2Chars attribute=\"Comment\" context=\"Commentar 1\" char=\"/\" char1=\"/\"/>\n\t\t\t\t<Detect2Chars attribute=\"Comment\" context=\"Commentar 2\" char=\"/\" char1=\"*\" beginRegion=\"Comment\"/>\n\t\t\t\t<DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"{\" beginRegion=\"Brace1\"/>\n\t\t\t\t<DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"}\" endRegion=\"Brace1\"/>\n\t\t\t\t<RegExpr attribute=\"Keyword\" context=\"#stay\" String=\"\\.{3,3}\\s+\" />\n\t\t\t\t<RegExpr attribute=\"Keyword\" context=\"StaticImports\" String=\"\\b(import\\s+static)\\b\" />\n\t\t\t\t<RegExpr attribute=\"Keyword\" context=\"Imports\" String=\"\\b(package|import)\\b\" />\n\t\t\t\t<RegExpr attribute=\"Function\" context=\"#stay\" String=\"\\b[_\\w][_\\w\\d]*(?=[\\s]*(/\\*\\s*\\d+\\s*\\*/\\s*)?[(])\" />\n\t\t\t\t<RegExpr attribute=\"Annotation\" context=\"#stay\" String=\"@[_\\w][_\\w\\d]*\" />\n\t\t\t\t<RegExpr attribute=\"Symbol\" context=\"Member\" String=\"[.]{1,1}\" />\n\t\t\t\t<DetectChar attribute=\"Symbol\" context=\"InFunctionCall\" char=\"(\"/>\n\t\t\t\t<AnyChar attribute=\"Symbol\" context=\"#stay\" String=\":!%&amp;+,-/.*&lt;=&gt;?[]|~^&#59;\"/>\n\t\t\t</context>\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"InFunctionCall\">\n\t\t\t\t<IncludeRules context=\"Normal\"/>\n\t\t\t\t<DetectChar attribute=\"Symbol\" context=\"#pop\" char=\")\"/>\n\t\t\t</context>\n\t\t\t<context attribute=\"String\" lineEndContext=\"#pop\" name=\"String\">\n\t\t\t\t<LineContinue attribute=\"String\" context=\"#stay\"/>\n\t\t\t\t<HlCStringChar attribute=\"String Char\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"String Char\" context=\"#stay\" String=\"\\\\u[0-9a-fA-F]{4}\"/>\n\t\t\t\t<DetectChar attribute=\"String\" context=\"#pop\" char=\"&quot;\"/>\n\t\t\t</context>\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"EnterPrintf\" fallthrough=\"true\" fallthroughContext=\"#pop\">\n\t\t\t\t<DetectChar attribute=\"Symbol\" context=\"Printf\" char=\"(\"/>\n\t\t\t\t<DetectSpaces attribute=\"Normal Text\" context=\"#stay\"/>\n\t\t\t</context>\n\t\t\t<context attribute=\"Printf\" lineEndContext=\"#stay\" name=\"Printf\">\n\t\t\t\t<DetectChar attribute=\"String\" context=\"PrintfString\" char=\"&quot;\"/>\n\t\t\t\t<IncludeRules context=\"InFunctionCall\"/>\n\t\t\t</context>\n\t\t\t<context attribute=\"PrintfString\" lineEndContext=\"#pop\" name=\"PrintfString\">\n\t\t\t\t<LineContinue attribute=\"String\" context=\"#stay\"/>\n\t\t\t\t<HlCStringChar attribute=\"String Char\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"String\" context=\"#pop\" char=\"&quot;\"/>\n\t\t\t\t<RegExpr attribute=\"String Char\" context=\"#stay\" String=\"%(\\d+\\$)?(-|#|\\+|\\ |0|,|\\()*\\d*(\\.\\d+)?[a-hosxA-CEGHSX]\" />\n\t\t\t\t<RegExpr attribute=\"String Char\" context=\"#stay\" String=\"%(\\d+\\$)?(-|#|\\+|\\ |0|,|\\()*\\d*(t|T)(a|A|b|B|c|C|d|D|e|F|h|H|I|j|k|l|L|m|M|N|p|P|Q|r|R|s|S|T|y|Y|z|Z)\" />\n\t\t\t\t<RegExpr attribute=\"String Char\" context=\"#stay\" String=\"%(%|n)\" />\n\t\t\t</context>\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"Member\" fallthrough=\"true\" fallthroughContext=\"#pop\">\n\t\t\t\t<RegExpr attribute=\"Function\" context=\"#pop\" String=\"\\b[_a-zA-Z]\\w*(?=[\\s]*)\" />\n\t\t\t</context>\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"StaticImports\">\n\t\t\t\t<RegExpr attribute=\"StaticImports\" context=\"#pop\" String=\"\\s*.*;\" />\n\t\t\t</context>\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"Imports\">\n\t\t\t\t<RegExpr attribute=\"Imports\" context=\"#pop\" String=\"\\s*.*;\" />\n\t\t\t</context>\n\t\t\t<context attribute=\"Comment\" lineEndContext=\"#pop\" name=\"Commentar 1\"/>\n\t\t\t<context attribute=\"Comment\" lineEndContext=\"#stay\" name=\"Commentar 2\">\n\t\t\t\t<Detect2Chars attribute=\"Comment\" context=\"#pop\" char=\"*\" char1=\"/\" endRegion=\"Comment\"/>\n\t\t\t</context>\n\t\t</contexts>\n\t\t<itemDatas>\n\t\t\t<itemData name=\"Normal Text\"  defStyleNum=\"dsNormal\"/>\n\t\t\t<itemData name=\"Keyword\"      defStyleNum=\"dsKeyword\"/>\n\t\t\t<itemData name=\"Annotation\"   defStyleNum=\"dsFunction\"/>\n\t\t\t<itemData name=\"Function\"     defStyleNum=\"dsFunction\"/>\n\t\t\t<itemData name=\"StaticImports\"      defStyleNum=\"dsKeyword\" color=\"#800080\" selColor=\"#FFFFFF\" bold=\"0\" italic=\"0\"/>\n\t\t\t<itemData name=\"Imports\"      defStyleNum=\"dsKeyword\" color=\"#808000\" selColor=\"#FFFFFF\" bold=\"0\" italic=\"0\"/>\n\t\t\t<itemData name=\"Data Type\"    defStyleNum=\"dsDataType\"/>\n\t\t\t<itemData name=\"Decimal\"      defStyleNum=\"dsDecVal\"/>\n\t\t\t<itemData name=\"Octal\"        defStyleNum=\"dsBaseN\"/>\n\t\t\t<itemData name=\"Hex\"          defStyleNum=\"dsBaseN\"/>\n\t\t\t<itemData name=\"Float\"        defStyleNum=\"dsFloat\"/>\n\t\t\t<itemData name=\"Char\"         defStyleNum=\"dsChar\"/>\n\t\t\t<itemData name=\"String\"       defStyleNum=\"dsString\"/>\n\t\t\t<itemData name=\"String Char\"  defStyleNum=\"dsChar\"/>\n\t\t\t<itemData name=\"PrintfString\" defStyleNum=\"dsString\"/>\n\t\t\t<itemData name=\"Comment\"      defStyleNum=\"dsComment\"/>\n\t\t\t<itemData name=\"Symbol\"       defStyleNum=\"dsNormal\"/>\n\t\t\t<itemData name=\"Java15\"       defStyleNum=\"dsNormal\" color=\"#0095FF\" selColor=\"#FFFFFF\" bold=\"1\" italic=\"0\"/>\n\t\t</itemDatas>\n\t</highlighting>\n\t<general>\n\t\t<comments>\n\t\t\t<comment name=\"singleLine\" start=\"//\"/>\n\t\t\t<comment name=\"multiLine\" start=\"/*\" end=\"*/\"/>\n\t\t</comments>\n\t\t<keywords casesensitive=\"1\"/>\n\t</general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/javadoc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<language name=\"Javadoc\" version=\"1.04\" kateversion=\"2.4\" section=\"Markup\" extensions=\"\" license=\"LGPL\" author=\"Alfredo Luiz Foltran Fialho (alfoltran@ig.com.br)\">\n\t<highlighting>\n\t\t<contexts>\n\t\t\t<context name=\"Start\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n\t\t\t\t<IncludeRules context=\"FindJavadoc\" />\n\t\t\t</context>\n\t\t\t<context name=\"FindJavadoc\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n\t\t\t\t<StringDetect attribute=\"JavadocFS\" context=\"#stay\" String=\"/**/\"/>\n\t\t\t\t<StringDetect attribute=\"JavadocFS\" context=\"JavadocFSar\" String=\"/**\" beginRegion=\"Javadoc\"/>\n\t\t\t</context>\n\t\t\t<context attribute=\"JavadocFS\" lineEndContext=\"#stay\" name=\"JavadocFSar\">\n\t\t\t\t<Detect2Chars attribute=\"JavadocFS\" context=\"#pop\" char=\"*\" char1=\"/\" endRegion=\"Javadoc\"/>\n\t\t\t\t<RegExpr attribute=\"JavadocFS\" context=\"Javadocar\" String=\"(!|\\?)\" />\n\t\t\t\t<RegExpr attribute=\"JavadocFS\" context=\"Javadocar\" String=\"(\\.\\s*$)\" />\n\t\t\t\t<RegExpr attribute=\"JavadocFS\" context=\"Javadocar\" String=\"(\\.\\s)(?![\\da-z])\" />\n\t\t\t\t<RegExpr attribute=\"JavadocFS\" context=\"Javadocar\" String=\"\\**\\s*(?=@(author|deprecated|exception|param|return|see|serial|serialData|serialField|since|throws|version)(\\s|$))\" firstNonSpace=\"true\"/>\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"LiteralTagar\" String=\"{@code \" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"LiteralTagar\" String=\"{@code&#009;\" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"#stay\" String=\"{@docRoot}\" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"#stay\" String=\"{@inheritDoc}\" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"InlineTagar\" String=\"{@link \" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"InlineTagar\" String=\"{@link&#009;\" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"InlineTagar\" String=\"{@linkplain \" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"InlineTagar\" String=\"{@linkplain&#009;\" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"LiteralTagar\" String=\"{@literal \" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"LiteralTagar\" String=\"{@literal&#009;\" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"#stay\" String=\"{@value}\" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"InlineTagar\" String=\"{@value \" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"InlineTagar\" String=\"{@value&#009;\" />\n\t\t\t\t<IncludeRules context=\"##HTML\"/>\n\t\t\t</context>\n\t\t\t<context attribute=\"Javadoc\" lineEndContext=\"#stay\" name=\"Javadocar\">\n\t\t\t\t<Detect2Chars attribute=\"JavadocFS\" context=\"#pop#pop\" char=\"*\" char1=\"/\" endRegion=\"Javadoc\"/>\n\t\t\t\t<RegExpr attribute=\"JavadocFS\" context=\"#stay\" String=\"\\*+(?!/)\" firstNonSpace=\"true\"/>\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"#stay\" String=\"@author \" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"#stay\" String=\"@deprecated \" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"JavadocParam\" String=\"@exception \" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"JavadocParam\" String=\"@param \" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"#stay\" String=\"@return \" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"SeeTag\" String=\"@see \"/>\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"#stay\" String=\"@serial \" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"#stay\" String=\"@serialData \" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"#stay\" String=\"@serialField \" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"#stay\" String=\"@since \" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"JavadocParam\" String=\"@throws \" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"#stay\" String=\"@version \" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"#stay\" String=\"@author&#009;\" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"#stay\" String=\"@deprecated&#009;\" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"JavadocParam\" String=\"@exception&#009;\" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"JavadocParam\" String=\"@param&#009;\" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"#stay\" String=\"@return&#009;\" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"SeeTag\" String=\"@see&#009;\" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"#stay\" String=\"@serial&#009;\" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"#stay\" String=\"@serialData&#009;\" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"#stay\" String=\"@serialField&#009;\" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"#stay\" String=\"@since&#009;\" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"JavadocParam\" String=\"@throws&#009;\" />\n\t\t\t\t<StringDetect attribute=\"BlockTag\" context=\"#stay\" String=\"@version&#009;\" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"LiteralTagar\" String=\"{@code \" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"LiteralTagar\" String=\"{@code&#009;\" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"#stay\" String=\"{@docRoot}\" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"#stay\" String=\"{@inheritDoc}\" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"InlineTagar\" String=\"{@link \" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"InlineTagar\" String=\"{@link&#009;\" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"InlineTagar\" String=\"{@linkplain \" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"InlineTagar\" String=\"{@linkplain&#009;\" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"LiteralTagar\" String=\"{@literal \" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"LiteralTagar\" String=\"{@literal&#009;\" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"#stay\" String=\"{@value}\" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"InlineTagar\" String=\"{@value \" />\n\t\t\t\t<StringDetect attribute=\"InlineTag\" context=\"InlineTagar\" String=\"{@value&#009;\" />\n\t\t\t\t<IncludeRules context=\"##HTML\"/>\n\t\t\t</context>\n\t\t\t<context attribute=\"Javadoc\" lineEndContext=\"#pop\" name=\"JavadocParam\">\n\t\t\t\t<DetectSpaces />\n\t\t\t\t<RegExpr attribute=\"JavadocParam\" context=\"#pop#pop\" String=\"\\S*(?=\\*/)\" />\n\t\t\t\t<RegExpr attribute=\"JavadocParam\" context=\"#pop\" String=\"\\S*(\\s|$)\" />\n\t\t\t</context>\n\t\t\t<context attribute=\"InlineTag\" name=\"InlineTagar\">\n\t\t\t\t<DetectChar attribute=\"InlineTag\" context=\"#pop\" char=\"}\" />\n\t\t\t\t<Detect2Chars attribute=\"JavadocFS\" context=\"#pop#pop#pop\" char=\"*\" char1=\"/\" />\n\t\t\t\t<IncludeRules context=\"##HTML\"/>\n\t\t\t</context>\n\t\t\t<context attribute=\"InlineTag\" name=\"LiteralTagar\">\n\t\t\t\t<DetectChar attribute=\"InlineTag\" context=\"#pop\" char=\"}\" />\n\t\t\t\t<Detect2Chars attribute=\"JavadocFS\" context=\"#pop#pop#pop\" char=\"*\" char1=\"/\" />\n\t\t\t</context>\n\t\t\t<context attribute=\"SeeTag\" lineEndContext=\"#pop\" name=\"SeeTag\">\n\t\t\t\t<Detect2Chars attribute=\"JavadocFS\" context=\"#pop#pop#pop\" char=\"*\" char1=\"/\" />\n\t\t\t\t<IncludeRules context=\"##HTML\"/>\n\t\t\t</context>\n\t\t</contexts>\n\t\t<itemDatas>\n\t\t\t<itemData name=\"Normal Text\"  defStyleNum=\"dsNormal\"/>\n\t\t\t<itemData name=\"BlockTag\"     defStyleNum=\"dsKeyword\" color=\"#808080\" selColor=\"#FFFFFF\" bold=\"1\" italic=\"0\"/>\n\t\t\t<itemData name=\"InlineTag\"    defStyleNum=\"dsKeyword\" color=\"#808080\" selColor=\"#FFFFFF\" bold=\"0\" italic=\"0\"/>\n\t\t\t<itemData name=\"JavadocParam\" defStyleNum=\"dsKeyword\" color=\"#008080\" selColor=\"#FFFFFF\" bold=\"0\" italic=\"1\"/>\n\t\t\t<itemData name=\"SeeTag\"       defStyleNum=\"dsKeyword\" color=\"#008080\" selColor=\"#FFFFFF\" bold=\"0\" italic=\"1\"/>\n\t\t\t<itemData name=\"JavadocFS\"    defStyleNum=\"dsComment\" color=\"#008000\" selColor=\"#FFFFFF\" bold=\"1\" italic=\"0\"/>\n\t\t\t<itemData name=\"Javadoc\"      defStyleNum=\"dsComment\" color=\"#008000\" selColor=\"#FFFFFF\"/>\n\t\t</itemDatas>\n\t</highlighting>\n\t<general>\n\t\t<keywords casesensitive=\"1\"/>\n\t</general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/javascript.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<!-- Author: Anders Lund <anders@alweb.dk> //-->\n<!-- Minor changes: Joseph Wenninger <jowenn@kde.org> //-->\n<!-- Full JavaScript 1.0 support by Whitehawk Stormchaser //-->\n<language name=\"JavaScript\" version=\"1.18\" kateversion=\"2.4\" section=\"Scripts\" extensions=\"*.js\"\n          mimetype=\"text/x-javascript;application/x-javascript\" indenter=\"cstyle\"\n          author=\"Anders Lund (anders@alweb.dk), Joseph Wenninger (jowenn@kde.org), Whitehawk Stormchaser (zerokode@gmx.net)\" license=\"\">\n  <highlighting>\n    <list name=\"keywords\">\n        <item> if </item>\n        <item> else </item>\n        <item> for </item>\n        <item> in </item>\n        <item> while </item>\n        <item> do </item>\n        <item> continue </item>\n        <item> break </item>\n        <item> with </item>\n        <item> try </item>\n        <item> catch </item>\n        <item> finally </item>\n        <item> switch </item>\n        <item> case </item>\n        <item> new </item>\n        <item> var </item>\n        <item> function </item>\n        <item> return </item>\n        <item> delete </item>\n        <item> true </item>\n        <item> false </item>\n        <item> void </item>\n        <item> throw </item>\n        <item> typeof </item>\n        <item> const </item>\n        <item> default </item>\n    </list>\n    <list name=\"functions\">\n        <item> escape </item>\n        <item> isFinite </item>\n        <item> isNaN </item>\n        <item> Number </item>\n        <item> parseFloat </item>\n        <item> parseInt </item>\n        <item> reload </item>\n        <item> taint </item>\n        <item> unescape </item>\n        <item> untaint </item>\n        <item> write </item>\n        </list>\n    <list name=\"objects\">\n        <item>Anchor</item>\n        <item>Applet</item>\n        <item>Area</item>\n        <item>Array</item>\n        <item>Boolean</item>\n        <item>Button</item>\n        <item>Checkbox</item>\n        <item>Date</item>\n        <item>document</item>\n        <item>window</item>\n        <item>Image</item>\n        <item>FileUpload</item>\n        <item>Form</item>\n        <item>Frame</item>\n        <item>Function</item>\n        <item>Hidden</item>\n        <item>Link</item>\n        <item>MimeType</item>\n        <item>Math</item>\n        <item>Max</item>\n        <item>Min</item>\n        <item>Layer</item>\n        <item>navigator</item>\n        <item>Object</item>\n        <item>Password</item>\n        <item>Plugin</item>\n        <item>Radio</item>\n        <item>RegExp</item>\n        <item>Reset</item>\n        <item>Screen</item>\n        <item>Select</item>\n        <item>String</item>\n        <item>Text</item>\n        <item>Textarea</item>\n        <item>this</item>\n        <item>Window</item>\n        </list>\n    <list name=\"math\">\n        <item> abs </item>\n        <item> acos </item>\n        <item> asin </item>\n        <item> atan </item>\n        <item> atan2 </item>\n        <item> ceil </item>\n        <item> cos </item>\n        <item> ctg </item>\n        <item> E </item>\n        <item> exp </item>\n        <item> floor </item>\n        <item> LN2 </item>\n        <item> LN10 </item>\n        <item> log </item>\n        <item> LOG2E </item>\n        <item> LOG10E </item>\n        <item> PI </item>\n        <item> pow </item>\n        <item> round </item>\n        <item> sin </item>\n        <item> sqrt </item>\n        <item> SQRT1_2 </item>\n        <item> SQRT2 </item>\n        <item> tan </item>\n    </list>\n    <list name=\"events\">\n         <item>onAbort</item>\n         <item>onBlur</item>\n         <item>onChange</item>\n         <item>onClick</item>\n         <item>onError</item>\n         <item>onFocus</item>\n         <item>onLoad</item>\n         <item>onMouseOut</item>\n         <item>onMouseOver</item>\n         <item>onReset</item>\n         <item>onSelect</item>\n         <item>onSubmit</item>\n         <item>onUnload</item>\n    </list>\n    <contexts>\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Normal\">\n\t<DetectSpaces/>\n        <StringDetect attribute=\"Region Marker\" context=\"region_marker\" String=\"//BEGIN\" beginRegion=\"Region1\"/>\n        <StringDetect attribute=\"Region Marker\" context=\"region_marker\" String=\"//END\" endRegion=\"Region1\"/>\n        <Float attribute=\"Float\" context=\"#stay\" />\n        <Int attribute=\"Decimal\" context=\"#stay\" />\n        <RegExpr attribute=\"JSON\" context=\"#stay\" String=\"\\b[\\w\\.]+\\b\\s*(?=:)\" />\n\n        <keyword attribute=\"Keyword\" context=\"#stay\" String=\"keywords\" />\n        <keyword attribute=\"Function\" context=\"#stay\" String=\"functions\" />\n        <keyword attribute=\"Objects\" context=\"#stay\" String=\"objects\" />\n        <keyword attribute=\"Math\" context=\"#stay\" String=\"math\" />\n        <keyword attribute=\"Events\" context=\"#stay\" String=\"events\" />\n\n        <DetectChar context=\"ObjectMember\" char=\".\" />\n        <RegExpr attribute=\"Objects\" context=\"ObjectMember\" String=\"\\b[\\w\\.]+(?=\\.)\" />\n\n\t<DetectIdentifier/>\n        <DetectChar attribute=\"String\" context=\"String\" char=\"&quot;\"/>\n        <DetectChar attribute=\"String Char\" context=\"String 1\" char=\"'\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"Comment\" char=\"/\" char1=\"/\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"Multi/inline Comment\" char=\"/\" char1=\"*\" beginRegion=\"Comment\"/>\n        <RegExpr attribute=\"Normal Text\" context=\"(Internal regex catch)\" String=\"[=?:]\" />\n        <RegExpr attribute=\"Normal Text\" context=\"(Internal regex catch)\" String=\"\\(\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"{\" beginRegion=\"Brace1\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"}\" endRegion=\"Brace1\" />\n        <AnyChar attribute=\"Symbol\" context=\"#stay\" String=\":!%&amp;+,-/.*&lt;=&gt;?[]|~^&#59;\"/>\n      </context>\n\n      <context attribute=\"String\" lineEndContext=\"#pop\" name=\"String\">\n\t<DetectIdentifier/>\n        <HlCStringChar attribute=\"String Char\" context=\"#stay\"/>\n        <LineContinue attribute=\"String\" context=\"#stay\"/>\n        <DetectChar attribute=\"String\" context=\"#pop\" char=\"&quot;\"/>\n      </context>\n      <context attribute=\"String Char\" lineEndContext=\"#pop\" name=\"String 1\">\n        <DetectIdentifier/>\n        <HlCStringChar attribute=\"String Char\" context=\"#stay\"/>\n        <LineContinue attribute=\"String\" context=\"#stay\"/>\n        <DetectChar attribute=\"String Char\" context=\"#pop\" char=\"'\"/>\n      </context>\n\n      <context attribute=\"Comment\" lineEndContext=\"#pop\" name=\"Comment\">\n        <DetectSpaces />\n        <IncludeRules context=\"##Alerts\" />\n        <DetectIdentifier />\n      </context>\n      <context attribute=\"Comment\" lineEndContext=\"#stay\" name=\"Multi/inline Comment\">\n        <IncludeRules context=\"##Alerts\" />\n        <Detect2Chars attribute=\"Comment\" context=\"#pop\" char=\"*\" char1=\"/\" endRegion=\"Comment\"/>\n      </context>\n\n      <context attribute=\"Regular Expression\" lineEndContext=\"#stay\" name=\"Regular Expression\">\n        <RegExpr attribute=\"Regular Expression\" context=\"#pop#pop#pop\" String=\"/[ig]{0,2}\" />\n        <RegExpr attribute=\"Pattern Internal Operator\" context=\"#stay\" String=\"\\{[\\d, ]+\\}\" />\n        <RegExpr attribute=\"Pattern Internal Operator\" context=\"#stay\" String=\"\\\\[bB]\" />\n        <RegExpr attribute=\"Pattern Character Class\" context=\"#stay\" String=\"\\\\[nrtvfDdSsWw]\" />\n        <DetectChar attribute=\"Pattern Character Class\" context=\"(charclass caret first check)\" char=\"[\" />\n        <RegExpr attribute=\"Pattern Internal Operator\" context=\"#stay\" String=\"\\\\.\" />\n        <RegExpr attribute=\"Pattern Internal Operator\" context=\"#stay\" String=\"\\$(?=/)\" />\n        <AnyChar attribute=\"Pattern Internal Operator\" context=\"#stay\" String=\"?+*()|\" />\n      </context>\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"(Internal regex catch)\" fallthrough=\"true\" fallthroughContext=\"#pop\">\n        <RegExpr attribute=\"Normal Text\" context=\"#stay\" String=\"\\s*\" />\n        <RegExpr attribute=\"Regular Expression\" context=\"#pop\" String=\"//(?=;)\" />\n        <Detect2Chars attribute=\"Comment\" context=\"Comment\" char=\"/\" char1=\"/\" />\n        <Detect2Chars attribute=\"Comment\" context=\"Multi/inline Comment\" char=\"/\" char1=\"*\" />\n        <DetectChar attribute=\"Regular Expression\" context=\"(regex caret first check)\" char=\"/\" />\n      </context>\n      <context attribute=\"Pattern Character Class\" lineEndContext=\"#stay\" name=\"Regular Expression Character Class\">\n        <RegExpr attribute=\"Pattern Character Class\" context=\"#stay\" String=\"\\\\[\\[\\]]\" />\n        <RegExpr attribute=\"Pattern Internal Operator\" context=\"#stay\" String=\"\\\\.\" />\n        <DetectChar attribute=\"Pattern Character Class\" context=\"#pop#pop\" char=\"]\" />\n      </context>\n      <context attribute=\"Pattern Internal Operator\" lineEndContext=\"#pop\" name=\"(regex caret first check)\" fallthrough=\"true\" fallthroughContext=\"Regular Expression\">\n        <DetectChar attribute=\"Pattern Internal Operator\" context=\"Regular Expression\" char=\"^\" />\n      </context>\n      <context attribute=\"Pattern Internal Operator\" lineEndContext=\"#pop\" name=\"(charclass caret first check)\" fallthrough=\"true\" fallthroughContext=\"Regular Expression Character Class\">\n        <DetectChar attribute=\"Pattern Internal Operator\" context=\"Regular Expression Character Class\" char=\"^\" />\n      </context>\n\n      <context name=\"region_marker\" attribute=\"Region Marker\" lineEndContext=\"#pop\" >\n\t<DetectIdentifier />\n\t<DetectSpaces />\n      </context>\n\n      <context name=\"ObjectMember\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n        <DetectChar context=\"#stay\" char=\".\" />\n        <DetectIdentifier attribute=\"Object Member\" />\n        <DetectSpaces context=\"#pop\" />\n        <AnyChar lookAhead=\"true\" context=\"#pop\" String=\"(){}:!%&amp;+,-/.*&lt;=&gt;?[]|~^&#59;\"/>\n      </context>\n    </contexts>\n    <itemDatas>\n      <itemData name=\"Normal Text\"  defStyleNum=\"dsNormal\"  spellChecking=\"false\"/>\n      <itemData name=\"Keyword\"      defStyleNum=\"dsKeyword\" spellChecking=\"false\"/>\n      <itemData name=\"Function\" defStyleNum=\"dsFunction\" spellChecking=\"false\"/>\n      <itemData name=\"Objects\" defStyleNum=\"dsKeyword\" color=\"#008000\" selColor=\"#00ffff\" bold=\"0\" italic=\"0\" spellChecking=\"false\"/>\n      <itemData name=\"Object Member\" defStyleNum=\"dsFunction\" spellChecking=\"false\"/>\n      <itemData name=\"Math\" defStyleNum=\"dsKeyword\" color=\"#DBA716\" selColor=\"#00ffff\" bold=\"0\" italic=\"0\" spellChecking=\"false\"/>\n      <itemData name=\"Events\" defStyleNum=\"dsKeyword\" color=\"#F766D5\" selColor=\"#00ffff\" bold=\"0\" italic=\"0\" spellChecking=\"false\"/>\n      <itemData name=\"Decimal\"      defStyleNum=\"dsDecVal\" spellChecking=\"false\"/>\n      <itemData name=\"Float\"        defStyleNum=\"dsFloat\" spellChecking=\"false\"/>\n      <itemData name=\"Char\"         defStyleNum=\"dsChar\" spellChecking=\"false\"/>\n      <itemData name=\"String\"       defStyleNum=\"dsString\"/>\n      <itemData name=\"String Char\"  defStyleNum=\"dsChar\" spellChecking=\"false\"/>\n      <itemData name=\"Comment\"      defStyleNum=\"dsComment\"/>\n      <itemData name=\"Symbol\"       defStyleNum=\"dsNormal\" spellChecking=\"false\"/>\n      <itemData name=\"Regular Expression\" defStyleNum=\"dsOthers\" spellChecking=\"false\"/>\n      <itemData name=\"Pattern Internal Operator\" defStyleNum=\"dsFloat\" spellChecking=\"false\"/>\n      <itemData name=\"Pattern Character Class\" defStyleNum=\"dsBaseN\" spellChecking=\"false\"/>\n      <itemData name=\"Region Marker\" defStyleNum=\"dsRegionMarker\" spellChecking=\"false\"/>\n      <itemData name=\"JSON\" defStyleNum=\"dsDataType\" spellChecking=\"false\"/>\n    </itemDatas>\n  </highlighting>\n  <general>\n    <comments>\n      <comment name=\"singleLine\" start=\"//\" />\n      <comment name=\"multiLine\" start=\"/*\" end=\"*/\" />\n    </comments>\n    <keywords casesensitive=\"1\" />\n  </general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/json.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<!--\n ***************************************************************************\n ** Writing a Kate Highlighting XML File\n ** http://kate-editor.org/article/writing_a_kate_highlighting_xml_file\n **\n ** Introducing JSON\n ** http://www.json.org/\n **\n ** The application/json Media Type for JavaScript Object Notation (JSON)\n ** http://tools.ietf.org/html/rfc4627\n ***************************************************************************\n-->\n<language name=\"JSON\" section=\"Markup\" version=\"1.2\" kateversion=\"2.3\" extensions=\"*.json\" mimetype=\"application/json\" author=\"Sebastian Pipping (sebastian@pipping.org)\" license=\"GPL\">\n  <highlighting>\n    <list name=\"Constants\">\n      <item>null</item>\n      <item>true</item>\n      <item>false</item>\n    </list>\n\n    <contexts>\n      <context name=\"Normal\" lineEndContext=\"#stay\" attribute=\"Style_Error\">\n        <DetectChar char=\"{\"       context=\"Pair\" beginRegion=\"Region_Object\" attribute=\"Style_Seperator_Pair\" />\n        <DetectChar char=\"[\"       context=\"Array\" beginRegion=\"Region_Array\" attribute=\"Style_Seperator_Array\" />\n\n        <DetectSpaces context=\"#stay\" attribute=\"Style_Normal\" />\n      </context>\n\n      <context name=\"Pair\" lineEndContext=\"#stay\" attribute=\"Style_Error\">\n        <DetectChar char=\"&quot;\"  context=\"String_Key\" attribute=\"Style_String_Key\" />\n        <DetectChar char=\":\"       context=\"Value\" attribute=\"Style_Seperator_Pair\" />\n        <DetectChar char=\"}\"       context=\"#pop\" endRegion=\"Region_Object\" attribute=\"Style_Seperator_Pair\" />\n        <DetectChar char=\",\"       context=\"#stay\" attribute=\"Style_Seperator_Pair\" />\n\n        <DetectSpaces context=\"#stay\" attribute=\"Style_Normal\" />\n      </context>\n\n      <context name=\"String_Key\" lineEndContext=\"#stay\" attribute=\"Style_String_Key\">\n        <DetectChar char=\"&quot;\"  context=\"#pop\" attribute=\"Style_String_Key\" />\n        <RegExpr String=\"\\\\(?:[&quot;\\\\/bfnrt]|u[0-9a-fA-f]{4})\" context=\"#stay\" insensitive=\"false\" minimal=\"false\" attribute=\"Style_String_Key_Char\" />\n      </context>\n\n      <context name=\"Value\" lineEndContext=\"#stay\" attribute=\"Style_Error\" >\n        <DetectChar char=\"&quot;\"  context=\"String_Value\" attribute=\"Style_String_Value\" />\n        <DetectChar char=\"{\"       context=\"Pair\" beginRegion=\"Region_Object\" attribute=\"Style_Seperator_Pair\" />\n        <DetectChar char=\"[\"       context=\"Array\" beginRegion=\"Region_Array\" attribute=\"Style_Seperator_Array\" />\n        <DetectChar char=\"}\"       context=\"#pop\" lookAhead=\"true\" />\n        <DetectChar char=\",\"       context=\"#pop\" lookAhead=\"true\" />\n\n        <DetectSpaces context=\"#stay\" attribute=\"Style_Normal\" />\n\n        <keyword String=\"Constants\" context=\"#stay\" attribute=\"Style_Keyword\" />\n\n        <RegExpr String=\"-?(?:[0-9]|[1-9][0-9]+)\\.[0-9]+(?:[eE][+-]?[0-9]+)?\" context=\"#stay\" insensitive=\"false\" minimal=\"false\" attribute=\"Style_Float\" />\n        <RegExpr String=\"-?(?:[0-9]|[1-9][0-9]+)(?:[eE][+-]?[0-9]+)?\" context=\"#stay\" insensitive=\"false\" minimal=\"false\" attribute=\"Style_Decimal\" />\n      </context>\n\n      <context name=\"String_Value\" lineEndContext=\"#stay\" attribute=\"Style_String_Value\">\n        <DetectChar char=\"&quot;\"  context=\"#pop\" attribute=\"Style_String_Value\" />\n        <RegExpr String=\"\\\\(?:[&quot;\\\\/bfnrt]|u[0-9a-fA-f]{4})\" context=\"#stay\" insensitive=\"false\" minimal=\"false\" attribute=\"Style_String_Value_Char\" />\n      </context>\n\n      <context name=\"Array\" lineEndContext=\"#stay\" attribute=\"Style_Error\">\n        <DetectChar char=\",\"       context=\"#stay\" attribute=\"Style_Seperator_Array\" />\n        <DetectChar char=\"]\"       context=\"#pop\" endRegion=\"Region_Array\" attribute=\"Style_Seperator_Array\" />\n\n        <DetectChar char=\"{\"       context=\"Pair\" beginRegion=\"Region_Object\" attribute=\"Style_Seperator_Pair\" />\n        <DetectChar char=\"[\"       context=\"Array\" beginRegion=\"Region_Array\" attribute=\"Style_Seperator_Array\" />\n        <DetectChar char=\"&quot;\"  context=\"String_Value\" attribute=\"Style_String_Value\" />\n\n        <DetectSpaces context=\"#stay\" attribute=\"Style_Normal\" />\n\n        <keyword String=\"Constants\" context=\"#stay\" attribute=\"Style_Keyword\" />\n\n        <RegExpr String=\"-?(?:[0-9]|[1-9][0-9]+)\\.[0-9]+(?:[eE][+-]?[0-9]+)?\" context=\"#stay\" insensitive=\"false\" minimal=\"false\" attribute=\"Style_Float\" />\n        <RegExpr String=\"-?(?:[0-9]|[1-9][0-9]+)(?:[eE][+-]?[0-9]+)?\" context=\"#stay\" insensitive=\"false\" minimal=\"false\" attribute=\"Style_Decimal\" />\n      </context>\n    </contexts>\n\n    <itemDatas>\n      <itemData name=\"Style_Normal\"             defStyleNum=\"dsNormal\" />\n\n      <itemData name=\"Style_Seperator_Pair\"     defStyleNum=\"dsNormal\" bold=\"1\" />\n      <itemData name=\"Style_Seperator_Array\"    defStyleNum=\"dsNormal\" bold=\"1\" />\n\n      <itemData name=\"Style_Decimal\"            defStyleNum=\"dsDecVal\" />\n      <itemData name=\"Style_Float\"              defStyleNum=\"dsFloat\" />\n      <itemData name=\"Style_String_Key\"         defStyleNum=\"dsDataType\" />\n      <itemData name=\"Style_String_Value\"       defStyleNum=\"dsString\" />\n      <itemData name=\"Style_String_Key_Char\"    defStyleNum=\"dsDataType\" underline=\"1\" />\n      <itemData name=\"Style_String_Value_Char\"  defStyleNum=\"dsString\" underline=\"1\" />\n\n      <itemData name=\"Style_Keyword\"            defStyleNum=\"dsDecVal\" bold=\"1\" />\n\n      <itemData name=\"Style_Error\"              defStyleNum=\"dsError\" />\n    </itemDatas>\n  </highlighting>\n</language>\n<!--\n// kate: space-indent on; indent-width 2; replace-tabs on;\n-->\n\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/katehelp.md",
    "content": "Kate Default Styles\n===================\n\n**kate standard:**\n\n\tdsNormal\n\tdsVisualWhitespace\n\tdsKeyword\n\tdsDataType\n\tdsDecimal\n\tdsBaseN\n\tdsFloat\n\tdsChar\n\tdsString\n\tdsComment\n\tdsAlert\n\tdsError\n\tdsFunction\n\tdsRegionMarker\n\tdsOthers\n\n**liteide extension:**\n\n\tdsSymbol\n\tdsBuiltinFunc\n\tdsPredeclared\n\tdsFuncDecl\n\tdsPlaceholder\n\tdsToDo\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/language.dtd",
    "content": "<!--\n        Copyright (c) 2001 Joseph Wenninger <jowenn@kde.org>\n        modified (c) 2002 Anders Lund <anders@alweb.dk>\n        modified (c) 2003 Simon Huerlimann <simon.huerlimann@access.unizh.ch>\n        modified (c) 2005 Dominik Haumann <dhdev@gmx.de>\n        modified (c) 2008 Wilbert Berendsen <info@wilbertberendsen.nl>\n\n        This file describes the XML format used for syntax highlight descriptions\n        for the Kate text editor (http://kate.kde.org), which is part of the KDE\n        desktop environment (http://www.kde.org).\n        You'll find the \"Writing a Kate Highlighting XML File HOWTO\" at\n        http://kate.kde.org/doc/hlhowto.php\n\n        This format is identified using the SYSTEM identifier\n        SYSTEM \"language.dtd\"\n\n        Files using this format should include a DOCTYPE declaration like this:\n        <!DOCTYPE language SYSTEM \"language.dtd\">\n\n        You can validate your syntax files using checkXML from the development\n        package of kdelibs:\n         checkXML yourSyntax.xml\n        If you see any 'validity error' lines, you should fix them. If you get\n        a lot of 'No template matches' lines, everything's just fine. You've\n        produced a valid syntax file!\n\n        It's also possible to use the (much faster) xmllint which comes with the\n        GNOME (oops:-) XML Library libxml2:\n\n         xmllint - -dtdvalid language.dtd yourSyntax.xml\n\t (don't use a space between the two - That's just because XML\n         comments don't allow that:-(\n\n        To use your syntax file, copy it to .kde/share/apps/katepart/syntax/ in\n        your home directory. You have to open a new instance of kwrite/kate to use\n        the new syntax file.\n\nTODO\n  - find a more readable way for the - -dtdvalid stuff, it's just annoying\n    xml comments don't allow it.\n-->\n\n<!-- Entity declarations\n  You can use '&per;' instead of '.'. This seems to be useful in <item> elements.\n\nTODO\n  - Are there any more such pre-defined entities?\n-->\n<!ENTITY per \".\" >\n\n<!-- Boolean type\n  Attributes that are of type boolean allow the following values:\n  'true', 'TRUE' and '1' all meaning true,\n  'false', FALSE' and '0' all meaning false.\n\n  It is encouraged to use 'true' and 'false' instead of the alternatives.\n-->\n<!ENTITY % boolean \"true|false|TRUE|FALSE|0|1\">\n\n<!-- Default Styles\n  Allowed predefined default styles for itemData, available are:\n    - dsNormal,   used for normal text\n    - dsKeyword,  used for keywords\n    - dsDataType, used for data types\n    - dsDecVal,   used for decimal values\n    - dsBaseN,    used for values with a base other than 10\n    - dsFloat,    used for float values\n    - dsChar,     used for a character\n    - dsString,   used for strings\n    - dsComment,  used for comments\n    - dsOthers,   used for 'other' things\n    - dsAlert,    used for warning messages\n    - dsFunction, used for function calls\n    - dsRegionMarker, used for region markers\n    - dsError,    used for error highlighting.\n-->\n<!ENTITY % defStyles \"dsNormal|dsKeyword|dsDataType|dsDecVal|dsBaseN|dsFloat|dsChar|dsString|dsComment|dsOthers|dsAlert|dsFunction|dsRegionMarker|dsError\">\n\n<!-- Language specification\n  name:        The name of this syntax description. Used in the Highlightning Mode menu\n  section:     The logical group to which this syntax description belongs. Used for sub menus\n  extensions:  A file glob or pattern to decide for which documents to use this syntax description\n  style:       Attribute style that this highlighter provides to kate scripts [optional]\n  mimetype:    A list of mimetypes to decide for which documents to use this syntax description [optional]\n  version:     Version number of this syntax description [optional]\n  kateversion: Kate version required for using this file [optional]\n  casesensitive: Whether text is matched case sensitive. [boolean, optional, default=true] FIXME: This is not implemented yet\n  priority:    Priority of this language, if more than one are usable for the file [optional]\n  author:      Name of author of this hl file [optional]\n  license:     License for this hl file [optional]\n  indenter:    Name of the Indenter to use for this highlighting mode per default, like \"cstyle\" [optional]\n  hidden:      Should it be hidden in menu [boolean, optional, default=false]\n\nTODO\n  - Which matches are affected by casesensitive? keyword, RegExpr, StringDetect, WordDetect...?\n\nWARNING: due to helper scripts, the language opening tag must be on a\n*single line* and *cannot* be split in multiple lines.\n\n-->\n<!ELEMENT language (highlighting, general?, spellchecking?)>\n<!ATTLIST language\n  name          CDATA       #REQUIRED\n  section       NMTOKEN     #REQUIRED\n  extensions    CDATA       #REQUIRED\n  version       CDATA       #REQUIRED\n  kateversion   CDATA       #REQUIRED\n  style         CDATA       #IMPLIED\n  mimetype      CDATA       #IMPLIED\n  casesensitive (%boolean;) #IMPLIED\n  priority      CDATA       #IMPLIED\n  author        CDATA       #IMPLIED\n  license       CDATA       #IMPLIED\n  indenter      CDATA       #IMPLIED\n  hidden        (%boolean;) #IMPLIED\n>\n\n<!-- General options -->\n<!ELEMENT general (folding|comments|keywords|indentation|emptyLines)*>\n\n<!-- List of folding\n  indentationsensitive: If true, the code folding is indentation based.\n-->\n<!ELEMENT folding EMPTY>\n<!ATTLIST folding\n  indentationsensitive (%boolean;) #IMPLIED\n>\n\n<!-- List of comments -->\n<!ELEMENT comments (comment)+>\n\n<!-- Comment specification\n  name:         Type of this comment. Allowed are 'singleLine' and 'multiLine'\n  start:        The comment starts with this string\n  end:          The comment ends with this string [optional]\n  region:       The region name of the foldable multiline comment. If you have\n                beginRegion=\"Comment\" ... endRegion=\"Comment\" you should use\n                region=\"Comment\". This way uncomment works even if you do not\n                select all the text of the multiline comment.\n  position:     only availalbe for type singleLine. Default is column0, to insert\n                the single line comment characters after the whitespaces\n                (= before the first non space) set position to \"afterwhitespace\"\n-->\n<!ELEMENT comment EMPTY>\n<!ATTLIST comment\n  name      (singleLine|multiLine)  #REQUIRED\n  start     CDATA                   #REQUIRED\n  end       CDATA                   #IMPLIED\n  region    CDATA                   #IMPLIED\n  position  (afterwhitespace)       #IMPLIED\n>\n\n<!-- Keyword options\n  casesensitive:        Whether keywords are matched case sensitive. [boolean, optional, default=true]\n  weakDeliminator:      Add weak deliminators [optional, default: \"\"]\n  additionalDeliminator: Add deliminators [optional]\n  wordWrapDeliminator:  characters that are used to wrap long lines [optional]\n\n-->\n<!ELEMENT keywords EMPTY>\n<!ATTLIST keywords\n  casesensitive         (%boolean;) #IMPLIED\n  weakDeliminator       CDATA       #IMPLIED\n  additionalDeliminator CDATA       #IMPLIED\n  wordWrapDeliminator   CDATA       #IMPLIED\n>\n\n<!-- Indentation options\n  mode:        indentation mode to use\n\nTODO\n  - Explain (weak) deliminators\n-->\n<!ELEMENT indentation EMPTY>\n<!ATTLIST indentation\n  mode         CDATA   #IMPLIED\n>\n\n<!-- Treat lines that match a given regular expression as empty line. This is\n  needed for example in Python for comments (#...), as then the indentation\n  based folding should ignore the line.\n  This is only implemented for indentation based folding. If the folding\n  is not indentation based, the emptyLines are not used.\n-->\n<!ELEMENT emptyLines (emptyLine*)>\n\n<!-- One empty line regular expression.\n  regexpr:       The regular expression, example from python: ^\\s*#.*$\n  casesensitive: Sets, whether the regular expression match is performed case sesitive\n-->\n<!ELEMENT emptyLine EMPTY>\n<!ATTLIST emptyLine\n  regexpr       CDATA       #REQUIRED\n  casesensitive (%boolean;) #IMPLIED\n>\n\n\n<!-- Highlighting specification -->\n<!ELEMENT highlighting (list*, contexts, itemDatas)>\n<!ATTLIST highlighting\n>\n\n<!-- List of items\n  name:     Name of this list\n-->\n<!ELEMENT list (item)*>\n<!ATTLIST list\n  name  CDATA   #REQUIRED\n>\n\n<!-- List item\n  contains string used in <keyword>\n-->\n<!ELEMENT item (#PCDATA)>\n\n<!-- List of contexts -->\n<!ELEMENT contexts (context)+>\n\n<!-- context specification\n  name:             The name of this context specification. Used in '*Context' attributes [optional]\n  attribute:        The name of the ItemData to be used for matching text\n  lineEndContext:   Next context if end of line is encountered\n  lineBeginContext: Next context if begin of line is encountered [optional]\n  fallthrough:      Use a fallthrough context [optional]\n  fallthroughContext: Fall through to this context [optional]\n  dynamic:          Dynamic context [boolean, optional]\n  noIndentationBasedFolding: Python uses indentation based folding. However, Python has parts where\n                    it does not use indentation based folding (e.g. for \"\"\" strings). In this case\n\t\t    switch to an own context and set this attribute to true. Then the indentation\n\t\t    based folding will ignore this parts and not change folding markers. [optional]\n\nTODO:\n  - Explain fallthrough.\n  - Do we need fallthrough at all? It could be true, if fallthroughContext is set, false otherwise.\n  - Make lineEndContext optional, defaults to '#stay'. Reasonable?\n-->\n<!ELEMENT context (keyword | Float | HlCOct | HlCHex | HlCFloat | Int | DetectChar | Detect2Chars | AnyChar | StringDetect | WordDetect | RegExpr | LineContinue | HlCStringChar | RangeDetect | HlCChar | IncludeRules | DetectSpaces | DetectIdentifier)*>\n<!ATTLIST context\n  name              CDATA       #IMPLIED\n  attribute         CDATA       #REQUIRED\n  lineEndContext    CDATA       #REQUIRED\n  lineBeginContext  CDATA       #IMPLIED\n  fallthrough       (%boolean;) #IMPLIED\n  fallthroughContext CDATA      #IMPLIED\n  dynamic           (%boolean;) #IMPLIED\n  noIndentationBasedFolding (%boolean;) #IMPLIED\n>\n\n<!-- Common attributes\n  attribute:    The name of the ItemData to be used for matching text\n  context:      The name of the context to go to when this rule matches\n  beginRegion:  Begin a region of type beginRegion [optional]\n  endRegion:    End a region of type endRegion [optional]\n  firstNonSpace: should this rule only match at first non-space char in line?\n  column: should this rule only match at given column in line (column == count of chars in front)\n-->\n<!ENTITY % commonAttributes\n \"attribute     CDATA       #IMPLIED\n  context       CDATA       #IMPLIED\n  beginRegion   CDATA       #IMPLIED\n  endRegion     CDATA       #IMPLIED\n  lookAhead     (%boolean;) #IMPLIED\n  firstNonSpace (%boolean;) #IMPLIED\n  column        CDATA       #IMPLIED\"\n>\n\n<!-- Detect members of a keyword list\n  commonAttributes: Common attributes\n  insensitive:      Is this list case-insensitive? [boolean, optional, see note]\n  String:           Name of the list\n  weakDelimiter:    Use weak deliminator\n\n  By default, case sensitivity is determined from <keywords casesensitive> in\n  <general> (default=true), but can be overridden per-list with 'insensitive'.\n\nTODO:\n  - Should be weakDeliminator\n  - Explain deliminator\n  - Doesn't seem to be supported in highligh.cpp\n-->\n<!ELEMENT keyword EMPTY>\n<!ATTLIST keyword\n  %commonAttributes;\n  insensitive   CDATA #IMPLIED\n  String        CDATA #REQUIRED\n  weakDelimiter CDATA #IMPLIED\n>\n\n<!-- Detect a floating point number\n  commonAttributes: Common attributes\n  AnyChar is allowed as a child rule. TODO: The source code allows\n  *all* rules to be child rules, shall we change the DTD in some way?\n-->\n<!ELEMENT Float (AnyChar)*>\n<!ATTLIST Float\n  %commonAttributes;\n>\n\n<!-- Detect an octal number\n  commonAttributes: Common attributes\n-->\n<!ELEMENT HlCOct EMPTY>\n<!ATTLIST HlCOct\n  %commonAttributes;\n>\n\n<!-- Detect a hexadecimal number\n  commonAttributes: Common attributes\n-->\n<!ELEMENT HlCHex EMPTY>\n<!ATTLIST HlCHex\n  %commonAttributes;\n>\n\n<!-- Detect a C-style floating point number\n  commonAttributes: Common attributes\n-->\n<!ELEMENT HlCFloat EMPTY>\n<!ATTLIST HlCFloat\n  %commonAttributes;\n>\n\n<!-- Detect C-style character\n  commonAttributes: Common attributes\n\nTODO\n  - Did I get this right?\n-->\n<!ELEMENT HlCChar EMPTY>\n<!ATTLIST HlCChar\n  %commonAttributes;\n>\n\n<!-- Detect an integer number\n  commonAttributes: Common attributes\n  StringDetect is allowed as a child rule. TODO: The source code allows\n  *all* rules to be child rules, shall we change the DTD in some way?\n-->\n<!ELEMENT Int (StringDetect)*>\n<!ATTLIST Int\n  %commonAttributes;\n>\n\n<!-- Detect a single character\n  commonAttributes: Common attributes\n  char:             The character to look for\n  dynamic:          Uses 0 ... 9 as placeholders for dynamic arguments (in fact, first char of arg...) [boolean, optional, default=false]\n-->\n<!ELEMENT DetectChar EMPTY>\n<!ATTLIST DetectChar\n  %commonAttributes;\n  char          CDATA   #REQUIRED\n  dynamic       (%boolean;) #IMPLIED\n>\n\n<!-- Detect two characters\n  commonAttributes: Common attributes\n  char:             The first character\n  char1:            The second character\n  dynamic:          Uses 0 ... 9 as placeholders for dynamic arguments (in fact, first char of arg...) [boolean, optional, default=false]\n-->\n<!ELEMENT Detect2Chars EMPTY>\n<!ATTLIST Detect2Chars\n  %commonAttributes;\n  char          CDATA   #REQUIRED\n  char1         CDATA   #REQUIRED\n  dynamic       (%boolean;) #IMPLIED\n>\n\n<!-- Detect any group of characters\n  commonAttributes: Common attributes\n  String:           A string representing the characters to look for\n\nTODO\n  - Description is not descriptive enough, I'm not sure what it exactly does:-(\n-->\n<!ELEMENT AnyChar EMPTY>\n<!ATTLIST AnyChar\n  %commonAttributes;\n  String        CDATA   #REQUIRED\n>\n\n<!-- Detect a string\n  commonAttributes: Common attributes\n  String:           The string to look for\n  insensitive:      Whether the string is matched case INsensitive. [boolean, optional, default=false]\n  dynamic:          Uses %0 ... %9 as placeholders for dynamic arguments [boolean, optional, default=false]\n\nTODO\n  - What's default of insensitive? I'm not sure...\n-->\n<!ELEMENT StringDetect EMPTY>\n<!ATTLIST StringDetect\n  %commonAttributes;\n  String        CDATA       #REQUIRED\n  insensitive   (%boolean;)  #IMPLIED\n  dynamic       (%boolean;) #IMPLIED\n>\n\n<!-- Detect a word, i.e. a string at word boundaries\n  commonAttributes: Common attributes\n  String:           The string to look for\n  insensitive:      Whether the string is matched case INsensitive. [boolean, optional, default=false]\n  dynamic:          Uses %0 ... %9 as placeholders for dynamic arguments [boolean, optional, default=false]\n\nTODO\n  - What's default of insensitive? I'm not sure...\n-->\n<!ELEMENT WordDetect EMPTY>\n<!ATTLIST WordDetect\n  %commonAttributes;\n  String        CDATA       #REQUIRED\n  insensitive   (%boolean;)  #IMPLIED\n  dynamic       (%boolean;) #IMPLIED\n>\n\n<!-- Detect a match of a regular expression\n  commonAttributes: Common attributes\n  String:           The regular expression pattern\n  insensitive:      Whether the text is matched case INsensitive. [boolean, optional, default=false]\n  minimal:          Wheather to use minimal matching for wild cards in the pattern [boolean, optional, default='false']\n  dynamic:          Uses %0 ... %9 as placeholders for dynamic arguments [boolean, optional, default=false]\n-->\n<!ELEMENT RegExpr EMPTY>\n<!ATTLIST RegExpr\n  %commonAttributes;\n  String        CDATA       #REQUIRED\n  insensitive   (%boolean;) #IMPLIED\n  minimal       (%boolean;) #IMPLIED\n  dynamic       (%boolean;) #IMPLIED\n>\n\n<!-- Detect a line continuation\n  commonAttributes: Common attributes\n-->\n<!ELEMENT LineContinue EMPTY>\n<!ATTLIST LineContinue\n  %commonAttributes;\n>\n\n<!-- Detect a C-style escaped character\n  commonAttributes: Common attributes\n\nTODO:\n  - Did I get this right? Only one character, or a string?\n-->\n<!ELEMENT HlCStringChar EMPTY>\n<!ATTLIST HlCStringChar\n  %commonAttributes;\n>\n\n<!-- Detect a range of characters\n  commonAttributes: Common attributes\n  char:             The character starting the range\n  char1:            The character terminating the range\n-->\n<!ELEMENT RangeDetect EMPTY>\n<!ATTLIST RangeDetect\n  %commonAttributes;\n  char          CDATA   #REQUIRED\n  char1         CDATA   #REQUIRED\n>\n\n<!-- Include Rules of another context\n  context:             The name of the context to include\n  includeAttrib:       If this is true, the host context of the IncludeRules\n                       will be given the attribute of the source context\n-->\n<!ELEMENT IncludeRules EMPTY>\n<!ATTLIST IncludeRules\n  context       CDATA   #REQUIRED\n  includeAttrib (%boolean;) #IMPLIED\n>\n\n<!-- Detect all following Spaces\n-->\n<!ELEMENT DetectSpaces EMPTY>\n<!ATTLIST DetectSpaces\n          %commonAttributes;\n>\n\n<!-- Detect an Identifier ( == LETTER(LETTER|NUMBER|_)*)\n     -->\n<!ELEMENT DetectIdentifier EMPTY>\n<!ATTLIST DetectIdentifier\n          %commonAttributes;\n>\n\n<!-- List of attributes -->\n<!ELEMENT itemDatas (itemData)+>\n<!ATTLIST itemDatas\n>\n\n<!-- Attribute specification\n  name          CDATA   #REQUIRED       The name of this attribute\n  defStyleNum   CDATA   #REQUIRED       The index of the default style to use\n  color         CDATA   #IMPLIED        Color for this style, either a hex triplet, a name or some other format recognized by Qt [optional]\n  selColor      CDATA   #IMPLIED        The color for this style when text is selected [optional]\n  italic        CDATA   #IMPLIED        Whether this attribute should be rendered using an italic typeface [optional, boolean, default=false]\n  bold          CDATA   #IMPLIED        Whether this attribute should be renederd using a bold typeface [optional, boolean, default=false]\n  underline     CDATA   #IMPLIED        Whether this attribute should be underlined [optional, boolean, default=false]\n  strikeOut     CDATA   #IMPLIED        Whether this attribute should be striked out [optional, boolean, default=false]\n  backgroundColor    CDATA #IMPLIED     The background color for this style [optional]\n  selBackgroundColor CDATA #IMPLIED     The background color for this style when text is selected [optional]\n  spellChecking      CDATA #IMPLIED     Whether this attribute should be spell checked [optional, boolean, default=true]\n-->\n<!ELEMENT itemData EMPTY>\n<!ATTLIST itemData\n  name          CDATA   #REQUIRED\n  defStyleNum   (%defStyles;) #REQUIRED\n  color         CDATA   #IMPLIED\n  selColor      CDATA   #IMPLIED\n  italic        (%boolean;) #IMPLIED\n  bold          (%boolean;) #IMPLIED\n  underline     (%boolean;) #IMPLIED\n  strikeOut     (%boolean;) #IMPLIED\n  backgroundColor    CDATA  #IMPLIED\n  selBackgroundColor CDATA  #IMPLIED\n  spellChecking (%boolean;) #IMPLIED\n>\n\n<!-- encodingPolicy type\n  Attributes that are of type 'encodingPolicy' allow the following values:\n  'EncodeAlways', 'EncodeWhenPresent' and 'EncodeNever'\n-->\n<!ENTITY % encodingPolicy \"EncodeAlways|EncodeWhenPresent|EncodeNever\">\n\n<!-- Spellchecking specification -->\n<!ELEMENT spellchecking (configuration?, encodings?)>\n<!ATTLIST spellchecking\n>\n\n<!-- List of character encodings -->\n<!ELEMENT encodings (encoding)+>\n<!ATTLIST encodings\n>\n\n<!-- Encoding specification\n  sequence       CDATA        #REQUIRED  Character sequence of the encoding; must not contain new-line characters, i.e. \\n or \\r\n  character      CDATA        #IMPLIED   Encoded character; must be of length 1\n  ignored        (%boolean;)  #IMPLIED   If true, then the encoding sequence is ignored for spellchecking\n-->\n<!ELEMENT encoding EMPTY>\n<!ATTLIST encoding\n  string         CDATA        #REQUIRED\n  char           CDATA        #IMPLIED\n  ignored        (%boolean;)  #IMPLIED\n>\n\n<!-- Spellchecking configuration\n  encodingReplacementPolicy       (%encodingPolicy;)     #IMPLIED  Policy for replacing encoded characters in replacements for misspelled words\n-->\n<!ELEMENT configuration EMPTY>\n<!ATTLIST configuration\n  encodingReplacementPolicy   (%encodingPolicy;)   #IMPLIED\n>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/less.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n\n<!--\n\tKate LESS syntax highlighting definition.\n\t\n\tCopyright 2016 sol (idsol at 163.com).\n\t\n\tExtended from CSS syntax highlighting definition by Wilbert Berendsen (wilbert@kde.nl).\n\t\n\tReferences:\n\t(Kate Editor, Writing a Syntax Highlighting File)[https://kate-editor.org/2005/03/24/writing-a-syntax-highlighting-file/]\n\t(LESS, Language features)[http://lesscss.org/features/]\n\t(CSS3, Media Queries)[https://www.w3.org/TR/css3-mediaqueries/]\n-->\n\n<language name=\"LESS\" version=\"1.0\" kateversion=\"2.4\" section=\"Markup\" \n\t\textensions=\"*.less\" indenter=\"cstyle\" mimetype=\"text/less\" \n\t\tauthor=\"sol\" license=\"LGPL\">\n\n\t<highlighting>\n\t\t<list name=\"properties\">\n\t\t\t<!-- CSS2 -->\n\t\t\t<item> azimuth </item>\n\t\t\t<item> background </item>\n\t\t\t<item> background-attachment </item>\n\t\t\t<item> background-break </item>\n\t\t\t<item> background-clip </item>\n\t\t\t<item> background-color </item>\n\t\t\t<item> background-image </item>\n\t\t\t<item> background-position </item>\n\t\t\t<item> background-origin </item>\n\t\t\t<item> background-repeat </item>\n\t\t\t<item> border </item>\n\t\t\t<item> border-bottom </item>\n\t\t\t<item> border-bottom-color </item>\n\t\t\t<item> border-bottom-style </item>\n\t\t\t<item> border-bottom-width </item>\n\t\t\t<item> border-collapse </item>\n\t\t\t<item> border-color </item>\n\t\t\t<item> border-left </item>\n\t\t\t<item> border-left-color </item>\n\t\t\t<item> border-left-style </item>\n\t\t\t<item> border-left-width </item>\n\t\t\t<item> border-right </item>\n\t\t\t<item> border-right-color </item>\n\t\t\t<item> border-right-style </item>\n\t\t\t<item> border-right-width </item>\n\t\t\t<item> border-spacing </item>\n\t\t\t<item> border-style </item>\n\t\t\t<item> border-top </item>\n\t\t\t<item> border-top-color </item>\n\t\t\t<item> border-top-style </item>\n\t\t\t<item> border-top-width </item>\n\t\t\t<item> border-width </item>\n\t\t\t<item> bottom </item>\n\t\t\t<item> caption-side </item>\n\t\t\t<item> clear </item>\n\t\t\t<item> clip </item>\n\t\t\t<item> color </item>\n\t\t\t<item> content </item>\n\t\t\t<item> counter-increment </item>\n\t\t\t<item> counter-reset </item>\n\t\t\t<item> cue </item>\n\t\t\t<item> cue-after </item>\n\t\t\t<item> cue-before </item>\n\t\t\t<item> cursor </item>\n\t\t\t<item> direction </item>\n\t\t\t<item> display </item>\n\t\t\t<item> elevation </item>\n\t\t\t<item> empty-cells </item>\n\t\t\t<item> float </item>\n\t\t\t<item> font </item>\n\t\t\t<item> font-family </item>\n\t\t\t<item> font-size </item>\n\t\t\t<item> font-size-adjust </item>\n\t\t\t<item> font-stretch </item>\n\t\t\t<item> font-style </item>\n\t\t\t<item> font-variant </item>\n\t\t\t<item> font-weight </item>\n\t\t\t<item> font-stretch </item>\n\t\t\t<item> height </item>\n\t\t\t<item> left </item>\n\t\t\t<item> letter-spacing </item>\n\t\t\t<item> line-height </item>\n\t\t\t<item> list-style </item>\n\t\t\t<item> list-style-image </item>\n\t\t\t<item> list-style-keyword </item>\n\t\t\t<item> list-style-position </item>\n\t\t\t<item> list-style-type  </item>\n\t\t\t<item> margin </item>\n\t\t\t<item> margin-bottom </item>\n\t\t\t<item> margin-left </item>\n\t\t\t<item> margin-right </item>\n\t\t\t<item> margin-top </item>\n\t\t\t<item> marker-offset </item>\n\t\t\t<item> max-height </item>\n\t\t\t<item> max-width </item>\n\t\t\t<item> min-height </item>\n\t\t\t<item> min-width </item>\n\t\t\t<item> orphans </item>\n\t\t\t<item> outline </item>\n\t\t\t<item> outline-color </item>\n\t\t\t<item> outline-style </item>\n\t\t\t<item> outline-width </item>\n\t\t\t<item> overflow </item>\n\t\t\t<item> padding </item>\n\t\t\t<item> padding-bottom </item>\n\t\t\t<item> padding-left </item>\n\t\t\t<item> padding-right </item>\n\t\t\t<item> padding-top </item>\n\t\t\t<item> page </item>\n\t\t\t<item> page-break-after </item>\n\t\t\t<item> page-break-before </item>\n\t\t\t<item> page-break-inside </item>\n\t\t\t<item> pause </item>\n\t\t\t<item> pause-after </item>\n\t\t\t<item> pause-before </item>\n\t\t\t<item> pitch </item>\n\t\t\t<item> pitch-range </item>\n\t\t\t<item> play-during </item>\n\t\t\t<item> position </item>\n\t\t\t<item> quotes </item>\n\t\t\t<item> richness </item>\n\t\t\t<item> right </item>\n\t\t\t<item> size </item>\n\t\t\t<item> speak </item>\n\t\t\t<item> speak-header </item>\n\t\t\t<item> speak-numeral </item>\n\t\t\t<item> speak-punctuation </item>\n\t\t\t<item> speech-rate </item>\n\t\t\t<item> stress </item>\n\t\t\t<item> table-layout </item>\n\t\t\t<item> text-align </item>\n\t\t\t<item> text-decoration </item>\n\t\t\t<item> text-decoration-color </item>\n\t\t\t<item> text-indent </item>\n\t\t\t<item> text-shadow </item>\n\t\t\t<item> text-transform </item>\n\t\t\t<item> top </item>\n\t\t\t<item> unicode-bidi </item>\n\t\t\t<item> vertical-align </item>\n\t\t\t<item> visibility </item>\n\t\t\t<item> voice-family </item>\n\t\t\t<item> volume </item>\n\t\t\t<item> white-space </item>\n\t\t\t<item> widows </item>\n\t\t\t<item> width </item>\n\t\t\t<item> word-spacing </item>\n\t\t\t<item> z-index </item>\n\n\t\t\t<!-- CSS3 -->\n\t\t\t<item> animation-name </item>\n\t\t\t<item> animation-duration </item>\n\t\t\t<item> animation-iteration </item>\n\t\t\t<item> animation-direction </item>\n\t\t\t<item> animation-delay </item>\n\t\t\t<item> animation-play-state </item>\n\t\t\t<item> animation-fill-mode </item>\n\t\t\t<item> animation-timing-function </item>\n\t\t\t<item> background-size </item>\n\t\t\t<item> border-bottom-image </item>\n\t\t\t<item> border-bottom-left-image </item>\n\t\t\t<item> border-bottom-left-radius </item>\n\t\t\t<item> border-bottom-right-image </item>\n\t\t\t<item> border-bottom-right-radius </item>\n\t\t\t<item> border-collapse </item>\n\t\t\t<item> border-corner-image </item>\n\t\t\t<item> border-image </item>\n\t\t\t<item> border-left-image </item>\n\t\t\t<item> border-radius </item>\n\t\t\t<item> border-right-image </item>\n\t\t\t<item> border-top-image </item>\n\t\t\t<item> border-top-left-image </item>\n\t\t\t<item> border-top-left-radius </item>\n\t\t\t<item> border-top-right-image </item>\n\t\t\t<item> border-top-right-radius </item>\n\t\t\t<item> box-align </item>\n\t\t\t<item> box-direction </item>\n\t\t\t<item> box-flex </item>\n\t\t\t<item> box-shadow </item>\n\t\t\t<item> box-sizing </item>\n\t\t\t<item> column-count </item>\n\t\t\t<item> column-fill </item>\n\t\t\t<item> column-gap </item>\n\t\t\t<item> column-rule-color </item>\n\t\t\t<item> column-rule-style </item>\n\t\t\t<item> column-rule-width </item>\n\t\t\t<item> column-span </item>\n\t\t\t<item> column-wisth </item>\n\t\t\t<item> hyphens </item>\n\t\t\t<item> linear-gradient </item>\n\t\t\t<item> opacity </item>\n\t\t\t<item> outline </item>\n\t\t\t<item> outline-offset </item>\n\t\t\t<item> overflow-x </item>\n\t\t\t<item> overflow-y </item>\n\t\t\t<item> pointer-events </item>\n\t\t\t<item> resize </item>\n\t\t\t<item> rotation </item>\n\t\t\t<item> rotation-point </item>\n\t\t\t<item> table-layout </item>\n\t\t\t<item> text-overflow </item>\n\t\t\t<item> text-shadow </item>\n\t\t\t<item> text-wrap </item>\n\t\t\t<item> transform-origin </item>\n\t\t\t<item> transition </item>\n\t\t\t<item> transition-property </item>\n\t\t\t<item> transition-duration </item>\n\t\t\t<item> word-wrap </item>\n\n\t\t\t<!-- Gecko rendering engine CSS property extensions -->\n\t\t\t<item> -moz-animation-name </item>\n\t\t\t<item> -moz-animation-duration </item>\n\t\t\t<item> -moz-animation-iteration </item>\n\t\t\t<item> -moz-animation-direction </item>\n\t\t\t<item> -moz-animation-delay </item>\n\t\t\t<item> -moz-animation-play-state </item>\n\t\t\t<item> -moz-animation-fill-mode </item>\n\t\t\t<item> -moz-background-size </item>\n\t\t\t<item> -moz-border-image </item>\n\t\t\t<item> -moz-border-bottom-colors </item>\n\t\t\t<item> -moz-border-left-colors </item>\n\t\t\t<item> -moz-border-radius </item>\n\t\t\t<item> -moz-border-radius-topleft </item>\n\t\t\t<item> -moz-border-radius-topright </item>\n\t\t\t<item> -moz-border-radius-bottomleft </item>\n\t\t\t<item> -moz-border-radius-bottomright </item>\n\t\t\t<item> -moz-border-right-colors </item>\n\t\t\t<item> -moz-border-top-colors </item>\n\t\t\t<item> -moz-box </item>\n\t\t\t<item> -moz-box-flex </item>\n\t\t\t<item> -moz-box-shadow </item>\n\t\t\t<item> -moz-box-sizing </item>\n\t\t\t<item> -moz-column-count </item>\n\t\t\t<item> -moz-column-gap </item>\n\t\t\t<item> -moz-hyphens </item>\n\t\t\t<item> -moz-linear-gradient </item>\n\t\t\t<item> -moz-opacity </item>\n\t\t\t<item> -moz-outline-style </item>\n\t\t\t<item> -moz-perspective </item>\n\t\t\t<item> -moz-radial-gradient </item>\n\t\t\t<item> -moz-resize </item>\n\t\t\t<item> -moz-transform </item>\n\t\t\t<item> -moz-transform-origin </item>\n\t\t\t<item> -moz-transform-style </item>\n\t\t\t<item> -moz-transition </item>\n\t\t\t<item> -moz-transition-property </item>\n\t\t\t<item> -moz-transition-duration </item>\n\n\t\t\t<!-- Opera rendering engine CSS property extensions -->\n\t\t\t<item> -o-background-size </item>\n\t\t\t<item> -o-linear-gradient </item>\n\t\t\t<item> -o-text-overflow </item>\n\t\t\t<item> -o-transition </item>\n\t\t\t<item> -o-transform-origin </item>\n\n\t\t\t<!-- konq specific -->\n\t\t\t<item> konq_bgpos_x </item>\n\t\t\t<item> konq_bgpos_y </item>\n\t\t\t<item> -khtml-background-size </item>\n\t\t\t<item> -khtml-border-top-left-radius </item>\n\t\t\t<item> -khtml-border-top-right-radius </item>\n\t\t\t<item> -khtml-border-bottom-left-radius </item>\n\t\t\t<item> -khtml-border-bottom-right-radius </item>\n\t\t\t<item> -khtml-border-radius </item>\n\t\t\t<item> -khtml-box-shadow </item>\n\t\t\t<item> -khtml-opacity </item>\n\n\t\t\t<!-- Webkit rendering engine CSS property extensions -->\n\t\t\t<item> -webkit-appearance </item>\n\t\t\t<item> -webkit-animation-name </item>\n\t\t\t<item> -webkit-animation-duration </item>\n\t\t\t<item> -webkit-animation-iteration </item>\n\t\t\t<item> -webkit-animation-direction </item>\n\t\t\t<item> -webkit-animation-delay </item>\n\t\t\t<item> -webkit-animation-play-state </item>\n\t\t\t<item> -webkit-animation-fill-mode </item>\n\t\t\t<item> -webkit-background-size </item>\n\t\t\t<item> -webkit-border-image </item>\n\t\t\t<item> -webkit-border-bottom-colors </item>\n\t\t\t<item> -webkit-border-left-colors </item>\n\t\t\t<item> -webkit-border-radius </item>\n\t\t\t<item> -webkit-border-right-colors </item>\n\t\t\t<item> -webkit-border-top-colors </item>\n\t\t\t<item> -webkit-border-top-left-radius </item>\n\t\t\t<item> -webkit-border-top-right-radius </item>\n\t\t\t<item> -webkit-border-bottom-left-radius </item>\n\t\t\t<item> -webkit-border-bottom-right-radius </item>\n\t\t\t<item> -webkit-border-radius-bottomleft </item>\n\t\t\t<item> -webkit-border-radius-bottomright </item>\n\t\t\t<item> -webkit-box-flex </item>\n\t\t\t<item> -webkit-box-reflect</item>\n\t\t\t<item> -webkit-box-shadow </item>\n\t\t\t<item> -webkit-box-sizing </item>\n\t\t\t<item> -webkit-column-count </item>\n\t\t\t<item> -webkit-column-gap </item>\n\t\t\t<item> -webkit-hyphens </item>\n\t\t\t<item> -webkit-linear-gradient </item>\n\t\t\t<item> -webkit-gradient </item>\n\t\t\t<item> -webkit-perspective </item>\n\t\t\t<item> -webkit-text-fill-color </item>\n\t\t\t<item> -webkit-text-stroke-color </item>\n\t\t\t<item> -webkit-text-stroke-width </item>\n\t\t\t<item> -webkit-text-size-adjust </item>\n\t\t\t<item> -webkit-transform </item>\n\t\t\t<item> -webkit-transform-origin </item>\n\t\t\t<item> -webkit-transform-style </item>\n\t\t\t<item> -webkit-transition </item>\n\t\t\t<item> -webkit-transition-property </item>\n\t\t\t<item> -webkit-transition-duration </item>\n\n\t\t\t<!-- Trident (a.k.a., MSHTML) CSS property extensions -->\n\t\t\t<item> filter </item>\n\t\t\t<item> zoom </item>\n\t\t\t<item> -ms-animation-name </item>\n\t\t\t<item> -ms-animation-duration </item>\n\t\t\t<item> -ms-animation-iteration </item>\n\t\t\t<item> -ms-animation-direction </item>\n\t\t\t<item> -ms-animation-delay </item>\n\t\t\t<item> -ms-animation-play-state </item>\n\t\t\t<item> -ms-animation-fill-mode </item>\n\t\t\t<item> -ms-box-sizing </item>\n\t\t\t<item> -ms-filter </item>\n\t\t\t<item> -ms-interpolation-mode </item>\n\t\t\t<item> -ms-linear-gradient </item>\n\t\t\t<item> -ms-text-size-adjust </item>\n\t\t\t<item> -ms-transform </item>\n\t\t\t<item> -ms-transition </item>\n\n\t\t\t<!-- font properties in @font-face -->\n\t\t\t<item> font-family </item>\n\t\t\t<item> font-size </item>\n\t\t\t<item> font-stretch </item>\n\t\t\t<item> font-style </item>\n\t\t\t<item> font-variant </item>\n\t\t\t<item> font-weight </item>\n\t\t\t<item> unicode-range </item>\n\t\t\t<item> units-per-em </item>\n\t\t\t<item> src </item>\n\t\t\t<item> panose-1 </item>\n\t\t\t<item> stemv </item>\n\t\t\t<item> stemh </item>\n\t\t\t<item> slope </item>\n\t\t\t<item> cap-height </item>\n\t\t\t<item> x-height </item>\n\t\t\t<item> ascent </item>\n\t\t\t<item> descent </item>\n\t\t\t<item> widths </item>\n\t\t\t<item> bbox </item>\n\t\t\t<item> definition-src </item>\n\t\t\t<item> baseline </item>\n\t\t\t<item> centerline </item>\n\t\t\t<item> mathline </item>\n\t\t\t<item> topline </item>\n\t\t</list>\n\n\t\t<list name=\"types\">\n\t\t\t<item> inherit </item>\n\t\t\t<item> none </item>\n\t\t\t<item> hidden </item>\n\t\t\t<item> dotted </item>\n\t\t\t<item> dashed </item>\n\t\t\t<item> solid </item>\n\t\t\t<item> double </item>\n\t\t\t<item> groove </item>\n\t\t\t<item> ridge </item>\n\t\t\t<item> inset </item>\n\t\t\t<item> outset </item>\n\t\t\t<item> xx-small </item>\n\t\t\t<item> x-small </item>\n\t\t\t<item> small </item>\n\t\t\t<item> medium </item>\n\t\t\t<item> large </item>\n\t\t\t<item> x-large </item>\n\t\t\t<item> xx-large </item>\n\t\t\t<item> smaller </item>\n\t\t\t<item> larger </item>\n\t\t\t<item> italic </item>\n\t\t\t<item> oblique </item>\n\t\t\t<item> small-caps </item>\n\t\t\t<item> normal </item>\n\t\t\t<item> bold </item>\n\t\t\t<item> bolder </item>\n\t\t\t<item> lighter </item>\n\t\t\t<item> light </item>\n\t\t\t<item> 100 </item>\n\t\t\t<item> 200 </item>\n\t\t\t<item> 300 </item>\n\t\t\t<item> 400 </item>\n\t\t\t<item> 500 </item>\n\t\t\t<item> 600 </item>\n\t\t\t<item> 700 </item>\n\t\t\t<item> 800 </item>\n\t\t\t<item> 900 </item>\n\t\t\t<item> transparent </item>\n\t\t\t<item> repeat </item>\n\t\t\t<item> repeat-x </item>\n\t\t\t<item> repeat-y </item>\n\t\t\t<item> no-repeat </item>\n\t\t\t<item> baseline </item>\n\t\t\t<item> sub </item>\n\t\t\t<item> super </item>\n\t\t\t<item> top </item>\n\t\t\t<item> text-top </item>\n\t\t\t<item> middle </item>\n\t\t\t<item> bottom </item>\n\t\t\t<item> text-bottom </item>\n\t\t\t<item> left </item>\n\t\t\t<item> right </item>\n\t\t\t<item> center </item>\n\t\t\t<item> justify </item>\n\t\t\t<item> konq-center </item>\n\t\t\t<item> disc </item>\n\t\t\t<item> circle </item>\n\t\t\t<item> square </item>\n\t\t\t<item> box </item>\n\t\t\t<item> decimal </item>\n\t\t\t<item> decimal-leading-zero </item>\n\t\t\t<item> lower-roman </item>\n\t\t\t<item> upper-roman </item>\n\t\t\t<item> lower-greek </item>\n\t\t\t<item> lower-alpha </item>\n\t\t\t<item> lower-latin </item>\n\t\t\t<item> upper-alpha </item>\n\t\t\t<item> upper-latin </item>\n\t\t\t<item> hebrew </item>\n\t\t\t<item> armenian </item>\n\t\t\t<item> georgian </item>\n\t\t\t<item> cjk-ideographic </item>\n\t\t\t<item> hiragana </item>\n\t\t\t<item> katakana </item>\n\t\t\t<item> hiragana-iroha </item>\n\t\t\t<item> katakana-iroha </item>\n\t\t\t<item> inline </item>\n\t\t\t<item> inline-block </item>\n\t\t\t<item> block </item>\n\t\t\t<item> list-item </item>\n\t\t\t<item> run-in </item>\n\t\t\t<item> compact </item>\n\t\t\t<item> marker </item>\n\t\t\t<item> table </item>\n\t\t\t<item> inline-table </item>\n\t\t\t<item> table-row-group </item>\n\t\t\t<item> table-header-group </item>\n\t\t\t<item> table-footer-group </item>\n\t\t\t<item> table-row </item>\n\t\t\t<item> table-column-group </item>\n\t\t\t<item> table-column </item>\n\t\t\t<item> table-cell </item>\n\t\t\t<item> table-caption </item>\n\t\t\t<item> auto </item>\n\t\t\t<item> crosshair </item>\n\t\t\t<item> default </item>\n\t\t\t<item> pointer </item>\n\t\t\t<item> move </item>\n\t\t\t<item> e-resize </item>\n\t\t\t<item> ne-resize </item>\n\t\t\t<item> nw-resize </item>\n\t\t\t<item> n-resize </item>\n\t\t\t<item> se-resize </item>\n\t\t\t<item> sw-resize </item>\n\t\t\t<item> s-resize </item>\n\t\t\t<item> w-resize </item>\n\t\t\t<item> text </item>\n\t\t\t<item> wait </item>\n\t\t\t<item> help </item>\n\t\t\t<item> above </item>\n\t\t\t<item> absolute </item>\n\t\t\t<item> always </item>\n\t\t\t<item> avoid </item>\n\t\t\t<item> below </item>\n\t\t\t<item> bidi-override </item>\n\t\t\t<item> blink </item>\n\t\t\t<item> both </item>\n\t\t\t<item> capitalize </item>\n\t\t\t<item> caption </item>\n\t\t\t<item> clip </item>\n\t\t\t<item> close-quote </item>\n\t\t\t<item> collapse </item>\n\t\t\t<item> condensed </item>\n\t\t\t<item> crop </item>\n\t\t\t<item> cross </item>\n\t\t\t<item> ellipsis </item>\n\t\t\t<item> ellipsis-word </item>\n\t\t\t<item> embed </item>\n\t\t\t<item> expanded </item>\n\t\t\t<item> extra-condensed </item>\n\t\t\t<item> extra-expanded </item>\n\t\t\t<item> fixed </item>\n\t\t\t<item> hand </item>\n\t\t\t<item> hide </item>\n\t\t\t<item> higher </item>\n\t\t\t<item> icon </item>\n\t\t\t<item> inside </item>\n\t\t\t<item> invert </item>\n\t\t\t<item> landscape </item>\n\t\t\t<item> level </item>\n\t\t\t<item> line-through </item>\n\t\t\t<item> loud </item>\n\t\t\t<item> lower </item>\n\t\t\t<item> lowercase </item>\n\t\t\t<item> ltr </item>\n\t\t\t<item> menu </item>\n\t\t\t<item> message-box </item>\n\t\t\t<item> mix </item>\n\t\t\t<item> narrower </item>\n\t\t\t<item> no-close-quote </item>\n\t\t\t<item> no-open-quote </item>\n\t\t\t<item> nowrap </item>\n\t\t\t<item> open-quote </item>\n\t\t\t<item> outside </item>\n\t\t\t<item> overline </item>\n\t\t\t<item> portrait </item>\n\t\t\t<item> pre </item>\n\t\t\t<item> pre-line </item>\n\t\t\t<item> pre-wrap </item>\n\t\t\t<item> relative </item>\n\t\t\t<item> rtl </item>\n\t\t\t<item> scroll </item>\n\t\t\t<item> semi-condensed </item>\n\t\t\t<item> semi-expanded </item>\n\t\t\t<item> separate </item>\n\t\t\t<item> show </item>\n\t\t\t<item> small-caption </item>\n\t\t\t<item> static </item>\n\t\t\t<item> static-position </item>\n\t\t\t<item> status-bar </item>\n\t\t\t<item> thick </item>\n\t\t\t<item> thin </item>\n\t\t\t<item> ultra-condensed </item>\n\t\t\t<item> ultra-expanded </item>\n\t\t\t<item> underline </item>\n\t\t\t<item> uppercase </item>\n\t\t\t<item> visible </item>\n\t\t\t<item> wider </item>\n\t\t\t<item> break </item>\n\t\t\t<item> serif </item>\n\t\t\t<item> sans-serif </item>\n\t\t\t<item> cursive </item>\n\t\t\t<item> fantasy </item>\n\t\t\t<item> monospace </item>\n\t\t\t<item> border-box </item>\n\t\t\t<item> content-box </item>\n\t\t\t<item> -epub-hyphens </item>\n\t\t</list>\n\n\t\t<list name=\"colors\">\n\t\t\t<item> aqua </item>\n\t\t\t<item> black </item>\n\t\t\t<item> blue </item>\n\t\t\t<item> cyan </item>\n\t\t\t<item> fuchsia </item>\n\t\t\t<item> gray </item>\n\t\t\t<item> green </item>\n\t\t\t<item> lime </item>\n\t\t\t<item> maroon </item>\n\t\t\t<item> navy </item>\n\t\t\t<item> olive </item>\n\t\t\t<item> purple </item>\n\t\t\t<item> red </item>\n\t\t\t<item> silver </item>\n\t\t\t<item> teal </item>\n\t\t\t<item> white </item>\n\t\t\t<item> yellow </item>\n\t\t\t<item> ActiveBorder  </item>\n\t\t\t<item> ActiveCaption  </item>\n\t\t\t<item> AppWorkspace  </item>\n\t\t\t<item> Background  </item>\n\t\t\t<item> ButtonFace  </item>\n\t\t\t<item> ButtonHighlight  </item>\n\t\t\t<item> ButtonShadow  </item>\n\t\t\t<item> ButtonText  </item>\n\t\t\t<item> CaptionText  </item>\n\t\t\t<item> GrayText  </item>\n\t\t\t<item> Highlight  </item>\n\t\t\t<item> HighlightText  </item>\n\t\t\t<item> InactiveBorder  </item>\n\t\t\t<item> InactiveCaption  </item>\n\t\t\t<item> InactiveCaptionText  </item>\n\t\t\t<item> InfoBackground  </item>\n\t\t\t<item> InfoText  </item>\n\t\t\t<item> Menu  </item>\n\t\t\t<item> MenuText  </item>\n\t\t\t<item> Scrollbar  </item>\n\t\t\t<item> ThreeDDarkShadow  </item>\n\t\t\t<item> ThreeDFace  </item>\n\t\t\t<item> ThreeDHighlight  </item>\n\t\t\t<item> ThreeDLightShadow  </item>\n\t\t\t<item> ThreeDShadow  </item>\n\t\t\t<item> Window  </item>\n\t\t\t<item> WindowFrame  </item>\n\t\t\t<item> WindowText  </item>\n\t\t</list>\n\n\t\t<list name=\"paren\">\n\t\t\t<item> url </item>\n\t\t\t<item> attr </item>\n\t\t\t<item> rect </item>\n\t\t\t<item> rgb </item>\n\t\t\t<item> rgba </item>\n\t\t\t<item> hsl </item>\n\t\t\t<item> hsla </item>\n\t\t\t<item> counter </item>\n\t\t\t<item> counters </item>\n\n\t\t\t<!-- in @font-face -->\n\t\t\t<item> local </item>\n\t\t\t<item> format </item>\n\n\t\t\t<!-- Trident (a.k.a., MSHTML) rendering engine functional notation extensions -->\n\t\t\t<item> expression </item>\n\n\t\t</list>\n\n\t\t<list name=\"mediatypes\">\n\t\t\t<item> all </item>\n\t\t\t<item> aural </item>\n\t\t\t<item> braille </item>\n\t\t\t<item> embossed </item>\n\t\t\t<item> speech </item>\n\t\t\t<item> handheld </item>\n\t\t\t<item> print </item>\n\t\t\t<item> projection </item>\n\t\t\t<item> screen </item>\n\t\t\t<item> tty </item>\n\t\t\t<item> tv </item>\n\t\t</list>\n\n\t\t<list name=\"pseudoclasses\">\n\t\t\t<item> hover </item>\n\t\t\t<item> link </item>\n\t\t\t<item> visited </item>\n\t\t\t<item> active </item>\n\t\t\t<item> focus </item>\n\t\t\t<item> first-child </item>\n\t\t\t<item> last-child </item>\n\t\t\t<item> only-child </item>\n\t\t\t<item> first-of-type </item>\n\t\t\t<item> last-of-type </item>\n\t\t\t<item> only-of-type </item>\n\t\t\t<item> first-letter </item>\n\t\t\t<item> first-line </item>\n\t\t\t<item> before </item>\n\t\t\t<item> after </item>\n\t\t\t<item> selection </item>\n\t\t\t<item> root </item>\n\t\t\t<item> empty </item>\n\t\t\t<item> target </item>\n\t\t\t<item> enabled </item>\n\t\t\t<item> disabled </item>\n\t\t\t<item> checked </item>\n\t\t\t<item> indeterminate </item>\n\t\t\t<item> nth-child </item>\n\t\t\t<item> nth-last-child </item>\n\t\t\t<item> nth-of-type </item>\n\t\t\t<item> nth-last-of-type </item>\n\t\t\t<item> not </item>\n\t\t</list>\n\n\t\t<contexts>\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Base\">\n\t\t\t\t<LineContinue/>\n\t\t\t\t<DetectSpaces/>\n\t\t\t\t<IncludeRules context=\"FindRuleSets\" />\n\t\t\t</context>\n\n\t\t\t<!-- finds rules and detects nesting -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindRuleSets\">\n\t\t\t\t<RegExpr attribute=\"Media\" context=\"Media\" String=\"@media\\b\" />\n\t\t\t\t<RegExpr attribute=\"At Rule\" context=\"Import\" String=\"@import\\b\" />\n\t\t\t\t<RegExpr attribute=\"At Rule\" context=\"#stay\" String=\"@(font-face|charset)\\b\" />\n\t\t\t\t<DetectChar attribute=\"Property\" context=\"RuleSet\" char=\"{\" beginRegion=\"ruleset\" />\n\t\t\t\t<IncludeRules context=\"FindSelectors\" />\n\t\t\t\t<IncludeRules context=\"FindStrings\" />\n\t\t\t\t<IncludeRules context=\"FindComments\" />\n\t\t\t</context>\n\n\t\t\t<!-- finds arguments to properties -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindValues\">\n\t\t\t\t<RegExpr attribute=\"DecValue\" context=\"#stay\" String=\"[-+]?[0-9.]+(em|ex|ch|rem|vw|vh|vm|px|in|cm|mm|pt|pc|deg|rad|grad|turn|ms|s|Hz|kHz)\\b\" />\n\t\t\t\t<RegExpr attribute=\"DecValue\" context=\"#stay\" String=\"[-+]?[0-9.]+[%]?\" />\n\t\t\t\t<RegExpr attribute=\"Normal Text\" context=\"#stay\" String=\"[\\w\\-]+\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- finds properties -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindProperties\">\n\t\t\t\t<keyword attribute=\"Property\" context=\"Rule\" String=\"properties\" />\n\t\t\t\t<RegExpr attribute=\"Unknown Property\" context=\"Rule\" String=\"-?[A-Za-z_-]+(?=\\s*:)\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- finds selectors -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindSelectors\">\n\t\t\t\t<DetectChar attribute=\"Selector Attr\" context=\"SelAttr\" char=\"[\" />\n\t\t\t\t<RegExpr attribute=\"Selector Id\" context=\"#stay\" String=\"#([a-zA-Z0-9\\-_]|[\\x80-\\xFF]|\\\\[0-9A-Fa-f]{1,6})*\" />\n\t\t\t\t<RegExpr attribute=\"Selector Class\" context=\"#stay\" String=\"\\.([a-zA-Z0-9\\-_]|[\\x80-\\xFF]|\\\\[0-9A-Fa-f]{1,6})*\" />\n\t\t\t\t<RegExpr attribute=\"Selector Pseudo\" context=\"#stay\" String=\":lang\\([\\w_-]+\\)\" />\n\t\t\t\t<DetectChar attribute=\"Selector Pseudo\" context=\"SelPseudo\" char=\":\" />\n\t\t\t</context>\n\n\t\t\t<!-- finds strings -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindStrings\">\n\t\t\t\t<DetectChar attribute=\"String\" context=\"StringDQ\" char=\"&quot;\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"StringSQ\" char=\"'\" />\n\t\t\t</context>\n\n\t\t\t<!-- finds comments -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FindComments\">\n\t\t\t\t<RegExpr attribute=\"Region Marker\" context=\"#stay\" String=\"/\\*BEGIN.*\\*/\" beginRegion=\"UserDefined\" />\n\t\t\t\t<RegExpr attribute=\"Region Marker\" context=\"#stay\" String=\"/\\*END.*\\*/\" endRegion=\"UserDefined\" />\n\t\t\t\t<Detect2Chars attribute=\"Comment\" context=\"Comment Singleline\" char=\"/\" char1=\"/\"/>\n\t\t\t\t<Detect2Chars attribute=\"Comment\" context=\"Comment Multiline\" char=\"/\" char1=\"*\" beginRegion=\"comment\" />\n\t\t\t</context>\n\n\t\t\t<!-- begins `@media` content block -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Media\">\n\t\t\t\t<DetectChar attribute=\"Media\" context=\"Media2\" char=\"{\" beginRegion=\"media\" />\n\t\t\t\t<keyword attribute=\"Media\" context=\"#stay\" String=\"mediatypes\" />\n\t\t\t\t<DetectChar attribute=\"Media\" context=\"#stay\" char=\",\" />\n\t\t\t\t<IncludeRules context=\"FindComments\" />\n\t\t\t\t<!--\n\t\t\t\t\tATTENTION Don't treat unknown mediatype as error, as it is intended \n\t\t\t\t\tto be open for extensibility according to CSS3 SPEC.\n\t\t\t\t\tATTENTION Detect CSS3 media queries between `@media` and `{`\n\t\t\t\t\tas open as it may be.\n\t\t\t\t-->\n\t\t\t\t<StringDetect attribute=\"Media\" context=\"#stay\" String=\"and\" />\n\t\t\t\t<RegExpr attribute=\"Media\" context=\"#stay\" String=\"\\([^\\}]+\\)\" />\n\t\t\t\t<RegExpr attribute=\"Media\" context=\"#stay\" String=\"\\S+\" />\n\t\t\t</context>\n\n\t\t\t<!-- ends `@media` content block -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Media2\">\n\t\t\t\t<DetectChar attribute=\"Media\" context=\"#pop#pop\" char=\"}\" endRegion=\"media\" />\n\t\t\t\t<IncludeRules context=\"FindRuleSets\" />\n\t\t\t\t<!--\n\t\t\t\t\tATTENTION Allow immediate rule inside `@media` content block, \n\t\t\t\t\tin addition to rule set, a curcial difference between LESS and CSS.\n\t\t\t\t-->\n\t\t\t\t<IncludeRules context=\"FindProperties\" />\n\t\t\t\t<IncludeRules context=\"FindSelectors\" />\n\t\t\t</context>\n\n\t\t\t<!-- ends selector attribute, for example `input[disabled]` -->\n\t\t\t<context attribute=\"Selector Attr\" lineEndContext=\"#stay\" name=\"SelAttr\">\n\t\t\t\t<DetectChar attribute=\"Selector Attr\" context=\"#pop\" char=\"]\" />\n\t\t\t\t<IncludeRules context=\"FindStrings\" />\n\t\t\t</context>\n\n\t\t\t<!-- detects pseudo classes, for example `:hover` -->\n\t\t\t<context attribute=\"Selector Pseudo\" lineEndContext=\"#pop\" name=\"SelPseudo\"\n\t\t\t\t\tfallthrough=\"true\" fallthroughContext=\"#pop\">\n\t\t\t\t<keyword attribute=\"Selector Pseudo\" context=\"#pop\" String=\"pseudoclasses\" />\n\t\t\t</context>\n\n\t\t\t<!-- ends `@import \"...\";` -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Import\">\n\t\t\t\t<DetectChar attribute=\"At Rule\" context=\"#pop\" char=\";\" />\n\t\t\t\t<keyword attribute=\"Media\" context=\"#stay\" String=\"mediatypes\" />\n\t\t\t\t<IncludeRules context=\"FindValues\" />\n\t\t\t\t<IncludeRules context=\"FindStrings\" />\n\t\t\t\t<IncludeRules context=\"FindComments\" />\n\t\t\t</context>\n\n\t\t\t<!-- inside singleline comment -->\n\t\t\t<context attribute=\"Comment\" lineEndContext=\"#pop\" name=\"Comment Singleline\">\n\t\t\t\t<LineContinue attribute=\"Comment\" context=\"#stay\"/>\n\t\t\t\t<!-- NOTE This enables detection of \"Alerts\" words, for example `TODO`, in a singleline coment. -->\n\t\t\t\t<IncludeRules context=\"##Alerts\" />\n\t\t\t</context>\n\n\t\t\t<!-- ends multiline comment -->\n\t\t\t<context attribute=\"Comment\" lineEndContext=\"#stay\" name=\"Comment Multiline\">\n\t\t\t\t<DetectSpaces/>\n\t\t\t\t<Detect2Chars attribute=\"Comment\" context=\"#pop\" char=\"*\" char1=\"/\" endRegion=\"comment\" />\n\t\t\t\t<IncludeRules context=\"##Alerts\" />\n\t\t\t\t<DetectIdentifier/>\n\t\t\t</context>\n\n\t\t\t<!-- ends rule set block -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"RuleSet\">\n\t\t\t\t<DetectChar attribute=\"Property\" context=\"#pop\" char=\"}\" endRegion=\"ruleset\" />\n\t\t\t\t<!-- ATTENTION Allow nested rule sets, a crucial difference between LESS and CSS. -->\n\t\t\t\t<IncludeRules context=\"FindRuleSets\" />\n\t\t\t\t<IncludeRules context=\"FindProperties\" />\n\t\t\t\t<IncludeRules context=\"FindComments\" />\n\t\t\t</context>\n\n\t\t\t<!-- begins property -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Rule\">\n\t\t\t\t<DetectChar attribute=\"Property\" context=\"Rule2\" char=\":\" />\n\t\t\t\t<RegExpr attribute=\"Error\" context=\"#stay\" String=\"\\S\" />\n\t\t\t</context>\n\n\t\t\t<!-- ends property -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Rule2\">\n\t\t\t\t<DetectChar attribute=\"Property\" context=\"#pop#pop\" char=\";\" />\n\t\t\t\t<DetectChar attribute=\"Property\" context=\"#pop#pop#pop\" char=\"}\" endRegion=\"ruleset\" />\n\t\t\t\t<!-- parse property values -->\n\t\t\t\t<keyword attribute=\"Value\" context=\"#stay\" String=\"types\" />\n\t\t\t\t<keyword attribute=\"Value\" context=\"#stay\" String=\"colors\" />\n\t\t\t\t<RegExpr attribute=\"HexValue\" context=\"#stay\" String=\"#([0-9A-Fa-f]{3}){1,4}\\b\" />\n\t\t\t\t<keyword attribute=\"Value\" context=\"PropParen\" String=\"paren\" />\n\t\t\t\t<RegExpr attribute=\"Important\" context=\"#stay\" String=\"!important\\b\" />\n\t\t\t\t<IncludeRules context=\"FindValues\" />\n\t\t\t\t<IncludeRules context=\"FindStrings\" />\n\t\t\t\t<IncludeRules context=\"FindComments\" />\n\t\t\t</context>\n\n\t\t\t<!-- beginning parenthesis inside a property -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"PropParen\">\n\t\t\t\t<DetectChar attribute=\"Value\" context=\"PropParen2\" char=\"(\" />\n\t\t\t\t<IncludeRules context=\"FindComments\" />\n\t\t\t\t<RegExpr attribute=\"Error\" context=\"#stay\" String=\"\\S\" />\n\t\t\t</context>\n\n\t\t\t<!-- ending parenthesis inside a property -->\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"PropParen2\">\n\t\t\t\t<DetectChar attribute=\"Value\" context=\"#pop#pop\" char=\")\" />\n\t\t\t\t<IncludeRules context=\"FindValues\" />\n\t\t\t\t<IncludeRules context=\"FindStrings\" />\n\t\t\t\t<IncludeRules context=\"FindComments\" />\n\t\t\t</context>\n\n\t\t\t<!-- double quoted string -->\n\t\t\t<context attribute=\"String\" lineEndContext=\"#stay\" name=\"StringDQ\">\n\t\t\t\t<DetectChar attribute=\"String\" context=\"#pop\" char=\"&quot;\" />\n\t\t\t\t<IncludeRules context=\"InsideString\" />\n\t\t\t</context>\n\n\t\t\t<!-- single quoted string -->\n\t\t\t<context attribute=\"String\" lineEndContext=\"#stay\" name=\"StringSQ\">\n\t\t\t\t<DetectChar attribute=\"String\" context=\"#pop\" char=\"'\" />\n\t\t\t\t<IncludeRules context=\"InsideString\" />\n\t\t\t</context>\n\n\t\t\t<!-- inside single/double quoted string -->\n\t\t\t<context attribute=\"String\" lineEndContext=\"#stay\" name=\"InsideString\">\n\t\t\t\t<RegExpr attribute=\"String\" context=\"#stay\" String=\"\\\\[&quot;']\" />\n\t\t\t\t<DetectIdentifier/>\n\t\t\t</context>\n\t\t</contexts>\n\t\t\n\t\t<itemDatas>\n\t\t\t<itemData name=\"Normal Text\" defStyleNum=\"dsNormal\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Property\" defStyleNum=\"dsKeyword\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Unknown Property\" defStyleNum=\"dsAlert\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Media\" defStyleNum=\"dsChar\" bold=\"1\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"At Rule\" defStyleNum=\"dsChar\" bold=\"1\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"String\" defStyleNum=\"dsString\"/>\n\t\t\t<itemData name=\"Value\" defStyleNum=\"dsDataType\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"DecValue\" defStyleNum=\"dsDecVal\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"HexValue\" defStyleNum=\"dsBaseN\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Important\" defStyleNum=\"dsChar\" bold=\"1\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Selector Attr\" defStyleNum=\"dsChar\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Selector Id\" defStyleNum=\"dsFloat\" bold=\"1\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Selector Class\" defStyleNum=\"dsFloat\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Selector Pseudo\" defStyleNum=\"dsDecVal\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Comment\" defStyleNum=\"dsComment\" />\n\t\t\t<itemData name=\"Region Marker\" defStyleNum=\"dsRegionMarker\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Alert\" defStyleNum=\"dsAlert\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Error\" defStyleNum=\"dsError\" spellChecking=\"false\"/>\n\t\t</itemDatas>\n\t</highlighting>\n\t\n\t<general>\n\t\t<keywords casesensitive=\"0\" weakDeliminator=\"-%\"/>\n\t\t<!-- NOTE This is used if the user presses the corresponding shortcut for comment/uncomment. -->\n\t\t<comments>\n\t\t\t<comment name=\"singleLine\" start=\"//\" />\n\t\t\t<comment name=\"multiLine\" start=\"/*\" end=\"*/\" region=\"comment\" />\n\t\t</comments>\n\t</general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/lua.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<!--\n    LUA (www.lua.org) syntax highlighting for Kate\n\n    CHANGES\n\n    [ Version 1.03 (2007-09-12) by Bruno Massa ]\n\n    - [=[ ]=] comment and string style is now working (thanks to Dominik and Sebastian)\n    - it uses DoxygenLua.xml to format the comments in a Doxygen style\n\n    [ Version 1.02 (2007-07-15) by Bruno Massa ]\n\n    - based on Lua 5.1\n    - highlight the Kepler function (cgilua, luasql, lfs, luazip)\n    - true, false and nil are highlighted in black\n    - table.foreach and foreachi are marked as alerts\n\n    [ Version 1.01 (2007-01-01) by Bruno Massa ]\n\n    - highlighting similar to PHP\n    - error detection on one-line strings and common mistakes from other languages like using \"!=\" \"++\"\n    - uppercase-only variables are highlighted as constants\n    - { } now is collapsable\n\n    [ Version 1.00 (2006-12-05) by Bruno Massa ]\n\n    - based on Lua 5.0.2 syntax\n    - strings \"[[ ]]\" and single quoted strings\n    - block comments\n    - function, if/elseif/else, do-end chunks, comment blocks, strings using [[ ]] collapsable\n    - nil, false and true consided pseudo-variables (displayed as numbers)\n    - NOTE, FIXME, TODO alerts added on comments\n    - improved highlighting\n\n    -->\n<language name=\"Lua\" version=\"1.03\" indenter=\"lua\" kateversion=\"2.4\" section=\"Scripts\" extensions=\"*.lua\" mimetype=\"text/x-lua\">\n  <highlighting>\n    <list name=\"keywords\">\n      <item> and </item>\n      <item> function </item>\n      <item> in </item>\n      <item> local </item>\n      <item> not </item>\n      <item> or </item>\n    </list>\n    <list name=\"control\">\n      <item> break </item>\n      <item> do </item>\n      <item> else </item>\n      <item> elseif </item>\n      <item> end </item>\n      <item> for </item>\n      <item> if </item>\n      <item> repeat </item>\n      <item> return </item>\n      <item> then </item>\n      <item> until </item>\n      <item> while </item>\n    </list>\n    <list name=\"pseudo-variables\">\n      <item> nil </item>\n      <item> false </item>\n      <item> true </item>\n    </list>\n    <list name=\"basefunc\">\n      <item> string.byte </item>  <item> string.char </item>\n      <item> string.find </item>  <item> string.len </item>\n      <item> string.lower </item> <item> string.rep </item>\n      <item> string.sub </item>   <item> string.upper </item>\n      <item> string.format </item><item> string.gfind </item>\n      <item> string.gsub </item>  <item> table.concat </item>\n      <item> table.getn </item>   <item> table.sort </item>\n      <item> table.insert </item> <item> table.remove </item>\n      <item> table.setn </item>   <item> math.abs </item>\n      <item> math.sin </item>     <item> math.cos </item>\n      <item> math.tan </item>     <item> math.asin </item>\n      <item> math.acos </item>    <item> math.atan </item>\n      <item> math.atan2 </item>   <item> math.ceil </item>\n      <item> math.floor </item>   <item> math.mod </item>\n      <item> math.frexp </item>   <item> math.ldexp </item>\n      <item> math.squrt </item>   <item> math.min </item>\n      <item> math.max </item>     <item> math.log </item>\n      <item> math.log10 </item>   <item> math.exp </item>\n      <item> math.deg </item>     <item> math.rad </item>\n      <item> math.random </item>  <item> math.randomseed </item>\n      <item> io.close </item>     <item> io.flush </item>\n      <item> io.input </item>     <item> io.lines </item>\n      <item> io.open </item>      <item> io.output </item>\n      <item> io.read </item>      <item> io.stderr </item>\n      <item> io.stdin </item>     <item> io.stdout </item>\n      <item> io.tmpfile </item>   <item> io.write </item>\n      <item> os.clock </item>     <item> os.date </item>\n      <item> os.difftime </item>  <item> os.execute </item>\n      <item> os.exit </item>      <item> os.getenv </item>\n      <item> os.remove </item>    <item> os.rename </item>\n      <item> os.setlocale </item> <item> os.time </item>\n      <item> os.tmpname </item>   <item> debug.getinfo </item>\n      <item> debug.getlocal </item><item> debug.setlocal </item>\n      <item> debug.sethook </item><item> debug.gethook </item>\n      <item> assert </item>      <item> collectgarbage </item>\n      <item> dofile </item>      <item> error </item>\n      <item> next </item>        <item> print </item>\n      <item> rawget </item>      <item> rawset </item>\n      <item> tonumber </item>    <item> tostring </item>\n      <item> type </item>        <item> _ALERT </item>\n      <item> _ERRORMESSAGE </item><item> call </item>\n      <item> getmetatable </item><item> gcinfo </item>\n      <item> ipairs </item>      <item> loadfile </item>\n      <item> loadstring </item>  <item> pairs </item>\n      <item> pcall </item>       <item> require </item>\n      <item> LUA_PATH </item>    <item> setmetatable </item>\n      <item> _LOADED </item>     <item> _VERSION </item>\n      <item> gettagmethod </item><item> globals </item>\n      <item> newtag </item>      <item> setglobal </item>\n      <item> settag </item>      <item> settagmethod </item>\n      <item> setlinehook </item> <item> getglobals </item>\n      <item> copytagmethods </item><item> dostring </item>\n      <item> getglobal </item>   <item> tag </item>\n      <item> setglobals </item>  <item> unpack </item>\n      <item> exit </item>        <item> readfrom </item>\n      <item> writeto </item>     <item> appendto </item>\n      <item> read </item>        <item> write </item>\n      <item> getinfo </item>     <item> getlocal </item>\n      <item> setlocal </item>    <item> setcallhook </item>\n      <item> tinsert </item>     <item> tremove </item>\n      <item> flush </item>       <item> seek </item>\n      <item> setlocale </item>   <item> execute </item>\n      <item> remove </item>      <item> rename </item>\n      <item> tmpname </item>     <item> getenv </item>\n      <item> getn </item>        <item> sort </item>\n      <item> table.foreach </item> <item> table.foreachi </item>\n      <item> foreach </item>     <item> foreachi </item>\n      <item> abs </item>         <item> sin </item>\n      <item> cos </item>         <item> tan </item>\n      <item> asin </item>        <item> acos </item>\n      <item> atan </item>        <item> atan2 </item>\n      <item> ceil </item>        <item> floor </item>\n      <item> mod </item>         <item> frexp </item>\n      <item> ldexp </item>       <item> squrt </item>\n      <item> min </item>         <item> max </item>\n      <item> log </item>         <item> log10 </item>\n      <item> exp </item>         <item> deg </item>\n      <item> rad </item>         <item> random </item>\n      <item> randomseed </item>  <item> strlen </item>\n      <item> strsub </item>      <item> strlower </item>\n      <item> strupper </item>    <item> strchar </item>\n      <item> strrep </item>      <item> ascii </item>\n      <item> strbyte </item>     <item> format </item>\n      <item> strfind </item>     <item> gsub </item>\n      <item> openfile </item>    <item> closefile </item>\n      <item> date </item>        <item> clock </item>\n\n\n      <item> cgilua </item>                     <item> cgilua.lp.translate </item>\n      <item> cgilua.contentheader </item>       <item> cgilua.script_file </item>\n      <item> cgilua.header </item>              <item> cgilua.script_path </item>\n      <item> cgilua.htmlheader </item>          <item> cgilua.script_pdir </item>\n      <item> cgilua.redirect </item>            <item> cgilua.script_vdir </item>\n      <item> cgilua.mkabsoluteurl </item>       <item> cgilua.script_vpath </item>\n      <item> cgilua.mkurlpath </item>           <item> cgilua.servervariable </item>\n      <item> cgilua.put </item>                 <item> cgilua.urlpath </item>\n      <item> cgilua.handlelp </item>            <item> cgilua.errorlog </item>\n      <item> cgilua.lp.compile </item>          <item> cgilua.seterrorhandler </item>\n      <item> cgilua.lp.include </item>          <item> cgilua.seterroroutput </item>\n      <item> cgilua.lp.setcompatmode </item>    <item> cgilua.addclosefunction </item>\n      <item> cgilua.lp.setoutfunc </item>       <item> cgilua.addopenfunction </item>\n      <item> cgilua.addscripthandler </item>    <item> cgilua.addscripthandler </item>\n      <item> cgilua.buildprocesshandler </item> <item> cgilua.setmaxfilesize </item>\n      <item> cgilua.setmaxinput </item>         <item> cgilua.urlcode.encodetable </item>\n      <item> cgilua.urlcode.escape </item>      <item> cgilua.urlcode.parsequery </item>\n      <item> cgilua.urlcode.unescape </item>    <item> cgilua.urlcode.insertfield </item>\n      <item> cgilua.setoutfunc </item>          <item> cgilua.addopenfunction </item>\n      <item> cgilua.doif </item>                <item> cgilua.doscript </item>\n      <item> cgilua.pack </item>                <item> cgilua.splitpath </item>\n      <item> cgilua.cookies.get </item>         <item> cgilua.cookies.set </item>\n      <item> cgilua.cookies.sethtml </item>     <item> cgilua.cookies.delete </item>\n      <item> cgilua.serialize </item>           <item> cgilua.session.close </item>\n      <item> cgilua.session.data </item>        <item> cgilua.session.load </item>\n      <item> cgilua.session.new </item>         <item> cgilua.session.open </item>\n      <item> cgilua.session.save </item>        <item> cgilua.session.setsessiondir </item>\n      <item> cgilua.session.delete </item>      <item> cgilua.session </item>\n      <item> cgilua.cookies </item>\n\n      <item> numrows </item>                    <item> connect </item>\n      <item> close </item>                      <item> fetch </item>\n      <item> getcolnames </item>                <item> getcoltypes </item>\n      <item> commit </item>                     <item> rollback </item>\n      <item> setautocommit </item>\n\n      <item> lfs </item>                        <item> lfs.attributes </item>\n      <item> lfs.chdir </item>                  <item> lfs.currentdir </item>\n      <item> lfs.dir </item>                    <item> lfs.lock </item>\n      <item> lfs.mkdir </item>                  <item> lfs.rmdir </item>\n      <item> lfs.touch </item>                  <item> lfs.unlock </item>\n\n      <item> zip </item>                        <item> zip.open </item>\n      <item> zip.openfile </item>               <item> files </item>\n      <item> seek </item>                       <item> close </item>\n      <item> lines </item>\n\n\n    </list>\n    <list name=\"attention\">\n      <item> TODO </item>\n      <item> FIXME </item>\n      <item> NOTE </item>\n    </list>\n    <list name=\"deprecated\">\n      <item> table.foreach </item> <item> table.foreachi </item>\n      <item> foreach </item>       <item> foreachi </item>\n    </list>\n\n    <contexts>\n      <context name=\"Normal\"        attribute=\"Normal Text\" lineEndContext=\"#stay\">\n        <IncludeRules context=\"##DoxygenLua\" />\n        <keyword      attribute=\"Error\"  context=\"#stay\" String=\"deprecated\" />\n        <DetectSpaces />\n        <RegExpr      attribute=\"Comment\"  context=\"Block Comment\" beginRegion=\"block comment\"  String=\"--\\[(=*)\\[\" dynamic=\"true\" />\n        <Detect2Chars attribute=\"Comment\"  context=\"Comment\"       char=\"-\" char1=\"-\"/>\n        <RegExpr      attribute=\"Strings\"  context=\"String_block\"  String=\"\\[(=*)\\[\" dynamic=\"true\" />\n        <DetectChar   attribute=\"Strings\"  context=\"String_single\" char=\"'\"/>\n        <DetectChar   attribute=\"Strings\"  context=\"String_double\" char=\"&quot;\"/>\n        <keyword      attribute=\"BFunc\"    context=\"#stay\"         String=\"basefunc\"/>\n\n        <RegExpr      attribute=\"Keyword\"  context=\"#stay\" beginRegion=\"chunk\" String=\"\\bfunction\\b\" />\n        <keyword      attribute=\"Keyword\"  context=\"#stay\" String=\"keywords\" />\n        <keyword      attribute=\"Keyword\"  context=\"#stay\"  String=\"pseudo-variables\" />\n        <RegExpr      attribute=\"Control\"  context=\"#stay\" endRegion=\"chunk\"   beginRegion=\"chunk\" String=\"\\belse\\b\" />\n        <RegExpr      attribute=\"Control\"  context=\"#stay\" endRegion=\"chunk\"   beginRegion=\"chunk\" String=\"\\belseif\\b\" />\n        <RegExpr      attribute=\"Control\"  context=\"#stay\" beginRegion=\"chunk\" String=\"\\bdo\\b\" />\n        <RegExpr      attribute=\"Control\"  context=\"#stay\" beginRegion=\"chunk\" String=\"\\bif\\b\" />\n        <RegExpr      attribute=\"Control\"  context=\"#stay\" endRegion=\"chunk\"   String=\"\\bend\\b\" />\n        <keyword      attribute=\"Control\"  context=\"#stay\" String=\"control\" />\n\n        <DetectChar   attribute=\"Symbols\"  context=\"#stay\" beginRegion=\"table\" char=\"{\" />\n        <DetectChar   attribute=\"Symbols\"  context=\"#stay\" endRegion=\"table\"   char=\"}\" />\n\n        <RegExpr      attribute=\"Numbers\"  context=\"#stay\"  String=\"\\b\\d*\\.?\\d*(e|e\\-|e\\+)?\\d+\\b\"/>\n        <RegExpr      attribute=\"Numbers\"  context=\"#stay\"  String=\"\\b-?0[xX][0-9a-fA-F]+\\b\"/>\n\n        <RegExpr      attribute=\"Normal Text\" context=\"#stay\" String=\"\\b[a-zA-Z_][a-zA-Z0-9_]*(?=\\s*([({'&quot;]|\\[\\[))\\b\" />\n        <RegExpr      attribute=\"Constant\" context=\"#stay\" String=\"\\b[A-Z_][A-Z0-9_]*\\b\" />\n        <RegExpr      attribute=\"Variable\" context=\"#stay\" String=\"\\b[a-zA-Z_][a-zA-Z0-9_]*\\b\" />\n\n        <Detect2Chars attribute=\"Error\"    context=\"#stay\" char=\"!\" char1=\"=\"/>\n        <Detect2Chars attribute=\"Error\"    context=\"#stay\" char=\"-\" char1=\"=\"/>\n        <Detect2Chars attribute=\"Error\"    context=\"#stay\" char=\"+\" char1=\"=\"/>\n        <Detect2Chars attribute=\"Error\"    context=\"#stay\" char=\"+\" char1=\"+\"/>\n        <Detect2Chars attribute=\"Error\"    context=\"#stay\" char=\".\" char1=\"=\"/>\n        <AnyChar      attribute=\"Symbols\"  context=\"#stay\" String=\"[]().=~+-*/^&gt;&lt;#;\" />\n      </context>\n      <context name=\"Comment\"       attribute=\"Comment\"     lineEndContext=\"#pop\">\n        <Detect2Chars attribute=\"Comment\"   context=\"#stay\" char=\"-\" char1=\"-\" />\n        <keyword      attribute=\"Alerts\"   context=\"#stay\" String=\"attention\"/>\n      </context>\n      <context name=\"Block Comment\" attribute=\"Comment\"     lineEndContext=\"#stay\" dynamic=\"true\" >\n        <RegExpr attribute=\"Comment\"  context=\"#pop\"  endRegion=\"block comment\" String=\"\\]%1\\]\" dynamic=\"true\" />\n        <Detect2Chars attribute=\"Comment\"   context=\"#stay\" char=\"-\" char1=\"-\" />\n        <keyword      attribute=\"Alerts\"   context=\"#stay\" String=\"attention\" />\n      </context>\n      <context name=\"String_single\" attribute=\"Strings\"     lineEndContext=\"Error\">\n        <RegExpr      attribute=\"Symbols\"  context=\"#stay\" String=\"\\\\(a|b|f|n|r|t|v|\\\\|&quot;|\\'|[|])\" />\n        <DetectChar   attribute=\"Strings\"  context=\"#pop\"  char=\"'\"/>\n      </context>\n      <context name=\"String_double\" attribute=\"Strings\"     lineEndContext=\"Error\">\n        <RegExpr      attribute=\"Symbols\"  context=\"#stay\" String=\"\\\\[abfnrtv'&quot;\\\\\\[\\]]\" />\n        <DetectChar   attribute=\"Strings\"  context=\"#pop\"  char=\"&quot;\"/>\n      </context>\n      <context name=\"String_block\"  attribute=\"Strings\"     lineEndContext=\"#stay\" dynamic=\"true\">\n        <RegExpr      attribute=\"Symbols\"  context=\"#stay\" String=\"\\\\(a|b|f|n|r|t|v|\\\\|&quot;|\\'|[|])\" />\n        <RegExpr      attribute=\"Strings\"  context=\"#pop\"  String=\"\\]%1\\]\" dynamic=\"true\" />\n      </context>\n      <context name=\"Error\"         attribute=\"Error\"       lineEndContext=\"#stay\">\n      </context>\n    </contexts>\n    <itemDatas>\n      <itemData name=\"Alerts\"          defStyleNum=\"dsAlert\" />\n      <itemData name=\"BFunc\"           defStyleNum=\"dsFunction\"/>\n      <itemData name=\"Comment\"         defStyleNum=\"dsComment\"/>\n      <itemData name=\"Constant\"        defStyleNum=\"dsKeyword\"/>\n      <itemData name=\"Control\"         defStyleNum=\"dsKeyword\" color=\"#A1A100\" selColor=\"#ffffff\" bold=\"0\" italic=\"0\"/>\n      <itemData name=\"Error\"           defStyleNum=\"dsError\"/>\n      <itemData name=\"Keyword\"         defStyleNum=\"dsKeyword\"/>\n      <itemData name=\"Normal Text\"     defStyleNum=\"dsNormal\"/>\n      <itemData name=\"Numbers\"         defStyleNum=\"dsDecVal\"/>\n      <itemData name=\"Strings\"         defStyleNum=\"dsString\"/>\n      <itemData name=\"Symbols\"         defStyleNum=\"dsOthers\"/>\n      <itemData name=\"Variable\"        defStyleNum=\"dsKeyword\" color=\"#5555FF\" selColor=\"#ffffff\" bold=\"0\" italic=\"0\" />\n    </itemDatas>\n  </highlighting>\n  <general>\n    <comments>\n      <comment name=\"singleLine\" start=\"--\" />\n      <comment name=\"multiLine\" start=\"--[[\" end=\"]]\" />\n    </comments>\n    <keywords casesensitive=\"1\" weakDeliminator=\"&#46;\" additionalDeliminator=\"&quot;\"/>\n  </general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/makefile.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<!-- Makefile syntaxfile v0.9 by Per Wigren <wigren@home.se> -->\n<!-- Modified by Joseph Wenninger <jowenn@kde.org> -->\n<!-- Modified by Rui Santana <santana.rui@gmail.com> -->\n<!-- v2.0 by Andreas Nordal <andreas.nordal@gmail.com> -->\n<!-- small priority to allow for example Makefile.cpp to be detected as cpp file -->\n<!-- v2.1 by Alex Turbov <i.zaufi@gmail.com>\n     improve comments handling -->\n<!-- v4 by Alex Richardson <arichardson.kde@gmail.com>\n     added bmake support -->\n<!-- v10 by Peter J. Mello <admin@petermello.net>\n     Add recognition of POSIX 2013 '::=' operator for variable assignment -->\n<language name=\"Makefile\" section=\"Other\"\n          version=\"13\" kateversion=\"5.0\"\n          extensions=\"GNUmakefile;Makefile;makefile;GNUmakefile.*;Makefile.*;makefile.*;*.mk\"\n          mimetype=\"text/x-makefile\" priority=\"11\"\n          author=\"Per Wigren (wigren@home.se)\" license=\"\">\n  <highlighting>\n    <list name = \"keywords\" >\n      <item>include</item>\n      <item>-include</item>\n      <item>define</item>\n      <item>endef</item>\n    </list>\n    <!-- https://www.gnu.org/software/make/manual/html_node/Conditional-Syntax.html -->\n    <list name=\"gmake_if_keywords\">\n      <item>if</item>\n      <item>ifeq</item>\n      <item>ifneq</item>\n      <item>ifdef</item>\n      <item>ifndef</item>\n    </list>\n    <list name=\"gmake_else_keywords\"><item>else</item></list>\n    <list name=\"gmake_endif_keywords\"><item>endif</item></list>\n    <!-- bmake statements: https://www.freebsd.org/cgi/man.cgi?make(1)#INCLUDE_STATEMENTS,_CONDITIONALS_AND_FOR_LOOPS -->\n    <list name=\"bmake_if_keywords\">\n      <item>.if</item>\n      <item>.ifdef</item>\n      <item>.ifndef</item>\n      <item>.ifmake</item>\n      <item>.ifnmake</item>\n    </list>\n    <list name=\"bmake_else_keywords\">\n      <item>.elif</item>\n      <item>.elifdef</item>\n      <item>.elifndef</item>\n      <item>.elifmake</item>\n      <item>.elifnmake</item>\n      <item>.else</item> <!-- TODO: anything following .else should be highlighted as an error -->\n    </list>\n    <list name=\"bmake_endif_keywords\"><item>.endif</item></list>\n\n    <list name=\"bmake_expressions\">\n      <item>defined</item>\n      <item>empty</item>\n      <item>exists</item>\n      <item>target</item>\n      <item>commands</item>\n    </list>\n\n    <list name=\"bmake_include_stmt\">\n      <item>.include</item>\n      <item>.-include</item>\n      <item>.sinclude</item>\n      <!-- For compat bmake also handles include but this is already highlighted. <item>include</item> -->\n    </list>\n    <list name=\"bmake_message_stmt\">\n      <item>.info</item>\n      <item>.warning</item>\n      <item>.error</item>\n    </list>\n    <!-- Use single element list here so that .for/.endfor also shows up in code completion -->\n    <list name=\"bmake_for_stmt\"><item>.for</item></list>\n    <list name=\"bmake_endfor_stmt\"><item>.endfor</item></list>\n\n    <!-- https://www.freebsd.org/cgi/man.cgi?make(1)#SPECIAL_TARGETS -->\n    <list name=\"bmake_special_targets\">\n      <item>.BEGIN</item>\n      <item>.DEFAULT</item>\n      <item>.END</item>\n      <item>.ERROR</item>\n      <item>.IGNORE</item>\n      <item>.INTERRUPT</item>\n      <item>.MAIN</item>\n      <item>.MAKEFLAGS</item>\n      <item>.NOPATH</item>\n      <item>.NOTPARALLEL</item>\n      <item>.NO_PARALLEL</item>\n      <item>.OBJDIR</item>\n      <item>.ORDER</item>\n      <item>.PATH</item>\n      <item>.PHONY</item>\n      <item>.PRECIOUS</item>\n      <item>.SHELL</item>\n      <item>.SILENT</item>\n      <item>.STALE</item>\n      <item>.SUFFIXES</item>\n    </list>\n    <!-- https://www.freebsd.org/cgi/man.cgi?make(1)#SPECIAL_SOURCES_(ATTRIBUTES) -->\n    <list name=\"bmake_special_sources\">\n      <item>.EXEC</item>\n      <item>.IGNORE</item>\n      <item>.MADE</item>\n      <item>.MAKE</item>\n      <item>.META</item>\n      <item>.NOMETA</item>\n      <item>.NOMETA_CMP</item>\n      <item>.NOPATH</item>\n      <item>.NOTMAIN</item>\n      <item>.OPTIONAL</item>\n      <item>.PHONY</item>\n      <item>.PRECIOUS</item>\n      <item>.RECURSIVE</item>\n      <item>.SILENT</item>\n      <item>.USE</item>\n      <item>.USEBEFORE</item>\n      <item>.WAIT</item>\n    </list>\n\n    <list name=\"bmake_other_stmts\">\n      <item>.unexport-env</item>\n      <item>.unexport</item>\n      <item>.undef</item>\n      <item>.export-env</item>\n      <item>.export</item>\n    </list>\n\n    <list name = \"functions\">\n      <item>call</item>\n      <item>subst</item>\n      <item>patsubst</item>\n      <item>strip</item>\n      <item>findstring</item>\n      <item>filter</item>\n      <item>filter-out</item>\n      <item>sort</item>\n      <item>word</item>\n      <item>wordlist</item>\n      <item>words</item>\n      <item>firstword</item>\n      <item>lastword</item>\n      <item>dir</item>\n      <item>notdir</item>\n      <item>suffix</item>\n      <item>basename</item>\n      <item>addsuffix</item>\n      <item>addprefix</item>\n      <item>join</item>\n      <item>wildcard</item>\n      <item>realpath</item>\n      <item>abspath</item>\n      <item>if</item>\n      <item>or</item>\n      <item>and</item>\n      <item>foreach</item>\n      <item>value</item>\n      <item>eval</item>\n      <item>origin</item>\n      <item>flavor</item>\n      <item>shell</item>\n      <item>error</item>\n      <item>warning</item>\n      <item>info</item>\n    </list>\n    <contexts>\n      <context name=\"normal\" attribute=\"Normal\" lineEndContext=\"#stay\">\n        <DetectSpaces/>\n        <DetectChar attribute=\"Comment\" context=\"Comment\" char=\"#\"/>\n        <keyword attribute=\"ControlFlow\" String=\"bmake_if_keywords\" context=\"bmake_conditional\" beginRegion=\"bmake_if\" firstNonSpace=\"true\"/>\n        <!--TODO: trailing non-space after .else should be highlighted as an error -->\n        <keyword attribute=\"ControlFlow\" String=\"bmake_else_keywords\" context=\"bmake_conditional\" endRegion=\"bmake_if\" beginRegion=\"bmake_if\" firstNonSpace=\"true\"/>\n        <keyword attribute=\"ControlFlow\" String=\"bmake_endif_keywords\" context=\"#stay\" endRegion=\"bmake_if\"/>\n\n        <keyword attribute=\"ControlFlow\" String=\"gmake_if_keywords\" context=\"#stay\" beginRegion=\"gmake_if\" firstNonSpace=\"true\"/>\n        <!--TODO: trailing non-space after .else should be highlighted as an error -->\n        <keyword attribute=\"ControlFlow\" String=\"gmake_else_keywords\" context=\"gmake_else\" endRegion=\"gmake_if\" beginRegion=\"gmake_if\" firstNonSpace=\"true\"/>\n        <keyword attribute=\"ControlFlow\" String=\"gmake_endif_keywords\" context=\"#stay\" endRegion=\"gmake_if\"/>\n\n        <keyword attribute=\"Keyword\"  context=\"#stay\" String=\"keywords\"/>\n        <keyword attribute=\"Keyword\"  context=\"bmake_other_stmts\" String=\"bmake_other_stmts\" firstNonSpace=\"true\"/>\n        <RegExpr attribute=\"Variable\" context=\"assign\" String=\"[^\\s+:?+]*\\s*(?=::=|:=|=|\\+=|\\?=)\"/>\n        <keyword attribute=\"SpecialTarget\" context=\"bmake_special_target\" String=\"bmake_special_targets\" firstNonSpace=\"true\"/>\n        <RegExpr attribute=\"SpecialTarget\" context=\"prereq\" String=\"\\.PATH\\.[^:]*:\" firstNonSpace=\"true\"/>\n        <keyword attribute=\"Keyword\" context=\"bmake_include\" String=\"bmake_include_stmt\" firstNonSpace=\"true\"/>\n        <keyword attribute=\"Keyword\" context=\"bmake_message\" String=\"bmake_message_stmt\" firstNonSpace=\"true\"/>\n        <keyword attribute=\"Keyword\" context=\"bmake_for_loop\" String=\"bmake_for_stmt\" firstNonSpace=\"true\" beginRegion=\"for\"/>\n        <keyword attribute=\"Keyword\" context=\"#stay\" String=\"bmake_endfor_stmt\" firstNonSpace=\"true\" endRegion=\"for\"/>\n\n        <RegExpr attribute=\"Section\"  context=\"prereq\" String=\"^\\.[^.][^:]*:\" column=\"0\"/>\n        <RegExpr attribute=\"Target\"   context=\"prereq\" String=\"^[^:]*:\" column=\"0\"/>\n        <DetectIdentifier/>\n        <DetectChar attribute=\"String\" context=\"string&quot;\" char=\"&quot;\"/>\n        <DetectChar attribute=\"String\" context=\"string'\" char=\"'\"/>\n        <DetectChar attribute=\"Operator\" context=\"dollar\" char=\"$\"/>\n        <Detect2Chars attribute=\"Special\" context=\"#stay\" char=\"\\\" char1=\"#\"/>\n        <Detect2Chars attribute=\"Special\" context=\"#stay\" char=\"\\\" char1=\"\\\"/>\n        <AnyChar attribute=\"Operator\" context=\"silent\" String=\"@-\" firstNonSpace=\"1\"/>\n      </context>\n\n      <context name=\"strings_and_vars\" attribute=\"Normal\" lineEndContext=\"#pop\">\n        <DetectChar attribute=\"Operator\" context=\"dollar\" char=\"$\"/>\n        <DetectChar attribute=\"String\" context=\"string&quot;\" char=\"&quot;\"/>\n        <DetectChar attribute=\"String\" context=\"string'\" char=\"'\"/>\n        <DetectChar attribute=\"Comment\" context=\"Comment\" char=\"#\"/>\n      </context>\n\n      <context name=\"gmake_else\" attribute=\"Normal\" lineEndContext=\"#pop\">\n        <DetectSpaces attribute=\"Normal\"/>\n        <keyword attribute=\"ControlFlow\" String=\"gmake_if_keywords\" context=\"#stay\"/>\n        <IncludeRules context=\"strings_and_vars\"/>\n        <Detect2Chars attribute=\"Special\" context=\"#stay\" char=\"\\\" char1=\"#\"/>\n        <Detect2Chars attribute=\"Special\" context=\"#stay\" char=\"\\\" char1=\"\\\"/>\n        <!-- NOTE: Allow highlighting any variable name (see bug #417379), for example:\n                 else ifdef foo\n                 else ifeq (bar, foo)\n        -->\n      </context>\n\n      <context name=\"bmake_include\" attribute=\"Normal\" lineEndContext=\"#pop\">\n        <DetectSpaces />\n        <RangeDetect char=\"&lt;\"  char1=\"&gt;\" context=\"#stay\" attribute=\"Include\" />\n        <RangeDetect char=\"&quot;\"  char1=\"&quot;\" context=\"#stay\" attribute=\"Include\" />\n      </context>\n\n\n      <context name=\"bmake_conditional\" attribute=\"Normal\" lineEndContext=\"#pop\">\n        <DetectSpaces/>\n        <IncludeRules context=\"strings_and_vars\"/>\n        <keyword attribute=\"Builtin\"  context=\"bmake_expression\" String=\"bmake_expressions\"/>\n        <Detect2Chars attribute=\"RealOperator\" context=\"#stay\" char=\"&amp;\" char1=\"&amp;\"/>\n        <Detect2Chars attribute=\"RealOperator\" context=\"#stay\" char=\"|\" char1=\"|\"/>\n        <Detect2Chars attribute=\"RealOperator\" context=\"#stay\" char=\"!\" char1=\"=\"/>\n        <Detect2Chars attribute=\"RealOperator\" context=\"#stay\" char=\"=\" char1=\"=\"/>\n        <DetectChar attribute=\"RealOperator\" context=\"#stay\" char=\"!\"/>\n        <HlCHex attribute=\"Number\" context=\"#stay\"/>\n        <Int attribute=\"Number\" context=\"#stay\"/>\n        <DetectIdentifier attribute=\"Variable\" context=\"#stay\"/>\n        <LineContinue attribute=\"Operator\" context=\"#stay\"/>\n      </context>\n\n      <context name=\"bmake_for_loop\" attribute=\"Variable\" lineEndContext=\"#pop\">\n        <DetectSpaces/>\n        <IncludeRules context=\"strings_and_vars\"/>\n        <WordDetect attribute=\"RealOperator\" context=\"#stay\" String=\"in\" />\n      </context>\n\n      <context name=\"bmake_other_stmts\" attribute=\"Variable\" lineEndContext=\"#pop\">\n        <DetectSpaces/>\n        <IncludeRules context=\"strings_and_vars\"/>\n      </context>\n\n      <context name=\"bmake_expression\" attribute=\"Variable\" lineEndContext=\"#pop\">\n        <DetectSpaces/>\n        <IncludeRules context=\"strings_and_vars\"/>\n        <DetectChar attribute=\"Normal\" context=\"#stay\" char=\"(\"/>\n        <DetectChar attribute=\"Normal\" context=\"#pop\" char=\")\"/>\n        <DetectIdentifier attribute=\"Variable\"/>\n      </context>\n\n      <context name=\"bmake_special_target\" attribute=\"Error\" lineEndContext=\"rule\">\n        <!-- anything but spaces before the : should be an error -->\n        <DetectSpaces attribute=\"Normal\" />\n        <DetectChar attribute=\"SpecialTarget\" context=\"#pop!prereq\" char=\":\"/>\n      </context>\n\n      <context name=\"bmake_message\" attribute=\"String\" lineEndContext=\"#pop\">\n        <DetectChar attribute=\"Operator\" context=\"dollar\" char=\"$\"/>\n      </context>\n\n      <context name=\"prereq\" attribute=\"Prereq\" lineEndContext=\"rule\">\n        <DetectSpaces/>\n        <keyword attribute=\"SpecialPrereq\" context=\"#stay\" String=\"bmake_special_sources\"/>\n        <DetectIdentifier/>\n        <LineContinue attribute=\"Operator\" context=\"#stay\"/>\n        <DetectChar attribute=\"Operator\" context=\"dollar\" char=\"$\"/>\n        <Detect2Chars attribute=\"Special\" context=\"#stay\" char=\"\\\" char1=\"#\"/>\n        <Detect2Chars attribute=\"Special\" context=\"#stay\" char=\"\\\" char1=\"\\\"/>\n        <DetectChar attribute=\"Comment\" context=\"Comment\" char=\"#\"/>\n      </context>\n\n      <context name=\"rule\" attribute=\"Normal\" lineEndContext=\"#stay\">\n        <LineContinue attribute=\"Operator\" context=\"#stay\"/>\n        <!-- pop if there is a leading non-tab,\n        and in particular, mark leading spaces as errors -->\n        <RegExpr attribute=\"Error\" context=\"#pop#pop#pop\" String=\"^ +\" firstNonSpace=\"1\"/>\n        <RegExpr context=\"#pop#pop#pop\" String=\"^[^\\t]\" lookAhead=\"1\" firstNonSpace=\"1\"/>\n        <DetectSpaces/>\n        <DetectIdentifier/>\n        <DetectChar attribute=\"String\" context=\"string&quot;\" char=\"&quot;\"/>\n        <DetectChar attribute=\"String\" context=\"string'\" char=\"'\"/>\n        <DetectChar attribute=\"Operator\" context=\"dollar\" char=\"$\"/>\n        <Detect2Chars attribute=\"Special\" context=\"#stay\" char=\"\\\" char1=\"#\"/>\n        <Detect2Chars attribute=\"Special\" context=\"#stay\" char=\"\\\" char1=\"\\\"/>\n        <AnyChar attribute=\"Operator\" context=\"silent\" String=\"@-\" firstNonSpace=\"1\"/>\n        <DetectChar attribute=\"Comment\" context=\"Comment\" char=\"#\"/>\n      </context>\n\n      <context name=\"silent\" attribute=\"Silent\" lineEndContext=\"#pop\">\n        <LineContinue attribute=\"Operator\" context=\"#stay\"/>\n        <DetectSpaces/>\n        <DetectIdentifier/>\n        <DetectChar attribute=\"String\" context=\"string&quot;\" char=\"&quot;\"/>\n        <DetectChar attribute=\"String\" context=\"string'\" char=\"'\"/>\n        <DetectChar attribute=\"Operator\" context=\"dollar\" char=\"$\"/>\n        <Detect2Chars attribute=\"Special\" context=\"#stay\" char=\"\\\" char1=\"#\"/>\n        <Detect2Chars attribute=\"Special\" context=\"#stay\" char=\"\\\" char1=\"\\\"/>\n        <DetectChar attribute=\"Comment\" context=\"Comment\" char=\"#\"/>\n      </context>\n\n      <context name=\"string&quot;\" attribute=\"String\" lineEndContext=\"#pop\">\n        <LineContinue attribute=\"Operator\" context=\"#stay\"/>\n        <DetectChar attribute=\"String\" context=\"#pop\" char=\"&quot;\"/>\n        <DetectChar attribute=\"Operator\" context=\"dollar\" char=\"$\"/>\n      </context>\n\n      <context name=\"string'\" attribute=\"String\" lineEndContext=\"#pop\">\n        <LineContinue attribute=\"String\" context=\"#stay\"/>\n        <DetectChar attribute=\"String\" context=\"#pop\" char=\"'\"/>\n        <DetectChar attribute=\"Operator\" context=\"dollar\" char=\"$\"/>\n      </context>\n\n      <context name=\"assign\" attribute=\"Operator\" lineEndContext=\"#pop\">\n        <DetectChar attribute=\"Operator\" context=\"value\" char=\"=\"/>\n      </context>\n\n      <context name=\"value\" attribute=\"String\" lineEndContext=\"#pop#pop\">\n        <LineContinue attribute=\"Operator\"/>\n        <DetectChar attribute=\"Operator\" context=\"dollar\" char=\"$\"/>\n        <RegExpr attribute=\"Special\" context=\"#pop#pop\" String=\"@[-_\\d\\w]*@\"/>\n        <DetectChar attribute=\"Operator\" char=\";\" context=\"#pop#pop\"/>\n      </context>\n\n      <context name=\"dollar\" attribute=\"Operator\" lineEndContext=\"#pop\">\n        <DetectChar attribute=\"Operator\" context=\"call(\" char=\"(\"/>\n        <DetectChar attribute=\"Operator\" context=\"call{\" char=\"{\"/>\n        <RegExpr attribute=\"Operator\" context=\"#pop\" String=\".\"/>\n      </context>\n\n      <context name=\"call(\" attribute=\"Variable\" lineEndContext=\"#stay\" fallthroughContext=\"callVar(\" fallthrough=\"1\">\n        <keyword attribute=\"Keyword\" context=\"callFunc(\" String=\"functions\"/>\n      </context>\n\n      <context name=\"call{\" attribute=\"Variable\" lineEndContext=\"#stay\" fallthroughContext=\"callVar{\" fallthrough=\"1\">\n        <keyword attribute=\"Keyword\" context=\"callFunc{\" String=\"functions\"/>\n      </context>\n\n      <context name=\"callVar(\" attribute=\"Variable\" lineEndContext=\"#stay\">\n        <DetectChar attribute=\"Operator\" char=\")\" context=\"#pop#pop#pop\"/>\n        <DetectChar attribute=\"Operator\" context=\"dollar\" char=\"$\"/>\n        <DetectSpaces attribute=\"Error\" context=\"#stay\"/>\n        <DetectChar attribute=\"RealOperator\" context=\"SubstitutionRefs\" char=\":\"/>\n        <AnyChar attribute=\"Error\" context=\"#stay\" String=\"=#\"/>\n      </context>\n\n      <context name=\"callVar{\" attribute=\"Variable\" lineEndContext=\"#stay\">\n        <DetectChar attribute=\"Operator\" char=\"}\" context=\"#pop#pop#pop\"/>\n        <DetectChar attribute=\"Operator\" context=\"dollar\" char=\"$\"/>\n        <DetectSpaces attribute=\"Error\" context=\"#stay\"/>\n        <!-- Handle bmake Variable modifiers: ${variable[:modifier[:...]]} -->\n        <Detect2Chars context=\"#stay\" char=\"\\\" char1=\":\"/>\n        <!-- other modifiers -->\n        <DetectChar attribute=\"RealOperator\" context=\"bmake_var_modifier\" char=\":\"/>\n        <AnyChar attribute=\"Error\" context=\"#stay\" String=\"=#\"/>\n      </context>\n\n      <context name=\"bmake_var_modifier_arg\" attribute=\"VarModifier\" lineEndContext=\"#pop\">\n        <DetectChar attribute=\"Operator\" context=\"dollar\" char=\"$\"/>\n        <Detect2Chars context=\"#stay\" char=\"\\\" char1=\"}\"/>\n        <DetectChar attribute=\"Operator\" char=\"}\" context=\"#pop#pop#pop#pop\"/>\n        <Detect2Chars context=\"#stay\" char=\"\\\" char1=\":\"/>\n        <DetectChar attribute=\"RealOperator\" context=\"#pop!bmake_var_modifier\" char=\":\"/>\n      </context>\n\n      <!-- TODO: once all modifiers are properly handled change fallthroughContext to \"expect}\" -->\n      <context name=\"bmake_var_modifier\" attribute=\"VarModifier\" lineEndContext=\"#pop\" fallthroughContext=\"#pop!bmake_var_modifier_arg\" fallthrough=\"true\">\n        <DetectChar attribute=\"Operator\" context=\"dollar\" char=\"$\"/>\n\n                    <!--\n          TODO :?true_string:false_string\n          TODO :old_string=new_string This is the AT&T System V UNIX style variable substitution.\n          TODO :@temp@string@ This is the loop expansion mechanism from the OSF Development Environment (ODE) make.\n          TODO :!cmd! The output of running cmd is the value.\n          TODO :[range]\n        -->\n        <!--  Modifiers without arguments:-->\n        <!-- :Ox  Randomize words in variable. -->\n        <Detect2Chars attribute=\"Builtin\" context=\"#pop!expect}\" char=\"O\" char1=\"x\"/>\n        <!--\n          :E Replaces each word in the variable with its suffix.\n          :H Replaces each word in the variable with everything but the last component.\n          :O   Order every word in variable alphabetically.\n          :Q   Quotes every shell meta-character in the variable\n          :R   Replaces each word in the variable with everything but its suffix.\n          :T   Replaces each word in the variable with its last component.\n          :u   Remove adjacent duplicate words (like uniq(1)).\n          :L The name of the variable is the value.\n          :P The path of the node which has the same name as the variable is the value.\n        -->\n        <AnyChar    attribute=\"Builtin\" context=\"#pop!expect}\" String=\"EHOQRTuLP\"/>\n        <!-- :sh  If the variable is non-empty it is run as a command and the output becomes the new value. -->\n        <Detect2Chars attribute=\"Builtin\" context=\"#pop!expect}\" char=\"s\" char1=\"h\"/>\n        <!-- :tA  Attempt to convert variable to an absolute path using realpath(3),-->\n        <Detect2Chars attribute=\"Builtin\" context=\"#pop!expect}\" char=\"t\" char1=\"A\"/>\n        <!-- :tl  Converts variable to lower-case letters.-->\n        <Detect2Chars attribute=\"Builtin\" context=\"#pop!expect}\" char=\"t\" char1=\"L\"/>\n        <!--  :gmtime The value is a format string for strftime(3), using the current gmtime(3). -->\n        <StringDetect attribute=\"Builtin\" String=\"gmtime\" context=\"#pop!expect}\" />\n        <!-- :hash Compute a 32bit hash of the value and encode it as hex digits. -->\n        <StringDetect attribute=\"Builtin\" String=\"hash\" context=\"#pop!expect}\" />\n        <!-- :localtime The value is a format string for strftime(3), using the current localtime(3). -->\n        <StringDetect attribute=\"Builtin\" String=\"localtime\" context=\"#pop!expect}\" />\n        <!--Now the modifiers with arguments:-->\n        <!--\n          :Mpattern Select only those words that match pattern.\n          :Npattern This is identical to `:M', but selects all words which do not match pattern.\n          :Dnewval If the variable is defined newval is the value.\n          :Unewval If the variable is undefined newval is the value.\n        -->\n        <!-- TODO: add new context to highligh old_string and new_string differently\n          :S/old_string/new_string/[1gW]\n          :C/pattern/replacement/[1gW]\n        -->\n        <AnyChar    attribute=\"Builtin\" context=\"#pop!bmake_var_modifier_arg\" String=\"MNDUSC\"/>\n        <!-- ::=str The variable is assigned the value str after substitution. -->\n        <Detect2Chars attribute=\"Builtin\" context=\"#pop!bmake_var_modifier_arg\" char=\":\" char1=\"=\"/>\n        <!-- ::?=str As for ::= but only if the variable does not already have a value. -->\n        <StringDetect attribute=\"Builtin\" String=\":?=\" context=\"#pop!bmake_var_modifier_arg\" />\n        <!-- ::+=str Append str to the variable. -->\n        <StringDetect attribute=\"Builtin\" String=\":+=\" context=\"#pop!bmake_var_modifier_arg\" />\n        <!-- ::!=cmd Assign the output of cmd to the variable. -->\n        <StringDetect attribute=\"Builtin\" String=\":!=\" context=\"#pop!bmake_var_modifier_arg\" />\n        <!-- :tu  Converts variable to upper-case letters. -->\n        <Detect2Chars attribute=\"Builtin\" context=\"#pop!bmake_var_modifier_arg\" char=\"t\" char1=\"u\"/>\n        <!-- :tW  Causes the value to be treated as a single word.  See also `:[*]'. -->\n        <Detect2Chars attribute=\"Builtin\" context=\"#pop!bmake_var_modifier_arg\" char=\"t\" char1=\"W\"/>\n        <!-- :tw  Causes the value to be treated as a sequence of words delimited by white space.  See also `:[@]'.-->\n        <Detect2Chars attribute=\"Builtin\" context=\"#pop!bmake_var_modifier_arg\" char=\"t\" char1=\"w\"/>\n        <!-- :tsc Words in the variable are normally separated by a space on\n          expansion.  This modifier sets the separator to the character c.  If\n          c is omitted, then no separator is used.  The common escapes\n          (including octal numeric codes), work as expected. -->\n        <Detect2Chars attribute=\"Builtin\" context=\"#pop!bmake_var_modifier_arg\" char=\"t\" char1=\"s\"/>\n\n        <IncludeRules context=\"bmake_var_modifier_arg\"/>\n      </context>\n\n      <context name=\"expect}\" attribute=\"Error\" lineEndContext=\"#pop#pop#pop#pop\">\n        <Detect2Chars context=\"#stay\" char=\"\\\" char1=\"}\"/>\n        <DetectChar attribute=\"Operator\" char=\"}\" context=\"#pop#pop#pop#pop\"/>\n      </context>\n\n      <context name=\"callFunc(\" attribute=\"FuncParam\" lineEndContext=\"#stay\">\n        <DetectChar attribute=\"Operator\" char=\")\" context=\"#pop#pop#pop\"/>\n        <DetectChar attribute=\"Operator\" context=\"dollar\" char=\"$\"/>\n        <DetectChar attribute=\"Keyword\" context=\"#stay\" char=\",\"/>\n        <DetectChar attribute=\"String\" context=\"string'\" char=\"'\"/>\n      </context>\n\n      <context name=\"callFunc{\" attribute=\"FuncParam\" lineEndContext=\"#stay\">\n        <DetectChar attribute=\"Operator\" char=\"}\" context=\"#pop#pop#pop\"/>\n        <DetectChar attribute=\"Operator\" context=\"dollar\" char=\"$\"/>\n        <DetectChar attribute=\"Keyword\" context=\"#stay\" char=\",\"/>\n        <DetectChar attribute=\"String\" context=\"string'\" char=\"'\"/>\n      </context>\n\n      <!-- $(var:pattern=replacement) -->\n      <context name=\"SubstitutionRefs\" attribute=\"VarModifier\" lineEndContext=\"#stay\">\n        <DetectChar attribute=\"RealOperator\" context=\"#pop!SubstitutionRefsReplacement\" char=\"=\"/>\n        <IncludeRules context=\"SubstitutionRefsReplacement\"/>\n      </context>\n      <context name=\"SubstitutionRefsReplacement\" attribute=\"VarModifier\" lineEndContext=\"#stay\">\n        <DetectChar attribute=\"Operator\" char=\")\" context=\"#pop#pop#pop#pop\"/>\n        <DetectChar attribute=\"Operator\" context=\"dollar\" char=\"$\"/>\n      </context>\n\n      <context attribute=\"Comment\" lineEndContext=\"#pop\" name=\"Comment\">\n        <LineContinue attribute=\"Comment\" context=\"#stay\" />\n        <IncludeRules context=\"##Comments\" />\n      </context>\n\n    </contexts>\n    <itemDatas>\n      <itemData name=\"Normal\"    defStyleNum=\"dsNormal\" spellChecking=\"0\"/>\n      <itemData name=\"Keyword\"   defStyleNum=\"dsKeyword\" spellChecking=\"0\"/>\n      <itemData name=\"Comment\"   defStyleNum=\"dsComment\"/>\n      <itemData name=\"String\"    defStyleNum=\"dsString\" spellChecking=\"0\"/>\n      <itemData name=\"Variable\"  defStyleNum=\"dsDataType\" spellChecking=\"0\"/>\n      <itemData name=\"Target\"    defStyleNum=\"dsDecVal\" spellChecking=\"0\"/>\n      <itemData name=\"Section\"   defStyleNum=\"dsOthers\" spellChecking=\"0\"/>\n      <itemData name=\"Prereq\"    defStyleNum=\"dsDataType\" spellChecking=\"0\"/>\n      <itemData name=\"FuncParam\" defStyleNum=\"dsString\" spellChecking=\"0\"/>\n      <itemData name=\"Operator\"  defStyleNum=\"dsChar\" spellChecking=\"0\"/>\n      <itemData name=\"Silent\"    defStyleNum=\"dsFunction\" spellChecking=\"0\"/>\n      <itemData name=\"Special\"   defStyleNum=\"dsFloat\" spellChecking=\"0\"/>\n      <itemData name=\"Error\"     defStyleNum=\"dsError\" spellChecking=\"0\"/>\n      <itemData name=\"Builtin\"   defStyleNum=\"dsBuiltIn\" spellChecking=\"0\"/>\n      <itemData name=\"Number\"    defStyleNum=\"dsDecVal\" spellChecking=\"0\"/>\n      <itemData name=\"Include\"   defStyleNum=\"dsImport\" spellChecking=\"0\"/>\n      <itemData name=\"ControlFlow\" defStyleNum=\"dsControlFlow\" spellChecking=\"0\"/>\n      <itemData name=\"VarModifier\" defStyleNum=\"dsSpecialString\" spellChecking=\"0\"/>\n      <itemData name=\"RealOperator\" defStyleNum=\"dsKeyword\" spellChecking=\"0\"/>\n      <itemData name=\"SpecialTarget\" defStyleNum=\"dsOthers\" spellChecking=\"0\" bold=\"1\"/>\n      <itemData name=\"SpecialPrereq\" defStyleNum=\"dsDataType\" spellChecking=\"0\" bold=\"1\"/>\n    </itemDatas>\n  </highlighting>\n  <general>\n    <comments>\n      <comment name = \"singleLine\" start = \"#\"/>\n    </comments>\n    <!-- '-' is not a deliminator in function filter-out -->\n    <keywords casesensitive=\"1\" weakDeliminator = \".-\"/>\n  </general>\n</language>\n<!-- kate: syntax XML; space-indent on; indent-width 2; replace-tabs on; -->\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/markdown.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n\tKate syntax highlight filter for Markdown/MultiMarkdown documents.\n\n\tCopyright 2008 Darrin Yeager. http://www.dyeager.org/\n\tDual-Licensed under both GPL and BSD licenses.\n\n\tExtended 2009 Claes Holmerson. http://github.com/claes/kate-markdown/\n-->\n\n\n<!-- the [^\\s]{1} is in the regex to avoid interfering with bullet list which\n\t  starts \"* item\". Thus emphasis/strong MUST be formed like *words here*\n\t  with the asterisks next to the beginning of the first word.\n\n\t  Match space or newline, followed by \"*\", followed by one non-space,\n\t  followed by anything non-asterisk, followed by \"*\", followed by\n\t  space, end-of-sentence punctuation, or the end of the line.\n-->\n<!DOCTYPE language SYSTEM \"language.dtd\"\n\t\t\t [\n\t\t\t <!ENTITY strongemphasisregex \"(\\s|^)[\\*_]{3}[^\\*_]+[\\*_]{3}(\\s|\\.|,|;|:|\\-|\\?|$)\">\n\t\t\t <!ENTITY strongregex \"(\\s|^)[\\*_]{2}[^\\s]{1}[^\\*_]+[\\*_]{2}(\\s|\\.|,|;|:|\\-|\\?|$)\">\n\t\t\t <!ENTITY emphasisregex \"(\\s|^)[\\*_]{1}[^\\s]{1}[^\\*_]+[\\*_]{1}(\\s|\\.|,|;|:|\\-|\\?|$)\">\n\t\t\t <!ENTITY reflinkregex '\\[[^\\]\\^]+\\]\\s*\\[[^\\]]*\\]\\s*(\\s+\\\"[^\\\"]*\\\"){0,1}'>\n\t\t\t <!ENTITY reflinktargetregex '\\[[^\\]\\^]+\\]\\:\\s+[^\\s]+(\\s+\\\"[^\\\"]*\\\"){0,1}'>\n\t\t\t <!ENTITY footnoteregex \"\\[\\^[^\\]]+\\]\">\n\t\t\t <!ENTITY inlinelinkregex '\\[[^\\]\\^]+\\]\\s*\\([^\\(]*\\)'>\n\t\t\t <!ENTITY inlineimageregex '\\!\\[[^\\]\\^]+\\]\\([^\\(]*\\)'>\n\t\t\t <!ENTITY refimageregex '\\!\\[[^\\]\\^]+\\]\\[[^\\[]*\\]'>\n\t\t\t <!ENTITY autolinkregex '&lt;(https?|ftp):[^\\\"&gt;\\s]+&gt;'>\n\t\t\t <!ENTITY mailtolinkregex '&lt;(?:mailto:)?([-.\\w]+\\@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)&gt;'>\n\t\t\t <!ENTITY rulerregex '\\s*([\\*\\-_]\\s?){3,}\\s*'>\n\t\t\t <!-- two spaces at end of line generates linebreak -->\n\t\t\t <!ENTITY linebreakregex \"  $\">\n\t\t\t <!ENTITY strikeoutregex \"[~]{2}[^~].*[^~][~]{2}\"> <!-- pandoc style -->\n]>\n\n<language name=\"Markdown\" version=\"1.2\" section=\"Markup\"\n\t\textensions=\"*.text;*.md;*.mmd;*.markdown\" \n\t\tmimetype=\"text/x-markdown\"\n\t\tpackage=\"mardkdown\"\n\t\tpriority=\"15\"\n\t\tauthor=\"Darrin Yeager, Claes Holmerson\"\n\t\tlicense=\"GPL,BSD\" >\n\n\t<highlighting>\n\n\t\t<contexts>\n\t\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Normal Text\" >\n\t\t\t\t<DetectChar context=\"blockquote\" char=\"&gt;\" column=\"0\"/>\n\t\t\t\t<RegExpr attribute=\"h1\" String=\"^#\\s.*[#]?$\" />\n\t\t\t\t<RegExpr attribute=\"h1\" String=\"^==+$\" />\n\t\t\t\t<RegExpr attribute=\"h2\" String=\"^##\\s.*[#]?$\" />\n\t\t\t\t<RegExpr attribute=\"h2\" String=\"^--+$\" />\n\t\t\t\t<RegExpr attribute=\"h3\" String=\"^###\\s.*[#]?$\" />\n\t\t\t\t<RegExpr attribute=\"h4\" String=\"^####\\s.*[#]?$\" />\n\t\t\t\t<RegExpr attribute=\"h5\" String=\"^#####\\s.*[#]?$\" />\n\t\t\t\t<RegExpr attribute=\"ruler\" String=\"&rulerregex;\" />\n\t\t\t\t<RegExpr attribute=\"strong\" String=\"&strongregex;\" />\n\t\t\t\t<RegExpr attribute=\"emphasis\" String=\"&emphasisregex;\" />\n\t\t\t\t<RegExpr attribute=\"strongemphasis\" String=\"&strongemphasisregex;\" />\n\t\t\t\t<RegExpr attribute=\"code\" String=\"^([\\s]{4,}|\\t+).*$\" />\n\t\t\t\t<RegExpr context=\"bullet\" String=\"^([\\s]{0,3})[\\*\\+\\-]\\s\" />\n\t\t\t\t<RegExpr context=\"numlist\" String=\"^([\\s]{0,3})[\\d]+\\.\\s\" />\n\t\t\t\t<RegExpr attribute=\"meta\" String=\"^(Title|Author|Date|Copyright|Revision|CSS|LaTeX\\ XSLT|Categories|Tags|BaseName|Excerpt):(.*)+$\" />\n\t\t\t\t<IncludeRules context=\"inc\" />\n\n\t\t\t\t<!-- GitHub highlighted code -->\n\t\t\t\t<RegExpr attribute=\"code\" context=\"highlightcpp\" String=\"^```c\\+\\+$\" beginRegion=\"code\" />\n\t\t\t\t<RegExpr attribute=\"code\" context=\"highlightnone\" String=\"^```[^\\s]*\" beginRegion=\"code\" />\n\t\t\t</context>\n\n\t\t\t<context attribute=\"blockquote\" lineEndContext=\"#pop\" name=\"blockquote\">\n\t\t\t\t<RegExpr attribute=\"bq-strong\" String=\"&strongregex;\" />\n\t\t\t\t<RegExpr attribute=\"bq-emphasis\" String=\"&emphasisregex;\" />\n\t\t\t\t<IncludeRules context=\"inc\" />\n\t\t\t</context>\n\n\t\t\t<context attribute=\"bullet\" lineEndContext=\"#pop\" name=\"bullet\" >\n\t\t\t\t<RegExpr attribute=\"bl-strong\" String=\"&strongregex;\" />\n\t\t\t\t<RegExpr attribute=\"bl-emphasis\" String=\"&emphasisregex;\" />\n\t\t\t\t<IncludeRules context=\"inc\" />\n\t\t\t</context>\n\n\t\t\t<context attribute=\"numlist\" lineEndContext=\"#pop\" name=\"numlist\" >\n\t\t\t\t<RegExpr attribute=\"nl-strong\" String=\"&strongregex;\" />\n\t\t\t\t<RegExpr attribute=\"nl-emphasis\" String=\"&emphasisregex;\" />\n\t\t\t\t<IncludeRules context=\"inc\" />\n\t\t\t</context>\n\n\t\t\t<context attribute=\"comment\" lineEndContext=\"#stay\" name=\"comment\" >\n\t\t\t\t<RegExpr String=\"--&gt;\" attribute=\"comment\" context=\"#pop\" endRegion=\"comment\"/>\n\t\t\t</context>\n\n\t\t\t<context attribute=\"common\" name=\"inc\" lineEndContext=\"#stay\" >\n\t\t\t\t<RegExpr attribute=\"code\" String=\"`[^`]+`\" />\n\t\t\t\t<RegExpr context=\"comment\" String=\"&lt;!--\" beginRegion=\"comment\" />\n\t\t\t\t<RegExpr attribute=\"reflink\" String=\"&reflinkregex;\" />\n\t\t\t\t<RegExpr attribute=\"footnote\" String=\"&footnoteregex;\" />\n\t\t\t\t<RegExpr attribute=\"inlinelink\" String=\"&inlinelinkregex;\"/>\n\t\t\t\t<RegExpr attribute=\"reflinktarget\" String=\"&reflinktargetregex;\"/>\n\t\t\t\t<RegExpr attribute=\"inlineimage\" String=\"&inlineimageregex;\"/>\n\t\t\t\t<RegExpr attribute=\"refimage\" String=\"&refimageregex;\"/>\n\t\t\t\t<RegExpr attribute=\"autolink\" String=\"&autolinkregex;\"/>\n\t\t\t\t<RegExpr attribute=\"mailtolink\" String=\"&mailtolinkregex;\"/>\n\t\t\t\t<RegExpr attribute=\"strikeout\" minimal=\"true\" String=\"&strikeoutregex;\"/>\n\t\t\t\t<RegExpr attribute=\"linebreak\" minimal=\"true\" String=\"&linebreakregex;\"/>\n\t\t\t</context>\n\n\t\t\t<!-- GitHub highlighted code -->\n\n\t\t\t<context attribute=\"Normal Text\" name=\"highlightnone\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"inccode\" />\n\t\t\t</context>\n\n\t\t\t<context attribute=\"Normal Text\" name=\"highlightcpp\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"##C++\" />\n\t\t\t\t<IncludeRules context=\"inccode\" />\n\t\t\t</context>\n\n\t\t\t<context attribute=\"common\" name=\"inccode\" lineEndContext=\"#stay\" >\n\t\t\t\t<RegExpr attribute=\"code\" context=\"#pop\" String=\"^```$\" endRegion=\"code\" />\n\t\t\t</context>\n\t\t</contexts>\n\n\t\t<itemDatas>\n\t\t\t<itemData name=\"Normal Text\" defStyleNum=\"dsNormal\" />\n\t\t\t<itemData name=\"common\" defStyleNum=\"dsNormal\" />\n\t\t\t<itemData name=\"strongemphasis\" defStyleNum=\"dsNormal\" italic=\"true\" bold=\"true\"/>\n\t\t\t<itemData name=\"emphasis\" defStyleNum=\"dsNormal\" italic=\"true\" />\n\t\t\t<itemData name=\"strong\" defStyleNum=\"dsNormal\" bold=\"true\" />\n\t\t\t<itemData name=\"ruler\" defStyleNum=\"dsNormal\" bold=\"true\" />\n\t\t\t<itemData name=\"strikeout\" defStyleNum=\"dsNormal\" strikeOut=\"true\" />\n\t\t\t<itemData name=\"linebreak\" defStyleNum=\"dsNormal\" underline=\"true\" color=\"#999999\"/>\n\t\t\t<itemData name=\"h1\" defStyleNum=\"dsFunction\" bold=\"true\" />\n\t\t\t<itemData name=\"h2\" defStyleNum=\"dsFunction\" bold=\"true\" />\n\t\t\t<itemData name=\"h3\" defStyleNum=\"dsFunction\" bold=\"true\" />\n\t\t\t<itemData name=\"h4\" defStyleNum=\"dsFunction\" bold=\"true\" />\n\t\t\t<itemData name=\"h5\" defStyleNum=\"dsFunction\" bold=\"true\" />\n\t\t\t<itemData name=\"blockquote\" defStyleNum=\"dsDataType\" />\n\t\t\t<itemData name=\"bq-emphasis\" defStyleNum=\"dsDataType\" italic=\"true\" />\n\t\t\t<itemData name=\"bq-strong\" defStyleNum=\"dsDataType\" bold=\"true\" />\n\t\t\t<itemData name=\"bullet\" defStyleNum=\"dsFloat\" />\n\t\t\t<itemData name=\"bl-emphasis\" defStyleNum=\"dsFloat\" italic=\"true\" />\n\t\t\t<itemData name=\"bl-strong\" defStyleNum=\"dsFloat\" bold=\"true\" />\n\t\t\t<itemData name=\"numlist\" defStyleNum=\"dsFloat\" />\n\t\t\t<itemData name=\"nl-emphasis\" defStyleNum=\"dsFloat\" italic=\"true\" />\n\t\t\t<itemData name=\"nl-strong\" defStyleNum=\"dsFloat\" bold=\"true\" />\n\t\t\t<itemData name=\"comment\"  defStyleNum=\"dsComment\" />\n\t\t\t<itemData name=\"code\" defStyleNum=\"dsBaseN\" />\n\t\t\t<itemData name=\"reflink\" defStyleNum=\"dsOthers\" underline=\"true\" />\n\t\t\t<itemData name=\"inlinelink\" defStyleNum=\"dsOthers\" underline=\"true\" />\n\t\t\t<itemData name=\"autolink\" defStyleNum=\"dsOthers\" underline=\"true\" />\n\t\t\t<itemData name=\"mailtolink\" defStyleNum=\"dsOthers\" underline=\"true\" />\n\t\t\t<itemData name=\"footnote\" defStyleNum=\"dsOthers\" italic=\"true\" />\n\t\t\t<itemData name=\"meta\"  defStyleNum=\"dsComment\" />\n\t\t\t<itemData name=\"reflinktarget\" defStyleNum=\"dsOthers\" italic=\"false\" bold=\"false\" />\n\t\t\t<itemData name=\"inlineimage\" defStyleNum=\"dsAlert\" italic=\"false\" bold=\"false\" />\n\t\t\t<itemData name=\"refimage\" defStyleNum=\"dsAlert\" italic=\"false\" bold=\"false\" />\n\t\t</itemDatas>\n\n\t</highlighting>\n\n\t<general>\n\t\t<comments>\n\t\t\t<comment name=\"multiLine\" start=\"&lt;!--\" end=\"--&gt;\" region=\"comment\" />\n\t\t</comments>\n\t</general>\n\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/perl.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<!--\n   This file is part of the KDE project\n   Copyright (C) 2001, 2002, 2003, 2004 Anders Lund <anders@alweb.dk>\n\n   This library is free software; you can redistribute it and/or\n   modify it under the terms of the GNU Library General Public\n   License version 2 as published by the Free Software Foundation.\n\n   This library is distributed in the hope that it will be useful,\n   but WITHOUT ANY WARRANTY; without even the implied warranty of\n   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n   Library General Public License for more details.\n\n   You should have received a copy of the GNU Library General Public License\n   along with this library; see the file COPYING.LIB.  If not, write to\n   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n   Boston, MA 02110-1301, USA.\n\n   *** NOTICE ***\n   This file is maintained by Anders Lund <anders@alweb.dk>\n   Please do not commit changes without checking with me.\n\n   *** TODO ***\n\n   Work on the comment support in the REPLACEMENT part of s/// - we may support\n   the comment, if the line remainder does not contain the delimiter char.\n\n   Try to support ?PATTERN? (at least in one line, like if \"\\?(?=.*\\?)\" matches).\n\n   parse code behind '<<HEREDELIMITER' as code, or at least ignore it, to eol.\n   Requires the ability to pass the delimiter through a context level.\n\n   find a here delimiter like '*END*' (Shell.pm). Requires that when a regex is\n   inserting a dynamic string, it escapes [*(){}$[]\n\n   support for more regex extensions, such as (?>), (?{}), (?(cond)yes|no)\n\n   Enhance tr/// and y/// support.\n-->\n<language name=\"Perl\" version=\"1.26\" kateversion=\"2.4\" section=\"Scripts\" extensions=\"*.pl;*.pm\" mimetype=\"application/x-perl;text/x-perl\" author=\"Anders Lund (anders@alweb.dk)\" license=\"LGPL\">\n  <highlighting>\n    <list name=\"keywords\">\n      <item> if </item>\n      <item> unless </item>\n      <item> else </item>\n      <item> elsif </item>\n      <item> while </item>\n      <item> until </item>\n      <item> for </item>\n      <item> each </item>\n      <item> foreach </item>\n      <item> next </item>\n      <item> last </item>\n      <item> break </item>\n      <item> continue </item>\n      <item> return </item>\n      <item> my </item>\n      <item> our </item>\n      <item> local </item>\n      <item> state </item>\n      <item> BEGIN </item>\n      <item> END </item>\n      <item> package </item>\n      <item> sub </item>\n      <item> do </item>\n      <item> given  </item>\n      <item> when  </item>\n      <item> default </item>\n      <item> __END__ </item>\n      <item> __DATA__ </item>\n      <item> __FILE__ </item>\n      <item> __LINE__ </item>\n      <item> __PACKAGE__ </item>\n    </list>\n    <list name=\"operators\">\n      <item> = </item>\n      <item> != </item>\n      <item> ~= </item>\n      <item> += </item>\n      <item> -= </item>\n      <item> *= </item>\n      <item> /= </item>\n      <item> **= </item>\n      <item> |= </item>\n      <item> ||= </item>\n      <item> //= </item>\n      <item> &amp;= </item>\n      <item> &amp;&amp;= </item>\n      <item> ?= </item>\n      <item> + </item>\n      <item> - </item>\n      <item> * </item>\n     <!-- <item> / </item>//-->\n      <item> % </item>\n      <item> || </item>\n      <item> // </item>\n      <item> &amp;&amp; </item>\n      <item> | </item>\n      <item> &amp; </item>\n      <item> &lt; </item>\n      <item> &lt;&lt; </item>\n      <item> &gt; </item>\n      <item> &gt;&gt; </item>\n      <item> ^ </item>\n      <item> -&gt; </item>\n      <item> =&gt; </item>\n      <item> . </item>\n      <item> , </item>\n      <item> ; </item>\n      <item> :: </item>\n      <item> \\ </item>\n      <item> and </item>\n      <item> or </item>\n      <item> not </item>\n      <item> eq </item>\n      <item> ne </item>\n      <item> lt </item>\n      <item> gt </item>\n      <item> le </item>\n      <item> ge </item>\n      <item> cmp </item>\n    </list>\n    <list name=\"functions\">\n      <item>abs</item>\n      <item>accept</item>\n      <item>alarm</item>\n      <item>atan2</item>\n      <item>bind</item>\n      <item>binmode</item>\n      <item>bless</item>\n      <item>caller</item>\n      <item>chdir</item>\n      <item>chmod</item>\n      <item>chomp</item>\n      <item>chop</item>\n      <item>chown</item>\n      <item>chr</item>\n      <item>chroot</item>\n      <item>close</item>\n      <item>closedir</item>\n      <item>connect</item>\n      <item>cos</item>\n      <item>crypt</item>\n      <item>dbmclose</item>\n      <item>dbmopen</item>\n      <item>defined</item>\n      <item>delete</item>\n      <item>die</item>\n      <item>dump</item>\n      <item>endgrent</item>\n      <item>endhostent</item>\n      <item>endnetent</item>\n      <item>endprotoent</item>\n      <item>endpwent</item>\n      <item>endservent</item>\n      <item>eof</item>\n      <item>eval</item>\n      <item>exec</item>\n      <item>exists</item>\n      <item>exit</item>\n      <item>exp</item>\n      <item>fcntl</item>\n      <item>fileno</item>\n      <item>flock</item>\n      <item>fork</item>\n      <item>format</item>\n      <item>formline</item>\n      <item>getc</item>\n      <item>getgrent</item>\n      <item>getgrgid</item>\n      <item>getgrnam</item>\n      <item>gethostbyaddr</item>\n      <item>gethostbyname</item>\n      <item>gethostent</item>\n      <item>getlogin</item>\n      <item>getnetbyaddr</item>\n      <item>getnetbyname</item>\n      <item>getnetent</item>\n      <item>getpeername</item>\n      <item>getpgrp</item>\n      <item>getppid</item>\n      <item>getpriority</item>\n      <item>getprotobyname</item>\n      <item>getprotobynumber</item>\n      <item>getprotoent</item>\n      <item>getpwent</item>\n      <item>getpwnam</item>\n      <item>getpwuid</item>\n      <item>getservbyname</item>\n      <item>getservbyport</item>\n      <item>getservent</item>\n      <item>getsockname</item>\n      <item>getsockopt</item>\n      <item>glob</item>\n      <item>gmtime</item>\n      <item>goto</item>\n      <item>grep</item>\n      <item>hex</item>\n      <item>import</item>\n      <item>index</item>\n      <item>int</item>\n      <item>ioctl</item>\n      <item>join</item>\n      <item>keys</item>\n      <item>kill</item>\n      <item>last</item>\n      <item>lc</item>\n      <item>lcfirst</item>\n      <item>length</item>\n      <item>link</item>\n      <item>listen</item>\n      <item>localtime</item>\n      <item>lock</item>\n      <item>log</item>\n      <item>lstat</item>\n      <item>map</item>\n      <item>mkdir</item>\n      <item>msgctl</item>\n      <item>msgget</item>\n      <item>msgrcv</item>\n      <item>msgsnd</item>\n      <item>no</item>\n      <item>oct</item>\n      <item>open</item>\n      <item>opendir</item>\n      <item>ord</item>\n      <item>pack</item>\n      <item>package</item>\n      <item>pipe</item>\n      <item>pop</item>\n      <item>pos</item>\n      <item>print</item>\n      <item>printf</item>\n      <item>prototype</item>\n      <item>push</item>\n      <item>quotemeta</item>\n      <item>rand</item>\n      <item>read</item>\n      <item>readdir</item>\n      <item>readline</item>\n      <item>readlink</item>\n      <item>recv</item>\n      <item>redo</item>\n      <item>ref</item>\n      <item>rename</item>\n      <item>require</item>\n      <item>reset</item>\n      <item>return</item>\n      <item>reverse</item>\n      <item>rewinddir</item>\n      <item>rindex</item>\n      <item>rmdir</item>\n      <item>scalar</item>\n      <item>seek</item>\n      <item>seekdir</item>\n      <item>select</item>\n      <item>semctl</item>\n      <item>semget</item>\n      <item>semop</item>\n      <item>send</item>\n      <item>setgrent</item>\n      <item>sethostent</item>\n      <item>setnetent</item>\n      <item>setpgrp</item>\n      <item>setpriority</item>\n      <item>setprotoent</item>\n      <item>setpwent</item>\n      <item>setservent</item>\n      <item>setsockopt</item>\n      <item>shift</item>\n      <item>shmctl</item>\n      <item>shmget</item>\n      <item>shmread</item>\n      <item>shmwrite</item>\n      <item>shutdown</item>\n      <item>sin</item>\n      <item>sleep</item>\n      <item>socket</item>\n      <item>socketpair</item>\n      <item>sort</item>\n      <item>splice</item>\n      <item>split</item>\n      <item>sprintf</item>\n      <item>sqrt</item>\n      <item>srand</item>\n      <item>stat</item>\n      <item>study</item>\n      <item>sub</item>\n      <item>substr</item>\n      <item>symlink</item>\n      <item>syscall</item>\n      <item>sysread</item>\n      <item>sysseek</item>\n      <item>system</item>\n      <item>syswrite</item>\n      <item>tell</item>\n      <item>telldir</item>\n      <item>tie</item>\n      <item>time</item>\n      <item>times</item>\n      <item>truncate</item>\n      <item>uc</item>\n      <item>ucfirst</item>\n      <item>umask</item>\n      <item>undef</item>\n      <item>unlink</item>\n      <item>unpack</item>\n      <item>unshift</item>\n      <item>untie</item>\n      <item>use</item>\n      <item>utime</item>\n      <item>values</item>\n      <item>vec</item>\n      <item>wait</item>\n      <item>waitpid</item>\n      <item>wantarray</item>\n      <item>warn</item>\n      <item>write</item>\n    </list>\n    <list name=\"pragmas\">\n      <item>strict</item>\n      <item>english</item>\n      <item>warnings</item>\n      <item>vars</item>\n      <item>subs</item>\n      <item>utf8</item>\n      <item>sigtrap</item>\n      <item>locale</item>\n      <item>open</item>\n      <item>less</item>\n      <item>integer</item>\n      <item>filetest</item>\n      <item>constant</item>\n      <item>bytes</item>\n      <item>diagnostics</item>\n    </list>\n    <contexts>\n      <context name=\"normal\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Keyword\" context=\"#stay\" String=\"^#!\\/.*\" />\n        <StringDetect attribute=\"Keyword\" context=\"data_handle\" String=\"__DATA__\" firstNonSpace=\"true\" />\n        <StringDetect attribute=\"Keyword\" context=\"#stay\" String=\"__END__\" firstNonSpace=\"true\"/>\n        <RegExpr attribute=\"Keyword\" context=\"sub_name_def\" String=\"\\bsub\\s+\" />\n        <keyword attribute=\"Keyword\" context=\"#stay\" String=\"keywords\" />\n        <keyword attribute=\"Operator\" context=\"#stay\" String=\"operators\" />\n        <keyword attribute=\"Function\" context=\"#stay\" String=\"functions\" />\n        <keyword attribute=\"Pragma\" context=\"#stay\" String=\"pragmas\" />\n        <RegExpr attribute=\"Pod\" context=\"pod\" String=\"\\=(?:head[1-6]|over|back|item|for|begin|end|pod)(\\s|$)\" column=\"0\" beginRegion=\"POD\"/>\n        <DetectSpaces />\n        <DetectChar attribute=\"Comment\" context=\"comment\" char=\"#\" />\n\n        <HlCOct attribute=\"Octal\" context=\"slash_safe_escape\" />\n        <HlCHex attribute=\"Hex\" context=\"slash_safe_escape\" />\n        <Float attribute=\"Float\" context=\"slash_safe_escape\" />\n        <Int attribute=\"Decimal\" context=\"slash_safe_escape\" />\n\n        <RegExpr attribute=\"Normal Text\" context=\"#stay\" String=\"\\\\([&quot;'])[^\\1]\" />\n        <Detect2Chars attribute=\"Normal Text\" context=\"#stay\" char=\"&amp;\" char1=\"'\" /><!-- ??? -->\n        <DetectChar attribute=\"Operator\" context=\"ip_string\" char=\"&quot;\" beginRegion=\"String\" />\n        <DetectChar attribute=\"Operator\" context=\"string\" char=\"'\"  beginRegion=\"String\"/>\n        <DetectChar attribute=\"Operator\" context=\"Backticked\" char=\"`\" />\n\n        <RegExpr attribute=\"Normal Text\" context=\"find_variable\" String=\"(?:[$@]\\S|%[\\w{]|\\*[^\\d\\*{\\$@%=(])\" lookAhead=\"true\" />\n\n        <RegExpr attribute=\"Keyword\" context=\"#stay\" String=\"&lt;[A-Z0-9_]+&gt;\" />\n\n        <RegExpr attribute=\"Operator\" context=\"find_here_document\" String=\"\\s*&lt;&lt;(?=\\w+|\\s*[&quot;'])\" beginRegion=\"HereDocument\" />\n\n        <RegExpr attribute=\"Normal Text\" context=\"#stay\" String=\"\\s*\\}\\s*/{1,2}\" endRegion=\"Block\"/>\n        <RegExpr attribute=\"Normal Text\" context=\"#stay\" String=\"\\s*[)\\]]\\s*/{1,2}\" />\n\n        <RegExpr attribute=\"Function\" context=\"sub_name_def\" String=\"\\w+::\" />\n        <RegExpr attribute=\"Normal Text\" context=\"#stay\" String=\"\\w+[=]\" />\n\n        <RegExpr attribute=\"Operator\" context=\"find_quoted\" String=\"\\bq(?=[qwx]?\\s*[^\\w\\s])\" />\n        <RegExpr attribute=\"Operator\" context=\"find_subst\" String=\"\\bs(?=\\s*[^\\w\\s\\]})])\" />\n        <RegExpr attribute=\"Operator\" context=\"tr\" String=\"\\b(?:tr|y)\\s*(?=[^\\w\\s\\]})])\" />\n\n        <RegExpr attribute=\"Operator\" context=\"find_pattern\" String=\"\\b(?:m|qr)(?=\\s*[^\\w\\s\\]})])\" />\n\n        <RegExpr attribute=\"Normal Text\" context=\"#stay\" String=\"[\\w_]+\\s*/\" />\n        <RegExpr attribute=\"Normal Text\" context=\"#stay\" String=\"[&lt;&gt;&quot;':]/\" />\n        <DetectChar attribute=\"Operator\" context=\"pattern_slash\" char=\"/\" beginRegion=\"Pattern\" />\n        <RegExpr attribute=\"Operator\" context=\"#stay\" String=\"-[rwxoRWXOeszfdlpSbctugkTBMAC]\" />\n\n        <DetectChar attribute=\"Normal Text\" context=\"#stay\" char=\"{\" beginRegion=\"Block\" />\n        <DetectChar attribute=\"Normal Text\" context=\"#stay\" char=\"}\" endRegion=\"Block\" />\n      </context>\n\n      <!-- ====== quoted construct central ===== -->\n      <context name=\"find_quoted\" attribute=\"Normal Text\" lineEndContext=\"#stay\" >\n        <!-- NOTE - qx'not interpolated regex' does not cover newline between \"qr\" and \"'\" -->\n        <RegExpr attribute=\"Operator\" context=\"string_6\" String=\"x\\s*(')\" beginRegion=\"String\" />\n        <AnyChar attribute=\"Operator\" context=\"find_qqx\" String=\"qx\" />\n        <DetectChar attribute=\"Operator\" context=\"find_qw\" char=\"w\" />\n        <DetectChar attribute=\"Operator\" context=\"string_2\" char=\"(\" beginRegion=\"String\" />\n        <DetectChar attribute=\"Operator\" context=\"string_3\" char=\"{\" beginRegion=\"String\" />\n        <DetectChar attribute=\"Operator\" context=\"string_4\" char=\"[\" beginRegion=\"String\" />\n        <DetectChar attribute=\"Operator\" context=\"string_5\" char=\"&lt;\" beginRegion=\"String\" />\n        <RegExpr attribute=\"Operator\" context=\"string_6\" String=\"([^a-zA-Z0-9_\\s[\\]{}()])\" beginRegion=\"String\" />\n        <RegExpr attribute=\"Comment\" context=\"#stay\" String=\"\\s+#.*\" /><!-- q[qwx] # == comment, look for the delim on the next line -->\n      </context>\n      <context name=\"find_qqx\" attribute=\"Normal Text\" lineEndContext=\"#stay\" >\n        <DetectChar attribute=\"Operator\" context=\"ip_string_2\" char=\"(\" beginRegion=\"String\" />\n        <DetectChar attribute=\"Operator\" context=\"ip_string_3\" char=\"{\" beginRegion=\"String\" />\n        <DetectChar attribute=\"Operator\" context=\"ip_string_4\" char=\"[\" beginRegion=\"String\" />\n        <DetectChar attribute=\"Operator\" context=\"ip_string_5\" char=\"&lt;\" beginRegion=\"String\" />\n        <RegExpr attribute=\"Operator\" context=\"ip_string_6\" String=\"([^a-zA-Z0-9_\\s[\\]{}()])\" beginRegion=\"String\" />\n        <RegExpr attribute=\"Comment\" context=\"#stay\" String=\"\\s+#.*\" /><!-- q[qwx] # == comment, look for the delim on the next line -->\n      </context>\n      <context name=\"find_qw\" attribute=\"Normal Text\" lineEndContext=\"#stay\" >\n        <DetectChar attribute=\"Operator\" context=\"quote_word_paren\" char=\"(\" beginRegion=\"Wordlist\" />\n        <DetectChar attribute=\"Operator\" context=\"quote_word_brace\" char=\"{\" beginRegion=\"Wordlist\" />\n        <DetectChar attribute=\"Operator\" context=\"quote_word_bracket\" char=\"[\" beginRegion=\"Wordlist\" />\n        <RegExpr attribute=\"Operator\" context=\"quote_word\" String=\"([^a-zA-Z0-9_\\s[\\]{}()])\" beginRegion=\"Wordlist\" />\n        <RegExpr attribute=\"Comment\" context=\"#stay\" String=\"\\s+#.*\" /><!-- q[qwx] # == comment, look for the delim on the next line -->\n      </context>\n\n      <!-- ====== Contexts for strings ===== -->\n      <context name=\"ipstring_internal\" attribute=\"String (interpolated)\" lineEndContext=\"#stay\">\n        <DetectIdentifier />\n        <RegExpr attribute=\"String Special Character\" context=\"#stay\" String=\"\\\\[UuLlEtnaefr]\" />\n        <RegExpr attribute=\"String (interpolated)\" context=\"#stay\" String=\"\\\\.\" />\n        <RegExpr attribute=\"Normal Text\" context=\"find_variable_unsafe\" String=\"(?:[\\$@]\\S|%[\\w{])\" lookAhead=\"true\" />\n      </context>\n      <context name=\"ip_string\" attribute=\"String (interpolated)\" lineEndContext=\"#stay\">\n        <DetectChar attribute=\"Operator\" context=\"#pop\" char=\"&quot;\" endRegion=\"String\"/>\n        <IncludeRules context=\"ipstring_internal\" />\n      </context>\n      <context name=\"ip_string_2\" attribute=\"String (interpolated)\" lineEndContext=\"#stay\">\n        <RangeDetect attribute=\"String (interpolated)\" context=\"#stay\" char=\"(\" char1=\")\" />\n        <DetectChar attribute=\"Operator\" context=\"#pop#pop#pop\" char=\")\" endRegion=\"String\" />\n        <IncludeRules context=\"ipstring_internal\" />\n      </context>\n      <context name=\"ip_string_3\" attribute=\"String (interpolated)\" lineEndContext=\"#stay\">\n        <RangeDetect attribute=\"String (interpolated)\" context=\"#stay\" char=\"{\" char1=\"}\" />\n        <DetectChar attribute=\"Operator\" context=\"#pop#pop#pop\" char=\"}\" endRegion=\"String\" />\n        <IncludeRules context=\"ipstring_internal\" />\n      </context>\n      <context name=\"ip_string_4\" attribute=\"String (interpolated)\" lineEndContext=\"#stay\">\n        <RangeDetect attribute=\"String (interpolated)\" context=\"#stay\" char=\"[\" char1=\"]\" />\n        <DetectChar attribute=\"Operator\" context=\"#pop#pop#pop\" char=\"]\" endRegion=\"String\" />\n        <IncludeRules context=\"ipstring_internal\" />\n      </context>\n      <context name=\"ip_string_5\" attribute=\"String (interpolated)\" lineEndContext=\"#stay\">\n        <RangeDetect attribute=\"String (interpolated)\" context=\"#stay\" char=\"&lt;\" char1=\"&gt;\" />\n        <DetectChar attribute=\"Operator\" context=\"#pop#pop#pop\" char=\"&gt;\" endRegion=\"String\" />\n        <IncludeRules context=\"ipstring_internal\" />\n      </context>\n      <context name=\"ip_string_6\" attribute=\"String (interpolated)\" lineEndContext=\"#stay\" dynamic=\"true\">\n        <RegExpr attribute=\"String (interpolated)\" context=\"#stay\" String=\"\\%1\" dynamic=\"true\" />\n        <DetectChar attribute=\"Operator\" context=\"#pop#pop#pop\" char=\"1\" dynamic=\"true\"  endRegion=\"String\"/>\n        <IncludeRules context=\"ipstring_internal\" />\n      </context>\n\n      <context name=\"string\" attribute=\"String\" lineEndContext=\"#stay\">\n        <DetectIdentifier />\n        <Detect2Chars attribute=\"String Special Character\" context=\"#stay\" char=\"\\\" char1=\"'\" />\n        <Detect2Chars attribute=\"String Special Character\" context=\"#stay\" char=\"\\\" char1=\"\\\" />\n        <DetectChar attribute=\"Operator\" context=\"#pop\" char=\"'\" endRegion=\"String\" />\n      </context>\n      <context name=\"string_2\" attribute=\"String\" lineEndContext=\"#stay\">\n        <DetectIdentifier />\n        <Detect2Chars attribute=\"String Special Character\" context=\"#stay\" char=\"\\\" char1=\")\" />\n        <Detect2Chars attribute=\"String Special Character\" context=\"#stay\" char=\"\\\" char1=\"\\\" />\n        <RangeDetect attribute=\"String\" context=\"#stay\" char=\"(\" char1=\")\" />\n        <DetectChar attribute=\"Operator\" context=\"#pop#pop\" char=\")\" endRegion=\"String\" />\n      </context>\n      <context name=\"string_3\" attribute=\"String\" lineEndContext=\"#stay\">\n        <DetectIdentifier />\n        <Detect2Chars attribute=\"String Special Character\" context=\"#stay\" char=\"\\\" char1=\"}\" />\n        <Detect2Chars attribute=\"String Special Character\" context=\"#stay\" char=\"\\\" char1=\"\\\" />\n        <RangeDetect attribute=\"String\" context=\"#stay\" char=\"{\" char1=\"}\" />\n        <DetectChar attribute=\"Operator\" context=\"#pop#pop\" char=\"}\" endRegion=\"String\" />\n      </context>\n      <context name=\"string_4\" attribute=\"String\" lineEndContext=\"#stay\">\n        <DetectIdentifier />\n        <Detect2Chars attribute=\"String Special Character\" context=\"#stay\" char=\"\\\" char1=\"]\" />\n        <Detect2Chars attribute=\"String Special Character\" context=\"#stay\" char=\"\\\" char1=\"\\\" />\n        <RangeDetect attribute=\"String\" context=\"#stay\" char=\"[\" char1=\"]\" />\n        <DetectChar attribute=\"Operator\" context=\"#pop#pop\" char=\"]\" endRegion=\"String\" />\n      </context>\n      <context name=\"string_5\" attribute=\"String\" lineEndContext=\"#stay\">\n        <DetectIdentifier />\n        <Detect2Chars attribute=\"String Special Character\" context=\"#stay\" char=\"\\\" char1=\"&lt;\" />\n        <Detect2Chars attribute=\"String Special Character\" context=\"#stay\" char=\"\\\" char1=\"\\\" />\n        <Detect2Chars attribute=\"String\" context=\"#stay\" char=\"\\\" char1=\"&gt;\" />\n        <RangeDetect attribute=\"String\" context=\"#stay\" char=\"&lt;\" char1=\"&gt;\" />\n        <DetectChar attribute=\"Operator\" context=\"#pop#pop\" char=\"&gt;\" endRegion=\"String\" />\n      </context>\n      <context name=\"string_6\" attribute=\"String\" lineEndContext=\"#stay\" dynamic=\"true\">\n        <DetectIdentifier />\n        <Detect2Chars attribute=\"String Special Character\" context=\"#stay\" char=\"\\\" char1=\"\\\" />\n        <RegExpr attribute=\"String Special Character\" context=\"#stay\" String=\"\\%1\" dynamic=\"true\"/>\n        <DetectChar attribute=\"Operator\" context=\"#pop#pop\" char=\"1\" dynamic=\"true\" endRegion=\"String\" />\n      </context>\n\n      <!-- ====== contexts for  s/// ====== -->\n      <context name=\"find_subst\" attribute=\"Normal Text\" lineEndContext=\"#stay\" >\n        <RegExpr attribute=\"Comment\" context=\"#stay\" String=\"\\s+#.*\" /><!-- s # == comment, look for the delim on the next line -->\n        <DetectChar attribute=\"Operator\" context=\"subst_curlybrace_pattern\" char=\"{\" beginRegion=\"Pattern\" />\n        <DetectChar attribute=\"Operator\" context=\"subst_paren_pattern\" char=\"(\" beginRegion=\"Pattern\" />\n        <DetectChar attribute=\"Operator\" context=\"subst_bracket_pattern\" char=\"[\" beginRegion=\"Pattern\" />\n        <DetectChar attribute=\"Operator\" context=\"subst_sq_pattern\" char=\"'\" beginRegion=\"Pattern\" />\n        <RegExpr attribute=\"Operator\" context=\"subst_slash_pattern\" String=\"([^\\w\\s[\\]{}()])\" beginRegion=\"Pattern\" />\n      </context>\n\n      <!-- Fully parse s {} {}.\n           This means that\n           - comments are legal between PATTERN and REPLACEMENT\n           - REPLACEMENT can contain resursive {} blocks -->\n      <context name=\"subst_curlybrace_pattern\" attribute=\"Pattern\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Comment\" context=\"#stay\" String=\"\\s+#.*$\" />\n        <IncludeRules context=\"regex_pattern_internal_ip\" />\n        <DetectChar attribute=\"Operator\" context=\"subst_curlybrace_middle\" char=\"}\" endRegion=\"Pattern\" />\n      </context>\n      <context name=\"subst_curlybrace_middle\" attribute=\"Normal Text\" lineEndContext=\"#stay\" >\n        <RegExpr attribute=\"Comment\" context=\"#stay\" String=\"#.*$\" />\n        <DetectChar attribute=\"Operator\" context=\"subst_curlybrace_replace\" char=\"{\" beginRegion=\"Replacement\" />\n      </context>\n      <context name=\"subst_curlybrace_replace\" attribute=\"String (interpolated)\" lineEndContext=\"#stay\">\n        <IncludeRules context=\"ipstring_internal\" />\n        <DetectChar attribute=\"Normal Text\" context=\"subst_curlybrace_replace_recursive\" char=\"{\" beginRegion=\"Block\" />\n        <RegExpr attribute=\"Operator\" context=\"#pop#pop#pop#pop\" String=\"\\}[cegimosx]*\" endRegion=\"Replacement\" />\n      </context>\n      <context name=\"subst_curlybrace_replace_recursive\" attribute=\"String (interpolated)\" lineEndContext=\"#stay\" >\n        <DetectChar attribute=\"String (interpolated)\" context=\"subst_curlybrace_replace_recursive\" char=\"{\" beginRegion=\"Block\" />\n        <DetectChar attribute=\"Normal Text\" context=\"#pop\" char=\"}\" endRegion=\"Block\" />\n        <IncludeRules context=\"ipstring_internal\" />\n      </context>\n\n      <context name=\"subst_paren_pattern\" attribute=\"Pattern\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Comment\" context=\"#stay\" String=\"\\s+#.*$\" />\n        <IncludeRules context=\"regex_pattern_internal_ip\" />\n        <DetectChar attribute=\"Operator\" context=\"subst_paren_replace\" char=\"}\" endRegion=\"Pattern\" />\n      </context>\n      <context name=\"subst_paren_replace\" attribute=\"String (interpolated)\" lineEndContext=\"#stay\">\n        <IncludeRules context=\"ipstring_internal\" />\n        <DetectChar attribute=\"Operator\" context=\"#stay\" char=\"(\" beginRegion=\"Replacement\" />\n        <RegExpr attribute=\"Operator\" context=\"#pop#pop#pop\" String=\"\\)[cegimosx]*\" endRegion=\"Replacement\" />\n      </context>\n\n      <context name=\"subst_bracket_pattern\" attribute=\"Pattern\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Comment\" context=\"#stay\" String=\"\\s+#.*$\" />\n        <IncludeRules context=\"regex_pattern_internal_ip\" />\n        <DetectChar attribute=\"Operator\" context=\"subst_bracket_replace\" char=\"]\" endRegion=\"Pattern\" />\n      </context>\n      <context name=\"subst_bracket_replace\" attribute=\"String (interpolated)\" lineEndContext=\"#stay\">\n        <IncludeRules context=\"ipstring_internal\" />\n        <DetectChar attribute=\"Operator\" context=\"#stay\" char=\"[\" beginRegion=\"Replacement\" />\n        <RegExpr attribute=\"Operator\" context=\"#pop#pop#pop\" String=\"\\][cegimosx]*\" endRegion=\"Replacement\" />\n      </context>\n\n      <context name=\"subst_slash_pattern\" attribute=\"Pattern\" lineEndContext=\"#stay\" dynamic=\"true\">\n        <RegExpr attribute=\"Pattern Internal Operator\" context=\"#stay\" String=\"\\$(?=%1)\" dynamic=\"true\" />\n        <RegExpr attribute=\"Operator\" context=\"subst_slash_replace\" String=\"(%1)\" dynamic=\"true\" endRegion=\"Pattern\" beginRegion=\"Replacement\" />\n        <IncludeRules context=\"regex_pattern_internal_ip\" />\n      </context>\n      <context name=\"subst_slash_replace\" attribute=\"String (interpolated)\" lineEndContext=\"#stay\" dynamic=\"true\">\n        <RegExpr attribute=\"Operator\" context=\"#pop#pop#pop\" String=\"%1[cegimosx]*\" dynamic=\"true\" endRegion=\"Replacement\" />\n        <IncludeRules context=\"ipstring_internal\" />\n\n      </context>\n\n      <context name=\"subst_sq_pattern\" attribute=\"Pattern\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Comment\" context=\"#stay\" String=\"\\s+#.*$\" />\n        <IncludeRules context=\"regex_pattern_internal\" />\n        <DetectChar attribute=\"Operator\" context=\"subst_sq_replace\" char=\"'\" endRegion=\"Pattern\" beginRegion=\"Pattern\" />\n      </context>\n      <context name=\"subst_sq_replace\" attribute=\"String\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Operator\" context=\"#pop#pop#pop\" String=\"'[cegimosx]*\" endRegion=\"Replacement\" />\n      </context>\n\n      <context name=\"tr\" attribute=\"Pattern\" lineEndContext=\"#pop\" fallthrough=\"true\" fallthroughContext=\"#pop\" >\n        <RegExpr attribute=\"Pattern\" context=\"#pop\" String=\"\\([^)]*\\)\\s*\\(?:[^)]*\\)\" />\n        <RegExpr attribute=\"Pattern\" context=\"#pop\" String=\"\\{[^}]*\\}\\s*\\{[^}]*\\}\" />\n        <RegExpr attribute=\"Pattern\" context=\"#pop\" String=\"\\[[^]]*\\]\\s*\\[[^\\]]*\\]\" />\n        <RegExpr attribute=\"Pattern\" context=\"#pop\" String=\"([^a-zA-Z0-9_\\s[\\]{}()]).*\\1.*\\1\" minimal=\"true\"/>\n      </context>\n\n      <!-- ====== PATTERNs ====== -->\n      <context name=\"find_pattern\" attribute=\"Pattern\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Comment\" context=\"#stay\" String=\"\\s+#.*\" /><!-- s # == comment, look for the delim on the next line -->\n        <DetectChar attribute=\"Operator\" context=\"pattern_brace\" char=\"{\" beginRegion=\"Pattern\" />\n        <DetectChar attribute=\"Operator\" context=\"pattern_paren\" char=\"(\" beginRegion=\"Pattern\" />\n        <DetectChar attribute=\"Operator\" context=\"pattern_bracket\" char=\"[\" beginRegion=\"Pattern\" />\n        <DetectChar attribute=\"Operator\" context=\"pattern_sq\" char=\"'\" beginRegion=\"Pattern\" />\n        <RegExpr attribute=\"Operator\" context=\"pattern\" String=\"([^\\w\\s])\" beginRegion=\"Pattern\" />\n      </context>\n      <context name=\"pattern_slash\" attribute=\"Pattern\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Pattern Internal Operator\" context=\"#stay\" String=\"\\$(?=/)\" />\n        <IncludeRules context=\"regex_pattern_internal_ip\" />\n        <RegExpr attribute=\"Operator\" context=\"#pop\" String=\"/[cgimosx]*\" endRegion=\"Pattern\" />\n      </context>\n      <context name=\"pattern\" attribute=\"Pattern\" lineEndContext=\"#stay\" dynamic=\"true\">\n        <RegExpr attribute=\"Pattern Internal Operator\" context=\"#stay\" String=\"\\$(?=%1)\" dynamic=\"true\" />\n        <RegExpr attribute=\"Operator\" context=\"#pop#pop\" String=\"%1[cgimosx]*\" dynamic=\"true\" endRegion=\"Pattern\" />\n        <IncludeRules context=\"regex_pattern_internal_ip\" />\n        <RegExpr attribute=\"Pattern Internal Operator\" context=\"#stay\" String=\"\\$(?=\\%1)\" dynamic=\"true\" />\n      </context>\n      <context name=\"pattern_brace\" attribute=\"Pattern\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Operator\" context=\"#pop#pop\" String=\"\\}[cgimosx]*\" endRegion=\"Pattern\" />\n        <IncludeRules context=\"regex_pattern_internal_ip\" />\n      </context>\n      <context name=\"pattern_bracket\" attribute=\"Pattern\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Operator\" context=\"#pop#pop\" String=\"\\][cgimosx]*\" endRegion=\"Pattern\" />\n        <IncludeRules context=\"regex_pattern_internal_ip\" />\n      </context>\n      <context name=\"pattern_paren\" attribute=\"Pattern\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Operator\" context=\"#pop#pop\" String=\"\\)[cgimosx]*\" endRegion=\"Pattern\" />\n        <IncludeRules context=\"regex_pattern_internal_ip\" />\n      </context>\n      <context name=\"pattern_sq\" attribute=\"Pattern\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Operator\" context=\"#pop#pop\" String=\"'[cgimosx]*\" endRegion=\"Pattern\" />\n        <IncludeRules context=\"regex_pattern_internal\" />\n      </context>\n\n      <!-- rules internal stuff wrt regex patterns -->\n      <context name=\"regex_pattern_internal_rules_1\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Comment\" context=\"#stay\" String=\"#.*$\" firstNonSpace=\"true\" />\n        <RegExpr attribute=\"Pattern Character Class\" context=\"#stay\" String=\"\\\\[anDdSsWw]\" />\n        <RegExpr attribute=\"Pattern Internal Operator\" context=\"#stay\" String=\"\\\\[ABbEGLlNUuQdQZz]\" />\n        <RegExpr attribute=\"Special Variable\" context=\"#stay\" String=\"\\\\[\\d]+\" />\n        <RegExpr attribute=\"Pattern\" context=\"#stay\" String=\"\\\\.\" />\n      </context>\n      <context name=\"regex_pattern_internal_rules_2\" lineEndContext=\"#stay\">\n        <Detect2Chars attribute=\"Pattern Internal Operator\" context=\"pat_ext\" char=\"(\" char1=\"?\" />\n        <DetectChar attribute=\"Pattern Internal Operator\" context=\"pat_char_class\" char=\"[\" />\n        <RegExpr attribute=\"Pattern Internal Operator\" context=\"#stay\" String=\"[()?^*+|]\" />\n        <RegExpr attribute=\"Pattern Internal Operator\" context=\"#stay\" String=\"\\{[\\d, ]+\\}\" />\n        <DetectChar attribute=\"Pattern Internal Operator\" context=\"#stay\" char=\"$\" />\n        <RegExpr attribute=\"Comment\" context=\"#stay\" String=\"\\s{3,}#.*$\" />\n      </context>\n      <context name=\"regex_pattern_internal\" attribute=\"Pattern\" lineEndContext=\"#stay\">\n        <IncludeRules context=\"regex_pattern_internal_rules_1\" />\n        <IncludeRules context=\"regex_pattern_internal_rules_2\" />\n      </context>\n      <context name=\"regex_pattern_internal_ip\" attribute=\"Pattern\" lineEndContext=\"#stay\" >\n        <IncludeRules context=\"regex_pattern_internal_rules_1\" />\n        <!-- NOTE the below means that the special variables $' $], $} and $> are not supported\n             within interpolated PATTERNs (apart from $(, $) and ${ and $| not supported by perl).\n             This is because perl considers\n             s{foo$} {bar} OK as well as s{foo$}} {bar}, and detecting that is a huge work overload\n             for something that is unlikely to happen. -->\n        <RegExpr attribute=\"Data Type\" context=\"find_variable_unsafe\" String=\"[$@][^]\\s{}()|&gt;']\" lookAhead=\"true\" />\n        <IncludeRules context=\"regex_pattern_internal_rules_2\" />\n      </context>\n      <context name=\"pat_ext\" attribute=\"Pattern Internal Operator\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Comment\" context=\"#pop\" String=\"\\#[^)]*\" />\n        <RegExpr attribute=\"Pattern Internal Operator\" context=\"#pop\" String=\"[:=!&gt;&lt;]+\" />\n        <DetectChar attribute=\"Pattern Internal Operator\" context=\"#pop\" char=\")\" />\n      </context>\n      <context name=\"pat_char_class\" attribute=\"Pattern Character Class\" lineEndContext=\"#stay\">\n        <DetectChar attribute=\"Pattern Internal Operator\" context=\"#stay\" char=\"^\" />\n        <Detect2Chars attribute=\"Pattern Character Class\" context=\"#stay\" char=\"\\\" char1=\"\\\" />\n        <Detect2Chars attribute=\"Pattern Character Class\" context=\"#stay\" char=\"\\\" char1=\"]\" />\n        <RegExpr attribute=\"Pattern Character Class\" context=\"#stay\" String=\"\\[:^?[a-z]+:\\]\" />\n        <DetectChar attribute=\"Pattern Internal Operator\" context=\"#pop\" char=\"]\" />\n      </context>\n\n      <!-- ====== Variables ====== -->\n      <context name=\"find_variable\" attribute=\"Data Type\" lineEndContext=\"#pop\" fallthrough=\"true\" fallthroughContext=\"#pop\" >\n        <RegExpr attribute=\"Special Variable\" context=\"var_detect\" String=\"\\$[0-9]+\" />\n        <RegExpr attribute=\"Special Variable\" context=\"var_detect\" String=\"[@\\$](?:[\\+\\-_]\\B|ARGV\\b|INC\\b)\" />\n        <RegExpr attribute=\"Special Variable\" context=\"var_detect\" String=\"[%\\$](?:INC\\b|ENV\\b|SIG\\b)\" />\n        <RegExpr attribute=\"Data Type\" context=\"var_detect\" String=\"\\$\\$[\\$\\w_]\" />\n        <RegExpr attribute=\"Data Type\" context=\"var_detect\" String=\"\\$[#_][\\w_]\" />\n        <RegExpr attribute=\"Data Type\" context=\"var_detect\" String=\"\\$+::\" />\n        <RegExpr attribute=\"Special Variable\" context=\"var_detect\" String=\"\\$[^a-zA-Z0-9\\s{][A-Z]?\" />\n        <RegExpr attribute=\"Data Type\" context=\"var_detect\" String=\"[\\$@%]\\{[\\w_]+\\}\" />\n        <AnyChar attribute=\"Data Type\" context=\"var_detect\" String=\"$@%\" />\n        <RegExpr attribute=\"Data Type\" context=\"var_detect\" String=\"\\*[a-zA-Z_]+\" />\n        <RegExpr attribute=\"Special Variable\" context=\"#stay\" String=\"\\*[^a-zA-Z0-9\\s{][A-Z]?\" />\n        <!-- this should be a rare case! -->\n        <AnyChar attribute=\"Operator\" context=\"#pop\" String=\"$@%*\" />\n      </context>\n      <!-- This does not check fo a trailing slash, for usage in strings. -->\n      <context name=\"find_variable_unsafe\" attribute=\"Data Type\" lineEndContext=\"#pop\" fallthrough=\"true\" fallthroughContext=\"#pop\" >\n        <RegExpr attribute=\"Special Variable\" context=\"var_detect_unsafe\" String=\"\\$[0-9]+\" />\n        <RegExpr attribute=\"Special Variable\" context=\"var_detect_unsafe\" String=\"[@\\$](?:[\\+\\-_]\\B|ARGV\\b|INC\\b)\" />\n        <RegExpr attribute=\"Special Variable\" context=\"var_detect_unsafe\" String=\"[%\\$](?:INC\\b|ENV\\b|SIG\\b)\" />\n        <RegExpr attribute=\"Data Type\" context=\"var_detect_unsafe\" String=\"\\$\\$[\\$\\w_]\" />\n        <RegExpr attribute=\"Data Type\" context=\"var_detect_unsafe\" String=\"\\$[#_][\\w_]\" />\n        <RegExpr attribute=\"Data Type\" context=\"var_detect_unsafe\" String=\"\\$+::\" />\n        <RegExpr attribute=\"Special Variable\" context=\"#stay\" String=\"\\$[^a-zA-Z0-9\\s{][A-Z]?\" />\n        <RegExpr attribute=\"Data Type\" context=\"var_detect_unsafe\" String=\"[\\$@%]\\{[\\w_]+\\}\" />\n        <RegExpr attribute=\"Data Type\" context=\"var_detect_unsafe\" String=\"[\\$@%]\" /><!-- AnyChar! -->\n        <RegExpr attribute=\"Data Type\" context=\"var_detect_unsafe\" String=\"\\*\\w+\" />\n        <AnyChar attribute=\"Operator\" context=\"#pop\" String=\"$@%*\" />\n      </context>\n      <context name=\"var_detect\"  attribute=\"Data Type\" lineEndContext=\"#pop#pop\" fallthrough=\"true\" fallthroughContext=\"#pop#pop\">\n        <IncludeRules context=\"var_detect_rules\" />\n        <IncludeRules context=\"slash_safe_escape\" />\n      </context>\n      <context name=\"var_detect_unsafe\"  attribute=\"Data Type\" lineEndContext=\"#pop#pop\" fallthrough=\"true\" fallthroughContext=\"#pop#pop\">\n        <IncludeRules context=\"var_detect_rules\" />\n      </context>\n      <context name=\"var_detect_rules\" attribute=\"Data Type\" lineEndContext=\"#pop#pop\" >\n        <RegExpr attribute=\"Data Type\" context=\"#stay\" String=\"[\\w_]+\" />\n        <Detect2Chars attribute=\"Normal Text\" context=\"#stay\" char=\":\" char1=\":\" />\n        <DetectChar attribute=\"Operator\" context=\"#stay\" char=\"'\" />\n        <Detect2Chars attribute=\"Normal Text\" context=\"#stay\" char=\"-\" char1=\"&gt;\" />\n        <!-- safe with operator / -->\n        <Detect2Chars attribute=\"Normal Text\" context=\"#stay\" char=\"+\" char1=\"+\" />\n        <Detect2Chars attribute=\"Normal Text\" context=\"#stay\" char=\"-\" char1=\"-\" />\n      </context>\n\n\n      <!-- ====== Word lists ====== -->\n      <context name=\"quote_word\" attribute=\"Normal Text\" lineEndContext=\"#stay\" dynamic=\"true\">\n        <DetectSpaces />\n        <DetectIdentifier />\n        <RegExpr attribute=\"Normal Text\" context=\"#stay\" String=\"\\\\%1\" dynamic=\"true\" />\n        <DetectChar attribute=\"Operator\" context=\"#pop#pop#pop\" char=\"1\" dynamic=\"true\" endRegion=\"Wordlist\" />\n      </context>\n      <context name=\"quote_word_paren\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n        <DetectSpaces />\n        <DetectIdentifier />\n        <Detect2Chars attribute=\"Normal Text\" context=\"#stay\" char=\"\\\" char1=\")\" />\n        <DetectChar attribute=\"Operator\" context=\"#pop#pop#pop\" char=\")\" endRegion=\"Wordlist\" />\n      </context>\n      <context name=\"quote_word_brace\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n        <DetectSpaces />\n        <DetectIdentifier />\n        <Detect2Chars attribute=\"Normal Text\" context=\"#stay\" char=\"\\\" char1=\"}\" />\n        <DetectChar attribute=\"Operator\" context=\"#pop#pop#pop\" char=\"}\" endRegion=\"Wordlist\" />\n      </context>\n      <context name=\"quote_word_bracket\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n        <DetectSpaces />\n        <DetectIdentifier />\n        <Detect2Chars attribute=\"Normal Text\" context=\"#stay\" char=\"\\\" char1=\"]\" />\n        <DetectChar attribute=\"Operator\" context=\"#pop#pop#pop\" char=\"]\" endRegion=\"Wordlist\" />\n      </context>\n\n      <!-- ====== Here Documents ====== -->\n      <context name=\"find_here_document\" attribute=\"Normal Text\" lineEndContext=\"#pop\" >\n        <RegExpr attribute=\"Keyword\" context=\"here_document\" String=\"(\\w+)\\s*;?\" />\n        <RegExpr attribute=\"Keyword\" context=\"here_document\" String=\"\\s*&quot;([^&quot;]+)&quot;\\s*;?\" />\n        <RegExpr attribute=\"Keyword\" context=\"here_document\" String=\"\\s*`([^`]+)`\\s*;?\" />\n        <RegExpr attribute=\"Keyword\" context=\"here_document_dumb\" String=\"\\s*'([^']+)'\\s*;?\" />\n      </context>\n      <context name=\"here_document\" attribute=\"String (interpolated)\" lineEndContext=\"#stay\" dynamic=\"true\">\n        <DetectSpaces />\n        <RegExpr attribute=\"Keyword\" context=\"#pop#pop\" String=\"%1\" column=\"0\" dynamic=\"true\" endRegion=\"HereDocument\"/>\n        <RegExpr attribute=\"Keyword\" context=\"here_document\" String=\"\\=\\s*&lt;&lt;\\s*[&quot;']?([A-Z0-9_\\-]+)[&quot;']?\" beginRegion=\"HEREDoc\" />\n        <IncludeRules context=\"ipstring_internal\" />\n      </context>\n      <context name=\"here_document_dumb\" attribute=\"Normal Text\" lineEndContext=\"#stay\" dynamic=\"true\">\n        <DetectSpaces />\n        <RegExpr attribute=\"Keyword\" context=\"#pop#pop\" String=\"%1\" column=\"0\" dynamic=\"true\" endRegion=\"HereDocument\"/>\n        <DetectIdentifier />\n      </context>\n\n      <!-- ====== Misc ====== -->\n      <context name=\"data_handle\" attribute=\"Data\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Pod\" context=\"pod\" String=\"\\=(?:head[1-6]|over|back|item|for|begin|end|pod)\\s+.*\" column=\"0\" beginRegion=\"POD\"/>\n        <StringDetect attribute=\"Keyword\" context=\"normal\" String=\"__END__\" firstNonSpace=\"true\" />\n      </context>\n      <context name=\"end_handle\" attribute=\"Nothing\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Pod\" context=\"pod\" String=\"^\\=(?:head[1-6]|over|back|item|for|begin|end|pod)\\s*.*\"/>\n        <StringDetect attribute=\"Keyword\" context=\"data_handle\" String=\"__DATA__\" firstNonSpace=\"true\" />\n      </context>\n\n      <context name=\"Backticked\" attribute=\"String (interpolated)\" lineEndContext=\"#stay\">\n        <IncludeRules context=\"ipstring_internal\"/>\n        <DetectChar attribute=\"Operator\" context=\"#pop\" char=\"`\"/>\n      </context>\n\n      <context name=\"slash_safe_escape\" attribute=\"Normal Text\" lineEndContext=\"#pop\" fallthrough=\"true\" fallthroughContext=\"#pop\">\n        <RegExpr attribute=\"Normal Text\" context=\"#pop\" String=\"\\s*\\}\\s*/{1,2}\" endRegion=\"Block\"/>\n        <RegExpr attribute=\"Normal Text\" context=\"#pop\" String=\"\\s*[)\\]]?\\s*/{1,2}\" />\n        <keyword attribute=\"Keyword\" context=\"#pop\" String=\"keywords\" /><!-- wonder why??? -->\n      </context>\n\n      <context name=\"package_qualified_blank\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n        <RegExpr attribute=\"Normal Text\" context=\"#pop\" String=\"[\\w_]+\" />\n      </context>\n\n      <context name=\"sub_name_def\" attribute=\"Normal Text\" lineEndContext=\"#pop\" fallthrough=\"true\" fallthroughContext=\"#pop\">\n        <RegExpr attribute=\"Function\" context=\"#stay\" String=\"\\w+\" />\n        <RegExpr attribute=\"Normal Text\" context=\"find_variable\" String=\"\\$\\S\" lookAhead=\"true\" />\n        <RegExpr attribute=\"Normal Text\" context=\"sub_arg_definition\" String=\"\\s*\\(\" />\n        <Detect2Chars attribute=\"Normal Text\" context=\"#stay\" char=\":\" char1=\":\" />\n      </context>\n\n      <context name=\"sub_arg_definition\" attribute=\"Normal Text\" lineEndContext=\"#stay\" fallthrough=\"true\" fallthroughContext=\"#pop#pop\">\n        <AnyChar attribute=\"Data Type\" context=\"#stay\" String=\"*$@%\" />\n        <AnyChar attribute=\"Normal Text\" context=\"#stay\" String=\"&amp;\\[];\" />\n        <DetectChar attribute=\"Normal Text\" context=\"slash_safe_escape\" char=\")\" />\n      </context>\n\n      <context name=\"pod\" attribute=\"Pod\" lineEndContext=\"#stay\">\n        <DetectSpaces />\n        <DetectIdentifier />\n        <RegExpr attribute=\"Pod\" context=\"#stay\" String=\"\\=(?:head[1-6]|over|back|item|for|begin|end|pod)\\s*.*\" column=\"0\" beginRegion=\"POD\" endRegion=\"POD\"/>\n        <RegExpr attribute=\"Pod\" context=\"#pop\" String=\"\\=cut.*$\" column=\"0\" endRegion=\"POD\"/>\n      </context>\n\n      <context name=\"comment\" attribute=\"Comment\" lineEndContext=\"#pop\">\n        <DetectSpaces />\n        <IncludeRules context=\"##Alerts\" />\n        <DetectIdentifier />\n      </context>\n\n    </contexts>\n    <itemDatas>\n      <itemData name=\"Normal Text\"               defStyleNum=\"dsNormal\" />\n      <itemData name=\"Keyword\"                   defStyleNum=\"dsKeyword\" />\n      <itemData name=\"Pragma\"                    defStyleNum=\"dsKeyword\" />\n      <itemData name=\"Function\"                  defStyleNum=\"dsFunction\" />\n      <itemData name=\"Operator\"                  defStyleNum=\"dsKeyword\" color=\"#008000\"/>\n      <itemData name=\"Data Type\"                 defStyleNum=\"dsDataType\" />\n      <itemData name=\"Special Variable\"          defStyleNum=\"dsDataType\" color=\"#C00000\" selColor=\"#C00000\" bold=\"0\" italic=\"0\" />\n      <itemData name=\"Decimal\"                   defStyleNum=\"dsDecVal\" />\n      <itemData name=\"Octal\"                     defStyleNum=\"dsBaseN\" />\n      <itemData name=\"Hex\"                       defStyleNum=\"dsBaseN\" />\n      <itemData name=\"Float\"                     defStyleNum=\"dsFloat\" />\n      <itemData name=\"String\"                    defStyleNum=\"dsString\" color=\"#FF6C6C\" selColor=\"#FF6C6C\" bold=\"0\" italic=\"0\" />\n      <itemData name=\"String (interpolated)\"     defStyleNum=\"dsString\" />\n      <itemData name=\"String Special Character\"  defStyleNum=\"dsChar\" />\n      <itemData name=\"Pattern\"                   defStyleNum=\"dsOthers\" />\n      <itemData name=\"Pattern Internal Operator\" defStyleNum=\"dsChar\" />\n      <itemData name=\"Pattern Character Class\"   defStyleNum=\"dsBaseN\" />\n      <itemData name=\"Data\"                      defStyleNum=\"dsNormal\" />\n      <itemData name=\"Comment\"                   defStyleNum=\"dsComment\" />\n      <itemData name=\"Pod\"                       defStyleNum=\"dsComment\" />\n      <itemData name=\"Nothing\"                   defStyleNum=\"dsComment\" />\n    </itemDatas>\n  </highlighting>\n  <general>\n    <comments>\n      <comment name=\"singleLine\" start=\"#\" />\n    </comments>\n    <keywords casesensitive=\"1\" />\n  </general>\n</language>\n<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/python.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language>\n<!-- Python syntax highlightning v0.9 by Per Wigren -->\n<!-- Python syntax highlighting v1.9 by Michael Bueker (improved keyword differentiation) -->\n<!-- Python syntax highlighting v1.97 by Paul Giannaros -->\n<!-- Python syntax highlighting v1.99 by Primoz Anzur -->\n<!-- Python syntax highlighting v2.01 by Paul Giannaros:\n\t* full format character support\n\t* unicode string modifier supported -->\n<!-- v2.02 remove RegExpr for nums and make indent consistent -->\n<!-- v2.03 highlight decorators, remove operator regex, don't highlight parens as operators -->\n<!-- v2.04 make alerts visible even if they are directly after ''' or # without a space -->\n<!-- v2.06 decorator names can (and often do) contain periods -->\n<!-- v2.07 add support for %prog and co, see bug 142832 -->\n<!-- v2.08 add missing overloaders, new Python 3 statements, builtins, and keywords -->\n<language name=\"Python\" version=\"2.09\" kateversion=\"2.4\" section=\"Scripts\" extensions=\"*.py;*.pyw\" mimetype=\"text/x-python\" casesensitive=\"1\" author=\"Michael Bueker\" license=\"\">\n\t<highlighting>\n\t\t<list name=\"prep\">\n\t\t\t<item> import </item>\n\t\t\t<item> from </item>\n\t\t\t<item> as </item>\n\t\t</list>\n\t\t<list name=\"defs\">\n\t\t\t<item> class </item>\n\t\t\t<item> def </item>\n\t\t\t<item> del </item>\n\t\t\t<item> global </item>\n\t\t\t<item> lambda </item>\n\t\t\t<item> nonlocal </item>\n\t\t</list>\n\t\t<list name=\"operators\">\n\t\t\t<item> and </item>\n\t\t\t<item> in </item>\n\t\t\t<item> is </item>\n\t\t\t<item> not </item>\n\t\t\t<item> or </item>\n\t\t</list>\n\t\t<list name=\"commands\">\n\t\t\t<item> exec </item>\n\t\t\t<item> print </item>\n\t\t</list>\n\t\t<list name=\"flow\">\n\t\t\t<item> assert </item>\n\t\t\t<item> break </item>\n\t\t\t<item> continue </item>\n\t\t\t<item> elif </item>\n\t\t\t<item> else </item>\n\t\t\t<item> except </item>\n\t\t\t<item> finally </item>\n\t\t\t<item> for </item>\n\t\t\t<item> if </item>\n\t\t\t<item> pass </item>\n\t\t\t<item> raise </item>\n\t\t\t<item> return </item>\n\t\t\t<item> try </item>\n\t\t\t<item> while </item>\n\t\t\t<item> with </item>\n\t\t\t<item> yield </item>\n\t\t</list>\n\t\t<list name=\"builtinfuncs\">\n\t\t\t<item> __future__ </item>\n\t\t\t<item> __import__ </item>\n\t\t\t<item> __name__ </item>\n\t\t\t<item> abs </item>\n\t\t\t<item> all </item>\n\t\t\t<item> any </item>\n\t\t\t<item> apply </item>\n\t\t\t<item> basestring </item>\n\t\t\t<item> bin </item>\n\t\t\t<item> bool </item>\n\t\t\t<item> buffer </item>\n\t\t\t<item> callable </item>\n\t\t\t<item> chr </item>\n\t\t\t<item> classmethod </item>\n\t\t\t<item> cmp </item>\n\t\t\t<item> coerce </item>\n\t\t\t<item> compile </item>\n\t\t\t<item> complex </item>\n\t\t\t<item> delattr </item>\n\t\t\t<item> dict </item>\n\t\t\t<item> dir </item>\n\t\t\t<item> divmod </item>\n\t\t\t<item> enumerate </item>\n\t\t\t<item> eval </item>\n\t\t\t<item> execfile </item>\n\t\t\t<item> file </item>\n\t\t\t<item> filter </item>\n\t\t\t<item> float </item>\n\t\t\t<item> format </item>\n\t\t\t<item> frozenset </item>\n\t\t\t<item> getattr </item>\n\t\t\t<item> globals </item>\n\t\t\t<item> hasattr </item>\n\t\t\t<item> hash </item>\n\t\t\t<item> help </item>\n\t\t\t<item> hex </item>\n\t\t\t<item> id </item>\n\t\t\t<item> input </item>\n\t\t\t<item> int </item>\n\t\t\t<item> intern </item>\n\t\t\t<item> isinstance </item>\n\t\t\t<item> issubclass </item>\n\t\t\t<item> iter </item>\n\t\t\t<item> len </item>\n\t\t\t<item> list </item>\n\t\t\t<item> locals </item>\n\t\t\t<item> long </item>\n\t\t\t<item> map </item>\n\t\t\t<item> max </item>\n\t\t\t<item> min </item>\n\t\t\t<item> next </item>\n\t\t\t<item> object </item>\n\t\t\t<item> oct </item>\n\t\t\t<item> open </item>\n\t\t\t<item> ord </item>\n\t\t\t<item> pow </item>\n\t\t\t<item> property </item>\n\t\t\t<item> range </item>\n\t\t\t<item> raw_input </item>\n\t\t\t<item> reduce </item>\n\t\t\t<item> reload </item>\n\t\t\t<item> repr </item>\n\t\t\t<item> reversed </item>\n\t\t\t<item> round </item>\n\t\t\t<item> set </item>\n\t\t\t<item> setattr </item>\n\t\t\t<item> slice </item>\n\t\t\t<item> sorted </item>\n\t\t\t<item> staticmethod </item>\n\t\t\t<item> str </item>\n\t\t\t<item> sum </item>\n\t\t\t<item> super </item>\n\t\t\t<item> tuple </item>\n\t\t\t<item> type </item>\n\t\t\t<item> unichr </item>\n\t\t\t<item> unicode </item>\n\t\t\t<item> vars </item>\n\t\t\t<item> xrange </item>\n\t\t\t<item> zip </item>\n\t\t</list>\n\t\t<list name=\"specialvars\">\n\t\t\t<item> None </item>\n\t\t\t<item> self </item>\n\t\t\t<item> True </item>\n\t\t\t<item> False </item>\n\t\t\t<item> NotImplemented </item>\n\t\t\t<item> Ellipsis </item>\n\t\t\t<item> __debug__ </item>\n\t\t\t<item> __file__ </item>\n\t\t</list>\n\t\t<list name=\"bindings\">\n\t\t\t<item> SIGNAL </item>\n\t\t\t<item> SLOT </item>\n\t\t\t<item> connect </item>\n\t\t</list>\n\t\t<list name=\"overloaders\">\n\t\t\t<item>__new__</item>\n\t\t\t<item>__init__</item>\n\t\t\t<item>__del__</item>\n\t\t\t<item>__repr__</item>\n\t\t\t<item>__str__</item>\n\t\t\t<item>__lt__</item>\n\t\t\t<item>__le__</item>\n\t\t\t<item>__eq__</item>\n\t\t\t<item>__ne__</item>\n\t\t\t<item>__gt__</item>\n\t\t\t<item>__ge__</item>\n\t\t\t<item>__cmp__</item>\n\t\t\t<item>__rcmp__</item>\n\t\t\t<item>__hash__</item>\n\t\t\t<item>__nonzero__</item>\n\t\t\t<item>__unicode__</item>\n\t\t\t<item>__getattr__</item>\n\t\t\t<item>__setattr__</item>\n\t\t\t<item>__delattr__</item>\n\t\t\t<item>__getattribute__</item>\n\t\t\t<item>__get__</item>\n\t\t\t<item>__set__</item>\n\t\t\t<item>__delete__</item>\n\t\t\t<item>__call__</item>\n\t\t\t<item>__len__</item>\n\t\t\t<item>__getitem__</item>\n\t\t\t<item>__setitem__</item>\n\t\t\t<item>__delitem__</item>\n\t\t\t<item>__iter__</item>\n\t\t\t<item>__reversed__</item>\n\t\t\t<item>__contains__</item>\n\t\t\t<item>__getslice__</item>\n\t\t\t<item>__setslice__</item>\n\t\t\t<item>__delslice__</item>\n\t\t\t<item>__add__</item>\n\t\t\t<item>__sub__</item>\n\t\t\t<item>__mul__</item>\n\t\t\t<item>__floordiv__</item>\n\t\t\t<item>__mod__</item>\n\t\t\t<item>__divmod__</item>\n\t\t\t<item>__pow__</item>\n\t\t\t<item>__lshift__</item>\n\t\t\t<item>__rshift__</item>\n\t\t\t<item>__and__</item>\n\t\t\t<item>__xor__</item>\n\t\t\t<item>__or__</item>\n\t\t\t<item>__div__</item>\n\t\t\t<item>__truediv__</item>\n\t\t\t<item>__radd__</item>\n\t\t\t<item>__rsub__</item>\n\t\t\t<item>__rmul__</item>\n\t\t\t<item>__rdiv__</item>\n\t\t\t<item>__rtruediv__</item>\n\t\t\t<item>__rfloordiv__</item>\n\t\t\t<item>__rmod__</item>\n\t\t\t<item>__rdivmod__</item>\n\t\t\t<item>__rpow__</item>\n\t\t\t<item>__rlshift__</item>\n\t\t\t<item>__rrshift__</item>\n\t\t\t<item>__rand__</item>\n\t\t\t<item>__rxor__</item>\n\t\t\t<item>__ror__</item>\n\t\t\t<item>__iadd__</item>\n\t\t\t<item>__isub__</item>\n\t\t\t<item>__imul__</item>\n\t\t\t<item>__idiv__</item>\n\t\t\t<item>__itruediv__</item>\n\t\t\t<item>__ifloordiv__</item>\n\t\t\t<item>__imod__</item>\n\t\t\t<item>__ipow__</item>\n\t\t\t<item>__ilshift__</item>\n\t\t\t<item>__irshift__</item>\n\t\t\t<item>__iand__</item>\n\t\t\t<item>__ixor__</item>\n\t\t\t<item>__ior__</item>\n\t\t\t<item>__neg__</item>\n\t\t\t<item>__pos__</item>\n\t\t\t<item>__abs__</item>\n\t\t\t<item>__invert__</item>\n\t\t\t<item>__complex__</item>\n\t\t\t<item>__int__</item>\n\t\t\t<item>__long__</item>\n\t\t\t<item>__float__</item>\n\t\t\t<item>__oct__</item>\n\t\t\t<item>__hex__</item>\n\t\t\t<item>__index__</item>\n\t\t\t<item>__coerce__</item>\n\t\t\t<item>__enter__</item>\n\t\t\t<item>__exit__</item>\n\t\t</list>\n\t\t<list name=\"exceptions\">\n\t\t\t<item>ArithmeticError</item>\n\t\t\t<item>AssertionError</item>\n\t\t\t<item>AttributeError</item>\n\t\t\t<item>BaseException</item>\n\t\t\t<item>DeprecationWarning</item>\n\t\t\t<item>EnvironmentError</item>\n\t\t\t<item>EOFError</item>\n\t\t\t<item>Exception</item>\n\t\t\t<item>FloatingPointError</item>\n\t\t\t<item>FutureWarning</item>\n\t\t\t<item>GeneratorExit</item>\n\t\t\t<item>IOError</item>\n\t\t\t<item>ImportError</item>\n\t\t\t<item>ImportWarning</item>\n\t\t\t<item>IndexError</item>\n\t\t\t<item>KeyError</item>\n\t\t\t<item>KeyboardInterrupt</item>\n\t\t\t<item>LookupError</item>\n\t\t\t<item>MemoryError</item>\n\t\t\t<item>NameError</item>\n\t\t\t<item>NotImplementedError</item>\n\t\t\t<item>OSError</item>\n\t\t\t<item>OverflowError</item>\n\t\t\t<item>PendingDeprecationWarning</item>\n\t\t\t<item>ReferenceError</item>\n\t\t\t<item>RuntimeError</item>\n\t\t\t<item>RuntimeWarning</item>\n\t\t\t<item>StandardError</item>\n\t\t\t<item>StopIteration</item>\n\t\t\t<item>SyntaxError</item>\n\t\t\t<item>SyntaxWarning</item>\n\t\t\t<item>SystemError</item>\n\t\t\t<item>SystemExit</item>\n\t\t\t<item>TypeError</item>\n\t\t\t<item>UnboundLocalError</item>\n\t\t\t<item>UserWarning</item>\n\t\t\t<item>UnicodeError</item>\n\t\t\t<item>UnicodeWarning</item>\n\t\t\t<item>UnicodeEncodeError</item>\n\t\t\t<item>UnicodeDecodeError</item>\n\t\t\t<item>UnicodeTranslateError</item>\n\t\t\t<item>ValueError</item>\n\t\t\t<item>Warning</item>\n\t\t\t<item>WindowsError</item>\n\t\t\t<item>ZeroDivisionError</item>\n\t\t</list>\n\t\t<contexts>\n\t\t\t<context name=\"Normal\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n\t\t\t\t<keyword attribute=\"Preprocessor\" String=\"prep\" context=\"#stay\"/>\n\t\t\t\t<keyword attribute=\"Definition Keyword\" String=\"defs\" context=\"#stay\"/>\n\t\t\t\t<keyword attribute=\"Operator\" String=\"operators\" context=\"#stay\"/>\n\t\t\t\t<keyword attribute=\"Command Keyword\" String=\"commands\" context=\"#stay\"/>\n\t\t\t\t<keyword attribute=\"Flow Control Keyword\" String=\"flow\" context=\"#stay\"/>\n\t\t\t\t<keyword attribute=\"Builtin Function\" String=\"builtinfuncs\" context=\"#stay\"/>\n\t\t\t\t<keyword attribute=\"Special Variable\" String=\"specialvars\" context=\"#stay\"/>\n\t\t\t\t<keyword attribute=\"Extensions\" String=\"bindings\" context=\"#stay\"/>\n\t\t\t\t<keyword attribute=\"Exceptions\" String=\"exceptions\" context=\"#stay\"/>\n\t\t\t\t<keyword attribute=\"Overloaders\" String=\"overloaders\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"Normal\" String=\"[a-zA-Z_][a-zA-Z_0-9]+\" context=\"#stay\"/>\n\n\t\t\t\t<RegExpr attribute=\"Complex\" String=\" ((([0-9]*\\.[0-9]+|[0-9]+\\.)|([0-9]+|([0-9]*\\.[0-9]+|[0-9]+\\.))[eE](\\+|-)?[0-9]+)|[0-9]+)[jJ]\" context=\"#stay\"/>\n\t\t\t\t<Float attribute=\"Float\" context=\"#stay\" />\n\t\t\t\t<HlCHex attribute=\"Hex\" context=\"#stay\"/>\n\t\t\t\t<HlCOct attribute=\"Octal\" context=\"#stay\"/>\n\t\t\t\t<Int attribute=\"Int\" context=\"#stay\">\n\t\t\t\t\t<StringDetect attribute=\"Int\" String=\"L\" insensitive=\"true\" context=\"#stay\"/>\n\t\t\t\t</Int>\n\n\t\t\t\t<StringDetect attribute=\"Raw String\" String=\"r'''\" insensitive=\"true\" context=\"Raw Tripple A-string\"/>\n\t\t\t\t<StringDetect attribute=\"Raw String\" String=\"r&quot;&quot;&quot;\" insensitive=\"true\" context=\"Raw Tripple Q-string\"/>\n\n\t\t\t\t<StringDetect attribute=\"Raw String\" String=\"r'\" insensitive=\"true\" context=\"Raw A-string\"/>\n\t\t\t\t<StringDetect attribute=\"Raw String\" String=\"r&quot;\" insensitive=\"true\" context=\"Raw Q-string\"/>\n\n\t\t\t\t<DetectChar attribute=\"Comment\" char=\"#\" context=\"Hash comment\"/>\n                                <RegExpr attribute=\"Comment\" String=\"u?'''\" firstNonSpace=\"true\" context=\"Tripple A-comment\" beginRegion=\"Tripple A-region\"/>\n                                <RegExpr attribute=\"Comment\" String=\"u?&quot;&quot;&quot;\" firstNonSpace=\"true\" context=\"Tripple Q-comment\" beginRegion=\"Tripple Q-region\"/>\n\n\t\t\t\t<!-- ''' -->\n\t\t\t\t<StringDetect attribute=\"String\" String=\"'''\" context=\"Tripple A-string\" beginRegion=\"Tripple A-region\"/>\n\t\t\t\t<StringDetect attribute=\"String\" String=\"u'''\" context=\"Tripple A-string\" beginRegion=\"Tripple A-region\"/>\n\t\t\t\t<!-- \"\"\" -->\n\t\t\t\t<StringDetect attribute=\"String\" String=\"&quot;&quot;&quot;\" context=\"Tripple Q-string\" beginRegion=\"Tripple Q-region\"/>\n\t\t\t\t<StringDetect attribute=\"String\" String=\"u&quot;&quot;&quot;\" context=\"Tripple Q-string\" beginRegion=\"Tripple Q-region\"/>\n\t\t\t\t<!-- ' -->\n\t\t\t\t<DetectChar attribute=\"String\" char=\"'\" context=\"Single A-string\"/>\n\t\t\t\t<Detect2Chars attribute=\"String\" char=\"u\" char1=\"'\" context=\"Single A-string\"/>\n\t\t\t\t<!-- \" -->\n\t\t\t\t<DetectChar attribute=\"String\" char=\"&quot;\" context=\"Single Q-string\"/>\n\t\t\t\t<Detect2Chars attribute=\"String\" char=\"u\" char1=\"&quot;\" context=\"Single Q-string\"/>\n\n\t\t\t\t<DetectChar attribute=\"Normal\" char=\"(\" context=\"parenthesised\" beginRegion=\"parenthesis\"/>\n\t\t\t\t<DetectChar attribute=\"Normal\" char=\")\" context=\"#pop\" endRegion=\"parenthesis\"/>\n\n\t\t\t\t<AnyChar attribute=\"Operator\" String=\"+*/%\\|=;\\!&lt;&gt;!^&amp;~-\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"Decorator\" String=\"@[_a-zA-Z][\\._a-zA-Z0-9]*\" firstNonSpace=\"true\"/>\n\t\t\t</context>\n\n\t\t\t<context name=\"parenthesised\" attribute=\"Normal Text\" lineEndContext=\"#stay\" noIndentationBasedFolding=\"true\">\n\t\t\t\t<IncludeRules context=\"Normal\" />\n\t\t\t</context>\n\n\t\t\t<!-- Comments -->\n\n\t\t\t<context name=\"Hash comment\" attribute=\"Comment\" lineEndContext=\"#pop\">\n\t\t\t\t<IncludeRules context=\"##Alerts_indent\" />\n\t\t\t</context>\n\n\t\t\t<context name=\"Tripple A-comment\" attribute=\"Comment\" lineEndContext=\"#stay\" noIndentationBasedFolding=\"true\">\n\t\t\t\t<StringDetect attribute=\"Comment\" String=\"'''\" context=\"#pop\" endRegion=\"Tripple A-region\"/>\n\t\t\t\t<IncludeRules context=\"##Alerts_indent\" />\n\t\t\t</context>\n\n\t\t\t<context name=\"Tripple Q-comment\" attribute=\"Comment\" lineEndContext=\"#stay\" noIndentationBasedFolding=\"true\">\n\t\t\t\t<HlCChar attribute=\"Comment\" context=\"#stay\"/>\n\t\t\t\t<StringDetect attribute=\"Comment\" String=\"&quot;&quot;&quot;\" context=\"#pop\" endRegion=\"Tripple Q-region\"/>\n\t\t\t\t<IncludeRules context=\"##Alerts_indent\" />\n\t\t\t</context>\n\n\t\t\t<context name=\"Single A-comment\" attribute=\"Comment\" lineEndContext=\"#stay\">\n\t\t\t\t<HlCStringChar attribute=\"Comment\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"Comment\" char=\"'\" context=\"#pop\"/>\n\t\t\t\t<IncludeRules context=\"##Alerts_indent\" />\n\t\t\t</context>\n\n\t\t\t<context name=\"Single Q-comment\" attribute=\"Comment\" lineEndContext=\"#stay\">\n\t\t\t\t<HlCStringChar attribute=\"Comment\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"Comment\" char=\"&quot;\" context=\"#pop\"/>\n\t\t\t\t<IncludeRules context=\"##Alerts_indent\" />\n\t\t\t</context>\n\n\t\t\t<!-- Strings -->\n\n\t\t\t<!-- format characters -->\n\t\t\t<context name=\"stringformat\" attribute=\"String Substitution\" lineEndContext=\"#stay\">\n\t\t\t\t<!-- Python 2 style. Syntax:\n\t\t\t\t     1. start character '%'\n\t\t\t\t     2. [optional] Mapping key, e.g. '(foo)'\n\t\t\t\t     3. [optional] Conversion flags, one of '#0- +'\n\t\t\t\t     4. [optional] Minimum width, integer or '*'\n\t\t\t\t     5. [optional] Precision, '.' followed by integer or '*'\n\t\t\t\t     6. [optional] Length modifier, one of 'hlL'\n\t\t\t\t     7. conversion type, one of 'crsdiouxXeEfFgG%'\n\t\t\t\t     [Special cases: %prog and %default - see http://docs.python.org/library/optparse.html]\n\t\t\t\t-->\n\t\t\t\t<RegExpr attribute=\"String Substitution\" String=\"%((\\([a-zA-Z0-9_]+\\))?[#0\\- +]?([1-9][0-9]*|\\*)?(\\.([1-9][0-9]*|\\*))?[hlL]?[crsdiouxXeEfFgG%]|prog|default)\" context=\"#stay\"/>\n\t\t\t</context>\n\n\t\t\t<context name=\"Tripple A-string\" attribute=\"String\" lineEndContext=\"#stay\" noIndentationBasedFolding=\"true\">\n\t\t\t\t<HlCStringChar attribute=\"String Char\" context=\"#stay\"/>\n\t\t\t\t<IncludeRules context=\"stringformat\"/>\n\t\t\t\t<StringDetect attribute=\"String\" String=\"'''\" context=\"#pop\" endRegion=\"Tripple A-region\"/>\n\t\t\t</context>\n\n\t\t\t<context name=\"Raw Tripple A-string\" attribute=\"Raw String\" lineEndContext=\"#stay\" noIndentationBasedFolding=\"true\">\n\t\t\t\t<HlCStringChar attribute=\"Raw String\" context=\"#stay\"/>\n\t\t\t\t<IncludeRules context=\"stringformat\"/>\n\t\t\t\t<StringDetect attribute=\"String\" String=\"'''\" context=\"#pop\" endRegion=\"Tripple A-region\"/>\n\t\t\t</context>\n\n\t\t\t<context name=\"Tripple Q-string\" attribute=\"String\" lineEndContext=\"#stay\" noIndentationBasedFolding=\"true\">\n\t\t\t\t<HlCStringChar attribute=\"String Char\" context=\"#stay\"/>\n\t\t\t\t<IncludeRules context=\"stringformat\"/>\n\t\t\t\t<StringDetect attribute=\"String\" String=\"&quot;&quot;&quot;\" context=\"#pop\" endRegion=\"Tripple Q-region\"/>\n\t\t\t</context>\n\n\t\t\t<context name=\"Raw Tripple Q-string\" attribute=\"Raw String\" lineEndContext=\"#stay\" noIndentationBasedFolding=\"true\">\n\t\t\t\t<HlCStringChar attribute=\"Raw String\" context=\"#stay\"/>\n\t\t\t\t<IncludeRules context=\"stringformat\"/>\n\t\t\t\t<StringDetect attribute=\"String\" String=\"&quot;&quot;&quot;\" context=\"#pop\" endRegion=\"Tripple Q-region\"/>\n\t\t\t</context>\n\n\n\t\t\t<context name=\"Single A-string\" attribute=\"String\" lineEndContext=\"#stay\">\n\t\t\t\t<HlCStringChar attribute=\"String Char\" context=\"#stay\"/>\n\t\t\t\t<IncludeRules context=\"stringformat\"/>\n\t\t\t\t<DetectChar attribute=\"String\" char=\"'\" context=\"#pop\"/>\n\t\t\t</context>\n\n\t\t\t<context name=\"Single Q-string\" attribute=\"String\" lineEndContext=\"#stay\">\n\t\t\t\t<HlCStringChar attribute=\"String Char\" context=\"#stay\"/>\n\t\t\t\t<IncludeRules context=\"stringformat\"/>\n\t\t\t\t<DetectChar attribute=\"String\" char=\"&quot;\" context=\"#pop\"/>\n\t\t\t</context>\n\n\t\t\t<context name=\"Raw A-string\" attribute=\"Raw String\" lineEndContext=\"#stay\">\n\t\t\t\t<HlCStringChar attribute=\"Raw String\" context=\"#stay\"/>\n\t\t\t\t<IncludeRules context=\"stringformat\"/>\n\t\t\t\t<DetectChar attribute=\"Raw String\" char=\"'\" context=\"#pop\"/>\n\t\t\t</context>\n\n\t\t\t<context name=\"Raw Q-string\" attribute=\"Raw String\" lineEndContext=\"#stay\">\n\t\t\t\t<HlCStringChar attribute=\"Raw String\" context=\"#stay\"/>\n\t\t\t\t<IncludeRules context=\"stringformat\"/>\n\t\t\t\t<DetectChar attribute=\"Raw String\" char=\"&quot;\" context=\"#pop\"/>\n\t\t\t</context>\n\n\n\t\t</contexts>\n\t\t<itemDatas>\n\t\t\t<itemData name=\"Normal Text\" defStyleNum=\"dsNormal\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Definition Keyword\" defStyleNum=\"dsKeyword\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Operator\" defStyleNum=\"dsNormal\" bold=\"1\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"String Substitution\" defStyleNum=\"dsOthers\" color=\"#0057ae\" selColor=\"#ffffff\"  spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Command Keyword\" defStyleNum=\"dsKeyword\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Flow Control Keyword\" defStyleNum=\"dsKeyword\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Builtin Function\" defStyleNum=\"dsDataType\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Special Variable\" defStyleNum=\"dsOthers\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Extensions\" defStyleNum=\"dsOthers\" color=\"#0095ff\" selColor=\"#ffffff\" bold=\"1\" italic=\"0\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Exceptions\" defStyleNum=\"dsOthers\" color=\"#054d00\" selColor=\"#ffffff\" bold=\"1\" italic=\"0\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Overloaders\" defStyleNum=\"dsOthers\" color=\"#000e52\" selColor=\"#ffffff\" bold=\"1\" italic=\"0\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Preprocessor\" defStyleNum=\"dsChar\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"String Char\" defStyleNum=\"dsChar\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Float\" defStyleNum=\"dsFloat\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Int\" defStyleNum=\"dsDecVal\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Hex\" defStyleNum=\"dsBaseN\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Octal\" defStyleNum=\"dsBaseN\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Complex\" defStyleNum=\"dsOthers\" spellChecking=\"false\"/>\n\t\t\t<itemData name=\"Comment\" defStyleNum=\"dsComment\"/>\n\t\t\t<itemData name=\"String\" defStyleNum=\"dsString\"/>\n\t\t\t<itemData name=\"Raw String\" defStyleNum=\"dsString\"/>\n\t\t\t<itemData name=\"Decorator\" defStyleNum=\"dsOthers\" color=\"#8f6b32\" selColor=\"#ffffff\" italic=\"0\" spellChecking=\"false\"/>\n\t\t</itemDatas>\n\t</highlighting>\n\t<general>\n\t\t<folding indentationsensitive=\"1\" />\n\t\t<emptyLines>\n\t\t\t<emptyLine regexpr=\"(?:\\s+|\\s*#.*)\"/>\n\t\t</emptyLines>\n\t\t<comments>\n\t\t\t<comment name=\"singleLine\" start=\"#\" position=\"afterwhitespace\"/>\n\t\t</comments>\n\t\t<keywords casesensitive=\"1\" additionalDeliminator=\"#'\"/>\n\t</general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/qlang.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<language name=\"qlang\" section=\"Sources\"\n          version=\"1.00\" kateversion=\"2.4\"\n          indenter=\"cstyle\"\n          extensions=\"*.ql\"\n          mimetype=\"text/x-qlang\"\n\t\t  package=\"qlang\"\n          priority=\"5\"\n          author=\"The Go Authors\"\n          license=\"BSD\">\n  <highlighting>\n    <list name=\"keywords\">\n      <item> break </item>\n      <item> case </item>\n      <item> chan </item>\n      <item> const </item>\n      <item> continue </item>\n      <item> default </item>\n      <item> defer </item>\n      <item> else </item>\n      <item> fallthrough </item>\n      <item> for </item>\n      <item> fn </item>\n      <item> go </item>\n      <item> goto </item>\n      <item> if </item>\n      <item> import </item>\n\t  <item> export </item>\n      <item> map </item>\n      <item> include </item>\n\t  <item> import </item>\n      <item> range </item>\n      <item> return </item>\n      <item> select </item>\n      <item> class </item>\n      <item> switch </item>\n      <item> type </item>\n\t  <item> new </item>\n    </list>\n    <list name=\"predeclared\">\n\t  <item> undefined </item>\n      <item> false </item>\n      <item> iota </item>\n      <item> nil </item>\n      <item> true </item>\n    </list>\n    <list name=\"types\">\n      <item> bool </item>\n      <item> byte </item>\n      <item> float </item>\n      <item> int </item>\n      <item> int8 </item>\n      <item> int16 </item>\n      <item> int32 </item>\n      <item> int64 </item>\n      <item> uint </item>\n      <item> uint8 </item>\n      <item> uint16 </item>\n      <item> uint32 </item>\n      <item> uint64 </item>\n      <item> string </item>\n    </list>\n    <list name=\"builtin\">\n      <item> append </item>\n\t  <item> copy </item>\n  \t  <item> delete </item>\n      <item> get </item>\n      <item> len </item>\t\n      <item> cap </item>\n      <item> mkmap </item>\n      <item> mapFrom </item>\t\n\t  <item> mapOf </item>\n\t  <item> panic </item>\n\t  <item> panicf </item>\n      <item> printf </item>\n      <item> println </item>\n\t  <item> set </item>\n      <item> mkslice </item>\n      <item> slice </item>\n      <item> sliceFrom </item>\n\t  <item> sliceOf </item>\n      <item> sub </item>\n      <item> type </item>\n\t  <item> min </item>\n\t  <item> max </item>\n      <item> main </item>\t\n    </list>\n    <contexts>\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"Normal\">\n        <DetectSpaces/>\n        <RegExpr attribute=\"Keyword\" context=\"FuncDecl\" String=\"^func\\s*\"/>\n        <keyword attribute=\"Keyword\" context=\"#pop\" String=\"keywords\"/>\n        <keyword attribute=\"Predeclared Identifier\" context=\"#stay\" String=\"predeclared\"/>\n        <keyword attribute=\"Data Type\" context=\"#stay\" String=\"types\"/>\n        <keyword attribute=\"Builtin Function\" context=\"#stay\" String=\"builtin\"/>\n        <DetectIdentifier/>\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"{\" beginRegion=\"Brace1\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"}\" endRegion=\"Brace1\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"(\" beginRegion=\"Brace2\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\")\" endRegion=\"Brace2\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"[\" beginRegion=\"Brace3\" />\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"]\" endRegion=\"Brace3\" />\n        <RegExpr attribute=\"Numbers\"  context=\"#stay\" String=\"\\-?\\.\\d*(e|e\\-|e\\+)?\\d+i?\\b\"/>\n        <RegExpr attribute=\"Numbers\"  context=\"#stay\" String=\"\\-\\d*\\.?\\d*(e|e\\-|e\\+)?\\d+i?\\b\"/>\n        <RegExpr attribute=\"Numbers\"  context=\"#stay\" String=\"\\b\\d*\\.?\\d*(e|e\\-|e\\+)?\\d+i?\\b\"/>\n        <RegExpr attribute=\"Numbers\"  context=\"#stay\" String=\"\\b-?0[xX][0-9a-fA-F]+\\b\"/>\n        <HlCOct attribute=\"Octal\" context=\"#stay\"/>\n        <HlCHex attribute=\"Hex\" context=\"#stay\"/>\n        <HlCChar attribute=\"Char\" context=\"#stay\"/>\n        <DetectChar attribute=\"String\" context=\"String\" char=\"&quot;\"/>\n        <DetectChar attribute=\"String\" context=\"Multiline String\" char=\"`\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"Comment 1\" char=\"/\" char1=\"/\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"Comment 2\" char=\"/\" char1=\"*\" beginRegion=\"Comment\"/>\n        <AnyChar attribute=\"Symbol\" context=\"#stay\" String=\":!%&amp;()+,-/.*&lt;=&gt;?[]|~^&#59;\"/>\n      </context>\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"FuncDecl\">\n        <DetectChar attribute=\"Symbol\" context=\"MethodDecl\" char=\"(\" beginRegion=\"Brace2\" />\n        <DetectChar attribute=\"Symbol\" context=\"#pop\" char=\")\" endRegion=\"Brace2\" />\n        <RegExpr attribute=\"FuncDecl\" context=\"#pop\" String=\"[\\w]+\"/>\n      </context>\n      <context attribute=\"Normal Text\" lineEndContext=\"#pop\" name=\"MethodDecl\">\n        <DetectChar attribute=\"Symbol\" context=\"#stay\" char=\"(\" beginRegion=\"Brace2\" />\n        <DetectChar attribute=\"Symbol\" context=\"#pop\" char=\")\" endRegion=\"Brace2\" />\n        <RegExpr attribute=\"Normal Text\" context=\"#stay\" String=\"\\b[\\w]+\\s*\\*?\\w+\\b\"/>\n        <RegExpr attribute=\"FuncDecl\" context=\"#pop\" String=\"[\\w]+\"/>\n      </context>\n      <context attribute=\"String\" lineEndContext=\"#pop\" name=\"String\">\n        <!--LineContinue attribute=\"String\" context=\"#stay\"/-->\n        <HlCStringChar attribute=\"String Char\" context=\"#stay\"/>\n        <RegExpr attribute=\"String Fmt\" String=\"\\%[+\\-# 0]*(?:[0-9]*|\\*)\\.?(?:[0-9]*|\\*)[vT%tbcdoqxXUeEfgGsp]\" context=\"#stay\"/>\n        <DetectChar attribute=\"String\" context=\"#pop\" char=\"&quot;\"/>\n      </context>\n      <context attribute=\"String\" lineEndContext=\"#stay\" name=\"Multiline String\">\n        <!--LineContinue attribute=\"String\" context=\"#stay\"/-->\n        <!-- HlCStringChar attribute=\"String Char\" context=\"#stay\"/-->\n        <DetectChar attribute=\"String\" context=\"#pop\" char=\"`\"/>\n      </context>\n      <context attribute=\"Comment\" lineEndContext=\"#pop\" name=\"Comment 1\">\n        <!--LineContinue attribute=\"Comment\" context=\"#stay\"/-->\n        <RegExpr attribute=\"TODO\" String=\"\\bTODO(?:\\([^\\)]+\\)|\\b)\\:?\" insensitive=\"true\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bBUG(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bNOTE(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bSECBUG(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bFIXME(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\W!!!\\:\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\W\\?\\?\\?\\:\" context=\"#stay\"/>\n      </context>\n      <context attribute=\"Comment\" lineEndContext=\"#stay\" name=\"Comment 2\">\n        <RegExpr attribute=\"TODO\" String=\"\\bTODO(?:\\([^\\)]+\\)|\\b)\\:?\" insensitive=\"true\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bBUG(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bNOTE(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bSECBUG(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\bFIXME(?:\\([^\\)]+\\)|\\b)\\:?\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\W!!!\\:\" context=\"#stay\"/>\n        <RegExpr attribute=\"TODO\" String=\"\\W\\?\\?\\?\\:\" context=\"#stay\"/>\n        <Detect2Chars attribute=\"Comment\" context=\"#pop\" char=\"*\" char1=\"/\" endRegion=\"Comment\"/>\n      </context>\n    </contexts>\n    <itemDatas>\n      <itemData name=\"Normal Text\"  defStyleNum=\"dsNormal\" spellChecking=\"false\"/>\n      <itemData name=\"Keyword\"      defStyleNum=\"dsKeyword\" spellChecking=\"false\"/>\n      <itemData name=\"Predeclared Identifier\" defStyleNum=\"dsPredeclared\" spellChecking=\"false\"/>\n      <itemData name=\"Builtin Function\" defStyleNum=\"dsBuiltinFunc\" spellChecking=\"false\"/>\n      <itemData name=\"Data Type\"    defStyleNum=\"dsDataType\" spellChecking=\"false\"/>\n      <itemData name=\"Numbers\"      defStyleNum=\"dsDecVal\" spellChecking=\"false\"/>\n      <itemData name=\"Decimal\"      defStyleNum=\"dsDecVal\" spellChecking=\"false\"/>\n      <itemData name=\"Octal\"        defStyleNum=\"dsBaseN\" spellChecking=\"false\"/>\n      <itemData name=\"Hex\"          defStyleNum=\"dsBaseN\" spellChecking=\"false\"/>\n      <itemData name=\"Float\"        defStyleNum=\"dsFloat\" spellChecking=\"false\"/>\n      <itemData name=\"Char\"         defStyleNum=\"dsChar\" spellChecking=\"false\"/>\n      <itemData name=\"String\"       defStyleNum=\"dsString\"/>\n      <itemData name=\"FuncDecl\"     defStyleNum=\"dsFuncDecl\"/>\n      <itemData name=\"String Char\"  defStyleNum=\"dsChar\"/>\n      <itemData name=\"String Fmt\"   defStyleNum=\"dsPlaceholder\"/>\n      <itemData name=\"Comment\"      defStyleNum=\"dsComment\"/>\n      <itemData name=\"TODO\"         defStyleNum=\"dsToDo\"/>\n      <itemData name=\"Symbol\"       defStyleNum=\"dsSymbol\" spellChecking=\"false\"/>\n      <itemData name=\"Error\"        defStyleNum=\"dsError\" spellChecking=\"false\"/>\n    </itemDatas>\n  </highlighting>\n  <general>\n    <comments>\n      <comment name=\"singleLine\" start=\"//\" />\n      <comment name=\"multiLine\" start=\"/*\" end=\"*/\" />\n    </comments>\n    <keywords casesensitive=\"1\" additionalDeliminator=\"'&quot;\" />\n  </general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/ruby.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n\n<!--\n  Ruby syntax highlighting definition for Kate.\n\n  Copyright (C) 2004  by Sebastian Vuorinen (sebastian dot vuorinen at helsinki dot fi)\n  Copyright (C) 2004  by Stefan Lang (langstefan@gmx.at)\n  Copyright (C) 2008  by Robin Pedersen (robinpeder@gmail.com)\n  Copyright (C) 2011  by Miquel Sabaté (mikisabate@gmail.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Library General Public\n  License as published by the Free Software Foundation; either\n  version 2 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n  Library General Public License for more details.\n\n  You should have received a copy of the GNU Library General Public\n  License along with this library; if not, write to the\n  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n  Boston, MA  02110-1301, USA.\n-->\n\n<!--\n    TODO: Division after gdl contexts is interpreted as regexp\n-->\n\n<!-- Hold the \"language\" opening tag on a single line, as mentioned in \"language.dtd\". -->\n<language name=\"Ruby\" section=\"Scripts\"\n\t  version=\"1.25\" kateversion=\"2.4\"\n\t  extensions=\"*.rb;*.rjs;*.rxml;*.xml.erb;*.js.erb;*.rake;Rakefile;Gemfile;*.gemspec\"\n\t  mimetype=\"application/x-ruby\"\n\t  style=\"ruby\" indenter=\"ruby\"\n\t  author=\"Stefan Lang (langstefan@gmx.at), Sebastian Vuorinen (sebastian.vuorinen@helsinki.fi), Robin Pedersen (robinpeder@gmail.com), Miquel Sabaté (mikisabate@gmail.com)\" license=\"LGPL\">\n\t\n\t<highlighting>\n\t\n\t\t<list name=\"keywords\">\n\t\t\t<item> BEGIN </item>\n\t\t\t<item> END </item>\n\t\t\t<item> and </item>\n\t\t\t<item> begin </item>\n\t\t\t<item> break </item>\n\t\t\t<item> case </item>\n\t\t\t<item> defined? </item>\n\t\t\t<item> do </item>\n\t\t\t<item> else </item>\n\t\t\t<item> elsif </item>\n\t\t\t<item> end </item>\n\t\t\t<item> ensure </item>\n\t\t\t<item> for </item>\n\t\t\t<item> if </item>\n\t\t\t<item> in </item>\n\t\t\t<item> include </item>\n\t\t\t<item> next </item>\n\t\t\t<item> not </item>\n\t\t\t<item> or </item>\n\t\t\t<item> redo </item>\n\t\t\t<item> rescue </item>\n\t\t\t<item> retry </item>\n\t\t\t<item> return </item>\n\t\t\t<item> then </item>\n\t\t\t<item> unless </item>\n\t\t\t<item> until </item>\n\t\t\t<item> when </item>\n\t\t\t<item> yield </item>\n\t\t</list>\n\t\t\n\t\t<list name=\"access-control\">\n\t\t\t<item> private_class_method </item>\n\t\t\t<item> private </item>\n\t\t\t<item> protected </item>\n\t\t\t<item> public_class_method </item>\n\t\t\t<item> public </item>\n\t\t</list>\n\n\t\t<list name=\"attribute-definitions\">\n\t\t\t<item> attr_reader </item>\n\t\t\t<item> attr_writer </item>\n\t\t\t<item> attr_accessor </item>\n\t\t</list>\n\t\t\n\t\t<list name=\"definitions\">\n\t\t\t<item> alias </item>\n\t\t\t<item> module </item>\n\t\t\t<item> class </item>\n\t\t\t<item> def </item>\n\t\t\t<item> undef </item>\n\t\t</list>\n\t\t\n\t\t<list name=\"pseudo-variables\">\n\t\t\t<item> self </item>\n\t\t\t<item> super </item>\n\t\t\t<item> nil </item>\n\t\t\t<item> false </item>\n\t\t\t<item> true </item>\n\t\t\t<item> caller </item>\n\t\t\t<item> __FILE__ </item>\n\t\t\t<item> __LINE__ </item>\n\t\t</list>\n\t\t\n\t\t<list name=\"default-globals\">\n\t\t\t<item> $stdout </item>\n\t\t\t<item> $defout </item>\n\t\t\t<item> $stderr </item>\n\t\t\t<item> $deferr </item>\n\t\t\t<item> $stdin </item>\n\t\t</list>\n\t\t\n\t\t<!-- Kernel module methods.\n\t\t\tNOTE: Methods ending in ? or !\n\t\t\t\tare included below as regexes.\n\t\t-->\n\t\t<list name=\"kernel-methods\">\n\t\t\t<!-- backquote ` -->\n\t\t\t<item> abort </item>\n\t\t\t<item> at_exit </item>\n\t\t\t<item> autoload </item>\n\t\t\t<item> autoload? </item>\n\t\t\t<item> binding </item>\n\t\t\t<item> block_given? </item>\n\t\t\t<item> callcc </item>\n\t\t\t<item> caller </item>\n\t\t\t<item> catch </item>\n\t\t\t<item> chomp </item>\n\t\t\t<item> chomp! </item>\n\t\t\t<item> chop </item>\n\t\t\t<item> chop! </item>\n\t\t\t<item> eval </item>\n\t\t\t<item> exec </item>\n\t\t\t<item> exit </item>\n\t\t\t<item> exit! </item>\n\t\t\t<item> fail </item>\n\t\t\t<item> fork </item>\n\t\t\t<item> format </item>\n\t\t\t<item> getc </item>\n\t\t\t<item> gets </item>\n\t\t\t<item> global_variables </item>\n\t\t\t<item> gsub </item>\n\t\t\t<item> gsub! </item>\n\t\t\t<item> iterator? </item>\n\t\t\t<item> lambda </item>\n\t\t\t<item> load </item>\n\t\t\t<item> local_variables </item>\n\t\t\t<item> loop </item>\n\t\t\t<item> method_missing </item>\n\t\t\t<item> open </item>\n\t\t\t<item> p </item>\n\t\t\t<item> print </item>\n\t\t\t<item> printf </item>\n\t\t\t<item> proc </item>\n\t\t\t<item> putc </item>\n\t\t\t<item> puts </item>\n\t\t\t<item> raise </item>\n\t\t\t<item> rand </item>\n\t\t\t<item> readline </item>\n\t\t\t<item> readlines </item>\n\t\t\t<item> require </item>\n\t\t\t<item> require_relative </item>\n\t\t\t<item> scan </item>\n\t\t\t<item> select </item>\n\t\t\t<item> set_trace_func </item>\n\t\t\t<item> sleep </item>\n\t\t\t<item> split </item>\n\t\t\t<item> sprintf </item>\n\t\t\t<item> srand </item>\n\t\t\t<item> sub </item>\n\t\t\t<item> sub! </item>\n\t\t\t<item> syscall </item>\n\t\t\t<item> system </item>\n\t\t\t<item> test </item>\n\t\t\t<item> throw </item>\n\t\t\t<item> trace_var </item>\n\t\t\t<item> trap </item>\n\t\t\t<item> untrace_var </item>\n\t\t\t<item> warn </item>\n\t\t</list>\n\n\t\t<contexts>\n\t\t\t<context name=\"Normal\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n\t\t\t\t<!-- ruby ignores newline after \\ -->\n\t\t\t\t<LineContinue attribute=\"Normal Text\" context=\"Line Continue\"/>\n\t\t\t\t\n\t\t\t\t<!-- __END__ token on own line. -->\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"__END__$\" context=\"DATA\" column=\"0\"/>\n\t\t\t\n\t\t\t\t<!-- \"shebang\" line -->\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"#!\\/.*\" context=\"#stay\" column=\"0\"/>\n\t\t\t\t\n\t\t\t\t<!-- \"def\" - \"end\" blocks -->\n\t\t\t\t<!-- check for statement modifiers with regexes -->\n\t\t\t\t<DetectChar attribute=\"Operator\" char=\"{\" context=\"Find closing block brace\" beginRegion=\"def block\"/>\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"(\\=|\\(|\\[|\\{)\\s*(if|unless|while|until)\\b\" context=\"#stay\" beginRegion=\"def block\"/>\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"(while|until)\\b(?!.*\\bdo\\b)\" context=\"#stay\" beginRegion=\"def block\" />\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"\\;\\s*(while|until)\\b(?!.*\\bdo\\b)\" context=\"#stay\" beginRegion=\"def block\"/>\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"(if|unless)\\b\" context=\"#stay\" beginRegion=\"def block\" firstNonSpace=\"true\"/>\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"\\;\\s*(if|unless)\\b\" context=\"#stay\" beginRegion=\"def block\"/>\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"\\bclass\\b\" context=\"#stay\" beginRegion=\"def block\"/>\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"\\bmodule\\b\" context=\"#stay\" beginRegion=\"def block\"/>\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"\\bbegin\\b\" context=\"#stay\" beginRegion=\"def block\"/>\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"\\bfor\\b(?!.*\\bdo\\b)\" context=\"#stay\" beginRegion=\"def block\"/>\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"\\bcase\\b\" context=\"#stay\" beginRegion=\"def block\"/>\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"\\bdo\\b\" context=\"#stay\" beginRegion=\"def block\"/>\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"\\bdef\\b\" context=\"#stay\" beginRegion=\"def block\"/>\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"\\bend\\b\" context=\"#stay\" endRegion=\"def block\"/>\n\t\t\t\t<!-- elsif/else close the current block and start a new one -->\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"\\b(else|elsif|rescue|ensure)\\b\" context=\"#stay\" endRegion=\"def block\" beginRegion=\"def block\"/>\n\t\t\t\t\n\t\t\t\t<StringDetect attribute=\"Operator\" String=\"...\" context=\"#stay\"/>\n\t\t\t\t<Detect2Chars attribute=\"Operator\" char=\".\" char1=\".\" context=\"#stay\"/>\n\t\t\t\t\n\t\t\t\t<!-- marks a message (being sent, not defined) -->\n\t\t\t\t<RegExpr attribute=\"Message\" String=\"\\.[_a-z][_a-zA-Z0-9]*(\\?|\\!|\\b)\" context=\"check_div_2\"/>\n\t\t\t\t\n\t\t\t\t<!-- Check for \"ASCII code operator\". e.g.: ?a -->\n\t\t\t\t<RegExpr attribute=\"Dec\" String=\"\\s\\?(\\\\M\\-)?(\\\\C\\-)?\\\\?\\S\" context=\"check_div_1\"/>\n\t\t\t\t\n\t\t\t\t<keyword attribute=\"Keyword\" String=\"keywords\" context=\"#stay\"/>\n\t\t\t\t<keyword attribute=\"Attribute Definition\" String=\"attribute-definitions\"  context=\"check_div_2\"/>\n\t\t\t\t<keyword attribute=\"Access Control\" String=\"access-control\" context=\"check_div_2\"/>\n\t\t\t\t<keyword attribute=\"Definition\" String=\"definitions\"  context=\"#stay\" />\n\t\t\t\t<keyword attribute=\"Pseudo variable\" String=\"pseudo-variables\"  context=\"check_div_1\"/>\n\t\t\t\t<keyword attribute=\"Default globals\" String=\"default-globals\" context=\"check_div_2\"/>\n\t\t\t\t<keyword attribute=\"Kernel methods\" String=\"kernel-methods\" context=\"check_div_2\"/>\n\t\t\t\t\n\t\t\t\t<!-- (global) vars starting with $\n\t\t\t\t\t\tMatch them before $_.\n\t\t\t\t-->\n\t\t\t\t<RegExpr attribute=\"Global Variable\" String=\"\\$[a-zA-Z_0-9]+\" context=\"check_div_1\"/>\n\t\t\t\t<RegExpr attribute=\"Global Variable\" String=\"\\$\\-[a-zA-z_]\\b\" context=\"check_div_1\"/>\n\t\t\t\t<!-- special-character globals -->\n\t\t\t\t<RegExpr attribute=\"Default globals\" String=\"\\$[\\d_*`+@;,.~=\\!\\$:?'/\\\\\\-\\&amp;&quot;&gt;&lt;]\" context=\"check_div_1\"/>\n\t\t\t\t<RegExpr attribute=\"Global Constant\" String=\"\\b[_A-Z]+[A-Z_0-9]+\\b\" context=\"check_div_2\"/>\n\t\t\t\t<!-- Generally a module or class name like \"File\", \"MyModule_1\", .. -->\n\t\t\t\t<RegExpr attribute=\"Constant\" String=\"\\b[A-Z]+_*([0-9]|[a-z])[_a-zA-Z0-9]*\\b\" context=\"check_div_2\"/>\n\t\t\t\t\n\t\t\t\t<RegExpr attribute=\"Hex\" String=\"\\b\\-?0[xX][_0-9a-fA-F]+\" context=\"check_div_1\"/>\n\t\t\t\t<RegExpr attribute=\"Bin\" String=\"\\b\\-?0[bB][_01]+\" context=\"check_div_1\"/>\n\t\t\t\t<RegExpr attribute=\"Octal\" String=\"\\b\\-?0[1-7][_0-7]*\" context=\"check_div_1\"/>\n\t\t\t\t<RegExpr attribute=\"Float\" String=\"\\b\\-?[0-9][0-9_]*\\.[0-9][0-9_]*([eE]\\-?[1-9][0-9]*(\\.[0-9]*)?)?\" context=\"check_div_1\"/>\n\t\t\t\t<RegExpr attribute=\"Dec\" String=\"\\b\\-?[1-9][0-9_]*\\b\" context=\"check_div_1\"/>\n\t\t\t\t<Int attribute=\"Dec\" context=\"check_div_1\"/>\n\t\t\t\t<HlCChar attribute=\"Char\" context=\"check_div_1\"/>\n\t\t\t\t\n\t\t\t\t<!-- Check for =begin before assignment operator. -->\n\t\t\t\t<RegExpr attribute=\"Blockcomment\" String=\"^=begin(?:\\s|$)\" context=\"Embedded documentation\" beginRegion=\"comment block\" column=\"0\"/>\n\t\t\t\t\n\t\t\t\t<!-- recognize the beginning of a HEREDOC\n\t\t\t\t\tThis uses new features in Kate 2.3 and later\n\t\t\t\t\t\n\t\t\t\t\tThere is no other chance of keeping heredoc apart from the\n\t\t\t\t\tpush operator '<<' than requiring to put space between the operator\n\t\t\t\t\tand the string.\n\t\t\t\t-->\n\t\t\t\t<RegExpr attribute=\"Operator\" context=\"find_indented_heredoc\" String=\"\\s*&lt;&lt;-(?=\\w+|[&quot;'])\" beginRegion=\"HereDocument\" />\n\t\t\t\t<RegExpr attribute=\"Operator\" context=\"find_heredoc\" String=\"\\s*&lt;&lt;(?=\\w+|[&quot;'])\" beginRegion=\"HereDocument\" />\n\t\t\t\t\n\t\t\t\t<DetectChar attribute=\"Operator\" char=\".\" context=\"#stay\"/>\n\t\t\t\t<Detect2Chars attribute=\"Operator\" char=\"&amp;\" char1=\"&amp;\" context=\"#stay\"/>\n\t\t\t\t<Detect2Chars attribute=\"Operator\" char=\"|\" char1=\"|\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"Operator\" String=\"\\s[\\?\\:\\%]\\s\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"Operator\" String=\"[|&amp;&lt;&gt;\\^\\+*~\\-=]+\" context=\"#stay\"/>\n\t\t\t\t<!-- regexp hack -->\n\t\t\t\t<RegExpr attribute=\"Operator\" String=\"\\s!\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"Operator\" String=\"/=\\s\" context=\"#stay\" insensitive=\"0\"/>\n\t\t\t\t<StringDetect attribute=\"Operator\" String=\"%=\" context=\"#stay\" insensitive=\"0\"/>\n\t\t\t\t<Detect2Chars attribute=\"Operator\" char=\":\" char1=\":\" context=\"Member Access\"/>\n\t\t\t\t\n\t\t\t\t<RegExpr attribute=\"Symbol\" String=\":(@{1,2}|\\$)?[a-zA-Z_][a-zA-Z0-9_]*[=?!]?\" context=\"check_div_1\"/>\n\t\t\t\t<RegExpr attribute=\"Symbol\" String=\":\\[\\]=?\" contex=\"check_div_1\"/>\n\t\t\t\t\n\t\t\t\t<DetectChar attribute=\"String\" char=\"&quot;\" context=\"Quoted String\"/>\n\t\t\t\t<DetectChar attribute=\"Raw String\" char=\"'\" context=\"Apostrophed String\"/>\n\t\t\t\t<DetectChar attribute=\"Command\" char=\"`\" context=\"Command String\"/>\n\t\t\t\t\n\t\t\t\t<StringDetect attribute=\"Normal Text\" String=\"?#\" context=\"#stay\"/>\n\t\t\t\t\n\t\t\t\t<RegExpr attribute=\"Comment\" String=\"#\\s*BEGIN.*$\"  context=\"#stay\" beginRegion=\"marker\" column=\"0\"/>\n\t\t\t\t<RegExpr attribute=\"Comment\" String=\"#\\s*END.*$\"  context=\"#stay\" endRegion=\"marker\" column=\"0\"/>\n\t\t\t\t<DetectChar attribute=\"Comment\" char=\"#\" context=\"General Comment\"/>\n\t\t\t\t\n\t\t\t\t<DetectChar attribute=\"Delimiter\" char=\"[\"  context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"Delimiter\" char=\"]\"  context=\"check_div_1\"/>\n\t\t\t\t<DetectChar attribute=\"Delimiter\" char=\"{\" context=\"#stay\" beginRegion=\"def block\"/>\n\t\t\t\t<DetectChar attribute=\"Delimiter\" char=\"}\" context=\"check_div_1\" endRegion=\"def block\"/>\n\t\t\t\t\n\t\t\t\t<RegExpr attribute=\"Instance Variable\" String=\"@[a-zA-Z_0-9]+\" context=\"check_div_1\"/>\n\t\t\t\t<RegExpr attribute=\"Class Variable\" String=\"@@[a-zA-Z_0-9]+\" context=\"check_div_1\"/>\n\t\t\t\t\n\t\t\t\t<!-- handle the different regular expression formats -->\n\t\t\t\t<DetectChar attribute=\"Regular Expression\" char=\"/\" context=\"RegEx 1\"/>\n\t\t\t\t\n\t\t\t\t<!-- recognize the beginning of a general delimited input format -->\n\t\t\t\t<!-- this moves to the next context to separate out the exact nature of the GDL input -->\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"find_gdl_input\" String=\"\\s*[%](?=[QqxwW]?[^\\s])\" beginRegion=\"GdlInput\" />\n\t\t\t\t\n\t\t\t\t<DetectChar attribute=\"Normal Text\" char=\")\" context=\"check_div_1\"/>\n\t\t\t\t<DetectIdentifier attribute=\"Normal Text\" context=\"check_div_2\"/>\n\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- In the following contexts, a slash character ('/') is a division operator -->\n\t\t\t<!-- Everywhere else, it's a regular expression delimiter -->\n\t\t\t\n\t\t\t<!-- A slash is always a division operator, even if preceeded by whitespace -->\n\t\t\t<context name=\"check_div_1\" attribute=\"Normal Text\" fallthrough=\"true\" fallthroughContext=\"#pop\" lineEndContext=\"#pop\">\n\t\t\t\t<RegExpr attribute=\"Normal Text\" String=\"\\s*\" context=\"#stay\"/>\n\t\t\t\t<AnyChar attribute=\"Operator\" String=\"/%\" context=\"#pop\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- Same as check_div_1, but with double pop to exit the surrounding context -->\n\t\t\t<context name=\"check_div_1_pop\" attribute=\"Normal Text\" fallthrough=\"true\" fallthroughContext=\"#pop#pop\" lineEndContext=\"#pop#pop\">\n\t\t\t\t<RegExpr attribute=\"Normal Text\" String=\"\\s*\" context=\"#stay\"/>\n\t\t\t\t<AnyChar attribute=\"Operator\" String=\"/%\" context=\"#pop#pop\"/>\n\t\t\t</context>\n\n\t\t\t<!-- A slash is division operator if it's the first character, or if preceeded and followed by whitespace -->\n\t\t\t<context name=\"check_div_2\" attribute=\"Normal Text\" fallthrough=\"true\" fallthroughContext=\"#pop\" lineEndContext=\"#pop\">\n\t\t\t\t<AnyChar attribute=\"Operator\" String=\"/%\" context=\"#pop\"/>\n\t\t\t\t<RegExpr attribute=\"Normal Text\" String=\"\\s+\" context=\"check_div_2_internal\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- Internal context used by check_div_2 -->\n\t\t\t<context name=\"check_div_2_internal\" attribute=\"Normal Text\" fallthrough=\"true\" fallthroughContext=\"#pop#pop\" lineEndContext=\"#pop#pop\">\n<!-- \t\t\t\t<DetectChar attribute=\"Operator\" char=\"%\" context=\"#pop#pop\"/> -->\n\t\t\t\t<RegExpr attribute=\"Operator\" String=\"[/%](?=\\s)\" context=\"#pop#pop\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- Same as check_div_2, but with double pop to exit the surrounding context -->\n\t\t\t<context name=\"check_div_2_pop\" attribute=\"Normal Text\" fallthrough=\"true\" fallthroughContext=\"#pop#pop\" lineEndContext=\"#pop#pop\">\n\t\t\t\t<AnyChar attribute=\"Operator\" String=\"/%\" context=\"#pop#pop\"/>\n\t\t\t\t<RegExpr attribute=\"Normal Text\" String=\"\\s+\" context=\"check_div_2_pop_internal\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- Internal context used by check_div_2_pop -->\n\t\t\t<context name=\"check_div_2_pop_internal\" attribute=\"Normal Text\" fallthrough=\"true\" fallthroughContext=\"#pop#pop#pop\" lineEndContext=\"#pop#pop#pop\">\n\t\t\t\t<DetectChar attribute=\"Operator\" char=\"%\" context=\"#pop#pop#pop\"/>\n\t\t\t\t<RegExpr attribute=\"Operator\" String=\"/(?=\\s)\" context=\"#pop#pop#pop\"/>\n\t\t\t</context>\n\n\t\t\t<context name=\"Line Continue\" attribute=\"Normal Text\" lineEndContext=\"#pop\">\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"(while|until)\\b(?!.*\\bdo\\b)\" context=\"#stay\" firstNonSpace=\"true\"/>\n\t\t\t\t<RegExpr attribute=\"Keyword\" String=\"(if|unless)\\b\" context=\"#stay\" firstNonSpace=\"true\"/>\n\t\t\t\t<IncludeRules context=\"Normal\"/>\n\t\t\t</context>\n\n\t\t\t<context name=\"Find closing block brace\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n\t\t\t\t<DetectChar attribute=\"Operator\" char=\"}\" context=\"check_div_1_pop\" endRegion=\"def block\"/>\n\t\t\t\t<IncludeRules context=\"Normal\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<context name=\"Quoted String\" attribute=\"String\" lineEndContext=\"#stay\">\n\t\t\t\t<StringDetect attribute=\"String\" String=\"\\\\\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"String\" String=\"\\\\\\&quot;\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"Substitution\" String=\"#@{1,2}\" context=\"Short Subst\"/>\n\t\t\t\t<Detect2Chars attribute=\"Substitution\" char=\"#\" char1=\"{\" context=\"Subst\"/>\n\t\t\t\t<DetectChar char=\"&quot;\" attribute=\"String\" context=\"check_div_1_pop\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<context name=\"Apostrophed String\" attribute=\"Raw String\" lineEndContext=\"#stay\">\n\t\t\t\t<StringDetect attribute=\"String\" String=\"\\\\\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"String\" String=\"\\\\\\'\" context=\"#stay\"/>\n\t\t\t\t<DetectChar char=\"'\" attribute=\"Raw String\" context=\"check_div_1_pop\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<context name=\"Command String\" attribute=\"Command\" lineEndContext=\"#stay\">\n\t\t\t\t<StringDetect attribute=\"String\" String=\"\\\\\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"String\" String=\"\\\\\\`\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"Substitution\" String=\"#@{1,2}\" context=\"Short Subst\"/>\n\t\t\t\t<Detect2Chars attribute=\"Substitution\" char=\"#\" char1=\"{\" context=\"Subst\"/>\n\t\t\t\t<DetectChar char=\"`\" attribute=\"Command\" context=\"check_div_1_pop\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<context name=\"Embedded documentation\" attribute=\"Blockcomment\" lineEndContext=\"#stay\">\n\t\t\t\t<RegExpr attribute=\"Comment\" String=\"^=end(?:\\s.*|$)\" context=\"#pop\" endRegion=\"comment block\" column=\"0\"/>\n\t\t\t\t<IncludeRules context=\"##Alerts\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<context name=\"RegEx 1\" attribute=\"Regular Expression\" lineEndContext=\"#stay\">\n\t\t\t\t<RegExpr attribute=\"Regular Expression\" String=\"\\\\\\/\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"Substitution\" String=\"#@{1,2}\" context=\"Short Subst\"/>\n\t\t\t\t<Detect2Chars attribute=\"Substitution\" char=\"#\" char1=\"{\" context=\"Subst\"/>\n\t\t\t\t<RegExpr attribute=\"Regular Expression\" String=\"/[uiomxn]*\" context=\"check_div_1_pop\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- Substitutions can be nested -->\n\t\t\t<context name=\"Subst\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n\t\t\t\t<DetectChar attribute=\"Substitution\" char=\"}\" context=\"#pop\"/>\n\t\t\t\t<!-- Highlight substitution as code. -->\n\t\t\t\t<IncludeRules context=\"Normal\"/>\n\t\t\t</context>\n\n\t\t\t<context name=\"Short Subst\" attribute=\"Substitution\" lineEndContext=\"#pop\">\n\t\t\t\t<!-- Check for e.g.: \"#@var#@@xy\" -->\n\t\t\t\t<RegExpr attribute=\"Substitution\" String=\"#@{1,2}\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"Substitution\" String=\"\\w(?!\\w)\" context=\"#pop\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- This handles access of nested module classes and class methods -->\n\t\t\t<context name=\"Member Access\" attribute=\"Member\" lineEndContext=\"#pop\">\n\t\t\t\t<!-- marks a message (being sent, not defined) -->\n\t\t\t\t<RegExpr attribute=\"Message\" String=\"\\.?[_a-z]\\w*(\\?|\\!)?(?=[^\\w\\d\\.\\:])\" context=\"check_div_2_pop\"/>\n\t\t\t\t<RegExpr attribute=\"Message\" String=\"\\.?[_a-z]\\w*(\\?|\\!)?\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"Constant\" String=\"[A-Z]+_*(\\d|[a-z])\\w*(?=[^\\w\\d\\.\\:])\" context=\"check_div_2_pop\"/>\n\t\t\t\t<RegExpr attribute=\"Constant\" String=\"[A-Z]+_*([0-9]|[a-z])\\w*\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"Constant Value\" String=\"[_A-Z][_A-Z0-9]*(?=[^\\w\\d\\.\\:])\" context=\"check_div_2_pop\"/>\n\t\t\t\t<RegExpr attribute=\"Constant Value\" String=\"[_A-Z][_A-Z0-9]*\" context=\"#stay\"/>\n\t\t\t\t<Detect2Chars attribute=\"Operator\" char=\":\" char1=\":\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"Member\" char=\".\" context=\"#stay\"/>\n\t\t\t\t\n\t\t\t\t<AnyChar attribute=\"Operator\" String=\"=+-*/%|&amp;[]{}~\" context=\"#pop\"/>\n\t\t\t\t<DetectChar attribute=\"Comment\" char=\"#\" context=\"#pop\"/>\n\t\t\t\t<AnyChar attribute=\"Normal Text\" String=\"()\\\" context=\"#pop\"/>\n\t\t\t\t<RegExpr attribute=\"Member\" String=\"\\W\" context=\"#pop\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<context name=\"Comment Line\" attribute=\"Comment\" lineEndContext=\"#pop\">\n\t\t\t\t<RegExpr attribute=\"Comment\" String=\"\\w\\:\\:\\s\" context=\"RDoc Label\"/>\n\t\t\t\t<IncludeRules context=\"##Alerts\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<context name=\"General Comment\" attribute=\"Comment\" lineEndContext=\"#pop\">\n\t\t\t\t<IncludeRules context=\"##Alerts\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<context name=\"RDoc Label\" attribute=\"RDoc Value\" lineEndContext=\"#pop\"/>\n\t\t\t\n\t\t\t<!-- HEREDOC support\n\t\t\t\tThe contexts below support both normal and indented heredocs\n\t\t\t -->\n\t\t\t<!-- here we markup the heredoc markers -->\n\t\t\t<context name=\"find_heredoc\" attribute=\"Normal Text\" lineEndContext=\"#pop\" >\n\t\t\t\t<RegExpr attribute=\"Keyword\" context=\"apostrophed_normal_heredoc\" String=\"'(\\w+)'\" />\n\t\t\t\t<RegExpr attribute=\"Keyword\" context=\"normal_heredoc\" String=\"&quot;?(\\w+)&quot;?\" />\n\t\t\t</context>\n\t\t\t<context name=\"find_indented_heredoc\" attribute=\"Normal Text\" lineEndContext=\"#pop\" >\n\t\t\t\t<RegExpr attribute=\"Keyword\" context=\"apostrophed_indented_heredoc\" String=\"'(\\w+)'\" />\n\t\t\t\t<RegExpr attribute=\"Keyword\" context=\"indented_heredoc\" String=\"&quot;?(\\w+)&quot;?\" />\n\t\t\t</context>\n\t\t\t<!-- these are the real heredoc contexts -->\n\t\t\t<context name=\"indented_heredoc\" attribute=\"Here Document\" lineEndContext=\"#stay\" dynamic=\"true\">\n\t\t\t\t<RegExpr attribute=\"Keyword\" context=\"#pop#pop\" String=\"%1$\" dynamic=\"true\" endRegion=\"HereDocument\" firstNonSpace=\"true\"/>\n\t\t\t\t<IncludeRules context=\"heredoc_rules\" />\n\t\t\t</context>\n\t\t\t<context name=\"apostrophed_indented_heredoc\" attribute=\"Here Document\" lineEndContext=\"#stay\" dynamic=\"true\">\n\t\t\t\t<RegExpr attribute=\"Keyword\" context=\"#pop#pop\" String=\"%1$\" dynamic=\"true\" endRegion=\"HereDocument\" firstNonSpace=\"true\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<context name=\"normal_heredoc\" attribute=\"Here Document\" lineEndContext=\"#stay\" dynamic=\"true\">\n\t\t\t\t<RegExpr attribute=\"Keyword\" context=\"#pop#pop\" String=\"%1$\" dynamic=\"true\" endRegion=\"HereDocument\" column=\"0\"/>\n\t\t\t\t<IncludeRules context=\"heredoc_rules\" />\n\t\t\t</context>\n\t\t\t<context name=\"apostrophed_normal_heredoc\" attribute=\"Here Document\" lineEndContext=\"#stay\" dynamic=\"true\">\n\t\t\t\t<RegExpr attribute=\"Keyword\" context=\"#pop#pop\" String=\"%1$\" dynamic=\"true\" endRegion=\"HereDocument\" column=\"0\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- rules for heredoc types -->\n\t\t\t<context name=\"heredoc_rules\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n\t\t\t\t<RegExpr attribute=\"Substitution\" String=\"#@{1,2}\" context=\"Short Subst\"/>\n\t\t\t\t<Detect2Chars attribute=\"Substitution\" char=\"#\" char1=\"{\" context=\"Subst\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- General delimited input support\n\t\t\t\tThe contexts below handle the various gdl formats\n\t\t\t -->\n\t\t\t<context name=\"find_gdl_input\" attribute=\"Normal Text\" lineEndContext=\"#pop\">\n\t\t\t\t\n\t\t\t\t<!-- handle token arrays -->\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_token_array_1\" String=\"w\\(\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_token_array_2\" String=\"w\\{\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_token_array_3\" String=\"w\\[\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_token_array_4\" String=\"w&lt;\" />\n\t\t\t\t<!-- then we handle the 'any char' format -->\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_token_array_5\" String=\"w([^\\s\\w])\" />\n\n\t\t\t\t<!-- handle token arrays -->\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_token_array_1\" String=\"W\\(\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_token_array_2\" String=\"W\\{\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_token_array_3\" String=\"W\\[\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_token_array_4\" String=\"W&lt;\" />\n\t\t\t\t<!-- then we handle the 'any char' format -->\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_token_array_5\" String=\"W([^\\s\\w])\" />\n\n\t\t\t\t<!-- handle apostrophed strings -->\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_apostrophed_1\" String=\"q\\(\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_apostrophed_2\" String=\"q\\{\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_apostrophed_3\" String=\"q\\[\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_apostrophed_4\" String=\"q&lt;\" />\n\t\t\t\t<!-- then we handle the 'any char' format -->\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_apostrophed_5\" String=\"q([^\\s\\w])\" />\n\t\t\t\t\n\t\t\t\t<!-- handle shell commands -->\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_shell_command_1\" String=\"x\\(\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_shell_command_2\" String=\"x\\{\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_shell_command_3\" String=\"x\\[\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_shell_command_4\" String=\"x&lt;\" />\n\t\t\t\t<!-- then we handle the 'any char' format -->\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_shell_command_5\" String=\"x([^\\s\\w])\" />\n\t\t\t\t\n\t\t\t\t<!-- handle regular expressions -->\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_regexpr_1\" String=\"r\\(\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_regexpr_2\" String=\"r\\{\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_regexpr_3\" String=\"r\\[\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_regexpr_4\" String=\"r&lt;\" />\n\t\t\t\t<!-- then we handle the 'any char' format -->\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_regexpr_5\" String=\"r([^\\s\\w])\" />\n\t\t\t\t\n\t\t\t\t<!-- handle double-quoted strings -->\n\t\t\t\t<!-- \n\t\t\t\t\t  be careful to make this the last GDL ruleset, because the rule for\n\t\t\t\t\t  the short form %?foo? will otherwise catch any of the other formats\n\t\t\t\t-->\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_dq_string_1\" String=\"Q?\\(\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_dq_string_2\" String=\"Q?\\{\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_dq_string_3\" String=\"Q?\\[\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_dq_string_4\" String=\"Q?&lt;\" />\n\t\t\t\t<!-- then we handle the 'any char' format -->\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"gdl_dq_string_5\" String=\"Q?([^\\s\\w])\" />\n\t\t\t\t\n\t\t\t</context>\n\t\t\t<!-- double-quoted string specific contexts follow -->\n\t\t\t<context name=\"gdl_dq_string_1\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"dq_string_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"String\" char=\"\\\" char1=\")\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"String\" context=\"gdl_dq_string_1_nested\" char=\"(\" />\n\t\t\t\t<DetectChar attribute=\"GDL input\" context=\"#pop#pop\" char=\")\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_dq_string_1_nested\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"dq_string_rules\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"gdl_dq_string_1_nested\" char=\"(\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"#pop\" char=\")\" />\n\t\t\t</context>\n\t\t\t<!-- note that here substitution should win over nesting -->\n\t\t\t<context name=\"gdl_dq_string_2\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"dq_string_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"String\" char=\"\\\" char1=\"}\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"GDL input\" context=\"#pop#pop\" char=\"}\" endRegion=\"GdlInput\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"gdl_dq_string_2_nested\" char=\"{\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_dq_string_2_nested\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<DetectChar attribute=\"String\" context=\"gdl_dq_string_2_nested\" char=\"{\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"#pop\" char=\"}\" />\n\t\t\t\t<IncludeRules context=\"dq_string_rules\" />\n\t\t\t</context>\n\t\n\t\t\t<context name=\"gdl_dq_string_3\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"dq_string_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"String\" char=\"\\\" char1=\"]\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"String\" context=\"gdl_dq_string_3_nested\" char=\"[\" />\n\t\t\t\t<DetectChar attribute=\"GDL input\" context=\"#pop#pop\" char=\"]\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_dq_string_3_nested\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<DetectChar attribute=\"String\" context=\"gdl_dq_string_3_nested\" char=\"[\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"#pop\" char=\"]\" />\n\t\t\t\t<IncludeRules context=\"dq_string_rules\" />\n\t\t\t</context>\n\t\n\t\t\t<context name=\"gdl_dq_string_4\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"dq_string_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"String\" char=\"\\\" char1=\"&gt;\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"String\" context=\"gdl_dq_string_4_nested\" char=\"&lt;\" />\n\t\t\t\t<DetectChar attribute=\"GDL input\" context=\"#pop#pop\" char=\"&gt;\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_dq_string_4_nested\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<DetectChar attribute=\"String\" context=\"gdl_dq_string_4_nested\" char=\"&lt;\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"#pop\" char=\"&gt;\" />\n\t\t\t\t<IncludeRules context=\"dq_string_rules\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- this format doesn't allow nesting. it is terminated by the next occurence of the\n\t\t\t\tdelimiter character\n\t\t\t -->\n\t\t\t<context name=\"gdl_dq_string_5\" attribute=\"String\" lineEndContext=\"#stay\" dynamic=\"true\">\n\t\t\t\t<IncludeRules context=\"dq_string_rules\" />\n\t\t\t\t<RegExpr attribute=\"String\" String=\"\\\\%1\" context=\"#stay\" dynamic=\"true\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"#pop#pop\" String=\"\\s*%1\" dynamic=\"true\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t<!-- rules to be included in all dq_string contexts -->\n\t\t\t<context name=\"dq_string_rules\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<Detect2Chars attribute=\"String\" char=\"\\\" char1=\"\\\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"Substitution\" String=\"#@{1,2}\" context=\"Short Subst\"/>\n\t\t\t\t<Detect2Chars attribute=\"Substitution\" char=\"#\" char1=\"{\" context=\"Subst\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- token array specific contexts -->\n\t\t\t\n\t\t\t<context name=\"gdl_token_array_1\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"token_array_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"String\" char=\"\\\" char1=\")\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"String\" context=\"gdl_token_array_1_nested\" char=\"(\" />\n\t\t\t\t<DetectChar attribute=\"GDL input\" context=\"#pop#pop\" char=\")\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_token_array_1_nested\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"token_array_rules\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"gdl_token_array_1_nested\" char=\"(\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"#pop\" char=\")\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<context name=\"gdl_token_array_2\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"token_array_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"String\" char=\"\\\" char1=\"}\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"GDL input\" context=\"#pop#pop\" char=\"}\" endRegion=\"GdlInput\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"gdl_token_array_2_nested\" char=\"{\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_token_array_2_nested\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"token_array_rules\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"gdl_token_array_2_nested\" char=\"{\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"#pop\" char=\"}\" />\n\t\t\t</context>\n\t\n\t\t\t<context name=\"gdl_token_array_3\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"token_array_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"String\" char=\"\\\" char1=\"]\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"String\" context=\"gdl_token_array_3_nested\" char=\"[\" />\n\t\t\t\t<DetectChar attribute=\"GDL input\" context=\"#pop#pop\" char=\"]\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_token_array_3_nested\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"token_array_rules\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"gdl_token_array_3_nested\" char=\"[\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"#pop\" char=\"]\" />\n\t\t\t</context>\n\t\n\t\t\t<context name=\"gdl_token_array_4\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"token_array_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"String\" char=\"\\\" char1=\"&gt;\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"String\" context=\"gdl_token_array_4_nested\" char=\"&lt;\" />\n\t\t\t\t<DetectChar attribute=\"GDL input\" context=\"#pop#pop\" char=\"&gt;\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_token_array_4_nested\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"token_array_rules\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"gdl_token_array_4_nested\" char=\"&lt;\" />\n\t\t\t\t<DetectChar attribute=\"String\" context=\"#pop\" char=\"&gt;\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- this format doesn't allow nesting. it is terminated by the next occurence of the\n\t\t\t\tdelimiter character\n\t\t\t -->\n\t\t\t<context name=\"gdl_token_array_5\" attribute=\"String\" lineEndContext=\"#stay\" dynamic=\"true\">\n\t\t\t\t<IncludeRules context=\"token_array_rules\" />\n\t\t\t\t<RegExpr attribute=\"String\" String=\"\\\\%1\" context=\"#stay\" dynamic=\"true\"/>\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"#pop#pop\" String=\"\\s*%1\" dynamic=\"true\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- rules to be included in all token_array contexts -->\n\t\t\t<context name=\"token_array_rules\" attribute=\"String\" lineEndContext=\"#stay\" >\n\t\t\t\t<StringDetect attribute=\"String\" String=\"\\\\\" context=\"#stay\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- apostrophed string specific contexts -->\n\t\t\t\n\t\t\t<context name=\"gdl_apostrophed_1\" attribute=\"Raw String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"apostrophed_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"Raw String\" char=\"\\\" char1=\")\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"Raw String\" context=\"gdl_apostrophed_1_nested\" char=\"(\" />\n\t\t\t\t<DetectChar attribute=\"GDL input\" context=\"#pop#pop\" char=\")\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_apostrophed_1_nested\" attribute=\"Raw String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"apostrophed_rules\" />\n\t\t\t\t<DetectChar attribute=\"Raw String\" context=\"gdl_apostrophed_1_nested\" char=\"(\" />\n\t\t\t\t<DetectChar attribute=\"Raw String\" context=\"#pop\" char=\")\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<context name=\"gdl_apostrophed_2\" attribute=\"Raw String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"apostrophed_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"Raw String\" char=\"\\\" char1=\"}\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"GDL input\" context=\"#pop#pop\" char=\"}\" endRegion=\"GdlInput\" />\n\t\t\t\t<DetectChar attribute=\"Raw String\" context=\"gdl_apostrophed_2_nested\" char=\"{\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_apostrophed_2_nested\" attribute=\"Raw String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"apostrophed_rules\" />\n\t\t\t\t<DetectChar attribute=\"Raw String\" context=\"gdl_apostrophed_2_nested\" char=\"{\" />\n\t\t\t\t<DetectChar attribute=\"Raw String\" context=\"#pop\" char=\"}\" />\n\t\t\t</context>\n\t\n\t\t\t<context name=\"gdl_apostrophed_3\" attribute=\"Raw String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"apostrophed_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"Raw String\" char=\"\\\" char1=\"]\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"Raw String\" context=\"gdl_apostrophed_3_nested\" char=\"[\" />\n\t\t\t\t<DetectChar attribute=\"GDL input\" context=\"#pop#pop\" char=\"]\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_apostrophed_3_nested\" attribute=\"Raw String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"apostrophed_rules\" />\n\t\t\t\t<DetectChar attribute=\"Raw String\" context=\"gdl_apostrophed_3_nested\" char=\"[\" />\n\t\t\t\t<DetectChar attribute=\"Raw String\" context=\"#pop\" char=\"]\" />\n\t\t\t</context>\n\t\n\t\t\t<context name=\"gdl_apostrophed_4\" attribute=\"Raw String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"apostrophed_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"Raw String\" char=\"\\\" char1=\"&gt;\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"Raw String\" context=\"gdl_apostrophed_4_nested\" char=\"&lt;\" />\n\t\t\t\t<DetectChar attribute=\"GDL input\" context=\"#pop#pop\" char=\"&gt;\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_apostrophed_4_nested\" attribute=\"Raw String\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"apostrophed_rules\" />\n\t\t\t\t<DetectChar attribute=\"Raw String\" context=\"gdl_apostrophed_4_nested\" char=\"&lt;\" />\n\t\t\t\t<DetectChar attribute=\"Raw String\" context=\"#pop\" char=\"&gt;\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- this format doesn't allow nesting. it is terminated by the next occurence of the\n\t\t\t\tdelimiter character\n\t\t\t -->\n\t\t\t<context name=\"gdl_apostrophed_5\" attribute=\"Raw String\" lineEndContext=\"#stay\" dynamic=\"true\">\n\t\t\t\t<IncludeRules context=\"apostrophed_rules\" />\n\t\t\t\t<RegExpr attribute=\"Raw String\" String=\"\\\\%1\" context=\"#stay\" dynamic=\"true\"/>\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"#pop#pop\" String=\"\\s*%1\" dynamic=\"true\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- rules to be included in all apostrophed contexts -->\n\t\t\t<context name=\"apostrophed_rules\" attribute=\"Raw String\" lineEndContext=\"#stay\" >\n\t\t\t\t<Detect2Chars attribute=\"Raw String\" char=\"\\\" char1=\"\\\" context=\"#stay\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- shell command specific contexts -->\n\t\t\t\n\t\t\t<context name=\"gdl_shell_command_1\" attribute=\"Command\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"shell_command_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"Command\" char=\"\\\" char1=\")\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"Command\" context=\"gdl_shell_command_1_nested\" char=\"(\" />\n\t\t\t\t<DetectChar attribute=\"GDL input\" context=\"#pop#pop\" char=\")\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_shell_command_1_nested\" attribute=\"Command\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"shell_command_rules\" />\n\t\t\t\t<DetectChar attribute=\"Command\" context=\"gdl_shell_command_1_nested\" char=\"(\" />\n\t\t\t\t<DetectChar attribute=\"Command\" context=\"#pop\" char=\")\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<context name=\"gdl_shell_command_2\" attribute=\"Command\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"shell_command_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"Command\" char=\"\\\" char1=\"}\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"GDL input\" context=\"#pop#pop\" char=\"}\" endRegion=\"GdlInput\" />\n\t\t\t\t<DetectChar attribute=\"Command\" context=\"gdl_shell_command_2_nested\" char=\"{\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_shell_command_2_nested\" attribute=\"Command\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"shell_command_rules\" />\n\t\t\t\t<DetectChar attribute=\"Command\" context=\"gdl_shell_command_2_nested\" char=\"{\" />\n\t\t\t\t<DetectChar attribute=\"Command\" context=\"#pop\" char=\"}\" />\n\t\t\t</context>\n\t\n\t\t\t<context name=\"gdl_shell_command_3\" attribute=\"Command\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"shell_command_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"Command\" char=\"\\\" char1=\"]\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"Command\" context=\"gdl_shell_command_3_nested\" char=\"[\" />\n\t\t\t\t<DetectChar attribute=\"GDL input\" context=\"#pop#pop\" char=\"]\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_shell_command_3_nested\" attribute=\"Command\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"shell_command_rules\" />\n\t\t\t\t<DetectChar attribute=\"Command\" context=\"gdl_shell_command_3_nested\" char=\"[\" />\n\t\t\t\t<DetectChar attribute=\"Command\" context=\"#pop\" char=\"]\" />\n\t\t\t</context>\n\t\n\t\t\t<context name=\"gdl_shell_command_4\" attribute=\"Command\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"shell_command_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"Command\" char=\"\\\" char1=\"&gt;\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"Command\" context=\"gdl_shell_command_4_nested\" char=\"&lt;\" />\n\t\t\t\t<DetectChar attribute=\"GDL input\" context=\"#pop#pop\" char=\"&gt;\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_shell_command_4_nested\" attribute=\"Command\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"shell_command_rules\" />\n\t\t\t\t<DetectChar attribute=\"Command\" context=\"gdl_shell_command_4_nested\" char=\"&lt;\" />\n\t\t\t\t<DetectChar attribute=\"Command\" context=\"#pop\" char=\"&gt;\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- this format doesn't allow nesting. it is terminated by the next occurence of the\n\t\t\t\tdelimiter character\n\t\t\t -->\n\t\t\t<context name=\"gdl_shell_command_5\" attribute=\"Command\" lineEndContext=\"#stay\" dynamic=\"true\">\n\t\t\t\t<IncludeRules context=\"shell_command_rules\" />\n\t\t\t\t<RegExpr attribute=\"Command\" String=\"\\\\%1\" context=\"#stay\" dynamic=\"true\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"#pop#pop\" String=\"\\s*%1\" dynamic=\"true\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- rules to be included in all shell_command contexts -->\n\t\t\t<context name=\"shell_command_rules\" attribute=\"Command\" lineEndContext=\"#stay\" >\n\t\t\t\t<Detect2Chars attribute=\"Command\" char=\"\\\" char1=\"\\\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"Substitution\" String=\"#@{1,2}\" context=\"Short Subst\"/>\n\t\t\t\t<Detect2Chars attribute=\"Substitution\" char=\"#\" char1=\"{\" context=\"Subst\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- regular expression specific contexts -->\n\t\t\t\n\t\t\t<context name=\"gdl_regexpr_1\" attribute=\"Regular Expression\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"regexpr_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"Regular Expression\" char=\"\\\" char1=\")\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"Regular Expression\" context=\"gdl_regexpr_1_nested\" char=\"(\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"#pop#pop\" String=\"\\)[uiomxn]*\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_regexpr_1_nested\" attribute=\"Regular Expression\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"regexpr_rules\" />\n\t\t\t\t<DetectChar attribute=\"Regular Expression\" context=\"gdl_regexpr_1_nested\" char=\"(\" />\n\t\t\t\t<DetectChar attribute=\"Regular Expression\" context=\"#pop\" char=\")\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<context name=\"gdl_regexpr_2\" attribute=\"Regular Expression\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"regexpr_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"Regular Expression\" char=\"\\\" char1=\"}\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"#pop#pop\" String=\"\\}[uiomxn]*\" endRegion=\"GdlInput\" />\n\t\t\t\t<DetectChar attribute=\"Regular Expression\" context=\"gdl_regexpr_2_nested\" char=\"{\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_regexpr_2_nested\" attribute=\"Regular Expression\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"regexpr_rules\" />\n\t\t\t\t<DetectChar attribute=\"Regular Expression\" context=\"gdl_regexpr_2_nested\" char=\"{\" />\n\t\t\t\t<DetectChar attribute=\"Regular Expression\" context=\"#pop\" char=\"}\" />\n\t\t\t</context>\n\t\n\t\t\t<context name=\"gdl_regexpr_3\" attribute=\"Regular Expression\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"regexpr_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"Regular Expression\" char=\"\\\" char1=\"]\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"Regular Expression\" context=\"gdl_regexpr_3_nested\" char=\"[\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"#pop#pop\" String=\"\\][uiomxn]*\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_regexpr_3_nested\" attribute=\"Regular Expression\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"regexpr_rules\" />\n\t\t\t\t<DetectChar attribute=\"Regular Expression\" context=\"gdl_regexpr_3_nested\" char=\"[\" />\n\t\t\t\t<DetectChar attribute=\"Regular Expression\" context=\"#pop\" char=\"]\" />\n\t\t\t</context>\n\t\n\t\t\t<context name=\"gdl_regexpr_4\" attribute=\"Regular Expression\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"regexpr_rules\" />\n\t\t\t\t<Detect2Chars attribute=\"Regular Expression\" char=\"\\\" char1=\"&gt;\" context=\"#stay\"/>\n\t\t\t\t<DetectChar attribute=\"Regular Expression\" context=\"gdl_regexpr_4_nested\" char=\"&lt;\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"#pop#pop\" String=\"&gt;[uiomxn]*\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t<context name=\"gdl_regexpr_4_nested\" attribute=\"Regular Expression\" lineEndContext=\"#stay\" >\n\t\t\t\t<IncludeRules context=\"regexpr_rules\" />\n\t\t\t\t<DetectChar attribute=\"Regular Expression\" context=\"gdl_regexpr_4_nested\" char=\"&lt;\" />\n\t\t\t\t<DetectChar attribute=\"Regular Expression\" context=\"#pop\" char=\"&gt;\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- this format doesn't allow nesting. it is terminated by the next occurence of the\n\t\t\t\tdelimiter character\n\t\t\t -->\n\t\t\t<context name=\"gdl_regexpr_5\" attribute=\"Regular Expression\" lineEndContext=\"#stay\" dynamic=\"true\">\n\t\t\t\t<IncludeRules context=\"regexpr_rules\" />\n\t\t\t\t<RegExpr attribute=\"Regular Expression\" String=\"\\\\%1\" context=\"#stay\" dynamic=\"true\" />\n\t\t\t\t<RegExpr attribute=\"GDL input\" context=\"#pop#pop\" String=\"\\s*%1[uiomxn]*\" dynamic=\"true\" endRegion=\"GdlInput\" />\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- rules to be included in all regexpr contexts -->\n\t\t\t<context name=\"regexpr_rules\" attribute=\"Regular Expression\" lineEndContext=\"#stay\" >\n\t\t\t\t<Detect2Chars attribute=\"Regular Expression\" char=\"\\\" char1=\"\\\" context=\"#stay\"/>\n\t\t\t\t<RegExpr attribute=\"Substitution\" String=\"#@{1,2}\" context=\"Short Subst\"/>\n\t\t\t\t<Detect2Chars attribute=\"Substitution\" char=\"#\" char1=\"{\" context=\"Subst\"/>\n\t\t\t</context>\n\t\t\t\n\t\t\t<!-- END of General delimited input support -->\n\t\t\t\n\t\t\t<!-- handle data in script -->\n\t\t\t<context name=\"DATA\" attribute=\"Data\" lineEndContext=\"#stay\"/>\n\t\t</contexts>\n\t\t\n\t\t<itemDatas>\n\t\t\t<itemData name=\"Normal Text\" defStyleNum=\"dsNormal\"/>\n\t\t\t\n\t\t\t<itemData name=\"Keyword\" defStyleNum=\"dsKeyword\"/>\n\t\t\t<itemData name=\"Attribute Definition\" defStyleNum=\"dsOthers\"/>\n\t\t\t<itemData name=\"Access Control\" defStyleNum=\"dsKeyword\" color=\"#0000FF\"/>\n\t\t\t<itemData name=\"Definition\" defStyleNum=\"dsKeyword\"/>\n\t\t\t<itemData name=\"Pseudo variable\" defStyleNum=\"dsDecVal\"/>\n\t\t\t\n\t\t\t<itemData name=\"Dec\" defStyleNum=\"dsDecVal\"/>\n\t\t\t<itemData name=\"Float\" defStyleNum=\"dsFloat\"/>\n\t\t\t<itemData name=\"Char\" defStyleNum=\"dsChar\"/>\n\t\t\t<itemData name=\"Octal\" defStyleNum=\"dsBaseN\"/>\n\t\t\t<itemData name=\"Hex\" defStyleNum=\"dsBaseN\"/>\n\t\t\t<itemData name=\"Bin\" defStyleNum=\"dsBaseN\"/>\n\t\t\t\n\t\t\t<itemData name=\"Symbol\" defStyleNum=\"dsString\" color=\"#D40000\"/>\n\t\t\t<itemData name=\"String\" defStyleNum=\"dsString\"/>\n\t\t\t<itemData name=\"Raw String\" defStyleNum=\"dsString\" color=\"#DD4A4A\" selColor=\"#DD4A4A\"/>\n\t\t\t<itemData name=\"Command\" defStyleNum=\"dsString\" color=\"#AA3000\"/>\n\t\t\t<itemData name=\"Message\" defStyleNum=\"dsNormal\" color=\"#4000A7\"/> <!-- #4A00C0 -->\n\t\t\t<itemData name=\"Regular Expression\" defStyleNum=\"dsOthers\" color=\"#4A5704\"/>\n\t\t\t<itemData name=\"Substitution\"\tdefStyleNum=\"dsOthers\"/>\n\t\t\t<itemData name=\"Data\" defStyleNum=\"dsNormal\"/>\n\t\t\t<!-- short for 'general delimited input' -->\n\t\t\t<itemData name=\"GDL input\" defStyleNum=\"dsOthers\" />\n\t\t\t\n\t\t\t<itemData name=\"Default globals\" defStyleNum=\"dsDataType\" color=\"#C00000\" bold=\"1\"/>\n\t\t\t<itemData name=\"Global Variable\" defStyleNum=\"dsDataType\" color=\"#C00000\"/>\n\t\t\t<itemData name=\"Global Constant\" defStyleNum=\"dsDataType\" color=\"#bb1188\" bold=\"1\"/>\n\t\t\t<itemData name=\"Constant\" defStyleNum=\"dsDataType\"/>\n\t\t\t<itemData name=\"Constant Value\" defStyleNum=\"dsDataType\" color=\"#bb1188\"/>\n\t\t\t<itemData name=\"Kernel methods\" defStyleNum=\"dsNormal\" color=\"#000080\" selColor=\"#ffffff\"/> <!-- #CC0E86 -->\n\t\t\t<itemData name=\"Member\" defStyleNum=\"dsNormal\"/>\n\t\t\t<itemData name=\"Instance Variable\" defStyleNum=\"dsOthers\"/>\n\t\t\t<itemData name=\"Class Variable\" defStyleNum=\"dsOthers\"/>\n\t\t\t\n\t\t\t<itemData name=\"Comment\" defStyleNum=\"dsComment\"/>\n\t\t\t<itemData name=\"Blockcomment\" defStyleNum=\"dsComment\"/>\n\t\t\t<itemData name=\"Region Marker\" defStyleNum=\"dsNormal\" color=\"#0000ff\"/>\n\t\t\t<itemData name=\"RDoc Value\" defStyleNum=\"dsOthers\"/>\n\t\t\t\n\t\t\t<itemData name=\"Here Document\" defStyleNum=\"dsOthers\"/>\n\t\t\t\n\t\t\t<!-- use these to mark errors and alerts things -->\n\t\t\t<itemData name=\"Error\" defStyleNum=\"dsError\" />\n\t\t\t\n\t\t\t<itemData name=\"Delimiter\" defStyleNum=\"dsNormal\" color=\"#FF9FEC\"/>\n\t\t\t<itemData name=\"Expression\" defStyleNum=\"dsOthers\"/>\n\t\t\t<itemData name=\"Operator\" defStyleNum=\"dsNormal\" color=\"#FF9FEC\"/>\n\t\t</itemDatas>\n\t</highlighting>\n\t<general>\n\t\t<comments>\n\t\t\t<comment name=\"singleLine\" start=\"#\"/>\n\t\t</comments>\n\t\t<keywords casesensitive=\"1\" weakDeliminator=\"!?\"/> \n\t</general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/rust.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\"\n[\n\t<!-- FIXME: Kate's regex engine has very limited support for\n\tpredefined char classes, so making rustIdent consistent with actual\n\tRust identifiers will be a bit difficult -->\n\t<!ENTITY rustIdent \"[a-zA-Z_][a-zA-Z_0-9]*\">\n\t<!ENTITY rustIntSuf \"([iu](8|16|32|64)?)?\">\n]>\n<language name=\"Rust\" version=\"1.0.0\" kateversion=\"2.4\" section=\"Sources\" extensions=\"*.rs\" mimetype=\"text/x-rust\" priority=\"15\">\n<highlighting>\n\t<list name=\"fn\">\n\t\t<item> fn </item>\n\t</list>\n\t<list name=\"type\">\n\t\t<item> type </item>\n\t</list>\n\t<list name=\"reserved\">\n\t\t<item> abstract </item>\n\t\t<item> alignof </item>\n\t\t<item> become </item>\n\t\t<item> do </item>\n\t\t<item> final </item>\n\t\t<item> offsetof </item>\n\t\t<item> override </item>\n\t\t<item> priv </item>\n\t\t<item> pure </item>\n\t\t<item> sizeof </item>\n\t\t<item> typeof </item>\n\t\t<item> unsized </item>\n\t\t<item> yield </item>\n\t</list>\n\t<list name=\"keywords\">\n\t\t<item> as </item>\n\t\t<item> box </item>\n\t\t<item> break </item>\n\t\t<item> const </item>\n\t\t<item> continue </item>\n\t\t<item> crate </item>\n\t\t<item> else </item>\n\t\t<item> enum </item>\n\t\t<item> extern </item>\n\t\t<item> for </item>\n\t\t<item> if </item>\n\t\t<item> impl </item>\n\t\t<item> in </item>\n\t\t<item> let </item>\n\t\t<item> loop </item>\n\t\t<item> match </item>\n\t\t<item> mod </item>\n\t\t<item> move </item>\n\t\t<item> mut </item>\n\t\t<item> pub </item>\n\t\t<item> ref </item>\n\t\t<item> return </item>\n\t\t<item> static </item>\n\t\t<item> struct </item>\n\t\t<item> super </item>\n\t\t<item> trait </item>\n\t\t<item> unsafe </item>\n\t\t<item> use </item>\n\t\t<item> virtual </item>\n\t\t<item> where </item>\n\t\t<item> while </item>\n\t</list>\n\t<list name=\"traits\">\n\t\t<item> AsSlice </item>\n\t\t<item> CharExt </item>\n\t\t<item> Clone </item>\n\t\t<item> Copy </item>\n\t\t<item> Debug </item>\n\t\t<item> Decodable </item>\n\t\t<item> Default </item>\n\t\t<item> Display </item>\n\t\t<item> DoubleEndedIterator </item>\n\t\t<item> Drop </item>\n\t\t<item> Encodable </item>\n\t\t<item> Eq </item>\n\t\t<item> Default </item>\n\t\t<item> Extend </item>\n\t\t<item> Fn </item>\n\t\t<item> FnMut </item>\n\t\t<item> FnOnce </item>\n\t\t<item> FromPrimitive </item>\n\t\t<item> Hash </item>\n\t\t<item> Iterator </item>\n\t\t<item> IteratorExt </item>\n\t\t<item> MutPtrExt </item>\n\t\t<item> Ord </item>\n\t\t<item> PartialEq </item>\n\t\t<item> PartialOrd </item>\n\t\t<item> PtrExt </item>\n\t\t<item> Rand </item>\n\t\t<item> Send </item>\n\t\t<item> Sized </item>\n\t\t<item> SliceConcatExt </item>\n\t\t<item> SliceExt </item>\n\t\t<item> Str </item>\n\t\t<item> StrExt </item>\n\t\t<item> Sync </item>\n\t\t<item> ToString </item>\n\t</list>\n\t<list name=\"types\">\n\t\t<item> bool </item>\n\t\t<item> int </item>\n\t\t<item> isize </item>\n\t\t<item> uint </item>\n\t\t<item> usize </item>\n\t\t<item> i8 </item>\n\t\t<item> i16 </item>\n\t\t<item> i32 </item>\n\t\t<item> i64 </item>\n\t\t<item> u8 </item>\n\t\t<item> u16 </item>\n\t\t<item> u32 </item>\n\t\t<item> u64 </item>\n\t\t<item> f32 </item>\n\t\t<item> f64 </item>\n\t\t<item> float </item>\n\t\t<item> char </item>\n\t\t<item> str </item>\n\t\t<item> Option </item>\n\t\t<item> Result </item>\n\t\t<item> Self </item>\n\t\t<item> Box </item>\n\t\t<item> Vec </item>\n\t\t<item> String </item>\n\t</list>\n\t<list name=\"ctypes\">\n\t\t<item> c_float </item>\n\t\t<item> c_double </item>\n\t\t<item> c_void </item>\n\t\t<item> FILE </item>\n\t\t<item> fpos_t </item>\n\t\t<item> DIR </item>\n\t\t<item> dirent </item>\n\t\t<item> c_char </item>\n\t\t<item> c_schar </item>\n\t\t<item> c_uchar </item>\n\t\t<item> c_short </item>\n\t\t<item> c_ushort </item>\n\t\t<item> c_int </item>\n\t\t<item> c_uint </item>\n\t\t<item> c_long </item>\n\t\t<item> c_ulong </item>\n\t\t<item> size_t </item>\n\t\t<item> ptrdiff_t </item>\n\t\t<item> clock_t </item>\n\t\t<item> time_t </item>\n\t\t<item> c_longlong </item>\n\t\t<item> c_ulonglong </item>\n\t\t<item> intptr_t </item>\n\t\t<item> uintptr_t </item>\n\t\t<item> off_t </item>\n\t\t<item> dev_t </item>\n\t\t<item> ino_t </item>\n\t\t<item> pid_t </item>\n\t\t<item> mode_t </item>\n\t\t<item> ssize_t </item>\n\t</list>\n\t<list name=\"self\">\n\t\t<item> self </item>\n\t</list>\n\t<list name=\"constants\">\n\t\t<item> true </item>\n\t\t<item> false </item>\n\t\t<item> Some </item>\n\t\t<item> None </item>\n\t\t<item> Ok </item>\n\t\t<item> Err </item>\n\t\t<item> Success </item>\n\t\t<item> Failure </item>\n\t\t<item> Cons </item>\n\t\t<item> Nil </item>\n\t</list>\n\t<list name=\"cconstants\">\n\t\t<item> EXIT_FAILURE </item>\n\t\t<item> EXIT_SUCCESS </item>\n\t\t<item> RAND_MAX </item>\n\t\t<item> EOF </item>\n\t\t<item> SEEK_SET </item>\n\t\t<item> SEEK_CUR </item>\n\t\t<item> SEEK_END </item>\n\t\t<item> _IOFBF </item>\n\t\t<item> _IONBF </item>\n\t\t<item> _IOLBF </item>\n\t\t<item> BUFSIZ </item>\n\t\t<item> FOPEN_MAX </item>\n\t\t<item> FILENAME_MAX </item>\n\t\t<item> L_tmpnam </item>\n\t\t<item> TMP_MAX </item>\n\t\t<item> O_RDONLY </item>\n\t\t<item> O_WRONLY </item>\n\t\t<item> O_RDWR </item>\n\t\t<item> O_APPEND </item>\n\t\t<item> O_CREAT </item>\n\t\t<item> O_EXCL </item>\n\t\t<item> O_TRUNC </item>\n\t\t<item> S_IFIFO </item>\n\t\t<item> S_IFCHR </item>\n\t\t<item> S_IFBLK </item>\n\t\t<item> S_IFDIR </item>\n\t\t<item> S_IFREG </item>\n\t\t<item> S_IFMT </item>\n\t\t<item> S_IEXEC </item>\n\t\t<item> S_IWRITE </item>\n\t\t<item> S_IREAD </item>\n\t\t<item> S_IRWXU </item>\n\t\t<item> S_IXUSR </item>\n\t\t<item> S_IWUSR </item>\n\t\t<item> S_IRUSR </item>\n\t\t<item> F_OK </item>\n\t\t<item> R_OK </item>\n\t\t<item> W_OK </item>\n\t\t<item> X_OK </item>\n\t\t<item> STDIN_FILENO </item>\n\t\t<item> STDOUT_FILENO </item>\n\t\t<item> STDERR_FILENO </item>\n\t</list>\n\t<contexts>\n\t\t<context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"Normal\">\n\t\t\t<DetectSpaces/>\n\t\t\t<keyword String=\"fn\" attribute=\"Keyword\" context=\"Function\"/>\n\t\t\t<keyword String=\"type\" attribute=\"Keyword\" context=\"Type\"/>\n\t\t\t<keyword String=\"reserved\" attribute=\"Keyword\" context=\"#stay\"/>\n\t\t\t<keyword String=\"keywords\" attribute=\"Keyword\" context=\"#stay\"/>\n\t\t\t<keyword String=\"types\" attribute=\"Type\" context=\"#stay\"/>\n\t\t\t<keyword String=\"traits\" attribute=\"Trait\" context=\"#stay\"/>\n\t\t\t<keyword String=\"ctypes\" attribute=\"CType\" context=\"#stay\"/>\n\t\t\t<keyword String=\"self\" attribute=\"Self\" context=\"#stay\"/>\n\t\t\t<keyword String=\"constants\" attribute=\"Constant\" context=\"#stay\"/>\n\t\t\t<keyword String=\"cconstants\" attribute=\"CConstant\" context=\"#stay\"/>\n\t\t\t<Detect2Chars char=\"/\" char1=\"/\" attribute=\"Comment\" context=\"Commentar 1\"/>\n\t\t\t<Detect2Chars char=\"/\" char1=\"*\" attribute=\"Comment\" context=\"Commentar 2\" beginRegion=\"Comment\"/>\n\t\t\t<RegExpr String=\"0x[0-9a-fA-F_]+&rustIntSuf;\" attribute=\"Number\" context=\"#stay\"/>\n\t\t\t<RegExpr String=\"0o[0-7_]+&rustIntSuf;\" attribute=\"Number\" context=\"#stay\"/>\n\t\t\t<RegExpr String=\"0b[0-1_]+&rustIntSuf;\" attribute=\"Number\" context=\"#stay\"/>\n\t\t\t<RegExpr String=\"[0-9][0-9_]*\\.[0-9_]*([eE][+-]?[0-9_]+)?(f32|f64|f)?\" attribute=\"Number\" context=\"#stay\"/>\n\t\t\t<RegExpr String=\"[0-9][0-9_]*&rustIntSuf;\" attribute=\"Number\" context=\"#stay\"/>\n\t\t\t<Detect2Chars char=\"#\" char1=\"[\" attribute=\"Attribute\" context=\"Attribute\" beginRegion=\"Attribute\"/>\n\t\t\t<StringDetect String=\"#![\" attribute=\"Attribute\" context=\"Attribute\" beginRegion=\"Attribute\"/>\n\t\t\t<RegExpr String=\"&rustIdent;::\" attribute=\"Scope\"/>\n\t\t\t<RegExpr String=\"&rustIdent;!\" attribute=\"Macro\"/>\n\t\t\t<RegExpr String=\"&apos;&rustIdent;(?!&apos;)\" attribute=\"Lifetime\"/>\n\t\t\t<DetectChar char=\"{\" attribute=\"Symbol\" context=\"#stay\" beginRegion=\"Brace\" />\n\t\t\t<DetectChar char=\"}\" attribute=\"Symbol\" context=\"#stay\" endRegion=\"Brace\" />\n                        <Detect2Chars char=\"r\" char1=\"&quot;\" attribute=\"String\" context=\"RawString\"/>\n                        <StringDetect String=\"r##&quot;\" attribute=\"String\" context=\"RawHashed2\"/>\n                        <StringDetect String=\"r#&quot;\" attribute=\"String\" context=\"RawHashed1\"/>\n\t\t\t<DetectChar char=\"&quot;\" attribute=\"String\" context=\"String\"/>\n\t\t\t<DetectChar char=\"&apos;\" attribute=\"Character\" context=\"Character\"/>\n\t\t\t<DetectChar char=\"[\" attribute=\"Symbol\" context=\"#stay\" beginRegion=\"Bracket\" />\n\t\t\t<DetectChar char=\"]\" attribute=\"Symbol\" context=\"#stay\" endRegion=\"Bracket\" />\n\t\t\t<DetectIdentifier/>\n\t\t</context>\n\t\t<context attribute=\"Attribute\" lineEndContext=\"#stay\" name=\"Attribute\">\n\t\t\t<DetectChar char=\"]\" attribute=\"Attribute\" context=\"#pop\" endRegion=\"Attribute\"/>\n\t\t\t<IncludeRules context=\"Normal\"/>\n\t\t</context>\n\t\t<context attribute=\"Definition\" lineEndContext=\"#stay\" name=\"Function\">\n\t\t\t<DetectSpaces/>\n\t\t\t<DetectChar char=\"(\" attribute=\"Normal Text\" context=\"#pop\"/>\n\t\t\t<DetectChar char=\"&lt;\" attribute=\"Normal Text\" context=\"#pop\"/>\n\t\t</context>\n\t\t<context attribute=\"Definition\" lineEndContext=\"#stay\" name=\"Type\">\n\t\t\t<DetectSpaces/>\n\t\t\t<DetectChar char=\"=\" attribute=\"Normal Text\" context=\"#pop\"/>\n\t\t\t<DetectChar char=\"&lt;\" attribute=\"Normal Text\" context=\"#pop\"/>\n\t\t\t<DetectChar char=\";\" attribute=\"Normal Text\" context=\"#pop\"/>\n\t\t</context>\n                <!-- Rustc allows strings to extend over multiple lines, and the\n                only thing a backshash at end-of-line does is remove the whitespace. -->\n                <context attribute=\"String\" lineEndContext=\"#stay\" name=\"String\">\n                        <DetectChar char=\"\\\" attribute=\"CharEscape\" context=\"CharEscape\"/>\n                        <DetectChar attribute=\"String\" context=\"#pop\" char=\"&quot;\"/>\n                </context>\n\t\t<context attribute=\"String\" lineEndContext=\"#stay\" name=\"RawString\">\n\t\t\t<DetectChar attribute=\"String\" context=\"#pop\" char=\"&quot;\"/>\n\t\t</context>\n                <!-- These rules are't complete: they won't match r###\"abc\"### -->\n                <context attribute=\"String\" lineEndContext=\"#stay\" name=\"RawHashed1\">\n                        <Detect2Chars attribute=\"String\" context=\"#pop\" char=\"&quot;\" char1=\"#\"/>\n                </context>\n                <context attribute=\"String\" lineEndContext=\"#stay\" name=\"RawHashed2\">\n                        <StringDetect attribute=\"String\" context=\"#pop\" String=\"&quot;##\"/>\n                </context>\n\t\t<context attribute=\"Character\" lineEndContext=\"#pop\" name=\"Character\">\n\t\t\t<DetectChar char=\"\\\" attribute=\"CharEscape\" context=\"CharEscape\"/>\n\t\t\t<DetectChar attribute=\"Character\" context=\"#pop\" char=\"&apos;\"/>\n\t\t</context>\n\t\t<context attribute=\"CharEscape\" lineEndContext=\"#pop\" name=\"CharEscape\">\n\t\t\t<AnyChar String=\"nrt\\&apos;&quot;\" attribute=\"CharEscape\" context=\"#pop\"/>\n\t\t\t<RegExpr String=\"x[0-9a-fA-F]{2}\" attribute=\"CharEscape\" context=\"#pop\"/>\n\t\t\t<RegExpr String=\"u\\{[0-9a-fA-F]{1,6}\\}\" attribute=\"CharEscape\" context=\"#pop\"/>\n\t\t\t<RegExpr String=\"u[0-9a-fA-F]{4}\" attribute=\"CharEscape\" context=\"#pop\"/>\n\t\t\t<RegExpr String=\"U[0-9a-fA-F]{8}\" attribute=\"CharEscape\" context=\"#pop\"/>\n\t\t\t<RegExpr String=\".\" attribute=\"Error\" context=\"#pop\"/>\n\t\t</context>\n\t\t<context attribute=\"Comment\" lineEndContext=\"#pop\" name=\"Commentar 1\"/>\n\t\t<context attribute=\"Comment\" lineEndContext=\"#stay\" name=\"Commentar 2\">\n\t\t\t<DetectSpaces/>\n\t\t\t<Detect2Chars char=\"*\" char1=\"/\" attribute=\"Comment\" context=\"#pop\" endRegion=\"Comment\"/>\n\t\t</context>\n\t</contexts>\n\t<itemDatas>\n\t\t<itemData name=\"Normal Text\"  defStyleNum=\"dsNormal\"/>\n\t\t<itemData name=\"Keyword\"      defStyleNum=\"dsKeyword\" color=\"#770088\" bold=\"1\"/>\n\t\t<itemData name=\"Self\"         defStyleNum=\"dsKeyword\" color=\"#FF0000\" bold=\"1\"/>\n\t\t<itemData name=\"Type\"         defStyleNum=\"dsKeyword\" color=\"#4e9a06\" bold=\"1\"/>\n\t\t<itemData name=\"Trait\"        defStyleNum=\"dsKeyword\" color=\"#4e9a06\" bold=\"1\"/>\n\t\t<itemData name=\"CType\"        defStyleNum=\"dsNormal\" color=\"#4e9a06\"/>\n\t\t<itemData name=\"Constant\"     defStyleNum=\"dsKeyword\" color=\"#116644\"/>\n\t\t<itemData name=\"CConstant\"    defStyleNum=\"dsNormal\" color=\"#116644\"/>\n\t\t<itemData name=\"Definition\"   defStyleNum=\"dsNormal\" color=\"#0000FF\"/>\n\t\t<itemData name=\"Comment\"      defStyleNum=\"dsComment\" color=\"#AA5500\"/>\n\t\t<itemData name=\"Scope\"        defStyleNum=\"dsNormal\" color=\"#0055AA\"/>\n\t\t<itemData name=\"Number\"       defStyleNum=\"dsDecVal\" color=\"#116644\"/>\n\t\t<itemData name=\"String\"       defStyleNum=\"dsString\" color=\"#FF0000\"/>\n\t\t<itemData name=\"CharEscape\"   defStyleNum=\"dsChar\" color=\"#FF0000\" bold=\"1\"/>\n\t\t<itemData name=\"Character\"    defStyleNum=\"dsChar\" color=\"#FF0000\"/>\n\t\t<itemData name=\"Macro\"        defStyleNum=\"dsOthers\"/>\n\t\t<itemData name=\"Attribute\"    defStyleNum=\"dsOthers\"/>\n\t\t<itemData name=\"Lifetime\"     defStyleNum=\"dsOthers\" bold=\"1\"/>\n\t\t<itemData name=\"Error\"        defStyleNum=\"dsError\"/>\n\t</itemDatas>\n</highlighting>\n<general>\n\t<comments>\n\t\t<comment name=\"singleLine\" start=\"//\" />\n\t\t<comment name=\"multiLine\" start=\"/*\" end=\"*/\" region=\"Comment\"/>\n\t</comments>\n\t<keywords casesensitive=\"1\" />\n</general>\n</language>\n\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/tcl.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n\n<!-- Authors: Alexander Dederer & JM. Philippe -->\n<!-- Copyright: BSD copyright & Irsid - Arcelor Innovation R&D -->\n<!-- Ported to Kate 2.0/ KWrite 4.0 by Joseph Wenninger (Updated by Simon Robins)-->\n<!--\n    Updated by Pawel Salawa (boogie at scripts dot one dot pl)\n\n    Revision history:\n        1.10:\n            - Fixed problem with single ':' character after variable name (it's no longer variable,\n              because only double-colon is namespace delimiter and can be part of variable name).\n            - Fixed problem with matching quote character next to regular character, for example:\n              puts {\"string\"}\n              In that case left bracked was marked as string, but it's no longer like that.\n            - Fixed problem with variable names like: ${text\\}test}\n              It whole is valid variable name, because of escape character.\n            - Fixed problem with marking ';' character as a comment when '#' character was after the ';'.\n            - Fixed problem with marking options. '-' character after word-delimiter character caused\n              marking that word-delimiter character as option too, even it wasn't white-space.\n            - Few other minor optimalizations.\n\t1.09:\n\t    - Added fast comments support (Ctrl+d or whatever your shortcut is)\n\t    - Fixed single-character variables detection\n\t    - Fixed detection of varaibles with names containing serval namespace delimiters (::)\n-->\n\n<language name=\"Tcl/Tk\" version=\"1.10\" kateversion=\"2.4\" section=\"Scripts\" extensions=\"*.tcl;*.tk\" mimetype=\"text/x-tcl\">\n  <highlighting>\n    <list name=\"keywords\">\n      <item> after </item>\n      <item> append  </item>\n      <item> AppleScript  </item>\n      <item> argv  </item>\n      <item> argc  </item>\n      <item> array  </item>\n      <item> auto_execk  </item>\n      <item> auto_load  </item>\n      <item> auto_mkindex  </item>\n      <item> auto_path  </item>\n      <item> auto_reset  </item>\n      <item> beep  </item>\n      <item> bell  </item>\n      <item> binary  </item>\n      <item> bind  </item>\n      <item> bindtags  </item>\n      <item> bgerror  </item>\n      <item> break  </item>\n      <item> button  </item>\n      <item> canvas  </item>\n      <item> case  </item>\n      <item> catch  </item>\n      <item> cd  </item>\n      <item> checkbutton  </item>\n      <item> clipboard  </item>\n      <item> clock  </item>\n      <item> close  </item>\n      <item> concat  </item>\n      <item> console  </item>\n      <item> continue  </item>\n      <item> dde  </item>\n      <item> destroy  </item>\n      <item> else  </item>\n      <item> elseif  </item>\n      <item> encoding  </item>\n      <item> entry  </item>\n      <item> env  </item>\n      <item> eof  </item>\n      <item> error  </item>\n      <item> errorCode  </item>\n      <item> errorInfo  </item>\n      <item> eval  </item>\n      <item> event  </item>\n      <item> exec  </item>\n      <item> exit  </item>\n      <item> expr  </item>\n      <item> fblocked  </item>\n      <item> fconfigure  </item>\n      <item> fcopy  </item>\n      <item> file  </item>\n      <item> fileevent  </item>\n      <item> flush  </item>\n      <item> focus  </item>\n      <item> font  </item>\n      <item> for  </item>\n      <item> foreach  </item>\n      <item> format  </item>\n      <item> frame  </item>\n      <item> gets  </item>\n      <item> glob  </item>\n      <item> global  </item>\n      <item> grab  </item>\n      <item> grid  </item>\n      <item> history  </item>\n      <item> if  </item>\n      <item> image  </item>\n      <item> incr  </item>\n      <item> info  </item>\n      <item> interp  </item>\n      <item> join  </item>\n      <item> label  </item>\n      <item> lappend  </item>\n      <item> lindex  </item>\n      <item> linsert  </item>\n      <item> list  </item>\n      <item> listbox  </item>\n      <item> llength  </item>\n      <item> load  </item>\n      <item> lower  </item>\n      <item> lrange  </item>\n      <item> lreplace  </item>\n      <item> lsearch  </item>\n      <item> lsort  </item>\n      <item> menu  </item>\n      <item> menubutton  </item>\n      <item> message  </item>\n      <item> namespace  </item>\n      <item> open  </item>\n      <item> option  </item>\n      <item> OptProc  </item>\n      <item> pack  </item>\n      <item> package  </item>\n      <item> parray  </item>\n      <item> pid  </item>\n      <item> place  </item>\n      <item> pkg_mkindex  </item>\n      <item> proc  </item>\n      <item> puts  </item>\n      <item> pwd  </item>\n      <item> radiobutton  </item>\n      <item> raise  </item>\n      <item> read  </item>\n      <item> regexp  </item>\n      <item> registry  </item>\n      <item> regsub  </item>\n      <item> rename  </item>\n      <item> resource  </item>\n      <item> return  </item>\n      <item> scale  </item>\n      <item> scan  </item>\n      <item> scrollbar  </item>\n      <item> seek  </item>\n      <item> selection  </item>\n      <item> send  </item>\n      <item> set  </item>\n      <item> socket  </item>\n      <item> source  </item>\n      <item> split  </item>\n      <item> string  </item>\n      <item> subst  </item>\n      <item> switch  </item>\n      <item> tclLog  </item>\n      <item> tcl_endOfWord  </item>\n      <item> tcl_findLibrary  </item>\n      <item> tcl_library  </item>\n      <item> tcl_patchLevel  </item>\n      <item> tcl_platform  </item>\n      <item> tcl_precision  </item>\n      <item> tcl_rcFileName  </item>\n      <item> tcl_rcRsrcName  </item>\n      <item> tcl_startOfNextWord  </item>\n      <item> tcl_startOfPreviousWord  </item>\n      <item> tcl_traceCompile  </item>\n      <item> tcl_traceExec  </item>\n      <item> tcl_version  </item>\n      <item> tcl_wordBreakAfter  </item>\n      <item> tcl_wordBreakBefore  </item>\n      <item> tell  </item>\n      <item> text  </item>\n      <item> time  </item>\n      <item> tk  </item>\n      <item> tkTabToWindow  </item>\n      <item> tkwait  </item>\n      <item> tk_chooseColor  </item>\n      <item> tk_chooseDirectory  </item>\n      <item> tk_focusFollowMouse  </item>\n      <item> tk_focusNext  </item>\n      <item> tk_focusPrev  </item>\n      <item> tk_getOpenFile  </item>\n      <item> tk_getSaveFile  </item>\n      <item> tk_library  </item>\n      <item> tk_messageBox  </item>\n      <item> tk_optionMenu  </item>\n      <item> tk_patchLevel  </item>\n      <item> tk_popup  </item>\n      <item> tk_strictMotif  </item>\n      <item> tk_version  </item>\n      <item> toplevel  </item>\n      <item> trace  </item>\n      <item> unknown  </item>\n      <item> unset  </item>\n      <item> update  </item>\n      <item> uplevel  </item>\n      <item> upvar  </item>\n      <item> variable  </item>\n      <item> vwait  </item>\n      <item> while  </item>\n      <item> winfo  </item>\n      <item> wm  </item>\n    </list>\n\n    <list name=\"keywords-opt\">\n      <item> add </item>\n      <item> args </item>\n      <item> atime </item>\n      <item> attributes </item>\n      <item> body </item>\n      <item> bytelength </item>\n      <item> cancel </item>\n      <item> channels </item>\n      <item> clicks </item>\n      <item> cmdcount </item>\n      <item> commands </item>\n      <item> compare </item>\n      <item> complete </item>\n      <item> convertfrom </item>\n      <item> convertto </item>\n      <item> copy </item>\n      <item> default </item>\n      <item> delete </item>\n      <item> dirname </item>\n      <item> equal </item>\n      <item> executable </item>\n      <item> exists </item>\n      <item> extension </item>\n      <item> first </item>\n      <item> forget </item>\n      <item> format </item>\n      <item> functions </item>\n      <item> globals </item>\n      <item> hostname </item>\n      <item> idle </item>\n      <item> ifneeded </item>\n      <item> index </item>\n      <item> info </item>\n      <item> is </item>\n      <item> isdirectory </item>\n      <item> isfile </item>\n      <item> join </item>\n      <item> last </item>\n      <item> length </item>\n      <item> level </item>\n      <item> library </item>\n      <item> link </item>\n      <item> loaded </item>\n      <item> locals </item>\n      <item> lstat </item>\n      <item> map </item>\n      <item> match </item>\n      <item> mkdir </item>\n      <item> mtime </item>\n      <item> nameofexecutable </item>\n      <item> names </item>\n      <item> nativename </item>\n      <item> normalize </item>\n      <item> number </item>\n      <item> owned </item>\n      <item> patchlevel </item>\n      <item> pathtype </item>\n      <item> present </item>\n      <item> procs </item>\n      <item> provide </item>\n      <item> range </item>\n      <item> readable </item>\n      <item> readlink </item>\n      <item> remove </item>\n      <item> rename </item>\n      <item> repeat </item>\n      <item> replace </item>\n      <item> require </item>\n      <item> rootname </item>\n      <item> scan </item>\n      <item> script </item>\n      <item> seconds </item>\n      <item> separator </item>\n      <item> sharedlibextension </item>\n      <item> size </item>\n      <item> split </item>\n      <item> stat </item>\n      <item> system </item>\n      <item> tail </item>\n      <item> tclversion </item>\n      <item> tolower </item>\n      <item> totitle </item>\n      <item> toupper </item>\n      <item> trim </item>\n      <item> trimleft </item>\n      <item> trimright </item>\n      <item> type </item>\n      <item> unknown </item>\n      <item> variable </item>\n      <item> vars </item>\n      <item> vcompare </item>\n      <item> vdelete </item>\n      <item> versions </item>\n      <item> vinfo </item>\n      <item> volumes </item>\n      <item> vsatisfies </item>\n      <item> wordend </item>\n      <item> wordstart </item>\n      <item> writable </item>\n\n      <item> activate </item>\n      <item> actual </item>\n      <item> addtag </item>\n      <item> append </item>\n      <item> appname </item>\n      <item> aspect </item>\n      <item> atom </item>\n      <item> atomname </item>\n      <item> bbox </item>\n      <item> bind </item>\n      <item> broadcast </item>\n      <item> canvasx </item>\n      <item> canvasy </item>\n      <item> caret </item>\n      <item> cells </item>\n      <item> cget </item>\n      <item> children </item>\n      <item> class </item>\n      <item> clear </item>\n      <item> client </item>\n      <item> clone </item>\n      <item> colormapfull </item>\n      <item> colormapwindows </item>\n      <item> command </item>\n      <item> configure </item>\n      <item> containing </item>\n      <item> coords </item>\n      <item> create </item>\n      <item> current </item>\n      <item> curselection </item>\n      <item> dchars </item>\n      <item> debug </item>\n      <item> deiconify </item>\n      <item> delta </item>\n      <item> depth </item>\n      <item> deselect </item>\n      <item> dlineinfo </item>\n      <item> dtag </item>\n      <item> dump </item>\n      <item> edit </item>\n      <item> entrycget </item>\n      <item> entryconfigure </item>\n      <item> families </item>\n      <item> find </item>\n      <item> flash </item>\n      <item> focus </item>\n      <item> focusmodel </item>\n      <item> fpixels </item>\n      <item> fraction </item>\n      <item> frame </item>\n      <item> generate </item>\n      <item> geometry </item>\n      <item> get </item>\n      <item> gettags </item>\n      <item> grid </item>\n      <item> group </item>\n      <item> handle </item>\n      <item> height </item>\n      <item> hide </item>\n      <item> iconbitmap </item>\n      <item> iconify </item>\n      <item> iconmask </item>\n      <item> iconname </item>\n      <item> iconposition </item>\n      <item> iconwindow </item>\n      <item> icursor </item>\n      <item> id </item>\n      <item> identify </item>\n      <item> image </item>\n      <item> insert </item>\n      <item> interps </item>\n      <item> inuse </item>\n      <item> invoke </item>\n      <item> ismapped </item>\n      <item> itemcget </item>\n      <item> itemconfigure </item>\n      <item> keys </item>\n      <item> lower </item>\n      <item> manager </item>\n      <item> mark </item>\n      <item> maxsize </item>\n      <item> measure </item>\n      <item> metrics </item>\n      <item> minsize </item>\n      <item> move </item>\n      <item> name </item>\n      <item> nearest </item>\n      <item> overrideredirect </item>\n      <item> own </item>\n      <item> panecget </item>\n      <item> paneconfigure </item>\n      <item> panes </item>\n      <item> parent </item>\n      <item> pathname </item>\n      <item> pixels </item>\n      <item> pointerx </item>\n      <item> pointerxy </item>\n      <item> pointery </item>\n      <item> positionfrom </item>\n      <item> post </item>\n      <item> postcascade </item>\n      <item> postscript </item>\n      <item> protocol </item>\n      <item> proxy </item>\n      <item> raise </item>\n      <item> release </item>\n      <item> reqheight </item>\n      <item> reqwidth </item>\n      <item> resizable </item>\n      <item> rgb </item>\n      <item> rootx </item>\n      <item> rooty </item>\n      <item> scale </item>\n      <item> scaling </item>\n      <item> screen </item>\n      <item> screencells </item>\n      <item> screendepth </item>\n      <item> screenheight </item>\n      <item> screenmmheight </item>\n      <item> screenmmwidth </item>\n      <item> screenvisual </item>\n      <item> screenwidth </item>\n      <item> search </item>\n      <item> see </item>\n      <item> select </item>\n      <item> selection </item>\n      <item> server </item>\n      <item> set </item>\n      <item> show </item>\n      <item> sizefrom </item>\n      <item> stackorder </item>\n      <item> state </item>\n      <item> status </item>\n      <item> tag </item>\n      <item> title </item>\n      <item> toplevel </item>\n      <item> transient </item>\n      <item> types </item>\n      <item> unpost </item>\n      <item> useinputmethods </item>\n      <item> validate </item>\n      <item> values </item>\n      <item> viewable </item>\n      <item> visual </item>\n      <item> visualid </item>\n      <item> visualsavailable </item>\n      <item> vrootheight </item>\n      <item> vrootwidth </item>\n      <item> vrootx </item>\n      <item> vrooty </item>\n      <item> width </item>\n      <item> window </item>\n      <item> windowingsystem </item>\n      <item> withdraw </item>\n      <item> x </item>\n      <item> xview </item>\n      <item> y </item>\n    </list>\n\n    <contexts>\n      <context name = \"Base\" attribute = \"Normal Text\" lineEndContext=\"#stay\">\n      \n        <!-- Virtual blocks -->\n        <RegExpr attribute=\"Region Marker\" context=\"#stay\" String=\"#\\s*BEGIN.*$\" beginRegion=\"region\" firstNonSpace=\"true\"/>\n        <RegExpr attribute=\"Region Marker\" context=\"#stay\" String=\"#\\s*END.*$\" endRegion=\"region\" firstNonSpace=\"true\"/>\n        \n        <!-- Standard -->\n        <keyword String = \"keywords\" attribute = \"Keyword\" context=\"#stay\"/>\n        <keyword String = \"keywords-opt\" attribute = \"Parameter\" context=\"#stay\"/>\n        <Float attribute = \"Float\" context=\"#stay\"/>\n        <Int attribute =\"Decimal\" context=\"#stay\"/>\n        <RegExpr String=\"\\\\.\" attribute = \"Char\" context = \"#stay\"/>\n        \n        <!-- Options -->\n        <RegExpr String = \"\\s-\\w+\" attribute = \"Parameter\" context=\"#stay\"/>\n        \n        <!-- Variables -->\n        <RegExpr String = \"\\$\\{([^\\}]|\\\\\\})+\\}\" attribute = \"Variable\" context=\"#stay\"/>\n        <RegExpr String = \"\\$(::|\\w)+\" attribute = \"Variable\" context=\"#stay\"/>\n        \n        <!-- Strings -->\n        <RegExpr String = \"&quot;{2}\" attribute = \"String\" context=\"#stay\"/>\n        <RegExpr String = \"&quot;\" attribute = \"String\" context=\"String\"/>\n        \n        <!-- Comments -->\n        <DetectChar char = \";\" attribute = \"Normal Text\" context=\"New command line\" />\n        <DetectChar char = \"#\" attribute = \"Comment\" context=\"Comment\" firstNonSpace=\"true\"/>\n        \n        <!-- Braces, brackets, etc -->\n        <DetectChar char = \"{\" attribute = \"Keyword\" context=\"#stay\" beginRegion=\"block\"/>\n        <DetectChar char = \"}\" attribute = \"Keyword\" context=\"#stay\" endRegion=\"block\"/>\n        <DetectChar char = \"[\" attribute = \"Keyword\" context=\"#stay\"/>\n        <DetectChar char = \"]\" attribute = \"Keyword\" context=\"#stay\"/>\n        \n      </context>\n\n      <context name = \"String\" attribute = \"String\" lineEndContext=\"#stay\">\n        <RegExpr String=\"\\\\.\" attribute = \"Char\" context = \"#stay\"/>\n        <DetectChar char=\"&quot;\" attribute = \"String\" context = \"#pop\"/>\n        <DetectChar char  = \"$\" attribute = \"Variable\" context=\"#stay\"/>\n      </context>\n\n      <context name = \"Comment\" attribute = \"Comment\" lineEndContext=\"#pop\"/>\n\n      <context name = \"New command line\" attribute = \"Normal Text\" lineEndContext=\"#stay\">\n        <RegExpr String = \"\\s*#\" attribute=\"Comment\" context=\"Comment\" />\n        <RegExpr String = \".\" attribute=\"Normal Text\" context=\"#pop\" lookAhead=\"true\" />\n      </context>\n    </contexts>\n\n    <itemDatas>\n      <itemData name = \"Normal Text\" defStyleNum = \"dsNormal\"/>\n      <itemData name = \"Keyword\" defStyleNum = \"dsKeyword\"/>\n      <itemData name = \"Decimal\" defStyleNum = \"dsDecVal\"/>\n      <itemData name = \"Float\" defStyleNum = \"dsFloat\"/>\n      <itemData name = \"String\" defStyleNum = \"dsString\"/>\n      <itemData name = \"Comment\" defStyleNum = \"dsComment\"/>\n      <itemData name = \"Parameter\" defStyleNum = \"dsOthers\"/>\n      <itemData name = \"Variable\" defStyleNum = \"dsDataType\"/>\n      <itemData name = \"Char\" defStyleNum=\"dsChar\"/>\n      <itemData name = \"Region Marker\" defStyleNum=\"dsRegionMarker\"/>\n    </itemDatas>\n\n  </highlighting>\n\n  <general>\n    <comments>\n\t<comment name=\"singleLine\" start=\"#\" />\n    </comments>\n    <keywords casesensitive=\"1\"/>\n  </general>\n\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/toml.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<!--\n ***************************************************************************\n ** Writing a Kate Highlighting XML File\n ** http://kate-editor.org/article/writing_a_kate_highlighting_xml_file\n **\n ** Introducing TOML\n ** https://github.com/toml-lang/toml\n **\n ***************************************************************************\n-->\n<language name=\"TOML Files\" section=\"Configuration\" extensions=\"*.toml\" mimetype=\"text/x-toml\" version=\"1.0\" kateversion=\"2.0\" author=\"visualfc@gmail.com\" license=\"LGPL\">\n<highlighting>\n\t<contexts>\n\t\t<context name=\"Toml\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n\t\t \t<!--RangeDetect attribute=\"Section\" context=\"#stay\" char=\"[\" char1=\"]\" beginRegion=\"Section\" endRegion=\"Section\" /-->\n\t\t\t<DetectChar attribute=\"Assignment\" context=\"Value\" char=\"=\" />\n\t\t\t<DetectChar attribute=\"String\" context=\"String\" char=\"&quot;\"/>\n\t\t\t<DetectChar char=\"#\" attribute=\"Comment\" context=\"Comment\" firstNonSpace=\"true\" />\n\t\t</context>\n\t    <context name=\"Value\" attribute=\"Value\" lineEndContext=\"#pop\" >\n\t\t\t<DetectChar attribute=\"String\" context=\"String\" char=\"&quot;\"/>\n\t\t\t<RegExpr attribute=\"Comment\" context=\"#pop\" String=\"#.*$\" />\n\t\t</context>\t\t\n\t\t<context name=\"Comment\" attribute=\"Comment\" lineEndContext=\"#pop\">\n\t\t\t<DetectSpaces />\n\t\t\t<IncludeRules context=\"##Alerts\" />\n\t\t\t<DetectIdentifier />\n\t\t</context>\n\t\t<context attribute=\"String\" lineEndContext=\"#pop\" name=\"String\">\n\t\t  <!--LineContinue attribute=\"String\" context=\"#stay\"/-->\n\t\t  <DetectChar attribute=\"String\" context=\"#pop\" char=\"&quot;\"/>\n\t\t</context>\t\t\n\t</contexts>\n\t<itemDatas>\n\t\t<itemData name=\"Normal Text\" defStyleNum=\"dsDataType\" />\n\t\t<itemData name=\"Section\" defStyleNum=\"dsKeyword\" />\n\t\t<itemData name=\"Comment\" defStyleNum=\"dsComment\" />\n\t\t<itemData name=\"Assignment\" defStyleNum=\"dsOthers\" />\n\t\t<itemData name=\"Float\" defStyleNum=\"dsFloat\" />\n\t\t<itemData name=\"Int\" defStyleNum=\"dsDecVal\" />\n\t\t<itemData name=\"String\"  defStyleNum=\"dsString\"/>\n\t\t<itemData name=\"Keyword\" defStyleNum=\"dsKeyword\" />\n\t</itemDatas>\n</highlighting>\n<general>\n\t<comments>\n\t\t<comment name=\"singleLine\" start=\"#\" />\n\t</comments>\n</general>\n</language>"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/xml.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\"\n[\n\t<!ENTITY name    \"[A-Za-z_:][\\w.:_-]*\">\n\t<!ENTITY entref  \"&amp;(#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);\">\n]>\n<language name=\"XML\" version=\"1.97\" kateversion=\"2.4\" section=\"Markup\" extensions=\"*.docbook;*.xml;*.rc;*.daml;*.rdf;*.rss;*.xspf;*.plist;\" mimetype=\"text/xml\" casesensitive=\"1\" author=\"Wilbert Berendsen (wilbert@kde.nl)\" license=\"LGPL\">\n\n<highlighting>\n<contexts>\n  <context name=\"Start\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <IncludeRules context=\"FindXML\" />\n  </context>\n\n  <context name=\"FindXML\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectSpaces />\n    <StringDetect attribute=\"Comment\" context=\"Comment\" String=\"&lt;!--\" beginRegion=\"comment\" />\n    <StringDetect attribute=\"CDATA\" context=\"CDATA\" String=\"&lt;![CDATA[\" beginRegion=\"cdata\" />\n    <RegExpr attribute=\"Doctype\" context=\"Doctype\" String=\"&lt;!DOCTYPE\\s+\" beginRegion=\"doctype\" />\n    <RegExpr attribute=\"Processing Instruction\" context=\"PI\" String=\"&lt;\\?[\\w:_-]*\" beginRegion=\"pi\" />\n    <RegExpr attribute=\"Element\" context=\"Element\" String=\"&lt;&name;\" beginRegion=\"element\" />\n    <IncludeRules context=\"FindEntityRefs\" />\n    <DetectIdentifier />\n  </context>\n\n  <context name=\"FindEntityRefs\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <RegExpr attribute=\"EntityRef\" context=\"#stay\" String=\"&entref;\" />\n    <AnyChar attribute=\"Error\" context=\"#stay\" String=\"&amp;&lt;\" />\n  </context>\n\n  <context name=\"FindPEntityRefs\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <RegExpr attribute=\"EntityRef\" context=\"#stay\" String=\"&entref;\" />\n    <RegExpr attribute=\"PEntityRef\" context=\"#stay\" String=\"%&name;;\" />\n    <AnyChar attribute=\"Error\" context=\"#stay\" String=\"&amp;%\" />\n  </context>\n\n\n  <context name=\"Comment\" attribute=\"Comment\" lineEndContext=\"#stay\">\n    <DetectSpaces />\n    <StringDetect attribute=\"Comment\" context=\"#pop\" String=\"--&gt;\" endRegion=\"comment\" />\n    <RegExpr attribute=\"Error\" context=\"#stay\" String=\"-(-(?!-&gt;))+\" />\n    <IncludeRules context=\"##Alerts\" />\n    <DetectIdentifier />\n  </context>\n\n  <context name=\"CDATA\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectSpaces />\n    <DetectIdentifier />\n    <StringDetect attribute=\"CDATA\" context=\"#pop\" String=\"]]&gt;\" endRegion=\"cdata\" />\n    <StringDetect attribute=\"EntityRef\" context=\"#stay\" String=\"]]&amp;gt;\" />\n  </context>\n\n  <context name=\"PI\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <Detect2Chars attribute=\"Processing Instruction\" context=\"#pop\" char=\"?\" char1=\"&gt;\" endRegion=\"pi\" />\n  </context>\n\n  <context name=\"Doctype\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Doctype\" context=\"#pop\" char=\"&gt;\" endRegion=\"doctype\" />\n    <DetectChar attribute=\"Doctype\" context=\"Doctype Internal Subset\" char=\"[\" beginRegion=\"int_subset\" />\n  </context>\n\n  <context name=\"Doctype Internal Subset\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Doctype\" context=\"#pop\" char=\"]\" endRegion=\"int_subset\" />\n    <RegExpr attribute=\"Doctype\" context=\"Doctype Markupdecl\" String=\"&lt;!(ELEMENT|ENTITY|ATTLIST|NOTATION)\\b\" />\n    <StringDetect attribute=\"Comment\" context=\"Comment\" String=\"&lt;!--\" beginRegion=\"comment\" />\n    <RegExpr attribute=\"Processing Instruction\" context=\"PI\" String=\"&lt;\\?[\\w:_-]*\" beginRegion=\"pi\" />\n    <IncludeRules context=\"FindPEntityRefs\" />\n  </context>\n\n  <context name=\"Doctype Markupdecl\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Doctype\" context=\"#pop\" char=\"&gt;\" />\n    <DetectChar attribute=\"Value\" context=\"Doctype Markupdecl DQ\" char=\"&quot;\" />\n    <DetectChar attribute=\"Value\" context=\"Doctype Markupdecl SQ\" char=\"&apos;\" />\n  </context>\n\n  <context name=\"Doctype Markupdecl DQ\" attribute=\"Value\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Value\" context=\"#pop\" char=\"&quot;\" />\n    <IncludeRules context=\"FindPEntityRefs\" />\n  </context>\n\n  <context name=\"Doctype Markupdecl SQ\" attribute=\"Value\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Value\" context=\"#pop\" char=\"&apos;\" />\n    <IncludeRules context=\"FindPEntityRefs\" />\n  </context>\n\n  <context name=\"Element\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <Detect2Chars attribute=\"Element\" context=\"#pop\" char=\"/\" char1=\"&gt;\" endRegion=\"element\" />\n    <DetectChar attribute=\"Element\" context=\"El Content\" char=\"&gt;\" />\n    <RegExpr attribute=\"Attribute\" context=\"Attribute\" String=\"^&name;\" />\n    <RegExpr attribute=\"Attribute\" context=\"Attribute\" String=\"\\s+&name;\" />\n    <RegExpr attribute=\"Error\" context=\"#stay\" String=\"\\S\" />\n  </context>\n\n  <context name=\"El Content\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <RegExpr attribute=\"Element\" context=\"El End\" String=\"&lt;/&name;\" />\n    <IncludeRules context=\"FindXML\" />\n  </context>\n\n  <context name=\"El End\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Element\" context=\"#pop#pop#pop\" char=\"&gt;\" endRegion=\"element\" />\n    <RegExpr attribute=\"Error\" context=\"#stay\" String=\"\\S\" />\n  </context>\n\n  <context name=\"Attribute\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Attribute\" context=\"Value\" char=\"=\" />\n    <RegExpr attribute=\"Error\" context=\"#stay\" String=\"\\S\" />\n  </context>\n\n  <context name=\"Value\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Value\" context=\"Value DQ\" char=\"&quot;\" />\n    <DetectChar attribute=\"Value\" context=\"Value SQ\" char=\"&apos;\" />\n    <RegExpr attribute=\"Error\" context=\"#stay\" String=\"\\S\" />\n  </context>\n\n  <context name=\"Value DQ\" attribute=\"Value\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Value\" context=\"#pop#pop#pop\" char=\"&quot;\" />\n    <IncludeRules context=\"FindEntityRefs\" />\n  </context>\n\n  <context name=\"Value SQ\" attribute=\"Value\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Value\" context=\"#pop#pop#pop\" char=\"&apos;\" />\n    <IncludeRules context=\"FindEntityRefs\" />\n  </context>\n\n</contexts>\n<itemDatas>\n  <itemData name=\"Normal Text\" defStyleNum=\"dsNormal\" />\n  <itemData name=\"Comment\" defStyleNum=\"dsComment\" />\n  <itemData name=\"CDATA\" defStyleNum=\"dsBaseN\" bold=\"1\" />\n  <itemData name=\"Processing Instruction\" defStyleNum=\"dsKeyword\" />\n  <itemData name=\"Doctype\" defStyleNum=\"dsDataType\" bold=\"1\" />\n  <itemData name=\"Element\" defStyleNum=\"dsKeyword\" />\n  <itemData name=\"Attribute\" defStyleNum=\"dsOthers\" />\n  <itemData name=\"Value\" defStyleNum=\"dsString\"/>\n  <itemData name=\"EntityRef\" defStyleNum=\"dsDecVal\" />\n  <itemData name=\"PEntityRef\" defStyleNum=\"dsDecVal\" />\n  <itemData name=\"Error\" defStyleNum=\"dsError\" />\n</itemDatas>\n\n</highlighting>\n<general>\n  <comments>\n    <comment name=\"multiLine\" start=\"&lt;!--\" end=\"--&gt;\" />\n  </comments>\n  <indentation mode=\"xml\" />\n</general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/yacc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<!--\n========================================================================\nYACC.XML supports syntax highlighting for Yacc/Bison source under Kate.\n\nCopyright (C) 2004, Jan Villat <jan.villat@net2000.ch>\nThis code is released under the LGPL as part of kdelibs/kate.\n========================================================================\n\n\n== UPDATE HISTORY ==\n2007-10-01 // Sebastian Pipping <webmaster@hartwork.org>\n\n  Added: Extension \"*.yy\" for Bison\n\n2004-05-26 // Jan Villat <jan.villat@net2000.ch>\n\n  YACC.XML 1.00 - First released.\n\n\n== TODO ==\n- Add a mime type (cannot find it !?)\n\n\n========================================================================\n-->\n<language name=\"Yacc/Bison\" version=\"1.03\" kateversion=\"2.4\" section=\"Sources\" extensions=\"*.y;*.yy\" author=\"Jan Villat (jan.villat@net2000.ch)\" license=\"LGPL\">\n\n<highlighting>\n<contexts>\n  <context name=\"Pre Start\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <IncludeRules context=\"Comment\" />\n    <DetectSpaces />\n    <Detect2Chars attribute=\"Content-Type Delimiter\" context=\"C Declarations\" char=\"%\" char1=\"{\" beginRegion=\"cdeclarations\" column=\"0\" />\n    <RegExpr attribute=\"Normal Text\" context=\"Declarations\" String=\".\" beginRegion=\"declarations\" lookAhead=\"true\" />\n  </context>\n\n  <context name=\"C Declarations\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <IncludeRules context=\"Comment\" />\n    <Detect2Chars attribute=\"Content-Type Delimiter\" context=\"#pop\" char=\"%\" char1=\"}\" endRegion=\"cdeclarations\" column=\"0\" />\n    <IncludeRules context=\"##C++\" />\n  </context>\n\n  <context name=\"Declarations\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <IncludeRules context=\"Comment\" />\n    <StringDetect attribute=\"Directive\" context=\"Union Start\" String=\"%union\" />\n    <Detect2Chars attribute=\"Content-Type Delimiter\" context=\"Rules\" char=\"%\" char1=\"%\" beginRegion=\"rules\" endRegion=\"declarations\" />\n\n    <!-- not sure that strict yacc allows that ... but it is commonly used -->\n    <Detect2Chars attribute=\"Content-Type Delimiter\" context=\"C Declarations\" char=\"%\" char1=\"{\" beginRegion=\"cdeclarations\" column=\"0\" />\n\n    <DetectChar attribute=\"Directive\" context=\"Percent Command\" char=\"%\" />\n  </context>\n\n  <context name=\"Union Start\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <IncludeRules context=\"Comment\" />\n    <DetectSpaces />\n    <DetectChar attribute=\"Normal Text\" context=\"Union In\" char=\"{\" beginRegion=\"union\" />\n    <RegExpr attribute=\"Alert\" context=\"#pop\" String=\".\" />\n  </context>\n  <context name=\"Union In\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Normal Text\" context=\"Union InIn\" char=\"{\" />\n    <DetectChar attribute=\"Normal Text\" context=\"#pop#pop\" char=\"}\" endRegion=\"union\" />\n    <IncludeRules context=\"##C++\" />\n  </context>\n  <context name=\"Union InIn\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Normal Text\" context=\"Union InIn\" char=\"{\" />\n    <DetectChar attribute=\"Normal Text\" context=\"#pop\" char=\"}\" />\n    <IncludeRules context=\"##C++\" />\n  </context>\n\n  <context name=\"Rules\" attribute=\"Rule\" lineEndContext=\"#stay\">\n    <IncludeRules context=\"Comment\" />\n    <Detect2Chars attribute=\"Content-Type Delimiter\" context=\"User Code\" char=\"%\" char1=\"%\" beginRegion=\"code\" endRegion=\"rules\" />\n    <DetectChar attribute=\"Normal Text\" context=\"Rule In\" char=\":\" beginRegion=\"rule\" />\n  </context>\n\n  <context name=\"Rule In\" attribute=\"Definition\" lineEndContext=\"#stay\">\n    <IncludeRules context=\"Comment\" />\n    <DetectChar attribute=\"Normal Text\" context=\"#pop\" char=\";\" endRegion=\"rule\" />\n    <DetectChar attribute=\"Normal Text\" context=\"Normal C Bloc\" char=\"{\" beginRegion=\"bloc\" />\n    <DetectChar attribute=\"Normal Text\" context=\"#stay\" char=\"|\" />\n    <IncludeRules context=\"StringOrChar\" />\n  </context>\n\n  <context name=\"User Code\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <IncludeRules context=\"##C++\" />\n  </context>\n\n  <context name=\"Percent Command\" attribute=\"Directive\" lineEndContext=\"#pop\">\n    <IncludeRules context=\"Comment\" />\n    <RegExpr attribute=\"Normal Text\" context=\"Percent Command In\" String=\"\\W\" lookAhead=\"true\" />\n  </context>\n  <context name=\"Percent Command In\" attribute=\"NormalText\" lineEndContext=\"#pop#pop\">\n    <IncludeRules context=\"StringOrChar\" />\n    <DetectChar attribute=\"Data Type\" context=\"PC type\" char=\"&lt;\" />\n  </context>\n  <context name=\"PC type\" attribute=\"Data Type\" lineEndContext=\"#pop#pop#pop\">\n    <DetectChar attribute=\"Data Type\" context=\"#pop\" char=\"&gt;\" />\n  </context>\n\n  <context name=\"Comment\" attribute=\"Comment\">\n    <Detect2Chars attribute=\"Comment\" context=\"CommentStar\" char=\"/\" char1=\"*\" />\n    <!-- not sure that strict yacc allows that ... but I saw it in some sources ... -->\n    <Detect2Chars attribute=\"Comment\" context=\"CommentSlash\" char=\"/\" char1=\"/\" />\n  </context>\n  <context name=\"CommentStar\" attribute=\"Comment\" lineEndContext=\"#stay\">\n    <Detect2Chars attribute=\"Comment\" context=\"#pop\" char=\"*\" char1=\"/\" />\n  </context>\n  <context name=\"CommentSlash\" attribute=\"Comment\" lineEndContext=\"#stay\">\n    <RegExpr attribute=\"Comment\" context=\"#pop\" String=\"[^\\\\]$\" />\n  </context>\n\n  <context name=\"StringOrChar\" attribute=\"NormalText\">\n    <DetectChar attribute=\"String Char\" context=\"Char\" char=\"'\" />\n    <DetectChar attribute=\"String\" context=\"String\" char=\"&quot;\" />\n  </context>\n  <context name=\"String\" attribute=\"String\" lineEndContext=\"#pop\">\n    <RegExpr attribute=\"Backslash Code\" context=\"#stay\" String=\"\\\\.\" />\n    <DetectChar attribute=\"String\" context=\"#pop\" char=\"&quot;\" />\n  </context>\n  <context name=\"Char\" attribute=\"String Char\" lineEndContext=\"#pop\">\n    <RegExpr attribute=\"Backslash Code\" context=\"#stay\" String=\"\\\\.\" />\n    <DetectChar attribute=\"String Char\" context=\"#pop\" char=\"'\" />\n  </context>\n\n  <context name=\"Normal C Bloc\" attribute=\"Normal Text\" lineEndContext=\"#stay\">\n    <DetectChar attribute=\"Normal Text\" context=\"Normal C Bloc\" char=\"{\" beginRegion=\"bloc\" />\n    <DetectChar attribute=\"Normal Text\" context=\"#pop\" char=\"}\" endRegion=\"bloc\" />\n    <IncludeRules context=\"##C++\" />\n    <DetectChar attribute=\"Directive\" context=\"Dol\" char=\"$\" />\n  </context>\n  <context name=\"Dol\" attribute=\"Normal Text\" fallthrough=\"true\" fallthroughContext=\"DolEnd\">\n    <RegExpr attribute=\"Data Type\" context=\"DolEnd\" String=\"&lt;[^&gt;]+&gt;\" />\n  </context>\n  <context name=\"DolEnd\" attribute=\"Normal Text\">\n    <RegExpr attribute=\"Directive\" context=\"#pop#pop\" String=\"\\d+\" />\n    <DetectChar attribute=\"Directive\" context=\"#pop#pop\" char=\"$\" />\n  </context>\n</contexts>\n\n<itemDatas>\n  <itemData name=\"Normal Text\" defStyleNum=\"dsNormal\" />\n  <itemData name=\"Definition\" defStyleNum=\"dsNormal\" />\n  <itemData name=\"Comment\" defStyleNum=\"dsComment\" />\n  <itemData name=\"Content-Type Delimiter\" defStyleNum=\"dsBaseN\" bold=\"1\" />\n  <itemData name=\"Directive\" defStyleNum=\"dsKeyword\"/>\n  <itemData name=\"Rule\" defStyleNum=\"dsString\" />\n  <itemData name=\"Backslash Code\" defStyleNum=\"dsString\" bold=\"1\" />\n  <itemData name=\"Alert\" defStyleNum=\"dsAlert\" />\n  <itemData name=\"String\" defStyleNum=\"dsString\"/>\n  <itemData name=\"String Char\" defStyleNum=\"dsChar\"/>\n  <itemData name=\"Data Type\" defStyleNum=\"dsDataType\"/>\n</itemDatas>\n\n</highlighting>\n<general>\n  <comments>\n    <comment name=\"multiLine\" start=\"/*\" end=\"*/\" />\n  </comments>\n</general>\n</language>\n<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->\n"
  },
  {
    "path": "liteidex/deploy/liteeditor/kate/yaml.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE language SYSTEM \"language.dtd\">\n<!-- Author: Dr Orlovsky MA <maxim@orlovsky.info> //-->\n<language name=\"YAML\" version=\"1.2\" kateversion=\"2.5\" section=\"Markup\"\n          extensions=\"*.yaml;*.yml\" mimetype=\"text/yaml\"\n          author=\"Dr Orlovsky MA (dr.orlovsky@gmail.com)\" license=\"LGPL\">\n  <highlighting>\n    <contexts>\n      <context attribute=\"Normal Text\" lineEndContext=\"#stay\" name=\"normal\" >\n        <RegExpr attribute=\"Document Header\" context=\"header\" String=\"^---\"/>\n        <RegExpr attribute=\"End of Document\" context=\"EOD\" String=\"^\\.\\.\\.$\"/>\n        <RegExpr attribute=\"Directive\" context=\"directive\" String=\"^%\"/>\n\n        <DetectSpaces/>\n        <DetectChar attribute=\"Comment\" context=\"comment\" char=\"#\" />\n\n        <DetectChar attribute=\"Operator\" firstNonSpace=\"true\"  context=\"dash\" char=\"-\" />\n\n        <DetectChar attribute=\"Operator\" context=\"list\" char=\"[\" beginRegion=\"List\" />\n        <DetectChar attribute=\"Operator\" context=\"hash\" char=\"{\" beginRegion=\"Hash\" />\n\n        <RegExpr attribute=\"Data Types\" firstNonSpace=\"true\" context=\"#stay\" String=\"!!\\S+\" />\n        <RegExpr attribute=\"Alias\" firstNonSpace=\"true\" context=\"#stay\" String=\"&amp;\\S+\" />\n        <RegExpr attribute=\"Reference\" firstNonSpace=\"true\" context=\"#stay\" String=\"\\*\\S+\" />\n\n        <RegExpr attribute=\"Key\" context=\"attribute-pre\" String=\"\\??\\s*[^&quot;'#-][^:#]*:\"/>\n        <RegExpr attribute=\"Key\" context=\"attribute-pre\" String=\"\\??\\s*&quot;[^&quot;#]+&quot;\\s*:\"/>\n        <RegExpr attribute=\"Key\" context=\"attribute-pre\" String=\"\\??\\s*'[^'#]+'\\s*:\"/>\n\n        <DetectChar attribute=\"String\" context=\"string\" char=\"'\" beginRegion=\"String\" />\n        <DetectChar attribute=\"String\" context=\"stringx\" char=\"&quot;\" beginRegion=\"String\" />\n      </context>\n\n      <context attribute=\"List\" lineEndContext=\"#pop\" name=\"dash\">\n        <DetectSpaces/>\n        <DetectChar attribute=\"Comment\" context=\"comment\" char=\"#\" />\n        <RegExpr attribute=\"Data Types\" context=\"#stay\" String=\"null$\" />\n        <RegExpr attribute=\"Data Types\" context=\"#stay\" String=\"!!\\S+\" />\n        <RegExpr attribute=\"Alias\" context=\"#stay\" String=\"&amp;\\S+\" />\n        <RegExpr attribute=\"Reference\" context=\"#stay\" String=\"\\*\\S+\" />\n        <RegExpr attribute=\"Normal Text\" lookAhead=\"true\" context=\"#pop\" String=\".\" />\n      </context>\n\n      <context attribute=\"Document Header\" lineEndContext=\"#pop\" name=\"header\">\n        <DetectChar attribute=\"Comment\" context=\"comment\" char=\"#\" />\n      </context>\n\n      <context attribute=\"End of Document\" lineEndContext=\"#stay\" name=\"EOD\">\n      </context>\n\n      <context attribute=\"Directive\" lineEndContext=\"#pop\" name=\"directive\">\n      </context>\n\n      <context attribute=\"Attribute\" lineEndContext=\"#pop#pop\" name=\"attribute\">\n        <DetectChar attribute=\"Comment\" context=\"comment\" char=\"#\" />\n      </context>\n\n      <context attribute=\"Attribute\" lineEndContext=\"#stay\" name=\"attribute-inline\">\n        <DetectChar attribute=\"Operator\" context=\"#pop#pop\" char=\",\" />\n        <DetectChar attribute=\"Operator\" context=\"#pop#pop\" lookAhead=\"true\" char=\"}\" />\n        <DetectChar attribute=\"Comment\" context=\"comment\" char=\"#\" />\n      </context>\n\n      <context attribute=\"Attribute\" lineEndContext=\"#pop\" name=\"attribute-pre\">\n        <DetectSpaces/>\n        <DetectChar attribute=\"Comment\" context=\"comment\" char=\"#\" />\n        <RegExpr attribute=\"Data Types\" context=\"#stay\" String=\"null$\" />\n        <RegExpr attribute=\"Data Types\" context=\"#stay\" String=\"!!\\S+\" />\n        <DetectChar attribute=\"Operator\" context=\"list\" char=\"[\" beginRegion=\"List\" />\n        <DetectChar attribute=\"Operator\" context=\"hash\" char=\"{\" beginRegion=\"Hash\" />\n        <DetectChar attribute=\"String\" context=\"attribute-string\" char=\"'\" beginRegion=\"String\" />\n        <DetectChar attribute=\"String\" context=\"attribute-stringx\" char=\"&quot;\" beginRegion=\"String\" />\n        <RegExpr attribute=\"Alias\" context=\"attribute\" String=\"&amp;\\S+\" />\n        <RegExpr attribute=\"Reference\" context=\"attribute\" String=\"\\*\\S+\" />\n        <RegExpr attribute=\"Attribute\" context=\"attribute\" String=\".\" />\n      </context>\n\n      <context attribute=\"Attribute\" lineEndContext=\"#pop\" name=\"attribute-pre-inline\">\n        <DetectSpaces/>\n        <DetectChar attribute=\"Comment\" context=\"comment\" char=\"#\" />\n\n        <StringDetect attribute=\"Data Types\" context=\"#stay\" String=\"null\" />\n        <RegExpr attribute=\"Data Types\" context=\"#stay\" String=\"!!\\S+\" />\n        <DetectChar attribute=\"Operator\" context=\"list\" char=\"[\" beginRegion=\"List\" />\n        <DetectChar attribute=\"Operator\" context=\"hash\" char=\"{\" beginRegion=\"Hash\" />\n        <DetectChar attribute=\"String\" context=\"attribute-string-inline\" char=\"'\" beginRegion=\"String\" />\n        <DetectChar attribute=\"String\" context=\"attribute-stringx-inline\" char=\"&quot;\" beginRegion=\"String\" />\n        <RegExpr attribute=\"Alias\" context=\"attribute-inline\" String=\"&amp;\\S+\" />\n        <RegExpr attribute=\"Reference\" context=\"attribute-inline\" String=\"\\*\\S+\" />\n\n        <DetectChar attribute=\"Operator\" context=\"#pop\" char=\",\" />\n        <DetectChar attribute=\"Operator\" context=\"#pop\" lookAhead=\"true\" char=\"}\" />\n        <RegExpr attribute=\"Attribute\" context=\"attribute-inline\" String=\".\" />\n      </context>\n\n      <context attribute=\"List\" lineEndContext=\"#stay\" name=\"list\">\n        <DetectSpaces/>\n        <DetectChar attribute=\"Comment\" context=\"comment\" char=\"#\" />\n\n        <DetectChar attribute=\"Operator\" context=\"#pop\" char=\"]\" endRegion=\"List\" />\n\n        <RegExpr attribute=\"Key\" context=\"attribute-pre\" String=\"\\??\\s*[^&quot;'#-][^:#]*:\"/>\n        <RegExpr attribute=\"Key\" context=\"attribute-pre\" String=\"\\??\\s*&quot;[^&quot;#]+&quot;\\s*:\"/>\n        <RegExpr attribute=\"Key\" context=\"attribute-pre\" String=\"\\??\\s*'[^'#]+'\\s*:\"/>\n\n        <StringDetect attribute=\"Data Types\" context=\"#stay\" String=\"null\" />\n        <RegExpr attribute=\"Data Types\" context=\"#stay\" String=\"!!\\S+\" />\n        <DetectChar attribute=\"Operator\" context=\"list\" char=\"[\" beginRegion=\"List\" />\n        <DetectChar attribute=\"Operator\" context=\"hash\" char=\"{\" beginRegion=\"Hash\" />\n        <RegExpr attribute=\"Alias\" context=\"#stay\" String=\"&amp;\\S+\" />\n        <RegExpr attribute=\"Reference\" context=\"#stay\" String=\"\\*\\S+\" />\n        <DetectChar attribute=\"String\" context=\"string\" char=\"'\" beginRegion=\"String\" />\n        <DetectChar attribute=\"String\" context=\"stringx\" char=\"&quot;\" beginRegion=\"String\" />\n\n        <DetectChar attribute=\"Operator\" context=\"#stay\" char=\",\" />\n      </context>\n\n      <context attribute=\"Hash\" lineEndContext=\"#stay\" name=\"hash\">\n        <DetectSpaces/>\n        <DetectChar attribute=\"Comment\" context=\"comment\" char=\"#\" />\n\n        <RegExpr attribute=\"Key\" context=\"attribute-pre-inline\" String=\"\\??\\s*[^&quot;'#-][^:#]*:\"/>\n        <RegExpr attribute=\"Key\" context=\"attribute-pre-inline\" String=\"\\??\\s*&quot;[^&quot;#]+&quot;\\s*:\"/>\n        <RegExpr attribute=\"Key\" context=\"attribute-pre-inline\" String=\"\\??\\s*'[^'#]+'\\s*:\"/>\n\n        <DetectChar attribute=\"Operator\" context=\"#pop\" char=\"}\" endRegion=\"Hash\" />\n      </context>\n\n      <context attribute=\"String\" lineEndContext=\"#stay\" name=\"attribute-string\">\n        <DetectIdentifier />\n        <DetectChar attribute=\"String\" context=\"attribute-end\" char=\"'\" endRegion=\"String\" />\n      </context>\n\n      <context attribute=\"String\" lineEndContext=\"#stay\" name=\"attribute-stringx\">\n        <DetectIdentifier />\n        <DetectChar attribute=\"String\" context=\"attribute-end\" char=\"&quot;\" endRegion=\"String\" />\n      </context>\n\n      <context attribute=\"String\" lineEndContext=\"#stay\" name=\"attribute-string-inline\">\n          <DetectIdentifier />\n          <DetectChar attribute=\"String\" context=\"attribute-end-inline\" char=\"'\" endRegion=\"String\" />\n      </context>\n\n      <context attribute=\"String\" lineEndContext=\"#stay\" name=\"attribute-stringx-inline\">\n          <DetectIdentifier />\n          <DetectChar attribute=\"String\" context=\"attribute-end-inline\" char=\"&quot;\" endRegion=\"String\" />\n      </context>\n\n      <context attribute=\"Error\" lineEndContext=\"#pop#pop#pop\" name=\"attribute-end\">\n      </context>\n\n      <context attribute=\"Error\" lineEndContext=\"#pop#pop#pop\" name=\"attribute-end-inline\">\n          <RegExpr attribute=\"Normal Text\" context=\"#stay\" String=\"\\s*\"/>\n          <DetectChar attribute=\"String\" context=\"#pop#pop#pop\"  lookAhead=\"true\" char=\"}\"/>\n          <RegExpr attribute=\"Operator\" context=\"#pop#pop#pop\"  String=\",\\s\"/>\n      </context>\n\n      <context attribute=\"String\" lineEndContext=\"#stay\" name=\"string\">\n        <DetectIdentifier />\n        <DetectChar attribute=\"String\" context=\"#pop\" char=\"'\" endRegion=\"String\" />\n      </context>\n\n      <context attribute=\"String\" lineEndContext=\"#stay\" name=\"stringx\">\n        <DetectIdentifier />\n        <DetectChar attribute=\"String\" context=\"#pop\" char=\"&quot;\" endRegion=\"String\" />\n      </context>\n\n      <context attribute=\"Comment\" lineEndContext=\"#pop\" name=\"comment\">\n        <IncludeRules context=\"##Alerts\" />\n        <IncludeRules context=\"##Modelines\" />\n      </context>\n    </contexts>\n\n    <itemDatas>\n      <itemData name=\"Normal Text\" defStyleNum=\"dsNormal\" />\n      <itemData name=\"List\" defStyleNum=\"dsNormal\" />\n      <itemData name=\"Hash\" defStyleNum=\"dsNormal\" />\n      <itemData name=\"Comment\" defStyleNum=\"dsComment\" />\n      <itemData name=\"End of Document\" defStyleNum=\"dsComment\" />\n      <itemData name=\"Document Header\" defStyleNum=\"dsOthers\" />\n      <itemData name=\"Data Types\" defStyleNum=\"dsDataType\" />\n      <itemData name=\"Alias\" defStyleNum=\"dsDataType\" />\n      <itemData name=\"Reference\" defStyleNum=\"dsDataType\" />\n      <itemData name=\"Key\" defStyleNum=\"dsFunction\" />\n      <itemData name=\"Directive\" defStyleNum=\"dsOthers\" />\n      <itemData name=\"Operator\" defStyleNum=\"dsKeyword\" />\n      <itemData name=\"String\" defStyleNum=\"dsString\" />\n      <itemData name=\"Error\" defStyleNum=\"dsError\" />\n    </itemDatas>\n  </highlighting>\n\n  <general>\n    <folding indentationsensitive=\"1\" />\n    <comments>\n      <comment name=\"singleLine\" start=\"#\" position=\"afterwhitespace\" />\n    </comments>\n    <keywords casesensitive=\"1\"/>\n  </general>\n</language>\n"
  },
  {
    "path": "liteidex/deploy/packages/go/funcs.api",
    "content": "append(slice []Type, elems ...Type) []Type\ncopy(dst, src []Type) int\ndelete(m map[Type]Type1, key Type)\nlen(v Type) int\ncap(v Type) int\nmake(Type, size IntegerType) Type\nnew(Type) *Type\ncomplex(r, i FloatType) ComplexType\nreal(c ComplexType) FloatType\nimag(c ComplexType) FloatType\nclose(c chan<- Type)\npanic(v interface{})\nrecover() interface{}\nprint(args ...Type)\nprintln(args ...Type)\n"
  },
  {
    "path": "liteidex/deploy/packages/go/go.snippet.json",
    "content": "[\n    {\n        \"info\": \"go func(){\\n}()\",\n        \"name\": \"gos1\",\n        \"text\": \"go func(){\\n\\t$$\\n}()\"\n    },\n    {\n        \"info\": \"type name struct{\\n}\",\n        \"name\": \"types1\",\n        \"text\": \"type $name$ struct {\\n\\t\\n}\"\n    },\n    {\n        \"info\": \"type name interface{\\n}\",\n        \"name\": \"types2\",\n        \"text\": \"type $name$ interface {\\n\\t\\n}\"\n    },\n    {\n        \"info\": \"func name() {\\n}\",\n        \"name\": \"funcs1\",\n        \"text\": \"func $name$() {\\n\\t\\n}\"\n    },\n    {\n        \"info\": \"func() {\\n}\",\n        \"name\": \"funcs2\",\n        \"text\": \"func() {\\n\\t$$\\n}\"\n    },\n    {\n        \"info\": \"func() {\\n}()\",\n        \"name\": \"funcs3\",\n        \"text\": \"func() {\\n\\t$$\\n}()\"\n    },\n    {\n        \"info\": \"import (\\n)\",\n        \"name\": \"imports1\",\n        \"text\": \"import (\\n\\t\\\"$$\\\"\\n)\"\n    },\n    {\n        \"info\": \"import \\\"C\\\"\",\n        \"name\": \"imports2\",\n        \"text\": \"import \\\"C\\\"\"\n    },\n    {\n        \"info\": \"if error {\\n}\",\n        \"name\": \"iferr1\",\n        \"text\": \"if err != nil {\\n\\t$$\\n}\"\n    },\n    {\n        \"info\": \"if error {\\n return err }\",\n        \"name\": \"iferr2\",\n        \"text\": \"if err != nil {\\n\\treturn err\\n}\"\n    }\n]"
  },
  {
    "path": "liteidex/deploy/packages/go/godoc/about.html",
    "content": "<!-- About Godoc Viewer-->\n\n<h2>Overview</h2>\n<p>The integrated Godoc viewer in LiteIDE provides an easy way to browse documentation generated by the godoc tool without leaving the editor.  Documentation can be viewed for both the official Go language as well as custom packages.  The remainder of this page describes ways to invoke the Godoc viewer.</p>\n\n<h2>Supported URL Schemes</h2>\n<p>It is possible to view documentation by directly entering a URL into the Godoc viewer's address bar.  When doing this, you can specify what type of documentation you are looking for by prefixing the address with one of the following URL schemes:</p>\n\n<h3>find</h3>\n<p>Searches for packages with a specified string in their name.  For example:</p>\n<ul>\n<li><a href=\"find:zip\">find:zip</a></li>\n<li><a href=\"find:godoc\">find:godoc</a></li>\n</ul>\n\n<h3>list</h3>\n<p>Lists all packages in a given directory.  The main choices are \"pkg\" and \"cmd\", which can be found as links in the header of the page.  For example:</p>\n<ul>\n<li><a href=\"list:pkg\">list:pkg</a> - displays the Golang packages</li>\n<li><a href=\"list:cmd\">list:cmd</a> - displays the Golang commands</li>\n</ul>\n\n\n<h3>pdoc</h3>\n<p>Views documentation for a specified package or command.  For example:</p>\n<ul>\n<li><a href=\"pdoc:fmt\">pdoc:fmt</a></li>\n<li><a href=\"pdoc:archive/zip\">pdoc:archive/zip</a></li>\n<li><a href=\"pdoc:gofmt\">pdoc:gofmt</a></li>\n<li><a href=\"pdoc:f:/hg/zmq/gozmq\">pdoc:f:/hg/zmq/gozmq</a></li>\n</ul>\n\n<h3>file</h3>\n<p>Views a specified HTML, Markdown, or plain-text file.  For example:</p>\n<ul>\n<li><a href=\"file:c:/go/doc/docs.html\">file:c:/go/doc/docs.html</a></li>\n</ul>\n\n<h2>Automatic Schemes</h2>\n<p>For the \"file\" and \"pdoc\" schemes, you do not need to type the scheme as part of the URL.  For example:</p>\n<ul>\n<li><a href=\"/doc/code.html\">/doc/code.html</a></li>\n<li><a href=\"/src/pkg\">/src/pkg</a></li>\n<li><a href=\"/src/cmd\">/src/cmd</a></li>\n<li><a href=\"/pkg/fmt\">/pkg/fmt</a></li>\n<li><a href=\"/cmd/cgo\">/cmd/cgo</a></li>\n<li><a href=\"archive/zip\">archive/zip</a></li>\n<li><a href=\"go\">go</a></li>\n</ul>\n\n<h2>File Browser</h2>\n<p>You can open the Godoc viewer directly from the file browser by right clicking on a file or directory and selecting \"View Godoc Here\".  The Godoc viewer will automatically open the package documentation for the chosen item.</p>"
  },
  {
    "path": "liteidex/deploy/packages/go/godoc/all.css",
    "content": "/* General Styles */\nbody {\n  font-family: \"Bitstream Vera Sans\", Verdana, sans-serif;\n  font-size: 100%;\n  line-height: 1.23em;\n  padding: 0;\n  margin: 1.23em;\n  background: white;\n  color: black;\n}\na {\n  color: #04a;\n  text-decoration: none;\n}\na:visited {\n  color: #04a;\n}\na:hover {\n  color: #a40;\n  text-decoration: underline;\n}\na:active {\n  color: #c00;\n}\ncode, pre {\n  font-size: 1.2em; \n}\npre {\n  background: #F0F0F0;\n  padding: 0.5em 1em;\n}\n\n/* Top bar */\n#container {\n  width: 100%;\n  margin: auto;\n}\n#topnav {\n  height: 55px;\n  background: url(/doc/logo.png) no-repeat top left;\n}\na#logo-box {\n  display: block;\n  height: 55px;\n}\nh1#title {\n  display: none;\n}\n#nav-main {\n  float: right;\n  width: 500px;\n  margin-top: -5px;\n  text-align: center;\n}\n#nav-main ul {\n  padding-left: 0;\n  margin-left: 0;\n  margin-bottom: 0.5em;\n}\n#nav-main li a {\n  display: inline;\n  display: inline-block;\n  padding: .46em .62em .38em .62em;\n}\n#nav-main li a:link,\n#nav-main li a:visited {\n  color: #000;\n}\n#nav-main li {\n  display: inline;\n  display: inline-block;\n  background: #e6e6e6 url(/doc/button_background.png) repeat-x;\n  border: solid 1px #999;\n  margin-left: -1px;\n  text-shadow: #fff 0 1px 0;\n  box-shadow: 0 1px 1px #ccc;\n  -moz-box-shadow: 0 1px 1px #ccc;\n  -webkit-box-shadow: 0 1px 1px #ccc;\n}\n#nav-main li:first-child {\n  -moz-border-top-left-radius: 4px;\n  border-top-left-radius: 4px;\n  -moz-border-bottom-left-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\n#nav-main li:last-child {\n  -moz-border-top-right-radius: 4px;\n  border-top-right-radius: 4px;\n  -moz-border-bottom-right-radius: 4px;\n  border-bottom-right-radius: 4px;\n}\n#nav-main .quickref {\n  color: #444;\n}\n#nav-main .quickref .sep {\n  color: #999;\n}\n#search {\n  width: 120px;\n  margin-left: 0.5em;\n}\n#search.inactive {\n  text-align: center;\n  color: #444;\n}\n\n/* Footer */\n#site-info {\n  position: relative;\n  text-align: center;\n}\n#site-info, #site-info a:link, #site-info a:visited {\n  color: #aaa;\n}\n\n/* Content */\n#content {\n  clear: both;\n  padding: 0;\n  position: relative;\n  margin-top: 1.5em;\n  margin-bottom: 1.5em;\n  border-top: solid 1px #aaa;\n  border-bottom: solid 1px #aaa;\n}\n.left-column {\n  width: 49%;\n  float: left;\n}\n.right-column {\n  width: 49%;\n  float: right;\n}\n.end-columns {\n  clear: both;\n}\n#content h1 {\n  margin-bottom: -0em;\n  padding: 0;\n}\n#content h2 {\n  border-top: 2px solid #ddd;\n  padding: 8px 0;\n  margin: 1.5em 0 0;\n}\n#content .subtitle {\n  margin-top: 1em;\n  display: block;\n}\n.navtop a {\n  font-weight: normal; font-size: 7pt; \n  float: right; color: #999;\n}\n\n/* Content and Code Highlighting */\npre.ebnf, pre.grammar {\n  background: #FFFFE0;\n}\nspan.ln {\n  font-size: 80%;\n  color: #777777;\n}\nspan.comment {\n  color: #002090;\n}\nspan.highlight {\n  background: #FF9900;\n  font-weight: bold;\n}\nspan.highlight-comment {\n  background: #FF9900;\n  font-weight: bold;\n  color: #002090;\n}\nspan.selection {\n  background: #FFFF00\n}\nspan.selection-comment {\n  color: #002090;\n  background: #FFFF00\n}\nspan.selection-highlight {\n  background: #FF9900;\n  font-weight: bold;\n}\nspan.selection-highlight-comment {\n  background: #FF9900;\n  font-weight: bold;\n  color: #002090;\n}\nspan.alert {\n  color: #D00000;\n}\n#nav table {\n  width: 100%;\n}\n.detail {\n  padding: 0.25em 1em;\n  background: #F4F4F4;\n}\nsup.new {\n  color: red;\n  font-size: 8px;\n  line-height: 0;\n}\n"
  },
  {
    "path": "liteidex/deploy/packages/go/godoc/finddoc.html",
    "content": "<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n  <title>The Go Programming Language</title>\n  <link rel=\"stylesheet\" href=\"style.css\" type=\"text/css\" media=\"all\" charset=\"utf-8\"/>\n</head>\n\n<body>\n\t<div id=\"container\">\n\t\t<div id=\"content\">\n\t\t\t{content}\n\t\t</div>\n\t</div>\n</body>\n</html>"
  },
  {
    "path": "liteidex/deploy/packages/go/godoc/godoc.html",
    "content": "<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n  <title>The Go Programming Language</title>\n  <link rel=\"stylesheet\" href=\"style.css\" type=\"text/css\" media=\"all\" charset=\"utf-8\"/>\n</head>\n\n<body>\n\t<div id=\"container\">\n\t\t<div id=\"topnav\">\n\t\t\t<h1 id=\"title\">Golang Documentation</h1>\n\t\t\t<div class=\"quickref\">\n\t\t\t\t<a href=\"/doc/docs.html\">Documentation</a> <span class=\"sep\">|</span>\n\t\t\t\t<a href=\"/src/pkg/\">Packages</a> <span class=\"sep\">|</span>\n\t\t\t\t<a href=\"/src/cmd/\">Commands</a> <span class=\"sep\">|</span>\n\t\t\t\t<a href=\"/doc/contrib.html\">The Project</a> <span class=\"sep\">|</span>\n\t\t\t\t<a href=\"{about}\">About</a> <span class=\"sep\">\n\t\t\t</div>\n\t\t</div>\n\t\t<div id=\"content\">\n\t\t\t<!-- Menu is HTML-escaped elsewhere -->\n\t\t\t<h1 id=\"generatedHeader\">{header}</h1>\n\t\t\t<!-- The Table of Contents is automatically inserted in this <div>.Do not delete this <div>. -->\n\t\t\t<div id=\"nav\">{nav}</div>\n\t\t\t{content}\n\t\t</div>\n\t</div>\n</body>\n</html>\n"
  },
  {
    "path": "liteidex/deploy/packages/go/godoc/style.css",
    "content": "body {\n\ttext-align: left;\n\tmargin: 0;\n\tfont-family: Helvetica, Arial, sans-serif;\n}\npre, code {\n\tfont-family: Menlo, monospace;\n}\npre {\n\tline-height: 18px;\n}\npre .comment {\n\tcolor: #375EAB;\n}\npre .ln {\n\tcolor: #999;\n}\nbody {\n\tcolor: #222;\n}\na {\n\tcolor: #375EAB;\n\ttext-decoration: none;\n}\np, pre, ul, ol {\n\tmargin: 20px;\n}\npre {\n\tbackground: #e9e9e9;\n\tpadding: 10px;\n\n\t-webkit-border-radius: 5px;\n\t-moz-border-radius: 5px;\n\tborder-radius: 5px;\n}\n\nh1, h2, h3, h4, .rootHeading {\n\tmargin: 20px 0;\n\tpadding: 0;\n\tcolor: #375EAB;\n\tfont-weight: bold;\n}\nh2 {\n\tbackground: #E0EBF5;\n\tpadding: 2px 5px;\n}\n.rootHeading {\n\tmargin: 0;\n}\n\nh1 a, h2 a, h3 a, h4 a {\n\ttext-decoration: underline;\n}\n\ndl {\n\tmargin: 20px;\n}\ndd {\n\tmargin: 2px 20px;\n}\n#nav table td {\n\tvertical-align: top;\n}\n\ntable.dir th {\n\ttext-align: left;\n}\ntable.dir td {\n\tword-wrap: break-word;\n\tvertical-align: top;\n}\n\n#heading {\n\tfloat: left;\n\tmargin: 0 0 10px 0;\n\tpadding: 16px 0;\n\tfont-weight: normal;\n}\n#heading a {\n\tcolor: #222;\n\ttext-decoration: none;\n}\n\n#topbar {\n\tbackground: #E0EBF5;\n}\n\nbody {\n\ttext-align: center;\n}\n#page,\n#topbar .container {\n\tclear: both;\n\ttext-align: left;\n\tmargin-left: auto;\n\tmargin-right: auto;\n\twidth: 900px;\n}\n#plusone {\n\tfloat: right;\n}\n#plusoneRoot {\n\tfloat: right;\n}\n\n#copyright {\n\tcolor: #666;\n\tmargin: 40px 0;\n}\n\n#menu > a,\n#menu > input,\n#learn .buttons a,\n#blog .read a {\n\tpadding: 10px;\n\n\ttext-decoration: none;\n\t-webkit-border-radius: 5px;\n\t-moz-border-radius: 5px;\n\tborder-radius: 5px;\n}\n#menu > a,\n#menu > input {\n\tborder: 1px solid #375EAB;\n}\n#menu > a {\n\tcolor: white;\n\tbackground: #375EAB;\n}\n#start,\n#learn .buttons a,\n#blog .read a {\n\tcolor: #222;\n\tborder: 1px solid #375EAB;\n\tbackground: #E0EBF5;\n}\n\n#menu {\n\tpadding: 10px 0;\n\ttext-align: right;\n}\n#menu > a {\n\tmargin-right: 5px;\n\tmargin-bottom: 10px;\n\n\tpadding: 10px;\n}\n#menu > input {\n\tposition: relative;\n\ttop: 1px;\n\twidth: 100px;\n\tbackground: white;\n\tcolor: #222;\n}\n#menu > input.inactive {\n\tcolor: #999;\n}\n\n#left {\n\tfloat: left;\n}\n#right {\n\tfloat: right;\n}\n#left, #right {\n\twidth: 415px;\n}\n\n#learn,\n#about {\n\tpadding-top: 20px;\n}\n#learn h2,\n#about {\n\tmargin: 0;\n}\n\n#about {\n\theight: 96px;\n}\n#gopher {\n\tbackground: url(/doc/gopher/frontpage.png) no-repeat;\n\tbackground-position: center top;\n\theight: 155px;\n}\n#start {\n\tdisplay: block;\n\tpadding: 10px;\n\n\ttext-align: center;\n\ttext-decoration: none;\n\n\t-webkit-border-radius: 5px;\n\t-moz-border-radius: 5px;\n\tborder-radius: 5px;\n}\n#start .big {\n\tfont-weight: bold;\n}\n#start .desc {\n\tfont-weight: normal;\n\tmargin-top: 5px;\n}\n\n#learn pre, #learn textarea {\n\tpadding: 0;\n\tmargin: 0;\n\tfont-family: Menlo, monospace;\n}\n#learn .input {\n\tpadding: 10px;\n\tmargin-top: 10px;\n\theight: 150px;\n\n\t-webkit-border-top-left-radius: 5px;\n\t-webkit-border-top-right-radius: 5px;\n\t-moz-border-radius-topleft: 5px;\n\t-moz-border-radius-topright: 5px;\n\tborder-top-left-radius: 5px;\n\tborder-top-right-radius: 5px;\n}\n#learn .input textarea {\n\twidth: 100%;\n\theight: 100%;\n\tborder: none;\n\toutline: none;\n\tresize: none;\n}\n#learn .output {\n\tborder-top: none !important;\n\n\tpadding: 10px;\n\theight: 59px;\n\toverflow: auto;\n\n\t-webkit-border-bottom-right-radius: 5px;\n\t-webkit-border-bottom-left-radius: 5px;\n\t-moz-border-radius-bottomright: 5px;\n\t-moz-border-radius-bottomleft: 5px;\n\tborder-bottom-right-radius: 5px;\n\tborder-bottom-left-radius: 5px;\n}\n#learn .output pre {\n\tpadding: 0;\n\n\t-webkit-border-radius: 0;\n\t-moz-border-radius: 0;\n\tborder-radius: 0;\n}\n#learn .input,\n#learn .input textarea,\n#learn .output,\n#learn .output pre {\n\tbackground: #FFFFD8;\n}\n#learn .input,\n#learn .output {\n\tborder: 1px solid #375EAB;\n}\n#learn .buttons {\n\tpadding: 20px 0 10px 0;\n\ttext-align: right;\n}\n#learn .buttons a {\n\theight: 16px;\n\tmargin-left: 5px;\n\n\tpadding: 10px;\n}\n#learn .buttons .tour {\n\tfloat: right;\n}\n#learn .buttons .tour a {\n\tmargin-right: 0;\n\tfont-weight: bold;\n}\n\n#blog, #video {\n\tmargin-top: 40px;\n}\n#blog > div, #blog > a, #video > div, #video > a, #blog > h2, #video > h2 {\n\tmargin-bottom: 10px;\n}\n#blog .title, #video .title {\n\tcolor: #222;\n\ttext-decoration: none;\n\tdisplay: block;\n}\n#blog .when {\n\tcolor: #666;\n}\n#blog .read {\n\ttext-align: right;\n}\n\n.exampleHeading { cursor: pointer; }\n.example .collapsed { display: block; }\n.example .expanded { display: none; }\n.exampleVisible .collapsed { display: none; }\n.exampleVisible .expanded { display: block; }\n\ntable.codetable { margin-left: auto; margin-right: auto; border-style: none; }\nhr { border-style: none; border-top: 1px solid black; }\n"
  },
  {
    "path": "liteidex/deploy/packages/go/keyword.api",
    "content": "break\ndefault\nfunc\ninterface\nselect\ncase\ndefer\ngo\nmap\nstruct\nchan\nelse\ngoto\npackage\nswitch\nconst\nfallthrough\nif\nrange\ntype\ncontinue\nfor\nimport\nreturn\nvar\nany\n"
  },
  {
    "path": "liteidex/deploy/packages/go/pkglist",
    "content": "archive/tar\narchive/zip\nbufio\nbytes\ncompress/bzip2\ncompress/flate\ncompress/gzip\ncompress/lzw\ncompress/zlib\ncontainer/heap\ncontainer/list\ncontainer/ring\ncontext\ncrypto\ncrypto/aes\ncrypto/cipher\ncrypto/des\ncrypto/dsa\ncrypto/ecdsa\ncrypto/elliptic\ncrypto/hmac\ncrypto/md5\ncrypto/rand\ncrypto/rc4\ncrypto/rsa\ncrypto/sha1\ncrypto/sha256\ncrypto/sha512\ncrypto/subtle\ncrypto/tls\ncrypto/x509\ncrypto/x509/pkix\ndatabase/sql\ndatabase/sql/driver\ndebug/dwarf\ndebug/elf\ndebug/gosym\ndebug/macho\ndebug/pe\ndebug/plan9obj\nencoding\nencoding/ascii85\nencoding/asn1\nencoding/base32\nencoding/base64\nencoding/binary\nencoding/csv\nencoding/gob\nencoding/hex\nencoding/json\nencoding/pem\nencoding/xml\nerrors\nexpvar\nflag\nfmt\ngo/ast\ngo/build\ngo/constant\ngo/doc\ngo/format\ngo/importer\ngo/parser\ngo/printer\ngo/scanner\ngo/token\ngo/types\nhash\nhash/adler32\nhash/crc32\nhash/crc64\nhash/fnv\nhtml\nhtml/template\nimage\nimage/color\nimage/color/palette\nimage/draw\nimage/gif\nimage/jpeg\nimage/png\nindex/suffixarray\nio\nio/ioutil\nlog\nlog/syslog\nmath\nmath/big\nmath/bits\nmath/cmplx\nmath/rand\nmime\nmime/multipart\nmime/quotedprintable\nnet\nnet/http\nnet/http/cgi\nnet/http/cookiejar\nnet/http/fcgi\nnet/http/httptest\nnet/http/httptrace\nnet/http/httputil\nnet/http/pprof\nnet/mail\nnet/rpc\nnet/rpc/jsonrpc\nnet/smtp\nnet/textproto\nnet/url\nos\nos/exec\nos/signal\nos/user\npath\npath/filepath\nplugin\nreflect\nregexp\nregexp/syntax\nruntime\nruntime/cgo\nruntime/debug\nruntime/pprof\nruntime/race\nruntime/trace\nsort\nstrconv\nstrings\nsync\nsync/atomic\nsyscall\nsyscall/js\ntesting\ntesting/iotest\ntesting/quick\ntext/scanner\ntext/tabwriter\ntext/template\ntext/template/parse\ntime\nunicode\nunicode/utf16\nunicode/utf8\nunsafe"
  },
  {
    "path": "liteidex/deploy/packages/go/types.api",
    "content": "any\nbool\nbyte\ncomparable\ncomplex64\ncomplex128\nerror\nfloat32\nfloat64\nint\nint8\nint16\nint32\nint64\nrune\nstring\nuint\nuint8\nuint16\nuint32\nuint64\nuintptr\ntrue\nfalse\niota\nnil\n"
  },
  {
    "path": "liteidex/deploy/packages/gopresent/js/jquery-ui.js",
    "content": "/*! jQuery UI - v1.10.2 - 2013-03-20\n* http://jqueryui.com\n* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.resizable.js\n* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */\n\n(function(e,t){function i(t,i){var a,n,r,o=t.nodeName.toLowerCase();return\"area\"===o?(a=t.parentNode,n=a.name,t.href&&n&&\"map\"===a.nodeName.toLowerCase()?(r=e(\"img[usemap=#\"+n+\"]\")[0],!!r&&s(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:\"a\"===o?t.href||i:i)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return\"hidden\"===e.css(this,\"visibility\")}).length}var a=0,n=/^ui-id-\\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:\"1.10.2\",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,s){return\"number\"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css(\"position\"))||/absolute/.test(this.css(\"position\"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,\"position\"))&&/(auto|scroll)/.test(e.css(this,\"overflow\")+e.css(this,\"overflow-y\")+e.css(this,\"overflow-x\"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,\"overflow\")+e.css(this,\"overflow-y\")+e.css(this,\"overflow-x\"))}).eq(0),/fixed/.test(this.css(\"position\"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css(\"zIndex\",i);if(this.length)for(var s,a,n=e(this[0]);n.length&&n[0]!==document;){if(s=n.css(\"position\"),(\"absolute\"===s||\"relative\"===s||\"fixed\"===s)&&(a=parseInt(n.css(\"zIndex\"),10),!isNaN(a)&&0!==a))return a;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id=\"ui-id-\"+ ++a)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr(\"id\")})}}),e.extend(e.expr[\":\"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,\"tabindex\")))},tabbable:function(t){var s=e.attr(t,\"tabindex\"),a=isNaN(s);return(a||s>=0)&&i(t,!a)}}),e(\"<a>\").outerWidth(1).jquery||e.each([\"Width\",\"Height\"],function(i,s){function a(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,\"padding\"+this))||0,s&&(i-=parseFloat(e.css(t,\"border\"+this+\"Width\"))||0),a&&(i-=parseFloat(e.css(t,\"margin\"+this))||0)}),i}var n=\"Width\"===s?[\"Left\",\"Right\"]:[\"Top\",\"Bottom\"],r=s.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn[\"inner\"+s]=function(i){return i===t?o[\"inner\"+s].call(this):this.each(function(){e(this).css(r,a(this,i)+\"px\")})},e.fn[\"outer\"+s]=function(t,i){return\"number\"!=typeof t?o[\"outer\"+s].call(this,t):this.each(function(){e(this).css(r,a(this,t,!0,i)+\"px\")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e(\"<a>\").data(\"a-b\",\"a\").removeData(\"a-b\").data(\"a-b\")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart=\"onselectstart\"in document.createElement(\"div\"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?\"selectstart\":\"mousedown\")+\".ui-disableSelection\",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(\".ui-disableSelection\")}}),e.extend(e.ui,{plugin:{add:function(t,i,s){var a,n=e.ui[t].prototype;for(a in s)n.plugins[a]=n.plugins[a]||[],n.plugins[a].push([i,s[a]])},call:function(e,t,i){var s,a=e.plugins[t];if(a&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(s=0;a.length>s;s++)e.options[a[s][0]]&&a[s][1].apply(e.element,i)}},hasScroll:function(t,i){if(\"hidden\"===e(t).css(\"overflow\"))return!1;var s=i&&\"left\"===i?\"scrollLeft\":\"scrollTop\",a=!1;return t[s]>0?!0:(t[s]=1,a=t[s]>0,t[s]=0,a)}})})(jQuery);(function(e,t){var i=0,s=Array.prototype.slice,n=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler(\"remove\")}catch(a){}n(t)},e.widget=function(i,s,n){var a,r,o,h,l={},u=i.split(\".\")[0];i=i.split(\".\")[1],a=u+\"-\"+i,n||(n=s,s=e.Widget),e.expr[\":\"][a.toLowerCase()]=function(t){return!!e.data(t,a)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(n,function(i,n){return e.isFunction(n)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,a=this._superApply;return this._super=e,this._superApply=t,i=n.apply(this,arguments),this._super=s,this._superApply=a,i}}(),t):(l[i]=n,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:a}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+\".\"+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var n,a,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(n in r[o])a=r[o][n],r[o].hasOwnProperty(n)&&a!==t&&(i[n]=e.isPlainObject(a)?e.isPlainObject(i[n])?e.widget.extend({},i[n],a):e.widget.extend({},a):a);return i},e.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;e.fn[i]=function(r){var o=\"string\"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,n=e.data(this,a);return n?e.isFunction(n[r])&&\"_\"!==r.charAt(0)?(s=n[r].apply(n,h),s!==n&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error(\"no such method '\"+r+\"' for \"+i+\" widget instance\"):e.error(\"cannot call methods on \"+i+\" prior to initialization; \"+\"attempted to call method '\"+r+\"'\")}):this.each(function(){var t=e.data(this,a);t?t.option(r||{})._init():e.data(this,a,new n(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:\"widget\",widgetEventPrefix:\"\",defaultElement:\"<div>\",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace=\".\"+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger(\"create\",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr(\"aria-disabled\").removeClass(this.widgetFullName+\"-disabled \"+\"ui-state-disabled\"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass(\"ui-state-hover\"),this.focusable.removeClass(\"ui-state-focus\")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var n,a,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if(\"string\"==typeof i)if(o={},n=i.split(\".\"),i=n.shift(),n.length){for(a=o[i]=e.widget.extend({},this.options[i]),r=0;n.length-1>r;r++)a[n[r]]=a[n[r]]||{},a=a[n[r]];if(i=n.pop(),s===t)return a[i]===t?null:a[i];a[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,\"disabled\"===e&&(this.widget().toggleClass(this.widgetFullName+\"-disabled ui-state-disabled\",!!t).attr(\"aria-disabled\",t),this.hoverable.removeClass(\"ui-state-hover\"),this.focusable.removeClass(\"ui-state-focus\")),this},enable:function(){return this._setOption(\"disabled\",!1)},disable:function(){return this._setOption(\"disabled\",!0)},_on:function(i,s,n){var a,r=this;\"boolean\"!=typeof i&&(n=s,s=i,i=!1),n?(s=a=e(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,a=this.widget()),e.each(n,function(n,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass(\"ui-state-disabled\")?(\"string\"==typeof o?r[o]:o).apply(r,arguments):t}\"string\"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=n.match(/^(\\w+)\\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?a.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||\"\").split(\" \").join(this.eventNamespace+\" \")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return(\"string\"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass(\"ui-state-hover\")},mouseleave:function(t){e(t.currentTarget).removeClass(\"ui-state-hover\")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass(\"ui-state-focus\")},focusout:function(t){e(t.currentTarget).removeClass(\"ui-state-focus\")}})},_trigger:function(t,i,s){var n,a,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:\"fadeIn\",hide:\"fadeOut\"},function(t,i){e.Widget.prototype[\"_\"+t]=function(s,n,a){\"string\"==typeof n&&(n={effect:n});var r,o=n?n===!0||\"number\"==typeof n?i:n.effect||i:t;n=n||{},\"number\"==typeof n&&(n={duration:n}),r=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),r&&e.effects&&e.effects.effect[o]?s[t](n):o!==t&&s[o]?s[o](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}})})(jQuery);(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget(\"ui.mouse\",{version:\"1.10.2\",options:{cancel:\"input,textarea,button,select,option\",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind(\"mousedown.\"+this.widgetName,function(e){return t._mouseDown(e)}).bind(\"click.\"+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+\".preventClickEvent\")?(e.removeData(i.target,t.widgetName+\".preventClickEvent\"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind(\".\"+this.widgetName),this._mouseMoveDelegate&&e(document).unbind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).unbind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a=\"string\"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+\".preventClickEvent\")&&e.removeData(i.target,this.widgetName+\".preventClickEvent\"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).bind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).unbind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+\".preventClickEvent\",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(e){function t(e){return parseInt(e,10)||0}function i(e){return!isNaN(parseInt(e,10))}e.widget(\"ui.resizable\",e.ui.mouse,{version:\"1.10.2\",widgetEventPrefix:\"resize\",options:{alsoResize:!1,animate:!1,animateDuration:\"slow\",animateEasing:\"swing\",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:\"e,s,se\",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass(\"ui-resizable\"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||\"ui-resizable-helper\":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e(\"<div class='ui-wrapper' style='overflow: hidden;'></div>\").css({position:this.element.css(\"position\"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css(\"top\"),left:this.element.css(\"left\")})),this.element=this.element.parent().data(\"ui-resizable\",this.element.data(\"ui-resizable\")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css(\"marginLeft\"),marginTop:this.originalElement.css(\"marginTop\"),marginRight:this.originalElement.css(\"marginRight\"),marginBottom:this.originalElement.css(\"marginBottom\")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css(\"resize\"),this.originalElement.css(\"resize\",\"none\"),this._proportionallyResizeElements.push(this.originalElement.css({position:\"static\",zoom:1,display:\"block\"})),this.originalElement.css({margin:this.originalElement.css(\"margin\")}),this._proportionallyResize()),this.handles=r.handles||(e(\".ui-resizable-handle\",this.element).length?{n:\".ui-resizable-n\",e:\".ui-resizable-e\",s:\".ui-resizable-s\",w:\".ui-resizable-w\",se:\".ui-resizable-se\",sw:\".ui-resizable-sw\",ne:\".ui-resizable-ne\",nw:\".ui-resizable-nw\"}:\"e,s,se\"),this.handles.constructor===String)for(\"all\"===this.handles&&(this.handles=\"n,e,s,w,se,sw,ne,nw\"),t=this.handles.split(\",\"),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a=\"ui-resizable-\"+s,n=e(\"<div class='ui-resizable-handle \"+a+\"'></div>\"),n.css({zIndex:r.zIndex}),\"se\"===s&&n.addClass(\"ui-icon ui-icon-gripsmall-diagonal-se\"),this.handles[s]=\".ui-resizable-\"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=e(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=[\"padding\",/ne|nw|n/.test(i)?\"Top\":/se|sw|s/.test(i)?\"Bottom\":/^e$/.test(i)?\"Right\":\"Left\"].join(\"\"),t.css(n,a),this._proportionallyResize()),e(this.handles[i]).length},this._renderAxis(this.element),this._handles=e(\".ui-resizable-handle\",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:\"se\")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass(\"ui-resizable-autohide\").mouseenter(function(){r.disabled||(e(this).removeClass(\"ui-resizable-autohide\"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass(\"ui-resizable-autohide\"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass(\"ui-resizable ui-resizable-disabled ui-resizable-resizing\").removeData(\"resizable\").removeData(\"ui-resizable\").unbind(\".resizable\").find(\".ui-resizable-handle\").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css(\"position\"),width:t.outerWidth(),height:t.outerHeight(),top:t.css(\"top\"),left:t.css(\"left\")}).insertAfter(t),t.remove()),this.originalElement.css(\"resize\",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,a,o=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css(\"position\"))?h.css({position:\"absolute\",top:h.css(\"top\"),left:h.css(\"left\")}):h.is(\".ui-draggable\")&&h.css({position:\"absolute\",top:r.top,left:r.left}),this._renderProxy(),s=t(this.helper.css(\"left\")),n=t(this.helper.css(\"top\")),o.containment&&(s+=e(o.containment).scrollLeft()||0,n+=e(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio=\"number\"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=e(\".ui-resizable-\"+this.axis).css(\"cursor\"),e(\"body\").css(\"cursor\",\"auto\"===a?this.axis+\"-resize\":a),h.addClass(\"ui-resizable-resizing\"),this._propagate(\"start\",i),!0},_mouseDrag:function(t){var i,s=this.helper,n={},a=this.originalMousePosition,o=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,u=this.size.height,c=t.pageX-a.left||0,d=t.pageY-a.top||0,p=this._change[o];return p?(i=p.apply(this,[t,c,d]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate(\"resize\",t),this.position.top!==r&&(n.top=this.position.top+\"px\"),this.position.left!==h&&(n.left=this.position.left+\"px\"),this.size.width!==l&&(n.width=this.size.width+\"px\"),this.size.height!==u&&(n.height=this.size.height+\"px\"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(n)||this._trigger(\"resize\",t,this.ui()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&e.ui.hasScroll(i[0],\"left\")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css(\"left\"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css(\"top\"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e(\"body\").css(\"cursor\",\"auto\"),this.element.removeClass(\"ui-resizable-resizing\"),this._propagate(\"stop\",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,s,n,a,o,r=this.options;o={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||e)&&(t=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,s=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,t>o.minWidth&&(o.minWidth=t),n>o.minHeight&&(o.minHeight=n),o.maxWidth>s&&(o.maxWidth=s),o.maxHeight>a&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(e){this.offset=this.helper.offset(),i(e.left)&&(this.position.left=e.left),i(e.top)&&(this.position.top=e.top),i(e.height)&&(this.size.height=e.height),i(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,s=this.size,n=this.axis;return i(e.height)?e.width=e.height*this.aspectRatio:i(e.width)&&(e.height=e.width/this.aspectRatio),\"sw\"===n&&(e.left=t.left+(s.width-e.width),e.top=null),\"nw\"===n&&(e.top=t.top+(s.height-e.height),e.left=t.left+(s.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,s=this.axis,n=i(e.width)&&t.maxWidth&&t.maxWidth<e.width,a=i(e.height)&&t.maxHeight&&t.maxHeight<e.height,o=i(e.width)&&t.minWidth&&t.minWidth>e.width,r=i(e.height)&&t.minHeight&&t.minHeight>e.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,u=/sw|nw|w/.test(s),c=/nw|ne|n/.test(s);return o&&(e.width=t.minWidth),r&&(e.height=t.minHeight),n&&(e.width=t.maxWidth),a&&(e.height=t.maxHeight),o&&u&&(e.left=h-t.minWidth),n&&u&&(e.left=h-t.maxWidth),r&&c&&(e.top=l-t.minHeight),a&&c&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var e,t,i,s,n,a=this.helper||this.element;for(e=0;this._proportionallyResizeElements.length>e;e++){if(n=this._proportionallyResizeElements[e],!this.borderDif)for(this.borderDif=[],i=[n.css(\"borderTopWidth\"),n.css(\"borderRightWidth\"),n.css(\"borderBottomWidth\"),n.css(\"borderLeftWidth\")],s=[n.css(\"paddingTop\"),n.css(\"paddingRight\"),n.css(\"paddingBottom\"),n.css(\"paddingLeft\")],t=0;i.length>t;t++)this.borderDif[t]=(parseInt(i[t],10)||0)+(parseInt(s[t],10)||0);n.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e(\"<div style='overflow:hidden;'></div>\"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:\"absolute\",left:this.elementOffset.left+\"px\",top:this.elementOffset.top+\"px\",zIndex:++i.zIndex}),this.helper.appendTo(\"body\").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),\"resize\"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add(\"resizable\",\"animate\",{stop:function(t){var i=e(this).data(\"ui-resizable\"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&e.ui.hasScroll(n[0],\"left\")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css(\"left\"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css(\"top\"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css(\"width\"),10),height:parseInt(i.element.css(\"height\"),10),top:parseInt(i.element.css(\"top\"),10),left:parseInt(i.element.css(\"left\"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate(\"resize\",t)}})}}),e.ui.plugin.add(\"resizable\",\"containment\",{start:function(){var i,s,n,a,o,r,h,l=e(this).data(\"ui-resizable\"),u=l.options,c=l.element,d=u.containment,p=d instanceof e?d.get(0):/parent/.test(d)?c.parent().get(0):d;p&&(l.containerElement=e(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(i=e(p),s=[],e([\"Top\",\"Right\",\"Left\",\"Bottom\"]).each(function(e,n){s[e]=t(i.css(\"padding\"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,a=l.containerSize.height,o=l.containerSize.width,r=e.ui.hasScroll(p,\"left\")?p.scrollWidth:o,h=e.ui.hasScroll(p)?p.scrollHeight:a,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(t){var i,s,n,a,o=e(this).data(\"ui-resizable\"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,c={top:0,left:0},d=o.containerElement;d[0]!==document&&/static/.test(d.css(\"position\"))&&(c=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-c.left),u&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?h.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,i=Math.abs((o._helper?o.offset.left-c.left:o.offset.left-c.left)+o.sizeDiff.width),s=Math.abs((o._helper?o.offset.top-c.top:o.offset.top-h.top)+o.sizeDiff.height),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css(\"position\")),n&&a&&(i-=o.parentData.left),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var t=e(this).data(\"ui-resizable\"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css(\"position\"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css(\"position\"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add(\"resizable\",\"alsoResize\",{start:function(){var t=e(this).data(\"ui-resizable\"),i=t.options,s=function(t){e(t).each(function(){var t=e(this);t.data(\"ui-resizable-alsoresize\",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css(\"left\"),10),top:parseInt(t.css(\"top\"),10)})})};\"object\"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)})},resize:function(t,i){var s=e(this).data(\"ui-resizable\"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(t,s){e(t).each(function(){var t=e(this),n=e(this).data(\"ui-resizable-alsoresize\"),a={},o=s&&s.length?s:t.parents(i.originalElement[0]).length?[\"width\",\"height\"]:[\"width\",\"height\",\"top\",\"left\"];e.each(o,function(e,t){var i=(n[t]||0)+(r[t]||0);i&&i>=0&&(a[t]=i||null)}),t.css(a)})};\"object\"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):e.each(n.alsoResize,function(e,t){h(e,t)})},stop:function(){e(this).removeData(\"resizable-alsoresize\")}}),e.ui.plugin.add(\"resizable\",\"ghost\",{start:function(){var t=e(this).data(\"ui-resizable\"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:\"block\",position:\"relative\",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass(\"ui-resizable-ghost\").addClass(\"string\"==typeof i.ghost?i.ghost:\"\"),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data(\"ui-resizable\");t.ghost&&t.ghost.css({position:\"relative\",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data(\"ui-resizable\");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add(\"resizable\",\"grid\",{resize:function(){var t=e(this).data(\"ui-resizable\"),i=t.options,s=t.size,n=t.originalSize,a=t.originalPosition,o=t.axis,r=\"number\"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,u=Math.round((s.width-n.width)/h)*h,c=Math.round((s.height-n.height)/l)*l,d=n.width+u,p=n.height+c,f=i.maxWidth&&d>i.maxWidth,m=i.maxHeight&&p>i.maxHeight,g=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,g&&(d+=h),v&&(p+=l),f&&(d-=h),m&&(p-=l),/^(se|s|e)$/.test(o)?(t.size.width=d,t.size.height=p):/^(ne)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.top=a.top-c):/^(sw)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.left=a.left-u):(t.size.width=d,t.size.height=p,t.position.top=a.top-c,t.position.left=a.left-u)}})})(jQuery);"
  },
  {
    "path": "liteidex/deploy/packages/gopresent/static/article.css",
    "content": "body {\n\tmargin: 0;\n\tfont-family: Helvetica, Arial, sans-serif;\n\tfont-size: 16px;\n}\npre,\ncode {\n\tfont-family: Menlo, monospace;\n\tfont-size: 14px;\n}\npre {\n\tline-height: 18px;\n\tmargin: 0;\n\tpadding: 0;\n}\na {\n\tcolor: #375EAB;\n\ttext-decoration: none;\n}\na:hover {\n\ttext-decoration: underline;\n}\np, ul, ol {\n\tmargin: 20px;\n}\n\nh1, h2, h3, h4 {\n\tmargin: 20px 0;\n\tpadding: 0;\n\tcolor: #375EAB;\n\tfont-weight: bold;\n}\nh1 {\n\tfont-size: 24px;\n}\nh2 {\n\tfont-size: 20px;\n\tbackground: #E0EBF5;\n\tpadding: 2px 5px;\n}\nh3 {\n\tfont-size: 20px;\n}\nh3, h4 {\n\tmargin: 20px 5px;\n}\nh4 {\n\tfont-size: 16px;\n}\n\ndiv#heading {\n\tfloat: left;\n\tmargin: 0 0 10px 0;\n\tpadding: 21px 0;\n\tfont-size: 20px;\n\tfont-weight: normal;\n}\n\ndiv#topbar {\n\tbackground: #E0EBF5;\n\theight: 64px;\n\toverflow: hidden;\n}\n\nbody {\n\ttext-align: center;\n}\ndiv#page {\n\twidth: 100%;\n}\ndiv#page > .container,\ndiv#topbar > .container {\n\ttext-align: left;\n\tmargin-left: auto;\n\tmargin-right: auto;\n\tpadding: 0 20px;\n\twidth: 900px;\n}\ndiv#page.wide > .container,\ndiv#topbar.wide > .container {\n\twidth: auto;\n}\n\ndiv#footer {\n\ttext-align: center;\n\tcolor: #666;\n\tfont-size: 14px;\n\tmargin: 40px 0;\n}\n\n.author p {\n\tmargin: 20, 0, 0, 0px;\n}\n\ndiv.code,\ndiv.output {\n\tmargin: 20px;\n\tpadding: 10px;\n\t-webkit-border-radius: 5px;\n\t-moz-border-radius: 5px;\n\tborder-radius: 5px;\n}\n\ndiv.code { background: #e9e9e9; }\ndiv.output { background: black; }\ndiv.output .stdout { color: #e6e6e6; }\ndiv.output .stderr { color: rgb(244, 74, 63); }\ndiv.output .system { color: rgb(255, 209, 77) }\n\n.buttons {\n\tmargin-left: 20px;\n}\ndiv.output .buttons {\n\tmargin-left: 0;\n\tmargin-bottom: 10px;\n}\n\n#toc {\n\tfloat: right;\n\tmargin: 0px 10px;\n\tpadding: 10px;\n\tborder: 1px solid #e5ecf9; \n\tbackground-color: white;\n\tmax-width: 33%;\n\n\t-webkit-border-radius: 5px;\n\t-moz-border-radius: 5px;\n\tborder-radius: 5px;\n}\n\n#toc ul, #toc a {\n\tlist-style-type: none;\n\tpadding-left: 10px;\n\tcolor: black;\n\tmargin: 0px;\n}\n"
  },
  {
    "path": "liteidex/deploy/packages/gopresent/static/dir.css",
    "content": "/* copied from $GOROOT/doc/style.css */\n\nbody {\n\tmargin: 0;\n\tfont-family: Helvetica, Arial, sans-serif;\n\tfont-size: 16px;\n}\npre,\ncode {\n\tfont-family: Menlo, monospace;\n\tfont-size: 14px;\n}\npre {\n\tline-height: 18px;\n}\npre .comment {\n\tcolor: #375EAB;\n}\npre .highlight,\npre .highlight-comment,\npre .selection-highlight,\npre .selection-highlight-comment {\n\tbackground: #FFFF00;\n}\npre .selection,\npre .selection-comment {\n\tbackground: #FF9632;\n}\npre .ln {\n\tcolor: #999;\n}\nbody {\n\tcolor: #222;\n}\na,\n.exampleHeading .text {\n\tcolor: #375EAB;\n\ttext-decoration: none;\n}\na:hover,\n.exampleHeading .text:hover {\n\ttext-decoration: underline;\n}\np,\npre,\nul,\nol {\n\tmargin: 20px;\n}\npre {\n\tbackground: #e9e9e9;\n\tpadding: 10px;\n\n\t-webkit-border-radius: 5px;\n\t-moz-border-radius: 5px;\n\tborder-radius: 5px;\n}\n\nh1,\nh2,\nh3,\nh4,\n.rootHeading {\n\tmargin: 20px 0;\n\tpadding: 0;\n\tcolor: #375EAB;\n\tfont-weight: bold;\n}\nh1 {\n\tfont-size: 24px;\n}\nh2 {\n\tfont-size: 20px;\n\tbackground: #E0EBF5;\n\tpadding: 2px 5px;\n}\nh3 {\n\tfont-size: 20px;\n}\nh3,\nh4 {\n\tmargin: 20px 5px;\n}\nh4 {\n\tfont-size: 16px;\n}\n\ndl {\n\tmargin: 20px;\n}\ndd {\n\tmargin: 2px 20px;\n}\ndl,\ndd {\n\tfont-size: 14px;\n}\ndiv#nav table td {\n\tvertical-align: top;\n}\n\ndiv#heading {\n\tfloat: left;\n\tmargin: 0 0 10px 0;\n\tpadding: 21px 0;\n\tfont-size: 20px;\n\tfont-weight: normal;\n}\ndiv#heading a {\n\tcolor: #222;\n\ttext-decoration: none;\n}\n\ndiv#topbar {\n\tbackground: #E0EBF5;\n\theight: 64px;\n}\n\nbody {\n\ttext-align: center;\n}\ndiv#page,\ndiv#topbar > .container {\n\tclear: both;\n\ttext-align: left;\n\tmargin-left: auto;\n\tmargin-right: auto;\n\tpadding: 0 20px;\n\twidth: 900px;\n}\ndiv#page.wide,\ndiv#topbar > .wide {\n\twidth: auto;\n}\ndiv#plusone {\n\tfloat: right;\n}\n\ndiv#footer {\n\tcolor: #666;\n\tfont-size: 14px;\n\tmargin: 40px 0;\n}\n\ndiv#menu > a,\ndiv#menu > input {\n\tpadding: 10px;\n\n\ttext-decoration: none;\n\tfont-size: 16px;\n\n\t-webkit-border-radius: 5px;\n\t-moz-border-radius: 5px;\n\tborder-radius: 5px;\n}\ndiv#menu > a,\ndiv#menu > input {\n\tborder: 1px solid #375EAB;\n}\ndiv#menu > a {\n\tcolor: white;\n\tbackground: #375EAB;\n}\n\ndiv#menu {\n\tfloat: right;\n\tmin-width: 590px;\n\tpadding: 10px 0;\n\ttext-align: right;\n}\ndiv#menu > a {\n\tmargin-right: 5px;\n\tmargin-bottom: 10px;\n\n\tpadding: 10px;\n}\ndiv#menu > input {\n\tposition: relative;\n\ttop: 1px;\n\twidth: 60px;\n\tbackground: white;\n\tcolor: #222;\n}\ndiv#menu > input.inactive {\n\tcolor: #999;\n}\n"
  },
  {
    "path": "liteidex/deploy/packages/gopresent/static/dir.js",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// copied from $GOROOT/doc/godocs.js\n\nfunction bindEvent(el, e, fn) {\n  if (el.addEventListener){\n    el.addEventListener(e, fn, false);\n  } else if (el.attachEvent){\n    el.attachEvent('on'+e, fn);\n  }\n}\n\nfunction godocs_bindSearchEvents() {\n  var search = document.getElementById('search');\n  if (!search) {\n    // no search box (index disabled)\n    return;\n  }\n  function clearInactive() {\n    if (search.className == \"inactive\") {\n      search.value = \"\";\n      search.className = \"\";\n    }\n  }\n  function restoreInactive() {\n    if (search.value !== \"\") {\n      return;\n    }\n    if (search.type != \"search\") {\n      search.value = search.getAttribute(\"placeholder\");\n    }\n    search.className = \"inactive\";\n  }\n  restoreInactive();\n  bindEvent(search, 'focus', clearInactive);\n  bindEvent(search, 'blur', restoreInactive);\n}\n\nbindEvent(window, 'load', godocs_bindSearchEvents);\n"
  },
  {
    "path": "liteidex/deploy/packages/gopresent/static/print.css",
    "content": "/* set page layout */\n@page {\n  size: A4 landscape;\n}\n\nbody { \n  display: block !important;\n}\n\n.slides {\n  left: 0;\n  top: 0;\n}\n\n.slides > article {\n  position: relative;\n\n  left: 0;\n  top: 0;\n\n  margin: 0 !important;\n  page-break-inside: avoid;\n\n  text-shadow: none; /* disable shadow */\n\n  display: block !important;\n  transform: translate(0) !important;\n  -o-transform: translate(0) !important;\n  -moz-transform: translate(0) !important;\n  -webkit-transform: translate3d(0, 0, 0) !important;\n}\n\ndiv.code {\n  background: rgb(240, 240, 240);\n}\n\n/* hide click areas */\n.slide-area, #prev-slide-area, #next-slide-area {\n  display: none;\n}\n\n/* add explicit links */\na:link:after, a:visited:after {\n content: \" (\" attr(href) \") \";\n font-size: 50%;\n}\n\n/* white background */\nbody {\n  background: rgb(255,255,255) !important;\n}\n"
  },
  {
    "path": "liteidex/deploy/packages/gopresent/static/slides.js",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nvar PERMANENT_URL_PREFIX = 'static/';\n\nvar SLIDE_CLASSES = ['far-past', 'past', 'current', 'next', 'far-next'];\n\nvar PM_TOUCH_SENSITIVITY = 15;\n\nvar curSlide;\n\n/* ---------------------------------------------------------------------- */\n/* classList polyfill by Eli Grey\n * (http://purl.eligrey.com/github/classList.js/blob/master/classList.js) */\n\nif (typeof document !== \"undefined\" && !(\"classList\" in document.createElement(\"a\"))) {\n\n(function (view) {\n\nvar\n    classListProp = \"classList\"\n  , protoProp = \"prototype\"\n  , elemCtrProto = (view.HTMLElement || view.Element)[protoProp]\n  , objCtr = Object\n    strTrim = String[protoProp].trim || function () {\n    return this.replace(/^\\s+|\\s+$/g, \"\");\n  }\n  , arrIndexOf = Array[protoProp].indexOf || function (item) {\n    for (var i = 0, len = this.length; i < len; i++) {\n      if (i in this && this[i] === item) {\n        return i;\n      }\n    }\n    return -1;\n  }\n  // Vendors: please allow content code to instantiate DOMExceptions\n  , DOMEx = function (type, message) {\n    this.name = type;\n    this.code = DOMException[type];\n    this.message = message;\n  }\n  , checkTokenAndGetIndex = function (classList, token) {\n    if (token === \"\") {\n      throw new DOMEx(\n          \"SYNTAX_ERR\"\n        , \"An invalid or illegal string was specified\"\n      );\n    }\n    if (/\\s/.test(token)) {\n      throw new DOMEx(\n          \"INVALID_CHARACTER_ERR\"\n        , \"String contains an invalid character\"\n      );\n    }\n    return arrIndexOf.call(classList, token);\n  }\n  , ClassList = function (elem) {\n    var\n        trimmedClasses = strTrim.call(elem.className)\n      , classes = trimmedClasses ? trimmedClasses.split(/\\s+/) : []\n    ;\n    for (var i = 0, len = classes.length; i < len; i++) {\n      this.push(classes[i]);\n    }\n    this._updateClassName = function () {\n      elem.className = this.toString();\n    };\n  }\n  , classListProto = ClassList[protoProp] = []\n  , classListGetter = function () {\n    return new ClassList(this);\n  }\n;\n// Most DOMException implementations don't allow calling DOMException's toString()\n// on non-DOMExceptions. Error's toString() is sufficient here.\nDOMEx[protoProp] = Error[protoProp];\nclassListProto.item = function (i) {\n  return this[i] || null;\n};\nclassListProto.contains = function (token) {\n  token += \"\";\n  return checkTokenAndGetIndex(this, token) !== -1;\n};\nclassListProto.add = function (token) {\n  token += \"\";\n  if (checkTokenAndGetIndex(this, token) === -1) {\n    this.push(token);\n    this._updateClassName();\n  }\n};\nclassListProto.remove = function (token) {\n  token += \"\";\n  var index = checkTokenAndGetIndex(this, token);\n  if (index !== -1) {\n    this.splice(index, 1);\n    this._updateClassName();\n  }\n};\nclassListProto.toggle = function (token) {\n  token += \"\";\n  if (checkTokenAndGetIndex(this, token) === -1) {\n    this.add(token);\n  } else {\n    this.remove(token);\n  }\n};\nclassListProto.toString = function () {\n  return this.join(\" \");\n};\n\nif (objCtr.defineProperty) {\n  var classListPropDesc = {\n      get: classListGetter\n    , enumerable: true\n    , configurable: true\n  };\n  try {\n    objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);\n  } catch (ex) { // IE 8 doesn't support enumerable:true\n    if (ex.number === -0x7FF5EC54) {\n      classListPropDesc.enumerable = false;\n      objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);\n    }\n  }\n} else if (objCtr[protoProp].__defineGetter__) {\n  elemCtrProto.__defineGetter__(classListProp, classListGetter);\n}\n\n}(self));\n\n}\n/* ---------------------------------------------------------------------- */\n\n/* Slide movement */\n\nfunction getSlideEl(no) {\n  if ((no < 0) || (no >= slideEls.length)) {\n    return null;\n  } else {\n    return slideEls[no];\n  }\n};\n\nfunction updateSlideClass(slideNo, className) {\n  var el = getSlideEl(slideNo);\n\n  if (!el) {\n    return;\n  }\n\n  if (className) {\n    el.classList.add(className);\n  }\n\n  for (var i in SLIDE_CLASSES) {\n    if (className != SLIDE_CLASSES[i]) {\n      el.classList.remove(SLIDE_CLASSES[i]);\n    }\n  }\n};\n\nfunction updateSlides() {\n  for (var i = 0; i < slideEls.length; i++) {\n    switch (i) {\n      case curSlide - 2:\n        updateSlideClass(i, 'far-past');\n        break;\n      case curSlide - 1:\n        updateSlideClass(i, 'past');\n        break;\n      case curSlide:\n        updateSlideClass(i, 'current');\n        break;\n      case curSlide + 1:\n        updateSlideClass(i, 'next');\n        break;\n      case curSlide + 2:\n        updateSlideClass(i, 'far-next');\n        break;\n      default:\n        updateSlideClass(i);\n        break;\n    }\n  }\n\n  triggerLeaveEvent(curSlide - 1);\n  triggerEnterEvent(curSlide);\n\n  window.setTimeout(function() {\n    // Hide after the slide\n    disableSlideFrames(curSlide - 2);\n  }, 301);\n\n  enableSlideFrames(curSlide - 1);\n  enableSlideFrames(curSlide + 2);\n\n  updateHash();\n};\n\nfunction prevSlide() {\n  if (curSlide > 0) {\n    curSlide--;\n\n    updateSlides();\n  }\n};\n\nfunction nextSlide() {\n  if (curSlide < slideEls.length - 1) {\n    curSlide++;\n\n    updateSlides();\n  }\n};\n\n/* Slide events */\n\nfunction triggerEnterEvent(no) {\n  var el = getSlideEl(no);\n  if (!el) {\n    return;\n  }\n\n  var onEnter = el.getAttribute('onslideenter');\n  if (onEnter) {\n    new Function(onEnter).call(el);\n  }\n\n  var evt = document.createEvent('Event');\n  evt.initEvent('slideenter', true, true);\n  evt.slideNumber = no + 1; // Make it readable\n\n  el.dispatchEvent(evt);\n};\n\nfunction triggerLeaveEvent(no) {\n  var el = getSlideEl(no);\n  if (!el) {\n    return;\n  }\n\n  var onLeave = el.getAttribute('onslideleave');\n  if (onLeave) {\n    new Function(onLeave).call(el);\n  }\n\n  var evt = document.createEvent('Event');\n  evt.initEvent('slideleave', true, true);\n  evt.slideNumber = no + 1; // Make it readable\n\n  el.dispatchEvent(evt);\n};\n\n/* Touch events */\n\nfunction handleTouchStart(event) {\n  if (event.touches.length == 1) {\n    touchDX = 0;\n    touchDY = 0;\n\n    touchStartX = event.touches[0].pageX;\n    touchStartY = event.touches[0].pageY;\n\n    document.body.addEventListener('touchmove', handleTouchMove, true);\n    document.body.addEventListener('touchend', handleTouchEnd, true);\n  }\n};\n\nfunction handleTouchMove(event) {\n  if (event.touches.length > 1) {\n    cancelTouch();\n  } else {\n    touchDX = event.touches[0].pageX - touchStartX;\n    touchDY = event.touches[0].pageY - touchStartY;\n    event.preventDefault();\n  }\n};\n\nfunction handleTouchEnd(event) {\n  var dx = Math.abs(touchDX);\n  var dy = Math.abs(touchDY);\n\n  if ((dx > PM_TOUCH_SENSITIVITY) && (dy < (dx * 2 / 3))) {\n    if (touchDX > 0) {\n      prevSlide();\n    } else {\n      nextSlide();\n    }\n  }\n\n  cancelTouch();\n};\n\nfunction cancelTouch() {\n  document.body.removeEventListener('touchmove', handleTouchMove, true);\n  document.body.removeEventListener('touchend', handleTouchEnd, true);\n};\n\n/* Preloading frames */\n\nfunction disableSlideFrames(no) {\n  var el = getSlideEl(no);\n  if (!el) {\n    return;\n  }\n\n  var frames = el.getElementsByTagName('iframe');\n  for (var i = 0, frame; frame = frames[i]; i++) {\n    disableFrame(frame);\n  }\n};\n\nfunction enableSlideFrames(no) {\n  var el = getSlideEl(no);\n  if (!el) {\n    return;\n  }\n\n  var frames = el.getElementsByTagName('iframe');\n  for (var i = 0, frame; frame = frames[i]; i++) {\n    enableFrame(frame);\n  }\n};\n\nfunction disableFrame(frame) {\n  frame.src = 'about:blank';\n};\n\nfunction enableFrame(frame) {\n  var src = frame._src;\n\n  if (frame.src != src && src != 'about:blank') {\n    frame.src = src;\n  }\n};\n\nfunction setupFrames() {\n  var frames = document.querySelectorAll('iframe');\n  for (var i = 0, frame; frame = frames[i]; i++) {\n    frame._src = frame.src;\n    disableFrame(frame);\n  }\n\n  enableSlideFrames(curSlide);\n  enableSlideFrames(curSlide + 1);\n  enableSlideFrames(curSlide + 2);\n};\n\nfunction setupInteraction() {\n  /* Clicking and tapping */\n\n  var el = document.createElement('div');\n  el.className = 'slide-area';\n  el.id = 'prev-slide-area';\n  el.addEventListener('click', prevSlide, false);\n  document.querySelector('section.slides').appendChild(el);\n\n  var el = document.createElement('div');\n  el.className = 'slide-area';\n  el.id = 'next-slide-area';\n  el.addEventListener('click', nextSlide, false);\n  document.querySelector('section.slides').appendChild(el);\n\n  /* Swiping */\n\n  document.body.addEventListener('touchstart', handleTouchStart, false);\n}\n\n/* Hash functions */\n\nfunction getCurSlideFromHash() {\n  var slideNo = parseInt(location.hash.substr(1));\n\n  if (slideNo) {\n    curSlide = slideNo - 1;\n  } else {\n    curSlide = 0;\n  }\n};\n\nfunction updateHash() {\n  location.replace('#' + (curSlide + 1));\n};\n\n/* Event listeners */\n\nfunction handleBodyKeyDown(event) {\n  // If we're in a code element, only handle pgup/down.\n  var inCode = event.target.classList.contains(\"code\");\n\n  switch (event.keyCode) {\n    case 39: // right arrow\n    case 13: // Enter\n    case 32: // space\n      if (inCode) break;\n    case 34: // PgDn\n      nextSlide();\n      event.preventDefault();\n      break;\n\n    case 37: // left arrow\n    case 8: // Backspace\n      if (inCode) break;\n    case 33: // PgUp\n      prevSlide();\n      event.preventDefault();\n      break;\n\n    case 40: // down arrow\n      if (inCode) break;\n      nextSlide();\n      event.preventDefault();\n      break;\n\n    case 38: // up arrow\n      if (inCode) break;\n      prevSlide();\n      event.preventDefault();\n      break;\n  }\n};\n\nfunction addEventListeners() {\n  document.addEventListener('keydown', handleBodyKeyDown, false);\n};\n\n/* Initialization */\n\nfunction addFontStyle() {\n  var el = document.createElement('link');\n  el.rel = 'stylesheet';\n  el.type = 'text/css';\n  el.href = '//fonts.googleapis.com/css?family=' +\n            'Open+Sans:regular,semibold,italic,italicsemibold|Droid+Sans+Mono';\n\n  document.body.appendChild(el);\n};\n\nfunction addGeneralStyle() {\n  var el = document.createElement('link');\n  el.rel = 'stylesheet';\n  el.type = 'text/css';\n  el.href = PERMANENT_URL_PREFIX + 'styles.css';\n  document.body.appendChild(el);\n\n  var el = document.createElement('meta');\n  el.name = 'viewport';\n  el.content = 'width=1100,height=750';\n  document.querySelector('head').appendChild(el);\n\n  var el = document.createElement('meta');\n  el.name = 'apple-mobile-web-app-capable';\n  el.content = 'yes';\n  document.querySelector('head').appendChild(el);\n};\n\nfunction addPrintStyle() {\n  var el = document.createElement('link');\n  el.rel = 'stylesheet';\n  el.type = 'text/css';\n  el.media = \"print\";\n  el.href = PERMANENT_URL_PREFIX + 'print.css';\n  document.body.appendChild(el);\n};\n\nfunction handleDomLoaded() {\n  slideEls = document.querySelectorAll('section.slides > article');\n\n  setupFrames();\n\n  addFontStyle();\n  addGeneralStyle();\n  addPrintStyle();\n  addEventListeners();\n\n  updateSlides();\n\n  setupInteraction();\n\n  document.body.classList.add('loaded');\n};\n\nfunction initialize() {\n  getCurSlideFromHash();\n\n  if (window['_DEBUG']) {\n    PERMANENT_URL_PREFIX = '../';\n  }\n\n  if (window['_DCL']) {\n    handleDomLoaded();\n  } else {\n    document.addEventListener('DOMContentLoaded', handleDomLoaded, false);\n  }\n}\n\n// If ?debug exists then load the script relative instead of absolute\nif (!window['_DEBUG'] && document.location.href.indexOf('?debug') !== -1) {\n  document.addEventListener('DOMContentLoaded', function() {\n    // Avoid missing the DomContentLoaded event\n    window['_DCL'] = true\n  }, false);\n\n  window['_DEBUG'] = true;\n  var script = document.createElement('script');\n  script.type = 'text/javascript';\n  script.src = '../slides.js';\n  var s = document.getElementsByTagName('script')[0];\n  s.parentNode.insertBefore(script, s);\n\n  // Remove this script\n  s.parentNode.removeChild(s);\n} else {\n  initialize();\n}\n"
  },
  {
    "path": "liteidex/deploy/packages/gopresent/static/styles.css",
    "content": "/* Framework */\n\nhtml {\n  height: 100%;\n}\n\nbody {\n  margin: 0;\n  padding: 0;\n\n  display: block !important;\n\n  height: 100%;\n  min-height: 740px;\n\n  overflow-x: hidden;\n  overflow-y: auto;\n\n  background: rgb(215, 215, 215);\n  background: -o-radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190));\n  background: -moz-radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190));\n  background: -webkit-radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190));\n  background: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 500, from(rgb(240, 240, 240)), to(rgb(190, 190, 190)));\n\n  -webkit-font-smoothing: antialiased;\n}\n\n.slides {\n  width: 100%;\n  height: 100%;\n  left: 0;\n  top: 0;\n\n  position: absolute;\n\n  -webkit-transform: translate3d(0, 0, 0);\n}\n\n.slides > article {\n  display: block;\n\n  position: absolute;\n  overflow: hidden;\n\n  width: 900px;\n  height: 700px;\n\n  left: 50%;\n  top: 50%;\n\n  margin-left: -450px;\n  margin-top: -350px;\n\n  padding: 40px 60px;\n\n  box-sizing: border-box;\n  -o-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  -webkit-box-sizing: border-box;\n\n  border-radius: 10px;\n  -o-border-radius: 10px;\n  -moz-border-radius: 10px;\n  -webkit-border-radius: 10px;\n\n  background-color: white;\n\n  border: 1px solid rgba(0, 0, 0, .3);\n\n  transition: transform .3s ease-out;\n  -o-transition: -o-transform .3s ease-out;\n  -moz-transition: -moz-transform .3s ease-out;\n  -webkit-transition: -webkit-transform .3s ease-out;\n}\n.slides.layout-widescreen > article {\n  margin-left: -550px;\n  width: 1100px;\n}\n.slides.layout-faux-widescreen > article {\n  margin-left: -550px;\n  width: 1100px;\n\n  padding: 40px 160px;\n}\n\n.slides.layout-widescreen > article:not(.nobackground):not(.biglogo),\n.slides.layout-faux-widescreen > article:not(.nobackground):not(.biglogo) {\n  background-position-x: 0, 840px;\n}\n\n/* Clickable/tappable areas */\n\n.slide-area {\n  z-index: 1000;\n\n  position: absolute;\n  left: 0;\n  top: 0;\n  width: 150px;\n  height: 700px;\n\n  left: 50%;\n  top: 50%;\n\n  cursor: pointer;\n  margin-top: -350px;\n\n  tap-highlight-color: transparent;\n  -o-tap-highlight-color: transparent;\n  -moz-tap-highlight-color: transparent;\n  -webkit-tap-highlight-color: transparent;\n}\n#prev-slide-area {\n  margin-left: -550px;\n}\n#next-slide-area {\n  margin-left: 400px;\n}\n.slides.layout-widescreen #prev-slide-area,\n.slides.layout-faux-widescreen #prev-slide-area {\n  margin-left: -650px;\n}\n.slides.layout-widescreen #next-slide-area,\n.slides.layout-faux-widescreen #next-slide-area {\n  margin-left: 500px;\n}\n\n/* Slides */\n\n.slides > article {\n  display: none;\n}\n.slides > article.far-past {\n  display: block;\n  transform: translate(-2040px);\n  -o-transform: translate(-2040px);\n  -moz-transform: translate(-2040px);\n  -webkit-transform: translate3d(-2040px, 0, 0);\n}\n.slides > article.past {\n  display: block;\n  transform: translate(-1020px);\n  -o-transform: translate(-1020px);\n  -moz-transform: translate(-1020px);\n  -webkit-transform: translate3d(-1020px, 0, 0);\n}\n.slides > article.current {\n  display: block;\n  transform: translate(0);\n  -o-transform: translate(0);\n  -moz-transform: translate(0);\n  -webkit-transform: translate3d(0, 0, 0);\n}\n.slides > article.next {\n  display: block;\n  transform: translate(1020px);\n  -o-transform: translate(1020px);\n  -moz-transform: translate(1020px);\n  -webkit-transform: translate3d(1020px, 0, 0);\n}\n.slides > article.far-next {\n  display: block;\n  transform: translate(2040px);\n  -o-transform: translate(2040px);\n  -moz-transform: translate(2040px);\n  -webkit-transform: translate3d(2040px, 0, 0);\n}\n\n.slides.layout-widescreen > article.far-past,\n.slides.layout-faux-widescreen > article.far-past {\n  display: block;\n  transform: translate(-2260px);\n  -o-transform: translate(-2260px);\n  -moz-transform: translate(-2260px);\n  -webkit-transform: translate3d(-2260px, 0, 0);\n}\n.slides.layout-widescreen > article.past,\n.slides.layout-faux-widescreen > article.past {\n  display: block;\n  transform: translate(-1130px);\n  -o-transform: translate(-1130px);\n  -moz-transform: translate(-1130px);\n  -webkit-transform: translate3d(-1130px, 0, 0);\n}\n.slides.layout-widescreen > article.current,\n.slides.layout-faux-widescreen > article.current {\n  display: block;\n  transform: translate(0);\n  -o-transform: translate(0);\n  -moz-transform: translate(0);\n  -webkit-transform: translate3d(0, 0, 0);\n}\n.slides.layout-widescreen > article.next,\n.slides.layout-faux-widescreen > article.next {\n  display: block;\n  transform: translate(1130px);\n  -o-transform: translate(1130px);\n  -moz-transform: translate(1130px);\n  -webkit-transform: translate3d(1130px, 0, 0);\n}\n.slides.layout-widescreen > article.far-next,\n.slides.layout-faux-widescreen > article.far-next {\n  display: block;\n  transform: translate(2260px);\n  -o-transform: translate(2260px);\n  -moz-transform: translate(2260px);\n  -webkit-transform: translate3d(2260px, 0, 0);\n}\n\n/* Styles for slides */\n\n.slides > article {\n  font-family: 'Open Sans', Arial, sans-serif;\n\n  color: black;\n  text-shadow: 0 1px 1px rgba(0, 0, 0, .1);\n\n  font-size: 26px;\n  line-height: 36px;\n\n  letter-spacing: -1px;\n}\n\nb {\n  font-weight: 600;\n}\n\na {\n  color: rgb(0, 102, 204);\n  text-decoration: none;\n}\na:visited {\n  color: rgba(0, 102, 204, .75);\n}\na:hover {\n  color: black;\n}\n\np {\n  margin: 0;\n  padding: 0;\n\n  margin-top: 20px;\n}\np:first-child {\n  margin-top: 0;\n}\n\nh1 {\n  font-size: 60px;\n  line-height: 60px;\n\n  padding: 0;\n  margin: 0;\n  margin-top: 200px;\n  margin-bottom: 5px;\n  padding-right: 40px;\n\n  font-weight: 600;\n\n  letter-spacing: -3px;\n\n  color: rgb(51, 51, 51);\n}\n\nh2 {\n  font-size: 45px;\n  line-height: 45px;\n\n  position: absolute;\n  bottom: 150px;\n\n  padding: 0;\n  margin: 0;\n  padding-right: 40px;\n\n  font-weight: 600;\n\n  letter-spacing: -2px;\n\n  color: rgb(51, 51, 51);\n}\n\nh3 {\n  font-size: 30px;\n  line-height: 36px;\n\n  padding: 0;\n  margin: 0;\n  padding-right: 40px;\n\n  font-weight: 600;\n\n  letter-spacing: -1px;\n\n  color: rgb(51, 51, 51);\n}\n\nul {\n  margin: 0;\n  padding: 0;\n  margin-top: 20px;\n  margin-left: 1.5em;\n}\nli {\n  padding: 0;\n  margin: 0 0 .5em 0;\n}\n\ndiv.code {\n  padding: 5px 10px;\n  margin-top: 20px;\n  margin-bottom: 20px;\n  overflow: hidden;\n\n  background: rgb(240, 240, 240);\n  border: 1px solid rgb(224, 224, 224);\n}\npre {\n  margin: 0;\n  padding: 0;\n\n  font-family: 'Droid Sans Mono', 'Courier New', monospace;\n  font-size: 18px;\n  line-height: 24px;\n  letter-spacing: -1px;\n\n  color: black;\n}\n\ncode {\n  font-size: 95%;\n  font-family: 'Droid Sans Mono', 'Courier New', monospace;\n\n  color: black;\n}\n\narticle > .image {\n  \ttext-align: center;\n    margin-top: 40px;\n}\n\ntable {\n  width: 100%;\n  border-collapse: collapse;\n  margin-top: 40px;\n}\nth {\n  font-weight: 600;\n  text-align: left;\n}\ntd,\nth {\n  border: 1px solid rgb(224, 224, 224);\n  padding: 5px 10px;\n  vertical-align: top;\n}\n\np.link {\n  margin-left: 20px;\n}\n\n/* Code */\ndiv.code {\n  outline: 0px solid transparent;\n}\ndiv.playground {\n  position: relative;\n}\ndiv.output {\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  right: 40px;\n  bottom: 40px;\n  background: #202020;\n  padding: 5px 10px;\n  z-index: 2;\n\n  border-radius: 10px;\n  -o-border-radius: 10px;\n  -moz-border-radius: 10px;\n  -webkit-border-radius: 10px;\n\n}\ndiv.output pre {\n  margin: 0;\n  padding: 0;\n  background: none;\n  border: none;\n  width: 100%;\n  height: 100%;\n  overflow: auto;\n}\ndiv.output .stdout, div.output pre {\n  color: #e6e6e6;\n}\ndiv.output .stderr, div.output .error {\n  color: rgb(244, 74, 63);\n}\ndiv.output .system, div.output .exit {\n  color: rgb(255, 209, 77)\n}\n.buttons {\n  position: relative;\n  float: right;\n  top: -60px;\n  right: 10px;\n}\ndiv.output .buttons {\n  position: absolute;\n  float: none;\n  top: auto;\n  right: 5px;\n  bottom: 5px;\n}\n\n/* Presenter details */\n.presenter {\n\tmargin-top: 20px;\n}\n.presenter p,\n.presenter .link {\n\tmargin: 0;\n\tfont-size: 28px;\n\tline-height: 1.2em;\n}\n\n/* Output resize details */\n.ui-resizable-handle {\n  position: absolute;\n}\n.ui-resizable-n {\n  cursor: n-resize;\n  height: 7px;\n  width: 100%;\n  top: -5px;\n  left: 0;\n}\n.ui-resizable-w {\n  cursor: w-resize;\n  width: 7px;\n  left: -5px;\n  top: 0;\n  height: 100%;\n}\n.ui-resizable-nw {\n  cursor: nw-resize;\n  width: 9px;\n  height: 9px;\n  left: -5px;\n  top: -5px;\n}\n"
  },
  {
    "path": "liteidex/deploy/packages/lua/luabase.api",
    "content": "_G\n_VERSION\nassert\ncollectgarbage\ndofile\nerror\ngetfenv\ngetmetatable\nipairs\nload\nloadfile\nloadstring\nmodule\nnext\npairs\npcall\nprint\nrawequal\nrawget\nrawset\nrequire\nselect\nsetfenv\nsetmetatable\ntonumber\ntostring\ntype\nunpack\nxpcall\n"
  },
  {
    "path": "liteidex/deploy/packages/lua/lualib.api",
    "content": "coroutine.create\ncoroutine.resume\ncoroutine.running\ncoroutine.status\ncoroutine.wrap\ncoroutine.yield\n\ndebug.debug\ndebug.getfenv\ndebug.gethook\ndebug.getinfo\ndebug.getlocal\ndebug.getmetatable\ndebug.getregistry\ndebug.getupvalue\ndebug.setfenv\ndebug.sethook\ndebug.setlocal\ndebug.setmetatable\ndebug.setupvalue\ndebug.traceback\n\nfile:close\nfile:flush\nfile:lines\nfile:read\nfile:seek\nfile:setvbuf\nfile:write\n\nio.close\nio.flush\nio.input\nio.lines\nio.open\nio.output\nio.popen\nio.read\nio.stderr\nio.stdin\nio.stdout\nio.tmpfile\nio.type\nio.write\n\nmath.abs\nmath.acos\nmath.asin\nmath.atan\nmath.atan2\nmath.ceil\nmath.cos\nmath.cosh\nmath.deg\nmath.exp\nmath.floor\nmath.fmod\nmath.frexp\nmath.huge\nmath.ldexp\nmath.log\nmath.log10\nmath.max\nmath.min\nmath.modf\nmath.pi\nmath.pow\nmath.rad\nmath.random\nmath.randomseed\nmath.sin\nmath.sinh\nmath.sqrt\nmath.tan\nmath.tanh\n\nos.clock\nos.date\nos.difftime\nos.execute\nos.exit\nos.getenv\nos.remove\nos.rename\nos.setlocale\nos.time\nos.tmpname\n\npackage.cpath\npackage.loaded\npackage.loaders\npackage.loadlib\npackage.path\npackage.preload\npackage.seeall\n\nstring.byte\nstring.char\nstring.dump\nstring.find\nstring.format\nstring.gmatch\nstring.gsub\nstring.len\nstring.lower\nstring.match\nstring.rep\nstring.reverse\nstring.sub\nstring.upper\n\ntable.concat\ntable.insert\ntable.maxn\ntable.remove\ntable.sort\n\n\n\n"
  },
  {
    "path": "liteidex/deploy/packages/lua/lualib5_annot.api",
    "content": "_G holds global environment, setfenv changes environments\n_VERSION current interpreter version \"Lua 5.0\"\nassert (v [, message]) error if v nil or false, otherwise returns v\ncollectgarbage ([limit]) set threshold to limit KBytes, default 0, may run GC\ncoroutine.create (f) creates coroutine from function f, returns coroutine\ncoroutine.resume (co, val1, ...) continues execution of co, returns bool status plus any values\ncoroutine.status (co) returns co status: \"running\", \"suspended\" or \"dead\"\ncoroutine.wrap (f) creates coroutine with body f, returns function that resumes co\ncoroutine.yield (val1, ...) suspend execution of calling coroutine\ndebug.debug () enters interactive debug mode, line with only \"cont\" terminates\ndebug.gethook () returns current hook function, hook mask, hook count\ndebug.getinfo (function [, what]) returns table with information about a function\ndebug.getlocal (level, local) returns name and value of local variable with index local at stack level\ndebug.getupvalue (func, up) returns name and value of upvalue with index up of function func\ndebug.sethook (hook, mask [, count]) sets given function as a hook, mask=\"[crl]\"\ndebug.setlocal (level, local, value) sets local variable with index local at stack level with value\ndebug.setupvalue (func, up, value) sets upvalue with index up of function func with value\ndebug.traceback ([message]) returns a string with a traceback of the call stack\ndofile (filename) executes as Lua chunk, default stdin, returns value\nerror (message [, level]) terminates protected func, never returns, level 1 (default), 2=parent\nfile:close () closes file\nfile:flush () saves any written data to file\nfile:lines () returns iterator function to return lines, nil ends\nfile:read (format1, ...) reads file according to given formats, returns read values or nil\nfile:seek ([whence] [, offset]) sets file pos, whence=\"set\"|\"cur\"|\"end\", defaults \"curr\",0, returns file pos\nfile:write (value1, ...) writes strings or numbers to file\ngcinfo () returns dynamic mem in use (KB), and current GC threshold (KB)\ngetfenv (f) gets env, f can be a function or number (stack level, default=1), 0=global env\ngetmetatable (object) returns metatable of given object, otherwise nil\nio.close ([file]) closes file, or the default output file\nio.flush () flushes the default output file\nio.input ([file]) opens file in text mode, sets as default input file, or returns current default input file\nio.lines ([filename]) open file in read mode, returns iterator function to return lines, nil ends\nio.open (filename [, mode]) opens file in specified mode \"[rawb+]\", returns handle or nil\nio.output ([file]) opens file in text mode, sets as default output file, or returns current default output file\nio.read (format1, ...) reads file according to given formats, returns read values or nil\nio.stderr file descriptor for STDERR\nio.stdin file descriptor for STDIN\nio.stdout file descriptor for STDOUT \nio.tmpfile () returns a handle for a temporary file, opened in update mode\nio.type (obj) returns \"file\" if obj is an open file handle, \"close file\" if closed, or nil if not a file handle\nio.write (value1, ...) writes strings or numbers to file\nipairs (t) returns an iterator function, table t and 0\nloadfile (filename) loads chunk without execution, returns chunk as function, else nil plus error\nloadlib (libname, funcname) links to dynamic library libname, returns funcname as a C function\nloadstring (string [, chunkname]) loads string as chunk, returns chunk as function, else nil plus error\nmath.abs (v) returns absolute value of v\nmath.acos (v) returns arc cosine value of v in radians\nmath.asin (v) returns arc sine value of v in radians\nmath.atan (v) returns arc tangent value of v in radians\nmath.atan2 (v1, v2) returns arc tangent value of v1/v2 in radians\nmath.ceil (v) returns smallest integer >= v\nmath.cos (rad) returns cosine value of angle rad\nmath.deg (rad) returns angle in degrees of radians rad\nmath.exp (v) returns e^v\nmath.floor (v) returns largest integer <= v\nmath.frexp (v) returns mantissa [0.5,1) and exponent values of v\nmath.ldexp (v1, v2) returns v1*2^v2\nmath.log (v) returns natural logarithm of v\nmath.log10 (v) returns logarithm 10 of v\nmath.max (v1, ...) returns maximum in a list of one or more values\nmath.min (v1, ...) returns minimum in a list of one or more values\nmath.mod (v1, v2) returns remainder of v1/v2 which is v1 - iV2 for some integer i\nmath.pow (v1, v2) returns v1 raised to the power of v2\nmath.rad (deg) returns angle in radians of degrees deg\nmath.random ([n [, u]]) returns random real [0,1), integer [1,n] or real [1,u] (with n=1)\nmath.randomseed (seed) sets seed for pseudo-random number generator\nmath.sin (rad) returns sine value of angle rad \nmath.sqrt (v) returns square root of v\nmath.tan (rad) returns tangent value of angle rad  \nnext (table [, index]) returns next index,value pair, if index=nil (default), returns first index\nos.clock () returns CPU time used by program in seconds\nos.date ([format [, time]]) returns a string or table containing date and time, \"*t\" returns a table\nos.difftime (t2, t1) returns number of seconds from time t1 to time t2\nos.execute (command) executes command using C function system, returns status code\nos.exit ([code]) terminates host program with optional code, default is success code\nos.getenv (varname) returns value of environment variable varname. nil if not defined\nos.remove (filename) deletes file with given name, nil if fails\nos.rename (oldname, newname) renames file oldname to newname, nil if fails\nos.setlocale (locale [, category]) set current locale of program, returns name of new locate or nil\nos.time ([table]) returns current time (usually seconds) or time as represented by table\nos.tmpname () returns a string with a filename for a temporary file (dangerous! tmpfile is better)\npairs (t) returns the next function and table t plus a nil, iterates over all key-value pairs\npcall (f, arg1, arg2, ...) protected mode call, catches errors, returns status code first (true=success)\nprint (e1, e2, ...) prints values to stdout using tostring\nrawequal (v1, v2) non-metamethod v1==v2, returns boolean\nrawget (table, index) non-metamethod get value of table[index], index != nil\nrawset (table, index, value) non-metamethod set value of table[index], index != nil\nrequire (packagename) loads package, updates _LOADED, returns boolean\nsetfenv (f, table) sets env, f can be a function or number (stack level, default=1), 0=global env\nsetmetatable (table, metatable) sets metatable, nil to remove metatable\nstring.byte (s [, i]) returns numerical code, nil if index out of range, default i=1\nstring.char (i1, i2, ...) returns a string built from 0 or more integers\nstring.dump (function) returns binary representation of function, used with loadstring\nstring.find (s, pattern [, init [, plain]]) matches pattern in s, returns start,end indices, else nil\nstring.format (formatstring, e1, e2, ...) returns formatted string, printf-style\nstring.gfind (s, pat) returns iterator function that returns next captures from pattern pat on s\nstring.gsub (s, pat, repl [, n]) returns copy of s with pat replaced by repl, and substitutions made\nstring.len (s) returns string length\nstring.lower (s) returns string with letters in lower case\nstring.rep (s, n) returns string with n copies of string s\nstring.sub (s, i [, j]) returns substring from index i to j of s, default j=-1 (string length)\nstring.upper (s) returns string with letters in upper case\ntable.concat (table [, sep [, i [, j]]]) returns concatenated table elements i to j separated by sep\ntable.foreach (table, f) executes f(index,value) over all elements of table, returns first non-nil of f\ntable.foreachi (table, f) executes f(index,value) in sequential order 1 to n, returns first non-nil of f\ntable.getn (table) returns size of table, or n field, or table.setn value, or 1 less first index with nil value\ntable.insert (table, [pos,] value) insert value at location pos in table, default pos=n+1\ntable.remove (table [, pos]) removes element at pos from table, default pos=n\ntable.setn (table, n) sets size of table, n field of table if it exists\ntable.sort (table [, comp]) sorts in-place elements 1 to n, comp(v1,v2) true if v1<v2, default <\ntonumber (e [, base]) convert to number, returns number, nil if non-convertible, 2<=base<=36\ntostring (e) convert to string, returns string\ntype (v) returns type of v as a string\nunpack (list) returns all elements from list\nxpcall (f, err) pcall function f with new error handler err\n"
  },
  {
    "path": "liteidex/deploy/packages/markdown/css/Clearness Dark.css",
    "content": "h1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote {\n    margin: 0;\n    padding: 0;\n}\nbody {\n    font-family: \"Helvetica Neue\", Helvetica, \"Hiragino Sans GB\", Arial, sans-serif;\n    font-size: 13px;\n    line-height: 18px;\n    color: #fff;\n    background-color: #282a36;\n    margin: 10px 13px 10px 13px;\n}\ntable {\n\tmargin: 10px 0 15px 0;\n\tborder-collapse: collapse;\n}\ntd,th {\t\n\tborder: 1px solid #ddd;\n\tpadding: 3px 10px;\n}\nth {\n\tpadding: 5px 10px;\t\n}\na {\n    color: #59acf3;\n}\na:hover {\n    color: #a7d8ff;\n    text-decoration: none;\n}\na img {\n    border: none;\n}\np {\n    margin-bottom: 9px;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n    color: #fff;\n    line-height: 36px;\n}\nh1 {\n    margin-bottom: 18px;\n    font-size: 30px;\n}\nh2 {\n    font-size: 24px;\n}\nh3 {\n    font-size: 18px;\n}\nh4 {\n    font-size: 16px;\n}\nh5 {\n    font-size: 14px;\n}\nh6 {\n    font-size: 13px;\n}\nhr {\n    margin: 0 0 19px;\n    border: 0;\n    border-bottom: 1px solid #ccc;\n}\nblockquote {\n    padding: 13px 13px 21px 15px;\n    margin-bottom: 18px;\n    font-family:georgia,serif;\n    font-style: italic;\n}\nblockquote:before {\n    content:\"\\201C\";\n    font-size:40px;\n    margin-left:-10px;\n    font-family:georgia,serif;\n    color:#eee;\n}\nblockquote p {\n    font-size: 14px;\n    font-weight: 300;\n    line-height: 18px;\n    margin-bottom: 0;\n    font-style: italic;\n}\ncode, pre {\n    font-family: Monaco, Andale Mono, Courier New, monospace;\n}\ncode {\n\tcolor: #ff4a14;\n    padding: 1px 3px;\n    font-size: 12px;\n    -webkit-border-radius: 3px;\n    -moz-border-radius: 3px;\n    border-radius: 3px;\n}\npre {\n    display: block;\n    padding: 14px;\n    margin: 0 0 18px;\n    line-height: 16px;\n    font-size: 11px;\n    border: 1px solid #bf370f;\n    white-space: pre;\n    white-space: pre-wrap;\n    word-wrap: break-word;\n}\npre code {\n    background-color: #282a36;\n    color: #ff4a14;\n    font-size: 11px;\n    padding: 0;\n}\n@media screen and (min-width: 914px) {\n    body {\n        width: 854px;\n        margin:10px auto;\n    }\n}\n@media print {\n\tbody,code,pre code,h1,h2,h3,h4,h5,h6 {\n\t\tcolor: black;\n\t}\n\tpre,code {\n\t\tword-wrap: break-word;\n\t}\n\t/*\n\ttable, pre {\n\t\tpage-break-inside: avoid;\n\t}\n\t*/\n}"
  },
  {
    "path": "liteidex/deploy/packages/markdown/css/Clearness.css",
    "content": "h1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote {\n    margin: 0;\n    padding: 0;\n}\nbody {\n    font-family: \"Helvetica Neue\", Helvetica, \"Hiragino Sans GB\", Arial, sans-serif;\n    font-size: 13px;\n    line-height: 18px;\n    color: #737373;\n    background-color: white;\n    margin: 10px 13px 10px 13px;\n}\ntable {\n\tmargin: 10px 0 15px 0;\n\tborder-collapse: collapse;\n}\ntd,th {\t\n\tborder: 1px solid #ddd;\n\tpadding: 3px 10px;\n}\nth {\n\tpadding: 5px 10px;\t\n}\n\na {\n    color: #0069d6;\n}\na:hover {\n    color: #0050a3;\n    text-decoration: none;\n}\na img {\n    border: none;\n}\np {\n    margin-bottom: 9px;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n    color: #404040;\n    line-height: 36px;\n}\nh1 {\n    margin-bottom: 18px;\n    font-size: 30px;\n}\nh2 {\n    font-size: 24px;\n}\nh3 {\n    font-size: 18px;\n}\nh4 {\n    font-size: 16px;\n}\nh5 {\n    font-size: 14px;\n}\nh6 {\n    font-size: 13px;\n}\nhr {\n    margin: 0 0 19px;\n    border: 0;\n    border-bottom: 1px solid #ccc;\n}\nblockquote {\n    padding: 13px 13px 21px 15px;\n    margin-bottom: 18px;\n    font-family:georgia,serif;\n    font-style: italic;\n}\nblockquote:before {\n    content:\"\\201C\";\n    font-size:40px;\n    margin-left:-10px;\n    font-family:georgia,serif;\n    color:#eee;\n}\nblockquote p {\n    font-size: 14px;\n    font-weight: 300;\n    line-height: 18px;\n    margin-bottom: 0;\n    font-style: italic;\n}\ncode, pre {\n    font-family: Monaco, Andale Mono, Courier New, monospace;\n}\ncode {\n    background-color: #fee9cc;\n    color: rgba(0, 0, 0, 0.75);\n    padding: 1px 3px;\n    font-size: 12px;\n    -webkit-border-radius: 3px;\n    -moz-border-radius: 3px;\n    border-radius: 3px;\n}\npre {\n    display: block;\n    padding: 14px;\n    margin: 0 0 18px;\n    line-height: 16px;\n    font-size: 11px;\n    border: 1px solid #d9d9d9;\n    white-space: pre-wrap;\n    word-wrap: break-word;\n}\npre code {\n    background-color: #fff;\n    color:#737373;\n    font-size: 11px;\n    padding: 0;\n}\n@media screen and (min-width: 914px) {\n    body {\n        width: 854px;\n        margin:10px auto;\n    }\n}\n@media print {\n\tbody,code,pre code,h1,h2,h3,h4,h5,h6 {\n\t\tcolor: black;\n\t}\n\tpre,code {\n\t\tword-wrap: break-word;\n\t}\n\n\t/*\n\ttable, pre {\n\t\tpage-break-inside: avoid;\n\t}\n\t*/\n}"
  },
  {
    "path": "liteidex/deploy/packages/markdown/css/Documents.css",
    "content": "h1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote {\n    margin: 0;\n    padding: 0;\n}\nbody {\n    font-family: \"Helvetica Neue\", Helvetica, \"Hiragino Sans GB\", Arial, sans-serif;\n    font-size: 13px;\n    line-height: 18px;\n    color: #737373;\n    background-color: white;\n    margin: 10px 13px 10px 13px;\n}\ntable {\n\tmargin: 10px 0 15px 0;\n\tborder-collapse: collapse;\n}\ntd,th {\t\n\tborder: 1px solid #ddd;\n\tpadding: 3px 10px;\n}\nth {\n\tpadding: 5px 10px;\t\n}\n\na {\n    color: #0069d6;\n}\na:hover {\n    color: #0050a3;\n    text-decoration: none;\n}\na img {\n    border: none;\n}\np {\n\tmargin-top: 9px;\n    margin-bottom: 9px;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n    color: #404040;\n    line-height: 36px;\n}\nh1 {\n    margin-bottom: 18px;\n    font-size: 30px;\n}\nh2 {\n    font-size: 24px;\n}\nh3 {\n    font-size: 18px;\n}\nh4 {\n    font-size: 16px;\n}\nh5 {\n    font-size: 14px;\n}\nh6 {\n    font-size: 13px;\n}\nhr {\n    margin: 0 0 19px;\n    border: 0;\n    border-bottom: 1px solid #ccc;\n}\nblockquote {\n    padding: 13px 13px 21px 15px;\n    margin-bottom: 18px;\n    font-family:georgia,serif;\n    font-style: italic;\n}\nblockquote:before {\n    content:\"\\201C\";\n    font-size:40px;\n    margin-left:-10px;\n    font-family:georgia,serif;\n    color:#eee;\n}\nblockquote p {\n    font-size: 14px;\n    font-weight: 300;\n    line-height: 18px;\n    margin-bottom: 0;\n    font-style: italic;\n}\npre,code{font:12px Monaco,\"Courier New\",\"DejaVu Sans Mono\",\"Bitstream Vera Sans Mono\",monospace;}\npre {\n\tfont-size:12px;\n\tbackground-color:#eee;\n\tborder:1px solid #ddd;\n\tpadding:1px;\n\tcolor:#444;\n\toverflow:auto;\n\t-webkit-box-shadow:rgba(0,0,0,0.07) 0 1px 2px inset;\n\t-webkit-border-radius:3px;\n\t-moz-border-radius:3px;border-radius:3px;\n}\npre code {\n\tpadding:0;\n\tfont-size:12px;\n\tbackground-color:#eee;\n\tborder:none;\n}\ncode {\n\tfont-size:12px;\n\tbackground-color:#f8f8ff;\n\tcolor:#444;\n\tpadding:0 .2em;\n\tborder:1px solid #dedede;\n}\n@media screen and (min-width: 914px) {\n    body {\n        width: 854px;\n        margin:10px auto;\n    }\n}\n@media print {\n\tbody,code,pre code,h1,h2,h3,h4,h5,h6 {\n\t\tcolor: black;\n\t}\n\t/*\n\ttable, pre {\n\t\tpage-break-inside: avoid;\n\t}\n\t*/\n}"
  },
  {
    "path": "liteidex/deploy/packages/markdown/css/GitHub.css",
    "content": "*{margin:0;padding:0;}\nbody {\n\tfont:13.34px helvetica,arial,freesans,clean,sans-serif;\n\tcolor:black;\n\tline-height:1.4em;\n\tbackground-color: #F8F8F8;\n\tpadding: 0.7em;\n}\np {\n\tmargin:1em 0;\n\tline-height:1.5em;\n}\ntable {\n\tfont-size:inherit;\n\tfont:100%;\n\tmargin:1em;\n}\ntable th{border-bottom:1px solid #bbb;padding:.2em 1em;}\ntable td{border-bottom:1px solid #ddd;padding:.2em 1em;}\ninput[type=text],input[type=password],input[type=image],textarea{font:99% helvetica,arial,freesans,sans-serif;}\nselect,option{padding:0 .25em;}\noptgroup{margin-top:.5em;}\npre,code{font:12px Monaco,\"Courier New\",\"DejaVu Sans Mono\",\"Bitstream Vera Sans Mono\",monospace;}\npre {\n\tmargin:1em 0;\n\tfont-size:12px;\n\tbackground-color:#eee;\n\tborder:1px solid #ddd;\n\tpadding:5px;\n\tline-height:1.5em;\n\tcolor:#444;\n\toverflow:auto;\n\t-webkit-box-shadow:rgba(0,0,0,0.07) 0 1px 2px inset;\n\t-webkit-border-radius:3px;\n\t-moz-border-radius:3px;border-radius:3px;\n}\npre code {\n\tpadding:0;\n\tfont-size:12px;\n\tbackground-color:#eee;\n\tborder:none;\n}\ncode {\n\tfont-size:12px;\n\tbackground-color:#f8f8ff;\n\tcolor:#444;\n\tpadding:0 .2em;\n\tborder:1px solid #dedede;\n}\nimg{border:0;max-width:100%;}\nabbr{border-bottom:none;}\na{color:#4183c4;text-decoration:none;}\na:hover{text-decoration:underline;}\na code,a:link code,a:visited code{color:#4183c4;}\nh2,h3{margin:1em 0;}\nh1,h2,h3,h4,h5,h6{border:0;}\nh1{font-size:170%;border-top:4px solid #aaa;padding-top:.5em;margin-top:1.5em;}\nh1:first-child{margin-top:0;padding-top:.25em;border-top:none;}\nh2{font-size:150%;margin-top:1.5em;border-top:4px solid #e0e0e0;padding-top:.5em;}\nh3{margin-top:1em;}\nhr{border:1px solid #ddd;}\nul{margin:1em 0 1em 2em;}\nol{margin:1em 0 1em 2em;}\nul li,ol li{margin-top:.5em;margin-bottom:.5em;}\nul ul,ul ol,ol ol,ol ul{margin-top:0;margin-bottom:0;}\nblockquote{margin:1em 0;border-left:5px solid #ddd;padding-left:.6em;color:#555;}\ndt{font-weight:bold;margin-left:1em;}\ndd{margin-left:2em;margin-bottom:1em;}\n@media screen and (min-width: 914px) {\n    body {\n        width: 854px;\n        margin:0 auto;\n    }\n}\n@media print {\n\tpre,code {\n\t\tword-wrap: break-word;\n\t}\n\t/*\n\ttable, pre {\n\t\tpage-break-inside: avoid;\n\t}\n\t*/\n}"
  },
  {
    "path": "liteidex/deploy/packages/markdown/css/GitHub2.css",
    "content": "body {\n  font-family: Helvetica, arial, sans-serif;\n  font-size: 14px;\n  line-height: 1.6;\n  padding-top: 10px;\n  padding-bottom: 10px;\n  background-color: white;\n  padding: 30px; }\n\nbody > *:first-child {\n  margin-top: 0 !important; }\nbody > *:last-child {\n  margin-bottom: 0 !important; }\n\na {\n  color: #4183C4; }\na.absent {\n  color: #cc0000; }\na.anchor {\n  display: block;\n  padding-left: 30px;\n  margin-left: -30px;\n  cursor: pointer;\n  position: absolute;\n  top: 0;\n  left: 0;\n  bottom: 0; }\n\nh1, h2, h3, h4, h5, h6 {\n  margin: 20px 0 10px;\n  padding: 0;\n  font-weight: bold;\n  -webkit-font-smoothing: antialiased;\n  cursor: text;\n  position: relative; }\n\nh1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {\n  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA09pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoMTMuMCAyMDEyMDMwNS5tLjQxNSAyMDEyLzAzLzA1OjIxOjAwOjAwKSAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUM2NjlDQjI4ODBGMTFFMTg1ODlEODNERDJBRjUwQTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUM2NjlDQjM4ODBGMTFFMTg1ODlEODNERDJBRjUwQTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QzY2OUNCMDg4MEYxMUUxODU4OUQ4M0REMkFGNTBBNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QzY2OUNCMTg4MEYxMUUxODU4OUQ4M0REMkFGNTBBNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsQhXeAAAABfSURBVHjaYvz//z8DJYCRUgMYQAbAMBQIAvEqkBQWXI6sHqwHiwG70TTBxGaiWwjCTGgOUgJiF1J8wMRAIUA34B4Q76HUBelAfJYSA0CuMIEaRP8wGIkGMA54bgQIMACAmkXJi0hKJQAAAABJRU5ErkJggg==) no-repeat 10px center;\n  text-decoration: none; }\n\nh1 tt, h1 code {\n  font-size: inherit; }\n\nh2 tt, h2 code {\n  font-size: inherit; }\n\nh3 tt, h3 code {\n  font-size: inherit; }\n\nh4 tt, h4 code {\n  font-size: inherit; }\n\nh5 tt, h5 code {\n  font-size: inherit; }\n\nh6 tt, h6 code {\n  font-size: inherit; }\n\nh1 {\n  font-size: 28px;\n  color: black; }\n\nh2 {\n  font-size: 24px;\n  border-bottom: 1px solid #cccccc;\n  color: black; }\n\nh3 {\n  font-size: 18px; }\n\nh4 {\n  font-size: 16px; }\n\nh5 {\n  font-size: 14px; }\n\nh6 {\n  color: #777777;\n  font-size: 14px; }\n\np, blockquote, ul, ol, dl, li, table, pre {\n  margin: 15px 0; }\n\nhr {\n  background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAYAAACtBE5DAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OENDRjNBN0E2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OENDRjNBN0I2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Q0NGM0E3ODY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Q0NGM0E3OTY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqqezsUAAAAfSURBVHjaYmRABcYwBiM2QSA4y4hNEKYDQxAEAAIMAHNGAzhkPOlYAAAAAElFTkSuQmCC) repeat-x 0 0;\n  border: 0 none;\n  color: #cccccc;\n  height: 4px;\n  padding: 0;\n}\n\nbody > h2:first-child {\n  margin-top: 0;\n  padding-top: 0; }\nbody > h1:first-child {\n  margin-top: 0;\n  padding-top: 0; }\n  body > h1:first-child + h2 {\n    margin-top: 0;\n    padding-top: 0; }\nbody > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child {\n  margin-top: 0;\n  padding-top: 0; }\n\na:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {\n  margin-top: 0;\n  padding-top: 0; }\n\nh1 p, h2 p, h3 p, h4 p, h5 p, h6 p {\n  margin-top: 0; }\n\nli p.first {\n  display: inline-block; }\nli {\n  margin: 0; }\nul, ol {\n  padding-left: 30px; }\n\nul :first-child, ol :first-child {\n  margin-top: 0; }\n\ndl {\n  padding: 0; }\n  dl dt {\n    font-size: 14px;\n    font-weight: bold;\n    font-style: italic;\n    padding: 0;\n    margin: 15px 0 5px; }\n    dl dt:first-child {\n      padding: 0; }\n    dl dt > :first-child {\n      margin-top: 0; }\n    dl dt > :last-child {\n      margin-bottom: 0; }\n  dl dd {\n    margin: 0 0 15px;\n    padding: 0 15px; }\n    dl dd > :first-child {\n      margin-top: 0; }\n    dl dd > :last-child {\n      margin-bottom: 0; }\n\nblockquote {\n  border-left: 4px solid #dddddd;\n  padding: 0 15px;\n  color: #777777; }\n  blockquote > :first-child {\n    margin-top: 0; }\n  blockquote > :last-child {\n    margin-bottom: 0; }\n\ntable {\n  padding: 0;border-collapse: collapse; }\n  table tr {\n    border-top: 1px solid #cccccc;\n    background-color: white;\n    margin: 0;\n    padding: 0; }\n    table tr:nth-child(2n) {\n      background-color: #f8f8f8; }\n    table tr th {\n      font-weight: bold;\n      border: 1px solid #cccccc;\n      text-align: left;\n      margin: 0;\n      padding: 6px 13px; }\n    table tr td {\n      border: 1px solid #cccccc;\n      text-align: left;\n      margin: 0;\n      padding: 6px 13px; }\n    table tr th :first-child, table tr td :first-child {\n      margin-top: 0; }\n    table tr th :last-child, table tr td :last-child {\n      margin-bottom: 0; }\n\nimg {\n  max-width: 100%; }\n\nspan.frame {\n  display: block;\n  overflow: hidden; }\n  span.frame > span {\n    border: 1px solid #dddddd;\n    display: block;\n    float: left;\n    overflow: hidden;\n    margin: 13px 0 0;\n    padding: 7px;\n    width: auto; }\n  span.frame span img {\n    display: block;\n    float: left; }\n  span.frame span span {\n    clear: both;\n    color: #333333;\n    display: block;\n    padding: 5px 0 0; }\nspan.align-center {\n  display: block;\n  overflow: hidden;\n  clear: both; }\n  span.align-center > span {\n    display: block;\n    overflow: hidden;\n    margin: 13px auto 0;\n    text-align: center; }\n  span.align-center span img {\n    margin: 0 auto;\n    text-align: center; }\nspan.align-right {\n  display: block;\n  overflow: hidden;\n  clear: both; }\n  span.align-right > span {\n    display: block;\n    overflow: hidden;\n    margin: 13px 0 0;\n    text-align: right; }\n  span.align-right span img {\n    margin: 0;\n    text-align: right; }\nspan.float-left {\n  display: block;\n  margin-right: 13px;\n  overflow: hidden;\n  float: left; }\n  span.float-left span {\n    margin: 13px 0 0; }\nspan.float-right {\n  display: block;\n  margin-left: 13px;\n  overflow: hidden;\n  float: right; }\n  span.float-right > span {\n    display: block;\n    overflow: hidden;\n    margin: 13px auto 0;\n    text-align: right; }\n\ncode, tt {\n  margin: 0 2px;\n  padding: 0 5px;\n  white-space: nowrap;\n  border: 1px solid #eaeaea;\n  background-color: #f8f8f8;\n  border-radius: 3px; }\n\npre code {\n  margin: 0;\n  padding: 0;\n  white-space: pre;\n  border: none;\n  background: transparent; }\n\n.highlight pre {\n  background-color: #f8f8f8;\n  border: 1px solid #cccccc;\n  font-size: 13px;\n  line-height: 19px;\n  overflow: auto;\n  padding: 6px 10px;\n  border-radius: 3px; }\n\npre {\n  background-color: #f8f8f8;\n  border: 1px solid #cccccc;\n  font-size: 13px;\n  line-height: 19px;\n  overflow: auto;\n  padding: 6px 10px;\n  border-radius: 3px; }\n  pre code, pre tt {\n    background-color: transparent;\n    border: none; }\n\n@media screen and (min-width: 914px) {\n    body {\n        width: 854px;\n        margin:0 auto;\n    }\n}\n@media print {\n\tpre,code {\n\t\tword-wrap: break-word;\n\t}\t\n\t/*\n\ttable, pre {\n\t\tpage-break-inside: avoid;\n\t}\n\t*/\n}"
  },
  {
    "path": "liteidex/deploy/packages/markdown/css/GitHub_Style.css",
    "content": "/* \nName: Github ReadMe style for LiteIde\nAuthor: slene(vslene@gmail.com)\n*/\n\n/*\nGitHub Style Author: hzlzh(hzlzh.dev@gmail.com)\nURL: https://github.com/hzlzh/Mou-Theme\n*/\n\n@charset \"UTF-8\";\nbody, input, select, textarea, button{ font:13px/1.4 Helvetica, arial, freesans, clean, sans-serif; color:#333333; }\nbody{ background-color:#FFFFFF; color:#333333; background-color:#FFFFFF; border:3px solid #EEEEEE; padding:0 30px 30px; font-size:15px; line-height:1.7; margin:20px auto; max-width:722px;margin-left: 10px; border-radius:3px 3px 3px 3px; }\na{ color:#4183C4; text-decoration:none; }\na:hover{ text-decoration:underline; }\na:focus, a:active{ text-decoration:underline; }\n.action{ color:#DD0000; text-decoration:underline; }\n.clearfix:before, .clearfix:after{ content:\" \"; display:table; }\n.clearfix:after{ clear:both; }\n.danger{ color:#CC0000; }\n.mute{ color:#000000; }\n.sparkline{ display:none; }\n.right{ float:right; }\n.left{ float:left; }\n.text-right{ text-align:right; }\n.text-left{ text-align:left; }\n.hidden{ display:none; }\n.warning{ background-color:#FFFCCC; font-weight:bold; margin-bottom:0.8em; padding:0.5em; }\n.error_box{ background-color:#FFEBE8; border:1px solid #DD3C10; font-weight:bold; padding:1em; }\nhr, .rule{ -moz-border-bottom-colors:none; -moz-border-left-colors:none; -moz-border-right-colors:none; -moz-border-top-colors:none; background:none repeat scroll 0% 0% transparent; border-color:-moz-use-text-color -moz-use-text-color #DDDDDD; border-image:none; border-style:none none solid; border-width:medium medium 1px; clear:both; height:0px; margin:15px 0px; overflow:hidden; }\narticle, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary{ display:block; }\naudio, canvas, video{ display:inline-block; }\naudio:not([controls]){ display:none; height:0px; }\nhtml{ font-family:sans-serif; }\na:focus{ outline:thin dotted; }\na:active, a:hover{ outline:0px none; }\nh1{ font-size:2em; margin:0.67em 0px; }\nabbr[title]{ border-bottom:1px dotted; }\nb, strong{ font-weight:bold; }\ndfn{ font-style:italic; }\nhr{ -moz-box-sizing:content-box; height:0px; }\nmark{ background:none repeat scroll 0% 0% #FFFF00; color:#000000; }\ncode, kbd, pre, samp{ font-family:monospace, serif; font-size:1em; }\nq{ quotes:\"“\" \"”\" \"‘\" \"’\"; }\nsmall{ font-size:80%; }\nsub, sup{ font-size:75%; line-height:0; position:relative; vertical-align:baseline; }\nsup{ top:-0.5em; }\nsub{ bottom:-0.25em; }\nimg{ border:0px none; }\nfigure{ margin:0px; }\nfieldset{ border:1px solid #C0C0C0; margin:0px 2px; padding:0.35em 0.625em 0.75em; }\nlegend{ border:0px none; padding:0px; }\nbutton, input, select, textarea{ font-family:inherit; font-size:100%; margin:0px; }\nbutton, input{ line-height:normal; }\nbutton, select{ text-transform:none; }\nbutton, html input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"]{ cursor:pointer; }\nbutton[disabled], html input[disabled]{ cursor:default; }\ninput[type=\"checkbox\"], input[type=\"radio\"]{ padding:0px; }\ninput[type=\"search\"]{ -moz-box-sizing:content-box; }\nbutton::-moz-focus-inner, input::-moz-focus-inner{ border:0px none; padding:0px; }\ntextarea{ overflow:auto; vertical-align:top; }\ntable{ border-collapse:collapse; border-spacing:0px; }\nh1, h2, h3, h4, h5, h6{ line-height:1.1; margin-bottom:15px; margin-top:15px; }\nh1{ font-size:30px; }\nh2{ font-size:21px; }\nh3{ font-size:16px; }\nh4{ font-size:14px; }\nh5{ font-size:12px; }\nh6{ font-size:11px; }\nsmall{ font-size:90%; }\nblockquote{ margin:0px; }\n.lead{ color:#555555; font-size:20px; font-weight:300; margin-bottom:30px; }\nul, ol{ margin-bottom:0px; margin-top:0px; padding:0px; }\ndd{ margin-left:0px; }\ncode, pre{ font-family:Consolas, \"Liberation Mono\", Courier, monospace; font-size:12px; }\npre{ margin-bottom:0px; margin-top:0px; }\na.absent{ color:#CC0000; }\na.anchor{ bottom:0px; cursor:pointer; display:block; left:0px; margin-left:-30px; padding-left:30px; position:absolute; top:0px; }\nh1, h2, h3, h4, h5, h6{ cursor:text; font-weight:bold; line-height:1.7; margin:1em 0px 15px; padding:0px; position:relative; }\nh1 .octicon-link, h2 .octicon-link, h3 .octicon-link, h4 .octicon-link, h5 .octicon-link, h6 .octicon-link{ color:#000000; display:none; }\nh1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor{ line-height:1; margin-left:-22px; padding-left:0px; text-decoration:none; top:15%; }\nh1:hover a.anchor .octicon-link, h2:hover a.anchor .octicon-link, h3:hover a.anchor .octicon-link, h4:hover a.anchor .octicon-link, h5:hover a.anchor .octicon-link, h6:hover a.anchor .octicon-link{ display:inline-block; }\nh1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, h5 tt, h5 code, h6 tt, h6 code{ font-size:inherit; }\nh1, h2, h3, h4, h5, h6{ cursor:text; font-weight:bold; line-height:1.7; }\nh1{ border-bottom:1px solid #DDDDDD; font-size:2.5em; }\nh2{ border-bottom:1px solid #EEEEEE; font-size:2em; }\nh3{ font-size:1.5em; }\nh4{ font-size:1.2em; }\nh5{ font-size:1em; }\nh6{ color:#777777; font-size:1em; }\np, blockquote, ul, ol, dl, table, pre{ margin:15px 0px; }\nhr{ background:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAYAAACtBE5DAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OENDRjNBN0E2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OENDRjNBN0I2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Q0NGM0E3ODY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Q0NGM0E3OTY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqqezsUAAAAfSURBVHjaYmRABcYwBiM2QSA4y4hNEKYDQxAEAAIMAHNGAzhkPOlYAAAAAElFTkSuQmCC\") repeat-x scroll 0px 0px transparent; border:0px none; color:#CCCCCC; height:4px; margin:15px 0px; padding:0px; }\nli p.first{ display:inline-block; }\nul, ol{ padding-left:30px; }\nul.no-list, ol.no-list{ list-style-type:none; padding:0px; }\nul ul, ul ol, ol ol, ol ul{ margin-bottom:0px; margin-top:0px; }\ndl{ padding:0px; }\ndl dt{ font-size:14px; font-style:italic; font-weight:bold; margin-top:15px; padding:0px; }\ndl dd{ margin-bottom:15px; padding:0px 15px; }\nblockquote{ border-left:4px solid #DDDDDD; color:#777777; padding:0px 15px; }\nblockquote > :first-child{ margin-top:0px; }\nblockquote > :last-child{ margin-bottom:0px; }\ntable{ display:block; overflow:auto; width:100%; }\ntable th{ font-weight:bold; }\ntable th, table td{ border:1px solid #DDDDDD; padding:6px 13px; }\ntable tr{ background-color:#FFFFFF; border-top:1px solid #CCCCCC; }\ntable tr:nth-child(2n){ background-color:#F8F8F8; }\nimg{ -moz-box-sizing:border-box; max-width:100%; }\nspan.frame{ display:block; overflow:hidden; }\nspan.frame > span{ border:1px solid #DDDDDD; display:block; float:left; margin:13px 0px 0px; overflow:hidden; padding:7px; width:auto; }\nspan.frame span img{ display:block; float:left; }\nspan.frame span span{ clear:both; color:#333333; display:block; padding:5px 0px 0px; }\nspan.align-center{ clear:both; display:block; overflow:hidden; }\nspan.align-center > span{ display:block; margin:13px auto 0px; overflow:hidden; text-align:center; }\nspan.align-center span img{ margin:0px auto; text-align:center; }\nspan.align-right{ clear:both; display:block; overflow:hidden; }\nspan.align-right > span{ display:block; margin:13px 0px 0px; overflow:hidden; text-align:right; }\nspan.align-right span img{ margin:0px; text-align:right; }\nspan.float-left{ display:block; float:left; margin-right:13px; overflow:hidden; }\nspan.float-left span{ margin:13px 0px 0px; }\nspan.float-right{ display:block; float:right; margin-left:13px; overflow:hidden; }\nspan.float-right > span{ display:block; margin:13px auto 0px; overflow:hidden; text-align:right; }\ncode, tt{ background-color:#F8F8F8; border-radius:3px 3px 3px 3px; border:1px solid #DDDDDD; margin:0px 2px; padding:0px 5px; }\ncode{ white-space:nowrap; }\npre > code{ background:none repeat scroll 0% 0% transparent; border:medium none; margin:0px; padding:0px; white-space:pre; }\npre{ width:700px;background-color:#F8F8F8; border-radius:3px 3px 3px 3px; border:1px solid #DDDDDD; font-size:13px; line-height:19px; overflow:auto; padding:6px 10px; }\npre code, pre tt{ background-color:transparent; border:medium none; margin:0px; padding:0px; }\ncode, pre{ font-family:Consolas, \"Liberation Mono\", Courier, monospace; font-size:13px; }\n</style>\n<script>\n/*\nhighlight.js\n\nCopyright (c) 2006, Ivan Sagalaev\nAll rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n    * Redistributions of source code must retain the above copyright\n      notice, this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above copyright\n      notice, this list of conditions and the following disclaimer in the\n      documentation and/or other materials provided with the distribution.\n    * Neither the name of highlight.js nor the names of its contributors \n      may be used to endorse or promote products derived from this software \n      without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY\nEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nvar hljs=new function(){function l(o){return o.replace(/&/gm,\"&amp;\").replace(/</gm,\"&lt;\").replace(/>/gm,\"&gt;\")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName==\"CODE\"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\\n/g,\"\"):q.nodeValue}if(q.nodeName==\"BR\"){return\"\\n\"}return h(q,o)}).join(\"\")}function a(q){var p=(q.className+\" \"+q.parentNode.className).split(/\\s+/);p=p.map(function(r){return r.replace(/^language-/,\"\")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]==\"no-highlight\"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName==\"BR\"){s+=1}else{if(t.nodeType==1){o.push({event:\"start\",offset:s,node:t});s=p(t,s);o.push({event:\"stop\",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y=\"\";var r=[];function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event==\"start\"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return\" \"+B.nodeName+'=\"'+l(B.value)+'\"'}return\"<\"+A.nodeName+Array.prototype.map.call(A.attributes,z).join(\"\")+\">\"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event==\"start\"){y+=s(u.node);r.push(u.node)}else{if(u.event==\"stop\"){var o,q=r.length;do{q--;o=r[q];y+=(\"</\"+o.nodeName.toLowerCase()+\">\")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(q){function o(s,r){return RegExp(s,\"m\"+(q.cI?\"i\":\"\")+(r?\"g\":\"\"))}function p(y,w){if(y.compiled){return}y.compiled=true;var s=[];if(y.k){var r={};function z(A,t){t.split(\" \").forEach(function(B){var C=B.split(\"|\");r[C[0]]=[A,C[1]?Number(C[1]):1];s.push(C[0])})}y.lR=o(y.l||hljs.IR,true);if(typeof y.k==\"string\"){z(\"keyword\",y.k)}else{for(var x in y.k){if(!y.k.hasOwnProperty(x)){continue}z(x,y.k[x])}}y.k=r}if(w){if(y.bWK){y.b=\"\\\\b(\"+s.join(\"|\")+\")\\\\s\"}y.bR=o(y.b?y.b:\"\\\\B|\\\\b\");if(!y.e&&!y.eW){y.e=\"\\\\B|\\\\b\"}if(y.e){y.eR=o(y.e)}y.tE=y.e||\"\";if(y.eW&&w.tE){y.tE+=(y.e?\"|\":\"\")+w.tE}}if(y.i){y.iR=o(y.i)}if(y.r===undefined){y.r=1}if(!y.c){y.c=[]}for(var v=0;v<y.c.length;v++){if(y.c[v]==\"self\"){y.c[v]=y}p(y.c[v],y)}if(y.starts){p(y.starts,w)}var u=[];for(var v=0;v<y.c.length;v++){u.push(y.c[v].b)}if(y.tE){u.push(y.tE)}if(y.i){u.push(y.i)}y.t=u.length?o(u.join(\"|\"),true):{exec:function(t){return null}}}p(q)}function d(D,E){function o(r,M){for(var L=0;L<M.c.length;L++){var K=M.c[L].bR.exec(r);if(K&&K.index==0){return M.c[L]}}}function s(K,r){if(K.e&&K.eR.test(r)){return K}if(K.eW){return s(K.parent,r)}}function t(r,K){return K.i&&K.iR.test(r)}function y(L,r){var K=F.cI?r[0].toLowerCase():r[0];return L.k.hasOwnProperty(K)&&L.k[K]}function G(){var K=l(w);if(!A.k){return K}var r=\"\";var N=0;A.lR.lastIndex=0;var L=A.lR.exec(K);while(L){r+=K.substr(N,L.index-N);var M=y(A,L);if(M){v+=M[1];r+='<span class=\"'+M[0]+'\">'+L[0]+\"</span>\"}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class=\"'+r.language+'\">'+r.value+\"</span>\"}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'<span class=\"'+L.cN+'\">':\"\";if(L.rB){x+=K;w=\"\"}else{if(L.eB){x+=l(r)+K;w=\"\"}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+=\"</span>\"}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w=\"\";if(M.starts){I(M.starts,\"\")}return M.rE?0:r.length}if(t(r,A)){throw\"Illegal\"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w=\"\";var B=0;var v=0;var x=\"\";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H==\"Illegal\"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\\t)+)/gm,function(r,v,u,t){return v.replace(/\\t/g,p)})}if(o){q=q.replace(/\\n/g,\"<br>\")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t==\"no-highlight\"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement(\"pre\");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match(\"(\\\\s|^)(language-)?\"+t+\"(\\\\s|$)\")){s=s?(s+\" \"+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName(\"pre\"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener(\"DOMContentLoaded\",n,false);window.addEventListener(\"load\",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR=\"[a-zA-Z][a-zA-Z0-9_]*\";this.UIR=\"[a-zA-Z_][a-zA-Z0-9_]*\";this.NR=\"\\\\b\\\\d+(\\\\.\\\\d+)?\";this.CNR=\"(\\\\b0[xX][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)([eE][-+]?\\\\d+)?)\";this.BNR=\"\\\\b(0b[01]+)\";this.RSR=\"!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|\\\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~\";this.BE={b:\"\\\\\\\\[\\\\s\\\\S]\",r:0};this.ASM={cN:\"string\",b:\"'\",e:\"'\",i:\"\\\\n\",c:[this.BE],r:0};this.QSM={cN:\"string\",b:'\"',e:'\"',i:\"\\\\n\",c:[this.BE],r:0};this.CLCM={cN:\"comment\",b:\"//\",e:\"$\"};this.CBLCLM={cN:\"comment\",b:\"/\\\\*\",e:\"\\\\*/\"};this.HCM={cN:\"comment\",b:\"#\",e:\"$\"};this.NM={cN:\"number\",b:this.NR,r:0};this.CNM={cN:\"number\",b:this.CNR,r:0};this.BNM={cN:\"number\",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.bash=function(a){var g=\"true false\";var e=\"if then else elif fi for break continue while in do done echo exit return set declare\";var c={cN:\"variable\",b:\"\\\\$[a-zA-Z0-9_#]+\"};var b={cN:\"variable\",b:\"\\\\${([^}]|\\\\\\\\})+}\"};var h={cN:\"string\",b:'\"',e:'\"',i:\"\\\\n\",c:[a.BE,c,b],r:0};var d={cN:\"string\",b:\"'\",e:\"'\",c:[{b:\"''\"}],r:0};var f={cN:\"test_condition\",b:\"\",e:\"\",c:[h,d,c,b],k:{literal:g},r:0};return{k:{keyword:e,literal:g},c:[{cN:\"shebang\",b:\"(#!\\\\/bin\\\\/bash)|(#!\\\\/bin\\\\/sh)\",r:10},c,b,a.HCM,h,d,a.inherit(f,{b:\"\\\\[ \",e:\" \\\\]\",r:0}),a.inherit(f,{b:\"\\\\[\\\\[ \",e:\" \\\\]\\\\]\"})]}}(hljs);hljs.LANGUAGES.cs=function(a){return{k:\"abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long namespace new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while ascending descending from get group into join let orderby partial select set value var where yield\",c:[{cN:\"comment\",b:\"///\",e:\"$\",rB:true,c:[{cN:\"xmlDocTag\",b:\"///|<!--|-->\"},{cN:\"xmlDocTag\",b:\"</?\",e:\">\"}]},a.CLCM,a.CBLCLM,{cN:\"preprocessor\",b:\"#\",e:\"$\",k:\"if else elif endif define undef warning error line region endregion pragma checksum\"},{cN:\"string\",b:'@\"',e:'\"',c:[{b:'\"\"'}]},a.ASM,a.QSM,a.CNM]}}(hljs);hljs.LANGUAGES.ruby=function(e){var a=\"[a-zA-Z_][a-zA-Z0-9_]*(\\\\!|\\\\?)?\";var j=\"[a-zA-Z_]\\\\w*[!?=]?|[-+~]\\\\@|<<|>>|=~|===?|<=>|[<>]=?|\\\\*\\\\*|[-/+%^&*~`|]|\\\\[\\\\]=?\";var g={keyword:\"and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include\"};var c={cN:\"yardoctag\",b:\"@[A-Za-z]+\"};var k=[{cN:\"comment\",b:\"#\",e:\"$\",c:[c]},{cN:\"comment\",b:\"^\\\\=begin\",e:\"^\\\\=end\",c:[c],r:10},{cN:\"comment\",b:\"^__END__\",e:\"\\\\n$\"}];var d={cN:\"subst\",b:\"#\\\\{\",e:\"}\",l:a,k:g};var i=[e.BE,d];var b=[{cN:\"string\",b:\"'\",e:\"'\",c:i,r:0},{cN:\"string\",b:'\"',e:'\"',c:i,r:0},{cN:\"string\",b:\"%[qw]?\\\\(\",e:\"\\\\)\",c:i},{cN:\"string\",b:\"%[qw]?\\\\[\",e:\"\\\\]\",c:i},{cN:\"string\",b:\"%[qw]?{\",e:\"}\",c:i},{cN:\"string\",b:\"%[qw]?<\",e:\">\",c:i,r:10},{cN:\"string\",b:\"%[qw]?/\",e:\"/\",c:i,r:10},{cN:\"string\",b:\"%[qw]?%\",e:\"%\",c:i,r:10},{cN:\"string\",b:\"%[qw]?-\",e:\"-\",c:i,r:10},{cN:\"string\",b:\"%[qw]?\\\\|\",e:\"\\\\|\",c:i,r:10}];var h={cN:\"function\",bWK:true,e:\" |$|;\",k:\"def\",c:[{cN:\"title\",b:j,l:a,k:g},{cN:\"params\",b:\"\\\\(\",e:\"\\\\)\",l:a,k:g}].concat(k)};var f=k.concat(b.concat([{cN:\"class\",bWK:true,e:\"$|;\",k:\"class module\",c:[{cN:\"title\",b:\"[A-Za-z_]\\\\w*(::\\\\w+)*(\\\\?|\\\\!)?\",r:0},{cN:\"inheritance\",b:\"<\\\\s*\",c:[{cN:\"parent\",b:\"(\"+e.IR+\"::)?\"+e.IR}]}].concat(k)},h,{cN:\"constant\",b:\"(::)?(\\\\b[A-Z]\\\\w*(::)?)+\",r:0},{cN:\"symbol\",b:\":\",c:b.concat([{b:j}]),r:0},{cN:\"symbol\",b:a+\":\",r:0},{cN:\"number\",b:\"(\\\\b0[0-7_]+)|(\\\\b0x[0-9a-fA-F_]+)|(\\\\b[1-9][0-9_]*(\\\\.[0-9_]+)?)|[0_]\\\\b\",r:0},{cN:\"number\",b:\"\\\\?\\\\w\"},{cN:\"variable\",b:\"(\\\\$\\\\W)|((\\\\$|\\\\@\\\\@?)(\\\\w+))\"},{b:\"(\"+e.RSR+\")\\\\s*\",c:k.concat([{cN:\"regexp\",b:\"/\",e:\"/[a-z]*\",i:\"\\\\n\",c:[e.BE,d]}]),r:0}]));d.c=f;h.c[1].c=f;return{l:a,k:g,c:f}}(hljs);hljs.LANGUAGES.diff=function(a){return{c:[{cN:\"chunk\",b:\"^\\\\@\\\\@ +\\\\-\\\\d+,\\\\d+ +\\\\+\\\\d+,\\\\d+ +\\\\@\\\\@$\",r:10},{cN:\"chunk\",b:\"^\\\\*\\\\*\\\\* +\\\\d+,\\\\d+ +\\\\*\\\\*\\\\*\\\\*$\",r:10},{cN:\"chunk\",b:\"^\\\\-\\\\-\\\\- +\\\\d+,\\\\d+ +\\\\-\\\\-\\\\-\\\\-$\",r:10},{cN:\"header\",b:\"Index: \",e:\"$\"},{cN:\"header\",b:\"=====\",e:\"=====$\"},{cN:\"header\",b:\"^\\\\-\\\\-\\\\-\",e:\"$\"},{cN:\"header\",b:\"^\\\\*{3} \",e:\"$\"},{cN:\"header\",b:\"^\\\\+\\\\+\\\\+\",e:\"$\"},{cN:\"header\",b:\"\\\\*{5}\",e:\"\\\\*{5}$\"},{cN:\"addition\",b:\"^\\\\+\",e:\"$\"},{cN:\"deletion\",b:\"^\\\\-\",e:\"$\"},{cN:\"change\",b:\"^\\\\!\",e:\"$\"}]}}(hljs);hljs.LANGUAGES.javascript=function(a){return{k:{keyword:\"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const\",literal:\"true false null undefined NaN Infinity\"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:\"(\"+a.RSR+\"|\\\\b(case|return|throw)\\\\b)\\\\s*\",k:\"return throw case\",c:[a.CLCM,a.CBLCLM,{cN:\"regexp\",b:\"/\",e:\"/[gim]*\",i:\"\\\\n\",c:[{b:\"\\\\\\\\/\"}]},{b:\"<\",e:\">;\",sL:\"xml\"}],r:0},{cN:\"function\",bWK:true,e:\"{\",k:\"function\",c:[{cN:\"title\",b:\"[A-Za-z$_][0-9A-Za-z$_]*\"},{cN:\"params\",b:\"\\\\(\",e:\"\\\\)\",c:[a.CLCM,a.CBLCLM],i:\"[\\\"'\\\\(]\"}],i:\"\\\\[|%\"}]}}(hljs);hljs.LANGUAGES.lua=function(b){var a=\"\\\\[=*\\\\[\";var e=\"\\\\]=*\\\\]\";var c={b:a,e:e,c:[\"self\"]};var d=[{cN:\"comment\",b:\"--(?!\"+a+\")\",e:\"$\"},{cN:\"comment\",b:\"--\"+a,e:e,c:[c],r:10}];return{l:b.UIR,k:{keyword:\"and break do else elseif end false for if in local nil not or repeat return then true until while\",built_in:\"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table\"},c:d.concat([{cN:\"function\",bWK:true,e:\"\\\\)\",k:\"function\",c:[{cN:\"title\",b:\"([_a-zA-Z]\\\\w*\\\\.)*([_a-zA-Z]\\\\w*:)?[_a-zA-Z]\\\\w*\"},{cN:\"params\",b:\"\\\\(\",eW:true,c:d}].concat(d)},b.CNM,b.ASM,b.QSM,{cN:\"string\",b:a,e:e,c:[c],r:10}])}}(hljs);hljs.LANGUAGES.css=function(a){var b={cN:\"function\",b:a.IR+\"\\\\(\",e:\"\\\\)\",c:[a.NM,a.ASM,a.QSM]};return{cI:true,i:\"[=/|']\",c:[a.CBLCLM,{cN:\"id\",b:\"\\\\#[A-Za-z0-9_-]+\"},{cN:\"class\",b:\"\\\\.[A-Za-z0-9_-]+\",r:0},{cN:\"attr_selector\",b:\"\\\\[\",e:\"\\\\]\",i:\"$\"},{cN:\"pseudo\",b:\":(:)?[a-zA-Z0-9\\\\_\\\\-\\\\+\\\\(\\\\)\\\\\\\"\\\\']+\"},{cN:\"at_rule\",b:\"@(font-face|page)\",l:\"[a-z-]+\",k:\"font-face page\"},{cN:\"at_rule\",b:\"@\",e:\"[{;]\",eE:true,k:\"import page media charset\",c:[b,a.ASM,a.QSM,a.NM]},{cN:\"tag\",b:a.IR,r:0},{cN:\"rules\",b:\"{\",e:\"}\",i:\"[^\\\\s]\",r:0,c:[a.CBLCLM,{cN:\"rule\",b:\"[^\\\\s]\",rB:true,e:\";\",eW:true,c:[{cN:\"attribute\",b:\"[A-Z\\\\_\\\\.\\\\-]+\",e:\":\",eE:true,i:\"[^\\\\s]\",starts:{cN:\"value\",eW:true,eE:true,c:[b,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:\"hexcolor\",b:\"\\\\#[0-9A-F]+\"},{cN:\"important\",b:\"!important\"}]}}]}]}]}}(hljs);hljs.LANGUAGES.xml=function(a){var c=\"[A-Za-z0-9\\\\._:-]+\";var b={eW:true,c:[{cN:\"attribute\",b:c,r:0},{b:'=\"',rB:true,e:'\"',c:[{cN:\"value\",b:'\"',eW:true}]},{b:\"='\",rB:true,e:\"'\",c:[{cN:\"value\",b:\"'\",eW:true}]},{b:\"=\",c:[{cN:\"value\",b:\"[^\\\\s/>]+\"}]}]};return{cI:true,c:[{cN:\"pi\",b:\"<\\\\?\",e:\"\\\\?>\",r:10},{cN:\"doctype\",b:\"<!DOCTYPE\",e:\">\",r:10,c:[{b:\"\\\\[\",e:\"\\\\]\"}]},{cN:\"comment\",b:\"<!--\",e:\"-->\",r:10},{cN:\"cdata\",b:\"<\\\\!\\\\[CDATA\\\\[\",e:\"\\\\]\\\\]>\",r:10},{cN:\"tag\",b:\"<style(?=\\\\s|>|$)\",e:\">\",k:{title:\"style\"},c:[b],starts:{e:\"</style>\",rE:true,sL:\"css\"}},{cN:\"tag\",b:\"<script(?=\\\\s|>|$)\",e:\">\",k:{title:\"script\"},c:[b],starts:{e:\"<\\/script>\",rE:true,sL:\"javascript\"}},{b:\"<%\",e:\"%>\",sL:\"vbscript\"},{cN:\"tag\",b:\"</?\",e:\"/?>\",c:[{cN:\"title\",b:\"[^ />]+\"},b]}]}}(hljs);hljs.LANGUAGES.http=function(a){return{i:\"\\\\S\",c:[{cN:\"status\",b:\"^HTTP/[0-9\\\\.]+\",e:\"$\",c:[{cN:\"number\",b:\"\\\\b\\\\d{3}\\\\b\"}]},{cN:\"request\",b:\"^[A-Z]+ (.*?) HTTP/[0-9\\\\.]+$\",rB:true,e:\"$\",c:[{cN:\"string\",b:\" \",e:\" \",eB:true,eE:true}]},{cN:\"attribute\",b:\"^\\\\w\",e:\": \",eE:true,i:\"\\\\n|\\\\s|=\",starts:{cN:\"string\",e:\"$\"}},{b:\"\\\\n\\\\n\",starts:{sL:\"\",eW:true}}]}}(hljs);hljs.LANGUAGES.java=function(a){return{k:\"false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws\",c:[{cN:\"javadoc\",b:\"/\\\\*\\\\*\",e:\"\\\\*/\",c:[{cN:\"javadoctag\",b:\"@[A-Za-z]+\"}],r:10},a.CLCM,a.CBLCLM,a.ASM,a.QSM,{cN:\"class\",bWK:true,e:\"{\",k:\"class interface\",i:\":\",c:[{bWK:true,k:\"extends implements\",r:10},{cN:\"title\",b:a.UIR}]},a.CNM,{cN:\"annotation\",b:\"@[A-Za-z]+\"}]}}(hljs);hljs.LANGUAGES.php=function(a){var e={cN:\"variable\",b:\"\\\\$+[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*\"};var b=[a.inherit(a.ASM,{i:null}),a.inherit(a.QSM,{i:null}),{cN:\"string\",b:'b\"',e:'\"',c:[a.BE]},{cN:\"string\",b:\"b'\",e:\"'\",c:[a.BE]}];var c=[a.BNM,a.CNM];var d={cN:\"title\",b:a.UIR};return{cI:true,k:\"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return implements parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception php_user_filter default die require __FUNCTION__ enddeclare final try this switch continue endfor endif declare unset true false namespace trait goto instanceof insteadof __DIR__ __NAMESPACE__ __halt_compiler\",c:[a.CLCM,a.HCM,{cN:\"comment\",b:\"/\\\\*\",e:\"\\\\*/\",c:[{cN:\"phpdoc\",b:\"\\\\s@[A-Za-z]+\"}]},{cN:\"comment\",eB:true,b:\"__halt_compiler.+?;\",eW:true},{cN:\"string\",b:\"<<<['\\\"]?\\\\w+['\\\"]?$\",e:\"^\\\\w+;\",c:[a.BE]},{cN:\"preprocessor\",b:\"<\\\\?php\",r:10},{cN:\"preprocessor\",b:\"\\\\?>\"},e,{cN:\"function\",bWK:true,e:\"{\",k:\"function\",i:\"\\\\$|\\\\[|%\",c:[d,{cN:\"params\",b:\"\\\\(\",e:\"\\\\)\",c:[\"self\",e,a.CBLCLM].concat(b).concat(c)}]},{cN:\"class\",bWK:true,e:\"{\",k:\"class\",i:\"[:\\\\(\\\\$]\",c:[{bWK:true,eW:true,k:\"extends\",c:[d]},d]},{b:\"=>\"}].concat(b).concat(c)}}(hljs);hljs.LANGUAGES.python=function(a){var f={cN:\"prompt\",b:\"^(>>>|\\\\.\\\\.\\\\.) \"};var c=[{cN:\"string\",b:\"(u|b)?r?'''\",e:\"'''\",c:[f],r:10},{cN:\"string\",b:'(u|b)?r?\"\"\"',e:'\"\"\"',c:[f],r:10},{cN:\"string\",b:\"(u|r|ur)'\",e:\"'\",c:[a.BE],r:10},{cN:\"string\",b:'(u|r|ur)\"',e:'\"',c:[a.BE],r:10},{cN:\"string\",b:\"(b|br)'\",e:\"'\",c:[a.BE]},{cN:\"string\",b:'(b|br)\"',e:'\"',c:[a.BE]}].concat([a.ASM,a.QSM]);var e={cN:\"title\",b:a.UIR};var d={cN:\"params\",b:\"\\\\(\",e:\"\\\\)\",c:[\"self\",a.CNM,f].concat(c)};var b={bWK:true,e:\":\",i:\"[${=;\\\\n]\",c:[e,d],r:10};return{k:{keyword:\"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10\",built_in:\"None True False Ellipsis NotImplemented\"},i:\"(</|->|\\\\?)\",c:c.concat([f,a.HCM,a.inherit(b,{cN:\"function\",k:\"def\"}),a.inherit(b,{cN:\"class\",k:\"class\"}),a.CNM,{cN:\"decorator\",b:\"@\",e:\"$\"},{b:\"\\\\b(print|exec)\\\\(\"}])}}(hljs);hljs.LANGUAGES.sql=function(a){return{cI:true,c:[{cN:\"operator\",b:\"(begin|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant)\\\\b(?!:)\",e:\";\",eW:true,k:{keyword:\"all partial global month current_timestamp using go revoke smallint indicator end-exec disconnect zone with character assertion to add current_user usage input local alter match collate real then rollback get read timestamp session_user not integer bit unique day minute desc insert execute like ilike|2 level decimal drop continue isolation found where constraints domain right national some module transaction relative second connect escape close system_user for deferred section cast current sqlstate allocate intersect deallocate numeric public preserve full goto initially asc no key output collation group by union session both last language constraint column of space foreign deferrable prior connection unknown action commit view or first into float year primary cascaded except restrict set references names table outer open select size are rows from prepare distinct leading create only next inner authorization schema corresponding option declare precision immediate else timezone_minute external varying translation true case exception join hour default double scroll value cursor descriptor values dec fetch procedure delete and false int is describe char as at in varchar null trailing any absolute current_time end grant privileges when cross check write current_date pad begin temporary exec time update catalog user sql date on identity timezone_hour natural whenever interval work order cascade diagnostics nchar having left call do handler load replace truncate start lock show pragma exists number\",aggregate:\"count sum min max avg\"},c:[{cN:\"string\",b:\"'\",e:\"'\",c:[a.BE,{b:\"''\"}],r:0},{cN:\"string\",b:'\"',e:'\"',c:[a.BE,{b:'\"\"'}],r:0},{cN:\"string\",b:\"`\",e:\"`\",c:[a.BE]},a.CNM]},a.CBLCLM,{cN:\"comment\",b:\"--\",e:\"$\"}]}}(hljs);hljs.LANGUAGES.ini=function(a){return{cI:true,i:\"[^\\\\s]\",c:[{cN:\"comment\",b:\";\",e:\"$\"},{cN:\"title\",b:\"^\\\\[\",e:\"\\\\]\"},{cN:\"setting\",b:\"^[a-z0-9\\\\[\\\\]_-]+[ \\\\t]*=[ \\\\t]*\",e:\"$\",c:[{cN:\"value\",eW:true,k:\"on off true false yes no\",c:[a.QSM,a.NM]}]}]}}(hljs);hljs.LANGUAGES.perl=function(e){var a=\"getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when\";var d={cN:\"subst\",b:\"[$@]\\\\{\",e:\"\\\\}\",k:a,r:10};var b={cN:\"variable\",b:\"\\\\$\\\\d\"};var i={cN:\"variable\",b:\"[\\\\$\\\\%\\\\@\\\\*](\\\\^\\\\w\\\\b|#\\\\w+(\\\\:\\\\:\\\\w+)*|[^\\\\s\\\\w{]|{\\\\w+}|\\\\w+(\\\\:\\\\:\\\\w*)*)\"};var f=[e.BE,d,b,i];var h={b:\"->\",c:[{b:e.IR},{b:\"{\",e:\"}\"}]};var g={cN:\"comment\",b:\"^(__END__|__DATA__)\",e:\"\\\\n$\",r:5};var c=[b,i,e.HCM,g,{cN:\"comment\",b:\"^\\\\=\\\\w\",e:\"\\\\=cut\",eW:true},h,{cN:\"string\",b:\"q[qwxr]?\\\\s*\\\\(\",e:\"\\\\)\",c:f,r:5},{cN:\"string\",b:\"q[qwxr]?\\\\s*\\\\[\",e:\"\\\\]\",c:f,r:5},{cN:\"string\",b:\"q[qwxr]?\\\\s*\\\\{\",e:\"\\\\}\",c:f,r:5},{cN:\"string\",b:\"q[qwxr]?\\\\s*\\\\|\",e:\"\\\\|\",c:f,r:5},{cN:\"string\",b:\"q[qwxr]?\\\\s*\\\\<\",e:\"\\\\>\",c:f,r:5},{cN:\"string\",b:\"qw\\\\s+q\",e:\"q\",c:f,r:5},{cN:\"string\",b:\"'\",e:\"'\",c:[e.BE],r:0},{cN:\"string\",b:'\"',e:'\"',c:f,r:0},{cN:\"string\",b:\"`\",e:\"`\",c:[e.BE]},{cN:\"string\",b:\"{\\\\w+}\",r:0},{cN:\"string\",b:\"-?\\\\w+\\\\s*\\\\=\\\\>\",r:0},{cN:\"number\",b:\"(\\\\b0[0-7_]+)|(\\\\b0x[0-9a-fA-F_]+)|(\\\\b[1-9][0-9_]*(\\\\.[0-9_]+)?)|[0_]\\\\b\",r:0},{b:\"(\"+e.RSR+\"|\\\\b(split|return|print|reverse|grep)\\\\b)\\\\s*\",k:\"split return print reverse grep\",r:0,c:[e.HCM,g,{cN:\"regexp\",b:\"(s|tr|y)/(\\\\\\\\.|[^/])*/(\\\\\\\\.|[^/])*/[a-z]*\",r:10},{cN:\"regexp\",b:\"(m|qr)?/\",e:\"/[a-z]*\",c:[e.BE],r:0}]},{cN:\"sub\",bWK:true,e:\"(\\\\s*\\\\(.*?\\\\))?[;{]\",k:\"sub\",r:5},{cN:\"operator\",b:\"-\\\\w\\\\b\",r:0}];d.c=c;h.c[1].c=c;return{k:a,c:c}}(hljs);hljs.LANGUAGES.nginx=function(b){var c=[{cN:\"variable\",b:\"\\\\$\\\\d+\"},{cN:\"variable\",b:\"\\\\${\",e:\"}\"},{cN:\"variable\",b:\"[\\\\$\\\\@]\"+b.UIR}];var a={eW:true,l:\"[a-z/_]+\",k:{built_in:\"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll\"},r:0,i:\"=>\",c:[b.HCM,{cN:\"string\",b:'\"',e:'\"',c:[b.BE].concat(c),r:0},{cN:\"string\",b:\"'\",e:\"'\",c:[b.BE].concat(c),r:0},{cN:\"url\",b:\"([a-z]+):/\",e:\"\\\\s\",eW:true,eE:true},{cN:\"regexp\",b:\"\\\\s\\\\^\",e:\"\\\\s|{|;\",rE:true,c:[b.BE].concat(c)},{cN:\"regexp\",b:\"~\\\\*?\\\\s+\",e:\"\\\\s|{|;\",rE:true,c:[b.BE].concat(c)},{cN:\"regexp\",b:\"\\\\*(\\\\.[a-z\\\\-]+)+\",c:[b.BE].concat(c)},{cN:\"regexp\",b:\"([a-z\\\\-]+\\\\.)+\\\\*\",c:[b.BE].concat(c)},{cN:\"number\",b:\"\\\\b\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}(:\\\\d{1,5})?\\\\b\"},{cN:\"number\",b:\"\\\\b\\\\d+[kKmMgGdshdwy]*\\\\b\",r:0}].concat(c)};return{c:[b.HCM,{b:b.UIR+\"\\\\s\",e:\";|{\",rB:true,c:[{cN:\"title\",b:b.UIR,starts:a}]}],i:\"[^\\\\s\\\\}]\"}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:\"true false null\"};var d=[a.QSM,a.CNM];var c={cN:\"value\",e:\",\",eW:true,eE:true,c:d,k:e};var b={b:\"{\",e:\"}\",c:[{cN:\"attribute\",b:'\\\\s*\"',e:'\"\\\\s*:\\\\s*',eB:true,eE:true,c:[a.BE],i:\"\\\\n\",starts:c}],i:\"\\\\S\"};var f={b:\"\\\\[\",e:\"\\\\]\",c:[a.inherit(c,{cN:null})],i:\"\\\\S\"};d.splice(d.length,0,b,f);return{c:d,k:e,i:\"\\\\S\"}}(hljs);hljs.LANGUAGES.cpp=function(a){var b={keyword:\"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long throw volatile static protected bool template mutable if public friend do return goto auto void enum else break new extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex\",built_in:\"std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr\"};return{k:b,i:\"</\",c:[a.CLCM,a.CBLCLM,a.QSM,{cN:\"string\",b:\"'\\\\\\\\?.\",e:\"'\",i:\".\"},{cN:\"number\",b:\"\\\\b(\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)(u|U|l|L|ul|UL|f|F)\"},a.CNM,{cN:\"preprocessor\",b:\"#\",e:\"$\"},{cN:\"stl_container\",b:\"\\\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\\\s*<\",e:\">\",k:b,r:10,c:[\"self\"]}]}}(hljs);hljs.LANGUAGES.go=function(a){var b={keyword:\"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer\",constant:\"true false iota nil\",typename:\"bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune\",built_in:\"append cap close complex copy imag len make new panic print println real recover delete\"};return{k:b,i:\"</\",c:[a.CLCM,a.CBLCLM,a.QSM,{cN:\"string\",b:\"'\",e:\"[^\\\\\\\\]'\",r:0},{cN:\"string\",b:\"`\",e:\"`\"},{cN:\"number\",b:\"[^a-zA-Z_0-9](\\\\-|\\\\+)?\\\\d+(\\\\.\\\\d+|\\\\/\\\\d+)?((d|e|f|l|s)(\\\\+|\\\\-)?\\\\d+)?\",r:0},a.CNM]}}(hljs);\nhljs.initHighlightingOnLoad();\n</script>\n<style>\n/*\nhighlight.js / github.css\n\ngithub.com style (c) Vasily Polovnyov <vast@whiteants.net>\n\n*/\npre code {\n  color: #333;\n}\n\npre .comment,\npre .template_comment,\npre .diff .header,\npre .javadoc {\n  color: #998;\n  font-style: italic\n}\n\npre .keyword,\npre .css .rule .keyword,\npre .winutils,\npre .javascript .title,\npre .nginx .title,\npre .subst,\npre .request,\npre .status {\n  color: #333;\n  font-weight: bold\n}\n\npre .number,\npre .hexcolor,\npre .ruby .constant {\n  color: #099;\n}\n\npre .string,\npre .tag .value,\npre .phpdoc,\npre .tex .formula {\n  color: #d14\n}\n\npre .title,\npre .id,\npre .coffeescript .params,\npre .scss .preprocessor {\n  color: #900;\n  font-weight: bold\n}\n\npre .javascript .title,\npre .lisp .title,\npre .clojure .title,\npre .subst {\n  font-weight: normal\n}\n\npre .class .title,\npre .haskell .type,\npre .vhdl .literal,\npre .tex .command {\n  color: #458;\n  font-weight: bold\n}\n\npre .tag,\npre .tag .title,\npre .rules .property,\npre .django .tag .keyword {\n  color: #000080;\n  font-weight: normal\n}\n\npre .attribute,\npre .variable,\npre .lisp .body {\n  color: #008080\n}\n\npre .regexp {\n  color: #009926\n}\n\npre .class {\n  color: #458;\n  font-weight: bold\n}\n\npre .symbol,\npre .ruby .symbol .string,\npre .lisp .keyword,\npre .tex .special,\npre .prompt {\n  color: #990073\n}\n\npre .built_in,\npre .lisp .title,\npre .clojure .built_in {\n  color: #0086b3\n}\n\npre .preprocessor,\npre .pi,\npre .doctype,\npre .shebang,\npre .cdata {\n  color: #999;\n  font-weight: bold\n}\n\npre .deletion {\n  background: #fdd\n}\n\npre .addition {\n  background: #dfd\n}\n\npre .diff .change {\n  background: #0086b3\n}\n\npre .chunk {\n  color: #aaa\n}\n\npre .typename {\n  color: #445588;\n  font-weight: bold;\n}\n"
  },
  {
    "path": "liteidex/deploy/packages/markdown/css/GitHub_Word.css",
    "content": "body {\n  counter-reset: heading2;\n  counter-reset: heading3;\n  counter-reset: heading4;\n  counter-reset: heading5;\n  counter-reset: heading6;\n\n  font-family: Helvetica, arial, sans-serif;\n  font-size: 16px;\n  line-height: 1.6;\n  padding-top: 10px;\n  padding-bottom: 10px;\n  background-color: white;\n  color: black;\n  padding: 30px; }\n\nbody > *:first-child {\n  margin-top: 0 !important; }\nbody > *:last-child {\n  margin-bottom: 0 !important; }\n\na {\n  color: #4183C4; }\na.absent {\n  color: #cc0000; }\na.anchor {\n  display: block;\n  padding-left: 30px;\n  margin-left: -30px;\n  cursor: pointer;\n  position: absolute;\n  top: 0;\n  left: 0;\n  bottom: 0; }\n\nh1, h2, h3, h4, h5, h6 {\n  margin: 20px 0 10px;\n  padding: 0;\n  font-weight: bold;\n  -webkit-font-smoothing: antialiased;\n  cursor: text;\n  position: relative; }\n\nh1 {\n  text-align: center; }\n\nh1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {\n  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA09pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoMTMuMCAyMDEyMDMwNS5tLjQxNSAyMDEyLzAzLzA1OjIxOjAwOjAwKSAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUM2NjlDQjI4ODBGMTFFMTg1ODlEODNERDJBRjUwQTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUM2NjlDQjM4ODBGMTFFMTg1ODlEODNERDJBRjUwQTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QzY2OUNCMDg4MEYxMUUxODU4OUQ4M0REMkFGNTBBNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QzY2OUNCMTg4MEYxMUUxODU4OUQ4M0REMkFGNTBBNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsQhXeAAAABfSURBVHjaYvz//z8DJYCRUgMYQAbAMBQIAvEqkBQWXI6sHqwHiwG70TTBxGaiWwjCTGgOUgJiF1J8wMRAIUA34B4Q76HUBelAfJYSA0CuMIEaRP8wGIkGMA54bgQIMACAmkXJi0hKJQAAAABJRU5ErkJggg==) no-repeat 10px center;\n  text-decoration: none; }\n\nh1 tt, h1 code {\n  font-size: inherit; }\n\nh2 tt, h2 code {\n  font-size: inherit; }\n\nh3 tt, h3 code {\n  font-size: inherit; }\n\nh4 tt, h4 code {\n  font-size: inherit; }\n\nh5 tt, h5 code {\n  font-size: inherit; }\n\nh6 tt, h6 code {\n  font-size: inherit; }\n\nh1 {\n  font-size: 28px;\n  counter-reset: heading2 heading3 heading4 heading5 heading6;\n  color: black; }\n\nh2 {\n  font-size: 24px;\n  border-bottom: 1px solid #cccccc;\n  color: black;\n  counter-reset: heading3 heading4 heading5 heading6;\n  counter-increment: heading2; }\n\nh3 {\n  font-size: 18px;\n  counter-reset: heading4 heading5 heading6;\n  counter-increment: heading3; }\n\nh4 {\n  font-size: 16px;\n  counter-reset: heading5 heading6;\n  counter-increment: heading4; }\n\nh5 {\n  font-size: 14px;\n  counter-reset: heading6;\n  counter-increment: heading5; }\n\nh6 {\n  color: #777777;\n  font-size: 14px;\n  counter-increment: heading6; }\n\nh2:before {\n  content: \"\" counter(heading2) \"  \";\n}\n\nh3:before {\n  content: \"\" counter(heading2) \".\" counter(heading3) \"  \";\n}\n\nh4:before {\n  content: \"\" counter(heading2) \".\" counter(heading3) \".\" counter(heading4) \"  \";\n}\n\nh5:before {\n  content: \"\" counter(heading2) \".\" counter(heading3) \".\" counter(heading4) \".\" counter(heading5) \"  \";\n}\n\nh6:before {\n  content: \" (\"  counter(heading6) \") \";\n}\n\np, blockquote, ul, ol, dl, li, table, pre {\n  font-family: SimSun, Helvetica, arial, sans-serif;\n  margin: 15px 0; }\n\nbody > p {  text-indent:2em  }\n\nhr {\n  background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAYAAACtBE5DAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OENDRjNBN0E2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OENDRjNBN0I2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Q0NGM0E3ODY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Q0NGM0E3OTY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqqezsUAAAAfSURBVHjaYmRABcYwBiM2QSA4y4hNEKYDQxAEAAIMAHNGAzhkPOlYAAAAAElFTkSuQmCC) repeat-x 0 0;\n  border: 0 none;\n  color: #cccccc;\n  height: 4px;\n  padding: 0;\n}\n\nbody > h2:first-child {\n  margin-top: 0;\n  padding-top: 0; }\nbody > h1:first-child {\n  margin-top: 0;\n  padding-top: 0; }\n  body > h1:first-child + h2 {\n    margin-top: 0;\n    padding-top: 0; }\nbody > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child {\n  margin-top: 0;\n  padding-top: 0; }\n\na:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {\n  margin-top: 0;\n  padding-top: 0; }\n\nh1 p, h2 p, h3 p, h4 p, h5 p, h6 p {\n  margin-top: 0; }\n\nli p.first {\n  display: inline-block; }\nli {\n  margin: 0; }\nul, ol {\n  padding-left: 30px; }\n\nul :first-child, ol :first-child {\n  margin-top: 0; }\n\ndl {\n  padding: 0; }\n  dl dt {\n    font-size: 14px;\n    font-weight: bold;\n    font-style: italic;\n    padding: 0;\n    margin: 15px 0 5px; }\n    dl dt:first-child {\n      padding: 0; }\n    dl dt > :first-child {\n      margin-top: 0; }\n    dl dt > :last-child {\n      margin-bottom: 0; }\n  dl dd {\n    margin: 0 0 15px;\n    padding: 0 15px; }\n    dl dd > :first-child {\n      margin-top: 0; }\n    dl dd > :last-child {\n      margin-bottom: 0; }\n\nblockquote {\n  border-left: 4px solid #dddddd;\n  padding: 0 15px;\n  color: #777777; }\n  blockquote > :first-child {\n    margin-top: 0; }\n  blockquote > :last-child {\n    margin-bottom: 0; }\n\ntable {\n  padding: 0;border-collapse: collapse;table-layout: fixed; }\n  table tr {\n    border-top: 1px solid #cccccc;\n    background-color: white;\n    margin: 0;\n    padding: 0; }\n    table tr:nth-child(2n) {\n      background-color: #f8f8f8; }\n    table tr th {\n      font-weight: bold;\n      border: 1px solid #cccccc;\n      text-align: left;\n      margin: 0;\n      padding: 6px 13px; }\n    table tr td {\n      border: 1px solid #cccccc;\n      text-align: left;\n      margin: 0;\n      padding: 6px 13px; }\n    table tr th :first-child, table tr td :first-child {\n      margin-top: 0; }\n    table tr th :last-child, table tr td :last-child {\n      margin-bottom: 0; }\n      table td{word-break: break-all; word-wrap:break-word;}\n\nimg {\n  vertical-align: middle;\n  max-width: 100%;\n  margin-left: -32; }\n\nspan.frame {\n  display: block;\n  overflow: hidden; }\n  span.frame > span {\n    border: 1px solid #dddddd;\n    display: block;\n    float: left;\n    overflow: hidden;\n    margin: 13px 0 0;\n    padding: 7px;\n    width: auto; }\n  span.frame span img {\n    display: block;\n    float: left; }\n  span.frame span span {\n    clear: both;\n    color: #333333;\n    display: block;\n    padding: 5px 0 0; }\nspan.align-center {\n  display: block;\n  overflow: hidden;\n  clear: both; }\n  span.align-center > span {\n    display: block;\n    overflow: hidden;\n    margin: 13px auto 0;\n    text-align: center; }\n  span.align-center span img {\n    margin: 0 auto;\n    text-align: center; }\nspan.align-right {\n  display: block;\n  overflow: hidden;\n  clear: both; }\n  span.align-right > span {\n    display: block;\n    overflow: hidden;\n    margin: 13px 0 0;\n    text-align: right; }\n  span.align-right span img {\n    margin: 0;\n    text-align: right; }\nspan.float-left {\n  display: block;\n  margin-right: 13px;\n  overflow: hidden;\n  float: left; }\n  span.float-left span {\n    margin: 13px 0 0; }\nspan.float-right {\n  display: block;\n  margin-left: 13px;\n  overflow: hidden;\n  float: right; }\n  span.float-right > span {\n    display: block;\n    overflow: hidden;\n    margin: 13px auto 0;\n    text-align: right; }\n\ncode, tt {\n  margin: 0 2px;\n  padding: 0 5px;\n  white-space: nowrap;\n  border: 1px solid #eaeaea;\n  background-color: #f8f818;\n  border-radius: 3px; }\n\npre code {\n  margin: 0;\n  padding: 0;\n  white-space: pre;\n  border: none;\n  background: transparent; }\n\n.highlight pre {\n  background-color: #f8f8f8;\n  border: 1px solid #cccccc;\n  font-size: 13px;\n  line-height: 19px;\n  overflow: auto;\n  padding: 6px 10px;\n  border-radius: 3px; }\n\npre {\n  background-color: #f8f8f8;\n  border: 1px solid #cccccc;\n  font-size: 13px;\n  line-height: 19px;\n  overflow: auto;\n  padding: 6px 10px;\n  border-radius: 3px; }\n  pre code, pre tt {\n    background-color: transparent;\n    border: none; }\n\n@media screen and (min-width: 914px) {\n    body {\n        width: 854px;\n        margin:0 auto;\n    }\n}\n@media print {\n\tpre,code {\n\t\tword-wrap: break-word;\n\t}\n\t/*\n\ttable, pre {\n\t\tpage-break-inside: avoid;\n\t}\n\t*/\n}\n"
  },
  {
    "path": "liteidex/deploy/packages/markdown/export.html",
    "content": "<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n<style type=\"text/css\">\n__MARKDOWN_CSS__\n</style>\n<title>__MARKDOWN_TITLE__</title>\n</head>\n<body>\n__MARKDOWN_CONTENT__\n</body>\n</html>"
  },
  {
    "path": "liteidex/deploy/welcome/css/style.css",
    "content": "body {\n\ttext-align: left;\n\tmargin: 0;\n\tfont-family: Helvetica, Arial, sans-serif;\n}\npre, code {\n\tfont-family: Menlo, monospace;\n}\npre .comment {\n\tcolor: #375EAB;\n}\npre .ln {\n\tcolor: #999;\n}\nbody {\n\tcolor: #222;\n}\na {\n\tcolor: #375EAB;\n\ttext-decoration: none;\n}\np, pre, ul, ol {\n\tmargin: 20px;\n}\npre {\n\tbackground: #e9e9e9;\n\tpadding: 10px;\n\n\t-webkit-border-radius: 5px;\n\t-moz-border-radius: 5px;\n\tborder-radius: 5px;\n}\n\nh1, h2, h3, h4, .rootHeading {\n\tmargin: 20px 0;\n\tpadding: 0;\n\tcolor: #375EAB;\n\tfont-weight: bold;\n}\nh2 {\n\tbackground: #E0EBF5;\n\tpadding: 2px 5px;\n}\n.rootHeading {\n\tmargin: 0;\n}\n\nh1 a, h2 a, h3 a, h4 a {\n\ttext-decoration: underline;\n}\n\ndl {\n\tmargin: 20px;\n}\ndd {\n\tmargin: 2px 20px;\n}\n#nav table td {\n\tvertical-align: top;\n}\n\ntable.dir th {\n\ttext-align: left;\n}\ntable.dir td {\n\tword-wrap: break-word;\n\tvertical-align: top;\n}\n\n#heading {\n\tfloat: left;\n\tmargin: 0 0 10px 0;\n\tpadding: 16px 0;\n\tfont-weight: normal;\n}\n#heading a {\n\tcolor: #222;\n\ttext-decoration: none;\n}\n\n#topbar {\n\tbackground: #E0EBF5;\n}\n\nbody {\n\ttext-align: center;\n}\n#page,\n#topbar .container {\n\tclear: both;\n\ttext-align: left;\n\tmargin-left: auto;\n\tmargin-right: auto;\n\twidth: 900px;\n}\n#plusone {\n\tfloat: right;\n}\n#plusoneRoot {\n\tfloat: right;\n}\n\n#copyright {\n\tcolor: #666;\n\tmargin: 40px 0;\n}\n\n#menu > a,\n#menu > input,\n#learn .buttons a,\n#blog .read a {\n\tpadding: 10px;\n\n\ttext-decoration: none;\n\t-webkit-border-radius: 5px;\n\t-moz-border-radius: 5px;\n\tborder-radius: 5px;\n}\n#menu > a,\n#menu > input {\n\tborder: 1px solid #375EAB;\n}\n#menu > a {\n\tcolor: white;\n\tbackground: #375EAB;\n}\n#start,\n#learn .buttons a,\n#blog .read a {\n\tcolor: #222;\n\tborder: 1px solid #375EAB;\n\tbackground: #E0EBF5;\n}\n\n#menu {\n\tpadding: 10px 0;\n\ttext-align: right;\n}\n#menu > a {\n\tmargin-right: 5px;\n\tmargin-bottom: 10px;\n\n\tpadding: 10px;\n}\n#menu > input {\n\tposition: relative;\n\ttop: 1px;\n\twidth: 100px;\n\tbackground: white;\n\tcolor: #222;\n}\n#menu > input.inactive {\n\tcolor: #999;\n}\n\n#left {\n\tfloat: left;\n}\n#right {\n\tfloat: right;\n}\n#left, #right {\n\twidth: 415px;\n}\n\n#learn,\n#about {\n\tpadding-top: 20px;\n}\n#learn h2,\n#about {\n\tmargin: 0;\n}\n\n#about {\n\theight: 96px;\n}\n#gopher {\n\tbackground: url(/doc/gopher/frontpage.png) no-repeat;\n\tbackground-position: center top;\n\theight: 155px;\n}\n#start {\n\tdisplay: block;\n\tpadding: 10px;\n\n\ttext-align: center;\n\ttext-decoration: none;\n\n\t-webkit-border-radius: 5px;\n\t-moz-border-radius: 5px;\n\tborder-radius: 5px;\n}\n#start .big {\n\tfont-weight: bold;\n}\n#start .desc {\n\tfont-weight: normal;\n\tmargin-top: 5px;\n}\n\n#learn pre, #learn textarea {\n\tpadding: 0;\n\tmargin: 0;\n\tfont-family: Menlo, monospace;\n}\n#learn .input {\n\tpadding: 10px;\n\tmargin-top: 10px;\n\theight: 150px;\n\n\t-webkit-border-top-left-radius: 5px;\n\t-webkit-border-top-right-radius: 5px;\n\t-moz-border-radius-topleft: 5px;\n\t-moz-border-radius-topright: 5px;\n\tborder-top-left-radius: 5px;\n\tborder-top-right-radius: 5px;\n}\n#learn .input textarea {\n\twidth: 100%;\n\theight: 100%;\n\tborder: none;\n\toutline: none;\n\tresize: none;\n}\n#learn .output {\n\tborder-top: none !important;\n\n\tpadding: 10px;\n\theight: 59px;\n\toverflow: auto;\n\n\t-webkit-border-bottom-right-radius: 5px;\n\t-webkit-border-bottom-left-radius: 5px;\n\t-moz-border-radius-bottomright: 5px;\n\t-moz-border-radius-bottomleft: 5px;\n\tborder-bottom-right-radius: 5px;\n\tborder-bottom-left-radius: 5px;\n}\n#learn .output pre {\n\tpadding: 0;\n\n\t-webkit-border-radius: 0;\n\t-moz-border-radius: 0;\n\tborder-radius: 0;\n}\n#learn .input,\n#learn .input textarea,\n#learn .output,\n#learn .output pre {\n\tbackground: #FFFFD8;\n}\n#learn .input,\n#learn .output {\n\tborder: 1px solid #375EAB;\n}\n#learn .buttons {\n\tpadding: 20px 0 10px 0;\n\ttext-align: right;\n}\n#learn .buttons a {\n\theight: 16px;\n\tmargin-left: 5px;\n\n\tpadding: 10px;\n}\n#learn .buttons .tour {\n\tfloat: right;\n}\n#learn .buttons .tour a {\n\tmargin-right: 0;\n\tfont-weight: bold;\n}\n\n#blog, #video {\n\tmargin-top: 40px;\n}\n#blog > div, #blog > a, #video > div, #video > a, #blog > h2, #video > h2 {\n\tmargin-bottom: 10px;\n}\n#blog .title, #video .title {\n\tcolor: #222;\n\ttext-decoration: none;\n\tdisplay: block;\n}\n#blog .when {\n\tcolor: #666;\n}\n#blog .read {\n\ttext-align: right;\n}\n\n.exampleHeading { cursor: pointer; }\n.example .collapsed { display: block; }\n.example .expanded { display: none; }\n.exampleVisible .collapsed { display: none; }\n.exampleVisible .expanded { display: block; }\n\ntable.codetable { margin-left: auto; margin-right: auto; border-style: none; }\nhr { border-style: none; border-top: 1px solid black; }\n"
  },
  {
    "path": "liteidex/deploy/welcome/en/LGPL_EXCEPTION.TXT",
    "content": "LiteIDE is distributed under the terms of the LGPLv2.1 license with an exception:\n\nLicense exception:\nIn addition, as a special exception,  that plugins developed for LiteIDE,\nare allowed to remain closed sourced and can be distributed under any license .\n"
  },
  {
    "path": "liteidex/deploy/welcome/en/LICENSE.LGPL",
    "content": "\t\t  GNU LESSER GENERAL PUBLIC LICENSE\n\t\t       Version 2.1, February 1999\n\n Copyright (C) 1991, 1999 Free Software Foundation, Inc.\n 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n[This is the first released version of the Lesser GPL.  It also counts\n as the successor of the GNU Library Public License, version 2, hence\n the version number 2.1.]\n\n\t\t\t    Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicenses are intended to guarantee your freedom to share and change\nfree software--to make sure the software is free for all its users.\n\n  This license, the Lesser General Public License, applies to some\nspecially designated software packages--typically libraries--of the\nFree Software Foundation and other authors who decide to use it.  You\ncan use it too, but we suggest you first think carefully about whether\nthis license or the ordinary General Public License is the better\nstrategy to use in any particular case, based on the explanations below.\n\n  When we speak of free software, we are referring to freedom of use,\nnot price.  Our General Public Licenses are designed to make sure that\nyou have the freedom to distribute copies of free software (and charge\nfor this service if you wish); that you receive source code or can get\nit if you want it; that you can change the software and use pieces of\nit in new free programs; and that you are informed that you can do\nthese things.\n\n  To protect your rights, we need to make restrictions that forbid\ndistributors to deny you these rights or to ask you to surrender these\nrights.  These restrictions translate to certain responsibilities for\nyou if you distribute copies of the library or if you modify it.\n\n  For example, if you distribute copies of the library, whether gratis\nor for a fee, you must give the recipients all the rights that we gave\nyou.  You must make sure that they, too, receive or can get the source\ncode.  If you link other code with the library, you must provide\ncomplete object files to the recipients, so that they can relink them\nwith the library after making changes to the library and recompiling\nit.  And you must show them these terms so they know their rights.\n\n  We protect your rights with a two-step method: (1) we copyright the\nlibrary, and (2) we offer you this license, which gives you legal\npermission to copy, distribute and/or modify the library.\n\n  To protect each distributor, we want to make it very clear that\nthere is no warranty for the free library.  Also, if the library is\nmodified by someone else and passed on, the recipients should know\nthat what they have is not the original version, so that the original\nauthor's reputation will not be affected by problems that might be\nintroduced by others.\n\f\n  Finally, software patents pose a constant threat to the existence of\nany free program.  We wish to make sure that a company cannot\neffectively restrict the users of a free program by obtaining a\nrestrictive license from a patent holder.  Therefore, we insist that\nany patent license obtained for a version of the library must be\nconsistent with the full freedom of use specified in this license.\n\n  Most GNU software, including some libraries, is covered by the\nordinary GNU General Public License.  This license, the GNU Lesser\nGeneral Public License, applies to certain designated libraries, and\nis quite different from the ordinary General Public License.  We use\nthis license for certain libraries in order to permit linking those\nlibraries into non-free programs.\n\n  When a program is linked with a library, whether statically or using\na shared library, the combination of the two is legally speaking a\ncombined work, a derivative of the original library.  The ordinary\nGeneral Public License therefore permits such linking only if the\nentire combination fits its criteria of freedom.  The Lesser General\nPublic License permits more lax criteria for linking other code with\nthe library.\n\n  We call this license the \"Lesser\" General Public License because it\ndoes Less to protect the user's freedom than the ordinary General\nPublic License.  It also provides other free software developers Less\nof an advantage over competing non-free programs.  These disadvantages\nare the reason we use the ordinary General Public License for many\nlibraries.  However, the Lesser license provides advantages in certain\nspecial circumstances.\n\n  For example, on rare occasions, there may be a special need to\nencourage the widest possible use of a certain library, so that it becomes\na de-facto standard.  To achieve this, non-free programs must be\nallowed to use the library.  A more frequent case is that a free\nlibrary does the same job as widely used non-free libraries.  In this\ncase, there is little to gain by limiting the free library to free\nsoftware only, so we use the Lesser General Public License.\n\n  In other cases, permission to use a particular library in non-free\nprograms enables a greater number of people to use a large body of\nfree software.  For example, permission to use the GNU C Library in\nnon-free programs enables many more people to use the whole GNU\noperating system, as well as its variant, the GNU/Linux operating\nsystem.\n\n  Although the Lesser General Public License is Less protective of the\nusers' freedom, it does ensure that the user of a program that is\nlinked with the Library has the freedom and the wherewithal to run\nthat program using a modified version of the Library.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.  Pay close attention to the difference between a\n\"work based on the library\" and a \"work that uses the library\".  The\nformer contains code derived from the library, whereas the latter must\nbe combined with the library in order to run.\n\f\n\t\t  GNU LESSER GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License Agreement applies to any software library or other\nprogram which contains a notice placed by the copyright holder or\nother authorized party saying it may be distributed under the terms of\nthis Lesser General Public License (also called \"this License\").\nEach licensee is addressed as \"you\".\n\n  A \"library\" means a collection of software functions and/or data\nprepared so as to be conveniently linked with application programs\n(which use some of those functions and data) to form executables.\n\n  The \"Library\", below, refers to any such software library or work\nwhich has been distributed under these terms.  A \"work based on the\nLibrary\" means either the Library or any derivative work under\ncopyright law: that is to say, a work containing the Library or a\nportion of it, either verbatim or with modifications and/or translated\nstraightforwardly into another language.  (Hereinafter, translation is\nincluded without limitation in the term \"modification\".)\n\n  \"Source code\" for a work means the preferred form of the work for\nmaking modifications to it.  For a library, complete source code means\nall the source code for all modules it contains, plus any associated\ninterface definition files, plus the scripts used to control compilation\nand installation of the library.\n\n  Activities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning a program using the Library is not restricted, and output from\nsuch a program is covered only if its contents constitute a work based\non the Library (independent of the use of the Library in a tool for\nwriting it).  Whether that is true depends on what the Library does\nand what the program that uses the Library does.\n\n  1. You may copy and distribute verbatim copies of the Library's\ncomplete source code as you receive it, in any medium, provided that\nyou conspicuously and appropriately publish on each copy an\nappropriate copyright notice and disclaimer of warranty; keep intact\nall the notices that refer to this License and to the absence of any\nwarranty; and distribute a copy of this License along with the\nLibrary.\n\n  You may charge a fee for the physical act of transferring a copy,\nand you may at your option offer warranty protection in exchange for a\nfee.\n\f\n  2. You may modify your copy or copies of the Library or any portion\nof it, thus forming a work based on the Library, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) The modified work must itself be a software library.\n\n    b) You must cause the files modified to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    c) You must cause the whole of the work to be licensed at no\n    charge to all third parties under the terms of this License.\n\n    d) If a facility in the modified Library refers to a function or a\n    table of data to be supplied by an application program that uses\n    the facility, other than as an argument passed when the facility\n    is invoked, then you must make a good faith effort to ensure that,\n    in the event an application does not supply such function or\n    table, the facility still operates, and performs whatever part of\n    its purpose remains meaningful.\n\n    (For example, a function in a library to compute square roots has\n    a purpose that is entirely well-defined independent of the\n    application.  Therefore, Subsection 2d requires that any\n    application-supplied function or table used by this function must\n    be optional: if the application does not supply it, the square\n    root function must still compute square roots.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Library,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Library, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote\nit.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Library.\n\nIn addition, mere aggregation of another work not based on the Library\nwith the Library (or with a work based on the Library) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may opt to apply the terms of the ordinary GNU General Public\nLicense instead of this License to a given copy of the Library.  To do\nthis, you must alter all the notices that refer to this License, so\nthat they refer to the ordinary GNU General Public License, version 2,\ninstead of to this License.  (If a newer version than version 2 of the\nordinary GNU General Public License has appeared, then you can specify\nthat version instead if you wish.)  Do not make any other change in\nthese notices.\n\f\n  Once this change is made in a given copy, it is irreversible for\nthat copy, so the ordinary GNU General Public License applies to all\nsubsequent copies and derivative works made from that copy.\n\n  This option is useful when you wish to copy part of the code of\nthe Library into a program that is not a library.\n\n  4. You may copy and distribute the Library (or a portion or\nderivative of it, under Section 2) in object code or executable form\nunder the terms of Sections 1 and 2 above provided that you accompany\nit with the complete corresponding machine-readable source code, which\nmust be distributed under the terms of Sections 1 and 2 above on a\nmedium customarily used for software interchange.\n\n  If distribution of object code is made by offering access to copy\nfrom a designated place, then offering equivalent access to copy the\nsource code from the same place satisfies the requirement to\ndistribute the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  5. A program that contains no derivative of any portion of the\nLibrary, but is designed to work with the Library by being compiled or\nlinked with it, is called a \"work that uses the Library\".  Such a\nwork, in isolation, is not a derivative work of the Library, and\ntherefore falls outside the scope of this License.\n\n  However, linking a \"work that uses the Library\" with the Library\ncreates an executable that is a derivative of the Library (because it\ncontains portions of the Library), rather than a \"work that uses the\nlibrary\".  The executable is therefore covered by this License.\nSection 6 states terms for distribution of such executables.\n\n  When a \"work that uses the Library\" uses material from a header file\nthat is part of the Library, the object code for the work may be a\nderivative work of the Library even though the source code is not.\nWhether this is true is especially significant if the work can be\nlinked without the Library, or if the work is itself a library.  The\nthreshold for this to be true is not precisely defined by law.\n\n  If such an object file uses only numerical parameters, data\nstructure layouts and accessors, and small macros and small inline\nfunctions (ten lines or less in length), then the use of the object\nfile is unrestricted, regardless of whether it is legally a derivative\nwork.  (Executables containing this object code plus portions of the\nLibrary will still fall under Section 6.)\n\n  Otherwise, if the work is a derivative of the Library, you may\ndistribute the object code for the work under the terms of Section 6.\nAny executables containing that work also fall under Section 6,\nwhether or not they are linked directly with the Library itself.\n\f\n  6. As an exception to the Sections above, you may also combine or\nlink a \"work that uses the Library\" with the Library to produce a\nwork containing portions of the Library, and distribute that work\nunder terms of your choice, provided that the terms permit\nmodification of the work for the customer's own use and reverse\nengineering for debugging such modifications.\n\n  You must give prominent notice with each copy of the work that the\nLibrary is used in it and that the Library and its use are covered by\nthis License.  You must supply a copy of this License.  If the work\nduring execution displays copyright notices, you must include the\ncopyright notice for the Library among them, as well as a reference\ndirecting the user to the copy of this License.  Also, you must do one\nof these things:\n\n    a) Accompany the work with the complete corresponding\n    machine-readable source code for the Library including whatever\n    changes were used in the work (which must be distributed under\n    Sections 1 and 2 above); and, if the work is an executable linked\n    with the Library, with the complete machine-readable \"work that\n    uses the Library\", as object code and/or source code, so that the\n    user can modify the Library and then relink to produce a modified\n    executable containing the modified Library.  (It is understood\n    that the user who changes the contents of definitions files in the\n    Library will not necessarily be able to recompile the application\n    to use the modified definitions.)\n\n    b) Use a suitable shared library mechanism for linking with the\n    Library.  A suitable mechanism is one that (1) uses at run time a\n    copy of the library already present on the user's computer system,\n    rather than copying library functions into the executable, and (2)\n    will operate properly with a modified version of the library, if\n    the user installs one, as long as the modified version is\n    interface-compatible with the version that the work was made with.\n\n    c) Accompany the work with a written offer, valid for at\n    least three years, to give the same user the materials\n    specified in Subsection 6a, above, for a charge no more\n    than the cost of performing this distribution.\n\n    d) If distribution of the work is made by offering access to copy\n    from a designated place, offer equivalent access to copy the above\n    specified materials from the same place.\n\n    e) Verify that the user has already received a copy of these\n    materials or that you have already sent this user a copy.\n\n  For an executable, the required form of the \"work that uses the\nLibrary\" must include any data and utility programs needed for\nreproducing the executable from it.  However, as a special exception,\nthe materials to be distributed need not include anything that is\nnormally distributed (in either source or binary form) with the major\ncomponents (compiler, kernel, and so on) of the operating system on\nwhich the executable runs, unless that component itself accompanies\nthe executable.\n\n  It may happen that this requirement contradicts the license\nrestrictions of other proprietary libraries that do not normally\naccompany the operating system.  Such a contradiction means you cannot\nuse both them and the Library together in an executable that you\ndistribute.\n\f\n  7. You may place library facilities that are a work based on the\nLibrary side-by-side in a single library together with other library\nfacilities not covered by this License, and distribute such a combined\nlibrary, provided that the separate distribution of the work based on\nthe Library and of the other library facilities is otherwise\npermitted, and provided that you do these two things:\n\n    a) Accompany the combined library with a copy of the same work\n    based on the Library, uncombined with any other library\n    facilities.  This must be distributed under the terms of the\n    Sections above.\n\n    b) Give prominent notice with the combined library of the fact\n    that part of it is a work based on the Library, and explaining\n    where to find the accompanying uncombined form of the same work.\n\n  8. You may not copy, modify, sublicense, link with, or distribute\nthe Library except as expressly provided under this License.  Any\nattempt otherwise to copy, modify, sublicense, link with, or\ndistribute the Library is void, and will automatically terminate your\nrights under this License.  However, parties who have received copies,\nor rights, from you under this License will not have their licenses\nterminated so long as such parties remain in full compliance.\n\n  9. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Library or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Library (or any work based on the\nLibrary), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Library or works based on it.\n\n  10. Each time you redistribute the Library (or any work based on the\nLibrary), the recipient automatically receives a license from the\noriginal licensor to copy, distribute, link with or modify the Library\nsubject to these terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties with\nthis License.\n\f\n  11. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Library at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Library by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Library.\n\nIf any portion of this section is held invalid or unenforceable under any\nparticular circumstance, the balance of the section is intended to apply,\nand the section as a whole is intended to apply in other circumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  12. If the distribution and/or use of the Library is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Library under this License may add\nan explicit geographical distribution limitation excluding those countries,\nso that distribution is permitted only in or among countries not thus\nexcluded.  In such case, this License incorporates the limitation as if\nwritten in the body of this License.\n\n  13. The Free Software Foundation may publish revised and/or new\nversions of the Lesser General Public License from time to time.\nSuch new versions will be similar in spirit to the present version,\nbut may differ in detail to address new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Library\nspecifies a version number of this License which applies to it and\n\"any later version\", you have the option of following the terms and\nconditions either of that version or of any later version published by\nthe Free Software Foundation.  If the Library does not specify a\nlicense version number, you may choose any version ever published by\nthe Free Software Foundation.\n\f\n  14. If you wish to incorporate parts of the Library into other free\nprograms whose distribution conditions are incompatible with these,\nwrite to the author to ask for permission.  For software which is\ncopyrighted by the Free Software Foundation, write to the Free\nSoftware Foundation; we sometimes make exceptions for this.  Our\ndecision will be guided by the two goals of preserving the free status\nof all derivatives of our free software and of promoting the sharing\nand reuse of software generally.\n\n\t\t\t    NO WARRANTY\n\n  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\nWARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\nEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\nOTHER PARTIES PROVIDE THE LIBRARY \"AS IS\" WITHOUT WARRANTY OF ANY\nKIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\nLIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\nWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\nAND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\nFOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\nCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\nLIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\nRENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\nFAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\nSUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGES.\n\n\t\t     END OF TERMS AND CONDITIONS\n\f\n           How to Apply These Terms to Your New Libraries\n\n  If you develop a new library, and you want it to be of the greatest\npossible use to the public, we recommend making it free software that\neveryone can redistribute and change.  You can do so by permitting\nredistribution under these terms (or, alternatively, under the terms of the\nordinary General Public License).\n\n  To apply these terms, attach the following notices to the library.  It is\nsafest to attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least the\n\"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the library's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\nAlso add information on how to contact you by electronic and paper mail.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the library, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the\n  library `Frob' (a library for tweaking knobs) written by James Random Hacker.\n\n  <signature of Ty Coon>, 1 April 1990\n  Ty Coon, President of Vice\n\nThat's all there is to it!\n\n\n"
  },
  {
    "path": "liteidex/deploy/welcome/en/changes.md",
    "content": "<!-- Changes -->\n\n## LiteIDE X Version\n  LiteIDE is a simple, open source, cross-platform Go IDE.\n\n### 2025.5.20 Ver X38.4\n* LiteIDE\n\t* support Go1.24\n* LiteFind\n\t* fix FindFilesThread stop\n\n### 2023.08.14 Ver X38.3\n* LiteIDE\n\t* support Go1.21\n* LiteEnv\n\t* support Go1.21 `go env`\n* LiteFind\n\t* support enter on directory searches\n* Terminal\n\t* fix source for not bash\n\n### 2023.02.14 Ver X38.2\n* LiteIDE\n    * fix and update gotools & gocode\n    * refactor astview outline\n    * update dlv debugger plugin\n* GolangAst\n    * new outline view by pos\n    * support typeparams\n* LiteDebug\n    * add disassemble view\n* DlvDebugger\n    * fix generics func sync\n    * fix dlv process exit on windows\n    * refactor gorountines model\n    * support disassemble model\n* LiteBuild\n    * gosrc.xml TARGETNAME use BUILD_DIR_PATH\n* GolangEdit\n    * support any and comparable\n* GolangCode\n    * support any and comparable\n* gotools\n    * types fix find obj field \n    * types fix object string\n    * gotest fix run test file use -run mode\n    * astview add new -outline for outline\n    * astview add new -tp for typeparams\n    * astview fix interface embedded type \n* gocode\n    * fix identifier comparable \n    * update lookup object\n\n\n### 2023.01.22 Ver X38.1\n* LiteIDE\n    * gotools & gocode support Go1.18 generics\n    * support build for windows vs2019\n    * support build for freebsd/openbsd\n    * fix memory leak\n* GolangCode\n    * support Go1.18 generics\n    * remove options and default set\n    * uncheck GOPATH for set-lib\n* LiteEnv\n    * fix memory leak\n    * filter go env\n* LiteBuild\n    * fix memory leak\n    * fix buildconfigdialog twice accept\n* LiteEditor\n    * fix selection navigation saved\n    * check backspace empty completion unpopup\n* GolangEdit\n    * update actions for GO111MODULE\n* GolangPlay\n    * load depends\n* Bookmarks\n    * fix memory leak\n* Terminal\n    * libterm fix build for vs2019\n    * add option for set font\n    * ptyqt use conptyprocess for vs2019\n    * ptyqt fix unixptyprocess for freebsd/openbsd\n* gotools\n    * types support generics method lookup\n* gocode\n    * support generics type autocomplete\n    * support incomplete dep autocomplete\n\n### 2022.05.22 Ver X38.0\n* LiteIDE\n    * support Go1.18 go.work\n    * support Go1.18 format/types/gocode\n* LiteApp & LiteEditor\n    * add 'Detroit Future' theme (thanks donuts-are-good)\n* LiteEditor\n    * add go.work syntax\n    * add color/dart-blue.xml (thanks qAison)\n* LiteBuild\n    * only check first run action and output\n    * update GoPlus config\n* LiteEnv\n    * windows env use %PROGRAMFILES%\\Go\n* Terminal\n    * fix copy text containing tab in terminal\n    * add context menu copy/paste/selectall\n* gotools\n    * support Go1.18 format\n    * support Go1.18 types\n    * support go.work\n* gocode\n    * support Go1.18 code completer\n    * support go.work\n    * update unsafe pkg\n    * fix gomod imports completer\n\n### 2021.03.02 Ver X37.4\n* LiteIDE\n    * move to trash use api on macos\n    * fix find&replace repaint\n    * update terminal action\n    * add copy fullpath action\n* LiteApp\n    * editor context menu add integrated terminal action\n    * folder view update integrated terminal action\n    * folder view add copy full path action\n    * move to trash use api on macos\n* LiteFind\n    * fix find&replace editor repaint\n    * fix file search replace repaint\n    * windows fileserach shortcuts add ctrl+atl+f\n* LiteEditor:\n    * gomod.xml add retract\n* Terminal:\n    * move to core plugin\n* DlvDebugger:\n    * add pass flags options\n\n### 2020.10.10 Ver X37.3\n* LiteIDE\n    * fix dlv debug exit crash on window\n    * support mingw-64 build for window\n* LiteApp\n    * update icon for hight-dpi\n* LiteBuild:\n    * gosrc.xml add tool cover html command\n    * gosrc.xml add make command\n* LiteEditor:\n    * add dark-gray.xml color scheme, thanks for qAison\n    * fix showlink tooltip bug for Qt5.12\n* GolangEdit:\n    * add find usages skip tests action\n* Terminal:\n    * fix winpty load for Q_OS_WIN64\n    * add closeall action\n* DlvDebugger\n    * fix exit crash on window\n    * fix handle response regexp\n* gotools & gocode\n    * update fastmod for go1.14 GOMOD\n* gotools\n    * types add skip tests flag\n    \n### 2020.04.24 Ver X37.1\n* LiteIDE\n    * add new integrated terminal plugin\n    * change LiteApi, IToolWindowManager and IFileManager api\n* Terminal:\n    * new terminal plugin\n    * export open in integrated terminal action\n    * support open multiple shells (/etc/shells) on unix\n    * support open cmd/powershell/git bash on window\n    * support dark mode\n    * support login mode --login (unix)\n    * load enviroment from LiteIDE action (unix)\n    * tab style multiple terminal\n    * auto save / restore terminal info\n    * ctrl+c key interrupt support\n    * mouse to select, enter key copy to clipboard (ctrl+c/command+c) \n    * ctrl+v / command+v to paste from clipboard\n* LiteApp\n    * folder add open integrated terminal action\n    * update hide tool window action icon.\n    * folder view enable create folder in files\n    * fix SideWindowStyle::moveToolWindow crash\n    * fix #1106, options widget add ScrollArea, enable resize, init check screen size\n* LiteEditor\n    * change copy/paste/cut/selectall/undo/redo unregister shortcut for macos\n* FileBorwser:\n    * add open integrated terminal action\n    * enable create folder in files\n    * simple, remove litefind/terminal depends\n* LiteFind\n    * SearchResultWidget add expandAll and collapseAll button\n* GolangEdit\n    * fix fold by GO_ELSE\n* gotools & gocode\n    * fix & update for Go 1.14\n\n### 2020.01.15 Ver X36.3\n* LiteIDE\n    * fix and update gotools&gocode for support Go Module. \n    * refactor option, update all plugin option page\n* LiteApp\n    * refactor option page, load/save and keep option page.\n* LiteEditor\n    * fix code complete escape for Qt5.12\n* Markdown\n    * add CommonMark/cmark for markdown to html, replace sundown\n* GolangPackage\n    * add GOPRIVATE,GONOPROXY,GONOSUMDB option\n    * add goproxy.cn for GOPROXY list\n    * merge GOPATH/GoModule setup to global options.\n* LiteBuild\n    * add `go mod vendor` action\n* DlvDebugger\n    * update stack frame to RPC api\n* gotools & gocode\n    * fix fastmod match full version, example `github.com/mypkg/v2`\n    * types check add basic type\n\n### 2019.10.30 Ver X36.2\n* LiteIDE\n    * add new image viewer plugin\n    * folder view support multi copy & paste\n    * folder view support move to trash\n    * fix gocode crash\n    * update uk (Ukrainian) translation, thanks for cl0ne\n* LiteApp\n    * fix floating dock widet style\n    * add dock widget floating toolbar\n    * folder view support multi copy and paste\n    * folder view support move to trash action\n* ImageEditor\n    * add new image viewer plugin\n    * support image viewer and gif video play\n* GolangEdit\n    * support go1.13 number literal syntax highlight\n* gotools & gocode\n    * fix bad parser crash\n\n### 2019.08.28 Ver X36.1\n* LiteIDE\n    * folder view support copy and paste\n    * fix find usages and declinfo for _ start symbol\n    \n* LiteApp\n    * multi folder view support copy and parse\n    * tool window support floating window action\n* LiteEditor\n    * cached text layout, optimization long line paint\n    * check and disable document too long line (4096) syntax.\n* GolangEdit\n    * fix findusage and declinfo for _ start symbol\n* GolangPackage\n    * add custom GOPROXY setup\n    * update GO111MODULE env reload check\n* GolangDoc\n    * remove godoc command, use gotools godoc\n* FileBorwser\n    * folder view support copy and paste\n* Others\n    * linux env add x-terminal-emulator\n    * update Russian translation, thanks Sergey Belyashov\n* gotools & gocode\n    * fix mod priority vendor check\n* gotools\n    * godoc add go doc -all flags\n\n### 2019.03.15 Ver X36\n* LiteIDE\n    * add new editor path navigation toolbar\n* QuickOpen\n    * quickopenfile filter text length less than 3 use editor files, otherwise search in folder files.\n    * add new quickfilesystem filter\n* GolangEdit\n    * use new quickfilesystem for import jump\n* LiteEditor\n    * add new path navigation toolbar (use quickfilesystem)\n* GolangCode\n    * fix number+dot issues completer\n* FileUtil\n    * show in Finder fast on macOS\n\n### 2019.02.05 Ver X35.5\n* LiteIDE\n    * bug fix version\n* GolangEdit\n    * fix cursor selections usages lookup\n    * add byteOffsetToColumn to fix gotools/guru output byte offset to editor offset\n* LiteEditor\n    * add allow vertical scrolling to the last line option\n    * check file writed size != data.size and show error message\n* LiteFind\n    * update search result item text for all same linenumber\n\n### 2019.01.30 Ver X35.4\n* LiteIDE\n    * source code navigation can be used in wrong source code\n    * imports completer support gomod depends and local imports for gomod project\n    * imports completer support lookup all imports by source for GOPATH project\n* LiteApp\n    * fix vs-dark.qss menu icon bug for windows10\n* LiteEditor\n    * fuzzy golang imports completer\n    * fix complter imports offset\n    * fix enter auto insert tab or space check by previous line\n* GolangCode\n    * fix receive imports line process\n* GolangEdit\n    * support lookup types info wrong source code\n    * add jump to declaration toolbar\n    * fix jump to declaration save history\n\n* gotools & gocode\n    * source code navigation can be used in wrong source code\n    * lookup gomod depends and local imports for gomod project\n    * lookup all imports from source for GOPATH project\n\n### 2018.12.22 Ver X35.3\n* LiteIDE\n    * optimization gotools & gocode, update editor and find plugin.\n* LiteApp\n    * fix liteoutput antialias setup invalid\n* LiteEditor\n    * enable vertical scrollbar move last block to top viewport\n    * add the cut current line operator for cut action if not selected\n    * add convert tab/spaces action\n    * add tabtospace/tabwidth set by litapp/mimetype/liteeditor.xml or options\n    * update line wrap mode for mimetype\n    * update tabtospace mode for mimetype\n* LiteFind\n    * file search check and skip binary file\n    * add folders/filesystem context menu file search action\n* GolangEdit, GolangCode, LiteBuild\n    * fix process start with cmd contains space on macOS\n* GolangDoc\n    * support check go1.12 godoc remove -html, use text mode\n\n* gotools & gocode\n    * fix lookup named method embedded\n    * optimization, check save/load pkgconfig\n    * add godoc command for check go1.12 use text mode\n* gocode\n    * fixed global var completion\n\n### 2018.11.12 Ver X35.2\n* LiteIDE\n    * fixed types info jump position\n    * optimization types info lookup cache\n* LiteEditor\n    * single line comment set after white spaces and add space\n    * go.mod editor support comment action\n    * color scheme support MatchBrackets background, default gray #808080\n* Bookmarks\n    * sort bookmark model by name/line, add context menu goto/remove/removeThisFile/removeAllFiles action\n* GolangDoc\n    * fix mod package godoc import path view\n* GolangEdit\n    * fix lookup types info by gocode cache\n* gotools & gocode\n    * fixed types jump info position\n    * optimization types info lookup cache\n\n### 2018.10.24 Ver X35.1\n* LiteIDE\n    * BUG fixed, gocode code jump and import line jump\n* GolangEdit\n    * fix jump def for import line\n* gotools & gocode\n    * fix types jump\n\n### 2018.10.24 Ver X35\n* LiteIDE\n    * all support Go1.11 Go modules\n    * fast lookup types info by cache\n    * fix delve debug recurse set blocking\n* LiteApp\n    * side window style enable move tool window to any left/right/bottom side.\n    * side window style output bar shortcut change to command+meta+number (macos) or ctrl+shift+number\n* GolangEdit\n    * fast lookup types info by gocode cache\n    * find all usages support Go modules work dir\n    * refactor symbol support Go module work dir\n* GolangAst\n    * support import path gopath/vendor/modules doc view\n* LiteDebug\n    * add automatically add breakpoint main.main when debugging option (default disable)\n* DlvDebugger\n    * fix dlv list variables blocking, change LoadConfig recurse to 3\n* LiteBuild\n    * update gosrc.xml for support custom target workdir\n\n* gotools & gocode\n    * import https://github/visualfc/fastmod for fast parse go.mod depends\n    * fast parse Go modules and fix issues https://github.com/visualfc/liteide/issues/986\n* gotools\n    * find all usages support Go module work dir\n* gotools\n    * fast completer for Go module project\n    * provide types info for liteide by cache\n\n### 2018.10.05 Ver X34.3\n* LiteIDE\n    * fix support go1.11 modules\n* GolangEdit\n    * fix jump import line\n    * fix find usages for import line\n* LiteEditor\n    * fix gocode completer item kind update\n* GolangCode\n    * enviroment changed to reset gocode\n* gotools & gocode\n    * types: fix module-based project with several subpackages https://github.com/visualfc/liteide/issues/977\n    * types: fix redeclared file parser cursor first\n    * types: fix source file update check in stdin\n    * types: fix x test files check\n    * gomod: fix lookup module for go list\n* gocode\n    * fix gocode crash https://github.com/visualfc/liteide/issues/978\n\n### 2018.09.15 Ver X34.2\n* LiteIDE\n    * fix gotools & gocode support go1.11 modules sub folder\n    * support custom GO111MODULE setup\n* LiteApp\n    * fix #939 display right margin at column wrong\n    * change mime type check fullname first\n* GolangCode\n    * fix #970 goplay editor cgo crash\n* GolangEdit\n    * find usages / rename symbol add skip GOROOT actions\n* GolangPackage\n    * add custom GO111MODULE setup\n* LiteEditor\n    * add extra mouse navagite go back and forward\n    * add gomod.xml for go.mod syntax\n* LiteBuild\n    * add gomod.xml for go.mod build command\n* gotools & gocode\n    * fix go1.11 modules sub folder\n\n### 2018.08.12 Ver X34.1\n* LiteIDE\n    * update gotools support go1.11 modules\n    * update gocode support go1.11 modules and vendor\n* LiteEditor\n    * enable open binary file for editor\n    * change widget readonly by binary file (ignore text file)\n* gocode\n    * change parser by source use gotools/types\n    * fix parser vendor & modules\n\n### 2018.07.26 Ver X34\n* LiteIDE\n    * update gotools support go1.11 modules\n    * update gocode for https://github.com/visualfc/gocode support go1.11 modules\n* LiteApp\n    * refactor folder model code, remove depends\n    * fix dock widget for Qt5.9.6 bug\n    * move view godoc from folderview to litebuild\n* LiteBuild\n    * update BUILDARGS, remove -i for go1.11 build\n* GolangCode\n    * change to github.com/visualfc/gocode for support go1.11 modules\n* GolangDoc\n    * pdoc support real ImportPath display for Go modules or vendor\n    * fix docs.html $.GoogleCN code\n* GolangEdit\n    * support go1.11 modules, view info / jump / find usages\n    * support parser import path for Go modules or vendor for godoc view\n* GolangPackage\n    * add pkg/mod tree for Go modules\n* QuickOpen\n    * fix view pos for editor manager\n    * support open file with fullpath on editor input\n* DlvDebugger\n    * fix continue\n* gotools\n    * types support go1.11 modules\n    * add pkgcheck support modules or vendor check\n* gocode\n    * clone https://github.com/nsf/gocode support go1.11 modules\n\n### 2018.07.04 Ver X33.4\n* LiteIDE\n    * update gocode for mdempsky/gocode support go1.11\n    * update DlvDebugger plugin for Delve detail information\n* LiteDebug\n    * add threads/goroutines/registers view\n    * watch view support double clicked change and update\n* DlvDebugger\n    * add dlv rcp-mode for get more info\n    * variable and watch support detail information\n    * watch support local/package variable\n    * support threads/gorountines/registers model\n* GolangCode\n    * support <https://github.com/mdempsky/gocode>\n* QuickOpen\n    * add dly filter editor for optimize many files search\n    * fix quick open symbol action\n\n### 2018.04.23 Ver X33.3\n* LiteIDE\n    * support import jump to package source file\n    * support import hints for all package on code completer\n    * add build & debug action to build menu\n    * fix build debug gcflags for go version\n* LiteApp\n    * fix tab style sheet for Qt5.9 on macOS\n    * project wizard add gocmdex/gopkgex for anywhere\n* LiteBuild\n    * build config file add debug support\n    * golang build add debug/debugtest action\n    * fix golang build debug gcflags depends for go version\n* LiteDebug\n    * filesystem add debug file action\n    * remove internal golang build function\n* LiteEditor\n    * reimplemented backspace quotes audo insert/remove action\n* GolangCode\n    * parser import package for GOPATH \n    * fix vendor import for code completer\n    * add import hints for all package option (default)\n    * add parser cgo completer list on editor\n* GolangEdit\n    * fix import line navigate show link source\n    * add import line jump to package file list\n* QuickOpen\n    * add quickopenfolder implement\n* gotools\n    * add new debugflag action for print debug gcflags for go version\n    * types find import dir check vendor\n    * types add import info and doc\n    * fix astview pkg nil check\n    \n### 2018.02.14 Ver X33.2\n* LiteIDE\n    * add folder tool window split mode swith\n    * add archlinux makepkg\n    * add tcl syntax and build\n* LiteEditor\n    * support function color, thanks [discoverfly](https://github.com/discoverfly)\n    * add default-func color theme\n    * add style for scroll bars in sublime.qss, thanks [hauke96](https://github.com/hauke96)\n    * add marks for selections and findings, thanks [jinq0123](https://github.com/jinq0123)\n* LiteFind\n    * fix editor regexp replace\n* LiteBuild\n    * add context menu go tool action\n\n### 2017.12.12 Ver X33.1\n* LiteIDE\n    * support quick open command\n    * support gomodifytags\n    * fix libpng warning on qt5 build \n* LiteApp\n    * add tools menu for quick open actions\n    * standard and rename tool window title\n    * enable edit menu anytime, fix edit menu disable on editor lost focus.\n    * fix editor load large file bad_alloc recover\n* LiteEnv\n    * add select env to tools menu    \n* LiteEditor\n    * check and not open large file\n    * fix edit hide edit sub menu 'setup' on macos\n* LiteFind\n    * fix find editor replace all wrap around* GolangEdit\n    * Integrated [gomodifytags](https://github.com/fatih/gomodifytags) and gui tools support gomodifytags all options\n* QuickOpen\n    * add quick open command action (ctrl+shift+p/command+shift+p)\n    * quickopenfiles use thread for fast and cancel\n    * fix quickopenfile cancel loading for esc or liteapp quit\n\n### 2017.11.2 Ver X33\n* LiteIDE\n    * optimization editor plugin, load file check codec, reload file by diff\n    * add astview TodoList\n    * add new bookmarks plugin\n    * fix liteapp clean plugin order\n* LiteApp\n    * filemanager auto reload file default YesToAll\n    * fix liteapp clean plugins reverse order\n    * fix #832, sidebar change action by combox\n    * fix folder sync editor same prefix error \n* LiteEditor\n    * reload file use diff to keep state and mark\n    * load file check is binary and report\n    * load file check codec use libucd if utf8 decode failed.\n    * load file check decode error and report \n    * load file is readonly set editor widget readonly\n    * load and save file support utf8 bom\n    * add codec and lineend info on statusbar\n    * add copied text into the clipboard as HTML option\n    * add Solarized Dark color theme, thanks xgdgsc\n    * reimplemented editor mark api\n    * fix copy to clipboard tab escape\n* GolangAst\n    * add TodoList for classview and outline\n    * fix #848, astwidget double clicked index check.\n* GolangCode\n    * update pkglist to go1.9\n* GolangEdit\n    * add stop source query action\n    * add source query action implement_GOPATH for GOPATH scope\n    * fix golang lexer parser folding end\n    * fix GolangHighlighter fold indent error set\n    * fix findUsage wordUnderCursor offset\n    * fix find usages findStart signal late\n* GolangFmt\n    * load diff check modify current block text\n* GolangCode\n    * fix update gopath process stop and wait\n* LiteDebug\n    * fix cmd to native separator\n    * build target add -a build flag\n    * change debug targget name to target.debug (custom by LiteBuild)\n* LiteBuild\n    * add custom debug name in build config\n* LiteFind\n    * fix memory leak by GolangEdit GolangFileSearch\n    * fix findInFiles berore saveAllEditor\n    * fix FindEditor replace all\n* Bookmarks\n    * new plugin for show open editors bookmarks and jump\n* gotools\n    * update stdlib for go1.9.1\n    * astview add TodoList support\n    \n### 2017.7.18 Ver X32.2\n* LiteApp\n    * fix editor file watcher is invalid for many change\n* GolangEdit\n    * fix TODO/BUG/FIXME comment syntax    \n* DlvDebugger\n    * fix dlv headless process workdir\n* LiteDebug\n    * fix debug tests action\n    * fix load and save breakpoint for editor\n\n### 2017.7.7 Ver X32.1\n* LiteIDE\n    * build config custom gopath support inherit parent path's  gopath setup\n* GolangCode\n    * update gocode lib-path by build config custom gopath\n* LiteEnv\n    * optimization check go enviroment\n* LiteBuild\n    * build config custom gopath inherit parent path\n    * fix BuildAndRun kill old on window\n    * fix build config custom gopath action\n* GolangPackage\n    * fix load package treeview error\n* DlvDebugger\n    * dlv use headless mode\n    * fix dlv kill process\n\n### 2017.6.12 Ver X32\n* LiteIDE\n    * support folder build config custom GOPATH\n    * support folder build config BUILDFLAGS -tags setup\n    * support folder build config TARGETBASENAME setup\n    * support session switching for folder/editor\n    * support load custom icon library from liteapp/qrc folder (default and folder)\n    * reimplemented multifolder model, it took me a long time :)\n    * add macOS session menu for native dock menu\n    * recent menu sync for multi windows\n    * gotools support +build source navigate (single file or -tags setup)\n* LiteApp\n    * add the session switching function\n    * add autosavedocument emit message option\n    * add max editor tab count option\n    * add option action to standard toolbar\n    * add tool window use shortcuts option for unstandard keyboard option\n    * add exit liteide ctrl+q on windows\n    * add themes (carbon.qss gray.qss sublime.qss) for liteide & beautify old themes, thanks for hope hook\n    * editor tab context add open terminal here action\n    * folders context menu add open in new windows action (new folder session)\n    * folder view add show showdetails action\n    * fix folder sync editor incorrect on macOS\n    * fix webview and debug console qss\n    * fix folders tool window enter key to jump\n    * fix exit error save session by ctrl+q on macos\n    * fix newfile dialog space name\n    * update folder tool window showInExporer showInShell action text\n* LiteFind\n    * find files add auto swith current folder checkbox\n    * find in editor add show replace mode checkbox\n    * filesearch enable replace whitespace or empty\n    * editor replace all in one edit block for ctrl+z once undo\n* LiteBuild\n    * add custom GOPATH in build config for build/debug/GolangEdit\n    * add custom share-value BUILDFLAGS in build config for build/debug/GolangEdit\n    * add custom TARGETBASENAME in build config for build/debug\n    * support BUILDFLAGS -tags for build/debug/GolangEdit\n    * update gosrc.xml to export custom value and share-value\n    * folders tool window context menu add Go build configuration action\n    * folders tool window context go tool use Go build configuration setup\n    * fix stop action for kill process\n* LiteDebug\n    * console use editor color scheme\n    * support LiteBuild folder build config BUILDFLAGS/BUILDARGS -tags flag setup\n* DlvDebugger\n    * fix process identify for auto exit\n* LiteEnv\n    * default env /usr/local/go on macosx\n    * update macosx cross env GOROOT for system\n* LiteEditor    \n    * context menu add convert case menu\n    * go.snippet add iferr\n    * update sublime.xml / sublime-bold.xml, thanks for hopehook <hopehook@qq.com>\n    * alt+backspace delete serial whitespaces\n    * option font QComboBox to QFontComboBox, add restore DefaultFont action\n    * option add show monospace font check\n    * option file types sort mimetype, show custom extsition first\n* GolangPackage\n    * gopath setup add use sysgopath/litegopath check\n* GolangPlay\n    * fix goplay use goenvironment\n* GolangDoc\n    * change golang api index search for go/api folder\n* GolangEdit\n    * add go root source readonly setup option\n    * support folder go build config BUILDFLAGS/BUILDARGS -tags flag setup\n    * fix interface type by gotools\n    * fix find process stop and run\n    * fix lookup guru for source query\n* GolangAst\n    * fix astview enter key to jump\n* FileBorwser\n    * fix file system enter key to jump\n* gotools\n    * fix types interface method\n    * types support +build for single source\n    * types support -tags flag\n* tools\n    * add new exportqrc tool for export liteide all build-in images\n\n### 2017.3.9 Ver X31.1\n* LiteApp\n    * restore folder first on MacOS\n* GolangEdit\n    * update pkglist\n\n### 2017.3.2 Ver X31\n* LiteIDE\n    * add command line `liteide [files|folder] [--select-env id] [--local-setting] [--user-setting] [--reset-setting]`        \n* LiteApp\n    * add application idle timer automatic save documents option\n    * folders are not sorted to resolve sync editing errors on MacOS\n    * update new file wizard\n* GolangPackage\n    * update GOPATH setup\n* GolangCode\n    * update env load    \n* GolangAst\n    * classview and outline add sync editor action\n* DlvDebugger\n    * fix dlv execution on MacOS\n* FakeVim\n    * option add load default command list action\n* LiteEditor\n    * fix editor restore vertical scrollbar postion\n    * fix codecompleter prefix min setup\n    * restore the editor toolbar\n    * option add mimetype custom extsition setup\n* LiteBuild\n    * build config xml file enable custom $() on cmd and args\n\n### 2016.12.6 Ver X30.3\n* LiteEnv\n    * remove GO15VENDOREXPERIMENT env\n* LiteEditor\n    * add fuzzy completion option, default setup\n    * add clear completion cache when save files option\n    * support drop file to open editor\n    * add case convert actions\n* GolangEdit\n    * add guru support (backup oracle)\n* GolangFmt\n    * fmt try to keep the original location\n* DlvDebugger\n    * use native stepout\n    * filter term color\n* LiteBuild\n    * filter term color\n    * FileTest support TESTARGS\n* gotools\n    * always use vendor\n    * gotest support [build|test args]\n    * update vendor for oracle\n\n### 2016.7.12 Ver X30.2\n* LiteApp\n    * add new vs-dark css, thanks [tupunco](https://github.com/tupunco)\n    * fix and re-implement editor list menu\n* QuickOpen\n    * QuickOpenFile skip same folder and same files\n    * QuickOpneFile add current editor local files\n\n### 2016.7.5 Ver X30.1\n* LiteIDE\n    * add OpenEditor tool windows\n    * add GolangSymbol for QuickOpen (CTRL+SHIFT+O)\n    * fix gotools vendor error\n* LiteApp\n    * add OpenEditor tool windows\n    * update view menu\n* GolangAst\n    * add GolangSymbol for QuickOpen\n    * add GolangSymbol option\n    * fix goto symbol\n* QuickOpen\n    * optimization QuickOpenFile and QuickOpenEditor search\n    * add QuickOpen option\n* gotools\n    * fix vendor error\n\n### 2016.7.2 Ver X30\n* LiteIDE\n    * add new QuickOpen plugin\n    * add new FakeVim plugin, thanks for [jsuppe](https://github.com/jsuppe)\n    * add custom env LITEIDE_TOOL_PATH/LITEIDE_PLUGIN_PATH/LITEIDE_RES_PATH\n* LiteApp\n    * action tooltip shortcut show native text\n    * option keyboard map show native text\n* QuickOpen\n    * quick open files action CTRL+P\n    * quick open editor action ATL+ALT+P\n    * quick go to line action CTRL+L\n    * quick open help\n* FakeVim\n    * editor add vim style mode editing\n* LiteEditor\n    * add goto line start/end action\n    * add goto doc start/end action\n    * add goto previous/next line action\n    * add goto previous/next charater action\n    * add goto previous/next word action\n    * change '' braces only go source\n    * fix codecompleter number first\n    * MacOS fix move line up/down shortcut command+shift+up/down\n* GolangEdit\n    * CTRL+mouse navigate preview source info\n* LiteFind\n    * MacOS fix edit replace shortcut command+shift+F\n* Welcome\n    * fix doc css style\n* gotools\n    * types fix limit parser\n    * types simple field info\n\n### 2016.4.15 Ver X29\n* LiteIDE\n    * support for multiple debuggers\n    * support Delve debugger\n    * env GO15VENDOREXPERIMENT=1 default setup\n* LiteBuild\n    * fix project folder id named go, error find go tool\n    * fix project folder contains spaces run failed\n    * fix output number of rows exceeds the maximum input fails\n    * add output add automatic positioning cursor option\n    * add single go file test action\n    * add folder context menu more go tool action\n* LiteEnv\n    * env GO15VENDOREXPERIMENT=1 default setup\n* LiteDebug\n    * support for multiple debuggers\n    * debug berore auto go build -gcflags \"-N -l\"\n    * fix stack frame clicked to doubleClocked\n* DlvDebugger\n    * support dlv debugger\n    * simulation execution 'step-out'\n* GdbDebugger\n    * fix show frame line locate\n    * fix goto line action\n* LiteEditor\n    * display limit tip line info\n* GolangEdit\n    * fix folder contains spaces, gotools fails\n* gotools\n    * add gotest action, test single go file\n    * fix types info, display pkg real name\n\n### 2015.12.10 Ver X28\n* LiteIDE\n    * gotools add go1.5 vendor support if env GO15VENDOREXPERIMENT=1 set\n* LiteApp\n    * folder add sync edit action\n    * fix close folder bug\n* LiteBuild\n    * add folder context lock build path\n    * add folder context gofmt\n    * add output menu auto clear and line wrap action\n* LiteOutput\n    * add set max line option\n* GolangFmt\n    * add new gotools gofmt action\n    * add sortimports option (default)\n* LiteEnv\n    * add var GO15VENDOREXPERIMENT=1 (default comment)\n* GolangAst\n    * support go1.5 vendor\n* LiteEditor\n    * fix selection identifier regexp\n* GolangEdit\n    * support go1.5 vendor\n    * enable oracle enable referres action\n* GolangCode\n    * use set lib-path action\n\n* gotools\n    * types add go1.5 support if GO15VGOROOTXPERIMENT=1 set\n    * types fix cycle import check\n    * types fix pkg find bug\n    * types add unsafe builtin info\n    * astview add go1.5 support if GO15VGOROOTXPERIMENT=1 set\n    * stdlib update to go1.5\n    * add new gofmt action\n    * gofmt import godiff replace diff cmd\n\n### 2015.4.22 Ver X27.2.1\n* LiteIDE\n    * fix editor change crash\n\n### 2015.4.20 Ver X27.2\n* LiteIDE\n    * add output option\n    * add windows native open explorer\n    * add Ukrainian translation thanks Roman Shmelev <rshmelev@gmail.com>\n* LiteEditor\n    * add block selection mode (use Alt key)\n    * fix text mimetype print char check.\n    * fix code completer ...type\n    * fix insert key\n* LiteEnv\n    * optimization go env reload\n* LiteBuild\n    * fix build config\n* LiteFind\n    * fix editor match case replace\n    * fix file search matchWord\n* GolangEdit\n    * fix init option\n    * fix embeded struct find\n    * add oracle support\n* gotools\n    * fix embeded struct type find\n    * add oracle\n\n### 2015.2.16 Ver X27.1\n* LiteIDE\n    * fix code navigate history ( build / astview / debug / link)\n    * fix UNC path crash check\n* LiteEditor\n    * add copy/cut/move/join line action\n    * fix selection color\n    * fix link color\n* GolangEdit\n    * add global find usages and refactor(GOPATH)\n    * add refactor revert mode\n    * add golang symbol document on tooltip\n    * fix no jump code tooltip\n    * fix syntax for Non-English symbol name\n* LiteFind\n    * add find swith replace mode\n    * add replace revert mode\n* LiteBuild\n    * fix build lock custom config\n* GolangAst\n    * fix Non-English symbol name\n* gotools:\n    * type - simple object info\n    * type - add global usages\n    * type - add symbol doc search\n    * type - add XTest files support\n    * type - fix field pos search\n    * astview - update type var and factor to global\n\n### 2015.2.4 Ver X27\n* LiteIDE\n    * create independent project gotools and replace liteide_stub\n    * move build toolbar to the main window\n    * move editor tab to editor widget\n    * fix multi window keyshort invalid\n    * fix treeview scroll bar\n    * fix sidebar keyshort\n* GolangEdit\n    * add editor mouse under symbol tooltip\n    * add ctrl + left mouse button to link navigate\n    * fix embeded func navigate\n    * fix golang syntax parser\n* LiteBuild\n    * add build lock action\n    * update build config file\n    * fix output enter offset\n* LiteFind\n    * update find text by under cursor\n* LiteEditor\n    * add whitespace visible setup option\n    * add line end setup option\n    * fix google pinying editor cursor hide bug\n    * fix editor navigate action\n* JsonEdit\n    * re-implement json format\n* RustEdit\n    * add simple rust support\n\n### 2014.12.25 Ver X26\n* LiteIDE\n    * add lang package support\n    * fix shortcut key call mechanism\n    * fix editor shortcut key monopolize\n* LiteEnv\n    * fix system enviroment auto reset by go env\n* LiteEditor\n    * add simple snippet code\n    * fix enter {} key indent\n    * fix []{} insert and backspace\n    * fix code completer func () insert\n* GolangCode\n    * fix system enviroment work\n    * add auto update package when its source change option\n* GdbDebugger\n    * fix system enviroment gdb/gdb64 auto select\n* GolangEdit\n    * add golang tag highlighter\n\n### 2014.12.16 Ver X25.2\n* LiteIDE\n    * default enviroment id system work\n* LiteApp\n    * fix sort folder on macosx\n* LiteEnv\n    * add reload current enviroment action\n    * set default enviroment id system\n* LiteEditor\n    * fix enter key indent\n    * fix import line regexp\n    * fix complete word suspended  bug (in non go file)\n    * re-implement full text completer\n* GolangDoc\n    * fix lookup godoc on system env\n    * fix path name to pkg name\n* GolangCode\n    * completer import line on GOPATH\n* GolangEdit\n    * add update dependencies library action\n    * add view import package in godoc action\n\n### 2014.12.12 Ver X25.1\n* LiteIDE\n    * both support go1.3 and go1.4\n* LiteApp\n    * fix folders sort by folder first in macosx\n* GolangCode\n    * enable completer import line (standard package)\n* GolangFmt\n    * fix goimports error report bug\n* GolangEdit\n    * fix import line find usages\n* GolangDoc\n    * support go1.4\n* LiteFind\n    * fix search result style sheet\n* FileBorwser\n    * fix sort by folder first in macosx\n\n\n### 2014.12.4 Ver X25\n* LiteApp\n    * default use new style SideBarStyle\n    * add style option SideBarStyle and SplitterStyle\n    * folders use new multi folder class implement\n* LiteEnv\n    * system env lookup go env\n    * add LITEIDE_SHELL support for multiple terminals\n* GolangEdit\n    * find usages both support go1.3 and go1.4\n    * dump find usages error\n    * update goimports standard pkg index\n    * fix find usages Non-English offset\n    * fix faketip on ubuntu\n* FileBorwser\n    * use new folder class implement\n* LiteEditor\n    * fix clipboard    blocking on linux\n    * fix editor brace insert postion\n* GolangFmt\n    * default save use gofmt style\n    * add menu action Code Format(gofmt) (Ctrl+I)\n    * and menu action Code Format(goimports) (Ctrl+Alt+I)\n\n### 2014.11.13 Ver X24.3\n* liteide_stub\n    * merge and optimization code.google.com/p/goimports\n    * fix astview for decl funcs\n    * fix import line find uses\n* LiteApp\n    * update german translation, thanks Harald Leinders\n    * fix PATHEXT no default on windows\n    * fix treeview remove crash bug\n    * fix open terminal\n* GolangEdit\n    * fix import find usages\n    * fix golang func decl syntax highlighter\n* GolangAst\n    * fix astview view missing funcs\n* GolangCode\n    * fix goimports incorrectly removing certain no incorrectly removing no convention import paths\n\n### 2014.11.04 Ver X24.2\n* GolangCode\n    * fix import style\n\n### 2014.11.03 Ver X24.1\n* LiteEditor\n    * fix codecompleter crash\n* GolangCode\n    * prompt pkg not find , enter key to auto import\n    * fix struct offset for gocode\n* GolangFmt\n    * merge goimports to liteide_stub\n    * default use goimports\n\n### 2014.10.24 Ver X24\n* LiteApp\n    * new codecompleter components\n    * log and build output no wrap\n    * update Japanese translation\n    * update German translation\n\n* LiteEditor\n    * new codecompleter components\n    * code completer match by strings.hp  => HasPrefix\n    * code completer sort by prefix\n    * code completer list use tooltip\n    * code completer list updown use ctrl+n/ctrl+p short key\n    * smart () [] \"\" '' `` insert and backspace remove\n    * smart right ) ] \" ' ` insert skip\n    * fix code completer up/down key\n    * fix ctrl+enter/ctrl+shift+enter to insert line after/berore\n    * fix selection highlight\n\n* LiteBuild\n    * golang config custom add TESTARGS/BENCHMARKARGS\n    * output font family use editor family\n\n### 2014.08.05 Ver X23.2\n* gocode add cgo basic completer\n* update option to dialog mode\n* fix godoc target for go1.3\n* fix golang highlighter, return to kate\n* fix short key for macosx\n* fixed Qt5 build crash when exit on macosx\n\n### 2014.07.24 Ver X23\n* LiteIDE\n    * add golang simple lexer for editor\n    * add golang code complete tooltip\n    * golang code complete disable on comment or strings\n    * fix escape return editor\n* LiteEditor\n    * add IHighlighterManager interface\n    * add ITextLexer interface\n    * add new color scheme carbon from William Kennedy <bill@ardanstudios.com>\n    * fix kate code fold\n    * fix code completer offset\n* GolangEdit\n    * add golang simple lexer\n    * add golang highlighter parser\n    * add tooltip for complete\n* GolangPresent\n    * view by QtWebKit\n* WebKitHtmlWidget\n    * change to browser view mode\n\n### 2014.04.14 Ver X22\n* LiteIDE\n    * add golang find usage support\n    * add golang code refactor support\n    * fast jump to declaration\n    * add reload folder/files option on startup.\n* LiteIDE\n    * fix code fold bug\n* LiteDebug\n    * add call frame goto line\n* LiteEnv\n    * add freebsd env\n* LiteFind\n    * new find result view from QtCteator\n* GolangEdit\n    * new golang editor support plugin\n    * find usages\n    * rename symbol under cursor\n* MarkdownEdit\n    * add Github_Word.css, thanks github.com/lixiaolong\n\n### 2014.03.20 Ver X21.1\n* LiteIDE\n    * reduce application memory usage\n    * add new golang doc search (modification from rspace doc tool)<http://code.google.com/p/rspace.cmd/doc>\n    * update golang api index\n    * folder add go build context menu\n    * short folder name\n    * optimization litide_stub api tool\n    * add kate solarsooty.xml thanks for Unknown <https://github.com/Unknwon>\n    * add code complete short key (ctrl+space)\n    * fix gocode automatically plugin\n    * fix golang present verify plugin\n\n### 2014.03.06 Ver X21\n* LiteIDE\n    * fast highlighter for MacOS X 10.9\n    * fast expression lookup F1/F2\n    * cancel x20 always open in new window mode.\n    * add new JsonEdit plugin.\n    * add reload/close dialog YesToAll, if modified on the drive.\n    * add auto reload files option, if modified on the drive.\n    * add store setting to local ini file option.\n    * fix folder expand state\n    * fix for case sensitive path comparison on windows\n    * fix memory leak\n* LiteBuild\n    * add golint support\n* LiteEnv\n    * recreate system.env\n* LiteEditor\n    * new color scheme gist-github (thanks William Kennedy <bill@ardanstudios.com>)\n    * fix if/else syntax fold\n* GolangAst\n    * add type factor to funcs folder\n    * add type const\n    * add import symbol, and view document menu\n    * add context menu\n    * add symbol extra info\n* GolangFmt\n    * fix timeout\n    * fix GOPATH\n* GolangDoc\n    * fast expression lookup F1/F2\n\n### 2013.12.09 Ver X20\n* LiteIDE\n    * add folders manager\n    * always open folder with new window (option)\n    * editor add navigate area for code format or build error\n    * add new GolangPresent plugin\n    * tool windows use instantpopup\n    * update editor tab context menu\n    * add evilworks.qss style (by Vedran Vuk <vedranvuk82@gmail.com>)\n* LiteEditor\n    * add error navigate area\n    * update kate highlighter\n    * add gopresent.xml syntax\n    * add Visual Studio Theme (by William Kennedy <bill@ardanstudios.com>)\n    * fix goto match braces\n    * update editor menu\n* LiteEnv:\n    * auto set $PATH for GOROOT/bin and GOBIN and GOPATH/bin and GOPATH/bin/GOOS_GOARCH\n    * fix to use utf8 encoding\n* GolangCode:\n    * auto update depends package (option)\n    * fix close gocode on last window close\n* GolangFmt:\n    * use sync code format (option)\n    * use goimports instead gofmt (option)\n    * code format error show in editor navigate area\n* LiteDebug:\n    * external cmd setting\n    * fix command input foucus\n* Markdown:\n    * add new Github_Style.css (by Slene <vslene@gmail.com>)\n* FileBrowser:\n    * option show hidden files\n* LiteBuild:\n    * fix build menu enable\n    * build error show in editor navigate area\n    * add gopm(Go Package Manager) tool <https://github.com/gpmgo/gopm>\n* GolangPresent:\n    * support golang present editor\n    * verify present error show in editor navigate area\n    * export golang present to html\n* Welcome:\n    * update document\n    * add zh_CN document\n\n### 2013.7.17 Ver X19\n* LiteIDE\n    * MacOS X 10.8 Retina support\n    * add simple webkit browser\n    * update macosx tool window short key to Ctrl+Alt+1~9\n* LiteDebug\n    * add debug go test support, thanks for GoEddie <https://github.com/GoEddie>\n* GdbDebugger\n    * gdb debugger --tty mode support (windows default)\n    * debugger command input foucus\n* LiteEditor\n    * add wheel zooming option\n    * fix editor extra width\n    * fix init editor update\n* LiteFind\n    * fix find hide\n* Markdown\n    * markdown preview fast sync\n\n### 2013.5.21 Ver X18.2\n* fast for gocode\n* add option to close gocode on exit\n* auto append GOPATH/bin to liteide env PATH\n* editor extern highlighting \"TODO\"\n* go code auto-complete ignores strings and comments\n\n### 2013.5.10\n* compiled compatibility for qt5.02\n\n### 2013.5.8 Ver X18.1\n* optimization gocode plugin\n* execute preload litebuild/command/*.api\n* execute enable tab key to compiler\n\n### 2013.5.7 Ver X18\n* English spelling and grammar corrections throughout, thanks for Nik-U <https://github.com/Nik-U>\n* LiteIDE:\n    * Improved event log\n* litefind:\n    * Find/Replace commands highlight existing text\n    * enable find file\n    * add close button\n* liteeditor:\n    * Word wrap support\n    * Added option to trim whitespace on save\n    * Added option to hide edit toolbar\n    * update kate and color scheme\n    * fix kate/highlight tab\n    * fix editor indent guide by tabsize\n* liteapp:\n    * fix full screen bug\n* litebuild:\n    * execute use combbox\n    * add close button\n* litedebug:\n    * add close button\n* markdown:\n    * enable markdown(sundown) extend\n\n### 2013.2.8 Ver X17\n* LiteIDE:\n    * move execute from filesystem to bottom tool\n    * escape for any bottom tool window (find , execute ...)\n    * macosx lion full screen\n    * add color theme highcontrastdark.xml and app theme black.qss, thanks for addxtoy <pollux@lavabit.com>\n    * add tr liteide_de.ts , thanks for Helge Plaschke <https://github.com/HelgePlaschke>\n    * fix keybord scheme\n* liteeditor:\n    * show tab ident guide\n    * show find scope expression\n    * show selection scope expression\n    * show file eof - option\n    * show line wrap (markdown editor)\n    * update current line color\n    * any time focus if need\n    * fix zoom tab width\n    * fix open file cursor position start\n    * fix set color theme not request restart\n* markdown:\n    * fix export path\n* filesystem:\n    * fix double clicked item and execute\n* litedebug:\n    * save/restore start editor\n    * fix breakpoint move in editor\n    * fix debug target args\n* litefind:\n    * new find and replace\n    * fix find editor and unfold\n    * fix backword find\n* litebuild:\n    * add test bench\n* document:\n    * enable zoom font size Ctrl++/Ctrl+-/Ctrl+0\n    * fix find crash\n* gopath setup:\n    * fix invalid path\n\n\n### 2013.1.16 Ver X16\n* support keybord mapping scheme\n* fix: lookup go command in $PATH\n* fix: remove GOBIN enviroment set\n* fix: empty editor cursor position\n* fix: double click error output to jump source and editor set focus\n\n### 2013.1.10 Ver X15.2\n* LiteIDE:\n    * use new logo and icon\n    * support go version hg-tip\n* LiteApp:\n    * update logo\n    * update splash\n    * add action close same/other folder files\n    * fix full screen restore\n* LiteEnv:\n    * add user env files\n* LiteEditor:\n    * fix `Insert` key\n    * update sublime color scheme\n* GolangDoc:\n    * support go tip version\n    * show error output\n* GolangCode:\n    * fix code completer icon visible\n* Golang Fmt:\n    * fix timeout option invalid\n* Markdown:\n    * fix critical messsage\n    * add css Documents.css\n\n### 2012.12.28 Ver X15.1\n* LiteIDE:\n    * update logo\n* LiteApp:\n    * plugins custom load\n    * custom style use css(Qt Style Sheets)\n    * add style coffee\n    * fix template `doc.go`\n    * tabs middle button close editor\n    * fix memory leak\n* LiteEditor:\n    * font zoom support\n    * add sublime color scheme, thanks for `Henson Lu`\n    * custom tab width and tab to spaces for mimetype\n* LiteEnv:\n    * add cross-compiler\n* GolangDoc:\n    * fix goto source\n\n### 2012.12.18 Ver X15\n* LiteIDE:\n    * add markdown plugin\n    * changed LiteApp to dynamic library\n    * redesign editor menu and toolbar\n    * update doc to markdown format\n    * add html render twin-engine\n        * internal QHtmlBrowser\n        * plugin QtWebKit, if find qt webkit dynamic library\n* LiteApp:\n    * changed to dynamic library\n    * support full screen mode\n    * editor tabs change to toolbar\n    * add toolbar icon size option\n    * add splash visible option\n    * add editor tab bar close button visible option\n    * add tab context menu close left or right tabs\n* LiteEditor:\n    * add overwrite mode (key Insert)\n    * add  custom tab width option\n    * redesign editor menu , context menu and toolbar\n    * add right margin line visible option\n* GolangFmt:\n    * fix comment offset, remove spaces\n* LiteBuild:\n    * id BuildAndRun before kill old process\n    * redesign build toolbar and menu\n    * support GOBIN\n* LiteDebug:\n    * add debug before rebuild option\n    * add debug external application action\n* Markdown:\n    * markdown editor support\n        * action h1-h6, bold, italic, code, list, quote, hr, link, image\n        * syntax highlighting\n        * live preview\n        * sync scroll\n        * export html\n        * export pdf\n        * custom css , css files from [Mou](http://mouapp.com)\n    * markdown batch\n        * separate to html\n        * separate to pdf\n        * merge to html\n        * merge to pdf\n* GolangDoc:\n    * fix url parser\n\n\n### 2012.11.15 Ver X14.1\n* LiteIDE : quick start\n* LiteApp : multi instance support\n* GolangDoc: deply load mode\n* GolangPackage: deply load mode\n* GolangAst : fix classview\n* LiteEditor: fix if/else fold\n* GolangDoc : goapi enable _test\n\n### 2012.11.6 Ver X14.0\n* tools/goapi : new goapi tool\n* GolangDoc: View Expression Information (F1)\n* GolangDoc: Jump to Declaration (F2)\n* GolangDoc: lookup all GOPATH pkg api\n* LiteApp: fix editor navigate\n* LiteEditor : add action Move to New Windows\n* LiteFind : focus in find text and enter\n* LiteEditor: fix code completer func test ()\n* GolangCode : auto restart gocode if liteide GOPATH changed\n* GolanPlay: enable gocode and fmt\n* GolangFmt: auto popup gofmt messsage option\n* LiteBuild : fix build config custom view\n* LiteBuild : BUILDARGS / INSTALLARGS support set\n  example -gcflags \"-N -l\" for debug\n  example -ldflags \"-s\" for release\n* remove: Makefile plugin , Profile plugin, x64 Project\n\n### 2012.10.10 Ver X13.2\n* GolangCode : the best support for gocode\n* LiteApp : add editor tab context menu\n* LiteApp : update view menu\n* LiteApp : fix check modify and save\n* GolangFmt : fix fmt editor style restore\n* GolangDoc : fix go/doc/*.html parser meta \"Path=\"\n* GolangAst : fix update model style restore\n* Welcome : update page\n* LiteEnv : edit enviroment action\n* LiteBuild : update gosrc.xml\n* LiteBuild : fix double click goto line regexp\n* LiteBuild : show enviroment go env\n* LiteBuild : execute error use red font\n* LiteEditor : color theme set currnet line background\n* LiteEditor : add color theme darktango.xml(Dumitru Ungureanu)\n* LiteEditor : go wordapi update, keyword types and funcs\n* LiteEditor : code completer func auto append ()\n* LiteEditor : fix tab indent\n* FileSystem : fix execute find path\n* LiteFind : fix current directory\n\n### 2012.9.24 Ver X13.1\n* LiteBuild : fix build load crash.\n* LiteApp : fix double click error output regexp\n* LiteApp : fix folder drop to liteide\n* LiteDebug : watch vars load /save by project\n* LiteDebug : breakpoint load /save by file\n* LiteDebug : add remove all breakpoint action\n* LiteDebug : add / remove global or local watch point\n* LiteEditor : optimization editor mark\n* LiteEditor : enable drop text\n* GolangPlay : enable gofmt\n\n### 2012.9.21 Ver X13\n* LiteApp : any folder, any file to build\n* LiteApp : update window style, add editor toolbar and status\n* LiteEditor : remove editor toolbar\n* LiteEditor : extra use editor font\n* LiteBuild : new build toolbar and menu\n* LiteBuild : clean action tags\n* GolangFmt : sync execute gofmt\n* GolangDoc : deply filter index\n* GolangAst : classview for folder\n* Outline : alltime expand\n* FileBrowser : rename to FileSystem\n* FileSystem : sync editor file to folder\n* FileSystem : add go command line edit (Ctrl+`)\n* FileSystem : double click execute file and execute on build output\n* Windows : include diff bin\n\n### 2012.9.14 Ver X12.5\n* LiteApp : move dock style, change to idea style tool windows.\n* LiteApp : double click editor and maximized or restore editor\n* LiteApp : esc key to hide bottom tool windows\n* LiteApp : auto load last session\n* LiteEditor : add edit navigate histroy\n* LiteEditor : extra use color scheme\n* GolangFmt : show error log and goto line\n\n### 2012.7.12 Ver X12.2\n* GolangFmt : fix fold error diff bug\n* LiteDebug : add var watch, example main.var os.Stdout\n* Welcome : add load last selection\n* LiteEditor : add fold or unfold all action\n* LiteEditor : add duplicate action\n* LiteEditor : add color theme railscast.xml(Alexander Rødseth)\n* LiteFind : default find use editor selection\n* LiteEnv : fix windows env LITEIEDE_EXECOPT=/C\n* LiteApp : fix icon on windows xp unable show\n\n### 2012.6.28 Ver X12.1.1\n* LiteEditor : fix fold bug - line include \"head{}end\"\n* LiteEditor : kate go.xml breace match add \"[]\"\n\n### 2012.6.27 Ver X12.1\n* LiteIDE : LiteIDE use new logo\n* LiteEditor : fold / unfold\n* LiteEditor : color scheme custom selection\n* LiteEditor : kate go.xml remove linecontinue\n* LiteEditor : goto line\n* LiteApp : fix recent file load bug\n* GdbDebugger : fix frame if not find fullname\n* LiteIDE : update faq document\n* LiteIDE : add install document\n\n### 2012.6.13 Ver X12 1.875\n* LiteIDE : reset resource directory\n* LiteEditor : goto next/prev block\n* LiteEditor : code comment\n* LiteEditor : braces match\n* LiteEditor: LRLF check by \\n\n* LiteEditor: no print char conver to .\n* LiteEditor: move tooltip to status\n* GolangFmt : enable gofmt diff\n* GolangFmt : save auto gofmt\n* LiteBuild: project build toolbar and editor build toolbar.\n* LiteFind: add file search\n* PackageBrowser: fast load\n\n### 2012.5.16 Ver X11 1.71875 beta4.1\n* LiteBuild: fix execute args for gosrc/gopro/makefile\n* LiteApp: add option - when close project auto close project editors\n* PackageBrowser : double click pkg and load project\n* LiteEditor: add option - completer case sensitive\n\n### 2012.5.15 Ver X11 1.71875 beta4\n* GolangPackage : enable local package\n* GolangDoc : golang api fmt#Println -> fmt.Println\n* LiteBuild : fix regexp error\n* FileSystem: (windows) fix rename abc to Abc false\n* PackageProject : remove auto reload timer\n* LiteEditor: (linux) redo enable CTRL+Y\n\n### 2012.5.2 Ver X11 1.71875 beta3\n* GolangPackage : new golang package plugin for GO1\n* GolangPackage : PackageBrowser and PackageProject for GO1\n* GolangTool : remove the plugin\n* GolangDoc: add golang api for GO1\n* GolangDoc: add golang api filter\n* GolangAst: add filter\n* GolangAst: classview and outline\n* LiteEditor : completer option\n* LiteApp : new file wizard support GO1\n* Welcome : new recent page\n* gopromake : update pkg depend\n\n### 2012.3.9 Ver X11 1.71875 beta2\n* GolangPlay : new go playground plugin\n* GolangTool : sync editor, sync project\n\n### 2012.3.1 Ver X11 1.71875 beta1\n* GolangTool : new golang plugin for GO1, import GOPATH project\n* GolangDoc : update to GO1\n* LiteBuild : update to GO1\n* tools : udpate all tools for GO1\n\n### 2011.9.26 Ver X10 1.5625\n* LiteEditor : add line mark api\n* LiteDebug : new debug toolbar\n* LiteDebug : insert/remove break\n* LiteDebug : breakpoint and current line mark\n* GdbDebugger : async record view\n* GdbDebugger : variables expand tree\n* GdbDebugger : call stack view\n* GdbDebugger : load library view\n* TerminalEdit : provided to LiteBuild and LiteDebug\n\n### 2011.9.14 Ver X9 1.40625\n* LiteDebug : new debug manager plugin\n* GdbDebugger : new gdb debugger plugin\n* LiteBuild : add build config and custom\n* LiteFind : fix regexp use match case\n\n### 2011.9.1 Ver X8 1.25\n* LiteFind : new find and replace plugin, remove CodeSearch plugin\n* LiteEditor : fix word api completer three parts error\n* LiteEditor : fix word api completer sorted\n* LiteApp : fix main window state load/save on linux\n* LiteApp : change path to standard linux path\n* LiteBuild : add build option, example execute arguments\n* FileBrowser : add new file wizard\n\n### 2011.8.12 Ver X7 1.09375\n* Welcome : new html page, quick link, session, recent projects and files\n* GolangDoc : generic document nav\n* GolangDoc : scheme entry [file|list|find|pdoc]\n* FileBrowser : add \"View Godoc Here\"\n* LiteBuild : auto clean output if line more than 1024\n* LiteEditor : word completer sorted\n* LiteEditor : auto braces last state check\n* GolangAst : show type struct field\n* GolangAst : editor state keep self\n\n### 2011.7.28 Ver X6 0.9375\n* LiteEnv : new plugin, liteide enviroment setup\n* Welcome : add LiteIDE document browser\n* GolangDoc : add package find, example input \"zip\" and find\n* GolangDoc : add godoc /src/pkg/ and /src/cmd/ tree\n* GolangDoc : add go/doc/ document browser\n* GolangDoc : add document browser text search\n* LiteEditor : add export html file\n* FileBrowser : add menu item desktop explorer\n* LiteEditor : add enable automatic insert brackets\n* LiteEditor : add option :  display  and behavior\n* LiteApp : fix session load last editor or welcome page\n* LiteApp : fix find mimetype incorrect\n* GolangCode : fix application exit gocode close\n* FileBrowser : fix context menu popup on root\n* LiteBuild : fix ouput html format to plaintext\n* LiteBuild : fix build does not handle spaces in file paths\n* LiteBuild : fix output append \\n->next append\n* LiteBuild : fix enviroment depend of LiteBuild\n\n### 2011.7.7 Ver X5 v0.78125\n* add CodeSearch plugin : Editor Search and Replace\n* add GolangDoc plugin : Golang Package Find\n* add Search and Replace Regex: (Colo)(u)(r) -> \\1\\3\n* add FileBorwser top dir setup\n* add LiteEditor Copy Syntax Color support (HTML mimedata)\n* add LiteEditor ReadOnly\n* add MainWindow all DockWidget saveState\n* add EditorManager CTRL+TAB switch\n* update tools/gopromake to r58\n* update tools/goexec to r58\n* update tools/goastview to r58\n* fix filebrowser rename show oldname\n* fix ENV c:/go/bin;%PATH% order, GOBIN is priority\n* fix FileBrowser sort incorrect on MACOSX\n* fix GoFmt reload editor display pos keep\n* fix Editor Close Ask BUG ret==SaveAll\n* fix Editor word writed ,completer only one match auto hide\n\n### 2011.6.30 Ver X4 v0.625\n* add interface zh_cn\n* add filebrowser pluing add/change/remove\n* add editor color style scheme setup\n* add editor codec check/reload\n* add editor pdf export\n* add editor print and preview\n* editor style line LRLF of source\n* kate go.xml support \"number\" style\n* liteapp last session save/load\n\n### 2011.6.21 Ver X3 v0.46875\n* add file browser plugin\n* source editor pre link project build\n* source editor outside modify/remove watcher\n\n### 2011.5.20 Ver X2 v0.3125\n* add gocode plugin\n* add build/makefile\n* add build/lua stdoutput:setvbuf(\"no\")\n* fix build task stop on error\n* fix build process write \\n\n\n### 2011.5.12 Ver X1 v0.15625\n* New LiteIDE X version\n\n------\n\n## LiteIDE Old version\n\n### 2011.2.25  v0.2.1\n* add build on MacOSX10.6\n* support Makefile and .pro project\n* project support GCOPT and GLOPT\n* global option page\n* global output pane\n* set GOROOT option\n* run shell\n* run debug\n* run process can write\n* run process can kill\n* clean project opt temp or all\n* new project wizard : .pro/package/Makefile\n* new example goinfo, how to use local or search package\n\n### 2011.1.25 v0.1.8\n* goastview plugin\n\n### 2011.1.18 v0.1.6\n* add build on Linux64\n\n### 2011.1.12 v0.1.5\n* build error and jump to source line\n\n### 2011.1.11 v0.1.2\n* gopromake use goroutines\n\n### 2011.1.10 v0.1\n* init version\n"
  },
  {
    "path": "liteidex/deploy/welcome/en/forever.md",
    "content": "<!-- Forever -->\n\nForever\n=======\n\n## 道德经\n道可道，非常道。名可名，非常名。\n无名天地之始；有名万物之母。\n\n## 2018.02.14 \n**三十功名尘与土，八千里路云和月。**\n\n## 天行健\n**天行健，君子以自强不息。地势坤，君子以厚德载物。**\n\n![](images/liteide.png)\n\n## logo \n\n![](images/liteide400.png)\n\n## @_@\n佛祖问阿难：你有多喜欢这少女? 阿难说：我愿化身石桥，受五百年风吹，五百年日晒，五百年雨打，但求此少女从桥上走过。\n\n\n## with you\n\n![](images/flamingo.png)\n\n## forever\n![](images/forever.png)\n\n"
  },
  {
    "path": "liteidex/deploy/welcome/en/guide.md",
    "content": "<!-- Feature Guide -->\n\n# LiteIDE Feature Guide\n\n## How to use the low version Go1.1 and Go1.2\nLiteIDE build config default use -i flag, if use Go1.1 or Go1.2 not support. View -> Options -> LiteBuild double click gosrc.xml to edit, modify BUILDARGS value:\n\n\t<custom id=\"BuildArgsi\" name=\"BUILDARGS\" value=\"-i\"/>\n\t\nset value to empty and restart LiteIDE to support Go1.1 and Go1.2.\n\n## Window Style Setup\nLiteIDE now support splitter style and side style.\n\nOptions->View->LiteApp-> Style\n\n## Environments\nThe LiteIDE environment setup plugin allows you to quickly switch between multiple system environments for your build.  Each environment has its own set of environment variables that can be used to control the build process.\n\n### Selecting an Environment\nThe dropdown in the toolbar can be used to select the environment currently being used for builds.  By default, the `system` environment, representing the platform and architecture of the host machine, is used.\n\n![envselect.png](../images/envselect.png)\n\nThe following environments are provided as part of the supported platforms:\n* Windows - system win64 win32\n* Linux - system linux64 linux32\n* MacOSX - system darwin64 darwin32\n\nSee the section below on cross-compiling before switching to a non-native environment.\n\n### Configuring an Environment\nThe variables defined as part of the environments can be modified by hand.  To edit an environment, simply click the `Edit Environment` button next to the environment dropdown when the desired environment has been selected.\n\nAlternatively, environments can be viewed and edited in the `View > Options > LiteEnv` panel.\n\nExample `win32.env`:\n\n    #win32 environment\n    \n    GOROOT=c:\\go\n    #GOBIN=\n    GOARCH=386\n    GOOS=windows\n    \n    PATH=c:\\mingw32\\bin;%GOROOT%\\bin;%PATH%\n    \n    LITEIDE_GDB=gdb\n    LITEIDE_MAKE=mingw32-make\n    LITEIDE_TERM=%COMSPEC%\n    LITEIDE_TERMARGS=\n    LITEIDE_EXEC=%COMSPEC%\n    LITEIDE_EXECOPT=/C\n\n\nExample `linux32.env`:\n\n    #linux32 environment\n    \n    GOROOT=$HOME/go\n    #GOBIN=\n    GOARCH=386\n    GOOS=linux\n    \n    PATH=$GOROOT/bin:$PATH\n    \n    LITEIDE_GDB=gdb\n    LITEIDE_MAKE=make\n    LITEIDE_TERM=/usr/bin/gnome-terminal\n    LITEIDE_TERMARGS=\n    LITEIDE_EXEC=/usr/bin/xterm\n    LITEIDE_EXECOPT=-e\n\t\n## Quick Open\n\n* QuickOpen Ctrl+P\n* QuickOpenEditor Ctrl+Alt+P or QuickOpen window input ~\n* QuickOpenSymbol Ctrl+Shift+O or QuickOpen window input @\n* QuickOpenLines  Ctrl+L or QuickOpen window input :\n* Help QuickOpen window input ?\n\n## Cross-compilation (Go1.5 or high) \nChange LiteIDE environment , set GOROOT GOARCH GOOS, build project.\n\n## Cross-compilation (before Go1.5) \nYou will need to build or install Go compilers for other platforms and architectures before cross-compiling.  If you do not do this, you may receive errors about missing executables or even the following error:\n\n    %GOROOT%/src/pkg/runtime/extern.go:137: undefined: theGoos\n\nSee the \"Building compilers\" subsection for examples.\n\n### Environment variables\nTo cross-compile your project for another operating system or architecture, you will need to define the following variables in your environment:\n\n* `$GOOS` - the name of the target operating system (default: `$GOHOSTOS`).  Possible values are:\n    * darwin (Mac OS X 10.6 and above)\n    * freebsd\n    * linux\n    * netbsd\n    * openbsd\n    * plan9\n    * windows\n* `$GOARCH` - the name of the target architecture (default: `$GOHOSTARCH`).  Possible values are:\n    * amd64 (64-bit x86, the most mature port)\n    * 386 (32-bit x86)\n    * arm (32-bit ARM)\n* `$GOARM` - ARM architecture version the run-time libraries should target (default: 6).\n    * Setting `$GOARM` to 5 causes the linker to emit calls to a software floating point implementation instead of using hardware floating point support. \n* `$CGO_ENABLED`\n    * This should be set to 0 when cross-compiling.\n\n### Building Compilers\nTo build the compilers for cross-compilation, run the appropriate script from the Go sources directory.  The examples below demonstrate how to build some common compilers; you must modify the environment variables appropriately.\n\n**go1.5 or high (go1.8 cross-compile CGO_ENABLED auto set 0)**\n\nBuilding cross-compiler for 64-bit Linux on Windows (in MinGW with GCC):\n\n    > set GOARCH=amd64\n    > set GOOS=linux\n\t> set CGO_ENABLED=0\n\t> go build std\n\nBuilding cross-compiler for 32-bit Windows on macOS:\n\n    > GOARCH=386 GOOS=window CGO_ENABLED=0 go build std\n\nBuilding cross-compiler for Linux ARM on macOS:\n\n    > GOARCH=arm GOOS=linux CGO_ENABLED=0 go build std\n\n**go 1.0 go1.1 go1.2 go1.3 go1.4**\n\nBuilding cross-compiler for 64-bit Linux on Windows (in MinGW with GCC):\n\n    > set GOARCH=amd64\n    > set GOOS=linux\n    > set CGO_ENABLED=0\n    > cd %GOROOT%\\src\n    > all.bat\n\nBuilding cross-compiler for 32-bit Windows on macOS:\n\n    > export GOARCH=386\n    > export GOOS=windows\n    > export CGO_ENABLED=0\n    > cd $GOROOT/src\n    > ./all.bash\n\nBuilding cross-compiler for Linux ARM on macOS:\n\n    > export GOARCH=arm\n    > export GOOS=linux\n    > export CGO_ENABLED=0\n    > cd $GOROOT/src\n    > ./all.bash\n\n### Building\nTo actually perform a cross-compilation in LiteIDE, begin by selecting the appropriate environment as described above.  Ensure that the environment has the correct variables set.  `GOARCH`, `GOOS`, `GOARM`, and `CGO_ENABLED` must be set as outlined previously.  Ensure that `GOROOT` and `GOBIN` are also properly defined for your host platform, and that your `PATH` includes the Go binary and Go's `bin` directory.\n\nOnce the target environment has been selected, simply rebuild your project in the editor.\n\nExample configuration for cross-compiling 64-bit Linux binaries on Windows:\n\n    GOROOT=c:\\go\n    GOBIN=\n    GOARCH=amd64\n    GOOS=linux\n    CGO_ENABLED=0\n    \n    PATH=%GOBIN%;%GOROOT%\\bin;%PATH%\n    ...\n\t\n## Golang Code Format\t\nAutomatic formatting when saving.\n\n### Goimports\nLiteIDE View->Options->GolangFmt-> Use goimports instead of gofmt, for code format\n\nThis tool updates your Go import lines, adding missing ones and\nremoving unreferenced ones.\n\n## Gocode\nCode completion use gocode <https://github.com/nsf/gocode>. gocode works by inspecting the .a files from the project dependencies, so if the code completion is not working properly, please update project dependant packages/libraries.\n\n### update dependant packages\nupdate dependant packages for gocode, click build menu or toolbar `Get`(go get)\n\n### auto update dependant packages\nLiteIDE View->Options->Gocode-> auto update depends packages\n\n## Build System\nLiteIDE's build system is highly configurable, allowing you to define your own custom build actions using XML files.\n\n### Configuring Build Actions\nTo modify the available build options, open `View > Options > LiteBuild`.  You can add your own images in this directory to define new icons.  Any XML files in this directory are read to load action buttons.  Double click on an XML file to edit it.  Each XML file defines all of the build actions for one particular type of file.\n\nExample XML for Lua (`lua.xml`):\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n\t<mime-type type=\"text/x-lua\" id=\"lua\" work=\"$(EDITOR_DIR_PATH)\" lock=\"file\" ver=\"2\">\n\t\t<config id=\"GoTools\" name=\"GOTOOLS\" value=\"$(LITEIDE_TOOL_PATH)/gotools\"/>\n\t\t<action id=\"Run\" key=\"Ctrl+R\" img=\"run.png\" cmd=\"lua\" args=\"-e io.stdout:setvbuf('no') $(EDITOR_FILE_NAME)\" save=\"editor\" output=\"true\" codec=\"utf-8\" regex=\"([\\w\\d:_\\-\\\\/\\.]+):(\\d+)\" readline=\"true\" />\n\t\t<action id=\"RunTerm\" key=\"Ctrl+Shift+F5\" img=\"runterm.png\" cmd=\"$(LITEIDE_EXEC)\" args=\"$(LITEIDE_EXECOPT) $(GOTOOLS) runcmd lua -e io.stdout:setvbuf(&quot;no&quot;) $(EDITOR_FILE_NAME)\" save=\"editor\" output=\"false\" readline=\"true\"/>\n\t</mime-type>\n</mime-info>\n```\n\n## Godoc Viewer\nLiteIDE includes an integrated viewer for godoc output.  Documentation can be viewed for the Go language itself or for your own packages.  Open the viewer using `View > Godoc Viewer` for more details.\n\n## Search and replace\nThe editor provides search and replace functionality in the `Find` menu.  Regular expressions are supported.  For example:\n\n    Find: (Colo)(u)(r)\n    Replace: \\1\\3\n\nThe above example will replace all instances of `Colour` with `Color`.\n\nSearch functionality is also provided for the filesystem through `Find > File Search`.\n\n## Debugging\nTo debug your code with LiteIDE, you must have GDB installed (part of MinGW for Windows users).  See `INSTALL` for installation details.\n\nThe environment variable `LITEIDE_GDB` can be used to control which binary is executed for debugging.  32-bit Windows will use `gdb.exe`, while 64-bit Windows will use `gdb64.exe`.  Configure this environment variable in your environment file.\n\n## Keybord Mapping Scheme\nYou can modify the shortcut keys used for all of LiteIDE's features.  Open `View > Options > LiteApp > Keyboard` to modify the hotkeys.  Double click on the shortcut in the list to edit it, and press `Apply` to apply the changes.\n\nShortcut keys must follow a specific format.  You can separate items using a comma (`,`) to form an AND relationship (i.e. both shortcuts must be pressed to activate the item).  Separate items with a semicolon (`;`) to form an OR relationship (i.e. any of the shortcuts will activate the item).  This is normally what you want.\n\nExamples:\n* `Ctrl+B`\n* `Ctrl+Shift+B`\n* `Ctrl+K,Ctrl+U`\n* `Ctrl+Y;Ctrl+Shift+Z`\n"
  },
  {
    "path": "liteidex/deploy/welcome/en/install.md",
    "content": "<!-- Install -->\n\n# Installing LiteIDE\n## Prerequisites\nUse LiteIDE development golang need to install the Go language development environment.\n\n### Go\nBegin by installing the Go language runtime.  Detailed instructions can be found at <http://golang.org/doc/install.html>.  Testing your installation before continuing is highly recommended.\n\n## Install from binary\n<http://sourceforge.net/projects/liteide/files>\n\n### Windows\nDownload the archive and extract it into c:\\\n\n### Linux and MacOSX\nDownload the archive and extract it into /usr/local or $HOME\n\n## Building from Source\nSource code for LiteIDE can be found at <https://github.com/visualfc/liteide>.  You will need to install Qt4/Qt5 in order to compile the source.  Qt can be obtained from <https://qt-project.org/downloads> or from your distribution's package manager. For Mac OS X, you don't need to install Qt from source code, but run `brew update && brew install qt` which will save you several hours.\n\n### Windows\n\n**Qt4**\n\n\t> git clone https://github.com/visualfc/liteide.git\n\t> set QTDIR=c:\\Qt\\Qt4.8.5\n\t> set MINGWDIR=c:\\Qt\\MinGW\n\t> cd liteide/build\n\t> update_pkg.cmd\n\t> build_windows_mingw.cmd\n\t> deploy_windows_qt4.8_webkit.cmd\n\n**Qt5.6**\n\n\t> git clone https://github.com/visualfc/liteide.git\n\t> set QTDIR=C:\\Qt\\Qt5.6.2\\5.6\\mingw49_32\n\t> set MINGWDIR=C:\\Qt\\Qt5.6.2\\Tools\\mingw492_32\n\t> cd liteide/build\n\t> update_pkg.cmd\n\t> build_windows_mingw.cmd\n\t> deploy_windows_qt5.6.cmd\n\t\n### Ubuntu 16.04 Qt4\n\t## Install Qt4 ##\n\t$ sudo apt-get update\n\t$ sudo apt-get install libqt4-dev\n\n\t## Git clone and build liteide ##\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ ./build_linux_qt4.sh\n\t\n\t## Run it: ##\n\t$ cd liteide/build/liteide/bin\n\t$ ./liteide\n\t\n\t## Deploy it: ##\n\t$ cd liteide/build\n\t$ ./deploy_linux_x64_qt4.sh\n\t## 32 bit\n\t$ ./deploy_linux_x32_qt4.sh\n\t\n### Ubuntu 16.04 Qt5\n\t## Install Qt5 ##\n\t$ sudo apt-get update\n\t$ sudo apt-get install qt5-default\n\t\n\t## Git clone and build liteide ##\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ ./build_linux_qt5.sh\n\t\n\t## Run it: ##\n\t$ cd liteide/build/liteide/bin\n\t$ ./liteide\n\t\n\t## Deploy it: ##\n\t$ cd liteide/build\n\t$ ./deploy_linux_x64_qt5.sh\n\t## 32 bit\n\t$ ./deploy_linux_x32_qt5.sh\n\n### Ubuntu 14.04\n\t$ sudo apt-get update\n\t$ sudo apt-get install qt4-dev-tools libqt4-dev libqt4-core libqt4-gui libqtwebkit-dev g++\n\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ QTDIR=/usr ./build_linux.sh\n\t\n\t## Run it: ##\n\t$ cd liteide/build/liteide/bin\n\t$ ./liteide\n\n### Linux\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ export QTDIR=$HOME/QtSDK/Desktop/Qt/484/gcc\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ ./build_linux.sh\n\t$ ./deploy_linux_qt4.8_webkit.sh\n\n### Mac OS X / macOS\n\n**Qt 4**\n\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ export QTDIR=$HOME/QtSDK/Desktop/Qt/484/gcc #If QT is installed with brew, input: export QTDIR=/usr/local/Cellar/qt/4.8.6\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ ./build_macos_qt4.sh\n\t$ ./deploy_macos_qt4.sh\n\t$ open liteide/LiteIDE.app\n\n**Qt 5 sdk install**\n\nDownload Qt from http://www.qt.io/download and install. (Qt5.6.2/Qt5.7.1/Qt5.8)\n\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ export QTDIR=$HOME/Qt5.6.2/Qt5.6/clang_64\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ ./build_macos_qt5.sh\n\t$ ./deploy_macos_qt5.sh\n\t$ open liteide/LiteIDE.app\n\t\n**Qt 5 brew install**\t\n\nUse brew install qt (eg brew install qt. Other versions of qt@5.5 and qt@5.7 works too).\n\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ export QTDIR=/usr/local/Cellar/qt/5.8.0_2 # or modify accordingly for qt@5.5 and qt@5.7\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ ./build_macos_qt5.sh\n\t$ open liteide/LiteIDE.app\n\nWarning! brew install qt rpath incorrect do not use deploy script. \n\n### OpenBSD\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ export QTDIR=/usr/local/lib/qt4\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ ./build_openbsd.sh\n\n\t## Run it: ##\n\t$ export LD_LIBRARY_PATH=$HOME/liteide/build/liteide/bin:$LD_LIBRARY_PATH\n\t$ cd liteide/build/liteide/bin\n\t$ ./liteide\n\n### Raspbian Jessie\n\t$ sudo apt-get update\n\t$ sudo apt-get install qt5-default xterm\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ QTDIR=/usr ./build_linux.sh\n\tThe build process from a µSD card takes approx. 105 minutes on a RPi 2.\n\t\n\t## Run it: ##\n\t$ cd liteide/build/liteide/bin\n\t$ ./liteide\n\n**Addin** Be sure to set `QTDIR` (and `MINGWDIR` for Windows users) accordingly based on your local environment.\n\n## Fedora 27\n        $ sudo dnf update\n        $ sudo dnf install qt-devel\n        $ git clone https://github.com/visualfc/liteide.git\n\nFollowing this step I had to clone the contents of the following repos in liteide/src/github.com\ni.e. liteidex/src/github.com/visualfc/gotools/README.md\n\n* https://github.com/visualfc/gotools\n* https://github.com/nsf/gocode\n* https://github.com/fatih/gomodifytags\n\n        $ cd liteide/build\n        $ ./update_pkg.sh\n        $ export QTDIR=/usr/bin\n        $ ./build_linux_fedora27_x64.sh\n\n        ## Run it: ##\n        $ cd liteide/build/liteide/bin\n        $ ./liteide\n\n"
  },
  {
    "path": "liteidex/deploy/welcome/en/liteide.html",
    "content": "<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n  <title>LiteIDE Documentation</title>\n  <link rel=\"stylesheet\" href=\"../css/style.css\" type=\"text/css\" media=\"all\" charset=\"utf-8\"/>\n</head>\n\n<body>\n\t<div id=\"container\">\n\t\t<div id=\"topnav\">\n\t\t\t<h1 id=\"title\"><img src=\"../images/liteide-logo128.png\" align =\"right\">LiteIDE Documentation</h1>\n\t\t\t<div class=\"quickref\">\n\t\t\t\t<a href=\"readme.md\">Readme</a> <span class=\"sep\">|</span>\n\t\t\t\t<a href=\"./install.md\">Install</a> <span class=\"sep\">|</span>\n\t\t\t\t<a href=\"guide.md\">Guide</a> <span class=\"sep\">|</span>\n\t\t\t\t<a href=\"shortcuts.html\">Key Shortcuts</a> <span class=\"sep\">|</span>\n\t\t\t\t<a href=\"website.md\">WebSite</a><span class=\"sep\">|<span>\n\t\t\t\t<a href=\"changes.md\">Change</a> <span class=\"sep\">|<span>\n\t\t\t\t<a href=\"LICENSE.LGPL\">License</a> <span class=\"sep\">|</span>\n\t\t\t\t<a href=\"forever.md\">Forever</a> <span class=\"sep\">\n\t\t\t</div>\n\t\t</div>\t\t\n\t\t<div id=\"content\">\n\t\t\t<!-- Menu is HTML-escaped elsewhere -->\n\t\t\t<h1 id=\"generatedHeader\">{header}</h1>\n\t\t\t<!-- The Table of Contents is automatically inserted in this <div>.Do not delete this <div>. -->\n\t\t\t<div id=\"nav\">{nav}</div>\n\t\t\t{content}\n\t\t</div>\n\t</div>\n</body>\n</html>\n"
  },
  {
    "path": "liteidex/deploy/welcome/en/readme.md",
    "content": "<!-- Welcome to LiteIDE X -->\n\nLiteIDE X\n=========\n\n### Introduction\n\n_LiteIDE is a simple, open source, cross-platform Go IDE._\n\n* Version: X38.4\n* Author: [visualfc](mailto:visualfc@gmail.com)\n\n\n### Features\n\n* Core features\n\t* System environment management\n\t* MIME type management \n\t* Configurable build commands\n\t* Support files search replace and revert\n\t* Quick open file, symbol and commands\n\t* Plug-in system\n\n* Advanced code editor\n\t* Code editor supports Golang, Markdown and Golang Present\n\t* Rapid code navigation tools\n\t* Syntax highlighting and color scheme\n\t* Code completion\n\t* Code folding\n\t* Display save revision\n\t* Reload file by internal diff way\n\n* Golang support\n\t* support Go1.18~Go1.20 generics\n\t* Support go1.11 Go modules\n\t* Support go1.5 Go vendor\n\t* Support go1 GOPATH\n\t* Golang build environment management\n\t* Compile and test using standard Golang tools\n\t* Custom GOPATH support system, IDE and project\n\t* Custom project build configuration\n\t* Golang package browser\n\t* Golang class view and outline\n\t* Golang doc search and api index\n\t* Source code navigation and information tips\n\t* Source code find usages\n\t* Source code refactoring and revert\n\t* Integrated  [gocode](https://github.com/visualfc/gocode) clone of [nsf/gocode](https://github.com/nsf/gocode)\n\t* Integrated [gomodifytags](https://github.com/fatih/gomodifytags)\n\t* Support source query tools guru\n\t* Debug with GDB and [Delve](https://github.com/derekparker/delve)\n\n### Supported Systems\n* Windows x86 (32-bit or 64-bit)\n* Linux x86 (32-bit or 64-bit)\n* MacOS X10.6 or higher (64-bit)\n* FreeBSD 9.2 or higher (32-bit or 64-bit)\n* OpenBSD 5.6 or higher (64-bit)\n\n### LiteIDE Command Line\n\tliteide [files|folder] [--select-env id] [--local-setting] [--user-setting] [--reset-setting]\n\t \n\t--select-env [system|win32|cross-linux64|...]     select init environment id\n\t--local-setting   force use local setting\n\t--user-setting    force use user setting\n\t--reset-setting   reset current setting ( clear setting file)\n\t\n### Update liteide tools for support new Golang Version\t\n\n\tgo get -u github.com/visualfc/gotools\n\tgo get -u github.com/visualfc/gocode\n\t\n\tWindows/Linux: copy GOPATH/bin gotools and gocode to liteide/bin\n\tMacOS: copy GOPATH/bin gotools and gocode to LiteIDE.app/Contents/MacOS\t\n\n### Website\n* LiteIDE Home\n\t* <http://liteide.org>\n* Source code\n\t* <https://github.com/visualfc/liteide>\n* Binary downloads\n\t* <https://sourceforge.net/projects/liteide/files>\n* Google group\n\t* <https://groups.google.com/group/liteide-dev>\t\n* FAQ\n\t* <https://github.com/visualfc/liteide/blob/master/liteidex/deploy/welcome/en/guide.md>\t\n* Support LiteIDE\n\t* <https://visualfc.github.com/support>"
  },
  {
    "path": "liteidex/deploy/welcome/en/shortcuts.html",
    "content": "<!-- Key Shortcuts -->\n\n<h2>Key Shortcuts</h2>\n<p>These are the default shortcuts for LiteIDE.  Note that you can customize these in \"View > Options > LiteApp > Keyboard\".</p>\n\n<table border=\"1\">\n<tr><th colspan=\"2\">Standard</th></tr>\n<tr><td>New</td><td>Ctrl+N</td></tr>\n<tr><td>Open</td><td>Ctrl+O</td></tr>\n<tr><td>Save</td><td>Ctrl+S</td></tr>\n<tr><td>Close</td><td>Ctrl+W</td></tr>\n<tr><td>Full Screen</td><td>Ctrl+Shift+F11</td></tr>\n<tr><td>Next Tab</td><td>Ctrl+Tab</td></tr>\n<tr><td>Prev Tab</td><td>Ctrl+Shift+Tab</td></tr>\n<tr><td>Hide Bottom Windows</td><td>ESC</td></tr>\n<tr><td>Execute File</td><td>Ctrl+`</td></tr>\n\n<tr><th colspan=\"2\">Editor</th></tr>\n<tr><td>Cut</td><td>Ctrl+X</td></tr>\n<tr><td>Copy</td><td>Ctrl+C</td></tr>\n<tr><td>Paste</td><td>Ctrl+V</td></tr>\n<tr><td>Undo</td><td>Ctrl+Z</td></tr>\n<tr><td>Redo</td><td>Ctrl+Shift+Z,Ctrl+Y</td></tr>\n<tr><td>Paste</td><td>Ctrl+V</td></tr>\n<tr><td>Duplicate</td><td>Ctrl+D</td></tr>\n<tr><td>Delete Line</td><td>Ctrl+Shift+K</td></tr>\n<tr><td>Select All</td><td>Ctrl+A</td></tr>\n<tr><td>Select Block</td><td>Ctrl+U</td></tr>\n<tr><td>Goto Match Brace</td><td>Ctrl+E</td></tr>\n<tr><td>Goto Previous Block</td><td>Ctrl+[</td></tr>\n<tr><td>Goto Next Block</td><td>Ctrl+]</td></tr>\n<tr><td>Goto Line</td><td>Ctrl+G</td></tr>\n<tr><td>Fold Block</td><td>Ctrl+&lt;</td></tr>\n<tr><td>Unfold Block</td><td>Ctrl+&gt;</td></tr>\n<tr><td>Increase Font Size</td><td>Ctrl++</td></tr>\n<tr><td>Decrease Font Size</td><td>Ctrl+-</td></tr>\n<tr><td>Reset Font Size</td><td>Ctrl+0</td></tr>\n<tr><td>Go Backward</td><td>Alt+←</td></tr>\n<tr><td>Go Forward</td><td>Alt+→</td></tr>\n<tr><td>InsertLineAfter</td><td>Ctrl+Enter</td></tr>\n<tr><td>InsertLineBefore</td><td>Ctrl+Shift+Enter</td></tr>\n<tr><td>Code Completer</td><td>Ctrl+Space</td></tr>\n<tr><td>Code Completer List Next</td><td>Ctrl+N</td></tr>\n<tr><td>Code Completer List Prev</td><td>Ctrl+P</td></tr>\n\n<tr><th colspan=\"2\">Golang Editor</th></tr>\n<tr><td>Code expression info</td><td>Ctrl+Shift+I; F1 ; Ctrl+?(MacOS X)</td></tr>\n<tr><td>Jump to declaration</td><td>Ctrl+Shift+J; F2</td></tr>\n<tr><td>Find Usages</td><td>Ctrl+Shift+U</td></tr>\n<tr><td>Rename Symbol Under Cursor</td><td>Ctrl+Shift+R</td></tr>\n<tr><td>Gofmt</td><td>Shift+F7</td></tr>\n<tr><td>Comment/Uncomment</td><td>Ctrl+/</td></tr>\n\n<tr><th colspan=\"2\">Find</th></tr>\n<tr><td>Find</td><td>Ctrl+F</td></tr>\n<tr><td>Find Next</td><td>F3</td></tr>\n<tr><td>Find Previous</td><td>Shift+F3</td></tr>\n<tr><td>Replace</td><td>Ctrl+H</td></tr>\n<tr><td>Find in File</td><td>Ctrl+Shift+F</td></tr>\n\n<tr><th colspan=\"2\">Build</th></tr>\n<tr><td>Build</td><td>Ctrl+B, F7</td></tr>\n<tr><td>Install</td><td>Ctrl+F8</td></tr>\n<tr><td>Test</td><td>Ctrl+T</td></tr>\n<tr><td>Run</td><td>Ctrl+F5</td></tr>\n<tr><td>Build and Run</td><td>Ctrl+R</td></tr>\n<tr><td>Run in Term</td><td>Ctrl+Shift+F5</td></tr>\n<tr><td>File Run</td><td>Alt+F6</td></tr>\n\n<tr><th colspan=\"2\">Debug</th></tr>\n<tr><td>Debug</td><td>F5</td></tr>\n<tr><td>Continue</td><td>F5</td></tr>\n<tr><td>Insert/Remove BreakPoint</td><td>F9</td></tr>\n<tr><td>Stop Debug</td><td>Shift+F5</td></tr>\n<tr><td>Step Info</td><td>F11</td></tr>\n<tr><td>Step Over</td><td>F10</td></tr>\n<tr><td>Step Out</td><td>Shift+F11</td></tr>\n<tr><td>Run to Line</td><td>Shift+F10</td></tr>\n\n<tr><th colspan=\"2\">Markdown Editor</th></tr>\n<tr><td>Bold</td><td>Ctrl+B</td></tr>\n<tr><td>Italic</td><td>Ctrl+I</td></tr>\n<tr><td>H1-H6</td><td>Ctrl+1,...,Ctrl+6</td></tr>\n<tr><td>Inline Code</td><td>Ctrl+K</td></tr>\n<tr><td>Link</td><td>Ctrl+Shift+L</td></tr>\n<tr><td>Image</td><td>Ctrl+Shift+I</td></tr>\n<tr><td>Unordered List</td><td>Ctrl+Shift+U</td></tr>\n<tr><td>Ordered List</td><td>Ctrl+Shift+O</td></tr>\n<tr><td>Blockquote</td><td>Ctrl+Shift+Q</td></tr>\n<tr><td>Horizontal Rule</td><td>Ctrl+Shift+H</td></tr>\n\n\n</table>"
  },
  {
    "path": "liteidex/deploy/welcome/en/website.md",
    "content": "<!-- Website -->\n\n\n### LiteIDE\n* [LiteIDE Source](https://github.com/visualfc/liteide)\n* [LiteIDE Download](http://sourceforge.net/projects/liteide/files)\n* [Support LiteIDE](https://visualfc.github.io/support/)\n\n### LiteIDE Markdown\n* Markdown parser from [sundown](https://github.com/vmg/sundown)\n* Markdown CSS files from [Mou](http://mouapp.com)\n\n### Golang\n* [Golang Home](http://golang.org)\n* [Golang Source](http://code.google.com/p/go)\n\n### Golang Tools\n* Golang code compliter form [gocode](https://github.com/nsf/gocode)\n* Golang code format form [goimports](https://github.com/bradfitz/goimports) \n* Go Package Manager [gopm](https://github.com/gpmgo/gopm)\n\n### Golang Package Doc\n* [GoWalker](http://gowalker.org/)\n* [GoDoc](http://godoc.org)\n"
  },
  {
    "path": "liteidex/deploy/welcome/en/welcome.html",
    "content": "<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n  <title>LiteIDE</title>\n  <link rel=\"stylesheet\" href=\"../css/style.css\" type=\"text/css\" media=\"all\" charset=\"utf-8\"/>\n</head>\n\n<body>\n\t<div id=\"container\">\n\t\t<div id=\"topnav\">\t\n\t\t\t<h1 id=\"title\" align=\"center\"><img src=\"../images/liteide-logo128.png\" align =\"right\">Welcome to LiteIDE X</h1>\n<pre align=\"center\">Copyright 2011-2023, Author <a href=\"mailto:visualfc@gmail.com\">visualfc</a>, Version <a href=\"doc:/changes.md\">{liteide_version}</a></pre>\n\t\t</div>\t\t\n\t\t<div id=\"content\">\n\t\t<h3>Quick Links</h3>\n<table border=\"0\">\n<tr>\n<td>\n\t\t\t<ul>\n\t\t\t<li><a href=\"doc:/readme.md\">Welcome to LiteIDE</a></li>\n\t\t\t<li><a href=\"godoc:/doc/docs.html\">Golang Documents</a></li>\n\t\t\t</ul>\n</td>\n<td>\n\t\t\t<ul>\n\t\t\t<li><a href=\"doc:/guide.md\">LiteIDE User Guide</a></li>\n\t\t\t<li><a href=\"goplay:/goplay\">Golang Playground</a></li>\n\t\t\t</ul>\n</td>\n<td>\t\t\t\n\t\t\t<ul>\n\t\t\t<li><a href=\"http://visualfc.github.com/support\">Support LiteIDE</a></li>\n\t\t\t<li><a href=\"doc:/website.md\">Web Site</a></li>\n\t\t\t</ul>\n</td>\n</tr>\n</table>\t\n<h3>Session</h3>\t\t\n<table border=\"0\">\n<tr>\n<td>\n\t\t\t<ul>\n\t\t\t<li><a href=\"session:default\">Load Default Session</a></li>\n\t\t\t</ul>\n</td>\n</tr>\n</table>\t\n\t\t\t{recent_files}\n\t\t</div>\n\t</div>\n</body>\n</html>"
  },
  {
    "path": "liteidex/deploy/welcome/images/liteide128.xpm",
    "content": "/* XPM */\r\nstatic char * C:\\Users\\max\\Desktop\\liteide128_xpm[] = {\r\n\"128 128 411 2\",\r\n\"  \tc None\",\r\n\". \tc #E6E6E6\",\r\n\"+ \tc #E5E5E5\",\r\n\"@ \tc #E4E4E4\",\r\n\"# \tc #E7E7E7\",\r\n\"$ \tc #E8E8E8\",\r\n\"% \tc #E9E9E9\",\r\n\"& \tc #EAEAEA\",\r\n\"* \tc #EBEBEB\",\r\n\"= \tc #ECECEC\",\r\n\"- \tc #EDEDED\",\r\n\"; \tc #EEEEEE\",\r\n\"> \tc #EFEFEF\",\r\n\", \tc #F0F0F0\",\r\n\"' \tc #F1F1F1\",\r\n\") \tc #F2F2F2\",\r\n\"! \tc #F3F3F3\",\r\n\"~ \tc #F4F4F4\",\r\n\"{ \tc #E1E1E1\",\r\n\"] \tc #E2E2E2\",\r\n\"^ \tc #E3E3E3\",\r\n\"/ \tc #F5F5F5\",\r\n\"( \tc #F6F6F6\",\r\n\"_ \tc #F7F7F7\",\r\n\": \tc #E0E0E0\",\r\n\"< \tc #DDDDDD\",\r\n\"[ \tc #DEDEDE\",\r\n\"} \tc #DFDFDF\",\r\n\"| \tc #F8F8F8\",\r\n\"1 \tc #F9F9F9\",\r\n\"2 \tc #FAFAFA\",\r\n\"3 \tc #DCDCDC\",\r\n\"4 \tc #DBDBDB\",\r\n\"5 \tc #FBFBFB\",\r\n\"6 \tc #FCFCFC\",\r\n\"7 \tc #D9D9D9\",\r\n\"8 \tc #DADADA\",\r\n\"9 \tc #FDFDFD\",\r\n\"0 \tc #FEFEFE\",\r\n\"a \tc #D8D8D8\",\r\n\"b \tc #D7D7D7\",\r\n\"c \tc #FFFFFF\",\r\n\"d \tc #D5D5D5\",\r\n\"e \tc #D6D6D6\",\r\n\"f \tc #D3D3D3\",\r\n\"g \tc #D4D4D4\",\r\n\"h \tc #D1D1D1\",\r\n\"i \tc #D2D2D2\",\r\n\"j \tc #CFCFCF\",\r\n\"k \tc #D0D0D0\",\r\n\"l \tc #CECECE\",\r\n\"m \tc #CDCDCD\",\r\n\"n \tc #CBCBCB\",\r\n\"o \tc #CCCCCC\",\r\n\"p \tc #C9C9C9\",\r\n\"q \tc #CACACA\",\r\n\"r \tc #C8C8C8\",\r\n\"s \tc #C7C7C7\",\r\n\"t \tc #C6C6C6\",\r\n\"u \tc #C5C5C5\",\r\n\"v \tc #C4C4C4\",\r\n\"w \tc #C3C3C3\",\r\n\"x \tc #C1C1C1\",\r\n\"y \tc #C2C2C2\",\r\n\"z \tc #C0C0C0\",\r\n\"A \tc #BEBEBF\",\r\n\"B \tc #BFBFBF\",\r\n\"C \tc #BCBCBD\",\r\n\"D \tc #BEBEBE\",\r\n\"E \tc #BDBDBD\",\r\n\"F \tc #BDBDBE\",\r\n\"G \tc #BBBBBC\",\r\n\"H \tc #BABABB\",\r\n\"I \tc #BBBBBB\",\r\n\"J \tc #BCBCBC\",\r\n\"K \tc #B9B9BA\",\r\n\"L \tc #B8B8B9\",\r\n\"M \tc #BABABA\",\r\n\"N \tc #B7B7B8\",\r\n\"O \tc #C2C2C1\",\r\n\"P \tc #B6B6B7\",\r\n\"Q \tc #C4C4C5\",\r\n\"R \tc #B5B5B7\",\r\n\"S \tc #B5B5B6\",\r\n\"T \tc #BDBDBF\",\r\n\"U \tc #B4B4B5\",\r\n\"V \tc #B3B3B4\",\r\n\"W \tc #B3B3B5\",\r\n\"X \tc #B4B4B6\",\r\n\"Y \tc #B2B2B4\",\r\n\"Z \tc #B1B1B3\",\r\n\"` \tc #B2B2B3\",\r\n\" .\tc #AFAFB2\",\r\n\"..\tc #B1B1B2\",\r\n\"+.\tc #B7B7B9\",\r\n\"@.\tc #AFAFB1\",\r\n\"#.\tc #B0B0B2\",\r\n\"$.\tc #B9B9B9\",\r\n\"%.\tc #AEAEB0\",\r\n\"&.\tc #AEAEB1\",\r\n\"*.\tc #EBEBEC\",\r\n\"=.\tc #B6B6B8\",\r\n\"-.\tc #ADADAF\",\r\n\";.\tc #AEAEAF\",\r\n\">.\tc #B1B1B4\",\r\n\",.\tc #BCBCBB\",\r\n\"'.\tc #B6B6B6\",\r\n\").\tc #AAAAAD\",\r\n\"!.\tc #ABABAE\",\r\n\"~.\tc #ACACAE\",\r\n\"{.\tc #ACACAF\",\r\n\"].\tc #B8B8B8\",\r\n\"^.\tc #ABABAD\",\r\n\"/.\tc #BCBCBE\",\r\n\"(.\tc #A9A9AC\",\r\n\"_.\tc #AAAAAC\",\r\n\":.\tc #A9A9AB\",\r\n\"<.\tc #C0C0C1\",\r\n\"[.\tc #A3A3A3\",\r\n\"}.\tc #6B6B6B\",\r\n\"|.\tc #3B3B3B\",\r\n\"1.\tc #282828\",\r\n\"2.\tc #212121\",\r\n\"3.\tc #1E1E1E\",\r\n\"4.\tc #232323\",\r\n\"5.\tc #2B2B2B\",\r\n\"6.\tc #484848\",\r\n\"7.\tc #828282\",\r\n\"8.\tc #A8A8AB\",\r\n\"9.\tc #9A9A9B\",\r\n\"0.\tc #5B5B5C\",\r\n\"a.\tc #0B0B0B\",\r\n\"b.\tc #000000\",\r\n\"c.\tc #383838\",\r\n\"d.\tc #9D9D9D\",\r\n\"e.\tc #EDEDEE\",\r\n\"f.\tc #ADADB0\",\r\n\"g.\tc #A7A7AA\",\r\n\"h.\tc #7D7D7E\",\r\n\"i.\tc #131313\",\r\n\"j.\tc #030303\",\r\n\"k.\tc #171717\",\r\n\"l.\tc #A5A5A5\",\r\n\"m.\tc #878789\",\r\n\"n.\tc #272727\",\r\n\"o.\tc #5A5A5A\",\r\n\"p.\tc #E1E1E2\",\r\n\"q.\tc #A5A5A9\",\r\n\"r.\tc #A6A6A9\",\r\n\"s.\tc #333334\",\r\n\"t.\tc #1A1A1A\",\r\n\"u.\tc #A4A4A8\",\r\n\"v.\tc #A5A5A8\",\r\n\"w.\tc #A6A6A8\",\r\n\"x.\tc #A7A7A9\",\r\n\"y.\tc #AAAAAE\",\r\n\"z.\tc #ACACAD\",\r\n\"A.\tc #858587\",\r\n\"B.\tc #171718\",\r\n\"C.\tc #353535\",\r\n\"D.\tc #CCCCCE\",\r\n\"E.\tc #AFAFB0\",\r\n\"F.\tc #B0B0B3\",\r\n\"G.\tc #A3A3A6\",\r\n\"H.\tc #A4A4A7\",\r\n\"I.\tc #79797A\",\r\n\"J.\tc #4B4B4B\",\r\n\"K.\tc #BFBFC1\",\r\n\"L.\tc #B6B6B9\",\r\n\"M.\tc #A9A9AD\",\r\n\"N.\tc #A3A3A7\",\r\n\"O.\tc #535354\",\r\n\"P.\tc #020202\",\r\n\"Q.\tc #A2A2A6\",\r\n\"R.\tc #616162\",\r\n\"S.\tc #3D3D3D\",\r\n\"T.\tc #A1A1A5\",\r\n\"U.\tc #A2A2A5\",\r\n\"V.\tc #585859\",\r\n\"W.\tc #CDCDCF\",\r\n\"X.\tc #A1A1A4\",\r\n\"Y.\tc #A7A7AB\",\r\n\"Z.\tc #7B7B7D\",\r\n\"`.\tc #767676\",\r\n\" +\tc #A0A0A4\",\r\n\".+\tc #9F9FA3\",\r\n\"++\tc #89898B\",\r\n\"@+\tc #010101\",\r\n\"#+\tc #F1F1F2\",\r\n\"$+\tc #9F9FA2\",\r\n\"%+\tc #9F9FA4\",\r\n\"&+\tc #1F1F20\",\r\n\"*+\tc #2F2F2F\",\r\n\"=+\tc #DCDCDD\",\r\n\"-+\tc #9E9EA2\",\r\n\";+\tc #434343\",\r\n\">+\tc #202020\",\r\n\",+\tc #575757\",\r\n\"'+\tc #AAAAAA\",\r\n\")+\tc #9D9DA1\",\r\n\"!+\tc #9E9EA1\",\r\n\"~+\tc #848487\",\r\n\"{+\tc #181818\",\r\n\"]+\tc #676767\",\r\n\"^+\tc #393939\",\r\n\"/+\tc #939393\",\r\n\"(+\tc #0C0C0C\",\r\n\"_+\tc #ECECED\",\r\n\":+\tc #A6A6AA\",\r\n\"<+\tc #9C9CA0\",\r\n\"[+\tc #9D9DA0\",\r\n\"}+\tc #2C2C2C\",\r\n\"|+\tc #0D0D0D\",\r\n\"1+\tc #727272\",\r\n\"2+\tc #464646\",\r\n\"3+\tc #B8B8BB\",\r\n\"4+\tc #9B9B9F\",\r\n\"5+\tc #9C9C9F\",\r\n\"6+\tc #6C6C6E\",\r\n\"7+\tc #404040\",\r\n\"8+\tc #9B9B9E\",\r\n\"9+\tc #98989B\",\r\n\"0+\tc #414141\",\r\n\"a+\tc #242424\",\r\n\"b+\tc #C3C3C5\",\r\n\"c+\tc #9A9A9D\",\r\n\"d+\tc #99999C\",\r\n\"e+\tc #7D7D80\",\r\n\"f+\tc #0E0E0E\",\r\n\"g+\tc #919191\",\r\n\"h+\tc #424242\",\r\n\"i+\tc #E8E8E9\",\r\n\"j+\tc #272728\",\r\n\"k+\tc #151515\",\r\n\"l+\tc #686868\",\r\n\"m+\tc #989898\",\r\n\"n+\tc #B2B2B5\",\r\n\"o+\tc #97979A\",\r\n\"p+\tc #515151\",\r\n\"q+\tc #050505\",\r\n\"r+\tc #A8A8A8\",\r\n\"s+\tc #252525\",\r\n\"t+\tc #DADADD\",\r\n\"u+\tc #969699\",\r\n\"v+\tc #414142\",\r\n\"w+\tc #292929\",\r\n\"x+\tc #090909\",\r\n\"y+\tc #959598\",\r\n\"z+\tc #959597\",\r\n\"A+\tc #929294\",\r\n\"B+\tc #1B1B1B\",\r\n\"C+\tc #949497\",\r\n\"D+\tc #949496\",\r\n\"E+\tc #8C8C8F\",\r\n\"F+\tc #0F0F0F\",\r\n\"G+\tc #98989C\",\r\n\"H+\tc #979799\",\r\n\"I+\tc #939396\",\r\n\"J+\tc #939395\",\r\n\"K+\tc #969698\",\r\n\"L+\tc #070707\",\r\n\"M+\tc #3F3F3F\",\r\n\"N+\tc #CCCCCD\",\r\n\"O+\tc #99999D\",\r\n\"P+\tc #9A9A9E\",\r\n\"Q+\tc #929295\",\r\n\"R+\tc #919194\",\r\n\"S+\tc #98989A\",\r\n\"T+\tc #161616\",\r\n\"U+\tc #191919\",\r\n\"V+\tc #C6C6C7\",\r\n\"W+\tc #9C9C9E\",\r\n\"X+\tc #919193\",\r\n\"Y+\tc #040404\",\r\n\"Z+\tc #222222\",\r\n\"`+\tc #555555\",\r\n\" @\tc #CECECF\",\r\n\".@\tc #A0A0A3\",\r\n\"+@\tc #909092\",\r\n\"@@\tc #8F8F91\",\r\n\"#@\tc #777778\",\r\n\"$@\tc #101010\",\r\n\"%@\tc #2A2A2A\",\r\n\"&@\tc #919192\",\r\n\"*@\tc #8E8E91\",\r\n\"=@\tc #8F8F90\",\r\n\"-@\tc #626263\",\r\n\";@\tc #0A0A0A\",\r\n\">@\tc #121212\",\r\n\",@\tc #303030\",\r\n\"'@\tc #ADADAE\",\r\n\")@\tc #939397\",\r\n\"!@\tc #949498\",\r\n\"~@\tc #979798\",\r\n\"{@\tc #96969A\",\r\n\"]@\tc #99999B\",\r\n\"^@\tc #8E8E90\",\r\n\"/@\tc #8E8E8F\",\r\n\"(@\tc #8D8D8F\",\r\n\"_@\tc #49494A\",\r\n\":@\tc #141414\",\r\n\"<@\tc #1C1C1C\",\r\n\"[@\tc #343434\",\r\n\"}@\tc #8D8D8E\",\r\n\"|@\tc #8C8C8E\",\r\n\"1@\tc #8C8C8D\",\r\n\"2@\tc #3B3B3C\",\r\n\"3@\tc #333333\",\r\n\"4@\tc #444444\",\r\n\"5@\tc #AAAAAB\",\r\n\"6@\tc #89898A\",\r\n\"7@\tc #8B8B8D\",\r\n\"8@\tc #313131\",\r\n\"9@\tc #1D1D1D\",\r\n\"0@\tc #323232\",\r\n\"a@\tc #7A7A7A\",\r\n\"b@\tc #B1B1B1\",\r\n\"c@\tc #868689\",\r\n\"d@\tc #8B8B8C\",\r\n\"e@\tc #A0A0A2\",\r\n\"f@\tc #8A8A8B\",\r\n\"g@\tc #111111\",\r\n\"h@\tc #3E3E3E\",\r\n\"i@\tc #454545\",\r\n\"j@\tc #494949\",\r\n\"k@\tc #838383\",\r\n\"l@\tc #9B9B9C\",\r\n\"m@\tc #888889\",\r\n\"n@\tc #868687\",\r\n\"o@\tc #1F1F1F\",\r\n\"p@\tc #373737\",\r\n\"q@\tc #4E4E4E\",\r\n\"r@\tc #535353\",\r\n\"s@\tc #505050\",\r\n\"t@\tc #626262\",\r\n\"u@\tc #959595\",\r\n\"v@\tc #808081\",\r\n\"w@\tc #848485\",\r\n\"x@\tc #868686\",\r\n\"y@\tc #8A8A8C\",\r\n\"z@\tc #19191A\",\r\n\"A@\tc #3C3C3C\",\r\n\"B@\tc #474747\",\r\n\"C@\tc #4C4C4C\",\r\n\"D@\tc #565656\",\r\n\"E@\tc #5E5E5E\",\r\n\"F@\tc #616161\",\r\n\"G@\tc #6E6E6E\",\r\n\"H@\tc #787878\",\r\n\"I@\tc #797979\",\r\n\"J@\tc #7C7C7C\",\r\n\"K@\tc #808080\",\r\n\"L@\tc #848484\",\r\n\"M@\tc #848486\",\r\n\"N@\tc #878788\",\r\n\"O@\tc #4F4F4F\",\r\n\"P@\tc #545454\",\r\n\"Q@\tc #585858\",\r\n\"R@\tc #5C5C5C\",\r\n\"S@\tc #646464\",\r\n\"T@\tc #6C6C6C\",\r\n\"U@\tc #6F6F6F\",\r\n\"V@\tc #757575\",\r\n\"W@\tc #7D7D7D\",\r\n\"X@\tc #7F7F7F\",\r\n\"Y@\tc #838384\",\r\n\"Z@\tc #858585\",\r\n\"`@\tc #858586\",\r\n\" #\tc #878787\",\r\n\".#\tc #A2A2A4\",\r\n\"+#\tc #3A3A3A\",\r\n\"@#\tc #656565\",\r\n\"##\tc #6D6D6D\",\r\n\"$#\tc #707070\",\r\n\"%#\tc #818181\",\r\n\"&#\tc #909091\",\r\n\"*#\tc #262626\",\r\n\"=#\tc #5F5F5F\",\r\n\"-#\tc #636363\",\r\n\";#\tc #666666\",\r\n\">#\tc #696969\",\r\n\",#\tc #737373\",\r\n\"'#\tc #8D8D90\",\r\n\")#\tc #929293\",\r\n\"!#\tc #060606\",\r\n\"~#\tc #2E2E2E\",\r\n\"{#\tc #4A4A4A\",\r\n\"]#\tc #525252\",\r\n\"^#\tc #6A6A6A\",\r\n\"/#\tc #7E7E7E\",\r\n\"(#\tc #9A9A9C\",\r\n\"_#\tc #4D4D4D\",\r\n\":#\tc #5B5B5B\",\r\n\"<#\tc #777777\",\r\n\"[#\tc #828283\",\r\n\"}#\tc #5D5D5D\",\r\n\"|#\tc #606060\",\r\n\"1#\tc #717171\",\r\n\"2#\tc #818182\",\r\n\"3#\tc #363636\",\r\n\"4#\tc #747474\",\r\n\"5#\tc #7B7B7B\",\r\n\"6#\tc #8B8B8B\",\r\n\"7#\tc #595959\",\r\n\"8#\tc #080808\",\r\n\"9#\tc #99999A\",\r\n\"0#\tc #848483\",\r\n\"a#\tc #939394\",\r\n\"b#\tc #2D2D2D\",\r\n\"c#\tc #8F8F8F\",\r\n\"d#\tc #898989\",\r\n\"                                                                                                                                                                                                                                                                \",\r\n\"                                                                                                          . + @ + + # $ $ % & * * = - ; > > , ' ) ! ~                                                                                                           \",\r\n\"                                                                                                  { ] { { ] ^ @ + + # # $ % & * * = - ; > > , ' ) ) ! ~ / ( _                                                                                                   \",\r\n\"                                                                                          : < [ [ } } { ] ] ^ @ + + . $ $ % & * * = - ; > > , ' ) ! ~ ~ / ( _ | | 1 2                                                                                           \",\r\n\"                                                                                    3 3 4 3 < [ [ } } : { ] ^ @ + + . $ $ % & * * = - ; > > , ' ) ! ~ ~ / ( _ | 1 1 2 5 5 6                                                                                     \",\r\n\"                                                                                7 7 7 8 4 3 3 [ [ } } : { ] ^ @ + + . # $ % & * * = - ; > > ' ' ) ! ~ ~ / ( _ | 1 1 2 5 6 9 0 0                                                                                 \",\r\n\"                                                                          a b b a a 7 8 8 3 3 < [ } } : { ] ^ @ @ + . # $ % % * * - - ; > > ' ' ) ! ~ ~ ( _ _ | 1 2 2 5 6 9 0 0 c 0 5                                                                           \",\r\n\"                                                                      7 d d e e b a 7 7 8 4 3 < [ [ } : : ] ^ ^ @ + . # $ % % * * - - ; > , ' ' ! ! ~ / ( _ _ 1 1 2 5 6 9 9 0 c c c 6 | |                                                                       \",\r\n\"                                                                  e f f g g d e b b 7 7 8 4 3 < < [ } : { { ^ ^ @ + . # $ % % * * - - ; > , ' ' ! ! ~ / ( _ | 1 1 2 5 6 9 0 0 c c c c 6 ( / ~                                                                   \",\r\n\"                                                                f h i f g g d e b b a 7 8 4 4 < < [ } } { { ] ^ @ + . # $ % % * * - - ; > , ' ) ! ~ ~ ( ( _ | 1 1 5 5 6 9 0 c c c c c c 5 ~ ) )                                                                 \",\r\n\"                                                            i j k h h i f g d d e b a a 7 8 4 3 < [ [ } : { ] ^ @ + . . $ % % * * - - ; > , ' ) ! ~ / / ( | | 1 2 5 5 9 0 0 c c c c c c c 1 ) , > >                                                             \",\r\n\"                                                        f j l j k k h i f g g d e b b 7 7 8 4 3 < [ [ } : { ] ^ @ @ . . $ % % * * - - ; > , ' ) ! ~ / / _ | 1 1 2 5 6 9 0 c c c c c c c c c _ > ; - = =                                                         \",\r\n\"                                                      j m l l j j k k i f f g g d e b a 7 8 8 3 3 [ [ } } { ] ^ @ @ . . $ % % * * - - ; > , ' ) ! ~ / ( _ | 1 2 2 5 6 9 0 c c c c c c c c c c ) - = * % %                                                       \",\r\n\"                                                    m n o m l l j j k h i f g g d e b a 7 7 8 4 3 < [ } : : ] ] @ @ + . $ % % * * - - ; > , ' ) ~ ~ / ( _ | 1 2 5 6 9 0 0 c c c c c c c c c c c , * & $ . #                                                     \",\r\n\"                                                h p q n o m m l l j k h h i f g d d e b a 7 8 4 3 < [ } } : ] ] @ @ + . $ % % * * - - > , , ) ) ~ ~ / _ _ 1 1 2 5 6 9 0 c c c c c c c c c c c c 9 * $ # . + ^ #                                                 \",\r\n\"                                              o p p q n n o m l l j j k h i f f g d e b a 7 7 4 4 < < [ } : { ] ^ @ + # # % % * * - ; > , , ) ! ~ ~ ( ( | 1 1 5 5 9 9 0 c c c c c c c c c c c c c 1 . . + @ ] { {                                               \",\r\n\"                                            q r r p p q n n o m l l j k k h i f g g e e a 7 7 8 4 3 < [ } : { ] ^ @ + # # % % * * - ; > > ' ) ! ~ ~ ( _ | 1 2 5 6 9 0 0 c c c c c c c c c c c c c c ' . @ ^ { : } }                                             \",\r\n\"                                          s t s r r p q q n o m m l l j k h i i g g d e b a 7 8 4 3 < [ } : { ] ^ @ + # # % % * * - ; > > ' ) ! ~ / ( _ | 1 2 5 6 9 0 c c c c c c c c c c c c c c c 0 + ^ { { } [ < 4                                           \",\r\n\"                                        s u t t s r p p q q n o m l l j j k h i f g d d b a 7 7 8 3 3 [ } } { ] ^ @ + . # % % * * - ; > > ' ) ! ~ / ( | | 1 2 6 6 0 0 c c c c c c c c c c c c c c c c 1 { { } [ < 4 4 4                                         \",\r\n\"                                      v v v u t s s r r p q q n o m l l j k h h f f g e e b a 7 8 4 3 < } } { { ^ @ + . # % % * * - ; > > ' ) ! ~ / _ _ 1 2 5 6 9 0 0 c c c c c c c c c c c c c c c c c = } [ < 4 4 7 b b                                       \",\r\n\"                                    v w v v v u t s s r p p q n o o m l j j k h i f g d e b a 7 8 4 3 < [ } : { ^ ^ + + # % % * * - ; > , ' ! ~ / / _ | 1 2 5 6 9 0 c c c c c c c c c c c c c c c c c c 6 [ < 3 4 7 a b e e                                     \",\r\n\"                                  x y y w v v v u t s s r p p q n o o l l j k k i i g g d b b 7 7 4 4 < [ } : { ] ^ @ + # % % * * - ; > , ' ! ~ / ( _ 1 1 5 5 9 0 c c c c c c c c c c c c c c c c c c c c ' 4 4 7 a b e g f f                                   \",\r\n\"                                w z x y y w v v u u t s s r p p q n o m l l j k h i f g d e b a 7 8 4 3 [ [ : : ] ^ @ + # $ % * * - ; > ' ' ! ~ / ( | | 2 5 6 9 0 c c c c c c c c c c c c c c c c c c c c 0 } 7 a b e g f i h i                                 \",\r\n\"                              w z z z x y y w v v u u t s s r p q n n o l l j j h h f f g e e a 7 8 4 3 [ [ } : ] ^ @ + # $ % * * - ; > ' ) ! ~ / ( | 1 2 5 6 0 0 c c c c c c c c c c c c c c c c c c c c c - a b e g f i h k j h                               \",\r\n\"                            r A B B z z x x y w v v u u t s r p p q q o m m l j k h i f g d e b a 7 8 3 < [ } : ] ^ @ + # $ % * = - ; > ' ) ~ ~ ( _ | 1 2 6 9 0 c c c c c c c c c c c c c c c c c c c c c c c a d g f i h k j l m g                             \",\r\n\"                            C D A B B z z x x y w v v u t t s r p p q n o m l l j k h i g g d b a 7 8 4 < [ } : ] ] @ + . $ % * = - ; > ' ) ~ ~ ( _ | 1 5 6 9 0 c c c c c c c c c c c c c c c c c c c c c c c > g f i h k j m o n q                             \",\r\n\"                          A E E F D B B z z x x y w v v u t t s r p p q n o m l j j h h f g d e b 7 7 4 < < } } { ] @ @ . $ % * = - ; > ' ) ~ / ( _ 1 1 5 9 0 c c c c c c c c c c c c c c c c c c c c c c c c 5 d i h j l l o n n p q                           \",\r\n\"                        z G C E E F D B B z z x x y w v v u t t s r p q n o o l l j k h i g g e b a 7 4 4 < [ } { ] @ @ . $ % * = - ; , ' ) ~ / _ | 1 5 5 9 0 c c c c c c c c c c c c c c c c c c c c c c c c c [ k j l m o n q p r t q                         \",\r\n\"                      y H I G J C E E D B B z z x x y w v v u t t s r p p n o m l l j k i f g d e a 7 8 3 < [ } { ] ^ @ . $ % * = ; ; , ) ! ~ / _ | 1 2 6 0 0 c c c c c c c c c c c c c c c c c c c c c c c c c ~ m l o o n q p s t t u n                       \",\r\n\"                      I K H H I J J E E D D B z z x x y w v v u t t r r p q n o m l j k h i g g e b a 7 4 3 [ } : { ^ @ . $ % * = ; ; , ) ! ~ ( _ | 2 5 9 0 c c c c c c c c c c c c c c c c c c c c c c c c c c c f o n q p r s t t v w w                       \",\r\n\"                    F L K M H I I J J E E D A B z z x x y w v v u t s r r p n n m m l j k i f g d b a 7 4 3 [ [ : { ^ @ . $ % * = ; ; , ) ! / ( | 1 2 5 9 c c c c c c c c c c c c c c c c c c c c c c c c c c c c . n q p s s t u v y y x u                     \",\r\n\"                    L L L K K M H I G J C E F D B B z x x y w v v u t s r p q q o m l j j h i g g e b 7 8 4 < [ : { ^ @ . $ % * = ; > , ' ! / ( | 1 5 6 0 c c c c c c c c c c c c c c c c c c c c c c c c c c c c ~ q p s t u v w y x x z B                     \",\r\n\"                  H N N L L L K K H I G J C E F D B B z z x y y v v u t s r p q n o m l j k h f g d e a 8 4 < [ } : ^ @ + $ % & = ; > , ! ~ / ( | 1 5 6 0 c c c c c c c c c c c c c c c c c c c c c c c c c c c c 6 q s t u v w y x z z B B O                   \",\r\n\"                F P P N N L L L L K K H I G J C E F A B z z x y y v v u t s r p q n o l l k k i f d e a 7 8 3 < } : ] ^ + # % & = ; > ' ! ~ ( _ 1 2 6 9 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c f u v v y x x z B B D D F Q                 \",\r\n\"                R S P P P N N L L K K M H I I J C E D A B z z x y y v v u t s r p q o o l j k h f g d b 7 8 3 < } : ] ^ + # % & = ; > ' ! ~ ( _ 1 2 6 0 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c $ y w y x z B B B D D F E E                 \",\r\n\"              T U U S S R P P N N L L K K M H I J J E E D B B z x y y v v u t s p p n n m l j h i g g e a 7 4 3 [ } ] ^ + # $ & = ; > ' ! ~ ( | 2 5 9 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c 6 D x z z B B D D F E C J J Q               \",\r\n\"              S V W U U X S P P P N N L L K K H H G J E E D B B z x y y v u u s s p p n o l j k h f g d b 7 4 3 [ } { ^ @ # $ & = ; > ' ! / _ | 2 6 9 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c u z B B D D D E J J G G I C               \",\r\n\"            L Y V V W W U X S R P P N N L L K K H H I J C E D B B z z y y v u u s s p q n o l j k i f d b a 8 4 [ } { ] @ # $ & = ; > ) ~ / _ 1 5 6 0 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c j B D D F E C C J G I I H H z             \",\r\n\"            X Z ` Y Y V V W U U X S P P N N L L K K H I G J E F D B z z y y v v u s r p q o m l j h f g e b 7 4 < [ : ^ @ . $ * = ; , ) ! ( | 1 5 9 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c 7 D D E C J G G I I H H K K G             \",\r\n\"             ...Z Z ` Y V V W U U X S R P P N L L L K M I I J E F A B z z y y v u u s r p q o l j k h g d b 7 8 3 [ : ] @ . $ & = ; , ) / ( 1 1 6 0 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c { F E C J G I I H M M K K L +.            \",\r\n\"          Y @.@.#.#...Z Z Y Y V V W U X S R P P N N L K K H I J J E D B z z x y v v t s r q n m l j h i g e a 8 3 [ } { @ . $ & = > , ! ~ _ 1 2 9 0 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c # J G G I I H M K K $.L L N N I           \",\r\n\"          %.&.&.@.#.#.#.Z Z ` Y Y V W U U S R P P N L L K K H H G C E D A z z x y v u t s r q n m j k i f d b 7 4 < } { ^ + $ & - > , ! / _ 1 5 9 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c *.I I I H H K K $.L L N N N =.R           \",\r\n\"        W -.-.%.%.%.&.@.#.#.#.Z Z Y Y V W W U X S R P N N L L K H I J E D D B z x y v v t r p q n l l k f g e a 8 3 } : ^ + $ & - > ' ! ( | 2 6 0 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c , I H M K $.L L L N N =.=.P P P H         \",\r\n\"        #.-.-.-.-.;.%.%.%.@.#.#.....` >.Y V W U U S P P N N L L K K I ,.C F D B z x y v v t r p n o l k h g d b 7 3 [ : ^ + # & - > ' ~ ( | 2 9 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c ) K K L L L L N =.N =.P '.P S S L         \",\r\n\"        ).!.~.~.{.-.-.-.%.%.%.@.@.#.#...Z ` Y V W W U X R P N L L K K H G J E D B z x y v u t r p n m l k i d e 7 4 [ } ] + # & - > ) ~ _ 1 5 9 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c ~ ].L L N N N =.P P S S S X X U U         \",\r\n\"      X ).).^.!.!.~.~.{.-.-.-.%.%.%. .@.#.#.Z Z Y V V W U S S P N N L K M H J E F B z x y v v t r p o m j h f d a 8 < } ] @ # & - > ) / _ 2 6 0 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c ~ N N =.=.P P S S S X U U W W W V /.      \",\r\n\"      (._.).).).^.!.!.!.~.{.-.-.-.%.%.%.&.#.#...Z ` Y V W W X S P N N L L K I G E E B z y v w x x w t o k h i g b 7 3 [ { @ # & - , ) / | 2 9 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c ! P P P P S S S X U U W W W V Y Y Y       \",\r\n\"      :.(.(.(.(._._.).).^.!.!.~.~.{.-.-.%.%.%.@.#.#...Z ` V V W U S P P N L K K I <.q [.}.|.1.2.3.3.4.5.6.7.o < b a 4 [ : ^ # % - , ! ( | 5 0 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c ' S S S X X U U W W V Y Y ` ` Z Z Z       \",\r\n\"      8.8.:.(.(.(.(._._.).).^.!.!.~.~.{.-.-.%.%.&.@. .#.Z Z Y V W U X R P N H N 9.0.a.b.b.b.b.b.b.b.b.b.b.b.b.c.d.k 3 < : ^ . % - , ! ( 1 9 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c e.U X X U U W V V Y Y ` Z Z Z Z ....      \",\r\n\"    f.g.g.g.8.8.8.8.:.(.(.(.(._.).).^.!.~.~.{.-.-.-.%.&.@.#.#.Z ` Y V W X H h.i.j.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.k.l.@ } ] . % - ' ~ _ 2 9 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c $ U W W Y Y Y ` Z Z Z ....#.#.#.#.#.=.    \",\r\n\"    {.g.g.g.g.g.8.8.8.8.:.:.(.(.(._.).).^.!.!.~.{.-.-.-.%.%.@. ...Z Y K m.n.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.o.< ^ + % - ' ~ | 5 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c p.Y Y Y ` Z Z Z Z ....#.#.#.@.@.@.@.X     \",\r\n\"    q.q.r.r.r.r.r.g.g.g.g.8.8.8.8.:.(.(.(._.).).^.!.~.~.{.-.-.%.%.@.@.s.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.t.8 + % ; ' / 1 9 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c 7 Z Z Z ....#.#.#.@.@.@.@.@.%.%.%.%.%.    \",\r\n\"    u.u.v.v.v.w.q.q.r.r.x.r.r.g.8.g.8.:.:.8.:.(.(._.).y.z.!.{.{.Z A.B.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.C.* % ; ) ( 2 0 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c D.#...#.#.@.#.@.%.%.E.%.%.%.f.-.-.-.{.    \",\r\n\"  F.G.H.u.u.u.u.v.v.v.v.q.r.r.r.r.g.g.g.g.8.8.8.:.(.(.(._.).^.{.I.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.J.= ; ) ( 5 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c K.#.@.@.@.@.%.%.%.%.f.f.-.-.-.-.{.{.~.L.  \",\r\n\"  M.G.G.G.N.N.H.H.H.H.u.u.u.u.v.v.v.q.r.r.r.r.g.g.g.8.8.8.:.!.O.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.P.D ; ) | 9 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c %.%.%.%.f.-.-.-.-.{.{.{.{.~.~.~.~.!.!.W   \",\r\n\"  N.Q.Q.G.G.G.G.G.N.N.H.H.H.H.u.u.u.v.v.v.q.r.r.r.r.g.g.g.).R.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.S.| ~ 2 0 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c > (.f.-.-.-.{.{.{.{.~.~.~.~.!.!.^.^.^.^.^.  \",\r\n\"  G.T.T.T.U.U.U.Q.Q.Q.Q.Q.G.G.G.G.N.N.H.H.H.u.u.u.v.v.q.g.V.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.h ( 6 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c W.).~.~.~.~.!.!.^.^.^.^.).).).).).)._._.^.  \",\r\n\"  X.X.X.X.T.T.T.T.T.U.U.U.Q.Q.Q.Q.G.G.G.G.N.H.H.H.H.u.Y.Z.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.`.| 9 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c ..!.!.^.^.^.^.^.).).).)._._._.(.(.(.(.(.(.  \",\r\n\"   +.+ + + + + + + + + + +X.X.T.T.T.T.T.U.U.Q.Q.Q.Q.G.++@+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.|.2 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c #+{.).)._._.(.(.(.(.(.(.:.:.:.8.8.8.8.8.8.(.  \",\r\n\"   +.+$+.+.+.+.+.+.+ + + +%+%+.+ + + +X.X.T.T.T.X.X.r.&+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.2.5.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.*+1 c c c c c c c c c c c c c d < c c c c c c c c c c c c c c c c c c c c c c c c =+:.8.8.(.:.:.:.8.8.8.8.Y.Y.Y.8.8.8.8.g.g.8.  \",\r\n\"  .+-+-+-+-+-+-+$+$+$+$+$+.+.+.+.+.+.+.+.+.+.+.+ +u.;+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.>+[ c c c ,+b.b.b.b.b.b.b.b.b.b.b.b.b.*+6 c c c c c c c c c c c '+@+b.b.3.} c c c c c c c c c c c c c c c c c c c c c c =.8.8.8.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.8.  \",\r\n\"  -+)+)+)+)+)+)+)+)+)+)+)+!+!+!+!+!+!+-+-+-+-+-+-+~+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.{+/ c c c c c ]+b.b.b.b.b.b.b.b.b.b.b.b.^+c c c c c c c c c c c /+b.b.b.b.b.(+* c c c c c c c c c c c c c c c c c c c c _+U.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.:+  \",\r\n\"  <+<+[+[+[+[+[+[+[+[+[+[+[+)+)+)+)+)+)+)+)+)+)+Q.}+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.x c c c c c c c |+b.b.b.b.b.b.b.b.b.b.b.1+c c c c c c c c c c > b.b.b.b.b.b.b.2+c c c c c c c c c c c c c c c c c c c c 3+v.r.r.r.q.q.q.q.q.q.q.q.q.v.v.v.v.v.v.v.v.v.  \",\r\n\"  4+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4+5+5+5+5+5+)+6+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.j.0 c c c c c c c 7+b.b.b.b.b.b.b.b.b.b.b.{ c c c c c c c c c c J b.b.b.b.b.b.b.P.c c c c c c c c c c c c c c c c c c c / x.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.  \",\r\n\"  8+8+8+8+8+8+8+8+8+8+8+8+8+8+8+8+8+8+8+8+8+8+9+i.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.P.9 c c c c c c c 0+b.b.b.b.b.b.b.b.b.b.a+c c c c c c c c c c c D b.b.b.b.b.b.b.P.9 c c c c c c c c c c c c c c c c c c b+Q.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.  \",\r\n\"  c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+d+d+d+e+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.I c c c c c c c f+b.b.b.b.b.b.b.b.b.b.g+c c c c c c c c c c c ) b.b.b.b.b.b.b.h+c c c c c c c c c c c c c c c c c c i+$+U.U.U.U.U.U.U.U.U.U.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.  \",\r\n\"  c+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+X.j+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.k+~ c c c c c l+b.b.b.b.b.b.b.b.b.b.b.r c c c c c c c c c c c c m+b.b.b.b.b.(+& c c c c c c c c c c c c c c c c c c n+T.T.T.T.T.T.T.T.T.T.T.T.U.U.U.U.U.U.U.U.U.U.U.Q.  \",\r\n\"  d+9+9+9+9+9+9+9+9+9+9+9+9+9+o+o+o+o+o+o+o+A.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.>+: c c 0 p+b.b.b.b.b.b.b.b.b.b.b.q+i c c c c c c c c c c c c c r+b.b.b.s+] c c c c c c c c c c c c c c c c c c t+)+.+.+.+.+ + + + + + + + + + + + + +X.X.X.X.X.X.U.  \",\r\n\"  d+o+o+9+9+o+o+o+o+o+u+u+u+u+o+o+o+u+u+u+u+v+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.2.w+b.b.b.b.b.b.b.b.b.b.b.b.b.x+f c c c c c c c c c c c c c c c e : c c c c c c c c c c c c c c c c c c c ; 4+)+)+-+-+.+-+-+-+-+-+.+.+.+ + + + +.+.+.+.+ + + +T.  \",\r\n\"  9+o+o+u+u+u+u+u+u+u+u+u+u+y+y+y+y+y+y+z+A+B+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.(+r c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c 0 &.<+[+[+[+[+)+)+)+)+-+-+-+-+-+-+-+-+-+.+.+.+.+.+.+.+ +  \",\r\n\"  u+u+y+y+y+y+y+y+z+z+z+z+z+C+C+D+D+D+D+D+E+@+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.j.F+/+c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c +.G+8+8+8+4+4+5+5+5+<+<+[+[+[+[+)+)+)+)+)+)+-+-+-+-+-+.+  \",\r\n\"  H+y+z+z+z+z+z+z+C+C+D+D+D+D+D+I+I+J+J+K+R.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.L+i.M+c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c N+9+O+c+c+P+8+8+8+8+4+5+5+5+5+<+<+[+[+[+[+[+)+)+)+)+)+)+-+  \",\r\n\"  y+C+D+D+D+D+D+I+I+J+J+J+J+Q+A+A+A+A+R+S+n.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.@+a.T+U+q c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c V+u+9+9+9+9+d+d+d+O+c+c+c+P+P+8+8+8+4+4+4+5+5+5+5+<+<+<+[+!+  \",\r\n\"  W+J+I+I+I+J+J+J+J+Q+Q+A+A+A+R+R+X+X+X+z+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.Y+f+k.Z+`+0 c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c  @C+u+H+o+o+9+9+9+9+d+d+d+O+O+c+c+c+P+8+8+8+8+4+4+4+5+5+5+8+H.  \",\r\n\"  .@A+Q+Q+A+A+A+R+R+X+X+X++@+@+@+@+@+@@@#@b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.@+L+$@t.4.%@B c c c c c c c c c c c c c c c c c c c c c c c c c c c c c P I+C+C+y+y+K+u+u+H+o+o+9+9+9+9+9+d+d+d+O+O+c+c+c+P+P+P+8+8+8+g.  \",\r\n\"    X+A+A+R+R+X+&@&@X++@+@+@+@+@@@@@*@=@-@b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.P.;@>@t.4.}+,@f c c c c c c c c c c c c c c c c c c c c c c c c c c #+'@@@J+Q+I+)@C+z+!@y+u+u+~@H+{@o+9+9+9+9+9+]@]@9+d+O+O+c+c+c+P+O+    \",\r\n\"    X+X++@+@+@+@+@+@+@@@@@@@=@^@^@/@/@(@_@b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.q+(+:@<@a+}+[@h+& c c c c c c c c c c c c c c c c c c c c c c c c p.+@+@X+X+A+A+J+J+I+D+C+C+z+y+y+K+u+u+H+H+o+o+9+9+9+9+9+9+d+d+d+d+O+    \",\r\n\"    H++@+@+@@@@@@@=@^@^@^@/@(@(@}@|@|@1@2@b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.@+L+f+k+<@a+5.3@^+4@'.c c c c c c c c c c c c c c c c c c c c c $ 5@6@/@^@@@@@+@+@X+X+A+A+J+J+I+D+C+C+z+y+y+y+K+u+u+H+H+o+o+9+9+9+9+9+.@    \",\r\n\"    S+@@@@@@=@=@^@^@/@(@(@(@}@|@|@1@1@7@8@b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.j.x+F+k.9@s+5.0@^+7+7+a@- c c c c c c c c c c c c c c c c 9 ~ b@c@d@1@|@(@^@^@@@@@+@+@X+A+A+A+J+J+I+D+C+C+z+z+y+y+K+u+u+H+H+o+o+o+9+9+e@    \",\r\n\"      ^@^@^@/@(@(@(@}@|@|@1@7@7@d@d@f@d@a+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.q+a.g@{+3.s+5.8@c.h@i@j@,+k@d c c c c c c c c c c c c 2 t l@m@n@6@++f@d@7@|@(@(@^@^@@@@@+@+@X+X+A+A+A+J+J+I+I+C+C+C+y+y+y+K+u+u+u+H+H+      \",\r\n\"      /@(@(@(@}@|@|@|@1@7@7@d@d@f@f@f@f@B+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.P.L+|+>@U+o@s+5.8@p@h@;+j@q@r@s@t@d.n : . & * % @ a M u@I.v@w@x@n@m@m@6@++y@d@1@}@(@/@^@@@@@+@+@+@X+X+A+A+A+J+J+I+I+C+C+C+z+y+y+y+K+u+u+      \",\r\n\"      E+}@|@|@1@7@7@d@d@d@f@f@6@6@6@m@6@z@b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.Y+x+f+:@U+o@s+5.,@p@A@h+B@C@p+D@o.E@F@l+G@1+`.H@I@I@J@K@K@7.k@L@M@x@N@N@m@6@f@f@d@1@|@(@(@^@^@@@@@+@+@+@X+X+A+A+A+J+J+I+I+D+D+C+C+z+y+u+      \",\r\n\"      l@7@1@7@7@d@d@d@f@f@6@6@6@6@m@m@m@U+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.@+q+;@$@:@t.>+s+5.,@C.|.7+i@J.O@P@Q@R@F@S@l+T@U@1+V@H@a@W@X@K@7.Y@L@Z@`@ #N@m@6@++++d@7@1@}@(@/@^@^@@@@@+@+@X+X+X+A+A+A+J+J+I+I+I+D+C+I+.#      \",\r\n\"        y@d@d@f@f@f@6@6@6@m@m@m@N@N@n@N@U+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.P.L+(+g@T+B+2.s+5.*+C.+#M+;+j@q@p+D@o.E@t@@#l+##$#1+V@H@a@J@K@K@%#7.Y@L@`@n@n@m@m@6@6@f@d@d@1@1@(@(@/@^@^@@@@@+@+@+@X+X+A+A+A+A+J+J+I+Q+        \",\r\n\"        &#f@f@6@6@6@m@m@m@m@N@N@n@x@n@ #t.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.Y+x+|+>@k.<@>+*#5.,@[@^+h@;+B@J.s@P@Q@R@=#-#;#>###$#,#V@H@a@J@X@K@%#7.k@L@w@x@n@N@N@6@6@++y@y@7@7@1@|@(@'#^@*@^@@@@@+@X++@X+X+A+A+A+A+S+        \",\r\n\"        )#6@6@6@m@m@m@N@N@n@n@n@x@`@`@`@>+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.P.!#;@F+>@{+<@>+*#5.~#[@^+S.0+i@{#q@]#D@o.E@F@S@]+^#G@$#,#V@H@a@J@/#K@%#7.k@L@w@`@x@N@N@m@m@6@f@f@d@d@1@1@}@(@/@^@^@@@@@@@+@+@X+X+X+X+A+(#        \",\r\n\"          m@m@m@N@N@N@n@n@n@`@Z@Z@L@L@L@}+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.j.L+a.F+:@{+9@2.*#5.*+3@p@A@7+i@j@_#s@P@Q@:#=#t@@#l+}.G@$#,#V@<#a@J@/#K@%#%#[#k@L@w@`@n@N@N@m@6@6@++y@d@7@1@1@|@(@(@/@^@^@@@@@@@+@+@X++@          \",\r\n\"          }@N@N@N@n@n@x@x@`@Z@w@L@Y@k@[#p@b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.@+q+x+(+g@:@U+9@2.*#5.*+3@p@|.M+4@B@J.O@r@D@o.}#|#-#;#>#T@U@1#,#V@<#a@J@/#K@K@%#[#Y@L@w@`@n@n@N@m@m@6@++f@y@d@1@1@|@}@(@/@^@^@^@@@@@+@+@K+          \",\r\n\"            n@n@n@x@`@`@w@L@L@k@k@[#7.2#h@b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.P.!#x+f+>@k+U+3.Z+*#%@*+0@3#|.h@;+2+{#q@p+P@Q@:#E@F@S@]+>#T@G@1#4#V@<#a@5#W@X@K@%#7.[#Y@L@Z@`@n@N@N@m@m@6@++f@y@d@7@1@1@|@(@(@/@^@^@@@^@            \",\r\n\"            6#n@`@`@Z@w@L@Y@k@k@[#7.%#%#`+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.Y+L+a.F+i.T+t.3.Z+*#%@~#0@3#+#h@0+i@j@C@O@r@D@7#}#=#t@@#]+^###U@1#4#V@<#a@5#W@X@K@%#7.k@Y@w@w@`@x@n@N@m@m@6@6@++f@d@d@1@1@|@}@(@(@^@^@A+            \",\r\n\"            &#w@w@L@L@Y@k@[#7.2#%#%#K@K@t@b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.@+q+8#a.$@i.k.B+o@Z+*#%@~#0@3#^+A@7+4@6.J.O@p+P@Q@o.E@F@-#;#l+}.##U@1#4#V@<#a@5#W@/#K@K@%#[#k@L@w@Z@`@n@n@N@m@m@6@6@f@f@y@d@7@1@1@}@(@E+9#            \",\r\n\"               #L@Y@k@k@[#7.%#%#%#K@X@W@5#b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.j.!#x+|+$@:@{+B+o@Z+*#%@~#8@C.c.A@7+;+2+{#_#p+P@D@7#R@=#F@S@;#>#}.G@$#1#4#`.<#a@5#W@X@K@K@%#[#k@0#L@Z@`@x@N@N@m@m@6@6@++f@y@d@d@1@1@1@=@              \",\r\n\"              a#k@k@7.7.2#%#%#K@K@/#5#a@/#|+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.@+Y+L+;@f+g@k+{+B+o@Z+*#%@~#8@[@c.|.M+h+2+j@C@O@]#`+Q@o.}#|#t@@#l+>#T@##1#1+4#`.<#a@5#W@/#K@K@%#7.[#Y@L@w@Z@`@x@N@N@m@m@6@6@6@f@y@d@d@7@l@              \",\r\n\"                L@7.%#%#%#K@K@X@J@5#I@<#H@c.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.P.q+8#a.F+>@k+U+<@o@4.*#%@b#8@[@p@|.h@0+i@6.{#q@s@P@,+7#R@E@F@-#@#l+^###G@$#1+4#<#<#a@5#W@/#K@K@%#%#[#k@Y@w@w@`@`@n@n@N@N@m@6@6@++f@f@1@                \",\r\n\"                =@K@%#K@K@X@W@J@a@H@V@4#1#S@b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.j.!#x+(+$@i.T+U+<@>+4.*#%@b#8@[@p@+#S.7+4@B@{#_#O@]#`+Q@o.}#=#t@S@;#>#^###G@1#1+4#<#<#a@5#J@/#K@K@%#7.7.k@Y@L@w@`@x@n@N@N@m@m@6@6@6@6@~@                \",\r\n\"                   #K@K@/#J@a@H@`.V@1+1#G@>#;@b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.P.Y+L+;@|+$@i.k.t.9@>+4.*#%@b#,@3@3#^+S.7+;+2+j@J.q@p+r@,+7#:#E@|#-#S@]+>#}.##U@1#1+4#<#<#a@5#J@/#X@K@%#%#7.[#k@L@w@Z@`@x@n@N@N@m@m@m@=@                  \",\r\n\"                    X@W@5#a@<#`.4#1+$###}.l+t.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.P.q+8#;@f+g@:@k.t.9@>+4.*#%@b#,@3@3#^+A@M+h+i@6.J._#s@r@`+Q@:#}#=#F@-#@#]+>#T@G@U@1#,#4#<#<#I@5#J@W@X@K@K@%#7.k@k@L@L@w@`@`@n@n@N@N@m@                    \",\r\n\"                    L@a@H@<#V@,#1#U@##^#l+;#|.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.@+Y+!#x+(+f+>@k+{+t.9@>+4.*#%@b#,@3@3#c.|.h@h+4@B@{#C@O@p+P@,+7#:#}#|#t@S@;#l+}.T@G@U@1+1+V@`.<#I@5#J@W@X@K@K@%#%#[#k@Y@L@w@w@`@`@n@n@c#                    \",\r\n\"                      a@`.4#1+$#G@T@>#l+;#-#}#b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.P.Y+L+x+|+F+i.k+{+B+9@2.4.*#%@b#,@0@C.c.|.S.7+;+2+j@J.q@s@r@`+Q@o.}#E@F@t@@#]+l+}.T@G@$#1+,#V@<#<#I@5#J@W@X@K@K@%#%#7.k@Y@L@w@Z@`@x@m@                      \",\r\n\"                      Z@,#1#$###T@>#]+S@-#F@F@Z+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.@+j.!#8#a.|+$@i.T+{+B+3.2.4.*#%@}+*+0@C.p@+#S.7+;+i@6.{#_#O@]#P@,+Q@:#E@=#F@-#@#]+>#}.##G@$#1+,#V@`.<#I@5#J@W@/#K@K@K@%#7.[#k@Y@L@w@Z@a#                      \",\r\n\"                        a@G@T@^#l+]+S@t@|#}#:#{#b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.@+Y+!#x+a.f+$@i.T+U+<@3.2.a+*#%@}+*+0@C.p@+#A@M+h+4@B@{#C@O@p+r@`+Q@7#R@E@|#t@S@;#]+>#T@##U@$#1+,#V@<#<#I@a@J@W@/#X@K@K@%#7.7.k@k@Y@}@                        \",\r\n\"                          1#^#l+;#-#t@=#}#:#Q@r@;@b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.j.q+L+;@(+F+g@:@k.U+<@3.2.a+n.%@}+*+8@[@p@^+A@M+0+4@2+j@J._#s@]#P@,+7#o.}#=#|#-#S@]+l+^#T@##U@$#1+,#V@<#<#I@a@J@W@/#X@K@%#%#7.7.k@ #                          \",\r\n\"                            @#@#-#t@=#}#o.Q@`+P@}+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.@+j.q+8#;@|+F+>@k+k.t.<@o@2.a+n.%@}+*+8@[@3#^+|.h@7+;+2+6.{#_#O@p+r@`+Q@o.:#E@|#t@-#@#]+l+^#T@##U@1#1+,#V@`.<#I@a@J@J@/#X@K@K@%#%#v@                            \",\r\n\"                            W@-#F@E@R@o.Q@`+r@p+,+@+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.P.Y+L+x+a.|+$@>@k+k.t.<@o@Z+a+n.%@}+*+8@3@3#^+|.h@7+;+4@B@{#C@q@s@r@P@,+Q@:#}#E@F@t@S@;#l+>#}.####$#1#1+,#V@<#<#I@a@J@J@/#X@K@K@%#u@                            \",\r\n\"                              }.}#}#o.Q@`+r@s@q@J.8@b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.@+j.q+L+x+(+f+g@i.k+{+t.<@o@Z+a+n.%@}+~#8@3@3#c.|.S.M+h+4@2+j@{#q@O@p+P@D@Q@7#R@}#=#F@-#@#;#l+>#}.T@G@$#1#1+4#V@`.<#I@a@J@J@/#/#X@d#                              \",\r\n\"                                @#7#,+`+r@s@q@C@j@4@j.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.@+Y+!#8#;@(+f+g@i.T+{+B+9@o@Z+a+n.%@}+~#8@3@C.p@+#S.M+0+;+2+6.{#C@q@s@r@`+,+7#:#R@E@|#t@-#@#]+l+^#T@##G@$#1#1+4#V@<#<#I@a@5#J@/#x@                                \",\r\n\"                                  o.`+r@s@q@J.j@B@i@~#b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.P.Y+L+8#a.f+F+>@i.k.U+B+9@>+2.a+n.w+}+~#,@3@C.p@+#A@h@7+;+i@B@j@C@_#s@]#P@D@Q@7#:#}#=#|#-#S@;#]+>#^#T@##U@$#1#,#4#`.`.<#I@a@5#/#                                  \",\r\n\"                                    7#s@q@C@j@B@4@0+i@F+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.@+j.q+L+x+a.|+$@>@:@k.U+B+9@>+Z+a+n.w+}+~#,@0@C.p@^+A@h@7+h+i@2+j@J._#O@p+r@`+,+7#o.R@E@|#F@t@S@;#]+>#^#T@##U@1#1#,#4#V@`.<#I@X@                                    \",\r\n\"                                      O@C@j@B@i@0+M+A@*+b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.@+Y+!#8#;@(+f+$@i.k+k.U+<@3.>+Z+a+n.w+}+~#,@0@C.p@^+|.S.7+0+4@2+6.{#C@q@s@]#r@D@Q@7#:#}#E@F@t@S@@#]+l+^#}.T@G@U@1#1#,#4#`.`.H@                                      \",\r\n\"                                        s@B@i@h+7+S.|.|.t.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.j.Y+!#8#;@|+F+g@i.k+{+U+<@3.>+4.a+n.w+}+b#,@0@[@p@c.|.S.M+0+;+i@B@{#J.q@O@p+r@P@,+Q@o.R@}#=#|#t@S@@#]+l+^#}.####U@1#1+,#4#5#                                        \",\r\n\"                                          2+h+7+h@+#^+C.p@8#b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.P.j.!#L+x+(+|+F+g@:@k+{+t.<@3.2.4.a+n.w+}+b#,@0@[@3#c.|.A@M+7+;+i@B@j@{#_#q@p+]#P@D@Q@7#:#}#E@|#F@-#@#;#l+l+^#}.##G@U@1#1+V@                                          \",\r\n\"                                            {#S.|.^+3#[@,@5.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.P.Y+!#8#;@(+f+F+>@:@T+{+t.<@3.2.4.s+n.w+5.b#,@8@3@3#c.+#A@h@7+h+i@2+6.j@C@q@O@]#r@`+,+Q@o.:#E@E@|#t@-#@#;#l+>#}.T@##U@G@I@                                            \",\r\n\"                                              j@^+3#[@8@*+*+<@b.b.b.b.b.b.b.b.b.b.b.b.b.@+j.Y+L+8#a.(+f+g@>@:@T+{+t.9@3.2.4.s+n.w+5.b#,@0@3@3#p@+#A@h@M+h+;+i@B@j@C@_#O@s@r@r@D@Q@7#:#R@E@|#F@-#S@@#]+l+>#}.T@##a@                                              \",\r\n\"                                                D@0@8@,@}+%@w+x+b.b.b.b.b.b.b.b.b.b.b.b.P.Y+q+L+x+a.|+F+g@i.k+k.U+B+9@3.2.4.s+n.w+5.b#*+0@3@3#p@+#|.S.7+0+;+i@B@j@{#_#q@s@p+P@P@,+Q@o.R@}#=#|#t@-#S@;#]+l+^#^#k@                                                \",\r\n\"                                                    3#}+5.1.s+5.!#b.b.b.b.b.b.b.b.b.b.@+P.Y+!#8#x+a.|+F+g@i.k+k.U+B+9@o@2.4.s+n.w+5.b#*+,@3@C.p@^+|.S.M+7+;+4@2+6.{#J.q@O@p+]#P@D@Q@7#o.}#E@=#|#t@-#@#]+;#G@                                                    \",\r\n\"                                                      +#w+*#a+>+4.P.b.b.b.b.b.b.b.b.b.@+j.q+!#x+;@(+|+$@>@i.T+k.t.B+9@>+2.4.s+n.w+5.b#*+,@3@C.3#^++#S.h@7+h+4@2+6.j@J._#O@s@]#r@`+,+Q@7#:#}#E@|#F@-#-#@#1+                                                      \",\r\n\"                                                        7+1.>+o@9@9@@+b.b.b.b.b.b.b.b.P.Y+q+L+x+a.|+f+$@>@:@T+k.t.B+9@>+2.4.s+n.w+5.b#*+,@3@C.3#c.+#A@h@7+0+4@i@B@j@{#C@q@O@p+r@P@D@Q@7#:#R@E@=#|#F@;#<#                                                        \",\r\n\"                                                            ~#9@t.T+U+b.b.b.b.b.b.b.@+j.Y+!#8#x+a.|+F+$@i.:@T+{+t.B+9@>+2.4.s+n.w+5.b#*+8@0@[@3#c.+#A@S.M+0+;+i@2+j@j@C@_#O@s@]#P@`+,+7#7#:#}#E@=#T@                                                            \",\r\n\"                                                                a+:@:@t.b.b.b.b.b.b.P.Y+q+L+8#;@a.f+F+g@>@k+k.{+t.<@3.>+2.4.s+n.w+5.b#~#8@0@[@3#c.^+|.S.M+0+h+4@2+B@{#{#_#q@s@p+r@P@D@Q@7#o.o.;#                                                                \",\r\n\"                                                                  b#k+|+:@b.b.b.b.b.j.j.!#L+x+;@(+f+F+>@i.k+k.{+t.<@3.>+Z+4.s+n.w+5.}+~#8@0@[@C.c.^+|.A@M+7+h+4@i@B@j@{#C@q@q@p+r@r@`+D@Q@R@G@                                                                  \",\r\n\"                                                                      ~#$@k+@+b.b.@+j.Y+!#8#x+a.|+f+$@>@:@k+k.{+B+<@3.>+Z+a+s+n.w+5.}+~#8@8@[@C.p@^+|.S.h@7+0+4@4@B@6.{#J._#O@O@p+P@r@o.U@                                                                      \",\r\n\"                                                                          9@<@@+b.P.j.q+!#x+;@(+|+F+g@>@:@k+{+U+B+<@3.>+Z+a+s+n.w+5.}+~#,@8@[@C.p@^++#A@h@7+0+;+4@2+6.j@J.C@q@O@s@7#S@                                                                          \",\r\n\"                                                                                (+@+Y+q+L+x+;@(+|+F+g@i.:@T+{+U+B+<@o@>+Z+a+s+n.w+5.}+~#,@8@3@C.p@c.+#|.S.M+7+h+4@i@B@j@{#C@C@,+                                                                                \",\r\n\"                                                                                    k.>@L+8#a.|+f+$@g@i.k+T+{+U+<@9@o@>+Z+a+*#n.w+5.}+~#,@8@3@C.3#c.+#|.S.M+7+h+4@i@i@B@]#Q@                                                                                    \",\r\n\"                                                                                          1.a.|+f+$@g@i.:@k.{+t.<@9@o@>+Z+a+*#n.w+5.}+~#,@8@3@C.3#c.+#|.S.M+7+h+4@i@E@                                                                                          \",\r\n\"                                                                                                  4.4.i.:@T+k.t.<@9@o@>+Z+a+*#n.w+5.}+~#,@8@3@[@3#3#c.^+S.J.s@                                                                                                  \",\r\n\"                                                                                                          C.}+<@o@o@Z+a+s+s+n.n.w+5.~#,@3@3@[@p@p@j@s@                                                                                                          \",\r\n\"                                                                                                                                                                                                                                                                \"};\r\n"
  },
  {
    "path": "liteidex/deploy/welcome/zh_CN/LGPL_EXCEPTION.TXT",
    "content": "LiteIDE is distributed under the terms of the LGPLv2.1 license with an exception:\n\nLicense exception:\nIn addition, as a special exception,  that plugins developed for LiteIDE,\nare allowed to remain closed sourced and can be distributed under any license .\n"
  },
  {
    "path": "liteidex/deploy/welcome/zh_CN/LICENSE.LGPL",
    "content": "\t\t  GNU LESSER GENERAL PUBLIC LICENSE\n\t\t       Version 2.1, February 1999\n\n Copyright (C) 1991, 1999 Free Software Foundation, Inc.\n 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n[This is the first released version of the Lesser GPL.  It also counts\n as the successor of the GNU Library Public License, version 2, hence\n the version number 2.1.]\n\n\t\t\t    Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicenses are intended to guarantee your freedom to share and change\nfree software--to make sure the software is free for all its users.\n\n  This license, the Lesser General Public License, applies to some\nspecially designated software packages--typically libraries--of the\nFree Software Foundation and other authors who decide to use it.  You\ncan use it too, but we suggest you first think carefully about whether\nthis license or the ordinary General Public License is the better\nstrategy to use in any particular case, based on the explanations below.\n\n  When we speak of free software, we are referring to freedom of use,\nnot price.  Our General Public Licenses are designed to make sure that\nyou have the freedom to distribute copies of free software (and charge\nfor this service if you wish); that you receive source code or can get\nit if you want it; that you can change the software and use pieces of\nit in new free programs; and that you are informed that you can do\nthese things.\n\n  To protect your rights, we need to make restrictions that forbid\ndistributors to deny you these rights or to ask you to surrender these\nrights.  These restrictions translate to certain responsibilities for\nyou if you distribute copies of the library or if you modify it.\n\n  For example, if you distribute copies of the library, whether gratis\nor for a fee, you must give the recipients all the rights that we gave\nyou.  You must make sure that they, too, receive or can get the source\ncode.  If you link other code with the library, you must provide\ncomplete object files to the recipients, so that they can relink them\nwith the library after making changes to the library and recompiling\nit.  And you must show them these terms so they know their rights.\n\n  We protect your rights with a two-step method: (1) we copyright the\nlibrary, and (2) we offer you this license, which gives you legal\npermission to copy, distribute and/or modify the library.\n\n  To protect each distributor, we want to make it very clear that\nthere is no warranty for the free library.  Also, if the library is\nmodified by someone else and passed on, the recipients should know\nthat what they have is not the original version, so that the original\nauthor's reputation will not be affected by problems that might be\nintroduced by others.\n\f\n  Finally, software patents pose a constant threat to the existence of\nany free program.  We wish to make sure that a company cannot\neffectively restrict the users of a free program by obtaining a\nrestrictive license from a patent holder.  Therefore, we insist that\nany patent license obtained for a version of the library must be\nconsistent with the full freedom of use specified in this license.\n\n  Most GNU software, including some libraries, is covered by the\nordinary GNU General Public License.  This license, the GNU Lesser\nGeneral Public License, applies to certain designated libraries, and\nis quite different from the ordinary General Public License.  We use\nthis license for certain libraries in order to permit linking those\nlibraries into non-free programs.\n\n  When a program is linked with a library, whether statically or using\na shared library, the combination of the two is legally speaking a\ncombined work, a derivative of the original library.  The ordinary\nGeneral Public License therefore permits such linking only if the\nentire combination fits its criteria of freedom.  The Lesser General\nPublic License permits more lax criteria for linking other code with\nthe library.\n\n  We call this license the \"Lesser\" General Public License because it\ndoes Less to protect the user's freedom than the ordinary General\nPublic License.  It also provides other free software developers Less\nof an advantage over competing non-free programs.  These disadvantages\nare the reason we use the ordinary General Public License for many\nlibraries.  However, the Lesser license provides advantages in certain\nspecial circumstances.\n\n  For example, on rare occasions, there may be a special need to\nencourage the widest possible use of a certain library, so that it becomes\na de-facto standard.  To achieve this, non-free programs must be\nallowed to use the library.  A more frequent case is that a free\nlibrary does the same job as widely used non-free libraries.  In this\ncase, there is little to gain by limiting the free library to free\nsoftware only, so we use the Lesser General Public License.\n\n  In other cases, permission to use a particular library in non-free\nprograms enables a greater number of people to use a large body of\nfree software.  For example, permission to use the GNU C Library in\nnon-free programs enables many more people to use the whole GNU\noperating system, as well as its variant, the GNU/Linux operating\nsystem.\n\n  Although the Lesser General Public License is Less protective of the\nusers' freedom, it does ensure that the user of a program that is\nlinked with the Library has the freedom and the wherewithal to run\nthat program using a modified version of the Library.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.  Pay close attention to the difference between a\n\"work based on the library\" and a \"work that uses the library\".  The\nformer contains code derived from the library, whereas the latter must\nbe combined with the library in order to run.\n\f\n\t\t  GNU LESSER GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License Agreement applies to any software library or other\nprogram which contains a notice placed by the copyright holder or\nother authorized party saying it may be distributed under the terms of\nthis Lesser General Public License (also called \"this License\").\nEach licensee is addressed as \"you\".\n\n  A \"library\" means a collection of software functions and/or data\nprepared so as to be conveniently linked with application programs\n(which use some of those functions and data) to form executables.\n\n  The \"Library\", below, refers to any such software library or work\nwhich has been distributed under these terms.  A \"work based on the\nLibrary\" means either the Library or any derivative work under\ncopyright law: that is to say, a work containing the Library or a\nportion of it, either verbatim or with modifications and/or translated\nstraightforwardly into another language.  (Hereinafter, translation is\nincluded without limitation in the term \"modification\".)\n\n  \"Source code\" for a work means the preferred form of the work for\nmaking modifications to it.  For a library, complete source code means\nall the source code for all modules it contains, plus any associated\ninterface definition files, plus the scripts used to control compilation\nand installation of the library.\n\n  Activities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning a program using the Library is not restricted, and output from\nsuch a program is covered only if its contents constitute a work based\non the Library (independent of the use of the Library in a tool for\nwriting it).  Whether that is true depends on what the Library does\nand what the program that uses the Library does.\n\n  1. You may copy and distribute verbatim copies of the Library's\ncomplete source code as you receive it, in any medium, provided that\nyou conspicuously and appropriately publish on each copy an\nappropriate copyright notice and disclaimer of warranty; keep intact\nall the notices that refer to this License and to the absence of any\nwarranty; and distribute a copy of this License along with the\nLibrary.\n\n  You may charge a fee for the physical act of transferring a copy,\nand you may at your option offer warranty protection in exchange for a\nfee.\n\f\n  2. You may modify your copy or copies of the Library or any portion\nof it, thus forming a work based on the Library, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) The modified work must itself be a software library.\n\n    b) You must cause the files modified to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    c) You must cause the whole of the work to be licensed at no\n    charge to all third parties under the terms of this License.\n\n    d) If a facility in the modified Library refers to a function or a\n    table of data to be supplied by an application program that uses\n    the facility, other than as an argument passed when the facility\n    is invoked, then you must make a good faith effort to ensure that,\n    in the event an application does not supply such function or\n    table, the facility still operates, and performs whatever part of\n    its purpose remains meaningful.\n\n    (For example, a function in a library to compute square roots has\n    a purpose that is entirely well-defined independent of the\n    application.  Therefore, Subsection 2d requires that any\n    application-supplied function or table used by this function must\n    be optional: if the application does not supply it, the square\n    root function must still compute square roots.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Library,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Library, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote\nit.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Library.\n\nIn addition, mere aggregation of another work not based on the Library\nwith the Library (or with a work based on the Library) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may opt to apply the terms of the ordinary GNU General Public\nLicense instead of this License to a given copy of the Library.  To do\nthis, you must alter all the notices that refer to this License, so\nthat they refer to the ordinary GNU General Public License, version 2,\ninstead of to this License.  (If a newer version than version 2 of the\nordinary GNU General Public License has appeared, then you can specify\nthat version instead if you wish.)  Do not make any other change in\nthese notices.\n\f\n  Once this change is made in a given copy, it is irreversible for\nthat copy, so the ordinary GNU General Public License applies to all\nsubsequent copies and derivative works made from that copy.\n\n  This option is useful when you wish to copy part of the code of\nthe Library into a program that is not a library.\n\n  4. You may copy and distribute the Library (or a portion or\nderivative of it, under Section 2) in object code or executable form\nunder the terms of Sections 1 and 2 above provided that you accompany\nit with the complete corresponding machine-readable source code, which\nmust be distributed under the terms of Sections 1 and 2 above on a\nmedium customarily used for software interchange.\n\n  If distribution of object code is made by offering access to copy\nfrom a designated place, then offering equivalent access to copy the\nsource code from the same place satisfies the requirement to\ndistribute the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  5. A program that contains no derivative of any portion of the\nLibrary, but is designed to work with the Library by being compiled or\nlinked with it, is called a \"work that uses the Library\".  Such a\nwork, in isolation, is not a derivative work of the Library, and\ntherefore falls outside the scope of this License.\n\n  However, linking a \"work that uses the Library\" with the Library\ncreates an executable that is a derivative of the Library (because it\ncontains portions of the Library), rather than a \"work that uses the\nlibrary\".  The executable is therefore covered by this License.\nSection 6 states terms for distribution of such executables.\n\n  When a \"work that uses the Library\" uses material from a header file\nthat is part of the Library, the object code for the work may be a\nderivative work of the Library even though the source code is not.\nWhether this is true is especially significant if the work can be\nlinked without the Library, or if the work is itself a library.  The\nthreshold for this to be true is not precisely defined by law.\n\n  If such an object file uses only numerical parameters, data\nstructure layouts and accessors, and small macros and small inline\nfunctions (ten lines or less in length), then the use of the object\nfile is unrestricted, regardless of whether it is legally a derivative\nwork.  (Executables containing this object code plus portions of the\nLibrary will still fall under Section 6.)\n\n  Otherwise, if the work is a derivative of the Library, you may\ndistribute the object code for the work under the terms of Section 6.\nAny executables containing that work also fall under Section 6,\nwhether or not they are linked directly with the Library itself.\n\f\n  6. As an exception to the Sections above, you may also combine or\nlink a \"work that uses the Library\" with the Library to produce a\nwork containing portions of the Library, and distribute that work\nunder terms of your choice, provided that the terms permit\nmodification of the work for the customer's own use and reverse\nengineering for debugging such modifications.\n\n  You must give prominent notice with each copy of the work that the\nLibrary is used in it and that the Library and its use are covered by\nthis License.  You must supply a copy of this License.  If the work\nduring execution displays copyright notices, you must include the\ncopyright notice for the Library among them, as well as a reference\ndirecting the user to the copy of this License.  Also, you must do one\nof these things:\n\n    a) Accompany the work with the complete corresponding\n    machine-readable source code for the Library including whatever\n    changes were used in the work (which must be distributed under\n    Sections 1 and 2 above); and, if the work is an executable linked\n    with the Library, with the complete machine-readable \"work that\n    uses the Library\", as object code and/or source code, so that the\n    user can modify the Library and then relink to produce a modified\n    executable containing the modified Library.  (It is understood\n    that the user who changes the contents of definitions files in the\n    Library will not necessarily be able to recompile the application\n    to use the modified definitions.)\n\n    b) Use a suitable shared library mechanism for linking with the\n    Library.  A suitable mechanism is one that (1) uses at run time a\n    copy of the library already present on the user's computer system,\n    rather than copying library functions into the executable, and (2)\n    will operate properly with a modified version of the library, if\n    the user installs one, as long as the modified version is\n    interface-compatible with the version that the work was made with.\n\n    c) Accompany the work with a written offer, valid for at\n    least three years, to give the same user the materials\n    specified in Subsection 6a, above, for a charge no more\n    than the cost of performing this distribution.\n\n    d) If distribution of the work is made by offering access to copy\n    from a designated place, offer equivalent access to copy the above\n    specified materials from the same place.\n\n    e) Verify that the user has already received a copy of these\n    materials or that you have already sent this user a copy.\n\n  For an executable, the required form of the \"work that uses the\nLibrary\" must include any data and utility programs needed for\nreproducing the executable from it.  However, as a special exception,\nthe materials to be distributed need not include anything that is\nnormally distributed (in either source or binary form) with the major\ncomponents (compiler, kernel, and so on) of the operating system on\nwhich the executable runs, unless that component itself accompanies\nthe executable.\n\n  It may happen that this requirement contradicts the license\nrestrictions of other proprietary libraries that do not normally\naccompany the operating system.  Such a contradiction means you cannot\nuse both them and the Library together in an executable that you\ndistribute.\n\f\n  7. You may place library facilities that are a work based on the\nLibrary side-by-side in a single library together with other library\nfacilities not covered by this License, and distribute such a combined\nlibrary, provided that the separate distribution of the work based on\nthe Library and of the other library facilities is otherwise\npermitted, and provided that you do these two things:\n\n    a) Accompany the combined library with a copy of the same work\n    based on the Library, uncombined with any other library\n    facilities.  This must be distributed under the terms of the\n    Sections above.\n\n    b) Give prominent notice with the combined library of the fact\n    that part of it is a work based on the Library, and explaining\n    where to find the accompanying uncombined form of the same work.\n\n  8. You may not copy, modify, sublicense, link with, or distribute\nthe Library except as expressly provided under this License.  Any\nattempt otherwise to copy, modify, sublicense, link with, or\ndistribute the Library is void, and will automatically terminate your\nrights under this License.  However, parties who have received copies,\nor rights, from you under this License will not have their licenses\nterminated so long as such parties remain in full compliance.\n\n  9. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Library or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Library (or any work based on the\nLibrary), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Library or works based on it.\n\n  10. Each time you redistribute the Library (or any work based on the\nLibrary), the recipient automatically receives a license from the\noriginal licensor to copy, distribute, link with or modify the Library\nsubject to these terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties with\nthis License.\n\f\n  11. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Library at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Library by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Library.\n\nIf any portion of this section is held invalid or unenforceable under any\nparticular circumstance, the balance of the section is intended to apply,\nand the section as a whole is intended to apply in other circumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  12. If the distribution and/or use of the Library is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Library under this License may add\nan explicit geographical distribution limitation excluding those countries,\nso that distribution is permitted only in or among countries not thus\nexcluded.  In such case, this License incorporates the limitation as if\nwritten in the body of this License.\n\n  13. The Free Software Foundation may publish revised and/or new\nversions of the Lesser General Public License from time to time.\nSuch new versions will be similar in spirit to the present version,\nbut may differ in detail to address new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Library\nspecifies a version number of this License which applies to it and\n\"any later version\", you have the option of following the terms and\nconditions either of that version or of any later version published by\nthe Free Software Foundation.  If the Library does not specify a\nlicense version number, you may choose any version ever published by\nthe Free Software Foundation.\n\f\n  14. If you wish to incorporate parts of the Library into other free\nprograms whose distribution conditions are incompatible with these,\nwrite to the author to ask for permission.  For software which is\ncopyrighted by the Free Software Foundation, write to the Free\nSoftware Foundation; we sometimes make exceptions for this.  Our\ndecision will be guided by the two goals of preserving the free status\nof all derivatives of our free software and of promoting the sharing\nand reuse of software generally.\n\n\t\t\t    NO WARRANTY\n\n  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\nWARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\nEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\nOTHER PARTIES PROVIDE THE LIBRARY \"AS IS\" WITHOUT WARRANTY OF ANY\nKIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\nLIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\nWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\nAND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\nFOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\nCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\nLIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\nRENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\nFAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\nSUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGES.\n\n\t\t     END OF TERMS AND CONDITIONS\n\f\n           How to Apply These Terms to Your New Libraries\n\n  If you develop a new library, and you want it to be of the greatest\npossible use to the public, we recommend making it free software that\neveryone can redistribute and change.  You can do so by permitting\nredistribution under these terms (or, alternatively, under the terms of the\nordinary General Public License).\n\n  To apply these terms, attach the following notices to the library.  It is\nsafest to attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least the\n\"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the library's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\nAlso add information on how to contact you by electronic and paper mail.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the library, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the\n  library `Frob' (a library for tweaking knobs) written by James Random Hacker.\n\n  <signature of Ty Coon>, 1 April 1990\n  Ty Coon, President of Vice\n\nThat's all there is to it!\n\n\n"
  },
  {
    "path": "liteidex/deploy/welcome/zh_CN/changes.md",
    "content": "<!-- Changes -->\n\n## LiteIDE X Version\n  LiteIDE is a simple, open source, cross-platform Go IDE.\n\n### 2025.5.20 Ver X38.4\n* LiteIDE\n\t* support Go1.24\n* LiteFind\n\t* fix FindFilesThread stop\n\n### 2023.08.14 Ver X38.3\n* LiteIDE\n\t* support Go1.21\n* LiteEnv\n\t* support Go1.21 `go env`\n* LiteFind\n\t* support enter on directory searches\n* Terminal\n\t* fix source for not bash\n\n### 2023.02.14 Ver X38.2\n* LiteIDE\n    * fix and update gotools & gocode\n    * refactor astview outline\n    * update dlv debugger plugin\n* GolangAst\n    * new outline view by pos\n    * support typeparams\n* LiteDebug\n    * add disassemble view\n* DlvDebugger\n    * fix generics func sync\n    * fix dlv process exit on windows\n    * refactor gorountines model\n    * support disassemble model\n* LiteBuild\n    * gosrc.xml TARGETNAME use BUILD_DIR_PATH\n* GolangEdit\n    * support any and comparable\n* GolangCode\n    * support any and comparable\n* gotools\n    * types fix find obj field \n    * types fix object string\n    * gotest fix run test file use -run mode\n    * astview add new -outline for outline\n    * astview add new -tp for typeparams\n    * astview fix interface embedded type \n* gocode\n    * fix identifier comparable \n    * update lookup object\n\n### 2023.01.22 Ver X38.1\n* LiteIDE\n    * gotools & gocode support Go1.18 generics\n    * support build for windows vs2019\n    * support build for freebsd/openbsd\n    * fix memory leak\n* GolangCode\n    * support Go1.18 generics\n    * remove options and default set\n    * uncheck GOPATH for set-lib\n* LiteEnv\n    * fix memory leak\n    * filter go env\n* LiteBuild\n    * fix memory leak\n    * fix buildconfigdialog twice accept\n* LiteEditor\n    * fix selection navigation saved\n    * check backspace empty completion unpopup\n* GolangEdit\n    * update actions for GO111MODULE\n* GolangPlay\n    * load depends\n* Bookmarks\n    * fix memory leak\n* Terminal\n    * libterm fix build for vs2019\n    * add option for set font\n    * ptyqt use conptyprocess for vs2019\n    * ptyqt fix unixptyprocess for freebsd/openbsd\n* gotools\n    * types support generics method lookup\n* gocode\n    * support generics type autocomplete\n    * support incomplete dep autocomplete\n\n### 2022.05.22 Ver X38.0\n* LiteIDE\n    * support Go1.18 go.work\n    * support Go1.18 format/types/gocode\n* LiteApp & LiteEditor\n    * add 'Detroit Future' theme (thanks donuts-are-good)\n* LiteEditor\n    * add go.work syntax\n    * add color/dart-blue.xml (thanks qAison)\n* LiteBuild\n    * only check first run action and output\n    * update GoPlus config\n* LiteEnv\n    * windows env use %PROGRAMFILES%\\Go\n* Terminal\n    * fix copy text containing tab in terminal\n    * add context menu copy/paste/selectall\n* gotools\n    * support Go1.18 format\n    * support Go1.18 types\n    * support go.work\n* gocode\n    * support Go1.18 code completer\n    * support go.work\n    * update unsafe pkg\n    * fix gomod imports completer\n\n### 2021.03.02 Ver X37.4\n* LiteIDE\n    * move to trash use api on macos\n    * fix find&replace repaint\n    * update terminal action\n    * add copy fullpath action\n* LiteApp\n    * editor context menu add integrated terminal action\n    * folder view update integrated terminal action\n    * folder view add copy full path action\n    * move to trash use api on macos\n* LiteFind\n    * fix find&replace editor repaint\n    * fix file search replace repaint\n    * windows fileserach shortcuts add ctrl+atl+f\n* LiteEditor:\n    * gomod.xml add retract\n* Terminal:\n    * move to core plugin\n* DlvDebugger:\n    * add pass flags options\n\n### 2020.10.10 Ver X37.3\n* LiteIDE\n    * fix dlv debug exit crash on window\n    * support mingw-64 build for window\n* LiteApp\n    * update icon for hight-dpi\n* LiteBuild:\n    * gosrc.xml add tool cover html command\n    * gosrc.xml add make command\n* LiteEditor:\n    * add dark-gray.xml color scheme, thanks for qAison\n    * fix showlink tooltip bug for Qt5.12\n* GolangEdit:\n    * add find usages skip tests action\n* Terminal:\n    * fix winpty load for Q_OS_WIN64\n    * add closeall action\n* DlvDebugger\n    * fix exit crash on window\n    * fix handle response regexp\n* gotools & gocode\n    * update fastmod for go1.14 GOMOD\n* gotools\n    * types add skip tests flag\n\n### 2020.04.24 Ver X37.1\n* LiteIDE\n    * add new integrated terminal plugin\n    * change LiteApi, IToolWindowManager and IFileManager api\n* Terminal:\n    * new terminal plugin\n    * export open in integrated terminal action\n    * support open multiple shells (/etc/shells) on unix\n    * support open cmd/powershell/git bash on window\n    * support dark mode\n    * support login mode --login (unix)\n    * load enviroment from LiteIDE action (unix)\n    * tab style multiple terminal\n    * auto save / restore terminal info\n    * ctrl+c key interrupt support\n    * mouse to select, enter key copy to clipboard (ctrl+c/command+c) \n    * ctrl+v / command+v to paste from clipboard\n* LiteApp\n    * folder add open integrated terminal action\n    * update hide tool window action icon.\n    * folder view enable create folder in files\n    * fix SideWindowStyle::moveToolWindow crash\n    * fix #1106, options widget add ScrollArea, enable resize, init check screen size\n* LiteEditor\n    * change copy/paste/cut/selectall/undo/redo unregister shortcut for macos\n* FileBorwser:\n    * add open integrated terminal action\n    * enable create folder in files\n    * simple, remove litefind/terminal depends\n* LiteFind\n    * SearchResultWidget add expandAll and collapseAll button\n* GolangEdit\n    * fix fold by GO_ELSE\n* gotools & gocode\n    * fix & update for Go 1.14\n\n### 2020.01.15 Ver X36.3\n* LiteIDE\n    * fix and update gotools&gocode for support Go Module. \n    * refactor option, update all plugin option page\n* LiteApp\n    * refactor option page, load/save and keep option page.\n* LiteEditor\n    * fix code complete escape for Qt5.12\n* Markdown\n    * add CommonMark/cmark for markdown to html, replace sundown\n* GolangPackage\n    * add GOPRIVATE,GONOPROXY,GONOSUMDB option\n    * add goproxy.cn for GOPROXY list\n    * merge GOPATH/GoModule setup to global options.\n* LiteBuild\n    * add `go mod vendor` action\n* DlvDebugger\n    * update stack frame to RPC api\n* gotools & gocode\n    * fix fastmod match full version, example `github.com/mypkg/v2`\n    * types check add basic type\n\n### 2019.10.30 Ver X36.2\n* LiteIDE\n    * add new image viewer plugin\n    * folder view support multi copy & paste\n    * folder view support move to trash\n    * fix gocode crash\n    * update uk (Ukrainian) translation, thanks for cl0ne\n* LiteApp\n    * fix floating dock widet style\n    * add dock widget floating toolbar\n    * folder view support multi copy and paste\n    * folder view support move to trash action\n* ImageEditor\n    * add new image viewer plugin\n    * support image viewer and gif video play\n* GolangEdit\n    * support go1.13 number literal syntax highlight\n* gotools & gocode\n    * fix bad parser crash\n\n### 2019.08.28 Ver X36.1\n* LiteIDE\n    * folder view support copy and paste\n    * fix find usages and declinfo for _ start symbol\n    \n* LiteApp\n    * multi folder view support copy and parse\n    * tool window support floating window action\n* LiteEditor\n    * cached text layout, optimization long line paint\n    * check and disable document too long line ( > 4096) syntax.\n* GolangEdit\n    * fix findusage and declinfo for _ start symbol\n* GolangPackage\n    * add custom GOPROXY setup\n    * update GO111MODULE env reload check\n* GolangDoc\n    * remove godoc command, use gotools godoc\n* FileBorwser\n    * folder view support copy and paste\n* Others\n    * linux env add x-terminal-emulator\n    * update Russian translation, thanks Sergey Belyashov\n* gotools & gocode\n    * fix mod priority vendor check\n* gotools\n    * godoc add go doc -all flags\n\n### 2019.03.15 Ver X36\n* LiteIDE\n    * add new editor path navigation toolbar\n* QuickOpen\n    * quickopenfile filter text length less than 3 use editor files, otherwise search in folder files.\n    * add new quickfilesystem filter\n* GolangEdit\n    * use new quickfilesystem for import jump\n* LiteEditor\n    * add new path navigation toolbar (use quickfilesystem)\n* GolangCode\n    * fix number+dot issues completer\n* FileUtil\n    * show in Finder fast on macOS\n\n\n### 2019.02.05 Ver X35.5\n* LiteIDE\n    * bug fix version\n* GolangEdit\n    * fix cursor selections usages lookup\n    * add byteOffsetToColumn to fix gotools/guru output byte offset to editor offset\n* LiteEditor\n    * add allow vertical scrolling to the last line option\n    * check file writed size != data.size and show error message\n* LiteFind\n    * update search result item text for all same linenumber\n\n### 2019.01.30 Ver X35.4\n* LiteIDE\n    * source code navigation can be used in wrong source code\n    * imports completer support gomod depends and local imports for gomod project\n    * imports completer support lookup all imports by source for GOPATH project\n* LiteApp\n    * fix vs-dark.qss menu icon bug for windows10\n* LiteEditor\n    * fuzzy golang imports completer\n    * fix complter imports offset\n    * fix enter auto insert tab or space check by previous line\n* GolangCode\n    * fix receive imports line process\n* GolangEdit\n    * support lookup types info wrong source code\n    * add jump to declaration toolbar\n    * fix jump to declaration save history\n\n* gotools & gocode\n    * source code navigation can be used in wrong source code\n    * lookup gomod depends and local imports for gomod project\n    * lookup all imports from source for GOPATH project\n\n### 2018.12.22 Ver X35.3\n* LiteIDE\n    * optimization gotools & gocode, update editor and find plugin.\n* LiteApp\n    * fix liteoutput antialias setup invalid\n* LiteEditor\n    * enable vertical scrollbar move last block to top viewport\n    * add the cut current line operator for cut action if not selected\n    * add convert tab/spaces action\n    * add tabtospace/tabwidth set by litapp/mimetype/liteeditor.xml or options\n    * update line wrap mode for mimetype\n    * update tabtospace mode for mimetype\n* LiteFind\n    * file search check and skip binary file\n    * add folders/filesystem context menu file search action\n* GolangEdit, GolangCode, LiteBuild\n    * fix process start with cmd contains space on macOS\n* GolangDoc\n    * support check go1.12 godoc remove -html, use text mode\n\n* gotools & gocode\n    * fix lookup named method embedded\n    * optimization, check save/load pkgconfig\n    * add godoc command for check go1.12 use text mode\n* gocode\n    * fixed global var completion\n\n### 2018.11.12 Ver X35.2\n* LiteIDE\n    * fixed types info jump position\n    * optimization types info lookup cache\n* LiteEditor\n    * single line comment set after white spaces and add space\n    * go.mod editor support comment action\n    * color scheme support MatchBrackets background, default gray #808080\n* Bookmarks\n    * sort bookmark model by name/line, add context menu goto/remove/removeThisFile/removeAllFiles action\n* GolangDoc\n    * fix mod package godoc import path view\n* GolangEdit\n    * fix lookup types info by gocode cache\n* gotools & gocode\n    * fixed types jump info position\n    * optimization types info lookup cache\n\n### 2018.10.24 Ver X35.1\n* LiteIDE\n    * BUG fixed, gocode code jump and import line jump\n* GolangEdit\n    * fix jump def for import line\n* gotools & gocode\n    * fix types jump\n\n### 2018.10.24 Ver X35\n* LiteIDE\n    * all support Go1.11 Go modules\n    * fast lookup types info by cache\n    * fix delve debug recurse set blocking\n* LiteApp\n    * side window style enable move tool window to any left/right/bottom side.\n    * side window style output bar shortcut change to command+meta+number (macos) or ctrl+shift+number\n* GolangEdit\n    * fast lookup types info by gocode cache\n    * find all usages support Go modules work dir\n    * refactor symbol support Go module work dir\n* GolangAst\n    * support import path gopath/vendor/modules doc view\n* LiteDebug\n    * add automatically add breakpoint main.main when debugging option (default disable)\n* DlvDebugger\n    * fix dlv list variables blocking, change LoadConfig recurse to 3\n* LiteBuild\n    * update gosrc.xml for support custom target workdir\n\n* gotools & gocode\n    * import https://github/visualfc/fastmod for fast parse go.mod depends\n    * fast parse Go modules and fix issues https://github.com/visualfc/liteide/issues/986\n* gotools\n    * find all usages support Go module work dir\n* gotools\n    * fast completer for Go module project\n    * provide types info for liteide by cache\n\n### 2018.10.05 Ver X34.3\n* LiteIDE\n    * fix support go1.11 modules\n* GolangEdit\n    * fix jump import line\n    * fix find usages for import line\n* LiteEditor\n    * fix gocode completer item kind update\n* GolangCode\n    * enviroment changed to reset gocode\n* gotools & gocode\n    * types: fix module-based project with several subpackages https://github.com/visualfc/liteide/issues/977\n    * types: fix redeclared file parser cursor first\n    * types: fix source file update check in stdin\n    * types: fix x test files check\n    * gomod: fix lookup module for go list\n* gocode\n    * fix gocode crash https://github.com/visualfc/liteide/issues/978\n\n### 2018.09.15 Ver X34.2\n* LiteIDE\n    * fix gotools & gocode support go1.11 modules sub folder\n    * support custom GO111MODULE setup\n* LiteApp\n    * fix #939 display right margin at column wrong\n    * change mime type check fullname first\n* GolangCode\n    * fix #970 goplay editor cgo crash\n* GolangEdit\n    * find usages / rename symbol add skip GOROOT actions\n* GolangPackage\n    * add custom GO111MODULE setup\n* LiteEditor\n    * add extra mouse navagite go back and forward\n    * add gomod.xml for go.mod syntax\n* LiteBuild\n    * add gomod.xml for go.mod build command\n* gotools & gocode\n    * fix go1.11 modules sub folder\n\n### 2018.08.12 Ver X34.1\n* LiteIDE\n    * update gotools support go1.11 modules\n    * update gocode support go1.11 modules and vendor\n* LiteEditor\n    * enable open binary file for editor\n    * change widget readonly by binary file (ignore text file)\n* gocode\n    * change parser by source use gotools/types\n    * fix parser vendor & modules\n\n### 2018.07.26 Ver X34\n* LiteIDE\n    * update gotools support go1.11 modules\n    * update gocode for https://github.com/visualfc/gocode support go1.11 modules\n* LiteApp\n    * refactor folder model code, remove depends\n    * fix dock widget for Qt5.9.6 bug\n    * move view godoc from folderview to litebuild\n* LiteBuild\n    * update BUILDARGS, remove -i for go1.11 build\n* GolangCode\n    * change to github.com/visualfc/gocode for support go1.11 modules\n* GolangDoc\n    * pdoc support real ImportPath display for Go modules or vendor\n    * fix docs.html $.GoogleCN code\n* GolangEdit\n    * support go1.11 modules, view info / jump / find usages\n    * support parser import path for Go modules or vendor for godoc view\n* GolangPackage\n    * add pkg/mod tree for Go modules\n* QuickOpen\n    * fix view pos for editor manager\n    * support open file with fullpath on editor input\n* DlvDebugger\n    * fix continue\n* gotools\n    * types support go1.11 modules\n    * add pkgcheck support modules or vendor check\n* gocode\n    * clone https://github.com/nsf/gocode support go1.11 modules\n\n### 2018.07.04 Ver X33.4\n* LiteIDE\n    * update gocode for mdempsky/gocode support go1.11\n    * update DlvDebugger plugin for Delve detail information\n* LiteDebug\n    * add threads/goroutines/registers view\n    * watch view support double clicked change and update\n* DlvDebugger\n    * add dlv rcp-mode for get more info\n    * variable and watch support detail information\n    * watch support local/package variable\n    * support threads/gorountines/registers model\n* GolangCode\n    * support <https://github.com/mdempsky/gocode>\n* QuickOpen\n    * add dly filter editor for optimize many files search\n    * fix quick open symbol action\n\n### 2018.04.23 Ver X33.3\n* LiteIDE\n    * support import jump to package source file\n    * support import hints for all package on code completer\n    * add build & debug action to build menu\n    * fix build debug gcflags for go version\n* LiteApp\n    * fix tab style sheet for Qt5.9 on macOS\n    * project wizard add gocmdex/gopkgex for anywhere\n* LiteBuild\n    * build config file add debug support\n    * golang build add debug/debugtest action\n    * fix golang build debug gcflags depends for go version\n* LiteDebug\n    * filesystem add debug file action\n    * remove internal golang build function\n* LiteEditor\n    * reimplemented backspace quotes audo insert/remove action\n* GolangCode\n    * parser import package for GOPATH \n    * fix vendor import for code completer\n    * add import hints for all package option (default)\n    * add parser cgo completer list on editor\n* GolangEdit\n    * fix import line navigate show link source\n    * add import line jump to package file list\n* QuickOpen\n    * add quickopenfolder implement\n* gotools\n    * add new debugflag action for print debug gcflags for go version\n    * types find import dir check vendor\n    * types add import info and doc\n    * fix astview pkg nil check\n    \n### 2018.02.14 Ver X33.2\n* LiteIDE\n    * add folder tool window split mode swith\n    * add archlinux makepkg\n    * add tcl syntax and build\n* LiteEditor\n    * support function color, thanks [discoverfly](https://github.com/discoverfly)\n    * add default-func color theme\n    * add style for scroll bars in sublime.qss, thanks [hauke96](https://github.com/hauke96)\n    * add marks for selections and findings, thanks [jinq0123](https://github.com/jinq0123)\n* LiteFind\n    * fix editor regexp replace\n* LiteBuild\n    * add context menu go tool action\n\n### 2017.12.12 Ver X33.1\n* LiteIDE\n    * support quick open command\n    * support gomodifytags\n    * fix libpng warning on qt5 build \n* LiteApp\n    * add tools menu for quick open actions\n    * standard and rename tool window title\n    * enable edit menu anytime, fix edit menu disable on editor lost focus.\n    * fix editor load large file bad_alloc recover\n* LiteEnv\n    * add select env to tools menu    \n* LiteEditor\n    * check and not open large file\n    * fix edit hide edit sub menu 'setup' on macos\n* LiteFind\n    * fix find editor replace all wrap around* GolangEdit\n    * Integrated [gomodifytags](https://github.com/fatih/gomodifytags) and gui tools support gomodifytags all options\n* QuickOpen\n    * add quick open command action (ctrl+shift+p/command+shift+p)\n    * quickopenfiles use thread for fast and cancel\n    * fix quickopenfile cancel loading for esc or liteapp quit\n\n### 2017.11.2 Ver X33\n* LiteIDE\n    * optimization editor plugin, load file check codec, reload file by diff\n    * add astview TodoList\n    * add new bookmarks plugin\n    * fix liteapp clean plugin order\n* LiteApp\n    * filemanager auto reload file default YesToAll\n    * fix liteapp clean plugins reverse order\n    * fix #832, sidebar change action by combox\n    * fix folder sync editor same prefix error \n* LiteEditor\n    * reload file use diff to keep state and mark\n    * load file check is binary and report\n    * load file check codec use libucd if utf8 decode failed.\n    * load file check decode error and report \n    * load file is readonly set editor widget readonly\n    * load and save file support utf8 bom\n    * add codec and lineend info on statusbar\n    * add copied text into the clipboard as HTML option\n    * add Solarized Dark color theme, thanks xgdgsc\n    * reimplemented editor mark api\n    * fix copy to clipboard tab escape\n* GolangAst\n    * add TodoList for classview and outline\n    * fix #848, astwidget double clicked index check.\n* GolangCode\n    * update pkglist to go1.9\n* GolangEdit\n    * add stop source query action\n    * add source query action implement_GOPATH for GOPATH scope\n    * fix golang lexer parser folding end\n    * fix GolangHighlighter fold indent error set\n    * fix findUsage wordUnderCursor offset\n    * fix find usages findStart signal late\n* GolangFmt\n    * load diff check modify current block text\n* GolangCode\n    * fix update gopath process stop and wait\n* LiteDebug\n    * fix cmd to native separator\n    * build target add -a build flag\n    * change debug targget name to target.debug (custom by LiteBuild)\n* LiteBuild\n    * add custom debug name in build config\n* LiteFind\n    * fix memory leak by GolangEdit GolangFileSearch\n    * fix findInFiles berore saveAllEditor\n    * fix FindEditor replace all\n* Bookmarks\n    * new plugin for show open editors bookmarks and jump\n* gotools\n    * update stdlib for go1.9.1\n    * astview add TodoList support\n    \n### 2017.7.18 Ver X32.2\n* LiteApp\n    * fix editor file watcher is invalid for many change\n* GolangEdit\n    * fix TODO/BUG/FIXME comment syntax    \n* DlvDebugger\n    * fix dlv headless process workdir\n* LiteDebug\n    * fix debug tests action\n    * fix load and save breakpoint for editor\n\n### 2017.7.7 Ver X32.1\n* LiteIDE\n    * build config custom gopath support inherit parent path's  gopath setup\n* GolangCode\n    * update gocode lib-path by build config custom gopath\n* LiteEnv\n    * optimization check go enviroment\n* LiteBuild\n    * build config custom gopath inherit parent path\n    * fix BuildAndRun kill old on window\n    * fix build config custom gopath action\n* GolangPackage\n    * fix load package treeview error\n* DlvDebugger\n    * dlv use headless mode\n    * fix dlv kill process\n\n### 2017.6.12 Ver X32\n* LiteIDE\n    * support folder build config custom GOPATH\n    * support folder build config BUILDFLAGS -tags setup\n    * support folder build config TARGETBASENAME setup\n    * support session switching for folder/editor\n    * support load custom icon library from liteapp/qrc folder (default and folder)\n    * reimplemented multifolder model, it took me a long time :)\n    * add macOS session menu for native dock menu\n    * recent menu sync for multi windows\n    * gotools support +build source navigate (single file or -tags setup)\n* LiteApp\n    * add the session switching function\n    * add autosavedocument emit message option\n    * add max editor tab count option\n    * add option action to standard toolbar\n    * add tool window use shortcuts option for unstandard keyboard option\n    * add exit liteide ctrl+q on windows\n    * add themes (carbon.qss gray.qss sublime.qss) for liteide & beautify old themes, thanks for hope hook\n    * editor tab context add open terminal here action\n    * folders context menu add open in new windows action (new folder session)\n    * folder view add show showdetails action\n    * fix folder sync editor incorrect on macOS\n    * fix webview and debug console qss\n    * fix folders tool window enter key to jump\n    * fix exit error save session by ctrl+q on macos\n    * fix newfile dialog space name\n    * update folder tool window showInExporer showInShell action text\n* LiteFind\n    * find files add auto swith current folder checkbox\n    * find in editor add show replace mode checkbox\n    * filesearch enable replace whitespace or empty\n    * editor replace all in one edit block for ctrl+z once undo\n* LiteBuild\n    * add custom GOPATH in build config for build/debug/GolangEdit\n    * add custom share-value BUILDFLAGS in build config for build/debug/GolangEdit\n    * add custom TARGETBASENAME in build config for build/debug\n    * support BUILDFLAGS -tags for build/debug/GolangEdit\n    * update gosrc.xml to export custom value and share-value\n    * folders tool window context menu add Go build configuration action\n    * folders tool window context go tool use Go build configuration setup\n    * fix stop action for kill process\n* LiteDebug\n    * console use editor color scheme\n    * support LiteBuild folder build config BUILDFLAGS/BUILDARGS -tags flag setup\n* DlvDebugger\n    * fix process identify for auto exit\n* LiteEnv\n    * default env /usr/local/go on macosx\n    * update macosx cross env GOROOT for system\n* LiteEditor    \n    * context menu add convert case menu\n    * go.snippet add iferr\n    * update sublime.xml / sublime-bold.xml, thanks for hopehook <hopehook@qq.com>\n    * alt+backspace delete serial whitespaces\n    * option font QComboBox to QFontComboBox, add restore DefaultFont action\n    * option add show monospace font check\n    * option file types sort mimetype, show custom extsition first\n* GolangPackage\n    * gopath setup add use sysgopath/litegopath check\n* GolangPlay\n    * fix goplay use goenvironment\n* GolangDoc\n    * change golang api index search for go/api folder\n* GolangEdit\n    * add go root source readonly setup option\n    * support folder go build config BUILDFLAGS/BUILDARGS -tags flag setup\n    * fix interface type by gotools\n    * fix find process stop and run\n    * fix lookup guru for source query\n* GolangAst\n    * fix astview enter key to jump\n* FileBorwser\n    * fix file system enter key to jump\n* gotools\n    * fix types interface method\n    * types support +build for single source\n    * types support -tags flag\n* tools\n    * add new exportqrc tool for export liteide all build-in images\n\n### 2017.3.9 Ver X31.1\n* LiteApp\n    * restore folder first on MacOS\n* GolangEdit\n    * update pkglist\n\n### 2017.3.2 Ver X31\n* LiteIDE\n    * add command line `liteide [files|folder] [--select-env id] [--local-setting] [--user-setting] [--reset-setting]`        \n* LiteApp\n    * add application idle timer automatic save documents option\n    * folders are not sorted to resolve sync editing errors on MacOS\n    * update new file wizard\n* GolangPackage\n    * update GOPATH setup\n* GolangCode\n    * update env load    \n* GolangAst\n    * classview and outline add sync editor action\n* DlvDebugger\n    * fix dlv execution on MacOS\n* FakeVim\n    * option add load default command list action\n* LiteEditor\n    * fix editor restore vertical scrollbar postion\n    * fix codecompleter prefix min setup\n    * restore the editor toolbar\n    * option add mimetype custom extsition setup\n* LiteBuild\n    * build config xml file enable custom $() on cmd and args\n\n### 2016.12.6 Ver X30.3\n* LiteEnv\n    * remove GO15VENDOREXPERIMENT env\n* LiteEditor\n    * add fuzzy completion option, default setup\n    * add clear completion cache when save files option\n    * support drop file to open editor\n    * add case convert actions\n* GolangEdit\n    * add guru support (backup oracle)\n* GolangFmt\n    * fmt try to keep the original location\n* DlvDebugger\n    * use native stepout\n    * filter term color\n* LiteBuild\n    * filter term color\n    * FileTest support TESTARGS\n* gotools\n    * always use vendor\n    * gotest support [build|test args]\n    * update vendor for oracle\n\n### 2016.7.12 Ver X30.2\n* LiteApp\n    * add new vs-dark css, thanks [tupunco](https://github.com/tupunco)\n    * fix and re-implement editor list menu\n* QuickOpen\n    * QuickOpenFile skip same folder and same files\n    * QuickOpneFile add current editor local files\n\n### 2016.7.5 Ver X30.1\n* LiteIDE\n    * add OpenEditor tool windows\n    * add GolangSymbol for QuickOpen (CTRL+SHIFT+O)\n    * fix gotools vendor error\n* LiteApp\n    * add OpenEditor tool windows\n    * update view menu\n* GolangAst\n    * add GolangSymbol for QuickOpen\n    * add GolangSymbol option\n    * fix goto symbol\n* QuickOpen\n    * optimization QuickOpenFile and QuickOpenEditor search\n    * add QuickOpen option\n* gotools\n    * fix vendor error\n\n### 2016.7.2 Ver X30\n* LiteIDE\n    * add new QuickOpen plugin\n    * add new FakeVim plugin, thanks for [jsuppe](https://github.com/jsuppe)\n    * add custom env LITEIDE_TOOL_PATH/LITEIDE_PLUGIN_PATH/LITEIDE_RES_PATH\n* LiteApp\n    * action tooltip shortcut show native text\n    * option keyboard map show native text\n* QuickOpen\n    * quick open files action CTRL+P\n    * quick open editor action ATL+ALT+P\n    * quick go to line action CTRL+L\n    * quick open help\n* FakeVim\n    * editor add vim style mode editing\n* LiteEditor\n    * add goto line start/end action\n    * add goto doc start/end action\n    * add goto previous/next line action\n    * add goto previous/next charater action\n    * add goto previous/next word action\n    * change '' braces only go source\n    * fix codecompleter number first\n    * MacOS fix move line up/down shortcut command+shift+up/down\n* GolangEdit\n    * CTRL+mouse navigate preview source info\n* LiteFind\n    * MacOS fix edit replace shortcut command+shift+F\n* Welcome\n    * fix doc css style\n* gotools\n    * types fix limit parser\n    * types simple field info\n\n### 2016.4.15 Ver X29\n* LiteIDE\n    * support for multiple debuggers\n    * support Delve debugger\n    * env GO15VENDOREXPERIMENT=1 default setup\n* LiteBuild\n    * fix project folder id named go, error find go tool\n    * fix project folder contains spaces run failed\n    * fix output number of rows exceeds the maximum input fails\n    * add output add automatic positioning cursor option\n    * add single go file test action\n    * add folder context menu more go tool action\n* LiteEnv\n    * env GO15VENDOREXPERIMENT=1 default setup\n* LiteDebug\n    * support for multiple debuggers\n    * debug berore auto go build -gcflags \"-N -l\"\n    * fix stack frame clicked to doubleClocked\n* DlvDebugger\n    * support dlv debugger\n    * simulation execution 'step-out'\n* GdbDebugger\n    * fix show frame line locate\n    * fix goto line action\n* LiteEditor\n    * display limit tip line info\n* GolangEdit\n    * fix folder contains spaces, gotools fails\n* gotools\n    * add gotest action, test single go file\n    * fix types info, display pkg real name\n\n### 2015.12.10 Ver X28\n* LiteIDE\n    * gotools add go1.5 vendor support if env GO15VENDOREXPERIMENT=1 set\n* LiteApp\n    * folder add sync edit action\n    * fix close folder bug\n* LiteBuild\n    * add folder context lock build path\n    * add folder context gofmt\n    * add output menu auto clear and line wrap action\n* LiteOutput\n    * add set max line option\n* GolangFmt\n    * add new gotools gofmt action\n    * add sortimports option (default)\n* LiteEnv\n    * add var GO15VENDOREXPERIMENT=1 (default comment)\n* GolangAst\n    * support go1.5 vendor\n* LiteEditor\n    * fix selection identifier regexp\n* GolangEdit\n    * support go1.5 vendor\n    * enable oracle enable referres action\n* GolangCode\n    * use set lib-path action\n\n* gotools\n    * types add go1.5 support if GO15VGOROOTXPERIMENT=1 set\n    * types fix cycle import check\n    * types fix pkg find bug\n    * types add unsafe builtin info\n    * astview add go1.5 support if GO15VGOROOTXPERIMENT=1 set\n    * stdlib update to go1.5\n    * add new gofmt action\n    * gofmt import godiff replace diff cmd\n\n### 2015.4.22 Ver X27.2.1\n* LiteIDE\n    * fix editor change crash\n\n### 2015.4.20 Ver X27.2\n* LiteIDE\n    * add output option\n    * add windows native open explorer\n    * add Ukrainian translation thanks Roman Shmelev <rshmelev@gmail.com>\n* LiteEditor\n    * add block selection mode (use Alt key)\n    * fix text mimetype print char check.\n    * fix code completer ...type\n    * fix insert key\n* LiteEnv\n    * optimization go env reload\n* LiteBuild\n    * fix build config\n* LiteFind\n    * fix editor match case replace\n    * fix file search matchWord\n* GolangEdit\n    * fix init option\n    * fix embeded struct find\n    * add oracle support\n* gotools\n    * fix embeded struct type find\n    * add oracle\n\n### 2015.2.16 Ver X27.1\n* LiteIDE\n    * fix code navigate history ( build / astview / debug / link)\n    * fix UNC path crash check\n* LiteEditor\n    * add copy/cut/move/join line action\n    * fix selection color\n    * fix link color\n* GolangEdit\n    * add global find usages and refactor(GOPATH)\n    * add refactor revert mode\n    * add golang symbol document on tooltip\n    * fix no jump code tooltip\n    * fix syntax for Non-English symbol name\n* LiteFind\n    * add find swith replace mode\n    * add replace revert mode\n* LiteBuild\n    * fix build lock custom config\n* GolangAst\n    * fix Non-English symbol name\n* gotools:\n    * type - simple object info\n    * type - add global usages\n    * type - add symbol doc search\n    * type - add XTest files support\n    * type - fix field pos search\n    * astview - update type var and factor to global\n\n### 2015.2.4 Ver X27\n* LiteIDE\n    * create independent project gotools and replace liteide_stub\n    * move build toolbar to the main window\n    * move editor tab to editor widget\n    * fix multi window keyshort invalid\n    * fix treeview scroll bar\n    * fix sidebar keyshort\n* GolangEdit\n    * add editor mouse under symbol tooltip\n    * add ctrl + left mouse button to link navigate\n    * fix embeded func navigate\n    * fix golang syntax parser\n* LiteBuild\n    * add build lock action\n    * update build config file\n    * fix output enter offset\n* LiteFind\n    * update find text by under cursor\n* LiteEditor\n    * add whitespace visible setup option\n    * add line end setup option\n    * fix google pinying editor cursor hide bug\n    * fix editor navigate action\n* JsonEdit\n    * re-implement json format\n* RustEdit\n    * add simple rust support\n\n### 2014.12.25 Ver X26\n* LiteIDE\n    * add lang package support\n    * fix shortcut key call mechanism\n    * fix editor shortcut key monopolize\n* LiteEnv\n    * fix system enviroment auto reset by go env\n* LiteEditor\n    * add simple snippet code\n    * fix enter {} key indent\n    * fix []{} insert and backspace\n    * fix code completer func () insert\n* GolangCode\n    * fix system enviroment work\n    * add auto update package when its source change option\n* GdbDebugger\n    * fix system enviroment gdb/gdb64 auto select\n* GolangEdit\n    * add golang tag highlighter\n\n### 2014.12.16 Ver X25.2\n* LiteIDE\n    * default enviroment id system work\n* LiteApp\n    * fix sort folder on macosx\n* LiteEnv\n    * add reload current enviroment action\n    * set default enviroment id system\n* LiteEditor\n    * fix enter key indent\n    * fix import line regexp\n    * fix complete word suspended  bug (in non go file)\n    * re-implement full text completer\n* GolangDoc\n    * fix lookup godoc on system env\n    * fix path name to pkg name\n* GolangCode\n    * completer import line on GOPATH\n* GolangEdit\n    * add update dependencies library action\n    * add view import package in godoc action\n\n### 2014.12.12 Ver X25.1\n* LiteIDE\n    * both support go1.3 and go1.4\n* LiteApp\n    * fix folders sort by folder first in macosx\n* GolangCode\n    * enable completer import line (standard package)\n* GolangFmt\n    * fix goimports error report bug\n* GolangEdit\n    * fix import line find usages\n* GolangDoc\n    * support go1.4\n* LiteFind\n    * fix search result style sheet\n* FileBorwser\n    * fix sort by folder first in macosx\n\n\n### 2014.12.4 Ver X25\n* LiteApp\n    * default use new style SideBarStyle\n    * add style option SideBarStyle and SplitterStyle\n    * folders use new multi folder class implement\n* LiteEnv\n    * system env lookup go env\n    * add LITEIDE_SHELL support for multiple terminals\n* GolangEdit\n    * find usages both support go1.3 and go1.4\n    * dump find usages error\n    * update goimports standard pkg index\n    * fix find usages Non-English offset\n    * fix faketip on ubuntu\n* FileBorwser\n    * use new folder class implement\n* LiteEditor\n    * fix clipboard    blocking on linux\n    * fix editor brace insert postion\n* GolangFmt\n    * default save use gofmt style\n    * add menu action Code Format(gofmt) (Ctrl+I)\n    * and menu action Code Format(goimports) (Ctrl+Alt+I)\n\n### 2014.11.13 Ver X24.3\n* liteide_stub\n    * merge and optimization code.google.com/p/goimports\n    * fix astview for decl funcs\n    * fix import line find uses\n* LiteApp\n    * update german translation, thanks Harald Leinders\n    * fix PATHEXT no default on windows\n    * fix treeview remove crash bug\n    * fix open terminal\n* GolangEdit\n    * fix import find usages\n    * fix golang func decl syntax highlighter\n* GolangAst\n    * fix astview view missing funcs\n* GolangCode\n    * fix goimports incorrectly removing certain no incorrectly removing no convention import paths\n\n### 2014.11.04 Ver X24.2\n* GolangCode\n    * fix import style\n\n### 2014.11.03 Ver X24.1\n* LiteEditor\n    * fix codecompleter crash\n* GolangCode\n    * prompt pkg not find , enter key to auto import\n    * fix struct offset for gocode\n* GolangFmt\n    * merge goimports to liteide_stub\n    * default use goimports\n\n### 2014.10.24 Ver X24\n* LiteApp\n    * new codecompleter components\n    * log and build output no wrap\n    * update Japanese translation\n    * update German translation\n\n* LiteEditor\n    * new codecompleter components\n    * code completer match by strings.hp  => HasPrefix\n    * code completer sort by prefix\n    * code completer list use tooltip\n    * code completer list updown use ctrl+n/ctrl+p short key\n    * smart () [] \"\" '' `` insert and backspace remove\n    * smart right ) ] \" ' ` insert skip\n    * fix code completer up/down key\n    * fix ctrl+enter/ctrl+shift+enter to insert line after/berore\n    * fix selection highlight\n\n* LiteBuild\n    * golang config custom add TESTARGS/BENCHMARKARGS\n    * output font family use editor family\n\n### 2014.08.05 Ver X23.2\n* gocode add cgo basic completer\n* update option to dialog mode\n* fix godoc target for go1.3\n* fix golang highlighter, return to kate\n* fix short key for macosx\n* fixed Qt5 build crash when exit on macosx\n\n### 2014.07.24 Ver X23\n* LiteIDE\n    * add golang simple lexer for editor\n    * add golang code complete tooltip\n    * golang code complete disable on comment or strings\n    * fix escape return editor\n* LiteEditor\n    * add IHighlighterManager interface\n    * add ITextLexer interface\n    * add new color scheme carbon from William Kennedy <bill@ardanstudios.com>\n    * fix kate code fold\n    * fix code completer offset\n* GolangEdit\n    * add golang simple lexer\n    * add golang highlighter parser\n    * add tooltip for complete\n* GolangPresent\n    * view by QtWebKit\n* WebKitHtmlWidget\n    * change to browser view mode\n\n### 2014.04.14 Ver X22\n* LiteIDE\n    * add golang find usage support\n    * add golang code refactor support\n    * fast jump to declaration\n    * add reload folder/files option on startup.\n* LiteIDE\n    * fix code fold bug\n* LiteDebug\n    * add call frame goto line\n* LiteEnv\n    * add freebsd env\n* LiteFind\n    * new find result view from QtCteator\n* GolangEdit\n    * new golang editor support plugin\n    * find usages\n    * rename symbol under cursor\n* MarkdownEdit\n    * add Github_Word.css, thanks github.com/lixiaolong\n\n### 2014.03.20 Ver X21.1\n* LiteIDE\n    * reduce application memory usage\n    * add new golang doc search (modification from rspace doc tool)<http://code.google.com/p/rspace.cmd/doc>\n    * update golang api index\n    * folder add go build context menu\n    * short folder name\n    * optimization litide_stub api tool\n    * add kate solarsooty.xml thanks for Unknown <https://github.com/Unknwon>\n    * add code complete short key (ctrl+space)\n    * fix gocode automatically plugin\n    * fix golang present verify plugin\n\n### 2014.03.06 Ver X21\n* LiteIDE\n    * fast highlighter for MacOS X 10.9\n    * fast expression lookup F1/F2\n    * cancel x20 always open in new window mode.\n    * add new JsonEdit plugin.\n    * add reload/close dialog YesToAll, if modified on the drive.\n    * add auto reload files option, if modified on the drive.\n    * add store setting to local ini file option.\n    * fix folder expand state\n    * fix for case sensitive path comparison on windows\n    * fix memory leak\n* LiteBuild\n    * add golint support\n* LiteEnv\n    * recreate system.env\n* LiteEditor\n    * new color scheme gist-github (thanks William Kennedy <bill@ardanstudios.com>)\n    * fix if/else syntax fold\n* GolangAst\n    * add type factor to funcs folder\n    * add type const\n    * add import symbol, and view document menu\n    * add context menu\n    * add symbol extra info\n* GolangFmt\n    * fix timeout\n    * fix GOPATH\n* GolangDoc\n    * fast expression lookup F1/F2\n\n### 2013.12.09 Ver X20\n* LiteIDE\n    * add folders manager\n    * always open folder with new window (option)\n    * editor add navigate area for code format or build error\n    * add new GolangPresent plugin\n    * tool windows use instantpopup\n    * update editor tab context menu\n    * add evilworks.qss style (by Vedran Vuk <vedranvuk82@gmail.com>)\n* LiteEditor\n    * add error navigate area\n    * update kate highlighter\n    * add gopresent.xml syntax\n    * add Visual Studio Theme (by William Kennedy <bill@ardanstudios.com>)\n    * fix goto match braces\n    * update editor menu\n* LiteEnv:\n    * auto set $PATH for GOROOT/bin and GOBIN and GOPATH/bin and GOPATH/bin/GOOS_GOARCH\n    * fix to use utf8 encoding\n* GolangCode:\n    * auto update depends package (option)\n    * fix close gocode on last window close\n* GolangFmt:\n    * use sync code format (option)\n    * use goimports instead gofmt (option)\n    * code format error show in editor navigate area\n* LiteDebug:\n    * external cmd setting\n    * fix command input foucus\n* Markdown:\n    * add new Github_Style.css (by Slene <vslene@gmail.com>)\n* FileBrowser:\n    * option show hidden files\n* LiteBuild:\n    * fix build menu enable\n    * build error show in editor navigate area\n    * add gopm(Go Package Manager) tool <https://github.com/gpmgo/gopm>\n* GolangPresent:\n    * support golang present editor\n    * verify present error show in editor navigate area\n    * export golang present to html\n* Welcome:\n    * update document\n    * add zh_CN document\n\n### 2013.7.17 Ver X19\n* LiteIDE\n    * MacOS X 10.8 Retina support\n    * add simple webkit browser\n    * update macosx tool window short key to Ctrl+Alt+1~9\n* LiteDebug\n    * add debug go test support, thanks for GoEddie <https://github.com/GoEddie>\n* GdbDebugger\n    * gdb debugger --tty mode support (windows default)\n    * debugger command input foucus\n* LiteEditor\n    * add wheel zooming option\n    * fix editor extra width\n    * fix init editor update\n* LiteFind\n    * fix find hide\n* Markdown\n    * markdown preview fast sync\n\n### 2013.5.21 Ver X18.2\n* fast for gocode\n* add option to close gocode on exit\n* auto append GOPATH/bin to liteide env PATH\n* editor extern highlighting \"TODO\"\n* go code auto-complete ignores strings and comments\n\n### 2013.5.10\n* compiled compatibility for qt5.02\n\n### 2013.5.8 Ver X18.1\n* optimization gocode plugin\n* execute preload litebuild/command/*.api\n* execute enable tab key to compiler\n\n### 2013.5.7 Ver X18\n* English spelling and grammar corrections throughout, thanks for Nik-U <https://github.com/Nik-U>\n* LiteIDE:\n    * Improved event log\n* litefind:\n    * Find/Replace commands highlight existing text\n    * enable find file\n    * add close button\n* liteeditor:\n    * Word wrap support\n    * Added option to trim whitespace on save\n    * Added option to hide edit toolbar\n    * update kate and color scheme\n    * fix kate/highlight tab\n    * fix editor indent guide by tabsize\n* liteapp:\n    * fix full screen bug\n* litebuild:\n    * execute use combbox\n    * add close button\n* litedebug:\n    * add close button\n* markdown:\n    * enable markdown(sundown) extend\n\n### 2013.2.8 Ver X17\n* LiteIDE:\n    * move execute from filesystem to bottom tool\n    * escape for any bottom tool window (find , execute ...)\n    * macosx lion full screen\n    * add color theme highcontrastdark.xml and app theme black.qss, thanks for addxtoy <pollux@lavabit.com>\n    * add tr liteide_de.ts , thanks for Helge Plaschke <https://github.com/HelgePlaschke>\n    * fix keybord scheme\n* liteeditor:\n    * show tab ident guide\n    * show find scope expression\n    * show selection scope expression\n    * show file eof - option\n    * show line wrap (markdown editor)\n    * update current line color\n    * any time focus if need\n    * fix zoom tab width\n    * fix open file cursor position start\n    * fix set color theme not request restart\n* markdown:\n    * fix export path\n* filesystem:\n    * fix double clicked item and execute\n* litedebug:\n    * save/restore start editor\n    * fix breakpoint move in editor\n    * fix debug target args\n* litefind:\n    * new find and replace\n    * fix find editor and unfold\n    * fix backword find\n* litebuild:\n    * add test bench\n* document:\n    * enable zoom font size Ctrl++/Ctrl+-/Ctrl+0\n    * fix find crash\n* gopath setup:\n    * fix invalid path\n\n\n### 2013.1.16 Ver X16\n* support keybord mapping scheme\n* fix: lookup go command in $PATH\n* fix: remove GOBIN enviroment set\n* fix: empty editor cursor position\n* fix: double click error output to jump source and editor set focus\n\n### 2013.1.10 Ver X15.2\n* LiteIDE:\n    * use new logo and icon\n    * support go version hg-tip\n* LiteApp:\n    * update logo\n    * update splash\n    * add action close same/other folder files\n    * fix full screen restore\n* LiteEnv:\n    * add user env files\n* LiteEditor:\n    * fix `Insert` key\n    * update sublime color scheme\n* GolangDoc:\n    * support go tip version\n    * show error output\n* GolangCode:\n    * fix code completer icon visible\n* Golang Fmt:\n    * fix timeout option invalid\n* Markdown:\n    * fix critical messsage\n    * add css Documents.css\n\n### 2012.12.28 Ver X15.1\n* LiteIDE:\n    * update logo\n* LiteApp:\n    * plugins custom load\n    * custom style use css(Qt Style Sheets)\n    * add style coffee\n    * fix template `doc.go`\n    * tabs middle button close editor\n    * fix memory leak\n* LiteEditor:\n    * font zoom support\n    * add sublime color scheme, thanks for `Henson Lu`\n    * custom tab width and tab to spaces for mimetype\n* LiteEnv:\n    * add cross-compiler\n* GolangDoc:\n    * fix goto source\n\n### 2012.12.18 Ver X15\n* LiteIDE:\n    * add markdown plugin\n    * changed LiteApp to dynamic library\n    * redesign editor menu and toolbar\n    * update doc to markdown format\n    * add html render twin-engine\n        * internal QHtmlBrowser\n        * plugin QtWebKit, if find qt webkit dynamic library\n* LiteApp:\n    * changed to dynamic library\n    * support full screen mode\n    * editor tabs change to toolbar\n    * add toolbar icon size option\n    * add splash visible option\n    * add editor tab bar close button visible option\n    * add tab context menu close left or right tabs\n* LiteEditor:\n    * add overwrite mode (key Insert)\n    * add  custom tab width option\n    * redesign editor menu , context menu and toolbar\n    * add right margin line visible option\n* GolangFmt:\n    * fix comment offset, remove spaces\n* LiteBuild:\n    * id BuildAndRun before kill old process\n    * redesign build toolbar and menu\n    * support GOBIN\n* LiteDebug:\n    * add debug before rebuild option\n    * add debug external application action\n* Markdown:\n    * markdown editor support\n        * action h1-h6, bold, italic, code, list, quote, hr, link, image\n        * syntax highlighting\n        * live preview\n        * sync scroll\n        * export html\n        * export pdf\n        * custom css , css files from [Mou](http://mouapp.com)\n    * markdown batch\n        * separate to html\n        * separate to pdf\n        * merge to html\n        * merge to pdf\n* GolangDoc:\n    * fix url parser\n\n\n### 2012.11.15 Ver X14.1\n* LiteIDE : quick start\n* LiteApp : multi instance support\n* GolangDoc: deply load mode\n* GolangPackage: deply load mode\n* GolangAst : fix classview\n* LiteEditor: fix if/else fold\n* GolangDoc : goapi enable _test\n\n### 2012.11.6 Ver X14.0\n* tools/goapi : new goapi tool\n* GolangDoc: View Expression Information (F1)\n* GolangDoc: Jump to Declaration (F2)\n* GolangDoc: lookup all GOPATH pkg api\n* LiteApp: fix editor navigate\n* LiteEditor : add action Move to New Windows\n* LiteFind : focus in find text and enter\n* LiteEditor: fix code completer func test ()\n* GolangCode : auto restart gocode if liteide GOPATH changed\n* GolanPlay: enable gocode and fmt\n* GolangFmt: auto popup gofmt messsage option\n* LiteBuild : fix build config custom view\n* LiteBuild : BUILDARGS / INSTALLARGS support set\n  example -gcflags \"-N -l\" for debug\n  example -ldflags \"-s\" for release\n* remove: Makefile plugin , Profile plugin, x64 Project\n\n### 2012.10.10 Ver X13.2\n* GolangCode : the best support for gocode\n* LiteApp : add editor tab context menu\n* LiteApp : update view menu\n* LiteApp : fix check modify and save\n* GolangFmt : fix fmt editor style restore\n* GolangDoc : fix go/doc/*.html parser meta \"Path=\"\n* GolangAst : fix update model style restore\n* Welcome : update page\n* LiteEnv : edit enviroment action\n* LiteBuild : update gosrc.xml\n* LiteBuild : fix double click goto line regexp\n* LiteBuild : show enviroment go env\n* LiteBuild : execute error use red font\n* LiteEditor : color theme set currnet line background\n* LiteEditor : add color theme darktango.xml(Dumitru Ungureanu)\n* LiteEditor : go wordapi update, keyword types and funcs\n* LiteEditor : code completer func auto append ()\n* LiteEditor : fix tab indent\n* FileSystem : fix execute find path\n* LiteFind : fix current directory\n\n### 2012.9.24 Ver X13.1\n* LiteBuild : fix build load crash.\n* LiteApp : fix double click error output regexp\n* LiteApp : fix folder drop to liteide\n* LiteDebug : watch vars load /save by project\n* LiteDebug : breakpoint load /save by file\n* LiteDebug : add remove all breakpoint action\n* LiteDebug : add / remove global or local watch point\n* LiteEditor : optimization editor mark\n* LiteEditor : enable drop text\n* GolangPlay : enable gofmt\n\n### 2012.9.21 Ver X13\n* LiteApp : any folder, any file to build\n* LiteApp : update window style, add editor toolbar and status\n* LiteEditor : remove editor toolbar\n* LiteEditor : extra use editor font\n* LiteBuild : new build toolbar and menu\n* LiteBuild : clean action tags\n* GolangFmt : sync execute gofmt\n* GolangDoc : deply filter index\n* GolangAst : classview for folder\n* Outline : alltime expand\n* FileBrowser : rename to FileSystem\n* FileSystem : sync editor file to folder\n* FileSystem : add go command line edit (Ctrl+`)\n* FileSystem : double click execute file and execute on build output\n* Windows : include diff bin\n\n### 2012.9.14 Ver X12.5\n* LiteApp : move dock style, change to idea style tool windows.\n* LiteApp : double click editor and maximized or restore editor\n* LiteApp : esc key to hide bottom tool windows\n* LiteApp : auto load last session\n* LiteEditor : add edit navigate histroy\n* LiteEditor : extra use color scheme\n* GolangFmt : show error log and goto line\n\n### 2012.7.12 Ver X12.2\n* GolangFmt : fix fold error diff bug\n* LiteDebug : add var watch, example main.var os.Stdout\n* Welcome : add load last selection\n* LiteEditor : add fold or unfold all action\n* LiteEditor : add duplicate action\n* LiteEditor : add color theme railscast.xml(Alexander Rødseth)\n* LiteFind : default find use editor selection\n* LiteEnv : fix windows env LITEIEDE_EXECOPT=/C\n* LiteApp : fix icon on windows xp unable show\n\n### 2012.6.28 Ver X12.1.1\n* LiteEditor : fix fold bug - line include \"head{}end\"\n* LiteEditor : kate go.xml breace match add \"[]\"\n\n### 2012.6.27 Ver X12.1\n* LiteIDE : LiteIDE use new logo\n* LiteEditor : fold / unfold\n* LiteEditor : color scheme custom selection\n* LiteEditor : kate go.xml remove linecontinue\n* LiteEditor : goto line\n* LiteApp : fix recent file load bug\n* GdbDebugger : fix frame if not find fullname\n* LiteIDE : update faq document\n* LiteIDE : add install document\n\n### 2012.6.13 Ver X12 1.875\n* LiteIDE : reset resource directory\n* LiteEditor : goto next/prev block\n* LiteEditor : code comment\n* LiteEditor : braces match\n* LiteEditor: LRLF check by \\n\n* LiteEditor: no print char conver to .\n* LiteEditor: move tooltip to status\n* GolangFmt : enable gofmt diff\n* GolangFmt : save auto gofmt\n* LiteBuild: project build toolbar and editor build toolbar.\n* LiteFind: add file search\n* PackageBrowser: fast load\n\n### 2012.5.16 Ver X11 1.71875 beta4.1\n* LiteBuild: fix execute args for gosrc/gopro/makefile\n* LiteApp: add option - when close project auto close project editors\n* PackageBrowser : double click pkg and load project\n* LiteEditor: add option - completer case sensitive\n\n### 2012.5.15 Ver X11 1.71875 beta4\n* GolangPackage : enable local package\n* GolangDoc : golang api fmt#Println -> fmt.Println\n* LiteBuild : fix regexp error\n* FileSystem: (windows) fix rename abc to Abc false\n* PackageProject : remove auto reload timer\n* LiteEditor: (linux) redo enable CTRL+Y\n\n### 2012.5.2 Ver X11 1.71875 beta3\n* GolangPackage : new golang package plugin for GO1\n* GolangPackage : PackageBrowser and PackageProject for GO1\n* GolangTool : remove the plugin\n* GolangDoc: add golang api for GO1\n* GolangDoc: add golang api filter\n* GolangAst: add filter\n* GolangAst: classview and outline\n* LiteEditor : completer option\n* LiteApp : new file wizard support GO1\n* Welcome : new recent page\n* gopromake : update pkg depend\n\n### 2012.3.9 Ver X11 1.71875 beta2\n* GolangPlay : new go playground plugin\n* GolangTool : sync editor, sync project\n\n### 2012.3.1 Ver X11 1.71875 beta1\n* GolangTool : new golang plugin for GO1, import GOPATH project\n* GolangDoc : update to GO1\n* LiteBuild : update to GO1\n* tools : udpate all tools for GO1\n\n### 2011.9.26 Ver X10 1.5625\n* LiteEditor : add line mark api\n* LiteDebug : new debug toolbar\n* LiteDebug : insert/remove break\n* LiteDebug : breakpoint and current line mark\n* GdbDebugger : async record view\n* GdbDebugger : variables expand tree\n* GdbDebugger : call stack view\n* GdbDebugger : load library view\n* TerminalEdit : provided to LiteBuild and LiteDebug\n\n### 2011.9.14 Ver X9 1.40625\n* LiteDebug : new debug manager plugin\n* GdbDebugger : new gdb debugger plugin\n* LiteBuild : add build config and custom\n* LiteFind : fix regexp use match case\n\n### 2011.9.1 Ver X8 1.25\n* LiteFind : new find and replace plugin, remove CodeSearch plugin\n* LiteEditor : fix word api completer three parts error\n* LiteEditor : fix word api completer sorted\n* LiteApp : fix main window state load/save on linux\n* LiteApp : change path to standard linux path\n* LiteBuild : add build option, example execute arguments\n* FileBrowser : add new file wizard\n\n### 2011.8.12 Ver X7 1.09375\n* Welcome : new html page, quick link, session, recent projects and files\n* GolangDoc : generic document nav\n* GolangDoc : scheme entry [file|list|find|pdoc]\n* FileBrowser : add \"View Godoc Here\"\n* LiteBuild : auto clean output if line more than 1024\n* LiteEditor : word completer sorted\n* LiteEditor : auto braces last state check\n* GolangAst : show type struct field\n* GolangAst : editor state keep self\n\n### 2011.7.28 Ver X6 0.9375\n* LiteEnv : new plugin, liteide enviroment setup\n* Welcome : add LiteIDE document browser\n* GolangDoc : add package find, example input \"zip\" and find\n* GolangDoc : add godoc /src/pkg/ and /src/cmd/ tree\n* GolangDoc : add go/doc/ document browser\n* GolangDoc : add document browser text search\n* LiteEditor : add export html file\n* FileBrowser : add menu item desktop explorer\n* LiteEditor : add enable automatic insert brackets\n* LiteEditor : add option :  display  and behavior\n* LiteApp : fix session load last editor or welcome page\n* LiteApp : fix find mimetype incorrect\n* GolangCode : fix application exit gocode close\n* FileBrowser : fix context menu popup on root\n* LiteBuild : fix ouput html format to plaintext\n* LiteBuild : fix build does not handle spaces in file paths\n* LiteBuild : fix output append \\n->next append\n* LiteBuild : fix enviroment depend of LiteBuild\n\n### 2011.7.7 Ver X5 v0.78125\n* add CodeSearch plugin : Editor Search and Replace\n* add GolangDoc plugin : Golang Package Find\n* add Search and Replace Regex: (Colo)(u)(r) -> \\1\\3\n* add FileBorwser top dir setup\n* add LiteEditor Copy Syntax Color support (HTML mimedata)\n* add LiteEditor ReadOnly\n* add MainWindow all DockWidget saveState\n* add EditorManager CTRL+TAB switch\n* update tools/gopromake to r58\n* update tools/goexec to r58\n* update tools/goastview to r58\n* fix filebrowser rename show oldname\n* fix ENV c:/go/bin;%PATH% order, GOBIN is priority\n* fix FileBrowser sort incorrect on MACOSX\n* fix GoFmt reload editor display pos keep\n* fix Editor Close Ask BUG ret==SaveAll\n* fix Editor word writed ,completer only one match auto hide\n\n### 2011.6.30 Ver X4 v0.625\n* add interface zh_cn\n* add filebrowser pluing add/change/remove\n* add editor color style scheme setup\n* add editor codec check/reload\n* add editor pdf export\n* add editor print and preview\n* editor style line LRLF of source\n* kate go.xml support \"number\" style\n* liteapp last session save/load\n\n### 2011.6.21 Ver X3 v0.46875\n* add file browser plugin\n* source editor pre link project build\n* source editor outside modify/remove watcher\n\n### 2011.5.20 Ver X2 v0.3125\n* add gocode plugin\n* add build/makefile\n* add build/lua stdoutput:setvbuf(\"no\")\n* fix build task stop on error\n* fix build process write \\n\n\n### 2011.5.12 Ver X1 v0.15625\n* New LiteIDE X version\n\n------\n\n## LiteIDE Old version\n\n### 2011.2.25  v0.2.1\n* add build on MacOSX10.6\n* support Makefile and .pro project\n* project support GCOPT and GLOPT\n* global option page\n* global output pane\n* set GOROOT option\n* run shell\n* run debug\n* run process can write\n* run process can kill\n* clean project opt temp or all\n* new project wizard : .pro/package/Makefile\n* new example goinfo, how to use local or search package\n\n### 2011.1.25 v0.1.8\n* goastview plugin\n\n### 2011.1.18 v0.1.6\n* add build on Linux64\n\n### 2011.1.12 v0.1.5\n* build error and jump to source line\n\n### 2011.1.11 v0.1.2\n* gopromake use goroutines\n\n### 2011.1.10 v0.1\n* init version\n"
  },
  {
    "path": "liteidex/deploy/welcome/zh_CN/forever.md",
    "content": "<!-- Forever -->\n\nForever\n=======\n\n## 道德经\n道可道，非常道。名可名，非常名。\n无名天地之始；有名万物之母。\n\n## 2018.02.14 \n**三十功名尘与土，八千里路云和月。**\n\n## 天行健\n**天行健，君子以自强不息。地势坤，君子以厚德载物。**\n\n![](images/liteide.png)\n\n## logo \n\n![](images/liteide400.png)\n\n## @_@\n佛祖问阿难：你有多喜欢这少女? 阿难说：我愿化身石桥，受五百年风吹，五百年日晒，五百年雨打，但求此少女从桥上走过。\n\n\n## with you\n\n![](images/flamingo.png)\n\n## forever\n![](images/forever.png)\n\n"
  },
  {
    "path": "liteidex/deploy/welcome/zh_CN/guide.md",
    "content": "<!-- 功能手册 -->\n\n# LiteIDE 功能手册\n\n## 如何支持低版本Go1.1和Go1.2\nLiteIDE的编译设置使用了-i编译参数。如果使用Go1.1或Go1.2则不支持此参数。选项->查看->LiteBuild 双击gosrc.xml进行编辑。修改BUILDARGS默认设置：\n\n\t<custom id=\"BuildArgsi\" name=\"BUILDARGS\" value=\"-i\"/>\n\t\n将value设置为空存盘重启LiteIDE即可支持Go1.1和Go1.2。\n\n## 窗口样式设置\nLiteIDE目前有两种窗口样式分离式和侧边栏式。\n\n选项->查看->LiteApp-> 窗口样式。\n\n\n## 环境设置\n\nLiteIDE环境设置插件可以让你快速设置切换多个系统环境，以便编译构建，每个环境都可配置自己需要的环境变量。\n\n### 选择当前环境\n\n工具栏中的下拉菜单可以用来选择目前用于编译构建/运行的环境。\n\n![envselect.png](../images/envselect.png)\n\n主要系统的一些常用环境列表\n* Windows - win64 win32\n* Linux - linux64 linux32\n* MacOSX - darwin64 darwin32\n\n可选择使用交叉编译环境，请参看下面的交叉编译设置。\n\n### 配置环境\n\n环境中的变量可以通过手工进行修改。要编辑当前环境，只要按一下环境下拉列表旁的`编辑环境`按钮。\n\n另外，也可以`查看>选项> LiteEnv`面板中对所有环境进行查看和编辑。\n\n\n举例 `win32.env`:\n\n    #win32 environment\n    \n    GOROOT=c:\\go\n    #GOBIN=\n    GOARCH=386\n    GOOS=windows\n    \n    PATH=c:\\mingw32\\bin;%GOROOT%\\bin;%PATH%\n    \n    LITEIDE_GDB=gdb\n    LITEIDE_MAKE=mingw32-make\n    LITEIDE_TERM=%COMSPEC%\n    LITEIDE_TERMARGS=\n    LITEIDE_EXEC=%COMSPEC%\n    LITEIDE_EXECOPT=/C\n\n\n举例 `linux32.env`:\n\n    #linux32 environment\n    \n    GOROOT=$HOME/go\n    #GOBIN=\n    GOARCH=386\n    GOOS=linux\n    \n    PATH=$GOROOT/bin:$PATH\n    \n    LITEIDE_GDB=gdb\n    LITEIDE_MAKE=make\n    LITEIDE_TERM=/usr/bin/gnome-terminal\n    LITEIDE_TERMARGS=\n    LITEIDE_EXEC=/usr/bin/xterm\n    LITEIDE_EXECOPT=-e\n\t\n## 快速打开窗口\n\n* 快速打开 Ctrl+P\n* 快速打开文档 Ctrl+Alt+P 或者在快速打开窗口输入 ~\n* 快速跳转符号 Ctrl+Shift+O 或者在快速打开窗口输入 @\n* 快速跳转到行  Ctrl+L 或者在快速打开窗口输入 :\n* 获取帮助 在快速打开窗口输入 ?\n\t\n\n## 交叉编译 (Go1.5或更高版本)\n\n选择LiteIDE的环境并设置相应的GOROOT、GOARCH、GOOS，重新编译即可。\n\n## 交叉编译 (Go1.5之前)\n\n必须先建立交叉编译器所需要的平台和架构。如果你不这样做，将出现类似下面的错误：\n\n    go build runtime: linux/amd64 must be bootstrapped using make.bat\n\n请查看 \"Building compilers\" subsection for examples.\n\n### 环境变量\n\n交叉编译将把项目为编译为另一个操作系统或体系结构，需要定义环境中的以下变量：\n\n* `$GOOS` - 目标操作系统 (默认值等同于`$GOHOSTOS`).  可选值包括:\n    * darwin (Mac OS X 10.6 或更高版本)\n    * freebsd\n    * linux\n    * netbsd\n    * openbsd\n    * plan9\n    * windows\n* `$GOARCH` - 目标平台体系 (默认值等同于`$GOHOSTARCH`).  可选值包括:\n    * amd64 (64-bit x86, 最成熟)\n    * 386 (32-bit x86)\n    * arm (32-bit ARM)\n* `$GOARM` - ARM 架构运行库 (默认值: 6).\n    * 设置 `$GOARM` 为5 时将导致链接器使用软件浮点实现，而不是使用硬件浮点支持。\n* `$CGO_ENABLED`\n    * 交叉编辑时值自动设置为0。\n\n### 构建编译器\n\n要构建编译器到交叉编译，需要转到源目录中并运行相应的脚本。下面的例子演示了如何构建一些常见的编译器，你必须自己机器上相应设置来修改环境变量。\n\n**go1.5 以下 ( go1.8 交叉编译时会自动设置 CGO_ENABLED 为 0)**\n\n在Windows平台上交叉编译 64-bit Linux (使用MinGW和GCC):\n\n    > set GOARCH=amd64\n    > set GOOS=linux\n\t> set CGO_ENABLED=0\n\t> go build std\n\n在Mac OS X平台上交叉编译 32-bit windows:\n\n    > GOARCH=386 GOOS=window CGO_ENABLED=0 go build std\n\n在Mac OS X平台上交叉编译 ARM :\n\n    > GOARCH=arm GOOS=linux CGO_ENABLED=0 go build std\n\n**go 1.0 go1.1 go1.2 go1.3 go1.4**\n\n在Windows平台上交叉编译 64-bit Linux (使用MinGW和GCC):\n\n    > set GOARCH=amd64\n    > set GOOS=linux\n    > set CGO_ENABLED=0\n    > cd %GOROOT%\\src\n    > all.bat\n\n在macOS平台上交叉编译 32-bit windows:\n\n    > export GOARCH=386\n    > export GOOS=windows\n    > export CGO_ENABLED=0\n    > cd $GOROOT/src\n    > ./all.bash\n\n在macOS平台上交叉编译 ARM :\n\n    > export GOARCH=arm\n    > export GOOS=linux\n    > export CGO_ENABLED=0\n    > cd $GOROOT/src\n    > ./all.bash\n\n## Go语言代码格式化\n存盘时自动格式化\t\n\n### Goimports样式格式化\nLiteIDE 查看->选项->GolangFmt-> 使用Goimports代替gofmt进行代码格式化\n\n这个工具自动更新您的Go语言import行，增加缺少的pkg和移除未引用的pkg。\n\n## Gocode代码完成\nGo语言代码完成使用gocode <https://github.com/nsf/gocode>，gocode的工作原理是从项目的依赖库.a文件中读取，所以不能代码完成时请更新项目的依赖库。\n\n### 更新依赖库\n更新当前项目的依赖库, 点击编译菜单或工具栏`Get`(go get)\n\n### 自动更新依赖库\nLiteIDE 查看->选项->Gocode-> 自动更新依赖库\n\n### 编译\n\n在LiteIDE中执行交叉编译，通过选择上述相应的交叉编译环境。并且确保环境已经设置了正确的变量。包括 `GOARCH`，`GOOS`，`GOARM`和`CGO_ENABLED`，如上面所述。\n\n一旦交叉目标环境中已被选中并切换，只需要重新编译文件/项目即可。\n\n举例在Windows平台上配置交叉环境 64-bit Linux:\n\n    GOROOT=c:\\go\n    GOBIN=\n    GOARCH=amd64\n    GOOS=linux\n    CGO_ENABLED=0\n    \n    PATH=%GOBIN%;%GOROOT%\\bin;%PATH%\n    ...\n\n## 编译系统\nLiteIDE的编译系统是高度可配置的，可使用XML文件自定义生成相应的命令操作。\n\n### 配置编译行为\n\n要修改现有的编译选项，打开`查看>选项> LiteBuild`。你可以在这个目录中添加自己的图片来定义新的图标。双击一个XML文件进行编辑。每个XML文件都使用Mime格式定义了针对特定文件类型的相应操作。\n\n举例 Go语言的 XML 配置 (`gosrc.xml`):\n\n\t<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\t<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n\t\t<mime-type type=\"text/x-gosrc\" id=\"gosrc\" work=\"$(EDITOR_DIR)\" ver=\"1\">\n\t\t\t<config id=\"Go\" name=\"GO\" value=\"go\"/>\n\t\t\t<config id=\"GoExec\" name=\"GOEXEC\" value=\"$(LITEAPPDIR)/goexec\"/>\n\t\t\t<config id=\"ErrRegex\" name=\"ERRREGEX\" value=\"(\\w?:?[\\w\\d_\\-\\\\/\\.]+):(\\d+):\"/>\n\t\t\t<custom id=\"TargetArgs\" name=\"TARGETARGS\" value=\"\"/>\n\t\t\t<custom id=\"BuildArgs\" name=\"BUILDARGS\" value=\"\"/>\n\t\t\t<custom id=\"InstallArgs\" name=\"INSTALLARGS\" value=\"\"/>\n\t\t\t<action id=\"Build\" img=\"blue/build.png\" key=\"Ctrl+B;F7\" cmd=\"$(GO)\" args=\"build $(BUILDARGS)\" save=\"all\" output=\"true\" codec=\"\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t\t<action id=\"Install\" menu=\"Build\" img=\"blue/install.png\" key=\"Ctrl+F8\" cmd=\"$(GO)\" args=\"install $(INSTALLARGS)\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t\t<action id=\"BuildTests\" menu=\"Build\" img=\"blue/buildtest.png\" cmd=\"$(GO)\" args=\"test -c -gcflags &quot;-N -l&quot;\" save=\"all\" output=\"true\" codec=\"\" regex=\"$(ERRREGEX)\"/>\n\t\t\t<action id=\"Clean\" menu=\"Build\" img=\"blue/clean.png\" cmd=\"$(GO)\" args=\"clean\" save=\"all\" output=\"true\"/>\n\t\t\t<action id=\"CleanAll\" menu=\"Build\" img=\"blue/cleanall.png\" cmd=\"$(GO)\" args=\"clean -i\" save=\"all\" output=\"true\"/>\n\t\t\t<action id=\"BuildAndRun\" img=\"blue/buildrun.png\" key=\"Ctrl+R;Ctrl+F7\" task=\"Build;Run\" killold=\"true\"/>\n\t\t\t<action id=\"Run\" menu=\"BuildAndRun\" img=\"blue/run.png\" key=\"Ctrl+F5\" cmd=\"$(EDITOR_DIRNAME_GO)\" args=\"$(TARGETARGS)\" output=\"true\" codec=\"utf-8\" readline=\"true\"/>\n\t\t\t<action id=\"RunTerm\" menu=\"BuildAndRun\" img=\"blue/runterm.png\" key=\"Ctrl+Shift+F5\" cmd=\"$(LITEIDE_EXEC)\" args=\"$(LITEIDE_EXECOPT) $(GOEXEC) $(EDITOR_DIRNAME_GO) $(TARGETARGS)\" output=\"false\" readline=\"true\"/>\n\t\t\t<action id=\"FileRun\" menu=\"BuildAndRun\" img=\"gray/filerun.png\" key=\"Alt+F6\" cmd=\"$(GO)\" args=\"run $(EDITOR_NAME)\" save=\"editor\" output=\"true\" codec=\"utf-8\" readline=\"true\"/>\n\t\t\t<action id=\"Test\" img=\"blue/test.png\" key = \"Ctrl+T\" cmd=\"$(GO)\" args=\"test\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t\t<action id=\"Bench\" menu=\"Test\" img=\"blue/testbench.png\" cmd=\"$(GO)\" args=\"test -test.bench=.*\" save=\"all\" output=\"true\" codec=\"utf-8\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t\t<action id=\"Get\" menu=\"Test\" img=\"blue/get.png\" cmd=\"$(GO)\" args=\"get -v .\" save=\"all\" output=\"true\" codec=\"utf-8\"/>\n\t\t\t<action id=\"Fmt\" menu=\"Test\" img=\"blue/fmt.png\" cmd=\"$(GO)\" args=\"fmt\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t\t<action id=\"Vet\" menu=\"Test\" img=\"blue/vet.png\" cmd=\"$(GO)\" args=\"vet\" save=\"all\" output=\"true\" regex=\"$(ERRREGEX)\" navigate=\"true\"/>\n\t\t\t<target id=\"Target\" cmd=\"$(EDITOR_DIRNAME_GO)\" args=\"$(TARGETARGS)\" work=\"$(EDITOR_DIR)\"/>\n\t\t</mime-type>\n\t</mime-info>\n\n## Go文档查看\n\nLiteIDE可使用godoc来输出需要Go文档并浏览。可以查看标准包文档或自定义包文档。打开使用`查看> Godoc文档查看`可以查看关于此的更多细节。\n\n\n## 查找和替换\n\n编辑器提供了搜索和替换功能，并支持正则表达式。例如：\n\n    Find: (Colo)(u)(r)\n    Replace: \\1\\3\n\nThe above example will replace all instances of `Colour` with `Color`.\n上面的例子将取代`Colour`为`Color`\n\n文件系统的搜索功能可通过 `查找 -> 文件搜索`实现.\n\n## 调试\nLiteIDE调试Go语言需要安装GDB(Windows上可使用MinGW).\n\n环境变量`LITEIDE_GDB`可指定使用哪一个gdb来执行调试。在Windows平台上，32位环境使用`gdb.exe`而64位环境默认使用`gdb64.exe`。在环境配置文件中可对这个环境变量进行手工配置。\n\n## 键盘映射\n您可以修改用于LiteIDE所有的功能快捷键。打开 `查看 -> 选项 -> LiteApp -> 键盘` 并修改快捷键。双击该快捷键列表进行编辑，然后按'应用'以执行更改。\n\n快捷键必须遵循特定的格式。快捷键通常可以使用逗号（`，`）分隔，即按顺序按下对应的快捷键以启动功能。而定义支持多个快捷键则用分号（';'）进行分隔。\n\n举例:\n* `Ctrl+B`\n* `Ctrl+Shift+B`\n* `Ctrl+K,Ctrl+U`\n* `Ctrl+Y;Ctrl+Shift+Z`\n"
  },
  {
    "path": "liteidex/deploy/welcome/zh_CN/install.md",
    "content": "<!-- Install -->\n\n# 安装 LiteIDE\n## 先决条件\n使用LiteIDE开发golang需要安装Go语言开发环境。\n\n### Go\n先要安装Go语言，详细情况请参看<http://golang.org/doc/install.html>. \n在安装LiteIDE之前一定要先安装Go语言。\n\n## 安装二进制文件\n<https://sourceforge.net/projects/liteide/>\n\n### Windows\n下载压缩包并解压至c:\\盘\n\n### Linux and MacOSX\n下载压缩包并解压到/usr/local或者是$HOME\n\n## 从源代码编译\nLiteIDE源码位于<https://github.com/visualfc/liteide>上。需要使用Qt4/Qt5来编译源代码，Qt库可以从<https://qt-project.org/downloads>上获取。Mac OS X用户可以不从源代码编译Qt，直接在终端中运行`brew update && brew install qt`，节省大量时间。下面的编译以Qt4为例。\n\n### Windows\n**Qt4**\n\n\t> git clone https://github.com/visualfc/liteide.git\n\t> set QTDIR=c:\\Qt\\Qt4.8.5\n\t> set MINGWDIR=c:\\Qt\\MinGW\n\t> cd liteide/build\n\t> update_pkg.cmd\n\t> build_windows_mingw.cmd\n\t> deploy_windows_qt4.8_webkit.cmd\n\n**Qt5.6**\n\n\t> git clone https://github.com/visualfc/liteide.git\n\t> set QTDIR=C:\\Qt\\Qt5.6.2\\5.6\\mingw49_32\n\t> set MINGWDIR=C:\\Qt\\Qt5.6.2\\Tools\\mingw492_32\n\t> cd liteide/build\n\t> update_pkg.cmd\n\t> build_windows_mingw.cmd\n\t> deploy_windows_qt5.6.cmd\n\t\n### Ubuntu 16.04 Qt4\n\t## Install Qt4 ##\n\t$ sudo apt-get update\n\t$ sudo apt-get install libqt4-dev\n\n\t## Git clone and build liteide ##\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ ./build_linux_qt4.sh\n\t\n\t## Run it: ##\n\t$ cd liteide/build/liteide/bin\n\t$ ./liteide\n\t\n\t## Deploy it: ##\n\t$ cd liteide/build\n\t$ ./deploy_linux_x64_qt4.sh\n\t## 32 bit\n\t$ ./deploy_linux_x32_qt4.sh\n\t\n### Ubuntu 16.04 Qt5\n\t## Install Qt5 ##\n\t$ sudo apt-get update\n\t$ sudo apt-get install qt5-default\n\t\n\t## Git clone and build liteide ##\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ ./build_linux_qt5.sh\n\t\n\t## Run it: ##\n\t$ cd liteide/build/liteide/bin\n\t$ ./liteide\n\t\n\t## Deploy it: ##\n\t$ cd liteide/build\n\t$ ./deploy_linux_x64_qt5.sh\n\t## 32 bit\n\t$ ./deploy_linux_x32_qt5.sh\n\t\n### Ubuntu 14.04\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ sudo apt-get update\n\t$ sudo apt-get install qt4-dev-tools libqt4-dev libqt4-core libqt4-gui libqtwebkit-dev g++\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ QTDIR=/usr ./build_linux.sh\n\t\n\t## Run it: ##\n\t$ cd liteide/build/liteide/bin\n\t$ ./liteide\n\n### Linux\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ export QTDIR=$HOME/QtSDK/Desktop/Qt/484/gcc\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ ./build_linux.sh\n\t$ ./deploy_linux_qt4.8_webkit.sh\n\n### Mac OS X / macOS\n\n**Qt 4**\n\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ export QTDIR=$HOME/QtSDK/Desktop/Qt/484/gcc #如果Qt是通过brew安装，输入: export QTDIR=/usr/local/Cellar/qt/4.8.6\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ ./build_maoos_qt4.sh\n\t$ ./deploy_macos_qt4.sh\n\t$ open liteide/LiteIDE.app\n\n**Qt 5 sdk install**\n\n从 http://www.qt.io/download 下载并安装Qt. (Qt5.6.2/Qt5.7.1/Qt5.8)\n\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ export QTDIR=$HOME/Qt5.6.2/Qt5.6/clang_64\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ ./build_macos_qt5.sh\n\t$ ./deploy_macos_qt5.sh\n\t$ open liteide/LiteIDE.app\n\t\n**Qt 5 brew install**\t\n\n使用 brew 安装 Qt. (比如使用 brew install qt. 其他版本如 qt@5.5 qt@5.6 qt@5.7 ).\n\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ export QTDIR=/usr/local/Cellar/qt/5.8.0_2 # or modify accordingly for qt@5.5 and qt@5.7\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ ./build_macos_qt5.sh\n\t$ open liteide/LiteIDE.app\n\n警告！ 使用 brew 安装的 Qt rpath 不正确，不要使用 deploy 脚本进行打包。\n\n### OpenBSD\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ export QTDIR=/usr/local/lib/qt4\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ ./build_openbsd.sh\n\n\t## Run it: ##\n\t$ export LD_LIBRARY_PATH=$HOME/liteide/build/liteide/bin:$LD_LIBRARY_PATH\n\t$ cd liteide/build/liteide/bin\n\t$ ./liteide\n\n### Raspbian Jessie\n\t$ sudo apt-get update\n\t$ sudo apt-get install qt5-default xterm\n\t$ git clone https://github.com/visualfc/liteide.git\n\t$ cd liteide/build\n\t$ ./update_pkg.sh\n\t$ QTDIR=/usr ./build_linux.sh\n\tThe build process from a µSD card takes approx. 105 minutes on a RPi 2.\n\t\n\t## Run it: ##\n\t$ cd liteide/build/liteide/bin\n\t$ ./liteide\n\n\n**补充：** 根据自己的环境设置好 `QTDIR` (在Windows上还需要设置`MINGWDIR`)\n"
  },
  {
    "path": "liteidex/deploy/welcome/zh_CN/liteide.html",
    "content": "<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n  <title>LiteIDE Documentation</title>\n  <link rel=\"stylesheet\" href=\"../css/style.css\" type=\"text/css\" media=\"all\" charset=\"utf-8\"/>\n</head>\n\n<body>\n\t<div id=\"container\">\n\t\t<div id=\"topnav\">\n\t\t\t<h1 id=\"title\"><img src=\"../images/liteide-logo128.png\" align =\"right\">LiteIDE Documentation</h1>\n\t\t\t<div class=\"quickref\">\n\t\t\t\t<a href=\"readme.md\">自述</a> <span class=\"sep\">|</span>\n\t\t\t\t<a href=\"./install.md\">安装</a> <span class=\"sep\">|</span>\n\t\t\t\t<a href=\"guide.md\">使用指南</a> <span class=\"sep\">|</span>\n\t\t\t\t<a href=\"shortcuts.html\">快捷键</a> <span class=\"sep\">|</span>\n\t\t\t\t<a href=\"website.md\">网址</a><span class=\"sep\">|<span>\n\t\t\t\t<a href=\"changes.md\">历史记录</a> <span class=\"sep\">|<span>\n\t\t\t\t<a href=\"LICENSE.LGPL\">协议</a> <span class=\"sep\">|</span>\n\t\t\t\t<a href=\"forever.md\">Forever</a> <span class=\"sep\">\n\t\t\t</div>\n\t\t</div>\n\t\t<div id=\"content\">\n\t\t\t<!-- Menu is HTML-escaped elsewhere -->\n\t\t\t<h1 id=\"generatedHeader\">{header}</h1>\n\t\t\t<!-- The Table of Contents is automatically inserted in this <div>.Do not delete this <div>. -->\n\t\t\t<div id=\"nav\">{nav}</div>\n\t\t\t{content}\n\t\t</div>\n\t</div>\n</body>\n</html>\n"
  },
  {
    "path": "liteidex/deploy/welcome/zh_CN/readme.md",
    "content": "<!-- 欢迎使用 LiteIDE X -->\n\nLiteIDE X\n=========\n\n### 简介\n\n_LiteIDE 是一个轻量级的开源跨平台 Go语言 IDE._\n\n* 版本: X38.4\n* 作者: [七叶 (visualfc)](mailto:visualfc@gmail.com)\n\n### 功能\n\n* 核心功能\n\t* 系统环境管理\n\t* MIME类型管理\n\t* 可配置编译命令\n\t* 支持文件搜索替换和恢复\n\t* 快速打开文件、符号和命令\n\t* 插件系统\n\t\n* 高级代码编辑器\n\t* 代码编辑支持 Go语言、Markdown 和 Golang Present\n\t* 快速代码导航工具\n\t* 语法高亮和配色方案\n\t* 代码完成\n\t* 代码折叠\n\t* 显示保存修订\n\t* 重读文件使用代码差异方式\n\t\n* Go 语言支持\n\t* 支持 Go1.18~Go1.21 泛型\n\t* 支持 Go1.11 Go modules\n\t* 支持 Go1.5 Go vendor\n\t* 支持 Go1 GOPATH\n\t* Go 编译环境管理\n\t* 使用标准 Go 工具编译和测试\n\t* 自定义 GOPATH 支持 系统定义、IDE 定义和项目定义\n\t* 自定义项目编译配置\n\t* Go 包浏览器\n\t* Go 类视图和大纲\n\t* Go 文档搜索和 API 索引\n\t* 代码导航和信息提示\n\t* 代码查找引用\n\t* 代码重构和恢复\n\t* 集成 [gocode](https://github.com/visualfc/gocode) clone of [nsf/gocode](https://github.com/nsf/gocode)\n\t* 集成 [gomodifytags](https://github.com/fatih/gomodifytags)\n\t* 支持代码查询工具 guru\n\t* 调试支持 GDB 和 [Delve](https://github.com/derekparker/delve)\n\t\n### 系统支持\n* Windows x86 (32-bit or 64-bit)\n* Linux x86 (32-bit or 64-bit)\n* MacOS X10.6 or higher (64-bit)\n* FreeBSD 9.2 or higher (32-bit or 64-bit)\n* OpenBSD 5.6 or higher (64-bit)\n\n### LiteIDE 命令行\n\tliteide [files|folder] [--select-env id] [--local-setting] [--user-setting] [--reset-setting]\n\t \n\t--select-env [system|win32|cross-linux64|...]     选择初始环境ID\n\t--local-setting   强制使用本地配置\n\t--user-setting    强制使用用户配置\n\t--reset-setting   重置当前配置 ( 清除配置文件 )\n\t\n### 更新 liteide 工具支持新的 Go语言版本\n\n\tgo get -u github.com/visualfc/gotools\n\tgo get -u github.com/visualfc/gocode\n\t\n\tWindows/Linux: 复制 GOPATH/bin gotools 和 gocode 到 liteide/bin\n\tMacOS: 复制 GOPATH/bin gotools 和 gocode 到 LiteIDE.app/Contents/MacOS\t\n\n### 网址\n* LiteIDE 主页\n\t* <http://liteide.org>\n* 源代码下载\n\t* <https://github.com/visualfc/liteide>\n* 发行版下载\n\t* <http://sourceforge.net/projects/liteide/files>\n* Google用户组\n\t* <https://groups.google.com/group/liteide-dev>\n* FAQ\n\t* <https://github.com/visualfc/liteide/blob/master/liteidex/deploy/welcome/zh_CN/guide.md>\t\n* 支持LiteIDE\n\t* <https://visualfc.github.com/support>\n"
  },
  {
    "path": "liteidex/deploy/welcome/zh_CN/shortcuts.html",
    "content": "<!-- Key Shortcuts -->\n\n<h2>Key Shortcuts</h2>\n<p>These are the default shortcuts for LiteIDE.  Note that you can customize these in \"View > Options > LiteApp > Keyboard\".</p>\n\n<table border=\"1\">\n<tr><th colspan=\"2\">Standard</th></tr>\n<tr><td>New</td><td>Ctrl+N</td></tr>\n<tr><td>Open</td><td>Ctrl+O</td></tr>\n<tr><td>Save</td><td>Ctrl+S</td></tr>\n<tr><td>Close</td><td>Ctrl+W</td></tr>\n<tr><td>Full Screen</td><td>Ctrl+Shift+F11</td></tr>\n<tr><td>Next Tab</td><td>Ctrl+Tab</td></tr>\n<tr><td>Prev Tab</td><td>Ctrl+Shift+Tab</td></tr>\n<tr><td>Hide Bottom Windows</td><td>ESC</td></tr>\n<tr><td>Execute File</td><td>Ctrl+`</td></tr>\n\n<tr><th colspan=\"2\">Editor</th></tr>\n<tr><td>Cut</td><td>Ctrl+X</td></tr>\n<tr><td>Copy</td><td>Ctrl+C</td></tr>\n<tr><td>Paste</td><td>Ctrl+V</td></tr>\n<tr><td>Undo</td><td>Ctrl+Z</td></tr>\n<tr><td>Redo</td><td>Ctrl+Shift+Z,Ctrl+Y</td></tr>\n<tr><td>Paste</td><td>Ctrl+V</td></tr>\n<tr><td>Duplicate</td><td>Ctrl+D</td></tr>\n<tr><td>Delete Line</td><td>Ctrl+Shift+K</td></tr>\n<tr><td>Select All</td><td>Ctrl+A</td></tr>\n<tr><td>Select Block</td><td>Ctrl+U</td></tr>\n<tr><td>Goto Match Brace</td><td>Ctrl+E</td></tr>\n<tr><td>Goto Previous Block</td><td>Ctrl+[</td></tr>\n<tr><td>Goto Next Block</td><td>Ctrl+]</td></tr>\n<tr><td>Goto Line</td><td>Ctrl+G</td></tr>\n<tr><td>Fold Block</td><td>Ctrl+&lt;</td></tr>\n<tr><td>Unfold Block</td><td>Ctrl+&gt;</td></tr>\n<tr><td>Increase Font Size</td><td>Ctrl++</td></tr>\n<tr><td>Decrease Font Size</td><td>Ctrl+-</td></tr>\n<tr><td>Reset Font Size</td><td>Ctrl+0</td></tr>\n<tr><td>Go Backward</td><td>Alt+←</td></tr>\n<tr><td>Go Forward</td><td>Alt+→</td></tr>\n<tr><td>InsertLineAfter</td><td>Ctrl+Enter</td></tr>\n<tr><td>InsertLineBefore</td><td>Ctrl+Shift+Enter</td></tr>\n<tr><td>Code Completer</td><td>Ctrl+Space</td></tr>\n<tr><td>Code Completer List Next</td><td>Ctrl+N</td></tr>\n<tr><td>Code Completer List Prev</td><td>Ctrl+P</td></tr>\n\n<tr><th colspan=\"2\">Golang Editor</th></tr>\n<tr><td>Code expression info</td><td>Ctrl+Shift+I; F1 ; Ctrl+?(MacOS X)</td></tr>\n<tr><td>Jump to declaration</td><td>Ctrl+Shift+J; F2</td></tr>\n<tr><td>Find Usages</td><td>Ctrl+Shift+U</td></tr>\n<tr><td>Rename Symbol Under Cursor</td><td>Ctrl+Shift+R</td></tr>\n<tr><td>Gofmt</td><td>Shift+F7</td></tr>\n<tr><td>Comment/Uncomment</td><td>Ctrl+/</td></tr>\n\n<tr><th colspan=\"2\">Find</th></tr>\n<tr><td>Find</td><td>Ctrl+F</td></tr>\n<tr><td>Find Next</td><td>F3</td></tr>\n<tr><td>Find Previous</td><td>Shift+F3</td></tr>\n<tr><td>Replace</td><td>Ctrl+H</td></tr>\n<tr><td>Find in File</td><td>Ctrl+Shift+F</td></tr>\n\n<tr><th colspan=\"2\">Build</th></tr>\n<tr><td>Build</td><td>Ctrl+B, F7</td></tr>\n<tr><td>Install</td><td>Ctrl+F8</td></tr>\n<tr><td>Test</td><td>Ctrl+T</td></tr>\n<tr><td>Run</td><td>Ctrl+F5</td></tr>\n<tr><td>Build and Run</td><td>Ctrl+R</td></tr>\n<tr><td>Run in Term</td><td>Ctrl+Shift+F5</td></tr>\n<tr><td>File Run</td><td>Alt+F6</td></tr>\n\n<tr><th colspan=\"2\">Debug</th></tr>\n<tr><td>Debug</td><td>F5</td></tr>\n<tr><td>Continue</td><td>F5</td></tr>\n<tr><td>Insert/Remove BreakPoint</td><td>F9</td></tr>\n<tr><td>Stop Debug</td><td>Shift+F5</td></tr>\n<tr><td>Step Info</td><td>F11</td></tr>\n<tr><td>Step Over</td><td>F10</td></tr>\n<tr><td>Step Out</td><td>Shift+F11</td></tr>\n<tr><td>Run to Line</td><td>Shift+F10</td></tr>\n\n<tr><th colspan=\"2\">Markdown Editor</th></tr>\n<tr><td>Bold</td><td>Ctrl+B</td></tr>\n<tr><td>Italic</td><td>Ctrl+I</td></tr>\n<tr><td>H1-H6</td><td>Ctrl+1,...,Ctrl+6</td></tr>\n<tr><td>Inline Code</td><td>Ctrl+K</td></tr>\n<tr><td>Link</td><td>Ctrl+Shift+L</td></tr>\n<tr><td>Image</td><td>Ctrl+Shift+I</td></tr>\n<tr><td>Unordered List</td><td>Ctrl+Shift+U</td></tr>\n<tr><td>Ordered List</td><td>Ctrl+Shift+O</td></tr>\n<tr><td>Blockquote</td><td>Ctrl+Shift+Q</td></tr>\n<tr><td>Horizontal Rule</td><td>Ctrl+Shift+H</td></tr>\n\n\n</table>"
  },
  {
    "path": "liteidex/deploy/welcome/zh_CN/website.md",
    "content": "<!-- Website -->\n\n\n### LiteIDE\n* [LiteIDE Source](https://github.com/visualfc/liteide)\n* [LiteIDE Download](http://sourceforge.net/projects/liteide/files)\n* [Support LiteIDE](http://visualfc.github.com/support)\n\n### LiteIDE Markdown\n* Markdown parser from [sundown](https://github.com/vmg/sundown)\n* Markdown CSS files from [Mou](http://mouapp.com)\n\n### Golang\n* [Golang Home](http://golang.org)\n* [Golang Source](http://code.google.com/p/go)\n\n### Golang Tools\n* Golang code compliter form [gocode](https://github.com/nsf/gocode)\n* Golang code format form [goimports](https://github.com/bradfitz/goimports) \n* Go Package Manager [gopm](https://github.com/gpmgo/gopm)\n\n### Golang Package Doc\n* [GoWalker](http://gowalker.org/)\n* [GoDoc](http://godoc.org)\n"
  },
  {
    "path": "liteidex/deploy/welcome/zh_CN/welcome.html",
    "content": "<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n  <title>LiteIDE</title>\n  <link rel=\"stylesheet\" href=\"../css/style.css\" type=\"text/css\" media=\"all\" charset=\"utf-8\"/>\n</head>\n\n<body>\n\t<div id=\"container\">\n\t\t<div id=\"topnav\">\t\n\t\t\t<h1 id=\"title\" align=\"center\"><img src=\"../images/liteide-logo128.png\" align =\"right\">欢迎使用 LiteIDE X</h1>\n<pre align=\"center\">版权所有 2011-2023, 作者 <a href=\"mailto:visualfc@gmail.com\">七叶 (visualfc)</a>, 版本 <a href=\"doc:/changes.md\">{liteide_version}</a></pre>\n\t\t</div>\t\t\n\t\t<div id=\"content\">\n\t\t<h3>快速链接</h3>\n<table border=\"0\">\n<tr>\n<td>\n\t\t\t<ul>\n\t\t\t<li><a href=\"doc:/readme.md\">欢迎使用LiteIDE</a></li>\n\t\t\t<li><a href=\"godoc:/doc/docs.html\">Go语言文档</a></li>\n\t\t\t</ul>\n</td>\n<td>\n\t\t\t<ul>\n\t\t\t<li><a href=\"doc:/guide.md\">LiteIDE 使用指南</a></li>\n\t\t\t<li><a href=\"goplay:/goplay\">Go Playground</a></li>\n\t\t\t</ul>\n</td>\n<td>\t\t\t\n\t\t\t<ul>\n\t\t\t<li><a href=\"http://visualfc.github.com/support\">支持LiteIDE</a></li>\n\t\t\t<li><a href=\"doc:/website.md\">链接网址</a></li>\n\t\t\t</ul>\n</td>\n</tr>\n</table>\t\n<h3>Session</h3>\t\t\n<table border=\"0\">\n<tr>\n<td>\n\t\t\t<ul>\n\t\t\t<li><a href=\"session:default\">加载默认会话</a></li>\n\t\t\t</ul>\n</td>\n</tr>\n</table>\t\n\t\t\t{recent_files}\n\t\t</div>\n\t</div>\n</body>\n</html>"
  },
  {
    "path": "liteidex/export_qrc.cmd",
    "content": "@echo off\n\nif defined %GOPATH (\n\tset GOPATH=%CD%;%GOPATH%\n) else (\n\tset GOPATH=%CD%\n)\n\ngo run src/tools/exportqrc/main.go -root .\n"
  },
  {
    "path": "liteidex/export_qrc.sh",
    "content": "#!/bin/sh\n\ngo run src/tools/exportqrc/main.go -root .\n"
  },
  {
    "path": "liteidex/install-icon.sh",
    "content": "#!/bin/bash\n\nSCRIPT=$(readlink -f $0)\nSCRIPTPATH=`dirname $SCRIPT`\n\n\necho \"\n[Desktop Entry]\nType=Application\nName=LiteIDE\nComment=IDE for editing and building projects written in the Go programming language\nExec=${SCRIPTPATH}/bin/liteide\nIcon=${SCRIPTPATH}/share/liteide/welcome/images/liteide128.xpm\nTerminal=false\nStartupNotify=false\nCategories=Development;\n\" > ./liteide.desktop\n\n# must run with current user instead of root\ncp ./liteide.desktop ~/Desktop/\nchmod u+x ~/Desktop/liteide.desktop\n\n#desktop-file-validate ./liteide.desktop\n#desktop-file-install ./liteide.desktop\n\n"
  },
  {
    "path": "liteidex/linux_deploy.sh",
    "content": "#!/bin/sh\n\ncp -v LICENSE.LGPL liteide\ncp -v LGPL_EXCEPTION.TXT liteide\ncp -v ../README.md liteide\nmkdir -p liteide/share/liteide/\ncp bin/gotools liteide/bin\ncp bin/gocode liteide/bin\ncp bin/gomodifytags liteide/bin\ncp -r -v deploy/* liteide/share/liteide/\ncp -r -v os_deploy/linux/* liteide/share/liteide/\n\n"
  },
  {
    "path": "liteidex/liteide.desktop",
    "content": "[Desktop Entry]\r\n#Encoding=UTF-8\r\nType=Application\r\nName=LiteIDE\r\nComment=IDE for editing and building projects written in the Go programming language\r\n#Exec=/... your liteide path .../liteide/bin/liteide\r\n#Icon=/... your liteide path .../liteide/share/liteide/welcome/images/liteide128.xpm\r\nExec=liteide\r\nIcon=liteide\r\nTerminal=false\r\nStartupNotify=false\r\nCategories=Development;\r\n\r\n# desktop-file-validate ./liteide.desktop\r\n# desktop-file-install ./liteide.desktop\r\n"
  },
  {
    "path": "liteidex/liteide_de.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.1\" language=\"de_DE\">\n<context>\n    <name>AboutDialog</name>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"20\"/>\n        <source>About LiteIDE</source>\n        <oldsource>About Liteide</oldsource>\n        <translation>Über LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"156\"/>\n        <source>Information</source>\n        <oldsource>Infomation</oldsource>\n        <translation>Informationen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"162\"/>\n        <source>Welcome:</source>\n        <translation>Willkommen:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"168\"/>\n        <source>Welcome to LiteIDE X! LiteIDE is a simple, open source, cross-platform IDE.</source>\n        <oldsource>Welcome to LiteIDE X!\nLiteIDE is a simple, open source, cross-platform IDE.</oldsource>\n        <translation>Willkommen in LiteIDE X!\nLiteIDE ist eine einfache, quelloffene, plattformunabhängige IDE.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"178\"/>\n        <source>Project:</source>\n        <translation>Projekt:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"208\"/>\n        <source>Name:</source>\n        <translation>Name:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"191\"/>\n        <source>Author:</source>\n        <translation>Autor:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"222\"/>\n        <source>Version:</source>\n        <translation>Version:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"242\"/>\n        <source>Build:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"215\"/>\n        <source>Based on Qt</source>\n        <oldsource>Based on Qt Version</oldsource>\n        <translation>Basierend auf Qt</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"249\"/>\n        <source>Source Code:</source>\n        <translation>Quelltext:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"263\"/>\n        <source>Support LiteIDE:</source>\n        <oldsource>Support</oldsource>\n        <translation>Unterstütze LiteIDE:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"297\"/>\n        <source>Developers</source>\n        <translation>Entwickler</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"400\"/>\n        <source>Translations</source>\n        <translation>Übersetzungen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"412\"/>\n        <source>Chinese</source>\n        <translation>Chinesisch</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"426\"/>\n        <source>Japanese</source>\n        <translation>Japanisch</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"440\"/>\n        <source>Russian</source>\n        <translation>Russisch</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"454\"/>\n        <source>French</source>\n        <translation>Französisch</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"468\"/>\n        <source>Traditional Chinese</source>\n        <translation>Traditionelles Chinesisch</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"482\"/>\n        <source>German</source>\n        <translation type=\"unfinished\">Deutsch</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"513\"/>\n        <source>Ukrainian</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"544\"/>\n        <source>Thanks to...</source>\n        <translation>Danke an...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"577\"/>\n        <source>License</source>\n        <translation>Lizenz</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"619\"/>\n        <source>Close</source>\n        <translation>Schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.cpp\" line=\"42\"/>\n        <source>Based on Qt %1 (%2 bit)</source>\n        <translation type=\"unfinished\">Basierend auf Qt %1 (%2 bit)</translation>\n    </message>\n</context>\n<context>\n    <name>ActionManager</name>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"65\"/>\n        <source>&amp;File</source>\n        <translatorcomment>On Linux and Windows the menu item is called &quot;Datei&quot;, but &quot;Ablage&quot; on Mac OS.</translatorcomment>\n        <translation>&amp;Datei</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"66\"/>\n        <source>&amp;Recent</source>\n        <translatorcomment>Note to the Developer: This shoud be a sub menu of &quot;File&quot; (&quot;Ablage&quot;)</translatorcomment>\n        <translation>&amp;Zuletzt verwendet</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"67\"/>\n        <source>&amp;Edit</source>\n        <translation>&amp;Bearbeiten</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"68\"/>\n        <source>F&amp;ind</source>\n        <oldsource>&amp;Find</oldsource>\n        <translation>&amp;Suchen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"69\"/>\n        <source>&amp;View</source>\n        <translation>&amp;Ansicht</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"74\"/>\n        <source>&amp;Tools</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"75\"/>\n        <source>&amp;Build</source>\n        <translation type=\"unfinished\">Ausführen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"76\"/>\n        <source>&amp;Debug</source>\n        <translation type=\"unfinished\">&amp;Debug</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"77\"/>\n        <source>&amp;Help</source>\n        <translation>&amp;Hilfe</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"79\"/>\n        <source>Standard Toolbar</source>\n        <oldsource>Standard ToolBar</oldsource>\n        <translation>Standardwerkzeugleiste</translation>\n    </message>\n</context>\n<context>\n    <name>AstWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangast/astwidget.cpp\" line=\"76\"/>\n        <source>Go To Definition</source>\n        <translation>Springe zu Definition</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/astwidget.cpp\" line=\"77\"/>\n        <source>View Import Document</source>\n        <translatorcomment>Not sure about that</translatorcomment>\n        <translation type=\"unfinished\">Import-Dokument ansehen</translation>\n    </message>\n</context>\n<context>\n    <name>BaseDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"77\"/>\n        <source>Hide</source>\n        <translation type=\"unfinished\">Ausblenden</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"78\"/>\n        <source>Hide Tool Window</source>\n        <translation type=\"unfinished\">Werkzeugfenster ausblenden</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"87\"/>\n        <source>Floating Window</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>BaseFolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"78\"/>\n        <source>Open In New Window</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"79\"/>\n        <source>Open File</source>\n        <translation type=\"unfinished\">Datei öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"80\"/>\n        <source>New File...</source>\n        <translation type=\"unfinished\">Neue Datei...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"81\"/>\n        <source>New File Wizard...</source>\n        <translation type=\"unfinished\">Neue Datei Assistent...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"82\"/>\n        <source>Rename File...</source>\n        <translation type=\"unfinished\">Datei umbenennen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"83\"/>\n        <source>Delete File</source>\n        <translation type=\"unfinished\">Datei löschen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"85\"/>\n        <source>New Folder...</source>\n        <translation type=\"unfinished\">Neuer Ordner...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"86\"/>\n        <source>Rename Folder...</source>\n        <translation type=\"unfinished\">Ordner umbenennen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"87\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"335\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"342\"/>\n        <source>Delete Folder</source>\n        <translation type=\"unfinished\">Ordner löschen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"100\"/>\n        <source>Open Terminal Here</source>\n        <translation type=\"unfinished\">Terminal hier öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"90\"/>\n        <source>Show in Explorer</source>\n        <oldsource>Open Explorer Here</oldsource>\n        <translation type=\"unfinished\">Im Dateimanager öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"77\"/>\n        <source>Open Application</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"92\"/>\n        <source>Show in Finder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"94\"/>\n        <source>Show Containing Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"98\"/>\n        <source>Open Command Prompt Here</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"102\"/>\n        <source>Open in Integrated Terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"104\"/>\n        <source>Open Folder...</source>\n        <oldsource>Add Folder...</oldsource>\n        <translation type=\"unfinished\">Ordner hinzufügen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"105\"/>\n        <source>Reload Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"106\"/>\n        <source>Close Folder</source>\n        <translation type=\"unfinished\">Ordner schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"108\"/>\n        <source>Close All Folders</source>\n        <translation type=\"unfinished\">Alle Ordner schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"110\"/>\n        <source>Copy</source>\n        <translation type=\"unfinished\">Kopieren</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"111\"/>\n        <source>Paste</source>\n        <translation type=\"unfinished\">Einfügen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"113\"/>\n        <source>Copy Path</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"115\"/>\n        <source>Move To Trash</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"198\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"208\"/>\n        <source>Create File</source>\n        <translation type=\"unfinished\">Datei erstellen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"199\"/>\n        <source>A file with that name already exists!</source>\n        <translation type=\"unfinished\">Eine Datei mit diesem Namen existiert bereits!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"209\"/>\n        <source>Failed to create the file!</source>\n        <translation type=\"unfinished\">Die Datei konnte nicht erstellt werden!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"239\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"245\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"250\"/>\n        <source>Rename File</source>\n        <translation type=\"unfinished\">Datei umbenennen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"239\"/>\n        <source>New Name:</source>\n        <translation type=\"unfinished\">Neuer Name:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"246\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"251\"/>\n        <source>Failed to rename the file!</source>\n        <translation type=\"unfinished\">Die Datei konnte nicht umbenannt werden!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"504\"/>\n        <source>An item &quot;%1&quot; already exists in this location. Do you want to replace it and move old item to trash?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"505\"/>\n        <source>Stop</source>\n        <translation type=\"unfinished\">Stop</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"506\"/>\n        <source>Keep Both</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"507\"/>\n        <source>Keep Both All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"508\"/>\n        <source>Replace</source>\n        <translation type=\"unfinished\">Ersetzen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"509\"/>\n        <source>Replace All</source>\n        <translation type=\"unfinished\">Alle ersetzen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"609\"/>\n        <source>Are you sure that you want move to trash this item?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"612\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"615\"/>\n        <source>Are you sure that you want move to trash %1 items?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"618\"/>\n        <source>Move to Trash</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"662\"/>\n        <source>Open With</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"669\"/>\n        <source>System Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"290\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"293\"/>\n        <source>Create Folder</source>\n        <translation type=\"unfinished\">Ordner erstellen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"291\"/>\n        <source>A folder with that name already exists!</source>\n        <translation type=\"unfinished\">Ein Ordner mit diesem Namen existiert bereits!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"294\"/>\n        <source>Failed to create the folder!</source>\n        <translation type=\"unfinished\">Der Ordner konnte nicht erstellt werden!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"307\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"316\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"321\"/>\n        <source>Rename Folder</source>\n        <translation type=\"unfinished\">Ordner umbenennen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"307\"/>\n        <source>Folder Name</source>\n        <translation type=\"unfinished\">Ordnername</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"317\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"322\"/>\n        <source>Failed to rename the folder!</source>\n        <translation type=\"unfinished\">Der Ordner konnte nicht umbenannt werden!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"336\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation type=\"unfinished\">Sind Sie sicher, dass Sie den ganzen Ordner und dessen Inhalt unwiderruflich löschen wollen?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"343\"/>\n        <source>Failed to delete the folder!</source>\n        <translation type=\"unfinished\">Der Ordner konnte nicht gelöscht werden!</translation>\n    </message>\n</context>\n<context>\n    <name>BookmarkManager</name>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"61\"/>\n        <source>Toggle Bookmark</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"96\"/>\n        <source>Goto bookmark</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"97\"/>\n        <source>Remove bookmark</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"98\"/>\n        <source>Remove all bookmarks for this file</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"99\"/>\n        <source>Remove all bookmarks for all files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"115\"/>\n        <source>Bookmarks</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>BookmarkRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"81\"/>\n        <source>Bookmarks</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>BuildConfigDialog</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"14\"/>\n        <source>Build Configuration</source>\n        <oldsource>Build Config Dialog</oldsource>\n        <translation type=\"unfinished\">Build Konfiguration</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"71\"/>\n        <source>Build ID</source>\n        <translation>Build ID</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"45\"/>\n        <source>Build Path</source>\n        <oldsource>Build File</oldsource>\n        <translation>Build Pfad</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"85\"/>\n        <source>GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"103\"/>\n        <source>GOPATH information</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"147\"/>\n        <source>Use Custom GOPATH for Build Path</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"159\"/>\n        <source>Inherit System GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"179\"/>\n        <source>Inherit LiteIDE GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"201\"/>\n        <source>Custom GOPATH (one per line)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"221\"/>\n        <source>Add Directory...</source>\n        <translation type=\"unfinished\">Ordner hinzufügen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"228\"/>\n        <source>Clear</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"244\"/>\n        <source>LiteIDE</source>\n        <translation>LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"266\"/>\n        <source>Config</source>\n        <translation type=\"unfinished\">Konfiguration</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"288\"/>\n        <source>Action</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"310\"/>\n        <source>Custom</source>\n        <oldsource>Build Custom</oldsource>\n        <translation type=\"unfinished\">Benutzerdefiniert</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"343\"/>\n        <source>Reset all to initial value</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"69\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"73\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"77\"/>\n        <source>Name</source>\n        <translation type=\"unfinished\">Name</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"70\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"74\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"78\"/>\n        <source>Value</source>\n        <translation type=\"unfinished\">Wert</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"79\"/>\n        <source>SharedValue</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"82\"/>\n        <source>Id</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"83\"/>\n        <source>Cmd</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"293\"/>\n        <source>Choose directory to add to GOPATH:</source>\n        <translation type=\"unfinished\">Verzeichnis zu GOPATH hinzufügen:</translation>\n    </message>\n</context>\n<context>\n    <name>CreateDirDialog</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"94\"/>\n        <source>Create Folder</source>\n        <translation type=\"unfinished\">Ordner erstellen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"96\"/>\n        <source>Directory:</source>\n        <translation type=\"unfinished\">Ordner:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"98\"/>\n        <source>Dir Name:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"106\"/>\n        <source>Create</source>\n        <translation type=\"unfinished\">Erstellen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"107\"/>\n        <source>Cancel</source>\n        <translation type=\"unfinished\">Abbrechen</translation>\n    </message>\n</context>\n<context>\n    <name>CreateFileDialog</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"44\"/>\n        <source>Create File</source>\n        <oldsource>Create File Dialog</oldsource>\n        <translation>Datei erstellen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"46\"/>\n        <source>Directory:</source>\n        <translation>Ordner:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"48\"/>\n        <source>File Name:</source>\n        <translation>Dateiname:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"56\"/>\n        <source>Create</source>\n        <translation>Erstellen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"57\"/>\n        <source>Create and Edit</source>\n        <translation>Erstellen und bearbeiten</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"58\"/>\n        <source>Cancel</source>\n        <translation>Abbrechen</translation>\n    </message>\n</context>\n<context>\n    <name>DebugWidget</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"122\"/>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"321\"/>\n        <source>Add Watch</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"221\"/>\n        <source>Async Record</source>\n        <oldsource>AsyncRecord</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"222\"/>\n        <source>Variables</source>\n        <translation>Variablen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"223\"/>\n        <source>Watch</source>\n        <translation>Überwachen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"224\"/>\n        <source>Call Stack</source>\n        <oldsource>CallStack</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"225\"/>\n        <source>Threads</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"226\"/>\n        <source>Goroutines</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"227\"/>\n        <source>Registers</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"228\"/>\n        <source>Libraries</source>\n        <oldsource>Library</oldsource>\n        <translation>Bibliotheken</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"229\"/>\n        <source>Console</source>\n        <translation>Konsole</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"321\"/>\n        <source>Watch expression (e.g. buf main.var os.Stdout):</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"124\"/>\n        <source>Remove Watch</source>\n        <translation>Überwachung entfernen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"125\"/>\n        <source>Remove All Watches</source>\n        <translation>Alle Überwachungen entfernen</translation>\n    </message>\n</context>\n<context>\n    <name>DlvDebuggerOption</name>\n    <message>\n        <location filename=\"src/plugins/dlvdebugger/dlvdebuggeroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/dlvdebugger/dlvdebuggeroption.ui\" line=\"20\"/>\n        <source>delve debug pass flags: (example --check-go-version=false)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>DocumentBrowser</name>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"67\"/>\n        <source>Back</source>\n        <oldsource>Backward</oldsource>\n        <translation>Zurück</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"68\"/>\n        <source>Forward</source>\n        <translation>Weiter</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"69\"/>\n        <source>Reload</source>\n        <translation>Neu laden</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"75\"/>\n        <source>Increase Font Size</source>\n        <translation>Schrift vergrößern</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"78\"/>\n        <source>Decrease Font Size</source>\n        <translation>Schrift verkleinern</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"81\"/>\n        <source>Reset Font Size</source>\n        <translation>Schriftgröße zurücksetzen</translation>\n    </message>\n</context>\n<context>\n    <name>DocumentBrowserFactory</name>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowserfactory.cpp\" line=\"67\"/>\n        <source>DocumentBrowser</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>EditorManager</name>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"139\"/>\n        <source>Close</source>\n        <translation>Schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"165\"/>\n        <source>Move to New Window</source>\n        <oldsource>Move To New Window</oldsource>\n        <translation>In neues Fenster verschieben</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"233\"/>\n        <source>Navigate Forward</source>\n        <oldsource>GoForward</oldsource>\n        <translation>Gehe weiter</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"141\"/>\n        <source>Close Others</source>\n        <oldsource>Close Others Tabs</oldsource>\n        <translation>Andere Tabs schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"111\"/>\n        <source>Open Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"142\"/>\n        <source>Close All</source>\n        <oldsource>Close All Tabs</oldsource>\n        <translation>Alle Tabs schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"143\"/>\n        <source>Close Left Tabs</source>\n        <translation>Tabs links schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"144\"/>\n        <source>Close Right Tabs</source>\n        <translation>Tabs rechts schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"145\"/>\n        <source>Close Files in Same Folder</source>\n        <oldsource>Close Same Folder Files</oldsource>\n        <translation>Dateien aus gleichem Ordner schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"146\"/>\n        <source>Close Files in Other Folders</source>\n        <oldsource>Close Other Folder Files</oldsource>\n        <translation>Dateien aus anderen Ordnern schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"147\"/>\n        <source>Copy Full Path to Clipboard</source>\n        <oldsource>Copy Path to Clipboard</oldsource>\n        <translation>Vollständigen Pfad in die Zwischenablage legen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"150\"/>\n        <source>Show in Explorer</source>\n        <translation>Im Dateimanager öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"152\"/>\n        <source>Show in Finder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"154\"/>\n        <source>Show Containing Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"158\"/>\n        <source>Open Command Prompt Here</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"160\"/>\n        <source>Open Terminal Here</source>\n        <translation type=\"unfinished\">Terminal hier öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"162\"/>\n        <source>Open in Integrated Terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"224\"/>\n        <source>Navigate Backward</source>\n        <translation>Gehe zurück</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"426\"/>\n        <source>Save changes to %1?</source>\n        <translation>Änderung an %1 speichern?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"427\"/>\n        <source>Unsaved Modifications</source>\n        <oldsource>Save Modify</oldsource>\n        <translation>Ungesicherte Änderungen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"524\"/>\n        <source>All Files (*)</source>\n        <translation>Alle Dateien (*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"526\"/>\n        <source>Save As</source>\n        <translation>Speichern unter</translation>\n    </message>\n</context>\n<context>\n    <name>EnvManager</name>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"436\"/>\n        <source>Environment Toolbar</source>\n        <oldsource>Environment ToolBar</oldsource>\n        <translation>Umgebungswerkzeugleiste</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"443\"/>\n        <source>Switching current environment</source>\n        <oldsource>Switch Current Environment</oldsource>\n        <translation type=\"unfinished\">Umgebung</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"446\"/>\n        <source>Edit current environment</source>\n        <oldsource>Edit Current Environment</oldsource>\n        <translation type=\"unfinished\">Umgebung bearbeiten</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"447\"/>\n        <source>Reload current environment</source>\n        <oldsource>Reload Current Environment</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"451\"/>\n        <source>Select Environment</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>ExportDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"14\"/>\n        <source>Dialog</source>\n        <translation type=\"unfinished\">Export-Dialog</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"22\"/>\n        <source>Name:</source>\n        <translation type=\"unfinished\">Name:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"49\"/>\n        <source>Export</source>\n        <translation>Exportieren</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"56\"/>\n        <source>ExportAndView</source>\n        <translation>Exportieren und anzeigen</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"194\"/>\n        <source>Use Vim-style Editing</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"196\"/>\n        <source>Read .vimrc</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"198\"/>\n        <source>Path to .vimrc</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal::FakeVimHandler</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"153\"/>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"161\"/>\n        <source>Unknown option: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"156\"/>\n        <source>Argument must be positive: %1=%2</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"949\"/>\n        <source>Mark &quot;%1&quot; not set.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3538\"/>\n        <source>%1%2%</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3540\"/>\n        <source>%1All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3554\"/>\n        <source>Not implemented in FakeVim.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5719\"/>\n        <source>Unknown option:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5730\"/>\n        <source>Invalid argument:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5733\"/>\n        <source>Trailing characters:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5816\"/>\n        <source>Move lines into themselves.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5860\"/>\n        <source>%n lines moved.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5920\"/>\n        <source>File &quot;%1&quot; exists (add ! to override)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5934\"/>\n        <source>Cannot open file &quot;%1&quot; for writing</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5940\"/>\n        <source>&quot;%1&quot; %2 %3L, %4C written.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5949\"/>\n        <source>Cannot open file &quot;%1&quot; for reading</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5978\"/>\n        <source>&quot;%1&quot; %2L, %3C</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6005\"/>\n        <source>%n lines filtered.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6093\"/>\n        <source>Cannot open file %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6259\"/>\n        <source>Invalid regular expression: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6295\"/>\n        <source>Pattern not found: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6299\"/>\n        <source>Search hit BOTTOM, continuing at TOP.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6300\"/>\n        <source>Search hit TOP, continuing at BOTTOM.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6305\"/>\n        <source>Search hit BOTTOM without match for: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6306\"/>\n        <source>Search hit TOP without match for: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6413\"/>\n        <source>%n lines indented.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6470\"/>\n        <source>%n lines %1ed %2 time.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7043\"/>\n        <source>%n lines yanked.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7748\"/>\n        <source>Already at oldest change.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7749\"/>\n        <source>Already at newest change.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal::FakeVimHandler::Private</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"2788\"/>\n        <source>Recursive mapping</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"4195\"/>\n        <source>Type Alt-V, Alt-V to quit FakeVim mode.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5941\"/>\n        <source> [New] </source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6166\"/>\n        <source>Not an editor command: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVimEdit</name>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimedit.cpp\" line=\"68\"/>\n        <source>Use FakeVim Editing</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVimEditOption</name>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"20\"/>\n        <source>FakeVim initialization command list (# start is comment):</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"28\"/>\n        <source>Load default init command list</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FiFoTty</name>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"86\"/>\n        <source>Cannot create temporary file: %1</source>\n        <translation>Temporäre Datei kann nicht erstellt werden: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"97\"/>\n        <source>Cannot create FiFo %1: %2</source>\n        <translation>FiFo kann nicht erstellt werden %1:%2</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"104\"/>\n        <source>Cannot open FiFo %1: %2</source>\n        <translation>FiFo kann nicht geöffnet werden %1:%2</translation>\n    </message>\n</context>\n<context>\n    <name>FileBrowser</name>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"98\"/>\n        <source>Synchronize with editor</source>\n        <translation>Mit Editor synchronisieren</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"103\"/>\n        <source>Show Hidden Files</source>\n        <translation>Versteckte Dateien anzeigen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"159\"/>\n        <source>Set As Root Folder</source>\n        <oldsource>Set Folder To Root</oldsource>\n        <translation type=\"unfinished\">Ordner als Root setzen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"119\"/>\n        <source>Execute File</source>\n        <translation>Datei ausführen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"101\"/>\n        <source>Reload Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"110\"/>\n        <source>Show Details</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"122\"/>\n        <source>Debug File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"160\"/>\n        <source>Open Folder in New Window</source>\n        <translation>Öffne Ordner in neuem Fenster</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"161\"/>\n        <source>Add to Folders</source>\n        <translation type=\"unfinished\">Zu Ordnern hinzufügen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"141\"/>\n        <source>Open Parent</source>\n        <oldsource>Open to Parent</oldsource>\n        <translation>Übergeordneten Ordner öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"169\"/>\n        <source>Filter</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"175\"/>\n        <source>File System</source>\n        <translation>Dateisystem</translation>\n    </message>\n</context>\n<context>\n    <name>FileBrowserOption</name>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"20\"/>\n        <source>Terminal</source>\n        <translation>Terminal</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"26\"/>\n        <source>Command:</source>\n        <translation>Kommando:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"36\"/>\n        <source>Arguments:</source>\n        <translation>Argumente:</translation>\n    </message>\n</context>\n<context>\n    <name>FileManager</name>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"189\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"211\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"233\"/>\n        <source>All Files (*)</source>\n        <translation>Alle Dateien (*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"397\"/>\n        <source>LiteIDE</source>\n        <translation>LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"398\"/>\n        <source>Project &apos;%1&apos; has been created.\nDo you want to open it now?</source>\n        <oldsource>Project &apos;%1&apos; is created.\nDo you want to load?</oldsource>\n        <translation>Projekt &apos;%1&apos; wurde erstellt.\nSoll es geöffnet werden?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"301\"/>\n        <source>Open Project or File</source>\n        <translation>Projekt oder Datei öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"76\"/>\n        <source>Show Hidden Files</source>\n        <translation>Versteckte Dateien anzeigen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"127\"/>\n        <source>Folders</source>\n        <oldsource>Folers</oldsource>\n        <translation>Ordner</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"186\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"208\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"230\"/>\n        <source>All Support Files (%1)</source>\n        <translation>Alle unterstützen Dateien (%1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"314\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"332\"/>\n        <source>Select a folder:</source>\n        <oldsource>Open Folder</oldsource>\n        <translation>Ordner auswählen:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"679\"/>\n        <source>%1\nThis file has been deleted from the drive,\nbut you have unsaved modifications in your LiteIDE editor.\n\nDo you want to close the editor?\nAnswering &quot;Yes&quot; will discard your unsaved changes.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"686\"/>\n        <source>%1\nThis file has been deleted from the drive.\n\nDo you want to close the editor?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"719\"/>\n        <source>%1\nThis file has been modified on the drive,\nbut you have unsaved modifications in your LiteIDE editor.\n\nDo you want to reload the file from disk?\nAnswering &quot;Yes&quot; will discard your unsaved changes.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"726\"/>\n        <source>%1\nThis file has been modified on the drive.\n\nDo you want to reload the file from disk?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"350\"/>\n        <source>Open Files</source>\n        <translation>Dateien öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"79\"/>\n        <source>Show Details</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"82\"/>\n        <source>Synchronize with editor</source>\n        <translation type=\"unfinished\">Mit Editor synchronisieren</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"85\"/>\n        <source>Split Mode</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"113\"/>\n        <source>Filter</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"363\"/>\n        <source>Open Project</source>\n        <translation>Projekt öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"683\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"688\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"723\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"728\"/>\n        <source>LiteIDE X</source>\n        <translation>LiteIDE X</translation>\n    </message>\n</context>\n<context>\n    <name>FileRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"135\"/>\n        <source>Files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FileSearch</name>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"217\"/>\n        <source>Match whole word</source>\n        <oldsource>Match word</oldsource>\n        <translation>Nur ganzes Wort</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"218\"/>\n        <source>Match case</source>\n        <translation>Groß-/Kleinschreibung</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"219\"/>\n        <source>Regular expression</source>\n        <translation>Regulärer Ausdruck</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"220\"/>\n        <source>Scan subdirectories</source>\n        <oldsource>Look in subdirs</oldsource>\n        <translation>Unterordner durchsuchen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"241\"/>\n        <source>Search for:</source>\n        <translation>Suche nach:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"243\"/>\n        <source>Options:</source>\n        <translation>Optionen:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"250\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>Durchsuchen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"273\"/>\n        <source>Filter:</source>\n        <translation>Filter:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"365\"/>\n        <source>Files on File System</source>\n        <translation>Dateien im Dateisystem</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"230\"/>\n        <source>Search</source>\n        <translation>Suche</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"231\"/>\n        <source>Cancel</source>\n        <translation>Abbrechen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"251\"/>\n        <source>Current Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"254\"/>\n        <source>Auto Switch</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"278\"/>\n        <source>Clear</source>\n        <translation>Leeren</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"480\"/>\n        <source>Open Directory</source>\n        <translation>Öffne Ordner</translation>\n    </message>\n</context>\n<context>\n    <name>FileSearchManager</name>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"50\"/>\n        <source>Search Item:</source>\n        <translation>Gegenstand:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"69\"/>\n        <source>Only golang file changes can be revert!</source>\n        <oldsource>This file change cannot be undone!</oldsource>\n        <translation type=\"unfinished\">Diese Dateiänderung kann nicht rückgängig gemacht werden!</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"83\"/>\n        <source>New Search</source>\n        <translation>Neue Suche</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"85\"/>\n        <source>File Search</source>\n        <translation type=\"unfinished\">Dateisuche</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"89\"/>\n        <source>Search Result</source>\n        <translation>Suchergebnis</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"248\"/>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"253\"/>\n        <source>LiteIDE X</source>\n        <translation type=\"unfinished\">LiteIDE X</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"248\"/>\n        <source>Warning! Replace text is empty.\nWant to remove all the search items?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"253\"/>\n        <source>Warning! Replace text is whitespace.\nWant to replace to all the search items to whitespace?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"280\"/>\n        <source>The following files have no write permissions. Do you want to change the permissions?</source>\n        <translation>Die folgenden Dateien haben keine Schreibrechte. Möchten Sie die Berechtigungen ändern?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"283\"/>\n        <source>File is readonly</source>\n        <translation>Datei ist nur lesbar</translation>\n    </message>\n</context>\n<context>\n    <name>FileSystemWidget</name>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"94\"/>\n        <source>Open File</source>\n        <oldsource>Open Editor</oldsource>\n        <translation>Datei öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"95\"/>\n        <source>New File...</source>\n        <oldsource>New File</oldsource>\n        <translation>Neue Datei...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"96\"/>\n        <source>New File Wizard...</source>\n        <oldsource>New File Wizard</oldsource>\n        <translation type=\"unfinished\">Neue Datei Assistent...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"320\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"326\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"331\"/>\n        <source>Rename File</source>\n        <translation>Datei umbenennen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"98\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"345\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"350\"/>\n        <source>Delete File</source>\n        <oldsource>Remove File</oldsource>\n        <translation>Datei löschen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"100\"/>\n        <source>New Folder...</source>\n        <oldsource>New Folder</oldsource>\n        <translation>Neuer Ordner...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"346\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Sind Sie sicher, dass Sie diese Datei unwiderruflich löschen wollen?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"386\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"395\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"400\"/>\n        <source>Rename Folder</source>\n        <translation>Ordner umbenennen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"102\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"414\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"421\"/>\n        <source>Delete Folder</source>\n        <oldsource>Remove Folder</oldsource>\n        <translation>Ordner löschen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"97\"/>\n        <source>Rename File...</source>\n        <translation>Datei umbenennen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"101\"/>\n        <source>Rename Folder...</source>\n        <translation>Ordner umbenennen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"104\"/>\n        <source>Open Terminal Here</source>\n        <translation>Terminal hier öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"105\"/>\n        <source>Open Explorer Here</source>\n        <translation>Dateimanager hier öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"107\"/>\n        <source>View Godoc Here</source>\n        <translation>Godoc hier anzeigen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"454\"/>\n        <source>Add Folder</source>\n        <translation>Ordner hinzufügen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"110\"/>\n        <source>Close Folder</source>\n        <translation>Ordner schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"109\"/>\n        <source>Add Folder...</source>\n        <translation>Ordner hinzufügen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"112\"/>\n        <source>Close All Folders</source>\n        <translation>Alle Ordner schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"279\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"289\"/>\n        <source>Create File</source>\n        <translation>Datei erstellen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"280\"/>\n        <source>A file with that name already exists!</source>\n        <oldsource>The file already exists!</oldsource>\n        <translation>Eine Datei mit diesem Namen existiert bereits!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"290\"/>\n        <source>Failed to create the file!</source>\n        <translation>Die Datei konnte nicht erstellt werden!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"320\"/>\n        <source>New Name:</source>\n        <translation>Neuer Name:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"327\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"332\"/>\n        <source>Failed to rename the file!</source>\n        <translation>Die Datei konnte nicht umbenannt werden!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"415\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Sind Sie sicher, dass Sie den ganzen Ordner und dessen Inhalt unwiderruflich löschen wollen?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"351\"/>\n        <source>Failed to delete the file!</source>\n        <oldsource>Failed to remove the file!</oldsource>\n        <translation>Die Datei konnte nicht gelöscht werden!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"369\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"372\"/>\n        <source>Create Folder</source>\n        <translation>Ordner erstellen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"370\"/>\n        <source>A folder with that name already exists!</source>\n        <oldsource>The folder name is exists!</oldsource>\n        <translation>Ein Ordner mit diesem Namen existiert bereits!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"373\"/>\n        <source>Failed to create the folder!</source>\n        <translation>Der Ordner konnte nicht erstellt werden!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"386\"/>\n        <source>Folder Name</source>\n        <translation>Ordnername</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"396\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"401\"/>\n        <source>Failed to rename the folder!</source>\n        <translation>Der Ordner konnte nicht umbenannt werden!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"422\"/>\n        <source>Failed to delete the folder!</source>\n        <oldsource>Failed to remove the folder!</oldsource>\n        <translation>Der Ordner konnte nicht gelöscht werden!</translation>\n    </message>\n</context>\n<context>\n    <name>Find::Internal::SearchResultWidget</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"132\"/>\n        <source>Search was canceled.</source>\n        <translation>Die Suche wurde abgebrochen.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"163\"/>\n        <source>Cancel</source>\n        <translation>Abbrechen</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"167\"/>\n        <source>Repeat the search with same parameters</source>\n        <translation>Suche mit gleichen Parametern wiederholen</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"168\"/>\n        <source>Search again</source>\n        <translation type=\"unfinished\">Erneut suchen</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"174\"/>\n        <source>Set show replace mode ui</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"175\"/>\n        <source>Show Replace</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"180\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"441\"/>\n        <source>Replace with:</source>\n        <translation>Ersetzen mit:</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"186\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"442\"/>\n        <source>Replace all occurrences</source>\n        <translation>Alle Vorkommen ersetzen</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"187\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"443\"/>\n        <source>Replace</source>\n        <translation>Ersetzen</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"191\"/>\n        <source>Preserve case</source>\n        <translation>Groß-/Kleinschreibung beibehalten</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"204\"/>\n        <source>Expand all items</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"209\"/>\n        <source>Collapse all items</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"318\"/>\n        <source>Revert with:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"319\"/>\n        <source>Revert</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"320\"/>\n        <source>Revert all occurrences</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"592\"/>\n        <source>%n matches replaced.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"594\"/>\n        <source>searching... %n matches found.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"600\"/>\n        <source>searching ...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"606\"/>\n        <source>No matches found.</source>\n        <translation>Keine Treffer.</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"608\"/>\n        <source>%n matches found.</source>\n        <translation>\n            <numerusform>%n Treffer.</numerusform>\n            <numerusform>%n Treffer.</numerusform>\n        </translation>\n    </message>\n</context>\n<context>\n    <name>FindApiEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.h\" line=\"73\"/>\n        <source>Search</source>\n        <translation>Suche</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.h\" line=\"74\"/>\n        <source>Stop Search</source>\n        <translation type=\"unfinished\">Suche abbrechen</translation>\n    </message>\n</context>\n<context>\n    <name>FindApiWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"284\"/>\n        <source>Search</source>\n        <translation>Suche</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"305\"/>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"337\"/>\n        <source>Find</source>\n        <translation type=\"unfinished\">Suchen</translation>\n    </message>\n</context>\n<context>\n    <name>FindDocWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"96\"/>\n        <source>Search</source>\n        <translation type=\"unfinished\">Suche</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"104\"/>\n        <source>Find</source>\n        <translation type=\"unfinished\">Suchen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"123\"/>\n        <source>Find All</source>\n        <translation type=\"unfinished\">Alle suchen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"124\"/>\n        <source>Find const</source>\n        <translation type=\"unfinished\">Suche const</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"126\"/>\n        <source>Find func</source>\n        <translation type=\"unfinished\">Suche func</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"128\"/>\n        <source>Find interface</source>\n        <translation type=\"unfinished\">Suche interface</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"130\"/>\n        <source>Find pkg</source>\n        <translation type=\"unfinished\">Suche pkg</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"132\"/>\n        <source>Find struct</source>\n        <translation type=\"unfinished\">Suche struct</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"134\"/>\n        <source>Find type</source>\n        <translation type=\"unfinished\">Suche type</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"136\"/>\n        <source>Find var</source>\n        <translation type=\"unfinished\">Suche var</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"138\"/>\n        <source>Use Regexp</source>\n        <translation type=\"unfinished\">Benutze regulären Ausdruck</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"140\"/>\n        <source>Match Case</source>\n        <translation type=\"unfinished\">Groß-/Kleinschreibung beachten</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"142\"/>\n        <source>Match Word</source>\n        <translation type=\"unfinished\">Nur ganzes Wort</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"169\"/>\n        <source>Help</source>\n        <translation type=\"unfinished\">Hilfe</translation>\n    </message>\n</context>\n<context>\n    <name>FindEditor</name>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"63\"/>\n        <source>Match case</source>\n        <translation>Groß-/Kleinschreibung</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"64\"/>\n        <source>Regular expression</source>\n        <translation>Regulärer Ausdruck</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"65\"/>\n        <source>Wrap around</source>\n        <translation>Am Dateiende von vorn beginnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"56\"/>\n        <source>Find Next</source>\n        <translation>Weitersuchen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"57\"/>\n        <source>Find Previous</source>\n        <oldsource>Find Prev</oldsource>\n        <translation type=\"unfinished\">Vorheriges</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"58\"/>\n        <source>Replace With:</source>\n        <translation>Ersetzen mit:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"59\"/>\n        <source>Replace</source>\n        <translation>Ersetzen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"60\"/>\n        <source>Replace All</source>\n        <translation>Alle ersetzen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"62\"/>\n        <source>Match whole word only</source>\n        <translation type=\"unfinished\">Nur ganzes Wort</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"72\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"250\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"472\"/>\n        <source>Ready</source>\n        <translation>Bereit</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"81\"/>\n        <source>Close</source>\n        <translation>Schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"84\"/>\n        <source>Show Replace</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"103\"/>\n        <source>Find What:</source>\n        <translation type=\"unfinished\">Suche nach:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"115\"/>\n        <source>Options:</source>\n        <oldsource>Find Option:</oldsource>\n        <translation>Optionen:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"221\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"393\"/>\n        <source>Not found</source>\n        <translation type=\"unfinished\">Nicht gefunden</translation>\n    </message>\n</context>\n<context>\n    <name>FolderListView</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"252\"/>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"262\"/>\n        <source>Delete File</source>\n        <translation type=\"unfinished\">Datei löschen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"253\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation type=\"unfinished\">Sind Sie sicher, dass Sie diese Datei unwiderruflich löschen wollen?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"263\"/>\n        <source>Failed to delete the file!</source>\n        <translation type=\"unfinished\">Die Datei konnte nicht gelöscht werden!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"275\"/>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"285\"/>\n        <source>Delete Folder</source>\n        <translation type=\"unfinished\">Ordner löschen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"276\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation type=\"unfinished\">Sind Sie sicher, dass Sie den ganzen Ordner und dessen Inhalt unwiderruflich löschen wollen?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"286\"/>\n        <source>Failed to delete the folder!</source>\n        <translation type=\"unfinished\">Der Ordner konnte nicht gelöscht werden!</translation>\n    </message>\n</context>\n<context>\n    <name>FolderRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"166\"/>\n        <source>Folders</source>\n        <translation type=\"unfinished\">Ordner</translation>\n    </message>\n</context>\n<context>\n    <name>FolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"173\"/>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"183\"/>\n        <source>Delete File</source>\n        <translation type=\"unfinished\">Datei löschen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"174\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation type=\"unfinished\">Sind Sie sicher, dass Sie diese Datei unwiderruflich löschen wollen?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"184\"/>\n        <source>Failed to delete the file!</source>\n        <translation type=\"unfinished\">Die Datei konnte nicht gelöscht werden!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"230\"/>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"240\"/>\n        <source>Delete Folder</source>\n        <translation type=\"unfinished\">Ordner löschen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"231\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation type=\"unfinished\">Sind Sie sicher, dass Sie den ganzen Ordner und dessen Inhalt unwiderruflich löschen wollen?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"241\"/>\n        <source>Failed to delete the folder!</source>\n        <translation type=\"unfinished\">Der Ordner konnte nicht gelöscht werden!</translation>\n    </message>\n</context>\n<context>\n    <name>GdbDebuggerOption</name>\n    <message>\n        <location filename=\"src/plugins/gdbdebugger/gdbdebuggeroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/gdbdebugger/gdbdebuggeroption.ui\" line=\"20\"/>\n        <source>Enable --tty for program being debugged.</source>\n        <translation type=\"unfinished\">Aktiviere --tty für das untersuchte Programm.</translation>\n    </message>\n</context>\n<context>\n    <name>GoAddTagsDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"14\"/>\n        <source>Add Tags To Struct Field</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"23\"/>\n        <source>Add JSON Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"54\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"105\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"169\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"197\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"281\"/>\n        <source>Options</source>\n        <translation type=\"unfinished\">Optionen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"61\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"112\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"176\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"204\"/>\n        <source>Multiple options separated by commas</source>\n        <oldsource>Multiple options are separated by commas</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"74\"/>\n        <source>Add XML Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"125\"/>\n        <source>Add Custom Tags</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"155\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"187\"/>\n        <source>Tag Name</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"162\"/>\n        <source>Setup custom tag name</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"299\"/>\n        <source>Sort sorts the tags in increasing order according to the key name</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"306\"/>\n        <source>Override current tags when adding tags</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"316\"/>\n        <source>Info</source>\n        <translation type=\"unfinished\">Info</translation>\n    </message>\n</context>\n<context>\n    <name>GoRemoveTagsDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"14\"/>\n        <source>Remove Tags From Struct Field</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"23\"/>\n        <source>Remove Tags And Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"29\"/>\n        <source>Clear All Tags</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"39\"/>\n        <source>Clear All Tags Options</source>\n        <oldsource>Clear All Tag Options</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"46\"/>\n        <source>Remove JSON Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"53\"/>\n        <source>Remove XML Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"60\"/>\n        <source>Remove Custom Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"70\"/>\n        <source>Multiple tags separated by commas</source>\n        <oldsource>Multiple tags  are separated by commas</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"77\"/>\n        <source>Remove JSON Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"84\"/>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"98\"/>\n        <source>Multiple options separated by commas</source>\n        <oldsource>Multiple options are separated by commas</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"91\"/>\n        <source>Remove XML Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"111\"/>\n        <source>Remove Custom Tag Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"118\"/>\n        <source>Setup remove custom tag and option, example tag=opt1,tag=opt2</source>\n        <oldsource>Setup remove custom tag option, example tag=opt1,tag=opt2</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"121\"/>\n        <source>tag=option</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"131\"/>\n        <source>Info</source>\n        <translation type=\"unfinished\">Info</translation>\n    </message>\n</context>\n<context>\n    <name>GolangAst</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"60\"/>\n        <source>No outline available</source>\n        <translation>Keine Übersicht verfügbar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"74\"/>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"77\"/>\n        <source>Synchronize with editor</source>\n        <translation type=\"unfinished\">Mit Editor synchronisieren</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"80\"/>\n        <source>Go Class View</source>\n        <oldsource>Class View</oldsource>\n        <translation type=\"unfinished\">Klassen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"81\"/>\n        <source>Go Outline</source>\n        <oldsource>Outline</oldsource>\n        <translation type=\"unfinished\">Übersicht</translation>\n    </message>\n</context>\n<context>\n    <name>GolangAstOption</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"20\"/>\n        <source>QuickOpenSymbol</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"26\"/>\n        <source>Show import path</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"33\"/>\n        <source>Match case sensitive</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangCodeOption</name>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"20\"/>\n        <source>PKG automitic import prompt</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"26\"/>\n        <source>PKG automatic import hints for all packages (GOPATH)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"33\"/>\n        <source>PKG automatic import hints for standard package</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"43\"/>\n        <source>Gocode</source>\n        <oldsource>Go API</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"56\"/>\n        <source>Auto update depends package when it&apos;s source changed.</source>\n        <oldsource>Auto update depends package when its source is changed.</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"49\"/>\n        <source>Close gocode when exiting</source>\n        <translation type=\"unfinished\">Gocode beim Verlassen beenden</translation>\n    </message>\n</context>\n<context>\n    <name>GolangDoc</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"100\"/>\n        <source>Godoc Search</source>\n        <translation type=\"unfinished\">Godoc Suche</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"92\"/>\n        <source>Go Doc Search</source>\n        <oldsource>Golang Doc Search</oldsource>\n        <translation type=\"unfinished\">Golang Doc Suche</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"96\"/>\n        <source>Go Api Index</source>\n        <oldsource>Golang Api Index</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"111\"/>\n        <source>Find Package:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangDocOption</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"20\"/>\n        <source>Go API</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"26\"/>\n        <source>Use default context (fast)</source>\n        <translation type=\"unfinished\">Standardkontext benutzen (schnell)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"33\"/>\n        <source>Only load standard API documentation</source>\n        <oldsource>Only load standard api</oldsource>\n        <translation type=\"unfinished\">Nur Standard-Api-Dokumentation laden</translation>\n    </message>\n</context>\n<context>\n    <name>GolangEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"90\"/>\n        <source>View import package use godoc</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"93\"/>\n        <source>View Expression Information</source>\n        <translation type=\"unfinished\">Zeige Ausdrucks-Information</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"96\"/>\n        <source>Jump to Declaration</source>\n        <translation>Zur Deklaration springen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"99\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"105\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"108\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"111\"/>\n        <source>Find Usages</source>\n        <translation type=\"unfinished\">Nutzungen suchen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"102\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"114\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"117\"/>\n        <source>Rename Symbol Under Cursor</source>\n        <translation type=\"unfinished\">Symbol unter Cursor umbenennen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"111\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"114\"/>\n        <source>%1 (Module/GOPATH) with GOROOT</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"170\"/>\n        <source>Stop</source>\n        <translation type=\"unfinished\">Stop</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"175\"/>\n        <source>Go Source Query</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"180\"/>\n        <source>SourceQuery What</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"184\"/>\n        <source>Callees</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"188\"/>\n        <source>Callers</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"192\"/>\n        <source>Callstack</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"196\"/>\n        <source>Definition</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"200\"/>\n        <source>Describe</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"204\"/>\n        <source>Freevars</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"208\"/>\n        <source>Implements</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"212\"/>\n        <source>Implements(GOPATH)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"216\"/>\n        <source>Peers</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"220\"/>\n        <source>Referrers</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"224\"/>\n        <source>Pointsto</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"228\"/>\n        <source>Whicherrs</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"232\"/>\n        <source>Add Tags To Struct Field</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"236\"/>\n        <source>Remove Tags From Struct Field</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"354\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"391\"/>\n        <source>Refactor</source>\n        <translation type=\"unfinished\">Refaktor</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"361\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"399\"/>\n        <source>SourceQuery</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"812\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"993\"/>\n        <source>Below files in package %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangEditOption</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"20\"/>\n        <source>Mouse</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"26\"/>\n        <source>Go root source file editor setup read only</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"33\"/>\n        <source>Enable view expression infomation on mouse</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"40\"/>\n        <source>Enable mouse navigation</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangFileSearch</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangfilesearch.cpp\" line=\"59\"/>\n        <source>Golang Find Usages</source>\n        <translation type=\"unfinished\">Golang Nutzungen suchen</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFmtOption</name>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"20\"/>\n        <source>Format Options</source>\n        <oldsource>Golang Format</oldsource>\n        <translation type=\"unfinished\">Format-Optionen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"26\"/>\n        <source>Goimports updates your Go import lines, adding missing ones and removing unreferenced ones.</source>\n        <translation type=\"unfinished\">Goimports aktualisiert die Go-import-Zeilen, fügt fehlende hinzu und entfernt unbenutzte.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"29\"/>\n        <source>Enable update imports line, adding missing ones and removing unreferenced ones.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"46\"/>\n        <source>Synchronous</source>\n        <translation type=\"unfinished\">Fortlaufende Formatierung</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"52\"/>\n        <source>Synchronous code formatting</source>\n        <oldsource> Synchronous code formatting</oldsource>\n        <translation type=\"unfinished\">Fortlaufende Code-Formatierung benutzen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"61\"/>\n        <source>Synchronous code formatting timeout in milliseconds (500ms or more):</source>\n        <translation type=\"unfinished\">Timeout für die fortlaufende Formatierung in Millisekunden (&gt;= 500ms):</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"36\"/>\n        <source>Automatically format code when saving</source>\n        <oldsource>When the editor is saved automatically gofmt</oldsource>\n        <translation type=\"unfinished\">Code beim Speichern automatisch formatieren</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFmtPlugin</name>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"58\"/>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"66\"/>\n        <source>Format Code</source>\n        <oldsource>Format Code (goimports)</oldsource>\n        <translation type=\"unfinished\">Code formatieren</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"59\"/>\n        <source>Format Code (Adjusts Imports)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangPackageOption</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.cpp\" line=\"304\"/>\n        <source>Choose directory to add to GOPATH:</source>\n        <translation type=\"unfinished\">Verzeichnis zu GOPATH hinzufügen:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"14\"/>\n        <source>Manage GOPATH / Modules</source>\n        <translation type=\"unfinished\">GOPATH verwalten</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"35\"/>\n        <source>Go Modules</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"78\"/>\n        <source>Custom GONOPROXY</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"88\"/>\n        <source>Custom GOPROXY</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"95\"/>\n        <source>Custom GO111MODULE</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"102\"/>\n        <source>Custom GONOSUMDB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"109\"/>\n        <source>Custom GOPRIVATE</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"125\"/>\n        <source>TextLabel</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"137\"/>\n        <source>GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"163\"/>\n        <source>Use System GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"186\"/>\n        <source>Reload</source>\n        <translation type=\"unfinished\">Neu laden</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"210\"/>\n        <source>Use Custom GOPATH (one per line)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"233\"/>\n        <source>Add Directory...</source>\n        <translation type=\"unfinished\">Ordner hinzufügen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"240\"/>\n        <source>Clear</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangPresentEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"64\"/>\n        <source>Section (s1)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"67\"/>\n        <source>Subsection (s2)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"70\"/>\n        <source>Sub-subsection (s3)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"73\"/>\n        <source>Bold</source>\n        <translation type=\"unfinished\">Fett</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"76\"/>\n        <source>Italic</source>\n        <translation type=\"unfinished\">Kursiv</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"79\"/>\n        <source>Inline Code</source>\n        <translation type=\"unfinished\">Eingebetteter Code</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"82\"/>\n        <source>Switch Bullets</source>\n        <translation type=\"unfinished\">Bullets umschalten</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"85\"/>\n        <source>Comment/Uncomment Selection</source>\n        <translation type=\"unfinished\">Auswahl kommentieren/auskommentieren</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"88\"/>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"267\"/>\n        <source>Export HTML</source>\n        <translation type=\"unfinished\">Exportiere HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"91\"/>\n        <source>Verify Present</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"256\"/>\n        <source>Present verify success</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"258\"/>\n        <source>Present verify false</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"310\"/>\n        <source>Export PDF</source>\n        <translation type=\"unfinished\">Exportiere PDF</translation>\n    </message>\n</context>\n<context>\n    <name>GolangSymbol</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangsymbol.cpp\" line=\"62\"/>\n        <source>Quick Open Symbol by Name</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GoplayBrowser</name>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"70\"/>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"132\"/>\n        <source>Go Playground</source>\n        <translation>Go Spielwiese</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"72\"/>\n        <source>Run</source>\n        <translation type=\"unfinished\">Ausführen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"73\"/>\n        <source>Stop</source>\n        <translation type=\"unfinished\">Stop</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"74\"/>\n        <source>New</source>\n        <translation type=\"unfinished\">Neu</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"75\"/>\n        <source>Load...</source>\n        <translation type=\"unfinished\">Laden...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"76\"/>\n        <source>Save...</source>\n        <translation type=\"unfinished\">Speichern...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"77\"/>\n        <source>Explore Folder</source>\n        <translation type=\"unfinished\">Ordner untersuchen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"175\"/>\n        <source>Running...</source>\n        <oldsource>Running...\n\n</oldsource>\n        <translation type=\"unfinished\">Führe aus...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"195\"/>\n        <source>Error: %1.</source>\n        <oldsource>\nError: %1.</oldsource>\n        <translation type=\"unfinished\">Fehler: %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"197\"/>\n        <source>Success: %2.</source>\n        <oldsource>\nSuccess: %2.</oldsource>\n        <translation type=\"unfinished\">Erfolg: %2.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"247\"/>\n        <source>Load File</source>\n        <translation type=\"unfinished\">Datei laden</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"247\"/>\n        <source>Select a file to load:</source>\n        <translation type=\"unfinished\">Datei auswählen:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"263\"/>\n        <source>Save File</source>\n        <translation type=\"unfinished\">Datei speichern</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"263\"/>\n        <source>New File Name:</source>\n        <translation type=\"unfinished\">Neuer Dateiname:</translation>\n    </message>\n</context>\n<context>\n    <name>HtmlPreview</name>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"71\"/>\n        <source>Page Style</source>\n        <translation type=\"unfinished\">Seitenstil</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"76\"/>\n        <source>Reload</source>\n        <translation>Neu laden</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"77\"/>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"381\"/>\n        <source>Export Html</source>\n        <translation type=\"unfinished\">Exportiere HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"78\"/>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"413\"/>\n        <source>Export PDF</source>\n        <translation type=\"unfinished\">Exportiere PDF</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"79\"/>\n        <source>Print Preview</source>\n        <translation type=\"unfinished\">Druckvorschau</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"82\"/>\n        <source>Synchronize preview and code scrollbars</source>\n        <translation type=\"unfinished\">Scrollbalken von Code und Vorschau synchronisieren</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"88\"/>\n        <source>Config</source>\n        <translation type=\"unfinished\">Konfiguration</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"168\"/>\n        <source>Plain HTML</source>\n        <translation type=\"unfinished\">Flaches HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"389\"/>\n        <source>Export Failed</source>\n        <translation type=\"unfinished\">Export fehlgeschlagen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"85\"/>\n        <source>Automatically display preview</source>\n        <oldsource>Automatically Display Preview</oldsource>\n        <translation type=\"unfinished\">Vorschau automatisch anzeigen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"99\"/>\n        <source>HTML Preview</source>\n        <oldsource>Html Preview</oldsource>\n        <translation type=\"unfinished\">HTML-Vorschau</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"390\"/>\n        <source>Could not open %1 for writing!</source>\n        <oldsource>Can not write file %1</oldsource>\n        <translation type=\"unfinished\">Kann Datei %1 nicht schreiben!</translation>\n    </message>\n</context>\n<context>\n    <name>ImageEditor</name>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"52\"/>\n        <source>ZoomIn</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"55\"/>\n        <source>ZoomOut</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"58\"/>\n        <source>Reset to original size</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"61\"/>\n        <source>Fit to view</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"64\"/>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"247\"/>\n        <source>Play movie</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"68\"/>\n        <source>Prev frame</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"72\"/>\n        <source>Next frame</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"244\"/>\n        <source>Pause movie</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>ImageEditorFactory</name>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditorfactory.cpp\" line=\"122\"/>\n        <source>Image Viewer</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>ImportPkgTip</name>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcode.cpp\" line=\"847\"/>\n        <source>warning, pkg not find, please enter to import :</source>\n        <translation type=\"unfinished\">Achtung: Pkg nicht gefunden, bitte eingeben:</translation>\n    </message>\n</context>\n<context>\n    <name>JsonEdit</name>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"51\"/>\n        <source>Verify</source>\n        <translation type=\"unfinished\">Prüfen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"53\"/>\n        <source>Format Json</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"55\"/>\n        <source>Compact Json</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteApp</name>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"284\"/>\n        <source>Event Log</source>\n        <translation type=\"unfinished\">Ereignisanzeige</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"271\"/>\n        <source>Escape</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"756\"/>\n        <source>Close File</source>\n        <translation type=\"unfinished\">Datei schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"759\"/>\n        <source>Close All Files</source>\n        <translation type=\"unfinished\">Alle Dateien schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"769\"/>\n        <source>Save File</source>\n        <translation type=\"unfinished\">Datei speichern</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"772\"/>\n        <source>Save File As...</source>\n        <translation type=\"unfinished\">Datei speichern unter...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"775\"/>\n        <source>Save All Files</source>\n        <translation type=\"unfinished\">Alle Dateien speichern</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"762\"/>\n        <source>Open Project</source>\n        <translation>Projekt öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"287\"/>\n        <source>Options</source>\n        <translation type=\"unfinished\">Optionen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"733\"/>\n        <source>New...</source>\n        <translation type=\"unfinished\">Neu...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"736\"/>\n        <source>Open File...</source>\n        <translation type=\"unfinished\">Datei öffnen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"739\"/>\n        <source>Open Folder...</source>\n        <translation type=\"unfinished\">Ordner öffnen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"742\"/>\n        <source>Open Folder in New Window...</source>\n        <translation type=\"unfinished\">Ordner in neuem Fenster öffnen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"747\"/>\n        <source>Close All Folders</source>\n        <oldsource>Add Folder...</oldsource>\n        <translation type=\"unfinished\">Ordner hinzufügen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"750\"/>\n        <source>New Window</source>\n        <translation type=\"unfinished\">Neues Fenster</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"753\"/>\n        <source>Close Window</source>\n        <translation type=\"unfinished\">Fenster schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"764\"/>\n        <source>Save Project</source>\n        <translation>Projekt speichern</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"766\"/>\n        <source>Close Project</source>\n        <translation type=\"unfinished\">Projekt schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"778\"/>\n        <source>Exit</source>\n        <translation>Beenden</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"784\"/>\n        <source>Full Screen</source>\n        <translation>Vollbild</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"788\"/>\n        <source>About LiteIDE</source>\n        <translation type=\"unfinished\">Über LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"794\"/>\n        <source>About Plugins</source>\n        <translation type=\"unfinished\">Über Plugins</translation>\n    </message>\n</context>\n<context>\n    <name>LiteAppOption</name>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"30\"/>\n        <source>Store [*]</source>\n        <oldsource>Store</oldsource>\n        <translation type=\"unfinished\">Speicherort</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"57\"/>\n        <source>Language:</source>\n        <translation>Sprache:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"144\"/>\n        <source>Icon [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"300\"/>\n        <source>Reload files in session</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"312\"/>\n        <source>Recent Files</source>\n        <oldsource>Recent File</oldsource>\n        <translation type=\"unfinished\">Zuletzt verwendete Dateien</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"318\"/>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"357\"/>\n        <source>Max Count:</source>\n        <oldsource>Max Recent:</oldsource>\n        <translation>Maximale Anzahl:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"229\"/>\n        <source>Monitoring files for modifications</source>\n        <translation type=\"unfinished\">Überwache Dateiveränderungen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"41\"/>\n        <source>Store settings to local ini file</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"51\"/>\n        <source>Interface [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"74\"/>\n        <source>Style:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"84\"/>\n        <source>Use tool window shortcuts</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"112\"/>\n        <source>Theme [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"153\"/>\n        <source>Fallback build-in icon library and liteapp/qrc/default</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"156\"/>\n        <source>Load the external file icon library</source>\n        <oldsource>Load custome icon from liteapp/qrc folder</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"184\"/>\n        <source>Automatically save documents</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"190\"/>\n        <source>Automatically save documents when application is idle</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"200\"/>\n        <source>sec</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"235\"/>\n        <source>Auto reload or close editor buffer,if underlying file is modified/deleted.</source>\n        <oldsource>Auto reload editor buffer from disk file,if underlying file is modified/deleted.</oldsource>\n        <translation type=\"unfinished\">Automatisches Neuladen oder Schließen des Editor-Fensters,\nwenn die darunter liegende Datei verändert oder gelöscht wurde.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"263\"/>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"269\"/>\n        <source>Session</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"325\"/>\n        <source>0-99</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"351\"/>\n        <source>Editor Tabs</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"364\"/>\n        <source>10-999</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"407\"/>\n        <source>Display</source>\n        <translation type=\"unfinished\">Anzeige</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"413\"/>\n        <source>Display [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"419\"/>\n        <source>Show splash screen on startup</source>\n        <translation type=\"unfinished\">Splash-Screen beim Start zeigen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"426\"/>\n        <source>Show welcome page on startup</source>\n        <translation type=\"unfinished\">Willkommen-Seite beim Start zeigen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"509\"/>\n        <source>Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"515\"/>\n        <source>Editor tab [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"521\"/>\n        <source>Show close buttons on each editor tab</source>\n        <translation type=\"unfinished\">&quot;Schließen&quot;-Knopf bei jedem Editor-Tab anzeigen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"528\"/>\n        <source>Enable mouse wheel navigation on tabs</source>\n        <oldsource>Enable mouse wheel selected on tab</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"436\"/>\n        <source>Toolbar Icon Size [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"538\"/>\n        <source>Editor navigate</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"544\"/>\n        <source>Enable mouse extra &apos;Back&apos; button and &apos;Forward&apos; button for go back and forward</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"568\"/>\n        <source>Keyboard</source>\n        <translation>Tastatur</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"574\"/>\n        <source>Format: {Ctrl+B},{Ctrl+Shift+B},{Ctrl+K,Ctrl+U},{Ctrl+Shift+Z;Ctrl+Y}</source>\n        <translation>Formatierung: {Ctrl+B},{Ctrl+Shift+B},{Ctrl+K,Ctrl+U},{Ctrl+Shift+Z;Ctrl+Y}</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"586\"/>\n        <source>Hide standard commands</source>\n        <translation type=\"unfinished\">Standard-Kommandos verbergen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"593\"/>\n        <source>Reset</source>\n        <translation>Zurücksetzen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"600\"/>\n        <source>Reset All</source>\n        <translation type=\"unfinished\">Alles zurücksetzen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"620\"/>\n        <source>Import...</source>\n        <translation type=\"unfinished\">Importieren...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"627\"/>\n        <source>Export...</source>\n        <translation type=\"unfinished\">Exportieren...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"24\"/>\n        <source>Generic</source>\n        <translation>Generisch</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"118\"/>\n        <source>Theme:</source>\n        <translation type=\"unfinished\">Theme:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"275\"/>\n        <source>Reload session on startup</source>\n        <oldsource>Auto load last session</oldsource>\n        <translation type=\"unfinished\">Automatisch letzte Session laden</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"97\"/>\n        <source>SideBarStyle</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"98\"/>\n        <source>SplitterStyle</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"82\"/>\n        <source>Command</source>\n        <translation>Kommando</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"83\"/>\n        <source>Label</source>\n        <translation>Label</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"84\"/>\n        <source>Shortcuts</source>\n        <translation>Shortcuts</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"85\"/>\n        <source>NativeText</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"86\"/>\n        <source>Standard</source>\n        <translation>Standard</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"506\"/>\n        <source>Import Keyboard Mapping Scheme</source>\n        <translation type=\"unfinished\">Tastaturbelegungsschema importieren</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"506\"/>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"540\"/>\n        <source>Keyboard Mapping Scheme (%1)</source>\n        <translation type=\"unfinished\">Tastaturbelegungsschema (%1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"513\"/>\n        <source>Could not read scheme from %1!</source>\n        <translation type=\"unfinished\">Schema (%1) kann nicht gelesen werden!</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"540\"/>\n        <source>Export Keyboard Mapping Scheme</source>\n        <translation type=\"unfinished\">Tastaturbelegungsschema exportieren</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"551\"/>\n        <source>Could not write scheme to %1!</source>\n        <translation type=\"unfinished\">Schema (%1) kann nicht geschrieben werden!</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuild</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"142\"/>\n        <source>Build Toolbar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"150\"/>\n        <source>Build Configuration...</source>\n        <oldsource>Build Config</oldsource>\n        <translation type=\"unfinished\">Build Konfiguration...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"168\"/>\n        <source>Stop Action</source>\n        <translation>Aktion stoppen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"172\"/>\n        <source>Clear Output</source>\n        <oldsource>Clear All</oldsource>\n        <translation type=\"unfinished\">Ausgabe löschen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"176\"/>\n        <source>Execute File</source>\n        <translation type=\"unfinished\">Datei ausführen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"179\"/>\n        <source>Debug File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"182\"/>\n        <source>Lock Build Path</source>\n        <oldsource>Lock Go Build Path</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"184\"/>\n        <source>Build Path Configuration</source>\n        <oldsource>Go Build Configuration</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"230\"/>\n        <source>Use godoc View</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"287\"/>\n        <source>Line Wrap</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"291\"/>\n        <source>Auto Clear</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"295\"/>\n        <source>Automatic positioning cursor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"310\"/>\n        <source>Setup</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"318\"/>\n        <source>Build Output</source>\n        <oldsource>Build</oldsource>\n        <translation>Build Ausgabe</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"731\"/>\n        <source>Current environment change id &quot;%1&quot;</source>\n        <translation type=\"unfinished\">Id &quot;%1&quot; der aktuellem Umgebung ändern</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1145\"/>\n        <source>Lock Build</source>\n        <oldsource>Lock Build: %1</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1489\"/>\n        <source>Error: %1.</source>\n        <oldsource>Error: %1.\n</oldsource>\n        <translation type=\"unfinished\">Fehler: %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1492\"/>\n        <source>Command exited with code %1.</source>\n        <translation type=\"unfinished\">Prozess beendet mit Rückgabewert %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1494\"/>\n        <source>Success: %1.</source>\n        <oldsource>Success: %1.\n</oldsource>\n        <translation type=\"unfinished\">Erfolg: %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1543\"/>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1596\"/>\n        <source>A process is currently running.  Stop the current action first.</source>\n        <oldsource>A process is currently running.  Stop the current action first.\n</oldsource>\n        <translation type=\"unfinished\">Es wird bereits ein Prozess ausgeführt. Bitte beenden Sie die aktuelle Aktion zuerst.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1582\"/>\n        <source>Killing current process...</source>\n        <oldsource>Killing current process...\n</oldsource>\n        <translation type=\"unfinished\">Beende aktuellen Prozess...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1592\"/>\n        <source>Failed to terminate the existing process!</source>\n        <oldsource>Failed to terminate the existing process!\n</oldsource>\n        <translation type=\"unfinished\">Der Prozess konnte nicht beendet werden!</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1802\"/>\n        <source>Started process successfully</source>\n        <oldsource>Started process successfully\n</oldsource>\n        <translation type=\"unfinished\">Prozess erfolgreich gestartet</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1802\"/>\n        <source>Failed to start process</source>\n        <translation type=\"unfinished\">Prozess konnten nicht gestartet werden</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuildOption</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"20\"/>\n        <source>Recheck Go installation when changing environments</source>\n        <oldsource>Recheck go env if enviroment changed</oldsource>\n        <translation type=\"unfinished\">Prüfe go env ob die Umgebung sich geändert hat</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"27\"/>\n        <source>Build command configuration files [*]</source>\n        <oldsource>Build command configuration files:</oldsource>\n        <translation type=\"unfinished\">Konfigurationsdateien des Build-Kommandos:</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuildPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"102\"/>\n        <source>Close</source>\n        <translation type=\"unfinished\">Schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"105\"/>\n        <source>Execute:</source>\n        <oldsource>Exec:</oldsource>\n        <translation type=\"unfinished\">Ausführen:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"112\"/>\n        <source>Execute File</source>\n        <oldsource>Execute</oldsource>\n        <translation type=\"unfinished\">Datei Ausführen</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebug</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"114\"/>\n        <source>Stop</source>\n        <translation>Stop</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"75\"/>\n        <source>Clear</source>\n        <translation type=\"unfinished\">Löschen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"111\"/>\n        <source>Continue</source>\n        <translation>Fortfahren</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"117\"/>\n        <source>Show Current Line</source>\n        <translation>Aktuelle Zeile anzeigen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"189\"/>\n        <source>Debug Output</source>\n        <oldsource>Debug</oldsource>\n        <translation>Debug Ausgabe</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"105\"/>\n        <source>Start Debugging External Application...</source>\n        <oldsource>Start Debugging External Application</oldsource>\n        <translation type=\"unfinished\">Starte Debugging einer externen Anwendung...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"93\"/>\n        <source>Close</source>\n        <translation type=\"unfinished\">Schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"108\"/>\n        <source>Start Debugging</source>\n        <translation>Starte Debugging</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"120\"/>\n        <source>Step Into</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"123\"/>\n        <source>Step Over</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"126\"/>\n        <source>Step Out</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"129\"/>\n        <source>Run to Line</source>\n        <translation type=\"unfinished\">Ausführung bis zur Zeile</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"132\"/>\n        <source>Insert/Remove Breakpoint</source>\n        <translation type=\"unfinished\">Breakpoint einfügen/entfernen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"135\"/>\n        <source>Remove All Breakpoints</source>\n        <translation type=\"unfinished\">Alle Breakpoints entfernen</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebugOption</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"20\"/>\n        <source>Debug</source>\n        <translation>Debug</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"26\"/>\n        <source>Automatically insert breakpoint main.main when debugging</source>\n        <oldsource>Automatically add breakpoint main.main when debugging</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebugPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugplugin.cpp\" line=\"58\"/>\n        <source>Debug Window</source>\n        <oldsource>Debug</oldsource>\n        <translation type=\"unfinished\">Debug Fenster</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDoc</name>\n    <message>\n        <location filename=\"src/plugins/welcome/litedoc.cpp\" line=\"63\"/>\n        <source>LiteIDE Documentation</source>\n        <oldsource>LiteIDE Document Browser</oldsource>\n        <translation type=\"unfinished\">LiteIDE Dokumentation</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditor</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"254\"/>\n        <source>Undo</source>\n        <translation>Rückgängig</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"257\"/>\n        <source>Redo</source>\n        <translation>Wiederholen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"260\"/>\n        <source>Cut</source>\n        <translation>Ausschneiden</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"263\"/>\n        <source>Copy</source>\n        <translation>Kopieren</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"266\"/>\n        <source>Paste</source>\n        <translation>Einfügen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"268\"/>\n        <source>Select All</source>\n        <translation>Alles auswählen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"301\"/>\n        <source>Go to Doc Start</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"305\"/>\n        <source>Go to Doc End</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"309\"/>\n        <source>Go to Line Start</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"313\"/>\n        <source>Go to Line End</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"317\"/>\n        <source>Go to Previous Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"321\"/>\n        <source>Go to Next Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"325\"/>\n        <source>Go to Previous Character</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"329\"/>\n        <source>Go to Next Charater</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"333\"/>\n        <source>Go to Previous Word</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"337\"/>\n        <source>Go to Next Word</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"358\"/>\n        <source>Go to Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"361\"/>\n        <source>File is readonly</source>\n        <translation type=\"unfinished\">Datei ist nur lesbar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"364\"/>\n        <source>File is writable</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"404\"/>\n        <source>Line Wrap (MimeType)</source>\n        <oldsource>Word Wrap (MimeType)</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"415\"/>\n        <source>Toggle Comment</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"418\"/>\n        <source>Toggle Block Commnet</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"421\"/>\n        <source>Auto-indent Selection</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"425\"/>\n        <source>Tab To Spaces (MimeType)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"429\"/>\n        <source>Line End Windows (\\r\\n)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"433\"/>\n        <source>Line End Unix (\\n)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"437\"/>\n        <source>Visualize Whitespace (Global)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"444\"/>\n        <source>Move Line Up</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"447\"/>\n        <source>Move Line Down</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"450\"/>\n        <source>Copy Line Up</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"453\"/>\n        <source>Copy Line Down</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"456\"/>\n        <source>Join Lines</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"459\"/>\n        <source>Title Case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"463\"/>\n        <source>Upper Case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"467\"/>\n        <source>Lower Case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"471\"/>\n        <source>Swap Case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"475\"/>\n        <source>Tab To Spaces</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"479\"/>\n        <source>Spaces To Tab</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"645\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"733\"/>\n        <source>Advanced</source>\n        <translation type=\"unfinished\">Erweitert</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"671\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"751\"/>\n        <source>Goto</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"696\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"774\"/>\n        <source>Convert Tab</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"700\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"778\"/>\n        <source>Code Folding</source>\n        <translation type=\"unfinished\">Code-Faltung</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"690\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"768\"/>\n        <source>Convert Case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1199\"/>\n        <source>Export HTML</source>\n        <translation>Exportiere HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1207\"/>\n        <source>Export Failed</source>\n        <translation type=\"unfinished\">Export fehlgeschlagen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1208\"/>\n        <source>Could not open %1 for writing.</source>\n        <translation type=\"unfinished\">Konnte %1 nicht zum Schreiben öffnen.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1227\"/>\n        <source>Export PDF</source>\n        <translation>Exportiere PDF</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1252\"/>\n        <source>Print Document</source>\n        <translation type=\"unfinished\">Dokument drucken</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"286\"/>\n        <source>Print Preview...</source>\n        <oldsource>Print Preview Document</oldsource>\n        <translation type=\"unfinished\">Druckvorschau...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"282\"/>\n        <source>Export HTML...</source>\n        <translation type=\"unfinished\">Exportiere HTML...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"284\"/>\n        <source>Export PDF...</source>\n        <translation type=\"unfinished\">Exportiere PDF...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"285\"/>\n        <source>Print...</source>\n        <translation type=\"unfinished\">Drucken...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"288\"/>\n        <source>Go to Previous Block</source>\n        <oldsource>Go To Previous Block</oldsource>\n        <translation type=\"unfinished\">Zu vorherigem Block springen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"295\"/>\n        <source>Select Block</source>\n        <translation>Block auswählen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"298\"/>\n        <source>Go to Matching Brace</source>\n        <oldsource>Go To Matching Brace</oldsource>\n        <translation type=\"unfinished\">Springe zu passender Klammer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"341\"/>\n        <source>Fold</source>\n        <translation>Einklappen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"344\"/>\n        <source>Unfold</source>\n        <translation>Ausklappen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"347\"/>\n        <source>Fold All</source>\n        <translation>Alle einklappen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"350\"/>\n        <source>Unfold All</source>\n        <translation>Alle ausklappen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1327\"/>\n        <source>Go To Line</source>\n        <oldsource>Goto Line</oldsource>\n        <translation type=\"unfinished\">Springe zu Zeile</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"368\"/>\n        <source>Duplicate</source>\n        <translation>Duplizieren</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"372\"/>\n        <source>Delete Line</source>\n        <translation type=\"unfinished\">Zeile löschen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"376\"/>\n        <source>Copy Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"380\"/>\n        <source>Cut Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"384\"/>\n        <source>Insert Line Before</source>\n        <translation type=\"unfinished\">Zeile einfügen vor</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"388\"/>\n        <source>Insert Line After</source>\n        <translation type=\"unfinished\">Zeile einfügen nach</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"392\"/>\n        <source>Increase Font Size</source>\n        <translation>Schriftgröße erhöhen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"395\"/>\n        <source>Decrease Font Size</source>\n        <translation>Schriftgröße verringern</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"398\"/>\n        <source>Reset Font Size</source>\n        <translation>Schriftgröße zurücksetzen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"401\"/>\n        <source>Clean Whitespace</source>\n        <translation type=\"unfinished\">Whitespaces bereinigen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"408\"/>\n        <source>Code Complete</source>\n        <translation type=\"unfinished\">Code vervollständigen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"706\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"784\"/>\n        <source>Settings</source>\n        <oldsource>File Setup</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"892\"/>\n        <source>Reload File</source>\n        <translation type=\"unfinished\">Datei neu laden</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1269\"/>\n        <source>Do you want to permanently discard unsaved modifications and reload %1?</source>\n        <translation type=\"unfinished\">Möchten Sie ihre Änderungen verwerfen und die Datei neu laden: %1?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"291\"/>\n        <source>Go to Next Block</source>\n        <oldsource>Go To Next Block</oldsource>\n        <translation type=\"unfinished\">Springe zu nächstem Block</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1301\"/>\n        <source>ReadOnly</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1327\"/>\n        <source>Line: </source>\n        <translation type=\"unfinished\">Zeile: </translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorFileFactory</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorfilefactory.cpp\" line=\"203\"/>\n        <source>Text Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorOption</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"408\"/>\n        <source>Load File</source>\n        <translation>Datei laden</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"414\"/>\n        <source>Check and convert no printable char to &apos;.&apos;</source>\n        <translation>Prüfe und konvertiere nicht druckbare Zeichen zu &apos;.&apos;</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"30\"/>\n        <source>Font</source>\n        <translation>Schrift</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"24\"/>\n        <source>Font &amp;&amp; Colors</source>\n        <translation type=\"unfinished\">Schrift &amp;&amp; Farben</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"38\"/>\n        <source>Family:</source>\n        <translation>Familie:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"48\"/>\n        <source>Show Monospace Font</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"72\"/>\n        <source>Size:</source>\n        <translation>Größe:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"92\"/>\n        <source>Zoom:</source>\n        <translation>Zoom:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"99\"/>\n        <source>%</source>\n        <translation>%</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"118\"/>\n        <source>Antialias</source>\n        <translation>Kanten glätten</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"138\"/>\n        <source>Restore Default Font</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"150\"/>\n        <source>Editor Color Scheme</source>\n        <oldsource>ColorStyle Scheme</oldsource>\n        <translation type=\"unfinished\">Farbschema (Editor)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"158\"/>\n        <source>File:</source>\n        <translation>Datei:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"175\"/>\n        <source>Edit</source>\n        <translation>Bearbeiten</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"220\"/>\n        <source>Syntax Auto-completion</source>\n        <oldsource>Auto complete brackets</oldsource>\n        <translation>Automatische Vervollständigung</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"302\"/>\n        <source>Fuzzy code completion</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"350\"/>\n        <source>Clean completion cache when saving files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"357\"/>\n        <source>Clean whitespace when saving files</source>\n        <translation>Leerzeichen beim Speichern bereinigen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"364\"/>\n        <source>Enable scroll wheel zooming</source>\n        <translation>Zoom durch Mausrad aktivieren</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"371\"/>\n        <source>Add copied text into the clipboard as HTML</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"378\"/>\n        <source>Allow vertical scrolling to the last line [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"437\"/>\n        <source>Display VisualizeWhitespace</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"451\"/>\n        <source>Word wrap by default</source>\n        <translation>Automatischer Umbruch</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"430\"/>\n        <source>Display code fold</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"509\"/>\n        <source>Display offset position</source>\n        <translation type=\"unfinished\">Offset-Position anzeigen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"533\"/>\n        <source>File Types</source>\n        <translation>Dateitypen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"214\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"289\"/>\n        <source>Behavior</source>\n        <translation>Verhalten</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"444\"/>\n        <source>Display EOF</source>\n        <translation>Dateiende (EOF) anzeigen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"458\"/>\n        <source>Display line numbers</source>\n        <translation>Zeilennummern anzeigen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"465\"/>\n        <source>Display indent guide</source>\n        <oldsource>Display indent guide </oldsource>\n        <translation type=\"unfinished\">Indent-Marker anzeigen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"474\"/>\n        <source>Display right margin at column</source>\n        <translation>Zeige rechten Einzug in Spalten</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"295\"/>\n        <source>Automatic indentation</source>\n        <oldsource>Enable automatic indentation</oldsource>\n        <translation>Automatisch Einrücken</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"309\"/>\n        <source>Case sensitive code completion</source>\n        <oldsource>Completer case sensitive</oldsource>\n        <translation>Bei Code-Vervollständigung Groß-/Kleinschreibung beachten</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"318\"/>\n        <source>Code completion prefix length:</source>\n        <oldsource>Word Complete Prefix Length</oldsource>\n        <translation type=\"unfinished\">Code-Vervollständigung Präfix-Länge:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"402\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"424\"/>\n        <source>Display</source>\n        <translation>Anzeige</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"74\"/>\n        <source>MIME Type</source>\n        <translation>MIME-Type</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"75\"/>\n        <source>Tab Width</source>\n        <translation>Tab-Weite</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"76\"/>\n        <source>Tab To Spaces</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"78\"/>\n        <source>File Extensions</source>\n        <translation>Dateierweiterungen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"77\"/>\n        <source>Custom Extensions</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorPlugin</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorplugin.cpp\" line=\"71\"/>\n        <source>Edit ToolBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorplugin.cpp\" line=\"77\"/>\n        <source>Edit Navigation Bar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteEnvOption</name>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"20\"/>\n        <source>Environment definition files:</source>\n        <translation type=\"unfinished\">Umgebungsdefinitionsdateien:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"33\"/>\n        <source>Environment changes will take effect after switching environments.</source>\n        <translation type=\"unfinished\">Umgebungsänderungen werden erst nach Umschalten der Umgebung wirksam.</translation>\n    </message>\n</context>\n<context>\n    <name>LiteFindPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"72\"/>\n        <source>Find</source>\n        <translation>Suchen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"75\"/>\n        <source>Find Next</source>\n        <translation>Weitersuchen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"78\"/>\n        <source>Find Previous</source>\n        <translation>Vorheriges Suchen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"81\"/>\n        <source>Replace</source>\n        <translation>Ersetzen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"87\"/>\n        <source>File Search</source>\n        <translation>Dateisuche</translation>\n    </message>\n</context>\n<context>\n    <name>LiteTabWidget</name>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"62\"/>\n        <source>Open a new tab</source>\n        <translation>Neues Tab öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"65\"/>\n        <source>List All Tabs</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"71\"/>\n        <source>Close Tab</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownBatchBrowser</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"142\"/>\n        <source>Markdown Exporter</source>\n        <oldsource>Markdown Batch</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"162\"/>\n        <source>All Files (*)</source>\n        <translation>Alle Dateien (*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"231\"/>\n        <source>Select the folder containing your markdown files:</source>\n        <oldsource>Select Markdown Folder</oldsource>\n        <translation>Ordner auswählen der die Markdown-Dateien enthält:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"242\"/>\n        <source>Select Markdown Files</source>\n        <translation>Markdown-Dateien auswählen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"290\"/>\n        <source>Select the folder to contain separated markdown exports:</source>\n        <translation type=\"unfinished\">Ordner auswählen für getrennten Markdown-Export:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"303\"/>\n        <source>Export Merged HTML</source>\n        <oldsource>Export Html</oldsource>\n        <translation type=\"unfinished\">Exportiere gemeinsames HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"378\"/>\n        <source>Export Merged PDF</source>\n        <oldsource>Export PDF</oldsource>\n        <translation type=\"unfinished\">Exportiere gemeinsames PDF</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownBatchWidget</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"20\"/>\n        <source>Markdown Source Files</source>\n        <oldsource>Markdown Files</oldsource>\n        <translation type=\"unfinished\">Markdown Dateien</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"38\"/>\n        <source>Import Folder...</source>\n        <oldsource>Import Folder</oldsource>\n        <translation>Ordner importieren...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"45\"/>\n        <source>Add Files...</source>\n        <oldsource>Add Files</oldsource>\n        <translation>Dateien hinzufügen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"52\"/>\n        <source>Move Up</source>\n        <translation>Nach oben</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"59\"/>\n        <source>Move Down</source>\n        <translation>Nach unten</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"66\"/>\n        <source>Remove</source>\n        <translation>Entfernen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"73\"/>\n        <source>Remove All</source>\n        <translation>Alle entfernen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"98\"/>\n        <source>Options</source>\n        <translation>Optionen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"106\"/>\n        <source>Export Folder:</source>\n        <translation>Export Ordner:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"116\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation type=\"unfinished\">Auswählen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"127\"/>\n        <source>Use CSS</source>\n        <translation>CSS verwenden</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"137\"/>\n        <source>Insert horizontal line between merged files</source>\n        <oldsource>Merge files insert split &lt;hr&gt;</oldsource>\n        <translation>Horizontale Linie zwischen zusammengefassten Dateien einfügen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"144\"/>\n        <source>Insert page break between merged files</source>\n        <oldsource>Merge files insert page break</oldsource>\n        <translation>Seitenumbruch zwischen zusammengefassten Dateien einfügen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"169\"/>\n        <source>Export</source>\n        <oldsource>Export Util</oldsource>\n        <translation type=\"unfinished\">Exportmöglichkeiten</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"175\"/>\n        <source>Export Separated HTML</source>\n        <oldsource>Separate Html</oldsource>\n        <translation type=\"unfinished\">HTML teilen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"182\"/>\n        <source>Export Separated PDF</source>\n        <oldsource>Separate PDF</oldsource>\n        <translation type=\"unfinished\">PDF teilen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"189\"/>\n        <source>Export Merged HTML...</source>\n        <oldsource>Merge Html</oldsource>\n        <translation type=\"unfinished\">HTML zusammenführen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"196\"/>\n        <source>Export Merged PDF...</source>\n        <oldsource>Merge PDF</oldsource>\n        <translation type=\"unfinished\">PDF zusammenführen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"203\"/>\n        <source>Print Preview Merged...</source>\n        <oldsource>Merge Print Preview</oldsource>\n        <translation type=\"unfinished\">Vorschau (zus.)...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"210\"/>\n        <source>Print Merged</source>\n        <oldsource>Merge Print</oldsource>\n        <translation type=\"unfinished\">Drucken (zus.)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"233\"/>\n        <source>Log</source>\n        <translation>Log</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownEdit</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"83\"/>\n        <source>Header (h1)</source>\n        <oldsource>Header &lt;h1&gt;</oldsource>\n        <translation>Überschrift (h1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"86\"/>\n        <source>Header (h2)</source>\n        <oldsource>Header &lt;h2&gt;</oldsource>\n        <translation>Überschrift (h2)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"89\"/>\n        <source>Header (h3)</source>\n        <oldsource>Header &lt;h3&gt;</oldsource>\n        <translation>Überschrift (h3)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"92\"/>\n        <source>Header (h4)</source>\n        <oldsource>Header &lt;h4&gt;</oldsource>\n        <translation>Überschrift (h4)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"95\"/>\n        <source>Header (h5)</source>\n        <oldsource>Header &lt;h5&gt;</oldsource>\n        <translation>Überschrift (h5)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"98\"/>\n        <source>Header (h6)</source>\n        <oldsource>Header &lt;h6&gt;</oldsource>\n        <translation>Überschrift (h6)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"101\"/>\n        <source>Bold</source>\n        <translation>Fett</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"104\"/>\n        <source>Italic</source>\n        <translation>Kursiv</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"107\"/>\n        <source>Inline Code</source>\n        <translation>Eingebetteter Code</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"110\"/>\n        <source>Link</source>\n        <translation>Link</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"113\"/>\n        <source>Image</source>\n        <translation>Bild</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"116\"/>\n        <source>Unordered List</source>\n        <translation>Ungeordnete Liste</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"119\"/>\n        <source>Ordered List</source>\n        <translation>Geordnete Liste</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"122\"/>\n        <source>Blockquote</source>\n        <translation>Blocksatz</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"125\"/>\n        <source>Horizontal Rule</source>\n        <translation>Horizontales Lineal</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"131\"/>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"154\"/>\n        <source>Heading</source>\n        <translation>Überschrift</translation>\n    </message>\n</context>\n<context>\n    <name>MultiFolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"299\"/>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"306\"/>\n        <source>Delete Folder</source>\n        <translation type=\"unfinished\">Ordner löschen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"300\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation type=\"unfinished\">Sind Sie sicher, dass Sie den ganzen Ordner und dessen Inhalt unwiderruflich löschen wollen?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"307\"/>\n        <source>Failed to delete the folder!</source>\n        <translation type=\"unfinished\">Der Ordner konnte nicht gelöscht werden!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"320\"/>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"327\"/>\n        <source>Delete File</source>\n        <translation type=\"unfinished\">Datei löschen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"321\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation type=\"unfinished\">Sind Sie sicher, dass Sie diese Datei unwiderruflich löschen wollen?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"328\"/>\n        <source>Failed to delete the file!</source>\n        <translation type=\"unfinished\">Die Datei konnte nicht gelöscht werden!</translation>\n    </message>\n</context>\n<context>\n    <name>NavigateBar</name>\n    <message>\n        <location filename=\"src/utils/navigate/navigate.cpp\" line=\"146\"/>\n        <location filename=\"src/utils/navigate/navigate.cpp\" line=\"169\"/>\n        <source>Browser Files in %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>NewFileDialog</name>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"14\"/>\n        <source>New Project or File</source>\n        <translation>Neues Projekt oder Datei</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"124\"/>\n        <source>Browse...</source>\n        <translation type=\"unfinished\">Durchsuchen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"24\"/>\n        <source>GOPATH:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"38\"/>\n        <source>Template:</source>\n        <oldsource>Template</oldsource>\n        <translation type=\"unfinished\">Vorlage:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"54\"/>\n        <source>Type</source>\n        <translation>Typ</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"73\"/>\n        <source>Information</source>\n        <translation>Information</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"87\"/>\n        <source>Name:</source>\n        <translation>Name:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"114\"/>\n        <source>Location:</source>\n        <translation>Verzeichnis:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"127\"/>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"185\"/>\n        <source>Error</source>\n        <translation>Fehler</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"127\"/>\n        <source>Could not create the target directory: %1</source>\n        <translation>Zielverzeichnis konnte nicht angelegt werden: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"132\"/>\n        <source>Warning</source>\n        <translation>Warnung</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"132\"/>\n        <source>Location %1 is not empty.\nUse the target directory anyway?</source>\n        <translation>Zielverzeichnis %1 ist nicht leer.\nTrotzdem verwenden?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"169\"/>\n        <source>Overwrite File</source>\n        <translation>Datei überschreiben</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"169\"/>\n        <source>%1 already exists.\nDo you want to replace it?</source>\n        <translation type=\"unfinished\">%1 existiert bereits.\nSoll es ersetzt werden?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"185\"/>\n        <source>No files could be created.</source>\n        <translation>Es konnten keine Dateien erstellt werden.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"280\"/>\n        <source>File template details:</source>\n        <translation type=\"unfinished\">Informationen Dateivorlage:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"282\"/>\n        <source>Project template details:</source>\n        <oldsource>New project wizard:</oldsource>\n        <translation type=\"unfinished\">Informationen Projektvorlage:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"362\"/>\n        <source>Choose a directory for the new content:</source>\n        <translation>Verzeichnis für den neuen Inhalt auswählen:</translation>\n    </message>\n</context>\n<context>\n    <name>OpenEditorsWidget</name>\n    <message>\n        <location filename=\"src/liteapp/openeditorswidget.cpp\" line=\"43\"/>\n        <source>Open Documents</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>OptionsBrowser</name>\n    <message>\n        <location filename=\"src/liteapp/optionsbrowser.cpp\" line=\"57\"/>\n        <source>Options</source>\n        <oldsource>Options Page</oldsource>\n        <translation>Optionen</translation>\n    </message>\n</context>\n<context>\n    <name>OptionsWidget</name>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"14\"/>\n        <source>Options</source>\n        <translation>Optionen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"56\"/>\n        <source>Info</source>\n        <translation>Info</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"106\"/>\n        <source>[*] item request restart of LiteIDE</source>\n        <oldsource>[*] item requeset restart LiteIDE</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>OutputDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"444\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"472\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"473\"/>\n        <source>Move To</source>\n        <translation type=\"unfinished\">Verschieben</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"446\"/>\n        <source>LeftSideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"447\"/>\n        <source>RightSideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"480\"/>\n        <source>BottomDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>OutputOption</name>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"20\"/>\n        <source>Font</source>\n        <translation type=\"unfinished\">Schrift</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"26\"/>\n        <source>Family:</source>\n        <translation type=\"unfinished\">Familie:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"43\"/>\n        <source>Size:</source>\n        <translation type=\"unfinished\">Größe:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"60\"/>\n        <source>Zoom:</source>\n        <translation type=\"unfinished\">Zoom:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"67\"/>\n        <source>%</source>\n        <translation type=\"unfinished\">%</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"86\"/>\n        <source>Antialias</source>\n        <translation type=\"unfinished\">Kanten glätten</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"109\"/>\n        <source>Display</source>\n        <translation type=\"unfinished\">Anzeige</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"115\"/>\n        <source>Use editor color scheme</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"124\"/>\n        <source>Sets the maximum number of lines</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>PackageBrowser</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"87\"/>\n        <source>Manage GOPATH/Modules ...</source>\n        <oldsource>Manage GOPATH...</oldsource>\n        <translation type=\"unfinished\">GOPATH verwalten...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"86\"/>\n        <source>Reload All</source>\n        <translation>Alle neu laden</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"93\"/>\n        <source>Use godoc View</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"94\"/>\n        <source>Load Package in New Window</source>\n        <translation>Paket in neuem Fenster laden</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"95\"/>\n        <source>Add Package to Folders</source>\n        <translation type=\"unfinished\">Paket zu Ordnern hinzufügen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"96\"/>\n        <source>Open Source File</source>\n        <translation>Quelldatei öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"97\"/>\n        <source>Copy Name to Clipboard</source>\n        <oldsource>Copy Name To Clipboard</oldsource>\n        <translation type=\"unfinished\">Name in Zwischenablage kopieren</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"119\"/>\n        <source>Go Package Browser</source>\n        <oldsource>Package Browser</oldsource>\n        <translation type=\"unfinished\">Paket Browser</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"208\"/>\n        <source>Loading Go package list...</source>\n        <oldsource>Loading go package ...</oldsource>\n        <translation type=\"unfinished\">Lade go Paketliste...</translation>\n    </message>\n</context>\n<context>\n    <name>PackageProject</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"76\"/>\n        <source>Reload Package</source>\n        <translation>Paket neu laden</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"77\"/>\n        <source>Open Explorer Here</source>\n        <translation>Explorer hier öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"78\"/>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"299\"/>\n        <source>Add Source File</source>\n        <translation>Quelltextdatei hinzufügen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"299\"/>\n        <source>File Name:</source>\n        <translation type=\"unfinished\">Dateiname:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"310\"/>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"315\"/>\n        <source>Error</source>\n        <translation>Fehler</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"310\"/>\n        <source>File %1 already exists.</source>\n        <translation>Datei %1 existiert bereits.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"315\"/>\n        <source>Could not open %1 for writing.</source>\n        <translation>Konnte %1 nicht zum Schreiben öffnen.</translation>\n    </message>\n</context>\n<context>\n    <name>PluginsDialog</name>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.ui\" line=\"14\"/>\n        <source>Installed Plugins</source>\n        <oldsource>Install Plugins</oldsource>\n        <translation>Installierte Plugins</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.ui\" line=\"45\"/>\n        <source>Close</source>\n        <translation>Schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"51\"/>\n        <source>Name</source>\n        <translation>Name</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"54\"/>\n        <source>Author</source>\n        <translation>Autor</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"52\"/>\n        <source>Enabled</source>\n        <translation>Aktiviert</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"53\"/>\n        <source>Details</source>\n        <translation>Details</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"55\"/>\n        <source>Version</source>\n        <oldsource>Last Ver</oldsource>\n        <translation>Version</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"56\"/>\n        <source>File Name</source>\n        <oldsource>FileName</oldsource>\n        <translation>Dateiname</translation>\n    </message>\n</context>\n<context>\n    <name>ProcessEx</name>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"52\"/>\n        <source>process exited with code %1</source>\n        <translation type=\"unfinished\">Prozess beendet mit Rückgabewert %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"55\"/>\n        <source>process crashed or was terminated</source>\n        <translation type=\"unfinished\">Prozess beendet oder abgestürzt</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"58\"/>\n        <source>process exited with an unknown status</source>\n        <translation type=\"unfinished\">Prozess beendet mit unbekanntem Rückgabewert</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"68\"/>\n        <source>process failed to start</source>\n        <translation type=\"unfinished\">Prozess konnte nicht gestartet werden</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"71\"/>\n        <source>process crashed or was terminated while running</source>\n        <translation type=\"unfinished\">Prozess abgestürzt oder während der Ausführung beendet</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"74\"/>\n        <source>timed out waiting for process</source>\n        <translation type=\"unfinished\">Time out beim Warten auf Prozess</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"77\"/>\n        <source>couldn&apos;t read from the process</source>\n        <translation type=\"unfinished\">Konnte nicht vom Prozess lesen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"80\"/>\n        <source>couldn&apos;t write to the process</source>\n        <translation type=\"unfinished\">Konnte nicht zum Prozess schreiben</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"84\"/>\n        <source>an unknown error occurred</source>\n        <translation type=\"unfinished\">Ein unbekannter Fehler ist aufgetreten</translation>\n    </message>\n</context>\n<context>\n    <name>ProjectManager</name>\n    <message>\n        <location filename=\"src/liteapp/projectmanager.cpp\" line=\"95\"/>\n        <source>Project &lt;%1&gt;</source>\n        <translation>Projekt &lt;%1&gt;</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/projectmanager.cpp\" line=\"119\"/>\n        <source>Import Directory &lt;%1&gt;</source>\n        <translation>Import Ordner &lt;%1&gt;</translation>\n    </message>\n</context>\n<context>\n    <name>QFileSystemModel</name>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"46\"/>\n        <source>%1 TB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"48\"/>\n        <source>%1 GB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"50\"/>\n        <source>%1 MB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"52\"/>\n        <source>%1 KB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"53\"/>\n        <source>%1 bytes</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QJson::ParserRunnable</name>\n    <message>\n        <location filename=\"src/3rdparty/qjson/src/parserrunnable.cpp\" line=\"64\"/>\n        <source>An error occurred while parsing json: %1</source>\n        <translation type=\"unfinished\">Beim Parsen von Json ist ein Fehler aufgetreten: %1</translation>\n    </message>\n</context>\n<context>\n    <name>QJsonParseError</name>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"59\"/>\n        <source>no error occurred</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"60\"/>\n        <source>unterminated object</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"61\"/>\n        <source>missing name separator</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"62\"/>\n        <source>unterminated array</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"63\"/>\n        <source>missing value separator</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"64\"/>\n        <source>illegal value</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"65\"/>\n        <source>invalid termination by number</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"66\"/>\n        <source>illegal number</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"67\"/>\n        <source>invalid escape sequence</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"68\"/>\n        <source>invalid UTF8 string</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"69\"/>\n        <source>unterminated string</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"70\"/>\n        <source>object is missing after a comma</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"71\"/>\n        <source>too deeply nested document</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"72\"/>\n        <source>too large document</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"73\"/>\n        <source>garbage at the end of the document</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenAction</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenaction.cpp\" line=\"59\"/>\n        <source>Show and Run Commands</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenEditor</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopeneditor.cpp\" line=\"56\"/>\n        <source>Show All Opened Editors</source>\n        <oldsource>Show All Editors</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFileSystem</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfilesystem.cpp\" line=\"156\"/>\n        <source>File System</source>\n        <translation type=\"unfinished\">Dateisystem</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFiles</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfiles.cpp\" line=\"72\"/>\n        <source>Go to File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfiles.cpp\" line=\"77\"/>\n        <source>Type &apos;?&apos; to get help on the actions you can take from here</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFolder</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfolder.cpp\" line=\"71\"/>\n        <source>Browser Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenHelp</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenhelp.cpp\" line=\"49\"/>\n        <source>Show All Quick Open Actions</source>\n        <oldsource>Show Quick Open Help</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenLines</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"51\"/>\n        <source>Go to Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"79\"/>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"84\"/>\n        <source>Open a text file first to go to a line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"97\"/>\n        <source>Type a line number between %1 and %2 to navigate to</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"100\"/>\n        <source>Go to Line %1</source>\n        <oldsource>Go to line %1</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenManager</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"82\"/>\n        <source>Quick Open File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"83\"/>\n        <source>Quick Open Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"84\"/>\n        <source>Quick Open Symbol</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"85\"/>\n        <source>Quick Open Command</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"86\"/>\n        <source>Show All Quick Open Actions</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenMimeType</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmimetype.cpp\" line=\"41\"/>\n        <source>Go to Symbol in File</source>\n        <oldsource>Open Symbol by Name</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmimetype.cpp\" line=\"42\"/>\n        <source>not found symbol</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenOption</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">Formular</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"20\"/>\n        <source>QuickOpenFiles</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"26\"/>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"79\"/>\n        <source>Match case sensitive</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"35\"/>\n        <source>Max files count:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"73\"/>\n        <source>QuickOpenEditor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>RecentManager</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.cpp\" line=\"54\"/>\n        <source>Clear All History</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.cpp\" line=\"169\"/>\n        <source>Clear Menu</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SearchEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"83\"/>\n        <source>Search</source>\n        <translation>Suche</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"84\"/>\n        <source>Stop Search</source>\n        <translation type=\"unfinished\">Suche beenden</translation>\n    </message>\n</context>\n<context>\n    <name>SelectExternalDialog</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"14\"/>\n        <source>Debug External Application</source>\n        <translation type=\"unfinished\">Externe Anwendung debuggen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"22\"/>\n        <source>Application:</source>\n        <translation>Anwendung:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"29\"/>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"56\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation type=\"unfinished\">Wählen...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"36\"/>\n        <source>Arguments:</source>\n        <translation>Argumente:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"46\"/>\n        <source>Working directory:</source>\n        <translation>Arbeitsverzeichnis:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.cpp\" line=\"82\"/>\n        <source>Select Executable</source>\n        <translation type=\"unfinished\">Ausführbare Datei auswählen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.cpp\" line=\"92\"/>\n        <source>Select the working directory:</source>\n        <oldsource>Select Working Directory</oldsource>\n        <translation>Arbeitsverzeichnis auswählen:</translation>\n    </message>\n</context>\n<context>\n    <name>SessionRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"197\"/>\n        <source>Sessions</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SideDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"50\"/>\n        <source>Move To</source>\n        <translation type=\"unfinished\">Verschieben</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"54\"/>\n        <source>RightSideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"56\"/>\n        <source>LeftDockWidgt</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"58\"/>\n        <source>LeftSideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"60\"/>\n        <source>RightDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"63\"/>\n        <source>OutputBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"75\"/>\n        <source>SideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"76\"/>\n        <source>Show SideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SideWindowStyle</name>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"547\"/>\n        <source>Hide SideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"585\"/>\n        <source>SideBar Windows</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"586\"/>\n        <source>Output Windows</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SplitDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"300\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"379\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"380\"/>\n        <source>Move To</source>\n        <translation type=\"unfinished\">Verschieben</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"302\"/>\n        <source>Top</source>\n        <translation type=\"unfinished\">Oben</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"306\"/>\n        <source>Top (Split)</source>\n        <translation type=\"unfinished\">Oben (geteilt)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"343\"/>\n        <source>TopDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"343\"/>\n        <source>TopDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"312\"/>\n        <source>Bottom</source>\n        <translation type=\"unfinished\">Unten</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"316\"/>\n        <source>Bottom (Split)</source>\n        <translation type=\"unfinished\">Unten (geteilt)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"345\"/>\n        <source>BottomDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"345\"/>\n        <source>BottomDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"322\"/>\n        <source>Left</source>\n        <translation type=\"unfinished\">Links</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"326\"/>\n        <source>Left (Split)</source>\n        <translation type=\"unfinished\">Links (geteilt)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"347\"/>\n        <source>LeftDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"347\"/>\n        <source>LeftDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"332\"/>\n        <source>Right</source>\n        <translation type=\"unfinished\">Rechts</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"336\"/>\n        <source>Right (Split)</source>\n        <translation type=\"unfinished\">Rechts (geteilt)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"349\"/>\n        <source>RightDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"349\"/>\n        <source>RightDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"355\"/>\n        <source>Unsplit</source>\n        <translation type=\"unfinished\">Zusammenführen</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"360\"/>\n        <source>Split</source>\n        <translation type=\"unfinished\">Teilen</translation>\n    </message>\n</context>\n<context>\n    <name>SplitWindowStyle</name>\n    <message>\n        <location filename=\"src/liteapp/splitwindowstyle.cpp\" line=\"244\"/>\n        <source>Hide Sidebars</source>\n        <translation>Seitenleisten ausblenden</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/splitwindowstyle.cpp\" line=\"278\"/>\n        <source>Tool Windows</source>\n        <translation type=\"unfinished\">Werkzeugfenster</translation>\n    </message>\n</context>\n<context>\n    <name>Terminal</name>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"132\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"189\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"773\"/>\n        <source>New</source>\n        <translation type=\"unfinished\">Neu</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"133\"/>\n        <source>Open a new terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"135\"/>\n        <source>Close</source>\n        <translation type=\"unfinished\">Schließen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"136\"/>\n        <source>Close current terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"138\"/>\n        <source>CloseAll</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"139\"/>\n        <source>Close all terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"142\"/>\n        <source>LoadEnv</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"143\"/>\n        <source>Current terminal load environment from LiteIDE</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"148\"/>\n        <source>Filter</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"184\"/>\n        <source>Dark Mode</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"195\"/>\n        <source>Login Mode (shell --login)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"237\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"741\"/>\n        <source>Terminal</source>\n        <translation type=\"unfinished\">Terminal</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"741\"/>\n        <source>Rename Tab Title</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>TerminalEdit</name>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"67\"/>\n        <source>Cut</source>\n        <translation>Ausschneiden</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"71\"/>\n        <source>Copy</source>\n        <translation>Kopieren</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"75\"/>\n        <source>Paste</source>\n        <translation>Einfügen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"79\"/>\n        <source>Select All</source>\n        <translation>Alles auswählen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"83\"/>\n        <source>Clear All</source>\n        <translation>Auswahl aufheben</translation>\n    </message>\n</context>\n<context>\n    <name>TextEditor::Internal::ColorScheme</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_texteditor/colorscheme.cpp\" line=\"212\"/>\n        <source>Not a color scheme file.</source>\n        <translation type=\"unfinished\">Keine Farbschemadatei.</translation>\n    </message>\n</context>\n<context>\n    <name>Utils::FilterLineEdit</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_editutil/filterlineedit.cpp\" line=\"51\"/>\n        <source>Filter</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_editutil/filterlineedit.cpp\" line=\"52\"/>\n        <source>Clear text</source>\n        <translation type=\"unfinished\">Text löschen</translation>\n    </message>\n</context>\n<context>\n    <name>VTermWidget</name>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"50\"/>\n        <source>Copy</source>\n        <translation type=\"unfinished\">Kopieren</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"54\"/>\n        <source>Paste</source>\n        <translation type=\"unfinished\">Einfügen</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"58\"/>\n        <source>Select All</source>\n        <translation type=\"unfinished\">Alles auswählen</translation>\n    </message>\n</context>\n<context>\n    <name>WebKitBrowser</name>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"69\"/>\n        <source>Navigation</source>\n        <translation>Navigation</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"72\"/>\n        <source>Open Html File</source>\n        <oldsource>Open Html</oldsource>\n        <translation>HTML-Datei öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"119\"/>\n        <source>WebKitBrowser</source>\n        <translation>WebKit-Browser</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"169\"/>\n        <source>False load %1 !</source>\n        <translation type=\"unfinished\">Fehlerhaft geladen: %1 !</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"256\"/>\n        <source>Open Html or Markdown File</source>\n        <oldsource>Open Html or Markdown Files</oldsource>\n        <translation>HTML- oder Markdown-Datei öffnen</translation>\n    </message>\n</context>\n<context>\n    <name>WebKitHtmlWidgetPlugin</name>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkithtmlwidgetplugin.cpp\" line=\"74\"/>\n        <source>Open Html or Markdown File</source>\n        <oldsource>Open Html or Markdown Files</oldsource>\n        <translation>HTML- oder Markdown-Datei öffnen</translation>\n    </message>\n</context>\n<context>\n    <name>WelcomeBrowser</name>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"65\"/>\n        <source>New</source>\n        <translation>Neu</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"66\"/>\n        <source>Open</source>\n        <translation>Öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"67\"/>\n        <source>Open Folder</source>\n        <translation>Ordner öffnen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"68\"/>\n        <source>Options</source>\n        <translation>Optionen</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"207\"/>\n        <source>Welcome</source>\n        <oldsource>Welcome Page</oldsource>\n        <translation>Willkommen</translation>\n    </message>\n</context>\n<context>\n    <name>WelcomePlugin</name>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomeplugin.cpp\" line=\"77\"/>\n        <source>Welcome</source>\n        <oldsource>Home</oldsource>\n        <translation>Willkommen</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "liteidex/liteide_fr.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.1\" language=\"fr_FR\">\n<context>\n    <name>AboutDialog</name>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"20\"/>\n        <source>About LiteIDE</source>\n        <oldsource>About Liteide</oldsource>\n        <translation>À propos de LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"156\"/>\n        <source>Information</source>\n        <oldsource>Infomation</oldsource>\n        <translation>Informations</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"162\"/>\n        <source>Welcome:</source>\n        <translation>Bienvenue :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"168\"/>\n        <source>Welcome to LiteIDE X! LiteIDE is a simple, open source, cross-platform IDE.</source>\n        <oldsource>Welcome to LiteIDE X!\nLiteIDE is a simple, open source, cross-platform IDE.</oldsource>\n        <translation>Bienvenu dans LiteIDE X ! LiteIDE est un IDE simple, open source et indépendant de la plate-forme.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"178\"/>\n        <source>Project:</source>\n        <translation>Projet :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"208\"/>\n        <source>Name:</source>\n        <translation>Nom :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"191\"/>\n        <source>Author:</source>\n        <translation>Auteur :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"222\"/>\n        <source>Version:</source>\n        <translation>Version :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"242\"/>\n        <source>Build:</source>\n        <translation>Compilation :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"215\"/>\n        <source>Based on Qt</source>\n        <oldsource>Based on Qt Version</oldsource>\n        <translation>Basé sur Qt</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"249\"/>\n        <source>Source Code:</source>\n        <translation>Code source :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"263\"/>\n        <source>Support LiteIDE:</source>\n        <oldsource>Support</oldsource>\n        <translation>Support LiteIDE :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"297\"/>\n        <source>Developers</source>\n        <translation>Développeurs</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"400\"/>\n        <source>Translations</source>\n        <translation>Traductions</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"412\"/>\n        <source>Chinese</source>\n        <translation>Chinois</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"426\"/>\n        <source>Japanese</source>\n        <translation>Japonais</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"440\"/>\n        <source>Russian</source>\n        <translation>Russe</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"454\"/>\n        <source>French</source>\n        <translation>Français</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"468\"/>\n        <source>Traditional Chinese</source>\n        <translation>Chinois traditionnel</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"482\"/>\n        <source>German</source>\n        <translation>Allemand</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"513\"/>\n        <source>Ukrainian</source>\n        <translation>Ukrainien</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"544\"/>\n        <source>Thanks to...</source>\n        <translation>Remerciements à...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"577\"/>\n        <source>License</source>\n        <translation>Licence</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"619\"/>\n        <source>Close</source>\n        <translation>Fermer</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.cpp\" line=\"42\"/>\n        <source>Based on Qt %1 (%2 bit)</source>\n        <translation>Basé sur Qt %1 (%2 bits)</translation>\n    </message>\n</context>\n<context>\n    <name>ActionManager</name>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"65\"/>\n        <source>&amp;File</source>\n        <translation>&amp;Fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"66\"/>\n        <source>&amp;Recent</source>\n        <translation>&amp;Récent</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"67\"/>\n        <source>&amp;Edit</source>\n        <translation>&amp;Édition</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"68\"/>\n        <source>F&amp;ind</source>\n        <oldsource>&amp;Find</oldsource>\n        <translation>Rec&amp;herche</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"69\"/>\n        <source>&amp;View</source>\n        <translation>&amp;Affichage</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"74\"/>\n        <source>&amp;Tools</source>\n        <translation>&amp;Outils</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"75\"/>\n        <source>&amp;Build</source>\n        <translation>&amp;Compilation</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"76\"/>\n        <source>&amp;Debug</source>\n        <translation>&amp;Débogage</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"77\"/>\n        <source>&amp;Help</source>\n        <translation>A&amp;ide</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"79\"/>\n        <source>Standard Toolbar</source>\n        <oldsource>Standard ToolBar</oldsource>\n        <translation>Barre d&apos;outils standard</translation>\n    </message>\n</context>\n<context>\n    <name>AstWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangast/astwidget.cpp\" line=\"76\"/>\n        <source>Go To Definition</source>\n        <translation>Aller à la définition</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/astwidget.cpp\" line=\"77\"/>\n        <source>View Import Document</source>\n        <translation>Afficher l&apos;import de document</translation>\n    </message>\n</context>\n<context>\n    <name>BaseDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"77\"/>\n        <source>Hide</source>\n        <translation>Masquer</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"78\"/>\n        <source>Hide Tool Window</source>\n        <translation>Masquer la fenêtre des outils</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"87\"/>\n        <source>Floating Window</source>\n        <translation>Fenêtre flottante</translation>\n    </message>\n</context>\n<context>\n    <name>BaseFolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"78\"/>\n        <source>Open In New Window</source>\n        <translation>Ouvrir dans une nouvelle fenêtre</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"79\"/>\n        <source>Open File</source>\n        <translation>Ouvrir un fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"80\"/>\n        <source>New File...</source>\n        <translation>Nouveau fichier...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"81\"/>\n        <source>New File Wizard...</source>\n        <translation>Nouveau fichier guidé...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"82\"/>\n        <source>Rename File...</source>\n        <translation>Renommer le fichier...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"83\"/>\n        <source>Delete File</source>\n        <translation>Supprimer le fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"85\"/>\n        <source>New Folder...</source>\n        <translation>Nouveau répertoire...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"86\"/>\n        <source>Rename Folder...</source>\n        <translation>Renommer le répertoire...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"87\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"335\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"342\"/>\n        <source>Delete Folder</source>\n        <translation>Supprimer le répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"100\"/>\n        <source>Open Terminal Here</source>\n        <translation>Ouvrir un terminal ici</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"90\"/>\n        <source>Show in Explorer</source>\n        <oldsource>Open Explorer Here</oldsource>\n        <translation>Ouvrir un explorateur ici</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"77\"/>\n        <source>Open Application</source>\n        <translation>Ouvrir une application</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"92\"/>\n        <source>Show in Finder</source>\n        <translation>Montrer dans la recherche</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"94\"/>\n        <source>Show Containing Folder</source>\n        <translation>Afficher les répertoires contenus</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"98\"/>\n        <source>Open Command Prompt Here</source>\n        <translation>Ouvrir une ligne de commande ici</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"102\"/>\n        <source>Open in Integrated Terminal</source>\n        <translation type=\"unfinished\">Ouvrir dans le terminal intégré</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"104\"/>\n        <source>Open Folder...</source>\n        <oldsource>Add Folder...</oldsource>\n        <translation>Ouvrir un répertoire...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"105\"/>\n        <source>Reload Folder</source>\n        <translation>Recharger le répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"106\"/>\n        <source>Close Folder</source>\n        <translation>Fermer le répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"108\"/>\n        <source>Close All Folders</source>\n        <translation>Fermer tous les répertoires</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"110\"/>\n        <source>Copy</source>\n        <translation>Copier</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"111\"/>\n        <source>Paste</source>\n        <translation>Coller</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"113\"/>\n        <source>Copy Path</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"115\"/>\n        <source>Move To Trash</source>\n        <translation>Mettre à la corbeille</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"198\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"208\"/>\n        <source>Create File</source>\n        <translation>Créer un fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"199\"/>\n        <source>A file with that name already exists!</source>\n        <translation>Un fichier avec ce nom existe déjà !</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"209\"/>\n        <source>Failed to create the file!</source>\n        <translation>Création du fichier echouée !</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"239\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"245\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"250\"/>\n        <source>Rename File</source>\n        <translation>Renommer le fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"239\"/>\n        <source>New Name:</source>\n        <translation>Nouveau nom :</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"246\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"251\"/>\n        <source>Failed to rename the file!</source>\n        <translation>Renommage du fichier échouée !</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"504\"/>\n        <source>An item &quot;%1&quot; already exists in this location. Do you want to replace it and move old item to trash?</source>\n        <translation>Un éléments &quot;%1&quot; existe déjà à cet endroit. Voulez-vous le remplacer et mettre l&apos;ancien dans la corbeille ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"505\"/>\n        <source>Stop</source>\n        <translation>Arrêter</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"506\"/>\n        <source>Keep Both</source>\n        <translation>Garder les deux</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"507\"/>\n        <source>Keep Both All</source>\n        <translation>Conserver les deux pour tous</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"508\"/>\n        <source>Replace</source>\n        <translation>Remplacer</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"509\"/>\n        <source>Replace All</source>\n        <translation>Tout remplacer</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"609\"/>\n        <source>Are you sure that you want move to trash this item?</source>\n        <translation>Êtes-vous certain de vouloir mettre cet élément à la corbeille ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"612\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"615\"/>\n        <source>Are you sure that you want move to trash %1 items?</source>\n        <translation>Êtes-vous certain de vouloir mettre %1 éléments à la corbeille ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"618\"/>\n        <source>Move to Trash</source>\n        <translation>Mettre à la corbeille</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"662\"/>\n        <source>Open With</source>\n        <translation>Ouvrir avec</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"669\"/>\n        <source>System Editor</source>\n        <translation>Éditeur système</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"290\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"293\"/>\n        <source>Create Folder</source>\n        <translation>Créer un répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"291\"/>\n        <source>A folder with that name already exists!</source>\n        <translation>Un répertoire avec ce nom existe déjà !</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"294\"/>\n        <source>Failed to create the folder!</source>\n        <translation>Création du répertoire échouée !</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"307\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"316\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"321\"/>\n        <source>Rename Folder</source>\n        <translation>Renommer le répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"307\"/>\n        <source>Folder Name</source>\n        <translation>Nom du répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"317\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"322\"/>\n        <source>Failed to rename the folder!</source>\n        <translation>Renommage du répertoire échouée !</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"336\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Etes vous certain de vouloir supprimer ce répertoire et son contenu ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"343\"/>\n        <source>Failed to delete the folder!</source>\n        <translation>Supression du répertoire échouée !</translation>\n    </message>\n</context>\n<context>\n    <name>BookmarkManager</name>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"61\"/>\n        <source>Toggle Bookmark</source>\n        <translation>Basculer le signet</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"96\"/>\n        <source>Goto bookmark</source>\n        <translation>Aller au signet</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"97\"/>\n        <source>Remove bookmark</source>\n        <translation>Supprimer le signet</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"98\"/>\n        <source>Remove all bookmarks for this file</source>\n        <translation>Supprimer tous les signets pour ce fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"99\"/>\n        <source>Remove all bookmarks for all files</source>\n        <translation>Supprimer tous les signets pour tous les fichiers</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"115\"/>\n        <source>Bookmarks</source>\n        <translation>Signets</translation>\n    </message>\n</context>\n<context>\n    <name>BookmarkRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"81\"/>\n        <source>Bookmarks</source>\n        <translation>Signets</translation>\n    </message>\n</context>\n<context>\n    <name>BuildConfigDialog</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"14\"/>\n        <source>Build Configuration</source>\n        <oldsource>Build Config Dialog</oldsource>\n        <translation>Configuration de la compilation</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"71\"/>\n        <source>Build ID</source>\n        <translation>ID de compilation</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"45\"/>\n        <source>Build Path</source>\n        <oldsource>Build File</oldsource>\n        <translation>Chemin de configuration</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"85\"/>\n        <source>GOPATH</source>\n        <translation>GOPATH</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"103\"/>\n        <source>GOPATH information</source>\n        <translation>Information GOPATH</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"147\"/>\n        <source>Use Custom GOPATH for Build Path</source>\n        <translation>Utiliser un GOPATH personnalisé pour le chemin de compilation</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"159\"/>\n        <source>Inherit System GOPATH</source>\n        <translation>Hériter du GOPATH System</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"179\"/>\n        <source>Inherit LiteIDE GOPATH</source>\n        <translation>Hériter du GOPATH LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"201\"/>\n        <source>Custom GOPATH (one per line)</source>\n        <translation>GOPATH personnalisé (un par ligne)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"221\"/>\n        <source>Add Directory...</source>\n        <translation>Ajouter un répertoire...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"228\"/>\n        <source>Clear</source>\n        <translation>Effacer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"244\"/>\n        <source>LiteIDE</source>\n        <translation>LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"266\"/>\n        <source>Config</source>\n        <translation>Configuration</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"288\"/>\n        <source>Action</source>\n        <translation>Action</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"310\"/>\n        <source>Custom</source>\n        <oldsource>Build Custom</oldsource>\n        <translation>Personnalisé</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"343\"/>\n        <source>Reset all to initial value</source>\n        <translation>Réaffecter les valeurs initiales</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"69\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"73\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"77\"/>\n        <source>Name</source>\n        <translation>Nom</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"70\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"74\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"78\"/>\n        <source>Value</source>\n        <translation>Valeur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"79\"/>\n        <source>SharedValue</source>\n        <translation>Valeur partagée</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"82\"/>\n        <source>Id</source>\n        <translation>Id</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"83\"/>\n        <source>Cmd</source>\n        <translation>Cmd</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"293\"/>\n        <source>Choose directory to add to GOPATH:</source>\n        <translation>Choisir un répertoire à ajouter à GOPATH :</translation>\n    </message>\n</context>\n<context>\n    <name>CreateDirDialog</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"94\"/>\n        <source>Create Folder</source>\n        <translation>Créer un répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"96\"/>\n        <source>Directory:</source>\n        <translation>Répertoire :</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"98\"/>\n        <source>Dir Name:</source>\n        <translation>Nom du répertoire :</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"106\"/>\n        <source>Create</source>\n        <translation>Créer</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"107\"/>\n        <source>Cancel</source>\n        <translation>Annuler</translation>\n    </message>\n</context>\n<context>\n    <name>CreateFileDialog</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"44\"/>\n        <source>Create File</source>\n        <oldsource>Create File Dialog</oldsource>\n        <translation>Création de fichier guidée</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"46\"/>\n        <source>Directory:</source>\n        <translation>Répertoire :</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"48\"/>\n        <source>File Name:</source>\n        <translation>Nom du fichier :</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"56\"/>\n        <source>Create</source>\n        <translation>Créer</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"57\"/>\n        <source>Create and Edit</source>\n        <translation>Créer et éditer</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"58\"/>\n        <source>Cancel</source>\n        <translation>Annuler</translation>\n    </message>\n</context>\n<context>\n    <name>DebugWidget</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"122\"/>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"321\"/>\n        <source>Add Watch</source>\n        <translation>Ajouter un espion</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"221\"/>\n        <source>Async Record</source>\n        <oldsource>AsyncRecord</oldsource>\n        <translation>Enregistrement asynchrone</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"222\"/>\n        <source>Variables</source>\n        <translation>Variables</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"223\"/>\n        <source>Watch</source>\n        <translation>Espion</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"224\"/>\n        <source>Call Stack</source>\n        <oldsource>CallStack</oldsource>\n        <translation>Pile de rappel</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"225\"/>\n        <source>Threads</source>\n        <translation>Threads</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"226\"/>\n        <source>Goroutines</source>\n        <translation>Goroutines</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"227\"/>\n        <source>Registers</source>\n        <translation>Registres</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"228\"/>\n        <source>Libraries</source>\n        <oldsource>Library</oldsource>\n        <translation>Librairies</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"229\"/>\n        <source>Console</source>\n        <translation>Console</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"321\"/>\n        <source>Watch expression (e.g. buf main.var os.Stdout):</source>\n        <translation>Expression de l&apos;espoin (ex: buf main.var os.Stdout) :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"124\"/>\n        <source>Remove Watch</source>\n        <translation>Supprimer l&apos;espion</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"125\"/>\n        <source>Remove All Watches</source>\n        <translation>Supprimer tous les espions</translation>\n    </message>\n</context>\n<context>\n    <name>DlvDebuggerOption</name>\n    <message>\n        <location filename=\"src/plugins/dlvdebugger/dlvdebuggeroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formulaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/dlvdebugger/dlvdebuggeroption.ui\" line=\"20\"/>\n        <source>delve debug pass flags: (example --check-go-version=false)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>DocumentBrowser</name>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"67\"/>\n        <source>Back</source>\n        <oldsource>Backward</oldsource>\n        <translation>Précédent</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"68\"/>\n        <source>Forward</source>\n        <translation>Suivant</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"69\"/>\n        <source>Reload</source>\n        <translation>Recharger</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"75\"/>\n        <source>Increase Font Size</source>\n        <translation>Agrandir la police</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"78\"/>\n        <source>Decrease Font Size</source>\n        <translation>Réduire la police</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"81\"/>\n        <source>Reset Font Size</source>\n        <translation>Réinitialiser la taille police</translation>\n    </message>\n</context>\n<context>\n    <name>DocumentBrowserFactory</name>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowserfactory.cpp\" line=\"67\"/>\n        <source>DocumentBrowser</source>\n        <translation>Navigateur de document</translation>\n    </message>\n</context>\n<context>\n    <name>EditorManager</name>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"139\"/>\n        <source>Close</source>\n        <translation>Fermer</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"165\"/>\n        <source>Move to New Window</source>\n        <oldsource>Move To New Window</oldsource>\n        <translation>Déplacer vers une nouvelle fenêtre</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"233\"/>\n        <source>Navigate Forward</source>\n        <oldsource>GoForward</oldsource>\n        <translation>Suivant</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"141\"/>\n        <source>Close Others</source>\n        <oldsource>Close Others Tabs</oldsource>\n        <translation>Fermer les autres</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"111\"/>\n        <source>Open Editor</source>\n        <translation>Ouvrir l&apos;éditeur</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"142\"/>\n        <source>Close All</source>\n        <oldsource>Close All Tabs</oldsource>\n        <translation>Tout fermer</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"143\"/>\n        <source>Close Left Tabs</source>\n        <translation>Fermer les onglets à gauche</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"144\"/>\n        <source>Close Right Tabs</source>\n        <translation>Fermer les onglets à droite</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"145\"/>\n        <source>Close Files in Same Folder</source>\n        <oldsource>Close Same Folder Files</oldsource>\n        <translation>Fermer les fichiers du même répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"146\"/>\n        <source>Close Files in Other Folders</source>\n        <oldsource>Close Other Folder Files</oldsource>\n        <translation>Fermer les fichiers d&apos;autres répertoires</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"147\"/>\n        <source>Copy Full Path to Clipboard</source>\n        <oldsource>Copy Path to Clipboard</oldsource>\n        <translation>Copier le chemin complet dans le presse-papier</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"150\"/>\n        <source>Show in Explorer</source>\n        <translation>Montrer dans l&apos;explorateur</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"152\"/>\n        <source>Show in Finder</source>\n        <translation>Montrer dans la recherche</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"154\"/>\n        <source>Show Containing Folder</source>\n        <translation>Montrer son répertoire parent</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"158\"/>\n        <source>Open Command Prompt Here</source>\n        <translation>Ouvrir une ligne de commande ici</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"160\"/>\n        <source>Open Terminal Here</source>\n        <translation>Ouvrir un terminal ici</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"162\"/>\n        <source>Open in Integrated Terminal</source>\n        <translation type=\"unfinished\">Ouvrir dans le terminal intégré</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"224\"/>\n        <source>Navigate Backward</source>\n        <translation>Reculer vers la position précédente</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"426\"/>\n        <source>Save changes to %1?</source>\n        <translation>Enregistrer les changement vers %1 ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"427\"/>\n        <source>Unsaved Modifications</source>\n        <oldsource>Save Modify</oldsource>\n        <translation>Modifications non en registrées</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"524\"/>\n        <source>All Files (*)</source>\n        <translation>Tous fichiers (*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"526\"/>\n        <source>Save As</source>\n        <translation>Enregistrer sous</translation>\n    </message>\n</context>\n<context>\n    <name>EnvManager</name>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"436\"/>\n        <source>Environment Toolbar</source>\n        <oldsource>Environment ToolBar</oldsource>\n        <translation>Barre d&apos;environnement</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"443\"/>\n        <source>Switching current environment</source>\n        <oldsource>Switch Current Environment</oldsource>\n        <translation>Intervertir l&apos;environnement courant</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"446\"/>\n        <source>Edit current environment</source>\n        <oldsource>Edit Current Environment</oldsource>\n        <translation>Modifier l&apos;environnement courant</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"447\"/>\n        <source>Reload current environment</source>\n        <oldsource>Reload Current Environment</oldsource>\n        <translation>Recharger l&apos;environnement courant</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"451\"/>\n        <source>Select Environment</source>\n        <translation>Sélectionner l&apos;environnement</translation>\n    </message>\n</context>\n<context>\n    <name>ExportDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"14\"/>\n        <source>Dialog</source>\n        <translation>Dialogue</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"22\"/>\n        <source>Name:</source>\n        <translation>Nom :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"49\"/>\n        <source>Export</source>\n        <translation>Exporter</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"56\"/>\n        <source>ExportAndView</source>\n        <translation>Exporter et afficher</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"194\"/>\n        <source>Use Vim-style Editing</source>\n        <translation>Modifier avec le Style-Vim</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"196\"/>\n        <source>Read .vimrc</source>\n        <translation>Lire .vimrc</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"198\"/>\n        <source>Path to .vimrc</source>\n        <translation>Chemin vers .vimrc</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal::FakeVimHandler</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"153\"/>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"161\"/>\n        <source>Unknown option: %1</source>\n        <translation>Option inconnue : %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"156\"/>\n        <source>Argument must be positive: %1=%2</source>\n        <translation>L&apos;argument doit être positive : %1=%2</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"949\"/>\n        <source>Mark &quot;%1&quot; not set.</source>\n        <translation>Marquer &quot;%1&quot; non renseigné.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3538\"/>\n        <source>%1%2%</source>\n        <translation>%1%2</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3540\"/>\n        <source>%1All</source>\n        <translation>Tous%1</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3554\"/>\n        <source>Not implemented in FakeVim.</source>\n        <translation>Non implémenté dans FakeVim.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5719\"/>\n        <source>Unknown option:</source>\n        <translation>Option inconnue :</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5730\"/>\n        <source>Invalid argument:</source>\n        <translation>Argument invalide :</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5733\"/>\n        <source>Trailing characters:</source>\n        <translation>Caractères de fin :</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5816\"/>\n        <source>Move lines into themselves.</source>\n        <translation>Déplacement des lignes dans elles-mêmes.</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5860\"/>\n        <source>%n lines moved.</source>\n        <translation type=\"unfinished\">\n            <numerusform>%n lignes déplacées.</numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5920\"/>\n        <source>File &quot;%1&quot; exists (add ! to override)</source>\n        <translation>Le fichier &quot;%1&quot; existe (ajouter ! pour outrepasser)</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5934\"/>\n        <source>Cannot open file &quot;%1&quot; for writing</source>\n        <translation>Impossible d&apos;ouvrir le fichier &quot;%1&quot; pour écriture</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5940\"/>\n        <source>&quot;%1&quot; %2 %3L, %4C written.</source>\n        <translation>&quot;%1&quot; %2 %3L, %4C écrits.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5949\"/>\n        <source>Cannot open file &quot;%1&quot; for reading</source>\n        <translation>Impossible d&apos;ouvrir le fichier &quot;%1&quot; pour lecture</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5978\"/>\n        <source>&quot;%1&quot; %2L, %3C</source>\n        <translation>&quot;%1&quot; %2L, %3C</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6005\"/>\n        <source>%n lines filtered.</source>\n        <translation type=\"unfinished\">\n            <numerusform>%n lignes filtrées.</numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6093\"/>\n        <source>Cannot open file %1</source>\n        <translation>Impossible d&apos;ouvrir le fichier %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6259\"/>\n        <source>Invalid regular expression: %1</source>\n        <translation>Expression régulière invalide : %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6295\"/>\n        <source>Pattern not found: %1</source>\n        <translation>Pattern non trouvé : %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6299\"/>\n        <source>Search hit BOTTOM, continuing at TOP.</source>\n        <translation>Fin atteinte, reprise reprise le début.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6300\"/>\n        <source>Search hit TOP, continuing at BOTTOM.</source>\n        <translation>Début atteint, reprise depuis la fin.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6305\"/>\n        <source>Search hit BOTTOM without match for: %1</source>\n        <translation>Fin atteinte sans correspondance avec : %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6306\"/>\n        <source>Search hit TOP without match for: %1</source>\n        <translation>Début atteint sans correspondance avec : %1</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6413\"/>\n        <source>%n lines indented.</source>\n        <translation type=\"unfinished\">\n            <numerusform>%n lignes indentées.</numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6470\"/>\n        <source>%n lines %1ed %2 time.</source>\n        <translation type=\"unfinished\">\n            <numerusform>%n lignes %1 %2 fois.</numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7043\"/>\n        <source>%n lines yanked.</source>\n        <translation type=\"unfinished\">\n            <numerusform>%n lignes mémorisées.</numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7748\"/>\n        <source>Already at oldest change.</source>\n        <translation>Déjà au plus vieux changement.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7749\"/>\n        <source>Already at newest change.</source>\n        <translation>Déjà au plus récent changement.</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal::FakeVimHandler::Private</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"2788\"/>\n        <source>Recursive mapping</source>\n        <translation>Mapping recursif</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"4195\"/>\n        <source>Type Alt-V, Alt-V to quit FakeVim mode.</source>\n        <translation>Tapper Alt-V, Alt-V pour quitter le mode FakeVim.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5941\"/>\n        <source> [New] </source>\n        <translation> [Nouveau] </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6166\"/>\n        <source>Not an editor command: %1</source>\n        <translation>N&apos;est pas une commande de l&apos;editeur : %1</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVimEdit</name>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimedit.cpp\" line=\"68\"/>\n        <source>Use FakeVim Editing</source>\n        <translation>Utiliser l&apos;édition FakeVim</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVimEditOption</name>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Depuis</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"20\"/>\n        <source>FakeVim initialization command list (# start is comment):</source>\n        <translation>Initialisation de la liste de commandes de FakeVim (# démarre un commentaire) :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"28\"/>\n        <source>Load default init command list</source>\n        <translation>Charger la liste de commandes par défaut</translation>\n    </message>\n</context>\n<context>\n    <name>FiFoTty</name>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"86\"/>\n        <source>Cannot create temporary file: %1</source>\n        <translation>Impossible de créer le fichier temporaire : %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"97\"/>\n        <source>Cannot create FiFo %1: %2</source>\n        <translation>Impossible de créer FiFo %1 : %2</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"104\"/>\n        <source>Cannot open FiFo %1: %2</source>\n        <translation>Impossible d&apos;ouvrir FiFo %1 : %2</translation>\n    </message>\n</context>\n<context>\n    <name>FileBrowser</name>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"98\"/>\n        <source>Synchronize with editor</source>\n        <translation>Synchroniser avec l&apos;éditeur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"159\"/>\n        <source>Set As Root Folder</source>\n        <oldsource>Set Folder To Root</oldsource>\n        <translation>Définir comme répertoire racine</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"160\"/>\n        <source>Open Folder in New Window</source>\n        <translation>Ouvrir le répertoire dans une nouvelle fenêtre</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"141\"/>\n        <source>Open Parent</source>\n        <oldsource>Open to Parent</oldsource>\n        <translation>Ouvre le parent</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"101\"/>\n        <source>Reload Folder</source>\n        <translation>Recharger le répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"103\"/>\n        <source>Show Hidden Files</source>\n        <translation>Afficher les fichiers masqués</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"110\"/>\n        <source>Show Details</source>\n        <translation>Afficher les détails</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"119\"/>\n        <source>Execute File</source>\n        <translation>Exécuter le programme</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"122\"/>\n        <source>Debug File</source>\n        <translation>Dégoguer le programme</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"161\"/>\n        <source>Add to Folders</source>\n        <translation>Ajouter au répertoires</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"169\"/>\n        <source>Filter</source>\n        <translation>Filtrer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"175\"/>\n        <source>File System</source>\n        <translation>Système de fichiers</translation>\n    </message>\n</context>\n<context>\n    <name>FileBrowserOption</name>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formulaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"20\"/>\n        <source>Terminal</source>\n        <translation>Terminal</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"26\"/>\n        <source>Command:</source>\n        <translation>Commande :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"36\"/>\n        <source>Arguments:</source>\n        <translation>Arguments :</translation>\n    </message>\n</context>\n<context>\n    <name>FileManager</name>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"189\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"211\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"233\"/>\n        <source>All Files (*)</source>\n        <translation>Tous les fichiers (*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"397\"/>\n        <source>LiteIDE</source>\n        <translation>LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"398\"/>\n        <source>Project &apos;%1&apos; has been created.\nDo you want to open it now?</source>\n        <oldsource>Project &apos;%1&apos; is created.\nDo you want to load?</oldsource>\n        <translation>Projet &apos;%1&apos; a été créé.\nVoulez-vous le charger ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"301\"/>\n        <source>Open Project or File</source>\n        <translation>Ouvrir un projet ou un fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"76\"/>\n        <source>Show Hidden Files</source>\n        <translation>Afficher les fichiers masqués</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"79\"/>\n        <source>Show Details</source>\n        <translation>Afficher les détails</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"85\"/>\n        <source>Split Mode</source>\n        <translation>Mode séparé</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"127\"/>\n        <source>Folders</source>\n        <oldsource>Folers</oldsource>\n        <translation>Répertoires</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"186\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"208\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"230\"/>\n        <source>All Support Files (%1)</source>\n        <translation>Tous les fichiers supportés (%1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"314\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"332\"/>\n        <source>Select a folder:</source>\n        <oldsource>Open Folder</oldsource>\n        <translation>Sélectionner le répertoire :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"679\"/>\n        <source>%1\nThis file has been deleted from the drive,\nbut you have unsaved modifications in your LiteIDE editor.\n\nDo you want to close the editor?\nAnswering &quot;Yes&quot; will discard your unsaved changes.</source>\n        <translation>%1\nCe fichier a été supprimé du disque,\nmais vous avez des modifications non enregistrées dans votre éditeur LiteIDE.\n\nVoulez-vous fermer l&apos;éditeur ?\nRépondre &quot;Oui&quot; vous fera perdre vos modifications non enregistrées.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"686\"/>\n        <source>%1\nThis file has been deleted from the drive.\n\nDo you want to close the editor?</source>\n        <translation>%1\nCe fichier a été supprimé du disque.\n\nVoulez-vous fermer l&apos;éditeur ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"719\"/>\n        <source>%1\nThis file has been modified on the drive,\nbut you have unsaved modifications in your LiteIDE editor.\n\nDo you want to reload the file from disk?\nAnswering &quot;Yes&quot; will discard your unsaved changes.</source>\n        <translation>%1\nCe fichier a été modifié sur le disque,\nmais vous avez des modifications non enregistrées dans votre éditeur LiteIDE.\n\nVoulez-vous recharger le fichier depuis le disque ?\nRépondre &quot;Oui&quot; vous fera perdre vos modifications non enregistrées.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"726\"/>\n        <source>%1\nThis file has been modified on the drive.\n\nDo you want to reload the file from disk?</source>\n        <translation>%1\nCe fichier a été modifié sur le disque.\n\nVoulez-vous recharger le fichier depuis le disque ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"350\"/>\n        <source>Open Files</source>\n        <translation>Ouvrir des fichiers</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"82\"/>\n        <source>Synchronize with editor</source>\n        <translation>Synchroniser avec l&apos;éditeur</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"113\"/>\n        <source>Filter</source>\n        <translation>Filtrer</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"363\"/>\n        <source>Open Project</source>\n        <translation>Ouvrir un projet</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"683\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"688\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"723\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"728\"/>\n        <source>LiteIDE X</source>\n        <translation>LiteIDE X</translation>\n    </message>\n</context>\n<context>\n    <name>FileRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"135\"/>\n        <source>Files</source>\n        <translation>Fichiers</translation>\n    </message>\n</context>\n<context>\n    <name>FileSearch</name>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"217\"/>\n        <source>Match whole word</source>\n        <oldsource>Match word</oldsource>\n        <translation>Mot entier uniquement</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"218\"/>\n        <source>Match case</source>\n        <translation>Respecter la casse</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"219\"/>\n        <source>Regular expression</source>\n        <translation>Expression régulière</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"220\"/>\n        <source>Scan subdirectories</source>\n        <oldsource>Look in subdirs</oldsource>\n        <translation>Recherche dans les sous-répertoires</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"241\"/>\n        <source>Search for:</source>\n        <translation>Recherche :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"243\"/>\n        <source>Options:</source>\n        <translation>Options :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"250\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>Parcourir...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"273\"/>\n        <source>Filter:</source>\n        <translation>Filtrer :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"365\"/>\n        <source>Files on File System</source>\n        <translation>Fichiers sur système de fichiers</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"230\"/>\n        <source>Search</source>\n        <translation>Rechercher</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"231\"/>\n        <source>Cancel</source>\n        <translation>Annuler</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"251\"/>\n        <source>Current Folder</source>\n        <translation>Répertoire courant</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"254\"/>\n        <source>Auto Switch</source>\n        <translation>Bascule automatique</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"278\"/>\n        <source>Clear</source>\n        <translation>Effacer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"480\"/>\n        <source>Open Directory</source>\n        <translation>Ouvrir répertoire</translation>\n    </message>\n</context>\n<context>\n    <name>FileSearchManager</name>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"50\"/>\n        <source>Search Item:</source>\n        <translation>Rechercher l&apos;élément :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"69\"/>\n        <source>Only golang file changes can be revert!</source>\n        <oldsource>This file change cannot be undone!</oldsource>\n        <translation>Seulement les changements de fichier golang sont reversibles !</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"83\"/>\n        <source>New Search</source>\n        <translation>Nouvelle recherche</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"85\"/>\n        <source>File Search</source>\n        <translation>Recherche de fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"89\"/>\n        <source>Search Result</source>\n        <translation>Resultat de recherche</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"248\"/>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"253\"/>\n        <source>LiteIDE X</source>\n        <translation>LiteIDE X</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"248\"/>\n        <source>Warning! Replace text is empty.\nWant to remove all the search items?</source>\n        <translation>Avertissement ! Le texte de remplacement est vide.\nSouhaitez-vous supprimer toutes les correspondances ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"253\"/>\n        <source>Warning! Replace text is whitespace.\nWant to replace to all the search items to whitespace?</source>\n        <translation>Avertissement ! Le texte de remplacement est composé d&apos;espaces.\nSouhaitez-vous supprimer toutes les correspondances par des espaces ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"280\"/>\n        <source>The following files have no write permissions. Do you want to change the permissions?</source>\n        <translation>Les fichiers suivants n&apos;ont pas de permissions en écriture. Voulez-vous changer les permissions ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"283\"/>\n        <source>File is readonly</source>\n        <translation>Le fichier est en lecture seule</translation>\n    </message>\n</context>\n<context>\n    <name>FileSystemWidget</name>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"94\"/>\n        <source>Open File</source>\n        <oldsource>Open Editor</oldsource>\n        <translation>Ouvrir un fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"95\"/>\n        <source>New File...</source>\n        <oldsource>New File</oldsource>\n        <translation>Nouveau fichier...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"96\"/>\n        <source>New File Wizard...</source>\n        <oldsource>New File Wizard</oldsource>\n        <translation>Nouveau fichier (dialogue)...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"320\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"326\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"331\"/>\n        <source>Rename File</source>\n        <translation>Renommer le fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"98\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"345\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"350\"/>\n        <source>Delete File</source>\n        <oldsource>Remove File</oldsource>\n        <translation>Supprimer le fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"100\"/>\n        <source>New Folder...</source>\n        <oldsource>New Folder</oldsource>\n        <translation>Nouveau répertoire...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"346\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Êtes-vous certain de vouloir supprimer ce fichier définitivement ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"386\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"395\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"400\"/>\n        <source>Rename Folder</source>\n        <translation>Renommer le répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"102\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"414\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"421\"/>\n        <source>Delete Folder</source>\n        <oldsource>Remove Folder</oldsource>\n        <translation>Supprimer le répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"97\"/>\n        <source>Rename File...</source>\n        <translation>Renommer le fichier...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"101\"/>\n        <source>Rename Folder...</source>\n        <translation>Renommer le répertoire...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"104\"/>\n        <source>Open Terminal Here</source>\n        <translation>Ouvrir le terminal ici</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"105\"/>\n        <source>Open Explorer Here</source>\n        <translation>Ouvrir l&apos;explorateur ici</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"107\"/>\n        <source>View Godoc Here</source>\n        <translation>Afficher Godoc ici</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"454\"/>\n        <source>Add Folder</source>\n        <translation>Ajouter un répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"110\"/>\n        <source>Close Folder</source>\n        <translation>Fermer le répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"109\"/>\n        <source>Add Folder...</source>\n        <translation>Ajouter un répertoire...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"112\"/>\n        <source>Close All Folders</source>\n        <translation>Fermer tous les répertoires</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"279\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"289\"/>\n        <source>Create File</source>\n        <translation>Créer un fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"280\"/>\n        <source>A file with that name already exists!</source>\n        <oldsource>The file already exists!</oldsource>\n        <translation>Le fichier existe déjà !</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"290\"/>\n        <source>Failed to create the file!</source>\n        <translation>Impossible de créer le fichier !</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"320\"/>\n        <source>New Name:</source>\n        <translation>Nouveau nom :</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"327\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"332\"/>\n        <source>Failed to rename the file!</source>\n        <translation>Impossible de renommer le fichier !</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"415\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Êtes-vous certain de vouloir supprimer définitivement ce répertoire et son contenu ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"351\"/>\n        <source>Failed to delete the file!</source>\n        <oldsource>Failed to remove the file!</oldsource>\n        <translation>Impossible de supprimer le fichier !</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"369\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"372\"/>\n        <source>Create Folder</source>\n        <translation>Créer un répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"370\"/>\n        <source>A folder with that name already exists!</source>\n        <oldsource>The folder name is exists!</oldsource>\n        <translation>Un répertoire avec ce nom existe déjà !</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"373\"/>\n        <source>Failed to create the folder!</source>\n        <translation>Impossible de créer le répertoire !</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"386\"/>\n        <source>Folder Name</source>\n        <translation>Nom du répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"396\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"401\"/>\n        <source>Failed to rename the folder!</source>\n        <translation>Impossible de renommer le répertoire !</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"422\"/>\n        <source>Failed to delete the folder!</source>\n        <oldsource>Failed to remove the folder!</oldsource>\n        <translation>Impossible de supprimer le répertoire !</translation>\n    </message>\n</context>\n<context>\n    <name>Find::Internal::SearchResultWidget</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"132\"/>\n        <source>Search was canceled.</source>\n        <translation>La recherche a été abandonnée.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"163\"/>\n        <source>Cancel</source>\n        <translation>Annuler</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"167\"/>\n        <source>Repeat the search with same parameters</source>\n        <translation>Répéter la recherche avec les même paramètres</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"168\"/>\n        <source>Search again</source>\n        <translation>Rechercher de nouveau</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"174\"/>\n        <source>Set show replace mode ui</source>\n        <translation>Définir le mode d&apos;affichage du remplacement</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"175\"/>\n        <source>Show Replace</source>\n        <translation>Afficher remplacement</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"180\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"441\"/>\n        <source>Replace with:</source>\n        <translation>Remplacer par :</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"186\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"442\"/>\n        <source>Replace all occurrences</source>\n        <translation>Remplacer toutes les occurences</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"187\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"443\"/>\n        <source>Replace</source>\n        <translation>Remplacer</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"191\"/>\n        <source>Preserve case</source>\n        <translation>Respecter la casse</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"204\"/>\n        <source>Expand all items</source>\n        <translation>Etendre tous les éléments</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"209\"/>\n        <source>Collapse all items</source>\n        <translation>Refermer tous les éléments</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"318\"/>\n        <source>Revert with:</source>\n        <translation>Revenir à :</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"319\"/>\n        <source>Revert</source>\n        <translation>Revenir</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"320\"/>\n        <source>Revert all occurrences</source>\n        <translation>Revenir pour toutes les occurences</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"592\"/>\n        <source>%n matches replaced.</source>\n        <translation type=\"unfinished\">\n            <numerusform>%n correspondances remplacées.</numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"594\"/>\n        <source>searching... %n matches found.</source>\n        <translation type=\"unfinished\">\n            <numerusform>recherche... %n correspondances trouvées.</numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"600\"/>\n        <source>searching ...</source>\n        <translation>recherche...</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"606\"/>\n        <source>No matches found.</source>\n        <translation>Pas de correspondance trouvée.</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"608\"/>\n        <source>%n matches found.</source>\n        <translation type=\"unfinished\">\n            <numerusform>%n correspondances trouvées.</numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n</context>\n<context>\n    <name>FindApiEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.h\" line=\"73\"/>\n        <source>Search</source>\n        <translation>Rechercher</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.h\" line=\"74\"/>\n        <source>Stop Search</source>\n        <translation>Arrêter la recherche</translation>\n    </message>\n</context>\n<context>\n    <name>FindApiWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"284\"/>\n        <source>Search</source>\n        <translation>Rechercher</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"305\"/>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"337\"/>\n        <source>Find</source>\n        <translation>Trouver</translation>\n    </message>\n</context>\n<context>\n    <name>FindDocWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"96\"/>\n        <source>Search</source>\n        <translation>Rechercher</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"104\"/>\n        <source>Find</source>\n        <translation>Trouver</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"123\"/>\n        <source>Find All</source>\n        <translation>Trouver tout</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"124\"/>\n        <source>Find const</source>\n        <translation>Trouver des constantes</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"126\"/>\n        <source>Find func</source>\n        <translation>Trouver des fonctions</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"128\"/>\n        <source>Find interface</source>\n        <translation>Trouver des interfaces</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"130\"/>\n        <source>Find pkg</source>\n        <translation>Trouver des packages</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"132\"/>\n        <source>Find struct</source>\n        <translation>Trouver des structures</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"134\"/>\n        <source>Find type</source>\n        <translation>Trouver des types</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"136\"/>\n        <source>Find var</source>\n        <translation>Trouver des variables</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"138\"/>\n        <source>Use Regexp</source>\n        <translation>Utiliser des RegExp</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"140\"/>\n        <source>Match Case</source>\n        <translation>Respecter la casse</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"142\"/>\n        <source>Match Word</source>\n        <translation>Mot entier uniquement</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"169\"/>\n        <source>Help</source>\n        <translation>Aide</translation>\n    </message>\n</context>\n<context>\n    <name>FindEditor</name>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"63\"/>\n        <source>Match case</source>\n        <translation>Respecter la casse</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"64\"/>\n        <source>Regular expression</source>\n        <translation>Expression régulière</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"65\"/>\n        <source>Wrap around</source>\n        <translation>Enrouler autour</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"56\"/>\n        <source>Find Next</source>\n        <translation>Suivant</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"57\"/>\n        <source>Find Previous</source>\n        <oldsource>Find Prev</oldsource>\n        <translation>Précédent</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"58\"/>\n        <source>Replace With:</source>\n        <translation>Remplacer par :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"59\"/>\n        <source>Replace</source>\n        <translation>Remplacer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"60\"/>\n        <source>Replace All</source>\n        <translation>Tout remplacer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"62\"/>\n        <source>Match whole word only</source>\n        <translation>Mot entier uniquement</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"72\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"250\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"472\"/>\n        <source>Ready</source>\n        <translation>Prêt</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"81\"/>\n        <source>Close</source>\n        <translation>Fermer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"84\"/>\n        <source>Show Replace</source>\n        <translation>Afficher remplacement</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"103\"/>\n        <source>Find What:</source>\n        <translation>Trouver ceci :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"115\"/>\n        <source>Options:</source>\n        <oldsource>Find Option:</oldsource>\n        <translation>Options :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"221\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"393\"/>\n        <source>Not found</source>\n        <translation>Aucune occurrence</translation>\n    </message>\n</context>\n<context>\n    <name>FolderListView</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"252\"/>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"262\"/>\n        <source>Delete File</source>\n        <translation>Supprimer le fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"253\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Êtes-vous certain de supprimer ce fichier définitivement ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"263\"/>\n        <source>Failed to delete the file!</source>\n        <translation>Impossible de supprimer ce fichier !</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"275\"/>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"285\"/>\n        <source>Delete Folder</source>\n        <translation>Supprimer le répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"276\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Êtes-vous certain de supprimer ce répertoire et son contenu définitivement ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"286\"/>\n        <source>Failed to delete the folder!</source>\n        <translation>Impossible de supprimer ce répertoire !</translation>\n    </message>\n</context>\n<context>\n    <name>FolderRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"166\"/>\n        <source>Folders</source>\n        <translation>Répertoire</translation>\n    </message>\n</context>\n<context>\n    <name>FolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"173\"/>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"183\"/>\n        <source>Delete File</source>\n        <translation>Supprimer ce fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"174\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Êtes-vous certain de supprimer ce fichier définitivement ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"184\"/>\n        <source>Failed to delete the file!</source>\n        <translation>Impossible de supprimer ce fichier !</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"230\"/>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"240\"/>\n        <source>Delete Folder</source>\n        <translation>Supprimer le répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"231\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Êtes-vous certain de supprimer ce répertoire et son contenu définitivement ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"241\"/>\n        <source>Failed to delete the folder!</source>\n        <translation>Impossible de supprimer ce répertoire !</translation>\n    </message>\n</context>\n<context>\n    <name>GdbDebuggerOption</name>\n    <message>\n        <location filename=\"src/plugins/gdbdebugger/gdbdebuggeroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formulaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/gdbdebugger/gdbdebuggeroption.ui\" line=\"20\"/>\n        <source>Enable --tty for program being debugged.</source>\n        <translation>Active --tty pour les programmes débogués.</translation>\n    </message>\n</context>\n<context>\n    <name>GoAddTagsDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"14\"/>\n        <source>Add Tags To Struct Field</source>\n        <translation>Ajouter des Tags aux champs de la structure</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"23\"/>\n        <source>Add JSON Tag</source>\n        <translation>Ajouter le Tag JSON</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"54\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"105\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"169\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"197\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"281\"/>\n        <source>Options</source>\n        <translation>Options</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"61\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"112\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"176\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"204\"/>\n        <source>Multiple options separated by commas</source>\n        <oldsource>Multiple options are separated by commas</oldsource>\n        <translation>Multiple options séparées by des virgules</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"74\"/>\n        <source>Add XML Tag</source>\n        <translation>Ajouter le Tag XML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"125\"/>\n        <source>Add Custom Tags</source>\n        <translation>Ajouter des Tags personnalisés</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"155\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"187\"/>\n        <source>Tag Name</source>\n        <translation>Nom du Tag</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"162\"/>\n        <source>Setup custom tag name</source>\n        <translation>Définir le nom du tag personnalisé</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"299\"/>\n        <source>Sort sorts the tags in increasing order according to the key name</source>\n        <translation>Trier les tags par ordre croissant du nom de la clé</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"306\"/>\n        <source>Override current tags when adding tags</source>\n        <translation>Surcharger les tags courants avec l&apos;ajout de tags</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"316\"/>\n        <source>Info</source>\n        <translation>Info</translation>\n    </message>\n</context>\n<context>\n    <name>GoRemoveTagsDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"14\"/>\n        <source>Remove Tags From Struct Field</source>\n        <translation>Supprimer les Tags des champs de structure</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"23\"/>\n        <source>Remove Tags And Options</source>\n        <translation>Supprimer les Tags et Options</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"29\"/>\n        <source>Clear All Tags</source>\n        <translation>Nettoyer tous les Tags</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"39\"/>\n        <source>Clear All Tags Options</source>\n        <oldsource>Clear All Tag Options</oldsource>\n        <translation>Nettoyer toutes les options des Tags</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"46\"/>\n        <source>Remove JSON Tag</source>\n        <translation>Supprimer les Tags JSON</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"53\"/>\n        <source>Remove XML Tag</source>\n        <translation>Supprimer les Tags XML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"60\"/>\n        <source>Remove Custom Tag</source>\n        <translation>Supprimer les Tags personnalisés</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"70\"/>\n        <source>Multiple tags separated by commas</source>\n        <oldsource>Multiple tags  are separated by commas</oldsource>\n        <translation>Les Tags multiples sont séparés par des virgules</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"77\"/>\n        <source>Remove JSON Options</source>\n        <translation>Supprimer les options des Tags JSON</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"84\"/>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"98\"/>\n        <source>Multiple options separated by commas</source>\n        <oldsource>Multiple options are separated by commas</oldsource>\n        <translation>Les options multiples sont séparées par des virgules</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"91\"/>\n        <source>Remove XML Options</source>\n        <translation>Supprimer les options des Tags XML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"111\"/>\n        <source>Remove Custom Tag Options</source>\n        <translation>Supprimer les options des Tags personnalisés</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"118\"/>\n        <source>Setup remove custom tag and option, example tag=opt1,tag=opt2</source>\n        <oldsource>Setup remove custom tag option, example tag=opt1,tag=opt2</oldsource>\n        <translation>Définir l&apos;option de tag personnalisé à supprimer, exemple tag=opt1,tag=opt2</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"121\"/>\n        <source>tag=option</source>\n        <translation>tag=option</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"131\"/>\n        <source>Info</source>\n        <translation>Info</translation>\n    </message>\n</context>\n<context>\n    <name>GolangAst</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"60\"/>\n        <source>No outline available</source>\n        <translation>Aucun définition JSON disponible</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"74\"/>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"77\"/>\n        <source>Synchronize with editor</source>\n        <translation>Synchroniser avec l&apos;éditeur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"80\"/>\n        <source>Go Class View</source>\n        <oldsource>Class View</oldsource>\n        <translation>Go Class explorateur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"81\"/>\n        <source>Go Outline</source>\n        <oldsource>Outline</oldsource>\n        <translation>Go Outline</translation>\n    </message>\n</context>\n<context>\n    <name>GolangAstOption</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formulaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"20\"/>\n        <source>QuickOpenSymbol</source>\n        <translation>QuickOpenSymbol</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"26\"/>\n        <source>Show import path</source>\n        <translation>Afficher le chemin d&apos;import</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"33\"/>\n        <source>Match case sensitive</source>\n        <translation>Respecter la casse</translation>\n    </message>\n</context>\n<context>\n    <name>GolangCodeOption</name>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formulaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"20\"/>\n        <source>PKG automitic import prompt</source>\n        <translation>Invite d&apos;import automatique de packages</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"26\"/>\n        <source>PKG automatic import hints for all packages (GOPATH)</source>\n        <translation>Conseils d&apos;import automatique pour tous les packages (GOPATH)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"33\"/>\n        <source>PKG automatic import hints for standard package</source>\n        <translation>Conseils d&apos;import automatique pour les packages standard</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"43\"/>\n        <source>Gocode</source>\n        <oldsource>Go API</oldsource>\n        <translation>Gocode</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"56\"/>\n        <source>Auto update depends package when it&apos;s source changed.</source>\n        <oldsource>Auto update depends package when its source is changed.</oldsource>\n        <translation>Mise à jour automatique des dépendances quand sa source est changée.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"49\"/>\n        <source>Close gocode when exiting</source>\n        <translation>Fermer gocode en quittant</translation>\n    </message>\n</context>\n<context>\n    <name>GolangDoc</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"100\"/>\n        <source>Godoc Search</source>\n        <translation>Recherche Godoc</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"92\"/>\n        <source>Go Doc Search</source>\n        <oldsource>Golang Doc Search</oldsource>\n        <translation>Recherche Golang Doc</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"96\"/>\n        <source>Go Api Index</source>\n        <oldsource>Golang Api Index</oldsource>\n        <translation>Index de l&apos;API Golang</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"111\"/>\n        <source>Find Package:</source>\n        <translation>Trouver le package :</translation>\n    </message>\n</context>\n<context>\n    <name>GolangDocOption</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formulaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"20\"/>\n        <source>Go API</source>\n        <translation>G API</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"26\"/>\n        <source>Use default context (fast)</source>\n        <translation>Utilisation du contexte par défault (rapide)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"33\"/>\n        <source>Only load standard API documentation</source>\n        <oldsource>Only load standard api</oldsource>\n        <translation>Charger seulement la documentation standard des API</translation>\n    </message>\n</context>\n<context>\n    <name>GolangEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"90\"/>\n        <source>View import package use godoc</source>\n        <translation>Afficher godoc pour le package importé</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"93\"/>\n        <source>View Expression Information</source>\n        <translation>Afficher l&apos;information sur l&apos;expression</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"96\"/>\n        <source>Jump to Declaration</source>\n        <translation>Aller à la déclaration</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"99\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"105\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"108\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"111\"/>\n        <source>Find Usages</source>\n        <translation>Trouver les utilisations</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"111\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"114\"/>\n        <source>%1 (Module/GOPATH) with GOROOT</source>\n        <translation>%1 (Module/GOPATH) avec GOROOT</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"102\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"114\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"117\"/>\n        <source>Rename Symbol Under Cursor</source>\n        <translation>Renommer le symbole sous le curseur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"170\"/>\n        <source>Stop</source>\n        <translation>Arrêter</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"175\"/>\n        <source>Go Source Query</source>\n        <translation>Go Source Query</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"180\"/>\n        <source>SourceQuery What</source>\n        <translation>Go Source Query What</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"184\"/>\n        <source>Callees</source>\n        <translation>Appelées</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"188\"/>\n        <source>Callers</source>\n        <translation>Appelants</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"192\"/>\n        <source>Callstack</source>\n        <translation>Pile d&apos;appel</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"196\"/>\n        <source>Definition</source>\n        <translation>Définition</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"200\"/>\n        <source>Describe</source>\n        <translation>Description</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"204\"/>\n        <source>Freevars</source>\n        <translation>Variables libres</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"208\"/>\n        <source>Implements</source>\n        <translation>Implémentation</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"212\"/>\n        <source>Implements(GOPATH)</source>\n        <translation>Implémentation(GOPATH)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"216\"/>\n        <source>Peers</source>\n        <translation>Pairs</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"220\"/>\n        <source>Referrers</source>\n        <translation>Référenceurs</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"224\"/>\n        <source>Pointsto</source>\n        <translation>Pointe vers</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"228\"/>\n        <source>Whicherrs</source>\n        <translation>Lesquels</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"232\"/>\n        <source>Add Tags To Struct Field</source>\n        <translation>Ajouter des Tags aux champs de la structure</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"236\"/>\n        <source>Remove Tags From Struct Field</source>\n        <translation>Supprimer des Tags des champs de la structure</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"354\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"391\"/>\n        <source>Refactor</source>\n        <translation>Réusinage de code</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"361\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"399\"/>\n        <source>SourceQuery</source>\n        <translation>Source Query</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"812\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"993\"/>\n        <source>Below files in package %1</source>\n        <translation>Ci-dessous les fichiers dans le package %1</translation>\n    </message>\n</context>\n<context>\n    <name>GolangEditOption</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formulaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"20\"/>\n        <source>Mouse</source>\n        <translation>Souris</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"26\"/>\n        <source>Go root source file editor setup read only</source>\n        <translation>Définir les fichiers source de GO root en lecture seule</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"33\"/>\n        <source>Enable view expression infomation on mouse</source>\n        <translation>Activer l&apos;information sur l&apos;expression à la souris</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"40\"/>\n        <source>Enable mouse navigation</source>\n        <translation>Activer la navigation à la souris</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFileSearch</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangfilesearch.cpp\" line=\"59\"/>\n        <source>Golang Find Usages</source>\n        <translation>Trouver les utilisations Golang</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFmtOption</name>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formulaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"20\"/>\n        <source>Format Options</source>\n        <oldsource>Golang Format</oldsource>\n        <translation>Options de format</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"26\"/>\n        <source>Goimports updates your Go import lines, adding missing ones and removing unreferenced ones.</source>\n        <translation>Goimports actualise les lignes d&apos;import Go, ajoutant les manquantes et supprimant les inutilisés.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"29\"/>\n        <source>Enable update imports line, adding missing ones and removing unreferenced ones.</source>\n        <translation>Actualisation automatique des lignes d&apos;import Go, ajoutant les manquantes et supprimant les inutilisés.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"46\"/>\n        <source>Synchronous</source>\n        <translation>Synchronisme</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"52\"/>\n        <source>Synchronous code formatting</source>\n        <oldsource> Synchronous code formatting</oldsource>\n        <translation>Formatage du code synchrone</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"61\"/>\n        <source>Synchronous code formatting timeout in milliseconds (500ms or more):</source>\n        <translation>Timeout en millisecondes du formatage du code synchrone (500 ms ou +) :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"36\"/>\n        <source>Automatically format code when saving</source>\n        <oldsource>When the editor is saved automatically gofmt</oldsource>\n        <translation>Formater le code automatiquement à l&apos;enregistrement</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFmtPlugin</name>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"58\"/>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"66\"/>\n        <source>Format Code</source>\n        <oldsource>Format Code (goimports)</oldsource>\n        <translation>Formatage du code (goimports)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"59\"/>\n        <source>Format Code (Adjusts Imports)</source>\n        <translation>Formatage du code (ajustement des imports)</translation>\n    </message>\n</context>\n<context>\n    <name>GolangPackageOption</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.cpp\" line=\"304\"/>\n        <source>Choose directory to add to GOPATH:</source>\n        <translation>Choisir le répertoire à ajouter à GOPATH :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"14\"/>\n        <source>Manage GOPATH / Modules</source>\n        <translation>Gérer GOPATH / Modules</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"35\"/>\n        <source>Go Modules</source>\n        <translation>Go Modules</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"78\"/>\n        <source>Custom GONOPROXY</source>\n        <translation>GONOPROXY personnalisé</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"88\"/>\n        <source>Custom GOPROXY</source>\n        <translation>GOPROXY personnalisé</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"95\"/>\n        <source>Custom GO111MODULE</source>\n        <translation>GO111MODULE personnalisé</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"102\"/>\n        <source>Custom GONOSUMDB</source>\n        <translation>GONOSUMDB personnalisé</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"109\"/>\n        <source>Custom GOPRIVATE</source>\n        <translation>GOPRIVATE personnalisé</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"125\"/>\n        <source>TextLabel</source>\n        <translation>Libellé de texte</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"137\"/>\n        <source>GOPATH</source>\n        <translation>GOPATH</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"163\"/>\n        <source>Use System GOPATH</source>\n        <translation>Utiliser GOPATH du système</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"186\"/>\n        <source>Reload</source>\n        <translation>Recharger</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"210\"/>\n        <source>Use Custom GOPATH (one per line)</source>\n        <translation>Personnaliser GOPATH (un par ligne)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"233\"/>\n        <source>Add Directory...</source>\n        <translation>Ajouter un répertoire...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"240\"/>\n        <source>Clear</source>\n        <translation>Effacer</translation>\n    </message>\n</context>\n<context>\n    <name>GolangPresentEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"64\"/>\n        <source>Section (s1)</source>\n        <translation>Section (s1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"67\"/>\n        <source>Subsection (s2)</source>\n        <translation>Sous-Section (s2)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"70\"/>\n        <source>Sub-subsection (s3)</source>\n        <translation>Sous-Sous-Section (s3)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"73\"/>\n        <source>Bold</source>\n        <translation>Gras</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"76\"/>\n        <source>Italic</source>\n        <translation>Italique</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"79\"/>\n        <source>Inline Code</source>\n        <translation>Code inline</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"82\"/>\n        <source>Switch Bullets</source>\n        <translation>Puces/pas de puces</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"85\"/>\n        <source>Comment/Uncomment Selection</source>\n        <translation>Commenter/Décommenter la sélection</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"88\"/>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"267\"/>\n        <source>Export HTML</source>\n        <translation>Exporter en HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"91\"/>\n        <source>Verify Present</source>\n        <translation>Vérifier le format Present</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"256\"/>\n        <source>Present verify success</source>\n        <translation>Present vérifié avec succès</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"258\"/>\n        <source>Present verify false</source>\n        <translation>Present vérifié en échec</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"310\"/>\n        <source>Export PDF</source>\n        <translation>Exporter en PDF</translation>\n    </message>\n</context>\n<context>\n    <name>GolangSymbol</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangsymbol.cpp\" line=\"62\"/>\n        <source>Quick Open Symbol by Name</source>\n        <translation>Quick Open Symbol par nom</translation>\n    </message>\n</context>\n<context>\n    <name>GoplayBrowser</name>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"70\"/>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"132\"/>\n        <source>Go Playground</source>\n        <translation>Go Playground</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"72\"/>\n        <source>Run</source>\n        <translation>Exécuter</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"73\"/>\n        <source>Stop</source>\n        <translation>Arrêter</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"74\"/>\n        <source>New</source>\n        <translation>Nouveau</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"75\"/>\n        <source>Load...</source>\n        <translation>Charger...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"76\"/>\n        <source>Save...</source>\n        <translation>Enregistrer...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"77\"/>\n        <source>Explore Folder</source>\n        <translation>Explorer répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"175\"/>\n        <source>Running...</source>\n        <oldsource>Running...\n\n</oldsource>\n        <translation>En cours d&apos;exécution...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"195\"/>\n        <source>Error: %1.</source>\n        <oldsource>\nError: %1.</oldsource>\n        <translation>Erreur : %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"197\"/>\n        <source>Success: %2.</source>\n        <oldsource>\nSuccess: %2.</oldsource>\n        <translation>Succès : %2.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"247\"/>\n        <source>Load File</source>\n        <translation>Charger le fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"247\"/>\n        <source>Select a file to load:</source>\n        <translation>Sélectionner le fichier à charger :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"263\"/>\n        <source>Save File</source>\n        <translation>Enregistrer le fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"263\"/>\n        <source>New File Name:</source>\n        <translation>Nouveau nom du fichier :</translation>\n    </message>\n</context>\n<context>\n    <name>HtmlPreview</name>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"71\"/>\n        <source>Page Style</source>\n        <translation>Style de la page</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"76\"/>\n        <source>Reload</source>\n        <translation>Recharger</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"77\"/>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"381\"/>\n        <source>Export Html</source>\n        <translation>Exporter en HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"78\"/>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"413\"/>\n        <source>Export PDF</source>\n        <translation>Exporter en PDF</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"79\"/>\n        <source>Print Preview</source>\n        <translation>Prévisualiser l&apos;impression</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"82\"/>\n        <source>Synchronize preview and code scrollbars</source>\n        <translation>Synchroniser le défilement entre l&apos;aperçu et le code</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"88\"/>\n        <source>Config</source>\n        <translation>Configuration</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"168\"/>\n        <source>Plain HTML</source>\n        <translation>Plain HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"389\"/>\n        <source>Export Failed</source>\n        <translation>Exportation échouée</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"85\"/>\n        <source>Automatically display preview</source>\n        <oldsource>Automatically Display Preview</oldsource>\n        <translation>Affichage de l&apos;aperçu automatiquement</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"99\"/>\n        <source>HTML Preview</source>\n        <oldsource>Html Preview</oldsource>\n        <translation>Aperçu HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"390\"/>\n        <source>Could not open %1 for writing!</source>\n        <oldsource>Can not write file %1</oldsource>\n        <translation>Impossible d&apos;ouvrir le fichier %1 en écriture !</translation>\n    </message>\n</context>\n<context>\n    <name>ImageEditor</name>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"52\"/>\n        <source>ZoomIn</source>\n        <translation>Zoomer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"55\"/>\n        <source>ZoomOut</source>\n        <translation>Dézoomer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"58\"/>\n        <source>Reset to original size</source>\n        <translation>Rétablir à la taille d&apos;origine</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"61\"/>\n        <source>Fit to view</source>\n        <translation>Adapter à l&apos;écran</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"64\"/>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"247\"/>\n        <source>Play movie</source>\n        <translation>Jouer le film</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"68\"/>\n        <source>Prev frame</source>\n        <translation>Image précédente</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"72\"/>\n        <source>Next frame</source>\n        <translation>Image suivante</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"244\"/>\n        <source>Pause movie</source>\n        <translation>Mettre en pause le film</translation>\n    </message>\n</context>\n<context>\n    <name>ImageEditorFactory</name>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditorfactory.cpp\" line=\"122\"/>\n        <source>Image Viewer</source>\n        <translation>Afficheur d&apos;image</translation>\n    </message>\n</context>\n<context>\n    <name>ImportPkgTip</name>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcode.cpp\" line=\"847\"/>\n        <source>warning, pkg not find, please enter to import :</source>\n        <translation>Avertissement, pkg introuvable, veuillez entrer pour importer :</translation>\n    </message>\n</context>\n<context>\n    <name>JsonEdit</name>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"51\"/>\n        <source>Verify</source>\n        <translation>Vérifier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"53\"/>\n        <source>Format Json</source>\n        <translation>Json formaté</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"55\"/>\n        <source>Compact Json</source>\n        <translation>Json compacté</translation>\n    </message>\n</context>\n<context>\n    <name>LiteApp</name>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"284\"/>\n        <source>Event Log</source>\n        <translation>Journal d&apos;événements</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"271\"/>\n        <source>Escape</source>\n        <translation>Échappe</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"756\"/>\n        <source>Close File</source>\n        <translation>Fermer le fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"759\"/>\n        <source>Close All Files</source>\n        <translation>Fermer tous les fichiers</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"769\"/>\n        <source>Save File</source>\n        <translation>Enregistrer le fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"772\"/>\n        <source>Save File As...</source>\n        <translation>Enregistrer le fichier sous...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"775\"/>\n        <source>Save All Files</source>\n        <translation>Enregistrer tous les fichiers</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"762\"/>\n        <source>Open Project</source>\n        <translation>Ouvrir un projet</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"287\"/>\n        <source>Options</source>\n        <translation>Options</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"733\"/>\n        <source>New...</source>\n        <translation>Nouveau...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"736\"/>\n        <source>Open File...</source>\n        <translation>Ouvrir le fichier...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"739\"/>\n        <source>Open Folder...</source>\n        <translation>Ouvrir le répertoire...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"742\"/>\n        <source>Open Folder in New Window...</source>\n        <translation>Ouvrir le répertoire dans une nouvelle fenêtre...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"747\"/>\n        <source>Close All Folders</source>\n        <oldsource>Add Folder...</oldsource>\n        <translation>Fermer tous les répertoires</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"750\"/>\n        <source>New Window</source>\n        <translation>Nouvelle fenêtre</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"753\"/>\n        <source>Close Window</source>\n        <translation>Fermer la fenêtre</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"764\"/>\n        <source>Save Project</source>\n        <translation>Enregistrer un projet</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"766\"/>\n        <source>Close Project</source>\n        <translation>Fermer le projet</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"778\"/>\n        <source>Exit</source>\n        <translation>Quitter</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"784\"/>\n        <source>Full Screen</source>\n        <translation>Tout l&apos;écran</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"788\"/>\n        <source>About LiteIDE</source>\n        <translation>À propos de LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"794\"/>\n        <source>About Plugins</source>\n        <translation>À propos des plugins</translation>\n    </message>\n</context>\n<context>\n    <name>LiteAppOption</name>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formulaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"30\"/>\n        <source>Store [*]</source>\n        <oldsource>Store</oldsource>\n        <translation>Magasin [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"57\"/>\n        <source>Language:</source>\n        <translation>Langue :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"144\"/>\n        <source>Icon [*]</source>\n        <translation>Icône [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"300\"/>\n        <source>Reload files in session</source>\n        <translation>Recharger les fichiers de la session</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"312\"/>\n        <source>Recent Files</source>\n        <oldsource>Recent File</oldsource>\n        <translation>Fichiers récents</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"318\"/>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"357\"/>\n        <source>Max Count:</source>\n        <oldsource>Max Recent:</oldsource>\n        <translation>Nombre max :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"229\"/>\n        <source>Monitoring files for modifications</source>\n        <translation>Surveillance des fichiers pour les modifications</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"41\"/>\n        <source>Store settings to local ini file</source>\n        <translation>Stocker la configuration dans le fichier ini local</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"51\"/>\n        <source>Interface [*]</source>\n        <translation>Interface [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"74\"/>\n        <source>Style:</source>\n        <translation>Style :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"84\"/>\n        <source>Use tool window shortcuts</source>\n        <translation>Utiliser les raccourcis de la fenêtre d&apos;outils</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"112\"/>\n        <source>Theme [*]</source>\n        <translation>Thème [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"153\"/>\n        <source>Fallback build-in icon library and liteapp/qrc/default</source>\n        <translation>Utiliser en secours la librairie d&apos;icônes et liteapp/qrc/default intégrée</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"156\"/>\n        <source>Load the external file icon library</source>\n        <oldsource>Load custome icon from liteapp/qrc folder</oldsource>\n        <translation>Charger le fichier librairie d&apos;icône externe</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"184\"/>\n        <source>Automatically save documents</source>\n        <translation>Enregistrer automatiquement des documents</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"190\"/>\n        <source>Automatically save documents when application is idle</source>\n        <translation>Enregistrer automatiquement des documents quand l&apos;application est inactive</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"200\"/>\n        <source>sec</source>\n        <translation>sec</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"235\"/>\n        <source>Auto reload or close editor buffer,if underlying file is modified/deleted.</source>\n        <oldsource>Auto reload editor buffer from disk file,if underlying file is modified/deleted.</oldsource>\n        <translation>Auto recharger ou fermer le buffer de l&apos;éditeur, si le fichier sous-jacent est modifié/supprimé.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"263\"/>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"269\"/>\n        <source>Session</source>\n        <translation>Session</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"325\"/>\n        <source>0-99</source>\n        <translation>0-99</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"351\"/>\n        <source>Editor Tabs</source>\n        <translation>Onglets de l&apos;éditeur</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"364\"/>\n        <source>10-999</source>\n        <translation>10-999</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"407\"/>\n        <source>Display</source>\n        <translation>Afficher</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"413\"/>\n        <source>Display [*]</source>\n        <translation>Affichage [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"419\"/>\n        <source>Show splash screen on startup</source>\n        <translation>Afficher l&apos;écran de démarrage au lancement</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"426\"/>\n        <source>Show welcome page on startup</source>\n        <translation>Afficher l&apos;écran de bienvenue au lancement</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"509\"/>\n        <source>Editor</source>\n        <translation>Éditeur</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"515\"/>\n        <source>Editor tab [*]</source>\n        <translation>Onglet de l&apos;éditeur [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"521\"/>\n        <source>Show close buttons on each editor tab</source>\n        <translation>Afficher le bouton de fermeture sur chaque onglet de l&apos;éditeur</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"528\"/>\n        <source>Enable mouse wheel navigation on tabs</source>\n        <oldsource>Enable mouse wheel selected on tab</oldsource>\n        <translation>Activer la navigation d&apos;onglet avec la roulette de la souris</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"436\"/>\n        <source>Toolbar Icon Size [*]</source>\n        <translation>Taille des icônes de la barre d&apos;outils</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"538\"/>\n        <source>Editor navigate</source>\n        <translation>Nagivation de l&apos;éditeur</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"544\"/>\n        <source>Enable mouse extra &apos;Back&apos; button and &apos;Forward&apos; button for go back and forward</source>\n        <translation>Activer les boutons &apos;En arrière&apos; et &apos;En avant&apos; de la souris pour aller en arrière et en avant</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"568\"/>\n        <source>Keyboard</source>\n        <translation>Clavier</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"574\"/>\n        <source>Format: {Ctrl+B},{Ctrl+Shift+B},{Ctrl+K,Ctrl+U},{Ctrl+Shift+Z;Ctrl+Y}</source>\n        <translation>Format : {Ctrl+B},{Ctrl+Shift+B},{Ctrl+K,Ctrl+U},{Ctrl+Shift+Z;Ctrl+Y}</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"586\"/>\n        <source>Hide standard commands</source>\n        <translation>Masquer les commandes standard</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"593\"/>\n        <source>Reset</source>\n        <translation>Réinitialiser</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"600\"/>\n        <source>Reset All</source>\n        <translation>Tout réinitialiser</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"620\"/>\n        <source>Import...</source>\n        <translation>Importer...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"627\"/>\n        <source>Export...</source>\n        <translation>Exporter...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"24\"/>\n        <source>Generic</source>\n        <translation>Générique</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"118\"/>\n        <source>Theme:</source>\n        <translation>Thème :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"275\"/>\n        <source>Reload session on startup</source>\n        <oldsource>Auto load last session</oldsource>\n        <translation>Recharger la session au lancement</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"97\"/>\n        <source>SideBarStyle</source>\n        <translation>Barre de style latérale</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"98\"/>\n        <source>SplitterStyle</source>\n        <translation>Style séparateur</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"82\"/>\n        <source>Command</source>\n        <translation>Commande</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"83\"/>\n        <source>Label</source>\n        <translation>Libellé</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"84\"/>\n        <source>Shortcuts</source>\n        <translation>Raccourcis</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"85\"/>\n        <source>NativeText</source>\n        <translation>TexteNatif</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"86\"/>\n        <source>Standard</source>\n        <translation>Standard</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"506\"/>\n        <source>Import Keyboard Mapping Scheme</source>\n        <translation>Importer le schéma de disposition du clavier</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"506\"/>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"540\"/>\n        <source>Keyboard Mapping Scheme (%1)</source>\n        <translation>Schéma de disposition du clavier (%1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"513\"/>\n        <source>Could not read scheme from %1!</source>\n        <translation>Impossible de lire le schéma depuis %1 !</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"540\"/>\n        <source>Export Keyboard Mapping Scheme</source>\n        <translation>Exporter le schéma de disposition du clavier</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"551\"/>\n        <source>Could not write scheme to %1!</source>\n        <translation>Impossible d&apos;écrire le schéma vers %1 !</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuild</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"142\"/>\n        <source>Build Toolbar</source>\n        <translation>Barre d&apos;outils de compilation</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"150\"/>\n        <source>Build Configuration...</source>\n        <oldsource>Build Config</oldsource>\n        <translation>Configuration de la compilation...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"168\"/>\n        <source>Stop Action</source>\n        <translation>Arrêter l&apos;action</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"172\"/>\n        <source>Clear Output</source>\n        <oldsource>Clear All</oldsource>\n        <translation>Tout effacer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"176\"/>\n        <source>Execute File</source>\n        <translation>Exécuter le fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"179\"/>\n        <source>Debug File</source>\n        <translation>Déboguer le fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"182\"/>\n        <source>Lock Build Path</source>\n        <oldsource>Lock Go Build Path</oldsource>\n        <translation>Verrouiller le chemin de compilation Go</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"184\"/>\n        <source>Build Path Configuration</source>\n        <oldsource>Go Build Configuration</oldsource>\n        <translation>Configuration de la compilation Go</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"230\"/>\n        <source>Use godoc View</source>\n        <translation>Utiliser la vue godoc</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"287\"/>\n        <source>Line Wrap</source>\n        <translation>Retour à la ligne</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"291\"/>\n        <source>Auto Clear</source>\n        <translation>Emplacement automatique</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"295\"/>\n        <source>Automatic positioning cursor</source>\n        <translation>Positionnement automatique du curseur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"310\"/>\n        <source>Setup</source>\n        <translation>Lancement</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"318\"/>\n        <source>Build Output</source>\n        <oldsource>Build</oldsource>\n        <translation>Sortie de la compilation</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"731\"/>\n        <source>Current environment change id &quot;%1&quot;</source>\n        <translation>ID du changement courant d&apos;environement &quot;%1&quot;</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1145\"/>\n        <source>Lock Build</source>\n        <oldsource>Lock Build: %1</oldsource>\n        <translation>Verrou de compilation</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1489\"/>\n        <source>Error: %1.</source>\n        <oldsource>Error: %1.\n</oldsource>\n        <translation>Erreur : %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1492\"/>\n        <source>Command exited with code %1.</source>\n        <translation>La commande s&apos;est terminée avec le code %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1494\"/>\n        <source>Success: %1.</source>\n        <oldsource>Success: %1.\n</oldsource>\n        <translation>Succès : %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1543\"/>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1596\"/>\n        <source>A process is currently running.  Stop the current action first.</source>\n        <oldsource>A process is currently running.  Stop the current action first.\n</oldsource>\n        <translation>Un processus est en fonctionnement. Arrêter l&apos;action courante d&apos;abord.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1582\"/>\n        <source>Killing current process...</source>\n        <oldsource>Killing current process...\n</oldsource>\n        <translation>Arrêt du processus courant...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1592\"/>\n        <source>Failed to terminate the existing process!</source>\n        <oldsource>Failed to terminate the existing process!\n</oldsource>\n        <translation>Terminaison du processus existant échouée !</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1802\"/>\n        <source>Started process successfully</source>\n        <oldsource>Started process successfully\n</oldsource>\n        <translation>Démarrage du processus avec succès</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1802\"/>\n        <source>Failed to start process</source>\n        <translation>Impossible de démarrer le processus</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuildOption</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formulaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"20\"/>\n        <source>Recheck Go installation when changing environments</source>\n        <oldsource>Recheck go env if enviroment changed</oldsource>\n        <translation>Revérifier l&apos;installation de Go lors du changement d&apos;environnement</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"27\"/>\n        <source>Build command configuration files [*]</source>\n        <oldsource>Build command configuration files:</oldsource>\n        <translation>Fichers de configuration des commandes de compilation [*]</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuildPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"102\"/>\n        <source>Close</source>\n        <translation>Fermer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"105\"/>\n        <source>Execute:</source>\n        <oldsource>Exec:</oldsource>\n        <translation>Exécuter :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"112\"/>\n        <source>Execute File</source>\n        <oldsource>Execute</oldsource>\n        <translation>Exécuter le fichier</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebug</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"114\"/>\n        <source>Stop</source>\n        <translation>Arrêter</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"75\"/>\n        <source>Clear</source>\n        <translation>Effacer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"111\"/>\n        <source>Continue</source>\n        <translation>Continuer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"117\"/>\n        <source>Show Current Line</source>\n        <translation>Afficher la ligne courante</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"189\"/>\n        <source>Debug Output</source>\n        <oldsource>Debug</oldsource>\n        <translation>Sortie du débogueur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"105\"/>\n        <source>Start Debugging External Application...</source>\n        <oldsource>Start Debugging External Application</oldsource>\n        <translation>Démarrer le débogage de l&apos;application externe...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"93\"/>\n        <source>Close</source>\n        <translation>Fermer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"108\"/>\n        <source>Start Debugging</source>\n        <translation>Démarrer le débogage</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"120\"/>\n        <source>Step Into</source>\n        <translation>Entrer dans</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"123\"/>\n        <source>Step Over</source>\n        <translation>Enjamber</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"126\"/>\n        <source>Step Out</source>\n        <translation>Resortir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"129\"/>\n        <source>Run to Line</source>\n        <translation>Exécuter jusqu&apos;à la line</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"132\"/>\n        <source>Insert/Remove Breakpoint</source>\n        <translation>Ajouter/supprimer des points d&apos;arrêt</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"135\"/>\n        <source>Remove All Breakpoints</source>\n        <translation>Supprimer tous les points d&apos;arrêt</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebugOption</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formulaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"20\"/>\n        <source>Debug</source>\n        <translation>Déboguer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"26\"/>\n        <source>Automatically insert breakpoint main.main when debugging</source>\n        <oldsource>Automatically add breakpoint main.main when debugging</oldsource>\n        <translation>Ajouter automatiquement le point d&apos;arrêt main.main lors du débogage</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebugPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugplugin.cpp\" line=\"58\"/>\n        <source>Debug Window</source>\n        <oldsource>Debug</oldsource>\n        <translation>Fenêtre de débogage</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDoc</name>\n    <message>\n        <location filename=\"src/plugins/welcome/litedoc.cpp\" line=\"63\"/>\n        <source>LiteIDE Documentation</source>\n        <oldsource>LiteIDE Document Browser</oldsource>\n        <translation>Explorateur de documents LiteIDE</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditor</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"254\"/>\n        <source>Undo</source>\n        <translation>Défaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"257\"/>\n        <source>Redo</source>\n        <translation>Refaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"260\"/>\n        <source>Cut</source>\n        <translation>Couper</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"263\"/>\n        <source>Copy</source>\n        <translation>Copier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"266\"/>\n        <source>Paste</source>\n        <translation>Coller</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"268\"/>\n        <source>Select All</source>\n        <translation>Sélectionner tout</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"301\"/>\n        <source>Go to Doc Start</source>\n        <translation>Aller au début du Doc</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"305\"/>\n        <source>Go to Doc End</source>\n        <translation>Aller à la fin du Doc</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"309\"/>\n        <source>Go to Line Start</source>\n        <translation>Aller au début de la ligne</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"313\"/>\n        <source>Go to Line End</source>\n        <translation>Aller à la fin de la ligne</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"317\"/>\n        <source>Go to Previous Line</source>\n        <translation>Aller à la ligne précédente</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"321\"/>\n        <source>Go to Next Line</source>\n        <translation>Aller à la ligne suivante</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"325\"/>\n        <source>Go to Previous Character</source>\n        <translation>Aller au caractère précédent</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"329\"/>\n        <source>Go to Next Charater</source>\n        <translation>Aller au caractère suivant</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"333\"/>\n        <source>Go to Previous Word</source>\n        <translation>Aller au mot précédent</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"337\"/>\n        <source>Go to Next Word</source>\n        <translation>Aller au mot suivant</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"358\"/>\n        <source>Go to Line</source>\n        <translation>Aller à la ligne</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"361\"/>\n        <source>File is readonly</source>\n        <translation>l fichier est en lecture seule</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"364\"/>\n        <source>File is writable</source>\n        <translation>Le fichier est accessible en écriture</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"404\"/>\n        <source>Line Wrap (MimeType)</source>\n        <oldsource>Word Wrap (MimeType)</oldsource>\n        <translation>Retour à la ligne (TypeMime)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"415\"/>\n        <source>Toggle Comment</source>\n        <translation>Commenter/décommenter</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"418\"/>\n        <source>Toggle Block Commnet</source>\n        <translation>Commenter/décommenter le bloc</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"421\"/>\n        <source>Auto-indent Selection</source>\n        <translation>Indenter automatiquement la sélection</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"425\"/>\n        <source>Tab To Spaces (MimeType)</source>\n        <translation>Tabulation vers espace (TypeMime)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"429\"/>\n        <source>Line End Windows (\\r\\n)</source>\n        <translation>Fin de ligne Windows (\\r\\n)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"433\"/>\n        <source>Line End Unix (\\n)</source>\n        <translation>Fin de ligne Unix (\\n)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"437\"/>\n        <source>Visualize Whitespace (Global)</source>\n        <translation>Afficher les espaces (Global)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"459\"/>\n        <source>Title Case</source>\n        <translation>Casse de titre</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"463\"/>\n        <source>Upper Case</source>\n        <translation>Majuscule</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"467\"/>\n        <source>Lower Case</source>\n        <translation>Minuscule</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"471\"/>\n        <source>Swap Case</source>\n        <translation>Inverser la casse</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"475\"/>\n        <source>Tab To Spaces</source>\n        <translation>Tabulations vers espaces</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"479\"/>\n        <source>Spaces To Tab</source>\n        <translation>Espaces vers tabulations</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"645\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"733\"/>\n        <source>Advanced</source>\n        <translation>Avancé</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"671\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"751\"/>\n        <source>Goto</source>\n        <translation>Aller à</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"696\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"774\"/>\n        <source>Convert Tab</source>\n        <translation>Conversion de tabulations</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"700\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"778\"/>\n        <source>Code Folding</source>\n        <translation>Pliage de bloc</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"690\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"768\"/>\n        <source>Convert Case</source>\n        <translation>Conversion de la casse</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1199\"/>\n        <source>Export HTML</source>\n        <translation>Exporter en HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1207\"/>\n        <source>Export Failed</source>\n        <translation>Export échoué</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1208\"/>\n        <source>Could not open %1 for writing.</source>\n        <translation>Impossible d&apos;ouvrir %1 pour écriture.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1227\"/>\n        <source>Export PDF</source>\n        <translation>Exporter en PDF</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1252\"/>\n        <source>Print Document</source>\n        <translation>Imprimer le document</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"286\"/>\n        <source>Print Preview...</source>\n        <oldsource>Print Preview Document</oldsource>\n        <translation>Aperçu de l&apos;impression...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"282\"/>\n        <source>Export HTML...</source>\n        <translation>Exporter en HTML...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"284\"/>\n        <source>Export PDF...</source>\n        <translation>Exporter en PDF...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"285\"/>\n        <source>Print...</source>\n        <translation>Imprimer...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"288\"/>\n        <source>Go to Previous Block</source>\n        <oldsource>Go To Previous Block</oldsource>\n        <translation>Aller au bloc précédent</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"295\"/>\n        <source>Select Block</source>\n        <translation>Sélectionner le bloc</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"298\"/>\n        <source>Go to Matching Brace</source>\n        <oldsource>Go To Matching Brace</oldsource>\n        <translation>Aller à l&apos;acolade correspondante</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"341\"/>\n        <source>Fold</source>\n        <translation>Replier le bloc</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"344\"/>\n        <source>Unfold</source>\n        <translation>Déplier le bloc</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"347\"/>\n        <source>Fold All</source>\n        <translation>Replier tous les blocs</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"350\"/>\n        <source>Unfold All</source>\n        <translation>Déplier tous les blocs</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1327\"/>\n        <source>Go To Line</source>\n        <oldsource>Goto Line</oldsource>\n        <translation>Aller à la ligne</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"368\"/>\n        <source>Duplicate</source>\n        <translation>Dupliquer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"372\"/>\n        <source>Delete Line</source>\n        <translation>Supprimer la ligne</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"376\"/>\n        <source>Copy Line</source>\n        <translation>Copier la ligne</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"380\"/>\n        <source>Cut Line</source>\n        <translation>Couper la ligne</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"384\"/>\n        <source>Insert Line Before</source>\n        <translation>Insérer la ligne au dessus</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"388\"/>\n        <source>Insert Line After</source>\n        <translation>Insérer la ligne en dessous</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"392\"/>\n        <source>Increase Font Size</source>\n        <translation>Augmenter la taille de la police</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"395\"/>\n        <source>Decrease Font Size</source>\n        <translation>Réduire la taille de la police</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"398\"/>\n        <source>Reset Font Size</source>\n        <translation>Réinitialiser la taille de la police</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"401\"/>\n        <source>Clean Whitespace</source>\n        <translation>Effacer les espaces</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"408\"/>\n        <source>Code Complete</source>\n        <translation>Code complet</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"444\"/>\n        <source>Move Line Up</source>\n        <translation>Déplacer la ligne vers le haut</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"447\"/>\n        <source>Move Line Down</source>\n        <translation>Déplacer la ligne vers le bas</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"450\"/>\n        <source>Copy Line Up</source>\n        <translation>Copier la ligne au dessus</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"453\"/>\n        <source>Copy Line Down</source>\n        <translation>Copier la ligen en dessous</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"456\"/>\n        <source>Join Lines</source>\n        <translation>Joindre les lignes</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"706\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"784\"/>\n        <source>Settings</source>\n        <oldsource>File Setup</oldsource>\n        <translation>Configuration</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"892\"/>\n        <source>Reload File</source>\n        <translation>Recharger le fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1269\"/>\n        <source>Do you want to permanently discard unsaved modifications and reload %1?</source>\n        <translation>Voulez-vous perdre définitivement les modifications et recharger %1 ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"291\"/>\n        <source>Go to Next Block</source>\n        <oldsource>Go To Next Block</oldsource>\n        <translation>Aller au bloc suivant</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1301\"/>\n        <source>ReadOnly</source>\n        <translation>Lecture seule</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1327\"/>\n        <source>Line: </source>\n        <translation>Ligne : </translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorFileFactory</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorfilefactory.cpp\" line=\"203\"/>\n        <source>Text Editor</source>\n        <translation>Éditeur de texte</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorOption</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formulaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"408\"/>\n        <source>Load File</source>\n        <translation>Charger le fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"414\"/>\n        <source>Check and convert no printable char to &apos;.&apos;</source>\n        <translation>Vérifier et convertir les caractères non imprimables en &apos;.&apos;</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"30\"/>\n        <source>Font</source>\n        <translation>Police</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"24\"/>\n        <source>Font &amp;&amp; Colors</source>\n        <translation>Police &amp;&amp; Couleurs</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"38\"/>\n        <source>Family:</source>\n        <translation>Famille :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"48\"/>\n        <source>Show Monospace Font</source>\n        <translation>Afficher les polices régulières</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"72\"/>\n        <source>Size:</source>\n        <translation>Taille :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"92\"/>\n        <source>Zoom:</source>\n        <translation>Zoom :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"99\"/>\n        <source>%</source>\n        <translation>%</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"118\"/>\n        <source>Antialias</source>\n        <translation>Anti crénelage</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"138\"/>\n        <source>Restore Default Font</source>\n        <translation>Restaurer les polices par défaut</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"150\"/>\n        <source>Editor Color Scheme</source>\n        <oldsource>ColorStyle Scheme</oldsource>\n        <translation>Schéma des couleurs de l&apos;éditeur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"158\"/>\n        <source>File:</source>\n        <translation>Fichier :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"175\"/>\n        <source>Edit</source>\n        <translation>Édition</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"220\"/>\n        <source>Syntax Auto-completion</source>\n        <oldsource>Auto complete brackets</oldsource>\n        <translation>Auto-complétion syntaxique</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"302\"/>\n        <source>Fuzzy code completion</source>\n        <translation>Complétion de code flou</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"350\"/>\n        <source>Clean completion cache when saving files</source>\n        <translation>Effacer le cache de complétion des fichiers enregistrés</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"357\"/>\n        <source>Clean whitespace when saving files</source>\n        <translation>Effacer les espaces des fichiers enregistrés</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"364\"/>\n        <source>Enable scroll wheel zooming</source>\n        <translation>Activer le zoom sur la molette de défilement</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"371\"/>\n        <source>Add copied text into the clipboard as HTML</source>\n        <translation>Ajouter le texte copié dans le presse-papier en HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"378\"/>\n        <source>Allow vertical scrolling to the last line [*]</source>\n        <translation>Permettre le défilement verticale vers la dernière ligne [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"437\"/>\n        <source>Display VisualizeWhitespace</source>\n        <translation>Afficher les caractères d&apos;espacement</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"451\"/>\n        <source>Word wrap by default</source>\n        <translation>Retour à la ligne par mot</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"430\"/>\n        <source>Display code fold</source>\n        <translation>Afficher les marqueurs de pliage par bloc de code</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"509\"/>\n        <source>Display offset position</source>\n        <translation>Afficher la position en caractères depuis le début du fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"533\"/>\n        <source>File Types</source>\n        <translation>Types de fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"214\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"289\"/>\n        <source>Behavior</source>\n        <translation>Comportement</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"444\"/>\n        <source>Display EOF</source>\n        <translation>Afficher la fin de fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"458\"/>\n        <source>Display line numbers</source>\n        <translation>Afficher les numéros de lignes</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"465\"/>\n        <source>Display indent guide</source>\n        <oldsource>Display indent guide </oldsource>\n        <translation>Afficher le repère d&apos;indentation</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"474\"/>\n        <source>Display right margin at column</source>\n        <translation>Afficher la marge droite dans la colonne</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"295\"/>\n        <source>Automatic indentation</source>\n        <oldsource>Enable automatic indentation</oldsource>\n        <translation>Activer l&apos;indentation automatique</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"309\"/>\n        <source>Case sensitive code completion</source>\n        <oldsource>Completer case sensitive</oldsource>\n        <translation>Complétion de code sensible à la casse</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"318\"/>\n        <source>Code completion prefix length:</source>\n        <oldsource>Word Complete Prefix Length</oldsource>\n        <translation>Longueur du préfixe de la complétion de code :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"402\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"424\"/>\n        <source>Display</source>\n        <translation>Affichage</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"74\"/>\n        <source>MIME Type</source>\n        <translation>Type MIME</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"75\"/>\n        <source>Tab Width</source>\n        <translation>Largeur de tabulation</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"76\"/>\n        <source>Tab To Spaces</source>\n        <translation>Tabulation vers espaces</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"78\"/>\n        <source>File Extensions</source>\n        <translation>Extensions de fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"77\"/>\n        <source>Custom Extensions</source>\n        <translation>Extensions personnalisées</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorPlugin</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorplugin.cpp\" line=\"71\"/>\n        <source>Edit ToolBar</source>\n        <translation>Modifier la barre d&apos;outils</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorplugin.cpp\" line=\"77\"/>\n        <source>Edit Navigation Bar</source>\n        <translation>Modifier la barre de navigation</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEnvOption</name>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formulaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"20\"/>\n        <source>Environment definition files:</source>\n        <translation>Fichier de définition d&apos;environnement :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"33\"/>\n        <source>Environment changes will take effect after switching environments.</source>\n        <translation>Le changement de l&apos;environnement prendra effet après bascule d&apos;environnements.</translation>\n    </message>\n</context>\n<context>\n    <name>LiteFindPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"72\"/>\n        <source>Find</source>\n        <translation>Trouver</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"75\"/>\n        <source>Find Next</source>\n        <translation>Suivant</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"78\"/>\n        <source>Find Previous</source>\n        <translation>Précédent</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"81\"/>\n        <source>Replace</source>\n        <translation>Remplacer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"87\"/>\n        <source>File Search</source>\n        <translation>Recherche de fichier</translation>\n    </message>\n</context>\n<context>\n    <name>LiteTabWidget</name>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"62\"/>\n        <source>Open a new tab</source>\n        <translation>Ouvrir un nouvel onglet</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"65\"/>\n        <source>List All Tabs</source>\n        <translation>Lister tous les onglets</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"71\"/>\n        <source>Close Tab</source>\n        <translation>Fermer l&apos;onglet</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownBatchBrowser</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"142\"/>\n        <source>Markdown Exporter</source>\n        <oldsource>Markdown Batch</oldsource>\n        <translation>Exporteur de Markdown</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"162\"/>\n        <source>All Files (*)</source>\n        <translation>Tous les fichiers (*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"231\"/>\n        <source>Select the folder containing your markdown files:</source>\n        <oldsource>Select Markdown Folder</oldsource>\n        <translation>Sélectionner le répertoire de vos fichiers Markdown :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"242\"/>\n        <source>Select Markdown Files</source>\n        <translation>Sélectionner les fichiers Markdown</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"290\"/>\n        <source>Select the folder to contain separated markdown exports:</source>\n        <translation>Sélectionner le répertoire pour contenir vos fichiers Markdown séparés :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"303\"/>\n        <source>Export Merged HTML</source>\n        <oldsource>Export Html</oldsource>\n        <translation>Exporter en HTML fusionné</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"378\"/>\n        <source>Export Merged PDF</source>\n        <oldsource>Export PDF</oldsource>\n        <translation>Exporter en PDF fusionné</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownBatchWidget</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formulaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"20\"/>\n        <source>Markdown Source Files</source>\n        <oldsource>Markdown Files</oldsource>\n        <translation>Fichiers source des Markdown</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"38\"/>\n        <source>Import Folder...</source>\n        <oldsource>Import Folder</oldsource>\n        <translation>Importer un répertoire...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"45\"/>\n        <source>Add Files...</source>\n        <oldsource>Add Files</oldsource>\n        <translation>Ajouter des fichiers...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"52\"/>\n        <source>Move Up</source>\n        <translation>Déplacer vers le haut</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"59\"/>\n        <source>Move Down</source>\n        <translation>Déplacer vers le bas</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"66\"/>\n        <source>Remove</source>\n        <translation>Supprimer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"73\"/>\n        <source>Remove All</source>\n        <translation>Supprimer tout</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"98\"/>\n        <source>Options</source>\n        <translation>Options</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"106\"/>\n        <source>Export Folder:</source>\n        <translation>Répertoire d&apos;export :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"116\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>Parcourir...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"127\"/>\n        <source>Use CSS</source>\n        <translation>Utiliser CSS</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"137\"/>\n        <source>Insert horizontal line between merged files</source>\n        <oldsource>Merge files insert split &lt;hr&gt;</oldsource>\n        <translation>Insérer une ligne horizontale entre les fichiers fussionnés</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"144\"/>\n        <source>Insert page break between merged files</source>\n        <oldsource>Merge files insert page break</oldsource>\n        <translation>Insérer un saut de page entre les fichiers fussionnés</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"169\"/>\n        <source>Export</source>\n        <oldsource>Export Util</oldsource>\n        <translation>Export</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"175\"/>\n        <source>Export Separated HTML</source>\n        <oldsource>Separate Html</oldsource>\n        <translation>Export HTML séparés</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"182\"/>\n        <source>Export Separated PDF</source>\n        <oldsource>Separate PDF</oldsource>\n        <translation>Export PDF séparés</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"189\"/>\n        <source>Export Merged HTML...</source>\n        <oldsource>Merge Html</oldsource>\n        <translation>Export HTML fusionné...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"196\"/>\n        <source>Export Merged PDF...</source>\n        <oldsource>Merge PDF</oldsource>\n        <translation>Export PDF fusionné...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"203\"/>\n        <source>Print Preview Merged...</source>\n        <oldsource>Merge Print Preview</oldsource>\n        <translation>Aperçu impr. fusionnée...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"210\"/>\n        <source>Print Merged</source>\n        <oldsource>Merge Print</oldsource>\n        <translation>Impression fusionnée</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"233\"/>\n        <source>Log</source>\n        <translation>Journal</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownEdit</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"83\"/>\n        <source>Header (h1)</source>\n        <oldsource>Header &lt;h1&gt;</oldsource>\n        <translation>Entête (h1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"86\"/>\n        <source>Header (h2)</source>\n        <oldsource>Header &lt;h2&gt;</oldsource>\n        <translation>Entête (h2)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"89\"/>\n        <source>Header (h3)</source>\n        <oldsource>Header &lt;h3&gt;</oldsource>\n        <translation>Entête (h3)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"92\"/>\n        <source>Header (h4)</source>\n        <oldsource>Header &lt;h4&gt;</oldsource>\n        <translation>Entête (h4)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"95\"/>\n        <source>Header (h5)</source>\n        <oldsource>Header &lt;h5&gt;</oldsource>\n        <translation>Entête (h5)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"98\"/>\n        <source>Header (h6)</source>\n        <oldsource>Header &lt;h6&gt;</oldsource>\n        <translation>Entête (h6)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"101\"/>\n        <source>Bold</source>\n        <translation>Gras</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"104\"/>\n        <source>Italic</source>\n        <translation>Italique</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"107\"/>\n        <source>Inline Code</source>\n        <translation>Bloc de code inséré</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"110\"/>\n        <source>Link</source>\n        <translation>Lien</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"113\"/>\n        <source>Image</source>\n        <translation>Image</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"116\"/>\n        <source>Unordered List</source>\n        <translation>Liste à puces</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"119\"/>\n        <source>Ordered List</source>\n        <translation>Liste numérotée</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"122\"/>\n        <source>Blockquote</source>\n        <translation>Bloc indenté</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"125\"/>\n        <source>Horizontal Rule</source>\n        <translation>Ligne Horizontal</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"131\"/>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"154\"/>\n        <source>Heading</source>\n        <translation>Entête</translation>\n    </message>\n</context>\n<context>\n    <name>MultiFolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"299\"/>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"306\"/>\n        <source>Delete Folder</source>\n        <translation>Supprimer le répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"300\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Êtes-vous certain de supprimer ce répertoire et son contenu définitivement ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"307\"/>\n        <source>Failed to delete the folder!</source>\n        <translation>Impossible de supprimer le répertoire !</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"320\"/>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"327\"/>\n        <source>Delete File</source>\n        <translation>Supprimer le fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"321\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Êtes-vous certain de supprimer ce fichier définitivement ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"328\"/>\n        <source>Failed to delete the file!</source>\n        <translation>Impossible de supprimer le fichier !</translation>\n    </message>\n</context>\n<context>\n    <name>NavigateBar</name>\n    <message>\n        <location filename=\"src/utils/navigate/navigate.cpp\" line=\"146\"/>\n        <location filename=\"src/utils/navigate/navigate.cpp\" line=\"169\"/>\n        <source>Browser Files in %1</source>\n        <translation>Naviguer les fichiers dans %1</translation>\n    </message>\n</context>\n<context>\n    <name>NewFileDialog</name>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"14\"/>\n        <source>New Project or File</source>\n        <translation>Nouveau projet ou fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"124\"/>\n        <source>Browse...</source>\n        <translation>Parcourir...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"24\"/>\n        <source>GOPATH:</source>\n        <translation>GOPATH :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"38\"/>\n        <source>Template:</source>\n        <oldsource>Template</oldsource>\n        <translation>Caneva :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"54\"/>\n        <source>Type</source>\n        <translation>Type</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"73\"/>\n        <source>Information</source>\n        <translation>Information</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"87\"/>\n        <source>Name:</source>\n        <translation>Nom :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"114\"/>\n        <source>Location:</source>\n        <translation>Emplacement :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"127\"/>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"185\"/>\n        <source>Error</source>\n        <translation>Erreur</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"127\"/>\n        <source>Could not create the target directory: %1</source>\n        <translation>Impossible de créer le répertoire de destination : %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"132\"/>\n        <source>Warning</source>\n        <translation>Avertissement</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"132\"/>\n        <source>Location %1 is not empty.\nUse the target directory anyway?</source>\n        <translation>L&apos;emplacement %1 n&apos;est pas vide.\nUtiliser cet emplacement malgré tout ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"169\"/>\n        <source>Overwrite File</source>\n        <translation>Ecraser le fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"169\"/>\n        <source>%1 already exists.\nDo you want to replace it?</source>\n        <translation>%1 existe déjà.\nVoulez-vous le remplacer ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"185\"/>\n        <source>No files could be created.</source>\n        <translation>Aucun fichier à créer.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"280\"/>\n        <source>File template details:</source>\n        <translation>Détails du canevas de fichier :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"282\"/>\n        <source>Project template details:</source>\n        <oldsource>New project wizard:</oldsource>\n        <translation>Dialogue de nouveau projet :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"362\"/>\n        <source>Choose a directory for the new content:</source>\n        <translation>Choisir un répertoire pour le nouveau contenu :</translation>\n    </message>\n</context>\n<context>\n    <name>OpenEditorsWidget</name>\n    <message>\n        <location filename=\"src/liteapp/openeditorswidget.cpp\" line=\"43\"/>\n        <source>Open Documents</source>\n        <translation>Ouvrir les documents</translation>\n    </message>\n</context>\n<context>\n    <name>OptionsBrowser</name>\n    <message>\n        <location filename=\"src/liteapp/optionsbrowser.cpp\" line=\"57\"/>\n        <source>Options</source>\n        <oldsource>Options Page</oldsource>\n        <translation>Options</translation>\n    </message>\n</context>\n<context>\n    <name>OptionsWidget</name>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"14\"/>\n        <source>Options</source>\n        <translation>Options</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"56\"/>\n        <source>Info</source>\n        <translation>Info</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"106\"/>\n        <source>[*] item request restart of LiteIDE</source>\n        <oldsource>[*] item requeset restart LiteIDE</oldsource>\n        <translation>[*] élément qui requiert le redémarrage de LiteIDE</translation>\n    </message>\n</context>\n<context>\n    <name>OutputDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"444\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"472\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"473\"/>\n        <source>Move To</source>\n        <translation>Déplacer vers</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"446\"/>\n        <source>LeftSideBar</source>\n        <translation>Barre côté gauche</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"447\"/>\n        <source>RightSideBar</source>\n        <translation>Barre côté droit</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"480\"/>\n        <source>BottomDockWidget</source>\n        <translation>Widget du bas</translation>\n    </message>\n</context>\n<context>\n    <name>OutputOption</name>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formulaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"20\"/>\n        <source>Font</source>\n        <translation>Police</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"26\"/>\n        <source>Family:</source>\n        <translation>Famille :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"43\"/>\n        <source>Size:</source>\n        <translation>Taille :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"60\"/>\n        <source>Zoom:</source>\n        <translation>Zoom :</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"67\"/>\n        <source>%</source>\n        <translation>%</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"86\"/>\n        <source>Antialias</source>\n        <translation>Anti crénelage</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"109\"/>\n        <source>Display</source>\n        <translation>Affichage</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"115\"/>\n        <source>Use editor color scheme</source>\n        <translation>Utiliser l&apos;éditeur de schéma de couleur</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"124\"/>\n        <source>Sets the maximum number of lines</source>\n        <translation>Définir le nombre maximum de lignes</translation>\n    </message>\n</context>\n<context>\n    <name>PackageBrowser</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"87\"/>\n        <source>Manage GOPATH/Modules ...</source>\n        <oldsource>Manage GOPATH...</oldsource>\n        <translation>Définir GOPATH/Modules...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"86\"/>\n        <source>Reload All</source>\n        <translation>Tout recharger</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"93\"/>\n        <source>Use godoc View</source>\n        <translation>Utiliser la vue godoc</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"94\"/>\n        <source>Load Package in New Window</source>\n        <translation>Charge un package dans une nouvelle fenêtre</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"95\"/>\n        <source>Add Package to Folders</source>\n        <translation>Ajouter le Package au répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"96\"/>\n        <source>Open Source File</source>\n        <translation>Ouvrir le fichier source</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"97\"/>\n        <source>Copy Name to Clipboard</source>\n        <oldsource>Copy Name To Clipboard</oldsource>\n        <translation>Copier le nom dans le presse-papier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"119\"/>\n        <source>Go Package Browser</source>\n        <oldsource>Package Browser</oldsource>\n        <translation>Navigateur de Packages Go</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"208\"/>\n        <source>Loading Go package list...</source>\n        <oldsource>Loading go package ...</oldsource>\n        <translation>Chargement de la liste des package Go...</translation>\n    </message>\n</context>\n<context>\n    <name>PackageProject</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"76\"/>\n        <source>Reload Package</source>\n        <translation>Recharger le package</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"77\"/>\n        <source>Open Explorer Here</source>\n        <translation>Ouvrir l&apos;explorateur ici</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"78\"/>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"299\"/>\n        <source>Add Source File</source>\n        <translation>Ajouter le fichier source</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"299\"/>\n        <source>File Name:</source>\n        <translation>Nom du fichier :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"310\"/>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"315\"/>\n        <source>Error</source>\n        <translation>Erreur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"310\"/>\n        <source>File %1 already exists.</source>\n        <translation>Le fichier %1 existe déjà.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"315\"/>\n        <source>Could not open %1 for writing.</source>\n        <translation>Impossible d&apos;ouvrir %1 pour écriture.</translation>\n    </message>\n</context>\n<context>\n    <name>PluginsDialog</name>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.ui\" line=\"14\"/>\n        <source>Installed Plugins</source>\n        <oldsource>Install Plugins</oldsource>\n        <translation>Plugins installés</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.ui\" line=\"45\"/>\n        <source>Close</source>\n        <translation>Fermer</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"51\"/>\n        <source>Name</source>\n        <translation>Nom</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"54\"/>\n        <source>Author</source>\n        <oldsource>Anchor</oldsource>\n        <translation>Auteur</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"52\"/>\n        <source>Enabled</source>\n        <translation>Activé</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"53\"/>\n        <source>Details</source>\n        <translation>Détails</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"55\"/>\n        <source>Version</source>\n        <oldsource>Last Ver</oldsource>\n        <translation>Version</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"56\"/>\n        <source>File Name</source>\n        <oldsource>FileName</oldsource>\n        <translation>Nom du fichier</translation>\n    </message>\n</context>\n<context>\n    <name>ProcessEx</name>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"52\"/>\n        <source>process exited with code %1</source>\n        <translation>le processus s&apos;est terminé avec le code %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"55\"/>\n        <source>process crashed or was terminated</source>\n        <translation>le processus s&apos;est arrêté ou a été terminé</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"58\"/>\n        <source>process exited with an unknown status</source>\n        <translation>le processus s&apos;est terminé avec un statut inconnu</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"68\"/>\n        <source>process failed to start</source>\n        <translation>le processus n&apos;a pas pu démarrer</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"71\"/>\n        <source>process crashed or was terminated while running</source>\n        <translation>le processus s&apos;est arrêté ou a été terminé pendant son exécution</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"74\"/>\n        <source>timed out waiting for process</source>\n        <translation>time out pendant l&apos;attente du processus</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"77\"/>\n        <source>couldn&apos;t read from the process</source>\n        <translation>Impossible de lire depuis le processus</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"80\"/>\n        <source>couldn&apos;t write to the process</source>\n        <translation>Impossible d&apos;écrire vers le processus</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"84\"/>\n        <source>an unknown error occurred</source>\n        <translation>une erreur inconnue s&apos;est produite</translation>\n    </message>\n</context>\n<context>\n    <name>ProjectManager</name>\n    <message>\n        <location filename=\"src/liteapp/projectmanager.cpp\" line=\"95\"/>\n        <source>Project &lt;%1&gt;</source>\n        <translation>Projet &lt;%1&gt;</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/projectmanager.cpp\" line=\"119\"/>\n        <source>Import Directory &lt;%1&gt;</source>\n        <translation>Répertoire d&apos;import &lt;%1&gt;</translation>\n    </message>\n</context>\n<context>\n    <name>QFileSystemModel</name>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"46\"/>\n        <source>%1 TB</source>\n        <translation>%1 To</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"48\"/>\n        <source>%1 GB</source>\n        <translation>%1 Go</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"50\"/>\n        <source>%1 MB</source>\n        <translation>%1 Mo</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"52\"/>\n        <source>%1 KB</source>\n        <translation>%1 Ko</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"53\"/>\n        <source>%1 bytes</source>\n        <translation>%1 octets</translation>\n    </message>\n</context>\n<context>\n    <name>QJson::ParserRunnable</name>\n    <message>\n        <location filename=\"src/3rdparty/qjson/src/parserrunnable.cpp\" line=\"64\"/>\n        <source>An error occurred while parsing json: %1</source>\n        <translation>Une erreur s&apos;est produite pendant le interprétation json : %1</translation>\n    </message>\n</context>\n<context>\n    <name>QJsonParseError</name>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"59\"/>\n        <source>no error occurred</source>\n        <translation>Aucune erreur s&apos;est produite</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"60\"/>\n        <source>unterminated object</source>\n        <translation>objet non terminé</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"61\"/>\n        <source>missing name separator</source>\n        <translation>séparateur de nom manquant</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"62\"/>\n        <source>unterminated array</source>\n        <translation>tableau non terminé</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"63\"/>\n        <source>missing value separator</source>\n        <translation>séparateur de valeur manquant</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"64\"/>\n        <source>illegal value</source>\n        <translation>valeur illégale</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"65\"/>\n        <source>invalid termination by number</source>\n        <translation>terminaison par un nombre invalide</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"66\"/>\n        <source>illegal number</source>\n        <translation>nombre illégal</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"67\"/>\n        <source>invalid escape sequence</source>\n        <translation>séquence d&apos;espace invalide</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"68\"/>\n        <source>invalid UTF8 string</source>\n        <translation>chaîne UTF8 invalide</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"69\"/>\n        <source>unterminated string</source>\n        <translation>chaîne non terminée</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"70\"/>\n        <source>object is missing after a comma</source>\n        <translation>un objet est manquant après la virgule</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"71\"/>\n        <source>too deeply nested document</source>\n        <translation>document inclu trop profondément</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"72\"/>\n        <source>too large document</source>\n        <translation>document trop volumineux</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"73\"/>\n        <source>garbage at the end of the document</source>\n        <translation>données salles à la fin du document</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenAction</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenaction.cpp\" line=\"59\"/>\n        <source>Show and Run Commands</source>\n        <translation>Afficher et exécuter des commandes</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenEditor</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopeneditor.cpp\" line=\"56\"/>\n        <source>Show All Opened Editors</source>\n        <oldsource>Show All Editors</oldsource>\n        <translation>Afficher tous les éditeurs</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFileSystem</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfilesystem.cpp\" line=\"156\"/>\n        <source>File System</source>\n        <translation>Système de fichier</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFiles</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfiles.cpp\" line=\"72\"/>\n        <source>Go to File</source>\n        <translation>Aller au fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfiles.cpp\" line=\"77\"/>\n        <source>Type &apos;?&apos; to get help on the actions you can take from here</source>\n        <translation>Tapper &apos;?&apos; pour avoire de l&apos;aide sur les actions possibles ici</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFolder</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfolder.cpp\" line=\"71\"/>\n        <source>Browser Folder</source>\n        <translation>Naviguer dans les répertoires</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenHelp</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenhelp.cpp\" line=\"49\"/>\n        <source>Show All Quick Open Actions</source>\n        <oldsource>Show Quick Open Help</oldsource>\n        <translation>Afficher toutes les actions ouverture rapide</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenLines</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"51\"/>\n        <source>Go to Line</source>\n        <translation>Aller à la ligne</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"79\"/>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"84\"/>\n        <source>Open a text file first to go to a line</source>\n        <translation>Ouvrir un fichier texte avant d&apos;aller à une ligne</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"97\"/>\n        <source>Type a line number between %1 and %2 to navigate to</source>\n        <translation>Tapper a numéro de ligne entre %1 et %2 pour y aller</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"100\"/>\n        <source>Go to Line %1</source>\n        <oldsource>Go to line %1</oldsource>\n        <translation>Aller à la ligne %1</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenManager</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"82\"/>\n        <source>Quick Open File</source>\n        <translation>Ouvrir rapidement un fichier</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"83\"/>\n        <source>Quick Open Editor</source>\n        <translation>Ouvrir rapidement un éditeur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"84\"/>\n        <source>Quick Open Symbol</source>\n        <translation>Ouvrir rapidement un symbole</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"85\"/>\n        <source>Quick Open Command</source>\n        <translation>Ouvrir rapidement une commande</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"86\"/>\n        <source>Show All Quick Open Actions</source>\n        <translation>Afficher toutes les actions ouverture rapide</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenMimeType</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmimetype.cpp\" line=\"41\"/>\n        <source>Go to Symbol in File</source>\n        <oldsource>Open Symbol by Name</oldsource>\n        <translation>Ouvrir un symbole par nom</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmimetype.cpp\" line=\"42\"/>\n        <source>not found symbol</source>\n        <translation>symbole non trouvé</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenOption</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Formulaire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"20\"/>\n        <source>QuickOpenFiles</source>\n        <translation>Ouvrir rapidement les fichiers</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"26\"/>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"79\"/>\n        <source>Match case sensitive</source>\n        <translation>Respecter la casse</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"35\"/>\n        <source>Max files count:</source>\n        <translation>Nombre de fichiers max :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"73\"/>\n        <source>QuickOpenEditor</source>\n        <translation>Ouvrir rapidement l&apos;éditeur</translation>\n    </message>\n</context>\n<context>\n    <name>RecentManager</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.cpp\" line=\"54\"/>\n        <source>Clear All History</source>\n        <translation>Effacer tout l&apos;historique</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.cpp\" line=\"169\"/>\n        <source>Clear Menu</source>\n        <translation>Effacer le menu</translation>\n    </message>\n</context>\n<context>\n    <name>SearchEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"83\"/>\n        <source>Search</source>\n        <translation>Rechercher</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"84\"/>\n        <source>Stop Search</source>\n        <translation>Arrêter la recherche</translation>\n    </message>\n</context>\n<context>\n    <name>SelectExternalDialog</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"14\"/>\n        <source>Debug External Application</source>\n        <translation>Déboguer une application externe</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"22\"/>\n        <source>Application:</source>\n        <translation>Application :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"29\"/>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"56\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>Parcourir...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"36\"/>\n        <source>Arguments:</source>\n        <translation>Arguments :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"46\"/>\n        <source>Working directory:</source>\n        <translation>Répertoire de travail :</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.cpp\" line=\"82\"/>\n        <source>Select Executable</source>\n        <translation>Sélectionner l&apos;exécutable</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.cpp\" line=\"92\"/>\n        <source>Select the working directory:</source>\n        <oldsource>Select Working Directory</oldsource>\n        <translation>Sélectionner le répertoire de travail :</translation>\n    </message>\n</context>\n<context>\n    <name>SessionRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"197\"/>\n        <source>Sessions</source>\n        <translation>Sessions</translation>\n    </message>\n</context>\n<context>\n    <name>SideDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"50\"/>\n        <source>Move To</source>\n        <translation>Déplacer vers</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"54\"/>\n        <source>RightSideBar</source>\n        <translation>Barre latérale droite</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"56\"/>\n        <source>LeftDockWidgt</source>\n        <translation>Widget gauche</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"58\"/>\n        <source>LeftSideBar</source>\n        <translation>Barre latérale gauche</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"60\"/>\n        <source>RightDockWidget</source>\n        <translation>Widget droite</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"63\"/>\n        <source>OutputBar</source>\n        <translation>Barre de sortie</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"75\"/>\n        <source>SideBar</source>\n        <translation>Barre latérale</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"76\"/>\n        <source>Show SideBar</source>\n        <translation>Afficher la barre latérale</translation>\n    </message>\n</context>\n<context>\n    <name>SideWindowStyle</name>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"547\"/>\n        <source>Hide SideBar</source>\n        <translation>Masquer la barre latérale</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"585\"/>\n        <source>SideBar Windows</source>\n        <translation>Fenêtre de la barre latérale</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"586\"/>\n        <source>Output Windows</source>\n        <translation>Fenêtre de sortie</translation>\n    </message>\n</context>\n<context>\n    <name>SplitDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"300\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"379\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"380\"/>\n        <source>Move To</source>\n        <translation>Déplacer vers</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"302\"/>\n        <source>Top</source>\n        <translation>Haut</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"306\"/>\n        <source>Top (Split)</source>\n        <translation>Haut (Scinder)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"343\"/>\n        <source>TopDockWidget (Split)</source>\n        <translation>Widget Haut (Scinder)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"343\"/>\n        <source>TopDockWidget</source>\n        <translation>Widget Haut</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"312\"/>\n        <source>Bottom</source>\n        <translation>Bas</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"316\"/>\n        <source>Bottom (Split)</source>\n        <translation>Bas (Scinder)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"345\"/>\n        <source>BottomDockWidget (Split)</source>\n        <translation>Widget bas (Scinder)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"345\"/>\n        <source>BottomDockWidget</source>\n        <translation>Widget bas</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"322\"/>\n        <source>Left</source>\n        <translation>Gauche</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"326\"/>\n        <source>Left (Split)</source>\n        <translation>Gauche (Scinder)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"347\"/>\n        <source>LeftDockWidget (Split)</source>\n        <translation>Widget gauche (Scinder)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"347\"/>\n        <source>LeftDockWidget</source>\n        <translation>Widget gauche</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"332\"/>\n        <source>Right</source>\n        <translation>Droite</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"336\"/>\n        <source>Right (Split)</source>\n        <translation>Droite (Scinder)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"349\"/>\n        <source>RightDockWidget (Split)</source>\n        <translation>Bandeau droite (Scinder)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"349\"/>\n        <source>RightDockWidget</source>\n        <translation>Bandeau droite</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"355\"/>\n        <source>Unsplit</source>\n        <translation>Joindre</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"360\"/>\n        <source>Split</source>\n        <translation>Scinder</translation>\n    </message>\n</context>\n<context>\n    <name>SplitWindowStyle</name>\n    <message>\n        <location filename=\"src/liteapp/splitwindowstyle.cpp\" line=\"244\"/>\n        <source>Hide Sidebars</source>\n        <translation>Masquer le bandeau latéral</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/splitwindowstyle.cpp\" line=\"278\"/>\n        <source>Tool Windows</source>\n        <translation>Outils</translation>\n    </message>\n</context>\n<context>\n    <name>Terminal</name>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"132\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"189\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"773\"/>\n        <source>New</source>\n        <translation>Nouveau</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"133\"/>\n        <source>Open a new terminal</source>\n        <translation>Ouvrir un nouveau terminal</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"135\"/>\n        <source>Close</source>\n        <translation>Fermer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"136\"/>\n        <source>Close current terminal</source>\n        <translation>Fermer le terminal courant</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"138\"/>\n        <source>CloseAll</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"139\"/>\n        <source>Close all terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"142\"/>\n        <source>LoadEnv</source>\n        <translation>Charge l&apos;environement</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"143\"/>\n        <source>Current terminal load environment from LiteIDE</source>\n        <translation>Le terminal courant charge l&apos;environnement depuis LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"148\"/>\n        <source>Filter</source>\n        <translation>Filtrer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"184\"/>\n        <source>Dark Mode</source>\n        <translation>Mode sombre</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"195\"/>\n        <source>Login Mode (shell --login)</source>\n        <translation>Mode de Login (shell --login)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"237\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"741\"/>\n        <source>Terminal</source>\n        <translation>Terminal</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"741\"/>\n        <source>Rename Tab Title</source>\n        <translation>Renommer l&apos;onglet</translation>\n    </message>\n</context>\n<context>\n    <name>TerminalEdit</name>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"67\"/>\n        <source>Cut</source>\n        <translation>Couper</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"71\"/>\n        <source>Copy</source>\n        <translation>Copier</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"75\"/>\n        <source>Paste</source>\n        <translation>Coller</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"79\"/>\n        <source>Select All</source>\n        <translation>Tout sélectionner</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"83\"/>\n        <source>Clear All</source>\n        <translation>Tout effacer</translation>\n    </message>\n</context>\n<context>\n    <name>TextEditor::Internal::ColorScheme</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_texteditor/colorscheme.cpp\" line=\"212\"/>\n        <source>Not a color scheme file.</source>\n        <translation>N&apos;est pas un fichier de schéma de couleurs.</translation>\n    </message>\n</context>\n<context>\n    <name>Utils::FilterLineEdit</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_editutil/filterlineedit.cpp\" line=\"51\"/>\n        <source>Filter</source>\n        <translation>Filtrer</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_editutil/filterlineedit.cpp\" line=\"52\"/>\n        <source>Clear text</source>\n        <translation>Effacer le texte</translation>\n    </message>\n</context>\n<context>\n    <name>VTermWidget</name>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"50\"/>\n        <source>Copy</source>\n        <translation type=\"unfinished\">Copier</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"54\"/>\n        <source>Paste</source>\n        <translation type=\"unfinished\">Coller</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"58\"/>\n        <source>Select All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>WebKitBrowser</name>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"69\"/>\n        <source>Navigation</source>\n        <translation>Navigation</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"72\"/>\n        <source>Open Html File</source>\n        <oldsource>Open Html</oldsource>\n        <translation>Ouvrir un fichier HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"119\"/>\n        <source>WebKitBrowser</source>\n        <translation>WebKitBrowser</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"169\"/>\n        <source>False load %1 !</source>\n        <translation>Chargement erroné de %1 !</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"256\"/>\n        <source>Open Html or Markdown File</source>\n        <oldsource>Open Html or Markdown Files</oldsource>\n        <translation>Ouvrir des fichiers HTML ou Markdown</translation>\n    </message>\n</context>\n<context>\n    <name>WebKitHtmlWidgetPlugin</name>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkithtmlwidgetplugin.cpp\" line=\"74\"/>\n        <source>Open Html or Markdown File</source>\n        <oldsource>Open Html or Markdown Files</oldsource>\n        <translation>Ouvrir des fichiers HTML ou Markdown</translation>\n    </message>\n</context>\n<context>\n    <name>WelcomeBrowser</name>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"65\"/>\n        <source>New</source>\n        <translation>Nouveau</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"66\"/>\n        <source>Open</source>\n        <translation>Ouvrir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"67\"/>\n        <source>Open Folder</source>\n        <translation>Ouvrir le répertoire</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"68\"/>\n        <source>Options</source>\n        <translation>Options</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"207\"/>\n        <source>Welcome</source>\n        <oldsource>Welcome Page</oldsource>\n        <translation>Bienvenue</translation>\n    </message>\n</context>\n<context>\n    <name>WelcomePlugin</name>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomeplugin.cpp\" line=\"77\"/>\n        <source>Welcome</source>\n        <oldsource>Home</oldsource>\n        <translation>Bienvenue</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "liteidex/liteide_ja.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.1\" language=\"ja_JP\">\n<context>\n    <name>AboutDialog</name>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"20\"/>\n        <source>About LiteIDE</source>\n        <oldsource>About Liteide</oldsource>\n        <translation>Liteide について</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"156\"/>\n        <source>Information</source>\n        <translation>情報</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"162\"/>\n        <source>Welcome:</source>\n        <translation>ようこそ:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"168\"/>\n        <source>Welcome to LiteIDE X! LiteIDE is a simple, open source, cross-platform IDE.</source>\n        <oldsource>Welcome to LiteIDE X!\nLiteIDE is a simple, open source, cross-platform IDE.</oldsource>\n        <translation>LiteIDE X へようこそ!\nLiteIDE はシンプルでオープンソース、クロスプラットフォームなIDEです。</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"178\"/>\n        <source>Project:</source>\n        <translation>プロジェクト:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"208\"/>\n        <source>Name:</source>\n        <translation>名前:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"191\"/>\n        <source>Author:</source>\n        <translation>作者:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"222\"/>\n        <source>Version:</source>\n        <translation>バージョン:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"242\"/>\n        <source>Build:</source>\n        <translation>ビルド:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"215\"/>\n        <source>Based on Qt</source>\n        <oldsource>Based on Qt Version</oldsource>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"249\"/>\n        <source>Source Code:</source>\n        <translation>ソースコード:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"263\"/>\n        <source>Support LiteIDE:</source>\n        <oldsource>Support</oldsource>\n        <translation>LiteIDE をサポート:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"297\"/>\n        <source>Developers</source>\n        <translation>開発者</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"400\"/>\n        <source>Translations</source>\n        <translation>翻訳者</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"412\"/>\n        <source>Chinese</source>\n        <translation>中国語</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"426\"/>\n        <source>Japanese</source>\n        <translation>日本語</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"440\"/>\n        <source>Russian</source>\n        <translation>ロシア語</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"454\"/>\n        <source>French</source>\n        <translation>フランス語</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"468\"/>\n        <source>Traditional Chinese</source>\n        <translation>繁体字</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"482\"/>\n        <source>German</source>\n        <translation>ドイツ語</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"513\"/>\n        <source>Ukrainian</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"544\"/>\n        <source>Thanks to...</source>\n        <translation>謝辞...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"577\"/>\n        <source>License</source>\n        <translation>ライセンス</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"619\"/>\n        <source>Close</source>\n        <translation>閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.cpp\" line=\"42\"/>\n        <source>Based on Qt %1 (%2 bit)</source>\n        <translation></translation>\n    </message>\n</context>\n<context>\n    <name>ActionManager</name>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"65\"/>\n        <source>&amp;File</source>\n        <translation>ファイル(&amp;F)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"66\"/>\n        <source>&amp;Recent</source>\n        <translation>最近使用した...(&amp;R)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"67\"/>\n        <source>&amp;Edit</source>\n        <translation>編集(&amp;E)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"68\"/>\n        <source>F&amp;ind</source>\n        <oldsource>&amp;Find</oldsource>\n        <translation>検索(&amp;F)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"69\"/>\n        <source>&amp;View</source>\n        <translation>表示(&amp;V)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"74\"/>\n        <source>&amp;Tools</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"75\"/>\n        <source>&amp;Build</source>\n        <translation type=\"unfinished\">ビルド(&amp;B)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"76\"/>\n        <source>&amp;Debug</source>\n        <translation type=\"unfinished\">デバッグ(&amp;D)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"77\"/>\n        <source>&amp;Help</source>\n        <translation>ヘルプ(&amp;H)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"79\"/>\n        <source>Standard Toolbar</source>\n        <oldsource>Standard ToolBar</oldsource>\n        <translation>標準ツールバー</translation>\n    </message>\n</context>\n<context>\n    <name>AstWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangast/astwidget.cpp\" line=\"76\"/>\n        <source>Go To Definition</source>\n        <translation>定義へ移動</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/astwidget.cpp\" line=\"77\"/>\n        <source>View Import Document</source>\n        <translation>インポートドキュメントを表示</translation>\n    </message>\n</context>\n<context>\n    <name>BaseDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"77\"/>\n        <source>Hide</source>\n        <translation type=\"unfinished\">非表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"78\"/>\n        <source>Hide Tool Window</source>\n        <translation type=\"unfinished\">ツールウィンドウを非表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"87\"/>\n        <source>Floating Window</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>BaseFolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"78\"/>\n        <source>Open In New Window</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"79\"/>\n        <source>Open File</source>\n        <translation type=\"unfinished\">ファイルを開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"80\"/>\n        <source>New File...</source>\n        <translation type=\"unfinished\">新しいファイル...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"81\"/>\n        <source>New File Wizard...</source>\n        <translation type=\"unfinished\">新規ファイルウィザード</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"82\"/>\n        <source>Rename File...</source>\n        <translation type=\"unfinished\">ファイル名の変更...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"83\"/>\n        <source>Delete File</source>\n        <translation type=\"unfinished\">ファイルを削除</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"85\"/>\n        <source>New Folder...</source>\n        <translation type=\"unfinished\">新しいフォルダ...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"86\"/>\n        <source>Rename Folder...</source>\n        <translation type=\"unfinished\">フォルダ名の変更...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"87\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"335\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"342\"/>\n        <source>Delete Folder</source>\n        <translation type=\"unfinished\">フォルダを削除</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"100\"/>\n        <source>Open Terminal Here</source>\n        <translation type=\"unfinished\">ここでターミナルを開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"90\"/>\n        <source>Show in Explorer</source>\n        <oldsource>Open Explorer Here</oldsource>\n        <translation type=\"unfinished\">ここでエクスプローラを開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"77\"/>\n        <source>Open Application</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"92\"/>\n        <source>Show in Finder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"94\"/>\n        <source>Show Containing Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"98\"/>\n        <source>Open Command Prompt Here</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"102\"/>\n        <source>Open in Integrated Terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"104\"/>\n        <source>Open Folder...</source>\n        <oldsource>Add Folder...</oldsource>\n        <translation type=\"unfinished\">フォルダを追加...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"105\"/>\n        <source>Reload Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"106\"/>\n        <source>Close Folder</source>\n        <translation type=\"unfinished\">フォルダを閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"108\"/>\n        <source>Close All Folders</source>\n        <translation type=\"unfinished\">全てのフォルダを閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"110\"/>\n        <source>Copy</source>\n        <translation type=\"unfinished\">コピー</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"111\"/>\n        <source>Paste</source>\n        <translation type=\"unfinished\">貼り付け</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"113\"/>\n        <source>Copy Path</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"115\"/>\n        <source>Move To Trash</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"198\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"208\"/>\n        <source>Create File</source>\n        <translation type=\"unfinished\">ファイルを作成</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"199\"/>\n        <source>A file with that name already exists!</source>\n        <translation type=\"unfinished\">ファイル名は既に使用されています!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"209\"/>\n        <source>Failed to create the file!</source>\n        <translation type=\"unfinished\">ファイルの作成に失敗しました!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"239\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"245\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"250\"/>\n        <source>Rename File</source>\n        <translation type=\"unfinished\">ファイル名を変更</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"239\"/>\n        <source>New Name:</source>\n        <translation type=\"unfinished\">新しい名前</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"246\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"251\"/>\n        <source>Failed to rename the file!</source>\n        <translation type=\"unfinished\">ファイル名の変更に失敗しました!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"504\"/>\n        <source>An item &quot;%1&quot; already exists in this location. Do you want to replace it and move old item to trash?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"505\"/>\n        <source>Stop</source>\n        <translation type=\"unfinished\">停止</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"506\"/>\n        <source>Keep Both</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"507\"/>\n        <source>Keep Both All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"508\"/>\n        <source>Replace</source>\n        <translation type=\"unfinished\">置換</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"509\"/>\n        <source>Replace All</source>\n        <translation type=\"unfinished\">全てを置換</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"609\"/>\n        <source>Are you sure that you want move to trash this item?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"612\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"615\"/>\n        <source>Are you sure that you want move to trash %1 items?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"618\"/>\n        <source>Move to Trash</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"662\"/>\n        <source>Open With</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"669\"/>\n        <source>System Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"290\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"293\"/>\n        <source>Create Folder</source>\n        <translation type=\"unfinished\">フォルダを作成</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"291\"/>\n        <source>A folder with that name already exists!</source>\n        <translation type=\"unfinished\">フォルダ名は既に使用されています!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"294\"/>\n        <source>Failed to create the folder!</source>\n        <translation type=\"unfinished\">フォルダの作成に失敗しました!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"307\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"316\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"321\"/>\n        <source>Rename Folder</source>\n        <translation type=\"unfinished\">フォルダ名を変更</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"307\"/>\n        <source>Folder Name</source>\n        <translation type=\"unfinished\">フォルダ名</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"317\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"322\"/>\n        <source>Failed to rename the folder!</source>\n        <translation type=\"unfinished\">フォルダ名の変更に失敗しました!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"336\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation type=\"unfinished\">このフォルダと全てのコンテンツを完全に削除しますか?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"343\"/>\n        <source>Failed to delete the folder!</source>\n        <translation type=\"unfinished\">フォルダの削除に失敗しました!</translation>\n    </message>\n</context>\n<context>\n    <name>BookmarkManager</name>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"61\"/>\n        <source>Toggle Bookmark</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"96\"/>\n        <source>Goto bookmark</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"97\"/>\n        <source>Remove bookmark</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"98\"/>\n        <source>Remove all bookmarks for this file</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"99\"/>\n        <source>Remove all bookmarks for all files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"115\"/>\n        <source>Bookmarks</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>BookmarkRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"81\"/>\n        <source>Bookmarks</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>BuildConfigDialog</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"14\"/>\n        <source>Build Configuration</source>\n        <oldsource>Build Config Dialog</oldsource>\n        <translation>ビルド設定</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"71\"/>\n        <source>Build ID</source>\n        <translation>ビルドID</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"45\"/>\n        <source>Build Path</source>\n        <oldsource>Build File</oldsource>\n        <translation>ビルドパス</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"85\"/>\n        <source>GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"103\"/>\n        <source>GOPATH information</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"147\"/>\n        <source>Use Custom GOPATH for Build Path</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"159\"/>\n        <source>Inherit System GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"179\"/>\n        <source>Inherit LiteIDE GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"201\"/>\n        <source>Custom GOPATH (one per line)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"221\"/>\n        <source>Add Directory...</source>\n        <translation type=\"unfinished\">ディレクトリを追加...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"228\"/>\n        <source>Clear</source>\n        <translation type=\"unfinished\">クリア</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"244\"/>\n        <source>LiteIDE</source>\n        <translation>LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"266\"/>\n        <source>Config</source>\n        <translation type=\"unfinished\">設定</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"288\"/>\n        <source>Action</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"310\"/>\n        <source>Custom</source>\n        <oldsource>Build Custom</oldsource>\n        <translation>カスタム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"343\"/>\n        <source>Reset all to initial value</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"69\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"73\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"77\"/>\n        <source>Name</source>\n        <translation type=\"unfinished\">名前</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"70\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"74\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"78\"/>\n        <source>Value</source>\n        <translation type=\"unfinished\">値</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"79\"/>\n        <source>SharedValue</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"82\"/>\n        <source>Id</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"83\"/>\n        <source>Cmd</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"293\"/>\n        <source>Choose directory to add to GOPATH:</source>\n        <translation type=\"unfinished\">GOPATHに追加するディレクトリを選択:</translation>\n    </message>\n</context>\n<context>\n    <name>CreateDirDialog</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"94\"/>\n        <source>Create Folder</source>\n        <translation type=\"unfinished\">フォルダを作成</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"96\"/>\n        <source>Directory:</source>\n        <translation type=\"unfinished\">ディレクトリ:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"98\"/>\n        <source>Dir Name:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"106\"/>\n        <source>Create</source>\n        <translation type=\"unfinished\">作成</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"107\"/>\n        <source>Cancel</source>\n        <translation type=\"unfinished\">キャンセル</translation>\n    </message>\n</context>\n<context>\n    <name>CreateFileDialog</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"44\"/>\n        <source>Create File</source>\n        <oldsource>Create File Dialog</oldsource>\n        <translation>ファイルを作成</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"46\"/>\n        <source>Directory:</source>\n        <translation>ディレクトリ:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"48\"/>\n        <source>File Name:</source>\n        <translation>ファイル名:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"56\"/>\n        <source>Create</source>\n        <translation>作成</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"57\"/>\n        <source>Create and Edit</source>\n        <translation>作成して編集</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"58\"/>\n        <source>Cancel</source>\n        <translation>キャンセル</translation>\n    </message>\n</context>\n<context>\n    <name>DebugWidget</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"122\"/>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"321\"/>\n        <source>Add Watch</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"221\"/>\n        <source>Async Record</source>\n        <oldsource>AsyncRecord</oldsource>\n        <translation>レコードを同期</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"222\"/>\n        <source>Variables</source>\n        <translation>変数</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"223\"/>\n        <source>Watch</source>\n        <translation>ウォッチ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"224\"/>\n        <source>Call Stack</source>\n        <oldsource>CallStack</oldsource>\n        <translation>呼び出し履歴</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"225\"/>\n        <source>Threads</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"226\"/>\n        <source>Goroutines</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"227\"/>\n        <source>Registers</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"228\"/>\n        <source>Libraries</source>\n        <oldsource>Library</oldsource>\n        <translation>ライブラリ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"229\"/>\n        <source>Console</source>\n        <translation>コンソール</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"321\"/>\n        <source>Watch expression (e.g. buf main.var os.Stdout):</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"124\"/>\n        <source>Remove Watch</source>\n        <translation>ウォッチを削除</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"125\"/>\n        <source>Remove All Watches</source>\n        <translation>全てのウォッチを削除</translation>\n    </message>\n</context>\n<context>\n    <name>DlvDebuggerOption</name>\n    <message>\n        <location filename=\"src/plugins/dlvdebugger/dlvdebuggeroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/dlvdebugger/dlvdebuggeroption.ui\" line=\"20\"/>\n        <source>delve debug pass flags: (example --check-go-version=false)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>DocumentBrowser</name>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"67\"/>\n        <source>Back</source>\n        <oldsource>Backward</oldsource>\n        <translation>戻る</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"68\"/>\n        <source>Forward</source>\n        <translation>進む</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"69\"/>\n        <source>Reload</source>\n        <translation>再読み込み</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"75\"/>\n        <source>Increase Font Size</source>\n        <translation>フォントサイズを増やす</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"78\"/>\n        <source>Decrease Font Size</source>\n        <translation>フォントサイズを減らす</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"81\"/>\n        <source>Reset Font Size</source>\n        <translation>フォントサイズをリセット</translation>\n    </message>\n</context>\n<context>\n    <name>DocumentBrowserFactory</name>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowserfactory.cpp\" line=\"67\"/>\n        <source>DocumentBrowser</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>EditorManager</name>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"139\"/>\n        <source>Close</source>\n        <translation>閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"165\"/>\n        <source>Move to New Window</source>\n        <oldsource>Move To New Window</oldsource>\n        <translation>新しいウィンドウへ移動</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"233\"/>\n        <source>Navigate Forward</source>\n        <oldsource>GoForward</oldsource>\n        <translation>進む</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"141\"/>\n        <source>Close Others</source>\n        <oldsource>Close Others Tabs</oldsource>\n        <translation>他を閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"111\"/>\n        <source>Open Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"142\"/>\n        <source>Close All</source>\n        <oldsource>Close All Tabs</oldsource>\n        <translation>全て閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"143\"/>\n        <source>Close Left Tabs</source>\n        <translation>左のタブを閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"144\"/>\n        <source>Close Right Tabs</source>\n        <translation>右のタブを閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"145\"/>\n        <source>Close Files in Same Folder</source>\n        <oldsource>Close Same Folder Files</oldsource>\n        <translation>同じフォルダのファイルを閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"146\"/>\n        <source>Close Files in Other Folders</source>\n        <oldsource>Close Other Folder Files</oldsource>\n        <translation>他のフォルダのファイルを閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"147\"/>\n        <source>Copy Full Path to Clipboard</source>\n        <oldsource>Copy Path to Clipboard</oldsource>\n        <translation>フルパスをクリップボードにコピーする</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"150\"/>\n        <source>Show in Explorer</source>\n        <translation>エクスプローラで表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"152\"/>\n        <source>Show in Finder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"154\"/>\n        <source>Show Containing Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"158\"/>\n        <source>Open Command Prompt Here</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"160\"/>\n        <source>Open Terminal Here</source>\n        <translation type=\"unfinished\">ここでターミナルを開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"162\"/>\n        <source>Open in Integrated Terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"224\"/>\n        <source>Navigate Backward</source>\n        <translation>戻る</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"426\"/>\n        <source>Save changes to %1?</source>\n        <translation>%1 へ変更を保存する</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"427\"/>\n        <source>Unsaved Modifications</source>\n        <oldsource>Save Modify</oldsource>\n        <translation>変更が保存されていない</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"524\"/>\n        <source>All Files (*)</source>\n        <translation>全てのファイル (*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"526\"/>\n        <source>Save As</source>\n        <translation>名前を付けて保存...</translation>\n    </message>\n</context>\n<context>\n    <name>EnvManager</name>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"436\"/>\n        <source>Environment Toolbar</source>\n        <oldsource>Environment ToolBar</oldsource>\n        <translation>環境ツールバー</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"443\"/>\n        <source>Switching current environment</source>\n        <oldsource>Switch Current Environment</oldsource>\n        <translation type=\"unfinished\">環境</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"446\"/>\n        <source>Edit current environment</source>\n        <oldsource>Edit Current Environment</oldsource>\n        <translation type=\"unfinished\">環境を編集</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"447\"/>\n        <source>Reload current environment</source>\n        <oldsource>Reload Current Environment</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"451\"/>\n        <source>Select Environment</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>ExportDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"14\"/>\n        <source>Dialog</source>\n        <translation>ダイアログ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"22\"/>\n        <source>Name:</source>\n        <translation>名前:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"49\"/>\n        <source>Export</source>\n        <translation>エクスポート</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"56\"/>\n        <source>ExportAndView</source>\n        <translation>エクスポートして表示</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"194\"/>\n        <source>Use Vim-style Editing</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"196\"/>\n        <source>Read .vimrc</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"198\"/>\n        <source>Path to .vimrc</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal::FakeVimHandler</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"153\"/>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"161\"/>\n        <source>Unknown option: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"156\"/>\n        <source>Argument must be positive: %1=%2</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"949\"/>\n        <source>Mark &quot;%1&quot; not set.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3538\"/>\n        <source>%1%2%</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3540\"/>\n        <source>%1All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3554\"/>\n        <source>Not implemented in FakeVim.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5719\"/>\n        <source>Unknown option:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5730\"/>\n        <source>Invalid argument:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5733\"/>\n        <source>Trailing characters:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5816\"/>\n        <source>Move lines into themselves.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5860\"/>\n        <source>%n lines moved.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5920\"/>\n        <source>File &quot;%1&quot; exists (add ! to override)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5934\"/>\n        <source>Cannot open file &quot;%1&quot; for writing</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5940\"/>\n        <source>&quot;%1&quot; %2 %3L, %4C written.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5949\"/>\n        <source>Cannot open file &quot;%1&quot; for reading</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5978\"/>\n        <source>&quot;%1&quot; %2L, %3C</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6005\"/>\n        <source>%n lines filtered.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6093\"/>\n        <source>Cannot open file %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6259\"/>\n        <source>Invalid regular expression: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6295\"/>\n        <source>Pattern not found: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6299\"/>\n        <source>Search hit BOTTOM, continuing at TOP.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6300\"/>\n        <source>Search hit TOP, continuing at BOTTOM.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6305\"/>\n        <source>Search hit BOTTOM without match for: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6306\"/>\n        <source>Search hit TOP without match for: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6413\"/>\n        <source>%n lines indented.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6470\"/>\n        <source>%n lines %1ed %2 time.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7043\"/>\n        <source>%n lines yanked.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7748\"/>\n        <source>Already at oldest change.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7749\"/>\n        <source>Already at newest change.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal::FakeVimHandler::Private</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"2788\"/>\n        <source>Recursive mapping</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"4195\"/>\n        <source>Type Alt-V, Alt-V to quit FakeVim mode.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5941\"/>\n        <source> [New] </source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6166\"/>\n        <source>Not an editor command: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVimEdit</name>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimedit.cpp\" line=\"68\"/>\n        <source>Use FakeVim Editing</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVimEditOption</name>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"20\"/>\n        <source>FakeVim initialization command list (# start is comment):</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"28\"/>\n        <source>Load default init command list</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FiFoTty</name>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"86\"/>\n        <source>Cannot create temporary file: %1</source>\n        <translation>テンポラリファイルが作れません: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"97\"/>\n        <source>Cannot create FiFo %1: %2</source>\n        <translation>FiFo %1 を作成出来ません: %2</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"104\"/>\n        <source>Cannot open FiFo %1: %2</source>\n        <translation>FiFo %1 を開けません: %2</translation>\n    </message>\n</context>\n<context>\n    <name>FileBrowser</name>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"98\"/>\n        <source>Synchronize with editor</source>\n        <translation>エディタと同期</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"103\"/>\n        <source>Show Hidden Files</source>\n        <translation>非表示ファイルを表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"159\"/>\n        <source>Set As Root Folder</source>\n        <oldsource>Set Folder To Root</oldsource>\n        <translation>フォルダをルートへ設定</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"119\"/>\n        <source>Execute File</source>\n        <translation type=\"unfinished\">ファイルを実行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"101\"/>\n        <source>Reload Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"110\"/>\n        <source>Show Details</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"122\"/>\n        <source>Debug File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"160\"/>\n        <source>Open Folder in New Window</source>\n        <translation>新しいウィンドウでフォルダを開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"161\"/>\n        <source>Add to Folders</source>\n        <translation>フォルダを追加</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"141\"/>\n        <source>Open Parent</source>\n        <oldsource>Open to Parent</oldsource>\n        <translation>親ディレクトリを開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"169\"/>\n        <source>Filter</source>\n        <translation type=\"unfinished\">フィルタ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"175\"/>\n        <source>File System</source>\n        <translation>ファイルシステム</translation>\n    </message>\n</context>\n<context>\n    <name>FileBrowserOption</name>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"20\"/>\n        <source>Terminal</source>\n        <translation>ターミナル</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"26\"/>\n        <source>Command:</source>\n        <translation>コマンド:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"36\"/>\n        <source>Arguments:</source>\n        <translation>引数:</translation>\n    </message>\n</context>\n<context>\n    <name>FileManager</name>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"189\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"211\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"233\"/>\n        <source>All Files (*)</source>\n        <translation>全てのファイル (*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"397\"/>\n        <source>LiteIDE</source>\n        <translation>LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"398\"/>\n        <source>Project &apos;%1&apos; has been created.\nDo you want to open it now?</source>\n        <oldsource>Project &apos;%1&apos; is created.\nDo you want to load?</oldsource>\n        <translation>プロジェクト &apos;%1&apos; が作成されました。\n読み込みますか?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"301\"/>\n        <source>Open Project or File</source>\n        <translation>プロジェクトもしくはファイルを開く...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"76\"/>\n        <source>Show Hidden Files</source>\n        <translation>非表示ファイルを表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"79\"/>\n        <source>Show Details</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"85\"/>\n        <source>Split Mode</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"127\"/>\n        <source>Folders</source>\n        <oldsource>Folers</oldsource>\n        <translation>フォルダ</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"186\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"208\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"230\"/>\n        <source>All Support Files (%1)</source>\n        <translation>サポートしている全てのファイル(%1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"314\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"332\"/>\n        <source>Select a folder:</source>\n        <oldsource>Open Folder</oldsource>\n        <translation>フォルダを選択:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"679\"/>\n        <source>%1\nThis file has been deleted from the drive,\nbut you have unsaved modifications in your LiteIDE editor.\n\nDo you want to close the editor?\nAnswering &quot;Yes&quot; will discard your unsaved changes.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"686\"/>\n        <source>%1\nThis file has been deleted from the drive.\n\nDo you want to close the editor?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"719\"/>\n        <source>%1\nThis file has been modified on the drive,\nbut you have unsaved modifications in your LiteIDE editor.\n\nDo you want to reload the file from disk?\nAnswering &quot;Yes&quot; will discard your unsaved changes.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"726\"/>\n        <source>%1\nThis file has been modified on the drive.\n\nDo you want to reload the file from disk?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"350\"/>\n        <source>Open Files</source>\n        <translation>ファイルを開く...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"82\"/>\n        <source>Synchronize with editor</source>\n        <translation type=\"unfinished\">エディタと同期</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"113\"/>\n        <source>Filter</source>\n        <translation type=\"unfinished\">フィルタ</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"363\"/>\n        <source>Open Project</source>\n        <translation>プロジェクトを開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"683\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"688\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"723\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"728\"/>\n        <source>LiteIDE X</source>\n        <translation>LiteIDE X</translation>\n    </message>\n</context>\n<context>\n    <name>FileRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"135\"/>\n        <source>Files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FileSearch</name>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"217\"/>\n        <source>Match whole word</source>\n        <oldsource>Match word</oldsource>\n        <translation>単語にマッチ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"218\"/>\n        <source>Match case</source>\n        <translation>大文字/小文字の区別</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"219\"/>\n        <source>Regular expression</source>\n        <translation>正規表現</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"220\"/>\n        <source>Scan subdirectories</source>\n        <oldsource>Look in subdirs</oldsource>\n        <translation>サブディレクトリをスキャン</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"241\"/>\n        <source>Search for:</source>\n        <translation>検索:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"243\"/>\n        <source>Options:</source>\n        <translation>オプション:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"250\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>開く...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"273\"/>\n        <source>Filter:</source>\n        <translation>フィルタ:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"365\"/>\n        <source>Files on File System</source>\n        <translation>ファイルシステム上のファイル</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"230\"/>\n        <source>Search</source>\n        <translation>検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"231\"/>\n        <source>Cancel</source>\n        <translation>キャンセル</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"251\"/>\n        <source>Current Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"254\"/>\n        <source>Auto Switch</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"278\"/>\n        <source>Clear</source>\n        <translation>クリア</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"480\"/>\n        <source>Open Directory</source>\n        <translation>ディレクトリを開く</translation>\n    </message>\n</context>\n<context>\n    <name>FileSearchManager</name>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"50\"/>\n        <source>Search Item:</source>\n        <translation>検索対象</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"69\"/>\n        <source>Only golang file changes can be revert!</source>\n        <oldsource>This file change cannot be undone!</oldsource>\n        <translation type=\"unfinished\">この変更は戻せません!</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"83\"/>\n        <source>New Search</source>\n        <translation>新しい検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"85\"/>\n        <source>File Search</source>\n        <translation type=\"unfinished\">ファイル検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"89\"/>\n        <source>Search Result</source>\n        <translation>検索結果</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"248\"/>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"253\"/>\n        <source>LiteIDE X</source>\n        <translation type=\"unfinished\">LiteIDE X</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"248\"/>\n        <source>Warning! Replace text is empty.\nWant to remove all the search items?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"253\"/>\n        <source>Warning! Replace text is whitespace.\nWant to replace to all the search items to whitespace?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"280\"/>\n        <source>The following files have no write permissions. Do you want to change the permissions?</source>\n        <translation>以下のファイルは書き込み権限がありません。権限を変更しますか?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"283\"/>\n        <source>File is readonly</source>\n        <translation>読み取り専用ファイル</translation>\n    </message>\n</context>\n<context>\n    <name>FileSystemWidget</name>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"94\"/>\n        <source>Open File</source>\n        <oldsource>Open Editor</oldsource>\n        <translation>ファイルを開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"95\"/>\n        <source>New File...</source>\n        <oldsource>New File</oldsource>\n        <translation>新しいファイル...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"96\"/>\n        <source>New File Wizard...</source>\n        <oldsource>New File Wizard</oldsource>\n        <translation>新規ファイルウィザード</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"320\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"326\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"331\"/>\n        <source>Rename File</source>\n        <translation>ファイル名を変更</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"98\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"345\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"350\"/>\n        <source>Delete File</source>\n        <oldsource>Remove File</oldsource>\n        <translation>ファイルを削除</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"100\"/>\n        <source>New Folder...</source>\n        <oldsource>New Folder</oldsource>\n        <translation>新しいフォルダ...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"346\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>このファイルを完全に削除しますか?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"386\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"395\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"400\"/>\n        <source>Rename Folder</source>\n        <translation>フォルダ名を変更</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"102\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"414\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"421\"/>\n        <source>Delete Folder</source>\n        <oldsource>Remove Folder</oldsource>\n        <translation>フォルダを削除</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"97\"/>\n        <source>Rename File...</source>\n        <translation>ファイル名の変更...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"101\"/>\n        <source>Rename Folder...</source>\n        <translation>フォルダ名の変更...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"104\"/>\n        <source>Open Terminal Here</source>\n        <translation>ここでターミナルを開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"105\"/>\n        <source>Open Explorer Here</source>\n        <translation>ここでエクスプローラを開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"107\"/>\n        <source>View Godoc Here</source>\n        <translation>ここでGodocを見る</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"454\"/>\n        <source>Add Folder</source>\n        <translation>フォルダを追加</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"110\"/>\n        <source>Close Folder</source>\n        <translation>フォルダを閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"109\"/>\n        <source>Add Folder...</source>\n        <translation>フォルダを追加...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"112\"/>\n        <source>Close All Folders</source>\n        <translation>全てのフォルダを閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"279\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"289\"/>\n        <source>Create File</source>\n        <translation>ファイルを作成</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"280\"/>\n        <source>A file with that name already exists!</source>\n        <oldsource>The file already exists!</oldsource>\n        <translation>ファイル名は既に使用されています!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"290\"/>\n        <source>Failed to create the file!</source>\n        <translation>ファイルの作成に失敗しました!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"320\"/>\n        <source>New Name:</source>\n        <translation>新しい名前</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"327\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"332\"/>\n        <source>Failed to rename the file!</source>\n        <translation>ファイル名の変更に失敗しました!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"415\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>このフォルダと全てのコンテンツを完全に削除しますか?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"351\"/>\n        <source>Failed to delete the file!</source>\n        <oldsource>Failed to remove the file!</oldsource>\n        <translation>ファイルの削除に失敗しました!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"369\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"372\"/>\n        <source>Create Folder</source>\n        <translation>フォルダを作成</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"370\"/>\n        <source>A folder with that name already exists!</source>\n        <oldsource>The folder name is exists!</oldsource>\n        <translation>フォルダ名は既に使用されています!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"373\"/>\n        <source>Failed to create the folder!</source>\n        <translation>フォルダの作成に失敗しました!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"386\"/>\n        <source>Folder Name</source>\n        <translation>フォルダ名</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"396\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"401\"/>\n        <source>Failed to rename the folder!</source>\n        <translation>フォルダ名の変更に失敗しました!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"422\"/>\n        <source>Failed to delete the folder!</source>\n        <oldsource>Failed to remove the folder!</oldsource>\n        <translation>フォルダの削除に失敗しました!</translation>\n    </message>\n</context>\n<context>\n    <name>Find::Internal::SearchResultWidget</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"132\"/>\n        <source>Search was canceled.</source>\n        <translation>検索は中断されました</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"163\"/>\n        <source>Cancel</source>\n        <translation>キャンセル</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"167\"/>\n        <source>Repeat the search with same parameters</source>\n        <translation>同じパラメータで検索を繰り返す</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"168\"/>\n        <source>Search again</source>\n        <translation>再度検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"174\"/>\n        <source>Set show replace mode ui</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"175\"/>\n        <source>Show Replace</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"180\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"441\"/>\n        <source>Replace with:</source>\n        <translation>置換:</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"186\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"442\"/>\n        <source>Replace all occurrences</source>\n        <translation>全て置換</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"187\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"443\"/>\n        <source>Replace</source>\n        <translation>置換</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"191\"/>\n        <source>Preserve case</source>\n        <translation>大文字/小文字を維持する</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"204\"/>\n        <source>Expand all items</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"209\"/>\n        <source>Collapse all items</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"318\"/>\n        <source>Revert with:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"319\"/>\n        <source>Revert</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"320\"/>\n        <source>Revert all occurrences</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"592\"/>\n        <source>%n matches replaced.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"594\"/>\n        <source>searching... %n matches found.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"600\"/>\n        <source>searching ...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"606\"/>\n        <source>No matches found.</source>\n        <translation>見つかりませんでした</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"608\"/>\n        <source>%n matches found.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n</context>\n<context>\n    <name>FindApiEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.h\" line=\"73\"/>\n        <source>Search</source>\n        <translation>検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.h\" line=\"74\"/>\n        <source>Stop Search</source>\n        <translation>検索を中断</translation>\n    </message>\n</context>\n<context>\n    <name>FindApiWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"284\"/>\n        <source>Search</source>\n        <translation>検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"305\"/>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"337\"/>\n        <source>Find</source>\n        <translation>検索</translation>\n    </message>\n</context>\n<context>\n    <name>FindDocWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"96\"/>\n        <source>Search</source>\n        <translation>検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"104\"/>\n        <source>Find</source>\n        <translation>検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"123\"/>\n        <source>Find All</source>\n        <translation>全て検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"124\"/>\n        <source>Find const</source>\n        <translation>定数を検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"126\"/>\n        <source>Find func</source>\n        <translation>関数を検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"128\"/>\n        <source>Find interface</source>\n        <translation>インタフェースを検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"130\"/>\n        <source>Find pkg</source>\n        <translation>パッケージを検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"132\"/>\n        <source>Find struct</source>\n        <translation>構造体を検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"134\"/>\n        <source>Find type</source>\n        <translation>型を検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"136\"/>\n        <source>Find var</source>\n        <translation>変数を検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"138\"/>\n        <source>Use Regexp</source>\n        <translation>正規表現</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"140\"/>\n        <source>Match Case</source>\n        <translation>大文字/小文字の区別</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"142\"/>\n        <source>Match Word</source>\n        <translation>単語にマッチ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"169\"/>\n        <source>Help</source>\n        <translation>ヘルプ</translation>\n    </message>\n</context>\n<context>\n    <name>FindEditor</name>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"63\"/>\n        <source>Match case</source>\n        <translation>大文字/小文字の区別</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"64\"/>\n        <source>Regular expression</source>\n        <translation>正規表現</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"65\"/>\n        <source>Wrap around</source>\n        <translation>折り返す</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"56\"/>\n        <source>Find Next</source>\n        <translation>次を検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"57\"/>\n        <source>Find Previous</source>\n        <oldsource>Find Prev</oldsource>\n        <translation>前を検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"58\"/>\n        <source>Replace With:</source>\n        <translation>置換:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"59\"/>\n        <source>Replace</source>\n        <translation>置換</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"60\"/>\n        <source>Replace All</source>\n        <translation>全てを置換</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"62\"/>\n        <source>Match whole word only</source>\n        <translation>単語の検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"72\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"250\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"472\"/>\n        <source>Ready</source>\n        <translation>準備</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"81\"/>\n        <source>Close</source>\n        <translation>閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"84\"/>\n        <source>Show Replace</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"103\"/>\n        <source>Find What:</source>\n        <translation>検索:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"115\"/>\n        <source>Options:</source>\n        <oldsource>Find Option:</oldsource>\n        <translation>オプション:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"221\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"393\"/>\n        <source>Not found</source>\n        <translation>見つかりませんでした</translation>\n    </message>\n</context>\n<context>\n    <name>FolderListView</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"252\"/>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"262\"/>\n        <source>Delete File</source>\n        <translation type=\"unfinished\">ファイルを削除</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"253\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation type=\"unfinished\">このファイルを完全に削除しますか?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"263\"/>\n        <source>Failed to delete the file!</source>\n        <translation type=\"unfinished\">ファイルの削除に失敗しました!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"275\"/>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"285\"/>\n        <source>Delete Folder</source>\n        <translation type=\"unfinished\">フォルダを削除</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"276\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation type=\"unfinished\">このフォルダと全てのコンテンツを完全に削除しますか?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"286\"/>\n        <source>Failed to delete the folder!</source>\n        <translation type=\"unfinished\">フォルダの削除に失敗しました!</translation>\n    </message>\n</context>\n<context>\n    <name>FolderRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"166\"/>\n        <source>Folders</source>\n        <translation type=\"unfinished\">フォルダ</translation>\n    </message>\n</context>\n<context>\n    <name>FolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"173\"/>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"183\"/>\n        <source>Delete File</source>\n        <translation type=\"unfinished\">ファイルを削除</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"174\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation type=\"unfinished\">このファイルを完全に削除しますか?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"184\"/>\n        <source>Failed to delete the file!</source>\n        <translation type=\"unfinished\">ファイルの削除に失敗しました!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"230\"/>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"240\"/>\n        <source>Delete Folder</source>\n        <translation type=\"unfinished\">フォルダを削除</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"231\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation type=\"unfinished\">このフォルダと全てのコンテンツを完全に削除しますか?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"241\"/>\n        <source>Failed to delete the folder!</source>\n        <translation type=\"unfinished\">フォルダの削除に失敗しました!</translation>\n    </message>\n</context>\n<context>\n    <name>GdbDebuggerOption</name>\n    <message>\n        <location filename=\"src/plugins/gdbdebugger/gdbdebuggeroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/gdbdebugger/gdbdebuggeroption.ui\" line=\"20\"/>\n        <source>Enable --tty for program being debugged.</source>\n        <translation>プログラムのデバッグで --tty を有効にする</translation>\n    </message>\n</context>\n<context>\n    <name>GoAddTagsDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"14\"/>\n        <source>Add Tags To Struct Field</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"23\"/>\n        <source>Add JSON Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"54\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"105\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"169\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"197\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"281\"/>\n        <source>Options</source>\n        <translation type=\"unfinished\">オプション</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"61\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"112\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"176\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"204\"/>\n        <source>Multiple options separated by commas</source>\n        <oldsource>Multiple options are separated by commas</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"74\"/>\n        <source>Add XML Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"125\"/>\n        <source>Add Custom Tags</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"155\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"187\"/>\n        <source>Tag Name</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"162\"/>\n        <source>Setup custom tag name</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"299\"/>\n        <source>Sort sorts the tags in increasing order according to the key name</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"306\"/>\n        <source>Override current tags when adding tags</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"316\"/>\n        <source>Info</source>\n        <translation type=\"unfinished\">情報</translation>\n    </message>\n</context>\n<context>\n    <name>GoRemoveTagsDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"14\"/>\n        <source>Remove Tags From Struct Field</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"23\"/>\n        <source>Remove Tags And Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"29\"/>\n        <source>Clear All Tags</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"39\"/>\n        <source>Clear All Tags Options</source>\n        <oldsource>Clear All Tag Options</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"46\"/>\n        <source>Remove JSON Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"53\"/>\n        <source>Remove XML Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"60\"/>\n        <source>Remove Custom Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"70\"/>\n        <source>Multiple tags separated by commas</source>\n        <oldsource>Multiple tags  are separated by commas</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"77\"/>\n        <source>Remove JSON Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"84\"/>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"98\"/>\n        <source>Multiple options separated by commas</source>\n        <oldsource>Multiple options are separated by commas</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"91\"/>\n        <source>Remove XML Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"111\"/>\n        <source>Remove Custom Tag Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"118\"/>\n        <source>Setup remove custom tag and option, example tag=opt1,tag=opt2</source>\n        <oldsource>Setup remove custom tag option, example tag=opt1,tag=opt2</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"121\"/>\n        <source>tag=option</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"131\"/>\n        <source>Info</source>\n        <translation type=\"unfinished\">情報</translation>\n    </message>\n</context>\n<context>\n    <name>GolangAst</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"60\"/>\n        <source>No outline available</source>\n        <translation>アウトラインが見つかりません</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"74\"/>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"77\"/>\n        <source>Synchronize with editor</source>\n        <translation type=\"unfinished\">エディタと同期</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"80\"/>\n        <source>Go Class View</source>\n        <oldsource>Class View</oldsource>\n        <translation type=\"unfinished\">クラス表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"81\"/>\n        <source>Go Outline</source>\n        <oldsource>Outline</oldsource>\n        <translation type=\"unfinished\">アウトライン</translation>\n    </message>\n</context>\n<context>\n    <name>GolangAstOption</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"20\"/>\n        <source>QuickOpenSymbol</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"26\"/>\n        <source>Show import path</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"33\"/>\n        <source>Match case sensitive</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangCodeOption</name>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"20\"/>\n        <source>PKG automitic import prompt</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"26\"/>\n        <source>PKG automatic import hints for all packages (GOPATH)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"33\"/>\n        <source>PKG automatic import hints for standard package</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"43\"/>\n        <source>Gocode</source>\n        <oldsource>Go API</oldsource>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"56\"/>\n        <source>Auto update depends package when it&apos;s source changed.</source>\n        <oldsource>Auto update depends package when its source is changed.</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"49\"/>\n        <source>Close gocode when exiting</source>\n        <translation>終了時にgocodeを閉じる</translation>\n    </message>\n</context>\n<context>\n    <name>GolangDoc</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"100\"/>\n        <source>Godoc Search</source>\n        <translation>Godocを検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"92\"/>\n        <source>Go Doc Search</source>\n        <oldsource>Golang Doc Search</oldsource>\n        <translation type=\"unfinished\">Golangドキュメント検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"96\"/>\n        <source>Go Api Index</source>\n        <oldsource>Golang Api Index</oldsource>\n        <translation type=\"unfinished\">Golang APIインデックス</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"111\"/>\n        <source>Find Package:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangDocOption</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"20\"/>\n        <source>Go API</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"26\"/>\n        <source>Use default context (fast)</source>\n        <translation>デフォルトのコンテキストを使用する(高速)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"33\"/>\n        <source>Only load standard API documentation</source>\n        <oldsource>Only load standard api</oldsource>\n        <translation>標準 API ドキュメントのみ読み込む</translation>\n    </message>\n</context>\n<context>\n    <name>GolangEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"90\"/>\n        <source>View import package use godoc</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"93\"/>\n        <source>View Expression Information</source>\n        <translation>式の情報を表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"96\"/>\n        <source>Jump to Declaration</source>\n        <translation>定義へジャンプ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"99\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"105\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"108\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"111\"/>\n        <source>Find Usages</source>\n        <translation>使用箇所を検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"102\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"114\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"117\"/>\n        <source>Rename Symbol Under Cursor</source>\n        <translation>カーソル下のシンボルをリネーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"111\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"114\"/>\n        <source>%1 (Module/GOPATH) with GOROOT</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"170\"/>\n        <source>Stop</source>\n        <translation type=\"unfinished\">停止</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"175\"/>\n        <source>Go Source Query</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"180\"/>\n        <source>SourceQuery What</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"184\"/>\n        <source>Callees</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"188\"/>\n        <source>Callers</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"192\"/>\n        <source>Callstack</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"196\"/>\n        <source>Definition</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"200\"/>\n        <source>Describe</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"204\"/>\n        <source>Freevars</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"208\"/>\n        <source>Implements</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"212\"/>\n        <source>Implements(GOPATH)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"216\"/>\n        <source>Peers</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"220\"/>\n        <source>Referrers</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"224\"/>\n        <source>Pointsto</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"228\"/>\n        <source>Whicherrs</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"232\"/>\n        <source>Add Tags To Struct Field</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"236\"/>\n        <source>Remove Tags From Struct Field</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"354\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"391\"/>\n        <source>Refactor</source>\n        <translation type=\"unfinished\">リファクタリング</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"361\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"399\"/>\n        <source>SourceQuery</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"812\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"993\"/>\n        <source>Below files in package %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangEditOption</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"20\"/>\n        <source>Mouse</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"26\"/>\n        <source>Go root source file editor setup read only</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"33\"/>\n        <source>Enable view expression infomation on mouse</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"40\"/>\n        <source>Enable mouse navigation</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangFileSearch</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangfilesearch.cpp\" line=\"59\"/>\n        <source>Golang Find Usages</source>\n        <translation>Golang の使用箇所を検索</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFmtOption</name>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"20\"/>\n        <source>Format Options</source>\n        <oldsource>Golang Format</oldsource>\n        <translation>整形オプション</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"26\"/>\n        <source>Goimports updates your Go import lines, adding missing ones and removing unreferenced ones.</source>\n        <translation>Goimports はインポート行を変更し、必要なインポートを追加したり不要なインポートを削除します。</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"29\"/>\n        <source>Enable update imports line, adding missing ones and removing unreferenced ones.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"46\"/>\n        <source>Synchronous</source>\n        <translation>同期</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"52\"/>\n        <source>Synchronous code formatting</source>\n        <oldsource> Synchronous code formatting</oldsource>\n        <translation type=\"unfinished\">コード整形を同期して行う</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"61\"/>\n        <source>Synchronous code formatting timeout in milliseconds (500ms or more):</source>\n        <translation>同期コード整形時のタイムアウト(500ms もしくはそれ以上):</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"36\"/>\n        <source>Automatically format code when saving</source>\n        <oldsource>When the editor is saved automatically gofmt</oldsource>\n        <translation>保存時に自動でコード整形を行う</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFmtPlugin</name>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"58\"/>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"66\"/>\n        <source>Format Code</source>\n        <oldsource>Format Code (goimports)</oldsource>\n        <translation type=\"unfinished\">コードを整形</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"59\"/>\n        <source>Format Code (Adjusts Imports)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangPackageOption</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.cpp\" line=\"304\"/>\n        <source>Choose directory to add to GOPATH:</source>\n        <translation type=\"unfinished\">GOPATHに追加するディレクトリを選択:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"14\"/>\n        <source>Manage GOPATH / Modules</source>\n        <translation type=\"unfinished\">GOPATHを管理</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"35\"/>\n        <source>Go Modules</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"78\"/>\n        <source>Custom GONOPROXY</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"88\"/>\n        <source>Custom GOPROXY</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"95\"/>\n        <source>Custom GO111MODULE</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"102\"/>\n        <source>Custom GONOSUMDB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"109\"/>\n        <source>Custom GOPRIVATE</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"125\"/>\n        <source>TextLabel</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"137\"/>\n        <source>GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"163\"/>\n        <source>Use System GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"186\"/>\n        <source>Reload</source>\n        <translation type=\"unfinished\">再読み込み</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"210\"/>\n        <source>Use Custom GOPATH (one per line)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"233\"/>\n        <source>Add Directory...</source>\n        <translation type=\"unfinished\">ディレクトリを追加...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"240\"/>\n        <source>Clear</source>\n        <translation type=\"unfinished\">クリア</translation>\n    </message>\n</context>\n<context>\n    <name>GolangPresentEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"64\"/>\n        <source>Section (s1)</source>\n        <translation>セクション(s1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"67\"/>\n        <source>Subsection (s2)</source>\n        <translation>セクション(s2)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"70\"/>\n        <source>Sub-subsection (s3)</source>\n        <translation>セクション(s3)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"73\"/>\n        <source>Bold</source>\n        <translation>太字</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"76\"/>\n        <source>Italic</source>\n        <translation>斜字</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"79\"/>\n        <source>Inline Code</source>\n        <translation>コード</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"82\"/>\n        <source>Switch Bullets</source>\n        <translation>箇条書き</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"85\"/>\n        <source>Comment/Uncomment Selection</source>\n        <translation>選択をコメント/コメント解除</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"88\"/>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"267\"/>\n        <source>Export HTML</source>\n        <translation>HTMLへエクスポート</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"91\"/>\n        <source>Verify Present</source>\n        <translation>プレゼンを検証</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"256\"/>\n        <source>Present verify success</source>\n        <translation>プレゼンの検証が成功しました</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"258\"/>\n        <source>Present verify false</source>\n        <translation>プレゼンの検証が失敗しました</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"310\"/>\n        <source>Export PDF</source>\n        <translation>PDFへエクスポート</translation>\n    </message>\n</context>\n<context>\n    <name>GolangSymbol</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangsymbol.cpp\" line=\"62\"/>\n        <source>Quick Open Symbol by Name</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GoplayBrowser</name>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"70\"/>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"132\"/>\n        <source>Go Playground</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"72\"/>\n        <source>Run</source>\n        <translation>実行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"73\"/>\n        <source>Stop</source>\n        <translation>停止</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"74\"/>\n        <source>New</source>\n        <translation>新規</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"75\"/>\n        <source>Load...</source>\n        <translation>読み込み...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"76\"/>\n        <source>Save...</source>\n        <translation>保存...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"77\"/>\n        <source>Explore Folder</source>\n        <translation>フォルダを探索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"175\"/>\n        <source>Running...</source>\n        <oldsource>Running...\n\n</oldsource>\n        <translation>起動中...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"195\"/>\n        <source>Error: %1.</source>\n        <oldsource>\nError: %1.</oldsource>\n        <translation>エラー: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"197\"/>\n        <source>Success: %2.</source>\n        <oldsource>\nSuccess: %2.</oldsource>\n        <translation>成功: %2</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"247\"/>\n        <source>Load File</source>\n        <translation>ファイルを読み込む</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"247\"/>\n        <source>Select a file to load:</source>\n        <translation>読み込むファイルを選択:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"263\"/>\n        <source>Save File</source>\n        <translation>ファイルを保存</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"263\"/>\n        <source>New File Name:</source>\n        <translation>新しいファイルの名前:</translation>\n    </message>\n</context>\n<context>\n    <name>HtmlPreview</name>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"71\"/>\n        <source>Page Style</source>\n        <translation>ページスタイル</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"76\"/>\n        <source>Reload</source>\n        <translation>再読み込み</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"77\"/>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"381\"/>\n        <source>Export Html</source>\n        <translation>HTMLへエクスポート</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"78\"/>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"413\"/>\n        <source>Export PDF</source>\n        <translation>PDFへエクスポート</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"79\"/>\n        <source>Print Preview</source>\n        <translation>印刷プレビュー</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"82\"/>\n        <source>Synchronize preview and code scrollbars</source>\n        <translation>コードのスクロールバーをプレビューと同期する</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"88\"/>\n        <source>Config</source>\n        <translation>設定</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"168\"/>\n        <source>Plain HTML</source>\n        <translation>単純なHTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"389\"/>\n        <source>Export Failed</source>\n        <translation>エクスポートに失敗しました</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"85\"/>\n        <source>Automatically display preview</source>\n        <oldsource>Automatically Display Preview</oldsource>\n        <translation>プレビューを自動で表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"99\"/>\n        <source>HTML Preview</source>\n        <oldsource>Html Preview</oldsource>\n        <translation>HTMLプレビュー</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"390\"/>\n        <source>Could not open %1 for writing!</source>\n        <oldsource>Can not write file %1</oldsource>\n        <translation>%1 を書き込み用に開けませんでした</translation>\n    </message>\n</context>\n<context>\n    <name>ImageEditor</name>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"52\"/>\n        <source>ZoomIn</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"55\"/>\n        <source>ZoomOut</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"58\"/>\n        <source>Reset to original size</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"61\"/>\n        <source>Fit to view</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"64\"/>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"247\"/>\n        <source>Play movie</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"68\"/>\n        <source>Prev frame</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"72\"/>\n        <source>Next frame</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"244\"/>\n        <source>Pause movie</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>ImageEditorFactory</name>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditorfactory.cpp\" line=\"122\"/>\n        <source>Image Viewer</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>ImportPkgTip</name>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcode.cpp\" line=\"847\"/>\n        <source>warning, pkg not find, please enter to import :</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>JsonEdit</name>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"51\"/>\n        <source>Verify</source>\n        <translation>検証</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"53\"/>\n        <source>Format Json</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"55\"/>\n        <source>Compact Json</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteApp</name>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"284\"/>\n        <source>Event Log</source>\n        <translation>イベントログ</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"271\"/>\n        <source>Escape</source>\n        <translation>エスケープ</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"756\"/>\n        <source>Close File</source>\n        <translation>ファイルを閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"759\"/>\n        <source>Close All Files</source>\n        <translation>全てのファイルを閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"769\"/>\n        <source>Save File</source>\n        <translation>ファイルを保存</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"772\"/>\n        <source>Save File As...</source>\n        <translation>名前を付けてファイルを保存...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"775\"/>\n        <source>Save All Files</source>\n        <translation>全てのファイルを保存</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"762\"/>\n        <source>Open Project</source>\n        <translation>プロジェクトを開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"287\"/>\n        <source>Options</source>\n        <translation>オプション</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"733\"/>\n        <source>New...</source>\n        <translation>新規...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"736\"/>\n        <source>Open File...</source>\n        <translation>ファイルを開く...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"739\"/>\n        <source>Open Folder...</source>\n        <translation>フォルダを開く...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"742\"/>\n        <source>Open Folder in New Window...</source>\n        <translation>新しいウィンドウでフォルダを開く...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"747\"/>\n        <source>Close All Folders</source>\n        <oldsource>Add Folder...</oldsource>\n        <translation type=\"unfinished\">フォルダを追加...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"750\"/>\n        <source>New Window</source>\n        <translation>新しいウィンドウ</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"753\"/>\n        <source>Close Window</source>\n        <translation>ウィンドウを閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"764\"/>\n        <source>Save Project</source>\n        <translation>プロジェクトを保存</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"766\"/>\n        <source>Close Project</source>\n        <translation>プロジェクトを閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"778\"/>\n        <source>Exit</source>\n        <translation>終了</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"784\"/>\n        <source>Full Screen</source>\n        <translation>全画面</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"788\"/>\n        <source>About LiteIDE</source>\n        <translation>Liteide について</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"794\"/>\n        <source>About Plugins</source>\n        <translation>プラグインについて</translation>\n    </message>\n</context>\n<context>\n    <name>LiteAppOption</name>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"30\"/>\n        <source>Store [*]</source>\n        <oldsource>Store</oldsource>\n        <translation type=\"unfinished\">保存</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"57\"/>\n        <source>Language:</source>\n        <translation>言語:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"144\"/>\n        <source>Icon [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"300\"/>\n        <source>Reload files in session</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"312\"/>\n        <source>Recent Files</source>\n        <oldsource>Recent File</oldsource>\n        <translation>最近使用したファイル</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"318\"/>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"357\"/>\n        <source>Max Count:</source>\n        <oldsource>Max Recent:</oldsource>\n        <translation>最大個数:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"229\"/>\n        <source>Monitoring files for modifications</source>\n        <translation>ファイルの変更を監視</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"41\"/>\n        <source>Store settings to local ini file</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"51\"/>\n        <source>Interface [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"74\"/>\n        <source>Style:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"84\"/>\n        <source>Use tool window shortcuts</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"112\"/>\n        <source>Theme [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"153\"/>\n        <source>Fallback build-in icon library and liteapp/qrc/default</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"156\"/>\n        <source>Load the external file icon library</source>\n        <oldsource>Load custome icon from liteapp/qrc folder</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"184\"/>\n        <source>Automatically save documents</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"190\"/>\n        <source>Automatically save documents when application is idle</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"200\"/>\n        <source>sec</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"235\"/>\n        <source>Auto reload or close editor buffer,if underlying file is modified/deleted.</source>\n        <oldsource>Auto reload editor buffer from disk file,if underlying file is modified/deleted.</oldsource>\n        <translation>元のファイルが変更/削除された場合、自動でリロード/クローズする</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"263\"/>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"269\"/>\n        <source>Session</source>\n        <translation>セクション</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"325\"/>\n        <source>0-99</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"351\"/>\n        <source>Editor Tabs</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"364\"/>\n        <source>10-999</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"407\"/>\n        <source>Display</source>\n        <translation>表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"413\"/>\n        <source>Display [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"419\"/>\n        <source>Show splash screen on startup</source>\n        <translation>起動時にスプラッシュ画面を表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"426\"/>\n        <source>Show welcome page on startup</source>\n        <translation>起動時にようこそのページを表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"509\"/>\n        <source>Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"515\"/>\n        <source>Editor tab [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"521\"/>\n        <source>Show close buttons on each editor tab</source>\n        <translation>タブ毎に閉じるボタンを表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"528\"/>\n        <source>Enable mouse wheel navigation on tabs</source>\n        <oldsource>Enable mouse wheel selected on tab</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"436\"/>\n        <source>Toolbar Icon Size [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"538\"/>\n        <source>Editor navigate</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"544\"/>\n        <source>Enable mouse extra &apos;Back&apos; button and &apos;Forward&apos; button for go back and forward</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"568\"/>\n        <source>Keyboard</source>\n        <translation>キーボード</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"574\"/>\n        <source>Format: {Ctrl+B},{Ctrl+Shift+B},{Ctrl+K,Ctrl+U},{Ctrl+Shift+Z;Ctrl+Y}</source>\n        <translation>整形: {Ctrl+B},{Ctrl+Shift+B},{Ctrl+K,Ctrl+U},{Ctrl+Shift+Z;Ctrl+Y}</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"586\"/>\n        <source>Hide standard commands</source>\n        <translation>標準コマンドを隠す</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"593\"/>\n        <source>Reset</source>\n        <translation>リセット</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"600\"/>\n        <source>Reset All</source>\n        <translation>全てをリセット</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"620\"/>\n        <source>Import...</source>\n        <translation>インポート...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"627\"/>\n        <source>Export...</source>\n        <translation>エクスポート...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"24\"/>\n        <source>Generic</source>\n        <translation>一般</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"118\"/>\n        <source>Theme:</source>\n        <translation>テーマ</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"275\"/>\n        <source>Reload session on startup</source>\n        <oldsource>Auto load last session</oldsource>\n        <translation>起動時にセッションを再読み込み</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"97\"/>\n        <source>SideBarStyle</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"98\"/>\n        <source>SplitterStyle</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"82\"/>\n        <source>Command</source>\n        <translation>コマンド</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"83\"/>\n        <source>Label</source>\n        <translation>ラベル</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"84\"/>\n        <source>Shortcuts</source>\n        <translation>ショートカット</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"85\"/>\n        <source>NativeText</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"86\"/>\n        <source>Standard</source>\n        <translation>標準</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"506\"/>\n        <source>Import Keyboard Mapping Scheme</source>\n        <translation>キーボードマッピングスキームをインポート</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"506\"/>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"540\"/>\n        <source>Keyboard Mapping Scheme (%1)</source>\n        <translation>キーボードマッピングスキーム(%1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"513\"/>\n        <source>Could not read scheme from %1!</source>\n        <translation>%1 からスキームを読み込めません</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"540\"/>\n        <source>Export Keyboard Mapping Scheme</source>\n        <translation>キーボードマッピングスキームをエクスポート</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"551\"/>\n        <source>Could not write scheme to %1!</source>\n        <translation>スキーム %1 を書き込めません!</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuild</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"142\"/>\n        <source>Build Toolbar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"150\"/>\n        <source>Build Configuration...</source>\n        <oldsource>Build Config</oldsource>\n        <translation>ビルドの設定</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"168\"/>\n        <source>Stop Action</source>\n        <translation>アクションを停止</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"172\"/>\n        <source>Clear Output</source>\n        <oldsource>Clear All</oldsource>\n        <translation>全てクリア</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"176\"/>\n        <source>Execute File</source>\n        <translation>ファイルを実行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"179\"/>\n        <source>Debug File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"182\"/>\n        <source>Lock Build Path</source>\n        <oldsource>Lock Go Build Path</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"184\"/>\n        <source>Build Path Configuration</source>\n        <oldsource>Go Build Configuration</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"230\"/>\n        <source>Use godoc View</source>\n        <translation type=\"unfinished\">ここでGodocを見る</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"287\"/>\n        <source>Line Wrap</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"291\"/>\n        <source>Auto Clear</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"295\"/>\n        <source>Automatic positioning cursor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"310\"/>\n        <source>Setup</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"318\"/>\n        <source>Build Output</source>\n        <oldsource>Build</oldsource>\n        <translation>ビルドオプション</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"731\"/>\n        <source>Current environment change id &quot;%1&quot;</source>\n        <translation>現在の環境は id &quot;%1&quot; を変更します</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1145\"/>\n        <source>Lock Build</source>\n        <oldsource>Lock Build: %1</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1489\"/>\n        <source>Error: %1.</source>\n        <oldsource>Error: %1.\n</oldsource>\n        <translation>エラー: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1492\"/>\n        <source>Command exited with code %1.</source>\n        <translation>コマンドはコード %1 で終了しました</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1494\"/>\n        <source>Success: %1.</source>\n        <oldsource>Success: %1.\n</oldsource>\n        <translation>成功: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1543\"/>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1596\"/>\n        <source>A process is currently running.  Stop the current action first.</source>\n        <oldsource>A process is currently running.  Stop the current action first.\n</oldsource>\n        <translation>プロセスが実行中です。まずアクションを停止して下さい。</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1582\"/>\n        <source>Killing current process...</source>\n        <oldsource>Killing current process...\n</oldsource>\n        <translation>このプロセスを強制終了する...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1592\"/>\n        <source>Failed to terminate the existing process!</source>\n        <oldsource>Failed to terminate the existing process!\n</oldsource>\n        <translation>起動中プロセスの停止に失敗しました</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1802\"/>\n        <source>Started process successfully</source>\n        <oldsource>Started process successfully\n</oldsource>\n        <translation>プロセスの起動に成功しました</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1802\"/>\n        <source>Failed to start process</source>\n        <translation>プロセスの起動に失敗しました</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuildOption</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"20\"/>\n        <source>Recheck Go installation when changing environments</source>\n        <oldsource>Recheck go env if enviroment changed</oldsource>\n        <translation>環境の変更時にGoのインストールを再チェックする</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"27\"/>\n        <source>Build command configuration files [*]</source>\n        <oldsource>Build command configuration files:</oldsource>\n        <translation type=\"unfinished\">ビルドコマンドの設定ファイル:</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuildPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"102\"/>\n        <source>Close</source>\n        <translation>閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"105\"/>\n        <source>Execute:</source>\n        <oldsource>Exec:</oldsource>\n        <translation>実行:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"112\"/>\n        <source>Execute File</source>\n        <oldsource>Execute</oldsource>\n        <translation>ファイルを実行</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebug</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"114\"/>\n        <source>Stop</source>\n        <translation>停止</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"75\"/>\n        <source>Clear</source>\n        <translation>クリア</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"111\"/>\n        <source>Continue</source>\n        <translation>続行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"117\"/>\n        <source>Show Current Line</source>\n        <translation>現在行を表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"189\"/>\n        <source>Debug Output</source>\n        <oldsource>Debug</oldsource>\n        <translation>デバッグ出力</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"105\"/>\n        <source>Start Debugging External Application...</source>\n        <oldsource>Start Debugging External Application</oldsource>\n        <translation>外部のアプリケーションをデバッグ起動</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"93\"/>\n        <source>Close</source>\n        <translation>閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"108\"/>\n        <source>Start Debugging</source>\n        <translation>デバッグ開始</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"120\"/>\n        <source>Step Into</source>\n        <translation>ステップ実行(入る)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"123\"/>\n        <source>Step Over</source>\n        <translation>ステップ実行(通過)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"126\"/>\n        <source>Step Out</source>\n        <translation>ステップ実行(出る)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"129\"/>\n        <source>Run to Line</source>\n        <translation>指定行まで実行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"132\"/>\n        <source>Insert/Remove Breakpoint</source>\n        <translation>ブレイクポイントの追加と削除</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"135\"/>\n        <source>Remove All Breakpoints</source>\n        <translation>全てのブレイクポイントを削除</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebugOption</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"20\"/>\n        <source>Debug</source>\n        <translation>デバッグ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"26\"/>\n        <source>Automatically insert breakpoint main.main when debugging</source>\n        <oldsource>Automatically add breakpoint main.main when debugging</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebugPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugplugin.cpp\" line=\"58\"/>\n        <source>Debug Window</source>\n        <oldsource>Debug</oldsource>\n        <translation>デバッグウィンドウ</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDoc</name>\n    <message>\n        <location filename=\"src/plugins/welcome/litedoc.cpp\" line=\"63\"/>\n        <source>LiteIDE Documentation</source>\n        <oldsource>LiteIDE Document Browser</oldsource>\n        <translation>LiteIDEドキュメントブラウザ</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditor</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"254\"/>\n        <source>Undo</source>\n        <translation>元に戻す</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"257\"/>\n        <source>Redo</source>\n        <translation>やり直し</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"260\"/>\n        <source>Cut</source>\n        <translation>切り取り</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"263\"/>\n        <source>Copy</source>\n        <translation>コピー</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"266\"/>\n        <source>Paste</source>\n        <translation>貼り付け</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"268\"/>\n        <source>Select All</source>\n        <translation>全てを選択</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"301\"/>\n        <source>Go to Doc Start</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"305\"/>\n        <source>Go to Doc End</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"309\"/>\n        <source>Go to Line Start</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"313\"/>\n        <source>Go to Line End</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"317\"/>\n        <source>Go to Previous Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"321\"/>\n        <source>Go to Next Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"325\"/>\n        <source>Go to Previous Character</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"329\"/>\n        <source>Go to Next Charater</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"333\"/>\n        <source>Go to Previous Word</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"337\"/>\n        <source>Go to Next Word</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"358\"/>\n        <source>Go to Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"361\"/>\n        <source>File is readonly</source>\n        <translation type=\"unfinished\">読み取り専用ファイル</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"364\"/>\n        <source>File is writable</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"404\"/>\n        <source>Line Wrap (MimeType)</source>\n        <oldsource>Word Wrap (MimeType)</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"415\"/>\n        <source>Toggle Comment</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"418\"/>\n        <source>Toggle Block Commnet</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"421\"/>\n        <source>Auto-indent Selection</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"425\"/>\n        <source>Tab To Spaces (MimeType)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"429\"/>\n        <source>Line End Windows (\\r\\n)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"433\"/>\n        <source>Line End Unix (\\n)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"437\"/>\n        <source>Visualize Whitespace (Global)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"444\"/>\n        <source>Move Line Up</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"447\"/>\n        <source>Move Line Down</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"450\"/>\n        <source>Copy Line Up</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"453\"/>\n        <source>Copy Line Down</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"456\"/>\n        <source>Join Lines</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"459\"/>\n        <source>Title Case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"463\"/>\n        <source>Upper Case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"467\"/>\n        <source>Lower Case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"471\"/>\n        <source>Swap Case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"475\"/>\n        <source>Tab To Spaces</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"479\"/>\n        <source>Spaces To Tab</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"645\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"733\"/>\n        <source>Advanced</source>\n        <translation>高度な操作</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"671\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"751\"/>\n        <source>Goto</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"696\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"774\"/>\n        <source>Convert Tab</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"700\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"778\"/>\n        <source>Code Folding</source>\n        <translation>コードの折りたたみ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"690\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"768\"/>\n        <source>Convert Case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1199\"/>\n        <source>Export HTML</source>\n        <translation>HTMLへエクスポート</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1207\"/>\n        <source>Export Failed</source>\n        <translation>エクスポートに失敗しました</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1208\"/>\n        <source>Could not open %1 for writing.</source>\n        <translation>%1 を書き込み用に開けませんでした</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1227\"/>\n        <source>Export PDF</source>\n        <translation>PDFへエクスポート</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1252\"/>\n        <source>Print Document</source>\n        <translation>印刷</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"286\"/>\n        <source>Print Preview...</source>\n        <oldsource>Print Preview Document</oldsource>\n        <translation>印刷プレビュー...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"282\"/>\n        <source>Export HTML...</source>\n        <translation>HTMLへエクスポート...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"284\"/>\n        <source>Export PDF...</source>\n        <translation>PDFへエクスポート...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"285\"/>\n        <source>Print...</source>\n        <translation>印刷...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"288\"/>\n        <source>Go to Previous Block</source>\n        <oldsource>Go To Previous Block</oldsource>\n        <translation type=\"unfinished\">前のブロックに移動</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"295\"/>\n        <source>Select Block</source>\n        <translation>ブロックを選択</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"298\"/>\n        <source>Go to Matching Brace</source>\n        <oldsource>Go To Matching Brace</oldsource>\n        <translation type=\"unfinished\">対照へ移動</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"341\"/>\n        <source>Fold</source>\n        <translation>折りたたみ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"344\"/>\n        <source>Unfold</source>\n        <translation>折りたたみを展開</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"347\"/>\n        <source>Fold All</source>\n        <translation>全て折りたたみ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"350\"/>\n        <source>Unfold All</source>\n        <translation>全ての折りたたみを展開</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1327\"/>\n        <source>Go To Line</source>\n        <oldsource>Goto Line</oldsource>\n        <translation>指定行へ移動</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"368\"/>\n        <source>Duplicate</source>\n        <translation>重複</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"372\"/>\n        <source>Delete Line</source>\n        <translation>行を削除</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"376\"/>\n        <source>Copy Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"380\"/>\n        <source>Cut Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"384\"/>\n        <source>Insert Line Before</source>\n        <translation>前の行で挿入</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"388\"/>\n        <source>Insert Line After</source>\n        <translation>後の行で挿入</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"392\"/>\n        <source>Increase Font Size</source>\n        <translation>フォントサイズを増やす</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"395\"/>\n        <source>Decrease Font Size</source>\n        <translation>フォントサイズを減らす</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"398\"/>\n        <source>Reset Font Size</source>\n        <translation>フォントサイズをリセット</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"401\"/>\n        <source>Clean Whitespace</source>\n        <translation>空白を除去</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"408\"/>\n        <source>Code Complete</source>\n        <translation>コード補完</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"706\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"784\"/>\n        <source>Settings</source>\n        <oldsource>File Setup</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"892\"/>\n        <source>Reload File</source>\n        <translation>ファイルを再読み込み</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1269\"/>\n        <source>Do you want to permanently discard unsaved modifications and reload %1?</source>\n        <translation>未保存な変更を破棄して %1 を再読み込みしますか?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"291\"/>\n        <source>Go to Next Block</source>\n        <oldsource>Go To Next Block</oldsource>\n        <translation type=\"unfinished\">次のブロックに移動</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1301\"/>\n        <source>ReadOnly</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1327\"/>\n        <source>Line: </source>\n        <translation>行: </translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorFileFactory</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorfilefactory.cpp\" line=\"203\"/>\n        <source>Text Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorOption</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"408\"/>\n        <source>Load File</source>\n        <translation>ファイルを読み込む</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"414\"/>\n        <source>Check and convert no printable char to &apos;.&apos;</source>\n        <translation>不可視文字をチェックし &apos;.&apos; に変換する</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"30\"/>\n        <source>Font</source>\n        <translation>フォント</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"24\"/>\n        <source>Font &amp;&amp; Colors</source>\n        <translation>フォントと色</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"38\"/>\n        <source>Family:</source>\n        <translation>フォント名:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"48\"/>\n        <source>Show Monospace Font</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"72\"/>\n        <source>Size:</source>\n        <translation>サイズ:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"92\"/>\n        <source>Zoom:</source>\n        <translation>ズーム:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"99\"/>\n        <source>%</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"118\"/>\n        <source>Antialias</source>\n        <translation>アンチエイリアス</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"138\"/>\n        <source>Restore Default Font</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"150\"/>\n        <source>Editor Color Scheme</source>\n        <oldsource>ColorStyle Scheme</oldsource>\n        <translation>カラースキームエディタ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"158\"/>\n        <source>File:</source>\n        <translation>ファイル:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"175\"/>\n        <source>Edit</source>\n        <translation>編集</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"220\"/>\n        <source>Syntax Auto-completion</source>\n        <oldsource>Auto complete brackets</oldsource>\n        <translation>ブラケットを自動補完</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"302\"/>\n        <source>Fuzzy code completion</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"350\"/>\n        <source>Clean completion cache when saving files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"357\"/>\n        <source>Clean whitespace when saving files</source>\n        <translation>ファイル保存時に空白を除去</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"364\"/>\n        <source>Enable scroll wheel zooming</source>\n        <translation>マウスホィールによるスクロールを許可</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"371\"/>\n        <source>Add copied text into the clipboard as HTML</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"378\"/>\n        <source>Allow vertical scrolling to the last line [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"437\"/>\n        <source>Display VisualizeWhitespace</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"451\"/>\n        <source>Word wrap by default</source>\n        <translation>デフォルトで折り返す</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"430\"/>\n        <source>Display code fold</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"509\"/>\n        <source>Display offset position</source>\n        <translation>オフセット位置を表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"533\"/>\n        <source>File Types</source>\n        <translation>ファイルタイプ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"214\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"289\"/>\n        <source>Behavior</source>\n        <translation>動作</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"444\"/>\n        <source>Display EOF</source>\n        <translation>EOF を表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"458\"/>\n        <source>Display line numbers</source>\n        <translation>行番号を表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"465\"/>\n        <source>Display indent guide</source>\n        <oldsource>Display indent guide </oldsource>\n        <translation type=\"unfinished\">インデントガイドを表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"474\"/>\n        <source>Display right margin at column</source>\n        <translation>右マージを表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"295\"/>\n        <source>Automatic indentation</source>\n        <oldsource>Enable automatic indentation</oldsource>\n        <translation>自動インデント</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"309\"/>\n        <source>Case sensitive code completion</source>\n        <oldsource>Completer case sensitive</oldsource>\n        <translation>大文字/小文字を区別したコード補完</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"318\"/>\n        <source>Code completion prefix length:</source>\n        <oldsource>Word Complete Prefix Length</oldsource>\n        <translation>コード補完を行う文字数:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"402\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"424\"/>\n        <source>Display</source>\n        <translation>表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"74\"/>\n        <source>MIME Type</source>\n        <translation>MIMEタイプ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"75\"/>\n        <source>Tab Width</source>\n        <translation>タブ幅</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"76\"/>\n        <source>Tab To Spaces</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"78\"/>\n        <source>File Extensions</source>\n        <translation>ファイルの拡張子</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"77\"/>\n        <source>Custom Extensions</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorPlugin</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorplugin.cpp\" line=\"71\"/>\n        <source>Edit ToolBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorplugin.cpp\" line=\"77\"/>\n        <source>Edit Navigation Bar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteEnvOption</name>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"20\"/>\n        <source>Environment definition files:</source>\n        <translation>環境定義ファイル:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"33\"/>\n        <source>Environment changes will take effect after switching environments.</source>\n        <translation>環境の変更は切り替え後に有効となります</translation>\n    </message>\n</context>\n<context>\n    <name>LiteFindPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"72\"/>\n        <source>Find</source>\n        <translation>検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"75\"/>\n        <source>Find Next</source>\n        <translation>次を検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"78\"/>\n        <source>Find Previous</source>\n        <translation>前を検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"81\"/>\n        <source>Replace</source>\n        <translation>置換</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"87\"/>\n        <source>File Search</source>\n        <translation>ファイル検索</translation>\n    </message>\n</context>\n<context>\n    <name>LiteTabWidget</name>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"62\"/>\n        <source>Open a new tab</source>\n        <translation>新しいタブを開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"65\"/>\n        <source>List All Tabs</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"71\"/>\n        <source>Close Tab</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownBatchBrowser</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"142\"/>\n        <source>Markdown Exporter</source>\n        <oldsource>Markdown Batch</oldsource>\n        <translation>Markdownエクスポート</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"162\"/>\n        <source>All Files (*)</source>\n        <translation>全てのファイル (*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"231\"/>\n        <source>Select the folder containing your markdown files:</source>\n        <oldsource>Select Markdown Folder</oldsource>\n        <translation>Markdownファイルがあるフォルダを選択</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"242\"/>\n        <source>Select Markdown Files</source>\n        <translation>Markdownファイルを選択</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"290\"/>\n        <source>Select the folder to contain separated markdown exports:</source>\n        <translation>分割してエクスポートされたmarkdownが含まれるフォルダを選択:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"303\"/>\n        <source>Export Merged HTML</source>\n        <oldsource>Export Html</oldsource>\n        <translation>マージしてHTMLへエクスポート</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"378\"/>\n        <source>Export Merged PDF</source>\n        <oldsource>Export PDF</oldsource>\n        <translation>PDFへエクスポート</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownBatchWidget</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"20\"/>\n        <source>Markdown Source Files</source>\n        <oldsource>Markdown Files</oldsource>\n        <translation>Markdownソースファイル</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"38\"/>\n        <source>Import Folder...</source>\n        <oldsource>Import Folder</oldsource>\n        <translation>フォルダをインポート...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"45\"/>\n        <source>Add Files...</source>\n        <oldsource>Add Files</oldsource>\n        <translation>ファイルを追加...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"52\"/>\n        <source>Move Up</source>\n        <translation>上へ移動</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"59\"/>\n        <source>Move Down</source>\n        <translation>下へ移動</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"66\"/>\n        <source>Remove</source>\n        <translation>削除</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"73\"/>\n        <source>Remove All</source>\n        <translation>全て削除</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"98\"/>\n        <source>Options</source>\n        <translation>オプション</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"106\"/>\n        <source>Export Folder:</source>\n        <translation>エクスポートフォルダ:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"116\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>参照...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"127\"/>\n        <source>Use CSS</source>\n        <translation>CSSを使用</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"137\"/>\n        <source>Insert horizontal line between merged files</source>\n        <oldsource>Merge files insert split &lt;hr&gt;</oldsource>\n        <translation>マージされるファイルの間に区切り線を挿入する</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"144\"/>\n        <source>Insert page break between merged files</source>\n        <oldsource>Merge files insert page break</oldsource>\n        <translation>マージされるファイルの間にページ区切りを挿入する</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"169\"/>\n        <source>Export</source>\n        <oldsource>Export Util</oldsource>\n        <translation>エクスポート</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"175\"/>\n        <source>Export Separated HTML</source>\n        <oldsource>Separate Html</oldsource>\n        <translation>別のHTMLへエクスポート</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"182\"/>\n        <source>Export Separated PDF</source>\n        <oldsource>Separate PDF</oldsource>\n        <translation>別のPDFへエクスポート</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"189\"/>\n        <source>Export Merged HTML...</source>\n        <oldsource>Merge Html</oldsource>\n        <translation>HTMLにマージしてエクスポート</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"196\"/>\n        <source>Export Merged PDF...</source>\n        <oldsource>Merge PDF</oldsource>\n        <translation>PDFにマージしてエクスポート</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"203\"/>\n        <source>Print Preview Merged...</source>\n        <oldsource>Merge Print Preview</oldsource>\n        <translation>マージして印刷プレビュー</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"210\"/>\n        <source>Print Merged</source>\n        <oldsource>Merge Print</oldsource>\n        <translation>マージして印刷</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"233\"/>\n        <source>Log</source>\n        <translation>ログ</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownEdit</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"83\"/>\n        <source>Header (h1)</source>\n        <oldsource>Header &lt;h1&gt;</oldsource>\n        <translation>ヘッダ(h1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"86\"/>\n        <source>Header (h2)</source>\n        <oldsource>Header &lt;h2&gt;</oldsource>\n        <translation>ヘッダ(h2)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"89\"/>\n        <source>Header (h3)</source>\n        <oldsource>Header &lt;h3&gt;</oldsource>\n        <translation>ヘッダ(h3)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"92\"/>\n        <source>Header (h4)</source>\n        <oldsource>Header &lt;h4&gt;</oldsource>\n        <translation>ヘッダ(h4)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"95\"/>\n        <source>Header (h5)</source>\n        <oldsource>Header &lt;h5&gt;</oldsource>\n        <translation>ヘッダ(h5)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"98\"/>\n        <source>Header (h6)</source>\n        <oldsource>Header &lt;h6&gt;</oldsource>\n        <translation>ヘッダ(h6)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"101\"/>\n        <source>Bold</source>\n        <translation>太字</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"104\"/>\n        <source>Italic</source>\n        <translation>斜字</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"107\"/>\n        <source>Inline Code</source>\n        <translation>コード</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"110\"/>\n        <source>Link</source>\n        <translation>リンク</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"113\"/>\n        <source>Image</source>\n        <translation>画像</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"116\"/>\n        <source>Unordered List</source>\n        <translation>箇条書き</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"119\"/>\n        <source>Ordered List</source>\n        <translation>一覧</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"122\"/>\n        <source>Blockquote</source>\n        <translation>引用</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"125\"/>\n        <source>Horizontal Rule</source>\n        <translation>区切り</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"131\"/>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"154\"/>\n        <source>Heading</source>\n        <translation>ヘッダ</translation>\n    </message>\n</context>\n<context>\n    <name>MultiFolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"299\"/>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"306\"/>\n        <source>Delete Folder</source>\n        <translation type=\"unfinished\">フォルダを削除</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"300\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation type=\"unfinished\">このフォルダと全てのコンテンツを完全に削除しますか?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"307\"/>\n        <source>Failed to delete the folder!</source>\n        <translation type=\"unfinished\">フォルダの削除に失敗しました!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"320\"/>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"327\"/>\n        <source>Delete File</source>\n        <translation type=\"unfinished\">ファイルを削除</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"321\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation type=\"unfinished\">このファイルを完全に削除しますか?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"328\"/>\n        <source>Failed to delete the file!</source>\n        <translation type=\"unfinished\">ファイルの削除に失敗しました!</translation>\n    </message>\n</context>\n<context>\n    <name>NavigateBar</name>\n    <message>\n        <location filename=\"src/utils/navigate/navigate.cpp\" line=\"146\"/>\n        <location filename=\"src/utils/navigate/navigate.cpp\" line=\"169\"/>\n        <source>Browser Files in %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>NewFileDialog</name>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"14\"/>\n        <source>New Project or File</source>\n        <translation>新規プロジェクト/ファイル</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"124\"/>\n        <source>Browse...</source>\n        <translation>参照...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"24\"/>\n        <source>GOPATH:</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"38\"/>\n        <source>Template:</source>\n        <oldsource>Template</oldsource>\n        <translation>テンプレート:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"54\"/>\n        <source>Type</source>\n        <translation>種別</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"73\"/>\n        <source>Information</source>\n        <translation>情報</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"87\"/>\n        <source>Name:</source>\n        <translation>名前:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"114\"/>\n        <source>Location:</source>\n        <translation>位置:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"127\"/>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"185\"/>\n        <source>Error</source>\n        <translation>エラー</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"127\"/>\n        <source>Could not create the target directory: %1</source>\n        <translation>ターゲットディレクトリが作成出来ませんでした: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"132\"/>\n        <source>Warning</source>\n        <translation>警告</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"132\"/>\n        <source>Location %1 is not empty.\nUse the target directory anyway?</source>\n        <translation>場所 %1 は空です。\nそれでもこのディレクトリを使用しますか?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"169\"/>\n        <source>Overwrite File</source>\n        <translation>ファイルの上書き</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"169\"/>\n        <source>%1 already exists.\nDo you want to replace it?</source>\n        <translation>%1 は既に存在しています。\n置き換えますか?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"185\"/>\n        <source>No files could be created.</source>\n        <translation>ファイルが作成出来ませんでした</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"280\"/>\n        <source>File template details:</source>\n        <translation>ファイルテンプレートの詳細:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"282\"/>\n        <source>Project template details:</source>\n        <oldsource>New project wizard:</oldsource>\n        <translation>新規プロジェクトウィザード:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"362\"/>\n        <source>Choose a directory for the new content:</source>\n        <translation>新しいコンテンツを置くディレクトリ選択:</translation>\n    </message>\n</context>\n<context>\n    <name>OpenEditorsWidget</name>\n    <message>\n        <location filename=\"src/liteapp/openeditorswidget.cpp\" line=\"43\"/>\n        <source>Open Documents</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>OptionsBrowser</name>\n    <message>\n        <location filename=\"src/liteapp/optionsbrowser.cpp\" line=\"57\"/>\n        <source>Options</source>\n        <oldsource>Options Page</oldsource>\n        <translation>オプション</translation>\n    </message>\n</context>\n<context>\n    <name>OptionsWidget</name>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"14\"/>\n        <source>Options</source>\n        <translation>オプション</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"56\"/>\n        <source>Info</source>\n        <translation>情報</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"106\"/>\n        <source>[*] item request restart of LiteIDE</source>\n        <oldsource>[*] item requeset restart LiteIDE</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>OutputDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"444\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"472\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"473\"/>\n        <source>Move To</source>\n        <translation type=\"unfinished\">移動</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"446\"/>\n        <source>LeftSideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"447\"/>\n        <source>RightSideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"480\"/>\n        <source>BottomDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>OutputOption</name>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"20\"/>\n        <source>Font</source>\n        <translation type=\"unfinished\">フォント</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"26\"/>\n        <source>Family:</source>\n        <translation type=\"unfinished\">フォント名:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"43\"/>\n        <source>Size:</source>\n        <translation type=\"unfinished\">サイズ:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"60\"/>\n        <source>Zoom:</source>\n        <translation type=\"unfinished\">ズーム:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"67\"/>\n        <source>%</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"86\"/>\n        <source>Antialias</source>\n        <translation type=\"unfinished\">アンチエイリアス</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"109\"/>\n        <source>Display</source>\n        <translation type=\"unfinished\">表示</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"115\"/>\n        <source>Use editor color scheme</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"124\"/>\n        <source>Sets the maximum number of lines</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>PackageBrowser</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"87\"/>\n        <source>Manage GOPATH/Modules ...</source>\n        <oldsource>Manage GOPATH...</oldsource>\n        <translation type=\"unfinished\">GOPATHを管理...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"86\"/>\n        <source>Reload All</source>\n        <translation>全て再読み込み</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"93\"/>\n        <source>Use godoc View</source>\n        <translation type=\"unfinished\">ここでGodocを見る</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"94\"/>\n        <source>Load Package in New Window</source>\n        <translation>新しいウィンドウでパッケージを読み込む</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"95\"/>\n        <source>Add Package to Folders</source>\n        <translation>フォルダにパッケージを追加</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"96\"/>\n        <source>Open Source File</source>\n        <translation>ソースファイルを開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"97\"/>\n        <source>Copy Name to Clipboard</source>\n        <oldsource>Copy Name To Clipboard</oldsource>\n        <translation>名前をクリップボードにコピー</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"119\"/>\n        <source>Go Package Browser</source>\n        <oldsource>Package Browser</oldsource>\n        <translation type=\"unfinished\">パッケージブラウザ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"208\"/>\n        <source>Loading Go package list...</source>\n        <oldsource>Loading go package ...</oldsource>\n        <translation>Goのパッケージリストを読み込み中...</translation>\n    </message>\n</context>\n<context>\n    <name>PackageProject</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"76\"/>\n        <source>Reload Package</source>\n        <translation>パッケージをリロード</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"77\"/>\n        <source>Open Explorer Here</source>\n        <translation>ここでエクスプローラを開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"78\"/>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"299\"/>\n        <source>Add Source File</source>\n        <translation>ソースファイルを追加</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"299\"/>\n        <source>File Name:</source>\n        <translation type=\"unfinished\">ファイル名:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"310\"/>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"315\"/>\n        <source>Error</source>\n        <translation>エラー</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"310\"/>\n        <source>File %1 already exists.</source>\n        <translation>ファイル %1 は既に存在しています</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"315\"/>\n        <source>Could not open %1 for writing.</source>\n        <translation>%1 を書き込み用に開けませんでした</translation>\n    </message>\n</context>\n<context>\n    <name>PluginsDialog</name>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.ui\" line=\"14\"/>\n        <source>Installed Plugins</source>\n        <oldsource>Install Plugins</oldsource>\n        <translation>プラグインをインストール</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.ui\" line=\"45\"/>\n        <source>Close</source>\n        <translation>閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"51\"/>\n        <source>Name</source>\n        <translation>名前</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"54\"/>\n        <source>Author</source>\n        <oldsource>Anchor</oldsource>\n        <translation>作者</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"52\"/>\n        <source>Enabled</source>\n        <translation>有効</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"53\"/>\n        <source>Details</source>\n        <translation>詳細</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"55\"/>\n        <source>Version</source>\n        <oldsource>Last Ver</oldsource>\n        <translation>バージョン</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"56\"/>\n        <source>File Name</source>\n        <oldsource>FileName</oldsource>\n        <translation>ファイル名</translation>\n    </message>\n</context>\n<context>\n    <name>ProcessEx</name>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"52\"/>\n        <source>process exited with code %1</source>\n        <translation>プロセスがコード %1 で終了しました</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"55\"/>\n        <source>process crashed or was terminated</source>\n        <translation>プロセスがクラッシュしたか強制終了しました</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"58\"/>\n        <source>process exited with an unknown status</source>\n        <translation>原因不明のステータスでプロセスが終了しました</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"68\"/>\n        <source>process failed to start</source>\n        <translation>プロセスの起動に失敗しました</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"71\"/>\n        <source>process crashed or was terminated while running</source>\n        <translation>プロセスがクラッシュしたか実行中に強制終了しました</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"74\"/>\n        <source>timed out waiting for process</source>\n        <translation>プロセス待機がタイムアウトしました</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"77\"/>\n        <source>couldn&apos;t read from the process</source>\n        <translation>プロセスから読み込めませんでした</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"80\"/>\n        <source>couldn&apos;t write to the process</source>\n        <translation>プロセスに書き込めませんでした</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"84\"/>\n        <source>an unknown error occurred</source>\n        <translation>エラーが発生</translation>\n    </message>\n</context>\n<context>\n    <name>ProjectManager</name>\n    <message>\n        <location filename=\"src/liteapp/projectmanager.cpp\" line=\"95\"/>\n        <source>Project &lt;%1&gt;</source>\n        <translation>プロジェクト &lt;%1&gt;</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/projectmanager.cpp\" line=\"119\"/>\n        <source>Import Directory &lt;%1&gt;</source>\n        <translation>インポートディレクトリ &lt;%1&gt;</translation>\n    </message>\n</context>\n<context>\n    <name>QFileSystemModel</name>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"46\"/>\n        <source>%1 TB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"48\"/>\n        <source>%1 GB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"50\"/>\n        <source>%1 MB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"52\"/>\n        <source>%1 KB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"53\"/>\n        <source>%1 bytes</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QJson::ParserRunnable</name>\n    <message>\n        <location filename=\"src/3rdparty/qjson/src/parserrunnable.cpp\" line=\"64\"/>\n        <source>An error occurred while parsing json: %1</source>\n        <translation>jsonの解析中にエラーが発生: %1</translation>\n    </message>\n</context>\n<context>\n    <name>QJsonParseError</name>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"59\"/>\n        <source>no error occurred</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"60\"/>\n        <source>unterminated object</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"61\"/>\n        <source>missing name separator</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"62\"/>\n        <source>unterminated array</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"63\"/>\n        <source>missing value separator</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"64\"/>\n        <source>illegal value</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"65\"/>\n        <source>invalid termination by number</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"66\"/>\n        <source>illegal number</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"67\"/>\n        <source>invalid escape sequence</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"68\"/>\n        <source>invalid UTF8 string</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"69\"/>\n        <source>unterminated string</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"70\"/>\n        <source>object is missing after a comma</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"71\"/>\n        <source>too deeply nested document</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"72\"/>\n        <source>too large document</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"73\"/>\n        <source>garbage at the end of the document</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenAction</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenaction.cpp\" line=\"59\"/>\n        <source>Show and Run Commands</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenEditor</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopeneditor.cpp\" line=\"56\"/>\n        <source>Show All Opened Editors</source>\n        <oldsource>Show All Editors</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFileSystem</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfilesystem.cpp\" line=\"156\"/>\n        <source>File System</source>\n        <translation type=\"unfinished\">ファイルシステム</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFiles</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfiles.cpp\" line=\"72\"/>\n        <source>Go to File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfiles.cpp\" line=\"77\"/>\n        <source>Type &apos;?&apos; to get help on the actions you can take from here</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFolder</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfolder.cpp\" line=\"71\"/>\n        <source>Browser Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenHelp</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenhelp.cpp\" line=\"49\"/>\n        <source>Show All Quick Open Actions</source>\n        <oldsource>Show Quick Open Help</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenLines</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"51\"/>\n        <source>Go to Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"79\"/>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"84\"/>\n        <source>Open a text file first to go to a line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"97\"/>\n        <source>Type a line number between %1 and %2 to navigate to</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"100\"/>\n        <source>Go to Line %1</source>\n        <oldsource>Go to line %1</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenManager</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"82\"/>\n        <source>Quick Open File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"83\"/>\n        <source>Quick Open Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"84\"/>\n        <source>Quick Open Symbol</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"85\"/>\n        <source>Quick Open Command</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"86\"/>\n        <source>Show All Quick Open Actions</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenMimeType</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmimetype.cpp\" line=\"41\"/>\n        <source>Go to Symbol in File</source>\n        <oldsource>Open Symbol by Name</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmimetype.cpp\" line=\"42\"/>\n        <source>not found symbol</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenOption</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">フォーム</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"20\"/>\n        <source>QuickOpenFiles</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"26\"/>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"79\"/>\n        <source>Match case sensitive</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"35\"/>\n        <source>Max files count:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"73\"/>\n        <source>QuickOpenEditor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>RecentManager</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.cpp\" line=\"54\"/>\n        <source>Clear All History</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.cpp\" line=\"169\"/>\n        <source>Clear Menu</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SearchEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"83\"/>\n        <source>Search</source>\n        <translation>検索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"84\"/>\n        <source>Stop Search</source>\n        <translation>検索を中断</translation>\n    </message>\n</context>\n<context>\n    <name>SelectExternalDialog</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"14\"/>\n        <source>Debug External Application</source>\n        <translation>外部のアプリケーションをデバッグ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"22\"/>\n        <source>Application:</source>\n        <translation>アプリケーション:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"29\"/>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"56\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>参照...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"36\"/>\n        <source>Arguments:</source>\n        <translation>引数:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"46\"/>\n        <source>Working directory:</source>\n        <translation>作業ディレクトリ:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.cpp\" line=\"82\"/>\n        <source>Select Executable</source>\n        <translation>実行ファイルを選択</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.cpp\" line=\"92\"/>\n        <source>Select the working directory:</source>\n        <oldsource>Select Working Directory</oldsource>\n        <translation>作業ディレクトリを選択</translation>\n    </message>\n</context>\n<context>\n    <name>SessionRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"197\"/>\n        <source>Sessions</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SideDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"50\"/>\n        <source>Move To</source>\n        <translation type=\"unfinished\">移動</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"54\"/>\n        <source>RightSideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"56\"/>\n        <source>LeftDockWidgt</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"58\"/>\n        <source>LeftSideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"60\"/>\n        <source>RightDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"63\"/>\n        <source>OutputBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"75\"/>\n        <source>SideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"76\"/>\n        <source>Show SideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SideWindowStyle</name>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"547\"/>\n        <source>Hide SideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"585\"/>\n        <source>SideBar Windows</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"586\"/>\n        <source>Output Windows</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SplitDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"300\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"379\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"380\"/>\n        <source>Move To</source>\n        <translation type=\"unfinished\">移動</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"302\"/>\n        <source>Top</source>\n        <translation type=\"unfinished\">一番上</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"306\"/>\n        <source>Top (Split)</source>\n        <translation type=\"unfinished\">一番上(分割)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"343\"/>\n        <source>TopDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"343\"/>\n        <source>TopDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"312\"/>\n        <source>Bottom</source>\n        <translation type=\"unfinished\">一番下</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"316\"/>\n        <source>Bottom (Split)</source>\n        <translation type=\"unfinished\">一番下(分割)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"345\"/>\n        <source>BottomDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"345\"/>\n        <source>BottomDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"322\"/>\n        <source>Left</source>\n        <translation type=\"unfinished\">左</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"326\"/>\n        <source>Left (Split)</source>\n        <translation type=\"unfinished\">左(分割)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"347\"/>\n        <source>LeftDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"347\"/>\n        <source>LeftDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"332\"/>\n        <source>Right</source>\n        <translation type=\"unfinished\">右</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"336\"/>\n        <source>Right (Split)</source>\n        <translation type=\"unfinished\">右(分割)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"349\"/>\n        <source>RightDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"349\"/>\n        <source>RightDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"355\"/>\n        <source>Unsplit</source>\n        <translation type=\"unfinished\">分割しない</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"360\"/>\n        <source>Split</source>\n        <translation type=\"unfinished\">分割</translation>\n    </message>\n</context>\n<context>\n    <name>SplitWindowStyle</name>\n    <message>\n        <location filename=\"src/liteapp/splitwindowstyle.cpp\" line=\"244\"/>\n        <source>Hide Sidebars</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/splitwindowstyle.cpp\" line=\"278\"/>\n        <source>Tool Windows</source>\n        <translation type=\"unfinished\">ツールウィンドウ</translation>\n    </message>\n</context>\n<context>\n    <name>Terminal</name>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"132\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"189\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"773\"/>\n        <source>New</source>\n        <translation type=\"unfinished\">新規</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"133\"/>\n        <source>Open a new terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"135\"/>\n        <source>Close</source>\n        <translation type=\"unfinished\">閉じる</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"136\"/>\n        <source>Close current terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"138\"/>\n        <source>CloseAll</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"139\"/>\n        <source>Close all terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"142\"/>\n        <source>LoadEnv</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"143\"/>\n        <source>Current terminal load environment from LiteIDE</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"148\"/>\n        <source>Filter</source>\n        <translation type=\"unfinished\">フィルタ</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"184\"/>\n        <source>Dark Mode</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"195\"/>\n        <source>Login Mode (shell --login)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"237\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"741\"/>\n        <source>Terminal</source>\n        <translation type=\"unfinished\">ターミナル</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"741\"/>\n        <source>Rename Tab Title</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>TerminalEdit</name>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"67\"/>\n        <source>Cut</source>\n        <translation>切り取り</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"71\"/>\n        <source>Copy</source>\n        <translation>コピー</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"75\"/>\n        <source>Paste</source>\n        <translation>貼り付け</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"79\"/>\n        <source>Select All</source>\n        <translation>全て選択</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"83\"/>\n        <source>Clear All</source>\n        <translation>全てクリア</translation>\n    </message>\n</context>\n<context>\n    <name>TextEditor::Internal::ColorScheme</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_texteditor/colorscheme.cpp\" line=\"212\"/>\n        <source>Not a color scheme file.</source>\n        <translation>色スキームファイルではありません</translation>\n    </message>\n</context>\n<context>\n    <name>Utils::FilterLineEdit</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_editutil/filterlineedit.cpp\" line=\"51\"/>\n        <source>Filter</source>\n        <translation>フィルタ</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_editutil/filterlineedit.cpp\" line=\"52\"/>\n        <source>Clear text</source>\n        <translation>テキストをクリア</translation>\n    </message>\n</context>\n<context>\n    <name>VTermWidget</name>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"50\"/>\n        <source>Copy</source>\n        <translation type=\"unfinished\">コピー</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"54\"/>\n        <source>Paste</source>\n        <translation type=\"unfinished\">貼り付け</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"58\"/>\n        <source>Select All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>WebKitBrowser</name>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"69\"/>\n        <source>Navigation</source>\n        <translation>ナビゲーション</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"72\"/>\n        <source>Open Html File</source>\n        <oldsource>Open Html</oldsource>\n        <translation>HTMLファイルを開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"119\"/>\n        <source>WebKitBrowser</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"169\"/>\n        <source>False load %1 !</source>\n        <translation>%1 の読み込み失敗!</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"256\"/>\n        <source>Open Html or Markdown File</source>\n        <oldsource>Open Html or Markdown Files</oldsource>\n        <translation>HTMLもしくはMarkdownファイルを開く</translation>\n    </message>\n</context>\n<context>\n    <name>WebKitHtmlWidgetPlugin</name>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkithtmlwidgetplugin.cpp\" line=\"74\"/>\n        <source>Open Html or Markdown File</source>\n        <translation>HTMLもしくはMarkdownファイルを開く</translation>\n    </message>\n</context>\n<context>\n    <name>WelcomeBrowser</name>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"65\"/>\n        <source>New</source>\n        <translation>新規</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"66\"/>\n        <source>Open</source>\n        <translation>開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"67\"/>\n        <source>Open Folder</source>\n        <translation>フォルダを開く</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"68\"/>\n        <source>Options</source>\n        <translation>オプション</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"207\"/>\n        <source>Welcome</source>\n        <oldsource>Welcome Page</oldsource>\n        <translation>ようこそ</translation>\n    </message>\n</context>\n<context>\n    <name>WelcomePlugin</name>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomeplugin.cpp\" line=\"77\"/>\n        <source>Welcome</source>\n        <oldsource>Home</oldsource>\n        <translation>ホーム</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "liteidex/liteide_ru.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.1\" language=\"ru_RU\">\n<context>\n    <name>AboutDialog</name>\n    <message>\n        <source>About LiteIDE</source>\n        <oldsource>About Liteide</oldsource>\n        <translation>О программе LiteIDE</translation>\n    </message>\n    <message>\n        <source>Information</source>\n        <oldsource>Infomation</oldsource>\n        <translation>Информация</translation>\n    </message>\n    <message>\n        <source>Welcome:</source>\n        <translation>Добро пожаловать:</translation>\n    </message>\n    <message>\n        <source>Welcome to LiteIDE X! LiteIDE is a simple, open source, cross-platform IDE.</source>\n        <oldsource>Welcome to LiteIDE X!\nLiteIDE is a simple, open source, cross-platform IDE.</oldsource>\n        <translation>Добро пожаловать в LiteIDE X!\nLiteIDE это простая кросплатформенная среда разработки с открытым исходным кодом.</translation>\n    </message>\n    <message>\n        <source>Project:</source>\n        <translation>Проект:</translation>\n    </message>\n    <message>\n        <source>Name:</source>\n        <translation>Название:</translation>\n    </message>\n    <message>\n        <source>Author:</source>\n        <translation>Автор:</translation>\n    </message>\n    <message>\n        <source>Version:</source>\n        <translation>Версия:</translation>\n    </message>\n    <message>\n        <source>Build:</source>\n        <translation>Сборка:</translation>\n    </message>\n    <message>\n        <source>Based on Qt</source>\n        <oldsource>Based on Qt Version</oldsource>\n        <translation>На основе Qt</translation>\n    </message>\n    <message>\n        <source>Source Code:</source>\n        <translation>Исходный код:</translation>\n    </message>\n    <message>\n        <source>Support LiteIDE:</source>\n        <oldsource>Support</oldsource>\n        <translation>Поддержка LiteIDE:</translation>\n    </message>\n    <message>\n        <source>Developers</source>\n        <translation>Разработчики</translation>\n    </message>\n    <message>\n        <source>Translations</source>\n        <translation>Перевод</translation>\n    </message>\n    <message>\n        <source>Chinese</source>\n        <translation>Китайский</translation>\n    </message>\n    <message>\n        <source>Japanese</source>\n        <translation>Японский</translation>\n    </message>\n    <message>\n        <source>Russian</source>\n        <translation>Русский</translation>\n    </message>\n    <message>\n        <source>French</source>\n        <translation>Французский</translation>\n    </message>\n    <message>\n        <source>Traditional Chinese</source>\n        <translation>Китайский традиционный</translation>\n    </message>\n    <message>\n        <source>German</source>\n        <translation>Немецкий</translation>\n    </message>\n    <message>\n        <source>Ukrainian</source>\n        <translation>Украинский</translation>\n    </message>\n    <message>\n        <source>Thanks to...</source>\n        <translation>Благодарности...</translation>\n    </message>\n    <message>\n        <source>License</source>\n        <translation>Лицензия</translation>\n    </message>\n    <message>\n        <source>Close</source>\n        <translation>Закрыть</translation>\n    </message>\n    <message>\n        <source>Based on Qt %1 (%2 bit)</source>\n        <translation>Основано на Qt %1 (%2 бит)</translation>\n    </message>\n</context>\n<context>\n    <name>ActionManager</name>\n    <message>\n        <source>&amp;File</source>\n        <translation>&amp;Файл</translation>\n    </message>\n    <message>\n        <source>&amp;Recent</source>\n        <translation>&amp;Последние</translation>\n    </message>\n    <message>\n        <source>&amp;Edit</source>\n        <translation>&amp;Правка</translation>\n    </message>\n    <message>\n        <source>F&amp;ind</source>\n        <oldsource>&amp;Find</oldsource>\n        <translation>П&amp;оиск</translation>\n    </message>\n    <message>\n        <source>&amp;View</source>\n        <translation>&amp;Вид</translation>\n    </message>\n    <message>\n        <source>&amp;Help</source>\n        <translation>&amp;Справка</translation>\n    </message>\n    <message>\n        <source>Standard Toolbar</source>\n        <oldsource>Standard ToolBar</oldsource>\n        <translation>Стандартная панель</translation>\n    </message>\n    <message>\n        <source>&amp;Tools</source>\n        <translation>&amp;Инструменты</translation>\n    </message>\n    <message>\n        <source>&amp;Build</source>\n        <translation>С&amp;борка</translation>\n    </message>\n    <message>\n        <source>&amp;Debug</source>\n        <translation>&amp;Отладка</translation>\n    </message>\n</context>\n<context>\n    <name>AstWidget</name>\n    <message>\n        <source>Go To Definition</source>\n        <translation>Перейти к определению</translation>\n    </message>\n    <message>\n        <source>View Import Document</source>\n        <translation>Открыть документацию импорта</translation>\n    </message>\n</context>\n<context>\n    <name>BaseDockWidget</name>\n    <message>\n        <source>Hide</source>\n        <translation>Скрыть</translation>\n    </message>\n    <message>\n        <source>Hide Tool Window</source>\n        <translation>Скрыть окно инструментов</translation>\n    </message>\n    <message>\n        <source>Floating Window</source>\n        <translation>Плавающее окно</translation>\n    </message>\n</context>\n<context>\n    <name>BaseFolderView</name>\n    <message>\n        <source>Open File</source>\n        <translation>Открыть файл</translation>\n    </message>\n    <message>\n        <source>New File...</source>\n        <translation>Создать файл...</translation>\n    </message>\n    <message>\n        <source>New File Wizard...</source>\n        <translation>Мастер создания файла...</translation>\n    </message>\n    <message>\n        <source>Rename File...</source>\n        <translation>Переименовать файл...</translation>\n    </message>\n    <message>\n        <source>Delete File</source>\n        <translation>Удалить файл</translation>\n    </message>\n    <message>\n        <source>New Folder...</source>\n        <translation>Создать папку...</translation>\n    </message>\n    <message>\n        <source>Rename Folder...</source>\n        <translation>Переименовать папку...</translation>\n    </message>\n    <message>\n        <source>Delete Folder</source>\n        <translation>Удалить папку</translation>\n    </message>\n    <message>\n        <source>Open Terminal Here</source>\n        <translation>Запустить терминал в папке</translation>\n    </message>\n    <message>\n        <source>Open Folder...</source>\n        <oldsource>Add Folder...</oldsource>\n        <translation>Открыть папку...</translation>\n    </message>\n    <message>\n        <source>Reload Folder</source>\n        <translation>Обновить папку</translation>\n    </message>\n    <message>\n        <source>Close Folder</source>\n        <translation>Закрыть папку</translation>\n    </message>\n    <message>\n        <source>Close All Folders</source>\n        <translation>Закрыть все папки</translation>\n    </message>\n    <message>\n        <source>Create File</source>\n        <translation>Создание файла</translation>\n    </message>\n    <message>\n        <source>A file with that name already exists!</source>\n        <translation>Файл с этим именем уже существует!</translation>\n    </message>\n    <message>\n        <source>Failed to create the file!</source>\n        <translation>Не удалось создать файл!</translation>\n    </message>\n    <message>\n        <source>Rename File</source>\n        <translation>Переименование файла</translation>\n    </message>\n    <message>\n        <source>New Name:</source>\n        <translation>Новое имя:</translation>\n    </message>\n    <message>\n        <source>Failed to rename the file!</source>\n        <translation>Не удалось переименовать файл!</translation>\n    </message>\n    <message>\n        <source>Create Folder</source>\n        <translation>Создание папки</translation>\n    </message>\n    <message>\n        <source>A folder with that name already exists!</source>\n        <translation>Папка с этим именем уже существует!</translation>\n    </message>\n    <message>\n        <source>Failed to create the folder!</source>\n        <translation>Не удалось создать папку!</translation>\n    </message>\n    <message>\n        <source>Rename Folder</source>\n        <translation>Переименование папки</translation>\n    </message>\n    <message>\n        <source>Folder Name</source>\n        <translation>Имя папки</translation>\n    </message>\n    <message>\n        <source>Failed to rename the folder!</source>\n        <translation>Не удалось переименовать папку!</translation>\n    </message>\n    <message>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Удалить эту папку со всем содержимым?</translation>\n    </message>\n    <message>\n        <source>Failed to delete the folder!</source>\n        <translation>Не удалось удалить папку!</translation>\n    </message>\n    <message>\n        <source>Open In New Window</source>\n        <translation>Открыть в новом окне</translation>\n    </message>\n    <message>\n        <source>Show in Explorer</source>\n        <translation>Открыть в проводнике</translation>\n    </message>\n    <message>\n        <source>Show in Finder</source>\n        <translation>Открыть в Finder</translation>\n    </message>\n    <message>\n        <source>Show Containing Folder</source>\n        <translation>Открыть каталог файла</translation>\n    </message>\n    <message>\n        <source>Open Command Prompt Here</source>\n        <translation>Запустить консоль в каталоге</translation>\n    </message>\n    <message>\n        <source>Open Application</source>\n        <translation>Открыть приложение</translation>\n    </message>\n    <message>\n        <source>Copy</source>\n        <translation type=\"unfinished\">Копировать</translation>\n    </message>\n    <message>\n        <source>Paste</source>\n        <translation type=\"unfinished\">Вставить</translation>\n    </message>\n    <message>\n        <source>Move To Trash</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>An item &quot;%1&quot; already exists in this location. Do you want to replace it and move old item to trash?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Stop</source>\n        <translation type=\"unfinished\">Остановить</translation>\n    </message>\n    <message>\n        <source>Keep Both</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Keep Both All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Replace</source>\n        <translation type=\"unfinished\">Заменить</translation>\n    </message>\n    <message>\n        <source>Replace All</source>\n        <translation type=\"unfinished\">Заменить всё</translation>\n    </message>\n    <message>\n        <source>Are you sure that you want move to trash this item?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Are you sure that you want move to trash %1 items?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Move to Trash</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Open With</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>System Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Open in Integrated Terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Copy Path</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>BookmarkManager</name>\n    <message>\n        <source>Toggle Bookmark</source>\n        <translation>Переключить закладку</translation>\n    </message>\n    <message>\n        <source>Bookmarks</source>\n        <translation>Закладки</translation>\n    </message>\n    <message>\n        <source>Goto bookmark</source>\n        <translation>Перейти к закладке</translation>\n    </message>\n    <message>\n        <source>Remove bookmark</source>\n        <translation>Удалить закладку</translation>\n    </message>\n    <message>\n        <source>Remove all bookmarks for this file</source>\n        <translation>Удалить все закладки в этом файле</translation>\n    </message>\n    <message>\n        <source>Remove all bookmarks for all files</source>\n        <translation>Удалить все закладки для всех файлов</translation>\n    </message>\n</context>\n<context>\n    <name>BookmarkRecent</name>\n    <message>\n        <source>Bookmarks</source>\n        <translation>Закладки</translation>\n    </message>\n</context>\n<context>\n    <name>BuildConfigDialog</name>\n    <message>\n        <source>Build Configuration</source>\n        <oldsource>Build Config Dialog</oldsource>\n        <translation>Конфигурация сборки</translation>\n    </message>\n    <message>\n        <source>Build ID</source>\n        <translation>ID сборки</translation>\n    </message>\n    <message>\n        <source>Build Path</source>\n        <oldsource>Build File</oldsource>\n        <translation>Каталог сборки</translation>\n    </message>\n    <message>\n        <source>LiteIDE</source>\n        <translation>LiteIDE</translation>\n    </message>\n    <message>\n        <source>Custom</source>\n        <oldsource>Build Custom</oldsource>\n        <translation>Другое</translation>\n    </message>\n    <message>\n        <source>GOPATH</source>\n        <translation>GOPATH</translation>\n    </message>\n    <message>\n        <source>Use Custom GOPATH for Build Path</source>\n        <translation>Использовать особый GOPATH для путей сборки</translation>\n    </message>\n    <message>\n        <source>Inherit System GOPATH</source>\n        <translation>Наследовать системный GOPATH</translation>\n    </message>\n    <message>\n        <source>Inherit LiteIDE GOPATH</source>\n        <translation>Наследовать GOPATH от LiteIDE</translation>\n    </message>\n    <message>\n        <source>Custom GOPATH (one per line)</source>\n        <translation>Особый GOPATH (по-одному в строку)</translation>\n    </message>\n    <message>\n        <source>Add Directory...</source>\n        <translation>Добавить...</translation>\n    </message>\n    <message>\n        <source>Clear</source>\n        <translation>Очистить</translation>\n    </message>\n    <message>\n        <source>Reset all to initial value</source>\n        <translation>Сбросить всё в исходное состояние</translation>\n    </message>\n    <message>\n        <source>Choose directory to add to GOPATH:</source>\n        <translation>Выбор каталога для добавления в GOPATH</translation>\n    </message>\n    <message>\n        <source>Action</source>\n        <translation>Действие</translation>\n    </message>\n    <message>\n        <source>Name</source>\n        <translation>Имя</translation>\n    </message>\n    <message>\n        <source>Value</source>\n        <translation>Значение</translation>\n    </message>\n    <message>\n        <source>SharedValue</source>\n        <translation>Общее значение</translation>\n    </message>\n    <message>\n        <source>Id</source>\n        <translation>ID</translation>\n    </message>\n    <message>\n        <source>Cmd</source>\n        <translation>Команда</translation>\n    </message>\n    <message>\n        <source>Config</source>\n        <translation>Конфигурация</translation>\n    </message>\n    <message>\n        <source>GOPATH information</source>\n        <translation>Информация о GOPATH</translation>\n    </message>\n</context>\n<context>\n    <name>CreateDirDialog</name>\n    <message>\n        <source>Create Folder</source>\n        <translation>Создание папки</translation>\n    </message>\n    <message>\n        <source>Directory:</source>\n        <translation>Каталог:</translation>\n    </message>\n    <message>\n        <source>Dir Name:</source>\n        <translation>Имя каталога:</translation>\n    </message>\n    <message>\n        <source>Create</source>\n        <translation>Создать</translation>\n    </message>\n    <message>\n        <source>Cancel</source>\n        <translation>Отмена</translation>\n    </message>\n</context>\n<context>\n    <name>CreateFileDialog</name>\n    <message>\n        <source>Create File</source>\n        <oldsource>Create File Dialog</oldsource>\n        <translation>Создание файла</translation>\n    </message>\n    <message>\n        <source>Directory:</source>\n        <translation>Каталог:</translation>\n    </message>\n    <message>\n        <source>File Name:</source>\n        <translation>Имя файла:</translation>\n    </message>\n    <message>\n        <source>Create</source>\n        <translation>Создать</translation>\n    </message>\n    <message>\n        <source>Create and Edit</source>\n        <translation>Создать и открыть</translation>\n    </message>\n    <message>\n        <source>Cancel</source>\n        <translation>Отмена</translation>\n    </message>\n</context>\n<context>\n    <name>DebugWidget</name>\n    <message>\n        <source>Async Record</source>\n        <oldsource>AsyncRecord</oldsource>\n        <translation>Асинхронная запись</translation>\n    </message>\n    <message>\n        <source>Variables</source>\n        <translation>Переменные</translation>\n    </message>\n    <message>\n        <source>Watch</source>\n        <translation>Наблюдаемые</translation>\n    </message>\n    <message>\n        <source>Call Stack</source>\n        <oldsource>CallStack</oldsource>\n        <translation>Стек вызовов</translation>\n    </message>\n    <message>\n        <source>Libraries</source>\n        <oldsource>Library</oldsource>\n        <translation>Библиотеки</translation>\n    </message>\n    <message>\n        <source>Console</source>\n        <translation>Консоль</translation>\n    </message>\n    <message>\n        <source>Remove Watch</source>\n        <translation>Удалить из наблюдения</translation>\n    </message>\n    <message>\n        <source>Remove All Watches</source>\n        <translation>Удалить все наблюдаемые</translation>\n    </message>\n    <message>\n        <source>Add Watch</source>\n        <translation>Добавить в наблюдаемые</translation>\n    </message>\n    <message>\n        <source>Threads</source>\n        <translation>Потоки</translation>\n    </message>\n    <message>\n        <source>Goroutines</source>\n        <translation>Горутины</translation>\n    </message>\n    <message>\n        <source>Registers</source>\n        <translation>Регистры</translation>\n    </message>\n    <message>\n        <source>Watch expression (e.g. buf main.var os.Stdout):</source>\n        <translation>Наблюдаемое выражение (например: buf main.var os.Stdout):</translation>\n    </message>\n</context>\n<context>\n    <name>DlvDebuggerOption</name>\n    <message>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <source>delve debug pass flags: (example --check-go-version=false)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>DocumentBrowser</name>\n    <message>\n        <source>Back</source>\n        <oldsource>Backward</oldsource>\n        <translation>Назад</translation>\n    </message>\n    <message>\n        <source>Forward</source>\n        <translation>Далее</translation>\n    </message>\n    <message>\n        <source>Reload</source>\n        <translation>Обновить</translation>\n    </message>\n    <message>\n        <source>Increase Font Size</source>\n        <translation>Увеличить шрифт</translation>\n    </message>\n    <message>\n        <source>Decrease Font Size</source>\n        <translation>Уменьшить шрифт</translation>\n    </message>\n    <message>\n        <source>Reset Font Size</source>\n        <translation>Стандартный размер шрифта</translation>\n    </message>\n</context>\n<context>\n    <name>DocumentBrowserFactory</name>\n    <message>\n        <source>DocumentBrowser</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>EditorManager</name>\n    <message>\n        <source>Close</source>\n        <translation>Закрыть</translation>\n    </message>\n    <message>\n        <source>Move to New Window</source>\n        <oldsource>Move To New Window</oldsource>\n        <translation>Переместить в новое окно</translation>\n    </message>\n    <message>\n        <source>Navigate Forward</source>\n        <oldsource>GoForward</oldsource>\n        <translation>Перейти вперёд</translation>\n    </message>\n    <message>\n        <source>Close Others</source>\n        <oldsource>Close Others Tabs</oldsource>\n        <translation>Закрыть другие</translation>\n    </message>\n    <message>\n        <source>Close All</source>\n        <oldsource>Close All Tabs</oldsource>\n        <translation>Закрыть всё</translation>\n    </message>\n    <message>\n        <source>Close Left Tabs</source>\n        <translation>Закрыть вкладки слева</translation>\n    </message>\n    <message>\n        <source>Close Right Tabs</source>\n        <translation>Закрыть вкладки справа</translation>\n    </message>\n    <message>\n        <source>Close Files in Same Folder</source>\n        <oldsource>Close Same Folder Files</oldsource>\n        <translation>Закрыть файлы в этой папке</translation>\n    </message>\n    <message>\n        <source>Close Files in Other Folders</source>\n        <oldsource>Close Other Folder Files</oldsource>\n        <translation>Закрыть файлы в других папках</translation>\n    </message>\n    <message>\n        <source>Copy Full Path to Clipboard</source>\n        <oldsource>Copy Path to Clipboard</oldsource>\n        <translation>Скопировать полный путь в буфер</translation>\n    </message>\n    <message>\n        <source>Show in Explorer</source>\n        <translation>Открыть в проводнике</translation>\n    </message>\n    <message>\n        <source>Navigate Backward</source>\n        <translation>Перейти назад</translation>\n    </message>\n    <message>\n        <source>Save changes to %1?</source>\n        <translation>Сохранить изменения в %1?</translation>\n    </message>\n    <message>\n        <source>Unsaved Modifications</source>\n        <oldsource>Save Modify</oldsource>\n        <translation>Несохранённые изменения</translation>\n    </message>\n    <message>\n        <source>All Files (*)</source>\n        <translation>Все файлы (*)</translation>\n    </message>\n    <message>\n        <source>Save As</source>\n        <translation>Сохранить как...</translation>\n    </message>\n    <message>\n        <source>Open Terminal Here</source>\n        <translation>Запустить терминал в каталоге</translation>\n    </message>\n    <message>\n        <source>Show in Finder</source>\n        <translation>Открыть в Finder</translation>\n    </message>\n    <message>\n        <source>Show Containing Folder</source>\n        <translation>Открыть каталог файла</translation>\n    </message>\n    <message>\n        <source>Open Command Prompt Here</source>\n        <translation>Запустить консоль в каталоге</translation>\n    </message>\n    <message>\n        <source>Open Editor</source>\n        <translation>Открыть редактор</translation>\n    </message>\n    <message>\n        <source>Open in Integrated Terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>EnvManager</name>\n    <message>\n        <source>Environment Toolbar</source>\n        <oldsource>Environment ToolBar</oldsource>\n        <translation>Панель среды</translation>\n    </message>\n    <message>\n        <source>Switching current environment</source>\n        <oldsource>Switch Current Environment</oldsource>\n        <translation>Переключение текущей среды</translation>\n    </message>\n    <message>\n        <source>Edit current environment</source>\n        <oldsource>Edit Current Environment</oldsource>\n        <translation>Изменить текущую среду</translation>\n    </message>\n    <message>\n        <source>Reload current environment</source>\n        <oldsource>Reload Current Environment</oldsource>\n        <translation>Обновить текущую среду</translation>\n    </message>\n    <message>\n        <source>Select Environment</source>\n        <translation>Выбор среды</translation>\n    </message>\n</context>\n<context>\n    <name>ExportDialog</name>\n    <message>\n        <source>Dialog</source>\n        <translation></translation>\n    </message>\n    <message>\n        <source>Name:</source>\n        <translation>Название:</translation>\n    </message>\n    <message>\n        <source>Export</source>\n        <translation>Экспортировать</translation>\n    </message>\n    <message>\n        <source>ExportAndView</source>\n        <translation>Экспортировать и просмотреть</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal</name>\n    <message>\n        <source>Use Vim-style Editing</source>\n        <translation>Редактирования в стиле Vim</translation>\n    </message>\n    <message>\n        <source>Read .vimrc</source>\n        <translation>Читать .vimrc</translation>\n    </message>\n    <message>\n        <source>Path to .vimrc</source>\n        <translation>Путь к .vimrc</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal::FakeVimHandler</name>\n    <message>\n        <source>Unknown option: %1</source>\n        <translation>Неизвестный параметр: %1</translation>\n    </message>\n    <message>\n        <source>Argument must be positive: %1=%2</source>\n        <translation>Аргумент должен быть положительным: %1=%2</translation>\n    </message>\n    <message>\n        <source>Mark &quot;%1&quot; not set.</source>\n        <translation>Метка «%1» не задана.</translation>\n    </message>\n    <message>\n        <source>%1%2%</source>\n        <translation>%1%2%</translation>\n    </message>\n    <message>\n        <source>%1All</source>\n        <translation>%1Все</translation>\n    </message>\n    <message>\n        <source>Not implemented in FakeVim.</source>\n        <translation>Не реализовано в FakeVim.</translation>\n    </message>\n    <message>\n        <source>Unknown option:</source>\n        <translation>Неизвестный параметр:</translation>\n    </message>\n    <message>\n        <source>Invalid argument:</source>\n        <translation>Неверный аргумент:</translation>\n    </message>\n    <message>\n        <source>Trailing characters:</source>\n        <translation>Завершающие символы:</translation>\n    </message>\n    <message>\n        <source>Move lines into themselves.</source>\n        <translation>Перемещать строки в себя.</translation>\n    </message>\n    <message numerus=\"yes\">\n        <source>%n lines moved.</source>\n        <translation>\n            <numerusform>Перемещена %n строка.</numerusform>\n            <numerusform>Перемещено %n строки.</numerusform>\n            <numerusform>Перемещено %n строк.</numerusform>\n        </translation>\n    </message>\n    <message>\n        <source>File &quot;%1&quot; exists (add ! to override)</source>\n        <translation>Файл «%1» существует (добавьте ! для перезаписи)</translation>\n    </message>\n    <message>\n        <source>Cannot open file &quot;%1&quot; for writing</source>\n        <translation>Невозможно открыть файл «%1» для записи</translation>\n    </message>\n    <message>\n        <source>&quot;%1&quot; %2 %3L, %4C written.</source>\n        <translation>&quot;%1&quot; %2 %3L, %4C записано.</translation>\n    </message>\n    <message>\n        <source>Cannot open file &quot;%1&quot; for reading</source>\n        <translation>Невозможно открыть файл «%1» для чтения</translation>\n    </message>\n    <message>\n        <source>&quot;%1&quot; %2L, %3C</source>\n        <translation>&quot;%1&quot; %2L, %3C</translation>\n    </message>\n    <message numerus=\"yes\">\n        <source>%n lines filtered.</source>\n        <translation>\n            <numerusform>Отфильтрована %n строка.</numerusform>\n            <numerusform>Отфильтровано %n строки.</numerusform>\n            <numerusform>Отфильтровано %n строк.</numerusform>\n        </translation>\n    </message>\n    <message>\n        <source>Cannot open file %1</source>\n        <translation>Невозможно открыть файл %1</translation>\n    </message>\n    <message>\n        <source>Invalid regular expression: %1</source>\n        <translation>Неверное регулярное выражение: %1</translation>\n    </message>\n    <message>\n        <source>Pattern not found: %1</source>\n        <translation>Шаблон не найден: %1</translation>\n    </message>\n    <message>\n        <source>Search hit BOTTOM, continuing at TOP.</source>\n        <translation>Поиск достиг НИЗА и продолжен с ВЕРХА.</translation>\n    </message>\n    <message>\n        <source>Search hit TOP, continuing at BOTTOM.</source>\n        <translation>Поиск достиг ВЕРХА и продолжен с НИЗА.</translation>\n    </message>\n    <message>\n        <source>Search hit BOTTOM without match for: %1</source>\n        <translation>Поиск достиг НИЗА, не найдено совпадений с: %1</translation>\n    </message>\n    <message>\n        <source>Search hit TOP without match for: %1</source>\n        <translation>Поиск достиг ВЕРХА, не найдено совпадений с: %1</translation>\n    </message>\n    <message numerus=\"yes\">\n        <source>%n lines indented.</source>\n        <translation>\n            <numerusform>Сделаны отступы для %n строки.</numerusform>\n            <numerusform>Сделаны отступы для %n строк.</numerusform>\n            <numerusform>Сделаны отступы для %n строк.</numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <source>%n lines %1ed %2 time.</source>\n        <translation>\n            <numerusform>%n строка %1 %2 раз(а).</numerusform>\n            <numerusform>%n строки %1 %2 раз(а).</numerusform>\n            <numerusform>%n строк %1 %2 раз(а).</numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <source>%n lines yanked.</source>\n        <translation>\n            <numerusform>Скопирована %n строка.</numerusform>\n            <numerusform>Скопировано %n строки.</numerusform>\n            <numerusform>Скопировано %n строк.</numerusform>\n        </translation>\n    </message>\n    <message>\n        <source>Already at oldest change.</source>\n        <translation>Уже на старейшем изменении.</translation>\n    </message>\n    <message>\n        <source>Already at newest change.</source>\n        <translation>Уже на новейшем изменении.</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal::FakeVimHandler::Private</name>\n    <message>\n        <source>Recursive mapping</source>\n        <translation>Рекурсивное связывание</translation>\n    </message>\n    <message>\n        <source>Type Alt-V, Alt-V to quit FakeVim mode.</source>\n        <translation>Type Alt-V, Alt-V to quit FakeVim mode.</translation>\n    </message>\n    <message>\n        <source> [New] </source>\n        <translation> [Новый] </translation>\n    </message>\n    <message>\n        <source>Not an editor command: %1</source>\n        <translation>Не команда редактора: %1</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVimEdit</name>\n    <message>\n        <source>Use FakeVim Editing</source>\n        <translation>Использовать редактирование FakeVim</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVimEditOption</name>\n    <message>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <source>FakeVim initialization command list (# start is comment):</source>\n        <translation>Список команд инициализации FakeVim (с # начинаются комментарии):</translation>\n    </message>\n    <message>\n        <source>Load default init command list</source>\n        <translation>Загрузить стандартные команды</translation>\n    </message>\n</context>\n<context>\n    <name>FiFoTty</name>\n    <message>\n        <source>Cannot create temporary file: %1</source>\n        <translation>Не удалось создать временный файл: %1</translation>\n    </message>\n    <message>\n        <source>Cannot create FiFo %1: %2</source>\n        <translation>Не удалось создать FIFO %1: %2</translation>\n    </message>\n    <message>\n        <source>Cannot open FiFo %1: %2</source>\n        <translation>Не удалось открыть FIFO %1: %2</translation>\n    </message>\n</context>\n<context>\n    <name>FileBrowser</name>\n    <message>\n        <source>Synchronize with editor</source>\n        <translation>Синхронизировать с редактором</translation>\n    </message>\n    <message>\n        <source>Show Hidden Files</source>\n        <translation>Показать скрытые файлы</translation>\n    </message>\n    <message>\n        <source>Set As Root Folder</source>\n        <oldsource>Set Folder To Root</oldsource>\n        <translation>Установить как корневую папку</translation>\n    </message>\n    <message>\n        <source>Execute File</source>\n        <translation>Запустить файл</translation>\n    </message>\n    <message>\n        <source>Reload Folder</source>\n        <translation>Обновить папку</translation>\n    </message>\n    <message>\n        <source>Open Folder in New Window</source>\n        <translation>Открыть папку в новом окне</translation>\n    </message>\n    <message>\n        <source>Add to Folders</source>\n        <translation>Добавить в папки</translation>\n    </message>\n    <message>\n        <source>Open Parent</source>\n        <oldsource>Open to Parent</oldsource>\n        <translation>Открыть родительский</translation>\n    </message>\n    <message>\n        <source>Filter</source>\n        <translation>Фильтр</translation>\n    </message>\n    <message>\n        <source>File System</source>\n        <translation>Файловая система</translation>\n    </message>\n    <message>\n        <source>Show Details</source>\n        <translation>Подробнее</translation>\n    </message>\n    <message>\n        <source>Debug File</source>\n        <translation>Отладить файл</translation>\n    </message>\n</context>\n<context>\n    <name>FileBrowserOption</name>\n    <message>\n        <source>Form</source>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <source>Terminal</source>\n        <translation>Командная строка</translation>\n    </message>\n    <message>\n        <source>Command:</source>\n        <translation>Команда:</translation>\n    </message>\n    <message>\n        <source>Arguments:</source>\n        <translation>Аргументы:</translation>\n    </message>\n</context>\n<context>\n    <name>FileManager</name>\n    <message>\n        <source>All Files (*)</source>\n        <translation>Все файлы (*)</translation>\n    </message>\n    <message>\n        <source>LiteIDE</source>\n        <translation>LiteIDE</translation>\n    </message>\n    <message>\n        <source>Project &apos;%1&apos; has been created.\nDo you want to open it now?</source>\n        <oldsource>Project &apos;%1&apos; is created.\nDo you want to load?</oldsource>\n        <translation>Проект «%1» создан.\nЖелаете его открыть?</translation>\n    </message>\n    <message>\n        <source>Open Project or File</source>\n        <translation>Открытие файла или проекта</translation>\n    </message>\n    <message>\n        <source>Show Hidden Files</source>\n        <translation>Показать скрытые файлы</translation>\n    </message>\n    <message>\n        <source>Folders</source>\n        <oldsource>Folers</oldsource>\n        <translation>Папки</translation>\n    </message>\n    <message>\n        <source>All Support Files (%1)</source>\n        <translation>Все поддерживаемые (%1)</translation>\n    </message>\n    <message>\n        <source>Select a folder:</source>\n        <oldsource>Open Folder</oldsource>\n        <translation>Выбор папки</translation>\n    </message>\n    <message>\n        <source>%1\nThis file has been deleted from the drive,\nbut you have unsaved modifications in your LiteIDE editor.\n\nDo you want to close the editor?\nAnswering &quot;Yes&quot; will discard your unsaved changes.</source>\n        <translation>%1\nЭтот файл был удалён с диска, но у вас остались\nнесохранённые изменения в редакторе LiteIDE.\n\nЗакрыть редактор?\nОтветив «Да», вы потеряете несохранённые данные.</translation>\n    </message>\n    <message>\n        <source>%1\nThis file has been deleted from the drive.\n\nDo you want to close the editor?</source>\n        <translation>%1\nЭтот файл был удалён с диска.\n\nЗакрыть редактор?</translation>\n    </message>\n    <message>\n        <source>%1\nThis file has been modified on the drive,\nbut you have unsaved modifications in your LiteIDE editor.\n\nDo you want to reload the file from disk?\nAnswering &quot;Yes&quot; will discard your unsaved changes.</source>\n        <translation>%1\nЭтот файл был изменён на диске, но у вас остались\nнесохранённые изменения в редакторе LiteIDE.\n\nПерезагрузить файл с диска?\nОтветив «Да», вы потеряете несохранённые данные.</translation>\n    </message>\n    <message>\n        <source>%1\nThis file has been modified on the drive.\n\nDo you want to reload the file from disk?</source>\n        <translation>%1\nЭтот файл изменился на диске.\n\nПерезагрузить его?</translation>\n    </message>\n    <message>\n        <source>Open Files</source>\n        <translation>Открытие файлов</translation>\n    </message>\n    <message>\n        <source>Synchronize with editor</source>\n        <translation>Синхронизировать с редактором</translation>\n    </message>\n    <message>\n        <source>Filter</source>\n        <translation>Фильтр</translation>\n    </message>\n    <message>\n        <source>Open Project</source>\n        <translation>Открытие проекта</translation>\n    </message>\n    <message>\n        <source>LiteIDE X</source>\n        <translation>LiteIDE X</translation>\n    </message>\n    <message>\n        <source>Show Details</source>\n        <translation>Подробнее</translation>\n    </message>\n    <message>\n        <source>Split Mode</source>\n        <translation>Раздельный режим</translation>\n    </message>\n</context>\n<context>\n    <name>FileRecent</name>\n    <message>\n        <source>Files</source>\n        <translation>Файлы</translation>\n    </message>\n</context>\n<context>\n    <name>FileSearch</name>\n    <message>\n        <source>Match whole word</source>\n        <oldsource>Match word</oldsource>\n        <translation>Слово целиком</translation>\n    </message>\n    <message>\n        <source>Match case</source>\n        <translation>Учёт регистра</translation>\n    </message>\n    <message>\n        <source>Regular expression</source>\n        <translation>Регулярное выражение</translation>\n    </message>\n    <message>\n        <source>Scan subdirectories</source>\n        <oldsource>Look in subdirs</oldsource>\n        <translation>Искать рекурсивно</translation>\n    </message>\n    <message>\n        <source>Search for:</source>\n        <translation>Искать:</translation>\n    </message>\n    <message>\n        <source>Options:</source>\n        <translation>Параметры:</translation>\n    </message>\n    <message>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>Открыть...</translation>\n    </message>\n    <message>\n        <source>Filter:</source>\n        <translation>Фильтр:</translation>\n    </message>\n    <message>\n        <source>Files on File System</source>\n        <translation>Файлы в файловой системе</translation>\n    </message>\n    <message>\n        <source>Search</source>\n        <translation>Найти</translation>\n    </message>\n    <message>\n        <source>Cancel</source>\n        <translation>Отмена</translation>\n    </message>\n    <message>\n        <source>Clear</source>\n        <translation>Очистить</translation>\n    </message>\n    <message>\n        <source>Open Directory</source>\n        <translation>Открытие каталога</translation>\n    </message>\n    <message>\n        <source>Current Folder</source>\n        <translation>Текущий каталог</translation>\n    </message>\n    <message>\n        <source>Auto Switch</source>\n        <translation>Автопереключение</translation>\n    </message>\n</context>\n<context>\n    <name>FileSearchManager</name>\n    <message>\n        <source>Search Item:</source>\n        <translation>Искать элемент:</translation>\n    </message>\n    <message>\n        <source>Only golang file changes can be revert!</source>\n        <oldsource>This file change cannot be undone!</oldsource>\n        <translation>Можно откатить только изменения файлов golang!</translation>\n    </message>\n    <message>\n        <source>New Search</source>\n        <translation>Новый поиск</translation>\n    </message>\n    <message>\n        <source>Search Result</source>\n        <translation>Результаты поиска</translation>\n    </message>\n    <message>\n        <source>The following files have no write permissions. Do you want to change the permissions?</source>\n        <translation>Следующие файлы недоступны для записи. Сменить права доступа?</translation>\n    </message>\n    <message>\n        <source>File is readonly</source>\n        <translation>Файл только для чтения</translation>\n    </message>\n    <message>\n        <source>LiteIDE X</source>\n        <translation>LiteIDE X</translation>\n    </message>\n    <message>\n        <source>Warning! Replace text is empty.\nWant to remove all the search items?</source>\n        <translation>Внимание, замещающий текст отсутствует.\nУдалить все найденные элементы?</translation>\n    </message>\n    <message>\n        <source>Warning! Replace text is whitespace.\nWant to replace to all the search items to whitespace?</source>\n        <translation>Внимание, замена на пробельный символ(ы).\nЗаменить все найденные элементы на него?</translation>\n    </message>\n    <message>\n        <source>File Search</source>\n        <translation>Поиск файлов</translation>\n    </message>\n</context>\n<context>\n    <name>FileSystemWidget</name>\n    <message>\n        <source>Open File</source>\n        <oldsource>Open Editor</oldsource>\n        <translation>Открыть файл</translation>\n    </message>\n    <message>\n        <source>New File...</source>\n        <oldsource>New File</oldsource>\n        <translation>Создать файл...</translation>\n    </message>\n    <message>\n        <source>New File Wizard...</source>\n        <oldsource>New File Wizard</oldsource>\n        <translation>Мастер создания файла...</translation>\n    </message>\n    <message>\n        <source>Rename File</source>\n        <translation>Переименовать файл</translation>\n    </message>\n    <message>\n        <source>Delete File</source>\n        <oldsource>Remove File</oldsource>\n        <translation>Удалить файл</translation>\n    </message>\n    <message>\n        <source>New Folder...</source>\n        <oldsource>New Folder</oldsource>\n        <translation>Создать папку...</translation>\n    </message>\n    <message>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Удалить этот файл навсегда?</translation>\n    </message>\n    <message>\n        <source>Rename Folder</source>\n        <translation>Переименовать папку</translation>\n    </message>\n    <message>\n        <source>Delete Folder</source>\n        <oldsource>Remove Folder</oldsource>\n        <translation>Удалить папку</translation>\n    </message>\n    <message>\n        <source>Rename File...</source>\n        <translation>Переименовать файл...</translation>\n    </message>\n    <message>\n        <source>Rename Folder...</source>\n        <translation>Переименовать папку...</translation>\n    </message>\n    <message>\n        <source>Open Terminal Here</source>\n        <translation>Запустить терминал в папке</translation>\n    </message>\n    <message>\n        <source>Open Explorer Here</source>\n        <translation>Открыть папку в проводнике</translation>\n    </message>\n    <message>\n        <source>View Godoc Here</source>\n        <translation>Открыть Godoc в папке</translation>\n    </message>\n    <message>\n        <source>Add Folder</source>\n        <translation>Добавить папку</translation>\n    </message>\n    <message>\n        <source>Close Folder</source>\n        <translation>Закрыть папку</translation>\n    </message>\n    <message>\n        <source>Add Folder...</source>\n        <translation>Добавить папку...</translation>\n    </message>\n    <message>\n        <source>Close All Folders</source>\n        <translation>Закрыть все папки</translation>\n    </message>\n    <message>\n        <source>Create File</source>\n        <translation>Создание файла</translation>\n    </message>\n    <message>\n        <source>A file with that name already exists!</source>\n        <oldsource>The file already exists!</oldsource>\n        <translation>Файл с этим именем уже существует!</translation>\n    </message>\n    <message>\n        <source>Failed to create the file!</source>\n        <translation>Не удалось создать файл!</translation>\n    </message>\n    <message>\n        <source>New Name:</source>\n        <translation>Новое имя:</translation>\n    </message>\n    <message>\n        <source>Failed to rename the file!</source>\n        <translation>Не удалось переименовать файл!</translation>\n    </message>\n    <message>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Удалить эту папку со всем содержимым?</translation>\n    </message>\n    <message>\n        <source>Failed to delete the file!</source>\n        <oldsource>Failed to remove the file!</oldsource>\n        <translation>Не удалось удалить файл!</translation>\n    </message>\n    <message>\n        <source>Create Folder</source>\n        <translation>Создание папки</translation>\n    </message>\n    <message>\n        <source>A folder with that name already exists!</source>\n        <oldsource>The folder name is exists!</oldsource>\n        <translation>Папка с этим именем уже существует!</translation>\n    </message>\n    <message>\n        <source>Failed to create the folder!</source>\n        <translation>Не удалось создать папку!</translation>\n    </message>\n    <message>\n        <source>Folder Name</source>\n        <translation>Имя папки</translation>\n    </message>\n    <message>\n        <source>Failed to rename the folder!</source>\n        <translation>Не удалось переименовать папку!</translation>\n    </message>\n    <message>\n        <source>Failed to delete the folder!</source>\n        <oldsource>Failed to remove the folder!</oldsource>\n        <translation>Не удалось удалить папку!</translation>\n    </message>\n</context>\n<context>\n    <name>Find::Internal::SearchResultWidget</name>\n    <message>\n        <source>Search was canceled.</source>\n        <translation>Поиск был отменён.</translation>\n    </message>\n    <message>\n        <source>Cancel</source>\n        <translation>Отмена</translation>\n    </message>\n    <message>\n        <source>Repeat the search with same parameters</source>\n        <translation>Повтор поиска с теми же параметрами</translation>\n    </message>\n    <message>\n        <source>Search again</source>\n        <translation>Повторить поиск</translation>\n    </message>\n    <message>\n        <source>Set show replace mode ui</source>\n        <translation>Включить режим замены</translation>\n    </message>\n    <message>\n        <source>Show Replace</source>\n        <translation>Режим замены</translation>\n    </message>\n    <message>\n        <source>Replace with:</source>\n        <translation>Заменить на:</translation>\n    </message>\n    <message>\n        <source>Replace all occurrences</source>\n        <translation>Заменить все совпадения</translation>\n    </message>\n    <message>\n        <source>Replace</source>\n        <translation>Заменить</translation>\n    </message>\n    <message>\n        <source>Preserve case</source>\n        <translation>Сохранять регистр</translation>\n    </message>\n    <message>\n        <source>Revert with:</source>\n        <translation>Откатить на:</translation>\n    </message>\n    <message>\n        <source>Revert</source>\n        <translation>Откатить</translation>\n    </message>\n    <message>\n        <source>Revert all occurrences</source>\n        <translation>Откатить все совпадения</translation>\n    </message>\n    <message numerus=\"yes\">\n        <source>%n matches replaced.</source>\n        <translation>\n            <numerusform>%n совпадение заменено.</numerusform>\n            <numerusform>%n совпадения заменено.</numerusform>\n            <numerusform>%n совпадений заменено.</numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <source>searching... %n matches found.</source>\n        <translation>\n            <numerusform>поиск... %n совпадение.</numerusform>\n            <numerusform>поиск... %n совпадения.</numerusform>\n            <numerusform>поиск... %n совпадений.</numerusform>\n        </translation>\n    </message>\n    <message>\n        <source>searching ...</source>\n        <translation>поиск...</translation>\n    </message>\n    <message>\n        <source>No matches found.</source>\n        <translation>Совпадений не найдено.</translation>\n    </message>\n    <message numerus=\"yes\">\n        <source>%n matches found.</source>\n        <translation>\n            <numerusform>%n совпадение.</numerusform>\n            <numerusform>%n совпадения.</numerusform>\n            <numerusform>%n совпадений.</numerusform>\n        </translation>\n    </message>\n    <message>\n        <source>Expand all items</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Collapse all items</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FindApiEdit</name>\n    <message>\n        <source>Search</source>\n        <translation>Найти</translation>\n    </message>\n    <message>\n        <source>Stop Search</source>\n        <translation>Остановить поиск</translation>\n    </message>\n</context>\n<context>\n    <name>FindApiWidget</name>\n    <message>\n        <source>Search</source>\n        <translation>Найти</translation>\n    </message>\n    <message>\n        <source>Find</source>\n        <translation>Найти</translation>\n    </message>\n</context>\n<context>\n    <name>FindDocWidget</name>\n    <message>\n        <source>Search</source>\n        <translation>Искать</translation>\n    </message>\n    <message>\n        <source>Find</source>\n        <translation>Найти</translation>\n    </message>\n    <message>\n        <source>Find All</source>\n        <translation>Найти всё</translation>\n    </message>\n    <message>\n        <source>Find const</source>\n        <translation>Найти const</translation>\n    </message>\n    <message>\n        <source>Find func</source>\n        <translation>Найти func</translation>\n    </message>\n    <message>\n        <source>Find interface</source>\n        <translation>Найти interface</translation>\n    </message>\n    <message>\n        <source>Find pkg</source>\n        <translation>Найти pkg</translation>\n    </message>\n    <message>\n        <source>Find struct</source>\n        <translation>Найти struct</translation>\n    </message>\n    <message>\n        <source>Find type</source>\n        <translation>Найти type</translation>\n    </message>\n    <message>\n        <source>Find var</source>\n        <translation>Найти var</translation>\n    </message>\n    <message>\n        <source>Use Regexp</source>\n        <translation>Регулярное выражение</translation>\n    </message>\n    <message>\n        <source>Match Case</source>\n        <translation>Учёт регистра</translation>\n    </message>\n    <message>\n        <source>Match Word</source>\n        <translation>Слово целиком</translation>\n    </message>\n    <message>\n        <source>Help</source>\n        <translation>Справка</translation>\n    </message>\n</context>\n<context>\n    <name>FindEditor</name>\n    <message>\n        <source>Match case</source>\n        <translation>Учёт регистра</translation>\n    </message>\n    <message>\n        <source>Regular expression</source>\n        <translation>Регулярное выражение</translation>\n    </message>\n    <message>\n        <source>Wrap around</source>\n        <translation>Продолжить сначала</translation>\n    </message>\n    <message>\n        <source>Find Next</source>\n        <translation>Найти следующее</translation>\n    </message>\n    <message>\n        <source>Find Previous</source>\n        <oldsource>Find Prev</oldsource>\n        <translation>Найти предыдущее</translation>\n    </message>\n    <message>\n        <source>Replace With:</source>\n        <translation>Заменить на:</translation>\n    </message>\n    <message>\n        <source>Replace</source>\n        <translation>Заменить</translation>\n    </message>\n    <message>\n        <source>Replace All</source>\n        <translation>Заменить всё</translation>\n    </message>\n    <message>\n        <source>Match whole word only</source>\n        <translation>Слово целиком</translation>\n    </message>\n    <message>\n        <source>Ready</source>\n        <translation>Готово</translation>\n    </message>\n    <message>\n        <source>Close</source>\n        <translation>Закрыть</translation>\n    </message>\n    <message>\n        <source>Find What:</source>\n        <translation>Искать:</translation>\n    </message>\n    <message>\n        <source>Options:</source>\n        <oldsource>Find Option:</oldsource>\n        <translation>Параметры:</translation>\n    </message>\n    <message>\n        <source>Not found</source>\n        <translation>Не найдено</translation>\n    </message>\n    <message>\n        <source>Show Replace</source>\n        <translation>Режим замены</translation>\n    </message>\n</context>\n<context>\n    <name>FolderListView</name>\n    <message>\n        <source>Delete File</source>\n        <translation>Удаление файла</translation>\n    </message>\n    <message>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Удалить этот файл навсегда?</translation>\n    </message>\n    <message>\n        <source>Failed to delete the file!</source>\n        <translation>Не удалось удалить файл!</translation>\n    </message>\n    <message>\n        <source>Delete Folder</source>\n        <translation>Удаление папки</translation>\n    </message>\n    <message>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Удалить эту папку со всем содержимым?</translation>\n    </message>\n    <message>\n        <source>Failed to delete the folder!</source>\n        <translation>Не удалось удалить папку!</translation>\n    </message>\n</context>\n<context>\n    <name>FolderRecent</name>\n    <message>\n        <source>Folders</source>\n        <translation>Каталоги</translation>\n    </message>\n</context>\n<context>\n    <name>FolderView</name>\n    <message>\n        <source>Delete File</source>\n        <translation>Удаление файла</translation>\n    </message>\n    <message>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Удалить этот файл навсегда?</translation>\n    </message>\n    <message>\n        <source>Failed to delete the file!</source>\n        <translation>Не удалось удалить файл!</translation>\n    </message>\n    <message>\n        <source>Delete Folder</source>\n        <translation>Удаление папки</translation>\n    </message>\n    <message>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Удалить эту папку со всем содержимым?</translation>\n    </message>\n    <message>\n        <source>Failed to delete the folder!</source>\n        <translation>Не удалось удалить папку!</translation>\n    </message>\n</context>\n<context>\n    <name>GdbDebuggerOption</name>\n    <message>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <source>Enable --tty for program being debugged.</source>\n        <translation>Включить --tty для отлаживаемой программы.</translation>\n    </message>\n</context>\n<context>\n    <name>GoAddTagsDialog</name>\n    <message>\n        <source>Add Tags To Struct Field</source>\n        <translation>Добавлять теги в поля структуры</translation>\n    </message>\n    <message>\n        <source>Add JSON Tag</source>\n        <translation>Добавлять тег JSON</translation>\n    </message>\n    <message>\n        <source>Options</source>\n        <translation>Параметры</translation>\n    </message>\n    <message>\n        <source>Add XML Tag</source>\n        <translation>Добавлять тег XML</translation>\n    </message>\n    <message>\n        <source>Add Custom Tags</source>\n        <translation>Добавлять другие теги</translation>\n    </message>\n    <message>\n        <source>Tag Name</source>\n        <translation>Имя тега</translation>\n    </message>\n    <message>\n        <source>Setup custom tag name</source>\n        <translation>Название особого тега</translation>\n    </message>\n    <message>\n        <source>Sort sorts the tags in increasing order according to the key name</source>\n        <translation>Сортировать теги в порядке возрастания имени ключа</translation>\n    </message>\n    <message>\n        <source>Override current tags when adding tags</source>\n        <translation>Перезаписывать текущие теги при добавлении</translation>\n    </message>\n    <message>\n        <source>Info</source>\n        <translation>Информация</translation>\n    </message>\n    <message>\n        <source>Multiple options separated by commas</source>\n        <translation>Несколько параметров, разделённых запятыми</translation>\n    </message>\n</context>\n<context>\n    <name>GoRemoveTagsDialog</name>\n    <message>\n        <source>Remove Tags From Struct Field</source>\n        <translation>Удаление тегов из поля структуры</translation>\n    </message>\n    <message>\n        <source>Remove Tags And Options</source>\n        <translation>Удалить теги и параметры</translation>\n    </message>\n    <message>\n        <source>Clear All Tags</source>\n        <translation>Очистить все теги</translation>\n    </message>\n    <message>\n        <source>Remove JSON Tag</source>\n        <translation>Удалить тег JSON</translation>\n    </message>\n    <message>\n        <source>Remove XML Tag</source>\n        <translation>Удалить тег XML</translation>\n    </message>\n    <message>\n        <source>Remove Custom Tag</source>\n        <translation>Удалить другой тег</translation>\n    </message>\n    <message>\n        <source>Remove JSON Options</source>\n        <translation>Удалить параметры JSON</translation>\n    </message>\n    <message>\n        <source>Remove XML Options</source>\n        <translation>Удалить параметры XML</translation>\n    </message>\n    <message>\n        <source>Remove Custom Tag Options</source>\n        <translation>Удалить другие параметры</translation>\n    </message>\n    <message>\n        <source>tag=option</source>\n        <translation>тег=параметр</translation>\n    </message>\n    <message>\n        <source>Info</source>\n        <translation>Информация</translation>\n    </message>\n    <message>\n        <source>Setup remove custom tag and option, example tag=opt1,tag=opt2</source>\n        <translation>Настройка удаления других тегов и параметров, например: тег=парам1,тег=парам2</translation>\n    </message>\n    <message>\n        <source>Multiple tags separated by commas</source>\n        <translation>Несколько тегов через запятую</translation>\n    </message>\n    <message>\n        <source>Multiple options separated by commas</source>\n        <translation>Несколько параметров через запятую</translation>\n    </message>\n    <message>\n        <source>Clear All Tags Options</source>\n        <translation>Удалить параметры всех тегов</translation>\n    </message>\n</context>\n<context>\n    <name>GolangAst</name>\n    <message>\n        <source>No outline available</source>\n        <translation>Схема недоступна</translation>\n    </message>\n    <message>\n        <source>Synchronize with editor</source>\n        <translation>Синхронизировать с редактором</translation>\n    </message>\n    <message>\n        <source>Go Class View</source>\n        <translation>Обзор классов Go</translation>\n    </message>\n    <message>\n        <source>Go Outline</source>\n        <translation>Схема Go</translation>\n    </message>\n</context>\n<context>\n    <name>GolangAstOption</name>\n    <message>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <source>QuickOpenSymbol</source>\n        <translation>QuickOpenSymbol</translation>\n    </message>\n    <message>\n        <source>Show import path</source>\n        <translation>Показывать путь импорта</translation>\n    </message>\n    <message>\n        <source>Match case sensitive</source>\n        <translation>Регистрозависимый поиск</translation>\n    </message>\n</context>\n<context>\n    <name>GolangCodeOption</name>\n    <message>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <source>Gocode</source>\n        <oldsource>Go API</oldsource>\n        <translation>Gocode</translation>\n    </message>\n    <message>\n        <source>Auto update depends package when it&apos;s source changed.</source>\n        <oldsource>Auto update depends package when its source is changed.</oldsource>\n        <translation>Обновлять зависимости при изменении их исходников.</translation>\n    </message>\n    <message>\n        <source>Close gocode when exiting</source>\n        <translation>Закрывать gocode при выходе</translation>\n    </message>\n    <message>\n        <source>PKG automitic import prompt</source>\n        <translation>PKG: автоматический запрос импорта</translation>\n    </message>\n    <message>\n        <source>PKG automatic import hints for all packages (GOPATH)</source>\n        <translation>PKG: подсказки автоматического импорта для всех пакетов (GOPATH)</translation>\n    </message>\n    <message>\n        <source>PKG automatic import hints for standard package</source>\n        <translation>PKG: подсказки автоматического импорта для стандартных пакетов</translation>\n    </message>\n</context>\n<context>\n    <name>GolangDoc</name>\n    <message>\n        <source>Godoc Search</source>\n        <translation>Поиск в Godoc</translation>\n    </message>\n    <message>\n        <source>Find Package:</source>\n        <translation>Найти пакет:</translation>\n    </message>\n    <message>\n        <source>Go Doc Search</source>\n        <translation>Поиск по Go Doc</translation>\n    </message>\n    <message>\n        <source>Go Api Index</source>\n        <translation>Индекс Go Api</translation>\n    </message>\n</context>\n<context>\n    <name>GolangDocOption</name>\n    <message>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <source>Go API</source>\n        <translation>Go API</translation>\n    </message>\n    <message>\n        <source>Use default context (fast)</source>\n        <translation>Использовать умолчальный контекст (быстро)</translation>\n    </message>\n    <message>\n        <source>Only load standard API documentation</source>\n        <oldsource>Only load standard api</oldsource>\n        <translation>Загружать только документацию по стандартному API</translation>\n    </message>\n</context>\n<context>\n    <name>GolangEdit</name>\n    <message>\n        <source>View import package use godoc</source>\n        <translation>Обзор импортируемого пакета с помощью godoc</translation>\n    </message>\n    <message>\n        <source>View Expression Information</source>\n        <translation>Информация о выражении</translation>\n    </message>\n    <message>\n        <source>Jump to Declaration</source>\n        <translation>Перейти к объявлению</translation>\n    </message>\n    <message>\n        <source>Find Usages</source>\n        <translation>Найти использование</translation>\n    </message>\n    <message>\n        <source>Rename Symbol Under Cursor</source>\n        <translation>Переименовать символ под курсором</translation>\n    </message>\n    <message>\n        <source>Callees</source>\n        <translation>Вызываемые</translation>\n    </message>\n    <message>\n        <source>Callers</source>\n        <translation>Вызывающие</translation>\n    </message>\n    <message>\n        <source>Callstack</source>\n        <translation>Стек вызовов</translation>\n    </message>\n    <message>\n        <source>Definition</source>\n        <translation>Определение</translation>\n    </message>\n    <message>\n        <source>Describe</source>\n        <translation>Описание</translation>\n    </message>\n    <message>\n        <source>Freevars</source>\n        <translation type=\"unfinished\">Свободные переменные</translation>\n    </message>\n    <message>\n        <source>Implements</source>\n        <translation>Реализации</translation>\n    </message>\n    <message>\n        <source>Peers</source>\n        <translation>Участники</translation>\n    </message>\n    <message>\n        <source>Referrers</source>\n        <translation>Ссылающиеся</translation>\n    </message>\n    <message>\n        <source>Pointsto</source>\n        <translation type=\"unfinished\">Указывающие</translation>\n    </message>\n    <message>\n        <source>Whicherrs</source>\n        <translation type=\"unfinished\">Определения ошибок</translation>\n    </message>\n    <message>\n        <source>Refactor</source>\n        <translation>Рефакторинг</translation>\n    </message>\n    <message>\n        <source>Go Source Query</source>\n        <translation>Go SourceQuery</translation>\n    </message>\n    <message>\n        <source>SourceQuery What</source>\n        <translation>SourceQuery: Что это</translation>\n    </message>\n    <message>\n        <source>SourceQuery</source>\n        <translation>SourceQuery</translation>\n    </message>\n    <message>\n        <source>Stop</source>\n        <translation>Остановить</translation>\n    </message>\n    <message>\n        <source>Implements(GOPATH)</source>\n        <translation>Реализации (GOPATH)</translation>\n    </message>\n    <message>\n        <source>Add Tags To Struct Field</source>\n        <translation>Добавить теги в поля структуры</translation>\n    </message>\n    <message>\n        <source>Remove Tags From Struct Field</source>\n        <translation>Удалить теги из полей структуры</translation>\n    </message>\n    <message>\n        <source>Below files in package %1</source>\n        <translation>Ниже приведены файлы пакета %1</translation>\n    </message>\n    <message>\n        <source>%1 (Module/GOPATH) with GOROOT</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangEditOption</name>\n    <message>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <source>Mouse</source>\n        <translation>Мышь</translation>\n    </message>\n    <message>\n        <source>Enable view expression infomation on mouse</source>\n        <translation>Показывать информацию о выражении под курсором</translation>\n    </message>\n    <message>\n        <source>Enable mouse navigation</source>\n        <translation>Навигация мышью</translation>\n    </message>\n    <message>\n        <source>Go root source file editor setup read only</source>\n        <translation type=\"unfinished\">Открывать файлы из Go root в режиме только для чтения</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFileSearch</name>\n    <message>\n        <source>Golang Find Usages</source>\n        <translation>Использование поиска Golang</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFmtOption</name>\n    <message>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <source>Format Options</source>\n        <oldsource>Golang Format</oldsource>\n        <translation>Параметры форматирования</translation>\n    </message>\n    <message>\n        <source>Goimports updates your Go import lines, adding missing ones and removing unreferenced ones.</source>\n        <translation>Goimports обновляет импорты Go, добавляя пропущенные и удаляя ненужные.</translation>\n    </message>\n    <message>\n        <source>Enable update imports line, adding missing ones and removing unreferenced ones.</source>\n        <translation>Обновлять строки импорта, добавляя необходимые и удаляя ненужные</translation>\n    </message>\n    <message>\n        <source>Synchronous</source>\n        <translation>Синхронное форматирование</translation>\n    </message>\n    <message>\n        <source>Synchronous code formatting</source>\n        <oldsource> Synchronous code formatting</oldsource>\n        <translation>Синхронное форматирование кода</translation>\n    </message>\n    <message>\n        <source>Synchronous code formatting timeout in milliseconds (500ms or more):</source>\n        <translation>Таймаут синхронного форматирования кода (500 мс или более):</translation>\n    </message>\n    <message>\n        <source>Automatically format code when saving</source>\n        <oldsource>When the editor is saved automatically gofmt</oldsource>\n        <translation>Автоматически форматировать код при сохранении</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFmtPlugin</name>\n    <message>\n        <source>Format Code</source>\n        <oldsource>Format Code (goimports)</oldsource>\n        <translation>Отформатировать код</translation>\n    </message>\n    <message>\n        <source>Format Code (Adjusts Imports)</source>\n        <translation>Отформатировать код с настройкой импортов</translation>\n    </message>\n</context>\n<context>\n    <name>GolangPackageOption</name>\n    <message>\n        <source>Choose directory to add to GOPATH:</source>\n        <translation type=\"unfinished\">Выбор каталога для добавления в GOPATH</translation>\n    </message>\n    <message>\n        <source>Manage GOPATH / Modules</source>\n        <translation type=\"unfinished\">Управление GOPATH/Modules</translation>\n    </message>\n    <message>\n        <source>Go Modules</source>\n        <translation type=\"unfinished\">Модули Go</translation>\n    </message>\n    <message>\n        <source>Custom GONOPROXY</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Custom GOPROXY</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Custom GO111MODULE</source>\n        <translation type=\"unfinished\">Особый GO111MODULE</translation>\n    </message>\n    <message>\n        <source>Custom GONOSUMDB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Custom GOPRIVATE</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>TextLabel</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>GOPATH</source>\n        <translation type=\"unfinished\">GOPATH</translation>\n    </message>\n    <message>\n        <source>Use System GOPATH</source>\n        <translation type=\"unfinished\">Использовать системый GOPATH</translation>\n    </message>\n    <message>\n        <source>Reload</source>\n        <translation type=\"unfinished\">Обновить</translation>\n    </message>\n    <message>\n        <source>Use Custom GOPATH (one per line)</source>\n        <translation type=\"unfinished\">Особый GOPATH (по-одному в строку)</translation>\n    </message>\n    <message>\n        <source>Add Directory...</source>\n        <translation type=\"unfinished\">Добавить...</translation>\n    </message>\n    <message>\n        <source>Clear</source>\n        <translation type=\"unfinished\">Очистить</translation>\n    </message>\n</context>\n<context>\n    <name>GolangPresentEdit</name>\n    <message>\n        <source>Section (s1)</source>\n        <translation>Секция (s1)</translation>\n    </message>\n    <message>\n        <source>Subsection (s2)</source>\n        <translation>Подсекция (s2)</translation>\n    </message>\n    <message>\n        <source>Sub-subsection (s3)</source>\n        <translation>Под-подсекция (s2)</translation>\n    </message>\n    <message>\n        <source>Bold</source>\n        <translation>Полужирный</translation>\n    </message>\n    <message>\n        <source>Italic</source>\n        <translation>Курсив</translation>\n    </message>\n    <message>\n        <source>Inline Code</source>\n        <translation>Исходный код</translation>\n    </message>\n    <message>\n        <source>Switch Bullets</source>\n        <translation>Список</translation>\n    </message>\n    <message>\n        <source>Comment/Uncomment Selection</source>\n        <translation>Комментировать/раскомментировать</translation>\n    </message>\n    <message>\n        <source>Export HTML</source>\n        <translation>Экспорт HTML</translation>\n    </message>\n    <message>\n        <source>Verify Present</source>\n        <translation>Проверить презентацию</translation>\n    </message>\n    <message>\n        <source>Present verify success</source>\n        <translation>Проверка презентации прошла успешно</translation>\n    </message>\n    <message>\n        <source>Present verify false</source>\n        <translation>Проверка презентации прошла неудачно</translation>\n    </message>\n    <message>\n        <source>Export PDF</source>\n        <translation>Экспортировать в PDF</translation>\n    </message>\n</context>\n<context>\n    <name>GolangSymbol</name>\n    <message>\n        <source>Quick Open Symbol by Name</source>\n        <translation>Быстрое открытие символа по имени</translation>\n    </message>\n</context>\n<context>\n    <name>GoplayBrowser</name>\n    <message>\n        <source>Go Playground</source>\n        <translation>Песочница Go</translation>\n    </message>\n    <message>\n        <source>Run</source>\n        <translation>Выполнить</translation>\n    </message>\n    <message>\n        <source>Stop</source>\n        <translation>Остановить</translation>\n    </message>\n    <message>\n        <source>New</source>\n        <translation>Создать...</translation>\n    </message>\n    <message>\n        <source>Load...</source>\n        <translation>Загрузить...</translation>\n    </message>\n    <message>\n        <source>Save...</source>\n        <translation>Сохранить...</translation>\n    </message>\n    <message>\n        <source>Explore Folder</source>\n        <translation>Открыть папку в проводнике</translation>\n    </message>\n    <message>\n        <source>Running...</source>\n        <oldsource>Running...\n\n</oldsource>\n        <translation>Выполнение...</translation>\n    </message>\n    <message>\n        <source>Error: %1.</source>\n        <oldsource>\nError: %1.</oldsource>\n        <translation>Ошибка: %1.</translation>\n    </message>\n    <message>\n        <source>Success: %2.</source>\n        <oldsource>\nSuccess: %2.</oldsource>\n        <translation>Успешно: %2.</translation>\n    </message>\n    <message>\n        <source>Load File</source>\n        <translation>Загрузка файла</translation>\n    </message>\n    <message>\n        <source>Select a file to load:</source>\n        <translation>Выберите файл:</translation>\n    </message>\n    <message>\n        <source>Save File</source>\n        <translation>Сохранение файла</translation>\n    </message>\n    <message>\n        <source>New File Name:</source>\n        <translation>Имя файла:</translation>\n    </message>\n</context>\n<context>\n    <name>HtmlPreview</name>\n    <message>\n        <source>Page Style</source>\n        <translation>Стиль страницы</translation>\n    </message>\n    <message>\n        <source>Reload</source>\n        <translation>Обновить</translation>\n    </message>\n    <message>\n        <source>Export Html</source>\n        <translation>Экспорт в HTML</translation>\n    </message>\n    <message>\n        <source>Export PDF</source>\n        <translation>Экспортировать в PDF</translation>\n    </message>\n    <message>\n        <source>Print Preview</source>\n        <translation>Предпросмотр печати</translation>\n    </message>\n    <message>\n        <source>Synchronize preview and code scrollbars</source>\n        <translation>Синхронизировать положение кода и предпросмотра</translation>\n    </message>\n    <message>\n        <source>Config</source>\n        <translation>Конфигурация</translation>\n    </message>\n    <message>\n        <source>Plain HTML</source>\n        <translation>Чистый HTML</translation>\n    </message>\n    <message>\n        <source>Export Failed</source>\n        <translation>Ошибка экспорта</translation>\n    </message>\n    <message>\n        <source>Automatically display preview</source>\n        <oldsource>Automatically Display Preview</oldsource>\n        <translation>Автоматически показывать предпросмотр</translation>\n    </message>\n    <message>\n        <source>HTML Preview</source>\n        <oldsource>Html Preview</oldsource>\n        <translation>Просмотр HTML</translation>\n    </message>\n    <message>\n        <source>Could not open %1 for writing!</source>\n        <oldsource>Can not write file %1</oldsource>\n        <translation>Невозможно открыть %1 для записи!</translation>\n    </message>\n</context>\n<context>\n    <name>ImageEditor</name>\n    <message>\n        <source>ZoomIn</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>ZoomOut</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Reset to original size</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Fit to view</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Play movie</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Prev frame</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Next frame</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Pause movie</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>ImageEditorFactory</name>\n    <message>\n        <source>Image Viewer</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>ImportPkgTip</name>\n    <message>\n        <source>warning, pkg not find, please enter to import :</source>\n        <translation>предупреждение: пакет не найден, нажмите enter для импорта: </translation>\n    </message>\n</context>\n<context>\n    <name>JsonEdit</name>\n    <message>\n        <source>Verify</source>\n        <translation>Проверить</translation>\n    </message>\n    <message>\n        <source>Format Json</source>\n        <translation>Отформатировать JSON</translation>\n    </message>\n    <message>\n        <source>Compact Json</source>\n        <translation>Сжать JSON</translation>\n    </message>\n</context>\n<context>\n    <name>LiteApp</name>\n    <message>\n        <source>Event Log</source>\n        <translation>Журнал событий</translation>\n    </message>\n    <message>\n        <source>Escape</source>\n        <translation>Выйти</translation>\n    </message>\n    <message>\n        <source>Close File</source>\n        <translation>Закрыть файл</translation>\n    </message>\n    <message>\n        <source>Close All Files</source>\n        <translation>Закрыть все файлы</translation>\n    </message>\n    <message>\n        <source>Save File</source>\n        <translation>Сохранить файл</translation>\n    </message>\n    <message>\n        <source>Save File As...</source>\n        <translation>Сохранить файл как...</translation>\n    </message>\n    <message>\n        <source>Save All Files</source>\n        <translation>Сохранить все файлы</translation>\n    </message>\n    <message>\n        <source>Open Project</source>\n        <translation>Открыть проект...</translation>\n    </message>\n    <message>\n        <source>Options</source>\n        <translation>Параметры</translation>\n    </message>\n    <message>\n        <source>New...</source>\n        <translation>Создать...</translation>\n    </message>\n    <message>\n        <source>Open File...</source>\n        <translation>Открыть файл...</translation>\n    </message>\n    <message>\n        <source>Open Folder...</source>\n        <translation>Открыть папку...</translation>\n    </message>\n    <message>\n        <source>Open Folder in New Window...</source>\n        <translation>Открыть папку в новом окне...</translation>\n    </message>\n    <message>\n        <source>Close All Folders</source>\n        <oldsource>Add Folder...</oldsource>\n        <translation>Закрыть все папки</translation>\n    </message>\n    <message>\n        <source>New Window</source>\n        <translation>Новое окно</translation>\n    </message>\n    <message>\n        <source>Close Window</source>\n        <translation>Закрыть окно</translation>\n    </message>\n    <message>\n        <source>Save Project</source>\n        <translation>Сохранить проект</translation>\n    </message>\n    <message>\n        <source>Close Project</source>\n        <translation>Закрыть проект</translation>\n    </message>\n    <message>\n        <source>Exit</source>\n        <translation>Выход</translation>\n    </message>\n    <message>\n        <source>Full Screen</source>\n        <translation>Полный экран</translation>\n    </message>\n    <message>\n        <source>About LiteIDE</source>\n        <translation>О программе LiteIDE</translation>\n    </message>\n    <message>\n        <source>About Plugins</source>\n        <translation>О расширениях</translation>\n    </message>\n</context>\n<context>\n    <name>LiteAppOption</name>\n    <message>\n        <source>Form</source>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <source>Store [*]</source>\n        <oldsource>Store</oldsource>\n        <translation>Хранилище [*]</translation>\n    </message>\n    <message>\n        <source>Language:</source>\n        <translation>Язык:</translation>\n    </message>\n    <message>\n        <source>Recent Files</source>\n        <oldsource>Recent File</oldsource>\n        <translation>Недавние файлы</translation>\n    </message>\n    <message>\n        <source>Max Count:</source>\n        <oldsource>Max Recent:</oldsource>\n        <translation>Не более:</translation>\n    </message>\n    <message>\n        <source>Monitoring files for modifications</source>\n        <translation>Внешнее изменение файлов</translation>\n    </message>\n    <message>\n        <source>Store settings to local ini file</source>\n        <translation>Хранить настройки в локальном файле .ini</translation>\n    </message>\n    <message>\n        <source>Interface [*]</source>\n        <translation>Интерфейс [*]</translation>\n    </message>\n    <message>\n        <source>Style:</source>\n        <translation>Стиль:</translation>\n    </message>\n    <message>\n        <source>Theme [*]</source>\n        <translation>Тема [*]</translation>\n    </message>\n    <message>\n        <source>Auto reload or close editor buffer,if underlying file is modified/deleted.</source>\n        <oldsource>Auto reload editor buffer from disk file,if underlying file is modified/deleted.</oldsource>\n        <translation>Автоматически перезагружать или закрывать окно редактирования,\nесли файл был изменён или удалён</translation>\n    </message>\n    <message>\n        <source>Session</source>\n        <translation>Сессия</translation>\n    </message>\n    <message>\n        <source>Display</source>\n        <translation>Вид</translation>\n    </message>\n    <message>\n        <source>Display [*]</source>\n        <translation>Вид [*]</translation>\n    </message>\n    <message>\n        <source>Show splash screen on startup</source>\n        <translation>Показывать заставку при старте</translation>\n    </message>\n    <message>\n        <source>Show welcome page on startup</source>\n        <translation>Открывать страницу «Добро пожаловать» при запуске</translation>\n    </message>\n    <message>\n        <source>Editor tab [*]</source>\n        <translation>Вкладка редактора [*]</translation>\n    </message>\n    <message>\n        <source>Show close buttons on each editor tab</source>\n        <translation>Показывать кнопку закрытия на каждой вкладке редактора</translation>\n    </message>\n    <message>\n        <source>Enable mouse wheel navigation on tabs</source>\n        <oldsource>Enable mouse wheel selected on tab</oldsource>\n        <translation>Разрешить переход по вкладкам колесом мыши</translation>\n    </message>\n    <message>\n        <source>Toolbar Icon Size [*]</source>\n        <translation>Размер значка панели инструментов [*]</translation>\n    </message>\n    <message>\n        <source>Keyboard</source>\n        <translation>Клавиатура</translation>\n    </message>\n    <message>\n        <source>Format: {Ctrl+B},{Ctrl+Shift+B},{Ctrl+K,Ctrl+U},{Ctrl+Shift+Z;Ctrl+Y}</source>\n        <translation>Формат: {Ctrl+B},{Ctrl+Shift+B},{Ctrl+K,Ctrl+U},{Ctrl+Shift+Z;Ctrl+Y}</translation>\n    </message>\n    <message>\n        <source>Hide standard commands</source>\n        <translation>Скрыть стандартные команды</translation>\n    </message>\n    <message>\n        <source>Reset</source>\n        <translation>Сбросить</translation>\n    </message>\n    <message>\n        <source>Reset All</source>\n        <translation>Сбросить всё</translation>\n    </message>\n    <message>\n        <source>Import...</source>\n        <translation>Импорт...</translation>\n    </message>\n    <message>\n        <source>Export...</source>\n        <translation>Экспорт...</translation>\n    </message>\n    <message>\n        <source>Generic</source>\n        <translation>Общее</translation>\n    </message>\n    <message>\n        <source>Theme:</source>\n        <translation>Тема:</translation>\n    </message>\n    <message>\n        <source>Reload session on startup</source>\n        <oldsource>Auto load last session</oldsource>\n        <translation>Загружать последнюю сессию при старте</translation>\n    </message>\n    <message>\n        <source>SideBarStyle</source>\n        <translation type=\"unfinished\">SideBarStyle</translation>\n    </message>\n    <message>\n        <source>SplitterStyle</source>\n        <translation type=\"unfinished\">SplitterStyle</translation>\n    </message>\n    <message>\n        <source>Command</source>\n        <translation>Команда</translation>\n    </message>\n    <message>\n        <source>Label</source>\n        <translation>Название</translation>\n    </message>\n    <message>\n        <source>Shortcuts</source>\n        <translation>Комбинация клавиш</translation>\n    </message>\n    <message>\n        <source>Standard</source>\n        <translation>Стандартная</translation>\n    </message>\n    <message>\n        <source>Import Keyboard Mapping Scheme</source>\n        <translation>Импорт схемы комбинаций клавиш</translation>\n    </message>\n    <message>\n        <source>Keyboard Mapping Scheme (%1)</source>\n        <translation>Файл схемы комбинаций клавиш (%1)</translation>\n    </message>\n    <message>\n        <source>Could not read scheme from %1!</source>\n        <translation>Не удалось прочитать схему комбинаций клавиш из %1!</translation>\n    </message>\n    <message>\n        <source>Export Keyboard Mapping Scheme</source>\n        <translation>Экспорт схемы комбинаций клавиш</translation>\n    </message>\n    <message>\n        <source>Could not write scheme to %1!</source>\n        <translation>Не удалось записать схему комбинаций клавиш в %1!</translation>\n    </message>\n    <message>\n        <source>NativeText</source>\n        <translation>Обычный текст</translation>\n    </message>\n    <message>\n        <source>Automatically save documents</source>\n        <translation>Автоматически сохранять документы</translation>\n    </message>\n    <message>\n        <source>Automatically save documents when application is idle</source>\n        <translation>Автоматически сохранять документы при простое</translation>\n    </message>\n    <message>\n        <source>sec</source>\n        <translation> с</translation>\n    </message>\n    <message>\n        <source>Reload files in session</source>\n        <translation>Перезагружать файлы сессии</translation>\n    </message>\n    <message>\n        <source>Fallback build-in icon library and liteapp/qrc/default</source>\n        <translation>В резерве встроенные значки и liteapp/qrc/default</translation>\n    </message>\n    <message>\n        <source>Icon [*]</source>\n        <translation>Значок [*]</translation>\n    </message>\n    <message>\n        <source>Load the external file icon library</source>\n        <translation>Загрузить внешний файл значков</translation>\n    </message>\n    <message>\n        <source>Use tool window shortcuts</source>\n        <translation type=\"unfinished\">Клавиатурные сокращения для иструментальных окон</translation>\n    </message>\n    <message>\n        <source>0-99</source>\n        <translation>0-99</translation>\n    </message>\n    <message>\n        <source>Editor Tabs</source>\n        <translation>Вкладок редактора</translation>\n    </message>\n    <message>\n        <source>10-999</source>\n        <translation>10-999</translation>\n    </message>\n    <message>\n        <source>Editor</source>\n        <translation>Редактор</translation>\n    </message>\n    <message>\n        <source>Editor navigate</source>\n        <translation>Навигация</translation>\n    </message>\n    <message>\n        <source>Enable mouse extra &apos;Back&apos; button and &apos;Forward&apos; button for go back and forward</source>\n        <translation>Использовать дополнительные кнопки мыши «Назад» и «Вперёд» для перехода</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuild</name>\n    <message>\n        <source>Build Toolbar</source>\n        <translation>Панель сборки</translation>\n    </message>\n    <message>\n        <source>Build Configuration...</source>\n        <oldsource>Build Config</oldsource>\n        <translation>Конфигурация сборки...</translation>\n    </message>\n    <message>\n        <source>Stop Action</source>\n        <translation>Прервать</translation>\n    </message>\n    <message>\n        <source>Clear Output</source>\n        <oldsource>Clear All</oldsource>\n        <translation>Очистить вывод</translation>\n    </message>\n    <message>\n        <source>Execute File</source>\n        <translation>Запустить файл</translation>\n    </message>\n    <message>\n        <source>Lock Build Path</source>\n        <translation>Зафиксировать путь сборки</translation>\n    </message>\n    <message>\n        <source>Line Wrap</source>\n        <translation>Переносить строки</translation>\n    </message>\n    <message>\n        <source>Auto Clear</source>\n        <translation>Автоочистка</translation>\n    </message>\n    <message>\n        <source>Setup</source>\n        <translation>Настроить</translation>\n    </message>\n    <message>\n        <source>Build Output</source>\n        <oldsource>Build</oldsource>\n        <translation>Вывод сборки</translation>\n    </message>\n    <message>\n        <source>Current environment change id &quot;%1&quot;</source>\n        <translation>ID изменения текущей среды: «%1»</translation>\n    </message>\n    <message>\n        <source>Lock Build</source>\n        <oldsource>Lock Build: %1</oldsource>\n        <translation>Зафиксировать сборку</translation>\n    </message>\n    <message>\n        <source>Error: %1.</source>\n        <oldsource>Error: %1.\n</oldsource>\n        <translation>Ошибка: %1.</translation>\n    </message>\n    <message>\n        <source>Command exited with code %1.</source>\n        <translation>Команда завершилась с кодом %1.</translation>\n    </message>\n    <message>\n        <source>Success: %1.</source>\n        <oldsource>Success: %1.\n</oldsource>\n        <translation>Успех: %1.</translation>\n    </message>\n    <message>\n        <source>A process is currently running.  Stop the current action first.</source>\n        <oldsource>A process is currently running.  Stop the current action first.\n</oldsource>\n        <translation>Процесс уже выполняется. Необходимо сначала остановить текущую операцию.</translation>\n    </message>\n    <message>\n        <source>Killing current process...</source>\n        <oldsource>Killing current process...\n</oldsource>\n        <translation>Остановка текущего процесса...</translation>\n    </message>\n    <message>\n        <source>Failed to terminate the existing process!</source>\n        <oldsource>Failed to terminate the existing process!\n</oldsource>\n        <translation>Не удалось завершить существующий процесс!</translation>\n    </message>\n    <message>\n        <source>Started process successfully</source>\n        <oldsource>Started process successfully\n</oldsource>\n        <translation>Процесс запущен успешно</translation>\n    </message>\n    <message>\n        <source>Failed to start process</source>\n        <translation>Не удалось запустить процесс</translation>\n    </message>\n    <message>\n        <source>Automatic positioning cursor</source>\n        <translation>Автоматическое позиционирование курсора</translation>\n    </message>\n    <message>\n        <source>Build Path Configuration</source>\n        <translation>Конфигурация пути сборки</translation>\n    </message>\n    <message>\n        <source>Debug File</source>\n        <translation>Отладить файл</translation>\n    </message>\n    <message>\n        <source>Use godoc View</source>\n        <translation>Открыть Godoc</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuildOption</name>\n    <message>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <source>Recheck Go installation when changing environments</source>\n        <oldsource>Recheck go env if enviroment changed</oldsource>\n        <translation>Проверить установку Go после смены среды</translation>\n    </message>\n    <message>\n        <source>Build command configuration files [*]</source>\n        <oldsource>Build command configuration files:</oldsource>\n        <translation>Конфигурационные файлы команды сборки [*]</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuildPlugin</name>\n    <message>\n        <source>Close</source>\n        <translation>Закрыть</translation>\n    </message>\n    <message>\n        <source>Execute:</source>\n        <oldsource>Exec:</oldsource>\n        <translation>Выполнить:</translation>\n    </message>\n    <message>\n        <source>Execute File</source>\n        <oldsource>Execute</oldsource>\n        <translation>Запустить файл</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebug</name>\n    <message>\n        <source>Stop</source>\n        <translation>Остановить</translation>\n    </message>\n    <message>\n        <source>Clear</source>\n        <translation>Очистить</translation>\n    </message>\n    <message>\n        <source>Continue</source>\n        <translation>Продолжить</translation>\n    </message>\n    <message>\n        <source>Show Current Line</source>\n        <translation>Показать текущую строку</translation>\n    </message>\n    <message>\n        <source>Debug Output</source>\n        <oldsource>Debug</oldsource>\n        <translation>Отладка</translation>\n    </message>\n    <message>\n        <source>Start Debugging External Application...</source>\n        <oldsource>Start Debugging External Application</oldsource>\n        <translation>Отладка внешнего приложения...</translation>\n    </message>\n    <message>\n        <source>Close</source>\n        <translation>Закрыть</translation>\n    </message>\n    <message>\n        <source>Start Debugging</source>\n        <translation>Запустить отладку</translation>\n    </message>\n    <message>\n        <source>Step Into</source>\n        <translation>Войти</translation>\n    </message>\n    <message>\n        <source>Step Over</source>\n        <translation>Обойти</translation>\n    </message>\n    <message>\n        <source>Step Out</source>\n        <translation>Выйти</translation>\n    </message>\n    <message>\n        <source>Run to Line</source>\n        <translation>Выполнить до позиции курсора</translation>\n    </message>\n    <message>\n        <source>Insert/Remove Breakpoint</source>\n        <translation>Вставить/удалить точку останова</translation>\n    </message>\n    <message>\n        <source>Remove All Breakpoints</source>\n        <translation>Удалить все точки останова</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebugOption</name>\n    <message>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <source>Debug</source>\n        <translation>Отладка</translation>\n    </message>\n    <message>\n        <source>Automatically insert breakpoint main.main when debugging</source>\n        <translation>Автоматически останавливаться при отладке на main.main</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebugPlugin</name>\n    <message>\n        <source>Debug Window</source>\n        <oldsource>Debug</oldsource>\n        <translation>Окно отладки</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDoc</name>\n    <message>\n        <source>LiteIDE Documentation</source>\n        <oldsource>LiteIDE Document Browser</oldsource>\n        <translation>Документация LiteIDE</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditor</name>\n    <message>\n        <source>Undo</source>\n        <translation>Отменить</translation>\n    </message>\n    <message>\n        <source>Redo</source>\n        <translation>Повторить</translation>\n    </message>\n    <message>\n        <source>Cut</source>\n        <translation>Вырезать</translation>\n    </message>\n    <message>\n        <source>Copy</source>\n        <translation>Копировать</translation>\n    </message>\n    <message>\n        <source>Paste</source>\n        <translation>Вставить</translation>\n    </message>\n    <message>\n        <source>Select All</source>\n        <translation>Выбрать всё</translation>\n    </message>\n    <message>\n        <source>Toggle Comment</source>\n        <translation>Закомментировать/раскомментировать</translation>\n    </message>\n    <message>\n        <source>Toggle Block Commnet</source>\n        <translation>Установить/снять блочный комментарий</translation>\n    </message>\n    <message>\n        <source>Auto-indent Selection</source>\n        <translation>Расставить отступы в выделенном</translation>\n    </message>\n    <message>\n        <source>Tab To Spaces (MimeType)</source>\n        <translation>Табуляция в пробелы (MimeType)</translation>\n    </message>\n    <message>\n        <source>Line End Windows (\\r\\n)</source>\n        <translation>Конец строк в стиле Windows (\\r\\n)</translation>\n    </message>\n    <message>\n        <source>Line End Unix (\\n)</source>\n        <translation>Конец строк в стиле Unix (\\n)</translation>\n    </message>\n    <message>\n        <source>Visualize Whitespace (Global)</source>\n        <translation>Отображать пробелы (глобально)</translation>\n    </message>\n    <message>\n        <source>Move Line Up</source>\n        <translation>Сдвинуть строку вверх</translation>\n    </message>\n    <message>\n        <source>Move Line Down</source>\n        <translation>Сдвинуть строку вниз</translation>\n    </message>\n    <message>\n        <source>Copy Line Up</source>\n        <translation>Скопировать строку наверх</translation>\n    </message>\n    <message>\n        <source>Copy Line Down</source>\n        <translation>Скопировать строку вниз</translation>\n    </message>\n    <message>\n        <source>Join Lines</source>\n        <translation>Объединить строки</translation>\n    </message>\n    <message>\n        <source>Advanced</source>\n        <translation>Дополнительно</translation>\n    </message>\n    <message>\n        <source>Code Folding</source>\n        <translation>Сворачивание кода</translation>\n    </message>\n    <message>\n        <source>Export HTML</source>\n        <translation>Экспорт в HTML</translation>\n    </message>\n    <message>\n        <source>Export Failed</source>\n        <translation>Ошибка экспорта</translation>\n    </message>\n    <message>\n        <source>Could not open %1 for writing.</source>\n        <translation>Не удалось открыть %1 для записи.</translation>\n    </message>\n    <message>\n        <source>Export PDF</source>\n        <translation>Экспорт в PDF</translation>\n    </message>\n    <message>\n        <source>Print Document</source>\n        <translation>Печать документа</translation>\n    </message>\n    <message>\n        <source>Print Preview...</source>\n        <oldsource>Print Preview Document</oldsource>\n        <translation>Предпросмотр печати...</translation>\n    </message>\n    <message>\n        <source>Export HTML...</source>\n        <translation>Экспорт в HTML...</translation>\n    </message>\n    <message>\n        <source>Export PDF...</source>\n        <translation>Экспорт в PDF...</translation>\n    </message>\n    <message>\n        <source>Print...</source>\n        <translation>Печать...</translation>\n    </message>\n    <message>\n        <source>Select Block</source>\n        <translation>Выбрать блок</translation>\n    </message>\n    <message>\n        <source>Fold</source>\n        <translation>Свернуть</translation>\n    </message>\n    <message>\n        <source>Unfold</source>\n        <translation>Развернуть</translation>\n    </message>\n    <message>\n        <source>Fold All</source>\n        <translation>Свернуть всё</translation>\n    </message>\n    <message>\n        <source>Unfold All</source>\n        <translation>Развернуть всё</translation>\n    </message>\n    <message>\n        <source>Go To Line</source>\n        <oldsource>Goto Line</oldsource>\n        <translation>Перейти к строке</translation>\n    </message>\n    <message>\n        <source>Duplicate</source>\n        <translation>Дублировать</translation>\n    </message>\n    <message>\n        <source>Delete Line</source>\n        <translation>Удалить строку</translation>\n    </message>\n    <message>\n        <source>Copy Line</source>\n        <translation>Копировать строку</translation>\n    </message>\n    <message>\n        <source>Cut Line</source>\n        <translation>Вырезать строку</translation>\n    </message>\n    <message>\n        <source>Insert Line Before</source>\n        <translation>Вставить строку перед</translation>\n    </message>\n    <message>\n        <source>Insert Line After</source>\n        <translation>Вставить строку после</translation>\n    </message>\n    <message>\n        <source>Increase Font Size</source>\n        <translation>Увеличить шрифт</translation>\n    </message>\n    <message>\n        <source>Decrease Font Size</source>\n        <translation>Уменьшить шрифт</translation>\n    </message>\n    <message>\n        <source>Reset Font Size</source>\n        <translation>Стандартный размер шрифта</translation>\n    </message>\n    <message>\n        <source>Clean Whitespace</source>\n        <translation>Очистить пробелы</translation>\n    </message>\n    <message>\n        <source>Code Complete</source>\n        <translation>Дополнить код</translation>\n    </message>\n    <message>\n        <source>Reload File</source>\n        <translation>Перезагрузить файл</translation>\n    </message>\n    <message>\n        <source>Do you want to permanently discard unsaved modifications and reload %1?</source>\n        <translation>Перезагрузить %1 с утратой несохранённых изменений?</translation>\n    </message>\n    <message>\n        <source>ReadOnly</source>\n        <translation>Только для чтения</translation>\n    </message>\n    <message>\n        <source>Line: </source>\n        <translation>Строка:</translation>\n    </message>\n    <message>\n        <source>Go to Previous Block</source>\n        <translation>К предыдущему блоку</translation>\n    </message>\n    <message>\n        <source>Go to Next Block</source>\n        <translation>К следующему блоку</translation>\n    </message>\n    <message>\n        <source>Go to Matching Brace</source>\n        <translation>К соответствующей скобке</translation>\n    </message>\n    <message>\n        <source>Go to Line Start</source>\n        <translation>К началу строки</translation>\n    </message>\n    <message>\n        <source>Go to Line End</source>\n        <translation>К концу строки</translation>\n    </message>\n    <message>\n        <source>Go to Previous Line</source>\n        <translation>К предыдущей строке</translation>\n    </message>\n    <message>\n        <source>Go to Next Line</source>\n        <translation>К следующей строке</translation>\n    </message>\n    <message>\n        <source>Go to Previous Character</source>\n        <translation>К предыдущему символу</translation>\n    </message>\n    <message>\n        <source>Go to Next Charater</source>\n        <translation>К следующему символу</translation>\n    </message>\n    <message>\n        <source>Go to Previous Word</source>\n        <translation>К предыдущему слову</translation>\n    </message>\n    <message>\n        <source>Go to Next Word</source>\n        <translation>К следующему слову</translation>\n    </message>\n    <message>\n        <source>Go to Line</source>\n        <translation>Перейти к строке</translation>\n    </message>\n    <message>\n        <source>Goto</source>\n        <translation>Перейти</translation>\n    </message>\n    <message>\n        <source>Go to Doc Start</source>\n        <translation>К началу документации</translation>\n    </message>\n    <message>\n        <source>Go to Doc End</source>\n        <translation>К концу документации</translation>\n    </message>\n    <message>\n        <source>Title Case</source>\n        <translation>Регистр заголовка</translation>\n    </message>\n    <message>\n        <source>Upper Case</source>\n        <translation>Верхний регистр</translation>\n    </message>\n    <message>\n        <source>Lower Case</source>\n        <translation>Нижний регистр</translation>\n    </message>\n    <message>\n        <source>Swap Case</source>\n        <translation>Инвертировать регистр</translation>\n    </message>\n    <message>\n        <source>Convert Case</source>\n        <translation>Изменение регистра</translation>\n    </message>\n    <message>\n        <source>File is readonly</source>\n        <translation>Файл только для чтения</translation>\n    </message>\n    <message>\n        <source>File is writable</source>\n        <translation>В файл можно писать</translation>\n    </message>\n    <message>\n        <source>Settings</source>\n        <translation>Настройки</translation>\n    </message>\n    <message>\n        <source>Tab To Spaces</source>\n        <translation>Табуляции в пробелы</translation>\n    </message>\n    <message>\n        <source>Spaces To Tab</source>\n        <translation>Пробелы в табуляции</translation>\n    </message>\n    <message>\n        <source>Convert Tab</source>\n        <translation>Изменение табуляций</translation>\n    </message>\n    <message>\n        <source>Line Wrap (MimeType)</source>\n        <translation>Перенос строк (MimeType)</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorFileFactory</name>\n    <message>\n        <source>Text Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorOption</name>\n    <message>\n        <source>Form</source>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <source>Load File</source>\n        <translation>Загрузка файла</translation>\n    </message>\n    <message>\n        <source>Check and convert no printable char to &apos;.&apos;</source>\n        <translation>Проверять и конвертировать неотображаемые символы в «.»</translation>\n    </message>\n    <message>\n        <source>Font</source>\n        <translation>Шрифт</translation>\n    </message>\n    <message>\n        <source>Font &amp;&amp; Colors</source>\n        <translation>Шрифт и цвет</translation>\n    </message>\n    <message>\n        <source>Family:</source>\n        <translation>Семейство:</translation>\n    </message>\n    <message>\n        <source>Size:</source>\n        <translation>Размер:</translation>\n    </message>\n    <message>\n        <source>Zoom:</source>\n        <translation>Масштаб:</translation>\n    </message>\n    <message>\n        <source>%</source>\n        <translation>%</translation>\n    </message>\n    <message>\n        <source>Antialias</source>\n        <translation>Сглаживание</translation>\n    </message>\n    <message>\n        <source>Editor Color Scheme</source>\n        <oldsource>ColorStyle Scheme</oldsource>\n        <translation>Цветовая схема</translation>\n    </message>\n    <message>\n        <source>File:</source>\n        <translation>Файл:</translation>\n    </message>\n    <message>\n        <source>Edit</source>\n        <translation>Изменить</translation>\n    </message>\n    <message>\n        <source>Syntax Auto-completion</source>\n        <oldsource>Auto complete brackets</oldsource>\n        <translation>Автоматическое добавление закрывающих элементов</translation>\n    </message>\n    <message>\n        <source>Clean whitespace when saving files</source>\n        <translation>Удалять избыточные пробелы при сохранении файлов</translation>\n    </message>\n    <message>\n        <source>Enable scroll wheel zooming</source>\n        <translation>Масштабирование колесом мыши</translation>\n    </message>\n    <message>\n        <source>Display VisualizeWhitespace</source>\n        <translation>Отображать пробельные символы</translation>\n    </message>\n    <message>\n        <source>Word wrap by default</source>\n        <translation>Переносить слова</translation>\n    </message>\n    <message>\n        <source>Display code fold</source>\n        <translation>Отображать сворачивание кода</translation>\n    </message>\n    <message>\n        <source>Display offset position</source>\n        <translation>Отображать смещение</translation>\n    </message>\n    <message>\n        <source>File Types</source>\n        <translation>Типы файлов</translation>\n    </message>\n    <message>\n        <source>Behavior</source>\n        <translation>Поведение</translation>\n    </message>\n    <message>\n        <source>Display EOF</source>\n        <translation>Отображать символ конца файла (EOF)</translation>\n    </message>\n    <message>\n        <source>Display line numbers</source>\n        <translation>Отображать номера строк</translation>\n    </message>\n    <message>\n        <source>Display right margin at column</source>\n        <translation>Отображать границу по столбцу</translation>\n    </message>\n    <message>\n        <source>Automatic indentation</source>\n        <oldsource>Enable automatic indentation</oldsource>\n        <translation>Автоматически делать отступы</translation>\n    </message>\n    <message>\n        <source>Case sensitive code completion</source>\n        <oldsource>Completer case sensitive</oldsource>\n        <translation>Регистрозависимое дополнение кода</translation>\n    </message>\n    <message>\n        <source>Code completion prefix length:</source>\n        <oldsource>Word Complete Prefix Length</oldsource>\n        <translation>Длина слова для дополнения кода:</translation>\n    </message>\n    <message>\n        <source>Display</source>\n        <translation>Вид</translation>\n    </message>\n    <message>\n        <source>MIME Type</source>\n        <translation>Тип MIME</translation>\n    </message>\n    <message>\n        <source>Tab Width</source>\n        <translation>Ширина табуляции</translation>\n    </message>\n    <message>\n        <source>Tab To Spaces</source>\n        <translation>Табуляции в пробелы</translation>\n    </message>\n    <message>\n        <source>File Extensions</source>\n        <translation>Расширения файлов</translation>\n    </message>\n    <message>\n        <source>Fuzzy code completion</source>\n        <translation>Нечёткое дополнение кода</translation>\n    </message>\n    <message>\n        <source>Clean completion cache when saving files</source>\n        <translation>Очищать кэш дополнений после сохранения файлов</translation>\n    </message>\n    <message>\n        <source>Custom Extensions</source>\n        <translation>Особые расширения</translation>\n    </message>\n    <message>\n        <source>Show Monospace Font</source>\n        <translation>Показать моноширинный шрифт</translation>\n    </message>\n    <message>\n        <source>Restore Default Font</source>\n        <translation>Восстановить шрифт</translation>\n    </message>\n    <message>\n        <source>Add copied text into the clipboard as HTML</source>\n        <translation>Добавлять скопированные текст в буфер обмена в виде HTML</translation>\n    </message>\n    <message>\n        <source>Display indent guide</source>\n        <translation>Показывать направляющую отступа</translation>\n    </message>\n    <message>\n        <source>Allow vertical scrolling to the last line [*]</source>\n        <translation>Разрешить вертикальную прокрутку до последней строки [*]</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorPlugin</name>\n    <message>\n        <source>Edit ToolBar</source>\n        <translation>Панель инструментов редактора</translation>\n    </message>\n    <message>\n        <source>Edit Navigation Bar</source>\n        <translation>Панель навигации редактора</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEnvOption</name>\n    <message>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <source>Environment definition files:</source>\n        <translation>Файлы определения среды:</translation>\n    </message>\n    <message>\n        <source>Environment changes will take effect after switching environments.</source>\n        <translation>Изменения среды вступят в силу после её переключения.</translation>\n    </message>\n</context>\n<context>\n    <name>LiteFindPlugin</name>\n    <message>\n        <source>Find</source>\n        <translation>Найти</translation>\n    </message>\n    <message>\n        <source>Find Next</source>\n        <translation>Найти следующее</translation>\n    </message>\n    <message>\n        <source>Find Previous</source>\n        <translation>Найти предыдущее</translation>\n    </message>\n    <message>\n        <source>Replace</source>\n        <translation>Заменить</translation>\n    </message>\n    <message>\n        <source>File Search</source>\n        <translation>Поиск файлов</translation>\n    </message>\n</context>\n<context>\n    <name>LiteTabWidget</name>\n    <message>\n        <source>Open a new tab</source>\n        <translation>Открыть в новой вкладке</translation>\n    </message>\n    <message>\n        <source>List All Tabs</source>\n        <translation>Показать все вкладки</translation>\n    </message>\n    <message>\n        <source>Close Tab</source>\n        <translation>Закрыть вкладку</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownBatchBrowser</name>\n    <message>\n        <source>Markdown Exporter</source>\n        <oldsource>Markdown Batch</oldsource>\n        <translation>Экспорт в Markdown</translation>\n    </message>\n    <message>\n        <source>All Files (*)</source>\n        <translation>Все файлы (*)</translation>\n    </message>\n    <message>\n        <source>Select the folder containing your markdown files:</source>\n        <oldsource>Select Markdown Folder</oldsource>\n        <translation>Выбор папки, содержащей файлы Markdown</translation>\n    </message>\n    <message>\n        <source>Select Markdown Files</source>\n        <translation>Выбор файлов Markdown</translation>\n    </message>\n    <message>\n        <source>Select the folder to contain separated markdown exports:</source>\n        <translation>Выбор папки для раздельных файлов Markdown</translation>\n    </message>\n    <message>\n        <source>Export Merged HTML</source>\n        <oldsource>Export Html</oldsource>\n        <translation>Экспорт объединённого в HTML</translation>\n    </message>\n    <message>\n        <source>Export Merged PDF</source>\n        <oldsource>Export PDF</oldsource>\n        <translation>Экспорт объединённого в PDF</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownBatchWidget</name>\n    <message>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <source>Markdown Source Files</source>\n        <oldsource>Markdown Files</oldsource>\n        <translation>Исходники Markdown</translation>\n    </message>\n    <message>\n        <source>Import Folder...</source>\n        <oldsource>Import Folder</oldsource>\n        <translation>Импортировать папку...</translation>\n    </message>\n    <message>\n        <source>Add Files...</source>\n        <oldsource>Add Files</oldsource>\n        <translation>Добавить файлы...</translation>\n    </message>\n    <message>\n        <source>Move Up</source>\n        <translation>Переместить вверх</translation>\n    </message>\n    <message>\n        <source>Move Down</source>\n        <translation>Переместить вниз</translation>\n    </message>\n    <message>\n        <source>Remove</source>\n        <translation>Удалить</translation>\n    </message>\n    <message>\n        <source>Remove All</source>\n        <translation>Удалить все</translation>\n    </message>\n    <message>\n        <source>Options</source>\n        <translation>Параметры</translation>\n    </message>\n    <message>\n        <source>Export Folder:</source>\n        <translation>Папка экспорта:</translation>\n    </message>\n    <message>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>Открыть...</translation>\n    </message>\n    <message>\n        <source>Use CSS</source>\n        <translation>Использовать CSS</translation>\n    </message>\n    <message>\n        <source>Insert horizontal line between merged files</source>\n        <oldsource>Merge files insert split &lt;hr&gt;</oldsource>\n        <translation>Вставлять горизонтальную строку\nмежду объединяемыми файлами</translation>\n    </message>\n    <message>\n        <source>Insert page break between merged files</source>\n        <oldsource>Merge files insert page break</oldsource>\n        <translation>Вставлять разрыв страницы между\nобъединяемыми файлами</translation>\n    </message>\n    <message>\n        <source>Export</source>\n        <oldsource>Export Util</oldsource>\n        <translation>Экспорт</translation>\n    </message>\n    <message>\n        <source>Export Separated HTML</source>\n        <oldsource>Separate Html</oldsource>\n        <translation>Отдельные\nHTML</translation>\n    </message>\n    <message>\n        <source>Export Separated PDF</source>\n        <oldsource>Separate PDF</oldsource>\n        <translation>Отдельные\nPDF</translation>\n    </message>\n    <message>\n        <source>Export Merged HTML...</source>\n        <oldsource>Merge Html</oldsource>\n        <translation>Объединённые\nHTML...</translation>\n    </message>\n    <message>\n        <source>Export Merged PDF...</source>\n        <oldsource>Merge PDF</oldsource>\n        <translation>Объединённые\nPDF...</translation>\n    </message>\n    <message>\n        <source>Print Preview Merged...</source>\n        <oldsource>Merge Print Preview</oldsource>\n        <translation>Предпросмотр печати\nобъединённого...</translation>\n    </message>\n    <message>\n        <source>Print Merged</source>\n        <oldsource>Merge Print</oldsource>\n        <translation>Печать\nобъединённого</translation>\n    </message>\n    <message>\n        <source>Log</source>\n        <translation>Журнал</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownEdit</name>\n    <message>\n        <source>Header (h1)</source>\n        <oldsource>Header &lt;h1&gt;</oldsource>\n        <translation>Заголовок (h1)</translation>\n    </message>\n    <message>\n        <source>Header (h2)</source>\n        <oldsource>Header &lt;h2&gt;</oldsource>\n        <translation>Заголовок (h2)</translation>\n    </message>\n    <message>\n        <source>Header (h3)</source>\n        <oldsource>Header &lt;h3&gt;</oldsource>\n        <translation>Заголовок (h3)</translation>\n    </message>\n    <message>\n        <source>Header (h4)</source>\n        <oldsource>Header &lt;h4&gt;</oldsource>\n        <translation>Заголовок (h4)</translation>\n    </message>\n    <message>\n        <source>Header (h5)</source>\n        <oldsource>Header &lt;h5&gt;</oldsource>\n        <translation>Заголовок (h5)</translation>\n    </message>\n    <message>\n        <source>Header (h6)</source>\n        <oldsource>Header &lt;h6&gt;</oldsource>\n        <translation>Заголовок (h6)</translation>\n    </message>\n    <message>\n        <source>Bold</source>\n        <translation>Полужирный</translation>\n    </message>\n    <message>\n        <source>Italic</source>\n        <translation>Курсив</translation>\n    </message>\n    <message>\n        <source>Inline Code</source>\n        <translation>Исходный код</translation>\n    </message>\n    <message>\n        <source>Link</source>\n        <translation>Ссылка</translation>\n    </message>\n    <message>\n        <source>Image</source>\n        <translation>Изображение</translation>\n    </message>\n    <message>\n        <source>Unordered List</source>\n        <translation>Неупорядоченный список</translation>\n    </message>\n    <message>\n        <source>Ordered List</source>\n        <translation>Упорядоченный список</translation>\n    </message>\n    <message>\n        <source>Blockquote</source>\n        <translation>Цитата</translation>\n    </message>\n    <message>\n        <source>Horizontal Rule</source>\n        <translation>Горизонтальная строка</translation>\n    </message>\n    <message>\n        <source>Heading</source>\n        <translation>Шапка</translation>\n    </message>\n</context>\n<context>\n    <name>MultiFolderView</name>\n    <message>\n        <source>Delete Folder</source>\n        <translation>Удалить каталог</translation>\n    </message>\n    <message>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Удалить безвозвратно этот каталог со всем содержимым?</translation>\n    </message>\n    <message>\n        <source>Failed to delete the folder!</source>\n        <translation>Не удалось удалить каталог!</translation>\n    </message>\n    <message>\n        <source>Delete File</source>\n        <translation>Удаление файла</translation>\n    </message>\n    <message>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Удалить безвозвратно этот файл?</translation>\n    </message>\n    <message>\n        <source>Failed to delete the file!</source>\n        <translation>Не удалось удалить файл!</translation>\n    </message>\n</context>\n<context>\n    <name>NavigateBar</name>\n    <message>\n        <source>Browser Files in %1</source>\n        <translation type=\"unfinished\">Обзор файлов в %1</translation>\n    </message>\n</context>\n<context>\n    <name>NewFileDialog</name>\n    <message>\n        <source>New Project or File</source>\n        <translation>Новый проект или файл</translation>\n    </message>\n    <message>\n        <source>Browse...</source>\n        <translation>...</translation>\n    </message>\n    <message>\n        <source>GOPATH:</source>\n        <translation>GOPATH:</translation>\n    </message>\n    <message>\n        <source>Template:</source>\n        <oldsource>Template</oldsource>\n        <translation>Шаблон:</translation>\n    </message>\n    <message>\n        <source>Type</source>\n        <translation>Тип</translation>\n    </message>\n    <message>\n        <source>Information</source>\n        <translation>Информация</translation>\n    </message>\n    <message>\n        <source>Name:</source>\n        <translation>Название:</translation>\n    </message>\n    <message>\n        <source>Location:</source>\n        <translation>Расположение:</translation>\n    </message>\n    <message>\n        <source>Error</source>\n        <translation>Ошибка</translation>\n    </message>\n    <message>\n        <source>Could not create the target directory: %1</source>\n        <translation>Не удалось создать каталог назначения: %1</translation>\n    </message>\n    <message>\n        <source>Warning</source>\n        <translation>Предупреждение</translation>\n    </message>\n    <message>\n        <source>Location %1 is not empty.\nUse the target directory anyway?</source>\n        <translation>Каталог %1 не пуст.\nИспользовать этот каталог назначения?</translation>\n    </message>\n    <message>\n        <source>Overwrite File</source>\n        <translation>Перезапись файла</translation>\n    </message>\n    <message>\n        <source>%1 already exists.\nDo you want to replace it?</source>\n        <translation>%1 уже существует.\nПерезаписать его?</translation>\n    </message>\n    <message>\n        <source>No files could be created.</source>\n        <translation>Не удалось создать файлы.</translation>\n    </message>\n    <message>\n        <source>File template details:</source>\n        <translation>Детали шаблона файла:</translation>\n    </message>\n    <message>\n        <source>Project template details:</source>\n        <oldsource>New project wizard:</oldsource>\n        <translation>Детали шаблона проекта:</translation>\n    </message>\n    <message>\n        <source>Choose a directory for the new content:</source>\n        <translation>Выбор каталога для новых данных</translation>\n    </message>\n</context>\n<context>\n    <name>OpenEditorsWidget</name>\n    <message>\n        <source>Open Documents</source>\n        <translation>Открытые документы</translation>\n    </message>\n</context>\n<context>\n    <name>OptionsBrowser</name>\n    <message>\n        <source>Options</source>\n        <oldsource>Options Page</oldsource>\n        <translation>Параметры</translation>\n    </message>\n</context>\n<context>\n    <name>OptionsWidget</name>\n    <message>\n        <source>Options</source>\n        <translation>Параметры</translation>\n    </message>\n    <message>\n        <source>Info</source>\n        <translation>Информация</translation>\n    </message>\n    <message>\n        <source>[*] item request restart of LiteIDE</source>\n        <translation>[*] элемент требует перезапуска LiteIDE</translation>\n    </message>\n</context>\n<context>\n    <name>OutputDockWidget</name>\n    <message>\n        <source>Move To</source>\n        <translation>Переместить в</translation>\n    </message>\n    <message>\n        <source>LeftSideBar</source>\n        <translation>Левая боковая панель</translation>\n    </message>\n    <message>\n        <source>RightSideBar</source>\n        <translation>Правая боковая панель</translation>\n    </message>\n    <message>\n        <source>BottomDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>OutputOption</name>\n    <message>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <source>Font</source>\n        <translation>Шрифт</translation>\n    </message>\n    <message>\n        <source>Family:</source>\n        <translation>Семейство:</translation>\n    </message>\n    <message>\n        <source>Size:</source>\n        <translation>Размер:</translation>\n    </message>\n    <message>\n        <source>Zoom:</source>\n        <translation>Масштаб:</translation>\n    </message>\n    <message>\n        <source>%</source>\n        <translation>%</translation>\n    </message>\n    <message>\n        <source>Antialias</source>\n        <translation>Сглаживание</translation>\n    </message>\n    <message>\n        <source>Display</source>\n        <translation>Вид</translation>\n    </message>\n    <message>\n        <source>Use editor color scheme</source>\n        <translation>Цветовая схема редактора</translation>\n    </message>\n    <message>\n        <source>Sets the maximum number of lines</source>\n        <translation>Максимальное число строк</translation>\n    </message>\n</context>\n<context>\n    <name>PackageBrowser</name>\n    <message>\n        <source>Reload All</source>\n        <translation>Обновить всё</translation>\n    </message>\n    <message>\n        <source>Use godoc View</source>\n        <translation>Открыть Godoc</translation>\n    </message>\n    <message>\n        <source>Load Package in New Window</source>\n        <translation>Загрузить пакет в новом окне</translation>\n    </message>\n    <message>\n        <source>Add Package to Folders</source>\n        <translation>Добавить пакет в папки</translation>\n    </message>\n    <message>\n        <source>Open Source File</source>\n        <translation>Открыть исходник</translation>\n    </message>\n    <message>\n        <source>Copy Name to Clipboard</source>\n        <oldsource>Copy Name To Clipboard</oldsource>\n        <translation>Скопировать имя в буфер обмена</translation>\n    </message>\n    <message>\n        <source>Loading Go package list...</source>\n        <oldsource>Loading go package ...</oldsource>\n        <translation>Загрузка списка пакетов Go...</translation>\n    </message>\n    <message>\n        <source>Go Package Browser</source>\n        <translation>Обозреватель пакетов Go</translation>\n    </message>\n    <message>\n        <source>Manage GOPATH/Modules ...</source>\n        <translation>Управление GOPATH/Modules ...</translation>\n    </message>\n</context>\n<context>\n    <name>PackageProject</name>\n    <message>\n        <source>Reload Package</source>\n        <translation>Перезагрузить пакет</translation>\n    </message>\n    <message>\n        <source>Open Explorer Here</source>\n        <translation>Открыть папку в проводнике</translation>\n    </message>\n    <message>\n        <source>Add Source File</source>\n        <translation>Добавить исходник</translation>\n    </message>\n    <message>\n        <source>Error</source>\n        <translation>Ошибка</translation>\n    </message>\n    <message>\n        <source>File %1 already exists.</source>\n        <translation>Файл %1 уже существует.</translation>\n    </message>\n    <message>\n        <source>Could not open %1 for writing.</source>\n        <translation>Не удалось открыть %1 для записи.</translation>\n    </message>\n    <message>\n        <source>File Name:</source>\n        <translation>Имя файла:</translation>\n    </message>\n</context>\n<context>\n    <name>PluginsDialog</name>\n    <message>\n        <source>Installed Plugins</source>\n        <oldsource>Install Plugins</oldsource>\n        <translation>Установленные расширения</translation>\n    </message>\n    <message>\n        <source>Close</source>\n        <translation>Закрыть</translation>\n    </message>\n    <message>\n        <source>Name</source>\n        <translation>Название</translation>\n    </message>\n    <message>\n        <source>Author</source>\n        <oldsource>Anchor</oldsource>\n        <translation>Автор</translation>\n    </message>\n    <message>\n        <source>Enabled</source>\n        <translation>Включён</translation>\n    </message>\n    <message>\n        <source>Details</source>\n        <translation>Подробнее</translation>\n    </message>\n    <message>\n        <source>Version</source>\n        <oldsource>Last Ver</oldsource>\n        <translation>Версия</translation>\n    </message>\n    <message>\n        <source>File Name</source>\n        <oldsource>FileName</oldsource>\n        <translation>Имя файла</translation>\n    </message>\n</context>\n<context>\n    <name>ProcessEx</name>\n    <message>\n        <source>process exited with code %1</source>\n        <translation>процесс завершился с кодом %1</translation>\n    </message>\n    <message>\n        <source>process crashed or was terminated</source>\n        <translation>процесс завершился аварийно или был завершён извне</translation>\n    </message>\n    <message>\n        <source>process exited with an unknown status</source>\n        <translation>процесс завершился с неизвестным статусом</translation>\n    </message>\n    <message>\n        <source>process failed to start</source>\n        <translation>не удалось запустить процесс</translation>\n    </message>\n    <message>\n        <source>process crashed or was terminated while running</source>\n        <translation>процесс завершился аварийно или был завершён извне</translation>\n    </message>\n    <message>\n        <source>timed out waiting for process</source>\n        <translation>истекло время ожидания процесса</translation>\n    </message>\n    <message>\n        <source>couldn&apos;t read from the process</source>\n        <translation>не удалось прочитать из процесса</translation>\n    </message>\n    <message>\n        <source>couldn&apos;t write to the process</source>\n        <translation>не удалось записать в процесс</translation>\n    </message>\n    <message>\n        <source>an unknown error occurred</source>\n        <translation>возникла неизвестная ошибка</translation>\n    </message>\n</context>\n<context>\n    <name>ProjectManager</name>\n    <message>\n        <source>Project &lt;%1&gt;</source>\n        <translation>Проект &lt;%1&gt;</translation>\n    </message>\n    <message>\n        <source>Import Directory &lt;%1&gt;</source>\n        <translation>Импорт каталога &lt;%1&gt;</translation>\n    </message>\n</context>\n<context>\n    <name>QFileSystemModel</name>\n    <message>\n        <source>%1 TB</source>\n        <translation>%1 ТБ</translation>\n    </message>\n    <message>\n        <source>%1 GB</source>\n        <translation>%1 ГБ</translation>\n    </message>\n    <message>\n        <source>%1 MB</source>\n        <translation>%1 МБ</translation>\n    </message>\n    <message>\n        <source>%1 KB</source>\n        <translation>%1 КБ</translation>\n    </message>\n    <message>\n        <source>%1 bytes</source>\n        <translation>%1 байт</translation>\n    </message>\n</context>\n<context>\n    <name>QJson::ParserRunnable</name>\n    <message>\n        <source>An error occurred while parsing json: %1</source>\n        <translation>Возникла ошибка при разборе json: %1</translation>\n    </message>\n</context>\n<context>\n    <name>QJsonParseError</name>\n    <message>\n        <source>no error occurred</source>\n        <translation>ошибок нет</translation>\n    </message>\n    <message>\n        <source>unterminated object</source>\n        <translation>незавершённый объект</translation>\n    </message>\n    <message>\n        <source>missing name separator</source>\n        <translation>отсутствует разделитель имён</translation>\n    </message>\n    <message>\n        <source>unterminated array</source>\n        <translation>незавершённый массив</translation>\n    </message>\n    <message>\n        <source>missing value separator</source>\n        <translation>отсутствует разделитель значений</translation>\n    </message>\n    <message>\n        <source>illegal value</source>\n        <translation>неверное значение</translation>\n    </message>\n    <message>\n        <source>invalid termination by number</source>\n        <translation>неверное завершение числом</translation>\n    </message>\n    <message>\n        <source>illegal number</source>\n        <translation>неверное число</translation>\n    </message>\n    <message>\n        <source>invalid escape sequence</source>\n        <translation>неверная ESC-последовательность</translation>\n    </message>\n    <message>\n        <source>invalid UTF8 string</source>\n        <translation>неверная строка UTF8</translation>\n    </message>\n    <message>\n        <source>unterminated string</source>\n        <translation>незавершённая строка</translation>\n    </message>\n    <message>\n        <source>object is missing after a comma</source>\n        <translation>после запятой отсутствует объект</translation>\n    </message>\n    <message>\n        <source>too deeply nested document</source>\n        <translation>слишком много вложений</translation>\n    </message>\n    <message>\n        <source>too large document</source>\n        <translation>слишком большой документ</translation>\n    </message>\n    <message>\n        <source>garbage at the end of the document</source>\n        <translation>мусор в конце документа</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenAction</name>\n    <message>\n        <source>Show and Run Commands</source>\n        <translation>Показ и выполнение команд</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenEditor</name>\n    <message>\n        <source>Show All Opened Editors</source>\n        <translation>Отобразить все открытые редакторы</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFileSystem</name>\n    <message>\n        <source>File System</source>\n        <translation>Файловая система</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFiles</name>\n    <message>\n        <source>Go to File</source>\n        <translation>Перейти к файлу</translation>\n    </message>\n    <message>\n        <source>Type &apos;?&apos; to get help on the actions you can take from here</source>\n        <translation>Введите «?» для получения справки по возможным действиям</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFolder</name>\n    <message>\n        <source>Browser Folder</source>\n        <translation>Открыть каталог</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenHelp</name>\n    <message>\n        <source>Show All Quick Open Actions</source>\n        <translation>Показать все действия Quick Open</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenLines</name>\n    <message>\n        <source>Go to Line</source>\n        <translation>Перейти к строке</translation>\n    </message>\n    <message>\n        <source>Open a text file first to go to a line</source>\n        <translation>Перед переходом к строке необходимо открыть текстовый файл</translation>\n    </message>\n    <message>\n        <source>Type a line number between %1 and %2 to navigate to</source>\n        <translation>Введите номер желаемой строки от %1 до %2</translation>\n    </message>\n    <message>\n        <source>Go to Line %1</source>\n        <translation>Переход к строке %1</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenManager</name>\n    <message>\n        <source>Quick Open Editor</source>\n        <translation>Quick Open редактор</translation>\n    </message>\n    <message>\n        <source>Quick Open Symbol</source>\n        <translation>Quick Open символ</translation>\n    </message>\n    <message>\n        <source>Quick Open Command</source>\n        <translation>Quick Open команда</translation>\n    </message>\n    <message>\n        <source>Quick Open File</source>\n        <translation>Quick Open файл</translation>\n    </message>\n    <message>\n        <source>Show All Quick Open Actions</source>\n        <translation>Показать все действия Quick Open</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenMimeType</name>\n    <message>\n        <source>not found symbol</source>\n        <translation>символ не найден</translation>\n    </message>\n    <message>\n        <source>Go to Symbol in File</source>\n        <translation>Перейти к символу в файле</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenOption</name>\n    <message>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <source>QuickOpenFiles</source>\n        <translation>Quick Open файлы</translation>\n    </message>\n    <message>\n        <source>Match case sensitive</source>\n        <translation>Регистрозависимый поиск</translation>\n    </message>\n    <message>\n        <source>Max files count:</source>\n        <translation>Файлов не более:</translation>\n    </message>\n    <message>\n        <source>QuickOpenEditor</source>\n        <translation>Quick Open редактор</translation>\n    </message>\n</context>\n<context>\n    <name>RecentManager</name>\n    <message>\n        <source>Clear All History</source>\n        <translation>Очистить всю историю</translation>\n    </message>\n    <message>\n        <source>Clear Menu</source>\n        <translation>Очистить меню</translation>\n    </message>\n</context>\n<context>\n    <name>SearchEdit</name>\n    <message>\n        <source>Search</source>\n        <translation>Найти</translation>\n    </message>\n    <message>\n        <source>Stop Search</source>\n        <translation>Остановить поиск</translation>\n    </message>\n</context>\n<context>\n    <name>SelectExternalDialog</name>\n    <message>\n        <source>Debug External Application</source>\n        <translation>Отладка внешнего приложения</translation>\n    </message>\n    <message>\n        <source>Application:</source>\n        <translation>Приложение:</translation>\n    </message>\n    <message>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>...</translation>\n    </message>\n    <message>\n        <source>Arguments:</source>\n        <translation>Аргументы:</translation>\n    </message>\n    <message>\n        <source>Working directory:</source>\n        <translation>Рабочий каталог:</translation>\n    </message>\n    <message>\n        <source>Select Executable</source>\n        <translation>Выбор программы</translation>\n    </message>\n    <message>\n        <source>Select the working directory:</source>\n        <oldsource>Select Working Directory</oldsource>\n        <translation>Выбор рабочего каталога</translation>\n    </message>\n</context>\n<context>\n    <name>SessionRecent</name>\n    <message>\n        <source>Sessions</source>\n        <translation>Сессии</translation>\n    </message>\n</context>\n<context>\n    <name>SideDockWidget</name>\n    <message>\n        <source>SideBar</source>\n        <translation>Боковая панель</translation>\n    </message>\n    <message>\n        <source>Show SideBar</source>\n        <translation>Показать боковую панель</translation>\n    </message>\n    <message>\n        <source>Move To</source>\n        <translation>Переместить в</translation>\n    </message>\n    <message>\n        <source>RightSideBar</source>\n        <translation>Правая боковая панель</translation>\n    </message>\n    <message>\n        <source>LeftSideBar</source>\n        <translation>Левая боковая панель</translation>\n    </message>\n    <message>\n        <source>OutputBar</source>\n        <translation>Панель вывода</translation>\n    </message>\n    <message>\n        <source>LeftDockWidgt</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>RightDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SideWindowStyle</name>\n    <message>\n        <source>Hide SideBar</source>\n        <translation>Скрыть боковую панель</translation>\n    </message>\n    <message>\n        <source>SideBar Windows</source>\n        <translation>Окна боковой панели</translation>\n    </message>\n    <message>\n        <source>Output Windows</source>\n        <translation>Окна вывода</translation>\n    </message>\n</context>\n<context>\n    <name>SplitDockWidget</name>\n    <message>\n        <source>Move To</source>\n        <translation>Переместить в</translation>\n    </message>\n    <message>\n        <source>Top</source>\n        <translation>Наверх</translation>\n    </message>\n    <message>\n        <source>Top (Split)</source>\n        <translation type=\"unfinished\">Наверх (разделить)</translation>\n    </message>\n    <message>\n        <source>Bottom</source>\n        <translation>Вниз</translation>\n    </message>\n    <message>\n        <source>Bottom (Split)</source>\n        <translation type=\"unfinished\">Вниз (разделить)</translation>\n    </message>\n    <message>\n        <source>Left</source>\n        <translation>Влево</translation>\n    </message>\n    <message>\n        <source>Left (Split)</source>\n        <translation type=\"unfinished\">Влево (разделить)</translation>\n    </message>\n    <message>\n        <source>Right</source>\n        <translation>Вправо</translation>\n    </message>\n    <message>\n        <source>Right (Split)</source>\n        <translation type=\"unfinished\">Вправо (разделить)</translation>\n    </message>\n    <message>\n        <source>Unsplit</source>\n        <translation>Объединить</translation>\n    </message>\n    <message>\n        <source>Split</source>\n        <translation>Разделить</translation>\n    </message>\n    <message>\n        <source>TopDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>TopDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>BottomDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>BottomDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>LeftDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>LeftDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>RightDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>RightDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SplitWindowStyle</name>\n    <message>\n        <source>Hide Sidebars</source>\n        <translation>Скрыть боковые панели</translation>\n    </message>\n    <message>\n        <source>Tool Windows</source>\n        <translation>Панели инструментов</translation>\n    </message>\n</context>\n<context>\n    <name>Terminal</name>\n    <message>\n        <source>Open a new terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Close current terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Current terminal load environment from LiteIDE</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Filter</source>\n        <translation type=\"unfinished\">Фильтр</translation>\n    </message>\n    <message>\n        <source>Dark Mode</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Login Mode (shell --login)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Terminal</source>\n        <translation type=\"unfinished\">Командная строка</translation>\n    </message>\n    <message>\n        <source>Rename Tab Title</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>New</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Close</source>\n        <translation type=\"unfinished\">Закрыть</translation>\n    </message>\n    <message>\n        <source>LoadEnv</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>CloseAll</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <source>Close all terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>TerminalEdit</name>\n    <message>\n        <source>Cut</source>\n        <translation>Вырезать</translation>\n    </message>\n    <message>\n        <source>Copy</source>\n        <translation>Копировать</translation>\n    </message>\n    <message>\n        <source>Paste</source>\n        <translation>Вставить</translation>\n    </message>\n    <message>\n        <source>Select All</source>\n        <translation>Выбрать всё</translation>\n    </message>\n    <message>\n        <source>Clear All</source>\n        <translation>Очистить всё</translation>\n    </message>\n</context>\n<context>\n    <name>TextEditor::Internal::ColorScheme</name>\n    <message>\n        <source>Not a color scheme file.</source>\n        <translation>Файл не является цветовой схемой.</translation>\n    </message>\n</context>\n<context>\n    <name>Utils::FilterLineEdit</name>\n    <message>\n        <source>Filter</source>\n        <translation>Фильтр</translation>\n    </message>\n    <message>\n        <source>Clear text</source>\n        <translation>Очистиьт текст</translation>\n    </message>\n</context>\n<context>\n    <name>VTermWidget</name>\n    <message>\n        <source>Copy</source>\n        <translation type=\"unfinished\">Копировать</translation>\n    </message>\n    <message>\n        <source>Paste</source>\n        <translation type=\"unfinished\">Вставить</translation>\n    </message>\n    <message>\n        <source>Select All</source>\n        <translation type=\"unfinished\">Выбрать всё</translation>\n    </message>\n</context>\n<context>\n    <name>WebKitBrowser</name>\n    <message>\n        <source>Navigation</source>\n        <translation>Навигация</translation>\n    </message>\n    <message>\n        <source>Open Html File</source>\n        <oldsource>Open Html</oldsource>\n        <translation>Открыть файл HTML</translation>\n    </message>\n    <message>\n        <source>WebKitBrowser</source>\n        <translation>WebKitBrowser</translation>\n    </message>\n    <message>\n        <source>False load %1 !</source>\n        <translatorcomment>какое-то служебное сообщение</translatorcomment>\n        <translation>Ложная загрузка %1!</translation>\n    </message>\n    <message>\n        <source>Open Html or Markdown File</source>\n        <oldsource>Open Html or Markdown Files</oldsource>\n        <translation>Открыть файл HTML или Markdown</translation>\n    </message>\n</context>\n<context>\n    <name>WebKitHtmlWidgetPlugin</name>\n    <message>\n        <source>Open Html or Markdown File</source>\n        <oldsource>Open Html or Markdown Files</oldsource>\n        <translation>Открыть файл HTML или Markdown</translation>\n    </message>\n</context>\n<context>\n    <name>WelcomeBrowser</name>\n    <message>\n        <source>New</source>\n        <translation>Создать</translation>\n    </message>\n    <message>\n        <source>Open</source>\n        <translation>Открыть</translation>\n    </message>\n    <message>\n        <source>Open Folder</source>\n        <translation>Открыть папку</translation>\n    </message>\n    <message>\n        <source>Options</source>\n        <translation>Параметры</translation>\n    </message>\n    <message>\n        <source>Welcome</source>\n        <oldsource>Welcome Page</oldsource>\n        <translation>Добро пожаловать</translation>\n    </message>\n</context>\n<context>\n    <name>WelcomePlugin</name>\n    <message>\n        <source>Welcome</source>\n        <oldsource>Home</oldsource>\n        <translation>В начало</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "liteidex/liteide_tr.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.1\" language=\"tr_TR\">\n<context>\n    <name>AboutDialog</name>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"20\"/>\n        <source>About LiteIDE</source>\n        <oldsource>About Liteide</oldsource>\n        <translation>LiteIDE Hakkında</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"156\"/>\n        <source>Information</source>\n        <oldsource>Infomation</oldsource>\n        <translation>Bilgi</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"162\"/>\n        <source>Welcome:</source>\n        <translation>Hoşgeldiniz:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"168\"/>\n        <source>Welcome to LiteIDE X! LiteIDE is a simple, open source, cross-platform IDE.</source>\n        <oldsource>Welcome to LiteIDE X!\nLiteIDE is a simple, open source, cross-platform IDE.</oldsource>\n        <translation>LiteIDE X&apos;e hoşgeldiniz!\nLiteIDE sade, açık kaynaklı ve platform bağımsız bir geliştirme ortamıdır.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"178\"/>\n        <source>Project:</source>\n        <translation>Proje:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"208\"/>\n        <source>Name:</source>\n        <translation>Adı:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"191\"/>\n        <source>Author:</source>\n        <translation>Geliştirici:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"222\"/>\n        <source>Version:</source>\n        <translation>Versiyon:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"242\"/>\n        <source>Build:</source>\n        <translation>Derleme:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"215\"/>\n        <source>Based on Qt</source>\n        <oldsource>Based on Qt Version</oldsource>\n        <translation>Temel Qt sürümü</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"249\"/>\n        <source>Source Code:</source>\n        <translation>Kaynak Kod:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"263\"/>\n        <source>Support LiteIDE:</source>\n        <oldsource>Support</oldsource>\n        <translation>LiteIDE&apos;yi destekle::</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"297\"/>\n        <source>Developers</source>\n        <translation>Geliştiriciler</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"400\"/>\n        <source>Translations</source>\n        <translation>Çeviriler</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"412\"/>\n        <source>Chinese</source>\n        <translation>Çince</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"426\"/>\n        <source>Japanese</source>\n        <translation>Japonca</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"440\"/>\n        <source>Russian</source>\n        <translation>Rusça</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"454\"/>\n        <source>French</source>\n        <translation>Fransızca</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"468\"/>\n        <source>Traditional Chinese</source>\n        <translation>Geleneksel Çince</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"482\"/>\n        <source>German</source>\n        <translation>Almanca</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"513\"/>\n        <source>Ukrainian</source>\n        <translation>Ukraynaca</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"544\"/>\n        <source>Thanks to...</source>\n        <translation>Teşekkürler...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"577\"/>\n        <source>License</source>\n        <translation>Lisans</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"619\"/>\n        <source>Close</source>\n        <translation>Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.cpp\" line=\"42\"/>\n        <source>Based on Qt %1 (%2 bit)</source>\n        <translation>Qt sürüm %1 (%2 bit) tabanlıdır</translation>\n    </message>\n</context>\n<context>\n    <name>ActionManager</name>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"65\"/>\n        <source>&amp;File</source>\n        <translation>&amp;Dosya</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"66\"/>\n        <source>&amp;Recent</source>\n        <translation>&amp;Son kullanılanlar</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"67\"/>\n        <source>&amp;Edit</source>\n        <translation>Düzen&amp;le</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"68\"/>\n        <source>F&amp;ind</source>\n        <oldsource>&amp;Find</oldsource>\n        <translation>&amp;Ara</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"69\"/>\n        <source>&amp;View</source>\n        <translation>&amp;Göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"74\"/>\n        <source>&amp;Tools</source>\n        <translation>A&amp;raçlar</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"75\"/>\n        <source>&amp;Build</source>\n        <translation>&amp;Derle</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"76\"/>\n        <source>&amp;Debug</source>\n        <translation>&amp;Hata Ayıklama</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"77\"/>\n        <source>&amp;Help</source>\n        <translation>&amp;Yardım</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"79\"/>\n        <source>Standard Toolbar</source>\n        <oldsource>Standard ToolBar</oldsource>\n        <translation>Standart Araç Çubuğu</translation>\n    </message>\n</context>\n<context>\n    <name>AstWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangast/astwidget.cpp\" line=\"76\"/>\n        <source>Go To Definition</source>\n        <translation>Tanımlamaya Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/astwidget.cpp\" line=\"77\"/>\n        <source>View Import Document</source>\n        <translation>İçeri Aktarma Görünümü</translation>\n    </message>\n</context>\n<context>\n    <name>BaseDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"77\"/>\n        <source>Hide</source>\n        <translation>Gizle</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"78\"/>\n        <source>Hide Tool Window</source>\n        <translation>Araç Penceresini Gizle</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"87\"/>\n        <source>Floating Window</source>\n        <translation>Sabit Olmayan Pencere</translation>\n    </message>\n</context>\n<context>\n    <name>BaseFolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"77\"/>\n        <source>Open In New Window</source>\n        <translation>Yeni Pencerede Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"78\"/>\n        <source>Open File</source>\n        <translation>Dosya Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"79\"/>\n        <source>New File...</source>\n        <translation>Yeni Dosya...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"80\"/>\n        <source>New File Wizard...</source>\n        <translation>Yeni Dosya Sihirbazı...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"81\"/>\n        <source>Rename File...</source>\n        <translation>Dosya Adı Değiştir...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"82\"/>\n        <source>Delete File</source>\n        <translation>Dosya Sil</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"84\"/>\n        <source>New Folder...</source>\n        <translation>Yeni Klasör...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"85\"/>\n        <source>Rename Folder...</source>\n        <translation>Klasör Adı Değiştir...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"86\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"328\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"335\"/>\n        <source>Delete Folder</source>\n        <translation>Klasör Sil</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"99\"/>\n        <source>Open Terminal Here</source>\n        <translation>Burada Terminal Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"89\"/>\n        <source>Show in Explorer</source>\n        <oldsource>Open Explorer Here</oldsource>\n        <translation>Explorer ile Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"76\"/>\n        <source>Open Application</source>\n        <translation>Uygulamayı Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"91\"/>\n        <source>Show in Finder</source>\n        <translation>Finder ile Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"93\"/>\n        <source>Show Containing Folder</source>\n        <translation>İçeren Klasörü Göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"97\"/>\n        <source>Open Command Prompt Here</source>\n        <translation>Burada Komut Satırını Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"102\"/>\n        <source>Open Folder...</source>\n        <oldsource>Add Folder...</oldsource>\n        <translation>Klasör Aç...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"103\"/>\n        <source>Reload Folder</source>\n        <translation>Klasörü Tekrar Yükle</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"104\"/>\n        <source>Close Folder</source>\n        <translation>Klasörü Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"106\"/>\n        <source>Close All Folders</source>\n        <translation>Bütük Klasörleri Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"108\"/>\n        <source>Copy</source>\n        <translation>Kopyala</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"109\"/>\n        <source>Paste</source>\n        <translation>Yapıştır</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"110\"/>\n        <source>Move To Trash</source>\n        <translation>Çöp Kutusuna Taşı</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"191\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"201\"/>\n        <source>Create File</source>\n        <translation>Dosya Oluştur</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"192\"/>\n        <source>A file with that name already exists!</source>\n        <translation>Bu İsimde Dosya Mevcut!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"202\"/>\n        <source>Failed to create the file!</source>\n        <translation>Dosya Oluşturulamadı!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"232\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"238\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"243\"/>\n        <source>Rename File</source>\n        <translation>Dosya Adını Değiştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"232\"/>\n        <source>New Name:</source>\n        <translation>Yrni İsim:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"239\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"244\"/>\n        <source>Failed to rename the file!</source>\n        <translation>İsim Değiştirilemedi!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"489\"/>\n        <source>An item &quot;%1&quot; already exists in this location. Do you want to replace it and move old item to trash?</source>\n        <translation>&quot;%1&quot; burada zaten var. Eski dosyanın üzerine yazmak istermisiniz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"490\"/>\n        <source>Stop</source>\n        <translation>Dur</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"491\"/>\n        <source>Keep Both</source>\n        <translation>İkisini de Koru</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"492\"/>\n        <source>Keep Both All</source>\n        <translation>Her İkisini de Koru</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"493\"/>\n        <source>Replace</source>\n        <translation>Üzerine Yaz</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"494\"/>\n        <source>Replace All</source>\n        <translation>Hepsinin Üzerine Yaz</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"579\"/>\n        <source>Are you sure that you want move to trash this item?</source>\n        <translation>Bu öğeyi çöp kutusuna taşımak istediğinizden emin misiniz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"582\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"585\"/>\n        <source>Are you sure that you want move to trash %1 items?</source>\n        <translation>%1 öğeyi çöp kutusuna taşımak istediğinizden emin misiniz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"588\"/>\n        <source>Move to Trash</source>\n        <translation>Çöp Kutusuna Taşı</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"632\"/>\n        <source>Open With</source>\n        <translation>Birlikte Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"639\"/>\n        <source>System Editor</source>\n        <translation>Sistem Editörü</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"283\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"286\"/>\n        <source>Create Folder</source>\n        <translation>Klasör Oluştur</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"284\"/>\n        <source>A folder with that name already exists!</source>\n        <translation>Bu isimde bir klasör zaten var!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"287\"/>\n        <source>Failed to create the folder!</source>\n        <translation>Klasör Oluşturulamadı!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"300\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"309\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"314\"/>\n        <source>Rename Folder</source>\n        <translation>Klasör Adını Değiştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"300\"/>\n        <source>Folder Name</source>\n        <translation>Klasö Adı</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"310\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"315\"/>\n        <source>Failed to rename the folder!</source>\n        <translation>Klasör Adı Değiştirilemedi!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"329\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Bu klasörü ve tüm içeriğini kalıcı olarak silmek istediğinizden emin misiniz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"336\"/>\n        <source>Failed to delete the folder!</source>\n        <translation>Klasör Silinemedi!</translation>\n    </message>\n</context>\n<context>\n    <name>BookmarkManager</name>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"61\"/>\n        <source>Toggle Bookmark</source>\n        <translation>Yer İşaretini Değiştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"96\"/>\n        <source>Goto bookmark</source>\n        <translation>Yer İşaretine Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"97\"/>\n        <source>Remove bookmark</source>\n        <translation>Yer İşaretini Sil</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"98\"/>\n        <source>Remove all bookmarks for this file</source>\n        <translation>Bu dosya için tüm yer işaretlerini kaldırın</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"99\"/>\n        <source>Remove all bookmarks for all files</source>\n        <translation>Bütün dosyalar için tüm yer işaretlerini kaldırın</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"115\"/>\n        <source>Bookmarks</source>\n        <translation>Yer imleri</translation>\n    </message>\n</context>\n<context>\n    <name>BookmarkRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"81\"/>\n        <source>Bookmarks</source>\n        <translation>Yer imleri</translation>\n    </message>\n</context>\n<context>\n    <name>BuildConfigDialog</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"14\"/>\n        <source>Build Configuration</source>\n        <oldsource>Build Config Dialog</oldsource>\n        <translation>Derleme Ayarları</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"71\"/>\n        <source>Build ID</source>\n        <translation>Derleme ID</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"45\"/>\n        <source>Build Path</source>\n        <oldsource>Build File</oldsource>\n        <translation>Derleme Yolu</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"85\"/>\n        <source>GOPATH</source>\n        <translation>GOPATH</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"103\"/>\n        <source>GOPATH information</source>\n        <translation>GOPATH bilgisi</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"147\"/>\n        <source>Use Custom GOPATH for Build Path</source>\n        <translation>Derleme Yolu için Özel GOPATH Kullanın</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"159\"/>\n        <source>Inherit System GOPATH</source>\n        <translation>Sistem&apos;de Tanımlı GOPATH</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"179\"/>\n        <source>Inherit LiteIDE GOPATH</source>\n        <translation>LiteIDE&apos;de Tanımlı GOPAT</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"201\"/>\n        <source>Custom GOPATH (one per line)</source>\n        <translation>Özel GOPATH (satır başına bir)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"221\"/>\n        <source>Add Directory...</source>\n        <translation>Klasör Ekle...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"228\"/>\n        <source>Clear</source>\n        <translation>Temizle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"244\"/>\n        <source>LiteIDE</source>\n        <translation>LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"266\"/>\n        <source>Config</source>\n        <translation>Ayarlar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"288\"/>\n        <source>Action</source>\n        <translation>Eylem</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"310\"/>\n        <source>Custom</source>\n        <oldsource>Build Custom</oldsource>\n        <translation>Özel Derleme</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"343\"/>\n        <source>Reset all to initial value</source>\n        <translation>Tümünü başlangıç değerine sıfırla</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"69\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"73\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"77\"/>\n        <source>Name</source>\n        <translation>İsim</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"70\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"74\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"78\"/>\n        <source>Value</source>\n        <translation>Değer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"79\"/>\n        <source>SharedValue</source>\n        <translation>Paylaşımlı Değer</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"82\"/>\n        <source>Id</source>\n        <translation>ID</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"83\"/>\n        <source>Cmd</source>\n        <translation>Cmd</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"293\"/>\n        <source>Choose directory to add to GOPATH:</source>\n        <translation>GOPATH&apos;a eklenecek dizini seçin:</translation>\n    </message>\n</context>\n<context>\n    <name>CreateDirDialog</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"94\"/>\n        <source>Create Folder</source>\n        <translation>Klasör Oluştur</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"96\"/>\n        <source>Directory:</source>\n        <translation>Klasör:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"98\"/>\n        <source>Dir Name:</source>\n        <translation>Klasör Adı:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"106\"/>\n        <source>Create</source>\n        <translation>Oluştur</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"107\"/>\n        <source>Cancel</source>\n        <translation>İptal</translation>\n    </message>\n</context>\n<context>\n    <name>CreateFileDialog</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"44\"/>\n        <source>Create File</source>\n        <oldsource>Create File Dialog</oldsource>\n        <translation>Dosya Oluştur</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"46\"/>\n        <source>Directory:</source>\n        <translation>Klasör:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"48\"/>\n        <source>File Name:</source>\n        <translation>Dosya Adı:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"56\"/>\n        <source>Create</source>\n        <translation>Oluştur</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"57\"/>\n        <source>Create and Edit</source>\n        <translation>Oluştur ve Düzenle</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"58\"/>\n        <source>Cancel</source>\n        <translation>İptal</translation>\n    </message>\n</context>\n<context>\n    <name>DebugWidget</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"122\"/>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"321\"/>\n        <source>Add Watch</source>\n        <translation>İzleyici Ekle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"221\"/>\n        <source>Async Record</source>\n        <oldsource>AsyncRecord</oldsource>\n        <translation>Eşzamansız Kayıt</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"222\"/>\n        <source>Variables</source>\n        <translation>Değişkenler</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"223\"/>\n        <source>Watch</source>\n        <translation>İzle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"224\"/>\n        <source>Call Stack</source>\n        <oldsource>CallStack</oldsource>\n        <translation>Yığın Çağrıları</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"225\"/>\n        <source>Threads</source>\n        <translation>İş Parçacığı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"226\"/>\n        <source>Goroutines</source>\n        <translation>Goroutines</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"227\"/>\n        <source>Registers</source>\n        <translation>Registers</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"228\"/>\n        <source>Libraries</source>\n        <oldsource>Library</oldsource>\n        <translation>Kitaplık</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"229\"/>\n        <source>Console</source>\n        <translation>Konsol</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"321\"/>\n        <source>Watch expression (e.g. buf main.var os.Stdout):</source>\n        <translation>İfadeyi izle (ör. Buf main.var os.Stdout):</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"124\"/>\n        <source>Remove Watch</source>\n        <translation>İzleyiciyi Sil</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"125\"/>\n        <source>Remove All Watches</source>\n        <translation>Bütün İzleyicileri Sil</translation>\n    </message>\n</context>\n<context>\n    <name>DlvDebuggerOption</name>\n    <message>\n        <location filename=\"src/plugins/dlvdebugger/dlvdebuggeroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n</context>\n<context>\n    <name>DocumentBrowser</name>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"68\"/>\n        <source>Back</source>\n        <oldsource>Backward</oldsource>\n        <translation>Geri</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"69\"/>\n        <source>Forward</source>\n        <translation>İleri</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"70\"/>\n        <source>Reload</source>\n        <translation>Yenile</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"76\"/>\n        <source>Increase Font Size</source>\n        <translation>Font Büyüklüğünü Arttır</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"79\"/>\n        <source>Decrease Font Size</source>\n        <translation>Font Büyüklüğünü Azalt</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"82\"/>\n        <source>Reset Font Size</source>\n        <translation>Font Büyüklüğünü Sıfırla</translation>\n    </message>\n</context>\n<context>\n    <name>DocumentBrowserFactory</name>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowserfactory.cpp\" line=\"67\"/>\n        <source>DocumentBrowser</source>\n        <translation>Belge Tarayıcı</translation>\n    </message>\n</context>\n<context>\n    <name>EditorManager</name>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"138\"/>\n        <source>Close</source>\n        <translation>Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"163\"/>\n        <source>Move to New Window</source>\n        <oldsource>Move To New Window</oldsource>\n        <translation>Yeni Pencereye Taşı</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"229\"/>\n        <source>Navigate Forward</source>\n        <oldsource>GoForward</oldsource>\n        <translation>İlerle</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"140\"/>\n        <source>Close Others</source>\n        <oldsource>Close Others Tabs</oldsource>\n        <translation>Diğerlerini Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"110\"/>\n        <source>Open Editor</source>\n        <translation>Editör Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"141\"/>\n        <source>Close All</source>\n        <oldsource>Close All Tabs</oldsource>\n        <translation>Hepsini Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"142\"/>\n        <source>Close Left Tabs</source>\n        <translation>Soldaki Tabları Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"143\"/>\n        <source>Close Right Tabs</source>\n        <translation>Sağdaki Tabları Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"144\"/>\n        <source>Close Files in Same Folder</source>\n        <oldsource>Close Same Folder Files</oldsource>\n        <translation>Aynı Klasördeki Dosyaları Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"145\"/>\n        <source>Close Files in Other Folders</source>\n        <oldsource>Close Other Folder Files</oldsource>\n        <translation>Diğer Klasörlerdeki Dosyaları Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"146\"/>\n        <source>Copy Full Path to Clipboard</source>\n        <oldsource>Copy Path to Clipboard</oldsource>\n        <translation>Tam Yolu Panoya Kopyala</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"149\"/>\n        <source>Show in Explorer</source>\n        <translation>Explorer&apos;de Göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"151\"/>\n        <source>Show in Finder</source>\n        <translation>Finder&apos;de Göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"153\"/>\n        <source>Show Containing Folder</source>\n        <translation>İçeren Klasörü Göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"157\"/>\n        <source>Open Command Prompt Here</source>\n        <translation>Komut İstemi&apos;ni Burada Açın</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"159\"/>\n        <source>Open Terminal Here</source>\n        <translation>Terminal&apos;i Burada Açın</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"220\"/>\n        <source>Navigate Backward</source>\n        <translation>Geri Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"422\"/>\n        <source>Save changes to %1?</source>\n        <translation>%1&apos;deki değişiklikler kaydedilsin mi?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"423\"/>\n        <source>Unsaved Modifications</source>\n        <oldsource>Save Modify</oldsource>\n        <translation>Kaydedilmemiş Değişiklikler</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"520\"/>\n        <source>All Files (*)</source>\n        <translation>Tüm Dosyalar (*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"522\"/>\n        <source>Save As</source>\n        <translation>Farklı Kaydet</translation>\n    </message>\n</context>\n<context>\n    <name>EnvManager</name>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"436\"/>\n        <source>Environment Toolbar</source>\n        <oldsource>Environment ToolBar</oldsource>\n        <translation>Ortam Araç Çubuğu</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"443\"/>\n        <source>Switching current environment</source>\n        <oldsource>Switch Current Environment</oldsource>\n        <translation>Mevcut ortamı değiştirme</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"446\"/>\n        <source>Edit current environment</source>\n        <oldsource>Edit Current Environment</oldsource>\n        <translation>Mevcut ortamı değiştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"447\"/>\n        <source>Reload current environment</source>\n        <oldsource>Reload Current Environment</oldsource>\n        <translation>Mevcut ortamı yeniden yükle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"451\"/>\n        <source>Select Environment</source>\n        <translation>Ortam Seç</translation>\n    </message>\n</context>\n<context>\n    <name>ExportDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"14\"/>\n        <source>Dialog</source>\n        <translation>Diyalog</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"22\"/>\n        <source>Name:</source>\n        <translation>İsim:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"49\"/>\n        <source>Export</source>\n        <translation>Dışa Aktar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"56\"/>\n        <source>ExportAndView</source>\n        <translation>Dışa Aktar ve İncele</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"194\"/>\n        <source>Use Vim-style Editing</source>\n        <translation>Vim Tarzı Editör Kullan</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"196\"/>\n        <source>Read .vimrc</source>\n        <translation>.vimrc Oku</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"198\"/>\n        <source>Path to .vimrc</source>\n        <translation>.vimrc Yolu</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal::FakeVimHandler</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"153\"/>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"161\"/>\n        <source>Unknown option: %1</source>\n        <translation>Bilinmeyen seçenek:%1</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"156\"/>\n        <source>Argument must be positive: %1=%2</source>\n        <translation>Argüman pozitif olmalıdır:%1=%2</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"949\"/>\n        <source>Mark &quot;%1&quot; not set.</source>\n        <translation>&quot;%1&quot; işareti ayarlanmadı.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3538\"/>\n        <source>%1%2%</source>\n        <translation>%1%2%</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3540\"/>\n        <source>%1All</source>\n        <translation>%1 Hespsi</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3554\"/>\n        <source>Not implemented in FakeVim.</source>\n        <translation>FakeVim&apos;de uygulanmaz.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5719\"/>\n        <source>Unknown option:</source>\n        <translation>Bilinmeyen seçenek:</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5730\"/>\n        <source>Invalid argument:</source>\n        <translation>Geçersiz argüman:</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5733\"/>\n        <source>Trailing characters:</source>\n        <translation>Sondaki karakterler:</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5816\"/>\n        <source>Move lines into themselves.</source>\n        <translation>Çizgileri kendi içlerine taşıyın.</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5860\"/>\n        <source>%n lines moved.</source>\n        <translation>\n            <numerusform>%n satır geçildi.</numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5920\"/>\n        <source>File &quot;%1&quot; exists (add ! to override)</source>\n        <translation>&quot;%1&quot; dosyası var (geçersiz kılmak için! ekleyin)</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5934\"/>\n        <source>Cannot open file &quot;%1&quot; for writing</source>\n        <translation>&quot;%1&quot; dosyası yazmak için açılamıyor</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5940\"/>\n        <source>&quot;%1&quot; %2 %3L, %4C written.</source>\n        <translation>&quot;%1&quot; %2 %3L, %4C yazıldı.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5949\"/>\n        <source>Cannot open file &quot;%1&quot; for reading</source>\n        <translation>&quot;%1&quot; dosyası okumak için açılamıyor</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5978\"/>\n        <source>&quot;%1&quot; %2L, %3C</source>\n        <translation>&quot;%1&quot; %2L, %3C</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6005\"/>\n        <source>%n lines filtered.</source>\n        <translation>\n            <numerusform>%n satır filtrelendi.</numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6093\"/>\n        <source>Cannot open file %1</source>\n        <translation>%1 dosyası açılamadı</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6259\"/>\n        <source>Invalid regular expression: %1</source>\n        <translation>Geçersiz düzenli ifade: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6295\"/>\n        <source>Pattern not found: %1</source>\n        <translation>Kalıp bulunamadı: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6299\"/>\n        <source>Search hit BOTTOM, continuing at TOP.</source>\n        <translation>Arama SON&apos;a geldi, BAŞ&apos;tan devam edecek.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6300\"/>\n        <source>Search hit TOP, continuing at BOTTOM.</source>\n        <translation>Arama, SONDAN&apos;da devam ederek BAŞA&apos;a ulaştı.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6305\"/>\n        <source>Search hit BOTTOM without match for: %1</source>\n        <translation>Eşleşmeden SONA ulaşıldı:%1</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6306\"/>\n        <source>Search hit TOP without match for: %1</source>\n        <translation>Eşleşmeden BAŞA ulaşıldı:%1</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6413\"/>\n        <source>%n lines indented.</source>\n        <translation>\n            <numerusform>%n satır girintili.</numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6470\"/>\n        <source>%n lines %1ed %2 time.</source>\n        <translation>\n            <numerusform>%n satır %1er %2 kez.</numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7043\"/>\n        <source>%n lines yanked.</source>\n        <translation>\n            <numerusform>%n çizgi çekildi.</numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7748\"/>\n        <source>Already at oldest change.</source>\n        <translation>Zaten en eski değişimde.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7749\"/>\n        <source>Already at newest change.</source>\n        <translation>Zaten son değişiklikte.</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal::FakeVimHandler::Private</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"2788\"/>\n        <source>Recursive mapping</source>\n        <translation>Yinelemeli haritalama</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"4195\"/>\n        <source>Type Alt-V, Alt-V to quit FakeVim mode.</source>\n        <translation>FakeVim modundan çıkmak için Alt-V, Alt-V yapın.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5941\"/>\n        <source> [New] </source>\n        <translation> [Yeni] </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6166\"/>\n        <source>Not an editor command: %1</source>\n        <translation>%1 düzenleyici komutu değil</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVimEdit</name>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimedit.cpp\" line=\"68\"/>\n        <source>Use FakeVim Editing</source>\n        <translation>FakeVim Düzenlemeyi Kullanın</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVimEditOption</name>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"20\"/>\n        <source>FakeVim initialization command list (# start is comment):</source>\n        <translation>FakeVim başlatma komut listesi (# başlangıç yorumdur):</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"28\"/>\n        <source>Load default init command list</source>\n        <translation>Varsayılan başlangıç komut listesini yükle</translation>\n    </message>\n</context>\n<context>\n    <name>FiFoTty</name>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"86\"/>\n        <source>Cannot create temporary file: %1</source>\n        <translation>Geçici dosya oluşturulamıyor: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"97\"/>\n        <source>Cannot create FiFo %1: %2</source>\n        <translation>FiFo oluşturulamıyor %1:%2</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"104\"/>\n        <source>Cannot open FiFo %1: %2</source>\n        <translation>FiFo açılamıyor %1:%2</translation>\n    </message>\n</context>\n<context>\n    <name>FileBrowser</name>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"98\"/>\n        <source>Synchronize with editor</source>\n        <translation>Editörle senkronize et</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"103\"/>\n        <source>Show Hidden Files</source>\n        <translation>Gizli Dosyaları Göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"159\"/>\n        <source>Set As Root Folder</source>\n        <oldsource>Set Folder To Root</oldsource>\n        <translation>Kök Klasör olarak ayarla</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"119\"/>\n        <source>Execute File</source>\n        <translation>Dosyayı Çalıştır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"101\"/>\n        <source>Reload Folder</source>\n        <translation>Klasörü Tekrak Yükle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"110\"/>\n        <source>Show Details</source>\n        <translation>Ayrıntıları Göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"122\"/>\n        <source>Debug File</source>\n        <translation>Hata Ayıklama Dosyası</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"160\"/>\n        <source>Open Folder in New Window</source>\n        <translation>Klasörü Yeni Pencerede Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"161\"/>\n        <source>Add to Folders</source>\n        <translation>Klasörlere Ekle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"141\"/>\n        <source>Open Parent</source>\n        <oldsource>Open to Parent</oldsource>\n        <translation>Üst Öğeyi Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"169\"/>\n        <source>Filter</source>\n        <translation>Filtrele</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"175\"/>\n        <source>File System</source>\n        <translation>Dosya Sistemi</translation>\n    </message>\n</context>\n<context>\n    <name>FileBrowserOption</name>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"20\"/>\n        <source>Terminal</source>\n        <translation>Terminal</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"26\"/>\n        <source>Command:</source>\n        <translation>Komut:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"36\"/>\n        <source>Arguments:</source>\n        <translation>Argümanlar:</translation>\n    </message>\n</context>\n<context>\n    <name>FileManager</name>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"189\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"211\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"233\"/>\n        <source>All Files (*)</source>\n        <translation>Tüm Dosyalar (*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"397\"/>\n        <source>LiteIDE</source>\n        <translation>LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"398\"/>\n        <source>Project &apos;%1&apos; has been created.\nDo you want to open it now?</source>\n        <oldsource>Project &apos;%1&apos; is created.\nDo you want to load?</oldsource>\n        <translation>&apos;%1&apos; projesi oluşturuldu.\nŞimdi açmak ister misin?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"301\"/>\n        <source>Open Project or File</source>\n        <translation>Proje veya Dosya Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"76\"/>\n        <source>Show Hidden Files</source>\n        <translation>Gizli Dosyaları Göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"127\"/>\n        <source>Folders</source>\n        <oldsource>Folers</oldsource>\n        <translation>Klasörler</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"186\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"208\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"230\"/>\n        <source>All Support Files (%1)</source>\n        <translation>Tüm Desteklenen Dosyalar (%1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"314\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"332\"/>\n        <source>Select a folder:</source>\n        <oldsource>Open Folder</oldsource>\n        <translation>Klasör Seç:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"679\"/>\n        <source>%1\nThis file has been deleted from the drive,\nbut you have unsaved modifications in your LiteIDE editor.\n\nDo you want to close the editor?\nAnswering &quot;Yes&quot; will discard your unsaved changes.</source>\n        <translation>%1\nBu dosya sürücüden silindi,\nancak LiteIDE düzenleyicinizde kaydedilmemiş değişiklikleriniz var.\n\nEditörü kapatmak istiyor musunuz?\n&quot;Evet&quot; cevabı, kaydedilmemiş değişikliklerinizin silinmesine neden olur.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"686\"/>\n        <source>%1\nThis file has been deleted from the drive.\n\nDo you want to close the editor?</source>\n        <translation>%1\nBu dosya sürücüden silinmiştir.\n\nEditörü kapatmak istiyor musunuz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"719\"/>\n        <source>%1\nThis file has been modified on the drive,\nbut you have unsaved modifications in your LiteIDE editor.\n\nDo you want to reload the file from disk?\nAnswering &quot;Yes&quot; will discard your unsaved changes.</source>\n        <translation>%1\nBu dosya sürücüde değiştirildi,\nancak LiteIDE düzenleyicinizde kaydedilmemiş değişiklikleriniz var.\n\nDosyayı diskten yeniden yüklemek istiyor musunuz?\n&quot;Evet&quot; cevabı, kaydedilmemiş değişikliklerinizin silinmesine neden olur.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"726\"/>\n        <source>%1\nThis file has been modified on the drive.\n\nDo you want to reload the file from disk?</source>\n        <translation>%1\nSürücüdeki dosya değiştirilmiş.\n\nDiskteki dosyayı yeniden yüklemek istermisiniz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"350\"/>\n        <source>Open Files</source>\n        <translation>Dosyaları Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"79\"/>\n        <source>Show Details</source>\n        <translation>Ayrıntıları Göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"82\"/>\n        <source>Synchronize with editor</source>\n        <translation>Editörle Senkronizasyon</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"85\"/>\n        <source>Split Mode</source>\n        <translation>Bölme Modu</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"113\"/>\n        <source>Filter</source>\n        <translation>Filtrele</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"363\"/>\n        <source>Open Project</source>\n        <translation>Proje Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"683\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"688\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"723\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"728\"/>\n        <source>LiteIDE X</source>\n        <translation>LiteIDE X</translation>\n    </message>\n</context>\n<context>\n    <name>FileRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"135\"/>\n        <source>Files</source>\n        <translation>Dosyalar</translation>\n    </message>\n</context>\n<context>\n    <name>FileSearch</name>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"217\"/>\n        <source>Match whole word</source>\n        <oldsource>Match word</oldsource>\n        <translation>Tüm kelimeyi eşleştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"218\"/>\n        <source>Match case</source>\n        <translation>Büyük / küçük harf eşleştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"219\"/>\n        <source>Regular expression</source>\n        <translation>Düzenli ifade</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"220\"/>\n        <source>Scan subdirectories</source>\n        <oldsource>Look in subdirs</oldsource>\n        <translation>Alt dizinleri tara</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"241\"/>\n        <source>Search for:</source>\n        <translation>Aranacak:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"243\"/>\n        <source>Options:</source>\n        <translation>Ayarlar:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"250\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>Araştır...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"273\"/>\n        <source>Filter:</source>\n        <translation>Filtre:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"365\"/>\n        <source>Files on File System</source>\n        <translation>Sistemdeki dosyalar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"230\"/>\n        <source>Search</source>\n        <translation>Ara</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"231\"/>\n        <source>Cancel</source>\n        <translation>İptal</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"251\"/>\n        <source>Current Folder</source>\n        <translation>Geçerli Klasör</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"254\"/>\n        <source>Auto Switch</source>\n        <translation>Otomatik Geçiş</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"278\"/>\n        <source>Clear</source>\n        <translation>Temizle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"480\"/>\n        <source>Open Directory</source>\n        <translation>Klasör Aç</translation>\n    </message>\n</context>\n<context>\n    <name>FileSearchManager</name>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"50\"/>\n        <source>Search Item:</source>\n        <translation>Arama Öğesi:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"69\"/>\n        <source>Only golang file changes can be revert!</source>\n        <oldsource>This file change cannot be undone!</oldsource>\n        <translation>Yalnızca golang dosyası değişiklikleri geri alınabilir!</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"83\"/>\n        <source>New Search</source>\n        <translation>Yeni Arama</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"85\"/>\n        <source>File Search</source>\n        <translation>Dosya Ara</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"89\"/>\n        <source>Search Result</source>\n        <translation>Arama Sonucu</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"248\"/>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"253\"/>\n        <source>LiteIDE X</source>\n        <translation>LiteIDE X</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"248\"/>\n        <source>Warning! Replace text is empty.\nWant to remove all the search items?</source>\n        <translation>Uyarı! Değiştirme metni boş\nTüm arama öğelerini silmek mı istiyorsunuz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"253\"/>\n        <source>Warning! Replace text is whitespace.\nWant to replace to all the search items to whitespace?</source>\n        <translation>Uyarı! Değiştirme metni boşluk karakteri\nTüm arama öğelerini boşluk karkteri yapmak mı istiyorsunuz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"280\"/>\n        <source>The following files have no write permissions. Do you want to change the permissions?</source>\n        <translation>Aşağıdaki dosyaların yazma izni yoktur. İzinleri değiştirmek istiyor musunuz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"283\"/>\n        <source>File is readonly</source>\n        <translation>Dosya saltokunur</translation>\n    </message>\n</context>\n<context>\n    <name>FileSystemWidget</name>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"94\"/>\n        <source>Open File</source>\n        <oldsource>Open Editor</oldsource>\n        <translation>Dosya Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"95\"/>\n        <source>New File...</source>\n        <oldsource>New File</oldsource>\n        <translation>Yeni Dosya...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"96\"/>\n        <source>New File Wizard...</source>\n        <oldsource>New File Wizard</oldsource>\n        <translation>Yeni Dosya Sihirbazı...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"320\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"326\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"331\"/>\n        <source>Rename File</source>\n        <translation>Dosya Yeniden Adlandır</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"98\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"345\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"350\"/>\n        <source>Delete File</source>\n        <oldsource>Remove File</oldsource>\n        <translation>Dosya Sil</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"100\"/>\n        <source>New Folder...</source>\n        <oldsource>New Folder</oldsource>\n        <translation>Yeni Klasör...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"346\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Bu dosyayı kalıcı olarak silmek istediğinizden emin misiniz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"386\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"395\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"400\"/>\n        <source>Rename Folder</source>\n        <translation>Klasör Yeniden Adlandır</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"102\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"414\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"421\"/>\n        <source>Delete Folder</source>\n        <oldsource>Remove Folder</oldsource>\n        <translation>Klasör Sil</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"97\"/>\n        <source>Rename File...</source>\n        <translation>Dosya Adı Değiştir...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"101\"/>\n        <source>Rename Folder...</source>\n        <translation>Klasör Adı Değiştir...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"104\"/>\n        <source>Open Terminal Here</source>\n        <translation>Terminali Burada Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"105\"/>\n        <source>Open Explorer Here</source>\n        <translation>Exploreri Burada Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"107\"/>\n        <source>View Godoc Here</source>\n        <translation>Godoc Görüntüle</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"454\"/>\n        <source>Add Folder</source>\n        <translation>Klasör Ekle</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"110\"/>\n        <source>Close Folder</source>\n        <translation>Klasörü Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"109\"/>\n        <source>Add Folder...</source>\n        <translation>Klasör Ekle...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"112\"/>\n        <source>Close All Folders</source>\n        <translation>Bütün Klasörleri Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"279\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"289\"/>\n        <source>Create File</source>\n        <translation>Dosya Oluştur</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"280\"/>\n        <source>A file with that name already exists!</source>\n        <oldsource>The file already exists!</oldsource>\n        <translation>Bu isimde bir dosya zaten var!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"290\"/>\n        <source>Failed to create the file!</source>\n        <translation>Dosya oluşturulamadı!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"320\"/>\n        <source>New Name:</source>\n        <translation>Yeni İsim:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"327\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"332\"/>\n        <source>Failed to rename the file!</source>\n        <translation>Dosya yeniden adlandırılamadı!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"415\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Bu klasörü ve tüm içeriğini kalıcı olarak silmek istediğinizden emin misiniz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"351\"/>\n        <source>Failed to delete the file!</source>\n        <oldsource>Failed to remove the file!</oldsource>\n        <translation>Dosya Silinemedi!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"369\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"372\"/>\n        <source>Create Folder</source>\n        <translation>Klasör Oluştır</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"370\"/>\n        <source>A folder with that name already exists!</source>\n        <oldsource>The folder name is exists!</oldsource>\n        <translation>Bu isimde bir klasör zaten var!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"373\"/>\n        <source>Failed to create the folder!</source>\n        <translation>Klasör oluşturulamadı!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"386\"/>\n        <source>Folder Name</source>\n        <translation>Klasör Adı</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"396\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"401\"/>\n        <source>Failed to rename the folder!</source>\n        <translation>Klasör Adı Değiştirilemedi!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"422\"/>\n        <source>Failed to delete the folder!</source>\n        <oldsource>Failed to remove the folder!</oldsource>\n        <translation>Klasör silinemedi!</translation>\n    </message>\n</context>\n<context>\n    <name>Find::Internal::SearchResultWidget</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"132\"/>\n        <source>Search was canceled.</source>\n        <translation>Arama iptal edildi.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"163\"/>\n        <source>Cancel</source>\n        <translation>İptal</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"167\"/>\n        <source>Repeat the search with same parameters</source>\n        <translation>Aramayı aynı parametrelerle yap</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"168\"/>\n        <source>Search again</source>\n        <translation>Tekrar ara</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"174\"/>\n        <source>Set show replace mode ui</source>\n        <translation>UI modunu ayarla</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"175\"/>\n        <source>Show Replace</source>\n        <translation>Değiştir&apos;i Göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"180\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"441\"/>\n        <source>Replace with:</source>\n        <translation>Değiştir:</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"186\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"442\"/>\n        <source>Replace all occurrences</source>\n        <translation>Tümünü değiştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"187\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"443\"/>\n        <source>Replace</source>\n        <translation>Değiştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"191\"/>\n        <source>Preserve case</source>\n        <translation>Cümleyi koru</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"204\"/>\n        <source>Expand all items</source>\n        <translation>Tüm öğeleri genişlet</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"209\"/>\n        <source>Collapse all items</source>\n        <translation>Tüm öğeleri daralt</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"318\"/>\n        <source>Revert with:</source>\n        <translation>Şununla geri dön:</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"319\"/>\n        <source>Revert</source>\n        <translation>Geri al</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"320\"/>\n        <source>Revert all occurrences</source>\n        <translation>Tüm değişiklikleri geri al</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"592\"/>\n        <source>%n matches replaced.</source>\n        <translation>\n            <numerusform>%n eşleşme değiştirildi.</numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"594\"/>\n        <source>searching... %n matches found.</source>\n        <translation>\n            <numerusform>aranıyor... %n eşleşme bulundu.</numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"600\"/>\n        <source>searching ...</source>\n        <translation>aranıyor...</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"606\"/>\n        <source>No matches found.</source>\n        <translation>Eşleşme bulunamadı.</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"608\"/>\n        <source>%n matches found.</source>\n        <translation>\n            <numerusform>%n eşleşme bulundu.</numerusform>\n        </translation>\n    </message>\n</context>\n<context>\n    <name>FindApiEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.h\" line=\"73\"/>\n        <source>Search</source>\n        <translation>Ara</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.h\" line=\"74\"/>\n        <source>Stop Search</source>\n        <translation>Aramayı Durdur</translation>\n    </message>\n</context>\n<context>\n    <name>FindApiWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"284\"/>\n        <source>Search</source>\n        <translation>Ara</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"305\"/>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"337\"/>\n        <source>Find</source>\n        <translation>Bul</translation>\n    </message>\n</context>\n<context>\n    <name>FindDocWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"96\"/>\n        <source>Search</source>\n        <translation>Ara</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"104\"/>\n        <source>Find</source>\n        <translation>Bul</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"123\"/>\n        <source>Find All</source>\n        <translation>Hepsini Bul</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"124\"/>\n        <source>Find const</source>\n        <translation>Const Bul</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"126\"/>\n        <source>Find func</source>\n        <translation>Fonksiyon Bul</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"128\"/>\n        <source>Find interface</source>\n        <translation>Arayüz Bul</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"130\"/>\n        <source>Find pkg</source>\n        <translation>pkg Bul</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"132\"/>\n        <source>Find struct</source>\n        <translation>struct Bul</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"134\"/>\n        <source>Find type</source>\n        <translation>Tür Bul</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"136\"/>\n        <source>Find var</source>\n        <translation>var Bul</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"138\"/>\n        <source>Use Regexp</source>\n        <translation>Düzenli ifade kullan</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"140\"/>\n        <source>Match Case</source>\n        <translation>Büyük / küçük harf eşleştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"142\"/>\n        <source>Match Word</source>\n        <translation>Kelime Eşleştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"169\"/>\n        <source>Help</source>\n        <translation>Yardım</translation>\n    </message>\n</context>\n<context>\n    <name>FindEditor</name>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"63\"/>\n        <source>Match case</source>\n        <translation>Büyük / küçük harf eşleştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"64\"/>\n        <source>Regular expression</source>\n        <translation>Düzenli İfade</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"65\"/>\n        <source>Wrap around</source>\n        <translation>Sözcük Kaydırma</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"56\"/>\n        <source>Find Next</source>\n        <translation>Sonrakini Bul</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"57\"/>\n        <source>Find Previous</source>\n        <oldsource>Find Prev</oldsource>\n        <translation>Öncekini Bul</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"58\"/>\n        <source>Replace With:</source>\n        <translation>Değiştir:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"59\"/>\n        <source>Replace</source>\n        <translation>Değiştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"60\"/>\n        <source>Replace All</source>\n        <translation>Tümünü Değiştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"62\"/>\n        <source>Match whole word only</source>\n        <translation>Tüm Kelimeyi Eşleştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"72\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"249\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"470\"/>\n        <source>Ready</source>\n        <translation>Hazır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"81\"/>\n        <source>Close</source>\n        <translation>Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"84\"/>\n        <source>Show Replace</source>\n        <translation>Değiştirmeyi Göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"103\"/>\n        <source>Find What:</source>\n        <translation>Aranan:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"115\"/>\n        <source>Options:</source>\n        <oldsource>Find Option:</oldsource>\n        <translation>Ayarlar:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"220\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"392\"/>\n        <source>Not found</source>\n        <translation>Bulunamadı</translation>\n    </message>\n</context>\n<context>\n    <name>FolderListView</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"249\"/>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"259\"/>\n        <source>Delete File</source>\n        <translation>Dosya Sil</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"250\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Bu dosyayı kalıcı olarak silmek istediğinizden emin misiniz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"260\"/>\n        <source>Failed to delete the file!</source>\n        <translation>Dosya silinemedi!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"272\"/>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"282\"/>\n        <source>Delete Folder</source>\n        <translation>Klasör Sil</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"273\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Bu klasörü ve tüm içeriğini kalıcı olarak silmek istediğinizden emin misiniz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"283\"/>\n        <source>Failed to delete the folder!</source>\n        <translation>Klasör Silinemedi!</translation>\n    </message>\n</context>\n<context>\n    <name>FolderRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"166\"/>\n        <source>Folders</source>\n        <translation>Klasörler</translation>\n    </message>\n</context>\n<context>\n    <name>FolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"173\"/>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"183\"/>\n        <source>Delete File</source>\n        <translation>Dosya Sil</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"174\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Bu dosyayı kalıcı olarak silmek istediğinizden emin misiniz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"184\"/>\n        <source>Failed to delete the file!</source>\n        <translation>Dosya Silinemedi!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"230\"/>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"240\"/>\n        <source>Delete Folder</source>\n        <translation>Klasör Sil</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"231\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Bu klasörü ve tüm içeriğini kalıcı olarak silmek istediğinizden emin misiniz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"241\"/>\n        <source>Failed to delete the folder!</source>\n        <translation>Klasör Silinemedi!</translation>\n    </message>\n</context>\n<context>\n    <name>GdbDebuggerOption</name>\n    <message>\n        <location filename=\"src/plugins/gdbdebugger/gdbdebuggeroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/gdbdebugger/gdbdebuggeroption.ui\" line=\"20\"/>\n        <source>Enable --tty for program being debugged.</source>\n        <translation>Hata ayıklanan program için --tty&apos;yi etkinleştirin.</translation>\n    </message>\n</context>\n<context>\n    <name>GoAddTagsDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"14\"/>\n        <source>Add Tags To Struct Field</source>\n        <translation>Struct Alanına Etiket Ekle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"23\"/>\n        <source>Add JSON Tag</source>\n        <translation>JSON etiketi ekle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"54\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"105\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"169\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"197\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"281\"/>\n        <source>Options</source>\n        <translation>Ayarlar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"61\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"112\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"176\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"204\"/>\n        <source>Multiple options separated by commas</source>\n        <oldsource>Multiple options are separated by commas</oldsource>\n        <translation>Virgülle ayrılmış birden çok seçenek</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"74\"/>\n        <source>Add XML Tag</source>\n        <translation>XML etiketi ekle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"125\"/>\n        <source>Add Custom Tags</source>\n        <translation>Özel etiket ekle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"155\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"187\"/>\n        <source>Tag Name</source>\n        <translation>Etilet İsmi</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"162\"/>\n        <source>Setup custom tag name</source>\n        <translation>Özel etiket adı ayarla</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"299\"/>\n        <source>Sort sorts the tags in increasing order according to the key name</source>\n        <translation>Etiket anahtarları adına göre artan şekilde sıralar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"306\"/>\n        <source>Override current tags when adding tags</source>\n        <translation>Etiket eklerken mevcut etiketleri geçersiz kıl</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"316\"/>\n        <source>Info</source>\n        <translation>Bilgi</translation>\n    </message>\n</context>\n<context>\n    <name>GoRemoveTagsDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"14\"/>\n        <source>Remove Tags From Struct Field</source>\n        <translation>Struct Alanından Etiketleri Kaldır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"23\"/>\n        <source>Remove Tags And Options</source>\n        <translation>Etiketleri ve Seçenekleri Kaldır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"29\"/>\n        <source>Clear All Tags</source>\n        <translation>Tüm Etiketleri Temizle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"39\"/>\n        <source>Clear All Tags Options</source>\n        <oldsource>Clear All Tag Options</oldsource>\n        <translation>Tüm Etiket Seçeneklerini Temizle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"46\"/>\n        <source>Remove JSON Tag</source>\n        <translation>JSON etiketlerini temizle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"53\"/>\n        <source>Remove XML Tag</source>\n        <translation>XML etiketlerini temizle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"60\"/>\n        <source>Remove Custom Tag</source>\n        <translation>Özel etiketleri teminzle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"70\"/>\n        <source>Multiple tags separated by commas</source>\n        <oldsource>Multiple tags  are separated by commas</oldsource>\n        <translation>Birden çok etiket, virgülle ayır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"77\"/>\n        <source>Remove JSON Options</source>\n        <translation>JSON ayarlarını kaldır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"84\"/>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"98\"/>\n        <source>Multiple options separated by commas</source>\n        <oldsource>Multiple options are separated by commas</oldsource>\n        <translation>Çoklu seçenekler virgülle ayrılır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"91\"/>\n        <source>Remove XML Options</source>\n        <translation>XML ayarlarını kaldır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"111\"/>\n        <source>Remove Custom Tag Options</source>\n        <translation>Özel etiket ayarlarını temizle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"118\"/>\n        <source>Setup remove custom tag and option, example tag=opt1,tag=opt2</source>\n        <oldsource>Setup remove custom tag option, example tag=opt1,tag=opt2</oldsource>\n        <translation>Özel etiketi ve seçeneği kaldır, örnek etiket = opt1, etiket = opt2</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"121\"/>\n        <source>tag=option</source>\n        <translation>etiket=ayar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"131\"/>\n        <source>Info</source>\n        <translation>Bilgi</translation>\n    </message>\n</context>\n<context>\n    <name>GolangAst</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"60\"/>\n        <source>No outline available</source>\n        <translation>Taslak mevcut değil</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"74\"/>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"77\"/>\n        <source>Synchronize with editor</source>\n        <translation>Düzenletici ile senkronizasyon</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"80\"/>\n        <source>Go Class View</source>\n        <oldsource>Class View</oldsource>\n        <translation>Go Sınıf Görünümü</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"81\"/>\n        <source>Go Outline</source>\n        <oldsource>Outline</oldsource>\n        <translation>Go Taslağı</translation>\n    </message>\n</context>\n<context>\n    <name>GolangAstOption</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"20\"/>\n        <source>QuickOpenSymbol</source>\n        <translation>Hızlı Açma Sembolü</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"26\"/>\n        <source>Show import path</source>\n        <translation>İçe Aktarma Yolunu Göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"33\"/>\n        <source>Match case sensitive</source>\n        <translation>Büyük / küçük harfe duyarlı</translation>\n    </message>\n</context>\n<context>\n    <name>GolangCodeOption</name>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"20\"/>\n        <source>PKG automitic import prompt</source>\n        <translation>PKG otomatik içe aktarma istemi</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"26\"/>\n        <source>PKG automatic import hints for all packages (GOPATH)</source>\n        <translation>Tüm paketler için PKG otomatik içe aktarma ipuçları (GOPATH)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"33\"/>\n        <source>PKG automatic import hints for standard package</source>\n        <translation>Standart paket için PKG otomatik içe aktarma ipuçları</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"43\"/>\n        <source>Gocode</source>\n        <oldsource>Go API</oldsource>\n        <translation>Gocode</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"56\"/>\n        <source>Auto update depends package when it&apos;s source changed.</source>\n        <oldsource>Auto update depends package when its source is changed.</oldsource>\n        <translation>Kaynak değiştiğinde pakete bağımlılıklarını otomatik güncelle.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"49\"/>\n        <source>Close gocode when exiting</source>\n        <translation>Çıkışta gocode kapat</translation>\n    </message>\n</context>\n<context>\n    <name>GolangDoc</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"100\"/>\n        <source>Godoc Search</source>\n        <translation>Godoc Arama</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"92\"/>\n        <source>Go Doc Search</source>\n        <oldsource>Golang Doc Search</oldsource>\n        <translation>Golang Doc Arama</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"96\"/>\n        <source>Go Api Index</source>\n        <oldsource>Golang Api Index</oldsource>\n        <translation>API indeksine git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"111\"/>\n        <source>Find Package:</source>\n        <translation>Aranan Paket:</translation>\n    </message>\n</context>\n<context>\n    <name>GolangDocOption</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"20\"/>\n        <source>Go API</source>\n        <translation>API&apos;ye Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"26\"/>\n        <source>Use default context (fast)</source>\n        <translation>Standart kaynakları kullan (hızlı)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"33\"/>\n        <source>Only load standard API documentation</source>\n        <oldsource>Only load standard api</oldsource>\n        <translation>Yalnızca standart API belgelerini yükleyin</translation>\n    </message>\n</context>\n<context>\n    <name>GolangEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"90\"/>\n        <source>View import package use godoc</source>\n        <translation>İçe aktarma paketini görüntüleyin, godoc kullanın</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"93\"/>\n        <source>View Expression Information</source>\n        <translation>İfade Bilgilerini Görüntüle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"96\"/>\n        <source>Jump to Declaration</source>\n        <translation>Dekorasyona Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"99\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"105\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"108\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"111\"/>\n        <source>Find Usages</source>\n        <translation>Kullanım Ara</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"102\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"114\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"117\"/>\n        <source>Rename Symbol Under Cursor</source>\n        <translation>İmleç Altındaki Sembolü Yeniden Adlandır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"111\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"114\"/>\n        <source>%1 (Module/GOPATH) with GOROOT</source>\n        <translation>%1 (Module/GOPATH) GOROOT ile</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"170\"/>\n        <source>Stop</source>\n        <translation>Dur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"175\"/>\n        <source>Go Source Query</source>\n        <translation>Go Kaynak Sorgusu</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"180\"/>\n        <source>SourceQuery What</source>\n        <translation>Kaynak Sorgusu</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"184\"/>\n        <source>Callees</source>\n        <translation>Arananlar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"188\"/>\n        <source>Callers</source>\n        <translation>Arayıcılar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"192\"/>\n        <source>Callstack</source>\n        <translation>Çağrı yığını</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"196\"/>\n        <source>Definition</source>\n        <translation>Tanım</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"200\"/>\n        <source>Describe</source>\n        <translation>Tanımlamak</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"204\"/>\n        <source>Freevars</source>\n        <translation>Taımsız Değişkenler</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"208\"/>\n        <source>Implements</source>\n        <translation>Yerine getirme</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"212\"/>\n        <source>Implements(GOPATH)</source>\n        <translation>Sağlanan (GOPATH)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"216\"/>\n        <source>Peers</source>\n        <translation>Peers</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"220\"/>\n        <source>Referrers</source>\n        <translation>Yönlendirenler</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"224\"/>\n        <source>Pointsto</source>\n        <translation>Puanlar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"228\"/>\n        <source>Whicherrs</source>\n        <translation>Hangisi</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"232\"/>\n        <source>Add Tags To Struct Field</source>\n        <translation>Struct Alanına Etiket Ekle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"236\"/>\n        <source>Remove Tags From Struct Field</source>\n        <translation>Struct Alanından Etiketleri Kaldır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"354\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"391\"/>\n        <source>Refactor</source>\n        <translation>Yeniden düzenleme</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"361\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"399\"/>\n        <source>SourceQuery</source>\n        <translation>Kaynak Sorgusu</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"812\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"993\"/>\n        <source>Below files in package %1</source>\n        <translation>%1 paketindeki dosyalar</translation>\n    </message>\n</context>\n<context>\n    <name>GolangEditOption</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"20\"/>\n        <source>Mouse</source>\n        <translation>Fare</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"26\"/>\n        <source>Go root source file editor setup read only</source>\n        <translation>Go kaynak dosya düzenleyici kurulumunu salt okunur yap</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"33\"/>\n        <source>Enable view expression infomation on mouse</source>\n        <translation>Fareyle görünüm ifadesi bilgilerini etkinleştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"40\"/>\n        <source>Enable mouse navigation</source>\n        <translation>Fareyle gezinmeyi etkinleştir</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFileSearch</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangfilesearch.cpp\" line=\"59\"/>\n        <source>Golang Find Usages</source>\n        <translation>Golang Kullanımları Bul</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFmtOption</name>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"20\"/>\n        <source>Format Options</source>\n        <oldsource>Golang Format</oldsource>\n        <translation>Format-Ayarları</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"26\"/>\n        <source>Goimports updates your Go import lines, adding missing ones and removing unreferenced ones.</source>\n        <translation>Goimports, Go içe aktarma satırlarınızı günceller, eksik olanları ekler ve referans verilmeyenleri kaldırır.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"29\"/>\n        <source>Enable update imports line, adding missing ones and removing unreferenced ones.</source>\n        <translation>Güncelleme içe aktarım satırını etkinleştirin, eksik olanları ekleyin ve referans verilmeyenleri kaldırın.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"46\"/>\n        <source>Synchronous</source>\n        <translation>Eşzamanlı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"52\"/>\n        <source>Synchronous code formatting</source>\n        <oldsource> Synchronous code formatting</oldsource>\n        <translation>Eşzamanlı kod biçimlendirme</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"61\"/>\n        <source>Synchronous code formatting timeout in milliseconds (500ms or more):</source>\n        <translation>Milisaniye cinsinden eşzamanlı kod biçimlendirme zaman aşımı (500 ms veya daha fazla):</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"36\"/>\n        <source>Automatically format code when saving</source>\n        <oldsource>When the editor is saved automatically gofmt</oldsource>\n        <translation>Kaydederken kodu otomatik olarak biçimlendir</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFmtPlugin</name>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"58\"/>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"66\"/>\n        <source>Format Code</source>\n        <oldsource>Format Code (goimports)</oldsource>\n        <translation>Kodu Biçimlendir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"59\"/>\n        <source>Format Code (Adjusts Imports)</source>\n        <translation>Kodu Biçimlendir (İçe Aktarmaları Ayarlar)</translation>\n    </message>\n</context>\n<context>\n    <name>GolangPackageOption</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.cpp\" line=\"304\"/>\n        <source>Choose directory to add to GOPATH:</source>\n        <translation>GOPATH&apos;a eklenecek dizini seçin:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"14\"/>\n        <source>Manage GOPATH / Modules</source>\n        <translation>GOPATH modüllerini yönet</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"35\"/>\n        <source>Go Modules</source>\n        <translation>Go Modülleri</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"78\"/>\n        <source>Custom GONOPROXY</source>\n        <translation>Özel GONOPROXY</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"88\"/>\n        <source>Custom GOPROXY</source>\n        <translation>Özel GOPROXY</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"95\"/>\n        <source>Custom GO111MODULE</source>\n        <translation>Özel GO111MODULE</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"102\"/>\n        <source>Custom GONOSUMDB</source>\n        <translation>Özel GONOSUMDB</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"109\"/>\n        <source>Custom GOPRIVATE</source>\n        <translation>Özel GOPRIVATE</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"125\"/>\n        <source>TextLabel</source>\n        <translation>Etiket</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"137\"/>\n        <source>GOPATH</source>\n        <translation>GOPATH</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"163\"/>\n        <source>Use System GOPATH</source>\n        <translation>Sistemde öntanımlı GOPATH kullan</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"186\"/>\n        <source>Reload</source>\n        <translation>Yenile</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"210\"/>\n        <source>Use Custom GOPATH (one per line)</source>\n        <translation>Özel  GOPATH kullan (her satırda bir adet)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"233\"/>\n        <source>Add Directory...</source>\n        <translation>Klasör Ekle...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"240\"/>\n        <source>Clear</source>\n        <translation>Temizle</translation>\n    </message>\n</context>\n<context>\n    <name>GolangPresentEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"64\"/>\n        <source>Section (s1)</source>\n        <translation>Bölüm (s1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"67\"/>\n        <source>Subsection (s2)</source>\n        <translation>Alt Bölüm (s2)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"70\"/>\n        <source>Sub-subsection (s3)</source>\n        <translation>Alt Bölüm (s3)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"73\"/>\n        <source>Bold</source>\n        <translation>Kalın</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"76\"/>\n        <source>Italic</source>\n        <translation>İtalik</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"79\"/>\n        <source>Inline Code</source>\n        <translation>Satır içi kod</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"82\"/>\n        <source>Switch Bullets</source>\n        <translation>İzleri Değiştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"85\"/>\n        <source>Comment/Uncomment Selection</source>\n        <translation>Seçimi Yorum Satırı Yap/Kaldır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"88\"/>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"267\"/>\n        <source>Export HTML</source>\n        <translation>HTML olarak dışa aktar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"91\"/>\n        <source>Verify Present</source>\n        <translation>Sunumu Doğrula</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"256\"/>\n        <source>Present verify success</source>\n        <translation>Mevcut doğrulama başarılı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"258\"/>\n        <source>Present verify false</source>\n        <translation>Mevcut doğrulama başarısız</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"310\"/>\n        <source>Export PDF</source>\n        <translation>PDF dışa aktar</translation>\n    </message>\n</context>\n<context>\n    <name>GolangSymbol</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangsymbol.cpp\" line=\"62\"/>\n        <source>Quick Open Symbol by Name</source>\n        <translation>Ada Göre Hızlı Sembol Aç</translation>\n    </message>\n</context>\n<context>\n    <name>GoplayBrowser</name>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"70\"/>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"132\"/>\n        <source>Go Playground</source>\n        <translation>Go Playground</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"72\"/>\n        <source>Run</source>\n        <translation>Çalıştır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"73\"/>\n        <source>Stop</source>\n        <translation>Durdur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"74\"/>\n        <source>New</source>\n        <translation>Yeni</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"75\"/>\n        <source>Load...</source>\n        <translation>Yükle...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"76\"/>\n        <source>Save...</source>\n        <translation>Kaydet...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"77\"/>\n        <source>Explore Folder</source>\n        <translation>Klasörleri Araştır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"175\"/>\n        <source>Running...</source>\n        <oldsource>Running...\n\n</oldsource>\n        <translation>Çalışıyor...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"195\"/>\n        <source>Error: %1.</source>\n        <oldsource>\nError: %1.</oldsource>\n        <translation>Hata: %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"197\"/>\n        <source>Success: %2.</source>\n        <oldsource>\nSuccess: %2.</oldsource>\n        <translation>Başarılı: %2.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"247\"/>\n        <source>Load File</source>\n        <translation>Dosya Yükle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"247\"/>\n        <source>Select a file to load:</source>\n        <translation>Yüklenecek dosya seç:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"263\"/>\n        <source>Save File</source>\n        <translation>Dosya Kaydet</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"263\"/>\n        <source>New File Name:</source>\n        <translation>Yeni Dosya Adı:</translation>\n    </message>\n</context>\n<context>\n    <name>HtmlPreview</name>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"72\"/>\n        <source>Page Style</source>\n        <translation>Sayfa Yapısı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"77\"/>\n        <source>Reload</source>\n        <translation>Yenile</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"78\"/>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"382\"/>\n        <source>Export Html</source>\n        <translation>HTML Dışa Aktar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"79\"/>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"414\"/>\n        <source>Export PDF</source>\n        <translation>PDF Dışa Aktar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"80\"/>\n        <source>Print Preview</source>\n        <translation>Baskı Önizleme</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"83\"/>\n        <source>Synchronize preview and code scrollbars</source>\n        <translation>Önizleme ve kod kaydırma çubuklarını senkronize edin</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"89\"/>\n        <source>Config</source>\n        <translation>Ayar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"169\"/>\n        <source>Plain HTML</source>\n        <translation>Düz HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"390\"/>\n        <source>Export Failed</source>\n        <translation>Dışa Aktarım Başarısız</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"86\"/>\n        <source>Automatically display preview</source>\n        <oldsource>Automatically Display Preview</oldsource>\n        <translation>Önizlemeyi otomatik göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"100\"/>\n        <source>HTML Preview</source>\n        <oldsource>Html Preview</oldsource>\n        <translation>HTML Önizleme</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"391\"/>\n        <source>Could not open %1 for writing!</source>\n        <oldsource>Can not write file %1</oldsource>\n        <translation>%1 kaydetmek için açılamadı!</translation>\n    </message>\n</context>\n<context>\n    <name>ImageEditor</name>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"52\"/>\n        <source>ZoomIn</source>\n        <translation>Büyüt</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"55\"/>\n        <source>ZoomOut</source>\n        <translation>Küçült</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"58\"/>\n        <source>Reset to original size</source>\n        <translation>Orjinal boyuta sıfırla</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"61\"/>\n        <source>Fit to view</source>\n        <translation>Görüntüleyiciye sığdır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"64\"/>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"247\"/>\n        <source>Play movie</source>\n        <translation>Video Oynat</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"68\"/>\n        <source>Prev frame</source>\n        <translation>Önceki Çerçeve</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"72\"/>\n        <source>Next frame</source>\n        <translation>Sonraki Çerçeve</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"244\"/>\n        <source>Pause movie</source>\n        <translation>Duraklat</translation>\n    </message>\n</context>\n<context>\n    <name>ImageEditorFactory</name>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditorfactory.cpp\" line=\"122\"/>\n        <source>Image Viewer</source>\n        <translation>Resim görüntüleyici</translation>\n    </message>\n</context>\n<context>\n    <name>ImportPkgTip</name>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcode.cpp\" line=\"847\"/>\n        <source>warning, pkg not find, please enter to import :</source>\n        <translation>uyarı, paket bulunamıyor, lütfen içe aktarmak için girin:</translation>\n    </message>\n</context>\n<context>\n    <name>JsonEdit</name>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"51\"/>\n        <source>Verify</source>\n        <translation>Doğrulama</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"53\"/>\n        <source>Format Json</source>\n        <translation>Json Formatı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"55\"/>\n        <source>Compact Json</source>\n        <translation>Sıkılaştırılmış Json</translation>\n    </message>\n</context>\n<context>\n    <name>LiteApp</name>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"284\"/>\n        <source>Event Log</source>\n        <translation>Olay Günlüğü</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"271\"/>\n        <source>Escape</source>\n        <translation>Vazgeç</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"756\"/>\n        <source>Close File</source>\n        <translation>Dosyayı Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"759\"/>\n        <source>Close All Files</source>\n        <translation>Bütün Dosyaları Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"769\"/>\n        <source>Save File</source>\n        <translation>Dosyayı Kaydet</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"772\"/>\n        <source>Save File As...</source>\n        <translation>Dosyayı Farklı Kaydet...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"775\"/>\n        <source>Save All Files</source>\n        <translation>Bütün Dosyaları Kaydet</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"762\"/>\n        <source>Open Project</source>\n        <translation>Proje Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"287\"/>\n        <source>Options</source>\n        <translation>Ayarlar</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"733\"/>\n        <source>New...</source>\n        <translation>Yeni...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"736\"/>\n        <source>Open File...</source>\n        <translation>Dosya Aç...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"739\"/>\n        <source>Open Folder...</source>\n        <translation>Klasör Aç...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"742\"/>\n        <source>Open Folder in New Window...</source>\n        <translation>Klasörü Yeni Pencerede Aç...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"747\"/>\n        <source>Close All Folders</source>\n        <oldsource>Add Folder...</oldsource>\n        <translation>Bütün Klasörleri Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"750\"/>\n        <source>New Window</source>\n        <translation>Yeni Pencere</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"753\"/>\n        <source>Close Window</source>\n        <translation>Pencereyi Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"764\"/>\n        <source>Save Project</source>\n        <translation>Projeyi Kaydet</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"766\"/>\n        <source>Close Project</source>\n        <translation>Projeyi Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"778\"/>\n        <source>Exit</source>\n        <translation>Çıkış</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"784\"/>\n        <source>Full Screen</source>\n        <translation>Tam Ekran</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"788\"/>\n        <source>About LiteIDE</source>\n        <translation>LiteIDE Hakkında</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"794\"/>\n        <source>About Plugins</source>\n        <translation>Pluginler Hahhında</translation>\n    </message>\n</context>\n<context>\n    <name>LiteAppOption</name>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"30\"/>\n        <source>Store [*]</source>\n        <oldsource>Store</oldsource>\n        <translation>Kayıt [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"57\"/>\n        <source>Language:</source>\n        <translation>Dil:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"144\"/>\n        <source>Icon [*]</source>\n        <translation>İkon [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"300\"/>\n        <source>Reload files in session</source>\n        <translation>Oturumdaki dosyaları geri yükle</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"312\"/>\n        <source>Recent Files</source>\n        <oldsource>Recent File</oldsource>\n        <translation>Son kullanılanlar</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"318\"/>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"357\"/>\n        <source>Max Count:</source>\n        <oldsource>Max Recent:</oldsource>\n        <translation>En Fazla:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"229\"/>\n        <source>Monitoring files for modifications</source>\n        <translation>Dosyaları değişikliğe karşı izleme</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"41\"/>\n        <source>Store settings to local ini file</source>\n        <translation>Ayarları yerel ini dosyasında sakla</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"51\"/>\n        <source>Interface [*]</source>\n        <translation>Arayüz [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"74\"/>\n        <source>Style:</source>\n        <translation>Stil:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"84\"/>\n        <source>Use tool window shortcuts</source>\n        <translation>Araç penceresi kısayollarını kullanın</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"112\"/>\n        <source>Theme [*]</source>\n        <translation>Tema [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"153\"/>\n        <source>Fallback build-in icon library and liteapp/qrc/default</source>\n        <translation>Yedek yerleşik simge kitaplığı ve liteapp / qrc / default</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"156\"/>\n        <source>Load the external file icon library</source>\n        <oldsource>Load custome icon from liteapp/qrc folder</oldsource>\n        <translation>Harici dosya simgesi kitaplığını yükleyin</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"184\"/>\n        <source>Automatically save documents</source>\n        <translation>Dosyaları otomatik kaydet</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"190\"/>\n        <source>Automatically save documents when application is idle</source>\n        <translation>Uygulama boştayken dosyaları otomatik olarak kaydedin</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"200\"/>\n        <source>sec</source>\n        <translation>sn</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"235\"/>\n        <source>Auto reload or close editor buffer,if underlying file is modified/deleted.</source>\n        <oldsource>Auto reload editor buffer from disk file,if underlying file is modified/deleted.</oldsource>\n        <translation>Ana dosya değiştirilirse / silinirse, düzenleyici arabelleğini otomatik olarak yeniden yükleyin veya kapatın.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"263\"/>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"269\"/>\n        <source>Session</source>\n        <translation>Oturum</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"325\"/>\n        <source>0-99</source>\n        <translation>0-99</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"351\"/>\n        <source>Editor Tabs</source>\n        <translation>Tab Düzenle</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"364\"/>\n        <source>10-999</source>\n        <translation>10-999</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"407\"/>\n        <source>Display</source>\n        <translation>Ekran</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"413\"/>\n        <source>Display [*]</source>\n        <translation>Göster [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"419\"/>\n        <source>Show splash screen on startup</source>\n        <translation>Aaçılışa başlangıç ekranını göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"426\"/>\n        <source>Show welcome page on startup</source>\n        <translation>Başlangıçta karşılama sayfasını göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"509\"/>\n        <source>Editor</source>\n        <translation>Düzenleyici</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"515\"/>\n        <source>Editor tab [*]</source>\n        <translation>Düzenleyici sekmesi [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"521\"/>\n        <source>Show close buttons on each editor tab</source>\n        <translation>Editörün her sekmesinde kapatma butonu göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"528\"/>\n        <source>Enable mouse wheel navigation on tabs</source>\n        <oldsource>Enable mouse wheel selected on tab</oldsource>\n        <translation>Sekmelerde fare tekerleği ile gezinmeyi etkinleştirin</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"436\"/>\n        <source>Toolbar Icon Size [*]</source>\n        <translation>Araç Çubuğu İkon Boyutu</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"538\"/>\n        <source>Editor navigate</source>\n        <translation>Düzenleyicide gezinme</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"544\"/>\n        <source>Enable mouse extra &apos;Back&apos; button and &apos;Forward&apos; button for go back and forward</source>\n        <translation>Geri ve ileri gitmek için farenin ekstra &apos;Geri&apos; düğmesini ve &apos;İleri&apos; düğmesini etkinleştirin</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"568\"/>\n        <source>Keyboard</source>\n        <translation>Klavye</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"574\"/>\n        <source>Format: {Ctrl+B},{Ctrl+Shift+B},{Ctrl+K,Ctrl+U},{Ctrl+Shift+Z;Ctrl+Y}</source>\n        <translation>Format: {Ctrl+B},{Ctrl+Shift+B},{Ctrl+K,Ctrl+U},{Ctrl+Shift+Z;Ctrl+Y}</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"586\"/>\n        <source>Hide standard commands</source>\n        <translation>Standart komutları gizle</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"593\"/>\n        <source>Reset</source>\n        <translation>Sıfırla</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"600\"/>\n        <source>Reset All</source>\n        <translation>Tümünü Sıfırla</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"620\"/>\n        <source>Import...</source>\n        <translation>İçe Aktar...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"627\"/>\n        <source>Export...</source>\n        <translation>Dışa Aktar...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"24\"/>\n        <source>Generic</source>\n        <translation>Genel</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"118\"/>\n        <source>Theme:</source>\n        <translation>Tema:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"275\"/>\n        <source>Reload session on startup</source>\n        <oldsource>Auto load last session</oldsource>\n        <translation>Açılışta oturumu geri yükle</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"97\"/>\n        <source>SideBarStyle</source>\n        <translation>Araç Çubuğu Stili</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"98\"/>\n        <source>SplitterStyle</source>\n        <translation>Bölme Stili</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"82\"/>\n        <source>Command</source>\n        <translation>Komut</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"83\"/>\n        <source>Label</source>\n        <translation>Etiket</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"84\"/>\n        <source>Shortcuts</source>\n        <translation>Kısayol</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"85\"/>\n        <source>NativeText</source>\n        <translation>Yerel Metin</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"86\"/>\n        <source>Standard</source>\n        <translation>Standart</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"506\"/>\n        <source>Import Keyboard Mapping Scheme</source>\n        <translation>Klavye Eşleme Şemasını İçe Aktar</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"506\"/>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"540\"/>\n        <source>Keyboard Mapping Scheme (%1)</source>\n        <translation>Klavye Eşleme Şeması (%1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"513\"/>\n        <source>Could not read scheme from %1!</source>\n        <translation>(%1) Klavye Eşleme Şeması okunamadı!</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"540\"/>\n        <source>Export Keyboard Mapping Scheme</source>\n        <translation>Klavye Eşleme Şemasını Dışa Aktar</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"551\"/>\n        <source>Could not write scheme to %1!</source>\n        <translation>Klavye Eşleme Şeması (%1) yazılamadı!</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuild</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"141\"/>\n        <source>Build Toolbar</source>\n        <translation>Derleme Araç Çubuğu</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"149\"/>\n        <source>Build Configuration...</source>\n        <oldsource>Build Config</oldsource>\n        <translation>Derleme Ayarları...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"167\"/>\n        <source>Stop Action</source>\n        <translation>İşlemi Durdur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"171\"/>\n        <source>Clear Output</source>\n        <oldsource>Clear All</oldsource>\n        <translation>Çıktıları Temizle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"175\"/>\n        <source>Execute File</source>\n        <translation>Dosyayı Çalıştır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"178\"/>\n        <source>Debug File</source>\n        <translation>Dosya Hata Ayıklaması</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"181\"/>\n        <source>Lock Build Path</source>\n        <oldsource>Lock Go Build Path</oldsource>\n        <translation>Derleme Yolunu Kilitle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"183\"/>\n        <source>Build Path Configuration</source>\n        <oldsource>Go Build Configuration</oldsource>\n        <translation>Derleme Yolu Ayarları</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"229\"/>\n        <source>Use godoc View</source>\n        <translation>godoc görünümünü kullanın</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"286\"/>\n        <source>Line Wrap</source>\n        <translation>Satır Kaydırma</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"290\"/>\n        <source>Auto Clear</source>\n        <translation>Otomatik temizleme</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"294\"/>\n        <source>Automatic positioning cursor</source>\n        <translation>Otomatik imleç konumlandırma</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"309\"/>\n        <source>Setup</source>\n        <translation>Ayarlar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"317\"/>\n        <source>Build Output</source>\n        <oldsource>Build</oldsource>\n        <translation>Derleme Çıktısı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"730\"/>\n        <source>Current environment change id &quot;%1&quot;</source>\n        <translation>Mevcut ortam değişiklik kimliği &quot;%1&quot;</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1144\"/>\n        <source>Lock Build</source>\n        <oldsource>Lock Build: %1</oldsource>\n        <translation>Derlemeyi Kilitle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1482\"/>\n        <source>Error: %1.</source>\n        <oldsource>Error: %1.\n</oldsource>\n        <translation>Hata: %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1485\"/>\n        <source>Command exited with code %1.</source>\n        <translation>Komut sonlandırma durumu %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1487\"/>\n        <source>Success: %1.</source>\n        <oldsource>Success: %1.\n</oldsource>\n        <translation>Başarılı: %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1536\"/>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1588\"/>\n        <source>A process is currently running.  Stop the current action first.</source>\n        <oldsource>A process is currently running.  Stop the current action first.\n</oldsource>\n        <translation>Şu anda bir işlem çalışıyor. Önce mevcut eylemi durdurun.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1574\"/>\n        <source>Killing current process...</source>\n        <oldsource>Killing current process...\n</oldsource>\n        <translation>Mevcut işlem sonlandırılıyor...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1584\"/>\n        <source>Failed to terminate the existing process!</source>\n        <oldsource>Failed to terminate the existing process!\n</oldsource>\n        <translation>Mevcut işlem sonlandırılamadı!</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1794\"/>\n        <source>Started process successfully</source>\n        <oldsource>Started process successfully\n</oldsource>\n        <translation>İşlem başarıyla başlatıldı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1794\"/>\n        <source>Failed to start process</source>\n        <translation>İşlem başlatma hatası</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuildOption</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"20\"/>\n        <source>Recheck Go installation when changing environments</source>\n        <oldsource>Recheck go env if enviroment changed</oldsource>\n        <translation>Ortam değişkenleri değiştirilince Go kurulumunu tekrar kontrol et</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"27\"/>\n        <source>Build command configuration files [*]</source>\n        <oldsource>Build command configuration files:</oldsource>\n        <translation>Komutla yapılandırma dosyalarını oluşturun [*]</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuildPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"102\"/>\n        <source>Close</source>\n        <translation>Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"105\"/>\n        <source>Execute:</source>\n        <oldsource>Exec:</oldsource>\n        <translation>Çalıştır:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"112\"/>\n        <source>Execute File</source>\n        <oldsource>Execute</oldsource>\n        <translation>Dosya Çalıştır</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebug</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"114\"/>\n        <source>Stop</source>\n        <translation>Dur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"75\"/>\n        <source>Clear</source>\n        <translation>Temizle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"111\"/>\n        <source>Continue</source>\n        <translation>Devam</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"117\"/>\n        <source>Show Current Line</source>\n        <translation>Geçerli Satırı Göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"189\"/>\n        <source>Debug Output</source>\n        <oldsource>Debug</oldsource>\n        <translation>Hata Ayıklama Çıktısı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"105\"/>\n        <source>Start Debugging External Application...</source>\n        <oldsource>Start Debugging External Application</oldsource>\n        <translation>Dış Uygulama Hata Ayıklaması...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"93\"/>\n        <source>Close</source>\n        <translation>Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"108\"/>\n        <source>Start Debugging</source>\n        <translation>Hata Ayıklamaya Başla</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"120\"/>\n        <source>Step Into</source>\n        <translation>Adım İleri</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"123\"/>\n        <source>Step Over</source>\n        <translation>Adım İleri</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"126\"/>\n        <source>Step Out</source>\n        <translation>Dışarı Çık</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"129\"/>\n        <source>Run to Line</source>\n        <translation>Satıra kadar çalıştır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"132\"/>\n        <source>Insert/Remove Breakpoint</source>\n        <translation>Kesme Ekle/Kaldır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"135\"/>\n        <source>Remove All Breakpoints</source>\n        <translation>Tüm Kesmeleri Kaldır</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebugOption</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"20\"/>\n        <source>Debug</source>\n        <translation>Hata Ayıkla</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"26\"/>\n        <source>Automatically insert breakpoint main.main when debugging</source>\n        <oldsource>Automatically add breakpoint main.main when debugging</oldsource>\n        <translation>Hata ayıklamada main için otomatik olarak breakpoint yerleştir</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebugPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugplugin.cpp\" line=\"58\"/>\n        <source>Debug Window</source>\n        <oldsource>Debug</oldsource>\n        <translation>Hata Ayıklama Penceresi</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDoc</name>\n    <message>\n        <location filename=\"src/plugins/welcome/litedoc.cpp\" line=\"64\"/>\n        <source>LiteIDE Documentation</source>\n        <oldsource>LiteIDE Document Browser</oldsource>\n        <translation>LiteIDE Dökümantasyonu</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditor</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"254\"/>\n        <source>Undo</source>\n        <translation>Geri al</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"257\"/>\n        <source>Redo</source>\n        <translation>Yinele</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"260\"/>\n        <source>Cut</source>\n        <translation>Kes</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"263\"/>\n        <source>Copy</source>\n        <translation>Kplyala</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"266\"/>\n        <source>Paste</source>\n        <translation>Yapıştır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"268\"/>\n        <source>Select All</source>\n        <translation>Tümünü Seç</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"301\"/>\n        <source>Go to Doc Start</source>\n        <translation>Döküman Başına Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"305\"/>\n        <source>Go to Doc End</source>\n        <translation>Döküman Sonuna Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"309\"/>\n        <source>Go to Line Start</source>\n        <translation>Satır Başına Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"313\"/>\n        <source>Go to Line End</source>\n        <translation>Satırın Sonuna Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"317\"/>\n        <source>Go to Previous Line</source>\n        <translation>Önceki Satıra Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"321\"/>\n        <source>Go to Next Line</source>\n        <translation>Sonraki Satır Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"325\"/>\n        <source>Go to Previous Character</source>\n        <translation>Önceki Karaktere Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"329\"/>\n        <source>Go to Next Charater</source>\n        <translation>Sonraki Karaktere Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"333\"/>\n        <source>Go to Previous Word</source>\n        <translation>Önceki Kelimeye Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"337\"/>\n        <source>Go to Next Word</source>\n        <translation>Sonraki Kelimeye Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"358\"/>\n        <source>Go to Line</source>\n        <translation>Satır Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"361\"/>\n        <source>File is readonly</source>\n        <translation>Dosya Saltokunur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"364\"/>\n        <source>File is writable</source>\n        <translation>Dosya Yazılabilir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"404\"/>\n        <source>Line Wrap (MimeType)</source>\n        <oldsource>Word Wrap (MimeType)</oldsource>\n        <translation>Satır Kaydırma (Mime Türü)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"415\"/>\n        <source>Toggle Comment</source>\n        <translation>Yorumu Aç / Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"418\"/>\n        <source>Toggle Block Commnet</source>\n        <translation>Blok Yorumunu Aç / Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"421\"/>\n        <source>Auto-indent Selection</source>\n        <translation>Otomatik girinti Seçimi</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"425\"/>\n        <source>Tab To Spaces (MimeType)</source>\n        <translation>Boşluklara Sekme (Mime Türü)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"429\"/>\n        <source>Line End Windows (\\r\\n)</source>\n        <translation>Satır Sonu Windows (\\r\\n)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"433\"/>\n        <source>Line End Unix (\\n)</source>\n        <translation>Satır Sonu Unix (\\n)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"437\"/>\n        <source>Visualize Whitespace (Global)</source>\n        <translation>Beyaz Alanı Görselleştir (Global)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"444\"/>\n        <source>Move Line Up</source>\n        <translation>Satırı Yukarı Taşı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"447\"/>\n        <source>Move Line Down</source>\n        <translation>Satırı Aşağı Taşı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"450\"/>\n        <source>Copy Line Up</source>\n        <translation>Satırı Yukarı Kopyala</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"453\"/>\n        <source>Copy Line Down</source>\n        <translation>Satırı Aşağı Kopyala</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"456\"/>\n        <source>Join Lines</source>\n        <translation>Satırları Birleştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"459\"/>\n        <source>Title Case</source>\n        <translation>Baş Harfler</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"463\"/>\n        <source>Upper Case</source>\n        <translation>Büyük Harfler</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"467\"/>\n        <source>Lower Case</source>\n        <translation>Küçük Harfler</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"471\"/>\n        <source>Swap Case</source>\n        <translation>Kılıf Takası</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"475\"/>\n        <source>Tab To Spaces</source>\n        <translation>Boşluklu Sekme</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"479\"/>\n        <source>Spaces To Tab</source>\n        <translation>Tab boşlokları</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"645\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"733\"/>\n        <source>Advanced</source>\n        <translation>Gelişmiş</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"671\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"751\"/>\n        <source>Goto</source>\n        <translation>Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"696\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"774\"/>\n        <source>Convert Tab</source>\n        <translation>Tab Dönüştürme</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"700\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"778\"/>\n        <source>Code Folding</source>\n        <translation>Kodu Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"690\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"768\"/>\n        <source>Convert Case</source>\n        <translation>Karakter Dönüştürme</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1199\"/>\n        <source>Export HTML</source>\n        <translation>HTML Dışa Aktar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1207\"/>\n        <source>Export Failed</source>\n        <translation>Dışarı Aktarılamadı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1208\"/>\n        <source>Could not open %1 for writing.</source>\n        <translation>%1 yazmak için açılamadı.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1227\"/>\n        <source>Export PDF</source>\n        <translation>PDF Dışa Aktar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1252\"/>\n        <source>Print Document</source>\n        <translation>Dosya Yazdır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"286\"/>\n        <source>Print Preview...</source>\n        <oldsource>Print Preview Document</oldsource>\n        <translation>Baskı-Önizleme...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"282\"/>\n        <source>Export HTML...</source>\n        <translation>HTML Dışa AktarL...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"284\"/>\n        <source>Export PDF...</source>\n        <translation>PDF Dışa Aktar...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"285\"/>\n        <source>Print...</source>\n        <translation>Yazdır...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"288\"/>\n        <source>Go to Previous Block</source>\n        <oldsource>Go To Previous Block</oldsource>\n        <translation>Önceki Bloğa Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"295\"/>\n        <source>Select Block</source>\n        <translation>Blok Seç</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"298\"/>\n        <source>Go to Matching Brace</source>\n        <oldsource>Go To Matching Brace</oldsource>\n        <translation>Eşleşen Ayraç&apos;a git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"341\"/>\n        <source>Fold</source>\n        <translation>Kapa</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"344\"/>\n        <source>Unfold</source>\n        <translation>Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"347\"/>\n        <source>Fold All</source>\n        <translation>Tümünü Kapa</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"350\"/>\n        <source>Unfold All</source>\n        <translation>Tümünü Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1327\"/>\n        <source>Go To Line</source>\n        <oldsource>Goto Line</oldsource>\n        <translation>Satıra Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"368\"/>\n        <source>Duplicate</source>\n        <translation>Kopya Oluştur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"372\"/>\n        <source>Delete Line</source>\n        <translation>Satır Sil</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"376\"/>\n        <source>Copy Line</source>\n        <translation>Satır Koplaya</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"380\"/>\n        <source>Cut Line</source>\n        <translation>Satırı Kes</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"384\"/>\n        <source>Insert Line Before</source>\n        <translation>Önüne Çizgi Ekle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"388\"/>\n        <source>Insert Line After</source>\n        <translation>Arkasına Çizgi Ekle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"392\"/>\n        <source>Increase Font Size</source>\n        <translation>Yazı Tipi Boyutunu Arttır</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"395\"/>\n        <source>Decrease Font Size</source>\n        <translation>Yazı Tipi Boyutunu Küçült</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"398\"/>\n        <source>Reset Font Size</source>\n        <translation>Yazı Tipi Boyutunu Sıfırla</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"401\"/>\n        <source>Clean Whitespace</source>\n        <translation>Boşlukları temizle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"408\"/>\n        <source>Code Complete</source>\n        <translation>Kod Tamamlandı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"706\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"784\"/>\n        <source>Settings</source>\n        <oldsource>File Setup</oldsource>\n        <translation>Ayarlar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"892\"/>\n        <source>Reload File</source>\n        <translation>Dosyayı Tekrar Yükle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1269\"/>\n        <source>Do you want to permanently discard unsaved modifications and reload %1?</source>\n        <translation>Kaydedilmemiş değişiklikleri kalıcı olarak silmek ve%1&apos;i yeniden yüklemek istiyor musunuz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"291\"/>\n        <source>Go to Next Block</source>\n        <oldsource>Go To Next Block</oldsource>\n        <translation>Sonraki Bloğa Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1301\"/>\n        <source>ReadOnly</source>\n        <translation>SaltOkunur</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1327\"/>\n        <source>Line: </source>\n        <translation>Satır: </translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorFileFactory</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorfilefactory.cpp\" line=\"203\"/>\n        <source>Text Editor</source>\n        <translation>Metin Düzenleyici</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorOption</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"408\"/>\n        <source>Load File</source>\n        <translation>Dosyayı Yükle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"414\"/>\n        <source>Check and convert no printable char to &apos;.&apos;</source>\n        <translation>Yazdırılamayan karakteri kontrol edin ve &quot;.&quot; yap</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"30\"/>\n        <source>Font</source>\n        <translation>Font</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"24\"/>\n        <source>Font &amp;&amp; Colors</source>\n        <translation>Font &amp;&amp; Renkler</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"38\"/>\n        <source>Family:</source>\n        <translation>Küme:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"48\"/>\n        <source>Show Monospace Font</source>\n        <translation>Tek Aralıklı Yazı Tipini Göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"72\"/>\n        <source>Size:</source>\n        <translation>Büyüklük:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"92\"/>\n        <source>Zoom:</source>\n        <translation>Zoom:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"99\"/>\n        <source>%</source>\n        <translation>%</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"118\"/>\n        <source>Antialias</source>\n        <translation>Antialias</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"138\"/>\n        <source>Restore Default Font</source>\n        <translation>Varsayılan Yazı Tipini Geri Yükle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"150\"/>\n        <source>Editor Color Scheme</source>\n        <oldsource>ColorStyle Scheme</oldsource>\n        <translation>Editörün Renk Şeması</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"158\"/>\n        <source>File:</source>\n        <translation>Dosya:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"175\"/>\n        <source>Edit</source>\n        <translation>Düzenle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"220\"/>\n        <source>Syntax Auto-completion</source>\n        <oldsource>Auto complete brackets</oldsource>\n        <translation>Sözdizimi Otomatik Tamamlama</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"302\"/>\n        <source>Fuzzy code completion</source>\n        <translation>Belirsiz kod tamamlama</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"350\"/>\n        <source>Clean completion cache when saving files</source>\n        <translation>Dosyaları kaydederken tamamlama önbelleğini temizleyin</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"357\"/>\n        <source>Clean whitespace when saving files</source>\n        <translation>Dosyaları kaydederken boşlukları temizleyin</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"364\"/>\n        <source>Enable scroll wheel zooming</source>\n        <translation>Kaydırma tekerleği ile yakınlaştırmayi etkinleştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"371\"/>\n        <source>Add copied text into the clipboard as HTML</source>\n        <translation>Kopyalanan metni panoya HTML olarak ekle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"378\"/>\n        <source>Allow vertical scrolling to the last line [*]</source>\n        <translation>Son satıra [*] dikey kaydırmaya izin ver</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"437\"/>\n        <source>Display VisualizeWhitespace</source>\n        <translation>Beyaz Alanı Görselleştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"451\"/>\n        <source>Word wrap by default</source>\n        <translation>Varsayılan olarak kelime kaydırma</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"430\"/>\n        <source>Display code fold</source>\n        <translation>Kod katlamalarını göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"509\"/>\n        <source>Display offset position</source>\n        <translation>Ofset konumunu göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"533\"/>\n        <source>File Types</source>\n        <translation>Dosya Türleri</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"214\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"289\"/>\n        <source>Behavior</source>\n        <translation>Davranışı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"444\"/>\n        <source>Display EOF</source>\n        <translation>Dosyasonunu (EOF) göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"458\"/>\n        <source>Display line numbers</source>\n        <translation>Satır numaralarını göster</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"465\"/>\n        <source>Display indent guide</source>\n        <oldsource>Display indent guide </oldsource>\n        <translation>Girinti kılavuzunu görüntüle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"474\"/>\n        <source>Display right margin at column</source>\n        <translation>Sütunda sağ kenar boşluğunu görüntüle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"295\"/>\n        <source>Automatic indentation</source>\n        <oldsource>Enable automatic indentation</oldsource>\n        <translation>Otomatik girinti</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"309\"/>\n        <source>Case sensitive code completion</source>\n        <oldsource>Completer case sensitive</oldsource>\n        <translation>Büyük / küçük harfe duyarlı kod tamamlama</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"318\"/>\n        <source>Code completion prefix length:</source>\n        <oldsource>Word Complete Prefix Length</oldsource>\n        <translation>Kod tamamlama önek uzunluğu:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"402\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"424\"/>\n        <source>Display</source>\n        <translation>Görüntüleme</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"74\"/>\n        <source>MIME Type</source>\n        <translation>MIME Türü</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"75\"/>\n        <source>Tab Width</source>\n        <translation>Tab-Genişliği</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"76\"/>\n        <source>Tab To Spaces</source>\n        <translation>Sekmeleri boşluk işaretine dönüştür</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"78\"/>\n        <source>File Extensions</source>\n        <translation>Dosya Uzantıları</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"77\"/>\n        <source>Custom Extensions</source>\n        <translation>Özel Uzantılar</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorPlugin</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorplugin.cpp\" line=\"71\"/>\n        <source>Edit ToolBar</source>\n        <translation>Araç Çubuğunu Düzenle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorplugin.cpp\" line=\"77\"/>\n        <source>Edit Navigation Bar</source>\n        <translation>Gezinme Çubuğunu Düzenle</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEnvOption</name>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"20\"/>\n        <source>Environment definition files:</source>\n        <translation>Ortam değişkeni tanımlama dosyası:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"33\"/>\n        <source>Environment changes will take effect after switching environments.</source>\n        <translation>Ortam değişkenleri değişikliği, ortam değiştirildikten sonra etkili olacaktır.</translation>\n    </message>\n</context>\n<context>\n    <name>LiteFindPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"72\"/>\n        <source>Find</source>\n        <translation>Ara</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"75\"/>\n        <source>Find Next</source>\n        <translation>Sonrakini Ara</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"78\"/>\n        <source>Find Previous</source>\n        <translation>Öncekini Ara</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"81\"/>\n        <source>Replace</source>\n        <translation>Değiştir</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"87\"/>\n        <source>File Search</source>\n        <translation>Dosya Ara</translation>\n    </message>\n</context>\n<context>\n    <name>LiteTabWidget</name>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"62\"/>\n        <source>Open a new tab</source>\n        <translation>Yeni tab aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"65\"/>\n        <source>List All Tabs</source>\n        <translation>Bütün Tabları Listele</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"71\"/>\n        <source>Close Tab</source>\n        <translation>Tabı Kapat</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownBatchBrowser</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"143\"/>\n        <source>Markdown Exporter</source>\n        <oldsource>Markdown Batch</oldsource>\n        <translation>Markdown Aktarıcı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"163\"/>\n        <source>All Files (*)</source>\n        <translation>Tüm Dosyalar (*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"232\"/>\n        <source>Select the folder containing your markdown files:</source>\n        <oldsource>Select Markdown Folder</oldsource>\n        <translation>Markdown dosyalarınızı içeren klasörü seçin:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"243\"/>\n        <source>Select Markdown Files</source>\n        <translation>Markdown dosyalarınız seçin</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"291\"/>\n        <source>Select the folder to contain separated markdown exports:</source>\n        <translation>Markdown aktarımlarını içeren klasörü seçin:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"304\"/>\n        <source>Export Merged HTML</source>\n        <oldsource>Export Html</oldsource>\n        <translation>Birleştirilmiş HTML Dışa Aktar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"379\"/>\n        <source>Export Merged PDF</source>\n        <oldsource>Export PDF</oldsource>\n        <translation>Birleştirilmiş PDF Dışa Aktar</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownBatchWidget</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"20\"/>\n        <source>Markdown Source Files</source>\n        <oldsource>Markdown Files</oldsource>\n        <translation>Kaynak Dosyayı İşaretleyin</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"38\"/>\n        <source>Import Folder...</source>\n        <oldsource>Import Folder</oldsource>\n        <translation>Klasörü İçe Aktar...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"45\"/>\n        <source>Add Files...</source>\n        <oldsource>Add Files</oldsource>\n        <translation>Dosyaları Ekleyin...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"52\"/>\n        <source>Move Up</source>\n        <translation>Yukarı Taşı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"59\"/>\n        <source>Move Down</source>\n        <translation>Aşağı Taşı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"66\"/>\n        <source>Remove</source>\n        <translation>Sil</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"73\"/>\n        <source>Remove All</source>\n        <translation>Tümünü Sil</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"98\"/>\n        <source>Options</source>\n        <translation>Ayarlar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"106\"/>\n        <source>Export Folder:</source>\n        <translation>Klasörü Dışa Aktar:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"116\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>Araştır...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"127\"/>\n        <source>Use CSS</source>\n        <translation>CSS Kullan</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"137\"/>\n        <source>Insert horizontal line between merged files</source>\n        <oldsource>Merge files insert split &lt;hr&gt;</oldsource>\n        <translation>Birleştirilmiş dosyaların drasında çizgi ekle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"144\"/>\n        <source>Insert page break between merged files</source>\n        <oldsource>Merge files insert page break</oldsource>\n        <translation>Birleştirilmiş dosyaların arasında ayıraç ekle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"169\"/>\n        <source>Export</source>\n        <oldsource>Export Util</oldsource>\n        <translation>Dışa Aktar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"175\"/>\n        <source>Export Separated HTML</source>\n        <oldsource>Separate Html</oldsource>\n        <translation>HTML Dışa Aktar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"182\"/>\n        <source>Export Separated PDF</source>\n        <oldsource>Separate PDF</oldsource>\n        <translation>PDF Dışa Aktar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"189\"/>\n        <source>Export Merged HTML...</source>\n        <oldsource>Merge Html</oldsource>\n        <translation>HTML birleştirlenleri aktar...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"196\"/>\n        <source>Export Merged PDF...</source>\n        <oldsource>Merge PDF</oldsource>\n        <translation>PDF birleştirilenleri aktar...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"203\"/>\n        <source>Print Preview Merged...</source>\n        <oldsource>Merge Print Preview</oldsource>\n        <translation>Önizleme (birleştirilmiş.)...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"210\"/>\n        <source>Print Merged</source>\n        <oldsource>Merge Print</oldsource>\n        <translation>Yazdır (birleştirlilmiş.)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"233\"/>\n        <source>Log</source>\n        <translation>Log</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownEdit</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"83\"/>\n        <source>Header (h1)</source>\n        <oldsource>Header &lt;h1&gt;</oldsource>\n        <translation>Başlık (h1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"86\"/>\n        <source>Header (h2)</source>\n        <oldsource>Header &lt;h2&gt;</oldsource>\n        <translation>Başlık (h2)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"89\"/>\n        <source>Header (h3)</source>\n        <oldsource>Header &lt;h3&gt;</oldsource>\n        <translation>Başlık (h3)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"92\"/>\n        <source>Header (h4)</source>\n        <oldsource>Header &lt;h4&gt;</oldsource>\n        <translation>Başlık (h4)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"95\"/>\n        <source>Header (h5)</source>\n        <oldsource>Header &lt;h5&gt;</oldsource>\n        <translation>Başlık (h5)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"98\"/>\n        <source>Header (h6)</source>\n        <oldsource>Header &lt;h6&gt;</oldsource>\n        <translation>Başlık (h6)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"101\"/>\n        <source>Bold</source>\n        <translation>Kalın</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"104\"/>\n        <source>Italic</source>\n        <translation>İtalik</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"107\"/>\n        <source>Inline Code</source>\n        <translation>Çizili</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"110\"/>\n        <source>Link</source>\n        <translation>Bağlantı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"113\"/>\n        <source>Image</source>\n        <translation>Resim</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"116\"/>\n        <source>Unordered List</source>\n        <translation>Sırasız liste</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"119\"/>\n        <source>Ordered List</source>\n        <translation>Sıralı Liste</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"122\"/>\n        <source>Blockquote</source>\n        <translation>Blockquote</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"125\"/>\n        <source>Horizontal Rule</source>\n        <translation>Yatay Ayıraç</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"131\"/>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"154\"/>\n        <source>Heading</source>\n        <translation>Başlık</translation>\n    </message>\n</context>\n<context>\n    <name>MultiFolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"289\"/>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"296\"/>\n        <source>Delete Folder</source>\n        <translation>Klasör Sil</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"290\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Bu klasörü ve tüm içeriğini kalıcı olarak silmek istediğinizden emin misiniz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"297\"/>\n        <source>Failed to delete the folder!</source>\n        <translation>Klasör Silinemedi!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"310\"/>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"317\"/>\n        <source>Delete File</source>\n        <translation>Dosya Sil</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"311\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Bu dosyayı kalıcı olarak silmek istediğinizden emin misiniz?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"318\"/>\n        <source>Failed to delete the file!</source>\n        <translation>Dosya Silinemedi!</translation>\n    </message>\n</context>\n<context>\n    <name>NavigateBar</name>\n    <message>\n        <location filename=\"src/utils/navigate/navigate.cpp\" line=\"146\"/>\n        <location filename=\"src/utils/navigate/navigate.cpp\" line=\"169\"/>\n        <source>Browser Files in %1</source>\n        <translation>%1&apos;deki Dosyalar</translation>\n    </message>\n</context>\n<context>\n    <name>NewFileDialog</name>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"14\"/>\n        <source>New Project or File</source>\n        <translation>Yeni Proje veya Dosya</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"124\"/>\n        <source>Browse...</source>\n        <translation>Araştır...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"24\"/>\n        <source>GOPATH:</source>\n        <translation>GOPATH:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"38\"/>\n        <source>Template:</source>\n        <oldsource>Template</oldsource>\n        <translation>Taslak:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"54\"/>\n        <source>Type</source>\n        <translation>Tür</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"73\"/>\n        <source>Information</source>\n        <translation>Bilgi</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"87\"/>\n        <source>Name:</source>\n        <translation>İsim:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"114\"/>\n        <source>Location:</source>\n        <translation>Lokasyon:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"126\"/>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"184\"/>\n        <source>Error</source>\n        <translation>Hata</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"126\"/>\n        <source>Could not create the target directory: %1</source>\n        <translation>Hedef dizin oluşturulamadı:%1</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"131\"/>\n        <source>Warning</source>\n        <translation>Uyarı</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"131\"/>\n        <source>Location %1 is not empty.\nUse the target directory anyway?</source>\n        <translation>%1 konumu boş değil.\nYine de hedef dizini kullanılsın mı?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"168\"/>\n        <source>Overwrite File</source>\n        <translation>Dosyanın üzerine yaz</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"168\"/>\n        <source>%1 already exists.\nDo you want to replace it?</source>\n        <translation>%1 zaten var.\nDeğiştirmek istiyor musun?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"184\"/>\n        <source>No files could be created.</source>\n        <translation>Dosyalar oluşturulamadı.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"279\"/>\n        <source>File template details:</source>\n        <translation>Dosya taslak ayrıntıları:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"281\"/>\n        <source>Project template details:</source>\n        <oldsource>New project wizard:</oldsource>\n        <translation>Proje taslak ayrıntıları:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"361\"/>\n        <source>Choose a directory for the new content:</source>\n        <translation>Yeni içerik için klasör seçin:</translation>\n    </message>\n</context>\n<context>\n    <name>OpenEditorsWidget</name>\n    <message>\n        <location filename=\"src/liteapp/openeditorswidget.cpp\" line=\"43\"/>\n        <source>Open Documents</source>\n        <translation>Dökümanları Aç</translation>\n    </message>\n</context>\n<context>\n    <name>OptionsBrowser</name>\n    <message>\n        <location filename=\"src/liteapp/optionsbrowser.cpp\" line=\"57\"/>\n        <source>Options</source>\n        <oldsource>Options Page</oldsource>\n        <translation>Ayarlar</translation>\n    </message>\n</context>\n<context>\n    <name>OptionsWidget</name>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"14\"/>\n        <source>Options</source>\n        <translation>Ayarlar</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"56\"/>\n        <source>Info</source>\n        <translation>Bilgi</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"106\"/>\n        <source>[*] item request restart of LiteIDE</source>\n        <oldsource>[*] item requeset restart LiteIDE</oldsource>\n        <translation>[*] LiteIDE&apos;nin yeniden başlatılması gerekir</translation>\n    </message>\n</context>\n<context>\n    <name>OutputDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"444\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"472\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"473\"/>\n        <source>Move To</source>\n        <translation>Buraya Taşı</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"446\"/>\n        <source>LeftSideBar</source>\n        <translation>Sol Araç Çubuğı</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"447\"/>\n        <source>RightSideBar</source>\n        <translation>Sağ Araç Çubuğı</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"480\"/>\n        <source>BottomDockWidget</source>\n        <translation>Alt İskelet Widget&apos;ı</translation>\n    </message>\n</context>\n<context>\n    <name>OutputOption</name>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"20\"/>\n        <source>Font</source>\n        <translation>Font</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"26\"/>\n        <source>Family:</source>\n        <translation>Küme:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"43\"/>\n        <source>Size:</source>\n        <translation>Boyut:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"60\"/>\n        <source>Zoom:</source>\n        <translation>Zoom:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"67\"/>\n        <source>%</source>\n        <translation>%</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"86\"/>\n        <source>Antialias</source>\n        <translation>Antialias</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"109\"/>\n        <source>Display</source>\n        <translation>Ekran</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"115\"/>\n        <source>Use editor color scheme</source>\n        <translation>Düzenleyici renk şemasını kullan</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"124\"/>\n        <source>Sets the maximum number of lines</source>\n        <translation>Maksimum satır sayısı</translation>\n    </message>\n</context>\n<context>\n    <name>PackageBrowser</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"87\"/>\n        <source>Manage GOPATH/Modules ...</source>\n        <oldsource>Manage GOPATH...</oldsource>\n        <translation>GOPATH modülleri düzenle...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"86\"/>\n        <source>Reload All</source>\n        <translation>Hepsini Yenile</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"93\"/>\n        <source>Use godoc View</source>\n        <translation>Godoc görüntüleyici kullan</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"94\"/>\n        <source>Load Package in New Window</source>\n        <translation>Paketi yeni pencerede yükle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"95\"/>\n        <source>Add Package to Folders</source>\n        <translation>Paketi klasöre ekle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"96\"/>\n        <source>Open Source File</source>\n        <translation>Kaynak Dosyası Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"97\"/>\n        <source>Copy Name to Clipboard</source>\n        <oldsource>Copy Name To Clipboard</oldsource>\n        <translation>Adı Panoya Kopyala</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"119\"/>\n        <source>Go Package Browser</source>\n        <oldsource>Package Browser</oldsource>\n        <translation>Go Paket Gezgini</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"208\"/>\n        <source>Loading Go package list...</source>\n        <oldsource>Loading go package ...</oldsource>\n        <translation>Go Paket listesini yükle...</translation>\n    </message>\n</context>\n<context>\n    <name>PackageProject</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"76\"/>\n        <source>Reload Package</source>\n        <translation>Paketleri Yeniden Yükle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"77\"/>\n        <source>Open Explorer Here</source>\n        <translation>Explorer&apos;i Burada Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"78\"/>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"299\"/>\n        <source>Add Source File</source>\n        <translation>Kaynak Dosyası Ekle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"299\"/>\n        <source>File Name:</source>\n        <translation>Dosya Adı:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"310\"/>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"315\"/>\n        <source>Error</source>\n        <translation>Hata</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"310\"/>\n        <source>File %1 already exists.</source>\n        <translation>%1 dosyası zaten var.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"315\"/>\n        <source>Could not open %1 for writing.</source>\n        <translation>%1 yazma için açılamadı.</translation>\n    </message>\n</context>\n<context>\n    <name>PluginsDialog</name>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.ui\" line=\"14\"/>\n        <source>Installed Plugins</source>\n        <oldsource>Install Plugins</oldsource>\n        <translation>Yüklü Eklentiler</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.ui\" line=\"45\"/>\n        <source>Close</source>\n        <translation>Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"51\"/>\n        <source>Name</source>\n        <translation>Adı</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"54\"/>\n        <source>Author</source>\n        <translation>Geliştirici</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"52\"/>\n        <source>Enabled</source>\n        <translation>Aktif</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"53\"/>\n        <source>Details</source>\n        <translation>Ayrıntılar</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"55\"/>\n        <source>Version</source>\n        <oldsource>Last Ver</oldsource>\n        <translation>Versiyon</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"56\"/>\n        <source>File Name</source>\n        <oldsource>FileName</oldsource>\n        <translation>Dosya Adı</translation>\n    </message>\n</context>\n<context>\n    <name>ProcessEx</name>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"52\"/>\n        <source>process exited with code %1</source>\n        <translation>İşlem %1 koduya kapandı</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"55\"/>\n        <source>process crashed or was terminated</source>\n        <translation>işlem çöktü veya sonlandırıldı</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"58\"/>\n        <source>process exited with an unknown status</source>\n        <translation>bilinmeyen bir durumla işlemden çıkıldı</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"68\"/>\n        <source>process failed to start</source>\n        <translation>işlem başlatılamadı</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"71\"/>\n        <source>process crashed or was terminated while running</source>\n        <translation>işlem çalışırken çöktü veya sonlandırıldı</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"74\"/>\n        <source>timed out waiting for process</source>\n        <translation>işlem beklerken zaman aşımına uğradı</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"77\"/>\n        <source>couldn&apos;t read from the process</source>\n        <translation>süreç okunamadı</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"80\"/>\n        <source>couldn&apos;t write to the process</source>\n        <translation>sürece yazılamadı</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"84\"/>\n        <source>an unknown error occurred</source>\n        <translation>bilinmeyen bir hata oluştu</translation>\n    </message>\n</context>\n<context>\n    <name>ProjectManager</name>\n    <message>\n        <location filename=\"src/liteapp/projectmanager.cpp\" line=\"95\"/>\n        <source>Project &lt;%1&gt;</source>\n        <translation>Proje  &lt;%1&gt;</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/projectmanager.cpp\" line=\"119\"/>\n        <source>Import Directory &lt;%1&gt;</source>\n        <translation>&lt;%1&gt; Klasörü İçe Aktar</translation>\n    </message>\n</context>\n<context>\n    <name>QFileSystemModel</name>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"46\"/>\n        <source>%1 TB</source>\n        <translation>%1 TB</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"48\"/>\n        <source>%1 GB</source>\n        <translation>%1 GB</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"50\"/>\n        <source>%1 MB</source>\n        <translation>%1 MB</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"52\"/>\n        <source>%1 KB</source>\n        <translation>%1 KB</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"53\"/>\n        <source>%1 bytes</source>\n        <translation>%1 byte</translation>\n    </message>\n</context>\n<context>\n    <name>QJson::ParserRunnable</name>\n    <message>\n        <location filename=\"src/3rdparty/qjson/src/parserrunnable.cpp\" line=\"64\"/>\n        <source>An error occurred while parsing json: %1</source>\n        <translation>%1 Json ayrıştırılırken bir hata oluştu</translation>\n    </message>\n</context>\n<context>\n    <name>QJsonParseError</name>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"59\"/>\n        <source>no error occurred</source>\n        <translation>hata oluşmadı</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"60\"/>\n        <source>unterminated object</source>\n        <translation>sonlandırılmamış nesne</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"61\"/>\n        <source>missing name separator</source>\n        <translation>isim ayırıcısı eksik</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"62\"/>\n        <source>unterminated array</source>\n        <translation>sonlandırılmamış dizi</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"63\"/>\n        <source>missing value separator</source>\n        <translation>değer ayırıcısı eksik</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"64\"/>\n        <source>illegal value</source>\n        <translation>geçersiz değer</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"65\"/>\n        <source>invalid termination by number</source>\n        <translation>geçersiz sonlandırma numarası</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"66\"/>\n        <source>illegal number</source>\n        <translation>geçersiz numara</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"67\"/>\n        <source>invalid escape sequence</source>\n        <translation>geçersiz kaçış dizisi</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"68\"/>\n        <source>invalid UTF8 string</source>\n        <translation>geçersiz UTF-8 karakteri</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"69\"/>\n        <source>unterminated string</source>\n        <translation>sonlandırılmamış dize</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"70\"/>\n        <source>object is missing after a comma</source>\n        <translation>virgülden sonra nesne eksik</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"71\"/>\n        <source>too deeply nested document</source>\n        <translation>çok derin iç içe geçmiş belge</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"72\"/>\n        <source>too large document</source>\n        <translation>çok büyük belge</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"73\"/>\n        <source>garbage at the end of the document</source>\n        <translation>belgenin sonunda çöp</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenAction</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenaction.cpp\" line=\"59\"/>\n        <source>Show and Run Commands</source>\n        <translation>Komutları Göster ve Çalıştır</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenEditor</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopeneditor.cpp\" line=\"56\"/>\n        <source>Show All Opened Editors</source>\n        <oldsource>Show All Editors</oldsource>\n        <translation>Tüm Açılmış Düzenleyicileri Göster</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFileSystem</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfilesystem.cpp\" line=\"156\"/>\n        <source>File System</source>\n        <translation>Dosya Sistemi</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFiles</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfiles.cpp\" line=\"72\"/>\n        <source>Go to File</source>\n        <translation>Dosyaya Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfiles.cpp\" line=\"77\"/>\n        <source>Type &apos;?&apos; to get help on the actions you can take from here</source>\n        <translation>Burada yapabileceklerinizle ilgili yardım almak için &quot;?&quot; yazın</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFolder</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfolder.cpp\" line=\"71\"/>\n        <source>Browser Folder</source>\n        <translation>Tarayıcı Klasörü</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenHelp</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenhelp.cpp\" line=\"49\"/>\n        <source>Show All Quick Open Actions</source>\n        <oldsource>Show Quick Open Help</oldsource>\n        <translation>Tüm Hızlı Açılış İşlemlerini Göster</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenLines</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"51\"/>\n        <source>Go to Line</source>\n        <translation>Satır Git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"79\"/>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"84\"/>\n        <source>Open a text file first to go to a line</source>\n        <translation>Bir satıra gitmek için önce bir metin dosyası açın</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"97\"/>\n        <source>Type a line number between %1 and %2 to navigate to</source>\n        <translation>Gitmek için%1 ile%2 arasında bir satır numarası yazın</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"100\"/>\n        <source>Go to Line %1</source>\n        <oldsource>Go to line %1</oldsource>\n        <translation>%1 No&apos;lu Satıra Git</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenManager</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"82\"/>\n        <source>Quick Open File</source>\n        <translation>Hızlı Dosya Açma</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"83\"/>\n        <source>Quick Open Editor</source>\n        <translation>Hızlı Editör Açma</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"84\"/>\n        <source>Quick Open Symbol</source>\n        <translation>Hızlı Sembol Açma</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"85\"/>\n        <source>Quick Open Command</source>\n        <translation>Hızlı Komut Açma</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"86\"/>\n        <source>Show All Quick Open Actions</source>\n        <translation>Tüm Hızlı Açmaları Göster</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenMimeType</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmimetype.cpp\" line=\"41\"/>\n        <source>Go to Symbol in File</source>\n        <oldsource>Open Symbol by Name</oldsource>\n        <translation>Dosyadaki sembole git</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmimetype.cpp\" line=\"42\"/>\n        <source>not found symbol</source>\n        <translation>sembol bulunamadı</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenOption</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Form</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"20\"/>\n        <source>QuickOpenFiles</source>\n        <translation>Hızlı Dosya Açma</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"26\"/>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"79\"/>\n        <source>Match case sensitive</source>\n        <translation>Büyük / küçük harfe duyarlı</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"35\"/>\n        <source>Max files count:</source>\n        <translation>En Fazla Dosya Sayısı:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"73\"/>\n        <source>QuickOpenEditor</source>\n        <translation>Hızlı Açma Düzeni</translation>\n    </message>\n</context>\n<context>\n    <name>RecentManager</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.cpp\" line=\"54\"/>\n        <source>Clear All History</source>\n        <translation>Tüm Geçmişi Temizle</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.cpp\" line=\"169\"/>\n        <source>Clear Menu</source>\n        <translation>Menüyü Temizle</translation>\n    </message>\n</context>\n<context>\n    <name>SearchEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"83\"/>\n        <source>Search</source>\n        <translation>Ara</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"84\"/>\n        <source>Stop Search</source>\n        <translation>Aramayı Durdur</translation>\n    </message>\n</context>\n<context>\n    <name>SelectExternalDialog</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"14\"/>\n        <source>Debug External Application</source>\n        <translation>Harici Uygulamada Hata Ayıklama</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"22\"/>\n        <source>Application:</source>\n        <translation>Uygulama:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"29\"/>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"56\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>Araştır...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"36\"/>\n        <source>Arguments:</source>\n        <translation>Argümanlar:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"46\"/>\n        <source>Working directory:</source>\n        <translation>Çalışma Klasörü:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.cpp\" line=\"82\"/>\n        <source>Select Executable</source>\n        <translation>Uygulama Seçin</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.cpp\" line=\"92\"/>\n        <source>Select the working directory:</source>\n        <oldsource>Select Working Directory</oldsource>\n        <translation>Çalışma klasörü seçimi:</translation>\n    </message>\n</context>\n<context>\n    <name>SessionRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"197\"/>\n        <source>Sessions</source>\n        <translation>Oturumlar</translation>\n    </message>\n</context>\n<context>\n    <name>SideDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"50\"/>\n        <source>Move To</source>\n        <translation>.. ya taşı</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"54\"/>\n        <source>RightSideBar</source>\n        <translation>Sağ Taraf Paneli</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"56\"/>\n        <source>LeftDockWidgt</source>\n        <translation>Sol Panel Aracı</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"58\"/>\n        <source>LeftSideBar</source>\n        <translation>Sol Taraf Panel</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"60\"/>\n        <source>RightDockWidget</source>\n        <translation>Sağ Panel Aracı</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"63\"/>\n        <source>OutputBar</source>\n        <translation>Çıkış Panel</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"75\"/>\n        <source>SideBar</source>\n        <translation>Panel</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"76\"/>\n        <source>Show SideBar</source>\n        <translation>Paneli Göster</translation>\n    </message>\n</context>\n<context>\n    <name>SideWindowStyle</name>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"547\"/>\n        <source>Hide SideBar</source>\n        <translation>Yan Çubuğu Gizle</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"585\"/>\n        <source>SideBar Windows</source>\n        <translation>Yan Çubuk Penceresi</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"586\"/>\n        <source>Output Windows</source>\n        <translation>Çıktı Penceresi</translation>\n    </message>\n</context>\n<context>\n    <name>SplitDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"300\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"379\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"380\"/>\n        <source>Move To</source>\n        <translation>..ya taşı</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"302\"/>\n        <source>Top</source>\n        <translation>Üst</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"306\"/>\n        <source>Top (Split)</source>\n        <translation>Üst (bölünmüş)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"343\"/>\n        <source>TopDockWidget (Split)</source>\n        <translation>Üst Panel Aracı (bölünmüş)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"343\"/>\n        <source>TopDockWidget</source>\n        <translation>Üst Panel Aracı</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"312\"/>\n        <source>Bottom</source>\n        <translation>Alt</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"316\"/>\n        <source>Bottom (Split)</source>\n        <translation>Alt (bölünmüş)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"345\"/>\n        <source>BottomDockWidget (Split)</source>\n        <translation>Alt Panel Aracı (bölünmüş)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"345\"/>\n        <source>BottomDockWidget</source>\n        <translation>Alt Panel Aracı</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"322\"/>\n        <source>Left</source>\n        <translation>Sol</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"326\"/>\n        <source>Left (Split)</source>\n        <translation>Sol (bölünmüş)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"347\"/>\n        <source>LeftDockWidget (Split)</source>\n        <translation>Sol Panel Aracı (bölünmüş)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"347\"/>\n        <source>LeftDockWidget</source>\n        <translation>Sol Panel Aracı</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"332\"/>\n        <source>Right</source>\n        <translation>Sağ</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"336\"/>\n        <source>Right (Split)</source>\n        <translation>Sağ (bölünmüş)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"349\"/>\n        <source>RightDockWidget (Split)</source>\n        <translation>Sağ Panel Aracı (bölünmüş)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"349\"/>\n        <source>RightDockWidget</source>\n        <translation>Sağ Panel Aracı</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"355\"/>\n        <source>Unsplit</source>\n        <translation>Bölme</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"360\"/>\n        <source>Split</source>\n        <translation>Böl</translation>\n    </message>\n</context>\n<context>\n    <name>SplitWindowStyle</name>\n    <message>\n        <location filename=\"src/liteapp/splitwindowstyle.cpp\" line=\"244\"/>\n        <source>Hide Sidebars</source>\n        <translation>Kenar Çubuklarını Gizle</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/splitwindowstyle.cpp\" line=\"278\"/>\n        <source>Tool Windows</source>\n        <translation>Araç Pencereleri</translation>\n    </message>\n</context>\n<context>\n    <name>Terminal</name>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"132\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"189\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"773\"/>\n        <source>New</source>\n        <translation>Yeni</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"133\"/>\n        <source>Open a new terminal</source>\n        <translation>Yeni Terminla Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"135\"/>\n        <source>Close</source>\n        <translation>Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"136\"/>\n        <source>Close current terminal</source>\n        <translation>Geçerli Terminali Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"138\"/>\n        <source>CloseAll</source>\n        <translation>Tümünü Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"139\"/>\n        <source>Close all terminal</source>\n        <translation>Tüm Terminalleri Kapat</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"142\"/>\n        <source>LoadEnv</source>\n        <translation>Ortam Değişkenlerini Yükle</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"143\"/>\n        <source>Current terminal load environment from LiteIDE</source>\n        <translation>LiteIDE&apos;den mevcut terminale ortam değişkenlerini aktar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"148\"/>\n        <source>Filter</source>\n        <translation>Filter</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"184\"/>\n        <source>Dark Mode</source>\n        <translation>Karanlık Mod</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"195\"/>\n        <source>Login Mode (shell --login)</source>\n        <translation>Giriş Yöntemi (shell --login)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"237\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"741\"/>\n        <source>Terminal</source>\n        <translation>Terminal</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"251\"/>\n        <source>Open in Integrated Terminal</source>\n        <translation>Gömülü Terminalde Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"741\"/>\n        <source>Rename Tab Title</source>\n        <translation>Sekme Başlığını Teniden Adlandır</translation>\n    </message>\n</context>\n<context>\n    <name>TerminalEdit</name>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"67\"/>\n        <source>Cut</source>\n        <translation>Kes</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"71\"/>\n        <source>Copy</source>\n        <translation>Kopyala</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"75\"/>\n        <source>Paste</source>\n        <translation>Yapıştır</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"79\"/>\n        <source>Select All</source>\n        <translation>Tümünü Seç</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"83\"/>\n        <source>Clear All</source>\n        <translation>Tümünü Temizle</translation>\n    </message>\n</context>\n<context>\n    <name>TextEditor::Internal::ColorScheme</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_texteditor/colorscheme.cpp\" line=\"212\"/>\n        <source>Not a color scheme file.</source>\n        <translation>Renk düzeni dosyası değil.</translation>\n    </message>\n</context>\n<context>\n    <name>Utils::FilterLineEdit</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_editutil/filterlineedit.cpp\" line=\"51\"/>\n        <source>Filter</source>\n        <translation>Filtrele</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_editutil/filterlineedit.cpp\" line=\"52\"/>\n        <source>Clear text</source>\n        <translation>Yazıyı temizle</translation>\n    </message>\n</context>\n<context>\n    <name>WebKitBrowser</name>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"70\"/>\n        <source>Navigation</source>\n        <translation>Navigasyon</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"73\"/>\n        <source>Open Html File</source>\n        <oldsource>Open Html</oldsource>\n        <translation>HTML-Dosyası Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"120\"/>\n        <source>WebKitBrowser</source>\n        <translation>WebKit-Browser</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"170\"/>\n        <source>False load %1 !</source>\n        <translation>%1 Tüklemede Hata!</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"257\"/>\n        <source>Open Html or Markdown File</source>\n        <oldsource>Open Html or Markdown Files</oldsource>\n        <translation>HTMLveya Markdown-Dosyası Aç</translation>\n    </message>\n</context>\n<context>\n    <name>WebKitHtmlWidgetPlugin</name>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkithtmlwidgetplugin.cpp\" line=\"74\"/>\n        <source>Open Html or Markdown File</source>\n        <oldsource>Open Html or Markdown Files</oldsource>\n        <translation>Html veya Markdown Dosyasını Açın</translation>\n    </message>\n</context>\n<context>\n    <name>WelcomeBrowser</name>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"65\"/>\n        <source>New</source>\n        <translation>Yeni</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"66\"/>\n        <source>Open</source>\n        <translation>Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"67\"/>\n        <source>Open Folder</source>\n        <translation>Klasör Aç</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"68\"/>\n        <source>Options</source>\n        <translation>Ayarlar</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"207\"/>\n        <source>Welcome</source>\n        <oldsource>Welcome Page</oldsource>\n        <translation>Hoşgeldiniz</translation>\n    </message>\n</context>\n<context>\n    <name>WelcomePlugin</name>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomeplugin.cpp\" line=\"72\"/>\n        <source>Welcome</source>\n        <oldsource>Home</oldsource>\n        <translation>Hoşgeldiniz</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "liteidex/liteide_uk.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.1\" language=\"uk_UA\">\n<context>\n    <name>AboutDialog</name>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"20\"/>\n        <source>About LiteIDE</source>\n        <oldsource>About Liteide</oldsource>\n        <translation>Про LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"156\"/>\n        <source>Information</source>\n        <oldsource>Infomation</oldsource>\n        <translation>Інформація</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"162\"/>\n        <source>Welcome:</source>\n        <translation>Ласкаво просимо:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"168\"/>\n        <source>Welcome to LiteIDE X! LiteIDE is a simple, open source, cross-platform IDE.</source>\n        <oldsource>Welcome to LiteIDE X!\nLiteIDE is a simple, open source, cross-platform IDE.</oldsource>\n        <translation>Ласкаво просимо в LiteIDE X!\nLiteIDE - це проста кросплатформена IDE з відкритим кодом.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"178\"/>\n        <source>Project:</source>\n        <translation>Проект:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"208\"/>\n        <source>Name:</source>\n        <translation>Назва:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"191\"/>\n        <source>Author:</source>\n        <translation>Автор:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"222\"/>\n        <source>Version:</source>\n        <translation>Версія:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"242\"/>\n        <source>Build:</source>\n        <translation>Збірка:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"215\"/>\n        <source>Based on Qt</source>\n        <oldsource>Based on Qt Version</oldsource>\n        <translation>На основі Qt</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"249\"/>\n        <source>Source Code:</source>\n        <translation>Програмний код:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"263\"/>\n        <source>Support LiteIDE:</source>\n        <oldsource>Support</oldsource>\n        <translation>Підтримка LiteIDE:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"297\"/>\n        <source>Developers</source>\n        <translation>Розробники</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"400\"/>\n        <source>Translations</source>\n        <translation>Переклади</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"412\"/>\n        <source>Chinese</source>\n        <translation>Китайська</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"426\"/>\n        <source>Japanese</source>\n        <translation>Японська</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"440\"/>\n        <source>Russian</source>\n        <translation>Російська</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"454\"/>\n        <source>French</source>\n        <translation>Французька</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"468\"/>\n        <source>Traditional Chinese</source>\n        <translation>Традиційна китайська</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"482\"/>\n        <source>German</source>\n        <translation>Німецька</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"513\"/>\n        <source>Ukrainian</source>\n        <translation>Українська</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"544\"/>\n        <source>Thanks to...</source>\n        <translation>Подяки...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"577\"/>\n        <source>License</source>\n        <translation>Ліцензія</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"619\"/>\n        <source>Close</source>\n        <translation>Закрити</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.cpp\" line=\"42\"/>\n        <source>Based on Qt %1 (%2 bit)</source>\n        <translation>На основі Qt %1 (%2 біт)</translation>\n    </message>\n</context>\n<context>\n    <name>ActionManager</name>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"65\"/>\n        <source>&amp;File</source>\n        <translation>&amp;Файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"66\"/>\n        <source>&amp;Recent</source>\n        <translation>&amp;Останні</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"67\"/>\n        <source>&amp;Edit</source>\n        <translation>Р&amp;едагувати</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"68\"/>\n        <source>F&amp;ind</source>\n        <oldsource>&amp;Find</oldsource>\n        <translation>&amp;Пошук</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"69\"/>\n        <source>&amp;View</source>\n        <translation>&amp;Вигляд</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"74\"/>\n        <source>&amp;Tools</source>\n        <translation>&amp;Інструменти</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"75\"/>\n        <source>&amp;Build</source>\n        <translation>З&amp;бирання</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"76\"/>\n        <source>&amp;Debug</source>\n        <translation>Зне&amp;вадження</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"77\"/>\n        <source>&amp;Help</source>\n        <translation>&amp;Допомога</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"79\"/>\n        <source>Standard Toolbar</source>\n        <oldsource>Standard ToolBar</oldsource>\n        <translation>Стандартна панель</translation>\n    </message>\n</context>\n<context>\n    <name>AstWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangast/astwidget.cpp\" line=\"76\"/>\n        <source>Go To Definition</source>\n        <translation>Перейти до визначення</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/astwidget.cpp\" line=\"77\"/>\n        <source>View Import Document</source>\n        <translation>Документація</translation>\n    </message>\n</context>\n<context>\n    <name>BaseDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"77\"/>\n        <source>Hide</source>\n        <translation>Приховати</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"78\"/>\n        <source>Hide Tool Window</source>\n        <translation>Приховати панель</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"87\"/>\n        <source>Floating Window</source>\n        <translation type=\"unfinished\">Плаваюче вікно</translation>\n    </message>\n</context>\n<context>\n    <name>BaseFolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"78\"/>\n        <source>Open In New Window</source>\n        <translation>Відкрити в новому вікні</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"79\"/>\n        <source>Open File</source>\n        <translation>Відкрити файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"80\"/>\n        <source>New File...</source>\n        <translation>Створити файл...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"81\"/>\n        <source>New File Wizard...</source>\n        <translation>Майстер створення файлу...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"82\"/>\n        <source>Rename File...</source>\n        <translation>Перейменувати файл...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"83\"/>\n        <source>Delete File</source>\n        <translation>Видалити файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"85\"/>\n        <source>New Folder...</source>\n        <translation>Створити директорію...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"86\"/>\n        <source>Rename Folder...</source>\n        <translation>Перейменувати директорію...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"87\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"335\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"342\"/>\n        <source>Delete Folder</source>\n        <translation>Видалити директорію</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"100\"/>\n        <source>Open Terminal Here</source>\n        <translation>Відкрити термінал тут</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"90\"/>\n        <source>Show in Explorer</source>\n        <oldsource>Open Explorer Here</oldsource>\n        <translation>Відкрити в Explorer</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"77\"/>\n        <source>Open Application</source>\n        <translation>Відкрити програму</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"92\"/>\n        <source>Show in Finder</source>\n        <translation>Відкрити в Finder</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"94\"/>\n        <source>Show Containing Folder</source>\n        <translation>Показати в батьківській директорії</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"98\"/>\n        <source>Open Command Prompt Here</source>\n        <translation>Відкрити командний рядок тут</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"102\"/>\n        <source>Open in Integrated Terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"104\"/>\n        <source>Open Folder...</source>\n        <oldsource>Add Folder...</oldsource>\n        <translation>Відкрити директорію...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"105\"/>\n        <source>Reload Folder</source>\n        <translation>Перезавантажити директорію</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"106\"/>\n        <source>Close Folder</source>\n        <translation>Закрити директорію</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"108\"/>\n        <source>Close All Folders</source>\n        <translation>Закрити всі директорії</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"110\"/>\n        <source>Copy</source>\n        <translation>Копіювати</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"111\"/>\n        <source>Paste</source>\n        <translation>Вставити</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"113\"/>\n        <source>Copy Path</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"115\"/>\n        <source>Move To Trash</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"198\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"208\"/>\n        <source>Create File</source>\n        <translation>Створити файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"199\"/>\n        <source>A file with that name already exists!</source>\n        <translation>Файл з таким іменем вже існує!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"209\"/>\n        <source>Failed to create the file!</source>\n        <translation>Не вдалося створити створити файл!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"239\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"245\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"250\"/>\n        <source>Rename File</source>\n        <translation>Перейменувати файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"239\"/>\n        <source>New Name:</source>\n        <translation>Нове ім&apos;я:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"246\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"251\"/>\n        <source>Failed to rename the file!</source>\n        <translation>Не вдалося перейменувати файл!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"504\"/>\n        <source>An item &quot;%1&quot; already exists in this location. Do you want to replace it and move old item to trash?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"505\"/>\n        <source>Stop</source>\n        <translation type=\"unfinished\">Зупинити</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"506\"/>\n        <source>Keep Both</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"507\"/>\n        <source>Keep Both All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"508\"/>\n        <source>Replace</source>\n        <translation type=\"unfinished\">Замінити</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"509\"/>\n        <source>Replace All</source>\n        <translation type=\"unfinished\">Замінити все</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"609\"/>\n        <source>Are you sure that you want move to trash this item?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"612\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"615\"/>\n        <source>Are you sure that you want move to trash %1 items?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"618\"/>\n        <source>Move to Trash</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"662\"/>\n        <source>Open With</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"669\"/>\n        <source>System Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"290\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"293\"/>\n        <source>Create Folder</source>\n        <translation>Створити директорію</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"291\"/>\n        <source>A folder with that name already exists!</source>\n        <translation>Директорія з таким іменем вже існує!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"294\"/>\n        <source>Failed to create the folder!</source>\n        <translation>Не вдалося створити створити директорію!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"307\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"316\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"321\"/>\n        <source>Rename Folder</source>\n        <translation>Перейменувати директорію</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"307\"/>\n        <source>Folder Name</source>\n        <translation>Им&apos;я директорії</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"317\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"322\"/>\n        <source>Failed to rename the folder!</source>\n        <translation>Не вдалося перейменувати директорію!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"336\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Видалити цю директорію разом із її вмістом назавжди?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"343\"/>\n        <source>Failed to delete the folder!</source>\n        <translation>Не вдалося видалити директорію!</translation>\n    </message>\n</context>\n<context>\n    <name>BookmarkManager</name>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"61\"/>\n        <source>Toggle Bookmark</source>\n        <translation>Вставити/Видалити закладку</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"96\"/>\n        <source>Goto bookmark</source>\n        <translation>Перейти до закладки</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"97\"/>\n        <source>Remove bookmark</source>\n        <translation>Вилучити закладку</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"98\"/>\n        <source>Remove all bookmarks for this file</source>\n        <translation>Вилучити всі закладки для цього файлу</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"99\"/>\n        <source>Remove all bookmarks for all files</source>\n        <translation>Вилучити всі закладки для всіх файлів</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"115\"/>\n        <source>Bookmarks</source>\n        <translation>Закладки</translation>\n    </message>\n</context>\n<context>\n    <name>BookmarkRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"81\"/>\n        <source>Bookmarks</source>\n        <translation>Закладки</translation>\n    </message>\n</context>\n<context>\n    <name>BuildConfigDialog</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"14\"/>\n        <source>Build Configuration</source>\n        <oldsource>Build Config Dialog</oldsource>\n        <translation>Параметри збирання</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"71\"/>\n        <source>Build ID</source>\n        <translation>Ідентифікатор збірки</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"45\"/>\n        <source>Build Path</source>\n        <oldsource>Build File</oldsource>\n        <translation>Шлях збірки</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"85\"/>\n        <source>GOPATH</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"103\"/>\n        <source>GOPATH information</source>\n        <translation>Інформація про GOPATH</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"147\"/>\n        <source>Use Custom GOPATH for Build Path</source>\n        <translation type=\"unfinished\">Використовувати нестадартний GOPATH</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"159\"/>\n        <source>Inherit System GOPATH</source>\n        <translation>Наслідувати системний GOPATH</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"179\"/>\n        <source>Inherit LiteIDE GOPATH</source>\n        <translation>Наслідувати GOPATH LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"201\"/>\n        <source>Custom GOPATH (one per line)</source>\n        <translation type=\"unfinished\">Шляхи GOPATH (по одному на рядок)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"221\"/>\n        <source>Add Directory...</source>\n        <translation>Додати директорію...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"228\"/>\n        <source>Clear</source>\n        <translation>Очистити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"244\"/>\n        <source>LiteIDE</source>\n        <translation>LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"266\"/>\n        <source>Config</source>\n        <translation>Конфігурація</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"288\"/>\n        <source>Action</source>\n        <translation>Дії</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"310\"/>\n        <source>Custom</source>\n        <oldsource>Build Custom</oldsource>\n        <translation type=\"unfinished\">Розширені</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"343\"/>\n        <source>Reset all to initial value</source>\n        <translation>Відновити початкові значення</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"69\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"73\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"77\"/>\n        <source>Name</source>\n        <translation>Назва</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"70\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"74\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"78\"/>\n        <source>Value</source>\n        <translation>Значення</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"79\"/>\n        <source>SharedValue</source>\n        <translation>Спільне значення</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"82\"/>\n        <source>Id</source>\n        <translation>Ідентифікатор</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"83\"/>\n        <source>Cmd</source>\n        <translation>Команда</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"293\"/>\n        <source>Choose directory to add to GOPATH:</source>\n        <translation>Додати обрану директорію в GOPATH:</translation>\n    </message>\n</context>\n<context>\n    <name>CreateDirDialog</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"94\"/>\n        <source>Create Folder</source>\n        <translation>Створення директорії</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"96\"/>\n        <source>Directory:</source>\n        <translation>Директорія:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"98\"/>\n        <source>Dir Name:</source>\n        <translation>Ім&apos;я директорії:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"106\"/>\n        <source>Create</source>\n        <translation>Створити</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"107\"/>\n        <source>Cancel</source>\n        <translation>Скасувати</translation>\n    </message>\n</context>\n<context>\n    <name>CreateFileDialog</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"44\"/>\n        <source>Create File</source>\n        <oldsource>Create File Dialog</oldsource>\n        <translation>Створення файлу</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"46\"/>\n        <source>Directory:</source>\n        <translation>Директорія:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"48\"/>\n        <source>File Name:</source>\n        <translation>Ім&apos;я файлу:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"56\"/>\n        <source>Create</source>\n        <translation>Створити</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"57\"/>\n        <source>Create and Edit</source>\n        <translation>Створити і редагувати</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"58\"/>\n        <source>Cancel</source>\n        <translation>Скасувати</translation>\n    </message>\n</context>\n<context>\n    <name>DebugWidget</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"122\"/>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"321\"/>\n        <source>Add Watch</source>\n        <translation type=\"unfinished\">Додати спостереження</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"221\"/>\n        <source>Async Record</source>\n        <oldsource>AsyncRecord</oldsource>\n        <translation type=\"unfinished\">Асинхронний запис</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"222\"/>\n        <source>Variables</source>\n        <translation>Змінні</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"223\"/>\n        <source>Watch</source>\n        <translation>Спостереження</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"224\"/>\n        <source>Call Stack</source>\n        <oldsource>CallStack</oldsource>\n        <translation>Стек викликів</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"225\"/>\n        <source>Threads</source>\n        <translation>Потоки</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"226\"/>\n        <source>Goroutines</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"227\"/>\n        <source>Registers</source>\n        <translation>Регістри</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"228\"/>\n        <source>Libraries</source>\n        <oldsource>Library</oldsource>\n        <translation>Бібліотеки</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"229\"/>\n        <source>Console</source>\n        <translation>Консоль</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"321\"/>\n        <source>Watch expression (e.g. buf main.var os.Stdout):</source>\n        <translation type=\"unfinished\">Вираз для спостереження (наприклад, buf main.var os.Stdout):</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"124\"/>\n        <source>Remove Watch</source>\n        <translation>Видалити спостереження</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"125\"/>\n        <source>Remove All Watches</source>\n        <translation>Видалити всі спостереження</translation>\n    </message>\n</context>\n<context>\n    <name>DlvDebuggerOption</name>\n    <message>\n        <location filename=\"src/plugins/dlvdebugger/dlvdebuggeroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/dlvdebugger/dlvdebuggeroption.ui\" line=\"20\"/>\n        <source>delve debug pass flags: (example --check-go-version=false)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>DocumentBrowser</name>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"67\"/>\n        <source>Back</source>\n        <oldsource>Backward</oldsource>\n        <translation>Назад</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"68\"/>\n        <source>Forward</source>\n        <translation>Вперед</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"69\"/>\n        <source>Reload</source>\n        <translation>Перезавантажити</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"75\"/>\n        <source>Increase Font Size</source>\n        <translation>Збільшити розмір шрифту</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"78\"/>\n        <source>Decrease Font Size</source>\n        <translation>Зменшити розмір шрифту</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"81\"/>\n        <source>Reset Font Size</source>\n        <translation>Відновити розмір шрифту</translation>\n    </message>\n</context>\n<context>\n    <name>DocumentBrowserFactory</name>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowserfactory.cpp\" line=\"67\"/>\n        <source>DocumentBrowser</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>EditorManager</name>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"139\"/>\n        <source>Close</source>\n        <translation>Закрити</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"165\"/>\n        <source>Move to New Window</source>\n        <oldsource>Move To New Window</oldsource>\n        <translation>Перенести в нове вікно</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"233\"/>\n        <source>Navigate Forward</source>\n        <oldsource>GoForward</oldsource>\n        <translation>Перейти вперед</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"141\"/>\n        <source>Close Others</source>\n        <oldsource>Close Others Tabs</oldsource>\n        <translation>Закрити інші</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"111\"/>\n        <source>Open Editor</source>\n        <translation type=\"unfinished\">Відкриті редактори</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"142\"/>\n        <source>Close All</source>\n        <oldsource>Close All Tabs</oldsource>\n        <translation>Закрити всі</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"143\"/>\n        <source>Close Left Tabs</source>\n        <translation>Закрити вкладки зліва</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"144\"/>\n        <source>Close Right Tabs</source>\n        <translation>Закрити вкладки справа</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"145\"/>\n        <source>Close Files in Same Folder</source>\n        <oldsource>Close Same Folder Files</oldsource>\n        <translation>Закрити файли з цієї ж директорії</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"146\"/>\n        <source>Close Files in Other Folders</source>\n        <oldsource>Close Other Folder Files</oldsource>\n        <translation>Закрити файли з інших директорій</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"147\"/>\n        <source>Copy Full Path to Clipboard</source>\n        <oldsource>Copy Path to Clipboard</oldsource>\n        <translation>Копіювати повний шлях в буфер обміну</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"150\"/>\n        <source>Show in Explorer</source>\n        <translation>Показати в Explorer</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"152\"/>\n        <source>Show in Finder</source>\n        <translation>Показати в Finder</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"154\"/>\n        <source>Show Containing Folder</source>\n        <translation>Показати в файловому менеджері</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"158\"/>\n        <source>Open Command Prompt Here</source>\n        <translation>Відкрити командний рядок тут</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"160\"/>\n        <source>Open Terminal Here</source>\n        <translation>Відкрити термінал тут</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"162\"/>\n        <source>Open in Integrated Terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"224\"/>\n        <source>Navigate Backward</source>\n        <translation>Перейти назад</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"426\"/>\n        <source>Save changes to %1?</source>\n        <translation>Зберегти зміни в %1?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"427\"/>\n        <source>Unsaved Modifications</source>\n        <oldsource>Save Modify</oldsource>\n        <translation>Незбережені зміни</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"524\"/>\n        <source>All Files (*)</source>\n        <translation>Всі файли (*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"526\"/>\n        <source>Save As</source>\n        <translation>Зберегти як</translation>\n    </message>\n</context>\n<context>\n    <name>EnvManager</name>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"436\"/>\n        <source>Environment Toolbar</source>\n        <oldsource>Environment ToolBar</oldsource>\n        <translation>Панель конфігурації оточення</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"443\"/>\n        <source>Switching current environment</source>\n        <oldsource>Switch Current Environment</oldsource>\n        <translation>Перемкнути поточне оточення</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"446\"/>\n        <source>Edit current environment</source>\n        <oldsource>Edit Current Environment</oldsource>\n        <translation>Редагувати поточне оточення</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"447\"/>\n        <source>Reload current environment</source>\n        <oldsource>Reload Current Environment</oldsource>\n        <translation>Перезавантажити поточне оточення</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"451\"/>\n        <source>Select Environment</source>\n        <translation>Вибрати оточення</translation>\n    </message>\n</context>\n<context>\n    <name>ExportDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"14\"/>\n        <source>Dialog</source>\n        <translation>Експорт</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"22\"/>\n        <source>Name:</source>\n        <translation>Назва:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"49\"/>\n        <source>Export</source>\n        <translation>Експортувати</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"56\"/>\n        <source>ExportAndView</source>\n        <translation>Експортувати з переглядом</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"194\"/>\n        <source>Use Vim-style Editing</source>\n        <translation>Використовувати редагування в стилі Vim</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"196\"/>\n        <source>Read .vimrc</source>\n        <translation>Прочитати .vimrc</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"198\"/>\n        <source>Path to .vimrc</source>\n        <translation>Шлях до .vimrc</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal::FakeVimHandler</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"153\"/>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"161\"/>\n        <source>Unknown option: %1</source>\n        <translation>Невідома опція: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"156\"/>\n        <source>Argument must be positive: %1=%2</source>\n        <translation>Аргумент має бути додатним: %1=%2</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"949\"/>\n        <source>Mark &quot;%1&quot; not set.</source>\n        <translation>Позначку &quot;%1&quot; не встановлено.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3538\"/>\n        <source>%1%2%</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3540\"/>\n        <source>%1All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3554\"/>\n        <source>Not implemented in FakeVim.</source>\n        <translation>Не реалізовано у FakeVim.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5719\"/>\n        <source>Unknown option:</source>\n        <translation>Невідома опція:</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5730\"/>\n        <source>Invalid argument:</source>\n        <translation>Помилковий аргумент:</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5733\"/>\n        <source>Trailing characters:</source>\n        <translation type=\"unfinished\">Кінцеві символи:</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5816\"/>\n        <source>Move lines into themselves.</source>\n        <translation type=\"unfinished\">Пересування рядків на те саме місце.</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5860\"/>\n        <source>%n lines moved.</source>\n        <translation>\n            <numerusform>%n рядок пересунуто.</numerusform>\n            <numerusform>%n рядки пересунуто.</numerusform>\n            <numerusform>%n рядків пересунуто.</numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5920\"/>\n        <source>File &quot;%1&quot; exists (add ! to override)</source>\n        <translation>Файл &quot;%1&quot; існує (додайте ! для перезапису)</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5934\"/>\n        <source>Cannot open file &quot;%1&quot; for writing</source>\n        <translation>Не вдалося відкрити файл &quot;%1&quot; для запису</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5940\"/>\n        <source>&quot;%1&quot; %2 %3L, %4C written.</source>\n        <translation type=\"unfinished\">&quot;%1&quot; %2 %3L, %4C записано.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5949\"/>\n        <source>Cannot open file &quot;%1&quot; for reading</source>\n        <translation>Не вдалося відкрити файл &quot;%1&quot; для читання</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5978\"/>\n        <source>&quot;%1&quot; %2L, %3C</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6005\"/>\n        <source>%n lines filtered.</source>\n        <translation type=\"unfinished\">\n            <numerusform>%n рядок змінено.</numerusform>\n            <numerusform>%n рядки змінено.</numerusform>\n            <numerusform>%n рядків змінено.</numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6093\"/>\n        <source>Cannot open file %1</source>\n        <translation>Не вдалося відкрити файл %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6259\"/>\n        <source>Invalid regular expression: %1</source>\n        <translation>Помилковий регулярний вираз: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6295\"/>\n        <source>Pattern not found: %1</source>\n        <translation>Шаблон не знайдно: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6299\"/>\n        <source>Search hit BOTTOM, continuing at TOP.</source>\n        <translation type=\"unfinished\">Пошук досягнув КІНЦЯ, починаємо з ПОЧАТКУ.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6300\"/>\n        <source>Search hit TOP, continuing at BOTTOM.</source>\n        <translation type=\"unfinished\">Пошук досягнув ПОЧАТКУ, починаємо з КІНЦЯ.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6305\"/>\n        <source>Search hit BOTTOM without match for: %1</source>\n        <translation type=\"unfinished\">Пошук дійшов до КІНЦЯ без співпадінь: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6306\"/>\n        <source>Search hit TOP without match for: %1</source>\n        <translation type=\"unfinished\">Пошук дійшов до ПОЧАТКУ без співпадінь: %1</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6413\"/>\n        <source>%n lines indented.</source>\n        <translation type=\"unfinished\">\n            <numerusform>%n рядок вирівняно.</numerusform>\n            <numerusform>%n рядки вирівняно.</numerusform>\n            <numerusform>%n рядків вирівняно.</numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6470\"/>\n        <source>%n lines %1ed %2 time.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n            <numerusform></numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7043\"/>\n        <source>%n lines yanked.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n            <numerusform></numerusform>\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7748\"/>\n        <source>Already at oldest change.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7749\"/>\n        <source>Already at newest change.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal::FakeVimHandler::Private</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"2788\"/>\n        <source>Recursive mapping</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"4195\"/>\n        <source>Type Alt-V, Alt-V to quit FakeVim mode.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5941\"/>\n        <source> [New] </source>\n        <translation> [Новий] </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6166\"/>\n        <source>Not an editor command: %1</source>\n        <translation>Не команда редактора: %1</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVimEdit</name>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimedit.cpp\" line=\"68\"/>\n        <source>Use FakeVim Editing</source>\n        <translation>Викорстовувати редагування FakeVim</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVimEditOption</name>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"20\"/>\n        <source>FakeVim initialization command list (# start is comment):</source>\n        <translation type=\"unfinished\">Список команд ініціалізації FakeVim (# починає коментар):</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"28\"/>\n        <source>Load default init command list</source>\n        <translation type=\"unfinished\">Завантажити типовий список</translation>\n    </message>\n</context>\n<context>\n    <name>FiFoTty</name>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"86\"/>\n        <source>Cannot create temporary file: %1</source>\n        <translation>Не вдалося створити тимчасовий файл: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"97\"/>\n        <source>Cannot create FiFo %1: %2</source>\n        <translation>Неможливо створити FiFo %1: %2</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"104\"/>\n        <source>Cannot open FiFo %1: %2</source>\n        <translation>Неможливо відкрити FiFo %1: %2</translation>\n    </message>\n</context>\n<context>\n    <name>FileBrowser</name>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"98\"/>\n        <source>Synchronize with editor</source>\n        <translation>Синхронізувати із редактором</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"103\"/>\n        <source>Show Hidden Files</source>\n        <translation>Показувати приховані файли</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"159\"/>\n        <source>Set As Root Folder</source>\n        <oldsource>Set Folder To Root</oldsource>\n        <translation>Встановити кореневою директорією</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"119\"/>\n        <source>Execute File</source>\n        <translation>Виконати файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"101\"/>\n        <source>Reload Folder</source>\n        <translation>Перезавантажити директорію</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"110\"/>\n        <source>Show Details</source>\n        <translation>Показувати подробиці</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"122\"/>\n        <source>Debug File</source>\n        <translation>Зневадження файлу</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"160\"/>\n        <source>Open Folder in New Window</source>\n        <translation>Відкрити директорію у новому вікні</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"161\"/>\n        <source>Add to Folders</source>\n        <translation>Додати до директорій</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"141\"/>\n        <source>Open Parent</source>\n        <oldsource>Open to Parent</oldsource>\n        <translation type=\"unfinished\">Нагору</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"169\"/>\n        <source>Filter</source>\n        <translation type=\"unfinished\">Фільтрувати</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"175\"/>\n        <source>File System</source>\n        <translation>Файлова система</translation>\n    </message>\n</context>\n<context>\n    <name>FileBrowserOption</name>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"20\"/>\n        <source>Terminal</source>\n        <translation>Термінал</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"26\"/>\n        <source>Command:</source>\n        <translation>Команда:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"36\"/>\n        <source>Arguments:</source>\n        <translation>Аргументи:</translation>\n    </message>\n</context>\n<context>\n    <name>FileManager</name>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"189\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"211\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"233\"/>\n        <source>All Files (*)</source>\n        <translation>Всі файли (*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"397\"/>\n        <source>LiteIDE</source>\n        <translation>LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"398\"/>\n        <source>Project &apos;%1&apos; has been created.\nDo you want to open it now?</source>\n        <oldsource>Project &apos;%1&apos; is created.\nDo you want to load?</oldsource>\n        <translation>Проект &quot;%1&quot; створено.\nБажаєте його відкрити зараз?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"301\"/>\n        <source>Open Project or File</source>\n        <translation>Відкрити файл або проект</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"76\"/>\n        <source>Show Hidden Files</source>\n        <translation>Показувати приховані файли</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"79\"/>\n        <source>Show Details</source>\n        <translation>Показувати подробиці</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"85\"/>\n        <source>Split Mode</source>\n        <translation type=\"unfinished\">Розділений режим</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"127\"/>\n        <source>Folders</source>\n        <oldsource>Folers</oldsource>\n        <translation>Директорії</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"186\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"208\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"230\"/>\n        <source>All Support Files (%1)</source>\n        <translation>Всі підтримувані типи файлів (%1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"314\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"332\"/>\n        <source>Select a folder:</source>\n        <oldsource>Open Folder</oldsource>\n        <translation>Оберіть директорію:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"679\"/>\n        <source>%1\nThis file has been deleted from the drive,\nbut you have unsaved modifications in your LiteIDE editor.\n\nDo you want to close the editor?\nAnswering &quot;Yes&quot; will discard your unsaved changes.</source>\n        <translation>%1\nЦей файл був видалений з файлової системи,\nале у вас лишилися незбережені зміни у LiteIDE.\n\nБажаєте закрити редактор?\nВідповідаючи &quot;Так&quot; ви втратите незбережені зміни.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"686\"/>\n        <source>%1\nThis file has been deleted from the drive.\n\nDo you want to close the editor?</source>\n        <translation>%1\nЦей файл був видалений із файлової системи.\n\nБажаєте закрити редактор?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"719\"/>\n        <source>%1\nThis file has been modified on the drive,\nbut you have unsaved modifications in your LiteIDE editor.\n\nDo you want to reload the file from disk?\nAnswering &quot;Yes&quot; will discard your unsaved changes.</source>\n        <translation>%1\nЦей файл було змінено на диску,\nале у вас лишилися незбережені зміни у редакторі LiteIDE.\n\nБажаєте перезавантажити файл із диску?\nВідповідаючи &quot;Так&quot; ви втратите незбережені зміни.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"726\"/>\n        <source>%1\nThis file has been modified on the drive.\n\nDo you want to reload the file from disk?</source>\n        <translation>%1\nЦей файл було змінено на диску.\n\nБажаєте перезавантажити файл з диску?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"350\"/>\n        <source>Open Files</source>\n        <translation>Відкрити файли</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"82\"/>\n        <source>Synchronize with editor</source>\n        <translation>Синхронізувати із редактором</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"113\"/>\n        <source>Filter</source>\n        <translation>Фільтрувати дерево</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"363\"/>\n        <source>Open Project</source>\n        <translation>Відкрити проект</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"683\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"688\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"723\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"728\"/>\n        <source>LiteIDE X</source>\n        <translation>LiteIDE X</translation>\n    </message>\n</context>\n<context>\n    <name>FileRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"135\"/>\n        <source>Files</source>\n        <translation>Файли</translation>\n    </message>\n</context>\n<context>\n    <name>FileSearch</name>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"217\"/>\n        <source>Match whole word</source>\n        <oldsource>Match word</oldsource>\n        <translation>Тільки цілі слова</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"218\"/>\n        <source>Match case</source>\n        <translation>Враховувати регістр</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"219\"/>\n        <source>Regular expression</source>\n        <translation>Регулярний вираз</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"220\"/>\n        <source>Scan subdirectories</source>\n        <oldsource>Look in subdirs</oldsource>\n        <translation>Рекурсивно</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"241\"/>\n        <source>Search for:</source>\n        <translation>Шукати входження:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"243\"/>\n        <source>Options:</source>\n        <translation>Параметри:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"250\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>Обрати...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"273\"/>\n        <source>Filter:</source>\n        <translation>Фільтр:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"365\"/>\n        <source>Files on File System</source>\n        <translation type=\"unfinished\">Файли у файловій системі</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"230\"/>\n        <source>Search</source>\n        <translation type=\"unfinished\">Знайти</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"231\"/>\n        <source>Cancel</source>\n        <translation>Скасувати</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"251\"/>\n        <source>Current Folder</source>\n        <translation>Поточна директорія</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"254\"/>\n        <source>Auto Switch</source>\n        <translation>Обирати автоматично</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"278\"/>\n        <source>Clear</source>\n        <translation type=\"unfinished\">Очистити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"480\"/>\n        <source>Open Directory</source>\n        <translation>Відкрити директорію</translation>\n    </message>\n</context>\n<context>\n    <name>FileSearchManager</name>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"50\"/>\n        <source>Search Item:</source>\n        <translation type=\"unfinished\">Шукаємо:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"69\"/>\n        <source>Only golang file changes can be revert!</source>\n        <oldsource>This file change cannot be undone!</oldsource>\n        <translation type=\"unfinished\">Лише зміни до файлів golang можуть бути скасовані!</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"83\"/>\n        <source>New Search</source>\n        <translation>Новий пошук</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"85\"/>\n        <source>File Search</source>\n        <translation type=\"unfinished\">Пошук в файлах</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"89\"/>\n        <source>Search Result</source>\n        <translation>Результат пошуку</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"248\"/>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"253\"/>\n        <source>LiteIDE X</source>\n        <translation>LiteIDE X</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"248\"/>\n        <source>Warning! Replace text is empty.\nWant to remove all the search items?</source>\n        <translation type=\"unfinished\">Увага! Текст для заміни пустий.\nБажаєте видалити всі знайдені результати?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"253\"/>\n        <source>Warning! Replace text is whitespace.\nWant to replace to all the search items to whitespace?</source>\n        <translation type=\"unfinished\">Увага! Текст для заміни складається з пробільних символів.\nБажаєте замінити всі знайдені результати пробільними символами?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"280\"/>\n        <source>The following files have no write permissions. Do you want to change the permissions?</source>\n        <translation type=\"unfinished\">Ці файли не мають права на запис. Бажаєте змінити права?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"283\"/>\n        <source>File is readonly</source>\n        <translation>Файл тільки для читання</translation>\n    </message>\n</context>\n<context>\n    <name>FileSystemWidget</name>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"94\"/>\n        <source>Open File</source>\n        <oldsource>Open Editor</oldsource>\n        <translation>Відкрити файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"95\"/>\n        <source>New File...</source>\n        <oldsource>New File</oldsource>\n        <translation>Створити файл...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"96\"/>\n        <source>New File Wizard...</source>\n        <oldsource>New File Wizard</oldsource>\n        <translation>Майстер створення файлу...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"320\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"326\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"331\"/>\n        <source>Rename File</source>\n        <translation>Перейменувати файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"98\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"345\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"350\"/>\n        <source>Delete File</source>\n        <oldsource>Remove File</oldsource>\n        <translation>Видалити файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"100\"/>\n        <source>New Folder...</source>\n        <oldsource>New Folder</oldsource>\n        <translation>Створити директорію...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"346\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Видалити цей файл назавжди?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"386\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"395\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"400\"/>\n        <source>Rename Folder</source>\n        <translation>Перейменувати директорію</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"102\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"414\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"421\"/>\n        <source>Delete Folder</source>\n        <oldsource>Remove Folder</oldsource>\n        <translation>Видалити директорію</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"97\"/>\n        <source>Rename File...</source>\n        <translation>Перейменувати файл...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"101\"/>\n        <source>Rename Folder...</source>\n        <translation>Перейменувати директорію...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"104\"/>\n        <source>Open Terminal Here</source>\n        <translation>Відкрити термінал тут</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"105\"/>\n        <source>Open Explorer Here</source>\n        <translation>Відкрити в файловому менеджері</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"107\"/>\n        <source>View Godoc Here</source>\n        <translation>Відкрити Godoc</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"454\"/>\n        <source>Add Folder</source>\n        <translation>Додати директорію</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"110\"/>\n        <source>Close Folder</source>\n        <translation>Закрити директорію</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"109\"/>\n        <source>Add Folder...</source>\n        <translation>Додати директорію...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"112\"/>\n        <source>Close All Folders</source>\n        <translation>Закрити всі директорії</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"279\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"289\"/>\n        <source>Create File</source>\n        <translation>Створення файлу</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"280\"/>\n        <source>A file with that name already exists!</source>\n        <oldsource>The file already exists!</oldsource>\n        <translation>Файл вже існує!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"290\"/>\n        <source>Failed to create the file!</source>\n        <translation>Не вдалося створити створити файл!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"320\"/>\n        <source>New Name:</source>\n        <translation>Нове ім&apos;я:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"327\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"332\"/>\n        <source>Failed to rename the file!</source>\n        <translation>Не вдалося перейменувати файл!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"415\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Видалити цю директорію разом із її вмістом назавжди?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"351\"/>\n        <source>Failed to delete the file!</source>\n        <oldsource>Failed to remove the file!</oldsource>\n        <translation>Не вдалося видалити файл!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"369\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"372\"/>\n        <source>Create Folder</source>\n        <translation>Створити директорію</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"370\"/>\n        <source>A folder with that name already exists!</source>\n        <oldsource>The folder name is exists!</oldsource>\n        <translation>Директорія з таким іменем вже існує!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"373\"/>\n        <source>Failed to create the folder!</source>\n        <translation>Не вдалося створити створити директорію!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"386\"/>\n        <source>Folder Name</source>\n        <translation>Ім&apos;я директорії</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"396\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"401\"/>\n        <source>Failed to rename the folder!</source>\n        <translation>Не вдалося перейменуванні директорію!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"422\"/>\n        <source>Failed to delete the folder!</source>\n        <oldsource>Failed to remove the folder!</oldsource>\n        <translation>Не вдалося видалити директорію!</translation>\n    </message>\n</context>\n<context>\n    <name>Find::Internal::SearchResultWidget</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"132\"/>\n        <source>Search was canceled.</source>\n        <translation>Пошук було скасовано.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"163\"/>\n        <source>Cancel</source>\n        <translation>Скасувати</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"167\"/>\n        <source>Repeat the search with same parameters</source>\n        <translation>Повторити пошук за попередніми параметрами</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"168\"/>\n        <source>Search again</source>\n        <translation>Шукати знову</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"174\"/>\n        <source>Set show replace mode ui</source>\n        <translation type=\"unfinished\">Показати інтерфейс заміни</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"175\"/>\n        <source>Show Replace</source>\n        <translation>Виконати заміну</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"180\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"441\"/>\n        <source>Replace with:</source>\n        <translation>Замінити на:</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"186\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"442\"/>\n        <source>Replace all occurrences</source>\n        <translation>Замінити всі співпадіння</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"187\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"443\"/>\n        <source>Replace</source>\n        <translation>Замінити</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"191\"/>\n        <source>Preserve case</source>\n        <translation>Зберігати регістр</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"204\"/>\n        <source>Expand all items</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"209\"/>\n        <source>Collapse all items</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"318\"/>\n        <source>Revert with:</source>\n        <translation>Повернути на:</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"319\"/>\n        <source>Revert</source>\n        <translation>Повернути</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"320\"/>\n        <source>Revert all occurrences</source>\n        <translation>Повернути всі співпадіння</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"592\"/>\n        <source>%n matches replaced.</source>\n        <translation>\n            <numerusform>%n співпадіння замінено.</numerusform>\n            <numerusform>%n співпадіння замінено.</numerusform>\n            <numerusform>%n співпадінь замінено.</numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"594\"/>\n        <source>searching... %n matches found.</source>\n        <translation>\n            <numerusform>шукаємо... знайдено %n співпадіння.</numerusform>\n            <numerusform>шукаємо... знайдено %n співпадіння.</numerusform>\n            <numerusform>шукаємо... знайдено %n співпадінь.</numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"600\"/>\n        <source>searching ...</source>\n        <translation>шукаємо ...</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"606\"/>\n        <source>No matches found.</source>\n        <translation>Співпадінь не знайдено.</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"608\"/>\n        <source>%n matches found.</source>\n        <translation>\n            <numerusform>Знайдено %n співпадіння.</numerusform>\n            <numerusform>Знайдено %n співпадіння.</numerusform>\n            <numerusform>Знайдено %n співпадінь.</numerusform>\n        </translation>\n    </message>\n</context>\n<context>\n    <name>FindApiEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.h\" line=\"73\"/>\n        <source>Search</source>\n        <translation type=\"unfinished\">Пошук</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.h\" line=\"74\"/>\n        <source>Stop Search</source>\n        <translation>Зупинити пошук</translation>\n    </message>\n</context>\n<context>\n    <name>FindApiWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"284\"/>\n        <source>Search</source>\n        <translation type=\"unfinished\">Шукати</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"305\"/>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"337\"/>\n        <source>Find</source>\n        <translation>Знайти</translation>\n    </message>\n</context>\n<context>\n    <name>FindDocWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"96\"/>\n        <source>Search</source>\n        <translation type=\"unfinished\">Шукати</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"104\"/>\n        <source>Find</source>\n        <translation type=\"unfinished\">Знайти</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"123\"/>\n        <source>Find All</source>\n        <translation type=\"unfinished\">Шукати все</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"124\"/>\n        <source>Find const</source>\n        <translation type=\"unfinished\">Шукати const</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"126\"/>\n        <source>Find func</source>\n        <translation type=\"unfinished\">Шукати func</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"128\"/>\n        <source>Find interface</source>\n        <translation type=\"unfinished\">Шукати interface</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"130\"/>\n        <source>Find pkg</source>\n        <translation type=\"unfinished\">Шукати pkg</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"132\"/>\n        <source>Find struct</source>\n        <translation type=\"unfinished\">Шукати struct</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"134\"/>\n        <source>Find type</source>\n        <translation type=\"unfinished\">Шукати type</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"136\"/>\n        <source>Find var</source>\n        <translation type=\"unfinished\">Шукати var</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"138\"/>\n        <source>Use Regexp</source>\n        <translation type=\"unfinished\">Регулярний вираз</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"140\"/>\n        <source>Match Case</source>\n        <translation type=\"unfinished\">Врахування регістру</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"142\"/>\n        <source>Match Word</source>\n        <translation type=\"unfinished\">Слово цілком</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"169\"/>\n        <source>Help</source>\n        <translation type=\"unfinished\">Допомога</translation>\n    </message>\n</context>\n<context>\n    <name>FindEditor</name>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"63\"/>\n        <source>Match case</source>\n        <translation>Враховувати регістр</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"64\"/>\n        <source>Regular expression</source>\n        <translation>Регулярний вираз</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"65\"/>\n        <source>Wrap around</source>\n        <translation type=\"unfinished\">Продовжити із початку</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"56\"/>\n        <source>Find Next</source>\n        <translation>Знайти наступне</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"57\"/>\n        <source>Find Previous</source>\n        <oldsource>Find Prev</oldsource>\n        <translation>Знайти попереднє</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"58\"/>\n        <source>Replace With:</source>\n        <translation>Замінити на:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"59\"/>\n        <source>Replace</source>\n        <translation>Замінити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"60\"/>\n        <source>Replace All</source>\n        <translation>Замінити все</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"62\"/>\n        <source>Match whole word only</source>\n        <translation>Тільки цілі слова</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"72\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"250\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"472\"/>\n        <source>Ready</source>\n        <translation>Готово</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"81\"/>\n        <source>Close</source>\n        <translation>Закрити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"84\"/>\n        <source>Show Replace</source>\n        <translation>Показувати заміну</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"103\"/>\n        <source>Find What:</source>\n        <translation>Знайти:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"115\"/>\n        <source>Options:</source>\n        <oldsource>Find Option:</oldsource>\n        <translation>Параметри:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"221\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"393\"/>\n        <source>Not found</source>\n        <translation>Не знайдено</translation>\n    </message>\n</context>\n<context>\n    <name>FolderListView</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"252\"/>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"262\"/>\n        <source>Delete File</source>\n        <translation>Видалити файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"253\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Видалити цей файл назавжди?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"263\"/>\n        <source>Failed to delete the file!</source>\n        <translation>Не вдалося видалити файл!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"275\"/>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"285\"/>\n        <source>Delete Folder</source>\n        <translation>Видалити директорію</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"276\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Видалити цю директорію разом із її вмістом назавжди?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"286\"/>\n        <source>Failed to delete the folder!</source>\n        <translation>Не вдалося видалити директорію!</translation>\n    </message>\n</context>\n<context>\n    <name>FolderRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"166\"/>\n        <source>Folders</source>\n        <translation>Директорії</translation>\n    </message>\n</context>\n<context>\n    <name>FolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"173\"/>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"183\"/>\n        <source>Delete File</source>\n        <translation>Видалити файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"174\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Видалити цей файл назавжди?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"184\"/>\n        <source>Failed to delete the file!</source>\n        <translation>Не вдалося видалити файл!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"230\"/>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"240\"/>\n        <source>Delete Folder</source>\n        <translation>Видалити директорію</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"231\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Видалити цю директорію разом із її вмістом назавжди?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"241\"/>\n        <source>Failed to delete the folder!</source>\n        <translation>Не вдалося видалити директорію!</translation>\n    </message>\n</context>\n<context>\n    <name>GdbDebuggerOption</name>\n    <message>\n        <location filename=\"src/plugins/gdbdebugger/gdbdebuggeroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/gdbdebugger/gdbdebuggeroption.ui\" line=\"20\"/>\n        <source>Enable --tty for program being debugged.</source>\n        <translation>Включити --tty для програми, що зневаджується.</translation>\n    </message>\n</context>\n<context>\n    <name>GoAddTagsDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"14\"/>\n        <source>Add Tags To Struct Field</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"23\"/>\n        <source>Add JSON Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"54\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"105\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"169\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"197\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"281\"/>\n        <source>Options</source>\n        <translation type=\"unfinished\">Параметри</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"61\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"112\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"176\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"204\"/>\n        <source>Multiple options separated by commas</source>\n        <oldsource>Multiple options are separated by commas</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"74\"/>\n        <source>Add XML Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"125\"/>\n        <source>Add Custom Tags</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"155\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"187\"/>\n        <source>Tag Name</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"162\"/>\n        <source>Setup custom tag name</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"299\"/>\n        <source>Sort sorts the tags in increasing order according to the key name</source>\n        <translation type=\"unfinished\">Сортування тегів впорядковує за зростанням назви ключа</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"306\"/>\n        <source>Override current tags when adding tags</source>\n        <translation type=\"unfinished\">Перевизначати наявні теги при додаванні тегів</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"316\"/>\n        <source>Info</source>\n        <translation type=\"unfinished\">Інформація</translation>\n    </message>\n</context>\n<context>\n    <name>GoRemoveTagsDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"14\"/>\n        <source>Remove Tags From Struct Field</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"23\"/>\n        <source>Remove Tags And Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"29\"/>\n        <source>Clear All Tags</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"39\"/>\n        <source>Clear All Tags Options</source>\n        <oldsource>Clear All Tag Options</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"46\"/>\n        <source>Remove JSON Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"53\"/>\n        <source>Remove XML Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"60\"/>\n        <source>Remove Custom Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"70\"/>\n        <source>Multiple tags separated by commas</source>\n        <oldsource>Multiple tags  are separated by commas</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"77\"/>\n        <source>Remove JSON Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"84\"/>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"98\"/>\n        <source>Multiple options separated by commas</source>\n        <oldsource>Multiple options are separated by commas</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"91\"/>\n        <source>Remove XML Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"111\"/>\n        <source>Remove Custom Tag Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"118\"/>\n        <source>Setup remove custom tag and option, example tag=opt1,tag=opt2</source>\n        <oldsource>Setup remove custom tag option, example tag=opt1,tag=opt2</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"121\"/>\n        <source>tag=option</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"131\"/>\n        <source>Info</source>\n        <translation type=\"unfinished\">Інформація</translation>\n    </message>\n</context>\n<context>\n    <name>GolangAst</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"60\"/>\n        <source>No outline available</source>\n        <translation>Дерево недоступне</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"74\"/>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"77\"/>\n        <source>Synchronize with editor</source>\n        <translation>Синхронізувати із редактором</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"80\"/>\n        <source>Go Class View</source>\n        <oldsource>Class View</oldsource>\n        <translation type=\"unfinished\">Класи Go</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"81\"/>\n        <source>Go Outline</source>\n        <oldsource>Outline</oldsource>\n        <translation type=\"unfinished\">Структура Go</translation>\n    </message>\n</context>\n<context>\n    <name>GolangAstOption</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translatorcomment>Shown in settings dialog</translatorcomment>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"20\"/>\n        <source>QuickOpenSymbol</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"26\"/>\n        <source>Show import path</source>\n        <translation>Відображати шлях імпорту</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"33\"/>\n        <source>Match case sensitive</source>\n        <translation>Враховувати регістр</translation>\n    </message>\n</context>\n<context>\n    <name>GolangCodeOption</name>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translatorcomment>Shown in settings dialog</translatorcomment>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"20\"/>\n        <source>PKG automitic import prompt</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"26\"/>\n        <source>PKG automatic import hints for all packages (GOPATH)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"33\"/>\n        <source>PKG automatic import hints for standard package</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"43\"/>\n        <source>Gocode</source>\n        <oldsource>Go API</oldsource>\n        <translation>Gocode</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"56\"/>\n        <source>Auto update depends package when it&apos;s source changed.</source>\n        <oldsource>Auto update depends package when its source is changed.</oldsource>\n        <translatorcomment>autobuild option</translatorcomment>\n        <translation>Оновлювати автоматично при зміні вихідного коду пакету (autobuild).</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"49\"/>\n        <source>Close gocode when exiting</source>\n        <translation>Зупинити gocode після виходу</translation>\n    </message>\n</context>\n<context>\n    <name>GolangDoc</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"100\"/>\n        <source>Godoc Search</source>\n        <translation type=\"unfinished\">Пошук Godoc</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"92\"/>\n        <source>Go Doc Search</source>\n        <oldsource>Golang Doc Search</oldsource>\n        <translation type=\"unfinished\">Документація Golang</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"96\"/>\n        <source>Go Api Index</source>\n        <oldsource>Golang Api Index</oldsource>\n        <translation type=\"unfinished\">Індекс Golang API</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"111\"/>\n        <source>Find Package:</source>\n        <translation type=\"unfinished\">Знайти пакет:</translation>\n    </message>\n</context>\n<context>\n    <name>GolangDocOption</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"20\"/>\n        <source>Go API</source>\n        <translation type=\"unfinished\">Go API</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"26\"/>\n        <source>Use default context (fast)</source>\n        <translation type=\"unfinished\">Використовувати контекст по замовчанню (швидко)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"33\"/>\n        <source>Only load standard API documentation</source>\n        <oldsource>Only load standard api</oldsource>\n        <translation type=\"unfinished\">Завантажити лише доки по стандартному API</translation>\n    </message>\n</context>\n<context>\n    <name>GolangEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"90\"/>\n        <source>View import package use godoc</source>\n        <translation type=\"unfinished\">Переглянути godoc імпортів пакунку</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"93\"/>\n        <source>View Expression Information</source>\n        <translation>Інформація про вираз</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"96\"/>\n        <source>Jump to Declaration</source>\n        <translation>Перейти до оголошення</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"99\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"105\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"108\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"111\"/>\n        <source>Find Usages</source>\n        <translation>Знайти вживання</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"102\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"114\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"117\"/>\n        <source>Rename Symbol Under Cursor</source>\n        <translation>Перейменувати символ під курсором</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"111\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"114\"/>\n        <source>%1 (Module/GOPATH) with GOROOT</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"170\"/>\n        <source>Stop</source>\n        <translation>Зупинити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"175\"/>\n        <source>Go Source Query</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"180\"/>\n        <source>SourceQuery What</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"184\"/>\n        <source>Callees</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"188\"/>\n        <source>Callers</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"192\"/>\n        <source>Callstack</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"196\"/>\n        <source>Definition</source>\n        <translation>Визначення</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"200\"/>\n        <source>Describe</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"204\"/>\n        <source>Freevars</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"208\"/>\n        <source>Implements</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"212\"/>\n        <source>Implements(GOPATH)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"216\"/>\n        <source>Peers</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"220\"/>\n        <source>Referrers</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"224\"/>\n        <source>Pointsto</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"228\"/>\n        <source>Whicherrs</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"232\"/>\n        <source>Add Tags To Struct Field</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"236\"/>\n        <source>Remove Tags From Struct Field</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"354\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"391\"/>\n        <source>Refactor</source>\n        <translation>Рефакторинг</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"361\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"399\"/>\n        <source>SourceQuery</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"812\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"993\"/>\n        <source>Below files in package %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangEditOption</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"20\"/>\n        <source>Mouse</source>\n        <translation>Миша</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"26\"/>\n        <source>Go root source file editor setup read only</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"33\"/>\n        <source>Enable view expression infomation on mouse</source>\n        <translation>Показувати інформацію про вираз при наведенні миші</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"40\"/>\n        <source>Enable mouse navigation</source>\n        <translation>Включити навігацію мишею</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFileSearch</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangfilesearch.cpp\" line=\"59\"/>\n        <source>Golang Find Usages</source>\n        <translation type=\"unfinished\">Golang Знайти використання</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFmtOption</name>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"20\"/>\n        <source>Format Options</source>\n        <oldsource>Golang Format</oldsource>\n        <translation>Параметри форматування</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"26\"/>\n        <source>Goimports updates your Go import lines, adding missing ones and removing unreferenced ones.</source>\n        <translation>Goimports оновлює декларації імпорту Go, додаючи пропущені і видаляючи непотрібні.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"29\"/>\n        <source>Enable update imports line, adding missing ones and removing unreferenced ones.</source>\n        <translation>Оновлювати оголошення імпорту: додавати відсутні та видаляти невикористовувані.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"46\"/>\n        <source>Synchronous</source>\n        <translation type=\"unfinished\">Синхронність</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"52\"/>\n        <source>Synchronous code formatting</source>\n        <oldsource> Synchronous code formatting</oldsource>\n        <translation type=\"unfinished\">Синхронне форматування коду</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"61\"/>\n        <source>Synchronous code formatting timeout in milliseconds (500ms or more):</source>\n        <translation type=\"unfinished\">Затримка синхронного форматування коду в мілісекундах (500 мс чи більше):</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"36\"/>\n        <source>Automatically format code when saving</source>\n        <oldsource>When the editor is saved automatically gofmt</oldsource>\n        <translation>Автоматично форматувати код при збереженні</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFmtPlugin</name>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"58\"/>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"66\"/>\n        <source>Format Code</source>\n        <oldsource>Format Code (goimports)</oldsource>\n        <translation>Форматувати код</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"59\"/>\n        <source>Format Code (Adjusts Imports)</source>\n        <translation>Форматувати код (підправляти import&apos;и)</translation>\n    </message>\n</context>\n<context>\n    <name>GolangPackageOption</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.cpp\" line=\"304\"/>\n        <source>Choose directory to add to GOPATH:</source>\n        <translation type=\"unfinished\">Додати обрану директорію в GOPATH:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"14\"/>\n        <source>Manage GOPATH / Modules</source>\n        <translation type=\"unfinished\">Управляти GOPATH</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"35\"/>\n        <source>Go Modules</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"78\"/>\n        <source>Custom GONOPROXY</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"88\"/>\n        <source>Custom GOPROXY</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"95\"/>\n        <source>Custom GO111MODULE</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"102\"/>\n        <source>Custom GONOSUMDB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"109\"/>\n        <source>Custom GOPRIVATE</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"125\"/>\n        <source>TextLabel</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"137\"/>\n        <source>GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"163\"/>\n        <source>Use System GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"186\"/>\n        <source>Reload</source>\n        <translation type=\"unfinished\">Перезавантажити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"210\"/>\n        <source>Use Custom GOPATH (one per line)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"233\"/>\n        <source>Add Directory...</source>\n        <translation type=\"unfinished\">Додати директорію...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"240\"/>\n        <source>Clear</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangPresentEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"64\"/>\n        <source>Section (s1)</source>\n        <translation>Розділ (s1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"67\"/>\n        <source>Subsection (s2)</source>\n        <translation>Підрозділ (s2)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"70\"/>\n        <source>Sub-subsection (s3)</source>\n        <translation>Під-підрозділ (s2)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"73\"/>\n        <source>Bold</source>\n        <translation>Напівжирний</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"76\"/>\n        <source>Italic</source>\n        <translation>Курсив</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"79\"/>\n        <source>Inline Code</source>\n        <translation type=\"unfinished\">Програмний код</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"82\"/>\n        <source>Switch Bullets</source>\n        <translation type=\"unfinished\">Список</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"85\"/>\n        <source>Comment/Uncomment Selection</source>\n        <translation>Коментувати/розкоментувати виділення</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"88\"/>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"267\"/>\n        <source>Export HTML</source>\n        <translation>Експортувати HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"91\"/>\n        <source>Verify Present</source>\n        <translation type=\"unfinished\">Перевірити презентацію</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"256\"/>\n        <source>Present verify success</source>\n        <translation type=\"unfinished\">Перевірка презентації пройшла успішно</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"258\"/>\n        <source>Present verify false</source>\n        <translation type=\"unfinished\">Перевірка презентації завершилася невдало</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"310\"/>\n        <source>Export PDF</source>\n        <translation>Експортувати в PDF</translation>\n    </message>\n</context>\n<context>\n    <name>GolangSymbol</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangsymbol.cpp\" line=\"62\"/>\n        <source>Quick Open Symbol by Name</source>\n        <translation type=\"unfinished\">Відкрити символ за іменем</translation>\n    </message>\n</context>\n<context>\n    <name>GoplayBrowser</name>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"70\"/>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"132\"/>\n        <source>Go Playground</source>\n        <translation type=\"unfinished\">Ігровий майданчик Go</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"72\"/>\n        <source>Run</source>\n        <translation>Виконати</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"73\"/>\n        <source>Stop</source>\n        <translation>Зупинити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"74\"/>\n        <source>New</source>\n        <translation>Новий</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"75\"/>\n        <source>Load...</source>\n        <translation>Завантажити...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"76\"/>\n        <source>Save...</source>\n        <translation>Зберегти...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"77\"/>\n        <source>Explore Folder</source>\n        <translation type=\"unfinished\">Відкрити директорію в файловому менеджері</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"175\"/>\n        <source>Running...</source>\n        <oldsource>Running...\n\n</oldsource>\n        <translation>Виконується...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"195\"/>\n        <source>Error: %1.</source>\n        <oldsource>\nError: %1.</oldsource>\n        <translation>Помилка: %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"197\"/>\n        <source>Success: %2.</source>\n        <oldsource>\nSuccess: %2.</oldsource>\n        <translation>Успішно: %2.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"247\"/>\n        <source>Load File</source>\n        <translation>Завантажити файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"247\"/>\n        <source>Select a file to load:</source>\n        <translation type=\"unfinished\">Оберіть файл для завантаження:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"263\"/>\n        <source>Save File</source>\n        <translation>Зберегти файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"263\"/>\n        <source>New File Name:</source>\n        <translation type=\"unfinished\">Назва нового файлу:</translation>\n    </message>\n</context>\n<context>\n    <name>HtmlPreview</name>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"71\"/>\n        <source>Page Style</source>\n        <translation>Стиль сторінки</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"76\"/>\n        <source>Reload</source>\n        <translation>Перезавантажити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"77\"/>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"381\"/>\n        <source>Export Html</source>\n        <translation>Експорт HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"78\"/>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"413\"/>\n        <source>Export PDF</source>\n        <translation>Експортувати в PDF</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"79\"/>\n        <source>Print Preview</source>\n        <translation>Попередній перегляд друку</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"82\"/>\n        <source>Synchronize preview and code scrollbars</source>\n        <translation>Синхронізувати гортання перегляду та коду</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"88\"/>\n        <source>Config</source>\n        <translation type=\"unfinished\">Конфігурація</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"168\"/>\n        <source>Plain HTML</source>\n        <translation>Чистий HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"389\"/>\n        <source>Export Failed</source>\n        <translation type=\"unfinished\">Експорт не виконано</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"85\"/>\n        <source>Automatically display preview</source>\n        <oldsource>Automatically Display Preview</oldsource>\n        <translation>Автоматично показувати перегляд</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"99\"/>\n        <source>HTML Preview</source>\n        <oldsource>Html Preview</oldsource>\n        <translation>Попередній перегляд HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"390\"/>\n        <source>Could not open %1 for writing!</source>\n        <oldsource>Can not write file %1</oldsource>\n        <translation>Неможливо відкрити %1 для запису!</translation>\n    </message>\n</context>\n<context>\n    <name>ImageEditor</name>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"52\"/>\n        <source>ZoomIn</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"55\"/>\n        <source>ZoomOut</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"58\"/>\n        <source>Reset to original size</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"61\"/>\n        <source>Fit to view</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"64\"/>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"247\"/>\n        <source>Play movie</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"68\"/>\n        <source>Prev frame</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"72\"/>\n        <source>Next frame</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"244\"/>\n        <source>Pause movie</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>ImageEditorFactory</name>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditorfactory.cpp\" line=\"122\"/>\n        <source>Image Viewer</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>ImportPkgTip</name>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcode.cpp\" line=\"847\"/>\n        <source>warning, pkg not find, please enter to import :</source>\n        <translation type=\"unfinished\">увага, пакунок не знайдено, будь ласка введіть для імпорту:</translation>\n    </message>\n</context>\n<context>\n    <name>JsonEdit</name>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"51\"/>\n        <source>Verify</source>\n        <translation>Перевірити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"53\"/>\n        <source>Format Json</source>\n        <translation>Форматувати Json</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"55\"/>\n        <source>Compact Json</source>\n        <translation>Мінімізувати Json</translation>\n    </message>\n</context>\n<context>\n    <name>LiteApp</name>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"284\"/>\n        <source>Event Log</source>\n        <translation>Журнал подій</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"271\"/>\n        <source>Escape</source>\n        <translation>Escape</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"756\"/>\n        <source>Close File</source>\n        <translation>Закрити файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"759\"/>\n        <source>Close All Files</source>\n        <translation>Закрити всі файли</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"769\"/>\n        <source>Save File</source>\n        <translation>Зберегти файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"772\"/>\n        <source>Save File As...</source>\n        <translation>Зберегти файл як...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"775\"/>\n        <source>Save All Files</source>\n        <translation>Зберегти всі файли</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"762\"/>\n        <source>Open Project</source>\n        <translation>Відкрити проект...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"287\"/>\n        <source>Options</source>\n        <translation>Параметри</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"733\"/>\n        <source>New...</source>\n        <translation>Новий...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"736\"/>\n        <source>Open File...</source>\n        <translation>Відкрити файл...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"739\"/>\n        <source>Open Folder...</source>\n        <translation>Відкрити директорію...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"742\"/>\n        <source>Open Folder in New Window...</source>\n        <translation>Відкрити директорію у новому вікні...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"747\"/>\n        <source>Close All Folders</source>\n        <oldsource>Add Folder...</oldsource>\n        <translation>Закрити всі директорії</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"750\"/>\n        <source>New Window</source>\n        <translation>Нове вікно</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"753\"/>\n        <source>Close Window</source>\n        <translation>Закрити вікно</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"764\"/>\n        <source>Save Project</source>\n        <translation>Зберегти проект</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"766\"/>\n        <source>Close Project</source>\n        <translation>Закрити проект</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"778\"/>\n        <source>Exit</source>\n        <translation>Вийти</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"784\"/>\n        <source>Full Screen</source>\n        <translation>На повний екран</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"788\"/>\n        <source>About LiteIDE</source>\n        <translation>Про LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"794\"/>\n        <source>About Plugins</source>\n        <translation>Про розширення</translation>\n    </message>\n</context>\n<context>\n    <name>LiteAppOption</name>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"30\"/>\n        <source>Store [*]</source>\n        <oldsource>Store</oldsource>\n        <translation>Зберігання [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"57\"/>\n        <source>Language:</source>\n        <translation>Мова:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"144\"/>\n        <source>Icon [*]</source>\n        <translation>Піктограма [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"300\"/>\n        <source>Reload files in session</source>\n        <translation>Перезавантажувати файли з сесії</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"312\"/>\n        <source>Recent Files</source>\n        <oldsource>Recent File</oldsource>\n        <translation>Нещодавні файли</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"318\"/>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"357\"/>\n        <source>Max Count:</source>\n        <oldsource>Max Recent:</oldsource>\n        <translation>Максимальна кількість:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"229\"/>\n        <source>Monitoring files for modifications</source>\n        <translation>Відслідковувати зовнішні зміни файлів</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"41\"/>\n        <source>Store settings to local ini file</source>\n        <translation>Зберігати параметри в локальному ini-файлі</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"51\"/>\n        <source>Interface [*]</source>\n        <translation>Інтерфейс [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"74\"/>\n        <source>Style:</source>\n        <translation>Стиль:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"84\"/>\n        <source>Use tool window shortcuts</source>\n        <translation type=\"unfinished\">Використовувати скорочення для панелей</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"112\"/>\n        <source>Theme [*]</source>\n        <translation>Тема [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"153\"/>\n        <source>Fallback build-in icon library and liteapp/qrc/default</source>\n        <translation>Вбудована бібліотека піктограм та liteapp/qrc/default стають резервними</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"156\"/>\n        <source>Load the external file icon library</source>\n        <oldsource>Load custome icon from liteapp/qrc folder</oldsource>\n        <translation>Використовувати зовнішню бібліотеку піктограм</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"184\"/>\n        <source>Automatically save documents</source>\n        <translation>Автоматично зберігати документи</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"190\"/>\n        <source>Automatically save documents when application is idle</source>\n        <translation>Автоматично зберігати документи, коли додаток неактивний</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"200\"/>\n        <source>sec</source>\n        <translation>сек</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"235\"/>\n        <source>Auto reload or close editor buffer,if underlying file is modified/deleted.</source>\n        <oldsource>Auto reload editor buffer from disk file,if underlying file is modified/deleted.</oldsource>\n        <translation type=\"unfinished\">Автоматично перезавантажувати чи закривати редактор, якщо файл змінено/видалено.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"263\"/>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"269\"/>\n        <source>Session</source>\n        <translation>Сесія</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"325\"/>\n        <source>0-99</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"351\"/>\n        <source>Editor Tabs</source>\n        <translation>Вкладки редактора</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"364\"/>\n        <source>10-999</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"407\"/>\n        <source>Display</source>\n        <translation>Зовнішній вигляд</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"413\"/>\n        <source>Display [*]</source>\n        <translation type=\"unfinished\">Вид [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"419\"/>\n        <source>Show splash screen on startup</source>\n        <translation>Показувати заставку на старті</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"426\"/>\n        <source>Show welcome page on startup</source>\n        <translation>Показувати сторінку привітання на старті</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"509\"/>\n        <source>Editor</source>\n        <translation>Редактор</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"515\"/>\n        <source>Editor tab [*]</source>\n        <translation>Вкладки редактора [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"521\"/>\n        <source>Show close buttons on each editor tab</source>\n        <translation>Показувати кнопку закриття на кожній вкладці редактора</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"528\"/>\n        <source>Enable mouse wheel navigation on tabs</source>\n        <oldsource>Enable mouse wheel selected on tab</oldsource>\n        <translation>Використовувати перемикання вкладок колесом миші</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"436\"/>\n        <source>Toolbar Icon Size [*]</source>\n        <translation>Розмір іконок пеналів [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"538\"/>\n        <source>Editor navigate</source>\n        <translation>Навігація редактором</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"544\"/>\n        <source>Enable mouse extra &apos;Back&apos; button and &apos;Forward&apos; button for go back and forward</source>\n        <translation type=\"unfinished\">Використовувати додаткові кнопки миші &quot;Назад&quot; та &quot;Вперед&quot; для навігації</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"568\"/>\n        <source>Keyboard</source>\n        <translation>Клавіатура</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"574\"/>\n        <source>Format: {Ctrl+B},{Ctrl+Shift+B},{Ctrl+K,Ctrl+U},{Ctrl+Shift+Z;Ctrl+Y}</source>\n        <translation>Формат: {Ctrl+B},{Ctrl+Shift+B},{Ctrl+K,Ctrl+U},{Ctrl+Shift+Z;Ctrl+Y}</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"586\"/>\n        <source>Hide standard commands</source>\n        <translation>Приховати стандартні команди</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"593\"/>\n        <source>Reset</source>\n        <translation>Скинути</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"600\"/>\n        <source>Reset All</source>\n        <translation>Скинути все</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"620\"/>\n        <source>Import...</source>\n        <translation>Імпорт...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"627\"/>\n        <source>Export...</source>\n        <translation>Експорт...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"24\"/>\n        <source>Generic</source>\n        <translation>Загальні</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"118\"/>\n        <source>Theme:</source>\n        <translation>Тема:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"275\"/>\n        <source>Reload session on startup</source>\n        <oldsource>Auto load last session</oldsource>\n        <translation>Завантажувати останню сессію при старті</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"97\"/>\n        <source>SideBarStyle</source>\n        <translation>Стиль бічної панелі</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"98\"/>\n        <source>SplitterStyle</source>\n        <translation>Стиль розділювача</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"82\"/>\n        <source>Command</source>\n        <translation>Команда</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"83\"/>\n        <source>Label</source>\n        <translation>Назва</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"84\"/>\n        <source>Shortcuts</source>\n        <translation>Комбінації клавіш</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"85\"/>\n        <source>NativeText</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"86\"/>\n        <source>Standard</source>\n        <translation>Стандартна</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"506\"/>\n        <source>Import Keyboard Mapping Scheme</source>\n        <translation>Імпорт комбінацій клавіатури</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"506\"/>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"540\"/>\n        <source>Keyboard Mapping Scheme (%1)</source>\n        <translation>Файл комбінацій клавіатури (%1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"513\"/>\n        <source>Could not read scheme from %1!</source>\n        <translation>Не вдалося прочитати комбінації з %1!</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"540\"/>\n        <source>Export Keyboard Mapping Scheme</source>\n        <translation>Експорт комбінацій клавіатури</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"551\"/>\n        <source>Could not write scheme to %1!</source>\n        <translation>Помилка запису комбінацій в %1!</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuild</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"142\"/>\n        <source>Build Toolbar</source>\n        <translation type=\"unfinished\">Панель збірки</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"150\"/>\n        <source>Build Configuration...</source>\n        <oldsource>Build Config</oldsource>\n        <translation>Параметри збирання...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"168\"/>\n        <source>Stop Action</source>\n        <translation>Зупинити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"172\"/>\n        <source>Clear Output</source>\n        <oldsource>Clear All</oldsource>\n        <translation>Очистити журнал</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"176\"/>\n        <source>Execute File</source>\n        <translation>Виконати файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"179\"/>\n        <source>Debug File</source>\n        <translation type=\"unfinished\">Зневадження файлу</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"182\"/>\n        <source>Lock Build Path</source>\n        <oldsource>Lock Go Build Path</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"184\"/>\n        <source>Build Path Configuration</source>\n        <oldsource>Go Build Configuration</oldsource>\n        <translation type=\"unfinished\">Налаштування шляху збирання</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"230\"/>\n        <source>Use godoc View</source>\n        <translation type=\"unfinished\">Відкрити Godoc</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"287\"/>\n        <source>Line Wrap</source>\n        <translation>Перенос рядків</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"291\"/>\n        <source>Auto Clear</source>\n        <translation>Автоматично очищати</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"295\"/>\n        <source>Automatic positioning cursor</source>\n        <translation type=\"unfinished\">Автоматично переносити курсор</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"310\"/>\n        <source>Setup</source>\n        <translation type=\"unfinished\">Настройка</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"318\"/>\n        <source>Build Output</source>\n        <oldsource>Build</oldsource>\n        <translation type=\"unfinished\">Результати збирання</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"731\"/>\n        <source>Current environment change id &quot;%1&quot;</source>\n        <translation type=\"unfinished\">Ідентифікатор конфігурації &quot;%1&quot;</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1145\"/>\n        <source>Lock Build</source>\n        <oldsource>Lock Build: %1</oldsource>\n        <translation type=\"unfinished\">Замкнути збірку</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1489\"/>\n        <source>Error: %1.</source>\n        <oldsource>Error: %1.\n</oldsource>\n        <translation>Помилка: %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1492\"/>\n        <source>Command exited with code %1.</source>\n        <translation>Команда завершилась із кодом %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1494\"/>\n        <source>Success: %1.</source>\n        <oldsource>Success: %1.\n</oldsource>\n        <translation type=\"unfinished\">Все ок: %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1543\"/>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1596\"/>\n        <source>A process is currently running.  Stop the current action first.</source>\n        <oldsource>A process is currently running.  Stop the current action first.\n</oldsource>\n        <translation type=\"unfinished\">Процес вже виконується. Потрібно його перервати (меню Збірка/Перервати).</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1582\"/>\n        <source>Killing current process...</source>\n        <oldsource>Killing current process...\n</oldsource>\n        <translation>Зупиняємо поточний процес...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1592\"/>\n        <source>Failed to terminate the existing process!</source>\n        <oldsource>Failed to terminate the existing process!\n</oldsource>\n        <translation>Не вдалося зупинити існуючий процес!</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1802\"/>\n        <source>Started process successfully</source>\n        <oldsource>Started process successfully\n</oldsource>\n        <translation>Процесс запущено успішно</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1802\"/>\n        <source>Failed to start process</source>\n        <translation>Не вдалося запустити процес</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuildOption</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"20\"/>\n        <source>Recheck Go installation when changing environments</source>\n        <oldsource>Recheck go env if enviroment changed</oldsource>\n        <translation type=\"unfinished\">Перевірити інсталляцію Go після зміни конфігурації оточення</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"27\"/>\n        <source>Build command configuration files [*]</source>\n        <oldsource>Build command configuration files:</oldsource>\n        <translation type=\"unfinished\">Файли конфігурації команд збирання [*]</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuildPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"102\"/>\n        <source>Close</source>\n        <translation>Закрити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"105\"/>\n        <source>Execute:</source>\n        <oldsource>Exec:</oldsource>\n        <translation>Виконати:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"112\"/>\n        <source>Execute File</source>\n        <oldsource>Execute</oldsource>\n        <translation>Виконати файл</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebug</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"114\"/>\n        <source>Stop</source>\n        <translation>Зупинити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"75\"/>\n        <source>Clear</source>\n        <translation type=\"unfinished\">Очистити вивід</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"111\"/>\n        <source>Continue</source>\n        <translation>Продовжити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"117\"/>\n        <source>Show Current Line</source>\n        <translation>Показати точку виконання</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"189\"/>\n        <source>Debug Output</source>\n        <oldsource>Debug</oldsource>\n        <translation type=\"unfinished\">Відлагодження</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"105\"/>\n        <source>Start Debugging External Application...</source>\n        <oldsource>Start Debugging External Application</oldsource>\n        <translation>Зневадження зовнішньої програми...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"93\"/>\n        <source>Close</source>\n        <translation>Закрити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"108\"/>\n        <source>Start Debugging</source>\n        <translation>Почати зневадження</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"120\"/>\n        <source>Step Into</source>\n        <translation type=\"unfinished\">Крок із заходом</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"123\"/>\n        <source>Step Over</source>\n        <translation type=\"unfinished\">Крок із обходом</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"126\"/>\n        <source>Step Out</source>\n        <translation type=\"unfinished\">Крок із виходом</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"129\"/>\n        <source>Run to Line</source>\n        <translation>Виконати до позиції курсору</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"132\"/>\n        <source>Insert/Remove Breakpoint</source>\n        <translation>Вставити/Видалити точку зупинки</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"135\"/>\n        <source>Remove All Breakpoints</source>\n        <translation>Видалити всі точки зупинки</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebugOption</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"20\"/>\n        <source>Debug</source>\n        <translation>Зневадження</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"26\"/>\n        <source>Automatically insert breakpoint main.main when debugging</source>\n        <oldsource>Automatically add breakpoint main.main when debugging</oldsource>\n        <translation>Автоматично додавати точку зупинки в main.main під час зневадження</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebugPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugplugin.cpp\" line=\"58\"/>\n        <source>Debug Window</source>\n        <oldsource>Debug</oldsource>\n        <translation>Вікно зневадження</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDoc</name>\n    <message>\n        <location filename=\"src/plugins/welcome/litedoc.cpp\" line=\"63\"/>\n        <source>LiteIDE Documentation</source>\n        <oldsource>LiteIDE Document Browser</oldsource>\n        <translation>Документація LiteIDE</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditor</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"254\"/>\n        <source>Undo</source>\n        <translation>Скасувати</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"257\"/>\n        <source>Redo</source>\n        <translation>Повторити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"260\"/>\n        <source>Cut</source>\n        <translation>Вирізати</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"263\"/>\n        <source>Copy</source>\n        <translation>Копіювати</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"266\"/>\n        <source>Paste</source>\n        <translation>Вставити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"268\"/>\n        <source>Select All</source>\n        <translation>Виділити все</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"301\"/>\n        <source>Go to Doc Start</source>\n        <translation>Перейти до початку документу</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"305\"/>\n        <source>Go to Doc End</source>\n        <translation>Перейти в кінець документу</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"309\"/>\n        <source>Go to Line Start</source>\n        <translation>Перейти на початок рядка</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"313\"/>\n        <source>Go to Line End</source>\n        <translation>Перейти в кінець рядка</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"317\"/>\n        <source>Go to Previous Line</source>\n        <translation>Перейти до попереднього рядка</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"321\"/>\n        <source>Go to Next Line</source>\n        <translation>Перейти до наступного рядка</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"325\"/>\n        <source>Go to Previous Character</source>\n        <translation>Перейти до попереднього символа</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"329\"/>\n        <source>Go to Next Charater</source>\n        <translation>Перейти до наступного символа</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"333\"/>\n        <source>Go to Previous Word</source>\n        <translation>Перейти до попереднього слова</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"337\"/>\n        <source>Go to Next Word</source>\n        <translation>Перейти до наступного слова</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"358\"/>\n        <source>Go to Line</source>\n        <translation>Перейти до рядка</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"361\"/>\n        <source>File is readonly</source>\n        <translation>Файл тільки для читання</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"364\"/>\n        <source>File is writable</source>\n        <translation>Файл доступний на запис</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"404\"/>\n        <source>Line Wrap (MimeType)</source>\n        <oldsource>Word Wrap (MimeType)</oldsource>\n        <translation>Перенесення тексту</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"415\"/>\n        <source>Toggle Comment</source>\n        <translation>Закоментувати/розкоментувати</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"418\"/>\n        <source>Toggle Block Commnet</source>\n        <translation>Закоментувати/розкоментувати блок</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"421\"/>\n        <source>Auto-indent Selection</source>\n        <translation>Автовідступи у виділеному тексті</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"425\"/>\n        <source>Tab To Spaces (MimeType)</source>\n        <translation>Табуляцію замінити на пробіли</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"429\"/>\n        <source>Line End Windows (\\r\\n)</source>\n        <translation>Кінці рядків Windows (\\r\\n)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"433\"/>\n        <source>Line End Unix (\\n)</source>\n        <translation>Кінці рядків Unix (\\n)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"437\"/>\n        <source>Visualize Whitespace (Global)</source>\n        <translation>Візуалізувати пробіли</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"444\"/>\n        <source>Move Line Up</source>\n        <translation>Пересунути рядок угору</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"447\"/>\n        <source>Move Line Down</source>\n        <translation>Пересунути рядок вниз</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"450\"/>\n        <source>Copy Line Up</source>\n        <translation>Копіювати рядок угору</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"453\"/>\n        <source>Copy Line Down</source>\n        <translation>Копіювати рядок вниз</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"456\"/>\n        <source>Join Lines</source>\n        <translation>Об&apos;єднати рядки</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"459\"/>\n        <source>Title Case</source>\n        <translation>Як у реченні</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"463\"/>\n        <source>Upper Case</source>\n        <translation>ВЕРХНІЙ РЕГІСТР</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"467\"/>\n        <source>Lower Case</source>\n        <translation>нижній регістр</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"471\"/>\n        <source>Swap Case</source>\n        <translation>Змінити на зворотній</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"475\"/>\n        <source>Tab To Spaces</source>\n        <translation>Табуляцію в пробіли</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"479\"/>\n        <source>Spaces To Tab</source>\n        <translation>Пробіли в табуляцію</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"645\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"733\"/>\n        <source>Advanced</source>\n        <translation>Додатково</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"671\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"751\"/>\n        <source>Goto</source>\n        <translation>Перейти</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"696\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"774\"/>\n        <source>Convert Tab</source>\n        <translation>Перетворити табуляцію</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"700\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"778\"/>\n        <source>Code Folding</source>\n        <translation>Згортання коду</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"690\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"768\"/>\n        <source>Convert Case</source>\n        <translation>Змінити регістр</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1199\"/>\n        <source>Export HTML</source>\n        <translation>Експортувати HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1207\"/>\n        <source>Export Failed</source>\n        <translation>Експорт завершився невдало</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1208\"/>\n        <source>Could not open %1 for writing.</source>\n        <translation>Не вдалося відкрити %1 для запису.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1227\"/>\n        <source>Export PDF</source>\n        <translation>Експорт в PDF</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1252\"/>\n        <source>Print Document</source>\n        <translation>Друк документу</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"286\"/>\n        <source>Print Preview...</source>\n        <oldsource>Print Preview Document</oldsource>\n        <translation>Перегляд перед друком...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"282\"/>\n        <source>Export HTML...</source>\n        <translation>Експортувати HTML...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"284\"/>\n        <source>Export PDF...</source>\n        <translation>Експортувати PDF...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"285\"/>\n        <source>Print...</source>\n        <translation>Друк...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"288\"/>\n        <source>Go to Previous Block</source>\n        <oldsource>Go To Previous Block</oldsource>\n        <translation>Перейти до попереднього блоку</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"295\"/>\n        <source>Select Block</source>\n        <translation>Вибрати блок</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"298\"/>\n        <source>Go to Matching Brace</source>\n        <oldsource>Go To Matching Brace</oldsource>\n        <translation>Перейти до відповідної фігурної дужки</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"341\"/>\n        <source>Fold</source>\n        <translation>Згорнути</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"344\"/>\n        <source>Unfold</source>\n        <translation>Розгорнути</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"347\"/>\n        <source>Fold All</source>\n        <translation>Згорнути все</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"350\"/>\n        <source>Unfold All</source>\n        <translation>Розгорнути все</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1327\"/>\n        <source>Go To Line</source>\n        <oldsource>Goto Line</oldsource>\n        <translation>Перейти до рядка</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"368\"/>\n        <source>Duplicate</source>\n        <translation>Дублювати</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"372\"/>\n        <source>Delete Line</source>\n        <translation>Видалити рядок</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"376\"/>\n        <source>Copy Line</source>\n        <translation>Копіювати рядок</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"380\"/>\n        <source>Cut Line</source>\n        <translation>Вирізати рядок</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"384\"/>\n        <source>Insert Line Before</source>\n        <translation>Вставити пустий рядок перед поточним</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"388\"/>\n        <source>Insert Line After</source>\n        <translation>Вставити пустий рядок після поточного</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"392\"/>\n        <source>Increase Font Size</source>\n        <translation>Збільшити розмір шрифту</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"395\"/>\n        <source>Decrease Font Size</source>\n        <translation>Зменшити розмір шрифту</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"398\"/>\n        <source>Reset Font Size</source>\n        <translation>Відновити розмір шрифту</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"401\"/>\n        <source>Clean Whitespace</source>\n        <translation>Очистити пробіли</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"408\"/>\n        <source>Code Complete</source>\n        <translation>Доповнити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"706\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"784\"/>\n        <source>Settings</source>\n        <oldsource>File Setup</oldsource>\n        <translation>Налаштування</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"892\"/>\n        <source>Reload File</source>\n        <translation>Перезавантажити файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1269\"/>\n        <source>Do you want to permanently discard unsaved modifications and reload %1?</source>\n        <translation>Перезавантажити %1 та відкинути незбережені зміни?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"291\"/>\n        <source>Go to Next Block</source>\n        <oldsource>Go To Next Block</oldsource>\n        <translation>Перейти до наступного блоку</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1301\"/>\n        <source>ReadOnly</source>\n        <translation>Тільки для читання</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1327\"/>\n        <source>Line: </source>\n        <translation>Рядок: </translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorFileFactory</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorfilefactory.cpp\" line=\"203\"/>\n        <source>Text Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorOption</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"408\"/>\n        <source>Load File</source>\n        <translation>Завантаження файлу</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"414\"/>\n        <source>Check and convert no printable char to &apos;.&apos;</source>\n        <translation>Перевіряти та перетворювати символи, що не відображаються, в &apos;.&apos;</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"30\"/>\n        <source>Font</source>\n        <translation>Шрифт</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"24\"/>\n        <source>Font &amp;&amp; Colors</source>\n        <translation>Шрифти та Кольори</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"38\"/>\n        <source>Family:</source>\n        <translation>Сімейство:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"48\"/>\n        <source>Show Monospace Font</source>\n        <translation>Показувати моноширинні шрифти</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"72\"/>\n        <source>Size:</source>\n        <translation>Розмір:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"92\"/>\n        <source>Zoom:</source>\n        <translation>Масштаб:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"99\"/>\n        <source>%</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"118\"/>\n        <source>Antialias</source>\n        <translation>Згладжування</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"138\"/>\n        <source>Restore Default Font</source>\n        <translation>Встановити типовий шрифт</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"150\"/>\n        <source>Editor Color Scheme</source>\n        <oldsource>ColorStyle Scheme</oldsource>\n        <translation type=\"unfinished\">Колірна схема редактора</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"158\"/>\n        <source>File:</source>\n        <translation>Файл:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"175\"/>\n        <source>Edit</source>\n        <translation>Редагувати</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"220\"/>\n        <source>Syntax Auto-completion</source>\n        <oldsource>Auto complete brackets</oldsource>\n        <translation>Автоматичне додавання парних символів</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"302\"/>\n        <source>Fuzzy code completion</source>\n        <translation type=\"unfinished\">Нечітке доповнення коду</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"350\"/>\n        <source>Clean completion cache when saving files</source>\n        <translation type=\"unfinished\">Очищати кеш автодоповнення при збереженні файлів</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"357\"/>\n        <source>Clean whitespace when saving files</source>\n        <translation type=\"unfinished\">Видаляти надлишкові пробіли при збереженні файлів</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"364\"/>\n        <source>Enable scroll wheel zooming</source>\n        <translation>Включити масштабування колесом миші</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"371\"/>\n        <source>Add copied text into the clipboard as HTML</source>\n        <translation type=\"unfinished\">Додавати копійований текст до буфера обміну як HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"378\"/>\n        <source>Allow vertical scrolling to the last line [*]</source>\n        <translation type=\"unfinished\">Дозволяти вертикальне гортання до останнього рядка [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"437\"/>\n        <source>Display VisualizeWhitespace</source>\n        <translation>Показувати візуалізацію пробілів</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"451\"/>\n        <source>Word wrap by default</source>\n        <translation type=\"unfinished\">Переносити рядки по словах</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"430\"/>\n        <source>Display code fold</source>\n        <translation>Показувати згортання коду</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"509\"/>\n        <source>Display offset position</source>\n        <translation>Показувати позицію в файлі</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"533\"/>\n        <source>File Types</source>\n        <translation>Типи файлів</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"214\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"289\"/>\n        <source>Behavior</source>\n        <translation>Поведінка</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"444\"/>\n        <source>Display EOF</source>\n        <translation>Показувати символ кінця файлу (EOF)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"458\"/>\n        <source>Display line numbers</source>\n        <translation>Показувати номера рядків</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"465\"/>\n        <source>Display indent guide</source>\n        <oldsource>Display indent guide </oldsource>\n        <translation>Показувати відступи</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"474\"/>\n        <source>Display right margin at column</source>\n        <translation>Показувати праву межу в стовпці</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"295\"/>\n        <source>Automatic indentation</source>\n        <oldsource>Enable automatic indentation</oldsource>\n        <translation>Увімкнути автоматичні відступи</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"309\"/>\n        <source>Case sensitive code completion</source>\n        <oldsource>Completer case sensitive</oldsource>\n        <translation>Доповнювати код із врахуванням регістру</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"318\"/>\n        <source>Code completion prefix length:</source>\n        <oldsource>Word Complete Prefix Length</oldsource>\n        <translation>Довжина префіксу для автодоповнення:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"402\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"424\"/>\n        <source>Display</source>\n        <translation>Вигляд</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"74\"/>\n        <source>MIME Type</source>\n        <translation>Типи MIME</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"75\"/>\n        <source>Tab Width</source>\n        <translation>Ширина табуляції</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"76\"/>\n        <source>Tab To Spaces</source>\n        <translation>Табуляцію в пробіли</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"78\"/>\n        <source>File Extensions</source>\n        <translation>Розширення файлів</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"77\"/>\n        <source>Custom Extensions</source>\n        <translation>Нетипові розширення</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorPlugin</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorplugin.cpp\" line=\"71\"/>\n        <source>Edit ToolBar</source>\n        <translation>Панель редактора</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorplugin.cpp\" line=\"77\"/>\n        <source>Edit Navigation Bar</source>\n        <translation>Панель навігації редактора</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEnvOption</name>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"20\"/>\n        <source>Environment definition files:</source>\n        <translation>Файли визначення оточення:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"33\"/>\n        <source>Environment changes will take effect after switching environments.</source>\n        <translation>Зміни до оточення будуть застосовані після перемикання оточень.</translation>\n    </message>\n</context>\n<context>\n    <name>LiteFindPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"72\"/>\n        <source>Find</source>\n        <translation>Знайти</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"75\"/>\n        <source>Find Next</source>\n        <translation>Знайти наступне</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"78\"/>\n        <source>Find Previous</source>\n        <translation>Знайти попереднє</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"81\"/>\n        <source>Replace</source>\n        <translation>Замінити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"87\"/>\n        <source>File Search</source>\n        <translation>Пошук в файлах</translation>\n    </message>\n</context>\n<context>\n    <name>LiteTabWidget</name>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"62\"/>\n        <source>Open a new tab</source>\n        <translation>Відкрити нову вкладку</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"65\"/>\n        <source>List All Tabs</source>\n        <translation>Перелік вкладок</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"71\"/>\n        <source>Close Tab</source>\n        <translation>Закрити вкладку</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownBatchBrowser</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"142\"/>\n        <source>Markdown Exporter</source>\n        <oldsource>Markdown Batch</oldsource>\n        <translation>Експортер формату Markdown</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"162\"/>\n        <source>All Files (*)</source>\n        <translation>Всі файли (*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"231\"/>\n        <source>Select the folder containing your markdown files:</source>\n        <oldsource>Select Markdown Folder</oldsource>\n        <translation>Оберіть директорію з Markdown-файлами:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"242\"/>\n        <source>Select Markdown Files</source>\n        <translation>Вибрати Markdown-файли</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"290\"/>\n        <source>Select the folder to contain separated markdown exports:</source>\n        <translation>Виберіть директорію для збереження окремих експортів Markdown:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"303\"/>\n        <source>Export Merged HTML</source>\n        <oldsource>Export Html</oldsource>\n        <translation>Експортувати об&apos;єднаний HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"378\"/>\n        <source>Export Merged PDF</source>\n        <oldsource>Export PDF</oldsource>\n        <translation>Експортувати об&apos;єднаний PDF</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownBatchWidget</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"20\"/>\n        <source>Markdown Source Files</source>\n        <oldsource>Markdown Files</oldsource>\n        <translation>Вихідні файли Markdown</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"38\"/>\n        <source>Import Folder...</source>\n        <oldsource>Import Folder</oldsource>\n        <translation>Імпортувати директорію...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"45\"/>\n        <source>Add Files...</source>\n        <oldsource>Add Files</oldsource>\n        <translation>Додати файли...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"52\"/>\n        <source>Move Up</source>\n        <translation>Посунути вгору</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"59\"/>\n        <source>Move Down</source>\n        <translation>Посунути донизу</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"66\"/>\n        <source>Remove</source>\n        <translation>Видалити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"73\"/>\n        <source>Remove All</source>\n        <translation>Видалити все</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"98\"/>\n        <source>Options</source>\n        <translation>Параметри</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"106\"/>\n        <source>Export Folder:</source>\n        <translation>Директорія експорту:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"116\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>Огляд...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"127\"/>\n        <source>Use CSS</source>\n        <translation>Використовувати CSS</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"137\"/>\n        <source>Insert horizontal line between merged files</source>\n        <oldsource>Merge files insert split &lt;hr&gt;</oldsource>\n        <translation>Вставляти горизонтальні лінії між об&apos;єднаними файлами</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"144\"/>\n        <source>Insert page break between merged files</source>\n        <oldsource>Merge files insert page break</oldsource>\n        <translation>Вставляти переходи на нову сторінку в об&apos;єднаних файлах</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"169\"/>\n        <source>Export</source>\n        <oldsource>Export Util</oldsource>\n        <translation>Експорт</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"175\"/>\n        <source>Export Separated HTML</source>\n        <oldsource>Separate Html</oldsource>\n        <translation>Експортувати окремі HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"182\"/>\n        <source>Export Separated PDF</source>\n        <oldsource>Separate PDF</oldsource>\n        <translation>Експортувати окремі PDF</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"189\"/>\n        <source>Export Merged HTML...</source>\n        <oldsource>Merge Html</oldsource>\n        <translation>Експортувати об&apos;єднаний HTML...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"196\"/>\n        <source>Export Merged PDF...</source>\n        <oldsource>Merge PDF</oldsource>\n        <translation>Експортувати об&apos;єднаний PDF...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"203\"/>\n        <source>Print Preview Merged...</source>\n        <oldsource>Merge Print Preview</oldsource>\n        <translation>Перегляд перед друком...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"210\"/>\n        <source>Print Merged</source>\n        <oldsource>Merge Print</oldsource>\n        <translation>Друк об&apos;єднаного</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"233\"/>\n        <source>Log</source>\n        <translation>Журнал</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownEdit</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"83\"/>\n        <source>Header (h1)</source>\n        <oldsource>Header &lt;h1&gt;</oldsource>\n        <translation>Заголовок (h1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"86\"/>\n        <source>Header (h2)</source>\n        <oldsource>Header &lt;h2&gt;</oldsource>\n        <translation>Заголовок (h2)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"89\"/>\n        <source>Header (h3)</source>\n        <oldsource>Header &lt;h3&gt;</oldsource>\n        <translation>Заголовок (h3)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"92\"/>\n        <source>Header (h4)</source>\n        <oldsource>Header &lt;h4&gt;</oldsource>\n        <translation>Заголовок (h4)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"95\"/>\n        <source>Header (h5)</source>\n        <oldsource>Header &lt;h5&gt;</oldsource>\n        <translation>Заголовок (h5)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"98\"/>\n        <source>Header (h6)</source>\n        <oldsource>Header &lt;h6&gt;</oldsource>\n        <translation>Заголовок (h6)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"101\"/>\n        <source>Bold</source>\n        <translation>Жирний</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"104\"/>\n        <source>Italic</source>\n        <translation>Курсив</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"107\"/>\n        <source>Inline Code</source>\n        <translation type=\"unfinished\">Рядковий код</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"110\"/>\n        <source>Link</source>\n        <translation>Посилання</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"113\"/>\n        <source>Image</source>\n        <translation>Зображення</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"116\"/>\n        <source>Unordered List</source>\n        <translation>Список з позначками</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"119\"/>\n        <source>Ordered List</source>\n        <translation>Нумерований список</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"122\"/>\n        <source>Blockquote</source>\n        <translation>Цитата</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"125\"/>\n        <source>Horizontal Rule</source>\n        <translation>Горизонтальна лінія</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"131\"/>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"154\"/>\n        <source>Heading</source>\n        <translation>Заголовок</translation>\n    </message>\n</context>\n<context>\n    <name>MultiFolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"299\"/>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"306\"/>\n        <source>Delete Folder</source>\n        <translation>Видалити директорію</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"300\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>Видалити цю директорію разом із її вмістом назавжди?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"307\"/>\n        <source>Failed to delete the folder!</source>\n        <translation>Не вдалося видалити директорію!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"320\"/>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"327\"/>\n        <source>Delete File</source>\n        <translation>Видалити файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"321\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>Видалити цей файл назавжди?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"328\"/>\n        <source>Failed to delete the file!</source>\n        <translation>Не вдалося видалити файл!</translation>\n    </message>\n</context>\n<context>\n    <name>NavigateBar</name>\n    <message>\n        <location filename=\"src/utils/navigate/navigate.cpp\" line=\"146\"/>\n        <location filename=\"src/utils/navigate/navigate.cpp\" line=\"169\"/>\n        <source>Browser Files in %1</source>\n        <translation type=\"unfinished\">Переглянути файли в %1</translation>\n    </message>\n</context>\n<context>\n    <name>NewFileDialog</name>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"14\"/>\n        <source>New Project or File</source>\n        <translation>Новий проект чи файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"124\"/>\n        <source>Browse...</source>\n        <translation type=\"unfinished\">Відкрити...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"24\"/>\n        <source>GOPATH:</source>\n        <translation>GOPATH:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"38\"/>\n        <source>Template:</source>\n        <oldsource>Template</oldsource>\n        <translation type=\"unfinished\">Шаблон:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"54\"/>\n        <source>Type</source>\n        <translation>Тип</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"73\"/>\n        <source>Information</source>\n        <translation>Інформація</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"87\"/>\n        <source>Name:</source>\n        <translation>Назва:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"114\"/>\n        <source>Location:</source>\n        <translation>Локація:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"127\"/>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"185\"/>\n        <source>Error</source>\n        <translation type=\"unfinished\">Помилка</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"127\"/>\n        <source>Could not create the target directory: %1</source>\n        <translation type=\"unfinished\">Не можу створити цільову директорію: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"132\"/>\n        <source>Warning</source>\n        <translation type=\"unfinished\">Попередження</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"132\"/>\n        <source>Location %1 is not empty.\nUse the target directory anyway?</source>\n        <translation type=\"unfinished\">%1 не порожня.\nВсе одно використовувати цю директорію?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"169\"/>\n        <source>Overwrite File</source>\n        <translation type=\"unfinished\">Перезаписати файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"169\"/>\n        <source>%1 already exists.\nDo you want to replace it?</source>\n        <translation type=\"unfinished\">%1 вже існує. Замінити?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"185\"/>\n        <source>No files could be created.</source>\n        <translation type=\"unfinished\">Не вдалося створити жодного файлу.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"280\"/>\n        <source>File template details:</source>\n        <translation type=\"unfinished\">Деталі шаблону:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"282\"/>\n        <source>Project template details:</source>\n        <oldsource>New project wizard:</oldsource>\n        <translation type=\"unfinished\">Шаблон нового проекту:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"362\"/>\n        <source>Choose a directory for the new content:</source>\n        <translation type=\"unfinished\">Вибрати директорію для нового вмісту:</translation>\n    </message>\n</context>\n<context>\n    <name>OpenEditorsWidget</name>\n    <message>\n        <location filename=\"src/liteapp/openeditorswidget.cpp\" line=\"43\"/>\n        <source>Open Documents</source>\n        <translation>Відкриті документи</translation>\n    </message>\n</context>\n<context>\n    <name>OptionsBrowser</name>\n    <message>\n        <location filename=\"src/liteapp/optionsbrowser.cpp\" line=\"57\"/>\n        <source>Options</source>\n        <oldsource>Options Page</oldsource>\n        <translation>Параметри</translation>\n    </message>\n</context>\n<context>\n    <name>OptionsWidget</name>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"14\"/>\n        <source>Options</source>\n        <translation>Параметри</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"56\"/>\n        <source>Info</source>\n        <translation>Інформація</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"106\"/>\n        <source>[*] item request restart of LiteIDE</source>\n        <oldsource>[*] item requeset restart LiteIDE</oldsource>\n        <translation>[*] - вимагає перезапуску LiteIDE</translation>\n    </message>\n</context>\n<context>\n    <name>OutputDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"444\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"472\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"473\"/>\n        <source>Move To</source>\n        <translation type=\"unfinished\">Пересунути в</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"446\"/>\n        <source>LeftSideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"447\"/>\n        <source>RightSideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"480\"/>\n        <source>BottomDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>OutputOption</name>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"20\"/>\n        <source>Font</source>\n        <translation>Шрифт</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"26\"/>\n        <source>Family:</source>\n        <translation>Сімейство:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"43\"/>\n        <source>Size:</source>\n        <translation>Розмір:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"60\"/>\n        <source>Zoom:</source>\n        <translation>Масштаб:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"67\"/>\n        <source>%</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"86\"/>\n        <source>Antialias</source>\n        <translation>Згладжування</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"109\"/>\n        <source>Display</source>\n        <translation>Вигляд</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"115\"/>\n        <source>Use editor color scheme</source>\n        <translation>Використовувати кольорову схему редактора</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"124\"/>\n        <source>Sets the maximum number of lines</source>\n        <translation>Максимальне число рядків:</translation>\n    </message>\n</context>\n<context>\n    <name>PackageBrowser</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"87\"/>\n        <source>Manage GOPATH/Modules ...</source>\n        <oldsource>Manage GOPATH...</oldsource>\n        <translation type=\"unfinished\">Управляти GOPATH...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"86\"/>\n        <source>Reload All</source>\n        <translation type=\"unfinished\">Перезавантажити все</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"93\"/>\n        <source>Use godoc View</source>\n        <translation type=\"unfinished\">Відкрити Godoc</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"94\"/>\n        <source>Load Package in New Window</source>\n        <translation type=\"unfinished\">Завантажити пакет в новому вікні</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"95\"/>\n        <source>Add Package to Folders</source>\n        <translation type=\"unfinished\">Додати пакет в директорії</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"96\"/>\n        <source>Open Source File</source>\n        <translation type=\"unfinished\">Відкрити файл коду</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"97\"/>\n        <source>Copy Name to Clipboard</source>\n        <oldsource>Copy Name To Clipboard</oldsource>\n        <translation type=\"unfinished\">Скопіювати ім`я до буферу обміну</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"119\"/>\n        <source>Go Package Browser</source>\n        <oldsource>Package Browser</oldsource>\n        <translation type=\"unfinished\">Перегляд пакетів</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"208\"/>\n        <source>Loading Go package list...</source>\n        <oldsource>Loading go package ...</oldsource>\n        <translation type=\"unfinished\">Завантажую список пакетів Go...</translation>\n    </message>\n</context>\n<context>\n    <name>PackageProject</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"76\"/>\n        <source>Reload Package</source>\n        <translation>Перезавантажити пакунок</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"77\"/>\n        <source>Open Explorer Here</source>\n        <translation>Відкрити в файловому менеджері</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"78\"/>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"299\"/>\n        <source>Add Source File</source>\n        <translation>Додати вихідний файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"299\"/>\n        <source>File Name:</source>\n        <translation>Ім&apos;я файлу:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"310\"/>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"315\"/>\n        <source>Error</source>\n        <translation>Помилка</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"310\"/>\n        <source>File %1 already exists.</source>\n        <translation>Файл %1 вже існує.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"315\"/>\n        <source>Could not open %1 for writing.</source>\n        <translation>Неможливо відкрити %1 для запису.</translation>\n    </message>\n</context>\n<context>\n    <name>PluginsDialog</name>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.ui\" line=\"14\"/>\n        <source>Installed Plugins</source>\n        <oldsource>Install Plugins</oldsource>\n        <translation>Встановлені додатки</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.ui\" line=\"45\"/>\n        <source>Close</source>\n        <translation>Закрити</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"51\"/>\n        <source>Name</source>\n        <translation>Назва</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"54\"/>\n        <source>Author</source>\n        <oldsource>Anchor</oldsource>\n        <translation>Автор</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"52\"/>\n        <source>Enabled</source>\n        <translation>Включено</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"53\"/>\n        <source>Details</source>\n        <translation>Деталі</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"55\"/>\n        <source>Version</source>\n        <oldsource>Last Ver</oldsource>\n        <translation>Версія</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"56\"/>\n        <source>File Name</source>\n        <oldsource>FileName</oldsource>\n        <translation>Им&apos;я файлу</translation>\n    </message>\n</context>\n<context>\n    <name>ProcessEx</name>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"52\"/>\n        <source>process exited with code %1</source>\n        <translation>процес завершився із кодом %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"55\"/>\n        <source>process crashed or was terminated</source>\n        <translation>процес завершився аварійно чи був завершений іззовні</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"58\"/>\n        <source>process exited with an unknown status</source>\n        <translation>процес завершився із невідомим статусом</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"68\"/>\n        <source>process failed to start</source>\n        <translation>процес не вдалося запустити</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"71\"/>\n        <source>process crashed or was terminated while running</source>\n        <translation>процес завершився аварійно чи був завершений іззовні під час виконання</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"74\"/>\n        <source>timed out waiting for process</source>\n        <translation>вийшов тамйм очікування процесу</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"77\"/>\n        <source>couldn&apos;t read from the process</source>\n        <translation>не вдалося прочитати з процесу</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"80\"/>\n        <source>couldn&apos;t write to the process</source>\n        <translation type=\"unfinished\">не вдалося записати в процес</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"84\"/>\n        <source>an unknown error occurred</source>\n        <translation>сталася невідома помилка</translation>\n    </message>\n</context>\n<context>\n    <name>ProjectManager</name>\n    <message>\n        <location filename=\"src/liteapp/projectmanager.cpp\" line=\"95\"/>\n        <source>Project &lt;%1&gt;</source>\n        <translation>Проект &lt;%1&gt;</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/projectmanager.cpp\" line=\"119\"/>\n        <source>Import Directory &lt;%1&gt;</source>\n        <translation>Імпортувати директорію &lt;%1&gt;</translation>\n    </message>\n</context>\n<context>\n    <name>QFileSystemModel</name>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"46\"/>\n        <source>%1 TB</source>\n        <translation>%1 ТБ</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"48\"/>\n        <source>%1 GB</source>\n        <translation>%1 ГБ</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"50\"/>\n        <source>%1 MB</source>\n        <translation>%1 МБ</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"52\"/>\n        <source>%1 KB</source>\n        <translation>%1 КБ</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"53\"/>\n        <source>%1 bytes</source>\n        <translation>%1 байт(ів)</translation>\n    </message>\n</context>\n<context>\n    <name>QJson::ParserRunnable</name>\n    <message>\n        <location filename=\"src/3rdparty/qjson/src/parserrunnable.cpp\" line=\"64\"/>\n        <source>An error occurred while parsing json: %1</source>\n        <translation>Помилка розбору JSON: %1</translation>\n    </message>\n</context>\n<context>\n    <name>QJsonParseError</name>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"59\"/>\n        <source>no error occurred</source>\n        <translation>помилки відсутні</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"60\"/>\n        <source>unterminated object</source>\n        <translation>незавершений об&apos;єкт</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"61\"/>\n        <source>missing name separator</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"62\"/>\n        <source>unterminated array</source>\n        <translation>незавершений масив</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"63\"/>\n        <source>missing value separator</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"64\"/>\n        <source>illegal value</source>\n        <translation>недопустиме значення</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"65\"/>\n        <source>invalid termination by number</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"66\"/>\n        <source>illegal number</source>\n        <translation>недопустиме число</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"67\"/>\n        <source>invalid escape sequence</source>\n        <translation>недопустима управляюча послідовність</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"68\"/>\n        <source>invalid UTF8 string</source>\n        <translation>недопустимий рядок UTF8</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"69\"/>\n        <source>unterminated string</source>\n        <translation>незавершений рядок</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"70\"/>\n        <source>object is missing after a comma</source>\n        <translation>відсутній об&apos;єкт після коми</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"71\"/>\n        <source>too deeply nested document</source>\n        <translation>документ має надмірну вкладеність</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"72\"/>\n        <source>too large document</source>\n        <translation>занадто великий документ</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"73\"/>\n        <source>garbage at the end of the document</source>\n        <translation>мотлох в кінці документу</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenAction</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenaction.cpp\" line=\"59\"/>\n        <source>Show and Run Commands</source>\n        <translation>Показ та виконання команд</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenEditor</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopeneditor.cpp\" line=\"56\"/>\n        <source>Show All Opened Editors</source>\n        <oldsource>Show All Editors</oldsource>\n        <translation>Список відкритих редакторів</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFileSystem</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfilesystem.cpp\" line=\"156\"/>\n        <source>File System</source>\n        <translation>Файлова система</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFiles</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfiles.cpp\" line=\"72\"/>\n        <source>Go to File</source>\n        <translation>Перейти до файлу</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfiles.cpp\" line=\"77\"/>\n        <source>Type &apos;?&apos; to get help on the actions you can take from here</source>\n        <translation>Напишіть &apos;?&apos; для отримання довідки з доступних дій</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFolder</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfolder.cpp\" line=\"71\"/>\n        <source>Browser Folder</source>\n        <translation type=\"unfinished\">Перегляд директорій</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenHelp</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenhelp.cpp\" line=\"49\"/>\n        <source>Show All Quick Open Actions</source>\n        <oldsource>Show Quick Open Help</oldsource>\n        <translation type=\"unfinished\">Показати всі дії Quick Open</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenLines</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"51\"/>\n        <source>Go to Line</source>\n        <translation>Перейти до рядка</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"79\"/>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"84\"/>\n        <source>Open a text file first to go to a line</source>\n        <translation>Спершу відкрийте файл для переходу до рядка</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"97\"/>\n        <source>Type a line number between %1 and %2 to navigate to</source>\n        <translation>Вкажіть номер рядка між %1 та %2 для переходу</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"100\"/>\n        <source>Go to Line %1</source>\n        <oldsource>Go to line %1</oldsource>\n        <translation>Перейти до рядка %1</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenManager</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"82\"/>\n        <source>Quick Open File</source>\n        <translation>Quick Open Файли</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"83\"/>\n        <source>Quick Open Editor</source>\n        <translation>Quick Open Редактори</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"84\"/>\n        <source>Quick Open Symbol</source>\n        <translation>Quick Open Символи</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"85\"/>\n        <source>Quick Open Command</source>\n        <translation>Quick Open Команди</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"86\"/>\n        <source>Show All Quick Open Actions</source>\n        <translation type=\"unfinished\">Показати всі дії Quick Open</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenMimeType</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmimetype.cpp\" line=\"41\"/>\n        <source>Go to Symbol in File</source>\n        <oldsource>Open Symbol by Name</oldsource>\n        <translation>Перейти до символа у файлі</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmimetype.cpp\" line=\"42\"/>\n        <source>not found symbol</source>\n        <translation>символ не знайдено</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenOption</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>Форма</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"20\"/>\n        <source>QuickOpenFiles</source>\n        <translation>Quick Open Файли</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"26\"/>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"79\"/>\n        <source>Match case sensitive</source>\n        <translation>Враховувати регістр</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"35\"/>\n        <source>Max files count:</source>\n        <translation>Максимальне число файлів:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"73\"/>\n        <source>QuickOpenEditor</source>\n        <translation>Quick Open Редактори</translation>\n    </message>\n</context>\n<context>\n    <name>RecentManager</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.cpp\" line=\"54\"/>\n        <source>Clear All History</source>\n        <translation>Очистити всю історію</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.cpp\" line=\"169\"/>\n        <source>Clear Menu</source>\n        <translation>Очистити меню</translation>\n    </message>\n</context>\n<context>\n    <name>SearchEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"83\"/>\n        <source>Search</source>\n        <translation type=\"unfinished\">Пошук</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"84\"/>\n        <source>Stop Search</source>\n        <translation type=\"unfinished\">Зупинити пошук</translation>\n    </message>\n</context>\n<context>\n    <name>SelectExternalDialog</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"14\"/>\n        <source>Debug External Application</source>\n        <translation type=\"unfinished\">Відлагодження зовнішньої програми</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"22\"/>\n        <source>Application:</source>\n        <translation type=\"unfinished\">Програма:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"29\"/>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"56\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation type=\"unfinished\">Відкрити...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"36\"/>\n        <source>Arguments:</source>\n        <translation type=\"unfinished\">Аргументи:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"46\"/>\n        <source>Working directory:</source>\n        <translation type=\"unfinished\">Робоча директорія:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.cpp\" line=\"82\"/>\n        <source>Select Executable</source>\n        <translation type=\"unfinished\">Вибрати програму</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.cpp\" line=\"92\"/>\n        <source>Select the working directory:</source>\n        <oldsource>Select Working Directory</oldsource>\n        <translation type=\"unfinished\">Оберіть робочу директорію:</translation>\n    </message>\n</context>\n<context>\n    <name>SessionRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"197\"/>\n        <source>Sessions</source>\n        <translation>Сесії</translation>\n    </message>\n</context>\n<context>\n    <name>SideDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"50\"/>\n        <source>Move To</source>\n        <translation type=\"unfinished\">Перемістити в</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"54\"/>\n        <source>RightSideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"56\"/>\n        <source>LeftDockWidgt</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"58\"/>\n        <source>LeftSideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"60\"/>\n        <source>RightDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"63\"/>\n        <source>OutputBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"75\"/>\n        <source>SideBar</source>\n        <translation>Бічна панель</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"76\"/>\n        <source>Show SideBar</source>\n        <translation>Показувати бічну панель</translation>\n    </message>\n</context>\n<context>\n    <name>SideWindowStyle</name>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"547\"/>\n        <source>Hide SideBar</source>\n        <translation>Приховати бічну панель</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"585\"/>\n        <source>SideBar Windows</source>\n        <translation>Вікна бічної панелі</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"586\"/>\n        <source>Output Windows</source>\n        <translatorcomment>Вікна виводу?</translatorcomment>\n        <translation>Вікна виведення</translation>\n    </message>\n</context>\n<context>\n    <name>SplitDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"300\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"379\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"380\"/>\n        <source>Move To</source>\n        <translation type=\"unfinished\">Перемістити в</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"302\"/>\n        <source>Top</source>\n        <translation type=\"unfinished\">Верх</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"306\"/>\n        <source>Top (Split)</source>\n        <translation type=\"unfinished\">Верх (розділити)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"343\"/>\n        <source>TopDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"343\"/>\n        <source>TopDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"312\"/>\n        <source>Bottom</source>\n        <translation type=\"unfinished\">Низ</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"316\"/>\n        <source>Bottom (Split)</source>\n        <translation type=\"unfinished\">Низ (розділити)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"345\"/>\n        <source>BottomDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"345\"/>\n        <source>BottomDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"322\"/>\n        <source>Left</source>\n        <translation type=\"unfinished\">Ліво</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"326\"/>\n        <source>Left (Split)</source>\n        <translation type=\"unfinished\">Ліво (розділити)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"347\"/>\n        <source>LeftDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"347\"/>\n        <source>LeftDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"332\"/>\n        <source>Right</source>\n        <translation type=\"unfinished\">Право</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"336\"/>\n        <source>Right (Split)</source>\n        <translation type=\"unfinished\">Право (розділити)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"349\"/>\n        <source>RightDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"349\"/>\n        <source>RightDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"355\"/>\n        <source>Unsplit</source>\n        <translation type=\"unfinished\">Не розділяти</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"360\"/>\n        <source>Split</source>\n        <translation type=\"unfinished\">Розділити</translation>\n    </message>\n</context>\n<context>\n    <name>SplitWindowStyle</name>\n    <message>\n        <location filename=\"src/liteapp/splitwindowstyle.cpp\" line=\"244\"/>\n        <source>Hide Sidebars</source>\n        <translation>Приховати бічні панелі</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/splitwindowstyle.cpp\" line=\"278\"/>\n        <source>Tool Windows</source>\n        <translation type=\"unfinished\">Панелі інструментів</translation>\n    </message>\n</context>\n<context>\n    <name>Terminal</name>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"132\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"189\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"773\"/>\n        <source>New</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"133\"/>\n        <source>Open a new terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"135\"/>\n        <source>Close</source>\n        <translation type=\"unfinished\">Закрити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"136\"/>\n        <source>Close current terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"138\"/>\n        <source>CloseAll</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"139\"/>\n        <source>Close all terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"142\"/>\n        <source>LoadEnv</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"143\"/>\n        <source>Current terminal load environment from LiteIDE</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"148\"/>\n        <source>Filter</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"184\"/>\n        <source>Dark Mode</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"195\"/>\n        <source>Login Mode (shell --login)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"237\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"741\"/>\n        <source>Terminal</source>\n        <translation type=\"unfinished\">Термінал</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"741\"/>\n        <source>Rename Tab Title</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>TerminalEdit</name>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"67\"/>\n        <source>Cut</source>\n        <translation>Вирізати</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"71\"/>\n        <source>Copy</source>\n        <translation>Копіювати</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"75\"/>\n        <source>Paste</source>\n        <translation>Вставити</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"79\"/>\n        <source>Select All</source>\n        <translation>Виділити все</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"83\"/>\n        <source>Clear All</source>\n        <translation>Очистити все</translation>\n    </message>\n</context>\n<context>\n    <name>TextEditor::Internal::ColorScheme</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_texteditor/colorscheme.cpp\" line=\"212\"/>\n        <source>Not a color scheme file.</source>\n        <translation>Файл не є схемою кольору.</translation>\n    </message>\n</context>\n<context>\n    <name>Utils::FilterLineEdit</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_editutil/filterlineedit.cpp\" line=\"51\"/>\n        <source>Filter</source>\n        <translation>Фільтрувати</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_editutil/filterlineedit.cpp\" line=\"52\"/>\n        <source>Clear text</source>\n        <translation>Очистити фільтр</translation>\n    </message>\n</context>\n<context>\n    <name>VTermWidget</name>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"50\"/>\n        <source>Copy</source>\n        <translation type=\"unfinished\">Копіювати</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"54\"/>\n        <source>Paste</source>\n        <translation type=\"unfinished\">Вставити</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"58\"/>\n        <source>Select All</source>\n        <translation type=\"unfinished\">Виділити все</translation>\n    </message>\n</context>\n<context>\n    <name>WebKitBrowser</name>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"69\"/>\n        <source>Navigation</source>\n        <translation>Навігація</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"72\"/>\n        <source>Open Html File</source>\n        <oldsource>Open Html</oldsource>\n        <translation>Відкрити HTML файл</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"119\"/>\n        <source>WebKitBrowser</source>\n        <translation>Переглядач WebKit</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"169\"/>\n        <source>False load %1 !</source>\n        <translation>Не вдалося завантажити %1!</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"256\"/>\n        <source>Open Html or Markdown File</source>\n        <oldsource>Open Html or Markdown Files</oldsource>\n        <translation>Відкрити файл з HTML або Markdown</translation>\n    </message>\n</context>\n<context>\n    <name>WebKitHtmlWidgetPlugin</name>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkithtmlwidgetplugin.cpp\" line=\"74\"/>\n        <source>Open Html or Markdown File</source>\n        <oldsource>Open Html or Markdown Files</oldsource>\n        <translation>Відкрити файл з HTML або Markdown</translation>\n    </message>\n</context>\n<context>\n    <name>WelcomeBrowser</name>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"65\"/>\n        <source>New</source>\n        <translation>Створити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"66\"/>\n        <source>Open</source>\n        <translation>Відкрити</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"67\"/>\n        <source>Open Folder</source>\n        <translation>Відкрити директорію</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"68\"/>\n        <source>Options</source>\n        <translation>Параметри</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"207\"/>\n        <source>Welcome</source>\n        <oldsource>Welcome Page</oldsource>\n        <translation>Ласкаво просимо</translation>\n    </message>\n</context>\n<context>\n    <name>WelcomePlugin</name>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomeplugin.cpp\" line=\"77\"/>\n        <source>Welcome</source>\n        <oldsource>Home</oldsource>\n        <translation>Ласкаво просимо</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "liteidex/liteide_zh.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.1\" language=\"zh_CN\">\n<context>\n    <name>AboutDialog</name>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"20\"/>\n        <source>About LiteIDE</source>\n        <oldsource>About Liteide</oldsource>\n        <translation>关于 LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"156\"/>\n        <source>Information</source>\n        <oldsource>Infomation</oldsource>\n        <translation>信息</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"162\"/>\n        <source>Welcome:</source>\n        <translation>欢迎:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"168\"/>\n        <source>Welcome to LiteIDE X! LiteIDE is a simple, open source, cross-platform IDE.</source>\n        <oldsource>Welcome to LiteIDE X!\nLiteIDE is a simple, open source, cross-platform IDE.</oldsource>\n        <translation>欢迎使用 LiteIDE X! LiteIDE是一个轻量级的开源跨平台IDE.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"178\"/>\n        <source>Project:</source>\n        <translation>项目:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"208\"/>\n        <source>Name:</source>\n        <translation>名称:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"191\"/>\n        <source>Author:</source>\n        <translation>作者:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"222\"/>\n        <source>Version:</source>\n        <translation>版本:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"242\"/>\n        <source>Build:</source>\n        <translation>编译:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"215\"/>\n        <source>Based on Qt</source>\n        <oldsource>Based on Qt Version</oldsource>\n        <translation>基于 Qt</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"249\"/>\n        <source>Source Code:</source>\n        <translation>源代码:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"263\"/>\n        <source>Support LiteIDE:</source>\n        <oldsource>Support</oldsource>\n        <translation>支持LiteIDE:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"297\"/>\n        <source>Developers</source>\n        <translation>开发者</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"400\"/>\n        <source>Translations</source>\n        <translation>翻译</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"412\"/>\n        <source>Chinese</source>\n        <translation>中文</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"426\"/>\n        <source>Japanese</source>\n        <translation>日文</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"440\"/>\n        <source>Russian</source>\n        <translation>俄文</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"454\"/>\n        <source>French</source>\n        <translation>法文</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"468\"/>\n        <source>Traditional Chinese</source>\n        <translation>繁体中文</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"482\"/>\n        <source>German</source>\n        <translation>德文</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"513\"/>\n        <source>Ukrainian</source>\n        <translation>乌克兰文</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"544\"/>\n        <source>Thanks to...</source>\n        <translation>感谢...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"577\"/>\n        <source>License</source>\n        <translation>许可协议</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"619\"/>\n        <source>Close</source>\n        <translation>关闭</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.cpp\" line=\"42\"/>\n        <source>Based on Qt %1 (%2 bit)</source>\n        <translation>基于 Qt %1 (%2 位)</translation>\n    </message>\n</context>\n<context>\n    <name>ActionManager</name>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"65\"/>\n        <source>&amp;File</source>\n        <translation>文件(&amp;F)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"66\"/>\n        <source>&amp;Recent</source>\n        <translation>历史(&amp;R)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"67\"/>\n        <source>&amp;Edit</source>\n        <translation>编辑(&amp;E)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"68\"/>\n        <source>F&amp;ind</source>\n        <oldsource>&amp;Find</oldsource>\n        <translation>查找(&amp;I)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"69\"/>\n        <source>&amp;View</source>\n        <translation>查看(&amp;V)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"74\"/>\n        <source>&amp;Tools</source>\n        <translation>工具(&amp;T)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"75\"/>\n        <source>&amp;Build</source>\n        <translation>编译(&amp;B)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"76\"/>\n        <source>&amp;Debug</source>\n        <translation>调试(&amp;D)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"77\"/>\n        <source>&amp;Help</source>\n        <translation>帮助(&amp;H)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"79\"/>\n        <source>Standard Toolbar</source>\n        <oldsource>Standard ToolBar</oldsource>\n        <translation>标准工具栏</translation>\n    </message>\n</context>\n<context>\n    <name>AstWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangast/astwidget.cpp\" line=\"76\"/>\n        <source>Go To Definition</source>\n        <translation>跳转到声明</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/astwidget.cpp\" line=\"77\"/>\n        <source>View Import Document</source>\n        <translation>查看Import文档</translation>\n    </message>\n</context>\n<context>\n    <name>BaseDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"77\"/>\n        <source>Hide</source>\n        <translation>隐藏</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"78\"/>\n        <source>Hide Tool Window</source>\n        <translation>隐藏工具窗口</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"87\"/>\n        <source>Floating Window</source>\n        <translation>浮动窗口</translation>\n    </message>\n</context>\n<context>\n    <name>BaseFolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"78\"/>\n        <source>Open In New Window</source>\n        <translation>在新窗口打开</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"79\"/>\n        <source>Open File</source>\n        <translation>打开文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"80\"/>\n        <source>New File...</source>\n        <translation>新建文件...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"81\"/>\n        <source>New File Wizard...</source>\n        <translation>新建文件向导...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"82\"/>\n        <source>Rename File...</source>\n        <translation>重命名文件...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"83\"/>\n        <source>Delete File</source>\n        <translation>删除文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"85\"/>\n        <source>New Folder...</source>\n        <translation>新建目录...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"86\"/>\n        <source>Rename Folder...</source>\n        <translation>重命名目录...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"87\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"335\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"342\"/>\n        <source>Delete Folder</source>\n        <translation>删除目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"100\"/>\n        <source>Open Terminal Here</source>\n        <translation>在此打开终端</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"90\"/>\n        <source>Show in Explorer</source>\n        <oldsource>Open Explorer Here</oldsource>\n        <translation>在资源管理器中显示</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"77\"/>\n        <source>Open Application</source>\n        <translation>运行应用程序</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"92\"/>\n        <source>Show in Finder</source>\n        <translation>在Finder中显示</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"94\"/>\n        <source>Show Containing Folder</source>\n        <translation>显示包含文件夹</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"98\"/>\n        <source>Open Command Prompt Here</source>\n        <translation>在此打开命令提示符</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"102\"/>\n        <source>Open in Integrated Terminal</source>\n        <translation>打开集成终端</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"104\"/>\n        <source>Open Folder...</source>\n        <oldsource>Add Folder...</oldsource>\n        <translation>打开目录...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"105\"/>\n        <source>Reload Folder</source>\n        <translation>重新读取目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"106\"/>\n        <source>Close Folder</source>\n        <translation>关闭目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"108\"/>\n        <source>Close All Folders</source>\n        <translation>关闭所有目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"110\"/>\n        <source>Copy</source>\n        <translation>复制</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"111\"/>\n        <source>Paste</source>\n        <translation>粘贴</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"113\"/>\n        <source>Copy Path</source>\n        <translation>复制路径</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"115\"/>\n        <source>Move To Trash</source>\n        <translation>移动到回收站</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"198\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"208\"/>\n        <source>Create File</source>\n        <translation>建立文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"199\"/>\n        <source>A file with that name already exists!</source>\n        <translation>文件已存在!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"209\"/>\n        <source>Failed to create the file!</source>\n        <translation>建立文件失败!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"239\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"245\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"250\"/>\n        <source>Rename File</source>\n        <translation>文件更名</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"239\"/>\n        <source>New Name:</source>\n        <translation>新名称:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"246\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"251\"/>\n        <source>Failed to rename the file!</source>\n        <translation>重命名文件失败!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"504\"/>\n        <source>An item &quot;%1&quot; already exists in this location. Do you want to replace it and move old item to trash?</source>\n        <translation>项目 &quot;%1&quot; 本地已存在，确定替换并将旧项目移到到回收站?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"505\"/>\n        <source>Stop</source>\n        <translation>停止</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"506\"/>\n        <source>Keep Both</source>\n        <translation>保持两者</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"507\"/>\n        <source>Keep Both All</source>\n        <translation>全部保留两者</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"508\"/>\n        <source>Replace</source>\n        <translation>替换</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"509\"/>\n        <source>Replace All</source>\n        <translation>替换所有</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"609\"/>\n        <source>Are you sure that you want move to trash this item?</source>\n        <translation>确定移动项目到回收站?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"612\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"615\"/>\n        <source>Are you sure that you want move to trash %1 items?</source>\n        <translation>确定移动 %1 个项目到回收站?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"618\"/>\n        <source>Move to Trash</source>\n        <translation>移动到回收站</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"662\"/>\n        <source>Open With</source>\n        <translation>用...打开</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"669\"/>\n        <source>System Editor</source>\n        <translation>系统编辑器</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"290\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"293\"/>\n        <source>Create Folder</source>\n        <translation>建立目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"291\"/>\n        <source>A folder with that name already exists!</source>\n        <translation>目录名已存在!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"294\"/>\n        <source>Failed to create the folder!</source>\n        <translation>建立目录失败!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"307\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"316\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"321\"/>\n        <source>Rename Folder</source>\n        <translation>目录更名</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"307\"/>\n        <source>Folder Name</source>\n        <translation>目录名</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"317\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"322\"/>\n        <source>Failed to rename the folder!</source>\n        <translation>重命名目录失败!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"336\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>您确定要删除此文件夹及所有内容?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"343\"/>\n        <source>Failed to delete the folder!</source>\n        <translation>删除目录失败!</translation>\n    </message>\n</context>\n<context>\n    <name>BookmarkManager</name>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"61\"/>\n        <source>Toggle Bookmark</source>\n        <translation>切换书签</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"96\"/>\n        <source>Goto bookmark</source>\n        <translation>跳转书签</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"97\"/>\n        <source>Remove bookmark</source>\n        <translation>删除书签</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"98\"/>\n        <source>Remove all bookmarks for this file</source>\n        <translation>删除这个文件的全部书签</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"99\"/>\n        <source>Remove all bookmarks for all files</source>\n        <translation>删除全部书签</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"115\"/>\n        <source>Bookmarks</source>\n        <translation>书签</translation>\n    </message>\n</context>\n<context>\n    <name>BookmarkRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"81\"/>\n        <source>Bookmarks</source>\n        <translation>书签</translation>\n    </message>\n</context>\n<context>\n    <name>BuildConfigDialog</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"14\"/>\n        <source>Build Configuration</source>\n        <oldsource>Build Config Dialog</oldsource>\n        <translation>编译配置</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"71\"/>\n        <source>Build ID</source>\n        <translation>编译 ID</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"45\"/>\n        <source>Build Path</source>\n        <oldsource>Build File</oldsource>\n        <translation>编译目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"85\"/>\n        <source>GOPATH</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"103\"/>\n        <source>GOPATH information</source>\n        <translation>GOPATH 信息</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"147\"/>\n        <source>Use Custom GOPATH for Build Path</source>\n        <translation>编译目录使用自定义 GOPATH</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"159\"/>\n        <source>Inherit System GOPATH</source>\n        <translation>继承 系统 GOPATH</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"179\"/>\n        <source>Inherit LiteIDE GOPATH</source>\n        <translation>继承 LiteIDE GOPATH</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"201\"/>\n        <source>Custom GOPATH (one per line)</source>\n        <translation>自定义 GOPATH （每行一个）</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"221\"/>\n        <source>Add Directory...</source>\n        <translation>添加目录...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"228\"/>\n        <source>Clear</source>\n        <translation>清除</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"244\"/>\n        <source>LiteIDE</source>\n        <translation>LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"266\"/>\n        <source>Config</source>\n        <translation>配置</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"288\"/>\n        <source>Action</source>\n        <translation>动作</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"310\"/>\n        <source>Custom</source>\n        <oldsource>Build Custom</oldsource>\n        <translation>自定义</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"343\"/>\n        <source>Reset all to initial value</source>\n        <translation>全部重置为初始值</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"69\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"73\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"77\"/>\n        <source>Name</source>\n        <translation>名称</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"70\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"74\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"78\"/>\n        <source>Value</source>\n        <translation>值</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"79\"/>\n        <source>SharedValue</source>\n        <translation>共享值</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"82\"/>\n        <source>Id</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"83\"/>\n        <source>Cmd</source>\n        <translation>命令</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"293\"/>\n        <source>Choose directory to add to GOPATH:</source>\n        <translation>选择目录添加到 GOPATH:</translation>\n    </message>\n</context>\n<context>\n    <name>CreateDirDialog</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"94\"/>\n        <source>Create Folder</source>\n        <translation>建立目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"96\"/>\n        <source>Directory:</source>\n        <translation>当前目录:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"98\"/>\n        <source>Dir Name:</source>\n        <translation>目录名:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"106\"/>\n        <source>Create</source>\n        <translation>新建</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"107\"/>\n        <source>Cancel</source>\n        <translation>取消</translation>\n    </message>\n</context>\n<context>\n    <name>CreateFileDialog</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"44\"/>\n        <source>Create File</source>\n        <oldsource>Create File Dialog</oldsource>\n        <translation>新建文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"46\"/>\n        <source>Directory:</source>\n        <translation>当前目录:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"48\"/>\n        <source>File Name:</source>\n        <translation>文件名称:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"56\"/>\n        <source>Create</source>\n        <translation>新建</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"57\"/>\n        <source>Create and Edit</source>\n        <translation>新建并编辑</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"58\"/>\n        <source>Cancel</source>\n        <translation>取消</translation>\n    </message>\n</context>\n<context>\n    <name>DebugWidget</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"122\"/>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"321\"/>\n        <source>Add Watch</source>\n        <translation>添加监视</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"221\"/>\n        <source>Async Record</source>\n        <oldsource>AsyncRecord</oldsource>\n        <translation>同步记录</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"222\"/>\n        <source>Variables</source>\n        <translation>变量</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"223\"/>\n        <source>Watch</source>\n        <translation>监视</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"224\"/>\n        <source>Call Stack</source>\n        <oldsource>CallStack</oldsource>\n        <translation>调用堆栈</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"225\"/>\n        <source>Threads</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"226\"/>\n        <source>Goroutines</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"227\"/>\n        <source>Registers</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"228\"/>\n        <source>Libraries</source>\n        <oldsource>Library</oldsource>\n        <translation>动态库</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"229\"/>\n        <source>Console</source>\n        <translation>控制台</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"321\"/>\n        <source>Watch expression (e.g. buf main.var os.Stdout):</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"124\"/>\n        <source>Remove Watch</source>\n        <translation>移除监视</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"125\"/>\n        <source>Remove All Watches</source>\n        <translation>移除所有监视</translation>\n    </message>\n</context>\n<context>\n    <name>DlvDebuggerOption</name>\n    <message>\n        <location filename=\"src/plugins/dlvdebugger/dlvdebuggeroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/dlvdebugger/dlvdebuggeroption.ui\" line=\"20\"/>\n        <source>delve debug pass flags: (example --check-go-version=false)</source>\n        <translation>delve debug pass flags:（示例 --check go version=false）</translation>\n    </message>\n</context>\n<context>\n    <name>DocumentBrowser</name>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"67\"/>\n        <source>Back</source>\n        <oldsource>Backward</oldsource>\n        <translation>返回</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"68\"/>\n        <source>Forward</source>\n        <translation>前进</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"69\"/>\n        <source>Reload</source>\n        <translation>刷新</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"75\"/>\n        <source>Increase Font Size</source>\n        <translation>增大字号</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"78\"/>\n        <source>Decrease Font Size</source>\n        <translation>减小字号</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"81\"/>\n        <source>Reset Font Size</source>\n        <translation>重置字号</translation>\n    </message>\n</context>\n<context>\n    <name>DocumentBrowserFactory</name>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowserfactory.cpp\" line=\"67\"/>\n        <source>DocumentBrowser</source>\n        <translation>文档浏览器</translation>\n    </message>\n</context>\n<context>\n    <name>EditorManager</name>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"139\"/>\n        <source>Close</source>\n        <translation>关闭</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"165\"/>\n        <source>Move to New Window</source>\n        <oldsource>Move To New Window</oldsource>\n        <translation>移动到新窗口</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"233\"/>\n        <source>Navigate Forward</source>\n        <oldsource>GoForward</oldsource>\n        <translation>前进</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"141\"/>\n        <source>Close Others</source>\n        <oldsource>Close Others Tabs</oldsource>\n        <translation>关闭其他标签</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"111\"/>\n        <source>Open Editor</source>\n        <translation>打开文档</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"142\"/>\n        <source>Close All</source>\n        <oldsource>Close All Tabs</oldsource>\n        <translation>关闭所有标签</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"143\"/>\n        <source>Close Left Tabs</source>\n        <translation>关闭左侧所有标签</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"144\"/>\n        <source>Close Right Tabs</source>\n        <translation>关闭右侧所有标签</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"145\"/>\n        <source>Close Files in Same Folder</source>\n        <oldsource>Close Same Folder Files</oldsource>\n        <translation>关闭相同目录文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"146\"/>\n        <source>Close Files in Other Folders</source>\n        <oldsource>Close Other Folder Files</oldsource>\n        <translation>关闭其他目录文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"147\"/>\n        <source>Copy Full Path to Clipboard</source>\n        <oldsource>Copy Path to Clipboard</oldsource>\n        <translation>复制完整路径到剪贴板</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"150\"/>\n        <source>Show in Explorer</source>\n        <translation>在资源管理器中显示</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"152\"/>\n        <source>Show in Finder</source>\n        <translation>在Finder中显示</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"154\"/>\n        <source>Show Containing Folder</source>\n        <translation>显示包含文件夹</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"158\"/>\n        <source>Open Command Prompt Here</source>\n        <translation>在此打开命令提示符</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"160\"/>\n        <source>Open Terminal Here</source>\n        <translation>在此打开终端</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"162\"/>\n        <source>Open in Integrated Terminal</source>\n        <translation>打开集成终端</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"224\"/>\n        <source>Navigate Backward</source>\n        <translation>返回</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"426\"/>\n        <source>Save changes to %1?</source>\n        <translation>保存修改到 %1 ?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"427\"/>\n        <source>Unsaved Modifications</source>\n        <oldsource>Save Modify</oldsource>\n        <translation>未保存修改</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"524\"/>\n        <source>All Files (*)</source>\n        <translation>所有文件(*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"526\"/>\n        <source>Save As</source>\n        <translation>另存为</translation>\n    </message>\n</context>\n<context>\n    <name>EnvManager</name>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"436\"/>\n        <source>Environment Toolbar</source>\n        <oldsource>Environment ToolBar</oldsource>\n        <translation>环境工具栏</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"443\"/>\n        <source>Switching current environment</source>\n        <oldsource>Switch Current Environment</oldsource>\n        <translation>切换当前环境</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"446\"/>\n        <source>Edit current environment</source>\n        <oldsource>Edit Current Environment</oldsource>\n        <translation>编辑当前环境</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"447\"/>\n        <source>Reload current environment</source>\n        <oldsource>Reload Current Environment</oldsource>\n        <translation>重新加载当前环境</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"451\"/>\n        <source>Select Environment</source>\n        <translation>选择环境</translation>\n    </message>\n</context>\n<context>\n    <name>ExportDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"14\"/>\n        <source>Dialog</source>\n        <translation>对话框</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"22\"/>\n        <source>Name:</source>\n        <translation>名称:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"49\"/>\n        <source>Export</source>\n        <translation>导出</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"56\"/>\n        <source>ExportAndView</source>\n        <translation>导出并查看</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"194\"/>\n        <source>Use Vim-style Editing</source>\n        <translation>使用Vim样式编辑</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"196\"/>\n        <source>Read .vimrc</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"198\"/>\n        <source>Path to .vimrc</source>\n        <translation></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal::FakeVimHandler</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"153\"/>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"161\"/>\n        <source>Unknown option: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"156\"/>\n        <source>Argument must be positive: %1=%2</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"949\"/>\n        <source>Mark &quot;%1&quot; not set.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3538\"/>\n        <source>%1%2%</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3540\"/>\n        <source>%1All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3554\"/>\n        <source>Not implemented in FakeVim.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5719\"/>\n        <source>Unknown option:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5730\"/>\n        <source>Invalid argument:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5733\"/>\n        <source>Trailing characters:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5816\"/>\n        <source>Move lines into themselves.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5860\"/>\n        <source>%n lines moved.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5920\"/>\n        <source>File &quot;%1&quot; exists (add ! to override)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5934\"/>\n        <source>Cannot open file &quot;%1&quot; for writing</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5940\"/>\n        <source>&quot;%1&quot; %2 %3L, %4C written.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5949\"/>\n        <source>Cannot open file &quot;%1&quot; for reading</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5978\"/>\n        <source>&quot;%1&quot; %2L, %3C</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6005\"/>\n        <source>%n lines filtered.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6093\"/>\n        <source>Cannot open file %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6259\"/>\n        <source>Invalid regular expression: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6295\"/>\n        <source>Pattern not found: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6299\"/>\n        <source>Search hit BOTTOM, continuing at TOP.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6300\"/>\n        <source>Search hit TOP, continuing at BOTTOM.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6305\"/>\n        <source>Search hit BOTTOM without match for: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6306\"/>\n        <source>Search hit TOP without match for: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6413\"/>\n        <source>%n lines indented.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6470\"/>\n        <source>%n lines %1ed %2 time.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7043\"/>\n        <source>%n lines yanked.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7748\"/>\n        <source>Already at oldest change.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7749\"/>\n        <source>Already at newest change.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal::FakeVimHandler::Private</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"2788\"/>\n        <source>Recursive mapping</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"4195\"/>\n        <source>Type Alt-V, Alt-V to quit FakeVim mode.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5941\"/>\n        <source> [New] </source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6166\"/>\n        <source>Not an editor command: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVimEdit</name>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimedit.cpp\" line=\"68\"/>\n        <source>Use FakeVim Editing</source>\n        <translation>使用FakeVim编辑</translation>\n    </message>\n</context>\n<context>\n    <name>FakeVimEditOption</name>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"20\"/>\n        <source>FakeVim initialization command list (# start is comment):</source>\n        <translation>FakeVim 初始命令列表(以#开始行为注释):</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"28\"/>\n        <source>Load default init command list</source>\n        <translation>加载默认的初始化命令列表</translation>\n    </message>\n</context>\n<context>\n    <name>FiFoTty</name>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"86\"/>\n        <source>Cannot create temporary file: %1</source>\n        <translation>无法建立临时文件: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"97\"/>\n        <source>Cannot create FiFo %1: %2</source>\n        <translation>无法建立FiFo %1: %2</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"104\"/>\n        <source>Cannot open FiFo %1: %2</source>\n        <translation>无法打开 FiFo %1: %2</translation>\n    </message>\n</context>\n<context>\n    <name>FileBrowser</name>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"98\"/>\n        <source>Synchronize with editor</source>\n        <translation>与编辑器同步</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"103\"/>\n        <source>Show Hidden Files</source>\n        <translation>显示隐藏文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"159\"/>\n        <source>Set As Root Folder</source>\n        <oldsource>Set Folder To Root</oldsource>\n        <translation>设置为顶层目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"119\"/>\n        <source>Execute File</source>\n        <translation>执行文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"101\"/>\n        <source>Reload Folder</source>\n        <translation>重新读取目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"110\"/>\n        <source>Show Details</source>\n        <translation>显示详细信息</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"122\"/>\n        <source>Debug File</source>\n        <translation>调试文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"160\"/>\n        <source>Open Folder in New Window</source>\n        <translation>在新窗口打开目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"161\"/>\n        <source>Add to Folders</source>\n        <translation>添加到目录列表</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"141\"/>\n        <source>Open Parent</source>\n        <oldsource>Open to Parent</oldsource>\n        <translation>打开上级目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"169\"/>\n        <source>Filter</source>\n        <translation>过滤</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"175\"/>\n        <source>File System</source>\n        <translation>文件系统</translation>\n    </message>\n</context>\n<context>\n    <name>FileBrowserOption</name>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"20\"/>\n        <source>Terminal</source>\n        <translation>终端</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"26\"/>\n        <source>Command:</source>\n        <translation>命令:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"36\"/>\n        <source>Arguments:</source>\n        <translation>参数:</translation>\n    </message>\n</context>\n<context>\n    <name>FileManager</name>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"189\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"211\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"233\"/>\n        <source>All Files (*)</source>\n        <translation>所有文件(*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"397\"/>\n        <source>LiteIDE</source>\n        <translation>LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"398\"/>\n        <source>Project &apos;%1&apos; has been created.\nDo you want to open it now?</source>\n        <oldsource>Project &apos;%1&apos; is created.\nDo you want to load?</oldsource>\n        <translation>项目文件 &apos;%1&apos;已建立,是否加载?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"301\"/>\n        <source>Open Project or File</source>\n        <translation>打开项目或文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"76\"/>\n        <source>Show Hidden Files</source>\n        <translation>显示隐藏文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"79\"/>\n        <source>Show Details</source>\n        <translation>显示详细信息</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"82\"/>\n        <source>Synchronize with editor</source>\n        <translation>与编辑器同步</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"85\"/>\n        <source>Split Mode</source>\n        <translation>分离模式</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"113\"/>\n        <source>Filter</source>\n        <translation>过滤</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"127\"/>\n        <source>Folders</source>\n        <oldsource>Folers</oldsource>\n        <translation>目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"186\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"208\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"230\"/>\n        <source>All Support Files (%1)</source>\n        <translation>所有支持文件(%1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"314\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"332\"/>\n        <source>Select a folder:</source>\n        <oldsource>Open Folder</oldsource>\n        <translation>选择目录:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"679\"/>\n        <source>%1\nThis file has been deleted from the drive,\nbut you have unsaved modifications in your LiteIDE editor.\n\nDo you want to close the editor?\nAnswering &quot;Yes&quot; will discard your unsaved changes.</source>\n        <translation>%1\n文件在磁盘上已经被删除，但LiteIDE上有您的未保存修改。\n\n您想要关闭编辑器？\n回答“是”将放弃您的未保存修改。</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"686\"/>\n        <source>%1\nThis file has been deleted from the drive.\n\nDo you want to close the editor?</source>\n        <translation>%1\n文件在磁盘上已经被删除。\n\n您想要关闭编辑器？</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"719\"/>\n        <source>%1\nThis file has been modified on the drive,\nbut you have unsaved modifications in your LiteIDE editor.\n\nDo you want to reload the file from disk?\nAnswering &quot;Yes&quot; will discard your unsaved changes.</source>\n        <translation>%1\n文件已经在磁盘上已经被改变，但LiteIDE上有您的未保存修改。\n\n您想要重新从磁盘读取？\n回答“是”将放弃您的未保存修改。</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"726\"/>\n        <source>%1\nThis file has been modified on the drive.\n\nDo you want to reload the file from disk?</source>\n        <translation>%1\n文件已经在磁盘上已经被改变。\n\n您想要重新从磁盘读取？</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"350\"/>\n        <source>Open Files</source>\n        <translation>打开文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"363\"/>\n        <source>Open Project</source>\n        <translation>打开项目</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"683\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"688\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"723\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"728\"/>\n        <source>LiteIDE X</source>\n        <translation></translation>\n    </message>\n</context>\n<context>\n    <name>FileRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"135\"/>\n        <source>Files</source>\n        <translation>文件</translation>\n    </message>\n</context>\n<context>\n    <name>FileSearch</name>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"217\"/>\n        <source>Match whole word</source>\n        <oldsource>Match word</oldsource>\n        <translation>全词匹配</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"218\"/>\n        <source>Match case</source>\n        <translation>区分大小写</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"219\"/>\n        <source>Regular expression</source>\n        <translation>使用正则表达式</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"220\"/>\n        <source>Scan subdirectories</source>\n        <oldsource>Look in subdirs</oldsource>\n        <translation>搜索子目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"241\"/>\n        <source>Search for:</source>\n        <translation>搜索内容:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"243\"/>\n        <source>Options:</source>\n        <translation>选项:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"250\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>浏览...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"273\"/>\n        <source>Filter:</source>\n        <translation>过滤:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"365\"/>\n        <source>Files on File System</source>\n        <translation>文件系统中的文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"230\"/>\n        <source>Search</source>\n        <translation>搜索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"231\"/>\n        <source>Cancel</source>\n        <translation>取消</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"251\"/>\n        <source>Current Folder</source>\n        <translation>当前目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"254\"/>\n        <source>Auto Switch</source>\n        <translation>自动切换</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"278\"/>\n        <source>Clear</source>\n        <translation>清除</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"480\"/>\n        <source>Open Directory</source>\n        <translation>打开目录</translation>\n    </message>\n</context>\n<context>\n    <name>FileSearchManager</name>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"50\"/>\n        <source>Search Item:</source>\n        <translation>搜索项目：</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"69\"/>\n        <source>Only golang file changes can be revert!</source>\n        <oldsource>This file change cannot be undone!</oldsource>\n        <translation>只有Golang文件修改可以恢复!</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"83\"/>\n        <source>New Search</source>\n        <translation>新搜索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"85\"/>\n        <source>File Search</source>\n        <translation>文件搜索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"89\"/>\n        <source>Search Result</source>\n        <translation>搜索结果</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"248\"/>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"253\"/>\n        <source>LiteIDE X</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"248\"/>\n        <source>Warning! Replace text is empty.\nWant to remove all the search items?</source>\n        <translation>警告！替换文本为空\n想要删除所有搜索到的项目？</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"253\"/>\n        <source>Warning! Replace text is whitespace.\nWant to replace to all the search items to whitespace?</source>\n        <translation>警告！替换文本为空白字符\n想要替换所有搜索到的项目为空白？</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"280\"/>\n        <source>The following files have no write permissions. Do you want to change the permissions?</source>\n        <translation>下面的文件没有可写权限，你想要更改可写权限？</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"283\"/>\n        <source>File is readonly</source>\n        <translation>文件只读</translation>\n    </message>\n</context>\n<context>\n    <name>FileSystemWidget</name>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"94\"/>\n        <source>Open File</source>\n        <oldsource>Open Editor</oldsource>\n        <translation>打开文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"95\"/>\n        <source>New File...</source>\n        <oldsource>New File</oldsource>\n        <translation>新建文件...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"96\"/>\n        <source>New File Wizard...</source>\n        <oldsource>New File Wizard</oldsource>\n        <translation>新建文件向导...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"320\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"326\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"331\"/>\n        <source>Rename File</source>\n        <translation>文件更名</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"98\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"345\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"350\"/>\n        <source>Delete File</source>\n        <oldsource>Remove File</oldsource>\n        <translation>删除文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"100\"/>\n        <source>New Folder...</source>\n        <oldsource>New Folder</oldsource>\n        <translation>新建目录...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"346\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>您确定要永久删除这个文件?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"386\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"395\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"400\"/>\n        <source>Rename Folder</source>\n        <translation>目录更名</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"102\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"414\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"421\"/>\n        <source>Delete Folder</source>\n        <oldsource>Remove Folder</oldsource>\n        <translation>删除目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"97\"/>\n        <source>Rename File...</source>\n        <translation>重命名文件...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"101\"/>\n        <source>Rename Folder...</source>\n        <translation>重命名目录...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"104\"/>\n        <source>Open Terminal Here</source>\n        <translation>打开终端</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"105\"/>\n        <source>Open Explorer Here</source>\n        <translation>打开目录浏览</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"107\"/>\n        <source>View Godoc Here</source>\n        <translation>查看GODOC</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"454\"/>\n        <source>Add Folder</source>\n        <translation>添加目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"110\"/>\n        <source>Close Folder</source>\n        <translation>关闭目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"109\"/>\n        <source>Add Folder...</source>\n        <translation>添加目录...</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"112\"/>\n        <source>Close All Folders</source>\n        <translation>关闭所有目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"279\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"289\"/>\n        <source>Create File</source>\n        <translation>建立文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"280\"/>\n        <source>A file with that name already exists!</source>\n        <oldsource>The file already exists!</oldsource>\n        <translation>文件已存在!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"290\"/>\n        <source>Failed to create the file!</source>\n        <translation>建立文件失败!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"320\"/>\n        <source>New Name:</source>\n        <translation>新名称:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"327\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"332\"/>\n        <source>Failed to rename the file!</source>\n        <translation>重命名文件失败!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"415\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>您确定要删除此文件夹及所有内容?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"351\"/>\n        <source>Failed to delete the file!</source>\n        <oldsource>Failed to remove the file!</oldsource>\n        <translation>删除文件失败!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"369\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"372\"/>\n        <source>Create Folder</source>\n        <translation>建立目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"370\"/>\n        <source>A folder with that name already exists!</source>\n        <oldsource>The folder name is exists!</oldsource>\n        <translation>目录名已存在!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"373\"/>\n        <source>Failed to create the folder!</source>\n        <translation>建立目录失败!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"386\"/>\n        <source>Folder Name</source>\n        <translation>目录名</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"396\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"401\"/>\n        <source>Failed to rename the folder!</source>\n        <translation>重命名目录失败!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"422\"/>\n        <source>Failed to delete the folder!</source>\n        <oldsource>Failed to remove the folder!</oldsource>\n        <translation>删除目录失败!</translation>\n    </message>\n</context>\n<context>\n    <name>Find::Internal::SearchResultWidget</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"132\"/>\n        <source>Search was canceled.</source>\n        <translation>搜索已取消.</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"163\"/>\n        <source>Cancel</source>\n        <translation>取消</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"167\"/>\n        <source>Repeat the search with same parameters</source>\n        <translation>使用相同参数重新搜索</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"168\"/>\n        <source>Search again</source>\n        <translation>重新搜索</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"174\"/>\n        <source>Set show replace mode ui</source>\n        <translation>设置为替换模式</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"175\"/>\n        <source>Show Replace</source>\n        <translation>显示替换</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"180\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"441\"/>\n        <source>Replace with:</source>\n        <translation>替换为:</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"186\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"442\"/>\n        <source>Replace all occurrences</source>\n        <translation>替换所有出现位置</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"187\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"443\"/>\n        <source>Replace</source>\n        <translation>替换</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"191\"/>\n        <source>Preserve case</source>\n        <translation>保留大小写</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"204\"/>\n        <source>Expand all items</source>\n        <translation>展开所有项目</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"209\"/>\n        <source>Collapse all items</source>\n        <translation>折叠所有项目</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"318\"/>\n        <source>Revert with:</source>\n        <translation>恢复为:</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"319\"/>\n        <source>Revert</source>\n        <translation>恢复</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"320\"/>\n        <source>Revert all occurrences</source>\n        <translation>恢复所有出现位置</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"592\"/>\n        <source>%n matches replaced.</source>\n        <translation>\n            <numerusform>%n 个匹配被替换.</numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"594\"/>\n        <source>searching... %n matches found.</source>\n        <translation>\n            <numerusform>搜索中... 找到 %n 个匹配.</numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"600\"/>\n        <source>searching ...</source>\n        <translation>搜索中...</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"606\"/>\n        <source>No matches found.</source>\n        <translation>未找到匹配.</translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"608\"/>\n        <source>%n matches found.</source>\n        <translation>\n            <numerusform>找到 %n 个匹配.</numerusform>\n        </translation>\n    </message>\n</context>\n<context>\n    <name>FindApiEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.h\" line=\"73\"/>\n        <source>Search</source>\n        <translation>搜索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.h\" line=\"74\"/>\n        <source>Stop Search</source>\n        <translation>中止搜索</translation>\n    </message>\n</context>\n<context>\n    <name>FindApiWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"284\"/>\n        <source>Search</source>\n        <translation>搜索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"305\"/>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"337\"/>\n        <source>Find</source>\n        <translation>查找</translation>\n    </message>\n</context>\n<context>\n    <name>FindDocWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"96\"/>\n        <source>Search</source>\n        <translation>搜索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"104\"/>\n        <source>Find</source>\n        <translation>查找</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"123\"/>\n        <source>Find All</source>\n        <translation>查找所有</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"124\"/>\n        <source>Find const</source>\n        <translation>查找 const</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"126\"/>\n        <source>Find func</source>\n        <translation>查找 func</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"128\"/>\n        <source>Find interface</source>\n        <translation>查找 interface</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"130\"/>\n        <source>Find pkg</source>\n        <translation>查找 pkg</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"132\"/>\n        <source>Find struct</source>\n        <translation>查找 struct</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"134\"/>\n        <source>Find type</source>\n        <translation>查找 type</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"136\"/>\n        <source>Find var</source>\n        <translation>查找 var</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"138\"/>\n        <source>Use Regexp</source>\n        <translation>使用正则</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"140\"/>\n        <source>Match Case</source>\n        <translation>区分大小写</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"142\"/>\n        <source>Match Word</source>\n        <translation>全词匹配</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"169\"/>\n        <source>Help</source>\n        <translation>帮助</translation>\n    </message>\n</context>\n<context>\n    <name>FindEditor</name>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"63\"/>\n        <source>Match case</source>\n        <translation>区分大小写</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"64\"/>\n        <source>Regular expression</source>\n        <translation>使用正则表达式</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"65\"/>\n        <source>Wrap around</source>\n        <translation>全文环绕</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"56\"/>\n        <source>Find Next</source>\n        <translation>查找下一个</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"57\"/>\n        <source>Find Previous</source>\n        <oldsource>Find Prev</oldsource>\n        <translation>查找上一个</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"58\"/>\n        <source>Replace With:</source>\n        <translation>替换:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"59\"/>\n        <source>Replace</source>\n        <translation>替换</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"60\"/>\n        <source>Replace All</source>\n        <translation>替换所有</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"62\"/>\n        <source>Match whole word only</source>\n        <translation>全词匹配</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"72\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"250\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"472\"/>\n        <source>Ready</source>\n        <translation>准备</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"81\"/>\n        <source>Close</source>\n        <translation>关闭</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"84\"/>\n        <source>Show Replace</source>\n        <translation>显示替换</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"103\"/>\n        <source>Find What:</source>\n        <translation>查找:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"115\"/>\n        <source>Options:</source>\n        <oldsource>Find Option:</oldsource>\n        <translation>选项:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"221\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"393\"/>\n        <source>Not found</source>\n        <translation>没有找到</translation>\n    </message>\n</context>\n<context>\n    <name>FolderListView</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"252\"/>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"262\"/>\n        <source>Delete File</source>\n        <translation>删除文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"253\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>您确定要永久删除这个文件?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"263\"/>\n        <source>Failed to delete the file!</source>\n        <translation>删除文件失败!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"275\"/>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"285\"/>\n        <source>Delete Folder</source>\n        <translation>删除目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"276\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>您确定要删除此文件夹及所有内容?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"286\"/>\n        <source>Failed to delete the folder!</source>\n        <translation>删除目录失败!</translation>\n    </message>\n</context>\n<context>\n    <name>FolderRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"166\"/>\n        <source>Folders</source>\n        <translation>目录</translation>\n    </message>\n</context>\n<context>\n    <name>FolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"173\"/>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"183\"/>\n        <source>Delete File</source>\n        <translation>删除文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"174\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>您确定要永久删除这个文件?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"184\"/>\n        <source>Failed to delete the file!</source>\n        <translation>删除文件失败!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"230\"/>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"240\"/>\n        <source>Delete Folder</source>\n        <translation>删除目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"231\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>您确定要删除此文件夹及所有内容?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"241\"/>\n        <source>Failed to delete the folder!</source>\n        <translation>删除目录失败!</translation>\n    </message>\n</context>\n<context>\n    <name>GdbDebuggerOption</name>\n    <message>\n        <location filename=\"src/plugins/gdbdebugger/gdbdebuggeroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/gdbdebugger/gdbdebuggeroption.ui\" line=\"20\"/>\n        <source>Enable --tty for program being debugged.</source>\n        <translation>使用 --tty 参数调试程序.</translation>\n    </message>\n</context>\n<context>\n    <name>GoAddTagsDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"14\"/>\n        <source>Add Tags To Struct Field</source>\n        <translation>添加 Tags 到结构体字段</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"23\"/>\n        <source>Add JSON Tag</source>\n        <translation>添加 JSON Tag</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"54\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"105\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"169\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"197\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"281\"/>\n        <source>Options</source>\n        <translation>选项</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"61\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"112\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"176\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"204\"/>\n        <source>Multiple options separated by commas</source>\n        <oldsource>Multiple options are separated by commas</oldsource>\n        <translation>多个选项之间使用逗号分隔</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"74\"/>\n        <source>Add XML Tag</source>\n        <translation>添加 XML Tag</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"125\"/>\n        <source>Add Custom Tags</source>\n        <translation>添加自定义 Tags</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"155\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"187\"/>\n        <source>Tag Name</source>\n        <translation>Tag 名称</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"162\"/>\n        <source>Setup custom tag name</source>\n        <translation>设置自定义 tag 名称</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"299\"/>\n        <source>Sort sorts the tags in increasing order according to the key name</source>\n        <translation>设置多个 tags 根据键名称按升序重新排列</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"306\"/>\n        <source>Override current tags when adding tags</source>\n        <translation>设置添加标签时覆盖当前标签</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"316\"/>\n        <source>Info</source>\n        <translation>信息</translation>\n    </message>\n</context>\n<context>\n    <name>GoRemoveTagsDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"14\"/>\n        <source>Remove Tags From Struct Field</source>\n        <translation>从结构体字段删除 Tags</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"23\"/>\n        <source>Remove Tags And Options</source>\n        <translation>删除 Tags 和选项</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"29\"/>\n        <source>Clear All Tags</source>\n        <translation>清除所有 Tags</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"39\"/>\n        <source>Clear All Tags Options</source>\n        <oldsource>Clear All Tag Options</oldsource>\n        <translation>清除所有 Tags 的选项</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"46\"/>\n        <source>Remove JSON Tag</source>\n        <translation>删除 JSON Tag</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"53\"/>\n        <source>Remove XML Tag</source>\n        <translation>删除 XML Tag</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"60\"/>\n        <source>Remove Custom Tag</source>\n        <translation>删除自定义 Tag</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"70\"/>\n        <source>Multiple tags separated by commas</source>\n        <oldsource>Multiple tags  are separated by commas</oldsource>\n        <translation>多个 tags 之间使用逗号分隔</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"77\"/>\n        <source>Remove JSON Options</source>\n        <translation>删除 JSON 选项</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"84\"/>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"98\"/>\n        <source>Multiple options separated by commas</source>\n        <oldsource>Multiple options are separated by commas</oldsource>\n        <translation>多个选项之间使用逗号分隔</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"91\"/>\n        <source>Remove XML Options</source>\n        <translation>删除 XML 选项</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"111\"/>\n        <source>Remove Custom Tag Options</source>\n        <translation>删除自定义 Tag 选项</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"118\"/>\n        <source>Setup remove custom tag and option, example tag=opt1,tag=opt2</source>\n        <oldsource>Setup remove custom tag option, example tag=opt1,tag=opt2</oldsource>\n        <translation>设置删除自定义 tag 和选项，形如 tag=op1,tag=op2</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"121\"/>\n        <source>tag=option</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"131\"/>\n        <source>Info</source>\n        <translation>信息</translation>\n    </message>\n</context>\n<context>\n    <name>GolangAst</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"60\"/>\n        <source>No outline available</source>\n        <translation>没有大纲</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"74\"/>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"77\"/>\n        <source>Synchronize with editor</source>\n        <translation>与编辑器同步</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"80\"/>\n        <source>Go Class View</source>\n        <oldsource>Class View</oldsource>\n        <translation>Go 类视图</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"81\"/>\n        <source>Go Outline</source>\n        <oldsource>Outline</oldsource>\n        <translation>Go 大纲</translation>\n    </message>\n</context>\n<context>\n    <name>GolangAstOption</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"20\"/>\n        <source>QuickOpenSymbol</source>\n        <translation>快速跳转符号</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"26\"/>\n        <source>Show import path</source>\n        <translation>显示导入包</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"33\"/>\n        <source>Match case sensitive</source>\n        <translation>区分大小写匹配</translation>\n    </message>\n</context>\n<context>\n    <name>GolangCodeOption</name>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"20\"/>\n        <source>PKG automitic import prompt</source>\n        <translation>包自动导入提示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"26\"/>\n        <source>PKG automatic import hints for all packages (GOPATH)</source>\n        <translation>GOPATH 所有包导入自动提示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"33\"/>\n        <source>PKG automatic import hints for standard package</source>\n        <translation>标准包导入自动提示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"43\"/>\n        <source>Gocode</source>\n        <oldsource>Go API</oldsource>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"56\"/>\n        <source>Auto update depends package when it&apos;s source changed.</source>\n        <oldsource>Auto update depends package when its source is changed.</oldsource>\n        <translation>自动更新依赖库当其源码改变时.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"49\"/>\n        <source>Close gocode when exiting</source>\n        <translation>退出时关闭gocode</translation>\n    </message>\n</context>\n<context>\n    <name>GolangDoc</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"100\"/>\n        <source>Godoc Search</source>\n        <translation>Go文档搜索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"92\"/>\n        <source>Go Doc Search</source>\n        <oldsource>Golang Doc Search</oldsource>\n        <translation>Go 文档搜索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"96\"/>\n        <source>Go Api Index</source>\n        <oldsource>Golang Api Index</oldsource>\n        <translation>Go Api 索引</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"111\"/>\n        <source>Find Package:</source>\n        <translation>查找包:</translation>\n    </message>\n</context>\n<context>\n    <name>GolangDocOption</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"20\"/>\n        <source>Go API</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"26\"/>\n        <source>Use default context (fast)</source>\n        <translation>使用默认context(快速)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"33\"/>\n        <source>Only load standard API documentation</source>\n        <oldsource>Only load standard api</oldsource>\n        <translation>只加载标准库</translation>\n    </message>\n</context>\n<context>\n    <name>GolangEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"90\"/>\n        <source>View import package use godoc</source>\n        <translation>使用godoc查看导入包</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"93\"/>\n        <source>View Expression Information</source>\n        <translation>查看表达式信息</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"96\"/>\n        <source>Jump to Declaration</source>\n        <translation>跳转到声明</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"99\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"105\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"108\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"111\"/>\n        <source>Find Usages</source>\n        <translation>查找使用</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"102\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"114\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"117\"/>\n        <source>Rename Symbol Under Cursor</source>\n        <translation>重命名符号</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"111\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"114\"/>\n        <source>%1 (Module/GOPATH) with GOROOT</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"170\"/>\n        <source>Stop</source>\n        <translation>停止</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"175\"/>\n        <source>Go Source Query</source>\n        <translation>Go源码查询</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"180\"/>\n        <source>SourceQuery What</source>\n        <translation>Go源码查询What</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"184\"/>\n        <source>Callees</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"188\"/>\n        <source>Callers</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"192\"/>\n        <source>Callstack</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"196\"/>\n        <source>Definition</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"200\"/>\n        <source>Describe</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"204\"/>\n        <source>Freevars</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"208\"/>\n        <source>Implements</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"212\"/>\n        <source>Implements(GOPATH)</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"216\"/>\n        <source>Peers</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"220\"/>\n        <source>Referrers</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"224\"/>\n        <source>Pointsto</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"228\"/>\n        <source>Whicherrs</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"232\"/>\n        <source>Add Tags To Struct Field</source>\n        <translation>添加结构体字段 Tags</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"236\"/>\n        <source>Remove Tags From Struct Field</source>\n        <translation>删除结构体字段 Tags</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"354\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"391\"/>\n        <source>Refactor</source>\n        <translation>重构</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"361\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"399\"/>\n        <source>SourceQuery</source>\n        <translation>Go源码查询</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"812\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"993\"/>\n        <source>Below files in package %1</source>\n        <translation>下面的文件属于包 %1</translation>\n    </message>\n</context>\n<context>\n    <name>GolangEditOption</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"20\"/>\n        <source>Mouse</source>\n        <translation>鼠标</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"26\"/>\n        <source>Go root source file editor setup read only</source>\n        <translation>GO 源码目录源文件设置为只读</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"33\"/>\n        <source>Enable view expression infomation on mouse</source>\n        <translation>允许显示鼠标下代码信息</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"40\"/>\n        <source>Enable mouse navigation</source>\n        <translation>允许鼠标导航</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFileSearch</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangfilesearch.cpp\" line=\"59\"/>\n        <source>Golang Find Usages</source>\n        <translation>Golang 查找使用</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFmtOption</name>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"20\"/>\n        <source>Format Options</source>\n        <oldsource>Golang Format</oldsource>\n        <translation>Golang 格式化</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"26\"/>\n        <source>Goimports updates your Go import lines, adding missing ones and removing unreferenced ones.</source>\n        <translation>Goimports自动更新您的Go语言import行，增加缺少的pkg和移除未引用的pkg。</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"29\"/>\n        <source>Enable update imports line, adding missing ones and removing unreferenced ones.</source>\n        <translation>允许更新import行，增加缺少的pkg和移除未引用的pkg.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"46\"/>\n        <source>Synchronous</source>\n        <translation>同步</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"52\"/>\n        <source>Synchronous code formatting</source>\n        <oldsource> Synchronous code formatting</oldsource>\n        <translation>同步代码格式化</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"61\"/>\n        <source>Synchronous code formatting timeout in milliseconds (500ms or more):</source>\n        <translation>同步代码格式化超时时间(500毫秒以上):</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"36\"/>\n        <source>Automatically format code when saving</source>\n        <oldsource>When the editor is saved automatically gofmt</oldsource>\n        <translation>文件保存时代码自动格式化</translation>\n    </message>\n</context>\n<context>\n    <name>GolangFmtPlugin</name>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"58\"/>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"66\"/>\n        <source>Format Code</source>\n        <oldsource>Format Code (goimports)</oldsource>\n        <translation>代码格式化</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"59\"/>\n        <source>Format Code (Adjusts Imports)</source>\n        <translation>代码格式化(调整导入行)</translation>\n    </message>\n</context>\n<context>\n    <name>GolangPackageOption</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.cpp\" line=\"304\"/>\n        <source>Choose directory to add to GOPATH:</source>\n        <translation>选择目录添加到 GOPATH:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"14\"/>\n        <source>Manage GOPATH / Modules</source>\n        <translation>管理 GOPATH / Modules</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"35\"/>\n        <source>Go Modules</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"78\"/>\n        <source>Custom GONOPROXY</source>\n        <translation>自定义 GONOPROXY</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"88\"/>\n        <source>Custom GOPROXY</source>\n        <translation>自定义 GOPROXY</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"95\"/>\n        <source>Custom GO111MODULE</source>\n        <translation>自定义 GO111MODULE</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"102\"/>\n        <source>Custom GONOSUMDB</source>\n        <translation>自定义 GONOSUMDB</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"109\"/>\n        <source>Custom GOPRIVATE</source>\n        <translation>自定义 GOPRIVATE</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"125\"/>\n        <source>TextLabel</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"137\"/>\n        <source>GOPATH</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"163\"/>\n        <source>Use System GOPATH</source>\n        <translation>使用系统 GOPATH</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"186\"/>\n        <source>Reload</source>\n        <translation>重新加载</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"210\"/>\n        <source>Use Custom GOPATH (one per line)</source>\n        <translation>使用自定义 GOPATH （每行一个）</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"233\"/>\n        <source>Add Directory...</source>\n        <translation>添加目录...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"240\"/>\n        <source>Clear</source>\n        <translation>清除</translation>\n    </message>\n</context>\n<context>\n    <name>GolangPresentEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"64\"/>\n        <source>Section (s1)</source>\n        <translation>一级标题 (s1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"67\"/>\n        <source>Subsection (s2)</source>\n        <translation>二级标题 (s2)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"70\"/>\n        <source>Sub-subsection (s3)</source>\n        <translation>三级标题 (s3)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"73\"/>\n        <source>Bold</source>\n        <translation>加重</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"76\"/>\n        <source>Italic</source>\n        <translation>斜体</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"79\"/>\n        <source>Inline Code</source>\n        <translation>内联代码</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"82\"/>\n        <source>Switch Bullets</source>\n        <translation>切换列表</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"85\"/>\n        <source>Comment/Uncomment Selection</source>\n        <translation>切换区域注释/反注释</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"88\"/>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"267\"/>\n        <source>Export HTML</source>\n        <translation>输出HTML文档</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"91\"/>\n        <source>Verify Present</source>\n        <translation>校验</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"256\"/>\n        <source>Present verify success</source>\n        <translation>Present校验成功</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"258\"/>\n        <source>Present verify false</source>\n        <translation>Present校验失败</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"310\"/>\n        <source>Export PDF</source>\n        <translation>输出PDF文档</translation>\n    </message>\n</context>\n<context>\n    <name>GolangSymbol</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangsymbol.cpp\" line=\"62\"/>\n        <source>Quick Open Symbol by Name</source>\n        <translation>根据名称跳转到符号</translation>\n    </message>\n</context>\n<context>\n    <name>GoplayBrowser</name>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"70\"/>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"132\"/>\n        <source>Go Playground</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"72\"/>\n        <source>Run</source>\n        <translation>运行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"73\"/>\n        <source>Stop</source>\n        <translation>停止</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"74\"/>\n        <source>New</source>\n        <translation>新建</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"75\"/>\n        <source>Load...</source>\n        <translation>加载...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"76\"/>\n        <source>Save...</source>\n        <translation>保存...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"77\"/>\n        <source>Explore Folder</source>\n        <translation>浏览目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"175\"/>\n        <source>Running...</source>\n        <oldsource>Running...\n\n</oldsource>\n        <translation>运行...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"195\"/>\n        <source>Error: %1.</source>\n        <oldsource>\nError: %1.</oldsource>\n        <translation>错误: %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"197\"/>\n        <source>Success: %2.</source>\n        <oldsource>\nSuccess: %2.</oldsource>\n        <translation>成功: %2.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"247\"/>\n        <source>Load File</source>\n        <translation>读取文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"247\"/>\n        <source>Select a file to load:</source>\n        <translation>选择文件并加载:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"263\"/>\n        <source>Save File</source>\n        <translation>保存文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"263\"/>\n        <source>New File Name:</source>\n        <translation>新文件名:</translation>\n    </message>\n</context>\n<context>\n    <name>HtmlPreview</name>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"71\"/>\n        <source>Page Style</source>\n        <translation>页面样式</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"76\"/>\n        <source>Reload</source>\n        <translation>刷新</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"77\"/>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"381\"/>\n        <source>Export Html</source>\n        <translation>输出Html文档</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"78\"/>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"413\"/>\n        <source>Export PDF</source>\n        <translation>输出PDF文档</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"79\"/>\n        <source>Print Preview</source>\n        <translation>打印预览</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"82\"/>\n        <source>Synchronize preview and code scrollbars</source>\n        <translation>同步预览和代码窗口滚动</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"88\"/>\n        <source>Config</source>\n        <translation>配置</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"168\"/>\n        <source>Plain HTML</source>\n        <translation>纯HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"389\"/>\n        <source>Export Failed</source>\n        <translation>导出失败</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"85\"/>\n        <source>Automatically display preview</source>\n        <oldsource>Automatically Display Preview</oldsource>\n        <translation>自动显示预览窗口</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"99\"/>\n        <source>HTML Preview</source>\n        <oldsource>Html Preview</oldsource>\n        <translation>HTML预览</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"390\"/>\n        <source>Could not open %1 for writing!</source>\n        <oldsource>Can not write file %1</oldsource>\n        <translation>无法写入文件 %1!</translation>\n    </message>\n</context>\n<context>\n    <name>ImageEditor</name>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"52\"/>\n        <source>ZoomIn</source>\n        <translation>放大</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"55\"/>\n        <source>ZoomOut</source>\n        <translation>缩小</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"58\"/>\n        <source>Reset to original size</source>\n        <translation>重置为原始大小</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"61\"/>\n        <source>Fit to view</source>\n        <translation>适应视图</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"64\"/>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"247\"/>\n        <source>Play movie</source>\n        <translation>播放动画</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"68\"/>\n        <source>Prev frame</source>\n        <translation>上一帧</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"72\"/>\n        <source>Next frame</source>\n        <translation>下一帧</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"244\"/>\n        <source>Pause movie</source>\n        <translation>暂停动画</translation>\n    </message>\n</context>\n<context>\n    <name>ImageEditorFactory</name>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditorfactory.cpp\" line=\"122\"/>\n        <source>Image Viewer</source>\n        <translation>图像查看器</translation>\n    </message>\n</context>\n<context>\n    <name>ImportPkgTip</name>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcode.cpp\" line=\"847\"/>\n        <source>warning, pkg not find, please enter to import :</source>\n        <translation>警告，包未发现，按回车导入:</translation>\n    </message>\n</context>\n<context>\n    <name>JsonEdit</name>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"51\"/>\n        <source>Verify</source>\n        <translation>校验</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"53\"/>\n        <source>Format Json</source>\n        <translation>格式化Json</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"55\"/>\n        <source>Compact Json</source>\n        <translation>压缩Json</translation>\n    </message>\n</context>\n<context>\n    <name>LiteApp</name>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"284\"/>\n        <source>Event Log</source>\n        <translation>事件记录</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"271\"/>\n        <source>Escape</source>\n        <translation>取消</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"756\"/>\n        <source>Close File</source>\n        <translation>关闭文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"759\"/>\n        <source>Close All Files</source>\n        <translation>关闭所有文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"769\"/>\n        <source>Save File</source>\n        <translation>保存文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"772\"/>\n        <source>Save File As...</source>\n        <translation>文件另存为...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"775\"/>\n        <source>Save All Files</source>\n        <translation>保存所有文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"762\"/>\n        <source>Open Project</source>\n        <translation>打开项目</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"287\"/>\n        <source>Options</source>\n        <translation>选项</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"733\"/>\n        <source>New...</source>\n        <translation>新建...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"736\"/>\n        <source>Open File...</source>\n        <translation>打开文件...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"739\"/>\n        <source>Open Folder...</source>\n        <translation>打开目录...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"742\"/>\n        <source>Open Folder in New Window...</source>\n        <translation>在新窗口打开目录...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"747\"/>\n        <source>Close All Folders</source>\n        <oldsource>Add Folder...</oldsource>\n        <translation>关闭所有目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"750\"/>\n        <source>New Window</source>\n        <translation>新窗口</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"753\"/>\n        <source>Close Window</source>\n        <translation>关闭窗口</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"764\"/>\n        <source>Save Project</source>\n        <translation>保存项目</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"766\"/>\n        <source>Close Project</source>\n        <translation>关闭项目</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"778\"/>\n        <source>Exit</source>\n        <translation>退出</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"784\"/>\n        <source>Full Screen</source>\n        <translation>全屏显示</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"788\"/>\n        <source>About LiteIDE</source>\n        <translation>关于 LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"794\"/>\n        <source>About Plugins</source>\n        <translation>关于插件</translation>\n    </message>\n</context>\n<context>\n    <name>LiteAppOption</name>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"30\"/>\n        <source>Store [*]</source>\n        <oldsource>Store</oldsource>\n        <translation>存储 [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"57\"/>\n        <source>Language:</source>\n        <translation>语言:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"84\"/>\n        <source>Use tool window shortcuts</source>\n        <translation>工具窗口使用快捷键</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"144\"/>\n        <source>Icon [*]</source>\n        <translation>图标 [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"300\"/>\n        <source>Reload files in session</source>\n        <translation>在会话中重新加载文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"312\"/>\n        <source>Recent Files</source>\n        <oldsource>Recent File</oldsource>\n        <translation>历史文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"318\"/>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"357\"/>\n        <source>Max Count:</source>\n        <oldsource>Max Recent:</oldsource>\n        <translation>最大记录数:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"229\"/>\n        <source>Monitoring files for modifications</source>\n        <translation>文件修改监视</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"41\"/>\n        <source>Store settings to local ini file</source>\n        <translation>存储设置到本地ini文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"51\"/>\n        <source>Interface [*]</source>\n        <translation>界面 [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"74\"/>\n        <source>Style:</source>\n        <translation>样式:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"112\"/>\n        <source>Theme [*]</source>\n        <translation>主题 [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"153\"/>\n        <source>Fallback build-in icon library and liteapp/qrc/default</source>\n        <translation>失败时回退内置图标库和 liteapp/qrc/default</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"156\"/>\n        <source>Load the external file icon library</source>\n        <oldsource>Load custome icon from liteapp/qrc folder</oldsource>\n        <translation>加载外部文件图标库</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"184\"/>\n        <source>Automatically save documents</source>\n        <translation>自动保存文档</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"190\"/>\n        <source>Automatically save documents when application is idle</source>\n        <translation>应用程序空闲时自动保存文档</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"200\"/>\n        <source>sec</source>\n        <translation>秒</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"235\"/>\n        <source>Auto reload or close editor buffer,if underlying file is modified/deleted.</source>\n        <oldsource>Auto reload editor buffer from disk file,if underlying file is modified/deleted.</oldsource>\n        <translation>当文件被更改或删除时，自动重新读取或关闭编辑器。</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"263\"/>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"269\"/>\n        <source>Session</source>\n        <translation>会话</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"325\"/>\n        <source>0-99</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"351\"/>\n        <source>Editor Tabs</source>\n        <translation>编辑器标签</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"364\"/>\n        <source>10-999</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"407\"/>\n        <source>Display</source>\n        <translation>显示</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"413\"/>\n        <source>Display [*]</source>\n        <translation>显示 [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"419\"/>\n        <source>Show splash screen on startup</source>\n        <translation>启动时显示启动画面</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"426\"/>\n        <source>Show welcome page on startup</source>\n        <translation>启动时显示欢迎页面</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"509\"/>\n        <source>Editor</source>\n        <translation>编辑器</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"515\"/>\n        <source>Editor tab [*]</source>\n        <translation>编辑器标签</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"521\"/>\n        <source>Show close buttons on each editor tab</source>\n        <translation>在每个文档标签栏都显示关闭按钮</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"528\"/>\n        <source>Enable mouse wheel navigation on tabs</source>\n        <oldsource>Enable mouse wheel selected on tab</oldsource>\n        <translation>允许鼠标滚轮导航Tabs</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"436\"/>\n        <source>Toolbar Icon Size [*]</source>\n        <translation>工具栏图标大小 [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"538\"/>\n        <source>Editor navigate</source>\n        <translation>编辑器导航</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"544\"/>\n        <source>Enable mouse extra &apos;Back&apos; button and &apos;Forward&apos; button for go back and forward</source>\n        <translation>启用鼠标“Back”和“Forward”按键支持前进和后退</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"568\"/>\n        <source>Keyboard</source>\n        <translation>键盘</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"574\"/>\n        <source>Format: {Ctrl+B},{Ctrl+Shift+B},{Ctrl+K,Ctrl+U},{Ctrl+Shift+Z;Ctrl+Y}</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"586\"/>\n        <source>Hide standard commands</source>\n        <translation>隐藏标准命令</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"593\"/>\n        <source>Reset</source>\n        <translation>重置</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"600\"/>\n        <source>Reset All</source>\n        <translation>重置所有</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"620\"/>\n        <source>Import...</source>\n        <translation>导入...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"627\"/>\n        <source>Export...</source>\n        <translation>导出...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"24\"/>\n        <source>Generic</source>\n        <translation>通用</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"118\"/>\n        <source>Theme:</source>\n        <translation>主题:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"275\"/>\n        <source>Reload session on startup</source>\n        <oldsource>Auto load last session</oldsource>\n        <translation>启动时重新加载会话</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"97\"/>\n        <source>SideBarStyle</source>\n        <translation>边栏样式</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"98\"/>\n        <source>SplitterStyle</source>\n        <translation>分离样式</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"82\"/>\n        <source>Command</source>\n        <translation>命令</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"83\"/>\n        <source>Label</source>\n        <translation>标签</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"84\"/>\n        <source>Shortcuts</source>\n        <translation>快捷键</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"85\"/>\n        <source>NativeText</source>\n        <translation>本机文本</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"86\"/>\n        <source>Standard</source>\n        <translation>标准键</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"506\"/>\n        <source>Import Keyboard Mapping Scheme</source>\n        <translation>导入键盘映射方案</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"506\"/>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"540\"/>\n        <source>Keyboard Mapping Scheme (%1)</source>\n        <translation>键盘映射方案 (%1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"513\"/>\n        <source>Could not read scheme from %1!</source>\n        <translation>无法加载方案%1!</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"540\"/>\n        <source>Export Keyboard Mapping Scheme</source>\n        <translation>导出键盘映射方案</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"551\"/>\n        <source>Could not write scheme to %1!</source>\n        <translation>无法写入方案%1!</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuild</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"142\"/>\n        <source>Build Toolbar</source>\n        <translation>编译工具栏</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"150\"/>\n        <source>Build Configuration...</source>\n        <oldsource>Build Config</oldsource>\n        <translation>编译配置...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"168\"/>\n        <source>Stop Action</source>\n        <translation>停止执行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"172\"/>\n        <source>Clear Output</source>\n        <oldsource>Clear All</oldsource>\n        <translation>清除输出</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"176\"/>\n        <source>Execute File</source>\n        <translation>执行文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"179\"/>\n        <source>Debug File</source>\n        <translation>调试文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"182\"/>\n        <source>Lock Build Path</source>\n        <translation>锁定编译目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"184\"/>\n        <source>Build Path Configuration</source>\n        <oldsource>Go Build Configuration</oldsource>\n        <translation>编译目录配置</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"230\"/>\n        <source>Use godoc View</source>\n        <translation>使用godoc查看</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"287\"/>\n        <source>Line Wrap</source>\n        <translation>自动换行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"291\"/>\n        <source>Auto Clear</source>\n        <translation>自动清除</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"295\"/>\n        <source>Automatic positioning cursor</source>\n        <translation>自动定位光标</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"310\"/>\n        <source>Setup</source>\n        <translation>设置</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"318\"/>\n        <source>Build Output</source>\n        <oldsource>Build</oldsource>\n        <translation>编译输出</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"731\"/>\n        <source>Current environment change id &quot;%1&quot;</source>\n        <translation>当前环境变更 id &quot;%1&quot;</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1145\"/>\n        <source>Lock Build</source>\n        <oldsource>Lock Build: %1</oldsource>\n        <translation>锁定编译</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1489\"/>\n        <source>Error: %1.</source>\n        <oldsource>Error: %1.\n</oldsource>\n        <translation>错误: %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1492\"/>\n        <source>Command exited with code %1.</source>\n        <translation>命令退出代码 %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1494\"/>\n        <source>Success: %1.</source>\n        <oldsource>Success: %1.\n</oldsource>\n        <translation>成功: %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1543\"/>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1596\"/>\n        <source>A process is currently running.  Stop the current action first.</source>\n        <oldsource>A process is currently running.  Stop the current action first.\n</oldsource>\n        <translation>进程正在运行.请先停止当前命令操作.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1582\"/>\n        <source>Killing current process...</source>\n        <oldsource>Killing current process...\n</oldsource>\n        <translation>终止当前进程...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1592\"/>\n        <source>Failed to terminate the existing process!</source>\n        <oldsource>Failed to terminate the existing process!\n</oldsource>\n        <translation>无法终止已存在进程!</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1802\"/>\n        <source>Started process successfully</source>\n        <oldsource>Started process successfully\n</oldsource>\n        <translation>进程启动成功</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1802\"/>\n        <source>Failed to start process</source>\n        <translation></translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuildOption</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"20\"/>\n        <source>Recheck Go installation when changing environments</source>\n        <oldsource>Recheck go env if enviroment changed</oldsource>\n        <translation>环境变更重新检查Go安装</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"27\"/>\n        <source>Build command configuration files [*]</source>\n        <oldsource>Build command configuration files:</oldsource>\n        <translation>编译命令配置文件 [*]</translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuildPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"102\"/>\n        <source>Close</source>\n        <translation>关闭</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"105\"/>\n        <source>Execute:</source>\n        <oldsource>Exec:</oldsource>\n        <translation>执行:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"112\"/>\n        <source>Execute File</source>\n        <oldsource>Execute</oldsource>\n        <translation>执行文件</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebug</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"114\"/>\n        <source>Stop</source>\n        <translation>停止</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"75\"/>\n        <source>Clear</source>\n        <translation>清除</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"111\"/>\n        <source>Continue</source>\n        <translation>继续</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"117\"/>\n        <source>Show Current Line</source>\n        <translation>显示当前行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"189\"/>\n        <source>Debug Output</source>\n        <oldsource>Debug</oldsource>\n        <translation>调试输出</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"105\"/>\n        <source>Start Debugging External Application...</source>\n        <oldsource>Start Debugging External Application</oldsource>\n        <translation>调试其他应用程序...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"93\"/>\n        <source>Close</source>\n        <translation>关闭</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"108\"/>\n        <source>Start Debugging</source>\n        <translation>开始调试</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"120\"/>\n        <source>Step Into</source>\n        <translation>逐语句</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"123\"/>\n        <source>Step Over</source>\n        <translation>逐过程</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"126\"/>\n        <source>Step Out</source>\n        <translation>跳出</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"129\"/>\n        <source>Run to Line</source>\n        <translation>运行到行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"132\"/>\n        <source>Insert/Remove Breakpoint</source>\n        <translation>插入/删除断点</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"135\"/>\n        <source>Remove All Breakpoints</source>\n        <translation>删除所有断点</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebugOption</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"20\"/>\n        <source>Debug</source>\n        <translation>调试</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"26\"/>\n        <source>Automatically insert breakpoint main.main when debugging</source>\n        <oldsource>Automatically add breakpoint main.main when debugging</oldsource>\n        <translation>调试时自动插入断点 main.main</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebugPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugplugin.cpp\" line=\"58\"/>\n        <source>Debug Window</source>\n        <oldsource>Debug</oldsource>\n        <translation>调试窗口</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDoc</name>\n    <message>\n        <location filename=\"src/plugins/welcome/litedoc.cpp\" line=\"63\"/>\n        <source>LiteIDE Documentation</source>\n        <oldsource>LiteIDE Document Browser</oldsource>\n        <translation>LiteIDE文档</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditor</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"254\"/>\n        <source>Undo</source>\n        <translation>撤消</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"257\"/>\n        <source>Redo</source>\n        <translation>重做</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"260\"/>\n        <source>Cut</source>\n        <translation>剪切</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"263\"/>\n        <source>Copy</source>\n        <translation>复制</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"266\"/>\n        <source>Paste</source>\n        <translation>粘贴</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"268\"/>\n        <source>Select All</source>\n        <translation>选择所有</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"301\"/>\n        <source>Go to Doc Start</source>\n        <translation>跳转到文件开头</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"305\"/>\n        <source>Go to Doc End</source>\n        <translation>跳转到文件结尾</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"309\"/>\n        <source>Go to Line Start</source>\n        <translation>跳转到行开头</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"313\"/>\n        <source>Go to Line End</source>\n        <translation>跳转到行结尾</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"317\"/>\n        <source>Go to Previous Line</source>\n        <translation>跳转到上一行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"321\"/>\n        <source>Go to Next Line</source>\n        <translation>跳转到下一行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"325\"/>\n        <source>Go to Previous Character</source>\n        <translation>跳转到前一字符</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"329\"/>\n        <source>Go to Next Charater</source>\n        <translation>跳转到后一字符</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"333\"/>\n        <source>Go to Previous Word</source>\n        <translation>跳转到前一单词</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"337\"/>\n        <source>Go to Next Word</source>\n        <translation>跳转到后一单词</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"358\"/>\n        <source>Go to Line</source>\n        <translation>跳转到行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"361\"/>\n        <source>File is readonly</source>\n        <translation>文件只读</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"364\"/>\n        <source>File is writable</source>\n        <translation>文件可写</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"404\"/>\n        <source>Line Wrap (MimeType)</source>\n        <oldsource>Word Wrap (MimeType)</oldsource>\n        <translation>自动换行 (MimeType)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"415\"/>\n        <source>Toggle Comment</source>\n        <translation>切换注释</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"418\"/>\n        <source>Toggle Block Commnet</source>\n        <translation>切换块注释</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"421\"/>\n        <source>Auto-indent Selection</source>\n        <translation>自动代码缩进</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"425\"/>\n        <source>Tab To Spaces (MimeType)</source>\n        <translation>TAB转空格(MimeType)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"429\"/>\n        <source>Line End Windows (\\r\\n)</source>\n        <translation>Windows行结束符 (\\r\\n)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"433\"/>\n        <source>Line End Unix (\\n)</source>\n        <translation>Unix行结束符 (\\n)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"437\"/>\n        <source>Visualize Whitespace (Global)</source>\n        <translation>显示空白 (全局)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"444\"/>\n        <source>Move Line Up</source>\n        <translation>移动行（向上）</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"447\"/>\n        <source>Move Line Down</source>\n        <translation>移动行（向下）</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"450\"/>\n        <source>Copy Line Up</source>\n        <translation>复制行（向上）</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"453\"/>\n        <source>Copy Line Down</source>\n        <translation>复制行（向下）</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"456\"/>\n        <source>Join Lines</source>\n        <translation>连接行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"459\"/>\n        <source>Title Case</source>\n        <translation>首字母大写</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"463\"/>\n        <source>Upper Case</source>\n        <translation>大写转换</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"467\"/>\n        <source>Lower Case</source>\n        <translation>小写转换</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"471\"/>\n        <source>Swap Case</source>\n        <translation>大小写互换</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"475\"/>\n        <source>Tab To Spaces</source>\n        <translation>TAB 转空格</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"479\"/>\n        <source>Spaces To Tab</source>\n        <translation>空格转 TAB</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"645\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"733\"/>\n        <source>Advanced</source>\n        <translation>高级</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"671\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"751\"/>\n        <source>Goto</source>\n        <translation>跳转</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"696\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"774\"/>\n        <source>Convert Tab</source>\n        <translation>转换 TAB</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"700\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"778\"/>\n        <source>Code Folding</source>\n        <translation>代码折叠</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"690\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"768\"/>\n        <source>Convert Case</source>\n        <translation>转换大小写</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1199\"/>\n        <source>Export HTML</source>\n        <translation>输出HTML文档</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1207\"/>\n        <source>Export Failed</source>\n        <translation>导出失败</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1208\"/>\n        <source>Could not open %1 for writing.</source>\n        <translation>无法写入文件 %1.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1227\"/>\n        <source>Export PDF</source>\n        <translation>输出PDF文档</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1252\"/>\n        <source>Print Document</source>\n        <translation>文档打印</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"286\"/>\n        <source>Print Preview...</source>\n        <oldsource>Print Preview Document</oldsource>\n        <translation>打印预览...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"282\"/>\n        <source>Export HTML...</source>\n        <translation>导出HTML...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"284\"/>\n        <source>Export PDF...</source>\n        <translation>导出PDF...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"285\"/>\n        <source>Print...</source>\n        <translation>打印...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"288\"/>\n        <source>Go to Previous Block</source>\n        <oldsource>Go To Previous Block</oldsource>\n        <translation>跳转到上一段</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"295\"/>\n        <source>Select Block</source>\n        <translation>选择段</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"298\"/>\n        <source>Go to Matching Brace</source>\n        <oldsource>Go To Matching Brace</oldsource>\n        <translation>跳转到括号匹配</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"341\"/>\n        <source>Fold</source>\n        <translation>折叠</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"344\"/>\n        <source>Unfold</source>\n        <translation>展开</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"347\"/>\n        <source>Fold All</source>\n        <translation>折叠所有</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"350\"/>\n        <source>Unfold All</source>\n        <translation>展开所有</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1327\"/>\n        <source>Go To Line</source>\n        <oldsource>Goto Line</oldsource>\n        <translation>跳转到行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"368\"/>\n        <source>Duplicate</source>\n        <translation>重复</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"372\"/>\n        <source>Delete Line</source>\n        <translation>删除行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"376\"/>\n        <source>Copy Line</source>\n        <translation>复制行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"380\"/>\n        <source>Cut Line</source>\n        <translation>剪切行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"384\"/>\n        <source>Insert Line Before</source>\n        <translation>行前插入</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"388\"/>\n        <source>Insert Line After</source>\n        <translation>行后插入</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"392\"/>\n        <source>Increase Font Size</source>\n        <translation>增大字号</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"395\"/>\n        <source>Decrease Font Size</source>\n        <translation>减小字号</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"398\"/>\n        <source>Reset Font Size</source>\n        <translation>重置字号</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"401\"/>\n        <source>Clean Whitespace</source>\n        <translation>清除空白</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"408\"/>\n        <source>Code Complete</source>\n        <translation>代码完成</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"706\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"784\"/>\n        <source>Settings</source>\n        <oldsource>File Setup</oldsource>\n        <translation>设置</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"892\"/>\n        <source>Reload File</source>\n        <translation>重新读取文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1269\"/>\n        <source>Do you want to permanently discard unsaved modifications and reload %1?</source>\n        <translation>您想要放弃未保存的修改并重新载入%1?</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"291\"/>\n        <source>Go to Next Block</source>\n        <oldsource>Go To Next Block</oldsource>\n        <translation>跳转到下一段</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1301\"/>\n        <source>ReadOnly</source>\n        <translation>只读</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1327\"/>\n        <source>Line: </source>\n        <translation>行: </translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorFileFactory</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorfilefactory.cpp\" line=\"203\"/>\n        <source>Text Editor</source>\n        <translation>文本编辑器</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorOption</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"408\"/>\n        <source>Load File</source>\n        <translation>读取文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"414\"/>\n        <source>Check and convert no printable char to &apos;.&apos;</source>\n        <translation>检查并转换不可打印字符为&apos;.&apos;</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"30\"/>\n        <source>Font</source>\n        <translation>字体</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"24\"/>\n        <source>Font &amp;&amp; Colors</source>\n        <translation>字体和颜色</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"38\"/>\n        <source>Family:</source>\n        <translation>名称:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"48\"/>\n        <source>Show Monospace Font</source>\n        <translation>显示等宽字体</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"72\"/>\n        <source>Size:</source>\n        <translation>大小:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"92\"/>\n        <source>Zoom:</source>\n        <translation>缩放:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"99\"/>\n        <source>%</source>\n        <translation>%</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"118\"/>\n        <source>Antialias</source>\n        <translation>抗锯齿</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"138\"/>\n        <source>Restore Default Font</source>\n        <translation>重置为默认字体</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"150\"/>\n        <source>Editor Color Scheme</source>\n        <oldsource>ColorStyle Scheme</oldsource>\n        <translation>编辑器颜色方案</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"158\"/>\n        <source>File:</source>\n        <translation>文件:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"175\"/>\n        <source>Edit</source>\n        <translation>编辑</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"220\"/>\n        <source>Syntax Auto-completion</source>\n        <oldsource>Auto complete brackets</oldsource>\n        <translation>语法自动完成</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"302\"/>\n        <source>Fuzzy code completion</source>\n        <translation>模糊代码完成</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"350\"/>\n        <source>Clean completion cache when saving files</source>\n        <translation>保存文件时清除代码完成缓存</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"357\"/>\n        <source>Clean whitespace when saving files</source>\n        <translation>保存文件时清除空白</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"364\"/>\n        <source>Enable scroll wheel zooming</source>\n        <translation>允许鼠标滚轮缩放</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"371\"/>\n        <source>Add copied text into the clipboard as HTML</source>\n        <translation>将复制的文本作为HTML添加到剪贴板中</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"378\"/>\n        <source>Allow vertical scrolling to the last line [*]</source>\n        <translation>允许垂直滚动到最后一行 [*]</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"437\"/>\n        <source>Display VisualizeWhitespace</source>\n        <translation>显示空白</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"451\"/>\n        <source>Word wrap by default</source>\n        <translation>默认自动换行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"430\"/>\n        <source>Display code fold</source>\n        <translation>显示代码折叠</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"509\"/>\n        <source>Display offset position</source>\n        <translation>显示偏移位置</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"533\"/>\n        <source>File Types</source>\n        <translation>文件类型</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"214\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"289\"/>\n        <source>Behavior</source>\n        <translation>行为</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"444\"/>\n        <source>Display EOF</source>\n        <translation>显示EOF</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"458\"/>\n        <source>Display line numbers</source>\n        <translation>显示行号</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"465\"/>\n        <source>Display indent guide</source>\n        <oldsource>Display indent guide </oldsource>\n        <translation>显示缩进指示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"474\"/>\n        <source>Display right margin at column</source>\n        <translation>显示右侧边线</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"295\"/>\n        <source>Automatic indentation</source>\n        <oldsource>Enable automatic indentation</oldsource>\n        <translation>自动缩进</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"309\"/>\n        <source>Case sensitive code completion</source>\n        <oldsource>Completer case sensitive</oldsource>\n        <translation>代码完成区分大小写</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"318\"/>\n        <source>Code completion prefix length:</source>\n        <oldsource>Word Complete Prefix Length</oldsource>\n        <translation>代码完成前缀长度:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"402\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"424\"/>\n        <source>Display</source>\n        <translation>显示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"74\"/>\n        <source>MIME Type</source>\n        <translation>MIME类型</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"75\"/>\n        <source>Tab Width</source>\n        <translation>Tab宽度</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"76\"/>\n        <source>Tab To Spaces</source>\n        <translation>TAB转空格</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"78\"/>\n        <source>File Extensions</source>\n        <translation>文件扩展名</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"77\"/>\n        <source>Custom Extensions</source>\n        <translation>自定义扩展名</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorPlugin</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorplugin.cpp\" line=\"71\"/>\n        <source>Edit ToolBar</source>\n        <translation>编辑工具栏</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorplugin.cpp\" line=\"77\"/>\n        <source>Edit Navigation Bar</source>\n        <translation>编辑导航栏</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEnvOption</name>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"20\"/>\n        <source>Environment definition files:</source>\n        <translation>环境定义文件:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"33\"/>\n        <source>Environment changes will take effect after switching environments.</source>\n        <translation>环境变更后自动切换环境.</translation>\n    </message>\n</context>\n<context>\n    <name>LiteFindPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"72\"/>\n        <source>Find</source>\n        <translation>查找</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"75\"/>\n        <source>Find Next</source>\n        <translation>查找下一个</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"78\"/>\n        <source>Find Previous</source>\n        <translation>查找上一个</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"81\"/>\n        <source>Replace</source>\n        <translation>替换</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"87\"/>\n        <source>File Search</source>\n        <translation>文件搜索</translation>\n    </message>\n</context>\n<context>\n    <name>LiteTabWidget</name>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"62\"/>\n        <source>Open a new tab</source>\n        <translation>打开新标签</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"65\"/>\n        <source>List All Tabs</source>\n        <translation>显示所有页面</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"71\"/>\n        <source>Close Tab</source>\n        <translation>关闭页面</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownBatchBrowser</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"142\"/>\n        <source>Markdown Exporter</source>\n        <oldsource>Markdown Batch</oldsource>\n        <translation>Markdown导出</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"162\"/>\n        <source>All Files (*)</source>\n        <translation>所有文件(*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"231\"/>\n        <source>Select the folder containing your markdown files:</source>\n        <oldsource>Select Markdown Folder</oldsource>\n        <translation>选择Markdown文件所在目录:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"242\"/>\n        <source>Select Markdown Files</source>\n        <translation>选择Markdown文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"290\"/>\n        <source>Select the folder to contain separated markdown exports:</source>\n        <translation>选择处理markdown文件导出目录:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"303\"/>\n        <source>Export Merged HTML</source>\n        <oldsource>Export Html</oldsource>\n        <translation>导出合并HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"378\"/>\n        <source>Export Merged PDF</source>\n        <oldsource>Export PDF</oldsource>\n        <translation>导出合并PDF</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownBatchWidget</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"20\"/>\n        <source>Markdown Source Files</source>\n        <oldsource>Markdown Files</oldsource>\n        <translation>Markdown源文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"38\"/>\n        <source>Import Folder...</source>\n        <oldsource>Import Folder</oldsource>\n        <translation>导入文件夹...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"45\"/>\n        <source>Add Files...</source>\n        <oldsource>Add Files</oldsource>\n        <translation>添加文件...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"52\"/>\n        <source>Move Up</source>\n        <translation>上移</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"59\"/>\n        <source>Move Down</source>\n        <translation>下移</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"66\"/>\n        <source>Remove</source>\n        <translation>删除</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"73\"/>\n        <source>Remove All</source>\n        <translation>删除所有</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"98\"/>\n        <source>Options</source>\n        <translation>选项</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"106\"/>\n        <source>Export Folder:</source>\n        <translation>输出目录:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"116\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>浏览...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"127\"/>\n        <source>Use CSS</source>\n        <translation>使用CSS</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"137\"/>\n        <source>Insert horizontal line between merged files</source>\n        <oldsource>Merge files insert split &lt;hr&gt;</oldsource>\n        <translation>合并文件之间插入水平线</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"144\"/>\n        <source>Insert page break between merged files</source>\n        <oldsource>Merge files insert page break</oldsource>\n        <translation>合并文件插入分页符</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"169\"/>\n        <source>Export</source>\n        <oldsource>Export Util</oldsource>\n        <translation>导出</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"175\"/>\n        <source>Export Separated HTML</source>\n        <oldsource>Separate Html</oldsource>\n        <translation>转出单独HTML</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"182\"/>\n        <source>Export Separated PDF</source>\n        <oldsource>Separate PDF</oldsource>\n        <translation>导出单独PDF</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"189\"/>\n        <source>Export Merged HTML...</source>\n        <oldsource>Merge Html</oldsource>\n        <translation>导出合并HTML...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"196\"/>\n        <source>Export Merged PDF...</source>\n        <oldsource>Merge PDF</oldsource>\n        <translation>导出合并PDF...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"203\"/>\n        <source>Print Preview Merged...</source>\n        <oldsource>Merge Print Preview</oldsource>\n        <translation>合并打印预览...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"210\"/>\n        <source>Print Merged</source>\n        <oldsource>Merge Print</oldsource>\n        <translation>合并打印</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"233\"/>\n        <source>Log</source>\n        <translation>记录</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownEdit</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"83\"/>\n        <source>Header (h1)</source>\n        <oldsource>Header &lt;h1&gt;</oldsource>\n        <translation>标题 (h1)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"86\"/>\n        <source>Header (h2)</source>\n        <oldsource>Header &lt;h2&gt;</oldsource>\n        <translation>标题 (h2)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"89\"/>\n        <source>Header (h3)</source>\n        <oldsource>Header &lt;h3&gt;</oldsource>\n        <translation>标题 (h3)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"92\"/>\n        <source>Header (h4)</source>\n        <oldsource>Header &lt;h4&gt;</oldsource>\n        <translation>标题 (h4)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"95\"/>\n        <source>Header (h5)</source>\n        <oldsource>Header &lt;h5&gt;</oldsource>\n        <translation>标题 (h5)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"98\"/>\n        <source>Header (h6)</source>\n        <oldsource>Header &lt;h6&gt;</oldsource>\n        <translation>标题 (h6)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"101\"/>\n        <source>Bold</source>\n        <translation>加重</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"104\"/>\n        <source>Italic</source>\n        <translation>斜体</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"107\"/>\n        <source>Inline Code</source>\n        <translation>内联代码</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"110\"/>\n        <source>Link</source>\n        <translation>链接</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"113\"/>\n        <source>Image</source>\n        <translation>图像</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"116\"/>\n        <source>Unordered List</source>\n        <translation>无序列表</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"119\"/>\n        <source>Ordered List</source>\n        <translation>有序列表</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"122\"/>\n        <source>Blockquote</source>\n        <translation>引用</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"125\"/>\n        <source>Horizontal Rule</source>\n        <translation>水平分隔线</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"131\"/>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"154\"/>\n        <source>Heading</source>\n        <translation>标题</translation>\n    </message>\n</context>\n<context>\n    <name>MultiFolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"299\"/>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"306\"/>\n        <source>Delete Folder</source>\n        <translation>删除目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"300\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation>您确定要删除此文件夹及所有内容?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"307\"/>\n        <source>Failed to delete the folder!</source>\n        <translation>删除目录失败!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"320\"/>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"327\"/>\n        <source>Delete File</source>\n        <translation>删除文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"321\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation>您确定要永久删除这个文件?</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"328\"/>\n        <source>Failed to delete the file!</source>\n        <translation>删除文件失败!</translation>\n    </message>\n</context>\n<context>\n    <name>NavigateBar</name>\n    <message>\n        <location filename=\"src/utils/navigate/navigate.cpp\" line=\"146\"/>\n        <location filename=\"src/utils/navigate/navigate.cpp\" line=\"169\"/>\n        <source>Browser Files in %1</source>\n        <translation>浏览文件 %1</translation>\n    </message>\n</context>\n<context>\n    <name>NewFileDialog</name>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"14\"/>\n        <source>New Project or File</source>\n        <translation>新项目或文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"124\"/>\n        <source>Browse...</source>\n        <translation>浏览...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"24\"/>\n        <source>GOPATH:</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"38\"/>\n        <source>Template:</source>\n        <oldsource>Template</oldsource>\n        <translation>模板:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"54\"/>\n        <source>Type</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"73\"/>\n        <source>Information</source>\n        <translation>信息</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"87\"/>\n        <source>Name:</source>\n        <translation>名称:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"114\"/>\n        <source>Location:</source>\n        <translation>位置:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"127\"/>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"185\"/>\n        <source>Error</source>\n        <translation>错误</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"127\"/>\n        <source>Could not create the target directory: %1</source>\n        <translation>无法创建目标目录: %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"132\"/>\n        <source>Warning</source>\n        <translation>警告</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"132\"/>\n        <source>Location %1 is not empty.\nUse the target directory anyway?</source>\n        <translation>位置 %1 不为空.继续使用目标目录?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"169\"/>\n        <source>Overwrite File</source>\n        <translation>覆盖文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"169\"/>\n        <source>%1 already exists.\nDo you want to replace it?</source>\n        <translation>%1 已存在.您要替换它吗?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"185\"/>\n        <source>No files could be created.</source>\n        <translation>文件无法建立.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"280\"/>\n        <source>File template details:</source>\n        <translation>文件模板详细信息:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"282\"/>\n        <source>Project template details:</source>\n        <oldsource>New project wizard:</oldsource>\n        <translation>项目模板详细信息:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"362\"/>\n        <source>Choose a directory for the new content:</source>\n        <translation>选择新目录:</translation>\n    </message>\n</context>\n<context>\n    <name>OpenEditorsWidget</name>\n    <message>\n        <location filename=\"src/liteapp/openeditorswidget.cpp\" line=\"43\"/>\n        <source>Open Documents</source>\n        <translation>打开文档</translation>\n    </message>\n</context>\n<context>\n    <name>OptionsBrowser</name>\n    <message>\n        <location filename=\"src/liteapp/optionsbrowser.cpp\" line=\"57\"/>\n        <source>Options</source>\n        <oldsource>Options Page</oldsource>\n        <translation>选项</translation>\n    </message>\n</context>\n<context>\n    <name>OptionsWidget</name>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"14\"/>\n        <source>Options</source>\n        <translation>选项</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"56\"/>\n        <source>Info</source>\n        <translation>信息</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"106\"/>\n        <source>[*] item request restart of LiteIDE</source>\n        <oldsource>[*] item requeset restart LiteIDE</oldsource>\n        <translation>[*] 项需要重启LiteIDE</translation>\n    </message>\n</context>\n<context>\n    <name>OutputDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"444\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"472\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"473\"/>\n        <source>Move To</source>\n        <translation>移动到</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"446\"/>\n        <source>LeftSideBar</source>\n        <translation>左侧边栏</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"447\"/>\n        <source>RightSideBar</source>\n        <translation>右侧边栏</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"480\"/>\n        <source>BottomDockWidget</source>\n        <translation>底部停靠窗口</translation>\n    </message>\n</context>\n<context>\n    <name>OutputOption</name>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"20\"/>\n        <source>Font</source>\n        <translation>字体</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"26\"/>\n        <source>Family:</source>\n        <translation>名称:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"43\"/>\n        <source>Size:</source>\n        <translation>大小:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"60\"/>\n        <source>Zoom:</source>\n        <translation>缩放:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"67\"/>\n        <source>%</source>\n        <translation>%</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"86\"/>\n        <source>Antialias</source>\n        <translation>抗锯齿</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"109\"/>\n        <source>Display</source>\n        <translation>显示</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"115\"/>\n        <source>Use editor color scheme</source>\n        <translation>使用编辑器颜色方案</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"124\"/>\n        <source>Sets the maximum number of lines</source>\n        <translation>设置最大行数</translation>\n    </message>\n</context>\n<context>\n    <name>PackageBrowser</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"87\"/>\n        <source>Manage GOPATH/Modules ...</source>\n        <oldsource>Manage GOPATH...</oldsource>\n        <translation>管理 GOPATH/Modules ...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"86\"/>\n        <source>Reload All</source>\n        <translation>重新加载所有</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"93\"/>\n        <source>Use godoc View</source>\n        <translation>使用godoc查看</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"94\"/>\n        <source>Load Package in New Window</source>\n        <translation>在新窗口打开包</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"95\"/>\n        <source>Add Package to Folders</source>\n        <translation>添加Package到目录列表</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"96\"/>\n        <source>Open Source File</source>\n        <translation>打开源文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"97\"/>\n        <source>Copy Name to Clipboard</source>\n        <oldsource>Copy Name To Clipboard</oldsource>\n        <translation>复制名字到剪切板</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"119\"/>\n        <source>Go Package Browser</source>\n        <oldsource>Package Browser</oldsource>\n        <translation>Go Package 浏览</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"208\"/>\n        <source>Loading Go package list...</source>\n        <oldsource>Loading go package ...</oldsource>\n        <translation>正在加载go package列表...</translation>\n    </message>\n</context>\n<context>\n    <name>PackageProject</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"76\"/>\n        <source>Reload Package</source>\n        <translation>刷新Package</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"77\"/>\n        <source>Open Explorer Here</source>\n        <translation>打开目录浏览</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"78\"/>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"299\"/>\n        <source>Add Source File</source>\n        <translation>添加源文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"299\"/>\n        <source>File Name:</source>\n        <translation>文件名称:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"310\"/>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"315\"/>\n        <source>Error</source>\n        <translation>错误</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"310\"/>\n        <source>File %1 already exists.</source>\n        <translation>文件 %1 已存在.</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"315\"/>\n        <source>Could not open %1 for writing.</source>\n        <translation>无法写入文件 %1.</translation>\n    </message>\n</context>\n<context>\n    <name>PluginsDialog</name>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.ui\" line=\"14\"/>\n        <source>Installed Plugins</source>\n        <oldsource>Install Plugins</oldsource>\n        <translation>已安装插件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.ui\" line=\"45\"/>\n        <source>Close</source>\n        <translation>关闭</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"51\"/>\n        <source>Name</source>\n        <translation>名称</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"54\"/>\n        <source>Author</source>\n        <oldsource>Anchor</oldsource>\n        <translation>作者</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"52\"/>\n        <source>Enabled</source>\n        <translation>允许</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"53\"/>\n        <source>Details</source>\n        <translation>详细信息</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"55\"/>\n        <source>Version</source>\n        <oldsource>Last Ver</oldsource>\n        <translation>版本</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"56\"/>\n        <source>File Name</source>\n        <oldsource>FileName</oldsource>\n        <translation>文件名</translation>\n    </message>\n</context>\n<context>\n    <name>ProcessEx</name>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"52\"/>\n        <source>process exited with code %1</source>\n        <translation>进程退出代码 %1</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"55\"/>\n        <source>process crashed or was terminated</source>\n        <translation>进程崩溃或被终止</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"58\"/>\n        <source>process exited with an unknown status</source>\n        <translation>未知状态的进程退出</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"68\"/>\n        <source>process failed to start</source>\n        <translation>进程无法启动</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"71\"/>\n        <source>process crashed or was terminated while running</source>\n        <translation>进程崩溃或运行终止</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"74\"/>\n        <source>timed out waiting for process</source>\n        <translation>进程等待超时</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"77\"/>\n        <source>couldn&apos;t read from the process</source>\n        <translation>无法从进程读取</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"80\"/>\n        <source>couldn&apos;t write to the process</source>\n        <translation>无法写入进程</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"84\"/>\n        <source>an unknown error occurred</source>\n        <translation>发生未知错误</translation>\n    </message>\n</context>\n<context>\n    <name>ProjectManager</name>\n    <message>\n        <location filename=\"src/liteapp/projectmanager.cpp\" line=\"95\"/>\n        <source>Project &lt;%1&gt;</source>\n        <translation>项目 &lt;%1&gt;</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/projectmanager.cpp\" line=\"119\"/>\n        <source>Import Directory &lt;%1&gt;</source>\n        <translation>导入目录 &lt;%1&gt;</translation>\n    </message>\n</context>\n<context>\n    <name>QFileSystemModel</name>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"46\"/>\n        <source>%1 TB</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"48\"/>\n        <source>%1 GB</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"50\"/>\n        <source>%1 MB</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"52\"/>\n        <source>%1 KB</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"53\"/>\n        <source>%1 bytes</source>\n        <translation></translation>\n    </message>\n</context>\n<context>\n    <name>QJson::ParserRunnable</name>\n    <message>\n        <location filename=\"src/3rdparty/qjson/src/parserrunnable.cpp\" line=\"64\"/>\n        <source>An error occurred while parsing json: %1</source>\n        <translation></translation>\n    </message>\n</context>\n<context>\n    <name>QJsonParseError</name>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"59\"/>\n        <source>no error occurred</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"60\"/>\n        <source>unterminated object</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"61\"/>\n        <source>missing name separator</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"62\"/>\n        <source>unterminated array</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"63\"/>\n        <source>missing value separator</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"64\"/>\n        <source>illegal value</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"65\"/>\n        <source>invalid termination by number</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"66\"/>\n        <source>illegal number</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"67\"/>\n        <source>invalid escape sequence</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"68\"/>\n        <source>invalid UTF8 string</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"69\"/>\n        <source>unterminated string</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"70\"/>\n        <source>object is missing after a comma</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"71\"/>\n        <source>too deeply nested document</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"72\"/>\n        <source>too large document</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"73\"/>\n        <source>garbage at the end of the document</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenAction</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenaction.cpp\" line=\"59\"/>\n        <source>Show and Run Commands</source>\n        <translation>显示和运行命令</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenEditor</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopeneditor.cpp\" line=\"56\"/>\n        <source>Show All Opened Editors</source>\n        <oldsource>Show All Editors</oldsource>\n        <translation>显示所有打开文档</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFileSystem</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfilesystem.cpp\" line=\"156\"/>\n        <source>File System</source>\n        <translation>文件系统</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFiles</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfiles.cpp\" line=\"72\"/>\n        <source>Go to File</source>\n        <translation>跳转到文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfiles.cpp\" line=\"77\"/>\n        <source>Type &apos;?&apos; to get help on the actions you can take from here</source>\n        <translation>键入&apos;?&apos;在此处获取相关操作的帮助</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFolder</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfolder.cpp\" line=\"71\"/>\n        <source>Browser Folder</source>\n        <translation>浏览目录</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenHelp</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenhelp.cpp\" line=\"49\"/>\n        <source>Show All Quick Open Actions</source>\n        <oldsource>Show Quick Open Help</oldsource>\n        <translation>显示所有快速打开操作</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenLines</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"51\"/>\n        <source>Go to Line</source>\n        <translation>跳转到行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"79\"/>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"84\"/>\n        <source>Open a text file first to go to a line</source>\n        <translation>请先打开文本文件再跳转到行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"97\"/>\n        <source>Type a line number between %1 and %2 to navigate to</source>\n        <translation>键入要导航到的介于%1和%2之间的行号</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"100\"/>\n        <source>Go to Line %1</source>\n        <oldsource>Go to line %1</oldsource>\n        <translation>转到行 %1</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenManager</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"82\"/>\n        <source>Quick Open File</source>\n        <translation>快速打开文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"83\"/>\n        <source>Quick Open Editor</source>\n        <translation>快速打开文档</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"84\"/>\n        <source>Quick Open Symbol</source>\n        <translation>快速跳转符号</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"85\"/>\n        <source>Quick Open Command</source>\n        <translation>快速打开命令</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"86\"/>\n        <source>Show All Quick Open Actions</source>\n        <translation>显示所有快速打开操作</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenMimeType</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmimetype.cpp\" line=\"41\"/>\n        <source>Go to Symbol in File</source>\n        <oldsource>Open Symbol by Name</oldsource>\n        <translation>跳转到文件中的符号</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmimetype.cpp\" line=\"42\"/>\n        <source>not found symbol</source>\n        <translation>没有找到符号</translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenOption</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"20\"/>\n        <source>QuickOpenFiles</source>\n        <translation>快速打开文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"26\"/>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"79\"/>\n        <source>Match case sensitive</source>\n        <translation>区分大小写匹配</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"35\"/>\n        <source>Max files count:</source>\n        <translation>最大文件数:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"73\"/>\n        <source>QuickOpenEditor</source>\n        <translation>快速打开文档</translation>\n    </message>\n</context>\n<context>\n    <name>RecentManager</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.cpp\" line=\"54\"/>\n        <source>Clear All History</source>\n        <translation>清除所有历史</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.cpp\" line=\"169\"/>\n        <source>Clear Menu</source>\n        <translation>清除菜单</translation>\n    </message>\n</context>\n<context>\n    <name>SearchEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"83\"/>\n        <source>Search</source>\n        <translation>搜索</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"84\"/>\n        <source>Stop Search</source>\n        <translation>中止搜索</translation>\n    </message>\n</context>\n<context>\n    <name>SelectExternalDialog</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"14\"/>\n        <source>Debug External Application</source>\n        <translation>调试外部应用程序</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"22\"/>\n        <source>Application:</source>\n        <translation>应用程序:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"29\"/>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"56\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation>浏览...</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"36\"/>\n        <source>Arguments:</source>\n        <translation>参数:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"46\"/>\n        <source>Working directory:</source>\n        <translation>工作目录:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.cpp\" line=\"82\"/>\n        <source>Select Executable</source>\n        <translation>选择可执行文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.cpp\" line=\"92\"/>\n        <source>Select the working directory:</source>\n        <oldsource>Select Working Directory</oldsource>\n        <translation>选择工作目录:</translation>\n    </message>\n</context>\n<context>\n    <name>SessionRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"197\"/>\n        <source>Sessions</source>\n        <translation>会话</translation>\n    </message>\n</context>\n<context>\n    <name>SideDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"50\"/>\n        <source>Move To</source>\n        <translation>移动到</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"54\"/>\n        <source>RightSideBar</source>\n        <translation>右侧边栏</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"56\"/>\n        <source>LeftDockWidgt</source>\n        <translation>左侧停靠窗口</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"58\"/>\n        <source>LeftSideBar</source>\n        <translation>左侧边栏</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"60\"/>\n        <source>RightDockWidget</source>\n        <translation>右侧停靠窗口</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"63\"/>\n        <source>OutputBar</source>\n        <translation>输出栏</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"75\"/>\n        <source>SideBar</source>\n        <translation>边栏</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"76\"/>\n        <source>Show SideBar</source>\n        <translation>显示边栏</translation>\n    </message>\n</context>\n<context>\n    <name>SideWindowStyle</name>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"547\"/>\n        <source>Hide SideBar</source>\n        <translation>隐藏侧边栏</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"585\"/>\n        <source>SideBar Windows</source>\n        <translation>侧边栏窗口</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"586\"/>\n        <source>Output Windows</source>\n        <translation>输出窗口</translation>\n    </message>\n</context>\n<context>\n    <name>SplitDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"300\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"379\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"380\"/>\n        <source>Move To</source>\n        <translation>移动到</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"302\"/>\n        <source>Top</source>\n        <translation>顶部</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"306\"/>\n        <source>Top (Split)</source>\n        <translation>顶部(切分)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"343\"/>\n        <source>TopDockWidget (Split)</source>\n        <translation>项部停靠窗口 (切分)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"343\"/>\n        <source>TopDockWidget</source>\n        <translation>项部停靠窗口</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"312\"/>\n        <source>Bottom</source>\n        <translation>底部</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"316\"/>\n        <source>Bottom (Split)</source>\n        <translation>底部(切分)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"345\"/>\n        <source>BottomDockWidget (Split)</source>\n        <translation>底部停靠窗口 (切分)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"345\"/>\n        <source>BottomDockWidget</source>\n        <translation>底部停靠窗口</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"322\"/>\n        <source>Left</source>\n        <translation>左侧</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"326\"/>\n        <source>Left (Split)</source>\n        <translation>左侧(切分)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"347\"/>\n        <source>LeftDockWidget (Split)</source>\n        <translation>左侧停靠窗口 (切分)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"347\"/>\n        <source>LeftDockWidget</source>\n        <translation>左侧停靠窗口</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"332\"/>\n        <source>Right</source>\n        <translation>右侧</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"336\"/>\n        <source>Right (Split)</source>\n        <translation>右侧(切分)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"349\"/>\n        <source>RightDockWidget (Split)</source>\n        <translation>右侧停靠窗口 (切分)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"349\"/>\n        <source>RightDockWidget</source>\n        <translation>右侧停靠窗口</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"355\"/>\n        <source>Unsplit</source>\n        <translation>不切分</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"360\"/>\n        <source>Split</source>\n        <translation>切分</translation>\n    </message>\n</context>\n<context>\n    <name>SplitWindowStyle</name>\n    <message>\n        <location filename=\"src/liteapp/splitwindowstyle.cpp\" line=\"244\"/>\n        <source>Hide Sidebars</source>\n        <translation>隐藏侧边栏</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/splitwindowstyle.cpp\" line=\"278\"/>\n        <source>Tool Windows</source>\n        <translation>工具窗口</translation>\n    </message>\n</context>\n<context>\n    <name>Terminal</name>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"132\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"189\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"773\"/>\n        <source>New</source>\n        <translation>新建</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"133\"/>\n        <source>Open a new terminal</source>\n        <translation>新建终端</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"135\"/>\n        <source>Close</source>\n        <translation>关闭</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"136\"/>\n        <source>Close current terminal</source>\n        <translation>关闭当前终端</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"138\"/>\n        <source>CloseAll</source>\n        <translation>关闭所有</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"139\"/>\n        <source>Close all terminal</source>\n        <translation>关闭所有终端</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"142\"/>\n        <source>LoadEnv</source>\n        <translation>加载环境</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"143\"/>\n        <source>Current terminal load environment from LiteIDE</source>\n        <translation>从 LiteIDE 加载环境到当前终端</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"148\"/>\n        <source>Filter</source>\n        <translation>过滤</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"184\"/>\n        <source>Dark Mode</source>\n        <translation>暗黑模式</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"195\"/>\n        <source>Login Mode (shell --login)</source>\n        <translation>登录模式 (shell --login)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"237\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"741\"/>\n        <source>Terminal</source>\n        <translation>终端</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"741\"/>\n        <source>Rename Tab Title</source>\n        <translation>重命名标签</translation>\n    </message>\n</context>\n<context>\n    <name>TerminalEdit</name>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"67\"/>\n        <source>Cut</source>\n        <translation>剪切</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"71\"/>\n        <source>Copy</source>\n        <translation>复制</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"75\"/>\n        <source>Paste</source>\n        <translation>粘贴</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"79\"/>\n        <source>Select All</source>\n        <translation>选择所有</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"83\"/>\n        <source>Clear All</source>\n        <translation>清除所有</translation>\n    </message>\n</context>\n<context>\n    <name>TextEditor::Internal::ColorScheme</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_texteditor/colorscheme.cpp\" line=\"212\"/>\n        <source>Not a color scheme file.</source>\n        <translation>没有颜色配置文件.</translation>\n    </message>\n</context>\n<context>\n    <name>Utils::FilterLineEdit</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_editutil/filterlineedit.cpp\" line=\"51\"/>\n        <source>Filter</source>\n        <translation>过滤</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_editutil/filterlineedit.cpp\" line=\"52\"/>\n        <source>Clear text</source>\n        <translation>清除文本</translation>\n    </message>\n</context>\n<context>\n    <name>VTermWidget</name>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"50\"/>\n        <source>Copy</source>\n        <translation>复制</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"54\"/>\n        <source>Paste</source>\n        <translation>粘贴</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"58\"/>\n        <source>Select All</source>\n        <translation>选择所有</translation>\n    </message>\n</context>\n<context>\n    <name>WebKitBrowser</name>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"69\"/>\n        <source>Navigation</source>\n        <translation>导航</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"72\"/>\n        <source>Open Html File</source>\n        <oldsource>Open Html</oldsource>\n        <translation>打开Html文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"119\"/>\n        <source>WebKitBrowser</source>\n        <translation>WebKit浏览器</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"169\"/>\n        <source>False load %1 !</source>\n        <translation>加载失败 %1 !</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"256\"/>\n        <source>Open Html or Markdown File</source>\n        <oldsource>Open Html or Markdown Files</oldsource>\n        <translation>打开HTML或者Markdown文件</translation>\n    </message>\n</context>\n<context>\n    <name>WebKitHtmlWidgetPlugin</name>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkithtmlwidgetplugin.cpp\" line=\"74\"/>\n        <source>Open Html or Markdown File</source>\n        <oldsource>Open Html or Markdown Files</oldsource>\n        <translation>打开HTML或者Markdown文件</translation>\n    </message>\n</context>\n<context>\n    <name>WelcomeBrowser</name>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"65\"/>\n        <source>New</source>\n        <translation>新建</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"66\"/>\n        <source>Open</source>\n        <translation>打开</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"67\"/>\n        <source>Open Folder</source>\n        <translation>打开目录</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"68\"/>\n        <source>Options</source>\n        <translation>选项</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"207\"/>\n        <source>Welcome</source>\n        <oldsource>Welcome Page</oldsource>\n        <translation>起始页</translation>\n    </message>\n</context>\n<context>\n    <name>WelcomePlugin</name>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomeplugin.cpp\" line=\"77\"/>\n        <source>Welcome</source>\n        <oldsource>Home</oldsource>\n        <translation>欢迎</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "liteidex/liteide_zh_TW.ts",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n<TS version=\"2.1\" language=\"zh_CN\">\n<context>\n    <name>AboutDialog</name>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"20\"/>\n        <source>About LiteIDE</source>\n        <oldsource>About Liteide</oldsource>\n        <translation>關於 LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"156\"/>\n        <source>Information</source>\n        <oldsource>Infomation</oldsource>\n        <translation>資訊</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"162\"/>\n        <source>Welcome:</source>\n        <translation>歡迎:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"168\"/>\n        <source>Welcome to LiteIDE X! LiteIDE is a simple, open source, cross-platform IDE.</source>\n        <oldsource>Welcome to LiteIDE X!\nLiteIDE is a simple, open source, cross-platform IDE.</oldsource>\n        <translation type=\"unfinished\">歡迎使用 LiteIDE X!\nLiteIDE是一個簡單，開源，跨平臺的IDE.</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"178\"/>\n        <source>Project:</source>\n        <translation>專案:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"208\"/>\n        <source>Name:</source>\n        <translation>名稱:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"191\"/>\n        <source>Author:</source>\n        <translation>作者:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"222\"/>\n        <source>Version:</source>\n        <translation>版本:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"242\"/>\n        <source>Build:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"215\"/>\n        <source>Based on Qt</source>\n        <oldsource>Based on Qt Version</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"249\"/>\n        <source>Source Code:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"263\"/>\n        <source>Support LiteIDE:</source>\n        <oldsource>Support</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"297\"/>\n        <source>Developers</source>\n        <translation>開發者</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"400\"/>\n        <source>Translations</source>\n        <translation>翻譯</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"412\"/>\n        <source>Chinese</source>\n        <translation>中文</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"426\"/>\n        <source>Japanese</source>\n        <translation>日文</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"440\"/>\n        <source>Russian</source>\n        <translation>俄文</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"454\"/>\n        <source>French</source>\n        <translation>法文</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"468\"/>\n        <source>Traditional Chinese</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"482\"/>\n        <source>German</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"513\"/>\n        <source>Ukrainian</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"544\"/>\n        <source>Thanks to...</source>\n        <translation>感謝...</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"577\"/>\n        <source>License</source>\n        <translation>許可協議</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.ui\" line=\"619\"/>\n        <source>Close</source>\n        <translation>關閉</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/aboutdialog.cpp\" line=\"42\"/>\n        <source>Based on Qt %1 (%2 bit)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>ActionManager</name>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"65\"/>\n        <source>&amp;File</source>\n        <translation>檔案(&amp;F)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"66\"/>\n        <source>&amp;Recent</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"67\"/>\n        <source>&amp;Edit</source>\n        <translation type=\"unfinished\">編輯</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"68\"/>\n        <source>F&amp;ind</source>\n        <oldsource>&amp;Find</oldsource>\n        <translation type=\"unfinished\">搜尋(&amp;I)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"69\"/>\n        <source>&amp;View</source>\n        <translation>檢視(&amp;V)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"74\"/>\n        <source>&amp;Tools</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"75\"/>\n        <source>&amp;Build</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"76\"/>\n        <source>&amp;Debug</source>\n        <translation type=\"unfinished\">除錯(&amp;D)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"77\"/>\n        <source>&amp;Help</source>\n        <translation>說明(&amp;H)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/actionmanager.cpp\" line=\"79\"/>\n        <source>Standard Toolbar</source>\n        <oldsource>Standard ToolBar</oldsource>\n        <translation type=\"unfinished\">標準工具列</translation>\n    </message>\n</context>\n<context>\n    <name>AstWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangast/astwidget.cpp\" line=\"76\"/>\n        <source>Go To Definition</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/astwidget.cpp\" line=\"77\"/>\n        <source>View Import Document</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>BaseDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"77\"/>\n        <source>Hide</source>\n        <translation type=\"unfinished\">隱藏</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"78\"/>\n        <source>Hide Tool Window</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"87\"/>\n        <source>Floating Window</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>BaseFolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"78\"/>\n        <source>Open In New Window</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"79\"/>\n        <source>Open File</source>\n        <translation type=\"unfinished\">開啟編輯器</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"80\"/>\n        <source>New File...</source>\n        <translation type=\"unfinished\">新建文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"81\"/>\n        <source>New File Wizard...</source>\n        <translation type=\"unfinished\">新建文件精靈</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"82\"/>\n        <source>Rename File...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"83\"/>\n        <source>Delete File</source>\n        <translation type=\"unfinished\">刪除文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"85\"/>\n        <source>New Folder...</source>\n        <translation type=\"unfinished\">新建目錄</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"86\"/>\n        <source>Rename Folder...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"87\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"335\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"342\"/>\n        <source>Delete Folder</source>\n        <translation type=\"unfinished\">刪除目錄</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"100\"/>\n        <source>Open Terminal Here</source>\n        <translation type=\"unfinished\">開啟終端機</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"90\"/>\n        <source>Show in Explorer</source>\n        <oldsource>Open Explorer Here</oldsource>\n        <translation type=\"unfinished\">開啟目錄瀏覽</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"77\"/>\n        <source>Open Application</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"92\"/>\n        <source>Show in Finder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"94\"/>\n        <source>Show Containing Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"98\"/>\n        <source>Open Command Prompt Here</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"102\"/>\n        <source>Open in Integrated Terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"104\"/>\n        <source>Open Folder...</source>\n        <oldsource>Add Folder...</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"105\"/>\n        <source>Reload Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"106\"/>\n        <source>Close Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"108\"/>\n        <source>Close All Folders</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"110\"/>\n        <source>Copy</source>\n        <translation type=\"unfinished\">複製</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"111\"/>\n        <source>Paste</source>\n        <translation type=\"unfinished\">貼上</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"113\"/>\n        <source>Copy Path</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"115\"/>\n        <source>Move To Trash</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"198\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"208\"/>\n        <source>Create File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"199\"/>\n        <source>A file with that name already exists!</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"209\"/>\n        <source>Failed to create the file!</source>\n        <translation type=\"unfinished\">建立文件失敗!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"239\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"245\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"250\"/>\n        <source>Rename File</source>\n        <translation type=\"unfinished\">文件更名</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"239\"/>\n        <source>New Name:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"246\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"251\"/>\n        <source>Failed to rename the file!</source>\n        <translation type=\"unfinished\">重命名文件失敗!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"504\"/>\n        <source>An item &quot;%1&quot; already exists in this location. Do you want to replace it and move old item to trash?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"505\"/>\n        <source>Stop</source>\n        <translation type=\"unfinished\">停止</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"506\"/>\n        <source>Keep Both</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"507\"/>\n        <source>Keep Both All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"508\"/>\n        <source>Replace</source>\n        <translation type=\"unfinished\">取代</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"509\"/>\n        <source>Replace All</source>\n        <translation type=\"unfinished\">全部取代</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"609\"/>\n        <source>Are you sure that you want move to trash this item?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"612\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"615\"/>\n        <source>Are you sure that you want move to trash %1 items?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"618\"/>\n        <source>Move to Trash</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"662\"/>\n        <source>Open With</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"669\"/>\n        <source>System Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"290\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"293\"/>\n        <source>Create Folder</source>\n        <translation type=\"unfinished\">建立目錄</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"291\"/>\n        <source>A folder with that name already exists!</source>\n        <translation type=\"unfinished\">目錄名稱已存在!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"294\"/>\n        <source>Failed to create the folder!</source>\n        <translation type=\"unfinished\">建立目錄失敗!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"307\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"316\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"321\"/>\n        <source>Rename Folder</source>\n        <translation type=\"unfinished\">目錄更名</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"307\"/>\n        <source>Folder Name</source>\n        <translation type=\"unfinished\">目錄名稱</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"317\"/>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"322\"/>\n        <source>Failed to rename the folder!</source>\n        <translation type=\"unfinished\">重命名目錄失敗!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"336\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/basefolderview.cpp\" line=\"343\"/>\n        <source>Failed to delete the folder!</source>\n        <translation type=\"unfinished\">刪除目錄失敗!</translation>\n    </message>\n</context>\n<context>\n    <name>BookmarkManager</name>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"61\"/>\n        <source>Toggle Bookmark</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"96\"/>\n        <source>Goto bookmark</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"97\"/>\n        <source>Remove bookmark</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"98\"/>\n        <source>Remove all bookmarks for this file</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"99\"/>\n        <source>Remove all bookmarks for all files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/bookmarks/bookmarkmanager.cpp\" line=\"115\"/>\n        <source>Bookmarks</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>BookmarkRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"81\"/>\n        <source>Bookmarks</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>BuildConfigDialog</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"14\"/>\n        <source>Build Configuration</source>\n        <oldsource>Build Config Dialog</oldsource>\n        <translation type=\"unfinished\">建置設定對話框</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"71\"/>\n        <source>Build ID</source>\n        <translation>建置編號</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"45\"/>\n        <source>Build Path</source>\n        <oldsource>Build File</oldsource>\n        <translation type=\"unfinished\">建置文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"85\"/>\n        <source>GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"103\"/>\n        <source>GOPATH information</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"147\"/>\n        <source>Use Custom GOPATH for Build Path</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"159\"/>\n        <source>Inherit System GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"179\"/>\n        <source>Inherit LiteIDE GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"201\"/>\n        <source>Custom GOPATH (one per line)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"221\"/>\n        <source>Add Directory...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"228\"/>\n        <source>Clear</source>\n        <translation type=\"unfinished\">清除</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"244\"/>\n        <source>LiteIDE</source>\n        <translation>LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"266\"/>\n        <source>Config</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"288\"/>\n        <source>Action</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"310\"/>\n        <source>Custom</source>\n        <oldsource>Build Custom</oldsource>\n        <translation type=\"unfinished\">建置自定項目</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.ui\" line=\"343\"/>\n        <source>Reset all to initial value</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"69\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"73\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"77\"/>\n        <source>Name</source>\n        <translation type=\"unfinished\">名稱</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"70\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"74\"/>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"78\"/>\n        <source>Value</source>\n        <translation type=\"unfinished\">值</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"79\"/>\n        <source>SharedValue</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"82\"/>\n        <source>Id</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"83\"/>\n        <source>Cmd</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/buildconfigdialog.cpp\" line=\"293\"/>\n        <source>Choose directory to add to GOPATH:</source>\n        <translation type=\"unfinished\">載入GOPATH目錄</translation>\n    </message>\n</context>\n<context>\n    <name>CreateDirDialog</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"94\"/>\n        <source>Create Folder</source>\n        <translation type=\"unfinished\">建立目錄</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"96\"/>\n        <source>Directory:</source>\n        <translation type=\"unfinished\">當前目錄:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"98\"/>\n        <source>Dir Name:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"106\"/>\n        <source>Create</source>\n        <translation type=\"unfinished\">新建</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"107\"/>\n        <source>Cancel</source>\n        <translation type=\"unfinished\">取消</translation>\n    </message>\n</context>\n<context>\n    <name>CreateFileDialog</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"44\"/>\n        <source>Create File</source>\n        <oldsource>Create File Dialog</oldsource>\n        <translation type=\"unfinished\">新建文件對話框</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"46\"/>\n        <source>Directory:</source>\n        <translation>當前目錄:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"48\"/>\n        <source>File Name:</source>\n        <translation>文件名稱:</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"56\"/>\n        <source>Create</source>\n        <translation>新建</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"57\"/>\n        <source>Create and Edit</source>\n        <translation>新建並編輯</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderdialog.cpp\" line=\"58\"/>\n        <source>Cancel</source>\n        <translation>取消</translation>\n    </message>\n</context>\n<context>\n    <name>DebugWidget</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"122\"/>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"321\"/>\n        <source>Add Watch</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"221\"/>\n        <source>Async Record</source>\n        <oldsource>AsyncRecord</oldsource>\n        <translation type=\"unfinished\">非同步記錄</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"222\"/>\n        <source>Variables</source>\n        <translation>變數</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"223\"/>\n        <source>Watch</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"224\"/>\n        <source>Call Stack</source>\n        <oldsource>CallStack</oldsource>\n        <translation type=\"unfinished\">呼叫堆疊</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"225\"/>\n        <source>Threads</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"226\"/>\n        <source>Goroutines</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"227\"/>\n        <source>Registers</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"228\"/>\n        <source>Libraries</source>\n        <oldsource>Library</oldsource>\n        <translation type=\"unfinished\">函式庫</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"229\"/>\n        <source>Console</source>\n        <translation>控制台</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"321\"/>\n        <source>Watch expression (e.g. buf main.var os.Stdout):</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"124\"/>\n        <source>Remove Watch</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/debugwidget.cpp\" line=\"125\"/>\n        <source>Remove All Watches</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>DlvDebuggerOption</name>\n    <message>\n        <location filename=\"src/plugins/dlvdebugger/dlvdebuggeroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/dlvdebugger/dlvdebuggeroption.ui\" line=\"20\"/>\n        <source>delve debug pass flags: (example --check-go-version=false)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>DocumentBrowser</name>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"67\"/>\n        <source>Back</source>\n        <oldsource>Backward</oldsource>\n        <translation type=\"unfinished\">返回</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"68\"/>\n        <source>Forward</source>\n        <translation>前進</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"69\"/>\n        <source>Reload</source>\n        <translation>刷新</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"75\"/>\n        <source>Increase Font Size</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"78\"/>\n        <source>Decrease Font Size</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowser.cpp\" line=\"81\"/>\n        <source>Reset Font Size</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>DocumentBrowserFactory</name>\n    <message>\n        <location filename=\"src/utils/documentbrowser/documentbrowserfactory.cpp\" line=\"67\"/>\n        <source>DocumentBrowser</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>EditorManager</name>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"139\"/>\n        <source>Close</source>\n        <translation type=\"unfinished\">關閉</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"165\"/>\n        <source>Move to New Window</source>\n        <oldsource>Move To New Window</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"233\"/>\n        <source>Navigate Forward</source>\n        <oldsource>GoForward</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"141\"/>\n        <source>Close Others</source>\n        <oldsource>Close Others Tabs</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"111\"/>\n        <source>Open Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"142\"/>\n        <source>Close All</source>\n        <oldsource>Close All Tabs</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"143\"/>\n        <source>Close Left Tabs</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"144\"/>\n        <source>Close Right Tabs</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"145\"/>\n        <source>Close Files in Same Folder</source>\n        <oldsource>Close Same Folder Files</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"146\"/>\n        <source>Close Files in Other Folders</source>\n        <oldsource>Close Other Folder Files</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"147\"/>\n        <source>Copy Full Path to Clipboard</source>\n        <oldsource>Copy Path to Clipboard</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"150\"/>\n        <source>Show in Explorer</source>\n        <translation type=\"unfinished\">開啟目錄瀏覽</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"152\"/>\n        <source>Show in Finder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"154\"/>\n        <source>Show Containing Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"158\"/>\n        <source>Open Command Prompt Here</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"160\"/>\n        <source>Open Terminal Here</source>\n        <translation type=\"unfinished\">開啟終端機</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"162\"/>\n        <source>Open in Integrated Terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"224\"/>\n        <source>Navigate Backward</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"426\"/>\n        <source>Save changes to %1?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"427\"/>\n        <source>Unsaved Modifications</source>\n        <oldsource>Save Modify</oldsource>\n        <translation type=\"unfinished\">儲存修改內容</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"524\"/>\n        <source>All Files (*)</source>\n        <translation>所有文件(*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/editormanager.cpp\" line=\"526\"/>\n        <source>Save As</source>\n        <translation>另存爲</translation>\n    </message>\n</context>\n<context>\n    <name>EnvManager</name>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"436\"/>\n        <source>Environment Toolbar</source>\n        <oldsource>Environment ToolBar</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"443\"/>\n        <source>Switching current environment</source>\n        <oldsource>Switch Current Environment</oldsource>\n        <translation type=\"unfinished\">環境變數</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"446\"/>\n        <source>Edit current environment</source>\n        <oldsource>Edit Current Environment</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"447\"/>\n        <source>Reload current environment</source>\n        <oldsource>Reload Current Environment</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/envmanager.cpp\" line=\"451\"/>\n        <source>Select Environment</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>ExportDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"14\"/>\n        <source>Dialog</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"22\"/>\n        <source>Name:</source>\n        <translation type=\"unfinished\">名稱:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"49\"/>\n        <source>Export</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/exportdialog.ui\" line=\"56\"/>\n        <source>ExportAndView</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"194\"/>\n        <source>Use Vim-style Editing</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"196\"/>\n        <source>Read .vimrc</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"198\"/>\n        <source>Path to .vimrc</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal::FakeVimHandler</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"153\"/>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"161\"/>\n        <source>Unknown option: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimactions.cpp\" line=\"156\"/>\n        <source>Argument must be positive: %1=%2</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"949\"/>\n        <source>Mark &quot;%1&quot; not set.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3538\"/>\n        <source>%1%2%</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3540\"/>\n        <source>%1All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"3554\"/>\n        <source>Not implemented in FakeVim.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5719\"/>\n        <source>Unknown option:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5730\"/>\n        <source>Invalid argument:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5733\"/>\n        <source>Trailing characters:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5816\"/>\n        <source>Move lines into themselves.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5860\"/>\n        <source>%n lines moved.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5920\"/>\n        <source>File &quot;%1&quot; exists (add ! to override)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5934\"/>\n        <source>Cannot open file &quot;%1&quot; for writing</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5940\"/>\n        <source>&quot;%1&quot; %2 %3L, %4C written.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5949\"/>\n        <source>Cannot open file &quot;%1&quot; for reading</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5978\"/>\n        <source>&quot;%1&quot; %2L, %3C</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6005\"/>\n        <source>%n lines filtered.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6093\"/>\n        <source>Cannot open file %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6259\"/>\n        <source>Invalid regular expression: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6295\"/>\n        <source>Pattern not found: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6299\"/>\n        <source>Search hit BOTTOM, continuing at TOP.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6300\"/>\n        <source>Search hit TOP, continuing at BOTTOM.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6305\"/>\n        <source>Search hit BOTTOM without match for: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6306\"/>\n        <source>Search hit TOP without match for: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6413\"/>\n        <source>%n lines indented.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6470\"/>\n        <source>%n lines %1ed %2 time.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7043\"/>\n        <source>%n lines yanked.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7748\"/>\n        <source>Already at oldest change.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"7749\"/>\n        <source>Already at newest change.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVim::Internal::FakeVimHandler::Private</name>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"2788\"/>\n        <source>Recursive mapping</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"4195\"/>\n        <source>Type Alt-V, Alt-V to quit FakeVim mode.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"5941\"/>\n        <source> [New] </source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/fakevim/fakevim/fakevimhandler.cpp\" line=\"6166\"/>\n        <source>Not an editor command: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVimEdit</name>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimedit.cpp\" line=\"68\"/>\n        <source>Use FakeVim Editing</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FakeVimEditOption</name>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"20\"/>\n        <source>FakeVim initialization command list (# start is comment):</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/fakevimedit/fakevimeditoption.ui\" line=\"28\"/>\n        <source>Load default init command list</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FiFoTty</name>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"86\"/>\n        <source>Cannot create temporary file: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"97\"/>\n        <source>Cannot create FiFo %1: %2</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litetty/fifotty.cpp\" line=\"104\"/>\n        <source>Cannot open FiFo %1: %2</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FileBrowser</name>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"98\"/>\n        <source>Synchronize with editor</source>\n        <translation>與編輯器同步</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"103\"/>\n        <source>Show Hidden Files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"159\"/>\n        <source>Set As Root Folder</source>\n        <oldsource>Set Folder To Root</oldsource>\n        <translation type=\"unfinished\">設置爲頂層目錄</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"119\"/>\n        <source>Execute File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"101\"/>\n        <source>Reload Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"110\"/>\n        <source>Show Details</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"122\"/>\n        <source>Debug File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"160\"/>\n        <source>Open Folder in New Window</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"161\"/>\n        <source>Add to Folders</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"141\"/>\n        <source>Open Parent</source>\n        <oldsource>Open to Parent</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"169\"/>\n        <source>Filter</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowser.cpp\" line=\"175\"/>\n        <source>File System</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FileBrowserOption</name>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"20\"/>\n        <source>Terminal</source>\n        <translation>終端機</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"26\"/>\n        <source>Command:</source>\n        <translation>指令:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/filebrowser/filebrowseroption.ui\" line=\"36\"/>\n        <source>Arguments:</source>\n        <translation>參數:</translation>\n    </message>\n</context>\n<context>\n    <name>FileManager</name>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"189\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"211\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"233\"/>\n        <source>All Files (*)</source>\n        <translation>所有文件(*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"397\"/>\n        <source>LiteIDE</source>\n        <translation>LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"398\"/>\n        <source>Project &apos;%1&apos; has been created.\nDo you want to open it now?</source>\n        <oldsource>Project &apos;%1&apos; is created.\nDo you want to load?</oldsource>\n        <translation type=\"unfinished\">專案 &apos;%1&apos;已建立,是否要載入?</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"301\"/>\n        <source>Open Project or File</source>\n        <translation>開啟專案或文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"76\"/>\n        <source>Show Hidden Files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"79\"/>\n        <source>Show Details</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"85\"/>\n        <source>Split Mode</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"127\"/>\n        <source>Folders</source>\n        <oldsource>Folers</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"186\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"208\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"230\"/>\n        <source>All Support Files (%1)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"314\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"332\"/>\n        <source>Select a folder:</source>\n        <oldsource>Open Folder</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"679\"/>\n        <source>%1\nThis file has been deleted from the drive,\nbut you have unsaved modifications in your LiteIDE editor.\n\nDo you want to close the editor?\nAnswering &quot;Yes&quot; will discard your unsaved changes.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"686\"/>\n        <source>%1\nThis file has been deleted from the drive.\n\nDo you want to close the editor?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"719\"/>\n        <source>%1\nThis file has been modified on the drive,\nbut you have unsaved modifications in your LiteIDE editor.\n\nDo you want to reload the file from disk?\nAnswering &quot;Yes&quot; will discard your unsaved changes.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"726\"/>\n        <source>%1\nThis file has been modified on the drive.\n\nDo you want to reload the file from disk?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"350\"/>\n        <source>Open Files</source>\n        <translation>開啟文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"82\"/>\n        <source>Synchronize with editor</source>\n        <translation type=\"unfinished\">與編輯器同步</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"113\"/>\n        <source>Filter</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"363\"/>\n        <source>Open Project</source>\n        <translation>開啟專案</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"683\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"688\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"723\"/>\n        <location filename=\"src/liteapp/filemanager.cpp\" line=\"728\"/>\n        <source>LiteIDE X</source>\n        <translation></translation>\n    </message>\n</context>\n<context>\n    <name>FileRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"135\"/>\n        <source>Files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FileSearch</name>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"217\"/>\n        <source>Match whole word</source>\n        <oldsource>Match word</oldsource>\n        <translation type=\"unfinished\">全詞匹配</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"218\"/>\n        <source>Match case</source>\n        <translation type=\"unfinished\">區分大小寫</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"219\"/>\n        <source>Regular expression</source>\n        <translation type=\"unfinished\">使用正則表達式</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"220\"/>\n        <source>Scan subdirectories</source>\n        <oldsource>Look in subdirs</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"241\"/>\n        <source>Search for:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"243\"/>\n        <source>Options:</source>\n        <translation type=\"unfinished\">選項:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"250\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation type=\"unfinished\">瀏覽</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"273\"/>\n        <source>Filter:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"365\"/>\n        <source>Files on File System</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"230\"/>\n        <source>Search</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"231\"/>\n        <source>Cancel</source>\n        <translation type=\"unfinished\">取消</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"251\"/>\n        <source>Current Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"254\"/>\n        <source>Auto Switch</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"278\"/>\n        <source>Clear</source>\n        <translation type=\"unfinished\">清除</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearch.cpp\" line=\"480\"/>\n        <source>Open Directory</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FileSearchManager</name>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"50\"/>\n        <source>Search Item:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"69\"/>\n        <source>Only golang file changes can be revert!</source>\n        <oldsource>This file change cannot be undone!</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"83\"/>\n        <source>New Search</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"85\"/>\n        <source>File Search</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"89\"/>\n        <source>Search Result</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"248\"/>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"253\"/>\n        <source>LiteIDE X</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"248\"/>\n        <source>Warning! Replace text is empty.\nWant to remove all the search items?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"253\"/>\n        <source>Warning! Replace text is whitespace.\nWant to replace to all the search items to whitespace?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"280\"/>\n        <source>The following files have no write permissions. Do you want to change the permissions?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/filesearchmanager.cpp\" line=\"283\"/>\n        <source>File is readonly</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FileSystemWidget</name>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"94\"/>\n        <source>Open File</source>\n        <oldsource>Open Editor</oldsource>\n        <translation type=\"unfinished\">開啟編輯器</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"95\"/>\n        <source>New File...</source>\n        <oldsource>New File</oldsource>\n        <translation type=\"unfinished\">新建文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"96\"/>\n        <source>New File Wizard...</source>\n        <oldsource>New File Wizard</oldsource>\n        <translation type=\"unfinished\">新建文件精靈</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"320\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"326\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"331\"/>\n        <source>Rename File</source>\n        <translation type=\"unfinished\">文件更名</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"98\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"345\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"350\"/>\n        <source>Delete File</source>\n        <oldsource>Remove File</oldsource>\n        <translation type=\"unfinished\">刪除文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"100\"/>\n        <source>New Folder...</source>\n        <oldsource>New Folder</oldsource>\n        <translation type=\"unfinished\">新建目錄</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"346\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"386\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"395\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"400\"/>\n        <source>Rename Folder</source>\n        <translation type=\"unfinished\">目錄更名</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"102\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"414\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"421\"/>\n        <source>Delete Folder</source>\n        <oldsource>Remove Folder</oldsource>\n        <translation type=\"unfinished\">刪除目錄</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"97\"/>\n        <source>Rename File...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"101\"/>\n        <source>Rename Folder...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"104\"/>\n        <source>Open Terminal Here</source>\n        <translation type=\"unfinished\">開啟終端機</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"105\"/>\n        <source>Open Explorer Here</source>\n        <translation type=\"unfinished\">開啟目錄瀏覽</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"107\"/>\n        <source>View Godoc Here</source>\n        <translation type=\"unfinished\">查看GODOC</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"454\"/>\n        <source>Add Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"110\"/>\n        <source>Close Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"109\"/>\n        <source>Add Folder...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"112\"/>\n        <source>Close All Folders</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"279\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"289\"/>\n        <source>Create File</source>\n        <translation type=\"unfinished\">建立文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"280\"/>\n        <source>A file with that name already exists!</source>\n        <oldsource>The file already exists!</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"290\"/>\n        <source>Failed to create the file!</source>\n        <translation type=\"unfinished\">建立文件失敗!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"320\"/>\n        <source>New Name:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"327\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"332\"/>\n        <source>Failed to rename the file!</source>\n        <translation type=\"unfinished\">重命名文件失敗!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"415\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"351\"/>\n        <source>Failed to delete the file!</source>\n        <oldsource>Failed to remove the file!</oldsource>\n        <translation type=\"unfinished\">刪除文件失敗!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"369\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"372\"/>\n        <source>Create Folder</source>\n        <translation type=\"unfinished\">建立目錄</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"370\"/>\n        <source>A folder with that name already exists!</source>\n        <oldsource>The folder name is exists!</oldsource>\n        <translation type=\"unfinished\">目錄名稱已存在!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"373\"/>\n        <source>Failed to create the folder!</source>\n        <translation type=\"unfinished\">建立目錄失敗!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"386\"/>\n        <source>Folder Name</source>\n        <translation type=\"unfinished\">目錄名稱</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"396\"/>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"401\"/>\n        <source>Failed to rename the folder!</source>\n        <translation type=\"unfinished\">重命名目錄失敗!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/filesystem/filesystemwidget.cpp\" line=\"422\"/>\n        <source>Failed to delete the folder!</source>\n        <oldsource>Failed to remove the folder!</oldsource>\n        <translation type=\"unfinished\">刪除目錄失敗!</translation>\n    </message>\n</context>\n<context>\n    <name>Find::Internal::SearchResultWidget</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"132\"/>\n        <source>Search was canceled.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"163\"/>\n        <source>Cancel</source>\n        <translation type=\"unfinished\">取消</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"167\"/>\n        <source>Repeat the search with same parameters</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"168\"/>\n        <source>Search again</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"174\"/>\n        <source>Set show replace mode ui</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"175\"/>\n        <source>Show Replace</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"180\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"441\"/>\n        <source>Replace with:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"186\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"442\"/>\n        <source>Replace all occurrences</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"187\"/>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"443\"/>\n        <source>Replace</source>\n        <translation type=\"unfinished\">取代</translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"191\"/>\n        <source>Preserve case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"204\"/>\n        <source>Expand all items</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"209\"/>\n        <source>Collapse all items</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"318\"/>\n        <source>Revert with:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"319\"/>\n        <source>Revert</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"320\"/>\n        <source>Revert all occurrences</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"592\"/>\n        <source>%n matches replaced.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"594\"/>\n        <source>searching... %n matches found.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"600\"/>\n        <source>searching ...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"606\"/>\n        <source>No matches found.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message numerus=\"yes\">\n        <location filename=\"src/3rdparty/qtc_searchresult/searchresultwidget.cpp\" line=\"608\"/>\n        <source>%n matches found.</source>\n        <translation type=\"unfinished\">\n            <numerusform></numerusform>\n        </translation>\n    </message>\n</context>\n<context>\n    <name>FindApiEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.h\" line=\"73\"/>\n        <source>Search</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.h\" line=\"74\"/>\n        <source>Stop Search</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FindApiWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"284\"/>\n        <source>Search</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"305\"/>\n        <location filename=\"src/plugins/golangdoc/findapiwidget.cpp\" line=\"337\"/>\n        <source>Find</source>\n        <translation type=\"unfinished\">搜尋</translation>\n    </message>\n</context>\n<context>\n    <name>FindDocWidget</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"96\"/>\n        <source>Search</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"104\"/>\n        <source>Find</source>\n        <translation type=\"unfinished\">搜尋</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"123\"/>\n        <source>Find All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"124\"/>\n        <source>Find const</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"126\"/>\n        <source>Find func</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"128\"/>\n        <source>Find interface</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"130\"/>\n        <source>Find pkg</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"132\"/>\n        <source>Find struct</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"134\"/>\n        <source>Find type</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"136\"/>\n        <source>Find var</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"138\"/>\n        <source>Use Regexp</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"140\"/>\n        <source>Match Case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"142\"/>\n        <source>Match Word</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"169\"/>\n        <source>Help</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FindEditor</name>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"63\"/>\n        <source>Match case</source>\n        <translation>區分大小寫</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"64\"/>\n        <source>Regular expression</source>\n        <translation>使用正則表達式</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"65\"/>\n        <source>Wrap around</source>\n        <translation>搜尋到結尾時從頭開始</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"56\"/>\n        <source>Find Next</source>\n        <translation>查找下一個</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"57\"/>\n        <source>Find Previous</source>\n        <oldsource>Find Prev</oldsource>\n        <translation type=\"unfinished\">查找上一個</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"58\"/>\n        <source>Replace With:</source>\n        <translation type=\"unfinished\">取代為:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"59\"/>\n        <source>Replace</source>\n        <translation>取代</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"60\"/>\n        <source>Replace All</source>\n        <translation type=\"unfinished\">全部取代</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"62\"/>\n        <source>Match whole word only</source>\n        <translation type=\"unfinished\">全詞匹配</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"72\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"250\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"472\"/>\n        <source>Ready</source>\n        <translation>已完成</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"81\"/>\n        <source>Close</source>\n        <translation type=\"unfinished\">關閉</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"84\"/>\n        <source>Show Replace</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"103\"/>\n        <source>Find What:</source>\n        <translation>查找:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"115\"/>\n        <source>Options:</source>\n        <oldsource>Find Option:</oldsource>\n        <translation type=\"unfinished\">選項:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"221\"/>\n        <location filename=\"src/plugins/litefind/findeditor.cpp\" line=\"393\"/>\n        <source>Not found</source>\n        <translation>沒有找到</translation>\n    </message>\n</context>\n<context>\n    <name>FolderListView</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"252\"/>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"262\"/>\n        <source>Delete File</source>\n        <translation type=\"unfinished\">刪除文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"253\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"263\"/>\n        <source>Failed to delete the file!</source>\n        <translation type=\"unfinished\">刪除文件失敗!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"275\"/>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"285\"/>\n        <source>Delete Folder</source>\n        <translation type=\"unfinished\">刪除目錄</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"276\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderlistview.cpp\" line=\"286\"/>\n        <source>Failed to delete the folder!</source>\n        <translation type=\"unfinished\">刪除目錄失敗!</translation>\n    </message>\n</context>\n<context>\n    <name>FolderRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"166\"/>\n        <source>Folders</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>FolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"173\"/>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"183\"/>\n        <source>Delete File</source>\n        <translation type=\"unfinished\">刪除文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"174\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"184\"/>\n        <source>Failed to delete the file!</source>\n        <translation type=\"unfinished\">刪除文件失敗!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"230\"/>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"240\"/>\n        <source>Delete Folder</source>\n        <translation type=\"unfinished\">刪除目錄</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"231\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/folderview.cpp\" line=\"241\"/>\n        <source>Failed to delete the folder!</source>\n        <translation type=\"unfinished\">刪除目錄失敗!</translation>\n    </message>\n</context>\n<context>\n    <name>GdbDebuggerOption</name>\n    <message>\n        <location filename=\"src/plugins/gdbdebugger/gdbdebuggeroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/gdbdebugger/gdbdebuggeroption.ui\" line=\"20\"/>\n        <source>Enable --tty for program being debugged.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GoAddTagsDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"14\"/>\n        <source>Add Tags To Struct Field</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"23\"/>\n        <source>Add JSON Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"54\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"105\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"169\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"197\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"281\"/>\n        <source>Options</source>\n        <translation type=\"unfinished\">選項</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"61\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"112\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"176\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"204\"/>\n        <source>Multiple options separated by commas</source>\n        <oldsource>Multiple options are separated by commas</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"74\"/>\n        <source>Add XML Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"125\"/>\n        <source>Add Custom Tags</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"155\"/>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"187\"/>\n        <source>Tag Name</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"162\"/>\n        <source>Setup custom tag name</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"299\"/>\n        <source>Sort sorts the tags in increasing order according to the key name</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"306\"/>\n        <source>Override current tags when adding tags</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goaddtagsdialog.ui\" line=\"316\"/>\n        <source>Info</source>\n        <translation type=\"unfinished\">資訊</translation>\n    </message>\n</context>\n<context>\n    <name>GoRemoveTagsDialog</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"14\"/>\n        <source>Remove Tags From Struct Field</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"23\"/>\n        <source>Remove Tags And Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"29\"/>\n        <source>Clear All Tags</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"39\"/>\n        <source>Clear All Tags Options</source>\n        <oldsource>Clear All Tag Options</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"46\"/>\n        <source>Remove JSON Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"53\"/>\n        <source>Remove XML Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"60\"/>\n        <source>Remove Custom Tag</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"70\"/>\n        <source>Multiple tags separated by commas</source>\n        <oldsource>Multiple tags  are separated by commas</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"77\"/>\n        <source>Remove JSON Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"84\"/>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"98\"/>\n        <source>Multiple options separated by commas</source>\n        <oldsource>Multiple options are separated by commas</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"91\"/>\n        <source>Remove XML Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"111\"/>\n        <source>Remove Custom Tag Options</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"118\"/>\n        <source>Setup remove custom tag and option, example tag=opt1,tag=opt2</source>\n        <oldsource>Setup remove custom tag option, example tag=opt1,tag=opt2</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"121\"/>\n        <source>tag=option</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/goremovetagsdialog.ui\" line=\"131\"/>\n        <source>Info</source>\n        <translation type=\"unfinished\">資訊</translation>\n    </message>\n</context>\n<context>\n    <name>GolangAst</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"60\"/>\n        <source>No outline available</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"74\"/>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"77\"/>\n        <source>Synchronize with editor</source>\n        <translation type=\"unfinished\">與編輯器同步</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"80\"/>\n        <source>Go Class View</source>\n        <oldsource>Class View</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangast.cpp\" line=\"81\"/>\n        <source>Go Outline</source>\n        <oldsource>Outline</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangAstOption</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"20\"/>\n        <source>QuickOpenSymbol</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"26\"/>\n        <source>Show import path</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangast/golangastoption.ui\" line=\"33\"/>\n        <source>Match case sensitive</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangCodeOption</name>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"20\"/>\n        <source>PKG automitic import prompt</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"26\"/>\n        <source>PKG automatic import hints for all packages (GOPATH)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"33\"/>\n        <source>PKG automatic import hints for standard package</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"43\"/>\n        <source>Gocode</source>\n        <oldsource>Go API</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"56\"/>\n        <source>Auto update depends package when it&apos;s source changed.</source>\n        <oldsource>Auto update depends package when its source is changed.</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcodeoption.ui\" line=\"49\"/>\n        <source>Close gocode when exiting</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangDoc</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"100\"/>\n        <source>Godoc Search</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"92\"/>\n        <source>Go Doc Search</source>\n        <oldsource>Golang Doc Search</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"96\"/>\n        <source>Go Api Index</source>\n        <oldsource>Golang Api Index</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdoc.cpp\" line=\"111\"/>\n        <source>Find Package:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangDocOption</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"20\"/>\n        <source>Go API</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"26\"/>\n        <source>Use default context (fast)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/golangdocoption.ui\" line=\"33\"/>\n        <source>Only load standard API documentation</source>\n        <oldsource>Only load standard api</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"90\"/>\n        <source>View import package use godoc</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"93\"/>\n        <source>View Expression Information</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"96\"/>\n        <source>Jump to Declaration</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"99\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"105\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"108\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"111\"/>\n        <source>Find Usages</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"102\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"114\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"117\"/>\n        <source>Rename Symbol Under Cursor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"111\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"114\"/>\n        <source>%1 (Module/GOPATH) with GOROOT</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"170\"/>\n        <source>Stop</source>\n        <translation type=\"unfinished\">停止</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"175\"/>\n        <source>Go Source Query</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"180\"/>\n        <source>SourceQuery What</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"184\"/>\n        <source>Callees</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"188\"/>\n        <source>Callers</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"192\"/>\n        <source>Callstack</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"196\"/>\n        <source>Definition</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"200\"/>\n        <source>Describe</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"204\"/>\n        <source>Freevars</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"208\"/>\n        <source>Implements</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"212\"/>\n        <source>Implements(GOPATH)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"216\"/>\n        <source>Peers</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"220\"/>\n        <source>Referrers</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"224\"/>\n        <source>Pointsto</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"228\"/>\n        <source>Whicherrs</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"232\"/>\n        <source>Add Tags To Struct Field</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"236\"/>\n        <source>Remove Tags From Struct Field</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"354\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"391\"/>\n        <source>Refactor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"361\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"399\"/>\n        <source>SourceQuery</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"812\"/>\n        <location filename=\"src/plugins/golangedit/golangedit.cpp\" line=\"993\"/>\n        <source>Below files in package %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangEditOption</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"20\"/>\n        <source>Mouse</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"26\"/>\n        <source>Go root source file editor setup read only</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"33\"/>\n        <source>Enable view expression infomation on mouse</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangeditoption.ui\" line=\"40\"/>\n        <source>Enable mouse navigation</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangFileSearch</name>\n    <message>\n        <location filename=\"src/plugins/golangedit/golangfilesearch.cpp\" line=\"59\"/>\n        <source>Golang Find Usages</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangFmtOption</name>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"20\"/>\n        <source>Format Options</source>\n        <oldsource>Golang Format</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"26\"/>\n        <source>Goimports updates your Go import lines, adding missing ones and removing unreferenced ones.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"29\"/>\n        <source>Enable update imports line, adding missing ones and removing unreferenced ones.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"46\"/>\n        <source>Synchronous</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"52\"/>\n        <source>Synchronous code formatting</source>\n        <oldsource> Synchronous code formatting</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"61\"/>\n        <source>Synchronous code formatting timeout in milliseconds (500ms or more):</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtoption.ui\" line=\"36\"/>\n        <source>Automatically format code when saving</source>\n        <oldsource>When the editor is saved automatically gofmt</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangFmtPlugin</name>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"58\"/>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"66\"/>\n        <source>Format Code</source>\n        <oldsource>Format Code (goimports)</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangfmt/golangfmtplugin.cpp\" line=\"59\"/>\n        <source>Format Code (Adjusts Imports)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GolangPackageOption</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.cpp\" line=\"304\"/>\n        <source>Choose directory to add to GOPATH:</source>\n        <translation type=\"unfinished\">載入GOPATH目錄</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"14\"/>\n        <source>Manage GOPATH / Modules</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"35\"/>\n        <source>Go Modules</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"78\"/>\n        <source>Custom GONOPROXY</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"88\"/>\n        <source>Custom GOPROXY</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"95\"/>\n        <source>Custom GO111MODULE</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"102\"/>\n        <source>Custom GONOSUMDB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"109\"/>\n        <source>Custom GOPRIVATE</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"125\"/>\n        <source>TextLabel</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"137\"/>\n        <source>GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"163\"/>\n        <source>Use System GOPATH</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"186\"/>\n        <source>Reload</source>\n        <translation type=\"unfinished\">刷新</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"210\"/>\n        <source>Use Custom GOPATH (one per line)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"233\"/>\n        <source>Add Directory...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/golangpackageoption.ui\" line=\"240\"/>\n        <source>Clear</source>\n        <translation type=\"unfinished\">清除</translation>\n    </message>\n</context>\n<context>\n    <name>GolangPresentEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"64\"/>\n        <source>Section (s1)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"67\"/>\n        <source>Subsection (s2)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"70\"/>\n        <source>Sub-subsection (s3)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"73\"/>\n        <source>Bold</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"76\"/>\n        <source>Italic</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"79\"/>\n        <source>Inline Code</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"82\"/>\n        <source>Switch Bullets</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"85\"/>\n        <source>Comment/Uncomment Selection</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"88\"/>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"267\"/>\n        <source>Export HTML</source>\n        <translation type=\"unfinished\">匯出HTML文檔</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"91\"/>\n        <source>Verify Present</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"256\"/>\n        <source>Present verify success</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"258\"/>\n        <source>Present verify false</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpresent/golangpresentedit.cpp\" line=\"310\"/>\n        <source>Export PDF</source>\n        <translation type=\"unfinished\">匯出PDF文檔</translation>\n    </message>\n</context>\n<context>\n    <name>GolangSymbol</name>\n    <message>\n        <location filename=\"src/plugins/golangast/golangsymbol.cpp\" line=\"62\"/>\n        <source>Quick Open Symbol by Name</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>GoplayBrowser</name>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"70\"/>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"132\"/>\n        <source>Go Playground</source>\n        <translation></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"72\"/>\n        <source>Run</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"73\"/>\n        <source>Stop</source>\n        <translation type=\"unfinished\">停止</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"74\"/>\n        <source>New</source>\n        <translation type=\"unfinished\">新建</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"75\"/>\n        <source>Load...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"76\"/>\n        <source>Save...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"77\"/>\n        <source>Explore Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"175\"/>\n        <source>Running...</source>\n        <oldsource>Running...\n\n</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"195\"/>\n        <source>Error: %1.</source>\n        <oldsource>\nError: %1.</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"197\"/>\n        <source>Success: %2.</source>\n        <oldsource>\nSuccess: %2.</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"247\"/>\n        <source>Load File</source>\n        <translation>讀取文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"247\"/>\n        <source>Select a file to load:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"263\"/>\n        <source>Save File</source>\n        <translation>儲存文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangplay/goplaybrowser.cpp\" line=\"263\"/>\n        <source>New File Name:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>HtmlPreview</name>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"71\"/>\n        <source>Page Style</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"76\"/>\n        <source>Reload</source>\n        <translation type=\"unfinished\">刷新</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"77\"/>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"381\"/>\n        <source>Export Html</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"78\"/>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"413\"/>\n        <source>Export PDF</source>\n        <translation type=\"unfinished\">匯出PDF文檔</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"79\"/>\n        <source>Print Preview</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"82\"/>\n        <source>Synchronize preview and code scrollbars</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"88\"/>\n        <source>Config</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"168\"/>\n        <source>Plain HTML</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"389\"/>\n        <source>Export Failed</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"85\"/>\n        <source>Automatically display preview</source>\n        <oldsource>Automatically Display Preview</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"99\"/>\n        <source>HTML Preview</source>\n        <oldsource>Html Preview</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/htmlpreview.cpp\" line=\"390\"/>\n        <source>Could not open %1 for writing!</source>\n        <oldsource>Can not write file %1</oldsource>\n        <translation type=\"unfinished\">無法寫入文件 %1</translation>\n    </message>\n</context>\n<context>\n    <name>ImageEditor</name>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"52\"/>\n        <source>ZoomIn</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"55\"/>\n        <source>ZoomOut</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"58\"/>\n        <source>Reset to original size</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"61\"/>\n        <source>Fit to view</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"64\"/>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"247\"/>\n        <source>Play movie</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"68\"/>\n        <source>Prev frame</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"72\"/>\n        <source>Next frame</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditor.cpp\" line=\"244\"/>\n        <source>Pause movie</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>ImageEditorFactory</name>\n    <message>\n        <location filename=\"src/plugins/imageeditor/imageeditorfactory.cpp\" line=\"122\"/>\n        <source>Image Viewer</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>ImportPkgTip</name>\n    <message>\n        <location filename=\"src/plugins/golangcode/golangcode.cpp\" line=\"847\"/>\n        <source>warning, pkg not find, please enter to import :</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>JsonEdit</name>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"51\"/>\n        <source>Verify</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"53\"/>\n        <source>Format Json</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/jsonedit/jsonedit.cpp\" line=\"55\"/>\n        <source>Compact Json</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteApp</name>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"284\"/>\n        <source>Event Log</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"271\"/>\n        <source>Escape</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"756\"/>\n        <source>Close File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"759\"/>\n        <source>Close All Files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"769\"/>\n        <source>Save File</source>\n        <translation type=\"unfinished\">儲存文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"772\"/>\n        <source>Save File As...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"775\"/>\n        <source>Save All Files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"762\"/>\n        <source>Open Project</source>\n        <translation>開啟專案</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"287\"/>\n        <source>Options</source>\n        <translation type=\"unfinished\">選項</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"733\"/>\n        <source>New...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"736\"/>\n        <source>Open File...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"739\"/>\n        <source>Open Folder...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"742\"/>\n        <source>Open Folder in New Window...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"747\"/>\n        <source>Close All Folders</source>\n        <oldsource>Add Folder...</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"750\"/>\n        <source>New Window</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"753\"/>\n        <source>Close Window</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"764\"/>\n        <source>Save Project</source>\n        <translation>儲存專案</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"766\"/>\n        <source>Close Project</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"778\"/>\n        <source>Exit</source>\n        <translation>離開</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"784\"/>\n        <source>Full Screen</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"788\"/>\n        <source>About LiteIDE</source>\n        <translation type=\"unfinished\">關於 LiteIDE</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteapp.cpp\" line=\"794\"/>\n        <source>About Plugins</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteAppOption</name>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"30\"/>\n        <source>Store [*]</source>\n        <oldsource>Store</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"57\"/>\n        <source>Language:</source>\n        <translation>語言:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"144\"/>\n        <source>Icon [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"300\"/>\n        <source>Reload files in session</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"312\"/>\n        <source>Recent Files</source>\n        <oldsource>Recent File</oldsource>\n        <translation type=\"unfinished\">最近開啟的文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"318\"/>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"357\"/>\n        <source>Max Count:</source>\n        <oldsource>Max Recent:</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"229\"/>\n        <source>Monitoring files for modifications</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"41\"/>\n        <source>Store settings to local ini file</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"51\"/>\n        <source>Interface [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"74\"/>\n        <source>Style:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"84\"/>\n        <source>Use tool window shortcuts</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"112\"/>\n        <source>Theme [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"153\"/>\n        <source>Fallback build-in icon library and liteapp/qrc/default</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"156\"/>\n        <source>Load the external file icon library</source>\n        <oldsource>Load custome icon from liteapp/qrc folder</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"184\"/>\n        <source>Automatically save documents</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"190\"/>\n        <source>Automatically save documents when application is idle</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"200\"/>\n        <source>sec</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"235\"/>\n        <source>Auto reload or close editor buffer,if underlying file is modified/deleted.</source>\n        <oldsource>Auto reload editor buffer from disk file,if underlying file is modified/deleted.</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"263\"/>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"269\"/>\n        <source>Session</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"325\"/>\n        <source>0-99</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"351\"/>\n        <source>Editor Tabs</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"364\"/>\n        <source>10-999</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"407\"/>\n        <source>Display</source>\n        <translation type=\"unfinished\">顯示</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"413\"/>\n        <source>Display [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"419\"/>\n        <source>Show splash screen on startup</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"426\"/>\n        <source>Show welcome page on startup</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"509\"/>\n        <source>Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"515\"/>\n        <source>Editor tab [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"521\"/>\n        <source>Show close buttons on each editor tab</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"528\"/>\n        <source>Enable mouse wheel navigation on tabs</source>\n        <oldsource>Enable mouse wheel selected on tab</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"436\"/>\n        <source>Toolbar Icon Size [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"538\"/>\n        <source>Editor navigate</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"544\"/>\n        <source>Enable mouse extra &apos;Back&apos; button and &apos;Forward&apos; button for go back and forward</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"568\"/>\n        <source>Keyboard</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"574\"/>\n        <source>Format: {Ctrl+B},{Ctrl+Shift+B},{Ctrl+K,Ctrl+U},{Ctrl+Shift+Z;Ctrl+Y}</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"586\"/>\n        <source>Hide standard commands</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"593\"/>\n        <source>Reset</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"600\"/>\n        <source>Reset All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"620\"/>\n        <source>Import...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"627\"/>\n        <source>Export...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"24\"/>\n        <source>Generic</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"118\"/>\n        <source>Theme:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.ui\" line=\"275\"/>\n        <source>Reload session on startup</source>\n        <oldsource>Auto load last session</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"97\"/>\n        <source>SideBarStyle</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"98\"/>\n        <source>SplitterStyle</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"82\"/>\n        <source>Command</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"83\"/>\n        <source>Label</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"84\"/>\n        <source>Shortcuts</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"85\"/>\n        <source>NativeText</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"86\"/>\n        <source>Standard</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"506\"/>\n        <source>Import Keyboard Mapping Scheme</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"506\"/>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"540\"/>\n        <source>Keyboard Mapping Scheme (%1)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"513\"/>\n        <source>Could not read scheme from %1!</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"540\"/>\n        <source>Export Keyboard Mapping Scheme</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/liteappoption.cpp\" line=\"551\"/>\n        <source>Could not write scheme to %1!</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuild</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"142\"/>\n        <source>Build Toolbar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"150\"/>\n        <source>Build Configuration...</source>\n        <oldsource>Build Config</oldsource>\n        <translation type=\"unfinished\">建置設定</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"168\"/>\n        <source>Stop Action</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"172\"/>\n        <source>Clear Output</source>\n        <oldsource>Clear All</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"176\"/>\n        <source>Execute File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"179\"/>\n        <source>Debug File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"182\"/>\n        <source>Lock Build Path</source>\n        <oldsource>Lock Go Build Path</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"184\"/>\n        <source>Build Path Configuration</source>\n        <oldsource>Go Build Configuration</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"230\"/>\n        <source>Use godoc View</source>\n        <translation type=\"unfinished\">查看GODOC</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"287\"/>\n        <source>Line Wrap</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"291\"/>\n        <source>Auto Clear</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"295\"/>\n        <source>Automatic positioning cursor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"310\"/>\n        <source>Setup</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"318\"/>\n        <source>Build Output</source>\n        <oldsource>Build</oldsource>\n        <translation>編譯輸出</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"731\"/>\n        <source>Current environment change id &quot;%1&quot;</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1145\"/>\n        <source>Lock Build</source>\n        <oldsource>Lock Build: %1</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1489\"/>\n        <source>Error: %1.</source>\n        <oldsource>Error: %1.\n</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1492\"/>\n        <source>Command exited with code %1.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1494\"/>\n        <source>Success: %1.</source>\n        <oldsource>Success: %1.\n</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1543\"/>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1596\"/>\n        <source>A process is currently running.  Stop the current action first.</source>\n        <oldsource>A process is currently running.  Stop the current action first.\n</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1582\"/>\n        <source>Killing current process...</source>\n        <oldsource>Killing current process...\n</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1592\"/>\n        <source>Failed to terminate the existing process!</source>\n        <oldsource>Failed to terminate the existing process!\n</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1802\"/>\n        <source>Started process successfully</source>\n        <oldsource>Started process successfully\n</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuild.cpp\" line=\"1802\"/>\n        <source>Failed to start process</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuildOption</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"20\"/>\n        <source>Recheck Go installation when changing environments</source>\n        <oldsource>Recheck go env if enviroment changed</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildoption.ui\" line=\"27\"/>\n        <source>Build command configuration files [*]</source>\n        <oldsource>Build command configuration files:</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteBuildPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"102\"/>\n        <source>Close</source>\n        <translation type=\"unfinished\">關閉</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"105\"/>\n        <source>Execute:</source>\n        <oldsource>Exec:</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litebuild/litebuildplugin.cpp\" line=\"112\"/>\n        <source>Execute File</source>\n        <oldsource>Execute</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebug</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"114\"/>\n        <source>Stop</source>\n        <translation>停止</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"75\"/>\n        <source>Clear</source>\n        <translation type=\"unfinished\">清除</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"111\"/>\n        <source>Continue</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"117\"/>\n        <source>Show Current Line</source>\n        <translation>顯示當前行</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"189\"/>\n        <source>Debug Output</source>\n        <oldsource>Debug</oldsource>\n        <translation>除錯輸出</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"105\"/>\n        <source>Start Debugging External Application...</source>\n        <oldsource>Start Debugging External Application</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"93\"/>\n        <source>Close</source>\n        <translation type=\"unfinished\">關閉</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"108\"/>\n        <source>Start Debugging</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"120\"/>\n        <source>Step Into</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"123\"/>\n        <source>Step Over</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"126\"/>\n        <source>Step Out</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"129\"/>\n        <source>Run to Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"132\"/>\n        <source>Insert/Remove Breakpoint</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebug.cpp\" line=\"135\"/>\n        <source>Remove All Breakpoints</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebugOption</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"20\"/>\n        <source>Debug</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugoption.ui\" line=\"26\"/>\n        <source>Automatically insert breakpoint main.main when debugging</source>\n        <oldsource>Automatically add breakpoint main.main when debugging</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteDebugPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/litedebugplugin.cpp\" line=\"58\"/>\n        <source>Debug Window</source>\n        <oldsource>Debug</oldsource>\n        <translation>除錯視窗</translation>\n    </message>\n</context>\n<context>\n    <name>LiteDoc</name>\n    <message>\n        <location filename=\"src/plugins/welcome/litedoc.cpp\" line=\"63\"/>\n        <source>LiteIDE Documentation</source>\n        <oldsource>LiteIDE Document Browser</oldsource>\n        <translation type=\"unfinished\">IDE文件瀏覽</translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditor</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"254\"/>\n        <source>Undo</source>\n        <translation type=\"unfinished\">復原</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"257\"/>\n        <source>Redo</source>\n        <translation type=\"unfinished\">重做</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"260\"/>\n        <source>Cut</source>\n        <translation type=\"unfinished\">剪下</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"263\"/>\n        <source>Copy</source>\n        <translation type=\"unfinished\">複製</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"266\"/>\n        <source>Paste</source>\n        <translation type=\"unfinished\">貼上</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"268\"/>\n        <source>Select All</source>\n        <translation type=\"unfinished\">全部選擇</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"301\"/>\n        <source>Go to Doc Start</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"305\"/>\n        <source>Go to Doc End</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"309\"/>\n        <source>Go to Line Start</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"313\"/>\n        <source>Go to Line End</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"317\"/>\n        <source>Go to Previous Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"321\"/>\n        <source>Go to Next Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"325\"/>\n        <source>Go to Previous Character</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"329\"/>\n        <source>Go to Next Charater</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"333\"/>\n        <source>Go to Previous Word</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"337\"/>\n        <source>Go to Next Word</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"358\"/>\n        <source>Go to Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"361\"/>\n        <source>File is readonly</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"364\"/>\n        <source>File is writable</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"404\"/>\n        <source>Line Wrap (MimeType)</source>\n        <oldsource>Word Wrap (MimeType)</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"415\"/>\n        <source>Toggle Comment</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"418\"/>\n        <source>Toggle Block Commnet</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"421\"/>\n        <source>Auto-indent Selection</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"425\"/>\n        <source>Tab To Spaces (MimeType)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"429\"/>\n        <source>Line End Windows (\\r\\n)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"433\"/>\n        <source>Line End Unix (\\n)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"437\"/>\n        <source>Visualize Whitespace (Global)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"459\"/>\n        <source>Title Case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"463\"/>\n        <source>Upper Case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"467\"/>\n        <source>Lower Case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"471\"/>\n        <source>Swap Case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"475\"/>\n        <source>Tab To Spaces</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"479\"/>\n        <source>Spaces To Tab</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"645\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"733\"/>\n        <source>Advanced</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"671\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"751\"/>\n        <source>Goto</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"696\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"774\"/>\n        <source>Convert Tab</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"700\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"778\"/>\n        <source>Code Folding</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"690\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"768\"/>\n        <source>Convert Case</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1199\"/>\n        <source>Export HTML</source>\n        <translation>匯出HTML文檔</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1207\"/>\n        <source>Export Failed</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1208\"/>\n        <source>Could not open %1 for writing.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1227\"/>\n        <source>Export PDF</source>\n        <translation>匯出PDF文檔</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1252\"/>\n        <source>Print Document</source>\n        <translation>列印文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"286\"/>\n        <source>Print Preview...</source>\n        <oldsource>Print Preview Document</oldsource>\n        <translation type=\"unfinished\">預覽列印</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"282\"/>\n        <source>Export HTML...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"284\"/>\n        <source>Export PDF...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"285\"/>\n        <source>Print...</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"288\"/>\n        <source>Go to Previous Block</source>\n        <oldsource>Go To Previous Block</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"295\"/>\n        <source>Select Block</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"298\"/>\n        <source>Go to Matching Brace</source>\n        <oldsource>Go To Matching Brace</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"341\"/>\n        <source>Fold</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"344\"/>\n        <source>Unfold</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"347\"/>\n        <source>Fold All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"350\"/>\n        <source>Unfold All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1327\"/>\n        <source>Go To Line</source>\n        <oldsource>Goto Line</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"368\"/>\n        <source>Duplicate</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"372\"/>\n        <source>Delete Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"376\"/>\n        <source>Copy Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"380\"/>\n        <source>Cut Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"384\"/>\n        <source>Insert Line Before</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"388\"/>\n        <source>Insert Line After</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"392\"/>\n        <source>Increase Font Size</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"395\"/>\n        <source>Decrease Font Size</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"398\"/>\n        <source>Reset Font Size</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"401\"/>\n        <source>Clean Whitespace</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"408\"/>\n        <source>Code Complete</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"444\"/>\n        <source>Move Line Up</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"447\"/>\n        <source>Move Line Down</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"450\"/>\n        <source>Copy Line Up</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"453\"/>\n        <source>Copy Line Down</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"456\"/>\n        <source>Join Lines</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"706\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"784\"/>\n        <source>Settings</source>\n        <oldsource>File Setup</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"892\"/>\n        <source>Reload File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1269\"/>\n        <source>Do you want to permanently discard unsaved modifications and reload %1?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"291\"/>\n        <source>Go to Next Block</source>\n        <oldsource>Go To Next Block</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1301\"/>\n        <source>ReadOnly</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditor.cpp\" line=\"1327\"/>\n        <source>Line: </source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorFileFactory</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorfilefactory.cpp\" line=\"203\"/>\n        <source>Text Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorOption</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"408\"/>\n        <source>Load File</source>\n        <translation type=\"unfinished\">讀取文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"414\"/>\n        <source>Check and convert no printable char to &apos;.&apos;</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"30\"/>\n        <source>Font</source>\n        <translation>字型</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"24\"/>\n        <source>Font &amp;&amp; Colors</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"38\"/>\n        <source>Family:</source>\n        <translation>字型:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"48\"/>\n        <source>Show Monospace Font</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"72\"/>\n        <source>Size:</source>\n        <translation>大小:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"92\"/>\n        <source>Zoom:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"99\"/>\n        <source>%</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"118\"/>\n        <source>Antialias</source>\n        <translation>反鋸齒</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"138\"/>\n        <source>Restore Default Font</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"150\"/>\n        <source>Editor Color Scheme</source>\n        <oldsource>ColorStyle Scheme</oldsource>\n        <translation type=\"unfinished\">顏色配置主題</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"158\"/>\n        <source>File:</source>\n        <translation>文件:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"175\"/>\n        <source>Edit</source>\n        <translation>編輯</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"220\"/>\n        <source>Syntax Auto-completion</source>\n        <oldsource>Auto complete brackets</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"302\"/>\n        <source>Fuzzy code completion</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"350\"/>\n        <source>Clean completion cache when saving files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"357\"/>\n        <source>Clean whitespace when saving files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"364\"/>\n        <source>Enable scroll wheel zooming</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"371\"/>\n        <source>Add copied text into the clipboard as HTML</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"378\"/>\n        <source>Allow vertical scrolling to the last line [*]</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"437\"/>\n        <source>Display VisualizeWhitespace</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"451\"/>\n        <source>Word wrap by default</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"430\"/>\n        <source>Display code fold</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"509\"/>\n        <source>Display offset position</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"533\"/>\n        <source>File Types</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"214\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"289\"/>\n        <source>Behavior</source>\n        <translation>行爲</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"444\"/>\n        <source>Display EOF</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"458\"/>\n        <source>Display line numbers</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"465\"/>\n        <source>Display indent guide</source>\n        <oldsource>Display indent guide </oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"474\"/>\n        <source>Display right margin at column</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"295\"/>\n        <source>Automatic indentation</source>\n        <oldsource>Enable automatic indentation</oldsource>\n        <translation type=\"unfinished\">啓用自動縮排</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"309\"/>\n        <source>Case sensitive code completion</source>\n        <oldsource>Completer case sensitive</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"318\"/>\n        <source>Code completion prefix length:</source>\n        <oldsource>Word Complete Prefix Length</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"402\"/>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.ui\" line=\"424\"/>\n        <source>Display</source>\n        <translation>顯示</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"74\"/>\n        <source>MIME Type</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"75\"/>\n        <source>Tab Width</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"76\"/>\n        <source>Tab To Spaces</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"78\"/>\n        <source>File Extensions</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditoroption.cpp\" line=\"77\"/>\n        <source>Custom Extensions</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteEditorPlugin</name>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorplugin.cpp\" line=\"71\"/>\n        <source>Edit ToolBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteeditor/liteeditorplugin.cpp\" line=\"77\"/>\n        <source>Edit Navigation Bar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteEnvOption</name>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation>表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"20\"/>\n        <source>Environment definition files:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/liteenv/liteenvoption.ui\" line=\"33\"/>\n        <source>Environment changes will take effect after switching environments.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteFindPlugin</name>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"72\"/>\n        <source>Find</source>\n        <translation>搜尋</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"75\"/>\n        <source>Find Next</source>\n        <translation>查找下一個</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"78\"/>\n        <source>Find Previous</source>\n        <translation>查找上一個</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"81\"/>\n        <source>Replace</source>\n        <translation>取代</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litefind/litefindplugin.cpp\" line=\"87\"/>\n        <source>File Search</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>LiteTabWidget</name>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"62\"/>\n        <source>Open a new tab</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"65\"/>\n        <source>List All Tabs</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/tabwidget/litetabwidget.cpp\" line=\"71\"/>\n        <source>Close Tab</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownBatchBrowser</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"142\"/>\n        <source>Markdown Exporter</source>\n        <oldsource>Markdown Batch</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"162\"/>\n        <source>All Files (*)</source>\n        <translation type=\"unfinished\">所有文件(*)</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"231\"/>\n        <source>Select the folder containing your markdown files:</source>\n        <oldsource>Select Markdown Folder</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"242\"/>\n        <source>Select Markdown Files</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"290\"/>\n        <source>Select the folder to contain separated markdown exports:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"303\"/>\n        <source>Export Merged HTML</source>\n        <oldsource>Export Html</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchbrowser.cpp\" line=\"378\"/>\n        <source>Export Merged PDF</source>\n        <oldsource>Export PDF</oldsource>\n        <translation type=\"unfinished\">匯出PDF文檔</translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownBatchWidget</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"20\"/>\n        <source>Markdown Source Files</source>\n        <oldsource>Markdown Files</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"38\"/>\n        <source>Import Folder...</source>\n        <oldsource>Import Folder</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"45\"/>\n        <source>Add Files...</source>\n        <oldsource>Add Files</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"52\"/>\n        <source>Move Up</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"59\"/>\n        <source>Move Down</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"66\"/>\n        <source>Remove</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"73\"/>\n        <source>Remove All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"98\"/>\n        <source>Options</source>\n        <translation type=\"unfinished\">選項</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"106\"/>\n        <source>Export Folder:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"116\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation type=\"unfinished\">瀏覽</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"127\"/>\n        <source>Use CSS</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"137\"/>\n        <source>Insert horizontal line between merged files</source>\n        <oldsource>Merge files insert split &lt;hr&gt;</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"144\"/>\n        <source>Insert page break between merged files</source>\n        <oldsource>Merge files insert page break</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"169\"/>\n        <source>Export</source>\n        <oldsource>Export Util</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"175\"/>\n        <source>Export Separated HTML</source>\n        <oldsource>Separate Html</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"182\"/>\n        <source>Export Separated PDF</source>\n        <oldsource>Separate PDF</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"189\"/>\n        <source>Export Merged HTML...</source>\n        <oldsource>Merge Html</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"196\"/>\n        <source>Export Merged PDF...</source>\n        <oldsource>Merge PDF</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"203\"/>\n        <source>Print Preview Merged...</source>\n        <oldsource>Merge Print Preview</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"210\"/>\n        <source>Print Merged</source>\n        <oldsource>Merge Print</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownbatchwidget.ui\" line=\"233\"/>\n        <source>Log</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>MarkdownEdit</name>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"83\"/>\n        <source>Header (h1)</source>\n        <oldsource>Header &lt;h1&gt;</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"86\"/>\n        <source>Header (h2)</source>\n        <oldsource>Header &lt;h2&gt;</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"89\"/>\n        <source>Header (h3)</source>\n        <oldsource>Header &lt;h3&gt;</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"92\"/>\n        <source>Header (h4)</source>\n        <oldsource>Header &lt;h4&gt;</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"95\"/>\n        <source>Header (h5)</source>\n        <oldsource>Header &lt;h5&gt;</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"98\"/>\n        <source>Header (h6)</source>\n        <oldsource>Header &lt;h6&gt;</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"101\"/>\n        <source>Bold</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"104\"/>\n        <source>Italic</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"107\"/>\n        <source>Inline Code</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"110\"/>\n        <source>Link</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"113\"/>\n        <source>Image</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"116\"/>\n        <source>Unordered List</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"119\"/>\n        <source>Ordered List</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"122\"/>\n        <source>Blockquote</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"125\"/>\n        <source>Horizontal Rule</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"131\"/>\n        <location filename=\"src/plugins/markdown/markdownedit.cpp\" line=\"154\"/>\n        <source>Heading</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>MultiFolderView</name>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"299\"/>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"306\"/>\n        <source>Delete Folder</source>\n        <translation type=\"unfinished\">刪除目錄</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"300\"/>\n        <source>Are you sure that you want to permanently delete this folder and all of its contents?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"307\"/>\n        <source>Failed to delete the folder!</source>\n        <translation type=\"unfinished\">刪除目錄失敗!</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"320\"/>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"327\"/>\n        <source>Delete File</source>\n        <translation type=\"unfinished\">刪除文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"321\"/>\n        <source>Are you sure that you want to permanently delete this file?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/multifolderview.cpp\" line=\"328\"/>\n        <source>Failed to delete the file!</source>\n        <translation type=\"unfinished\">刪除文件失敗!</translation>\n    </message>\n</context>\n<context>\n    <name>NavigateBar</name>\n    <message>\n        <location filename=\"src/utils/navigate/navigate.cpp\" line=\"146\"/>\n        <location filename=\"src/utils/navigate/navigate.cpp\" line=\"169\"/>\n        <source>Browser Files in %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>NewFileDialog</name>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"14\"/>\n        <source>New Project or File</source>\n        <translation>建立新專案或文件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"124\"/>\n        <source>Browse...</source>\n        <translation type=\"unfinished\">瀏覽</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"24\"/>\n        <source>GOPATH:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"38\"/>\n        <source>Template:</source>\n        <oldsource>Template</oldsource>\n        <translation type=\"unfinished\">類別</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"54\"/>\n        <source>Type</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"73\"/>\n        <source>Information</source>\n        <translation>資訊</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"87\"/>\n        <source>Name:</source>\n        <translation>名稱:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.ui\" line=\"114\"/>\n        <source>Location:</source>\n        <translation>位置:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"127\"/>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"185\"/>\n        <source>Error</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"127\"/>\n        <source>Could not create the target directory: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"132\"/>\n        <source>Warning</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"132\"/>\n        <source>Location %1 is not empty.\nUse the target directory anyway?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"169\"/>\n        <source>Overwrite File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"169\"/>\n        <source>%1 already exists.\nDo you want to replace it?</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"185\"/>\n        <source>No files could be created.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"280\"/>\n        <source>File template details:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"282\"/>\n        <source>Project template details:</source>\n        <oldsource>New project wizard:</oldsource>\n        <translation type=\"unfinished\">新項目精靈:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/newfiledialog.cpp\" line=\"362\"/>\n        <source>Choose a directory for the new content:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>OpenEditorsWidget</name>\n    <message>\n        <location filename=\"src/liteapp/openeditorswidget.cpp\" line=\"43\"/>\n        <source>Open Documents</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>OptionsBrowser</name>\n    <message>\n        <location filename=\"src/liteapp/optionsbrowser.cpp\" line=\"57\"/>\n        <source>Options</source>\n        <oldsource>Options Page</oldsource>\n        <translation>選項</translation>\n    </message>\n</context>\n<context>\n    <name>OptionsWidget</name>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"14\"/>\n        <source>Options</source>\n        <translation type=\"unfinished\">選項</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"56\"/>\n        <source>Info</source>\n        <translation>資訊</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/optionswidget.ui\" line=\"106\"/>\n        <source>[*] item request restart of LiteIDE</source>\n        <oldsource>[*] item requeset restart LiteIDE</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>OutputDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"444\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"472\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"473\"/>\n        <source>Move To</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"446\"/>\n        <source>LeftSideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"447\"/>\n        <source>RightSideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"480\"/>\n        <source>BottomDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>OutputOption</name>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"20\"/>\n        <source>Font</source>\n        <translation type=\"unfinished\">字型</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"26\"/>\n        <source>Family:</source>\n        <translation type=\"unfinished\">字型:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"43\"/>\n        <source>Size:</source>\n        <translation type=\"unfinished\">大小:</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"60\"/>\n        <source>Zoom:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"67\"/>\n        <source>%</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"86\"/>\n        <source>Antialias</source>\n        <translation type=\"unfinished\">反鋸齒</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"109\"/>\n        <source>Display</source>\n        <translation type=\"unfinished\">顯示</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"115\"/>\n        <source>Use editor color scheme</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/outputoption.ui\" line=\"124\"/>\n        <source>Sets the maximum number of lines</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>PackageBrowser</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"87\"/>\n        <source>Manage GOPATH/Modules ...</source>\n        <oldsource>Manage GOPATH...</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"86\"/>\n        <source>Reload All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"93\"/>\n        <source>Use godoc View</source>\n        <translation type=\"unfinished\">查看GODOC</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"94\"/>\n        <source>Load Package in New Window</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"95\"/>\n        <source>Add Package to Folders</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"96\"/>\n        <source>Open Source File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"97\"/>\n        <source>Copy Name to Clipboard</source>\n        <oldsource>Copy Name To Clipboard</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"119\"/>\n        <source>Go Package Browser</source>\n        <oldsource>Package Browser</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packagebrowser.cpp\" line=\"208\"/>\n        <source>Loading Go package list...</source>\n        <oldsource>Loading go package ...</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>PackageProject</name>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"76\"/>\n        <source>Reload Package</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"77\"/>\n        <source>Open Explorer Here</source>\n        <translation type=\"unfinished\">開啟目錄瀏覽</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"78\"/>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"299\"/>\n        <source>Add Source File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"299\"/>\n        <source>File Name:</source>\n        <translation type=\"unfinished\">文件名稱:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"310\"/>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"315\"/>\n        <source>Error</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"310\"/>\n        <source>File %1 already exists.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangpackage/packageproject.cpp\" line=\"315\"/>\n        <source>Could not open %1 for writing.</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>PluginsDialog</name>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.ui\" line=\"14\"/>\n        <source>Installed Plugins</source>\n        <oldsource>Install Plugins</oldsource>\n        <translation type=\"unfinished\">已安裝插件</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.ui\" line=\"45\"/>\n        <source>Close</source>\n        <translation>關閉</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"51\"/>\n        <source>Name</source>\n        <translation>名稱</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"54\"/>\n        <source>Author</source>\n        <oldsource>Anchor</oldsource>\n        <translation type=\"unfinished\">作者</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"52\"/>\n        <source>Enabled</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"53\"/>\n        <source>Details</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"55\"/>\n        <source>Version</source>\n        <oldsource>Last Ver</oldsource>\n        <translation type=\"unfinished\">版本</translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/pluginsdialog.cpp\" line=\"56\"/>\n        <source>File Name</source>\n        <oldsource>FileName</oldsource>\n        <translation type=\"unfinished\">文件名稱</translation>\n    </message>\n</context>\n<context>\n    <name>ProcessEx</name>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"52\"/>\n        <source>process exited with code %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"55\"/>\n        <source>process crashed or was terminated</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"58\"/>\n        <source>process exited with an unknown status</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"68\"/>\n        <source>process failed to start</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"71\"/>\n        <source>process crashed or was terminated while running</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"74\"/>\n        <source>timed out waiting for process</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"77\"/>\n        <source>couldn&apos;t read from the process</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"80\"/>\n        <source>couldn&apos;t write to the process</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/processex/processex.cpp\" line=\"84\"/>\n        <source>an unknown error occurred</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>ProjectManager</name>\n    <message>\n        <location filename=\"src/liteapp/projectmanager.cpp\" line=\"95\"/>\n        <source>Project &lt;%1&gt;</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/projectmanager.cpp\" line=\"119\"/>\n        <source>Import Directory &lt;%1&gt;</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QFileSystemModel</name>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"46\"/>\n        <source>%1 TB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"48\"/>\n        <source>%1 GB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"50\"/>\n        <source>%1 MB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"52\"/>\n        <source>%1 KB</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/folderview/filesystemmodelex.cpp\" line=\"53\"/>\n        <source>%1 bytes</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QJson::ParserRunnable</name>\n    <message>\n        <location filename=\"src/3rdparty/qjson/src/parserrunnable.cpp\" line=\"64\"/>\n        <source>An error occurred while parsing json: %1</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QJsonParseError</name>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"59\"/>\n        <source>no error occurred</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"60\"/>\n        <source>unterminated object</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"61\"/>\n        <source>missing name separator</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"62\"/>\n        <source>unterminated array</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"63\"/>\n        <source>missing value separator</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"64\"/>\n        <source>illegal value</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"65\"/>\n        <source>invalid termination by number</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"66\"/>\n        <source>illegal number</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"67\"/>\n        <source>invalid escape sequence</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"68\"/>\n        <source>invalid UTF8 string</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"69\"/>\n        <source>unterminated string</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"70\"/>\n        <source>object is missing after a comma</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"71\"/>\n        <source>too deeply nested document</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"72\"/>\n        <source>too large document</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp\" line=\"73\"/>\n        <source>garbage at the end of the document</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenAction</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenaction.cpp\" line=\"59\"/>\n        <source>Show and Run Commands</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenEditor</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopeneditor.cpp\" line=\"56\"/>\n        <source>Show All Opened Editors</source>\n        <oldsource>Show All Editors</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFileSystem</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfilesystem.cpp\" line=\"156\"/>\n        <source>File System</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFiles</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfiles.cpp\" line=\"72\"/>\n        <source>Go to File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfiles.cpp\" line=\"77\"/>\n        <source>Type &apos;?&apos; to get help on the actions you can take from here</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenFolder</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenfolder.cpp\" line=\"71\"/>\n        <source>Browser Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenHelp</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenhelp.cpp\" line=\"49\"/>\n        <source>Show All Quick Open Actions</source>\n        <oldsource>Show Quick Open Help</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenLines</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"51\"/>\n        <source>Go to Line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"79\"/>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"84\"/>\n        <source>Open a text file first to go to a line</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"97\"/>\n        <source>Type a line number between %1 and %2 to navigate to</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenlines.cpp\" line=\"100\"/>\n        <source>Go to Line %1</source>\n        <oldsource>Go to line %1</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenManager</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"82\"/>\n        <source>Quick Open File</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"83\"/>\n        <source>Quick Open Editor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"84\"/>\n        <source>Quick Open Symbol</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"85\"/>\n        <source>Quick Open Command</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmanager.cpp\" line=\"86\"/>\n        <source>Show All Quick Open Actions</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenMimeType</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmimetype.cpp\" line=\"41\"/>\n        <source>Go to Symbol in File</source>\n        <oldsource>Open Symbol by Name</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenmimetype.cpp\" line=\"42\"/>\n        <source>not found symbol</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>QuickOpenOption</name>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"14\"/>\n        <source>Form</source>\n        <translation type=\"unfinished\">表單</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"20\"/>\n        <source>QuickOpenFiles</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"26\"/>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"79\"/>\n        <source>Match case sensitive</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"35\"/>\n        <source>Max files count:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/quickopen/quickopenoption.ui\" line=\"73\"/>\n        <source>QuickOpenEditor</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>RecentManager</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.cpp\" line=\"54\"/>\n        <source>Clear All History</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.cpp\" line=\"169\"/>\n        <source>Clear Menu</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SearchEdit</name>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"83\"/>\n        <source>Search</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/golangdoc/finddocwidget.cpp\" line=\"84\"/>\n        <source>Stop Search</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SelectExternalDialog</name>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"14\"/>\n        <source>Debug External Application</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"22\"/>\n        <source>Application:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"29\"/>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"56\"/>\n        <source>Browse...</source>\n        <oldsource>Browser</oldsource>\n        <translation type=\"unfinished\">瀏覽</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"36\"/>\n        <source>Arguments:</source>\n        <translation type=\"unfinished\">參數:</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.ui\" line=\"46\"/>\n        <source>Working directory:</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.cpp\" line=\"82\"/>\n        <source>Select Executable</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/litedebug/selectexternaldialog.cpp\" line=\"92\"/>\n        <source>Select the working directory:</source>\n        <oldsource>Select Working Directory</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SessionRecent</name>\n    <message>\n        <location filename=\"src/liteapp/recentmanager.h\" line=\"197\"/>\n        <source>Sessions</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SideDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"50\"/>\n        <source>Move To</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"54\"/>\n        <source>RightSideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"56\"/>\n        <source>LeftDockWidgt</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"58\"/>\n        <source>LeftSideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"60\"/>\n        <source>RightDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"63\"/>\n        <source>OutputBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"75\"/>\n        <source>SideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"76\"/>\n        <source>Show SideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SideWindowStyle</name>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"547\"/>\n        <source>Hide SideBar</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"585\"/>\n        <source>SideBar Windows</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/sidewindowstyle.cpp\" line=\"586\"/>\n        <source>Output Windows</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SplitDockWidget</name>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"300\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"379\"/>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"380\"/>\n        <source>Move To</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"302\"/>\n        <source>Top</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"306\"/>\n        <source>Top (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"343\"/>\n        <source>TopDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"343\"/>\n        <source>TopDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"312\"/>\n        <source>Bottom</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"316\"/>\n        <source>Bottom (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"345\"/>\n        <source>BottomDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"345\"/>\n        <source>BottomDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"322\"/>\n        <source>Left</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"326\"/>\n        <source>Left (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"347\"/>\n        <source>LeftDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"347\"/>\n        <source>LeftDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"332\"/>\n        <source>Right</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"336\"/>\n        <source>Right (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"349\"/>\n        <source>RightDockWidget (Split)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"349\"/>\n        <source>RightDockWidget</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"355\"/>\n        <source>Unsplit</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/tooldockwidget.cpp\" line=\"360\"/>\n        <source>Split</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>SplitWindowStyle</name>\n    <message>\n        <location filename=\"src/liteapp/splitwindowstyle.cpp\" line=\"244\"/>\n        <source>Hide Sidebars</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/liteapp/splitwindowstyle.cpp\" line=\"278\"/>\n        <source>Tool Windows</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>Terminal</name>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"132\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"189\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"773\"/>\n        <source>New</source>\n        <translation type=\"unfinished\">新建</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"133\"/>\n        <source>Open a new terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"135\"/>\n        <source>Close</source>\n        <translation type=\"unfinished\">關閉</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"136\"/>\n        <source>Close current terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"138\"/>\n        <source>CloseAll</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"139\"/>\n        <source>Close all terminal</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"142\"/>\n        <source>LoadEnv</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"143\"/>\n        <source>Current terminal load environment from LiteIDE</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"148\"/>\n        <source>Filter</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"184\"/>\n        <source>Dark Mode</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"195\"/>\n        <source>Login Mode (shell --login)</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"237\"/>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"741\"/>\n        <source>Terminal</source>\n        <translation type=\"unfinished\">終端機</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/terminal/terminal.cpp\" line=\"741\"/>\n        <source>Rename Tab Title</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>TerminalEdit</name>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"67\"/>\n        <source>Cut</source>\n        <translation type=\"unfinished\">剪下</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"71\"/>\n        <source>Copy</source>\n        <translation>複製</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"75\"/>\n        <source>Paste</source>\n        <translation>貼上</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"79\"/>\n        <source>Select All</source>\n        <translation>全部選擇</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/textoutput/terminaledit.cpp\" line=\"83\"/>\n        <source>Clear All</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>TextEditor::Internal::ColorScheme</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_texteditor/colorscheme.cpp\" line=\"212\"/>\n        <source>Not a color scheme file.</source>\n        <translation>不是正確的顏色配置文件.</translation>\n    </message>\n</context>\n<context>\n    <name>Utils::FilterLineEdit</name>\n    <message>\n        <location filename=\"src/3rdparty/qtc_editutil/filterlineedit.cpp\" line=\"51\"/>\n        <source>Filter</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/3rdparty/qtc_editutil/filterlineedit.cpp\" line=\"52\"/>\n        <source>Clear text</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>VTermWidget</name>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"50\"/>\n        <source>Copy</source>\n        <translation type=\"unfinished\">複製</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"54\"/>\n        <source>Paste</source>\n        <translation type=\"unfinished\">貼上</translation>\n    </message>\n    <message>\n        <location filename=\"src/utils/vterm/vtermwidget.cpp\" line=\"58\"/>\n        <source>Select All</source>\n        <translation type=\"unfinished\">全部選擇</translation>\n    </message>\n</context>\n<context>\n    <name>WebKitBrowser</name>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"69\"/>\n        <source>Navigation</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"72\"/>\n        <source>Open Html File</source>\n        <oldsource>Open Html</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"119\"/>\n        <source>WebKitBrowser</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"169\"/>\n        <source>False load %1 !</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkitbrowser.cpp\" line=\"256\"/>\n        <source>Open Html or Markdown File</source>\n        <oldsource>Open Html or Markdown Files</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>WebKitHtmlWidgetPlugin</name>\n    <message>\n        <location filename=\"src/plugins/webkithtmlwidget/webkithtmlwidgetplugin.cpp\" line=\"74\"/>\n        <source>Open Html or Markdown File</source>\n        <oldsource>Open Html or Markdown Files</oldsource>\n        <translation type=\"unfinished\"></translation>\n    </message>\n</context>\n<context>\n    <name>WelcomeBrowser</name>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"65\"/>\n        <source>New</source>\n        <translation type=\"unfinished\">新建</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"66\"/>\n        <source>Open</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"67\"/>\n        <source>Open Folder</source>\n        <translation type=\"unfinished\"></translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"68\"/>\n        <source>Options</source>\n        <translation type=\"unfinished\">選項</translation>\n    </message>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomebrowser.cpp\" line=\"207\"/>\n        <source>Welcome</source>\n        <oldsource>Welcome Page</oldsource>\n        <translation>起始頁</translation>\n    </message>\n</context>\n<context>\n    <name>WelcomePlugin</name>\n    <message>\n        <location filename=\"src/plugins/welcome/welcomeplugin.cpp\" line=\"77\"/>\n        <source>Welcome</source>\n        <oldsource>Home</oldsource>\n        <translation type=\"unfinished\">主頁</translation>\n    </message>\n</context>\n</TS>\n"
  },
  {
    "path": "liteidex/liteidex.pri",
    "content": "!isEmpty(LITEIDE_PRI_INCLUDED):error(\"liteidex.pri already included\")\nLITEIDE_PRI_INCLUDED = 1\n\ndefineReplace(qtLibraryName) {\n   unset(LIBRARY_NAME)\n   LIBRARY_NAME = $$1\n   CONFIG(debug, debug|release) {\n      !debug_and_release|build_pass {\n          mac:RET = $$member(LIBRARY_NAME, 0)_debug\n              else:win32:RET = $$member(LIBRARY_NAME, 0)d\n      }\n   }\n   isEmpty(RET):RET = $$LIBRARY_NAME\n   return($$RET)\n}\n\nisEmpty(IDE_LIBRARY_BASENAME) {\n    IDE_LIBRARY_BASENAME = lib\n}\n\ngreaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport\n\nDEFINES += LITEAPP_LIBRARY\n\nDEFINES += IDE_LIBRARY_BASENAME=\\\\\\\"$$IDE_LIBRARY_BASENAME\\\\\\\"\n\nisEmpty(PREFIX) {\n    PREFIX = /usr/local\n}\nBINPREFIX = $$PREFIX/bin\nLIBPREFIX = $$PREFIX/lib/liteide\nPLUGINPREFIX = $$PREFIX/lib/liteide/plugins\n\nIDE_APP_TARGET   = liteide\nIDE_SOURCE_TREE = $$PWD\nIDE_BUILD_TREE = $$IDE_SOURCE_TREE/liteide\n\nIDE_APP_PATH = $$IDE_BUILD_TREE/bin\n\nmacx {\n    IDE_APP_TARGET   = \"LiteIDE\"\n    IDE_LIBRARY_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/PlugIns\n    IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH\n    IDE_DATA_PATH   = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources\n    IDE_BIN_PATH     = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/MacOS\n    contains(QT_CONFIG, ppc):CONFIG += ppc x86\n    copydata = 1\n} else {\n    win32 {\n        contains(TEMPLATE, vc.*)|contains(TEMPLATE_PREFIX, vc):vcproj = 1\n        IDE_APP_TARGET   = liteide\n    } else {\n        IDE_APP_TARGET   = liteide\n    }\n    IDE_BIN_PATH = $$IDE_BUILD_TREE/bin\n    IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/liteide\n    IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH/plugins\n    IDE_DATA_PATH = $$IDE_BUILD_TREE/share/liteide\n    !isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1\n}\n\n#LIBS += -L$$IDE_LIBRARY_PATH\n\n#DEFINES += QT_NO_CAST_FROM_ASCII\nDEFINES += QT_NO_CAST_TO_ASCII\n!macx:DEFINES += QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION\n\nunix {\n    CONFIG(debug, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared\n    CONFIG(release, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared\n\n    CONFIG(debug, debug|release):MOC_DIR = $${OUT_PWD}/.moc/debug-shared\n    CONFIG(release, debug|release):MOC_DIR = $${OUT_PWD}/.moc/release-shared\n\n    RCC_DIR = $${OUT_PWD}/.rcc\n    UI_DIR = $${OUT_PWD}/.uic\n}\n\nlinux-g++-* {\n    # Bail out on non-selfcontained libraries. Just a security measure\n    # to prevent checking in code that does not compile on other platforms.\n    QMAKE_LFLAGS += -Wl,--allow-shlib-undefined -Wl,--no-undefined\n}\n\nwin32-msvc* {\n    #Don't warn about sprintf, fopen etc being 'unsafe'\n    DEFINES += _CRT_SECURE_NO_WARNINGS\n}\n\nlinux* {\n    contains(CONFIG, liteide_qtwebkit) {\n        DEFINES += LITEIDE_QTWEBKIT\n    }\n} else {\n    greaterThan(QT_MAJOR_VERSION, 4) {\n    } else {\n        DEFINES += LITEIDE_QTWEBKIT\n    }\n}\n"
  },
  {
    "path": "liteidex/liteidex.pro",
    "content": "include (liteidex.pri)\n\nTEMPLATE  = subdirs\nCONFIG   += ordered\n\nSUBDIRS = src\n\nTRANSLATIONS = \\\n    liteide_zh.ts   \\\n    liteide_zh_tw.ts \\\n    liteide_ru.ts   \\\n    liteide_ja.ts   \\\n    liteide_fr.ts   \\\n    liteide_de.ts   \\\n    liteide_uk.ts\n#    liteide_tr.ts\n"
  },
  {
    "path": "liteidex/macosx_deploy.sh",
    "content": "#!/bin/sh\n\ncp -v ../README.md liteide/bin\ncp -v LICENSE.LGPL liteide/bin\ncp -v LGPL_EXCEPTION.TXT liteide/bin\n\ncp -r -v deploy/* liteide/bin/LiteIDE.app/Contents/Resources\ncp -r -v os_deploy/macosx/* liteide/bin/LiteIDE.app/Contents/Resources\ncp -R -v src/liteide/Info.plist liteide/bin/LiteIDE.app/Contents\n\ncp -v bin/gotools liteide/bin/LiteIDE.app/Contents/MacOS\ncp -v bin/gocode liteide/bin/LiteIDE.app/Contents/MacOS\ncp -v bin/gomodifytags liteide/bin/LiteIDE.app/Contents/MacOS\n"
  },
  {
    "path": "liteidex/make_tools.cmd",
    "content": "@echo off\r\n\r\nset GOBIN=%CD%\\bin\r\n\r\necho install gocode ...\r\ngo install -v github.com/visualfc/gocode@latest\r\necho install gotools ...\r\ngo install -v github.com/visualfc/gotools@latest\r\necho install gomodifytags ...\r\ngo install -v github.com/fatih/gomodifytags@latest\r\n"
  },
  {
    "path": "liteidex/make_tools.sh",
    "content": "#!/bin/sh\n\nexport GOBIN=$PWD/bin\n\necho install gocode ...\ngo install -v github.com/visualfc/gocode@latest\necho install gotools ...\ngo install -v github.com/visualfc/gotools@latest\necho install gomodifytags ...\ngo install -v github.com/fatih/gomodifytags@latest\n"
  },
  {
    "path": "liteidex/os_deploy/freebsd/liteenv/cross-arm5.env",
    "content": "# cross-compiler linux arm5\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=arm\nGOARM=5\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/freebsd/liteenv/cross-arm6.env",
    "content": "# cross-compiler linux arm6\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=arm\nGOARM=6\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/freebsd/liteenv/cross-darwin32.env",
    "content": "# native compiler darwin 386\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=386\nGOOS=darwin\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/freebsd/liteenv/cross-darwin64.env",
    "content": "# native compiler darwin amd64\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=amd64\nGOOS=darwin\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/freebsd/liteenv/cross-linux32.env",
    "content": "# cross-compiler linux 386\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=386\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/freebsd/liteenv/cross-linux64.env",
    "content": "# cross-compiler linux amd64\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=amd64\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/freebsd/liteenv/cross-win32.env",
    "content": "# cross-compiler windows 386\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=386\nGOOS=windows\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/freebsd/liteenv/cross-win64.env",
    "content": "# cross-compiler windows amd64\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=amd64\nGOOS=windows\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/freebsd/liteenv/freebsd32.env",
    "content": "# native compiler darwin 386\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=386\nGOOS=freebsd\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/freebsd/liteenv/freebsd64.env",
    "content": "# native compiler darwin amd64\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=amd64\nGOOS=freebsd\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/freebsd/liteenv/system.env",
    "content": "# native compiler darwin amd64\n\n#GOROOT=/usr/local/go\n#GOBIN=\n#GOARCH=amd64\n#GOOS=freebsd\n#CGO_ENABLED=1\n\n#PATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/linux/liteenv/cross-arm5.env",
    "content": "# cross-compiler linux arm5\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=arm\nGOARM=5\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/gnome-terminal\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=/usr/bin/xterm\nLITEIDE_EXECOPT=-e\n\nLITEIDE_SHELL=x-terminal-emulator;gnome-terminal;lxterminal;konsole;xfce4-terminal;xterm\n"
  },
  {
    "path": "liteidex/os_deploy/linux/liteenv/cross-arm6.env",
    "content": "# cross-compiler linux arm6\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=arm\nGOARM=6\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/gnome-terminal\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=/usr/bin/xterm\nLITEIDE_EXECOPT=-e\n\nLITEIDE_SHELL=x-terminal-emulator;gnome-terminal;lxterminal;konsole;xfce4-terminal;xterm\n"
  },
  {
    "path": "liteidex/os_deploy/linux/liteenv/cross-darwin32.env",
    "content": "# cross-compiler darwin 386\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=386\nGOOS=darwin\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/gnome-terminal\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=/usr/bin/xterm\nLITEIDE_EXECOPT=-e\n\nLITEIDE_SHELL=x-terminal-emulator;gnome-terminal;lxterminal;konsole;xfce4-terminal;xterm\n"
  },
  {
    "path": "liteidex/os_deploy/linux/liteenv/cross-darwin64.env",
    "content": "# cross-compiler darwin amd64\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=amd64\nGOOS=darwin\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/gnome-terminal\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=/usr/bin/xterm\nLITEIDE_EXECOPT=-e\n\nLITEIDE_SHELL=x-terminal-emulator;gnome-terminal;lxterminal;konsole;xfce4-terminal;xterm\n"
  },
  {
    "path": "liteidex/os_deploy/linux/liteenv/cross-freebsd32.env",
    "content": "# native compiler darwin 386\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=386\nGOOS=freebsd\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/gnome-terminal\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=/usr/bin/xterm\nLITEIDE_EXECOPT=-e\n\nLITEIDE_SHELL=x-terminal-emulator;gnome-terminal;lxterminal;konsole;xfce4-terminal;xterm\n"
  },
  {
    "path": "liteidex/os_deploy/linux/liteenv/cross-freebsd64.env",
    "content": "# native compiler darwin amd64\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=amd64\nGOOS=freebsd\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/gnome-terminal\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=/usr/bin/xterm\nLITEIDE_EXECOPT=-e\n\nLITEIDE_SHELL=x-terminal-emulator;gnome-terminal;lxterminal;konsole;xfce4-terminal;xterm\n"
  },
  {
    "path": "liteidex/os_deploy/linux/liteenv/cross-win32.env",
    "content": "# cross-compiler windows 386\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=386\nGOOS=windows\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/gnome-terminal\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=/usr/bin/xterm\nLITEIDE_EXECOPT=-e\n\nLITEIDE_SHELL=x-terminal-emulator;gnome-terminal;lxterminal;konsole;xfce4-terminal;xterm\n"
  },
  {
    "path": "liteidex/os_deploy/linux/liteenv/cross-win64.env",
    "content": "# cross-compiler windows amd64\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=amd64\nGOOS=windows\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/gnome-terminal\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=/usr/bin/xterm\nLITEIDE_EXECOPT=-e\n\nLITEIDE_SHELL=x-terminal-emulator;gnome-terminal;lxterminal;konsole;xfce4-terminal;xterm\n"
  },
  {
    "path": "liteidex/os_deploy/linux/liteenv/linux32-local.env",
    "content": "# native compiler linux 386\n\nGOROOT=/usr/local/go\n#GOBIN=\nGOARCH=386\nGOOS=linux\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/gnome-terminal\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=/usr/bin/xterm\nLITEIDE_EXECOPT=-e\n\nLITEIDE_SHELL=x-terminal-emulator;gnome-terminal;lxterminal;konsole;xfce4-terminal;xterm\n"
  },
  {
    "path": "liteidex/os_deploy/linux/liteenv/linux32.env",
    "content": "# native compiler linux 386\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=386\nGOOS=linux\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/gnome-terminal\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=/usr/bin/xterm\nLITEIDE_EXECOPT=-e\n\nLITEIDE_SHELL=x-terminal-emulator;gnome-terminal;lxterminal;konsole;xfce4-terminal;xterm\n"
  },
  {
    "path": "liteidex/os_deploy/linux/liteenv/linux64-local.env",
    "content": "# native compiler linux amd64\n\nGOROOT=/usr/local/go\n#GOBIN=\nGOARCH=amd64\nGOOS=linux\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/gnome-terminal\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=/usr/bin/xterm\nLITEIDE_EXECOPT=-e\n\nLITEIDE_SHELL=x-terminal-emulator;gnome-terminal;lxterminal;konsole;xfce4-terminal;xterm\n"
  },
  {
    "path": "liteidex/os_deploy/linux/liteenv/linux64.env",
    "content": "# native compiler linux amd64\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=amd64\nGOOS=linux\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/gnome-terminal\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=/usr/bin/xterm\nLITEIDE_EXECOPT=-e\n\nLITEIDE_SHELL=x-terminal-emulator;gnome-terminal;lxterminal;konsole;xfce4-terminal;xterm\n"
  },
  {
    "path": "liteidex/os_deploy/linux/liteenv/system.env",
    "content": "# native compiler linux 386\n\n#GOROOT=$HOME/go\n#GOBIN=\n#GOARCH=386\n#GOOS=linux\n#CGO_ENABLED=1\n\n#PATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/gnome-terminal\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=/usr/bin/xterm\nLITEIDE_EXECOPT=-e\n\nLITEIDE_SHELL=x-terminal-emulator;gnome-terminal;lxterminal;konsole;xfce4-terminal;xterm\n\n"
  },
  {
    "path": "liteidex/os_deploy/linux/qt.conf",
    "content": "[Paths]\nPlugins = ../lib/liteide/plugins\n"
  },
  {
    "path": "liteidex/os_deploy/macosx/liteenv/cross-arm5.env",
    "content": "# cross-compiler linux arm5\n\n#GOROOT=/usr/local/go\n#GOBIN=\nGOARCH=arm\nGOARM=5\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH:/usr/local/bin\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/macosx/liteenv/cross-arm6.env",
    "content": "# cross-compiler linux arm6\n\n#GOROOT=/usr/local/go\n#GOBIN=\nGOARCH=arm\nGOARM=6\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH:/usr/local/bin\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/macosx/liteenv/cross-freebsd32.env",
    "content": "# native compiler darwin 386\n\n#GOROOT=/usr/local/go\n#GOBIN=\nGOARCH=386\nGOOS=freebsd\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH:/usr/local/bin\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/macosx/liteenv/cross-freebsd64.env",
    "content": "# native compiler darwin amd64\n\n#GOROOT=/usr/local/go\n#GOBIN=\nGOARCH=amd64\nGOOS=freebsd\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH:/usr/local/bin\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/macosx/liteenv/cross-linux32.env",
    "content": "# cross-compiler linux 386\n\n#GOROOT=/usr/local/go\n#GOBIN=\nGOARCH=386\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH:/usr/local/bin\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/macosx/liteenv/cross-linux64.env",
    "content": "# cross-compiler linux amd64\n\n#GOROOT=/usr/local/go\n#GOBIN=\nGOARCH=amd64\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH:/usr/local/bin\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/macosx/liteenv/cross-win32.env",
    "content": "# cross-compiler windows 386\n\n#GOROOT=/usr/local/go\n#GOBIN=\nGOARCH=386\nGOOS=windows\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH:/usr/local/bin\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/macosx/liteenv/cross-win64.env",
    "content": "# cross-compiler windows amd64\n\n#GOROOT=/usr/local/go\n#GOBIN=\nGOARCH=amd64\nGOOS=windows\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH:/usr/local/bin\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/macosx/liteenv/darwin32-home.env",
    "content": "# native compiler darwin 386\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=386\nGOOS=darwin\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH:/usr/local/bin\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/macosx/liteenv/darwin32-local.env",
    "content": "# native compiler darwin 386\n\nGOROOT=/usr/local/go\n#GOBIN=\nGOARCH=386\nGOOS=darwin\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH:/usr/local/bin\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/macosx/liteenv/darwin64-home.env",
    "content": "# native compiler darwin amd64\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=amd64\nGOOS=darwin\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH:/usr/local/bin\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/macosx/liteenv/darwin64-local.env",
    "content": "# native compiler darwin amd64\n\nGOROOT=/usr/local/go\n#GOBIN=\nGOARCH=amd64\nGOOS=darwin\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH:/usr/local/bin\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/macosx/liteenv/system.env",
    "content": "# native compiler darwin amd64\n\n#GOROOT=/usr/local/go\n#GOBIN=\n#GOARCH=amd64\n#GOOS=darwin\n#CGO_ENABLED=1\n\n#PATH=$GOROOT/bin:$PATH:/usr/local/bin\nPATH=$PATH:/usr/local/bin\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/openbsd/liteenv/cross-arm5.env",
    "content": "# cross-compiler linux arm5\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=arm\nGOARM=5\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/openbsd/liteenv/cross-arm6.env",
    "content": "# cross-compiler linux arm6\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=arm\nGOARM=6\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/openbsd/liteenv/cross-darwin32.env",
    "content": "# native compiler darwin 386\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=386\nGOOS=darwin\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/openbsd/liteenv/cross-darwin64.env",
    "content": "# native compiler darwin amd64\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=amd64\nGOOS=darwin\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/openbsd/liteenv/cross-freebsd32.env",
    "content": "# native compiler darwin 386\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=386\nGOOS=freebsd\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/openbsd/liteenv/cross-freebsd64.env",
    "content": "# native compiler darwin amd64\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=amd64\nGOOS=freebsd\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=/usr/local/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/openbsd/liteenv/cross-linux32.env",
    "content": "# cross-compiler linux 386\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=386\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/openbsd/liteenv/cross-linux64.env",
    "content": "# cross-compiler linux amd64\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=amd64\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/openbsd/liteenv/cross-win32.env",
    "content": "# cross-compiler windows 386\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=386\nGOOS=windows\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/openbsd/liteenv/cross-win64.env",
    "content": "# cross-compiler windows amd64\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=amd64\nGOOS=windows\nCGO_ENABLED=0\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/bin/open\nLITEIDE_TERMARGS=-a Terminal\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/openbsd/liteenv/openbsd32.env",
    "content": "# native compiler openbsd 386\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=386\nGOOS=openbsd\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=/usr/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/local/bin/open\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/openbsd/liteenv/openbsd64.env",
    "content": "# native compiler openbsd amd64\n\nGOROOT=$HOME/go\n#GOBIN=\nGOARCH=amd64\nGOOS=openbsd\nCGO_ENABLED=1\n\nPATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=/usr/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/local/bin/open\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/openbsd/liteenv/system.env",
    "content": "# native compiler openbsd amd64\n\n#GOROOT=/usr/local/go\n#GOBIN=\n#GOARCH=amd64\n#GOOS=freebsd\n#CGO_ENABLED=1\n\n#PATH=$GOROOT/bin:$PATH\n\nLITEIDE_GDB=/usr/bin/gdb\nLITEIDE_MAKE=make\nLITEIDE_TERM=/usr/local/bin/open\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=/usr/X11R6/bin/xterm\nLITEIDE_EXECOPT=-e\n"
  },
  {
    "path": "liteidex/os_deploy/windows/liteenv/cross-arm5.env",
    "content": "# cross-compiler linux arm5\n\nGOROOT=%PROGRAMFILES%\\Go\n#GOBIN=\nGOARCH=arm\nGOARM=5\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=%GOROOT%\\bin;%PATH%\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=mingw32-make\nLITEIDE_TERM=%COMSPEC%\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=%COMSPEC%\nLITEIDE_EXECOPT=/C\n"
  },
  {
    "path": "liteidex/os_deploy/windows/liteenv/cross-arm6.env",
    "content": "# cross-compiler linux arm6\n\nGOROOT=%PROGRAMFILES%\\Go\n#GOBIN=\nGOARCH=arm\nGOARM=6\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=%GOROOT%\\bin;%PATH%\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=mingw32-make\nLITEIDE_TERM=%COMSPEC%\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=%COMSPEC%\nLITEIDE_EXECOPT=/C\n"
  },
  {
    "path": "liteidex/os_deploy/windows/liteenv/cross-darwin32.env",
    "content": "# cross-compiler darwin 386\n\nGOROOT=%PROGRAMFILES%\\Go\n#GOBIN=\nGOARCH=386\nGOOS=darwin\nCGO_ENABLED=0\n\nPATH=%GOROOT%\\bin;%PATH%\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=mingw32-make\nLITEIDE_TERM=%COMSPEC%\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=%COMSPEC%\nLITEIDE_EXECOPT=/C\n"
  },
  {
    "path": "liteidex/os_deploy/windows/liteenv/cross-darwin64.env",
    "content": "# cross-compiler darwin amd64\n\nGOROOT=%PROGRAMFILES%\\Go\n#GOBIN=\nGOARCH=amd64\nGOOS=darwin\nCGO_ENABLED=0\n\nPATH=%GOROOT%\\bin;%PATH%\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=mingw32-make\nLITEIDE_TERM=%COMSPEC%\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=%COMSPEC%\nLITEIDE_EXECOPT=/C\n"
  },
  {
    "path": "liteidex/os_deploy/windows/liteenv/cross-freebsd32.env",
    "content": "# native compiler darwin 386\n\nGOROOT=%PROGRAMFILES%\\Go\n#GOBIN=\nGOARCH=386\nGOOS=freebsd\nCGO_ENABLED=0\n\nPATH=%GOROOT%\\bin;%PATH%\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=mingw32-make\nLITEIDE_TERM=%COMSPEC%\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=%COMSPEC%\nLITEIDE_EXECOPT=/C\n"
  },
  {
    "path": "liteidex/os_deploy/windows/liteenv/cross-freebsd64.env",
    "content": "# native compiler darwin amd64\n\nGOROOT=%PROGRAMFILES%\\Go\n#GOBIN=\nGOARCH=amd64\nGOOS=freebsd\nCGO_ENABLED=0\n\nPATH=%GOROOT%\\bin;%PATH%\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=mingw32-make\nLITEIDE_TERM=%COMSPEC%\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=%COMSPEC%\nLITEIDE_EXECOPT=/C\n"
  },
  {
    "path": "liteidex/os_deploy/windows/liteenv/cross-linux32.env",
    "content": "# cross-compiler linux 386\n\nGOROOT=%PROGRAMFILES%\\Go\n#GOBIN=\nGOARCH=386\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=%GOROOT%\\bin;%PATH%\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=mingw32-make\nLITEIDE_TERM=%COMSPEC%\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=%COMSPEC%\nLITEIDE_EXECOPT=/C\n"
  },
  {
    "path": "liteidex/os_deploy/windows/liteenv/cross-linux64.env",
    "content": "# cross-compiler linux amd64\n\nGOROOT=%PROGRAMFILES%\\Go\n#GOBIN=\nGOARCH=amd64\nGOOS=linux\nCGO_ENABLED=0\n\nPATH=%GOROOT%\\bin;%PATH%\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=mingw32-make\nLITEIDE_TERM=%COMSPEC%\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=%COMSPEC%\nLITEIDE_EXECOPT=/C\n"
  },
  {
    "path": "liteidex/os_deploy/windows/liteenv/system.env",
    "content": "# native compiler windows amd64\n\n#GOROOT=%PROGRAMFILES%\\Go\n#GOBIN=\n#GOARCH=amd64\n#GOOS=windows\n#CGO_ENABLED=1\n\n#PATH=c:\\mingw32\\bin;%GOROOT%\\bin;%PATH%\n\n#LITEIDE_GDB=gdb\nLITEIDE_MAKE=mingw32-make\nLITEIDE_TERM=%COMSPEC%\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=%COMSPEC%\nLITEIDE_EXECOPT=/C\n"
  },
  {
    "path": "liteidex/os_deploy/windows/liteenv/win32-user.env",
    "content": "# native compiler windows 386\n\nGOROOT=%PROGRAMFILES%\\Go\n#GOBIN=\nGOARCH=386\nGOOS=windows\nCGO_ENABLED=1\n\nPATH=c:\\mingw32\\bin;%GOROOT%\\bin;%PATH%\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=mingw32-make\nLITEIDE_TERM=%COMSPEC%\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=%COMSPEC%\nLITEIDE_EXECOPT=/C\n"
  },
  {
    "path": "liteidex/os_deploy/windows/liteenv/win32.env",
    "content": "# native compiler windows 386\n\nGOROOT=%PROGRAMFILES%\\Go\n#GOBIN=\nGOARCH=386\nGOOS=windows\nCGO_ENABLED=1\n\nPATH=c:\\mingw32\\bin;%GOROOT%\\bin;%PATH%\n\nLITEIDE_GDB=gdb\nLITEIDE_MAKE=mingw32-make\nLITEIDE_TERM=%COMSPEC%\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=%COMSPEC%\nLITEIDE_EXECOPT=/C\n"
  },
  {
    "path": "liteidex/os_deploy/windows/liteenv/win64-user.env",
    "content": "# native compiler windows amd64\n\nGOROOT=%PROGRAMFILES%\\Go\n#GOBIN=\nGOARCH=amd64\nGOOS=windows\nCGO_ENABLED=1\n\nPATH=c:\\mingw64\\bin;%GOROOT%\\bin;%PATH%\n\nLITEIDE_GDB=gdb64\nLITEIDE_MAKE=mingw32-make\nLITEIDE_TERM=%COMSPEC%\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=%COMSPEC%\nLITEIDE_EXECOPT=/C\n"
  },
  {
    "path": "liteidex/os_deploy/windows/liteenv/win64.env",
    "content": "# native compiler windows amd64\n\nGOROOT=%PROGRAMFILES%\\Go\n#GOBIN=\nGOARCH=amd64\nGOOS=windows\nCGO_ENABLED=1\n\nPATH=c:\\mingw64\\bin;%GOROOT%\\bin;%PATH%\n\nLITEIDE_GDB=gdb64\nLITEIDE_MAKE=mingw32-make\nLITEIDE_TERM=%COMSPEC%\nLITEIDE_TERMARGS=\nLITEIDE_EXEC=%COMSPEC%\nLITEIDE_EXECOPT=/C\n"
  },
  {
    "path": "liteidex/os_deploy/windows/qt.conf",
    "content": "[Paths]\n\nPlugins = plugins"
  },
  {
    "path": "liteidex/src/3rdparty/3rdparty.pro",
    "content": "include (../../liteidex.pri)\r\n\r\nTEMPLATE  = subdirs\r\nCONFIG   += ordered\r\n\r\nSUBDIRS = \\\r\n    treemodelcompleter \\\r\n    qtc_texteditor  \\\r\n    qtc_gdbmi \\\r\n    qtc_editutil \\\r\n    qtc_searchresult \\\r\n    qtc_itemview \\\r\n    qt_browser \\\r\n    qjson \\\r\n    elidedlabel \\\r\n    cplusplus \\\r\n    fakevim \\\r\n    diff_match_patch \\\r\n    qjsonrpc \\\r\n    libucd \\\r\n    cmark \\\r\n    libvterm \\\r\n    ptyqt\r\n\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/COPYING",
    "content": "Copyright (c) 2014, John MacFarlane\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n    * Redistributions of source code must retain the above copyright\n      notice, this list of conditions and the following disclaimer.\n\n    * Redistributions in binary form must reproduce the above\n      copyright notice, this list of conditions and the following\n      disclaimer in the documentation and/or other materials provided\n      with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n-----\n\nhoudini.h, houdini_href_e.c, houdini_html_e.c, houdini_html_u.c\n\nderive from https://github.com/vmg/houdini (with some modifications)\n\nCopyright (C) 2012 Vicent Martí\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n-----\n\nbuffer.h, buffer.c, chunk.h\n\nare derived from code (C) 2012 Github, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n-----\n\nutf8.c and utf8.c\n\nare derived from utf8proc\n(<http://www.public-software-group.org/utf8proc>),\n(C) 2009 Public Software Group e. V., Berlin, Germany.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\n-----\n\nThe normalization code in normalize.py was derived from the\nmarkdowntest project, Copyright 2013 Karl Dubost:\n\nThe MIT License (MIT)\n\nCopyright (c) 2013 Karl Dubost\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n-----\n\nThe CommonMark spec (test/spec.txt) is\n\nCopyright (C) 2014-15 John MacFarlane\n\nReleased under the Creative Commons CC-BY-SA 4.0 license:\n<http://creativecommons.org/licenses/by-sa/4.0/>.\n\n-----\n\nThe test software in test/ is\n\nCopyright (c) 2014, John MacFarlane\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n    * Redistributions of source code must retain the above copyright\n      notice, this list of conditions and the following disclaimer.\n\n    * Redistributions in binary form must reproduce the above\n      copyright notice, this list of conditions and the following\n      disclaimer in the documentation and/or other materials provided\n      with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/README.md",
    "content": "cmark\n=====\n\n[![Build Status]](https://travis-ci.org/commonmark/cmark)\n[![Windows Build Status]](https://ci.appveyor.com/project/jgm/cmark-0ub06)\n\n`cmark` is the C reference implementation of [CommonMark], a\nrationalized version of Markdown syntax with a [spec][the spec].\n(For the JavaScript reference implementation, see\n[commonmark.js].)\n\nIt provides a shared library (`libcmark`) with functions for parsing\nCommonMark documents to an abstract syntax tree (AST), manipulating\nthe AST, and rendering the document to HTML, groff man, LaTeX,\nCommonMark, or an XML representation of the AST.  It also provides a\ncommand-line program (`cmark`) for parsing and rendering CommonMark\ndocuments.\n\nAdvantages of this library:\n\n- **Portable.**  The library and program are written in standard\n  C99 and have no external dependencies.  They have been tested with\n  MSVC, gcc, tcc, and clang.\n\n- **Fast.** cmark can render a Markdown version of *War and Peace* in\n  the blink of an eye (127 milliseconds on a ten year old laptop,\n  vs. 100-400 milliseconds for an eye blink).  In our [benchmarks],\n  cmark is 10,000 times faster than the original `Markdown.pl`, and\n  on par with the very fastest available Markdown processors.\n\n- **Accurate.** The library passes all CommonMark conformance tests.\n\n- **Standardized.** The library can be expected to parse CommonMark\n  the same way as any other conforming parser.  So, for example,\n  you can use `commonmark.js` on the client to preview content that\n  will be rendered on the server using `cmark`.\n\n- **Robust.** The library has been extensively fuzz-tested using\n  [american fuzzy lop].  The test suite includes pathological cases\n  that bring many other Markdown parsers to a crawl (for example,\n  thousands-deep nested bracketed text or block quotes).\n\n- **Flexible.** CommonMark input is parsed to an AST which can be\n  manipulated programmatically prior to rendering.\n\n- **Multiple renderers.**  Output in HTML, groff man, LaTeX, CommonMark,\n  and a custom XML format is supported. And it is easy to write new\n  renderers to support other formats.\n\n- **Free.** BSD2-licensed.\n\nIt is easy to use `libcmark` in python, lua, ruby, and other dynamic\nlanguages: see the `wrappers/` subdirectory for some simple examples.\n\nThere are also libraries that wrap `libcmark` for\n[Go](https://github.com/rhinoman/go-commonmark),\n[Haskell](https://hackage.haskell.org/package/cmark),\n[Ruby](https://github.com/gjtorikian/commonmarker),\n[Lua](https://github.com/jgm/cmark-lua),\n[Perl](https://metacpan.org/release/CommonMark),\n[Python](https://pypi.python.org/pypi/paka.cmark),\n[R](https://cran.r-project.org/package=commonmark) and\n[Scala](https://github.com/sparsetech/cmark-scala).\n\nInstalling\n----------\n\nBuilding the C program (`cmark`) and shared library (`libcmark`)\nrequires [cmake].  If you modify `scanners.re`, then you will also\nneed [re2c] \\(>= 0.14.2\\), which is used to generate `scanners.c` from\n`scanners.re`.  We have included a pre-generated `scanners.c` in\nthe repository to reduce build dependencies.\n\nIf you have GNU make, you can simply `make`, `make test`, and `make\ninstall`.  This calls [cmake] to create a `Makefile` in the `build`\ndirectory, then uses that `Makefile` to create the executable and\nlibrary.  The binaries can be found in `build/src`.  The default\ninstallation prefix is `/usr/local`.  To change the installation\nprefix, pass the `INSTALL_PREFIX` variable if you run `make` for the\nfirst time: `make INSTALL_PREFIX=path`.\n\nFor a more portable method, you can use [cmake] manually. [cmake] knows\nhow to create build environments for many build systems.  For example,\non FreeBSD:\n\n    mkdir build\n    cd build\n    cmake ..  # optionally: -DCMAKE_INSTALL_PREFIX=path\n    make      # executable will be created as build/src/cmark\n    make test\n    make install\n\nOr, to create Xcode project files on OSX:\n\n    mkdir build\n    cd build\n    cmake -G Xcode ..\n    open cmark.xcodeproj\n\nThe GNU Makefile also provides a few other targets for developers.\nTo run a benchmark:\n\n    make bench\n\nFor more detailed benchmarks:\n\n    make newbench\n\nTo run a test for memory leaks using `valgrind`:\n\n    make leakcheck\n\nTo reformat source code using `clang-format`:\n\n    make format\n\nTo run a \"fuzz test\" against ten long randomly generated inputs:\n\n    make fuzztest\n\nTo do a more systematic fuzz test with [american fuzzy lop]:\n\n    AFL_PATH=/path/to/afl_directory make afl\n\nFuzzing with [libFuzzer] is also supported but, because libFuzzer is still\nunder active development, may not work with your system-installed version of\nclang. Assuming LLVM has been built in `$HOME/src/llvm/build` the fuzzer can be\nrun with:\n\n    CC=\"$HOME/src/llvm/build/bin/clang\" LIB_FUZZER_PATH=\"$HOME/src/llvm/lib/Fuzzer/libFuzzer.a\" make libFuzzer\n\nTo make a release tarball and zip archive:\n\n    make archive\n\nInstalling (Windows)\n--------------------\n\nTo compile with MSVC and NMAKE:\n\n    nmake\n\nYou can cross-compile a Windows binary and dll on linux if you have the\n`mingw32` compiler:\n\n    make mingw\n\nThe binaries will be in `build-mingw/windows/bin`.\n\nUsage\n-----\n\nInstructions for the use of the command line program and library can\nbe found in the man pages in the `man` subdirectory.\n\nSecurity\n--------\n\nBy default, the library will scrub raw HTML and potentially\ndangerous links (`javascript:`, `vbscript:`, `data:`, `file:`).\n\nTo allow these, use the option `CMARK_OPT_UNSAFE` (or\n`--unsafe`) with the command line program. If doing so, we\nrecommend you use a HTML sanitizer specific to your needs to\nprotect against [XSS\nattacks](http://en.wikipedia.org/wiki/Cross-site_scripting).\n\nContributing\n------------\n\nThere is a [forum for discussing\nCommonMark](http://talk.commonmark.org); you should use it instead of\ngithub issues for questions and possibly open-ended discussions.\nUse the [github issue tracker](http://github.com/commonmark/CommonMark/issues)\nonly for simple, clear, actionable issues.\n\nAuthors\n-------\n\nJohn MacFarlane wrote the original library and program.\nThe block parsing algorithm was worked out together with David\nGreenspan. Vicent Marti optimized the C implementation for\nperformance, increasing its speed tenfold.  Kārlis Gaņģis helped\nwork out a better parsing algorithm for links and emphasis,\neliminating several worst-case performance issues.\nNick Wellnhofer contributed many improvements, including\nmost of the C library's API and its test harness.\n\n[benchmarks]: benchmarks.md\n[the spec]: http://spec.commonmark.org\n[CommonMark]: http://commonmark.org\n[cmake]: http://www.cmake.org/download/\n[re2c]: http://re2c.org\n[commonmark.js]: https://github.com/commonmark/commonmark.js\n[Build Status]: https://img.shields.io/travis/commonmark/cmark/master.svg?style=flat\n[Windows Build Status]: https://ci.appveyor.com/api/projects/status/h3fd91vtd1xfmp69?svg=true\n[american fuzzy lop]: http://lcamtuf.coredump.cx/afl/\n[libFuzzer]: http://llvm.org/docs/LibFuzzer.html\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/changelog.txt",
    "content": "[0.29.0]\n\n  * Update spec to 0.29.\n  * Make rendering safe by default (#239, #273).\n    Adds `CMARK_OPT_UNSAFE` and make `CMARK_OPT_SAFE` a no-op (for API\n    compatibility).  The new default behavior is to suppress raw HTML and\n    potentially dangerous links.  The `CMARK_OPT_UNSAFE` option has to be set\n    explicitly to prevent this.\n    **NOTE:** This change will require modifications in bindings for cmark\n    and in most libraries and programs that use cmark.\n    Borrows heavily from @kivikakk's patch in github/cmark-gfm#123.\n  * Add sourcepos info for inlines (Yuki Izumi).\n  * Disallow more than 32 nested balanced parens in a link (Yuki Izumi).\n  * Resolve link references before creating setext header.\n    A setext header line after a link reference should not\n    create a header, according to the spec.\n  * commonmark renderer: improve escaping.\n    URL-escape special characters when escape mode is URL, and not otherwise.\n    Entity-escape control characters (< 0x20) in non-literal escape modes.\n  * render:  only emit actual newline when escape mode is LITERAL.\n    For markdown content, e.g., in other contexts we want some\n    kind of escaping, not a literal newline.\n  * Update code span normalization to conform with spec change.\n  * Allow empty `<>` link destination in reference link.\n  * Remove leftover includes of `memory.h` (#290).\n  * A link destination can't start with `<` unless it is\n    an angle-bracket link that also ends with `>` (#289).\n    (If your URL really starts with `<`, URL-escape it.)\n  * Allow internal delimiter runs to match if both have lengths that are\n    multiples of 3.  See commonmark/commonmark#528.\n  * Include `references.h` in `parser.h` (#287).\n  * Fix `[link](<foo\\>)`.\n  * Use hand-rolled scanner for thematic break (see #284).\n    Keep track of the last position where a thematic break\n    failed to match on a line, to avoid rescanning unnecessarily.\n  * Rename `ends_with_blank_line` with `S_` prefix.\n  * Add `CMARK_NODE__LAST_LINE_CHECKED` flag (#284).\n    Use this to avoid unnecessary recursion in `ends_with_blank_line`.\n  * In `ends_with_blank_line`, call `S_set_last_line_blank`\n    to avoid unnecessary repetition (#284).  Once we settle whether a list\n    item ends in a blank line, we don't need to revisit this in considering\n    parent list items.\n  * Disallow unescaped `(` in parenthesized link title.\n  * Copy line/col info straight from opener/closer (Ashe Connor).\n    We can't rely on anything in `subj` since it's been modified while parsing\n    the subject and could represent line info from a future line.  This is\n    simple and works.\n  * `render.c`: reset `last_breakable` after cr.  Fixes jgm/pandoc#5033.\n  * Fix a typo in `houdini_href_e.c` (Felix Yan).\n  * commonmark writer: use `~~~` fences if info string contains backtick.\n    This is needed for round-trip tests.\n  * Update scanners for new info string rules.\n  * Add XSLT stylesheet to convert cmark XML back to Commonmark\n    (Nick Wellnhofer, #264).  Initial version of an XSLT stylesheet that\n    converts the XML format produced by `cmark -t xml` back to Commonmark.\n  * Check for whitespace before reference title (#263).\n  * Bump CMake to version 3 (Jonathan Müller).\n  * Build: Remove deprecated call to `add_compiler_export_flags()`\n    (Jonathan Müller).  It is deprecated in CMake 3.0, the replacement is to\n    set the `CXX_VISIBILITY_PRESET` (or in our case `C_VISIBILITY_PRESET`) and\n    `VISIBILITY_INLINES_HIDDEN` properties of the target.  We're already\n    setting them by setting the CMake variables anyway, so the call can be\n    removed.\n  * Build: only attempt to install MSVC system libraries on Windows\n    (Saleem Abdulrasool).  Newer versions of CMake attempt to query the system\n    for information about the VS 2017 installation.  Unfortunately, this query\n    fails on non-Windows systems when cross-compiling:\n    `cmake_host_system_information does not recognize <key> VS_15_DIR`.\n    CMake will not find these system libraries on non-Windows hosts anyways,\n    and we were silencing the warnings, so simply omit the installation when\n    cross-compiling to Windows.\n  * Simplify code normalization, in line with spec change.\n  * Implement code span spec changes.  These affect both parsing and writing\n    commonmark.\n  * Add link parsing corner cases to regressions (Ashe Connor).\n  * Add `xml:space=\"preserve\"` in XML output when appropriate\n    (Nguyễn Thái Ngọc Duy).\n    (For text, code, code_block, html_inline and html_block tags.)\n  * Removed meta from list of block tags.  Added regression test.\n    See commonmark/CommonMark#527.\n  * `entity_tests.py` - omit noisy success output.\n  * `pathological_tests.py`: make tests run faster.\n    Commented out the (already ignored) \"many references\" test, which\n    times out.  Reduced the iterations for a couple other tests.\n  * `pathological_tests.py`: added test for deeply nested lists.\n  * Optimize `S_find_first_nonspace`.  We were needlessly redoing things we'd\n    already done.  Now we skip the work if the first nonspace is greater than\n    the current offset.  This fixes pathological slowdown with deeply nested\n    lists (#255).  For N = 3000, the time goes from over 17s to about 0.7s.\n    Thanks to Martin Mitas for diagnosing the problem.\n  * Allow spaces in link destination delimited with pointy brackets.\n  * Adjust max length of decimal/numeric entities.\n    See commonmark/CommonMark#487.\n  * Fix inline raw HTML parsing.\n    This fixes a recently added failing spec test case.  Previously spaces\n    were being allowed in unquoted attribute values; no we forbid them.\n  * Don't allow list markers to be indented >= 4 spaces.\n    See commonmark/CommonMark#497.\n  * Check for empty buffer when rendering (Phil Turnbull).\n    For empty documents, `->size` is zero so\n    `renderer.buffer->ptr[renderer.buffer->size - 1]` will cause an\n    out-of-bounds read. Empty buffers always point to the global\n    `cmark_strbuf__initbuf` buffer so we read `cmark_strbuf__initbuf[-1]`.\n  * Also run API tests with `CMARK_SHARED=OFF` (Nick Wellnhofer).\n  * Rename roundtrip and entity tests (Nick Wellnhofer).\n    Rename the tests to reflect that they use the library, not the\n    executable.\n  * Generate export header for static-only build (#247, Nick Wellnhofer).\n  * Fuzz width parameter too (Phil Turnbull).  Allow the `width` parameter to\n    be generated too so we get better fuzz-coverage.\n  * Don't discard empty fuzz test-cases (Phil Turnbull).  We currently discard\n    fuzz test-cases that are empty but empty inputs are valid markdown. This\n    improves the fuzzing coverage slightly.\n  * Fixed exit code for pathological tests.\n  * Add allowed failures to `pathological_tests.py`.\n    This allows us to include tests that we don't yet know how to pass.\n  * Add timeout to `pathological_tests.py`.\n    Tests must complete in 8 seconds or are errors.\n  * Add more pathological tests (Martin Mitas).\n    These tests target the issues #214, #218, #220.\n  * Use pledge(2) on OpenBSD (Ashe Connor).\n  * Update the Racket wrapper (Eli Barzilay).\n  * Makefile: For afl target, don't build tests.\n\n[0.28.3]\n\n  * Include GNUInstallDirs in src/CMakeLists.txt (Nick Wellnhofer, #240).\n    This fixes build problems on some cmake versions (#241).\n\n[0.28.2]\n\n  * Fixed regression in install dest for static library (#238).\n    Due to a mistake, 0.28.1 installed libcmark.a into include/.\n\n[0.28.1]\n\n  * `--smart`: open quote can never occur right after `]` or `)` (#227).\n  * Fix quadratic behavior in `finalize` (Vicent Marti).\n  * Don't use `CMAKE_INSTALL_LIBDIR` to create `libcmark.pc` (#236).\n    This wasn't getting set in processing `libcmark.pc.in`, and we\n    were getting the wrong entry in `libcmark.pc`.\n    The new approach sets an internal `libdir` variable to\n    `lib${LIB_SUFFIX}`.  This variable is used both to set the\n    install destination and in the libcmark.pc.in template.\n  * Update README.md, replace `make astyle` with `make format`\n    (Nguyễn Thái Ngọc Duy).\n\n[0.28.0]\n\n  * Update spec.\n  * Use unsigned integer when shifting (Phil Turnbull).\n    Avoids a UBSAN warning which can be triggered when handling a\n    long sequence of backticks.\n  * Avoid memcpy'ing NULL pointers (Phil Turnbull).\n    Avoids a UBSAN warning when link title is empty string.\n    The length of the memcpy is zero so the NULL pointer is not\n    dereferenced but it is still undefined behaviour.\n  * DeMorgan simplification of some tests in emphasis parser.\n    This also brings the code into closer alignment with the wording\n    of the spec (see jgm/CommonMark#467).\n  * Fixed undefined shift in commonmark writer (#211).\n    Found by google/oss-fuzz:\n    <https://oss-fuzz.com/v2/testcase-detail/4686992824598528>.\n  * latex writer:  fix memory overflow (#210).\n    We got an array overflow in enumerated lists nested more than\n    10 deep with start number =/= 1.\n    This commit also ensures that we don't try to set `enum_` counters\n    that aren't defined by LaTeX (generally up to enumv).\n    Found by google/oss-fuzz:\n    <https://oss-fuzz.com/v2/testcase-detail/5546760854306816>.\n  * Check for NULL pointer in get_link_type (Phil Turnbull).\n    `echo '[](xx:)' | ./build/src/cmark -t latex` gave a\n    segfault.\n  * Move fuzzing dictionary into single file (Phil Turnbull).\n    This allows AFL and libFuzzer to use the same dictionary\n  * Reset bytes after UTF8 proc (Yuki Izumi, #206).\n  * Don't scan past an EOL (Yuki Izumi).\n    The existing negated character classes (`[^…]`) are careful to\n    always include` \\x00` in the characters excluded, but these `.`\n    catch-alls can scan right past the terminating NUL placed\n    at the end of the buffer by `_scan_at`.  As such, buffer\n    overruns can occur.  Also, don't scan past a newline in HTML\n    block end scanners.\n  * Document cases where `get_` functions return `NULL` (#155).\n    E.g. `cmark_node_get_url` on a non-link or image.\n  * Properly handle backslashes in link destinations (#192).\n    Only ascii punctuation characters are escapable, per the spec.\n  * Fixed `cmark_node_get_list_start` to return 0 for bullet lists,\n    as documented (#202).\n  * Use `CMARK_NO_DELIM` for bullet lists (#201).\n  * Fixed code for freeing delimiter stack (#189).\n  * Removed abort outside of conditional (typo).\n  * Removed coercion in error message when aborting from buffer.\n  * Print message to stderr when we abort due to memory demands (#188).\n  * `libcmark.pc`: use `CMAKE_INSTALL_LIBDIR` (#185, Jens Petersen).\n    Needed for multilib distros like Fedora.\n  * Fixed buffer overflow error in `S_parser_feed` (#184).\n    The overflow could occur in the following condition:\n    the buffer ends with `\\r` and the next memory address\n    contains `\\n`.\n  * Update emphasis parsing for spec change.\n    Strong now goes inside Emph rather than the reverse,\n    when both scopes are possible.  The code is much simpler.\n    This also avoids a spec inconsistency that cmark had previously:\n    `***hi***` became Strong (Emph \"hi\")) but\n    `***hi****` became Emph (Strong \"hi\")) \"*\"\n  * Fixes for the LaTeX renderer (#182, Doeme)\n    + Don't double-output the link in latex-rendering.\n    + Prevent ligatures in dashes sensibly when rendering latex.\n      `\\-` is a hyphenation, so it doesn't get displayed at all.\n  * Added a test for NULL when freeing `subj->last_delim`.\n  * Cleaned up setting of lower bounds for openers.\n    We now use a much smaller array.\n  * Fix #178, quadratic parsing bug.  Add pathological test.\n  * Slight improvement of clarity of logic in emph matching.\n  * Fix \"multiple of 3\" determination in emph/strong parsing.\n    We need to store the length of the original delimiter run,\n    instead of using the length of the remaining delimiters\n    after some have been subtracted.  Test case:\n    `a***b* c*`.  Thanks to Raph Levin for reporting.\n  * Correctly initialize chunk in S_process_line (Nick Wellnhofer, #170).\n    The `alloc` member wasn't initialized.  This also allows to add an\n    assertion in `chunk_rtrim` which doesn't work for alloced chunks.\n  * Added 'make newbench'.\n  * `scanners.c` generated with re2c 0.16 (68K smaller!).\n  * `scanners.re` - fixed warnings; use `*` for fallback.\n  * Fixed some warnings in `scanners.re`.\n  * Update CaseFolding to latest (Kevin Wojniak, #168).\n  * Allow balanced nested parens in link destinations (Yuki Izumi, #166)\n  * Allocate enough bytes for backticks array.\n  * Inlines: Ensure that the delimiter stack is freed in subject.\n  * Fixed pathological cases with backtick code spans:\n\n    - Removed recursion in scan_to_closing_backticks\n    - Added an array of pointers to potential backtick closers\n      to subject\n    - This array is used to avoid traversing the subject again\n      when we've already seen all the potential backtick closers.\n    - Added a max bound of 1000 for backtick code span delimiters.\n    - This helps with pathological cases like:\n\n            x\n            x `\n            x ``\n            x ```\n            x ````\n            ...\n\n    - Added pathological test case.\n\n    Thanks to Martin Mitáš for identifying the problem and for\n    discussion of solutions.\n  * Remove redundant cmake_minimum_required (#163, @kainjow).\n  * Make shared and static libraries optional (Azamat H. Hackimov).\n    Now you can enable/disable compilation and installation targets for\n    shared and static libraries via `-DCMARK_SHARED=ON/OFF` and\n    `-DCMARK_STATIC=ON/OFF`.\n  * Added support for built-in `${LIB_SUFFIX}` feature (Azamat H.\n    Hackimov).  Replaced `${LIB_INSTALL_DIR}` option with built-in\n    `${LIB_SUFFIX}` for installing for 32/64-bit systems. Normally,\n    CMake will set `${LIB_SUFFIX}` automatically for required enviroment.\n    If you have any issues with it, you can override this option with\n    `-DLIB_SUFFIX=64` or `-DLIB_SUFFIX=\"\"` during configuration.\n  * Add Makefile target and harness to fuzz with libFuzzer (Phil Turnbull).\n    This can be run locally with `make libFuzzer` but the harness will be\n    integrated into oss-fuzz for large-scale fuzzing.\n  * Advertise `--validate-utf8` in usage information\n    (Nguyễn Thái Ngọc Duy).\n  * Makefile: use warnings with re2c.\n  * README: Add link to Python wrapper, prettify languages list\n    (Pavlo Kapyshin).\n  * README: Add link to cmark-scala (Tim Nieradzik, #196)\n\n[0.27.1]\n\n  * Set policy for CMP0063 to avoid a warning (#162).\n    Put set_policy under cmake version test.\n    Otherwise we get errors in older versions of cmake.\n  * Use VERSION_GREATER to clean up cmake version test.\n  * Improve afl target.  Use afl-clang by default.  Set default for path.\n\n[0.27.0]\n\n  * Update spec to 0.27.\n  * Fix warnings building with MSVC on Windows (#165, Hugh Bellamy).\n  * Fix `CMAKE_C_VISIBILITY_PRESET` for cmake versions greater than 1.8\n    (e.g. 3.6.2) (#162, Hugh Bellamy).  This lets us build swift-cmark\n    on Windows, using clang-cl.\n  * Fix for non-matching entities (#161, Yuki Izumi).\n  * Modified `print_delimiters` (commented out) so it compiles again.\n  * `make format`: don't change order of includes.\n  * Changed logic for null/eol checks (#160).\n    + only check once for \"not at end of line\"\n    + check for null before we check for newline characters (the\n      previous patch would fail for NULL + CR)\n  * Fix by not advancing past both `\\0` and `\\n` (Yuki Izumi).\n  * Add test for NUL-LF sequence (Yuki Izumi).\n  * Fix memory leak in list parsing (Yuki Izumi).\n  * Use `cmark_mem` to free where used to alloc (Yuki Izumi).\n  * Allow a shortcut link before a `(` (jgm/CommonMark#427).\n  * Allow tabs after setext header line (jgm/commonmark.js#109).\n  * Don't let URI schemes start with spaces.\n  * Fixed h2..h6 HTML blocks (jgm/CommonMark#430).  Added regression test.\n  * Autolink scheme can contain digits (Gábor Csárdi).\n  * Fix nullary function declarations in cmark.h (Nick Wellnhofer).\n    Fixes strict prototypes warnings.\n  * COPYING: Update file name and remove duplicate section and\n    (Peter Eisentraut).\n  * Fix typo (Pavlo Kapyshin).\n\n[0.26.1]\n\n  * Removed unnecessary typedef that caused build failure on\n    some platforms.\n  * Use `$(MAKE)` in Makefile instead of hardcoded `make` (#146,\n    Tobias Kortkamp).\n\n[0.26.0]\n\n  * Implement spec changes for list items:\n    - Empty list items cannot interrupt paragraphs.\n    - Ordered lists cannot interrupt paragraphs unless\n      they start with 1.\n    - Removed \"two blank lines break out of a list\" feature.\n  * Fix sourcepos for blockquotes (#142).\n  * Fix sourcepos for atx headers (#141).\n  * Fix ATX headers and thematic breaks to allow tabs as well as spaces.\n  * Fix `chunk_set_cstr` with suffix of current string (#139,\n    Nick Wellnhofer).  It's possible that `cmark_chunk_set_cstr` is called\n    with a substring (suffix) of the current string. Delay freeing of the\n    chunk content to handle this case correctly.\n  * Export targets on installation (Jonathan Müller).\n    This allows using them in other cmake projects.\n  * Fix cmake warning about CMP0048 (Jonathan Müller).\n  * commonmark renderer:  Ensure we don't have a blank line\n    before a code block when it's the first thing in a list\n    item.\n  * Change parsing of strong/emph in response to spec changes.\n    `process_emphasis` now gets better results in corner cases.\n    The change is this:  when considering matches between an interior\n    delimiter run (one that can open and can close) and another delimiter\n    run, we require that the sum of the lengths of the two delimiter\n    runs mod 3 is not 0.\n  * Ported Robin Stocker's changes to link parsing in jgm/commonmark#101.\n    This uses a separate stack for brackets, instead of putting them on the\n    delimiter stack.  This avoids the need for looking through the delimiter\n    stack for the next bracket.\n  * `cmark_reference_lookup`: Return NULL if reference is null string.\n  * Fix character type detection in `commonmark.c` (Nick Wellnhofer).\n    Fixes test failures on Windows and undefined behavior.\n    - Implement `cmark_isalpha`.\n    - Check for ASCII character before implicit cast to char.\n    - Use internal ctype functions in `commonmark.c`.\n  * Better documentation of memory-freeing responsibilities.\n    in `cmark.h` and its man page (#124).\n  * Use library functions to insert nodes in emphasis/link processing.\n    Previously we did this manually, which introduces many\n    places where errors can creep in.\n  * Correctly handle list marker followed only by spaces.\n    Previously when a list marker was followed only by spaces,\n    cmark expected the following content to be indented by\n    the same number of spaces.  But in this case we should\n    treat the line just like a blank line and set list padding\n    accordingly.\n  * Fixed a number of issues relating to line wrapping.\n    - Extend `CMARK_OPT_NOBREAKS` to all renderers and add `--nobreaks`.\n    - Do not autowrap, regardless of width parameter, if\n      `CMARK_OPT_NOBREAKS` is set.\n    - Fixed `CMARK_OPT_HARDBREAKS` for LaTeX and man renderers.\n    - Ensure that no auto-wrapping occurs if\n      `CMARK_OPT_NOBREAKS` is enabled, or if output is CommonMark and\n      `CMARK_OPT_HARDBREAKS` is enabled.\n  * Set stdin to binary mode on Windows (Nick Wellnhofer, #113).\n    This fixes EOLs when reading from stdin.\n  * Add library option to render softbreaks as spaces (Pavlo\n    Kapyshin).  Note that the `NOBREAKS` option is HTML-only\n  * renderer:  `no_linebreaks` instead of `no_wrap`.\n    We generally want this option to prohibit any breaking\n    in things like headers (not just wraps, but softbreaks).\n  * Coerce `realurllen` to `int`.  This is an alternate solution for pull\n    request #132, which introduced a new warning on the comparison\n    (Benedict Cohen).\n  * Remove unused variable `link_text` (Mathiew Duponchelle).\n  * Improved safety checks in buffer (Vicent Marti).\n  * Add new interface allowing specification of custom memory allocator\n    for nodes (Vicent Marti).  Added `cmark_node_new_with_mem`,\n    `cmark_parser_new_with_mem`, `cmark_mem` to API.\n  * Reduce storage size for nodes by using bit flags instead of\n    separate booleans (Vicent Marti).\n  * config: Add `SSIZE_T` compat for Win32 (Vicent Marti).\n  * cmake: Global handler for OOM situations (Vicent Marti).\n  * Add tests for memory exhaustion (Vicent Marti).\n  * Document in man page and public header that one should use the same\n    memory allocator for every node in a tree.\n  * Fix ctypes in Python FFI calls (Nick Wellnhofer).  This didn't cause\n    problems so far because all types are 32-bit on 32-bit systems and\n    arguments are passed in registers on x86-64.  The wrong types could cause\n    crashes on other platforms, though.\n  * Remove spurious failures in roundtrip tests.  In the commonmark writer we\n    separate lists, and lists and indented code, using a dummy HTML comment.\n    So in evaluating the round-trip tests, we now strip out\n    these comments.  We also normalize HTML to avoid issues\n    having to do with line breaks.\n  * Add 2016 to copyright (Kevin Burke).\n  * Added `to_commonmark` in `test/cmark.py` (for round-trip tests).\n  * `spec_test.py` - parameterize `do_test` with converter.\n  * `spec_tests.py`: exit code is now sum of failures and errors.\n    This ensures that a failing exit code will be given when\n    there are errors, not just with failures.\n  * Fixed round trip tests.  Previously they actually ran\n    `cmark` instead of the round-trip version, since there was a bug in\n    setting the ROUNDTRIP variable (#131).\n  * Added new `roundtrip_tests.py`.  This replaces the old use of simple shell\n    scripts.  It is much faster, and more flexible.  (We will be able\n    to do custom normalization and skip certain tests.)\n  * Fix tests under MinGW (Nick Wellnhofer).\n  * Fix leak in `api_test` (Mathieu Duponchelle).\n  * Makefile: have leakcheck stop on first error instead of going through\n    all the formats and options and probably getting the same output.\n  * Add regression tests (Nick Wellnhofer).\n\n[0.25.2]\n\n  * Open files in binary mode (#113, Nick Wellnhofer).  Now that cmark\n    supports different line endings, files must be openend in binary mode\n    on Windows.\n  * Reset `partially_consumed_tab` on every new line (#114, Nick Wellnhofer).\n  * Handle buffer split across a CRLF line ending (#117).  Adds an internal\n    field to the parser struct to keep track of `last_buffer_ended_with_cr`.\n    Added test.\n\n[0.25.1]\n\n  * Release with no code changes.  cmark version was mistakenly set to\n    0.25.1 in the 0.25.0 release (#112), so this release just\n    ensures that this will cause no confusion later.\n\n[0.25.0]\n\n  * Fixed tabs in indentation (#101).  This patch fixes S_advance_offset\n    so that it doesn't gobble a tab character when advancing less than the\n    width of a tab.\n  * Added partially_consumed_tab to parser.  This keeps track of when we\n    have gotten partway through a tab when consuming initial indentation.\n  * Simplified add_line (only need parser parameter).\n  * Properly handle partially consumed tab.  E.g. in\n\n        - foo\n\n         <TAB><TAB>bar\n\n    we should consume two spaces from the second tab, including two spaces\n    in the code block.\n  * Properly handle tabs with blockquotes and fenced blocks.\n  * Fixed handling of tabs in lists.\n  * Clarified logic in S_advance_offset.\n  * Use an assertion to check for in-range html_block_type.\n    It's a programming error if the type is out of range.\n  * Refactored S_processLines to make the logic easier to\n    understand, and added documentation (Mathieu Duponchelle).\n  * Removed unnecessary check for empty string_content.\n  * Factored out contains_inlines.\n  * Moved the cmake minimum version to top line of CMakeLists.txt\n    (tinysun212).\n  * Fix ctype(3) usage on NetBSD (Kamil Rytarowski).  We need to cast value\n    passed to isspace(3) to unsigned char to explicitly prevent possibly\n    undefined behavior.\n  * Compile in plain C mode with MSVC 12.0 or newer (Nick Wellnhofer).\n    Under MSVC, we used to compile in C++ mode to get some C99 features\n    like mixing declarations and code. With newer MSVC versions, it's\n    possible to build in plain C mode.\n  * Switched from \"inline\" to \"CMARK_INLINE\" (Nick Wellnhofer).\n    Newer MSVC versions support enough of C99 to be able to compile cmark\n    in plain C mode. Only the \"inline\" keyword is still unsupported.\n    We have to use \"__inline\" instead.\n  * Added include guards to config.h\n  * config.h.in - added compatibility snprintf, vsnprintf for MSVC.\n  * Replaced sprintf with snprintf (Marco Benelli).\n  * config.h: include stdio.h for _vscprintf etc.\n  * Include starg.h when needed in config.h.\n  * Removed an unnecessary C99-ism in buffer.c.  This helps compiling on\n    systems like luarocks that don't have all the cmake configuration\n    goodness (thanks to carlmartus).\n  * Don't use variable length arrays (Nick Wellnhofer).\n    They're not supported by MSVC.\n  * Test with multiple MSVC versions under Appveyor (Nick Wellnhofer).\n  * Fix installation dir of man-pages on NetBSD (Kamil Rytarowski).\n  * Fixed typo in cmark.h comments (Chris Eidhof).\n  * Clarify in man page that cmark_node_free frees a node's children too.\n  * Fixed documentation of --width in man page.\n  * Require re2c >= 1.14.2 (#102).\n  * Generated scanners.c with more recent re2c.\n\n[0.24.1]\n\n  * Commonmark renderer:\n    + Use HTML comment, not two blank lines, to separate a list\n      item from a following code block or list.  This makes the\n      output more portable, since the \"two blank lines\" rule is\n      unique to CommonMark.  Also, it allows us to break out of\n      a sublist without breaking out of all levels of nesting.\n    + `is_autolink` - handle case where link has no children,\n      which previously caused a segfault.\n    + Use 4-space indent for bullet lists, for increased portability.\n    + Use 2-space + newline for line break for increased portability (#90).\n    + Improved punctuation escaping.  Previously all `)` and\n      `.` characters after digits were escaped; now they are\n      only escaped if they are genuinely in a position where\n      they'd cause a list item.  This is achieved by changes in\n      `render.c`: (a) `renderer->begin_content` is only set to\n      false after a string of digits at the beginning of the\n      line, and (b) we never break a line before a digit.\n      Also, `begin_content` is properly initialized to true.\n  * Handle NULL root in `consolidate_text_nodes`.\n\n[0.24.0]\n\n  * [API change] Added `cmark_node_replace(oldnode, newnode)`.\n  * Updated spec.txt to 0.24.\n  * Fixed edge case with escaped parens in link destination (#97).\n    This was also checked against the #82 case with asan.\n  * Removed unnecessary check for `fenced` in `cmark_render_html`.\n    It's sufficient to check that the info string is empty.\n    Indeed, those who use the API may well create a code block\n    with an info string without explicitly setting `fenced`.\n  * Updated format of `test/smart_punct.txt`.\n  * Updated `test/spec.txt`, `test/smart_punct.txt`, and\n    `spec_tests.py` to new format.\n  * Fixed `get_containing_block` logic in `src/commonmark.c`.\n    This did not allow for the possibility that a node might have no\n    containing block, causing the commonmark renderer to segfault if\n    passed an inline node with no block parent.\n  * Fixed string representations of `CUSTOM_BLOCK`,\n    `CUSTOM_INLINE`.  The old versions `raw_inline` and\n    `raw_block` were being used, and this led to incorrect xml output.\n  * Use default opts in python sample wrapper.\n  * Allow multiline setext header content, as per spec.\n  * Don't allow spaces in link destinations, even with pointy brackets.\n    Conforms to latest change in spec.\n  * Updated `scheme` scanner according to spec change.  We no longer use\n    a whitelist of valid schemes.\n  * Allow any kind of nodes as children of `CUSTOM_BLOCK` (#96).\n  * `cmark.h`: moved typedefs for iterator into iterator section.\n    This just moves some code around so it makes more sense\n    to read, and in the man page.\n  * Fixed `make_man_page.py` so it includes typedefs again.\n\n[0.23.0]\n\n  * [API change] Added `CUSTOM_BLOCK` and `CUSTOM_INLINE` node types.\n    They are never generated by the parser, and do not correspond\n    to CommonMark elements.  They are designed to be inserted by\n    filters that postprocess the AST.  For example, a filter might\n    convert specially marked code blocks to svg diagrams in HTML\n    and tikz diagrams in LaTeX, passing these through to the renderer\n    as a `CUSTOM_BLOCK`.  These nodes can have children, but they\n    also have literal text to be printed by the renderer \"on enter\"\n    and \"on exit.\" Added `cmark_node_get_on_enter`,\n    `cmark_node_set_on_enter`, `cmark_node_get_on_exit`,\n    `cmark_node_set_on_exit` to API.\n  * [API change] Rename `NODE_HTML` -> `NODE_HTML_BLOCK`,\n    `NODE_INLINE_HTML` -> `NODE_HTML_INLINE`.  Define aliases\n    so the old names still work, for backwards compatibility.\n  * [API change] Rename `CMARK_NODE_HEADER` -> `CMARK_NODE_HEADING`.\n    Note that for backwards compatibility, we have defined aliases:\n    `CMARK_NODE_HEADER` = `CMARK_NODE_HEADING`,\n    `cmark_node_get_header_level` = `cmark_node_get_heading_level`, and\n    `cmark_node_set_header_level` = `cmark_node_set_heading_level`.\n  * [API change] Rename `CMARK_NODE_HRULE` -> `CMARK_NODE_THEMATIC_BREAK`.\n    Defined the former as the latter for backwards compatibility.\n  * Don't allow space between link text and link label in a reference link\n    (spec change).\n  * Separate parsing and rendering opts in `cmark.h` (#88).\n    This change also changes some of these constants' numerical values,\n    but nothing should change in the API if you use the constants\n    themselves.  It should now be clear in the man page which\n    options affect parsing and which affect rendering.\n  * xml renderer - Added xmlns attribute to document node (jgm/CommonMark#87).\n  * Commonmark renderer:  ensure html blocks surrounded by blanks.\n    Otherwise we get failures of roundtrip tests.\n  * Commonmark renderer: ensure that literal characters get escaped\n    when they're at the beginning of a block, e.g.  `> \\- foo`.\n  * LaTeX renderer - better handling of internal links.\n    Now we render `[foo](#bar)` as `\\protect\\hyperlink{bar}{foo}`.\n  * Check for NULL pointer in _scan_at (#81).\n  * `Makefile.nmake`:  be more robust when cmake is missing.  Previously,\n    when cmake was missing, the build dir would be created anyway, and\n    subsequent attempts (even with cmake) would fail, because cmake would\n    not be run.  Depending on `build/CMakeFiles` is more robust -- this won't\n    be created unless cmake is run.  Partially addresses #85.\n  * Fixed DOCTYPE in xml output.\n  * commonmark.c: fix `size_t` to `int`.  This fixes an MSVC warning\n   \"conversion from 'size_t' to 'int', possible loss of data\" (Kevin Wojniak).\n  * Correct string length in `cmark_parse_document` example (Lee Jeffery).\n  * Fix non-ASCII end-of-line character check (andyuhnak).\n  * Fix \"declaration shadows a local variable\" (Kevin Wojniak).\n  * Install static library (jgm/CommonMark#381).\n  * Fix warnings about dropping const qualifier (Kevin Wojniak).\n  * Use full (unabbreviated) versions of constants (`CMARK_...`).\n  * Removed outdated targets from Makefile.\n  * Removed need for sudo in `make bench`.\n  * Improved benchmark.  Use longer test, since `time` has limited resolution.\n  * Removed `bench.h` and timing calls in `main.c`.\n  * Updated API docs; getters return empty strings if not set\n    rather than NULL, as previously documented.\n  * Added api_tests for custom nodes.\n  * Made roundtrip test part of the test suite run by cmake.\n  * Regenerate `scanners.c` using re2c 0.15.3.\n  * Adjusted scanner for link url.  This fixes a heap buffer overflow (#82).\n  * Added version number (1.0) to XML namespace.  We don't guarantee\n    stability in this until 1.0 is actually released, however.\n  * Removed obsolete `TIMER` macro.\n  * Make `LIB_INSTALL_DIR` configurable (Mathieu Bridon, #79).\n  * Removed out-of-date luajit wrapper.\n  * Use `input`, not `parser->curline` to determine last line length.\n  * Small optimizations in `_scan_at`.\n  * Replaced hard-coded 4 with `TAB_STOP`.\n  * Have `make format` reformat api tests as well.\n  * Added api tests for man, latex, commonmark, and xml renderers (#51).\n  * render.c:  added `begin_content` field.  This is like `begin_line` except\n    that it doesn't trigger production of the prefix.  So it can be set\n    after an initial prefix (say `> `) is printed by the renderer, and\n    consulted in determining whether to escape content that has a special\n    meaning at the beginning of a line.  Used in the commonmark renderer.\n  * Python 3.5 compatibility: don't require HTMLParseError (Zhiming Wang).\n    HTMLParseError was removed in Python 3.5. Since it could never be thrown\n    in Python 3.5+, we simply define a placeholder when HTMLParseError\n    cannot be imported.\n  * Set `convert_charrefs=False` in `normalize.py` (#83).  This defeats the\n    new default as of python 3.5, and allows the script to work with python\n    3.5.\n\n[0.22.0]\n\n  * Removed `pre` from blocktags scanner. `pre` is handled separately\n    in rule 1 and needn't be handled in rule 6.\n  * Added `iframe` to list of blocktags, as per spec change.\n  * Fixed bug with `HRULE` after blank line. This previously caused cmark\n    to break out of a list, thinking it had two consecutive blanks.\n  * Check for empty string before trying to look at line ending.\n  * Make sure every line fed to `S_process_line` ends with `\\n` (#72).\n    So `S_process_line` sees only unix style line endings. Ultimately we\n    probably want a better solution, allowing the line ending style of\n    the input file to be preserved. This solution forces output with newlines.\n  * Improved `cmark_strbuf_normalize_whitespace` (#73). Now all characters\n    that satisfy `cmark_isspace` are recognized as whitespace. Previously\n    `\\r` and `\\t` (and others) weren't included.\n  * Treat line ending with EOF as ending with newline (#71).\n  * Fixed `--hardbreaks` with `\\r\\n` line breaks (#68).\n  * Disallow list item starting with multiple blank lines (jgm/CommonMark#332).\n  * Allow tabs before closing `#`s in ATX header\n  * Removed `cmark_strbuf_printf` and `cmark_strbuf_vprintf`.\n    These are no longer needed, and cause complications for MSVC.\n    Also removed `HAVE_VA_COPY` and `HAVE_C99_SNPRINTF` feature tests.\n  * Added option to disable tests (Kevin Wojniak).\n  * Added `CMARK_INLINE` macro.\n  * Removed need to disable MSVC warnings 4267, 4244, 4800\n    (Kevin Wojniak).\n  * Fixed MSVC inline errors when cmark is included in sources that\n    don't have the same set of disabled warnings (Kevin Wojniak).\n  * Fix `FileNotFoundError` errors on tests when cmark is built from\n    another project via `add_subdirectory()` (Kevin Wojniak).\n  * Prefix `utf8proc` functions to avoid conflict with existing library\n    (Kevin Wojniak).\n  * Avoid name clash between Windows `.pdb` files (Nick Wellnhofer).\n  * Improved `smart_punct.txt` (see jgm/commonmark.js#61).\n  * Set `POSITION_INDEPENDENT_CODE` `ON` for static library (see #39).\n  * `make bench`: allow overriding `BENCHFILE`. Previously if you did\n    this, it would clopper `BENCHFILE` with the default bench file.\n  * `make bench`: Use -10 priority with renice.\n  * Improved `make_autolink`. Ensures that title is chunk with empty\n    string rather than NULL, as with other links.\n  * Added `clang-check` target.\n  * Travis: split `roundtrip_test` and `leakcheck` (OGINO Masanori).\n  * Use clang-format, llvm style, for formatting. Reformatted all source files.\n    Added `format` target to Makefile. Removed `astyle` target.\n    Updated `.editorconfig`.\n\n[0.21.0]\n\n  * Updated to version 0.21 of spec.\n  * Added latex renderer (#31). New exported function in API:\n    `cmark_render_latex`. New source file: `src/latex.hs`.\n  * Updates for new HTML block spec. Removed old `html_block_tag` scanner.\n    Added new `html_block_start` and `html_block_start_7`, as well\n    as `html_block_end_n` for n = 1-5. Rewrote block parser for new HTML\n    block spec.\n  * We no longer preprocess tabs to spaces before parsing.\n    Instead, we keep track of both the byte offset and\n    the (virtual) column as we parse block starts.\n    This allows us to handle tabs without converting\n    to spaces first.  Tabs are left as tabs in the output, as\n    per the revised spec.\n  * Removed utf8 validation by default.  We now replace null characters\n    in the line splitting code.\n  * Added `CMARK_OPT_VALIDATE_UTF8` option and command-line option\n    `--validate-utf8`.  This option causes cmark to check for valid\n    UTF-8, replacing invalid sequences with the replacement\n    character, U+FFFD.  Previously this was done by default in\n    connection with tab expansion, but we no longer do it by\n    default with the new tab treatment.  (Many applications will\n    know that the input is valid UTF-8, so validation will not\n    be necessary.)\n  * Added `CMARK_OPT_SAFE` option and `--safe` command-line flag.\n    + Added `CMARK_OPT_SAFE`.  This option disables rendering of raw HTML\n      and potentially dangerous links.\n    + Added `--safe` option in command-line program.\n    + Updated `cmark.3` man page.\n    + Added `scan_dangerous_url` to scanners.\n    + In HTML, suppress rendering of raw HTML and potentially dangerous\n      links if `CMARK_OPT_SAFE`.  Dangerous URLs are those that begin\n      with `javascript:`, `vbscript:`, `file:`, or `data:` (except for\n      `image/png`, `image/gif`, `image/jpeg`, or `image/webp` mime types).\n    + Added `api_test` for `OPT_CMARK_SAFE`.\n    + Rewrote `README.md` on security.\n  * Limit ordered list start to 9 digits, per spec.\n  * Added width parameter to `render_man` (API change).\n  * Extracted common renderer code from latex, man, and commonmark\n    renderers into a separate module, `renderer.[ch]` (#63).  To write a\n    renderer now, you only need to write a character escaping function\n    and a node rendering function.  You pass these to `cmark_render`\n    and it handles all the plumbing (including line wrapping) for you.\n    So far this is an internal module, but we might consider adding\n    it to the API in the future.\n  * commonmark writer:  correctly handle email autolinks.\n  * commonmark writer:  escape `!`.\n  * Fixed soft breaks in commonmark renderer.\n  * Fixed scanner for link url. re2c returns the longest match, so we\n    were getting bad results with `[link](foo\\(and\\(bar\\)\\))`\n    which it would parse as containing a bare `\\` followed by\n    an in-parens chunk ending with the final paren.\n  * Allow non-initial hyphens in html tag names. This allows for\n    custom tags, see jgm/CommonMark#239.\n  * Updated `test/smart_punct.txt`.\n  * Implemented new treatment of hyphens with `--smart`, converting\n    sequences of hyphens to sequences of em and en dashes that contain no\n    hyphens.\n  * HTML renderer:  properly split info on first space char (see\n    jgm/commonmark.js#54).\n  * Changed version variables to functions (#60, Andrius Bentkus).\n    This is easier to access using ffi, since some languages, like C#\n    like to use only function interfaces for accessing library\n    functionality.\n  * `process_emphasis`: Fixed setting lower bound to potential openers.\n    Renamed `potential_openers` -> `openers_bottom`.\n    Renamed `start_delim` -> `stack_bottom`.\n  * Added case for #59 to `pathological_test.py`.\n  * Fixed emphasis/link parsing bug (#59).\n  * Fixed off-by-one error in line splitting routine.\n    This caused certain NULLs not to be replaced.\n  * Don't rtrim in `subject_from_buffer`.  This gives bad results in\n    parsing reference links, where we might have trailing blanks\n    (`finalize` removes the bytes parsed as a reference definition;\n    before this change, some blank bytes might remain on the line).\n    + Added `column` and `first_nonspace_column` fields to `parser`.\n    + Added utility function to advance the offset, computing\n      the virtual column too.  Note that we don't need to deal with\n      UTF-8 here at all.  Only ASCII occurs in block starts.\n    + Significant performance improvement due to the fact that\n      we're not doing UTF-8 validation.\n  * Fixed entity lookup table.  The old one had many errors.\n    The new one is derived from the list in the npm entities package.\n    Since the sequences can now be longer (multi-code-point), we\n    have bumped the length limit from 4 to 8, which also affects\n    `houdini_html_u.c`.  An example of the kind of error that was fixed:\n    `&ngE;` should be rendered as \"≧̸\" (U+02267 U+00338), but it was\n    being rendered as \"≧\" (which is the same as `&gE;`).\n  * Replace gperf-based entity lookup with binary tree lookup.\n    The primary advantage is a big reduction in the size of\n    the compiled library and executable (> 100K).\n    There should be no measurable performance difference in\n    normal documents.  I detected only a slight performance\n    hit in a file containing 1,000,000 entities.\n    + Removed `src/html_unescape.gperf` and `src/html_unescape.h`.\n    + Added `src/entities.h` (generated by `tools/make_entities_h.py`).\n    + Added binary tree lookup functions to `houdini_html_u.c`, and\n      use the data in `src/entities.h`.\n    * Renamed `entities.h` -> `entities.inc`, and\n      `tools/make_entities_h.py` -> `tools/make_entitis_inc.py`.\n  * Fixed cases like\n    ```\n    [ref]: url\n    \"title\" ok\n    ```\n    Here we should parse the first line as a reference.\n  * `inlines.c`:  Added utility functions to skip spaces and line endings.\n  * Fixed backslashes in link destinations that are not part of escapes\n    (jgm/commonmark#45).\n  * `process_line`: Removed \"add newline if line doesn't have one.\"\n    This isn't actually needed.\n  * Small logic fixes and a simplification in `process_emphasis`.\n  * Added more pathological tests:\n    + Many link closers with no openers.\n    + Many link openers with no closers.\n    + Many emph openers with no closers.\n    + Many closers with no openers.\n    + `\"*a_ \" * 20000`.\n  * Fixed `process_emphasis` to handle new pathological cases.\n    Now we have an array of pointers (`potential_openers`),\n    keyed to the delim char.  When we've failed to match a potential opener\n    prior to point X in the delimiter stack, we reset `potential_openers`\n    for that opener type to X, and thus avoid having to look again through\n    all the openers we've already rejected.\n  * `process_inlines`:  remove closers from delim stack when possible.\n    When they have no matching openers and cannot be openers themselves,\n    we can safely remove them.  This helps with a performance case:\n    `\"a_ \" * 20000` (jgm/commonmark.js#43).\n  * Roll utf8proc_charlen into utf8proc_valid (Nick Wellnhofer).\n    Speeds up \"make bench\" by another percent.\n  * `spec_tests.py`: allow `→` for tab in HTML examples.\n  * `normalize.py`:  don't collapse whitespace in pre contexts.\n  * Use utf-8 aware re2c.\n  * Makefile afl target:  removed `-m none`, added `CMARK_OPTS`.\n  * README: added `make afl` instructions.\n  * Limit generated generated `cmark.3` to 72 character line width.\n  * Travis: switched to containerized build system.\n  * Removed `debug.h`. (It uses GNU extensions, and we don't need it anyway.)\n  * Removed sundown from benchmarks, because the reading was anomalous.\n    sundown had an arbitrary 16MB limit on buffers, and the benchmark\n    input exceeded that.  So who knows what we were actually testing?\n    Added hoedown, sundown's successor, which is a better comparison.\n\n[0.20.0]\n\n  * Fixed bug in list item parsing when items indented >= 4 spaces (#52).\n  * Don't allow link labels with no non-whitespace characters\n    (jgm/CommonMark#322).\n  * Fixed multiple issues with numeric entities (#33, Nick Wellnhofer).\n  * Support CR and CRLF line endings (Ben Trask).\n  * Added test for different line endings to `api_test`.\n  * Allow NULL value in string setters (Nick Wellnhofer).  (NULL\n    produces a 0-length string value.)  Internally, URL and\n    title are now stored as `cmark_chunk` rather than `char *`.\n  * Fixed memory leak in `cmark_consolidate_text_nodes` (#32).\n  * Fixed `is_autolink` in the CommonMark renderer (#50).  Previously *any*\n    link with an absolute URL was treated as an autolink.\n  * Cope with broken `snprintf` on Windows (Nick Wellnhofer).  On Windows,\n    `snprintf` returns -1 if the output was truncated. Fall back to\n    Windows-specific `_scprintf`.\n  * Switched length parameter on `cmark_markdown_to_html`,\n    `cmark_parser_feed`, and `cmark_parse_document` from `int`\n    to `size_t` (#53, Nick Wellnhofer).\n  * Use a custom type `bufsize_t` for all string sizes and indices.\n    This allows to switch to 64-bit string buffers by changing a single\n    typedef and a macro definition (Nick Wellnhofer).\n  * Hardened the `strbuf` code, checking for integer overflows and\n    adding range checks (Nick Wellnhofer).\n  * Removed unused function `cmark_strbuf_attach` (Nick Wellnhofer).\n  * Fixed all implicit 64-bit to 32-bit conversions that\n    `-Wshorten-64-to-32` warns about (Nick Wellnhofer).\n  * Added helper function `cmark_strbuf_safe_strlen` that converts\n    from `size_t` to `bufsize_t` and throws an error in case of\n    an overflow (Nick Wellnhofer).\n  * Abort on `strbuf` out of memory errors (Nick Wellnhofer).\n    Previously such errors were not being trapped.  This involves\n    some internal changes to the `buffer` library that do not affect\n    the API.\n  * Factored out `S_find_first_nonspace` in `S_proces_line`.\n    Added fields `offset`, `first_nonspace`, `indent`, and `blank`\n    to `cmark_parser` struct.  This just removes some repetition.\n  * Added Racket Racket (5.3+) wrapper (Eli Barzilay).\n  * Removed `-pg` from Debug build flags (#47).\n  * Added Ubsan build target, to check for undefined behavior.\n  * Improved `make leakcheck`.  We now return an error status if anything\n    in the loop fails.  We now check `--smart` and `--normalize` options.\n  * Removed `wrapper3.py`, made `wrapper.py` work with python 2 and 3.\n    Also improved the wrapper to work with Windows, and to use smart\n    punctuation (as an example).\n  * In `wrapper.rb`, added argument for options.\n  * Revised luajit wrapper.\n  * Added build status badges to README.md.\n  * Added links to go, perl, ruby, R, and Haskell bindings to README.md.\n\n[0.19.0]\n\n  * Fixed `_` emphasis parsing to conform to spec (jgm/CommonMark#317).\n  * Updated `spec.txt`.\n  * Compile static library with `-DCMARK_STATIC_DEFINE` (Nick Wellnhofer).\n  * Suppress warnings about Windows runtime library files (Nick Wellnhofer).\n    Visual Studio Express editions do not include the redistributable files.\n    Set `CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS` to suppress warnings.\n  * Added appyeyor: Windows continuous integration (`appveyor.yml`).\n  * Use `os.path.join` in `test/cmark.py` for proper cross-platform paths.\n  * Fixed `Makefile.nmake`.\n  * Improved `make afl`:  added `test/afl_dictionary`, increased timeout\n    for hangs.\n  * Improved README with a description of the library's strengths.\n  * Pass-through Unicode non-characters (Nick Wellnhofer).\n    Despite their name, Unicode non-characters are valid code points. They\n    should be passed through by a library like libcmark.\n  * Check return status of `utf8proc_iterate` (#27).\n\n[0.18.3]\n\n  * Include patch level in soname (Nick Wellnhofer). Minor version is\n    tied to spec version, so this allows breaking the ABI between spec\n    releases.\n  * Install compiler-provided system runtime libraries (Changjiang Yang).\n  * Use `strbuf_printf` instead of `snprintf`. `snprintf` is not\n    available on some platforms (Visual Studio 2013 and earlier).\n  * Fixed memory access bug: \"invalid read of size 1\" on input `[link](<>)`.\n\n[0.18.2]\n\n  * Added commonmark renderer: `cmark_render_commonmark`. In addition\n    to options, this takes a `width` parameter.  A value of 0 disables\n    wrapping; a positive value wraps the document to the specified\n    width.  Note that width is automatically set to 0 if the\n    `CMARK_OPT_HARDBREAKS` option is set.\n  * The `cmark` executable now allows `-t commonmark` for output as\n    CommonMark.  A `--width` option has been added to specify wrapping\n    width.\n  * Added `roundtrip_test` Makefile target.  This runs all the spec\n    through the commonmark renderer, and then through the commonmark\n    parser, and compares normalized HTML to the test.  All tests pass\n    with the current parser and renderer, giving us some confidence that\n    the commonmark renderer is sufficiently robust.  Eventually this\n    should be pythonized and put in the cmake test routine.\n  * Removed an unnecessary check in `blocks.c`.  By the time we check\n    for a list start, we've already checked for a horizontal rule, so\n    we don't need to repeat that check here.  Thanks to Robin Stocker for\n    pointing out a similar redundancy in commonmark.js.\n  * Fixed bug in `cmark_strbuf_unescape` (`buffer.c`).  The old function\n    gave incorrect results on input like `\\\\*`, since the next backslash\n    would be treated as escaping the `*` instead of being escaped itself.\n  * `scanners.re`:  added `_scan_scheme`, `scan_scheme`, used in the\n    commonmark renderer.\n  * Check for `CMAKE_C_COMPILER` (not `CC_COMPILER`) when setting C flags.\n  * Update code examples in documentation, adding new parser option\n    argument, and using `CMARK_OPT_DEFAULT` (Nick Wellnhofer).\n  * Added options parameter to `cmark_markdown_to_html`.\n  * Removed obsolete reference to `CMARK_NODE_LINK_LABEL`.\n  * `make leakcheck` now checks all output formats.\n  * `test/cmark.py`:  set default options for `markdown_to_html`.\n  * Warn about buggy re2c versions (Nick Wellnhofer).\n\n[0.18.1]\n\n  * Build static version of library in default build (#11).\n  * `cmark.h`:  Add missing argument to `cmark_parser_new` (#12).\n\n[0.18]\n\n  * Switch to 2-clause BSD license, with agreement of contributors.\n  * Added Profile build type, `make prof` target.\n  * Fixed autolink scanner to conform to the spec. Backslash escapes\n    not allowed in autolinks.\n  * Don't rely on strnlen being available (Nick Wellnhofer).\n  * Updated scanners for new whitespace definition.\n  * Added `CMARK_OPT_SMART` and `--smart` option, `smart.c`, `smart.h`.\n  * Added test for `--smart` option.\n  * Fixed segfault with --normalize (closes #7).\n  * Moved normalization step from XML renderer to `cmark_parser_finish`.\n  * Added options parameter to `cmark_parse_document`, `cmark_parse_file`.\n  * Fixed man renderer's escaping for unicode characters.\n  * Don't require python3 to make `cmark.3` man page.\n  * Use ASCII escapes for punctuation characters for portability.\n  * Made `options` an int rather than a long, for consistency.\n  * Packed `cmark_node` struct to fit into 128 bytes.\n    This gives a small performance boost and lowers memory usage.\n  * Repacked `delimiter` struct to avoid hole.\n  * Fixed use-after-free bug, which arose when a paragraph containing\n    only reference links and blank space was finalized (#9).\n    Avoid using `parser->current` in the loop that creates new\n    blocks, since `finalize` in `add_child` may have removed\n    the current parser (if it contains only reference definitions).\n    This isn't a great solution; in the long run we need to rewrite\n    to make the logic clearer and to make it harder to make\n    mistakes like this one.\n  * Added 'Asan' build type. `make asan` will link against ASan; the\n    resulting executable will do checks for memory access issues.\n    Thanks @JordanMilne for the suggestion.\n  * Add Makefile target to fuzz with AFL (Nick Wellnhofer)\n    The variable `$AFL_PATH` must point to the directory containing the AFL\n    binaries. It can be set as an environment variable or passed to make on\n    the command line.\n\n[0.17]\n\n  * Stripped out all JavaScript related code and documentation, moving\n    it to a separate repository (<https://github.com/jgm/commonmark.js>).\n  * Improved Makefile targets, so that `cmake` is run again only when\n    necessary (Nick Wellnhofer).\n  * Added `INSTALL_PREFIX` to the Makefile, allowing installation to a\n    location other than `/usr/local` without invoking `cmake`\n    manually (Nick Wellnhofer).\n  * `make test` now guarantees that the project will\n    be rebuilt before tests are run (Nick Wellnhofer).\n  * Prohibited overriding of some Makefile variables (Nick Wellnhofer).\n  * Provide version number and string, both as macros\n    (`CMARK_VERSION`, `CMARK_VERSION_STRING`) and as symbols\n    (`cmark_version`, `cmark_version_string`) (Nick Wellnhofer).  All of\n    these come from `cmark_version.h`, which is constructed from a\n    template `cmark_version.h.in` and data in `CMakeLists.txt`.\n  * Avoid calling `free` on null pointer.\n  * Added an accessor for an iterator's root node (`cmark_iter_get_root`).\n  * Added user data field for nodes (Nick Wellnhofer).  This is\n    intended mainly for use in bindings for dynamic languages, where\n    it could store a pointer to a target language object (#287).  But\n    it can be used for anything.\n  * Man renderer:  properly escape multiline strings.\n  * Added assertion to raise error if finalize is called on a closed block.\n  * Implemented the new spec rule for emphasis and strong emphasis with `_`.\n  * Moved the check for fence-close with the other checks for end-of-block.\n  * Fixed a bug with loose list detection with items containings\n    fenced code blocks (#285).\n  * Removed recursive algorithm in `ends_with_blank_line` (#286).\n  * Minor code reformatting: renamed parameters.\n\n[0.16]\n\n  * Added xml renderer (XML representation of the CommonMark AST,\n    which is described in `CommonMark.dtd`).\n  * Reduced size of gperf entity table (Nick Wellnhofer).\n  * Reworked iterators to allow deletion of nodes during iteration\n    (Nick Wellnhofer).\n  * Optimized `S_is_leaf`.\n  * Added `cmark_iter_reset` to iterator API.\n  * Added `cmark_consolidate_text_nodes` to API to combine adjacent\n    text nodes.\n  * Added `CMARK_OPT_NORMALIZE` to options (this combines adjacent\n    text nodes).\n  * Added `--normalize` option to command-line program.\n  * Improved regex for HTML comments in inline parsing.\n  * Python is no longer required for a basic build from the\n    repository.\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/cmark.pri",
    "content": "LIBS *= -l$$qtLibraryName(cmark)\n\n\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/cmark.pro",
    "content": "TEMPLATE = lib\n\nCONFIG += staticlib\n\nTARGET = cmark\n\ninclude(../../liteideutils.pri)\n\n\nDEFINES += QT_DEPRECATED_WARNINGS\nINCLUDEPATH += .\n\nSOURCES += \\\n        libcmark.cpp \\\n        src/blocks.c \\\n        src/buffer.c \\\n        src/cmark.c \\\n        src/cmark_ctype.c \\\n        src/commonmark.c \\\n        src/houdini_href_e.c \\\n        src/houdini_html_e.c \\\n        src/houdini_html_u.c \\\n        src/html.c \\\n        src/inlines.c \\\n        src/iterator.c \\\n        src/latex.c \\\n        src/man.c \\\n        src/node.c \\\n        src/references.c \\\n        src/render.c \\\n        src/scanners.c \\\n        src/utf8.c \\\n        src/xml.c\n\nDISTFILES += \\\n    src/case_fold_switch.inc \\\n    src/entities.inc\n\nHEADERS += \\\n    libcmark.h \\\n    src/buffer.h \\\n    src/chunk.h \\\n    src/cmark.h \\\n    src/cmark_ctype.h \\\n    src/houdini.h \\\n    src/inlines.h \\\n    src/iterator.h \\\n    src/node.h \\\n    src/parser.h \\\n    src/references.h \\\n    src/render.h \\\n    src/scanners.h \\\n    src/utf8.h\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/cmark_export.h",
    "content": "\n#ifndef CMARK_EXPORT_H\n#define CMARK_EXPORT_H\n\n#define CMARK_EXPORT\n\n#ifdef CMARK_STATIC_DEFINE\n#  define CMARK_EXPORT\n#  define CMARK_NO_EXPORT\n#else\n#  ifndef CMARK_EXPORT\n#    ifdef libcmark_EXPORTS\n        /* We are building this library */\n#      define CMARK_EXPORT __attribute__((visibility(\"default\")))\n#    else\n        /* We are using this library */\n#      define CMARK_EXPORT __attribute__((visibility(\"default\")))\n#    endif\n#  endif\n\n#  ifndef CMARK_NO_EXPORT\n#    define CMARK_NO_EXPORT __attribute__((visibility(\"hidden\")))\n#  endif\n#endif\n\n#ifndef CMARK_DEPRECATED\n#  define CMARK_DEPRECATED __attribute__ ((__deprecated__))\n#endif\n\n#ifndef CMARK_DEPRECATED_EXPORT\n#  define CMARK_DEPRECATED_EXPORT CMARK_EXPORT CMARK_DEPRECATED\n#endif\n\n#ifndef CMARK_DEPRECATED_NO_EXPORT\n#  define CMARK_DEPRECATED_NO_EXPORT CMARK_NO_EXPORT CMARK_DEPRECATED\n#endif\n\n#if 0 /* DEFINE_NO_DEPRECATED */\n#  ifndef CMARK_NO_DEPRECATED\n#    define CMARK_NO_DEPRECATED\n#  endif\n#endif\n\n#endif /* CMARK_EXPORT_H */\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/cmark_version.h",
    "content": "#ifndef CMARK_VERSION_H\n#define CMARK_VERSION_H\n\n#define CMARK_VERSION ((0 << 16) | (29 << 8)  | 0)\n#define CMARK_VERSION_STRING \"0.29.0\"\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/config.h",
    "content": "#ifndef CMARK_CONFIG_H\n#define CMARK_CONFIG_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#define HAVE_STDBOOL_H\n\n#ifdef HAVE_STDBOOL_H\n  #include <stdbool.h>\n#elif !defined(__cplusplus)\n  typedef char bool;\n#endif\n\n#ifndef _MSC_VER\n#define HAVE___BUILTIN_EXPECT\n#endif\n\n#define HAVE___ATTRIBUTE__\n\n#ifdef HAVE___ATTRIBUTE__\n  #define CMARK_ATTRIBUTE(list) __attribute__ (list)\n#else\n  #define CMARK_ATTRIBUTE(list)\n#endif\n\n#ifndef CMARK_INLINE\n  #if defined(_MSC_VER) && !defined(__cplusplus)\n    #define CMARK_INLINE __inline\n  #else\n    #define CMARK_INLINE inline\n  #endif\n#endif\n\n/* snprintf and vsnprintf fallbacks for MSVC before 2015,\n   due to Valentin Milea http://stackoverflow.com/questions/2915672/\n*/\n\n#if defined(_MSC_VER) && _MSC_VER < 1900\n\n#include <stdio.h>\n#include <stdarg.h>\n\n#define snprintf c99_snprintf\n#define vsnprintf c99_vsnprintf\n\nCMARK_INLINE int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap)\n{\n    int count = -1;\n\n    if (size != 0)\n        count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap);\n    if (count == -1)\n        count = _vscprintf(format, ap);\n\n    return count;\n}\n\nCMARK_INLINE int c99_snprintf(char *outBuf, size_t size, const char *format, ...)\n{\n    int count;\n    va_list ap;\n\n    va_start(ap, format);\n    count = c99_vsnprintf(outBuf, size, format, ap);\n    va_end(ap);\n\n    return count;\n}\n\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/libcmark.cpp",
    "content": "#include \"libcmark.h\"\n#include \"src/cmark.h\"\n\nnamespace cmark {\n\nQByteArray markdown_to_html(const QByteArray &data)\n{\n    char *buf = cmark_markdown_to_html(data.data(),size_t(data.size()),CMARK_OPT_UNSAFE);\n    QByteArray out(buf);\n    free(buf);\n    return  out;\n}\n\n} //cmark\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/libcmark.h",
    "content": "#ifndef LIBCMARK_H\n#define LIBCMARK_H\n\n#include <QByteArray>\n\nnamespace cmark {\n\nQByteArray markdown_to_html(const QByteArray &data);\n\n}\n\ninline QByteArray md2html(const QByteArray &data) {\n    return  cmark::markdown_to_html(data);\n}\n\n#endif // LIBCMARK_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/CMakeLists.txt",
    "content": "if(${CMAKE_VERSION} VERSION_GREATER \"3.3\")\n    cmake_policy(SET CMP0063 NEW)\nendif()\n\ninclude(GNUInstallDirs)\n\nset(LIBRARY \"libcmark\")\nset(STATICLIBRARY \"libcmark_static\")\nset(HEADERS\n  cmark.h\n  parser.h\n  buffer.h\n  node.h\n  iterator.h\n  chunk.h\n  references.h\n  utf8.h\n  scanners.h\n  inlines.h\n  houdini.h\n  cmark_ctype.h\n  render.h\n  )\nset(LIBRARY_SOURCES\n  cmark.c\n  node.c\n  iterator.c\n  blocks.c\n  inlines.c\n  scanners.c\n  scanners.re\n  utf8.c\n  buffer.c\n  references.c\n  render.c\n  man.c\n  xml.c\n  html.c\n  commonmark.c\n  latex.c\n  houdini_href_e.c\n  houdini_html_e.c\n  houdini_html_u.c\n  cmark_ctype.c\n  ${HEADERS}\n  )\n\nset(PROGRAM \"cmark\")\nset(PROGRAM_SOURCES\n  ${LIBRARY_SOURCES}\n  main.c\n  )\n\ninclude_directories(. ${CMAKE_CURRENT_BINARY_DIR})\n\nconfigure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmark_version.h.in\n  ${CMAKE_CURRENT_BINARY_DIR}/cmark_version.h)\n\ninclude (GenerateExportHeader)\n\nadd_executable(${PROGRAM} ${PROGRAM_SOURCES})\n\n# Disable the PUBLIC declarations when compiling the executable:\nset_target_properties(${PROGRAM} PROPERTIES\n  COMPILE_FLAGS -DCMARK_STATIC_DEFINE)\n\n# Check integrity of node structure when compiled as debug:\nset(CMAKE_C_FLAGS_DEBUG \"${CMAKE_C_FLAGS_DEBUG} -DCMARK_DEBUG_NODES\")\nset(CMAKE_LINKER_DEBUG \"${CMAKE_LINKER_FLAGS_DEBUG}\")\n\nset(CMAKE_C_FLAGS_PROFILE \"${CMAKE_C_FLAGS_RELEASE} -pg\")\nset(CMAKE_LINKER_PROFILE \"${CMAKE_LINKER_FLAGS_RELEASE} -pg\")\n\n# -fvisibility=hidden\nset(CMAKE_C_VISIBILITY_PRESET hidden)\nset(CMAKE_VISIBILITY_INLINES_HIDDEN 1)\n\nif (CMARK_SHARED)\n  add_library(${LIBRARY} SHARED ${LIBRARY_SOURCES})\n  # Include minor version and patch level in soname for now.\n  set_target_properties(${LIBRARY} PROPERTIES\n    OUTPUT_NAME \"cmark\"\n    SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}\n    VERSION ${PROJECT_VERSION})\n\n  set_property(TARGET ${LIBRARY}\n    APPEND PROPERTY MACOSX_RPATH true)\n\n  # Avoid name clash between PROGRAM and LIBRARY pdb files.\n  set_target_properties(${LIBRARY} PROPERTIES PDB_NAME cmark_dll)\n\n  generate_export_header(${LIBRARY}\n    BASE_NAME ${PROJECT_NAME})\n\n  list(APPEND CMARK_INSTALL ${LIBRARY})\nendif()\n\nif (CMARK_STATIC)\n  add_library(${STATICLIBRARY} STATIC ${LIBRARY_SOURCES})\n  set_target_properties(${STATICLIBRARY} PROPERTIES\n    COMPILE_FLAGS -DCMARK_STATIC_DEFINE\n    POSITION_INDEPENDENT_CODE ON)\n\n  if (MSVC)\n    set_target_properties(${STATICLIBRARY} PROPERTIES\n      OUTPUT_NAME \"cmark_static\"\n      VERSION ${PROJECT_VERSION})\n  else()\n    set_target_properties(${STATICLIBRARY} PROPERTIES\n      OUTPUT_NAME \"cmark\"\n      VERSION ${PROJECT_VERSION})\n  endif(MSVC)\n\n  if (NOT CMARK_SHARED)\n    generate_export_header(${STATICLIBRARY}\n      BASE_NAME ${PROJECT_NAME})\n  endif()\n\n  list(APPEND CMARK_INSTALL ${STATICLIBRARY})\nendif()\n\nif (MSVC)\n  set_property(TARGET ${PROGRAM}\n    APPEND PROPERTY LINK_FLAGS /INCREMENTAL:NO)\nendif(MSVC)\n\nif(NOT MSVC OR CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)\n  set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)\n  include(InstallRequiredSystemLibraries)\nendif()\n\nset(libdir lib${LIB_SUFFIX})\n\ninstall(TARGETS ${PROGRAM} ${CMARK_INSTALL}\n  EXPORT cmark\n  RUNTIME DESTINATION bin\n  LIBRARY DESTINATION ${libdir}\n  ARCHIVE DESTINATION ${libdir}\n  )\n\nif(CMARK_SHARED OR CMARK_STATIC)\n  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libcmark.pc.in\n    ${CMAKE_CURRENT_BINARY_DIR}/libcmark.pc @ONLY)\n  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcmark.pc\n    DESTINATION ${libdir}/pkgconfig)\n\n  install(FILES\n    cmark.h\n    ${CMAKE_CURRENT_BINARY_DIR}/cmark_export.h\n    ${CMAKE_CURRENT_BINARY_DIR}/cmark_version.h\n    DESTINATION include\n    )\n\n  install(EXPORT cmark DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)\nendif()\n\n# Feature tests\ninclude(CheckIncludeFile)\ninclude(CheckCSourceCompiles)\ninclude(CheckCSourceRuns)\ninclude(CheckSymbolExists)\nCHECK_INCLUDE_FILE(stdbool.h HAVE_STDBOOL_H)\nCHECK_C_SOURCE_COMPILES(\n  \"int main() { __builtin_expect(0,0); return 0; }\"\n  HAVE___BUILTIN_EXPECT)\nCHECK_C_SOURCE_COMPILES(\"\n  int f(void) __attribute__ (());\n  int main() { return 0; }\n\" HAVE___ATTRIBUTE__)\n\nCONFIGURE_FILE(\n  ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in\n  ${CMAKE_CURRENT_BINARY_DIR}/config.h)\n\n# Always compile with warnings\nif(MSVC)\n  # Force to always compile with W4\n  if(CMAKE_CXX_FLAGS MATCHES \"/W[0-4]\")\n    string(REGEX REPLACE \"/W[0-4]\" \"/W4\" CMAKE_C_FLAGS \"${CMAKE_C_FLAGS}\")\n  else()\n    set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} /W4\")\n  endif()\n  set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} /wd4706 /D_CRT_SECURE_NO_WARNINGS\")\nelseif(CMAKE_COMPILER_IS_GNUCC OR \"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"Clang\")\n  set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -Wall -Wextra -std=c99 -pedantic\")\nendif()\n\n# Compile as C++ under MSVC older than 12.0\nif(MSVC AND MSVC_VERSION LESS 1800)\n  set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} /TP\")\nendif()\n\nif(CMAKE_BUILD_TYPE STREQUAL \"Ubsan\")\n  set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -fsanitize=undefined\")\nendif()\n\nif(CMARK_LIB_FUZZER)\n  set(FUZZ_HARNESS \"cmark-fuzz\")\n  add_executable(${FUZZ_HARNESS} ../test/cmark-fuzz.c ${LIBRARY_SOURCES})\n  target_link_libraries(${FUZZ_HARNESS} \"${CMAKE_LIB_FUZZER_PATH}\")\n  set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -fsanitize-coverage=trace-pc-guard\")\n\n  # cmark is written in C but the libFuzzer runtime is written in C++ which\n  # needs to link against the C++ runtime. Explicitly link it into cmark-fuzz\n  set_target_properties(${FUZZ_HARNESS} PROPERTIES LINK_FLAGS \"-lstdc++\")\nendif()\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/blocks.c",
    "content": "/**\n * Block parsing implementation.\n *\n * For a high-level overview of the block parsing process,\n * see http://spec.commonmark.org/0.24/#phase-1-block-structure\n */\n\n#include <stdlib.h>\n#include <assert.h>\n#include <stdio.h>\n\n#include \"cmark_ctype.h\"\n#include \"config.h\"\n#include \"parser.h\"\n#include \"cmark.h\"\n#include \"node.h\"\n#include \"references.h\"\n#include \"utf8.h\"\n#include \"scanners.h\"\n#include \"inlines.h\"\n#include \"houdini.h\"\n#include \"buffer.h\"\n\n#define CODE_INDENT 4\n#define TAB_STOP 4\n\n#ifndef MIN\n#define MIN(x, y) ((x < y) ? x : y)\n#endif\n\n#define peek_at(i, n) (i)->data[n]\n\nstatic bool S_last_line_blank(const cmark_node *node) {\n  return (node->flags & CMARK_NODE__LAST_LINE_BLANK) != 0;\n}\n\nstatic bool S_last_line_checked(const cmark_node *node) {\n  return (node->flags & CMARK_NODE__LAST_LINE_CHECKED) != 0;\n}\n\nstatic CMARK_INLINE cmark_node_type S_type(const cmark_node *node) {\n  return (cmark_node_type)node->type;\n}\n\nstatic void S_set_last_line_blank(cmark_node *node, bool is_blank) {\n  if (is_blank)\n    node->flags |= CMARK_NODE__LAST_LINE_BLANK;\n  else\n    node->flags &= ~CMARK_NODE__LAST_LINE_BLANK;\n}\n\nstatic void S_set_last_line_checked(cmark_node *node) {\n  node->flags |= CMARK_NODE__LAST_LINE_CHECKED;\n}\n\nstatic CMARK_INLINE bool S_is_line_end_char(char c) {\n  return (c == '\\n' || c == '\\r');\n}\n\nstatic CMARK_INLINE bool S_is_space_or_tab(char c) {\n  return (c == ' ' || c == '\\t');\n}\n\nstatic void S_parser_feed(cmark_parser *parser, const unsigned char *buffer,\n                          size_t len, bool eof);\n\nstatic void S_process_line(cmark_parser *parser, const unsigned char *buffer,\n                           bufsize_t bytes);\n\nstatic cmark_node *make_block(cmark_mem *mem, cmark_node_type tag,\n                              int start_line, int start_column) {\n  cmark_node *e;\n\n  e = (cmark_node *)mem->calloc(1, sizeof(*e));\n  cmark_strbuf_init(mem, &e->content, 32);\n  e->type = (uint16_t)tag;\n  e->flags = CMARK_NODE__OPEN;\n  e->start_line = start_line;\n  e->start_column = start_column;\n  e->end_line = start_line;\n\n  return e;\n}\n\n// Create a root document node.\nstatic cmark_node *make_document(cmark_mem *mem) {\n  cmark_node *e = make_block(mem, CMARK_NODE_DOCUMENT, 1, 1);\n  return e;\n}\n\ncmark_parser *cmark_parser_new_with_mem(int options, cmark_mem *mem) {\n  cmark_parser *parser = (cmark_parser *)mem->calloc(1, sizeof(cmark_parser));\n  parser->mem = mem;\n\n  cmark_node *document = make_document(mem);\n\n  cmark_strbuf_init(mem, &parser->curline, 256);\n  cmark_strbuf_init(mem, &parser->linebuf, 0);\n\n  parser->refmap = cmark_reference_map_new(mem);\n  parser->root = document;\n  parser->current = document;\n  parser->line_number = 0;\n  parser->offset = 0;\n  parser->column = 0;\n  parser->first_nonspace = 0;\n  parser->first_nonspace_column = 0;\n  parser->thematic_break_kill_pos = 0;\n  parser->indent = 0;\n  parser->blank = false;\n  parser->partially_consumed_tab = false;\n  parser->last_line_length = 0;\n  parser->options = options;\n  parser->last_buffer_ended_with_cr = false;\n\n  return parser;\n}\n\ncmark_parser *cmark_parser_new(int options) {\n  extern cmark_mem DEFAULT_MEM_ALLOCATOR;\n  return cmark_parser_new_with_mem(options, &DEFAULT_MEM_ALLOCATOR);\n}\n\nvoid cmark_parser_free(cmark_parser *parser) {\n  cmark_mem *mem = parser->mem;\n  cmark_strbuf_free(&parser->curline);\n  cmark_strbuf_free(&parser->linebuf);\n  cmark_reference_map_free(parser->refmap);\n  mem->free(parser);\n}\n\nstatic cmark_node *finalize(cmark_parser *parser, cmark_node *b);\n\n// Returns true if line has only space characters, else false.\nstatic bool is_blank(cmark_strbuf *s, bufsize_t offset) {\n  while (offset < s->size) {\n    switch (s->ptr[offset]) {\n    case '\\r':\n    case '\\n':\n      return true;\n    case ' ':\n      offset++;\n      break;\n    case '\\t':\n      offset++;\n      break;\n    default:\n      return false;\n    }\n  }\n\n  return true;\n}\n\nstatic CMARK_INLINE bool can_contain(cmark_node_type parent_type,\n                                     cmark_node_type child_type) {\n  return (parent_type == CMARK_NODE_DOCUMENT ||\n          parent_type == CMARK_NODE_BLOCK_QUOTE ||\n          parent_type == CMARK_NODE_ITEM ||\n          (parent_type == CMARK_NODE_LIST && child_type == CMARK_NODE_ITEM));\n}\n\nstatic CMARK_INLINE bool accepts_lines(cmark_node_type block_type) {\n  return (block_type == CMARK_NODE_PARAGRAPH ||\n          block_type == CMARK_NODE_HEADING ||\n          block_type == CMARK_NODE_CODE_BLOCK);\n}\n\nstatic CMARK_INLINE bool contains_inlines(cmark_node_type block_type) {\n  return (block_type == CMARK_NODE_PARAGRAPH ||\n          block_type == CMARK_NODE_HEADING);\n}\n\nstatic void add_line(cmark_node *node, cmark_chunk *ch, cmark_parser *parser) {\n  int chars_to_tab;\n  int i;\n  assert(node->flags & CMARK_NODE__OPEN);\n  if (parser->partially_consumed_tab) {\n    parser->offset += 1; // skip over tab\n    // add space characters:\n    chars_to_tab = TAB_STOP - (parser->column % TAB_STOP);\n    for (i = 0; i < chars_to_tab; i++) {\n      cmark_strbuf_putc(&node->content, ' ');\n    }\n  }\n  cmark_strbuf_put(&node->content, ch->data + parser->offset,\n                   ch->len - parser->offset);\n}\n\nstatic void remove_trailing_blank_lines(cmark_strbuf *ln) {\n  bufsize_t i;\n  unsigned char c;\n\n  for (i = ln->size - 1; i >= 0; --i) {\n    c = ln->ptr[i];\n\n    if (c != ' ' && c != '\\t' && !S_is_line_end_char(c))\n      break;\n  }\n\n  if (i < 0) {\n    cmark_strbuf_clear(ln);\n    return;\n  }\n\n  for (; i < ln->size; ++i) {\n    c = ln->ptr[i];\n\n    if (!S_is_line_end_char(c))\n      continue;\n\n    cmark_strbuf_truncate(ln, i);\n    break;\n  }\n}\n\n// Check to see if a node ends with a blank line, descending\n// if needed into lists and sublists.\nstatic bool S_ends_with_blank_line(cmark_node *node) {\n  if (S_last_line_checked(node)) {\n    return(S_last_line_blank(node));\n  } else if ((S_type(node) == CMARK_NODE_LIST ||\n              S_type(node) == CMARK_NODE_ITEM) && node->last_child) {\n    S_set_last_line_checked(node);\n    return(S_ends_with_blank_line(node->last_child));\n  } else {\n    S_set_last_line_checked(node);\n    return (S_last_line_blank(node));\n  }\n}\n\n// returns true if content remains after link defs are resolved.\nstatic bool resolve_reference_link_definitions(\n\t\tcmark_parser *parser,\n                cmark_node *b) {\n  bufsize_t pos;\n  cmark_strbuf *node_content = &b->content;\n  cmark_chunk chunk = {node_content->ptr, node_content->size, 0};\n  while (chunk.len && chunk.data[0] == '[' &&\n         (pos = cmark_parse_reference_inline(parser->mem, &chunk,\n\t\t\t\t\t     parser->refmap))) {\n\n    chunk.data += pos;\n    chunk.len -= pos;\n  }\n  cmark_strbuf_drop(node_content, (node_content->size - chunk.len));\n  return !is_blank(&b->content, 0);\n}\n\nstatic cmark_node *finalize(cmark_parser *parser, cmark_node *b) {\n  bufsize_t pos;\n  cmark_node *item;\n  cmark_node *subitem;\n  cmark_node *parent;\n  bool has_content;\n\n  parent = b->parent;\n  assert(b->flags &\n         CMARK_NODE__OPEN); // shouldn't call finalize on closed blocks\n  b->flags &= ~CMARK_NODE__OPEN;\n\n  if (parser->curline.size == 0) {\n    // end of input - line number has not been incremented\n    b->end_line = parser->line_number;\n    b->end_column = parser->last_line_length;\n  } else if (S_type(b) == CMARK_NODE_DOCUMENT ||\n             (S_type(b) == CMARK_NODE_CODE_BLOCK && b->as.code.fenced) ||\n             (S_type(b) == CMARK_NODE_HEADING && b->as.heading.setext)) {\n    b->end_line = parser->line_number;\n    b->end_column = parser->curline.size;\n    if (b->end_column && parser->curline.ptr[b->end_column - 1] == '\\n')\n      b->end_column -= 1;\n    if (b->end_column && parser->curline.ptr[b->end_column - 1] == '\\r')\n      b->end_column -= 1;\n  } else {\n    b->end_line = parser->line_number - 1;\n    b->end_column = parser->last_line_length;\n  }\n\n  cmark_strbuf *node_content = &b->content;\n\n  switch (S_type(b)) {\n  case CMARK_NODE_PARAGRAPH:\n  {\n    has_content = resolve_reference_link_definitions(parser, b);\n    if (!has_content) {\n      // remove blank node (former reference def)\n      cmark_node_free(b);\n    }\n    break;\n  }\n\n  case CMARK_NODE_CODE_BLOCK:\n    if (!b->as.code.fenced) { // indented code\n      remove_trailing_blank_lines(node_content);\n      cmark_strbuf_putc(node_content, '\\n');\n    } else {\n      // first line of contents becomes info\n      for (pos = 0; pos < node_content->size; ++pos) {\n        if (S_is_line_end_char(node_content->ptr[pos]))\n          break;\n      }\n      assert(pos < node_content->size);\n\n      cmark_strbuf tmp = CMARK_BUF_INIT(parser->mem);\n      houdini_unescape_html_f(&tmp, node_content->ptr, pos);\n      cmark_strbuf_trim(&tmp);\n      cmark_strbuf_unescape(&tmp);\n      b->as.code.info = cmark_chunk_buf_detach(&tmp);\n\n      if (node_content->ptr[pos] == '\\r')\n        pos += 1;\n      if (node_content->ptr[pos] == '\\n')\n        pos += 1;\n      cmark_strbuf_drop(node_content, pos);\n    }\n    b->as.code.literal = cmark_chunk_buf_detach(node_content);\n    break;\n\n  case CMARK_NODE_HTML_BLOCK:\n    b->as.literal = cmark_chunk_buf_detach(node_content);\n    break;\n\n  case CMARK_NODE_LIST:      // determine tight/loose status\n    b->as.list.tight = true; // tight by default\n    item = b->first_child;\n\n    while (item) {\n      // check for non-final non-empty list item ending with blank line:\n      if (S_last_line_blank(item) && item->next) {\n        b->as.list.tight = false;\n        break;\n      }\n      // recurse into children of list item, to see if there are\n      // spaces between them:\n      subitem = item->first_child;\n      while (subitem) {\n        if ((item->next || subitem->next) &&\n            S_ends_with_blank_line(subitem)) {\n          b->as.list.tight = false;\n          break;\n        }\n        subitem = subitem->next;\n      }\n      if (!(b->as.list.tight)) {\n        break;\n      }\n      item = item->next;\n    }\n\n    break;\n\n  default:\n    break;\n  }\n\n  return parent;\n}\n\n// Add a node as child of another.  Return pointer to child.\nstatic cmark_node *add_child(cmark_parser *parser, cmark_node *parent,\n                             cmark_node_type block_type, int start_column) {\n  assert(parent);\n\n  // if 'parent' isn't the kind of node that can accept this child,\n  // then back up til we hit a node that can.\n  while (!can_contain(S_type(parent), block_type)) {\n    parent = finalize(parser, parent);\n  }\n\n  cmark_node *child =\n      make_block(parser->mem, block_type, parser->line_number, start_column);\n  child->parent = parent;\n\n  if (parent->last_child) {\n    parent->last_child->next = child;\n    child->prev = parent->last_child;\n  } else {\n    parent->first_child = child;\n    child->prev = NULL;\n  }\n  parent->last_child = child;\n  return child;\n}\n\n// Walk through node and all children, recursively, parsing\n// string content into inline content where appropriate.\nstatic void process_inlines(cmark_mem *mem, cmark_node *root,\n                            cmark_reference_map *refmap, int options) {\n  cmark_iter *iter = cmark_iter_new(root);\n  cmark_node *cur;\n  cmark_event_type ev_type;\n\n  while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {\n    cur = cmark_iter_get_node(iter);\n    if (ev_type == CMARK_EVENT_ENTER) {\n      if (contains_inlines(S_type(cur))) {\n        cmark_parse_inlines(mem, cur, refmap, options);\n      }\n    }\n  }\n\n  cmark_iter_free(iter);\n}\n\n// Attempts to parse a list item marker (bullet or enumerated).\n// On success, returns length of the marker, and populates\n// data with the details.  On failure, returns 0.\nstatic bufsize_t parse_list_marker(cmark_mem *mem, cmark_chunk *input,\n                                   bufsize_t pos, bool interrupts_paragraph,\n                                   cmark_list **dataptr) {\n  unsigned char c;\n  bufsize_t startpos;\n  cmark_list *data;\n  bufsize_t i;\n\n  startpos = pos;\n  c = peek_at(input, pos);\n\n  if (c == '*' || c == '-' || c == '+') {\n    pos++;\n    if (!cmark_isspace(peek_at(input, pos))) {\n      return 0;\n    }\n\n    if (interrupts_paragraph) {\n      i = pos;\n      // require non-blank content after list marker:\n      while (S_is_space_or_tab(peek_at(input, i))) {\n        i++;\n      }\n      if (peek_at(input, i) == '\\n') {\n        return 0;\n      }\n    }\n\n    data = (cmark_list *)mem->calloc(1, sizeof(*data));\n    data->marker_offset = 0; // will be adjusted later\n    data->list_type = CMARK_BULLET_LIST;\n    data->bullet_char = c;\n    data->start = 0;\n    data->delimiter = CMARK_NO_DELIM;\n    data->tight = false;\n  } else if (cmark_isdigit(c)) {\n    int start = 0;\n    int digits = 0;\n\n    do {\n      start = (10 * start) + (peek_at(input, pos) - '0');\n      pos++;\n      digits++;\n      // We limit to 9 digits to avoid overflow,\n      // assuming max int is 2^31 - 1\n      // This also seems to be the limit for 'start' in some browsers.\n    } while (digits < 9 && cmark_isdigit(peek_at(input, pos)));\n\n    if (interrupts_paragraph && start != 1) {\n      return 0;\n    }\n    c = peek_at(input, pos);\n    if (c == '.' || c == ')') {\n      pos++;\n      if (!cmark_isspace(peek_at(input, pos))) {\n        return 0;\n      }\n      if (interrupts_paragraph) {\n        // require non-blank content after list marker:\n        i = pos;\n        while (S_is_space_or_tab(peek_at(input, i))) {\n          i++;\n        }\n        if (S_is_line_end_char(peek_at(input, i))) {\n          return 0;\n        }\n      }\n\n      data = (cmark_list *)mem->calloc(1, sizeof(*data));\n      data->marker_offset = 0; // will be adjusted later\n      data->list_type = CMARK_ORDERED_LIST;\n      data->bullet_char = 0;\n      data->start = start;\n      data->delimiter = (c == '.' ? CMARK_PERIOD_DELIM : CMARK_PAREN_DELIM);\n      data->tight = false;\n    } else {\n      return 0;\n    }\n  } else {\n    return 0;\n  }\n\n  *dataptr = data;\n  return (pos - startpos);\n}\n\n// Return 1 if list item belongs in list, else 0.\nstatic int lists_match(cmark_list *list_data, cmark_list *item_data) {\n  return (list_data->list_type == item_data->list_type &&\n          list_data->delimiter == item_data->delimiter &&\n          // list_data->marker_offset == item_data.marker_offset &&\n          list_data->bullet_char == item_data->bullet_char);\n}\n\nstatic cmark_node *finalize_document(cmark_parser *parser) {\n  while (parser->current != parser->root) {\n    parser->current = finalize(parser, parser->current);\n  }\n\n  finalize(parser, parser->root);\n  process_inlines(parser->mem, parser->root, parser->refmap, parser->options);\n\n  return parser->root;\n}\n\ncmark_node *cmark_parse_file(FILE *f, int options) {\n  unsigned char buffer[4096];\n  cmark_parser *parser = cmark_parser_new(options);\n  size_t bytes;\n  cmark_node *document;\n\n  while ((bytes = fread(buffer, 1, sizeof(buffer), f)) > 0) {\n    bool eof = bytes < sizeof(buffer);\n    S_parser_feed(parser, buffer, bytes, eof);\n    if (eof) {\n      break;\n    }\n  }\n\n  document = cmark_parser_finish(parser);\n  cmark_parser_free(parser);\n  return document;\n}\n\ncmark_node *cmark_parse_document(const char *buffer, size_t len, int options) {\n  cmark_parser *parser = cmark_parser_new(options);\n  cmark_node *document;\n\n  S_parser_feed(parser, (const unsigned char *)buffer, len, true);\n\n  document = cmark_parser_finish(parser);\n  cmark_parser_free(parser);\n  return document;\n}\n\nvoid cmark_parser_feed(cmark_parser *parser, const char *buffer, size_t len) {\n  S_parser_feed(parser, (const unsigned char *)buffer, len, false);\n}\n\nstatic void S_parser_feed(cmark_parser *parser, const unsigned char *buffer,\n                          size_t len, bool eof) {\n  const unsigned char *end = buffer + len;\n  static const uint8_t repl[] = {239, 191, 189};\n\n  if (parser->last_buffer_ended_with_cr && *buffer == '\\n') {\n    // skip NL if last buffer ended with CR ; see #117\n    buffer++;\n  }\n  parser->last_buffer_ended_with_cr = false;\n  while (buffer < end) {\n    const unsigned char *eol;\n    bufsize_t chunk_len;\n    bool process = false;\n    for (eol = buffer; eol < end; ++eol) {\n      if (S_is_line_end_char(*eol)) {\n        process = true;\n        break;\n      }\n      if (*eol == '\\0' && eol < end) {\n        break;\n      }\n    }\n    if (eol >= end && eof) {\n      process = true;\n    }\n\n    chunk_len = (eol - buffer);\n    if (process) {\n      if (parser->linebuf.size > 0) {\n        cmark_strbuf_put(&parser->linebuf, buffer, chunk_len);\n        S_process_line(parser, parser->linebuf.ptr, parser->linebuf.size);\n        cmark_strbuf_clear(&parser->linebuf);\n      } else {\n        S_process_line(parser, buffer, chunk_len);\n      }\n    } else {\n      if (eol < end && *eol == '\\0') {\n        // omit NULL byte\n        cmark_strbuf_put(&parser->linebuf, buffer, chunk_len);\n        // add replacement character\n        cmark_strbuf_put(&parser->linebuf, repl, 3);\n      } else {\n        cmark_strbuf_put(&parser->linebuf, buffer, chunk_len);\n      }\n    }\n\n    buffer += chunk_len;\n    if (buffer < end) {\n      if (*buffer == '\\0') {\n        // skip over NULL\n        buffer++;\n      } else {\n        // skip over line ending characters\n        if (*buffer == '\\r') {\n          buffer++;\n          if (buffer == end)\n            parser->last_buffer_ended_with_cr = true;\n        }\n        if (buffer < end && *buffer == '\\n')\n          buffer++;\n      }\n    }\n  }\n}\n\nstatic void chop_trailing_hashtags(cmark_chunk *ch) {\n  bufsize_t n, orig_n;\n\n  cmark_chunk_rtrim(ch);\n  orig_n = n = ch->len - 1;\n\n  // if string ends in space followed by #s, remove these:\n  while (n >= 0 && peek_at(ch, n) == '#')\n    n--;\n\n  // Check for a space before the final #s:\n  if (n != orig_n && n >= 0 && S_is_space_or_tab(peek_at(ch, n))) {\n    ch->len = n;\n    cmark_chunk_rtrim(ch);\n  }\n}\n\n// Check for thematic break.  On failure, return 0 and update\n// thematic_break_kill_pos with the index at which the\n// parse fails.  On success, return length of match.\n// \"...three or more hyphens, asterisks,\n// or underscores on a line by themselves. If you wish, you may use\n// spaces between the hyphens or asterisks.\"\nstatic int S_scan_thematic_break(cmark_parser *parser, cmark_chunk *input,\n                                 bufsize_t offset) {\n  bufsize_t i;\n  char c;\n  char nextc = '\\0';\n  int count;\n  i = offset;\n  c = peek_at(input, i);\n  if (!(c == '*' || c == '_' || c == '-')) {\n    parser->thematic_break_kill_pos = i;\n    return 0;\n  }\n  count = 1;\n  while ((nextc = peek_at(input, ++i))) {\n    if (nextc == c) {\n      count++;\n    } else if (nextc != ' ' && nextc != '\\t') {\n      break;\n    }\n  }\n  if (count >= 3 && (nextc == '\\r' || nextc == '\\n')) {\n    return (i - offset) + 1;\n  } else {\n    parser->thematic_break_kill_pos = i;\n    return 0;\n  }\n}\n\n// Find first nonspace character from current offset, setting\n// parser->first_nonspace, parser->first_nonspace_column,\n// parser->indent, and parser->blank. Does not advance parser->offset.\nstatic void S_find_first_nonspace(cmark_parser *parser, cmark_chunk *input) {\n  char c;\n  int chars_to_tab = TAB_STOP - (parser->column % TAB_STOP);\n\n  if (parser->first_nonspace <= parser->offset) {\n    parser->first_nonspace = parser->offset;\n    parser->first_nonspace_column = parser->column;\n    while ((c = peek_at(input, parser->first_nonspace))) {\n      if (c == ' ') {\n        parser->first_nonspace += 1;\n        parser->first_nonspace_column += 1;\n        chars_to_tab = chars_to_tab - 1;\n        if (chars_to_tab == 0) {\n          chars_to_tab = TAB_STOP;\n        }\n      } else if (c == '\\t') {\n        parser->first_nonspace += 1;\n        parser->first_nonspace_column += chars_to_tab;\n        chars_to_tab = TAB_STOP;\n      } else {\n        break;\n      }\n    }\n  }\n\n  parser->indent = parser->first_nonspace_column - parser->column;\n  parser->blank = S_is_line_end_char(peek_at(input, parser->first_nonspace));\n}\n\n// Advance parser->offset and parser->column.  parser->offset is the\n// byte position in input; parser->column is a virtual column number\n// that takes into account tabs. (Multibyte characters are not taken\n// into account, because the Markdown line prefixes we are interested in\n// analyzing are entirely ASCII.)  The count parameter indicates\n// how far to advance the offset.  If columns is true, then count\n// indicates a number of columns; otherwise, a number of bytes.\n// If advancing a certain number of columns partially consumes\n// a tab character, parser->partially_consumed_tab is set to true.\nstatic void S_advance_offset(cmark_parser *parser, cmark_chunk *input,\n                             bufsize_t count, bool columns) {\n  char c;\n  int chars_to_tab;\n  int chars_to_advance;\n  while (count > 0 && (c = peek_at(input, parser->offset))) {\n    if (c == '\\t') {\n      chars_to_tab = TAB_STOP - (parser->column % TAB_STOP);\n      if (columns) {\n        parser->partially_consumed_tab = chars_to_tab > count;\n        chars_to_advance = MIN(count, chars_to_tab);\n        parser->column += chars_to_advance;\n        parser->offset += (parser->partially_consumed_tab ? 0 : 1);\n        count -= chars_to_advance;\n      } else {\n        parser->partially_consumed_tab = false;\n        parser->column += chars_to_tab;\n        parser->offset += 1;\n        count -= 1;\n      }\n    } else {\n      parser->partially_consumed_tab = false;\n      parser->offset += 1;\n      parser->column += 1; // assume ascii; block starts are ascii\n      count -= 1;\n    }\n  }\n}\n\nstatic bool S_last_child_is_open(cmark_node *container) {\n  return container->last_child &&\n         (container->last_child->flags & CMARK_NODE__OPEN);\n}\n\nstatic bool parse_block_quote_prefix(cmark_parser *parser, cmark_chunk *input) {\n  bool res = false;\n  bufsize_t matched = 0;\n\n  matched =\n      parser->indent <= 3 && peek_at(input, parser->first_nonspace) == '>';\n  if (matched) {\n\n    S_advance_offset(parser, input, parser->indent + 1, true);\n\n    if (S_is_space_or_tab(peek_at(input, parser->offset))) {\n      S_advance_offset(parser, input, 1, true);\n    }\n\n    res = true;\n  }\n  return res;\n}\n\nstatic bool parse_node_item_prefix(cmark_parser *parser, cmark_chunk *input,\n                                   cmark_node *container) {\n  bool res = false;\n\n  if (parser->indent >=\n      container->as.list.marker_offset + container->as.list.padding) {\n    S_advance_offset(parser, input, container->as.list.marker_offset +\n                                        container->as.list.padding,\n                     true);\n    res = true;\n  } else if (parser->blank && container->first_child != NULL) {\n    // if container->first_child is NULL, then the opening line\n    // of the list item was blank after the list marker; in this\n    // case, we are done with the list item.\n    S_advance_offset(parser, input, parser->first_nonspace - parser->offset,\n                     false);\n    res = true;\n  }\n  return res;\n}\n\nstatic bool parse_code_block_prefix(cmark_parser *parser, cmark_chunk *input,\n                                    cmark_node *container,\n                                    bool *should_continue) {\n  bool res = false;\n\n  if (!container->as.code.fenced) { // indented\n    if (parser->indent >= CODE_INDENT) {\n      S_advance_offset(parser, input, CODE_INDENT, true);\n      res = true;\n    } else if (parser->blank) {\n      S_advance_offset(parser, input, parser->first_nonspace - parser->offset,\n                       false);\n      res = true;\n    }\n  } else { // fenced\n    bufsize_t matched = 0;\n\n    if (parser->indent <= 3 && (peek_at(input, parser->first_nonspace) ==\n                                container->as.code.fence_char)) {\n      matched = scan_close_code_fence(input, parser->first_nonspace);\n    }\n\n    if (matched >= container->as.code.fence_length) {\n      // closing fence - and since we're at\n      // the end of a line, we can stop processing it:\n      *should_continue = false;\n      S_advance_offset(parser, input, matched, false);\n      parser->current = finalize(parser, container);\n    } else {\n      // skip opt. spaces of fence parser->offset\n      int i = container->as.code.fence_offset;\n\n      while (i > 0 && S_is_space_or_tab(peek_at(input, parser->offset))) {\n        S_advance_offset(parser, input, 1, true);\n        i--;\n      }\n      res = true;\n    }\n  }\n\n  return res;\n}\n\nstatic bool parse_html_block_prefix(cmark_parser *parser,\n                                    cmark_node *container) {\n  bool res = false;\n  int html_block_type = container->as.html_block_type;\n\n  assert(html_block_type >= 1 && html_block_type <= 7);\n  switch (html_block_type) {\n  case 1:\n  case 2:\n  case 3:\n  case 4:\n  case 5:\n    // these types of blocks can accept blanks\n    res = true;\n    break;\n  case 6:\n  case 7:\n    res = !parser->blank;\n    break;\n  }\n\n  return res;\n}\n\n/**\n * For each containing node, try to parse the associated line start.\n *\n * Will not close unmatched blocks, as we may have a lazy continuation\n * line -> http://spec.commonmark.org/0.24/#lazy-continuation-line\n *\n * Returns: The last matching node, or NULL\n */\nstatic cmark_node *check_open_blocks(cmark_parser *parser, cmark_chunk *input,\n                                     bool *all_matched) {\n  bool should_continue = true;\n  *all_matched = false;\n  cmark_node *container = parser->root;\n  cmark_node_type cont_type;\n\n  while (S_last_child_is_open(container)) {\n    container = container->last_child;\n    cont_type = S_type(container);\n\n    S_find_first_nonspace(parser, input);\n\n    switch (cont_type) {\n    case CMARK_NODE_BLOCK_QUOTE:\n      if (!parse_block_quote_prefix(parser, input))\n        goto done;\n      break;\n    case CMARK_NODE_ITEM:\n      if (!parse_node_item_prefix(parser, input, container))\n        goto done;\n      break;\n    case CMARK_NODE_CODE_BLOCK:\n      if (!parse_code_block_prefix(parser, input, container, &should_continue))\n        goto done;\n      break;\n    case CMARK_NODE_HEADING:\n      // a heading can never contain more than one line\n      goto done;\n    case CMARK_NODE_HTML_BLOCK:\n      if (!parse_html_block_prefix(parser, container))\n        goto done;\n      break;\n    case CMARK_NODE_PARAGRAPH:\n      if (parser->blank)\n        goto done;\n      break;\n    default:\n      break;\n    }\n  }\n\n  *all_matched = true;\n\ndone:\n  if (!*all_matched) {\n    container = container->parent; // back up to last matching node\n  }\n\n  if (!should_continue) {\n    container = NULL;\n  }\n\n  return container;\n}\n\nstatic void open_new_blocks(cmark_parser *parser, cmark_node **container,\n                            cmark_chunk *input, bool all_matched) {\n  bool indented;\n  cmark_list *data = NULL;\n  bool maybe_lazy = S_type(parser->current) == CMARK_NODE_PARAGRAPH;\n  cmark_node_type cont_type = S_type(*container);\n  bufsize_t matched = 0;\n  int lev = 0;\n  bool save_partially_consumed_tab;\n  bool has_content;\n  int save_offset;\n  int save_column;\n\n  while (cont_type != CMARK_NODE_CODE_BLOCK &&\n         cont_type != CMARK_NODE_HTML_BLOCK) {\n\n    S_find_first_nonspace(parser, input);\n    indented = parser->indent >= CODE_INDENT;\n\n    if (!indented && peek_at(input, parser->first_nonspace) == '>') {\n\n      bufsize_t blockquote_startpos = parser->first_nonspace;\n\n      S_advance_offset(parser, input,\n                       parser->first_nonspace + 1 - parser->offset, false);\n      // optional following character\n      if (S_is_space_or_tab(peek_at(input, parser->offset))) {\n        S_advance_offset(parser, input, 1, true);\n      }\n      *container = add_child(parser, *container, CMARK_NODE_BLOCK_QUOTE,\n                             blockquote_startpos + 1);\n\n    } else if (!indented && (matched = scan_atx_heading_start(\n                                 input, parser->first_nonspace))) {\n      bufsize_t hashpos;\n      int level = 0;\n      bufsize_t heading_startpos = parser->first_nonspace;\n\n      S_advance_offset(parser, input,\n                       parser->first_nonspace + matched - parser->offset,\n                       false);\n      *container = add_child(parser, *container, CMARK_NODE_HEADING,\n                             heading_startpos + 1);\n\n      hashpos = cmark_chunk_strchr(input, '#', parser->first_nonspace);\n\n      while (peek_at(input, hashpos) == '#') {\n        level++;\n        hashpos++;\n      }\n\n      (*container)->as.heading.level = level;\n      (*container)->as.heading.setext = false;\n      (*container)->internal_offset = matched;\n\n    } else if (!indented && (matched = scan_open_code_fence(\n                                 input, parser->first_nonspace))) {\n      *container = add_child(parser, *container, CMARK_NODE_CODE_BLOCK,\n                             parser->first_nonspace + 1);\n      (*container)->as.code.fenced = true;\n      (*container)->as.code.fence_char = peek_at(input, parser->first_nonspace);\n      (*container)->as.code.fence_length = (matched > 255) ? 255 : matched;\n      (*container)->as.code.fence_offset =\n          (int8_t)(parser->first_nonspace - parser->offset);\n      (*container)->as.code.info = cmark_chunk_literal(\"\");\n      S_advance_offset(parser, input,\n                       parser->first_nonspace + matched - parser->offset,\n                       false);\n\n    } else if (!indented && ((matched = scan_html_block_start(\n                                  input, parser->first_nonspace)) ||\n                             (cont_type != CMARK_NODE_PARAGRAPH &&\n                              (matched = scan_html_block_start_7(\n                                   input, parser->first_nonspace))))) {\n      *container = add_child(parser, *container, CMARK_NODE_HTML_BLOCK,\n                             parser->first_nonspace + 1);\n      (*container)->as.html_block_type = matched;\n      // note, we don't adjust parser->offset because the tag is part of the\n      // text\n    } else if (!indented && cont_type == CMARK_NODE_PARAGRAPH &&\n               (lev =\n                    scan_setext_heading_line(input, parser->first_nonspace))) {\n      // finalize paragraph, resolving reference links\n      has_content = resolve_reference_link_definitions(parser, *container);\n\n      if (has_content) {\n\n        (*container)->type = (uint16_t)CMARK_NODE_HEADING;\n        (*container)->as.heading.level = lev;\n        (*container)->as.heading.setext = true;\n        S_advance_offset(parser, input, input->len - 1 - parser->offset, false);\n      }\n    } else if (!indented &&\n               !(cont_type == CMARK_NODE_PARAGRAPH && !all_matched) &&\n\t       (parser->thematic_break_kill_pos <= parser->first_nonspace) &&\n               (matched = S_scan_thematic_break(parser, input, parser->first_nonspace))) {\n      // it's only now that we know the line is not part of a setext heading:\n      *container = add_child(parser, *container, CMARK_NODE_THEMATIC_BREAK,\n                             parser->first_nonspace + 1);\n      S_advance_offset(parser, input, input->len - 1 - parser->offset, false);\n    } else if ((!indented || cont_type == CMARK_NODE_LIST) &&\n\t       parser->indent < 4 &&\n               (matched = parse_list_marker(\n                    parser->mem, input, parser->first_nonspace,\n                    (*container)->type == CMARK_NODE_PARAGRAPH, &data))) {\n\n      // Note that we can have new list items starting with >= 4\n      // spaces indent, as long as the list container is still open.\n      int i = 0;\n\n      // compute padding:\n      S_advance_offset(parser, input,\n                       parser->first_nonspace + matched - parser->offset,\n                       false);\n\n      save_partially_consumed_tab = parser->partially_consumed_tab;\n      save_offset = parser->offset;\n      save_column = parser->column;\n\n      while (parser->column - save_column <= 5 &&\n             S_is_space_or_tab(peek_at(input, parser->offset))) {\n        S_advance_offset(parser, input, 1, true);\n      }\n\n      i = parser->column - save_column;\n      if (i >= 5 || i < 1 ||\n          // only spaces after list marker:\n          S_is_line_end_char(peek_at(input, parser->offset))) {\n        data->padding = matched + 1;\n        parser->offset = save_offset;\n        parser->column = save_column;\n        parser->partially_consumed_tab = save_partially_consumed_tab;\n        if (i > 0) {\n          S_advance_offset(parser, input, 1, true);\n        }\n      } else {\n        data->padding = matched + i;\n      }\n\n      // check container; if it's a list, see if this list item\n      // can continue the list; otherwise, create a list container.\n\n      data->marker_offset = parser->indent;\n\n      if (cont_type != CMARK_NODE_LIST ||\n          !lists_match(&((*container)->as.list), data)) {\n        *container = add_child(parser, *container, CMARK_NODE_LIST,\n                               parser->first_nonspace + 1);\n\n        memcpy(&((*container)->as.list), data, sizeof(*data));\n      }\n\n      // add the list item\n      *container = add_child(parser, *container, CMARK_NODE_ITEM,\n                             parser->first_nonspace + 1);\n      /* TODO: static */\n      memcpy(&((*container)->as.list), data, sizeof(*data));\n      parser->mem->free(data);\n    } else if (indented && !maybe_lazy && !parser->blank) {\n      S_advance_offset(parser, input, CODE_INDENT, true);\n      *container = add_child(parser, *container, CMARK_NODE_CODE_BLOCK,\n                             parser->offset + 1);\n      (*container)->as.code.fenced = false;\n      (*container)->as.code.fence_char = 0;\n      (*container)->as.code.fence_length = 0;\n      (*container)->as.code.fence_offset = 0;\n      (*container)->as.code.info = cmark_chunk_literal(\"\");\n\n    } else {\n      break;\n    }\n\n    if (accepts_lines(S_type(*container))) {\n      // if it's a line container, it can't contain other containers\n      break;\n    }\n\n    cont_type = S_type(*container);\n    maybe_lazy = false;\n  }\n}\n\nstatic void add_text_to_container(cmark_parser *parser, cmark_node *container,\n                                  cmark_node *last_matched_container,\n                                  cmark_chunk *input) {\n  cmark_node *tmp;\n  // what remains at parser->offset is a text line.  add the text to the\n  // appropriate container.\n\n  S_find_first_nonspace(parser, input);\n\n  if (parser->blank && container->last_child)\n    S_set_last_line_blank(container->last_child, true);\n\n  // block quote lines are never blank as they start with >\n  // and we don't count blanks in fenced code for purposes of tight/loose\n  // lists or breaking out of lists.  we also don't set last_line_blank\n  // on an empty list item.\n  const cmark_node_type ctype = S_type(container);\n  const bool last_line_blank =\n      (parser->blank && ctype != CMARK_NODE_BLOCK_QUOTE &&\n       ctype != CMARK_NODE_HEADING && ctype != CMARK_NODE_THEMATIC_BREAK &&\n       !(ctype == CMARK_NODE_CODE_BLOCK && container->as.code.fenced) &&\n       !(ctype == CMARK_NODE_ITEM && container->first_child == NULL &&\n         container->start_line == parser->line_number));\n\n  S_set_last_line_blank(container, last_line_blank);\n\n  tmp = container;\n  while (tmp->parent) {\n    S_set_last_line_blank(tmp->parent, false);\n    tmp = tmp->parent;\n  }\n\n  // If the last line processed belonged to a paragraph node,\n  // and we didn't match all of the line prefixes for the open containers,\n  // and we didn't start any new containers,\n  // and the line isn't blank,\n  // then treat this as a \"lazy continuation line\" and add it to\n  // the open paragraph.\n  if (parser->current != last_matched_container &&\n      container == last_matched_container && !parser->blank &&\n      S_type(parser->current) == CMARK_NODE_PARAGRAPH) {\n    add_line(parser->current, input, parser);\n  } else { // not a lazy continuation\n    // Finalize any blocks that were not matched and set cur to container:\n    while (parser->current != last_matched_container) {\n      parser->current = finalize(parser, parser->current);\n      assert(parser->current != NULL);\n    }\n\n    if (S_type(container) == CMARK_NODE_CODE_BLOCK) {\n      add_line(container, input, parser);\n    } else if (S_type(container) == CMARK_NODE_HTML_BLOCK) {\n      add_line(container, input, parser);\n\n      int matches_end_condition;\n      switch (container->as.html_block_type) {\n      case 1:\n        // </script>, </style>, </pre>\n        matches_end_condition =\n            scan_html_block_end_1(input, parser->first_nonspace);\n        break;\n      case 2:\n        // -->\n        matches_end_condition =\n            scan_html_block_end_2(input, parser->first_nonspace);\n        break;\n      case 3:\n        // ?>\n        matches_end_condition =\n            scan_html_block_end_3(input, parser->first_nonspace);\n        break;\n      case 4:\n        // >\n        matches_end_condition =\n            scan_html_block_end_4(input, parser->first_nonspace);\n        break;\n      case 5:\n        // ]]>\n        matches_end_condition =\n            scan_html_block_end_5(input, parser->first_nonspace);\n        break;\n      default:\n        matches_end_condition = 0;\n        break;\n      }\n\n      if (matches_end_condition) {\n        container = finalize(parser, container);\n        assert(parser->current != NULL);\n      }\n    } else if (parser->blank) {\n      // ??? do nothing\n    } else if (accepts_lines(S_type(container))) {\n      if (S_type(container) == CMARK_NODE_HEADING &&\n          container->as.heading.setext == false) {\n        chop_trailing_hashtags(input);\n      }\n      S_advance_offset(parser, input, parser->first_nonspace - parser->offset,\n                       false);\n      add_line(container, input, parser);\n    } else {\n      // create paragraph container for line\n      container = add_child(parser, container, CMARK_NODE_PARAGRAPH,\n                            parser->first_nonspace + 1);\n      S_advance_offset(parser, input, parser->first_nonspace - parser->offset,\n                       false);\n      add_line(container, input, parser);\n    }\n\n    parser->current = container;\n  }\n}\n\n/* See http://spec.commonmark.org/0.24/#phase-1-block-structure */\nstatic void S_process_line(cmark_parser *parser, const unsigned char *buffer,\n                           bufsize_t bytes) {\n  cmark_node *last_matched_container;\n  bool all_matched = true;\n  cmark_node *container;\n  cmark_chunk input;\n\n  if (parser->options & CMARK_OPT_VALIDATE_UTF8)\n    cmark_utf8proc_check(&parser->curline, buffer, bytes);\n  else\n    cmark_strbuf_put(&parser->curline, buffer, bytes);\n\n  bytes = parser->curline.size;\n\n  // ensure line ends with a newline:\n  if (bytes == 0 || !S_is_line_end_char(parser->curline.ptr[bytes - 1]))\n    cmark_strbuf_putc(&parser->curline, '\\n');\n\n  parser->offset = 0;\n  parser->column = 0;\n  parser->first_nonspace = 0;\n  parser->first_nonspace_column = 0;\n  parser->thematic_break_kill_pos = 0;\n  parser->indent = 0;\n  parser->blank = false;\n  parser->partially_consumed_tab = false;\n\n  input.data = parser->curline.ptr;\n  input.len = parser->curline.size;\n  input.alloc = 0;\n\n  parser->line_number++;\n\n  last_matched_container = check_open_blocks(parser, &input, &all_matched);\n\n  if (!last_matched_container)\n    goto finished;\n\n  container = last_matched_container;\n\n  open_new_blocks(parser, &container, &input, all_matched);\n\n  add_text_to_container(parser, container, last_matched_container, &input);\n\nfinished:\n  parser->last_line_length = input.len;\n  if (parser->last_line_length &&\n      input.data[parser->last_line_length - 1] == '\\n')\n    parser->last_line_length -= 1;\n  if (parser->last_line_length &&\n      input.data[parser->last_line_length - 1] == '\\r')\n    parser->last_line_length -= 1;\n\n  cmark_strbuf_clear(&parser->curline);\n}\n\ncmark_node *cmark_parser_finish(cmark_parser *parser) {\n  if (parser->linebuf.size) {\n    S_process_line(parser, parser->linebuf.ptr, parser->linebuf.size);\n    cmark_strbuf_clear(&parser->linebuf);\n  }\n\n  finalize_document(parser);\n\n  cmark_consolidate_text_nodes(parser->root);\n\n  cmark_strbuf_free(&parser->curline);\n\n#if CMARK_DEBUG_NODES\n  if (cmark_node_check(parser->root, stderr)) {\n    abort();\n  }\n#endif\n  return parser->root;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/buffer.c",
    "content": "#include <stdarg.h>\n#include <string.h>\n#include <assert.h>\n#include <string.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <limits.h>\n\n#include \"config.h\"\n#include \"cmark_ctype.h\"\n#include \"buffer.h\"\n\n/* Used as default value for cmark_strbuf->ptr so that people can always\n * assume ptr is non-NULL and zero terminated even for new cmark_strbufs.\n */\nunsigned char cmark_strbuf__initbuf[1];\n\n#ifndef MIN\n#define MIN(x, y) ((x < y) ? x : y)\n#endif\n\nvoid cmark_strbuf_init(cmark_mem *mem, cmark_strbuf *buf,\n                       bufsize_t initial_size) {\n  buf->mem = mem;\n  buf->asize = 0;\n  buf->size = 0;\n  buf->ptr = cmark_strbuf__initbuf;\n\n  if (initial_size > 0)\n    cmark_strbuf_grow(buf, initial_size);\n}\n\nstatic CMARK_INLINE void S_strbuf_grow_by(cmark_strbuf *buf, bufsize_t add) {\n  cmark_strbuf_grow(buf, buf->size + add);\n}\n\nvoid cmark_strbuf_grow(cmark_strbuf *buf, bufsize_t target_size) {\n  assert(target_size > 0);\n\n  if (target_size < buf->asize)\n    return;\n\n  if (target_size > (bufsize_t)(INT32_MAX / 2)) {\n    fprintf(stderr,\n      \"[cmark] cmark_strbuf_grow requests buffer with size > %d, aborting\\n\",\n         (INT32_MAX / 2));\n    abort();\n  }\n\n  /* Oversize the buffer by 50% to guarantee amortized linear time\n   * complexity on append operations. */\n  bufsize_t new_size = target_size + target_size / 2;\n  new_size += 1;\n  new_size = (new_size + 7) & ~7;\n\n  buf->ptr = (unsigned char *)buf->mem->realloc(buf->asize ? buf->ptr : NULL,\n                                                new_size);\n  buf->asize = new_size;\n}\n\nbufsize_t cmark_strbuf_len(const cmark_strbuf *buf) { return buf->size; }\n\nvoid cmark_strbuf_free(cmark_strbuf *buf) {\n  if (!buf)\n    return;\n\n  if (buf->ptr != cmark_strbuf__initbuf)\n    buf->mem->free(buf->ptr);\n\n  cmark_strbuf_init(buf->mem, buf, 0);\n}\n\nvoid cmark_strbuf_clear(cmark_strbuf *buf) {\n  buf->size = 0;\n\n  if (buf->asize > 0)\n    buf->ptr[0] = '\\0';\n}\n\nvoid cmark_strbuf_set(cmark_strbuf *buf, const unsigned char *data,\n                      bufsize_t len) {\n  if (len <= 0 || data == NULL) {\n    cmark_strbuf_clear(buf);\n  } else {\n    if (data != buf->ptr) {\n      if (len >= buf->asize)\n        cmark_strbuf_grow(buf, len);\n      memmove(buf->ptr, data, len);\n    }\n    buf->size = len;\n    buf->ptr[buf->size] = '\\0';\n  }\n}\n\nvoid cmark_strbuf_sets(cmark_strbuf *buf, const char *string) {\n  cmark_strbuf_set(buf, (const unsigned char *)string,\n                   string ? strlen(string) : 0);\n}\n\nvoid cmark_strbuf_putc(cmark_strbuf *buf, int c) {\n  S_strbuf_grow_by(buf, 1);\n  buf->ptr[buf->size++] = (unsigned char)(c & 0xFF);\n  buf->ptr[buf->size] = '\\0';\n}\n\nvoid cmark_strbuf_put(cmark_strbuf *buf, const unsigned char *data,\n                      bufsize_t len) {\n  if (len <= 0)\n    return;\n\n  S_strbuf_grow_by(buf, len);\n  memmove(buf->ptr + buf->size, data, len);\n  buf->size += len;\n  buf->ptr[buf->size] = '\\0';\n}\n\nvoid cmark_strbuf_puts(cmark_strbuf *buf, const char *string) {\n  cmark_strbuf_put(buf, (const unsigned char *)string, strlen(string));\n}\n\nvoid cmark_strbuf_copy_cstr(char *data, bufsize_t datasize,\n                            const cmark_strbuf *buf) {\n  bufsize_t copylen;\n\n  assert(buf);\n  if (!data || datasize <= 0)\n    return;\n\n  data[0] = '\\0';\n\n  if (buf->size == 0 || buf->asize <= 0)\n    return;\n\n  copylen = buf->size;\n  if (copylen > datasize - 1)\n    copylen = datasize - 1;\n  memmove(data, buf->ptr, copylen);\n  data[copylen] = '\\0';\n}\n\nvoid cmark_strbuf_swap(cmark_strbuf *buf_a, cmark_strbuf *buf_b) {\n  cmark_strbuf t = *buf_a;\n  *buf_a = *buf_b;\n  *buf_b = t;\n}\n\nunsigned char *cmark_strbuf_detach(cmark_strbuf *buf) {\n  unsigned char *data = buf->ptr;\n\n  if (buf->asize == 0) {\n    /* return an empty string */\n    return (unsigned char *)buf->mem->calloc(1, 1);\n  }\n\n  cmark_strbuf_init(buf->mem, buf, 0);\n  return data;\n}\n\nint cmark_strbuf_cmp(const cmark_strbuf *a, const cmark_strbuf *b) {\n  int result = memcmp(a->ptr, b->ptr, MIN(a->size, b->size));\n  return (result != 0) ? result\n                       : (a->size < b->size) ? -1 : (a->size > b->size) ? 1 : 0;\n}\n\nbufsize_t cmark_strbuf_strchr(const cmark_strbuf *buf, int c, bufsize_t pos) {\n  if (pos >= buf->size)\n    return -1;\n  if (pos < 0)\n    pos = 0;\n\n  const unsigned char *p =\n      (unsigned char *)memchr(buf->ptr + pos, c, buf->size - pos);\n  if (!p)\n    return -1;\n\n  return (bufsize_t)(p - (const unsigned char *)buf->ptr);\n}\n\nbufsize_t cmark_strbuf_strrchr(const cmark_strbuf *buf, int c, bufsize_t pos) {\n  if (pos < 0 || buf->size == 0)\n    return -1;\n  if (pos >= buf->size)\n    pos = buf->size - 1;\n\n  bufsize_t i;\n  for (i = pos; i >= 0; i--) {\n    if (buf->ptr[i] == (unsigned char)c)\n      return i;\n  }\n\n  return -1;\n}\n\nvoid cmark_strbuf_truncate(cmark_strbuf *buf, bufsize_t len) {\n  if (len < 0)\n    len = 0;\n\n  if (len < buf->size) {\n    buf->size = len;\n    buf->ptr[buf->size] = '\\0';\n  }\n}\n\nvoid cmark_strbuf_drop(cmark_strbuf *buf, bufsize_t n) {\n  if (n > 0) {\n    if (n > buf->size)\n      n = buf->size;\n    buf->size = buf->size - n;\n    if (buf->size)\n      memmove(buf->ptr, buf->ptr + n, buf->size);\n\n    buf->ptr[buf->size] = '\\0';\n  }\n}\n\nvoid cmark_strbuf_rtrim(cmark_strbuf *buf) {\n  if (!buf->size)\n    return;\n\n  while (buf->size > 0) {\n    if (!cmark_isspace(buf->ptr[buf->size - 1]))\n      break;\n\n    buf->size--;\n  }\n\n  buf->ptr[buf->size] = '\\0';\n}\n\nvoid cmark_strbuf_trim(cmark_strbuf *buf) {\n  bufsize_t i = 0;\n\n  if (!buf->size)\n    return;\n\n  while (i < buf->size && cmark_isspace(buf->ptr[i]))\n    i++;\n\n  cmark_strbuf_drop(buf, i);\n\n  cmark_strbuf_rtrim(buf);\n}\n\n// Destructively modify string, collapsing consecutive\n// space and newline characters into a single space.\nvoid cmark_strbuf_normalize_whitespace(cmark_strbuf *s) {\n  bool last_char_was_space = false;\n  bufsize_t r, w;\n\n  for (r = 0, w = 0; r < s->size; ++r) {\n    if (cmark_isspace(s->ptr[r])) {\n      if (!last_char_was_space) {\n        s->ptr[w++] = ' ';\n        last_char_was_space = true;\n      }\n    } else {\n      s->ptr[w++] = s->ptr[r];\n      last_char_was_space = false;\n    }\n  }\n\n  cmark_strbuf_truncate(s, w);\n}\n\n// Destructively unescape a string: remove backslashes before punctuation chars.\nextern void cmark_strbuf_unescape(cmark_strbuf *buf) {\n  bufsize_t r, w;\n\n  for (r = 0, w = 0; r < buf->size; ++r) {\n    if (buf->ptr[r] == '\\\\' && cmark_ispunct(buf->ptr[r + 1]))\n      r++;\n\n    buf->ptr[w++] = buf->ptr[r];\n  }\n\n  cmark_strbuf_truncate(buf, w);\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/buffer.h",
    "content": "#ifndef CMARK_BUFFER_H\n#define CMARK_BUFFER_H\n\n#include <stddef.h>\n#include <stdarg.h>\n#include <string.h>\n#include <limits.h>\n#include <stdint.h>\n#include \"config.h\"\n#include \"cmark.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef int32_t bufsize_t;\n\ntypedef struct {\n  cmark_mem *mem;\n  unsigned char *ptr;\n  bufsize_t asize, size;\n} cmark_strbuf;\n\nextern unsigned char cmark_strbuf__initbuf[];\n\n#define CMARK_BUF_INIT(mem)                                                    \\\n  { mem, cmark_strbuf__initbuf, 0, 0 }\n\n/**\n * Initialize a cmark_strbuf structure.\n *\n * For the cases where CMARK_BUF_INIT cannot be used to do static\n * initialization.\n */\nvoid cmark_strbuf_init(cmark_mem *mem, cmark_strbuf *buf,\n                       bufsize_t initial_size);\n\n/**\n * Grow the buffer to hold at least `target_size` bytes.\n */\nvoid cmark_strbuf_grow(cmark_strbuf *buf, bufsize_t target_size);\n\nvoid cmark_strbuf_free(cmark_strbuf *buf);\nvoid cmark_strbuf_swap(cmark_strbuf *buf_a, cmark_strbuf *buf_b);\n\nbufsize_t cmark_strbuf_len(const cmark_strbuf *buf);\n\nint cmark_strbuf_cmp(const cmark_strbuf *a, const cmark_strbuf *b);\n\nunsigned char *cmark_strbuf_detach(cmark_strbuf *buf);\nvoid cmark_strbuf_copy_cstr(char *data, bufsize_t datasize,\n                            const cmark_strbuf *buf);\n\nstatic CMARK_INLINE const char *cmark_strbuf_cstr(const cmark_strbuf *buf) {\n  return (char *)buf->ptr;\n}\n\n#define cmark_strbuf_at(buf, n) ((buf)->ptr[n])\n\nvoid cmark_strbuf_set(cmark_strbuf *buf, const unsigned char *data,\n                      bufsize_t len);\nvoid cmark_strbuf_sets(cmark_strbuf *buf, const char *string);\nvoid cmark_strbuf_putc(cmark_strbuf *buf, int c);\nvoid cmark_strbuf_put(cmark_strbuf *buf, const unsigned char *data,\n                      bufsize_t len);\nvoid cmark_strbuf_puts(cmark_strbuf *buf, const char *string);\nvoid cmark_strbuf_clear(cmark_strbuf *buf);\n\nbufsize_t cmark_strbuf_strchr(const cmark_strbuf *buf, int c, bufsize_t pos);\nbufsize_t cmark_strbuf_strrchr(const cmark_strbuf *buf, int c, bufsize_t pos);\nvoid cmark_strbuf_drop(cmark_strbuf *buf, bufsize_t n);\nvoid cmark_strbuf_truncate(cmark_strbuf *buf, bufsize_t len);\nvoid cmark_strbuf_rtrim(cmark_strbuf *buf);\nvoid cmark_strbuf_trim(cmark_strbuf *buf);\nvoid cmark_strbuf_normalize_whitespace(cmark_strbuf *s);\nvoid cmark_strbuf_unescape(cmark_strbuf *s);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/case_fold_switch.inc",
    "content": "    switch (c) {\n      case 0x0041:\n        bufpush(0x0061);\n        break;\n      case 0x0042:\n        bufpush(0x0062);\n        break;\n      case 0x0043:\n        bufpush(0x0063);\n        break;\n      case 0x0044:\n        bufpush(0x0064);\n        break;\n      case 0x0045:\n        bufpush(0x0065);\n        break;\n      case 0x0046:\n        bufpush(0x0066);\n        break;\n      case 0x0047:\n        bufpush(0x0067);\n        break;\n      case 0x0048:\n        bufpush(0x0068);\n        break;\n      case 0x0049:\n        bufpush(0x0069);\n        break;\n      case 0x004A:\n        bufpush(0x006A);\n        break;\n      case 0x004B:\n        bufpush(0x006B);\n        break;\n      case 0x004C:\n        bufpush(0x006C);\n        break;\n      case 0x004D:\n        bufpush(0x006D);\n        break;\n      case 0x004E:\n        bufpush(0x006E);\n        break;\n      case 0x004F:\n        bufpush(0x006F);\n        break;\n      case 0x0050:\n        bufpush(0x0070);\n        break;\n      case 0x0051:\n        bufpush(0x0071);\n        break;\n      case 0x0052:\n        bufpush(0x0072);\n        break;\n      case 0x0053:\n        bufpush(0x0073);\n        break;\n      case 0x0054:\n        bufpush(0x0074);\n        break;\n      case 0x0055:\n        bufpush(0x0075);\n        break;\n      case 0x0056:\n        bufpush(0x0076);\n        break;\n      case 0x0057:\n        bufpush(0x0077);\n        break;\n      case 0x0058:\n        bufpush(0x0078);\n        break;\n      case 0x0059:\n        bufpush(0x0079);\n        break;\n      case 0x005A:\n        bufpush(0x007A);\n        break;\n      case 0x00B5:\n        bufpush(0x03BC);\n        break;\n      case 0x00C0:\n        bufpush(0x00E0);\n        break;\n      case 0x00C1:\n        bufpush(0x00E1);\n        break;\n      case 0x00C2:\n        bufpush(0x00E2);\n        break;\n      case 0x00C3:\n        bufpush(0x00E3);\n        break;\n      case 0x00C4:\n        bufpush(0x00E4);\n        break;\n      case 0x00C5:\n        bufpush(0x00E5);\n        break;\n      case 0x00C6:\n        bufpush(0x00E6);\n        break;\n      case 0x00C7:\n        bufpush(0x00E7);\n        break;\n      case 0x00C8:\n        bufpush(0x00E8);\n        break;\n      case 0x00C9:\n        bufpush(0x00E9);\n        break;\n      case 0x00CA:\n        bufpush(0x00EA);\n        break;\n      case 0x00CB:\n        bufpush(0x00EB);\n        break;\n      case 0x00CC:\n        bufpush(0x00EC);\n        break;\n      case 0x00CD:\n        bufpush(0x00ED);\n        break;\n      case 0x00CE:\n        bufpush(0x00EE);\n        break;\n      case 0x00CF:\n        bufpush(0x00EF);\n        break;\n      case 0x00D0:\n        bufpush(0x00F0);\n        break;\n      case 0x00D1:\n        bufpush(0x00F1);\n        break;\n      case 0x00D2:\n        bufpush(0x00F2);\n        break;\n      case 0x00D3:\n        bufpush(0x00F3);\n        break;\n      case 0x00D4:\n        bufpush(0x00F4);\n        break;\n      case 0x00D5:\n        bufpush(0x00F5);\n        break;\n      case 0x00D6:\n        bufpush(0x00F6);\n        break;\n      case 0x00D8:\n        bufpush(0x00F8);\n        break;\n      case 0x00D9:\n        bufpush(0x00F9);\n        break;\n      case 0x00DA:\n        bufpush(0x00FA);\n        break;\n      case 0x00DB:\n        bufpush(0x00FB);\n        break;\n      case 0x00DC:\n        bufpush(0x00FC);\n        break;\n      case 0x00DD:\n        bufpush(0x00FD);\n        break;\n      case 0x00DE:\n        bufpush(0x00FE);\n        break;\n      case 0x00DF:\n        bufpush(0x0073);\n        bufpush(0x0073);\n        break;\n      case 0x0100:\n        bufpush(0x0101);\n        break;\n      case 0x0102:\n        bufpush(0x0103);\n        break;\n      case 0x0104:\n        bufpush(0x0105);\n        break;\n      case 0x0106:\n        bufpush(0x0107);\n        break;\n      case 0x0108:\n        bufpush(0x0109);\n        break;\n      case 0x010A:\n        bufpush(0x010B);\n        break;\n      case 0x010C:\n        bufpush(0x010D);\n        break;\n      case 0x010E:\n        bufpush(0x010F);\n        break;\n      case 0x0110:\n        bufpush(0x0111);\n        break;\n      case 0x0112:\n        bufpush(0x0113);\n        break;\n      case 0x0114:\n        bufpush(0x0115);\n        break;\n      case 0x0116:\n        bufpush(0x0117);\n        break;\n      case 0x0118:\n        bufpush(0x0119);\n        break;\n      case 0x011A:\n        bufpush(0x011B);\n        break;\n      case 0x011C:\n        bufpush(0x011D);\n        break;\n      case 0x011E:\n        bufpush(0x011F);\n        break;\n      case 0x0120:\n        bufpush(0x0121);\n        break;\n      case 0x0122:\n        bufpush(0x0123);\n        break;\n      case 0x0124:\n        bufpush(0x0125);\n        break;\n      case 0x0126:\n        bufpush(0x0127);\n        break;\n      case 0x0128:\n        bufpush(0x0129);\n        break;\n      case 0x012A:\n        bufpush(0x012B);\n        break;\n      case 0x012C:\n        bufpush(0x012D);\n        break;\n      case 0x012E:\n        bufpush(0x012F);\n        break;\n      case 0x0130:\n        bufpush(0x0069);\n        bufpush(0x0307);\n        break;\n      case 0x0132:\n        bufpush(0x0133);\n        break;\n      case 0x0134:\n        bufpush(0x0135);\n        break;\n      case 0x0136:\n        bufpush(0x0137);\n        break;\n      case 0x0139:\n        bufpush(0x013A);\n        break;\n      case 0x013B:\n        bufpush(0x013C);\n        break;\n      case 0x013D:\n        bufpush(0x013E);\n        break;\n      case 0x013F:\n        bufpush(0x0140);\n        break;\n      case 0x0141:\n        bufpush(0x0142);\n        break;\n      case 0x0143:\n        bufpush(0x0144);\n        break;\n      case 0x0145:\n        bufpush(0x0146);\n        break;\n      case 0x0147:\n        bufpush(0x0148);\n        break;\n      case 0x0149:\n        bufpush(0x02BC);\n        bufpush(0x006E);\n        break;\n      case 0x014A:\n        bufpush(0x014B);\n        break;\n      case 0x014C:\n        bufpush(0x014D);\n        break;\n      case 0x014E:\n        bufpush(0x014F);\n        break;\n      case 0x0150:\n        bufpush(0x0151);\n        break;\n      case 0x0152:\n        bufpush(0x0153);\n        break;\n      case 0x0154:\n        bufpush(0x0155);\n        break;\n      case 0x0156:\n        bufpush(0x0157);\n        break;\n      case 0x0158:\n        bufpush(0x0159);\n        break;\n      case 0x015A:\n        bufpush(0x015B);\n        break;\n      case 0x015C:\n        bufpush(0x015D);\n        break;\n      case 0x015E:\n        bufpush(0x015F);\n        break;\n      case 0x0160:\n        bufpush(0x0161);\n        break;\n      case 0x0162:\n        bufpush(0x0163);\n        break;\n      case 0x0164:\n        bufpush(0x0165);\n        break;\n      case 0x0166:\n        bufpush(0x0167);\n        break;\n      case 0x0168:\n        bufpush(0x0169);\n        break;\n      case 0x016A:\n        bufpush(0x016B);\n        break;\n      case 0x016C:\n        bufpush(0x016D);\n        break;\n      case 0x016E:\n        bufpush(0x016F);\n        break;\n      case 0x0170:\n        bufpush(0x0171);\n        break;\n      case 0x0172:\n        bufpush(0x0173);\n        break;\n      case 0x0174:\n        bufpush(0x0175);\n        break;\n      case 0x0176:\n        bufpush(0x0177);\n        break;\n      case 0x0178:\n        bufpush(0x00FF);\n        break;\n      case 0x0179:\n        bufpush(0x017A);\n        break;\n      case 0x017B:\n        bufpush(0x017C);\n        break;\n      case 0x017D:\n        bufpush(0x017E);\n        break;\n      case 0x017F:\n        bufpush(0x0073);\n        break;\n      case 0x0181:\n        bufpush(0x0253);\n        break;\n      case 0x0182:\n        bufpush(0x0183);\n        break;\n      case 0x0184:\n        bufpush(0x0185);\n        break;\n      case 0x0186:\n        bufpush(0x0254);\n        break;\n      case 0x0187:\n        bufpush(0x0188);\n        break;\n      case 0x0189:\n        bufpush(0x0256);\n        break;\n      case 0x018A:\n        bufpush(0x0257);\n        break;\n      case 0x018B:\n        bufpush(0x018C);\n        break;\n      case 0x018E:\n        bufpush(0x01DD);\n        break;\n      case 0x018F:\n        bufpush(0x0259);\n        break;\n      case 0x0190:\n        bufpush(0x025B);\n        break;\n      case 0x0191:\n        bufpush(0x0192);\n        break;\n      case 0x0193:\n        bufpush(0x0260);\n        break;\n      case 0x0194:\n        bufpush(0x0263);\n        break;\n      case 0x0196:\n        bufpush(0x0269);\n        break;\n      case 0x0197:\n        bufpush(0x0268);\n        break;\n      case 0x0198:\n        bufpush(0x0199);\n        break;\n      case 0x019C:\n        bufpush(0x026F);\n        break;\n      case 0x019D:\n        bufpush(0x0272);\n        break;\n      case 0x019F:\n        bufpush(0x0275);\n        break;\n      case 0x01A0:\n        bufpush(0x01A1);\n        break;\n      case 0x01A2:\n        bufpush(0x01A3);\n        break;\n      case 0x01A4:\n        bufpush(0x01A5);\n        break;\n      case 0x01A6:\n        bufpush(0x0280);\n        break;\n      case 0x01A7:\n        bufpush(0x01A8);\n        break;\n      case 0x01A9:\n        bufpush(0x0283);\n        break;\n      case 0x01AC:\n        bufpush(0x01AD);\n        break;\n      case 0x01AE:\n        bufpush(0x0288);\n        break;\n      case 0x01AF:\n        bufpush(0x01B0);\n        break;\n      case 0x01B1:\n        bufpush(0x028A);\n        break;\n      case 0x01B2:\n        bufpush(0x028B);\n        break;\n      case 0x01B3:\n        bufpush(0x01B4);\n        break;\n      case 0x01B5:\n        bufpush(0x01B6);\n        break;\n      case 0x01B7:\n        bufpush(0x0292);\n        break;\n      case 0x01B8:\n        bufpush(0x01B9);\n        break;\n      case 0x01BC:\n        bufpush(0x01BD);\n        break;\n      case 0x01C4:\n        bufpush(0x01C6);\n        break;\n      case 0x01C5:\n        bufpush(0x01C6);\n        break;\n      case 0x01C7:\n        bufpush(0x01C9);\n        break;\n      case 0x01C8:\n        bufpush(0x01C9);\n        break;\n      case 0x01CA:\n        bufpush(0x01CC);\n        break;\n      case 0x01CB:\n        bufpush(0x01CC);\n        break;\n      case 0x01CD:\n        bufpush(0x01CE);\n        break;\n      case 0x01CF:\n        bufpush(0x01D0);\n        break;\n      case 0x01D1:\n        bufpush(0x01D2);\n        break;\n      case 0x01D3:\n        bufpush(0x01D4);\n        break;\n      case 0x01D5:\n        bufpush(0x01D6);\n        break;\n      case 0x01D7:\n        bufpush(0x01D8);\n        break;\n      case 0x01D9:\n        bufpush(0x01DA);\n        break;\n      case 0x01DB:\n        bufpush(0x01DC);\n        break;\n      case 0x01DE:\n        bufpush(0x01DF);\n        break;\n      case 0x01E0:\n        bufpush(0x01E1);\n        break;\n      case 0x01E2:\n        bufpush(0x01E3);\n        break;\n      case 0x01E4:\n        bufpush(0x01E5);\n        break;\n      case 0x01E6:\n        bufpush(0x01E7);\n        break;\n      case 0x01E8:\n        bufpush(0x01E9);\n        break;\n      case 0x01EA:\n        bufpush(0x01EB);\n        break;\n      case 0x01EC:\n        bufpush(0x01ED);\n        break;\n      case 0x01EE:\n        bufpush(0x01EF);\n        break;\n      case 0x01F0:\n        bufpush(0x006A);\n        bufpush(0x030C);\n        break;\n      case 0x01F1:\n        bufpush(0x01F3);\n        break;\n      case 0x01F2:\n        bufpush(0x01F3);\n        break;\n      case 0x01F4:\n        bufpush(0x01F5);\n        break;\n      case 0x01F6:\n        bufpush(0x0195);\n        break;\n      case 0x01F7:\n        bufpush(0x01BF);\n        break;\n      case 0x01F8:\n        bufpush(0x01F9);\n        break;\n      case 0x01FA:\n        bufpush(0x01FB);\n        break;\n      case 0x01FC:\n        bufpush(0x01FD);\n        break;\n      case 0x01FE:\n        bufpush(0x01FF);\n        break;\n      case 0x0200:\n        bufpush(0x0201);\n        break;\n      case 0x0202:\n        bufpush(0x0203);\n        break;\n      case 0x0204:\n        bufpush(0x0205);\n        break;\n      case 0x0206:\n        bufpush(0x0207);\n        break;\n      case 0x0208:\n        bufpush(0x0209);\n        break;\n      case 0x020A:\n        bufpush(0x020B);\n        break;\n      case 0x020C:\n        bufpush(0x020D);\n        break;\n      case 0x020E:\n        bufpush(0x020F);\n        break;\n      case 0x0210:\n        bufpush(0x0211);\n        break;\n      case 0x0212:\n        bufpush(0x0213);\n        break;\n      case 0x0214:\n        bufpush(0x0215);\n        break;\n      case 0x0216:\n        bufpush(0x0217);\n        break;\n      case 0x0218:\n        bufpush(0x0219);\n        break;\n      case 0x021A:\n        bufpush(0x021B);\n        break;\n      case 0x021C:\n        bufpush(0x021D);\n        break;\n      case 0x021E:\n        bufpush(0x021F);\n        break;\n      case 0x0220:\n        bufpush(0x019E);\n        break;\n      case 0x0222:\n        bufpush(0x0223);\n        break;\n      case 0x0224:\n        bufpush(0x0225);\n        break;\n      case 0x0226:\n        bufpush(0x0227);\n        break;\n      case 0x0228:\n        bufpush(0x0229);\n        break;\n      case 0x022A:\n        bufpush(0x022B);\n        break;\n      case 0x022C:\n        bufpush(0x022D);\n        break;\n      case 0x022E:\n        bufpush(0x022F);\n        break;\n      case 0x0230:\n        bufpush(0x0231);\n        break;\n      case 0x0232:\n        bufpush(0x0233);\n        break;\n      case 0x023A:\n        bufpush(0x2C65);\n        break;\n      case 0x023B:\n        bufpush(0x023C);\n        break;\n      case 0x023D:\n        bufpush(0x019A);\n        break;\n      case 0x023E:\n        bufpush(0x2C66);\n        break;\n      case 0x0241:\n        bufpush(0x0242);\n        break;\n      case 0x0243:\n        bufpush(0x0180);\n        break;\n      case 0x0244:\n        bufpush(0x0289);\n        break;\n      case 0x0245:\n        bufpush(0x028C);\n        break;\n      case 0x0246:\n        bufpush(0x0247);\n        break;\n      case 0x0248:\n        bufpush(0x0249);\n        break;\n      case 0x024A:\n        bufpush(0x024B);\n        break;\n      case 0x024C:\n        bufpush(0x024D);\n        break;\n      case 0x024E:\n        bufpush(0x024F);\n        break;\n      case 0x0345:\n        bufpush(0x03B9);\n        break;\n      case 0x0370:\n        bufpush(0x0371);\n        break;\n      case 0x0372:\n        bufpush(0x0373);\n        break;\n      case 0x0376:\n        bufpush(0x0377);\n        break;\n      case 0x037F:\n        bufpush(0x03F3);\n        break;\n      case 0x0386:\n        bufpush(0x03AC);\n        break;\n      case 0x0388:\n        bufpush(0x03AD);\n        break;\n      case 0x0389:\n        bufpush(0x03AE);\n        break;\n      case 0x038A:\n        bufpush(0x03AF);\n        break;\n      case 0x038C:\n        bufpush(0x03CC);\n        break;\n      case 0x038E:\n        bufpush(0x03CD);\n        break;\n      case 0x038F:\n        bufpush(0x03CE);\n        break;\n      case 0x0390:\n        bufpush(0x03B9);\n        bufpush(0x0308);\n        bufpush(0x0301);\n        break;\n      case 0x0391:\n        bufpush(0x03B1);\n        break;\n      case 0x0392:\n        bufpush(0x03B2);\n        break;\n      case 0x0393:\n        bufpush(0x03B3);\n        break;\n      case 0x0394:\n        bufpush(0x03B4);\n        break;\n      case 0x0395:\n        bufpush(0x03B5);\n        break;\n      case 0x0396:\n        bufpush(0x03B6);\n        break;\n      case 0x0397:\n        bufpush(0x03B7);\n        break;\n      case 0x0398:\n        bufpush(0x03B8);\n        break;\n      case 0x0399:\n        bufpush(0x03B9);\n        break;\n      case 0x039A:\n        bufpush(0x03BA);\n        break;\n      case 0x039B:\n        bufpush(0x03BB);\n        break;\n      case 0x039C:\n        bufpush(0x03BC);\n        break;\n      case 0x039D:\n        bufpush(0x03BD);\n        break;\n      case 0x039E:\n        bufpush(0x03BE);\n        break;\n      case 0x039F:\n        bufpush(0x03BF);\n        break;\n      case 0x03A0:\n        bufpush(0x03C0);\n        break;\n      case 0x03A1:\n        bufpush(0x03C1);\n        break;\n      case 0x03A3:\n        bufpush(0x03C3);\n        break;\n      case 0x03A4:\n        bufpush(0x03C4);\n        break;\n      case 0x03A5:\n        bufpush(0x03C5);\n        break;\n      case 0x03A6:\n        bufpush(0x03C6);\n        break;\n      case 0x03A7:\n        bufpush(0x03C7);\n        break;\n      case 0x03A8:\n        bufpush(0x03C8);\n        break;\n      case 0x03A9:\n        bufpush(0x03C9);\n        break;\n      case 0x03AA:\n        bufpush(0x03CA);\n        break;\n      case 0x03AB:\n        bufpush(0x03CB);\n        break;\n      case 0x03B0:\n        bufpush(0x03C5);\n        bufpush(0x0308);\n        bufpush(0x0301);\n        break;\n      case 0x03C2:\n        bufpush(0x03C3);\n        break;\n      case 0x03CF:\n        bufpush(0x03D7);\n        break;\n      case 0x03D0:\n        bufpush(0x03B2);\n        break;\n      case 0x03D1:\n        bufpush(0x03B8);\n        break;\n      case 0x03D5:\n        bufpush(0x03C6);\n        break;\n      case 0x03D6:\n        bufpush(0x03C0);\n        break;\n      case 0x03D8:\n        bufpush(0x03D9);\n        break;\n      case 0x03DA:\n        bufpush(0x03DB);\n        break;\n      case 0x03DC:\n        bufpush(0x03DD);\n        break;\n      case 0x03DE:\n        bufpush(0x03DF);\n        break;\n      case 0x03E0:\n        bufpush(0x03E1);\n        break;\n      case 0x03E2:\n        bufpush(0x03E3);\n        break;\n      case 0x03E4:\n        bufpush(0x03E5);\n        break;\n      case 0x03E6:\n        bufpush(0x03E7);\n        break;\n      case 0x03E8:\n        bufpush(0x03E9);\n        break;\n      case 0x03EA:\n        bufpush(0x03EB);\n        break;\n      case 0x03EC:\n        bufpush(0x03ED);\n        break;\n      case 0x03EE:\n        bufpush(0x03EF);\n        break;\n      case 0x03F0:\n        bufpush(0x03BA);\n        break;\n      case 0x03F1:\n        bufpush(0x03C1);\n        break;\n      case 0x03F4:\n        bufpush(0x03B8);\n        break;\n      case 0x03F5:\n        bufpush(0x03B5);\n        break;\n      case 0x03F7:\n        bufpush(0x03F8);\n        break;\n      case 0x03F9:\n        bufpush(0x03F2);\n        break;\n      case 0x03FA:\n        bufpush(0x03FB);\n        break;\n      case 0x03FD:\n        bufpush(0x037B);\n        break;\n      case 0x03FE:\n        bufpush(0x037C);\n        break;\n      case 0x03FF:\n        bufpush(0x037D);\n        break;\n      case 0x0400:\n        bufpush(0x0450);\n        break;\n      case 0x0401:\n        bufpush(0x0451);\n        break;\n      case 0x0402:\n        bufpush(0x0452);\n        break;\n      case 0x0403:\n        bufpush(0x0453);\n        break;\n      case 0x0404:\n        bufpush(0x0454);\n        break;\n      case 0x0405:\n        bufpush(0x0455);\n        break;\n      case 0x0406:\n        bufpush(0x0456);\n        break;\n      case 0x0407:\n        bufpush(0x0457);\n        break;\n      case 0x0408:\n        bufpush(0x0458);\n        break;\n      case 0x0409:\n        bufpush(0x0459);\n        break;\n      case 0x040A:\n        bufpush(0x045A);\n        break;\n      case 0x040B:\n        bufpush(0x045B);\n        break;\n      case 0x040C:\n        bufpush(0x045C);\n        break;\n      case 0x040D:\n        bufpush(0x045D);\n        break;\n      case 0x040E:\n        bufpush(0x045E);\n        break;\n      case 0x040F:\n        bufpush(0x045F);\n        break;\n      case 0x0410:\n        bufpush(0x0430);\n        break;\n      case 0x0411:\n        bufpush(0x0431);\n        break;\n      case 0x0412:\n        bufpush(0x0432);\n        break;\n      case 0x0413:\n        bufpush(0x0433);\n        break;\n      case 0x0414:\n        bufpush(0x0434);\n        break;\n      case 0x0415:\n        bufpush(0x0435);\n        break;\n      case 0x0416:\n        bufpush(0x0436);\n        break;\n      case 0x0417:\n        bufpush(0x0437);\n        break;\n      case 0x0418:\n        bufpush(0x0438);\n        break;\n      case 0x0419:\n        bufpush(0x0439);\n        break;\n      case 0x041A:\n        bufpush(0x043A);\n        break;\n      case 0x041B:\n        bufpush(0x043B);\n        break;\n      case 0x041C:\n        bufpush(0x043C);\n        break;\n      case 0x041D:\n        bufpush(0x043D);\n        break;\n      case 0x041E:\n        bufpush(0x043E);\n        break;\n      case 0x041F:\n        bufpush(0x043F);\n        break;\n      case 0x0420:\n        bufpush(0x0440);\n        break;\n      case 0x0421:\n        bufpush(0x0441);\n        break;\n      case 0x0422:\n        bufpush(0x0442);\n        break;\n      case 0x0423:\n        bufpush(0x0443);\n        break;\n      case 0x0424:\n        bufpush(0x0444);\n        break;\n      case 0x0425:\n        bufpush(0x0445);\n        break;\n      case 0x0426:\n        bufpush(0x0446);\n        break;\n      case 0x0427:\n        bufpush(0x0447);\n        break;\n      case 0x0428:\n        bufpush(0x0448);\n        break;\n      case 0x0429:\n        bufpush(0x0449);\n        break;\n      case 0x042A:\n        bufpush(0x044A);\n        break;\n      case 0x042B:\n        bufpush(0x044B);\n        break;\n      case 0x042C:\n        bufpush(0x044C);\n        break;\n      case 0x042D:\n        bufpush(0x044D);\n        break;\n      case 0x042E:\n        bufpush(0x044E);\n        break;\n      case 0x042F:\n        bufpush(0x044F);\n        break;\n      case 0x0460:\n        bufpush(0x0461);\n        break;\n      case 0x0462:\n        bufpush(0x0463);\n        break;\n      case 0x0464:\n        bufpush(0x0465);\n        break;\n      case 0x0466:\n        bufpush(0x0467);\n        break;\n      case 0x0468:\n        bufpush(0x0469);\n        break;\n      case 0x046A:\n        bufpush(0x046B);\n        break;\n      case 0x046C:\n        bufpush(0x046D);\n        break;\n      case 0x046E:\n        bufpush(0x046F);\n        break;\n      case 0x0470:\n        bufpush(0x0471);\n        break;\n      case 0x0472:\n        bufpush(0x0473);\n        break;\n      case 0x0474:\n        bufpush(0x0475);\n        break;\n      case 0x0476:\n        bufpush(0x0477);\n        break;\n      case 0x0478:\n        bufpush(0x0479);\n        break;\n      case 0x047A:\n        bufpush(0x047B);\n        break;\n      case 0x047C:\n        bufpush(0x047D);\n        break;\n      case 0x047E:\n        bufpush(0x047F);\n        break;\n      case 0x0480:\n        bufpush(0x0481);\n        break;\n      case 0x048A:\n        bufpush(0x048B);\n        break;\n      case 0x048C:\n        bufpush(0x048D);\n        break;\n      case 0x048E:\n        bufpush(0x048F);\n        break;\n      case 0x0490:\n        bufpush(0x0491);\n        break;\n      case 0x0492:\n        bufpush(0x0493);\n        break;\n      case 0x0494:\n        bufpush(0x0495);\n        break;\n      case 0x0496:\n        bufpush(0x0497);\n        break;\n      case 0x0498:\n        bufpush(0x0499);\n        break;\n      case 0x049A:\n        bufpush(0x049B);\n        break;\n      case 0x049C:\n        bufpush(0x049D);\n        break;\n      case 0x049E:\n        bufpush(0x049F);\n        break;\n      case 0x04A0:\n        bufpush(0x04A1);\n        break;\n      case 0x04A2:\n        bufpush(0x04A3);\n        break;\n      case 0x04A4:\n        bufpush(0x04A5);\n        break;\n      case 0x04A6:\n        bufpush(0x04A7);\n        break;\n      case 0x04A8:\n        bufpush(0x04A9);\n        break;\n      case 0x04AA:\n        bufpush(0x04AB);\n        break;\n      case 0x04AC:\n        bufpush(0x04AD);\n        break;\n      case 0x04AE:\n        bufpush(0x04AF);\n        break;\n      case 0x04B0:\n        bufpush(0x04B1);\n        break;\n      case 0x04B2:\n        bufpush(0x04B3);\n        break;\n      case 0x04B4:\n        bufpush(0x04B5);\n        break;\n      case 0x04B6:\n        bufpush(0x04B7);\n        break;\n      case 0x04B8:\n        bufpush(0x04B9);\n        break;\n      case 0x04BA:\n        bufpush(0x04BB);\n        break;\n      case 0x04BC:\n        bufpush(0x04BD);\n        break;\n      case 0x04BE:\n        bufpush(0x04BF);\n        break;\n      case 0x04C0:\n        bufpush(0x04CF);\n        break;\n      case 0x04C1:\n        bufpush(0x04C2);\n        break;\n      case 0x04C3:\n        bufpush(0x04C4);\n        break;\n      case 0x04C5:\n        bufpush(0x04C6);\n        break;\n      case 0x04C7:\n        bufpush(0x04C8);\n        break;\n      case 0x04C9:\n        bufpush(0x04CA);\n        break;\n      case 0x04CB:\n        bufpush(0x04CC);\n        break;\n      case 0x04CD:\n        bufpush(0x04CE);\n        break;\n      case 0x04D0:\n        bufpush(0x04D1);\n        break;\n      case 0x04D2:\n        bufpush(0x04D3);\n        break;\n      case 0x04D4:\n        bufpush(0x04D5);\n        break;\n      case 0x04D6:\n        bufpush(0x04D7);\n        break;\n      case 0x04D8:\n        bufpush(0x04D9);\n        break;\n      case 0x04DA:\n        bufpush(0x04DB);\n        break;\n      case 0x04DC:\n        bufpush(0x04DD);\n        break;\n      case 0x04DE:\n        bufpush(0x04DF);\n        break;\n      case 0x04E0:\n        bufpush(0x04E1);\n        break;\n      case 0x04E2:\n        bufpush(0x04E3);\n        break;\n      case 0x04E4:\n        bufpush(0x04E5);\n        break;\n      case 0x04E6:\n        bufpush(0x04E7);\n        break;\n      case 0x04E8:\n        bufpush(0x04E9);\n        break;\n      case 0x04EA:\n        bufpush(0x04EB);\n        break;\n      case 0x04EC:\n        bufpush(0x04ED);\n        break;\n      case 0x04EE:\n        bufpush(0x04EF);\n        break;\n      case 0x04F0:\n        bufpush(0x04F1);\n        break;\n      case 0x04F2:\n        bufpush(0x04F3);\n        break;\n      case 0x04F4:\n        bufpush(0x04F5);\n        break;\n      case 0x04F6:\n        bufpush(0x04F7);\n        break;\n      case 0x04F8:\n        bufpush(0x04F9);\n        break;\n      case 0x04FA:\n        bufpush(0x04FB);\n        break;\n      case 0x04FC:\n        bufpush(0x04FD);\n        break;\n      case 0x04FE:\n        bufpush(0x04FF);\n        break;\n      case 0x0500:\n        bufpush(0x0501);\n        break;\n      case 0x0502:\n        bufpush(0x0503);\n        break;\n      case 0x0504:\n        bufpush(0x0505);\n        break;\n      case 0x0506:\n        bufpush(0x0507);\n        break;\n      case 0x0508:\n        bufpush(0x0509);\n        break;\n      case 0x050A:\n        bufpush(0x050B);\n        break;\n      case 0x050C:\n        bufpush(0x050D);\n        break;\n      case 0x050E:\n        bufpush(0x050F);\n        break;\n      case 0x0510:\n        bufpush(0x0511);\n        break;\n      case 0x0512:\n        bufpush(0x0513);\n        break;\n      case 0x0514:\n        bufpush(0x0515);\n        break;\n      case 0x0516:\n        bufpush(0x0517);\n        break;\n      case 0x0518:\n        bufpush(0x0519);\n        break;\n      case 0x051A:\n        bufpush(0x051B);\n        break;\n      case 0x051C:\n        bufpush(0x051D);\n        break;\n      case 0x051E:\n        bufpush(0x051F);\n        break;\n      case 0x0520:\n        bufpush(0x0521);\n        break;\n      case 0x0522:\n        bufpush(0x0523);\n        break;\n      case 0x0524:\n        bufpush(0x0525);\n        break;\n      case 0x0526:\n        bufpush(0x0527);\n        break;\n      case 0x0528:\n        bufpush(0x0529);\n        break;\n      case 0x052A:\n        bufpush(0x052B);\n        break;\n      case 0x052C:\n        bufpush(0x052D);\n        break;\n      case 0x052E:\n        bufpush(0x052F);\n        break;\n      case 0x0531:\n        bufpush(0x0561);\n        break;\n      case 0x0532:\n        bufpush(0x0562);\n        break;\n      case 0x0533:\n        bufpush(0x0563);\n        break;\n      case 0x0534:\n        bufpush(0x0564);\n        break;\n      case 0x0535:\n        bufpush(0x0565);\n        break;\n      case 0x0536:\n        bufpush(0x0566);\n        break;\n      case 0x0537:\n        bufpush(0x0567);\n        break;\n      case 0x0538:\n        bufpush(0x0568);\n        break;\n      case 0x0539:\n        bufpush(0x0569);\n        break;\n      case 0x053A:\n        bufpush(0x056A);\n        break;\n      case 0x053B:\n        bufpush(0x056B);\n        break;\n      case 0x053C:\n        bufpush(0x056C);\n        break;\n      case 0x053D:\n        bufpush(0x056D);\n        break;\n      case 0x053E:\n        bufpush(0x056E);\n        break;\n      case 0x053F:\n        bufpush(0x056F);\n        break;\n      case 0x0540:\n        bufpush(0x0570);\n        break;\n      case 0x0541:\n        bufpush(0x0571);\n        break;\n      case 0x0542:\n        bufpush(0x0572);\n        break;\n      case 0x0543:\n        bufpush(0x0573);\n        break;\n      case 0x0544:\n        bufpush(0x0574);\n        break;\n      case 0x0545:\n        bufpush(0x0575);\n        break;\n      case 0x0546:\n        bufpush(0x0576);\n        break;\n      case 0x0547:\n        bufpush(0x0577);\n        break;\n      case 0x0548:\n        bufpush(0x0578);\n        break;\n      case 0x0549:\n        bufpush(0x0579);\n        break;\n      case 0x054A:\n        bufpush(0x057A);\n        break;\n      case 0x054B:\n        bufpush(0x057B);\n        break;\n      case 0x054C:\n        bufpush(0x057C);\n        break;\n      case 0x054D:\n        bufpush(0x057D);\n        break;\n      case 0x054E:\n        bufpush(0x057E);\n        break;\n      case 0x054F:\n        bufpush(0x057F);\n        break;\n      case 0x0550:\n        bufpush(0x0580);\n        break;\n      case 0x0551:\n        bufpush(0x0581);\n        break;\n      case 0x0552:\n        bufpush(0x0582);\n        break;\n      case 0x0553:\n        bufpush(0x0583);\n        break;\n      case 0x0554:\n        bufpush(0x0584);\n        break;\n      case 0x0555:\n        bufpush(0x0585);\n        break;\n      case 0x0556:\n        bufpush(0x0586);\n        break;\n      case 0x0587:\n        bufpush(0x0565);\n        bufpush(0x0582);\n        break;\n      case 0x10A0:\n        bufpush(0x2D00);\n        break;\n      case 0x10A1:\n        bufpush(0x2D01);\n        break;\n      case 0x10A2:\n        bufpush(0x2D02);\n        break;\n      case 0x10A3:\n        bufpush(0x2D03);\n        break;\n      case 0x10A4:\n        bufpush(0x2D04);\n        break;\n      case 0x10A5:\n        bufpush(0x2D05);\n        break;\n      case 0x10A6:\n        bufpush(0x2D06);\n        break;\n      case 0x10A7:\n        bufpush(0x2D07);\n        break;\n      case 0x10A8:\n        bufpush(0x2D08);\n        break;\n      case 0x10A9:\n        bufpush(0x2D09);\n        break;\n      case 0x10AA:\n        bufpush(0x2D0A);\n        break;\n      case 0x10AB:\n        bufpush(0x2D0B);\n        break;\n      case 0x10AC:\n        bufpush(0x2D0C);\n        break;\n      case 0x10AD:\n        bufpush(0x2D0D);\n        break;\n      case 0x10AE:\n        bufpush(0x2D0E);\n        break;\n      case 0x10AF:\n        bufpush(0x2D0F);\n        break;\n      case 0x10B0:\n        bufpush(0x2D10);\n        break;\n      case 0x10B1:\n        bufpush(0x2D11);\n        break;\n      case 0x10B2:\n        bufpush(0x2D12);\n        break;\n      case 0x10B3:\n        bufpush(0x2D13);\n        break;\n      case 0x10B4:\n        bufpush(0x2D14);\n        break;\n      case 0x10B5:\n        bufpush(0x2D15);\n        break;\n      case 0x10B6:\n        bufpush(0x2D16);\n        break;\n      case 0x10B7:\n        bufpush(0x2D17);\n        break;\n      case 0x10B8:\n        bufpush(0x2D18);\n        break;\n      case 0x10B9:\n        bufpush(0x2D19);\n        break;\n      case 0x10BA:\n        bufpush(0x2D1A);\n        break;\n      case 0x10BB:\n        bufpush(0x2D1B);\n        break;\n      case 0x10BC:\n        bufpush(0x2D1C);\n        break;\n      case 0x10BD:\n        bufpush(0x2D1D);\n        break;\n      case 0x10BE:\n        bufpush(0x2D1E);\n        break;\n      case 0x10BF:\n        bufpush(0x2D1F);\n        break;\n      case 0x10C0:\n        bufpush(0x2D20);\n        break;\n      case 0x10C1:\n        bufpush(0x2D21);\n        break;\n      case 0x10C2:\n        bufpush(0x2D22);\n        break;\n      case 0x10C3:\n        bufpush(0x2D23);\n        break;\n      case 0x10C4:\n        bufpush(0x2D24);\n        break;\n      case 0x10C5:\n        bufpush(0x2D25);\n        break;\n      case 0x10C7:\n        bufpush(0x2D27);\n        break;\n      case 0x10CD:\n        bufpush(0x2D2D);\n        break;\n      case 0x13F8:\n        bufpush(0x13F0);\n        break;\n      case 0x13F9:\n        bufpush(0x13F1);\n        break;\n      case 0x13FA:\n        bufpush(0x13F2);\n        break;\n      case 0x13FB:\n        bufpush(0x13F3);\n        break;\n      case 0x13FC:\n        bufpush(0x13F4);\n        break;\n      case 0x13FD:\n        bufpush(0x13F5);\n        break;\n      case 0x1C80:\n        bufpush(0x0432);\n        break;\n      case 0x1C81:\n        bufpush(0x0434);\n        break;\n      case 0x1C82:\n        bufpush(0x043E);\n        break;\n      case 0x1C83:\n        bufpush(0x0441);\n        break;\n      case 0x1C84:\n        bufpush(0x0442);\n        break;\n      case 0x1C85:\n        bufpush(0x0442);\n        break;\n      case 0x1C86:\n        bufpush(0x044A);\n        break;\n      case 0x1C87:\n        bufpush(0x0463);\n        break;\n      case 0x1C88:\n        bufpush(0xA64B);\n        break;\n      case 0x1E00:\n        bufpush(0x1E01);\n        break;\n      case 0x1E02:\n        bufpush(0x1E03);\n        break;\n      case 0x1E04:\n        bufpush(0x1E05);\n        break;\n      case 0x1E06:\n        bufpush(0x1E07);\n        break;\n      case 0x1E08:\n        bufpush(0x1E09);\n        break;\n      case 0x1E0A:\n        bufpush(0x1E0B);\n        break;\n      case 0x1E0C:\n        bufpush(0x1E0D);\n        break;\n      case 0x1E0E:\n        bufpush(0x1E0F);\n        break;\n      case 0x1E10:\n        bufpush(0x1E11);\n        break;\n      case 0x1E12:\n        bufpush(0x1E13);\n        break;\n      case 0x1E14:\n        bufpush(0x1E15);\n        break;\n      case 0x1E16:\n        bufpush(0x1E17);\n        break;\n      case 0x1E18:\n        bufpush(0x1E19);\n        break;\n      case 0x1E1A:\n        bufpush(0x1E1B);\n        break;\n      case 0x1E1C:\n        bufpush(0x1E1D);\n        break;\n      case 0x1E1E:\n        bufpush(0x1E1F);\n        break;\n      case 0x1E20:\n        bufpush(0x1E21);\n        break;\n      case 0x1E22:\n        bufpush(0x1E23);\n        break;\n      case 0x1E24:\n        bufpush(0x1E25);\n        break;\n      case 0x1E26:\n        bufpush(0x1E27);\n        break;\n      case 0x1E28:\n        bufpush(0x1E29);\n        break;\n      case 0x1E2A:\n        bufpush(0x1E2B);\n        break;\n      case 0x1E2C:\n        bufpush(0x1E2D);\n        break;\n      case 0x1E2E:\n        bufpush(0x1E2F);\n        break;\n      case 0x1E30:\n        bufpush(0x1E31);\n        break;\n      case 0x1E32:\n        bufpush(0x1E33);\n        break;\n      case 0x1E34:\n        bufpush(0x1E35);\n        break;\n      case 0x1E36:\n        bufpush(0x1E37);\n        break;\n      case 0x1E38:\n        bufpush(0x1E39);\n        break;\n      case 0x1E3A:\n        bufpush(0x1E3B);\n        break;\n      case 0x1E3C:\n        bufpush(0x1E3D);\n        break;\n      case 0x1E3E:\n        bufpush(0x1E3F);\n        break;\n      case 0x1E40:\n        bufpush(0x1E41);\n        break;\n      case 0x1E42:\n        bufpush(0x1E43);\n        break;\n      case 0x1E44:\n        bufpush(0x1E45);\n        break;\n      case 0x1E46:\n        bufpush(0x1E47);\n        break;\n      case 0x1E48:\n        bufpush(0x1E49);\n        break;\n      case 0x1E4A:\n        bufpush(0x1E4B);\n        break;\n      case 0x1E4C:\n        bufpush(0x1E4D);\n        break;\n      case 0x1E4E:\n        bufpush(0x1E4F);\n        break;\n      case 0x1E50:\n        bufpush(0x1E51);\n        break;\n      case 0x1E52:\n        bufpush(0x1E53);\n        break;\n      case 0x1E54:\n        bufpush(0x1E55);\n        break;\n      case 0x1E56:\n        bufpush(0x1E57);\n        break;\n      case 0x1E58:\n        bufpush(0x1E59);\n        break;\n      case 0x1E5A:\n        bufpush(0x1E5B);\n        break;\n      case 0x1E5C:\n        bufpush(0x1E5D);\n        break;\n      case 0x1E5E:\n        bufpush(0x1E5F);\n        break;\n      case 0x1E60:\n        bufpush(0x1E61);\n        break;\n      case 0x1E62:\n        bufpush(0x1E63);\n        break;\n      case 0x1E64:\n        bufpush(0x1E65);\n        break;\n      case 0x1E66:\n        bufpush(0x1E67);\n        break;\n      case 0x1E68:\n        bufpush(0x1E69);\n        break;\n      case 0x1E6A:\n        bufpush(0x1E6B);\n        break;\n      case 0x1E6C:\n        bufpush(0x1E6D);\n        break;\n      case 0x1E6E:\n        bufpush(0x1E6F);\n        break;\n      case 0x1E70:\n        bufpush(0x1E71);\n        break;\n      case 0x1E72:\n        bufpush(0x1E73);\n        break;\n      case 0x1E74:\n        bufpush(0x1E75);\n        break;\n      case 0x1E76:\n        bufpush(0x1E77);\n        break;\n      case 0x1E78:\n        bufpush(0x1E79);\n        break;\n      case 0x1E7A:\n        bufpush(0x1E7B);\n        break;\n      case 0x1E7C:\n        bufpush(0x1E7D);\n        break;\n      case 0x1E7E:\n        bufpush(0x1E7F);\n        break;\n      case 0x1E80:\n        bufpush(0x1E81);\n        break;\n      case 0x1E82:\n        bufpush(0x1E83);\n        break;\n      case 0x1E84:\n        bufpush(0x1E85);\n        break;\n      case 0x1E86:\n        bufpush(0x1E87);\n        break;\n      case 0x1E88:\n        bufpush(0x1E89);\n        break;\n      case 0x1E8A:\n        bufpush(0x1E8B);\n        break;\n      case 0x1E8C:\n        bufpush(0x1E8D);\n        break;\n      case 0x1E8E:\n        bufpush(0x1E8F);\n        break;\n      case 0x1E90:\n        bufpush(0x1E91);\n        break;\n      case 0x1E92:\n        bufpush(0x1E93);\n        break;\n      case 0x1E94:\n        bufpush(0x1E95);\n        break;\n      case 0x1E96:\n        bufpush(0x0068);\n        bufpush(0x0331);\n        break;\n      case 0x1E97:\n        bufpush(0x0074);\n        bufpush(0x0308);\n        break;\n      case 0x1E98:\n        bufpush(0x0077);\n        bufpush(0x030A);\n        break;\n      case 0x1E99:\n        bufpush(0x0079);\n        bufpush(0x030A);\n        break;\n      case 0x1E9A:\n        bufpush(0x0061);\n        bufpush(0x02BE);\n        break;\n      case 0x1E9B:\n        bufpush(0x1E61);\n        break;\n      case 0x1E9E:\n        bufpush(0x0073);\n        bufpush(0x0073);\n        break;\n      case 0x1EA0:\n        bufpush(0x1EA1);\n        break;\n      case 0x1EA2:\n        bufpush(0x1EA3);\n        break;\n      case 0x1EA4:\n        bufpush(0x1EA5);\n        break;\n      case 0x1EA6:\n        bufpush(0x1EA7);\n        break;\n      case 0x1EA8:\n        bufpush(0x1EA9);\n        break;\n      case 0x1EAA:\n        bufpush(0x1EAB);\n        break;\n      case 0x1EAC:\n        bufpush(0x1EAD);\n        break;\n      case 0x1EAE:\n        bufpush(0x1EAF);\n        break;\n      case 0x1EB0:\n        bufpush(0x1EB1);\n        break;\n      case 0x1EB2:\n        bufpush(0x1EB3);\n        break;\n      case 0x1EB4:\n        bufpush(0x1EB5);\n        break;\n      case 0x1EB6:\n        bufpush(0x1EB7);\n        break;\n      case 0x1EB8:\n        bufpush(0x1EB9);\n        break;\n      case 0x1EBA:\n        bufpush(0x1EBB);\n        break;\n      case 0x1EBC:\n        bufpush(0x1EBD);\n        break;\n      case 0x1EBE:\n        bufpush(0x1EBF);\n        break;\n      case 0x1EC0:\n        bufpush(0x1EC1);\n        break;\n      case 0x1EC2:\n        bufpush(0x1EC3);\n        break;\n      case 0x1EC4:\n        bufpush(0x1EC5);\n        break;\n      case 0x1EC6:\n        bufpush(0x1EC7);\n        break;\n      case 0x1EC8:\n        bufpush(0x1EC9);\n        break;\n      case 0x1ECA:\n        bufpush(0x1ECB);\n        break;\n      case 0x1ECC:\n        bufpush(0x1ECD);\n        break;\n      case 0x1ECE:\n        bufpush(0x1ECF);\n        break;\n      case 0x1ED0:\n        bufpush(0x1ED1);\n        break;\n      case 0x1ED2:\n        bufpush(0x1ED3);\n        break;\n      case 0x1ED4:\n        bufpush(0x1ED5);\n        break;\n      case 0x1ED6:\n        bufpush(0x1ED7);\n        break;\n      case 0x1ED8:\n        bufpush(0x1ED9);\n        break;\n      case 0x1EDA:\n        bufpush(0x1EDB);\n        break;\n      case 0x1EDC:\n        bufpush(0x1EDD);\n        break;\n      case 0x1EDE:\n        bufpush(0x1EDF);\n        break;\n      case 0x1EE0:\n        bufpush(0x1EE1);\n        break;\n      case 0x1EE2:\n        bufpush(0x1EE3);\n        break;\n      case 0x1EE4:\n        bufpush(0x1EE5);\n        break;\n      case 0x1EE6:\n        bufpush(0x1EE7);\n        break;\n      case 0x1EE8:\n        bufpush(0x1EE9);\n        break;\n      case 0x1EEA:\n        bufpush(0x1EEB);\n        break;\n      case 0x1EEC:\n        bufpush(0x1EED);\n        break;\n      case 0x1EEE:\n        bufpush(0x1EEF);\n        break;\n      case 0x1EF0:\n        bufpush(0x1EF1);\n        break;\n      case 0x1EF2:\n        bufpush(0x1EF3);\n        break;\n      case 0x1EF4:\n        bufpush(0x1EF5);\n        break;\n      case 0x1EF6:\n        bufpush(0x1EF7);\n        break;\n      case 0x1EF8:\n        bufpush(0x1EF9);\n        break;\n      case 0x1EFA:\n        bufpush(0x1EFB);\n        break;\n      case 0x1EFC:\n        bufpush(0x1EFD);\n        break;\n      case 0x1EFE:\n        bufpush(0x1EFF);\n        break;\n      case 0x1F08:\n        bufpush(0x1F00);\n        break;\n      case 0x1F09:\n        bufpush(0x1F01);\n        break;\n      case 0x1F0A:\n        bufpush(0x1F02);\n        break;\n      case 0x1F0B:\n        bufpush(0x1F03);\n        break;\n      case 0x1F0C:\n        bufpush(0x1F04);\n        break;\n      case 0x1F0D:\n        bufpush(0x1F05);\n        break;\n      case 0x1F0E:\n        bufpush(0x1F06);\n        break;\n      case 0x1F0F:\n        bufpush(0x1F07);\n        break;\n      case 0x1F18:\n        bufpush(0x1F10);\n        break;\n      case 0x1F19:\n        bufpush(0x1F11);\n        break;\n      case 0x1F1A:\n        bufpush(0x1F12);\n        break;\n      case 0x1F1B:\n        bufpush(0x1F13);\n        break;\n      case 0x1F1C:\n        bufpush(0x1F14);\n        break;\n      case 0x1F1D:\n        bufpush(0x1F15);\n        break;\n      case 0x1F28:\n        bufpush(0x1F20);\n        break;\n      case 0x1F29:\n        bufpush(0x1F21);\n        break;\n      case 0x1F2A:\n        bufpush(0x1F22);\n        break;\n      case 0x1F2B:\n        bufpush(0x1F23);\n        break;\n      case 0x1F2C:\n        bufpush(0x1F24);\n        break;\n      case 0x1F2D:\n        bufpush(0x1F25);\n        break;\n      case 0x1F2E:\n        bufpush(0x1F26);\n        break;\n      case 0x1F2F:\n        bufpush(0x1F27);\n        break;\n      case 0x1F38:\n        bufpush(0x1F30);\n        break;\n      case 0x1F39:\n        bufpush(0x1F31);\n        break;\n      case 0x1F3A:\n        bufpush(0x1F32);\n        break;\n      case 0x1F3B:\n        bufpush(0x1F33);\n        break;\n      case 0x1F3C:\n        bufpush(0x1F34);\n        break;\n      case 0x1F3D:\n        bufpush(0x1F35);\n        break;\n      case 0x1F3E:\n        bufpush(0x1F36);\n        break;\n      case 0x1F3F:\n        bufpush(0x1F37);\n        break;\n      case 0x1F48:\n        bufpush(0x1F40);\n        break;\n      case 0x1F49:\n        bufpush(0x1F41);\n        break;\n      case 0x1F4A:\n        bufpush(0x1F42);\n        break;\n      case 0x1F4B:\n        bufpush(0x1F43);\n        break;\n      case 0x1F4C:\n        bufpush(0x1F44);\n        break;\n      case 0x1F4D:\n        bufpush(0x1F45);\n        break;\n      case 0x1F50:\n        bufpush(0x03C5);\n        bufpush(0x0313);\n        break;\n      case 0x1F52:\n        bufpush(0x03C5);\n        bufpush(0x0313);\n        bufpush(0x0300);\n        break;\n      case 0x1F54:\n        bufpush(0x03C5);\n        bufpush(0x0313);\n        bufpush(0x0301);\n        break;\n      case 0x1F56:\n        bufpush(0x03C5);\n        bufpush(0x0313);\n        bufpush(0x0342);\n        break;\n      case 0x1F59:\n        bufpush(0x1F51);\n        break;\n      case 0x1F5B:\n        bufpush(0x1F53);\n        break;\n      case 0x1F5D:\n        bufpush(0x1F55);\n        break;\n      case 0x1F5F:\n        bufpush(0x1F57);\n        break;\n      case 0x1F68:\n        bufpush(0x1F60);\n        break;\n      case 0x1F69:\n        bufpush(0x1F61);\n        break;\n      case 0x1F6A:\n        bufpush(0x1F62);\n        break;\n      case 0x1F6B:\n        bufpush(0x1F63);\n        break;\n      case 0x1F6C:\n        bufpush(0x1F64);\n        break;\n      case 0x1F6D:\n        bufpush(0x1F65);\n        break;\n      case 0x1F6E:\n        bufpush(0x1F66);\n        break;\n      case 0x1F6F:\n        bufpush(0x1F67);\n        break;\n      case 0x1F80:\n        bufpush(0x1F00);\n        bufpush(0x03B9);\n        break;\n      case 0x1F81:\n        bufpush(0x1F01);\n        bufpush(0x03B9);\n        break;\n      case 0x1F82:\n        bufpush(0x1F02);\n        bufpush(0x03B9);\n        break;\n      case 0x1F83:\n        bufpush(0x1F03);\n        bufpush(0x03B9);\n        break;\n      case 0x1F84:\n        bufpush(0x1F04);\n        bufpush(0x03B9);\n        break;\n      case 0x1F85:\n        bufpush(0x1F05);\n        bufpush(0x03B9);\n        break;\n      case 0x1F86:\n        bufpush(0x1F06);\n        bufpush(0x03B9);\n        break;\n      case 0x1F87:\n        bufpush(0x1F07);\n        bufpush(0x03B9);\n        break;\n      case 0x1F88:\n        bufpush(0x1F00);\n        bufpush(0x03B9);\n        break;\n      case 0x1F89:\n        bufpush(0x1F01);\n        bufpush(0x03B9);\n        break;\n      case 0x1F8A:\n        bufpush(0x1F02);\n        bufpush(0x03B9);\n        break;\n      case 0x1F8B:\n        bufpush(0x1F03);\n        bufpush(0x03B9);\n        break;\n      case 0x1F8C:\n        bufpush(0x1F04);\n        bufpush(0x03B9);\n        break;\n      case 0x1F8D:\n        bufpush(0x1F05);\n        bufpush(0x03B9);\n        break;\n      case 0x1F8E:\n        bufpush(0x1F06);\n        bufpush(0x03B9);\n        break;\n      case 0x1F8F:\n        bufpush(0x1F07);\n        bufpush(0x03B9);\n        break;\n      case 0x1F90:\n        bufpush(0x1F20);\n        bufpush(0x03B9);\n        break;\n      case 0x1F91:\n        bufpush(0x1F21);\n        bufpush(0x03B9);\n        break;\n      case 0x1F92:\n        bufpush(0x1F22);\n        bufpush(0x03B9);\n        break;\n      case 0x1F93:\n        bufpush(0x1F23);\n        bufpush(0x03B9);\n        break;\n      case 0x1F94:\n        bufpush(0x1F24);\n        bufpush(0x03B9);\n        break;\n      case 0x1F95:\n        bufpush(0x1F25);\n        bufpush(0x03B9);\n        break;\n      case 0x1F96:\n        bufpush(0x1F26);\n        bufpush(0x03B9);\n        break;\n      case 0x1F97:\n        bufpush(0x1F27);\n        bufpush(0x03B9);\n        break;\n      case 0x1F98:\n        bufpush(0x1F20);\n        bufpush(0x03B9);\n        break;\n      case 0x1F99:\n        bufpush(0x1F21);\n        bufpush(0x03B9);\n        break;\n      case 0x1F9A:\n        bufpush(0x1F22);\n        bufpush(0x03B9);\n        break;\n      case 0x1F9B:\n        bufpush(0x1F23);\n        bufpush(0x03B9);\n        break;\n      case 0x1F9C:\n        bufpush(0x1F24);\n        bufpush(0x03B9);\n        break;\n      case 0x1F9D:\n        bufpush(0x1F25);\n        bufpush(0x03B9);\n        break;\n      case 0x1F9E:\n        bufpush(0x1F26);\n        bufpush(0x03B9);\n        break;\n      case 0x1F9F:\n        bufpush(0x1F27);\n        bufpush(0x03B9);\n        break;\n      case 0x1FA0:\n        bufpush(0x1F60);\n        bufpush(0x03B9);\n        break;\n      case 0x1FA1:\n        bufpush(0x1F61);\n        bufpush(0x03B9);\n        break;\n      case 0x1FA2:\n        bufpush(0x1F62);\n        bufpush(0x03B9);\n        break;\n      case 0x1FA3:\n        bufpush(0x1F63);\n        bufpush(0x03B9);\n        break;\n      case 0x1FA4:\n        bufpush(0x1F64);\n        bufpush(0x03B9);\n        break;\n      case 0x1FA5:\n        bufpush(0x1F65);\n        bufpush(0x03B9);\n        break;\n      case 0x1FA6:\n        bufpush(0x1F66);\n        bufpush(0x03B9);\n        break;\n      case 0x1FA7:\n        bufpush(0x1F67);\n        bufpush(0x03B9);\n        break;\n      case 0x1FA8:\n        bufpush(0x1F60);\n        bufpush(0x03B9);\n        break;\n      case 0x1FA9:\n        bufpush(0x1F61);\n        bufpush(0x03B9);\n        break;\n      case 0x1FAA:\n        bufpush(0x1F62);\n        bufpush(0x03B9);\n        break;\n      case 0x1FAB:\n        bufpush(0x1F63);\n        bufpush(0x03B9);\n        break;\n      case 0x1FAC:\n        bufpush(0x1F64);\n        bufpush(0x03B9);\n        break;\n      case 0x1FAD:\n        bufpush(0x1F65);\n        bufpush(0x03B9);\n        break;\n      case 0x1FAE:\n        bufpush(0x1F66);\n        bufpush(0x03B9);\n        break;\n      case 0x1FAF:\n        bufpush(0x1F67);\n        bufpush(0x03B9);\n        break;\n      case 0x1FB2:\n        bufpush(0x1F70);\n        bufpush(0x03B9);\n        break;\n      case 0x1FB3:\n        bufpush(0x03B1);\n        bufpush(0x03B9);\n        break;\n      case 0x1FB4:\n        bufpush(0x03AC);\n        bufpush(0x03B9);\n        break;\n      case 0x1FB6:\n        bufpush(0x03B1);\n        bufpush(0x0342);\n        break;\n      case 0x1FB7:\n        bufpush(0x03B1);\n        bufpush(0x0342);\n        bufpush(0x03B9);\n        break;\n      case 0x1FB8:\n        bufpush(0x1FB0);\n        break;\n      case 0x1FB9:\n        bufpush(0x1FB1);\n        break;\n      case 0x1FBA:\n        bufpush(0x1F70);\n        break;\n      case 0x1FBB:\n        bufpush(0x1F71);\n        break;\n      case 0x1FBC:\n        bufpush(0x03B1);\n        bufpush(0x03B9);\n        break;\n      case 0x1FBE:\n        bufpush(0x03B9);\n        break;\n      case 0x1FC2:\n        bufpush(0x1F74);\n        bufpush(0x03B9);\n        break;\n      case 0x1FC3:\n        bufpush(0x03B7);\n        bufpush(0x03B9);\n        break;\n      case 0x1FC4:\n        bufpush(0x03AE);\n        bufpush(0x03B9);\n        break;\n      case 0x1FC6:\n        bufpush(0x03B7);\n        bufpush(0x0342);\n        break;\n      case 0x1FC7:\n        bufpush(0x03B7);\n        bufpush(0x0342);\n        bufpush(0x03B9);\n        break;\n      case 0x1FC8:\n        bufpush(0x1F72);\n        break;\n      case 0x1FC9:\n        bufpush(0x1F73);\n        break;\n      case 0x1FCA:\n        bufpush(0x1F74);\n        break;\n      case 0x1FCB:\n        bufpush(0x1F75);\n        break;\n      case 0x1FCC:\n        bufpush(0x03B7);\n        bufpush(0x03B9);\n        break;\n      case 0x1FD2:\n        bufpush(0x03B9);\n        bufpush(0x0308);\n        bufpush(0x0300);\n        break;\n      case 0x1FD3:\n        bufpush(0x03B9);\n        bufpush(0x0308);\n        bufpush(0x0301);\n        break;\n      case 0x1FD6:\n        bufpush(0x03B9);\n        bufpush(0x0342);\n        break;\n      case 0x1FD7:\n        bufpush(0x03B9);\n        bufpush(0x0308);\n        bufpush(0x0342);\n        break;\n      case 0x1FD8:\n        bufpush(0x1FD0);\n        break;\n      case 0x1FD9:\n        bufpush(0x1FD1);\n        break;\n      case 0x1FDA:\n        bufpush(0x1F76);\n        break;\n      case 0x1FDB:\n        bufpush(0x1F77);\n        break;\n      case 0x1FE2:\n        bufpush(0x03C5);\n        bufpush(0x0308);\n        bufpush(0x0300);\n        break;\n      case 0x1FE3:\n        bufpush(0x03C5);\n        bufpush(0x0308);\n        bufpush(0x0301);\n        break;\n      case 0x1FE4:\n        bufpush(0x03C1);\n        bufpush(0x0313);\n        break;\n      case 0x1FE6:\n        bufpush(0x03C5);\n        bufpush(0x0342);\n        break;\n      case 0x1FE7:\n        bufpush(0x03C5);\n        bufpush(0x0308);\n        bufpush(0x0342);\n        break;\n      case 0x1FE8:\n        bufpush(0x1FE0);\n        break;\n      case 0x1FE9:\n        bufpush(0x1FE1);\n        break;\n      case 0x1FEA:\n        bufpush(0x1F7A);\n        break;\n      case 0x1FEB:\n        bufpush(0x1F7B);\n        break;\n      case 0x1FEC:\n        bufpush(0x1FE5);\n        break;\n      case 0x1FF2:\n        bufpush(0x1F7C);\n        bufpush(0x03B9);\n        break;\n      case 0x1FF3:\n        bufpush(0x03C9);\n        bufpush(0x03B9);\n        break;\n      case 0x1FF4:\n        bufpush(0x03CE);\n        bufpush(0x03B9);\n        break;\n      case 0x1FF6:\n        bufpush(0x03C9);\n        bufpush(0x0342);\n        break;\n      case 0x1FF7:\n        bufpush(0x03C9);\n        bufpush(0x0342);\n        bufpush(0x03B9);\n        break;\n      case 0x1FF8:\n        bufpush(0x1F78);\n        break;\n      case 0x1FF9:\n        bufpush(0x1F79);\n        break;\n      case 0x1FFA:\n        bufpush(0x1F7C);\n        break;\n      case 0x1FFB:\n        bufpush(0x1F7D);\n        break;\n      case 0x1FFC:\n        bufpush(0x03C9);\n        bufpush(0x03B9);\n        break;\n      case 0x2126:\n        bufpush(0x03C9);\n        break;\n      case 0x212A:\n        bufpush(0x006B);\n        break;\n      case 0x212B:\n        bufpush(0x00E5);\n        break;\n      case 0x2132:\n        bufpush(0x214E);\n        break;\n      case 0x2160:\n        bufpush(0x2170);\n        break;\n      case 0x2161:\n        bufpush(0x2171);\n        break;\n      case 0x2162:\n        bufpush(0x2172);\n        break;\n      case 0x2163:\n        bufpush(0x2173);\n        break;\n      case 0x2164:\n        bufpush(0x2174);\n        break;\n      case 0x2165:\n        bufpush(0x2175);\n        break;\n      case 0x2166:\n        bufpush(0x2176);\n        break;\n      case 0x2167:\n        bufpush(0x2177);\n        break;\n      case 0x2168:\n        bufpush(0x2178);\n        break;\n      case 0x2169:\n        bufpush(0x2179);\n        break;\n      case 0x216A:\n        bufpush(0x217A);\n        break;\n      case 0x216B:\n        bufpush(0x217B);\n        break;\n      case 0x216C:\n        bufpush(0x217C);\n        break;\n      case 0x216D:\n        bufpush(0x217D);\n        break;\n      case 0x216E:\n        bufpush(0x217E);\n        break;\n      case 0x216F:\n        bufpush(0x217F);\n        break;\n      case 0x2183:\n        bufpush(0x2184);\n        break;\n      case 0x24B6:\n        bufpush(0x24D0);\n        break;\n      case 0x24B7:\n        bufpush(0x24D1);\n        break;\n      case 0x24B8:\n        bufpush(0x24D2);\n        break;\n      case 0x24B9:\n        bufpush(0x24D3);\n        break;\n      case 0x24BA:\n        bufpush(0x24D4);\n        break;\n      case 0x24BB:\n        bufpush(0x24D5);\n        break;\n      case 0x24BC:\n        bufpush(0x24D6);\n        break;\n      case 0x24BD:\n        bufpush(0x24D7);\n        break;\n      case 0x24BE:\n        bufpush(0x24D8);\n        break;\n      case 0x24BF:\n        bufpush(0x24D9);\n        break;\n      case 0x24C0:\n        bufpush(0x24DA);\n        break;\n      case 0x24C1:\n        bufpush(0x24DB);\n        break;\n      case 0x24C2:\n        bufpush(0x24DC);\n        break;\n      case 0x24C3:\n        bufpush(0x24DD);\n        break;\n      case 0x24C4:\n        bufpush(0x24DE);\n        break;\n      case 0x24C5:\n        bufpush(0x24DF);\n        break;\n      case 0x24C6:\n        bufpush(0x24E0);\n        break;\n      case 0x24C7:\n        bufpush(0x24E1);\n        break;\n      case 0x24C8:\n        bufpush(0x24E2);\n        break;\n      case 0x24C9:\n        bufpush(0x24E3);\n        break;\n      case 0x24CA:\n        bufpush(0x24E4);\n        break;\n      case 0x24CB:\n        bufpush(0x24E5);\n        break;\n      case 0x24CC:\n        bufpush(0x24E6);\n        break;\n      case 0x24CD:\n        bufpush(0x24E7);\n        break;\n      case 0x24CE:\n        bufpush(0x24E8);\n        break;\n      case 0x24CF:\n        bufpush(0x24E9);\n        break;\n      case 0x2C00:\n        bufpush(0x2C30);\n        break;\n      case 0x2C01:\n        bufpush(0x2C31);\n        break;\n      case 0x2C02:\n        bufpush(0x2C32);\n        break;\n      case 0x2C03:\n        bufpush(0x2C33);\n        break;\n      case 0x2C04:\n        bufpush(0x2C34);\n        break;\n      case 0x2C05:\n        bufpush(0x2C35);\n        break;\n      case 0x2C06:\n        bufpush(0x2C36);\n        break;\n      case 0x2C07:\n        bufpush(0x2C37);\n        break;\n      case 0x2C08:\n        bufpush(0x2C38);\n        break;\n      case 0x2C09:\n        bufpush(0x2C39);\n        break;\n      case 0x2C0A:\n        bufpush(0x2C3A);\n        break;\n      case 0x2C0B:\n        bufpush(0x2C3B);\n        break;\n      case 0x2C0C:\n        bufpush(0x2C3C);\n        break;\n      case 0x2C0D:\n        bufpush(0x2C3D);\n        break;\n      case 0x2C0E:\n        bufpush(0x2C3E);\n        break;\n      case 0x2C0F:\n        bufpush(0x2C3F);\n        break;\n      case 0x2C10:\n        bufpush(0x2C40);\n        break;\n      case 0x2C11:\n        bufpush(0x2C41);\n        break;\n      case 0x2C12:\n        bufpush(0x2C42);\n        break;\n      case 0x2C13:\n        bufpush(0x2C43);\n        break;\n      case 0x2C14:\n        bufpush(0x2C44);\n        break;\n      case 0x2C15:\n        bufpush(0x2C45);\n        break;\n      case 0x2C16:\n        bufpush(0x2C46);\n        break;\n      case 0x2C17:\n        bufpush(0x2C47);\n        break;\n      case 0x2C18:\n        bufpush(0x2C48);\n        break;\n      case 0x2C19:\n        bufpush(0x2C49);\n        break;\n      case 0x2C1A:\n        bufpush(0x2C4A);\n        break;\n      case 0x2C1B:\n        bufpush(0x2C4B);\n        break;\n      case 0x2C1C:\n        bufpush(0x2C4C);\n        break;\n      case 0x2C1D:\n        bufpush(0x2C4D);\n        break;\n      case 0x2C1E:\n        bufpush(0x2C4E);\n        break;\n      case 0x2C1F:\n        bufpush(0x2C4F);\n        break;\n      case 0x2C20:\n        bufpush(0x2C50);\n        break;\n      case 0x2C21:\n        bufpush(0x2C51);\n        break;\n      case 0x2C22:\n        bufpush(0x2C52);\n        break;\n      case 0x2C23:\n        bufpush(0x2C53);\n        break;\n      case 0x2C24:\n        bufpush(0x2C54);\n        break;\n      case 0x2C25:\n        bufpush(0x2C55);\n        break;\n      case 0x2C26:\n        bufpush(0x2C56);\n        break;\n      case 0x2C27:\n        bufpush(0x2C57);\n        break;\n      case 0x2C28:\n        bufpush(0x2C58);\n        break;\n      case 0x2C29:\n        bufpush(0x2C59);\n        break;\n      case 0x2C2A:\n        bufpush(0x2C5A);\n        break;\n      case 0x2C2B:\n        bufpush(0x2C5B);\n        break;\n      case 0x2C2C:\n        bufpush(0x2C5C);\n        break;\n      case 0x2C2D:\n        bufpush(0x2C5D);\n        break;\n      case 0x2C2E:\n        bufpush(0x2C5E);\n        break;\n      case 0x2C60:\n        bufpush(0x2C61);\n        break;\n      case 0x2C62:\n        bufpush(0x026B);\n        break;\n      case 0x2C63:\n        bufpush(0x1D7D);\n        break;\n      case 0x2C64:\n        bufpush(0x027D);\n        break;\n      case 0x2C67:\n        bufpush(0x2C68);\n        break;\n      case 0x2C69:\n        bufpush(0x2C6A);\n        break;\n      case 0x2C6B:\n        bufpush(0x2C6C);\n        break;\n      case 0x2C6D:\n        bufpush(0x0251);\n        break;\n      case 0x2C6E:\n        bufpush(0x0271);\n        break;\n      case 0x2C6F:\n        bufpush(0x0250);\n        break;\n      case 0x2C70:\n        bufpush(0x0252);\n        break;\n      case 0x2C72:\n        bufpush(0x2C73);\n        break;\n      case 0x2C75:\n        bufpush(0x2C76);\n        break;\n      case 0x2C7E:\n        bufpush(0x023F);\n        break;\n      case 0x2C7F:\n        bufpush(0x0240);\n        break;\n      case 0x2C80:\n        bufpush(0x2C81);\n        break;\n      case 0x2C82:\n        bufpush(0x2C83);\n        break;\n      case 0x2C84:\n        bufpush(0x2C85);\n        break;\n      case 0x2C86:\n        bufpush(0x2C87);\n        break;\n      case 0x2C88:\n        bufpush(0x2C89);\n        break;\n      case 0x2C8A:\n        bufpush(0x2C8B);\n        break;\n      case 0x2C8C:\n        bufpush(0x2C8D);\n        break;\n      case 0x2C8E:\n        bufpush(0x2C8F);\n        break;\n      case 0x2C90:\n        bufpush(0x2C91);\n        break;\n      case 0x2C92:\n        bufpush(0x2C93);\n        break;\n      case 0x2C94:\n        bufpush(0x2C95);\n        break;\n      case 0x2C96:\n        bufpush(0x2C97);\n        break;\n      case 0x2C98:\n        bufpush(0x2C99);\n        break;\n      case 0x2C9A:\n        bufpush(0x2C9B);\n        break;\n      case 0x2C9C:\n        bufpush(0x2C9D);\n        break;\n      case 0x2C9E:\n        bufpush(0x2C9F);\n        break;\n      case 0x2CA0:\n        bufpush(0x2CA1);\n        break;\n      case 0x2CA2:\n        bufpush(0x2CA3);\n        break;\n      case 0x2CA4:\n        bufpush(0x2CA5);\n        break;\n      case 0x2CA6:\n        bufpush(0x2CA7);\n        break;\n      case 0x2CA8:\n        bufpush(0x2CA9);\n        break;\n      case 0x2CAA:\n        bufpush(0x2CAB);\n        break;\n      case 0x2CAC:\n        bufpush(0x2CAD);\n        break;\n      case 0x2CAE:\n        bufpush(0x2CAF);\n        break;\n      case 0x2CB0:\n        bufpush(0x2CB1);\n        break;\n      case 0x2CB2:\n        bufpush(0x2CB3);\n        break;\n      case 0x2CB4:\n        bufpush(0x2CB5);\n        break;\n      case 0x2CB6:\n        bufpush(0x2CB7);\n        break;\n      case 0x2CB8:\n        bufpush(0x2CB9);\n        break;\n      case 0x2CBA:\n        bufpush(0x2CBB);\n        break;\n      case 0x2CBC:\n        bufpush(0x2CBD);\n        break;\n      case 0x2CBE:\n        bufpush(0x2CBF);\n        break;\n      case 0x2CC0:\n        bufpush(0x2CC1);\n        break;\n      case 0x2CC2:\n        bufpush(0x2CC3);\n        break;\n      case 0x2CC4:\n        bufpush(0x2CC5);\n        break;\n      case 0x2CC6:\n        bufpush(0x2CC7);\n        break;\n      case 0x2CC8:\n        bufpush(0x2CC9);\n        break;\n      case 0x2CCA:\n        bufpush(0x2CCB);\n        break;\n      case 0x2CCC:\n        bufpush(0x2CCD);\n        break;\n      case 0x2CCE:\n        bufpush(0x2CCF);\n        break;\n      case 0x2CD0:\n        bufpush(0x2CD1);\n        break;\n      case 0x2CD2:\n        bufpush(0x2CD3);\n        break;\n      case 0x2CD4:\n        bufpush(0x2CD5);\n        break;\n      case 0x2CD6:\n        bufpush(0x2CD7);\n        break;\n      case 0x2CD8:\n        bufpush(0x2CD9);\n        break;\n      case 0x2CDA:\n        bufpush(0x2CDB);\n        break;\n      case 0x2CDC:\n        bufpush(0x2CDD);\n        break;\n      case 0x2CDE:\n        bufpush(0x2CDF);\n        break;\n      case 0x2CE0:\n        bufpush(0x2CE1);\n        break;\n      case 0x2CE2:\n        bufpush(0x2CE3);\n        break;\n      case 0x2CEB:\n        bufpush(0x2CEC);\n        break;\n      case 0x2CED:\n        bufpush(0x2CEE);\n        break;\n      case 0x2CF2:\n        bufpush(0x2CF3);\n        break;\n      case 0xA640:\n        bufpush(0xA641);\n        break;\n      case 0xA642:\n        bufpush(0xA643);\n        break;\n      case 0xA644:\n        bufpush(0xA645);\n        break;\n      case 0xA646:\n        bufpush(0xA647);\n        break;\n      case 0xA648:\n        bufpush(0xA649);\n        break;\n      case 0xA64A:\n        bufpush(0xA64B);\n        break;\n      case 0xA64C:\n        bufpush(0xA64D);\n        break;\n      case 0xA64E:\n        bufpush(0xA64F);\n        break;\n      case 0xA650:\n        bufpush(0xA651);\n        break;\n      case 0xA652:\n        bufpush(0xA653);\n        break;\n      case 0xA654:\n        bufpush(0xA655);\n        break;\n      case 0xA656:\n        bufpush(0xA657);\n        break;\n      case 0xA658:\n        bufpush(0xA659);\n        break;\n      case 0xA65A:\n        bufpush(0xA65B);\n        break;\n      case 0xA65C:\n        bufpush(0xA65D);\n        break;\n      case 0xA65E:\n        bufpush(0xA65F);\n        break;\n      case 0xA660:\n        bufpush(0xA661);\n        break;\n      case 0xA662:\n        bufpush(0xA663);\n        break;\n      case 0xA664:\n        bufpush(0xA665);\n        break;\n      case 0xA666:\n        bufpush(0xA667);\n        break;\n      case 0xA668:\n        bufpush(0xA669);\n        break;\n      case 0xA66A:\n        bufpush(0xA66B);\n        break;\n      case 0xA66C:\n        bufpush(0xA66D);\n        break;\n      case 0xA680:\n        bufpush(0xA681);\n        break;\n      case 0xA682:\n        bufpush(0xA683);\n        break;\n      case 0xA684:\n        bufpush(0xA685);\n        break;\n      case 0xA686:\n        bufpush(0xA687);\n        break;\n      case 0xA688:\n        bufpush(0xA689);\n        break;\n      case 0xA68A:\n        bufpush(0xA68B);\n        break;\n      case 0xA68C:\n        bufpush(0xA68D);\n        break;\n      case 0xA68E:\n        bufpush(0xA68F);\n        break;\n      case 0xA690:\n        bufpush(0xA691);\n        break;\n      case 0xA692:\n        bufpush(0xA693);\n        break;\n      case 0xA694:\n        bufpush(0xA695);\n        break;\n      case 0xA696:\n        bufpush(0xA697);\n        break;\n      case 0xA698:\n        bufpush(0xA699);\n        break;\n      case 0xA69A:\n        bufpush(0xA69B);\n        break;\n      case 0xA722:\n        bufpush(0xA723);\n        break;\n      case 0xA724:\n        bufpush(0xA725);\n        break;\n      case 0xA726:\n        bufpush(0xA727);\n        break;\n      case 0xA728:\n        bufpush(0xA729);\n        break;\n      case 0xA72A:\n        bufpush(0xA72B);\n        break;\n      case 0xA72C:\n        bufpush(0xA72D);\n        break;\n      case 0xA72E:\n        bufpush(0xA72F);\n        break;\n      case 0xA732:\n        bufpush(0xA733);\n        break;\n      case 0xA734:\n        bufpush(0xA735);\n        break;\n      case 0xA736:\n        bufpush(0xA737);\n        break;\n      case 0xA738:\n        bufpush(0xA739);\n        break;\n      case 0xA73A:\n        bufpush(0xA73B);\n        break;\n      case 0xA73C:\n        bufpush(0xA73D);\n        break;\n      case 0xA73E:\n        bufpush(0xA73F);\n        break;\n      case 0xA740:\n        bufpush(0xA741);\n        break;\n      case 0xA742:\n        bufpush(0xA743);\n        break;\n      case 0xA744:\n        bufpush(0xA745);\n        break;\n      case 0xA746:\n        bufpush(0xA747);\n        break;\n      case 0xA748:\n        bufpush(0xA749);\n        break;\n      case 0xA74A:\n        bufpush(0xA74B);\n        break;\n      case 0xA74C:\n        bufpush(0xA74D);\n        break;\n      case 0xA74E:\n        bufpush(0xA74F);\n        break;\n      case 0xA750:\n        bufpush(0xA751);\n        break;\n      case 0xA752:\n        bufpush(0xA753);\n        break;\n      case 0xA754:\n        bufpush(0xA755);\n        break;\n      case 0xA756:\n        bufpush(0xA757);\n        break;\n      case 0xA758:\n        bufpush(0xA759);\n        break;\n      case 0xA75A:\n        bufpush(0xA75B);\n        break;\n      case 0xA75C:\n        bufpush(0xA75D);\n        break;\n      case 0xA75E:\n        bufpush(0xA75F);\n        break;\n      case 0xA760:\n        bufpush(0xA761);\n        break;\n      case 0xA762:\n        bufpush(0xA763);\n        break;\n      case 0xA764:\n        bufpush(0xA765);\n        break;\n      case 0xA766:\n        bufpush(0xA767);\n        break;\n      case 0xA768:\n        bufpush(0xA769);\n        break;\n      case 0xA76A:\n        bufpush(0xA76B);\n        break;\n      case 0xA76C:\n        bufpush(0xA76D);\n        break;\n      case 0xA76E:\n        bufpush(0xA76F);\n        break;\n      case 0xA779:\n        bufpush(0xA77A);\n        break;\n      case 0xA77B:\n        bufpush(0xA77C);\n        break;\n      case 0xA77D:\n        bufpush(0x1D79);\n        break;\n      case 0xA77E:\n        bufpush(0xA77F);\n        break;\n      case 0xA780:\n        bufpush(0xA781);\n        break;\n      case 0xA782:\n        bufpush(0xA783);\n        break;\n      case 0xA784:\n        bufpush(0xA785);\n        break;\n      case 0xA786:\n        bufpush(0xA787);\n        break;\n      case 0xA78B:\n        bufpush(0xA78C);\n        break;\n      case 0xA78D:\n        bufpush(0x0265);\n        break;\n      case 0xA790:\n        bufpush(0xA791);\n        break;\n      case 0xA792:\n        bufpush(0xA793);\n        break;\n      case 0xA796:\n        bufpush(0xA797);\n        break;\n      case 0xA798:\n        bufpush(0xA799);\n        break;\n      case 0xA79A:\n        bufpush(0xA79B);\n        break;\n      case 0xA79C:\n        bufpush(0xA79D);\n        break;\n      case 0xA79E:\n        bufpush(0xA79F);\n        break;\n      case 0xA7A0:\n        bufpush(0xA7A1);\n        break;\n      case 0xA7A2:\n        bufpush(0xA7A3);\n        break;\n      case 0xA7A4:\n        bufpush(0xA7A5);\n        break;\n      case 0xA7A6:\n        bufpush(0xA7A7);\n        break;\n      case 0xA7A8:\n        bufpush(0xA7A9);\n        break;\n      case 0xA7AA:\n        bufpush(0x0266);\n        break;\n      case 0xA7AB:\n        bufpush(0x025C);\n        break;\n      case 0xA7AC:\n        bufpush(0x0261);\n        break;\n      case 0xA7AD:\n        bufpush(0x026C);\n        break;\n      case 0xA7AE:\n        bufpush(0x026A);\n        break;\n      case 0xA7B0:\n        bufpush(0x029E);\n        break;\n      case 0xA7B1:\n        bufpush(0x0287);\n        break;\n      case 0xA7B2:\n        bufpush(0x029D);\n        break;\n      case 0xA7B3:\n        bufpush(0xAB53);\n        break;\n      case 0xA7B4:\n        bufpush(0xA7B5);\n        break;\n      case 0xA7B6:\n        bufpush(0xA7B7);\n        break;\n      case 0xAB70:\n        bufpush(0x13A0);\n        break;\n      case 0xAB71:\n        bufpush(0x13A1);\n        break;\n      case 0xAB72:\n        bufpush(0x13A2);\n        break;\n      case 0xAB73:\n        bufpush(0x13A3);\n        break;\n      case 0xAB74:\n        bufpush(0x13A4);\n        break;\n      case 0xAB75:\n        bufpush(0x13A5);\n        break;\n      case 0xAB76:\n        bufpush(0x13A6);\n        break;\n      case 0xAB77:\n        bufpush(0x13A7);\n        break;\n      case 0xAB78:\n        bufpush(0x13A8);\n        break;\n      case 0xAB79:\n        bufpush(0x13A9);\n        break;\n      case 0xAB7A:\n        bufpush(0x13AA);\n        break;\n      case 0xAB7B:\n        bufpush(0x13AB);\n        break;\n      case 0xAB7C:\n        bufpush(0x13AC);\n        break;\n      case 0xAB7D:\n        bufpush(0x13AD);\n        break;\n      case 0xAB7E:\n        bufpush(0x13AE);\n        break;\n      case 0xAB7F:\n        bufpush(0x13AF);\n        break;\n      case 0xAB80:\n        bufpush(0x13B0);\n        break;\n      case 0xAB81:\n        bufpush(0x13B1);\n        break;\n      case 0xAB82:\n        bufpush(0x13B2);\n        break;\n      case 0xAB83:\n        bufpush(0x13B3);\n        break;\n      case 0xAB84:\n        bufpush(0x13B4);\n        break;\n      case 0xAB85:\n        bufpush(0x13B5);\n        break;\n      case 0xAB86:\n        bufpush(0x13B6);\n        break;\n      case 0xAB87:\n        bufpush(0x13B7);\n        break;\n      case 0xAB88:\n        bufpush(0x13B8);\n        break;\n      case 0xAB89:\n        bufpush(0x13B9);\n        break;\n      case 0xAB8A:\n        bufpush(0x13BA);\n        break;\n      case 0xAB8B:\n        bufpush(0x13BB);\n        break;\n      case 0xAB8C:\n        bufpush(0x13BC);\n        break;\n      case 0xAB8D:\n        bufpush(0x13BD);\n        break;\n      case 0xAB8E:\n        bufpush(0x13BE);\n        break;\n      case 0xAB8F:\n        bufpush(0x13BF);\n        break;\n      case 0xAB90:\n        bufpush(0x13C0);\n        break;\n      case 0xAB91:\n        bufpush(0x13C1);\n        break;\n      case 0xAB92:\n        bufpush(0x13C2);\n        break;\n      case 0xAB93:\n        bufpush(0x13C3);\n        break;\n      case 0xAB94:\n        bufpush(0x13C4);\n        break;\n      case 0xAB95:\n        bufpush(0x13C5);\n        break;\n      case 0xAB96:\n        bufpush(0x13C6);\n        break;\n      case 0xAB97:\n        bufpush(0x13C7);\n        break;\n      case 0xAB98:\n        bufpush(0x13C8);\n        break;\n      case 0xAB99:\n        bufpush(0x13C9);\n        break;\n      case 0xAB9A:\n        bufpush(0x13CA);\n        break;\n      case 0xAB9B:\n        bufpush(0x13CB);\n        break;\n      case 0xAB9C:\n        bufpush(0x13CC);\n        break;\n      case 0xAB9D:\n        bufpush(0x13CD);\n        break;\n      case 0xAB9E:\n        bufpush(0x13CE);\n        break;\n      case 0xAB9F:\n        bufpush(0x13CF);\n        break;\n      case 0xABA0:\n        bufpush(0x13D0);\n        break;\n      case 0xABA1:\n        bufpush(0x13D1);\n        break;\n      case 0xABA2:\n        bufpush(0x13D2);\n        break;\n      case 0xABA3:\n        bufpush(0x13D3);\n        break;\n      case 0xABA4:\n        bufpush(0x13D4);\n        break;\n      case 0xABA5:\n        bufpush(0x13D5);\n        break;\n      case 0xABA6:\n        bufpush(0x13D6);\n        break;\n      case 0xABA7:\n        bufpush(0x13D7);\n        break;\n      case 0xABA8:\n        bufpush(0x13D8);\n        break;\n      case 0xABA9:\n        bufpush(0x13D9);\n        break;\n      case 0xABAA:\n        bufpush(0x13DA);\n        break;\n      case 0xABAB:\n        bufpush(0x13DB);\n        break;\n      case 0xABAC:\n        bufpush(0x13DC);\n        break;\n      case 0xABAD:\n        bufpush(0x13DD);\n        break;\n      case 0xABAE:\n        bufpush(0x13DE);\n        break;\n      case 0xABAF:\n        bufpush(0x13DF);\n        break;\n      case 0xABB0:\n        bufpush(0x13E0);\n        break;\n      case 0xABB1:\n        bufpush(0x13E1);\n        break;\n      case 0xABB2:\n        bufpush(0x13E2);\n        break;\n      case 0xABB3:\n        bufpush(0x13E3);\n        break;\n      case 0xABB4:\n        bufpush(0x13E4);\n        break;\n      case 0xABB5:\n        bufpush(0x13E5);\n        break;\n      case 0xABB6:\n        bufpush(0x13E6);\n        break;\n      case 0xABB7:\n        bufpush(0x13E7);\n        break;\n      case 0xABB8:\n        bufpush(0x13E8);\n        break;\n      case 0xABB9:\n        bufpush(0x13E9);\n        break;\n      case 0xABBA:\n        bufpush(0x13EA);\n        break;\n      case 0xABBB:\n        bufpush(0x13EB);\n        break;\n      case 0xABBC:\n        bufpush(0x13EC);\n        break;\n      case 0xABBD:\n        bufpush(0x13ED);\n        break;\n      case 0xABBE:\n        bufpush(0x13EE);\n        break;\n      case 0xABBF:\n        bufpush(0x13EF);\n        break;\n      case 0xFB00:\n        bufpush(0x0066);\n        bufpush(0x0066);\n        break;\n      case 0xFB01:\n        bufpush(0x0066);\n        bufpush(0x0069);\n        break;\n      case 0xFB02:\n        bufpush(0x0066);\n        bufpush(0x006C);\n        break;\n      case 0xFB03:\n        bufpush(0x0066);\n        bufpush(0x0066);\n        bufpush(0x0069);\n        break;\n      case 0xFB04:\n        bufpush(0x0066);\n        bufpush(0x0066);\n        bufpush(0x006C);\n        break;\n      case 0xFB05:\n        bufpush(0x0073);\n        bufpush(0x0074);\n        break;\n      case 0xFB06:\n        bufpush(0x0073);\n        bufpush(0x0074);\n        break;\n      case 0xFB13:\n        bufpush(0x0574);\n        bufpush(0x0576);\n        break;\n      case 0xFB14:\n        bufpush(0x0574);\n        bufpush(0x0565);\n        break;\n      case 0xFB15:\n        bufpush(0x0574);\n        bufpush(0x056B);\n        break;\n      case 0xFB16:\n        bufpush(0x057E);\n        bufpush(0x0576);\n        break;\n      case 0xFB17:\n        bufpush(0x0574);\n        bufpush(0x056D);\n        break;\n      case 0xFF21:\n        bufpush(0xFF41);\n        break;\n      case 0xFF22:\n        bufpush(0xFF42);\n        break;\n      case 0xFF23:\n        bufpush(0xFF43);\n        break;\n      case 0xFF24:\n        bufpush(0xFF44);\n        break;\n      case 0xFF25:\n        bufpush(0xFF45);\n        break;\n      case 0xFF26:\n        bufpush(0xFF46);\n        break;\n      case 0xFF27:\n        bufpush(0xFF47);\n        break;\n      case 0xFF28:\n        bufpush(0xFF48);\n        break;\n      case 0xFF29:\n        bufpush(0xFF49);\n        break;\n      case 0xFF2A:\n        bufpush(0xFF4A);\n        break;\n      case 0xFF2B:\n        bufpush(0xFF4B);\n        break;\n      case 0xFF2C:\n        bufpush(0xFF4C);\n        break;\n      case 0xFF2D:\n        bufpush(0xFF4D);\n        break;\n      case 0xFF2E:\n        bufpush(0xFF4E);\n        break;\n      case 0xFF2F:\n        bufpush(0xFF4F);\n        break;\n      case 0xFF30:\n        bufpush(0xFF50);\n        break;\n      case 0xFF31:\n        bufpush(0xFF51);\n        break;\n      case 0xFF32:\n        bufpush(0xFF52);\n        break;\n      case 0xFF33:\n        bufpush(0xFF53);\n        break;\n      case 0xFF34:\n        bufpush(0xFF54);\n        break;\n      case 0xFF35:\n        bufpush(0xFF55);\n        break;\n      case 0xFF36:\n        bufpush(0xFF56);\n        break;\n      case 0xFF37:\n        bufpush(0xFF57);\n        break;\n      case 0xFF38:\n        bufpush(0xFF58);\n        break;\n      case 0xFF39:\n        bufpush(0xFF59);\n        break;\n      case 0xFF3A:\n        bufpush(0xFF5A);\n        break;\n      case 0x10400:\n        bufpush(0x10428);\n        break;\n      case 0x10401:\n        bufpush(0x10429);\n        break;\n      case 0x10402:\n        bufpush(0x1042A);\n        break;\n      case 0x10403:\n        bufpush(0x1042B);\n        break;\n      case 0x10404:\n        bufpush(0x1042C);\n        break;\n      case 0x10405:\n        bufpush(0x1042D);\n        break;\n      case 0x10406:\n        bufpush(0x1042E);\n        break;\n      case 0x10407:\n        bufpush(0x1042F);\n        break;\n      case 0x10408:\n        bufpush(0x10430);\n        break;\n      case 0x10409:\n        bufpush(0x10431);\n        break;\n      case 0x1040A:\n        bufpush(0x10432);\n        break;\n      case 0x1040B:\n        bufpush(0x10433);\n        break;\n      case 0x1040C:\n        bufpush(0x10434);\n        break;\n      case 0x1040D:\n        bufpush(0x10435);\n        break;\n      case 0x1040E:\n        bufpush(0x10436);\n        break;\n      case 0x1040F:\n        bufpush(0x10437);\n        break;\n      case 0x10410:\n        bufpush(0x10438);\n        break;\n      case 0x10411:\n        bufpush(0x10439);\n        break;\n      case 0x10412:\n        bufpush(0x1043A);\n        break;\n      case 0x10413:\n        bufpush(0x1043B);\n        break;\n      case 0x10414:\n        bufpush(0x1043C);\n        break;\n      case 0x10415:\n        bufpush(0x1043D);\n        break;\n      case 0x10416:\n        bufpush(0x1043E);\n        break;\n      case 0x10417:\n        bufpush(0x1043F);\n        break;\n      case 0x10418:\n        bufpush(0x10440);\n        break;\n      case 0x10419:\n        bufpush(0x10441);\n        break;\n      case 0x1041A:\n        bufpush(0x10442);\n        break;\n      case 0x1041B:\n        bufpush(0x10443);\n        break;\n      case 0x1041C:\n        bufpush(0x10444);\n        break;\n      case 0x1041D:\n        bufpush(0x10445);\n        break;\n      case 0x1041E:\n        bufpush(0x10446);\n        break;\n      case 0x1041F:\n        bufpush(0x10447);\n        break;\n      case 0x10420:\n        bufpush(0x10448);\n        break;\n      case 0x10421:\n        bufpush(0x10449);\n        break;\n      case 0x10422:\n        bufpush(0x1044A);\n        break;\n      case 0x10423:\n        bufpush(0x1044B);\n        break;\n      case 0x10424:\n        bufpush(0x1044C);\n        break;\n      case 0x10425:\n        bufpush(0x1044D);\n        break;\n      case 0x10426:\n        bufpush(0x1044E);\n        break;\n      case 0x10427:\n        bufpush(0x1044F);\n        break;\n      case 0x104B0:\n        bufpush(0x104D8);\n        break;\n      case 0x104B1:\n        bufpush(0x104D9);\n        break;\n      case 0x104B2:\n        bufpush(0x104DA);\n        break;\n      case 0x104B3:\n        bufpush(0x104DB);\n        break;\n      case 0x104B4:\n        bufpush(0x104DC);\n        break;\n      case 0x104B5:\n        bufpush(0x104DD);\n        break;\n      case 0x104B6:\n        bufpush(0x104DE);\n        break;\n      case 0x104B7:\n        bufpush(0x104DF);\n        break;\n      case 0x104B8:\n        bufpush(0x104E0);\n        break;\n      case 0x104B9:\n        bufpush(0x104E1);\n        break;\n      case 0x104BA:\n        bufpush(0x104E2);\n        break;\n      case 0x104BB:\n        bufpush(0x104E3);\n        break;\n      case 0x104BC:\n        bufpush(0x104E4);\n        break;\n      case 0x104BD:\n        bufpush(0x104E5);\n        break;\n      case 0x104BE:\n        bufpush(0x104E6);\n        break;\n      case 0x104BF:\n        bufpush(0x104E7);\n        break;\n      case 0x104C0:\n        bufpush(0x104E8);\n        break;\n      case 0x104C1:\n        bufpush(0x104E9);\n        break;\n      case 0x104C2:\n        bufpush(0x104EA);\n        break;\n      case 0x104C3:\n        bufpush(0x104EB);\n        break;\n      case 0x104C4:\n        bufpush(0x104EC);\n        break;\n      case 0x104C5:\n        bufpush(0x104ED);\n        break;\n      case 0x104C6:\n        bufpush(0x104EE);\n        break;\n      case 0x104C7:\n        bufpush(0x104EF);\n        break;\n      case 0x104C8:\n        bufpush(0x104F0);\n        break;\n      case 0x104C9:\n        bufpush(0x104F1);\n        break;\n      case 0x104CA:\n        bufpush(0x104F2);\n        break;\n      case 0x104CB:\n        bufpush(0x104F3);\n        break;\n      case 0x104CC:\n        bufpush(0x104F4);\n        break;\n      case 0x104CD:\n        bufpush(0x104F5);\n        break;\n      case 0x104CE:\n        bufpush(0x104F6);\n        break;\n      case 0x104CF:\n        bufpush(0x104F7);\n        break;\n      case 0x104D0:\n        bufpush(0x104F8);\n        break;\n      case 0x104D1:\n        bufpush(0x104F9);\n        break;\n      case 0x104D2:\n        bufpush(0x104FA);\n        break;\n      case 0x104D3:\n        bufpush(0x104FB);\n        break;\n      case 0x10C80:\n        bufpush(0x10CC0);\n        break;\n      case 0x10C81:\n        bufpush(0x10CC1);\n        break;\n      case 0x10C82:\n        bufpush(0x10CC2);\n        break;\n      case 0x10C83:\n        bufpush(0x10CC3);\n        break;\n      case 0x10C84:\n        bufpush(0x10CC4);\n        break;\n      case 0x10C85:\n        bufpush(0x10CC5);\n        break;\n      case 0x10C86:\n        bufpush(0x10CC6);\n        break;\n      case 0x10C87:\n        bufpush(0x10CC7);\n        break;\n      case 0x10C88:\n        bufpush(0x10CC8);\n        break;\n      case 0x10C89:\n        bufpush(0x10CC9);\n        break;\n      case 0x10C8A:\n        bufpush(0x10CCA);\n        break;\n      case 0x10C8B:\n        bufpush(0x10CCB);\n        break;\n      case 0x10C8C:\n        bufpush(0x10CCC);\n        break;\n      case 0x10C8D:\n        bufpush(0x10CCD);\n        break;\n      case 0x10C8E:\n        bufpush(0x10CCE);\n        break;\n      case 0x10C8F:\n        bufpush(0x10CCF);\n        break;\n      case 0x10C90:\n        bufpush(0x10CD0);\n        break;\n      case 0x10C91:\n        bufpush(0x10CD1);\n        break;\n      case 0x10C92:\n        bufpush(0x10CD2);\n        break;\n      case 0x10C93:\n        bufpush(0x10CD3);\n        break;\n      case 0x10C94:\n        bufpush(0x10CD4);\n        break;\n      case 0x10C95:\n        bufpush(0x10CD5);\n        break;\n      case 0x10C96:\n        bufpush(0x10CD6);\n        break;\n      case 0x10C97:\n        bufpush(0x10CD7);\n        break;\n      case 0x10C98:\n        bufpush(0x10CD8);\n        break;\n      case 0x10C99:\n        bufpush(0x10CD9);\n        break;\n      case 0x10C9A:\n        bufpush(0x10CDA);\n        break;\n      case 0x10C9B:\n        bufpush(0x10CDB);\n        break;\n      case 0x10C9C:\n        bufpush(0x10CDC);\n        break;\n      case 0x10C9D:\n        bufpush(0x10CDD);\n        break;\n      case 0x10C9E:\n        bufpush(0x10CDE);\n        break;\n      case 0x10C9F:\n        bufpush(0x10CDF);\n        break;\n      case 0x10CA0:\n        bufpush(0x10CE0);\n        break;\n      case 0x10CA1:\n        bufpush(0x10CE1);\n        break;\n      case 0x10CA2:\n        bufpush(0x10CE2);\n        break;\n      case 0x10CA3:\n        bufpush(0x10CE3);\n        break;\n      case 0x10CA4:\n        bufpush(0x10CE4);\n        break;\n      case 0x10CA5:\n        bufpush(0x10CE5);\n        break;\n      case 0x10CA6:\n        bufpush(0x10CE6);\n        break;\n      case 0x10CA7:\n        bufpush(0x10CE7);\n        break;\n      case 0x10CA8:\n        bufpush(0x10CE8);\n        break;\n      case 0x10CA9:\n        bufpush(0x10CE9);\n        break;\n      case 0x10CAA:\n        bufpush(0x10CEA);\n        break;\n      case 0x10CAB:\n        bufpush(0x10CEB);\n        break;\n      case 0x10CAC:\n        bufpush(0x10CEC);\n        break;\n      case 0x10CAD:\n        bufpush(0x10CED);\n        break;\n      case 0x10CAE:\n        bufpush(0x10CEE);\n        break;\n      case 0x10CAF:\n        bufpush(0x10CEF);\n        break;\n      case 0x10CB0:\n        bufpush(0x10CF0);\n        break;\n      case 0x10CB1:\n        bufpush(0x10CF1);\n        break;\n      case 0x10CB2:\n        bufpush(0x10CF2);\n        break;\n      case 0x118A0:\n        bufpush(0x118C0);\n        break;\n      case 0x118A1:\n        bufpush(0x118C1);\n        break;\n      case 0x118A2:\n        bufpush(0x118C2);\n        break;\n      case 0x118A3:\n        bufpush(0x118C3);\n        break;\n      case 0x118A4:\n        bufpush(0x118C4);\n        break;\n      case 0x118A5:\n        bufpush(0x118C5);\n        break;\n      case 0x118A6:\n        bufpush(0x118C6);\n        break;\n      case 0x118A7:\n        bufpush(0x118C7);\n        break;\n      case 0x118A8:\n        bufpush(0x118C8);\n        break;\n      case 0x118A9:\n        bufpush(0x118C9);\n        break;\n      case 0x118AA:\n        bufpush(0x118CA);\n        break;\n      case 0x118AB:\n        bufpush(0x118CB);\n        break;\n      case 0x118AC:\n        bufpush(0x118CC);\n        break;\n      case 0x118AD:\n        bufpush(0x118CD);\n        break;\n      case 0x118AE:\n        bufpush(0x118CE);\n        break;\n      case 0x118AF:\n        bufpush(0x118CF);\n        break;\n      case 0x118B0:\n        bufpush(0x118D0);\n        break;\n      case 0x118B1:\n        bufpush(0x118D1);\n        break;\n      case 0x118B2:\n        bufpush(0x118D2);\n        break;\n      case 0x118B3:\n        bufpush(0x118D3);\n        break;\n      case 0x118B4:\n        bufpush(0x118D4);\n        break;\n      case 0x118B5:\n        bufpush(0x118D5);\n        break;\n      case 0x118B6:\n        bufpush(0x118D6);\n        break;\n      case 0x118B7:\n        bufpush(0x118D7);\n        break;\n      case 0x118B8:\n        bufpush(0x118D8);\n        break;\n      case 0x118B9:\n        bufpush(0x118D9);\n        break;\n      case 0x118BA:\n        bufpush(0x118DA);\n        break;\n      case 0x118BB:\n        bufpush(0x118DB);\n        break;\n      case 0x118BC:\n        bufpush(0x118DC);\n        break;\n      case 0x118BD:\n        bufpush(0x118DD);\n        break;\n      case 0x118BE:\n        bufpush(0x118DE);\n        break;\n      case 0x118BF:\n        bufpush(0x118DF);\n        break;\n      case 0x1E900:\n        bufpush(0x1E922);\n        break;\n      case 0x1E901:\n        bufpush(0x1E923);\n        break;\n      case 0x1E902:\n        bufpush(0x1E924);\n        break;\n      case 0x1E903:\n        bufpush(0x1E925);\n        break;\n      case 0x1E904:\n        bufpush(0x1E926);\n        break;\n      case 0x1E905:\n        bufpush(0x1E927);\n        break;\n      case 0x1E906:\n        bufpush(0x1E928);\n        break;\n      case 0x1E907:\n        bufpush(0x1E929);\n        break;\n      case 0x1E908:\n        bufpush(0x1E92A);\n        break;\n      case 0x1E909:\n        bufpush(0x1E92B);\n        break;\n      case 0x1E90A:\n        bufpush(0x1E92C);\n        break;\n      case 0x1E90B:\n        bufpush(0x1E92D);\n        break;\n      case 0x1E90C:\n        bufpush(0x1E92E);\n        break;\n      case 0x1E90D:\n        bufpush(0x1E92F);\n        break;\n      case 0x1E90E:\n        bufpush(0x1E930);\n        break;\n      case 0x1E90F:\n        bufpush(0x1E931);\n        break;\n      case 0x1E910:\n        bufpush(0x1E932);\n        break;\n      case 0x1E911:\n        bufpush(0x1E933);\n        break;\n      case 0x1E912:\n        bufpush(0x1E934);\n        break;\n      case 0x1E913:\n        bufpush(0x1E935);\n        break;\n      case 0x1E914:\n        bufpush(0x1E936);\n        break;\n      case 0x1E915:\n        bufpush(0x1E937);\n        break;\n      case 0x1E916:\n        bufpush(0x1E938);\n        break;\n      case 0x1E917:\n        bufpush(0x1E939);\n        break;\n      case 0x1E918:\n        bufpush(0x1E93A);\n        break;\n      case 0x1E919:\n        bufpush(0x1E93B);\n        break;\n      case 0x1E91A:\n        bufpush(0x1E93C);\n        break;\n      case 0x1E91B:\n        bufpush(0x1E93D);\n        break;\n      case 0x1E91C:\n        bufpush(0x1E93E);\n        break;\n      case 0x1E91D:\n        bufpush(0x1E93F);\n        break;\n      case 0x1E91E:\n        bufpush(0x1E940);\n        break;\n      case 0x1E91F:\n        bufpush(0x1E941);\n        break;\n      case 0x1E920:\n        bufpush(0x1E942);\n        break;\n      case 0x1E921:\n        bufpush(0x1E943);\n        break;\n      default:\n        bufpush(c);\n    }\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/chunk.h",
    "content": "#ifndef CMARK_CHUNK_H\n#define CMARK_CHUNK_H\n\n#include <string.h>\n#include <stdlib.h>\n#include <assert.h>\n#include \"cmark.h\"\n#include \"buffer.h\"\n#include \"cmark_ctype.h\"\n\n#define CMARK_CHUNK_EMPTY                                                      \\\n  { NULL, 0, 0 }\n\ntypedef struct {\n  unsigned char *data;\n  bufsize_t len;\n  bufsize_t alloc; // also implies a NULL-terminated string\n} cmark_chunk;\n\nstatic CMARK_INLINE void cmark_chunk_free(cmark_mem *mem, cmark_chunk *c) {\n  if (c->alloc)\n    mem->free(c->data);\n\n  c->data = NULL;\n  c->alloc = 0;\n  c->len = 0;\n}\n\nstatic CMARK_INLINE void cmark_chunk_ltrim(cmark_chunk *c) {\n  assert(!c->alloc);\n\n  while (c->len && cmark_isspace(c->data[0])) {\n    c->data++;\n    c->len--;\n  }\n}\n\nstatic CMARK_INLINE void cmark_chunk_rtrim(cmark_chunk *c) {\n  assert(!c->alloc);\n\n  while (c->len > 0) {\n    if (!cmark_isspace(c->data[c->len - 1]))\n      break;\n\n    c->len--;\n  }\n}\n\nstatic CMARK_INLINE void cmark_chunk_trim(cmark_chunk *c) {\n  cmark_chunk_ltrim(c);\n  cmark_chunk_rtrim(c);\n}\n\nstatic CMARK_INLINE bufsize_t cmark_chunk_strchr(cmark_chunk *ch, int c,\n                                                 bufsize_t offset) {\n  const unsigned char *p =\n      (unsigned char *)memchr(ch->data + offset, c, ch->len - offset);\n  return p ? (bufsize_t)(p - ch->data) : ch->len;\n}\n\nstatic CMARK_INLINE const char *cmark_chunk_to_cstr(cmark_mem *mem,\n                                                    cmark_chunk *c) {\n  unsigned char *str;\n\n  if (c->alloc) {\n    return (char *)c->data;\n  }\n  str = (unsigned char *)mem->calloc(c->len + 1, 1);\n  if (c->len > 0) {\n    memcpy(str, c->data, c->len);\n  }\n  str[c->len] = 0;\n  c->data = str;\n  c->alloc = 1;\n\n  return (char *)str;\n}\n\nstatic CMARK_INLINE void cmark_chunk_set_cstr(cmark_mem *mem, cmark_chunk *c,\n                                              const char *str) {\n  unsigned char *old = c->alloc ? c->data : NULL;\n  if (str == NULL) {\n    c->len = 0;\n    c->data = NULL;\n    c->alloc = 0;\n  } else {\n    c->len = (bufsize_t)strlen(str);\n    c->data = (unsigned char *)mem->calloc(c->len + 1, 1);\n    c->alloc = 1;\n    memcpy(c->data, str, c->len + 1);\n  }\n  if (old != NULL) {\n    mem->free(old);\n  }\n}\n\nstatic CMARK_INLINE cmark_chunk cmark_chunk_literal(const char *data) {\n  bufsize_t len = data ? (bufsize_t)strlen(data) : 0;\n  cmark_chunk c = {(unsigned char *)data, len, 0};\n  return c;\n}\n\nstatic CMARK_INLINE cmark_chunk cmark_chunk_dup(const cmark_chunk *ch,\n                                                bufsize_t pos, bufsize_t len) {\n  cmark_chunk c = {ch->data + pos, len, 0};\n  return c;\n}\n\nstatic CMARK_INLINE cmark_chunk cmark_chunk_buf_detach(cmark_strbuf *buf) {\n  cmark_chunk c;\n\n  c.len = buf->size;\n  c.data = cmark_strbuf_detach(buf);\n  c.alloc = 1;\n\n  return c;\n}\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/cmark.c",
    "content": "#include <stdlib.h>\n#include <assert.h>\n#include <stdio.h>\n#include \"node.h\"\n#include \"houdini.h\"\n#include \"cmark.h\"\n#include \"buffer.h\"\n\nint cmark_version() { return CMARK_VERSION; }\n\nconst char *cmark_version_string() { return CMARK_VERSION_STRING; }\n\nstatic void *xcalloc(size_t nmem, size_t size) {\n  void *ptr = calloc(nmem, size);\n  if (!ptr) {\n    fprintf(stderr, \"[cmark] calloc returned null pointer, aborting\\n\");\n    abort();\n  }\n  return ptr;\n}\n\nstatic void *xrealloc(void *ptr, size_t size) {\n  void *new_ptr = realloc(ptr, size);\n  if (!new_ptr) {\n    fprintf(stderr, \"[cmark] realloc returned null pointer, aborting\\n\");\n    abort();\n  }\n  return new_ptr;\n}\n\ncmark_mem DEFAULT_MEM_ALLOCATOR = {xcalloc, xrealloc, free};\n\nchar *cmark_markdown_to_html(const char *text, size_t len, int options) {\n  cmark_node *doc;\n  char *result;\n\n  doc = cmark_parse_document(text, len, options);\n\n  result = cmark_render_html(doc, options);\n  cmark_node_free(doc);\n\n  return result;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/cmark.h",
    "content": "#ifndef CMARK_H\n#define CMARK_H\n\n#include <stdio.h>\n#include <cmark_export.h>\n#include <cmark_version.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** # NAME\n *\n * **cmark** - CommonMark parsing, manipulating, and rendering\n */\n\n/** # DESCRIPTION\n *\n * ## Simple Interface\n */\n\n/** Convert 'text' (assumed to be a UTF-8 encoded string with length\n * 'len') from CommonMark Markdown to HTML, returning a null-terminated,\n * UTF-8-encoded string. It is the caller's responsibility\n * to free the returned buffer.\n */\nCMARK_EXPORT\nchar *cmark_markdown_to_html(const char *text, size_t len, int options);\n\n/** ## Node Structure\n */\n\ntypedef enum {\n  /* Error status */\n  CMARK_NODE_NONE,\n\n  /* Block */\n  CMARK_NODE_DOCUMENT,\n  CMARK_NODE_BLOCK_QUOTE,\n  CMARK_NODE_LIST,\n  CMARK_NODE_ITEM,\n  CMARK_NODE_CODE_BLOCK,\n  CMARK_NODE_HTML_BLOCK,\n  CMARK_NODE_CUSTOM_BLOCK,\n  CMARK_NODE_PARAGRAPH,\n  CMARK_NODE_HEADING,\n  CMARK_NODE_THEMATIC_BREAK,\n\n  CMARK_NODE_FIRST_BLOCK = CMARK_NODE_DOCUMENT,\n  CMARK_NODE_LAST_BLOCK = CMARK_NODE_THEMATIC_BREAK,\n\n  /* Inline */\n  CMARK_NODE_TEXT,\n  CMARK_NODE_SOFTBREAK,\n  CMARK_NODE_LINEBREAK,\n  CMARK_NODE_CODE,\n  CMARK_NODE_HTML_INLINE,\n  CMARK_NODE_CUSTOM_INLINE,\n  CMARK_NODE_EMPH,\n  CMARK_NODE_STRONG,\n  CMARK_NODE_LINK,\n  CMARK_NODE_IMAGE,\n\n  CMARK_NODE_FIRST_INLINE = CMARK_NODE_TEXT,\n  CMARK_NODE_LAST_INLINE = CMARK_NODE_IMAGE,\n} cmark_node_type;\n\n/* For backwards compatibility: */\n#define CMARK_NODE_HEADER CMARK_NODE_HEADING\n#define CMARK_NODE_HRULE CMARK_NODE_THEMATIC_BREAK\n#define CMARK_NODE_HTML CMARK_NODE_HTML_BLOCK\n#define CMARK_NODE_INLINE_HTML CMARK_NODE_HTML_INLINE\n\ntypedef enum {\n  CMARK_NO_LIST,\n  CMARK_BULLET_LIST,\n  CMARK_ORDERED_LIST\n} cmark_list_type;\n\ntypedef enum {\n  CMARK_NO_DELIM,\n  CMARK_PERIOD_DELIM,\n  CMARK_PAREN_DELIM\n} cmark_delim_type;\n\ntypedef struct cmark_node cmark_node;\ntypedef struct cmark_parser cmark_parser;\ntypedef struct cmark_iter cmark_iter;\n\n/**\n * ## Custom memory allocator support\n */\n\n/** Defines the memory allocation functions to be used by CMark\n * when parsing and allocating a document tree\n */\ntypedef struct cmark_mem {\n  void *(*calloc)(size_t, size_t);\n  void *(*realloc)(void *, size_t);\n  void (*free)(void *);\n} cmark_mem;\n\n/**\n * ## Creating and Destroying Nodes\n */\n\n/** Creates a new node of type 'type'.  Note that the node may have\n * other required properties, which it is the caller's responsibility\n * to assign.\n */\nCMARK_EXPORT cmark_node *cmark_node_new(cmark_node_type type);\n\n/** Same as `cmark_node_new`, but explicitly listing the memory\n * allocator used to allocate the node.  Note:  be sure to use the same\n * allocator for every node in a tree, or bad things can happen.\n */\nCMARK_EXPORT cmark_node *cmark_node_new_with_mem(cmark_node_type type,\n                                                 cmark_mem *mem);\n\n/** Frees the memory allocated for a node and any children.\n */\nCMARK_EXPORT void cmark_node_free(cmark_node *node);\n\n/**\n * ## Tree Traversal\n */\n\n/** Returns the next node in the sequence after 'node', or NULL if\n * there is none.\n */\nCMARK_EXPORT cmark_node *cmark_node_next(cmark_node *node);\n\n/** Returns the previous node in the sequence after 'node', or NULL if\n * there is none.\n */\nCMARK_EXPORT cmark_node *cmark_node_previous(cmark_node *node);\n\n/** Returns the parent of 'node', or NULL if there is none.\n */\nCMARK_EXPORT cmark_node *cmark_node_parent(cmark_node *node);\n\n/** Returns the first child of 'node', or NULL if 'node' has no children.\n */\nCMARK_EXPORT cmark_node *cmark_node_first_child(cmark_node *node);\n\n/** Returns the last child of 'node', or NULL if 'node' has no children.\n */\nCMARK_EXPORT cmark_node *cmark_node_last_child(cmark_node *node);\n\n/**\n * ## Iterator\n *\n * An iterator will walk through a tree of nodes, starting from a root\n * node, returning one node at a time, together with information about\n * whether the node is being entered or exited.  The iterator will\n * first descend to a child node, if there is one.  When there is no\n * child, the iterator will go to the next sibling.  When there is no\n * next sibling, the iterator will return to the parent (but with\n * a 'cmark_event_type' of `CMARK_EVENT_EXIT`).  The iterator will\n * return `CMARK_EVENT_DONE` when it reaches the root node again.\n * One natural application is an HTML renderer, where an `ENTER` event\n * outputs an open tag and an `EXIT` event outputs a close tag.\n * An iterator might also be used to transform an AST in some systematic\n * way, for example, turning all level-3 headings into regular paragraphs.\n *\n *     void\n *     usage_example(cmark_node *root) {\n *         cmark_event_type ev_type;\n *         cmark_iter *iter = cmark_iter_new(root);\n *\n *         while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {\n *             cmark_node *cur = cmark_iter_get_node(iter);\n *             // Do something with `cur` and `ev_type`\n *         }\n *\n *         cmark_iter_free(iter);\n *     }\n *\n * Iterators will never return `EXIT` events for leaf nodes, which are nodes\n * of type:\n *\n * * CMARK_NODE_HTML_BLOCK\n * * CMARK_NODE_THEMATIC_BREAK\n * * CMARK_NODE_CODE_BLOCK\n * * CMARK_NODE_TEXT\n * * CMARK_NODE_SOFTBREAK\n * * CMARK_NODE_LINEBREAK\n * * CMARK_NODE_CODE\n * * CMARK_NODE_HTML_INLINE\n *\n * Nodes must only be modified after an `EXIT` event, or an `ENTER` event for\n * leaf nodes.\n */\n\ntypedef enum {\n  CMARK_EVENT_NONE,\n  CMARK_EVENT_DONE,\n  CMARK_EVENT_ENTER,\n  CMARK_EVENT_EXIT\n} cmark_event_type;\n\n/** Creates a new iterator starting at 'root'.  The current node and event\n * type are undefined until 'cmark_iter_next' is called for the first time.\n * The memory allocated for the iterator should be released using\n * 'cmark_iter_free' when it is no longer needed.\n */\nCMARK_EXPORT\ncmark_iter *cmark_iter_new(cmark_node *root);\n\n/** Frees the memory allocated for an iterator.\n */\nCMARK_EXPORT\nvoid cmark_iter_free(cmark_iter *iter);\n\n/** Advances to the next node and returns the event type (`CMARK_EVENT_ENTER`,\n * `CMARK_EVENT_EXIT` or `CMARK_EVENT_DONE`).\n */\nCMARK_EXPORT\ncmark_event_type cmark_iter_next(cmark_iter *iter);\n\n/** Returns the current node.\n */\nCMARK_EXPORT\ncmark_node *cmark_iter_get_node(cmark_iter *iter);\n\n/** Returns the current event type.\n */\nCMARK_EXPORT\ncmark_event_type cmark_iter_get_event_type(cmark_iter *iter);\n\n/** Returns the root node.\n */\nCMARK_EXPORT\ncmark_node *cmark_iter_get_root(cmark_iter *iter);\n\n/** Resets the iterator so that the current node is 'current' and\n * the event type is 'event_type'.  The new current node must be a\n * descendant of the root node or the root node itself.\n */\nCMARK_EXPORT\nvoid cmark_iter_reset(cmark_iter *iter, cmark_node *current,\n                      cmark_event_type event_type);\n\n/**\n * ## Accessors\n */\n\n/** Returns the user data of 'node'.\n */\nCMARK_EXPORT void *cmark_node_get_user_data(cmark_node *node);\n\n/** Sets arbitrary user data for 'node'.  Returns 1 on success,\n * 0 on failure.\n */\nCMARK_EXPORT int cmark_node_set_user_data(cmark_node *node, void *user_data);\n\n/** Returns the type of 'node', or `CMARK_NODE_NONE` on error.\n */\nCMARK_EXPORT cmark_node_type cmark_node_get_type(cmark_node *node);\n\n/** Like 'cmark_node_get_type', but returns a string representation\n    of the type, or `\"<unknown>\"`.\n */\nCMARK_EXPORT\nconst char *cmark_node_get_type_string(cmark_node *node);\n\n/** Returns the string contents of 'node', or an empty\n    string if none is set.  Returns NULL if called on a\n    node that does not have string content.\n */\nCMARK_EXPORT const char *cmark_node_get_literal(cmark_node *node);\n\n/** Sets the string contents of 'node'.  Returns 1 on success,\n * 0 on failure.\n */\nCMARK_EXPORT int cmark_node_set_literal(cmark_node *node, const char *content);\n\n/** Returns the heading level of 'node', or 0 if 'node' is not a heading.\n */\nCMARK_EXPORT int cmark_node_get_heading_level(cmark_node *node);\n\n/* For backwards compatibility */\n#define cmark_node_get_header_level cmark_node_get_heading_level\n#define cmark_node_set_header_level cmark_node_set_heading_level\n\n/** Sets the heading level of 'node', returning 1 on success and 0 on error.\n */\nCMARK_EXPORT int cmark_node_set_heading_level(cmark_node *node, int level);\n\n/** Returns the list type of 'node', or `CMARK_NO_LIST` if 'node'\n * is not a list.\n */\nCMARK_EXPORT cmark_list_type cmark_node_get_list_type(cmark_node *node);\n\n/** Sets the list type of 'node', returning 1 on success and 0 on error.\n */\nCMARK_EXPORT int cmark_node_set_list_type(cmark_node *node,\n                                          cmark_list_type type);\n\n/** Returns the list delimiter type of 'node', or `CMARK_NO_DELIM` if 'node'\n * is not a list.\n */\nCMARK_EXPORT cmark_delim_type cmark_node_get_list_delim(cmark_node *node);\n\n/** Sets the list delimiter type of 'node', returning 1 on success and 0\n * on error.\n */\nCMARK_EXPORT int cmark_node_set_list_delim(cmark_node *node,\n                                           cmark_delim_type delim);\n\n/** Returns starting number of 'node', if it is an ordered list, otherwise 0.\n */\nCMARK_EXPORT int cmark_node_get_list_start(cmark_node *node);\n\n/** Sets starting number of 'node', if it is an ordered list. Returns 1\n * on success, 0 on failure.\n */\nCMARK_EXPORT int cmark_node_set_list_start(cmark_node *node, int start);\n\n/** Returns 1 if 'node' is a tight list, 0 otherwise.\n */\nCMARK_EXPORT int cmark_node_get_list_tight(cmark_node *node);\n\n/** Sets the \"tightness\" of a list.  Returns 1 on success, 0 on failure.\n */\nCMARK_EXPORT int cmark_node_set_list_tight(cmark_node *node, int tight);\n\n/** Returns the info string from a fenced code block.\n */\nCMARK_EXPORT const char *cmark_node_get_fence_info(cmark_node *node);\n\n/** Sets the info string in a fenced code block, returning 1 on\n * success and 0 on failure.\n */\nCMARK_EXPORT int cmark_node_set_fence_info(cmark_node *node, const char *info);\n\n/** Returns the URL of a link or image 'node', or an empty string\n    if no URL is set.  Returns NULL if called on a node that is\n    not a link or image.\n */\nCMARK_EXPORT const char *cmark_node_get_url(cmark_node *node);\n\n/** Sets the URL of a link or image 'node'. Returns 1 on success,\n * 0 on failure.\n */\nCMARK_EXPORT int cmark_node_set_url(cmark_node *node, const char *url);\n\n/** Returns the title of a link or image 'node', or an empty\n    string if no title is set.  Returns NULL if called on a node\n    that is not a link or image.\n */\nCMARK_EXPORT const char *cmark_node_get_title(cmark_node *node);\n\n/** Sets the title of a link or image 'node'. Returns 1 on success,\n * 0 on failure.\n */\nCMARK_EXPORT int cmark_node_set_title(cmark_node *node, const char *title);\n\n/** Returns the literal \"on enter\" text for a custom 'node', or\n    an empty string if no on_enter is set.  Returns NULL if called\n    on a non-custom node.\n */\nCMARK_EXPORT const char *cmark_node_get_on_enter(cmark_node *node);\n\n/** Sets the literal text to render \"on enter\" for a custom 'node'.\n    Any children of the node will be rendered after this text.\n    Returns 1 on success 0 on failure.\n */\nCMARK_EXPORT int cmark_node_set_on_enter(cmark_node *node,\n                                         const char *on_enter);\n\n/** Returns the literal \"on exit\" text for a custom 'node', or\n    an empty string if no on_exit is set.  Returns NULL if\n    called on a non-custom node.\n */\nCMARK_EXPORT const char *cmark_node_get_on_exit(cmark_node *node);\n\n/** Sets the literal text to render \"on exit\" for a custom 'node'.\n    Any children of the node will be rendered before this text.\n    Returns 1 on success 0 on failure.\n */\nCMARK_EXPORT int cmark_node_set_on_exit(cmark_node *node, const char *on_exit);\n\n/** Returns the line on which 'node' begins.\n */\nCMARK_EXPORT int cmark_node_get_start_line(cmark_node *node);\n\n/** Returns the column at which 'node' begins.\n */\nCMARK_EXPORT int cmark_node_get_start_column(cmark_node *node);\n\n/** Returns the line on which 'node' ends.\n */\nCMARK_EXPORT int cmark_node_get_end_line(cmark_node *node);\n\n/** Returns the column at which 'node' ends.\n */\nCMARK_EXPORT int cmark_node_get_end_column(cmark_node *node);\n\n/**\n * ## Tree Manipulation\n */\n\n/** Unlinks a 'node', removing it from the tree, but not freeing its\n * memory.  (Use 'cmark_node_free' for that.)\n */\nCMARK_EXPORT void cmark_node_unlink(cmark_node *node);\n\n/** Inserts 'sibling' before 'node'.  Returns 1 on success, 0 on failure.\n */\nCMARK_EXPORT int cmark_node_insert_before(cmark_node *node,\n                                          cmark_node *sibling);\n\n/** Inserts 'sibling' after 'node'. Returns 1 on success, 0 on failure.\n */\nCMARK_EXPORT int cmark_node_insert_after(cmark_node *node, cmark_node *sibling);\n\n/** Replaces 'oldnode' with 'newnode' and unlinks 'oldnode' (but does\n * not free its memory).\n * Returns 1 on success, 0 on failure.\n */\nCMARK_EXPORT int cmark_node_replace(cmark_node *oldnode, cmark_node *newnode);\n\n/** Adds 'child' to the beginning of the children of 'node'.\n * Returns 1 on success, 0 on failure.\n */\nCMARK_EXPORT int cmark_node_prepend_child(cmark_node *node, cmark_node *child);\n\n/** Adds 'child' to the end of the children of 'node'.\n * Returns 1 on success, 0 on failure.\n */\nCMARK_EXPORT int cmark_node_append_child(cmark_node *node, cmark_node *child);\n\n/** Consolidates adjacent text nodes.\n */\nCMARK_EXPORT void cmark_consolidate_text_nodes(cmark_node *root);\n\n/**\n * ## Parsing\n *\n * Simple interface:\n *\n *     cmark_node *document = cmark_parse_document(\"Hello *world*\", 13,\n *                                                 CMARK_OPT_DEFAULT);\n *\n * Streaming interface:\n *\n *     cmark_parser *parser = cmark_parser_new(CMARK_OPT_DEFAULT);\n *     FILE *fp = fopen(\"myfile.md\", \"rb\");\n *     while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) {\n *     \t   cmark_parser_feed(parser, buffer, bytes);\n *     \t   if (bytes < sizeof(buffer)) {\n *     \t       break;\n *     \t   }\n *     }\n *     document = cmark_parser_finish(parser);\n *     cmark_parser_free(parser);\n */\n\n/** Creates a new parser object.\n */\nCMARK_EXPORT\ncmark_parser *cmark_parser_new(int options);\n\n/** Creates a new parser object with the given memory allocator\n */\nCMARK_EXPORT\ncmark_parser *cmark_parser_new_with_mem(int options, cmark_mem *mem);\n\n/** Frees memory allocated for a parser object.\n */\nCMARK_EXPORT\nvoid cmark_parser_free(cmark_parser *parser);\n\n/** Feeds a string of length 'len' to 'parser'.\n */\nCMARK_EXPORT\nvoid cmark_parser_feed(cmark_parser *parser, const char *buffer, size_t len);\n\n/** Finish parsing and return a pointer to a tree of nodes.\n */\nCMARK_EXPORT\ncmark_node *cmark_parser_finish(cmark_parser *parser);\n\n/** Parse a CommonMark document in 'buffer' of length 'len'.\n * Returns a pointer to a tree of nodes.  The memory allocated for\n * the node tree should be released using 'cmark_node_free'\n * when it is no longer needed.\n */\nCMARK_EXPORT\ncmark_node *cmark_parse_document(const char *buffer, size_t len, int options);\n\n/** Parse a CommonMark document in file 'f', returning a pointer to\n * a tree of nodes.  The memory allocated for the node tree should be\n * released using 'cmark_node_free' when it is no longer needed.\n */\nCMARK_EXPORT\ncmark_node *cmark_parse_file(FILE *f, int options);\n\n/**\n * ## Rendering\n */\n\n/** Render a 'node' tree as XML.  It is the caller's responsibility\n * to free the returned buffer.\n */\nCMARK_EXPORT\nchar *cmark_render_xml(cmark_node *root, int options);\n\n/** Render a 'node' tree as an HTML fragment.  It is up to the user\n * to add an appropriate header and footer. It is the caller's\n * responsibility to free the returned buffer.\n */\nCMARK_EXPORT\nchar *cmark_render_html(cmark_node *root, int options);\n\n/** Render a 'node' tree as a groff man page, without the header.\n * It is the caller's responsibility to free the returned buffer.\n */\nCMARK_EXPORT\nchar *cmark_render_man(cmark_node *root, int options, int width);\n\n/** Render a 'node' tree as a commonmark document.\n * It is the caller's responsibility to free the returned buffer.\n */\nCMARK_EXPORT\nchar *cmark_render_commonmark(cmark_node *root, int options, int width);\n\n/** Render a 'node' tree as a LaTeX document.\n * It is the caller's responsibility to free the returned buffer.\n */\nCMARK_EXPORT\nchar *cmark_render_latex(cmark_node *root, int options, int width);\n\n/**\n * ## Options\n */\n\n/** Default options.\n */\n#define CMARK_OPT_DEFAULT 0\n\n/**\n * ### Options affecting rendering\n */\n\n/** Include a `data-sourcepos` attribute on all block elements.\n */\n#define CMARK_OPT_SOURCEPOS (1 << 1)\n\n/** Render `softbreak` elements as hard line breaks.\n */\n#define CMARK_OPT_HARDBREAKS (1 << 2)\n\n/** `CMARK_OPT_SAFE` is defined here for API compatibility,\n    but it no longer has any effect. \"Safe\" mode is now the default:\n    set `CMARK_OPT_UNSAFE` to disable it.\n */\n#define CMARK_OPT_SAFE (1 << 3)\n\n/** Render raw HTML and unsafe links (`javascript:`, `vbscript:`,\n * `file:`, and `data:`, except for `image/png`, `image/gif`,\n * `image/jpeg`, or `image/webp` mime types).  By default,\n * raw HTML is replaced by a placeholder HTML comment. Unsafe\n * links are replaced by empty strings.\n */\n#define CMARK_OPT_UNSAFE (1 << 17)\n\n/** Render `softbreak` elements as spaces.\n */\n#define CMARK_OPT_NOBREAKS (1 << 4)\n\n/**\n * ### Options affecting parsing\n */\n\n/** Legacy option (no effect).\n */\n#define CMARK_OPT_NORMALIZE (1 << 8)\n\n/** Validate UTF-8 in the input before parsing, replacing illegal\n * sequences with the replacement character U+FFFD.\n */\n#define CMARK_OPT_VALIDATE_UTF8 (1 << 9)\n\n/** Convert straight quotes to curly, --- to em dashes, -- to en dashes.\n */\n#define CMARK_OPT_SMART (1 << 10)\n\n/**\n * ## Version information\n */\n\n/** The library version as integer for runtime checks. Also available as\n * macro CMARK_VERSION for compile time checks.\n *\n * * Bits 16-23 contain the major version.\n * * Bits 8-15 contain the minor version.\n * * Bits 0-7 contain the patchlevel.\n *\n * In hexadecimal format, the number 0x010203 represents version 1.2.3.\n */\nCMARK_EXPORT\nint cmark_version(void);\n\n/** The library version string for runtime checks. Also available as\n * macro CMARK_VERSION_STRING for compile time checks.\n */\nCMARK_EXPORT\nconst char *cmark_version_string(void);\n\n/** # AUTHORS\n *\n * John MacFarlane, Vicent Marti,  Kārlis Gaņģis, Nick Wellnhofer.\n */\n\n#ifndef CMARK_NO_SHORT_NAMES\n#define NODE_DOCUMENT CMARK_NODE_DOCUMENT\n#define NODE_BLOCK_QUOTE CMARK_NODE_BLOCK_QUOTE\n#define NODE_LIST CMARK_NODE_LIST\n#define NODE_ITEM CMARK_NODE_ITEM\n#define NODE_CODE_BLOCK CMARK_NODE_CODE_BLOCK\n#define NODE_HTML_BLOCK CMARK_NODE_HTML_BLOCK\n#define NODE_CUSTOM_BLOCK CMARK_NODE_CUSTOM_BLOCK\n#define NODE_PARAGRAPH CMARK_NODE_PARAGRAPH\n#define NODE_HEADING CMARK_NODE_HEADING\n#define NODE_HEADER CMARK_NODE_HEADER\n#define NODE_THEMATIC_BREAK CMARK_NODE_THEMATIC_BREAK\n#define NODE_HRULE CMARK_NODE_HRULE\n#define NODE_TEXT CMARK_NODE_TEXT\n#define NODE_SOFTBREAK CMARK_NODE_SOFTBREAK\n#define NODE_LINEBREAK CMARK_NODE_LINEBREAK\n#define NODE_CODE CMARK_NODE_CODE\n#define NODE_HTML_INLINE CMARK_NODE_HTML_INLINE\n#define NODE_CUSTOM_INLINE CMARK_NODE_CUSTOM_INLINE\n#define NODE_EMPH CMARK_NODE_EMPH\n#define NODE_STRONG CMARK_NODE_STRONG\n#define NODE_LINK CMARK_NODE_LINK\n#define NODE_IMAGE CMARK_NODE_IMAGE\n#define BULLET_LIST CMARK_BULLET_LIST\n#define ORDERED_LIST CMARK_ORDERED_LIST\n#define PERIOD_DELIM CMARK_PERIOD_DELIM\n#define PAREN_DELIM CMARK_PAREN_DELIM\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/cmark_ctype.c",
    "content": "#include <stdint.h>\n\n#include \"cmark_ctype.h\"\n\n/** 1 = space, 2 = punct, 3 = digit, 4 = alpha, 0 = other\n */\nstatic const uint8_t cmark_ctype_class[256] = {\n    /*      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */\n    /* 0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,\n    /* 1 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    /* 2 */ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n    /* 3 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2,\n    /* 4 */ 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,\n    /* 5 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2,\n    /* 6 */ 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,\n    /* 7 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 0,\n    /* 8 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    /* 9 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    /* a */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    /* b */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    /* c */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    /* d */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    /* e */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    /* f */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};\n\n/**\n * Returns 1 if c is a \"whitespace\" character as defined by the spec.\n */\nint cmark_isspace(char c) { return cmark_ctype_class[(uint8_t)c] == 1; }\n\n/**\n * Returns 1 if c is an ascii punctuation character.\n */\nint cmark_ispunct(char c) { return cmark_ctype_class[(uint8_t)c] == 2; }\n\nint cmark_isalnum(char c) {\n  uint8_t result;\n  result = cmark_ctype_class[(uint8_t)c];\n  return (result == 3 || result == 4);\n}\n\nint cmark_isdigit(char c) { return cmark_ctype_class[(uint8_t)c] == 3; }\n\nint cmark_isalpha(char c) { return cmark_ctype_class[(uint8_t)c] == 4; }\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/cmark_ctype.h",
    "content": "#ifndef CMARK_CMARK_CTYPE_H\n#define CMARK_CMARK_CTYPE_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** Locale-independent versions of functions from ctype.h.\n * We want cmark to behave the same no matter what the system locale.\n */\n\nint cmark_isspace(char c);\n\nint cmark_ispunct(char c);\n\nint cmark_isalnum(char c);\n\nint cmark_isdigit(char c);\n\nint cmark_isalpha(char c);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/cmark_version.h.in",
    "content": "#ifndef CMARK_VERSION_H\n#define CMARK_VERSION_H\n\n#define CMARK_VERSION ((@PROJECT_VERSION_MAJOR@ << 16) | (@PROJECT_VERSION_MINOR@ << 8)  | @PROJECT_VERSION_PATCH@)\n#define CMARK_VERSION_STRING \"@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@\"\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/commonmark.c",
    "content": "#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <stdint.h>\n#include <assert.h>\n\n#include \"config.h\"\n#include \"cmark.h\"\n#include \"node.h\"\n#include \"buffer.h\"\n#include \"utf8.h\"\n#include \"scanners.h\"\n#include \"render.h\"\n\n#define OUT(s, wrap, escaping) renderer->out(renderer, s, wrap, escaping)\n#define LIT(s) renderer->out(renderer, s, false, LITERAL)\n#define CR() renderer->cr(renderer)\n#define BLANKLINE() renderer->blankline(renderer)\n#define ENCODED_SIZE 20\n#define LISTMARKER_SIZE 20\n\n// Functions to convert cmark_nodes to commonmark strings.\n\nstatic CMARK_INLINE void outc(cmark_renderer *renderer, cmark_escaping escape,\n                              int32_t c, unsigned char nextc) {\n  bool needs_escaping = false;\n  bool follows_digit =\n      renderer->buffer->size > 0 &&\n      cmark_isdigit(renderer->buffer->ptr[renderer->buffer->size - 1]);\n  char encoded[ENCODED_SIZE];\n\n  needs_escaping =\n      c < 0x80 && escape != LITERAL &&\n      ((escape == NORMAL &&\n        (c < 0x20 ||\n\t c == '*' || c == '_' || c == '[' || c == ']' || c == '#' || c == '<' ||\n         c == '>' || c == '\\\\' || c == '`' || c == '!' ||\n         (c == '&' && cmark_isalpha(nextc)) || (c == '!' && nextc == '[') ||\n         (renderer->begin_content && (c == '-' || c == '+' || c == '=') &&\n          // begin_content doesn't get set to false til we've passed digits\n          // at the beginning of line, so...\n          !follows_digit) ||\n         (renderer->begin_content && (c == '.' || c == ')') && follows_digit &&\n          (nextc == 0 || cmark_isspace(nextc))))) ||\n       (escape == URL &&\n        (c == '`' || c == '<' || c == '>' || cmark_isspace(c) || c == '\\\\' ||\n         c == ')' || c == '(')) ||\n       (escape == TITLE &&\n        (c == '`' || c == '<' || c == '>' || c == '\"' || c == '\\\\')));\n\n  if (needs_escaping) {\n    if (escape == URL && cmark_isspace(c)) {\n      // use percent encoding for spaces\n      snprintf(encoded, ENCODED_SIZE, \"%%%2X\", c);\n      cmark_strbuf_puts(renderer->buffer, encoded);\n      renderer->column += 3;\n    } else if (cmark_ispunct(c)) {\n      cmark_render_ascii(renderer, \"\\\\\");\n      cmark_render_code_point(renderer, c);\n    } else { // render as entity\n      snprintf(encoded, ENCODED_SIZE, \"&#%d;\", c);\n      cmark_strbuf_puts(renderer->buffer, encoded);\n      renderer->column += strlen(encoded);\n    }\n  } else {\n    cmark_render_code_point(renderer, c);\n  }\n}\n\nstatic int longest_backtick_sequence(const char *code) {\n  int longest = 0;\n  int current = 0;\n  size_t i = 0;\n  size_t code_len = strlen(code);\n  while (i <= code_len) {\n    if (code[i] == '`') {\n      current++;\n    } else {\n      if (current > longest) {\n        longest = current;\n      }\n      current = 0;\n    }\n    i++;\n  }\n  return longest;\n}\n\nstatic int shortest_unused_backtick_sequence(const char *code) {\n  // note: if the shortest sequence is >= 32, this returns 32\n  // so as not to overflow the bit array.\n  uint32_t used = 1;\n  int current = 0;\n  size_t i = 0;\n  size_t code_len = strlen(code);\n  while (i <= code_len) {\n    if (code[i] == '`') {\n      current++;\n    } else {\n      if (current > 0 && current < 32) {\n        used |= (1U << current);\n      }\n      current = 0;\n    }\n    i++;\n  }\n  // return number of first bit that is 0:\n  i = 0;\n  while (i < 32 && used & 1) {\n    used = used >> 1;\n    i++;\n  }\n  return (int)i;\n}\n\nstatic bool is_autolink(cmark_node *node) {\n  cmark_chunk *title;\n  cmark_chunk *url;\n  cmark_node *link_text;\n  char *realurl;\n  int realurllen;\n\n  if (node->type != CMARK_NODE_LINK) {\n    return false;\n  }\n\n  url = &node->as.link.url;\n  if (url->len == 0 || scan_scheme(url, 0) == 0) {\n    return false;\n  }\n\n  title = &node->as.link.title;\n  // if it has a title, we can't treat it as an autolink:\n  if (title->len > 0) {\n    return false;\n  }\n\n  link_text = node->first_child;\n  if (link_text == NULL) {\n    return false;\n  }\n  cmark_consolidate_text_nodes(link_text);\n  realurl = (char *)url->data;\n  realurllen = url->len;\n  if (strncmp(realurl, \"mailto:\", 7) == 0) {\n    realurl += 7;\n    realurllen -= 7;\n  }\n  return (realurllen == link_text->as.literal.len &&\n          strncmp(realurl, (char *)link_text->as.literal.data,\n                  link_text->as.literal.len) == 0);\n}\n\n// if node is a block node, returns node.\n// otherwise returns first block-level node that is an ancestor of node.\n// if there is no block-level ancestor, returns NULL.\nstatic cmark_node *get_containing_block(cmark_node *node) {\n  while (node) {\n    if (node->type >= CMARK_NODE_FIRST_BLOCK &&\n        node->type <= CMARK_NODE_LAST_BLOCK) {\n      return node;\n    } else {\n      node = node->parent;\n    }\n  }\n  return NULL;\n}\n\nstatic int S_render_node(cmark_renderer *renderer, cmark_node *node,\n                         cmark_event_type ev_type, int options) {\n  cmark_node *tmp;\n  int list_number;\n  cmark_delim_type list_delim;\n  int numticks;\n  bool extra_spaces;\n  int i;\n  bool entering = (ev_type == CMARK_EVENT_ENTER);\n  const char *info, *code, *title;\n  char fencechar[2] = {'\\0', '\\0'};\n  size_t info_len, code_len;\n  char listmarker[LISTMARKER_SIZE];\n  char *emph_delim;\n  bool first_in_list_item;\n  bufsize_t marker_width;\n  bool allow_wrap = renderer->width > 0 && !(CMARK_OPT_NOBREAKS & options) &&\n                    !(CMARK_OPT_HARDBREAKS & options);\n\n  // Don't adjust tight list status til we've started the list.\n  // Otherwise we loose the blank line between a paragraph and\n  // a following list.\n  if (!(node->type == CMARK_NODE_ITEM && node->prev == NULL && entering)) {\n    tmp = get_containing_block(node);\n    renderer->in_tight_list_item =\n        tmp && // tmp might be NULL if there is no containing block\n        ((tmp->type == CMARK_NODE_ITEM &&\n          cmark_node_get_list_tight(tmp->parent)) ||\n         (tmp && tmp->parent && tmp->parent->type == CMARK_NODE_ITEM &&\n          cmark_node_get_list_tight(tmp->parent->parent)));\n  }\n\n  switch (node->type) {\n  case CMARK_NODE_DOCUMENT:\n    break;\n\n  case CMARK_NODE_BLOCK_QUOTE:\n    if (entering) {\n      LIT(\"> \");\n      renderer->begin_content = true;\n      cmark_strbuf_puts(renderer->prefix, \"> \");\n    } else {\n      cmark_strbuf_truncate(renderer->prefix, renderer->prefix->size - 2);\n      BLANKLINE();\n    }\n    break;\n\n  case CMARK_NODE_LIST:\n    if (!entering && node->next && (node->next->type == CMARK_NODE_CODE_BLOCK ||\n                                    node->next->type == CMARK_NODE_LIST)) {\n      // this ensures that a following indented code block or list will be\n      // inteprereted correctly.\n      CR();\n      LIT(\"<!-- end list -->\");\n      BLANKLINE();\n    }\n    break;\n\n  case CMARK_NODE_ITEM:\n    if (cmark_node_get_list_type(node->parent) == CMARK_BULLET_LIST) {\n      marker_width = 4;\n    } else {\n      list_number = cmark_node_get_list_start(node->parent);\n      list_delim = cmark_node_get_list_delim(node->parent);\n      tmp = node;\n      while (tmp->prev) {\n        tmp = tmp->prev;\n        list_number += 1;\n      }\n      // we ensure a width of at least 4 so\n      // we get nice transition from single digits\n      // to double\n      snprintf(listmarker, LISTMARKER_SIZE, \"%d%s%s\", list_number,\n               list_delim == CMARK_PAREN_DELIM ? \")\" : \".\",\n               list_number < 10 ? \"  \" : \" \");\n      marker_width = strlen(listmarker);\n    }\n    if (entering) {\n      if (cmark_node_get_list_type(node->parent) == CMARK_BULLET_LIST) {\n        LIT(\"  - \");\n        renderer->begin_content = true;\n      } else {\n        LIT(listmarker);\n        renderer->begin_content = true;\n      }\n      for (i = marker_width; i--;) {\n        cmark_strbuf_putc(renderer->prefix, ' ');\n      }\n    } else {\n      cmark_strbuf_truncate(renderer->prefix,\n                            renderer->prefix->size - marker_width);\n      CR();\n    }\n    break;\n\n  case CMARK_NODE_HEADING:\n    if (entering) {\n      for (i = cmark_node_get_heading_level(node); i > 0; i--) {\n        LIT(\"#\");\n      }\n      LIT(\" \");\n      renderer->begin_content = true;\n      renderer->no_linebreaks = true;\n    } else {\n      renderer->no_linebreaks = false;\n      BLANKLINE();\n    }\n    break;\n\n  case CMARK_NODE_CODE_BLOCK:\n    first_in_list_item = node->prev == NULL && node->parent &&\n                         node->parent->type == CMARK_NODE_ITEM;\n\n    if (!first_in_list_item) {\n      BLANKLINE();\n    }\n    info = cmark_node_get_fence_info(node);\n    info_len = strlen(info);\n    fencechar[0] = strchr(info, '`') == NULL ? '`' : '~';\n    code = cmark_node_get_literal(node);\n    code_len = strlen(code);\n    // use indented form if no info, and code doesn't\n    // begin or end with a blank line, and code isn't\n    // first thing in a list item\n    if (info_len == 0 && (code_len > 2 && !cmark_isspace(code[0]) &&\n                          !(cmark_isspace(code[code_len - 1]) &&\n                            cmark_isspace(code[code_len - 2]))) &&\n        !first_in_list_item) {\n      LIT(\"    \");\n      cmark_strbuf_puts(renderer->prefix, \"    \");\n      OUT(cmark_node_get_literal(node), false, LITERAL);\n      cmark_strbuf_truncate(renderer->prefix, renderer->prefix->size - 4);\n    } else {\n      numticks = longest_backtick_sequence(code) + 1;\n      if (numticks < 3) {\n        numticks = 3;\n      }\n      for (i = 0; i < numticks; i++) {\n        LIT(fencechar);\n      }\n      LIT(\" \");\n      OUT(info, false, LITERAL);\n      CR();\n      OUT(cmark_node_get_literal(node), false, LITERAL);\n      CR();\n      for (i = 0; i < numticks; i++) {\n        LIT(fencechar);\n      }\n    }\n    BLANKLINE();\n    break;\n\n  case CMARK_NODE_HTML_BLOCK:\n    BLANKLINE();\n    OUT(cmark_node_get_literal(node), false, LITERAL);\n    BLANKLINE();\n    break;\n\n  case CMARK_NODE_CUSTOM_BLOCK:\n    BLANKLINE();\n    OUT(entering ? cmark_node_get_on_enter(node) : cmark_node_get_on_exit(node),\n        false, LITERAL);\n    BLANKLINE();\n    break;\n\n  case CMARK_NODE_THEMATIC_BREAK:\n    BLANKLINE();\n    LIT(\"-----\");\n    BLANKLINE();\n    break;\n\n  case CMARK_NODE_PARAGRAPH:\n    if (!entering) {\n      BLANKLINE();\n    }\n    break;\n\n  case CMARK_NODE_TEXT:\n    OUT(cmark_node_get_literal(node), allow_wrap, NORMAL);\n    break;\n\n  case CMARK_NODE_LINEBREAK:\n    if (!(CMARK_OPT_HARDBREAKS & options)) {\n      LIT(\"  \");\n    }\n    CR();\n    break;\n\n  case CMARK_NODE_SOFTBREAK:\n    if (CMARK_OPT_HARDBREAKS & options) {\n      LIT(\"  \");\n      CR();\n    } else if (!renderer->no_linebreaks && renderer->width == 0 &&\n               !(CMARK_OPT_HARDBREAKS & options) &&\n               !(CMARK_OPT_NOBREAKS & options)) {\n      CR();\n    } else {\n      OUT(\" \", allow_wrap, LITERAL);\n    }\n    break;\n\n  case CMARK_NODE_CODE:\n    code = cmark_node_get_literal(node);\n    code_len = strlen(code);\n    numticks = shortest_unused_backtick_sequence(code);\n    extra_spaces = code_len == 0 ||\n\t    code[0] == '`' || code[code_len - 1] == '`' ||\n\t    code[0] == ' ' || code[code_len - 1] == ' ';\n    for (i = 0; i < numticks; i++) {\n      LIT(\"`\");\n    }\n    if (extra_spaces) {\n      LIT(\" \");\n    }\n    OUT(cmark_node_get_literal(node), allow_wrap, LITERAL);\n    if (extra_spaces) {\n      LIT(\" \");\n    }\n    for (i = 0; i < numticks; i++) {\n      LIT(\"`\");\n    }\n    break;\n\n  case CMARK_NODE_HTML_INLINE:\n    OUT(cmark_node_get_literal(node), false, LITERAL);\n    break;\n\n  case CMARK_NODE_CUSTOM_INLINE:\n    OUT(entering ? cmark_node_get_on_enter(node) : cmark_node_get_on_exit(node),\n        false, LITERAL);\n    break;\n\n  case CMARK_NODE_STRONG:\n    if (entering) {\n      LIT(\"**\");\n    } else {\n      LIT(\"**\");\n    }\n    break;\n\n  case CMARK_NODE_EMPH:\n    // If we have EMPH(EMPH(x)), we need to use *_x_*\n    // because **x** is STRONG(x):\n    if (node->parent && node->parent->type == CMARK_NODE_EMPH &&\n        node->next == NULL && node->prev == NULL) {\n      emph_delim = \"_\";\n    } else {\n      emph_delim = \"*\";\n    }\n    if (entering) {\n      LIT(emph_delim);\n    } else {\n      LIT(emph_delim);\n    }\n    break;\n\n  case CMARK_NODE_LINK:\n    if (is_autolink(node)) {\n      if (entering) {\n        LIT(\"<\");\n        if (strncmp(cmark_node_get_url(node), \"mailto:\", 7) == 0) {\n          LIT((const char *)cmark_node_get_url(node) + 7);\n        } else {\n          LIT((const char *)cmark_node_get_url(node));\n        }\n        LIT(\">\");\n        // return signal to skip contents of node...\n        return 0;\n      }\n    } else {\n      if (entering) {\n        LIT(\"[\");\n      } else {\n        LIT(\"](\");\n        OUT(cmark_node_get_url(node), false, URL);\n        title = cmark_node_get_title(node);\n        if (strlen(title) > 0) {\n          LIT(\" \\\"\");\n          OUT(title, false, TITLE);\n          LIT(\"\\\"\");\n        }\n        LIT(\")\");\n      }\n    }\n    break;\n\n  case CMARK_NODE_IMAGE:\n    if (entering) {\n      LIT(\"![\");\n    } else {\n      LIT(\"](\");\n      OUT(cmark_node_get_url(node), false, URL);\n      title = cmark_node_get_title(node);\n      if (strlen(title) > 0) {\n        OUT(\" \\\"\", allow_wrap, LITERAL);\n        OUT(title, false, TITLE);\n        LIT(\"\\\"\");\n      }\n      LIT(\")\");\n    }\n    break;\n\n  default:\n    assert(false);\n    break;\n  }\n\n  return 1;\n}\n\nchar *cmark_render_commonmark(cmark_node *root, int options, int width) {\n  if (options & CMARK_OPT_HARDBREAKS) {\n    // disable breaking on width, since it has\n    // a different meaning with OPT_HARDBREAKS\n    width = 0;\n  }\n  return cmark_render(root, options, width, outc, S_render_node);\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/config.h.in",
    "content": "#ifndef CMARK_CONFIG_H\n#define CMARK_CONFIG_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#cmakedefine HAVE_STDBOOL_H\n\n#ifdef HAVE_STDBOOL_H\n  #include <stdbool.h>\n#elif !defined(__cplusplus)\n  typedef char bool;\n#endif\n\n#cmakedefine HAVE___BUILTIN_EXPECT\n\n#cmakedefine HAVE___ATTRIBUTE__\n\n#ifdef HAVE___ATTRIBUTE__\n  #define CMARK_ATTRIBUTE(list) __attribute__ (list)\n#else\n  #define CMARK_ATTRIBUTE(list)\n#endif\n\n#ifndef CMARK_INLINE\n  #if defined(_MSC_VER) && !defined(__cplusplus)\n    #define CMARK_INLINE __inline\n  #else\n    #define CMARK_INLINE inline\n  #endif\n#endif\n\n/* snprintf and vsnprintf fallbacks for MSVC before 2015,\n   due to Valentin Milea http://stackoverflow.com/questions/2915672/\n*/\n\n#if defined(_MSC_VER) && _MSC_VER < 1900\n\n#include <stdio.h>\n#include <stdarg.h>\n\n#define snprintf c99_snprintf\n#define vsnprintf c99_vsnprintf\n\nCMARK_INLINE int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap)\n{\n    int count = -1;\n\n    if (size != 0)\n        count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap);\n    if (count == -1)\n        count = _vscprintf(format, ap);\n\n    return count;\n}\n\nCMARK_INLINE int c99_snprintf(char *outBuf, size_t size, const char *format, ...)\n{\n    int count;\n    va_list ap;\n\n    va_start(ap, format);\n    count = c99_vsnprintf(outBuf, size, format, ap);\n    va_end(ap);\n\n    return count;\n}\n\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/entities.inc",
    "content": "/* Autogenerated by tools/make_headers_inc.py */\n\nstruct cmark_entity_node {\n\tunsigned char *entity;\n        unsigned char bytes[8];\n};\n\n#define CMARK_ENTITY_MIN_LENGTH 2\n#define CMARK_ENTITY_MAX_LENGTH 32\n#define CMARK_NUM_ENTITIES 2125\n\nstatic const struct cmark_entity_node cmark_entities[] = {\n{(unsigned char*)\"AElig\", {195, 134, 0}},\n{(unsigned char*)\"AMP\", {38, 0}},\n{(unsigned char*)\"Aacute\", {195, 129, 0}},\n{(unsigned char*)\"Abreve\", {196, 130, 0}},\n{(unsigned char*)\"Acirc\", {195, 130, 0}},\n{(unsigned char*)\"Acy\", {208, 144, 0}},\n{(unsigned char*)\"Afr\", {240, 157, 148, 132, 0}},\n{(unsigned char*)\"Agrave\", {195, 128, 0}},\n{(unsigned char*)\"Alpha\", {206, 145, 0}},\n{(unsigned char*)\"Amacr\", {196, 128, 0}},\n{(unsigned char*)\"And\", {226, 169, 147, 0}},\n{(unsigned char*)\"Aogon\", {196, 132, 0}},\n{(unsigned char*)\"Aopf\", {240, 157, 148, 184, 0}},\n{(unsigned char*)\"ApplyFunction\", {226, 129, 161, 0}},\n{(unsigned char*)\"Aring\", {195, 133, 0}},\n{(unsigned char*)\"Ascr\", {240, 157, 146, 156, 0}},\n{(unsigned char*)\"Assign\", {226, 137, 148, 0}},\n{(unsigned char*)\"Atilde\", {195, 131, 0}},\n{(unsigned char*)\"Auml\", {195, 132, 0}},\n{(unsigned char*)\"Backslash\", {226, 136, 150, 0}},\n{(unsigned char*)\"Barv\", {226, 171, 167, 0}},\n{(unsigned char*)\"Barwed\", {226, 140, 134, 0}},\n{(unsigned char*)\"Bcy\", {208, 145, 0}},\n{(unsigned char*)\"Because\", {226, 136, 181, 0}},\n{(unsigned char*)\"Bernoullis\", {226, 132, 172, 0}},\n{(unsigned char*)\"Beta\", {206, 146, 0}},\n{(unsigned char*)\"Bfr\", {240, 157, 148, 133, 0}},\n{(unsigned char*)\"Bopf\", {240, 157, 148, 185, 0}},\n{(unsigned char*)\"Breve\", {203, 152, 0}},\n{(unsigned char*)\"Bscr\", {226, 132, 172, 0}},\n{(unsigned char*)\"Bumpeq\", {226, 137, 142, 0}},\n{(unsigned char*)\"CHcy\", {208, 167, 0}},\n{(unsigned char*)\"COPY\", {194, 169, 0}},\n{(unsigned char*)\"Cacute\", {196, 134, 0}},\n{(unsigned char*)\"Cap\", {226, 139, 146, 0}},\n{(unsigned char*)\"CapitalDifferentialD\", {226, 133, 133, 0}},\n{(unsigned char*)\"Cayleys\", {226, 132, 173, 0}},\n{(unsigned char*)\"Ccaron\", {196, 140, 0}},\n{(unsigned char*)\"Ccedil\", {195, 135, 0}},\n{(unsigned char*)\"Ccirc\", {196, 136, 0}},\n{(unsigned char*)\"Cconint\", {226, 136, 176, 0}},\n{(unsigned char*)\"Cdot\", {196, 138, 0}},\n{(unsigned char*)\"Cedilla\", {194, 184, 0}},\n{(unsigned char*)\"CenterDot\", {194, 183, 0}},\n{(unsigned char*)\"Cfr\", {226, 132, 173, 0}},\n{(unsigned char*)\"Chi\", {206, 167, 0}},\n{(unsigned char*)\"CircleDot\", {226, 138, 153, 0}},\n{(unsigned char*)\"CircleMinus\", {226, 138, 150, 0}},\n{(unsigned char*)\"CirclePlus\", {226, 138, 149, 0}},\n{(unsigned char*)\"CircleTimes\", {226, 138, 151, 0}},\n{(unsigned char*)\"ClockwiseContourIntegral\", {226, 136, 178, 0}},\n{(unsigned char*)\"CloseCurlyDoubleQuote\", {226, 128, 157, 0}},\n{(unsigned char*)\"CloseCurlyQuote\", {226, 128, 153, 0}},\n{(unsigned char*)\"Colon\", {226, 136, 183, 0}},\n{(unsigned char*)\"Colone\", {226, 169, 180, 0}},\n{(unsigned char*)\"Congruent\", {226, 137, 161, 0}},\n{(unsigned char*)\"Conint\", {226, 136, 175, 0}},\n{(unsigned char*)\"ContourIntegral\", {226, 136, 174, 0}},\n{(unsigned char*)\"Copf\", {226, 132, 130, 0}},\n{(unsigned char*)\"Coproduct\", {226, 136, 144, 0}},\n{(unsigned char*)\"CounterClockwiseContourIntegral\", {226, 136, 179, 0}},\n{(unsigned char*)\"Cross\", {226, 168, 175, 0}},\n{(unsigned char*)\"Cscr\", {240, 157, 146, 158, 0}},\n{(unsigned char*)\"Cup\", {226, 139, 147, 0}},\n{(unsigned char*)\"CupCap\", {226, 137, 141, 0}},\n{(unsigned char*)\"DD\", {226, 133, 133, 0}},\n{(unsigned char*)\"DDotrahd\", {226, 164, 145, 0}},\n{(unsigned char*)\"DJcy\", {208, 130, 0}},\n{(unsigned char*)\"DScy\", {208, 133, 0}},\n{(unsigned char*)\"DZcy\", {208, 143, 0}},\n{(unsigned char*)\"Dagger\", {226, 128, 161, 0}},\n{(unsigned char*)\"Darr\", {226, 134, 161, 0}},\n{(unsigned char*)\"Dashv\", {226, 171, 164, 0}},\n{(unsigned char*)\"Dcaron\", {196, 142, 0}},\n{(unsigned char*)\"Dcy\", {208, 148, 0}},\n{(unsigned char*)\"Del\", {226, 136, 135, 0}},\n{(unsigned char*)\"Delta\", {206, 148, 0}},\n{(unsigned char*)\"Dfr\", {240, 157, 148, 135, 0}},\n{(unsigned char*)\"DiacriticalAcute\", {194, 180, 0}},\n{(unsigned char*)\"DiacriticalDot\", {203, 153, 0}},\n{(unsigned char*)\"DiacriticalDoubleAcute\", {203, 157, 0}},\n{(unsigned char*)\"DiacriticalGrave\", {96, 0}},\n{(unsigned char*)\"DiacriticalTilde\", {203, 156, 0}},\n{(unsigned char*)\"Diamond\", {226, 139, 132, 0}},\n{(unsigned char*)\"DifferentialD\", {226, 133, 134, 0}},\n{(unsigned char*)\"Dopf\", {240, 157, 148, 187, 0}},\n{(unsigned char*)\"Dot\", {194, 168, 0}},\n{(unsigned char*)\"DotDot\", {226, 131, 156, 0}},\n{(unsigned char*)\"DotEqual\", {226, 137, 144, 0}},\n{(unsigned char*)\"DoubleContourIntegral\", {226, 136, 175, 0}},\n{(unsigned char*)\"DoubleDot\", {194, 168, 0}},\n{(unsigned char*)\"DoubleDownArrow\", {226, 135, 147, 0}},\n{(unsigned char*)\"DoubleLeftArrow\", {226, 135, 144, 0}},\n{(unsigned char*)\"DoubleLeftRightArrow\", {226, 135, 148, 0}},\n{(unsigned char*)\"DoubleLeftTee\", {226, 171, 164, 0}},\n{(unsigned char*)\"DoubleLongLeftArrow\", {226, 159, 184, 0}},\n{(unsigned char*)\"DoubleLongLeftRightArrow\", {226, 159, 186, 0}},\n{(unsigned char*)\"DoubleLongRightArrow\", {226, 159, 185, 0}},\n{(unsigned char*)\"DoubleRightArrow\", {226, 135, 146, 0}},\n{(unsigned char*)\"DoubleRightTee\", {226, 138, 168, 0}},\n{(unsigned char*)\"DoubleUpArrow\", {226, 135, 145, 0}},\n{(unsigned char*)\"DoubleUpDownArrow\", {226, 135, 149, 0}},\n{(unsigned char*)\"DoubleVerticalBar\", {226, 136, 165, 0}},\n{(unsigned char*)\"DownArrow\", {226, 134, 147, 0}},\n{(unsigned char*)\"DownArrowBar\", {226, 164, 147, 0}},\n{(unsigned char*)\"DownArrowUpArrow\", {226, 135, 181, 0}},\n{(unsigned char*)\"DownBreve\", {204, 145, 0}},\n{(unsigned char*)\"DownLeftRightVector\", {226, 165, 144, 0}},\n{(unsigned char*)\"DownLeftTeeVector\", {226, 165, 158, 0}},\n{(unsigned char*)\"DownLeftVector\", {226, 134, 189, 0}},\n{(unsigned char*)\"DownLeftVectorBar\", {226, 165, 150, 0}},\n{(unsigned char*)\"DownRightTeeVector\", {226, 165, 159, 0}},\n{(unsigned char*)\"DownRightVector\", {226, 135, 129, 0}},\n{(unsigned char*)\"DownRightVectorBar\", {226, 165, 151, 0}},\n{(unsigned char*)\"DownTee\", {226, 138, 164, 0}},\n{(unsigned char*)\"DownTeeArrow\", {226, 134, 167, 0}},\n{(unsigned char*)\"Downarrow\", {226, 135, 147, 0}},\n{(unsigned char*)\"Dscr\", {240, 157, 146, 159, 0}},\n{(unsigned char*)\"Dstrok\", {196, 144, 0}},\n{(unsigned char*)\"ENG\", {197, 138, 0}},\n{(unsigned char*)\"ETH\", {195, 144, 0}},\n{(unsigned char*)\"Eacute\", {195, 137, 0}},\n{(unsigned char*)\"Ecaron\", {196, 154, 0}},\n{(unsigned char*)\"Ecirc\", {195, 138, 0}},\n{(unsigned char*)\"Ecy\", {208, 173, 0}},\n{(unsigned char*)\"Edot\", {196, 150, 0}},\n{(unsigned char*)\"Efr\", {240, 157, 148, 136, 0}},\n{(unsigned char*)\"Egrave\", {195, 136, 0}},\n{(unsigned char*)\"Element\", {226, 136, 136, 0}},\n{(unsigned char*)\"Emacr\", {196, 146, 0}},\n{(unsigned char*)\"EmptySmallSquare\", {226, 151, 187, 0}},\n{(unsigned char*)\"EmptyVerySmallSquare\", {226, 150, 171, 0}},\n{(unsigned char*)\"Eogon\", {196, 152, 0}},\n{(unsigned char*)\"Eopf\", {240, 157, 148, 188, 0}},\n{(unsigned char*)\"Epsilon\", {206, 149, 0}},\n{(unsigned char*)\"Equal\", {226, 169, 181, 0}},\n{(unsigned char*)\"EqualTilde\", {226, 137, 130, 0}},\n{(unsigned char*)\"Equilibrium\", {226, 135, 140, 0}},\n{(unsigned char*)\"Escr\", {226, 132, 176, 0}},\n{(unsigned char*)\"Esim\", {226, 169, 179, 0}},\n{(unsigned char*)\"Eta\", {206, 151, 0}},\n{(unsigned char*)\"Euml\", {195, 139, 0}},\n{(unsigned char*)\"Exists\", {226, 136, 131, 0}},\n{(unsigned char*)\"ExponentialE\", {226, 133, 135, 0}},\n{(unsigned char*)\"Fcy\", {208, 164, 0}},\n{(unsigned char*)\"Ffr\", {240, 157, 148, 137, 0}},\n{(unsigned char*)\"FilledSmallSquare\", {226, 151, 188, 0}},\n{(unsigned char*)\"FilledVerySmallSquare\", {226, 150, 170, 0}},\n{(unsigned char*)\"Fopf\", {240, 157, 148, 189, 0}},\n{(unsigned char*)\"ForAll\", {226, 136, 128, 0}},\n{(unsigned char*)\"Fouriertrf\", {226, 132, 177, 0}},\n{(unsigned char*)\"Fscr\", {226, 132, 177, 0}},\n{(unsigned char*)\"GJcy\", {208, 131, 0}},\n{(unsigned char*)\"GT\", {62, 0}},\n{(unsigned char*)\"Gamma\", {206, 147, 0}},\n{(unsigned char*)\"Gammad\", {207, 156, 0}},\n{(unsigned char*)\"Gbreve\", {196, 158, 0}},\n{(unsigned char*)\"Gcedil\", {196, 162, 0}},\n{(unsigned char*)\"Gcirc\", {196, 156, 0}},\n{(unsigned char*)\"Gcy\", {208, 147, 0}},\n{(unsigned char*)\"Gdot\", {196, 160, 0}},\n{(unsigned char*)\"Gfr\", {240, 157, 148, 138, 0}},\n{(unsigned char*)\"Gg\", {226, 139, 153, 0}},\n{(unsigned char*)\"Gopf\", {240, 157, 148, 190, 0}},\n{(unsigned char*)\"GreaterEqual\", {226, 137, 165, 0}},\n{(unsigned char*)\"GreaterEqualLess\", {226, 139, 155, 0}},\n{(unsigned char*)\"GreaterFullEqual\", {226, 137, 167, 0}},\n{(unsigned char*)\"GreaterGreater\", {226, 170, 162, 0}},\n{(unsigned char*)\"GreaterLess\", {226, 137, 183, 0}},\n{(unsigned char*)\"GreaterSlantEqual\", {226, 169, 190, 0}},\n{(unsigned char*)\"GreaterTilde\", {226, 137, 179, 0}},\n{(unsigned char*)\"Gscr\", {240, 157, 146, 162, 0}},\n{(unsigned char*)\"Gt\", {226, 137, 171, 0}},\n{(unsigned char*)\"HARDcy\", {208, 170, 0}},\n{(unsigned char*)\"Hacek\", {203, 135, 0}},\n{(unsigned char*)\"Hat\", {94, 0}},\n{(unsigned char*)\"Hcirc\", {196, 164, 0}},\n{(unsigned char*)\"Hfr\", {226, 132, 140, 0}},\n{(unsigned char*)\"HilbertSpace\", {226, 132, 139, 0}},\n{(unsigned char*)\"Hopf\", {226, 132, 141, 0}},\n{(unsigned char*)\"HorizontalLine\", {226, 148, 128, 0}},\n{(unsigned char*)\"Hscr\", {226, 132, 139, 0}},\n{(unsigned char*)\"Hstrok\", {196, 166, 0}},\n{(unsigned char*)\"HumpDownHump\", {226, 137, 142, 0}},\n{(unsigned char*)\"HumpEqual\", {226, 137, 143, 0}},\n{(unsigned char*)\"IEcy\", {208, 149, 0}},\n{(unsigned char*)\"IJlig\", {196, 178, 0}},\n{(unsigned char*)\"IOcy\", {208, 129, 0}},\n{(unsigned char*)\"Iacute\", {195, 141, 0}},\n{(unsigned char*)\"Icirc\", {195, 142, 0}},\n{(unsigned char*)\"Icy\", {208, 152, 0}},\n{(unsigned char*)\"Idot\", {196, 176, 0}},\n{(unsigned char*)\"Ifr\", {226, 132, 145, 0}},\n{(unsigned char*)\"Igrave\", {195, 140, 0}},\n{(unsigned char*)\"Im\", {226, 132, 145, 0}},\n{(unsigned char*)\"Imacr\", {196, 170, 0}},\n{(unsigned char*)\"ImaginaryI\", {226, 133, 136, 0}},\n{(unsigned char*)\"Implies\", {226, 135, 146, 0}},\n{(unsigned char*)\"Int\", {226, 136, 172, 0}},\n{(unsigned char*)\"Integral\", {226, 136, 171, 0}},\n{(unsigned char*)\"Intersection\", {226, 139, 130, 0}},\n{(unsigned char*)\"InvisibleComma\", {226, 129, 163, 0}},\n{(unsigned char*)\"InvisibleTimes\", {226, 129, 162, 0}},\n{(unsigned char*)\"Iogon\", {196, 174, 0}},\n{(unsigned char*)\"Iopf\", {240, 157, 149, 128, 0}},\n{(unsigned char*)\"Iota\", {206, 153, 0}},\n{(unsigned char*)\"Iscr\", {226, 132, 144, 0}},\n{(unsigned char*)\"Itilde\", {196, 168, 0}},\n{(unsigned char*)\"Iukcy\", {208, 134, 0}},\n{(unsigned char*)\"Iuml\", {195, 143, 0}},\n{(unsigned char*)\"Jcirc\", {196, 180, 0}},\n{(unsigned char*)\"Jcy\", {208, 153, 0}},\n{(unsigned char*)\"Jfr\", {240, 157, 148, 141, 0}},\n{(unsigned char*)\"Jopf\", {240, 157, 149, 129, 0}},\n{(unsigned char*)\"Jscr\", {240, 157, 146, 165, 0}},\n{(unsigned char*)\"Jsercy\", {208, 136, 0}},\n{(unsigned char*)\"Jukcy\", {208, 132, 0}},\n{(unsigned char*)\"KHcy\", {208, 165, 0}},\n{(unsigned char*)\"KJcy\", {208, 140, 0}},\n{(unsigned char*)\"Kappa\", {206, 154, 0}},\n{(unsigned char*)\"Kcedil\", {196, 182, 0}},\n{(unsigned char*)\"Kcy\", {208, 154, 0}},\n{(unsigned char*)\"Kfr\", {240, 157, 148, 142, 0}},\n{(unsigned char*)\"Kopf\", {240, 157, 149, 130, 0}},\n{(unsigned char*)\"Kscr\", {240, 157, 146, 166, 0}},\n{(unsigned char*)\"LJcy\", {208, 137, 0}},\n{(unsigned char*)\"LT\", {60, 0}},\n{(unsigned char*)\"Lacute\", {196, 185, 0}},\n{(unsigned char*)\"Lambda\", {206, 155, 0}},\n{(unsigned char*)\"Lang\", {226, 159, 170, 0}},\n{(unsigned char*)\"Laplacetrf\", {226, 132, 146, 0}},\n{(unsigned char*)\"Larr\", {226, 134, 158, 0}},\n{(unsigned char*)\"Lcaron\", {196, 189, 0}},\n{(unsigned char*)\"Lcedil\", {196, 187, 0}},\n{(unsigned char*)\"Lcy\", {208, 155, 0}},\n{(unsigned char*)\"LeftAngleBracket\", {226, 159, 168, 0}},\n{(unsigned char*)\"LeftArrow\", {226, 134, 144, 0}},\n{(unsigned char*)\"LeftArrowBar\", {226, 135, 164, 0}},\n{(unsigned char*)\"LeftArrowRightArrow\", {226, 135, 134, 0}},\n{(unsigned char*)\"LeftCeiling\", {226, 140, 136, 0}},\n{(unsigned char*)\"LeftDoubleBracket\", {226, 159, 166, 0}},\n{(unsigned char*)\"LeftDownTeeVector\", {226, 165, 161, 0}},\n{(unsigned char*)\"LeftDownVector\", {226, 135, 131, 0}},\n{(unsigned char*)\"LeftDownVectorBar\", {226, 165, 153, 0}},\n{(unsigned char*)\"LeftFloor\", {226, 140, 138, 0}},\n{(unsigned char*)\"LeftRightArrow\", {226, 134, 148, 0}},\n{(unsigned char*)\"LeftRightVector\", {226, 165, 142, 0}},\n{(unsigned char*)\"LeftTee\", {226, 138, 163, 0}},\n{(unsigned char*)\"LeftTeeArrow\", {226, 134, 164, 0}},\n{(unsigned char*)\"LeftTeeVector\", {226, 165, 154, 0}},\n{(unsigned char*)\"LeftTriangle\", {226, 138, 178, 0}},\n{(unsigned char*)\"LeftTriangleBar\", {226, 167, 143, 0}},\n{(unsigned char*)\"LeftTriangleEqual\", {226, 138, 180, 0}},\n{(unsigned char*)\"LeftUpDownVector\", {226, 165, 145, 0}},\n{(unsigned char*)\"LeftUpTeeVector\", {226, 165, 160, 0}},\n{(unsigned char*)\"LeftUpVector\", {226, 134, 191, 0}},\n{(unsigned char*)\"LeftUpVectorBar\", {226, 165, 152, 0}},\n{(unsigned char*)\"LeftVector\", {226, 134, 188, 0}},\n{(unsigned char*)\"LeftVectorBar\", {226, 165, 146, 0}},\n{(unsigned char*)\"Leftarrow\", {226, 135, 144, 0}},\n{(unsigned char*)\"Leftrightarrow\", {226, 135, 148, 0}},\n{(unsigned char*)\"LessEqualGreater\", {226, 139, 154, 0}},\n{(unsigned char*)\"LessFullEqual\", {226, 137, 166, 0}},\n{(unsigned char*)\"LessGreater\", {226, 137, 182, 0}},\n{(unsigned char*)\"LessLess\", {226, 170, 161, 0}},\n{(unsigned char*)\"LessSlantEqual\", {226, 169, 189, 0}},\n{(unsigned char*)\"LessTilde\", {226, 137, 178, 0}},\n{(unsigned char*)\"Lfr\", {240, 157, 148, 143, 0}},\n{(unsigned char*)\"Ll\", {226, 139, 152, 0}},\n{(unsigned char*)\"Lleftarrow\", {226, 135, 154, 0}},\n{(unsigned char*)\"Lmidot\", {196, 191, 0}},\n{(unsigned char*)\"LongLeftArrow\", {226, 159, 181, 0}},\n{(unsigned char*)\"LongLeftRightArrow\", {226, 159, 183, 0}},\n{(unsigned char*)\"LongRightArrow\", {226, 159, 182, 0}},\n{(unsigned char*)\"Longleftarrow\", {226, 159, 184, 0}},\n{(unsigned char*)\"Longleftrightarrow\", {226, 159, 186, 0}},\n{(unsigned char*)\"Longrightarrow\", {226, 159, 185, 0}},\n{(unsigned char*)\"Lopf\", {240, 157, 149, 131, 0}},\n{(unsigned char*)\"LowerLeftArrow\", {226, 134, 153, 0}},\n{(unsigned char*)\"LowerRightArrow\", {226, 134, 152, 0}},\n{(unsigned char*)\"Lscr\", {226, 132, 146, 0}},\n{(unsigned char*)\"Lsh\", {226, 134, 176, 0}},\n{(unsigned char*)\"Lstrok\", {197, 129, 0}},\n{(unsigned char*)\"Lt\", {226, 137, 170, 0}},\n{(unsigned char*)\"Map\", {226, 164, 133, 0}},\n{(unsigned char*)\"Mcy\", {208, 156, 0}},\n{(unsigned char*)\"MediumSpace\", {226, 129, 159, 0}},\n{(unsigned char*)\"Mellintrf\", {226, 132, 179, 0}},\n{(unsigned char*)\"Mfr\", {240, 157, 148, 144, 0}},\n{(unsigned char*)\"MinusPlus\", {226, 136, 147, 0}},\n{(unsigned char*)\"Mopf\", {240, 157, 149, 132, 0}},\n{(unsigned char*)\"Mscr\", {226, 132, 179, 0}},\n{(unsigned char*)\"Mu\", {206, 156, 0}},\n{(unsigned char*)\"NJcy\", {208, 138, 0}},\n{(unsigned char*)\"Nacute\", {197, 131, 0}},\n{(unsigned char*)\"Ncaron\", {197, 135, 0}},\n{(unsigned char*)\"Ncedil\", {197, 133, 0}},\n{(unsigned char*)\"Ncy\", {208, 157, 0}},\n{(unsigned char*)\"NegativeMediumSpace\", {226, 128, 139, 0}},\n{(unsigned char*)\"NegativeThickSpace\", {226, 128, 139, 0}},\n{(unsigned char*)\"NegativeThinSpace\", {226, 128, 139, 0}},\n{(unsigned char*)\"NegativeVeryThinSpace\", {226, 128, 139, 0}},\n{(unsigned char*)\"NestedGreaterGreater\", {226, 137, 171, 0}},\n{(unsigned char*)\"NestedLessLess\", {226, 137, 170, 0}},\n{(unsigned char*)\"NewLine\", {10, 0}},\n{(unsigned char*)\"Nfr\", {240, 157, 148, 145, 0}},\n{(unsigned char*)\"NoBreak\", {226, 129, 160, 0}},\n{(unsigned char*)\"NonBreakingSpace\", {194, 160, 0}},\n{(unsigned char*)\"Nopf\", {226, 132, 149, 0}},\n{(unsigned char*)\"Not\", {226, 171, 172, 0}},\n{(unsigned char*)\"NotCongruent\", {226, 137, 162, 0}},\n{(unsigned char*)\"NotCupCap\", {226, 137, 173, 0}},\n{(unsigned char*)\"NotDoubleVerticalBar\", {226, 136, 166, 0}},\n{(unsigned char*)\"NotElement\", {226, 136, 137, 0}},\n{(unsigned char*)\"NotEqual\", {226, 137, 160, 0}},\n{(unsigned char*)\"NotEqualTilde\", {226, 137, 130, 204, 184, 0}},\n{(unsigned char*)\"NotExists\", {226, 136, 132, 0}},\n{(unsigned char*)\"NotGreater\", {226, 137, 175, 0}},\n{(unsigned char*)\"NotGreaterEqual\", {226, 137, 177, 0}},\n{(unsigned char*)\"NotGreaterFullEqual\", {226, 137, 167, 204, 184, 0}},\n{(unsigned char*)\"NotGreaterGreater\", {226, 137, 171, 204, 184, 0}},\n{(unsigned char*)\"NotGreaterLess\", {226, 137, 185, 0}},\n{(unsigned char*)\"NotGreaterSlantEqual\", {226, 169, 190, 204, 184, 0}},\n{(unsigned char*)\"NotGreaterTilde\", {226, 137, 181, 0}},\n{(unsigned char*)\"NotHumpDownHump\", {226, 137, 142, 204, 184, 0}},\n{(unsigned char*)\"NotHumpEqual\", {226, 137, 143, 204, 184, 0}},\n{(unsigned char*)\"NotLeftTriangle\", {226, 139, 170, 0}},\n{(unsigned char*)\"NotLeftTriangleBar\", {226, 167, 143, 204, 184, 0}},\n{(unsigned char*)\"NotLeftTriangleEqual\", {226, 139, 172, 0}},\n{(unsigned char*)\"NotLess\", {226, 137, 174, 0}},\n{(unsigned char*)\"NotLessEqual\", {226, 137, 176, 0}},\n{(unsigned char*)\"NotLessGreater\", {226, 137, 184, 0}},\n{(unsigned char*)\"NotLessLess\", {226, 137, 170, 204, 184, 0}},\n{(unsigned char*)\"NotLessSlantEqual\", {226, 169, 189, 204, 184, 0}},\n{(unsigned char*)\"NotLessTilde\", {226, 137, 180, 0}},\n{(unsigned char*)\"NotNestedGreaterGreater\", {226, 170, 162, 204, 184, 0}},\n{(unsigned char*)\"NotNestedLessLess\", {226, 170, 161, 204, 184, 0}},\n{(unsigned char*)\"NotPrecedes\", {226, 138, 128, 0}},\n{(unsigned char*)\"NotPrecedesEqual\", {226, 170, 175, 204, 184, 0}},\n{(unsigned char*)\"NotPrecedesSlantEqual\", {226, 139, 160, 0}},\n{(unsigned char*)\"NotReverseElement\", {226, 136, 140, 0}},\n{(unsigned char*)\"NotRightTriangle\", {226, 139, 171, 0}},\n{(unsigned char*)\"NotRightTriangleBar\", {226, 167, 144, 204, 184, 0}},\n{(unsigned char*)\"NotRightTriangleEqual\", {226, 139, 173, 0}},\n{(unsigned char*)\"NotSquareSubset\", {226, 138, 143, 204, 184, 0}},\n{(unsigned char*)\"NotSquareSubsetEqual\", {226, 139, 162, 0}},\n{(unsigned char*)\"NotSquareSuperset\", {226, 138, 144, 204, 184, 0}},\n{(unsigned char*)\"NotSquareSupersetEqual\", {226, 139, 163, 0}},\n{(unsigned char*)\"NotSubset\", {226, 138, 130, 226, 131, 146, 0}},\n{(unsigned char*)\"NotSubsetEqual\", {226, 138, 136, 0}},\n{(unsigned char*)\"NotSucceeds\", {226, 138, 129, 0}},\n{(unsigned char*)\"NotSucceedsEqual\", {226, 170, 176, 204, 184, 0}},\n{(unsigned char*)\"NotSucceedsSlantEqual\", {226, 139, 161, 0}},\n{(unsigned char*)\"NotSucceedsTilde\", {226, 137, 191, 204, 184, 0}},\n{(unsigned char*)\"NotSuperset\", {226, 138, 131, 226, 131, 146, 0}},\n{(unsigned char*)\"NotSupersetEqual\", {226, 138, 137, 0}},\n{(unsigned char*)\"NotTilde\", {226, 137, 129, 0}},\n{(unsigned char*)\"NotTildeEqual\", {226, 137, 132, 0}},\n{(unsigned char*)\"NotTildeFullEqual\", {226, 137, 135, 0}},\n{(unsigned char*)\"NotTildeTilde\", {226, 137, 137, 0}},\n{(unsigned char*)\"NotVerticalBar\", {226, 136, 164, 0}},\n{(unsigned char*)\"Nscr\", {240, 157, 146, 169, 0}},\n{(unsigned char*)\"Ntilde\", {195, 145, 0}},\n{(unsigned char*)\"Nu\", {206, 157, 0}},\n{(unsigned char*)\"OElig\", {197, 146, 0}},\n{(unsigned char*)\"Oacute\", {195, 147, 0}},\n{(unsigned char*)\"Ocirc\", {195, 148, 0}},\n{(unsigned char*)\"Ocy\", {208, 158, 0}},\n{(unsigned char*)\"Odblac\", {197, 144, 0}},\n{(unsigned char*)\"Ofr\", {240, 157, 148, 146, 0}},\n{(unsigned char*)\"Ograve\", {195, 146, 0}},\n{(unsigned char*)\"Omacr\", {197, 140, 0}},\n{(unsigned char*)\"Omega\", {206, 169, 0}},\n{(unsigned char*)\"Omicron\", {206, 159, 0}},\n{(unsigned char*)\"Oopf\", {240, 157, 149, 134, 0}},\n{(unsigned char*)\"OpenCurlyDoubleQuote\", {226, 128, 156, 0}},\n{(unsigned char*)\"OpenCurlyQuote\", {226, 128, 152, 0}},\n{(unsigned char*)\"Or\", {226, 169, 148, 0}},\n{(unsigned char*)\"Oscr\", {240, 157, 146, 170, 0}},\n{(unsigned char*)\"Oslash\", {195, 152, 0}},\n{(unsigned char*)\"Otilde\", {195, 149, 0}},\n{(unsigned char*)\"Otimes\", {226, 168, 183, 0}},\n{(unsigned char*)\"Ouml\", {195, 150, 0}},\n{(unsigned char*)\"OverBar\", {226, 128, 190, 0}},\n{(unsigned char*)\"OverBrace\", {226, 143, 158, 0}},\n{(unsigned char*)\"OverBracket\", {226, 142, 180, 0}},\n{(unsigned char*)\"OverParenthesis\", {226, 143, 156, 0}},\n{(unsigned char*)\"PartialD\", {226, 136, 130, 0}},\n{(unsigned char*)\"Pcy\", {208, 159, 0}},\n{(unsigned char*)\"Pfr\", {240, 157, 148, 147, 0}},\n{(unsigned char*)\"Phi\", {206, 166, 0}},\n{(unsigned char*)\"Pi\", {206, 160, 0}},\n{(unsigned char*)\"PlusMinus\", {194, 177, 0}},\n{(unsigned char*)\"Poincareplane\", {226, 132, 140, 0}},\n{(unsigned char*)\"Popf\", {226, 132, 153, 0}},\n{(unsigned char*)\"Pr\", {226, 170, 187, 0}},\n{(unsigned char*)\"Precedes\", {226, 137, 186, 0}},\n{(unsigned char*)\"PrecedesEqual\", {226, 170, 175, 0}},\n{(unsigned char*)\"PrecedesSlantEqual\", {226, 137, 188, 0}},\n{(unsigned char*)\"PrecedesTilde\", {226, 137, 190, 0}},\n{(unsigned char*)\"Prime\", {226, 128, 179, 0}},\n{(unsigned char*)\"Product\", {226, 136, 143, 0}},\n{(unsigned char*)\"Proportion\", {226, 136, 183, 0}},\n{(unsigned char*)\"Proportional\", {226, 136, 157, 0}},\n{(unsigned char*)\"Pscr\", {240, 157, 146, 171, 0}},\n{(unsigned char*)\"Psi\", {206, 168, 0}},\n{(unsigned char*)\"QUOT\", {34, 0}},\n{(unsigned char*)\"Qfr\", {240, 157, 148, 148, 0}},\n{(unsigned char*)\"Qopf\", {226, 132, 154, 0}},\n{(unsigned char*)\"Qscr\", {240, 157, 146, 172, 0}},\n{(unsigned char*)\"RBarr\", {226, 164, 144, 0}},\n{(unsigned char*)\"REG\", {194, 174, 0}},\n{(unsigned char*)\"Racute\", {197, 148, 0}},\n{(unsigned char*)\"Rang\", {226, 159, 171, 0}},\n{(unsigned char*)\"Rarr\", {226, 134, 160, 0}},\n{(unsigned char*)\"Rarrtl\", {226, 164, 150, 0}},\n{(unsigned char*)\"Rcaron\", {197, 152, 0}},\n{(unsigned char*)\"Rcedil\", {197, 150, 0}},\n{(unsigned char*)\"Rcy\", {208, 160, 0}},\n{(unsigned char*)\"Re\", {226, 132, 156, 0}},\n{(unsigned char*)\"ReverseElement\", {226, 136, 139, 0}},\n{(unsigned char*)\"ReverseEquilibrium\", {226, 135, 139, 0}},\n{(unsigned char*)\"ReverseUpEquilibrium\", {226, 165, 175, 0}},\n{(unsigned char*)\"Rfr\", {226, 132, 156, 0}},\n{(unsigned char*)\"Rho\", {206, 161, 0}},\n{(unsigned char*)\"RightAngleBracket\", {226, 159, 169, 0}},\n{(unsigned char*)\"RightArrow\", {226, 134, 146, 0}},\n{(unsigned char*)\"RightArrowBar\", {226, 135, 165, 0}},\n{(unsigned char*)\"RightArrowLeftArrow\", {226, 135, 132, 0}},\n{(unsigned char*)\"RightCeiling\", {226, 140, 137, 0}},\n{(unsigned char*)\"RightDoubleBracket\", {226, 159, 167, 0}},\n{(unsigned char*)\"RightDownTeeVector\", {226, 165, 157, 0}},\n{(unsigned char*)\"RightDownVector\", {226, 135, 130, 0}},\n{(unsigned char*)\"RightDownVectorBar\", {226, 165, 149, 0}},\n{(unsigned char*)\"RightFloor\", {226, 140, 139, 0}},\n{(unsigned char*)\"RightTee\", {226, 138, 162, 0}},\n{(unsigned char*)\"RightTeeArrow\", {226, 134, 166, 0}},\n{(unsigned char*)\"RightTeeVector\", {226, 165, 155, 0}},\n{(unsigned char*)\"RightTriangle\", {226, 138, 179, 0}},\n{(unsigned char*)\"RightTriangleBar\", {226, 167, 144, 0}},\n{(unsigned char*)\"RightTriangleEqual\", {226, 138, 181, 0}},\n{(unsigned char*)\"RightUpDownVector\", {226, 165, 143, 0}},\n{(unsigned char*)\"RightUpTeeVector\", {226, 165, 156, 0}},\n{(unsigned char*)\"RightUpVector\", {226, 134, 190, 0}},\n{(unsigned char*)\"RightUpVectorBar\", {226, 165, 148, 0}},\n{(unsigned char*)\"RightVector\", {226, 135, 128, 0}},\n{(unsigned char*)\"RightVectorBar\", {226, 165, 147, 0}},\n{(unsigned char*)\"Rightarrow\", {226, 135, 146, 0}},\n{(unsigned char*)\"Ropf\", {226, 132, 157, 0}},\n{(unsigned char*)\"RoundImplies\", {226, 165, 176, 0}},\n{(unsigned char*)\"Rrightarrow\", {226, 135, 155, 0}},\n{(unsigned char*)\"Rscr\", {226, 132, 155, 0}},\n{(unsigned char*)\"Rsh\", {226, 134, 177, 0}},\n{(unsigned char*)\"RuleDelayed\", {226, 167, 180, 0}},\n{(unsigned char*)\"SHCHcy\", {208, 169, 0}},\n{(unsigned char*)\"SHcy\", {208, 168, 0}},\n{(unsigned char*)\"SOFTcy\", {208, 172, 0}},\n{(unsigned char*)\"Sacute\", {197, 154, 0}},\n{(unsigned char*)\"Sc\", {226, 170, 188, 0}},\n{(unsigned char*)\"Scaron\", {197, 160, 0}},\n{(unsigned char*)\"Scedil\", {197, 158, 0}},\n{(unsigned char*)\"Scirc\", {197, 156, 0}},\n{(unsigned char*)\"Scy\", {208, 161, 0}},\n{(unsigned char*)\"Sfr\", {240, 157, 148, 150, 0}},\n{(unsigned char*)\"ShortDownArrow\", {226, 134, 147, 0}},\n{(unsigned char*)\"ShortLeftArrow\", {226, 134, 144, 0}},\n{(unsigned char*)\"ShortRightArrow\", {226, 134, 146, 0}},\n{(unsigned char*)\"ShortUpArrow\", {226, 134, 145, 0}},\n{(unsigned char*)\"Sigma\", {206, 163, 0}},\n{(unsigned char*)\"SmallCircle\", {226, 136, 152, 0}},\n{(unsigned char*)\"Sopf\", {240, 157, 149, 138, 0}},\n{(unsigned char*)\"Sqrt\", {226, 136, 154, 0}},\n{(unsigned char*)\"Square\", {226, 150, 161, 0}},\n{(unsigned char*)\"SquareIntersection\", {226, 138, 147, 0}},\n{(unsigned char*)\"SquareSubset\", {226, 138, 143, 0}},\n{(unsigned char*)\"SquareSubsetEqual\", {226, 138, 145, 0}},\n{(unsigned char*)\"SquareSuperset\", {226, 138, 144, 0}},\n{(unsigned char*)\"SquareSupersetEqual\", {226, 138, 146, 0}},\n{(unsigned char*)\"SquareUnion\", {226, 138, 148, 0}},\n{(unsigned char*)\"Sscr\", {240, 157, 146, 174, 0}},\n{(unsigned char*)\"Star\", {226, 139, 134, 0}},\n{(unsigned char*)\"Sub\", {226, 139, 144, 0}},\n{(unsigned char*)\"Subset\", {226, 139, 144, 0}},\n{(unsigned char*)\"SubsetEqual\", {226, 138, 134, 0}},\n{(unsigned char*)\"Succeeds\", {226, 137, 187, 0}},\n{(unsigned char*)\"SucceedsEqual\", {226, 170, 176, 0}},\n{(unsigned char*)\"SucceedsSlantEqual\", {226, 137, 189, 0}},\n{(unsigned char*)\"SucceedsTilde\", {226, 137, 191, 0}},\n{(unsigned char*)\"SuchThat\", {226, 136, 139, 0}},\n{(unsigned char*)\"Sum\", {226, 136, 145, 0}},\n{(unsigned char*)\"Sup\", {226, 139, 145, 0}},\n{(unsigned char*)\"Superset\", {226, 138, 131, 0}},\n{(unsigned char*)\"SupersetEqual\", {226, 138, 135, 0}},\n{(unsigned char*)\"Supset\", {226, 139, 145, 0}},\n{(unsigned char*)\"THORN\", {195, 158, 0}},\n{(unsigned char*)\"TRADE\", {226, 132, 162, 0}},\n{(unsigned char*)\"TSHcy\", {208, 139, 0}},\n{(unsigned char*)\"TScy\", {208, 166, 0}},\n{(unsigned char*)\"Tab\", {9, 0}},\n{(unsigned char*)\"Tau\", {206, 164, 0}},\n{(unsigned char*)\"Tcaron\", {197, 164, 0}},\n{(unsigned char*)\"Tcedil\", {197, 162, 0}},\n{(unsigned char*)\"Tcy\", {208, 162, 0}},\n{(unsigned char*)\"Tfr\", {240, 157, 148, 151, 0}},\n{(unsigned char*)\"Therefore\", {226, 136, 180, 0}},\n{(unsigned char*)\"Theta\", {206, 152, 0}},\n{(unsigned char*)\"ThickSpace\", {226, 129, 159, 226, 128, 138, 0}},\n{(unsigned char*)\"ThinSpace\", {226, 128, 137, 0}},\n{(unsigned char*)\"Tilde\", {226, 136, 188, 0}},\n{(unsigned char*)\"TildeEqual\", {226, 137, 131, 0}},\n{(unsigned char*)\"TildeFullEqual\", {226, 137, 133, 0}},\n{(unsigned char*)\"TildeTilde\", {226, 137, 136, 0}},\n{(unsigned char*)\"Topf\", {240, 157, 149, 139, 0}},\n{(unsigned char*)\"TripleDot\", {226, 131, 155, 0}},\n{(unsigned char*)\"Tscr\", {240, 157, 146, 175, 0}},\n{(unsigned char*)\"Tstrok\", {197, 166, 0}},\n{(unsigned char*)\"Uacute\", {195, 154, 0}},\n{(unsigned char*)\"Uarr\", {226, 134, 159, 0}},\n{(unsigned char*)\"Uarrocir\", {226, 165, 137, 0}},\n{(unsigned char*)\"Ubrcy\", {208, 142, 0}},\n{(unsigned char*)\"Ubreve\", {197, 172, 0}},\n{(unsigned char*)\"Ucirc\", {195, 155, 0}},\n{(unsigned char*)\"Ucy\", {208, 163, 0}},\n{(unsigned char*)\"Udblac\", {197, 176, 0}},\n{(unsigned char*)\"Ufr\", {240, 157, 148, 152, 0}},\n{(unsigned char*)\"Ugrave\", {195, 153, 0}},\n{(unsigned char*)\"Umacr\", {197, 170, 0}},\n{(unsigned char*)\"UnderBar\", {95, 0}},\n{(unsigned char*)\"UnderBrace\", {226, 143, 159, 0}},\n{(unsigned char*)\"UnderBracket\", {226, 142, 181, 0}},\n{(unsigned char*)\"UnderParenthesis\", {226, 143, 157, 0}},\n{(unsigned char*)\"Union\", {226, 139, 131, 0}},\n{(unsigned char*)\"UnionPlus\", {226, 138, 142, 0}},\n{(unsigned char*)\"Uogon\", {197, 178, 0}},\n{(unsigned char*)\"Uopf\", {240, 157, 149, 140, 0}},\n{(unsigned char*)\"UpArrow\", {226, 134, 145, 0}},\n{(unsigned char*)\"UpArrowBar\", {226, 164, 146, 0}},\n{(unsigned char*)\"UpArrowDownArrow\", {226, 135, 133, 0}},\n{(unsigned char*)\"UpDownArrow\", {226, 134, 149, 0}},\n{(unsigned char*)\"UpEquilibrium\", {226, 165, 174, 0}},\n{(unsigned char*)\"UpTee\", {226, 138, 165, 0}},\n{(unsigned char*)\"UpTeeArrow\", {226, 134, 165, 0}},\n{(unsigned char*)\"Uparrow\", {226, 135, 145, 0}},\n{(unsigned char*)\"Updownarrow\", {226, 135, 149, 0}},\n{(unsigned char*)\"UpperLeftArrow\", {226, 134, 150, 0}},\n{(unsigned char*)\"UpperRightArrow\", {226, 134, 151, 0}},\n{(unsigned char*)\"Upsi\", {207, 146, 0}},\n{(unsigned char*)\"Upsilon\", {206, 165, 0}},\n{(unsigned char*)\"Uring\", {197, 174, 0}},\n{(unsigned char*)\"Uscr\", {240, 157, 146, 176, 0}},\n{(unsigned char*)\"Utilde\", {197, 168, 0}},\n{(unsigned char*)\"Uuml\", {195, 156, 0}},\n{(unsigned char*)\"VDash\", {226, 138, 171, 0}},\n{(unsigned char*)\"Vbar\", {226, 171, 171, 0}},\n{(unsigned char*)\"Vcy\", {208, 146, 0}},\n{(unsigned char*)\"Vdash\", {226, 138, 169, 0}},\n{(unsigned char*)\"Vdashl\", {226, 171, 166, 0}},\n{(unsigned char*)\"Vee\", {226, 139, 129, 0}},\n{(unsigned char*)\"Verbar\", {226, 128, 150, 0}},\n{(unsigned char*)\"Vert\", {226, 128, 150, 0}},\n{(unsigned char*)\"VerticalBar\", {226, 136, 163, 0}},\n{(unsigned char*)\"VerticalLine\", {124, 0}},\n{(unsigned char*)\"VerticalSeparator\", {226, 157, 152, 0}},\n{(unsigned char*)\"VerticalTilde\", {226, 137, 128, 0}},\n{(unsigned char*)\"VeryThinSpace\", {226, 128, 138, 0}},\n{(unsigned char*)\"Vfr\", {240, 157, 148, 153, 0}},\n{(unsigned char*)\"Vopf\", {240, 157, 149, 141, 0}},\n{(unsigned char*)\"Vscr\", {240, 157, 146, 177, 0}},\n{(unsigned char*)\"Vvdash\", {226, 138, 170, 0}},\n{(unsigned char*)\"Wcirc\", {197, 180, 0}},\n{(unsigned char*)\"Wedge\", {226, 139, 128, 0}},\n{(unsigned char*)\"Wfr\", {240, 157, 148, 154, 0}},\n{(unsigned char*)\"Wopf\", {240, 157, 149, 142, 0}},\n{(unsigned char*)\"Wscr\", {240, 157, 146, 178, 0}},\n{(unsigned char*)\"Xfr\", {240, 157, 148, 155, 0}},\n{(unsigned char*)\"Xi\", {206, 158, 0}},\n{(unsigned char*)\"Xopf\", {240, 157, 149, 143, 0}},\n{(unsigned char*)\"Xscr\", {240, 157, 146, 179, 0}},\n{(unsigned char*)\"YAcy\", {208, 175, 0}},\n{(unsigned char*)\"YIcy\", {208, 135, 0}},\n{(unsigned char*)\"YUcy\", {208, 174, 0}},\n{(unsigned char*)\"Yacute\", {195, 157, 0}},\n{(unsigned char*)\"Ycirc\", {197, 182, 0}},\n{(unsigned char*)\"Ycy\", {208, 171, 0}},\n{(unsigned char*)\"Yfr\", {240, 157, 148, 156, 0}},\n{(unsigned char*)\"Yopf\", {240, 157, 149, 144, 0}},\n{(unsigned char*)\"Yscr\", {240, 157, 146, 180, 0}},\n{(unsigned char*)\"Yuml\", {197, 184, 0}},\n{(unsigned char*)\"ZHcy\", {208, 150, 0}},\n{(unsigned char*)\"Zacute\", {197, 185, 0}},\n{(unsigned char*)\"Zcaron\", {197, 189, 0}},\n{(unsigned char*)\"Zcy\", {208, 151, 0}},\n{(unsigned char*)\"Zdot\", {197, 187, 0}},\n{(unsigned char*)\"ZeroWidthSpace\", {226, 128, 139, 0}},\n{(unsigned char*)\"Zeta\", {206, 150, 0}},\n{(unsigned char*)\"Zfr\", {226, 132, 168, 0}},\n{(unsigned char*)\"Zopf\", {226, 132, 164, 0}},\n{(unsigned char*)\"Zscr\", {240, 157, 146, 181, 0}},\n{(unsigned char*)\"aacute\", {195, 161, 0}},\n{(unsigned char*)\"abreve\", {196, 131, 0}},\n{(unsigned char*)\"ac\", {226, 136, 190, 0}},\n{(unsigned char*)\"acE\", {226, 136, 190, 204, 179, 0}},\n{(unsigned char*)\"acd\", {226, 136, 191, 0}},\n{(unsigned char*)\"acirc\", {195, 162, 0}},\n{(unsigned char*)\"acute\", {194, 180, 0}},\n{(unsigned char*)\"acy\", {208, 176, 0}},\n{(unsigned char*)\"aelig\", {195, 166, 0}},\n{(unsigned char*)\"af\", {226, 129, 161, 0}},\n{(unsigned char*)\"afr\", {240, 157, 148, 158, 0}},\n{(unsigned char*)\"agrave\", {195, 160, 0}},\n{(unsigned char*)\"alefsym\", {226, 132, 181, 0}},\n{(unsigned char*)\"aleph\", {226, 132, 181, 0}},\n{(unsigned char*)\"alpha\", {206, 177, 0}},\n{(unsigned char*)\"amacr\", {196, 129, 0}},\n{(unsigned char*)\"amalg\", {226, 168, 191, 0}},\n{(unsigned char*)\"amp\", {38, 0}},\n{(unsigned char*)\"and\", {226, 136, 167, 0}},\n{(unsigned char*)\"andand\", {226, 169, 149, 0}},\n{(unsigned char*)\"andd\", {226, 169, 156, 0}},\n{(unsigned char*)\"andslope\", {226, 169, 152, 0}},\n{(unsigned char*)\"andv\", {226, 169, 154, 0}},\n{(unsigned char*)\"ang\", {226, 136, 160, 0}},\n{(unsigned char*)\"ange\", {226, 166, 164, 0}},\n{(unsigned char*)\"angle\", {226, 136, 160, 0}},\n{(unsigned char*)\"angmsd\", {226, 136, 161, 0}},\n{(unsigned char*)\"angmsdaa\", {226, 166, 168, 0}},\n{(unsigned char*)\"angmsdab\", {226, 166, 169, 0}},\n{(unsigned char*)\"angmsdac\", {226, 166, 170, 0}},\n{(unsigned char*)\"angmsdad\", {226, 166, 171, 0}},\n{(unsigned char*)\"angmsdae\", {226, 166, 172, 0}},\n{(unsigned char*)\"angmsdaf\", {226, 166, 173, 0}},\n{(unsigned char*)\"angmsdag\", {226, 166, 174, 0}},\n{(unsigned char*)\"angmsdah\", {226, 166, 175, 0}},\n{(unsigned char*)\"angrt\", {226, 136, 159, 0}},\n{(unsigned char*)\"angrtvb\", {226, 138, 190, 0}},\n{(unsigned char*)\"angrtvbd\", {226, 166, 157, 0}},\n{(unsigned char*)\"angsph\", {226, 136, 162, 0}},\n{(unsigned char*)\"angst\", {195, 133, 0}},\n{(unsigned char*)\"angzarr\", {226, 141, 188, 0}},\n{(unsigned char*)\"aogon\", {196, 133, 0}},\n{(unsigned char*)\"aopf\", {240, 157, 149, 146, 0}},\n{(unsigned char*)\"ap\", {226, 137, 136, 0}},\n{(unsigned char*)\"apE\", {226, 169, 176, 0}},\n{(unsigned char*)\"apacir\", {226, 169, 175, 0}},\n{(unsigned char*)\"ape\", {226, 137, 138, 0}},\n{(unsigned char*)\"apid\", {226, 137, 139, 0}},\n{(unsigned char*)\"apos\", {39, 0}},\n{(unsigned char*)\"approx\", {226, 137, 136, 0}},\n{(unsigned char*)\"approxeq\", {226, 137, 138, 0}},\n{(unsigned char*)\"aring\", {195, 165, 0}},\n{(unsigned char*)\"ascr\", {240, 157, 146, 182, 0}},\n{(unsigned char*)\"ast\", {42, 0}},\n{(unsigned char*)\"asymp\", {226, 137, 136, 0}},\n{(unsigned char*)\"asympeq\", {226, 137, 141, 0}},\n{(unsigned char*)\"atilde\", {195, 163, 0}},\n{(unsigned char*)\"auml\", {195, 164, 0}},\n{(unsigned char*)\"awconint\", {226, 136, 179, 0}},\n{(unsigned char*)\"awint\", {226, 168, 145, 0}},\n{(unsigned char*)\"bNot\", {226, 171, 173, 0}},\n{(unsigned char*)\"backcong\", {226, 137, 140, 0}},\n{(unsigned char*)\"backepsilon\", {207, 182, 0}},\n{(unsigned char*)\"backprime\", {226, 128, 181, 0}},\n{(unsigned char*)\"backsim\", {226, 136, 189, 0}},\n{(unsigned char*)\"backsimeq\", {226, 139, 141, 0}},\n{(unsigned char*)\"barvee\", {226, 138, 189, 0}},\n{(unsigned char*)\"barwed\", {226, 140, 133, 0}},\n{(unsigned char*)\"barwedge\", {226, 140, 133, 0}},\n{(unsigned char*)\"bbrk\", {226, 142, 181, 0}},\n{(unsigned char*)\"bbrktbrk\", {226, 142, 182, 0}},\n{(unsigned char*)\"bcong\", {226, 137, 140, 0}},\n{(unsigned char*)\"bcy\", {208, 177, 0}},\n{(unsigned char*)\"bdquo\", {226, 128, 158, 0}},\n{(unsigned char*)\"becaus\", {226, 136, 181, 0}},\n{(unsigned char*)\"because\", {226, 136, 181, 0}},\n{(unsigned char*)\"bemptyv\", {226, 166, 176, 0}},\n{(unsigned char*)\"bepsi\", {207, 182, 0}},\n{(unsigned char*)\"bernou\", {226, 132, 172, 0}},\n{(unsigned char*)\"beta\", {206, 178, 0}},\n{(unsigned char*)\"beth\", {226, 132, 182, 0}},\n{(unsigned char*)\"between\", {226, 137, 172, 0}},\n{(unsigned char*)\"bfr\", {240, 157, 148, 159, 0}},\n{(unsigned char*)\"bigcap\", {226, 139, 130, 0}},\n{(unsigned char*)\"bigcirc\", {226, 151, 175, 0}},\n{(unsigned char*)\"bigcup\", {226, 139, 131, 0}},\n{(unsigned char*)\"bigodot\", {226, 168, 128, 0}},\n{(unsigned char*)\"bigoplus\", {226, 168, 129, 0}},\n{(unsigned char*)\"bigotimes\", {226, 168, 130, 0}},\n{(unsigned char*)\"bigsqcup\", {226, 168, 134, 0}},\n{(unsigned char*)\"bigstar\", {226, 152, 133, 0}},\n{(unsigned char*)\"bigtriangledown\", {226, 150, 189, 0}},\n{(unsigned char*)\"bigtriangleup\", {226, 150, 179, 0}},\n{(unsigned char*)\"biguplus\", {226, 168, 132, 0}},\n{(unsigned char*)\"bigvee\", {226, 139, 129, 0}},\n{(unsigned char*)\"bigwedge\", {226, 139, 128, 0}},\n{(unsigned char*)\"bkarow\", {226, 164, 141, 0}},\n{(unsigned char*)\"blacklozenge\", {226, 167, 171, 0}},\n{(unsigned char*)\"blacksquare\", {226, 150, 170, 0}},\n{(unsigned char*)\"blacktriangle\", {226, 150, 180, 0}},\n{(unsigned char*)\"blacktriangledown\", {226, 150, 190, 0}},\n{(unsigned char*)\"blacktriangleleft\", {226, 151, 130, 0}},\n{(unsigned char*)\"blacktriangleright\", {226, 150, 184, 0}},\n{(unsigned char*)\"blank\", {226, 144, 163, 0}},\n{(unsigned char*)\"blk12\", {226, 150, 146, 0}},\n{(unsigned char*)\"blk14\", {226, 150, 145, 0}},\n{(unsigned char*)\"blk34\", {226, 150, 147, 0}},\n{(unsigned char*)\"block\", {226, 150, 136, 0}},\n{(unsigned char*)\"bne\", {61, 226, 131, 165, 0}},\n{(unsigned char*)\"bnequiv\", {226, 137, 161, 226, 131, 165, 0}},\n{(unsigned char*)\"bnot\", {226, 140, 144, 0}},\n{(unsigned char*)\"bopf\", {240, 157, 149, 147, 0}},\n{(unsigned char*)\"bot\", {226, 138, 165, 0}},\n{(unsigned char*)\"bottom\", {226, 138, 165, 0}},\n{(unsigned char*)\"bowtie\", {226, 139, 136, 0}},\n{(unsigned char*)\"boxDL\", {226, 149, 151, 0}},\n{(unsigned char*)\"boxDR\", {226, 149, 148, 0}},\n{(unsigned char*)\"boxDl\", {226, 149, 150, 0}},\n{(unsigned char*)\"boxDr\", {226, 149, 147, 0}},\n{(unsigned char*)\"boxH\", {226, 149, 144, 0}},\n{(unsigned char*)\"boxHD\", {226, 149, 166, 0}},\n{(unsigned char*)\"boxHU\", {226, 149, 169, 0}},\n{(unsigned char*)\"boxHd\", {226, 149, 164, 0}},\n{(unsigned char*)\"boxHu\", {226, 149, 167, 0}},\n{(unsigned char*)\"boxUL\", {226, 149, 157, 0}},\n{(unsigned char*)\"boxUR\", {226, 149, 154, 0}},\n{(unsigned char*)\"boxUl\", {226, 149, 156, 0}},\n{(unsigned char*)\"boxUr\", {226, 149, 153, 0}},\n{(unsigned char*)\"boxV\", {226, 149, 145, 0}},\n{(unsigned char*)\"boxVH\", {226, 149, 172, 0}},\n{(unsigned char*)\"boxVL\", {226, 149, 163, 0}},\n{(unsigned char*)\"boxVR\", {226, 149, 160, 0}},\n{(unsigned char*)\"boxVh\", {226, 149, 171, 0}},\n{(unsigned char*)\"boxVl\", {226, 149, 162, 0}},\n{(unsigned char*)\"boxVr\", {226, 149, 159, 0}},\n{(unsigned char*)\"boxbox\", {226, 167, 137, 0}},\n{(unsigned char*)\"boxdL\", {226, 149, 149, 0}},\n{(unsigned char*)\"boxdR\", {226, 149, 146, 0}},\n{(unsigned char*)\"boxdl\", {226, 148, 144, 0}},\n{(unsigned char*)\"boxdr\", {226, 148, 140, 0}},\n{(unsigned char*)\"boxh\", {226, 148, 128, 0}},\n{(unsigned char*)\"boxhD\", {226, 149, 165, 0}},\n{(unsigned char*)\"boxhU\", {226, 149, 168, 0}},\n{(unsigned char*)\"boxhd\", {226, 148, 172, 0}},\n{(unsigned char*)\"boxhu\", {226, 148, 180, 0}},\n{(unsigned char*)\"boxminus\", {226, 138, 159, 0}},\n{(unsigned char*)\"boxplus\", {226, 138, 158, 0}},\n{(unsigned char*)\"boxtimes\", {226, 138, 160, 0}},\n{(unsigned char*)\"boxuL\", {226, 149, 155, 0}},\n{(unsigned char*)\"boxuR\", {226, 149, 152, 0}},\n{(unsigned char*)\"boxul\", {226, 148, 152, 0}},\n{(unsigned char*)\"boxur\", {226, 148, 148, 0}},\n{(unsigned char*)\"boxv\", {226, 148, 130, 0}},\n{(unsigned char*)\"boxvH\", {226, 149, 170, 0}},\n{(unsigned char*)\"boxvL\", {226, 149, 161, 0}},\n{(unsigned char*)\"boxvR\", {226, 149, 158, 0}},\n{(unsigned char*)\"boxvh\", {226, 148, 188, 0}},\n{(unsigned char*)\"boxvl\", {226, 148, 164, 0}},\n{(unsigned char*)\"boxvr\", {226, 148, 156, 0}},\n{(unsigned char*)\"bprime\", {226, 128, 181, 0}},\n{(unsigned char*)\"breve\", {203, 152, 0}},\n{(unsigned char*)\"brvbar\", {194, 166, 0}},\n{(unsigned char*)\"bscr\", {240, 157, 146, 183, 0}},\n{(unsigned char*)\"bsemi\", {226, 129, 143, 0}},\n{(unsigned char*)\"bsim\", {226, 136, 189, 0}},\n{(unsigned char*)\"bsime\", {226, 139, 141, 0}},\n{(unsigned char*)\"bsol\", {92, 0}},\n{(unsigned char*)\"bsolb\", {226, 167, 133, 0}},\n{(unsigned char*)\"bsolhsub\", {226, 159, 136, 0}},\n{(unsigned char*)\"bull\", {226, 128, 162, 0}},\n{(unsigned char*)\"bullet\", {226, 128, 162, 0}},\n{(unsigned char*)\"bump\", {226, 137, 142, 0}},\n{(unsigned char*)\"bumpE\", {226, 170, 174, 0}},\n{(unsigned char*)\"bumpe\", {226, 137, 143, 0}},\n{(unsigned char*)\"bumpeq\", {226, 137, 143, 0}},\n{(unsigned char*)\"cacute\", {196, 135, 0}},\n{(unsigned char*)\"cap\", {226, 136, 169, 0}},\n{(unsigned char*)\"capand\", {226, 169, 132, 0}},\n{(unsigned char*)\"capbrcup\", {226, 169, 137, 0}},\n{(unsigned char*)\"capcap\", {226, 169, 139, 0}},\n{(unsigned char*)\"capcup\", {226, 169, 135, 0}},\n{(unsigned char*)\"capdot\", {226, 169, 128, 0}},\n{(unsigned char*)\"caps\", {226, 136, 169, 239, 184, 128, 0}},\n{(unsigned char*)\"caret\", {226, 129, 129, 0}},\n{(unsigned char*)\"caron\", {203, 135, 0}},\n{(unsigned char*)\"ccaps\", {226, 169, 141, 0}},\n{(unsigned char*)\"ccaron\", {196, 141, 0}},\n{(unsigned char*)\"ccedil\", {195, 167, 0}},\n{(unsigned char*)\"ccirc\", {196, 137, 0}},\n{(unsigned char*)\"ccups\", {226, 169, 140, 0}},\n{(unsigned char*)\"ccupssm\", {226, 169, 144, 0}},\n{(unsigned char*)\"cdot\", {196, 139, 0}},\n{(unsigned char*)\"cedil\", {194, 184, 0}},\n{(unsigned char*)\"cemptyv\", {226, 166, 178, 0}},\n{(unsigned char*)\"cent\", {194, 162, 0}},\n{(unsigned char*)\"centerdot\", {194, 183, 0}},\n{(unsigned char*)\"cfr\", {240, 157, 148, 160, 0}},\n{(unsigned char*)\"chcy\", {209, 135, 0}},\n{(unsigned char*)\"check\", {226, 156, 147, 0}},\n{(unsigned char*)\"checkmark\", {226, 156, 147, 0}},\n{(unsigned char*)\"chi\", {207, 135, 0}},\n{(unsigned char*)\"cir\", {226, 151, 139, 0}},\n{(unsigned char*)\"cirE\", {226, 167, 131, 0}},\n{(unsigned char*)\"circ\", {203, 134, 0}},\n{(unsigned char*)\"circeq\", {226, 137, 151, 0}},\n{(unsigned char*)\"circlearrowleft\", {226, 134, 186, 0}},\n{(unsigned char*)\"circlearrowright\", {226, 134, 187, 0}},\n{(unsigned char*)\"circledR\", {194, 174, 0}},\n{(unsigned char*)\"circledS\", {226, 147, 136, 0}},\n{(unsigned char*)\"circledast\", {226, 138, 155, 0}},\n{(unsigned char*)\"circledcirc\", {226, 138, 154, 0}},\n{(unsigned char*)\"circleddash\", {226, 138, 157, 0}},\n{(unsigned char*)\"cire\", {226, 137, 151, 0}},\n{(unsigned char*)\"cirfnint\", {226, 168, 144, 0}},\n{(unsigned char*)\"cirmid\", {226, 171, 175, 0}},\n{(unsigned char*)\"cirscir\", {226, 167, 130, 0}},\n{(unsigned char*)\"clubs\", {226, 153, 163, 0}},\n{(unsigned char*)\"clubsuit\", {226, 153, 163, 0}},\n{(unsigned char*)\"colon\", {58, 0}},\n{(unsigned char*)\"colone\", {226, 137, 148, 0}},\n{(unsigned char*)\"coloneq\", {226, 137, 148, 0}},\n{(unsigned char*)\"comma\", {44, 0}},\n{(unsigned char*)\"commat\", {64, 0}},\n{(unsigned char*)\"comp\", {226, 136, 129, 0}},\n{(unsigned char*)\"compfn\", {226, 136, 152, 0}},\n{(unsigned char*)\"complement\", {226, 136, 129, 0}},\n{(unsigned char*)\"complexes\", {226, 132, 130, 0}},\n{(unsigned char*)\"cong\", {226, 137, 133, 0}},\n{(unsigned char*)\"congdot\", {226, 169, 173, 0}},\n{(unsigned char*)\"conint\", {226, 136, 174, 0}},\n{(unsigned char*)\"copf\", {240, 157, 149, 148, 0}},\n{(unsigned char*)\"coprod\", {226, 136, 144, 0}},\n{(unsigned char*)\"copy\", {194, 169, 0}},\n{(unsigned char*)\"copysr\", {226, 132, 151, 0}},\n{(unsigned char*)\"crarr\", {226, 134, 181, 0}},\n{(unsigned char*)\"cross\", {226, 156, 151, 0}},\n{(unsigned char*)\"cscr\", {240, 157, 146, 184, 0}},\n{(unsigned char*)\"csub\", {226, 171, 143, 0}},\n{(unsigned char*)\"csube\", {226, 171, 145, 0}},\n{(unsigned char*)\"csup\", {226, 171, 144, 0}},\n{(unsigned char*)\"csupe\", {226, 171, 146, 0}},\n{(unsigned char*)\"ctdot\", {226, 139, 175, 0}},\n{(unsigned char*)\"cudarrl\", {226, 164, 184, 0}},\n{(unsigned char*)\"cudarrr\", {226, 164, 181, 0}},\n{(unsigned char*)\"cuepr\", {226, 139, 158, 0}},\n{(unsigned char*)\"cuesc\", {226, 139, 159, 0}},\n{(unsigned char*)\"cularr\", {226, 134, 182, 0}},\n{(unsigned char*)\"cularrp\", {226, 164, 189, 0}},\n{(unsigned char*)\"cup\", {226, 136, 170, 0}},\n{(unsigned char*)\"cupbrcap\", {226, 169, 136, 0}},\n{(unsigned char*)\"cupcap\", {226, 169, 134, 0}},\n{(unsigned char*)\"cupcup\", {226, 169, 138, 0}},\n{(unsigned char*)\"cupdot\", {226, 138, 141, 0}},\n{(unsigned char*)\"cupor\", {226, 169, 133, 0}},\n{(unsigned char*)\"cups\", {226, 136, 170, 239, 184, 128, 0}},\n{(unsigned char*)\"curarr\", {226, 134, 183, 0}},\n{(unsigned char*)\"curarrm\", {226, 164, 188, 0}},\n{(unsigned char*)\"curlyeqprec\", {226, 139, 158, 0}},\n{(unsigned char*)\"curlyeqsucc\", {226, 139, 159, 0}},\n{(unsigned char*)\"curlyvee\", {226, 139, 142, 0}},\n{(unsigned char*)\"curlywedge\", {226, 139, 143, 0}},\n{(unsigned char*)\"curren\", {194, 164, 0}},\n{(unsigned char*)\"curvearrowleft\", {226, 134, 182, 0}},\n{(unsigned char*)\"curvearrowright\", {226, 134, 183, 0}},\n{(unsigned char*)\"cuvee\", {226, 139, 142, 0}},\n{(unsigned char*)\"cuwed\", {226, 139, 143, 0}},\n{(unsigned char*)\"cwconint\", {226, 136, 178, 0}},\n{(unsigned char*)\"cwint\", {226, 136, 177, 0}},\n{(unsigned char*)\"cylcty\", {226, 140, 173, 0}},\n{(unsigned char*)\"dArr\", {226, 135, 147, 0}},\n{(unsigned char*)\"dHar\", {226, 165, 165, 0}},\n{(unsigned char*)\"dagger\", {226, 128, 160, 0}},\n{(unsigned char*)\"daleth\", {226, 132, 184, 0}},\n{(unsigned char*)\"darr\", {226, 134, 147, 0}},\n{(unsigned char*)\"dash\", {226, 128, 144, 0}},\n{(unsigned char*)\"dashv\", {226, 138, 163, 0}},\n{(unsigned char*)\"dbkarow\", {226, 164, 143, 0}},\n{(unsigned char*)\"dblac\", {203, 157, 0}},\n{(unsigned char*)\"dcaron\", {196, 143, 0}},\n{(unsigned char*)\"dcy\", {208, 180, 0}},\n{(unsigned char*)\"dd\", {226, 133, 134, 0}},\n{(unsigned char*)\"ddagger\", {226, 128, 161, 0}},\n{(unsigned char*)\"ddarr\", {226, 135, 138, 0}},\n{(unsigned char*)\"ddotseq\", {226, 169, 183, 0}},\n{(unsigned char*)\"deg\", {194, 176, 0}},\n{(unsigned char*)\"delta\", {206, 180, 0}},\n{(unsigned char*)\"demptyv\", {226, 166, 177, 0}},\n{(unsigned char*)\"dfisht\", {226, 165, 191, 0}},\n{(unsigned char*)\"dfr\", {240, 157, 148, 161, 0}},\n{(unsigned char*)\"dharl\", {226, 135, 131, 0}},\n{(unsigned char*)\"dharr\", {226, 135, 130, 0}},\n{(unsigned char*)\"diam\", {226, 139, 132, 0}},\n{(unsigned char*)\"diamond\", {226, 139, 132, 0}},\n{(unsigned char*)\"diamondsuit\", {226, 153, 166, 0}},\n{(unsigned char*)\"diams\", {226, 153, 166, 0}},\n{(unsigned char*)\"die\", {194, 168, 0}},\n{(unsigned char*)\"digamma\", {207, 157, 0}},\n{(unsigned char*)\"disin\", {226, 139, 178, 0}},\n{(unsigned char*)\"div\", {195, 183, 0}},\n{(unsigned char*)\"divide\", {195, 183, 0}},\n{(unsigned char*)\"divideontimes\", {226, 139, 135, 0}},\n{(unsigned char*)\"divonx\", {226, 139, 135, 0}},\n{(unsigned char*)\"djcy\", {209, 146, 0}},\n{(unsigned char*)\"dlcorn\", {226, 140, 158, 0}},\n{(unsigned char*)\"dlcrop\", {226, 140, 141, 0}},\n{(unsigned char*)\"dollar\", {36, 0}},\n{(unsigned char*)\"dopf\", {240, 157, 149, 149, 0}},\n{(unsigned char*)\"dot\", {203, 153, 0}},\n{(unsigned char*)\"doteq\", {226, 137, 144, 0}},\n{(unsigned char*)\"doteqdot\", {226, 137, 145, 0}},\n{(unsigned char*)\"dotminus\", {226, 136, 184, 0}},\n{(unsigned char*)\"dotplus\", {226, 136, 148, 0}},\n{(unsigned char*)\"dotsquare\", {226, 138, 161, 0}},\n{(unsigned char*)\"doublebarwedge\", {226, 140, 134, 0}},\n{(unsigned char*)\"downarrow\", {226, 134, 147, 0}},\n{(unsigned char*)\"downdownarrows\", {226, 135, 138, 0}},\n{(unsigned char*)\"downharpoonleft\", {226, 135, 131, 0}},\n{(unsigned char*)\"downharpoonright\", {226, 135, 130, 0}},\n{(unsigned char*)\"drbkarow\", {226, 164, 144, 0}},\n{(unsigned char*)\"drcorn\", {226, 140, 159, 0}},\n{(unsigned char*)\"drcrop\", {226, 140, 140, 0}},\n{(unsigned char*)\"dscr\", {240, 157, 146, 185, 0}},\n{(unsigned char*)\"dscy\", {209, 149, 0}},\n{(unsigned char*)\"dsol\", {226, 167, 182, 0}},\n{(unsigned char*)\"dstrok\", {196, 145, 0}},\n{(unsigned char*)\"dtdot\", {226, 139, 177, 0}},\n{(unsigned char*)\"dtri\", {226, 150, 191, 0}},\n{(unsigned char*)\"dtrif\", {226, 150, 190, 0}},\n{(unsigned char*)\"duarr\", {226, 135, 181, 0}},\n{(unsigned char*)\"duhar\", {226, 165, 175, 0}},\n{(unsigned char*)\"dwangle\", {226, 166, 166, 0}},\n{(unsigned char*)\"dzcy\", {209, 159, 0}},\n{(unsigned char*)\"dzigrarr\", {226, 159, 191, 0}},\n{(unsigned char*)\"eDDot\", {226, 169, 183, 0}},\n{(unsigned char*)\"eDot\", {226, 137, 145, 0}},\n{(unsigned char*)\"eacute\", {195, 169, 0}},\n{(unsigned char*)\"easter\", {226, 169, 174, 0}},\n{(unsigned char*)\"ecaron\", {196, 155, 0}},\n{(unsigned char*)\"ecir\", {226, 137, 150, 0}},\n{(unsigned char*)\"ecirc\", {195, 170, 0}},\n{(unsigned char*)\"ecolon\", {226, 137, 149, 0}},\n{(unsigned char*)\"ecy\", {209, 141, 0}},\n{(unsigned char*)\"edot\", {196, 151, 0}},\n{(unsigned char*)\"ee\", {226, 133, 135, 0}},\n{(unsigned char*)\"efDot\", {226, 137, 146, 0}},\n{(unsigned char*)\"efr\", {240, 157, 148, 162, 0}},\n{(unsigned char*)\"eg\", {226, 170, 154, 0}},\n{(unsigned char*)\"egrave\", {195, 168, 0}},\n{(unsigned char*)\"egs\", {226, 170, 150, 0}},\n{(unsigned char*)\"egsdot\", {226, 170, 152, 0}},\n{(unsigned char*)\"el\", {226, 170, 153, 0}},\n{(unsigned char*)\"elinters\", {226, 143, 167, 0}},\n{(unsigned char*)\"ell\", {226, 132, 147, 0}},\n{(unsigned char*)\"els\", {226, 170, 149, 0}},\n{(unsigned char*)\"elsdot\", {226, 170, 151, 0}},\n{(unsigned char*)\"emacr\", {196, 147, 0}},\n{(unsigned char*)\"empty\", {226, 136, 133, 0}},\n{(unsigned char*)\"emptyset\", {226, 136, 133, 0}},\n{(unsigned char*)\"emptyv\", {226, 136, 133, 0}},\n{(unsigned char*)\"emsp\", {226, 128, 131, 0}},\n{(unsigned char*)\"emsp13\", {226, 128, 132, 0}},\n{(unsigned char*)\"emsp14\", {226, 128, 133, 0}},\n{(unsigned char*)\"eng\", {197, 139, 0}},\n{(unsigned char*)\"ensp\", {226, 128, 130, 0}},\n{(unsigned char*)\"eogon\", {196, 153, 0}},\n{(unsigned char*)\"eopf\", {240, 157, 149, 150, 0}},\n{(unsigned char*)\"epar\", {226, 139, 149, 0}},\n{(unsigned char*)\"eparsl\", {226, 167, 163, 0}},\n{(unsigned char*)\"eplus\", {226, 169, 177, 0}},\n{(unsigned char*)\"epsi\", {206, 181, 0}},\n{(unsigned char*)\"epsilon\", {206, 181, 0}},\n{(unsigned char*)\"epsiv\", {207, 181, 0}},\n{(unsigned char*)\"eqcirc\", {226, 137, 150, 0}},\n{(unsigned char*)\"eqcolon\", {226, 137, 149, 0}},\n{(unsigned char*)\"eqsim\", {226, 137, 130, 0}},\n{(unsigned char*)\"eqslantgtr\", {226, 170, 150, 0}},\n{(unsigned char*)\"eqslantless\", {226, 170, 149, 0}},\n{(unsigned char*)\"equals\", {61, 0}},\n{(unsigned char*)\"equest\", {226, 137, 159, 0}},\n{(unsigned char*)\"equiv\", {226, 137, 161, 0}},\n{(unsigned char*)\"equivDD\", {226, 169, 184, 0}},\n{(unsigned char*)\"eqvparsl\", {226, 167, 165, 0}},\n{(unsigned char*)\"erDot\", {226, 137, 147, 0}},\n{(unsigned char*)\"erarr\", {226, 165, 177, 0}},\n{(unsigned char*)\"escr\", {226, 132, 175, 0}},\n{(unsigned char*)\"esdot\", {226, 137, 144, 0}},\n{(unsigned char*)\"esim\", {226, 137, 130, 0}},\n{(unsigned char*)\"eta\", {206, 183, 0}},\n{(unsigned char*)\"eth\", {195, 176, 0}},\n{(unsigned char*)\"euml\", {195, 171, 0}},\n{(unsigned char*)\"euro\", {226, 130, 172, 0}},\n{(unsigned char*)\"excl\", {33, 0}},\n{(unsigned char*)\"exist\", {226, 136, 131, 0}},\n{(unsigned char*)\"expectation\", {226, 132, 176, 0}},\n{(unsigned char*)\"exponentiale\", {226, 133, 135, 0}},\n{(unsigned char*)\"fallingdotseq\", {226, 137, 146, 0}},\n{(unsigned char*)\"fcy\", {209, 132, 0}},\n{(unsigned char*)\"female\", {226, 153, 128, 0}},\n{(unsigned char*)\"ffilig\", {239, 172, 131, 0}},\n{(unsigned char*)\"fflig\", {239, 172, 128, 0}},\n{(unsigned char*)\"ffllig\", {239, 172, 132, 0}},\n{(unsigned char*)\"ffr\", {240, 157, 148, 163, 0}},\n{(unsigned char*)\"filig\", {239, 172, 129, 0}},\n{(unsigned char*)\"fjlig\", {102, 106, 0}},\n{(unsigned char*)\"flat\", {226, 153, 173, 0}},\n{(unsigned char*)\"fllig\", {239, 172, 130, 0}},\n{(unsigned char*)\"fltns\", {226, 150, 177, 0}},\n{(unsigned char*)\"fnof\", {198, 146, 0}},\n{(unsigned char*)\"fopf\", {240, 157, 149, 151, 0}},\n{(unsigned char*)\"forall\", {226, 136, 128, 0}},\n{(unsigned char*)\"fork\", {226, 139, 148, 0}},\n{(unsigned char*)\"forkv\", {226, 171, 153, 0}},\n{(unsigned char*)\"fpartint\", {226, 168, 141, 0}},\n{(unsigned char*)\"frac12\", {194, 189, 0}},\n{(unsigned char*)\"frac13\", {226, 133, 147, 0}},\n{(unsigned char*)\"frac14\", {194, 188, 0}},\n{(unsigned char*)\"frac15\", {226, 133, 149, 0}},\n{(unsigned char*)\"frac16\", {226, 133, 153, 0}},\n{(unsigned char*)\"frac18\", {226, 133, 155, 0}},\n{(unsigned char*)\"frac23\", {226, 133, 148, 0}},\n{(unsigned char*)\"frac25\", {226, 133, 150, 0}},\n{(unsigned char*)\"frac34\", {194, 190, 0}},\n{(unsigned char*)\"frac35\", {226, 133, 151, 0}},\n{(unsigned char*)\"frac38\", {226, 133, 156, 0}},\n{(unsigned char*)\"frac45\", {226, 133, 152, 0}},\n{(unsigned char*)\"frac56\", {226, 133, 154, 0}},\n{(unsigned char*)\"frac58\", {226, 133, 157, 0}},\n{(unsigned char*)\"frac78\", {226, 133, 158, 0}},\n{(unsigned char*)\"frasl\", {226, 129, 132, 0}},\n{(unsigned char*)\"frown\", {226, 140, 162, 0}},\n{(unsigned char*)\"fscr\", {240, 157, 146, 187, 0}},\n{(unsigned char*)\"gE\", {226, 137, 167, 0}},\n{(unsigned char*)\"gEl\", {226, 170, 140, 0}},\n{(unsigned char*)\"gacute\", {199, 181, 0}},\n{(unsigned char*)\"gamma\", {206, 179, 0}},\n{(unsigned char*)\"gammad\", {207, 157, 0}},\n{(unsigned char*)\"gap\", {226, 170, 134, 0}},\n{(unsigned char*)\"gbreve\", {196, 159, 0}},\n{(unsigned char*)\"gcirc\", {196, 157, 0}},\n{(unsigned char*)\"gcy\", {208, 179, 0}},\n{(unsigned char*)\"gdot\", {196, 161, 0}},\n{(unsigned char*)\"ge\", {226, 137, 165, 0}},\n{(unsigned char*)\"gel\", {226, 139, 155, 0}},\n{(unsigned char*)\"geq\", {226, 137, 165, 0}},\n{(unsigned char*)\"geqq\", {226, 137, 167, 0}},\n{(unsigned char*)\"geqslant\", {226, 169, 190, 0}},\n{(unsigned char*)\"ges\", {226, 169, 190, 0}},\n{(unsigned char*)\"gescc\", {226, 170, 169, 0}},\n{(unsigned char*)\"gesdot\", {226, 170, 128, 0}},\n{(unsigned char*)\"gesdoto\", {226, 170, 130, 0}},\n{(unsigned char*)\"gesdotol\", {226, 170, 132, 0}},\n{(unsigned char*)\"gesl\", {226, 139, 155, 239, 184, 128, 0}},\n{(unsigned char*)\"gesles\", {226, 170, 148, 0}},\n{(unsigned char*)\"gfr\", {240, 157, 148, 164, 0}},\n{(unsigned char*)\"gg\", {226, 137, 171, 0}},\n{(unsigned char*)\"ggg\", {226, 139, 153, 0}},\n{(unsigned char*)\"gimel\", {226, 132, 183, 0}},\n{(unsigned char*)\"gjcy\", {209, 147, 0}},\n{(unsigned char*)\"gl\", {226, 137, 183, 0}},\n{(unsigned char*)\"glE\", {226, 170, 146, 0}},\n{(unsigned char*)\"gla\", {226, 170, 165, 0}},\n{(unsigned char*)\"glj\", {226, 170, 164, 0}},\n{(unsigned char*)\"gnE\", {226, 137, 169, 0}},\n{(unsigned char*)\"gnap\", {226, 170, 138, 0}},\n{(unsigned char*)\"gnapprox\", {226, 170, 138, 0}},\n{(unsigned char*)\"gne\", {226, 170, 136, 0}},\n{(unsigned char*)\"gneq\", {226, 170, 136, 0}},\n{(unsigned char*)\"gneqq\", {226, 137, 169, 0}},\n{(unsigned char*)\"gnsim\", {226, 139, 167, 0}},\n{(unsigned char*)\"gopf\", {240, 157, 149, 152, 0}},\n{(unsigned char*)\"grave\", {96, 0}},\n{(unsigned char*)\"gscr\", {226, 132, 138, 0}},\n{(unsigned char*)\"gsim\", {226, 137, 179, 0}},\n{(unsigned char*)\"gsime\", {226, 170, 142, 0}},\n{(unsigned char*)\"gsiml\", {226, 170, 144, 0}},\n{(unsigned char*)\"gt\", {62, 0}},\n{(unsigned char*)\"gtcc\", {226, 170, 167, 0}},\n{(unsigned char*)\"gtcir\", {226, 169, 186, 0}},\n{(unsigned char*)\"gtdot\", {226, 139, 151, 0}},\n{(unsigned char*)\"gtlPar\", {226, 166, 149, 0}},\n{(unsigned char*)\"gtquest\", {226, 169, 188, 0}},\n{(unsigned char*)\"gtrapprox\", {226, 170, 134, 0}},\n{(unsigned char*)\"gtrarr\", {226, 165, 184, 0}},\n{(unsigned char*)\"gtrdot\", {226, 139, 151, 0}},\n{(unsigned char*)\"gtreqless\", {226, 139, 155, 0}},\n{(unsigned char*)\"gtreqqless\", {226, 170, 140, 0}},\n{(unsigned char*)\"gtrless\", {226, 137, 183, 0}},\n{(unsigned char*)\"gtrsim\", {226, 137, 179, 0}},\n{(unsigned char*)\"gvertneqq\", {226, 137, 169, 239, 184, 128, 0}},\n{(unsigned char*)\"gvnE\", {226, 137, 169, 239, 184, 128, 0}},\n{(unsigned char*)\"hArr\", {226, 135, 148, 0}},\n{(unsigned char*)\"hairsp\", {226, 128, 138, 0}},\n{(unsigned char*)\"half\", {194, 189, 0}},\n{(unsigned char*)\"hamilt\", {226, 132, 139, 0}},\n{(unsigned char*)\"hardcy\", {209, 138, 0}},\n{(unsigned char*)\"harr\", {226, 134, 148, 0}},\n{(unsigned char*)\"harrcir\", {226, 165, 136, 0}},\n{(unsigned char*)\"harrw\", {226, 134, 173, 0}},\n{(unsigned char*)\"hbar\", {226, 132, 143, 0}},\n{(unsigned char*)\"hcirc\", {196, 165, 0}},\n{(unsigned char*)\"hearts\", {226, 153, 165, 0}},\n{(unsigned char*)\"heartsuit\", {226, 153, 165, 0}},\n{(unsigned char*)\"hellip\", {226, 128, 166, 0}},\n{(unsigned char*)\"hercon\", {226, 138, 185, 0}},\n{(unsigned char*)\"hfr\", {240, 157, 148, 165, 0}},\n{(unsigned char*)\"hksearow\", {226, 164, 165, 0}},\n{(unsigned char*)\"hkswarow\", {226, 164, 166, 0}},\n{(unsigned char*)\"hoarr\", {226, 135, 191, 0}},\n{(unsigned char*)\"homtht\", {226, 136, 187, 0}},\n{(unsigned char*)\"hookleftarrow\", {226, 134, 169, 0}},\n{(unsigned char*)\"hookrightarrow\", {226, 134, 170, 0}},\n{(unsigned char*)\"hopf\", {240, 157, 149, 153, 0}},\n{(unsigned char*)\"horbar\", {226, 128, 149, 0}},\n{(unsigned char*)\"hscr\", {240, 157, 146, 189, 0}},\n{(unsigned char*)\"hslash\", {226, 132, 143, 0}},\n{(unsigned char*)\"hstrok\", {196, 167, 0}},\n{(unsigned char*)\"hybull\", {226, 129, 131, 0}},\n{(unsigned char*)\"hyphen\", {226, 128, 144, 0}},\n{(unsigned char*)\"iacute\", {195, 173, 0}},\n{(unsigned char*)\"ic\", {226, 129, 163, 0}},\n{(unsigned char*)\"icirc\", {195, 174, 0}},\n{(unsigned char*)\"icy\", {208, 184, 0}},\n{(unsigned char*)\"iecy\", {208, 181, 0}},\n{(unsigned char*)\"iexcl\", {194, 161, 0}},\n{(unsigned char*)\"iff\", {226, 135, 148, 0}},\n{(unsigned char*)\"ifr\", {240, 157, 148, 166, 0}},\n{(unsigned char*)\"igrave\", {195, 172, 0}},\n{(unsigned char*)\"ii\", {226, 133, 136, 0}},\n{(unsigned char*)\"iiiint\", {226, 168, 140, 0}},\n{(unsigned char*)\"iiint\", {226, 136, 173, 0}},\n{(unsigned char*)\"iinfin\", {226, 167, 156, 0}},\n{(unsigned char*)\"iiota\", {226, 132, 169, 0}},\n{(unsigned char*)\"ijlig\", {196, 179, 0}},\n{(unsigned char*)\"imacr\", {196, 171, 0}},\n{(unsigned char*)\"image\", {226, 132, 145, 0}},\n{(unsigned char*)\"imagline\", {226, 132, 144, 0}},\n{(unsigned char*)\"imagpart\", {226, 132, 145, 0}},\n{(unsigned char*)\"imath\", {196, 177, 0}},\n{(unsigned char*)\"imof\", {226, 138, 183, 0}},\n{(unsigned char*)\"imped\", {198, 181, 0}},\n{(unsigned char*)\"in\", {226, 136, 136, 0}},\n{(unsigned char*)\"incare\", {226, 132, 133, 0}},\n{(unsigned char*)\"infin\", {226, 136, 158, 0}},\n{(unsigned char*)\"infintie\", {226, 167, 157, 0}},\n{(unsigned char*)\"inodot\", {196, 177, 0}},\n{(unsigned char*)\"int\", {226, 136, 171, 0}},\n{(unsigned char*)\"intcal\", {226, 138, 186, 0}},\n{(unsigned char*)\"integers\", {226, 132, 164, 0}},\n{(unsigned char*)\"intercal\", {226, 138, 186, 0}},\n{(unsigned char*)\"intlarhk\", {226, 168, 151, 0}},\n{(unsigned char*)\"intprod\", {226, 168, 188, 0}},\n{(unsigned char*)\"iocy\", {209, 145, 0}},\n{(unsigned char*)\"iogon\", {196, 175, 0}},\n{(unsigned char*)\"iopf\", {240, 157, 149, 154, 0}},\n{(unsigned char*)\"iota\", {206, 185, 0}},\n{(unsigned char*)\"iprod\", {226, 168, 188, 0}},\n{(unsigned char*)\"iquest\", {194, 191, 0}},\n{(unsigned char*)\"iscr\", {240, 157, 146, 190, 0}},\n{(unsigned char*)\"isin\", {226, 136, 136, 0}},\n{(unsigned char*)\"isinE\", {226, 139, 185, 0}},\n{(unsigned char*)\"isindot\", {226, 139, 181, 0}},\n{(unsigned char*)\"isins\", {226, 139, 180, 0}},\n{(unsigned char*)\"isinsv\", {226, 139, 179, 0}},\n{(unsigned char*)\"isinv\", {226, 136, 136, 0}},\n{(unsigned char*)\"it\", {226, 129, 162, 0}},\n{(unsigned char*)\"itilde\", {196, 169, 0}},\n{(unsigned char*)\"iukcy\", {209, 150, 0}},\n{(unsigned char*)\"iuml\", {195, 175, 0}},\n{(unsigned char*)\"jcirc\", {196, 181, 0}},\n{(unsigned char*)\"jcy\", {208, 185, 0}},\n{(unsigned char*)\"jfr\", {240, 157, 148, 167, 0}},\n{(unsigned char*)\"jmath\", {200, 183, 0}},\n{(unsigned char*)\"jopf\", {240, 157, 149, 155, 0}},\n{(unsigned char*)\"jscr\", {240, 157, 146, 191, 0}},\n{(unsigned char*)\"jsercy\", {209, 152, 0}},\n{(unsigned char*)\"jukcy\", {209, 148, 0}},\n{(unsigned char*)\"kappa\", {206, 186, 0}},\n{(unsigned char*)\"kappav\", {207, 176, 0}},\n{(unsigned char*)\"kcedil\", {196, 183, 0}},\n{(unsigned char*)\"kcy\", {208, 186, 0}},\n{(unsigned char*)\"kfr\", {240, 157, 148, 168, 0}},\n{(unsigned char*)\"kgreen\", {196, 184, 0}},\n{(unsigned char*)\"khcy\", {209, 133, 0}},\n{(unsigned char*)\"kjcy\", {209, 156, 0}},\n{(unsigned char*)\"kopf\", {240, 157, 149, 156, 0}},\n{(unsigned char*)\"kscr\", {240, 157, 147, 128, 0}},\n{(unsigned char*)\"lAarr\", {226, 135, 154, 0}},\n{(unsigned char*)\"lArr\", {226, 135, 144, 0}},\n{(unsigned char*)\"lAtail\", {226, 164, 155, 0}},\n{(unsigned char*)\"lBarr\", {226, 164, 142, 0}},\n{(unsigned char*)\"lE\", {226, 137, 166, 0}},\n{(unsigned char*)\"lEg\", {226, 170, 139, 0}},\n{(unsigned char*)\"lHar\", {226, 165, 162, 0}},\n{(unsigned char*)\"lacute\", {196, 186, 0}},\n{(unsigned char*)\"laemptyv\", {226, 166, 180, 0}},\n{(unsigned char*)\"lagran\", {226, 132, 146, 0}},\n{(unsigned char*)\"lambda\", {206, 187, 0}},\n{(unsigned char*)\"lang\", {226, 159, 168, 0}},\n{(unsigned char*)\"langd\", {226, 166, 145, 0}},\n{(unsigned char*)\"langle\", {226, 159, 168, 0}},\n{(unsigned char*)\"lap\", {226, 170, 133, 0}},\n{(unsigned char*)\"laquo\", {194, 171, 0}},\n{(unsigned char*)\"larr\", {226, 134, 144, 0}},\n{(unsigned char*)\"larrb\", {226, 135, 164, 0}},\n{(unsigned char*)\"larrbfs\", {226, 164, 159, 0}},\n{(unsigned char*)\"larrfs\", {226, 164, 157, 0}},\n{(unsigned char*)\"larrhk\", {226, 134, 169, 0}},\n{(unsigned char*)\"larrlp\", {226, 134, 171, 0}},\n{(unsigned char*)\"larrpl\", {226, 164, 185, 0}},\n{(unsigned char*)\"larrsim\", {226, 165, 179, 0}},\n{(unsigned char*)\"larrtl\", {226, 134, 162, 0}},\n{(unsigned char*)\"lat\", {226, 170, 171, 0}},\n{(unsigned char*)\"latail\", {226, 164, 153, 0}},\n{(unsigned char*)\"late\", {226, 170, 173, 0}},\n{(unsigned char*)\"lates\", {226, 170, 173, 239, 184, 128, 0}},\n{(unsigned char*)\"lbarr\", {226, 164, 140, 0}},\n{(unsigned char*)\"lbbrk\", {226, 157, 178, 0}},\n{(unsigned char*)\"lbrace\", {123, 0}},\n{(unsigned char*)\"lbrack\", {91, 0}},\n{(unsigned char*)\"lbrke\", {226, 166, 139, 0}},\n{(unsigned char*)\"lbrksld\", {226, 166, 143, 0}},\n{(unsigned char*)\"lbrkslu\", {226, 166, 141, 0}},\n{(unsigned char*)\"lcaron\", {196, 190, 0}},\n{(unsigned char*)\"lcedil\", {196, 188, 0}},\n{(unsigned char*)\"lceil\", {226, 140, 136, 0}},\n{(unsigned char*)\"lcub\", {123, 0}},\n{(unsigned char*)\"lcy\", {208, 187, 0}},\n{(unsigned char*)\"ldca\", {226, 164, 182, 0}},\n{(unsigned char*)\"ldquo\", {226, 128, 156, 0}},\n{(unsigned char*)\"ldquor\", {226, 128, 158, 0}},\n{(unsigned char*)\"ldrdhar\", {226, 165, 167, 0}},\n{(unsigned char*)\"ldrushar\", {226, 165, 139, 0}},\n{(unsigned char*)\"ldsh\", {226, 134, 178, 0}},\n{(unsigned char*)\"le\", {226, 137, 164, 0}},\n{(unsigned char*)\"leftarrow\", {226, 134, 144, 0}},\n{(unsigned char*)\"leftarrowtail\", {226, 134, 162, 0}},\n{(unsigned char*)\"leftharpoondown\", {226, 134, 189, 0}},\n{(unsigned char*)\"leftharpoonup\", {226, 134, 188, 0}},\n{(unsigned char*)\"leftleftarrows\", {226, 135, 135, 0}},\n{(unsigned char*)\"leftrightarrow\", {226, 134, 148, 0}},\n{(unsigned char*)\"leftrightarrows\", {226, 135, 134, 0}},\n{(unsigned char*)\"leftrightharpoons\", {226, 135, 139, 0}},\n{(unsigned char*)\"leftrightsquigarrow\", {226, 134, 173, 0}},\n{(unsigned char*)\"leftthreetimes\", {226, 139, 139, 0}},\n{(unsigned char*)\"leg\", {226, 139, 154, 0}},\n{(unsigned char*)\"leq\", {226, 137, 164, 0}},\n{(unsigned char*)\"leqq\", {226, 137, 166, 0}},\n{(unsigned char*)\"leqslant\", {226, 169, 189, 0}},\n{(unsigned char*)\"les\", {226, 169, 189, 0}},\n{(unsigned char*)\"lescc\", {226, 170, 168, 0}},\n{(unsigned char*)\"lesdot\", {226, 169, 191, 0}},\n{(unsigned char*)\"lesdoto\", {226, 170, 129, 0}},\n{(unsigned char*)\"lesdotor\", {226, 170, 131, 0}},\n{(unsigned char*)\"lesg\", {226, 139, 154, 239, 184, 128, 0}},\n{(unsigned char*)\"lesges\", {226, 170, 147, 0}},\n{(unsigned char*)\"lessapprox\", {226, 170, 133, 0}},\n{(unsigned char*)\"lessdot\", {226, 139, 150, 0}},\n{(unsigned char*)\"lesseqgtr\", {226, 139, 154, 0}},\n{(unsigned char*)\"lesseqqgtr\", {226, 170, 139, 0}},\n{(unsigned char*)\"lessgtr\", {226, 137, 182, 0}},\n{(unsigned char*)\"lesssim\", {226, 137, 178, 0}},\n{(unsigned char*)\"lfisht\", {226, 165, 188, 0}},\n{(unsigned char*)\"lfloor\", {226, 140, 138, 0}},\n{(unsigned char*)\"lfr\", {240, 157, 148, 169, 0}},\n{(unsigned char*)\"lg\", {226, 137, 182, 0}},\n{(unsigned char*)\"lgE\", {226, 170, 145, 0}},\n{(unsigned char*)\"lhard\", {226, 134, 189, 0}},\n{(unsigned char*)\"lharu\", {226, 134, 188, 0}},\n{(unsigned char*)\"lharul\", {226, 165, 170, 0}},\n{(unsigned char*)\"lhblk\", {226, 150, 132, 0}},\n{(unsigned char*)\"ljcy\", {209, 153, 0}},\n{(unsigned char*)\"ll\", {226, 137, 170, 0}},\n{(unsigned char*)\"llarr\", {226, 135, 135, 0}},\n{(unsigned char*)\"llcorner\", {226, 140, 158, 0}},\n{(unsigned char*)\"llhard\", {226, 165, 171, 0}},\n{(unsigned char*)\"lltri\", {226, 151, 186, 0}},\n{(unsigned char*)\"lmidot\", {197, 128, 0}},\n{(unsigned char*)\"lmoust\", {226, 142, 176, 0}},\n{(unsigned char*)\"lmoustache\", {226, 142, 176, 0}},\n{(unsigned char*)\"lnE\", {226, 137, 168, 0}},\n{(unsigned char*)\"lnap\", {226, 170, 137, 0}},\n{(unsigned char*)\"lnapprox\", {226, 170, 137, 0}},\n{(unsigned char*)\"lne\", {226, 170, 135, 0}},\n{(unsigned char*)\"lneq\", {226, 170, 135, 0}},\n{(unsigned char*)\"lneqq\", {226, 137, 168, 0}},\n{(unsigned char*)\"lnsim\", {226, 139, 166, 0}},\n{(unsigned char*)\"loang\", {226, 159, 172, 0}},\n{(unsigned char*)\"loarr\", {226, 135, 189, 0}},\n{(unsigned char*)\"lobrk\", {226, 159, 166, 0}},\n{(unsigned char*)\"longleftarrow\", {226, 159, 181, 0}},\n{(unsigned char*)\"longleftrightarrow\", {226, 159, 183, 0}},\n{(unsigned char*)\"longmapsto\", {226, 159, 188, 0}},\n{(unsigned char*)\"longrightarrow\", {226, 159, 182, 0}},\n{(unsigned char*)\"looparrowleft\", {226, 134, 171, 0}},\n{(unsigned char*)\"looparrowright\", {226, 134, 172, 0}},\n{(unsigned char*)\"lopar\", {226, 166, 133, 0}},\n{(unsigned char*)\"lopf\", {240, 157, 149, 157, 0}},\n{(unsigned char*)\"loplus\", {226, 168, 173, 0}},\n{(unsigned char*)\"lotimes\", {226, 168, 180, 0}},\n{(unsigned char*)\"lowast\", {226, 136, 151, 0}},\n{(unsigned char*)\"lowbar\", {95, 0}},\n{(unsigned char*)\"loz\", {226, 151, 138, 0}},\n{(unsigned char*)\"lozenge\", {226, 151, 138, 0}},\n{(unsigned char*)\"lozf\", {226, 167, 171, 0}},\n{(unsigned char*)\"lpar\", {40, 0}},\n{(unsigned char*)\"lparlt\", {226, 166, 147, 0}},\n{(unsigned char*)\"lrarr\", {226, 135, 134, 0}},\n{(unsigned char*)\"lrcorner\", {226, 140, 159, 0}},\n{(unsigned char*)\"lrhar\", {226, 135, 139, 0}},\n{(unsigned char*)\"lrhard\", {226, 165, 173, 0}},\n{(unsigned char*)\"lrm\", {226, 128, 142, 0}},\n{(unsigned char*)\"lrtri\", {226, 138, 191, 0}},\n{(unsigned char*)\"lsaquo\", {226, 128, 185, 0}},\n{(unsigned char*)\"lscr\", {240, 157, 147, 129, 0}},\n{(unsigned char*)\"lsh\", {226, 134, 176, 0}},\n{(unsigned char*)\"lsim\", {226, 137, 178, 0}},\n{(unsigned char*)\"lsime\", {226, 170, 141, 0}},\n{(unsigned char*)\"lsimg\", {226, 170, 143, 0}},\n{(unsigned char*)\"lsqb\", {91, 0}},\n{(unsigned char*)\"lsquo\", {226, 128, 152, 0}},\n{(unsigned char*)\"lsquor\", {226, 128, 154, 0}},\n{(unsigned char*)\"lstrok\", {197, 130, 0}},\n{(unsigned char*)\"lt\", {60, 0}},\n{(unsigned char*)\"ltcc\", {226, 170, 166, 0}},\n{(unsigned char*)\"ltcir\", {226, 169, 185, 0}},\n{(unsigned char*)\"ltdot\", {226, 139, 150, 0}},\n{(unsigned char*)\"lthree\", {226, 139, 139, 0}},\n{(unsigned char*)\"ltimes\", {226, 139, 137, 0}},\n{(unsigned char*)\"ltlarr\", {226, 165, 182, 0}},\n{(unsigned char*)\"ltquest\", {226, 169, 187, 0}},\n{(unsigned char*)\"ltrPar\", {226, 166, 150, 0}},\n{(unsigned char*)\"ltri\", {226, 151, 131, 0}},\n{(unsigned char*)\"ltrie\", {226, 138, 180, 0}},\n{(unsigned char*)\"ltrif\", {226, 151, 130, 0}},\n{(unsigned char*)\"lurdshar\", {226, 165, 138, 0}},\n{(unsigned char*)\"luruhar\", {226, 165, 166, 0}},\n{(unsigned char*)\"lvertneqq\", {226, 137, 168, 239, 184, 128, 0}},\n{(unsigned char*)\"lvnE\", {226, 137, 168, 239, 184, 128, 0}},\n{(unsigned char*)\"mDDot\", {226, 136, 186, 0}},\n{(unsigned char*)\"macr\", {194, 175, 0}},\n{(unsigned char*)\"male\", {226, 153, 130, 0}},\n{(unsigned char*)\"malt\", {226, 156, 160, 0}},\n{(unsigned char*)\"maltese\", {226, 156, 160, 0}},\n{(unsigned char*)\"map\", {226, 134, 166, 0}},\n{(unsigned char*)\"mapsto\", {226, 134, 166, 0}},\n{(unsigned char*)\"mapstodown\", {226, 134, 167, 0}},\n{(unsigned char*)\"mapstoleft\", {226, 134, 164, 0}},\n{(unsigned char*)\"mapstoup\", {226, 134, 165, 0}},\n{(unsigned char*)\"marker\", {226, 150, 174, 0}},\n{(unsigned char*)\"mcomma\", {226, 168, 169, 0}},\n{(unsigned char*)\"mcy\", {208, 188, 0}},\n{(unsigned char*)\"mdash\", {226, 128, 148, 0}},\n{(unsigned char*)\"measuredangle\", {226, 136, 161, 0}},\n{(unsigned char*)\"mfr\", {240, 157, 148, 170, 0}},\n{(unsigned char*)\"mho\", {226, 132, 167, 0}},\n{(unsigned char*)\"micro\", {194, 181, 0}},\n{(unsigned char*)\"mid\", {226, 136, 163, 0}},\n{(unsigned char*)\"midast\", {42, 0}},\n{(unsigned char*)\"midcir\", {226, 171, 176, 0}},\n{(unsigned char*)\"middot\", {194, 183, 0}},\n{(unsigned char*)\"minus\", {226, 136, 146, 0}},\n{(unsigned char*)\"minusb\", {226, 138, 159, 0}},\n{(unsigned char*)\"minusd\", {226, 136, 184, 0}},\n{(unsigned char*)\"minusdu\", {226, 168, 170, 0}},\n{(unsigned char*)\"mlcp\", {226, 171, 155, 0}},\n{(unsigned char*)\"mldr\", {226, 128, 166, 0}},\n{(unsigned char*)\"mnplus\", {226, 136, 147, 0}},\n{(unsigned char*)\"models\", {226, 138, 167, 0}},\n{(unsigned char*)\"mopf\", {240, 157, 149, 158, 0}},\n{(unsigned char*)\"mp\", {226, 136, 147, 0}},\n{(unsigned char*)\"mscr\", {240, 157, 147, 130, 0}},\n{(unsigned char*)\"mstpos\", {226, 136, 190, 0}},\n{(unsigned char*)\"mu\", {206, 188, 0}},\n{(unsigned char*)\"multimap\", {226, 138, 184, 0}},\n{(unsigned char*)\"mumap\", {226, 138, 184, 0}},\n{(unsigned char*)\"nGg\", {226, 139, 153, 204, 184, 0}},\n{(unsigned char*)\"nGt\", {226, 137, 171, 226, 131, 146, 0}},\n{(unsigned char*)\"nGtv\", {226, 137, 171, 204, 184, 0}},\n{(unsigned char*)\"nLeftarrow\", {226, 135, 141, 0}},\n{(unsigned char*)\"nLeftrightarrow\", {226, 135, 142, 0}},\n{(unsigned char*)\"nLl\", {226, 139, 152, 204, 184, 0}},\n{(unsigned char*)\"nLt\", {226, 137, 170, 226, 131, 146, 0}},\n{(unsigned char*)\"nLtv\", {226, 137, 170, 204, 184, 0}},\n{(unsigned char*)\"nRightarrow\", {226, 135, 143, 0}},\n{(unsigned char*)\"nVDash\", {226, 138, 175, 0}},\n{(unsigned char*)\"nVdash\", {226, 138, 174, 0}},\n{(unsigned char*)\"nabla\", {226, 136, 135, 0}},\n{(unsigned char*)\"nacute\", {197, 132, 0}},\n{(unsigned char*)\"nang\", {226, 136, 160, 226, 131, 146, 0}},\n{(unsigned char*)\"nap\", {226, 137, 137, 0}},\n{(unsigned char*)\"napE\", {226, 169, 176, 204, 184, 0}},\n{(unsigned char*)\"napid\", {226, 137, 139, 204, 184, 0}},\n{(unsigned char*)\"napos\", {197, 137, 0}},\n{(unsigned char*)\"napprox\", {226, 137, 137, 0}},\n{(unsigned char*)\"natur\", {226, 153, 174, 0}},\n{(unsigned char*)\"natural\", {226, 153, 174, 0}},\n{(unsigned char*)\"naturals\", {226, 132, 149, 0}},\n{(unsigned char*)\"nbsp\", {194, 160, 0}},\n{(unsigned char*)\"nbump\", {226, 137, 142, 204, 184, 0}},\n{(unsigned char*)\"nbumpe\", {226, 137, 143, 204, 184, 0}},\n{(unsigned char*)\"ncap\", {226, 169, 131, 0}},\n{(unsigned char*)\"ncaron\", {197, 136, 0}},\n{(unsigned char*)\"ncedil\", {197, 134, 0}},\n{(unsigned char*)\"ncong\", {226, 137, 135, 0}},\n{(unsigned char*)\"ncongdot\", {226, 169, 173, 204, 184, 0}},\n{(unsigned char*)\"ncup\", {226, 169, 130, 0}},\n{(unsigned char*)\"ncy\", {208, 189, 0}},\n{(unsigned char*)\"ndash\", {226, 128, 147, 0}},\n{(unsigned char*)\"ne\", {226, 137, 160, 0}},\n{(unsigned char*)\"neArr\", {226, 135, 151, 0}},\n{(unsigned char*)\"nearhk\", {226, 164, 164, 0}},\n{(unsigned char*)\"nearr\", {226, 134, 151, 0}},\n{(unsigned char*)\"nearrow\", {226, 134, 151, 0}},\n{(unsigned char*)\"nedot\", {226, 137, 144, 204, 184, 0}},\n{(unsigned char*)\"nequiv\", {226, 137, 162, 0}},\n{(unsigned char*)\"nesear\", {226, 164, 168, 0}},\n{(unsigned char*)\"nesim\", {226, 137, 130, 204, 184, 0}},\n{(unsigned char*)\"nexist\", {226, 136, 132, 0}},\n{(unsigned char*)\"nexists\", {226, 136, 132, 0}},\n{(unsigned char*)\"nfr\", {240, 157, 148, 171, 0}},\n{(unsigned char*)\"ngE\", {226, 137, 167, 204, 184, 0}},\n{(unsigned char*)\"nge\", {226, 137, 177, 0}},\n{(unsigned char*)\"ngeq\", {226, 137, 177, 0}},\n{(unsigned char*)\"ngeqq\", {226, 137, 167, 204, 184, 0}},\n{(unsigned char*)\"ngeqslant\", {226, 169, 190, 204, 184, 0}},\n{(unsigned char*)\"nges\", {226, 169, 190, 204, 184, 0}},\n{(unsigned char*)\"ngsim\", {226, 137, 181, 0}},\n{(unsigned char*)\"ngt\", {226, 137, 175, 0}},\n{(unsigned char*)\"ngtr\", {226, 137, 175, 0}},\n{(unsigned char*)\"nhArr\", {226, 135, 142, 0}},\n{(unsigned char*)\"nharr\", {226, 134, 174, 0}},\n{(unsigned char*)\"nhpar\", {226, 171, 178, 0}},\n{(unsigned char*)\"ni\", {226, 136, 139, 0}},\n{(unsigned char*)\"nis\", {226, 139, 188, 0}},\n{(unsigned char*)\"nisd\", {226, 139, 186, 0}},\n{(unsigned char*)\"niv\", {226, 136, 139, 0}},\n{(unsigned char*)\"njcy\", {209, 154, 0}},\n{(unsigned char*)\"nlArr\", {226, 135, 141, 0}},\n{(unsigned char*)\"nlE\", {226, 137, 166, 204, 184, 0}},\n{(unsigned char*)\"nlarr\", {226, 134, 154, 0}},\n{(unsigned char*)\"nldr\", {226, 128, 165, 0}},\n{(unsigned char*)\"nle\", {226, 137, 176, 0}},\n{(unsigned char*)\"nleftarrow\", {226, 134, 154, 0}},\n{(unsigned char*)\"nleftrightarrow\", {226, 134, 174, 0}},\n{(unsigned char*)\"nleq\", {226, 137, 176, 0}},\n{(unsigned char*)\"nleqq\", {226, 137, 166, 204, 184, 0}},\n{(unsigned char*)\"nleqslant\", {226, 169, 189, 204, 184, 0}},\n{(unsigned char*)\"nles\", {226, 169, 189, 204, 184, 0}},\n{(unsigned char*)\"nless\", {226, 137, 174, 0}},\n{(unsigned char*)\"nlsim\", {226, 137, 180, 0}},\n{(unsigned char*)\"nlt\", {226, 137, 174, 0}},\n{(unsigned char*)\"nltri\", {226, 139, 170, 0}},\n{(unsigned char*)\"nltrie\", {226, 139, 172, 0}},\n{(unsigned char*)\"nmid\", {226, 136, 164, 0}},\n{(unsigned char*)\"nopf\", {240, 157, 149, 159, 0}},\n{(unsigned char*)\"not\", {194, 172, 0}},\n{(unsigned char*)\"notin\", {226, 136, 137, 0}},\n{(unsigned char*)\"notinE\", {226, 139, 185, 204, 184, 0}},\n{(unsigned char*)\"notindot\", {226, 139, 181, 204, 184, 0}},\n{(unsigned char*)\"notinva\", {226, 136, 137, 0}},\n{(unsigned char*)\"notinvb\", {226, 139, 183, 0}},\n{(unsigned char*)\"notinvc\", {226, 139, 182, 0}},\n{(unsigned char*)\"notni\", {226, 136, 140, 0}},\n{(unsigned char*)\"notniva\", {226, 136, 140, 0}},\n{(unsigned char*)\"notnivb\", {226, 139, 190, 0}},\n{(unsigned char*)\"notnivc\", {226, 139, 189, 0}},\n{(unsigned char*)\"npar\", {226, 136, 166, 0}},\n{(unsigned char*)\"nparallel\", {226, 136, 166, 0}},\n{(unsigned char*)\"nparsl\", {226, 171, 189, 226, 131, 165, 0}},\n{(unsigned char*)\"npart\", {226, 136, 130, 204, 184, 0}},\n{(unsigned char*)\"npolint\", {226, 168, 148, 0}},\n{(unsigned char*)\"npr\", {226, 138, 128, 0}},\n{(unsigned char*)\"nprcue\", {226, 139, 160, 0}},\n{(unsigned char*)\"npre\", {226, 170, 175, 204, 184, 0}},\n{(unsigned char*)\"nprec\", {226, 138, 128, 0}},\n{(unsigned char*)\"npreceq\", {226, 170, 175, 204, 184, 0}},\n{(unsigned char*)\"nrArr\", {226, 135, 143, 0}},\n{(unsigned char*)\"nrarr\", {226, 134, 155, 0}},\n{(unsigned char*)\"nrarrc\", {226, 164, 179, 204, 184, 0}},\n{(unsigned char*)\"nrarrw\", {226, 134, 157, 204, 184, 0}},\n{(unsigned char*)\"nrightarrow\", {226, 134, 155, 0}},\n{(unsigned char*)\"nrtri\", {226, 139, 171, 0}},\n{(unsigned char*)\"nrtrie\", {226, 139, 173, 0}},\n{(unsigned char*)\"nsc\", {226, 138, 129, 0}},\n{(unsigned char*)\"nsccue\", {226, 139, 161, 0}},\n{(unsigned char*)\"nsce\", {226, 170, 176, 204, 184, 0}},\n{(unsigned char*)\"nscr\", {240, 157, 147, 131, 0}},\n{(unsigned char*)\"nshortmid\", {226, 136, 164, 0}},\n{(unsigned char*)\"nshortparallel\", {226, 136, 166, 0}},\n{(unsigned char*)\"nsim\", {226, 137, 129, 0}},\n{(unsigned char*)\"nsime\", {226, 137, 132, 0}},\n{(unsigned char*)\"nsimeq\", {226, 137, 132, 0}},\n{(unsigned char*)\"nsmid\", {226, 136, 164, 0}},\n{(unsigned char*)\"nspar\", {226, 136, 166, 0}},\n{(unsigned char*)\"nsqsube\", {226, 139, 162, 0}},\n{(unsigned char*)\"nsqsupe\", {226, 139, 163, 0}},\n{(unsigned char*)\"nsub\", {226, 138, 132, 0}},\n{(unsigned char*)\"nsubE\", {226, 171, 133, 204, 184, 0}},\n{(unsigned char*)\"nsube\", {226, 138, 136, 0}},\n{(unsigned char*)\"nsubset\", {226, 138, 130, 226, 131, 146, 0}},\n{(unsigned char*)\"nsubseteq\", {226, 138, 136, 0}},\n{(unsigned char*)\"nsubseteqq\", {226, 171, 133, 204, 184, 0}},\n{(unsigned char*)\"nsucc\", {226, 138, 129, 0}},\n{(unsigned char*)\"nsucceq\", {226, 170, 176, 204, 184, 0}},\n{(unsigned char*)\"nsup\", {226, 138, 133, 0}},\n{(unsigned char*)\"nsupE\", {226, 171, 134, 204, 184, 0}},\n{(unsigned char*)\"nsupe\", {226, 138, 137, 0}},\n{(unsigned char*)\"nsupset\", {226, 138, 131, 226, 131, 146, 0}},\n{(unsigned char*)\"nsupseteq\", {226, 138, 137, 0}},\n{(unsigned char*)\"nsupseteqq\", {226, 171, 134, 204, 184, 0}},\n{(unsigned char*)\"ntgl\", {226, 137, 185, 0}},\n{(unsigned char*)\"ntilde\", {195, 177, 0}},\n{(unsigned char*)\"ntlg\", {226, 137, 184, 0}},\n{(unsigned char*)\"ntriangleleft\", {226, 139, 170, 0}},\n{(unsigned char*)\"ntrianglelefteq\", {226, 139, 172, 0}},\n{(unsigned char*)\"ntriangleright\", {226, 139, 171, 0}},\n{(unsigned char*)\"ntrianglerighteq\", {226, 139, 173, 0}},\n{(unsigned char*)\"nu\", {206, 189, 0}},\n{(unsigned char*)\"num\", {35, 0}},\n{(unsigned char*)\"numero\", {226, 132, 150, 0}},\n{(unsigned char*)\"numsp\", {226, 128, 135, 0}},\n{(unsigned char*)\"nvDash\", {226, 138, 173, 0}},\n{(unsigned char*)\"nvHarr\", {226, 164, 132, 0}},\n{(unsigned char*)\"nvap\", {226, 137, 141, 226, 131, 146, 0}},\n{(unsigned char*)\"nvdash\", {226, 138, 172, 0}},\n{(unsigned char*)\"nvge\", {226, 137, 165, 226, 131, 146, 0}},\n{(unsigned char*)\"nvgt\", {62, 226, 131, 146, 0}},\n{(unsigned char*)\"nvinfin\", {226, 167, 158, 0}},\n{(unsigned char*)\"nvlArr\", {226, 164, 130, 0}},\n{(unsigned char*)\"nvle\", {226, 137, 164, 226, 131, 146, 0}},\n{(unsigned char*)\"nvlt\", {60, 226, 131, 146, 0}},\n{(unsigned char*)\"nvltrie\", {226, 138, 180, 226, 131, 146, 0}},\n{(unsigned char*)\"nvrArr\", {226, 164, 131, 0}},\n{(unsigned char*)\"nvrtrie\", {226, 138, 181, 226, 131, 146, 0}},\n{(unsigned char*)\"nvsim\", {226, 136, 188, 226, 131, 146, 0}},\n{(unsigned char*)\"nwArr\", {226, 135, 150, 0}},\n{(unsigned char*)\"nwarhk\", {226, 164, 163, 0}},\n{(unsigned char*)\"nwarr\", {226, 134, 150, 0}},\n{(unsigned char*)\"nwarrow\", {226, 134, 150, 0}},\n{(unsigned char*)\"nwnear\", {226, 164, 167, 0}},\n{(unsigned char*)\"oS\", {226, 147, 136, 0}},\n{(unsigned char*)\"oacute\", {195, 179, 0}},\n{(unsigned char*)\"oast\", {226, 138, 155, 0}},\n{(unsigned char*)\"ocir\", {226, 138, 154, 0}},\n{(unsigned char*)\"ocirc\", {195, 180, 0}},\n{(unsigned char*)\"ocy\", {208, 190, 0}},\n{(unsigned char*)\"odash\", {226, 138, 157, 0}},\n{(unsigned char*)\"odblac\", {197, 145, 0}},\n{(unsigned char*)\"odiv\", {226, 168, 184, 0}},\n{(unsigned char*)\"odot\", {226, 138, 153, 0}},\n{(unsigned char*)\"odsold\", {226, 166, 188, 0}},\n{(unsigned char*)\"oelig\", {197, 147, 0}},\n{(unsigned char*)\"ofcir\", {226, 166, 191, 0}},\n{(unsigned char*)\"ofr\", {240, 157, 148, 172, 0}},\n{(unsigned char*)\"ogon\", {203, 155, 0}},\n{(unsigned char*)\"ograve\", {195, 178, 0}},\n{(unsigned char*)\"ogt\", {226, 167, 129, 0}},\n{(unsigned char*)\"ohbar\", {226, 166, 181, 0}},\n{(unsigned char*)\"ohm\", {206, 169, 0}},\n{(unsigned char*)\"oint\", {226, 136, 174, 0}},\n{(unsigned char*)\"olarr\", {226, 134, 186, 0}},\n{(unsigned char*)\"olcir\", {226, 166, 190, 0}},\n{(unsigned char*)\"olcross\", {226, 166, 187, 0}},\n{(unsigned char*)\"oline\", {226, 128, 190, 0}},\n{(unsigned char*)\"olt\", {226, 167, 128, 0}},\n{(unsigned char*)\"omacr\", {197, 141, 0}},\n{(unsigned char*)\"omega\", {207, 137, 0}},\n{(unsigned char*)\"omicron\", {206, 191, 0}},\n{(unsigned char*)\"omid\", {226, 166, 182, 0}},\n{(unsigned char*)\"ominus\", {226, 138, 150, 0}},\n{(unsigned char*)\"oopf\", {240, 157, 149, 160, 0}},\n{(unsigned char*)\"opar\", {226, 166, 183, 0}},\n{(unsigned char*)\"operp\", {226, 166, 185, 0}},\n{(unsigned char*)\"oplus\", {226, 138, 149, 0}},\n{(unsigned char*)\"or\", {226, 136, 168, 0}},\n{(unsigned char*)\"orarr\", {226, 134, 187, 0}},\n{(unsigned char*)\"ord\", {226, 169, 157, 0}},\n{(unsigned char*)\"order\", {226, 132, 180, 0}},\n{(unsigned char*)\"orderof\", {226, 132, 180, 0}},\n{(unsigned char*)\"ordf\", {194, 170, 0}},\n{(unsigned char*)\"ordm\", {194, 186, 0}},\n{(unsigned char*)\"origof\", {226, 138, 182, 0}},\n{(unsigned char*)\"oror\", {226, 169, 150, 0}},\n{(unsigned char*)\"orslope\", {226, 169, 151, 0}},\n{(unsigned char*)\"orv\", {226, 169, 155, 0}},\n{(unsigned char*)\"oscr\", {226, 132, 180, 0}},\n{(unsigned char*)\"oslash\", {195, 184, 0}},\n{(unsigned char*)\"osol\", {226, 138, 152, 0}},\n{(unsigned char*)\"otilde\", {195, 181, 0}},\n{(unsigned char*)\"otimes\", {226, 138, 151, 0}},\n{(unsigned char*)\"otimesas\", {226, 168, 182, 0}},\n{(unsigned char*)\"ouml\", {195, 182, 0}},\n{(unsigned char*)\"ovbar\", {226, 140, 189, 0}},\n{(unsigned char*)\"par\", {226, 136, 165, 0}},\n{(unsigned char*)\"para\", {194, 182, 0}},\n{(unsigned char*)\"parallel\", {226, 136, 165, 0}},\n{(unsigned char*)\"parsim\", {226, 171, 179, 0}},\n{(unsigned char*)\"parsl\", {226, 171, 189, 0}},\n{(unsigned char*)\"part\", {226, 136, 130, 0}},\n{(unsigned char*)\"pcy\", {208, 191, 0}},\n{(unsigned char*)\"percnt\", {37, 0}},\n{(unsigned char*)\"period\", {46, 0}},\n{(unsigned char*)\"permil\", {226, 128, 176, 0}},\n{(unsigned char*)\"perp\", {226, 138, 165, 0}},\n{(unsigned char*)\"pertenk\", {226, 128, 177, 0}},\n{(unsigned char*)\"pfr\", {240, 157, 148, 173, 0}},\n{(unsigned char*)\"phi\", {207, 134, 0}},\n{(unsigned char*)\"phiv\", {207, 149, 0}},\n{(unsigned char*)\"phmmat\", {226, 132, 179, 0}},\n{(unsigned char*)\"phone\", {226, 152, 142, 0}},\n{(unsigned char*)\"pi\", {207, 128, 0}},\n{(unsigned char*)\"pitchfork\", {226, 139, 148, 0}},\n{(unsigned char*)\"piv\", {207, 150, 0}},\n{(unsigned char*)\"planck\", {226, 132, 143, 0}},\n{(unsigned char*)\"planckh\", {226, 132, 142, 0}},\n{(unsigned char*)\"plankv\", {226, 132, 143, 0}},\n{(unsigned char*)\"plus\", {43, 0}},\n{(unsigned char*)\"plusacir\", {226, 168, 163, 0}},\n{(unsigned char*)\"plusb\", {226, 138, 158, 0}},\n{(unsigned char*)\"pluscir\", {226, 168, 162, 0}},\n{(unsigned char*)\"plusdo\", {226, 136, 148, 0}},\n{(unsigned char*)\"plusdu\", {226, 168, 165, 0}},\n{(unsigned char*)\"pluse\", {226, 169, 178, 0}},\n{(unsigned char*)\"plusmn\", {194, 177, 0}},\n{(unsigned char*)\"plussim\", {226, 168, 166, 0}},\n{(unsigned char*)\"plustwo\", {226, 168, 167, 0}},\n{(unsigned char*)\"pm\", {194, 177, 0}},\n{(unsigned char*)\"pointint\", {226, 168, 149, 0}},\n{(unsigned char*)\"popf\", {240, 157, 149, 161, 0}},\n{(unsigned char*)\"pound\", {194, 163, 0}},\n{(unsigned char*)\"pr\", {226, 137, 186, 0}},\n{(unsigned char*)\"prE\", {226, 170, 179, 0}},\n{(unsigned char*)\"prap\", {226, 170, 183, 0}},\n{(unsigned char*)\"prcue\", {226, 137, 188, 0}},\n{(unsigned char*)\"pre\", {226, 170, 175, 0}},\n{(unsigned char*)\"prec\", {226, 137, 186, 0}},\n{(unsigned char*)\"precapprox\", {226, 170, 183, 0}},\n{(unsigned char*)\"preccurlyeq\", {226, 137, 188, 0}},\n{(unsigned char*)\"preceq\", {226, 170, 175, 0}},\n{(unsigned char*)\"precnapprox\", {226, 170, 185, 0}},\n{(unsigned char*)\"precneqq\", {226, 170, 181, 0}},\n{(unsigned char*)\"precnsim\", {226, 139, 168, 0}},\n{(unsigned char*)\"precsim\", {226, 137, 190, 0}},\n{(unsigned char*)\"prime\", {226, 128, 178, 0}},\n{(unsigned char*)\"primes\", {226, 132, 153, 0}},\n{(unsigned char*)\"prnE\", {226, 170, 181, 0}},\n{(unsigned char*)\"prnap\", {226, 170, 185, 0}},\n{(unsigned char*)\"prnsim\", {226, 139, 168, 0}},\n{(unsigned char*)\"prod\", {226, 136, 143, 0}},\n{(unsigned char*)\"profalar\", {226, 140, 174, 0}},\n{(unsigned char*)\"profline\", {226, 140, 146, 0}},\n{(unsigned char*)\"profsurf\", {226, 140, 147, 0}},\n{(unsigned char*)\"prop\", {226, 136, 157, 0}},\n{(unsigned char*)\"propto\", {226, 136, 157, 0}},\n{(unsigned char*)\"prsim\", {226, 137, 190, 0}},\n{(unsigned char*)\"prurel\", {226, 138, 176, 0}},\n{(unsigned char*)\"pscr\", {240, 157, 147, 133, 0}},\n{(unsigned char*)\"psi\", {207, 136, 0}},\n{(unsigned char*)\"puncsp\", {226, 128, 136, 0}},\n{(unsigned char*)\"qfr\", {240, 157, 148, 174, 0}},\n{(unsigned char*)\"qint\", {226, 168, 140, 0}},\n{(unsigned char*)\"qopf\", {240, 157, 149, 162, 0}},\n{(unsigned char*)\"qprime\", {226, 129, 151, 0}},\n{(unsigned char*)\"qscr\", {240, 157, 147, 134, 0}},\n{(unsigned char*)\"quaternions\", {226, 132, 141, 0}},\n{(unsigned char*)\"quatint\", {226, 168, 150, 0}},\n{(unsigned char*)\"quest\", {63, 0}},\n{(unsigned char*)\"questeq\", {226, 137, 159, 0}},\n{(unsigned char*)\"quot\", {34, 0}},\n{(unsigned char*)\"rAarr\", {226, 135, 155, 0}},\n{(unsigned char*)\"rArr\", {226, 135, 146, 0}},\n{(unsigned char*)\"rAtail\", {226, 164, 156, 0}},\n{(unsigned char*)\"rBarr\", {226, 164, 143, 0}},\n{(unsigned char*)\"rHar\", {226, 165, 164, 0}},\n{(unsigned char*)\"race\", {226, 136, 189, 204, 177, 0}},\n{(unsigned char*)\"racute\", {197, 149, 0}},\n{(unsigned char*)\"radic\", {226, 136, 154, 0}},\n{(unsigned char*)\"raemptyv\", {226, 166, 179, 0}},\n{(unsigned char*)\"rang\", {226, 159, 169, 0}},\n{(unsigned char*)\"rangd\", {226, 166, 146, 0}},\n{(unsigned char*)\"range\", {226, 166, 165, 0}},\n{(unsigned char*)\"rangle\", {226, 159, 169, 0}},\n{(unsigned char*)\"raquo\", {194, 187, 0}},\n{(unsigned char*)\"rarr\", {226, 134, 146, 0}},\n{(unsigned char*)\"rarrap\", {226, 165, 181, 0}},\n{(unsigned char*)\"rarrb\", {226, 135, 165, 0}},\n{(unsigned char*)\"rarrbfs\", {226, 164, 160, 0}},\n{(unsigned char*)\"rarrc\", {226, 164, 179, 0}},\n{(unsigned char*)\"rarrfs\", {226, 164, 158, 0}},\n{(unsigned char*)\"rarrhk\", {226, 134, 170, 0}},\n{(unsigned char*)\"rarrlp\", {226, 134, 172, 0}},\n{(unsigned char*)\"rarrpl\", {226, 165, 133, 0}},\n{(unsigned char*)\"rarrsim\", {226, 165, 180, 0}},\n{(unsigned char*)\"rarrtl\", {226, 134, 163, 0}},\n{(unsigned char*)\"rarrw\", {226, 134, 157, 0}},\n{(unsigned char*)\"ratail\", {226, 164, 154, 0}},\n{(unsigned char*)\"ratio\", {226, 136, 182, 0}},\n{(unsigned char*)\"rationals\", {226, 132, 154, 0}},\n{(unsigned char*)\"rbarr\", {226, 164, 141, 0}},\n{(unsigned char*)\"rbbrk\", {226, 157, 179, 0}},\n{(unsigned char*)\"rbrace\", {125, 0}},\n{(unsigned char*)\"rbrack\", {93, 0}},\n{(unsigned char*)\"rbrke\", {226, 166, 140, 0}},\n{(unsigned char*)\"rbrksld\", {226, 166, 142, 0}},\n{(unsigned char*)\"rbrkslu\", {226, 166, 144, 0}},\n{(unsigned char*)\"rcaron\", {197, 153, 0}},\n{(unsigned char*)\"rcedil\", {197, 151, 0}},\n{(unsigned char*)\"rceil\", {226, 140, 137, 0}},\n{(unsigned char*)\"rcub\", {125, 0}},\n{(unsigned char*)\"rcy\", {209, 128, 0}},\n{(unsigned char*)\"rdca\", {226, 164, 183, 0}},\n{(unsigned char*)\"rdldhar\", {226, 165, 169, 0}},\n{(unsigned char*)\"rdquo\", {226, 128, 157, 0}},\n{(unsigned char*)\"rdquor\", {226, 128, 157, 0}},\n{(unsigned char*)\"rdsh\", {226, 134, 179, 0}},\n{(unsigned char*)\"real\", {226, 132, 156, 0}},\n{(unsigned char*)\"realine\", {226, 132, 155, 0}},\n{(unsigned char*)\"realpart\", {226, 132, 156, 0}},\n{(unsigned char*)\"reals\", {226, 132, 157, 0}},\n{(unsigned char*)\"rect\", {226, 150, 173, 0}},\n{(unsigned char*)\"reg\", {194, 174, 0}},\n{(unsigned char*)\"rfisht\", {226, 165, 189, 0}},\n{(unsigned char*)\"rfloor\", {226, 140, 139, 0}},\n{(unsigned char*)\"rfr\", {240, 157, 148, 175, 0}},\n{(unsigned char*)\"rhard\", {226, 135, 129, 0}},\n{(unsigned char*)\"rharu\", {226, 135, 128, 0}},\n{(unsigned char*)\"rharul\", {226, 165, 172, 0}},\n{(unsigned char*)\"rho\", {207, 129, 0}},\n{(unsigned char*)\"rhov\", {207, 177, 0}},\n{(unsigned char*)\"rightarrow\", {226, 134, 146, 0}},\n{(unsigned char*)\"rightarrowtail\", {226, 134, 163, 0}},\n{(unsigned char*)\"rightharpoondown\", {226, 135, 129, 0}},\n{(unsigned char*)\"rightharpoonup\", {226, 135, 128, 0}},\n{(unsigned char*)\"rightleftarrows\", {226, 135, 132, 0}},\n{(unsigned char*)\"rightleftharpoons\", {226, 135, 140, 0}},\n{(unsigned char*)\"rightrightarrows\", {226, 135, 137, 0}},\n{(unsigned char*)\"rightsquigarrow\", {226, 134, 157, 0}},\n{(unsigned char*)\"rightthreetimes\", {226, 139, 140, 0}},\n{(unsigned char*)\"ring\", {203, 154, 0}},\n{(unsigned char*)\"risingdotseq\", {226, 137, 147, 0}},\n{(unsigned char*)\"rlarr\", {226, 135, 132, 0}},\n{(unsigned char*)\"rlhar\", {226, 135, 140, 0}},\n{(unsigned char*)\"rlm\", {226, 128, 143, 0}},\n{(unsigned char*)\"rmoust\", {226, 142, 177, 0}},\n{(unsigned char*)\"rmoustache\", {226, 142, 177, 0}},\n{(unsigned char*)\"rnmid\", {226, 171, 174, 0}},\n{(unsigned char*)\"roang\", {226, 159, 173, 0}},\n{(unsigned char*)\"roarr\", {226, 135, 190, 0}},\n{(unsigned char*)\"robrk\", {226, 159, 167, 0}},\n{(unsigned char*)\"ropar\", {226, 166, 134, 0}},\n{(unsigned char*)\"ropf\", {240, 157, 149, 163, 0}},\n{(unsigned char*)\"roplus\", {226, 168, 174, 0}},\n{(unsigned char*)\"rotimes\", {226, 168, 181, 0}},\n{(unsigned char*)\"rpar\", {41, 0}},\n{(unsigned char*)\"rpargt\", {226, 166, 148, 0}},\n{(unsigned char*)\"rppolint\", {226, 168, 146, 0}},\n{(unsigned char*)\"rrarr\", {226, 135, 137, 0}},\n{(unsigned char*)\"rsaquo\", {226, 128, 186, 0}},\n{(unsigned char*)\"rscr\", {240, 157, 147, 135, 0}},\n{(unsigned char*)\"rsh\", {226, 134, 177, 0}},\n{(unsigned char*)\"rsqb\", {93, 0}},\n{(unsigned char*)\"rsquo\", {226, 128, 153, 0}},\n{(unsigned char*)\"rsquor\", {226, 128, 153, 0}},\n{(unsigned char*)\"rthree\", {226, 139, 140, 0}},\n{(unsigned char*)\"rtimes\", {226, 139, 138, 0}},\n{(unsigned char*)\"rtri\", {226, 150, 185, 0}},\n{(unsigned char*)\"rtrie\", {226, 138, 181, 0}},\n{(unsigned char*)\"rtrif\", {226, 150, 184, 0}},\n{(unsigned char*)\"rtriltri\", {226, 167, 142, 0}},\n{(unsigned char*)\"ruluhar\", {226, 165, 168, 0}},\n{(unsigned char*)\"rx\", {226, 132, 158, 0}},\n{(unsigned char*)\"sacute\", {197, 155, 0}},\n{(unsigned char*)\"sbquo\", {226, 128, 154, 0}},\n{(unsigned char*)\"sc\", {226, 137, 187, 0}},\n{(unsigned char*)\"scE\", {226, 170, 180, 0}},\n{(unsigned char*)\"scap\", {226, 170, 184, 0}},\n{(unsigned char*)\"scaron\", {197, 161, 0}},\n{(unsigned char*)\"sccue\", {226, 137, 189, 0}},\n{(unsigned char*)\"sce\", {226, 170, 176, 0}},\n{(unsigned char*)\"scedil\", {197, 159, 0}},\n{(unsigned char*)\"scirc\", {197, 157, 0}},\n{(unsigned char*)\"scnE\", {226, 170, 182, 0}},\n{(unsigned char*)\"scnap\", {226, 170, 186, 0}},\n{(unsigned char*)\"scnsim\", {226, 139, 169, 0}},\n{(unsigned char*)\"scpolint\", {226, 168, 147, 0}},\n{(unsigned char*)\"scsim\", {226, 137, 191, 0}},\n{(unsigned char*)\"scy\", {209, 129, 0}},\n{(unsigned char*)\"sdot\", {226, 139, 133, 0}},\n{(unsigned char*)\"sdotb\", {226, 138, 161, 0}},\n{(unsigned char*)\"sdote\", {226, 169, 166, 0}},\n{(unsigned char*)\"seArr\", {226, 135, 152, 0}},\n{(unsigned char*)\"searhk\", {226, 164, 165, 0}},\n{(unsigned char*)\"searr\", {226, 134, 152, 0}},\n{(unsigned char*)\"searrow\", {226, 134, 152, 0}},\n{(unsigned char*)\"sect\", {194, 167, 0}},\n{(unsigned char*)\"semi\", {59, 0}},\n{(unsigned char*)\"seswar\", {226, 164, 169, 0}},\n{(unsigned char*)\"setminus\", {226, 136, 150, 0}},\n{(unsigned char*)\"setmn\", {226, 136, 150, 0}},\n{(unsigned char*)\"sext\", {226, 156, 182, 0}},\n{(unsigned char*)\"sfr\", {240, 157, 148, 176, 0}},\n{(unsigned char*)\"sfrown\", {226, 140, 162, 0}},\n{(unsigned char*)\"sharp\", {226, 153, 175, 0}},\n{(unsigned char*)\"shchcy\", {209, 137, 0}},\n{(unsigned char*)\"shcy\", {209, 136, 0}},\n{(unsigned char*)\"shortmid\", {226, 136, 163, 0}},\n{(unsigned char*)\"shortparallel\", {226, 136, 165, 0}},\n{(unsigned char*)\"shy\", {194, 173, 0}},\n{(unsigned char*)\"sigma\", {207, 131, 0}},\n{(unsigned char*)\"sigmaf\", {207, 130, 0}},\n{(unsigned char*)\"sigmav\", {207, 130, 0}},\n{(unsigned char*)\"sim\", {226, 136, 188, 0}},\n{(unsigned char*)\"simdot\", {226, 169, 170, 0}},\n{(unsigned char*)\"sime\", {226, 137, 131, 0}},\n{(unsigned char*)\"simeq\", {226, 137, 131, 0}},\n{(unsigned char*)\"simg\", {226, 170, 158, 0}},\n{(unsigned char*)\"simgE\", {226, 170, 160, 0}},\n{(unsigned char*)\"siml\", {226, 170, 157, 0}},\n{(unsigned char*)\"simlE\", {226, 170, 159, 0}},\n{(unsigned char*)\"simne\", {226, 137, 134, 0}},\n{(unsigned char*)\"simplus\", {226, 168, 164, 0}},\n{(unsigned char*)\"simrarr\", {226, 165, 178, 0}},\n{(unsigned char*)\"slarr\", {226, 134, 144, 0}},\n{(unsigned char*)\"smallsetminus\", {226, 136, 150, 0}},\n{(unsigned char*)\"smashp\", {226, 168, 179, 0}},\n{(unsigned char*)\"smeparsl\", {226, 167, 164, 0}},\n{(unsigned char*)\"smid\", {226, 136, 163, 0}},\n{(unsigned char*)\"smile\", {226, 140, 163, 0}},\n{(unsigned char*)\"smt\", {226, 170, 170, 0}},\n{(unsigned char*)\"smte\", {226, 170, 172, 0}},\n{(unsigned char*)\"smtes\", {226, 170, 172, 239, 184, 128, 0}},\n{(unsigned char*)\"softcy\", {209, 140, 0}},\n{(unsigned char*)\"sol\", {47, 0}},\n{(unsigned char*)\"solb\", {226, 167, 132, 0}},\n{(unsigned char*)\"solbar\", {226, 140, 191, 0}},\n{(unsigned char*)\"sopf\", {240, 157, 149, 164, 0}},\n{(unsigned char*)\"spades\", {226, 153, 160, 0}},\n{(unsigned char*)\"spadesuit\", {226, 153, 160, 0}},\n{(unsigned char*)\"spar\", {226, 136, 165, 0}},\n{(unsigned char*)\"sqcap\", {226, 138, 147, 0}},\n{(unsigned char*)\"sqcaps\", {226, 138, 147, 239, 184, 128, 0}},\n{(unsigned char*)\"sqcup\", {226, 138, 148, 0}},\n{(unsigned char*)\"sqcups\", {226, 138, 148, 239, 184, 128, 0}},\n{(unsigned char*)\"sqsub\", {226, 138, 143, 0}},\n{(unsigned char*)\"sqsube\", {226, 138, 145, 0}},\n{(unsigned char*)\"sqsubset\", {226, 138, 143, 0}},\n{(unsigned char*)\"sqsubseteq\", {226, 138, 145, 0}},\n{(unsigned char*)\"sqsup\", {226, 138, 144, 0}},\n{(unsigned char*)\"sqsupe\", {226, 138, 146, 0}},\n{(unsigned char*)\"sqsupset\", {226, 138, 144, 0}},\n{(unsigned char*)\"sqsupseteq\", {226, 138, 146, 0}},\n{(unsigned char*)\"squ\", {226, 150, 161, 0}},\n{(unsigned char*)\"square\", {226, 150, 161, 0}},\n{(unsigned char*)\"squarf\", {226, 150, 170, 0}},\n{(unsigned char*)\"squf\", {226, 150, 170, 0}},\n{(unsigned char*)\"srarr\", {226, 134, 146, 0}},\n{(unsigned char*)\"sscr\", {240, 157, 147, 136, 0}},\n{(unsigned char*)\"ssetmn\", {226, 136, 150, 0}},\n{(unsigned char*)\"ssmile\", {226, 140, 163, 0}},\n{(unsigned char*)\"sstarf\", {226, 139, 134, 0}},\n{(unsigned char*)\"star\", {226, 152, 134, 0}},\n{(unsigned char*)\"starf\", {226, 152, 133, 0}},\n{(unsigned char*)\"straightepsilon\", {207, 181, 0}},\n{(unsigned char*)\"straightphi\", {207, 149, 0}},\n{(unsigned char*)\"strns\", {194, 175, 0}},\n{(unsigned char*)\"sub\", {226, 138, 130, 0}},\n{(unsigned char*)\"subE\", {226, 171, 133, 0}},\n{(unsigned char*)\"subdot\", {226, 170, 189, 0}},\n{(unsigned char*)\"sube\", {226, 138, 134, 0}},\n{(unsigned char*)\"subedot\", {226, 171, 131, 0}},\n{(unsigned char*)\"submult\", {226, 171, 129, 0}},\n{(unsigned char*)\"subnE\", {226, 171, 139, 0}},\n{(unsigned char*)\"subne\", {226, 138, 138, 0}},\n{(unsigned char*)\"subplus\", {226, 170, 191, 0}},\n{(unsigned char*)\"subrarr\", {226, 165, 185, 0}},\n{(unsigned char*)\"subset\", {226, 138, 130, 0}},\n{(unsigned char*)\"subseteq\", {226, 138, 134, 0}},\n{(unsigned char*)\"subseteqq\", {226, 171, 133, 0}},\n{(unsigned char*)\"subsetneq\", {226, 138, 138, 0}},\n{(unsigned char*)\"subsetneqq\", {226, 171, 139, 0}},\n{(unsigned char*)\"subsim\", {226, 171, 135, 0}},\n{(unsigned char*)\"subsub\", {226, 171, 149, 0}},\n{(unsigned char*)\"subsup\", {226, 171, 147, 0}},\n{(unsigned char*)\"succ\", {226, 137, 187, 0}},\n{(unsigned char*)\"succapprox\", {226, 170, 184, 0}},\n{(unsigned char*)\"succcurlyeq\", {226, 137, 189, 0}},\n{(unsigned char*)\"succeq\", {226, 170, 176, 0}},\n{(unsigned char*)\"succnapprox\", {226, 170, 186, 0}},\n{(unsigned char*)\"succneqq\", {226, 170, 182, 0}},\n{(unsigned char*)\"succnsim\", {226, 139, 169, 0}},\n{(unsigned char*)\"succsim\", {226, 137, 191, 0}},\n{(unsigned char*)\"sum\", {226, 136, 145, 0}},\n{(unsigned char*)\"sung\", {226, 153, 170, 0}},\n{(unsigned char*)\"sup\", {226, 138, 131, 0}},\n{(unsigned char*)\"sup1\", {194, 185, 0}},\n{(unsigned char*)\"sup2\", {194, 178, 0}},\n{(unsigned char*)\"sup3\", {194, 179, 0}},\n{(unsigned char*)\"supE\", {226, 171, 134, 0}},\n{(unsigned char*)\"supdot\", {226, 170, 190, 0}},\n{(unsigned char*)\"supdsub\", {226, 171, 152, 0}},\n{(unsigned char*)\"supe\", {226, 138, 135, 0}},\n{(unsigned char*)\"supedot\", {226, 171, 132, 0}},\n{(unsigned char*)\"suphsol\", {226, 159, 137, 0}},\n{(unsigned char*)\"suphsub\", {226, 171, 151, 0}},\n{(unsigned char*)\"suplarr\", {226, 165, 187, 0}},\n{(unsigned char*)\"supmult\", {226, 171, 130, 0}},\n{(unsigned char*)\"supnE\", {226, 171, 140, 0}},\n{(unsigned char*)\"supne\", {226, 138, 139, 0}},\n{(unsigned char*)\"supplus\", {226, 171, 128, 0}},\n{(unsigned char*)\"supset\", {226, 138, 131, 0}},\n{(unsigned char*)\"supseteq\", {226, 138, 135, 0}},\n{(unsigned char*)\"supseteqq\", {226, 171, 134, 0}},\n{(unsigned char*)\"supsetneq\", {226, 138, 139, 0}},\n{(unsigned char*)\"supsetneqq\", {226, 171, 140, 0}},\n{(unsigned char*)\"supsim\", {226, 171, 136, 0}},\n{(unsigned char*)\"supsub\", {226, 171, 148, 0}},\n{(unsigned char*)\"supsup\", {226, 171, 150, 0}},\n{(unsigned char*)\"swArr\", {226, 135, 153, 0}},\n{(unsigned char*)\"swarhk\", {226, 164, 166, 0}},\n{(unsigned char*)\"swarr\", {226, 134, 153, 0}},\n{(unsigned char*)\"swarrow\", {226, 134, 153, 0}},\n{(unsigned char*)\"swnwar\", {226, 164, 170, 0}},\n{(unsigned char*)\"szlig\", {195, 159, 0}},\n{(unsigned char*)\"target\", {226, 140, 150, 0}},\n{(unsigned char*)\"tau\", {207, 132, 0}},\n{(unsigned char*)\"tbrk\", {226, 142, 180, 0}},\n{(unsigned char*)\"tcaron\", {197, 165, 0}},\n{(unsigned char*)\"tcedil\", {197, 163, 0}},\n{(unsigned char*)\"tcy\", {209, 130, 0}},\n{(unsigned char*)\"tdot\", {226, 131, 155, 0}},\n{(unsigned char*)\"telrec\", {226, 140, 149, 0}},\n{(unsigned char*)\"tfr\", {240, 157, 148, 177, 0}},\n{(unsigned char*)\"there4\", {226, 136, 180, 0}},\n{(unsigned char*)\"therefore\", {226, 136, 180, 0}},\n{(unsigned char*)\"theta\", {206, 184, 0}},\n{(unsigned char*)\"thetasym\", {207, 145, 0}},\n{(unsigned char*)\"thetav\", {207, 145, 0}},\n{(unsigned char*)\"thickapprox\", {226, 137, 136, 0}},\n{(unsigned char*)\"thicksim\", {226, 136, 188, 0}},\n{(unsigned char*)\"thinsp\", {226, 128, 137, 0}},\n{(unsigned char*)\"thkap\", {226, 137, 136, 0}},\n{(unsigned char*)\"thksim\", {226, 136, 188, 0}},\n{(unsigned char*)\"thorn\", {195, 190, 0}},\n{(unsigned char*)\"tilde\", {203, 156, 0}},\n{(unsigned char*)\"times\", {195, 151, 0}},\n{(unsigned char*)\"timesb\", {226, 138, 160, 0}},\n{(unsigned char*)\"timesbar\", {226, 168, 177, 0}},\n{(unsigned char*)\"timesd\", {226, 168, 176, 0}},\n{(unsigned char*)\"tint\", {226, 136, 173, 0}},\n{(unsigned char*)\"toea\", {226, 164, 168, 0}},\n{(unsigned char*)\"top\", {226, 138, 164, 0}},\n{(unsigned char*)\"topbot\", {226, 140, 182, 0}},\n{(unsigned char*)\"topcir\", {226, 171, 177, 0}},\n{(unsigned char*)\"topf\", {240, 157, 149, 165, 0}},\n{(unsigned char*)\"topfork\", {226, 171, 154, 0}},\n{(unsigned char*)\"tosa\", {226, 164, 169, 0}},\n{(unsigned char*)\"tprime\", {226, 128, 180, 0}},\n{(unsigned char*)\"trade\", {226, 132, 162, 0}},\n{(unsigned char*)\"triangle\", {226, 150, 181, 0}},\n{(unsigned char*)\"triangledown\", {226, 150, 191, 0}},\n{(unsigned char*)\"triangleleft\", {226, 151, 131, 0}},\n{(unsigned char*)\"trianglelefteq\", {226, 138, 180, 0}},\n{(unsigned char*)\"triangleq\", {226, 137, 156, 0}},\n{(unsigned char*)\"triangleright\", {226, 150, 185, 0}},\n{(unsigned char*)\"trianglerighteq\", {226, 138, 181, 0}},\n{(unsigned char*)\"tridot\", {226, 151, 172, 0}},\n{(unsigned char*)\"trie\", {226, 137, 156, 0}},\n{(unsigned char*)\"triminus\", {226, 168, 186, 0}},\n{(unsigned char*)\"triplus\", {226, 168, 185, 0}},\n{(unsigned char*)\"trisb\", {226, 167, 141, 0}},\n{(unsigned char*)\"tritime\", {226, 168, 187, 0}},\n{(unsigned char*)\"trpezium\", {226, 143, 162, 0}},\n{(unsigned char*)\"tscr\", {240, 157, 147, 137, 0}},\n{(unsigned char*)\"tscy\", {209, 134, 0}},\n{(unsigned char*)\"tshcy\", {209, 155, 0}},\n{(unsigned char*)\"tstrok\", {197, 167, 0}},\n{(unsigned char*)\"twixt\", {226, 137, 172, 0}},\n{(unsigned char*)\"twoheadleftarrow\", {226, 134, 158, 0}},\n{(unsigned char*)\"twoheadrightarrow\", {226, 134, 160, 0}},\n{(unsigned char*)\"uArr\", {226, 135, 145, 0}},\n{(unsigned char*)\"uHar\", {226, 165, 163, 0}},\n{(unsigned char*)\"uacute\", {195, 186, 0}},\n{(unsigned char*)\"uarr\", {226, 134, 145, 0}},\n{(unsigned char*)\"ubrcy\", {209, 158, 0}},\n{(unsigned char*)\"ubreve\", {197, 173, 0}},\n{(unsigned char*)\"ucirc\", {195, 187, 0}},\n{(unsigned char*)\"ucy\", {209, 131, 0}},\n{(unsigned char*)\"udarr\", {226, 135, 133, 0}},\n{(unsigned char*)\"udblac\", {197, 177, 0}},\n{(unsigned char*)\"udhar\", {226, 165, 174, 0}},\n{(unsigned char*)\"ufisht\", {226, 165, 190, 0}},\n{(unsigned char*)\"ufr\", {240, 157, 148, 178, 0}},\n{(unsigned char*)\"ugrave\", {195, 185, 0}},\n{(unsigned char*)\"uharl\", {226, 134, 191, 0}},\n{(unsigned char*)\"uharr\", {226, 134, 190, 0}},\n{(unsigned char*)\"uhblk\", {226, 150, 128, 0}},\n{(unsigned char*)\"ulcorn\", {226, 140, 156, 0}},\n{(unsigned char*)\"ulcorner\", {226, 140, 156, 0}},\n{(unsigned char*)\"ulcrop\", {226, 140, 143, 0}},\n{(unsigned char*)\"ultri\", {226, 151, 184, 0}},\n{(unsigned char*)\"umacr\", {197, 171, 0}},\n{(unsigned char*)\"uml\", {194, 168, 0}},\n{(unsigned char*)\"uogon\", {197, 179, 0}},\n{(unsigned char*)\"uopf\", {240, 157, 149, 166, 0}},\n{(unsigned char*)\"uparrow\", {226, 134, 145, 0}},\n{(unsigned char*)\"updownarrow\", {226, 134, 149, 0}},\n{(unsigned char*)\"upharpoonleft\", {226, 134, 191, 0}},\n{(unsigned char*)\"upharpoonright\", {226, 134, 190, 0}},\n{(unsigned char*)\"uplus\", {226, 138, 142, 0}},\n{(unsigned char*)\"upsi\", {207, 133, 0}},\n{(unsigned char*)\"upsih\", {207, 146, 0}},\n{(unsigned char*)\"upsilon\", {207, 133, 0}},\n{(unsigned char*)\"upuparrows\", {226, 135, 136, 0}},\n{(unsigned char*)\"urcorn\", {226, 140, 157, 0}},\n{(unsigned char*)\"urcorner\", {226, 140, 157, 0}},\n{(unsigned char*)\"urcrop\", {226, 140, 142, 0}},\n{(unsigned char*)\"uring\", {197, 175, 0}},\n{(unsigned char*)\"urtri\", {226, 151, 185, 0}},\n{(unsigned char*)\"uscr\", {240, 157, 147, 138, 0}},\n{(unsigned char*)\"utdot\", {226, 139, 176, 0}},\n{(unsigned char*)\"utilde\", {197, 169, 0}},\n{(unsigned char*)\"utri\", {226, 150, 181, 0}},\n{(unsigned char*)\"utrif\", {226, 150, 180, 0}},\n{(unsigned char*)\"uuarr\", {226, 135, 136, 0}},\n{(unsigned char*)\"uuml\", {195, 188, 0}},\n{(unsigned char*)\"uwangle\", {226, 166, 167, 0}},\n{(unsigned char*)\"vArr\", {226, 135, 149, 0}},\n{(unsigned char*)\"vBar\", {226, 171, 168, 0}},\n{(unsigned char*)\"vBarv\", {226, 171, 169, 0}},\n{(unsigned char*)\"vDash\", {226, 138, 168, 0}},\n{(unsigned char*)\"vangrt\", {226, 166, 156, 0}},\n{(unsigned char*)\"varepsilon\", {207, 181, 0}},\n{(unsigned char*)\"varkappa\", {207, 176, 0}},\n{(unsigned char*)\"varnothing\", {226, 136, 133, 0}},\n{(unsigned char*)\"varphi\", {207, 149, 0}},\n{(unsigned char*)\"varpi\", {207, 150, 0}},\n{(unsigned char*)\"varpropto\", {226, 136, 157, 0}},\n{(unsigned char*)\"varr\", {226, 134, 149, 0}},\n{(unsigned char*)\"varrho\", {207, 177, 0}},\n{(unsigned char*)\"varsigma\", {207, 130, 0}},\n{(unsigned char*)\"varsubsetneq\", {226, 138, 138, 239, 184, 128, 0}},\n{(unsigned char*)\"varsubsetneqq\", {226, 171, 139, 239, 184, 128, 0}},\n{(unsigned char*)\"varsupsetneq\", {226, 138, 139, 239, 184, 128, 0}},\n{(unsigned char*)\"varsupsetneqq\", {226, 171, 140, 239, 184, 128, 0}},\n{(unsigned char*)\"vartheta\", {207, 145, 0}},\n{(unsigned char*)\"vartriangleleft\", {226, 138, 178, 0}},\n{(unsigned char*)\"vartriangleright\", {226, 138, 179, 0}},\n{(unsigned char*)\"vcy\", {208, 178, 0}},\n{(unsigned char*)\"vdash\", {226, 138, 162, 0}},\n{(unsigned char*)\"vee\", {226, 136, 168, 0}},\n{(unsigned char*)\"veebar\", {226, 138, 187, 0}},\n{(unsigned char*)\"veeeq\", {226, 137, 154, 0}},\n{(unsigned char*)\"vellip\", {226, 139, 174, 0}},\n{(unsigned char*)\"verbar\", {124, 0}},\n{(unsigned char*)\"vert\", {124, 0}},\n{(unsigned char*)\"vfr\", {240, 157, 148, 179, 0}},\n{(unsigned char*)\"vltri\", {226, 138, 178, 0}},\n{(unsigned char*)\"vnsub\", {226, 138, 130, 226, 131, 146, 0}},\n{(unsigned char*)\"vnsup\", {226, 138, 131, 226, 131, 146, 0}},\n{(unsigned char*)\"vopf\", {240, 157, 149, 167, 0}},\n{(unsigned char*)\"vprop\", {226, 136, 157, 0}},\n{(unsigned char*)\"vrtri\", {226, 138, 179, 0}},\n{(unsigned char*)\"vscr\", {240, 157, 147, 139, 0}},\n{(unsigned char*)\"vsubnE\", {226, 171, 139, 239, 184, 128, 0}},\n{(unsigned char*)\"vsubne\", {226, 138, 138, 239, 184, 128, 0}},\n{(unsigned char*)\"vsupnE\", {226, 171, 140, 239, 184, 128, 0}},\n{(unsigned char*)\"vsupne\", {226, 138, 139, 239, 184, 128, 0}},\n{(unsigned char*)\"vzigzag\", {226, 166, 154, 0}},\n{(unsigned char*)\"wcirc\", {197, 181, 0}},\n{(unsigned char*)\"wedbar\", {226, 169, 159, 0}},\n{(unsigned char*)\"wedge\", {226, 136, 167, 0}},\n{(unsigned char*)\"wedgeq\", {226, 137, 153, 0}},\n{(unsigned char*)\"weierp\", {226, 132, 152, 0}},\n{(unsigned char*)\"wfr\", {240, 157, 148, 180, 0}},\n{(unsigned char*)\"wopf\", {240, 157, 149, 168, 0}},\n{(unsigned char*)\"wp\", {226, 132, 152, 0}},\n{(unsigned char*)\"wr\", {226, 137, 128, 0}},\n{(unsigned char*)\"wreath\", {226, 137, 128, 0}},\n{(unsigned char*)\"wscr\", {240, 157, 147, 140, 0}},\n{(unsigned char*)\"xcap\", {226, 139, 130, 0}},\n{(unsigned char*)\"xcirc\", {226, 151, 175, 0}},\n{(unsigned char*)\"xcup\", {226, 139, 131, 0}},\n{(unsigned char*)\"xdtri\", {226, 150, 189, 0}},\n{(unsigned char*)\"xfr\", {240, 157, 148, 181, 0}},\n{(unsigned char*)\"xhArr\", {226, 159, 186, 0}},\n{(unsigned char*)\"xharr\", {226, 159, 183, 0}},\n{(unsigned char*)\"xi\", {206, 190, 0}},\n{(unsigned char*)\"xlArr\", {226, 159, 184, 0}},\n{(unsigned char*)\"xlarr\", {226, 159, 181, 0}},\n{(unsigned char*)\"xmap\", {226, 159, 188, 0}},\n{(unsigned char*)\"xnis\", {226, 139, 187, 0}},\n{(unsigned char*)\"xodot\", {226, 168, 128, 0}},\n{(unsigned char*)\"xopf\", {240, 157, 149, 169, 0}},\n{(unsigned char*)\"xoplus\", {226, 168, 129, 0}},\n{(unsigned char*)\"xotime\", {226, 168, 130, 0}},\n{(unsigned char*)\"xrArr\", {226, 159, 185, 0}},\n{(unsigned char*)\"xrarr\", {226, 159, 182, 0}},\n{(unsigned char*)\"xscr\", {240, 157, 147, 141, 0}},\n{(unsigned char*)\"xsqcup\", {226, 168, 134, 0}},\n{(unsigned char*)\"xuplus\", {226, 168, 132, 0}},\n{(unsigned char*)\"xutri\", {226, 150, 179, 0}},\n{(unsigned char*)\"xvee\", {226, 139, 129, 0}},\n{(unsigned char*)\"xwedge\", {226, 139, 128, 0}},\n{(unsigned char*)\"yacute\", {195, 189, 0}},\n{(unsigned char*)\"yacy\", {209, 143, 0}},\n{(unsigned char*)\"ycirc\", {197, 183, 0}},\n{(unsigned char*)\"ycy\", {209, 139, 0}},\n{(unsigned char*)\"yen\", {194, 165, 0}},\n{(unsigned char*)\"yfr\", {240, 157, 148, 182, 0}},\n{(unsigned char*)\"yicy\", {209, 151, 0}},\n{(unsigned char*)\"yopf\", {240, 157, 149, 170, 0}},\n{(unsigned char*)\"yscr\", {240, 157, 147, 142, 0}},\n{(unsigned char*)\"yucy\", {209, 142, 0}},\n{(unsigned char*)\"yuml\", {195, 191, 0}},\n{(unsigned char*)\"zacute\", {197, 186, 0}},\n{(unsigned char*)\"zcaron\", {197, 190, 0}},\n{(unsigned char*)\"zcy\", {208, 183, 0}},\n{(unsigned char*)\"zdot\", {197, 188, 0}},\n{(unsigned char*)\"zeetrf\", {226, 132, 168, 0}},\n{(unsigned char*)\"zeta\", {206, 182, 0}},\n{(unsigned char*)\"zfr\", {240, 157, 148, 183, 0}},\n{(unsigned char*)\"zhcy\", {208, 182, 0}},\n{(unsigned char*)\"zigrarr\", {226, 135, 157, 0}},\n{(unsigned char*)\"zopf\", {240, 157, 149, 171, 0}},\n{(unsigned char*)\"zscr\", {240, 157, 147, 143, 0}},\n{(unsigned char*)\"zwj\", {226, 128, 141, 0}},\n{(unsigned char*)\"zwnj\", {226, 128, 140, 0}},\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/houdini.h",
    "content": "#ifndef CMARK_HOUDINI_H\n#define CMARK_HOUDINI_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include <stdint.h>\n#include \"config.h\"\n#include \"buffer.h\"\n\n#ifdef HAVE___BUILTIN_EXPECT\n#define likely(x) __builtin_expect((x), 1)\n#define unlikely(x) __builtin_expect((x), 0)\n#else\n#define likely(x) (x)\n#define unlikely(x) (x)\n#endif\n\n#ifdef HOUDINI_USE_LOCALE\n#define _isxdigit(c) isxdigit(c)\n#define _isdigit(c) isdigit(c)\n#else\n/*\n * Helper _isdigit methods -- do not trust the current locale\n * */\n#define _isxdigit(c) (strchr(\"0123456789ABCDEFabcdef\", (c)) != NULL)\n#define _isdigit(c) ((c) >= '0' && (c) <= '9')\n#endif\n\n#define HOUDINI_ESCAPED_SIZE(x) (((x)*12) / 10)\n#define HOUDINI_UNESCAPED_SIZE(x) (x)\n\nextern bufsize_t houdini_unescape_ent(cmark_strbuf *ob, const uint8_t *src,\n                                      bufsize_t size);\nextern int houdini_escape_html(cmark_strbuf *ob, const uint8_t *src,\n                               bufsize_t size);\nextern int houdini_escape_html0(cmark_strbuf *ob, const uint8_t *src,\n                                bufsize_t size, int secure);\nextern int houdini_unescape_html(cmark_strbuf *ob, const uint8_t *src,\n                                 bufsize_t size);\nextern void houdini_unescape_html_f(cmark_strbuf *ob, const uint8_t *src,\n                                    bufsize_t size);\nextern int houdini_escape_href(cmark_strbuf *ob, const uint8_t *src,\n                               bufsize_t size);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/houdini_href_e.c",
    "content": "#include <assert.h>\n#include <stdio.h>\n#include <string.h>\n\n#include \"houdini.h\"\n\n/*\n * The following characters will not be escaped:\n *\n *\t\t-_.+!*'(),%#@?=;:/,+&$ alphanum\n *\n * Note that this character set is the addition of:\n *\n *\t- The characters which are safe to be in an URL\n *\t- The characters which are *not* safe to be in\n *\tan URL because they are RESERVED characters.\n *\n * We assume (lazily) that any RESERVED char that\n * appears inside an URL is actually meant to\n * have its native function (i.e. as an URL\n * component/separator) and hence needs no escaping.\n *\n * There are two exceptions: the chacters & (amp)\n * and ' (single quote) do not appear in the table.\n * They are meant to appear in the URL as components,\n * yet they require special HTML-entity escaping\n * to generate valid HTML markup.\n *\n * All other characters will be escaped to %XX.\n *\n */\nstatic const char HREF_SAFE[] = {\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,\n    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,\n    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n    1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n};\n\nint houdini_escape_href(cmark_strbuf *ob, const uint8_t *src, bufsize_t size) {\n  static const uint8_t hex_chars[] = \"0123456789ABCDEF\";\n  bufsize_t i = 0, org;\n  uint8_t hex_str[3];\n\n  hex_str[0] = '%';\n\n  while (i < size) {\n    org = i;\n    while (i < size && HREF_SAFE[src[i]] != 0)\n      i++;\n\n    if (likely(i > org))\n      cmark_strbuf_put(ob, src + org, i - org);\n\n    /* escaping */\n    if (i >= size)\n      break;\n\n    switch (src[i]) {\n    /* amp appears all the time in URLs, but needs\n     * HTML-entity escaping to be inside an href */\n    case '&':\n      cmark_strbuf_puts(ob, \"&amp;\");\n      break;\n\n    /* the single quote is a valid URL character\n     * according to the standard; it needs HTML\n     * entity escaping too */\n    case '\\'':\n      cmark_strbuf_puts(ob, \"&#x27;\");\n      break;\n\n/* the space can be escaped to %20 or a plus\n * sign. we're going with the generic escape\n * for now. the plus thing is more commonly seen\n * when building GET strings */\n#if 0\n\t\tcase ' ':\n\t\t\tcmark_strbuf_putc(ob, '+');\n\t\t\tbreak;\n#endif\n\n    /* every other character goes with a %XX escaping */\n    default:\n      hex_str[1] = hex_chars[(src[i] >> 4) & 0xF];\n      hex_str[2] = hex_chars[src[i] & 0xF];\n      cmark_strbuf_put(ob, hex_str, 3);\n    }\n\n    i++;\n  }\n\n  return 1;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/houdini_html_e.c",
    "content": "#include <assert.h>\n#include <stdio.h>\n#include <string.h>\n\n#include \"houdini.h\"\n\n/**\n * According to the OWASP rules:\n *\n * & --> &amp;\n * < --> &lt;\n * > --> &gt;\n * \" --> &quot;\n * ' --> &#x27;     &apos; is not recommended\n * / --> &#x2F;     forward slash is included as it helps end an HTML entity\n *\n */\nstatic const char HTML_ESCAPE_TABLE[] = {\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 4,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n};\n\nstatic const char *HTML_ESCAPES[] = {\"\",      \"&quot;\", \"&amp;\", \"&#39;\",\n                                     \"&#47;\", \"&lt;\",   \"&gt;\"};\n\nint houdini_escape_html0(cmark_strbuf *ob, const uint8_t *src, bufsize_t size,\n                         int secure) {\n  bufsize_t i = 0, org, esc = 0;\n\n  while (i < size) {\n    org = i;\n    while (i < size && (esc = HTML_ESCAPE_TABLE[src[i]]) == 0)\n      i++;\n\n    if (i > org)\n      cmark_strbuf_put(ob, src + org, i - org);\n\n    /* escaping */\n    if (unlikely(i >= size))\n      break;\n\n    /* The forward slash is only escaped in secure mode */\n    if ((src[i] == '/' || src[i] == '\\'') && !secure) {\n      cmark_strbuf_putc(ob, src[i]);\n    } else {\n      cmark_strbuf_puts(ob, HTML_ESCAPES[esc]);\n    }\n\n    i++;\n  }\n\n  return 1;\n}\n\nint houdini_escape_html(cmark_strbuf *ob, const uint8_t *src, bufsize_t size) {\n  return houdini_escape_html0(ob, src, size, 1);\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/houdini_html_u.c",
    "content": "#include <assert.h>\n#include <stdio.h>\n#include <string.h>\n\n#include \"buffer.h\"\n#include \"houdini.h\"\n#include \"utf8.h\"\n#include \"entities.inc\"\n\n/* Binary tree lookup code for entities added by JGM */\n\nstatic const unsigned char *S_lookup(int i, int low, int hi,\n                                     const unsigned char *s, int len) {\n  int j;\n  int cmp =\n      strncmp((const char *)s, (const char *)cmark_entities[i].entity, len);\n  if (cmp == 0 && cmark_entities[i].entity[len] == 0) {\n    return (const unsigned char *)cmark_entities[i].bytes;\n  } else if (cmp <= 0 && i > low) {\n    j = i - ((i - low) / 2);\n    if (j == i)\n      j -= 1;\n    return S_lookup(j, low, i - 1, s, len);\n  } else if (cmp > 0 && i < hi) {\n    j = i + ((hi - i) / 2);\n    if (j == i)\n      j += 1;\n    return S_lookup(j, i + 1, hi, s, len);\n  } else {\n    return NULL;\n  }\n}\n\nstatic const unsigned char *S_lookup_entity(const unsigned char *s, int len) {\n  return S_lookup(CMARK_NUM_ENTITIES / 2, 0, CMARK_NUM_ENTITIES - 1, s, len);\n}\n\nbufsize_t houdini_unescape_ent(cmark_strbuf *ob, const uint8_t *src,\n                               bufsize_t size) {\n  bufsize_t i = 0;\n\n  if (size >= 3 && src[0] == '#') {\n    int codepoint = 0;\n    int num_digits = 0;\n\n    if (_isdigit(src[1])) {\n      for (i = 1; i < size && _isdigit(src[i]); ++i) {\n        codepoint = (codepoint * 10) + (src[i] - '0');\n\n        if (codepoint >= 0x110000) {\n          // Keep counting digits but\n          // avoid integer overflow.\n          codepoint = 0x110000;\n        }\n      }\n\n      num_digits = i - 1;\n    }\n\n    else if (src[1] == 'x' || src[1] == 'X') {\n      for (i = 2; i < size && _isxdigit(src[i]); ++i) {\n        codepoint = (codepoint * 16) + ((src[i] | 32) % 39 - 9);\n\n        if (codepoint >= 0x110000) {\n          // Keep counting digits but\n          // avoid integer overflow.\n          codepoint = 0x110000;\n        }\n      }\n\n      num_digits = i - 2;\n    }\n\n    if (num_digits >= 1 && num_digits <= 8 && i < size && src[i] == ';') {\n      if (codepoint == 0 || (codepoint >= 0xD800 && codepoint < 0xE000) ||\n          codepoint >= 0x110000) {\n        codepoint = 0xFFFD;\n      }\n      cmark_utf8proc_encode_char(codepoint, ob);\n      return i + 1;\n    }\n  }\n\n  else {\n    if (size > CMARK_ENTITY_MAX_LENGTH)\n      size = CMARK_ENTITY_MAX_LENGTH;\n\n    for (i = CMARK_ENTITY_MIN_LENGTH; i < size; ++i) {\n      if (src[i] == ' ')\n        break;\n\n      if (src[i] == ';') {\n        const unsigned char *entity = S_lookup_entity(src, i);\n\n        if (entity != NULL) {\n          cmark_strbuf_puts(ob, (const char *)entity);\n          return i + 1;\n        }\n\n        break;\n      }\n    }\n  }\n\n  return 0;\n}\n\nint houdini_unescape_html(cmark_strbuf *ob, const uint8_t *src,\n                          bufsize_t size) {\n  bufsize_t i = 0, org, ent;\n\n  while (i < size) {\n    org = i;\n    while (i < size && src[i] != '&')\n      i++;\n\n    if (likely(i > org)) {\n      if (unlikely(org == 0)) {\n        if (i >= size)\n          return 0;\n\n        cmark_strbuf_grow(ob, HOUDINI_UNESCAPED_SIZE(size));\n      }\n\n      cmark_strbuf_put(ob, src + org, i - org);\n    }\n\n    /* escaping */\n    if (i >= size)\n      break;\n\n    i++;\n\n    ent = houdini_unescape_ent(ob, src + i, size - i);\n    i += ent;\n\n    /* not really an entity */\n    if (ent == 0)\n      cmark_strbuf_putc(ob, '&');\n  }\n\n  return 1;\n}\n\nvoid houdini_unescape_html_f(cmark_strbuf *ob, const uint8_t *src,\n                             bufsize_t size) {\n  if (!houdini_unescape_html(ob, src, size))\n    cmark_strbuf_put(ob, src, size);\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/html.c",
    "content": "#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <assert.h>\n#include \"cmark_ctype.h\"\n#include \"config.h\"\n#include \"cmark.h\"\n#include \"node.h\"\n#include \"buffer.h\"\n#include \"houdini.h\"\n#include \"scanners.h\"\n\n#define BUFFER_SIZE 100\n\n// Functions to convert cmark_nodes to HTML strings.\n\nstatic void escape_html(cmark_strbuf *dest, const unsigned char *source,\n                        bufsize_t length) {\n  houdini_escape_html0(dest, source, length, 0);\n}\n\nstatic CMARK_INLINE void cr(cmark_strbuf *html) {\n  if (html->size && html->ptr[html->size - 1] != '\\n')\n    cmark_strbuf_putc(html, '\\n');\n}\n\nstruct render_state {\n  cmark_strbuf *html;\n  cmark_node *plain;\n};\n\nstatic void S_render_sourcepos(cmark_node *node, cmark_strbuf *html,\n                               int options) {\n  char buffer[BUFFER_SIZE];\n  if (CMARK_OPT_SOURCEPOS & options) {\n    snprintf(buffer, BUFFER_SIZE, \" data-sourcepos=\\\"%d:%d-%d:%d\\\"\",\n             cmark_node_get_start_line(node), cmark_node_get_start_column(node),\n             cmark_node_get_end_line(node), cmark_node_get_end_column(node));\n    cmark_strbuf_puts(html, buffer);\n  }\n}\n\nstatic int S_render_node(cmark_node *node, cmark_event_type ev_type,\n                         struct render_state *state, int options) {\n  cmark_node *parent;\n  cmark_node *grandparent;\n  cmark_strbuf *html = state->html;\n  char start_heading[] = \"<h0\";\n  char end_heading[] = \"</h0\";\n  bool tight;\n  char buffer[BUFFER_SIZE];\n\n  bool entering = (ev_type == CMARK_EVENT_ENTER);\n\n  if (state->plain == node) { // back at original node\n    state->plain = NULL;\n  }\n\n  if (state->plain != NULL) {\n    switch (node->type) {\n    case CMARK_NODE_TEXT:\n    case CMARK_NODE_CODE:\n    case CMARK_NODE_HTML_INLINE:\n      escape_html(html, node->as.literal.data, node->as.literal.len);\n      break;\n\n    case CMARK_NODE_LINEBREAK:\n    case CMARK_NODE_SOFTBREAK:\n      cmark_strbuf_putc(html, ' ');\n      break;\n\n    default:\n      break;\n    }\n    return 1;\n  }\n\n  switch (node->type) {\n  case CMARK_NODE_DOCUMENT:\n    break;\n\n  case CMARK_NODE_BLOCK_QUOTE:\n    if (entering) {\n      cr(html);\n      cmark_strbuf_puts(html, \"<blockquote\");\n      S_render_sourcepos(node, html, options);\n      cmark_strbuf_puts(html, \">\\n\");\n    } else {\n      cr(html);\n      cmark_strbuf_puts(html, \"</blockquote>\\n\");\n    }\n    break;\n\n  case CMARK_NODE_LIST: {\n    cmark_list_type list_type = node->as.list.list_type;\n    int start = node->as.list.start;\n\n    if (entering) {\n      cr(html);\n      if (list_type == CMARK_BULLET_LIST) {\n        cmark_strbuf_puts(html, \"<ul\");\n        S_render_sourcepos(node, html, options);\n        cmark_strbuf_puts(html, \">\\n\");\n      } else if (start == 1) {\n        cmark_strbuf_puts(html, \"<ol\");\n        S_render_sourcepos(node, html, options);\n        cmark_strbuf_puts(html, \">\\n\");\n      } else {\n        snprintf(buffer, BUFFER_SIZE, \"<ol start=\\\"%d\\\"\", start);\n        cmark_strbuf_puts(html, buffer);\n        S_render_sourcepos(node, html, options);\n        cmark_strbuf_puts(html, \">\\n\");\n      }\n    } else {\n      cmark_strbuf_puts(html,\n                        list_type == CMARK_BULLET_LIST ? \"</ul>\\n\" : \"</ol>\\n\");\n    }\n    break;\n  }\n\n  case CMARK_NODE_ITEM:\n    if (entering) {\n      cr(html);\n      cmark_strbuf_puts(html, \"<li\");\n      S_render_sourcepos(node, html, options);\n      cmark_strbuf_putc(html, '>');\n    } else {\n      cmark_strbuf_puts(html, \"</li>\\n\");\n    }\n    break;\n\n  case CMARK_NODE_HEADING:\n    if (entering) {\n      cr(html);\n      start_heading[2] = (char)('0' + node->as.heading.level);\n      cmark_strbuf_puts(html, start_heading);\n      S_render_sourcepos(node, html, options);\n      cmark_strbuf_putc(html, '>');\n    } else {\n      end_heading[3] = (char)('0' + node->as.heading.level);\n      cmark_strbuf_puts(html, end_heading);\n      cmark_strbuf_puts(html, \">\\n\");\n    }\n    break;\n\n  case CMARK_NODE_CODE_BLOCK:\n    cr(html);\n\n    if (node->as.code.info.len == 0) {\n      cmark_strbuf_puts(html, \"<pre\");\n      S_render_sourcepos(node, html, options);\n      cmark_strbuf_puts(html, \"><code>\");\n    } else {\n      bufsize_t first_tag = 0;\n      while (first_tag < node->as.code.info.len &&\n             !cmark_isspace(node->as.code.info.data[first_tag])) {\n        first_tag += 1;\n      }\n\n      cmark_strbuf_puts(html, \"<pre\");\n      S_render_sourcepos(node, html, options);\n      cmark_strbuf_puts(html, \"><code class=\\\"language-\");\n      escape_html(html, node->as.code.info.data, first_tag);\n      cmark_strbuf_puts(html, \"\\\">\");\n    }\n\n    escape_html(html, node->as.code.literal.data, node->as.code.literal.len);\n    cmark_strbuf_puts(html, \"</code></pre>\\n\");\n    break;\n\n  case CMARK_NODE_HTML_BLOCK:\n    cr(html);\n    if (!(options & CMARK_OPT_UNSAFE)) {\n      cmark_strbuf_puts(html, \"<!-- raw HTML omitted -->\");\n    } else {\n      cmark_strbuf_put(html, node->as.literal.data, node->as.literal.len);\n    }\n    cr(html);\n    break;\n\n  case CMARK_NODE_CUSTOM_BLOCK:\n    cr(html);\n    if (entering) {\n      cmark_strbuf_put(html, node->as.custom.on_enter.data,\n                       node->as.custom.on_enter.len);\n    } else {\n      cmark_strbuf_put(html, node->as.custom.on_exit.data,\n                       node->as.custom.on_exit.len);\n    }\n    cr(html);\n    break;\n\n  case CMARK_NODE_THEMATIC_BREAK:\n    cr(html);\n    cmark_strbuf_puts(html, \"<hr\");\n    S_render_sourcepos(node, html, options);\n    cmark_strbuf_puts(html, \" />\\n\");\n    break;\n\n  case CMARK_NODE_PARAGRAPH:\n    parent = cmark_node_parent(node);\n    grandparent = cmark_node_parent(parent);\n    if (grandparent != NULL && grandparent->type == CMARK_NODE_LIST) {\n      tight = grandparent->as.list.tight;\n    } else {\n      tight = false;\n    }\n    if (!tight) {\n      if (entering) {\n        cr(html);\n        cmark_strbuf_puts(html, \"<p\");\n        S_render_sourcepos(node, html, options);\n        cmark_strbuf_putc(html, '>');\n      } else {\n        cmark_strbuf_puts(html, \"</p>\\n\");\n      }\n    }\n    break;\n\n  case CMARK_NODE_TEXT:\n    escape_html(html, node->as.literal.data, node->as.literal.len);\n    break;\n\n  case CMARK_NODE_LINEBREAK:\n    cmark_strbuf_puts(html, \"<br />\\n\");\n    break;\n\n  case CMARK_NODE_SOFTBREAK:\n    if (options & CMARK_OPT_HARDBREAKS) {\n      cmark_strbuf_puts(html, \"<br />\\n\");\n    } else if (options & CMARK_OPT_NOBREAKS) {\n      cmark_strbuf_putc(html, ' ');\n    } else {\n      cmark_strbuf_putc(html, '\\n');\n    }\n    break;\n\n  case CMARK_NODE_CODE:\n    cmark_strbuf_puts(html, \"<code>\");\n    escape_html(html, node->as.literal.data, node->as.literal.len);\n    cmark_strbuf_puts(html, \"</code>\");\n    break;\n\n  case CMARK_NODE_HTML_INLINE:\n    if (!(options & CMARK_OPT_UNSAFE)) {\n      cmark_strbuf_puts(html, \"<!-- raw HTML omitted -->\");\n    } else {\n      cmark_strbuf_put(html, node->as.literal.data, node->as.literal.len);\n    }\n    break;\n\n  case CMARK_NODE_CUSTOM_INLINE:\n    if (entering) {\n      cmark_strbuf_put(html, node->as.custom.on_enter.data,\n                       node->as.custom.on_enter.len);\n    } else {\n      cmark_strbuf_put(html, node->as.custom.on_exit.data,\n                       node->as.custom.on_exit.len);\n    }\n    break;\n\n  case CMARK_NODE_STRONG:\n    if (entering) {\n      cmark_strbuf_puts(html, \"<strong>\");\n    } else {\n      cmark_strbuf_puts(html, \"</strong>\");\n    }\n    break;\n\n  case CMARK_NODE_EMPH:\n    if (entering) {\n      cmark_strbuf_puts(html, \"<em>\");\n    } else {\n      cmark_strbuf_puts(html, \"</em>\");\n    }\n    break;\n\n  case CMARK_NODE_LINK:\n    if (entering) {\n      cmark_strbuf_puts(html, \"<a href=\\\"\");\n      if ((options & CMARK_OPT_UNSAFE) ||\n            !(scan_dangerous_url(&node->as.link.url, 0))) {\n        houdini_escape_href(html, node->as.link.url.data,\n                            node->as.link.url.len);\n      }\n      if (node->as.link.title.len) {\n        cmark_strbuf_puts(html, \"\\\" title=\\\"\");\n        escape_html(html, node->as.link.title.data, node->as.link.title.len);\n      }\n      cmark_strbuf_puts(html, \"\\\">\");\n    } else {\n      cmark_strbuf_puts(html, \"</a>\");\n    }\n    break;\n\n  case CMARK_NODE_IMAGE:\n    if (entering) {\n      cmark_strbuf_puts(html, \"<img src=\\\"\");\n      if ((options & CMARK_OPT_UNSAFE) ||\n            !(scan_dangerous_url(&node->as.link.url, 0))) {\n        houdini_escape_href(html, node->as.link.url.data,\n                            node->as.link.url.len);\n      }\n      cmark_strbuf_puts(html, \"\\\" alt=\\\"\");\n      state->plain = node;\n    } else {\n      if (node->as.link.title.len) {\n        cmark_strbuf_puts(html, \"\\\" title=\\\"\");\n        escape_html(html, node->as.link.title.data, node->as.link.title.len);\n      }\n\n      cmark_strbuf_puts(html, \"\\\" />\");\n    }\n    break;\n\n  default:\n    assert(false);\n    break;\n  }\n\n  // cmark_strbuf_putc(html, 'x');\n  return 1;\n}\n\nchar *cmark_render_html(cmark_node *root, int options) {\n  char *result;\n  cmark_strbuf html = CMARK_BUF_INIT(cmark_node_mem(root));\n  cmark_event_type ev_type;\n  cmark_node *cur;\n  struct render_state state = {&html, NULL};\n  cmark_iter *iter = cmark_iter_new(root);\n\n  while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {\n    cur = cmark_iter_get_node(iter);\n    S_render_node(cur, ev_type, &state, options);\n  }\n  result = (char *)cmark_strbuf_detach(&html);\n\n  cmark_iter_free(iter);\n  return result;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/inlines.c",
    "content": "#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n\n#include \"cmark_ctype.h\"\n#include \"config.h\"\n#include \"node.h\"\n#include \"parser.h\"\n#include \"references.h\"\n#include \"cmark.h\"\n#include \"houdini.h\"\n#include \"utf8.h\"\n#include \"scanners.h\"\n#include \"inlines.h\"\n\nstatic const char *EMDASH = \"\\xE2\\x80\\x94\";\nstatic const char *ENDASH = \"\\xE2\\x80\\x93\";\nstatic const char *ELLIPSES = \"\\xE2\\x80\\xA6\";\nstatic const char *LEFTDOUBLEQUOTE = \"\\xE2\\x80\\x9C\";\nstatic const char *RIGHTDOUBLEQUOTE = \"\\xE2\\x80\\x9D\";\nstatic const char *LEFTSINGLEQUOTE = \"\\xE2\\x80\\x98\";\nstatic const char *RIGHTSINGLEQUOTE = \"\\xE2\\x80\\x99\";\n\n// Macros for creating various kinds of simple.\n#define make_str(subj, sc, ec, s) make_literal(subj, CMARK_NODE_TEXT, sc, ec, s)\n#define make_code(subj, sc, ec, s) make_literal(subj, CMARK_NODE_CODE, sc, ec, s)\n#define make_raw_html(subj, sc, ec, s) make_literal(subj, CMARK_NODE_HTML_INLINE, sc, ec, s)\n#define make_linebreak(mem) make_simple(mem, CMARK_NODE_LINEBREAK)\n#define make_softbreak(mem) make_simple(mem, CMARK_NODE_SOFTBREAK)\n#define make_emph(mem) make_simple(mem, CMARK_NODE_EMPH)\n#define make_strong(mem) make_simple(mem, CMARK_NODE_STRONG)\n\n#define MAXBACKTICKS 1000\n\ntypedef struct delimiter {\n  struct delimiter *previous;\n  struct delimiter *next;\n  cmark_node *inl_text;\n  bufsize_t length;\n  unsigned char delim_char;\n  bool can_open;\n  bool can_close;\n} delimiter;\n\ntypedef struct bracket {\n  struct bracket *previous;\n  struct delimiter *previous_delimiter;\n  cmark_node *inl_text;\n  bufsize_t position;\n  bool image;\n  bool active;\n  bool bracket_after;\n} bracket;\n\ntypedef struct {\n  cmark_mem *mem;\n  cmark_chunk input;\n  int line;\n  bufsize_t pos;\n  int block_offset;\n  int column_offset;\n  cmark_reference_map *refmap;\n  delimiter *last_delim;\n  bracket *last_bracket;\n  bufsize_t backticks[MAXBACKTICKS + 1];\n  bool scanned_for_backticks;\n} subject;\n\nstatic CMARK_INLINE bool S_is_line_end_char(char c) {\n  return (c == '\\n' || c == '\\r');\n}\n\nstatic delimiter *S_insert_emph(subject *subj, delimiter *opener,\n                                delimiter *closer);\n\nstatic int parse_inline(subject *subj, cmark_node *parent, int options);\n\nstatic void subject_from_buf(cmark_mem *mem, int line_number, int block_offset, subject *e,\n                             cmark_chunk *chunk, cmark_reference_map *refmap);\nstatic bufsize_t subject_find_special_char(subject *subj, int options);\n\n// Create an inline with a literal string value.\nstatic CMARK_INLINE cmark_node *make_literal(subject *subj, cmark_node_type t,\n                                             int start_column, int end_column,\n                                             cmark_chunk s) {\n  cmark_node *e = (cmark_node *)subj->mem->calloc(1, sizeof(*e));\n  cmark_strbuf_init(subj->mem, &e->content, 0);\n  e->type = (uint16_t)t;\n  e->as.literal = s;\n  e->start_line = e->end_line = subj->line;\n  // columns are 1 based.\n  e->start_column = start_column + 1 + subj->column_offset + subj->block_offset;\n  e->end_column = end_column + 1 + subj->column_offset + subj->block_offset;\n  return e;\n}\n\n// Create an inline with no value.\nstatic CMARK_INLINE cmark_node *make_simple(cmark_mem *mem, cmark_node_type t) {\n  cmark_node *e = (cmark_node *)mem->calloc(1, sizeof(*e));\n  cmark_strbuf_init(mem, &e->content, 0);\n  e->type = t;\n  return e;\n}\n\n// Like make_str, but parses entities.\nstatic cmark_node *make_str_with_entities(subject *subj,\n                                          int start_column, int end_column,\n                                          cmark_chunk *content) {\n  cmark_strbuf unescaped = CMARK_BUF_INIT(subj->mem);\n\n  if (houdini_unescape_html(&unescaped, content->data, content->len)) {\n    return make_str(subj, start_column, end_column, cmark_chunk_buf_detach(&unescaped));\n  } else {\n    return make_str(subj, start_column, end_column, *content);\n  }\n}\n\n// Duplicate a chunk by creating a copy of the buffer not by reusing the\n// buffer like cmark_chunk_dup does.\nstatic cmark_chunk chunk_clone(cmark_mem *mem, cmark_chunk *src) {\n  cmark_chunk c;\n  bufsize_t len = src->len;\n\n  c.len = len;\n  c.data = (unsigned char *)mem->calloc(len + 1, 1);\n  c.alloc = 1;\n  if (len)\n    memcpy(c.data, src->data, len);\n  c.data[len] = '\\0';\n\n  return c;\n}\n\nstatic cmark_chunk cmark_clean_autolink(cmark_mem *mem, cmark_chunk *url,\n                                        int is_email) {\n  cmark_strbuf buf = CMARK_BUF_INIT(mem);\n\n  cmark_chunk_trim(url);\n\n  if (url->len == 0) {\n    cmark_chunk result = CMARK_CHUNK_EMPTY;\n    return result;\n  }\n\n  if (is_email)\n    cmark_strbuf_puts(&buf, \"mailto:\");\n\n  houdini_unescape_html_f(&buf, url->data, url->len);\n  return cmark_chunk_buf_detach(&buf);\n}\n\nstatic CMARK_INLINE cmark_node *make_autolink(subject *subj,\n                                              int start_column, int end_column,\n                                              cmark_chunk url, int is_email) {\n  cmark_node *link = make_simple(subj->mem, CMARK_NODE_LINK);\n  link->as.link.url = cmark_clean_autolink(subj->mem, &url, is_email);\n  link->as.link.title = cmark_chunk_literal(\"\");\n  link->start_line = link->end_line = subj->line;\n  link->start_column = start_column + 1;\n  link->end_column = end_column + 1;\n  cmark_node_append_child(link, make_str_with_entities(subj, start_column + 1, end_column - 1, &url));\n  return link;\n}\n\nstatic void subject_from_buf(cmark_mem *mem, int line_number, int block_offset, subject *e,\n                             cmark_chunk *chunk, cmark_reference_map *refmap) {\n  int i;\n  e->mem = mem;\n  e->input = *chunk;\n  e->line = line_number;\n  e->pos = 0;\n  e->block_offset = block_offset;\n  e->column_offset = 0;\n  e->refmap = refmap;\n  e->last_delim = NULL;\n  e->last_bracket = NULL;\n  for (i = 0; i <= MAXBACKTICKS; i++) {\n    e->backticks[i] = 0;\n  }\n  e->scanned_for_backticks = false;\n}\n\nstatic CMARK_INLINE int isbacktick(int c) { return (c == '`'); }\n\nstatic CMARK_INLINE unsigned char peek_char(subject *subj) {\n  // NULL bytes should have been stripped out by now.  If they're\n  // present, it's a programming error:\n  assert(!(subj->pos < subj->input.len && subj->input.data[subj->pos] == 0));\n  return (subj->pos < subj->input.len) ? subj->input.data[subj->pos] : 0;\n}\n\nstatic CMARK_INLINE unsigned char peek_at(subject *subj, bufsize_t pos) {\n  return subj->input.data[pos];\n}\n\n// Return true if there are more characters in the subject.\nstatic CMARK_INLINE int is_eof(subject *subj) {\n  return (subj->pos >= subj->input.len);\n}\n\n// Advance the subject.  Doesn't check for eof.\n#define advance(subj) (subj)->pos += 1\n\nstatic CMARK_INLINE bool skip_spaces(subject *subj) {\n  bool skipped = false;\n  while (peek_char(subj) == ' ' || peek_char(subj) == '\\t') {\n    advance(subj);\n    skipped = true;\n  }\n  return skipped;\n}\n\nstatic CMARK_INLINE bool skip_line_end(subject *subj) {\n  bool seen_line_end_char = false;\n  if (peek_char(subj) == '\\r') {\n    advance(subj);\n    seen_line_end_char = true;\n  }\n  if (peek_char(subj) == '\\n') {\n    advance(subj);\n    seen_line_end_char = true;\n  }\n  return seen_line_end_char || is_eof(subj);\n}\n\n// Take characters while a predicate holds, and return a string.\nstatic CMARK_INLINE cmark_chunk take_while(subject *subj, int (*f)(int)) {\n  unsigned char c;\n  bufsize_t startpos = subj->pos;\n  bufsize_t len = 0;\n\n  while ((c = peek_char(subj)) && (*f)(c)) {\n    advance(subj);\n    len++;\n  }\n\n  return cmark_chunk_dup(&subj->input, startpos, len);\n}\n\n// Return the number of newlines in a given span of text in a subject.  If\n// the number is greater than zero, also return the number of characters\n// between the last newline and the end of the span in `since_newline`.\nstatic int count_newlines(subject *subj, bufsize_t from, bufsize_t len, int *since_newline) {\n  int nls = 0;\n  int since_nl = 0;\n\n  while (len--) {\n    if (subj->input.data[from++] == '\\n') {\n      ++nls;\n      since_nl = 0;\n    } else {\n      ++since_nl;\n    }\n  }\n\n  if (!nls)\n    return 0;\n\n  *since_newline = since_nl;\n  return nls;\n}\n\n// Adjust `node`'s `end_line`, `end_column`, and `subj`'s `line` and\n// `column_offset` according to the number of newlines in a just-matched span\n// of text in `subj`.\nstatic void adjust_subj_node_newlines(subject *subj, cmark_node *node, int matchlen, int extra, int options) {\n  if (!(options & CMARK_OPT_SOURCEPOS)) {\n    return;\n  }\n\n  int since_newline;\n  int newlines = count_newlines(subj, subj->pos - matchlen - extra, matchlen, &since_newline);\n  if (newlines) {\n    subj->line += newlines;\n    node->end_line += newlines;\n    node->end_column = since_newline;\n    subj->column_offset = -subj->pos + since_newline + extra;\n  }\n}\n\n// Try to process a backtick code span that began with a\n// span of ticks of length openticklength length (already\n// parsed).  Return 0 if you don't find matching closing\n// backticks, otherwise return the position in the subject\n// after the closing backticks.\nstatic bufsize_t scan_to_closing_backticks(subject *subj,\n                                           bufsize_t openticklength) {\n\n  bool found = false;\n  if (openticklength > MAXBACKTICKS) {\n    // we limit backtick string length because of the array subj->backticks:\n    return 0;\n  }\n  if (subj->scanned_for_backticks &&\n      subj->backticks[openticklength] <= subj->pos) {\n    // return if we already know there's no closer\n    return 0;\n  }\n  while (!found) {\n    // read non backticks\n    unsigned char c;\n    while ((c = peek_char(subj)) && c != '`') {\n      advance(subj);\n    }\n    if (is_eof(subj)) {\n      break;\n    }\n    bufsize_t numticks = 0;\n    while (peek_char(subj) == '`') {\n      advance(subj);\n      numticks++;\n    }\n    // store position of ender\n    if (numticks <= MAXBACKTICKS) {\n      subj->backticks[numticks] = subj->pos - numticks;\n    }\n    if (numticks == openticklength) {\n      return (subj->pos);\n    }\n  }\n  // got through whole input without finding closer\n  subj->scanned_for_backticks = true;\n  return 0;\n}\n\n// Destructively modify string, converting newlines to\n// spaces, then removing a single leading + trailing space,\n// unless the code span consists entirely of space characters.\nstatic void S_normalize_code(cmark_strbuf *s) {\n  bufsize_t r, w;\n  bool contains_nonspace = false;\n\n  for (r = 0, w = 0; r < s->size; ++r) {\n    switch (s->ptr[r]) {\n    case '\\r':\n      if (s->ptr[r + 1] != '\\n') {\n\ts->ptr[w++] = ' ';\n      }\n      break;\n    case '\\n':\n      s->ptr[w++] = ' ';\n      break;\n    default:\n      s->ptr[w++] = s->ptr[r];\n    }\n    if (s->ptr[r] != ' ') {\n      contains_nonspace = true;\n    }\n  }\n\n  // begins and ends with space?\n  if (contains_nonspace &&\n      s->ptr[0] == ' ' && s->ptr[w - 1] == ' ') {\n    cmark_strbuf_drop(s, 1);\n    cmark_strbuf_truncate(s, w - 2);\n  } else {\n    cmark_strbuf_truncate(s, w);\n  }\n\n}\n\n\n// Parse backtick code section or raw backticks, return an inline.\n// Assumes that the subject has a backtick at the current position.\nstatic cmark_node *handle_backticks(subject *subj, int options) {\n  cmark_chunk openticks = take_while(subj, isbacktick);\n  bufsize_t startpos = subj->pos;\n  bufsize_t endpos = scan_to_closing_backticks(subj, openticks.len);\n\n  if (endpos == 0) {      // not found\n    subj->pos = startpos; // rewind\n    return make_str(subj, subj->pos, subj->pos, openticks);\n  } else {\n    cmark_strbuf buf = CMARK_BUF_INIT(subj->mem);\n\n    cmark_strbuf_set(&buf, subj->input.data + startpos,\n                     endpos - startpos - openticks.len);\n    S_normalize_code(&buf);\n\n    cmark_node *node = make_code(subj, startpos, endpos - openticks.len - 1, cmark_chunk_buf_detach(&buf));\n    adjust_subj_node_newlines(subj, node, endpos - startpos, openticks.len, options);\n    return node;\n  }\n}\n\n\n// Scan ***, **, or * and return number scanned, or 0.\n// Advances position.\nstatic int scan_delims(subject *subj, unsigned char c, bool *can_open,\n                       bool *can_close) {\n  int numdelims = 0;\n  bufsize_t before_char_pos;\n  int32_t after_char = 0;\n  int32_t before_char = 0;\n  int len;\n  bool left_flanking, right_flanking;\n\n  if (subj->pos == 0) {\n    before_char = 10;\n  } else {\n    before_char_pos = subj->pos - 1;\n    // walk back to the beginning of the UTF_8 sequence:\n    while (peek_at(subj, before_char_pos) >> 6 == 2 && before_char_pos > 0) {\n      before_char_pos -= 1;\n    }\n    len = cmark_utf8proc_iterate(subj->input.data + before_char_pos,\n                                 subj->pos - before_char_pos, &before_char);\n    if (len == -1) {\n      before_char = 10;\n    }\n  }\n\n  if (c == '\\'' || c == '\"') {\n    numdelims++;\n    advance(subj); // limit to 1 delim for quotes\n  } else {\n    while (peek_char(subj) == c) {\n      numdelims++;\n      advance(subj);\n    }\n  }\n\n  len = cmark_utf8proc_iterate(subj->input.data + subj->pos,\n                               subj->input.len - subj->pos, &after_char);\n  if (len == -1) {\n    after_char = 10;\n  }\n  left_flanking = numdelims > 0 && !cmark_utf8proc_is_space(after_char) &&\n                  (!cmark_utf8proc_is_punctuation(after_char) ||\n                   cmark_utf8proc_is_space(before_char) ||\n                   cmark_utf8proc_is_punctuation(before_char));\n  right_flanking = numdelims > 0 && !cmark_utf8proc_is_space(before_char) &&\n                   (!cmark_utf8proc_is_punctuation(before_char) ||\n                    cmark_utf8proc_is_space(after_char) ||\n                    cmark_utf8proc_is_punctuation(after_char));\n  if (c == '_') {\n    *can_open = left_flanking &&\n                (!right_flanking || cmark_utf8proc_is_punctuation(before_char));\n    *can_close = right_flanking &&\n                 (!left_flanking || cmark_utf8proc_is_punctuation(after_char));\n  } else if (c == '\\'' || c == '\"') {\n    *can_open = left_flanking && !right_flanking &&\n\t         before_char != ']' && before_char != ')';\n    *can_close = right_flanking;\n  } else {\n    *can_open = left_flanking;\n    *can_close = right_flanking;\n  }\n  return numdelims;\n}\n\n/*\nstatic void print_delimiters(subject *subj)\n{\n        delimiter *delim;\n        delim = subj->last_delim;\n        while (delim != NULL) {\n                printf(\"Item at stack pos %p: %d %d %d next(%p) prev(%p)\\n\",\n                       (void*)delim, delim->delim_char,\n                       delim->can_open, delim->can_close,\n                       (void*)delim->next, (void*)delim->previous);\n                delim = delim->previous;\n        }\n}\n*/\n\nstatic void remove_delimiter(subject *subj, delimiter *delim) {\n  if (delim == NULL)\n    return;\n  if (delim->next == NULL) {\n    // end of list:\n    assert(delim == subj->last_delim);\n    subj->last_delim = delim->previous;\n  } else {\n    delim->next->previous = delim->previous;\n  }\n  if (delim->previous != NULL) {\n    delim->previous->next = delim->next;\n  }\n  subj->mem->free(delim);\n}\n\nstatic void pop_bracket(subject *subj) {\n  bracket *b;\n  if (subj->last_bracket == NULL)\n    return;\n  b = subj->last_bracket;\n  subj->last_bracket = subj->last_bracket->previous;\n  subj->mem->free(b);\n}\n\nstatic void push_delimiter(subject *subj, unsigned char c, bool can_open,\n                           bool can_close, cmark_node *inl_text) {\n  delimiter *delim = (delimiter *)subj->mem->calloc(1, sizeof(delimiter));\n  delim->delim_char = c;\n  delim->can_open = can_open;\n  delim->can_close = can_close;\n  delim->inl_text = inl_text;\n  delim->length = inl_text->as.literal.len;\n  delim->previous = subj->last_delim;\n  delim->next = NULL;\n  if (delim->previous != NULL) {\n    delim->previous->next = delim;\n  }\n  subj->last_delim = delim;\n}\n\nstatic void push_bracket(subject *subj, bool image, cmark_node *inl_text) {\n  bracket *b = (bracket *)subj->mem->calloc(1, sizeof(bracket));\n  if (subj->last_bracket != NULL) {\n    subj->last_bracket->bracket_after = true;\n  }\n  b->image = image;\n  b->active = true;\n  b->inl_text = inl_text;\n  b->previous = subj->last_bracket;\n  b->previous_delimiter = subj->last_delim;\n  b->position = subj->pos;\n  b->bracket_after = false;\n  subj->last_bracket = b;\n}\n\n// Assumes the subject has a c at the current position.\nstatic cmark_node *handle_delim(subject *subj, unsigned char c, bool smart) {\n  bufsize_t numdelims;\n  cmark_node *inl_text;\n  bool can_open, can_close;\n  cmark_chunk contents;\n\n  numdelims = scan_delims(subj, c, &can_open, &can_close);\n\n  if (c == '\\'' && smart) {\n    contents = cmark_chunk_literal(RIGHTSINGLEQUOTE);\n  } else if (c == '\"' && smart) {\n    contents =\n        cmark_chunk_literal(can_close ? RIGHTDOUBLEQUOTE : LEFTDOUBLEQUOTE);\n  } else {\n    contents = cmark_chunk_dup(&subj->input, subj->pos - numdelims, numdelims);\n  }\n\n  inl_text = make_str(subj, subj->pos - numdelims, subj->pos - 1, contents);\n\n  if ((can_open || can_close) && (!(c == '\\'' || c == '\"') || smart)) {\n    push_delimiter(subj, c, can_open, can_close, inl_text);\n  }\n\n  return inl_text;\n}\n\n// Assumes we have a hyphen at the current position.\nstatic cmark_node *handle_hyphen(subject *subj, bool smart) {\n  int startpos = subj->pos;\n\n  advance(subj);\n\n  if (!smart || peek_char(subj) != '-') {\n    return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal(\"-\"));\n  }\n\n  while (smart && peek_char(subj) == '-') {\n    advance(subj);\n  }\n\n  int numhyphens = subj->pos - startpos;\n  int en_count = 0;\n  int em_count = 0;\n  int i;\n  cmark_strbuf buf = CMARK_BUF_INIT(subj->mem);\n\n  if (numhyphens % 3 == 0) { // if divisible by 3, use all em dashes\n    em_count = numhyphens / 3;\n  } else if (numhyphens % 2 == 0) { // if divisible by 2, use all en dashes\n    en_count = numhyphens / 2;\n  } else if (numhyphens % 3 == 2) { // use one en dash at end\n    en_count = 1;\n    em_count = (numhyphens - 2) / 3;\n  } else { // use two en dashes at the end\n    en_count = 2;\n    em_count = (numhyphens - 4) / 3;\n  }\n\n  for (i = em_count; i > 0; i--) {\n    cmark_strbuf_puts(&buf, EMDASH);\n  }\n\n  for (i = en_count; i > 0; i--) {\n    cmark_strbuf_puts(&buf, ENDASH);\n  }\n\n  return make_str(subj, startpos, subj->pos - 1, cmark_chunk_buf_detach(&buf));\n}\n\n// Assumes we have a period at the current position.\nstatic cmark_node *handle_period(subject *subj, bool smart) {\n  advance(subj);\n  if (smart && peek_char(subj) == '.') {\n    advance(subj);\n    if (peek_char(subj) == '.') {\n      advance(subj);\n      return make_str(subj, subj->pos - 3, subj->pos - 1, cmark_chunk_literal(ELLIPSES));\n    } else {\n      return make_str(subj, subj->pos - 2, subj->pos - 1, cmark_chunk_literal(\"..\"));\n    }\n  } else {\n    return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal(\".\"));\n  }\n}\n\nstatic void process_emphasis(subject *subj, delimiter *stack_bottom) {\n  delimiter *closer = subj->last_delim;\n  delimiter *opener;\n  delimiter *old_closer;\n  bool opener_found;\n  int openers_bottom_index = 0;\n  delimiter *openers_bottom[6] = {stack_bottom, stack_bottom, stack_bottom,\n                                  stack_bottom, stack_bottom, stack_bottom};\n\n  // move back to first relevant delim.\n  while (closer != NULL && closer->previous != stack_bottom) {\n    closer = closer->previous;\n  }\n\n  // now move forward, looking for closers, and handling each\n  while (closer != NULL) {\n    if (closer->can_close) {\n      switch (closer->delim_char) {\n      case '\"':\n        openers_bottom_index = 0;\n        break;\n      case '\\'':\n        openers_bottom_index = 1;\n        break;\n      case '_':\n        openers_bottom_index = 2;\n        break;\n      case '*':\n        openers_bottom_index = 3 + (closer->length % 3);\n        break;\n      default:\n        assert(false);\n      }\n\n      // Now look backwards for first matching opener:\n      opener = closer->previous;\n      opener_found = false;\n      while (opener != NULL && opener != openers_bottom[openers_bottom_index]) {\n        if (opener->can_open && opener->delim_char == closer->delim_char) {\n          // interior closer of size 2 can't match opener of size 1\n          // or of size 1 can't match 2\n          if (!(closer->can_open || opener->can_close) ||\n\t      closer->length % 3 == 0 ||\n              (opener->length + closer->length) % 3 != 0) {\n            opener_found = true;\n            break;\n          }\n        }\n        opener = opener->previous;\n      }\n      old_closer = closer;\n      if (closer->delim_char == '*' || closer->delim_char == '_') {\n        if (opener_found) {\n          closer = S_insert_emph(subj, opener, closer);\n        } else {\n          closer = closer->next;\n        }\n      } else if (closer->delim_char == '\\'') {\n        cmark_chunk_free(subj->mem, &closer->inl_text->as.literal);\n        closer->inl_text->as.literal = cmark_chunk_literal(RIGHTSINGLEQUOTE);\n        if (opener_found) {\n          cmark_chunk_free(subj->mem, &opener->inl_text->as.literal);\n          opener->inl_text->as.literal = cmark_chunk_literal(LEFTSINGLEQUOTE);\n        }\n        closer = closer->next;\n      } else if (closer->delim_char == '\"') {\n        cmark_chunk_free(subj->mem, &closer->inl_text->as.literal);\n        closer->inl_text->as.literal = cmark_chunk_literal(RIGHTDOUBLEQUOTE);\n        if (opener_found) {\n          cmark_chunk_free(subj->mem, &opener->inl_text->as.literal);\n          opener->inl_text->as.literal = cmark_chunk_literal(LEFTDOUBLEQUOTE);\n        }\n        closer = closer->next;\n      }\n      if (!opener_found) {\n        // set lower bound for future searches for openers\n        openers_bottom[openers_bottom_index] = old_closer->previous;\n        if (!old_closer->can_open) {\n          // we can remove a closer that can't be an\n          // opener, once we've seen there's no\n          // matching opener:\n          remove_delimiter(subj, old_closer);\n        }\n      }\n    } else {\n      closer = closer->next;\n    }\n  }\n  // free all delimiters in list until stack_bottom:\n  while (subj->last_delim != NULL && subj->last_delim != stack_bottom) {\n    remove_delimiter(subj, subj->last_delim);\n  }\n}\n\nstatic delimiter *S_insert_emph(subject *subj, delimiter *opener,\n                                delimiter *closer) {\n  delimiter *delim, *tmp_delim;\n  bufsize_t use_delims;\n  cmark_node *opener_inl = opener->inl_text;\n  cmark_node *closer_inl = closer->inl_text;\n  bufsize_t opener_num_chars = opener_inl->as.literal.len;\n  bufsize_t closer_num_chars = closer_inl->as.literal.len;\n  cmark_node *tmp, *tmpnext, *emph;\n\n  // calculate the actual number of characters used from this closer\n  use_delims = (closer_num_chars >= 2 && opener_num_chars >= 2) ? 2 : 1;\n\n  // remove used characters from associated inlines.\n  opener_num_chars -= use_delims;\n  closer_num_chars -= use_delims;\n  opener_inl->as.literal.len = opener_num_chars;\n  closer_inl->as.literal.len = closer_num_chars;\n\n  // free delimiters between opener and closer\n  delim = closer->previous;\n  while (delim != NULL && delim != opener) {\n    tmp_delim = delim->previous;\n    remove_delimiter(subj, delim);\n    delim = tmp_delim;\n  }\n\n  // create new emph or strong, and splice it in to our inlines\n  // between the opener and closer\n  emph = use_delims == 1 ? make_emph(subj->mem) : make_strong(subj->mem);\n\n  tmp = opener_inl->next;\n  while (tmp && tmp != closer_inl) {\n    tmpnext = tmp->next;\n    cmark_node_append_child(emph, tmp);\n    tmp = tmpnext;\n  }\n  cmark_node_insert_after(opener_inl, emph);\n\n  emph->start_line = opener_inl->start_line;\n  emph->end_line = closer_inl->end_line;\n  emph->start_column = opener_inl->start_column;\n  emph->end_column = closer_inl->end_column;\n\n  // if opener has 0 characters, remove it and its associated inline\n  if (opener_num_chars == 0) {\n    cmark_node_free(opener_inl);\n    remove_delimiter(subj, opener);\n  }\n\n  // if closer has 0 characters, remove it and its associated inline\n  if (closer_num_chars == 0) {\n    // remove empty closer inline\n    cmark_node_free(closer_inl);\n    // remove closer from list\n    tmp_delim = closer->next;\n    remove_delimiter(subj, closer);\n    closer = tmp_delim;\n  }\n\n  return closer;\n}\n\n// Parse backslash-escape or just a backslash, returning an inline.\nstatic cmark_node *handle_backslash(subject *subj) {\n  advance(subj);\n  unsigned char nextchar = peek_char(subj);\n  if (cmark_ispunct(\n          nextchar)) { // only ascii symbols and newline can be escaped\n    advance(subj);\n    return make_str(subj, subj->pos - 2, subj->pos - 1, cmark_chunk_dup(&subj->input, subj->pos - 1, 1));\n  } else if (!is_eof(subj) && skip_line_end(subj)) {\n    return make_linebreak(subj->mem);\n  } else {\n    return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal(\"\\\\\"));\n  }\n}\n\n// Parse an entity or a regular \"&\" string.\n// Assumes the subject has an '&' character at the current position.\nstatic cmark_node *handle_entity(subject *subj) {\n  cmark_strbuf ent = CMARK_BUF_INIT(subj->mem);\n  bufsize_t len;\n\n  advance(subj);\n\n  len = houdini_unescape_ent(&ent, subj->input.data + subj->pos,\n                             subj->input.len - subj->pos);\n\n  if (len == 0)\n    return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal(\"&\"));\n\n  subj->pos += len;\n  return make_str(subj, subj->pos - 1 - len, subj->pos - 1, cmark_chunk_buf_detach(&ent));\n}\n\n// Clean a URL: remove surrounding whitespace, and remove \\ that escape\n// punctuation.\ncmark_chunk cmark_clean_url(cmark_mem *mem, cmark_chunk *url) {\n  cmark_strbuf buf = CMARK_BUF_INIT(mem);\n\n  cmark_chunk_trim(url);\n\n  if (url->len == 0) {\n    cmark_chunk result = CMARK_CHUNK_EMPTY;\n    return result;\n  }\n\n    houdini_unescape_html_f(&buf, url->data, url->len);\n\n  cmark_strbuf_unescape(&buf);\n  return cmark_chunk_buf_detach(&buf);\n}\n\ncmark_chunk cmark_clean_title(cmark_mem *mem, cmark_chunk *title) {\n  cmark_strbuf buf = CMARK_BUF_INIT(mem);\n  unsigned char first, last;\n\n  if (title->len == 0) {\n    cmark_chunk result = CMARK_CHUNK_EMPTY;\n    return result;\n  }\n\n  first = title->data[0];\n  last = title->data[title->len - 1];\n\n  // remove surrounding quotes if any:\n  if ((first == '\\'' && last == '\\'') || (first == '(' && last == ')') ||\n      (first == '\"' && last == '\"')) {\n    houdini_unescape_html_f(&buf, title->data + 1, title->len - 2);\n  } else {\n    houdini_unescape_html_f(&buf, title->data, title->len);\n  }\n\n  cmark_strbuf_unescape(&buf);\n  return cmark_chunk_buf_detach(&buf);\n}\n\n// Parse an autolink or HTML tag.\n// Assumes the subject has a '<' character at the current position.\nstatic cmark_node *handle_pointy_brace(subject *subj, int options) {\n  bufsize_t matchlen = 0;\n  cmark_chunk contents;\n\n  advance(subj); // advance past first <\n\n  // first try to match a URL autolink\n  matchlen = scan_autolink_uri(&subj->input, subj->pos);\n  if (matchlen > 0) {\n    contents = cmark_chunk_dup(&subj->input, subj->pos, matchlen - 1);\n    subj->pos += matchlen;\n\n    return make_autolink(subj, subj->pos - 1 - matchlen, subj->pos - 1, contents, 0);\n  }\n\n  // next try to match an email autolink\n  matchlen = scan_autolink_email(&subj->input, subj->pos);\n  if (matchlen > 0) {\n    contents = cmark_chunk_dup(&subj->input, subj->pos, matchlen - 1);\n    subj->pos += matchlen;\n\n    return make_autolink(subj, subj->pos - 1 - matchlen, subj->pos - 1, contents, 1);\n  }\n\n  // finally, try to match an html tag\n  matchlen = scan_html_tag(&subj->input, subj->pos);\n  if (matchlen > 0) {\n    contents = cmark_chunk_dup(&subj->input, subj->pos - 1, matchlen + 1);\n    subj->pos += matchlen;\n    cmark_node *node = make_raw_html(subj, subj->pos - matchlen - 1, subj->pos - 1, contents);\n    adjust_subj_node_newlines(subj, node, matchlen, 1, options);\n    return node;\n  }\n\n  // if nothing matches, just return the opening <:\n  return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal(\"<\"));\n}\n\n// Parse a link label.  Returns 1 if successful.\n// Note:  unescaped brackets are not allowed in labels.\n// The label begins with `[` and ends with the first `]` character\n// encountered.  Backticks in labels do not start code spans.\nstatic int link_label(subject *subj, cmark_chunk *raw_label) {\n  bufsize_t startpos = subj->pos;\n  int length = 0;\n  unsigned char c;\n\n  // advance past [\n  if (peek_char(subj) == '[') {\n    advance(subj);\n  } else {\n    return 0;\n  }\n\n  while ((c = peek_char(subj)) && c != '[' && c != ']') {\n    if (c == '\\\\') {\n      advance(subj);\n      length++;\n      if (cmark_ispunct(peek_char(subj))) {\n        advance(subj);\n        length++;\n      }\n    } else {\n      advance(subj);\n      length++;\n    }\n    if (length > MAX_LINK_LABEL_LENGTH) {\n      goto noMatch;\n    }\n  }\n\n  if (c == ']') { // match found\n    *raw_label =\n        cmark_chunk_dup(&subj->input, startpos + 1, subj->pos - (startpos + 1));\n    cmark_chunk_trim(raw_label);\n    advance(subj); // advance past ]\n    return 1;\n  }\n\nnoMatch:\n  subj->pos = startpos; // rewind\n  return 0;\n}\n\nstatic bufsize_t manual_scan_link_url_2(cmark_chunk *input, bufsize_t offset,\n                                        cmark_chunk *output) {\n  bufsize_t i = offset;\n  size_t nb_p = 0;\n\n    while (i < input->len) {\n      if (input->data[i] == '\\\\' &&\n\t  i + 1 < input-> len &&\n          cmark_ispunct(input->data[i+1]))\n        i += 2;\n      else if (input->data[i] == '(') {\n        ++nb_p;\n        ++i;\n        if (nb_p > 32)\n          return -1;\n      } else if (input->data[i] == ')') {\n        if (nb_p == 0)\n          break;\n        --nb_p;\n        ++i;\n      } else if (cmark_isspace(input->data[i])) {\n        if (i == offset) {\n\t  return -1;\n\t}\n        break;\n      } else {\n        ++i;\n      }\n    }\n\n  if (i >= input->len)\n    return -1;\n\n  {\n    cmark_chunk result = {input->data + offset, i - offset, 0};\n    *output = result;\n  }\n  return i - offset;\n}\n\nstatic bufsize_t manual_scan_link_url(cmark_chunk *input, bufsize_t offset,\n                                      cmark_chunk *output) {\n  bufsize_t i = offset;\n\n  if (i < input->len && input->data[i] == '<') {\n    ++i;\n    while (i < input->len) {\n      if (input->data[i] == '>') {\n        ++i;\n        break;\n      } else if (input->data[i] == '\\\\')\n        i += 2;\n      else if (input->data[i] == '\\n' || input->data[i] == '<')\n        return -1;\n      else\n        ++i;\n    }\n  } else {\n    return manual_scan_link_url_2(input, offset, output);\n  }\n\n  if (i >= input->len)\n    return -1;\n\n  {\n    cmark_chunk result = {input->data + offset + 1, i - 2 - offset, 0};\n    *output = result;\n  }\n  return i - offset;\n}\n\n// Return a link, an image, or a literal close bracket.\nstatic cmark_node *handle_close_bracket(subject *subj) {\n  bufsize_t initial_pos, after_link_text_pos;\n  bufsize_t endurl, starttitle, endtitle, endall;\n  bufsize_t sps, n;\n  cmark_reference *ref = NULL;\n  cmark_chunk url_chunk, title_chunk;\n  cmark_chunk url, title;\n  bracket *opener;\n  cmark_node *inl;\n  cmark_chunk raw_label;\n  int found_label;\n  cmark_node *tmp, *tmpnext;\n  bool is_image;\n\n  advance(subj); // advance past ]\n  initial_pos = subj->pos;\n\n  // get last [ or ![\n  opener = subj->last_bracket;\n\n  if (opener == NULL) {\n    return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal(\"]\"));\n  }\n\n  if (!opener->active) {\n    // take delimiter off stack\n    pop_bracket(subj);\n    return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal(\"]\"));\n  }\n\n  // If we got here, we matched a potential link/image text.\n  // Now we check to see if it's a link/image.\n  is_image = opener->image;\n\n  after_link_text_pos = subj->pos;\n\n  // First, look for an inline link.\n  if (peek_char(subj) == '(' &&\n      ((sps = scan_spacechars(&subj->input, subj->pos + 1)) > -1) &&\n      ((n = manual_scan_link_url(&subj->input, subj->pos + 1 + sps,\n                                 &url_chunk)) > -1)) {\n\n    // try to parse an explicit link:\n    endurl = subj->pos + 1 + sps + n;\n    starttitle = endurl + scan_spacechars(&subj->input, endurl);\n\n    // ensure there are spaces btw url and title\n    endtitle = (starttitle == endurl)\n                   ? starttitle\n                   : starttitle + scan_link_title(&subj->input, starttitle);\n\n    endall = endtitle + scan_spacechars(&subj->input, endtitle);\n\n    if (peek_at(subj, endall) == ')') {\n      subj->pos = endall + 1;\n\n      title_chunk =\n          cmark_chunk_dup(&subj->input, starttitle, endtitle - starttitle);\n      url = cmark_clean_url(subj->mem, &url_chunk);\n      title = cmark_clean_title(subj->mem, &title_chunk);\n      cmark_chunk_free(subj->mem, &url_chunk);\n      cmark_chunk_free(subj->mem, &title_chunk);\n      goto match;\n\n    } else {\n      // it could still be a shortcut reference link\n      subj->pos = after_link_text_pos;\n    }\n  }\n\n  // Next, look for a following [link label] that matches in refmap.\n  // skip spaces\n  raw_label = cmark_chunk_literal(\"\");\n  found_label = link_label(subj, &raw_label);\n  if (!found_label) {\n    // If we have a shortcut reference link, back up\n    // to before the spacse we skipped.\n    subj->pos = initial_pos;\n  }\n\n  if ((!found_label || raw_label.len == 0) && !opener->bracket_after) {\n    cmark_chunk_free(subj->mem, &raw_label);\n    raw_label = cmark_chunk_dup(&subj->input, opener->position,\n                                initial_pos - opener->position - 1);\n    found_label = true;\n  }\n\n  if (found_label) {\n    ref = cmark_reference_lookup(subj->refmap, &raw_label);\n    cmark_chunk_free(subj->mem, &raw_label);\n  }\n\n  if (ref != NULL) { // found\n    url = chunk_clone(subj->mem, &ref->url);\n    title = chunk_clone(subj->mem, &ref->title);\n    goto match;\n  } else {\n    goto noMatch;\n  }\n\nnoMatch:\n  // If we fall through to here, it means we didn't match a link:\n  pop_bracket(subj); // remove this opener from delimiter list\n  subj->pos = initial_pos;\n  return make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal(\"]\"));\n\nmatch:\n  inl = make_simple(subj->mem, is_image ? CMARK_NODE_IMAGE : CMARK_NODE_LINK);\n  inl->as.link.url = url;\n  inl->as.link.title = title;\n  inl->start_line = inl->end_line = subj->line;\n  inl->start_column = opener->inl_text->start_column;\n  inl->end_column = subj->pos + subj->column_offset + subj->block_offset;\n  cmark_node_insert_before(opener->inl_text, inl);\n  // Add link text:\n  tmp = opener->inl_text->next;\n  while (tmp) {\n    tmpnext = tmp->next;\n    cmark_node_append_child(inl, tmp);\n    tmp = tmpnext;\n  }\n\n  // Free the bracket [:\n  cmark_node_free(opener->inl_text);\n\n  process_emphasis(subj, opener->previous_delimiter);\n  pop_bracket(subj);\n\n  // Now, if we have a link, we also want to deactivate earlier link\n  // delimiters. (This code can be removed if we decide to allow links\n  // inside links.)\n  if (!is_image) {\n    opener = subj->last_bracket;\n    while (opener != NULL) {\n      if (!opener->image) {\n        if (!opener->active) {\n          break;\n        } else {\n          opener->active = false;\n        }\n      }\n      opener = opener->previous;\n    }\n  }\n\n  return NULL;\n}\n\n// Parse a hard or soft linebreak, returning an inline.\n// Assumes the subject has a cr or newline at the current position.\nstatic cmark_node *handle_newline(subject *subj) {\n  bufsize_t nlpos = subj->pos;\n  // skip over cr, crlf, or lf:\n  if (peek_at(subj, subj->pos) == '\\r') {\n    advance(subj);\n  }\n  if (peek_at(subj, subj->pos) == '\\n') {\n    advance(subj);\n  }\n  ++subj->line;\n  subj->column_offset = -subj->pos;\n  // skip spaces at beginning of line\n  skip_spaces(subj);\n  if (nlpos > 1 && peek_at(subj, nlpos - 1) == ' ' &&\n      peek_at(subj, nlpos - 2) == ' ') {\n    return make_linebreak(subj->mem);\n  } else {\n    return make_softbreak(subj->mem);\n  }\n}\n\nstatic bufsize_t subject_find_special_char(subject *subj, int options) {\n  // \"\\r\\n\\\\`&_*[]<!\"\n  static const int8_t SPECIAL_CHARS[256] = {\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1,\n      1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};\n\n  // \" ' . -\n  static const char SMART_PUNCT_CHARS[] = {\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n  };\n\n  bufsize_t n = subj->pos + 1;\n\n  while (n < subj->input.len) {\n    if (SPECIAL_CHARS[subj->input.data[n]])\n      return n;\n    if (options & CMARK_OPT_SMART && SMART_PUNCT_CHARS[subj->input.data[n]])\n      return n;\n    n++;\n  }\n\n  return subj->input.len;\n}\n\n// Parse an inline, advancing subject, and add it as a child of parent.\n// Return 0 if no inline can be parsed, 1 otherwise.\nstatic int parse_inline(subject *subj, cmark_node *parent, int options) {\n  cmark_node *new_inl = NULL;\n  cmark_chunk contents;\n  unsigned char c;\n  bufsize_t startpos, endpos;\n  c = peek_char(subj);\n  if (c == 0) {\n    return 0;\n  }\n  switch (c) {\n  case '\\r':\n  case '\\n':\n    new_inl = handle_newline(subj);\n    break;\n  case '`':\n    new_inl = handle_backticks(subj, options);\n    break;\n  case '\\\\':\n    new_inl = handle_backslash(subj);\n    break;\n  case '&':\n    new_inl = handle_entity(subj);\n    break;\n  case '<':\n    new_inl = handle_pointy_brace(subj, options);\n    break;\n  case '*':\n  case '_':\n  case '\\'':\n  case '\"':\n    new_inl = handle_delim(subj, c, (options & CMARK_OPT_SMART) != 0);\n    break;\n  case '-':\n    new_inl = handle_hyphen(subj, (options & CMARK_OPT_SMART) != 0);\n    break;\n  case '.':\n    new_inl = handle_period(subj, (options & CMARK_OPT_SMART) != 0);\n    break;\n  case '[':\n    advance(subj);\n    new_inl = make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal(\"[\"));\n    push_bracket(subj, false, new_inl);\n    break;\n  case ']':\n    new_inl = handle_close_bracket(subj);\n    break;\n  case '!':\n    advance(subj);\n    if (peek_char(subj) == '[') {\n      advance(subj);\n      new_inl = make_str(subj, subj->pos - 2, subj->pos - 1, cmark_chunk_literal(\"![\"));\n      push_bracket(subj, true, new_inl);\n    } else {\n      new_inl = make_str(subj, subj->pos - 1, subj->pos - 1, cmark_chunk_literal(\"!\"));\n    }\n    break;\n  default:\n    endpos = subject_find_special_char(subj, options);\n    contents = cmark_chunk_dup(&subj->input, subj->pos, endpos - subj->pos);\n    startpos = subj->pos;\n    subj->pos = endpos;\n\n    // if we're at a newline, strip trailing spaces.\n    if (S_is_line_end_char(peek_char(subj))) {\n      cmark_chunk_rtrim(&contents);\n    }\n\n    new_inl = make_str(subj, startpos, endpos - 1, contents);\n  }\n  if (new_inl != NULL) {\n    cmark_node_append_child(parent, new_inl);\n  }\n\n  return 1;\n}\n\n// Parse inlines from parent's string_content, adding as children of parent.\nextern void cmark_parse_inlines(cmark_mem *mem, cmark_node *parent,\n                                cmark_reference_map *refmap, int options) {\n  subject subj;\n  cmark_chunk content = {parent->content.ptr, parent->content.size, 0};\n  subject_from_buf(mem, parent->start_line, parent->start_column - 1 + parent->internal_offset, &subj, &content, refmap);\n  cmark_chunk_rtrim(&subj.input);\n\n  while (!is_eof(&subj) && parse_inline(&subj, parent, options))\n    ;\n\n  process_emphasis(&subj, NULL);\n  // free bracket and delim stack\n  while (subj.last_delim) {\n    remove_delimiter(&subj, subj.last_delim);\n  }\n  while (subj.last_bracket) {\n    pop_bracket(&subj);\n  }\n}\n\n// Parse zero or more space characters, including at most one newline.\nstatic void spnl(subject *subj) {\n  skip_spaces(subj);\n  if (skip_line_end(subj)) {\n    skip_spaces(subj);\n  }\n}\n\n// Parse reference.  Assumes string begins with '[' character.\n// Modify refmap if a reference is encountered.\n// Return 0 if no reference found, otherwise position of subject\n// after reference is parsed.\nbufsize_t cmark_parse_reference_inline(cmark_mem *mem, cmark_chunk *input,\n                                       cmark_reference_map *refmap) {\n  subject subj;\n\n  cmark_chunk lab;\n  cmark_chunk url;\n  cmark_chunk title;\n\n  bufsize_t matchlen = 0;\n  bufsize_t beforetitle;\n\n  subject_from_buf(mem, -1, 0, &subj, input, NULL);\n\n  // parse label:\n  if (!link_label(&subj, &lab) || lab.len == 0)\n    return 0;\n\n  // colon:\n  if (peek_char(&subj) == ':') {\n    advance(&subj);\n  } else {\n    return 0;\n  }\n\n  // parse link url:\n  spnl(&subj);\n  if ((matchlen = manual_scan_link_url(&subj.input, subj.pos, &url)) > -1) {\n    subj.pos += matchlen;\n  } else {\n    return 0;\n  }\n\n  // parse optional link_title\n  beforetitle = subj.pos;\n  spnl(&subj);\n  matchlen = subj.pos == beforetitle ? 0 : scan_link_title(&subj.input, subj.pos);\n  if (matchlen) {\n    title = cmark_chunk_dup(&subj.input, subj.pos, matchlen);\n    subj.pos += matchlen;\n  } else {\n    subj.pos = beforetitle;\n    title = cmark_chunk_literal(\"\");\n  }\n\n  // parse final spaces and newline:\n  skip_spaces(&subj);\n  if (!skip_line_end(&subj)) {\n    if (matchlen) { // try rewinding before title\n      subj.pos = beforetitle;\n      skip_spaces(&subj);\n      if (!skip_line_end(&subj)) {\n        return 0;\n      }\n    } else {\n      return 0;\n    }\n  }\n  // insert reference into refmap\n  cmark_reference_create(refmap, &lab, &url, &title);\n  return subj.pos;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/inlines.h",
    "content": "#ifndef CMARK_INLINES_H\n#define CMARK_INLINES_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ncmark_chunk cmark_clean_url(cmark_mem *mem, cmark_chunk *url);\ncmark_chunk cmark_clean_title(cmark_mem *mem, cmark_chunk *title);\n\nvoid cmark_parse_inlines(cmark_mem *mem, cmark_node *parent,\n                         cmark_reference_map *refmap, int options);\n\nbufsize_t cmark_parse_reference_inline(cmark_mem *mem, cmark_chunk *input,\n                                       cmark_reference_map *refmap);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/iterator.c",
    "content": "#include <assert.h>\n#include <stdlib.h>\n\n#include \"config.h\"\n#include \"node.h\"\n#include \"cmark.h\"\n#include \"iterator.h\"\n\nstatic const int S_leaf_mask =\n    (1 << CMARK_NODE_HTML_BLOCK) | (1 << CMARK_NODE_THEMATIC_BREAK) |\n    (1 << CMARK_NODE_CODE_BLOCK) | (1 << CMARK_NODE_TEXT) |\n    (1 << CMARK_NODE_SOFTBREAK) | (1 << CMARK_NODE_LINEBREAK) |\n    (1 << CMARK_NODE_CODE) | (1 << CMARK_NODE_HTML_INLINE);\n\ncmark_iter *cmark_iter_new(cmark_node *root) {\n  if (root == NULL) {\n    return NULL;\n  }\n  cmark_mem *mem = root->content.mem;\n  cmark_iter *iter = (cmark_iter *)mem->calloc(1, sizeof(cmark_iter));\n  iter->mem = mem;\n  iter->root = root;\n  iter->cur.ev_type = CMARK_EVENT_NONE;\n  iter->cur.node = NULL;\n  iter->next.ev_type = CMARK_EVENT_ENTER;\n  iter->next.node = root;\n  return iter;\n}\n\nvoid cmark_iter_free(cmark_iter *iter) { iter->mem->free(iter); }\n\nstatic bool S_is_leaf(cmark_node *node) {\n  return ((1 << node->type) & S_leaf_mask) != 0;\n}\n\ncmark_event_type cmark_iter_next(cmark_iter *iter) {\n  cmark_event_type ev_type = iter->next.ev_type;\n  cmark_node *node = iter->next.node;\n\n  iter->cur.ev_type = ev_type;\n  iter->cur.node = node;\n\n  if (ev_type == CMARK_EVENT_DONE) {\n    return ev_type;\n  }\n\n  /* roll forward to next item, setting both fields */\n  if (ev_type == CMARK_EVENT_ENTER && !S_is_leaf(node)) {\n    if (node->first_child == NULL) {\n      /* stay on this node but exit */\n      iter->next.ev_type = CMARK_EVENT_EXIT;\n    } else {\n      iter->next.ev_type = CMARK_EVENT_ENTER;\n      iter->next.node = node->first_child;\n    }\n  } else if (node == iter->root) {\n    /* don't move past root */\n    iter->next.ev_type = CMARK_EVENT_DONE;\n    iter->next.node = NULL;\n  } else if (node->next) {\n    iter->next.ev_type = CMARK_EVENT_ENTER;\n    iter->next.node = node->next;\n  } else if (node->parent) {\n    iter->next.ev_type = CMARK_EVENT_EXIT;\n    iter->next.node = node->parent;\n  } else {\n    assert(false);\n    iter->next.ev_type = CMARK_EVENT_DONE;\n    iter->next.node = NULL;\n  }\n\n  return ev_type;\n}\n\nvoid cmark_iter_reset(cmark_iter *iter, cmark_node *current,\n                      cmark_event_type event_type) {\n  iter->next.ev_type = event_type;\n  iter->next.node = current;\n  cmark_iter_next(iter);\n}\n\ncmark_node *cmark_iter_get_node(cmark_iter *iter) { return iter->cur.node; }\n\ncmark_event_type cmark_iter_get_event_type(cmark_iter *iter) {\n  return iter->cur.ev_type;\n}\n\ncmark_node *cmark_iter_get_root(cmark_iter *iter) { return iter->root; }\n\nvoid cmark_consolidate_text_nodes(cmark_node *root) {\n  if (root == NULL) {\n    return;\n  }\n  cmark_iter *iter = cmark_iter_new(root);\n  cmark_strbuf buf = CMARK_BUF_INIT(iter->mem);\n  cmark_event_type ev_type;\n  cmark_node *cur, *tmp, *next;\n\n  while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {\n    cur = cmark_iter_get_node(iter);\n    if (ev_type == CMARK_EVENT_ENTER && cur->type == CMARK_NODE_TEXT &&\n        cur->next && cur->next->type == CMARK_NODE_TEXT) {\n      cmark_strbuf_clear(&buf);\n      cmark_strbuf_put(&buf, cur->as.literal.data, cur->as.literal.len);\n      tmp = cur->next;\n      while (tmp && tmp->type == CMARK_NODE_TEXT) {\n        cmark_iter_next(iter); // advance pointer\n        cmark_strbuf_put(&buf, tmp->as.literal.data, tmp->as.literal.len);\n        cur->end_column = tmp->end_column;\n        next = tmp->next;\n        cmark_node_free(tmp);\n        tmp = next;\n      }\n      cmark_chunk_free(iter->mem, &cur->as.literal);\n      cur->as.literal = cmark_chunk_buf_detach(&buf);\n    }\n  }\n\n  cmark_strbuf_free(&buf);\n  cmark_iter_free(iter);\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/iterator.h",
    "content": "#ifndef CMARK_ITERATOR_H\n#define CMARK_ITERATOR_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"cmark.h\"\n\ntypedef struct {\n  cmark_event_type ev_type;\n  cmark_node *node;\n} cmark_iter_state;\n\nstruct cmark_iter {\n  cmark_mem *mem;\n  cmark_node *root;\n  cmark_iter_state cur;\n  cmark_iter_state next;\n};\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/latex.c",
    "content": "#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <assert.h>\n\n#include \"config.h\"\n#include \"cmark.h\"\n#include \"node.h\"\n#include \"buffer.h\"\n#include \"utf8.h\"\n#include \"scanners.h\"\n#include \"render.h\"\n\n#define OUT(s, wrap, escaping) renderer->out(renderer, s, wrap, escaping)\n#define LIT(s) renderer->out(renderer, s, false, LITERAL)\n#define CR() renderer->cr(renderer)\n#define BLANKLINE() renderer->blankline(renderer)\n#define LIST_NUMBER_STRING_SIZE 20\n\nstatic CMARK_INLINE void outc(cmark_renderer *renderer, cmark_escaping escape,\n                              int32_t c, unsigned char nextc) {\n  if (escape == LITERAL) {\n    cmark_render_code_point(renderer, c);\n    return;\n  }\n\n  switch (c) {\n  case 123: // '{'\n  case 125: // '}'\n  case 35:  // '#'\n  case 37:  // '%'\n  case 38:  // '&'\n    cmark_render_ascii(renderer, \"\\\\\");\n    cmark_render_code_point(renderer, c);\n    break;\n  case 36: // '$'\n  case 95: // '_'\n    if (escape == NORMAL) {\n      cmark_render_ascii(renderer, \"\\\\\");\n    }\n    cmark_render_code_point(renderer, c);\n    break;\n  case 45:             // '-'\n    if (nextc == 45) { // prevent ligature\n      cmark_render_ascii(renderer, \"-{}\");\n    } else {\n      cmark_render_ascii(renderer, \"-\");\n    }\n    break;\n  case 126: // '~'\n    if (escape == NORMAL) {\n      cmark_render_ascii(renderer, \"\\\\textasciitilde{}\");\n    } else {\n      cmark_render_code_point(renderer, c);\n    }\n    break;\n  case 94: // '^'\n    cmark_render_ascii(renderer, \"\\\\^{}\");\n    break;\n  case 92: // '\\\\'\n    if (escape == URL) {\n      // / acts as path sep even on windows:\n      cmark_render_ascii(renderer, \"/\");\n    } else {\n      cmark_render_ascii(renderer, \"\\\\textbackslash{}\");\n    }\n    break;\n  case 124: // '|'\n    cmark_render_ascii(renderer, \"\\\\textbar{}\");\n    break;\n  case 60: // '<'\n    cmark_render_ascii(renderer, \"\\\\textless{}\");\n    break;\n  case 62: // '>'\n    cmark_render_ascii(renderer, \"\\\\textgreater{}\");\n    break;\n  case 91: // '['\n  case 93: // ']'\n    cmark_render_ascii(renderer, \"{\");\n    cmark_render_code_point(renderer, c);\n    cmark_render_ascii(renderer, \"}\");\n    break;\n  case 34: // '\"'\n    cmark_render_ascii(renderer, \"\\\\textquotedbl{}\");\n    // requires \\usepackage[T1]{fontenc}\n    break;\n  case 39: // '\\''\n    cmark_render_ascii(renderer, \"\\\\textquotesingle{}\");\n    // requires \\usepackage{textcomp}\n    break;\n  case 160: // nbsp\n    cmark_render_ascii(renderer, \"~\");\n    break;\n  case 8230: // hellip\n    cmark_render_ascii(renderer, \"\\\\ldots{}\");\n    break;\n  case 8216: // lsquo\n    if (escape == NORMAL) {\n      cmark_render_ascii(renderer, \"`\");\n    } else {\n      cmark_render_code_point(renderer, c);\n    }\n    break;\n  case 8217: // rsquo\n    if (escape == NORMAL) {\n      cmark_render_ascii(renderer, \"\\'\");\n    } else {\n      cmark_render_code_point(renderer, c);\n    }\n    break;\n  case 8220: // ldquo\n    if (escape == NORMAL) {\n      cmark_render_ascii(renderer, \"``\");\n    } else {\n      cmark_render_code_point(renderer, c);\n    }\n    break;\n  case 8221: // rdquo\n    if (escape == NORMAL) {\n      cmark_render_ascii(renderer, \"''\");\n    } else {\n      cmark_render_code_point(renderer, c);\n    }\n    break;\n  case 8212: // emdash\n    if (escape == NORMAL) {\n      cmark_render_ascii(renderer, \"---\");\n    } else {\n      cmark_render_code_point(renderer, c);\n    }\n    break;\n  case 8211: // endash\n    if (escape == NORMAL) {\n      cmark_render_ascii(renderer, \"--\");\n    } else {\n      cmark_render_code_point(renderer, c);\n    }\n    break;\n  default:\n    cmark_render_code_point(renderer, c);\n  }\n}\n\ntypedef enum {\n  NO_LINK,\n  URL_AUTOLINK,\n  EMAIL_AUTOLINK,\n  NORMAL_LINK,\n  INTERNAL_LINK\n} link_type;\n\nstatic link_type get_link_type(cmark_node *node) {\n  size_t title_len, url_len;\n  cmark_node *link_text;\n  char *realurl;\n  int realurllen;\n  bool isemail = false;\n\n  if (node->type != CMARK_NODE_LINK) {\n    return NO_LINK;\n  }\n\n  const char *url = cmark_node_get_url(node);\n  cmark_chunk url_chunk = cmark_chunk_literal(url);\n\n  if (url && *url == '#') {\n    return INTERNAL_LINK;\n  }\n\n  url_len = strlen(url);\n  if (url_len == 0 || scan_scheme(&url_chunk, 0) == 0) {\n    return NO_LINK;\n  }\n\n  const char *title = cmark_node_get_title(node);\n  title_len = strlen(title);\n  // if it has a title, we can't treat it as an autolink:\n  if (title_len == 0) {\n\n    link_text = node->first_child;\n    cmark_consolidate_text_nodes(link_text);\n\n    if (!link_text)\n      return NO_LINK;\n\n    realurl = (char *)url;\n    realurllen = (int)url_len;\n    if (strncmp(realurl, \"mailto:\", 7) == 0) {\n      realurl += 7;\n      realurllen -= 7;\n      isemail = true;\n    }\n    if (realurllen == link_text->as.literal.len &&\n        strncmp(realurl, (char *)link_text->as.literal.data,\n                link_text->as.literal.len) == 0) {\n      if (isemail) {\n        return EMAIL_AUTOLINK;\n      } else {\n        return URL_AUTOLINK;\n      }\n    }\n  }\n\n  return NORMAL_LINK;\n}\n\nstatic int S_get_enumlevel(cmark_node *node) {\n  int enumlevel = 0;\n  cmark_node *tmp = node;\n  while (tmp) {\n    if (tmp->type == CMARK_NODE_LIST &&\n        cmark_node_get_list_type(node) == CMARK_ORDERED_LIST) {\n      enumlevel++;\n    }\n    tmp = tmp->parent;\n  }\n  return enumlevel;\n}\n\nstatic int S_render_node(cmark_renderer *renderer, cmark_node *node,\n                         cmark_event_type ev_type, int options) {\n  int list_number;\n  int enumlevel;\n  char list_number_string[LIST_NUMBER_STRING_SIZE];\n  bool entering = (ev_type == CMARK_EVENT_ENTER);\n  cmark_list_type list_type;\n  bool allow_wrap = renderer->width > 0 && !(CMARK_OPT_NOBREAKS & options);\n\n  // avoid warning about unused parameter:\n  (void)(options);\n\n  switch (node->type) {\n  case CMARK_NODE_DOCUMENT:\n    break;\n\n  case CMARK_NODE_BLOCK_QUOTE:\n    if (entering) {\n      LIT(\"\\\\begin{quote}\");\n      CR();\n    } else {\n      LIT(\"\\\\end{quote}\");\n      BLANKLINE();\n    }\n    break;\n\n  case CMARK_NODE_LIST:\n    list_type = cmark_node_get_list_type(node);\n    if (entering) {\n      LIT(\"\\\\begin{\");\n      LIT(list_type == CMARK_ORDERED_LIST ? \"enumerate\" : \"itemize\");\n      LIT(\"}\");\n      CR();\n      list_number = cmark_node_get_list_start(node);\n      if (list_number > 1) {\n        enumlevel = S_get_enumlevel(node);\n        // latex normally supports only five levels\n        if (enumlevel >= 1 && enumlevel <= 5) {\n          snprintf(list_number_string, LIST_NUMBER_STRING_SIZE, \"%d\",\n                   list_number);\n          LIT(\"\\\\setcounter{enum\");\n          switch (enumlevel) {\n          case 1: LIT(\"i\"); break;\n          case 2: LIT(\"ii\"); break;\n          case 3: LIT(\"iii\"); break;\n          case 4: LIT(\"iv\"); break;\n          case 5: LIT(\"v\"); break;\n          default: LIT(\"i\"); break;\n\t  }\n          LIT(\"}{\");\n          OUT(list_number_string, false, NORMAL);\n          LIT(\"}\");\n        }\n        CR();\n      }\n    } else {\n      LIT(\"\\\\end{\");\n      LIT(list_type == CMARK_ORDERED_LIST ? \"enumerate\" : \"itemize\");\n      LIT(\"}\");\n      BLANKLINE();\n    }\n    break;\n\n  case CMARK_NODE_ITEM:\n    if (entering) {\n      LIT(\"\\\\item \");\n    } else {\n      CR();\n    }\n    break;\n\n  case CMARK_NODE_HEADING:\n    if (entering) {\n      switch (cmark_node_get_heading_level(node)) {\n      case 1:\n        LIT(\"\\\\section\");\n        break;\n      case 2:\n        LIT(\"\\\\subsection\");\n        break;\n      case 3:\n        LIT(\"\\\\subsubsection\");\n        break;\n      case 4:\n        LIT(\"\\\\paragraph\");\n        break;\n      case 5:\n        LIT(\"\\\\subparagraph\");\n        break;\n      }\n      LIT(\"{\");\n    } else {\n      LIT(\"}\");\n      BLANKLINE();\n    }\n    break;\n\n  case CMARK_NODE_CODE_BLOCK:\n    CR();\n    LIT(\"\\\\begin{verbatim}\");\n    CR();\n    OUT(cmark_node_get_literal(node), false, LITERAL);\n    CR();\n    LIT(\"\\\\end{verbatim}\");\n    BLANKLINE();\n    break;\n\n  case CMARK_NODE_HTML_BLOCK:\n    break;\n\n  case CMARK_NODE_CUSTOM_BLOCK:\n    CR();\n    OUT(entering ? cmark_node_get_on_enter(node) : cmark_node_get_on_exit(node),\n        false, LITERAL);\n    CR();\n    break;\n\n  case CMARK_NODE_THEMATIC_BREAK:\n    BLANKLINE();\n    LIT(\"\\\\begin{center}\\\\rule{0.5\\\\linewidth}{\\\\linethickness}\\\\end{center}\");\n    BLANKLINE();\n    break;\n\n  case CMARK_NODE_PARAGRAPH:\n    if (!entering) {\n      BLANKLINE();\n    }\n    break;\n\n  case CMARK_NODE_TEXT:\n    OUT(cmark_node_get_literal(node), allow_wrap, NORMAL);\n    break;\n\n  case CMARK_NODE_LINEBREAK:\n    LIT(\"\\\\\\\\\");\n    CR();\n    break;\n\n  case CMARK_NODE_SOFTBREAK:\n    if (options & CMARK_OPT_HARDBREAKS) {\n      LIT(\"\\\\\\\\\");\n      CR();\n    } else if (renderer->width == 0 && !(CMARK_OPT_NOBREAKS & options)) {\n      CR();\n    } else {\n      OUT(\" \", allow_wrap, NORMAL);\n    }\n    break;\n\n  case CMARK_NODE_CODE:\n    LIT(\"\\\\texttt{\");\n    OUT(cmark_node_get_literal(node), false, NORMAL);\n    LIT(\"}\");\n    break;\n\n  case CMARK_NODE_HTML_INLINE:\n    break;\n\n  case CMARK_NODE_CUSTOM_INLINE:\n    OUT(entering ? cmark_node_get_on_enter(node) : cmark_node_get_on_exit(node),\n        false, LITERAL);\n    break;\n\n  case CMARK_NODE_STRONG:\n    if (entering) {\n      LIT(\"\\\\textbf{\");\n    } else {\n      LIT(\"}\");\n    }\n    break;\n\n  case CMARK_NODE_EMPH:\n    if (entering) {\n      LIT(\"\\\\emph{\");\n    } else {\n      LIT(\"}\");\n    }\n    break;\n\n  case CMARK_NODE_LINK:\n    if (entering) {\n      const char *url = cmark_node_get_url(node);\n      // requires \\usepackage{hyperref}\n      switch (get_link_type(node)) {\n      case URL_AUTOLINK:\n        LIT(\"\\\\url{\");\n        OUT(url, false, URL);\n        LIT(\"}\");\n        return 0; // Don't process further nodes to avoid double-rendering artefacts\n      case EMAIL_AUTOLINK:\n        LIT(\"\\\\href{\");\n        OUT(url, false, URL);\n        LIT(\"}\\\\nolinkurl{\");\n        break;\n      case NORMAL_LINK:\n        LIT(\"\\\\href{\");\n        OUT(url, false, URL);\n        LIT(\"}{\");\n        break;\n      case INTERNAL_LINK:\n        LIT(\"\\\\protect\\\\hyperlink{\");\n        OUT(url + 1, false, URL);\n        LIT(\"}{\");\n        break;\n      case NO_LINK:\n        LIT(\"{\"); // error?\n      }\n    } else {\n      LIT(\"}\");\n    }\n\n    break;\n\n  case CMARK_NODE_IMAGE:\n    if (entering) {\n      LIT(\"\\\\protect\\\\includegraphics{\");\n      // requires \\include{graphicx}\n      OUT(cmark_node_get_url(node), false, URL);\n      LIT(\"}\");\n      return 0;\n    }\n    break;\n\n  default:\n    assert(false);\n    break;\n  }\n\n  return 1;\n}\n\nchar *cmark_render_latex(cmark_node *root, int options, int width) {\n  return cmark_render(root, options, width, outc, S_render_node);\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/libcmark.pc.in",
    "content": "prefix=@CMAKE_INSTALL_PREFIX@\nexec_prefix=@CMAKE_INSTALL_PREFIX@\nlibdir=@CMAKE_INSTALL_PREFIX@/@libdir@\nincludedir=@CMAKE_INSTALL_PREFIX@/include\n\nName: libcmark\nDescription: CommonMark parsing, rendering, and manipulation\nVersion: @PROJECT_VERSION@\nLibs: -L${libdir} -lcmark\nCflags: -I${includedir}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/main.c",
    "content": "#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <errno.h>\n#include \"config.h\"\n#include \"cmark.h\"\n#include \"node.h\"\n\n#if defined(__OpenBSD__)\n#  include <sys/param.h>\n#  if OpenBSD >= 201605\n#    define USE_PLEDGE\n#    include <unistd.h>\n#  endif\n#endif\n\n#if defined(_WIN32) && !defined(__CYGWIN__)\n#include <io.h>\n#include <fcntl.h>\n#endif\n\ntypedef enum {\n  FORMAT_NONE,\n  FORMAT_HTML,\n  FORMAT_XML,\n  FORMAT_MAN,\n  FORMAT_COMMONMARK,\n  FORMAT_LATEX\n} writer_format;\n\nvoid print_usage() {\n  printf(\"Usage:   cmark [FILE*]\\n\");\n  printf(\"Options:\\n\");\n  printf(\"  --to, -t FORMAT  Specify output format (html, xml, man, \"\n         \"commonmark, latex)\\n\");\n  printf(\"  --width WIDTH    Specify wrap width (default 0 = nowrap)\\n\");\n  printf(\"  --sourcepos      Include source position attribute\\n\");\n  printf(\"  --hardbreaks     Treat newlines as hard line breaks\\n\");\n  printf(\"  --nobreaks       Render soft line breaks as spaces\\n\");\n  printf(\"  --unsafe         Render raw HTML and dangerous URLs\\n\");\n  printf(\"  --smart          Use smart punctuation\\n\");\n  printf(\"  --validate-utf8  Replace UTF-8 invalid sequences with U+FFFD\\n\");\n  printf(\"  --help, -h       Print usage information\\n\");\n  printf(\"  --version        Print version\\n\");\n}\n\nstatic void print_document(cmark_node *document, writer_format writer,\n                           int options, int width) {\n  char *result;\n\n  switch (writer) {\n  case FORMAT_HTML:\n    result = cmark_render_html(document, options);\n    break;\n  case FORMAT_XML:\n    result = cmark_render_xml(document, options);\n    break;\n  case FORMAT_MAN:\n    result = cmark_render_man(document, options, width);\n    break;\n  case FORMAT_COMMONMARK:\n    result = cmark_render_commonmark(document, options, width);\n    break;\n  case FORMAT_LATEX:\n    result = cmark_render_latex(document, options, width);\n    break;\n  default:\n    fprintf(stderr, \"Unknown format %d\\n\", writer);\n    exit(1);\n  }\n  printf(\"%s\", result);\n  cmark_node_mem(document)->free(result);\n}\n\nint main(int argc, char *argv[]) {\n  int i, numfps = 0;\n  int *files;\n  char buffer[4096];\n  cmark_parser *parser;\n  size_t bytes;\n  cmark_node *document;\n  int width = 0;\n  char *unparsed;\n  writer_format writer = FORMAT_HTML;\n  int options = CMARK_OPT_DEFAULT;\n\n#ifdef USE_PLEDGE\n  if (pledge(\"stdio rpath\", NULL) != 0) {\n    perror(\"pledge\");\n    return 1;\n  }\n#endif\n\n#if defined(_WIN32) && !defined(__CYGWIN__)\n  _setmode(_fileno(stdin), _O_BINARY);\n  _setmode(_fileno(stdout), _O_BINARY);\n#endif\n\n  files = (int *)calloc(argc, sizeof(*files));\n\n  for (i = 1; i < argc; i++) {\n    if (strcmp(argv[i], \"--version\") == 0) {\n      printf(\"cmark %s\", CMARK_VERSION_STRING);\n      printf(\" - CommonMark converter\\n(C) 2014-2016 John MacFarlane\\n\");\n      exit(0);\n    } else if (strcmp(argv[i], \"--sourcepos\") == 0) {\n      options |= CMARK_OPT_SOURCEPOS;\n    } else if (strcmp(argv[i], \"--hardbreaks\") == 0) {\n      options |= CMARK_OPT_HARDBREAKS;\n    } else if (strcmp(argv[i], \"--nobreaks\") == 0) {\n      options |= CMARK_OPT_NOBREAKS;\n    } else if (strcmp(argv[i], \"--smart\") == 0) {\n      options |= CMARK_OPT_SMART;\n    } else if (strcmp(argv[i], \"--unsafe\") == 0) {\n      options |= CMARK_OPT_UNSAFE;\n    } else if (strcmp(argv[i], \"--validate-utf8\") == 0) {\n      options |= CMARK_OPT_VALIDATE_UTF8;\n    } else if ((strcmp(argv[i], \"--help\") == 0) ||\n               (strcmp(argv[i], \"-h\") == 0)) {\n      print_usage();\n      exit(0);\n    } else if (strcmp(argv[i], \"--width\") == 0) {\n      i += 1;\n      if (i < argc) {\n        width = (int)strtol(argv[i], &unparsed, 10);\n        if (unparsed && strlen(unparsed) > 0) {\n          fprintf(stderr, \"failed parsing width '%s' at '%s'\\n\", argv[i],\n                  unparsed);\n          exit(1);\n        }\n      } else {\n        fprintf(stderr, \"--width requires an argument\\n\");\n        exit(1);\n      }\n    } else if ((strcmp(argv[i], \"-t\") == 0) || (strcmp(argv[i], \"--to\") == 0)) {\n      i += 1;\n      if (i < argc) {\n        if (strcmp(argv[i], \"man\") == 0) {\n          writer = FORMAT_MAN;\n        } else if (strcmp(argv[i], \"html\") == 0) {\n          writer = FORMAT_HTML;\n        } else if (strcmp(argv[i], \"xml\") == 0) {\n          writer = FORMAT_XML;\n        } else if (strcmp(argv[i], \"commonmark\") == 0) {\n          writer = FORMAT_COMMONMARK;\n        } else if (strcmp(argv[i], \"latex\") == 0) {\n          writer = FORMAT_LATEX;\n        } else {\n          fprintf(stderr, \"Unknown format %s\\n\", argv[i]);\n          exit(1);\n        }\n      } else {\n        fprintf(stderr, \"No argument provided for %s\\n\", argv[i - 1]);\n        exit(1);\n      }\n    } else if (*argv[i] == '-') {\n      print_usage();\n      exit(1);\n    } else { // treat as file argument\n      files[numfps++] = i;\n    }\n  }\n\n  parser = cmark_parser_new(options);\n  for (i = 0; i < numfps; i++) {\n    FILE *fp = fopen(argv[files[i]], \"rb\");\n    if (fp == NULL) {\n      fprintf(stderr, \"Error opening file %s: %s\\n\", argv[files[i]],\n              strerror(errno));\n      exit(1);\n    }\n\n    while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) {\n      cmark_parser_feed(parser, buffer, bytes);\n      if (bytes < sizeof(buffer)) {\n        break;\n      }\n    }\n\n    fclose(fp);\n  }\n\n  if (numfps == 0) {\n\n    while ((bytes = fread(buffer, 1, sizeof(buffer), stdin)) > 0) {\n      cmark_parser_feed(parser, buffer, bytes);\n      if (bytes < sizeof(buffer)) {\n        break;\n      }\n    }\n  }\n\n#ifdef USE_PLEDGE\n  if (pledge(\"stdio\", NULL) != 0) {\n    perror(\"pledge\");\n    return 1;\n  }\n#endif\n\n  document = cmark_parser_finish(parser);\n  cmark_parser_free(parser);\n\n  print_document(document, writer, options, width);\n\n  cmark_node_free(document);\n\n  free(files);\n\n  return 0;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/man.c",
    "content": "#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <assert.h>\n\n#include \"config.h\"\n#include \"cmark.h\"\n#include \"node.h\"\n#include \"buffer.h\"\n#include \"utf8.h\"\n#include \"render.h\"\n\n#define OUT(s, wrap, escaping) renderer->out(renderer, s, wrap, escaping)\n#define LIT(s) renderer->out(renderer, s, false, LITERAL)\n#define CR() renderer->cr(renderer)\n#define BLANKLINE() renderer->blankline(renderer)\n#define LIST_NUMBER_SIZE 20\n\n// Functions to convert cmark_nodes to groff man strings.\nstatic void S_outc(cmark_renderer *renderer, cmark_escaping escape, int32_t c,\n                   unsigned char nextc) {\n  (void)(nextc);\n\n  if (escape == LITERAL) {\n    cmark_render_code_point(renderer, c);\n    return;\n  }\n\n  switch (c) {\n  case 46:\n    if (renderer->begin_line) {\n      cmark_render_ascii(renderer, \"\\\\&.\");\n    } else {\n      cmark_render_code_point(renderer, c);\n    }\n    break;\n  case 39:\n    if (renderer->begin_line) {\n      cmark_render_ascii(renderer, \"\\\\&'\");\n    } else {\n      cmark_render_code_point(renderer, c);\n    }\n    break;\n  case 45:\n    cmark_render_ascii(renderer, \"\\\\-\");\n    break;\n  case 92:\n    cmark_render_ascii(renderer, \"\\\\e\");\n    break;\n  case 8216: // left single quote\n    cmark_render_ascii(renderer, \"\\\\[oq]\");\n    break;\n  case 8217: // right single quote\n    cmark_render_ascii(renderer, \"\\\\[cq]\");\n    break;\n  case 8220: // left double quote\n    cmark_render_ascii(renderer, \"\\\\[lq]\");\n    break;\n  case 8221: // right double quote\n    cmark_render_ascii(renderer, \"\\\\[rq]\");\n    break;\n  case 8212: // em dash\n    cmark_render_ascii(renderer, \"\\\\[em]\");\n    break;\n  case 8211: // en dash\n    cmark_render_ascii(renderer, \"\\\\[en]\");\n    break;\n  default:\n    cmark_render_code_point(renderer, c);\n  }\n}\n\nstatic int S_render_node(cmark_renderer *renderer, cmark_node *node,\n                         cmark_event_type ev_type, int options) {\n  cmark_node *tmp;\n  int list_number;\n  bool entering = (ev_type == CMARK_EVENT_ENTER);\n  bool allow_wrap = renderer->width > 0 && !(CMARK_OPT_NOBREAKS & options);\n\n  // avoid unused parameter error:\n  (void)(options);\n\n  switch (node->type) {\n  case CMARK_NODE_DOCUMENT:\n    break;\n\n  case CMARK_NODE_BLOCK_QUOTE:\n    if (entering) {\n      CR();\n      LIT(\".RS\");\n      CR();\n    } else {\n      CR();\n      LIT(\".RE\");\n      CR();\n    }\n    break;\n\n  case CMARK_NODE_LIST:\n    break;\n\n  case CMARK_NODE_ITEM:\n    if (entering) {\n      CR();\n      LIT(\".IP \");\n      if (cmark_node_get_list_type(node->parent) == CMARK_BULLET_LIST) {\n        LIT(\"\\\\[bu] 2\");\n      } else {\n        list_number = cmark_node_get_list_start(node->parent);\n        tmp = node;\n        while (tmp->prev) {\n          tmp = tmp->prev;\n          list_number += 1;\n        }\n        char list_number_s[LIST_NUMBER_SIZE];\n        snprintf(list_number_s, LIST_NUMBER_SIZE, \"\\\"%d.\\\" 4\", list_number);\n        LIT(list_number_s);\n      }\n      CR();\n    } else {\n      CR();\n    }\n    break;\n\n  case CMARK_NODE_HEADING:\n    if (entering) {\n      CR();\n      LIT(cmark_node_get_heading_level(node) == 1 ? \".SH\" : \".SS\");\n      CR();\n    } else {\n      CR();\n    }\n    break;\n\n  case CMARK_NODE_CODE_BLOCK:\n    CR();\n    LIT(\".IP\\n.nf\\n\\\\f[C]\\n\");\n    OUT(cmark_node_get_literal(node), false, NORMAL);\n    CR();\n    LIT(\"\\\\f[]\\n.fi\");\n    CR();\n    break;\n\n  case CMARK_NODE_HTML_BLOCK:\n    break;\n\n  case CMARK_NODE_CUSTOM_BLOCK:\n    CR();\n    OUT(entering ? cmark_node_get_on_enter(node) : cmark_node_get_on_exit(node),\n        false, LITERAL);\n    CR();\n    break;\n\n  case CMARK_NODE_THEMATIC_BREAK:\n    CR();\n    LIT(\".PP\\n  *  *  *  *  *\");\n    CR();\n    break;\n\n  case CMARK_NODE_PARAGRAPH:\n    if (entering) {\n      // no blank line if first paragraph in list:\n      if (node->parent && node->parent->type == CMARK_NODE_ITEM &&\n          node->prev == NULL) {\n        // no blank line or .PP\n      } else {\n        CR();\n        LIT(\".PP\");\n        CR();\n      }\n    } else {\n      CR();\n    }\n    break;\n\n  case CMARK_NODE_TEXT:\n    OUT(cmark_node_get_literal(node), allow_wrap, NORMAL);\n    break;\n\n  case CMARK_NODE_LINEBREAK:\n    LIT(\".PD 0\\n.P\\n.PD\");\n    CR();\n    break;\n\n  case CMARK_NODE_SOFTBREAK:\n    if (options & CMARK_OPT_HARDBREAKS) {\n      LIT(\".PD 0\\n.P\\n.PD\");\n      CR();\n    } else if (renderer->width == 0 && !(CMARK_OPT_NOBREAKS & options)) {\n      CR();\n    } else {\n      OUT(\" \", allow_wrap, LITERAL);\n    }\n    break;\n\n  case CMARK_NODE_CODE:\n    LIT(\"\\\\f[C]\");\n    OUT(cmark_node_get_literal(node), allow_wrap, NORMAL);\n    LIT(\"\\\\f[]\");\n    break;\n\n  case CMARK_NODE_HTML_INLINE:\n    break;\n\n  case CMARK_NODE_CUSTOM_INLINE:\n    OUT(entering ? cmark_node_get_on_enter(node) : cmark_node_get_on_exit(node),\n        false, LITERAL);\n    break;\n\n  case CMARK_NODE_STRONG:\n    if (entering) {\n      LIT(\"\\\\f[B]\");\n    } else {\n      LIT(\"\\\\f[]\");\n    }\n    break;\n\n  case CMARK_NODE_EMPH:\n    if (entering) {\n      LIT(\"\\\\f[I]\");\n    } else {\n      LIT(\"\\\\f[]\");\n    }\n    break;\n\n  case CMARK_NODE_LINK:\n    if (!entering) {\n      LIT(\" (\");\n      OUT(cmark_node_get_url(node), allow_wrap, URL);\n      LIT(\")\");\n    }\n    break;\n\n  case CMARK_NODE_IMAGE:\n    if (entering) {\n      LIT(\"[IMAGE: \");\n    } else {\n      LIT(\"]\");\n    }\n    break;\n\n  default:\n    assert(false);\n    break;\n  }\n\n  return 1;\n}\n\nchar *cmark_render_man(cmark_node *root, int options, int width) {\n  return cmark_render(root, options, width, S_outc, S_render_node);\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/node.c",
    "content": "#include <stdlib.h>\n#include <string.h>\n\n#include \"config.h\"\n#include \"node.h\"\n\nstatic void S_node_unlink(cmark_node *node);\n\n#define NODE_MEM(node) cmark_node_mem(node)\n\nstatic CMARK_INLINE bool S_is_block(cmark_node *node) {\n  if (node == NULL) {\n    return false;\n  }\n  return node->type >= CMARK_NODE_FIRST_BLOCK &&\n         node->type <= CMARK_NODE_LAST_BLOCK;\n}\n\nstatic CMARK_INLINE bool S_is_inline(cmark_node *node) {\n  if (node == NULL) {\n    return false;\n  }\n  return node->type >= CMARK_NODE_FIRST_INLINE &&\n         node->type <= CMARK_NODE_LAST_INLINE;\n}\n\nstatic bool S_can_contain(cmark_node *node, cmark_node *child) {\n  cmark_node *cur;\n\n  if (node == NULL || child == NULL) {\n    return false;\n  }\n\n  // Verify that child is not an ancestor of node or equal to node.\n  cur = node;\n  do {\n    if (cur == child) {\n      return false;\n    }\n    cur = cur->parent;\n  } while (cur != NULL);\n\n  if (child->type == CMARK_NODE_DOCUMENT) {\n    return false;\n  }\n\n  switch (node->type) {\n  case CMARK_NODE_DOCUMENT:\n  case CMARK_NODE_BLOCK_QUOTE:\n  case CMARK_NODE_ITEM:\n    return S_is_block(child) && child->type != CMARK_NODE_ITEM;\n\n  case CMARK_NODE_LIST:\n    return child->type == CMARK_NODE_ITEM;\n\n  case CMARK_NODE_CUSTOM_BLOCK:\n    return true;\n\n  case CMARK_NODE_PARAGRAPH:\n  case CMARK_NODE_HEADING:\n  case CMARK_NODE_EMPH:\n  case CMARK_NODE_STRONG:\n  case CMARK_NODE_LINK:\n  case CMARK_NODE_IMAGE:\n  case CMARK_NODE_CUSTOM_INLINE:\n    return S_is_inline(child);\n\n  default:\n    break;\n  }\n\n  return false;\n}\n\ncmark_node *cmark_node_new_with_mem(cmark_node_type type, cmark_mem *mem) {\n  cmark_node *node = (cmark_node *)mem->calloc(1, sizeof(*node));\n  cmark_strbuf_init(mem, &node->content, 0);\n  node->type = (uint16_t)type;\n\n  switch (node->type) {\n  case CMARK_NODE_HEADING:\n    node->as.heading.level = 1;\n    break;\n\n  case CMARK_NODE_LIST: {\n    cmark_list *list = &node->as.list;\n    list->list_type = CMARK_BULLET_LIST;\n    list->start = 0;\n    list->tight = false;\n    break;\n  }\n\n  default:\n    break;\n  }\n\n  return node;\n}\n\ncmark_node *cmark_node_new(cmark_node_type type) {\n  extern cmark_mem DEFAULT_MEM_ALLOCATOR;\n  return cmark_node_new_with_mem(type, &DEFAULT_MEM_ALLOCATOR);\n}\n\n// Free a cmark_node list and any children.\nstatic void S_free_nodes(cmark_node *e) {\n  cmark_node *next;\n  while (e != NULL) {\n    cmark_strbuf_free(&e->content);\n    switch (e->type) {\n    case CMARK_NODE_CODE_BLOCK:\n      cmark_chunk_free(NODE_MEM(e), &e->as.code.info);\n      cmark_chunk_free(NODE_MEM(e), &e->as.code.literal);\n      break;\n    case CMARK_NODE_TEXT:\n    case CMARK_NODE_HTML_INLINE:\n    case CMARK_NODE_CODE:\n    case CMARK_NODE_HTML_BLOCK:\n      cmark_chunk_free(NODE_MEM(e), &e->as.literal);\n      break;\n    case CMARK_NODE_LINK:\n    case CMARK_NODE_IMAGE:\n      cmark_chunk_free(NODE_MEM(e), &e->as.link.url);\n      cmark_chunk_free(NODE_MEM(e), &e->as.link.title);\n      break;\n    case CMARK_NODE_CUSTOM_BLOCK:\n    case CMARK_NODE_CUSTOM_INLINE:\n      cmark_chunk_free(NODE_MEM(e), &e->as.custom.on_enter);\n      cmark_chunk_free(NODE_MEM(e), &e->as.custom.on_exit);\n      break;\n    default:\n      break;\n    }\n    if (e->last_child) {\n      // Splice children into list\n      e->last_child->next = e->next;\n      e->next = e->first_child;\n    }\n    next = e->next;\n    NODE_MEM(e)->free(e);\n    e = next;\n  }\n}\n\nvoid cmark_node_free(cmark_node *node) {\n  S_node_unlink(node);\n  node->next = NULL;\n  S_free_nodes(node);\n}\n\ncmark_node_type cmark_node_get_type(cmark_node *node) {\n  if (node == NULL) {\n    return CMARK_NODE_NONE;\n  } else {\n    return (cmark_node_type)node->type;\n  }\n}\n\nconst char *cmark_node_get_type_string(cmark_node *node) {\n  if (node == NULL) {\n    return \"NONE\";\n  }\n\n  switch (node->type) {\n  case CMARK_NODE_NONE:\n    return \"none\";\n  case CMARK_NODE_DOCUMENT:\n    return \"document\";\n  case CMARK_NODE_BLOCK_QUOTE:\n    return \"block_quote\";\n  case CMARK_NODE_LIST:\n    return \"list\";\n  case CMARK_NODE_ITEM:\n    return \"item\";\n  case CMARK_NODE_CODE_BLOCK:\n    return \"code_block\";\n  case CMARK_NODE_HTML_BLOCK:\n    return \"html_block\";\n  case CMARK_NODE_CUSTOM_BLOCK:\n    return \"custom_block\";\n  case CMARK_NODE_PARAGRAPH:\n    return \"paragraph\";\n  case CMARK_NODE_HEADING:\n    return \"heading\";\n  case CMARK_NODE_THEMATIC_BREAK:\n    return \"thematic_break\";\n  case CMARK_NODE_TEXT:\n    return \"text\";\n  case CMARK_NODE_SOFTBREAK:\n    return \"softbreak\";\n  case CMARK_NODE_LINEBREAK:\n    return \"linebreak\";\n  case CMARK_NODE_CODE:\n    return \"code\";\n  case CMARK_NODE_HTML_INLINE:\n    return \"html_inline\";\n  case CMARK_NODE_CUSTOM_INLINE:\n    return \"custom_inline\";\n  case CMARK_NODE_EMPH:\n    return \"emph\";\n  case CMARK_NODE_STRONG:\n    return \"strong\";\n  case CMARK_NODE_LINK:\n    return \"link\";\n  case CMARK_NODE_IMAGE:\n    return \"image\";\n  }\n\n  return \"<unknown>\";\n}\n\ncmark_node *cmark_node_next(cmark_node *node) {\n  if (node == NULL) {\n    return NULL;\n  } else {\n    return node->next;\n  }\n}\n\ncmark_node *cmark_node_previous(cmark_node *node) {\n  if (node == NULL) {\n    return NULL;\n  } else {\n    return node->prev;\n  }\n}\n\ncmark_node *cmark_node_parent(cmark_node *node) {\n  if (node == NULL) {\n    return NULL;\n  } else {\n    return node->parent;\n  }\n}\n\ncmark_node *cmark_node_first_child(cmark_node *node) {\n  if (node == NULL) {\n    return NULL;\n  } else {\n    return node->first_child;\n  }\n}\n\ncmark_node *cmark_node_last_child(cmark_node *node) {\n  if (node == NULL) {\n    return NULL;\n  } else {\n    return node->last_child;\n  }\n}\n\nvoid *cmark_node_get_user_data(cmark_node *node) {\n  if (node == NULL) {\n    return NULL;\n  } else {\n    return node->user_data;\n  }\n}\n\nint cmark_node_set_user_data(cmark_node *node, void *user_data) {\n  if (node == NULL) {\n    return 0;\n  }\n  node->user_data = user_data;\n  return 1;\n}\n\nconst char *cmark_node_get_literal(cmark_node *node) {\n  if (node == NULL) {\n    return NULL;\n  }\n\n  switch (node->type) {\n  case CMARK_NODE_HTML_BLOCK:\n  case CMARK_NODE_TEXT:\n  case CMARK_NODE_HTML_INLINE:\n  case CMARK_NODE_CODE:\n    return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.literal);\n\n  case CMARK_NODE_CODE_BLOCK:\n    return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.code.literal);\n\n  default:\n    break;\n  }\n\n  return NULL;\n}\n\nint cmark_node_set_literal(cmark_node *node, const char *content) {\n  if (node == NULL) {\n    return 0;\n  }\n\n  switch (node->type) {\n  case CMARK_NODE_HTML_BLOCK:\n  case CMARK_NODE_TEXT:\n  case CMARK_NODE_HTML_INLINE:\n  case CMARK_NODE_CODE:\n    cmark_chunk_set_cstr(NODE_MEM(node), &node->as.literal, content);\n    return 1;\n\n  case CMARK_NODE_CODE_BLOCK:\n    cmark_chunk_set_cstr(NODE_MEM(node), &node->as.code.literal, content);\n    return 1;\n\n  default:\n    break;\n  }\n\n  return 0;\n}\n\nint cmark_node_get_heading_level(cmark_node *node) {\n  if (node == NULL) {\n    return 0;\n  }\n\n  switch (node->type) {\n  case CMARK_NODE_HEADING:\n    return node->as.heading.level;\n\n  default:\n    break;\n  }\n\n  return 0;\n}\n\nint cmark_node_set_heading_level(cmark_node *node, int level) {\n  if (node == NULL || level < 1 || level > 6) {\n    return 0;\n  }\n\n  switch (node->type) {\n  case CMARK_NODE_HEADING:\n    node->as.heading.level = level;\n    return 1;\n\n  default:\n    break;\n  }\n\n  return 0;\n}\n\ncmark_list_type cmark_node_get_list_type(cmark_node *node) {\n  if (node == NULL) {\n    return CMARK_NO_LIST;\n  }\n\n  if (node->type == CMARK_NODE_LIST) {\n    return node->as.list.list_type;\n  } else {\n    return CMARK_NO_LIST;\n  }\n}\n\nint cmark_node_set_list_type(cmark_node *node, cmark_list_type type) {\n  if (!(type == CMARK_BULLET_LIST || type == CMARK_ORDERED_LIST)) {\n    return 0;\n  }\n\n  if (node == NULL) {\n    return 0;\n  }\n\n  if (node->type == CMARK_NODE_LIST) {\n    node->as.list.list_type = type;\n    return 1;\n  } else {\n    return 0;\n  }\n}\n\ncmark_delim_type cmark_node_get_list_delim(cmark_node *node) {\n  if (node == NULL) {\n    return CMARK_NO_DELIM;\n  }\n\n  if (node->type == CMARK_NODE_LIST) {\n    return node->as.list.delimiter;\n  } else {\n    return CMARK_NO_DELIM;\n  }\n}\n\nint cmark_node_set_list_delim(cmark_node *node, cmark_delim_type delim) {\n  if (!(delim == CMARK_PERIOD_DELIM || delim == CMARK_PAREN_DELIM)) {\n    return 0;\n  }\n\n  if (node == NULL) {\n    return 0;\n  }\n\n  if (node->type == CMARK_NODE_LIST) {\n    node->as.list.delimiter = delim;\n    return 1;\n  } else {\n    return 0;\n  }\n}\n\nint cmark_node_get_list_start(cmark_node *node) {\n  if (node == NULL) {\n    return 0;\n  }\n\n  if (node->type == CMARK_NODE_LIST) {\n    return node->as.list.start;\n  } else {\n    return 0;\n  }\n}\n\nint cmark_node_set_list_start(cmark_node *node, int start) {\n  if (node == NULL || start < 0) {\n    return 0;\n  }\n\n  if (node->type == CMARK_NODE_LIST) {\n    node->as.list.start = start;\n    return 1;\n  } else {\n    return 0;\n  }\n}\n\nint cmark_node_get_list_tight(cmark_node *node) {\n  if (node == NULL) {\n    return 0;\n  }\n\n  if (node->type == CMARK_NODE_LIST) {\n    return node->as.list.tight;\n  } else {\n    return 0;\n  }\n}\n\nint cmark_node_set_list_tight(cmark_node *node, int tight) {\n  if (node == NULL) {\n    return 0;\n  }\n\n  if (node->type == CMARK_NODE_LIST) {\n    node->as.list.tight = tight == 1;\n    return 1;\n  } else {\n    return 0;\n  }\n}\n\nconst char *cmark_node_get_fence_info(cmark_node *node) {\n  if (node == NULL) {\n    return NULL;\n  }\n\n  if (node->type == CMARK_NODE_CODE_BLOCK) {\n    return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.code.info);\n  } else {\n    return NULL;\n  }\n}\n\nint cmark_node_set_fence_info(cmark_node *node, const char *info) {\n  if (node == NULL) {\n    return 0;\n  }\n\n  if (node->type == CMARK_NODE_CODE_BLOCK) {\n    cmark_chunk_set_cstr(NODE_MEM(node), &node->as.code.info, info);\n    return 1;\n  } else {\n    return 0;\n  }\n}\n\nconst char *cmark_node_get_url(cmark_node *node) {\n  if (node == NULL) {\n    return NULL;\n  }\n\n  switch (node->type) {\n  case CMARK_NODE_LINK:\n  case CMARK_NODE_IMAGE:\n    return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.link.url);\n  default:\n    break;\n  }\n\n  return NULL;\n}\n\nint cmark_node_set_url(cmark_node *node, const char *url) {\n  if (node == NULL) {\n    return 0;\n  }\n\n  switch (node->type) {\n  case CMARK_NODE_LINK:\n  case CMARK_NODE_IMAGE:\n    cmark_chunk_set_cstr(NODE_MEM(node), &node->as.link.url, url);\n    return 1;\n  default:\n    break;\n  }\n\n  return 0;\n}\n\nconst char *cmark_node_get_title(cmark_node *node) {\n  if (node == NULL) {\n    return NULL;\n  }\n\n  switch (node->type) {\n  case CMARK_NODE_LINK:\n  case CMARK_NODE_IMAGE:\n    return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.link.title);\n  default:\n    break;\n  }\n\n  return NULL;\n}\n\nint cmark_node_set_title(cmark_node *node, const char *title) {\n  if (node == NULL) {\n    return 0;\n  }\n\n  switch (node->type) {\n  case CMARK_NODE_LINK:\n  case CMARK_NODE_IMAGE:\n    cmark_chunk_set_cstr(NODE_MEM(node), &node->as.link.title, title);\n    return 1;\n  default:\n    break;\n  }\n\n  return 0;\n}\n\nconst char *cmark_node_get_on_enter(cmark_node *node) {\n  if (node == NULL) {\n    return NULL;\n  }\n\n  switch (node->type) {\n  case CMARK_NODE_CUSTOM_INLINE:\n  case CMARK_NODE_CUSTOM_BLOCK:\n    return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.custom.on_enter);\n  default:\n    break;\n  }\n\n  return NULL;\n}\n\nint cmark_node_set_on_enter(cmark_node *node, const char *on_enter) {\n  if (node == NULL) {\n    return 0;\n  }\n\n  switch (node->type) {\n  case CMARK_NODE_CUSTOM_INLINE:\n  case CMARK_NODE_CUSTOM_BLOCK:\n    cmark_chunk_set_cstr(NODE_MEM(node), &node->as.custom.on_enter, on_enter);\n    return 1;\n  default:\n    break;\n  }\n\n  return 0;\n}\n\nconst char *cmark_node_get_on_exit(cmark_node *node) {\n  if (node == NULL) {\n    return NULL;\n  }\n\n  switch (node->type) {\n  case CMARK_NODE_CUSTOM_INLINE:\n  case CMARK_NODE_CUSTOM_BLOCK:\n    return cmark_chunk_to_cstr(NODE_MEM(node), &node->as.custom.on_exit);\n  default:\n    break;\n  }\n\n  return NULL;\n}\n\nint cmark_node_set_on_exit(cmark_node *node, const char *on_exit) {\n  if (node == NULL) {\n    return 0;\n  }\n\n  switch (node->type) {\n  case CMARK_NODE_CUSTOM_INLINE:\n  case CMARK_NODE_CUSTOM_BLOCK:\n    cmark_chunk_set_cstr(NODE_MEM(node), &node->as.custom.on_exit, on_exit);\n    return 1;\n  default:\n    break;\n  }\n\n  return 0;\n}\n\nint cmark_node_get_start_line(cmark_node *node) {\n  if (node == NULL) {\n    return 0;\n  }\n  return node->start_line;\n}\n\nint cmark_node_get_start_column(cmark_node *node) {\n  if (node == NULL) {\n    return 0;\n  }\n  return node->start_column;\n}\n\nint cmark_node_get_end_line(cmark_node *node) {\n  if (node == NULL) {\n    return 0;\n  }\n  return node->end_line;\n}\n\nint cmark_node_get_end_column(cmark_node *node) {\n  if (node == NULL) {\n    return 0;\n  }\n  return node->end_column;\n}\n\n// Unlink a node without adjusting its next, prev, and parent pointers.\nstatic void S_node_unlink(cmark_node *node) {\n  if (node == NULL) {\n    return;\n  }\n\n  if (node->prev) {\n    node->prev->next = node->next;\n  }\n  if (node->next) {\n    node->next->prev = node->prev;\n  }\n\n  // Adjust first_child and last_child of parent.\n  cmark_node *parent = node->parent;\n  if (parent) {\n    if (parent->first_child == node) {\n      parent->first_child = node->next;\n    }\n    if (parent->last_child == node) {\n      parent->last_child = node->prev;\n    }\n  }\n}\n\nvoid cmark_node_unlink(cmark_node *node) {\n  S_node_unlink(node);\n\n  node->next = NULL;\n  node->prev = NULL;\n  node->parent = NULL;\n}\n\nint cmark_node_insert_before(cmark_node *node, cmark_node *sibling) {\n  if (node == NULL || sibling == NULL) {\n    return 0;\n  }\n\n  if (!node->parent || !S_can_contain(node->parent, sibling)) {\n    return 0;\n  }\n\n  S_node_unlink(sibling);\n\n  cmark_node *old_prev = node->prev;\n\n  // Insert 'sibling' between 'old_prev' and 'node'.\n  if (old_prev) {\n    old_prev->next = sibling;\n  }\n  sibling->prev = old_prev;\n  sibling->next = node;\n  node->prev = sibling;\n\n  // Set new parent.\n  cmark_node *parent = node->parent;\n  sibling->parent = parent;\n\n  // Adjust first_child of parent if inserted as first child.\n  if (parent && !old_prev) {\n    parent->first_child = sibling;\n  }\n\n  return 1;\n}\n\nint cmark_node_insert_after(cmark_node *node, cmark_node *sibling) {\n  if (node == NULL || sibling == NULL) {\n    return 0;\n  }\n\n  if (!node->parent || !S_can_contain(node->parent, sibling)) {\n    return 0;\n  }\n\n  S_node_unlink(sibling);\n\n  cmark_node *old_next = node->next;\n\n  // Insert 'sibling' between 'node' and 'old_next'.\n  if (old_next) {\n    old_next->prev = sibling;\n  }\n  sibling->next = old_next;\n  sibling->prev = node;\n  node->next = sibling;\n\n  // Set new parent.\n  cmark_node *parent = node->parent;\n  sibling->parent = parent;\n\n  // Adjust last_child of parent if inserted as last child.\n  if (parent && !old_next) {\n    parent->last_child = sibling;\n  }\n\n  return 1;\n}\n\nint cmark_node_replace(cmark_node *oldnode, cmark_node *newnode) {\n  if (!cmark_node_insert_before(oldnode, newnode)) {\n    return 0;\n  }\n  cmark_node_unlink(oldnode);\n  return 1;\n}\n\nint cmark_node_prepend_child(cmark_node *node, cmark_node *child) {\n  if (!S_can_contain(node, child)) {\n    return 0;\n  }\n\n  S_node_unlink(child);\n\n  cmark_node *old_first_child = node->first_child;\n\n  child->next = old_first_child;\n  child->prev = NULL;\n  child->parent = node;\n  node->first_child = child;\n\n  if (old_first_child) {\n    old_first_child->prev = child;\n  } else {\n    // Also set last_child if node previously had no children.\n    node->last_child = child;\n  }\n\n  return 1;\n}\n\nint cmark_node_append_child(cmark_node *node, cmark_node *child) {\n  if (!S_can_contain(node, child)) {\n    return 0;\n  }\n\n  S_node_unlink(child);\n\n  cmark_node *old_last_child = node->last_child;\n\n  child->next = NULL;\n  child->prev = old_last_child;\n  child->parent = node;\n  node->last_child = child;\n\n  if (old_last_child) {\n    old_last_child->next = child;\n  } else {\n    // Also set first_child if node previously had no children.\n    node->first_child = child;\n  }\n\n  return 1;\n}\n\nstatic void S_print_error(FILE *out, cmark_node *node, const char *elem) {\n  if (out == NULL) {\n    return;\n  }\n  fprintf(out, \"Invalid '%s' in node type %s at %d:%d\\n\", elem,\n          cmark_node_get_type_string(node), node->start_line,\n          node->start_column);\n}\n\nint cmark_node_check(cmark_node *node, FILE *out) {\n  cmark_node *cur;\n  int errors = 0;\n\n  if (!node) {\n    return 0;\n  }\n\n  cur = node;\n  for (;;) {\n    if (cur->first_child) {\n      if (cur->first_child->prev != NULL) {\n        S_print_error(out, cur->first_child, \"prev\");\n        cur->first_child->prev = NULL;\n        ++errors;\n      }\n      if (cur->first_child->parent != cur) {\n        S_print_error(out, cur->first_child, \"parent\");\n        cur->first_child->parent = cur;\n        ++errors;\n      }\n      cur = cur->first_child;\n      continue;\n    }\n\n  next_sibling:\n    if (cur == node) {\n      break;\n    }\n    if (cur->next) {\n      if (cur->next->prev != cur) {\n        S_print_error(out, cur->next, \"prev\");\n        cur->next->prev = cur;\n        ++errors;\n      }\n      if (cur->next->parent != cur->parent) {\n        S_print_error(out, cur->next, \"parent\");\n        cur->next->parent = cur->parent;\n        ++errors;\n      }\n      cur = cur->next;\n      continue;\n    }\n\n    if (cur->parent->last_child != cur) {\n      S_print_error(out, cur->parent, \"last_child\");\n      cur->parent->last_child = cur;\n      ++errors;\n    }\n    cur = cur->parent;\n    goto next_sibling;\n  }\n\n  return errors;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/node.h",
    "content": "#ifndef CMARK_NODE_H\n#define CMARK_NODE_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include <stdio.h>\n#include <stdint.h>\n\n#include \"cmark.h\"\n#include \"buffer.h\"\n#include \"chunk.h\"\n\ntypedef struct {\n  cmark_list_type list_type;\n  int marker_offset;\n  int padding;\n  int start;\n  cmark_delim_type delimiter;\n  unsigned char bullet_char;\n  bool tight;\n} cmark_list;\n\ntypedef struct {\n  cmark_chunk info;\n  cmark_chunk literal;\n  uint8_t fence_length;\n  uint8_t fence_offset;\n  unsigned char fence_char;\n  int8_t fenced;\n} cmark_code;\n\ntypedef struct {\n  int level;\n  bool setext;\n} cmark_heading;\n\ntypedef struct {\n  cmark_chunk url;\n  cmark_chunk title;\n} cmark_link;\n\ntypedef struct {\n  cmark_chunk on_enter;\n  cmark_chunk on_exit;\n} cmark_custom;\n\nenum cmark_node__internal_flags {\n  CMARK_NODE__OPEN = (1 << 0),\n  CMARK_NODE__LAST_LINE_BLANK = (1 << 1),\n  CMARK_NODE__LAST_LINE_CHECKED = (1 << 2),\n};\n\nstruct cmark_node {\n  cmark_strbuf content;\n\n  struct cmark_node *next;\n  struct cmark_node *prev;\n  struct cmark_node *parent;\n  struct cmark_node *first_child;\n  struct cmark_node *last_child;\n\n  void *user_data;\n\n  int start_line;\n  int start_column;\n  int end_line;\n  int end_column;\n  int internal_offset;\n  uint16_t type;\n  uint16_t flags;\n\n  union {\n    cmark_chunk literal;\n    cmark_list list;\n    cmark_code code;\n    cmark_heading heading;\n    cmark_link link;\n    cmark_custom custom;\n    int html_block_type;\n  } as;\n};\n\nstatic CMARK_INLINE cmark_mem *cmark_node_mem(cmark_node *node) {\n  return node->content.mem;\n}\nCMARK_EXPORT int cmark_node_check(cmark_node *node, FILE *out);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/parser.h",
    "content": "#ifndef CMARK_AST_H\n#define CMARK_AST_H\n\n#include <stdio.h>\n#include \"references.h\"\n#include \"node.h\"\n#include \"buffer.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#define MAX_LINK_LABEL_LENGTH 1000\n\nstruct cmark_parser {\n  struct cmark_mem *mem;\n  struct cmark_reference_map *refmap;\n  struct cmark_node *root;\n  struct cmark_node *current;\n  int line_number;\n  bufsize_t offset;\n  bufsize_t column;\n  bufsize_t first_nonspace;\n  bufsize_t first_nonspace_column;\n  bufsize_t thematic_break_kill_pos;\n  int indent;\n  bool blank;\n  bool partially_consumed_tab;\n  cmark_strbuf curline;\n  bufsize_t last_line_length;\n  cmark_strbuf linebuf;\n  int options;\n  bool last_buffer_ended_with_cr;\n};\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/references.c",
    "content": "#include \"cmark.h\"\n#include \"utf8.h\"\n#include \"parser.h\"\n#include \"references.h\"\n#include \"inlines.h\"\n#include \"chunk.h\"\n\nstatic unsigned int refhash(const unsigned char *link_ref) {\n  unsigned int hash = 0;\n\n  while (*link_ref)\n    hash = (*link_ref++) + (hash << 6) + (hash << 16) - hash;\n\n  return hash;\n}\n\nstatic void reference_free(cmark_reference_map *map, cmark_reference *ref) {\n  cmark_mem *mem = map->mem;\n  if (ref != NULL) {\n    mem->free(ref->label);\n    cmark_chunk_free(mem, &ref->url);\n    cmark_chunk_free(mem, &ref->title);\n    mem->free(ref);\n  }\n}\n\n// normalize reference:  collapse internal whitespace to single space,\n// remove leading/trailing whitespace, case fold\n// Return NULL if the reference name is actually empty (i.e. composed\n// solely from whitespace)\nstatic unsigned char *normalize_reference(cmark_mem *mem, cmark_chunk *ref) {\n  cmark_strbuf normalized = CMARK_BUF_INIT(mem);\n  unsigned char *result;\n\n  if (ref == NULL)\n    return NULL;\n\n  if (ref->len == 0)\n    return NULL;\n\n  cmark_utf8proc_case_fold(&normalized, ref->data, ref->len);\n  cmark_strbuf_trim(&normalized);\n  cmark_strbuf_normalize_whitespace(&normalized);\n\n  result = cmark_strbuf_detach(&normalized);\n  assert(result);\n\n  if (result[0] == '\\0') {\n    mem->free(result);\n    return NULL;\n  }\n\n  return result;\n}\n\nstatic void add_reference(cmark_reference_map *map, cmark_reference *ref) {\n  cmark_reference *t = ref->next = map->table[ref->hash % REFMAP_SIZE];\n\n  while (t) {\n    if (t->hash == ref->hash && !strcmp((char *)t->label, (char *)ref->label)) {\n      reference_free(map, ref);\n      return;\n    }\n\n    t = t->next;\n  }\n\n  map->table[ref->hash % REFMAP_SIZE] = ref;\n}\n\nvoid cmark_reference_create(cmark_reference_map *map, cmark_chunk *label,\n                            cmark_chunk *url, cmark_chunk *title) {\n  cmark_reference *ref;\n  unsigned char *reflabel = normalize_reference(map->mem, label);\n\n  /* empty reference name, or composed from only whitespace */\n  if (reflabel == NULL)\n    return;\n\n  ref = (cmark_reference *)map->mem->calloc(1, sizeof(*ref));\n  ref->label = reflabel;\n  ref->hash = refhash(ref->label);\n  ref->url = cmark_clean_url(map->mem, url);\n  ref->title = cmark_clean_title(map->mem, title);\n  ref->next = NULL;\n\n  add_reference(map, ref);\n}\n\n// Returns reference if refmap contains a reference with matching\n// label, otherwise NULL.\ncmark_reference *cmark_reference_lookup(cmark_reference_map *map,\n                                        cmark_chunk *label) {\n  cmark_reference *ref = NULL;\n  unsigned char *norm;\n  unsigned int hash;\n\n  if (label->len < 1 || label->len > MAX_LINK_LABEL_LENGTH)\n    return NULL;\n\n  if (map == NULL)\n    return NULL;\n\n  norm = normalize_reference(map->mem, label);\n  if (norm == NULL)\n    return NULL;\n\n  hash = refhash(norm);\n  ref = map->table[hash % REFMAP_SIZE];\n\n  while (ref) {\n    if (ref->hash == hash && !strcmp((char *)ref->label, (char *)norm))\n      break;\n    ref = ref->next;\n  }\n\n  map->mem->free(norm);\n  return ref;\n}\n\nvoid cmark_reference_map_free(cmark_reference_map *map) {\n  unsigned int i;\n\n  if (map == NULL)\n    return;\n\n  for (i = 0; i < REFMAP_SIZE; ++i) {\n    cmark_reference *ref = map->table[i];\n    cmark_reference *next;\n\n    while (ref) {\n      next = ref->next;\n      reference_free(map, ref);\n      ref = next;\n    }\n  }\n\n  map->mem->free(map);\n}\n\ncmark_reference_map *cmark_reference_map_new(cmark_mem *mem) {\n  cmark_reference_map *map =\n      (cmark_reference_map *)mem->calloc(1, sizeof(cmark_reference_map));\n  map->mem = mem;\n  return map;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/references.h",
    "content": "#ifndef CMARK_REFERENCES_H\n#define CMARK_REFERENCES_H\n\n#include \"chunk.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#define REFMAP_SIZE 16\n\nstruct cmark_reference {\n  struct cmark_reference *next;\n  unsigned char *label;\n  cmark_chunk url;\n  cmark_chunk title;\n  unsigned int hash;\n};\n\ntypedef struct cmark_reference cmark_reference;\n\nstruct cmark_reference_map {\n  cmark_mem *mem;\n  cmark_reference *table[REFMAP_SIZE];\n};\n\ntypedef struct cmark_reference_map cmark_reference_map;\n\ncmark_reference_map *cmark_reference_map_new(cmark_mem *mem);\nvoid cmark_reference_map_free(cmark_reference_map *map);\ncmark_reference *cmark_reference_lookup(cmark_reference_map *map,\n                                        cmark_chunk *label);\nextern void cmark_reference_create(cmark_reference_map *map, cmark_chunk *label,\n                                   cmark_chunk *url, cmark_chunk *title);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/render.c",
    "content": "#include <stdlib.h>\n#include \"buffer.h\"\n#include \"chunk.h\"\n#include \"cmark.h\"\n#include \"utf8.h\"\n#include \"render.h\"\n#include \"node.h\"\n\nstatic CMARK_INLINE void S_cr(cmark_renderer *renderer) {\n  if (renderer->need_cr < 1) {\n    renderer->need_cr = 1;\n  }\n}\n\nstatic CMARK_INLINE void S_blankline(cmark_renderer *renderer) {\n  if (renderer->need_cr < 2) {\n    renderer->need_cr = 2;\n  }\n}\n\nstatic void S_out(cmark_renderer *renderer, const char *source, bool wrap,\n                  cmark_escaping escape) {\n  int length = strlen(source);\n  unsigned char nextc;\n  int32_t c;\n  int i = 0;\n  int last_nonspace;\n  int len;\n  cmark_chunk remainder = cmark_chunk_literal(\"\");\n  int k = renderer->buffer->size - 1;\n\n  wrap = wrap && !renderer->no_linebreaks;\n\n  if (renderer->in_tight_list_item && renderer->need_cr > 1) {\n    renderer->need_cr = 1;\n  }\n  while (renderer->need_cr) {\n    if (k < 0 || renderer->buffer->ptr[k] == '\\n') {\n      k -= 1;\n    } else {\n      cmark_strbuf_putc(renderer->buffer, '\\n');\n      if (renderer->need_cr > 1) {\n        cmark_strbuf_put(renderer->buffer, renderer->prefix->ptr,\n                         renderer->prefix->size);\n      }\n    }\n    renderer->column = 0;\n    renderer->last_breakable = 0;\n    renderer->begin_line = true;\n    renderer->begin_content = true;\n    renderer->need_cr -= 1;\n  }\n\n  while (i < length) {\n    if (renderer->begin_line) {\n      cmark_strbuf_put(renderer->buffer, renderer->prefix->ptr,\n                       renderer->prefix->size);\n      // note: this assumes prefix is ascii:\n      renderer->column = renderer->prefix->size;\n    }\n\n    len = cmark_utf8proc_iterate((const uint8_t *)source + i, length - i, &c);\n    if (len == -1) { // error condition\n      return;        // return without rendering rest of string\n    }\n    nextc = source[i + len];\n    if (c == 32 && wrap) {\n      if (!renderer->begin_line) {\n        last_nonspace = renderer->buffer->size;\n        cmark_strbuf_putc(renderer->buffer, ' ');\n        renderer->column += 1;\n        renderer->begin_line = false;\n        renderer->begin_content = false;\n        // skip following spaces\n        while (source[i + 1] == ' ') {\n          i++;\n        }\n        // We don't allow breaks that make a digit the first character\n        // because this causes problems with commonmark output.\n        if (!cmark_isdigit(source[i + 1])) {\n          renderer->last_breakable = last_nonspace;\n        }\n      }\n\n    } else if (escape == LITERAL) {\n      if (c == 10) {\n        cmark_strbuf_putc(renderer->buffer, '\\n');\n        renderer->column = 0;\n        renderer->begin_line = true;\n        renderer->begin_content = true;\n        renderer->last_breakable = 0;\n      } else {\n        cmark_render_code_point(renderer, c);\n        renderer->begin_line = false;\n        // we don't set 'begin_content' to false til we've\n        // finished parsing a digit.  Reason:  in commonmark\n        // we need to escape a potential list marker after\n        // a digit:\n        renderer->begin_content =\n            renderer->begin_content && cmark_isdigit(c) == 1;\n      }\n    } else {\n      (renderer->outc)(renderer, escape, c, nextc);\n      renderer->begin_line = false;\n      renderer->begin_content =\n          renderer->begin_content && cmark_isdigit(c) == 1;\n    }\n\n    // If adding the character went beyond width, look for an\n    // earlier place where the line could be broken:\n    if (renderer->width > 0 && renderer->column > renderer->width &&\n        !renderer->begin_line && renderer->last_breakable > 0) {\n\n      // copy from last_breakable to remainder\n      cmark_chunk_set_cstr(renderer->mem, &remainder,\n                           (char *)renderer->buffer->ptr +\n                               renderer->last_breakable + 1);\n      // truncate at last_breakable\n      cmark_strbuf_truncate(renderer->buffer, renderer->last_breakable);\n      // add newline, prefix, and remainder\n      cmark_strbuf_putc(renderer->buffer, '\\n');\n      cmark_strbuf_put(renderer->buffer, renderer->prefix->ptr,\n                       renderer->prefix->size);\n      cmark_strbuf_put(renderer->buffer, remainder.data, remainder.len);\n      renderer->column = renderer->prefix->size + remainder.len;\n      cmark_chunk_free(renderer->mem, &remainder);\n      renderer->last_breakable = 0;\n      renderer->begin_line = false;\n      renderer->begin_content = false;\n    }\n\n    i += len;\n  }\n}\n\n// Assumes no newlines, assumes ascii content:\nvoid cmark_render_ascii(cmark_renderer *renderer, const char *s) {\n  int origsize = renderer->buffer->size;\n  cmark_strbuf_puts(renderer->buffer, s);\n  renderer->column += renderer->buffer->size - origsize;\n}\n\nvoid cmark_render_code_point(cmark_renderer *renderer, uint32_t c) {\n  cmark_utf8proc_encode_char(c, renderer->buffer);\n  renderer->column += 1;\n}\n\nchar *cmark_render(cmark_node *root, int options, int width,\n                   void (*outc)(cmark_renderer *, cmark_escaping, int32_t,\n                                unsigned char),\n                   int (*render_node)(cmark_renderer *renderer,\n                                      cmark_node *node,\n                                      cmark_event_type ev_type, int options)) {\n  cmark_mem *mem = cmark_node_mem(root);\n  cmark_strbuf pref = CMARK_BUF_INIT(mem);\n  cmark_strbuf buf = CMARK_BUF_INIT(mem);\n  cmark_node *cur;\n  cmark_event_type ev_type;\n  char *result;\n  cmark_iter *iter = cmark_iter_new(root);\n\n  cmark_renderer renderer = {mem,   &buf, &pref, 0,           width,\n                             0,     0,    true,  true,        false,\n                             false, outc, S_cr,  S_blankline, S_out};\n\n  while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {\n    cur = cmark_iter_get_node(iter);\n    if (!render_node(&renderer, cur, ev_type, options)) {\n      // a false value causes us to skip processing\n      // the node's contents.  this is used for\n      // autolinks.\n      cmark_iter_reset(iter, cur, CMARK_EVENT_EXIT);\n    }\n  }\n\n  // ensure final newline\n  if (renderer.buffer->size == 0 || renderer.buffer->ptr[renderer.buffer->size - 1] != '\\n') {\n    cmark_strbuf_putc(renderer.buffer, '\\n');\n  }\n\n  result = (char *)cmark_strbuf_detach(renderer.buffer);\n\n  cmark_iter_free(iter);\n  cmark_strbuf_free(renderer.prefix);\n  cmark_strbuf_free(renderer.buffer);\n\n  return result;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/render.h",
    "content": "#ifndef CMARK_RENDER_H\n#define CMARK_RENDER_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include <stdlib.h>\n#include \"buffer.h\"\n#include \"chunk.h\"\n\ntypedef enum { LITERAL, NORMAL, TITLE, URL } cmark_escaping;\n\nstruct cmark_renderer {\n  cmark_mem *mem;\n  cmark_strbuf *buffer;\n  cmark_strbuf *prefix;\n  int column;\n  int width;\n  int need_cr;\n  bufsize_t last_breakable;\n  bool begin_line;\n  bool begin_content;\n  bool no_linebreaks;\n  bool in_tight_list_item;\n  void (*outc)(struct cmark_renderer *, cmark_escaping, int32_t, unsigned char);\n  void (*cr)(struct cmark_renderer *);\n  void (*blankline)(struct cmark_renderer *);\n  void (*out)(struct cmark_renderer *, const char *, bool, cmark_escaping);\n};\n\ntypedef struct cmark_renderer cmark_renderer;\n\nvoid cmark_render_ascii(cmark_renderer *renderer, const char *s);\n\nvoid cmark_render_code_point(cmark_renderer *renderer, uint32_t c);\n\nchar *cmark_render(cmark_node *root, int options, int width,\n                   void (*outc)(cmark_renderer *, cmark_escaping, int32_t,\n                                unsigned char),\n                   int (*render_node)(cmark_renderer *renderer,\n                                      cmark_node *node,\n                                      cmark_event_type ev_type, int options));\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/scanners.c",
    "content": "/* Generated by re2c 0.16 */\n#include <stdlib.h>\n#include \"chunk.h\"\n#include \"scanners.h\"\n\nbufsize_t _scan_at(bufsize_t (*scanner)(const unsigned char *), cmark_chunk *c,\n                   bufsize_t offset) {\n  bufsize_t res;\n  unsigned char *ptr = (unsigned char *)c->data;\n\n  if (ptr == NULL || offset > c->len) {\n    return 0;\n  } else {\n    unsigned char lim = ptr[c->len];\n\n    ptr[c->len] = '\\0';\n    res = scanner(ptr + offset);\n    ptr[c->len] = lim;\n  }\n\n  return res;\n}\n\n// Try to match a scheme including colon.\nbufsize_t _scan_scheme(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n\n  {\n    unsigned char yych;\n    yych = *p;\n    if (yych <= '@')\n      goto yy2;\n    if (yych <= 'Z')\n      goto yy4;\n    if (yych <= '`')\n      goto yy2;\n    if (yych <= 'z')\n      goto yy4;\n  yy2:\n    ++p;\n  yy3 : { return 0; }\n  yy4:\n    yych = *(marker = ++p);\n    if (yych <= '/') {\n      if (yych <= '+') {\n        if (yych <= '*')\n          goto yy3;\n      } else {\n        if (yych <= ',')\n          goto yy3;\n        if (yych >= '/')\n          goto yy3;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '9')\n          goto yy5;\n        if (yych <= '@')\n          goto yy3;\n      } else {\n        if (yych <= '`')\n          goto yy3;\n        if (yych >= '{')\n          goto yy3;\n      }\n    }\n  yy5:\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych == '+')\n          goto yy7;\n      } else {\n        if (yych != '/')\n          goto yy7;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych >= 'A')\n          goto yy7;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych <= 'z')\n          goto yy7;\n      }\n    }\n  yy6:\n    p = marker;\n    goto yy3;\n  yy7:\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych == '+')\n          goto yy10;\n        goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n        goto yy10;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n        goto yy10;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych <= 'z')\n          goto yy10;\n        goto yy6;\n      }\n    }\n  yy8:\n    ++p;\n    { return (bufsize_t)(p - start); }\n  yy10:\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy6;\n      } else {\n        if (yych == '/')\n          goto yy6;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy8;\n        if (yych <= '@')\n          goto yy6;\n      } else {\n        if (yych <= '`')\n          goto yy6;\n        if (yych >= '{')\n          goto yy6;\n      }\n    }\n    ++p;\n    if ((yych = *p) == ':')\n      goto yy8;\n    goto yy6;\n  }\n}\n\n// Try to match URI autolink after first <, returning number of chars matched.\nbufsize_t _scan_autolink_uri(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n\n  {\n    unsigned char yych;\n    static const unsigned char yybm[] = {\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 128, 128, 128, 0,   128, 0,   128, 128, 128, 128, 128, 128, 128,\n        128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 128, 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,\n    };\n    yych = *p;\n    if (yych <= '@')\n      goto yy41;\n    if (yych <= 'Z')\n      goto yy43;\n    if (yych <= '`')\n      goto yy41;\n    if (yych <= 'z')\n      goto yy43;\n  yy41:\n    ++p;\n  yy42 : { return 0; }\n  yy43:\n    yych = *(marker = ++p);\n    if (yych <= '/') {\n      if (yych <= '+') {\n        if (yych <= '*')\n          goto yy42;\n      } else {\n        if (yych <= ',')\n          goto yy42;\n        if (yych >= '/')\n          goto yy42;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '9')\n          goto yy44;\n        if (yych <= '@')\n          goto yy42;\n      } else {\n        if (yych <= '`')\n          goto yy42;\n        if (yych >= '{')\n          goto yy42;\n      }\n    }\n  yy44:\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych == '+')\n          goto yy46;\n      } else {\n        if (yych != '/')\n          goto yy46;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych >= 'A')\n          goto yy46;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych <= 'z')\n          goto yy46;\n      }\n    }\n  yy45:\n    p = marker;\n    goto yy42;\n  yy46:\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych == '+')\n          goto yy49;\n        goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n        goto yy49;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n        goto yy49;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych <= 'z')\n          goto yy49;\n        goto yy45;\n      }\n    }\n  yy47:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy47;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= '<')\n          goto yy45;\n        if (yych <= '>')\n          goto yy50;\n        goto yy45;\n      } else {\n        if (yych <= 0xDF)\n          goto yy52;\n        if (yych <= 0xE0)\n          goto yy53;\n        goto yy54;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy55;\n        if (yych <= 0xEF)\n          goto yy54;\n        goto yy56;\n      } else {\n        if (yych <= 0xF3)\n          goto yy57;\n        if (yych <= 0xF4)\n          goto yy58;\n        goto yy45;\n      }\n    }\n  yy49:\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych == '+')\n          goto yy59;\n        goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n        goto yy59;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n        goto yy59;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych <= 'z')\n          goto yy59;\n        goto yy45;\n      }\n    }\n  yy50:\n    ++p;\n    { return (bufsize_t)(p - start); }\n  yy52:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy45;\n    if (yych <= 0xBF)\n      goto yy47;\n    goto yy45;\n  yy53:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy45;\n    if (yych <= 0xBF)\n      goto yy52;\n    goto yy45;\n  yy54:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy45;\n    if (yych <= 0xBF)\n      goto yy52;\n    goto yy45;\n  yy55:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy45;\n    if (yych <= 0x9F)\n      goto yy52;\n    goto yy45;\n  yy56:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy45;\n    if (yych <= 0xBF)\n      goto yy54;\n    goto yy45;\n  yy57:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy45;\n    if (yych <= 0xBF)\n      goto yy54;\n    goto yy45;\n  yy58:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy45;\n    if (yych <= 0x8F)\n      goto yy54;\n    goto yy45;\n  yy59:\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    yych = *++p;\n    if (yych <= '9') {\n      if (yych <= ',') {\n        if (yych != '+')\n          goto yy45;\n      } else {\n        if (yych == '/')\n          goto yy45;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= ':')\n          goto yy47;\n        if (yych <= '@')\n          goto yy45;\n      } else {\n        if (yych <= '`')\n          goto yy45;\n        if (yych >= '{')\n          goto yy45;\n      }\n    }\n    ++p;\n    if ((yych = *p) == ':')\n      goto yy47;\n    goto yy45;\n  }\n}\n\n// Try to match email autolink after first <, returning num of chars matched.\nbufsize_t _scan_autolink_email(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n\n  {\n    unsigned char yych;\n    static const unsigned char yybm[] = {\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   128, 0,   128, 128, 128, 128, 128, 0,   0,\n        128, 128, 0,   128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 128, 0,   0,   0,   128, 0,   128, 0,   128, 128, 128, 128, 128,\n        128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 128, 128, 128, 128, 128, 128, 0,   0,   0,   128, 128, 128, 128,\n        128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,\n    };\n    yych = *p;\n    if (yych <= '9') {\n      if (yych <= '\\'') {\n        if (yych == '!')\n          goto yy91;\n        if (yych >= '#')\n          goto yy91;\n      } else {\n        if (yych <= ')')\n          goto yy89;\n        if (yych != ',')\n          goto yy91;\n      }\n    } else {\n      if (yych <= '?') {\n        if (yych == '=')\n          goto yy91;\n        if (yych >= '?')\n          goto yy91;\n      } else {\n        if (yych <= 'Z') {\n          if (yych >= 'A')\n            goto yy91;\n        } else {\n          if (yych <= ']')\n            goto yy89;\n          if (yych <= '~')\n            goto yy91;\n        }\n      }\n    }\n  yy89:\n    ++p;\n  yy90 : { return 0; }\n  yy91:\n    yych = *(marker = ++p);\n    if (yych <= ',') {\n      if (yych <= '\"') {\n        if (yych == '!')\n          goto yy93;\n        goto yy90;\n      } else {\n        if (yych <= '\\'')\n          goto yy93;\n        if (yych <= ')')\n          goto yy90;\n        if (yych <= '+')\n          goto yy93;\n        goto yy90;\n      }\n    } else {\n      if (yych <= '>') {\n        if (yych <= '9')\n          goto yy93;\n        if (yych == '=')\n          goto yy93;\n        goto yy90;\n      } else {\n        if (yych <= 'Z')\n          goto yy93;\n        if (yych <= ']')\n          goto yy90;\n        if (yych <= '~')\n          goto yy93;\n        goto yy90;\n      }\n    }\n  yy92:\n    ++p;\n    yych = *p;\n  yy93:\n    if (yybm[0 + yych] & 128) {\n      goto yy92;\n    }\n    if (yych <= '>')\n      goto yy94;\n    if (yych <= '@')\n      goto yy95;\n  yy94:\n    p = marker;\n    goto yy90;\n  yy95:\n    ++p;\n    yych = *p;\n    if (yych <= '@') {\n      if (yych <= '/')\n        goto yy94;\n      if (yych >= ':')\n        goto yy94;\n    } else {\n      if (yych <= 'Z')\n        goto yy96;\n      if (yych <= '`')\n        goto yy94;\n      if (yych >= '{')\n        goto yy94;\n    }\n  yy96:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy98;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy98;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy98;\n        goto yy94;\n      }\n    }\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy101;\n      if (yych <= '/')\n        goto yy94;\n      goto yy102;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy102;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy102;\n        goto yy94;\n      }\n    }\n  yy98:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych <= '-')\n          goto yy101;\n        goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy102;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy102;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy102;\n        goto yy94;\n      }\n    }\n  yy99:\n    ++p;\n    { return (bufsize_t)(p - start); }\n  yy101:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy103;\n      if (yych <= '/')\n        goto yy94;\n      goto yy104;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy104;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy104;\n        goto yy94;\n      }\n    }\n  yy102:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy104;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy104;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy104;\n        goto yy94;\n      }\n    }\n  yy103:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy105;\n      if (yych <= '/')\n        goto yy94;\n      goto yy106;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy106;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy106;\n        goto yy94;\n      }\n    }\n  yy104:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy106;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy106;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy106;\n        goto yy94;\n      }\n    }\n  yy105:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy107;\n      if (yych <= '/')\n        goto yy94;\n      goto yy108;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy108;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy108;\n        goto yy94;\n      }\n    }\n  yy106:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy108;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy108;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy108;\n        goto yy94;\n      }\n    }\n  yy107:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy109;\n      if (yych <= '/')\n        goto yy94;\n      goto yy110;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy110;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy110;\n        goto yy94;\n      }\n    }\n  yy108:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy110;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy110;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy110;\n        goto yy94;\n      }\n    }\n  yy109:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy111;\n      if (yych <= '/')\n        goto yy94;\n      goto yy112;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy112;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy112;\n        goto yy94;\n      }\n    }\n  yy110:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy112;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy112;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy112;\n        goto yy94;\n      }\n    }\n  yy111:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy113;\n      if (yych <= '/')\n        goto yy94;\n      goto yy114;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy114;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy114;\n        goto yy94;\n      }\n    }\n  yy112:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy114;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy114;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy114;\n        goto yy94;\n      }\n    }\n  yy113:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy115;\n      if (yych <= '/')\n        goto yy94;\n      goto yy116;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy116;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy116;\n        goto yy94;\n      }\n    }\n  yy114:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy116;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy116;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy116;\n        goto yy94;\n      }\n    }\n  yy115:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy117;\n      if (yych <= '/')\n        goto yy94;\n      goto yy118;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy118;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy118;\n        goto yy94;\n      }\n    }\n  yy116:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy118;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy118;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy118;\n        goto yy94;\n      }\n    }\n  yy117:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy119;\n      if (yych <= '/')\n        goto yy94;\n      goto yy120;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy120;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy120;\n        goto yy94;\n      }\n    }\n  yy118:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy120;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy120;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy120;\n        goto yy94;\n      }\n    }\n  yy119:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy121;\n      if (yych <= '/')\n        goto yy94;\n      goto yy122;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy122;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy122;\n        goto yy94;\n      }\n    }\n  yy120:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy122;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy122;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy122;\n        goto yy94;\n      }\n    }\n  yy121:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy123;\n      if (yych <= '/')\n        goto yy94;\n      goto yy124;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy124;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy124;\n        goto yy94;\n      }\n    }\n  yy122:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy124;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy124;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy124;\n        goto yy94;\n      }\n    }\n  yy123:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy125;\n      if (yych <= '/')\n        goto yy94;\n      goto yy126;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy126;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy126;\n        goto yy94;\n      }\n    }\n  yy124:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy126;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy126;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy126;\n        goto yy94;\n      }\n    }\n  yy125:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy127;\n      if (yych <= '/')\n        goto yy94;\n      goto yy128;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy128;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy128;\n        goto yy94;\n      }\n    }\n  yy126:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy128;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy128;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy128;\n        goto yy94;\n      }\n    }\n  yy127:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy129;\n      if (yych <= '/')\n        goto yy94;\n      goto yy130;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy130;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy130;\n        goto yy94;\n      }\n    }\n  yy128:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy130;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy130;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy130;\n        goto yy94;\n      }\n    }\n  yy129:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy131;\n      if (yych <= '/')\n        goto yy94;\n      goto yy132;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy132;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy132;\n        goto yy94;\n      }\n    }\n  yy130:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy132;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy132;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy132;\n        goto yy94;\n      }\n    }\n  yy131:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy133;\n      if (yych <= '/')\n        goto yy94;\n      goto yy134;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy134;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy134;\n        goto yy94;\n      }\n    }\n  yy132:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy134;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy134;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy134;\n        goto yy94;\n      }\n    }\n  yy133:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy135;\n      if (yych <= '/')\n        goto yy94;\n      goto yy136;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy136;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy136;\n        goto yy94;\n      }\n    }\n  yy134:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy136;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy136;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy136;\n        goto yy94;\n      }\n    }\n  yy135:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy137;\n      if (yych <= '/')\n        goto yy94;\n      goto yy138;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy138;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy138;\n        goto yy94;\n      }\n    }\n  yy136:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy138;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy138;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy138;\n        goto yy94;\n      }\n    }\n  yy137:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy139;\n      if (yych <= '/')\n        goto yy94;\n      goto yy140;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy140;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy140;\n        goto yy94;\n      }\n    }\n  yy138:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy140;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy140;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy140;\n        goto yy94;\n      }\n    }\n  yy139:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy141;\n      if (yych <= '/')\n        goto yy94;\n      goto yy142;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy142;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy142;\n        goto yy94;\n      }\n    }\n  yy140:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy142;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy142;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy142;\n        goto yy94;\n      }\n    }\n  yy141:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy143;\n      if (yych <= '/')\n        goto yy94;\n      goto yy144;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy144;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy144;\n        goto yy94;\n      }\n    }\n  yy142:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy144;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy144;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy144;\n        goto yy94;\n      }\n    }\n  yy143:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy145;\n      if (yych <= '/')\n        goto yy94;\n      goto yy146;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy146;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy146;\n        goto yy94;\n      }\n    }\n  yy144:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy146;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy146;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy146;\n        goto yy94;\n      }\n    }\n  yy145:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy147;\n      if (yych <= '/')\n        goto yy94;\n      goto yy148;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy148;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy148;\n        goto yy94;\n      }\n    }\n  yy146:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy148;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy148;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy148;\n        goto yy94;\n      }\n    }\n  yy147:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy149;\n      if (yych <= '/')\n        goto yy94;\n      goto yy150;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy150;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy150;\n        goto yy94;\n      }\n    }\n  yy148:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy150;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy150;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy150;\n        goto yy94;\n      }\n    }\n  yy149:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy151;\n      if (yych <= '/')\n        goto yy94;\n      goto yy152;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy152;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy152;\n        goto yy94;\n      }\n    }\n  yy150:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy152;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy152;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy152;\n        goto yy94;\n      }\n    }\n  yy151:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy153;\n      if (yych <= '/')\n        goto yy94;\n      goto yy154;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy154;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy154;\n        goto yy94;\n      }\n    }\n  yy152:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy154;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy154;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy154;\n        goto yy94;\n      }\n    }\n  yy153:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy155;\n      if (yych <= '/')\n        goto yy94;\n      goto yy156;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy156;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy156;\n        goto yy94;\n      }\n    }\n  yy154:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy156;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy156;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy156;\n        goto yy94;\n      }\n    }\n  yy155:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy157;\n      if (yych <= '/')\n        goto yy94;\n      goto yy158;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy158;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy158;\n        goto yy94;\n      }\n    }\n  yy156:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy158;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy158;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy158;\n        goto yy94;\n      }\n    }\n  yy157:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy159;\n      if (yych <= '/')\n        goto yy94;\n      goto yy160;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy160;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy160;\n        goto yy94;\n      }\n    }\n  yy158:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy160;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy160;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy160;\n        goto yy94;\n      }\n    }\n  yy159:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy161;\n      if (yych <= '/')\n        goto yy94;\n      goto yy162;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy162;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy162;\n        goto yy94;\n      }\n    }\n  yy160:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy162;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy162;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy162;\n        goto yy94;\n      }\n    }\n  yy161:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy163;\n      if (yych <= '/')\n        goto yy94;\n      goto yy164;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy164;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy164;\n        goto yy94;\n      }\n    }\n  yy162:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy164;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy164;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy164;\n        goto yy94;\n      }\n    }\n  yy163:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy165;\n      if (yych <= '/')\n        goto yy94;\n      goto yy166;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy166;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy166;\n        goto yy94;\n      }\n    }\n  yy164:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy166;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy166;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy166;\n        goto yy94;\n      }\n    }\n  yy165:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy167;\n      if (yych <= '/')\n        goto yy94;\n      goto yy168;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy168;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy168;\n        goto yy94;\n      }\n    }\n  yy166:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy168;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy168;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy168;\n        goto yy94;\n      }\n    }\n  yy167:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy169;\n      if (yych <= '/')\n        goto yy94;\n      goto yy170;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy170;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy170;\n        goto yy94;\n      }\n    }\n  yy168:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy170;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy170;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy170;\n        goto yy94;\n      }\n    }\n  yy169:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy171;\n      if (yych <= '/')\n        goto yy94;\n      goto yy172;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy172;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy172;\n        goto yy94;\n      }\n    }\n  yy170:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy172;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy172;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy172;\n        goto yy94;\n      }\n    }\n  yy171:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy173;\n      if (yych <= '/')\n        goto yy94;\n      goto yy174;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy174;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy174;\n        goto yy94;\n      }\n    }\n  yy172:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy174;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy174;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy174;\n        goto yy94;\n      }\n    }\n  yy173:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy175;\n      if (yych <= '/')\n        goto yy94;\n      goto yy176;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy176;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy176;\n        goto yy94;\n      }\n    }\n  yy174:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy176;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy176;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy176;\n        goto yy94;\n      }\n    }\n  yy175:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy177;\n      if (yych <= '/')\n        goto yy94;\n      goto yy178;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy178;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy178;\n        goto yy94;\n      }\n    }\n  yy176:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy178;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy178;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy178;\n        goto yy94;\n      }\n    }\n  yy177:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy179;\n      if (yych <= '/')\n        goto yy94;\n      goto yy180;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy180;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy180;\n        goto yy94;\n      }\n    }\n  yy178:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy180;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy180;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy180;\n        goto yy94;\n      }\n    }\n  yy179:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy181;\n      if (yych <= '/')\n        goto yy94;\n      goto yy182;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy182;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy182;\n        goto yy94;\n      }\n    }\n  yy180:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy182;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy182;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy182;\n        goto yy94;\n      }\n    }\n  yy181:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy183;\n      if (yych <= '/')\n        goto yy94;\n      goto yy184;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy184;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy184;\n        goto yy94;\n      }\n    }\n  yy182:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy184;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy184;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy184;\n        goto yy94;\n      }\n    }\n  yy183:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy185;\n      if (yych <= '/')\n        goto yy94;\n      goto yy186;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy186;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy186;\n        goto yy94;\n      }\n    }\n  yy184:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy186;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy186;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy186;\n        goto yy94;\n      }\n    }\n  yy185:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy187;\n      if (yych <= '/')\n        goto yy94;\n      goto yy188;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy188;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy188;\n        goto yy94;\n      }\n    }\n  yy186:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy188;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy188;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy188;\n        goto yy94;\n      }\n    }\n  yy187:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy189;\n      if (yych <= '/')\n        goto yy94;\n      goto yy190;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy190;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy190;\n        goto yy94;\n      }\n    }\n  yy188:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy190;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy190;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy190;\n        goto yy94;\n      }\n    }\n  yy189:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy191;\n      if (yych <= '/')\n        goto yy94;\n      goto yy192;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy192;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy192;\n        goto yy94;\n      }\n    }\n  yy190:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy192;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy192;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy192;\n        goto yy94;\n      }\n    }\n  yy191:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy193;\n      if (yych <= '/')\n        goto yy94;\n      goto yy194;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy194;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy194;\n        goto yy94;\n      }\n    }\n  yy192:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy194;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy194;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy194;\n        goto yy94;\n      }\n    }\n  yy193:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy195;\n      if (yych <= '/')\n        goto yy94;\n      goto yy196;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy196;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy196;\n        goto yy94;\n      }\n    }\n  yy194:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy196;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy196;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy196;\n        goto yy94;\n      }\n    }\n  yy195:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy197;\n      if (yych <= '/')\n        goto yy94;\n      goto yy198;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy198;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy198;\n        goto yy94;\n      }\n    }\n  yy196:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy198;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy198;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy198;\n        goto yy94;\n      }\n    }\n  yy197:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy199;\n      if (yych <= '/')\n        goto yy94;\n      goto yy200;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy200;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy200;\n        goto yy94;\n      }\n    }\n  yy198:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy200;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy200;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy200;\n        goto yy94;\n      }\n    }\n  yy199:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy201;\n      if (yych <= '/')\n        goto yy94;\n      goto yy202;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy202;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy202;\n        goto yy94;\n      }\n    }\n  yy200:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy202;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy202;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy202;\n        goto yy94;\n      }\n    }\n  yy201:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy203;\n      if (yych <= '/')\n        goto yy94;\n      goto yy204;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy204;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy204;\n        goto yy94;\n      }\n    }\n  yy202:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy204;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy204;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy204;\n        goto yy94;\n      }\n    }\n  yy203:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy205;\n      if (yych <= '/')\n        goto yy94;\n      goto yy206;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy206;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy206;\n        goto yy94;\n      }\n    }\n  yy204:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy206;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy206;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy206;\n        goto yy94;\n      }\n    }\n  yy205:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy207;\n      if (yych <= '/')\n        goto yy94;\n      goto yy208;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy208;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy208;\n        goto yy94;\n      }\n    }\n  yy206:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy208;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy208;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy208;\n        goto yy94;\n      }\n    }\n  yy207:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy209;\n      if (yych <= '/')\n        goto yy94;\n      goto yy210;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy210;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy210;\n        goto yy94;\n      }\n    }\n  yy208:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy210;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy210;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy210;\n        goto yy94;\n      }\n    }\n  yy209:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy211;\n      if (yych <= '/')\n        goto yy94;\n      goto yy212;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy212;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy212;\n        goto yy94;\n      }\n    }\n  yy210:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy212;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy212;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy212;\n        goto yy94;\n      }\n    }\n  yy211:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy213;\n      if (yych <= '/')\n        goto yy94;\n      goto yy214;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy214;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy214;\n        goto yy94;\n      }\n    }\n  yy212:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy214;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy214;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy214;\n        goto yy94;\n      }\n    }\n  yy213:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy215;\n      if (yych <= '/')\n        goto yy94;\n      goto yy216;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy216;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy216;\n        goto yy94;\n      }\n    }\n  yy214:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy216;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy216;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy216;\n        goto yy94;\n      }\n    }\n  yy215:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy217;\n      if (yych <= '/')\n        goto yy94;\n      goto yy218;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy218;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy218;\n        goto yy94;\n      }\n    }\n  yy216:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy218;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy218;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy218;\n        goto yy94;\n      }\n    }\n  yy217:\n    ++p;\n    yych = *p;\n    if (yych <= '9') {\n      if (yych == '-')\n        goto yy219;\n      if (yych <= '/')\n        goto yy94;\n      goto yy220;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy94;\n        goto yy220;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy220;\n        goto yy94;\n      }\n    }\n  yy218:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= ',')\n          goto yy94;\n        if (yych >= '.')\n          goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych <= '9')\n          goto yy220;\n        goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n        goto yy220;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych <= 'z')\n          goto yy220;\n        goto yy94;\n      }\n    }\n  yy219:\n    ++p;\n    yych = *p;\n    if (yych <= '@') {\n      if (yych <= '/')\n        goto yy94;\n      if (yych <= '9')\n        goto yy221;\n      goto yy94;\n    } else {\n      if (yych <= 'Z')\n        goto yy221;\n      if (yych <= '`')\n        goto yy94;\n      if (yych <= 'z')\n        goto yy221;\n      goto yy94;\n    }\n  yy220:\n    ++p;\n    yych = *p;\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych <= '-')\n          goto yy94;\n        goto yy95;\n      } else {\n        if (yych <= '/')\n          goto yy94;\n        if (yych >= ':')\n          goto yy94;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy99;\n        if (yych <= '@')\n          goto yy94;\n      } else {\n        if (yych <= '`')\n          goto yy94;\n        if (yych >= '{')\n          goto yy94;\n      }\n    }\n  yy221:\n    ++p;\n    yych = *p;\n    if (yych == '.')\n      goto yy95;\n    if (yych == '>')\n      goto yy99;\n    goto yy94;\n  }\n}\n\n// Try to match an HTML tag after first <, returning num of chars matched.\nbufsize_t _scan_html_tag(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n\n  {\n    unsigned char yych;\n    static const unsigned char yybm[] = {\n        /* table 1 .. 8: 0 */\n        0,\n        250,\n        250,\n        250,\n        250,\n        250,\n        250,\n        250,\n        250,\n        235,\n        235,\n        235,\n        235,\n        235,\n        250,\n        250,\n        250,\n        250,\n        250,\n        250,\n        250,\n        250,\n        250,\n        250,\n        250,\n        250,\n        250,\n        250,\n        250,\n        250,\n        250,\n        250,\n        235,\n        250,\n        202,\n        250,\n        250,\n        250,\n        250,\n        170,\n        250,\n        250,\n        250,\n        250,\n        250,\n        246,\n        254,\n        250,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        250,\n        234,\n        234,\n        232,\n        250,\n        250,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        250,\n        250,\n        122,\n        250,\n        254,\n        234,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        254,\n        250,\n        250,\n        250,\n        250,\n        250,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        /* table 9 .. 11: 256 */\n        0,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        192,\n        128,\n        128,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        128,\n        128,\n        128,\n        128,\n        128,\n        0,\n        128,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        224,\n        128,\n        128,\n        128,\n        128,\n        128,\n        128,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        192,\n        128,\n        128,\n        128,\n        128,\n        128,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n        0,\n    };\n    yych = *p;\n    if (yych <= '>') {\n      if (yych <= '!') {\n        if (yych >= '!')\n          goto yy226;\n      } else {\n        if (yych == '/')\n          goto yy227;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '?')\n          goto yy228;\n        if (yych >= 'A')\n          goto yy229;\n      } else {\n        if (yych <= '`')\n          goto yy224;\n        if (yych <= 'z')\n          goto yy229;\n      }\n    }\n  yy224:\n    ++p;\n  yy225 : { return 0; }\n  yy226:\n    yych = *(marker = ++p);\n    if (yybm[256 + yych] & 32) {\n      goto yy232;\n    }\n    if (yych == '-')\n      goto yy230;\n    if (yych <= '@')\n      goto yy225;\n    if (yych <= '[')\n      goto yy234;\n    goto yy225;\n  yy227:\n    yych = *(marker = ++p);\n    if (yych <= '@')\n      goto yy225;\n    if (yych <= 'Z')\n      goto yy235;\n    if (yych <= '`')\n      goto yy225;\n    if (yych <= 'z')\n      goto yy235;\n    goto yy225;\n  yy228:\n    yych = *(marker = ++p);\n    if (yych <= 0x00)\n      goto yy225;\n    if (yych <= 0x7F)\n      goto yy238;\n    if (yych <= 0xC1)\n      goto yy225;\n    if (yych <= 0xF4)\n      goto yy238;\n    goto yy225;\n  yy229:\n    yych = *(marker = ++p);\n    if (yybm[0 + yych] & 1) {\n      goto yy247;\n    }\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych == '-')\n          goto yy249;\n        goto yy225;\n      } else {\n        if (yych <= '/')\n          goto yy251;\n        if (yych <= '9')\n          goto yy249;\n        goto yy225;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy252;\n        if (yych <= '@')\n          goto yy225;\n        goto yy249;\n      } else {\n        if (yych <= '`')\n          goto yy225;\n        if (yych <= 'z')\n          goto yy249;\n        goto yy225;\n      }\n    }\n  yy230:\n    yych = *++p;\n    if (yych == '-')\n      goto yy254;\n  yy231:\n    p = marker;\n    goto yy225;\n  yy232:\n    ++p;\n    yych = *p;\n    if (yybm[256 + yych] & 32) {\n      goto yy232;\n    }\n    if (yych <= 0x08)\n      goto yy231;\n    if (yych <= '\\r')\n      goto yy255;\n    if (yych == ' ')\n      goto yy255;\n    goto yy231;\n  yy234:\n    yych = *++p;\n    if (yych == 'C')\n      goto yy257;\n    if (yych == 'c')\n      goto yy257;\n    goto yy231;\n  yy235:\n    ++p;\n    yych = *p;\n    if (yybm[256 + yych] & 64) {\n      goto yy235;\n    }\n    if (yych <= 0x1F) {\n      if (yych <= 0x08)\n        goto yy231;\n      if (yych <= '\\r')\n        goto yy258;\n      goto yy231;\n    } else {\n      if (yych <= ' ')\n        goto yy258;\n      if (yych == '>')\n        goto yy252;\n      goto yy231;\n    }\n  yy237:\n    ++p;\n    yych = *p;\n  yy238:\n    if (yybm[256 + yych] & 128) {\n      goto yy237;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= 0x00)\n          goto yy231;\n        if (yych >= '@')\n          goto yy231;\n      } else {\n        if (yych <= 0xDF)\n          goto yy240;\n        if (yych <= 0xE0)\n          goto yy241;\n        goto yy242;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy243;\n        if (yych <= 0xEF)\n          goto yy242;\n        goto yy244;\n      } else {\n        if (yych <= 0xF3)\n          goto yy245;\n        if (yych <= 0xF4)\n          goto yy246;\n        goto yy231;\n      }\n    }\n    ++p;\n    yych = *p;\n    if (yych <= 0xE0) {\n      if (yych <= '>') {\n        if (yych <= 0x00)\n          goto yy231;\n        if (yych <= '=')\n          goto yy237;\n        goto yy252;\n      } else {\n        if (yych <= 0x7F)\n          goto yy237;\n        if (yych <= 0xC1)\n          goto yy231;\n        if (yych >= 0xE0)\n          goto yy241;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych == 0xED)\n          goto yy243;\n        goto yy242;\n      } else {\n        if (yych <= 0xF0)\n          goto yy244;\n        if (yych <= 0xF3)\n          goto yy245;\n        if (yych <= 0xF4)\n          goto yy246;\n        goto yy231;\n      }\n    }\n  yy240:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy237;\n    goto yy231;\n  yy241:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy240;\n    goto yy231;\n  yy242:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy240;\n    goto yy231;\n  yy243:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0x9F)\n      goto yy240;\n    goto yy231;\n  yy244:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy242;\n    goto yy231;\n  yy245:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy242;\n    goto yy231;\n  yy246:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0x8F)\n      goto yy242;\n    goto yy231;\n  yy247:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 1) {\n      goto yy247;\n    }\n    if (yych <= '>') {\n      if (yych <= '9') {\n        if (yych == '/')\n          goto yy251;\n        goto yy231;\n      } else {\n        if (yych <= ':')\n          goto yy260;\n        if (yych <= '=')\n          goto yy231;\n        goto yy252;\n      }\n    } else {\n      if (yych <= '^') {\n        if (yych <= '@')\n          goto yy231;\n        if (yych <= 'Z')\n          goto yy260;\n        goto yy231;\n      } else {\n        if (yych == '`')\n          goto yy231;\n        if (yych <= 'z')\n          goto yy260;\n        goto yy231;\n      }\n    }\n  yy249:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 1) {\n      goto yy247;\n    }\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych == '-')\n          goto yy249;\n        goto yy231;\n      } else {\n        if (yych <= '/')\n          goto yy251;\n        if (yych <= '9')\n          goto yy249;\n        goto yy231;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy252;\n        if (yych <= '@')\n          goto yy231;\n        goto yy249;\n      } else {\n        if (yych <= '`')\n          goto yy231;\n        if (yych <= 'z')\n          goto yy249;\n        goto yy231;\n      }\n    }\n  yy251:\n    yych = *++p;\n    if (yych != '>')\n      goto yy231;\n  yy252:\n    ++p;\n    { return (bufsize_t)(p - start); }\n  yy254:\n    yych = *++p;\n    if (yych == '-')\n      goto yy264;\n    if (yych == '>')\n      goto yy231;\n    goto yy263;\n  yy255:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 2) {\n      goto yy255;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= 0x00)\n          goto yy231;\n        if (yych <= '>')\n          goto yy252;\n        goto yy231;\n      } else {\n        if (yych <= 0xDF)\n          goto yy272;\n        if (yych <= 0xE0)\n          goto yy273;\n        goto yy274;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy275;\n        if (yych <= 0xEF)\n          goto yy274;\n        goto yy276;\n      } else {\n        if (yych <= 0xF3)\n          goto yy277;\n        if (yych <= 0xF4)\n          goto yy278;\n        goto yy231;\n      }\n    }\n  yy257:\n    yych = *++p;\n    if (yych == 'D')\n      goto yy279;\n    if (yych == 'd')\n      goto yy279;\n    goto yy231;\n  yy258:\n    ++p;\n    yych = *p;\n    if (yych <= 0x1F) {\n      if (yych <= 0x08)\n        goto yy231;\n      if (yych <= '\\r')\n        goto yy258;\n      goto yy231;\n    } else {\n      if (yych <= ' ')\n        goto yy258;\n      if (yych == '>')\n        goto yy252;\n      goto yy231;\n    }\n  yy260:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 4) {\n      goto yy260;\n    }\n    if (yych <= ',') {\n      if (yych <= '\\r') {\n        if (yych <= 0x08)\n          goto yy231;\n        goto yy280;\n      } else {\n        if (yych == ' ')\n          goto yy280;\n        goto yy231;\n      }\n    } else {\n      if (yych <= '<') {\n        if (yych <= '/')\n          goto yy251;\n        goto yy231;\n      } else {\n        if (yych <= '=')\n          goto yy282;\n        if (yych <= '>')\n          goto yy252;\n        goto yy231;\n      }\n    }\n  yy262:\n    ++p;\n    yych = *p;\n  yy263:\n    if (yybm[0 + yych] & 8) {\n      goto yy262;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= 0x00)\n          goto yy231;\n        if (yych <= '-')\n          goto yy284;\n        goto yy231;\n      } else {\n        if (yych <= 0xDF)\n          goto yy265;\n        if (yych <= 0xE0)\n          goto yy266;\n        goto yy267;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy268;\n        if (yych <= 0xEF)\n          goto yy267;\n        goto yy269;\n      } else {\n        if (yych <= 0xF3)\n          goto yy270;\n        if (yych <= 0xF4)\n          goto yy271;\n        goto yy231;\n      }\n    }\n  yy264:\n    yych = *++p;\n    if (yych == '-')\n      goto yy251;\n    if (yych == '>')\n      goto yy231;\n    goto yy263;\n  yy265:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy262;\n    goto yy231;\n  yy266:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy265;\n    goto yy231;\n  yy267:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy265;\n    goto yy231;\n  yy268:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0x9F)\n      goto yy265;\n    goto yy231;\n  yy269:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy267;\n    goto yy231;\n  yy270:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy267;\n    goto yy231;\n  yy271:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0x8F)\n      goto yy267;\n    goto yy231;\n  yy272:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy255;\n    goto yy231;\n  yy273:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy272;\n    goto yy231;\n  yy274:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy272;\n    goto yy231;\n  yy275:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0x9F)\n      goto yy272;\n    goto yy231;\n  yy276:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy274;\n    goto yy231;\n  yy277:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy274;\n    goto yy231;\n  yy278:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0x8F)\n      goto yy274;\n    goto yy231;\n  yy279:\n    yych = *++p;\n    if (yych == 'A')\n      goto yy285;\n    if (yych == 'a')\n      goto yy285;\n    goto yy231;\n  yy280:\n    ++p;\n    yych = *p;\n    if (yych <= '<') {\n      if (yych <= ' ') {\n        if (yych <= 0x08)\n          goto yy231;\n        if (yych <= '\\r')\n          goto yy280;\n        if (yych <= 0x1F)\n          goto yy231;\n        goto yy280;\n      } else {\n        if (yych <= '/') {\n          if (yych <= '.')\n            goto yy231;\n          goto yy251;\n        } else {\n          if (yych == ':')\n            goto yy260;\n          goto yy231;\n        }\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '=')\n          goto yy282;\n        if (yych <= '>')\n          goto yy252;\n        if (yych <= '@')\n          goto yy231;\n        goto yy260;\n      } else {\n        if (yych <= '_') {\n          if (yych <= '^')\n            goto yy231;\n          goto yy260;\n        } else {\n          if (yych <= '`')\n            goto yy231;\n          if (yych <= 'z')\n            goto yy260;\n          goto yy231;\n        }\n      }\n    }\n  yy282:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 16) {\n      goto yy286;\n    }\n    if (yych <= 0xE0) {\n      if (yych <= '\"') {\n        if (yych <= 0x00)\n          goto yy231;\n        if (yych <= ' ')\n          goto yy282;\n        goto yy288;\n      } else {\n        if (yych <= '\\'')\n          goto yy290;\n        if (yych <= 0xC1)\n          goto yy231;\n        if (yych <= 0xDF)\n          goto yy292;\n        goto yy293;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych == 0xED)\n          goto yy295;\n        goto yy294;\n      } else {\n        if (yych <= 0xF0)\n          goto yy296;\n        if (yych <= 0xF3)\n          goto yy297;\n        if (yych <= 0xF4)\n          goto yy298;\n        goto yy231;\n      }\n    }\n  yy284:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 8) {\n      goto yy262;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= 0x00)\n          goto yy231;\n        if (yych <= '-')\n          goto yy251;\n        goto yy231;\n      } else {\n        if (yych <= 0xDF)\n          goto yy265;\n        if (yych <= 0xE0)\n          goto yy266;\n        goto yy267;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy268;\n        if (yych <= 0xEF)\n          goto yy267;\n        goto yy269;\n      } else {\n        if (yych <= 0xF3)\n          goto yy270;\n        if (yych <= 0xF4)\n          goto yy271;\n        goto yy231;\n      }\n    }\n  yy285:\n    yych = *++p;\n    if (yych == 'T')\n      goto yy299;\n    if (yych == 't')\n      goto yy299;\n    goto yy231;\n  yy286:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 16) {\n      goto yy286;\n    }\n    if (yych <= 0xE0) {\n      if (yych <= '=') {\n        if (yych <= 0x00)\n          goto yy231;\n        if (yych <= ' ')\n          goto yy247;\n        goto yy231;\n      } else {\n        if (yych <= '>')\n          goto yy252;\n        if (yych <= 0xC1)\n          goto yy231;\n        if (yych <= 0xDF)\n          goto yy292;\n        goto yy293;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych == 0xED)\n          goto yy295;\n        goto yy294;\n      } else {\n        if (yych <= 0xF0)\n          goto yy296;\n        if (yych <= 0xF3)\n          goto yy297;\n        if (yych <= 0xF4)\n          goto yy298;\n        goto yy231;\n      }\n    }\n  yy288:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 32) {\n      goto yy288;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= 0x00)\n          goto yy231;\n        if (yych <= '\"')\n          goto yy300;\n        goto yy231;\n      } else {\n        if (yych <= 0xDF)\n          goto yy301;\n        if (yych <= 0xE0)\n          goto yy302;\n        goto yy303;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy304;\n        if (yych <= 0xEF)\n          goto yy303;\n        goto yy305;\n      } else {\n        if (yych <= 0xF3)\n          goto yy306;\n        if (yych <= 0xF4)\n          goto yy307;\n        goto yy231;\n      }\n    }\n  yy290:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 64) {\n      goto yy290;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= 0x00)\n          goto yy231;\n        if (yych <= '\\'')\n          goto yy300;\n        goto yy231;\n      } else {\n        if (yych <= 0xDF)\n          goto yy308;\n        if (yych <= 0xE0)\n          goto yy309;\n        goto yy310;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy311;\n        if (yych <= 0xEF)\n          goto yy310;\n        goto yy312;\n      } else {\n        if (yych <= 0xF3)\n          goto yy313;\n        if (yych <= 0xF4)\n          goto yy314;\n        goto yy231;\n      }\n    }\n  yy292:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy286;\n    goto yy231;\n  yy293:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy292;\n    goto yy231;\n  yy294:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy292;\n    goto yy231;\n  yy295:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0x9F)\n      goto yy292;\n    goto yy231;\n  yy296:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy294;\n    goto yy231;\n  yy297:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy294;\n    goto yy231;\n  yy298:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0x8F)\n      goto yy294;\n    goto yy231;\n  yy299:\n    yych = *++p;\n    if (yych == 'A')\n      goto yy315;\n    if (yych == 'a')\n      goto yy315;\n    goto yy231;\n  yy300:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 1) {\n      goto yy247;\n    }\n    if (yych == '/')\n      goto yy251;\n    if (yych == '>')\n      goto yy252;\n    goto yy231;\n  yy301:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy288;\n    goto yy231;\n  yy302:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy301;\n    goto yy231;\n  yy303:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy301;\n    goto yy231;\n  yy304:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0x9F)\n      goto yy301;\n    goto yy231;\n  yy305:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy303;\n    goto yy231;\n  yy306:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy303;\n    goto yy231;\n  yy307:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0x8F)\n      goto yy303;\n    goto yy231;\n  yy308:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy290;\n    goto yy231;\n  yy309:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy308;\n    goto yy231;\n  yy310:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy308;\n    goto yy231;\n  yy311:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0x9F)\n      goto yy308;\n    goto yy231;\n  yy312:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy310;\n    goto yy231;\n  yy313:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy310;\n    goto yy231;\n  yy314:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0x8F)\n      goto yy310;\n    goto yy231;\n  yy315:\n    yych = *++p;\n    if (yych != '[')\n      goto yy231;\n  yy316:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy316;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= 0x00)\n          goto yy231;\n        if (yych >= '^')\n          goto yy231;\n      } else {\n        if (yych <= 0xDF)\n          goto yy319;\n        if (yych <= 0xE0)\n          goto yy320;\n        goto yy321;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy322;\n        if (yych <= 0xEF)\n          goto yy321;\n        goto yy323;\n      } else {\n        if (yych <= 0xF3)\n          goto yy324;\n        if (yych <= 0xF4)\n          goto yy325;\n        goto yy231;\n      }\n    }\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy316;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= 0x00)\n          goto yy231;\n        if (yych <= ']')\n          goto yy326;\n        goto yy231;\n      } else {\n        if (yych <= 0xDF)\n          goto yy319;\n        if (yych <= 0xE0)\n          goto yy320;\n        goto yy321;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy322;\n        if (yych <= 0xEF)\n          goto yy321;\n        goto yy323;\n      } else {\n        if (yych <= 0xF3)\n          goto yy324;\n        if (yych <= 0xF4)\n          goto yy325;\n        goto yy231;\n      }\n    }\n  yy319:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy316;\n    goto yy231;\n  yy320:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy319;\n    goto yy231;\n  yy321:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy319;\n    goto yy231;\n  yy322:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0x9F)\n      goto yy319;\n    goto yy231;\n  yy323:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy321;\n    goto yy231;\n  yy324:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0xBF)\n      goto yy321;\n    goto yy231;\n  yy325:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy231;\n    if (yych <= 0x8F)\n      goto yy321;\n    goto yy231;\n  yy326:\n    ++p;\n    yych = *p;\n    if (yych <= 0xE0) {\n      if (yych <= '>') {\n        if (yych <= 0x00)\n          goto yy231;\n        if (yych <= '=')\n          goto yy316;\n        goto yy252;\n      } else {\n        if (yych <= 0x7F)\n          goto yy316;\n        if (yych <= 0xC1)\n          goto yy231;\n        if (yych <= 0xDF)\n          goto yy319;\n        goto yy320;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych == 0xED)\n          goto yy322;\n        goto yy321;\n      } else {\n        if (yych <= 0xF0)\n          goto yy323;\n        if (yych <= 0xF3)\n          goto yy324;\n        if (yych <= 0xF4)\n          goto yy325;\n        goto yy231;\n      }\n    }\n  }\n}\n\n// Try to match an HTML block tag start line, returning\n// an integer code for the type of block (1-6, matching the spec).\n// #7 is handled by a separate function, below.\nbufsize_t _scan_html_block_start(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n\n  {\n    unsigned char yych;\n    yych = *p;\n    if (yych == '<')\n      goto yy331;\n    ++p;\n  yy330 : { return 0; }\n  yy331:\n    yych = *(marker = ++p);\n    switch (yych) {\n    case '!':\n      goto yy332;\n    case '/':\n      goto yy334;\n    case '?':\n      goto yy335;\n    case 'A':\n    case 'a':\n      goto yy337;\n    case 'B':\n    case 'b':\n      goto yy338;\n    case 'C':\n    case 'c':\n      goto yy339;\n    case 'D':\n    case 'd':\n      goto yy340;\n    case 'F':\n    case 'f':\n      goto yy341;\n    case 'H':\n    case 'h':\n      goto yy342;\n    case 'I':\n    case 'i':\n      goto yy343;\n    case 'L':\n    case 'l':\n      goto yy344;\n    case 'M':\n    case 'm':\n      goto yy345;\n    case 'N':\n    case 'n':\n      goto yy346;\n    case 'O':\n    case 'o':\n      goto yy347;\n    case 'P':\n    case 'p':\n      goto yy348;\n    case 'S':\n    case 's':\n      goto yy349;\n    case 'T':\n    case 't':\n      goto yy350;\n    case 'U':\n    case 'u':\n      goto yy351;\n    default:\n      goto yy330;\n    }\n  yy332:\n    yych = *++p;\n    if (yych <= '@') {\n      if (yych == '-')\n        goto yy352;\n    } else {\n      if (yych <= 'Z')\n        goto yy353;\n      if (yych <= '[')\n        goto yy355;\n    }\n  yy333:\n    p = marker;\n    goto yy330;\n  yy334:\n    yych = *++p;\n    switch (yych) {\n    case 'A':\n    case 'a':\n      goto yy337;\n    case 'B':\n    case 'b':\n      goto yy338;\n    case 'C':\n    case 'c':\n      goto yy339;\n    case 'D':\n    case 'd':\n      goto yy340;\n    case 'F':\n    case 'f':\n      goto yy341;\n    case 'H':\n    case 'h':\n      goto yy342;\n    case 'I':\n    case 'i':\n      goto yy343;\n    case 'L':\n    case 'l':\n      goto yy344;\n    case 'M':\n    case 'm':\n      goto yy345;\n    case 'N':\n    case 'n':\n      goto yy346;\n    case 'O':\n    case 'o':\n      goto yy347;\n    case 'P':\n    case 'p':\n      goto yy356;\n    case 'S':\n    case 's':\n      goto yy357;\n    case 'T':\n    case 't':\n      goto yy350;\n    case 'U':\n    case 'u':\n      goto yy351;\n    default:\n      goto yy333;\n    }\n  yy335:\n    ++p;\n    { return 3; }\n  yy337:\n    yych = *++p;\n    if (yych <= 'S') {\n      if (yych <= 'D') {\n        if (yych <= 'C')\n          goto yy333;\n        goto yy358;\n      } else {\n        if (yych <= 'Q')\n          goto yy333;\n        if (yych <= 'R')\n          goto yy359;\n        goto yy360;\n      }\n    } else {\n      if (yych <= 'q') {\n        if (yych == 'd')\n          goto yy358;\n        goto yy333;\n      } else {\n        if (yych <= 'r')\n          goto yy359;\n        if (yych <= 's')\n          goto yy360;\n        goto yy333;\n      }\n    }\n  yy338:\n    yych = *++p;\n    if (yych <= 'O') {\n      if (yych <= 'K') {\n        if (yych == 'A')\n          goto yy361;\n        goto yy333;\n      } else {\n        if (yych <= 'L')\n          goto yy362;\n        if (yych <= 'N')\n          goto yy333;\n        goto yy363;\n      }\n    } else {\n      if (yych <= 'k') {\n        if (yych == 'a')\n          goto yy361;\n        goto yy333;\n      } else {\n        if (yych <= 'l')\n          goto yy362;\n        if (yych == 'o')\n          goto yy363;\n        goto yy333;\n      }\n    }\n  yy339:\n    yych = *++p;\n    if (yych <= 'O') {\n      if (yych <= 'D') {\n        if (yych == 'A')\n          goto yy364;\n        goto yy333;\n      } else {\n        if (yych <= 'E')\n          goto yy365;\n        if (yych <= 'N')\n          goto yy333;\n        goto yy366;\n      }\n    } else {\n      if (yych <= 'd') {\n        if (yych == 'a')\n          goto yy364;\n        goto yy333;\n      } else {\n        if (yych <= 'e')\n          goto yy365;\n        if (yych == 'o')\n          goto yy366;\n        goto yy333;\n      }\n    }\n  yy340:\n    yych = *++p;\n    switch (yych) {\n    case 'D':\n    case 'L':\n    case 'T':\n    case 'd':\n    case 'l':\n    case 't':\n      goto yy367;\n    case 'E':\n    case 'e':\n      goto yy368;\n    case 'I':\n    case 'i':\n      goto yy369;\n    default:\n      goto yy333;\n    }\n  yy341:\n    yych = *++p;\n    if (yych <= 'R') {\n      if (yych <= 'N') {\n        if (yych == 'I')\n          goto yy370;\n        goto yy333;\n      } else {\n        if (yych <= 'O')\n          goto yy371;\n        if (yych <= 'Q')\n          goto yy333;\n        goto yy372;\n      }\n    } else {\n      if (yych <= 'n') {\n        if (yych == 'i')\n          goto yy370;\n        goto yy333;\n      } else {\n        if (yych <= 'o')\n          goto yy371;\n        if (yych == 'r')\n          goto yy372;\n        goto yy333;\n      }\n    }\n  yy342:\n    yych = *++p;\n    if (yych <= 'S') {\n      if (yych <= 'D') {\n        if (yych <= '0')\n          goto yy333;\n        if (yych <= '6')\n          goto yy367;\n        goto yy333;\n      } else {\n        if (yych <= 'E')\n          goto yy373;\n        if (yych == 'R')\n          goto yy367;\n        goto yy333;\n      }\n    } else {\n      if (yych <= 'q') {\n        if (yych <= 'T')\n          goto yy374;\n        if (yych == 'e')\n          goto yy373;\n        goto yy333;\n      } else {\n        if (yych <= 'r')\n          goto yy367;\n        if (yych == 't')\n          goto yy374;\n        goto yy333;\n      }\n    }\n  yy343:\n    yych = *++p;\n    if (yych == 'F')\n      goto yy375;\n    if (yych == 'f')\n      goto yy375;\n    goto yy333;\n  yy344:\n    yych = *++p;\n    if (yych <= 'I') {\n      if (yych == 'E')\n        goto yy376;\n      if (yych <= 'H')\n        goto yy333;\n      goto yy377;\n    } else {\n      if (yych <= 'e') {\n        if (yych <= 'd')\n          goto yy333;\n        goto yy376;\n      } else {\n        if (yych == 'i')\n          goto yy377;\n        goto yy333;\n      }\n    }\n  yy345:\n    yych = *++p;\n    if (yych <= 'E') {\n      if (yych == 'A')\n        goto yy378;\n      if (yych <= 'D')\n        goto yy333;\n      goto yy379;\n    } else {\n      if (yych <= 'a') {\n        if (yych <= '`')\n          goto yy333;\n        goto yy378;\n      } else {\n        if (yych == 'e')\n          goto yy379;\n        goto yy333;\n      }\n    }\n  yy346:\n    yych = *++p;\n    if (yych <= 'O') {\n      if (yych == 'A')\n        goto yy380;\n      if (yych <= 'N')\n        goto yy333;\n      goto yy381;\n    } else {\n      if (yych <= 'a') {\n        if (yych <= '`')\n          goto yy333;\n        goto yy380;\n      } else {\n        if (yych == 'o')\n          goto yy381;\n        goto yy333;\n      }\n    }\n  yy347:\n    yych = *++p;\n    if (yych <= 'P') {\n      if (yych == 'L')\n        goto yy367;\n      if (yych <= 'O')\n        goto yy333;\n      goto yy382;\n    } else {\n      if (yych <= 'l') {\n        if (yych <= 'k')\n          goto yy333;\n        goto yy367;\n      } else {\n        if (yych == 'p')\n          goto yy382;\n        goto yy333;\n      }\n    }\n  yy348:\n    yych = *++p;\n    if (yych <= '>') {\n      if (yych <= ' ') {\n        if (yych <= 0x08)\n          goto yy333;\n        if (yych <= '\\r')\n          goto yy383;\n        if (yych <= 0x1F)\n          goto yy333;\n        goto yy383;\n      } else {\n        if (yych == '/')\n          goto yy385;\n        if (yych <= '=')\n          goto yy333;\n        goto yy383;\n      }\n    } else {\n      if (yych <= 'R') {\n        if (yych == 'A')\n          goto yy386;\n        if (yych <= 'Q')\n          goto yy333;\n        goto yy387;\n      } else {\n        if (yych <= 'a') {\n          if (yych <= '`')\n            goto yy333;\n          goto yy386;\n        } else {\n          if (yych == 'r')\n            goto yy387;\n          goto yy333;\n        }\n      }\n    }\n  yy349:\n    yych = *++p;\n    switch (yych) {\n    case 'C':\n    case 'c':\n      goto yy388;\n    case 'E':\n    case 'e':\n      goto yy389;\n    case 'O':\n    case 'o':\n      goto yy390;\n    case 'T':\n    case 't':\n      goto yy391;\n    case 'U':\n    case 'u':\n      goto yy392;\n    default:\n      goto yy333;\n    }\n  yy350:\n    yych = *++p;\n    switch (yych) {\n    case 'A':\n    case 'a':\n      goto yy393;\n    case 'B':\n    case 'b':\n      goto yy394;\n    case 'D':\n    case 'd':\n      goto yy367;\n    case 'F':\n    case 'f':\n      goto yy395;\n    case 'H':\n    case 'h':\n      goto yy396;\n    case 'I':\n    case 'i':\n      goto yy397;\n    case 'R':\n    case 'r':\n      goto yy398;\n    default:\n      goto yy333;\n    }\n  yy351:\n    yych = *++p;\n    if (yych == 'L')\n      goto yy367;\n    if (yych == 'l')\n      goto yy367;\n    goto yy333;\n  yy352:\n    yych = *++p;\n    if (yych == '-')\n      goto yy399;\n    goto yy333;\n  yy353:\n    ++p;\n    { return 4; }\n  yy355:\n    yych = *++p;\n    if (yych == 'C')\n      goto yy401;\n    if (yych == 'c')\n      goto yy401;\n    goto yy333;\n  yy356:\n    yych = *++p;\n    if (yych <= '/') {\n      if (yych <= 0x1F) {\n        if (yych <= 0x08)\n          goto yy333;\n        if (yych <= '\\r')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= ' ')\n          goto yy383;\n        if (yych <= '.')\n          goto yy333;\n        goto yy385;\n      }\n    } else {\n      if (yych <= '@') {\n        if (yych == '>')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= 'A')\n          goto yy386;\n        if (yych == 'a')\n          goto yy386;\n        goto yy333;\n      }\n    }\n  yy357:\n    yych = *++p;\n    if (yych <= 'U') {\n      if (yych <= 'N') {\n        if (yych == 'E')\n          goto yy389;\n        goto yy333;\n      } else {\n        if (yych <= 'O')\n          goto yy390;\n        if (yych <= 'T')\n          goto yy333;\n        goto yy392;\n      }\n    } else {\n      if (yych <= 'n') {\n        if (yych == 'e')\n          goto yy389;\n        goto yy333;\n      } else {\n        if (yych <= 'o')\n          goto yy390;\n        if (yych == 'u')\n          goto yy392;\n        goto yy333;\n      }\n    }\n  yy358:\n    yych = *++p;\n    if (yych == 'D')\n      goto yy402;\n    if (yych == 'd')\n      goto yy402;\n    goto yy333;\n  yy359:\n    yych = *++p;\n    if (yych == 'T')\n      goto yy403;\n    if (yych == 't')\n      goto yy403;\n    goto yy333;\n  yy360:\n    yych = *++p;\n    if (yych == 'I')\n      goto yy404;\n    if (yych == 'i')\n      goto yy404;\n    goto yy333;\n  yy361:\n    yych = *++p;\n    if (yych == 'S')\n      goto yy405;\n    if (yych == 's')\n      goto yy405;\n    goto yy333;\n  yy362:\n    yych = *++p;\n    if (yych == 'O')\n      goto yy406;\n    if (yych == 'o')\n      goto yy406;\n    goto yy333;\n  yy363:\n    yych = *++p;\n    if (yych == 'D')\n      goto yy407;\n    if (yych == 'd')\n      goto yy407;\n    goto yy333;\n  yy364:\n    yych = *++p;\n    if (yych == 'P')\n      goto yy408;\n    if (yych == 'p')\n      goto yy408;\n    goto yy333;\n  yy365:\n    yych = *++p;\n    if (yych == 'N')\n      goto yy409;\n    if (yych == 'n')\n      goto yy409;\n    goto yy333;\n  yy366:\n    yych = *++p;\n    if (yych == 'L')\n      goto yy410;\n    if (yych == 'l')\n      goto yy410;\n    goto yy333;\n  yy367:\n    yych = *++p;\n    if (yych <= ' ') {\n      if (yych <= 0x08)\n        goto yy333;\n      if (yych <= '\\r')\n        goto yy383;\n      if (yych <= 0x1F)\n        goto yy333;\n      goto yy383;\n    } else {\n      if (yych <= '/') {\n        if (yych <= '.')\n          goto yy333;\n        goto yy385;\n      } else {\n        if (yych == '>')\n          goto yy383;\n        goto yy333;\n      }\n    }\n  yy368:\n    yych = *++p;\n    if (yych == 'T')\n      goto yy411;\n    if (yych == 't')\n      goto yy411;\n    goto yy333;\n  yy369:\n    yych = *++p;\n    if (yych <= 'V') {\n      if (yych <= 'Q') {\n        if (yych == 'A')\n          goto yy412;\n        goto yy333;\n      } else {\n        if (yych <= 'R')\n          goto yy367;\n        if (yych <= 'U')\n          goto yy333;\n        goto yy367;\n      }\n    } else {\n      if (yych <= 'q') {\n        if (yych == 'a')\n          goto yy412;\n        goto yy333;\n      } else {\n        if (yych <= 'r')\n          goto yy367;\n        if (yych == 'v')\n          goto yy367;\n        goto yy333;\n      }\n    }\n  yy370:\n    yych = *++p;\n    if (yych <= 'G') {\n      if (yych == 'E')\n        goto yy413;\n      if (yych <= 'F')\n        goto yy333;\n      goto yy414;\n    } else {\n      if (yych <= 'e') {\n        if (yych <= 'd')\n          goto yy333;\n        goto yy413;\n      } else {\n        if (yych == 'g')\n          goto yy414;\n        goto yy333;\n      }\n    }\n  yy371:\n    yych = *++p;\n    if (yych <= 'R') {\n      if (yych == 'O')\n        goto yy409;\n      if (yych <= 'Q')\n        goto yy333;\n      goto yy415;\n    } else {\n      if (yych <= 'o') {\n        if (yych <= 'n')\n          goto yy333;\n        goto yy409;\n      } else {\n        if (yych == 'r')\n          goto yy415;\n        goto yy333;\n      }\n    }\n  yy372:\n    yych = *++p;\n    if (yych == 'A')\n      goto yy416;\n    if (yych == 'a')\n      goto yy416;\n    goto yy333;\n  yy373:\n    yych = *++p;\n    if (yych == 'A')\n      goto yy417;\n    if (yych == 'a')\n      goto yy417;\n    goto yy333;\n  yy374:\n    yych = *++p;\n    if (yych == 'M')\n      goto yy351;\n    if (yych == 'm')\n      goto yy351;\n    goto yy333;\n  yy375:\n    yych = *++p;\n    if (yych == 'R')\n      goto yy418;\n    if (yych == 'r')\n      goto yy418;\n    goto yy333;\n  yy376:\n    yych = *++p;\n    if (yych == 'G')\n      goto yy419;\n    if (yych == 'g')\n      goto yy419;\n    goto yy333;\n  yy377:\n    yych = *++p;\n    if (yych <= '/') {\n      if (yych <= 0x1F) {\n        if (yych <= 0x08)\n          goto yy333;\n        if (yych <= '\\r')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= ' ')\n          goto yy383;\n        if (yych <= '.')\n          goto yy333;\n        goto yy385;\n      }\n    } else {\n      if (yych <= 'M') {\n        if (yych == '>')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= 'N')\n          goto yy420;\n        if (yych == 'n')\n          goto yy420;\n        goto yy333;\n      }\n    }\n  yy378:\n    yych = *++p;\n    if (yych == 'I')\n      goto yy421;\n    if (yych == 'i')\n      goto yy421;\n    goto yy333;\n  yy379:\n    yych = *++p;\n    if (yych == 'N')\n      goto yy422;\n    if (yych == 'n')\n      goto yy422;\n    goto yy333;\n  yy380:\n    yych = *++p;\n    if (yych == 'V')\n      goto yy367;\n    if (yych == 'v')\n      goto yy367;\n    goto yy333;\n  yy381:\n    yych = *++p;\n    if (yych == 'F')\n      goto yy423;\n    if (yych == 'f')\n      goto yy423;\n    goto yy333;\n  yy382:\n    yych = *++p;\n    if (yych == 'T')\n      goto yy424;\n    if (yych == 't')\n      goto yy424;\n    goto yy333;\n  yy383:\n    ++p;\n    { return 6; }\n  yy385:\n    yych = *++p;\n    if (yych == '>')\n      goto yy383;\n    goto yy333;\n  yy386:\n    yych = *++p;\n    if (yych == 'R')\n      goto yy425;\n    if (yych == 'r')\n      goto yy425;\n    goto yy333;\n  yy387:\n    yych = *++p;\n    if (yych == 'E')\n      goto yy426;\n    if (yych == 'e')\n      goto yy426;\n    goto yy333;\n  yy388:\n    yych = *++p;\n    if (yych == 'R')\n      goto yy427;\n    if (yych == 'r')\n      goto yy427;\n    goto yy333;\n  yy389:\n    yych = *++p;\n    if (yych == 'C')\n      goto yy408;\n    if (yych == 'c')\n      goto yy408;\n    goto yy333;\n  yy390:\n    yych = *++p;\n    if (yych == 'U')\n      goto yy428;\n    if (yych == 'u')\n      goto yy428;\n    goto yy333;\n  yy391:\n    yych = *++p;\n    if (yych == 'Y')\n      goto yy429;\n    if (yych == 'y')\n      goto yy429;\n    goto yy333;\n  yy392:\n    yych = *++p;\n    if (yych == 'M')\n      goto yy430;\n    if (yych == 'm')\n      goto yy430;\n    goto yy333;\n  yy393:\n    yych = *++p;\n    if (yych == 'B')\n      goto yy431;\n    if (yych == 'b')\n      goto yy431;\n    goto yy333;\n  yy394:\n    yych = *++p;\n    if (yych == 'O')\n      goto yy363;\n    if (yych == 'o')\n      goto yy363;\n    goto yy333;\n  yy395:\n    yych = *++p;\n    if (yych == 'O')\n      goto yy432;\n    if (yych == 'o')\n      goto yy432;\n    goto yy333;\n  yy396:\n    yych = *++p;\n    if (yych <= '/') {\n      if (yych <= 0x1F) {\n        if (yych <= 0x08)\n          goto yy333;\n        if (yych <= '\\r')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= ' ')\n          goto yy383;\n        if (yych <= '.')\n          goto yy333;\n        goto yy385;\n      }\n    } else {\n      if (yych <= 'D') {\n        if (yych == '>')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= 'E')\n          goto yy433;\n        if (yych == 'e')\n          goto yy433;\n        goto yy333;\n      }\n    }\n  yy397:\n    yych = *++p;\n    if (yych == 'T')\n      goto yy431;\n    if (yych == 't')\n      goto yy431;\n    goto yy333;\n  yy398:\n    yych = *++p;\n    if (yych <= '/') {\n      if (yych <= 0x1F) {\n        if (yych <= 0x08)\n          goto yy333;\n        if (yych <= '\\r')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= ' ')\n          goto yy383;\n        if (yych <= '.')\n          goto yy333;\n        goto yy385;\n      }\n    } else {\n      if (yych <= '@') {\n        if (yych == '>')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= 'A')\n          goto yy434;\n        if (yych == 'a')\n          goto yy434;\n        goto yy333;\n      }\n    }\n  yy399:\n    ++p;\n    { return 2; }\n  yy401:\n    yych = *++p;\n    if (yych == 'D')\n      goto yy435;\n    if (yych == 'd')\n      goto yy435;\n    goto yy333;\n  yy402:\n    yych = *++p;\n    if (yych == 'R')\n      goto yy436;\n    if (yych == 'r')\n      goto yy436;\n    goto yy333;\n  yy403:\n    yych = *++p;\n    if (yych == 'I')\n      goto yy437;\n    if (yych == 'i')\n      goto yy437;\n    goto yy333;\n  yy404:\n    yych = *++p;\n    if (yych == 'D')\n      goto yy438;\n    if (yych == 'd')\n      goto yy438;\n    goto yy333;\n  yy405:\n    yych = *++p;\n    if (yych == 'E')\n      goto yy439;\n    if (yych == 'e')\n      goto yy439;\n    goto yy333;\n  yy406:\n    yych = *++p;\n    if (yych == 'C')\n      goto yy440;\n    if (yych == 'c')\n      goto yy440;\n    goto yy333;\n  yy407:\n    yych = *++p;\n    if (yych == 'Y')\n      goto yy367;\n    if (yych == 'y')\n      goto yy367;\n    goto yy333;\n  yy408:\n    yych = *++p;\n    if (yych == 'T')\n      goto yy441;\n    if (yych == 't')\n      goto yy441;\n    goto yy333;\n  yy409:\n    yych = *++p;\n    if (yych == 'T')\n      goto yy442;\n    if (yych == 't')\n      goto yy442;\n    goto yy333;\n  yy410:\n    yych = *++p;\n    if (yych <= '/') {\n      if (yych <= 0x1F) {\n        if (yych <= 0x08)\n          goto yy333;\n        if (yych <= '\\r')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= ' ')\n          goto yy383;\n        if (yych <= '.')\n          goto yy333;\n        goto yy385;\n      }\n    } else {\n      if (yych <= 'F') {\n        if (yych == '>')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= 'G')\n          goto yy443;\n        if (yych == 'g')\n          goto yy443;\n        goto yy333;\n      }\n    }\n  yy411:\n    yych = *++p;\n    if (yych == 'A')\n      goto yy444;\n    if (yych == 'a')\n      goto yy444;\n    goto yy333;\n  yy412:\n    yych = *++p;\n    if (yych == 'L')\n      goto yy445;\n    if (yych == 'l')\n      goto yy445;\n    goto yy333;\n  yy413:\n    yych = *++p;\n    if (yych == 'L')\n      goto yy446;\n    if (yych == 'l')\n      goto yy446;\n    goto yy333;\n  yy414:\n    yych = *++p;\n    if (yych <= 'U') {\n      if (yych == 'C')\n        goto yy447;\n      if (yych <= 'T')\n        goto yy333;\n      goto yy448;\n    } else {\n      if (yych <= 'c') {\n        if (yych <= 'b')\n          goto yy333;\n        goto yy447;\n      } else {\n        if (yych == 'u')\n          goto yy448;\n        goto yy333;\n      }\n    }\n  yy415:\n    yych = *++p;\n    if (yych == 'M')\n      goto yy367;\n    if (yych == 'm')\n      goto yy367;\n    goto yy333;\n  yy416:\n    yych = *++p;\n    if (yych == 'M')\n      goto yy449;\n    if (yych == 'm')\n      goto yy449;\n    goto yy333;\n  yy417:\n    yych = *++p;\n    if (yych == 'D')\n      goto yy450;\n    if (yych == 'd')\n      goto yy450;\n    goto yy333;\n  yy418:\n    yych = *++p;\n    if (yych == 'A')\n      goto yy451;\n    if (yych == 'a')\n      goto yy451;\n    goto yy333;\n  yy419:\n    yych = *++p;\n    if (yych == 'E')\n      goto yy452;\n    if (yych == 'e')\n      goto yy452;\n    goto yy333;\n  yy420:\n    yych = *++p;\n    if (yych == 'K')\n      goto yy367;\n    if (yych == 'k')\n      goto yy367;\n    goto yy333;\n  yy421:\n    yych = *++p;\n    if (yych == 'N')\n      goto yy367;\n    if (yych == 'n')\n      goto yy367;\n    goto yy333;\n  yy422:\n    yych = *++p;\n    if (yych == 'U')\n      goto yy453;\n    if (yych == 'u')\n      goto yy453;\n    goto yy333;\n  yy423:\n    yych = *++p;\n    if (yych == 'R')\n      goto yy454;\n    if (yych == 'r')\n      goto yy454;\n    goto yy333;\n  yy424:\n    yych = *++p;\n    if (yych <= 'I') {\n      if (yych == 'G')\n        goto yy443;\n      if (yych <= 'H')\n        goto yy333;\n      goto yy455;\n    } else {\n      if (yych <= 'g') {\n        if (yych <= 'f')\n          goto yy333;\n        goto yy443;\n      } else {\n        if (yych == 'i')\n          goto yy455;\n        goto yy333;\n      }\n    }\n  yy425:\n    yych = *++p;\n    if (yych == 'A')\n      goto yy415;\n    if (yych == 'a')\n      goto yy415;\n    goto yy333;\n  yy426:\n    yych = *++p;\n    if (yych <= 0x1F) {\n      if (yych <= 0x08)\n        goto yy333;\n      if (yych <= '\\r')\n        goto yy456;\n      goto yy333;\n    } else {\n      if (yych <= ' ')\n        goto yy456;\n      if (yych == '>')\n        goto yy456;\n      goto yy333;\n    }\n  yy427:\n    yych = *++p;\n    if (yych == 'I')\n      goto yy458;\n    if (yych == 'i')\n      goto yy458;\n    goto yy333;\n  yy428:\n    yych = *++p;\n    if (yych == 'R')\n      goto yy459;\n    if (yych == 'r')\n      goto yy459;\n    goto yy333;\n  yy429:\n    yych = *++p;\n    if (yych == 'L')\n      goto yy387;\n    if (yych == 'l')\n      goto yy387;\n    goto yy333;\n  yy430:\n    yych = *++p;\n    if (yych == 'M')\n      goto yy460;\n    if (yych == 'm')\n      goto yy460;\n    goto yy333;\n  yy431:\n    yych = *++p;\n    if (yych == 'L')\n      goto yy438;\n    if (yych == 'l')\n      goto yy438;\n    goto yy333;\n  yy432:\n    yych = *++p;\n    if (yych == 'O')\n      goto yy461;\n    if (yych == 'o')\n      goto yy461;\n    goto yy333;\n  yy433:\n    yych = *++p;\n    if (yych == 'A')\n      goto yy462;\n    if (yych == 'a')\n      goto yy462;\n    goto yy333;\n  yy434:\n    yych = *++p;\n    if (yych == 'C')\n      goto yy420;\n    if (yych == 'c')\n      goto yy420;\n    goto yy333;\n  yy435:\n    yych = *++p;\n    if (yych == 'A')\n      goto yy463;\n    if (yych == 'a')\n      goto yy463;\n    goto yy333;\n  yy436:\n    yych = *++p;\n    if (yych == 'E')\n      goto yy464;\n    if (yych == 'e')\n      goto yy464;\n    goto yy333;\n  yy437:\n    yych = *++p;\n    if (yych == 'C')\n      goto yy431;\n    if (yych == 'c')\n      goto yy431;\n    goto yy333;\n  yy438:\n    yych = *++p;\n    if (yych == 'E')\n      goto yy367;\n    if (yych == 'e')\n      goto yy367;\n    goto yy333;\n  yy439:\n    yych = *++p;\n    if (yych <= '/') {\n      if (yych <= 0x1F) {\n        if (yych <= 0x08)\n          goto yy333;\n        if (yych <= '\\r')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= ' ')\n          goto yy383;\n        if (yych <= '.')\n          goto yy333;\n        goto yy385;\n      }\n    } else {\n      if (yych <= 'E') {\n        if (yych == '>')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= 'F')\n          goto yy465;\n        if (yych == 'f')\n          goto yy465;\n        goto yy333;\n      }\n    }\n  yy440:\n    yych = *++p;\n    if (yych == 'K')\n      goto yy466;\n    if (yych == 'k')\n      goto yy466;\n    goto yy333;\n  yy441:\n    yych = *++p;\n    if (yych == 'I')\n      goto yy455;\n    if (yych == 'i')\n      goto yy455;\n    goto yy333;\n  yy442:\n    yych = *++p;\n    if (yych == 'E')\n      goto yy467;\n    if (yych == 'e')\n      goto yy467;\n    goto yy333;\n  yy443:\n    yych = *++p;\n    if (yych == 'R')\n      goto yy468;\n    if (yych == 'r')\n      goto yy468;\n    goto yy333;\n  yy444:\n    yych = *++p;\n    if (yych == 'I')\n      goto yy469;\n    if (yych == 'i')\n      goto yy469;\n    goto yy333;\n  yy445:\n    yych = *++p;\n    if (yych == 'O')\n      goto yy470;\n    if (yych == 'o')\n      goto yy470;\n    goto yy333;\n  yy446:\n    yych = *++p;\n    if (yych == 'D')\n      goto yy471;\n    if (yych == 'd')\n      goto yy471;\n    goto yy333;\n  yy447:\n    yych = *++p;\n    if (yych == 'A')\n      goto yy364;\n    if (yych == 'a')\n      goto yy364;\n    goto yy333;\n  yy448:\n    yych = *++p;\n    if (yych == 'R')\n      goto yy438;\n    if (yych == 'r')\n      goto yy438;\n    goto yy333;\n  yy449:\n    yych = *++p;\n    if (yych == 'E')\n      goto yy472;\n    if (yych == 'e')\n      goto yy472;\n    goto yy333;\n  yy450:\n    yych = *++p;\n    if (yych <= '/') {\n      if (yych <= 0x1F) {\n        if (yych <= 0x08)\n          goto yy333;\n        if (yych <= '\\r')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= ' ')\n          goto yy383;\n        if (yych <= '.')\n          goto yy333;\n        goto yy385;\n      }\n    } else {\n      if (yych <= 'D') {\n        if (yych == '>')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= 'E')\n          goto yy467;\n        if (yych == 'e')\n          goto yy467;\n        goto yy333;\n      }\n    }\n  yy451:\n    yych = *++p;\n    if (yych == 'M')\n      goto yy438;\n    if (yych == 'm')\n      goto yy438;\n    goto yy333;\n  yy452:\n    yych = *++p;\n    if (yych == 'N')\n      goto yy462;\n    if (yych == 'n')\n      goto yy462;\n    goto yy333;\n  yy453:\n    yych = *++p;\n    if (yych <= '/') {\n      if (yych <= 0x1F) {\n        if (yych <= 0x08)\n          goto yy333;\n        if (yych <= '\\r')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= ' ')\n          goto yy383;\n        if (yych <= '.')\n          goto yy333;\n        goto yy385;\n      }\n    } else {\n      if (yych <= 'H') {\n        if (yych == '>')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= 'I')\n          goto yy473;\n        if (yych == 'i')\n          goto yy473;\n        goto yy333;\n      }\n    }\n  yy454:\n    yych = *++p;\n    if (yych == 'A')\n      goto yy474;\n    if (yych == 'a')\n      goto yy474;\n    goto yy333;\n  yy455:\n    yych = *++p;\n    if (yych == 'O')\n      goto yy421;\n    if (yych == 'o')\n      goto yy421;\n    goto yy333;\n  yy456:\n    ++p;\n    { return 1; }\n  yy458:\n    yych = *++p;\n    if (yych == 'P')\n      goto yy475;\n    if (yych == 'p')\n      goto yy475;\n    goto yy333;\n  yy459:\n    yych = *++p;\n    if (yych == 'C')\n      goto yy438;\n    if (yych == 'c')\n      goto yy438;\n    goto yy333;\n  yy460:\n    yych = *++p;\n    if (yych == 'A')\n      goto yy476;\n    if (yych == 'a')\n      goto yy476;\n    goto yy333;\n  yy461:\n    yych = *++p;\n    if (yych == 'T')\n      goto yy367;\n    if (yych == 't')\n      goto yy367;\n    goto yy333;\n  yy462:\n    yych = *++p;\n    if (yych == 'D')\n      goto yy367;\n    if (yych == 'd')\n      goto yy367;\n    goto yy333;\n  yy463:\n    yych = *++p;\n    if (yych == 'T')\n      goto yy477;\n    if (yych == 't')\n      goto yy477;\n    goto yy333;\n  yy464:\n    yych = *++p;\n    if (yych == 'S')\n      goto yy478;\n    if (yych == 's')\n      goto yy478;\n    goto yy333;\n  yy465:\n    yych = *++p;\n    if (yych == 'O')\n      goto yy479;\n    if (yych == 'o')\n      goto yy479;\n    goto yy333;\n  yy466:\n    yych = *++p;\n    if (yych == 'Q')\n      goto yy480;\n    if (yych == 'q')\n      goto yy480;\n    goto yy333;\n  yy467:\n    yych = *++p;\n    if (yych == 'R')\n      goto yy367;\n    if (yych == 'r')\n      goto yy367;\n    goto yy333;\n  yy468:\n    yych = *++p;\n    if (yych == 'O')\n      goto yy481;\n    if (yych == 'o')\n      goto yy481;\n    goto yy333;\n  yy469:\n    yych = *++p;\n    if (yych == 'L')\n      goto yy478;\n    if (yych == 'l')\n      goto yy478;\n    goto yy333;\n  yy470:\n    yych = *++p;\n    if (yych == 'G')\n      goto yy367;\n    if (yych == 'g')\n      goto yy367;\n    goto yy333;\n  yy471:\n    yych = *++p;\n    if (yych == 'S')\n      goto yy482;\n    if (yych == 's')\n      goto yy482;\n    goto yy333;\n  yy472:\n    yych = *++p;\n    if (yych <= '/') {\n      if (yych <= 0x1F) {\n        if (yych <= 0x08)\n          goto yy333;\n        if (yych <= '\\r')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= ' ')\n          goto yy383;\n        if (yych <= '.')\n          goto yy333;\n        goto yy385;\n      }\n    } else {\n      if (yych <= 'R') {\n        if (yych == '>')\n          goto yy383;\n        goto yy333;\n      } else {\n        if (yych <= 'S')\n          goto yy482;\n        if (yych == 's')\n          goto yy482;\n        goto yy333;\n      }\n    }\n  yy473:\n    yych = *++p;\n    if (yych == 'T')\n      goto yy483;\n    if (yych == 't')\n      goto yy483;\n    goto yy333;\n  yy474:\n    yych = *++p;\n    if (yych == 'M')\n      goto yy484;\n    if (yych == 'm')\n      goto yy484;\n    goto yy333;\n  yy475:\n    yych = *++p;\n    if (yych == 'T')\n      goto yy426;\n    if (yych == 't')\n      goto yy426;\n    goto yy333;\n  yy476:\n    yych = *++p;\n    if (yych == 'R')\n      goto yy407;\n    if (yych == 'r')\n      goto yy407;\n    goto yy333;\n  yy477:\n    yych = *++p;\n    if (yych == 'A')\n      goto yy485;\n    if (yych == 'a')\n      goto yy485;\n    goto yy333;\n  yy478:\n    yych = *++p;\n    if (yych == 'S')\n      goto yy367;\n    if (yych == 's')\n      goto yy367;\n    goto yy333;\n  yy479:\n    yych = *++p;\n    if (yych == 'N')\n      goto yy461;\n    if (yych == 'n')\n      goto yy461;\n    goto yy333;\n  yy480:\n    yych = *++p;\n    if (yych == 'U')\n      goto yy486;\n    if (yych == 'u')\n      goto yy486;\n    goto yy333;\n  yy481:\n    yych = *++p;\n    if (yych == 'U')\n      goto yy487;\n    if (yych == 'u')\n      goto yy487;\n    goto yy333;\n  yy482:\n    yych = *++p;\n    if (yych == 'E')\n      goto yy461;\n    if (yych == 'e')\n      goto yy461;\n    goto yy333;\n  yy483:\n    yych = *++p;\n    if (yych == 'E')\n      goto yy415;\n    if (yych == 'e')\n      goto yy415;\n    goto yy333;\n  yy484:\n    yych = *++p;\n    if (yych == 'E')\n      goto yy478;\n    if (yych == 'e')\n      goto yy478;\n    goto yy333;\n  yy485:\n    yych = *++p;\n    if (yych == '[')\n      goto yy488;\n    goto yy333;\n  yy486:\n    yych = *++p;\n    if (yych == 'O')\n      goto yy490;\n    if (yych == 'o')\n      goto yy490;\n    goto yy333;\n  yy487:\n    yych = *++p;\n    if (yych == 'P')\n      goto yy367;\n    if (yych == 'p')\n      goto yy367;\n    goto yy333;\n  yy488:\n    ++p;\n    { return 5; }\n  yy490:\n    ++p;\n    if ((yych = *p) == 'T')\n      goto yy438;\n    if (yych == 't')\n      goto yy438;\n    goto yy333;\n  }\n}\n\n// Try to match an HTML block tag start line of type 7, returning\n// 7 if successful, 0 if not.\nbufsize_t _scan_html_block_start_7(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n\n  {\n    unsigned char yych;\n    unsigned int yyaccept = 0;\n    static const unsigned char yybm[] = {\n        0,   224, 224, 224, 224, 224, 224, 224, 224, 198, 210, 194, 198, 194,\n        224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,\n        224, 224, 224, 224, 198, 224, 128, 224, 224, 224, 224, 64,  224, 224,\n        224, 224, 224, 233, 232, 224, 233, 233, 233, 233, 233, 233, 233, 233,\n        233, 233, 232, 224, 192, 192, 192, 224, 224, 233, 233, 233, 233, 233,\n        233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,\n        233, 233, 233, 233, 233, 233, 233, 224, 224, 224, 224, 232, 192, 233,\n        233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,\n        233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 224, 224, 224,\n        224, 224, 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,\n    };\n    yych = *p;\n    if (yych == '<')\n      goto yy495;\n    ++p;\n  yy494 : { return 0; }\n  yy495:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= '@') {\n      if (yych != '/')\n        goto yy494;\n    } else {\n      if (yych <= 'Z')\n        goto yy498;\n      if (yych <= '`')\n        goto yy494;\n      if (yych <= 'z')\n        goto yy498;\n      goto yy494;\n    }\n    yych = *++p;\n    if (yych <= '@')\n      goto yy497;\n    if (yych <= 'Z')\n      goto yy500;\n    if (yych <= '`')\n      goto yy497;\n    if (yych <= 'z')\n      goto yy500;\n  yy497:\n    p = marker;\n    if (yyaccept == 0) {\n      goto yy494;\n    } else {\n      goto yy513;\n    }\n  yy498:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 2) {\n      goto yy502;\n    }\n    if (yych <= '=') {\n      if (yych <= '.') {\n        if (yych == '-')\n          goto yy498;\n        goto yy497;\n      } else {\n        if (yych <= '/')\n          goto yy504;\n        if (yych <= '9')\n          goto yy498;\n        goto yy497;\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '>')\n          goto yy505;\n        if (yych <= '@')\n          goto yy497;\n        goto yy498;\n      } else {\n        if (yych <= '`')\n          goto yy497;\n        if (yych <= 'z')\n          goto yy498;\n        goto yy497;\n      }\n    }\n  yy500:\n    ++p;\n    yych = *p;\n    if (yych <= '/') {\n      if (yych <= 0x1F) {\n        if (yych <= 0x08)\n          goto yy497;\n        if (yych <= '\\r')\n          goto yy507;\n        goto yy497;\n      } else {\n        if (yych <= ' ')\n          goto yy507;\n        if (yych == '-')\n          goto yy500;\n        goto yy497;\n      }\n    } else {\n      if (yych <= '@') {\n        if (yych <= '9')\n          goto yy500;\n        if (yych == '>')\n          goto yy505;\n        goto yy497;\n      } else {\n        if (yych <= 'Z')\n          goto yy500;\n        if (yych <= '`')\n          goto yy497;\n        if (yych <= 'z')\n          goto yy500;\n        goto yy497;\n      }\n    }\n  yy502:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 2) {\n      goto yy502;\n    }\n    if (yych <= '>') {\n      if (yych <= '9') {\n        if (yych != '/')\n          goto yy497;\n      } else {\n        if (yych <= ':')\n          goto yy509;\n        if (yych <= '=')\n          goto yy497;\n        goto yy505;\n      }\n    } else {\n      if (yych <= '^') {\n        if (yych <= '@')\n          goto yy497;\n        if (yych <= 'Z')\n          goto yy509;\n        goto yy497;\n      } else {\n        if (yych == '`')\n          goto yy497;\n        if (yych <= 'z')\n          goto yy509;\n        goto yy497;\n      }\n    }\n  yy504:\n    yych = *++p;\n    if (yych != '>')\n      goto yy497;\n  yy505:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 4) {\n      goto yy505;\n    }\n    if (yych <= 0x08)\n      goto yy497;\n    if (yych <= '\\n')\n      goto yy511;\n    if (yych <= '\\v')\n      goto yy497;\n    if (yych <= '\\r')\n      goto yy514;\n    goto yy497;\n  yy507:\n    ++p;\n    yych = *p;\n    if (yych <= 0x1F) {\n      if (yych <= 0x08)\n        goto yy497;\n      if (yych <= '\\r')\n        goto yy507;\n      goto yy497;\n    } else {\n      if (yych <= ' ')\n        goto yy507;\n      if (yych == '>')\n        goto yy505;\n      goto yy497;\n    }\n  yy509:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 8) {\n      goto yy509;\n    }\n    if (yych <= ',') {\n      if (yych <= '\\r') {\n        if (yych <= 0x08)\n          goto yy497;\n        goto yy515;\n      } else {\n        if (yych == ' ')\n          goto yy515;\n        goto yy497;\n      }\n    } else {\n      if (yych <= '<') {\n        if (yych <= '/')\n          goto yy504;\n        goto yy497;\n      } else {\n        if (yych <= '=')\n          goto yy517;\n        if (yych <= '>')\n          goto yy505;\n        goto yy497;\n      }\n    }\n  yy511:\n    yyaccept = 1;\n    marker = ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 4) {\n      goto yy505;\n    }\n    if (yych <= 0x08)\n      goto yy513;\n    if (yych <= '\\n')\n      goto yy511;\n    if (yych <= '\\v')\n      goto yy513;\n    if (yych <= '\\r')\n      goto yy514;\n  yy513 : { return 7; }\n  yy514:\n    yych = *++p;\n    goto yy513;\n  yy515:\n    ++p;\n    yych = *p;\n    if (yych <= '<') {\n      if (yych <= ' ') {\n        if (yych <= 0x08)\n          goto yy497;\n        if (yych <= '\\r')\n          goto yy515;\n        if (yych <= 0x1F)\n          goto yy497;\n        goto yy515;\n      } else {\n        if (yych <= '/') {\n          if (yych <= '.')\n            goto yy497;\n          goto yy504;\n        } else {\n          if (yych == ':')\n            goto yy509;\n          goto yy497;\n        }\n      }\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '=')\n          goto yy517;\n        if (yych <= '>')\n          goto yy505;\n        if (yych <= '@')\n          goto yy497;\n        goto yy509;\n      } else {\n        if (yych <= '_') {\n          if (yych <= '^')\n            goto yy497;\n          goto yy509;\n        } else {\n          if (yych <= '`')\n            goto yy497;\n          if (yych <= 'z')\n            goto yy509;\n          goto yy497;\n        }\n      }\n    }\n  yy517:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 32) {\n      goto yy519;\n    }\n    if (yych <= 0xE0) {\n      if (yych <= '\"') {\n        if (yych <= 0x00)\n          goto yy497;\n        if (yych <= ' ')\n          goto yy517;\n        goto yy521;\n      } else {\n        if (yych <= '\\'')\n          goto yy523;\n        if (yych <= 0xC1)\n          goto yy497;\n        if (yych <= 0xDF)\n          goto yy525;\n        goto yy526;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych == 0xED)\n          goto yy528;\n        goto yy527;\n      } else {\n        if (yych <= 0xF0)\n          goto yy529;\n        if (yych <= 0xF3)\n          goto yy530;\n        if (yych <= 0xF4)\n          goto yy531;\n        goto yy497;\n      }\n    }\n  yy519:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 32) {\n      goto yy519;\n    }\n    if (yych <= 0xE0) {\n      if (yych <= '=') {\n        if (yych <= 0x00)\n          goto yy497;\n        if (yych <= ' ')\n          goto yy502;\n        goto yy497;\n      } else {\n        if (yych <= '>')\n          goto yy505;\n        if (yych <= 0xC1)\n          goto yy497;\n        if (yych <= 0xDF)\n          goto yy525;\n        goto yy526;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych == 0xED)\n          goto yy528;\n        goto yy527;\n      } else {\n        if (yych <= 0xF0)\n          goto yy529;\n        if (yych <= 0xF3)\n          goto yy530;\n        if (yych <= 0xF4)\n          goto yy531;\n        goto yy497;\n      }\n    }\n  yy521:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 64) {\n      goto yy521;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= 0x00)\n          goto yy497;\n        if (yych <= '\"')\n          goto yy532;\n        goto yy497;\n      } else {\n        if (yych <= 0xDF)\n          goto yy533;\n        if (yych <= 0xE0)\n          goto yy534;\n        goto yy535;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy536;\n        if (yych <= 0xEF)\n          goto yy535;\n        goto yy537;\n      } else {\n        if (yych <= 0xF3)\n          goto yy538;\n        if (yych <= 0xF4)\n          goto yy539;\n        goto yy497;\n      }\n    }\n  yy523:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy523;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= 0x00)\n          goto yy497;\n        if (yych <= '\\'')\n          goto yy532;\n        goto yy497;\n      } else {\n        if (yych <= 0xDF)\n          goto yy540;\n        if (yych <= 0xE0)\n          goto yy541;\n        goto yy542;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy543;\n        if (yych <= 0xEF)\n          goto yy542;\n        goto yy544;\n      } else {\n        if (yych <= 0xF3)\n          goto yy545;\n        if (yych <= 0xF4)\n          goto yy546;\n        goto yy497;\n      }\n    }\n  yy525:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy497;\n    if (yych <= 0xBF)\n      goto yy519;\n    goto yy497;\n  yy526:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy497;\n    if (yych <= 0xBF)\n      goto yy525;\n    goto yy497;\n  yy527:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy497;\n    if (yych <= 0xBF)\n      goto yy525;\n    goto yy497;\n  yy528:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy497;\n    if (yych <= 0x9F)\n      goto yy525;\n    goto yy497;\n  yy529:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy497;\n    if (yych <= 0xBF)\n      goto yy527;\n    goto yy497;\n  yy530:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy497;\n    if (yych <= 0xBF)\n      goto yy527;\n    goto yy497;\n  yy531:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy497;\n    if (yych <= 0x8F)\n      goto yy527;\n    goto yy497;\n  yy532:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 2) {\n      goto yy502;\n    }\n    if (yych == '/')\n      goto yy504;\n    if (yych == '>')\n      goto yy505;\n    goto yy497;\n  yy533:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy497;\n    if (yych <= 0xBF)\n      goto yy521;\n    goto yy497;\n  yy534:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy497;\n    if (yych <= 0xBF)\n      goto yy533;\n    goto yy497;\n  yy535:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy497;\n    if (yych <= 0xBF)\n      goto yy533;\n    goto yy497;\n  yy536:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy497;\n    if (yych <= 0x9F)\n      goto yy533;\n    goto yy497;\n  yy537:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy497;\n    if (yych <= 0xBF)\n      goto yy535;\n    goto yy497;\n  yy538:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy497;\n    if (yych <= 0xBF)\n      goto yy535;\n    goto yy497;\n  yy539:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy497;\n    if (yych <= 0x8F)\n      goto yy535;\n    goto yy497;\n  yy540:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy497;\n    if (yych <= 0xBF)\n      goto yy523;\n    goto yy497;\n  yy541:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy497;\n    if (yych <= 0xBF)\n      goto yy540;\n    goto yy497;\n  yy542:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy497;\n    if (yych <= 0xBF)\n      goto yy540;\n    goto yy497;\n  yy543:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy497;\n    if (yych <= 0x9F)\n      goto yy540;\n    goto yy497;\n  yy544:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy497;\n    if (yych <= 0xBF)\n      goto yy542;\n    goto yy497;\n  yy545:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy497;\n    if (yych <= 0xBF)\n      goto yy542;\n    goto yy497;\n  yy546:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy497;\n    if (yych <= 0x8F)\n      goto yy542;\n    goto yy497;\n  }\n}\n\n// Try to match an HTML block end line of type 1\nbufsize_t _scan_html_block_end_1(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n\n  {\n    unsigned char yych;\n    unsigned int yyaccept = 0;\n    static const unsigned char yybm[] = {\n        0,  64, 64, 64, 64, 64, 64,  64, 64, 64, 0,  64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 128, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,\n    };\n    yych = *p;\n    if (yych <= 0xDF) {\n      if (yych <= ';') {\n        if (yych <= 0x00)\n          goto yy549;\n        if (yych != '\\n')\n          goto yy551;\n      } else {\n        if (yych <= '<')\n          goto yy552;\n        if (yych <= 0x7F)\n          goto yy551;\n        if (yych >= 0xC2)\n          goto yy553;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych <= 0xE0)\n          goto yy554;\n        if (yych == 0xED)\n          goto yy556;\n        goto yy555;\n      } else {\n        if (yych <= 0xF0)\n          goto yy557;\n        if (yych <= 0xF3)\n          goto yy558;\n        if (yych <= 0xF4)\n          goto yy559;\n      }\n    }\n  yy549:\n    ++p;\n  yy550 : { return 0; }\n  yy551:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= '\\n') {\n      if (yych <= 0x00)\n        goto yy550;\n      if (yych <= '\\t')\n        goto yy561;\n      goto yy550;\n    } else {\n      if (yych <= 0x7F)\n        goto yy561;\n      if (yych <= 0xC1)\n        goto yy550;\n      if (yych <= 0xF4)\n        goto yy561;\n      goto yy550;\n    }\n  yy552:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= '.') {\n      if (yych <= 0x00)\n        goto yy550;\n      if (yych == '\\n')\n        goto yy550;\n      goto yy561;\n    } else {\n      if (yych <= 0x7F) {\n        if (yych <= '/')\n          goto yy572;\n        goto yy561;\n      } else {\n        if (yych <= 0xC1)\n          goto yy550;\n        if (yych <= 0xF4)\n          goto yy561;\n        goto yy550;\n      }\n    }\n  yy553:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy550;\n    if (yych <= 0xBF)\n      goto yy560;\n    goto yy550;\n  yy554:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x9F)\n      goto yy550;\n    if (yych <= 0xBF)\n      goto yy565;\n    goto yy550;\n  yy555:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy550;\n    if (yych <= 0xBF)\n      goto yy565;\n    goto yy550;\n  yy556:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy550;\n    if (yych <= 0x9F)\n      goto yy565;\n    goto yy550;\n  yy557:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x8F)\n      goto yy550;\n    if (yych <= 0xBF)\n      goto yy567;\n    goto yy550;\n  yy558:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy550;\n    if (yych <= 0xBF)\n      goto yy567;\n    goto yy550;\n  yy559:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy550;\n    if (yych <= 0x8F)\n      goto yy567;\n    goto yy550;\n  yy560:\n    ++p;\n    yych = *p;\n  yy561:\n    if (yybm[0 + yych] & 64) {\n      goto yy560;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= '\\n')\n          goto yy562;\n        if (yych <= '<')\n          goto yy563;\n      } else {\n        if (yych <= 0xDF)\n          goto yy565;\n        if (yych <= 0xE0)\n          goto yy566;\n        goto yy567;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy568;\n        if (yych <= 0xEF)\n          goto yy567;\n        goto yy569;\n      } else {\n        if (yych <= 0xF3)\n          goto yy570;\n        if (yych <= 0xF4)\n          goto yy571;\n      }\n    }\n  yy562:\n    p = marker;\n    if (yyaccept == 0) {\n      goto yy550;\n    } else {\n      goto yy582;\n    }\n  yy563:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy563;\n    }\n    if (yych <= 0xDF) {\n      if (yych <= '.') {\n        if (yych <= 0x00)\n          goto yy562;\n        if (yych == '\\n')\n          goto yy562;\n        goto yy560;\n      } else {\n        if (yych <= '/')\n          goto yy572;\n        if (yych <= 0x7F)\n          goto yy560;\n        if (yych <= 0xC1)\n          goto yy562;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych <= 0xE0)\n          goto yy566;\n        if (yych == 0xED)\n          goto yy568;\n        goto yy567;\n      } else {\n        if (yych <= 0xF0)\n          goto yy569;\n        if (yych <= 0xF3)\n          goto yy570;\n        if (yych <= 0xF4)\n          goto yy571;\n        goto yy562;\n      }\n    }\n  yy565:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy562;\n    if (yych <= 0xBF)\n      goto yy560;\n    goto yy562;\n  yy566:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy562;\n    if (yych <= 0xBF)\n      goto yy565;\n    goto yy562;\n  yy567:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy562;\n    if (yych <= 0xBF)\n      goto yy565;\n    goto yy562;\n  yy568:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy562;\n    if (yych <= 0x9F)\n      goto yy565;\n    goto yy562;\n  yy569:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy562;\n    if (yych <= 0xBF)\n      goto yy567;\n    goto yy562;\n  yy570:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy562;\n    if (yych <= 0xBF)\n      goto yy567;\n    goto yy562;\n  yy571:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy562;\n    if (yych <= 0x8F)\n      goto yy567;\n    goto yy562;\n  yy572:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy563;\n    }\n    if (yych <= 's') {\n      if (yych <= 'P') {\n        if (yych <= '\\t') {\n          if (yych <= 0x00)\n            goto yy562;\n          goto yy560;\n        } else {\n          if (yych <= '\\n')\n            goto yy562;\n          if (yych <= 'O')\n            goto yy560;\n        }\n      } else {\n        if (yych <= 'o') {\n          if (yych == 'S')\n            goto yy574;\n          goto yy560;\n        } else {\n          if (yych <= 'p')\n            goto yy573;\n          if (yych <= 'r')\n            goto yy560;\n          goto yy574;\n        }\n      }\n    } else {\n      if (yych <= 0xEC) {\n        if (yych <= 0xC1) {\n          if (yych <= 0x7F)\n            goto yy560;\n          goto yy562;\n        } else {\n          if (yych <= 0xDF)\n            goto yy565;\n          if (yych <= 0xE0)\n            goto yy566;\n          goto yy567;\n        }\n      } else {\n        if (yych <= 0xF0) {\n          if (yych <= 0xED)\n            goto yy568;\n          if (yych <= 0xEF)\n            goto yy567;\n          goto yy569;\n        } else {\n          if (yych <= 0xF3)\n            goto yy570;\n          if (yych <= 0xF4)\n            goto yy571;\n          goto yy562;\n        }\n      }\n    }\n  yy573:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy563;\n    }\n    if (yych <= 0xC1) {\n      if (yych <= 'Q') {\n        if (yych <= 0x00)\n          goto yy562;\n        if (yych == '\\n')\n          goto yy562;\n        goto yy560;\n      } else {\n        if (yych <= 'q') {\n          if (yych <= 'R')\n            goto yy575;\n          goto yy560;\n        } else {\n          if (yych <= 'r')\n            goto yy575;\n          if (yych <= 0x7F)\n            goto yy560;\n          goto yy562;\n        }\n      }\n    } else {\n      if (yych <= 0xED) {\n        if (yych <= 0xDF)\n          goto yy565;\n        if (yych <= 0xE0)\n          goto yy566;\n        if (yych <= 0xEC)\n          goto yy567;\n        goto yy568;\n      } else {\n        if (yych <= 0xF0) {\n          if (yych <= 0xEF)\n            goto yy567;\n          goto yy569;\n        } else {\n          if (yych <= 0xF3)\n            goto yy570;\n          if (yych <= 0xF4)\n            goto yy571;\n          goto yy562;\n        }\n      }\n    }\n  yy574:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy563;\n    }\n    if (yych <= 't') {\n      if (yych <= 'C') {\n        if (yych <= '\\t') {\n          if (yych <= 0x00)\n            goto yy562;\n          goto yy560;\n        } else {\n          if (yych <= '\\n')\n            goto yy562;\n          if (yych <= 'B')\n            goto yy560;\n          goto yy576;\n        }\n      } else {\n        if (yych <= 'b') {\n          if (yych == 'T')\n            goto yy577;\n          goto yy560;\n        } else {\n          if (yych <= 'c')\n            goto yy576;\n          if (yych <= 's')\n            goto yy560;\n          goto yy577;\n        }\n      }\n    } else {\n      if (yych <= 0xEC) {\n        if (yych <= 0xC1) {\n          if (yych <= 0x7F)\n            goto yy560;\n          goto yy562;\n        } else {\n          if (yych <= 0xDF)\n            goto yy565;\n          if (yych <= 0xE0)\n            goto yy566;\n          goto yy567;\n        }\n      } else {\n        if (yych <= 0xF0) {\n          if (yych <= 0xED)\n            goto yy568;\n          if (yych <= 0xEF)\n            goto yy567;\n          goto yy569;\n        } else {\n          if (yych <= 0xF3)\n            goto yy570;\n          if (yych <= 0xF4)\n            goto yy571;\n          goto yy562;\n        }\n      }\n    }\n  yy575:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy563;\n    }\n    if (yych <= 0xC1) {\n      if (yych <= 'D') {\n        if (yych <= 0x00)\n          goto yy562;\n        if (yych == '\\n')\n          goto yy562;\n        goto yy560;\n      } else {\n        if (yych <= 'd') {\n          if (yych <= 'E')\n            goto yy578;\n          goto yy560;\n        } else {\n          if (yych <= 'e')\n            goto yy578;\n          if (yych <= 0x7F)\n            goto yy560;\n          goto yy562;\n        }\n      }\n    } else {\n      if (yych <= 0xED) {\n        if (yych <= 0xDF)\n          goto yy565;\n        if (yych <= 0xE0)\n          goto yy566;\n        if (yych <= 0xEC)\n          goto yy567;\n        goto yy568;\n      } else {\n        if (yych <= 0xF0) {\n          if (yych <= 0xEF)\n            goto yy567;\n          goto yy569;\n        } else {\n          if (yych <= 0xF3)\n            goto yy570;\n          if (yych <= 0xF4)\n            goto yy571;\n          goto yy562;\n        }\n      }\n    }\n  yy576:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy563;\n    }\n    if (yych <= 0xC1) {\n      if (yych <= 'Q') {\n        if (yych <= 0x00)\n          goto yy562;\n        if (yych == '\\n')\n          goto yy562;\n        goto yy560;\n      } else {\n        if (yych <= 'q') {\n          if (yych <= 'R')\n            goto yy579;\n          goto yy560;\n        } else {\n          if (yych <= 'r')\n            goto yy579;\n          if (yych <= 0x7F)\n            goto yy560;\n          goto yy562;\n        }\n      }\n    } else {\n      if (yych <= 0xED) {\n        if (yych <= 0xDF)\n          goto yy565;\n        if (yych <= 0xE0)\n          goto yy566;\n        if (yych <= 0xEC)\n          goto yy567;\n        goto yy568;\n      } else {\n        if (yych <= 0xF0) {\n          if (yych <= 0xEF)\n            goto yy567;\n          goto yy569;\n        } else {\n          if (yych <= 0xF3)\n            goto yy570;\n          if (yych <= 0xF4)\n            goto yy571;\n          goto yy562;\n        }\n      }\n    }\n  yy577:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy563;\n    }\n    if (yych <= 0xC1) {\n      if (yych <= 'X') {\n        if (yych <= 0x00)\n          goto yy562;\n        if (yych == '\\n')\n          goto yy562;\n        goto yy560;\n      } else {\n        if (yych <= 'x') {\n          if (yych <= 'Y')\n            goto yy580;\n          goto yy560;\n        } else {\n          if (yych <= 'y')\n            goto yy580;\n          if (yych <= 0x7F)\n            goto yy560;\n          goto yy562;\n        }\n      }\n    } else {\n      if (yych <= 0xED) {\n        if (yych <= 0xDF)\n          goto yy565;\n        if (yych <= 0xE0)\n          goto yy566;\n        if (yych <= 0xEC)\n          goto yy567;\n        goto yy568;\n      } else {\n        if (yych <= 0xF0) {\n          if (yych <= 0xEF)\n            goto yy567;\n          goto yy569;\n        } else {\n          if (yych <= 0xF3)\n            goto yy570;\n          if (yych <= 0xF4)\n            goto yy571;\n          goto yy562;\n        }\n      }\n    }\n  yy578:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy563;\n    }\n    if (yych <= 0xDF) {\n      if (yych <= '=') {\n        if (yych <= 0x00)\n          goto yy562;\n        if (yych == '\\n')\n          goto yy562;\n        goto yy560;\n      } else {\n        if (yych <= '>')\n          goto yy581;\n        if (yych <= 0x7F)\n          goto yy560;\n        if (yych <= 0xC1)\n          goto yy562;\n        goto yy565;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych <= 0xE0)\n          goto yy566;\n        if (yych == 0xED)\n          goto yy568;\n        goto yy567;\n      } else {\n        if (yych <= 0xF0)\n          goto yy569;\n        if (yych <= 0xF3)\n          goto yy570;\n        if (yych <= 0xF4)\n          goto yy571;\n        goto yy562;\n      }\n    }\n  yy579:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy563;\n    }\n    if (yych <= 0xC1) {\n      if (yych <= 'H') {\n        if (yych <= 0x00)\n          goto yy562;\n        if (yych == '\\n')\n          goto yy562;\n        goto yy560;\n      } else {\n        if (yych <= 'h') {\n          if (yych <= 'I')\n            goto yy583;\n          goto yy560;\n        } else {\n          if (yych <= 'i')\n            goto yy583;\n          if (yych <= 0x7F)\n            goto yy560;\n          goto yy562;\n        }\n      }\n    } else {\n      if (yych <= 0xED) {\n        if (yych <= 0xDF)\n          goto yy565;\n        if (yych <= 0xE0)\n          goto yy566;\n        if (yych <= 0xEC)\n          goto yy567;\n        goto yy568;\n      } else {\n        if (yych <= 0xF0) {\n          if (yych <= 0xEF)\n            goto yy567;\n          goto yy569;\n        } else {\n          if (yych <= 0xF3)\n            goto yy570;\n          if (yych <= 0xF4)\n            goto yy571;\n          goto yy562;\n        }\n      }\n    }\n  yy580:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy563;\n    }\n    if (yych <= 0xC1) {\n      if (yych <= 'K') {\n        if (yych <= 0x00)\n          goto yy562;\n        if (yych == '\\n')\n          goto yy562;\n        goto yy560;\n      } else {\n        if (yych <= 'k') {\n          if (yych <= 'L')\n            goto yy575;\n          goto yy560;\n        } else {\n          if (yych <= 'l')\n            goto yy575;\n          if (yych <= 0x7F)\n            goto yy560;\n          goto yy562;\n        }\n      }\n    } else {\n      if (yych <= 0xED) {\n        if (yych <= 0xDF)\n          goto yy565;\n        if (yych <= 0xE0)\n          goto yy566;\n        if (yych <= 0xEC)\n          goto yy567;\n        goto yy568;\n      } else {\n        if (yych <= 0xF0) {\n          if (yych <= 0xEF)\n            goto yy567;\n          goto yy569;\n        } else {\n          if (yych <= 0xF3)\n            goto yy570;\n          if (yych <= 0xF4)\n            goto yy571;\n          goto yy562;\n        }\n      }\n    }\n  yy581:\n    yyaccept = 1;\n    marker = ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 64) {\n      goto yy560;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= '\\n')\n          goto yy582;\n        if (yych <= '<')\n          goto yy563;\n      } else {\n        if (yych <= 0xDF)\n          goto yy565;\n        if (yych <= 0xE0)\n          goto yy566;\n        goto yy567;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy568;\n        if (yych <= 0xEF)\n          goto yy567;\n        goto yy569;\n      } else {\n        if (yych <= 0xF3)\n          goto yy570;\n        if (yych <= 0xF4)\n          goto yy571;\n      }\n    }\n  yy582 : { return (bufsize_t)(p - start); }\n  yy583:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy563;\n    }\n    if (yych <= 0xC1) {\n      if (yych <= 'O') {\n        if (yych <= 0x00)\n          goto yy562;\n        if (yych == '\\n')\n          goto yy562;\n        goto yy560;\n      } else {\n        if (yych <= 'o') {\n          if (yych >= 'Q')\n            goto yy560;\n        } else {\n          if (yych <= 'p')\n            goto yy584;\n          if (yych <= 0x7F)\n            goto yy560;\n          goto yy562;\n        }\n      }\n    } else {\n      if (yych <= 0xED) {\n        if (yych <= 0xDF)\n          goto yy565;\n        if (yych <= 0xE0)\n          goto yy566;\n        if (yych <= 0xEC)\n          goto yy567;\n        goto yy568;\n      } else {\n        if (yych <= 0xF0) {\n          if (yych <= 0xEF)\n            goto yy567;\n          goto yy569;\n        } else {\n          if (yych <= 0xF3)\n            goto yy570;\n          if (yych <= 0xF4)\n            goto yy571;\n          goto yy562;\n        }\n      }\n    }\n  yy584:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy563;\n    }\n    if (yych <= 0xC1) {\n      if (yych <= 'S') {\n        if (yych <= 0x00)\n          goto yy562;\n        if (yych == '\\n')\n          goto yy562;\n        goto yy560;\n      } else {\n        if (yych <= 's') {\n          if (yych <= 'T')\n            goto yy578;\n          goto yy560;\n        } else {\n          if (yych <= 't')\n            goto yy578;\n          if (yych <= 0x7F)\n            goto yy560;\n          goto yy562;\n        }\n      }\n    } else {\n      if (yych <= 0xED) {\n        if (yych <= 0xDF)\n          goto yy565;\n        if (yych <= 0xE0)\n          goto yy566;\n        if (yych <= 0xEC)\n          goto yy567;\n        goto yy568;\n      } else {\n        if (yych <= 0xF0) {\n          if (yych <= 0xEF)\n            goto yy567;\n          goto yy569;\n        } else {\n          if (yych <= 0xF3)\n            goto yy570;\n          if (yych <= 0xF4)\n            goto yy571;\n          goto yy562;\n        }\n      }\n    }\n  }\n}\n\n// Try to match an HTML block end line of type 2\nbufsize_t _scan_html_block_end_2(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n\n  {\n    unsigned char yych;\n    unsigned int yyaccept = 0;\n    static const unsigned char yybm[] = {\n        0,  64, 64, 64, 64, 64, 64, 64, 64, 64,  0,  64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64, 64, 64, 128, 64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,\n    };\n    yych = *p;\n    if (yych <= 0xDF) {\n      if (yych <= ',') {\n        if (yych <= 0x00)\n          goto yy587;\n        if (yych != '\\n')\n          goto yy589;\n      } else {\n        if (yych <= '-')\n          goto yy590;\n        if (yych <= 0x7F)\n          goto yy589;\n        if (yych >= 0xC2)\n          goto yy591;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych <= 0xE0)\n          goto yy592;\n        if (yych == 0xED)\n          goto yy594;\n        goto yy593;\n      } else {\n        if (yych <= 0xF0)\n          goto yy595;\n        if (yych <= 0xF3)\n          goto yy596;\n        if (yych <= 0xF4)\n          goto yy597;\n      }\n    }\n  yy587:\n    ++p;\n  yy588 : { return 0; }\n  yy589:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= '\\n') {\n      if (yych <= 0x00)\n        goto yy588;\n      if (yych <= '\\t')\n        goto yy599;\n      goto yy588;\n    } else {\n      if (yych <= 0x7F)\n        goto yy599;\n      if (yych <= 0xC1)\n        goto yy588;\n      if (yych <= 0xF4)\n        goto yy599;\n      goto yy588;\n    }\n  yy590:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yybm[0 + yych] & 128) {\n      goto yy609;\n    }\n    if (yych <= '\\n') {\n      if (yych <= 0x00)\n        goto yy588;\n      if (yych <= '\\t')\n        goto yy599;\n      goto yy588;\n    } else {\n      if (yych <= 0x7F)\n        goto yy599;\n      if (yych <= 0xC1)\n        goto yy588;\n      if (yych <= 0xF4)\n        goto yy599;\n      goto yy588;\n    }\n  yy591:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy588;\n    if (yych <= 0xBF)\n      goto yy598;\n    goto yy588;\n  yy592:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x9F)\n      goto yy588;\n    if (yych <= 0xBF)\n      goto yy602;\n    goto yy588;\n  yy593:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy588;\n    if (yych <= 0xBF)\n      goto yy602;\n    goto yy588;\n  yy594:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy588;\n    if (yych <= 0x9F)\n      goto yy602;\n    goto yy588;\n  yy595:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x8F)\n      goto yy588;\n    if (yych <= 0xBF)\n      goto yy604;\n    goto yy588;\n  yy596:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy588;\n    if (yych <= 0xBF)\n      goto yy604;\n    goto yy588;\n  yy597:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy588;\n    if (yych <= 0x8F)\n      goto yy604;\n    goto yy588;\n  yy598:\n    ++p;\n    yych = *p;\n  yy599:\n    if (yybm[0 + yych] & 64) {\n      goto yy598;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= '\\n')\n          goto yy600;\n        if (yych <= '-')\n          goto yy601;\n      } else {\n        if (yych <= 0xDF)\n          goto yy602;\n        if (yych <= 0xE0)\n          goto yy603;\n        goto yy604;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy605;\n        if (yych <= 0xEF)\n          goto yy604;\n        goto yy606;\n      } else {\n        if (yych <= 0xF3)\n          goto yy607;\n        if (yych <= 0xF4)\n          goto yy608;\n      }\n    }\n  yy600:\n    p = marker;\n    if (yyaccept == 0) {\n      goto yy588;\n    } else {\n      goto yy612;\n    }\n  yy601:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 64) {\n      goto yy598;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= '\\n')\n          goto yy600;\n        if (yych <= '-')\n          goto yy609;\n        goto yy600;\n      } else {\n        if (yych <= 0xDF)\n          goto yy602;\n        if (yych <= 0xE0)\n          goto yy603;\n        goto yy604;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy605;\n        if (yych <= 0xEF)\n          goto yy604;\n        goto yy606;\n      } else {\n        if (yych <= 0xF3)\n          goto yy607;\n        if (yych <= 0xF4)\n          goto yy608;\n        goto yy600;\n      }\n    }\n  yy602:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy600;\n    if (yych <= 0xBF)\n      goto yy598;\n    goto yy600;\n  yy603:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy600;\n    if (yych <= 0xBF)\n      goto yy602;\n    goto yy600;\n  yy604:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy600;\n    if (yych <= 0xBF)\n      goto yy602;\n    goto yy600;\n  yy605:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy600;\n    if (yych <= 0x9F)\n      goto yy602;\n    goto yy600;\n  yy606:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy600;\n    if (yych <= 0xBF)\n      goto yy604;\n    goto yy600;\n  yy607:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy600;\n    if (yych <= 0xBF)\n      goto yy604;\n    goto yy600;\n  yy608:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy600;\n    if (yych <= 0x8F)\n      goto yy604;\n    goto yy600;\n  yy609:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy609;\n    }\n    if (yych <= 0xDF) {\n      if (yych <= '=') {\n        if (yych <= 0x00)\n          goto yy600;\n        if (yych == '\\n')\n          goto yy600;\n        goto yy598;\n      } else {\n        if (yych <= '>')\n          goto yy611;\n        if (yych <= 0x7F)\n          goto yy598;\n        if (yych <= 0xC1)\n          goto yy600;\n        goto yy602;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych <= 0xE0)\n          goto yy603;\n        if (yych == 0xED)\n          goto yy605;\n        goto yy604;\n      } else {\n        if (yych <= 0xF0)\n          goto yy606;\n        if (yych <= 0xF3)\n          goto yy607;\n        if (yych <= 0xF4)\n          goto yy608;\n        goto yy600;\n      }\n    }\n  yy611:\n    yyaccept = 1;\n    marker = ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 64) {\n      goto yy598;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= '\\n')\n          goto yy612;\n        if (yych <= '-')\n          goto yy601;\n      } else {\n        if (yych <= 0xDF)\n          goto yy602;\n        if (yych <= 0xE0)\n          goto yy603;\n        goto yy604;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy605;\n        if (yych <= 0xEF)\n          goto yy604;\n        goto yy606;\n      } else {\n        if (yych <= 0xF3)\n          goto yy607;\n        if (yych <= 0xF4)\n          goto yy608;\n      }\n    }\n  yy612 : { return (bufsize_t)(p - start); }\n  }\n}\n\n// Try to match an HTML block end line of type 3\nbufsize_t _scan_html_block_end_3(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n\n  {\n    unsigned char yych;\n    unsigned int yyaccept = 0;\n    static const unsigned char yybm[] = {\n        0,  64, 64, 64, 64, 64, 64, 64, 64, 64,  0,  64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64, 64, 64, 128, 64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64, 64, 64, 64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,\n    };\n    yych = *p;\n    if (yych <= 0xDF) {\n      if (yych <= '>') {\n        if (yych <= 0x00)\n          goto yy615;\n        if (yych != '\\n')\n          goto yy617;\n      } else {\n        if (yych <= '?')\n          goto yy618;\n        if (yych <= 0x7F)\n          goto yy617;\n        if (yych >= 0xC2)\n          goto yy619;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych <= 0xE0)\n          goto yy620;\n        if (yych == 0xED)\n          goto yy622;\n        goto yy621;\n      } else {\n        if (yych <= 0xF0)\n          goto yy623;\n        if (yych <= 0xF3)\n          goto yy624;\n        if (yych <= 0xF4)\n          goto yy625;\n      }\n    }\n  yy615:\n    ++p;\n  yy616 : { return 0; }\n  yy617:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= '\\n') {\n      if (yych <= 0x00)\n        goto yy616;\n      if (yych <= '\\t')\n        goto yy627;\n      goto yy616;\n    } else {\n      if (yych <= 0x7F)\n        goto yy627;\n      if (yych <= 0xC1)\n        goto yy616;\n      if (yych <= 0xF4)\n        goto yy627;\n      goto yy616;\n    }\n  yy618:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= '=') {\n      if (yych <= 0x00)\n        goto yy616;\n      if (yych == '\\n')\n        goto yy616;\n      goto yy627;\n    } else {\n      if (yych <= 0x7F) {\n        if (yych <= '>')\n          goto yy638;\n        goto yy627;\n      } else {\n        if (yych <= 0xC1)\n          goto yy616;\n        if (yych <= 0xF4)\n          goto yy627;\n        goto yy616;\n      }\n    }\n  yy619:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy616;\n    if (yych <= 0xBF)\n      goto yy626;\n    goto yy616;\n  yy620:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x9F)\n      goto yy616;\n    if (yych <= 0xBF)\n      goto yy631;\n    goto yy616;\n  yy621:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy616;\n    if (yych <= 0xBF)\n      goto yy631;\n    goto yy616;\n  yy622:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy616;\n    if (yych <= 0x9F)\n      goto yy631;\n    goto yy616;\n  yy623:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x8F)\n      goto yy616;\n    if (yych <= 0xBF)\n      goto yy633;\n    goto yy616;\n  yy624:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy616;\n    if (yych <= 0xBF)\n      goto yy633;\n    goto yy616;\n  yy625:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy616;\n    if (yych <= 0x8F)\n      goto yy633;\n    goto yy616;\n  yy626:\n    ++p;\n    yych = *p;\n  yy627:\n    if (yybm[0 + yych] & 64) {\n      goto yy626;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= '\\n')\n          goto yy628;\n        if (yych <= '?')\n          goto yy629;\n      } else {\n        if (yych <= 0xDF)\n          goto yy631;\n        if (yych <= 0xE0)\n          goto yy632;\n        goto yy633;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy634;\n        if (yych <= 0xEF)\n          goto yy633;\n        goto yy635;\n      } else {\n        if (yych <= 0xF3)\n          goto yy636;\n        if (yych <= 0xF4)\n          goto yy637;\n      }\n    }\n  yy628:\n    p = marker;\n    if (yyaccept == 0) {\n      goto yy616;\n    } else {\n      goto yy639;\n    }\n  yy629:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy629;\n    }\n    if (yych <= 0xDF) {\n      if (yych <= '=') {\n        if (yych <= 0x00)\n          goto yy628;\n        if (yych == '\\n')\n          goto yy628;\n        goto yy626;\n      } else {\n        if (yych <= '>')\n          goto yy638;\n        if (yych <= 0x7F)\n          goto yy626;\n        if (yych <= 0xC1)\n          goto yy628;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych <= 0xE0)\n          goto yy632;\n        if (yych == 0xED)\n          goto yy634;\n        goto yy633;\n      } else {\n        if (yych <= 0xF0)\n          goto yy635;\n        if (yych <= 0xF3)\n          goto yy636;\n        if (yych <= 0xF4)\n          goto yy637;\n        goto yy628;\n      }\n    }\n  yy631:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy628;\n    if (yych <= 0xBF)\n      goto yy626;\n    goto yy628;\n  yy632:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy628;\n    if (yych <= 0xBF)\n      goto yy631;\n    goto yy628;\n  yy633:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy628;\n    if (yych <= 0xBF)\n      goto yy631;\n    goto yy628;\n  yy634:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy628;\n    if (yych <= 0x9F)\n      goto yy631;\n    goto yy628;\n  yy635:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy628;\n    if (yych <= 0xBF)\n      goto yy633;\n    goto yy628;\n  yy636:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy628;\n    if (yych <= 0xBF)\n      goto yy633;\n    goto yy628;\n  yy637:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy628;\n    if (yych <= 0x8F)\n      goto yy633;\n    goto yy628;\n  yy638:\n    yyaccept = 1;\n    marker = ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 64) {\n      goto yy626;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= '\\n')\n          goto yy639;\n        if (yych <= '?')\n          goto yy629;\n      } else {\n        if (yych <= 0xDF)\n          goto yy631;\n        if (yych <= 0xE0)\n          goto yy632;\n        goto yy633;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy634;\n        if (yych <= 0xEF)\n          goto yy633;\n        goto yy635;\n      } else {\n        if (yych <= 0xF3)\n          goto yy636;\n        if (yych <= 0xF4)\n          goto yy637;\n      }\n    }\n  yy639 : { return (bufsize_t)(p - start); }\n  }\n}\n\n// Try to match an HTML block end line of type 4\nbufsize_t _scan_html_block_end_4(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n\n  {\n    unsigned char yych;\n    unsigned int yyaccept = 0;\n    static const unsigned char yybm[] = {\n        0,   128, 128, 128, 128, 128, 128, 128, 128, 128, 0,   128, 128, 128,\n        128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 128, 128, 128, 128, 128, 64,  128, 128, 128, 128, 128, 128, 128,\n        128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,\n        128, 128, 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,\n    };\n    yych = *p;\n    if (yybm[0 + yych] & 64) {\n      goto yy645;\n    }\n    if (yych <= 0xE0) {\n      if (yych <= '\\n') {\n        if (yych <= 0x00)\n          goto yy642;\n        if (yych <= '\\t')\n          goto yy644;\n      } else {\n        if (yych <= 0x7F)\n          goto yy644;\n        if (yych <= 0xC1)\n          goto yy642;\n        if (yych <= 0xDF)\n          goto yy648;\n        goto yy649;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych == 0xED)\n          goto yy651;\n        goto yy650;\n      } else {\n        if (yych <= 0xF0)\n          goto yy652;\n        if (yych <= 0xF3)\n          goto yy653;\n        if (yych <= 0xF4)\n          goto yy654;\n      }\n    }\n  yy642:\n    ++p;\n  yy643 : { return 0; }\n  yy644:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= '\\n') {\n      if (yych <= 0x00)\n        goto yy643;\n      if (yych <= '\\t')\n        goto yy656;\n      goto yy643;\n    } else {\n      if (yych <= 0x7F)\n        goto yy656;\n      if (yych <= 0xC1)\n        goto yy643;\n      if (yych <= 0xF4)\n        goto yy656;\n      goto yy643;\n    }\n  yy645:\n    yyaccept = 1;\n    marker = ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy655;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= '\\n')\n          goto yy647;\n        if (yych <= '>')\n          goto yy645;\n      } else {\n        if (yych <= 0xDF)\n          goto yy658;\n        if (yych <= 0xE0)\n          goto yy659;\n        goto yy660;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy661;\n        if (yych <= 0xEF)\n          goto yy660;\n        goto yy662;\n      } else {\n        if (yych <= 0xF3)\n          goto yy663;\n        if (yych <= 0xF4)\n          goto yy664;\n      }\n    }\n  yy647 : { return (bufsize_t)(p - start); }\n  yy648:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy643;\n    if (yych <= 0xBF)\n      goto yy655;\n    goto yy643;\n  yy649:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x9F)\n      goto yy643;\n    if (yych <= 0xBF)\n      goto yy658;\n    goto yy643;\n  yy650:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy643;\n    if (yych <= 0xBF)\n      goto yy658;\n    goto yy643;\n  yy651:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy643;\n    if (yych <= 0x9F)\n      goto yy658;\n    goto yy643;\n  yy652:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x8F)\n      goto yy643;\n    if (yych <= 0xBF)\n      goto yy660;\n    goto yy643;\n  yy653:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy643;\n    if (yych <= 0xBF)\n      goto yy660;\n    goto yy643;\n  yy654:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy643;\n    if (yych <= 0x8F)\n      goto yy660;\n    goto yy643;\n  yy655:\n    ++p;\n    yych = *p;\n  yy656:\n    if (yybm[0 + yych] & 128) {\n      goto yy655;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= '\\n')\n          goto yy657;\n        if (yych <= '>')\n          goto yy645;\n      } else {\n        if (yych <= 0xDF)\n          goto yy658;\n        if (yych <= 0xE0)\n          goto yy659;\n        goto yy660;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy661;\n        if (yych <= 0xEF)\n          goto yy660;\n        goto yy662;\n      } else {\n        if (yych <= 0xF3)\n          goto yy663;\n        if (yych <= 0xF4)\n          goto yy664;\n      }\n    }\n  yy657:\n    p = marker;\n    if (yyaccept == 0) {\n      goto yy643;\n    } else {\n      goto yy647;\n    }\n  yy658:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy657;\n    if (yych <= 0xBF)\n      goto yy655;\n    goto yy657;\n  yy659:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy657;\n    if (yych <= 0xBF)\n      goto yy658;\n    goto yy657;\n  yy660:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy657;\n    if (yych <= 0xBF)\n      goto yy658;\n    goto yy657;\n  yy661:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy657;\n    if (yych <= 0x9F)\n      goto yy658;\n    goto yy657;\n  yy662:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy657;\n    if (yych <= 0xBF)\n      goto yy660;\n    goto yy657;\n  yy663:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy657;\n    if (yych <= 0xBF)\n      goto yy660;\n    goto yy657;\n  yy664:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy657;\n    if (yych <= 0x8F)\n      goto yy660;\n    goto yy657;\n  }\n}\n\n// Try to match an HTML block end line of type 5\nbufsize_t _scan_html_block_end_5(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n\n  {\n    unsigned char yych;\n    unsigned int yyaccept = 0;\n    static const unsigned char yybm[] = {\n        0,  64, 64, 64,  64, 64, 64, 64, 64, 64, 0,  64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 128, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 64, 64,  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\n        64, 64, 0,  0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n        0,  0,  0,  0,\n    };\n    yych = *p;\n    if (yych <= 0xDF) {\n      if (yych <= '\\\\') {\n        if (yych <= 0x00)\n          goto yy667;\n        if (yych != '\\n')\n          goto yy669;\n      } else {\n        if (yych <= ']')\n          goto yy670;\n        if (yych <= 0x7F)\n          goto yy669;\n        if (yych >= 0xC2)\n          goto yy671;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych <= 0xE0)\n          goto yy672;\n        if (yych == 0xED)\n          goto yy674;\n        goto yy673;\n      } else {\n        if (yych <= 0xF0)\n          goto yy675;\n        if (yych <= 0xF3)\n          goto yy676;\n        if (yych <= 0xF4)\n          goto yy677;\n      }\n    }\n  yy667:\n    ++p;\n  yy668 : { return 0; }\n  yy669:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= '\\n') {\n      if (yych <= 0x00)\n        goto yy668;\n      if (yych <= '\\t')\n        goto yy679;\n      goto yy668;\n    } else {\n      if (yych <= 0x7F)\n        goto yy679;\n      if (yych <= 0xC1)\n        goto yy668;\n      if (yych <= 0xF4)\n        goto yy679;\n      goto yy668;\n    }\n  yy670:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yybm[0 + yych] & 128) {\n      goto yy689;\n    }\n    if (yych <= '\\n') {\n      if (yych <= 0x00)\n        goto yy668;\n      if (yych <= '\\t')\n        goto yy679;\n      goto yy668;\n    } else {\n      if (yych <= 0x7F)\n        goto yy679;\n      if (yych <= 0xC1)\n        goto yy668;\n      if (yych <= 0xF4)\n        goto yy679;\n      goto yy668;\n    }\n  yy671:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy668;\n    if (yych <= 0xBF)\n      goto yy678;\n    goto yy668;\n  yy672:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x9F)\n      goto yy668;\n    if (yych <= 0xBF)\n      goto yy682;\n    goto yy668;\n  yy673:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy668;\n    if (yych <= 0xBF)\n      goto yy682;\n    goto yy668;\n  yy674:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy668;\n    if (yych <= 0x9F)\n      goto yy682;\n    goto yy668;\n  yy675:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x8F)\n      goto yy668;\n    if (yych <= 0xBF)\n      goto yy684;\n    goto yy668;\n  yy676:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy668;\n    if (yych <= 0xBF)\n      goto yy684;\n    goto yy668;\n  yy677:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x7F)\n      goto yy668;\n    if (yych <= 0x8F)\n      goto yy684;\n    goto yy668;\n  yy678:\n    ++p;\n    yych = *p;\n  yy679:\n    if (yybm[0 + yych] & 64) {\n      goto yy678;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= '\\n')\n          goto yy680;\n        if (yych <= ']')\n          goto yy681;\n      } else {\n        if (yych <= 0xDF)\n          goto yy682;\n        if (yych <= 0xE0)\n          goto yy683;\n        goto yy684;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy685;\n        if (yych <= 0xEF)\n          goto yy684;\n        goto yy686;\n      } else {\n        if (yych <= 0xF3)\n          goto yy687;\n        if (yych <= 0xF4)\n          goto yy688;\n      }\n    }\n  yy680:\n    p = marker;\n    if (yyaccept == 0) {\n      goto yy668;\n    } else {\n      goto yy692;\n    }\n  yy681:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 64) {\n      goto yy678;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= '\\n')\n          goto yy680;\n        if (yych <= ']')\n          goto yy689;\n        goto yy680;\n      } else {\n        if (yych <= 0xDF)\n          goto yy682;\n        if (yych <= 0xE0)\n          goto yy683;\n        goto yy684;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy685;\n        if (yych <= 0xEF)\n          goto yy684;\n        goto yy686;\n      } else {\n        if (yych <= 0xF3)\n          goto yy687;\n        if (yych <= 0xF4)\n          goto yy688;\n        goto yy680;\n      }\n    }\n  yy682:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy680;\n    if (yych <= 0xBF)\n      goto yy678;\n    goto yy680;\n  yy683:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy680;\n    if (yych <= 0xBF)\n      goto yy682;\n    goto yy680;\n  yy684:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy680;\n    if (yych <= 0xBF)\n      goto yy682;\n    goto yy680;\n  yy685:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy680;\n    if (yych <= 0x9F)\n      goto yy682;\n    goto yy680;\n  yy686:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy680;\n    if (yych <= 0xBF)\n      goto yy684;\n    goto yy680;\n  yy687:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy680;\n    if (yych <= 0xBF)\n      goto yy684;\n    goto yy680;\n  yy688:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy680;\n    if (yych <= 0x8F)\n      goto yy684;\n    goto yy680;\n  yy689:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy689;\n    }\n    if (yych <= 0xDF) {\n      if (yych <= '=') {\n        if (yych <= 0x00)\n          goto yy680;\n        if (yych == '\\n')\n          goto yy680;\n        goto yy678;\n      } else {\n        if (yych <= '>')\n          goto yy691;\n        if (yych <= 0x7F)\n          goto yy678;\n        if (yych <= 0xC1)\n          goto yy680;\n        goto yy682;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych <= 0xE0)\n          goto yy683;\n        if (yych == 0xED)\n          goto yy685;\n        goto yy684;\n      } else {\n        if (yych <= 0xF0)\n          goto yy686;\n        if (yych <= 0xF3)\n          goto yy687;\n        if (yych <= 0xF4)\n          goto yy688;\n        goto yy680;\n      }\n    }\n  yy691:\n    yyaccept = 1;\n    marker = ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 64) {\n      goto yy678;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= '\\n')\n          goto yy692;\n        if (yych <= ']')\n          goto yy681;\n      } else {\n        if (yych <= 0xDF)\n          goto yy682;\n        if (yych <= 0xE0)\n          goto yy683;\n        goto yy684;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy685;\n        if (yych <= 0xEF)\n          goto yy684;\n        goto yy686;\n      } else {\n        if (yych <= 0xF3)\n          goto yy687;\n        if (yych <= 0xF4)\n          goto yy688;\n      }\n    }\n  yy692 : { return (bufsize_t)(p - start); }\n  }\n}\n\n// Try to match a link title (in single quotes, in double quotes, or\n// in parentheses), returning number of chars matched.  Allow one\n// level of internal nesting (quotes within quotes).\nbufsize_t _scan_link_title(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n\n  {\n    unsigned char yych;\n    unsigned int yyaccept = 0;\n    static const unsigned char yybm[] = {\n        0,   208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,\n        208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,\n        208, 208, 208, 208, 208, 208, 192, 208, 208, 208, 208, 144, 80,  80,\n        208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,\n        208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,\n        208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,\n        208, 208, 208, 208, 208, 208, 208, 208, 32,  208, 208, 208, 208, 208,\n        208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,\n        208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,\n        208, 208, 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,\n    };\n    yych = *p;\n    if (yych <= '&') {\n      if (yych == '\"')\n        goto yy697;\n    } else {\n      if (yych <= '\\'')\n        goto yy698;\n      if (yych <= '(')\n        goto yy699;\n    }\n    ++p;\n  yy696 : { return 0; }\n  yy697:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x00)\n      goto yy696;\n    if (yych <= 0x7F)\n      goto yy701;\n    if (yych <= 0xC1)\n      goto yy696;\n    if (yych <= 0xF4)\n      goto yy701;\n    goto yy696;\n  yy698:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= 0x00)\n      goto yy696;\n    if (yych <= 0x7F)\n      goto yy715;\n    if (yych <= 0xC1)\n      goto yy696;\n    if (yych <= 0xF4)\n      goto yy715;\n    goto yy696;\n  yy699:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych <= '(') {\n      if (yych <= 0x00)\n        goto yy696;\n      if (yych <= '\\'')\n        goto yy728;\n      goto yy696;\n    } else {\n      if (yych <= 0x7F)\n        goto yy728;\n      if (yych <= 0xC1)\n        goto yy696;\n      if (yych <= 0xF4)\n        goto yy728;\n      goto yy696;\n    }\n  yy700:\n    ++p;\n    yych = *p;\n  yy701:\n    if (yybm[0 + yych] & 16) {\n      goto yy700;\n    }\n    if (yych <= 0xE0) {\n      if (yych <= '\\\\') {\n        if (yych <= 0x00)\n          goto yy702;\n        if (yych <= '\"')\n          goto yy703;\n        goto yy705;\n      } else {\n        if (yych <= 0xC1)\n          goto yy702;\n        if (yych <= 0xDF)\n          goto yy707;\n        goto yy708;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych == 0xED)\n          goto yy710;\n        goto yy709;\n      } else {\n        if (yych <= 0xF0)\n          goto yy711;\n        if (yych <= 0xF3)\n          goto yy712;\n        if (yych <= 0xF4)\n          goto yy713;\n      }\n    }\n  yy702:\n    p = marker;\n    if (yyaccept <= 1) {\n      if (yyaccept == 0) {\n        goto yy696;\n      } else {\n        goto yy704;\n      }\n    } else {\n      if (yyaccept == 2) {\n        goto yy717;\n      } else {\n        goto yy730;\n      }\n    }\n  yy703:\n    ++p;\n  yy704 : { return (bufsize_t)(p - start); }\n  yy705:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 16) {\n      goto yy700;\n    }\n    if (yych <= 0xE0) {\n      if (yych <= '\\\\') {\n        if (yych <= 0x00)\n          goto yy702;\n        if (yych <= '\"')\n          goto yy740;\n        goto yy705;\n      } else {\n        if (yych <= 0xC1)\n          goto yy702;\n        if (yych >= 0xE0)\n          goto yy708;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych == 0xED)\n          goto yy710;\n        goto yy709;\n      } else {\n        if (yych <= 0xF0)\n          goto yy711;\n        if (yych <= 0xF3)\n          goto yy712;\n        if (yych <= 0xF4)\n          goto yy713;\n        goto yy702;\n      }\n    }\n  yy707:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy702;\n    if (yych <= 0xBF)\n      goto yy700;\n    goto yy702;\n  yy708:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy702;\n    if (yych <= 0xBF)\n      goto yy707;\n    goto yy702;\n  yy709:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy702;\n    if (yych <= 0xBF)\n      goto yy707;\n    goto yy702;\n  yy710:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy702;\n    if (yych <= 0x9F)\n      goto yy707;\n    goto yy702;\n  yy711:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy702;\n    if (yych <= 0xBF)\n      goto yy709;\n    goto yy702;\n  yy712:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy702;\n    if (yych <= 0xBF)\n      goto yy709;\n    goto yy702;\n  yy713:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy702;\n    if (yych <= 0x8F)\n      goto yy709;\n    goto yy702;\n  yy714:\n    ++p;\n    yych = *p;\n  yy715:\n    if (yybm[0 + yych] & 64) {\n      goto yy714;\n    }\n    if (yych <= 0xE0) {\n      if (yych <= '\\\\') {\n        if (yych <= 0x00)\n          goto yy702;\n        if (yych >= '(')\n          goto yy718;\n      } else {\n        if (yych <= 0xC1)\n          goto yy702;\n        if (yych <= 0xDF)\n          goto yy720;\n        goto yy721;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych == 0xED)\n          goto yy723;\n        goto yy722;\n      } else {\n        if (yych <= 0xF0)\n          goto yy724;\n        if (yych <= 0xF3)\n          goto yy725;\n        if (yych <= 0xF4)\n          goto yy726;\n        goto yy702;\n      }\n    }\n  yy716:\n    ++p;\n  yy717 : { return (bufsize_t)(p - start); }\n  yy718:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 64) {\n      goto yy714;\n    }\n    if (yych <= 0xE0) {\n      if (yych <= '\\\\') {\n        if (yych <= 0x00)\n          goto yy702;\n        if (yych <= '\\'')\n          goto yy741;\n        goto yy718;\n      } else {\n        if (yych <= 0xC1)\n          goto yy702;\n        if (yych >= 0xE0)\n          goto yy721;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych == 0xED)\n          goto yy723;\n        goto yy722;\n      } else {\n        if (yych <= 0xF0)\n          goto yy724;\n        if (yych <= 0xF3)\n          goto yy725;\n        if (yych <= 0xF4)\n          goto yy726;\n        goto yy702;\n      }\n    }\n  yy720:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy702;\n    if (yych <= 0xBF)\n      goto yy714;\n    goto yy702;\n  yy721:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy702;\n    if (yych <= 0xBF)\n      goto yy720;\n    goto yy702;\n  yy722:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy702;\n    if (yych <= 0xBF)\n      goto yy720;\n    goto yy702;\n  yy723:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy702;\n    if (yych <= 0x9F)\n      goto yy720;\n    goto yy702;\n  yy724:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy702;\n    if (yych <= 0xBF)\n      goto yy722;\n    goto yy702;\n  yy725:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy702;\n    if (yych <= 0xBF)\n      goto yy722;\n    goto yy702;\n  yy726:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy702;\n    if (yych <= 0x8F)\n      goto yy722;\n    goto yy702;\n  yy727:\n    ++p;\n    yych = *p;\n  yy728:\n    if (yybm[0 + yych] & 128) {\n      goto yy727;\n    }\n    if (yych <= 0xE0) {\n      if (yych <= '\\\\') {\n        if (yych <= '(')\n          goto yy702;\n        if (yych >= '*')\n          goto yy731;\n      } else {\n        if (yych <= 0xC1)\n          goto yy702;\n        if (yych <= 0xDF)\n          goto yy733;\n        goto yy734;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych == 0xED)\n          goto yy736;\n        goto yy735;\n      } else {\n        if (yych <= 0xF0)\n          goto yy737;\n        if (yych <= 0xF3)\n          goto yy738;\n        if (yych <= 0xF4)\n          goto yy739;\n        goto yy702;\n      }\n    }\n  yy729:\n    ++p;\n  yy730 : { return (bufsize_t)(p - start); }\n  yy731:\n    ++p;\n    yych = *p;\n    if (yych <= 0xDF) {\n      if (yych <= '[') {\n        if (yych <= 0x00)\n          goto yy702;\n        if (yych == ')')\n          goto yy742;\n        goto yy727;\n      } else {\n        if (yych <= '\\\\')\n          goto yy731;\n        if (yych <= 0x7F)\n          goto yy727;\n        if (yych <= 0xC1)\n          goto yy702;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych <= 0xE0)\n          goto yy734;\n        if (yych == 0xED)\n          goto yy736;\n        goto yy735;\n      } else {\n        if (yych <= 0xF0)\n          goto yy737;\n        if (yych <= 0xF3)\n          goto yy738;\n        if (yych <= 0xF4)\n          goto yy739;\n        goto yy702;\n      }\n    }\n  yy733:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy702;\n    if (yych <= 0xBF)\n      goto yy727;\n    goto yy702;\n  yy734:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy702;\n    if (yych <= 0xBF)\n      goto yy733;\n    goto yy702;\n  yy735:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy702;\n    if (yych <= 0xBF)\n      goto yy733;\n    goto yy702;\n  yy736:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy702;\n    if (yych <= 0x9F)\n      goto yy733;\n    goto yy702;\n  yy737:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy702;\n    if (yych <= 0xBF)\n      goto yy735;\n    goto yy702;\n  yy738:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy702;\n    if (yych <= 0xBF)\n      goto yy735;\n    goto yy702;\n  yy739:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy702;\n    if (yych <= 0x8F)\n      goto yy735;\n    goto yy702;\n  yy740:\n    yyaccept = 1;\n    marker = ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 16) {\n      goto yy700;\n    }\n    if (yych <= 0xE0) {\n      if (yych <= '\\\\') {\n        if (yych <= 0x00)\n          goto yy704;\n        if (yych <= '\"')\n          goto yy703;\n        goto yy705;\n      } else {\n        if (yych <= 0xC1)\n          goto yy704;\n        if (yych <= 0xDF)\n          goto yy707;\n        goto yy708;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych == 0xED)\n          goto yy710;\n        goto yy709;\n      } else {\n        if (yych <= 0xF0)\n          goto yy711;\n        if (yych <= 0xF3)\n          goto yy712;\n        if (yych <= 0xF4)\n          goto yy713;\n        goto yy704;\n      }\n    }\n  yy741:\n    yyaccept = 2;\n    marker = ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 64) {\n      goto yy714;\n    }\n    if (yych <= 0xE0) {\n      if (yych <= '\\\\') {\n        if (yych <= 0x00)\n          goto yy717;\n        if (yych <= '\\'')\n          goto yy716;\n        goto yy718;\n      } else {\n        if (yych <= 0xC1)\n          goto yy717;\n        if (yych <= 0xDF)\n          goto yy720;\n        goto yy721;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych == 0xED)\n          goto yy723;\n        goto yy722;\n      } else {\n        if (yych <= 0xF0)\n          goto yy724;\n        if (yych <= 0xF3)\n          goto yy725;\n        if (yych <= 0xF4)\n          goto yy726;\n        goto yy717;\n      }\n    }\n  yy742:\n    yyaccept = 3;\n    marker = ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy727;\n    }\n    if (yych <= 0xE0) {\n      if (yych <= '\\\\') {\n        if (yych <= '(')\n          goto yy730;\n        if (yych <= ')')\n          goto yy729;\n        goto yy731;\n      } else {\n        if (yych <= 0xC1)\n          goto yy730;\n        if (yych <= 0xDF)\n          goto yy733;\n        goto yy734;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych == 0xED)\n          goto yy736;\n        goto yy735;\n      } else {\n        if (yych <= 0xF0)\n          goto yy737;\n        if (yych <= 0xF3)\n          goto yy738;\n        if (yych <= 0xF4)\n          goto yy739;\n        goto yy730;\n      }\n    }\n  }\n}\n\n// Match space characters, including newlines.\nbufsize_t _scan_spacechars(const unsigned char *p) {\n  const unsigned char *start = p;\n\n  {\n    unsigned char yych;\n    static const unsigned char yybm[] = {\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128, 128, 0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0,   128, 0,   0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0,   0,   0,   0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0,   0,   0,   0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0,   0,   0,   0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0,   0,   0,   0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0,   0,   0,   0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0,   0,   0,   0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0,   0,   0,   0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0,   0,   0,   0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0,   0,   0,   0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0,   0,   0,   0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0,   0,   0,   0, 0,\n    };\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy747;\n    }\n    ++p;\n    { return 0; }\n  yy747:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy747;\n    }\n    { return (bufsize_t)(p - start); }\n  }\n}\n\n// Match ATX heading start.\nbufsize_t _scan_atx_heading_start(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n\n  {\n    unsigned char yych;\n    static const unsigned char yybm[] = {\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0,\n    };\n    yych = *p;\n    if (yych == '#')\n      goto yy754;\n    ++p;\n  yy753 : { return 0; }\n  yy754:\n    yych = *(marker = ++p);\n    if (yybm[0 + yych] & 128) {\n      goto yy755;\n    }\n    if (yych <= '\\f') {\n      if (yych <= 0x08)\n        goto yy753;\n      if (yych <= '\\n')\n        goto yy758;\n      goto yy753;\n    } else {\n      if (yych <= '\\r')\n        goto yy758;\n      if (yych == '#')\n        goto yy759;\n      goto yy753;\n    }\n  yy755:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy755;\n    }\n  yy757 : { return (bufsize_t)(p - start); }\n  yy758:\n    yych = *++p;\n    goto yy757;\n  yy759:\n    yych = *++p;\n    if (yybm[0 + yych] & 128) {\n      goto yy755;\n    }\n    if (yych <= '\\f') {\n      if (yych <= 0x08)\n        goto yy760;\n      if (yych <= '\\n')\n        goto yy758;\n    } else {\n      if (yych <= '\\r')\n        goto yy758;\n      if (yych == '#')\n        goto yy761;\n    }\n  yy760:\n    p = marker;\n    goto yy753;\n  yy761:\n    yych = *++p;\n    if (yybm[0 + yych] & 128) {\n      goto yy755;\n    }\n    if (yych <= '\\f') {\n      if (yych <= 0x08)\n        goto yy760;\n      if (yych <= '\\n')\n        goto yy758;\n      goto yy760;\n    } else {\n      if (yych <= '\\r')\n        goto yy758;\n      if (yych != '#')\n        goto yy760;\n    }\n    yych = *++p;\n    if (yybm[0 + yych] & 128) {\n      goto yy755;\n    }\n    if (yych <= '\\f') {\n      if (yych <= 0x08)\n        goto yy760;\n      if (yych <= '\\n')\n        goto yy758;\n      goto yy760;\n    } else {\n      if (yych <= '\\r')\n        goto yy758;\n      if (yych != '#')\n        goto yy760;\n    }\n    yych = *++p;\n    if (yybm[0 + yych] & 128) {\n      goto yy755;\n    }\n    if (yych <= '\\f') {\n      if (yych <= 0x08)\n        goto yy760;\n      if (yych <= '\\n')\n        goto yy758;\n      goto yy760;\n    } else {\n      if (yych <= '\\r')\n        goto yy758;\n      if (yych != '#')\n        goto yy760;\n    }\n    ++p;\n    if (yybm[0 + (yych = *p)] & 128) {\n      goto yy755;\n    }\n    if (yych <= 0x08)\n      goto yy760;\n    if (yych <= '\\n')\n      goto yy758;\n    if (yych == '\\r')\n      goto yy758;\n    goto yy760;\n  }\n}\n\n// Match setext heading line.  Return 1 for level-1 heading,\n// 2 for level-2, 0 for no match.\nbufsize_t _scan_setext_heading_line(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n\n  {\n    unsigned char yych;\n    static const unsigned char yybm[] = {\n        0, 0,  0, 0, 0, 0, 0, 0, 0, 32, 0,  0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0,\n        0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  32, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0,\n        0, 64, 0, 0, 0, 0, 0, 0, 0, 0,  0,  0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0,\n        0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  0,  0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0,\n        0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  0,  0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0,\n        0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  0,  0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0,\n        0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  0,  0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0,\n        0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  0,  0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0,\n        0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  0,  0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0,\n        0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  0,  0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0,\n        0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  0,  0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0,\n        0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  0,  0, 0, 0,\n    };\n    yych = *p;\n    if (yych == '-')\n      goto yy769;\n    if (yych == '=')\n      goto yy770;\n    ++p;\n  yy768 : { return 0; }\n  yy769:\n    yych = *(marker = ++p);\n    if (yybm[0 + yych] & 64) {\n      goto yy776;\n    }\n    if (yych <= '\\f') {\n      if (yych <= 0x08)\n        goto yy768;\n      if (yych <= '\\n')\n        goto yy772;\n      goto yy768;\n    } else {\n      if (yych <= '\\r')\n        goto yy772;\n      if (yych == ' ')\n        goto yy772;\n      goto yy768;\n    }\n  yy770:\n    yych = *(marker = ++p);\n    if (yybm[0 + yych] & 128) {\n      goto yy782;\n    }\n    if (yych <= '\\f') {\n      if (yych <= 0x08)\n        goto yy768;\n      if (yych <= '\\n')\n        goto yy779;\n      goto yy768;\n    } else {\n      if (yych <= '\\r')\n        goto yy779;\n      if (yych == ' ')\n        goto yy779;\n      goto yy768;\n    }\n  yy771:\n    ++p;\n    yych = *p;\n  yy772:\n    if (yybm[0 + yych] & 32) {\n      goto yy771;\n    }\n    if (yych <= 0x08)\n      goto yy773;\n    if (yych <= '\\n')\n      goto yy774;\n    if (yych == '\\r')\n      goto yy774;\n  yy773:\n    p = marker;\n    goto yy768;\n  yy774:\n    ++p;\n    { return 2; }\n  yy776:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 32) {\n      goto yy771;\n    }\n    if (yych <= '\\f') {\n      if (yych <= 0x08)\n        goto yy773;\n      if (yych <= '\\n')\n        goto yy774;\n      goto yy773;\n    } else {\n      if (yych <= '\\r')\n        goto yy774;\n      if (yych == '-')\n        goto yy776;\n      goto yy773;\n    }\n  yy778:\n    ++p;\n    yych = *p;\n  yy779:\n    if (yych <= '\\f') {\n      if (yych <= 0x08)\n        goto yy773;\n      if (yych <= '\\t')\n        goto yy778;\n      if (yych >= '\\v')\n        goto yy773;\n    } else {\n      if (yych <= '\\r')\n        goto yy780;\n      if (yych == ' ')\n        goto yy778;\n      goto yy773;\n    }\n  yy780:\n    ++p;\n    { return 1; }\n  yy782:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy782;\n    }\n    if (yych <= '\\f') {\n      if (yych <= 0x08)\n        goto yy773;\n      if (yych <= '\\t')\n        goto yy778;\n      if (yych <= '\\n')\n        goto yy780;\n      goto yy773;\n    } else {\n      if (yych <= '\\r')\n        goto yy780;\n      if (yych == ' ')\n        goto yy778;\n      goto yy773;\n    }\n  }\n}\n\n// Scan an opening code fence.\nbufsize_t _scan_open_code_fence(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n\n  {\n    unsigned char yych;\n    static const unsigned char yybm[] = {\n        0,   192, 192, 192, 192, 192, 192, 192, 192, 192, 0,   192, 192, 0,\n        192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,\n        192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,\n        192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,\n        192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,\n        192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,\n        192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 144, 192,\n        192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,\n        192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,\n        224, 192, 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n        0,   0,   0,   0,\n    };\n    yych = *p;\n    if (yych == '`')\n      goto yy788;\n    if (yych == '~')\n      goto yy789;\n    ++p;\n  yy787 : { return 0; }\n  yy788:\n    yych = *(marker = ++p);\n    if (yych == '`')\n      goto yy790;\n    goto yy787;\n  yy789:\n    yych = *(marker = ++p);\n    if (yych == '~')\n      goto yy792;\n    goto yy787;\n  yy790:\n    yych = *++p;\n    if (yybm[0 + yych] & 16) {\n      goto yy793;\n    }\n  yy791:\n    p = marker;\n    goto yy787;\n  yy792:\n    yych = *++p;\n    if (yybm[0 + yych] & 32) {\n      goto yy795;\n    }\n    goto yy791;\n  yy793:\n    ++p;\n    yych = *p;\n    marker = p;\n    if (yybm[0 + yych] & 64) {\n      goto yy797;\n    }\n    if (yych <= 0xE0) {\n      if (yych <= '`') {\n        if (yych <= 0x00)\n          goto yy791;\n        if (yych <= '\\r')\n          goto yy799;\n        goto yy793;\n      } else {\n        if (yych <= 0xC1)\n          goto yy791;\n        if (yych <= 0xDF)\n          goto yy801;\n        goto yy802;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych == 0xED)\n          goto yy804;\n        goto yy803;\n      } else {\n        if (yych <= 0xF0)\n          goto yy805;\n        if (yych <= 0xF3)\n          goto yy806;\n        if (yych <= 0xF4)\n          goto yy807;\n        goto yy791;\n      }\n    }\n  yy795:\n    ++p;\n    yych = *p;\n    marker = p;\n    if (yybm[0 + yych] & 32) {\n      goto yy795;\n    }\n    if (yych <= 0xDF) {\n      if (yych <= '\\f') {\n        if (yych <= 0x00)\n          goto yy791;\n        if (yych == '\\n')\n          goto yy810;\n        goto yy808;\n      } else {\n        if (yych <= '\\r')\n          goto yy810;\n        if (yych <= 0x7F)\n          goto yy808;\n        if (yych <= 0xC1)\n          goto yy791;\n        goto yy812;\n      }\n    } else {\n      if (yych <= 0xEF) {\n        if (yych <= 0xE0)\n          goto yy813;\n        if (yych == 0xED)\n          goto yy815;\n        goto yy814;\n      } else {\n        if (yych <= 0xF0)\n          goto yy816;\n        if (yych <= 0xF3)\n          goto yy817;\n        if (yych <= 0xF4)\n          goto yy818;\n        goto yy791;\n      }\n    }\n  yy797:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 64) {\n      goto yy797;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= 0x00)\n          goto yy791;\n        if (yych >= 0x0E)\n          goto yy791;\n      } else {\n        if (yych <= 0xDF)\n          goto yy801;\n        if (yych <= 0xE0)\n          goto yy802;\n        goto yy803;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy804;\n        if (yych <= 0xEF)\n          goto yy803;\n        goto yy805;\n      } else {\n        if (yych <= 0xF3)\n          goto yy806;\n        if (yych <= 0xF4)\n          goto yy807;\n        goto yy791;\n      }\n    }\n  yy799:\n    ++p;\n    p = marker;\n    { return (bufsize_t)(p - start); }\n  yy801:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy791;\n    if (yych <= 0xBF)\n      goto yy797;\n    goto yy791;\n  yy802:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy791;\n    if (yych <= 0xBF)\n      goto yy801;\n    goto yy791;\n  yy803:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy791;\n    if (yych <= 0xBF)\n      goto yy801;\n    goto yy791;\n  yy804:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy791;\n    if (yych <= 0x9F)\n      goto yy801;\n    goto yy791;\n  yy805:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy791;\n    if (yych <= 0xBF)\n      goto yy803;\n    goto yy791;\n  yy806:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy791;\n    if (yych <= 0xBF)\n      goto yy803;\n    goto yy791;\n  yy807:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy791;\n    if (yych <= 0x8F)\n      goto yy803;\n    goto yy791;\n  yy808:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy808;\n    }\n    if (yych <= 0xEC) {\n      if (yych <= 0xC1) {\n        if (yych <= 0x00)\n          goto yy791;\n        if (yych >= 0x0E)\n          goto yy791;\n      } else {\n        if (yych <= 0xDF)\n          goto yy812;\n        if (yych <= 0xE0)\n          goto yy813;\n        goto yy814;\n      }\n    } else {\n      if (yych <= 0xF0) {\n        if (yych <= 0xED)\n          goto yy815;\n        if (yych <= 0xEF)\n          goto yy814;\n        goto yy816;\n      } else {\n        if (yych <= 0xF3)\n          goto yy817;\n        if (yych <= 0xF4)\n          goto yy818;\n        goto yy791;\n      }\n    }\n  yy810:\n    ++p;\n    p = marker;\n    { return (bufsize_t)(p - start); }\n  yy812:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy791;\n    if (yych <= 0xBF)\n      goto yy808;\n    goto yy791;\n  yy813:\n    ++p;\n    yych = *p;\n    if (yych <= 0x9F)\n      goto yy791;\n    if (yych <= 0xBF)\n      goto yy812;\n    goto yy791;\n  yy814:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy791;\n    if (yych <= 0xBF)\n      goto yy812;\n    goto yy791;\n  yy815:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy791;\n    if (yych <= 0x9F)\n      goto yy812;\n    goto yy791;\n  yy816:\n    ++p;\n    yych = *p;\n    if (yych <= 0x8F)\n      goto yy791;\n    if (yych <= 0xBF)\n      goto yy814;\n    goto yy791;\n  yy817:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy791;\n    if (yych <= 0xBF)\n      goto yy814;\n    goto yy791;\n  yy818:\n    ++p;\n    yych = *p;\n    if (yych <= 0x7F)\n      goto yy791;\n    if (yych <= 0x8F)\n      goto yy814;\n    goto yy791;\n  }\n}\n\n// Scan a closing code fence with length at least len.\nbufsize_t _scan_close_code_fence(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n\n  {\n    unsigned char yych;\n    static const unsigned char yybm[] = {\n        0, 0, 0, 0, 0, 0, 0, 0, 0,  128, 0,   0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0,  0,   128, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0,  0,   0,   0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0,  0,   0,   0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 32, 0,   0,   0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0,  0,   0,   0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0,  0,   0,   0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0,  0,   0,   0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0,  0,   0,   0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0,  0,   0,   0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0,  0,   0,   0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0,\n        0, 0, 0, 0, 0, 0, 0, 0, 0,  0,   0,   0, 0, 0,\n    };\n    yych = *p;\n    if (yych == '`')\n      goto yy823;\n    if (yych == '~')\n      goto yy824;\n    ++p;\n  yy822 : { return 0; }\n  yy823:\n    yych = *(marker = ++p);\n    if (yych == '`')\n      goto yy825;\n    goto yy822;\n  yy824:\n    yych = *(marker = ++p);\n    if (yych == '~')\n      goto yy827;\n    goto yy822;\n  yy825:\n    yych = *++p;\n    if (yybm[0 + yych] & 32) {\n      goto yy828;\n    }\n  yy826:\n    p = marker;\n    goto yy822;\n  yy827:\n    yych = *++p;\n    if (yybm[0 + yych] & 64) {\n      goto yy830;\n    }\n    goto yy826;\n  yy828:\n    ++p;\n    yych = *p;\n    marker = p;\n    if (yybm[0 + yych] & 128) {\n      goto yy832;\n    }\n    if (yych <= '\\f') {\n      if (yych <= 0x08)\n        goto yy826;\n      if (yych <= '\\n')\n        goto yy834;\n      goto yy826;\n    } else {\n      if (yych <= '\\r')\n        goto yy834;\n      if (yych == '`')\n        goto yy828;\n      goto yy826;\n    }\n  yy830:\n    ++p;\n    yych = *p;\n    marker = p;\n    if (yybm[0 + yych] & 64) {\n      goto yy830;\n    }\n    if (yych <= '\\f') {\n      if (yych <= 0x08)\n        goto yy826;\n      if (yych <= '\\t')\n        goto yy836;\n      if (yych <= '\\n')\n        goto yy838;\n      goto yy826;\n    } else {\n      if (yych <= '\\r')\n        goto yy838;\n      if (yych == ' ')\n        goto yy836;\n      goto yy826;\n    }\n  yy832:\n    ++p;\n    yych = *p;\n    if (yybm[0 + yych] & 128) {\n      goto yy832;\n    }\n    if (yych <= 0x08)\n      goto yy826;\n    if (yych <= '\\n')\n      goto yy834;\n    if (yych != '\\r')\n      goto yy826;\n  yy834:\n    ++p;\n    p = marker;\n    { return (bufsize_t)(p - start); }\n  yy836:\n    ++p;\n    yych = *p;\n    if (yych <= '\\f') {\n      if (yych <= 0x08)\n        goto yy826;\n      if (yych <= '\\t')\n        goto yy836;\n      if (yych >= '\\v')\n        goto yy826;\n    } else {\n      if (yych <= '\\r')\n        goto yy838;\n      if (yych == ' ')\n        goto yy836;\n      goto yy826;\n    }\n  yy838:\n    ++p;\n    p = marker;\n    { return (bufsize_t)(p - start); }\n  }\n}\n\n// Scans an entity.\n// Returns number of chars matched.\nbufsize_t _scan_entity(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n\n  {\n    unsigned char yych;\n    yych = *p;\n    if (yych == '&')\n      goto yy844;\n    ++p;\n  yy843 : { return 0; }\n  yy844:\n    yych = *(marker = ++p);\n    if (yych <= '@') {\n      if (yych != '#')\n        goto yy843;\n    } else {\n      if (yych <= 'Z')\n        goto yy847;\n      if (yych <= '`')\n        goto yy843;\n      if (yych <= 'z')\n        goto yy847;\n      goto yy843;\n    }\n    yych = *++p;\n    if (yych <= 'W') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy848;\n    } else {\n      if (yych <= 'X')\n        goto yy849;\n      if (yych == 'x')\n        goto yy849;\n    }\n  yy846:\n    p = marker;\n    goto yy843;\n  yy847:\n    yych = *++p;\n    if (yych <= '@') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy850;\n      goto yy846;\n    } else {\n      if (yych <= 'Z')\n        goto yy850;\n      if (yych <= '`')\n        goto yy846;\n      if (yych <= 'z')\n        goto yy850;\n      goto yy846;\n    }\n  yy848:\n    yych = *++p;\n    if (yych <= '/')\n      goto yy846;\n    if (yych <= '9')\n      goto yy851;\n    if (yych == ';')\n      goto yy852;\n    goto yy846;\n  yy849:\n    yych = *++p;\n    if (yych <= '@') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy854;\n      goto yy846;\n    } else {\n      if (yych <= 'F')\n        goto yy854;\n      if (yych <= '`')\n        goto yy846;\n      if (yych <= 'f')\n        goto yy854;\n      goto yy846;\n    }\n  yy850:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy855;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n        goto yy855;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych <= 'z')\n          goto yy855;\n        goto yy846;\n      }\n    }\n  yy851:\n    yych = *++p;\n    if (yych <= '/')\n      goto yy846;\n    if (yych <= '9')\n      goto yy856;\n    if (yych != ';')\n      goto yy846;\n  yy852:\n    ++p;\n    { return (bufsize_t)(p - start); }\n  yy854:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy857;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'F') {\n        if (yych <= '@')\n          goto yy846;\n        goto yy857;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych <= 'f')\n          goto yy857;\n        goto yy846;\n      }\n    }\n  yy855:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy858;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n        goto yy858;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych <= 'z')\n          goto yy858;\n        goto yy846;\n      }\n    }\n  yy856:\n    yych = *++p;\n    if (yych <= '/')\n      goto yy846;\n    if (yych <= '9')\n      goto yy859;\n    if (yych == ';')\n      goto yy852;\n    goto yy846;\n  yy857:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy860;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'F') {\n        if (yych <= '@')\n          goto yy846;\n        goto yy860;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych <= 'f')\n          goto yy860;\n        goto yy846;\n      }\n    }\n  yy858:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy861;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n        goto yy861;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych <= 'z')\n          goto yy861;\n        goto yy846;\n      }\n    }\n  yy859:\n    yych = *++p;\n    if (yych <= '/')\n      goto yy846;\n    if (yych <= '9')\n      goto yy862;\n    if (yych == ';')\n      goto yy852;\n    goto yy846;\n  yy860:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy863;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'F') {\n        if (yych <= '@')\n          goto yy846;\n        goto yy863;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych <= 'f')\n          goto yy863;\n        goto yy846;\n      }\n    }\n  yy861:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy864;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n        goto yy864;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych <= 'z')\n          goto yy864;\n        goto yy846;\n      }\n    }\n  yy862:\n    yych = *++p;\n    if (yych <= '/')\n      goto yy846;\n    if (yych <= '9')\n      goto yy865;\n    if (yych == ';')\n      goto yy852;\n    goto yy846;\n  yy863:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy866;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'F') {\n        if (yych <= '@')\n          goto yy846;\n        goto yy866;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych <= 'f')\n          goto yy866;\n        goto yy846;\n      }\n    }\n  yy864:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy867;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n        goto yy867;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych <= 'z')\n          goto yy867;\n        goto yy846;\n      }\n    }\n  yy865:\n    yych = *++p;\n    if (yych <= '/')\n      goto yy846;\n    if (yych <= '9')\n      goto yy868;\n    if (yych == ';')\n      goto yy852;\n    goto yy846;\n  yy866:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy868;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'F') {\n        if (yych <= '@')\n          goto yy846;\n        goto yy868;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych <= 'f')\n          goto yy868;\n        goto yy846;\n      }\n    }\n  yy867:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy869;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n        goto yy869;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych <= 'z')\n          goto yy869;\n        goto yy846;\n      }\n    }\n  yy868:\n    yych = *++p;\n    if (yych == ';')\n      goto yy852;\n    goto yy846;\n  yy869:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy870;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy870:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy871;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy871:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy872;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy872:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy873;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy873:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy874;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy874:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy875;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy875:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy876;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy876:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy877;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy877:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy878;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy878:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy879;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy879:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy880;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy880:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy881;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy881:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy882;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy882:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy883;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy883:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy884;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy884:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy885;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy885:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy886;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy886:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy887;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy887:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy888;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy888:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy889;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy889:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy890;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy890:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy891;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy891:\n    yych = *++p;\n    if (yych <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy892;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych >= '{')\n          goto yy846;\n      }\n    }\n  yy892:\n    ++p;\n    if ((yych = *p) <= ';') {\n      if (yych <= '/')\n        goto yy846;\n      if (yych <= '9')\n        goto yy868;\n      if (yych <= ':')\n        goto yy846;\n      goto yy852;\n    } else {\n      if (yych <= 'Z') {\n        if (yych <= '@')\n          goto yy846;\n        goto yy868;\n      } else {\n        if (yych <= '`')\n          goto yy846;\n        if (yych <= 'z')\n          goto yy868;\n        goto yy846;\n      }\n    }\n  }\n}\n\n// Returns positive value if a URL begins in a way that is potentially\n// dangerous, with javascript:, vbscript:, file:, or data:, otherwise 0.\nbufsize_t _scan_dangerous_url(const unsigned char *p) {\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n\n  {\n    unsigned char yych;\n    unsigned int yyaccept = 0;\n    yych = *p;\n    if (yych <= 'V') {\n      if (yych <= 'F') {\n        if (yych == 'D')\n          goto yy897;\n        if (yych >= 'F')\n          goto yy898;\n      } else {\n        if (yych == 'J')\n          goto yy899;\n        if (yych >= 'V')\n          goto yy900;\n      }\n    } else {\n      if (yych <= 'f') {\n        if (yych == 'd')\n          goto yy897;\n        if (yych >= 'f')\n          goto yy898;\n      } else {\n        if (yych <= 'j') {\n          if (yych >= 'j')\n            goto yy899;\n        } else {\n          if (yych == 'v')\n            goto yy900;\n        }\n      }\n    }\n    ++p;\n  yy896 : { return 0; }\n  yy897:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych == 'A')\n      goto yy901;\n    if (yych == 'a')\n      goto yy901;\n    goto yy896;\n  yy898:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych == 'I')\n      goto yy903;\n    if (yych == 'i')\n      goto yy903;\n    goto yy896;\n  yy899:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych == 'A')\n      goto yy904;\n    if (yych == 'a')\n      goto yy904;\n    goto yy896;\n  yy900:\n    yyaccept = 0;\n    yych = *(marker = ++p);\n    if (yych == 'B')\n      goto yy905;\n    if (yych == 'b')\n      goto yy905;\n    goto yy896;\n  yy901:\n    yych = *++p;\n    if (yych == 'T')\n      goto yy906;\n    if (yych == 't')\n      goto yy906;\n  yy902:\n    p = marker;\n    if (yyaccept == 0) {\n      goto yy896;\n    } else {\n      goto yy914;\n    }\n  yy903:\n    yych = *++p;\n    if (yych == 'L')\n      goto yy907;\n    if (yych == 'l')\n      goto yy907;\n    goto yy902;\n  yy904:\n    yych = *++p;\n    if (yych == 'V')\n      goto yy908;\n    if (yych == 'v')\n      goto yy908;\n    goto yy902;\n  yy905:\n    yych = *++p;\n    if (yych == 'S')\n      goto yy909;\n    if (yych == 's')\n      goto yy909;\n    goto yy902;\n  yy906:\n    yych = *++p;\n    if (yych == 'A')\n      goto yy910;\n    if (yych == 'a')\n      goto yy910;\n    goto yy902;\n  yy907:\n    yych = *++p;\n    if (yych == 'E')\n      goto yy911;\n    if (yych == 'e')\n      goto yy911;\n    goto yy902;\n  yy908:\n    yych = *++p;\n    if (yych == 'A')\n      goto yy905;\n    if (yych == 'a')\n      goto yy905;\n    goto yy902;\n  yy909:\n    yych = *++p;\n    if (yych == 'C')\n      goto yy912;\n    if (yych == 'c')\n      goto yy912;\n    goto yy902;\n  yy910:\n    yych = *++p;\n    if (yych == ':')\n      goto yy913;\n    goto yy902;\n  yy911:\n    yych = *++p;\n    if (yych == ':')\n      goto yy915;\n    goto yy902;\n  yy912:\n    yych = *++p;\n    if (yych == 'R')\n      goto yy916;\n    if (yych == 'r')\n      goto yy916;\n    goto yy902;\n  yy913:\n    yyaccept = 1;\n    yych = *(marker = ++p);\n    if (yych == 'I')\n      goto yy917;\n    if (yych == 'i')\n      goto yy917;\n  yy914 : { return (bufsize_t)(p - start); }\n  yy915:\n    yych = *++p;\n    goto yy914;\n  yy916:\n    yych = *++p;\n    if (yych == 'I')\n      goto yy918;\n    if (yych == 'i')\n      goto yy918;\n    goto yy902;\n  yy917:\n    yych = *++p;\n    if (yych == 'M')\n      goto yy919;\n    if (yych == 'm')\n      goto yy919;\n    goto yy902;\n  yy918:\n    yych = *++p;\n    if (yych == 'P')\n      goto yy920;\n    if (yych == 'p')\n      goto yy920;\n    goto yy902;\n  yy919:\n    yych = *++p;\n    if (yych == 'A')\n      goto yy921;\n    if (yych == 'a')\n      goto yy921;\n    goto yy902;\n  yy920:\n    yych = *++p;\n    if (yych == 'T')\n      goto yy911;\n    if (yych == 't')\n      goto yy911;\n    goto yy902;\n  yy921:\n    yych = *++p;\n    if (yych == 'G')\n      goto yy922;\n    if (yych != 'g')\n      goto yy902;\n  yy922:\n    yych = *++p;\n    if (yych == 'E')\n      goto yy923;\n    if (yych != 'e')\n      goto yy902;\n  yy923:\n    yych = *++p;\n    if (yych != '/')\n      goto yy902;\n    yych = *++p;\n    if (yych <= 'W') {\n      if (yych <= 'J') {\n        if (yych == 'G')\n          goto yy925;\n        if (yych <= 'I')\n          goto yy902;\n        goto yy926;\n      } else {\n        if (yych == 'P')\n          goto yy927;\n        if (yych <= 'V')\n          goto yy902;\n        goto yy928;\n      }\n    } else {\n      if (yych <= 'j') {\n        if (yych == 'g')\n          goto yy925;\n        if (yych <= 'i')\n          goto yy902;\n        goto yy926;\n      } else {\n        if (yych <= 'p') {\n          if (yych <= 'o')\n            goto yy902;\n          goto yy927;\n        } else {\n          if (yych == 'w')\n            goto yy928;\n          goto yy902;\n        }\n      }\n    }\n  yy925:\n    yych = *++p;\n    if (yych == 'I')\n      goto yy929;\n    if (yych == 'i')\n      goto yy929;\n    goto yy902;\n  yy926:\n    yych = *++p;\n    if (yych == 'P')\n      goto yy930;\n    if (yych == 'p')\n      goto yy930;\n    goto yy902;\n  yy927:\n    yych = *++p;\n    if (yych == 'N')\n      goto yy931;\n    if (yych == 'n')\n      goto yy931;\n    goto yy902;\n  yy928:\n    yych = *++p;\n    if (yych == 'E')\n      goto yy932;\n    if (yych == 'e')\n      goto yy932;\n    goto yy902;\n  yy929:\n    yych = *++p;\n    if (yych == 'F')\n      goto yy933;\n    if (yych == 'f')\n      goto yy933;\n    goto yy902;\n  yy930:\n    yych = *++p;\n    if (yych == 'E')\n      goto yy931;\n    if (yych != 'e')\n      goto yy902;\n  yy931:\n    yych = *++p;\n    if (yych == 'G')\n      goto yy933;\n    if (yych == 'g')\n      goto yy933;\n    goto yy902;\n  yy932:\n    yych = *++p;\n    if (yych == 'B')\n      goto yy935;\n    if (yych == 'b')\n      goto yy935;\n    goto yy902;\n  yy933:\n    ++p;\n    { return 0; }\n  yy935:\n    ++p;\n    if ((yych = *p) == 'P')\n      goto yy933;\n    if (yych == 'p')\n      goto yy933;\n    goto yy902;\n  }\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/scanners.h",
    "content": "#include \"cmark.h\"\n#include \"chunk.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nbufsize_t _scan_at(bufsize_t (*scanner)(const unsigned char *), cmark_chunk *c,\n                   bufsize_t offset);\nbufsize_t _scan_scheme(const unsigned char *p);\nbufsize_t _scan_autolink_uri(const unsigned char *p);\nbufsize_t _scan_autolink_email(const unsigned char *p);\nbufsize_t _scan_html_tag(const unsigned char *p);\nbufsize_t _scan_html_block_start(const unsigned char *p);\nbufsize_t _scan_html_block_start_7(const unsigned char *p);\nbufsize_t _scan_html_block_end_1(const unsigned char *p);\nbufsize_t _scan_html_block_end_2(const unsigned char *p);\nbufsize_t _scan_html_block_end_3(const unsigned char *p);\nbufsize_t _scan_html_block_end_4(const unsigned char *p);\nbufsize_t _scan_html_block_end_5(const unsigned char *p);\nbufsize_t _scan_link_title(const unsigned char *p);\nbufsize_t _scan_spacechars(const unsigned char *p);\nbufsize_t _scan_atx_heading_start(const unsigned char *p);\nbufsize_t _scan_setext_heading_line(const unsigned char *p);\nbufsize_t _scan_open_code_fence(const unsigned char *p);\nbufsize_t _scan_close_code_fence(const unsigned char *p);\nbufsize_t _scan_entity(const unsigned char *p);\nbufsize_t _scan_dangerous_url(const unsigned char *p);\n\n#define scan_scheme(c, n) _scan_at(&_scan_scheme, c, n)\n#define scan_autolink_uri(c, n) _scan_at(&_scan_autolink_uri, c, n)\n#define scan_autolink_email(c, n) _scan_at(&_scan_autolink_email, c, n)\n#define scan_html_tag(c, n) _scan_at(&_scan_html_tag, c, n)\n#define scan_html_block_start(c, n) _scan_at(&_scan_html_block_start, c, n)\n#define scan_html_block_start_7(c, n) _scan_at(&_scan_html_block_start_7, c, n)\n#define scan_html_block_end_1(c, n) _scan_at(&_scan_html_block_end_1, c, n)\n#define scan_html_block_end_2(c, n) _scan_at(&_scan_html_block_end_2, c, n)\n#define scan_html_block_end_3(c, n) _scan_at(&_scan_html_block_end_3, c, n)\n#define scan_html_block_end_4(c, n) _scan_at(&_scan_html_block_end_4, c, n)\n#define scan_html_block_end_5(c, n) _scan_at(&_scan_html_block_end_5, c, n)\n#define scan_link_title(c, n) _scan_at(&_scan_link_title, c, n)\n#define scan_spacechars(c, n) _scan_at(&_scan_spacechars, c, n)\n#define scan_atx_heading_start(c, n) _scan_at(&_scan_atx_heading_start, c, n)\n#define scan_setext_heading_line(c, n)                                         \\\n  _scan_at(&_scan_setext_heading_line, c, n)\n#define scan_open_code_fence(c, n) _scan_at(&_scan_open_code_fence, c, n)\n#define scan_close_code_fence(c, n) _scan_at(&_scan_close_code_fence, c, n)\n#define scan_entity(c, n) _scan_at(&_scan_entity, c, n)\n#define scan_dangerous_url(c, n) _scan_at(&_scan_dangerous_url, c, n)\n\n#ifdef __cplusplus\n}\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/scanners.re",
    "content": "#include <stdlib.h>\n#include \"chunk.h\"\n#include \"scanners.h\"\n\nbufsize_t _scan_at(bufsize_t (*scanner)(const unsigned char *), cmark_chunk *c, bufsize_t offset)\n{\n\tbufsize_t res;\n\tunsigned char *ptr = (unsigned char *)c->data;\n\n        if (ptr == NULL || offset > c->len) {\n          return 0;\n        } else {\n\t  unsigned char lim = ptr[c->len];\n\n\t  ptr[c->len] = '\\0';\n\t  res = scanner(ptr + offset);\n\t  ptr[c->len] = lim;\n        }\n\n\treturn res;\n}\n\n/*!re2c\n  re2c:define:YYCTYPE  = \"unsigned char\";\n  re2c:define:YYCURSOR = p;\n  re2c:define:YYMARKER = marker;\n  re2c:define:YYCTXMARKER = marker;\n  re2c:yyfill:enable = 0;\n\n  wordchar = [^\\x00-\\x20];\n\n  spacechar = [ \\t\\v\\f\\r\\n];\n\n  reg_char     = [^\\\\()\\x00-\\x20];\n\n  escaped_char = [\\\\][!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-];\n\n  tagname = [A-Za-z][A-Za-z0-9-]*;\n\n  blocktagname = 'address'|'article'|'aside'|'base'|'basefont'|'blockquote'|'body'|'caption'|'center'|'col'|'colgroup'|'dd'|'details'|'dialog'|'dir'|'div'|'dl'|'dt'|'fieldset'|'figcaption'|'figure'|'footer'|'form'|'frame'|'frameset'|'h1'|'h2'|'h3'|'h4'|'h5'|'h6'|'head'|'header'|'hr'|'html'|'iframe'|'legend'|'li'|'link'|'main'|'menu'|'menuitem'|'nav'|'noframes'|'ol'|'optgroup'|'option'|'p'|'param'|'section'|'source'|'title'|'summary'|'table'|'tbody'|'td'|'tfoot'|'th'|'thead'|'title'|'tr'|'track'|'ul';\n\n  attributename = [a-zA-Z_:][a-zA-Z0-9:._-]*;\n\n  unquotedvalue = [^ \\t\\r\\n\\v\\f\"'=<>`\\x00]+;\n  singlequotedvalue = ['][^'\\x00]*['];\n  doublequotedvalue = [\"][^\"\\x00]*[\"];\n\n  attributevalue = unquotedvalue | singlequotedvalue | doublequotedvalue;\n\n  attributevaluespec = spacechar* [=] spacechar* attributevalue;\n\n  attribute = spacechar+ attributename attributevaluespec?;\n\n  opentag = tagname attribute* spacechar* [/]? [>];\n  closetag = [/] tagname spacechar* [>];\n\n  htmlcomment = \"!---->\" | (\"!--\" ([-]? [^\\x00>-]) ([-]? [^\\x00-])* \"-->\");\n\n  processinginstruction = \"?\" ([^?>\\x00]+ | [?][^>\\x00] | [>])* \"?>\";\n\n  declaration = \"!\" [A-Z]+ spacechar+ [^>\\x00]* \">\";\n\n  cdata = \"![CDATA[\" ([^\\]\\x00]+ | \"]\" [^\\]\\x00] | \"]]\" [^>\\x00])* \"]]>\";\n\n  htmltag = opentag | closetag | htmlcomment | processinginstruction |\n            declaration | cdata;\n\n  in_parens_nosp   = [(] (reg_char|escaped_char|[\\\\])* [)];\n\n  in_double_quotes = [\"] (escaped_char|[^\"\\x00])* [\"];\n  in_single_quotes = ['] (escaped_char|[^'\\x00])* ['];\n  in_parens        = [(] (escaped_char|[^)\\x00])* [)];\n\n  scheme           = [A-Za-z][A-Za-z0-9.+-]{1,31};\n*/\n\n// Try to match a scheme including colon.\nbufsize_t _scan_scheme(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n/*!re2c\n  scheme [:] { return (bufsize_t)(p - start); }\n  * { return 0; }\n*/\n}\n\n// Try to match URI autolink after first <, returning number of chars matched.\nbufsize_t _scan_autolink_uri(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n/*!re2c\n  scheme [:][^\\x00-\\x20<>]*[>]  { return (bufsize_t)(p - start); }\n  * { return 0; }\n*/\n}\n\n// Try to match email autolink after first <, returning num of chars matched.\nbufsize_t _scan_autolink_email(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n/*!re2c\n  [a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+\n    [@]\n    [a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\n    ([.][a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\n    [>] { return (bufsize_t)(p - start); }\n  * { return 0; }\n*/\n}\n\n// Try to match an HTML tag after first <, returning num of chars matched.\nbufsize_t _scan_html_tag(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n/*!re2c\n  htmltag { return (bufsize_t)(p - start); }\n  * { return 0; }\n*/\n}\n\n// Try to match an HTML block tag start line, returning\n// an integer code for the type of block (1-6, matching the spec).\n// #7 is handled by a separate function, below.\nbufsize_t _scan_html_block_start(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n/*!re2c\n  [<] ('script'|'pre'|'style') (spacechar | [>]) { return 1; }\n  '<!--' { return 2; }\n  '<?' { return 3; }\n  '<!' [A-Z] { return 4; }\n  '<![CDATA[' { return 5; }\n  [<] [/]? blocktagname (spacechar | [/]? [>])  { return 6; }\n  * { return 0; }\n*/\n}\n\n// Try to match an HTML block tag start line of type 7, returning\n// 7 if successful, 0 if not.\nbufsize_t _scan_html_block_start_7(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n/*!re2c\n  [<] (opentag | closetag) [\\t\\n\\f ]* [\\r\\n] { return 7; }\n  * { return 0; }\n*/\n}\n\n// Try to match an HTML block end line of type 1\nbufsize_t _scan_html_block_end_1(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n/*!re2c\n  [^\\n\\x00]* [<] [/] ('script'|'pre'|'style') [>] { return (bufsize_t)(p - start); }\n  * { return 0; }\n*/\n}\n\n// Try to match an HTML block end line of type 2\nbufsize_t _scan_html_block_end_2(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n/*!re2c\n  [^\\n\\x00]* '-->' { return (bufsize_t)(p - start); }\n  * { return 0; }\n*/\n}\n\n// Try to match an HTML block end line of type 3\nbufsize_t _scan_html_block_end_3(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n/*!re2c\n  [^\\n\\x00]* '?>' { return (bufsize_t)(p - start); }\n  * { return 0; }\n*/\n}\n\n// Try to match an HTML block end line of type 4\nbufsize_t _scan_html_block_end_4(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n/*!re2c\n  [^\\n\\x00]* '>' { return (bufsize_t)(p - start); }\n  * { return 0; }\n*/\n}\n\n// Try to match an HTML block end line of type 5\nbufsize_t _scan_html_block_end_5(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n/*!re2c\n  [^\\n\\x00]* ']]>' { return (bufsize_t)(p - start); }\n  * { return 0; }\n*/\n}\n\n// Try to match a link title (in single quotes, in double quotes, or\n// in parentheses), returning number of chars matched.  Allow one\n// level of internal nesting (quotes within quotes).\nbufsize_t _scan_link_title(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n/*!re2c\n  [\"] (escaped_char|[^\"\\x00])* [\"]   { return (bufsize_t)(p - start); }\n  ['] (escaped_char|[^'\\x00])* ['] { return (bufsize_t)(p - start); }\n  [(] (escaped_char|[^()\\x00])* [)]  { return (bufsize_t)(p - start); }\n  * { return 0; }\n*/\n}\n\n// Match space characters, including newlines.\nbufsize_t _scan_spacechars(const unsigned char *p)\n{\n  const unsigned char *start = p; \\\n/*!re2c\n  [ \\t\\v\\f\\r\\n]+ { return (bufsize_t)(p - start); }\n  * { return 0; }\n*/\n}\n\n// Match ATX heading start.\nbufsize_t _scan_atx_heading_start(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n/*!re2c\n  [#]{1,6} ([ \\t]+|[\\r\\n])  { return (bufsize_t)(p - start); }\n  * { return 0; }\n*/\n}\n\n// Match setext heading line.  Return 1 for level-1 heading,\n// 2 for level-2, 0 for no match.\nbufsize_t _scan_setext_heading_line(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n/*!re2c\n  [=]+ [ \\t]* [\\r\\n] { return 1; }\n  [-]+ [ \\t]* [\\r\\n] { return 2; }\n  * { return 0; }\n*/\n}\n\n// Scan an opening code fence.\nbufsize_t _scan_open_code_fence(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n/*!re2c\n  [`]{3,} / [^`\\r\\n\\x00]*[\\r\\n] { return (bufsize_t)(p - start); }\n  [~]{3,} / [^\\r\\n\\x00]*[\\r\\n] { return (bufsize_t)(p - start); }\n  * { return 0; }\n*/\n}\n\n// Scan a closing code fence with length at least len.\nbufsize_t _scan_close_code_fence(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n/*!re2c\n  [`]{3,} / [ \\t]*[\\r\\n] { return (bufsize_t)(p - start); }\n  [~]{3,} / [ \\t]*[\\r\\n] { return (bufsize_t)(p - start); }\n  * { return 0; }\n*/\n}\n\n// Scans an entity.\n// Returns number of chars matched.\nbufsize_t _scan_entity(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n/*!re2c\n  [&] ([#] ([Xx][A-Fa-f0-9]{1,6}|[0-9]{1,7}) |[A-Za-z][A-Za-z0-9]{1,31} ) [;]\n     { return (bufsize_t)(p - start); }\n  * { return 0; }\n*/\n}\n\n// Returns positive value if a URL begins in a way that is potentially\n// dangerous, with javascript:, vbscript:, file:, or data:, otherwise 0.\nbufsize_t _scan_dangerous_url(const unsigned char *p)\n{\n  const unsigned char *marker = NULL;\n  const unsigned char *start = p;\n/*!re2c\n  'data:image/' ('png'|'gif'|'jpeg'|'webp') { return 0; }\n  'javascript:' | 'vbscript:' | 'file:' | 'data:' { return (bufsize_t)(p - start); }\n  * { return 0; }\n*/\n}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/utf8.c",
    "content": "#include <stdlib.h>\n#include <stdint.h>\n#include <assert.h>\n\n#include \"cmark_ctype.h\"\n#include \"utf8.h\"\n\nstatic const int8_t utf8proc_utf8class[256] = {\n    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n    1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n    2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n    4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0};\n\nstatic void encode_unknown(cmark_strbuf *buf) {\n  static const uint8_t repl[] = {239, 191, 189};\n  cmark_strbuf_put(buf, repl, 3);\n}\n\nstatic int utf8proc_charlen(const uint8_t *str, bufsize_t str_len) {\n  int length, i;\n\n  if (!str_len)\n    return 0;\n\n  length = utf8proc_utf8class[str[0]];\n\n  if (!length)\n    return -1;\n\n  if (str_len >= 0 && (bufsize_t)length > str_len)\n    return -str_len;\n\n  for (i = 1; i < length; i++) {\n    if ((str[i] & 0xC0) != 0x80)\n      return -i;\n  }\n\n  return length;\n}\n\n// Validate a single UTF-8 character according to RFC 3629.\nstatic int utf8proc_valid(const uint8_t *str, bufsize_t str_len) {\n  int length = utf8proc_utf8class[str[0]];\n\n  if (!length)\n    return -1;\n\n  if ((bufsize_t)length > str_len)\n    return -str_len;\n\n  switch (length) {\n  case 2:\n    if ((str[1] & 0xC0) != 0x80)\n      return -1;\n    if (str[0] < 0xC2) {\n      // Overlong\n      return -length;\n    }\n    break;\n\n  case 3:\n    if ((str[1] & 0xC0) != 0x80)\n      return -1;\n    if ((str[2] & 0xC0) != 0x80)\n      return -2;\n    if (str[0] == 0xE0) {\n      if (str[1] < 0xA0) {\n        // Overlong\n        return -length;\n      }\n    } else if (str[0] == 0xED) {\n      if (str[1] >= 0xA0) {\n        // Surrogate\n        return -length;\n      }\n    }\n    break;\n\n  case 4:\n    if ((str[1] & 0xC0) != 0x80)\n      return -1;\n    if ((str[2] & 0xC0) != 0x80)\n      return -2;\n    if ((str[3] & 0xC0) != 0x80)\n      return -3;\n    if (str[0] == 0xF0) {\n      if (str[1] < 0x90) {\n        // Overlong\n        return -length;\n      }\n    } else if (str[0] >= 0xF4) {\n      if (str[0] > 0xF4 || str[1] >= 0x90) {\n        // Above 0x10FFFF\n        return -length;\n      }\n    }\n    break;\n  }\n\n  return length;\n}\n\nvoid cmark_utf8proc_check(cmark_strbuf *ob, const uint8_t *line,\n                          bufsize_t size) {\n  bufsize_t i = 0;\n\n  while (i < size) {\n    bufsize_t org = i;\n    int charlen = 0;\n\n    while (i < size) {\n      if (line[i] < 0x80 && line[i] != 0) {\n        i++;\n      } else if (line[i] >= 0x80) {\n        charlen = utf8proc_valid(line + i, size - i);\n        if (charlen < 0) {\n          charlen = -charlen;\n          break;\n        }\n        i += charlen;\n      } else if (line[i] == 0) {\n        // ASCII NUL is technically valid but rejected\n        // for security reasons.\n        charlen = 1;\n        break;\n      }\n    }\n\n    if (i > org) {\n      cmark_strbuf_put(ob, line + org, i - org);\n    }\n\n    if (i >= size) {\n      break;\n    } else {\n      // Invalid UTF-8\n      encode_unknown(ob);\n      i += charlen;\n    }\n  }\n}\n\nint cmark_utf8proc_iterate(const uint8_t *str, bufsize_t str_len,\n                           int32_t *dst) {\n  int length;\n  int32_t uc = -1;\n\n  *dst = -1;\n  length = utf8proc_charlen(str, str_len);\n  if (length < 0)\n    return -1;\n\n  switch (length) {\n  case 1:\n    uc = str[0];\n    break;\n  case 2:\n    uc = ((str[0] & 0x1F) << 6) + (str[1] & 0x3F);\n    if (uc < 0x80)\n      uc = -1;\n    break;\n  case 3:\n    uc = ((str[0] & 0x0F) << 12) + ((str[1] & 0x3F) << 6) + (str[2] & 0x3F);\n    if (uc < 0x800 || (uc >= 0xD800 && uc < 0xE000))\n      uc = -1;\n    break;\n  case 4:\n    uc = ((str[0] & 0x07) << 18) + ((str[1] & 0x3F) << 12) +\n         ((str[2] & 0x3F) << 6) + (str[3] & 0x3F);\n    if (uc < 0x10000 || uc >= 0x110000)\n      uc = -1;\n    break;\n  }\n\n  if (uc < 0)\n    return -1;\n\n  *dst = uc;\n  return length;\n}\n\nvoid cmark_utf8proc_encode_char(int32_t uc, cmark_strbuf *buf) {\n  uint8_t dst[4];\n  bufsize_t len = 0;\n\n  assert(uc >= 0);\n\n  if (uc < 0x80) {\n    dst[0] = (uint8_t)(uc);\n    len = 1;\n  } else if (uc < 0x800) {\n    dst[0] = (uint8_t)(0xC0 + (uc >> 6));\n    dst[1] = 0x80 + (uc & 0x3F);\n    len = 2;\n  } else if (uc == 0xFFFF) {\n    dst[0] = 0xFF;\n    len = 1;\n  } else if (uc == 0xFFFE) {\n    dst[0] = 0xFE;\n    len = 1;\n  } else if (uc < 0x10000) {\n    dst[0] = (uint8_t)(0xE0 + (uc >> 12));\n    dst[1] = 0x80 + ((uc >> 6) & 0x3F);\n    dst[2] = 0x80 + (uc & 0x3F);\n    len = 3;\n  } else if (uc < 0x110000) {\n    dst[0] = (uint8_t)(0xF0 + (uc >> 18));\n    dst[1] = 0x80 + ((uc >> 12) & 0x3F);\n    dst[2] = 0x80 + ((uc >> 6) & 0x3F);\n    dst[3] = 0x80 + (uc & 0x3F);\n    len = 4;\n  } else {\n    encode_unknown(buf);\n    return;\n  }\n\n  cmark_strbuf_put(buf, dst, len);\n}\n\nvoid cmark_utf8proc_case_fold(cmark_strbuf *dest, const uint8_t *str,\n                              bufsize_t len) {\n  int32_t c;\n\n#define bufpush(x) cmark_utf8proc_encode_char(x, dest)\n\n  while (len > 0) {\n    bufsize_t char_len = cmark_utf8proc_iterate(str, len, &c);\n\n    if (char_len >= 0) {\n#include \"case_fold_switch.inc\"\n    } else {\n      encode_unknown(dest);\n      char_len = -char_len;\n    }\n\n    str += char_len;\n    len -= char_len;\n  }\n}\n\n// matches anything in the Zs class, plus LF, CR, TAB, FF.\nint cmark_utf8proc_is_space(int32_t uc) {\n  return (uc == 9 || uc == 10 || uc == 12 || uc == 13 || uc == 32 ||\n          uc == 160 || uc == 5760 || (uc >= 8192 && uc <= 8202) || uc == 8239 ||\n          uc == 8287 || uc == 12288);\n}\n\n// matches anything in the P[cdefios] classes.\nint cmark_utf8proc_is_punctuation(int32_t uc) {\n  return (\n      (uc < 128 && cmark_ispunct((char)uc)) || uc == 161 || uc == 167 ||\n      uc == 171 || uc == 182 || uc == 183 || uc == 187 || uc == 191 ||\n      uc == 894 || uc == 903 || (uc >= 1370 && uc <= 1375) || uc == 1417 ||\n      uc == 1418 || uc == 1470 || uc == 1472 || uc == 1475 || uc == 1478 ||\n      uc == 1523 || uc == 1524 || uc == 1545 || uc == 1546 || uc == 1548 ||\n      uc == 1549 || uc == 1563 || uc == 1566 || uc == 1567 ||\n      (uc >= 1642 && uc <= 1645) || uc == 1748 || (uc >= 1792 && uc <= 1805) ||\n      (uc >= 2039 && uc <= 2041) || (uc >= 2096 && uc <= 2110) || uc == 2142 ||\n      uc == 2404 || uc == 2405 || uc == 2416 || uc == 2800 || uc == 3572 ||\n      uc == 3663 || uc == 3674 || uc == 3675 || (uc >= 3844 && uc <= 3858) ||\n      uc == 3860 || (uc >= 3898 && uc <= 3901) || uc == 3973 ||\n      (uc >= 4048 && uc <= 4052) || uc == 4057 || uc == 4058 ||\n      (uc >= 4170 && uc <= 4175) || uc == 4347 || (uc >= 4960 && uc <= 4968) ||\n      uc == 5120 || uc == 5741 || uc == 5742 || uc == 5787 || uc == 5788 ||\n      (uc >= 5867 && uc <= 5869) || uc == 5941 || uc == 5942 ||\n      (uc >= 6100 && uc <= 6102) || (uc >= 6104 && uc <= 6106) ||\n      (uc >= 6144 && uc <= 6154) || uc == 6468 || uc == 6469 || uc == 6686 ||\n      uc == 6687 || (uc >= 6816 && uc <= 6822) || (uc >= 6824 && uc <= 6829) ||\n      (uc >= 7002 && uc <= 7008) || (uc >= 7164 && uc <= 7167) ||\n      (uc >= 7227 && uc <= 7231) || uc == 7294 || uc == 7295 ||\n      (uc >= 7360 && uc <= 7367) || uc == 7379 || (uc >= 8208 && uc <= 8231) ||\n      (uc >= 8240 && uc <= 8259) || (uc >= 8261 && uc <= 8273) ||\n      (uc >= 8275 && uc <= 8286) || uc == 8317 || uc == 8318 || uc == 8333 ||\n      uc == 8334 || (uc >= 8968 && uc <= 8971) || uc == 9001 || uc == 9002 ||\n      (uc >= 10088 && uc <= 10101) || uc == 10181 || uc == 10182 ||\n      (uc >= 10214 && uc <= 10223) || (uc >= 10627 && uc <= 10648) ||\n      (uc >= 10712 && uc <= 10715) || uc == 10748 || uc == 10749 ||\n      (uc >= 11513 && uc <= 11516) || uc == 11518 || uc == 11519 ||\n      uc == 11632 || (uc >= 11776 && uc <= 11822) ||\n      (uc >= 11824 && uc <= 11842) || (uc >= 12289 && uc <= 12291) ||\n      (uc >= 12296 && uc <= 12305) || (uc >= 12308 && uc <= 12319) ||\n      uc == 12336 || uc == 12349 || uc == 12448 || uc == 12539 || uc == 42238 ||\n      uc == 42239 || (uc >= 42509 && uc <= 42511) || uc == 42611 ||\n      uc == 42622 || (uc >= 42738 && uc <= 42743) ||\n      (uc >= 43124 && uc <= 43127) || uc == 43214 || uc == 43215 ||\n      (uc >= 43256 && uc <= 43258) || uc == 43310 || uc == 43311 ||\n      uc == 43359 || (uc >= 43457 && uc <= 43469) || uc == 43486 ||\n      uc == 43487 || (uc >= 43612 && uc <= 43615) || uc == 43742 ||\n      uc == 43743 || uc == 43760 || uc == 43761 || uc == 44011 || uc == 64830 ||\n      uc == 64831 || (uc >= 65040 && uc <= 65049) ||\n      (uc >= 65072 && uc <= 65106) || (uc >= 65108 && uc <= 65121) ||\n      uc == 65123 || uc == 65128 || uc == 65130 || uc == 65131 ||\n      (uc >= 65281 && uc <= 65283) || (uc >= 65285 && uc <= 65290) ||\n      (uc >= 65292 && uc <= 65295) || uc == 65306 || uc == 65307 ||\n      uc == 65311 || uc == 65312 || (uc >= 65339 && uc <= 65341) ||\n      uc == 65343 || uc == 65371 || uc == 65373 ||\n      (uc >= 65375 && uc <= 65381) || (uc >= 65792 && uc <= 65794) ||\n      uc == 66463 || uc == 66512 || uc == 66927 || uc == 67671 || uc == 67871 ||\n      uc == 67903 || (uc >= 68176 && uc <= 68184) || uc == 68223 ||\n      (uc >= 68336 && uc <= 68342) || (uc >= 68409 && uc <= 68415) ||\n      (uc >= 68505 && uc <= 68508) || (uc >= 69703 && uc <= 69709) ||\n      uc == 69819 || uc == 69820 || (uc >= 69822 && uc <= 69825) ||\n      (uc >= 69952 && uc <= 69955) || uc == 70004 || uc == 70005 ||\n      (uc >= 70085 && uc <= 70088) || uc == 70093 ||\n      (uc >= 70200 && uc <= 70205) || uc == 70854 ||\n      (uc >= 71105 && uc <= 71113) || (uc >= 71233 && uc <= 71235) ||\n      (uc >= 74864 && uc <= 74868) || uc == 92782 || uc == 92783 ||\n      uc == 92917 || (uc >= 92983 && uc <= 92987) || uc == 92996 ||\n      uc == 113823);\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/utf8.h",
    "content": "#ifndef CMARK_UTF8_H\n#define CMARK_UTF8_H\n\n#include <stdint.h>\n#include \"buffer.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nvoid cmark_utf8proc_case_fold(cmark_strbuf *dest, const uint8_t *str,\n                              bufsize_t len);\nvoid cmark_utf8proc_encode_char(int32_t uc, cmark_strbuf *buf);\nint cmark_utf8proc_iterate(const uint8_t *str, bufsize_t str_len, int32_t *dst);\nvoid cmark_utf8proc_check(cmark_strbuf *dest, const uint8_t *line,\n                          bufsize_t size);\nint cmark_utf8proc_is_space(int32_t uc);\nint cmark_utf8proc_is_punctuation(int32_t uc);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/cmark/src/xml.c",
    "content": "#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <assert.h>\n\n#include \"config.h\"\n#include \"cmark.h\"\n#include \"node.h\"\n#include \"buffer.h\"\n#include \"houdini.h\"\n\n#define BUFFER_SIZE 100\n\n// Functions to convert cmark_nodes to XML strings.\n\nstatic void escape_xml(cmark_strbuf *dest, const unsigned char *source,\n                       bufsize_t length) {\n  houdini_escape_html0(dest, source, length, 0);\n}\n\nstruct render_state {\n  cmark_strbuf *xml;\n  int indent;\n};\n\nstatic CMARK_INLINE void indent(struct render_state *state) {\n  int i;\n  for (i = 0; i < state->indent; i++) {\n    cmark_strbuf_putc(state->xml, ' ');\n  }\n}\n\nstatic int S_render_node(cmark_node *node, cmark_event_type ev_type,\n                         struct render_state *state, int options) {\n  cmark_strbuf *xml = state->xml;\n  bool literal = false;\n  cmark_delim_type delim;\n  bool entering = (ev_type == CMARK_EVENT_ENTER);\n  char buffer[BUFFER_SIZE];\n\n  if (entering) {\n    indent(state);\n    cmark_strbuf_putc(xml, '<');\n    cmark_strbuf_puts(xml, cmark_node_get_type_string(node));\n\n    if (options & CMARK_OPT_SOURCEPOS && node->start_line != 0) {\n      snprintf(buffer, BUFFER_SIZE, \" sourcepos=\\\"%d:%d-%d:%d\\\"\",\n               node->start_line, node->start_column, node->end_line,\n               node->end_column);\n      cmark_strbuf_puts(xml, buffer);\n    }\n\n    literal = false;\n\n    switch (node->type) {\n    case CMARK_NODE_DOCUMENT:\n      cmark_strbuf_puts(xml, \" xmlns=\\\"http://commonmark.org/xml/1.0\\\"\");\n      break;\n    case CMARK_NODE_TEXT:\n    case CMARK_NODE_CODE:\n    case CMARK_NODE_HTML_BLOCK:\n    case CMARK_NODE_HTML_INLINE:\n      cmark_strbuf_puts(xml, \" xml:space=\\\"preserve\\\">\");\n      escape_xml(xml, node->as.literal.data, node->as.literal.len);\n      cmark_strbuf_puts(xml, \"</\");\n      cmark_strbuf_puts(xml, cmark_node_get_type_string(node));\n      literal = true;\n      break;\n    case CMARK_NODE_LIST:\n      switch (cmark_node_get_list_type(node)) {\n      case CMARK_ORDERED_LIST:\n        cmark_strbuf_puts(xml, \" type=\\\"ordered\\\"\");\n        snprintf(buffer, BUFFER_SIZE, \" start=\\\"%d\\\"\",\n                 cmark_node_get_list_start(node));\n        cmark_strbuf_puts(xml, buffer);\n        delim = cmark_node_get_list_delim(node);\n        if (delim == CMARK_PAREN_DELIM) {\n          cmark_strbuf_puts(xml, \" delim=\\\"paren\\\"\");\n        } else if (delim == CMARK_PERIOD_DELIM) {\n          cmark_strbuf_puts(xml, \" delim=\\\"period\\\"\");\n        }\n        break;\n      case CMARK_BULLET_LIST:\n        cmark_strbuf_puts(xml, \" type=\\\"bullet\\\"\");\n        break;\n      default:\n        break;\n      }\n      snprintf(buffer, BUFFER_SIZE, \" tight=\\\"%s\\\"\",\n               (cmark_node_get_list_tight(node) ? \"true\" : \"false\"));\n      cmark_strbuf_puts(xml, buffer);\n      break;\n    case CMARK_NODE_HEADING:\n      snprintf(buffer, BUFFER_SIZE, \" level=\\\"%d\\\"\", node->as.heading.level);\n      cmark_strbuf_puts(xml, buffer);\n      break;\n    case CMARK_NODE_CODE_BLOCK:\n      if (node->as.code.info.len > 0) {\n        cmark_strbuf_puts(xml, \" info=\\\"\");\n        escape_xml(xml, node->as.code.info.data, node->as.code.info.len);\n        cmark_strbuf_putc(xml, '\"');\n      }\n      cmark_strbuf_puts(xml, \" xml:space=\\\"preserve\\\">\");\n      escape_xml(xml, node->as.code.literal.data, node->as.code.literal.len);\n      cmark_strbuf_puts(xml, \"</\");\n      cmark_strbuf_puts(xml, cmark_node_get_type_string(node));\n      literal = true;\n      break;\n    case CMARK_NODE_CUSTOM_BLOCK:\n    case CMARK_NODE_CUSTOM_INLINE:\n      cmark_strbuf_puts(xml, \" on_enter=\\\"\");\n      escape_xml(xml, node->as.custom.on_enter.data,\n                 node->as.custom.on_enter.len);\n      cmark_strbuf_putc(xml, '\"');\n      cmark_strbuf_puts(xml, \" on_exit=\\\"\");\n      escape_xml(xml, node->as.custom.on_exit.data,\n                 node->as.custom.on_exit.len);\n      cmark_strbuf_putc(xml, '\"');\n      break;\n    case CMARK_NODE_LINK:\n    case CMARK_NODE_IMAGE:\n      cmark_strbuf_puts(xml, \" destination=\\\"\");\n      escape_xml(xml, node->as.link.url.data, node->as.link.url.len);\n      cmark_strbuf_putc(xml, '\"');\n      cmark_strbuf_puts(xml, \" title=\\\"\");\n      escape_xml(xml, node->as.link.title.data, node->as.link.title.len);\n      cmark_strbuf_putc(xml, '\"');\n      break;\n    default:\n      break;\n    }\n    if (node->first_child) {\n      state->indent += 2;\n    } else if (!literal) {\n      cmark_strbuf_puts(xml, \" /\");\n    }\n    cmark_strbuf_puts(xml, \">\\n\");\n\n  } else if (node->first_child) {\n    state->indent -= 2;\n    indent(state);\n    cmark_strbuf_puts(xml, \"</\");\n    cmark_strbuf_puts(xml, cmark_node_get_type_string(node));\n    cmark_strbuf_puts(xml, \">\\n\");\n  }\n\n  return 1;\n}\n\nchar *cmark_render_xml(cmark_node *root, int options) {\n  char *result;\n  cmark_strbuf xml = CMARK_BUF_INIT(cmark_node_mem(root));\n  cmark_event_type ev_type;\n  cmark_node *cur;\n  struct render_state state = {&xml, 0};\n\n  cmark_iter *iter = cmark_iter_new(root);\n\n  cmark_strbuf_puts(state.xml, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\");\n  cmark_strbuf_puts(state.xml,\n                    \"<!DOCTYPE document SYSTEM \\\"CommonMark.dtd\\\">\\n\");\n  while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {\n    cur = cmark_iter_get_node(iter);\n    S_render_node(cur, ev_type, &state, options);\n  }\n  result = (char *)cmark_strbuf_detach(&xml);\n\n  cmark_iter_free(iter);\n  return result;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/BackwardsScanner.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#include \"BackwardsScanner.h\"\n\n#include <cplusplus/Token.h>\n\n#include <QTextCursor>\n#include <QTextDocument>\n\nusing namespace CPlusPlus;\n\nBackwardsScanner::BackwardsScanner(LanguageFeatures features,\n                                   const QTextCursor &cursor,\n                                   int maxBlockCount,\n                                   const QString &suffix,\n                                   bool skipComments)\n    : _offset(0)\n    , _blocksTokenized(0)\n    , _block(cursor.block())\n    , _maxBlockCount(maxBlockCount)\n{\n    // FIXME: Why these defaults?\n    _tokenize.setLanguageFeatures(features);\n    _tokenize.setSkipComments(skipComments);\n    _text = _block.text().left(cursor.position() - cursor.block().position());\n\n    if (! suffix.isEmpty())\n        _text += suffix;\n\n    _tokens.append(_tokenize(_text, previousBlockState(_block)));\n\n    _startToken = _tokens.size();\n}\n\nToken BackwardsScanner::LA(int index) const\n{ return const_cast<BackwardsScanner *>(this)->fetchToken(_startToken - index); }\n\nToken BackwardsScanner::operator[](int index) const\n{ return const_cast<BackwardsScanner *>(this)->fetchToken(index); }\n\nconst Token &BackwardsScanner::fetchToken(int tokenIndex)\n{\n    while (_offset + tokenIndex < 0) {\n        _block = _block.previous();\n        if (_blocksTokenized == _maxBlockCount || !_block.isValid()) {\n            ++_offset;\n            _tokens.prepend(Token()); // sentinel\n            break;\n        } else {\n            ++_blocksTokenized;\n\n            QString blockText = _block.text();\n            _text.prepend(QLatin1Char('\\n'));\n            _text.prepend(blockText);\n\n            QList<Token> adaptedTokens;\n            for (int i = 0; i < _tokens.size(); ++i) {\n                Token t = _tokens.at(i);\n                t.offset += + blockText.length() + 1;\n                adaptedTokens.append(t);\n            }\n\n            _tokens = _tokenize(blockText, previousBlockState(_block));\n            _offset += _tokens.size();\n            _tokens += adaptedTokens;\n        }\n    }\n\n    return _tokens.at(_offset + tokenIndex);\n}\n\nint BackwardsScanner::startToken() const\n{ return _startToken; }\n\nint BackwardsScanner::startPosition() const\n{ return _block.position(); }\n\nQString BackwardsScanner::text() const\n{ return _text; }\n\nQString BackwardsScanner::mid(int index) const\n{\n    const Token &firstToken = _tokens.at(index + _offset);\n    return _text.mid(firstToken.begin());\n}\n\nQString BackwardsScanner::text(int index) const\n{\n    const Token &firstToken = _tokens.at(index + _offset);\n    return _text.mid(firstToken.begin(), firstToken.length());\n}\n\nQStringRef BackwardsScanner::textRef(int index) const\n{\n    const Token &firstToken = _tokens.at(index + _offset);\n    return _text.midRef(firstToken.begin(), firstToken.length());\n}\n\nint BackwardsScanner::size() const\n{\n    return _tokens.size();\n}\n\nint BackwardsScanner::startOfMatchingBrace(int index) const\n{\n    const BackwardsScanner &tk = *this;\n\n    if (tk[index - 1].is(T_RPAREN)) {\n        int i = index - 1;\n        int count = 0;\n        do {\n            if (tk[i].is(T_LPAREN)) {\n                if (! ++count)\n                    return i;\n            } else if (tk[i].is(T_RPAREN))\n                --count;\n            --i;\n        } while (count != 0 && tk[i].isNot(T_EOF_SYMBOL));\n    } else if (tk[index - 1].is(T_RBRACKET)) {\n        int i = index - 1;\n        int count = 0;\n        do {\n            if (tk[i].is(T_LBRACKET)) {\n                if (! ++count)\n                    return i;\n            } else if (tk[i].is(T_RBRACKET))\n                --count;\n            --i;\n        } while (count != 0 && tk[i].isNot(T_EOF_SYMBOL));\n    } else if (tk[index - 1].is(T_RBRACE)) {\n        int i = index - 1;\n        int count = 0;\n        do {\n            if (tk[i].is(T_LBRACE)) {\n                if (! ++count)\n                    return i;\n            } else if (tk[i].is(T_RBRACE))\n                --count;\n            --i;\n        } while (count != 0 && tk[i].isNot(T_EOF_SYMBOL));\n    } else if (tk[index - 1].is(T_GREATER)) {\n        int i = index - 1;\n        int count = 0;\n        do {\n            if (tk[i].is(T_LESS)) {\n                if (! ++count)\n                    return i;\n            } else if (tk[i].is(T_GREATER))\n                --count;\n            --i;\n        } while (count != 0 && tk[i].isNot(T_EOF_SYMBOL));\n    } else {\n        Q_ASSERT(0);\n    }\n\n    return index;\n}\n\nint BackwardsScanner::startOfLine(int index) const\n{\n    const BackwardsScanner tk(*this);\n\n    forever {\n        const Token &tok = tk[index - 1];\n\n        if (tok.is(T_EOF_SYMBOL))\n            break;\n        else if (tok.newline())\n            return index - 1;\n\n        --index;\n    }\n\n    return index;\n}\n\nint BackwardsScanner::startOfBlock(int index) const\n{\n    const BackwardsScanner tk(*this);\n\n    const int start = index;\n\n    forever {\n        Token token = tk[index - 1];\n\n        if (token.is(T_EOF_SYMBOL)) {\n            break;\n\n        } else if (token.is(T_GREATER)) {\n            const int matchingBrace = startOfMatchingBrace(index);\n\n            if (matchingBrace != index && tk[matchingBrace - 1].is(T_TEMPLATE))\n                index = matchingBrace;\n\n        } else if (token.is(T_RPAREN) || token.is(T_RBRACKET) || token.is(T_RBRACE)) {\n            const int matchingBrace = startOfMatchingBrace(index);\n\n            if (matchingBrace != index)\n                index = matchingBrace;\n\n        } else if (token.is(T_LPAREN) || token.is(T_LBRACKET)) {\n            break; // unmatched brace\n\n        } else if (token.is(T_LBRACE)) {\n            return index - 1;\n\n        }\n\n        --index;\n    }\n\n    return start;\n}\n\nQString BackwardsScanner::indentationString(int index) const\n{\n    const Token tokenAfterNewline = operator[](startOfLine(index + 1));\n    const int newlinePos = qMax(0, _text.lastIndexOf(QLatin1Char('\\n'),\n                                                     tokenAfterNewline.begin()));\n    return _text.mid(newlinePos, tokenAfterNewline.begin() - newlinePos);\n}\n\n\nint BackwardsScanner::previousBlockState(const QTextBlock &block)\n{\n    const QTextBlock prevBlock = block.previous();\n\n    if (prevBlock.isValid()) {\n        int state = prevBlock.userState();\n\n        if (state != -1)\n            return state;\n    }\n\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/BackwardsScanner.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n#ifndef CPLUSPLUS_BACKWARDSSCANNER_H\n#define CPLUSPLUS_BACKWARDSSCANNER_H\n\n#include \"SimpleLexer.h\"\n\n#include <QTextBlock>\n\nQT_FORWARD_DECLARE_CLASS(QTextCursor)\n\nnamespace CPlusPlus {\n\nclass BackwardsScanner\n{\n    enum { MAX_BLOCK_COUNT = 10 };\n\npublic:\n    explicit BackwardsScanner(LanguageFeatures features,\n                              const QTextCursor &cursor,\n                              int maxBlockCount = MAX_BLOCK_COUNT,\n                              const QString &suffix = QString(),\n                              bool skipComments = true);\n\n    int startToken() const;\n\n    int startPosition() const;\n\n    QString text() const;\n    QString mid(int index) const;\n\n    QString text(int index) const;\n    QStringRef textRef(int index) const;\n    // 1-based\n    Token LA(int index) const;\n\n    // n-la token is [startToken - n]\n    Token operator[](int index) const; // ### deprecate\n\n    QString indentationString(int index) const;\n\n    int startOfLine(int index) const;\n    int startOfMatchingBrace(int index) const;\n    int startOfBlock(int index) const;\n\n    int size() const;\n\n    static int previousBlockState(const QTextBlock &block);\n\nprivate:\n    const Token &fetchToken(int tokenIndex);\n\nprivate:\n    QList<Token> _tokens;\n    int _offset;\n    int _blocksTokenized;\n    QTextBlock _block;\n    SimpleLexer _tokenize;\n    QString _text;\n    int _maxBlockCount;\n    int _startToken;\n};\n\n} // namespace CPlusPlus\n\n#endif // CPLUSPLUS_BACKWARDSSCANNER_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/Keywords.cpp",
    "content": "// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#include \"Lexer.h\"\n#include \"Token.h\"\n\nnamespace CPlusPlus {\n\nstatic inline int classify2(const char *s, LanguageFeatures)\n{\n  if (s[0] == 'd') {\n    if (s[1] == 'o') {\n      return T_DO;\n    }\n  }\n  else if (s[0] == 'i') {\n    if (s[1] == 'f') {\n      return T_IF;\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classify3(const char *s, LanguageFeatures features)\n{\n  if (s[0] == 'a') {\n    if (s[1] == 's') {\n      if (s[2] == 'm') {\n        return T_ASM;\n      }\n    }\n  }\n  else if (s[0] == 'f') {\n    if (s[1] == 'o') {\n      if (s[2] == 'r') {\n        return T_FOR;\n      }\n    }\n  }\n  else if (s[0] == 'i') {\n    if (s[1] == 'n') {\n      if (s[2] == 't') {\n        return T_INT;\n      }\n    }\n  }\n  else if (s[0] == 'n') {\n    if (s[1] == 'e') {\n      if (s[2] == 'w') {\n        return T_NEW;\n      }\n    }\n  }\n  else if (s[0] == 't') {\n    if (s[1] == 'r') {\n      if (s[2] == 'y') {\n        return T_TRY;\n      }\n    }\n  }\n  else if (features.qtMocRunEnabled && s[0] == 'Q') {\n    if (s[1] == '_') {\n      if (s[2] == 'D') {\n        return T_Q_D;\n      }\n      else if (s[2] == 'Q') {\n        return T_Q_Q;\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classify4(const char *s, LanguageFeatures features)\n{\n  if (s[0] == 'a') {\n    if (s[1] == 'u') {\n      if (s[2] == 't') {\n        if (s[3] == 'o') {\n          return T_AUTO;\n        }\n      }\n    }\n  }\n  else if (s[0] == 'b') {\n    if (s[1] == 'o') {\n      if (s[2] == 'o') {\n        if (s[3] == 'l') {\n          return T_BOOL;\n        }\n      }\n    }\n  }\n  else if (s[0] == 'c') {\n    if (s[1] == 'a') {\n      if (s[2] == 's') {\n        if (s[3] == 'e') {\n          return T_CASE;\n        }\n      }\n    }\n    else if (s[1] == 'h') {\n      if (s[2] == 'a') {\n        if (s[3] == 'r') {\n          return T_CHAR;\n        }\n      }\n    }\n  }\n  else if (s[0] == 'e') {\n    if (s[1] == 'l') {\n      if (s[2] == 's') {\n        if (s[3] == 'e') {\n          return T_ELSE;\n        }\n      }\n    }\n    else if (s[1] == 'n') {\n      if (s[2] == 'u') {\n        if (s[3] == 'm') {\n          return T_ENUM;\n        }\n      }\n    }\n    else if (features.qtKeywordsEnabled && s[1] == 'm') {\n      if (s[2] == 'i') {\n        if (s[3] == 't') {\n          return T_EMIT;\n        }\n      }\n    }\n  }\n  else if (s[0] == 'g') {\n    if (s[1] == 'o') {\n      if (s[2] == 't') {\n        if (s[3] == 'o') {\n          return T_GOTO;\n        }\n      }\n    }\n  }\n  else if (s[0] == 'l') {\n    if (s[1] == 'o') {\n      if (s[2] == 'n') {\n        if (s[3] == 'g') {\n          return T_LONG;\n        }\n      }\n    }\n  }\n  else if (s[0] == 't') {\n    if (s[1] == 'h') {\n      if (s[2] == 'i') {\n        if (s[3] == 's') {\n          return T_THIS;\n        }\n      }\n    }\n    else if (s[1] == 'r') {\n      if (s[2] == 'u') {\n        if (s[3] == 'e') {\n          return T_TRUE;\n        }\n      }\n    }\n  }\n  else if (s[0] == 'v') {\n    if (s[1] == 'o') {\n      if (s[2] == 'i') {\n        if (s[3] == 'd') {\n          return T_VOID;\n        }\n      }\n    }\n  }\n  else if (features.qtEnabled && s[0] == 'S') {\n    if (s[1] == 'L') {\n      if (s[2] == 'O') {\n        if (s[3] == 'T') {\n          return T_SLOT;\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classify5(const char *s, LanguageFeatures features)\n{\n  if (s[0] == '_') {\n    if (s[1] == '_') {\n      if (s[2] == 'a') {\n        if (s[3] == 's') {\n          if (s[4] == 'm') {\n            return T___ASM;\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'b') {\n    if (s[1] == 'r') {\n      if (s[2] == 'e') {\n        if (s[3] == 'a') {\n          if (s[4] == 'k') {\n            return T_BREAK;\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'c') {\n    if (s[1] == 'a') {\n      if (s[2] == 't') {\n        if (s[3] == 'c') {\n          if (s[4] == 'h') {\n            return T_CATCH;\n          }\n        }\n      }\n    }\n    else if (s[1] == 'l') {\n      if (s[2] == 'a') {\n        if (s[3] == 's') {\n          if (s[4] == 's') {\n            return T_CLASS;\n          }\n        }\n      }\n    }\n    else if (s[1] == 'o') {\n      if (s[2] == 'n') {\n        if (s[3] == 's') {\n          if (s[4] == 't') {\n            return T_CONST;\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'f') {\n    if (s[1] == 'a') {\n      if (s[2] == 'l') {\n        if (s[3] == 's') {\n          if (s[4] == 'e') {\n            return T_FALSE;\n          }\n        }\n      }\n    }\n    else if (s[1] == 'l') {\n      if (s[2] == 'o') {\n        if (s[3] == 'a') {\n          if (s[4] == 't') {\n            return T_FLOAT;\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 's') {\n    if (s[1] == 'h') {\n      if (s[2] == 'o') {\n        if (s[3] == 'r') {\n          if (s[4] == 't') {\n            return T_SHORT;\n          }\n        }\n      }\n    }\n    else if (features.qtKeywordsEnabled) {\n      if (s[1] == 'l') {\n        if (s[2] == 'o') {\n          if (s[3] == 't') {\n            if (s[4] == 's') {\n              return T_Q_SLOTS;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 't') {\n    if (s[1] == 'h') {\n      if (s[2] == 'r') {\n        if (s[3] == 'o') {\n          if (s[4] == 'w') {\n            return T_THROW;\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'u') {\n    if (s[1] == 'n') {\n      if (s[2] == 'i') {\n        if (s[3] == 'o') {\n          if (s[4] == 'n') {\n            return T_UNION;\n          }\n        }\n      }\n    }\n    else if (s[1] == 's') {\n      if (s[2] == 'i') {\n        if (s[3] == 'n') {\n          if (s[4] == 'g') {\n            return T_USING;\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'w') {\n    if (s[1] == 'h') {\n      if (s[2] == 'i') {\n        if (s[3] == 'l') {\n          if (s[4] == 'e') {\n            return T_WHILE;\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classify6(const char *s, LanguageFeatures features)\n{\n  if (s[0] == 'd') {\n    if (s[1] == 'e') {\n      if (s[2] == 'l') {\n        if (s[3] == 'e') {\n          if (s[4] == 't') {\n            if (s[5] == 'e') {\n              return T_DELETE;\n            }\n          }\n        }\n      }\n    }\n    else if (s[1] == 'o') {\n      if (s[2] == 'u') {\n        if (s[3] == 'b') {\n          if (s[4] == 'l') {\n            if (s[5] == 'e') {\n              return T_DOUBLE;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'e') {\n    if (s[1] == 'x') {\n      if (s[2] == 'p') {\n        if (s[3] == 'o') {\n          if (s[4] == 'r') {\n            if (s[5] == 't') {\n              return T_EXPORT;\n            }\n          }\n        }\n      }\n      else if (s[2] == 't') {\n        if (s[3] == 'e') {\n          if (s[4] == 'r') {\n            if (s[5] == 'n') {\n              return T_EXTERN;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'f') {\n    if (s[1] == 'r') {\n      if (s[2] == 'i') {\n        if (s[3] == 'e') {\n          if (s[4] == 'n') {\n            if (s[5] == 'd') {\n              return T_FRIEND;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'i') {\n    if (s[1] == 'n') {\n      if (s[2] == 'l') {\n        if (s[3] == 'i') {\n          if (s[4] == 'n') {\n            if (s[5] == 'e') {\n              return T_INLINE;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'p') {\n    if (s[1] == 'u') {\n      if (s[2] == 'b') {\n        if (s[3] == 'l') {\n          if (s[4] == 'i') {\n            if (s[5] == 'c') {\n              return T_PUBLIC;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'r') {\n    if (s[1] == 'e') {\n      if (s[2] == 't') {\n        if (s[3] == 'u') {\n          if (s[4] == 'r') {\n            if (s[5] == 'n') {\n              return T_RETURN;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 's') {\n    if (s[1] == 'i') {\n      if (s[2] == 'g') {\n        if (s[3] == 'n') {\n          if (s[4] == 'e') {\n            if (s[5] == 'd') {\n              return T_SIGNED;\n            }\n          }\n        }\n      }\n      else if (s[2] == 'z') {\n        if (s[3] == 'e') {\n          if (s[4] == 'o') {\n            if (s[5] == 'f') {\n              return T_SIZEOF;\n            }\n          }\n        }\n      }\n    }\n    else if (s[1] == 't') {\n      if (s[2] == 'a') {\n        if (s[3] == 't') {\n          if (s[4] == 'i') {\n            if (s[5] == 'c') {\n              return T_STATIC;\n            }\n          }\n        }\n      }\n      else if (s[2] == 'r') {\n        if (s[3] == 'u') {\n          if (s[4] == 'c') {\n            if (s[5] == 't') {\n              return T_STRUCT;\n            }\n          }\n        }\n      }\n    }\n    else if (s[1] == 'w') {\n      if (s[2] == 'i') {\n        if (s[3] == 't') {\n          if (s[4] == 'c') {\n            if (s[5] == 'h') {\n              return T_SWITCH;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 't') {\n    if (s[1] == 'y') {\n      if (s[2] == 'p') {\n        if (s[3] == 'e') {\n          if (s[4] == 'i') {\n            if (s[5] == 'd') {\n              return T_TYPEID;\n            }\n          }\n          else if (s[4] == 'o') {\n            if (s[5] == 'f') {\n              return T_TYPEOF;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (features.qtKeywordsEnabled && s[0] == 'S') {\n    if (s[1] == 'I') {\n      if (s[2] == 'G') {\n        if (s[3] == 'N') {\n          if (s[4] == 'A') {\n            if (s[5] == 'L') {\n              return T_SIGNAL;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (features.qtKeywordsEnabled && s[0] == 'Q') {\n    if (s[1] == '_') {\n      if (s[2] == 'S') {\n        if (s[3] == 'L') {\n          if (s[4] == 'O') {\n            if (s[5] == 'T') {\n              return T_Q_SLOT;\n            }\n          }\n        }\n      }\n      else if (s[2] == 'E') {\n        if (s[3] == 'M') {\n          if (s[4] == 'I') {\n            if (s[5] == 'T') {\n              return T_Q_EMIT;\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classify7(const char *s, LanguageFeatures features)\n{\n  if (s[0] == '_') {\n    if (s[1] == '_') {\n      if (s[2] == 'a') {\n        if (s[3] == 's') {\n          if (s[4] == 'm') {\n            if (s[5] == '_') {\n              if (s[6] == '_') {\n                return T___ASM__;\n              }\n            }\n          }\n        }\n      }\n      else if (s[2] == 'c') {\n        if (s[3] == 'o') {\n          if (s[4] == 'n') {\n            if (s[5] == 's') {\n              if (s[6] == 't') {\n                return T___CONST;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (features.cxx11Enabled && s[0] == 'a') {\n    if (s[1] == 'l') {\n      if (s[2] == 'i') {\n        if (s[3] == 'g') {\n          if (s[4] == 'n') {\n            if (s[5] == 'a') {\n              if (s[6] == 's') {\n                return T_ALIGNAS;\n              }\n            }\n            else if (s[5] == 'o') {\n              if (s[6] == 'f') {\n                return T_ALIGNOF;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'd') {\n    if (s[1] == 'e') {\n      if (s[2] == 'f') {\n        if (s[3] == 'a') {\n          if (s[4] == 'u') {\n            if (s[5] == 'l') {\n              if (s[6] == 't') {\n                return T_DEFAULT;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'm') {\n    if (s[1] == 'u') {\n      if (s[2] == 't') {\n        if (s[3] == 'a') {\n          if (s[4] == 'b') {\n            if (s[5] == 'l') {\n              if (s[6] == 'e') {\n                return T_MUTABLE;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (features.cxx11Enabled && s[0] == 'n') {\n    if (s[1] == 'u') {\n      if (s[2] == 'l') {\n        if (s[3] == 'l') {\n          if (s[4] == 'p') {\n            if (s[5] == 't') {\n              if (s[6] == 'r') {\n                return T_NULLPTR;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'p') {\n    if (s[1] == 'r') {\n      if (s[2] == 'i') {\n        if (s[3] == 'v') {\n          if (s[4] == 'a') {\n            if (s[5] == 't') {\n              if (s[6] == 'e') {\n                return T_PRIVATE;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (features.qtKeywordsEnabled && s[0] == 'f') {\n    if (s[1] == 'o') {\n      if (s[2] == 'r') {\n        if (s[3] == 'e') {\n          if (s[4] == 'a') {\n            if (s[5] == 'c') {\n              if (s[6] == 'h') {\n                return T_Q_FOREACH;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (features.qtEnabled && s[0] == 's') {\n    if (s[1] == 'i') {\n      if (s[2] == 'g') {\n        if (s[3] == 'n') {\n          if (s[4] == 'a') {\n            if (s[5] == 'l') {\n              if (s[6] == 's') {\n                return T_Q_SIGNALS;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 't') {\n    if (s[1] == 'y') {\n      if (s[2] == 'p') {\n        if (s[3] == 'e') {\n          if (s[4] == 'd') {\n            if (s[5] == 'e') {\n              if (s[6] == 'f') {\n                return T_TYPEDEF;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'v') {\n    if (s[1] == 'i') {\n      if (s[2] == 'r') {\n        if (s[3] == 't') {\n          if (s[4] == 'u') {\n            if (s[5] == 'a') {\n              if (s[6] == 'l') {\n                return T_VIRTUAL;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'w') {\n    if (s[1] == 'c') {\n      if (s[2] == 'h') {\n        if (s[3] == 'a') {\n          if (s[4] == 'r') {\n            if (s[5] == '_') {\n              if (s[6] == 't') {\n                return T_WCHAR_T;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (features.qtEnabled && s[0] == 'Q') {\n    if (s[1] == '_') {\n      if (s[2] == 'S') {\n        if (s[3] == 'L') {\n          if (s[4] == 'O') {\n            if (s[5] == 'T') {\n              if (s[6] == 'S') {\n                return T_Q_SLOTS;\n              }\n            }\n          }\n        }\n      }\n      else if (s[2] == 'E') {\n        if (s[3] == 'N') {\n          if (s[4] == 'U') {\n            if (s[5] == 'M') {\n              if (s[6] == 'S') {\n                return T_Q_ENUMS;\n              }\n            }\n          }\n        }\n      }\n      else if (s[2] == 'F') {\n        if (s[3] == 'L') {\n          if (s[4] == 'A') {\n            if (s[5] == 'G') {\n              if (s[6] == 'S') {\n                return T_Q_FLAGS;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classify8(const char *s, LanguageFeatures features)\n{\n  if (s[0] == '_') {\n    if (s[1] == '_') {\n      if (s[2] == 'i') {\n        if (s[3] == 'n') {\n          if (s[4] == 'l') {\n            if (s[5] == 'i') {\n              if (s[6] == 'n') {\n                if (s[7] == 'e') {\n                  return T___INLINE;\n                }\n              }\n            }\n          }\n        }\n      }\n      else if (s[2] == 't') {\n        if (s[3] == 'y') {\n          if (s[4] == 'p') {\n            if (s[5] == 'e') {\n              if (s[6] == 'o') {\n                if (s[7] == 'f') {\n                  return T___TYPEOF;\n                }\n              }\n            }\n          }\n        }\n        else if (s[3] == 'h') {\n          if (s[4] == 'r') {\n            if (s[5] == 'e') {\n              if (s[6] == 'a') {\n                if (s[7] == 'd') {\n                  return T___THREAD;\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'c') {\n    if (s[1] == 'o') {\n      if (s[2] == 'n') {\n        if (s[3] == 't') {\n          if (s[4] == 'i') {\n            if (s[5] == 'n') {\n              if (s[6] == 'u') {\n                if (s[7] == 'e') {\n                  return T_CONTINUE;\n                }\n              }\n            }\n          }\n        }\n      }\n    } else if (features.cxx11Enabled && s[1] == 'h') {\n        if (s[2] == 'a') {\n            if (s[3] == 'r') {\n                if (s[4] == '1') {\n                    if (s[5] == '6') {\n                        if (s[6] == '_') {\n                            if (s[7] == 't') {\n                                return T_CHAR16_T;\n                            }\n                        }\n                    }\n                } else if (s[4] == '3') {\n                    if (s[5] == '2') {\n                        if (s[6] == '_') {\n                            if (s[7] == 't') {\n                                return T_CHAR32_T;\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    }\n  }\n  else if (features.cxx11Enabled && s[0] == 'd') {\n    if (s[1] == 'e') {\n      if (s[2] == 'c') {\n        if (s[3] == 'l') {\n          if (s[4] == 't') {\n            if (s[5] == 'y') {\n              if (s[6] == 'p') {\n                if (s[7] == 'e') {\n                  return T_DECLTYPE;\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'e') {\n    if (s[1] == 'x') {\n      if (s[2] == 'p') {\n        if (s[3] == 'l') {\n          if (s[4] == 'i') {\n            if (s[5] == 'c') {\n              if (s[6] == 'i') {\n                if (s[7] == 't') {\n                  return T_EXPLICIT;\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (features.cxx11Enabled && s[0] == 'n') {\n    if (s[1] == 'o') {\n      if (s[2] == 'e') {\n        if (s[3] == 'x') {\n          if (s[4] == 'c') {\n            if (s[5] == 'e') {\n              if (s[6] == 'p') {\n                if (s[7] == 't') {\n                  return T_NOEXCEPT;\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'o') {\n    if (s[1] == 'p') {\n      if (s[2] == 'e') {\n        if (s[3] == 'r') {\n          if (s[4] == 'a') {\n            if (s[5] == 't') {\n              if (s[6] == 'o') {\n                if (s[7] == 'r') {\n                  return T_OPERATOR;\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'r') {\n    if (s[1] == 'e') {\n      if (s[2] == 'g') {\n        if (s[3] == 'i') {\n          if (s[4] == 's') {\n            if (s[5] == 't') {\n              if (s[6] == 'e') {\n                if (s[7] == 'r') {\n                  return T_REGISTER;\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 't') {\n    if (s[1] == 'e') {\n      if (s[2] == 'm') {\n        if (s[3] == 'p') {\n          if (s[4] == 'l') {\n            if (s[5] == 'a') {\n              if (s[6] == 't') {\n                if (s[7] == 'e') {\n                  return T_TEMPLATE;\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n    else if (s[1] == 'y') {\n      if (s[2] == 'p') {\n        if (s[3] == 'e') {\n          if (s[4] == 'n') {\n            if (s[5] == 'a') {\n              if (s[6] == 'm') {\n                if (s[7] == 'e') {\n                  return T_TYPENAME;\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'u') {\n    if (s[1] == 'n') {\n      if (s[2] == 's') {\n        if (s[3] == 'i') {\n          if (s[4] == 'g') {\n            if (s[5] == 'n') {\n              if (s[6] == 'e') {\n                if (s[7] == 'd') {\n                  return T_UNSIGNED;\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'v') {\n    if (s[1] == 'o') {\n      if (s[2] == 'l') {\n        if (s[3] == 'a') {\n          if (s[4] == 't') {\n            if (s[5] == 'i') {\n              if (s[6] == 'l') {\n                if (s[7] == 'e') {\n                  return T_VOLATILE;\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (features.qtEnabled && s[0] == 'Q') {\n    if (s[1] == '_') {\n      if (s[2] == 'G') {\n        if (s[3] == 'A') {\n          if (s[4] == 'D') {\n            if (s[5] == 'G') {\n              if (s[6] == 'E') {\n                if (s[7] == 'T') {\n                  return T_Q_GADGET;\n                }\n              }\n            }\n          }\n        }\n      }\n      else if (s[2] == 'O') {\n        if (s[3] == 'B') {\n          if (s[4] == 'J') {\n            if (s[5] == 'E') {\n              if (s[6] == 'C') {\n                if (s[7] == 'T') {\n                  return T_Q_OBJECT;\n                }\n              }\n            }\n          }\n        }\n      }\n      else if (s[2] == 'S') {\n        if (s[3] == 'I') {\n          if (s[4] == 'G') {\n            if (s[5] == 'N') {\n              if (s[6] == 'A') {\n                if (s[7] == 'L') {\n                  return T_Q_SIGNAL;\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classify9(const char *s, LanguageFeatures features)\n{\n  if (s[0] == '_') {\n    if (s[1] == '_') {\n      if (s[2] == 'c') {\n        if (s[3] == 'o') {\n          if (s[4] == 'n') {\n            if (s[5] == 's') {\n              if (s[6] == 't') {\n                if (s[7] == '_') {\n                  if (s[8] == '_') {\n                    return T___CONST__;\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (features.cxx11Enabled && s[0] == 'c') {\n    if (s[1] == 'o') {\n      if (s[2] == 'n') {\n        if (s[3] == 's') {\n          if (s[4] == 't') {\n            if (s[5] == 'e') {\n              if (s[6] == 'x') {\n                if (s[7] == 'p') {\n                  if (s[8] == 'r') {\n                    return T_CONSTEXPR;\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'n') {\n    if (s[1] == 'a') {\n      if (s[2] == 'm') {\n        if (s[3] == 'e') {\n          if (s[4] == 's') {\n            if (s[5] == 'p') {\n              if (s[6] == 'a') {\n                if (s[7] == 'c') {\n                  if (s[8] == 'e') {\n                    return T_NAMESPACE;\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'p') {\n    if (s[1] == 'r') {\n      if (s[2] == 'o') {\n        if (s[3] == 't') {\n          if (s[4] == 'e') {\n            if (s[5] == 'c') {\n              if (s[6] == 't') {\n                if (s[7] == 'e') {\n                  if (s[8] == 'd') {\n                    return T_PROTECTED;\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (features.qtEnabled && s[0] == 'Q') {\n    if (s[1] == '_') {\n      if (s[2] == 'S') {\n        if (s[3] == 'I') {\n          if (s[4] == 'G') {\n            if (s[5] == 'N') {\n              if (s[6] == 'A') {\n                if (s[7] == 'L') {\n                  if (s[8] == 'S') {\n                    return T_Q_SIGNALS;\n                  }\n                }\n              }\n            }\n          }\n        }\n      } else if (s[2] == 'F') {\n        if (s[3] == 'O') {\n          if (s[4] == 'R') {\n            if (s[5] == 'E') {\n              if (s[6] == 'A') {\n                if (s[7] == 'C') {\n                  if (s[8] == 'H') {\n                    return T_Q_FOREACH;\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classify10(const char *s, LanguageFeatures features)\n{\n  if (s[0] == '_') {\n    if (s[1] == '_') {\n      if (s[2] == 'i') {\n        if (s[3] == 'n') {\n          if (s[4] == 'l') {\n            if (s[5] == 'i') {\n              if (s[6] == 'n') {\n                if (s[7] == 'e') {\n                  if (s[8] == '_') {\n                    if (s[9] == '_') {\n                      return T___INLINE__;\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n      else if (s[2] == 'd') {\n        if (s[3] == 'e') {\n          if (s[4] == 'c') {\n            if (s[5] == 'l') {\n              if (s[6] == 't') {\n                if (s[7] == 'y') {\n                  if (s[8] == 'p') {\n                    if (s[9] == 'e') {\n                      return T___DECLTYPE;\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n      else if (s[2] == 't') {\n        if (s[3] == 'y') {\n          if (s[4] == 'p') {\n            if (s[5] == 'e') {\n              if (s[6] == 'o') {\n                if (s[7] == 'f') {\n                  if (s[8] == '_') {\n                    if (s[9] == '_') {\n                      return T___TYPEOF__;\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n      else if (s[2] == 'v') {\n        if (s[3] == 'o') {\n          if (s[4] == 'l') {\n            if (s[5] == 'a') {\n              if (s[6] == 't') {\n                if (s[7] == 'i') {\n                  if (s[8] == 'l') {\n                    if (s[9] == 'e') {\n                      return T___VOLATILE;\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'c') {\n    if (s[1] == 'o') {\n      if (s[2] == 'n') {\n        if (s[3] == 's') {\n          if (s[4] == 't') {\n            if (s[5] == '_') {\n              if (s[6] == 'c') {\n                if (s[7] == 'a') {\n                  if (s[8] == 's') {\n                    if (s[9] == 't') {\n                      return T_CONST_CAST;\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (features.qtEnabled && s[0] == 'Q') {\n    if (s[1] == '_') {\n      if (s[2] == 'O') {\n        if (s[3] == 'V') {\n          if (s[4] == 'E') {\n            if (s[5] == 'R') {\n              if (s[6] == 'R') {\n                if (s[7] == 'I') {\n                  if (s[8] == 'D') {\n                    if (s[9] == 'E') {\n                      return T_Q_PROPERTY; // Q_OVERRIDE is just an alias for Q_PROPERTY\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n      else if (s[2] == 'P') {\n        if (s[3] == 'R') {\n          if (s[4] == 'O') {\n            if (s[5] == 'P') {\n              if (s[6] == 'E') {\n                if (s[7] == 'R') {\n                  if (s[8] == 'T') {\n                    if (s[9] == 'Y') {\n                      return T_Q_PROPERTY;\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classify11(const char *s, LanguageFeatures features)\n{\n  if (s[0] == '_') {\n    if (s[1] == '_') {\n      if (s[2] == 'a') {\n        if (s[3] == 't') {\n          if (s[4] == 't') {\n            if (s[5] == 'r') {\n              if (s[6] == 'i') {\n                if (s[7] == 'b') {\n                  if (s[8] == 'u') {\n                    if (s[9] == 't') {\n                      if (s[10] == 'e') {\n                        return T___ATTRIBUTE;\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 's') {\n    if (s[1] == 't') {\n      if (s[2] == 'a') {\n        if (s[3] == 't') {\n          if (s[4] == 'i') {\n            if (s[5] == 'c') {\n              if (s[6] == '_') {\n                if (s[7] == 'c') {\n                  if (s[8] == 'a') {\n                    if (s[9] == 's') {\n                      if (s[10] == 't') {\n                        return T_STATIC_CAST;\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (features.qtEnabled && s[0] == 'Q') {\n    if (s[1] == '_') {\n      if (s[2] == 'I') {\n        if (s[3] == 'N') {\n          if (s[4] == 'V') {\n            if (s[5] == 'O') {\n              if (s[6] == 'K') {\n                if (s[7] == 'A') {\n                  if (s[8] == 'B') {\n                    if (s[9] == 'L') {\n                      if (s[10] == 'E') {\n                        return T_Q_INVOKABLE;\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classify12(const char *s, LanguageFeatures features)\n{\n  if (s[0] == '_') {\n    if (s[1] == '_') {\n      if (s[2] == 'v') {\n        if (s[3] == 'o') {\n          if (s[4] == 'l') {\n            if (s[5] == 'a') {\n              if (s[6] == 't') {\n                if (s[7] == 'i') {\n                  if (s[8] == 'l') {\n                    if (s[9] == 'e') {\n                      if (s[10] == '_') {\n                        if (s[11] == '_') {\n                          return T___VOLATILE__;\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (features.qtEnabled && s[0] == 'Q') {\n    if (s[1] == '_') {\n      if (s[2] == 'I') {\n        if (s[3] == 'N') {\n          if (s[4] == 'T') {\n            if (s[5] == 'E') {\n              if (s[6] == 'R') {\n                if (s[7] == 'F') {\n                  if (s[8] == 'A') {\n                    if (s[9] == 'C') {\n                      if (s[10] == 'E') {\n                        if (s[11] == 'S') {\n                          return T_Q_INTERFACES;\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'd') {\n    if (s[1] == 'y') {\n      if (s[2] == 'n') {\n        if (s[3] == 'a') {\n          if (s[4] == 'm') {\n            if (s[5] == 'i') {\n              if (s[6] == 'c') {\n                if (s[7] == '_') {\n                  if (s[8] == 'c') {\n                    if (s[9] == 'a') {\n                      if (s[10] == 's') {\n                        if (s[11] == 't') {\n                          return T_DYNAMIC_CAST;\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (features.cxx11Enabled && s[0] == 't') {\n    if (s[1] == 'h') {\n      if (s[2] == 'r') {\n        if (s[3] == 'e') {\n          if (s[4] == 'a') {\n            if (s[5] == 'd') {\n              if (s[6] == '_') {\n                if (s[7] == 'l') {\n                  if (s[8] == 'o') {\n                    if (s[9] == 'c') {\n                      if (s[10] == 'a') {\n                        if (s[11] == 'l') {\n                          return T_THREAD_LOCAL;\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classify13(const char *s, LanguageFeatures features)\n{\n  if (s[0] == '_') {\n    if (s[1] == '_') {\n      if (s[2] == 'a') {\n        if (s[3] == 't') {\n          if (s[4] == 't') {\n            if (s[5] == 'r') {\n              if (s[6] == 'i') {\n                if (s[7] == 'b') {\n                  if (s[8] == 'u') {\n                    if (s[9] == 't') {\n                      if (s[10] == 'e') {\n                        if (s[11] == '_') {\n                          if (s[12] == '_') {\n                            return T___ATTRIBUTE__;\n                          }\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  } else if (features.cxx11Enabled && s[0] == 's') {\n    if (s[1] == 't') {\n      if (s[2] == 'a') {\n        if (s[3] == 't') {\n          if (s[4] == 'i') {\n            if (s[5] == 'c') {\n              if (s[6] == '_') {\n                if (s[7] == 'a') {\n                  if (s[8] == 's') {\n                    if (s[9] == 's') {\n                      if (s[10] == 'e') {\n                        if (s[11] == 'r') {\n                          if (s[12] == 't') {\n                            return T_STATIC_ASSERT;\n                          }\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classify16(const char *s, LanguageFeatures)\n{\n  if (s[0] == 'r') {\n    if (s[1] == 'e') {\n      if (s[2] == 'i') {\n        if (s[3] == 'n') {\n          if (s[4] == 't') {\n            if (s[5] == 'e') {\n              if (s[6] == 'r') {\n                if (s[7] == 'p') {\n                  if (s[8] == 'r') {\n                    if (s[9] == 'e') {\n                      if (s[10] == 't') {\n                        if (s[11] == '_') {\n                          if (s[12] == 'c') {\n                            if (s[13] == 'a') {\n                              if (s[14] == 's') {\n                                if (s[15] == 't') {\n                                  return T_REINTERPRET_CAST;\n                                }\n                              }\n                            }\n                          }\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classify14(const char *s, LanguageFeatures features)\n{\n  if (features.qtEnabled && s[0] == 'Q') {\n    if (s[1] == '_') {\n      if (s[2] == 'P') {\n        if (s[3] == 'R') {\n          if (s[4] == 'I') {\n            if (s[5] == 'V') {\n              if (s[6] == 'A') {\n                if (s[7] == 'T') {\n                  if (s[8] == 'E') {\n                    if (s[9] == '_') {\n                      if (s[10] == 'S') {\n                        if (s[11] == 'L') {\n                          if (s[12] == 'O') {\n                            if (s[13] == 'T') {\n                              return T_Q_PRIVATE_SLOT;\n                            }\n                          }\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classify18(const char *s, LanguageFeatures features)\n{\n  if (features.qtEnabled && s[0] == 'Q') {\n    if (s[1] == '_') {\n      if (s[2] == 'P') {\n        if (s[3] == 'R') {\n          if (s[4] == 'I') {\n            if (s[5] == 'V') {\n              if (s[6] == 'A') {\n                if (s[7] == 'T') {\n                  if (s[8] == 'E') {\n                    if (s[9] == '_') {\n                      if (s[10] == 'P') {\n                        if (s[11] == 'R') {\n                          if (s[12] == 'O') {\n                            if (s[13] == 'P') {\n                              if (s[14] == 'E') {\n                                if (s[15] == 'R') {\n                                  if (s[16] == 'T') {\n                                    if (s[17] == 'Y') {\n                                      return T_Q_PRIVATE_PROPERTY;\n                                    }\n                                  }\n                                }\n                              }\n                            }\n                          }\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classify19(const char *s, LanguageFeatures features)\n{\n  if (features.qtEnabled && s[0] == 'Q') {\n    if (s[1] == '_') {\n      if (s[2] == 'D') {\n        if (s[3] == 'E') {\n          if (s[4] == 'C') {\n            if (s[5] == 'L') {\n              if (s[6] == 'A') {\n                if (s[7] == 'R') {\n                  if (s[8] == 'E') {\n                    if (s[9] == '_') {\n                      if (s[10] == 'I') {\n                        if (s[11] == 'N') {\n                          if (s[12] == 'T') {\n                            if (s[13] == 'E') {\n                              if (s[14] == 'R') {\n                                if (s[15] == 'F') {\n                                  if (s[16] == 'A') {\n                                    if (s[17] == 'C') {\n                                      if (s[18] == 'E') {\n                                        return T_Q_DECLARE_INTERFACE;\n                                      }\n                                    }\n                                  }\n                                }\n                              }\n                            }\n                          }\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\n\nint Lexer::classify(const char *s, int n, LanguageFeatures features) {\n  switch (n) {\n    case 2: return classify2(s, features);\n    case 3: return classify3(s, features);\n    case 4: return classify4(s, features);\n    case 5: return classify5(s, features);\n    case 6: return classify6(s, features);\n    case 7: return classify7(s, features);\n    case 8: return classify8(s, features);\n    case 9: return classify9(s, features);\n    case 10: return classify10(s, features);\n    case 11: return classify11(s, features);\n    case 12: return classify12(s, features);\n    case 13: return classify13(s, features);\n    case 14: return classify14(s, features);\n    case 16: return classify16(s, features);\n    case 18: return classify18(s, features);\n    case 19: return classify19(s, features);\n    default: return T_IDENTIFIER;\n  } // switch\n}\n\nstatic inline int classifyOperator2(const char *s) {\n  if (s[0] == 'o') {\n    if (s[1] == 'r') {\n      return T_OR;\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classifyOperator3(const char *s) {\n  if (s[0] == 'a') {\n    if (s[1] == 'n') {\n      if (s[2] == 'd') {\n        return T_AND;\n      }\n    }\n  }\n  else if (s[0] == 'n') {\n    if (s[1] == 'o') {\n      if (s[2] == 't') {\n        return T_NOT;\n      }\n    }\n  }\n  else if (s[0] == 'x') {\n    if (s[1] == 'o') {\n      if (s[2] == 'r') {\n        return T_XOR;\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classifyOperator5(const char *s) {\n  if (s[0] == 'b') {\n    if (s[1] == 'i') {\n      if (s[2] == 't') {\n        if (s[3] == 'o') {\n          if (s[4] == 'r') {\n            return T_BITOR;\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'c') {\n    if (s[1] == 'o') {\n      if (s[2] == 'm') {\n        if (s[3] == 'p') {\n          if (s[4] == 'l') {\n            return T_COMPL;\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'o') {\n    if (s[1] == 'r') {\n      if (s[2] == '_') {\n        if (s[3] == 'e') {\n          if (s[4] == 'q') {\n            return T_OR_EQ;\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int classifyOperator6(const char *s) {\n  if (s[0] == 'a') {\n    if (s[1] == 'n') {\n      if (s[2] == 'd') {\n        if (s[3] == '_') {\n          if (s[4] == 'e') {\n            if (s[5] == 'q') {\n              return T_AND_EQ;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'b') {\n    if (s[1] == 'i') {\n      if (s[2] == 't') {\n        if (s[3] == 'a') {\n          if (s[4] == 'n') {\n            if (s[5] == 'd') {\n              return T_BITAND;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'n') {\n    if (s[1] == 'o') {\n      if (s[2] == 't') {\n        if (s[3] == '_') {\n          if (s[4] == 'e') {\n            if (s[5] == 'q') {\n              return T_NOT_EQ;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'x') {\n    if (s[1] == 'o') {\n      if (s[2] == 'r') {\n        if (s[3] == '_') {\n          if (s[4] == 'e') {\n            if (s[5] == 'q') {\n              return T_XOR_EQ;\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nint Lexer::classifyOperator(const char *s, int n) {\n  switch (n) {\n    case 2: return classifyOperator2(s);\n    case 3: return classifyOperator3(s);\n    case 5: return classifyOperator5(s);\n    case 6: return classifyOperator6(s);\n    default: return T_IDENTIFIER;\n  } // switch\n}\n\n\n} // namespace CPlusPlus\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/Keywords.kwgen",
    "content": "\n#include \"Lexer.h\"\n#include \"Token.h\"\n\n%token-prefix=T_\n%toupper\n%no-enums\n%namespace=Lexer\n\n%%\n__asm\n__asm__\n__attribute\n__attribute__\n__const\n__const__\n__inline\n__inline__\n__typeof\n__typeof__\n__volatile\n__volatile__\nasm\nauto\nbool\nbreak\ncase\ncatch\nchar\nclass\nconst\nconst_cast\ncontinue\ndefault\ndelete\ndo\ndouble\ndynamic_cast\nelse\nenum\nexplicit\nexport\nextern\nfalse\nfloat\nfor\nfriend\ngoto\nif\ninline\nint\nlong\nmutable\nnamespace\nnew\noperator\nprivate\nprotected\npublic\nregister\nreinterpret_cast\nreturn\nshort\nsigned\nsizeof\nstatic\nstatic_cast\nstruct\nswitch\ntemplate\nthis\nthrow\ntrue\ntry\ntypedef\ntypeid\ntypename\ntypeof\nunion\nunsigned\nusing\nvirtual\nvoid\nvolatile\nwchar_t\nwhile\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/Lexer.cpp",
    "content": "// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#include \"Lexer.h\"\n#include \"cppassert.h\"\n\n#include <cctype>\n\nusing namespace CPlusPlus;\n\n//Lexer::Lexer(TranslationUnit *unit)\n//    : _translationUnit(unit),\n//      //_control(unit->control()),\n//      _state(0),\n//      _flags(0),\n//      _currentLine(1)\n//{\n//    f._scanKeywords = true;\n//    setSource(_translationUnit->firstSourceChar(),\n//              _translationUnit->lastSourceChar());\n//}\n\nLexer::Lexer(const char *firstChar, const char *lastChar)\n    : //_translationUnit(0),\n      //_control(0),\n      _state(0),\n      _flags(0),\n      _currentLine(1)\n{\n    f._scanKeywords = true;    \n    setSource(firstChar, lastChar);\n}\n\nLexer::~Lexer()\n{ }\n\n//TranslationUnit *Lexer::translationUnit() const\n//{ return _translationUnit; }\n\nvoid Lexer::setSource(const char *firstChar, const char *lastChar)\n{\n    _firstChar = firstChar;\n    _lastChar = lastChar;\n    _currentChar = _firstChar - 1;\n    _tokenStart = _currentChar;\n    _yychar = '\\n';\n}\n\nvoid Lexer::setStartWithNewline(bool enabled)\n{\n    if (enabled)\n        _yychar = '\\n';\n    else\n        _yychar = ' ';\n}\n\nint Lexer::state() const\n{ return _state; }\n\nvoid Lexer::setState(int state)\n{ _state = state; }\n\nbool Lexer::scanCommentTokens() const\n{ return f._scanCommentTokens; }\n\nvoid Lexer::setScanCommentTokens(bool onoff)\n{ f._scanCommentTokens = onoff; }\n\nbool Lexer::scanKeywords() const\n{ return f._scanKeywords; }\n\nvoid Lexer::setScanKeywords(bool onoff)\n{ f._scanKeywords = onoff; }\n\nvoid Lexer::setScanAngleStringLiteralTokens(bool onoff)\n{ f._scanAngleStringLiteralTokens = onoff; }\n\nvoid Lexer::pushLineStartOffset()\n{\n    ++_currentLine;\n\n//    if (_translationUnit)\n//        _translationUnit->pushLineOffset(_currentChar - _firstChar);\n}\n\nunsigned Lexer::tokenOffset() const\n{ return _tokenStart - _firstChar; }\n\nunsigned Lexer::tokenLength() const\n{ return _currentChar - _tokenStart; }\n\nconst char *Lexer::tokenBegin() const\n{ return _tokenStart; }\n\nconst char *Lexer::tokenEnd() const\n{ return _currentChar; }\n\nunsigned Lexer::currentLine() const\n{ return _currentLine; }\n\nvoid Lexer::scan(Token *tok)\n{\n    tok->reset();\n    scan_helper(tok);\n    tok->f.length = _currentChar - _tokenStart;\n}\n\nvoid Lexer::scan_helper(Token *tok)\n{\n  _Lagain:\n    while (_yychar && std::isspace(_yychar)) {\n        if (_yychar == '\\n') {\n            tok->f.joined = s._newlineExpected;\n            tok->f.newline = !s._newlineExpected;\n\n            if (s._newlineExpected) {\n                s._newlineExpected = false;\n            } else {\n                switch (s._tokenKind) {\n                case T_EOF_SYMBOL:\n                case T_COMMENT:\n                case T_DOXY_COMMENT:\n                case T_RAW_STRING_LITERAL:\n                    break; // multiline tokens, don't break on newline\n                default: // Strings and C++ comments\n                    _state = 0;\n                }\n            }\n        } else {\n            tok->f.whitespace = true;\n        }\n        yyinp();\n    }\n\n//    if (! _translationUnit)\n//        tok->lineno = _currentLine;\n\n    _tokenStart = _currentChar;\n    tok->offset = _currentChar - _firstChar;\n\n    if (_yychar) {\n        s._newlineExpected = false;\n    } else if (s._tokenKind) {\n        tok->f.kind = T_EOF_SYMBOL;\n        return;\n    }\n\n    switch (s._tokenKind) {\n    case T_EOF_SYMBOL:\n        break;\n    case T_COMMENT:\n    case T_DOXY_COMMENT: {\n        const int originalKind = s._tokenKind;\n\n        while (_yychar) {\n            if (_yychar != '*')\n                yyinp();\n            else {\n                yyinp();\n                if (_yychar == '/') {\n                    yyinp();\n                    _state = 0;\n                    break;\n                }\n            }\n        }\n\n        if (! f._scanCommentTokens)\n            goto _Lagain;\n\n        tok->f.kind = originalKind;\n        return; // done\n    }\n    case T_CPP_COMMENT:\n    case T_CPP_DOXY_COMMENT: {\n        const Kind originalKind = (Kind)s._tokenKind;\n        tok->f.joined = true;\n        if (f._scanCommentTokens)\n            tok->f.kind = originalKind;\n        _state = 0;\n        scanCppComment(originalKind);\n        return;\n    }\n    case T_RAW_STRING_LITERAL:\n        tok->f.joined = true;\n        tok->f.kind = s._tokenKind;\n        _state = 0;\n        scanUntilQuote(tok, '`',true);\n        return;\n        break;\n    default: // Strings\n        tok->f.joined = true;\n        tok->f.kind = s._tokenKind;\n        _state = 0;\n        scanUntilQuote(tok, '\"');\n        return;\n    }\n\n    if (! _yychar) {\n        tok->f.kind = T_EOF_SYMBOL;\n        return;\n    }\n\n    unsigned char ch = _yychar;\n    yyinp();\n\n    switch (ch) {\n    case '\\\\':\n        s._newlineExpected = true;\n        goto _Lagain;\n\n    case '\"':\n        scanStringLiteral(tok);\n        break;\n\n    case '`':\n        scanGoRawStringLiteral(tok);\n        break;\n\n    case '\\'':\n        scanCharLiteral(tok);\n        break;\n\n    case '{':\n        tok->f.kind = T_LBRACE;\n        break;\n\n    case '}':\n        tok->f.kind = T_RBRACE;\n        break;\n\n    case '[':\n        tok->f.kind = T_LBRACKET;\n        break;\n\n    case ']':\n        tok->f.kind = T_RBRACKET;\n        break;\n\n    case '#':\n        if (_yychar == '#') {\n            tok->f.kind = T_POUND_POUND;\n            yyinp();\n        } else {\n            tok->f.kind = T_POUND;\n        }\n        break;\n\n    case '(':\n        tok->f.kind = T_LPAREN;\n        break;\n\n    case ')':\n        tok->f.kind = T_RPAREN;\n        break;\n\n    case ';':\n        tok->f.kind = T_SEMICOLON;\n        break;\n\n    case ':':\n        if (_yychar == '=') {\n            yyinp();\n            tok->f.kind = T_COLON_EQUAL;\n        } else if (_yychar == ':') {\n            yyinp();\n            tok->f.kind = T_COLON_COLON;\n        } else if (_yychar == '>') {\n            yyinp();\n            tok->f.kind = T_RBRACKET;\n        } else {\n            tok->f.kind = T_COLON;\n        }\n        break;\n\n    case '.':\n        if (_yychar == '*') {\n            yyinp();\n            tok->f.kind = T_DOT_STAR;\n        } else if (_yychar == '.') {\n            yyinp();\n            // ### CPP_CHECK(_yychar);\n            if (_yychar == '.') {\n                yyinp();\n                tok->f.kind = T_DOT_DOT_DOT;\n            } else {\n                tok->f.kind = T_ERROR;\n            }\n        } else if (std::isdigit(_yychar)) {\n            //const char *yytext = _currentChar - 2;\n            do {\n                if (_yychar == 'e' || _yychar == 'E') {\n                    yyinp();\n                    if (_yychar == '-' || _yychar == '+') {\n                        yyinp();\n                        // ### CPP_CHECK(std::isdigit(_yychar));\n                    }\n                } else if (_yychar == 'p' || _yychar == 'P'){\n                    yyinp();\n                    if (_yychar == '-') {\n                        yyinp();\n                    }\n                } else if (std::isalnum(_yychar) || _yychar == '.' || _yychar == '_') {\n                    yyinp();\n                } else {\n                    break;\n                }\n            } while (_yychar);\n            //int yylen = _currentChar - yytext;\n            tok->f.kind = T_NUMERIC_LITERAL;\n//            if (control())\n//                tok->number = control()->numericLiteral(yytext, yylen);\n        } else {\n            tok->f.kind = T_DOT;\n        }\n        break;\n\n    case '?':\n        if (_yychar == '?') {\n            yyinp();\n            if (_yychar == '(') {\n                yyinp();\n                tok->f.kind = T_LBRACKET;\n            } else if (_yychar == ')') {\n                yyinp();\n                tok->f.kind = T_RBRACKET;\n            } else if (_yychar == '<') {\n                yyinp();\n                tok->f.kind = T_LBRACE;\n            } else if (_yychar == '>') {\n                yyinp();\n                tok->f.kind = T_RBRACE;\n            }\n        } else {\n            tok->f.kind = T_QUESTION;\n        }\n        break;\n\n    case '+':\n        if (_yychar == '+') {\n            yyinp();\n            tok->f.kind = T_PLUS_PLUS;\n        } else if (_yychar == '=') {\n            yyinp();\n            tok->f.kind = T_PLUS_EQUAL;\n        } else {\n            tok->f.kind = T_PLUS;\n        }\n        break;\n\n    case '-':\n        if (_yychar == '-') {\n            yyinp();\n            tok->f.kind = T_MINUS_MINUS;\n        } else if (_yychar == '=') {\n            yyinp();\n            tok->f.kind = T_MINUS_EQUAL;\n        } else if (_yychar == '>') {\n            yyinp();\n            if (_yychar == '*') {\n                yyinp();\n                tok->f.kind = T_ARROW_STAR;\n            } else {\n                tok->f.kind = T_ARROW;\n            }\n        } else {\n            tok->f.kind = T_MINUS;\n        }\n        break;\n\n    case '*':\n        if (_yychar == '=') {\n            yyinp();\n            tok->f.kind = T_STAR_EQUAL;\n        } else {\n            tok->f.kind = T_STAR;\n        }\n        break;\n\n    case '/':\n        if (_yychar == '/') {\n            yyinp();\n\n            Kind commentType = T_CPP_COMMENT;\n\n            if (_yychar == '/' || _yychar == '!') {\n                yyinp();\n                commentType = T_CPP_DOXY_COMMENT;\n            }\n\n            scanCppComment(commentType);\n\n            if (! f._scanCommentTokens)\n                goto _Lagain;\n\n            tok->f.kind = commentType;\n\n        } else if (_yychar == '*') {\n            yyinp();\n\n            Kind commentKind = T_COMMENT;\n\n            if (_yychar == '*' || _yychar == '!') {\n                const char ch = _yychar;\n\n                yyinp();\n\n                if (ch == '*' && _yychar == '/')\n                    goto _Ldone;\n\n                if (_yychar == '<')\n                    yyinp();\n\n                if (! _yychar || std::isspace(_yychar))\n                    commentKind = T_DOXY_COMMENT;\n            }\n\n            while (_yychar) {\n                if (_yychar != '*') {\n                    yyinp();\n                } else {\n                    yyinp();\n                    if (_yychar == '/')\n                        break;\n                }\n            }\n\n        _Ldone:\n            if (_yychar)\n                yyinp();\n            else\n                s._tokenKind = commentKind;\n\n            if (! f._scanCommentTokens)\n                goto _Lagain;\n\n            tok->f.kind = commentKind;\n\n        } else if (_yychar == '=') {\n            yyinp();\n            tok->f.kind = T_SLASH_EQUAL;\n        } else {\n            tok->f.kind = T_SLASH;\n        }\n        break;\n\n    case '%':\n        if (_yychar == '=') {\n            yyinp();\n            tok->f.kind = T_PERCENT_EQUAL;\n        } else if (_yychar == '>') {\n            yyinp();\n            tok->f.kind = T_RBRACE;\n        } else if (_yychar == ':') {\n            yyinp();\n            tok->f.kind = T_POUND;\n        } else {\n            tok->f.kind = T_PERCENT;\n        }\n        break;\n\n    case '^':\n        if (_yychar == '=') {\n            yyinp();\n            tok->f.kind = T_CARET_EQUAL;\n        } else {\n            tok->f.kind = T_CARET;\n        }\n        break;\n\n    case '&':\n        if (_yychar == '&') {\n            yyinp();\n            tok->f.kind = T_AMPER_AMPER;\n        } else if (_yychar == '=') {\n            yyinp();\n            tok->f.kind = T_AMPER_EQUAL;\n        } else {\n            tok->f.kind = T_AMPER;\n        }\n        break;\n\n    case '|':\n        if (_yychar == '|') {\n            yyinp();\n            tok->f.kind = T_PIPE_PIPE;\n        } else if (_yychar == '=') {\n            yyinp();\n            tok->f.kind = T_PIPE_EQUAL;\n        } else {\n            tok->f.kind = T_PIPE;\n        }\n        break;\n\n    case '~':\n        if (_yychar == '=') {\n            yyinp();\n            tok->f.kind = T_TILDE_EQUAL;\n        } else {\n            tok->f.kind = T_TILDE;\n        }\n        break;\n\n    case '!':\n        if (_yychar == '=') {\n            yyinp();\n            tok->f.kind = T_EXCLAIM_EQUAL;\n        } else {\n            tok->f.kind = T_EXCLAIM;\n        }\n        break;\n\n    case '=':\n        if (_yychar == '=') {\n            yyinp();\n            tok->f.kind = T_EQUAL_EQUAL;\n        } else {\n            tok->f.kind = T_EQUAL;\n        }\n        break;\n\n    case '<':\n        if (f._scanAngleStringLiteralTokens) {\n            //const char *yytext = _currentChar;\n            while (_yychar && _yychar != '>')\n                yyinp();\n            //int yylen = _currentChar - yytext;\n            // ### CPP_CHECK(_yychar == '>');\n            if (_yychar == '>')\n                yyinp();\n//            if (control())\n//                tok->string = control()->stringLiteral(yytext, yylen);\n            tok->f.kind = T_ANGLE_STRING_LITERAL;\n        } else if (_yychar == '<') {\n            yyinp();\n            if (_yychar == '=') {\n                yyinp();\n                tok->f.kind = T_LESS_LESS_EQUAL;\n            } else\n                tok->f.kind = T_LESS_LESS;\n        } else if (_yychar == '=') {\n            yyinp();\n            tok->f.kind = T_LESS_EQUAL;\n        } else if (_yychar == ':') {\n            yyinp();\n            tok->f.kind = T_LBRACKET;\n        } else if (_yychar == '%') {\n            yyinp();\n            tok->f.kind = T_LBRACE;\n        } else {\n            tok->f.kind = T_LESS;\n        }\n        break;\n\n    case '>':\n        if (_yychar == '>') {\n            yyinp();\n            if (_yychar == '=') {\n                yyinp();\n                tok->f.kind = T_GREATER_GREATER_EQUAL;\n            } else\n                tok->f.kind = T_LESS_LESS;\n            tok->f.kind = T_GREATER_GREATER;\n        } else if (_yychar == '=') {\n            yyinp();\n            tok->f.kind = T_GREATER_EQUAL;\n        } else {\n            tok->f.kind = T_GREATER;\n        }\n        break;\n\n    case ',':\n        tok->f.kind = T_COMMA;\n        break;\n\n    default: {\n        if (ch == 'L' || ch == 'u' || ch == 'U' || ch == 'R') {\n            // Either a literal or still an identifier.\n            if (_yychar == '\"') {\n                yyinp();\n                if (ch == 'R')\n                    scanRawStringLiteral(tok);\n                else\n                    scanStringLiteral(tok, ch);\n            } else if (_yychar == '\\'') {\n                yyinp();\n                scanCharLiteral(tok, ch);\n            } else if (ch != 'R' && _yychar == 'R') {\n                yyinp();\n                if (_yychar == '\"') {\n                    yyinp();\n                    scanRawStringLiteral(tok, ch);\n                } else {\n                    scanIdentifier(tok, 1);\n                }\n            } else if (ch == 'u' && _yychar == '8') {\n                yyinp();\n                if (_yychar == '\"') {\n                    yyinp();\n                    scanStringLiteral(tok, '8');\n                } else if (_yychar == '\\'') {\n                    yyinp();\n                    scanCharLiteral(tok, '8');\n                } else if (_yychar == 'R') {\n                    yyinp();\n                    if (_yychar == '\"') {\n                        yyinp();\n                        scanRawStringLiteral(tok, '8');\n                    } else {\n                        scanIdentifier(tok, 2);\n                    }\n                } else {\n                    scanIdentifier(tok, 1);\n                }\n            } else {\n                scanIdentifier(tok);\n            }\n        } else if (std::isalpha(ch) || ch == '_' || ch == '$') {\n            scanIdentifier(tok);\n        } else if (std::isdigit(ch)) {\n            scanNumericLiteral(tok);\n        } else {\n            tok->f.kind = T_ERROR;\n        }\n        break;\n    } // default\n\n    } // switch\n}\n\nvoid Lexer::scanStringLiteral(Token *tok, unsigned char hint)\n{\n    if (hint == 'L')\n        tok->f.kind = T_WIDE_STRING_LITERAL;\n    else if (hint == 'U')\n        tok->f.kind = T_UTF32_STRING_LITERAL;\n    else if (hint == 'u')\n        tok->f.kind = T_UTF16_STRING_LITERAL;\n    else if (hint == '8')\n        tok->f.kind = T_UTF8_STRING_LITERAL;\n    else if (hint == '@')\n        tok->f.kind = T_AT_STRING_LITERAL;\n    else\n        tok->f.kind = T_STRING_LITERAL;\n\n    scanUntilQuote(tok, '\"');\n}\n\nvoid Lexer::scanGoRawStringLiteral(Token *tok, unsigned char /*hint*/)\n{\n    tok->f.kind = T_RAW_STRING_LITERAL;\n\n    scanUntilQuote(tok, '`',true);\n}\n\nvoid Lexer::scanRawStringLiteral(Token *tok, unsigned char hint)\n{\n    const char *yytext = _currentChar;\n\n    int delimLength = -1;\n    const char *closingDelimCandidate = 0;\n    while (_yychar) {\n        if (_yychar == '(' && delimLength == -1) {\n            delimLength = _currentChar - yytext;\n            yyinp();\n        } else if (_yychar == ')') {\n            yyinp();\n            if (delimLength == -1)\n                break;\n            closingDelimCandidate = _currentChar;\n        } else {\n            if (delimLength == -1) {\n                if (_yychar == '\\\\' || std::isspace(_yychar))\n                    break;\n                yyinp();\n            } else {\n                if (!closingDelimCandidate) {\n                    yyinp();\n                } else {\n                    if (_yychar == '\"') {\n                        if (delimLength == _currentChar - closingDelimCandidate) {\n                            // Got a matching closing delimiter.\n                            break;\n                        }\n                    }\n\n                    // Make sure this continues to be a valid candidate.\n                    if (_yychar != *(yytext + (_currentChar - closingDelimCandidate)))\n                        closingDelimCandidate = 0;\n\n                    yyinp();\n                }\n            }\n        }\n    }\n\n    //int yylen = _currentChar - yytext;\n\n    if (_yychar == '\"')\n        yyinp();\n\n//    if (control())\n//        tok->string = control()->stringLiteral(yytext, yylen);\n\n    if (hint == 'L')\n        tok->f.kind = T_RAW_WIDE_STRING_LITERAL;\n    else if (hint == 'U')\n        tok->f.kind = T_RAW_UTF32_STRING_LITERAL;\n    else if (hint == 'u')\n        tok->f.kind = T_RAW_UTF16_STRING_LITERAL;\n    else if (hint == '8')\n        tok->f.kind = T_RAW_UTF8_STRING_LITERAL;\n    else\n        tok->f.kind = T_RAW_STRING_LITERAL;\n}\n\nvoid Lexer::scanCharLiteral(Token *tok, unsigned char hint)\n{\n    if (hint == 'L')\n        tok->f.kind = T_WIDE_CHAR_LITERAL;\n    else if (hint == 'U')\n        tok->f.kind = T_UTF32_CHAR_LITERAL;\n    else if (hint == 'u')\n        tok->f.kind = T_UTF16_CHAR_LITERAL;\n    else\n        tok->f.kind = T_CHAR_LITERAL;\n\n    scanUntilQuote(tok, '\\'');\n}\n\nvoid Lexer::scanUntilQuote(Token *tok, unsigned char quote, bool containNewLines)\n{\n    CPP_CHECK(quote == '\"' || quote == '\\'' || quote == '`');\n\n    //const char *yytext = _currentChar;\n    if (containNewLines) {\n        while (_yychar\n               && _yychar != quote) {\n            yyinp();\n        }\n    } else {\n        while (_yychar\n               && _yychar != quote\n               && _yychar != '\\n') {\n            if (_yychar == '\\\\')\n                scanBackslash((Kind)tok->f.kind);\n            else\n                yyinp();\n        }\n    }\n    //int yylen = _currentChar - yytext;\n\n    if (_yychar == quote)\n        yyinp();\n    else if (quote == '`') {\n        s._tokenKind = T_RAW_STRING_LITERAL;\n    }\n//    if (control())\n//        tok->string = control()->stringLiteral(yytext, yylen);\n}\n\nvoid Lexer::scanNumericLiteral(Token *tok)\n{\n    //const char *yytext = _currentChar - 1;\n    while (_yychar) {\n        if (_yychar == 'e' || _yychar == 'E') {\n            yyinp();\n            if (_yychar == '-' || _yychar == '+') {\n                yyinp();\n                // ### CPP_CHECK(std::isdigit(_yychar));\n            }\n        } else if (_yychar == 'p' || _yychar == 'P'){\n            yyinp();\n            if (_yychar == '-') {\n                yyinp();\n            }\n        } else if (std::isalnum(_yychar) || _yychar == '.' || _yychar == '_') {\n            yyinp();\n        } else {\n            break;\n        }\n    }\n    //int yylen = _currentChar - yytext;\n\n    tok->f.kind = T_NUMERIC_LITERAL;\n\n//    if (control())\n//        tok->number = control()->numericLiteral(yytext, yylen);\n}\n\nvoid Lexer::scanIdentifier(Token *tok, unsigned extraProcessedChars)\n{\n    const char *yytext = _currentChar - 1 - extraProcessedChars;\n    while (std::isalnum(_yychar) || _yychar == '_' || _yychar == '$')\n        yyinp();\n    int yylen = _currentChar - yytext;\n    if (_languageFeatures.golangEnable) {\n        tok->f.kind = Lexer::golangKeywords(yytext,yylen);\n        if (tok->f.kind == T_IDENTIFIER) {\n            tok->f.kind = Lexer::golangTypes(yytext,yylen);\n            if (tok->f.kind == T_IDENTIFIER) {\n                tok->f.kind = Lexer::golangBuiltinFunc(yytext,yylen);\n                if (tok->f.kind == T_IDENTIFIER) {\n                    tok->f.kind = Lexer::golangPredecl(yytext,yylen);\n                }\n            }\n        }\n    } else {\n        if (f._scanKeywords)\n            tok->f.kind = classify(yytext, yylen, _languageFeatures);\n        else\n            tok->f.kind = T_IDENTIFIER;\n\n        if (tok->f.kind == T_IDENTIFIER) {\n            tok->f.kind = classifyOperator(yytext, yylen);\n        }\n//        if (control())\n//            tok->identifier = control()->identifier(yytext, yylen);\n    }\n}\n\nvoid Lexer::scanBackslash(Kind type)\n{\n    yyinp(); // skip '\\\\'\n    if (_yychar && !std::isspace(_yychar)) {\n        yyinp();\n        return;\n    }\n    while (_yychar != '\\n' && std::isspace(_yychar))\n        yyinp();\n    if (!_yychar) {\n        s._tokenKind = type;\n        s._newlineExpected = true;\n        return;\n    }\n    if (_yychar == '\\n') {\n        yyinp();\n        while (_yychar != '\\n' && std::isspace(_yychar))\n            yyinp();\n        if (!_yychar)\n            s._tokenKind = type;\n    }\n}\n\nvoid Lexer::scanCppComment(Kind type)\n{\n    while (_yychar && _yychar != '\\n') {\n        if (_yychar == '\\\\')\n            scanBackslash(type);\n        else if (_yychar)\n            yyinp();\n    }\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/Lexer.h",
    "content": "// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#ifndef CPLUSPLUS_LEXER_H\n#define CPLUSPLUS_LEXER_H\n\n#include \"Token.h\"\n\nnamespace CPlusPlus {\n\nclass Lexer\n{\n    Lexer(const Lexer &other);\n    void operator =(const Lexer &other);\n\npublic:\n    //Lexer(TranslationUnit *unit);\n    Lexer(const char *firstChar, const char *lastChar);\n    ~Lexer();\n\n    //Control *control() const { return _control; }\n    //TranslationUnit *translationUnit() const;\n\n    void scan(Token *tok);\n\n    inline void operator()(Token *tok)\n    { scan(tok); }\n\n    unsigned tokenOffset() const;\n    unsigned tokenLength() const;\n    const char *tokenBegin() const;\n    const char *tokenEnd() const;\n    unsigned currentLine() const;\n\n    bool scanCommentTokens() const;\n    void setScanCommentTokens(bool onoff);\n\n    bool scanKeywords() const;\n    void setScanKeywords(bool onoff);\n\n    bool scanAngleStringLiteralTokens() const;\n    void setScanAngleStringLiteralTokens(bool onoff);\n\n    void setStartWithNewline(bool enabled);\n\n    int state() const;\n    void setState(int state);\n\n    LanguageFeatures languageFeatures() const { return _languageFeatures; }\n    void setLanguageFeatures(LanguageFeatures features) { _languageFeatures = features; }\nprivate:\n    void scan_helper(Token *tok);\n    void setSource(const char *firstChar, const char *lastChar);\n    static int classify(const char *string, int length, LanguageFeatures features);\n    static int classifyObjCAtKeyword(const char *s, int n);\n    static int golangTypes(const char *s, int n);\n    static int golangKeywords(const char *s, int n);\n    static int golangPredecl(const char *s, int n);\n    static int golangBuiltinFunc(const char *s, int n);\n    static int classifyOperator(const char *string, int length);\n\n    void scanStringLiteral(Token *tok, unsigned char hint = 0);\n    void scanGoRawStringLiteral(Token *tok, unsigned char hint = 0);\n    void scanRawStringLiteral(Token *tok, unsigned char hint = 0);\n    void scanCharLiteral(Token *tok, unsigned char hint = 0);\n    void scanUntilQuote(Token *tok, unsigned char quote, bool containNewLines = false);\n    void scanNumericLiteral(Token *tok);\n    void scanIdentifier(Token *tok, unsigned extraProcessedChars = 0);\n    void scanBackslash(Kind type);\n    void scanCppComment(Kind type);\n\n    inline void yyinp()\n    {\n        _yychar = *++_currentChar;\n        if (_yychar == '\\n')\n            pushLineStartOffset();\n    }\n\n    void pushLineStartOffset();\n\nprivate:\n    struct Flags {\n        unsigned _scanCommentTokens: 1;\n        unsigned _scanKeywords: 1;\n        unsigned _scanAngleStringLiteralTokens: 1;\n    };\n\n    struct State {\n        unsigned char _tokenKind : 7;\n        unsigned char _newlineExpected : 1;\n    };\n\n    //TranslationUnit *_translationUnit;\n    //Control *_control;\n    const char *_firstChar;\n    const char *_currentChar;\n    const char *_lastChar;\n    const char *_tokenStart;\n    unsigned char _yychar;\n    union {\n        unsigned char _state;\n        State s;\n    };\n    union {\n        unsigned _flags;\n        Flags f;\n    };\n    unsigned _currentLine;\n    LanguageFeatures _languageFeatures;\n\n};\n\n} // namespace CPlusPlus\n\n\n#endif // CPLUSPLUS_LEXER_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/SimpleLexer.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#include \"SimpleLexer.h\"\n\n#include \"Lexer.h\"\n#include \"Token.h\"\n\n#include <QDebug>\n\nusing namespace CPlusPlus;\n\nSimpleLexer::SimpleLexer()\n    : _lastState(0),\n      _skipComments(false),\n      _endedJoined(false)\n{}\n\nSimpleLexer::~SimpleLexer()\n{ }\n\nbool SimpleLexer::skipComments() const\n{\n    return _skipComments;\n}\n\nvoid SimpleLexer::setSkipComments(bool skipComments)\n{\n    _skipComments = skipComments;\n}\n\nbool SimpleLexer::endedJoined() const\n{\n    return _endedJoined;\n}\n\nQList<Token> SimpleLexer::operator()(const QString &text, int state)\n{\n    QList<Token> tokens;\n\n    const QByteArray bytes = text.toLatin1();\n    const char *firstChar = bytes.constData();\n    const char *lastChar = firstChar + bytes.size();\n\n    Lexer lex(firstChar, lastChar);\n    lex.setLanguageFeatures(_languageFeatures);\n    lex.setStartWithNewline(true);\n\n    if (! _skipComments)\n        lex.setScanCommentTokens(true);\n\n    if (state != -1)\n        lex.setState(state & 0xff);\n\n    bool inPreproc = false;\n\n    for (;;) {\n        Token tk;\n        lex(&tk);\n        if (tk.is(T_EOF_SYMBOL)) {\n            _endedJoined = tk.joined();\n            break;\n        }\n\n        QStringRef spell = text.midRef(lex.tokenOffset(), lex.tokenLength());\n        lex.setScanAngleStringLiteralTokens(false);\n\n        if (tk.f.newline && tk.is(T_POUND))\n            inPreproc = true;\n        else if (inPreproc && tokens.size() == 1 && tk.is(T_IDENTIFIER) &&\n                 spell == QLatin1String(\"include\"))\n            lex.setScanAngleStringLiteralTokens(true);\n        else if (inPreproc && tokens.size() == 1 && tk.is(T_IDENTIFIER) &&\n                 spell == QLatin1String(\"include_next\"))\n            lex.setScanAngleStringLiteralTokens(true);\n        else if (_languageFeatures.objCEnabled\n                 && inPreproc && tokens.size() == 1 && tk.is(T_IDENTIFIER) &&\n                 spell == QLatin1String(\"import\"))\n            lex.setScanAngleStringLiteralTokens(true);\n\n        tokens.append(tk);\n    }\n\n    _lastState = lex.state();\n    return tokens;\n}\n\nint SimpleLexer::tokenAt(const QList<Token> &tokens, unsigned offset)\n{\n    for (int index = tokens.size() - 1; index >= 0; --index) {\n        const Token &tk = tokens.at(index);\n        if (tk.begin() <= offset && tk.end() >= offset)\n            return index;\n    }\n\n    return -1;\n}\n\nToken SimpleLexer::tokenAt(const QString &text,\n                           unsigned offset,\n                           int state,\n                           bool qtMocRunEnabled)\n{\n    // FIXME: Check default values.\n    LanguageFeatures features;\n    features.qtMocRunEnabled = qtMocRunEnabled;\n    features.qtEnabled = qtMocRunEnabled;\n    features.qtKeywordsEnabled = qtMocRunEnabled;\n    SimpleLexer tokenize;\n    tokenize.setLanguageFeatures(features);\n    const QList<Token> tokens = tokenize(text, state);\n    const int tokenIdx = tokenAt(tokens, offset);\n    return (tokenIdx == -1) ? Token() : tokens.at(tokenIdx);\n}\n\nint SimpleLexer::tokenBefore(const QList<Token> &tokens, unsigned offset)\n{\n    for (int index = tokens.size() - 1; index >= 0; --index) {\n        const Token &tk = tokens.at(index);\n        if (tk.begin() <= offset)\n            return index;\n    }\n\n    return -1;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/SimpleLexer.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n#ifndef CPLUSPLUS_SIMPLELEXER_H\n#define CPLUSPLUS_SIMPLELEXER_H\n\n#include \"Token.h\"\n\n#include <QString>\n#include <QList>\n\nnamespace CPlusPlus {\n\nclass SimpleLexer;\nclass Token;\n\nclass SimpleLexer\n{\npublic:\n    SimpleLexer();\n    ~SimpleLexer();\n\n    bool skipComments() const;\n    void setSkipComments(bool skipComments);\n\n    LanguageFeatures languageFeatures() const { return _languageFeatures; }\n    void setLanguageFeatures(LanguageFeatures features) { _languageFeatures = features; }\n\n    bool endedJoined() const;\n\n    QList<Token> operator()(const QString &text, int state = 0);\n\n    int state() const\n    { return _lastState; }\n\n    static int tokenAt(const QList<Token> &tokens, unsigned offset);\n    static Token tokenAt(const QString &text,\n                         unsigned offset,\n                         int state,\n                         bool qtMocRunEnabled = false);\n\n    static int tokenBefore(const QList<Token> &tokens, unsigned offset);\n\nprivate:\n    int _lastState;\n    LanguageFeatures _languageFeatures;\n    bool _skipComments: 1;\n    bool _endedJoined: 1;\n};\n\n} // namespace CPlusPlus\n\n#endif // CPLUSPLUS_SIMPLELEXER_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/Token.cpp",
    "content": "// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#include \"Token.h\"\n\nusing namespace CPlusPlus;\n\nconst char *token_names[] = {\n    (\"\"), (\"<error>\"),\n\n    (\"<C++ comment>\"), (\"<C++ doxy comment>\"),\n    (\"<comment>\"), (\"<doxy comment>\"),\n\n    (\"<identifier>\"),\n\n    (\"<numeric literal>\"),\n    (\"<char literal>\"), (\"<wide char literal>\"), (\"<utf16 char literal>\"), (\"<utf32 char literal>\"),\n    (\"<string literal>\"), (\"<wide string literal>\"), (\"<utf8 string literal>\"),\n    (\"<utf16 string literal>\"), (\"<utf32 string literal>\"),\n    (\"<raw string literal>\"), (\"<raw wide string literal>\"), (\"<raw utf8 string literal>\"),\n    (\"<raw utf16 string literal>\"), (\"<raw utf32 string literal>\"),\n    (\"<@string literal>\"), (\"<angle string literal>\"),\n\n    (\"&\"), (\"&&\"), (\"&=\"), (\"->\"), (\"->*\"), (\"^\"), (\"^=\"), (\":\"), (\":=\"), (\"::\"),\n    (\",\"), (\"/\"), (\"/=\"), (\".\"), (\"...\"), (\".*\"), (\"=\"), (\"==\"), (\"!\"),\n    (\"!=\"), (\">\"), (\">=\"), (\">>\"), (\">>=\"), (\"{\"), (\"[\"), (\"<\"), (\"<=\"),\n    (\"<<\"), (\"<<=\"), (\"(\"), (\"-\"), (\"-=\"), (\"--\"), (\"%\"), (\"%=\"), (\"|\"),\n    (\"|=\"), (\"||\"), (\"+\"), (\"+=\"), (\"++\"), (\"#\"), (\"##\"), (\"?\"), (\"}\"),\n    (\"]\"), (\")\"), (\";\"), (\"*\"), (\"*=\"), (\"~\"), (\"~=\"),\n\n    (\"alignas\"), (\"alignof\"), (\"asm\"), (\"auto\"), (\"bool\"), (\"break\"), (\"case\"), (\"catch\"),\n    (\"char\"), (\"char16_t\"), (\"char32_t\"),\n    (\"class\"), (\"const\"), (\"const_cast\"), (\"constexpr\"), (\"continue\"),\n    (\"decltype\"), (\"default\"),\n    (\"delete\"), (\"do\"), (\"double\"), (\"dynamic_cast\"), (\"else\"), (\"enum\"),\n    (\"explicit\"), (\"export\"), (\"extern\"), (\"false\"), (\"float\"), (\"for\"),\n    (\"friend\"), (\"goto\"), (\"if\"), (\"inline\"), (\"int\"), (\"long\"),\n    (\"mutable\"), (\"namespace\"), (\"new\"), (\"noexcept\"),\n    (\"nullptr\"), (\"operator\"), (\"private\"),\n    (\"protected\"), (\"public\"), (\"register\"), (\"reinterpret_cast\"),\n    (\"return\"), (\"short\"), (\"signed\"), (\"sizeof\"), (\"static\"),(\"static_assert\"),\n    (\"static_cast\"), (\"struct\"), (\"switch\"), (\"template\"), (\"this\"), (\"thread_local\"),\n    (\"throw\"), (\"true\"), (\"try\"), (\"typedef\"), (\"typeid\"), (\"typename\"),\n    (\"union\"), (\"unsigned\"), (\"using\"), (\"virtual\"), (\"void\"),\n    (\"volatile\"), (\"wchar_t\"), (\"while\"),\n\n    // gnu\n    (\"__attribute__\"), (\"__thread\"), (\"__typeof__\"),\n\n    // objc @keywords\n    (\"@catch\"), (\"@class\"), (\"@compatibility_alias\"), (\"@defs\"), (\"@dynamic\"),\n    (\"@encode\"), (\"@end\"), (\"@finally\"), (\"@implementation\"), (\"@interface\"),\n    (\"@not_keyword\"), (\"@optional\"), (\"@package\"), (\"@private\"), (\"@property\"),\n    (\"@protected\"), (\"@protocol\"), (\"@public\"), (\"@required\"), (\"@selector\"),\n    (\"@synchronized\"), (\"@synthesize\"), (\"@throw\"), (\"@try\"),\n\n    // Qt keywords\n    (\"emit\"), (\"SIGNAL\"), (\"SLOT\"), (\"Q_SIGNAL\"), (\"Q_SLOT\"), (\"signals\"), (\"slots\"),\n    (\"Q_FOREACH\"), (\"Q_D\"), (\"Q_Q\"),\n    (\"Q_INVOKABLE\"), (\"Q_PROPERTY\"), (\"T_Q_PRIVATE_PROPERTY\"),\n    (\"Q_INTERFACES\"), (\"Q_EMIT\"), (\"Q_ENUMS\"), (\"Q_FLAGS\"),\n    (\"Q_PRIVATE_SLOT\"), (\"Q_DECLARE_INTERFACE\"), (\"Q_OBJECT\"), (\"Q_GADGET\"),\n\n    // Go keywords\n    (\"go\"),(\"if\"),(\"map\"),(\"for\"),(\"var\"),(\"func\"),\n    (\"case\"),(\"chan\"),(\"else\"),(\"goto\"),(\"type\"),(\"break\"),\n    (\"defer\"),(\"const\"),(\"range\"),(\"select\"),(\"struct\"),(\"switch\"),\n    (\"import\"),(\"return\"),(\"default\"),(\"package\"),(\"continue\"),(\"interface\"),\n    (\"fallthrough\"),\n\n    // Go typed\n    (\"int\"),(\"bool\"),(\"int8\"),(\"byte\"),(\"rune\"),(\"uint\"),\n    (\"uint8\"),(\"int16\"),(\"int32\"),(\"int64\"),(\"error\"),(\"uint16\"),\n    (\"uint32\"),(\"uint64\"),(\"string\"),(\"float32\"),(\"float64\"),(\"uintptr\"),\n    (\"complex64\"),(\"complex128\"),\n    // Go predecl\n    (\"nil\"),(\"true\"),(\"iota\"),(\"false\"),\n    // Go builtin\n    (\"cap\"),(\"len\"),(\"new\"),(\"copy\"),(\"imag\"),(\"make\"),\n    (\"real\"),(\"close\"),(\"panic\"),(\"print\"),(\"append\"),(\"delete\"),\n    (\"complex\"),(\"println\"),(\"recover\"),\n};\n\nvoid Token::reset()\n{\n    flags = 0;\n    offset = 0;\n    ptr = 0;\n}\n\nconst char *Token::name(int kind)\n{ return token_names[kind]; }\n\nconst char *Token::spell() const\n{\n    switch (f.kind) {\n    case T_IDENTIFIER:\n        return \"\";//identifier->chars();\n\n    case T_NUMERIC_LITERAL:\n    case T_CHAR_LITERAL:\n    case T_WIDE_CHAR_LITERAL:\n    case T_UTF16_CHAR_LITERAL:\n    case T_UTF32_CHAR_LITERAL:\n    case T_STRING_LITERAL:\n    case T_WIDE_STRING_LITERAL:\n    case T_UTF8_STRING_LITERAL:\n    case T_UTF16_STRING_LITERAL:\n    case T_UTF32_STRING_LITERAL:\n    case T_RAW_STRING_LITERAL:\n    case T_RAW_WIDE_STRING_LITERAL:\n    case T_RAW_UTF8_STRING_LITERAL:\n    case T_RAW_UTF16_STRING_LITERAL:\n    case T_RAW_UTF32_STRING_LITERAL:\n    case T_AT_STRING_LITERAL:\n    case T_ANGLE_STRING_LITERAL:\n        return \"\";//literal->chars();\n\n    default:\n        return token_names[f.kind];\n    } // switch\n}\n\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/Token.h",
    "content": "// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#ifndef CPLUSPLUS_TOKEN_H\n#define CPLUSPLUS_TOKEN_H\n\nnamespace CPlusPlus {\n\nenum Kind {\n    T_EOF_SYMBOL = 0,\n    T_ERROR,\n\n    T_CPP_COMMENT,\n    T_CPP_DOXY_COMMENT,\n    T_COMMENT,\n    T_DOXY_COMMENT,\n    T_IDENTIFIER,\n\n    T_FIRST_LITERAL,\n    T_NUMERIC_LITERAL = T_FIRST_LITERAL,\n    T_FIRST_CHAR_LITERAL,\n    T_CHAR_LITERAL = T_FIRST_CHAR_LITERAL,\n    T_WIDE_CHAR_LITERAL,\n    T_UTF16_CHAR_LITERAL,\n    T_UTF32_CHAR_LITERAL,\n    T_LAST_CHAR_LITERAL = T_UTF32_CHAR_LITERAL,\n    T_FIRST_STRING_LITERAL,\n    T_STRING_LITERAL = T_FIRST_STRING_LITERAL,\n    T_WIDE_STRING_LITERAL,\n    T_UTF8_STRING_LITERAL,\n    T_UTF16_STRING_LITERAL,\n    T_UTF32_STRING_LITERAL,\n    T_RAW_STRING_LITERAL,\n    T_RAW_WIDE_STRING_LITERAL,\n    T_RAW_UTF8_STRING_LITERAL,\n    T_RAW_UTF16_STRING_LITERAL,\n    T_RAW_UTF32_STRING_LITERAL,\n    T_AT_STRING_LITERAL,\n    T_ANGLE_STRING_LITERAL,\n    T_LAST_STRING_LITERAL = T_ANGLE_STRING_LITERAL,\n    T_LAST_LITERAL = T_ANGLE_STRING_LITERAL,\n\n    T_FIRST_OPERATOR,\n    T_AMPER = T_FIRST_OPERATOR,\n    T_AMPER_AMPER,\n    T_AMPER_EQUAL,\n    T_ARROW,\n    T_ARROW_STAR,\n    T_CARET,\n    T_CARET_EQUAL,\n    T_COLON,\n    T_COLON_EQUAL,\n    T_COLON_COLON,\n    T_COMMA,\n    T_SLASH,\n    T_SLASH_EQUAL,\n    T_DOT,\n    T_DOT_DOT_DOT,\n    T_DOT_STAR,\n    T_EQUAL,\n    T_EQUAL_EQUAL,\n    T_EXCLAIM,\n    T_EXCLAIM_EQUAL,\n    T_GREATER,\n    T_GREATER_EQUAL,\n    T_GREATER_GREATER,\n    T_GREATER_GREATER_EQUAL,\n    T_LBRACE,\n    T_LBRACKET,\n    T_LESS,\n    T_LESS_EQUAL,\n    T_LESS_LESS,\n    T_LESS_LESS_EQUAL,\n    T_LPAREN,\n    T_MINUS,\n    T_MINUS_EQUAL,\n    T_MINUS_MINUS,\n    T_PERCENT,\n    T_PERCENT_EQUAL,\n    T_PIPE,\n    T_PIPE_EQUAL,\n    T_PIPE_PIPE,\n    T_PLUS,\n    T_PLUS_EQUAL,\n    T_PLUS_PLUS,\n    T_POUND,\n    T_POUND_POUND,\n    T_QUESTION,\n    T_RBRACE,\n    T_RBRACKET,\n    T_RPAREN,\n    T_SEMICOLON,\n    T_STAR,\n    T_STAR_EQUAL,\n    T_TILDE,\n    T_TILDE_EQUAL,\n    T_LAST_OPERATOR = T_TILDE_EQUAL,\n\n    T_FIRST_KEYWORD,\n    T_ALIGNAS = T_FIRST_KEYWORD,\n    T_ALIGNOF,\n    T_ASM,\n    T_AUTO,\n    T_BOOL,\n    T_BREAK,\n    T_CASE,\n    T_CATCH,\n    T_CHAR,\n    T_CHAR16_T,\n    T_CHAR32_T,\n    T_CLASS,\n    T_CONST,\n    T_CONST_CAST,\n    T_CONSTEXPR,\n    T_CONTINUE,\n    T_DECLTYPE,\n    T_DEFAULT,\n    T_DELETE,\n    T_DO,\n    T_DOUBLE,\n    T_DYNAMIC_CAST,\n    T_ELSE,\n    T_ENUM,\n    T_EXPLICIT,\n    T_EXPORT,\n    T_EXTERN,\n    T_FALSE,\n    T_FLOAT,\n    T_FOR,\n    T_FRIEND,\n    T_GOTO,\n    T_IF,\n    T_INLINE,\n    T_INT,\n    T_LONG,\n    T_MUTABLE,\n    T_NAMESPACE,\n    T_NEW,\n    T_NOEXCEPT,\n    T_NULLPTR,\n    T_OPERATOR,\n    T_PRIVATE,\n    T_PROTECTED,\n    T_PUBLIC,\n    T_REGISTER,\n    T_REINTERPRET_CAST,\n    T_RETURN,\n    T_SHORT,\n    T_SIGNED,\n    T_SIZEOF,\n    T_STATIC,\n    T_STATIC_ASSERT,\n    T_STATIC_CAST,\n    T_STRUCT,\n    T_SWITCH,\n    T_TEMPLATE,\n    T_THIS,\n    T_THREAD_LOCAL,\n    T_THROW,\n    T_TRUE,\n    T_TRY,\n    T_TYPEDEF,\n    T_TYPEID,\n    T_TYPENAME,\n    T_UNION,\n    T_UNSIGNED,\n    T_USING,\n    T_VIRTUAL,\n    T_VOID,\n    T_VOLATILE,\n    T_WCHAR_T,\n    T_WHILE,\n\n    T___ATTRIBUTE__,\n    T___THREAD,\n    T___TYPEOF__,\n\n    // obj c++ @ keywords\n    T_FIRST_OBJC_AT_KEYWORD,\n\n    T_AT_CATCH = T_FIRST_OBJC_AT_KEYWORD,\n    T_AT_CLASS,\n    T_AT_COMPATIBILITY_ALIAS,\n    T_AT_DEFS,\n    T_AT_DYNAMIC,\n    T_AT_ENCODE,\n    T_AT_END,\n    T_AT_FINALLY,\n    T_AT_IMPLEMENTATION,\n    T_AT_INTERFACE,\n    T_AT_NOT_KEYWORD,\n    T_AT_OPTIONAL,\n    T_AT_PACKAGE,\n    T_AT_PRIVATE,\n    T_AT_PROPERTY,\n    T_AT_PROTECTED,\n    T_AT_PROTOCOL,\n    T_AT_PUBLIC,\n    T_AT_REQUIRED,\n    T_AT_SELECTOR,\n    T_AT_SYNCHRONIZED,\n    T_AT_SYNTHESIZE,\n    T_AT_THROW,\n    T_AT_TRY,\n\n    T_LAST_OBJC_AT_KEYWORD = T_AT_TRY,\n\n    T_FIRST_QT_KEYWORD,\n\n    // Qt keywords\n    T_EMIT = T_FIRST_QT_KEYWORD,\n    T_SIGNAL,\n    T_SLOT,\n    T_Q_SIGNAL,\n    T_Q_SLOT,\n    T_Q_SIGNALS,\n    T_Q_SLOTS,\n    T_Q_FOREACH,\n    T_Q_D,\n    T_Q_Q,\n    T_Q_INVOKABLE,\n    T_Q_PROPERTY,\n    T_Q_PRIVATE_PROPERTY,\n    T_Q_INTERFACES,\n    T_Q_EMIT,\n    T_Q_ENUMS,\n    T_Q_FLAGS,\n    T_Q_PRIVATE_SLOT,\n    T_Q_DECLARE_INTERFACE,\n    T_Q_OBJECT,\n    T_Q_GADGET,\n    T_LAST_KEYWORD = T_Q_GADGET,\n\n    T_FIRST_GO_KEYWORD,\n    T_GO_GO = T_FIRST_GO_KEYWORD,\n    T_GO_IF,\n    T_GO_MAP,\n    T_GO_FOR,\n    T_GO_VAR,\n    T_GO_FUNC,\n    T_GO_CASE,\n    T_GO_CHAN,\n    T_GO_ELSE,\n    T_GO_GOTO,\n    T_GO_TYPE,\n    T_GO_BREAK,\n    T_GO_DEFER,\n    T_GO_CONST,\n    T_GO_RANGE,\n    T_GO_SELECT,\n    T_GO_STRUCT,\n    T_GO_SWITCH,\n    T_GO_IMPORT,\n    T_GO_RETURN,\n    T_GO_DEFAULT,\n    T_GO_PACKAGE,\n    T_GO_CONTINUE,\n    T_GO_INTERFACE,\n    T_GO_FALLTHROUGH,\n    T_LAST_GO_KEYWORD = T_GO_FALLTHROUGH,\n\n    T_FIRST_GO_TYPED,\n    T_GO_INT = T_FIRST_GO_TYPED,\n    T_GO_BOOL,\n    T_GO_INT8,\n    T_GO_BYTE,\n    T_GO_RUNE,\n    T_GO_UINT,\n    T_GO_UINT8,\n    T_GO_INT16,\n    T_GO_INT32,\n    T_GO_INT64,\n    T_GO_ERROR,\n    T_GO_UINT16,\n    T_GO_UINT32,\n    T_GO_UINT64,\n    T_GO_STRING,\n    T_GO_FLOAT32,\n    T_GO_FLOAT64,\n    T_GO_UINTPTR,\n    T_GO_ANY,\n    T_GO_COMPARABLE,\n    T_GO_COMPLEX64,\n    T_GO_COMPLEX128,\n    T_LAST_GO_TYPED = T_GO_COMPLEX128,\n\n    T_FIRST_GO_PREDECL,\n    T_GO_NIL = T_FIRST_GO_PREDECL,\n    T_GO_TRUE,\n    T_GO_IOTA,\n    T_GO_FALSE,\n    T_LAST_GO_PREDECL = T_GO_FALSE,\n\n    T_FIRST_GO_BUILTIN,\n    T_GO_CAP = T_FIRST_GO_BUILTIN,\n    T_GO_LEN,\n    T_GO_NEW,\n    T_GO_COPY,\n    T_GO_IMAG,\n    T_GO_MAKE,\n    T_GO_REAL,\n    T_GO_CLOSE,\n    T_GO_PANIC,\n    T_GO_PRINT,\n    T_GO_APPEND,\n    T_GO_DELETE,\n    T_GO_COMPLEX,\n    T_GO_PRINTLN,\n    T_GO_RECOVER,\n    T_LAST_GO_BUILTIN = T_GO_RECOVER,\n\n    // aliases\n    T_OR = T_PIPE_PIPE,\n    T_AND = T_AMPER_AMPER,\n    T_NOT = T_EXCLAIM,\n    T_XOR = T_CARET,\n    T_BITOR = T_PIPE,\n    T_COMPL = T_TILDE,\n    T_OR_EQ = T_PIPE_EQUAL,\n    T_AND_EQ = T_AMPER_EQUAL,\n    T_BITAND = T_AMPER,\n    T_NOT_EQ = T_EXCLAIM_EQUAL,\n    T_XOR_EQ = T_CARET_EQUAL,\n\n    T___ASM = T_ASM,\n    T___ASM__ = T_ASM,\n\n    T_TYPEOF = T___TYPEOF__,\n    T___TYPEOF = T___TYPEOF__,\n\n    T___DECLTYPE = T_DECLTYPE,\n\n    T___INLINE = T_INLINE,\n    T___INLINE__ = T_INLINE,\n\n    T___CONST = T_CONST,\n    T___CONST__ = T_CONST,\n\n    T___VOLATILE = T_VOLATILE,\n    T___VOLATILE__ = T_VOLATILE,\n\n    T___ATTRIBUTE = T___ATTRIBUTE__\n};\n\nclass Token\n{\npublic:\n    Token() : flags(0), offset(0), ptr(0) {}\n\n    inline bool is(unsigned k) const    { return f.kind == k; }\n    inline bool isNot(unsigned k) const { return f.kind != k; }\n    const char *spell() const;\n    void reset();\n\n    inline unsigned kind() const { return f.kind; }\n    inline bool newline() const { return f.newline; }\n    inline bool whitespace() const { return f.whitespace; }\n    inline bool joined() const { return f.joined; }\n    inline bool expanded() const { return f.expanded; }\n    inline bool generated() const { return f.generated; }\n    inline unsigned length() const { return f.length; }\n\n    inline unsigned begin() const\n    { return offset; }\n\n    inline unsigned end() const\n    { return offset + f.length; }\n\n    inline bool isLiteral() const\n    { return f.kind >= T_FIRST_LITERAL && f.kind <= T_LAST_LITERAL; }\n\n    inline bool isCharLiteral() const\n    { return f.kind >= T_FIRST_CHAR_LITERAL && f.kind <= T_LAST_CHAR_LITERAL; }\n\n    inline bool isStringLiteral() const\n    { return f.kind >= T_FIRST_STRING_LITERAL && f.kind <= T_LAST_STRING_LITERAL; }\n\n    inline bool isOperator() const\n    { return f.kind >= T_FIRST_OPERATOR && f.kind <= T_LAST_OPERATOR; }\n\n    inline bool isKeyword() const\n    { return f.kind >= T_FIRST_KEYWORD && f.kind < T_FIRST_QT_KEYWORD; }\n\n    inline bool isComment() const\n    { return f.kind == T_COMMENT || f.kind == T_DOXY_COMMENT ||\n      f.kind == T_CPP_COMMENT || f.kind == T_CPP_DOXY_COMMENT; }\n\n    inline bool isObjCAtKeyword() const\n    { return f.kind >= T_FIRST_OBJC_AT_KEYWORD && f.kind <= T_LAST_OBJC_AT_KEYWORD; }\n\n    inline bool isGoKeyword() const\n    { return f.kind >= T_FIRST_GO_KEYWORD && f.kind <= T_LAST_GO_KEYWORD; }\n\n    inline bool isGoTyped() const\n    { return f.kind >= T_FIRST_GO_TYPED && f.kind <= T_LAST_GO_TYPED; }\n\n    inline bool isGoPredecl() const\n    { return f.kind >= T_FIRST_GO_PREDECL && f.kind <= T_LAST_GO_PREDECL; }\n\n    inline bool isGoBuiltin() const\n    { return f.kind >= T_FIRST_GO_BUILTIN && f.kind <= T_LAST_GO_BUILTIN; }\n\n    static const char *name(int kind);\n\npublic:\n    struct Flags {\n        // The token kind.\n        unsigned kind       : 10;\n        // The token starts a new line.\n        unsigned newline    : 1;\n        // The token is preceded by whitespace(s).\n        unsigned whitespace : 1;\n        // The token is joined with the previous one.\n        unsigned joined     : 1;\n        // The token originates from a macro expansion.\n        unsigned expanded   : 1;\n        // The token originates from a macro expansion and does not correspond to an\n        // argument that went through substitution. Notice the example:\n        //\n        // #define FOO(a, b) a + b;\n        // FOO(1, 2)\n        //\n        // After preprocessing we would expect the following tokens: 1 + 2;\n        // Tokens '1', '+', '2', and ';' are all expanded. However only tokens '+' and ';'\n        // are generated.\n        unsigned generated  : 1;\n        // Unused...\n        unsigned pad        : 1;\n        // The token length.\n        unsigned length     : 16;\n    };\n    union {\n        unsigned flags;\n        Flags f;\n    };\n\n    unsigned offset;\n\n    union {\n        void *ptr;\n        //const Literal *literal;\n        //const NumericLiteral *number;\n        //const StringLiteral *string;\n        //const Identifier *identifier;\n        //unsigned close_brace;\n        //unsigned lineno;\n    };\n};\n\nstruct LanguageFeatures\n{\n    LanguageFeatures() : flags(0) {}\n\n    union {\n        unsigned int flags;\n        struct {\n            unsigned int qtEnabled : 1; // If Qt is used.\n            unsigned int qtMocRunEnabled : 1;\n            unsigned int qtKeywordsEnabled : 1; // If Qt is used but QT_NO_KEYWORDS defined\n            unsigned int cxx11Enabled : 1;\n            unsigned int objCEnabled : 1;\n            unsigned int golangEnable : 1;\n        };\n    };\n};\n\n} // namespace CPlusPlus\n\n\n#endif // CPLUSPLUS_TOKEN_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/cplusplus.pri",
    "content": "LIBS *= -l$$qtLibraryName(cplusplus)\n\n\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/cplusplus.pro",
    "content": "TARGET = cplusplus\nTEMPLATE = lib\nCONFIG += staticlib\n\ninclude (../../liteideutils.pri)\n\nHEADERS += \\\n    cppassert.h \\\n    Lexer.h \\\n    SimpleLexer.h \\\n    Token.h \\\n    BackwardsScanner.h \\\n    gopredecl.kwgen\n\nSOURCES += \\\n    gokeyword.cpp \\\n    gotypes.cpp \\\n    Keywords.cpp \\\n    Lexer.cpp \\\n    SimpleLexer.cpp \\\n    Token.cpp \\\n    BackwardsScanner.cpp \\\n    gopredecl.cpp \\\n    gobuiltin.cpp\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/cppassert.h",
    "content": "/****************************************************************************\n * **\n * ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n * ** Contact: http://www.qt-project.org/legal\n * **\n * ** This file is part of Qt Creator.\n * **\n * ** Commercial License Usage\n * ** Licensees holding valid commercial Qt licenses may use this file in\n * ** accordance with the commercial license agreement provided with the\n * ** Software or, alternatively, in accordance with the terms contained in\n * ** a written agreement between you and Digia.  For licensing terms and\n * ** conditions see http://qt.digia.com/licensing.  For further information\n * ** use the contact form at http://qt.digia.com/contact-us.\n * **\n * ** GNU Lesser General Public License Usage\n * ** Alternatively, this file may be used under the terms of the GNU Lesser\n * ** General Public License version 2.1 as published by the Free Software\n * ** Foundation and appearing in the file LICENSE.LGPL included in the\n * ** packaging of this file.  Please review the following information to\n * ** ensure the GNU Lesser General Public License version 2.1 requirements\n * ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n * **\n * ** In addition, as a special exception, Digia gives you certain additional\n * ** rights.  These rights are described in the Digia Qt LGPL Exception\n * ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n * **\n * ****************************************************************************/\n\n#ifndef SOFT_ASSERT_H\n#define SOFT_ASSERT_H\n\n#include <iostream>\n\n#define CPP_ASSERT_STRINGIFY_HELPER(x) #x\n#define CPP_ASSERT_STRINGIFY(x) CPP_ASSERT_STRINGIFY_HELPER(x)\n#define CPP_ASSERT_STRING(cond) std::cerr \\\n    << \"SOFT ASSERT: \\\"\" cond\"\\\" in file \" __FILE__ \", line \" CPP_ASSERT_STRINGIFY(__LINE__) \\\n    << std::endl;\n\n#define CPP_ASSERT(cond, action) if (cond) {} else { CPP_ASSERT_STRING(#cond); action; } do {} while (0)\n#define CPP_CHECK(cond) if (cond) {} else { CPP_ASSERT_STRING(#cond); } do {} while (0)\n\n#endif // SOFT_ASSERT_H\n\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/gobuiltin.cpp",
    "content": "\n#include \"Lexer.h\"\n#include \"Token.h\"\n\n\n/*\n  T_GO_CAP,\n  T_GO_LEN,\n  T_GO_NEW,\n  T_GO_COPY,\n  T_GO_IMAG,\n  T_GO_MAKE,\n  T_GO_REAL,\n  T_GO_CLOSE,\n  T_GO_PANIC,\n  T_GO_PRINT,\n  T_GO_APPEND,\n  T_GO_DELETE,\n  T_GO_COMPLEX,\n  T_GO_PRINTLN,\n  T_GO_RECOVER,\n*/\n\n/*\n(\"cap\"),(\"len\"),(\"new\"),(\"copy\"),(\"imag\"),(\"make\"),\n(\"real\"),(\"close\"),(\"panic\"),(\"print\"),(\"append\"),(\"delete\"),\n(\"complex\"),(\"println\"),(\"recover\"),\n*/\n\nnamespace CPlusPlus {\n\nstatic inline int golangBuiltinFunc3(const char *s) {\n  if (s[0] == 'c') {\n    if (s[1] == 'a') {\n      if (s[2] == 'p') {\n        return T_GO_CAP;\n      }\n    }\n  }\n  else if (s[0] == 'l') {\n    if (s[1] == 'e') {\n      if (s[2] == 'n') {\n        return T_GO_LEN;\n      }\n    }\n  }\n  else if (s[0] == 'n') {\n    if (s[1] == 'e') {\n      if (s[2] == 'w') {\n        return T_GO_NEW;\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangBuiltinFunc4(const char *s) {\n  if (s[0] == 'c') {\n    if (s[1] == 'o') {\n      if (s[2] == 'p') {\n        if (s[3] == 'y') {\n          return T_GO_COPY;\n        }\n      }\n    }\n  }\n  else if (s[0] == 'i') {\n    if (s[1] == 'm') {\n      if (s[2] == 'a') {\n        if (s[3] == 'g') {\n          return T_GO_IMAG;\n        }\n      }\n    }\n  }\n  else if (s[0] == 'm') {\n    if (s[1] == 'a') {\n      if (s[2] == 'k') {\n        if (s[3] == 'e') {\n          return T_GO_MAKE;\n        }\n      }\n    }\n  }\n  else if (s[0] == 'r') {\n    if (s[1] == 'e') {\n      if (s[2] == 'a') {\n        if (s[3] == 'l') {\n          return T_GO_REAL;\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangBuiltinFunc5(const char *s) {\n  if (s[0] == 'c') {\n    if (s[1] == 'l') {\n      if (s[2] == 'o') {\n        if (s[3] == 's') {\n          if (s[4] == 'e') {\n            return T_GO_CLOSE;\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'p') {\n    if (s[1] == 'a') {\n      if (s[2] == 'n') {\n        if (s[3] == 'i') {\n          if (s[4] == 'c') {\n            return T_GO_PANIC;\n          }\n        }\n      }\n    }\n    else if (s[1] == 'r') {\n      if (s[2] == 'i') {\n        if (s[3] == 'n') {\n          if (s[4] == 't') {\n            return T_GO_PRINT;\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangBuiltinFunc6(const char *s) {\n  if (s[0] == 'a') {\n    if (s[1] == 'p') {\n      if (s[2] == 'p') {\n        if (s[3] == 'e') {\n          if (s[4] == 'n') {\n            if (s[5] == 'd') {\n              return T_GO_APPEND;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'd') {\n    if (s[1] == 'e') {\n      if (s[2] == 'l') {\n        if (s[3] == 'e') {\n          if (s[4] == 't') {\n            if (s[5] == 'e') {\n              return T_GO_DELETE;\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangBuiltinFunc7(const char *s) {\n  if (s[0] == 'c') {\n    if (s[1] == 'o') {\n      if (s[2] == 'm') {\n        if (s[3] == 'p') {\n          if (s[4] == 'l') {\n            if (s[5] == 'e') {\n              if (s[6] == 'x') {\n                return T_GO_COMPLEX;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'p') {\n    if (s[1] == 'r') {\n      if (s[2] == 'i') {\n        if (s[3] == 'n') {\n          if (s[4] == 't') {\n            if (s[5] == 'l') {\n              if (s[6] == 'n') {\n                return T_GO_PRINTLN;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'r') {\n    if (s[1] == 'e') {\n      if (s[2] == 'c') {\n        if (s[3] == 'o') {\n          if (s[4] == 'v') {\n            if (s[5] == 'e') {\n              if (s[6] == 'r') {\n                return T_GO_RECOVER;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nint Lexer::golangBuiltinFunc(const char *s, int n) {\n  switch (n) {\n    case 3: return golangBuiltinFunc3(s);\n    case 4: return golangBuiltinFunc4(s);\n    case 5: return golangBuiltinFunc5(s);\n    case 6: return golangBuiltinFunc6(s);\n    case 7: return golangBuiltinFunc7(s);\n    default: return T_IDENTIFIER;\n  } // switch\n}\n\n\n} //namespace CPlusPlus\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/gobuiltin.kwgen",
    "content": "\n#include \"Lexer.h\"\n#include \"Token.h\"\n\n%token-prefix=T_GO_\n%toupper\n%no-enums\n%namespace=CPlusPlus\n%lexer-class=Lexer\n%classify_prefix=golangBuiltinFunc\n%identifier=T_IDENTIFIER\n\n%%\nappend\ndelete\ncap\nclose\ncomplex\ncopy\nimag\nlen\nmake\nnew\npanic\nprint\nprintln\nreal\nrecover\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/gogen.bat",
    "content": "kwgen < gotypes.kwgen > gotypes.cpp\nkwgen < gokeyword.kwgen > gokeyword.cpp\nkwgen < gobuiltin.kwgen > gobuiltin.cpp\nkwgen < gopredecl.kwgen > gopredecl.cpp"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/gokeyword.cpp",
    "content": "\n#include \"Lexer.h\"\n#include \"Token.h\"\n\n\n/*\n  T_GO_GO,\n  T_GO_IF,\n  T_GO_MAP,\n  T_GO_FOR,\n  T_GO_VAR,\n  T_GO_FUNC,\n  T_GO_CASE,\n  T_GO_CHAN,\n  T_GO_ELSE,\n  T_GO_GOTO,\n  T_GO_TYPE,\n  T_GO_BREAK,\n  T_GO_DEFER,\n  T_GO_CONST,\n  T_GO_RANGE,\n  T_GO_SELECT,\n  T_GO_STRUCT,\n  T_GO_SWITCH,\n  T_GO_IMPORT,\n  T_GO_RETURN,\n  T_GO_DEFAULT,\n  T_GO_PACKAGE,\n  T_GO_CONTINUE,\n  T_GO_INTERFACE,\n  T_GO_FALLTHROUGH,\n*/\n\n/*\n(\"go\"),(\"if\"),(\"map\"),(\"for\"),(\"var\"),(\"func\"),\n(\"case\"),(\"chan\"),(\"else\"),(\"goto\"),(\"type\"),(\"break\"),\n(\"defer\"),(\"const\"),(\"range\"),(\"select\"),(\"struct\"),(\"switch\"),\n(\"import\"),(\"return\"),(\"default\"),(\"package\"),(\"continue\"),(\"interface\"),\n(\"fallthrough\"),\n*/\n\nnamespace CPlusPlus {\n\nstatic inline int golangKeywords2(const char *s) {\n  if (s[0] == 'g') {\n    if (s[1] == 'o') {\n      return T_GO_GO;\n    }\n  }\n  else if (s[0] == 'i') {\n    if (s[1] == 'f') {\n      return T_GO_IF;\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangKeywords3(const char *s) {\n  if (s[0] == 'f') {\n    if (s[1] == 'o') {\n      if (s[2] == 'r') {\n        return T_GO_FOR;\n      }\n    }\n  }\n  else if (s[0] == 'm') {\n    if (s[1] == 'a') {\n      if (s[2] == 'p') {\n        return T_GO_MAP;\n      }\n    }\n  }\n  else if (s[0] == 'v') {\n    if (s[1] == 'a') {\n      if (s[2] == 'r') {\n        return T_GO_VAR;\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangKeywords4(const char *s) {\n  if (s[0] == 'c') {\n    if (s[1] == 'a') {\n      if (s[2] == 's') {\n        if (s[3] == 'e') {\n          return T_GO_CASE;\n        }\n      }\n    }\n    else if (s[1] == 'h') {\n      if (s[2] == 'a') {\n        if (s[3] == 'n') {\n          return T_GO_CHAN;\n        }\n      }\n    }\n  }\n  else if (s[0] == 'e') {\n    if (s[1] == 'l') {\n      if (s[2] == 's') {\n        if (s[3] == 'e') {\n          return T_GO_ELSE;\n        }\n      }\n    }\n  }\n  else if (s[0] == 'f') {\n    if (s[1] == 'u') {\n      if (s[2] == 'n') {\n        if (s[3] == 'c') {\n          return T_GO_FUNC;\n        }\n      }\n    }\n  }\n  else if (s[0] == 'g') {\n    if (s[1] == 'o') {\n      if (s[2] == 't') {\n        if (s[3] == 'o') {\n          return T_GO_GOTO;\n        }\n      }\n    }\n  }\n  else if (s[0] == 't') {\n    if (s[1] == 'y') {\n      if (s[2] == 'p') {\n        if (s[3] == 'e') {\n          return T_GO_TYPE;\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangKeywords5(const char *s) {\n  if (s[0] == 'b') {\n    if (s[1] == 'r') {\n      if (s[2] == 'e') {\n        if (s[3] == 'a') {\n          if (s[4] == 'k') {\n            return T_GO_BREAK;\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'c') {\n    if (s[1] == 'o') {\n      if (s[2] == 'n') {\n        if (s[3] == 's') {\n          if (s[4] == 't') {\n            return T_GO_CONST;\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'd') {\n    if (s[1] == 'e') {\n      if (s[2] == 'f') {\n        if (s[3] == 'e') {\n          if (s[4] == 'r') {\n            return T_GO_DEFER;\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'r') {\n    if (s[1] == 'a') {\n      if (s[2] == 'n') {\n        if (s[3] == 'g') {\n          if (s[4] == 'e') {\n            return T_GO_RANGE;\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangKeywords6(const char *s) {\n  if (s[0] == 'i') {\n    if (s[1] == 'm') {\n      if (s[2] == 'p') {\n        if (s[3] == 'o') {\n          if (s[4] == 'r') {\n            if (s[5] == 't') {\n              return T_GO_IMPORT;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'r') {\n    if (s[1] == 'e') {\n      if (s[2] == 't') {\n        if (s[3] == 'u') {\n          if (s[4] == 'r') {\n            if (s[5] == 'n') {\n              return T_GO_RETURN;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 's') {\n    if (s[1] == 'e') {\n      if (s[2] == 'l') {\n        if (s[3] == 'e') {\n          if (s[4] == 'c') {\n            if (s[5] == 't') {\n              return T_GO_SELECT;\n            }\n          }\n        }\n      }\n    }\n    else if (s[1] == 't') {\n      if (s[2] == 'r') {\n        if (s[3] == 'u') {\n          if (s[4] == 'c') {\n            if (s[5] == 't') {\n              return T_GO_STRUCT;\n            }\n          }\n        }\n      }\n    }\n    else if (s[1] == 'w') {\n      if (s[2] == 'i') {\n        if (s[3] == 't') {\n          if (s[4] == 'c') {\n            if (s[5] == 'h') {\n              return T_GO_SWITCH;\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangKeywords7(const char *s) {\n  if (s[0] == 'd') {\n    if (s[1] == 'e') {\n      if (s[2] == 'f') {\n        if (s[3] == 'a') {\n          if (s[4] == 'u') {\n            if (s[5] == 'l') {\n              if (s[6] == 't') {\n                return T_GO_DEFAULT;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'p') {\n    if (s[1] == 'a') {\n      if (s[2] == 'c') {\n        if (s[3] == 'k') {\n          if (s[4] == 'a') {\n            if (s[5] == 'g') {\n              if (s[6] == 'e') {\n                return T_GO_PACKAGE;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangKeywords8(const char *s) {\n  if (s[0] == 'c') {\n    if (s[1] == 'o') {\n      if (s[2] == 'n') {\n        if (s[3] == 't') {\n          if (s[4] == 'i') {\n            if (s[5] == 'n') {\n              if (s[6] == 'u') {\n                if (s[7] == 'e') {\n                  return T_GO_CONTINUE;\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangKeywords9(const char *s) {\n  if (s[0] == 'i') {\n    if (s[1] == 'n') {\n      if (s[2] == 't') {\n        if (s[3] == 'e') {\n          if (s[4] == 'r') {\n            if (s[5] == 'f') {\n              if (s[6] == 'a') {\n                if (s[7] == 'c') {\n                  if (s[8] == 'e') {\n                    return T_GO_INTERFACE;\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangKeywords11(const char *s) {\n  if (s[0] == 'f') {\n    if (s[1] == 'a') {\n      if (s[2] == 'l') {\n        if (s[3] == 'l') {\n          if (s[4] == 't') {\n            if (s[5] == 'h') {\n              if (s[6] == 'r') {\n                if (s[7] == 'o') {\n                  if (s[8] == 'u') {\n                    if (s[9] == 'g') {\n                      if (s[10] == 'h') {\n                        return T_GO_FALLTHROUGH;\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nint Lexer::golangKeywords(const char *s, int n) {\n  switch (n) {\n    case 2: return golangKeywords2(s);\n    case 3: return golangKeywords3(s);\n    case 4: return golangKeywords4(s);\n    case 5: return golangKeywords5(s);\n    case 6: return golangKeywords6(s);\n    case 7: return golangKeywords7(s);\n    case 8: return golangKeywords8(s);\n    case 9: return golangKeywords9(s);\n    case 11: return golangKeywords11(s);\n    default: return T_IDENTIFIER;\n  } // switch\n}\n\n\n} //namespace CPlusPlus\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/gokeyword.kwgen",
    "content": "\n#include \"Lexer.h\"\n#include \"Token.h\"\n\n%token-prefix=T_GO_\n%toupper\n%no-enums\n%namespace=CPlusPlus\n%lexer-class=Lexer\n%classify_prefix=golangKeywords\n%identifier=T_IDENTIFIER\n\n%%\nbreak\ndefault\nfunc\ninterface\nselect\ncase\ndefer\ngo\nmap\nstruct\nchan\nelse\ngoto\npackage\nswitch\nconst\nfallthrough\nif\nrange\ntype\ncontinue\nfor\nimport\nreturn\nvar\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/gopredecl.cpp",
    "content": "\n#include \"Lexer.h\"\n#include \"Token.h\"\n\n\n/*\n  T_GO_NIL,\n  T_GO_TRUE,\n  T_GO_IOTA,\n  T_GO_FALSE,\n*/\n\n/*\n(\"nil\"),(\"true\"),(\"iota\"),(\"false\"),\n*/\n\nnamespace CPlusPlus {\n\nstatic inline int golangPredecl3(const char *s) {\n  if (s[0] == 'n') {\n    if (s[1] == 'i') {\n      if (s[2] == 'l') {\n        return T_GO_NIL;\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangPredecl4(const char *s) {\n  if (s[0] == 'i') {\n    if (s[1] == 'o') {\n      if (s[2] == 't') {\n        if (s[3] == 'a') {\n          return T_GO_IOTA;\n        }\n      }\n    }\n  }\n  else if (s[0] == 't') {\n    if (s[1] == 'r') {\n      if (s[2] == 'u') {\n        if (s[3] == 'e') {\n          return T_GO_TRUE;\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangPredecl5(const char *s) {\n  if (s[0] == 'f') {\n    if (s[1] == 'a') {\n      if (s[2] == 'l') {\n        if (s[3] == 's') {\n          if (s[4] == 'e') {\n            return T_GO_FALSE;\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nint Lexer::golangPredecl(const char *s, int n) {\n  switch (n) {\n    case 3: return golangPredecl3(s);\n    case 4: return golangPredecl4(s);\n    case 5: return golangPredecl5(s);\n    default: return T_IDENTIFIER;\n  } // switch\n}\n\n\n} //namespace CPlusPlus\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/gopredecl.kwgen",
    "content": "\n#include \"Lexer.h\"\n#include \"Token.h\"\n\n%token-prefix=T_GO_\n%toupper\n%no-enums\n%namespace=CPlusPlus\n%lexer-class=Lexer\n%classify_prefix=golangPredecl\n%identifier=T_IDENTIFIER\n\n%%\ntrue\nfalse\nnil\niota"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/gotypes.cpp",
    "content": "\n#include \"Lexer.h\"\n#include \"Token.h\"\n\nnamespace CPlusPlus {\n\nstatic inline int golangTypes3(const char *s) {\n  if (s[0] == 'a') {\n    if (s[1] == 'n') {\n      if (s[2] == 'y') {\n        return T_GO_ANY;\n      }\n    }\n  }\n  else if (s[0] == 'i') {\n    if (s[1] == 'n') {\n      if (s[2] == 't') {\n        return T_GO_INT;\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangTypes4(const char *s) {\n  if (s[0] == 'b') {\n    if (s[1] == 'o') {\n      if (s[2] == 'o') {\n        if (s[3] == 'l') {\n          return T_GO_BOOL;\n        }\n      }\n    }\n    else if (s[1] == 'y') {\n      if (s[2] == 't') {\n        if (s[3] == 'e') {\n          return T_GO_BYTE;\n        }\n      }\n    }\n  }\n  else if (s[0] == 'i') {\n    if (s[1] == 'n') {\n      if (s[2] == 't') {\n        if (s[3] == '8') {\n          return T_GO_INT8;\n        }\n      }\n    }\n  }\n  else if (s[0] == 'r') {\n    if (s[1] == 'u') {\n      if (s[2] == 'n') {\n        if (s[3] == 'e') {\n          return T_GO_RUNE;\n        }\n      }\n    }\n  }\n  else if (s[0] == 'u') {\n    if (s[1] == 'i') {\n      if (s[2] == 'n') {\n        if (s[3] == 't') {\n          return T_GO_UINT;\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangTypes5(const char *s) {\n  if (s[0] == 'e') {\n    if (s[1] == 'r') {\n      if (s[2] == 'r') {\n        if (s[3] == 'o') {\n          if (s[4] == 'r') {\n            return T_GO_ERROR;\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'i') {\n    if (s[1] == 'n') {\n      if (s[2] == 't') {\n        if (s[3] == '1') {\n          if (s[4] == '6') {\n            return T_GO_INT16;\n          }\n        }\n        else if (s[3] == '3') {\n          if (s[4] == '2') {\n            return T_GO_INT32;\n          }\n        }\n        else if (s[3] == '6') {\n          if (s[4] == '4') {\n            return T_GO_INT64;\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'u') {\n    if (s[1] == 'i') {\n      if (s[2] == 'n') {\n        if (s[3] == 't') {\n          if (s[4] == '8') {\n            return T_GO_UINT8;\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangTypes6(const char *s) {\n  if (s[0] == 's') {\n    if (s[1] == 't') {\n      if (s[2] == 'r') {\n        if (s[3] == 'i') {\n          if (s[4] == 'n') {\n            if (s[5] == 'g') {\n              return T_GO_STRING;\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'u') {\n    if (s[1] == 'i') {\n      if (s[2] == 'n') {\n        if (s[3] == 't') {\n          if (s[4] == '1') {\n            if (s[5] == '6') {\n              return T_GO_UINT16;\n            }\n          }\n          else if (s[4] == '3') {\n            if (s[5] == '2') {\n              return T_GO_UINT32;\n            }\n          }\n          else if (s[4] == '6') {\n            if (s[5] == '4') {\n              return T_GO_UINT64;\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangTypes7(const char *s) {\n  if (s[0] == 'f') {\n    if (s[1] == 'l') {\n      if (s[2] == 'o') {\n        if (s[3] == 'a') {\n          if (s[4] == 't') {\n            if (s[5] == '3') {\n              if (s[6] == '2') {\n                return T_GO_FLOAT32;\n              }\n            }\n            else if (s[5] == '6') {\n              if (s[6] == '4') {\n                return T_GO_FLOAT64;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  else if (s[0] == 'u') {\n    if (s[1] == 'i') {\n      if (s[2] == 'n') {\n        if (s[3] == 't') {\n          if (s[4] == 'p') {\n            if (s[5] == 't') {\n              if (s[6] == 'r') {\n                return T_GO_UINTPTR;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangTypes9(const char *s) {\n  if (s[0] == 'c') {\n    if (s[1] == 'o') {\n      if (s[2] == 'm') {\n        if (s[3] == 'p') {\n          if (s[4] == 'l') {\n            if (s[5] == 'e') {\n              if (s[6] == 'x') {\n                if (s[7] == '6') {\n                  if (s[8] == '4') {\n                    return T_GO_COMPLEX64;\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nstatic inline int golangTypes10(const char *s) {\n  if (s[0] == 'c') {\n    if (s[1] == 'o') {\n      if (s[2] == 'm') {\n        if (s[3] == 'p') {\n          if (s[4] == 'a') {\n            if (s[5] == 'r') {\n              if (s[6] == 'a') {\n                if (s[7] == 'b') {\n                  if (s[8] == 'l') {\n                    if (s[9] == 'e') {\n                      return T_GO_COMPARABLE;\n                    }\n                  }\n                }\n              }\n            }\n          }\n          else if (s[4] == 'l') {\n            if (s[5] == 'e') {\n              if (s[6] == 'x') {\n                if (s[7] == '1') {\n                  if (s[8] == '2') {\n                    if (s[9] == '8') {\n                      return T_GO_COMPLEX128;\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n  return T_IDENTIFIER;\n}\n\nint Lexer::golangTypes(const char *s, int n) {\n  switch (n) {\n    case 3: return golangTypes3(s);\n    case 4: return golangTypes4(s);\n    case 5: return golangTypes5(s);\n    case 6: return golangTypes6(s);\n    case 7: return golangTypes7(s);\n    case 9: return golangTypes9(s);\n    case 10: return golangTypes10(s);\n    default: return T_IDENTIFIER;\n  } // switch\n}\n\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/cplusplus/gotypes.kwgen",
    "content": "\n#include \"Lexer.h\"\n#include \"Token.h\"\n\n%token-prefix=T_GO_\n%toupper\n%no-enums\n%namespace=CPlusPlus\n%lexer-class=Lexer\n%classify_prefix=golangTypes\n%identifier=T_IDENTIFIER\n\n%%\nbool\nuint8\nuint16\nuint32\nuint64\nint8\nint16\nint32\nint64\nfloat32\nfloat64\ncomplex64\ncomplex128\nbyte\nrune\nstring\nuint\nint\nuintptr\nerror\nany\ncomparable\n"
  },
  {
    "path": "liteidex/src/3rdparty/diff_match_patch/README.txt",
    "content": "Diff, Match and Patch Library\nhttp://code.google.com/p/google-diff-match-patch/\nNeil Fraser\n\nJava:\n* diff_match_patch.java\n* diff_match_patch_test.java\n\nJavaScript:\n* diff_match_patch.js\n  This file has been compressed using Google's internal JavaScript compressor.\n  External hackers are recommended to use http://dean.edwards.name/packer/\n* diff_match_patch_uncompressed.js\n* diff_match_patch_test.html\n\nPython:\n* diff_match_patch.py\n* diff_match_patch_test.py\n\nLua: (ported by Duncan Cross)\n* diff_match_patch.lua\n* diff_match_patch_test.lua\n\nC++: (ported by Mike Slemmer)\n* diff_match_patch.pro\n* diff_match_patch.h\n* diff_match_patch.cpp\n* diff_match_patch_test.h\n* diff_match_patch_test.cpp\n\nC#: (ported by Matthaeus G. Chajdas)\n* DiffMatchPatch.cs\n* DiffMatchPatchTest.cs\n\nDemos: (in JavaScript)\n* demo_diff.html\n* demo_match.html\n* demo_patch.html\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/diff_match_patch/diff_match_patch.cpp",
    "content": "/*\n * Copyright 2008 Google Inc. All Rights Reserved.\n * Author: fraser@google.com (Neil Fraser)\n * Author: mikeslemmer@gmail.com (Mike Slemmer)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Diff Match and Patch\n * http://code.google.com/p/google-diff-match-patch/\n */\n\n// Code known to compile and run with Qt 4.3.3 and Qt 4.4.0.\n#include <QtCore>\n#include \"liteapi/liteqt.h\"\n#include \"diff_match_patch.h\"\n\n\n//////////////////////////\n//\n// Diff Class\n//\n//////////////////////////\n\n\n/**\n * Constructor.  Initializes the diff with the provided values.\n * @param operation One of INSERT, DELETE or EQUAL\n * @param text The text being applied\n */\nDiff::Diff(Operation _operation, const QString &_text) :\n  operation(_operation), text(_text) {\n  // Construct a diff with the specified operation and text.\n}\n\nDiff::Diff() {\n}\n\n\nQString Diff::strOperation(Operation op) {\n  switch (op) {\n    case INSERT:\n      return \"INSERT\";\n    case DELETE:\n      return \"DELETE\";\n    case EQUAL:\n      return \"EQUAL\";\n  }\n  throw \"Invalid operation.\";\n}\n\n/**\n * Display a human-readable version of this Diff.\n * @return text version\n */\nQString Diff::toString() const {\n  QString prettyText = text;\n  // Replace linebreaks with Pilcrow signs.\n  prettyText.replace('\\n', L'\\u00b6');\n  //qDebug(qPrintable(QString(\"Diff(\") + strOperation(operation) + QString(\",\\\"\")\n  //    + prettyText + QString(\"\\\")\")));\n  return QString(\"Diff(\") + strOperation(operation) + QString(\",\\\"\")\n      + prettyText + QString(\"\\\")\");\n}\n\n/**\n * Is this Diff equivalent to another Diff?\n * @param d Another Diff to compare against\n * @return true or false\n */\nbool Diff::operator==(const Diff &d) const {\n  return (d.operation == this->operation) && (d.text == this->text);\n}\n\nbool Diff::operator!=(const Diff &d) const {\n  return !(operator == (d));\n}\n\n\n/////////////////////////////////////////////\n//\n// Patch Class\n//\n/////////////////////////////////////////////\n\n\n/**\n * Constructor.  Initializes with an empty list of diffs.\n */\nPatch::Patch() :\n  start1(0), start2(0),\n  length1(0), length2(0) {\n}\n\nbool Patch::isNull() const {\n  if (start1 == 0 && start2 == 0 && length1 == 0 && length2 == 0\n      && diffs.size() == 0) {\n    return true;\n  }\n  return false;\n}\n\n\n/**\n * Emmulate GNU diff's format.\n * Header: @@ -382,8 +481,9 @@\n * Indicies are printed as 1-based, not 0-based.\n * @return The GNU diff string\n */\nQString Patch::toString() {\n  QString coords1, coords2;\n  if (length1 == 0) {\n    coords1 = QString::number(start1) + QString(\",0\");\n  } else if (length1 == 1) {\n    coords1 = QString::number(start1 + 1);\n  } else {\n    coords1 = QString::number(start1 + 1) + QString(\",\")\n        + QString::number(length1);\n  }\n  if (length2 == 0) {\n    coords2 = QString::number(start2) + QString(\",0\");\n  } else if (length2 == 1) {\n    coords2 = QString::number(start2 + 1);\n  } else {\n    coords2 = QString::number(start2 + 1) + QString(\",\")\n        + QString::number(length2);\n  }\n  QString text;\n  text = QString(\"@@ -\") + coords1 + QString(\" +\") + coords2\n      + QString(\" @@\\n\");\n  // Escape the body of the patch with %xx notation.\n  foreach (Diff aDiff, diffs) {\n    switch (aDiff.operation) {\n      case INSERT:\n        text += QString('+');\n        break;\n      case DELETE:\n        text += QString('-');\n        break;\n      case EQUAL:\n        text += QString(' ');\n        break;\n    }\n    text += QString(QUrl::toPercentEncoding(aDiff.text, \" !~*'();/?:@&=+$,#\"))\n        + QString(\"\\n\");\n  }\n\n  return text;\n}\n\n\n/////////////////////////////////////////////\n//\n// diff_match_patch Class\n//\n/////////////////////////////////////////////\n\ndiff_match_patch::diff_match_patch() :\n  Diff_Timeout(1.0f),\n  Diff_EditCost(4),\n  Diff_DualThreshold(32),\n  Match_Threshold(0.5f),\n  Match_Distance(1000),\n  Patch_DeleteThreshold(0.5f),\n  Patch_Margin(4),\n  Match_MaxBits(32) {\n}\n\n\nQList<Diff> diff_match_patch::diff_main(const QString &text1,\n                                        const QString &text2) {\n  return diff_main(text1, text2, true);\n}\n\n\nQList<Diff> diff_match_patch::diff_main(const QString &text1, const QString &text2,\n                                        bool checklines) {\n  // Check for equality (speedup)\n  QList<Diff> diffs;\n  if (text1 == text2) {\n    diffs.append(Diff(EQUAL, text1));\n    return diffs;\n  }\n\n  // Trim off common prefix (speedup)\n  int commonlength = diff_commonPrefix(text1, text2);\n  const QString &commonprefix = text1.left(commonlength);\n  QString textChopped1 = text1.mid(commonlength);\n  QString textChopped2 = text2.mid(commonlength);\n\n  // Trim off common suffix (speedup)\n  commonlength = diff_commonSuffix(textChopped1, textChopped2);\n  const QString &commonsuffix = textChopped1.right(commonlength);\n  textChopped1 = textChopped1.left(textChopped1.length() - commonlength);\n  textChopped2 = textChopped2.left(textChopped2.length() - commonlength);\n\n  // Compute the diff on the middle block\n  diffs = diff_compute(textChopped1, textChopped2, checklines);\n\n  // Restore the prefix and suffix\n  if (!commonprefix.isEmpty()) {\n    diffs.prepend(Diff(EQUAL, commonprefix));\n  }\n  if (!commonsuffix.isEmpty()) {\n    diffs.append(Diff(EQUAL, commonsuffix));\n  }\n\n  diff_cleanupMerge(diffs);\n\n  return diffs;\n}\n\n\nQList<Diff> diff_match_patch::diff_compute(QString text1, QString text2, bool checklines) {\n  QList<Diff> diffs;\n\n  if (text1.isEmpty()) {\n    // Just add some text (speedup)\n    diffs.append(Diff(INSERT, text2));\n    return diffs;\n  }\n\n  if (text2.isEmpty()) {\n    // Just delete some text (speedup)\n    diffs.append(Diff(DELETE, text1));\n    return diffs;\n  }\n\n  {\n    const QString longtext = text1.length() > text2.length() ? text1 : text2;\n    const QString shorttext = text1.length() > text2.length() ? text2 : text1;\n    const int i = longtext.indexOf(shorttext);\n    if (i != -1) {\n      // Shorter text is inside the longer text (speedup)\n      const Operation op = (text1.length() > text2.length()) ? DELETE : INSERT;\n      diffs.append(Diff(op, longtext.left(i)));\n      diffs.append(Diff(EQUAL, shorttext));\n      diffs.append(Diff(op, longtext.mid(i + shorttext.length())));\n      return diffs;\n    }\n    // Garbage collect longtext and shorttext by scoping out.\n  }\n\n  // Check to see if the problem can be split in two.\n  const QStringList hm = diff_halfMatch(text1, text2);\n  if (hm.count() > 0) {\n    // A half-match was found, sort out the return data.\n    const QString text1_a = hm[0];\n    const QString text1_b = hm[1];\n    const QString text2_a = hm[2];\n    const QString text2_b = hm[3];\n    const QString mid_common = hm[4];\n    // Send both pairs off for separate processing.\n    const QList<Diff> diffs_a = diff_main(text1_a, text2_a, checklines);\n    const QList<Diff> diffs_b = diff_main(text1_b, text2_b, checklines);\n    // Merge the results.\n    diffs = diffs_a;\n    diffs.append(Diff(EQUAL, mid_common));\n    diffs += diffs_b;\n    return diffs;\n  }\n\n  // Perform a real diff.\n  if (checklines && (text1.length() < 100 || text2.length() < 100)) {\n   // checklines = false;  // Too trivial for the overhead.\n  }\n  QStringList linearray;\n  if (checklines) {\n    // Scan the text on a line-by-line basis first.\n    const QList<QVariant> b = diff_linesToChars(text1, text2);\n    text1 = b[0].toString();\n    text2 = b[1].toString();\n    linearray = b[2].toStringList();\n  }\n\n  diffs = diff_map(text1, text2);\n  if (diffs.isEmpty()) {\n    // No acceptable result.\n    diffs = QList<Diff>();\n    diffs.append(Diff(DELETE, text1));\n    diffs.append(Diff(INSERT, text2));\n  }\n\n  if (checklines) {\n    // Convert the diff back to original text.\n    diff_charsToLines(diffs, linearray);\n    // Eliminate freak matches (e.g. blank lines)\n    diff_cleanupSemantic(diffs);\n\n    // Rediff any replacement blocks, this time character-by-character.\n    // Add a dummy entry at the end.\n    diffs.append(Diff(EQUAL, \"\"));\n    int count_delete = 0;\n    int count_insert = 0;\n    QString text_delete = \"\";\n    QString text_insert = \"\";\n\n    QMutableListIterator<Diff> pointer(diffs);\n    Diff *thisDiff = pointer.hasNext() ? &pointer.next() : NULL;\n    while (thisDiff != NULL) {\n      switch (thisDiff->operation) {\n        case INSERT:\n          count_insert++;\n          text_insert += thisDiff->text;\n          break;\n        case DELETE:\n          count_delete++;\n          text_delete += thisDiff->text;\n          break;\n        case EQUAL:\n          // Upon reaching an equality, check for prior redundancies.\n          if (count_delete >= 1 && count_insert >= 1) {\n            // Delete the offending records and add the merged ones.\n            pointer.previous();\n            for (int j = 0; j < count_delete + count_insert; j++) {\n              pointer.previous();\n              pointer.remove();\n            }\n            foreach(Diff newDiff, diff_main(text_delete, text_insert, false)) {\n              pointer.insert(newDiff);\n            }\n          }\n          count_insert = 0;\n          count_delete = 0;\n          text_delete = \"\";\n          text_insert = \"\";\n          break;\n      }\n      thisDiff = pointer.hasNext() ? &pointer.next() : NULL;\n    }\n    diffs.removeLast();  // Remove the dummy entry at the end.\n  }\n  return diffs;\n}\n\n\nQList<QVariant> diff_match_patch::diff_linesToChars(const QString &text1,\n                                                    const QString &text2) {\n  QStringList lineArray;\n  QMap<QString, int> lineHash;\n  // e.g. linearray[4] == \"Hello\\n\"\n  // e.g. linehash.get(\"Hello\\n\") == 4\n\n  // \"\\x00\" is a valid character, but various debuggers don't like it.\n  // So we'll insert a junk entry to avoid generating a null character.\n  lineArray.append(\"\");\n\n  const QString chars1 = diff_linesToCharsMunge(text1, lineArray, lineHash);\n  const QString chars2 = diff_linesToCharsMunge(text2, lineArray, lineHash);\n\n  QList<QVariant> listRet;\n  listRet.append(QVariant::fromValue(chars1));\n  listRet.append(QVariant::fromValue(chars2));\n  listRet.append(QVariant::fromValue(lineArray));\n  return listRet;\n}\n\n\nQString diff_match_patch::diff_linesToCharsMunge(const QString &text,\n                                                 QStringList &lineArray,\n                                                 QMap<QString, int> &lineHash) {\n  int lineStart = 0;\n  int lineEnd = -1;\n  QString line;\n  QString chars;\n  // Walk the text, pulling out a substring for each line.\n  // text.split('\\n') would would temporarily double our memory footprint.\n  // Modifying text would create many large strings to garbage collect.\n  while (lineEnd < text.length() - 1) {\n    lineEnd = text.indexOf('\\n', lineStart);\n    if (lineEnd == -1) {\n      lineEnd = text.length() - 1;\n    }\n    line = text.mid(lineStart, lineEnd + 1 - lineStart);\n    lineStart = lineEnd + 1;\n\n    if (lineHash.contains(line)) {\n      chars += QChar(static_cast<ushort>(lineHash.value(line)));\n    } else {\n      lineArray.append(line);\n      lineHash.insert(line, lineArray.size() - 1);\n      chars += QChar(static_cast<ushort>(lineArray.size() - 1));\n    }\n  }\n  return chars;\n}\n\n\n\nvoid diff_match_patch::diff_charsToLines(QList<Diff> &diffs,\n                                         const QStringList &lineArray) {\n  // Qt has no mutable foreach construct.\n  QMutableListIterator<Diff> i(diffs);\n  while (i.hasNext()) {\n    Diff &diff = i.next();\n    QString text;\n    for (int y = 0; y < diff.text.length(); y++) {\n      text += lineArray.value(static_cast<ushort>(diff.text[y].unicode()));\n    }\n    diff.text = text;\n  }\n}\n\n\nQList<Diff> diff_match_patch::diff_map(const QString &text1,\n                                       const QString &text2) {\n  QTime ms_end = QTime::currentTime()\n      .addMSecs(static_cast<int> (Diff_Timeout * 1000));\n  // Cache the text lengths to prevent multiple calls.\n  const int text1_length = text1.length();\n  const int text2_length = text2.length();\n  const int max_d = text1_length + text2_length - 1;\n  const bool doubleEnd = Diff_DualThreshold * 2 < max_d;\n  QList<QSet<QPair<int, int> > > v_map1;\n  QList<QSet<QPair<int, int> > > v_map2;\n  QMap<int, int> v1;\n  QMap<int, int> v2;\n  v1.insert(1, 0);\n  v2.insert(1, 0);\n  int x, y;\n  QPair<int, int> footstep;  // Used to track overlapping paths.\n  QMap<QPair<int, int>, int> footsteps;\n  bool done = false;\n  // If the total number of characters is odd, then the front path will\n  // collide with the reverse path.\n  const bool front = ((text1_length + text2_length) % 2 == 1);\n  for (int d = 0; d < max_d; d++) {\n    // Bail out if timeout reached.\n    if (Diff_Timeout > 0 && QTime::currentTime() > ms_end) {\n      return QList<Diff>();\n    }\n\n    // Walk the front path one step.\n    v_map1.append(QSet<QPair<int, int> >());  // Adds at index 'd'.\n    for (int k = -d; k <= d; k += 2) {\n      if (k == -d || (k != d && v1.value(k - 1) < v1.value(k + 1))) {\n        x = v1.value(k + 1);\n      } else {\n        x = v1.value(k - 1) + 1;\n      }\n      y = x - k;\n      if (doubleEnd) {\n        footstep = QPair<int, int>(x, y);\n        if (front && (footsteps.contains(footstep))) {\n          done = true;\n        }\n        if (!front) {\n          footsteps.insert(footstep, d);\n        }\n      }\n      while (!done && x < text1_length && y < text2_length\n          && text1[x] == text2[y]) {\n        x++;\n        y++;\n        if (doubleEnd) {\n          footstep = QPair<int, int>(x, y);\n          if (front && (footsteps.contains(footstep))) {\n            done = true;\n          }\n          if (!front) {\n            footsteps.insert(footstep, d);\n          }\n        }\n      }\n      v1.insert(k, x);\n      v_map1[d].insert(QPair<int, int>(x, y));\n      if (x == text1_length && y == text2_length) {\n        // Reached the end in single-path mode.\n        return diff_path1(v_map1, text1, text2);\n      } else if (done) {\n        // Front path ran over reverse path.\n        v_map2 = v_map2.mid(0, footsteps.value(footstep) + 1);\n        QList<Diff> a = diff_path1(v_map1, text1.left(x), text2.left(y));\n        a += diff_path2(v_map2, text1.mid(x), text2.mid(y));\n        return a;\n      }\n    }\n\n    if (doubleEnd) {\n      // Walk the reverse path one step.\n      v_map2.append(QSet<QPair<int, int> >());  // Adds at index 'd'.\n      for (int k = -d; k <= d; k += 2) {\n        if (k == -d || (k != d && v2.value(k - 1) < v2.value(k + 1))) {\n          x = v2.value(k + 1);\n        } else {\n          x = v2.value(k - 1) + 1;\n        }\n        y = x - k;\n\n        footstep = QPair<int, int>(text1_length - x, text2_length - y);\n        if (!front && (footsteps.contains(footstep))) {\n          done = true;\n        }\n        if (front) {\n          footsteps.insert(footstep, d);\n        }\n        while (!done && x < text1_length && y < text2_length\n            && text1[text1_length - x - 1] == text2[text2_length - y - 1]) {\n          x++;\n          y++;\n          footstep = QPair<int, int>(text1_length - x, text2_length - y);\n          if (!front && (footsteps.contains(footstep))) {\n            done = true;\n          }\n          if (front) {\n            footsteps.insert(footstep, d);\n          }\n        }\n        v2.insert(k, x);\n        v_map2[d].insert(QPair<int, int>(x, y));\n        if (done) {\n          // Reverse path ran over front path.\n          v_map1 = v_map1.mid(0, footsteps.value(footstep) + 1);\n          QList<Diff> a\n              = diff_path1(v_map1, text1.left(text1_length - x),\n              text2.left(text2_length - y));\n          a += diff_path2(v_map2, text1.right(x), text2.right(y));\n          return a;\n        }\n      }\n    }\n  }\n  // Number of diffs equals number of characters, no commonality at all.\n  return QList<Diff>();\n}\n\n\nQList<Diff> diff_match_patch::diff_path1(\n    const QList<QSet<QPair<int, int> > > &v_map,\n    const QString &text1, const QString &text2) {\n  QList<Diff> path;\n  int x = text1.length();\n  int y = text2.length();\n  Operation last_op = EQUAL;\n  bool first = true;\n  for (int d = v_map.size() - 2; d >= 0; d--) {\n    while (true) {\n      if (v_map.value(d).contains(QPair<int, int>(x - 1, y))) {\n        x--;\n        if (last_op == DELETE) {\n          path.front().text = text1[x] + path.front().text;\n        } else {\n          path.prepend(Diff(DELETE, text1.mid(x, 1)));\n        }\n        last_op = DELETE;\n        break;\n      } else if (v_map.value(d).contains(QPair<int, int>(x, y - 1))) {\n        y--;\n        if (last_op == INSERT) {\n          path.front().text = text2[y] + path.front().text;\n        } else {\n          path.prepend(Diff(INSERT, text2.mid(y, 1)));\n        }\n        last_op = INSERT;\n        break;\n      } else {\n        x--;\n        y--;\n        if (text1[x] != text2[y]) {\n          throw \"No diagonal.  Can't happen. (diff_path1)\";\n        }\n        if (last_op == EQUAL && !first) {\n          path.front().text = text1[x] + path.front().text;\n        } else {\n          path.prepend(Diff(EQUAL, text1.mid(x, 1)));\n        }\n        last_op = EQUAL;\n      }\n      first = false;\n    }\n  }\n  return path;\n}\n\n\nQList<Diff> diff_match_patch::diff_path2(\n    const QList<QSet<QPair<int, int> > > &v_map,\n    const QString &text1, const QString &text2) {\n  QList<Diff> path;\n  int x = text1.length();\n  int y = text2.length();\n  Operation last_op = EQUAL;\n  bool first = true;\n  for (int d = v_map.size() - 2; d >= 0; d--) {\n    while (true) {\n      if (v_map.value(d).contains(QPair<int, int>(x - 1, y))) {\n        x--;\n        if (last_op == DELETE) {\n          path.back().text += text1[text1.length() - x - 1];\n        } else {\n          path.append(Diff(DELETE, text1.mid(text1.length() - x - 1, 1)));\n        }\n        last_op = DELETE;\n        break;\n      } else if (v_map.value(d).contains(QPair<int, int>(x, y - 1))) {\n        y--;\n        if (last_op == INSERT) {\n          path.back().text += text2[text2.length() - y - 1];\n        } else {\n          path.append(Diff(INSERT, text2.mid(text2.length() - y - 1, 1)));\n        }\n        last_op = INSERT;\n        break;\n      } else {\n        x--;\n        y--;\n\n        if (text1[text1.length() - x - 1] != text2[text2.length() - y - 1]) {\n          throw \"No diagonal.  Can't happen. (diff_path2)\";\n        }\n        if (last_op == EQUAL && !first) {\n          path.back().text += text1[text1.length() - x - 1];\n        } else {\n          path.append(Diff(EQUAL, text1.mid(text1.length() - x - 1, 1)));\n        }\n        last_op = EQUAL;\n      }\n    }\n    first = false;\n  }\n  return path;\n}\n\n\nint diff_match_patch::diff_commonPrefix(const QString &text1,\n                                        const QString &text2) {\n  // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n  const int n = qMin(text1.length(), text2.length());\n  for (int i = 0; i < n; i++) {\n    if (text1[i] != text2[i]) {\n      return i;\n    }\n  }\n  return n;\n}\n\n\nint diff_match_patch::diff_commonSuffix(const QString &text1,\n                                        const QString &text2) {\n  // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n  const int text1_length = text1.length();\n  const int text2_length = text2.length();\n  const int n = qMin(text1_length, text2_length);\n  for (int i = 1; i <= n; i++) {\n    if (text1[text1_length - i] != text2[text2_length - i]) {\n      return i - 1;\n    }\n  }\n  return n;\n}\n\n\nQStringList diff_match_patch::diff_halfMatch(const QString &text1,\n                                             const QString &text2) {\n  const QString longtext = text1.length() > text2.length() ? text1 : text2;\n  const QString shorttext = text1.length() > text2.length() ? text2 : text1;\n  if (longtext.length() < 10 || shorttext.length() < 1) {\n    return QStringList();  // Pointless.\n  }\n\n  // First check if the second quarter is the seed for a half-match.\n  const QStringList hm1 = diff_halfMatchI(longtext, shorttext,\n      (longtext.length() + 3) / 4);\n  // Check again based on the third quarter.\n  const QStringList hm2 = diff_halfMatchI(longtext, shorttext,\n      (longtext.length() + 1) / 2);\n  QStringList hm;\n  if (hm1.isEmpty() && hm2.isEmpty()) {\n    return QStringList();\n  } else if (hm2.isEmpty()) {\n    hm = hm1;\n  } else if (hm1.isEmpty()) {\n    hm = hm2;\n  } else {\n    // Both matched.  Select the longest.\n    hm = hm1[4].length() > hm2[4].length() ? hm1 : hm2;\n  }\n\n  // A half-match was found, sort out the return data.\n  if (text1.length() > text2.length()) {\n    return hm;\n  } else {\n    QStringList listRet;\n    listRet << hm[2] << hm[3] << hm[0] << hm[1] << hm[4];\n    return listRet;\n  }\n}\n\n\nQStringList diff_match_patch::diff_halfMatchI(const QString &longtext,\n                                              const QString &shorttext,\n                                              int i) {\n  // Start with a 1/4 length substring at position i as a seed.\n  const QString seed = longtext.mid(i, longtext.length() / 4);\n  int j = -1;\n  QString best_common;\n  QString best_longtext_a, best_longtext_b;\n  QString best_shorttext_a, best_shorttext_b;\n  while ((j = shorttext.indexOf(seed, j + 1)) != -1) {\n    const int prefixLength = diff_commonPrefix(longtext.mid(i),\n        shorttext.mid(j));\n    const int suffixLength = diff_commonSuffix(longtext.left(i),\n        shorttext.left(j));\n    if (best_common.length() < suffixLength + prefixLength) {\n      best_common = shorttext.mid(j - suffixLength, suffixLength)\n          + shorttext.mid(j, prefixLength);\n      best_longtext_a = longtext.left(i - suffixLength);\n      best_longtext_b = longtext.mid(i + prefixLength);\n      best_shorttext_a = shorttext.left(j - suffixLength);\n      best_shorttext_b = shorttext.mid(j + prefixLength);\n    }\n  }\n  if (best_common.length() >= longtext.length() / 2) {\n    QStringList listRet;\n    listRet << best_longtext_a << best_longtext_b << best_shorttext_a\n        << best_shorttext_b << best_common;\n    return listRet;\n  } else {\n    return QStringList();\n  }\n}\n\n\nvoid diff_match_patch::diff_cleanupSemantic(QList<Diff> &diffs) {\n  if (diffs.isEmpty()) {\n    return;\n  }\n  bool changes = false;\n  QStack<Diff> equalities;  // Stack of equalities.\n  QString lastequality;  // Always equal to equalities.lastElement().text\n  QMutableListIterator<Diff> pointer(diffs);\n  // Number of characters that changed prior to the equality.\n  int length_changes1 = 0;\n  // Number of characters that changed after the equality.\n  int length_changes2 = 0;\n  Diff *thisDiff = pointer.hasNext() ? &pointer.next() : NULL;\n  while (thisDiff != NULL) {\n    if (thisDiff->operation == EQUAL) {\n      // equality found\n      equalities.push(*thisDiff);\n      length_changes1 = length_changes2;\n      length_changes2 = 0;\n      lastequality = thisDiff->text;\n    } else {\n      // an insertion or deletion\n      length_changes2 += thisDiff->text.length();\n      if (!lastequality.isNull() && (lastequality.length() <= length_changes1)\n          && (lastequality.length() <= length_changes2)) {\n        // System.out.println(\"Splitting: '\" + lastequality + \"'\");\n        // Walk back to offending equality.\n        while (*thisDiff != equalities.top()) {\n          thisDiff = &pointer.previous();\n        }\n        pointer.next();\n\n        // Replace equality with a delete.\n        pointer.setValue(Diff(DELETE, lastequality));\n        // Insert a corresponding an insert.\n        pointer.insert(Diff(INSERT, lastequality));\n\n        equalities.pop();  // Throw away the equality we just deleted.\n        if (!equalities.isEmpty()) {\n          // Throw away the previous equality (it needs to be reevaluated).\n          equalities.pop();\n        }\n        if (equalities.isEmpty()) {\n          // There are no previous equalities, walk back to the start.\n          while (pointer.hasPrevious()) {\n            pointer.previous();\n          }\n        } else {\n          // There is a safe equality we can fall back to.\n          thisDiff = &equalities.top();\n          while (*thisDiff != pointer.previous()) {\n            // Intentionally empty loop.\n          }\n        }\n\n        length_changes1 = 0;  // Reset the counters.\n        length_changes2 = 0;\n        lastequality = QString();\n        changes = true;\n      }\n    }\n    thisDiff = pointer.hasNext() ? &pointer.next() : NULL;\n  }\n\n  if (changes) {\n    diff_cleanupMerge(diffs);\n  }\n  diff_cleanupSemanticLossless(diffs);\n}\n\n\nvoid diff_match_patch::diff_cleanupSemanticLossless(QList<Diff> &diffs) {\n  QString equality1, edit, equality2;\n  QString commonString;\n  int commonOffset;\n  int score, bestScore;\n  QString bestEquality1, bestEdit, bestEquality2;\n  // Create a new iterator at the start.\n  QMutableListIterator<Diff> pointer(diffs);\n  Diff *prevDiff = pointer.hasNext() ? &pointer.next() : NULL;\n  Diff *thisDiff = pointer.hasNext() ? &pointer.next() : NULL;\n  Diff *nextDiff = pointer.hasNext() ? &pointer.next() : NULL;\n\n  // Intentionally ignore the first and last element (don't need checking).\n  while (nextDiff != NULL) {\n    if (prevDiff->operation == EQUAL &&\n      nextDiff->operation == EQUAL) {\n        // This is a single edit surrounded by equalities.\n        equality1 = prevDiff->text;\n        edit = thisDiff->text;\n        equality2 = nextDiff->text;\n\n        // First, shift the edit as far left as possible.\n        commonOffset = diff_commonSuffix(equality1, edit);\n        if (commonOffset != 0) {\n          commonString = edit.mid(edit.length() - commonOffset);\n          equality1 = equality1.left(equality1.length() - commonOffset);\n          edit = commonString + edit.left(edit.length() - commonOffset);\n          equality2 = commonString + equality2;\n        }\n\n        // Second, step character by character right, looking for the best fit.\n        bestEquality1 = equality1;\n        bestEdit = edit;\n        bestEquality2 = equality2;\n        bestScore = diff_cleanupSemanticScore(equality1, edit)\n            + diff_cleanupSemanticScore(edit, equality2);\n        while (!edit.isEmpty() && !equality2.isEmpty()\n            && edit[0] == equality2[0]) {\n          equality1 += edit[0];\n          edit = edit.mid(1) + equality2[0];\n          equality2 = equality2.mid(1);\n          score = diff_cleanupSemanticScore(equality1, edit)\n              + diff_cleanupSemanticScore(edit, equality2);\n          // The >= encourages trailing rather than leading whitespace on edits.\n          if (score >= bestScore) {\n            bestScore = score;\n            bestEquality1 = equality1;\n            bestEdit = edit;\n            bestEquality2 = equality2;\n          }\n        }\n\n        if (prevDiff->text != bestEquality1) {\n          // We have an improvement, save it back to the diff.\n          if (!bestEquality1.isEmpty()) {\n            prevDiff->text = bestEquality1;\n          } else {\n            pointer.previous();  // Walk past nextDiff.\n            pointer.previous();  // Walk past thisDiff.\n            pointer.previous();  // Walk past prevDiff.\n            pointer.remove();  // Delete prevDiff.\n            pointer.next();  // Walk past thisDiff.\n            pointer.next();  // Walk past nextDiff.\n          }\n          thisDiff->text = bestEdit;\n          if (!bestEquality2.isEmpty()) {\n            nextDiff->text = bestEquality2;\n          } else {\n            pointer.remove(); // Delete nextDiff.\n            nextDiff = thisDiff;\n            thisDiff = prevDiff;\n          }\n        }\n    }\n    prevDiff = thisDiff;\n    thisDiff = nextDiff;\n    nextDiff = pointer.hasNext() ? &pointer.next() : NULL;\n  }\n}\n\n\nint diff_match_patch::diff_cleanupSemanticScore(const QString &one,\n                                                const QString &two) {\n  if (one.isEmpty() || two.isEmpty()) {\n    // Edges are the best.\n    return 10;\n  }\n\n  // Each port of this function behaves slightly differently due to\n  // subtle differences in each language's definition of things like\n  // 'whitespace'.  Since this function's purpose is largely cosmetic,\n  // the choice has been made to use each language's native features\n  // rather than force total conformity.\n  int score = 0;\n  // One point for non-alphanumeric.\n  if (!one[one.length() - 1].isLetterOrNumber()\n      || !two[0].isLetterOrNumber()) {\n    score++;\n    // Two points for whitespace.\n    if (one[one.length() - 1].isSpace() || two[0].isSpace()) {\n      score++;\n      // Three points for line breaks.\n      if (one[one.length() - 1].category() == QChar::Other_Control\n          || two[0].category() == QChar::Other_Control) {\n        score++;\n        // Four points for blank lines.\n        QRegExp blankLineEnd(\"\\\\n\\\\r?\\\\n$\");\n        QRegExp blankLineStart(\"^\\\\r?\\\\n\\\\r?\\\\n\");\n        if (blankLineEnd.indexIn(one) != -1\n            || blankLineStart.indexIn(two) != -1) {\n          score++;\n        }\n      }\n    }\n  }\n  return score;\n}\n\n\nvoid diff_match_patch::diff_cleanupEfficiency(QList<Diff> &diffs) {\n  if (diffs.isEmpty()) {\n    return;\n  }\n  bool changes = false;\n  QStack<Diff> equalities;  // Stack of equalities.\n  QString lastequality;  // Always equal to equalities.lastElement().text\n  QMutableListIterator<Diff> pointer(diffs);\n  // Is there an insertion operation before the last equality.\n  bool pre_ins = false;\n  // Is there a deletion operation before the last equality.\n  bool pre_del = false;\n  // Is there an insertion operation after the last equality.\n  bool post_ins = false;\n  // Is there a deletion operation after the last equality.\n  bool post_del = false;\n\n  Diff *thisDiff = pointer.hasNext() ? &pointer.next() : NULL;\n  Diff *safeDiff = thisDiff;\n\n  while (thisDiff != NULL) {\n    if (thisDiff->operation == EQUAL) {\n      // equality found\n      if (thisDiff->text.length() < Diff_EditCost && (post_ins || post_del)) {\n        // Candidate found.\n        equalities.push(*thisDiff);\n        pre_ins = post_ins;\n        pre_del = post_del;\n        lastequality = thisDiff->text;\n      } else {\n        // Not a candidate, and can never become one.\n        equalities.clear();\n        lastequality = QString();\n        safeDiff = thisDiff;\n      }\n      post_ins = post_del = false;\n    } else {\n      // an insertion or deletion\n      if (thisDiff->operation == DELETE) {\n        post_del = true;\n      } else {\n        post_ins = true;\n      }\n      /*\n      * Five types to be split:\n      * <ins>A</ins><del>B</del>XY<ins>C</ins><del>D</del>\n      * <ins>A</ins>X<ins>C</ins><del>D</del>\n      * <ins>A</ins><del>B</del>X<ins>C</ins>\n      * <ins>A</del>X<ins>C</ins><del>D</del>\n      * <ins>A</ins><del>B</del>X<del>C</del>\n      */\n      if (!lastequality.isNull()\n          && ((pre_ins && pre_del && post_ins && post_del)\n          || ((lastequality.length() < Diff_EditCost / 2)\n          && ((pre_ins ? 1 : 0) + (pre_del ? 1 : 0)\n          + (post_ins ? 1 : 0) + (post_del ? 1 : 0)) == 3))) {\n        // System.out.println(\"Splitting: '\" + lastequality + \"'\");\n        // Walk back to offending equality.\n        while (*thisDiff != equalities.top()) {\n          thisDiff = &pointer.previous();\n        }\n        pointer.next();\n\n        // Replace equality with a delete.\n        pointer.setValue(Diff(DELETE, lastequality));\n        // Insert a corresponding an insert.\n        pointer.insert(Diff(INSERT, lastequality));\n        thisDiff = &pointer.previous();\n        pointer.next();\n\n        equalities.pop();  // Throw away the equality we just deleted.\n        lastequality = QString();\n        if (pre_ins && pre_del) {\n          // No changes made which could affect previous entry, keep going.\n          post_ins = post_del = true;\n          equalities.clear();\n          safeDiff = thisDiff;\n        } else {\n          if (!equalities.isEmpty()) {\n            // Throw away the previous equality (it needs to be reevaluated).\n            equalities.pop();\n          }\n          if (equalities.isEmpty()) {\n            // There are no previous questionable equalities,\n            // walk back to the last known safe diff.\n            thisDiff = safeDiff;\n          } else {\n            // There is an equality we can fall back to.\n            thisDiff = &equalities.top();\n          }\n          while (*thisDiff != pointer.previous()) {\n            // Intentionally empty loop.\n          }\n          post_ins = post_del = false;\n        }\n\n        changes = true;\n      }\n    }\n    thisDiff = pointer.hasNext() ? &pointer.next() : NULL;\n  }\n\n  if (changes) {\n    diff_cleanupMerge(diffs);\n  }\n}\n\n\nvoid diff_match_patch::diff_cleanupMerge(QList<Diff> &diffs) {\n  diffs.append(Diff(EQUAL, \"\"));  // Add a dummy entry at the end.\n  QMutableListIterator<Diff> pointer(diffs);\n  int count_delete = 0;\n  int count_insert = 0;\n  QString text_delete = \"\";\n  QString text_insert = \"\";\n  Diff *thisDiff = pointer.hasNext() ? &pointer.next() : NULL;\n  Diff *prevEqual = NULL;\n  int commonlength;\n  while (thisDiff != NULL) {\n    switch (thisDiff->operation) {\n      case INSERT:\n        count_insert++;\n        text_insert += thisDiff->text;\n        prevEqual = NULL;\n        break;\n      case DELETE:\n        count_delete++;\n        text_delete += thisDiff->text;\n        prevEqual = NULL;\n        break;\n      case EQUAL:\n        if (count_delete != 0 || count_insert != 0) {\n          // Delete the offending records.\n          pointer.previous();  // Reverse direction.\n          while (count_delete-- > 0) {\n            pointer.previous();\n            pointer.remove();\n          }\n          while (count_insert-- > 0) {\n            pointer.previous();\n            pointer.remove();\n          }\n          if (count_delete != 0 && count_insert != 0) {\n            // Factor out any common prefixies.\n            commonlength = diff_commonPrefix(text_insert, text_delete);\n            if (commonlength != 0) {\n              if (pointer.hasPrevious()) {\n                thisDiff = &pointer.previous();\n                if (thisDiff->operation != EQUAL) {\n                  throw \"Previous diff should have been an equality.\";\n                }\n                thisDiff->text += text_insert.left(commonlength);\n                pointer.next();\n              } else {\n                pointer.insert(Diff(EQUAL, text_insert.left(commonlength)));\n              }\n              text_insert = text_insert.mid(commonlength);\n              text_delete = text_delete.mid(commonlength);\n            }\n            // Factor out any common suffixies.\n            commonlength = diff_commonSuffix(text_insert, text_delete);\n            if (commonlength != 0) {\n              thisDiff = &pointer.next();\n              thisDiff->text = text_insert.mid(text_insert.length()\n                  - commonlength) + thisDiff->text;\n              text_insert = text_insert.left(text_insert.length()\n                  - commonlength);\n              text_delete = text_delete.left(text_delete.length()\n                  - commonlength);\n              pointer.previous();\n            }\n          }\n          // Insert the merged records.\n          if (!text_delete.isEmpty()) {\n            pointer.insert(Diff(DELETE, text_delete));\n          }\n          if (!text_insert.isEmpty()) {\n            pointer.insert(Diff(INSERT, text_insert));\n          }\n          // Step forward to the equality.\n          thisDiff = pointer.hasNext() ? &pointer.next() : NULL;\n\n        } else if (prevEqual != NULL) {\n          // Merge this equality with the previous one.\n          prevEqual->text += thisDiff->text;\n          pointer.remove();\n          thisDiff = &pointer.previous();\n          pointer.next();  // Forward direction\n        }\n        count_insert = 0;\n        count_delete = 0;\n        text_delete = \"\";\n        text_insert = \"\";\n        prevEqual = thisDiff;\n        break;\n      }\n      thisDiff = pointer.hasNext() ? &pointer.next() : NULL;\n  }\n  // System.out.println(diff);\n  if (diffs.back().text.isEmpty()) {\n    diffs.removeLast();  // Remove the dummy entry at the end.\n  }\n\n  /*\n  * Second pass: look for single edits surrounded on both sides by equalities\n  * which can be shifted sideways to eliminate an equality.\n  * e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC\n  */\n  bool changes = false;\n  // Create a new iterator at the start.\n  // (As opposed to walking the current one back.)\n  pointer.toFront();\n  Diff *prevDiff = pointer.hasNext() ? &pointer.next() : NULL;\n  thisDiff = pointer.hasNext() ? &pointer.next() : NULL;\n  Diff *nextDiff = pointer.hasNext() ? &pointer.next() : NULL;\n\n  // Intentionally ignore the first and last element (don't need checking).\n  while (nextDiff != NULL) {\n    if (prevDiff->operation == EQUAL &&\n      nextDiff->operation == EQUAL) {\n        // This is a single edit surrounded by equalities.\n        if (thisDiff->text.endsWith(prevDiff->text)) {\n          // Shift the edit over the previous equality.\n          thisDiff->text = prevDiff->text\n              + thisDiff->text.left(thisDiff->text.length()\n              - prevDiff->text.length());\n          nextDiff->text = prevDiff->text + nextDiff->text;\n          pointer.previous();  // Walk past nextDiff.\n          pointer.previous();  // Walk past thisDiff.\n          pointer.previous();  // Walk past prevDiff.\n          pointer.remove();  // Delete prevDiff.\n          pointer.next();  // Walk past thisDiff.\n          thisDiff = &pointer.next();  // Walk past nextDiff.\n          nextDiff = pointer.hasNext() ? &pointer.next() : NULL;\n          changes = true;\n        } else if (thisDiff->text.startsWith(nextDiff->text)) {\n          // Shift the edit over the next equality.\n          prevDiff->text += nextDiff->text;\n          thisDiff->text = thisDiff->text.mid(nextDiff->text.length())\n              + nextDiff->text;\n          pointer.remove(); // Delete nextDiff.\n          nextDiff = pointer.hasNext() ? &pointer.next() : NULL;\n          changes = true;\n        }\n    }\n    prevDiff = thisDiff;\n    thisDiff = nextDiff;\n    nextDiff = pointer.hasNext() ? &pointer.next() : NULL;\n  }\n  // If shifts were made, the diff needs reordering and another shift sweep.\n  if (changes) {\n    diff_cleanupMerge(diffs);\n  }\n}\n\n\nint diff_match_patch::diff_xIndex(const QList<Diff> &diffs, int loc) {\n  int chars1 = 0;\n  int chars2 = 0;\n  int last_chars1 = 0;\n  int last_chars2 = 0;\n  Diff lastDiff;\n  foreach(Diff aDiff, diffs) {\n    if (aDiff.operation != INSERT) {\n      // Equality or deletion.\n      chars1 += aDiff.text.length();\n    }\n    if (aDiff.operation != DELETE) {\n      // Equality or insertion.\n      chars2 += aDiff.text.length();\n    }\n    if (chars1 > loc) {\n      // Overshot the location.\n      lastDiff = aDiff;\n      break;\n    }\n    last_chars1 = chars1;\n    last_chars2 = chars2;\n  }\n  if (lastDiff.operation == DELETE) {\n    // The location was deleted.\n    return last_chars2;\n  }\n  // Add the remaining character length.\n  return last_chars2 + (loc - last_chars1);\n}\n\n\nQString diff_match_patch::diff_prettyHtml(const QList<Diff> &diffs) {\n  QString html;\n  QString text;\n  int i = 0;\n  foreach(Diff aDiff, diffs) {\n    text = aDiff.text;\n    text.replace(\"&\", \"&amp;\").replace(\"<\", \"&lt;\")\n        .replace(\">\", \"&gt;\").replace(\"\\n\", \"&para;<BR>\");\n    switch (aDiff.operation) {\n      case INSERT:\n        html += QString(\"<INS STYLE=\\\"background:#E6FFE6;\\\" TITLE=\\\"i=\")\n            + QString::number(i) + QString(\"\\\">\") + text + QString(\"</INS>\");\n        break;\n      case DELETE:\n        html += QString(\"<DEL STYLE=\\\"background:#FFE6E6;\\\" TITLE=\\\"i=\")\n            + QString::number(i) + QString(\"\\\">\") + text + QString(\"</DEL>\");\n        break;\n      case EQUAL:\n        html += QString(\"<SPAN TITLE=\\\"i=\") + QString::number(i)\n            + QString(\"\\\">\") + text + QString(\"</SPAN>\");\n        break;\n    }\n    if (aDiff.operation != DELETE) {\n      i += aDiff.text.length();\n    }\n  }\n  return html;\n}\n\n\nQString diff_match_patch::diff_text1(const QList<Diff> &diffs) {\n  QString text;\n  foreach(Diff aDiff, diffs) {\n    if (aDiff.operation != INSERT) {\n      text += aDiff.text;\n    }\n  }\n  return text;\n}\n\n\nQString diff_match_patch::diff_text2(const QList<Diff> &diffs) {\n  QString text;\n  foreach(Diff aDiff, diffs) {\n    if (aDiff.operation != DELETE) {\n      text += aDiff.text;\n    }\n  }\n  return text;\n}\n\n\nint diff_match_patch::diff_levenshtein(const QList<Diff> &diffs) {\n  int levenshtein = 0;\n  int insertions = 0;\n  int deletions = 0;\n  foreach(Diff aDiff, diffs) {\n    switch (aDiff.operation) {\n      case INSERT:\n        insertions += aDiff.text.length();\n        break;\n      case DELETE:\n        deletions += aDiff.text.length();\n        break;\n      case EQUAL:\n        // A deletion and an insertion is one substitution.\n        levenshtein += qMax(insertions, deletions);\n        insertions = 0;\n        deletions = 0;\n        break;\n    }\n  }\n  levenshtein += qMax(insertions, deletions);\n  return levenshtein;\n}\n\n\nQString diff_match_patch::diff_toDelta(const QList<Diff> &diffs) {\n  QString text;\n  foreach(Diff aDiff, diffs) {\n    switch (aDiff.operation) {\n      case INSERT: {\n        QString encoded = QString(QUrl::toPercentEncoding(aDiff.text,\n            \" !~*'();/?:@&=+$,#\"));\n        text += QString(\"+\") + encoded + QString(\"\\t\");\n        break;\n      }\n      case DELETE:\n        text += QString(\"-\") + QString::number(aDiff.text.length())\n            + QString(\"\\t\");\n        break;\n      case EQUAL:\n        text += QString(\"=\") + QString::number(aDiff.text.length())\n            + QString(\"\\t\");\n        break;\n    }\n  }\n  if (!text.isEmpty()) {\n    // Strip off trailing tab character.\n    text = text.left(text.length() - 1);\n  }\n  return text;\n}\n\n\nQList<Diff> diff_match_patch::diff_fromDelta(const QString &text1,\n                                             const QString &delta) {\n  QList<Diff> diffs;\n  int pointer = 0;  // Cursor in text1\n  QStringList tokens = delta.split(\"\\t\");\n  foreach(QString token, tokens) {\n    if (token.isEmpty()) {\n      // Blank tokens are ok (from a trailing \\t).\n      continue;\n    }\n    // Each token begins with a one character parameter which specifies the\n    // operation of this token (delete, insert, equality).\n    QString param = token.mid(1);\n    switch (token[0].toLatin1()) {\n      case '+':\n        param = QUrl::fromPercentEncoding(qPrintable(param));\n        diffs.append(Diff(INSERT, param));\n        break;\n      case '-':\n        // Fall through.\n      case '=': {\n        int n;\n        n = param.toInt();\n        if (n < 0) {\n          throw QString(\"Negative number in diff_fromDelta: %1\").arg(param);\n        }\n        QString text;\n        text = text1.mid(pointer, n);\n        pointer += n;\n        if (token[0] == QChar('=')) {\n          diffs.append(Diff(EQUAL, text));\n        } else {\n          diffs.append(Diff(DELETE, text));\n        }\n        break;\n      }\n      default:\n        throw QString(\"Invalid diff operation in diff_fromDelta: %1\")\n            .arg(token[0]);\n    }\n  }\n  if (pointer != text1.length()) {\n    throw QString(\"Delta length (%1) smaller than source text length (%2)\")\n        .arg(pointer).arg(text1.length());\n  }\n  return diffs;\n}\n\n\n  //  MATCH FUNCTIONS\n\n\nint diff_match_patch::match_main(const QString &text, const QString &pattern,\n                                 int loc) {\n  loc = qMax(0, qMin(loc, text.length()));\n  if (text == pattern) {\n    // Shortcut (potentially not guaranteed by the algorithm)\n    return 0;\n  } else if (text.isEmpty()) {\n    // Nothing to match.\n    return -1;\n  } else if (loc + pattern.length() <= text.length()\n      && text.mid(loc, pattern.length()) == pattern) {\n    // Perfect match at the perfect spot!  (Includes case of null pattern)\n    return loc;\n  } else {\n    // Do a fuzzy compare.\n    return match_bitap(text, pattern, loc);\n  }\n}\n\n\nint diff_match_patch::match_bitap(const QString &text, const QString &pattern,\n                                  int loc) {\n  if (!(Match_MaxBits == 0 || pattern.length() <= Match_MaxBits)) {\n    throw \"Pattern too long for this application.\";\n  }\n\n  // Initialise the alphabet.\n  QMap<QChar, int> s = match_alphabet(pattern);\n\n  // Highest score beyond which we give up.\n  double score_threshold = Match_Threshold;\n  // Is there a nearby exact match? (speedup)\n  int best_loc = text.indexOf(pattern, loc);\n  if (best_loc != -1) {\n    score_threshold = qMin(match_bitapScore(0, best_loc, loc, pattern),\n        score_threshold);\n    // What about in the other direction? (speedup)\n    best_loc = text.lastIndexOf(pattern, loc + pattern.length());\n    if (best_loc != -1) {\n      score_threshold = qMin(match_bitapScore(0, best_loc, loc, pattern),\n          score_threshold);\n    }\n  }\n\n  // Initialise the bit arrays.\n  int matchmask = 1 << (pattern.length() - 1);\n  best_loc = -1;\n\n  int bin_min, bin_mid;\n  int bin_max = pattern.length() + text.length();\n  int *rd = NULL;\n  int *last_rd = NULL;\n  for (int d = 0; d < pattern.length(); d++) {\n    // Scan for the best match; each iteration allows for one more error.\n    // Run a binary search to determine how far from 'loc' we can stray at\n    // this error level.\n    bin_min = 0;\n    bin_mid = bin_max;\n    while (bin_min < bin_mid) {\n      if (match_bitapScore(d, loc + bin_mid, loc, pattern)\n          <= score_threshold) {\n        bin_min = bin_mid;\n      } else {\n        bin_max = bin_mid;\n      }\n      bin_mid = (bin_max - bin_min) / 2 + bin_min;\n    }\n    // Use the result from this iteration as the maximum for the next.\n    bin_max = bin_mid;\n    int start = qMax(1, loc - bin_mid + 1);\n    int finish = qMin(loc + bin_mid, text.length()) + pattern.length();\n\n    rd = new int[finish + 2];\n    rd[finish + 1] = (1 << d) - 1;\n    for (int j = finish; j >= start; j--) {\n      int charMatch;\n      if (text.length() <= j - 1) {\n        // Out of range.\n        charMatch = 0;\n      } else {\n        charMatch = s.value(text[j - 1], 0);\n      }\n      if (d == 0) {\n        // First pass: exact match.\n        rd[j] = ((rd[j + 1] << 1) | 1) & charMatch;\n      } else {\n        // Subsequent passes: fuzzy match.\n        rd[j] = ((rd[j + 1] << 1) | 1) & charMatch\n            | (((last_rd[j + 1] | last_rd[j]) << 1) | 1)\n            | last_rd[j + 1];\n      }\n      if ((rd[j] & matchmask) != 0) {\n        double score = match_bitapScore(d, j - 1, loc, pattern);\n        // This match will almost certainly be better than any existing\n        // match.  But check anyway.\n        if (score <= score_threshold) {\n          // Told you so.\n          score_threshold = score;\n          best_loc = j - 1;\n          if (best_loc > loc) {\n            // When passing loc, don't exceed our current distance from loc.\n            start = qMax(1, 2 * loc - best_loc);\n          } else {\n            // Already passed loc, downhill from here on in.\n            break;\n          }\n        }\n      }\n    }\n    if (match_bitapScore(d + 1, loc, loc, pattern) > score_threshold) {\n      // No hope for a (better) match at greater error levels.\n      break;\n    }\n    delete [] last_rd;\n    last_rd = rd;\n  }\n  delete [] last_rd;\n  delete [] rd;\n  return best_loc;\n}\n\n\ndouble diff_match_patch::match_bitapScore(int e, int x, int loc,\n                                          const QString &pattern) {\n  const float accuracy = static_cast<float> (e) / pattern.length();\n  const int proximity = qAbs(loc - x);\n  if (Match_Distance == 0) {\n    // Dodge divide by zero error.\n    return proximity == 0 ? accuracy : 1.0;\n  }\n  return accuracy + (proximity / static_cast<float> (Match_Distance));\n}\n\n\nQMap<QChar, int> diff_match_patch::match_alphabet(const QString &pattern) {\n  QMap<QChar, int> s;\n  int i;\n  for (i = 0; i < pattern.length(); i++) {\n    QChar c = pattern[i];\n    s.insert(c, 0);\n  }\n  for (i = 0; i < pattern.length(); i++) {\n    QChar c = pattern[i];\n    s.insert(c, s.value(c) | (1 << (pattern.length() - i - 1)));\n  }\n  return s;\n}\n\n\n//  PATCH FUNCTIONS\n\n\nvoid diff_match_patch::patch_addContext(Patch &patch, const QString &text) {\n  if (text.isEmpty()) {\n    return;\n  }\n  QString pattern = text.mid(patch.start2, patch.length1);\n  int padding = 0;\n\n  // Look for the first and last matches of pattern in text.  If two different\n  // matches are found, increase the pattern length.\n  while (text.indexOf(pattern) != text.lastIndexOf(pattern)\n      && pattern.length() < Match_MaxBits - Patch_Margin - Patch_Margin) {\n    padding += Patch_Margin;\n    pattern = text.mid(qMax(0, patch.start2 - padding),\n        qMin(text.length(), patch.start2 + patch.length1 + padding)\n        - qMax(0, patch.start2 - padding));\n  }\n  // Add one chunk for good luck.\n  padding += Patch_Margin;\n\n  // Add the prefix.\n  QString prefix = text.mid(qMax(0, patch.start2 - padding),\n      patch.start2 - qMax(0, patch.start2 - padding));\n  if (!prefix.isEmpty()) {\n    patch.diffs.prepend(Diff(EQUAL, prefix));\n  }\n  // Add the suffix.\n  QString suffix = text.mid(patch.start2 + patch.length1,\n      qMin(text.length(), patch.start2 + patch.length1 + padding)\n      - (patch.start2 + patch.length1));\n  if (!suffix.isEmpty()) {\n    patch.diffs.append(Diff(EQUAL, suffix));\n  }\n\n  // Roll back the start points.\n  patch.start1 -= prefix.length();\n  patch.start2 -= prefix.length();\n  // Extend the lengths.\n  patch.length1 += prefix.length() + suffix.length();\n  patch.length2 += prefix.length() + suffix.length();\n}\n\n\nQList<Patch> diff_match_patch::patch_make(const QString &text1,\n                                          const QString &text2) {\n  // No diffs provided, compute our own.\n  QList<Diff> diffs = diff_main(text1, text2, true);\n  if (diffs.size() > 2) {\n    diff_cleanupSemantic(diffs);\n    diff_cleanupEfficiency(diffs);\n  }\n\n  return patch_make(text1, diffs);\n}\n\n\nQList<Patch> diff_match_patch::patch_make(const QList<Diff> &diffs) {\n  // No origin string provided, compute our own.\n  const QString text1 = diff_text1(diffs);\n  return patch_make(text1, diffs);\n}\n\n\nQList<Patch> diff_match_patch::patch_make(const QString &text1,\n                                          const QString &text2,\n                                          const QList<Diff> &diffs) {\n  // text2 is entirely unused.\n  return patch_make(text1, diffs);\n\n  Q_UNUSED(text2)\n}\n\n\nQList<Patch> diff_match_patch::patch_make(const QString &text1,\n                                          const QList<Diff> &diffs) {\n  QList<Patch> patches;\n  if (diffs.isEmpty()) {\n    return patches;  // Get rid of the null case.\n  }\n  Patch patch;\n  int char_count1 = 0;  // Number of characters into the text1 string.\n  int char_count2 = 0;  // Number of characters into the text2 string.\n  // Start with text1 (prepatch_text) and apply the diffs until we arrive at\n  // text2 (postpatch_text).  We recreate the patches one by one to determine\n  // context info.\n  QString prepatch_text = text1;\n  QString postpatch_text = text1;\n  foreach(Diff aDiff, diffs) {\n    if (patch.diffs.isEmpty() && aDiff.operation != EQUAL) {\n      // A new patch starts here.\n      patch.start1 = char_count1;\n      patch.start2 = char_count2;\n    }\n\n    switch (aDiff.operation) {\n      case INSERT:\n        patch.diffs.append(aDiff);\n        patch.length2 += aDiff.text.length();\n        postpatch_text = postpatch_text.left(char_count2)\n            + aDiff.text + postpatch_text.mid(char_count2);\n        break;\n      case DELETE:\n        patch.length1 += aDiff.text.length();\n        patch.diffs.append(aDiff);\n        postpatch_text = postpatch_text.left(char_count2)\n            + postpatch_text.mid(char_count2 + aDiff.text.length());\n        break;\n      case EQUAL:\n        if (aDiff.text.length() <= 2 * Patch_Margin\n            && !patch.diffs.isEmpty() && !(aDiff == diffs.back())) {\n          // Small equality inside a patch.\n          patch.diffs.append(aDiff);\n          patch.length1 += aDiff.text.length();\n          patch.length2 += aDiff.text.length();\n        }\n\n        if (aDiff.text.length() >= 2 * Patch_Margin) {\n          // Time for a new patch.\n          if (!patch.diffs.isEmpty()) {\n            patch_addContext(patch, prepatch_text);\n            patches.append(patch);\n            patch = Patch();\n            // Unlike Unidiff, our patch lists have a rolling context.\n            // http://code.google.com/p/google-diff-match-patch/wiki/Unidiff\n            // Update prepatch text & pos to reflect the application of the\n            // just completed patch.\n            prepatch_text = postpatch_text;\n            char_count1 = char_count2;\n          }\n        }\n        break;\n    }\n\n    // Update the current character count.\n    if (aDiff.operation != INSERT) {\n      char_count1 += aDiff.text.length();\n    }\n    if (aDiff.operation != DELETE) {\n      char_count2 += aDiff.text.length();\n    }\n  }\n  // Pick up the leftover patch if not empty.\n  if (!patch.diffs.isEmpty()) {\n    patch_addContext(patch, prepatch_text);\n    patches.append(patch);\n  }\n\n  return patches;\n}\n\n\nQList<Patch> diff_match_patch::patch_deepCopy(QList<Patch> &patches) {\n  QList<Patch> patchesCopy;\n  foreach(Patch aPatch, patches) {\n    Patch patchCopy = Patch();\n    foreach(Diff aDiff, aPatch.diffs) {\n      Diff diffCopy = Diff(aDiff.operation, aDiff.text);\n      patchCopy.diffs.append(diffCopy);\n    }\n    patchCopy.start1 = aPatch.start1;\n    patchCopy.start2 = aPatch.start2;\n    patchCopy.length1 = aPatch.length1;\n    patchCopy.length2 = aPatch.length2;\n    patchesCopy.append(patchCopy);\n  }\n  return patchesCopy;\n}\n\n\nQPair<QString, QVector<bool> > diff_match_patch::patch_apply(\n    QList<Patch> &patches, const QString &sourceText) {\n  QString text = sourceText;  // Copy to preserve original.\n  if (patches.isEmpty()) {\n    return QPair<QString,QVector<bool> >(text, QVector<bool>(0));\n  }\n\n  // Deep copy the patches so that no changes are made to originals.\n  QList<Patch> patchesCopy = patch_deepCopy(patches);\n\n  QString nullPadding = patch_addPadding(patchesCopy);\n  text = nullPadding + text + nullPadding;\n  patch_splitMax(patchesCopy);\n\n  int x = 0;\n  // delta keeps track of the offset between the expected and actual location\n  // of the previous patch.  If there are patches expected at positions 10 and\n  // 20, but the first patch was found at 12, delta is 2 and the second patch\n  // has an effective expected position of 22.\n  int delta = 0;\n  QVector<bool> results(patchesCopy.size());\n  foreach(Patch aPatch, patchesCopy) {\n    int expected_loc = aPatch.start2 + delta;\n    QString text1 = diff_text1(aPatch.diffs);\n    int start_loc;\n    int end_loc = -1;\n    if (text1.length() > Match_MaxBits) {\n      // patch_splitMax will only provide an oversized pattern in the case of\n      // a monster delete.\n      start_loc = match_main(text, text1.left(Match_MaxBits), expected_loc);\n      if (start_loc != -1) {\n        end_loc = match_main(text, text1.right(Match_MaxBits),\n            expected_loc + text1.length() - Match_MaxBits);\n        if (end_loc == -1 || start_loc >= end_loc) {\n          // Can't find valid trailing context.  Drop this patch.\n          start_loc = -1;\n        }\n      }\n    } else {\n      start_loc = match_main(text, text1, expected_loc);\n    }\n    if (start_loc == -1) {\n      // No match found.  :(\n      results[x] = false;\n      // Subtract the delta for this failed patch from subsequent patches.\n      delta -= aPatch.length2 - aPatch.length1;\n    } else {\n      // Found a match.  :)\n      results[x] = true;\n      delta = start_loc - expected_loc;\n      QString text2;\n      if (end_loc == -1) {\n        text2 = text.mid(start_loc, text1.length());\n      } else {\n        text2 = text.mid(start_loc, end_loc + Match_MaxBits - start_loc);\n      }\n      if (text1 == text2) {\n        // Perfect match, just shove the replacement text in.\n        text = text.left(start_loc) + diff_text2(aPatch.diffs)\n            + text.mid(start_loc + text1.length());\n      } else {\n        // Imperfect match.  Run a diff to get a framework of equivalent\n        // indices.\n        QList<Diff> diffs = diff_main(text1, text2, false);\n        if (text1.length() > Match_MaxBits\n            && diff_levenshtein(diffs) / static_cast<float> (text1.length())\n            > Patch_DeleteThreshold) {\n          // The end points match, but the content is unacceptably bad.\n          results[x] = false;\n        } else {\n          diff_cleanupSemanticLossless(diffs);\n          int index1 = 0;\n          foreach(Diff aDiff, aPatch.diffs) {\n            if (aDiff.operation != EQUAL) {\n              int index2 = diff_xIndex(diffs, index1);\n              if (aDiff.operation == INSERT) {\n                // Insertion\n                text = text.left(start_loc + index2) + aDiff.text\n                    + text.mid(start_loc + index2);\n              } else if (aDiff.operation == DELETE) {\n                // Deletion\n                text = text.left(start_loc + index2)\n                    + text.mid(start_loc + diff_xIndex(diffs,\n                    index1 + aDiff.text.length()));\n              }\n            }\n            if (aDiff.operation != DELETE) {\n              index1 += aDiff.text.length();\n            }\n          }\n        }\n      }\n    }\n    x++;\n  }\n  // Strip the padding off.\n  text = text.mid(nullPadding.length(), text.length()\n      - 2 * nullPadding.length());\n  return QPair<QString, QVector<bool> >(text, results);\n}\n\n\nQString diff_match_patch::patch_addPadding(QList<Patch> &patches) {\n  int paddingLength = Patch_Margin;\n  QString nullPadding = \"\";\n  for (int x = 1; x <= paddingLength; x++) {\n    nullPadding += QChar((ushort)x);\n  }\n\n  // Bump all the patches forward.\n  QMutableListIterator<Patch> pointer(patches);\n  while (pointer.hasNext()) {\n    Patch &aPatch = pointer.next();\n    aPatch.start1 += paddingLength;\n    aPatch.start2 += paddingLength;\n  }\n\n  // Add some padding on start of first diff.\n  Patch &firstPatch = patches.first();\n  QList<Diff> &firstPatchDiffs = firstPatch.diffs;\n  if (firstPatchDiffs.empty() || firstPatchDiffs.first().operation != EQUAL) {\n    // Add nullPadding equality.\n    firstPatchDiffs.prepend(Diff(EQUAL, nullPadding));\n    firstPatch.start1 -= paddingLength;  // Should be 0.\n    firstPatch.start2 -= paddingLength;  // Should be 0.\n    firstPatch.length1 += paddingLength;\n    firstPatch.length2 += paddingLength;\n  } else if (paddingLength > firstPatchDiffs.first().text.length()) {\n    // Grow first equality.\n    Diff &firstDiff = firstPatchDiffs.first();\n    int extraLength = paddingLength - firstDiff.text.length();\n    firstDiff.text = nullPadding.mid(firstDiff.text.length(),\n        paddingLength - firstDiff.text.length()) + firstDiff.text;\n    firstPatch.start1 -= extraLength;\n    firstPatch.start2 -= extraLength;\n    firstPatch.length1 += extraLength;\n    firstPatch.length2 += extraLength;\n  }\n\n  // Add some padding on end of last diff.\n  Patch &lastPatch = patches.first();\n  QList<Diff> &lastPatchDiffs = lastPatch.diffs;\n  if (lastPatchDiffs.empty() || lastPatchDiffs.last().operation != EQUAL) {\n    // Add nullPadding equality.\n    lastPatchDiffs.append(Diff(EQUAL, nullPadding));\n    lastPatch.length1 += paddingLength;\n    lastPatch.length2 += paddingLength;\n  } else if (paddingLength > lastPatchDiffs.last().text.length()) {\n    // Grow last equality.\n    Diff &lastDiff = lastPatchDiffs.last();\n    int extraLength = paddingLength - lastDiff.text.length();\n    lastDiff.text += nullPadding.left(extraLength);\n    lastPatch.length1 += extraLength;\n    lastPatch.length2 += extraLength;\n  }\n\n  return nullPadding;\n}\n\n\nvoid diff_match_patch::patch_splitMax(QList<Patch> &patches) {\n  int patch_size;\n  QString precontext, postcontext;\n  Patch patch;\n  int start1, start2;\n  bool empty;\n  Operation diff_type;\n  QString diff_text;\n  QMutableListIterator<Patch> pointer(patches);\n  Patch bigpatch;\n\n  if (pointer.hasNext()) {\n    bigpatch = pointer.next();\n  }\n\n  while (!bigpatch.isNull()) {\n    if (bigpatch.length1 <= Match_MaxBits) {\n      bigpatch = pointer.hasNext() ? pointer.next() : Patch();\n      continue;\n    }\n    // Remove the big old patch.\n    pointer.remove();\n    patch_size = Match_MaxBits;\n    start1 = bigpatch.start1;\n    start2 = bigpatch.start2;\n    precontext = \"\";\n    while (!bigpatch.diffs.isEmpty()) {\n      // Create one of several smaller patches.\n      patch = Patch();\n      empty = true;\n      patch.start1 = start1 - precontext.length();\n      patch.start2 = start2 - precontext.length();\n      if (!precontext.isEmpty()) {\n        patch.length1 = patch.length2 = precontext.length();\n        patch.diffs.append(Diff(EQUAL, precontext));\n      }\n      while (!bigpatch.diffs.isEmpty()\n          && patch.length1 < patch_size - Patch_Margin) {\n        diff_type = bigpatch.diffs.front().operation;\n        diff_text = bigpatch.diffs.front().text;\n        if (diff_type == INSERT) {\n          // Insertions are harmless.\n          patch.length2 += diff_text.length();\n          start2 += diff_text.length();\n          patch.diffs.append(bigpatch.diffs.front());\n          bigpatch.diffs.removeFirst();\n          empty = false;\n        } else if (diff_type == DELETE && patch.diffs.size() == 1\n            && patch.diffs.front().operation == EQUAL\n            && diff_text.length() > 2 * patch_size) {\n          // This is a large deletion.  Let it pass in one chunk.\n          patch.length1 += diff_text.length();\n          start1 += diff_text.length();\n          empty = false;\n          patch.diffs.append(Diff(diff_type, diff_text));\n          bigpatch.diffs.removeFirst();\n        } else {\n          // Deletion or equality.  Only take as much as we can stomach.\n          diff_text = diff_text.left(qMin(diff_text.length(),\n              patch_size - patch.length1 - Patch_Margin));\n          patch.length1 += diff_text.length();\n          start1 += diff_text.length();\n          if (diff_type == EQUAL) {\n            patch.length2 += diff_text.length();\n            start2 += diff_text.length();\n          } else {\n            empty = false;\n          }\n          patch.diffs.append(Diff(diff_type, diff_text));\n          if (diff_text == bigpatch.diffs.front().text) {\n            bigpatch.diffs.removeFirst();\n          } else {\n            bigpatch.diffs.front().text = bigpatch.diffs.front().text\n                .mid(diff_text.length());\n          }\n        }\n      }\n      // Compute the head context for the next patch.\n      precontext = diff_text2(patch.diffs);\n      precontext = precontext.mid(precontext.length() - Patch_Margin);\n      // Append the end context for this patch.\n      if (diff_text1(bigpatch.diffs).length() > Patch_Margin) {\n        postcontext = diff_text1(bigpatch.diffs).left(Patch_Margin);\n      } else {\n        postcontext = diff_text1(bigpatch.diffs);\n      }\n      if (!postcontext.isEmpty()) {\n        patch.length1 += postcontext.length();\n        patch.length2 += postcontext.length();\n        if (!patch.diffs.isEmpty()\n            && patch.diffs.back().operation == EQUAL) {\n          patch.diffs.back().text += postcontext;\n        } else {\n          patch.diffs.append(Diff(EQUAL, postcontext));\n        }\n      }\n      if (!empty) {\n        pointer.insert(patch);\n      }\n    }\n    bigpatch = pointer.hasNext() ? pointer.next() : Patch();\n  }\n}\n\n\nQString diff_match_patch::patch_toText(const QList<Patch> &patches) {\n  QString text;\n  foreach(Patch aPatch, patches) {\n    text.append(aPatch.toString());\n  }\n  return text;\n}\n\n\nQList<Patch> diff_match_patch::patch_fromText(const QString &textline) {\n  QList<Patch> patches;\n  if (textline.isEmpty()) {\n    return patches;\n  }\n  QStringList text = textline.split(\"\\n\", qtSkipEmptyParts);\n  Patch patch;\n  QRegExp patchHeader(\"^@@ -(\\\\d+),?(\\\\d*) \\\\+(\\\\d+),?(\\\\d*) @@$\");\n  char sign;\n  QString line;\n  while (!text.isEmpty()) {\n    if (!patchHeader.exactMatch(text.front())) {\n      throw QString(\"Invalid patch string: %1\").arg(text.front());\n    }\n\n    patch = Patch();\n    patch.start1 = patchHeader.cap(1).toInt();\n    if (patchHeader.cap(2).isEmpty()) {\n      patch.start1--;\n      patch.length1 = 1;\n    } else if (patchHeader.cap(2) == \"0\") {\n      patch.length1 = 0;\n    } else {\n      patch.start1--;\n      patch.length1 = patchHeader.cap(2).toInt();\n    }\n\n    patch.start2 = patchHeader.cap(3).toInt();\n    if (patchHeader.cap(4).isEmpty()) {\n      patch.start2--;\n      patch.length2 = 1;\n    } else if (patchHeader.cap(4) == \"0\") {\n      patch.length2 = 0;\n    } else {\n      patch.start2--;\n      patch.length2 = patchHeader.cap(4).toInt();\n    }\n    text.removeFirst();\n\n    while (!text.isEmpty()) {\n      if (text.front().isEmpty()) {\n        text.removeFirst();\n        continue;\n      }\n      sign = text.front()[0].toLatin1();\n      line = text.front().mid(1);\n      line = line.replace(\"+\", \"%2B\");  // decode would change all \"+\" to \" \"\n      line = QUrl::fromPercentEncoding(qPrintable(line));\n      if (sign == '-') {\n        // Deletion.\n        patch.diffs.append(Diff(DELETE, line));\n      } else if (sign == '+') {\n        // Insertion.\n        patch.diffs.append(Diff(INSERT, line));\n      } else if (sign == ' ') {\n        // Minor equality.\n        patch.diffs.append(Diff(EQUAL, line));\n      } else if (sign == '@') {\n        // Start of next patch.\n        break;\n      } else {\n        // WTF?\n        throw QString(\"Invalid patch mode '%1' in: %2\").arg(sign).arg(line);\n        return QList<Patch>();\n      }\n      text.removeFirst();\n    }\n\n    patches.append(patch);\n\n  }\n  return patches;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/diff_match_patch/diff_match_patch.h",
    "content": "/*\n * Copyright 2008 Google Inc. All Rights Reserved.\n * Author: fraser@google.com (Neil Fraser)\n * Author: mikeslemmer@gmail.com (Mike Slemmer)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Diff Match and Patch\n * http://code.google.com/p/google-diff-match-patch/\n */\n\n#ifndef DIFF_MATCH_PATCH_H\n#define DIFF_MATCH_PATCH_H\n\n/*\n * Functions for diff, match and patch.\n * Computes the difference between two texts to create a patch.\n * Applies the patch onto another text, allowing for errors.\n *\n * @author fraser@google.com (Neil Fraser)\n *\n * Qt/C++ port by mikeslemmer@gmail.com (Mike Slemmer):\n *\n * Code compiles and runs with Qt 4.3.3.\n *\n * Here is a trivial sample program which works properly when linked with this library:\n *\n\n #include <QtCore>\n #include \"diff_match_patch.h\"\n int main(int argc, char **argv) {\n   diff_match_patch dmp;\n   QString str1 = QString(\"First string in diff\");\n   QString str2 = QString(\"Second string in diff\");\n\n   QString strPatch = dmp.patch_toText(dmp.patch_make(str1, str2));\n   QPair<QString, QVector<bool> > out = dmp.patch_apply(dmp.patch_fromText(strPatch), str1);\n   QString strResult = out.first;\n\n   // here, strResult will equal str2 above.\n   return 0;\n }\n\n */\n\n\n/**-\n* The data structure representing a diff is a Linked list of Diff objects:\n* {Diff(Operation.DELETE, \"Hello\"), Diff(Operation.INSERT, \"Goodbye\"),\n*  Diff(Operation.EQUAL, \" world.\")}\n* which means: delete \"Hello\", add \"Goodbye\" and keep \" world.\"\n*/\nenum Operation {\n  DELETE, INSERT, EQUAL\n};\n\n\n/**\n* Class representing one diff operation.\n*/\nclass Diff {\n public:\n  Operation operation;\n  // One of: INSERT, DELETE or EQUAL.\n  QString text;\n  // The text associated with this diff operation.\n\n  /**\n   * Constructor.  Initializes the diff with the provided values.\n   * @param operation One of INSERT, DELETE or EQUAL.\n   * @param text The text being applied.\n   */\n  Diff(Operation _operation, const QString &_text);\n  Diff();\n  inline bool isNull() const;\n  QString toString() const;\n  bool operator==(const Diff &d) const;\n  bool operator!=(const Diff &d) const;\n\n  static QString strOperation(Operation op);\n};\n\n\n/**\n* Class representing one patch operation.\n*/\nclass Patch {\n public:\n  QList<Diff> diffs;\n  int start1;\n  int start2;\n  int length1;\n  int length2;\n\n  /**\n   * Constructor.  Initializes with an empty list of diffs.\n   */\n  Patch();\n  bool isNull() const;\n  QString toString();\n};\n\n\n/**\n * Class containing the diff, match and patch methods.\n * Also contains the behaviour settings.\n */\nclass diff_match_patch {\n\n  friend class diff_match_patch_test;\n\n public:\n  // Defaults.\n  // Set these on your diff_match_patch instance to override the defaults.\n\n  // Number of seconds to map a diff before giving up (0 for infinity).\n  float Diff_Timeout;\n  // Cost of an empty edit operation in terms of edit characters.\n  short Diff_EditCost;\n  // The size beyond which the double-ended diff activates.\n  // Double-ending is twice as fast, but less accurate.\n  short Diff_DualThreshold;\n  // At what point is no match declared (0.0 = perfection, 1.0 = very loose).\n  float Match_Threshold;\n  // How far to search for a match (0 = exact location, 1000+ = broad match).\n  // A match this many characters away from the expected location will add\n  // 1.0 to the score (0.0 is a perfect match).\n  int Match_Distance;\n  // When deleting a large block of text (over ~64 characters), how close does\n  // the contents have to match the expected contents. (0.0 = perfection,\n  // 1.0 = very loose).  Note that Match_Threshold controls how closely the\n  // end points of a delete need to match.\n  float Patch_DeleteThreshold;\n  // Chunk size for context length.\n  short Patch_Margin;\n\n  // The number of bits in an int.\n  int Match_MaxBits;\n\n\n public:\n\n  diff_match_patch();\n\n  //  DIFF FUNCTIONS\n\n\n  /**\n   * Find the differences between two texts.\n   * Run a faster slightly less optimal diff\n   * This method allows the 'checklines' of diff_main() to be optional.\n   * Most of the time checklines is wanted, so default to true.\n   * @param text1 Old string to be diffed.\n   * @param text2 New string to be diffed.\n   * @return Linked List of Diff objects.\n   */\n  QList<Diff> diff_main(const QString &text1, const QString &text2);\n\n  /**\n   * Find the differences between two texts.  Simplifies the problem by\n   * stripping any common prefix or suffix off the texts before diffing.\n   * @param text1 Old string to be diffed.\n   * @param text2 New string to be diffed.\n   * @param checklines Speedup flag.  If false, then don't run a\n   *     line-level diff first to identify the changed areas.\n   *     If true, then run a faster slightly less optimal diff\n   * @return Linked List of Diff objects.\n   */\n  QList<Diff> diff_main(const QString &text1, const QString &text2, bool checklines);\n\n  /**\n   * Find the differences between two texts.  Assumes that the texts do not\n   * have any common prefix or suffix.\n   * @param text1 Old string to be diffed.\n   * @param text2 New string to be diffed.\n   * @param checklines Speedup flag.  If false, then don't run a\n   *     line-level diff first to identify the changed areas.\n   *     If true, then run a faster slightly less optimal diff\n   * @return Linked List of Diff objects.\n   */\n protected:\n  QList<Diff> diff_compute(QString text1, QString text2, bool checklines);\n\n  /**\n   * Split two texts into a list of strings.  Reduce the texts to a string of\n   * hashes where each Unicode character represents one line.\n   * @param text1 First string.\n   * @param text2 Second string.\n   * @return Three element Object array, containing the encoded text1, the\n   *     encoded text2 and the List of unique strings.  The zeroth element\n   *     of the List of unique strings is intentionally blank.\n   */\n protected:\n  QList<QVariant> diff_linesToChars(const QString &text1, const QString &text2); // return elems 0 and 1 are QString, elem 2 is QStringList\n\n  /**\n   * Split a text into a list of strings.  Reduce the texts to a string of\n   * hashes where each Unicode character represents one line.\n   * @param text String to encode.\n   * @param lineArray List of unique strings.\n   * @param lineHash Map of strings to indices.\n   * @return Encoded string.\n   */\n private:\n  QString diff_linesToCharsMunge(const QString &text, QStringList &lineArray,\n                                 QMap<QString, int> &lineHash);\n\n  /**\n   * Rehydrate the text in a diff from a string of line hashes to real lines of\n   * text.\n   * @param diffs LinkedList of Diff objects.\n   * @param lineArray List of unique strings.\n   */\n private:\n  void diff_charsToLines(QList<Diff> &diffs, const QStringList &lineArray);\n\n  /**\n   * Explore the intersection points between the two texts.\n   * @param text1 Old string to be diffed.\n   * @param text2 New string to be diffed.\n   * @return LinkedList of Diff objects or null if no diff available.\n   */\n protected:\n  QList<Diff> diff_map(const QString &text1, const QString &text2);\n\n  /**\n   * Work from the middle back to the start to determine the path.\n   * @param v_map List of path sets.\n   * @param text1 Old string fragment to be diffed.\n   * @param text2 New string fragment to be diffed.\n   * @return LinkedList of Diff objects.\n   */\n protected:\n  QList<Diff> diff_path1(const QList<QSet<QPair<int, int> > > &v_map,\n                         const QString &text1, const QString &text2);\n\n  /**\n   * Work from the middle back to the end to determine the path.\n   * @param v_map List of path sets.\n   * @param text1 Old string fragment to be diffed.\n   * @param text2 New string fragment to be diffed.\n   * @return LinkedList of Diff objects.\n   */\n protected:\n  QList<Diff> diff_path2(const QList<QSet<QPair<int, int> > > &v_map,\n                         const QString &text1, const QString &text2);\n\n  /**\n   * Determine the common prefix of two strings\n   * @param text1 First string.\n   * @param text2 Second string.\n   * @return The number of characters common to the start of each string.\n   */\n public:\n  int diff_commonPrefix(const QString &text1, const QString &text2);\n\n  /**\n   * Determine the common suffix of two strings\n   * @param text1 First string.\n   * @param text2 Second string.\n   * @return The number of characters common to the end of each string.\n   */\n public:\n  int diff_commonSuffix(const QString &text1, const QString &text2);\n\n  /**\n   * Do the two texts share a substring which is at least half the length of\n   * the longer text?\n   * @param text1 First string.\n   * @param text2 Second string.\n   * @return Five element String array, containing the prefix of text1, the\n   *     suffix of text1, the prefix of text2, the suffix of text2 and the\n   *     common middle.  Or null if there was no match.\n   */\n protected:\n  QStringList diff_halfMatch(const QString &text1, const QString &text2);\n\n  /**\n   * Does a substring of shorttext exist within longtext such that the\n   * substring is at least half the length of longtext?\n   * @param longtext Longer string.\n   * @param shorttext Shorter string.\n   * @param i Start index of quarter length substring within longtext.\n   * @return Five element String array, containing the prefix of longtext, the\n   *     suffix of longtext, the prefix of shorttext, the suffix of shorttext\n   *     and the common middle.  Or null if there was no match.\n   */\n private:\n  QStringList diff_halfMatchI(const QString &longtext, const QString &shorttext, int i);\n\n  /**\n   * Reduce the number of edits by eliminating semantically trivial equalities.\n   * @param diffs LinkedList of Diff objects.\n   */\n public:\n  void diff_cleanupSemantic(QList<Diff> &diffs);\n\n  /**\n   * Look for single edits surrounded on both sides by equalities\n   * which can be shifted sideways to align the edit to a word boundary.\n   * e.g: The c<ins>at c</ins>ame. -> The <ins>cat </ins>came.\n   * @param diffs LinkedList of Diff objects.\n   */\n public:\n  void diff_cleanupSemanticLossless(QList<Diff> &diffs);\n\n  /**\n   * Given two strings, compute a score representing whether the internal\n   * boundary falls on logical boundaries.\n   * Scores range from 5 (best) to 0 (worst).\n   * @param one First string.\n   * @param two Second string.\n   * @return The score.\n   */\n private:\n  int diff_cleanupSemanticScore(const QString &one, const QString &two);\n\n  /**\n   * Reduce the number of edits by eliminating operationally trivial equalities.\n   * @param diffs LinkedList of Diff objects.\n   */\n public:\n  void diff_cleanupEfficiency(QList<Diff> &diffs);\n\n  /**\n   * Reorder and merge like edit sections.  Merge equalities.\n   * Any edit section can move as long as it doesn't cross an equality.\n   * @param diffs LinkedList of Diff objects.\n   */\n public:\n  void diff_cleanupMerge(QList<Diff> &diffs);\n\n  /**\n   * loc is a location in text1, compute and return the equivalent location in\n   * text2.\n   * e.g. \"The cat\" vs \"The big cat\", 1->1, 5->8\n   * @param diffs LinkedList of Diff objects.\n   * @param loc Location within text1.\n   * @return Location within text2.\n   */\n public:\n  int diff_xIndex(const QList<Diff> &diffs, int loc);\n\n  /**\n   * Convert a Diff list into a pretty HTML report.\n   * @param diffs LinkedList of Diff objects.\n   * @return HTML representation.\n   */\n public:\n  QString diff_prettyHtml(const QList<Diff> &diffs);\n\n  /**\n   * Compute and return the source text (all equalities and deletions).\n   * @param diffs LinkedList of Diff objects.\n   * @return Source text.\n   */\n public:\n  QString diff_text1(const QList<Diff> &diffs);\n\n  /**\n   * Compute and return the destination text (all equalities and insertions).\n   * @param diffs LinkedList of Diff objects.\n   * @return Destination text.\n   */\n public:\n  QString diff_text2(const QList<Diff> &diffs);\n\n  /**\n   * Compute the Levenshtein distance; the number of inserted, deleted or\n   * substituted characters.\n   * @param diffs LinkedList of Diff objects.\n   * @return Number of changes.\n   */\n public:\n  int diff_levenshtein(const QList<Diff> &diffs);\n\n  /**\n   * Crush the diff into an encoded string which describes the operations\n   * required to transform text1 into text2.\n   * E.g. =3\\t-2\\t+ing  -> Keep 3 chars, delete 2 chars, insert 'ing'.\n   * Operations are tab-separated.  Inserted text is escaped using %xx notation.\n   * @param diffs Array of diff tuples.\n   * @return Delta text.\n   */\n public:\n  QString diff_toDelta(const QList<Diff> &diffs);\n\n  /**\n   * Given the original text1, and an encoded string which describes the\n   * operations required to transform text1 into text2, compute the full diff.\n   * @param text1 Source string for the diff.\n   * @param delta Delta text.\n   * @return Array of diff tuples or null if invalid.\n   * @throws QString If invalid input.\n   */\n public:\n  QList<Diff> diff_fromDelta(const QString &text1, const QString &delta);\n\n\n  //  MATCH FUNCTIONS\n\n\n  /**\n   * Locate the best instance of 'pattern' in 'text' near 'loc'.\n   * Returns -1 if no match found.\n   * @param text The text to search.\n   * @param pattern The pattern to search for.\n   * @param loc The location to search around.\n   * @return Best match index or -1.\n   */\n public:\n  int match_main(const QString &text, const QString &pattern, int loc);\n\n  /**\n   * Locate the best instance of 'pattern' in 'text' near 'loc' using the\n   * Bitap algorithm.  Returns -1 if no match found.\n   * @param text The text to search.\n   * @param pattern The pattern to search for.\n   * @param loc The location to search around.\n   * @return Best match index or -1.\n   */\n protected:\n  int match_bitap(const QString &text, const QString &pattern, int loc);\n\n  /**\n   * Compute and return the score for a match with e errors and x location.\n   * @param e Number of errors in match.\n   * @param x Location of match.\n   * @param loc Expected location of match.\n   * @param pattern Pattern being sought.\n   * @return Overall score for match (0.0 = good, 1.0 = bad).\n   */\n private:\n  double match_bitapScore(int e, int x, int loc, const QString &pattern);\n\n  /**\n   * Initialise the alphabet for the Bitap algorithm.\n   * @param pattern The text to encode.\n   * @return Hash of character locations.\n   */\n protected:\n  QMap<QChar, int> match_alphabet(const QString &pattern);\n\n\n //  PATCH FUNCTIONS\n\n\n  /**\n   * Increase the context until it is unique,\n   * but don't let the pattern expand beyond Match_MaxBits.\n   * @param patch The patch to grow.\n   * @param text Source text.\n   */\n protected:\n  void patch_addContext(Patch &patch, const QString &text);\n\n  /**\n   * Compute a list of patches to turn text1 into text2.\n   * A set of diffs will be computed.\n   * @param text1 Old text.\n   * @param text2 New text.\n   * @return LinkedList of Patch objects.\n   */\n public:\n  QList<Patch> patch_make(const QString &text1, const QString &text2);\n\n  /**\n   * Compute a list of patches to turn text1 into text2.\n   * text1 will be derived from the provided diffs.\n   * @param diffs Array of diff tuples for text1 to text2.\n   * @return LinkedList of Patch objects.\n   */\n public:\n  QList<Patch> patch_make(const QList<Diff> &diffs);\n\n  /**\n   * Compute a list of patches to turn text1 into text2.\n   * text2 is ignored, diffs are the delta between text1 and text2.\n   * @param text1 Old text.\n   * @param text2 Ignored.\n   * @param diffs Array of diff tuples for text1 to text2.\n   * @return LinkedList of Patch objects.\n   * @deprecated Prefer patch_make(const QString &text1, const QList<Diff> &diffs).\n   */\n public:\n  QList<Patch> patch_make(const QString &text1, const QString &text2, const QList<Diff> &diffs);\n\n  /**\n   * Compute a list of patches to turn text1 into text2.\n   * text2 is not provided, diffs are the delta between text1 and text2.\n   * @param text1 Old text.\n   * @param diffs Array of diff tuples for text1 to text2.\n   * @return LinkedList of Patch objects.\n   */\n public:\n  QList<Patch> patch_make(const QString &text1, const QList<Diff> &diffs);\n\n  /**\n   * Given an array of patches, return another array that is identical.\n   * @param patches Array of patch objects.\n   * @return Array of patch objects.\n   */\n public:\n  QList<Patch> patch_deepCopy(QList<Patch> &patches);\n\n  /**\n   * Merge a set of patches onto the text.  Return a patched text, as well\n   * as an array of true/false values indicating which patches were applied.\n   * @param patches Array of patch objects.\n   * @param text Old text.\n   * @return Two element Object array, containing the new text and an array of\n   *      boolean values.\n   */\n public:\n  QPair<QString,QVector<bool> > patch_apply(QList<Patch> &patches, const QString &text);\n\n  /**\n   * Add some padding on text start and end so that edges can match something.\n   * Intended to be called only from within patch_apply.\n   * @param patches Array of patch objects.\n   * @return The padding string added to each side.\n   */\n public:\n  QString patch_addPadding(QList<Patch> &patches);\n\n  /**\n   * Look through the patches and break up any which are longer than the\n   * maximum limit of the match algorithm.\n   * @param patches LinkedList of Patch objects.\n   */\n public:\n  void patch_splitMax(QList<Patch> &patches);\n\n  /**\n   * Take a list of patches and return a textual representation.\n   * @param patches List of Patch objects.\n   * @return Text representation of patches.\n   */\n public:\n  QString patch_toText(const QList<Patch> &patches);\n\n  /**\n   * Parse a textual representation of patches and return a List of Patch\n   * objects.\n   * @param textline Text representation of patches.\n   * @return List of Patch objects.\n   * @throws QString If invalid input.\n   */\n public:\n  QList<Patch> patch_fromText(const QString &textline);\n};\n\n#endif // DIFF_MATCH_PATCH_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/diff_match_patch/diff_match_patch.pri",
    "content": "LIBS *= -l$$qtLibraryName(diff_match_pitch)\n"
  },
  {
    "path": "liteidex/src/3rdparty/diff_match_patch/diff_match_patch.pro",
    "content": "TARGET = diff_match_pitch\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude(../../liteideutils.pri)\n\nHEADERS += \\\n    diff_match_patch.h\n\nSOURCES += \\\n    diff_match_patch.cpp\n\nRESOURCES +=\n"
  },
  {
    "path": "liteidex/src/3rdparty/diff_match_patch/diff_match_patch_test.cpp",
    "content": "/*\n * Copyright 2008 Google Inc. All Rights Reserved.\n * Author: fraser@google.com (Neil Fraser)\n * Author: mikeslemmer@gmail.com (Mike Slemmer)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Diff Match and Patch -- Test Harness\n * http://code.google.com/p/google-diff-match-patch/\n */\n\n// Code known to compile and run with Qt 4.3.3 and Qt 4.4.0.\n#include <QtCore>\n#include \"diff_match_patch.h\"\n#include \"diff_match_patch_test.h\"\n\nint main(int argc, char **argv) {\n  diff_match_patch_test dmp_test;\n  qDebug(\"Starting diff_match_patch unit tests.\");\n  dmp_test.run_all_tests();\n  qDebug(\"Done.\");\n  return 0;\n  Q_UNUSED(argc)\n  Q_UNUSED(argv)\n}\n\n\ndiff_match_patch_test::diff_match_patch_test() {\n}\n\nvoid diff_match_patch_test::run_all_tests() {\n  QTime t;\n  t.start();\n  try {\n    testDiffCommonPrefix();\n    testDiffCommonSuffix();\n    testDiffHalfmatch();\n    testDiffLinesToChars();\n    testDiffCharsToLines();\n    testDiffCleanupMerge();\n    testDiffCleanupSemanticLossless();\n    testDiffCleanupSemantic();\n    testDiffCleanupEfficiency();\n    testDiffPrettyHtml();\n    testDiffText();\n    testDiffDelta();\n    testDiffXIndex();\n    testDiffPath();\n    testDiffMain();\n    testMatchAlphabet();\n    testMatchBitap();\n    testMatchMain();\n    testPatchObj();\n    testPatchFromText();\n    testPatchToText();\n    testPatchAddContext();\n    testPatchMake();\n    testPatchSplitMax();\n    testPatchAddPadding();\n    testPatchApply();\n    qDebug(\"All tests passed.\");\n  } catch (QString strCase) {\n    qDebug(qPrintable(QString(\"Test failed: %1\").arg(strCase)));\n  }\n  qDebug(\"Total time: %d ms\", t.elapsed());\n}\n\n//  DIFF TEST FUNCTIONS\n\nvoid diff_match_patch_test::testDiffCommonPrefix() {\n  // Detect and remove any common prefix.\n  assertEquals(\"diff_commonPrefix: Null case.\", 0, dmp.diff_commonPrefix(\"abc\", \"xyz\"));\n\n  assertEquals(\"diff_commonPrefix: Non-null case.\", 4, dmp.diff_commonPrefix(\"1234abcdef\", \"1234xyz\"));\n\n  assertEquals(\"diff_commonPrefix: Whole case.\", 4, dmp.diff_commonPrefix(\"1234\", \"1234xyz\"));\n}\n\nvoid diff_match_patch_test::testDiffCommonSuffix() {\n  // Detect and remove any common suffix.\n  assertEquals(\"diff_commonSuffix: Null case.\", 0, dmp.diff_commonSuffix(\"abc\", \"xyz\"));\n\n  assertEquals(\"diff_commonSuffix: Non-null case.\", 4, dmp.diff_commonSuffix(\"abcdef1234\", \"xyz1234\"));\n\n  assertEquals(\"diff_commonSuffix: Whole case.\", 4, dmp.diff_commonSuffix(\"1234\", \"xyz1234\"));\n}\n\nvoid diff_match_patch_test::testDiffHalfmatch() {\n  // Detect a halfmatch.\n  assertNull(\"diff_halfMatch: No match.\", dmp.diff_halfMatch(\"1234567890\", \"abcdef\"));\n\n  assertEquals(\"diff_halfMatch: Single Match #1.\", QString(\"12,90,a,z,345678\").split(\",\"), dmp.diff_halfMatch(\"1234567890\", \"a345678z\"));\n\n  assertEquals(\"diff_halfMatch: Single Match #2.\", QString(\"a,z,12,90,345678\").split(\",\"), dmp.diff_halfMatch(\"a345678z\", \"1234567890\"));\n\n  assertEquals(\"diff_halfMatch: Multiple Matches #1.\", QString(\"12123,123121,a,z,1234123451234\").split(\",\"), dmp.diff_halfMatch(\"121231234123451234123121\", \"a1234123451234z\"));\n\n  assertEquals(\"diff_halfMatch: Multiple Matches #2.\", QString(\",-=-=-=-=-=,x,,x-=-=-=-=-=-=-=\").split(\",\"), dmp.diff_halfMatch(\"x-=-=-=-=-=-=-=-=-=-=-=-=\", \"xx-=-=-=-=-=-=-=\"));\n\n  assertEquals(\"diff_halfMatch: Multiple Matches #3.\", QString(\"-=-=-=-=-=,,,y,-=-=-=-=-=-=-=y\").split(\",\"), dmp.diff_halfMatch(\"-=-=-=-=-=-=-=-=-=-=-=-=y\", \"-=-=-=-=-=-=-=yy\"));\n}\n\nvoid diff_match_patch_test::testDiffLinesToChars() {\n  // Convert lines down to characters.\n  QStringList tmpVector;\n  QList<QVariant> tmpVarList;\n  tmpVector.append(\"\");\n  tmpVector.append(\"alpha\\n\");\n  tmpVector.append(\"beta\\n\");\n  tmpVarList << QVariant::fromValue(QString() + QChar((ushort)1) + QChar((ushort)2) + QChar((ushort)1));  //((\"\\u0001\\u0002\\u0001\"));\n  tmpVarList << QVariant::fromValue(QString() + QChar((ushort)2) + QChar((ushort)1) + QChar((ushort)2));  // ((\"\\u0002\\u0001\\u0002\"));\n  tmpVarList << QVariant::fromValue(tmpVector);\n  assertEquals(\"diff_linesToChars:\", tmpVarList, dmp.diff_linesToChars(\"alpha\\nbeta\\nalpha\\n\", \"beta\\nalpha\\nbeta\\n\"));\n\n  tmpVector.clear();\n  tmpVarList.clear();\n  tmpVector.append(\"\");\n  tmpVector.append(\"alpha\\r\\n\");\n  tmpVector.append(\"beta\\r\\n\");\n  tmpVector.append(\"\\r\\n\");\n  tmpVarList << QVariant::fromValue(QString(\"\"));\n  tmpVarList << QVariant::fromValue(QString() + QChar((ushort)1) + QChar((ushort)2) + QChar((ushort)3) + QChar((ushort)3));  // ((\"\\u0001\\u0002\\u0003\\u0003\"));\n  tmpVarList << QVariant::fromValue(tmpVector);\n  assertEquals(\"diff_linesToChars:\", tmpVarList, dmp.diff_linesToChars(\"\", \"alpha\\r\\nbeta\\r\\n\\r\\n\\r\\n\"));\n\n  tmpVector.clear();\n  tmpVarList.clear();\n  tmpVector.append(\"\");\n  tmpVector.append(\"a\");\n  tmpVector.append(\"b\");\n  tmpVarList << QVariant::fromValue(QString() + QChar((ushort)1));  // ((\"\\u0001\"));\n  tmpVarList << QVariant::fromValue(QString() + QChar((ushort)2));  // ((\"\\u0002\"));\n  tmpVarList << QVariant::fromValue(tmpVector);\n  assertEquals(\"diff_linesToChars:\", tmpVarList, dmp.diff_linesToChars(\"a\", \"b\"));\n\n  // More than 256 to reveal any 8-bit limitations.\n  int n = 300;\n  tmpVector.clear();\n  tmpVarList.clear();\n  QString lines;\n  QString chars;\n  for (int x = 1; x < n + 1; x++) {\n    tmpVector.append(QString::number(x) + \"\\n\");\n    lines += QString::number(x) + \"\\n\";\n    chars += QChar(static_cast<ushort>(x));\n  }\n  assertEquals(\"diff_linesToChars: More than 256 (setup).\", n, tmpVector.size());\n  assertEquals(\"diff_linesToChars: More than 256 (setup).\", n, chars.length());\n  tmpVector.prepend(\"\");\n  tmpVarList << QVariant::fromValue(chars);\n  tmpVarList << QVariant::fromValue(QString(\"\"));\n  tmpVarList << QVariant::fromValue(tmpVector);\n  assertEquals(\"diff_linesToChars: More than 256.\", tmpVarList, dmp.diff_linesToChars(lines, \"\"));\n}\n\nvoid diff_match_patch_test::testDiffCharsToLines() {\n  // First check that Diff equality works.\n  assertTrue(\"diff_charsToLines:\", Diff(EQUAL, \"a\") == Diff(EQUAL, \"a\"));\n\n  assertEquals(\"diff_charsToLines:\", Diff(EQUAL, \"a\"), Diff(EQUAL, \"a\"));\n\n  // Convert chars up to lines.\n  QList<Diff> diffs;\n  diffs << Diff(EQUAL, QString() + QChar((ushort)1) + QChar((ushort)2) + QChar((ushort)1));  // (\"\\u0001\\u0002\\u0001\");\n  diffs << Diff(INSERT, QString() + QChar((ushort)2) + QChar((ushort)1) + QChar((ushort)2));  // (\"\\u0002\\u0001\\u0002\");\n  QStringList tmpVector;\n  tmpVector.append(\"\");\n  tmpVector.append(\"alpha\\n\");\n  tmpVector.append(\"beta\\n\");\n  dmp.diff_charsToLines(diffs, tmpVector);\n  assertEquals(\"diff_charsToLines:\", diffList(Diff(EQUAL, \"alpha\\nbeta\\nalpha\\n\"), Diff(INSERT, \"beta\\nalpha\\nbeta\\n\")), diffs);\n\n  // More than 256 to reveal any 8-bit limitations.\n  int n = 300;\n  tmpVector.clear();\n  QList<QVariant> tmpVarList;\n  QString lines;\n  QString chars;\n  for (int x = 1; x < n + 1; x++) {\n    tmpVector.append(QString::number(x) + \"\\n\");\n    lines += QString::number(x) + \"\\n\";\n    chars += QChar(static_cast<ushort>(x));\n  }\n  assertEquals(\"diff_linesToChars: More than 256 (setup).\", n, tmpVector.size());\n  assertEquals(\"diff_linesToChars: More than 256 (setup).\", n, chars.length());\n  tmpVector.prepend(\"\");\n  diffs = diffList(Diff(DELETE, chars));\n  dmp.diff_charsToLines(diffs, tmpVector);\n  assertEquals(\"diff_charsToLines: More than 256.\", diffList(Diff(DELETE, lines)), diffs);\n}\n\nvoid diff_match_patch_test::testDiffCleanupMerge() {\n  // Cleanup a messy diff.\n  QList<Diff> diffs;\n  dmp.diff_cleanupMerge(diffs);\n  assertEquals(\"diff_cleanupMerge: Null case.\", diffList(), diffs);\n\n  diffs = diffList(Diff(EQUAL, \"a\"), Diff(DELETE, \"b\"), Diff(INSERT, \"c\"));\n  dmp.diff_cleanupMerge(diffs);\n  assertEquals(\"diff_cleanupMerge: No change case.\", diffList(Diff(EQUAL, \"a\"), Diff(DELETE, \"b\"), Diff(INSERT, \"c\")), diffs);\n\n  diffs = diffList(Diff(EQUAL, \"a\"), Diff(EQUAL, \"b\"), Diff(EQUAL, \"c\"));\n  dmp.diff_cleanupMerge(diffs);\n  assertEquals(\"diff_cleanupMerge: Merge equalities.\", diffList(Diff(EQUAL, \"abc\")), diffs);\n\n  diffs = diffList(Diff(DELETE, \"a\"), Diff(DELETE, \"b\"), Diff(DELETE, \"c\"));\n  dmp.diff_cleanupMerge(diffs);\n  assertEquals(\"diff_cleanupMerge: Merge deletions.\", diffList(Diff(DELETE, \"abc\")), diffs);\n\n  diffs = diffList(Diff(INSERT, \"a\"), Diff(INSERT, \"b\"), Diff(INSERT, \"c\"));\n  dmp.diff_cleanupMerge(diffs);\n  assertEquals(\"diff_cleanupMerge: Merge insertions.\", diffList(Diff(INSERT, \"abc\")), diffs);\n\n  diffs = diffList(Diff(DELETE, \"a\"), Diff(INSERT, \"b\"), Diff(DELETE, \"c\"), Diff(INSERT, \"d\"), Diff(EQUAL, \"e\"), Diff(EQUAL, \"f\"));\n  dmp.diff_cleanupMerge(diffs);\n  assertEquals(\"diff_cleanupMerge: Merge interweave.\", diffList(Diff(DELETE, \"ac\"), Diff(INSERT, \"bd\"), Diff(EQUAL, \"ef\")), diffs);\n\n  diffs = diffList(Diff(DELETE, \"a\"), Diff(INSERT, \"abc\"), Diff(DELETE, \"dc\"));\n  dmp.diff_cleanupMerge(diffs);\n  assertEquals(\"diff_cleanupMerge: Prefix and suffix detection.\", diffList(Diff(EQUAL, \"a\"), Diff(DELETE, \"d\"), Diff(INSERT, \"b\"), Diff(EQUAL, \"c\")), diffs);\n\n  diffs = diffList(Diff(EQUAL, \"a\"), Diff(INSERT, \"ba\"), Diff(EQUAL, \"c\"));\n  dmp.diff_cleanupMerge(diffs);\n  assertEquals(\"diff_cleanupMerge: Slide edit left.\", diffList(Diff(INSERT, \"ab\"), Diff(EQUAL, \"ac\")), diffs);\n\n  diffs = diffList(Diff(EQUAL, \"c\"), Diff(INSERT, \"ab\"), Diff(EQUAL, \"a\"));\n  dmp.diff_cleanupMerge(diffs);\n  assertEquals(\"diff_cleanupMerge: Slide edit right.\", diffList(Diff(EQUAL, \"ca\"), Diff(INSERT, \"ba\")), diffs);\n\n  diffs = diffList(Diff(EQUAL, \"a\"), Diff(DELETE, \"b\"), Diff(EQUAL, \"c\"), Diff(DELETE, \"ac\"), Diff(EQUAL, \"x\"));\n  dmp.diff_cleanupMerge(diffs);\n  assertEquals(\"diff_cleanupMerge: Slide edit left recursive.\", diffList(Diff(DELETE, \"abc\"), Diff(EQUAL, \"acx\")), diffs);\n\n  diffs = diffList(Diff(EQUAL, \"x\"), Diff(DELETE, \"ca\"), Diff(EQUAL, \"c\"), Diff(DELETE, \"b\"), Diff(EQUAL, \"a\"));\n  dmp.diff_cleanupMerge(diffs);\n  assertEquals(\"diff_cleanupMerge: Slide edit right recursive.\", diffList(Diff(EQUAL, \"xca\"), Diff(DELETE, \"cba\")), diffs);\n}\n\nvoid diff_match_patch_test::testDiffCleanupSemanticLossless() {\n  // Slide diffs to match logical boundaries.\n  QList<Diff> diffs = diffList();\n  dmp.diff_cleanupSemanticLossless(diffs);\n  assertEquals(\"diff_cleanupSemantic: Null case.\", diffList(), diffs);\n\n  diffs = diffList(Diff(EQUAL, \"AAA\\r\\n\\r\\nBBB\"), Diff(INSERT, \"\\r\\nDDD\\r\\n\\r\\nBBB\"), Diff(EQUAL, \"\\r\\nEEE\"));\n  dmp.diff_cleanupSemanticLossless(diffs);\n  assertEquals(\"diff_cleanupSemanticLossless: Blank lines.\", diffList(Diff(EQUAL, \"AAA\\r\\n\\r\\n\"), Diff(INSERT, \"BBB\\r\\nDDD\\r\\n\\r\\n\"), Diff(EQUAL, \"BBB\\r\\nEEE\")), diffs);\n\n  diffs = diffList(Diff(EQUAL, \"AAA\\r\\nBBB\"), Diff(INSERT, \" DDD\\r\\nBBB\"), Diff(EQUAL, \" EEE\"));\n  dmp.diff_cleanupSemanticLossless(diffs);\n  assertEquals(\"diff_cleanupSemanticLossless: Line boundaries.\", diffList(Diff(EQUAL, \"AAA\\r\\n\"), Diff(INSERT, \"BBB DDD\\r\\n\"), Diff(EQUAL, \"BBB EEE\")), diffs);\n\n  diffs = diffList(Diff(EQUAL, \"The c\"), Diff(INSERT, \"ow and the c\"), Diff(EQUAL, \"at.\"));\n  dmp.diff_cleanupSemanticLossless(diffs);\n  assertEquals(\"diff_cleanupSemantic: Word boundaries.\", diffList(Diff(EQUAL, \"The \"), Diff(INSERT, \"cow and the \"), Diff(EQUAL, \"cat.\")), diffs);\n\n  diffs = diffList(Diff(EQUAL, \"The-c\"), Diff(INSERT, \"ow-and-the-c\"), Diff(EQUAL, \"at.\"));\n  dmp.diff_cleanupSemanticLossless(diffs);\n  assertEquals(\"diff_cleanupSemantic: Alphanumeric boundaries.\", diffList(Diff(EQUAL, \"The-\"), Diff(INSERT, \"cow-and-the-\"), Diff(EQUAL, \"cat.\")), diffs);\n\n  diffs = diffList(Diff(EQUAL, \"a\"), Diff(DELETE, \"a\"), Diff(EQUAL, \"ax\"));\n  dmp.diff_cleanupSemanticLossless(diffs);\n  assertEquals(\"diff_cleanupSemantic: Hitting the start.\", diffList(Diff(DELETE, \"a\"), Diff(EQUAL, \"aax\")), diffs);\n\n  diffs = diffList(Diff(EQUAL, \"xa\"), Diff(DELETE, \"a\"), Diff(EQUAL, \"a\"));\n  dmp.diff_cleanupSemanticLossless(diffs);\n  assertEquals(\"diff_cleanupSemantic: Hitting the end.\", diffList(Diff(EQUAL, \"xaa\"), Diff(DELETE, \"a\")), diffs);\n}\n\nvoid diff_match_patch_test::testDiffCleanupSemantic() {\n  // Cleanup semantically trivial equalities.\n  QList<Diff> diffs = diffList();\n  dmp.diff_cleanupSemantic(diffs);\n  assertEquals(\"diff_cleanupSemantic: Null case.\", diffList(), diffs);\n\n  diffs = diffList(Diff(DELETE, \"a\"), Diff(INSERT, \"b\"), Diff(EQUAL, \"cd\"), Diff(DELETE, \"e\"));\n  dmp.diff_cleanupSemantic(diffs);\n  assertEquals(\"diff_cleanupSemantic: No elimination.\", diffList(Diff(DELETE, \"a\"), Diff(INSERT, \"b\"), Diff(EQUAL, \"cd\"), Diff(DELETE, \"e\")), diffs);\n\n  diffs = diffList(Diff(DELETE, \"a\"), Diff(EQUAL, \"b\"), Diff(DELETE, \"c\"));\n  dmp.diff_cleanupSemantic(diffs);\n  assertEquals(\"diff_cleanupSemantic: Simple elimination.\", diffList(Diff(DELETE, \"abc\"), Diff(INSERT, \"b\")), diffs);\n\n  diffs = diffList(Diff(DELETE, \"ab\"), Diff(EQUAL, \"cd\"), Diff(DELETE, \"e\"), Diff(EQUAL, \"f\"), Diff(INSERT, \"g\"));\n  dmp.diff_cleanupSemantic(diffs);\n  assertEquals(\"diff_cleanupSemantic: Backpass elimination.\", diffList(Diff(DELETE, \"abcdef\"), Diff(INSERT, \"cdfg\")), diffs);\n\n  diffs = diffList(Diff(INSERT, \"1\"), Diff(EQUAL, \"A\"), Diff(DELETE, \"B\"), Diff(INSERT, \"2\"), Diff(EQUAL, \"_\"), Diff(INSERT, \"1\"), Diff(EQUAL, \"A\"), Diff(DELETE, \"B\"), Diff(INSERT, \"2\"));\n  dmp.diff_cleanupSemantic(diffs);\n  assertEquals(\"diff_cleanupSemantic: Multiple elimination.\", diffList(Diff(DELETE, \"AB_AB\"), Diff(INSERT, \"1A2_1A2\")), diffs);\n\n  diffs = diffList(Diff(EQUAL, \"The c\"), Diff(DELETE, \"ow and the c\"), Diff(EQUAL, \"at.\"));\n  dmp.diff_cleanupSemantic(diffs);\n  assertEquals(\"diff_cleanupSemantic: Word boundaries.\", diffList(Diff(EQUAL, \"The \"), Diff(DELETE, \"cow and the \"), Diff(EQUAL, \"cat.\")), diffs);\n}\n\nvoid diff_match_patch_test::testDiffCleanupEfficiency() {\n  // Cleanup operationally trivial equalities.\n  dmp.Diff_EditCost = 4;\n  QList<Diff> diffs = diffList();\n  dmp.diff_cleanupEfficiency(diffs);\n  assertEquals(\"diff_cleanupEfficiency: Null case.\", diffList(), diffs);\n\n  diffs = diffList(Diff(DELETE, \"ab\"), Diff(INSERT, \"12\"), Diff(EQUAL, \"wxyz\"), Diff(DELETE, \"cd\"), Diff(INSERT, \"34\"));\n  dmp.diff_cleanupEfficiency(diffs);\n  assertEquals(\"diff_cleanupEfficiency: No elimination.\", diffList(Diff(DELETE, \"ab\"), Diff(INSERT, \"12\"), Diff(EQUAL, \"wxyz\"), Diff(DELETE, \"cd\"), Diff(INSERT, \"34\")), diffs);\n\n  diffs = diffList(Diff(DELETE, \"ab\"), Diff(INSERT, \"12\"), Diff(EQUAL, \"xyz\"), Diff(DELETE, \"cd\"), Diff(INSERT, \"34\"));\n  dmp.diff_cleanupEfficiency(diffs);\n  assertEquals(\"diff_cleanupEfficiency: Four-edit elimination.\", diffList(Diff(DELETE, \"abxyzcd\"), Diff(INSERT, \"12xyz34\")), diffs);\n\n  diffs = diffList(Diff(INSERT, \"12\"), Diff(EQUAL, \"x\"), Diff(DELETE, \"cd\"), Diff(INSERT, \"34\"));\n  dmp.diff_cleanupEfficiency(diffs);\n  assertEquals(\"diff_cleanupEfficiency: Three-edit elimination.\", diffList(Diff(DELETE, \"xcd\"), Diff(INSERT, \"12x34\")), diffs);\n\n  diffs = diffList(Diff(DELETE, \"ab\"), Diff(INSERT, \"12\"), Diff(EQUAL, \"xy\"), Diff(INSERT, \"34\"), Diff(EQUAL, \"z\"), Diff(DELETE, \"cd\"), Diff(INSERT, \"56\"));\n  dmp.diff_cleanupEfficiency(diffs);\n  assertEquals(\"diff_cleanupEfficiency: Backpass elimination.\", diffList(Diff(DELETE, \"abxyzcd\"), Diff(INSERT, \"12xy34z56\")), diffs);\n\n  dmp.Diff_EditCost = 5;\n  diffs = diffList(Diff(DELETE, \"ab\"), Diff(INSERT, \"12\"), Diff(EQUAL, \"wxyz\"), Diff(DELETE, \"cd\"), Diff(INSERT, \"34\"));\n  dmp.diff_cleanupEfficiency(diffs);\n  assertEquals(\"diff_cleanupEfficiency: High cost elimination.\", diffList(Diff(DELETE, \"abwxyzcd\"), Diff(INSERT, \"12wxyz34\")), diffs);\n  dmp.Diff_EditCost = 4;\n}\n\nvoid diff_match_patch_test::testDiffPrettyHtml() {\n  // Pretty print.\n  QList<Diff> diffs = diffList(Diff(EQUAL, \"a\\n\"), Diff(DELETE, \"<B>b</B>\"), Diff(INSERT, \"c&d\"));\n  assertEquals(\"diff_prettyHtml:\", \"<SPAN TITLE=\\\"i=0\\\">a&para;<BR></SPAN><DEL STYLE=\\\"background:#FFE6E6;\\\" TITLE=\\\"i=2\\\">&lt;B&gt;b&lt;/B&gt;</DEL><INS STYLE=\\\"background:#E6FFE6;\\\" TITLE=\\\"i=2\\\">c&amp;d</INS>\", dmp.diff_prettyHtml(diffs));\n}\n\nvoid diff_match_patch_test::testDiffText() {\n  // Compute the source and destination texts.\n  QList<Diff> diffs = diffList(Diff(EQUAL, \"jump\"), Diff(DELETE, \"s\"), Diff(INSERT, \"ed\"), Diff(EQUAL, \" over \"), Diff(DELETE, \"the\"), Diff(INSERT, \"a\"), Diff(EQUAL, \" lazy\"));\n  assertEquals(\"diff_text1:\", \"jumps over the lazy\", dmp.diff_text1(diffs));\n  assertEquals(\"diff_text2:\", \"jumped over a lazy\", dmp.diff_text2(diffs));\n}\n\nvoid diff_match_patch_test::testDiffDelta() {\n  // Convert a diff into delta string.\n  QList<Diff> diffs = diffList(Diff(EQUAL, \"jump\"), Diff(DELETE, \"s\"), Diff(INSERT, \"ed\"), Diff(EQUAL, \" over \"), Diff(DELETE, \"the\"), Diff(INSERT, \"a\"), Diff(EQUAL, \" lazy\"), Diff(INSERT, \"old dog\"));\n  QString text1 = dmp.diff_text1(diffs);\n  assertEquals(\"diff_text1: Base text.\", \"jumps over the lazy\", text1);\n\n  QString delta = dmp.diff_toDelta(diffs);\n  assertEquals(\"diff_toDelta:\", \"=4\\t-1\\t+ed\\t=6\\t-3\\t+a\\t=5\\t+old dog\", delta);\n\n  // Convert delta string into a diff.\n  assertEquals(\"diff_fromDelta: Normal.\", diffs, dmp.diff_fromDelta(text1, delta));\n\n  // Generates error (19 < 20).\n  try {\n    dmp.diff_fromDelta(text1 + \"x\", delta);\n    throw \"diff_fromDelta: Too long.\";\n  } catch (QString ex) {\n    // Exception expected.\n  }\n\n  // Generates error (19 > 18).\n  try {\n    dmp.diff_fromDelta(text1.mid(1), delta);\n    throw \"diff_fromDelta: Too short.\";\n  } catch (QString ex) {\n    // Exception expected.\n  }\n\n  // Generates error (%c3%xy invalid Unicode).\n  /* This test does not work because QUrl::fromPercentEncoding(\"%xy\") -> \"?\"\n  try {\n    dmp.diff_fromDelta(\"\", \"+%c3%xy\");\n    throw \"diff_fromDelta: Invalid character.\";\n  } catch (QString ex) {\n    // Exception expected.\n  }\n  */\n\n  // Test deltas with special characters.\n  diffs = diffList(Diff(EQUAL, QString::fromWCharArray((const wchar_t*) L\"\\u0680 \\000 \\t %\", 7)), Diff(DELETE, QString::fromWCharArray((const wchar_t*) L\"\\u0681 \\001 \\n ^\", 7)), Diff(INSERT, QString::fromWCharArray((const wchar_t*) L\"\\u0682 \\002 \\\\ |\", 7)));\n  text1 = dmp.diff_text1(diffs);\n  assertEquals(\"diff_text1: Unicode text.\", QString::fromWCharArray((const wchar_t*) L\"\\u0680 \\000 \\t %\\u0681 \\001 \\n ^\", 14), text1);\n\n  delta = dmp.diff_toDelta(diffs);\n  assertEquals(\"diff_toDelta: Unicode.\", \"=7\\t-7\\t+%DA%82 %02 %5C %7C\", delta);\n\n  assertEquals(\"diff_fromDelta: Unicode.\", diffs, dmp.diff_fromDelta(text1, delta));\n\n  // Verify pool of unchanged characters.\n  diffs = diffList(Diff(INSERT, \"A-Z a-z 0-9 - _ . ! ~ * ' ( ) ; / ? : @ & = + $ , # \"));\n  QString text2 = dmp.diff_text2(diffs);\n  assertEquals(\"diff_text2: Unchanged characters.\", \"A-Z a-z 0-9 - _ . ! ~ * \\' ( ) ; / ? : @ & = + $ , # \", text2);\n\n  delta = dmp.diff_toDelta(diffs);\n  assertEquals(\"diff_toDelta: Unchanged characters.\", \"+A-Z a-z 0-9 - _ . ! ~ * \\' ( ) ; / ? : @ & = + $ , # \", delta);\n\n  // Convert delta string into a diff.\n  assertEquals(\"diff_fromDelta: Unchanged characters.\", diffs, dmp.diff_fromDelta(\"\", delta));\n}\n\nvoid diff_match_patch_test::testDiffXIndex() {\n  // Translate a location in text1 to text2.\n  QList<Diff> diffs = diffList(Diff(DELETE, \"a\"), Diff(INSERT, \"1234\"), Diff(EQUAL, \"xyz\"));\n  assertEquals(\"diff_xIndex: Translation on equality.\", 5, dmp.diff_xIndex(diffs, 2));\n\n  diffs = diffList(Diff(EQUAL, \"a\"), Diff(DELETE, \"1234\"), Diff(EQUAL, \"xyz\"));\n  assertEquals(\"diff_xIndex: Translation on deletion.\", 1, dmp.diff_xIndex(diffs, 3));\n}\n\nvoid diff_match_patch_test::testDiffLevenshtein() {\n  QList<Diff> diffs = diffList(Diff(DELETE, \"abc\"), Diff(INSERT, \"1234\"), Diff(EQUAL, \"xyz\"));\n  assertEquals(\"Levenshtein with trailing equality.\", 4, dmp.diff_levenshtein(diffs));\n\n  diffs = diffList(Diff(EQUAL, \"xyz\"), Diff(DELETE, \"abc\"), Diff(INSERT, \"1234\"));\n  assertEquals(\"Levenshtein with leading equality.\", 4, dmp.diff_levenshtein(diffs));\n\n  diffs = diffList(Diff(DELETE, \"abc\"), Diff(EQUAL, \"xyz\"), Diff(INSERT, \"1234\"));\n  assertEquals(\"Levenshtein with middle equality.\", 7, dmp.diff_levenshtein(diffs));\n}\n\nvoid diff_match_patch_test::testDiffPath() {\n  // Single letters.\n  // Trace a path from back to front.\n  QList<QSet<QPair<int, int> > > v_map;\n  QSet<QPair<int, int> > row_set;\n  {\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(0, 0));\n    v_map.append(row_set);\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(0, 1));\n    row_set.insert(QPair<int, int>(1, 0));\n    v_map.append(row_set);\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(0, 2));\n    row_set.insert(QPair<int, int>(2, 0));\n    row_set.insert(QPair<int, int>(2, 2));\n    v_map.append(row_set);\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(0, 3));\n    row_set.insert(QPair<int, int>(2, 3));\n    row_set.insert(QPair<int, int>(3, 0));\n    row_set.insert(QPair<int, int>(4, 3));\n    v_map.append(row_set);\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(0, 4));\n    row_set.insert(QPair<int, int>(2, 4));\n    row_set.insert(QPair<int, int>(4, 0));\n    row_set.insert(QPair<int, int>(4, 4));\n    row_set.insert(QPair<int, int>(5, 3));\n    v_map.append(row_set);\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(0, 5));\n    row_set.insert(QPair<int, int>(2, 5));\n    row_set.insert(QPair<int, int>(4, 5));\n    row_set.insert(QPair<int, int>(5, 0));\n    row_set.insert(QPair<int, int>(6, 3));\n    row_set.insert(QPair<int, int>(6, 5));\n    v_map.append(row_set);\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(0, 6));\n    row_set.insert(QPair<int, int>(2, 6));\n    row_set.insert(QPair<int, int>(4, 6));\n    row_set.insert(QPair<int, int>(6, 6));\n    row_set.insert(QPair<int, int>(7, 5));\n    v_map.append(row_set);\n  }\n  QList<Diff> diffs = diffList(Diff(INSERT, \"W\"), Diff(DELETE, \"A\"), Diff(EQUAL, \"1\"), Diff(DELETE, \"B\"), Diff(EQUAL, \"2\"), Diff(INSERT, \"X\"), Diff(DELETE, \"C\"), Diff(EQUAL, \"3\"), Diff(DELETE, \"D\"));\n  assertEquals(\"diff_path1: Single letters.\", diffs, dmp.diff_path1(v_map, \"A1B2C3D\", \"W12X3\"));\n\n  // Trace a path from front to back.\n  v_map.removeAt(v_map.size() - 1);\n  diffs = diffList(Diff(EQUAL, \"4\"), Diff(DELETE, \"E\"), Diff(INSERT, \"Y\"), Diff(EQUAL, \"5\"), Diff(DELETE, \"F\"), Diff(EQUAL, \"6\"), Diff(DELETE, \"G\"), Diff(INSERT, \"Z\"));\n  assertEquals(\"diff_path2: Single letters.\", diffs, dmp.diff_path2(v_map, \"4E5F6G\", \"4Y56Z\"));\n\n  // Double letters.\n  // Trace a path from back to front.\n  v_map = QList<QSet<QPair<int, int> > >();\n  {\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(0, 0));\n    v_map.append(row_set);\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(0, 1));\n    row_set.insert(QPair<int, int>(1, 0));\n    v_map.append(row_set);\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(0, 2));\n    row_set.insert(QPair<int, int>(1, 1));\n    row_set.insert(QPair<int, int>(2, 0));\n    v_map.append(row_set);\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(0, 3));\n    row_set.insert(QPair<int, int>(1, 2));\n    row_set.insert(QPair<int, int>(2, 1));\n    row_set.insert(QPair<int, int>(3, 0));\n    v_map.append(row_set);\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(0, 4));\n    row_set.insert(QPair<int, int>(1, 3));\n    row_set.insert(QPair<int, int>(3, 1));\n    row_set.insert(QPair<int, int>(4, 0));\n    row_set.insert(QPair<int, int>(4, 4));\n    v_map.append(row_set);\n  }\n  diffs = diffList(Diff(INSERT, \"WX\"), Diff(DELETE, \"AB\"), Diff(EQUAL, \"12\"));\n  assertEquals(\"diff_path1: Double letters.\", diffs, dmp.diff_path1(v_map, \"AB12\", \"WX12\"));\n\n  // Trace a path from front to back.\n  v_map = QList<QSet<QPair<int, int> > >();\n  {\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(0, 0));\n    v_map.append(row_set);\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(0, 1));\n    row_set.insert(QPair<int, int>(1, 0));\n    v_map.append(row_set);\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(1, 1));\n    row_set.insert(QPair<int, int>(2, 0));\n    row_set.insert(QPair<int, int>(2, 4));\n    v_map.append(row_set);\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(2, 1));\n    row_set.insert(QPair<int, int>(2, 5));\n    row_set.insert(QPair<int, int>(3, 0));\n    row_set.insert(QPair<int, int>(3, 4));\n    v_map.append(row_set);\n    row_set = QSet<QPair<int, int> >();\n    row_set.insert(QPair<int, int>(2, 6));\n    row_set.insert(QPair<int, int>(3, 5));\n    row_set.insert(QPair<int, int>(4, 4));\n    v_map.append(row_set);\n  }\n  diffs = diffList(Diff(DELETE, \"CD\"), Diff(EQUAL, \"34\"), Diff(INSERT, \"YZ\"));\n  assertEquals(\"diff_path2: Double letters.\", diffs, dmp.diff_path2(v_map, \"CD34\", \"34YZ\"));\n}\n\nvoid diff_match_patch_test::testDiffMain() {\n  // Perform a trivial diff.\n  QList<Diff> diffs = diffList(Diff(EQUAL, \"abc\"));\n  assertEquals(\"diff_main: Null case.\", diffs, dmp.diff_main(\"abc\", \"abc\", false));\n\n  diffs = diffList(Diff(EQUAL, \"ab\"), Diff(INSERT, \"123\"), Diff(EQUAL, \"c\"));\n  assertEquals(\"diff_main: Simple insertion.\", diffs, dmp.diff_main(\"abc\", \"ab123c\", false));\n\n  diffs = diffList(Diff(EQUAL, \"a\"), Diff(DELETE, \"123\"), Diff(EQUAL, \"bc\"));\n  assertEquals(\"diff_main: Simple deletion.\", diffs, dmp.diff_main(\"a123bc\", \"abc\", false));\n\n  diffs = diffList(Diff(EQUAL, \"a\"), Diff(INSERT, \"123\"), Diff(EQUAL, \"b\"), Diff(INSERT, \"456\"), Diff(EQUAL, \"c\"));\n  assertEquals(\"diff_main: Two insertions.\", diffs, dmp.diff_main(\"abc\", \"a123b456c\", false));\n\n  diffs = diffList(Diff(EQUAL, \"a\"), Diff(DELETE, \"123\"), Diff(EQUAL, \"b\"), Diff(DELETE, \"456\"), Diff(EQUAL, \"c\"));\n  assertEquals(\"diff_main: Two deletions.\", diffs, dmp.diff_main(\"a123b456c\", \"abc\", false));\n\n  // Perform a real diff.\n  // Switch off the timeout.\n  dmp.Diff_Timeout = 0;\n  dmp.Diff_DualThreshold = 32;\n  diffs = diffList(Diff(DELETE, \"a\"), Diff(INSERT, \"b\"));\n  assertEquals(\"diff_main: Simple case #1.\", diffs, dmp.diff_main(\"a\", \"b\", false));\n\n  diffs = diffList(Diff(DELETE, \"Apple\"), Diff(INSERT, \"Banana\"), Diff(EQUAL, \"s are a\"), Diff(INSERT, \"lso\"), Diff(EQUAL, \" fruit.\"));\n  assertEquals(\"diff_main: Simple case #2.\", diffs, dmp.diff_main(\"Apples are a fruit.\", \"Bananas are also fruit.\", false));\n\n  diffs = diffList(Diff(DELETE, \"a\"), Diff(INSERT, QString::fromWCharArray((const wchar_t*) L\"\\u0680\", 1)), Diff(EQUAL, \"x\"), Diff(DELETE, \"\\t\"), Diff(INSERT, QString::fromWCharArray((const wchar_t*) L\"\\000\", 1)));\n  assertEquals(\"diff_main: Simple case #3.\", diffs, dmp.diff_main(\"ax\\t\", QString::fromWCharArray((const wchar_t*) L\"\\u0680x\\000\", 3), false));\n\n  diffs = diffList(Diff(DELETE, \"1\"), Diff(EQUAL, \"a\"), Diff(DELETE, \"y\"), Diff(EQUAL, \"b\"), Diff(DELETE, \"2\"), Diff(INSERT, \"xab\"));\n  assertEquals(\"diff_main: Overlap #1.\", diffs, dmp.diff_main(\"1ayb2\", \"abxab\", false));\n\n  diffs = diffList(Diff(INSERT, \"xaxcx\"), Diff(EQUAL, \"abc\"), Diff(DELETE, \"y\"));\n  assertEquals(\"diff_main: Overlap #2.\", diffs, dmp.diff_main(\"abcy\", \"xaxcxabc\", false));\n\n  // Sub-optimal double-ended diff.\n  dmp.Diff_DualThreshold = 2;\n  diffs = diffList(Diff(INSERT, \"x\"), Diff(EQUAL, \"a\"), Diff(DELETE, \"b\"), Diff(INSERT, \"x\"), Diff(EQUAL, \"c\"), Diff(DELETE, \"y\"), Diff(INSERT, \"xabc\"));\n  assertEquals(\"diff_main: Overlap #3.\", diffs, dmp.diff_main(\"abcy\", \"xaxcxabc\", false));\n  dmp.Diff_DualThreshold = 32;\n\n  dmp.Diff_Timeout = 0.001f;  // 1ms\n  // This test may 'fail' on extremely fast computers.  If so, just increase the text lengths.\n  QString a = \"`Twas brillig, and the slithy toves\\nDid gyre and gimble in the wabe:\\nAll mimsy were the borogoves,\\nAnd the mome raths outgrabe.\\n\";\n  QString b = \"I am the very model of a modern major general,\\nI've information vegetable, animal, and mineral,\\nI know the kings of England, and I quote the fights historical,\\nFrom Marathon to Waterloo, in order categorical.\\n\";\n  // Increase the text lengths by 1024 times to ensure a timeout.\n  for (int x = 0; x < 10; x++) {\n    a = a + a;\n    b = b + b;\n  }\n  assertNull(\"diff_main: Timeout.\", dmp.diff_map(a, b));\n  dmp.Diff_Timeout = 0;\n\n  // Test the linemode speedup.\n  // Must be long to pass the 200 char cutoff.\n  a = \"1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n\";\n  b = \"abcdefghij\\nabcdefghij\\nabcdefghij\\nabcdefghij\\nabcdefghij\\nabcdefghij\\nabcdefghij\\nabcdefghij\\nabcdefghij\\nabcdefghij\\nabcdefghij\\nabcdefghij\\nabcdefghij\\n\";\n  assertEquals(\"diff_main: Simple.\", dmp.diff_main(a, b, true), dmp.diff_main(a, b, false));\n\n  a = \"1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n1234567890\\n\";\n  b = \"abcdefghij\\n1234567890\\n1234567890\\n1234567890\\nabcdefghij\\n1234567890\\n1234567890\\n1234567890\\nabcdefghij\\n1234567890\\n1234567890\\n1234567890\\nabcdefghij\\n\";\n  QStringList texts_linemode = diff_rebuildtexts(dmp.diff_main(a, b, true));\n  QStringList texts_textmode = diff_rebuildtexts(dmp.diff_main(a, b, false));\n  assertEquals(\"diff_main: Overlap.\", texts_textmode, texts_linemode);\n}\n\n\n//  MATCH TEST FUNCTIONS\n\n\nvoid diff_match_patch_test::testMatchAlphabet() {\n  // Initialise the bitmasks for Bitap.\n  QMap<QChar, int> bitmask;\n  bitmask.insert('a', 4);\n  bitmask.insert('b', 2);\n  bitmask.insert('c', 1);\n  assertEquals(\"match_alphabet: Unique.\", bitmask, dmp.match_alphabet(\"abc\"));\n\n  bitmask = QMap<QChar, int>();\n  bitmask.insert('a', 37);\n  bitmask.insert('b', 18);\n  bitmask.insert('c', 8);\n  assertEquals(\"match_alphabet: Duplicates.\", bitmask, dmp.match_alphabet(\"abcaba\"));\n}\n\nvoid diff_match_patch_test::testMatchBitap() {\n  // Bitap algorithm.\n  dmp.Match_Distance = 100;\n  dmp.Match_Threshold = 0.5f;\n  assertEquals(\"match_bitap: Exact match #1.\", 5, dmp.match_bitap(\"abcdefghijk\", \"fgh\", 5));\n\n  assertEquals(\"match_bitap: Exact match #2.\", 5, dmp.match_bitap(\"abcdefghijk\", \"fgh\", 0));\n\n  assertEquals(\"match_bitap: Fuzzy match #1.\", 4, dmp.match_bitap(\"abcdefghijk\", \"efxhi\", 0));\n\n  assertEquals(\"match_bitap: Fuzzy match #2.\", 2, dmp.match_bitap(\"abcdefghijk\", \"cdefxyhijk\", 5));\n\n  assertEquals(\"match_bitap: Fuzzy match #3.\", -1, dmp.match_bitap(\"abcdefghijk\", \"bxy\", 1));\n\n  assertEquals(\"match_bitap: Overflow.\", 2, dmp.match_bitap(\"123456789xx0\", \"3456789x0\", 2));\n\n  assertEquals(\"match_bitap: Before start match.\", 0, dmp.match_bitap(\"abcdef\", \"xxabc\", 4));\n\n  assertEquals(\"match_bitap: Beyond end match.\", 3, dmp.match_bitap(\"abcdef\", \"defyy\", 4));\n\n  assertEquals(\"match_bitap: Oversized pattern.\", 0, dmp.match_bitap(\"abcdef\", \"xabcdefy\", 0));\n\n  dmp.Match_Threshold = 0.4f;\n  assertEquals(\"match_bitap: Threshold #1.\", 4, dmp.match_bitap(\"abcdefghijk\", \"efxyhi\", 1));\n\n  dmp.Match_Threshold = 0.3f;\n  assertEquals(\"match_bitap: Threshold #2.\", -1, dmp.match_bitap(\"abcdefghijk\", \"efxyhi\", 1));\n\n  dmp.Match_Threshold = 0.0f;\n  assertEquals(\"match_bitap: Threshold #3.\", 1, dmp.match_bitap(\"abcdefghijk\", \"bcdef\", 1));\n\n  dmp.Match_Threshold = 0.5f;\n  assertEquals(\"match_bitap: Multiple select #1.\", 0, dmp.match_bitap(\"abcdexyzabcde\", \"abccde\", 3));\n\n  assertEquals(\"match_bitap: Multiple select #2.\", 8, dmp.match_bitap(\"abcdexyzabcde\", \"abccde\", 5));\n\n  dmp.Match_Distance = 10;  // Strict location.\n  assertEquals(\"match_bitap: Distance test #1.\", -1, dmp.match_bitap(\"abcdefghijklmnopqrstuvwxyz\", \"abcdefg\", 24));\n\n  assertEquals(\"match_bitap: Distance test #2.\", 0, dmp.match_bitap(\"abcdefghijklmnopqrstuvwxyz\", \"abcdxxefg\", 1));\n\n  dmp.Match_Distance = 1000;  // Loose location.\n  assertEquals(\"match_bitap: Distance test #3.\", 0, dmp.match_bitap(\"abcdefghijklmnopqrstuvwxyz\", \"abcdefg\", 24));\n}\n\nvoid diff_match_patch_test::testMatchMain() {\n  // Full match.\n  assertEquals(\"match_main: Equality.\", 0, dmp.match_main(\"abcdef\", \"abcdef\", 1000));\n\n  assertEquals(\"match_main: Null text.\", -1, dmp.match_main(\"\", \"abcdef\", 1));\n\n  assertEquals(\"match_main: Null pattern.\", 3, dmp.match_main(\"abcdef\", \"\", 3));\n\n  assertEquals(\"match_main: Exact match.\", 3, dmp.match_main(\"abcdef\", \"de\", 3));\n\n  dmp.Match_Threshold = 0.7f;\n  assertEquals(\"match_main: Complex match.\", 4, dmp.match_main(\"I am the very model of a modern major general.\", \" that berry \", 5));\n  dmp.Match_Threshold = 0.5f;\n}\n\n\n//  PATCH TEST FUNCTIONS\n\n\nvoid diff_match_patch_test::testPatchObj() {\n  // Patch Object.\n  Patch p;\n  p.start1 = 20;\n  p.start2 = 21;\n  p.length1 = 18;\n  p.length2 = 17;\n  p.diffs = diffList(Diff(EQUAL, \"jump\"), Diff(DELETE, \"s\"), Diff(INSERT, \"ed\"), Diff(EQUAL, \" over \"), Diff(DELETE, \"the\"), Diff(INSERT, \"a\"), Diff(EQUAL, \"\\nlaz\"));\n  QString strp = \"@@ -21,18 +22,17 @@\\n jump\\n-s\\n+ed\\n  over \\n-the\\n+a\\n %0Alaz\\n\";\n  assertEquals(\"Patch: toString.\", strp, p.toString());\n}\n\nvoid diff_match_patch_test::testPatchFromText() {\n  assertTrue(\"patch_fromText: #0.\", dmp.patch_fromText(\"\").isEmpty());\n\n  QString strp = \"@@ -21,18 +22,17 @@\\n jump\\n-s\\n+ed\\n  over \\n-the\\n+a\\n %0Alaz\\n\";\n  assertEquals(\"patch_fromText: #1.\", strp, dmp.patch_fromText(strp).value(0).toString());\n\n  assertEquals(\"patch_fromText: #2.\", \"@@ -1 +1 @@\\n-a\\n+b\\n\", dmp.patch_fromText(\"@@ -1 +1 @@\\n-a\\n+b\\n\").value(0).toString());\n\n  assertEquals(\"patch_fromText: #3.\", \"@@ -1,3 +0,0 @@\\n-abc\\n\", dmp.patch_fromText(\"@@ -1,3 +0,0 @@\\n-abc\\n\").value(0).toString());\n\n  assertEquals(\"patch_fromText: #4.\", \"@@ -0,0 +1,3 @@\\n+abc\\n\", dmp.patch_fromText(\"@@ -0,0 +1,3 @@\\n+abc\\n\").value(0).toString());\n\n  // Generates error.\n  try {\n    dmp.patch_fromText(\"Bad\\nPatch\\n\");\n    throw \"patch_fromText: #5\";\n  } catch (QString ex) {\n    // Exception expected.\n  }\n}\n\nvoid diff_match_patch_test::testPatchToText() {\n  QString strp = \"@@ -21,18 +22,17 @@\\n jump\\n-s\\n+ed\\n  over \\n-the\\n+a\\n  laz\\n\";\n  QList<Patch> patches;\n  patches = dmp.patch_fromText(strp);\n  assertEquals(\"patch_toText: Single\", strp, dmp.patch_toText(patches));\n\n  strp = \"@@ -1,9 +1,9 @@\\n-f\\n+F\\n oo+fooba\\n@@ -7,9 +7,9 @@\\n obar\\n-,\\n+.\\n  tes\\n\";\n  patches = dmp.patch_fromText(strp);\n  assertEquals(\"patch_toText: Dual\", strp, dmp.patch_toText(patches));\n}\n\nvoid diff_match_patch_test::testPatchAddContext() {\n  dmp.Patch_Margin = 4;\n  Patch p;\n  p = dmp.patch_fromText(\"@@ -21,4 +21,10 @@\\n-jump\\n+somersault\\n\").value(0);\n  dmp.patch_addContext(p, \"The quick brown fox jumps over the lazy dog.\");\n  assertEquals(\"patch_addContext: Simple case.\", \"@@ -17,12 +17,18 @@\\n fox \\n-jump\\n+somersault\\n s ov\\n\", p.toString());\n\n  p = dmp.patch_fromText(\"@@ -21,4 +21,10 @@\\n-jump\\n+somersault\\n\").value(0);\n  dmp.patch_addContext(p, \"The quick brown fox jumps.\");\n  assertEquals(\"patch_addContext: Not enough trailing context.\", \"@@ -17,10 +17,16 @@\\n fox \\n-jump\\n+somersault\\n s.\\n\", p.toString());\n\n  p = dmp.patch_fromText(\"@@ -3 +3,2 @@\\n-e\\n+at\\n\").value(0);\n  dmp.patch_addContext(p, \"The quick brown fox jumps.\");\n  assertEquals(\"patch_addContext: Not enough leading context.\", \"@@ -1,7 +1,8 @@\\n Th\\n-e\\n+at\\n  qui\\n\", p.toString());\n\n  p = dmp.patch_fromText(\"@@ -3 +3,2 @@\\n-e\\n+at\\n\").value(0);\n  dmp.patch_addContext(p, \"The quick brown fox jumps.  The quick brown fox crashes.\");\n  assertEquals(\"patch_addContext: Ambiguity.\", \"@@ -1,27 +1,28 @@\\n Th\\n-e\\n+at\\n  quick brown fox jumps. \\n\", p.toString());\n}\n\nvoid diff_match_patch_test::testPatchMake() {\n  QList<Patch> patches;\n  QString text1 = \"The quick brown fox jumps over the lazy dog.\";\n  QString text2 = \"That quick brown fox jumped over a lazy dog.\";\n  QString expectedPatch = \"@@ -1,8 +1,7 @@\\n Th\\n-at\\n+e\\n  qui\\n@@ -21,17 +21,18 @@\\n jump\\n-ed\\n+s\\n  over \\n-a\\n+the\\n  laz\\n\";\n  // The second patch must be \"-21,17 +21,18\", not \"-22,17 +21,18\" due to rolling context.\n  patches = dmp.patch_make(text2, text1);\n  assertEquals(\"patch_make: Text2+Text1 inputs\", expectedPatch, dmp.patch_toText(patches));\n\n  expectedPatch = \"@@ -1,11 +1,12 @@\\n Th\\n-e\\n+at\\n  quick b\\n@@ -22,18 +22,17 @@\\n jump\\n-s\\n+ed\\n  over \\n-the\\n+a\\n  laz\\n\";\n  patches = dmp.patch_make(text1, text2);\n  assertEquals(\"patch_make: Text1+Text2 inputs\", expectedPatch, dmp.patch_toText(patches));\n\n  QList<Diff> diffs = dmp.diff_main(text1, text2, false);\n  patches = dmp.patch_make(diffs);\n  assertEquals(\"patch_make: Diff input\", expectedPatch, dmp.patch_toText(patches));\n\n  patches = dmp.patch_make(text1, diffs);\n  assertEquals(\"patch_make: Text1+Diff inputs\", expectedPatch, dmp.patch_toText(patches));\n\n  patches = dmp.patch_make(text1, text2, diffs);\n  assertEquals(\"patch_make: Text1+Text2+Diff inputs (deprecated)\", expectedPatch, dmp.patch_toText(patches));\n\n  patches = dmp.patch_make(\"`1234567890-=[]\\\\;',./\", \"~!@#$%^&*()_+{}|:\\\"<>?\");\n  assertEquals(\"patch_toText: Character encoding.\", \"@@ -1,21 +1,21 @@\\n-%601234567890-=%5B%5D%5C;',./\\n+~!@#$%25%5E&*()_+%7B%7D%7C:%22%3C%3E?\\n\", dmp.patch_toText(patches));\n\n  diffs = diffList(Diff(DELETE, \"`1234567890-=[]\\\\;',./\"), Diff(INSERT, \"~!@#$%^&*()_+{}|:\\\"<>?\"));\n  assertEquals(\"patch_fromText: Character decoding.\", diffs, dmp.patch_fromText(\"@@ -1,21 +1,21 @@\\n-%601234567890-=%5B%5D%5C;',./\\n+~!@#$%25%5E&*()_+%7B%7D%7C:%22%3C%3E?\\n\").value(0).diffs);\n\n  text1 = \"\";\n  for (int x = 0; x < 100; x++) {\n    text1 += \"abcdef\";\n  }\n  text2 = text1 + \"123\";\n  expectedPatch = \"@@ -573,28 +573,31 @@\\n cdefabcdefabcdefabcdefabcdef\\n+123\\n\";\n  patches = dmp.patch_make(text1, text2);\n  assertEquals(\"patch_make: Long string with repeats.\", expectedPatch, dmp.patch_toText(patches));\n}\n\nvoid diff_match_patch_test::testPatchSplitMax() {\n  // Assumes that Match_MaxBits is 32.\n  QList<Patch> patches;\n  patches = dmp.patch_make(\"abcdefghijklmnopqrstuvwxyz01234567890\", \"XabXcdXefXghXijXklXmnXopXqrXstXuvXwxXyzX01X23X45X67X89X0\");\n  dmp.patch_splitMax(patches);\n  assertEquals(\"patch_splitMax: #1.\", \"@@ -1,32 +1,46 @@\\n+X\\n ab\\n+X\\n cd\\n+X\\n ef\\n+X\\n gh\\n+X\\n ij\\n+X\\n kl\\n+X\\n mn\\n+X\\n op\\n+X\\n qr\\n+X\\n st\\n+X\\n uv\\n+X\\n wx\\n+X\\n yz\\n+X\\n 012345\\n@@ -25,13 +39,18 @@\\n zX01\\n+X\\n 23\\n+X\\n 45\\n+X\\n 67\\n+X\\n 89\\n+X\\n 0\\n\", dmp.patch_toText(patches));\n\n  patches = dmp.patch_make(\"abcdef1234567890123456789012345678901234567890123456789012345678901234567890uvwxyz\", \"abcdefuvwxyz\");\n  QString oldToText = dmp.patch_toText(patches);\n  dmp.patch_splitMax(patches);\n  assertEquals(\"patch_splitMax: #2.\", oldToText, dmp.patch_toText(patches));\n\n  patches = dmp.patch_make(\"1234567890123456789012345678901234567890123456789012345678901234567890\", \"abc\");\n  dmp.patch_splitMax(patches);\n  assertEquals(\"patch_splitMax: #3.\", \"@@ -1,32 +1,4 @@\\n-1234567890123456789012345678\\n 9012\\n@@ -29,32 +1,4 @@\\n-9012345678901234567890123456\\n 7890\\n@@ -57,14 +1,3 @@\\n-78901234567890\\n+abc\\n\", dmp.patch_toText(patches));\n\n  patches = dmp.patch_make(\"abcdefghij , h : 0 , t : 1 abcdefghij , h : 0 , t : 1 abcdefghij , h : 0 , t : 1\", \"abcdefghij , h : 1 , t : 1 abcdefghij , h : 1 , t : 1 abcdefghij , h : 0 , t : 1\");\n  dmp.patch_splitMax(patches);\n  assertEquals(\"patch_splitMax: #4.\", \"@@ -2,32 +2,32 @@\\n bcdefghij , h : \\n-0\\n+1\\n  , t : 1 abcdef\\n@@ -29,32 +29,32 @@\\n bcdefghij , h : \\n-0\\n+1\\n  , t : 1 abcdef\\n\", dmp.patch_toText(patches));\n}\n\nvoid diff_match_patch_test::testPatchAddPadding() {\n  QList<Patch> patches;\n  patches = dmp.patch_make(\"\", \"test\");\n  assertEquals(\"patch_addPadding: Both edges full.\", \"@@ -0,0 +1,4 @@\\n+test\\n\", dmp.patch_toText(patches));\n  dmp.patch_addPadding(patches);\n  assertEquals(\"patch_addPadding: Both edges full.\", \"@@ -1,8 +1,12 @@\\n %01%02%03%04\\n+test\\n %01%02%03%04\\n\", dmp.patch_toText(patches));\n\n  patches = dmp.patch_make(\"XY\", \"XtestY\");\n  assertEquals(\"patch_addPadding: Both edges partial.\", \"@@ -1,2 +1,6 @@\\n X\\n+test\\n Y\\n\", dmp.patch_toText(patches));\n  dmp.patch_addPadding(patches);\n  assertEquals(\"patch_addPadding: Both edges partial.\", \"@@ -2,8 +2,12 @@\\n %02%03%04X\\n+test\\n Y%01%02%03\\n\", dmp.patch_toText(patches));\n\n  patches = dmp.patch_make(\"XXXXYYYY\", \"XXXXtestYYYY\");\n  assertEquals(\"patch_addPadding: Both edges none.\", \"@@ -1,8 +1,12 @@\\n XXXX\\n+test\\n YYYY\\n\", dmp.patch_toText(patches));\n  dmp.patch_addPadding(patches);\n  assertEquals(\"patch_addPadding: Both edges none.\", \"@@ -5,8 +5,12 @@\\n XXXX\\n+test\\n YYYY\\n\", dmp.patch_toText(patches));\n}\n\nvoid diff_match_patch_test::testPatchApply() {\n  dmp.Match_Distance = 1000;\n  dmp.Match_Threshold = 0.5f;\n  dmp.Patch_DeleteThreshold = 0.5f;\n  QList<Patch> patches;\n  patches = dmp.patch_make(\"The quick brown fox jumps over the lazy dog.\", \"That quick brown fox jumped over a lazy dog.\");\n  QPair<QString, QVector<bool> > results = dmp.patch_apply(patches, \"The quick brown fox jumps over the lazy dog.\");\n  QVector<bool> boolArray = results.second;\n  QString resultStr = results.first + \"\\t\" + (boolArray[0] ? \"true\" : \"false\") + \"\\t\" + (boolArray[1] ? \"true\" : \"false\");\n  assertEquals(\"patch_apply: Exact match.\", \"That quick brown fox jumped over a lazy dog.\\ttrue\\ttrue\", resultStr);\n\n  results = dmp.patch_apply(patches, \"The quick red rabbit jumps over the tired tiger.\");\n  boolArray = results.second;\n  resultStr = results.first + \"\\t\" + (boolArray[0] ? \"true\" : \"false\") + \"\\t\" + (boolArray[1] ? \"true\" : \"false\");\n  assertEquals(\"patch_apply: Partial match.\", \"That quick red rabbit jumped over a tired tiger.\\ttrue\\ttrue\", resultStr);\n\n  results = dmp.patch_apply(patches, \"I am the very model of a modern major general.\");\n  boolArray = results.second;\n  resultStr = results.first + \"\\t\" + (boolArray[0] ? \"true\" : \"false\") + \"\\t\" + (boolArray[1] ? \"true\" : \"false\");\n  assertEquals(\"patch_apply: Failed match.\", \"I am the very model of a modern major general.\\tfalse\\tfalse\", resultStr);\n\n  patches = dmp.patch_make(\"x1234567890123456789012345678901234567890123456789012345678901234567890y\", \"xabcy\");\n  results = dmp.patch_apply(patches, \"x123456789012345678901234567890-----++++++++++-----123456789012345678901234567890y\");\n  boolArray = results.second;\n  resultStr = results.first + \"\\t\" + (boolArray[0] ? \"true\" : \"false\") + \"\\t\" + (boolArray[1] ? \"true\" : \"false\");\n  assertEquals(\"patch_apply: Big delete, small change.\", \"xabcy\\ttrue\\ttrue\", resultStr);\n\n  patches = dmp.patch_make(\"x1234567890123456789012345678901234567890123456789012345678901234567890y\", \"xabcy\");\n  results = dmp.patch_apply(patches, \"x12345678901234567890---------------++++++++++---------------12345678901234567890y\");\n  boolArray = results.second;\n  resultStr = results.first + \"\\t\" + (boolArray[0] ? \"true\" : \"false\") + \"\\t\" + (boolArray[1] ? \"true\" : \"false\");\n  assertEquals(\"patch_apply: Big delete, large change 1.\", \"xabc12345678901234567890---------------++++++++++---------------12345678901234567890y\\tfalse\\ttrue\", resultStr);\n\n  dmp.Patch_DeleteThreshold = 0.6f;\n  patches = dmp.patch_make(\"x1234567890123456789012345678901234567890123456789012345678901234567890y\", \"xabcy\");\n  results = dmp.patch_apply(patches, \"x12345678901234567890---------------++++++++++---------------12345678901234567890y\");\n  boolArray = results.second;\n  resultStr = results.first + \"\\t\" + (boolArray[0] ? \"true\" : \"false\") + \"\\t\" + (boolArray[1] ? \"true\" : \"false\");\n  assertEquals(\"patch_apply: Big delete, large change 2.\", \"xabcy\\ttrue\\ttrue\", resultStr);\n  dmp.Patch_DeleteThreshold = 0.5f;\n\n  dmp.Match_Threshold = 0.0f;\n  dmp.Match_Distance = 0;\n  patches = dmp.patch_make(\"abcdefghijklmnopqrstuvwxyz--------------------1234567890\", \"abcXXXXXXXXXXdefghijklmnopqrstuvwxyz--------------------1234567YYYYYYYYYY890\");\n  results = dmp.patch_apply(patches, \"ABCDEFGHIJKLMNOPQRSTUVWXYZ--------------------1234567890\");\n  boolArray = results.second;\n  resultStr = results.first + \"\\t\" + (boolArray[0] ? \"true\" : \"false\") + \"\\t\" + (boolArray[1] ? \"true\" : \"false\");\n  assertEquals(\"Compensate for failed patch.\", \"ABCDEFGHIJKLMNOPQRSTUVWXYZ--------------------1234567YYYYYYYYYY890\\tfalse\\ttrue\", resultStr);\n  dmp.Match_Threshold = 0.5f;\n  dmp.Match_Distance = 1000;\n\n  patches = dmp.patch_make(\"\", \"test\");\n  QString patchStr = dmp.patch_toText(patches);\n  dmp.patch_apply(patches, \"\");\n  assertEquals(\"patch_apply: No side effects.\", patchStr, dmp.patch_toText(patches));\n\n  patches = dmp.patch_make(\"The quick brown fox jumps over the lazy dog.\", \"Woof\");\n  patchStr = dmp.patch_toText(patches);\n  dmp.patch_apply(patches, \"The quick brown fox jumps over the lazy dog.\");\n  assertEquals(\"patch_apply: No side effects with major delete.\", patchStr, dmp.patch_toText(patches));\n\n  patches = dmp.patch_make(\"\", \"test\");\n  results = dmp.patch_apply(patches, \"\");\n  boolArray = results.second;\n  resultStr = results.first + \"\\t\" + (boolArray[0] ? \"true\" : \"false\");\n  assertEquals(\"patch_apply: Edge exact match.\", \"test\\ttrue\", resultStr);\n\n  patches = dmp.patch_make(\"XY\", \"XtestY\");\n  results = dmp.patch_apply(patches, \"XY\");\n  boolArray = results.second;\n  resultStr = results.first + \"\\t\" + (boolArray[0] ? \"true\" : \"false\");\n  assertEquals(\"patch_apply: Near edge exact match.\", \"XtestY\\ttrue\", resultStr);\n\n  patches = dmp.patch_make(\"y\", \"y123\");\n  results = dmp.patch_apply(patches, \"x\");\n  boolArray = results.second;\n  resultStr = results.first + \"\\t\" + (boolArray[0] ? \"true\" : \"false\");\n  assertEquals(\"patch_apply: Edge partial match.\", \"x123\\ttrue\", resultStr);\n}\n\n\nvoid diff_match_patch_test::assertEquals(const QString &strCase, int n1, int n2) {\n  if (n1 != n2) {\n    qDebug(qPrintable(QString(\"%1 FAIL\\nExpected: %2\\nActual: %3\")\n        .arg(strCase, QString::number(n1), QString::number(n2))));\n    throw strCase;\n  }\n  qDebug(qPrintable(QString(\"%1 OK\").arg(strCase)));\n}\n\nvoid diff_match_patch_test::assertEquals(const QString &strCase, const QString &s1, const QString &s2) {\n  if (s1 != s2) {\n    qDebug(qPrintable(QString(\"%1 FAIL\\nExpected: %2\\nActual: %3\")\n        .arg(strCase, s1, s2)));\n    throw strCase;\n  }\n  qDebug(qPrintable(QString(\"%1 OK\").arg(strCase)));\n}\n\nvoid diff_match_patch_test::assertEquals(const QString &strCase, const Diff &d1, const Diff &d2) {\n  if (d1 != d2) {\n    qDebug(qPrintable(QString(\"%1 FAIL\\nExpected: %2\\nActual: %3\")\n        .arg(strCase, d1.toString(), d2.toString())));\n    throw strCase;\n  }\n  qDebug(qPrintable(QString(\"%1 OK\").arg(strCase)));\n}\n\nvoid diff_match_patch_test::assertEquals(const QString &strCase, const QList<Diff> &list1, const QList<Diff> &list2) {\n  bool fail = false;\n  if (list1.count() == list2.count()) {\n    int i = 0;\n    foreach(Diff d1, list1) {\n      Diff d2 = list2.value(i);\n      if (d1 != d2) {\n        fail = true;\n        break;\n      }\n      i++;\n    }\n  } else {\n    fail = true;\n  }\n\n  if (fail) {\n    // Build human readable description of both lists.\n    QString listString1 = \"(\";\n    bool first = true;\n    foreach(Diff d1, list1) {\n      if (!first) {\n        listString1 += \", \";\n      }\n      listString1 += d1.toString();\n      first = false;\n    }\n    listString1 += \")\";\n    QString listString2 = \"(\";\n    first = true;\n    foreach(Diff d2, list2) {\n      if (!first) {\n        listString2 += \", \";\n      }\n      listString2 += d2.toString();\n      first = false;\n    }\n    listString2 += \")\";\n    qDebug(qPrintable(QString(\"%1 FAIL\\nExpected: %2\\nActual: %3\")\n        .arg(strCase, listString1, listString2)));\n    throw strCase;\n  }\n  qDebug(qPrintable(QString(\"%1 OK\").arg(strCase)));\n}\n\nvoid diff_match_patch_test::assertEquals(const QString &strCase, const QList<QVariant> &list1, const QList<QVariant> &list2) {\n  bool fail = false;\n  if (list1.count() == list2.count()) {\n    int i = 0;\n    foreach(QVariant q1, list1) {\n      QVariant q2 = list2.value(i);\n      if (q1 != q2) {\n        fail = true;\n        break;\n      }\n      i++;\n    }\n  } else {\n    fail = true;\n  }\n\n  if (fail) {\n    // Build human readable description of both lists.\n    QString listString1 = \"(\";\n    bool first = true;\n    foreach(QVariant q1, list1) {\n      if (!first) {\n        listString1 += \", \";\n      }\n      listString1 += q1.toString();\n      first = false;\n    }\n    listString1 += \")\";\n    QString listString2 = \"(\";\n    first = true;\n    foreach(QVariant q2, list2) {\n      if (!first) {\n        listString2 += \", \";\n      }\n      listString2 += q2.toString();\n      first = false;\n    }\n    listString2 += \")\";\n    qDebug(qPrintable(QString(\"%1 FAIL\\nExpected: %2\\nActual: %3\")\n        .arg(strCase, listString1, listString2)));\n    throw strCase;\n  }\n  qDebug(qPrintable(QString(\"%1 OK\").arg(strCase)));\n}\n\nvoid diff_match_patch_test::assertEquals(const QString &strCase, const QVariant &var1, const QVariant &var2) {\n  if (var1 != var2) {\n    qDebug(qPrintable(QString(\"%1 FAIL\\nExpected: %2\\nActual: %3\")\n        .arg(strCase, var1.toString(), var2.toString())));\n    throw strCase;\n  }\n  qDebug(qPrintable(QString(\"%1 OK\").arg(strCase)));\n}\n\nvoid diff_match_patch_test::assertEquals(const QString &strCase, const QMap<QChar, int> &m1, const QMap<QChar, int> &m2) {\n  QMapIterator<QChar, int> i1(m1), i2(m2);\n\n  while (i1.hasNext() && i2.hasNext()) {\n    i1.next();\n    i2.next();\n    if (i1.key() != i2.key() || i1.value() != i2.value()) {\n      qDebug(qPrintable(QString(\"%1 FAIL\\nExpected: (%2, %3)\\nActual: (%4, %5)\")\n          .arg(strCase, QString(i1.key()), QString::number(i1.value()), QString(i2.key()), QString::number(i2.value()))));\n      throw strCase;\n    }\n  }\n\n  if (i1.hasNext()) {\n    i1.next();\n    qDebug(qPrintable(QString(\"%1 FAIL\\nExpected: (%2, %3)\\nActual: none\")\n        .arg(strCase, QString(i1.key()), QString::number(i1.value()))));\n    throw strCase;\n  }\n  if (i2.hasNext()) {\n    i2.next();\n    qDebug(qPrintable(QString(\"%1 FAIL\\nExpected: none\\nActual: (%2, %3)\")\n        .arg(strCase, QString(i2.key()), QString::number(i2.value()))));\n    throw strCase;\n  }\n  qDebug(qPrintable(QString(\"%1 OK\").arg(strCase)));\n}\n\nvoid diff_match_patch_test::assertEquals(const QString &strCase, const QStringList &list1, const QStringList &list2) {\n  if (list1 != list2) {\n    qDebug(qPrintable(QString(\"%1 FAIL\\nExpected: %2\\nActual: %3\")\n        .arg(strCase, list1.join(\",\"), list2.join(\",\"))));\n    throw strCase;\n  }\n  qDebug(qPrintable(QString(\"%1 OK\").arg(strCase)));\n}\n\nvoid diff_match_patch_test::assertTrue(const QString &strCase, bool value) {\n  if (!value) {\n    qDebug(qPrintable(QString(\"%1 FAIL\\nExpected: %2\\nActual: %3\")\n        .arg(strCase, \"true\", \"false\")));\n    throw strCase;\n  }\n  qDebug(qPrintable(QString(\"%1 OK\").arg(strCase)));\n}\n\nvoid diff_match_patch_test::assertFalse(const QString &strCase, bool value) {\n  if (value) {\n    qDebug(qPrintable(QString(\"%1 FAIL\\nExpected: %2\\nActual: %3\")\n        .arg(strCase, \"false\", \"true\")));\n    throw strCase;\n  }\n  qDebug(qPrintable(QString(\"%1 OK\").arg(strCase)));\n}\n\n\n// Construct the two texts which made up the diff originally.\nQStringList diff_match_patch_test::diff_rebuildtexts(QList<Diff> diffs) {\n  QStringList text;\n  text << QString(\"\") << QString(\"\");\n  foreach (Diff myDiff, diffs) {\n    if (myDiff.operation != INSERT) {\n      text[0] += myDiff.text;\n    }\n    if (myDiff.operation != DELETE) {\n      text[1] += myDiff.text;\n    }\n  }\n  return text;\n}\n\nvoid diff_match_patch_test::assertNull(const QString &strCase, const QStringList &list) {\n  if (!list.isEmpty()) {\n    throw strCase;\n  }\n}\n\nvoid diff_match_patch_test::assertNull(const QString &strCase, const QList<Diff> &list) {\n  if (!list.isEmpty()) {\n    throw strCase;\n  }\n}\n\n\n// Private function for quickly building lists of diffs.\nQList<Diff> diff_match_patch_test::diffList(Diff d1, Diff d2, Diff d3, Diff d4, Diff d5,\n  Diff d6, Diff d7, Diff d8, Diff d9, Diff d10) {\n  QList<Diff> listRet;\n  if (d1.operation == EQUAL && d1.text == NULL) {\n    return listRet;\n  }\n  listRet << d1;\n\n  if (d2.operation == EQUAL && d2.text == NULL) {\n    return listRet;\n  }\n  listRet << d2;\n\n  if (d3.operation == EQUAL && d3.text == NULL) {\n    return listRet;\n  }\n  listRet << d3;\n\n  if (d4.operation == EQUAL && d4.text == NULL) {\n    return listRet;\n  }\n  listRet << d4;\n\n  if (d5.operation == EQUAL && d5.text == NULL) {\n    return listRet;\n  }\n  listRet << d5;\n\n  if (d6.operation == EQUAL && d6.text == NULL) {\n    return listRet;\n  }\n  listRet << d6;\n\n  if (d7.operation == EQUAL && d7.text == NULL) {\n    return listRet;\n  }\n  listRet << d7;\n\n  if (d8.operation == EQUAL && d8.text == NULL) {\n    return listRet;\n  }\n  listRet << d8;\n\n  if (d9.operation == EQUAL && d9.text == NULL) {\n    return listRet;\n  }\n  listRet << d9;\n\n  if (d10.operation == EQUAL && d10.text == NULL) {\n    return listRet;\n  }\n  listRet << d10;\n\n  return listRet;\n}\n\n\n/*\nCompile instructions for MinGW and QT4 on Windows:\nqmake -project\nqmake\nmingw32-make\ng++ -o diff_match_patch_test debug\\diff_match_patch_test.o debug\\diff_match_patch.o \\qt4\\lib\\libQtCore4.a\ndiff_match_patch_test.exe\n*/\n"
  },
  {
    "path": "liteidex/src/3rdparty/diff_match_patch/diff_match_patch_test.h",
    "content": "/*\n * Copyright 2008 Google Inc. All Rights Reserved.\n * Author: fraser@google.com (Neil Fraser)\n * Author: mikeslemmer@gmail.com (Mike Slemmer)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Diff Match and Patch -- Test Harness\n * http://code.google.com/p/google-diff-match-patch/\n */\n\n#ifndef DIFF_MATCH_PATCH_TEST_H\n#define DIFF_MATCH_PATCH_TEST_H\n\nclass diff_match_patch_test {\n public:\n  diff_match_patch_test();\n  void run_all_tests();\n\n  //  DIFF TEST FUNCTIONS\n  void testDiffCommonPrefix();\n  void testDiffCommonSuffix();\n  void testDiffHalfmatch();\n  void testDiffLinesToChars();\n  void testDiffCharsToLines();\n  void testDiffCleanupMerge();\n  void testDiffCleanupSemanticLossless();\n  void testDiffCleanupSemantic();\n  void testDiffCleanupEfficiency();\n  void testDiffPrettyHtml();\n  void testDiffText();\n  void testDiffDelta();\n  void testDiffXIndex();\n  void testDiffLevenshtein();\n  void testDiffPath();\n  void testDiffMain();\n\n  //  MATCH TEST FUNCTIONS\n  void testMatchAlphabet();\n  void testMatchBitap();\n  void testMatchMain();\n\n  //  PATCH TEST FUNCTIONS\n  void testPatchObj();\n  void testPatchFromText();\n  void testPatchToText();\n  void testPatchAddContext();\n  void testPatchMake();\n  void testPatchSplitMax();\n  void testPatchAddPadding();\n  void testPatchApply();\n\n private:\n  diff_match_patch dmp;\n\n  // Define equality.\n  void assertEquals(const QString &strCase, int n1, int n2);\n  void assertEquals(const QString &strCase, const QString &s1, const QString &s2);\n  void assertEquals(const QString &strCase, const Diff &d1, const Diff &d2);\n  void assertEquals(const QString &strCase, const QList<Diff> &list1, const QList<Diff> &list2);\n  void assertEquals(const QString &strCase, const QList<QVariant> &list1, const QList<QVariant> &list2);\n  void assertEquals(const QString &strCase, const QVariant &var1, const QVariant &var2);\n  void assertEquals(const QString &strCase, const QMap<QChar, int> &m1, const QMap<QChar, int> &m2);\n  void assertEquals(const QString &strCase, const QStringList &list1, const QStringList &list2);\n  void assertTrue(const QString &strCase, bool value);\n  void assertFalse(const QString &strCase, bool value);\n  void assertNull(const QString &strCase, const QStringList &list);\n  void assertNull(const QString &strCase, const QList<Diff> &list);\n\n  // Construct the two texts which made up the diff originally.\n  QStringList diff_rebuildtexts(QList<Diff> diffs);\n  // Private function for quickly building lists of diffs.\n  QList<Diff> diffList(\n      Diff d1 = Diff(EQUAL, NULL), Diff d2 = Diff(EQUAL, NULL),\n      Diff d3 = Diff(EQUAL, NULL), Diff d4 = Diff(EQUAL, NULL),\n      Diff d5 = Diff(EQUAL, NULL), Diff d6 = Diff(EQUAL, NULL),\n      Diff d7 = Diff(EQUAL, NULL), Diff d8 = Diff(EQUAL, NULL),\n      Diff d9 = Diff(EQUAL, NULL), Diff d10 = Diff(EQUAL, NULL));\n};\n\n#endif // DIFF_MATCH_PATCH_TEST_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/elidedlabel/elidedlabel.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).\n** All rights reserved.\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** This file is part of the QtCore module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:BSD$\n** You may use this file under the terms of the BSD license as follows:\n**\n** \"Redistribution and use in source and binary forms, with or without\n** modification, are permitted provided that the following conditions are\n** met:\n**   * Redistributions of source code must retain the above copyright\n**     notice, this list of conditions and the following disclaimer.\n**   * Redistributions in binary form must reproduce the above copyright\n**     notice, this list of conditions and the following disclaimer in\n**     the documentation and/or other materials provided with the\n**     distribution.\n**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor\n**     the names of its contributors may be used to endorse or promote\n**     products derived from this software without specific prior written\n**     permission.\n**\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#include \"elidedlabel.h\"\n\n#include <QPainter>\n#include <QTextLayout>\n#include <QDebug>\n\n\nElidedLabel::ElidedLabel(QWidget *parent)\n    : QFrame(parent),\n      elided(false),\n      m_elideMode(Qt::ElideRight)\n{\n    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);\n}\n\n\n//! [0]\nElidedLabel::ElidedLabel(const QString &text, QWidget *parent)\n    : QFrame(parent)\n    , elided(false)\n    , content(text)\n    , m_elideMode(Qt::ElideRight)\n{\n    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);\n}\n//! [0]\n\n//! [1]\nvoid ElidedLabel::setText(const QString &newText)\n{\n    content = newText;\n    update();\n}\n\nvoid ElidedLabel::setElideMode(Qt::TextElideMode mode)\n{\n    m_elideMode = mode;\n    update();\n}\n\nQt::TextElideMode ElidedLabel::elideMode() const\n{\n    return m_elideMode;\n}\n//! [1]\n\n//! [2]\nvoid ElidedLabel::paintEvent(QPaintEvent *event)\n{\n    QFrame::paintEvent(event);\n\n    QPainter painter(this);\n    QFontMetrics fontMetrics = painter.fontMetrics();\n\n    bool didElide = false;\n    int lineSpacing = fontMetrics.lineSpacing();\n    int y = (this->height()-lineSpacing)/2;\n\n    QTextLayout textLayout(content, painter.font());\n    textLayout.beginLayout();\n    forever {\n        QTextLine line = textLayout.createLine();\n\n        if (!line.isValid())\n            break;\n\n        line.setLineWidth(width());\n        int nextLineY = y + lineSpacing;\n\n        if (height() >= nextLineY + lineSpacing) {\n            line.draw(&painter, QPoint(0, y));\n            y = nextLineY;\n            //! [2]\n            //! [3]\n        } else {\n            QString lastLine = content.mid(line.textStart());\n            QString elidedLastLine = fontMetrics.elidedText(lastLine, m_elideMode, width());\n            painter.drawText(QPoint(0, y + fontMetrics.ascent()), elidedLastLine);\n            line = textLayout.createLine();\n            didElide = line.isValid();\n            break;\n        }\n    }\n    textLayout.endLayout();\n    //! [3]\n\n    //! [4]\n    if (didElide != elided) {\n        elided = didElide;\n        emit elisionChanged(didElide);\n    }\n}\n//! [4]\n"
  },
  {
    "path": "liteidex/src/3rdparty/elidedlabel/elidedlabel.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).\n** All rights reserved.\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** This file is part of the QtCore module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:BSD$\n** You may use this file under the terms of the BSD license as follows:\n**\n** \"Redistribution and use in source and binary forms, with or without\n** modification, are permitted provided that the following conditions are\n** met:\n**   * Redistributions of source code must retain the above copyright\n**     notice, this list of conditions and the following disclaimer.\n**   * Redistributions in binary form must reproduce the above copyright\n**     notice, this list of conditions and the following disclaimer in\n**     the documentation and/or other materials provided with the\n**     distribution.\n**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor\n**     the names of its contributors may be used to endorse or promote\n**     products derived from this software without specific prior written\n**     permission.\n**\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#ifndef ELIDEDLABEL_H\n#define ELIDEDLABEL_H\n\n#include <QLabel>\n#include <QRect>\n#include <QResizeEvent>\n#include <QString>\n#include <QWidget>\n\n//! [0]\nclass ElidedLabel : public QFrame\n{\n    Q_OBJECT\n    Q_PROPERTY(QString text READ text WRITE setText)\n    Q_PROPERTY(bool isElided READ isElided)\n\npublic:\n    ElidedLabel(QWidget *parent = 0);\n    ElidedLabel(const QString &text, QWidget *parent = 0);\n\n    void setText(const QString &text);\n    const QString & text() const { return content; }\n    bool isElided() const { return elided; }\n    void setElideMode(Qt::TextElideMode mode);\n    Qt::TextElideMode elideMode() const;\nprotected:\n    void paintEvent(QPaintEvent *event);\n\nsignals:\n    void elisionChanged(bool elided);\n\nprivate:\n    bool elided;\n    QString content;\n    Qt::TextElideMode m_elideMode;\n};\n//! [0]\n\n#endif // TEXTWRAPPINGWIDGET_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/elidedlabel/elidedlabel.pri",
    "content": "LIBS *= -l$$qtLibraryName(elidedlabel)\n"
  },
  {
    "path": "liteidex/src/3rdparty/elidedlabel/elidedlabel.pro",
    "content": "TARGET = elidedlabel\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude(../../liteideutils.pri)\n\nHEADERS += \\\n    elidedlabel.h\n\nSOURCES += \\\n    elidedlabel.cpp \n\nRESOURCES +=\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/.gitignore",
    "content": "fakevim_python.pro\r\n*.so.*\r\nsip*\r\n\r\n# Created by https://www.gitignore.io\r\n\r\n### C++ ###\r\n# Compiled Object files\r\n*.slo\r\n*.lo\r\n*.o\r\n*.obj\r\n\r\n# Precompiled Headers\r\n*.gch\r\n*.pch\r\n\r\n# Compiled Dynamic libraries\r\n*.so\r\n*.dylib\r\n*.dll\r\n\r\n# Fortran module files\r\n*.mod\r\n\r\n# Compiled Static libraries\r\n*.lai\r\n*.la\r\n*.a\r\n*.lib\r\n\r\n# Executables\r\n*.exe\r\n*.out\r\n*.app\r\n\r\n\r\n### Qt ###\r\n# C++ objects and libs\r\n\r\n*.slo\r\n*.lo\r\n*.o\r\n*.a\r\n*.la\r\n*.lai\r\n*.so\r\n*.dll\r\n*.dylib\r\n\r\n# Qt-es\r\n\r\n/.qmake.cache\r\n/.qmake.stash\r\n*.pro.user\r\n*.pro.user.*\r\n*.moc\r\nmoc_*.cpp\r\nqrc_*.cpp\r\nui_*.h\r\nMakefile*\r\n*-build-*\r\n\r\n# QtCreator\r\n\r\n*.autosave\r\n\r\n#QtCtreator Qml\r\n*.qmlproject.user\r\n*.qmlproject.user.*\r\n\r\n\r\n### Python ###\r\n# Byte-compiled / optimized / DLL files\r\n__pycache__/\r\n*.py[cod]\r\n\r\n# C extensions\r\n*.so\r\n\r\n# Distribution / packaging\r\n.Python\r\nenv/\r\nbuild/\r\ndevelop-eggs/\r\ndist/\r\ndownloads/\r\neggs/\r\nlib/\r\nlib64/\r\nparts/\r\nsdist/\r\nvar/\r\n*.egg-info/\r\n.installed.cfg\r\n*.egg\r\n\r\n# PyInstaller\r\n#  Usually these files are written by a python script from a template\r\n#  before PyInstaller builds the exe, so as to inject date/other infos into it.\r\n*.manifest\r\n*.spec\r\n\r\n# Installer logs\r\npip-log.txt\r\npip-delete-this-directory.txt\r\n\r\n# Unit test / coverage reports\r\nhtmlcov/\r\n.tox/\r\n.coverage\r\n.cache\r\nnosetests.xml\r\ncoverage.xml\r\n\r\n# Translations\r\n*.mo\r\n*.pot\r\n\r\n# Django stuff:\r\n*.log\r\n\r\n# Sphinx documentation\r\ndocs/_build/\r\n\r\n# PyBuilder\r\ntarget/\r\n\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/LGPL_EXCEPTION.TXT",
    "content": "Digia Qt LGPL Exception version 1.1\r\n\r\nAs an additional permission to the GNU Lesser General Public License version\r\n2.1, the object code form of a \"work that uses the Library\" may incorporate\r\nmaterial from a header file that is part of the Library.  You may distribute\r\nsuch object code under terms of your choice, provided that:\r\n    (i)   the header files of the Library have not been modified; and\r\n    (ii)  the incorporated material is limited to numerical parameters, data\r\n          structure layouts, accessors, macros, inline functions and\r\n          templates; and\r\n    (iii) you comply with the terms of Section 6 of the GNU Lesser General\r\n          Public License version 2.1.\r\n\r\nMoreover, you may apply this exception to a modified version of the Library,\r\nprovided that such modification does not involve copying material from the\r\nLibrary into the modified Library's header files unless such material is\r\nlimited to (i) numerical parameters; (ii) data structure layouts;\r\n(iii) accessors; and (iv) small macros, templates and inline functions of\r\nfive lines or less in length.\r\n\r\nFurthermore, you are not required to apply this additional permission to a\r\nmodified version of the Library.\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/LICENSE.LGPL",
    "content": "\t\t  GNU LESSER GENERAL PUBLIC LICENSE\r\n\t\t       Version 2.1, February 1999\r\n\r\n Copyright (C) 1991, 1999 Free Software Foundation, Inc.\r\n 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n Everyone is permitted to copy and distribute verbatim copies\r\n of this license document, but changing it is not allowed.\r\n\r\n[This is the first released version of the Lesser GPL.  It also counts\r\n as the successor of the GNU Library Public License, version 2, hence\r\n the version number 2.1.]\r\n\r\n\t\t\t    Preamble\r\n\r\n  The licenses for most software are designed to take away your\r\nfreedom to share and change it.  By contrast, the GNU General Public\r\nLicenses are intended to guarantee your freedom to share and change\r\nfree software--to make sure the software is free for all its users.\r\n\r\n  This license, the Lesser General Public License, applies to some\r\nspecially designated software packages--typically libraries--of the\r\nFree Software Foundation and other authors who decide to use it.  You\r\ncan use it too, but we suggest you first think carefully about whether\r\nthis license or the ordinary General Public License is the better\r\nstrategy to use in any particular case, based on the explanations below.\r\n\r\n  When we speak of free software, we are referring to freedom of use,\r\nnot price.  Our General Public Licenses are designed to make sure that\r\nyou have the freedom to distribute copies of free software (and charge\r\nfor this service if you wish); that you receive source code or can get\r\nit if you want it; that you can change the software and use pieces of\r\nit in new free programs; and that you are informed that you can do\r\nthese things.\r\n\r\n  To protect your rights, we need to make restrictions that forbid\r\ndistributors to deny you these rights or to ask you to surrender these\r\nrights.  These restrictions translate to certain responsibilities for\r\nyou if you distribute copies of the library or if you modify it.\r\n\r\n  For example, if you distribute copies of the library, whether gratis\r\nor for a fee, you must give the recipients all the rights that we gave\r\nyou.  You must make sure that they, too, receive or can get the source\r\ncode.  If you link other code with the library, you must provide\r\ncomplete object files to the recipients, so that they can relink them\r\nwith the library after making changes to the library and recompiling\r\nit.  And you must show them these terms so they know their rights.\r\n\r\n  We protect your rights with a two-step method: (1) we copyright the\r\nlibrary, and (2) we offer you this license, which gives you legal\r\npermission to copy, distribute and/or modify the library.\r\n\r\n  To protect each distributor, we want to make it very clear that\r\nthere is no warranty for the free library.  Also, if the library is\r\nmodified by someone else and passed on, the recipients should know\r\nthat what they have is not the original version, so that the original\r\nauthor's reputation will not be affected by problems that might be\r\nintroduced by others.\r\n\f\r\n  Finally, software patents pose a constant threat to the existence of\r\nany free program.  We wish to make sure that a company cannot\r\neffectively restrict the users of a free program by obtaining a\r\nrestrictive license from a patent holder.  Therefore, we insist that\r\nany patent license obtained for a version of the library must be\r\nconsistent with the full freedom of use specified in this license.\r\n\r\n  Most GNU software, including some libraries, is covered by the\r\nordinary GNU General Public License.  This license, the GNU Lesser\r\nGeneral Public License, applies to certain designated libraries, and\r\nis quite different from the ordinary General Public License.  We use\r\nthis license for certain libraries in order to permit linking those\r\nlibraries into non-free programs.\r\n\r\n  When a program is linked with a library, whether statically or using\r\na shared library, the combination of the two is legally speaking a\r\ncombined work, a derivative of the original library.  The ordinary\r\nGeneral Public License therefore permits such linking only if the\r\nentire combination fits its criteria of freedom.  The Lesser General\r\nPublic License permits more lax criteria for linking other code with\r\nthe library.\r\n\r\n  We call this license the \"Lesser\" General Public License because it\r\ndoes Less to protect the user's freedom than the ordinary General\r\nPublic License.  It also provides other free software developers Less\r\nof an advantage over competing non-free programs.  These disadvantages\r\nare the reason we use the ordinary General Public License for many\r\nlibraries.  However, the Lesser license provides advantages in certain\r\nspecial circumstances.\r\n\r\n  For example, on rare occasions, there may be a special need to\r\nencourage the widest possible use of a certain library, so that it becomes\r\na de-facto standard.  To achieve this, non-free programs must be\r\nallowed to use the library.  A more frequent case is that a free\r\nlibrary does the same job as widely used non-free libraries.  In this\r\ncase, there is little to gain by limiting the free library to free\r\nsoftware only, so we use the Lesser General Public License.\r\n\r\n  In other cases, permission to use a particular library in non-free\r\nprograms enables a greater number of people to use a large body of\r\nfree software.  For example, permission to use the GNU C Library in\r\nnon-free programs enables many more people to use the whole GNU\r\noperating system, as well as its variant, the GNU/Linux operating\r\nsystem.\r\n\r\n  Although the Lesser General Public License is Less protective of the\r\nusers' freedom, it does ensure that the user of a program that is\r\nlinked with the Library has the freedom and the wherewithal to run\r\nthat program using a modified version of the Library.\r\n\r\n  The precise terms and conditions for copying, distribution and\r\nmodification follow.  Pay close attention to the difference between a\r\n\"work based on the library\" and a \"work that uses the library\".  The\r\nformer contains code derived from the library, whereas the latter must\r\nbe combined with the library in order to run.\r\n\f\r\n\t\t  GNU LESSER GENERAL PUBLIC LICENSE\r\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r\n\r\n  0. This License Agreement applies to any software library or other\r\nprogram which contains a notice placed by the copyright holder or\r\nother authorized party saying it may be distributed under the terms of\r\nthis Lesser General Public License (also called \"this License\").\r\nEach licensee is addressed as \"you\".\r\n\r\n  A \"library\" means a collection of software functions and/or data\r\nprepared so as to be conveniently linked with application programs\r\n(which use some of those functions and data) to form executables.\r\n\r\n  The \"Library\", below, refers to any such software library or work\r\nwhich has been distributed under these terms.  A \"work based on the\r\nLibrary\" means either the Library or any derivative work under\r\ncopyright law: that is to say, a work containing the Library or a\r\nportion of it, either verbatim or with modifications and/or translated\r\nstraightforwardly into another language.  (Hereinafter, translation is\r\nincluded without limitation in the term \"modification\".)\r\n\r\n  \"Source code\" for a work means the preferred form of the work for\r\nmaking modifications to it.  For a library, complete source code means\r\nall the source code for all modules it contains, plus any associated\r\ninterface definition files, plus the scripts used to control compilation\r\nand installation of the library.\r\n\r\n  Activities other than copying, distribution and modification are not\r\ncovered by this License; they are outside its scope.  The act of\r\nrunning a program using the Library is not restricted, and output from\r\nsuch a program is covered only if its contents constitute a work based\r\non the Library (independent of the use of the Library in a tool for\r\nwriting it).  Whether that is true depends on what the Library does\r\nand what the program that uses the Library does.\r\n\r\n  1. You may copy and distribute verbatim copies of the Library's\r\ncomplete source code as you receive it, in any medium, provided that\r\nyou conspicuously and appropriately publish on each copy an\r\nappropriate copyright notice and disclaimer of warranty; keep intact\r\nall the notices that refer to this License and to the absence of any\r\nwarranty; and distribute a copy of this License along with the\r\nLibrary.\r\n\r\n  You may charge a fee for the physical act of transferring a copy,\r\nand you may at your option offer warranty protection in exchange for a\r\nfee.\r\n\f\r\n  2. You may modify your copy or copies of the Library or any portion\r\nof it, thus forming a work based on the Library, and copy and\r\ndistribute such modifications or work under the terms of Section 1\r\nabove, provided that you also meet all of these conditions:\r\n\r\n    a) The modified work must itself be a software library.\r\n\r\n    b) You must cause the files modified to carry prominent notices\r\n    stating that you changed the files and the date of any change.\r\n\r\n    c) You must cause the whole of the work to be licensed at no\r\n    charge to all third parties under the terms of this License.\r\n\r\n    d) If a facility in the modified Library refers to a function or a\r\n    table of data to be supplied by an application program that uses\r\n    the facility, other than as an argument passed when the facility\r\n    is invoked, then you must make a good faith effort to ensure that,\r\n    in the event an application does not supply such function or\r\n    table, the facility still operates, and performs whatever part of\r\n    its purpose remains meaningful.\r\n\r\n    (For example, a function in a library to compute square roots has\r\n    a purpose that is entirely well-defined independent of the\r\n    application.  Therefore, Subsection 2d requires that any\r\n    application-supplied function or table used by this function must\r\n    be optional: if the application does not supply it, the square\r\n    root function must still compute square roots.)\r\n\r\nThese requirements apply to the modified work as a whole.  If\r\nidentifiable sections of that work are not derived from the Library,\r\nand can be reasonably considered independent and separate works in\r\nthemselves, then this License, and its terms, do not apply to those\r\nsections when you distribute them as separate works.  But when you\r\ndistribute the same sections as part of a whole which is a work based\r\non the Library, the distribution of the whole must be on the terms of\r\nthis License, whose permissions for other licensees extend to the\r\nentire whole, and thus to each and every part regardless of who wrote\r\nit.\r\n\r\nThus, it is not the intent of this section to claim rights or contest\r\nyour rights to work written entirely by you; rather, the intent is to\r\nexercise the right to control the distribution of derivative or\r\ncollective works based on the Library.\r\n\r\nIn addition, mere aggregation of another work not based on the Library\r\nwith the Library (or with a work based on the Library) on a volume of\r\na storage or distribution medium does not bring the other work under\r\nthe scope of this License.\r\n\r\n  3. You may opt to apply the terms of the ordinary GNU General Public\r\nLicense instead of this License to a given copy of the Library.  To do\r\nthis, you must alter all the notices that refer to this License, so\r\nthat they refer to the ordinary GNU General Public License, version 2,\r\ninstead of to this License.  (If a newer version than version 2 of the\r\nordinary GNU General Public License has appeared, then you can specify\r\nthat version instead if you wish.)  Do not make any other change in\r\nthese notices.\r\n\f\r\n  Once this change is made in a given copy, it is irreversible for\r\nthat copy, so the ordinary GNU General Public License applies to all\r\nsubsequent copies and derivative works made from that copy.\r\n\r\n  This option is useful when you wish to copy part of the code of\r\nthe Library into a program that is not a library.\r\n\r\n  4. You may copy and distribute the Library (or a portion or\r\nderivative of it, under Section 2) in object code or executable form\r\nunder the terms of Sections 1 and 2 above provided that you accompany\r\nit with the complete corresponding machine-readable source code, which\r\nmust be distributed under the terms of Sections 1 and 2 above on a\r\nmedium customarily used for software interchange.\r\n\r\n  If distribution of object code is made by offering access to copy\r\nfrom a designated place, then offering equivalent access to copy the\r\nsource code from the same place satisfies the requirement to\r\ndistribute the source code, even though third parties are not\r\ncompelled to copy the source along with the object code.\r\n\r\n  5. A program that contains no derivative of any portion of the\r\nLibrary, but is designed to work with the Library by being compiled or\r\nlinked with it, is called a \"work that uses the Library\".  Such a\r\nwork, in isolation, is not a derivative work of the Library, and\r\ntherefore falls outside the scope of this License.\r\n\r\n  However, linking a \"work that uses the Library\" with the Library\r\ncreates an executable that is a derivative of the Library (because it\r\ncontains portions of the Library), rather than a \"work that uses the\r\nlibrary\".  The executable is therefore covered by this License.\r\nSection 6 states terms for distribution of such executables.\r\n\r\n  When a \"work that uses the Library\" uses material from a header file\r\nthat is part of the Library, the object code for the work may be a\r\nderivative work of the Library even though the source code is not.\r\nWhether this is true is especially significant if the work can be\r\nlinked without the Library, or if the work is itself a library.  The\r\nthreshold for this to be true is not precisely defined by law.\r\n\r\n  If such an object file uses only numerical parameters, data\r\nstructure layouts and accessors, and small macros and small inline\r\nfunctions (ten lines or less in length), then the use of the object\r\nfile is unrestricted, regardless of whether it is legally a derivative\r\nwork.  (Executables containing this object code plus portions of the\r\nLibrary will still fall under Section 6.)\r\n\r\n  Otherwise, if the work is a derivative of the Library, you may\r\ndistribute the object code for the work under the terms of Section 6.\r\nAny executables containing that work also fall under Section 6,\r\nwhether or not they are linked directly with the Library itself.\r\n\f\r\n  6. As an exception to the Sections above, you may also combine or\r\nlink a \"work that uses the Library\" with the Library to produce a\r\nwork containing portions of the Library, and distribute that work\r\nunder terms of your choice, provided that the terms permit\r\nmodification of the work for the customer's own use and reverse\r\nengineering for debugging such modifications.\r\n\r\n  You must give prominent notice with each copy of the work that the\r\nLibrary is used in it and that the Library and its use are covered by\r\nthis License.  You must supply a copy of this License.  If the work\r\nduring execution displays copyright notices, you must include the\r\ncopyright notice for the Library among them, as well as a reference\r\ndirecting the user to the copy of this License.  Also, you must do one\r\nof these things:\r\n\r\n    a) Accompany the work with the complete corresponding\r\n    machine-readable source code for the Library including whatever\r\n    changes were used in the work (which must be distributed under\r\n    Sections 1 and 2 above); and, if the work is an executable linked\r\n    with the Library, with the complete machine-readable \"work that\r\n    uses the Library\", as object code and/or source code, so that the\r\n    user can modify the Library and then relink to produce a modified\r\n    executable containing the modified Library.  (It is understood\r\n    that the user who changes the contents of definitions files in the\r\n    Library will not necessarily be able to recompile the application\r\n    to use the modified definitions.)\r\n\r\n    b) Use a suitable shared library mechanism for linking with the\r\n    Library.  A suitable mechanism is one that (1) uses at run time a\r\n    copy of the library already present on the user's computer system,\r\n    rather than copying library functions into the executable, and (2)\r\n    will operate properly with a modified version of the library, if\r\n    the user installs one, as long as the modified version is\r\n    interface-compatible with the version that the work was made with.\r\n\r\n    c) Accompany the work with a written offer, valid for at\r\n    least three years, to give the same user the materials\r\n    specified in Subsection 6a, above, for a charge no more\r\n    than the cost of performing this distribution.\r\n\r\n    d) If distribution of the work is made by offering access to copy\r\n    from a designated place, offer equivalent access to copy the above\r\n    specified materials from the same place.\r\n\r\n    e) Verify that the user has already received a copy of these\r\n    materials or that you have already sent this user a copy.\r\n\r\n  For an executable, the required form of the \"work that uses the\r\nLibrary\" must include any data and utility programs needed for\r\nreproducing the executable from it.  However, as a special exception,\r\nthe materials to be distributed need not include anything that is\r\nnormally distributed (in either source or binary form) with the major\r\ncomponents (compiler, kernel, and so on) of the operating system on\r\nwhich the executable runs, unless that component itself accompanies\r\nthe executable.\r\n\r\n  It may happen that this requirement contradicts the license\r\nrestrictions of other proprietary libraries that do not normally\r\naccompany the operating system.  Such a contradiction means you cannot\r\nuse both them and the Library together in an executable that you\r\ndistribute.\r\n\f\r\n  7. You may place library facilities that are a work based on the\r\nLibrary side-by-side in a single library together with other library\r\nfacilities not covered by this License, and distribute such a combined\r\nlibrary, provided that the separate distribution of the work based on\r\nthe Library and of the other library facilities is otherwise\r\npermitted, and provided that you do these two things:\r\n\r\n    a) Accompany the combined library with a copy of the same work\r\n    based on the Library, uncombined with any other library\r\n    facilities.  This must be distributed under the terms of the\r\n    Sections above.\r\n\r\n    b) Give prominent notice with the combined library of the fact\r\n    that part of it is a work based on the Library, and explaining\r\n    where to find the accompanying uncombined form of the same work.\r\n\r\n  8. You may not copy, modify, sublicense, link with, or distribute\r\nthe Library except as expressly provided under this License.  Any\r\nattempt otherwise to copy, modify, sublicense, link with, or\r\ndistribute the Library is void, and will automatically terminate your\r\nrights under this License.  However, parties who have received copies,\r\nor rights, from you under this License will not have their licenses\r\nterminated so long as such parties remain in full compliance.\r\n\r\n  9. You are not required to accept this License, since you have not\r\nsigned it.  However, nothing else grants you permission to modify or\r\ndistribute the Library or its derivative works.  These actions are\r\nprohibited by law if you do not accept this License.  Therefore, by\r\nmodifying or distributing the Library (or any work based on the\r\nLibrary), you indicate your acceptance of this License to do so, and\r\nall its terms and conditions for copying, distributing or modifying\r\nthe Library or works based on it.\r\n\r\n  10. Each time you redistribute the Library (or any work based on the\r\nLibrary), the recipient automatically receives a license from the\r\noriginal licensor to copy, distribute, link with or modify the Library\r\nsubject to these terms and conditions.  You may not impose any further\r\nrestrictions on the recipients' exercise of the rights granted herein.\r\nYou are not responsible for enforcing compliance by third parties with\r\nthis License.\r\n\f\r\n  11. If, as a consequence of a court judgment or allegation of patent\r\ninfringement or for any other reason (not limited to patent issues),\r\nconditions are imposed on you (whether by court order, agreement or\r\notherwise) that contradict the conditions of this License, they do not\r\nexcuse you from the conditions of this License.  If you cannot\r\ndistribute so as to satisfy simultaneously your obligations under this\r\nLicense and any other pertinent obligations, then as a consequence you\r\nmay not distribute the Library at all.  For example, if a patent\r\nlicense would not permit royalty-free redistribution of the Library by\r\nall those who receive copies directly or indirectly through you, then\r\nthe only way you could satisfy both it and this License would be to\r\nrefrain entirely from distribution of the Library.\r\n\r\nIf any portion of this section is held invalid or unenforceable under any\r\nparticular circumstance, the balance of the section is intended to apply,\r\nand the section as a whole is intended to apply in other circumstances.\r\n\r\nIt is not the purpose of this section to induce you to infringe any\r\npatents or other property right claims or to contest validity of any\r\nsuch claims; this section has the sole purpose of protecting the\r\nintegrity of the free software distribution system which is\r\nimplemented by public license practices.  Many people have made\r\ngenerous contributions to the wide range of software distributed\r\nthrough that system in reliance on consistent application of that\r\nsystem; it is up to the author/donor to decide if he or she is willing\r\nto distribute software through any other system and a licensee cannot\r\nimpose that choice.\r\n\r\nThis section is intended to make thoroughly clear what is believed to\r\nbe a consequence of the rest of this License.\r\n\r\n  12. If the distribution and/or use of the Library is restricted in\r\ncertain countries either by patents or by copyrighted interfaces, the\r\noriginal copyright holder who places the Library under this License may add\r\nan explicit geographical distribution limitation excluding those countries,\r\nso that distribution is permitted only in or among countries not thus\r\nexcluded.  In such case, this License incorporates the limitation as if\r\nwritten in the body of this License.\r\n\r\n  13. The Free Software Foundation may publish revised and/or new\r\nversions of the Lesser General Public License from time to time.\r\nSuch new versions will be similar in spirit to the present version,\r\nbut may differ in detail to address new problems or concerns.\r\n\r\nEach version is given a distinguishing version number.  If the Library\r\nspecifies a version number of this License which applies to it and\r\n\"any later version\", you have the option of following the terms and\r\nconditions either of that version or of any later version published by\r\nthe Free Software Foundation.  If the Library does not specify a\r\nlicense version number, you may choose any version ever published by\r\nthe Free Software Foundation.\r\n\f\r\n  14. If you wish to incorporate parts of the Library into other free\r\nprograms whose distribution conditions are incompatible with these,\r\nwrite to the author to ask for permission.  For software which is\r\ncopyrighted by the Free Software Foundation, write to the Free\r\nSoftware Foundation; we sometimes make exceptions for this.  Our\r\ndecision will be guided by the two goals of preserving the free status\r\nof all derivatives of our free software and of promoting the sharing\r\nand reuse of software generally.\r\n\r\n\t\t\t    NO WARRANTY\r\n\r\n  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\r\nWARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\r\nEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\r\nOTHER PARTIES PROVIDE THE LIBRARY \"AS IS\" WITHOUT WARRANTY OF ANY\r\nKIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\r\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\r\nLIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\r\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r\n\r\n  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\r\nWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\r\nAND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\r\nFOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\r\nCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\r\nLIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\r\nRENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\r\nFAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\r\nSUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\r\nDAMAGES.\r\n\r\n\t\t     END OF TERMS AND CONDITIONS\r\n\f\r\n           How to Apply These Terms to Your New Libraries\r\n\r\n  If you develop a new library, and you want it to be of the greatest\r\npossible use to the public, we recommend making it free software that\r\neveryone can redistribute and change.  You can do so by permitting\r\nredistribution under these terms (or, alternatively, under the terms of the\r\nordinary General Public License).\r\n\r\n  To apply these terms, attach the following notices to the library.  It is\r\nsafest to attach them to the start of each source file to most effectively\r\nconvey the exclusion of warranty; and each file should have at least the\r\n\"copyright\" line and a pointer to where the full notice is found.\r\n\r\n    <one line to give the library's name and a brief idea of what it does.>\r\n    Copyright (C) <year>  <name of author>\r\n\r\n    This library is free software; you can redistribute it and/or\r\n    modify it under the terms of the GNU Lesser General Public\r\n    License as published by the Free Software Foundation; either\r\n    version 2.1 of the License, or (at your option) any later version.\r\n\r\n    This library is distributed in the hope that it will be useful,\r\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n    Lesser General Public License for more details.\r\n\r\n    You should have received a copy of the GNU Lesser General Public\r\n    License along with this library; if not, write to the Free Software\r\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n\r\nAlso add information on how to contact you by electronic and paper mail.\r\n\r\nYou should also get your employer (if you work as a programmer) or your\r\nschool, if any, to sign a \"copyright disclaimer\" for the library, if\r\nnecessary.  Here is a sample; alter the names:\r\n\r\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the\r\n  library `Frob' (a library for tweaking knobs) written by James Random Hacker.\r\n\r\n  <signature of Ty Coon>, 1 April 1990\r\n  Ty Coon, President of Vice\r\n\r\nThat's all there is to it!\r\n\r\n\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/README.md",
    "content": "FakeVim\r\n=======\r\n\r\nFakeVim is library to emulate Vim in QTextEdit, QPlainTextEdit and possibly other Qt widgets.\r\n\r\nBuild\r\n-----\r\n\r\nTo build the library and simple example editor (in `test` directory), run following commands.\r\n\r\n    qmake\r\n    make\r\n\r\nSupported Features\r\n------------------\r\n\r\nMost of supported commands can be followed by motion command or executed in visual mode, work with registers or can be prefixed with number of repetitions.\r\n\r\nHere is list of emulated commands with description where it can diverge from Vim in functionality.\r\n\r\n### Modes\r\n* normal\r\n* insert and replace\r\n* visual\r\n* command line (`:`)\r\n\r\n### Normal and Visual Modes\r\n* basic movement -- `h`/`j`/`k`/`l`, `<C-U>`, `<C-D>`, `<C-F>`, `<C-B>`, `gg`, `G`, `0`, `^`, `$` etc.\r\n* word movement -- `w`, `e`, `b` etc.\r\n* \"inner/a\" movement -- `ciw`, `3daw`, `ya{` etc.\r\n* `f`, `t` movement\r\n* `[`, `]` movement\r\n* `{`, `}` -- paragraph movement\r\n* delete/change/yank/paste with register\r\n* undo/redo\r\n* `<C-A>`, `<C-X>` -- increase or decrease number in decimal/octal/hexadecimal format (e.g. `128<C-A>` on or before \"0x0ff\" changes it to \"0x17f\")\r\n* `.` -- repeat last change\r\n* `/search`, `?search`, `*`, `#`, `n`, `N` -- most of regular expression syntax used in Vim except `\\<` and `\\>` just is the same as `\\b` in QRegExp\r\n* `@`, `q` (macro recording, execution) -- special keys are saved as `<S-Left>`\r\n* marks\r\n* `gv` -- last visual selection; can differ if text is edited around it\r\n* indentation -- `=`, `<<`, `>>` etc. with movement, count and in visual mode\r\n* \"to upper/lower\" -- `~`, `gU`, `gu` etc.\r\n* `i`, `a`, `o`, `I`, `A`, `O` -- enter insert mode\r\n* scroll window -- `zt`, `zb`, `zz` etc.\r\n* wrap line movement -- `gj`, `gk`, `g0`, `g^`, `g$`\r\n\r\n### Command Line Mode\r\n* `:map`, `:unmap`, `:inoremap` etc.\r\n* `:source` -- very basic line-by-line sourcing of vimrc files\r\n* `:substitute` -- substitute expression in range\r\n* `:'<,'>!cmd` -- filter through an external command (e.g. sort lines in file with `:%!sort`)\r\n* `:.!cmd` -- insert standard output of an external command\r\n* `:read`\r\n* `:yank`, `:delete`, `:change`\r\n* `:move`, `:join`\r\n* `:20` -- go to address\r\n* `:history`\r\n* `:registers`, `:display`\r\n* `:nohlsearch`\r\n* `:undo`, `:redo`\r\n* `:normal`\r\n* `:<`, `:>`\r\n\r\n### Insert Mode\r\n* `<C-O>` -- execute single command and return to insert mode\r\n* `<C-V>` -- insert raw character\r\n* `<insert>` -- toggle replace mode\r\n\r\n### Options (:set ...)\r\n* `autoindent`\r\n* `clipboard`\r\n* `backspace`\r\n* `expandtab`\r\n* `hlsearch`\r\n* `ignorecase`\r\n* `incsearch`\r\n* `indent`\r\n* `iskeyword`\r\n* `scrolloff`\r\n* `shiftwidth`\r\n* `showcmd`\r\n* `smartcase`\r\n* `smartindent`\r\n* `smarttab`\r\n* `startofline`\r\n* `tabstop`\r\n* `tildeop`\r\n* `wrapscan`\r\n\r\nExample Vimrc\r\n-------------\r\n\r\n    \" highlight matched\r\n    set hlsearch\r\n    \" case insensitive search\r\n    set ignorecase\r\n    set smartcase\r\n    \" search while typing\r\n    set incsearch\r\n    \" wrap-around when searching\r\n    set wrapscan\r\n    \" show pressed keys in lower right corner\r\n    set showcmd\r\n    \" tab -> spaces\r\n    set expandtab\r\n    set tabstop=4\r\n    set shiftwidth=4\r\n    \" keep a 5 line buffer for the cursor from top/bottom of window\r\n    set scrolloff=5\r\n    \" X11 clipboard\r\n    set clipboard=unnamed\r\n    \" use ~ with movement\r\n    set tildeop\r\n\r\n    \" mappings\r\n    nnoremap ; :\r\n    inoremap jj <Esc>\r\n\r\n    \" clear highlighted search term on space\r\n    noremap <silent> <Space> :nohls<CR>\r\n\r\n    \" reselect visual block after indent\r\n    vnoremap < <gv\r\n    vnoremap > >gv\r\n\r\n    \" MOVE LINE/BLOCK\r\n    nnoremap <C-S-J> :m+<CR>==\r\n    nnoremap <C-S-K> :m-2<CR>==\r\n    inoremap <C-S-J> <Esc>:m+<CR>==gi\r\n    inoremap <C-S-K> <Esc>:m-2<CR>==gi\r\n    vnoremap <C-S-J> :m'>+<CR>gv=gv\r\n    vnoremap <C-S-K> :m-2<CR>gv=gv\r\n\r\nImplementation\r\n--------------\r\n\r\nThere are appropriate signals emitted for command which has to be processed by the underlying editor widget (folds, windows, tabs, command line, messages etc.).\r\nSee example in `test/` directory or implementation of FakeVim plugin in Qt Creator IDE.\r\n\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/fakevim/fakevim.pri",
    "content": "include($$PWD/utils/utils.pri)\r\n\r\nDEFINES += FAKEVIM_STANDALONE\r\n\r\nINCLUDEPATH += $$PWD\r\n\r\nSOURCES += $$PWD/fakevimhandler.cpp \\\r\n           $$PWD/fakevimactions.cpp\r\n\r\nHEADERS += $$PWD/fakevimhandler.h \\\r\n           $$PWD/fakevimactions.h\r\n\r\nCONFIG += qt\r\n\r\nQT += core gui\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/fakevim/fakevim.pro",
    "content": "TARGET = fakevim\r\nTEMPLATE = lib\r\n\r\nCONFIG += staticlib\r\n\r\ninclude(../../../liteideutils.pri)\r\n\r\ninclude(fakevim.pri)\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/fakevim/fakevimactions.cpp",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\r\n** Contact: http://www.qt-project.org/legal\r\n**\r\n** This file is part of Qt Creator.\r\n**\r\n** Commercial License Usage\r\n** Licensees holding valid commercial Qt licenses may use this file in\r\n** accordance with the commercial license agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and Digia.  For licensing terms and\r\n** conditions see http://qt.digia.com/licensing.  For further information\r\n** use the contact form at http://qt.digia.com/contact-us.\r\n**\r\n** GNU Lesser General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU Lesser\r\n** General Public License version 2.1 as published by the Free Software\r\n** Foundation and appearing in the file LICENSE.LGPL included in the\r\n** packaging of this file.  Please review the following information to\r\n** ensure the GNU Lesser General Public License version 2.1 requirements\r\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r\n**\r\n** In addition, as a special exception, Digia gives you certain additional\r\n** rights.  These rights are described in the Digia Qt LGPL Exception\r\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n****************************************************************************/\r\n\r\n#include \"fakevimactions.h\"\r\n#include \"fakevimhandler.h\"\r\n\r\n// Please do not add any direct dependencies to other Qt Creator code  here.\r\n// Instead emit signals and let the FakeVimPlugin channel the information to\r\n// Qt Creator. The idea is to keep this file here in a \"clean\" state that\r\n// allows easy reuse with any QTextEdit or QPlainTextEdit derived class.\r\n\r\n\r\n#include <utils/qtcassert.h>\r\n\r\n#include <QDebug>\r\n#include <QObject>\r\n#include <QCoreApplication>\r\n\r\n#ifdef FAKEVIM_STANDALONE\r\nusing namespace FakeVim::Internal::Utils;\r\n#else\r\nusing namespace Utils;\r\n#endif\r\n\r\n///////////////////////////////////////////////////////////////////////\r\n//\r\n// FakeVimSettings\r\n//\r\n///////////////////////////////////////////////////////////////////////\r\n\r\nnamespace FakeVim {\r\nnamespace Internal {\r\n\r\ntypedef QLatin1String _;\r\n\r\n#ifdef FAKEVIM_STANDALONE\r\nnamespace Utils {\r\n\r\nSavedAction::SavedAction(QObject *parent)\r\n    : QObject(parent)\r\n{\r\n}\r\n\r\nvoid SavedAction::setValue(const QVariant &value)\r\n{\r\n    m_value = value;\r\n}\r\n\r\nQVariant SavedAction::value() const\r\n{\r\n    return m_value;\r\n}\r\n\r\nvoid SavedAction::setDefaultValue(const QVariant &value)\r\n{\r\n    m_defaultValue = value;\r\n}\r\n\r\nQVariant SavedAction::defaultValue() const\r\n{\r\n    return m_defaultValue;\r\n}\r\n\r\nvoid SavedAction::setSettingsKey(const QString &key)\r\n{\r\n    m_settingsKey = key;\r\n}\r\n\r\nQString SavedAction::settingsKey() const\r\n{\r\n    return m_settingsKey;\r\n}\r\n\r\n} // namespace Utils\r\n#endif // FAKEVIM_STANDALONE\r\n\r\nFakeVimSettings::FakeVimSettings()\r\n{}\r\n\r\nFakeVimSettings::~FakeVimSettings()\r\n{\r\n    qDeleteAll(m_items);\r\n}\r\n\r\nvoid FakeVimSettings::insertItem(int code, SavedAction *item,\r\n    const QString &longName, const QString &shortName)\r\n{\r\n    QTC_ASSERT(!m_items.contains(code), qDebug() << code; return);\r\n    m_items[code] = item;\r\n    if (!longName.isEmpty()) {\r\n        m_nameToCode[longName] = code;\r\n        m_codeToName[code] = longName;\r\n    }\r\n    if (!shortName.isEmpty())\r\n        m_nameToCode[shortName] = code;\r\n}\r\n\r\n#ifndef FAKEVIM_STANDALONE\r\nvoid FakeVimSettings::readSettings(QSettings *settings)\r\n{\r\n    foreach (SavedAction *item, m_items)\r\n        item->readSettings(settings);\r\n}\r\n\r\nvoid FakeVimSettings::writeSettings(QSettings *settings)\r\n{\r\n    foreach (SavedAction *item, m_items)\r\n        item->writeSettings(settings);\r\n}\r\n#endif // FAKEVIM_STANDALONE\r\n\r\nSavedAction *FakeVimSettings::item(int code)\r\n{\r\n    QTC_ASSERT(m_items.value(code, 0), qDebug() << \"CODE: \" << code; return 0);\r\n    return m_items.value(code, 0);\r\n}\r\n\r\nSavedAction *FakeVimSettings::item(const QString &name)\r\n{\r\n    return m_items.value(m_nameToCode.value(name, -1), 0);\r\n}\r\n\r\nQString FakeVimSettings::trySetValue(const QString &name, const QString &value)\r\n{\r\n    int code = m_nameToCode.value(name, -1);\r\n    if (code == -1)\r\n        return FakeVimHandler::tr(\"Unknown option: %1\").arg(name);\r\n    if (code == ConfigTabStop || code == ConfigShiftWidth) {\r\n        if (value.toInt() <= 0)\r\n            return FakeVimHandler::tr(\"Argument must be positive: %1=%2\")\r\n                    .arg(name).arg(value);\r\n    }\r\n    SavedAction *act = item(code);\r\n    if (!act)\r\n        return FakeVimHandler::tr(\"Unknown option: %1\").arg(name);\r\n    act->setValue(value);\r\n    return QString();\r\n}\r\n\r\nSavedAction *createAction(FakeVimSettings *instance, int code, const QVariant &value,\r\n                          const QString &settingsKey = QString(),\r\n                          const QString &shortKey = QString())\r\n{\r\n    SavedAction *item = new SavedAction(instance);\r\n    item->setValue(value);\r\n#ifndef FAKEVIM_STANDALONE\r\n    item->setSettingsKey(_(\"FakeVim\"), settingsKey);\r\n    item->setDefaultValue(value);\r\n    item->setCheckable( value.canConvert<bool>() );\r\n#endif\r\n    instance->insertItem(code, item, settingsKey.toLower(), shortKey);\r\n    return item;\r\n}\r\n\r\nFakeVimSettings *theFakeVimSettings()\r\n{\r\n    static FakeVimSettings *s = 0;\r\n    if (s)\r\n        return s;\r\n\r\n    s = new FakeVimSettings;\r\n\r\n    // Specific FakeVim settings\r\n    createAction(s, ConfigReadVimRc,  false,     _(\"ReadVimRc\"));\r\n    createAction(s, ConfigVimRcPath,  QString(), _(\"VimRcPath\"));\r\n#ifndef FAKEVIM_STANDALONE\r\n    createAction(s, ConfigUseFakeVim, false,     _(\"UseFakeVim\"));\r\n    s->item(ConfigUseFakeVim)->setText(QCoreApplication::translate(\"FakeVim::Internal\",\r\n        \"Use Vim-style Editing\"));\r\n    s->item(ConfigReadVimRc)->setText(QCoreApplication::translate(\"FakeVim::Internal\",\r\n        \"Read .vimrc\"));\r\n    s->item(ConfigVimRcPath)->setText(QCoreApplication::translate(\"FakeVim::Internal\",\r\n        \"Path to .vimrc\"));\r\n#endif\r\n    createAction(s, ConfigShowMarks,      false, _(\"ShowMarks\"),      _(\"sm\"));\r\n    createAction(s, ConfigPassControlKey, false, _(\"PassControlKey\"), _(\"pck\"));\r\n    createAction(s, ConfigPassKeys,       true,  _(\"PassKeys\"),       _(\"pk\"));\r\n\r\n    // Emulated Vim setting\r\n    createAction(s, ConfigStartOfLine,    true,  _(\"StartOfLine\"),   _(\"sol\"));\r\n    createAction(s, ConfigTabStop,        8,     _(\"TabStop\"),       _(\"ts\"));\r\n    createAction(s, ConfigSmartTab,       false, _(\"SmartTab\"),      _(\"sta\"));\r\n    createAction(s, ConfigHlSearch,       true,  _(\"HlSearch\"),      _(\"hls\"));\r\n    createAction(s, ConfigShiftWidth,     8,     _(\"ShiftWidth\"),    _(\"sw\"));\r\n    createAction(s, ConfigExpandTab,      false, _(\"ExpandTab\"),     _(\"et\"));\r\n    createAction(s, ConfigAutoIndent,     false, _(\"AutoIndent\"),    _(\"ai\"));\r\n    createAction(s, ConfigSmartIndent,    false, _(\"SmartIndent\"),   _(\"si\"));\r\n    createAction(s, ConfigIncSearch,      true,  _(\"IncSearch\"),     _(\"is\"));\r\n    createAction(s, ConfigUseCoreSearch,  false, _(\"UseCoreSearch\"), _(\"ucs\"));\r\n    createAction(s, ConfigSmartCase,      false, _(\"SmartCase\"),     _(\"scs\"));\r\n    createAction(s, ConfigIgnoreCase,     false, _(\"IgnoreCase\"),    _(\"ic\"));\r\n    createAction(s, ConfigWrapScan,       true,  _(\"WrapScan\"),      _(\"ws\"));\r\n    createAction(s, ConfigTildeOp,        false, _(\"TildeOp\"),       _(\"top\"));\r\n    createAction(s, ConfigShowCmd,        true,  _(\"ShowCmd\"),       _(\"sc\"));\r\n    createAction(s, ConfigRelativeNumber, false, _(\"RelativeNumber\"),_(\"rnu\"));\r\n    createAction(s, ConfigScrollOff,      0,     _(\"ScrollOff\"),     _(\"so\"));\r\n    createAction(s, ConfigBackspace,      _(\"indent,eol,start\"), _(\"ConfigBackspace\"), _(\"bs\"));\r\n    createAction(s, ConfigIsKeyword,      _(\"@,48-57,_,192-255,a-z,A-Z\"), _(\"IsKeyword\"), _(\"isk\"));\r\n    createAction(s, ConfigClipboard,      QString(), _(\"Clipboard\"), _(\"cb\"));\r\n\r\n    return s;\r\n}\r\n\r\nSavedAction *theFakeVimSetting(int code)\r\n{\r\n    return theFakeVimSettings()->item(code);\r\n}\r\n\r\n} // namespace Internal\r\n} // namespace FakeVim\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/fakevim/fakevimactions.h",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\r\n** Contact: http://www.qt-project.org/legal\r\n**\r\n** This file is part of Qt Creator.\r\n**\r\n** Commercial License Usage\r\n** Licensees holding valid commercial Qt licenses may use this file in\r\n** accordance with the commercial license agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and Digia.  For licensing terms and\r\n** conditions see http://qt.digia.com/licensing.  For further information\r\n** use the contact form at http://qt.digia.com/contact-us.\r\n**\r\n** GNU Lesser General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU Lesser\r\n** General Public License version 2.1 as published by the Free Software\r\n** Foundation and appearing in the file LICENSE.LGPL included in the\r\n** packaging of this file.  Please review the following information to\r\n** ensure the GNU Lesser General Public License version 2.1 requirements\r\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r\n**\r\n** In addition, as a special exception, Digia gives you certain additional\r\n** rights.  These rights are described in the Digia Qt LGPL Exception\r\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n****************************************************************************/\r\n\r\n#ifndef FAKEVIM_ACTIONS_H\r\n#define FAKEVIM_ACTIONS_H\r\n\r\n#ifndef FAKEVIM_STANDALONE\r\n#   include <utils/savedaction.h>\r\n#endif\r\n\r\n#include <QHash>\r\n#include <QObject>\r\n#include <QString>\r\n#include <QVariant>\r\n\r\nnamespace FakeVim {\r\nnamespace Internal {\r\n\r\n#ifdef FAKEVIM_STANDALONE\r\nnamespace Utils {\r\n\r\nclass SavedAction : public QObject\r\n{\r\n    Q_OBJECT\r\n\r\npublic:\r\n    SavedAction(QObject *parent);\r\n    void setValue(const QVariant &value);\r\n    QVariant value() const;\r\n    void setDefaultValue(const QVariant &value);\r\n    QVariant defaultValue() const;\r\n    void setSettingsKey(const QString &key);\r\n    QString settingsKey() const;\r\n\r\n    QVariant m_value;\r\n    QVariant m_defaultValue;\r\n    QString m_settingsKey;\r\n};\r\n\r\n} // namespace Utils\r\n#endif // FAKEVIM_STANDALONE\r\n\r\nenum FakeVimSettingsCode\r\n{\r\n    ConfigUseFakeVim,\r\n    ConfigReadVimRc,\r\n    ConfigVimRcPath,\r\n\r\n    ConfigStartOfLine,\r\n    ConfigHlSearch,\r\n    ConfigTabStop,\r\n    ConfigSmartTab,\r\n    ConfigShiftWidth,\r\n    ConfigExpandTab,\r\n    ConfigAutoIndent,\r\n    ConfigSmartIndent,\r\n\r\n    ConfigIncSearch,\r\n    ConfigUseCoreSearch,\r\n    ConfigSmartCase,\r\n    ConfigIgnoreCase,\r\n    ConfigWrapScan,\r\n\r\n    // command ~ behaves as g~\r\n    ConfigTildeOp,\r\n\r\n    // indent  allow backspacing over autoindent\r\n    // eol     allow backspacing over line breaks (join lines)\r\n    // start   allow backspacing over the start of insert; CTRL-W and CTRL-U\r\n    //         stop once at the start of insert.\r\n    ConfigBackspace,\r\n\r\n    // @,48-57,_,192-255\r\n    ConfigIsKeyword,\r\n\r\n    // other actions\r\n    ConfigShowMarks,\r\n    ConfigPassControlKey,\r\n    ConfigPassKeys,\r\n    ConfigClipboard,\r\n    ConfigShowCmd,\r\n    ConfigScrollOff,\r\n    ConfigRelativeNumber\r\n};\r\n\r\nclass FakeVimSettings : public QObject\r\n{\r\n    Q_OBJECT\r\n\r\npublic:\r\n    FakeVimSettings();\r\n    ~FakeVimSettings();\r\n    void insertItem(int code, Utils::SavedAction *item,\r\n        const QString &longname = QString(),\r\n        const QString &shortname = QString());\r\n\r\n    Utils::SavedAction *item(int code);\r\n    Utils::SavedAction *item(const QString &name);\r\n    QString trySetValue(const QString &name, const QString &value);\r\n\r\n#ifndef FAKEVIM_STANDALONE\r\n    void readSettings(QSettings *settings);\r\n    void writeSettings(QSettings *settings);\r\n#endif\r\n\r\nprivate:\r\n    QHash<int, Utils::SavedAction *> m_items;\r\n    QHash<QString, int> m_nameToCode;\r\n    QHash<int, QString> m_codeToName;\r\n};\r\n\r\nFakeVimSettings *theFakeVimSettings();\r\nUtils::SavedAction *theFakeVimSetting(int code);\r\n\r\n} // namespace Internal\r\n} // namespace FakeVim\r\n\r\n#endif // FAKEVIM_ACTTIONS_H\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/fakevim/fakevimhandler.cpp",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\r\n** Contact: http://www.qt-project.org/legal\r\n**\r\n** This file is part of Qt Creator.\r\n**\r\n** Commercial License Usage\r\n** Licensees holding valid commercial Qt licenses may use this file in\r\n** accordance with the commercial license agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and Digia.  For licensing terms and\r\n** conditions see http://qt.digia.com/licensing.  For further information\r\n** use the contact form at http://qt.digia.com/contact-us.\r\n**\r\n** GNU Lesser General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU Lesser\r\n** General Public License version 2.1 as published by the Free Software\r\n** Foundation and appearing in the file LICENSE.LGPL included in the\r\n** packaging of this file.  Please review the following information to\r\n** ensure the GNU Lesser General Public License version 2.1 requirements\r\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r\n**\r\n** In addition, as a special exception, Digia gives you certain additional\r\n** rights.  These rights are described in the Digia Qt LGPL Exception\r\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n****************************************************************************/\r\n\r\n//\r\n// ATTENTION:\r\n//\r\n// 1 Please do not add any direct dependencies to other Qt Creator code here.\r\n//   Instead emit signals and let the FakeVimPlugin channel the information to\r\n//   Qt Creator. The idea is to keep this file here in a \"clean\" state that\r\n//   allows easy reuse with any QTextEdit or QPlainTextEdit derived class.\r\n//\r\n// 2 There are a few auto tests located in ../../../tests/auto/fakevim.\r\n//   Commands that are covered there are marked as \"// tested\" below.\r\n//\r\n// 3 Some conventions:\r\n//\r\n//   Use 1 based line numbers and 0 based column numbers. Even though\r\n//   the 1 based line are not nice it matches vim's and QTextEdit's 'line'\r\n//   concepts.\r\n//\r\n//   Do not pass QTextCursor etc around unless really needed. Convert\r\n//   early to  line/column.\r\n//\r\n//   A QTextCursor is always between characters, whereas vi's cursor is always\r\n//   over a character. FakeVim interprets the QTextCursor to be over the character\r\n//   to the right of the QTextCursor's position().\r\n//\r\n//   A current \"region of interest\"\r\n//   spans between anchor(), (i.e. the character below anchor()), and\r\n//   position(). The character below position() is not included\r\n//   if the last movement command was exclusive (MoveExclusive).\r\n//\r\n\r\n#include \"fakevimhandler.h\"\r\n\r\n#include \"fakevimactions.h\"\r\n\r\n#include <utils/hostosinfo.h>\r\n#include <utils/qtcassert.h>\r\n\r\n#include <QDebug>\r\n#include <QFile>\r\n#include <QObject>\r\n#include <QPointer>\r\n#include <QProcess>\r\n#include <QRegExp>\r\n#include <QTextStream>\r\n#include <QTimer>\r\n#include <QStack>\r\n\r\n#include <QApplication>\r\n#include <QClipboard>\r\n#include <QInputMethodEvent>\r\n#include <QKeyEvent>\r\n#include <QLineEdit>\r\n#include <QPlainTextEdit>\r\n#include <QScrollBar>\r\n#include <QTextBlock>\r\n#include <QTextCursor>\r\n#include <QTextDocumentFragment>\r\n#include <QTextEdit>\r\n#include <QMimeData>\r\n#include <QSharedPointer>\r\n\r\n#include <algorithm>\r\n#include <climits>\r\n#include <ctype.h>\r\n\r\n//#define DEBUG_KEY  1\r\n#if DEBUG_KEY\r\n#   define KEY_DEBUG(s) qDebug() << s\r\n#else\r\n#   define KEY_DEBUG(s)\r\n#endif\r\n\r\n//#define DEBUG_UNDO  1\r\n#if DEBUG_UNDO\r\n#   define UNDO_DEBUG(s) qDebug() << \"REV\" << revision() << s\r\n#else\r\n#   define UNDO_DEBUG(s)\r\n#endif\r\n\r\nusing namespace Utils;\r\n#ifdef FAKEVIM_STANDALONE\r\nusing namespace FakeVim::Internal::Utils;\r\n#endif\r\n\r\nnamespace FakeVim {\r\nnamespace Internal {\r\n\r\n///////////////////////////////////////////////////////////////////////\r\n//\r\n// FakeVimHandler\r\n//\r\n///////////////////////////////////////////////////////////////////////\r\n\r\n#define StartOfLine     QTextCursor::StartOfLine\r\n#define EndOfLine       QTextCursor::EndOfLine\r\n#define MoveAnchor      QTextCursor::MoveAnchor\r\n#define KeepAnchor      QTextCursor::KeepAnchor\r\n#define Up              QTextCursor::Up\r\n#define Down            QTextCursor::Down\r\n#define Right           QTextCursor::Right\r\n#define Left            QTextCursor::Left\r\n#define EndOfDocument   QTextCursor::End\r\n#define StartOfDocument QTextCursor::Start\r\n#define NextBlock       QTextCursor::NextBlock\r\n\r\n#define ParagraphSeparator QChar::ParagraphSeparator\r\n\r\n#define EDITOR(s) (m_textedit ? m_textedit->s : m_plaintextedit->s)\r\n\r\n#define MetaModifier     // Use HostOsInfo::controlModifier() instead\r\n#define ControlModifier  // Use HostOsInfo::controlModifier() instead\r\n\r\ntypedef QLatin1String _;\r\n\r\n/* Clipboard MIME types used by Vim. */\r\nstatic const QString vimMimeText = _(\"_VIM_TEXT\");\r\nstatic const QString vimMimeTextEncoded = _(\"_VIMENC_TEXT\");\r\n\r\nusing namespace Qt;\r\n\r\n/*! A \\e Mode represents one of the basic modes of operation of FakeVim.\r\n*/\r\n\r\nenum Mode\r\n{\r\n    InsertMode,\r\n    ReplaceMode,\r\n    CommandMode,\r\n    ExMode\r\n};\r\n\r\nenum BlockInsertMode\r\n{\r\n    NoneBlockInsertMode,\r\n    AppendBlockInsertMode,\r\n    AppendToEndOfLineBlockInsertMode,\r\n    InsertBlockInsertMode,\r\n    ChangeBlockInsertMode\r\n};\r\n\r\n/*! A \\e SubMode is used for things that require one more data item\r\n    and are 'nested' behind a \\l Mode.\r\n*/\r\nenum SubMode\r\n{\r\n    NoSubMode,\r\n    ChangeSubMode,       // Used for c\r\n    DeleteSubMode,       // Used for d\r\n    FilterSubMode,       // Used for !\r\n    IndentSubMode,       // Used for =\r\n    RegisterSubMode,     // Used for \"\r\n    ShiftLeftSubMode,    // Used for <\r\n    ShiftRightSubMode,   // Used for >\r\n    InvertCaseSubMode,   // Used for g~\r\n    DownCaseSubMode,     // Used for gu\r\n    UpCaseSubMode,       // Used for gU\r\n    WindowSubMode,       // Used for Ctrl-w\r\n    YankSubMode,         // Used for y\r\n    ZSubMode,            // Used for z\r\n    CapitalZSubMode,     // Used for Z\r\n    ReplaceSubMode,      // Used for r\r\n    MacroRecordSubMode,  // Used for q\r\n    MacroExecuteSubMode, // Used for @\r\n    CtrlVSubMode         // Used for Ctrl-v in insert mode\r\n};\r\n\r\n/*! A \\e SubSubMode is used for things that require one more data item\r\n    and are 'nested' behind a \\l SubMode.\r\n*/\r\nenum SubSubMode\r\n{\r\n    NoSubSubMode,\r\n    FtSubSubMode,          // Used for f, F, t, T.\r\n    MarkSubSubMode,        // Used for m.\r\n    BackTickSubSubMode,    // Used for `.\r\n    TickSubSubMode,        // Used for '.\r\n    TextObjectSubSubMode,  // Used for thing like iw, aW, as etc.\r\n    ZSubSubMode,           // Used for zj, zk\r\n    OpenSquareSubSubMode,  // Used for [{, {(, [z\r\n    CloseSquareSubSubMode, // Used for ]}, ]), ]z\r\n    SearchSubSubMode,\r\n    CtrlVUnicodeSubSubMode // Used for Ctrl-v based unicode input\r\n};\r\n\r\nenum VisualMode\r\n{\r\n    NoVisualMode,\r\n    VisualCharMode,\r\n    VisualLineMode,\r\n    VisualBlockMode\r\n};\r\n\r\nenum MoveType\r\n{\r\n    MoveExclusive,\r\n    MoveInclusive,\r\n    MoveLineWise\r\n};\r\n\r\n/*!\r\n    \\enum RangeMode\r\n\r\n    The \\e RangeMode serves as a means to define how the \"Range\" between\r\n    the \\l cursor and the \\l anchor position is to be interpreted.\r\n\r\n    \\value RangeCharMode   Entered by pressing \\key v. The range includes\r\n                           all characters between cursor and anchor.\r\n    \\value RangeLineMode   Entered by pressing \\key V. The range includes\r\n                           all lines between the line of the cursor and\r\n                           the line of the anchor.\r\n    \\value RangeLineModeExclusice Like \\l RangeLineMode, but keeps one\r\n                           newline when deleting.\r\n    \\value RangeBlockMode  Entered by pressing \\key Ctrl-v. The range includes\r\n                           all characters with line and column coordinates\r\n                           between line and columns coordinates of cursor and\r\n                           anchor.\r\n    \\value RangeBlockAndTailMode Like \\l RangeBlockMode, but also includes\r\n                           all characters in the affected lines up to the end\r\n                           of these lines.\r\n*/\r\n\r\nenum EventResult\r\n{\r\n    EventHandled,\r\n    EventUnhandled,\r\n    EventCancelled, // Event is handled but a sub mode was cancelled.\r\n    EventPassedToCore\r\n};\r\n\r\nstruct CursorPosition\r\n{\r\n    CursorPosition() : line(-1), column(-1) {}\r\n    CursorPosition(int block, int column) : line(block), column(column) {}\r\n    explicit CursorPosition(const QTextCursor &tc)\r\n        : line(tc.block().blockNumber()), column(tc.positionInBlock()) {}\r\n    CursorPosition(const QTextDocument *document, int position)\r\n    {\r\n        QTextBlock block = document->findBlock(position);\r\n        line = block.blockNumber();\r\n        column = position - block.position();\r\n    }\r\n    bool isValid() const { return line >= 0 && column >= 0; }\r\n    bool operator>(const CursorPosition &other) const\r\n        { return line > other.line || column > other.column; }\r\n    bool operator==(const CursorPosition &other) const\r\n        { return line == other.line && column == other.column; }\r\n    bool operator!=(const CursorPosition &other) const { return !operator==(other); }\r\n\r\n    int line; // Line in document (from 0, folded lines included).\r\n    int column; // Position on line.\r\n};\r\n\r\nQDebug operator<<(QDebug ts, const CursorPosition &pos)\r\n{\r\n    return ts << \"(line: \" << pos.line << \", column: \" << pos.column << \")\";\r\n}\r\n\r\nclass Mark\r\n{\r\npublic:\r\n    Mark(const CursorPosition &pos = CursorPosition(), const QString &fileName = QString())\r\n        : m_position(pos), m_fileName(fileName) {}\r\n\r\n    bool isValid() const { return m_position.isValid(); }\r\n\r\n    bool isLocal(const QString &localFileName) const\r\n    {\r\n        return m_fileName.isEmpty() || m_fileName == localFileName;\r\n    }\r\n\r\n    /* Return position of mark within given document.\r\n     * If saved line number is too big, mark position is at the end of document.\r\n     * If line number is in document but column is too big, mark position is at the end of line.\r\n     */\r\n    CursorPosition position(const QTextDocument *document) const\r\n    {\r\n        QTextBlock block = document->findBlockByNumber(m_position.line);\r\n        CursorPosition pos;\r\n        if (block.isValid()) {\r\n            pos.line = m_position.line;\r\n            pos.column = qMax(0, qMin(m_position.column, block.length() - 2));\r\n        } else if (document->isEmpty()) {\r\n            pos.line = 0;\r\n            pos.column = 0;\r\n        } else {\r\n            pos.line = document->blockCount() - 1;\r\n            pos.column = qMax(0, document->lastBlock().length() - 2);\r\n        }\r\n        return pos;\r\n    }\r\n\r\n    const QString &fileName() const { return m_fileName; }\r\n\r\nprivate:\r\n    CursorPosition m_position;\r\n    QString m_fileName;\r\n};\r\ntypedef QHash<QChar, Mark> Marks;\r\ntypedef QHashIterator<QChar, Mark> MarksIterator;\r\n\r\nstruct State\r\n{\r\n    State() : revision(-1), position(), marks(), lastVisualMode(NoVisualMode),\r\n        lastVisualModeInverted(false) {}\r\n    State(int revision, const CursorPosition &position, const Marks &marks,\r\n        VisualMode lastVisualMode, bool lastVisualModeInverted) : revision(revision),\r\n        position(position), marks(marks), lastVisualMode(lastVisualMode),\r\n        lastVisualModeInverted(lastVisualModeInverted) {}\r\n\r\n    bool isValid() const { return position.isValid(); }\r\n\r\n    int revision;\r\n    CursorPosition position;\r\n    Marks marks;\r\n    VisualMode lastVisualMode;\r\n    bool lastVisualModeInverted;\r\n};\r\n\r\nstruct Column\r\n{\r\n    Column(int p, int l) : physical(p), logical(l) {}\r\n    int physical; // Number of characters in the data.\r\n    int logical; // Column on screen.\r\n};\r\n\r\nQDebug operator<<(QDebug ts, const Column &col)\r\n{\r\n    return ts << \"(p: \" << col.physical << \", l: \" << col.logical << \")\";\r\n}\r\n\r\nstruct Register\r\n{\r\n    Register() : rangemode(RangeCharMode) {}\r\n    Register(const QString &c) : contents(c), rangemode(RangeCharMode) {}\r\n    Register(const QString &c, RangeMode m) : contents(c), rangemode(m) {}\r\n    QString contents;\r\n    RangeMode rangemode;\r\n};\r\n\r\nQDebug operator<<(QDebug ts, const Register &reg)\r\n{\r\n    return ts << reg.contents;\r\n}\r\n\r\nstruct SearchData\r\n{\r\n    SearchData()\r\n    {\r\n        forward = true;\r\n        highlightMatches = true;\r\n    }\r\n\r\n    QString needle;\r\n    bool forward;\r\n    bool highlightMatches;\r\n};\r\n\r\n// If string begins with given prefix remove it with trailing spaces and return true.\r\nstatic bool eatString(const char *prefix, QString *str)\r\n{\r\n    if (!str->startsWith(_(prefix)))\r\n        return false;\r\n    *str = str->mid(strlen(prefix)).trimmed();\r\n    return true;\r\n}\r\n\r\nstatic QRegExp vimPatternToQtPattern(QString needle, bool ignoreCaseOption, bool smartCaseOption)\r\n{\r\n    /* Transformations (Vim regexp -> QRegExp):\r\n     *   \\a -> [A-Za-z]\r\n     *   \\A -> [^A-Za-z]\r\n     *   \\h -> [A-Za-z_]\r\n     *   \\H -> [^A-Za-z_]\r\n     *   \\l -> [a-z]\r\n     *   \\L -> [^a-z]\r\n     *   \\o -> [0-7]\r\n     *   \\O -> [^0-7]\r\n     *   \\u -> [A-Z]\r\n     *   \\U -> [^A-Z]\r\n     *   \\x -> [0-9A-Fa-f]\r\n     *   \\X -> [^0-9A-Fa-f]\r\n     *\r\n     *   \\< -> \\b\r\n     *   \\> -> \\b\r\n     *   [] -> \\[\\]\r\n     *   \\= -> ?\r\n     *\r\n     *   (...)  <-> \\(...\\)\r\n     *   {...}  <-> \\{...\\}\r\n     *   |      <-> \\|\r\n     *   ?      <-> \\?\r\n     *   +      <-> \\+\r\n     *   \\{...} -> {...}\r\n     *\r\n     *   \\c - set ignorecase for rest\r\n     *   \\C - set noignorecase for rest\r\n     */\r\n    // FIXME: Option smartcase should be used only if search was typed by user.\r\n    bool ignorecase = ignoreCaseOption\r\n        && !(smartCaseOption && needle.contains(QRegExp(_(\"[A-Z]\"))));\r\n    QString pattern;\r\n    pattern.reserve(2 * needle.size());\r\n\r\n    bool escape = false;\r\n    bool brace = false;\r\n    bool embraced = false;\r\n    bool range = false;\r\n    bool curly = false;\r\n    foreach (const QChar &c, needle) {\r\n        if (brace) {\r\n            brace = false;\r\n            if (c == QLatin1Char(']')) {\r\n                pattern.append(_(\"\\\\[\\\\]\"));\r\n                continue;\r\n            }\r\n            pattern.append(QLatin1Char('['));\r\n            escape = true;\r\n            embraced = true;\r\n        }\r\n        if (embraced) {\r\n            if (range) {\r\n                QChar c2 = pattern[pattern.size() - 2];\r\n                pattern.remove(pattern.size() - 2, 2);\r\n                pattern.append(c2.toUpper() + QLatin1Char('-') + c.toUpper());\r\n                pattern.append(c2.toLower() + QLatin1Char('-') + c.toLower());\r\n                range = false;\r\n            } else if (escape) {\r\n                escape = false;\r\n                pattern.append(c);\r\n            } else if (c == QLatin1Char('\\\\')) {\r\n                escape = true;\r\n            } else if (c == QLatin1Char(']')) {\r\n                pattern.append(QLatin1Char(']'));\r\n                embraced = false;\r\n            } else if (c == QLatin1Char('-')) {\r\n                range = ignorecase && pattern[pattern.size() - 1].isLetter();\r\n                pattern.append(QLatin1Char('-'));\r\n            } else if (c.isLetter() && ignorecase) {\r\n                pattern.append(c.toLower()).append(c.toUpper());\r\n            } else {\r\n                pattern.append(c);\r\n            }\r\n        } else if (QString::fromLatin1(\"(){}+|?\").indexOf(c) != -1) {\r\n            if (c == QLatin1Char('{')) {\r\n                curly = escape;\r\n            } else if (c == QLatin1Char('}') && curly) {\r\n                curly = false;\r\n                escape = true;\r\n            }\r\n\r\n            if (escape)\r\n                escape = false;\r\n            else\r\n                pattern.append(QLatin1Char('\\\\'));\r\n            pattern.append(c);\r\n        } else if (escape) {\r\n            // escape expression\r\n            escape = false;\r\n            if (c == QLatin1Char('<') || c == QLatin1Char('>'))\r\n                pattern.append(_(\"\\\\b\"));\r\n            else if (c == QLatin1Char('a'))\r\n                pattern.append(_(\"[a-zA-Z]\"));\r\n            else if (c == QLatin1Char('A'))\r\n                pattern.append(_(\"[^a-zA-Z]\"));\r\n            else if (c == QLatin1Char('h'))\r\n                pattern.append(_(\"[A-Za-z_]\"));\r\n            else if (c == QLatin1Char('H'))\r\n                pattern.append(_(\"[^A-Za-z_]\"));\r\n            else if (c == QLatin1Char('c') || c == QLatin1Char('C'))\r\n                ignorecase = (c == QLatin1Char('c'));\r\n            else if (c == QLatin1Char('l'))\r\n                pattern.append(_(\"[a-z]\"));\r\n            else if (c == QLatin1Char('L'))\r\n                pattern.append(_(\"[^a-z]\"));\r\n            else if (c == QLatin1Char('o'))\r\n                pattern.append(_(\"[0-7]\"));\r\n            else if (c == QLatin1Char('O'))\r\n                pattern.append(_(\"[^0-7]\"));\r\n            else if (c == QLatin1Char('u'))\r\n                pattern.append(_(\"[A-Z]\"));\r\n            else if (c == QLatin1Char('U'))\r\n                pattern.append(_(\"[^A-Z]\"));\r\n            else if (c == QLatin1Char('x'))\r\n                pattern.append(_(\"[0-9A-Fa-f]\"));\r\n            else if (c == QLatin1Char('X'))\r\n                pattern.append(_(\"[^0-9A-Fa-f]\"));\r\n            else if (c == QLatin1Char('='))\r\n                pattern.append(_(\"?\"));\r\n            else\r\n                pattern.append(QLatin1Char('\\\\') + c);\r\n        } else {\r\n            // unescaped expression\r\n            if (c == QLatin1Char('\\\\'))\r\n                escape = true;\r\n            else if (c == QLatin1Char('['))\r\n                brace = true;\r\n            else if (c.isLetter() && ignorecase)\r\n                pattern.append(QLatin1Char('[') + c.toLower() + c.toUpper() + QLatin1Char(']'));\r\n            else\r\n                pattern.append(c);\r\n        }\r\n    }\r\n    if (escape)\r\n        pattern.append(QLatin1Char('\\\\'));\r\n    else if (brace)\r\n        pattern.append(QLatin1Char('['));\r\n\r\n    return QRegExp(pattern);\r\n}\r\n\r\nstatic bool afterEndOfLine(const QTextDocument *doc, int position)\r\n{\r\n    return doc->characterAt(position) == ParagraphSeparator\r\n        && doc->findBlock(position).length() > 1;\r\n}\r\n\r\nstatic void searchForward(QTextCursor *tc, QRegExp &needleExp, int *repeat)\r\n{\r\n    const QTextDocument *doc = tc->document();\r\n    const int startPos = tc->position();\r\n\r\n    // Search from beginning of line so that matched text is the same.\r\n    tc->movePosition(StartOfLine);\r\n\r\n    // forward to current position\r\n    *tc = doc->find(needleExp, *tc);\r\n    while (!tc->isNull() && tc->anchor() < startPos) {\r\n        if (!tc->hasSelection())\r\n            tc->movePosition(Right);\r\n        if (tc->atBlockEnd())\r\n            tc->movePosition(NextBlock);\r\n        *tc = doc->find(needleExp, *tc);\r\n    }\r\n\r\n    if (tc->isNull())\r\n        return;\r\n\r\n    --*repeat;\r\n\r\n    while (*repeat > 0) {\r\n        if (!tc->hasSelection())\r\n            tc->movePosition(Right);\r\n        if (tc->atBlockEnd())\r\n            tc->movePosition(NextBlock);\r\n        *tc = doc->find(needleExp, *tc);\r\n        if (tc->isNull())\r\n            return;\r\n        --*repeat;\r\n    }\r\n\r\n    if (!tc->isNull() && afterEndOfLine(doc, tc->anchor()))\r\n        tc->movePosition(Left);\r\n}\r\n\r\nstatic void searchBackward(QTextCursor *tc, QRegExp &needleExp, int *repeat)\r\n{\r\n    // Search from beginning of line so that matched text is the same.\r\n    QTextBlock block = tc->block();\r\n    QString line = block.text();\r\n\r\n    int i = line.indexOf(needleExp, 0);\r\n    while (i != -1 && i < tc->positionInBlock()) {\r\n        --*repeat;\r\n        i = line.indexOf(needleExp, i + qMax(1, needleExp.matchedLength()));\r\n        if (i == line.size())\r\n            i = -1;\r\n    }\r\n\r\n    if (i == tc->positionInBlock())\r\n        --*repeat;\r\n\r\n    while (*repeat > 0) {\r\n        block = block.previous();\r\n        if (!block.isValid())\r\n            break;\r\n        line = block.text();\r\n        i = line.indexOf(needleExp, 0);\r\n        while (i != -1) {\r\n            --*repeat;\r\n            i = line.indexOf(needleExp, i + qMax(1, needleExp.matchedLength()));\r\n            if (i == line.size())\r\n                i = -1;\r\n        }\r\n    }\r\n\r\n    if (!block.isValid()) {\r\n        *tc = QTextCursor();\r\n        return;\r\n    }\r\n\r\n    i = line.indexOf(needleExp, 0);\r\n    while (*repeat < 0) {\r\n        i = line.indexOf(needleExp, i + qMax(1, needleExp.matchedLength()));\r\n        ++*repeat;\r\n    }\r\n    tc->setPosition(block.position() + i);\r\n    tc->setPosition(tc->position() + needleExp.matchedLength(), KeepAnchor);\r\n}\r\n\r\n// Commands [[, []\r\nstatic void bracketSearchBackward(QTextCursor *tc, const QString &needleExp, int repeat)\r\n{\r\n    QRegExp re(needleExp);\r\n    QTextCursor tc2 = *tc;\r\n    tc2.setPosition(tc2.position() - 1);\r\n    searchBackward(&tc2, re, &repeat);\r\n    if (repeat <= 1)\r\n        tc->setPosition(tc2.isNull() ? 0 : tc2.position(), KeepAnchor);\r\n}\r\n\r\n// Commands ][, ]]\r\n// When ]] is used after an operator, then also stops below a '}' in the first column.\r\nstatic void bracketSearchForward(QTextCursor *tc, const QString &needleExp, int repeat,\r\n                                 bool searchWithCommand)\r\n{\r\n    QRegExp re(searchWithCommand ? QString(_(\"^\\\\}|^\\\\{\")) : needleExp);\r\n    QTextCursor tc2 = *tc;\r\n    tc2.setPosition(tc2.position() + 1);\r\n    searchForward(&tc2, re, &repeat);\r\n    if (repeat <= 1) {\r\n        if (tc2.isNull()) {\r\n            tc->setPosition(tc->document()->characterCount() - 1, KeepAnchor);\r\n        } else {\r\n            tc->setPosition(tc2.position() - 1, KeepAnchor);\r\n            if (searchWithCommand && tc->document()->characterAt(tc->position()).unicode() == '}') {\r\n                QTextBlock block = tc->block().next();\r\n                if (block.isValid())\r\n                    tc->setPosition(block.position(), KeepAnchor);\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\nstatic bool substituteText(QString *text, QRegExp &pattern, const QString &replacement,\r\n    bool global)\r\n{\r\n    bool substituted = false;\r\n    int pos = 0;\r\n    int right = -1;\r\n    while (true) {\r\n        pos = pattern.indexIn(*text, pos, QRegExp::CaretAtZero);\r\n        if (pos == -1)\r\n            break;\r\n\r\n        // ensure that substitution is advancing towards end of line\r\n        if (right == text->size() - pos) {\r\n            ++pos;\r\n            if (pos == text->size())\r\n                break;\r\n            continue;\r\n        }\r\n\r\n        right = text->size() - pos;\r\n\r\n        substituted = true;\r\n        QString matched = text->mid(pos, pattern.cap(0).size());\r\n        QString repl;\r\n        bool escape = false;\r\n        // insert captured texts\r\n        for (int i = 0; i < replacement.size(); ++i) {\r\n            const QChar &c = replacement[i];\r\n            if (escape) {\r\n                escape = false;\r\n                if (c.isDigit()) {\r\n                    if (c.digitValue() <= pattern.captureCount())\r\n                        repl += pattern.cap(c.digitValue());\r\n                } else {\r\n                    repl += c;\r\n                }\r\n            } else {\r\n                if (c == QLatin1Char('\\\\'))\r\n                    escape = true;\r\n                else if (c == QLatin1Char('&'))\r\n                    repl += pattern.cap(0);\r\n                else\r\n                    repl += c;\r\n            }\r\n        }\r\n        text->replace(pos, matched.size(), repl);\r\n        pos += (repl.isEmpty() && matched.isEmpty()) ? 1 : repl.size();\r\n\r\n        if (pos >= text->size() || !global)\r\n            break;\r\n    }\r\n\r\n    return substituted;\r\n}\r\n\r\nstatic int findUnescaped(QChar c, const QString &line, int from)\r\n{\r\n    for (int i = from; i < line.size(); ++i) {\r\n        if (line.at(i) == c && (i == 0 || line.at(i - 1) != QLatin1Char('\\\\')))\r\n            return i;\r\n    }\r\n    return -1;\r\n}\r\n\r\nstatic void setClipboardData(const QString &content, RangeMode mode,\r\n    QClipboard::Mode clipboardMode)\r\n{\r\n    QClipboard *clipboard = QApplication::clipboard();\r\n    char vimRangeMode = mode;\r\n\r\n    QByteArray bytes1;\r\n    bytes1.append(vimRangeMode);\r\n    bytes1.append(content.toUtf8());\r\n\r\n    QByteArray bytes2;\r\n    bytes2.append(vimRangeMode);\r\n    bytes2.append(\"utf-8\");\r\n    bytes2.append('\\0');\r\n    bytes2.append(content.toUtf8());\r\n\r\n    QMimeData *data = new QMimeData;\r\n    data->setText(content);\r\n    data->setData(vimMimeText, bytes1);\r\n    data->setData(vimMimeTextEncoded, bytes2);\r\n    clipboard->setMimeData(data, clipboardMode);\r\n}\r\n\r\nstatic QByteArray toLocalEncoding(const QString &text)\r\n{\r\n    return HostOsInfo::isWindowsHost() ? QString(text).replace(_(\"\\n\"), _(\"\\r\\n\")).toLocal8Bit()\r\n                                       : text.toLocal8Bit();\r\n}\r\n\r\nstatic QString fromLocalEncoding(const QByteArray &data)\r\n{\r\n    return HostOsInfo::isWindowsHost() ? QString::fromLocal8Bit(data).replace(_(\"\\n\"), _(\"\\r\\n\"))\r\n                                       : QString::fromLocal8Bit(data);\r\n}\r\n\r\nstatic QString getProcessOutput(const QString &command, const QString &input)\r\n{\r\n    QProcess proc;\r\n    proc.start(command);\r\n    proc.waitForStarted();\r\n    proc.write(toLocalEncoding(input));\r\n    proc.closeWriteChannel();\r\n\r\n    // FIXME: Process should be interruptable by user.\r\n    //        Solution is to create a QObject for each process and emit finished state.\r\n    proc.waitForFinished();\r\n\r\n    return fromLocalEncoding(proc.readAllStandardOutput());\r\n}\r\n\r\nstatic const QMap<QString, int> &vimKeyNames()\r\n{\r\n    static QMap<QString, int> k;\r\n    if (!k.isEmpty())\r\n        return k;\r\n\r\n    // FIXME: Should be value of mapleader.\r\n    k.insert(_(\"LEADER\"), Key_Backslash);\r\n\r\n    k.insert(_(\"SPACE\"), Key_Space);\r\n    k.insert(_(\"TAB\"), Key_Tab);\r\n    k.insert(_(\"NL\"), Key_Return);\r\n    k.insert(_(\"NEWLINE\"), Key_Return);\r\n    k.insert(_(\"LINEFEED\"), Key_Return);\r\n    k.insert(_(\"LF\"), Key_Return);\r\n    k.insert(_(\"CR\"), Key_Return);\r\n    k.insert(_(\"RETURN\"), Key_Return);\r\n    k.insert(_(\"ENTER\"), Key_Return);\r\n    k.insert(_(\"BS\"), Key_Backspace);\r\n    k.insert(_(\"BACKSPACE\"), Key_Backspace);\r\n    k.insert(_(\"ESC\"), Key_Escape);\r\n    k.insert(_(\"BAR\"), Key_Bar);\r\n    k.insert(_(\"BSLASH\"), Key_Backslash);\r\n    k.insert(_(\"DEL\"), Key_Delete);\r\n    k.insert(_(\"DELETE\"), Key_Delete);\r\n    k.insert(_(\"KDEL\"), Key_Delete);\r\n    k.insert(_(\"UP\"), Key_Up);\r\n    k.insert(_(\"DOWN\"), Key_Down);\r\n    k.insert(_(\"LEFT\"), Key_Left);\r\n    k.insert(_(\"RIGHT\"), Key_Right);\r\n\r\n    k.insert(_(\"LT\"), Key_Less);\r\n    k.insert(_(\"GT\"), Key_Greater);\r\n\r\n    k.insert(_(\"F1\"), Key_F1);\r\n    k.insert(_(\"F2\"), Key_F2);\r\n    k.insert(_(\"F3\"), Key_F3);\r\n    k.insert(_(\"F4\"), Key_F4);\r\n    k.insert(_(\"F5\"), Key_F5);\r\n    k.insert(_(\"F6\"), Key_F6);\r\n    k.insert(_(\"F7\"), Key_F7);\r\n    k.insert(_(\"F8\"), Key_F8);\r\n    k.insert(_(\"F9\"), Key_F9);\r\n    k.insert(_(\"F10\"), Key_F10);\r\n\r\n    k.insert(_(\"F11\"), Key_F11);\r\n    k.insert(_(\"F12\"), Key_F12);\r\n    k.insert(_(\"F13\"), Key_F13);\r\n    k.insert(_(\"F14\"), Key_F14);\r\n    k.insert(_(\"F15\"), Key_F15);\r\n    k.insert(_(\"F16\"), Key_F16);\r\n    k.insert(_(\"F17\"), Key_F17);\r\n    k.insert(_(\"F18\"), Key_F18);\r\n    k.insert(_(\"F19\"), Key_F19);\r\n    k.insert(_(\"F20\"), Key_F20);\r\n\r\n    k.insert(_(\"F21\"), Key_F21);\r\n    k.insert(_(\"F22\"), Key_F22);\r\n    k.insert(_(\"F23\"), Key_F23);\r\n    k.insert(_(\"F24\"), Key_F24);\r\n    k.insert(_(\"F25\"), Key_F25);\r\n    k.insert(_(\"F26\"), Key_F26);\r\n    k.insert(_(\"F27\"), Key_F27);\r\n    k.insert(_(\"F28\"), Key_F28);\r\n    k.insert(_(\"F29\"), Key_F29);\r\n    k.insert(_(\"F30\"), Key_F30);\r\n\r\n    k.insert(_(\"F31\"), Key_F31);\r\n    k.insert(_(\"F32\"), Key_F32);\r\n    k.insert(_(\"F33\"), Key_F33);\r\n    k.insert(_(\"F34\"), Key_F34);\r\n    k.insert(_(\"F35\"), Key_F35);\r\n\r\n    k.insert(_(\"INSERT\"), Key_Insert);\r\n    k.insert(_(\"INS\"), Key_Insert);\r\n    k.insert(_(\"KINSERT\"), Key_Insert);\r\n    k.insert(_(\"HOME\"), Key_Home);\r\n    k.insert(_(\"END\"), Key_End);\r\n    k.insert(_(\"PAGEUP\"), Key_PageUp);\r\n    k.insert(_(\"PAGEDOWN\"), Key_PageDown);\r\n\r\n    k.insert(_(\"KPLUS\"), Key_Plus);\r\n    k.insert(_(\"KMINUS\"), Key_Minus);\r\n    k.insert(_(\"KDIVIDE\"), Key_Slash);\r\n    k.insert(_(\"KMULTIPLY\"), Key_Asterisk);\r\n    k.insert(_(\"KENTER\"), Key_Enter);\r\n    k.insert(_(\"KPOINT\"), Key_Period);\r\n\r\n    return k;\r\n}\r\n\r\nstatic bool isOnlyControlModifier(const Qt::KeyboardModifiers &mods)\r\n{\r\n    return (mods ^ HostOsInfo::controlModifier()) == Qt::NoModifier;\r\n}\r\n\r\n\r\nRange::Range()\r\n    : beginPos(-1), endPos(-1), rangemode(RangeCharMode)\r\n{}\r\n\r\nRange::Range(int b, int e, RangeMode m)\r\n    : beginPos(qMin(b, e)), endPos(qMax(b, e)), rangemode(m)\r\n{}\r\n\r\nQString Range::toString() const\r\n{\r\n    return QString::fromLatin1(\"%1-%2 (mode: %3)\").arg(beginPos).arg(endPos)\r\n        .arg(rangemode);\r\n}\r\n\r\nbool Range::isValid() const\r\n{\r\n    return beginPos >= 0 && endPos >= 0;\r\n}\r\n\r\nQDebug operator<<(QDebug ts, const Range &range)\r\n{\r\n    return ts << '[' << range.beginPos << ',' << range.endPos << ']';\r\n}\r\n\r\n\r\nExCommand::ExCommand(const QString &c, const QString &a, const Range &r)\r\n    : cmd(c), hasBang(false), args(a), range(r), count(1)\r\n{}\r\n\r\nbool ExCommand::matches(const QString &min, const QString &full) const\r\n{\r\n    return cmd.startsWith(min) && full.startsWith(cmd);\r\n}\r\n\r\nQDebug operator<<(QDebug ts, const ExCommand &cmd)\r\n{\r\n    return ts << cmd.cmd << ' ' << cmd.args << ' ' << cmd.range;\r\n}\r\n\r\nQDebug operator<<(QDebug ts, const QList<QTextEdit::ExtraSelection> &sels)\r\n{\r\n    foreach (const QTextEdit::ExtraSelection &sel, sels)\r\n        ts << \"SEL: \" << sel.cursor.anchor() << sel.cursor.position();\r\n    return ts;\r\n}\r\n\r\nQString quoteUnprintable(const QString &ba)\r\n{\r\n    QString res;\r\n    for (int i = 0, n = ba.size(); i != n; ++i) {\r\n        const QChar c = ba.at(i);\r\n        const int cc = c.unicode();\r\n        if (c.isPrint())\r\n            res += c;\r\n        else if (cc == QLatin1Char('\\n'))\r\n            res += _(\"<CR>\");\r\n        else\r\n            res += QString::fromLatin1(\"\\\\x%1\").arg(c.unicode(), 2, 16, QLatin1Char('0'));\r\n    }\r\n    return res;\r\n}\r\n\r\nstatic bool startsWithWhitespace(const QString &str, int col)\r\n{\r\n    QTC_ASSERT(str.size() >= col, return false);\r\n    for (int i = 0; i < col; ++i) {\r\n        uint u = str.at(i).unicode();\r\n        if (u != QLatin1Char(' ') && u != QLatin1Char('\\t'))\r\n            return false;\r\n    }\r\n    return true;\r\n}\r\n\r\ninline QString msgMarkNotSet(const QString &text)\r\n{\r\n    return FakeVimHandler::tr(\"Mark \\\"%1\\\" not set.\").arg(text);\r\n}\r\n\r\nclass Input\r\n{\r\npublic:\r\n    // Remove some extra \"information\" on Mac.\r\n    static Qt::KeyboardModifiers cleanModifier(Qt::KeyboardModifiers m)\r\n    {\r\n        return m & ~Qt::KeypadModifier;\r\n    }\r\n\r\n    Input()\r\n        : m_key(0), m_xkey(0), m_modifiers(0) {}\r\n\r\n    explicit Input(QChar x)\r\n        : m_key(x.unicode()), m_xkey(x.unicode()), m_modifiers(0), m_text(x)\r\n    {\r\n        if (x.isUpper())\r\n            m_modifiers = Qt::ShiftModifier;\r\n        else if (x.isLower())\r\n            m_key = x.toUpper().unicode();\r\n    }\r\n\r\n    Input(int k, Qt::KeyboardModifiers m, const QString &t = QString())\r\n        : m_key(k), m_modifiers(cleanModifier(m)), m_text(t)\r\n    {\r\n        if (m_text.size() == 1) {\r\n            QChar x = m_text.at(0);\r\n\r\n            // On Mac, QKeyEvent::text() returns non-empty strings for\r\n            // cursor keys. This breaks some of the logic later on\r\n            // relying on text() being empty for \"special\" keys.\r\n            // FIXME: Check the real conditions.\r\n            if (x.unicode() < ' ')\r\n                m_text.clear();\r\n            else if (x.isLetter())\r\n                m_key = x.toUpper().unicode();\r\n        }\r\n\r\n        // Set text only if input is ascii key without control modifier.\r\n        if (m_text.isEmpty() && k >= 0 && k <= 0x7f && (m & HostOsInfo::controlModifier()) == 0) {\r\n            QChar c = QChar::fromLatin1(k);\r\n            if (c.isLetter())\r\n                m_text = QString(isShift() ? c.toUpper() : c);\r\n            else if (!isShift())\r\n                m_text = c;\r\n        }\r\n\r\n        // Normalize <S-TAB>.\r\n        if (m_key == Qt::Key_Backtab) {\r\n            m_key = Qt::Key_Tab;\r\n            m_modifiers |= Qt::ShiftModifier;\r\n        }\r\n\r\n        // m_xkey is only a cache.\r\n        m_xkey = (m_text.size() == 1 ? m_text.at(0).unicode() : m_key);\r\n    }\r\n\r\n    bool isValid() const\r\n    {\r\n        return m_key != 0 || !m_text.isNull();\r\n    }\r\n\r\n    bool isDigit() const\r\n    {\r\n        return m_xkey >= '0' && m_xkey <= '9';\r\n    }\r\n\r\n    bool isKey(int c) const\r\n    {\r\n        return !m_modifiers && m_key == c;\r\n    }\r\n\r\n    bool isBackspace() const\r\n    {\r\n        return m_key == Key_Backspace || isControl('h');\r\n    }\r\n\r\n    bool isReturn() const\r\n    {\r\n        return m_key == QLatin1Char('\\n') || m_key == Key_Return || m_key == Key_Enter;\r\n    }\r\n\r\n    bool isEscape() const\r\n    {\r\n        return isKey(Key_Escape) || isKey(27) || isControl('c')\r\n            || isControl(Key_BracketLeft);\r\n    }\r\n\r\n    bool is(int c) const\r\n    {\r\n        return m_xkey == c && !isControl();\r\n    }\r\n\r\n    bool isControl() const\r\n    {\r\n        return isOnlyControlModifier(m_modifiers);\r\n    }\r\n\r\n    bool isControl(int c) const\r\n    {\r\n        return isControl()\r\n            && (m_xkey == c || m_xkey + 32 == c || m_xkey + 64 == c || m_xkey + 96 == c);\r\n    }\r\n\r\n    bool isShift() const\r\n    {\r\n        return m_modifiers & Qt::ShiftModifier;\r\n    }\r\n\r\n    bool isShift(int c) const\r\n    {\r\n        return isShift() && m_xkey == c;\r\n    }\r\n\r\n    bool operator<(const Input &a) const\r\n    {\r\n        if (m_key != a.m_key)\r\n            return m_key < a.m_key;\r\n        // Text for some mapped key cannot be determined (e.g. <C-J>) so if text is not set for\r\n        // one of compared keys ignore it.\r\n        if (!m_text.isEmpty() && !a.m_text.isEmpty() && m_text != _(\" \"))\r\n            return m_text < a.m_text;\r\n        return m_modifiers < a.m_modifiers;\r\n    }\r\n\r\n    bool operator==(const Input &a) const\r\n    {\r\n        return !(*this < a || a < *this);\r\n    }\r\n\r\n    bool operator!=(const Input &a) const { return !operator==(a); }\r\n\r\n    QString text() const { return m_text; }\r\n\r\n    QChar asChar() const\r\n    {\r\n        return (m_text.size() == 1 ? m_text.at(0) : QChar());\r\n    }\r\n\r\n    int toInt(bool *ok, int base) const\r\n    {\r\n        const int uc = asChar().unicode();\r\n        int res;\r\n        if ('0' <= uc && uc <= '9')\r\n            res = uc -'0';\r\n        else if ('a' <= uc && uc <= 'z')\r\n            res = 10 + uc - 'a';\r\n        else if ('A' <= uc && uc <= 'Z')\r\n            res = 10 + uc - 'A';\r\n        else\r\n            res = base;\r\n        *ok = res < base;\r\n        return *ok ? res : 0;\r\n    }\r\n\r\n    int key() const { return m_key; }\r\n\r\n    Qt::KeyboardModifiers modifiers() const { return m_modifiers; }\r\n\r\n    // Return raw character for macro recording or dot command.\r\n    QChar raw() const\r\n    {\r\n        if (m_key == Key_Tab)\r\n            return QLatin1Char('\\t');\r\n        if (m_key == Key_Return)\r\n            return QLatin1Char('\\n');\r\n        if (m_key == Key_Escape)\r\n            return QChar(27);\r\n        return m_xkey;\r\n    }\r\n\r\n    QString toString() const\r\n    {\r\n        QString key = vimKeyNames().key(m_key);\r\n        bool namedKey = !key.isEmpty();\r\n\r\n        if (!namedKey) {\r\n            if (m_xkey == '<')\r\n                key = _(\"<LT>\");\r\n            else if (m_xkey == '>')\r\n                key = _(\"<GT>\");\r\n            else\r\n                key = QChar(m_xkey);\r\n        }\r\n\r\n        bool shift = isShift();\r\n        bool ctrl = isControl();\r\n        if (shift)\r\n            key.prepend(_(\"S-\"));\r\n        if (ctrl)\r\n            key.prepend(_(\"C-\"));\r\n\r\n        if (namedKey || shift || ctrl) {\r\n            key.prepend(QLatin1Char('<'));\r\n            key.append(QLatin1Char('>'));\r\n        }\r\n\r\n        return key;\r\n    }\r\n\r\n    QDebug dump(QDebug ts) const\r\n    {\r\n        return ts << m_key << '-' << m_modifiers << '-'\r\n            << quoteUnprintable(m_text);\r\n    }\r\nprivate:\r\n    int m_key;\r\n    int m_xkey;\r\n    Qt::KeyboardModifiers m_modifiers;\r\n    QString m_text;\r\n};\r\n\r\n// mapping to <Nop> (do nothing)\r\nstatic const Input Nop(-1, Qt::KeyboardModifiers(-1), QString());\r\n\r\nQDebug operator<<(QDebug ts, const Input &input) { return input.dump(ts); }\r\n\r\nclass Inputs : public QVector<Input>\r\n{\r\npublic:\r\n    Inputs() : m_noremap(true), m_silent(false) {}\r\n\r\n    explicit Inputs(const QString &str, bool noremap = true, bool silent = false)\r\n        : m_noremap(noremap), m_silent(silent)\r\n    {\r\n        parseFrom(str);\r\n        squeeze();\r\n    }\r\n\r\n    bool noremap() const { return m_noremap; }\r\n\r\n    bool silent() const { return m_silent; }\r\n\r\nprivate:\r\n    void parseFrom(const QString &str);\r\n\r\n    bool m_noremap;\r\n    bool m_silent;\r\n};\r\n\r\nstatic Input parseVimKeyName(const QString &keyName)\r\n{\r\n    if (keyName.length() == 1)\r\n        return Input(keyName.at(0));\r\n\r\n    const QStringList keys = keyName.split(QLatin1Char('-'));\r\n    const int len = keys.length();\r\n\r\n    if (len == 1 && keys.at(0).toUpper() == _(\"NOP\"))\r\n        return Nop;\r\n\r\n    Qt::KeyboardModifiers mods = NoModifier;\r\n    for (int i = 0; i < len - 1; ++i) {\r\n        const QString &key = keys[i].toUpper();\r\n        if (key == _(\"S\"))\r\n            mods |= Qt::ShiftModifier;\r\n        else if (key == _(\"C\"))\r\n            mods |= HostOsInfo::controlModifier();\r\n        else\r\n            return Input();\r\n    }\r\n\r\n    if (!keys.isEmpty()) {\r\n        const QString key = keys.last();\r\n        if (key.length() == 1) {\r\n            // simple character\r\n            QChar c = key.at(0).toUpper();\r\n            return Input(c.unicode(), mods);\r\n        }\r\n\r\n        // find key name\r\n        QMap<QString, int>::ConstIterator it = vimKeyNames().constFind(key.toUpper());\r\n        if (it != vimKeyNames().end())\r\n            return Input(*it, mods);\r\n    }\r\n\r\n    return Input();\r\n}\r\n\r\nvoid Inputs::parseFrom(const QString &str)\r\n{\r\n    const int n = str.size();\r\n    for (int i = 0; i < n; ++i) {\r\n        ushort c = str.at(i).unicode();\r\n        if (c == '<') {\r\n            int j = str.indexOf(QLatin1Char('>'), i);\r\n            Input input;\r\n            if (j != -1) {\r\n                const QString key = str.mid(i+1, j - i - 1);\r\n                if (!key.contains(QLatin1Char('<')))\r\n                    input = parseVimKeyName(key);\r\n            }\r\n            if (input.isValid()) {\r\n                append(input);\r\n                i = j;\r\n            } else {\r\n                append(Input(c));\r\n            }\r\n        } else {\r\n            append(Input(c));\r\n        }\r\n    }\r\n}\r\n\r\nclass History\r\n{\r\npublic:\r\n    History() : m_items(QString()), m_index(0) {}\r\n    void append(const QString &item);\r\n    const QString &move(const QStringRef &prefix, int skip);\r\n    const QString &current() const { return m_items[m_index]; }\r\n    const QStringList &items() const { return m_items; }\r\n    void restart() { m_index = m_items.size() - 1; }\r\n\r\nprivate:\r\n    // Last item is always empty or current search prefix.\r\n    QStringList m_items;\r\n    int m_index;\r\n};\r\n\r\nvoid History::append(const QString &item)\r\n{\r\n    if (item.isEmpty())\r\n        return;\r\n    m_items.pop_back();\r\n    m_items.removeAll(item);\r\n    m_items << item << QString();\r\n    restart();\r\n}\r\n\r\nconst QString &History::move(const QStringRef &prefix, int skip)\r\n{\r\n    if (!current().startsWith(prefix))\r\n        restart();\r\n\r\n    if (m_items.last() != prefix)\r\n        m_items[m_items.size() - 1] = prefix.toString();\r\n\r\n    int i = m_index + skip;\r\n    if (!prefix.isEmpty())\r\n        for (; i >= 0 && i < m_items.size() && !m_items[i].startsWith(prefix); i += skip)\r\n            ;\r\n    if (i >= 0 && i < m_items.size())\r\n        m_index = i;\r\n\r\n    return current();\r\n}\r\n\r\n// Command line buffer with prompt (i.e. :, / or ? characters), text contents and cursor position.\r\nclass CommandBuffer\r\n{\r\npublic:\r\n    CommandBuffer() : m_pos(0), m_anchor(0), m_userPos(0), m_historyAutoSave(true) {}\r\n\r\n    void setPrompt(const QChar &prompt) { m_prompt = prompt; }\r\n    void setContents(const QString &s) { m_buffer = s; m_anchor = m_pos = s.size(); }\r\n\r\n    void setContents(const QString &s, int pos, int anchor = -1)\r\n    {\r\n        m_buffer = s; m_pos = m_userPos = pos; m_anchor = anchor >= 0 ? anchor : pos;\r\n    }\r\n\r\n    QStringRef userContents() const { return m_buffer.leftRef(m_userPos); }\r\n    const QChar &prompt() const { return m_prompt; }\r\n    const QString &contents() const { return m_buffer; }\r\n    bool isEmpty() const { return m_buffer.isEmpty(); }\r\n    int cursorPos() const { return m_pos; }\r\n    int anchorPos() const { return m_anchor; }\r\n    bool hasSelection() const { return m_pos != m_anchor; }\r\n\r\n    void insertChar(QChar c) { m_buffer.insert(m_pos++, c); m_anchor = m_userPos = m_pos; }\r\n    void insertText(const QString &s)\r\n    {\r\n        m_buffer.insert(m_pos, s); m_anchor = m_userPos = m_pos = m_pos + s.size();\r\n    }\r\n    void deleteChar() { if (m_pos) m_buffer.remove(--m_pos, 1); m_anchor = m_userPos = m_pos; }\r\n\r\n    void moveLeft() { if (m_pos) m_userPos = --m_pos; }\r\n    void moveRight() { if (m_pos < m_buffer.size()) m_userPos = ++m_pos; }\r\n    void moveStart() { m_userPos = m_pos = 0; }\r\n    void moveEnd() { m_userPos = m_pos = m_buffer.size(); }\r\n\r\n    void setHistoryAutoSave(bool autoSave) { m_historyAutoSave = autoSave; }\r\n    void historyDown() { setContents(m_history.move(userContents(), 1)); }\r\n    void historyUp() { setContents(m_history.move(userContents(), -1)); }\r\n    const QStringList &historyItems() const { return m_history.items(); }\r\n    void historyPush(const QString &item = QString())\r\n    {\r\n        m_history.append(item.isNull() ? contents() : item);\r\n    }\r\n\r\n    void clear()\r\n    {\r\n        if (m_historyAutoSave)\r\n            historyPush();\r\n        m_buffer.clear();\r\n        m_anchor = m_userPos = m_pos = 0;\r\n    }\r\n\r\n    QString display() const\r\n    {\r\n        QString msg(m_prompt);\r\n        for (int i = 0; i != m_buffer.size(); ++i) {\r\n            const QChar c = m_buffer.at(i);\r\n            if (c.unicode() < 32) {\r\n                msg += QLatin1Char('^');\r\n                msg += QChar(c.unicode() + 64);\r\n            } else {\r\n                msg += c;\r\n            }\r\n        }\r\n        return msg;\r\n    }\r\n\r\n    void deleteSelected()\r\n    {\r\n        if (m_pos < m_anchor) {\r\n            m_buffer.remove(m_pos, m_anchor - m_pos);\r\n            m_anchor = m_pos;\r\n        } else {\r\n            m_buffer.remove(m_anchor, m_pos - m_anchor);\r\n            m_pos = m_anchor;\r\n        }\r\n    }\r\n\r\n    bool handleInput(const Input &input)\r\n    {\r\n        if (input.isShift(Key_Left)) {\r\n            moveLeft();\r\n        } else if (input.isShift(Key_Right)) {\r\n            moveRight();\r\n        } else if (input.isShift(Key_Home)) {\r\n            moveStart();\r\n        } else if (input.isShift(Key_End)) {\r\n            moveEnd();\r\n        } else if (input.isKey(Key_Left)) {\r\n            moveLeft();\r\n            m_anchor = m_pos;\r\n        } else if (input.isKey(Key_Right)) {\r\n            moveRight();\r\n            m_anchor = m_pos;\r\n        } else if (input.isKey(Key_Home)) {\r\n            moveStart();\r\n            m_anchor = m_pos;\r\n        } else if (input.isKey(Key_End)) {\r\n            moveEnd();\r\n            m_anchor = m_pos;\r\n        } else if (input.isKey(Key_Up) || input.isKey(Key_PageUp)) {\r\n            historyUp();\r\n        } else if (input.isKey(Key_Down) || input.isKey(Key_PageDown)) {\r\n            historyDown();\r\n        } else if (input.isKey(Key_Delete)) {\r\n            if (hasSelection()) {\r\n                deleteSelected();\r\n            } else {\r\n                if (m_pos < m_buffer.size())\r\n                    m_buffer.remove(m_pos, 1);\r\n                else\r\n                    deleteChar();\r\n            }\r\n        } else if (!input.text().isEmpty()) {\r\n            if (hasSelection())\r\n                deleteSelected();\r\n            insertText(input.text());\r\n        } else {\r\n            return false;\r\n        }\r\n        return true;\r\n    }\r\n\r\nprivate:\r\n    QString m_buffer;\r\n    QChar m_prompt;\r\n    History m_history;\r\n    int m_pos;\r\n    int m_anchor;\r\n    int m_userPos; // last position of inserted text (for retrieving history items)\r\n    bool m_historyAutoSave; // store items to history on clear()?\r\n};\r\n\r\n// Mappings for a specific mode (trie structure)\r\nclass ModeMapping : public QMap<Input, ModeMapping>\r\n{\r\npublic:\r\n    const Inputs &value() const { return m_value; }\r\n    void setValue(const Inputs &value) { m_value = value; }\r\nprivate:\r\n    Inputs m_value;\r\n};\r\n\r\n// Mappings for all modes\r\ntypedef QHash<char, ModeMapping> Mappings;\r\n\r\n// Iterator for mappings\r\nclass MappingsIterator : public QVector<ModeMapping::Iterator>\r\n{\r\npublic:\r\n    MappingsIterator(Mappings *mappings, char mode = -1, const Inputs &inputs = Inputs())\r\n        : m_parent(mappings)\r\n        , m_lastValid(-1)\r\n        , m_mode(0)\r\n    {\r\n        reset(mode);\r\n        walk(inputs);\r\n    }\r\n\r\n    // Reset iterator state. Keep previous mode if 0.\r\n    void reset(char mode = 0)\r\n    {\r\n        clear();\r\n        m_lastValid = -1;\r\n        m_currentInputs.clear();\r\n        if (mode != 0) {\r\n            m_mode = mode;\r\n            if (mode != -1)\r\n                m_modeMapping = m_parent->find(mode);\r\n        }\r\n    }\r\n\r\n    bool isValid() const { return !empty(); }\r\n\r\n    // Return true if mapping can be extended.\r\n    bool canExtend() const { return isValid() && !last()->empty(); }\r\n\r\n    // Return true if this mapping can be used.\r\n    bool isComplete() const { return m_lastValid != -1; }\r\n\r\n    // Return size of current map.\r\n    int mapLength() const { return m_lastValid + 1; }\r\n\r\n    bool walk(const Input &input)\r\n    {\r\n        m_currentInputs.append(input);\r\n\r\n        if (m_modeMapping == m_parent->end())\r\n            return false;\r\n\r\n        ModeMapping::Iterator it;\r\n        if (isValid()) {\r\n            it = last()->find(input);\r\n            if (it == last()->end())\r\n                return false;\r\n        } else {\r\n            it = m_modeMapping->find(input);\r\n            if (it == m_modeMapping->end())\r\n                return false;\r\n        }\r\n\r\n        if (!it->value().isEmpty())\r\n            m_lastValid = size();\r\n        append(it);\r\n\r\n        return true;\r\n    }\r\n\r\n    bool walk(const Inputs &inputs)\r\n    {\r\n        foreach (const Input &input, inputs) {\r\n            if (!walk(input))\r\n                return false;\r\n        }\r\n        return true;\r\n    }\r\n\r\n    // Return current mapped value. Iterator must be valid.\r\n    const Inputs &inputs() const\r\n    {\r\n        return at(m_lastValid)->value();\r\n    }\r\n\r\n    void remove()\r\n    {\r\n        if (isValid()) {\r\n            if (canExtend()) {\r\n                last()->setValue(Inputs());\r\n            } else {\r\n                if (size() > 1) {\r\n                    while (last()->empty()) {\r\n                        at(size() - 2)->erase(last());\r\n                        pop_back();\r\n                        if (size() == 1 || !last()->value().isEmpty())\r\n                            break;\r\n                    }\r\n                    if (last()->empty() && last()->value().isEmpty())\r\n                        m_modeMapping->erase(last());\r\n                } else if (last()->empty() && !last()->value().isEmpty()) {\r\n                    m_modeMapping->erase(last());\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    void setInputs(const Inputs &key, const Inputs &inputs, bool unique = false)\r\n    {\r\n        ModeMapping *current = &(*m_parent)[m_mode];\r\n        foreach (const Input &input, key)\r\n            current = &(*current)[input];\r\n        if (!unique || current->value().isEmpty())\r\n            current->setValue(inputs);\r\n    }\r\n\r\n    const Inputs &currentInputs() const { return m_currentInputs; }\r\n\r\nprivate:\r\n    Mappings *m_parent;\r\n    Mappings::Iterator m_modeMapping;\r\n    int m_lastValid;\r\n    char m_mode;\r\n    Inputs m_currentInputs;\r\n};\r\n\r\n// state of current mapping\r\nstruct MappingState {\r\n    MappingState()\r\n        : noremap(false), silent(false), editBlock(false) {}\r\n    MappingState(bool noremap, bool silent, bool editBlock)\r\n        : noremap(noremap), silent(silent), editBlock(editBlock) {}\r\n    bool noremap;\r\n    bool silent;\r\n    bool editBlock;\r\n};\r\n\r\nclass FakeVimHandler::Private : public QObject\r\n{\r\n    Q_OBJECT\r\n\r\npublic:\r\n    Private(FakeVimHandler *parent, QWidget *widget);\r\n\r\n    EventResult handleEvent(QKeyEvent *ev);\r\n    bool wantsOverride(QKeyEvent *ev);\r\n    bool parseExCommmand(QString *line, ExCommand *cmd);\r\n    bool parseLineRange(QString *line, ExCommand *cmd);\r\n    int parseLineAddress(QString *cmd);\r\n    void parseRangeCount(const QString &line, Range *range) const;\r\n    void handleCommand(const QString &cmd); // Sets m_tc + handleExCommand\r\n    void handleExCommand(const QString &cmd);\r\n\r\n    void installEventFilter();\r\n    void removeEventFilter();\r\n    void passShortcuts(bool enable);\r\n    void setupWidget();\r\n    void restoreWidget(int tabSize);\r\n\r\n    friend class FakeVimHandler;\r\n\r\n    void init();\r\n    void focus();\r\n\r\n    // Call before any FakeVim processing (import cursor position from editor)\r\n    void enterFakeVim();\r\n    // Call after any FakeVim processing\r\n    // (if needUpdate is true, export cursor position to editor and scroll)\r\n    void leaveFakeVim(bool needUpdate = true);\r\n\r\n    EventResult handleKey(const Input &input);\r\n    EventResult handleDefaultKey(const Input &input);\r\n    EventResult handleCurrentMapAsDefault();\r\n    void prependInputs(const QVector<Input> &inputs); // Handle inputs.\r\n    void prependMapping(const Inputs &inputs); // Handle inputs as mapping.\r\n    bool expandCompleteMapping(); // Return false if current mapping is not complete.\r\n    bool extendMapping(const Input &input); // Return false if no suitable mappig found.\r\n    void endMapping();\r\n    bool canHandleMapping();\r\n    void clearPendingInput();\r\n    void waitForMapping();\r\n    EventResult stopWaitForMapping(bool hasInput);\r\n    EventResult handleInsertOrReplaceMode(const Input &);\r\n    void handleInsertMode(const Input &);\r\n    void handleReplaceMode(const Input &);\r\n    void finishInsertMode();\r\n\r\n    EventResult handleCommandMode(const Input &);\r\n\r\n    // return true only if input in current mode and sub-mode was correctly handled\r\n    bool handleEscape();\r\n    bool handleNoSubMode(const Input &);\r\n    bool handleChangeDeleteSubModes(const Input &);\r\n    bool handleReplaceSubMode(const Input &);\r\n    bool handleFilterSubMode(const Input &);\r\n    bool handleRegisterSubMode(const Input &);\r\n    bool handleShiftSubMode(const Input &);\r\n    bool handleChangeCaseSubMode(const Input &);\r\n    bool handleWindowSubMode(const Input &);\r\n    bool handleYankSubMode(const Input &);\r\n    bool handleZSubMode(const Input &);\r\n    bool handleCapitalZSubMode(const Input &);\r\n    bool handleMacroRecordSubMode(const Input &);\r\n    bool handleMacroExecuteSubMode(const Input &);\r\n\r\n    bool handleCount(const Input &); // Handle count for commands (return false if input isn't count).\r\n    bool handleMovement(const Input &);\r\n\r\n    EventResult handleExMode(const Input &);\r\n    EventResult handleSearchSubSubMode(const Input &);\r\n    bool handleCommandSubSubMode(const Input &);\r\n    void fixSelection(); // Fix selection according to current range, move and command modes.\r\n    bool finishSearch();\r\n    void finishMovement(const QString &dotCommandMovement = QString());\r\n    void resetCommandMode();\r\n    void clearCommandMode();\r\n    QTextCursor search(const SearchData &sd, int startPos, int count, bool showMessages);\r\n    void search(const SearchData &sd, bool showMessages = true);\r\n    bool searchNext(bool forward = true);\r\n    void searchBalanced(bool forward, QChar needle, QChar other);\r\n    void highlightMatches(const QString &needle);\r\n    void stopIncrementalFind();\r\n    void updateFind(bool isComplete);\r\n\r\n    void resetCount();\r\n    bool isInputCount(const Input &) const; // Return true if input can be used as count for commands.\r\n    int mvCount() const { return qMax(1, g.mvcount); }\r\n    int opCount() const { return qMax(1, g.opcount); }\r\n    int count() const { return mvCount() * opCount(); }\r\n    QTextBlock block() const { return m_cursor.block(); }\r\n    int leftDist() const { return position() - block().position(); }\r\n    int rightDist() const { return block().length() - leftDist() - (isVisualCharMode() ? 0 : 1); }\r\n    bool atBlockStart() const { return m_cursor.atBlockStart(); }\r\n    bool atBlockEnd() const { return m_cursor.atBlockEnd(); }\r\n    bool atEndOfLine() const { return atBlockEnd() && block().length() > 1; }\r\n    bool atDocumentEnd() const { return position() >= lastPositionInDocument(true); }\r\n    bool atDocumentStart() const { return m_cursor.atStart(); }\r\n\r\n    bool atEmptyLine(const QTextCursor &tc = QTextCursor()) const;\r\n    bool atBoundary(bool end, bool simple, bool onlyWords = false,\r\n        const QTextCursor &tc = QTextCursor()) const;\r\n    bool atWordBoundary(bool end, bool simple, const QTextCursor &tc = QTextCursor()) const;\r\n    bool atWordStart(bool simple, const QTextCursor &tc = QTextCursor()) const;\r\n    bool atWordEnd(bool simple, const QTextCursor &tc = QTextCursor()) const;\r\n    bool isFirstNonBlankOnLine(int pos);\r\n\r\n    int lastPositionInDocument(bool ignoreMode = false) const; // Returns last valid position in doc.\r\n    int firstPositionInLine(int line, bool onlyVisibleLines = true) const; // 1 based line, 0 based pos\r\n    int lastPositionInLine(int line, bool onlyVisibleLines = true) const; // 1 based line, 0 based pos\r\n    int lineForPosition(int pos) const;  // 1 based line, 0 based pos\r\n    QString lineContents(int line) const; // 1 based line\r\n    QString textAt(int from, int to) const;\r\n    void setLineContents(int line, const QString &contents); // 1 based line\r\n    int blockBoundary(const QString &left, const QString &right,\r\n        bool end, int count) const; // end or start position of current code block\r\n    int lineNumber(const QTextBlock &block) const;\r\n\r\n    QTextBlock nextLine(const QTextBlock &block) const; // following line (respects wrapped parts)\r\n    QTextBlock previousLine(const QTextBlock &block) const; // previous line (respects wrapped parts)\r\n\r\n    int linesOnScreen() const;\r\n    int linesInDocument() const;\r\n\r\n    // The following use all zero-based counting.\r\n    int cursorLineOnScreen() const;\r\n    int cursorLine() const;\r\n    int cursorBlockNumber() const; // \".\" address\r\n    int physicalCursorColumn() const; // as stored in the data\r\n    int logicalCursorColumn() const; // as visible on screen\r\n    int physicalToLogicalColumn(int physical, const QString &text) const;\r\n    int logicalToPhysicalColumn(int logical, const QString &text) const;\r\n    int windowScrollOffset() const; // return scrolloffset but max half the current window height\r\n    Column cursorColumn() const; // as visible on screen\r\n    void updateFirstVisibleLine();\r\n    int firstVisibleLine() const;\r\n    int lastVisibleLine() const;\r\n    int lineOnTop(int count = 1) const; // [count]-th line from top reachable without scrolling\r\n    int lineOnBottom(int count = 1) const; // [count]-th line from bottom reachable without scrolling\r\n    void scrollToLine(int line);\r\n    void scrollUp(int count);\r\n    void scrollDown(int count) { scrollUp(-count); }\r\n    void updateScrollOffset();\r\n    void alignViewportToCursor(Qt::AlignmentFlag align, int line = -1,\r\n        bool moveToNonBlank = false);\r\n\r\n    int lineToBlockNumber(int line) const;\r\n\r\n    void setCursorPosition(const CursorPosition &p);\r\n    void setCursorPosition(QTextCursor *tc, const CursorPosition &p);\r\n\r\n    // Helper functions for indenting/\r\n    bool isElectricCharacter(QChar c) const;\r\n    void indentSelectedText(QChar lastTyped = QChar());\r\n    void indentText(const Range &range, QChar lastTyped = QChar());\r\n    void shiftRegionLeft(int repeat = 1);\r\n    void shiftRegionRight(int repeat = 1);\r\n\r\n    void moveToFirstNonBlankOnLine();\r\n    void moveToFirstNonBlankOnLine(QTextCursor *tc);\r\n    void moveToFirstNonBlankOnLineVisually();\r\n    void moveToNonBlankOnLine(QTextCursor *tc);\r\n    void moveToTargetColumn();\r\n    void setTargetColumn();\r\n    void moveToMatchingParanthesis();\r\n    void moveToBoundary(bool simple, bool forward = true);\r\n    void moveToNextBoundary(bool end, int count, bool simple, bool forward);\r\n    void moveToNextBoundaryStart(int count, bool simple, bool forward = true);\r\n    void moveToNextBoundaryEnd(int count, bool simple, bool forward = true);\r\n    void moveToBoundaryStart(int count, bool simple, bool forward = true);\r\n    void moveToBoundaryEnd(int count, bool simple, bool forward = true);\r\n    void moveToNextWord(bool end, int count, bool simple, bool forward, bool emptyLines);\r\n    void moveToNextWordStart(int count, bool simple, bool forward = true, bool emptyLines = true);\r\n    void moveToNextWordEnd(int count, bool simple, bool forward = true, bool emptyLines = true);\r\n    void moveToWordStart(int count, bool simple, bool forward = true, bool emptyLines = true);\r\n    void moveToWordEnd(int count, bool simple, bool forward = true, bool emptyLines = true);\r\n\r\n    // Convenience wrappers to reduce line noise.\r\n    void moveToStartOfLine();\r\n    void moveToStartOfLineVisually();\r\n    void moveToEndOfLine();\r\n    void moveToEndOfLineVisually();\r\n    void moveToEndOfLineVisually(QTextCursor *tc);\r\n    void moveBehindEndOfLine();\r\n    void moveUp(int n = 1) { moveDown(-n); }\r\n    void moveDown(int n = 1);\r\n    void moveUpVisually(int n = 1) { moveDownVisually(-n); }\r\n    void moveDownVisually(int n = 1);\r\n    void movePageDown(int count = 1);\r\n    void movePageUp(int count = 1) { movePageDown(-count); }\r\n    void dump(const char *msg) const {\r\n        qDebug() << msg << \"POS: \" << anchor() << position()\r\n            << \"EXT: \" << m_oldExternalAnchor << m_oldExternalPosition\r\n            << \"INT: \" << m_oldInternalAnchor << m_oldInternalPosition\r\n            << \"VISUAL: \" << g.visualMode;\r\n    }\r\n    void moveRight(int n = 1) {\r\n        //dump(\"RIGHT 1\");\r\n        if (isVisualCharMode()) {\r\n            const QTextBlock currentBlock = block();\r\n            const int max = currentBlock.position() + currentBlock.length() - 1;\r\n            const int pos = position() + n;\r\n            setPosition(qMin(pos, max));\r\n        } else {\r\n            m_cursor.movePosition(Right, KeepAnchor, n);\r\n        }\r\n        if (atEndOfLine())\r\n            emit q->fold(1, false);\r\n        //dump(\"RIGHT 2\");\r\n    }\r\n    void moveLeft(int n = 1) {\r\n        m_cursor.movePosition(Left, KeepAnchor, n);\r\n    }\r\n    void setAnchor() {\r\n        m_cursor.setPosition(position(), MoveAnchor);\r\n    }\r\n    void setAnchor(int position) {\r\n        m_cursor.setPosition(position, KeepAnchor);\r\n    }\r\n    void setPosition(int position) {\r\n        m_cursor.setPosition(position, KeepAnchor);\r\n    }\r\n    void setAnchorAndPosition(int anchor, int position) {\r\n        m_cursor.setPosition(anchor, MoveAnchor);\r\n        m_cursor.setPosition(position, KeepAnchor);\r\n    }\r\n    // Set cursor in text editor widget.\r\n    void commitCursor() {\r\n        if (isVisualBlockMode()) {\r\n            emit q->requestSetBlockSelection(m_cursor);\r\n        } else  {\r\n            emit q->requestDisableBlockSelection();\r\n            if (editor())\r\n                EDITOR(setTextCursor(m_cursor));\r\n        }\r\n    }\r\n    // Restore cursor from editor widget.\r\n    void pullCursor() {\r\n        if (isVisualBlockMode())\r\n            q->requestBlockSelection(&m_cursor);\r\n        else if (editor())\r\n            m_cursor = EDITOR(textCursor());\r\n    }\r\n\r\n    // Values to save when starting FakeVim processing.\r\n    int m_firstVisibleLine;\r\n    QTextCursor m_cursor;\r\n\r\n    bool moveToPreviousParagraph(int count) { return moveToNextParagraph(-count); }\r\n    bool moveToNextParagraph(int count);\r\n\r\n    bool handleFfTt(const QString &key, bool repeats = false);\r\n\r\n    void enterVisualInsertMode(QChar command);\r\n    void enterReplaceMode();\r\n    void enterInsertMode();\r\n    void enterInsertOrReplaceMode(Mode mode);\r\n    void enterCommandMode(Mode returnToMode = CommandMode);\r\n    void enterExMode(const QString &contents = QString());\r\n    void showMessage(MessageLevel level, const QString &msg);\r\n    void clearMessage() { showMessage(MessageInfo, QString()); }\r\n    void notImplementedYet();\r\n    void updateMiniBuffer();\r\n    void updateSelection();\r\n    void updateHighlights();\r\n    void updateCursorShape();\r\n    QWidget *editor() const;\r\n    QTextDocument *document() const { return EDITOR(document()); }\r\n    QChar characterAtCursor() const\r\n        { return document()->characterAt(position()); }\r\n\r\n    void joinPreviousEditBlock();\r\n    void beginEditBlock(bool largeEditBlock = false);\r\n    void beginLargeEditBlock() { beginEditBlock(true); }\r\n    void endEditBlock();\r\n    void breakEditBlock() { m_buffer->breakEditBlock = true; }\r\n\r\n    Q_SLOT void onContentsChanged(int position, int charsRemoved, int charsAdded);\r\n    Q_SLOT void onUndoCommandAdded();\r\n\r\n    bool isInsertMode() const { return g.mode == InsertMode || g.mode == ReplaceMode; }\r\n    // Waiting for movement operator.\r\n    bool isOperatorPending() const {\r\n        return g.submode == ChangeSubMode\r\n            || g.submode == DeleteSubMode\r\n            || g.submode == FilterSubMode\r\n            || g.submode == IndentSubMode\r\n            || g.submode == ShiftLeftSubMode\r\n            || g.submode == ShiftRightSubMode\r\n            || g.submode == InvertCaseSubMode\r\n            || g.submode == DownCaseSubMode\r\n            || g.submode == UpCaseSubMode\r\n            || g.submode == YankSubMode; }\r\n\r\n    bool isVisualMode() const { return g.visualMode != NoVisualMode; }\r\n    bool isNoVisualMode() const { return g.visualMode == NoVisualMode; }\r\n    bool isVisualCharMode() const { return g.visualMode == VisualCharMode; }\r\n    bool isVisualLineMode() const { return g.visualMode == VisualLineMode; }\r\n    bool isVisualBlockMode() const { return g.visualMode == VisualBlockMode; }\r\n    char currentModeCode() const;\r\n    void updateEditor();\r\n\r\n    void selectTextObject(bool simple, bool inner);\r\n    void selectWordTextObject(bool inner);\r\n    void selectWORDTextObject(bool inner);\r\n    void selectSentenceTextObject(bool inner);\r\n    void selectParagraphTextObject(bool inner);\r\n    bool changeNumberTextObject(int count);\r\n    // return true only if cursor is in a block delimited with correct characters\r\n    bool selectBlockTextObject(bool inner, char left, char right);\r\n    bool selectQuotedStringTextObject(bool inner, const QString &quote);\r\n\r\n    Q_SLOT void importSelection();\r\n    void exportSelection();\r\n    void commitInsertState();\r\n    void invalidateInsertState();\r\n    bool isInsertStateValid() const;\r\n    void clearLastInsertion();\r\n    void ensureCursorVisible();\r\n    void insertInInsertMode(const QString &text);\r\n\r\n    // Macro recording\r\n    bool startRecording(const Input &input);\r\n    void record(const Input &input);\r\n    void stopRecording();\r\n    bool executeRegister(int reg);\r\n\r\npublic:\r\n    QTextEdit *m_textedit;\r\n    QPlainTextEdit *m_plaintextedit;\r\n    bool m_wasReadOnly; // saves read-only state of document\r\n\r\n    bool m_inFakeVim; // true if currently processing a key press or a command\r\n\r\n    FakeVimHandler *q;\r\n    int m_oldExternalPosition; // copy from last event to check for external changes\r\n    int m_oldExternalAnchor;\r\n    int m_oldInternalPosition; // copy from last event to check for external changes\r\n    int m_oldInternalAnchor;\r\n    int m_register;\r\n    BlockInsertMode m_visualBlockInsert;\r\n\r\n    bool m_fakeEnd;\r\n    bool m_anchorPastEnd;\r\n    bool m_positionPastEnd; // '$' & 'l' in visual mode can move past eol\r\n\r\n    QString m_currentFileName;\r\n\r\n    int m_findStartPosition;\r\n\r\n    int anchor() const { return m_cursor.anchor(); }\r\n    int position() const { return m_cursor.position(); }\r\n\r\n    struct TransformationData\r\n    {\r\n        TransformationData(const QString &s, const QVariant &d)\r\n            : from(s), extraData(d) {}\r\n        QString from;\r\n        QString to;\r\n        QVariant extraData;\r\n    };\r\n    typedef void (Private::*Transformation)(TransformationData *td);\r\n    void transformText(const Range &range, Transformation transformation,\r\n        const QVariant &extraData = QVariant());\r\n\r\n    void insertText(QTextCursor &tc, const QString &text);\r\n    void insertText(const Register &reg);\r\n    void removeText(const Range &range);\r\n    void removeTransform(TransformationData *td);\r\n\r\n    void invertCase(const Range &range);\r\n    void invertCaseTransform(TransformationData *td);\r\n\r\n    void upCase(const Range &range);\r\n    void upCaseTransform(TransformationData *td);\r\n\r\n    void downCase(const Range &range);\r\n    void downCaseTransform(TransformationData *td);\r\n\r\n    void replaceText(const Range &range, const QString &str);\r\n    void replaceByStringTransform(TransformationData *td);\r\n    void replaceByCharTransform(TransformationData *td);\r\n\r\n    QString selectText(const Range &range) const;\r\n    void setCurrentRange(const Range &range);\r\n    Range currentRange() const { return Range(position(), anchor(), g.rangemode); }\r\n\r\n    void yankText(const Range &range, int toregister);\r\n\r\n    void pasteText(bool afterCursor);\r\n\r\n    void joinLines(int count, bool preserveSpace = false);\r\n\r\n    void insertNewLine();\r\n\r\n    bool handleInsertInEditor(const Input &input);\r\n    bool passEventToEditor(QEvent &event); // Pass event to editor widget without filtering. Returns true if event was processed.\r\n\r\n    // undo handling\r\n    int revision() const { return document()->availableUndoSteps(); }\r\n    void undoRedo(bool undo);\r\n    void undo();\r\n    void redo();\r\n    void pushUndoState(bool overwrite = true);\r\n\r\n    // extra data for '.'\r\n    void replay(const QString &text, int repeat = 1);\r\n    void setDotCommand(const QString &cmd) { g.dotCommand = cmd; }\r\n    void setDotCommand(const QString &cmd, int n) { g.dotCommand = cmd.arg(n); }\r\n    QString visualDotCommand() const;\r\n\r\n    // visual modes\r\n    void toggleVisualMode(VisualMode visualMode);\r\n    void leaveVisualMode();\r\n\r\n    // marks\r\n    Mark mark(QChar code) const;\r\n    void setMark(QChar code, CursorPosition position);\r\n    // jump to valid mark return true if mark is valid and local\r\n    bool jumpToMark(QChar mark, bool backTickMode);\r\n    // update marks on undo/redo\r\n    void updateMarks(const Marks &newMarks);\r\n    CursorPosition markLessPosition() const { return mark(QLatin1Char('<')).position(document()); }\r\n    CursorPosition markGreaterPosition() const { return mark(QLatin1Char('>')).position(document()); }\r\n\r\n    // vi style configuration\r\n    QVariant config(int code) const { return theFakeVimSetting(code)->value(); }\r\n    bool hasConfig(int code) const { return config(code).toBool(); }\r\n    bool hasConfig(int code, const char *value) const // FIXME\r\n        { return config(code).toString().contains(_(value)); }\r\n\r\n    int m_targetColumn; // -1 if past end of line\r\n    int m_visualTargetColumn; // 'l' can move past eol in visual mode only\r\n    int m_targetColumnWrapped; // column in current part of wrapped line\r\n\r\n    // auto-indent\r\n    QString tabExpand(int len) const;\r\n    Column indentation(const QString &line) const;\r\n    void insertAutomaticIndentation(bool goingDown, bool forceAutoIndent = false);\r\n    // number of autoindented characters\r\n    void handleStartOfLine();\r\n\r\n    // register handling\r\n    QString registerContents(int reg) const;\r\n    void setRegister(int reg, const QString &contents, RangeMode mode);\r\n    RangeMode registerRangeMode(int reg) const;\r\n    void getRegisterType(int reg, bool *isClipboard, bool *isSelection) const;\r\n\r\n    void recordJump(int position = -1);\r\n    void jump(int distance);\r\n\r\n    QList<QTextEdit::ExtraSelection> m_extraSelections;\r\n    QTextCursor m_searchCursor;\r\n    int m_searchStartPosition;\r\n    int m_searchFromScreenLine;\r\n    QString m_highlighted; // currently highlighted text\r\n\r\n    bool handleExCommandHelper(ExCommand &cmd); // Returns success.\r\n    bool handleExPluginCommand(const ExCommand &cmd); // Handled by plugin?\r\n    bool handleExBangCommand(const ExCommand &cmd);\r\n    bool handleExYankDeleteCommand(const ExCommand &cmd);\r\n    bool handleExChangeCommand(const ExCommand &cmd);\r\n    bool handleExMoveCommand(const ExCommand &cmd);\r\n    bool handleExJoinCommand(const ExCommand &cmd);\r\n    bool handleExGotoCommand(const ExCommand &cmd);\r\n    bool handleExHistoryCommand(const ExCommand &cmd);\r\n    bool handleExRegisterCommand(const ExCommand &cmd);\r\n    bool handleExMapCommand(const ExCommand &cmd);\r\n    bool handleExNohlsearchCommand(const ExCommand &cmd);\r\n    bool handleExNormalCommand(const ExCommand &cmd);\r\n    bool handleExReadCommand(const ExCommand &cmd);\r\n    bool handleExUndoRedoCommand(const ExCommand &cmd);\r\n    bool handleExSetCommand(const ExCommand &cmd);\r\n    bool handleExShiftCommand(const ExCommand &cmd);\r\n    bool handleExSourceCommand(const ExCommand &cmd);\r\n    bool handleExSubstituteCommand(const ExCommand &cmd);\r\n    bool handleExWriteCommand(const ExCommand &cmd);\r\n    bool handleExEchoCommand(const ExCommand &cmd);\r\n\r\n    void timerEvent(QTimerEvent *ev);\r\n\r\n    void setupCharClass();\r\n    int charClass(QChar c, bool simple) const;\r\n    signed char m_charClass[256];\r\n\r\n    int m_ctrlVAccumulator;\r\n    int m_ctrlVLength;\r\n    int m_ctrlVBase;\r\n\r\n    void miniBufferTextEdited(const QString &text, int cursorPos, int anchorPos);\r\n\r\n    // Data shared among editors with same document.\r\n    struct BufferData\r\n    {\r\n        BufferData()\r\n            : lastRevision(0)\r\n            , editBlockLevel(0)\r\n            , breakEditBlock(false)\r\n            , lastVisualMode(NoVisualMode)\r\n            , lastVisualModeInverted(false)\r\n        {}\r\n\r\n        QStack<State> undo;\r\n        QStack<State> redo;\r\n        State undoState;\r\n        int lastRevision;\r\n\r\n        int editBlockLevel; // current level of edit blocks\r\n        bool breakEditBlock; // if true, joinPreviousEditBlock() starts new edit block\r\n\r\n        QStack<CursorPosition> jumpListUndo;\r\n        QStack<CursorPosition> jumpListRedo;\r\n        CursorPosition lastChangePosition;\r\n\r\n        VisualMode lastVisualMode;\r\n        bool lastVisualModeInverted;\r\n\r\n        Marks marks;\r\n\r\n        // Insert state to get last inserted text.\r\n        struct InsertState {\r\n            int pos1;\r\n            int pos2;\r\n            int backspaces;\r\n            int deletes;\r\n            QSet<int> spaces;\r\n            bool insertingSpaces;\r\n            QString textBeforeCursor;\r\n            bool newLineBefore;\r\n            bool newLineAfter;\r\n        } insertState;\r\n\r\n        QString lastInsertion;\r\n    };\r\n\r\n    typedef QSharedPointer<BufferData> BufferDataPtr;\r\n    void pullOrCreateBufferData();\r\n    BufferDataPtr m_buffer;\r\n\r\n    // Data shared among all editors.\r\n    static struct GlobalData\r\n    {\r\n        GlobalData()\r\n            : passing(false)\r\n            , mode(CommandMode)\r\n            , submode(NoSubMode)\r\n            , subsubmode(NoSubSubMode)\r\n            , visualMode(NoVisualMode)\r\n            , mvcount(0)\r\n            , opcount(0)\r\n            , movetype(MoveInclusive)\r\n            , rangemode(RangeCharMode)\r\n            , gflag(false)\r\n            , mappings()\r\n            , currentMap(&mappings)\r\n            , inputTimer(-1)\r\n            , mapDepth(0)\r\n            , currentMessageLevel(MessageInfo)\r\n            , lastSearchForward(false)\r\n            , highlightsCleared(false)\r\n            , findPending(false)\r\n            , returnToMode(CommandMode)\r\n            , currentRegister(0)\r\n            , lastExecutedRegister(0)\r\n        {\r\n            commandBuffer.setPrompt(QLatin1Char(':'));\r\n        }\r\n\r\n        // Current state.\r\n        bool passing; // let the core see the next event\r\n        Mode mode;\r\n        SubMode submode;\r\n        SubSubMode subsubmode;\r\n        Input subsubdata;\r\n        VisualMode visualMode;\r\n\r\n        // [count] for current command, 0 if no [count] available\r\n        int mvcount;\r\n        int opcount;\r\n\r\n        MoveType movetype;\r\n        RangeMode rangemode;\r\n        bool gflag;  // whether current command started with 'g'\r\n\r\n        // Extra data for ';'.\r\n        Input semicolonType;  // 'f', 'F', 't', 'T'\r\n        QString semicolonKey;\r\n\r\n        // Repetition.\r\n        QString dotCommand;\r\n\r\n        QHash<int, Register> registers;\r\n\r\n        // All mappings.\r\n        Mappings mappings;\r\n\r\n        // Input.\r\n        QList<Input> pendingInput;\r\n        MappingsIterator currentMap;\r\n        int inputTimer;\r\n        QStack<MappingState> mapStates;\r\n        int mapDepth;\r\n\r\n        // Command line buffers.\r\n        CommandBuffer commandBuffer;\r\n        CommandBuffer searchBuffer;\r\n\r\n        // Current mini buffer message.\r\n        QString currentMessage;\r\n        MessageLevel currentMessageLevel;\r\n        QString currentCommand;\r\n\r\n        // Search state.\r\n        QString lastSearch; // last search expression as entered by user\r\n        QString lastNeedle; // last search expression translated with vimPatternToQtPattern()\r\n        bool lastSearchForward; // last search command was '/' or '*'\r\n        bool highlightsCleared; // ':nohlsearch' command is active until next search\r\n        bool findPending; // currently searching using external tool (until editor is focused again)\r\n\r\n        // Last substitution command.\r\n        QString lastSubstituteFlags;\r\n        QString lastSubstitutePattern;\r\n        QString lastSubstituteReplacement;\r\n\r\n        // Global marks.\r\n        Marks marks;\r\n\r\n        // Return to insert/replace mode after single command (<C-O>).\r\n        Mode returnToMode;\r\n\r\n        // Currently recorded macro (not recording if null string).\r\n        QString recording;\r\n        int currentRegister;\r\n        int lastExecutedRegister;\r\n    } g;\r\n};\r\n\r\nFakeVimHandler::Private::GlobalData FakeVimHandler::Private::g;\r\n\r\nFakeVimHandler::Private::Private(FakeVimHandler *parent, QWidget *widget)\r\n{\r\n    q = parent;\r\n    m_textedit = qobject_cast<QTextEdit *>(widget);\r\n    m_plaintextedit = qobject_cast<QPlainTextEdit *>(widget);\r\n\r\n    init();\r\n\r\n    if (editor()) {\r\n        connect(EDITOR(document()), SIGNAL(contentsChange(int,int,int)),\r\n                SLOT(onContentsChanged(int,int,int)));\r\n        connect(EDITOR(document()), SIGNAL(undoCommandAdded()), SLOT(onUndoCommandAdded()));\r\n        m_buffer->lastRevision = revision();\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::init()\r\n{\r\n    m_inFakeVim = false;\r\n    m_findStartPosition = -1;\r\n    m_visualBlockInsert = NoneBlockInsertMode;\r\n    m_fakeEnd = false;\r\n    m_positionPastEnd = false;\r\n    m_anchorPastEnd = false;\r\n    m_register = '\"';\r\n    m_targetColumn = 0;\r\n    m_visualTargetColumn = 0;\r\n    m_targetColumnWrapped = 0;\r\n    m_oldInternalAnchor = -1;\r\n    m_oldInternalPosition = -1;\r\n    m_oldExternalAnchor = -1;\r\n    m_oldExternalPosition = -1;\r\n    m_searchStartPosition = 0;\r\n    m_searchFromScreenLine = 0;\r\n    m_firstVisibleLine = 0;\r\n    m_ctrlVAccumulator = 0;\r\n    m_ctrlVLength = 0;\r\n    m_ctrlVBase = 0;\r\n\r\n    pullOrCreateBufferData();\r\n    setupCharClass();\r\n}\r\n\r\nvoid FakeVimHandler::Private::focus()\r\n{\r\n    enterFakeVim();\r\n\r\n    stopIncrementalFind();\r\n    if (!isInsertMode()) {\r\n        if (g.subsubmode == SearchSubSubMode) {\r\n            setPosition(m_searchStartPosition);\r\n            scrollToLine(m_searchFromScreenLine);\r\n            setTargetColumn();\r\n            setAnchor();\r\n            commitCursor();\r\n        } else if (g.submode != NoSubMode || g.mode == ExMode) {\r\n            leaveVisualMode();\r\n            setPosition(qMin(position(), anchor()));\r\n            setTargetColumn();\r\n            setAnchor();\r\n            commitCursor();\r\n        }\r\n\r\n        bool exitCommandLine = (g.subsubmode == SearchSubSubMode || g.mode == ExMode);\r\n        resetCommandMode();\r\n        if (exitCommandLine)\r\n            updateMiniBuffer();\r\n    }\r\n    updateCursorShape();\r\n    if (g.mode != CommandMode)\r\n        updateMiniBuffer();\r\n    updateHighlights();\r\n\r\n    leaveFakeVim(false);\r\n}\r\n\r\nvoid FakeVimHandler::Private::enterFakeVim()\r\n{\r\n    QTC_ASSERT(!m_inFakeVim, qDebug() << \"enterFakeVim() shouldn't be called recursively!\"; return);\r\n\r\n    pullOrCreateBufferData();\r\n\r\n    pullCursor();\r\n    if (m_cursor.isNull())\r\n        m_cursor = QTextCursor(document());\r\n\r\n    m_inFakeVim = true;\r\n\r\n    removeEventFilter();\r\n\r\n    updateFirstVisibleLine();\r\n    importSelection();\r\n\r\n    // Position changed externally, e.g. by code completion.\r\n    if (position() != m_oldInternalPosition) {\r\n        // record external jump to different line\r\n        if (m_oldInternalPosition != -1 && lineForPosition(m_oldInternalPosition) != lineForPosition(position()))\r\n            recordJump(m_oldInternalPosition);\r\n        setTargetColumn();\r\n        if (atEndOfLine() && !isVisualMode() && !isInsertMode())\r\n            moveLeft();\r\n    }\r\n\r\n    if (m_fakeEnd)\r\n        moveRight();\r\n}\r\n\r\nvoid FakeVimHandler::Private::leaveFakeVim(bool needUpdate)\r\n{\r\n    QTC_ASSERT(m_inFakeVim, qDebug() << \"enterFakeVim() not called before leaveFakeVim()!\"; return);\r\n\r\n    // The command might have destroyed the editor.\r\n    if (m_textedit || m_plaintextedit) {\r\n        // We fake vi-style end-of-line behaviour\r\n        m_fakeEnd = atEndOfLine() && g.mode == CommandMode && !isVisualBlockMode()\r\n            && !isVisualCharMode();\r\n\r\n        //QTC_ASSERT(g.mode == InsertMode || g.mode == ReplaceMode\r\n        //        || !atBlockEnd() || block().length() <= 1,\r\n        //    qDebug() << \"Cursor at EOL after key handler\");\r\n        if (m_fakeEnd)\r\n            moveLeft();\r\n\r\n        if (hasConfig(ConfigShowMarks))\r\n            updateSelection();\r\n\r\n        exportSelection();\r\n        updateCursorShape();\r\n\r\n        if (needUpdate) {\r\n            commitCursor();\r\n\r\n            // Move cursor line to middle of screen if it's not visible.\r\n            const int line = cursorLine();\r\n            if (line < firstVisibleLine() || line > firstVisibleLine() + linesOnScreen())\r\n                scrollToLine(qMax(0, line - linesOnScreen() / 2));\r\n            else\r\n                scrollToLine(firstVisibleLine());\r\n            updateScrollOffset();\r\n        }\r\n\r\n        installEventFilter();\r\n    }\r\n\r\n    m_inFakeVim = false;\r\n}\r\n\r\nbool FakeVimHandler::Private::wantsOverride(QKeyEvent *ev)\r\n{\r\n    const int key = ev->key();\r\n    const Qt::KeyboardModifiers mods = ev->modifiers();\r\n    KEY_DEBUG(\"SHORTCUT OVERRIDE\" << key << \"  PASSING: \" << g.passing);\r\n\r\n    if (key == Key_Escape) {\r\n        if (g.subsubmode == SearchSubSubMode)\r\n            return true;\r\n        // Not sure this feels good. People often hit Esc several times.\r\n        if (isNoVisualMode()\r\n                && g.mode == CommandMode\r\n                && g.submode == NoSubMode\r\n                && g.currentCommand.isEmpty()\r\n                && g.returnToMode == CommandMode)\r\n            return false;\r\n        return true;\r\n    }\r\n\r\n    // We are interested in overriding most Ctrl key combinations.\r\n    if (isOnlyControlModifier(mods)\r\n            && !config(ConfigPassControlKey).toBool()\r\n            && ((key >= Key_A && key <= Key_Z && key != Key_K)\r\n                || key == Key_BracketLeft || key == Key_BracketRight)) {\r\n        // Ctrl-K is special as it is the Core's default notion of Locator\r\n        if (g.passing) {\r\n            KEY_DEBUG(\" PASSING CTRL KEY\");\r\n            // We get called twice on the same key\r\n            //g.passing = false;\r\n            return false;\r\n        }\r\n        KEY_DEBUG(\" NOT PASSING CTRL KEY\");\r\n        //updateMiniBuffer();\r\n        return true;\r\n    }\r\n\r\n    // Let other shortcuts trigger.\r\n    return false;\r\n}\r\n\r\nEventResult FakeVimHandler::Private::handleEvent(QKeyEvent *ev)\r\n{\r\n    const int key = ev->key();\r\n    const Qt::KeyboardModifiers mods = ev->modifiers();\r\n\r\n    if (key == Key_Shift || key == Key_Alt || key == Key_Control\r\n            || key == Key_AltGr || key == Key_Meta)\r\n    {\r\n        KEY_DEBUG(\"PLAIN MODIFIER\");\r\n        return EventUnhandled;\r\n    }\r\n\r\n    if (g.passing) {\r\n        passShortcuts(false);\r\n        KEY_DEBUG(\"PASSING PLAIN KEY...\" << ev->key() << ev->text());\r\n        //if (input.is(',')) { // use ',,' to leave, too.\r\n        //    qDebug() << \"FINISHED...\";\r\n        //    return EventHandled;\r\n        //}\r\n        g.passing = false;\r\n        updateMiniBuffer();\r\n        KEY_DEBUG(\"   PASS TO CORE\");\r\n        return EventPassedToCore;\r\n    }\r\n\r\n#ifndef FAKEVIM_STANDALONE\r\n    bool inSnippetMode = false;\r\n    QMetaObject::invokeMethod(editor(),\r\n        \"inSnippetMode\", Q_ARG(bool *, &inSnippetMode));\r\n\r\n    if (inSnippetMode)\r\n        return EventPassedToCore;\r\n#endif\r\n\r\n    // Fake \"End of line\"\r\n    //m_tc = m_cursor;\r\n\r\n    //bool hasBlock = false;\r\n    //emit q->requestHasBlockSelection(&hasBlock);\r\n    //qDebug() << \"IMPORT BLOCK 2:\" << hasBlock;\r\n\r\n    //if (0 && hasBlock) {\r\n    //    (pos > anc) ? --pos : --anc;\r\n\r\n    //if ((mods & RealControlModifier) != 0) {\r\n    //    if (key >= Key_A && key <= Key_Z)\r\n    //        key = shift(key); // make it lower case\r\n    //    key = control(key);\r\n    //} else if (key >= Key_A && key <= Key_Z && (mods & Qt::ShiftModifier) == 0) {\r\n    //    key = shift(key);\r\n    //}\r\n\r\n    //QTC_ASSERT(g.mode == InsertMode || g.mode == ReplaceMode\r\n    //        || !atBlockEnd() || block().length() <= 1,\r\n    //    qDebug() << \"Cursor at EOL before key handler\");\r\n\r\n    enterFakeVim();\r\n    EventResult result = handleKey(Input(key, mods, ev->text()));\r\n    leaveFakeVim(result == EventHandled);\r\n\r\n    return result;\r\n}\r\n\r\nvoid FakeVimHandler::Private::installEventFilter()\r\n{\r\n    EDITOR(viewport()->installEventFilter(q));\r\n    EDITOR(installEventFilter(q));\r\n}\r\n\r\nvoid FakeVimHandler::Private::removeEventFilter()\r\n{\r\n    EDITOR(viewport()->removeEventFilter(q));\r\n    EDITOR(removeEventFilter(q));\r\n}\r\n\r\nvoid FakeVimHandler::Private::setupWidget()\r\n{\r\n    enterFakeVim();\r\n\r\n    resetCommandMode();\r\n    m_wasReadOnly = EDITOR(isReadOnly());\r\n\r\n    updateEditor();\r\n    importSelection();\r\n    updateMiniBuffer();\r\n    updateCursorShape();\r\n\r\n    recordJump();\r\n    setTargetColumn();\r\n    if (atEndOfLine() && !isVisualMode() && !isInsertMode())\r\n        moveLeft();\r\n\r\n    leaveFakeVim();\r\n}\r\n\r\nvoid FakeVimHandler::Private::exportSelection()\r\n{\r\n    int pos = position();\r\n    int anc = isVisualMode() ? anchor() : position();\r\n\r\n    m_oldInternalPosition = pos;\r\n    m_oldInternalAnchor = anc;\r\n\r\n    if (isVisualMode()) {\r\n        if (g.visualMode == VisualBlockMode) {\r\n            const int col1 = anc - document()->findBlock(anc).position();\r\n            const int col2 = pos - document()->findBlock(pos).position();\r\n            if (col1 > col2)\r\n                ++anc;\r\n            else if (!atBlockEnd())\r\n                ++pos;\r\n            // FIXME: After '$' command (i.e. m_visualTargetColumn == -1), end of selected lines\r\n            //        should be selected.\r\n            setAnchorAndPosition(anc, pos);\r\n            commitCursor();\r\n        } else if (g.visualMode == VisualLineMode) {\r\n            const int posLine = lineForPosition(pos);\r\n            const int ancLine = lineForPosition(anc);\r\n            if (anc < pos) {\r\n                pos = lastPositionInLine(posLine);\r\n                anc = firstPositionInLine(ancLine);\r\n            } else {\r\n                pos = firstPositionInLine(posLine);\r\n                anc = lastPositionInLine(ancLine) + 1;\r\n            }\r\n            // putting cursor on folded line will unfold the line, so move the cursor a bit\r\n            if (!document()->findBlock(pos).isVisible())\r\n                ++pos;\r\n            setAnchorAndPosition(anc, pos);\r\n        } else if (g.visualMode == VisualCharMode) {\r\n            if (anc > pos)\r\n                ++anc;\r\n        } else {\r\n            QTC_CHECK(false);\r\n        }\r\n\r\n        setAnchorAndPosition(anc, pos);\r\n\r\n        setMark(QLatin1Char('<'), markLessPosition());\r\n        setMark(QLatin1Char('>'), markGreaterPosition());\r\n    } else {\r\n        if (g.subsubmode == SearchSubSubMode && !m_searchCursor.isNull())\r\n            m_cursor = m_searchCursor;\r\n        else\r\n            setAnchorAndPosition(pos, pos);\r\n    }\r\n    m_oldExternalPosition = position();\r\n    m_oldExternalAnchor = anchor();\r\n}\r\n\r\nvoid FakeVimHandler::Private::commitInsertState()\r\n{\r\n    if (!isInsertStateValid())\r\n        return;\r\n\r\n    QString &lastInsertion = m_buffer->lastInsertion;\r\n    BufferData::InsertState &insertState = m_buffer->insertState;\r\n\r\n    // Get raw inserted text.\r\n    lastInsertion = textAt(insertState.pos1, insertState.pos2);\r\n\r\n    // Escape special characters and spaces inserted by user (not by auto-indentation).\r\n    for (int i = lastInsertion.size() - 1; i >= 0; --i) {\r\n        const int pos = insertState.pos1 + i;\r\n        const ushort c = document()->characterAt(pos).unicode();\r\n        if (c == '<')\r\n            lastInsertion.replace(i, 1, _(\"<LT>\"));\r\n        else if ((c == ' ' || c == '\\t') && insertState.spaces.contains(pos))\r\n            lastInsertion.replace(i, 1, _(c == ' ' ? \"<SPACE>\" : \"<TAB>\"));\r\n    }\r\n\r\n    // Remove unnecessary backspaces.\r\n    while (insertState.backspaces > 0 && !lastInsertion.isEmpty() && lastInsertion[0].isSpace())\r\n        --insertState.backspaces;\r\n\r\n    // backspaces in front of inserted text\r\n    lastInsertion.prepend(QString(_(\"<BS>\")).repeated(insertState.backspaces));\r\n    // deletes after inserted text\r\n    lastInsertion.prepend(QString(_(\"<DELETE>\")).repeated(insertState.deletes));\r\n\r\n    // Remove indentation.\r\n    lastInsertion.replace(QRegExp(_(\"(^|\\n)[\\\\t ]+\")), _(\"\\\\1\"));\r\n}\r\n\r\nvoid FakeVimHandler::Private::invalidateInsertState()\r\n{\r\n    m_oldInternalPosition = position();\r\n    BufferData::InsertState &insertState = m_buffer->insertState;\r\n    insertState.pos1 = -1;\r\n    insertState.pos2 = m_oldInternalPosition;\r\n    insertState.backspaces = 0;\r\n    insertState.deletes = 0;\r\n    insertState.spaces.clear();\r\n    insertState.insertingSpaces = false;\r\n    insertState.textBeforeCursor = textAt(document()->findBlock(m_oldInternalPosition).position(),\r\n                                            m_oldInternalPosition);\r\n    insertState.newLineBefore = false;\r\n    insertState.newLineAfter = false;\r\n}\r\n\r\nbool FakeVimHandler::Private::isInsertStateValid() const\r\n{\r\n    return m_buffer->insertState.pos1 != -1;\r\n}\r\n\r\nvoid FakeVimHandler::Private::clearLastInsertion()\r\n{\r\n    invalidateInsertState();\r\n    m_buffer->lastInsertion.clear();\r\n    m_buffer->insertState.pos1 = m_buffer->insertState.pos2;\r\n}\r\n\r\nvoid FakeVimHandler::Private::ensureCursorVisible()\r\n{\r\n    int pos = position();\r\n    int anc = isVisualMode() ? anchor() : position();\r\n\r\n    // fix selection so it is outside folded block\r\n    int start = qMin(pos, anc);\r\n    int end = qMax(pos, anc) + 1;\r\n    QTextBlock block = document()->findBlock(start);\r\n    QTextBlock block2 = document()->findBlock(end);\r\n    if (!block.isVisible() || !block2.isVisible()) {\r\n        // FIXME: Moving cursor left/right or unfolding block immediately after block is folded\r\n        //        should restore cursor position inside block.\r\n        // Changing cursor position after folding is not Vim behavior so at least record the jump.\r\n        if (block.isValid() && !block.isVisible())\r\n            recordJump();\r\n\r\n        pos = start;\r\n        while (block.isValid() && !block.isVisible())\r\n            block = block.previous();\r\n        if (block.isValid())\r\n            pos = block.position() + qMin(m_targetColumn, block.length() - 2);\r\n\r\n        if (isVisualMode()) {\r\n            anc = end;\r\n            while (block2.isValid() && !block2.isVisible()) {\r\n                anc = block2.position() + block2.length() - 2;\r\n                block2 = block2.next();\r\n            }\r\n        }\r\n\r\n        setAnchorAndPosition(anc, pos);\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::importSelection()\r\n{\r\n    if (position() == m_oldExternalPosition\r\n            && anchor() == m_oldExternalAnchor) {\r\n        // Undo drawing correction.\r\n        setAnchorAndPosition(m_oldInternalAnchor, m_oldInternalPosition);\r\n    } else {\r\n        // Import new selection.\r\n        Qt::KeyboardModifiers mods = QApplication::keyboardModifiers();\r\n        if (m_cursor.hasSelection()) {\r\n            if (mods & HostOsInfo::controlModifier())\r\n                g.visualMode = VisualBlockMode;\r\n            else if (mods & Qt::AltModifier)\r\n                g.visualMode = VisualBlockMode;\r\n            else if (mods & Qt::ShiftModifier)\r\n                g.visualMode = VisualLineMode;\r\n            else\r\n                g.visualMode = VisualCharMode;\r\n            m_buffer->lastVisualMode = g.visualMode;\r\n        } else {\r\n            g.visualMode = NoVisualMode;\r\n        }\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::updateEditor()\r\n{\r\n    const int charWidth = QFontMetrics(EDITOR(font())).width(QLatin1Char(' '));\r\n    EDITOR(setTabStopWidth(charWidth * config(ConfigTabStop).toInt()));\r\n    setupCharClass();\r\n}\r\n\r\nvoid FakeVimHandler::Private::restoreWidget(int tabSize)\r\n{\r\n    //clearMessage();\r\n    //updateMiniBuffer();\r\n    //EDITOR(removeEventFilter(q));\r\n    //EDITOR(setReadOnly(m_wasReadOnly));\r\n    const int charWidth = QFontMetrics(EDITOR(font())).width(QLatin1Char(' '));\r\n    EDITOR(setTabStopWidth(charWidth * tabSize));\r\n    g.visualMode = NoVisualMode;\r\n    // Force \"ordinary\" cursor.\r\n    EDITOR(setOverwriteMode(false));\r\n    updateSelection();\r\n    updateHighlights();\r\n}\r\n\r\nEventResult FakeVimHandler::Private::handleKey(const Input &input)\r\n{\r\n    KEY_DEBUG(\"HANDLE INPUT: \" << input << \" MODE: \" << mode);\r\n\r\n    bool hasInput = input.isValid();\r\n\r\n    // Waiting on input to complete mapping?\r\n    EventResult r = stopWaitForMapping(hasInput);\r\n\r\n    if (hasInput) {\r\n        record(input);\r\n        g.pendingInput.append(input);\r\n    }\r\n\r\n    // Process pending input.\r\n    // Note: Pending input is global state and can be extended by:\r\n    //         1. handling a user input (though handleKey() is not called recursively),\r\n    //         2. expanding a user mapping or\r\n    //         3. executing a register.\r\n    while (!g.pendingInput.isEmpty() && r == EventHandled) {\r\n        const Input in = g.pendingInput.takeFirst();\r\n\r\n        // invalid input is used to pop mapping state\r\n        if (!in.isValid()) {\r\n            endMapping();\r\n        } else {\r\n            // Handle user mapping.\r\n            if (canHandleMapping()) {\r\n                if (extendMapping(in)) {\r\n                    if (!hasInput || !g.currentMap.canExtend())\r\n                        expandCompleteMapping();\r\n                } else if (!expandCompleteMapping()) {\r\n                    r = handleCurrentMapAsDefault();\r\n                }\r\n            } else {\r\n                r = handleDefaultKey(in);\r\n            }\r\n        }\r\n    }\r\n\r\n    if (g.currentMap.canExtend()) {\r\n        waitForMapping();\r\n        return EventHandled;\r\n    }\r\n\r\n    if (r != EventHandled)\r\n        clearPendingInput();\r\n\r\n    return r;\r\n}\r\n\r\nEventResult FakeVimHandler::Private::handleDefaultKey(const Input &input)\r\n{\r\n    if (input == Nop)\r\n        return EventHandled;\r\n    else if (g.subsubmode == SearchSubSubMode)\r\n        return handleSearchSubSubMode(input);\r\n    else if (g.mode == CommandMode)\r\n        return handleCommandMode(input);\r\n    else if (g.mode == InsertMode || g.mode == ReplaceMode)\r\n        return handleInsertOrReplaceMode(input);\r\n    else if (g.mode == ExMode)\r\n        return handleExMode(input);\r\n    return EventUnhandled;\r\n}\r\n\r\nEventResult FakeVimHandler::Private::handleCurrentMapAsDefault()\r\n{\r\n    // If mapping has failed take the first input from it and try default command.\r\n    const Inputs &inputs = g.currentMap.currentInputs();\r\n\r\n    Input in = inputs.front();\r\n    if (inputs.size() > 1)\r\n        prependInputs(inputs.mid(1));\r\n    g.currentMap.reset();\r\n\r\n    return handleDefaultKey(in);\r\n}\r\n\r\nvoid FakeVimHandler::Private::prependInputs(const QVector<Input> &inputs)\r\n{\r\n    for (int i = inputs.size() - 1; i >= 0; --i)\r\n        g.pendingInput.prepend(inputs[i]);\r\n}\r\n\r\nvoid FakeVimHandler::Private::prependMapping(const Inputs &inputs)\r\n{\r\n    // FIXME: Implement Vim option maxmapdepth (default value is 1000).\r\n    if (g.mapDepth >= 1000) {\r\n        const int i = qMax(0, g.pendingInput.lastIndexOf(Input()));\r\n        QList<Input> inputs = g.pendingInput.mid(i);\r\n        clearPendingInput();\r\n        g.pendingInput.append(inputs);\r\n        showMessage(MessageError, tr(\"Recursive mapping\"));\r\n        updateMiniBuffer();\r\n        return;\r\n    }\r\n\r\n    ++g.mapDepth;\r\n    g.pendingInput.prepend(Input());\r\n    prependInputs(inputs);\r\n    g.commandBuffer.setHistoryAutoSave(false);\r\n\r\n    // start new edit block (undo/redo) only if necessary\r\n    bool editBlock = m_buffer->editBlockLevel == 0 && !(isInsertMode() && isInsertStateValid());\r\n    if (editBlock)\r\n        beginLargeEditBlock();\r\n    g.mapStates << MappingState(inputs.noremap(), inputs.silent(), editBlock);\r\n}\r\n\r\nbool FakeVimHandler::Private::expandCompleteMapping()\r\n{\r\n    if (!g.currentMap.isComplete())\r\n        return false;\r\n\r\n    const Inputs &inputs = g.currentMap.inputs();\r\n    int usedInputs = g.currentMap.mapLength();\r\n    prependInputs(g.currentMap.currentInputs().mid(usedInputs));\r\n    prependMapping(inputs);\r\n    g.currentMap.reset();\r\n\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::extendMapping(const Input &input)\r\n{\r\n    if (!g.currentMap.isValid())\r\n        g.currentMap.reset(currentModeCode());\r\n    return g.currentMap.walk(input);\r\n}\r\n\r\nvoid FakeVimHandler::Private::endMapping()\r\n{\r\n    if (!g.currentMap.canExtend())\r\n        --g.mapDepth;\r\n    if (g.mapStates.isEmpty())\r\n        return;\r\n    if (g.mapStates.last().editBlock)\r\n        endEditBlock();\r\n    g.mapStates.pop_back();\r\n    if (g.mapStates.isEmpty())\r\n        g.commandBuffer.setHistoryAutoSave(true);\r\n    updateMiniBuffer();\r\n}\r\n\r\nbool FakeVimHandler::Private::canHandleMapping()\r\n{\r\n    // Don't handle user mapping in sub-modes that cannot be followed by movement and in \"noremap\".\r\n    return g.subsubmode == NoSubSubMode\r\n        && g.submode != RegisterSubMode\r\n        && g.submode != WindowSubMode\r\n        && g.submode != ZSubMode\r\n        && g.submode != CapitalZSubMode\r\n        && g.submode != ReplaceSubMode\r\n        && g.submode != MacroRecordSubMode\r\n        && g.submode != MacroExecuteSubMode\r\n        && (g.mapStates.isEmpty() || !g.mapStates.last().noremap);\r\n}\r\n\r\nvoid FakeVimHandler::Private::clearPendingInput()\r\n{\r\n    // Clear pending input on interrupt or bad mapping.\r\n    g.pendingInput.clear();\r\n    g.mapStates.clear();\r\n    g.mapDepth = 0;\r\n\r\n    // Clear all started edit blocks.\r\n    while (m_buffer->editBlockLevel > 0)\r\n        endEditBlock();\r\n}\r\n\r\nvoid FakeVimHandler::Private::waitForMapping()\r\n{\r\n    g.currentCommand.clear();\r\n    foreach (const Input &input, g.currentMap.currentInputs())\r\n        g.currentCommand.append(input.toString());\r\n    updateMiniBuffer();\r\n\r\n    // wait for user to press any key or trigger complete mapping after interval\r\n    g.inputTimer = startTimer(1000);\r\n}\r\n\r\nEventResult FakeVimHandler::Private::stopWaitForMapping(bool hasInput)\r\n{\r\n    if (g.inputTimer != -1) {\r\n        killTimer(g.inputTimer);\r\n        g.inputTimer = -1;\r\n        g.currentCommand.clear();\r\n        if (!hasInput && !expandCompleteMapping()) {\r\n            // Cannot complete mapping so handle the first input from it as default command.\r\n            return handleCurrentMapAsDefault();\r\n        }\r\n    }\r\n\r\n    return EventHandled;\r\n}\r\n\r\nvoid FakeVimHandler::Private::timerEvent(QTimerEvent *ev)\r\n{\r\n    if (ev->timerId() == g.inputTimer) {\r\n        enterFakeVim();\r\n        EventResult result = handleKey(Input());\r\n        leaveFakeVim(result == EventHandled);\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::stopIncrementalFind()\r\n{\r\n    if (g.findPending) {\r\n        g.findPending = false;\r\n        setAnchorAndPosition(m_findStartPosition, m_cursor.selectionStart());\r\n        finishMovement();\r\n        setAnchor();\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::updateFind(bool isComplete)\r\n{\r\n    if (!isComplete && !hasConfig(ConfigIncSearch))\r\n        return;\r\n\r\n    g.currentMessage.clear();\r\n\r\n    const QString &needle = g.searchBuffer.contents();\r\n    if (isComplete) {\r\n        setPosition(m_searchStartPosition);\r\n        if (!needle.isEmpty())\r\n            recordJump();\r\n    }\r\n\r\n    SearchData sd;\r\n    sd.needle = needle;\r\n    sd.forward = g.lastSearchForward;\r\n    sd.highlightMatches = isComplete;\r\n    search(sd, isComplete);\r\n}\r\n\r\nvoid FakeVimHandler::Private::resetCount()\r\n{\r\n    g.mvcount = 0;\r\n    g.opcount = 0;\r\n}\r\n\r\nbool FakeVimHandler::Private::isInputCount(const Input &input) const\r\n{\r\n    return input.isDigit() && (!input.is('0') || g.mvcount > 0);\r\n}\r\n\r\nbool FakeVimHandler::Private::atEmptyLine(const QTextCursor &tc) const\r\n{\r\n    if (tc.isNull())\r\n        return atEmptyLine(m_cursor);\r\n    return tc.block().length() == 1;\r\n}\r\n\r\nbool FakeVimHandler::Private::atBoundary(bool end, bool simple, bool onlyWords,\r\n    const QTextCursor &tc) const\r\n{\r\n    if (tc.isNull())\r\n        return atBoundary(end, simple, onlyWords, m_cursor);\r\n    if (atEmptyLine(tc))\r\n        return true;\r\n    int pos = tc.position();\r\n    QChar c1 = document()->characterAt(pos);\r\n    QChar c2 = document()->characterAt(pos + (end ? 1 : -1));\r\n    int thisClass = charClass(c1, simple);\r\n    return (!onlyWords || thisClass != 0)\r\n        && (c2.isNull() || c2 == ParagraphSeparator || thisClass != charClass(c2, simple));\r\n}\r\n\r\nbool FakeVimHandler::Private::atWordBoundary(bool end, bool simple, const QTextCursor &tc) const\r\n{\r\n    return atBoundary(end, simple, true, tc);\r\n}\r\n\r\nbool FakeVimHandler::Private::atWordStart(bool simple, const QTextCursor &tc) const\r\n{\r\n    return atWordBoundary(false, simple, tc);\r\n}\r\n\r\nbool FakeVimHandler::Private::atWordEnd(bool simple, const QTextCursor &tc) const\r\n{\r\n    return atWordBoundary(true, simple, tc);\r\n}\r\n\r\nbool FakeVimHandler::Private::isFirstNonBlankOnLine(int pos)\r\n{\r\n    for (int i = document()->findBlock(pos).position(); i < pos; ++i) {\r\n        if (!document()->characterAt(i).isSpace())\r\n            return false;\r\n    }\r\n    return true;\r\n}\r\n\r\nvoid FakeVimHandler::Private::pushUndoState(bool overwrite)\r\n{\r\n    if (m_buffer->editBlockLevel != 0 && m_buffer->undoState.isValid())\r\n        return; // No need to save undo state for inner edit blocks.\r\n\r\n    if (m_buffer->undoState.isValid() && !overwrite)\r\n        return;\r\n\r\n    UNDO_DEBUG(\"PUSH UNDO\");\r\n    int pos = position();\r\n    if (!isInsertMode()) {\r\n        if (isVisualMode() || g.submode == DeleteSubMode\r\n            || (g.submode == ChangeSubMode && g.movetype != MoveLineWise)) {\r\n            pos = qMin(pos, anchor());\r\n            if (isVisualLineMode())\r\n                pos = firstPositionInLine(lineForPosition(pos));\r\n        } else if (g.movetype == MoveLineWise && hasConfig(ConfigStartOfLine)) {\r\n            QTextCursor tc = m_cursor;\r\n            if (g.submode == ShiftLeftSubMode || g.submode == ShiftRightSubMode\r\n                || g.submode == IndentSubMode) {\r\n                pos = qMin(pos, anchor());\r\n            }\r\n            tc.setPosition(pos);\r\n            moveToFirstNonBlankOnLine(&tc);\r\n            pos = qMin(pos, tc.position());\r\n        }\r\n    }\r\n\r\n    m_buffer->redo.clear();\r\n    m_buffer->lastChangePosition = CursorPosition(document(), pos);\r\n    if (isVisualMode()) {\r\n        setMark(QLatin1Char('<'), markLessPosition());\r\n        setMark(QLatin1Char('>'), markGreaterPosition());\r\n    }\r\n    m_buffer->undoState = State(revision(), m_buffer->lastChangePosition, m_buffer->marks,\r\n                              m_buffer->lastVisualMode, m_buffer->lastVisualModeInverted);\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveDown(int n)\r\n{\r\n    if (n == 0)\r\n        return;\r\n\r\n    QTextBlock block = m_cursor.block();\r\n    const int col = position() - block.position();\r\n\r\n    int lines = qAbs(n);\r\n    int position = 0;\r\n    while (block.isValid()) {\r\n        position = block.position() + qMax(0, qMin(block.length() - 2, col));\r\n        if (block.isVisible()) {\r\n            --lines;\r\n            if (lines < 0)\r\n                break;\r\n        }\r\n        block = n > 0 ? nextLine(block) : previousLine(block);\r\n    }\r\n\r\n    setPosition(position);\r\n    moveToTargetColumn();\r\n    updateScrollOffset();\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveDownVisually(int n)\r\n{\r\n    const QTextCursor::MoveOperation moveOperation = (n > 0) ? Down : Up;\r\n    int count = qAbs(n);\r\n    int oldPos = m_cursor.position();\r\n\r\n    while (count > 0) {\r\n        m_cursor.movePosition(moveOperation, KeepAnchor, 1);\r\n        if (oldPos == m_cursor.position())\r\n            break;\r\n        oldPos = m_cursor.position();\r\n        QTextBlock block = m_cursor.block();\r\n        if (block.isVisible())\r\n            --count;\r\n    }\r\n\r\n    QTextCursor tc = m_cursor;\r\n    tc.movePosition(StartOfLine);\r\n    const int minPos = tc.position();\r\n    moveToEndOfLineVisually(&tc);\r\n    const int maxPos = tc.position();\r\n\r\n    if (m_targetColumn == -1) {\r\n        setPosition(maxPos);\r\n    } else {\r\n        setPosition(qMin(maxPos, minPos + m_targetColumnWrapped));\r\n        const int targetColumn = m_targetColumnWrapped;\r\n        setTargetColumn();\r\n        m_targetColumnWrapped = targetColumn;\r\n    }\r\n\r\n    updateScrollOffset();\r\n}\r\n\r\nvoid FakeVimHandler::Private::movePageDown(int count)\r\n{\r\n    const int scrollOffset = windowScrollOffset();\r\n    const int screenLines = linesOnScreen();\r\n    const int offset = count > 0 ? scrollOffset - 2 : screenLines - scrollOffset + 2;\r\n    const int value = count * screenLines - cursorLineOnScreen() + offset;\r\n    moveDown(value);\r\n\r\n    if (count > 0)\r\n        scrollToLine(cursorLine());\r\n    else\r\n        scrollToLine(qMax(0, cursorLine() - screenLines + 1));\r\n}\r\n\r\nbool FakeVimHandler::Private::moveToNextParagraph(int count)\r\n{\r\n    const bool forward = count > 0;\r\n    int repeat = forward ? count : -count;\r\n    int pos = position();\r\n    QTextBlock block = this->block();\r\n\r\n    if (block.isValid() && block.length() == 1)\r\n        ++repeat;\r\n\r\n    for (; block.isValid(); block = forward ? block.next() : block.previous()) {\r\n        if (block.length() == 1) {\r\n            if (--repeat == 0)\r\n                break;\r\n            while (block.isValid() && block.length() == 1)\r\n                block = forward ? block.next() : block.previous();\r\n        }\r\n    }\r\n\r\n    if (repeat == 0)\r\n        setPosition(block.position());\r\n    else if (repeat == 1)\r\n        setPosition(forward ? lastPositionInDocument() : 0);\r\n    else\r\n        return false;\r\n\r\n    recordJump(pos);\r\n    setTargetColumn();\r\n    g.movetype = MoveExclusive;\r\n\r\n    return true;\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToEndOfLine()\r\n{\r\n    // Additionally select (in visual mode) or apply current command on hidden lines following\r\n    // the current line.\r\n    bool onlyVisibleLines = isVisualMode() || g.submode != NoSubMode;\r\n    const int id = onlyVisibleLines ? lineNumber(block()) : block().blockNumber() + 1;\r\n    setPosition(lastPositionInLine(id, onlyVisibleLines));\r\n    setTargetColumn();\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToEndOfLineVisually()\r\n{\r\n    moveToEndOfLineVisually(&m_cursor);\r\n    setTargetColumn();\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToEndOfLineVisually(QTextCursor *tc)\r\n{\r\n    // Moving to end of line ends up on following line if the line is wrapped.\r\n    tc->movePosition(StartOfLine);\r\n    const int minPos = tc->position();\r\n    tc->movePosition(EndOfLine);\r\n    int maxPos = tc->position();\r\n    tc->movePosition(StartOfLine);\r\n    if (minPos != tc->position())\r\n        --maxPos;\r\n    tc->setPosition(maxPos);\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveBehindEndOfLine()\r\n{\r\n    emit q->fold(1, false);\r\n    int pos = qMin(block().position() + block().length() - 1,\r\n        lastPositionInDocument() + 1);\r\n    setPosition(pos);\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToStartOfLine()\r\n{\r\n    setPosition(block().position());\r\n    setTargetColumn();\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToStartOfLineVisually()\r\n{\r\n    m_cursor.movePosition(StartOfLine, KeepAnchor);\r\n    setTargetColumn();\r\n}\r\n\r\nvoid FakeVimHandler::Private::fixSelection()\r\n{\r\n    if (g.rangemode == RangeBlockMode)\r\n         return;\r\n\r\n    if (g.movetype == MoveInclusive) {\r\n        // If position or anchor is after end of non-empty line, include line break in selection.\r\n        if (document()->characterAt(position()) == ParagraphSeparator) {\r\n            if (!atEmptyLine()) {\r\n                setPosition(position() + 1);\r\n                return;\r\n            }\r\n        } else if (document()->characterAt(anchor()) == ParagraphSeparator) {\r\n            QTextCursor tc = m_cursor;\r\n            tc.setPosition(anchor());\r\n            if (!atEmptyLine(tc)) {\r\n                setAnchorAndPosition(anchor() + 1, position());\r\n                return;\r\n            }\r\n        }\r\n    }\r\n\r\n    if (g.movetype == MoveExclusive && g.subsubmode == NoSubSubMode) {\r\n        if (anchor() < position() && atBlockStart()) {\r\n            // Exclusive motion ending at the beginning of line\r\n            // becomes inclusive and end is moved to end of previous line.\r\n            g.movetype = MoveInclusive;\r\n            moveToStartOfLine();\r\n            moveLeft();\r\n\r\n            // Exclusive motion ending at the beginning of line and\r\n            // starting at or before first non-blank on a line becomes linewise.\r\n            if (anchor() < block().position() && isFirstNonBlankOnLine(anchor()))\r\n                g.movetype = MoveLineWise;\r\n        }\r\n    }\r\n\r\n    if (g.movetype == MoveLineWise)\r\n        g.rangemode = (g.submode == ChangeSubMode)\r\n            ? RangeLineModeExclusive\r\n            : RangeLineMode;\r\n\r\n    if (g.movetype == MoveInclusive) {\r\n        if (anchor() <= position()) {\r\n            if (!atBlockEnd())\r\n                setPosition(position() + 1); // correction\r\n\r\n            // Omit first character in selection if it's line break on non-empty line.\r\n            int start = anchor();\r\n            int end = position();\r\n            if (afterEndOfLine(document(), start) && start > 0) {\r\n                start = qMin(start + 1, end);\r\n                if (g.submode == DeleteSubMode && !atDocumentEnd())\r\n                    setAnchorAndPosition(start, end + 1);\r\n                else\r\n                    setAnchorAndPosition(start, end);\r\n            }\r\n\r\n            // If more than one line is selected and all are selected completely\r\n            // movement becomes linewise.\r\n            if (start < block().position() && isFirstNonBlankOnLine(start) && atBlockEnd()) {\r\n                if (g.submode != ChangeSubMode) {\r\n                    moveRight();\r\n                    if (atEmptyLine())\r\n                        moveRight();\r\n                }\r\n                g.movetype = MoveLineWise;\r\n            }\r\n        } else if (!m_anchorPastEnd) {\r\n            setAnchorAndPosition(anchor() + 1, position());\r\n        }\r\n    }\r\n\r\n    if (m_positionPastEnd) {\r\n        moveBehindEndOfLine();\r\n        moveRight();\r\n        setAnchorAndPosition(anchor(), position());\r\n    }\r\n\r\n    if (m_anchorPastEnd) {\r\n        const int pos = position();\r\n        setPosition(anchor());\r\n        moveBehindEndOfLine();\r\n        moveRight();\r\n        setAnchorAndPosition(position(), pos);\r\n    }\r\n}\r\n\r\nbool FakeVimHandler::Private::finishSearch()\r\n{\r\n    if (g.lastSearch.isEmpty()\r\n        || (!g.currentMessage.isEmpty() && g.currentMessageLevel == MessageError)) {\r\n        return false;\r\n    }\r\n    if (g.submode != NoSubMode)\r\n        setAnchorAndPosition(m_searchStartPosition, position());\r\n    return true;\r\n}\r\n\r\nvoid FakeVimHandler::Private::finishMovement(const QString &dotCommandMovement)\r\n{\r\n    //dump(\"FINISH MOVEMENT\");\r\n    if (g.submode == FilterSubMode) {\r\n        int beginLine = lineForPosition(anchor());\r\n        int endLine = lineForPosition(position());\r\n        setPosition(qMin(anchor(), position()));\r\n        enterExMode(QString::fromLatin1(\".,+%1!\").arg(qAbs(endLine - beginLine)));\r\n        return;\r\n    }\r\n\r\n    if (g.submode == ChangeSubMode\r\n        || g.submode == DeleteSubMode\r\n        || g.submode == YankSubMode\r\n        || g.submode == InvertCaseSubMode\r\n        || g.submode == DownCaseSubMode\r\n        || g.submode == UpCaseSubMode) {\r\n        fixSelection();\r\n\r\n        if (g.submode != InvertCaseSubMode\r\n            && g.submode != DownCaseSubMode\r\n            && g.submode != UpCaseSubMode) {\r\n            yankText(currentRange(), m_register);\r\n            if (g.movetype == MoveLineWise)\r\n                setRegister(m_register, registerContents(m_register), RangeLineMode);\r\n        }\r\n\r\n        m_positionPastEnd = m_anchorPastEnd = false;\r\n    }\r\n\r\n    QString dotCommand;\r\n    if (g.submode == ChangeSubMode) {\r\n        pushUndoState(false);\r\n        beginEditBlock();\r\n        removeText(currentRange());\r\n        dotCommand = _(\"c\");\r\n        if (g.movetype == MoveLineWise)\r\n            insertAutomaticIndentation(true);\r\n        endEditBlock();\r\n        setTargetColumn();\r\n    } else if (g.submode == DeleteSubMode) {\r\n        pushUndoState(false);\r\n        beginEditBlock();\r\n        const int pos = position();\r\n        // Always delete something (e.g. 'dw' on an empty line deletes the line).\r\n        if (pos == anchor() && g.movetype == MoveInclusive)\r\n            removeText(Range(pos, pos + 1));\r\n        else\r\n            removeText(currentRange());\r\n        dotCommand = _(\"d\");\r\n        if (g.movetype == MoveLineWise)\r\n            handleStartOfLine();\r\n        if (atEndOfLine())\r\n            moveLeft();\r\n        else\r\n            setTargetColumn();\r\n        endEditBlock();\r\n    } else if (g.submode == YankSubMode) {\r\n        bool isVisualModeYank = isVisualMode();\r\n        leaveVisualMode();\r\n        const QTextCursor tc = m_cursor;\r\n        if (g.rangemode == RangeBlockMode) {\r\n            const int pos1 = tc.block().position();\r\n            const int pos2 = document()->findBlock(tc.anchor()).position();\r\n            const int col = qMin(tc.position() - pos1, tc.anchor() - pos2);\r\n            setPosition(qMin(pos1, pos2) + col);\r\n        } else {\r\n            setPosition(qMin(position(), anchor()));\r\n            if (g.rangemode == RangeLineMode) {\r\n                if (isVisualModeYank)\r\n                    moveToStartOfLine();\r\n            }\r\n        }\r\n        setTargetColumn();\r\n    } else if (g.submode == InvertCaseSubMode\r\n        || g.submode == UpCaseSubMode\r\n        || g.submode == DownCaseSubMode) {\r\n        beginEditBlock();\r\n        if (g.submode == InvertCaseSubMode) {\r\n            invertCase(currentRange());\r\n            dotCommand = QString::fromLatin1(\"g~\");\r\n        } else if (g.submode == DownCaseSubMode) {\r\n            downCase(currentRange());\r\n            dotCommand = QString::fromLatin1(\"gu\");\r\n        } else if (g.submode == UpCaseSubMode) {\r\n            upCase(currentRange());\r\n            dotCommand = QString::fromLatin1(\"gU\");\r\n        }\r\n        if (g.movetype == MoveLineWise)\r\n            handleStartOfLine();\r\n        endEditBlock();\r\n    } else if (g.submode == IndentSubMode\r\n        || g.submode == ShiftRightSubMode\r\n        || g.submode == ShiftLeftSubMode) {\r\n        recordJump();\r\n        pushUndoState(false);\r\n        if (g.submode == IndentSubMode) {\r\n            indentSelectedText();\r\n            dotCommand = _(\"=\");\r\n        } else if (g.submode == ShiftRightSubMode) {\r\n            shiftRegionRight(1);\r\n            dotCommand = _(\">\");\r\n        } else if (g.submode == ShiftLeftSubMode) {\r\n            shiftRegionLeft(1);\r\n            dotCommand = _(\"<\");\r\n        }\r\n    }\r\n\r\n    if (!dotCommand.isEmpty() && !dotCommandMovement.isEmpty())\r\n        setDotCommand(dotCommand + dotCommandMovement);\r\n\r\n    // Change command continues in insert mode.\r\n    if (g.submode == ChangeSubMode) {\r\n        clearCommandMode();\r\n        enterInsertMode();\r\n    } else {\r\n        resetCommandMode();\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::resetCommandMode()\r\n{\r\n    if (g.returnToMode == CommandMode) {\r\n        enterCommandMode();\r\n    } else {\r\n        clearCommandMode();\r\n        const QString lastInsertion = m_buffer->lastInsertion;\r\n        if (g.returnToMode == InsertMode)\r\n            enterInsertMode();\r\n        else\r\n            enterReplaceMode();\r\n        moveToTargetColumn();\r\n        invalidateInsertState();\r\n        m_buffer->lastInsertion = lastInsertion;\r\n    }\r\n    if (isNoVisualMode())\r\n        setAnchor();\r\n}\r\n\r\nvoid FakeVimHandler::Private::clearCommandMode()\r\n{\r\n    g.submode = NoSubMode;\r\n    g.subsubmode = NoSubSubMode;\r\n    g.movetype = MoveInclusive;\r\n    g.gflag = false;\r\n    m_register = '\"';\r\n    g.rangemode = RangeCharMode;\r\n    g.currentCommand.clear();\r\n    resetCount();\r\n}\r\n\r\nvoid FakeVimHandler::Private::updateSelection()\r\n{\r\n    QList<QTextEdit::ExtraSelection> selections = m_extraSelections;\r\n    if (hasConfig(ConfigShowMarks)) {\r\n        for (MarksIterator it(m_buffer->marks); it.hasNext(); ) {\r\n            it.next();\r\n            QTextEdit::ExtraSelection sel;\r\n            sel.cursor = m_cursor;\r\n            setCursorPosition(&sel.cursor, it.value().position(document()));\r\n            sel.cursor.setPosition(sel.cursor.position(), MoveAnchor);\r\n            sel.cursor.movePosition(Right, KeepAnchor);\r\n            sel.format = m_cursor.blockCharFormat();\r\n            sel.format.setForeground(Qt::blue);\r\n            sel.format.setBackground(Qt::green);\r\n            selections.append(sel);\r\n        }\r\n    }\r\n    //qDebug() << \"SELECTION: \" << selections;\r\n    emit q->selectionChanged(selections);\r\n}\r\n\r\nvoid FakeVimHandler::Private::updateHighlights()\r\n{\r\n    if (hasConfig(ConfigUseCoreSearch) || !hasConfig(ConfigHlSearch) || g.highlightsCleared) {\r\n        if (m_highlighted.isEmpty())\r\n            return;\r\n        m_highlighted.clear();\r\n    } else if (m_highlighted != g.lastNeedle) {\r\n        m_highlighted = g.lastNeedle;\r\n    } else {\r\n        return;\r\n    }\r\n\r\n    emit q->highlightMatches(m_highlighted);\r\n}\r\n\r\nvoid FakeVimHandler::Private::updateMiniBuffer()\r\n{\r\n    if (!m_textedit && !m_plaintextedit)\r\n        return;\r\n\r\n    QString msg;\r\n    int cursorPos = -1;\r\n    int anchorPos = -1;\r\n    MessageLevel messageLevel = MessageMode;\r\n\r\n    if (!g.mapStates.isEmpty() && g.mapStates.last().silent && g.currentMessageLevel < MessageInfo)\r\n        g.currentMessage.clear();\r\n\r\n    if (g.passing) {\r\n        msg = _(\"PASSING\");\r\n    } else if (g.subsubmode == SearchSubSubMode) {\r\n        msg = g.searchBuffer.display();\r\n        if (g.mapStates.isEmpty()) {\r\n            cursorPos = g.searchBuffer.cursorPos() + 1;\r\n            anchorPos = g.searchBuffer.anchorPos() + 1;\r\n        }\r\n    } else if (g.mode == ExMode) {\r\n        msg = g.commandBuffer.display();\r\n        if (g.mapStates.isEmpty()) {\r\n            cursorPos = g.commandBuffer.cursorPos() + 1;\r\n            anchorPos = g.commandBuffer.anchorPos() + 1;\r\n        }\r\n    } else if (!g.currentMessage.isEmpty()) {\r\n        msg = g.currentMessage;\r\n        g.currentMessage.clear();\r\n        messageLevel = g.currentMessageLevel;\r\n    } else if (!g.mapStates.isEmpty() && !g.mapStates.last().silent) {\r\n        // Do not reset previous message when after running a mapped command.\r\n        return;\r\n    } else if (g.mode == CommandMode && !g.currentCommand.isEmpty() && hasConfig(ConfigShowCmd)) {\r\n        msg = g.currentCommand;\r\n        messageLevel = MessageShowCmd;\r\n    } else if (g.mode == CommandMode && isVisualMode()) {\r\n        if (isVisualCharMode())\r\n            msg = _(\"-- VISUAL --\");\r\n        else if (isVisualLineMode())\r\n            msg = _(\"-- VISUAL LINE --\");\r\n        else if (isVisualBlockMode())\r\n            msg = _(\"VISUAL BLOCK\");\r\n    } else if (g.mode == InsertMode) {\r\n        msg = _(\"-- INSERT --\");\r\n    } else if (g.mode == ReplaceMode) {\r\n        msg = _(\"-- REPLACE --\");\r\n    } else {\r\n        QTC_CHECK(g.mode == CommandMode && g.subsubmode != SearchSubSubMode);\r\n        if (g.returnToMode == CommandMode)\r\n            msg = _(\"-- COMMAND --\");\r\n        else if (g.returnToMode == InsertMode)\r\n            msg = _(\"-- (insert) --\");\r\n        else\r\n            msg = _(\"-- (replace) --\");\r\n    }\r\n\r\n    if (!g.recording.isNull() && msg.startsWith(_(\"--\")))\r\n        msg.append(_(\"recording\"));\r\n\r\n    emit q->commandBufferChanged(msg, cursorPos, anchorPos, messageLevel, q);\r\n\r\n    int linesInDoc = linesInDocument();\r\n    int l = cursorLine();\r\n    QString status;\r\n    const QString pos = QString::fromLatin1(\"%1,%2\")\r\n        .arg(l + 1).arg(physicalCursorColumn() + 1);\r\n    // FIXME: physical \"-\" logical\r\n    if (linesInDoc != 0)\r\n        status = FakeVimHandler::tr(\"%1%2%\").arg(pos, -10).arg(l * 100 / linesInDoc, 4);\r\n    else\r\n        status = FakeVimHandler::tr(\"%1All\").arg(pos, -10);\r\n    emit q->statusDataChanged(status);\r\n}\r\n\r\nvoid FakeVimHandler::Private::showMessage(MessageLevel level, const QString &msg)\r\n{\r\n    //qDebug() << \"MSG: \" << msg;\r\n    g.currentMessage = msg;\r\n    g.currentMessageLevel = level;\r\n}\r\n\r\nvoid FakeVimHandler::Private::notImplementedYet()\r\n{\r\n    qDebug() << \"Not implemented in FakeVim\";\r\n    showMessage(MessageError, FakeVimHandler::tr(\"Not implemented in FakeVim.\"));\r\n}\r\n\r\nvoid FakeVimHandler::Private::passShortcuts(bool enable)\r\n{\r\n    g.passing = enable;\r\n    updateMiniBuffer();\r\n    if (enable)\r\n        QCoreApplication::instance()->installEventFilter(q);\r\n    else\r\n        QCoreApplication::instance()->removeEventFilter(q);\r\n}\r\n\r\nbool FakeVimHandler::Private::handleCommandSubSubMode(const Input &input)\r\n{\r\n    //const int key = input.key;\r\n    bool handled = true;\r\n    if (g.subsubmode == FtSubSubMode) {\r\n        g.semicolonType = g.subsubdata;\r\n        g.semicolonKey = input.text();\r\n        bool valid = handleFfTt(g.semicolonKey);\r\n        g.subsubmode = NoSubSubMode;\r\n        if (!valid) {\r\n            g.submode = NoSubMode;\r\n            resetCommandMode();\r\n            handled = false;\r\n        } else {\r\n            finishMovement(QString::fromLatin1(\"%1%2%3\")\r\n                           .arg(count())\r\n                           .arg(g.semicolonType.text())\r\n                           .arg(g.semicolonKey));\r\n        }\r\n    } else if (g.subsubmode == TextObjectSubSubMode) {\r\n        bool ok = true;\r\n        if (input.is('w'))\r\n            selectWordTextObject(g.subsubdata.is('i'));\r\n        else if (input.is('W'))\r\n            selectWORDTextObject(g.subsubdata.is('i'));\r\n        else if (input.is('s'))\r\n            selectSentenceTextObject(g.subsubdata.is('i'));\r\n        else if (input.is('p'))\r\n            selectParagraphTextObject(g.subsubdata.is('i'));\r\n        else if (input.is('[') || input.is(']'))\r\n            ok = selectBlockTextObject(g.subsubdata.is('i'), '[', ']');\r\n        else if (input.is('(') || input.is(')') || input.is('b'))\r\n            ok = selectBlockTextObject(g.subsubdata.is('i'), '(', ')');\r\n        else if (input.is('<') || input.is('>'))\r\n            ok = selectBlockTextObject(g.subsubdata.is('i'), '<', '>');\r\n        else if (input.is('{') || input.is('}') || input.is('B'))\r\n            ok = selectBlockTextObject(g.subsubdata.is('i'), '{', '}');\r\n        else if (input.is('\"') || input.is('\\'') || input.is('`'))\r\n            ok = selectQuotedStringTextObject(g.subsubdata.is('i'), input.asChar());\r\n        else\r\n            ok = false;\r\n        g.subsubmode = NoSubSubMode;\r\n        if (ok) {\r\n            finishMovement(QString::fromLatin1(\"%1%2%3\")\r\n                           .arg(count())\r\n                           .arg(g.subsubdata.text())\r\n                           .arg(input.text()));\r\n        } else {\r\n            resetCommandMode();\r\n            handled = false;\r\n        }\r\n    } else if (g.subsubmode == MarkSubSubMode) {\r\n        setMark(input.asChar(), CursorPosition(m_cursor));\r\n        g.subsubmode = NoSubSubMode;\r\n    } else if (g.subsubmode == BackTickSubSubMode\r\n            || g.subsubmode == TickSubSubMode) {\r\n        if (jumpToMark(input.asChar(), g.subsubmode == BackTickSubSubMode)) {\r\n            finishMovement();\r\n        } else {\r\n            resetCommandMode();\r\n            handled = false;\r\n        }\r\n        g.subsubmode = NoSubSubMode;\r\n    } else if (g.subsubmode == ZSubSubMode) {\r\n        handled = false;\r\n        if (input.is('j') || input.is('k')) {\r\n            int pos = position();\r\n            emit q->foldGoTo(input.is('j') ? count() : -count(), false);\r\n            if (pos != position()) {\r\n                handled = true;\r\n                finishMovement(QString::fromLatin1(\"%1z%2\")\r\n                               .arg(count())\r\n                               .arg(input.text()));\r\n            }\r\n        }\r\n    } else if (g.subsubmode == OpenSquareSubSubMode || g.subsubmode == CloseSquareSubSubMode) {\r\n        int pos = position();\r\n        if (input.is('{') && g.subsubmode == OpenSquareSubSubMode)\r\n            searchBalanced(false, QLatin1Char('{'), QLatin1Char('}'));\r\n        else if (input.is('}') && g.subsubmode == CloseSquareSubSubMode)\r\n            searchBalanced(true, QLatin1Char('}'), QLatin1Char('{'));\r\n        else if (input.is('(') && g.subsubmode == OpenSquareSubSubMode)\r\n            searchBalanced(false, QLatin1Char('('), QLatin1Char(')'));\r\n        else if (input.is(')') && g.subsubmode == CloseSquareSubSubMode)\r\n            searchBalanced(true, QLatin1Char(')'), QLatin1Char('('));\r\n        else if (input.is('[') && g.subsubmode == OpenSquareSubSubMode)\r\n            bracketSearchBackward(&m_cursor, _(\"^\\\\{\"), count());\r\n        else if (input.is('[') && g.subsubmode == CloseSquareSubSubMode)\r\n            bracketSearchForward(&m_cursor, _(\"^\\\\}\"), count(), false);\r\n        else if (input.is(']') && g.subsubmode == OpenSquareSubSubMode)\r\n            bracketSearchBackward(&m_cursor, _(\"^\\\\}\"), count());\r\n        else if (input.is(']') && g.subsubmode == CloseSquareSubSubMode)\r\n            bracketSearchForward(&m_cursor, _(\"^\\\\{\"), count(), g.submode != NoSubMode);\r\n        else if (input.is('z'))\r\n            emit q->foldGoTo(g.subsubmode == OpenSquareSubSubMode ? -count() : count(), true);\r\n        handled = pos != position();\r\n        if (handled) {\r\n            if (lineForPosition(pos) != lineForPosition(position()))\r\n                recordJump(pos);\r\n            finishMovement(QString::fromLatin1(\"%1%2%3\")\r\n                           .arg(count())\r\n                           .arg(g.subsubmode == OpenSquareSubSubMode ? '[' : ']')\r\n                           .arg(input.text()));\r\n        }\r\n    } else {\r\n        handled = false;\r\n    }\r\n    return handled;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleCount(const Input &input)\r\n{\r\n    if (!isInputCount(input))\r\n        return false;\r\n    g.mvcount = g.mvcount * 10 + input.text().toInt();\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleMovement(const Input &input)\r\n{\r\n    bool handled = true;\r\n    QString movement;\r\n    int count = this->count();\r\n\r\n    if (handleCount(input)) {\r\n        return true;\r\n    } else if (input.is('0')) {\r\n        g.movetype = MoveExclusive;\r\n        if (g.gflag)\r\n            moveToStartOfLineVisually();\r\n        else\r\n            moveToStartOfLine();\r\n        count = 1;\r\n    } else if (input.is('a') || input.is('i')) {\r\n        g.subsubmode = TextObjectSubSubMode;\r\n        g.subsubdata = input;\r\n    } else if (input.is('^') || input.is('_')) {\r\n        if (g.gflag)\r\n            moveToFirstNonBlankOnLineVisually();\r\n        else\r\n            moveToFirstNonBlankOnLine();\r\n        g.movetype = MoveExclusive;\r\n    } else if (0 && input.is(',')) {\r\n        // FIXME: fakevim uses ',' by itself, so it is incompatible\r\n        g.subsubmode = FtSubSubMode;\r\n        // HACK: toggle 'f' <-> 'F', 't' <-> 'T'\r\n        //g.subsubdata = g.semicolonType ^ 32;\r\n        handleFfTt(g.semicolonKey, true);\r\n        g.subsubmode = NoSubSubMode;\r\n    } else if (input.is(';')) {\r\n        g.subsubmode = FtSubSubMode;\r\n        g.subsubdata = g.semicolonType;\r\n        handleFfTt(g.semicolonKey, true);\r\n        g.subsubmode = NoSubSubMode;\r\n    } else if (input.is('/') || input.is('?')) {\r\n        g.lastSearchForward = input.is('/');\r\n        if (hasConfig(ConfigUseCoreSearch)) {\r\n            // re-use the core dialog.\r\n            g.findPending = true;\r\n            m_findStartPosition = position();\r\n            g.movetype = MoveExclusive;\r\n            setAnchor(); // clear selection: otherwise, search is restricted to selection\r\n            emit q->findRequested(!g.lastSearchForward);\r\n        } else {\r\n            // FIXME: make core find dialog sufficiently flexible to\r\n            // produce the \"default vi\" behaviour too. For now, roll our own.\r\n            g.currentMessage.clear();\r\n            g.movetype = MoveExclusive;\r\n            g.subsubmode = SearchSubSubMode;\r\n            g.searchBuffer.setPrompt(g.lastSearchForward ? QLatin1Char('/') : QLatin1Char('?'));\r\n            m_searchStartPosition = position();\r\n            m_searchFromScreenLine = firstVisibleLine();\r\n            m_searchCursor = QTextCursor();\r\n            g.searchBuffer.clear();\r\n        }\r\n    } else if (input.is('`')) {\r\n        g.subsubmode = BackTickSubSubMode;\r\n    } else if (input.is('#') || input.is('*')) {\r\n        // FIXME: That's not proper vim behaviour\r\n        QString needle;\r\n        QTextCursor tc = m_cursor;\r\n        tc.select(QTextCursor::WordUnderCursor);\r\n        needle = QRegExp::escape(tc.selection().toPlainText());\r\n        if (!g.gflag)\r\n            needle = _(\"\\\\<\") + needle + _(\"\\\\>\");\r\n        setAnchorAndPosition(tc.position(), tc.anchor());\r\n        g.searchBuffer.historyPush(needle);\r\n        g.lastSearch = needle;\r\n        g.lastSearchForward = input.is('*');\r\n        handled = searchNext();\r\n    } else if (input.is('\\'')) {\r\n        g.subsubmode = TickSubSubMode;\r\n        if (g.submode != NoSubMode)\r\n            g.movetype = MoveLineWise;\r\n    } else if (input.is('|')) {\r\n        moveToStartOfLine();\r\n        moveRight(qMin(count, rightDist()) - 1);\r\n        setTargetColumn();\r\n    } else if (input.is('}')) {\r\n        handled = moveToNextParagraph(count);\r\n    } else if (input.is('{')) {\r\n        handled = moveToPreviousParagraph(count);\r\n    } else if (input.isReturn()) {\r\n        moveToStartOfLine();\r\n        moveDown();\r\n        moveToFirstNonBlankOnLine();\r\n        g.movetype = MoveLineWise;\r\n    } else if (input.is('-')) {\r\n        moveToStartOfLine();\r\n        moveUp(count);\r\n        moveToFirstNonBlankOnLine();\r\n        g.movetype = MoveLineWise;\r\n    } else if (input.is('+')) {\r\n        moveToStartOfLine();\r\n        moveDown(count);\r\n        moveToFirstNonBlankOnLine();\r\n        g.movetype = MoveLineWise;\r\n    } else if (input.isKey(Key_Home)) {\r\n        moveToStartOfLine();\r\n        setTargetColumn();\r\n        movement = _(\"<HOME>\");\r\n    } else if (input.is('$') || input.isKey(Key_End)) {\r\n        if (g.gflag) {\r\n            if (count > 1)\r\n                moveDownVisually(count - 1);\r\n            moveToEndOfLineVisually();\r\n        } else {\r\n            if (count > 1)\r\n                moveDown(count - 1);\r\n            moveToEndOfLine();\r\n        }\r\n        g.movetype = atEmptyLine() ? MoveExclusive : MoveInclusive;\r\n        setTargetColumn();\r\n        if (g.submode == NoSubMode)\r\n            m_targetColumn = -1;\r\n        if (isVisualMode())\r\n            m_visualTargetColumn = -1;\r\n        movement = _(\"$\");\r\n    } else if (input.is('%')) {\r\n        recordJump();\r\n        if (g.mvcount == 0) {\r\n            moveToMatchingParanthesis();\r\n            g.movetype = MoveInclusive;\r\n        } else {\r\n            // set cursor position in percentage - formula taken from Vim help\r\n            setPosition(firstPositionInLine((count * linesInDocument() + 99) / 100));\r\n            moveToTargetColumn();\r\n            handleStartOfLine();\r\n            g.movetype = MoveLineWise;\r\n        }\r\n    } else if (input.is('b') || input.isShift(Key_Left)) {\r\n        g.movetype = MoveExclusive;\r\n        moveToNextWordStart(count, false, false);\r\n        setTargetColumn();\r\n        movement = _(\"b\");\r\n    } else if (input.is('B')) {\r\n        g.movetype = MoveExclusive;\r\n        moveToNextWordStart(count, true, false);\r\n        setTargetColumn();\r\n    } else if (input.is('e') && g.gflag) {\r\n        g.movetype = MoveInclusive;\r\n        moveToNextWordEnd(count, false, false);\r\n        setTargetColumn();\r\n    } else if (input.is('e') || input.isShift(Key_Right)) {\r\n        g.movetype = MoveInclusive;\r\n        moveToNextWordEnd(count, false, true, false);\r\n        setTargetColumn();\r\n        movement = _(\"e\");\r\n    } else if (input.is('E') && g.gflag) {\r\n        g.movetype = MoveInclusive;\r\n        moveToNextWordEnd(count, true, false);\r\n        setTargetColumn();\r\n    } else if (input.is('E')) {\r\n        g.movetype = MoveInclusive;\r\n        moveToNextWordEnd(count, true, true, false);\r\n        setTargetColumn();\r\n    } else if (input.isControl('e')) {\r\n        // FIXME: this should use the \"scroll\" option, and \"count\"\r\n        if (cursorLineOnScreen() == 0)\r\n            moveDown(1);\r\n        scrollDown(1);\r\n        movement = _(\"<C-E>\");\r\n    } else if (input.is('f')) {\r\n        g.subsubmode = FtSubSubMode;\r\n        g.movetype = MoveInclusive;\r\n        g.subsubdata = input;\r\n    } else if (input.is('F')) {\r\n        g.subsubmode = FtSubSubMode;\r\n        g.movetype = MoveExclusive;\r\n        g.subsubdata = input;\r\n    } else if (!g.gflag && input.is('g')) {\r\n        g.gflag = true;\r\n        return true;\r\n    } else if (input.is('g') || input.is('G')) {\r\n        QString dotCommand = QString::fromLatin1(\"%1G\").arg(count);\r\n        recordJump();\r\n        if (input.is('G') && g.mvcount == 0)\r\n            dotCommand = QString(QLatin1Char('G'));\r\n        int n = (input.is('g')) ? 1 : linesInDocument();\r\n        n = g.mvcount == 0 ? n : count;\r\n        if (g.submode == NoSubMode || g.submode == ZSubMode\r\n                || g.submode == CapitalZSubMode || g.submode == RegisterSubMode) {\r\n            setPosition(firstPositionInLine(n, false));\r\n            handleStartOfLine();\r\n        } else {\r\n            g.movetype = MoveLineWise;\r\n            g.rangemode = RangeLineMode;\r\n            setAnchor();\r\n            setPosition(firstPositionInLine(n, false));\r\n        }\r\n        setTargetColumn();\r\n        updateScrollOffset();\r\n    } else if (input.is('h') || input.isKey(Key_Left) || input.isBackspace()) {\r\n        g.movetype = MoveExclusive;\r\n        int n = qMin(count, leftDist());\r\n        if (m_fakeEnd && block().length() > 1)\r\n            ++n;\r\n        moveLeft(n);\r\n        setTargetColumn();\r\n        movement = _(\"h\");\r\n    } else if (input.is('H')) {\r\n        const CursorPosition pos(lineToBlockNumber(lineOnTop(count)), 0);\r\n        setCursorPosition(&m_cursor, pos);\r\n        handleStartOfLine();\r\n    } else if (input.is('j') || input.isKey(Key_Down)\r\n            || input.isControl('j') || input.isControl('n')) {\r\n        if (g.gflag) {\r\n            g.movetype = MoveExclusive;\r\n            moveDownVisually(count);\r\n            movement = _(\"gj\");\r\n        } else {\r\n            g.movetype = MoveLineWise;\r\n            moveDown(count);\r\n            movement = _(\"j\");\r\n        }\r\n    } else if (input.is('k') || input.isKey(Key_Up) || input.isControl('p')) {\r\n        if (g.gflag) {\r\n            g.movetype = MoveExclusive;\r\n            moveUpVisually(count);\r\n            movement = _(\"gk\");\r\n        } else {\r\n            g.movetype = MoveLineWise;\r\n            moveUp(count);\r\n            movement = _(\"k\");\r\n        }\r\n    } else if (input.is('l') || input.isKey(Key_Right) || input.is(' ')) {\r\n        g.movetype = MoveExclusive;\r\n        bool pastEnd = count >= rightDist() - 1;\r\n        moveRight(qMax(0, qMin(count, rightDist() - (g.submode == NoSubMode))));\r\n        setTargetColumn();\r\n        if (pastEnd && isVisualMode())\r\n            m_visualTargetColumn = -1;\r\n    } else if (input.is('L')) {\r\n        const CursorPosition pos(lineToBlockNumber(lineOnBottom(count)), 0);\r\n        setCursorPosition(&m_cursor, pos);\r\n        handleStartOfLine();\r\n    } else if (g.gflag && input.is('m')) {\r\n        const QPoint pos(EDITOR(viewport()->width()) / 2, EDITOR(cursorRect(m_cursor)).y());\r\n        QTextCursor tc = EDITOR(cursorForPosition(pos));\r\n        if (!tc.isNull()) {\r\n            m_cursor = tc;\r\n            setTargetColumn();\r\n        }\r\n    } else if (input.is('M')) {\r\n        m_cursor = EDITOR(cursorForPosition(QPoint(0, EDITOR(height()) / 2)));\r\n        handleStartOfLine();\r\n    } else if (input.is('n') || input.is('N')) {\r\n        if (hasConfig(ConfigUseCoreSearch)) {\r\n            bool forward = (input.is('n')) ? g.lastSearchForward : !g.lastSearchForward;\r\n            int pos = position();\r\n            emit q->findNextRequested(!forward);\r\n            if (forward && pos == m_cursor.selectionStart()) {\r\n                // if cursor is already positioned at the start of a find result, this is returned\r\n                emit q->findNextRequested(false);\r\n            }\r\n            setPosition(m_cursor.selectionStart());\r\n        } else {\r\n            handled = searchNext(input.is('n'));\r\n        }\r\n    } else if (input.is('t')) {\r\n        g.movetype = MoveInclusive;\r\n        g.subsubmode = FtSubSubMode;\r\n        g.subsubdata = input;\r\n    } else if (input.is('T')) {\r\n        g.movetype = MoveExclusive;\r\n        g.subsubmode = FtSubSubMode;\r\n        g.subsubdata = input;\r\n    } else if (input.is('w') || input.is('W')) { // tested\r\n        // Special case: \"cw\" and \"cW\" work the same as \"ce\" and \"cE\" if the\r\n        // cursor is on a non-blank - except if the cursor is on the last\r\n        // character of a word: only the current word will be changed\r\n        bool simple = input.is('W');\r\n        if (g.submode == ChangeSubMode && !document()->characterAt(position()).isSpace()) {\r\n            moveToWordEnd(count, simple, true);\r\n            g.movetype = MoveInclusive;\r\n        } else {\r\n            moveToNextWordStart(count, simple, true);\r\n            // Command 'dw' deletes to the next word on the same line or to end of line.\r\n            if (g.submode == DeleteSubMode && count == 1) {\r\n                const QTextBlock currentBlock = document()->findBlock(anchor());\r\n                setPosition(qMin(position(), currentBlock.position() + currentBlock.length()));\r\n            }\r\n            g.movetype = MoveExclusive;\r\n        }\r\n        setTargetColumn();\r\n    } else if (input.is('z')) {\r\n        g.movetype =  MoveLineWise;\r\n        g.subsubmode = ZSubSubMode;\r\n    } else if (input.is('[')) {\r\n        g.subsubmode = OpenSquareSubSubMode;\r\n    } else if (input.is(']')) {\r\n        g.subsubmode = CloseSquareSubSubMode;\r\n    } else if (input.isKey(Key_PageDown) || input.isControl('f')) {\r\n        movePageDown(count);\r\n        handleStartOfLine();\r\n        movement = _(\"f\");\r\n    } else if (input.isKey(Key_PageUp) || input.isControl('b')) {\r\n        movePageUp(count);\r\n        handleStartOfLine();\r\n        movement = _(\"b\");\r\n    } else {\r\n        handled = false;\r\n    }\r\n\r\n    if (handled && g.subsubmode == NoSubSubMode) {\r\n        if (g.submode == NoSubMode) {\r\n            resetCommandMode();\r\n        } else {\r\n            // finish movement for sub modes\r\n            const QString dotMovement =\r\n                (count > 1 ? QString::number(count) : QString())\r\n                + _(g.gflag ? \"g\" : \"\")\r\n                + (movement.isNull() ? QString(input.asChar()) : movement);\r\n            finishMovement(dotMovement);\r\n            setTargetColumn();\r\n        }\r\n    }\r\n\r\n    return handled;\r\n}\r\n\r\nEventResult FakeVimHandler::Private::handleCommandMode(const Input &input)\r\n{\r\n    bool handled = false;\r\n\r\n    bool clearGflag = g.gflag;\r\n    bool clearRegister = g.submode != RegisterSubMode;\r\n    bool clearCount = g.submode != RegisterSubMode && !isInputCount(input);\r\n\r\n    // Process input for a sub-mode.\r\n    if (input.isEscape()) {\r\n        handled = handleEscape();\r\n    } else if (g.subsubmode != NoSubSubMode) {\r\n        handled = handleCommandSubSubMode(input);\r\n    } else if (g.submode == NoSubMode) {\r\n        handled = handleNoSubMode(input);\r\n    } else if (g.submode == ChangeSubMode || g.submode == DeleteSubMode) {\r\n        handled = handleChangeDeleteSubModes(input);\r\n    } else if (g.submode == ReplaceSubMode) {\r\n        handled = handleReplaceSubMode(input);\r\n    } else if (g.submode == FilterSubMode) {\r\n        handled = handleFilterSubMode(input);\r\n    } else if (g.submode == RegisterSubMode) {\r\n        handled = handleRegisterSubMode(input);\r\n    } else if (g.submode == WindowSubMode) {\r\n        handled = handleWindowSubMode(input);\r\n    } else if (g.submode == YankSubMode) {\r\n        handled = handleYankSubMode(input);\r\n    } else if (g.submode == ZSubMode) {\r\n        handled = handleZSubMode(input);\r\n    } else if (g.submode == CapitalZSubMode) {\r\n        handled = handleCapitalZSubMode(input);\r\n    } else if (g.submode == MacroRecordSubMode) {\r\n        handled = handleMacroRecordSubMode(input);\r\n    } else if (g.submode == MacroExecuteSubMode) {\r\n        handled = handleMacroExecuteSubMode(input);\r\n    } else if (g.submode == ShiftLeftSubMode\r\n        || g.submode == ShiftRightSubMode\r\n        || g.submode == IndentSubMode) {\r\n        handled = handleShiftSubMode(input);\r\n    } else if (g.submode == InvertCaseSubMode\r\n        || g.submode == DownCaseSubMode\r\n        || g.submode == UpCaseSubMode) {\r\n        handled = handleChangeCaseSubMode(input);\r\n    }\r\n\r\n    if (!handled && isOperatorPending())\r\n       handled = handleMovement(input);\r\n\r\n    // Clear state and display incomplete command if necessary.\r\n    if (handled) {\r\n        bool noMode =\r\n            (g.mode == CommandMode && g.submode == NoSubMode && g.subsubmode == NoSubSubMode);\r\n        clearCount = clearCount && noMode && !g.gflag;\r\n        if (clearCount && clearRegister) {\r\n            resetCommandMode();\r\n        } else {\r\n            // Use gflag only for next input.\r\n            if (clearGflag)\r\n                g.gflag = false;\r\n            // Clear [count] and [register] if its no longer needed.\r\n            if (clearCount)\r\n                resetCount();\r\n            // Show or clear current command on minibuffer (showcmd).\r\n            if (input.isEscape() || g.mode != CommandMode || clearCount)\r\n                g.currentCommand.clear();\r\n            else\r\n                g.currentCommand.append(input.toString());\r\n        }\r\n    } else {\r\n        resetCommandMode();\r\n        //qDebug() << \"IGNORED IN COMMAND MODE: \" << key << text\r\n        //    << \" VISUAL: \" << g.visualMode;\r\n\r\n        // if a key which produces text was pressed, don't mark it as unhandled\r\n        // - otherwise the text would be inserted while being in command mode\r\n        if (input.text().isEmpty())\r\n            handled = false;\r\n    }\r\n\r\n    updateMiniBuffer();\r\n\r\n    m_positionPastEnd = (m_visualTargetColumn == -1) && isVisualMode() && !atEmptyLine();\r\n\r\n    return handled ? EventHandled : EventCancelled;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleEscape()\r\n{\r\n    if (isVisualMode())\r\n        leaveVisualMode();\r\n    resetCommandMode();\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleNoSubMode(const Input &input)\r\n{\r\n    bool handled = true;\r\n\r\n    if (input.is('&')) {\r\n        handleExCommand(g.gflag ? _(\"%s//~/&\") : _(\"s\"));\r\n    } else if (input.is(':')) {\r\n        enterExMode();\r\n    } else if (input.is('!') && isNoVisualMode()) {\r\n        g.submode = FilterSubMode;\r\n    } else if (input.is('!') && isVisualMode()) {\r\n        enterExMode(QString::fromLatin1(\"!\"));\r\n    } else if (input.is('\"')) {\r\n        g.submode = RegisterSubMode;\r\n    } else if (input.is(',')) {\r\n        passShortcuts(true);\r\n    } else if (input.is('.')) {\r\n        //qDebug() << \"REPEATING\" << quoteUnprintable(g.dotCommand) << count()\r\n        //    << input;\r\n        QString savedCommand = g.dotCommand;\r\n        g.dotCommand.clear();\r\n        beginLargeEditBlock();\r\n        replay(savedCommand);\r\n        endEditBlock();\r\n        resetCommandMode();\r\n        g.dotCommand = savedCommand;\r\n    } else if (input.is('<') || input.is('>') || input.is('=')) {\r\n        if (isNoVisualMode()) {\r\n            if (input.is('<'))\r\n                g.submode = ShiftLeftSubMode;\r\n            else if (input.is('>'))\r\n                g.submode = ShiftRightSubMode;\r\n            else\r\n                g.submode = IndentSubMode;\r\n            setAnchor();\r\n        } else {\r\n            leaveVisualMode();\r\n            const int lines = qAbs(lineForPosition(position()) - lineForPosition(anchor())) + 1;\r\n            const int repeat = count();\r\n            if (input.is('<'))\r\n                shiftRegionLeft(repeat);\r\n            else if (input.is('>'))\r\n                shiftRegionRight(repeat);\r\n            else\r\n                indentSelectedText();\r\n            const QString selectDotCommand =\r\n                    (lines > 1) ? QString::fromLatin1(\"V%1j\").arg(lines - 1): QString();\r\n            setDotCommand(selectDotCommand + QString::fromLatin1(\"%1%2%2\").arg(repeat).arg(input.raw()));\r\n        }\r\n    } else if ((!isVisualMode() && input.is('a')) || (isVisualMode() && input.is('A'))) {\r\n        if (isVisualMode()) {\r\n            enterVisualInsertMode(QLatin1Char('A'));\r\n        } else {\r\n            setDotCommand(_(\"%1a\"), count());\r\n            moveRight(qMin(rightDist(), 1));\r\n            breakEditBlock();\r\n            enterInsertMode();\r\n        }\r\n    } else if (input.is('A')) {\r\n        breakEditBlock();\r\n        moveBehindEndOfLine();\r\n        setAnchor();\r\n        enterInsertMode();\r\n        setTargetColumn();\r\n        setDotCommand(_(\"%1A\"), count());\r\n    } else if (input.isControl('a')) {\r\n        if (changeNumberTextObject(count()))\r\n            setDotCommand(_(\"%1<c-a>\"), count());\r\n    } else if ((input.is('c') || input.is('d')) && isNoVisualMode()) {\r\n        setAnchor();\r\n        g.opcount = g.mvcount;\r\n        g.mvcount = 0;\r\n        g.rangemode = RangeCharMode;\r\n        g.movetype = MoveExclusive;\r\n        g.submode = input.is('c') ? ChangeSubMode : DeleteSubMode;\r\n    } else if ((input.is('c') || input.is('C') || input.is('s') || input.is('R'))\r\n          && (isVisualCharMode() || isVisualLineMode())) {\r\n        setDotCommand(visualDotCommand() + input.asChar());\r\n        leaveVisualMode();\r\n        g.submode = ChangeSubMode;\r\n        finishMovement();\r\n    } else if ((input.is('c') || input.is('s')) && isVisualBlockMode()) {\r\n        resetCount();\r\n        enterVisualInsertMode(input.asChar());\r\n    } else if (input.is('C')) {\r\n        setAnchor();\r\n        moveToEndOfLine();\r\n        g.rangemode = RangeCharMode;\r\n        g.submode = ChangeSubMode;\r\n        setDotCommand(QString(QLatin1Char('C')));\r\n        finishMovement();\r\n    } else if (input.isControl('c')) {\r\n        if (isNoVisualMode())\r\n            showMessage(MessageInfo, tr(\"Type Alt-V, Alt-V to quit FakeVim mode.\"));\r\n        else\r\n            leaveVisualMode();\r\n    } else if ((input.is('d') || input.is('x') || input.isKey(Key_Delete))\r\n            && isVisualMode()) {\r\n        pushUndoState();\r\n        setDotCommand(visualDotCommand() + QLatin1Char('x'));\r\n        if (isVisualCharMode()) {\r\n            leaveVisualMode();\r\n            g.submode = DeleteSubMode;\r\n            finishMovement();\r\n        } else if (isVisualLineMode()) {\r\n            leaveVisualMode();\r\n            yankText(currentRange(), m_register);\r\n            removeText(currentRange());\r\n            handleStartOfLine();\r\n        } else if (isVisualBlockMode()) {\r\n            leaveVisualMode();\r\n            yankText(currentRange(), m_register);\r\n            removeText(currentRange());\r\n            setPosition(qMin(position(), anchor()));\r\n        }\r\n    } else if (input.is('D') && isNoVisualMode()) {\r\n        pushUndoState();\r\n        if (atEndOfLine())\r\n            moveLeft();\r\n        g.submode = DeleteSubMode;\r\n        g.movetype = MoveInclusive;\r\n        setAnchorAndPosition(position(), lastPositionInLine(cursorLine() + count()));\r\n        setDotCommand(QString(QLatin1Char('D')));\r\n        finishMovement();\r\n        setTargetColumn();\r\n    } else if ((input.is('D') || input.is('X')) &&\r\n         (isVisualCharMode() || isVisualLineMode())) {\r\n        setDotCommand(visualDotCommand() + QLatin1Char('X'));\r\n        leaveVisualMode();\r\n        g.rangemode = RangeLineMode;\r\n        g.submode = NoSubMode;\r\n        yankText(currentRange(), m_register);\r\n        removeText(currentRange());\r\n        moveToFirstNonBlankOnLine();\r\n    } else if ((input.is('D') || input.is('X')) && isVisualBlockMode()) {\r\n        setDotCommand(visualDotCommand() + QLatin1Char('X'));\r\n        leaveVisualMode();\r\n        g.rangemode = RangeBlockAndTailMode;\r\n        yankText(currentRange(), m_register);\r\n        removeText(currentRange());\r\n        setPosition(qMin(position(), anchor()));\r\n    } else if (input.isControl('d')) {\r\n        const int scrollOffset = windowScrollOffset();\r\n        int sline = cursorLine() < scrollOffset ? scrollOffset : cursorLineOnScreen();\r\n        // FIXME: this should use the \"scroll\" option, and \"count\"\r\n        moveDown(linesOnScreen() / 2);\r\n        handleStartOfLine();\r\n        scrollToLine(cursorLine() - sline);\r\n    } else if (!g.gflag && input.is('g')) {\r\n        g.gflag = true;\r\n    } else if (!isVisualMode() && (input.is('i') || input.isKey(Key_Insert))) {\r\n        setDotCommand(_(\"%1i\"), count());\r\n        breakEditBlock();\r\n        enterInsertMode();\r\n        if (atEndOfLine())\r\n            moveLeft();\r\n    } else if (input.is('I')) {\r\n        if (isVisualMode()) {\r\n            enterVisualInsertMode(QLatin1Char('I'));\r\n        } else {\r\n            if (g.gflag) {\r\n                setDotCommand(_(\"%1gI\"), count());\r\n                moveToStartOfLine();\r\n            } else {\r\n                setDotCommand(_(\"%1I\"), count());\r\n                moveToFirstNonBlankOnLine();\r\n            }\r\n            breakEditBlock();\r\n            enterInsertMode();\r\n        }\r\n    } else if (input.isControl('i')) {\r\n        jump(count());\r\n    } else if (input.is('J')) {\r\n        pushUndoState();\r\n        moveBehindEndOfLine();\r\n        beginEditBlock();\r\n        if (g.submode == NoSubMode)\r\n            joinLines(count(), g.gflag);\r\n        endEditBlock();\r\n        setDotCommand(_(\"%1J\"), count());\r\n    } else if (input.isControl('l')) {\r\n        // screen redraw. should not be needed\r\n    } else if (!g.gflag && input.is('m')) {\r\n        g.subsubmode = MarkSubSubMode;\r\n    } else if (isVisualMode() && (input.is('o') || input.is('O'))) {\r\n        int pos = position();\r\n        setAnchorAndPosition(pos, anchor());\r\n        std::swap(m_positionPastEnd, m_anchorPastEnd);\r\n        setTargetColumn();\r\n        if (m_positionPastEnd)\r\n            m_visualTargetColumn = -1;\r\n    } else if (input.is('o') || input.is('O')) {\r\n        bool insertAfter = input.is('o');\r\n        setDotCommand(_(insertAfter ? \"%1o\" : \"%1O\"), count());\r\n        pushUndoState();\r\n\r\n        // Prepend line only if on the first line and command is 'O'.\r\n        bool appendLine = true;\r\n        if (!insertAfter) {\r\n            if (block().blockNumber() == 0)\r\n                appendLine = false;\r\n            else\r\n                moveUp();\r\n        }\r\n        const int line = lineNumber(block());\r\n\r\n        beginEditBlock();\r\n        enterInsertMode();\r\n        setPosition(appendLine ? lastPositionInLine(line) : firstPositionInLine(line));\r\n        clearLastInsertion();\r\n        setAnchor();\r\n        insertNewLine();\r\n        if (appendLine) {\r\n            m_buffer->insertState.newLineBefore = true;\r\n        } else {\r\n            moveUp();\r\n            m_oldInternalPosition = position();\r\n            m_buffer->insertState.pos1 = m_oldInternalPosition;\r\n            m_buffer->insertState.newLineAfter = true;\r\n        }\r\n        setTargetColumn();\r\n        endEditBlock();\r\n\r\n        // Close accidentally opened block.\r\n        if (block().blockNumber() > 0) {\r\n            moveUp();\r\n            if (line != lineNumber(block()))\r\n                emit q->fold(1, true);\r\n            moveDown();\r\n        }\r\n    } else if (input.isControl('o')) {\r\n        jump(-count());\r\n    } else if (input.is('p') || input.is('P') || input.isShift(Qt::Key_Insert)) {\r\n        pasteText(!input.is('P'));\r\n        setTargetColumn();\r\n        setDotCommand(_(\"%1p\"), count());\r\n        finishMovement();\r\n    } else if (input.is('q')) {\r\n        if (g.recording.isNull()) {\r\n            // Recording shouldn't work in mapping or while executing register.\r\n            handled = g.mapStates.empty();\r\n            if (handled)\r\n                g.submode = MacroRecordSubMode;\r\n        } else {\r\n            // Stop recording.\r\n            stopRecording();\r\n        }\r\n    } else if (input.is('r')) {\r\n        g.submode = ReplaceSubMode;\r\n    } else if (!isVisualMode() && input.is('R')) {\r\n        pushUndoState();\r\n        breakEditBlock();\r\n        enterReplaceMode();\r\n    } else if (input.isControl('r')) {\r\n        int repeat = count();\r\n        while (--repeat >= 0)\r\n            redo();\r\n    } else if (input.is('s')) {\r\n        pushUndoState();\r\n        leaveVisualMode();\r\n        if (atEndOfLine())\r\n            moveLeft();\r\n        setAnchor();\r\n        moveRight(qMin(count(), rightDist()));\r\n        setDotCommand(_(\"%1s\"), count());\r\n        g.submode = ChangeSubMode;\r\n        g.movetype = MoveExclusive;\r\n        finishMovement();\r\n    } else if (input.is('S')) {\r\n        g.movetype = MoveLineWise;\r\n        pushUndoState();\r\n        if (!isVisualMode()) {\r\n            const int line = cursorLine() + 1;\r\n            const int anc = firstPositionInLine(line);\r\n            const int pos = lastPositionInLine(line + count() - 1);\r\n            setAnchorAndPosition(anc, pos);\r\n        }\r\n        setDotCommand(_(\"%1S\"), count());\r\n        g.submode = ChangeSubMode;\r\n        finishMovement();\r\n    } else if (g.gflag && input.is('t')) {\r\n        handleExCommand(_(\"tabnext\"));\r\n    } else if (g.gflag && input.is('T')) {\r\n        handleExCommand(_(\"tabprev\"));\r\n    } else if (input.isControl('t')) {\r\n        handleExCommand(_(\"pop\"));\r\n    } else if (!g.gflag && input.is('u') && !isVisualMode()) {\r\n        int repeat = count();\r\n        while (--repeat >= 0)\r\n            undo();\r\n    } else if (input.isControl('u')) {\r\n        int sline = cursorLineOnScreen();\r\n        // FIXME: this should use the \"scroll\" option, and \"count\"\r\n        moveUp(linesOnScreen() / 2);\r\n        handleStartOfLine();\r\n        scrollToLine(cursorLine() - sline);\r\n    } else if (g.gflag && input.is('v')) {\r\n        if (m_buffer->lastVisualMode != NoVisualMode) {\r\n            CursorPosition from = markLessPosition();\r\n            CursorPosition to = markGreaterPosition();\r\n            toggleVisualMode(m_buffer->lastVisualMode);\r\n            setCursorPosition(m_buffer->lastVisualModeInverted ? to : from);\r\n            setAnchor();\r\n            setCursorPosition(m_buffer->lastVisualModeInverted ? from : to);\r\n            setTargetColumn();\r\n        }\r\n    } else if (input.is('v')) {\r\n        toggleVisualMode(VisualCharMode);\r\n    } else if (input.is('V')) {\r\n        toggleVisualMode(VisualLineMode);\r\n    } else if (input.isControl('v')) {\r\n        toggleVisualMode(VisualBlockMode);\r\n    } else if (input.isControl('w')) {\r\n        g.submode = WindowSubMode;\r\n    } else if (input.is('x') && isNoVisualMode()) { // = _(\"dl\")\r\n        g.movetype = MoveExclusive;\r\n        g.submode = DeleteSubMode;\r\n        const int n = qMin(count(), rightDist());\r\n        setAnchorAndPosition(position(), position() + n);\r\n        setDotCommand(_(\"%1x\"), count());\r\n        finishMovement();\r\n    } else if (input.isControl('x')) {\r\n        if (changeNumberTextObject(-count()))\r\n            setDotCommand(_(\"%1<c-x>\"), count());\r\n    } else if (input.is('X')) {\r\n        if (leftDist() > 0) {\r\n            setAnchor();\r\n            moveLeft(qMin(count(), leftDist()));\r\n            yankText(currentRange(), m_register);\r\n            removeText(currentRange());\r\n        }\r\n    } else if (input.is('Y') && isNoVisualMode())  {\r\n        handleYankSubMode(Input(QLatin1Char('y')));\r\n    } else if (input.isControl('y')) {\r\n        // FIXME: this should use the \"scroll\" option, and \"count\"\r\n        if (cursorLineOnScreen() == linesOnScreen() - 1)\r\n            moveUp(1);\r\n        scrollUp(1);\r\n    } else if (input.is('y') && isNoVisualMode()) {\r\n        setAnchor();\r\n        g.rangemode = RangeCharMode;\r\n        g.movetype = MoveExclusive;\r\n        g.submode = YankSubMode;\r\n    } else if (input.is('y') && isVisualCharMode()) {\r\n        g.rangemode = RangeCharMode;\r\n        g.movetype = MoveInclusive;\r\n        g.submode = YankSubMode;\r\n        finishMovement();\r\n    } else if ((input.is('y') && isVisualLineMode())\r\n            || (input.is('Y') && isVisualLineMode())\r\n            || (input.is('Y') && isVisualCharMode())) {\r\n        g.rangemode = RangeLineMode;\r\n        g.movetype = MoveLineWise;\r\n        g.submode = YankSubMode;\r\n        finishMovement();\r\n    } else if ((input.is('y') || input.is('Y')) && isVisualBlockMode()) {\r\n        g.rangemode = RangeBlockMode;\r\n        g.movetype = MoveInclusive;\r\n        g.submode = YankSubMode;\r\n        finishMovement();\r\n    } else if (input.is('z')) {\r\n        g.submode = ZSubMode;\r\n    } else if (input.is('Z')) {\r\n        g.submode = CapitalZSubMode;\r\n    } else if ((input.is('~') || input.is('u') || input.is('U'))) {\r\n        g.movetype = MoveExclusive;\r\n        pushUndoState();\r\n        if (isVisualMode()) {\r\n            setDotCommand(visualDotCommand() + QString::number(count()) + input.raw());\r\n            if (isVisualLineMode())\r\n                g.rangemode = RangeLineMode;\r\n            else if (isVisualBlockMode())\r\n                g.rangemode = RangeBlockMode;\r\n            leaveVisualMode();\r\n            if (input.is('~'))\r\n                g.submode = InvertCaseSubMode;\r\n            else if (input.is('u'))\r\n                g.submode = DownCaseSubMode;\r\n            else if (input.is('U'))\r\n                g.submode = UpCaseSubMode;\r\n            finishMovement();\r\n        } else if (g.gflag || (input.is('~') && hasConfig(ConfigTildeOp))) {\r\n            if (atEndOfLine())\r\n                moveLeft();\r\n            setAnchor();\r\n            if (input.is('~'))\r\n                g.submode = InvertCaseSubMode;\r\n            else if (input.is('u'))\r\n                g.submode = DownCaseSubMode;\r\n            else if (input.is('U'))\r\n                g.submode = UpCaseSubMode;\r\n        } else {\r\n            beginEditBlock();\r\n            if (atEndOfLine())\r\n                moveLeft();\r\n            setAnchor();\r\n            moveRight(qMin(count(), rightDist()));\r\n            if (input.is('~')) {\r\n                const int pos = position();\r\n                invertCase(currentRange());\r\n                setPosition(pos);\r\n            } else if (input.is('u')) {\r\n                downCase(currentRange());\r\n            } else if (input.is('U')) {\r\n                upCase(currentRange());\r\n            }\r\n            setDotCommand(QString::fromLatin1(\"%1%2\").arg(count()).arg(input.raw()));\r\n            endEditBlock();\r\n        }\r\n    } else if (input.is('@')) {\r\n        g.submode = MacroExecuteSubMode;\r\n    } else if (input.isKey(Key_Delete)) {\r\n        setAnchor();\r\n        moveRight(qMin(1, rightDist()));\r\n        removeText(currentRange());\r\n        if (atEndOfLine())\r\n            moveLeft();\r\n    } else if (input.isControl(Key_BracketRight)) {\r\n        handleExCommand(_(\"tag\"));\r\n    } else if (handleMovement(input)) {\r\n        // movement handled\r\n    } else {\r\n        handled = false;\r\n    }\r\n\r\n    return handled;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleChangeDeleteSubModes(const Input &input)\r\n{\r\n    bool handled = false;\r\n\r\n    if ((g.submode == ChangeSubMode && input.is('c'))\r\n        || (g.submode == DeleteSubMode && input.is('d'))) {\r\n        g.movetype = MoveLineWise;\r\n        pushUndoState();\r\n        const int anc = firstPositionInLine(cursorLine() + 1);\r\n        moveDown(count() - 1);\r\n        const int pos = lastPositionInLine(cursorLine() + 1);\r\n        setAnchorAndPosition(anc, pos);\r\n        if (g.submode == ChangeSubMode)\r\n            setDotCommand(_(\"%1cc\"), count());\r\n        else\r\n            setDotCommand(_(\"%1dd\"), count());\r\n        finishMovement();\r\n        g.submode = NoSubMode;\r\n        handled = true;\r\n    }\r\n\r\n    return handled;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleReplaceSubMode(const Input &input)\r\n{\r\n    bool handled = true;\r\n\r\n    setDotCommand(visualDotCommand() + QLatin1Char('r') + input.asChar());\r\n    if (isVisualMode()) {\r\n        pushUndoState();\r\n        if (isVisualLineMode())\r\n            g.rangemode = RangeLineMode;\r\n        else if (isVisualBlockMode())\r\n            g.rangemode = RangeBlockMode;\r\n        else\r\n            g.rangemode = RangeCharMode;\r\n        leaveVisualMode();\r\n        Range range = currentRange();\r\n        if (g.rangemode == RangeCharMode)\r\n            ++range.endPos;\r\n        Transformation tr =\r\n                &FakeVimHandler::Private::replaceByCharTransform;\r\n        transformText(range, tr, input.asChar());\r\n    } else if (count() <= rightDist()) {\r\n        pushUndoState();\r\n        setAnchor();\r\n        moveRight(count());\r\n        Range range = currentRange();\r\n        if (input.isReturn()) {\r\n            beginEditBlock();\r\n            replaceText(range, QString());\r\n            insertText(QString::fromLatin1(\"\\n\"));\r\n            endEditBlock();\r\n        } else {\r\n            replaceText(range, QString(count(), input.asChar()));\r\n            moveRight(count() - 1);\r\n        }\r\n        setTargetColumn();\r\n        setDotCommand(_(\"%1r\") + input.text(), count());\r\n    } else {\r\n        handled = false;\r\n    }\r\n    g.submode = NoSubMode;\r\n    finishMovement();\r\n\r\n    return handled;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleFilterSubMode(const Input &)\r\n{\r\n    return false;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleRegisterSubMode(const Input &input)\r\n{\r\n    bool handled = false;\r\n\r\n    QChar reg = input.asChar();\r\n    if (QString::fromLatin1(\"*+.%#:-\\\"\").contains(reg) || reg.isLetterOrNumber()) {\r\n        m_register = reg.unicode();\r\n        g.rangemode = RangeLineMode;\r\n        handled = true;\r\n    }\r\n    g.submode = NoSubMode;\r\n\r\n    return handled;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleShiftSubMode(const Input &input)\r\n{\r\n    bool handled = false;\r\n    if ((g.submode == ShiftLeftSubMode && input.is('<'))\r\n        || (g.submode == ShiftRightSubMode && input.is('>'))\r\n        || (g.submode == IndentSubMode && input.is('='))) {\r\n        g.movetype = MoveLineWise;\r\n        pushUndoState();\r\n        moveDown(count() - 1);\r\n        setDotCommand(QString::fromLatin1(\"%2%1%1\").arg(input.asChar()), count());\r\n        finishMovement();\r\n        handled = true;\r\n        g.submode = NoSubMode;\r\n    }\r\n    return handled;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleChangeCaseSubMode(const Input &input)\r\n{\r\n    bool handled = false;\r\n    if ((g.submode == InvertCaseSubMode && input.is('~'))\r\n        || (g.submode == DownCaseSubMode && input.is('u'))\r\n        || (g.submode == UpCaseSubMode && input.is('U'))) {\r\n        if (!isFirstNonBlankOnLine(position())) {\r\n            moveToStartOfLine();\r\n            moveToFirstNonBlankOnLine();\r\n        }\r\n        setTargetColumn();\r\n        pushUndoState();\r\n        setAnchor();\r\n        setPosition(lastPositionInLine(cursorLine() + count()) + 1);\r\n        finishMovement(QString::fromLatin1(\"%1%2\").arg(count()).arg(input.raw()));\r\n        handled = true;\r\n        g.submode = NoSubMode;\r\n    }\r\n    return handled;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleWindowSubMode(const Input &input)\r\n{\r\n    if (handleCount(input))\r\n        return true;\r\n\r\n    leaveVisualMode();\r\n    emit q->windowCommandRequested(input.toString(), count());\r\n\r\n    g.submode = NoSubMode;\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleYankSubMode(const Input &input)\r\n{\r\n    bool handled = false;\r\n    if (input.is('y')) {\r\n        g.movetype = MoveLineWise;\r\n        int endPos = firstPositionInLine(lineForPosition(position()) + count() - 1);\r\n        Range range(position(), endPos, RangeLineMode);\r\n        yankText(range, m_register);\r\n        g.submode = NoSubMode;\r\n        handled = true;\r\n    }\r\n    return handled;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleZSubMode(const Input &input)\r\n{\r\n    bool handled = true;\r\n    bool foldMaybeClosed = false;\r\n    if (input.isReturn() || input.is('t')\r\n        || input.is('-') || input.is('b')\r\n        || input.is('.') || input.is('z')) {\r\n        // Cursor line to top/center/bottom of window.\r\n        Qt::AlignmentFlag align;\r\n        if (input.isReturn() || input.is('t'))\r\n            align = Qt::AlignTop;\r\n        else if (input.is('.') || input.is('z'))\r\n            align = Qt::AlignVCenter;\r\n        else\r\n            align = Qt::AlignBottom;\r\n        const bool moveToNonBlank = (input.is('.') || input.isReturn() || input.is('-'));\r\n        const int line = g.mvcount == 0 ? -1 : firstPositionInLine(count());\r\n        alignViewportToCursor(align, line, moveToNonBlank);\r\n    } else if (input.is('o') || input.is('c')) {\r\n        // Open/close current fold.\r\n        foldMaybeClosed = input.is('c');\r\n        emit q->fold(count(), foldMaybeClosed);\r\n    } else if (input.is('O') || input.is('C')) {\r\n        // Recursively open/close current fold.\r\n        foldMaybeClosed = input.is('C');\r\n        emit q->fold(-1, foldMaybeClosed);\r\n    } else if (input.is('a') || input.is('A')) {\r\n        // Toggle current fold.\r\n        foldMaybeClosed = true;\r\n        emit q->foldToggle(input.is('a') ? count() : -1);\r\n    } else if (input.is('R') || input.is('M')) {\r\n        // Open/close all folds in document.\r\n        foldMaybeClosed = input.is('M');\r\n        emit q->foldAll(foldMaybeClosed);\r\n    } else if (input.is('j') || input.is('k')) {\r\n        emit q->foldGoTo(input.is('j') ? count() : -count(), false);\r\n    } else {\r\n        handled = false;\r\n    }\r\n    if (foldMaybeClosed)\r\n        ensureCursorVisible();\r\n    g.submode = NoSubMode;\r\n    return handled;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleCapitalZSubMode(const Input &input)\r\n{\r\n    // Recognize ZZ and ZQ as aliases for \":x\" and \":q!\".\r\n    bool handled = true;\r\n    if (input.is('Z'))\r\n        handleExCommand(QString(QLatin1Char('x')));\r\n    else if (input.is('Q'))\r\n        handleExCommand(_(\"q!\"));\r\n    else\r\n        handled = false;\r\n    g.submode = NoSubMode;\r\n    return handled;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleMacroRecordSubMode(const Input &input)\r\n{\r\n    g.submode = NoSubMode;\r\n    return startRecording(input);\r\n}\r\n\r\nbool FakeVimHandler::Private::handleMacroExecuteSubMode(const Input &input)\r\n{\r\n    g.submode = NoSubMode;\r\n\r\n    bool result = true;\r\n    int repeat = count();\r\n    while (result && --repeat >= 0)\r\n        result = executeRegister(input.asChar().unicode());\r\n\r\n    return result;\r\n}\r\n\r\nEventResult FakeVimHandler::Private::handleInsertOrReplaceMode(const Input &input)\r\n{\r\n    if (position() < m_buffer->insertState.pos1 || position() > m_buffer->insertState.pos2) {\r\n        commitInsertState();\r\n        invalidateInsertState();\r\n    }\r\n\r\n    if (g.mode == InsertMode)\r\n        handleInsertMode(input);\r\n    else\r\n        handleReplaceMode(input);\r\n\r\n    if (!m_textedit && !m_plaintextedit)\r\n        return EventHandled;\r\n\r\n    if (!isInsertMode() || m_buffer->breakEditBlock\r\n            || position() < m_buffer->insertState.pos1 || position() > m_buffer->insertState.pos2) {\r\n        commitInsertState();\r\n        invalidateInsertState();\r\n        breakEditBlock();\r\n        m_visualBlockInsert = NoneBlockInsertMode;\r\n    } else if (m_oldInternalPosition == position()) {\r\n        setTargetColumn();\r\n    }\r\n\r\n    updateMiniBuffer();\r\n\r\n    // We don't want fancy stuff in insert mode.\r\n    return EventHandled;\r\n}\r\n\r\nvoid FakeVimHandler::Private::handleReplaceMode(const Input &input)\r\n{\r\n    if (input.isEscape()) {\r\n        commitInsertState();\r\n        moveLeft(qMin(1, leftDist()));\r\n        enterCommandMode();\r\n        g.dotCommand.append(m_buffer->lastInsertion + _(\"<ESC>\"));\r\n    } else if (input.isKey(Key_Left)) {\r\n        moveLeft();\r\n        setTargetColumn();\r\n    } else if (input.isKey(Key_Right)) {\r\n        moveRight();\r\n        setTargetColumn();\r\n    } else if (input.isKey(Key_Up)) {\r\n        moveUp();\r\n    } else if (input.isKey(Key_Down)) {\r\n        moveDown();\r\n    } else if (input.isKey(Key_Insert)) {\r\n        g.mode = InsertMode;\r\n    } else if (input.isControl('o')) {\r\n        enterCommandMode(ReplaceMode);\r\n    } else {\r\n        joinPreviousEditBlock();\r\n        if (!atEndOfLine()) {\r\n            setAnchor();\r\n            moveRight();\r\n            removeText(currentRange());\r\n        }\r\n        const QString text = input.text();\r\n        setAnchor();\r\n        insertText(text);\r\n        endEditBlock();\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::finishInsertMode()\r\n{\r\n    bool newLineAfter = m_buffer->insertState.newLineAfter;\r\n    bool newLineBefore = m_buffer->insertState.newLineBefore;\r\n\r\n    // Repeat insertion [count] times.\r\n    // One instance was already physically inserted while typing.\r\n    if (!m_buffer->breakEditBlock && isInsertStateValid()) {\r\n        commitInsertState();\r\n\r\n        QString text = m_buffer->lastInsertion;\r\n        const QString dotCommand = g.dotCommand;\r\n        const int repeat = count() - 1;\r\n        m_buffer->lastInsertion.clear();\r\n        joinPreviousEditBlock();\r\n\r\n        if (newLineAfter) {\r\n            text.chop(1);\r\n            text.prepend(_(\"<END>\\n\"));\r\n        } else if (newLineBefore) {\r\n            text.prepend(_(\"<END>\"));\r\n        }\r\n\r\n        replay(text, repeat);\r\n\r\n        if (m_visualBlockInsert != NoneBlockInsertMode && !text.contains(QLatin1Char('\\n'))) {\r\n            const CursorPosition lastAnchor = markLessPosition();\r\n            const CursorPosition lastPosition = markGreaterPosition();\r\n            bool change = m_visualBlockInsert == ChangeBlockInsertMode;\r\n            const int insertColumn = (m_visualBlockInsert == InsertBlockInsertMode || change)\r\n                    ? qMin(lastPosition.column, lastAnchor.column)\r\n                    : qMax(lastPosition.column, lastAnchor.column) + 1;\r\n\r\n            CursorPosition pos(lastAnchor.line, insertColumn);\r\n\r\n            if (change)\r\n                pos.column = m_buffer->insertState.pos1 - document()->findBlock(m_buffer->insertState.pos1).position();\r\n\r\n            // Cursor position after block insert is on the first selected line,\r\n            // last selected column for 's' command, otherwise first selected column.\r\n            const int endColumn = change ? qMax(0, m_cursor.positionInBlock() - 1)\r\n                                         : qMin(lastPosition.column, lastAnchor.column);\r\n\r\n            while (pos.line < lastPosition.line) {\r\n                ++pos.line;\r\n                setCursorPosition(&m_cursor, pos);\r\n                if (m_visualBlockInsert == AppendToEndOfLineBlockInsertMode) {\r\n                    moveToEndOfLine();\r\n                } else if (m_visualBlockInsert == AppendBlockInsertMode) {\r\n                    // Prepend spaces if necessary.\r\n                    int spaces = pos.column - m_cursor.positionInBlock();\r\n                    if (spaces > 0) {\r\n                        setAnchor();\r\n                        m_cursor.insertText(QString(_(\" \")).repeated(spaces));\r\n                    }\r\n                } else if (m_cursor.positionInBlock() != pos.column) {\r\n                    continue;\r\n                }\r\n                replay(text, repeat + 1);\r\n            }\r\n\r\n            setCursorPosition(CursorPosition(lastAnchor.line, endColumn));\r\n        } else {\r\n            moveLeft(qMin(1, leftDist()));\r\n        }\r\n\r\n        endEditBlock();\r\n        breakEditBlock();\r\n\r\n        m_buffer->lastInsertion = text;\r\n        g.dotCommand = dotCommand;\r\n    } else {\r\n        moveLeft(qMin(1, leftDist()));\r\n    }\r\n\r\n    if (newLineBefore || newLineAfter)\r\n        m_buffer->lastInsertion.remove(0, m_buffer->lastInsertion.indexOf(QLatin1Char('\\n')) + 1);\r\n    g.dotCommand.append(m_buffer->lastInsertion + _(\"<ESC>\"));\r\n\r\n    enterCommandMode();\r\n    setTargetColumn();\r\n}\r\n\r\nvoid FakeVimHandler::Private::handleInsertMode(const Input &input)\r\n{\r\n    if (input.isEscape()) {\r\n        finishInsertMode();\r\n    } else if (g.submode == CtrlVSubMode) {\r\n        if (g.subsubmode == NoSubSubMode) {\r\n            g.subsubmode = CtrlVUnicodeSubSubMode;\r\n            m_ctrlVAccumulator = 0;\r\n            if (input.is('x') || input.is('X')) {\r\n                // ^VXnn or ^Vxnn with 00 <= nn <= FF\r\n                // BMP Unicode codepoints ^Vunnnn with 0000 <= nnnn <= FFFF\r\n                // any Unicode codepoint ^VUnnnnnnnn with 00000000 <= nnnnnnnn <= 7FFFFFFF\r\n                // ^Vnnn with 000 <= nnn <= 255\r\n                // ^VOnnn or ^Vonnn with 000 <= nnn <= 377\r\n                m_ctrlVLength = 2;\r\n                m_ctrlVBase = 16;\r\n            } else if (input.is('O') || input.is('o')) {\r\n                m_ctrlVLength = 3;\r\n                m_ctrlVBase = 8;\r\n            } else if (input.is('u')) {\r\n                m_ctrlVLength = 4;\r\n                m_ctrlVBase = 16;\r\n            } else if (input.is('U')) {\r\n                m_ctrlVLength = 8;\r\n                m_ctrlVBase = 16;\r\n            } else if (input.isDigit()) {\r\n                bool ok;\r\n                m_ctrlVAccumulator = input.toInt(&ok, 10);\r\n                m_ctrlVLength = 2;\r\n                m_ctrlVBase = 10;\r\n            } else {\r\n                insertInInsertMode(input.raw());\r\n                g.submode = NoSubMode;\r\n                g.subsubmode = NoSubSubMode;\r\n            }\r\n        } else {\r\n            bool ok;\r\n            int current = input.toInt(&ok, m_ctrlVBase);\r\n            if (ok)\r\n                m_ctrlVAccumulator = m_ctrlVAccumulator * m_ctrlVBase + current;\r\n            --m_ctrlVLength;\r\n            if (m_ctrlVLength == 0 || !ok) {\r\n                QString s;\r\n                if (QChar::requiresSurrogates(m_ctrlVAccumulator)) {\r\n                    s.append(QChar(QChar::highSurrogate(m_ctrlVAccumulator)));\r\n                    s.append(QChar(QChar::lowSurrogate(m_ctrlVAccumulator)));\r\n                } else {\r\n                    s.append(QChar(m_ctrlVAccumulator));\r\n                }\r\n                insertInInsertMode(s);\r\n                g.submode = NoSubMode;\r\n                g.subsubmode = NoSubSubMode;\r\n\r\n                // Try again without Ctrl-V interpretation.\r\n                if (!ok)\r\n                    handleInsertMode(input);\r\n            }\r\n        }\r\n    } else if (input.isControl('o')) {\r\n        enterCommandMode(InsertMode);\r\n    } else if (input.isControl('v')) {\r\n        g.submode = CtrlVSubMode;\r\n        g.subsubmode = NoSubSubMode;\r\n    } else if (input.isControl('w')) {\r\n        const int blockNumber = m_cursor.blockNumber();\r\n        const int endPos = position();\r\n        moveToNextWordStart(1, false, false);\r\n        if (blockNumber != m_cursor.blockNumber())\r\n            moveToEndOfLine();\r\n        const int beginPos = position();\r\n        Range range(beginPos, endPos, RangeCharMode);\r\n        removeText(range);\r\n    } else if (input.isKey(Key_Insert)) {\r\n        g.mode = ReplaceMode;\r\n    } else if (input.isKey(Key_Left)) {\r\n        moveLeft();\r\n        setTargetColumn();\r\n    } else if (input.isControl(Key_Left)) {\r\n        moveToNextWordStart(1, false, false);\r\n        setTargetColumn();\r\n    } else if (input.isKey(Key_Down)) {\r\n        g.submode = NoSubMode;\r\n        moveDown();\r\n    } else if (input.isKey(Key_Up)) {\r\n        g.submode = NoSubMode;\r\n        moveUp();\r\n    } else if (input.isKey(Key_Right)) {\r\n        moveRight();\r\n        setTargetColumn();\r\n    } else if (input.isControl(Key_Right)) {\r\n        moveToNextWordStart(1, false, true);\r\n        moveRight(); // we need one more move since we are in insert mode\r\n        setTargetColumn();\r\n    } else if (input.isKey(Key_Home)) {\r\n        moveToStartOfLine();\r\n        setTargetColumn();\r\n    } else if (input.isKey(Key_End)) {\r\n        moveBehindEndOfLine();\r\n        setTargetColumn();\r\n        m_targetColumn = -1;\r\n    } else if (input.isReturn() || input.isControl('j') || input.isControl('m')) {\r\n        if (!input.isReturn() || !handleInsertInEditor(input)) {\r\n            joinPreviousEditBlock();\r\n            g.submode = NoSubMode;\r\n            insertNewLine();\r\n            endEditBlock();\r\n        }\r\n    } else if (input.isBackspace()) {\r\n        if (!handleInsertInEditor(input)) {\r\n            joinPreviousEditBlock();\r\n            if (!m_buffer->lastInsertion.isEmpty()\r\n                    || hasConfig(ConfigBackspace, \"start\")\r\n                    || hasConfig(ConfigBackspace, \"2\")) {\r\n                const int line = cursorLine() + 1;\r\n                const Column col = cursorColumn();\r\n                QString data = lineContents(line);\r\n                const Column ind = indentation(data);\r\n                if (col.logical <= ind.logical && col.logical\r\n                        && startsWithWhitespace(data, col.physical)) {\r\n                    const int ts = config(ConfigTabStop).toInt();\r\n                    const int newl = col.logical - 1 - (col.logical - 1) % ts;\r\n                    const QString prefix = tabExpand(newl);\r\n                    setLineContents(line, prefix + data.mid(col.physical));\r\n                    moveToStartOfLine();\r\n                    moveRight(prefix.size());\r\n                } else {\r\n                    setAnchor();\r\n                    m_cursor.deletePreviousChar();\r\n                }\r\n            }\r\n            endEditBlock();\r\n        }\r\n    } else if (input.isKey(Key_Delete)) {\r\n        if (!handleInsertInEditor(input)) {\r\n            joinPreviousEditBlock();\r\n            m_cursor.deleteChar();\r\n            endEditBlock();\r\n        }\r\n    } else if (input.isKey(Key_PageDown) || input.isControl('f')) {\r\n        movePageDown();\r\n    } else if (input.isKey(Key_PageUp) || input.isControl('b')) {\r\n        movePageUp();\r\n    } else if (input.isKey(Key_Tab)) {\r\n        m_buffer->insertState.insertingSpaces = true;\r\n        if (hasConfig(ConfigExpandTab)) {\r\n            const int ts = config(ConfigTabStop).toInt();\r\n            const int col = logicalCursorColumn();\r\n            QString str = QString(ts - col % ts, QLatin1Char(' '));\r\n            insertText(str);\r\n        } else {\r\n            insertInInsertMode(input.raw());\r\n        }\r\n        m_buffer->insertState.insertingSpaces = false;\r\n    } else if (input.isControl('d')) {\r\n        // remove one level of indentation from the current line\r\n        int shift = config(ConfigShiftWidth).toInt();\r\n        int tab = config(ConfigTabStop).toInt();\r\n        int line = cursorLine() + 1;\r\n        int pos = firstPositionInLine(line);\r\n        QString text = lineContents(line);\r\n        int amount = 0;\r\n        int i = 0;\r\n        for (; i < text.size() && amount < shift; ++i) {\r\n            if (text.at(i) == QLatin1Char(' '))\r\n                ++amount;\r\n            else if (text.at(i) == QLatin1Char('\\t'))\r\n                amount += tab; // FIXME: take position into consideration\r\n            else\r\n                break;\r\n        }\r\n        removeText(Range(pos, pos+i));\r\n    } else if (input.isControl('p') || input.isControl('n')) {\r\n        QTextCursor tc = m_cursor;\r\n        moveToNextWordStart(1, false, false);\r\n        QString str = selectText(Range(position(), tc.position()));\r\n        m_cursor = tc;\r\n        emit q->simpleCompletionRequested(str, input.isControl('n'));\r\n    } else if (input.isShift(Qt::Key_Insert)) {\r\n        // Insert text from clipboard.\r\n        QClipboard *clipboard = QApplication::clipboard();\r\n        const QMimeData *data = clipboard->mimeData();\r\n        if (data && data->hasText())\r\n            insertInInsertMode(data->text());\r\n    } else {\r\n        m_buffer->insertState.insertingSpaces = input.isKey(Key_Space);\r\n        if (!handleInsertInEditor(input)) {\r\n            const QString toInsert = input.text();\r\n            if (toInsert.isEmpty())\r\n                return;\r\n            insertInInsertMode(toInsert);\r\n        }\r\n        m_buffer->insertState.insertingSpaces = false;\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::insertInInsertMode(const QString &text)\r\n{\r\n    joinPreviousEditBlock();\r\n    insertText(text);\r\n    if (hasConfig(ConfigSmartIndent) && isElectricCharacter(text.at(0))) {\r\n        const QString leftText = block().text()\r\n               .left(position() - 1 - block().position());\r\n        if (leftText.simplified().isEmpty()) {\r\n            Range range(position(), position(), g.rangemode);\r\n            indentText(range, text.at(0));\r\n        }\r\n    }\r\n    setTargetColumn();\r\n    endEditBlock();\r\n    g.submode = NoSubMode;\r\n}\r\n\r\nbool FakeVimHandler::Private::startRecording(const Input &input)\r\n{\r\n    QChar reg = input.asChar();\r\n    if (reg == QLatin1Char('\"') || reg.isLetterOrNumber()) {\r\n        g.currentRegister = reg.unicode();\r\n        g.recording = QLatin1String(\"\");\r\n        return true;\r\n    }\r\n\r\n    return false;\r\n}\r\n\r\nvoid FakeVimHandler::Private::record(const Input &input)\r\n{\r\n    if ( !g.recording.isNull() )\r\n        g.recording.append(input.toString());\r\n}\r\n\r\nvoid FakeVimHandler::Private::stopRecording()\r\n{\r\n    // Remove q from end (stop recording command).\r\n    g.recording.remove(g.recording.size() - 1, 1);\r\n    setRegister(g.currentRegister, g.recording, g.rangemode);\r\n    g.currentRegister = 0;\r\n    g.recording = QString();\r\n}\r\n\r\nbool FakeVimHandler::Private::executeRegister(int reg)\r\n{\r\n    QChar regChar(reg);\r\n\r\n    // TODO: Prompt for an expression to execute if register is '='.\r\n    if (reg == '@' && g.lastExecutedRegister != 0)\r\n        reg = g.lastExecutedRegister;\r\n    else if (QString::fromLatin1(\"\\\".*+\").contains(regChar) || regChar.isLetterOrNumber())\r\n        g.lastExecutedRegister = reg;\r\n    else\r\n        return false;\r\n\r\n    // FIXME: In Vim it's possible to interrupt recursive macro with <C-c>.\r\n    //        One solution may be to call QApplication::processEvents() and check if <C-c> was\r\n    //        used when a mapping is active.\r\n    // According to Vim, register is executed like mapping.\r\n    prependMapping(Inputs(registerContents(reg), false, false));\r\n\r\n    return true;\r\n}\r\n\r\nEventResult FakeVimHandler::Private::handleExMode(const Input &input)\r\n{\r\n    if (input.isEscape()) {\r\n        g.commandBuffer.clear();\r\n        resetCommandMode();\r\n        g.submode = NoSubMode;\r\n    } else if (g.submode == CtrlVSubMode) {\r\n        g.commandBuffer.insertChar(input.raw());\r\n        g.submode = NoSubMode;\r\n    } else if (input.isControl('v')) {\r\n        g.submode = CtrlVSubMode;\r\n        g.subsubmode = NoSubSubMode;\r\n        return EventHandled;\r\n    } else if (input.isBackspace()) {\r\n        if (g.commandBuffer.isEmpty()) {\r\n            leaveVisualMode();\r\n            resetCommandMode();\r\n        } else if (g.commandBuffer.hasSelection()) {\r\n            g.commandBuffer.deleteSelected();\r\n        } else {\r\n            g.commandBuffer.deleteChar();\r\n        }\r\n    } else if (input.isKey(Key_Tab)) {\r\n        // FIXME: Complete actual commands.\r\n        g.commandBuffer.historyUp();\r\n    } else if (input.isReturn()) {\r\n        showMessage(MessageCommand, g.commandBuffer.display());\r\n        handleExCommand(g.commandBuffer.contents());\r\n        g.commandBuffer.clear();\r\n        if (m_textedit || m_plaintextedit)\r\n            leaveVisualMode();\r\n    } else if (!g.commandBuffer.handleInput(input)) {\r\n        qDebug() << \"IGNORED IN EX-MODE: \" << input.key() << input.text();\r\n        return EventUnhandled;\r\n    }\r\n    updateMiniBuffer();\r\n    return EventHandled;\r\n}\r\n\r\nEventResult FakeVimHandler::Private::handleSearchSubSubMode(const Input &input)\r\n{\r\n    EventResult handled = EventHandled;\r\n\r\n    if (input.isEscape()) {\r\n        g.currentMessage.clear();\r\n        setPosition(m_searchStartPosition);\r\n        scrollToLine(m_searchFromScreenLine);\r\n    } else if (input.isBackspace()) {\r\n        if (g.searchBuffer.isEmpty())\r\n            resetCommandMode();\r\n        else\r\n            g.searchBuffer.deleteChar();\r\n    } else if (input.isReturn()) {\r\n        const QString &needle = g.searchBuffer.contents();\r\n        if (!needle.isEmpty())\r\n            g.lastSearch = needle;\r\n        else\r\n            g.searchBuffer.setContents(g.lastSearch);\r\n\r\n        updateFind(true);\r\n\r\n        if (finishSearch()) {\r\n            if (g.submode != NoSubMode)\r\n                finishMovement(g.searchBuffer.prompt() + g.lastSearch + QLatin1Char('\\n'));\r\n            if (g.currentMessage.isEmpty())\r\n                showMessage(MessageCommand, g.searchBuffer.display());\r\n        } else {\r\n            handled = EventCancelled; // Not found so cancel mapping if any.\r\n        }\r\n    } else if (input.isKey(Key_Tab)) {\r\n        g.searchBuffer.insertChar(QChar(9));\r\n    } else if (!g.searchBuffer.handleInput(input)) {\r\n        //qDebug() << \"IGNORED IN SEARCH MODE: \" << input.key() << input.text();\r\n        return EventUnhandled;\r\n    }\r\n\r\n    if (input.isReturn() || input.isEscape()) {\r\n        g.searchBuffer.clear();\r\n        resetCommandMode();\r\n        updateMiniBuffer();\r\n    } else {\r\n        updateMiniBuffer();\r\n        updateFind(false);\r\n    }\r\n\r\n    return handled;\r\n}\r\n\r\n// This uses 0 based line counting (hidden lines included).\r\nint FakeVimHandler::Private::parseLineAddress(QString *cmd)\r\n{\r\n    //qDebug() << \"CMD: \" << cmd;\r\n    if (cmd->isEmpty())\r\n        return -1;\r\n\r\n    int result = -1;\r\n    QChar c = cmd->at(0);\r\n    if (c == QLatin1Char('.')) { // current line\r\n        result = cursorBlockNumber();\r\n        cmd->remove(0, 1);\r\n    } else if (c == QLatin1Char('$')) { // last line\r\n        result = document()->blockCount() - 1;\r\n        cmd->remove(0, 1);\r\n    } else if (c == QLatin1Char('\\'')) { // mark\r\n        cmd->remove(0, 1);\r\n        if (cmd->isEmpty()) {\r\n            showMessage(MessageError, msgMarkNotSet(QString()));\r\n            return -1;\r\n        }\r\n        c = cmd->at(0);\r\n        Mark m = mark(c);\r\n        if (!m.isValid() || !m.isLocal(m_currentFileName)) {\r\n            showMessage(MessageError, msgMarkNotSet(c));\r\n            return -1;\r\n        }\r\n        cmd->remove(0, 1);\r\n        result = m.position(document()).line;\r\n    } else if (c.isDigit()) { // line with given number\r\n        result = 0;\r\n    } else if (c == QLatin1Char('-') || c == QLatin1Char('+')) { // add or subtract from current line number\r\n        result = cursorBlockNumber();\r\n    } else if (c == QLatin1Char('/') || c == QLatin1Char('?')\r\n        || (c == QLatin1Char('\\\\') && cmd->size() > 1 && QString::fromLatin1(\"/?&\").contains(cmd->at(1)))) {\r\n        // search for expression\r\n        SearchData sd;\r\n        if (c == QLatin1Char('/') || c == QLatin1Char('?')) {\r\n            const int end = findUnescaped(c, *cmd, 1);\r\n            if (end == -1)\r\n                return -1;\r\n            sd.needle = cmd->mid(1, end - 1);\r\n            cmd->remove(0, end + 1);\r\n        } else {\r\n            c = cmd->at(1);\r\n            cmd->remove(0, 2);\r\n            sd.needle = (c == QLatin1Char('&')) ? g.lastSubstitutePattern : g.lastSearch;\r\n        }\r\n        sd.forward = (c != QLatin1Char('?'));\r\n        const QTextBlock b = block();\r\n        const int pos = b.position() + (sd.forward ? b.length() - 1 : 0);\r\n        QTextCursor tc = search(sd, pos, 1, true);\r\n        g.lastSearch = sd.needle;\r\n        if (tc.isNull())\r\n            return -1;\r\n        result = tc.block().blockNumber();\r\n    } else {\r\n        return cursorBlockNumber();\r\n    }\r\n\r\n    // basic arithmetic (\"-3+5\" or \"++\" means \"+2\" etc.)\r\n    int n = 0;\r\n    bool add = true;\r\n    int i = 0;\r\n    for (; i < cmd->size(); ++i) {\r\n        c = cmd->at(i);\r\n        if (c == QLatin1Char('-') || c == QLatin1Char('+')) {\r\n            if (n != 0)\r\n                result = result + (add ? n - 1 : -(n - 1));\r\n            add = c == QLatin1Char('+');\r\n            result = result + (add ? 1 : -1);\r\n            n = 0;\r\n        } else if (c.isDigit()) {\r\n            n = n * 10 + c.digitValue();\r\n        } else if (!c.isSpace()) {\r\n            break;\r\n        }\r\n    }\r\n    if (n != 0)\r\n        result = result + (add ? n - 1 : -(n - 1));\r\n    *cmd = cmd->mid(i).trimmed();\r\n\r\n    return result;\r\n}\r\n\r\nvoid FakeVimHandler::Private::setCurrentRange(const Range &range)\r\n{\r\n    setAnchorAndPosition(range.beginPos, range.endPos);\r\n    g.rangemode = range.rangemode;\r\n}\r\n\r\nbool FakeVimHandler::Private::parseExCommmand(QString *line, ExCommand *cmd)\r\n{\r\n    *cmd = ExCommand();\r\n    if (line->isEmpty())\r\n        return false;\r\n\r\n    // parse range first\r\n    if (!parseLineRange(line, cmd))\r\n        return false;\r\n\r\n    // get first command from command line\r\n    QChar close;\r\n    bool subst = false;\r\n    int i = 0;\r\n    for (; i < line->size(); ++i) {\r\n        const QChar &c = line->at(i);\r\n        if (c == QLatin1Char('\\\\')) {\r\n            ++i; // skip escaped character\r\n        } else if (close.isNull()) {\r\n            if (c == QLatin1Char('|')) {\r\n                // split on |\r\n                break;\r\n            } else if (c == QLatin1Char('/')) {\r\n                subst = i > 0 && (line->at(i - 1) == QLatin1Char('s'));\r\n                close = c;\r\n            } else if (c == QLatin1Char('\"') || c == QLatin1Char('\\'')) {\r\n                close = c;\r\n            }\r\n        } else if (c == close) {\r\n            if (subst)\r\n                subst = false;\r\n            else\r\n                close = QChar();\r\n        }\r\n    }\r\n\r\n    cmd->cmd = line->mid(0, i).trimmed();\r\n\r\n    // command arguments starts with first non-letter character\r\n    cmd->args = cmd->cmd.section(QRegExp(_(\"(?=[^a-zA-Z])\")), 1);\r\n    if (!cmd->args.isEmpty()) {\r\n        cmd->cmd.chop(cmd->args.size());\r\n        cmd->args = cmd->args.trimmed();\r\n\r\n        // '!' at the end of command\r\n        cmd->hasBang = cmd->args.startsWith(QLatin1Char('!'));\r\n        if (cmd->hasBang)\r\n            cmd->args = cmd->args.mid(1).trimmed();\r\n    }\r\n\r\n    // remove the first command from command line\r\n    line->remove(0, i + 1);\r\n\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::parseLineRange(QString *line, ExCommand *cmd)\r\n{\r\n    // remove leading colons and spaces\r\n    line->remove(QRegExp(_(\"^\\\\s*(:+\\\\s*)*\")));\r\n\r\n    // special case ':!...' (use invalid range)\r\n    if (line->startsWith(QLatin1Char('!'))) {\r\n        cmd->range = Range();\r\n        return true;\r\n    }\r\n\r\n    // FIXME: that seems to be different for %w and %s\r\n    if (line->startsWith(QLatin1Char('%')))\r\n        line->replace(0, 1, _(\"1,$\"));\r\n\r\n    int beginLine = parseLineAddress(line);\r\n    int endLine;\r\n    if (line->startsWith(QLatin1Char(','))) {\r\n        *line = line->mid(1).trimmed();\r\n        endLine = parseLineAddress(line);\r\n    } else {\r\n        endLine = beginLine;\r\n    }\r\n    if (beginLine == -1 || endLine == -1)\r\n        return false;\r\n\r\n    const int beginPos = firstPositionInLine(qMin(beginLine, endLine) + 1, false);\r\n    const int endPos = lastPositionInLine(qMax(beginLine, endLine) + 1, false);\r\n    cmd->range = Range(beginPos, endPos, RangeLineMode);\r\n    cmd->count = beginLine;\r\n\r\n    return true;\r\n}\r\n\r\nvoid FakeVimHandler::Private::parseRangeCount(const QString &line, Range *range) const\r\n{\r\n    bool ok;\r\n    const int count = qAbs(line.trimmed().toInt(&ok));\r\n    if (ok) {\r\n        const int beginLine = document()->findBlock(range->endPos).blockNumber() + 1;\r\n        const int endLine = qMin(beginLine + count - 1, document()->blockCount());\r\n        range->beginPos = firstPositionInLine(beginLine, false);\r\n        range->endPos = lastPositionInLine(endLine, false);\r\n    }\r\n}\r\n\r\n// use handleExCommand for invoking commands that might move the cursor\r\nvoid FakeVimHandler::Private::handleCommand(const QString &cmd)\r\n{\r\n    handleExCommand(cmd);\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExSubstituteCommand(const ExCommand &cmd)\r\n{\r\n    // :substitute\r\n    if (!cmd.matches(_(\"s\"), _(\"substitute\"))\r\n        && !(cmd.cmd.isEmpty() && !cmd.args.isEmpty() && QString::fromLatin1(\"&~\").contains(cmd.args[0]))) {\r\n        return false;\r\n    }\r\n\r\n    int count = 1;\r\n    QString line = cmd.args;\r\n    const int countIndex = line.lastIndexOf(QRegExp(_(\"\\\\d+$\")));\r\n    if (countIndex != -1) {\r\n        count = line.mid(countIndex).toInt();\r\n        line = line.mid(0, countIndex).trimmed();\r\n    }\r\n\r\n    if (cmd.cmd.isEmpty()) {\r\n        // keep previous substitution flags on '&&' and '~&'\r\n        if (line.size() > 1 && line[1] == QLatin1Char('&'))\r\n            g.lastSubstituteFlags += line.mid(2);\r\n        else\r\n            g.lastSubstituteFlags = line.mid(1);\r\n        if (line[0] == QLatin1Char('~'))\r\n            g.lastSubstitutePattern = g.lastSearch;\r\n    } else {\r\n        if (line.isEmpty()) {\r\n            g.lastSubstituteFlags.clear();\r\n        } else {\r\n            // we have /{pattern}/{string}/[flags]  now\r\n            const QChar separator = line.at(0);\r\n            int pos1 = findUnescaped(separator, line, 1);\r\n            if (pos1 == -1)\r\n                return false;\r\n            int pos2 = findUnescaped(separator, line, pos1 + 1);\r\n            if (pos2 == -1)\r\n                pos2 = line.size();\r\n\r\n            g.lastSubstitutePattern = line.mid(1, pos1 - 1);\r\n            g.lastSubstituteReplacement = line.mid(pos1 + 1, pos2 - pos1 - 1);\r\n            g.lastSubstituteFlags = line.mid(pos2 + 1);\r\n        }\r\n    }\r\n\r\n    count = qMax(1, count);\r\n    QString needle = g.lastSubstitutePattern;\r\n\r\n    if (g.lastSubstituteFlags.contains(QLatin1Char('i')))\r\n        needle.prepend(_(\"\\\\c\"));\r\n\r\n    QRegExp pattern = vimPatternToQtPattern(needle, hasConfig(ConfigIgnoreCase),\r\n                                            hasConfig(ConfigSmartCase));\r\n\r\n    QTextBlock lastBlock;\r\n    QTextBlock firstBlock;\r\n    const bool global = g.lastSubstituteFlags.contains(QLatin1Char('g'));\r\n    for (int a = 0; a != count; ++a) {\r\n        for (QTextBlock block = document()->findBlock(cmd.range.endPos);\r\n            block.isValid() && block.position() + block.length() > cmd.range.beginPos;\r\n            block = block.previous()) {\r\n            QString text = block.text();\r\n            if (substituteText(&text, pattern, g.lastSubstituteReplacement, global)) {\r\n                firstBlock = block;\r\n                if (!lastBlock.isValid()) {\r\n                    lastBlock = block;\r\n                    beginEditBlock();\r\n                }\r\n                QTextCursor tc = m_cursor;\r\n                const int pos = block.position();\r\n                const int anchor = pos + block.length() - 1;\r\n                tc.setPosition(anchor);\r\n                tc.setPosition(pos, KeepAnchor);\r\n                tc.insertText(text);\r\n            }\r\n        }\r\n    }\r\n\r\n    if (lastBlock.isValid()) {\r\n        m_buffer->undoState.position = CursorPosition(firstBlock.blockNumber(), 0);\r\n\r\n        leaveVisualMode();\r\n        setPosition(lastBlock.position());\r\n        setAnchor();\r\n        moveToFirstNonBlankOnLine();\r\n        setTargetColumn();\r\n\r\n        endEditBlock();\r\n    }\r\n\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExMapCommand(const ExCommand &cmd0) // :map\r\n{\r\n    QByteArray modes;\r\n    enum Type { Map, Noremap, Unmap } type;\r\n\r\n    QByteArray cmd = cmd0.cmd.toLatin1();\r\n\r\n    // Strange formatting. But everything else is even uglier.\r\n    if (cmd == \"map\") { modes = \"nvo\"; type = Map; } else\r\n    if (cmd == \"nm\" || cmd == \"nmap\") { modes = \"n\"; type = Map; } else\r\n    if (cmd == \"vm\" || cmd == \"vmap\") { modes = \"v\"; type = Map; } else\r\n    if (cmd == \"xm\" || cmd == \"xmap\") { modes = \"x\"; type = Map; } else\r\n    if (cmd == \"smap\") { modes = \"s\"; type = Map; } else\r\n    if (cmd == \"omap\") { modes = \"o\"; type = Map; } else\r\n    if (cmd == \"map!\") { modes = \"ic\"; type = Map; } else\r\n    if (cmd == \"im\" || cmd == \"imap\") { modes = \"i\"; type = Map; } else\r\n    if (cmd == \"lm\" || cmd == \"lmap\") { modes = \"l\"; type = Map; } else\r\n    if (cmd == \"cm\" || cmd == \"cmap\") { modes = \"c\"; type = Map; } else\r\n\r\n    if (cmd == \"no\" || cmd == \"noremap\") { modes = \"nvo\"; type = Noremap; } else\r\n    if (cmd == \"nn\" || cmd == \"nnoremap\") { modes = \"n\"; type = Noremap; } else\r\n    if (cmd == \"vn\" || cmd == \"vnoremap\") { modes = \"v\"; type = Noremap; } else\r\n    if (cmd == \"xn\" || cmd == \"xnoremap\") { modes = \"x\"; type = Noremap; } else\r\n    if (cmd == \"snor\" || cmd == \"snoremap\") { modes = \"s\"; type = Noremap; } else\r\n    if (cmd == \"ono\" || cmd == \"onoremap\") { modes = \"o\"; type = Noremap; } else\r\n    if (cmd == \"no!\" || cmd == \"noremap!\") { modes = \"ic\"; type = Noremap; } else\r\n    if (cmd == \"ino\" || cmd == \"inoremap\") { modes = \"i\"; type = Noremap; } else\r\n    if (cmd == \"ln\" || cmd == \"lnoremap\") { modes = \"l\"; type = Noremap; } else\r\n    if (cmd == \"cno\" || cmd == \"cnoremap\") { modes = \"c\"; type = Noremap; } else\r\n\r\n    if (cmd == \"unm\" || cmd == \"unmap\") { modes = \"nvo\"; type = Unmap; } else\r\n    if (cmd == \"nun\" || cmd == \"nunmap\") { modes = \"n\"; type = Unmap; } else\r\n    if (cmd == \"vu\" || cmd == \"vunmap\") { modes = \"v\"; type = Unmap; } else\r\n    if (cmd == \"xu\" || cmd == \"xunmap\") { modes = \"x\"; type = Unmap; } else\r\n    if (cmd == \"sunm\" || cmd == \"sunmap\") { modes = \"s\"; type = Unmap; } else\r\n    if (cmd == \"ou\" || cmd == \"ounmap\") { modes = \"o\"; type = Unmap; } else\r\n    if (cmd == \"unm!\" || cmd == \"unmap!\") { modes = \"ic\"; type = Unmap; } else\r\n    if (cmd == \"iu\" || cmd == \"iunmap\") { modes = \"i\"; type = Unmap; } else\r\n    if (cmd == \"lu\" || cmd == \"lunmap\") { modes = \"l\"; type = Unmap; } else\r\n    if (cmd == \"cu\" || cmd == \"cunmap\") { modes = \"c\"; type = Unmap; }\r\n\r\n    else\r\n        return false;\r\n\r\n    QString args = cmd0.args;\r\n    bool silent = false;\r\n    bool unique = false;\r\n    forever {\r\n        if (eatString(\"<silent>\", &args)) {\r\n            silent = true;\r\n        } else if (eatString(\"<unique>\", &args)) {\r\n            continue;\r\n        } else if (eatString(\"<special>\", &args)) {\r\n            continue;\r\n        } else if (eatString(\"<buffer>\", &args)) {\r\n            notImplementedYet();\r\n            continue;\r\n        } else if (eatString(\"<script>\", &args)) {\r\n            notImplementedYet();\r\n            continue;\r\n        } else if (eatString(\"<expr>\", &args)) {\r\n            notImplementedYet();\r\n            return true;\r\n        }\r\n        break;\r\n    }\r\n\r\n    const QString lhs = args.section(QRegExp(_(\"\\\\s+\")), 0, 0);\r\n    const QString rhs = args.section(QRegExp(_(\"\\\\s+\")), 1);\r\n    if ((rhs.isNull() && type != Unmap) || (!rhs.isNull() && type == Unmap)) {\r\n        // FIXME: Dump mappings here.\r\n        //qDebug() << g.mappings;\r\n        return true;\r\n    }\r\n\r\n    Inputs key(lhs);\r\n    //qDebug() << \"MAPPING: \" << modes << lhs << rhs;\r\n    switch (type) {\r\n        case Unmap:\r\n            foreach (char c, modes)\r\n                MappingsIterator(&g.mappings, c, key).remove();\r\n            break;\r\n        case Map: // fall through\r\n        case Noremap: {\r\n            Inputs inputs(rhs, type == Noremap, silent);\r\n            foreach (char c, modes)\r\n                MappingsIterator(&g.mappings, c).setInputs(key, inputs, unique);\r\n            break;\r\n        }\r\n    }\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExHistoryCommand(const ExCommand &cmd)\r\n{\r\n    // :his[tory]\r\n    if (!cmd.matches(_(\"his\"), _(\"history\")))\r\n        return false;\r\n\r\n    if (cmd.args.isEmpty()) {\r\n        QString info;\r\n        info += _(\"#  command history\\n\");\r\n        int i = 0;\r\n        foreach (const QString &item, g.commandBuffer.historyItems()) {\r\n            ++i;\r\n            info += QString::fromLatin1(\"%1 %2\\n\").arg(i, -8).arg(item);\r\n        }\r\n        emit q->extraInformationChanged(info);\r\n    } else {\r\n        notImplementedYet();\r\n    }\r\n    updateMiniBuffer();\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExRegisterCommand(const ExCommand &cmd)\r\n{\r\n    // :reg[isters] and :di[splay]\r\n    if (!cmd.matches(_(\"reg\"), _(\"registers\")) && !cmd.matches(_(\"di\"), _(\"display\")))\r\n        return false;\r\n\r\n    QByteArray regs = cmd.args.toLatin1();\r\n    if (regs.isEmpty()) {\r\n        regs = \"\\\"0123456789\";\r\n        QHashIterator<int, Register> it(g.registers);\r\n        while (it.hasNext()) {\r\n            it.next();\r\n            if (it.key() > '9')\r\n                regs += char(it.key());\r\n        }\r\n    }\r\n    QString info;\r\n    info += _(\"--- Registers ---\\n\");\r\n    foreach (char reg, regs) {\r\n        QString value = quoteUnprintable(registerContents(reg));\r\n        info += QString::fromLatin1(\"\\\"%1   %2\\n\").arg(reg).arg(value);\r\n    }\r\n    emit q->extraInformationChanged(info);\r\n    updateMiniBuffer();\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExSetCommand(const ExCommand &cmd)\r\n{\r\n    // :se[t]\r\n    if (!cmd.matches(_(\"se\"), _(\"set\")))\r\n        return false;\r\n\r\n    clearMessage();\r\n    QTC_CHECK(!cmd.args.isEmpty()); // Handled by plugin.\r\n\r\n    if (cmd.args.contains(QLatin1Char('='))) {\r\n        // Non-boolean config to set.\r\n        int p = cmd.args.indexOf(QLatin1Char('='));\r\n        QString error = theFakeVimSettings()\r\n                ->trySetValue(cmd.args.left(p), cmd.args.mid(p + 1));\r\n        if (!error.isEmpty())\r\n            showMessage(MessageError, error);\r\n    } else {\r\n        QString optionName = cmd.args;\r\n\r\n        bool toggleOption = optionName.endsWith(QLatin1Char('!'));\r\n        bool printOption = !toggleOption && optionName.endsWith(QLatin1Char('?'));\r\n        if (printOption || toggleOption)\r\n            optionName.chop(1);\r\n\r\n        bool negateOption = optionName.startsWith(_(\"no\"));\r\n        if (negateOption)\r\n            optionName.remove(0, 2);\r\n\r\n        SavedAction *act = theFakeVimSettings()->item(optionName);\r\n        if (!act) {\r\n            showMessage(MessageError, FakeVimHandler::tr(\"Unknown option:\")\r\n                        + QLatin1Char(' ') + cmd.args);\r\n        } else if (act->defaultValue().type() == QVariant::Bool) {\r\n            bool oldValue = act->value().toBool();\r\n            if (printOption) {\r\n                showMessage(MessageInfo, (oldValue ? _(\"\") : _(\"no\"))\r\n                            + act->settingsKey().toLower());\r\n            } else if (toggleOption || negateOption == oldValue) {\r\n                act->setValue(!oldValue);\r\n            }\r\n        } else if (negateOption && !printOption) {\r\n            showMessage(MessageError, FakeVimHandler::tr(\"Invalid argument:\")\r\n                        + QLatin1Char(' ') + cmd.args);\r\n        } else if (toggleOption) {\r\n            showMessage(MessageError, FakeVimHandler::tr(\"Trailing characters:\")\r\n                        + QLatin1Char(' ') + cmd.args);\r\n        } else {\r\n            showMessage(MessageInfo, act->settingsKey().toLower() + _(\"=\")\r\n                        + act->value().toString());\r\n        }\r\n    }\r\n    updateEditor();\r\n    updateHighlights();\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExNormalCommand(const ExCommand &cmd)\r\n{\r\n    // :norm[al]\r\n    if (!cmd.matches(_(\"norm\"), _(\"normal\")))\r\n        return false;\r\n    //qDebug() << \"REPLAY NORMAL: \" << quoteUnprintable(reNormal.cap(3));\r\n    replay(cmd.args);\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExYankDeleteCommand(const ExCommand &cmd)\r\n{\r\n    // :[range]d[elete] [x] [count]\r\n    // :[range]y[ank] [x] [count]\r\n    const bool remove = cmd.matches(_(\"d\"), _(\"delete\"));\r\n    if (!remove && !cmd.matches(_(\"y\"), _(\"yank\")))\r\n        return false;\r\n\r\n    // get register from arguments\r\n    const bool hasRegisterArg = !cmd.args.isEmpty() && !cmd.args.at(0).isDigit();\r\n    const int r = hasRegisterArg ? cmd.args.at(0).unicode() : m_register;\r\n\r\n    // get [count] from arguments\r\n    Range range = cmd.range;\r\n    parseRangeCount(cmd.args.mid(hasRegisterArg ? 1 : 0).trimmed(), &range);\r\n\r\n    yankText(range, r);\r\n\r\n    if (remove) {\r\n        leaveVisualMode();\r\n        setPosition(range.beginPos);\r\n        pushUndoState();\r\n        setCurrentRange(range);\r\n        removeText(currentRange());\r\n    }\r\n\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExChangeCommand(const ExCommand &cmd)\r\n{\r\n    // :[range]c[hange]\r\n    if (!cmd.matches(_(\"c\"), _(\"change\")))\r\n        return false;\r\n\r\n    Range range = cmd.range;\r\n    range.rangemode = RangeLineModeExclusive;\r\n    removeText(range);\r\n    insertAutomaticIndentation(true, cmd.hasBang);\r\n\r\n    // FIXME: In Vim same or less number of lines can be inserted and position after insertion is\r\n    //        beginning of last inserted line.\r\n    enterInsertMode();\r\n\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExMoveCommand(const ExCommand &cmd)\r\n{\r\n    // :[range]m[ove] {address}\r\n    if (!cmd.matches(_(\"m\"), _(\"move\")))\r\n        return false;\r\n\r\n    QString lineCode = cmd.args;\r\n\r\n    const int startLine = document()->findBlock(cmd.range.beginPos).blockNumber();\r\n    const int endLine = document()->findBlock(cmd.range.endPos).blockNumber();\r\n    const int lines = endLine - startLine + 1;\r\n\r\n    int targetLine = lineCode == _(\"0\") ? -1 : parseLineAddress(&lineCode);\r\n    if (targetLine >= startLine && targetLine < endLine) {\r\n        showMessage(MessageError, FakeVimHandler::tr(\"Move lines into themselves.\"));\r\n        return true;\r\n    }\r\n\r\n    CursorPosition lastAnchor = markLessPosition();\r\n    CursorPosition lastPosition = markGreaterPosition();\r\n\r\n    recordJump();\r\n    setPosition(cmd.range.beginPos);\r\n    pushUndoState();\r\n\r\n    setCurrentRange(cmd.range);\r\n    QString text = selectText(cmd.range);\r\n    removeText(currentRange());\r\n\r\n    const bool insertAtEnd = targetLine == document()->blockCount();\r\n    if (targetLine >= startLine)\r\n        targetLine -= lines;\r\n    QTextBlock block = document()->findBlockByNumber(insertAtEnd ? targetLine : targetLine + 1);\r\n    setPosition(block.position());\r\n    setAnchor();\r\n\r\n    if (insertAtEnd) {\r\n        moveBehindEndOfLine();\r\n        text.chop(1);\r\n        insertText(QString::fromLatin1(\"\\n\"));\r\n    }\r\n    insertText(text);\r\n\r\n    if (!insertAtEnd)\r\n        moveUp(1);\r\n    if (hasConfig(ConfigStartOfLine))\r\n        moveToFirstNonBlankOnLine();\r\n\r\n    // correct last selection\r\n    leaveVisualMode();\r\n    if (lastAnchor.line >= startLine && lastAnchor.line <= endLine)\r\n        lastAnchor.line += targetLine - startLine + 1;\r\n    if (lastPosition.line >= startLine && lastPosition.line <= endLine)\r\n        lastPosition.line += targetLine - startLine + 1;\r\n    setMark(QLatin1Char('<'), lastAnchor);\r\n    setMark(QLatin1Char('>'), lastPosition);\r\n\r\n    if (lines > 2)\r\n        showMessage(MessageInfo, FakeVimHandler::tr(\"%n lines moved.\", 0, lines));\r\n\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExJoinCommand(const ExCommand &cmd)\r\n{\r\n    // :[range]j[oin][!] [count]\r\n    // FIXME: Argument [count] can follow immediately.\r\n    if (!cmd.matches(_(\"j\"), _(\"join\")))\r\n        return false;\r\n\r\n    // get [count] from arguments\r\n    bool ok;\r\n    int count = cmd.args.toInt(&ok);\r\n\r\n    if (ok) {\r\n        setPosition(cmd.range.endPos);\r\n    } else {\r\n        setPosition(cmd.range.beginPos);\r\n        const int startLine = document()->findBlock(cmd.range.beginPos).blockNumber();\r\n        const int endLine = document()->findBlock(cmd.range.endPos).blockNumber();\r\n        count = endLine - startLine + 1;\r\n    }\r\n\r\n    moveToStartOfLine();\r\n    pushUndoState();\r\n    joinLines(count, cmd.hasBang);\r\n\r\n    moveToFirstNonBlankOnLine();\r\n\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExWriteCommand(const ExCommand &cmd)\r\n{\r\n    // :w, :x, :wq, ...\r\n    //static QRegExp reWrite(\"^[wx]q?a?!?( (.*))?$\");\r\n    if (cmd.cmd != _(\"w\") && cmd.cmd != _(\"x\") && cmd.cmd != _(\"wq\"))\r\n        return false;\r\n\r\n    int beginLine = lineForPosition(cmd.range.beginPos);\r\n    int endLine = lineForPosition(cmd.range.endPos);\r\n    const bool noArgs = (beginLine == -1);\r\n    if (beginLine == -1)\r\n        beginLine = 0;\r\n    if (endLine == -1)\r\n        endLine = linesInDocument();\r\n    //qDebug() << \"LINES: \" << beginLine << endLine;\r\n    //QString prefix = cmd.args;\r\n    const bool forced = cmd.hasBang;\r\n    //const bool quit = prefix.contains(QLatin1Char('q')) || prefix.contains(QLatin1Char('x'));\r\n    //const bool quitAll = quit && prefix.contains(QLatin1Char('a'));\r\n    QString fileName = cmd.args;\r\n    if (fileName.isEmpty())\r\n        fileName = m_currentFileName;\r\n    QFile file1(fileName);\r\n    const bool exists = file1.exists();\r\n    if (exists && !forced && !noArgs) {\r\n        showMessage(MessageError, FakeVimHandler::tr\r\n            (\"File \\\"%1\\\" exists (add ! to override)\").arg(fileName));\r\n    } else if (file1.open(QIODevice::ReadWrite)) {\r\n        // Nobody cared, so act ourselves.\r\n        file1.close();\r\n        Range range(firstPositionInLine(beginLine),\r\n            firstPositionInLine(endLine), RangeLineMode);\r\n        QString contents = selectText(range);\r\n        QFile::remove(fileName);\r\n        QFile file2(fileName);\r\n        if (file2.open(QIODevice::ReadWrite)) {\r\n            QTextStream ts(&file2);\r\n            ts << contents;\r\n        } else {\r\n            showMessage(MessageError, FakeVimHandler::tr\r\n               (\"Cannot open file \\\"%1\\\" for writing\").arg(fileName));\r\n        }\r\n        // Check result by reading back.\r\n        QFile file3(fileName);\r\n        file3.open(QIODevice::ReadOnly);\r\n        QByteArray ba = file3.readAll();\r\n        showMessage(MessageInfo, FakeVimHandler::tr(\"\\\"%1\\\" %2 %3L, %4C written.\")\r\n            .arg(fileName).arg(exists ? _(\" \") : tr(\" [New] \"))\r\n            .arg(ba.count('\\n')).arg(ba.size()));\r\n        //if (quitAll)\r\n        //    passUnknownExCommand(forced ? \"qa!\" : \"qa\");\r\n        //else if (quit)\r\n        //    passUnknownExCommand(forced ? \"q!\" : \"q\");\r\n    } else {\r\n        showMessage(MessageError, FakeVimHandler::tr\r\n            (\"Cannot open file \\\"%1\\\" for reading\").arg(fileName));\r\n    }\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExReadCommand(const ExCommand &cmd)\r\n{\r\n    // :r[ead]\r\n    if (!cmd.matches(_(\"r\"), _(\"read\")))\r\n        return false;\r\n\r\n    beginEditBlock();\r\n\r\n    moveToStartOfLine();\r\n    setTargetColumn();\r\n    moveDown();\r\n    int pos = position();\r\n\r\n    m_currentFileName = cmd.args;\r\n    QFile file(m_currentFileName);\r\n    file.open(QIODevice::ReadOnly);\r\n    QTextStream ts(&file);\r\n    QString data = ts.readAll();\r\n    insertText(data);\r\n\r\n    setAnchorAndPosition(pos, pos);\r\n\r\n    endEditBlock();\r\n\r\n    showMessage(MessageInfo, FakeVimHandler::tr(\"\\\"%1\\\" %2L, %3C\")\r\n        .arg(m_currentFileName).arg(data.count(QLatin1Char('\\n'))).arg(data.size()));\r\n\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExBangCommand(const ExCommand &cmd) // :!\r\n{\r\n    if (!cmd.cmd.isEmpty() || !cmd.hasBang)\r\n        return false;\r\n\r\n    bool replaceText = cmd.range.isValid();\r\n    const QString command = QString(cmd.cmd.mid(1) + QLatin1Char(' ') + cmd.args).trimmed();\r\n    const QString input = replaceText ? selectText(cmd.range) : QString();\r\n\r\n    const QString result = getProcessOutput(command, input);\r\n\r\n    if (replaceText) {\r\n        setCurrentRange(cmd.range);\r\n        int targetPosition = firstPositionInLine(lineForPosition(cmd.range.beginPos));\r\n        beginEditBlock();\r\n        removeText(currentRange());\r\n        insertText(result);\r\n        setPosition(targetPosition);\r\n        endEditBlock();\r\n        leaveVisualMode();\r\n        //qDebug() << \"FILTER: \" << command;\r\n        showMessage(MessageInfo, FakeVimHandler::tr(\"%n lines filtered.\", 0,\r\n            input.count(QLatin1Char('\\n'))));\r\n    } else if (!result.isEmpty()) {\r\n        emit q->extraInformationChanged(result);\r\n    }\r\n\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExShiftCommand(const ExCommand &cmd)\r\n{\r\n    // :[range]{<|>}* [count]\r\n    if (!cmd.cmd.isEmpty() || (!cmd.args.startsWith(QLatin1Char('<')) && !cmd.args.startsWith(QLatin1Char('>'))))\r\n        return false;\r\n\r\n    const QChar c = cmd.args.at(0);\r\n\r\n    // get number of repetition\r\n    int repeat = 1;\r\n    int i = 1;\r\n    for (; i < cmd.args.size(); ++i) {\r\n        const QChar c2 = cmd.args.at(i);\r\n        if (c2 == c)\r\n            ++repeat;\r\n        else if (!c2.isSpace())\r\n            break;\r\n    }\r\n\r\n    // get [count] from arguments\r\n    Range range = cmd.range;\r\n    parseRangeCount(cmd.args.mid(i), &range);\r\n\r\n    setCurrentRange(range);\r\n    if (c == QLatin1Char('<'))\r\n        shiftRegionLeft(repeat);\r\n    else\r\n        shiftRegionRight(repeat);\r\n\r\n    leaveVisualMode();\r\n\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExNohlsearchCommand(const ExCommand &cmd)\r\n{\r\n    // :noh, :nohl, ..., :nohlsearch\r\n    if (cmd.cmd.size() < 3 || !QString(_(\"nohlsearch\")).startsWith(cmd.cmd))\r\n        return false;\r\n\r\n    g.highlightsCleared = true;\r\n    updateHighlights();\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExUndoRedoCommand(const ExCommand &cmd)\r\n{\r\n    // :undo\r\n    // :redo\r\n    bool undo = (cmd.cmd == _(\"u\") || cmd.cmd == _(\"un\") || cmd.cmd == _(\"undo\"));\r\n    if (!undo && cmd.cmd != _(\"red\") && cmd.cmd != _(\"redo\"))\r\n        return false;\r\n\r\n    undoRedo(undo);\r\n    updateMiniBuffer();\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExGotoCommand(const ExCommand &cmd)\r\n{\r\n    // :{address}\r\n    if (!cmd.cmd.isEmpty() || !cmd.args.isEmpty())\r\n        return false;\r\n\r\n    const int beginLine = lineForPosition(cmd.range.endPos);\r\n    setPosition(firstPositionInLine(beginLine));\r\n    clearMessage();\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExSourceCommand(const ExCommand &cmd)\r\n{\r\n    // :source\r\n    if (cmd.cmd != _(\"so\") && cmd.cmd != _(\"source\"))\r\n        return false;\r\n\r\n    QString fileName = cmd.args;\r\n    QFile file(fileName);\r\n    if (!file.open(QIODevice::ReadOnly)) {\r\n        showMessage(MessageError, FakeVimHandler::tr(\"Cannot open file %1\").arg(fileName));\r\n        return true;\r\n    }\r\n\r\n    bool inFunction = false;\r\n    QByteArray line;\r\n    while (!file.atEnd() || !line.isEmpty()) {\r\n        QByteArray nextline = !file.atEnd() ? file.readLine() : QByteArray();\r\n\r\n        //  remove comment\r\n        int i = nextline.lastIndexOf('\"');\r\n        if (i != -1)\r\n            nextline = nextline.remove(i, nextline.size() - i);\r\n\r\n        nextline = nextline.trimmed();\r\n\r\n        // multi-line command?\r\n        if (nextline.startsWith('\\\\')) {\r\n            line += nextline.mid(1);\r\n            continue;\r\n        }\r\n\r\n        if (line.startsWith(\"function\")) {\r\n            //qDebug() << \"IGNORING FUNCTION\" << line;\r\n            inFunction = true;\r\n        } else if (inFunction && line.startsWith(\"endfunction\")) {\r\n            inFunction = false;\r\n        } else if (!line.isEmpty() && !inFunction) {\r\n            //qDebug() << \"EXECUTING: \" << line;\r\n            ExCommand cmd;\r\n            QString commandLine = QString::fromLocal8Bit(line);\r\n            while (parseExCommmand(&commandLine, &cmd)) {\r\n                if (!handleExCommandHelper(cmd))\r\n                    break;\r\n            }\r\n        }\r\n\r\n        line = nextline;\r\n    }\r\n    file.close();\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExEchoCommand(const ExCommand &cmd)\r\n{\r\n    // :echo\r\n    if (cmd.cmd != _(\"echo\"))\r\n        return false;\r\n    showMessage(MessageInfo, cmd.args);\r\n    return true;\r\n}\r\n\r\nvoid FakeVimHandler::Private::handleExCommand(const QString &line0)\r\n{\r\n    QString line = line0; // Make sure we have a copy to prevent aliasing.\r\n\r\n    if (line.endsWith(QLatin1Char('%'))) {\r\n        line.chop(1);\r\n        int percent = line.toInt();\r\n        setPosition(firstPositionInLine(percent * linesInDocument() / 100));\r\n        clearMessage();\r\n        return;\r\n    }\r\n\r\n    //qDebug() << \"CMD: \" << cmd;\r\n\r\n    enterCommandMode(g.returnToMode);\r\n\r\n    beginLargeEditBlock();\r\n    ExCommand cmd;\r\n    QString lastCommand = line;\r\n    while (parseExCommmand(&line, &cmd)) {\r\n        if (!handleExCommandHelper(cmd)) {\r\n            showMessage(MessageError, tr(\"Not an editor command: %1\").arg(lastCommand));\r\n            break;\r\n        }\r\n        lastCommand = line;\r\n    }\r\n\r\n    // if the last command closed the editor, we would crash here (:vs and then :on)\r\n    if (!(m_textedit || m_plaintextedit))\r\n        return;\r\n\r\n    endEditBlock();\r\n\r\n    resetCommandMode();\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExCommandHelper(ExCommand &cmd)\r\n{\r\n    return handleExPluginCommand(cmd)\r\n        || handleExGotoCommand(cmd)\r\n        || handleExBangCommand(cmd)\r\n        || handleExHistoryCommand(cmd)\r\n        || handleExRegisterCommand(cmd)\r\n        || handleExYankDeleteCommand(cmd)\r\n        || handleExChangeCommand(cmd)\r\n        || handleExMoveCommand(cmd)\r\n        || handleExJoinCommand(cmd)\r\n        || handleExMapCommand(cmd)\r\n        || handleExNohlsearchCommand(cmd)\r\n        || handleExNormalCommand(cmd)\r\n        || handleExReadCommand(cmd)\r\n        || handleExUndoRedoCommand(cmd)\r\n        || handleExSetCommand(cmd)\r\n        || handleExShiftCommand(cmd)\r\n        || handleExSourceCommand(cmd)\r\n        || handleExSubstituteCommand(cmd)\r\n        || handleExWriteCommand(cmd)\r\n        || handleExEchoCommand(cmd);\r\n}\r\n\r\nbool FakeVimHandler::Private::handleExPluginCommand(const ExCommand &cmd)\r\n{\r\n    bool handled = false;\r\n    int pos = m_cursor.position();\r\n    commitCursor();\r\n    emit q->handleExCommandRequested(&handled, cmd);\r\n    //qDebug() << \"HANDLER REQUEST: \" << cmd.cmd << handled;\r\n    if (handled && (m_textedit || m_plaintextedit)) {\r\n        pullCursor();\r\n        if (m_cursor.position() != pos)\r\n            recordJump(pos);\r\n    }\r\n    return handled;\r\n}\r\n\r\nvoid FakeVimHandler::Private::searchBalanced(bool forward, QChar needle, QChar other)\r\n{\r\n    int level = 1;\r\n    int pos = position();\r\n    const int npos = forward ? lastPositionInDocument() : 0;\r\n    while (true) {\r\n        if (forward)\r\n            ++pos;\r\n        else\r\n            --pos;\r\n        if (pos == npos)\r\n            return;\r\n        QChar c = document()->characterAt(pos);\r\n        if (c == other)\r\n            ++level;\r\n        else if (c == needle)\r\n            --level;\r\n        if (level == 0) {\r\n            const int oldLine = cursorLine() - cursorLineOnScreen();\r\n            // Making this unconditional feels better, but is not \"vim like\".\r\n            if (oldLine != cursorLine() - cursorLineOnScreen())\r\n                scrollToLine(cursorLine() - linesOnScreen() / 2);\r\n            recordJump();\r\n            setPosition(pos);\r\n            setTargetColumn();\r\n            return;\r\n        }\r\n    }\r\n}\r\n\r\nQTextCursor FakeVimHandler::Private::search(const SearchData &sd, int startPos, int count,\r\n    bool showMessages)\r\n{\r\n    QRegExp needleExp = vimPatternToQtPattern(sd.needle, hasConfig(ConfigIgnoreCase),\r\n                                              hasConfig(ConfigSmartCase));\r\n    if (!needleExp.isValid()) {\r\n        if (showMessages) {\r\n            QString error = needleExp.errorString();\r\n            showMessage(MessageError,\r\n                        FakeVimHandler::tr(\"Invalid regular expression: %1\").arg(error));\r\n        }\r\n        if (sd.highlightMatches)\r\n            highlightMatches(QString());\r\n        return QTextCursor();\r\n    }\r\n\r\n    int repeat = count;\r\n    const int pos = startPos + (sd.forward ? 1 : -1);\r\n\r\n    QTextCursor tc;\r\n    if (pos >= 0 && pos < document()->characterCount()) {\r\n        tc = QTextCursor(document());\r\n        tc.setPosition(pos);\r\n        if (sd.forward && afterEndOfLine(document(), pos))\r\n            tc.movePosition(Right);\r\n\r\n        if (!tc.isNull()) {\r\n            if (sd.forward)\r\n                searchForward(&tc, needleExp, &repeat);\r\n            else\r\n                searchBackward(&tc, needleExp, &repeat);\r\n        }\r\n    }\r\n\r\n    if (tc.isNull()) {\r\n        if (hasConfig(ConfigWrapScan)) {\r\n            tc = QTextCursor(document());\r\n            tc.movePosition(sd.forward ? StartOfDocument : EndOfDocument);\r\n            if (sd.forward)\r\n                searchForward(&tc, needleExp, &repeat);\r\n            else\r\n                searchBackward(&tc, needleExp, &repeat);\r\n            if (tc.isNull()) {\r\n                if (showMessages) {\r\n                    showMessage(MessageError,\r\n                        FakeVimHandler::tr(\"Pattern not found: %1\").arg(sd.needle));\r\n                }\r\n            } else if (showMessages) {\r\n                QString msg = sd.forward\r\n                    ? FakeVimHandler::tr(\"Search hit BOTTOM, continuing at TOP.\")\r\n                    : FakeVimHandler::tr(\"Search hit TOP, continuing at BOTTOM.\");\r\n                showMessage(MessageWarning, msg);\r\n            }\r\n        } else if (showMessages) {\r\n            QString msg = sd.forward\r\n                ? FakeVimHandler::tr(\"Search hit BOTTOM without match for: %1\")\r\n                : FakeVimHandler::tr(\"Search hit TOP without match for: %1\");\r\n            showMessage(MessageError, msg.arg(sd.needle));\r\n        }\r\n    }\r\n\r\n    if (sd.highlightMatches)\r\n        highlightMatches(needleExp.pattern());\r\n\r\n    return tc;\r\n}\r\n\r\nvoid FakeVimHandler::Private::search(const SearchData &sd, bool showMessages)\r\n{\r\n    const int oldLine = cursorLine() - cursorLineOnScreen();\r\n\r\n    QTextCursor tc = search(sd, m_searchStartPosition, count(), showMessages);\r\n    if (tc.isNull()) {\r\n        tc = m_cursor;\r\n        tc.setPosition(m_searchStartPosition);\r\n    }\r\n\r\n    if (isVisualMode()) {\r\n        int d = tc.anchor() - tc.position();\r\n        setPosition(tc.position() + d);\r\n    } else {\r\n        // Set Cursor. In contrast to the main editor we have the cursor\r\n        // position before the anchor position.\r\n        setAnchorAndPosition(tc.position(), tc.anchor());\r\n    }\r\n\r\n    // Making this unconditional feels better, but is not \"vim like\".\r\n    if (oldLine != cursorLine() - cursorLineOnScreen())\r\n        scrollToLine(cursorLine() - linesOnScreen() / 2);\r\n\r\n    m_searchCursor = m_cursor;\r\n\r\n    setTargetColumn();\r\n}\r\n\r\nbool FakeVimHandler::Private::searchNext(bool forward)\r\n{\r\n    SearchData sd;\r\n    sd.needle = g.lastSearch;\r\n    sd.forward = forward ? g.lastSearchForward : !g.lastSearchForward;\r\n    sd.highlightMatches = true;\r\n    m_searchStartPosition = position();\r\n    showMessage(MessageCommand, QLatin1Char(g.lastSearchForward ? '/' : '?') + sd.needle);\r\n    recordJump();\r\n    search(sd);\r\n    return finishSearch();\r\n}\r\n\r\nvoid FakeVimHandler::Private::highlightMatches(const QString &needle)\r\n{\r\n    g.lastNeedle = needle;\r\n    g.highlightsCleared = false;\r\n    updateHighlights();\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToFirstNonBlankOnLine()\r\n{\r\n    moveToFirstNonBlankOnLine(&m_cursor);\r\n    setTargetColumn();\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToFirstNonBlankOnLine(QTextCursor *tc)\r\n{\r\n    tc->setPosition(tc->block().position(), KeepAnchor);\r\n    moveToNonBlankOnLine(tc);\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToFirstNonBlankOnLineVisually()\r\n{\r\n    moveToStartOfLineVisually();\r\n    moveToNonBlankOnLine(&m_cursor);\r\n    setTargetColumn();\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToNonBlankOnLine(QTextCursor *tc)\r\n{\r\n    QTextDocument *doc = tc->document();\r\n    const QTextBlock block = tc->block();\r\n    const int maxPos = block.position() + block.length() - 1;\r\n    int i = tc->position();\r\n    while (doc->characterAt(i).isSpace() && i < maxPos)\r\n        ++i;\r\n    tc->setPosition(i, KeepAnchor);\r\n}\r\n\r\nvoid FakeVimHandler::Private::indentSelectedText(QChar typedChar)\r\n{\r\n    beginEditBlock();\r\n    setTargetColumn();\r\n    int beginLine = qMin(lineForPosition(position()), lineForPosition(anchor()));\r\n    int endLine = qMax(lineForPosition(position()), lineForPosition(anchor()));\r\n\r\n    Range range(anchor(), position(), g.rangemode);\r\n    indentText(range, typedChar);\r\n\r\n    setPosition(firstPositionInLine(beginLine));\r\n    handleStartOfLine();\r\n    setTargetColumn();\r\n    setDotCommand(_(\"%1==\"), endLine - beginLine + 1);\r\n    endEditBlock();\r\n\r\n    const int lines = endLine - beginLine + 1;\r\n    if (lines > 2)\r\n        showMessage(MessageInfo, FakeVimHandler::tr(\"%n lines indented.\", 0, lines));\r\n}\r\n\r\nvoid FakeVimHandler::Private::indentText(const Range &range, QChar typedChar)\r\n{\r\n    int beginBlock = document()->findBlock(range.beginPos).blockNumber();\r\n    int endBlock = document()->findBlock(range.endPos).blockNumber();\r\n    if (beginBlock > endBlock)\r\n        std::swap(beginBlock, endBlock);\r\n\r\n    // Don't remember current indentation in last text insertion.\r\n    const QString lastInsertion = m_buffer->lastInsertion;\r\n    emit q->indentRegion(beginBlock, endBlock, typedChar);\r\n    m_buffer->lastInsertion = lastInsertion;\r\n}\r\n\r\nbool FakeVimHandler::Private::isElectricCharacter(QChar c) const\r\n{\r\n    bool result = false;\r\n    emit q->checkForElectricCharacter(&result, c);\r\n    return result;\r\n}\r\n\r\nvoid FakeVimHandler::Private::shiftRegionRight(int repeat)\r\n{\r\n    int beginLine = lineForPosition(anchor());\r\n    int endLine = lineForPosition(position());\r\n    int targetPos = anchor();\r\n    if (beginLine > endLine) {\r\n        std::swap(beginLine, endLine);\r\n        targetPos = position();\r\n    }\r\n    if (hasConfig(ConfigStartOfLine))\r\n        targetPos = firstPositionInLine(beginLine);\r\n\r\n    const int sw = config(ConfigShiftWidth).toInt();\r\n    g.movetype = MoveLineWise;\r\n    beginEditBlock();\r\n    QTextBlock block = document()->findBlockByLineNumber(beginLine - 1);\r\n    while (block.isValid() && lineNumber(block) <= endLine) {\r\n        const Column col = indentation(block.text());\r\n        QTextCursor tc = m_cursor;\r\n        tc.setPosition(block.position());\r\n        if (col.physical > 0)\r\n            tc.setPosition(tc.position() + col.physical, KeepAnchor);\r\n        tc.insertText(tabExpand(col.logical + sw * repeat));\r\n        block = block.next();\r\n    }\r\n    endEditBlock();\r\n\r\n    setPosition(targetPos);\r\n    handleStartOfLine();\r\n    setTargetColumn();\r\n\r\n    const int lines = endLine - beginLine + 1;\r\n    if (lines > 2) {\r\n        showMessage(MessageInfo,\r\n            FakeVimHandler::tr(\"%n lines %1ed %2 time.\", 0, lines)\r\n            .arg(repeat > 0 ? '>' : '<').arg(qAbs(repeat)));\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::shiftRegionLeft(int repeat)\r\n{\r\n    shiftRegionRight(-repeat);\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToTargetColumn()\r\n{\r\n    const QTextBlock &bl = block();\r\n    //Column column = cursorColumn();\r\n    //int logical = logical\r\n    const int pos = lastPositionInLine(bl.blockNumber() + 1, false);\r\n    if (m_targetColumn == -1) {\r\n        setPosition(pos);\r\n        return;\r\n    }\r\n    const int physical = bl.position() + logicalToPhysicalColumn(m_targetColumn, bl.text());\r\n    //qDebug() << \"CORRECTING COLUMN FROM: \" << logical << \"TO\" << m_targetColumn;\r\n    setPosition(qMin(pos, physical));\r\n}\r\n\r\nvoid FakeVimHandler::Private::setTargetColumn()\r\n{\r\n    m_targetColumn = logicalCursorColumn();\r\n    m_visualTargetColumn = m_targetColumn;\r\n\r\n    QTextCursor tc = m_cursor;\r\n    tc.movePosition(StartOfLine);\r\n    m_targetColumnWrapped = m_cursor.position() - tc.position();\r\n}\r\n\r\n/* if simple is given:\r\n *  class 0: spaces\r\n *  class 1: non-spaces\r\n * else\r\n *  class 0: spaces\r\n *  class 1: non-space-or-letter-or-number\r\n *  class 2: letter-or-number\r\n */\r\n\r\n\r\nint FakeVimHandler::Private::charClass(QChar c, bool simple) const\r\n{\r\n    if (simple)\r\n        return c.isSpace() ? 0 : 1;\r\n    // FIXME: This means that only characters < 256 in the\r\n    // ConfigIsKeyword setting are handled properly.\r\n    if (c.unicode() < 256) {\r\n        //int old = (c.isLetterOrNumber() || c.unicode() == QLatin1Char('_')) ? 2\r\n        //    :  c.isSpace() ? 0 : 1;\r\n        //qDebug() << c.unicode() << old << m_charClass[c.unicode()];\r\n        return m_charClass[c.unicode()];\r\n    }\r\n    if (c.isLetterOrNumber() || c.unicode() == QLatin1Char('_'))\r\n        return 2;\r\n    return c.isSpace() ? 0 : 1;\r\n}\r\n\r\nvoid FakeVimHandler::Private::miniBufferTextEdited(const QString &text, int cursorPos,\r\n    int anchorPos)\r\n{\r\n    if (g.subsubmode != SearchSubSubMode && g.mode != ExMode) {\r\n        editor()->setFocus();\r\n    } else if (text.isEmpty()) {\r\n        // editing cancelled\r\n        enterFakeVim();\r\n        handleDefaultKey(Input(Qt::Key_Escape, Qt::NoModifier, QString()));\r\n        leaveFakeVim();\r\n\r\n        editor()->setFocus();\r\n        updateCursorShape();\r\n    } else {\r\n        CommandBuffer &cmdBuf = (g.mode == ExMode) ? g.commandBuffer : g.searchBuffer;\r\n        int pos = qMax(1, cursorPos);\r\n        int anchor = anchorPos == -1 ? pos : qMax(1, anchorPos);\r\n        QString buffer = text;\r\n        // prepend prompt character if missing\r\n        if (!buffer.startsWith(cmdBuf.prompt())) {\r\n            buffer.prepend(cmdBuf.prompt());\r\n            ++pos;\r\n            ++anchor;\r\n        }\r\n        // update command/search buffer\r\n        cmdBuf.setContents(buffer.mid(1), pos - 1, anchor - 1);\r\n        if (pos != cursorPos || anchor != anchorPos || buffer != text)\r\n            emit q->commandBufferChanged(buffer, pos, anchor, 0, q);\r\n        // update search expression\r\n        if (g.subsubmode == SearchSubSubMode) {\r\n            updateFind(false);\r\n            exportSelection();\r\n        }\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::pullOrCreateBufferData()\r\n{\r\n    const QVariant data = document()->property(\"FakeVimSharedData\");\r\n    if (data.isValid()) {\r\n        // FakeVimHandler has been already created for this document (e.g. in other split).\r\n        m_buffer = data.value<BufferDataPtr>();\r\n    } else {\r\n        // FakeVimHandler has not been created for this document yet.\r\n        m_buffer = BufferDataPtr(new BufferData);\r\n        document()->setProperty(\"FakeVimSharedData\", QVariant::fromValue(m_buffer));\r\n    }\r\n}\r\n\r\n// Helper to parse a-z,A-Z,48-57,_\r\nstatic int someInt(const QString &str)\r\n{\r\n    if (str.toInt())\r\n        return str.toInt();\r\n    if (str.size())\r\n        return str.at(0).unicode();\r\n    return 0;\r\n}\r\n\r\nvoid FakeVimHandler::Private::setupCharClass()\r\n{\r\n    for (int i = 0; i < 256; ++i) {\r\n        const QChar c = QChar(QLatin1Char(i));\r\n        m_charClass[i] = c.isSpace() ? 0 : 1;\r\n    }\r\n    const QString conf = config(ConfigIsKeyword).toString();\r\n    foreach (const QString &part, conf.split(QLatin1Char(','))) {\r\n        if (part.contains(QLatin1Char('-'))) {\r\n            const int from = someInt(part.section(QLatin1Char('-'), 0, 0));\r\n            const int to = someInt(part.section(QLatin1Char('-'), 1, 1));\r\n            for (int i = qMax(0, from); i <= qMin(255, to); ++i)\r\n                m_charClass[i] = 2;\r\n        } else {\r\n            m_charClass[qMin(255, someInt(part))] = 2;\r\n        }\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToBoundary(bool simple, bool forward)\r\n{\r\n    QTextDocument *doc = document();\r\n    QTextCursor tc(doc);\r\n    tc.setPosition(position());\r\n    if (forward ? tc.atBlockEnd() : tc.atBlockStart())\r\n        return;\r\n\r\n    QChar c = document()->characterAt(tc.position() + (forward ? -1 : 1));\r\n    int lastClass = tc.atStart() ? -1 : charClass(c, simple);\r\n    QTextCursor::MoveOperation op = forward ? Right : Left;\r\n    while (true) {\r\n        c = doc->characterAt(tc.position());\r\n        int thisClass = charClass(c, simple);\r\n        if (thisClass != lastClass || (forward ? tc.atBlockEnd() : tc.atBlockStart())) {\r\n            if (tc != m_cursor)\r\n                tc.movePosition(forward ? Left : Right);\r\n            break;\r\n        }\r\n        lastClass = thisClass;\r\n        tc.movePosition(op);\r\n    }\r\n    setPosition(tc.position());\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToNextBoundary(bool end, int count, bool simple, bool forward)\r\n{\r\n    int repeat = count;\r\n    while (repeat > 0 && !(forward ? atDocumentEnd() : atDocumentStart())) {\r\n        setPosition(position() + (forward ? 1 : -1));\r\n        moveToBoundary(simple, forward);\r\n        if (atBoundary(end, simple))\r\n            --repeat;\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToNextBoundaryStart(int count, bool simple, bool forward)\r\n{\r\n    moveToNextBoundary(false, count, simple, forward);\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToNextBoundaryEnd(int count, bool simple, bool forward)\r\n{\r\n    moveToNextBoundary(true, count, simple, forward);\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToBoundaryStart(int count, bool simple, bool forward)\r\n{\r\n    moveToNextBoundaryStart(atBoundary(false, simple) ? count - 1 : count, simple, forward);\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToBoundaryEnd(int count, bool simple, bool forward)\r\n{\r\n    moveToNextBoundaryEnd(atBoundary(true, simple) ? count - 1 : count, simple, forward);\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToNextWord(bool end, int count, bool simple, bool forward, bool emptyLines)\r\n{\r\n    int repeat = count;\r\n    while (repeat > 0 && !(forward ? atDocumentEnd() : atDocumentStart())) {\r\n        setPosition(position() + (forward ? 1 : -1));\r\n        moveToBoundary(simple, forward);\r\n        if (atWordBoundary(end, simple) && (emptyLines || !atEmptyLine()) )\r\n            --repeat;\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToNextWordStart(int count, bool simple, bool forward, bool emptyLines)\r\n{\r\n    moveToNextWord(false, count, simple, forward, emptyLines);\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToNextWordEnd(int count, bool simple, bool forward, bool emptyLines)\r\n{\r\n    moveToNextWord(true, count, simple, forward, emptyLines);\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToWordStart(int count, bool simple, bool forward, bool emptyLines)\r\n{\r\n    moveToNextWordStart(atWordStart(simple) ? count - 1 : count, simple, forward, emptyLines);\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToWordEnd(int count, bool simple, bool forward, bool emptyLines)\r\n{\r\n    moveToNextWordEnd(atWordEnd(simple) ? count - 1 : count, simple, forward, emptyLines);\r\n}\r\n\r\nbool FakeVimHandler::Private::handleFfTt(const QString &key, bool repeats)\r\n{\r\n    int key0 = key.size() == 1 ? key.at(0).unicode() : 0;\r\n    // g.subsubmode \\in { 'f', 'F', 't', 'T' }\r\n    bool forward = g.subsubdata.is('f') || g.subsubdata.is('t');\r\n    bool exclusive =  g.subsubdata.is('t') || g.subsubdata.is('T');\r\n    int repeat = count();\r\n    int n = block().position() + (forward ? block().length() : - 1);\r\n    QTextDocument *doc = document();\r\n    const int d = forward ? 1 : -1;\r\n    // FIXME: This also depends on whether 'cpositions' Vim option contains ';'.\r\n    const int skip = (repeats && repeat == 1 && exclusive) ? d : 0;\r\n    int pos = position() + d + skip;\r\n\r\n    for (; repeat > 0 && (forward ? pos < n : pos > n); pos += d) {\r\n        if (doc->characterAt(pos).unicode() == key0)\r\n            --repeat;\r\n    }\r\n\r\n    if (repeat == 0) {\r\n        setPosition(pos - d - (exclusive ? d : 0));\r\n        setTargetColumn();\r\n        return true;\r\n    }\r\n\r\n    return false;\r\n}\r\n\r\nvoid FakeVimHandler::Private::moveToMatchingParanthesis()\r\n{\r\n    bool moved = false;\r\n    bool forward = false;\r\n\r\n    const int anc = anchor();\r\n    QTextCursor tc = m_cursor;\r\n\r\n    // If no known parenthesis symbol is under cursor find one on the current line after cursor.\r\n    static const QString parenthesesChars(_(\"([{}])\"));\r\n    while (!parenthesesChars.contains(document()->characterAt(tc.position())) && !tc.atBlockEnd())\r\n        tc.setPosition(tc.position() + 1);\r\n\r\n    if (tc.atBlockEnd())\r\n        tc = m_cursor;\r\n\r\n    emit q->moveToMatchingParenthesis(&moved, &forward, &tc);\r\n    if (moved) {\r\n        if (forward)\r\n            tc.movePosition(Left, KeepAnchor, 1);\r\n        setAnchorAndPosition(anc, tc.position());\r\n        setTargetColumn();\r\n    }\r\n}\r\n\r\nint FakeVimHandler::Private::cursorLineOnScreen() const\r\n{\r\n    if (!editor())\r\n        return 0;\r\n    const QRect rect = EDITOR(cursorRect(m_cursor));\r\n    return rect.height() > 0 ? rect.y() / rect.height() : 0;\r\n}\r\n\r\nint FakeVimHandler::Private::linesOnScreen() const\r\n{\r\n    if (!editor())\r\n        return 1;\r\n    const int h = EDITOR(cursorRect(m_cursor)).height();\r\n    return h > 0 ? EDITOR(viewport()->height()) / h : 1;\r\n}\r\n\r\nint FakeVimHandler::Private::cursorLine() const\r\n{\r\n    return lineForPosition(position()) - 1;\r\n}\r\n\r\nint FakeVimHandler::Private::cursorBlockNumber() const\r\n{\r\n    return document()->findBlock(qMin(anchor(), position())).blockNumber();\r\n}\r\n\r\nint FakeVimHandler::Private::physicalCursorColumn() const\r\n{\r\n    return position() - block().position();\r\n}\r\n\r\nint FakeVimHandler::Private::physicalToLogicalColumn\r\n    (const int physical, const QString &line) const\r\n{\r\n    const int ts = config(ConfigTabStop).toInt();\r\n    int p = 0;\r\n    int logical = 0;\r\n    while (p < physical) {\r\n        QChar c = line.at(p);\r\n        //if (c == QLatin1Char(' '))\r\n        //    ++logical;\r\n        //else\r\n        if (c == QLatin1Char('\\t'))\r\n            logical += ts - logical % ts;\r\n        else\r\n            ++logical;\r\n            //break;\r\n        ++p;\r\n    }\r\n    return logical;\r\n}\r\n\r\nint FakeVimHandler::Private::logicalToPhysicalColumn\r\n    (const int logical, const QString &line) const\r\n{\r\n    const int ts = config(ConfigTabStop).toInt();\r\n    int physical = 0;\r\n    for (int l = 0; l < logical && physical < line.size(); ++physical) {\r\n        QChar c = line.at(physical);\r\n        if (c == QLatin1Char('\\t'))\r\n            l += ts - l % ts;\r\n        else\r\n            ++l;\r\n    }\r\n    return physical;\r\n}\r\n\r\nint FakeVimHandler::Private::windowScrollOffset() const\r\n{\r\n    return qMin(theFakeVimSetting(ConfigScrollOff)->value().toInt(), linesOnScreen() / 2);\r\n}\r\n\r\nint FakeVimHandler::Private::logicalCursorColumn() const\r\n{\r\n    const int physical = physicalCursorColumn();\r\n    const QString line = block().text();\r\n    return physicalToLogicalColumn(physical, line);\r\n}\r\n\r\nColumn FakeVimHandler::Private::cursorColumn() const\r\n{\r\n    return Column(physicalCursorColumn(), logicalCursorColumn());\r\n}\r\n\r\nint FakeVimHandler::Private::linesInDocument() const\r\n{\r\n    if (m_cursor.isNull())\r\n        return 0;\r\n    return document()->blockCount();\r\n}\r\n\r\nvoid FakeVimHandler::Private::scrollToLine(int line)\r\n{\r\n    // Don't scroll if the line is already at the top.\r\n    updateFirstVisibleLine();\r\n    if (line == m_firstVisibleLine)\r\n        return;\r\n\r\n    const QTextCursor tc = m_cursor;\r\n\r\n    QTextCursor tc2 = tc;\r\n    tc2.setPosition(document()->lastBlock().position());\r\n    EDITOR(setTextCursor(tc2));\r\n    EDITOR(ensureCursorVisible());\r\n\r\n    int offset = 0;\r\n    const QTextBlock block = document()->findBlockByLineNumber(line);\r\n    if (block.isValid()) {\r\n        const int blockLineCount = block.layout()->lineCount();\r\n        const int lineInBlock = line - block.firstLineNumber();\r\n        if (0 <= lineInBlock && lineInBlock < blockLineCount) {\r\n            QTextLine textLine = block.layout()->lineAt(lineInBlock);\r\n            offset = textLine.textStart();\r\n        } else {\r\n//            QTC_CHECK(false);\r\n        }\r\n    }\r\n    tc2.setPosition(block.position() + offset);\r\n    EDITOR(setTextCursor(tc2));\r\n    EDITOR(ensureCursorVisible());\r\n\r\n    EDITOR(setTextCursor(tc));\r\n\r\n    m_firstVisibleLine = line;\r\n}\r\n\r\nvoid FakeVimHandler::Private::updateFirstVisibleLine()\r\n{\r\n    const QTextCursor tc = EDITOR(cursorForPosition(QPoint(0,0)));\r\n    m_firstVisibleLine = lineForPosition(tc.position()) - 1;\r\n}\r\n\r\nint FakeVimHandler::Private::firstVisibleLine() const\r\n{\r\n    return m_firstVisibleLine;\r\n}\r\n\r\nint FakeVimHandler::Private::lastVisibleLine() const\r\n{\r\n    const int line = m_firstVisibleLine + linesOnScreen();\r\n    const QTextBlock block = document()->findBlockByLineNumber(line);\r\n    return block.isValid() ? line : document()->lastBlock().firstLineNumber();\r\n}\r\n\r\nint FakeVimHandler::Private::lineOnTop(int count) const\r\n{\r\n    const int scrollOffset = qMax(count - 1, windowScrollOffset());\r\n    const int line = firstVisibleLine();\r\n    return line == 0 ? count - 1 : scrollOffset + line;\r\n}\r\n\r\nint FakeVimHandler::Private::lineOnBottom(int count) const\r\n{\r\n    const int scrollOffset = qMax(count - 1, windowScrollOffset());\r\n    const int line = lastVisibleLine();\r\n    return line >= document()->lastBlock().firstLineNumber() ? line - count + 1\r\n                                                             : line - scrollOffset - 1;\r\n}\r\n\r\nvoid FakeVimHandler::Private::scrollUp(int count)\r\n{\r\n    scrollToLine(cursorLine() - cursorLineOnScreen() - count);\r\n}\r\n\r\nvoid FakeVimHandler::Private::updateScrollOffset()\r\n{\r\n    const int line = cursorLine();\r\n    if (line < lineOnTop())\r\n        scrollToLine(qMax(0, line - windowScrollOffset()));\r\n    else if (line > lineOnBottom())\r\n        scrollToLine(firstVisibleLine() + line - lineOnBottom());\r\n}\r\n\r\nvoid FakeVimHandler::Private::alignViewportToCursor(AlignmentFlag align, int line,\r\n    bool moveToNonBlank)\r\n{\r\n    if (line > 0)\r\n        setPosition(firstPositionInLine(line));\r\n    if (moveToNonBlank)\r\n        moveToFirstNonBlankOnLine();\r\n\r\n    if (align == Qt::AlignTop)\r\n        scrollUp(- cursorLineOnScreen());\r\n    else if (align == Qt::AlignVCenter)\r\n        scrollUp(linesOnScreen() / 2 - cursorLineOnScreen());\r\n    else if (align == Qt::AlignBottom)\r\n        scrollUp(linesOnScreen() - cursorLineOnScreen() - 1);\r\n}\r\n\r\nint FakeVimHandler::Private::lineToBlockNumber(int line) const\r\n{\r\n    return document()->findBlockByLineNumber(line).blockNumber();\r\n}\r\n\r\nvoid FakeVimHandler::Private::setCursorPosition(const CursorPosition &p)\r\n{\r\n    const int firstLine = firstVisibleLine();\r\n    const int firstBlock = lineToBlockNumber(firstLine);\r\n    const int lastBlock = lineToBlockNumber(firstLine + linesOnScreen() - 2);\r\n    bool isLineVisible = firstBlock <= p.line && p.line <= lastBlock;\r\n    setCursorPosition(&m_cursor, p);\r\n    if (!isLineVisible)\r\n        alignViewportToCursor(Qt::AlignVCenter);\r\n}\r\n\r\nvoid FakeVimHandler::Private::setCursorPosition(QTextCursor *tc, const CursorPosition &p)\r\n{\r\n    const int line = qMin(document()->blockCount() - 1, p.line);\r\n    QTextBlock block = document()->findBlockByNumber(line);\r\n    const int column = qMin(p.column, block.length() - 1);\r\n    tc->setPosition(block.position() + column, KeepAnchor);\r\n}\r\n\r\nint FakeVimHandler::Private::lastPositionInDocument(bool ignoreMode) const\r\n{\r\n    return document()->characterCount()\r\n        - (ignoreMode || isVisualMode() || isInsertMode() ? 1 : 2);\r\n}\r\n\r\nQString FakeVimHandler::Private::selectText(const Range &range) const\r\n{\r\n    if (range.rangemode == RangeCharMode) {\r\n        QTextCursor tc(document());\r\n        tc.setPosition(range.beginPos, MoveAnchor);\r\n        tc.setPosition(range.endPos, KeepAnchor);\r\n        return tc.selection().toPlainText();\r\n    }\r\n    if (range.rangemode == RangeLineMode) {\r\n        QTextCursor tc(document());\r\n        int firstPos = firstPositionInLine(lineForPosition(range.beginPos));\r\n        int lastLine = lineForPosition(range.endPos);\r\n        bool endOfDoc = lastLine == lineNumber(document()->lastBlock());\r\n        int lastPos = endOfDoc ? lastPositionInDocument(true) : firstPositionInLine(lastLine + 1);\r\n        tc.setPosition(firstPos, MoveAnchor);\r\n        tc.setPosition(lastPos, KeepAnchor);\r\n        return tc.selection().toPlainText() + _(endOfDoc? \"\\n\" : \"\");\r\n    }\r\n    // FIXME: Performance?\r\n    int beginLine = lineForPosition(range.beginPos);\r\n    int endLine = lineForPosition(range.endPos);\r\n    int beginColumn = 0;\r\n    int endColumn = INT_MAX;\r\n    if (range.rangemode == RangeBlockMode) {\r\n        int column1 = range.beginPos - firstPositionInLine(beginLine);\r\n        int column2 = range.endPos - firstPositionInLine(endLine);\r\n        beginColumn = qMin(column1, column2);\r\n        endColumn = qMax(column1, column2);\r\n    }\r\n    int len = endColumn - beginColumn + 1;\r\n    QString contents;\r\n    QTextBlock block = document()->findBlockByLineNumber(beginLine - 1);\r\n    for (int i = beginLine; i <= endLine && block.isValid(); ++i) {\r\n        QString line = block.text();\r\n        if (range.rangemode == RangeBlockMode) {\r\n            line = line.mid(beginColumn, len);\r\n            if (line.size() < len)\r\n                line += QString(len - line.size(), QLatin1Char(' '));\r\n        }\r\n        contents += line;\r\n        if (!contents.endsWith(QLatin1Char('\\n')))\r\n            contents += QLatin1Char('\\n');\r\n        block = block.next();\r\n    }\r\n    //qDebug() << \"SELECTED: \" << contents;\r\n    return contents;\r\n}\r\n\r\nvoid FakeVimHandler::Private::yankText(const Range &range, int reg)\r\n{\r\n    const QString text = selectText(range);\r\n    setRegister(reg, text, range.rangemode);\r\n\r\n    // If register is not specified or \" ...\r\n    if (m_register == '\"') {\r\n        // copy to yank register 0 too\r\n        setRegister('0', text, range.rangemode);\r\n\r\n        // with delete and change commands set register 1 (if text contains more lines) or\r\n        // small delete register -\r\n        if (g.submode == DeleteSubMode || g.submode == ChangeSubMode) {\r\n            if (text.contains(QLatin1Char('\\n')))\r\n                setRegister('1', text, range.rangemode);\r\n            else\r\n                setRegister('-', text, range.rangemode);\r\n        }\r\n    } else {\r\n        // Always copy to \" register too.\r\n        setRegister('\"', text, range.rangemode);\r\n    }\r\n\r\n    const int lines = document()->findBlock(range.endPos).blockNumber()\r\n        - document()->findBlock(range.beginPos).blockNumber() + 1;\r\n    if (lines > 2)\r\n        showMessage(MessageInfo, FakeVimHandler::tr(\"%n lines yanked.\", 0, lines));\r\n}\r\n\r\nvoid FakeVimHandler::Private::transformText(const Range &range,\r\n    Transformation transformFunc, const QVariant &extra)\r\n{\r\n    QTextCursor tc = m_cursor;\r\n    int posAfter = range.beginPos;\r\n    switch (range.rangemode) {\r\n        case RangeCharMode: {\r\n            // This can span multiple lines.\r\n            beginEditBlock();\r\n            tc.setPosition(range.beginPos, MoveAnchor);\r\n            tc.setPosition(range.endPos, KeepAnchor);\r\n            TransformationData td(tc.selectedText(), extra);\r\n            (this->*transformFunc)(&td);\r\n            insertText(tc, td.to);\r\n            endEditBlock();\r\n            break;\r\n        }\r\n        case RangeLineMode:\r\n        case RangeLineModeExclusive: {\r\n            beginEditBlock();\r\n            tc.setPosition(range.beginPos, MoveAnchor);\r\n            tc.movePosition(StartOfLine, MoveAnchor);\r\n            tc.setPosition(range.endPos, KeepAnchor);\r\n            tc.movePosition(EndOfLine, KeepAnchor);\r\n            if (range.rangemode != RangeLineModeExclusive) {\r\n                // make sure that complete lines are removed\r\n                // - also at the beginning and at the end of the document\r\n                if (tc.atEnd()) {\r\n                    tc.setPosition(range.beginPos, MoveAnchor);\r\n                    tc.movePosition(StartOfLine, MoveAnchor);\r\n                    if (!tc.atStart()) {\r\n                        // also remove first line if it is the only one\r\n                        tc.movePosition(Left, MoveAnchor, 1);\r\n                        tc.movePosition(EndOfLine, MoveAnchor, 1);\r\n                    }\r\n                    tc.setPosition(range.endPos, KeepAnchor);\r\n                    tc.movePosition(EndOfLine, KeepAnchor);\r\n                } else {\r\n                    tc.movePosition(Right, KeepAnchor, 1);\r\n                }\r\n            }\r\n            TransformationData td(tc.selectedText(), extra);\r\n            (this->*transformFunc)(&td);\r\n            posAfter = tc.anchor();\r\n            insertText(tc, td.to);\r\n            endEditBlock();\r\n            break;\r\n        }\r\n        case RangeBlockAndTailMode:\r\n        case RangeBlockMode: {\r\n            int beginLine = lineForPosition(range.beginPos);\r\n            int endLine = lineForPosition(range.endPos);\r\n            int column1 = range.beginPos - firstPositionInLine(beginLine);\r\n            int column2 = range.endPos - firstPositionInLine(endLine);\r\n            int beginColumn = qMin(column1, column2);\r\n            int endColumn = qMax(column1, column2);\r\n            if (range.rangemode == RangeBlockAndTailMode)\r\n                endColumn = INT_MAX - 1;\r\n            QTextBlock block = document()->findBlockByLineNumber(endLine - 1);\r\n            beginEditBlock();\r\n            for (int i = beginLine; i <= endLine && block.isValid(); ++i) {\r\n                int bCol = qMin(beginColumn, block.length() - 1);\r\n                int eCol = qMin(endColumn + 1, block.length() - 1);\r\n                tc.setPosition(block.position() + bCol, MoveAnchor);\r\n                tc.setPosition(block.position() + eCol, KeepAnchor);\r\n                TransformationData td(tc.selectedText(), extra);\r\n                (this->*transformFunc)(&td);\r\n                insertText(tc, td.to);\r\n                block = block.previous();\r\n            }\r\n            endEditBlock();\r\n            break;\r\n        }\r\n    }\r\n\r\n    setPosition(posAfter);\r\n    setTargetColumn();\r\n}\r\n\r\nvoid FakeVimHandler::Private::insertText(QTextCursor &tc, const QString &text)\r\n{\r\n  if (hasConfig(ConfigPassKeys)) {\r\n      QTextCursor oldTc = m_cursor;\r\n      m_cursor = tc;\r\n\r\n      if (tc.hasSelection() && text.isEmpty()) {\r\n          QKeyEvent event(QEvent::KeyPress, Qt::Key_Delete, Qt::NoModifier, QString());\r\n          passEventToEditor(event);\r\n      }\r\n\r\n      foreach (QChar c, text) {\r\n          QKeyEvent event(QEvent::KeyPress, -1, Qt::NoModifier, QString(c));\r\n          passEventToEditor(event);\r\n      }\r\n\r\n      tc = m_cursor;\r\n      m_cursor = oldTc;\r\n  } else {\r\n      tc.insertText(text);\r\n  }\r\n}\r\n\r\nvoid FakeVimHandler::Private::insertText(const Register &reg)\r\n{\r\n    QTC_ASSERT(reg.rangemode == RangeCharMode,\r\n        qDebug() << \"WRONG INSERT MODE: \" << reg.rangemode; return);\r\n    setAnchor();\r\n    m_cursor.insertText(reg.contents);\r\n    //dump(\"AFTER INSERT\");\r\n}\r\n\r\nvoid FakeVimHandler::Private::removeText(const Range &range)\r\n{\r\n    //qDebug() << \"REMOVE: \" << range;\r\n    transformText(range, &FakeVimHandler::Private::removeTransform);\r\n}\r\n\r\nvoid FakeVimHandler::Private::removeTransform(TransformationData *td)\r\n{\r\n    Q_UNUSED(td);\r\n}\r\n\r\nvoid FakeVimHandler::Private::downCase(const Range &range)\r\n{\r\n    transformText(range, &FakeVimHandler::Private::downCaseTransform);\r\n}\r\n\r\nvoid FakeVimHandler::Private::downCaseTransform(TransformationData *td)\r\n{\r\n    td->to = td->from.toLower();\r\n}\r\n\r\nvoid FakeVimHandler::Private::upCase(const Range &range)\r\n{\r\n    transformText(range, &FakeVimHandler::Private::upCaseTransform);\r\n}\r\n\r\nvoid FakeVimHandler::Private::upCaseTransform(TransformationData *td)\r\n{\r\n    td->to = td->from.toUpper();\r\n}\r\n\r\nvoid FakeVimHandler::Private::invertCase(const Range &range)\r\n{\r\n    transformText(range, &FakeVimHandler::Private::invertCaseTransform);\r\n}\r\n\r\nvoid FakeVimHandler::Private::invertCaseTransform(TransformationData *td)\r\n{\r\n    foreach (QChar c, td->from)\r\n        td->to += c.isUpper() ? c.toLower() : c.toUpper();\r\n}\r\n\r\nvoid FakeVimHandler::Private::replaceText(const Range &range, const QString &str)\r\n{\r\n    Transformation tr = &FakeVimHandler::Private::replaceByStringTransform;\r\n    transformText(range, tr, str);\r\n}\r\n\r\nvoid FakeVimHandler::Private::replaceByStringTransform(TransformationData *td)\r\n{\r\n    td->to = td->extraData.toString();\r\n}\r\n\r\nvoid FakeVimHandler::Private::replaceByCharTransform(TransformationData *td)\r\n{\r\n    // Replace each character but preserve lines.\r\n    const int len = td->from.size();\r\n    td->to = QString(len, td->extraData.toChar());\r\n    for (int i = 0; i < len; ++i) {\r\n        if (td->from.at(i) == ParagraphSeparator)\r\n            td->to[i] = ParagraphSeparator;\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::pasteText(bool afterCursor)\r\n{\r\n    const QString text = registerContents(m_register);\r\n    const RangeMode rangeMode = registerRangeMode(m_register);\r\n\r\n    beginEditBlock();\r\n\r\n    // In visual mode paste text only inside selection.\r\n    bool pasteAfter = isVisualMode() ? false : afterCursor;\r\n\r\n    bool visualCharMode = isVisualCharMode();\r\n    if (visualCharMode) {\r\n        leaveVisualMode();\r\n        g.rangemode = RangeCharMode;\r\n        Range range = currentRange();\r\n        range.endPos++;\r\n        yankText(range, m_register);\r\n        removeText(range);\r\n    } else if (isVisualLineMode()) {\r\n        leaveVisualMode();\r\n        g.rangemode = RangeLineMode;\r\n        Range range = currentRange();\r\n        range.endPos++;\r\n        yankText(range, m_register);\r\n        removeText(range);\r\n        handleStartOfLine();\r\n    } else if (isVisualBlockMode()) {\r\n        leaveVisualMode();\r\n        g.rangemode = RangeBlockMode;\r\n        Range range = currentRange();\r\n        yankText(range, m_register);\r\n        removeText(range);\r\n        setPosition(qMin(position(), anchor()));\r\n    }\r\n\r\n    switch (rangeMode) {\r\n        case RangeCharMode: {\r\n            m_targetColumn = 0;\r\n            const int pos = position() + 1;\r\n            if (pasteAfter && rightDist() > 0)\r\n                moveRight();\r\n            insertText(text.repeated(count()));\r\n            if (text.contains(QLatin1Char('\\n')))\r\n                setPosition(pos);\r\n            else\r\n                moveLeft();\r\n            break;\r\n        }\r\n        case RangeLineMode:\r\n        case RangeLineModeExclusive: {\r\n            QTextCursor tc = m_cursor;\r\n            if (visualCharMode)\r\n                tc.insertBlock();\r\n            else\r\n                moveToStartOfLine();\r\n            m_targetColumn = 0;\r\n            bool lastLine = false;\r\n            if (pasteAfter) {\r\n                lastLine = document()->lastBlock() == this->block();\r\n                if (lastLine) {\r\n                    tc.movePosition(EndOfLine, MoveAnchor);\r\n                    tc.insertBlock();\r\n                }\r\n                moveDown();\r\n            }\r\n            const int pos = position();\r\n            if (lastLine)\r\n                insertText(text.repeated(count()).left(text.size() * count() - 1));\r\n            else\r\n                insertText(text.repeated(count()));\r\n            setPosition(pos);\r\n            moveToFirstNonBlankOnLine();\r\n            break;\r\n        }\r\n        case RangeBlockAndTailMode:\r\n        case RangeBlockMode: {\r\n            const int pos = position();\r\n            if (pasteAfter && rightDist() > 0)\r\n                moveRight();\r\n            QTextCursor tc = m_cursor;\r\n            const int col = tc.columnNumber();\r\n            QTextBlock block = tc.block();\r\n            const QStringList lines = text.split(QLatin1Char('\\n'));\r\n            for (int i = 0; i < lines.size() - 1; ++i) {\r\n                if (!block.isValid()) {\r\n                    tc.movePosition(EndOfDocument);\r\n                    tc.insertBlock();\r\n                    block = tc.block();\r\n                }\r\n\r\n                // resize line\r\n                int length = block.length();\r\n                int begin = block.position();\r\n                if (col >= length) {\r\n                    tc.setPosition(begin + length - 1);\r\n                    tc.insertText(QString(col - length + 1, QLatin1Char(' ')));\r\n                } else {\r\n                    tc.setPosition(begin + col);\r\n                }\r\n\r\n                // insert text\r\n                const QString line = lines.at(i).repeated(count());\r\n                tc.insertText(line);\r\n\r\n                // next line\r\n                block = block.next();\r\n            }\r\n            setPosition(pos);\r\n            if (pasteAfter)\r\n                moveRight();\r\n            break;\r\n        }\r\n    }\r\n\r\n    endEditBlock();\r\n}\r\n\r\nvoid FakeVimHandler::Private::joinLines(int count, bool preserveSpace)\r\n{\r\n    int pos = position();\r\n    const int blockNumber = m_cursor.blockNumber();\r\n    for (int i = qMax(count - 2, 0); i >= 0 && blockNumber < document()->blockCount(); --i) {\r\n        moveBehindEndOfLine();\r\n        pos = position();\r\n        setAnchor();\r\n        moveRight();\r\n        if (preserveSpace) {\r\n            removeText(currentRange());\r\n        } else {\r\n            while (characterAtCursor() == QLatin1Char(' ') || characterAtCursor() == QLatin1Char('\\t'))\r\n                moveRight();\r\n            m_cursor.insertText(QString(QLatin1Char(' ')));\r\n        }\r\n    }\r\n    setPosition(pos);\r\n}\r\n\r\nvoid FakeVimHandler::Private::insertNewLine()\r\n{\r\n    if ( m_buffer->editBlockLevel <= 1 && hasConfig(ConfigPassKeys) ) {\r\n        QKeyEvent event(QEvent::KeyPress, Qt::Key_Return, Qt::NoModifier, QLatin1String(\"\\n\"));\r\n        if (passEventToEditor(event))\r\n            return;\r\n    }\r\n\r\n    insertText(QString::fromLatin1(\"\\n\"));\r\n    insertAutomaticIndentation(true);\r\n}\r\n\r\nbool FakeVimHandler::Private::handleInsertInEditor(const Input &input)\r\n{\r\n    if (m_buffer->editBlockLevel > 0 || !hasConfig(ConfigPassKeys))\r\n        return false;\r\n\r\n    joinPreviousEditBlock();\r\n\r\n    QKeyEvent event(QEvent::KeyPress, input.key(), input.modifiers(), input.text());\r\n    setAnchor();\r\n    if (!passEventToEditor(event))\r\n        return !m_textedit && !m_plaintextedit; // Mark event as handled if it has destroyed editor.\r\n\r\n    endEditBlock();\r\n\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::passEventToEditor(QEvent &event)\r\n{\r\n    removeEventFilter();\r\n\r\n    EDITOR(setOverwriteMode(false));\r\n    commitCursor();\r\n    bool accepted = QApplication::sendEvent(editor(), &event);\r\n    if (!m_textedit && !m_plaintextedit)\r\n        return false;\r\n    updateCursorShape();\r\n\r\n    if (accepted)\r\n        pullCursor();\r\n\r\n    return accepted;\r\n}\r\n\r\nQString FakeVimHandler::Private::lineContents(int line) const\r\n{\r\n    return document()->findBlockByLineNumber(line - 1).text();\r\n}\r\n\r\nQString FakeVimHandler::Private::textAt(int from, int to) const\r\n{\r\n    QTextCursor tc(document());\r\n    tc.setPosition(from);\r\n    tc.setPosition(to, KeepAnchor);\r\n    return tc.selectedText().replace(ParagraphSeparator, QLatin1Char('\\n'));\r\n}\r\n\r\nvoid FakeVimHandler::Private::setLineContents(int line, const QString &contents)\r\n{\r\n    QTextBlock block = document()->findBlockByLineNumber(line - 1);\r\n    QTextCursor tc = m_cursor;\r\n    const int begin = block.position();\r\n    const int len = block.length();\r\n    tc.setPosition(begin);\r\n    tc.setPosition(begin + len - 1, KeepAnchor);\r\n    tc.insertText(contents);\r\n}\r\n\r\nint FakeVimHandler::Private::blockBoundary(const QString &left,\r\n    const QString &right, bool closing, int count) const\r\n{\r\n    const QString &begin = closing ? left : right;\r\n    const QString &end = closing ? right : left;\r\n\r\n    // shift cursor if it is already on opening/closing string\r\n    QTextCursor tc1 = m_cursor;\r\n    int pos = tc1.position();\r\n    int max = document()->characterCount();\r\n    int sz = left.size();\r\n    int from = qMax(pos - sz + 1, 0);\r\n    int to = qMin(pos + sz, max);\r\n    tc1.setPosition(from);\r\n    tc1.setPosition(to, KeepAnchor);\r\n    int i = tc1.selectedText().indexOf(left);\r\n    if (i != -1) {\r\n        // - on opening string:\r\n        tc1.setPosition(from + i + sz);\r\n    } else {\r\n        sz = right.size();\r\n        from = qMax(pos - sz + 1, 0);\r\n        to = qMin(pos + sz, max);\r\n        tc1.setPosition(from);\r\n        tc1.setPosition(to, KeepAnchor);\r\n        i = tc1.selectedText().indexOf(right);\r\n        if (i != -1) {\r\n            // - on closing string:\r\n            tc1.setPosition(from + i);\r\n        } else {\r\n            tc1 = m_cursor;\r\n        }\r\n    }\r\n\r\n    QTextCursor tc2 = tc1;\r\n    QTextDocument::FindFlags flags(closing ? 0 : QTextDocument::FindBackward);\r\n    int level = 0;\r\n    int counter = 0;\r\n    while (true) {\r\n        tc2 = document()->find(end, tc2, flags);\r\n        if (tc2.isNull())\r\n            return -1;\r\n        if (!tc1.isNull())\r\n            tc1 = document()->find(begin, tc1, flags);\r\n\r\n        while (!tc1.isNull() && (closing ? (tc1 < tc2) : (tc2 < tc1))) {\r\n            ++level;\r\n            tc1 = document()->find(begin, tc1, flags);\r\n        }\r\n\r\n        while (level > 0\r\n               && (tc1.isNull() || (closing ? (tc2 < tc1) : (tc1 < tc2)))) {\r\n            --level;\r\n            tc2 = document()->find(end, tc2, flags);\r\n            if (tc2.isNull())\r\n                return -1;\r\n        }\r\n\r\n        if (level == 0\r\n            && (tc1.isNull() || (closing ? (tc2 < tc1) : (tc1 < tc2)))) {\r\n            ++counter;\r\n            if (counter >= count)\r\n                break;\r\n        }\r\n    }\r\n\r\n    return tc2.position() - end.size();\r\n}\r\n\r\nint FakeVimHandler::Private::lineNumber(const QTextBlock &block) const\r\n{\r\n    if (block.isVisible())\r\n        return block.firstLineNumber() + 1;\r\n\r\n    // Folded block has line number of the nearest previous visible line.\r\n    QTextBlock block2 = block;\r\n    while (block2.isValid() && !block2.isVisible())\r\n        block2 = block2.previous();\r\n    return block2.firstLineNumber() + 1;\r\n}\r\n\r\nQTextBlock FakeVimHandler::Private::nextLine(const QTextBlock &block) const\r\n{\r\n    return document()->findBlock(block.position() + block.length());\r\n}\r\n\r\nQTextBlock FakeVimHandler::Private::previousLine(const QTextBlock &block) const\r\n{\r\n    return document()->findBlock(block.position() - 1);\r\n}\r\n\r\nint FakeVimHandler::Private::firstPositionInLine(int line, bool onlyVisibleLines) const\r\n{\r\n    QTextBlock block = onlyVisibleLines ? document()->findBlockByLineNumber(line - 1)\r\n        : document()->findBlockByNumber(line - 1);\r\n    return block.position();\r\n}\r\n\r\nint FakeVimHandler::Private::lastPositionInLine(int line, bool onlyVisibleLines) const\r\n{\r\n    QTextBlock block;\r\n    if (onlyVisibleLines) {\r\n        block = document()->findBlockByLineNumber(line - 1);\r\n        // respect folds and wrapped lines\r\n        do {\r\n            block = nextLine(block);\r\n        } while (block.isValid() && !block.isVisible());\r\n        if (block.isValid()) {\r\n            if (line > 0)\r\n                block = block.previous();\r\n        } else {\r\n            block = document()->lastBlock();\r\n        }\r\n    } else {\r\n        block = document()->findBlockByNumber(line - 1);\r\n    }\r\n\r\n    const int position = block.position() + block.length() - 1;\r\n    if (block.length() > 1 && !isVisualMode() && !isInsertMode())\r\n        return position - 1;\r\n    return position;\r\n}\r\n\r\nint FakeVimHandler::Private::lineForPosition(int pos) const\r\n{\r\n    const QTextBlock block = document()->findBlock(pos);\r\n    if (!block.isValid())\r\n        return 0;\r\n    const int positionInBlock = pos - block.position();\r\n    const int lineNumberInBlock = block.layout()->lineForTextPosition(positionInBlock).lineNumber();\r\n    return block.firstLineNumber() + lineNumberInBlock + 1;\r\n}\r\n\r\nvoid FakeVimHandler::Private::toggleVisualMode(VisualMode visualMode)\r\n{\r\n    if (visualMode == g.visualMode) {\r\n        leaveVisualMode();\r\n    } else {\r\n        m_positionPastEnd = false;\r\n        m_anchorPastEnd = false;\r\n        g.visualMode = visualMode;\r\n        m_buffer->lastVisualMode = visualMode;\r\n        updateMiniBuffer();\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::leaveVisualMode()\r\n{\r\n    if (!isVisualMode())\r\n        return;\r\n\r\n    setMark(QLatin1Char('<'), markLessPosition());\r\n    setMark(QLatin1Char('>'), markGreaterPosition());\r\n    m_buffer->lastVisualModeInverted = anchor() > position();\r\n    if (isVisualLineMode()) {\r\n        g.rangemode = RangeLineMode;\r\n        g.movetype = MoveLineWise;\r\n    } else if (isVisualCharMode()) {\r\n        g.rangemode = RangeCharMode;\r\n        g.movetype = MoveInclusive;\r\n    } else if (isVisualBlockMode()) {\r\n        g.rangemode = RangeBlockMode;\r\n        g.movetype = MoveInclusive;\r\n    }\r\n\r\n    g.visualMode = NoVisualMode;\r\n    updateMiniBuffer();\r\n}\r\n\r\nQWidget *FakeVimHandler::Private::editor() const\r\n{\r\n    return m_textedit\r\n        ? static_cast<QWidget *>(m_textedit)\r\n        : static_cast<QWidget *>(m_plaintextedit);\r\n}\r\n\r\nvoid FakeVimHandler::Private::joinPreviousEditBlock()\r\n{\r\n    UNDO_DEBUG(\"JOIN\");\r\n    if (m_buffer->breakEditBlock) {\r\n        beginEditBlock();\r\n        QTextCursor tc(m_cursor);\r\n        tc.setPosition(tc.position());\r\n        tc.beginEditBlock();\r\n        tc.insertText(_(\"X\"));\r\n        tc.deletePreviousChar();\r\n        tc.endEditBlock();\r\n        m_buffer->breakEditBlock = false;\r\n    } else {\r\n        if (m_buffer->editBlockLevel == 0 && !m_buffer->undo.empty())\r\n            m_buffer->undoState = m_buffer->undo.pop();\r\n        beginEditBlock();\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::beginEditBlock(bool largeEditBlock)\r\n{\r\n    UNDO_DEBUG(\"BEGIN EDIT BLOCK\" << m_buffer->editBlockLevel + 1);\r\n    if (!largeEditBlock && !m_buffer->undoState.isValid())\r\n        pushUndoState(false);\r\n    if (m_buffer->editBlockLevel == 0)\r\n        m_buffer->breakEditBlock = true;\r\n    ++m_buffer->editBlockLevel;\r\n}\r\n\r\nvoid FakeVimHandler::Private::endEditBlock()\r\n{\r\n    UNDO_DEBUG(\"END EDIT BLOCK\" << m_buffer->editBlockLevel);\r\n    QTC_ASSERT(m_buffer->editBlockLevel > 0,\r\n        qDebug() << \"beginEditBlock() not called before endEditBlock()!\"; return);\r\n    --m_buffer->editBlockLevel;\r\n    if (m_buffer->editBlockLevel == 0 && m_buffer->undoState.isValid()) {\r\n        m_buffer->undo.push(m_buffer->undoState);\r\n        m_buffer->undoState = State();\r\n    }\r\n    if (m_buffer->editBlockLevel == 0)\r\n        m_buffer->breakEditBlock = false;\r\n}\r\n\r\nvoid FakeVimHandler::Private::onContentsChanged(int position, int charsRemoved, int charsAdded)\r\n{\r\n    // Record inserted and deleted text in insert mode.\r\n    if (isInsertMode() && (charsAdded > 0 || charsRemoved > 0)) {\r\n        BufferData::InsertState &insertState = m_buffer->insertState;\r\n        if (!isInsertStateValid()) {\r\n            insertState.pos1 = m_oldInternalPosition;\r\n            g.dotCommand = _(\"i\");\r\n            resetCount();\r\n        }\r\n\r\n        // Ignore changes outside inserted text (e.g. renaming other occurrences of a variable).\r\n        if (position + charsRemoved >= insertState.pos1 && position <= insertState.pos2) {\r\n            if (charsRemoved > 0) {\r\n                if (position < insertState.pos1) {\r\n                    // backspaces\r\n                    const int bs = insertState.pos1 - position;\r\n                    const QString inserted = textAt(position, m_oldInternalPosition);\r\n                    const QString removed = insertState.textBeforeCursor.right(bs);\r\n                    // Ignore backspaces if same text was just inserted.\r\n                    if ( !inserted.endsWith(removed) ) {\r\n                        insertState.backspaces += bs;\r\n                        insertState.pos1 = position;\r\n                        insertState.pos2 = qMax(position, insertState.pos2 - bs);\r\n                    }\r\n                } else if (position + charsRemoved > insertState.pos2) {\r\n                    // deletes\r\n                    insertState.deletes += position + charsRemoved - insertState.pos2;\r\n                }\r\n            } else if (charsAdded > 0 && insertState.insertingSpaces) {\r\n                for (int i = position; i < position + charsAdded; ++i) {\r\n                    const QChar c = document()->characterAt(i);\r\n                    if (c.unicode() == ' ' || c.unicode() == '\\t')\r\n                        insertState.spaces.insert(i);\r\n                }\r\n            }\r\n\r\n            insertState.pos2 = qMax(insertState.pos2 + charsAdded - charsRemoved,\r\n                                      position + charsAdded);\r\n            m_oldInternalPosition = position + charsAdded;\r\n            insertState.textBeforeCursor = textAt(document()->findBlock(m_oldInternalPosition).position(),\r\n                                            m_oldInternalPosition);\r\n        }\r\n    }\r\n\r\n    if (!m_highlighted.isEmpty())\r\n        emit q->highlightMatches(m_highlighted);\r\n}\r\n\r\nvoid FakeVimHandler::Private::onUndoCommandAdded()\r\n{\r\n    // Undo commands removed?\r\n    UNDO_DEBUG(\"Undo added\" << \"previous: REV\" << m_buffer->lastRevision);\r\n    if (m_buffer->lastRevision >= revision()) {\r\n        UNDO_DEBUG(\"UNDO REMOVED!\");\r\n        const int removed = m_buffer->lastRevision - revision();\r\n        for (int i = m_buffer->undo.size() - 1; i >= 0; --i) {\r\n            if ((m_buffer->undo[i].revision -= removed) < 0) {\r\n                m_buffer->undo.remove(0, i + 1);\r\n                break;\r\n            }\r\n        }\r\n    }\r\n\r\n    m_buffer->redo.clear();\r\n    // External change while FakeVim disabled.\r\n    if (m_buffer->editBlockLevel == 0 && !m_buffer->undo.isEmpty() && !isInsertMode())\r\n        m_buffer->undo.push(State());\r\n}\r\n\r\nchar FakeVimHandler::Private::currentModeCode() const\r\n{\r\n    if (g.mode == ExMode)\r\n        return 'c';\r\n    else if (isVisualMode())\r\n        return 'v';\r\n    else if (isOperatorPending())\r\n        return 'o';\r\n    else if (g.mode == CommandMode)\r\n        return 'n';\r\n    else if (g.submode != NoSubMode)\r\n        return ' ';\r\n    else\r\n        return 'i';\r\n}\r\n\r\nvoid FakeVimHandler::Private::undoRedo(bool undo)\r\n{\r\n    UNDO_DEBUG((undo ? \"UNDO\" : \"REDO\"));\r\n\r\n    // FIXME: That's only an approximaxtion. The real solution might\r\n    // be to store marks and old userData with QTextBlock setUserData\r\n    // and retrieve them afterward.\r\n    QStack<State> &stack = undo ? m_buffer->undo : m_buffer->redo;\r\n    QStack<State> &stack2 = undo ? m_buffer->redo : m_buffer->undo;\r\n\r\n    State state = m_buffer->undoState.isValid() ? m_buffer->undoState\r\n                                        : !stack.empty() ? stack.pop() : State();\r\n\r\n    CursorPosition lastPos(m_cursor);\r\n    if (undo ? !document()->isUndoAvailable() : !document()->isRedoAvailable()) {\r\n        const QString msg = undo ? FakeVimHandler::tr(\"Already at oldest change.\")\r\n            : FakeVimHandler::tr(\"Already at newest change.\");\r\n        showMessage(MessageInfo, msg);\r\n        UNDO_DEBUG(msg);\r\n        return;\r\n    }\r\n    clearMessage();\r\n\r\n    ++m_buffer->editBlockLevel;\r\n\r\n    // Do undo/redo [count] times to reach previous revision.\r\n    const int previousRevision = revision();\r\n    if (undo) {\r\n        do {\r\n            EDITOR(undo());\r\n        } while (document()->isUndoAvailable() && state.revision >= 0 && state.revision < revision());\r\n    } else {\r\n        do {\r\n            EDITOR(redo());\r\n        } while (document()->isRedoAvailable() && state.revision > revision());\r\n    }\r\n\r\n    --m_buffer->editBlockLevel;\r\n\r\n    if (state.isValid()) {\r\n        m_buffer->lastChangePosition = state.position;\r\n        Marks marks = m_buffer->marks;\r\n        marks.swap(state.marks);\r\n        updateMarks(marks);\r\n        m_buffer->lastVisualMode = state.lastVisualMode;\r\n        m_buffer->lastVisualModeInverted = state.lastVisualModeInverted;\r\n        setMark(QLatin1Char('\\''), lastPos);\r\n        setMark(QLatin1Char('`'), lastPos);\r\n        setCursorPosition(m_buffer->lastChangePosition);\r\n        setAnchor();\r\n        state.revision = previousRevision;\r\n    } else {\r\n        updateFirstVisibleLine();\r\n        pullCursor();\r\n    }\r\n    stack2.push(state);\r\n\r\n    setTargetColumn();\r\n    if (atEndOfLine())\r\n        moveLeft();\r\n\r\n    UNDO_DEBUG((undo ? \"UNDONE\" : \"REDONE\"));\r\n}\r\n\r\nvoid FakeVimHandler::Private::undo()\r\n{\r\n    undoRedo(true);\r\n}\r\n\r\nvoid FakeVimHandler::Private::redo()\r\n{\r\n    undoRedo(false);\r\n}\r\n\r\nvoid FakeVimHandler::Private::updateCursorShape()\r\n{\r\n    bool thinCursor = g.mode == ExMode\r\n            || g.subsubmode == SearchSubSubMode\r\n            || g.mode == InsertMode\r\n            || (isVisualMode() && !isVisualCharMode());\r\n    EDITOR(setOverwriteMode(!thinCursor));\r\n}\r\n\r\nvoid FakeVimHandler::Private::enterReplaceMode()\r\n{\r\n    enterInsertOrReplaceMode(ReplaceMode);\r\n}\r\n\r\nvoid FakeVimHandler::Private::enterInsertMode()\r\n{\r\n    enterInsertOrReplaceMode(InsertMode);\r\n}\r\n\r\nvoid FakeVimHandler::Private::enterInsertOrReplaceMode(Mode mode)\r\n{\r\n    QTC_ASSERT(mode == InsertMode || mode == ReplaceMode, return);\r\n    if (g.mode == mode)\r\n        return;\r\n\r\n    if (mode == InsertMode && g.returnToMode != InsertMode) {\r\n        // If entering insert mode from command mode, m_targetColumn shouldn't be -1 (end of line).\r\n        if (m_targetColumn == -1)\r\n            setTargetColumn();\r\n    }\r\n\r\n    g.mode = mode;\r\n    g.submode = NoSubMode;\r\n    g.subsubmode = NoSubSubMode;\r\n    g.returnToMode = mode;\r\n    clearLastInsertion();\r\n}\r\n\r\nvoid FakeVimHandler::Private::enterVisualInsertMode(QChar command)\r\n{\r\n    if (isVisualBlockMode()) {\r\n        bool append = command == QLatin1Char('A');\r\n        bool change = command == QLatin1Char('s') || command == QLatin1Char('c');\r\n\r\n        setDotCommand(visualDotCommand() + QString::number(count()) + command);\r\n        leaveVisualMode();\r\n\r\n        const CursorPosition lastAnchor = markLessPosition();\r\n        const CursorPosition lastPosition = markGreaterPosition();\r\n        CursorPosition pos(lastAnchor.line,\r\n            append ? qMax(lastPosition.column, lastAnchor.column) + 1\r\n                   : qMin(lastPosition.column, lastAnchor.column));\r\n\r\n        if (append) {\r\n            m_visualBlockInsert = m_visualTargetColumn == -1 ? AppendToEndOfLineBlockInsertMode\r\n                                                             : AppendBlockInsertMode;\r\n        } else if (change) {\r\n            m_visualBlockInsert = ChangeBlockInsertMode;\r\n            pushUndoState();\r\n            beginEditBlock();\r\n            Range range(position(), anchor(), RangeBlockMode);\r\n            yankText(range, m_register);\r\n            removeText(range);\r\n            endEditBlock();\r\n        } else {\r\n            m_visualBlockInsert = InsertBlockInsertMode;\r\n        }\r\n\r\n        setCursorPosition(pos);\r\n        if (m_visualBlockInsert == AppendToEndOfLineBlockInsertMode)\r\n            moveBehindEndOfLine();\r\n    } else {\r\n        m_visualBlockInsert = NoneBlockInsertMode;\r\n        leaveVisualMode();\r\n        if (command == QLatin1Char('I')) {\r\n            setDotCommand(_(\"%1i\"), count());\r\n            if (lineForPosition(anchor()) <= lineForPosition(position())) {\r\n                setPosition(qMin(anchor(), position()));\r\n                moveToStartOfLine();\r\n            }\r\n        } else if (command == QLatin1Char('A')) {\r\n            setDotCommand(_(\"%1a\"), count());\r\n            if (lineForPosition(anchor()) <= lineForPosition(position())) {\r\n                setPosition(position());\r\n                moveRight(qMin(rightDist(), 1));\r\n            } else {\r\n                setPosition(anchor());\r\n                moveToStartOfLine();\r\n            }\r\n        }\r\n    }\r\n\r\n    setAnchor();\r\n    if (m_visualBlockInsert != ChangeBlockInsertMode)\r\n        breakEditBlock();\r\n    enterInsertMode();\r\n}\r\n\r\nvoid FakeVimHandler::Private::enterCommandMode(Mode returnToMode)\r\n{\r\n    if (isNoVisualMode() && atEndOfLine())\r\n        moveLeft();\r\n    g.mode = CommandMode;\r\n    clearCommandMode();\r\n    g.returnToMode = returnToMode;\r\n}\r\n\r\nvoid FakeVimHandler::Private::enterExMode(const QString &contents)\r\n{\r\n    g.currentMessage.clear();\r\n    g.commandBuffer.clear();\r\n    if (isVisualMode())\r\n        g.commandBuffer.setContents(QString::fromLatin1(\"'<,'>\") + contents, contents.size() + 5);\r\n    else\r\n        g.commandBuffer.setContents(contents, contents.size());\r\n    g.mode = ExMode;\r\n    g.submode = NoSubMode;\r\n    g.subsubmode = NoSubSubMode;\r\n}\r\n\r\nvoid FakeVimHandler::Private::recordJump(int position)\r\n{\r\n    CursorPosition pos = position >= 0 ? CursorPosition(document(), position)\r\n                                       : CursorPosition(m_cursor);\r\n    setMark(QLatin1Char('\\''), pos);\r\n    setMark(QLatin1Char('`'), pos);\r\n    if (m_buffer->jumpListUndo.isEmpty() || m_buffer->jumpListUndo.top() != pos)\r\n        m_buffer->jumpListUndo.push(pos);\r\n    m_buffer->jumpListRedo.clear();\r\n    UNDO_DEBUG(\"jumps: \" << m_buffer->jumpListUndo);\r\n}\r\n\r\nvoid FakeVimHandler::Private::jump(int distance)\r\n{\r\n    QStack<CursorPosition> &from = (distance > 0) ? m_buffer->jumpListRedo : m_buffer->jumpListUndo;\r\n    QStack<CursorPosition> &to   = (distance > 0) ? m_buffer->jumpListUndo : m_buffer->jumpListRedo;\r\n    int len = qMin(qAbs(distance), from.size());\r\n    CursorPosition m(m_cursor);\r\n    setMark(QLatin1Char('\\''), m);\r\n    setMark(QLatin1Char('`'), m);\r\n    for (int i = 0; i < len; ++i) {\r\n        to.push(m);\r\n        setCursorPosition(from.top());\r\n        from.pop();\r\n    }\r\n}\r\n\r\nColumn FakeVimHandler::Private::indentation(const QString &line) const\r\n{\r\n    int ts = config(ConfigTabStop).toInt();\r\n    int physical = 0;\r\n    int logical = 0;\r\n    int n = line.size();\r\n    while (physical < n) {\r\n        QChar c = line.at(physical);\r\n        if (c == QLatin1Char(' '))\r\n            ++logical;\r\n        else if (c == QLatin1Char('\\t'))\r\n            logical += ts - logical % ts;\r\n        else\r\n            break;\r\n        ++physical;\r\n    }\r\n    return Column(physical, logical);\r\n}\r\n\r\nQString FakeVimHandler::Private::tabExpand(int n) const\r\n{\r\n    int ts = config(ConfigTabStop).toInt();\r\n    if (hasConfig(ConfigExpandTab) || ts < 1)\r\n        return QString(n, QLatin1Char(' '));\r\n    return QString(n / ts, QLatin1Char('\\t'))\r\n         + QString(n % ts, QLatin1Char(' '));\r\n}\r\n\r\nvoid FakeVimHandler::Private::insertAutomaticIndentation(bool goingDown, bool forceAutoIndent)\r\n{\r\n    if (!forceAutoIndent && !hasConfig(ConfigAutoIndent) && !hasConfig(ConfigSmartIndent))\r\n        return;\r\n\r\n    if (hasConfig(ConfigSmartIndent)) {\r\n        QTextBlock bl = block();\r\n        Range range(bl.position(), bl.position());\r\n        indentText(range, QLatin1Char('\\n'));\r\n    } else {\r\n        QTextBlock bl = goingDown ? block().previous() : block().next();\r\n        QString text = bl.text();\r\n        int pos = 0;\r\n        int n = text.size();\r\n        while (pos < n && text.at(pos).isSpace())\r\n            ++pos;\r\n        text.truncate(pos);\r\n        // FIXME: handle 'smartindent' and 'cindent'\r\n        insertText(text);\r\n    }\r\n}\r\n\r\nvoid FakeVimHandler::Private::handleStartOfLine()\r\n{\r\n    if (hasConfig(ConfigStartOfLine))\r\n        moveToFirstNonBlankOnLine();\r\n}\r\n\r\nvoid FakeVimHandler::Private::replay(const QString &command, int repeat)\r\n{\r\n    if (repeat <= 0)\r\n        return;\r\n\r\n    //qDebug() << \"REPLAY: \" << quoteUnprintable(command);\r\n    clearCommandMode();\r\n    Inputs inputs(command);\r\n    for (int i = 0; i < repeat; ++i) {\r\n        foreach (const Input &in, inputs) {\r\n            if (handleDefaultKey(in) != EventHandled)\r\n                return;\r\n        }\r\n    }\r\n}\r\n\r\nQString FakeVimHandler::Private::visualDotCommand() const\r\n{\r\n    QTextCursor start(m_cursor);\r\n    QTextCursor end(start);\r\n    end.setPosition(end.anchor());\r\n\r\n    QString command;\r\n\r\n    if (isVisualCharMode())\r\n        command = _(\"v\");\r\n    else if (isVisualLineMode())\r\n        command = _(\"V\");\r\n    else if (isVisualBlockMode())\r\n        command = _(\"<c-v>\");\r\n    else\r\n        return QString();\r\n\r\n    const int down = qAbs(start.blockNumber() - end.blockNumber());\r\n    if (down != 0)\r\n        command.append(QString::fromLatin1(\"%1j\").arg(down));\r\n\r\n    const int right = start.positionInBlock() - end.positionInBlock();\r\n    if (right != 0) {\r\n        command.append(QString::number(qAbs(right)));\r\n        command.append(QLatin1Char(right < 0 && isVisualBlockMode() ? 'h' : 'l'));\r\n    }\r\n\r\n    return command;\r\n}\r\n\r\nvoid FakeVimHandler::Private::selectTextObject(bool simple, bool inner)\r\n{\r\n    const int position1 = this->position();\r\n    const int anchor1 = this->anchor();\r\n    bool setupAnchor = (position1 == anchor1);\r\n    bool forward = anchor1 <= position1;\r\n    const int repeat = count();\r\n\r\n    // set anchor if not already set\r\n    if (setupAnchor) {\r\n        // Select nothing with 'inner' on empty line.\r\n        if (inner && atEmptyLine() && repeat == 1) {\r\n            g.movetype = MoveExclusive;\r\n            return;\r\n        }\r\n        moveToBoundaryStart(1, simple, false);\r\n        setAnchor();\r\n    } else if (forward) {\r\n        moveRight();\r\n        if (atEndOfLine())\r\n            moveRight();\r\n    } else {\r\n        moveLeft();\r\n        if (atBlockStart())\r\n            moveLeft();\r\n    }\r\n\r\n    if (inner) {\r\n        moveToBoundaryEnd(repeat, simple);\r\n    } else {\r\n        const int direction = forward ? 1 : -1;\r\n        for (int i = 0; i < repeat; ++i) {\r\n            // select leading spaces\r\n            bool leadingSpace = characterAtCursor().isSpace();\r\n            if (leadingSpace) {\r\n                if (forward)\r\n                    moveToNextBoundaryStart(1, simple);\r\n                else\r\n                    moveToNextBoundaryEnd(1, simple, false);\r\n            }\r\n\r\n            // select word\r\n            if (forward)\r\n                moveToWordEnd(1, simple);\r\n            else\r\n                moveToWordStart(1, simple, false);\r\n\r\n            // select trailing spaces if no leading space\r\n            QChar afterCursor = document()->characterAt(position() + direction);\r\n            if (!leadingSpace && afterCursor.isSpace() && afterCursor != ParagraphSeparator\r\n                && !atBlockStart()) {\r\n                if (forward)\r\n                    moveToNextBoundaryEnd(1, simple);\r\n                else\r\n                    moveToNextBoundaryStart(1, simple, false);\r\n            }\r\n\r\n            // if there are no trailing spaces in selection select all leading spaces\r\n            // after previous character\r\n            if (setupAnchor && (!characterAtCursor().isSpace() || atBlockEnd())) {\r\n                int min = block().position();\r\n                int pos = anchor();\r\n                while (pos >= min && document()->characterAt(--pos).isSpace()) {}\r\n                if (pos >= min)\r\n                    setAnchorAndPosition(pos + 1, position());\r\n            }\r\n\r\n            if (i + 1 < repeat) {\r\n                if (forward) {\r\n                    moveRight();\r\n                    if (atEndOfLine())\r\n                        moveRight();\r\n                } else {\r\n                    moveLeft();\r\n                    if (atBlockStart())\r\n                        moveLeft();\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    if (inner) {\r\n        g.movetype = MoveInclusive;\r\n    } else {\r\n        g.movetype = MoveExclusive;\r\n        if (isNoVisualMode()) {\r\n            moveRight();\r\n            if (atEndOfLine())\r\n                moveRight();\r\n        } else if (isVisualLineMode()) {\r\n            g.visualMode = VisualCharMode;\r\n        }\r\n    }\r\n\r\n    setTargetColumn();\r\n}\r\n\r\nvoid FakeVimHandler::Private::selectWordTextObject(bool inner)\r\n{\r\n    selectTextObject(false, inner);\r\n}\r\n\r\nvoid FakeVimHandler::Private::selectWORDTextObject(bool inner)\r\n{\r\n    selectTextObject(true, inner);\r\n}\r\n\r\nvoid FakeVimHandler::Private::selectSentenceTextObject(bool inner)\r\n{\r\n    Q_UNUSED(inner);\r\n}\r\n\r\nvoid FakeVimHandler::Private::selectParagraphTextObject(bool inner)\r\n{\r\n    Q_UNUSED(inner);\r\n}\r\n\r\nbool FakeVimHandler::Private::selectBlockTextObject(bool inner,\r\n    char left, char right)\r\n{\r\n    QString sleft = QString(QLatin1Char(left));\r\n    QString sright = QString(QLatin1Char(right));\r\n\r\n    int p1 = blockBoundary(sleft, sright, false, count());\r\n    if (p1 == -1)\r\n        return false;\r\n\r\n    int p2 = blockBoundary(sleft, sright, true, count());\r\n    if (p2 == -1)\r\n        return false;\r\n\r\n    if (inner)\r\n        p1 += sleft.size();\r\n    else\r\n        p2 -= sright.size() - 2;\r\n\r\n    if (isVisualMode())\r\n        --p2;\r\n\r\n    setAnchorAndPosition(p1, p2);\r\n    g.movetype = MoveExclusive;\r\n\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::changeNumberTextObject(int count)\r\n{\r\n    const QTextBlock block = this->block();\r\n    const QString lineText = block.text();\r\n    const int posMin = m_cursor.positionInBlock() + 1;\r\n\r\n    // find first decimal, hexadecimal or octal number under or after cursor position\r\n    QRegExp re(_(\"(0[xX])(0*[0-9a-fA-F]+)|(0)(0*[0-7]+)(?=\\\\D|$)|(\\\\d+)\"));\r\n    int pos = 0;\r\n    while ((pos = re.indexIn(lineText, pos)) != -1 && pos + re.matchedLength() < posMin)\r\n        ++pos;\r\n    if (pos == -1)\r\n        return false;\r\n    int len = re.matchedLength();\r\n    QString prefix = re.cap(1) + re.cap(3);\r\n    bool hex = prefix.length() >= 2 && (prefix[1].toLower() == QLatin1Char('x'));\r\n    bool octal = !hex && !prefix.isEmpty();\r\n    const QString num = hex ? re.cap(2) : octal ? re.cap(4) : re.cap(5);\r\n\r\n    // parse value\r\n    bool ok;\r\n    int base = hex ? 16 : octal ? 8 : 10;\r\n    qlonglong value = 0;  // decimal value\r\n    qlonglong uvalue = 0; // hexadecimal or octal value (only unsigned)\r\n    if (hex || octal)\r\n        uvalue = num.toULongLong(&ok, base);\r\n    else\r\n        value = num.toLongLong(&ok, base);\r\n    QTC_ASSERT(ok, qDebug() << \"Cannot parse number:\" << num << \"base:\" << base; return false);\r\n\r\n    // negative decimal number\r\n    if (!octal && !hex && pos > 0 && lineText[pos - 1] == QLatin1Char('-')) {\r\n        value = -value;\r\n        --pos;\r\n        ++len;\r\n    }\r\n\r\n    // result to string\r\n    QString repl;\r\n    if (hex || octal)\r\n        repl = QString::number(uvalue + count, base);\r\n    else\r\n        repl = QString::number(value + count, base);\r\n\r\n    // convert hexadecimal number to upper-case if last letter was upper-case\r\n    if (hex) {\r\n        const int lastLetter = num.lastIndexOf(QRegExp(_(\"[a-fA-F]\")));\r\n        if (lastLetter != -1 && num[lastLetter].isUpper())\r\n            repl = repl.toUpper();\r\n    }\r\n\r\n    // preserve leading zeroes\r\n    if ((octal || hex) && repl.size() < num.size())\r\n        prefix.append(QString::fromLatin1(\"0\").repeated(num.size() - repl.size()));\r\n    repl.prepend(prefix);\r\n\r\n    pos += block.position();\r\n    pushUndoState();\r\n    setAnchorAndPosition(pos, pos + len);\r\n    replaceText(currentRange(), repl);\r\n    setPosition(pos + repl.size() - 1);\r\n\r\n    return true;\r\n}\r\n\r\nbool FakeVimHandler::Private::selectQuotedStringTextObject(bool inner,\r\n    const QString &quote)\r\n{\r\n    QTextCursor tc = m_cursor;\r\n    int sz = quote.size();\r\n\r\n    QTextCursor tc1;\r\n    QTextCursor tc2(document());\r\n    while (tc2 <= tc) {\r\n        tc1 = document()->find(quote, tc2);\r\n        if (tc1.isNull())\r\n            return false;\r\n        tc2 = document()->find(quote, tc1);\r\n        if (tc2.isNull())\r\n            return false;\r\n    }\r\n\r\n    int p1 = tc1.position();\r\n    int p2 = tc2.position();\r\n    if (inner) {\r\n        p2 = qMax(p1, p2 - sz);\r\n        if (document()->characterAt(p1) == ParagraphSeparator)\r\n            ++p1;\r\n    } else {\r\n        p1 -= sz;\r\n        p2 -= sz - 1;\r\n    }\r\n\r\n    if (isVisualMode())\r\n        --p2;\r\n\r\n    setAnchorAndPosition(p1, p2);\r\n    g.movetype = MoveExclusive;\r\n\r\n    return true;\r\n}\r\n\r\nMark FakeVimHandler::Private::mark(QChar code) const\r\n{\r\n    if (isVisualMode()) {\r\n        if (code == QLatin1Char('<'))\r\n            return CursorPosition(document(), qMin(anchor(), position()));\r\n        if (code == QLatin1Char('>'))\r\n            return CursorPosition(document(), qMax(anchor(), position()));\r\n    }\r\n    if (code == QLatin1Char('.'))\r\n        return m_buffer->lastChangePosition;\r\n    if (code.isUpper())\r\n        return g.marks.value(code);\r\n\r\n    return m_buffer->marks.value(code);\r\n}\r\n\r\nvoid FakeVimHandler::Private::setMark(QChar code, CursorPosition position)\r\n{\r\n    if (code.isUpper())\r\n        g.marks[code] = Mark(position, m_currentFileName);\r\n    else\r\n        m_buffer->marks[code] = Mark(position);\r\n}\r\n\r\nbool FakeVimHandler::Private::jumpToMark(QChar mark, bool backTickMode)\r\n{\r\n    Mark m = this->mark(mark);\r\n    if (!m.isValid()) {\r\n        showMessage(MessageError, msgMarkNotSet(mark));\r\n        return false;\r\n    }\r\n    if (!m.isLocal(m_currentFileName)) {\r\n        emit q->jumpToGlobalMark(mark, backTickMode, m.fileName());\r\n        return false;\r\n    }\r\n\r\n    if ((mark == QLatin1Char('\\'') || mark == QLatin1Char('`')) && !m_buffer->jumpListUndo.isEmpty())\r\n        m_buffer->jumpListUndo.pop();\r\n    recordJump();\r\n    setCursorPosition(m.position(document()));\r\n    if (!backTickMode)\r\n        moveToFirstNonBlankOnLine();\r\n    if (g.submode == NoSubMode)\r\n        setAnchor();\r\n    setTargetColumn();\r\n\r\n    return true;\r\n}\r\n\r\nvoid FakeVimHandler::Private::updateMarks(const Marks &newMarks)\r\n{\r\n    for (MarksIterator it(newMarks); it.hasNext(); ) {\r\n        it.next();\r\n        m_buffer->marks[it.key()] = it.value();\r\n    }\r\n}\r\n\r\nRangeMode FakeVimHandler::Private::registerRangeMode(int reg) const\r\n{\r\n    bool isClipboard;\r\n    bool isSelection;\r\n    getRegisterType(reg, &isClipboard, &isSelection);\r\n\r\n    if (isClipboard || isSelection) {\r\n        QClipboard *clipboard = QApplication::clipboard();\r\n        QClipboard::Mode mode = isClipboard ? QClipboard::Clipboard : QClipboard::Selection;\r\n\r\n        // Use range mode from Vim's clipboard data if available.\r\n        const QMimeData *data = clipboard->mimeData(mode);\r\n        if (data && data->hasFormat(vimMimeText)) {\r\n            QByteArray bytes = data->data(vimMimeText);\r\n            if (bytes.length() > 0)\r\n                return static_cast<RangeMode>(bytes.at(0));\r\n        }\r\n\r\n        // If register content is clipboard:\r\n        //  - return RangeLineMode if text ends with new line char,\r\n        //  - return RangeCharMode otherwise.\r\n        QString text = clipboard->text(mode);\r\n        return (text.endsWith(QLatin1Char('\\n')) || text.endsWith(QLatin1Char('\\r'))) ? RangeLineMode : RangeCharMode;\r\n    }\r\n\r\n    return g.registers[reg].rangemode;\r\n}\r\n\r\nvoid FakeVimHandler::Private::setRegister(int reg, const QString &contents, RangeMode mode)\r\n{\r\n    bool copyToClipboard;\r\n    bool copyToSelection;\r\n    getRegisterType(reg, &copyToClipboard, &copyToSelection);\r\n\r\n    QString contents2 = contents;\r\n    if (mode == RangeLineMode && !contents2.endsWith(QLatin1Char('\\n')))\r\n        contents2.append(QLatin1Char('\\n'));\r\n\r\n    if (copyToClipboard || copyToSelection) {\r\n        if (copyToClipboard)\r\n            setClipboardData(contents2, mode, QClipboard::Clipboard);\r\n        if (copyToSelection)\r\n            setClipboardData(contents2, mode, QClipboard::Selection);\r\n    } else {\r\n        g.registers[reg].contents = contents2;\r\n        g.registers[reg].rangemode = mode;\r\n    }\r\n}\r\n\r\nQString FakeVimHandler::Private::registerContents(int reg) const\r\n{\r\n    bool copyFromClipboard;\r\n    bool copyFromSelection;\r\n    getRegisterType(reg, &copyFromClipboard, &copyFromSelection);\r\n\r\n    if (copyFromClipboard || copyFromSelection) {\r\n        QClipboard *clipboard = QApplication::clipboard();\r\n        if (copyFromClipboard)\r\n            return clipboard->text(QClipboard::Clipboard);\r\n        if (copyFromSelection)\r\n            return clipboard->text(QClipboard::Selection);\r\n    }\r\n\r\n    return g.registers[reg].contents;\r\n}\r\n\r\nvoid FakeVimHandler::Private::getRegisterType(int reg, bool *isClipboard, bool *isSelection) const\r\n{\r\n    bool clipboard = false;\r\n    bool selection = false;\r\n\r\n    if (reg == QLatin1Char('\"')) {\r\n        QStringList list = config(ConfigClipboard).toString().split(QLatin1Char(','));\r\n        clipboard = list.contains(_(\"unnamedplus\"));\r\n        selection = list.contains(_(\"unnamed\"));\r\n    } else if (reg == QLatin1Char('+')) {\r\n        clipboard = true;\r\n    } else if (reg == QLatin1Char('*')) {\r\n        selection = true;\r\n    }\r\n\r\n    // selection (primary) is clipboard on systems without selection support\r\n    if (selection && !QApplication::clipboard()->supportsSelection()) {\r\n        clipboard = true;\r\n        selection = false;\r\n    }\r\n\r\n    if (isClipboard != 0)\r\n        *isClipboard = clipboard;\r\n    if (isSelection != 0)\r\n        *isSelection = selection;\r\n}\r\n\r\n///////////////////////////////////////////////////////////////////////\r\n//\r\n// FakeVimHandler\r\n//\r\n///////////////////////////////////////////////////////////////////////\r\n\r\nFakeVimHandler::FakeVimHandler(QWidget *widget, QObject *parent)\r\n    : QObject(parent), d(new Private(this, widget))\r\n{}\r\n\r\nFakeVimHandler::~FakeVimHandler()\r\n{\r\n    delete d;\r\n}\r\n\r\n// gracefully handle that the parent editor is deleted\r\nvoid FakeVimHandler::disconnectFromEditor()\r\n{\r\n    d->m_textedit = 0;\r\n    d->m_plaintextedit = 0;\r\n}\r\n\r\nbool FakeVimHandler::eventFilter(QObject *ob, QEvent *ev)\r\n{\r\n#ifndef FAKEVIM_STANDALONE\r\n    if (!theFakeVimSetting(ConfigUseFakeVim)->value().toBool())\r\n        return QObject::eventFilter(ob, ev);\r\n#endif\r\n\r\n    // Catch mouse events on the viewport.\r\n    QWidget *viewport = 0;\r\n    if (d->m_plaintextedit)\r\n        viewport = d->m_plaintextedit->viewport();\r\n    else if (d->m_textedit)\r\n        viewport = d->m_textedit->viewport();\r\n    if (ob == viewport) {\r\n        if (ev->type() == QEvent::MouseButtonRelease) {\r\n            QMouseEvent *mev = static_cast<QMouseEvent *>(ev);\r\n            if (mev->button() == Qt::LeftButton) {\r\n                d->importSelection();\r\n                //return true;\r\n            }\r\n        }\r\n        if (ev->type() == QEvent::MouseButtonPress) {\r\n            QMouseEvent *mev = static_cast<QMouseEvent *>(ev);\r\n            if (mev->button() == Qt::LeftButton)\r\n                Private::g.visualMode = NoVisualMode;\r\n        }\r\n        return QObject::eventFilter(ob, ev);\r\n    }\r\n\r\n    if (ev->type() == QEvent::Shortcut) {\r\n        d->passShortcuts(false);\r\n        return false;\r\n    }\r\n\r\n    if (ev->type() == QEvent::InputMethod && ob == d->editor()) {\r\n        // This handles simple dead keys. The sequence of events is\r\n        // KeyRelease-InputMethod-KeyRelease  for dead keys instead of\r\n        // KeyPress-KeyRelease as for simple keys. As vi acts on key presses,\r\n        // we have to act on the InputMethod event.\r\n        // FIXME: A first approximation working for e.g. ^ on a German keyboard\r\n        QInputMethodEvent *imev = static_cast<QInputMethodEvent *>(ev);\r\n        KEY_DEBUG(\"INPUTMETHOD\" << imev->commitString() << imev->preeditString());\r\n        QString commitString = imev->commitString();\r\n        int key = commitString.size() == 1 ? commitString.at(0).unicode() : 0;\r\n        QKeyEvent kev(QEvent::KeyPress, key, Qt::KeyboardModifiers(), commitString);\r\n        EventResult res = d->handleEvent(&kev);\r\n        return res == EventHandled || res == EventCancelled;\r\n    }\r\n\r\n    if (ev->type() == QEvent::KeyPress &&\r\n        (ob == d->editor()\r\n         || (Private::g.mode == ExMode || Private::g.subsubmode == SearchSubSubMode))) {\r\n        QKeyEvent *kev = static_cast<QKeyEvent *>(ev);\r\n        KEY_DEBUG(\"KEYPRESS\" << kev->key() << kev->text() << QChar(kev->key()));\r\n        EventResult res = d->handleEvent(kev);\r\n        //if (Private::g.mode == InsertMode)\r\n        //    emit completionRequested();\r\n        // returning false core the app see it\r\n        //KEY_DEBUG(\"HANDLED CODE:\" << res);\r\n        //return res != EventPassedToCore;\r\n        //return true;\r\n        return res == EventHandled || res == EventCancelled;\r\n    }\r\n\r\n    if (ev->type() == QEvent::ShortcutOverride && ob == d->editor()) {\r\n        QKeyEvent *kev = static_cast<QKeyEvent *>(ev);\r\n        if (d->wantsOverride(kev)) {\r\n            KEY_DEBUG(\"OVERRIDING SHORTCUT\" << kev->key());\r\n            ev->accept(); // accepting means \"don't run the shortcuts\"\r\n            return true;\r\n        }\r\n        KEY_DEBUG(\"NO SHORTCUT OVERRIDE\" << kev->key());\r\n        return true;\r\n    }\r\n\r\n    if (ev->type() == QEvent::FocusIn && ob == d->editor())\r\n        d->focus();\r\n\r\n    return QObject::eventFilter(ob, ev);\r\n}\r\n\r\nvoid FakeVimHandler::installEventFilter()\r\n{\r\n    d->installEventFilter();\r\n}\r\n\r\nvoid FakeVimHandler::setupWidget()\r\n{\r\n    d->setupWidget();\r\n}\r\n\r\nvoid FakeVimHandler::restoreWidget(int tabSize)\r\n{\r\n    d->restoreWidget(tabSize);\r\n}\r\n\r\nvoid FakeVimHandler::handleCommand(const QString &cmd)\r\n{\r\n    d->enterFakeVim();\r\n    d->handleCommand(cmd);\r\n    d->leaveFakeVim();\r\n}\r\n\r\nvoid FakeVimHandler::handleReplay(const QString &keys)\r\n{\r\n    d->enterFakeVim();\r\n    d->replay(keys);\r\n    d->leaveFakeVim();\r\n}\r\n\r\nvoid FakeVimHandler::handleInput(const QString &keys)\r\n{\r\n    Inputs inputs(keys);\r\n    d->enterFakeVim();\r\n    foreach (const Input &input, inputs)\r\n        d->handleKey(input);\r\n    d->leaveFakeVim();\r\n}\r\n\r\nvoid FakeVimHandler::setCurrentFileName(const QString &fileName)\r\n{\r\n    d->m_currentFileName = fileName;\r\n}\r\n\r\nQString FakeVimHandler::currentFileName() const\r\n{\r\n    return d->m_currentFileName;\r\n}\r\n\r\nvoid FakeVimHandler::showMessage(MessageLevel level, const QString &msg)\r\n{\r\n    d->showMessage(level, msg);\r\n}\r\n\r\nQWidget *FakeVimHandler::widget()\r\n{\r\n    return d->editor();\r\n}\r\n\r\n// Test only\r\nint FakeVimHandler::physicalIndentation(const QString &line) const\r\n{\r\n    Column ind = d->indentation(line);\r\n    return ind.physical;\r\n}\r\n\r\nint FakeVimHandler::logicalIndentation(const QString &line) const\r\n{\r\n    Column ind = d->indentation(line);\r\n    return ind.logical;\r\n}\r\n\r\nQString FakeVimHandler::tabExpand(int n) const\r\n{\r\n    return d->tabExpand(n);\r\n}\r\n\r\nvoid FakeVimHandler::miniBufferTextEdited(const QString &text, int cursorPos, int anchorPos)\r\n{\r\n    d->miniBufferTextEdited(text, cursorPos, anchorPos);\r\n}\r\n\r\nvoid FakeVimHandler::setTextCursorPosition(int position)\r\n{\r\n    int pos = qMax(0, qMin(position, d->lastPositionInDocument()));\r\n    if (d->isVisualMode())\r\n        d->setPosition(pos);\r\n    else\r\n        d->setAnchorAndPosition(pos, pos);\r\n    d->m_fakeEnd = false;\r\n    d->setTargetColumn();\r\n\r\n    if (!d->m_inFakeVim)\r\n        d->commitCursor();\r\n}\r\n\r\nQTextCursor FakeVimHandler::textCursor() const\r\n{\r\n    return d->m_cursor;\r\n}\r\n\r\nvoid FakeVimHandler::setTextCursor(const QTextCursor &cursor)\r\n{\r\n    d->m_cursor = cursor;\r\n}\r\n\r\nbool FakeVimHandler::jumpToLocalMark(QChar mark, bool backTickMode)\r\n{\r\n    return d->jumpToMark(mark, backTickMode);\r\n}\r\n\r\n} // namespace Internal\r\n} // namespace FakeVim\r\n\r\nQ_DECLARE_METATYPE(FakeVim::Internal::FakeVimHandler::Private::BufferDataPtr)\r\n\r\n#include \"fakevimhandler.moc\"\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/fakevim/fakevimhandler.h",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\r\n** Contact: http://www.qt-project.org/legal\r\n**\r\n** This file is part of Qt Creator.\r\n**\r\n** Commercial License Usage\r\n** Licensees holding valid commercial Qt licenses may use this file in\r\n** accordance with the commercial license agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and Digia.  For licensing terms and\r\n** conditions see http://qt.digia.com/licensing.  For further information\r\n** use the contact form at http://qt.digia.com/contact-us.\r\n**\r\n** GNU Lesser General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU Lesser\r\n** General Public License version 2.1 as published by the Free Software\r\n** Foundation and appearing in the file LICENSE.LGPL included in the\r\n** packaging of this file.  Please review the following information to\r\n** ensure the GNU Lesser General Public License version 2.1 requirements\r\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r\n**\r\n** In addition, as a special exception, Digia gives you certain additional\r\n** rights.  These rights are described in the Digia Qt LGPL Exception\r\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n****************************************************************************/\r\n\r\n#ifndef FAKEVIM_HANDLER_H\r\n#define FAKEVIM_HANDLER_H\r\n\r\n#include <QObject>\r\n#include <QTextEdit>\r\n\r\nnamespace FakeVim {\r\nnamespace Internal {\r\n\r\nenum RangeMode\r\n{\r\n    // Reordering first three enum items here will break\r\n    // compatibility with clipboard format stored by Vim.\r\n    RangeCharMode,         // v\r\n    RangeLineMode,         // V\r\n    RangeBlockMode,        // Ctrl-v\r\n    RangeLineModeExclusive,\r\n    RangeBlockAndTailMode // Ctrl-v for D and X\r\n};\r\n\r\nstruct Range\r\n{\r\n    Range();\r\n    Range(int b, int e, RangeMode m = RangeCharMode);\r\n    QString toString() const;\r\n    bool isValid() const;\r\n\r\n    int beginPos;\r\n    int endPos;\r\n    RangeMode rangemode;\r\n};\r\n\r\nstruct ExCommand\r\n{\r\n    ExCommand() : hasBang(false), count(1) {}\r\n    ExCommand(const QString &cmd, const QString &args = QString(),\r\n        const Range &range = Range());\r\n\r\n    bool matches(const QString &min, const QString &full) const;\r\n\r\n    QString cmd;\r\n    bool hasBang;\r\n    QString args;\r\n    Range range;\r\n    int count;\r\n};\r\n\r\n// message levels sorted by severity\r\nenum MessageLevel\r\n{\r\n    MessageMode,    // show current mode (format \"-- %1 --\")\r\n    MessageCommand, // show last Ex command or search\r\n    MessageInfo,    // result of a command\r\n    MessageWarning, // warning\r\n    MessageError,   // error\r\n    MessageShowCmd  // partial command\r\n};\r\n\r\nclass FakeVimHandler : public QObject\r\n{\r\n    Q_OBJECT\r\n\r\npublic:\r\n    explicit FakeVimHandler(QWidget *widget, QObject *parent = 0);\r\n    ~FakeVimHandler();\r\n\r\n    QWidget *widget();\r\n\r\n    // call before widget is deleted\r\n    void disconnectFromEditor();\r\n\r\npublic slots:\r\n    void setCurrentFileName(const QString &fileName);\r\n    QString currentFileName() const;\r\n\r\n    void showMessage(MessageLevel level, const QString &msg);\r\n\r\n    // This executes an \"ex\" style command taking context\r\n    // information from the current widget.\r\n    void handleCommand(const QString &cmd);\r\n    void handleReplay(const QString &keys);\r\n    void handleInput(const QString &keys);\r\n\r\n    void installEventFilter();\r\n\r\n    // Convenience\r\n    void setupWidget();\r\n    void restoreWidget(int tabSize);\r\n\r\n    // Test only\r\n    int physicalIndentation(const QString &line) const;\r\n    int logicalIndentation(const QString &line) const;\r\n    QString tabExpand(int n) const;\r\n\r\n    void miniBufferTextEdited(const QString &text, int cursorPos, int anchorPos);\r\n\r\n    // Set text cursor position. Keeps anchor if in visual mode.\r\n    void setTextCursorPosition(int position);\r\n\r\n    QTextCursor textCursor() const;\r\n    void setTextCursor(const QTextCursor &cursor);\r\n\r\n    bool jumpToLocalMark(QChar mark, bool backTickMode);\r\n\r\n    bool eventFilter(QObject *ob, QEvent *ev);\r\n\r\nsignals:\r\n    void commandBufferChanged(const QString &msg, int cursorPos,\r\n        int anchorPos, int messageLevel, QObject *eventFilter);\r\n    void statusDataChanged(const QString &msg);\r\n    void extraInformationChanged(const QString &msg);\r\n    void selectionChanged(const QList<QTextEdit::ExtraSelection> &selection);\r\n    void highlightMatches(const QString &needle);\r\n    void writeAllRequested(QString *error);\r\n    void moveToMatchingParenthesis(bool *moved, bool *forward, QTextCursor *cursor);\r\n    void checkForElectricCharacter(bool *result, QChar c);\r\n    void indentRegion(int beginLine, int endLine, QChar typedChar);\r\n    void completionRequested();\r\n    void simpleCompletionRequested(const QString &needle, bool forward);\r\n    void windowCommandRequested(const QString &key, int count);\r\n    void findRequested(bool reverse);\r\n    void findNextRequested(bool reverse);\r\n    void handleExCommandRequested(bool *handled, const ExCommand &cmd);\r\n    void requestDisableBlockSelection();\r\n    void requestSetBlockSelection(const QTextCursor&);\r\n    void requestBlockSelection(QTextCursor*);\r\n    void requestHasBlockSelection(bool *on);\r\n    void foldToggle(int depth);\r\n    void foldAll(bool fold);\r\n    void fold(int depth, bool fold);\r\n    void foldGoTo(int count, bool current);\r\n    void jumpToGlobalMark(QChar mark, bool backTickMode, const QString &fileName);\r\n\r\npublic:\r\n    class Private;\r\n\r\nprivate:\r\n    Private *d;\r\n};\r\n\r\n} // namespace Internal\r\n} // namespace FakeVim\r\n\r\nQ_DECLARE_METATYPE(FakeVim::Internal::ExCommand)\r\n\r\n\r\n#endif // FAKEVIM_HANDLER_H\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/fakevim/utils/hostosinfo.h",
    "content": "/**************************************************************************\r\n**\r\n** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).\r\n** Contact: http://www.qt-project.org/legal\r\n**\r\n** This file is part of Qt Creator.\r\n**\r\n** Commercial License Usage\r\n** Licensees holding valid commercial Qt licenses may use this file in\r\n** accordance with the commercial license agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and Digia.  For licensing terms and\r\n** conditions see http://qt.digia.com/licensing.  For further information\r\n** use the contact form at http://qt.digia.com/contact-us.\r\n**\r\n** GNU Lesser General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU Lesser\r\n** General Public License version 2.1 as published by the Free Software\r\n** Foundation and appearing in the file LICENSE.LGPL included in the\r\n** packaging of this file.  Please review the following information to\r\n** ensure the GNU Lesser General Public License version 2.1 requirements\r\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r\n**\r\n** In addition, as a special exception, Digia gives you certain additional\r\n** rights.  These rights are described in the Digia Qt LGPL Exception\r\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n****************************************************************************/\r\n\r\n#ifndef HOSTOSINFO_H\r\n#define HOSTOSINFO_H\r\n\r\n#include \"utils_global.h\"\r\n\r\n#include <QString>\r\n\r\n#ifdef Q_OS_WIN\r\n#define QTC_HOST_EXE_SUFFIX \".exe\"\r\n#else\r\n#define QTC_HOST_EXE_SUFFIX \"\"\r\n#endif // Q_OS_WIN\r\n\r\nnamespace Utils {\r\n\r\nclass QTCREATOR_UTILS_EXPORT HostOsInfo\r\n{\r\npublic:\r\n    // Add more as needed.\r\n    enum HostOs { HostOsWindows, HostOsLinux, HostOsMac, HostOsOtherUnix, HostOsOther };\r\n    static inline HostOs hostOs();\r\n\r\n    enum HostArchitecture { HostArchitectureX86, HostArchitectureAMD64, HostArchitectureItanium,\r\n                            HostArchitectureArm, HostArchitectureUnknown };\r\n    static HostArchitecture hostArchitecture();\r\n\r\n    static bool isWindowsHost() { return hostOs() == HostOsWindows; }\r\n    static bool isLinuxHost() { return hostOs() == HostOsLinux; }\r\n    static bool isMacHost() { return hostOs() == HostOsMac; }\r\n    static inline bool isAnyUnixHost();\r\n\r\n    static QString withExecutableSuffix(const QString &executable)\r\n    {\r\n        QString finalName = executable;\r\n        if (isWindowsHost())\r\n            finalName += QLatin1String(QTC_HOST_EXE_SUFFIX);\r\n        return finalName;\r\n    }\r\n\r\n    static Qt::CaseSensitivity fileNameCaseSensitivity()\r\n    {\r\n        return isWindowsHost() ? Qt::CaseInsensitive: Qt::CaseSensitive;\r\n    }\r\n\r\n    static QChar pathListSeparator()\r\n    {\r\n        return isWindowsHost() ? QLatin1Char(';') : QLatin1Char(':');\r\n    }\r\n\r\n    static Qt::KeyboardModifier controlModifier()\r\n    {\r\n        return isMacHost() ? Qt::MetaModifier : Qt::ControlModifier;\r\n    }\r\n};\r\n\r\nHostOsInfo::HostOs HostOsInfo::hostOs()\r\n{\r\n#if defined(Q_OS_WIN)\r\n    return HostOsWindows;\r\n#elif defined(Q_OS_LINUX)\r\n    return HostOsLinux;\r\n#elif defined(Q_OS_MAC)\r\n    return HostOsMac;\r\n#elif defined(Q_OS_UNIX)\r\n    return HostOsOtherUnix;\r\n#else\r\n    return HostOsOther;\r\n#endif\r\n}\r\n\r\nbool HostOsInfo::isAnyUnixHost()\r\n{\r\n#ifdef Q_OS_UNIX\r\n    return true;\r\n#else\r\n    return false;\r\n#endif\r\n}\r\n\r\n} // namespace Utils\r\n\r\n#endif // HOSTOSINFO_H\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/fakevim/utils/qtcassert.cpp",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).\r\n** Contact: http://www.qt-project.org/legal\r\n**\r\n** This file is part of Qt Creator.\r\n**\r\n** Commercial License Usage\r\n** Licensees holding valid commercial Qt licenses may use this file in\r\n** accordance with the commercial license agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and Digia.  For licensing terms and\r\n** conditions see http://qt.digia.com/licensing.  For further information\r\n** use the contact form at http://qt.digia.com/contact-us.\r\n**\r\n** GNU Lesser General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU Lesser\r\n** General Public License version 2.1 as published by the Free Software\r\n** Foundation and appearing in the file LICENSE.LGPL included in the\r\n** packaging of this file.  Please review the following information to\r\n** ensure the GNU Lesser General Public License version 2.1 requirements\r\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r\n**\r\n** In addition, as a special exception, Digia gives you certain additional\r\n** rights.  These rights are described in the Digia Qt LGPL Exception\r\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n****************************************************************************/\r\n\r\n#include \"qtcassert.h\"\r\n\r\nnamespace Utils {\r\n\r\nvoid writeAssertLocation(const char *msg)\r\n{\r\n    qDebug(\"SOFT ASSERT: %s\", msg);\r\n}\r\n\r\n} // namespace Utils\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/fakevim/utils/qtcassert.h",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).\r\n** Contact: http://www.qt-project.org/legal\r\n**\r\n** This file is part of Qt Creator.\r\n**\r\n** Commercial License Usage\r\n** Licensees holding valid commercial Qt licenses may use this file in\r\n** accordance with the commercial license agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and Digia.  For licensing terms and\r\n** conditions see http://qt.digia.com/licensing.  For further information\r\n** use the contact form at http://qt.digia.com/contact-us.\r\n**\r\n** GNU Lesser General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU Lesser\r\n** General Public License version 2.1 as published by the Free Software\r\n** Foundation and appearing in the file LICENSE.LGPL included in the\r\n** packaging of this file.  Please review the following information to\r\n** ensure the GNU Lesser General Public License version 2.1 requirements\r\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r\n**\r\n** In addition, as a special exception, Digia gives you certain additional\r\n** rights.  These rights are described in the Digia Qt LGPL Exception\r\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n****************************************************************************/\r\n\r\n#ifndef QTC_ASSERT_H\r\n#define QTC_ASSERT_H\r\n\r\n#include \"utils_global.h\"\r\n\r\nnamespace Utils { QTCREATOR_UTILS_EXPORT void writeAssertLocation(const char *msg); }\r\n\r\n#define QTC_ASSERT_STRINGIFY_HELPER(x) #x\r\n#define QTC_ASSERT_STRINGIFY(x) QTC_ASSERT_STRINGIFY_HELPER(x)\r\n#define QTC_ASSERT_STRING(cond) ::Utils::writeAssertLocation(\\\r\n    \"\\\"\" cond\"\\\" in file \" __FILE__ \", line \" QTC_ASSERT_STRINGIFY(__LINE__))\r\n\r\n// The 'do {...} while (0)' idiom is not used for the main block here to be\r\n// able to use 'break' and 'continue' as 'actions'.\r\n\r\n#define QTC_ASSERT(cond, action) if (cond) {} else { QTC_ASSERT_STRING(#cond); action; } do {} while (0)\r\n#define QTC_CHECK(cond) if (cond) {} else { QTC_ASSERT_STRING(#cond); } do {} while (0)\r\n\r\n#endif // QTC_ASSERT_H\r\n\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/fakevim/utils/utils.pri",
    "content": "INCLUDEPATH += $$PWD\r\n\r\nHEADERS += $$PWD/hostosinfo.h\r\n\r\nSOURCES += $$PWD/qtcassert.cpp\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/fakevim/utils/utils_global.h",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).\r\n** Contact: http://www.qt-project.org/legal\r\n**\r\n** This file is part of Qt Creator.\r\n**\r\n** Commercial License Usage\r\n** Licensees holding valid commercial Qt licenses may use this file in\r\n** accordance with the commercial license agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and Digia.  For licensing terms and\r\n** conditions see http://qt.digia.com/licensing.  For further information\r\n** use the contact form at http://qt.digia.com/contact-us.\r\n**\r\n** GNU Lesser General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU Lesser\r\n** General Public License version 2.1 as published by the Free Software\r\n** Foundation and appearing in the file LICENSE.LGPL included in the\r\n** packaging of this file.  Please review the following information to\r\n** ensure the GNU Lesser General Public License version 2.1 requirements\r\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r\n**\r\n** In addition, as a special exception, Digia gives you certain additional\r\n** rights.  These rights are described in the Digia Qt LGPL Exception\r\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n****************************************************************************/\r\n\r\n#ifndef UTILS_GLOBAL_H\r\n#define UTILS_GLOBAL_H\r\n\r\n#include <qglobal.h>\r\n\r\n#define QTCREATOR_UTILS_EXPORT\r\n\r\n//#if defined(QTCREATOR_UTILS_LIB)\r\n//#  define QTCREATOR_UTILS_EXPORT Q_DECL_EXPORT\r\n//#elif  defined(QTCREATOR_UTILS_STATIC_LIB) // Abuse single files for manual tests\r\n//#  define QTCREATOR_UTILS_EXPORT\r\n//#else\r\n//#  define QTCREATOR_UTILS_EXPORT Q_DECL_IMPORT\r\n//#endif\r\n\r\n#endif // UTILS_GLOBAL_H\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/fakevim.pro",
    "content": "TEMPLATE = subdirs\r\nSUBDIRS += fakevim #test\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/python/README.md",
    "content": "Python Bindings for FakeVim\r\n===========================\r\n\r\nFew notes:\r\n * Bindings build process is handled using\r\n   PyQt's [SIP](http://pyqt.sourceforge.net/Docs/sip4/index.html).\r\n * Debug build is enabled by default\r\n * Compile FakeVim library and binndings with same version of Qt.\r\n * Use same major version of python to build and run.\r\n\r\nTo build run bash script `build.sh` or just create `build` sub-directory in\r\nthis directory and from there run `configure.py`, `qmake` and `make`.\r\n\r\nTo install run `make install` from `build` sub-directory.\r\n\r\nOn Ubuntu 14.04, package `pyqt5-dev` must be installed. Additionally build\r\nscript needs to be invoked with following command.\r\n```\r\nPYTHON=python3 ./build.sh\r\n```\r\n\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/python/build.sh",
    "content": "#!/bin/bash\r\n# Example (see variable exports below):\r\n#   QMAKE=qmake-qt4 PYTHON=python2 ./python/build.sh\r\n#\r\n# Note: FakeVim library must be built with same version of Qt.\r\n\r\nset -e -x\r\n\r\n# Executable paths\r\nexport QMAKE=${QMAKE:-qmake}\r\nexport SIP=${SIP:-sip}\r\nexport PYTHON=${PYTHON:-python}\r\n\r\n# Project and library paths\r\nexport PROJECT_PATH=${PROJECT_PATH:-\"$PWD\"}\r\nexport LIBRARY_PATH=${LIBRARY_PATH:-\"$PROJECT_PATH/fakevim\"}\r\nexport SIP_FILE_PATH=${SIP_FILE_PATH:-\"$PROJECT_PATH/python/fakevim.sip\"}\r\n\r\n# PyQt path to sip files (e.g. \"QtCore/QtCoremod.sip\"). Defaults to\r\n# \"/usr/share/sip/PyQt4\" or \"/usr/share/sip/PyQt5\" depending on Qt version.\r\nexport PYQT_INCLUDE_PATH=${PYQT_INCLUDE_PATH:-\"\"}\r\n\r\n# remove previous build\r\nrm -rf build\r\n\r\n# build in separate directory\r\nmkdir -p build\r\ncd build\r\n\r\n# generate files\r\n\"$PYTHON\" \"$PROJECT_PATH/python/configure.py\"\r\n\r\n# build\r\n\"$QMAKE\" .\r\nmake\r\n\r\n# test\r\nexport PYTHONPATH=$PWD\r\n\"$PYTHON\" \"$PROJECT_PATH/python/test.py\"\r\n\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/python/configure.py",
    "content": "#!/usr/bin/env python\r\nimport sipconfig\r\nimport subprocess\r\nimport os\r\nimport site\r\n\r\nfrom distutils import sysconfig\r\n\r\ndef commandOutput(cmd, arguments):\r\n    return subprocess.check_output([cmd] + arguments).strip().decode('utf-8')\r\n\r\ndef getEnv(name, default):\r\n    return os.environ.get(name) or default\r\n\r\nclass Config:\r\n    def __init__(self, qmakePath):\r\n        self.__qmakePath = qmakePath\r\n\r\n        qtVersion = self.qmakeVariable('QT_VERSION')\r\n        self.__hasQt4 = qtVersion.startswith('4.')\r\n        self.__hasQt5 = qtVersion.startswith('5.')\r\n\r\n        if self.__hasQt5:\r\n            from PyQt5.QtCore import PYQT_CONFIGURATION\r\n            self.__sipFlags = PYQT_CONFIGURATION['sip_flags']\r\n        elif self.__hasQt4:\r\n            try:\r\n                from PyQt4.QtCore import PYQT_CONFIGURATION\r\n                self.__sipFlags = PYQT_CONFIGURATION['sip_flags']\r\n            except ImportError:\r\n                from PyQt4 import pyqtconfig\r\n                config = pyqtconfig.Configuration()\r\n                self.__sipFlags = config.pyqt_sip_flags\r\n        else:\r\n            raise Exception('Qt version 4 or 5 is required!')\r\n\r\n    def qmakeOutput(self, *arguments):\r\n        return commandOutput(self.__qmakePath, list(arguments))\r\n\r\n    def qmakeVariable(self, name):\r\n        return self.qmakeOutput('-query', name)\r\n\r\n    def sipFlags(self):\r\n        return self.__sipFlags\r\n\r\n    def hasQt4(self):\r\n        return self.__hasQt4\r\n\r\n    def hasQt5(self):\r\n        return self.__hasQt5\r\n\r\ndef main():\r\n    qmakePath = getEnv('QMAKE', 'qmake')\r\n    sipPath = getEnv('SIP', 'sip')\r\n\r\n    sipConfig = sipconfig.Configuration()\r\n    config = Config(qmakePath)\r\n\r\n    projectPath = getEnv('PROJECT_PATH', '../..')\r\n    libraryPath = getEnv('LIBRARY_PATH', projectPath + '/fakevim')\r\n    sipFilePath = getEnv('SIP_FILE_PATH', projectPath + '/python/fakevim.sip')\r\n    pyQtIncludePath = getEnv('PYQT_INCLUDE_PATH',\r\n            '/usr/share/sip/PyQt' + (config.hasQt5() and '5' or '4'))\r\n\r\n    commandOutput(sipPath, config.sipFlags().split(' ') + [\r\n        '-I', pyQtIncludePath,\r\n        '-b', 'fakevim_python.pro',\r\n        '-o', '-c', '.',\r\n        sipFilePath\r\n        ])\r\n\r\n    with open('fakevim_python.pro', 'a') as pro:\r\n        pro.write(\r\n        '''\r\n        TEMPLATE = lib\r\n        CONFIG += release plugin no_plugin_name_prefix\r\n        QT += widgets\r\n\r\n        TARGET = $$target\r\n        HEADERS = $$headers \"{projectPythonInclude}/fakevimproxy.h\"\r\n        SOURCES = $$sources \"{projectPythonInclude}/fakevimproxy.cpp\"\r\n\r\n        INCLUDEPATH += \"{sipInclude}\" \"{pythonInclude}\" \"{projectInclude}\" \"{projectPythonInclude}\"\r\n        LIBS += -Wl,-rpath,\"{libraryPath}\" -L\"{libraryPath}\" -lfakevim \"{pythonLibrary}\"\r\n        DEFINES += FAKEVIM_PYQT_MAJOR_VERSION={qtVersion}\r\n\r\n        isEmpty(PREFIX) {{\r\n            PREFIX = \"{installPath}\"\r\n        }}\r\n\r\n        target.path = $$PREFIX\r\n        INSTALLS += target\r\n        '''.format(\r\n            pythonInclude = sysconfig.get_python_inc(),\r\n            sipInclude = sipConfig.sip_inc_dir,\r\n            projectInclude = projectPath,\r\n            projectPythonInclude = projectPath + \"/python\",\r\n            libraryPath = libraryPath,\r\n            pythonLibrary = sysconfig.get_config_var('LIBDIR') +\r\n                \"/\" + sysconfig.get_config_var('MULTIARCH') +\r\n                \"/\" + sysconfig.get_config_var('LDLIBRARY'),\r\n            qtVersion = config.hasQt5() and 5 or 4,\r\n            installPath = site.getusersitepackages()\r\n            ).replace('\\n        ', '\\n')\r\n        )\r\n\r\nif __name__ == \"__main__\":\r\n    main()\r\n\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/python/fakevim.sip",
    "content": "%Module FakeVim\r\n\r\n%Import QtCore/QtCoremod.sip\r\n%Import QtGui/QtGuimod.sip\r\n\r\n%If (Qt_5_0_0 -)\r\n    %Import QtWidgets/QtWidgetsmod.sip\r\n%End\r\n\r\n\r\nint FAKEVIM_PYQT_VERSION;\r\n\r\n%ModuleCode\r\n#include <fakevim/fakevimhandler.h>\r\nstatic const int FAKEVIM_PYQT_VERSION = FAKEVIM_PYQT_MAJOR_VERSION;\r\n%End\r\n\r\nenum RangeMode\r\n{\r\n    // Reordering first three enum items here will break\r\n    // compatibility with clipboard format stored by Vim.\r\n    RangeCharMode,         // v\r\n    RangeLineMode,         // V\r\n    RangeBlockMode,        // Ctrl-v\r\n    RangeLineModeExclusive,\r\n    RangeBlockAndTailMode // Ctrl-v for D and X\r\n};\r\n\r\nstruct Range\r\n{\r\n\r\n%TypeHeaderCode\r\n#include <fakevim/fakevimhandler.h>\r\nusing namespace FakeVim::Internal;\r\n%End\r\n\r\n    Range();\r\n    Range(int b, int e, RangeMode m = RangeCharMode);\r\n    QString toString() const;\r\n    bool isValid() const;\r\n\r\n    int beginPos;\r\n    int endPos;\r\n    RangeMode rangemode;\r\n};\r\n\r\nstruct ExCommand\r\n{\r\n\r\n%TypeHeaderCode\r\n#include <fakevim/fakevimhandler.h>\r\nusing namespace FakeVim::Internal;\r\n%End\r\n\r\n    ExCommand();\r\n    ExCommand(const QString &cmd, const QString &args = QString(),\r\n        const Range &range = Range());\r\n\r\n    bool matches(const QString &min, const QString &full) const;\r\n\r\n    QString cmd;\r\n    bool hasBang;\r\n    QString args;\r\n    Range range;\r\n    int count;\r\n};\r\n\r\n// message levels sorted by severity\r\nenum MessageLevel\r\n{\r\n    MessageMode,    // show current mode (format \"-- %1 --\")\r\n    MessageCommand, // show last Ex command or search\r\n    MessageInfo,    // result of a command\r\n    MessageWarning, // warning\r\n    MessageError,   // error\r\n    MessageShowCmd  // partial command\r\n};\r\n\r\nclass FakeVimHandler : QObject /NoDefaultCtors/ {\r\n\r\n%TypeHeaderCode\r\n#include <fakevim/fakevimhandler.h>\r\nusing namespace FakeVim::Internal;\r\n%End\r\n\r\npublic:\r\n    explicit FakeVimHandler(QWidget *widget, QObject *parent /TransferThis/ = 0);\r\n\r\n    ~FakeVimHandler();\r\n\r\n    QWidget *widget();\r\n\r\n    // call before widget is deleted\r\n    void disconnectFromEditor();\r\n\r\npublic slots:\r\n    void setCurrentFileName(const QString &fileName);\r\n    QString currentFileName() const;\r\n\r\n    void showMessage(MessageLevel level, const QString &msg);\r\n\r\n    // This executes an \"ex\" style command taking context\r\n    // information from the current widget.\r\n    void handleCommand(const QString &cmd);\r\n    void handleReplay(const QString &keys);\r\n    void handleInput(const QString &keys);\r\n\r\n    void installEventFilter();\r\n\r\n    // Convenience\r\n    void setupWidget();\r\n    void restoreWidget(int tabSize);\r\n\r\n    // Test only\r\n    int physicalIndentation(const QString &line) const;\r\n    int logicalIndentation(const QString &line) const;\r\n    QString tabExpand(int n) const;\r\n\r\n    void miniBufferTextEdited(const QString &text, int cursorPos, int anchorPos);\r\n\r\n    // Set text cursor position. Keeps anchor if in visual mode.\r\n    void setTextCursorPosition(int position);\r\n\r\n    QTextCursor textCursor() const;\r\n    void setTextCursor(const QTextCursor &cursor);\r\n\r\n    bool jumpToLocalMark(QChar mark, bool backTickMode);\r\n\r\nprivate:\r\n    virtual bool handleExCommand(const ExCommand &cmd);\r\n};\r\n\r\nclass FakeVimProxy : QObject /NoDefaultCtors/ {\r\n%TypeHeaderCode\r\n#include <fakevimproxy.h>\r\n%End\r\n\r\npublic:\r\n    explicit FakeVimProxy(QObject *handler, QObject *parent /TransferThis/ = 0);\r\n\r\n    virtual void commandBufferChanged(const QString &msg, int cursorPos,\r\n            int anchorPos, int messageLevel, QObject *eventFilter);\r\n    virtual void statusDataChanged(const QString &msg);\r\n    virtual void extraInformationChanged(const QString &msg);\r\n    virtual void selectionChanged(const QList<QTextEdit::ExtraSelection> &selection);\r\n    virtual void highlightMatches(const QString &needle);\r\n    virtual QString writeAllRequested();\r\n    virtual QTextCursor moveToMatchingParenthesis();\r\n    virtual bool checkForElectricCharacter(QChar c);\r\n    virtual void indentRegion(int beginLine, int endLine, QChar typedChar);\r\n    virtual void completionRequested();\r\n    virtual void simpleCompletionRequested(const QString &needle, bool forward);\r\n    virtual void windowCommandRequested(const QString &key, int count);\r\n    virtual void findRequested(bool reverse);\r\n    virtual void findNextRequested(bool reverse);\r\n    virtual bool handleExCommand(const ExCommand &);\r\n    virtual void disableBlockSelection();\r\n    virtual void enableBlockSelection(const QTextCursor &cursor);\r\n    virtual QTextCursor blockSelection();\r\n    virtual bool hasBlockSelection();\r\n    virtual void foldToggle(int depth);\r\n    virtual void foldAll(bool fold);\r\n    virtual void fold(int depth, bool fold);\r\n    virtual void foldGoTo(int count, bool current);\r\n    virtual void jumpToGlobalMark(QChar mark, bool backTickMode, const QString &fileName);\r\n};\r\n\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/python/fakevimproxy.cpp",
    "content": "#include \"python/fakevimproxy.h\"\r\n\r\n#include <QMetaMethod>\r\n#include <QMetaObject>\r\n#include <QObject>\r\n#include <QString>\r\n#include <QTextCursor>\r\n#include <QTextEdit>\r\n\r\nFakeVimProxy::FakeVimProxy(QObject *handler, QObject *parent)\r\n    : QObject(parent)\r\n{\r\n    const QMetaObject *mo = metaObject();\r\n\r\n    for (int i = 0; i < mo->methodCount(); ++i) {\r\n        QMetaMethod method = mo->method(i);\r\n        QByteArray signature =\r\n#if QT_VERSION < 0x050000\r\n            method.signature();\r\n#else\r\n            method.methodSignature();\r\n#endif\r\n\r\n        if (method.methodType() == QMetaMethod::Slot && signature.startsWith(\"on_\")) {\r\n            const QByteArray signalSignature = signature.mid(3);\r\n            const int signalIndex = handler->metaObject()->indexOfSignal(signalSignature);\r\n            Q_ASSERT(signalIndex != -1);\r\n            connect(handler, handler->metaObject()->method(signalIndex), this, method);\r\n        }\r\n    }\r\n\r\n}\r\n\r\nvoid FakeVimProxy::on_commandBufferChanged(const QString &msg, int cursorPos,\r\n        int anchorPos, int messageLevel, QObject *eventFilter)\r\n{\r\n    commandBufferChanged(msg, cursorPos, anchorPos, messageLevel, eventFilter);\r\n}\r\n\r\nvoid FakeVimProxy::on_statusDataChanged(const QString &msg)\r\n{\r\n    statusDataChanged(msg);\r\n}\r\n\r\n\r\nvoid FakeVimProxy::on_extraInformationChanged(const QString &msg)\r\n{\r\n    extraInformationChanged(msg);\r\n}\r\n\r\nvoid FakeVimProxy::on_selectionChanged(const QList<QTextEdit::ExtraSelection> &selection)\r\n{\r\n    selectionChanged(selection);\r\n}\r\n\r\nvoid FakeVimProxy::on_highlightMatches(const QString &needle)\r\n{\r\n    highlightMatches(needle);\r\n}\r\n\r\nvoid FakeVimProxy::on_writeAllRequested(QString *error)\r\n{\r\n    *error = writeAllRequested();\r\n}\r\n\r\nvoid FakeVimProxy::on_moveToMatchingParenthesis(bool *moved, bool *forward, QTextCursor *cursor)\r\n{\r\n    const QTextCursor cursor2 = moveToMatchingParenthesis();\r\n    *moved = cursor2.isNull();\r\n    if (*moved) {\r\n        *moved = true;\r\n        *forward = cursor2.position() > cursor->position();\r\n        *cursor = cursor2;\r\n    }\r\n}\r\n\r\nvoid FakeVimProxy::on_checkForElectricCharacter(bool *result, QChar c)\r\n{\r\n    *result = checkForElectricCharacter(c);\r\n}\r\n\r\nvoid FakeVimProxy::on_indentRegion(int beginLine, int endLine, QChar typedChar)\r\n{\r\n    indentRegion(beginLine, endLine, typedChar);\r\n}\r\n\r\nvoid FakeVimProxy::on_completionRequested()\r\n{\r\n    completionRequested();\r\n}\r\n\r\nvoid FakeVimProxy::on_simpleCompletionRequested(const QString &needle, bool forward)\r\n{\r\n    simpleCompletionRequested(needle, forward);\r\n}\r\n\r\nvoid FakeVimProxy::on_windowCommandRequested(const QString &key, int count)\r\n{\r\n    windowCommandRequested(key, count);\r\n}\r\n\r\nvoid FakeVimProxy::on_findRequested(bool reverse)\r\n{\r\n    findRequested(reverse);\r\n}\r\n\r\nvoid FakeVimProxy::on_findNextRequested(bool reverse)\r\n{\r\n    findNextRequested(reverse);\r\n}\r\n\r\nvoid FakeVimProxy::on_handleExCommandRequested(bool *handled, const FakeVim::Internal::ExCommand &cmd)\r\n{\r\n    *handled = handleExCommand(cmd);\r\n}\r\n\r\nvoid FakeVimProxy::on_requestDisableBlockSelection()\r\n{\r\n    disableBlockSelection();\r\n}\r\n\r\nvoid FakeVimProxy::on_requestSetBlockSelection(const QTextCursor &cursor)\r\n{\r\n    enableBlockSelection(cursor);\r\n}\r\n\r\nvoid FakeVimProxy::on_requestBlockSelection(QTextCursor *cursor)\r\n{\r\n    *cursor = blockSelection();\r\n}\r\n\r\nvoid FakeVimProxy::on_requestHasBlockSelection(bool *on)\r\n{\r\n    *on = hasBlockSelection();\r\n}\r\n\r\nvoid FakeVimProxy::on_foldToggle(int depth)\r\n{\r\n    foldToggle(depth);\r\n}\r\n\r\nvoid FakeVimProxy::on_foldAll(bool fold)\r\n{\r\n    foldAll(fold);\r\n}\r\n\r\nvoid FakeVimProxy::on_fold(int depth, bool fold)\r\n{\r\n    this->fold(depth, fold);\r\n}\r\n\r\nvoid FakeVimProxy::on_foldGoTo(int count, bool current)\r\n{\r\n    foldGoTo(count, current);\r\n}\r\n\r\nvoid FakeVimProxy::on_jumpToGlobalMark(QChar mark, bool backTickMode, const QString &fileName)\r\n{\r\n    jumpToGlobalMark(mark, backTickMode, fileName);\r\n}\r\n\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/python/fakevimproxy.h",
    "content": "#include <fakevim/fakevimhandler.h>\r\n\r\n#include <QObject>\r\n#include <QTextCursor>\r\n#include <QTextEdit>\r\n\r\nclass QString;\r\n\r\ntypedef FakeVim::Internal::ExCommand ExCommand;\r\n\r\nclass FakeVimProxy : public QObject\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    explicit FakeVimProxy(QObject *handler, QObject *parent = 0);\r\n\r\n    virtual void commandBufferChanged(const QString &, int, int, int, QObject *) {}\r\n    virtual void statusDataChanged(const QString &) {}\r\n    virtual void extraInformationChanged(const QString &) {}\r\n    virtual void selectionChanged(const QList<QTextEdit::ExtraSelection> &) {}\r\n    virtual void highlightMatches(const QString &) {}\r\n    virtual QString writeAllRequested() { return QString(); }\r\n    virtual QTextCursor moveToMatchingParenthesis() { return QTextCursor(); }\r\n    virtual bool checkForElectricCharacter(QChar) { return false; }\r\n    virtual void indentRegion(int, int, QChar) {}\r\n    virtual void completionRequested() {}\r\n    virtual void simpleCompletionRequested(const QString &, bool) {}\r\n    virtual void windowCommandRequested(const QString &, int) {}\r\n    virtual void findRequested(bool) {}\r\n    virtual void findNextRequested(bool) {}\r\n    virtual bool handleExCommand(const ExCommand &) { return false; }\r\n    virtual void disableBlockSelection() {}\r\n    virtual void enableBlockSelection(const QTextCursor &) {}\r\n    virtual QTextCursor blockSelection() { return QTextCursor(); }\r\n    virtual bool hasBlockSelection() { return false; }\r\n    virtual void foldToggle(int) {}\r\n    virtual void foldAll(bool) {}\r\n    virtual void fold(int, bool) {}\r\n    virtual void foldGoTo(int, bool) {}\r\n    virtual void jumpToGlobalMark(QChar, bool, const QString &) {}\r\n\r\nprivate slots:\r\n    void on_commandBufferChanged(const QString &msg, int cursorPos,\r\n            int anchorPos, int messageLevel, QObject *eventFilter);\r\n    void on_statusDataChanged(const QString &msg);\r\n    void on_extraInformationChanged(const QString &msg);\r\n    void on_selectionChanged(const QList<QTextEdit::ExtraSelection> &selection);\r\n    void on_highlightMatches(const QString &needle);\r\n    void on_writeAllRequested(QString *error);\r\n    void on_moveToMatchingParenthesis(bool *moved, bool *forward, QTextCursor *cursor);\r\n    void on_checkForElectricCharacter(bool *result, QChar c);\r\n    void on_indentRegion(int beginLine, int endLine, QChar typedChar);\r\n    void on_completionRequested();\r\n    void on_simpleCompletionRequested(const QString &needle, bool forward);\r\n    void on_windowCommandRequested(const QString &key, int count);\r\n    void on_findRequested(bool reverse);\r\n    void on_findNextRequested(bool reverse);\r\n    void on_handleExCommandRequested(bool *handled, const ExCommand &cmd);\r\n    void on_requestDisableBlockSelection();\r\n    void on_requestSetBlockSelection(const QTextCursor&);\r\n    void on_requestBlockSelection(QTextCursor *cursor);\r\n    void on_requestHasBlockSelection(bool *on);\r\n    void on_foldToggle(int depth);\r\n    void on_foldAll(bool fold);\r\n    void on_fold(int depth, bool fold);\r\n    void on_foldGoTo(int count, bool current);\r\n    void on_jumpToGlobalMark(QChar mark, bool backTickMode, const QString &fileName);\r\n};\r\n\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/python/test.py",
    "content": "#!/usr/bin/env python\r\nfrom FakeVim import *\r\nimport sys\r\nimport os\r\n\r\nif FAKEVIM_PYQT_VERSION == 5:\r\n    from PyQt5.QtCore import *\r\n    from PyQt5.QtGui import *\r\n    from PyQt5.QtWidgets import *\r\nelse:\r\n    from PyQt4.QtCore import *\r\n    from PyQt4.QtGui import *\r\n\r\ndef overrides(interface_class):\r\n    \"\"\" Decorator for overriden methods. \"\"\"\r\n    def overrider(method):\r\n        assert(method.__name__ in dir(interface_class))\r\n        return method\r\n    return overrider\r\n\r\nclass Proxy (FakeVimProxy):\r\n    \"\"\" Used by FakeVim to modify or retrieve editor state. \"\"\"\r\n    def __init__(self, window, editor, handler):\r\n        super(Proxy, self).__init__(handler)\r\n        self.__handler = handler\r\n        self.__window = window\r\n        self.__editor = editor\r\n\r\n        self.__statusMessage = \"\"\r\n        self.__statusData = \"\"\r\n        self.__cursorPosition =  -1\r\n        self.__cursorAnchor =  -1\r\n        self.__eventFilter = None\r\n\r\n        self.__fileName = \"\"\r\n        self.__lastSavePath = \"\"\r\n\r\n    def openFile(self, filePath):\r\n        filePath = os.path.expanduser(filePath)\r\n\r\n        try:\r\n            if os.path.isfile(filePath):\r\n                with open(filePath, 'r') as f:\r\n                    self.__fileName = filePath\r\n                    self.__editor.setPlainText(f.read())\r\n            else:\r\n                with open(filePath, 'w') as f:\r\n                    self.__fileName = filePath\r\n        except:\r\n            self.__handler.showMessage( MessageError,\r\n                    self.tr('Cannot open file \"{filePath}\"')\r\n                    .format(filePath = filePath) )\r\n\r\n    def needSave(self):\r\n        return self.__editor.document().isModified()\r\n\r\n    def maybeCloseEditor(self):\r\n        if self.needSave():\r\n            self.__handler.showMessage( MessageError,\r\n                    self.tr(\"No write since last change (add ! to override)\") )\r\n            self.__updateStatusBar()\r\n\r\n            return False\r\n\r\n        return True\r\n\r\n    def commandQuit(self):\r\n        qApp.exit()\r\n\r\n    def commandWrite(self, filePath = None):\r\n        filePath = filePath and os.path.expanduser(filePath) or self.__fileName\r\n\r\n        if not filePath:\r\n            filePath = QFileDialog.getSaveFileName(self.__window, self.tr(\"Save File ...\"), self.__lastSavePath)\r\n            if filePath:\r\n                self.__fileName = filePath\r\n                self.__lastSavePath = filePath\r\n\r\n        if not filePath:\r\n            return False\r\n\r\n        try:\r\n            with open(filePath, 'w') as f:\r\n                buffer = self.__editor.toPlainText()\r\n                f.write(buffer)\r\n                self.__handler.showMessage( MessageInfo, self.tr('\"{filePath}\" {lines}L, {characters}C written')\r\n                        .format(\r\n                            filePath = filePath,\r\n                            lines = buffer.count('\\n'),\r\n                            characters = len(buffer)) )\r\n        except:\r\n            self.__handler.showMessage( MessageError,\r\n                    self.tr('Failed to save file \"{filePath}\"')\r\n                    .format(filePath = filePath) )\r\n\r\n        self.__editor.document().setModified(False)\r\n\r\n        return True\r\n\r\n    @overrides(FakeVimProxy)\r\n    def handleExCommand(self, cmd):\r\n        if cmd.matches(\"e\", \"edit\"):\r\n            if cmd.hasBang or self.maybeCloseEditor():\r\n                self.openFile(cmd.args)\r\n        elif cmd.matches(\"q\", \"quit\"):\r\n            if cmd.hasBang or self.maybeCloseEditor():\r\n                self.commandQuit()\r\n        elif cmd.matches(\"w\", \"write\"):\r\n            self.commandWrite(cmd.args)\r\n        elif cmd == \"wq\":\r\n            self.commandWrite() and self.commandQuit()\r\n        else:\r\n            return False\r\n        return True\r\n\r\n    @overrides(FakeVimProxy)\r\n    def enableBlockSelection(self, cursor):\r\n        self.__editor.setTextCursor(cursor)\r\n        self.__editor.setBlockSelection(True)\r\n\r\n    @overrides(FakeVimProxy)\r\n    def disableBlockSelection(self):\r\n        self.__editor.setBlockSelection(False)\r\n\r\n    @overrides(FakeVimProxy)\r\n    def blockSelection(self):\r\n        self.__editor.setBlockSelection(True)\r\n        return self.__editor.textCursor()\r\n\r\n    @overrides(FakeVimProxy)\r\n    def hasBlockSelection(self):\r\n        return self.__editor.hasBlockSelection()\r\n\r\n    @overrides(FakeVimProxy)\r\n    def commandBufferChanged(self, msg, cursorPosition, cursorAnchor, messageLevel, eventFilter):\r\n        self.__cursorPosition = cursorPosition\r\n        self.__cursorAnchor = cursorAnchor\r\n        self.__statusMessage = msg\r\n        self.__updateStatusBar();\r\n        self.__eventFilter = eventFilter\r\n\r\n    @overrides(FakeVimProxy)\r\n    def statusDataChanged(self, msg):\r\n        self.__statusData = msg\r\n        self.__updateStatusBar()\r\n\r\n    @overrides(FakeVimProxy)\r\n    def extraInformationChanged(self, msg):\r\n        QMessageBox.information(self.__window, self.tr(\"Information\"), msg)\r\n\r\n    @overrides(FakeVimProxy)\r\n    def highlightMatches(self, pattern):\r\n        self.__editor.highlightMatches(pattern)\r\n\r\n    def __updateStatusBar(self):\r\n        self.__window.statusBar().setStatus(\r\n                self.__statusMessage, self.__statusData,\r\n                self.__cursorPosition, self.__cursorAnchor, self.__eventFilter)\r\n\r\n\r\nclass Editor (QTextEdit):\r\n    \"\"\" Editor widget driven by FakeVim. \"\"\"\r\n    def __init__(self, parent = None):\r\n        sup = super(Editor, self)\r\n        sup.__init__(parent)\r\n\r\n        self.__context = QAbstractTextDocumentLayout.PaintContext()\r\n        self.__lastCursorRect = QRect()\r\n        self.__hasBlockSelection = False\r\n        self.__selection = []\r\n        self.__searchSelection = []\r\n\r\n        self.viewport().installEventFilter(self)\r\n\r\n        self.selectionChanged.connect(self.__onSelectionChanged)\r\n        self.cursorPositionChanged.connect(self.__onSelectionChanged)\r\n\r\n    def setBlockSelection(self, enabled):\r\n        self.__hasBlockSelection = enabled\r\n        self.__selection.clear()\r\n        self.__updateSelections()\r\n\r\n    def hasBlockSelection(self):\r\n        return self.__hasBlockSelection\r\n\r\n    def highlightMatches(self, pattern):\r\n        cur = self.textCursor()\r\n\r\n        re = QRegExp(pattern)\r\n        cur = self.document().find(re)\r\n        a = cur.position()\r\n\r\n        self.__searchSelection.clear()\r\n\r\n        while not cur.isNull():\r\n            if cur.hasSelection():\r\n                selection = QAbstractTextDocumentLayout.Selection()\r\n                selection.format.setBackground(Qt.yellow)\r\n                selection.format.setForeground(Qt.black)\r\n                selection.cursor = cur\r\n                self.__searchSelection.append(selection)\r\n            else:\r\n                cur.movePosition(QTextCursor.NextCharacter)\r\n\r\n            cur = self.document().find(re, cur)\r\n            b = cur.position()\r\n\r\n            if a == b:\r\n                cur.movePosition(QTextCursor.NextCharacter)\r\n                cur = self.document().find(re, cur)\r\n                b = cur.position()\r\n\r\n                if (a == b):\r\n                    break\r\n            a = b\r\n\r\n        self.__updateSelections()\r\n\r\n    def eventFilter(self, viewport, paintEvent):\r\n        \"\"\" Handle paint event from text editor. \"\"\"\r\n        if viewport != self.viewport() or paintEvent.type() != QEvent.Paint:\r\n            return False\r\n\r\n        tc = self.textCursor()\r\n\r\n        self.__context.cursorPosition = -1\r\n        self.__context.palette = self.palette()\r\n\r\n        h = self.__horizontalOffset()\r\n        v = self.__verticalOffset()\r\n        self.__context.clip = QRectF( paintEvent.rect().translated(h, v) )\r\n\r\n        painter = QPainter(viewport)\r\n\r\n        painter.save()\r\n\r\n        # Draw base and text.\r\n        painter.translate(-h, -v)\r\n        self.__paintDocument(painter)\r\n\r\n        # Draw block selection.\r\n        if self.hasBlockSelection():\r\n            rect = self.cursorRect(tc)\r\n            tc2 = QTextCursor(tc)\r\n            tc2.setPosition(tc.anchor())\r\n            rect = rect.united( self.cursorRect(tc2) )\r\n\r\n            self.__context.palette.setColor( QPalette.Base,\r\n                    self.__context.palette.color(QPalette.Highlight) )\r\n            self.__context.palette.setColor( QPalette.Text,\r\n                    self.__context.palette.color(QPalette.HighlightedText) )\r\n\r\n            self.__context.clip = QRectF( rect.translated(h, v) )\r\n\r\n            self.__paintDocument(painter)\r\n\r\n        painter.restore()\r\n\r\n        # Draw text cursor.\r\n        rect = self.cursorRect()\r\n\r\n        if self.overwriteMode() or self.hasBlockSelection():\r\n            fm = self.fontMetrics()\r\n            c = self.document().characterAt( tc.position() )\r\n            rect.setWidth( fm.width(c) )\r\n            if rect.width() == 0:\r\n                rect.setWidth( fm.averageCharWidth() )\r\n        else:\r\n            rect.setWidth(2)\r\n            rect.adjust(-1, 0, 0, 0)\r\n\r\n        if self.hasBlockSelection():\r\n            startColumn = self.__columnForPosition(tc.anchor())\r\n            endColumn = self.__columnForPosition(tc.position())\r\n\r\n            if startColumn < endColumn:\r\n                rect.moveLeft(rect.left() - rect.width())\r\n\r\n        painter.setCompositionMode(QPainter.CompositionMode_Difference)\r\n        painter.fillRect(rect, Qt.white)\r\n\r\n        if not self.hasBlockSelection() \\\r\n           and self.__lastCursorRect.width() != rect.width():\r\n            viewport.update()\r\n\r\n        self.__lastCursorRect = rect\r\n\r\n        return True\r\n\r\n    def __columnForPosition(self, position):\r\n        return position - self.document().findBlock(position).position()\r\n\r\n    def __paintDocument(self, painter):\r\n        painter.setClipRect(self.__context.clip)\r\n        painter.fillRect( self.__context.clip, self.__context.palette.base() )\r\n        self.document().documentLayout().draw(painter, self.__context)\r\n\r\n    def __horizontalOffset(self):\r\n        hbar = self.horizontalScrollBar()\r\n\r\n        if self.isRightToLeft():\r\n            return hbar.maximum() - hbar.value()\r\n\r\n        return hbar.value()\r\n\r\n    def __verticalOffset(self):\r\n        return self.verticalScrollBar().value()\r\n\r\n    def __updateSelections(self):\r\n        self.__context.selections = self.__searchSelection + self.__selection\r\n        self.viewport().update()\r\n\r\n    def __onSelectionChanged(self):\r\n        self.__hasBlockSelection = False\r\n        self.__selection.clear()\r\n\r\n        selection = QAbstractTextDocumentLayout.Selection()\r\n        selection.cursor = self.textCursor()\r\n\r\n        if selection.cursor.hasSelection():\r\n            pal = self.palette()\r\n            selection.format.setBackground( pal.color(QPalette.Highlight) )\r\n            selection.format.setForeground( pal.color(QPalette.HighlightedText) )\r\n            self.__selection.append(selection)\r\n\r\n        self.__updateSelections()\r\n\r\n\r\nclass StatusBar (QStatusBar):\r\n    def __init__(self, window):\r\n        super(QStatusBar, self).__init__(window)\r\n\r\n        self.__statusMessageLabel = QLabel(self)\r\n        self.__statusDataLabel = QLabel(self)\r\n        self.__commandLine = QLineEdit(self)\r\n\r\n        self.addPermanentWidget(self.__statusMessageLabel, 1)\r\n        self.addPermanentWidget(self.__commandLine, 1)\r\n        self.addPermanentWidget(self.__statusDataLabel)\r\n\r\n        self.__commandLine.hide()\r\n        window.setStatusBar(self)\r\n\r\n    def setStatus(self, statusMessage, statusData, cursorPosition, cursorAnchor, eventFilter):\r\n        commandMode = cursorPosition != -1\r\n        self.__commandLine.setVisible(commandMode)\r\n        self.__statusMessageLabel.setVisible(not commandMode)\r\n\r\n        if commandMode:\r\n            self.__commandLine.installEventFilter(eventFilter)\r\n            self.__commandLine.setFocus()\r\n            self.__commandLine.setText(statusMessage)\r\n            self.__commandLine.setSelection(cursorPosition, cursorAnchor - cursorPosition)\r\n        else:\r\n            self.__statusMessageLabel.setText(statusMessage)\r\n\r\n        self.__statusDataLabel.setText(statusData)\r\n\r\nclass MainWindow (QMainWindow):\r\n    def __init__(self, parent = None):\r\n        super(MainWindow, self).__init__(parent)\r\n        self.__editor = Editor(self)\r\n        font = self.__editor.font()\r\n        font.setFamily(\"Monospace\")\r\n        self.__editor.setFont(font)\r\n\r\n        self.setCentralWidget(self.__editor)\r\n\r\n        self.move(0, 0)\r\n        self.resize(600, 600)\r\n\r\n        self.__statusBar = StatusBar(self)\r\n\r\n        self.__handler = FakeVimHandler(self.__editor)\r\n        self.__proxy = Proxy(self, self.__editor, self.__handler)\r\n\r\n        self.__handler.installEventFilter()\r\n        self.__handler.setupWidget()\r\n        self.__handler.handleCommand(\r\n                'source {home}/.vimrc'.format(home = os.path.expanduser(\"~\")))\r\n\r\n    def openFile(self, filePath):\r\n        self.__proxy.openFile(filePath)\r\n\r\n    @overrides(QMainWindow)\r\n    def closeEvent(self, event):\r\n        event.ignore()\r\n        if self.__proxy.maybeCloseEditor():\r\n            self.__proxy.commandQuit()\r\n\r\nif __name__ == \"__main__\":\r\n    app = QApplication(sys.argv)\r\n\r\n    window = MainWindow()\r\n    if len(sys.argv) > 1:\r\n        window.openFile(sys.argv[1])\r\n    window.show()\r\n\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/test/main.cpp",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).\r\n** Contact: http://www.qt-project.org/legal\r\n**\r\n** This file is part of Qt Creator.\r\n**\r\n** Commercial License Usage\r\n** Licensees holding valid commercial Qt licenses may use this file in\r\n** accordance with the commercial license agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and Digia.  For licensing terms and\r\n** conditions see http://qt.digia.com/licensing.  For further information\r\n** use the contact form at http://qt.digia.com/contact-us.\r\n**\r\n** GNU Lesser General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU Lesser\r\n** General Public License version 2.1 as published by the Free Software\r\n** Foundation and appearing in the file LICENSE.LGPL included in the\r\n** packaging of this file.  Please review the following information to\r\n** ensure the GNU Lesser General Public License version 2.1 requirements\r\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r\n**\r\n** In addition, as a special exception, Digia gives you certain additional\r\n** rights.  These rights are described in the Digia Qt LGPL Exception\r\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n****************************************************************************/\r\n\r\n#include \"fakevimhandler.h\"\r\n\r\n#include <QApplication>\r\n#include <QFontMetrics>\r\n#include <QMainWindow>\r\n#include <QMessageBox>\r\n#include <QPainter>\r\n#include <QPlainTextEdit>\r\n#include <QStatusBar>\r\n#include <QTextBlock>\r\n#include <QTextEdit>\r\n#include <QTextStream>\r\n#include <QTemporaryFile>\r\n#include <QTimer>\r\n\r\n#define EDITOR(editor, call) \\\r\n    if (QPlainTextEdit *ed = qobject_cast<QPlainTextEdit *>(editor)) { \\\r\n        (ed->call); \\\r\n    } else if (QTextEdit *ed = qobject_cast<QTextEdit *>(editor)) { \\\r\n        (ed->call); \\\r\n    }\r\n\r\nusing namespace FakeVim::Internal;\r\n\r\ntypedef QLatin1String _;\r\n\r\n/**\r\n * Simple editor widget.\r\n * @tparam TextEdit QTextEdit or QPlainTextEdit as base class\r\n */\r\ntemplate <typename TextEdit>\r\nclass Editor : public TextEdit\r\n{\r\npublic:\r\n    Editor(QWidget *parent = 0) : TextEdit(parent)\r\n    {\r\n        TextEdit::setCursorWidth(0);\r\n    }\r\n\r\n    void paintEvent(QPaintEvent *e)\r\n    {\r\n        TextEdit::paintEvent(e);\r\n\r\n        if ( !m_cursorRect.isNull() && e->rect().intersects(m_cursorRect) ) {\r\n            QRect rect = m_cursorRect;\r\n            m_cursorRect = QRect();\r\n            TextEdit::viewport()->update(rect);\r\n        }\r\n\r\n        // Draw text cursor.\r\n        QRect rect = TextEdit::cursorRect();\r\n        if ( e->rect().intersects(rect) ) {\r\n            QPainter painter(TextEdit::viewport());\r\n\r\n            if ( TextEdit::overwriteMode() ) {\r\n                QFontMetrics fm(TextEdit::font());\r\n                const int position = TextEdit::textCursor().position();\r\n                const QChar c = TextEdit::document()->characterAt(position);\r\n                rect.setWidth(fm.width(c));\r\n                painter.setPen(Qt::NoPen);\r\n                painter.setBrush(TextEdit::palette().color(QPalette::Base));\r\n                painter.setCompositionMode(QPainter::CompositionMode_Difference);\r\n            } else {\r\n                rect.setWidth(TextEdit::cursorWidth());\r\n                painter.setPen(TextEdit::palette().color(QPalette::Text));\r\n            }\r\n\r\n            painter.drawRect(rect);\r\n            m_cursorRect = rect;\r\n        }\r\n    }\r\n\r\nprivate:\r\n    QRect m_cursorRect;\r\n};\r\n\r\nclass Proxy : public QObject\r\n{\r\n    Q_OBJECT\r\n\r\npublic:\r\n    Proxy(QWidget *widget, QMainWindow *mw, QObject *parent = 0)\r\n      : QObject(parent), m_widget(widget), m_mainWindow(mw)\r\n    {\r\n        QTimer::singleShot(0, this, SLOT(parseArguments()));\r\n    }\r\n\r\n    void openFile(const QString &fileName)\r\n    {\r\n        emit handleInput(QString(_(\":r %1<CR>\")).arg(fileName));\r\n        m_fileName = fileName;\r\n    }\r\n\r\nsignals:\r\n    void handleInput(const QString &keys);\r\n\r\npublic slots:\r\n    void changeStatusData(const QString &info)\r\n    {\r\n        m_statusData = info;\r\n        updateStatusBar();\r\n    }\r\n\r\n    void highlightMatches(const QString &pattern)\r\n    {\r\n        QTextEdit *ed = qobject_cast<QTextEdit *>(m_widget);\r\n        if (!ed)\r\n            return;\r\n\r\n        QTextCursor cur = ed->textCursor();\r\n\r\n        QTextEdit::ExtraSelection selection;\r\n        selection.format.setBackground(Qt::yellow);\r\n        selection.format.setForeground(Qt::black);\r\n\r\n        // Highlight matches.\r\n        QTextDocument *doc = ed->document();\r\n        QRegExp re(pattern);\r\n        cur = doc->find(re);\r\n\r\n        m_searchSelection.clear();\r\n\r\n        int a = cur.position();\r\n        while ( !cur.isNull() ) {\r\n            if ( cur.hasSelection() ) {\r\n                selection.cursor = cur;\r\n                m_searchSelection.append(selection);\r\n            } else {\r\n                cur.movePosition(QTextCursor::NextCharacter);\r\n            }\r\n            cur = doc->find(re, cur);\r\n            int b = cur.position();\r\n            if (a == b) {\r\n                cur.movePosition(QTextCursor::NextCharacter);\r\n                cur = doc->find(re, cur);\r\n                b = cur.position();\r\n                if (a == b) break;\r\n            }\r\n            a = b;\r\n        }\r\n\r\n        updateExtraSelections();\r\n    }\r\n\r\n    void changeStatusMessage(const QString &contents, int cursorPos)\r\n    {\r\n        m_statusMessage = cursorPos == -1 ? contents\r\n            : contents.left(cursorPos) + QChar(10073) + contents.mid(cursorPos);\r\n        updateStatusBar();\r\n    }\r\n\r\n    void changeExtraInformation(const QString &info)\r\n    {\r\n        QMessageBox::information(m_widget, tr(\"Information\"), info);\r\n    }\r\n\r\n    void updateStatusBar()\r\n    {\r\n        int slack = 80 - m_statusMessage.size() - m_statusData.size();\r\n        QString msg = m_statusMessage + QString(slack, QLatin1Char(' ')) + m_statusData;\r\n        m_mainWindow->statusBar()->showMessage(msg);\r\n    }\r\n\r\n    void handleExCommand(bool *handled, const ExCommand &cmd)\r\n    {\r\n        if ( wantSaveAndQuit(cmd) ) {\r\n            // :wq\r\n            if (save())\r\n                cancel();\r\n        } else if ( wantSave(cmd) ) {\r\n            save(); // :w\r\n        } else if ( wantQuit(cmd) ) {\r\n            if (cmd.hasBang)\r\n                invalidate(); // :q!\r\n            else\r\n                cancel(); // :q\r\n        } else {\r\n            *handled = false;\r\n            return;\r\n        }\r\n\r\n        *handled = true;\r\n    }\r\n\r\n    void requestSetBlockSelection(bool on = false)\r\n    {\r\n        QTextEdit *ed = qobject_cast<QTextEdit *>(m_widget);\r\n        if (!ed)\r\n            return;\r\n\r\n        QPalette pal = ed->parentWidget() != NULL ? ed->parentWidget()->palette()\r\n                                                  : QApplication::palette();\r\n\r\n        m_blockSelection.clear();\r\n        m_clearSelection.clear();\r\n\r\n        if (on) {\r\n            QTextCursor cur = ed->textCursor();\r\n\r\n            QTextEdit::ExtraSelection selection;\r\n            selection.format.setBackground( pal.color(QPalette::Base) );\r\n            selection.format.setForeground( pal.color(QPalette::Text) );\r\n            selection.cursor = cur;\r\n            m_clearSelection.append(selection);\r\n\r\n            selection.format.setBackground( pal.color(QPalette::Highlight) );\r\n            selection.format.setForeground( pal.color(QPalette::HighlightedText) );\r\n\r\n            int from = cur.positionInBlock();\r\n            int to = cur.anchor() - cur.document()->findBlock(cur.anchor()).position();\r\n            const int min = qMin(cur.position(), cur.anchor());\r\n            const int max = qMax(cur.position(), cur.anchor());\r\n            for ( QTextBlock block = cur.document()->findBlock(min);\r\n                  block.isValid() && block.position() < max; block = block.next() ) {\r\n                cur.setPosition( block.position() + qMin(from, block.length()) );\r\n                cur.setPosition( block.position() + qMin(to, block.length()), QTextCursor::KeepAnchor );\r\n                selection.cursor = cur;\r\n                m_blockSelection.append(selection);\r\n            }\r\n\r\n            connect( ed, SIGNAL(selectionChanged()),\r\n                     SLOT(requestSetBlockSelection()), Qt::UniqueConnection );\r\n\r\n            QPalette pal2 = ed->palette();\r\n            pal2.setColor(QPalette::Highlight, Qt::transparent);\r\n            pal2.setColor(QPalette::HighlightedText, Qt::transparent);\r\n            ed->setPalette(pal2);\r\n\r\n        } else {\r\n            ed->setPalette(pal);\r\n\r\n            disconnect( ed, SIGNAL(selectionChanged()),\r\n                        this, SLOT(requestSetBlockSelection()) );\r\n        }\r\n\r\n        updateExtraSelections();\r\n    }\r\n\r\n    void requestHasBlockSelection(bool *on)\r\n    {\r\n        *on = !m_blockSelection.isEmpty();\r\n    }\r\n\r\nprivate slots:\r\n    void parseArguments()\r\n    {\r\n        QStringList args = qApp->arguments();\r\n\r\n        const QString editFileName = args.value(1, QString(_(\"/usr/share/vim/vim74/tutor/tutor\")));\r\n        openFile(editFileName);\r\n\r\n        foreach (const QString &cmd, args.mid(2))\r\n            emit handleInput(cmd);\r\n    }\r\n\r\nprivate:\r\n    void updateExtraSelections()\r\n    {\r\n        QTextEdit *ed = qobject_cast<QTextEdit *>(m_widget);\r\n        if (ed)\r\n            ed->setExtraSelections(m_clearSelection + m_searchSelection + m_blockSelection);\r\n    }\r\n\r\n    bool wantSaveAndQuit(const ExCommand &cmd)\r\n    {\r\n        return cmd.cmd == \"wq\";\r\n    }\r\n\r\n    bool wantSave(const ExCommand &cmd)\r\n    {\r\n        return cmd.matches(\"w\", \"write\") || cmd.matches(\"wa\", \"wall\");\r\n    }\r\n\r\n    bool wantQuit(const ExCommand &cmd)\r\n    {\r\n        return cmd.matches(\"q\", \"quit\") || cmd.matches(\"qa\", \"qall\");\r\n    }\r\n\r\n    bool save()\r\n    {\r\n        if (!hasChanges())\r\n            return true;\r\n\r\n        QTemporaryFile tmpFile;\r\n        if (!tmpFile.open()) {\r\n            QMessageBox::critical(m_widget, tr(\"FakeVim Error\"),\r\n                                  tr(\"Cannot create temporary file: %1\").arg(tmpFile.errorString()));\r\n            return false;\r\n        }\r\n\r\n        QTextStream ts(&tmpFile);\r\n        ts << content();\r\n        ts.flush();\r\n\r\n        QFile::remove(m_fileName);\r\n        if (!QFile::copy(tmpFile.fileName(), m_fileName)) {\r\n            QMessageBox::critical(m_widget, tr(\"FakeVim Error\"),\r\n                                  tr(\"Cannot write to file \\\"%1\\\"\").arg(m_fileName));\r\n            return false;\r\n        }\r\n\r\n        return true;\r\n    }\r\n\r\n    void cancel()\r\n    {\r\n        if (hasChanges()) {\r\n            QMessageBox::critical(m_widget, tr(\"FakeVim Warning\"),\r\n                                  tr(\"File \\\"%1\\\" was changed\").arg(m_fileName));\r\n        } else {\r\n            invalidate();\r\n        }\r\n    }\r\n\r\n    void invalidate()\r\n    {\r\n        QApplication::quit();\r\n    }\r\n\r\n    bool hasChanges()\r\n    {\r\n        if (m_fileName.isEmpty() && content().isEmpty())\r\n            return false;\r\n\r\n        QFile f(m_fileName);\r\n        if (!f.open(QIODevice::ReadOnly))\r\n            return true;\r\n\r\n        QTextStream ts(&f);\r\n        return content() != ts.readAll();\r\n    }\r\n\r\n    QTextDocument *document() const\r\n    {\r\n        QTextDocument *doc = NULL;\r\n        if (QPlainTextEdit *ed = qobject_cast<QPlainTextEdit *>(m_widget))\r\n            doc = ed->document();\r\n        else if (QTextEdit *ed = qobject_cast<QTextEdit *>(m_widget))\r\n            doc = ed->document();\r\n        return doc;\r\n    }\r\n\r\n    QString content() const\r\n    {\r\n        return document()->toPlainText();\r\n    }\r\n\r\n    QWidget *m_widget;\r\n    QMainWindow *m_mainWindow;\r\n    QString m_statusMessage;\r\n    QString m_statusData;\r\n    QString m_fileName;\r\n\r\n    QList<QTextEdit::ExtraSelection> m_searchSelection;\r\n    QList<QTextEdit::ExtraSelection> m_clearSelection;\r\n    QList<QTextEdit::ExtraSelection> m_blockSelection;\r\n};\r\n\r\nQWidget *createEditorWidget(bool usePlainTextEdit)\r\n{\r\n    QWidget *editor = 0;\r\n    if (usePlainTextEdit) {\r\n        Editor<QPlainTextEdit> *w = new Editor<QPlainTextEdit>;\r\n        w->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);\r\n        editor = w;\r\n    } else {\r\n        Editor<QTextEdit> *w = new Editor<QTextEdit>;\r\n        w->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);\r\n        editor = w;\r\n    }\r\n    editor->setObjectName(_(\"Editor\"));\r\n    editor->setFocus();\r\n\r\n    return editor;\r\n}\r\n\r\nvoid initHandler(FakeVimHandler &handler)\r\n{\r\n    handler.handleCommand(_(\"set nopasskeys\"));\r\n    handler.handleCommand(_(\"set nopasscontrolkey\"));\r\n\r\n    // Set some Vim options.\r\n    handler.handleCommand(_(\"set expandtab\"));\r\n    handler.handleCommand(_(\"set shiftwidth=8\"));\r\n    handler.handleCommand(_(\"set tabstop=16\"));\r\n    handler.handleCommand(_(\"set autoindent\"));\r\n\r\n    // Try to source file \"fakevimrc\" from current directory.\r\n    handler.handleCommand(_(\"source fakevimrc\"));\r\n\r\n    handler.installEventFilter();\r\n    handler.setupWidget();\r\n}\r\n\r\nvoid initMainWindow(QMainWindow &mainWindow, QWidget *centralWidget, const QString &title)\r\n{\r\n    mainWindow.setWindowTitle(QString(_(\"FakeVim (%1)\")).arg(title));\r\n    mainWindow.setCentralWidget(centralWidget);\r\n    mainWindow.resize(600, 650);\r\n    mainWindow.move(0, 0);\r\n    mainWindow.show();\r\n\r\n    // Set monospace font for editor and status bar.\r\n    QFont font = QApplication::font();\r\n    font.setFamily(_(\"Monospace\"));\r\n    centralWidget->setFont(font);\r\n    mainWindow.statusBar()->setFont(font);\r\n}\r\n\r\nvoid clearUndoRedo(QWidget *editor)\r\n{\r\n    EDITOR(editor, setUndoRedoEnabled(false));\r\n    EDITOR(editor, setUndoRedoEnabled(true));\r\n}\r\n\r\nvoid connectSignals(FakeVimHandler &handler, Proxy &proxy)\r\n{\r\n    QObject::connect(&handler, SIGNAL(commandBufferChanged(QString,int,int,int,QObject*)),\r\n        &proxy, SLOT(changeStatusMessage(QString,int)));\r\n    QObject::connect(&handler, SIGNAL(extraInformationChanged(QString)),\r\n        &proxy, SLOT(changeExtraInformation(QString)));\r\n    QObject::connect(&handler, SIGNAL(statusDataChanged(QString)),\r\n        &proxy, SLOT(changeStatusData(QString)));\r\n    QObject::connect(&handler, SIGNAL(highlightMatches(QString)),\r\n        &proxy, SLOT(highlightMatches(QString)));\r\n    QObject::connect(&handler, SIGNAL(handleExCommandRequested(bool*,ExCommand)),\r\n        &proxy, SLOT(handleExCommand(bool*,ExCommand)));\r\n    QObject::connect(&handler, SIGNAL(requestSetBlockSelection(bool)),\r\n        &proxy, SLOT(requestSetBlockSelection(bool)));\r\n    QObject::connect(&handler, SIGNAL(requestHasBlockSelection(bool*)),\r\n        &proxy, SLOT(requestHasBlockSelection(bool*)));\r\n\r\n    QObject::connect(&proxy, SIGNAL(handleInput(QString)),\r\n        &handler, SLOT(handleInput(QString)));\r\n}\r\n\r\nint main(int argc, char *argv[])\r\n{\r\n    QApplication app(argc, argv);\r\n\r\n    QStringList args = app.arguments();\r\n\r\n    // If FAKEVIM_PLAIN_TEXT_EDIT environment variable is 1 use QPlainTextEdit instead on QTextEdit;\r\n    bool usePlainTextEdit = qgetenv(\"FAKEVIM_PLAIN_TEXT_EDIT\") == \"1\";\r\n\r\n    // Create editor widget.\r\n    QWidget *editor = createEditorWidget(usePlainTextEdit);\r\n\r\n    // Create FakeVimHandler instance which will emulate Vim behavior in editor widget.\r\n    FakeVimHandler handler(editor, 0);\r\n\r\n    // Create main window.\r\n    QMainWindow mainWindow;\r\n    initMainWindow(mainWindow, editor, usePlainTextEdit ? _(\"QPlainTextEdit\") : _(\"QTextEdit\"));\r\n\r\n    // Connect slots to FakeVimHandler signals.\r\n    Proxy proxy(editor, &mainWindow);\r\n    connectSignals(handler, proxy);\r\n\r\n    // Initialize FakeVimHandler.\r\n    initHandler(handler);\r\n\r\n    // Clear undo and redo queues.\r\n    clearUndoRedo(editor);\r\n\r\n    return app.exec();\r\n}\r\n\r\n#include \"main.moc\"\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/test/test.pro",
    "content": "include(../fakevim/fakevim.pri)\r\n\r\nSOURCES += main.cpp\r\nCONFIG += qt\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/tests/main.cpp",
    "content": "#include <iostream>\r\n#include <string>\r\n\r\nclass SomeClass {\r\npublic:\r\n    SomeClass(const std::string &var) : m_var(var) {}\r\nprivate:\r\n    std::string m_var;\r\n};\r\n\r\nint main(int argc, const char *argv[])\r\n{\r\n    using namespace std;\r\n    cout << \"TESTING...\";\r\n    cout << \"1\";\r\n    cout << \"2\";\r\n    cout << \"3\";\r\n    return 0;\r\n}\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/fakevim/tests/vim-test.sh",
    "content": "#!/bin/bash\r\nVIM=vim\r\nFAKEVIM=${FAKEVIM:-test/test}\r\ndiff=meld\r\ncmdfile=fakevim_test_cmd.log\r\nINDENT=${INDENT:-'    '}\r\noptions=\"set smartindent|set autoindent|set nocindent\"\r\n\r\nprint_help() {\r\n    echo \"USAGE: $0 FILE CMD...\"\r\n    echo \"  Run input in both Vim and FakeVim and compare result.\"\r\n    echo \"  Results are stored in FILE.vim and FILE.fakevim.\"\r\n    echo \"  Tests for FakeVim in Qt Creator are stored in \\\"$cmdfile\\\" file.\"\r\n}\r\n\r\nprint() {\r\n    for arg in \"$@\"; do\r\n        if [ \"$arg\" == \"N\" ]; then\r\n            printf '\\n'\r\n        else\r\n            printf \"%s\" \"$arg\"\r\n        fi\r\n    done >> \"$cmdfile\"\r\n}\r\n\r\nprint_content() {\r\n    local file=$1\r\n    sed \\\r\n        -e 's/\"/\\\\\"/g' \\\r\n        -e 's/^/'\"$INDENT\"'\"/' \\\r\n        -e 's/$/\" N/' \"$file\" \\\r\n        >> \"$cmdfile\"\r\n}\r\n\r\nvim_exec() {\r\n    for cmd in \"$@\"; do\r\n        printf \"%s\" \"|map \\\\X $cmd|normal \\\\X\"\r\n    done\r\n}\r\n\r\nrun_vim() {\r\n    local file=$1\r\n    shift\r\n    \"$VIM\" \\\r\n        -c \"$options\" \\\r\n        -c \"$(vim_exec \"$@\")\" \\\r\n        -c \"normal i|\" \\\r\n        -c \"wq\" \"$file\"\r\n}\r\n\r\nrun_fakevim() {\r\n    local file=$1\r\n    shift\r\n    find_fakevim\r\n    \"$FAKEVIM\" \"$file\" \\\r\n        \":$options|set nopasskeys|set nopasscontrolkey<CR>\" \\\r\n        \"$@\" \"<ESC><ESC>i|<ESC>\" \\\r\n        \":wq<CR>\"\r\n}\r\n\r\nfind_fakevim() {\r\n    if [ ! -x \"$FAKEVIM\" ]; then\r\n        dir=$(dirname \"$(readlink -f \"$0\")\")\r\n        FAKEVIM=$(find \"$dir\" -type f -executable -name test | head -1)\r\n    fi\r\n}\r\n\r\nprint_test() {\r\n    local header=$1\r\n    local file=$2\r\n    local footer=$3\r\n\r\n    print \"$header\" N\r\n    print_content \"$file\"\r\n    print \"$footer\" N\r\n}\r\n\r\nsame() {\r\n    cmp \"$@\" >/dev/null 2>&1\r\n}\r\n\r\nmain() {\r\n    set -e\r\n\r\n    if [ \"$#\" -lt 2 ]; then\r\n        print_help\r\n        exit 1\r\n    fi\r\n\r\n    local file=$1\r\n    shift # rest are commands\r\n\r\n    rm -f \"$cmdfile\"\r\n    #cp ~/.vimrc fakevimrc\r\n\r\n    print_test 'data.setText(' \"$file\" ');'\r\n\r\n    # run command through Vim\r\n    local vimoutfile=${file}.vim\r\n    cp \"$file\" \"$vimoutfile\"\r\n    run_vim \"$vimoutfile\" \"$@\"\r\n\r\n    print_test \"KEYS(\\\"$*\\\",\" \"$vimoutfile\" ');'\r\n\r\n    local fakevimoutfile=${file}.fakevim\r\n    cp \"$file\" \"$fakevimoutfile\"\r\n    run_fakevim \"$fakevimoutfile\" \"$@\"\r\n\r\n    if same  \"$fakevimoutfile\" \"$vimoutfile\"; then\r\n        echo OK, same result from Vim and FakeVim.\r\n    else\r\n        echo FAILED, different result from Vim and FakeVim.\r\n        $diff \"$fakevimoutfile\" \"$vimoutfile\"\r\n    fi\r\n\r\n    reset\r\n    cat \"$cmdfile\"\r\n    sed 's/^/    /' \"$cmdfile\" | xclip -i\r\n}\r\n\r\nmain \"$@\"\r\n\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/AUTHORS",
    "content": "Yunhui Fu <yhfudev@gmail.com>\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/README.md",
    "content": "# Universal Character Set Detector C Library (libucd)\n\n## What is it?\n\nThis library provides a highly accurate set of heuristics that attempt to determine\nthe character set used to encode some input text. This is extremely useful when your\nprogram has to handle an input file which is supplied without any encoding metadata.\n\n\nThe original code of libucd was written by Netscape Communications Corporation,\nis available at\nhttp://lxr.mozilla.org/seamonkey/source/extensions/universalchardet/, but unfortunately\nthe Firefox project removed most of the encoding detecting functions in their latest version.\nWhile the multi-language detector is widely used in other open source projects. So it's\nurgent to maintain a standalone version of the library that supports most of the language detecting.\nAnd this project was setup, and now also extended more languages, utilities and packaging.\n\n\nPulls together:\n\n  * A command line interface to the library, which also compare the results from\n    alternative libraries, such as `libicu`.\n  * The UCD library itself from the Mozilla seamonkey source tree\n  * The extended languages detection from the project https://bitbucket.org/medoc/uchardet-enhanced/\n\n\n## Why do you need this library?\n\n  * Integrated with patches and improvements of the users over the Internet;\n  * Provided thread-safe APIs;\n  * Support multiple packages compiling, includs RPM/DEB/PACMAN/ANDROID etc;\n  * Including the test case data and tools, you may confident to release the new code after running\n    test cases whenever you improved the code by yourself;\n  * Added more languages and encoding support;\n  * Provided document for APIs, man pages;\n\n\n## Supported Encodings\n\n  * Unicode: UTF-8, UTF-16 (2 variants), UTF-32 (4 variants)\n  * Traditional and Simplified Chinese: Big5, GB18030, EUC-TW, HZ-GB-2312, ISO-2022-CN \n  * Japanese: EUC-JP, SHIFT_JIS, ISO-2022-JP\n  * Korean: EUC-KR, ISO-2022-KR\n  * Cyrillic: KOI8-R, MacCyrillic, IBM855, IBM866, ISO-8859-5, WINDOWS-1251\n  * Hungarian: ISO-8859-2, WINDOWS-1250\n  * Bulgarian: ISO-8859-5, WINDOWS-1251\n  * English: WINDOWS-1252\n  * Greek: ISO-8859-7, WINDOWS-1253\n  * Visual and Logical Hebrew: ISO-8859-8, WINDOWS-1255\n  * Thai: TIS-620\n  * Czech: ISO-8859-2\n  * Finnish: WINDOWS-1252\n  * French: WINDOWS-1252\n  * German: WINDOWS-1252\n  * Polish: ISO-8859-2\n  * Spanish: WINDOWS-1252\n  * Swedish: WINDOWS-1252\n  * Turkish: ISO-8859-9\n\n\n## Building\n\nWe have a build system based on `autoconf/automake`, simply do this incantation:\n\n    ./configure\n    make\n\n\nIt also supports building for Linux distributions, such as RedHat/CentOS, Debian/Ubuntu, Arch Linux etc.\n\n - RedHat/CentOS\n\n\n    ./autogen.sh\n    make rpm\n\n\n - Debian/Ubuntu\n\n\n    ./autogen.sh\n    debuild -c -uc -us\n\n\n - Pacman\n\n\n    cd pacman\n    makepkg -Asf\n\n\n - Android\n\nAdd a line in your `Android.mk` file in the folder `jni`, for example:\n\n\n    include jni/libucd/Android.mk\n\n\nand then run `ndk-build`\n\n\n## API\n\nSee `libucd.h` or man pages, and `utils/sample.c` for the example.\n\n\n## Directory contents:\n\ndebian/, rpm/, pacman/\n - the configure files for various types of packages.\n\ndoc/\n - Contains the docuement described the general idea of auto detection.\n\nman/\n - man pages for library and utils\n\ninclude/\n - The C API header file\n\nsrc/\n - The C API from the reference above, with the enhanced mozilla code.\n\nutils/\n - A command line universal character set detector can process files both by file name or\n   by reading from STDIN.\n\ntest/\n - Wikipedia index pages in target languages, sometimes in multiple\n   encodings. The pages were manually stripped of english and boilerplate\n   content, in hope that the remaining is significant and typical text.\n\n - Used to check how the detection works.\n\nlangstats/\n - Data and code used to produce the bigram frequencies for a\n   language/encoding pair, used for the \"Two char Distribution Method\"\n   from the reference article (neither the article nor the mozilla module\n   publish the scripts used to generate the tables or the reference data).\n\n\n## License\n\nThe library is subject to the GNU General Public License Version 2.\nAlternatively, the library may be used under the terms of the GNU\nLesser General Public License 2.1.\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/include/libucd.h",
    "content": "/**\n * @file    libucd.h\n * @brief   charset detection functions\n * @author  Yunhui Fu (yhfudev@gmail.com)\n * @version 1.0\n * @date    2015-01-13\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef __LIBUCD_H\n#define __LIBUCD_H\n\n#define UCD_IMEXPORT\n\n//#ifdef _WIN32\n//#  ifdef DLL_EXPORTS\n//#    define UCD_IMEXPORT extern _declspec(dllexport)\n//#  else\n//#    define UCD_IMEXPORT extern _declspec(dllimport)\n//#  endif\n//#else\n//#  define UCD_IMEXPORT extern __attribute__ ((visibility(\"default\")))\n//#endif\n\n#include <stddef.h>\n\n#define UCD_RESULT_OK               0\n#define UCD_RESULT_NOMEMORY         (-1)\n#define UCD_RESULT_INVALID_DETECTOR (-2)\n\n#define UCD_MAX_ENCODING_NAME       64\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef void * ucd_t;\n\n/**\n * Create an encoding detector.\n * @param pdet [out] pointer to a ucd_t variable that receives\n *             the encoding detector handle.\n * @return UCD_RESULT_OK if succeeded. UCD_RESULT_NOMEMORY otherwise.\n */\nUCD_IMEXPORT int ucd_init (ucd_t * pdet);\n\n/**\n * Destroy an encoding detector.\n * @param det [in] the encoding detector handle to be destroyed.\n */\nUCD_IMEXPORT void ucd_clear (ucd_t * det);\n\n/**\n * Feed data to an encoding detector.\n * @param det [in] the encoding detector handle\n * @param data [in] data\n * @param len [in] length of data in bytes.\n * @return UCD_RESULT_OK if succeeded.\n *         UCD_RESULT_NOMEMORY if running out of memory.\n *         UCD_RESULT_INVALID_DETECTOR if det was invalid.\n */\nUCD_IMEXPORT int ucd_parse (ucd_t * det, const char* data, size_t len);\n\n/**\n * Notify an end of data to an encoding detctor.\n * @param det [in] the encoding detector handle\n * @return UCD_RESULT_OK if succeeded.\n *         UCD_RESULT_INVALID_DETECTOR if det was invalid.\n */\nUCD_IMEXPORT int ucd_end (ucd_t * det);\n\n/**\n * Reset an encoding detector.\n * @param det [in] the encoding detector handle\n * @return UCD_RESULT_OK if succeeded.\n *         UCD_RESULT_INVALID_DETECTOR if det was invalid.\n */\nUCD_IMEXPORT int ucd_reset (ucd_t * det);\n\n/**\n * Get the name of encoding that was detected.\n * @param det [in] the encoding detector handle\n * @param namebuf [in/out] pointer to a buffer that receives the name of\n *                detected encoding. A valid encoding name or an empty string\n *                will be written to namebuf. If an empty strng was written,\n *                the detector could not detect any encoding.\n *                Written strings will always be NULL-terminated.\n * @param buflen [in] length of namebuf\n * @return UCD_RESULT_OK if succeeded.\n *         UCD_RESULT_NOMEMORY if namebuf was too small to store\n *         the entire encoding name.\n *         UCD_RESULT_INVALID_DETECTOR if det was invalid.\n */\nUCD_IMEXPORT int ucd_results (ucd_t * det, char* namebuf, size_t buflen);\n\n#ifdef __cplusplus\n};\n#endif\n\n#endif /* __LIBUCD_H */\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/libucd.pri",
    "content": "LIBS *= -l$$qtLibraryName(libucd)\n\n\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/libucd.pro",
    "content": "TARGET = libucd\nTEMPLATE = lib\nCONFIG += staticlib\n\ninclude (../../liteideutils.pri)\n\nINCLUDEPATH += include\n\nSOURCES += src/CharDistribution.cpp \\\n    src/JpCntx.cpp \\\n    src/LangBulgarianModel.cpp \\\n    src/LangCyrillicModel.cpp \\\n    src/LangCzechModel.cpp \\\n    src/LangFinnishModel.cpp \\\n    src/LangFrenchModel.cpp \\\n    src/LangGermanModel.cpp \\\n    src/LangGreekModel.cpp \\\n    src/LangHebrewModel.cpp \\\n    src/LangHungarianModel.cpp \\\n    src/LangPolishModel.cpp \\\n    src/LangSpanishModel.cpp \\\n    src/LangSwedishModel.cpp \\\n    src/LangThaiModel.cpp \\\n    src/LangTurkishModel.cpp \\\n    src/nsBig5Prober.cpp \\\n    src/nsCharSetProber.cpp \\\n    src/nsEscCharsetProber.cpp \\\n    src/nsEscSM.cpp \\\n    src/nsEUCJPProber.cpp \\\n    src/nsEUCKRProber.cpp \\\n    src/nsEUCTWProber.cpp \\\n    src/nsGB2312Prober.cpp \\\n    src/nsHebrewProber.cpp \\\n    src/nsLatin1Prober.cpp \\\n    src/nsMBCSGroupProber.cpp \\\n    src/nsMBCSSM.cpp \\\n    src/nsSBCharSetProber.cpp \\\n    src/nsSBCSGroupProber.cpp \\\n    src/nsSJISProber.cpp \\\n    src/nsUniversalDetector.cpp \\\n    src/nsUTF8Prober.cpp \\\n    src/ucdapi.cpp\n\nDISTFILES += \\\n    src/Big5Freq.tab \\\n    src/EUCKRFreq.tab \\\n    src/EUCTWFreq.tab \\\n    src/GB2312Freq.tab \\\n    src/JISFreq.tab \\\n    src/Makefile.am\n\nHEADERS += \\\n    src/CharDistribution.h \\\n    src/JpCntx.h \\\n    src/nsBig5Prober.h \\\n    src/nsCharSetProber.h \\\n    src/nsCodingStateMachine.h \\\n    src/nscore.h \\\n    src/nsDebug.h \\\n    src/nsEscCharsetProber.h \\\n    src/nsEUCJPProber.h \\\n    src/nsEUCKRProber.h \\\n    src/nsEUCTWProber.h \\\n    src/nsGB2312Prober.h \\\n    src/nsHebrewProber.h \\\n    src/nsLatin1Prober.h \\\n    src/nsMBCSGroupProber.h \\\n    src/nsPkgInt.h \\\n    src/nsSBCharSetProber.h \\\n    src/nsSBCSGroupProber.h \\\n    src/nsSJISProber.h \\\n    src/nsUniversalDetector.h \\\n    src/nsUTF8Prober.h \\\n    src/prmem.h \\\n    include/libucd.h\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/Big5Freq.tab",
    "content": "/**\n * @file    Big5Freq.tab\n * @brief   Big5Freq\n * @license GPL 2.0/LGPL 2.1\n */\n\n// Big5 frequency table\n// by Taiwan's Mandarin Promotion Council \n// <http://www.edu.tw:81/mandr/>\n\n/******************************************************************************\n * 128  --> 0.42261\n * 256  --> 0.57851\n * 512  --> 0.74851\n * 1024 --> 0.89384\n * 2048 --> 0.97583\n *\n * Idea Distribution Ratio = 0.74851/(1-0.74851) =2.98\n * Random Distribution Ration = 512/(5401-512)=0.105\n * \n * Typical Distribution Ratio about 25% of Ideal one, still much higher than RDR\n *****************************************************************************/\n\n#define BIG5_TYPICAL_DISTRIBUTION_RATIO (float)0.75\n\n// Char to FreqOrder table\nstatic const PRInt16 Big5CharToFreqOrder[] =\n{\n   1,1801,1506, 255,1431, 198,   9,  82,   6,5008, 177, 202,3681,1256,2821, 110, //   16\n3814,  33,3274, 261,  76,  44,2114,  16,2946,2187,1176, 659,3971,  26,3451,2653, //   32\n1198,3972,3350,4202, 410,2215, 302, 590, 361,1964,   8, 204,  58,4510,5009,1932, //   48\n  63,5010,5011, 317,1614,  75, 222, 159,4203,2417,1480,5012,3555,3091, 224,2822, //   64\n3682,   3,  10,3973,1471,  29,2787,1135,2866,1940, 873, 130,3275,1123, 312,5013, //   80\n4511,2052, 507, 252, 682,5014, 142,1915, 124, 206,2947,  34,3556,3204,  64, 604, //   96\n5015,2501,1977,1978, 155,1991, 645, 641,1606,5016,3452, 337,  72, 406,5017,  80, //  112\n 630, 238,3205,1509, 263, 939,1092,2654, 756,1440,1094,3453, 449,  69,2987, 591, //  128\n 179,2096, 471, 115,2035,1844,  60,  50,2988, 134, 806,1869, 734,2036,3454, 180, //  144\n 995,1607, 156, 537,2907, 688,5018, 319,1305, 779,2145, 514,2379, 298,4512, 359, //  160\n2502,  90,2716,1338, 663,  11, 906,1099,2553,  20,2441, 182, 532,1716,5019, 732, //  176\n1376,4204,1311,1420,3206,  25,2317,1056, 113, 399, 382,1950, 242,3455,2474, 529, //  192\n3276, 475,1447,3683,5020, 117,  21, 656, 810,1297,2300,2334,3557,5021, 126,4205, //  208\n 706, 456, 150, 613,4513,  71,1118,2037,4206, 145,3092,  85, 835, 486,2115,1246, //  224\n1426, 428, 727,1285,1015, 800, 106, 623, 303,1281,5022,2128,2359, 347,3815, 221, //  240\n3558,3135,5023,1956,1153,4207,  83, 296,1199,3093, 192, 624,  93,5024, 822,1898, //  256\n2823,3136, 795,2065, 991,1554,1542,1592,  27,  43,2867, 859, 139,1456, 860,4514, //  272\n 437, 712,3974, 164,2397,3137, 695, 211,3037,2097, 195,3975,1608,3559,3560,3684, //  288\n3976, 234, 811,2989,2098,3977,2233,1441,3561,1615,2380, 668,2077,1638, 305, 228, //  304\n1664,4515, 467, 415,5025, 262,2099,1593, 239, 108, 300, 200,1033, 512,1247,2078, //  320\n5026,5027,2176,3207,3685,2682, 593, 845,1062,3277,  88,1723,2038,3978,1951, 212, //  336\n 266, 152, 149, 468,1899,4208,4516,  77, 187,5028,3038,  37,   5,2990,5029,3979, //  352\n5030,5031,  39,2524,4517,2908,3208,2079,  55, 148,  74,4518, 545, 483,1474,1029, //  368\n1665, 217,1870,1531,3138,1104,2655,4209,  24, 172,3562, 900,3980,3563,3564,4519, //  384\n  32,1408,2824,1312, 329, 487,2360,2251,2717, 784,2683,   4,3039,3351,1427,1789, //  400\n 188, 109, 499,5032,3686,1717,1790, 888,1217,3040,4520,5033,3565,5034,3352,1520, //  416\n3687,3981, 196,1034, 775,5035,5036, 929,1816, 249, 439,  38,5037,1063,5038, 794, //  432\n3982,1435,2301,  46, 178,3278,2066,5039,2381,5040, 214,1709,4521, 804,  35, 707, //  448\n 324,3688,1601,2554, 140, 459,4210,5041,5042,1365, 839, 272, 978,2262,2580,3456, //  464\n2129,1363,3689,1423, 697, 100,3094,  48,  70,1231, 495,3139,2196,5043,1294,5044, //  480\n2080, 462, 586,1042,3279, 853, 256, 988, 185,2382,3457,1698, 434,1084,5045,3458, //  496\n 314,2625,2788,4522,2335,2336, 569,2285, 637,1817,2525, 757,1162,1879,1616,3459, //  512\n 287,1577,2116, 768,4523,1671,2868,3566,2526,1321,3816, 909,2418,5046,4211, 933, //  528\n3817,4212,2053,2361,1222,4524, 765,2419,1322, 786,4525,5047,1920,1462,1677,2909, //  544\n1699,5048,4526,1424,2442,3140,3690,2600,3353,1775,1941,3460,3983,4213, 309,1369, //  560\n1130,2825, 364,2234,1653,1299,3984,3567,3985,3986,2656, 525,1085,3041, 902,2001, //  576\n1475, 964,4527, 421,1845,1415,1057,2286, 940,1364,3141, 376,4528,4529,1381,   7, //  592\n2527, 983,2383, 336,1710,2684,1846, 321,3461, 559,1131,3042,2752,1809,1132,1313, //  608\n 265,1481,1858,5049, 352,1203,2826,3280, 167,1089, 420,2827, 776, 792,1724,3568, //  624\n4214,2443,3281,5050,4215,5051, 446, 229, 333,2753, 901,3818,1200,1557,4530,2657, //  640\n1921, 395,2754,2685,3819,4216,1836, 125, 916,3209,2626,4531,5052,5053,3820,5054, //  656\n5055,5056,4532,3142,3691,1133,2555,1757,3462,1510,2318,1409,3569,5057,2146, 438, //  672\n2601,2910,2384,3354,1068, 958,3043, 461, 311,2869,2686,4217,1916,3210,4218,1979, //  688\n 383, 750,2755,2627,4219, 274, 539, 385,1278,1442,5058,1154,1965, 384, 561, 210, //  704\n  98,1295,2556,3570,5059,1711,2420,1482,3463,3987,2911,1257, 129,5060,3821, 642, //  720\n 523,2789,2790,2658,5061, 141,2235,1333,  68, 176, 441, 876, 907,4220, 603,2602, //  736\n 710, 171,3464, 404, 549,  18,3143,2398,1410,3692,1666,5062,3571,4533,2912,4534, //  752\n5063,2991, 368,5064, 146, 366,  99, 871,3693,1543, 748, 807,1586,1185,  22,2263, //  768\n 379,3822,3211,5065,3212, 505,1942,2628,1992,1382,2319,5066, 380,2362, 218, 702, //  784\n1818,1248,3465,3044,3572,3355,3282,5067,2992,3694, 930,3283,3823,5068,  59,5069, //  800\n 585, 601,4221, 497,3466,1112,1314,4535,1802,5070,1223,1472,2177,5071, 749,1837, //  816\n 690,1900,3824,1773,3988,1476, 429,1043,1791,2236,2117, 917,4222, 447,1086,1629, //  832\n5072, 556,5073,5074,2021,1654, 844,1090, 105, 550, 966,1758,2828,1008,1783, 686, //  848\n1095,5075,2287, 793,1602,5076,3573,2603,4536,4223,2948,2302,4537,3825, 980,2503, //  864\n 544, 353, 527,4538, 908,2687,2913,5077, 381,2629,1943,1348,5078,1341,1252, 560, //  880\n3095,5079,3467,2870,5080,2054, 973, 886,2081, 143,4539,5081,5082, 157,3989, 496, //  896\n4224,  57, 840, 540,2039,4540,4541,3468,2118,1445, 970,2264,1748,1966,2082,4225, //  912\n3144,1234,1776,3284,2829,3695, 773,1206,2130,1066,2040,1326,3990,1738,1725,4226, //  928\n 279,3145,  51,1544,2604, 423,1578,2131,2067, 173,4542,1880,5083,5084,1583, 264, //  944\n 610,3696,4543,2444, 280, 154,5085,5086,5087,1739, 338,1282,3096, 693,2871,1411, //  960\n1074,3826,2445,5088,4544,5089,5090,1240, 952,2399,5091,2914,1538,2688, 685,1483, //  976\n4227,2475,1436, 953,4228,2055,4545, 671,2400,  79,4229,2446,3285, 608, 567,2689, //  992\n3469,4230,4231,1691, 393,1261,1792,2401,5092,4546,5093,5094,5095,5096,1383,1672, // 1008\n3827,3213,1464, 522,1119, 661,1150, 216, 675,4547,3991,1432,3574, 609,4548,2690, // 1024\n2402,5097,5098,5099,4232,3045,   0,5100,2476, 315, 231,2447, 301,3356,4549,2385, // 1040\n5101, 233,4233,3697,1819,4550,4551,5102,  96,1777,1315,2083,5103, 257,5104,1810, // 1056\n3698,2718,1139,1820,4234,2022,1124,2164,2791,1778,2659,5105,3097, 363,1655,3214, // 1072\n5106,2993,5107,5108,5109,3992,1567,3993, 718, 103,3215, 849,1443, 341,3357,2949, // 1088\n1484,5110,1712, 127,  67, 339,4235,2403, 679,1412, 821,5111,5112, 834, 738, 351, // 1104\n2994,2147, 846, 235,1497,1881, 418,1993,3828,2719, 186,1100,2148,2756,3575,1545, // 1120\n1355,2950,2872,1377, 583,3994,4236,2581,2995,5113,1298,3699,1078,2557,3700,2363, // 1136\n  78,3829,3830, 267,1289,2100,2002,1594,4237, 348, 369,1274,2197,2178,1838,4552, // 1152\n1821,2830,3701,2757,2288,2003,4553,2951,2758, 144,3358, 882,4554,3995,2759,3470, // 1168\n4555,2915,5114,4238,1726, 320,5115,3996,3046, 788,2996,5116,2831,1774,1327,2873, // 1184\n3997,2832,5117,1306,4556,2004,1700,3831,3576,2364,2660, 787,2023, 506, 824,3702, // 1200\n 534, 323,4557,1044,3359,2024,1901, 946,3471,5118,1779,1500,1678,5119,1882,4558, // 1216\n 165, 243,4559,3703,2528, 123, 683,4239, 764,4560,  36,3998,1793, 589,2916, 816, // 1232\n 626,1667,3047,2237,1639,1555,1622,3832,3999,5120,4000,2874,1370,1228,1933, 891, // 1248\n2084,2917, 304,4240,5121, 292,2997,2720,3577, 691,2101,4241,1115,4561, 118, 662, // 1264\n5122, 611,1156, 854,2386,1316,2875,   2, 386, 515,2918,5123,5124,3286, 868,2238, // 1280\n1486, 855,2661, 785,2216,3048,5125,1040,3216,3578,5126,3146, 448,5127,1525,5128, // 1296\n2165,4562,5129,3833,5130,4242,2833,3579,3147, 503, 818,4001,3148,1568, 814, 676, // 1312\n1444, 306,1749,5131,3834,1416,1030, 197,1428, 805,2834,1501,4563,5132,5133,5134, // 1328\n1994,5135,4564,5136,5137,2198,  13,2792,3704,2998,3149,1229,1917,5138,3835,2132, // 1344\n5139,4243,4565,2404,3580,5140,2217,1511,1727,1120,5141,5142, 646,3836,2448, 307, // 1360\n5143,5144,1595,3217,5145,5146,5147,3705,1113,1356,4002,1465,2529,2530,5148, 519, // 1376\n5149, 128,2133,  92,2289,1980,5150,4003,1512, 342,3150,2199,5151,2793,2218,1981, // 1392\n3360,4244, 290,1656,1317, 789, 827,2365,5152,3837,4566, 562, 581,4004,5153, 401, // 1408\n4567,2252,  94,4568,5154,1399,2794,5155,1463,2025,4569,3218,1944,5156, 828,1105, // 1424\n4245,1262,1394,5157,4246, 605,4570,5158,1784,2876,5159,2835, 819,2102, 578,2200, // 1440\n2952,5160,1502, 436,3287,4247,3288,2836,4005,2919,3472,3473,5161,2721,2320,5162, // 1456\n5163,2337,2068,  23,4571, 193, 826,3838,2103, 699,1630,4248,3098, 390,1794,1064, // 1472\n3581,5164,1579,3099,3100,1400,5165,4249,1839,1640,2877,5166,4572,4573, 137,4250, // 1488\n 598,3101,1967, 780, 104, 974,2953,5167, 278, 899, 253, 402, 572, 504, 493,1339, // 1504\n5168,4006,1275,4574,2582,2558,5169,3706,3049,3102,2253, 565,1334,2722, 863,  41, // 1520\n5170,5171,4575,5172,1657,2338,  19, 463,2760,4251, 606,5173,2999,3289,1087,2085, // 1536\n1323,2662,3000,5174,1631,1623,1750,4252,2691,5175,2878, 791,2723,2663,2339, 232, // 1552\n2421,5176,3001,1498,5177,2664,2630, 755,1366,3707,3290,3151,2026,1609, 119,1918, // 1568\n3474, 862,1026,4253,5178,4007,3839,4576,4008,4577,2265,1952,2477,5179,1125, 817, // 1584\n4254,4255,4009,1513,1766,2041,1487,4256,3050,3291,2837,3840,3152,5180,5181,1507, // 1600\n5182,2692, 733,  40,1632,1106,2879, 345,4257, 841,2531, 230,4578,3002,1847,3292, // 1616\n3475,5183,1263, 986,3476,5184, 735, 879, 254,1137, 857, 622,1300,1180,1388,1562, // 1632\n4010,4011,2954, 967,2761,2665,1349, 592,2134,1692,3361,3003,1995,4258,1679,4012, // 1648\n1902,2188,5185, 739,3708,2724,1296,1290,5186,4259,2201,2202,1922,1563,2605,2559, // 1664\n1871,2762,3004,5187, 435,5188, 343,1108, 596,  17,1751,4579,2239,3477,3709,5189, // 1680\n4580, 294,3582,2955,1693, 477, 979, 281,2042,3583, 643,2043,3710,2631,2795,2266, // 1696\n1031,2340,2135,2303,3584,4581, 367,1249,2560,5190,3585,5191,4582,1283,3362,2005, // 1712\n 240,1762,3363,4583,4584, 836,1069,3153, 474,5192,2149,2532, 268,3586,5193,3219, // 1728\n1521,1284,5194,1658,1546,4260,5195,3587,3588,5196,4261,3364,2693,1685,4262, 961, // 1744\n1673,2632, 190,2006,2203,3841,4585,4586,5197, 570,2504,3711,1490,5198,4587,2633, // 1760\n3293,1957,4588, 584,1514, 396,1045,1945,5199,4589,1968,2449,5200,5201,4590,4013, // 1776\n 619,5202,3154,3294, 215,2007,2796,2561,3220,4591,3221,4592, 763,4263,3842,4593, // 1792\n5203,5204,1958,1767,2956,3365,3712,1174, 452,1477,4594,3366,3155,5205,2838,1253, // 1808\n2387,2189,1091,2290,4264, 492,5206, 638,1169,1825,2136,1752,4014, 648, 926,1021, // 1824\n1324,4595, 520,4596, 997, 847,1007, 892,4597,3843,2267,1872,3713,2405,1785,4598, // 1840\n1953,2957,3103,3222,1728,4265,2044,3714,4599,2008,1701,3156,1551,  30,2268,4266, // 1856\n5207,2027,4600,3589,5208, 501,5209,4267, 594,3478,2166,1822,3590,3479,3591,3223, // 1872\n 829,2839,4268,5210,1680,3157,1225,4269,5211,3295,4601,4270,3158,2341,5212,4602, // 1888\n4271,5213,4015,4016,5214,1848,2388,2606,3367,5215,4603, 374,4017, 652,4272,4273, // 1904\n 375,1140, 798,5216,5217,5218,2366,4604,2269, 546,1659, 138,3051,2450,4605,5219, // 1920\n2254, 612,1849, 910, 796,3844,1740,1371, 825,3845,3846,5220,2920,2562,5221, 692, // 1936\n 444,3052,2634, 801,4606,4274,5222,1491, 244,1053,3053,4275,4276, 340,5223,4018, // 1952\n1041,3005, 293,1168,  87,1357,5224,1539, 959,5225,2240, 721, 694,4277,3847, 219, // 1968\n1478, 644,1417,3368,2666,1413,1401,1335,1389,4019,5226,5227,3006,2367,3159,1826, // 1984\n 730,1515, 184,2840,  66,4607,5228,1660,2958, 246,3369, 378,1457, 226,3480, 975, // 2000\n4020,2959,1264,3592, 674, 696,5229, 163,5230,1141,2422,2167, 713,3593,3370,4608, // 2016\n4021,5231,5232,1186,  15,5233,1079,1070,5234,1522,3224,3594, 276,1050,2725, 758, // 2032\n1126, 653,2960,3296,5235,2342, 889,3595,4022,3104,3007, 903,1250,4609,4023,3481, // 2048\n3596,1342,1681,1718, 766,3297, 286,  89,2961,3715,5236,1713,5237,2607,3371,3008, // 2064\n5238,2962,2219,3225,2880,5239,4610,2505,2533, 181, 387,1075,4024, 731,2190,3372, // 2080\n5240,3298, 310, 313,3482,2304, 770,4278,  54,3054, 189,4611,3105,3848,4025,5241, // 2096\n1230,1617,1850, 355,3597,4279,4612,3373, 111,4280,3716,1350,3160,3483,3055,4281, // 2112\n2150,3299,3598,5242,2797,4026,4027,3009, 722,2009,5243,1071, 247,1207,2343,2478, // 2128\n1378,4613,2010, 864,1437,1214,4614, 373,3849,1142,2220, 667,4615, 442,2763,2563, // 2144\n3850,4028,1969,4282,3300,1840, 837, 170,1107, 934,1336,1883,5244,5245,2119,4283, // 2160\n2841, 743,1569,5246,4616,4284, 582,2389,1418,3484,5247,1803,5248, 357,1395,1729, // 2176\n3717,3301,2423,1564,2241,5249,3106,3851,1633,4617,1114,2086,4285,1532,5250, 482, // 2192\n2451,4618,5251,5252,1492, 833,1466,5253,2726,3599,1641,2842,5254,1526,1272,3718, // 2208\n4286,1686,1795, 416,2564,1903,1954,1804,5255,3852,2798,3853,1159,2321,5256,2881, // 2224\n4619,1610,1584,3056,2424,2764, 443,3302,1163,3161,5257,5258,4029,5259,4287,2506, // 2240\n3057,4620,4030,3162,2104,1647,3600,2011,1873,4288,5260,4289, 431,3485,5261, 250, // 2256\n  97,  81,4290,5262,1648,1851,1558, 160, 848,5263, 866, 740,1694,5264,2204,2843, // 2272\n3226,4291,4621,3719,1687, 950,2479, 426, 469,3227,3720,3721,4031,5265,5266,1188, // 2288\n 424,1996, 861,3601,4292,3854,2205,2694, 168,1235,3602,4293,5267,2087,1674,4622, // 2304\n3374,3303, 220,2565,1009,5268,3855, 670,3010, 332,1208, 717,5269,5270,3603,2452, // 2320\n4032,3375,5271, 513,5272,1209,2882,3376,3163,4623,1080,5273,5274,5275,5276,2534, // 2336\n3722,3604, 815,1587,4033,4034,5277,3605,3486,3856,1254,4624,1328,3058,1390,4035, // 2352\n1741,4036,3857,4037,5278, 236,3858,2453,3304,5279,5280,3723,3859,1273,3860,4625, // 2368\n5281, 308,5282,4626, 245,4627,1852,2480,1307,2583, 430, 715,2137,2454,5283, 270, // 2384\n 199,2883,4038,5284,3606,2727,1753, 761,1754, 725,1661,1841,4628,3487,3724,5285, // 2400\n5286, 587,  14,3305, 227,2608, 326, 480,2270, 943,2765,3607, 291, 650,1884,5287, // 2416\n1702,1226, 102,1547,  62,3488, 904,4629,3489,1164,4294,5288,5289,1224,1548,2766, // 2432\n 391, 498,1493,5290,1386,1419,5291,2056,1177,4630, 813, 880,1081,2368, 566,1145, // 2448\n4631,2291,1001,1035,2566,2609,2242, 394,1286,5292,5293,2069,5294,  86,1494,1730, // 2464\n4039, 491,1588, 745, 897,2963, 843,3377,4040,2767,2884,3306,1768, 998,2221,2070, // 2480\n 397,1827,1195,1970,3725,3011,3378, 284,5295,3861,2507,2138,2120,1904,5296,4041, // 2496\n2151,4042,4295,1036,3490,1905, 114,2567,4296, 209,1527,5297,5298,2964,2844,2635, // 2512\n2390,2728,3164, 812,2568,5299,3307,5300,1559, 737,1885,3726,1210, 885,  28,2695, // 2528\n3608,3862,5301,4297,1004,1780,4632,5302, 346,1982,2222,2696,4633,3863,1742, 797, // 2544\n1642,4043,1934,1072,1384,2152, 896,4044,3308,3727,3228,2885,3609,5303,2569,1959, // 2560\n4634,2455,1786,5304,5305,5306,4045,4298,1005,1308,3728,4299,2729,4635,4636,1528, // 2576\n2610, 161,1178,4300,1983, 987,4637,1101,4301, 631,4046,1157,3229,2425,1343,1241, // 2592\n1016,2243,2570, 372, 877,2344,2508,1160, 555,1935, 911,4047,5307, 466,1170, 169, // 2608\n1051,2921,2697,3729,2481,3012,1182,2012,2571,1251,2636,5308, 992,2345,3491,1540, // 2624\n2730,1201,2071,2406,1997,2482,5309,4638, 528,1923,2191,1503,1874,1570,2369,3379, // 2640\n3309,5310, 557,1073,5311,1828,3492,2088,2271,3165,3059,3107, 767,3108,2799,4639, // 2656\n1006,4302,4640,2346,1267,2179,3730,3230, 778,4048,3231,2731,1597,2667,5312,4641, // 2672\n5313,3493,5314,5315,5316,3310,2698,1433,3311, 131,  95,1504,4049, 723,4303,3166, // 2688\n1842,3610,2768,2192,4050,2028,2105,3731,5317,3013,4051,1218,5318,3380,3232,4052, // 2704\n4304,2584, 248,1634,3864, 912,5319,2845,3732,3060,3865, 654,  53,5320,3014,5321, // 2720\n1688,4642, 777,3494,1032,4053,1425,5322, 191, 820,2121,2846, 971,4643, 931,3233, // 2736\n 135, 664, 783,3866,1998, 772,2922,1936,4054,3867,4644,2923,3234, 282,2732, 640, // 2752\n1372,3495,1127, 922, 325,3381,5323,5324, 711,2045,5325,5326,4055,2223,2800,1937, // 2768\n4056,3382,2224,2255,3868,2305,5327,4645,3869,1258,3312,4057,3235,2139,2965,4058, // 2784\n4059,5328,2225, 258,3236,4646, 101,1227,5329,3313,1755,5330,1391,3314,5331,2924, // 2800\n2057, 893,5332,5333,5334,1402,4305,2347,5335,5336,3237,3611,5337,5338, 878,1325, // 2816\n1781,2801,4647, 259,1385,2585, 744,1183,2272,4648,5339,4060,2509,5340, 684,1024, // 2832\n4306,5341, 472,3612,3496,1165,3315,4061,4062, 322,2153, 881, 455,1695,1152,1340, // 2848\n 660, 554,2154,4649,1058,4650,4307, 830,1065,3383,4063,4651,1924,5342,1703,1919, // 2864\n5343, 932,2273, 122,5344,4652, 947, 677,5345,3870,2637, 297,1906,1925,2274,4653, // 2880\n2322,3316,5346,5347,4308,5348,4309,  84,4310, 112, 989,5349, 547,1059,4064, 701, // 2896\n3613,1019,5350,4311,5351,3497, 942, 639, 457,2306,2456, 993,2966, 407, 851, 494, // 2912\n4654,3384, 927,5352,1237,5353,2426,3385, 573,4312, 680, 921,2925,1279,1875, 285, // 2928\n 790,1448,1984, 719,2168,5354,5355,4655,4065,4066,1649,5356,1541, 563,5357,1077, // 2944\n5358,3386,3061,3498, 511,3015,4067,4068,3733,4069,1268,2572,3387,3238,4656,4657, // 2960\n5359, 535,1048,1276,1189,2926,2029,3167,1438,1373,2847,2967,1134,2013,5360,4313, // 2976\n1238,2586,3109,1259,5361, 700,5362,2968,3168,3734,4314,5363,4315,1146,1876,1907, // 2992\n4658,2611,4070, 781,2427, 132,1589, 203, 147, 273,2802,2407, 898,1787,2155,4071, // 3008\n4072,5364,3871,2803,5365,5366,4659,4660,5367,3239,5368,1635,3872, 965,5369,1805, // 3024\n2699,1516,3614,1121,1082,1329,3317,4073,1449,3873,  65,1128,2848,2927,2769,1590, // 3040\n3874,5370,5371,  12,2668,  45, 976,2587,3169,4661, 517,2535,1013,1037,3240,5372, // 3056\n3875,2849,5373,3876,5374,3499,5375,2612, 614,1999,2323,3877,3110,2733,2638,5376, // 3072\n2588,4316, 599,1269,5377,1811,3735,5378,2700,3111, 759,1060, 489,1806,3388,3318, // 3088\n1358,5379,5380,2391,1387,1215,2639,2256, 490,5381,5382,4317,1759,2392,2348,5383, // 3104\n4662,3878,1908,4074,2640,1807,3241,4663,3500,3319,2770,2349, 874,5384,5385,3501, // 3120\n3736,1859,  91,2928,3737,3062,3879,4664,5386,3170,4075,2669,5387,3502,1202,1403, // 3136\n3880,2969,2536,1517,2510,4665,3503,2511,5388,4666,5389,2701,1886,1495,1731,4076, // 3152\n2370,4667,5390,2030,5391,5392,4077,2702,1216, 237,2589,4318,2324,4078,3881,4668, // 3168\n4669,2703,3615,3504, 445,4670,5393,5394,5395,5396,2771,  61,4079,3738,1823,4080, // 3184\n5397, 687,2046, 935, 925, 405,2670, 703,1096,1860,2734,4671,4081,1877,1367,2704, // 3200\n3389, 918,2106,1782,2483, 334,3320,1611,1093,4672, 564,3171,3505,3739,3390, 945, // 3216\n2641,2058,4673,5398,1926, 872,4319,5399,3506,2705,3112, 349,4320,3740,4082,4674, // 3232\n3882,4321,3741,2156,4083,4675,4676,4322,4677,2408,2047, 782,4084, 400, 251,4323, // 3248\n1624,5400,5401, 277,3742, 299,1265, 476,1191,3883,2122,4324,4325,1109, 205,5402, // 3264\n2590,1000,2157,3616,1861,5403,5404,5405,4678,5406,4679,2573, 107,2484,2158,4085, // 3280\n3507,3172,5407,1533, 541,1301, 158, 753,4326,2886,3617,5408,1696, 370,1088,4327, // 3296\n4680,3618, 579, 327, 440, 162,2244, 269,1938,1374,3508, 968,3063,  56,1396,3113, // 3312\n2107,3321,3391,5409,1927,2159,4681,3016,5410,3619,5411,5412,3743,4682,2485,5413, // 3328\n2804,5414,1650,4683,5415,2613,5416,5417,4086,2671,3392,1149,3393,4087,3884,4088, // 3344\n5418,1076,  49,5419, 951,3242,3322,3323, 450,2850, 920,5420,1812,2805,2371,4328, // 3360\n1909,1138,2372,3885,3509,5421,3243,4684,1910,1147,1518,2428,4685,3886,5422,4686, // 3376\n2393,2614, 260,1796,3244,5423,5424,3887,3324, 708,5425,3620,1704,5426,3621,1351, // 3392\n1618,3394,3017,1887, 944,4329,3395,4330,3064,3396,4331,5427,3744, 422, 413,1714, // 3408\n3325, 500,2059,2350,4332,2486,5428,1344,1911, 954,5429,1668,5430,5431,4089,2409, // 3424\n4333,3622,3888,4334,5432,2307,1318,2512,3114, 133,3115,2887,4687, 629,  31,2851, // 3440\n2706,3889,4688, 850, 949,4689,4090,2970,1732,2089,4335,1496,1853,5433,4091, 620, // 3456\n3245, 981,1242,3745,3397,1619,3746,1643,3326,2140,2457,1971,1719,3510,2169,5434, // 3472\n3246,5435,5436,3398,1829,5437,1277,4690,1565,2048,5438,1636,3623,3116,5439, 869, // 3488\n2852, 655,3890,3891,3117,4092,3018,3892,1310,3624,4691,5440,5441,5442,1733, 558, // 3504\n4692,3747, 335,1549,3065,1756,4336,3748,1946,3511,1830,1291,1192, 470,2735,2108, // 3520\n2806, 913,1054,4093,5443,1027,5444,3066,4094,4693, 982,2672,3399,3173,3512,3247, // 3536\n3248,1947,2807,5445, 571,4694,5446,1831,5447,3625,2591,1523,2429,5448,2090, 984, // 3552\n4695,3749,1960,5449,3750, 852, 923,2808,3513,3751, 969,1519, 999,2049,2325,1705, // 3568\n5450,3118, 615,1662, 151, 597,4095,2410,2326,1049, 275,4696,3752,4337, 568,3753, // 3584\n3626,2487,4338,3754,5451,2430,2275, 409,3249,5452,1566,2888,3514,1002, 769,2853, // 3600\n 194,2091,3174,3755,2226,3327,4339, 628,1505,5453,5454,1763,2180,3019,4096, 521, // 3616\n1161,2592,1788,2206,2411,4697,4097,1625,4340,4341, 412,  42,3119, 464,5455,2642, // 3632\n4698,3400,1760,1571,2889,3515,2537,1219,2207,3893,2643,2141,2373,4699,4700,3328, // 3648\n1651,3401,3627,5456,5457,3628,2488,3516,5458,3756,5459,5460,2276,2092, 460,5461, // 3664\n4701,5462,3020, 962, 588,3629, 289,3250,2644,1116,  52,5463,3067,1797,5464,5465, // 3680\n5466,1467,5467,1598,1143,3757,4342,1985,1734,1067,4702,1280,3402, 465,4703,1572, // 3696\n 510,5468,1928,2245,1813,1644,3630,5469,4704,3758,5470,5471,2673,1573,1534,5472, // 3712\n5473, 536,1808,1761,3517,3894,3175,2645,5474,5475,5476,4705,3518,2929,1912,2809, // 3728\n5477,3329,1122, 377,3251,5478, 360,5479,5480,4343,1529, 551,5481,2060,3759,1769, // 3744\n2431,5482,2930,4344,3330,3120,2327,2109,2031,4706,1404, 136,1468,1479, 672,1171, // 3760\n3252,2308, 271,3176,5483,2772,5484,2050, 678,2736, 865,1948,4707,5485,2014,4098, // 3776\n2971,5486,2737,2227,1397,3068,3760,4708,4709,1735,2931,3403,3631,5487,3895, 509, // 3792\n2854,2458,2890,3896,5488,5489,3177,3178,4710,4345,2538,4711,2309,1166,1010, 552, // 3808\n 681,1888,5490,5491,2972,2973,4099,1287,1596,1862,3179, 358, 453, 736, 175, 478, // 3824\n1117, 905,1167,1097,5492,1854,1530,5493,1706,5494,2181,3519,2292,3761,3520,3632, // 3840\n4346,2093,4347,5495,3404,1193,2489,4348,1458,2193,2208,1863,1889,1421,3331,2932, // 3856\n3069,2182,3521, 595,2123,5496,4100,5497,5498,4349,1707,2646, 223,3762,1359, 751, // 3872\n3121, 183,3522,5499,2810,3021, 419,2374, 633, 704,3897,2394, 241,5500,5501,5502, // 3888\n 838,3022,3763,2277,2773,2459,3898,1939,2051,4101,1309,3122,2246,1181,5503,1136, // 3904\n2209,3899,2375,1446,4350,2310,4712,5504,5505,4351,1055,2615, 484,3764,5506,4102, // 3920\n 625,4352,2278,3405,1499,4353,4103,5507,4104,4354,3253,2279,2280,3523,5508,5509, // 3936\n2774, 808,2616,3765,3406,4105,4355,3123,2539, 526,3407,3900,4356, 955,5510,1620, // 3952\n4357,2647,2432,5511,1429,3766,1669,1832, 994, 928,5512,3633,1260,5513,5514,5515, // 3968\n1949,2293, 741,2933,1626,4358,2738,2460, 867,1184, 362,3408,1392,5516,5517,4106, // 3984\n4359,1770,1736,3254,2934,4713,4714,1929,2707,1459,1158,5518,3070,3409,2891,1292, // 4000\n1930,2513,2855,3767,1986,1187,2072,2015,2617,4360,5519,2574,2514,2170,3768,2490, // 4016\n3332,5520,3769,4715,5521,5522, 666,1003,3023,1022,3634,4361,5523,4716,1814,2257, // 4032\n 574,3901,1603, 295,1535, 705,3902,4362, 283, 858, 417,5524,5525,3255,4717,4718, // 4048\n3071,1220,1890,1046,2281,2461,4107,1393,1599, 689,2575, 388,4363,5526,2491, 802, // 4064\n5527,2811,3903,2061,1405,2258,5528,4719,3904,2110,1052,1345,3256,1585,5529, 809, // 4080\n5530,5531,5532, 575,2739,3524, 956,1552,1469,1144,2328,5533,2329,1560,2462,3635, // 4096\n3257,4108, 616,2210,4364,3180,2183,2294,5534,1833,5535,3525,4720,5536,1319,3770, // 4112\n3771,1211,3636,1023,3258,1293,2812,5537,5538,5539,3905, 607,2311,3906, 762,2892, // 4128\n1439,4365,1360,4721,1485,3072,5540,4722,1038,4366,1450,2062,2648,4367,1379,4723, // 4144\n2593,5541,5542,4368,1352,1414,2330,2935,1172,5543,5544,3907,3908,4724,1798,1451, // 4160\n5545,5546,5547,5548,2936,4109,4110,2492,2351, 411,4111,4112,3637,3333,3124,4725, // 4176\n1561,2674,1452,4113,1375,5549,5550,  47,2974, 316,5551,1406,1591,2937,3181,5552, // 4192\n1025,2142,3125,3182, 354,2740, 884,2228,4369,2412, 508,3772, 726,3638, 996,2433, // 4208\n3639, 729,5553, 392,2194,1453,4114,4726,3773,5554,5555,2463,3640,2618,1675,2813, // 4224\n 919,2352,2975,2353,1270,4727,4115,  73,5556,5557, 647,5558,3259,2856,2259,1550, // 4240\n1346,3024,5559,1332, 883,3526,5560,5561,5562,5563,3334,2775,5564,1212, 831,1347, // 4256\n4370,4728,2331,3909,1864,3073, 720,3910,4729,4730,3911,5565,4371,5566,5567,4731, // 4272\n5568,5569,1799,4732,3774,2619,4733,3641,1645,2376,4734,5570,2938, 669,2211,2675, // 4288\n2434,5571,2893,5572,5573,1028,3260,5574,4372,2413,5575,2260,1353,5576,5577,4735, // 4304\n3183, 518,5578,4116,5579,4373,1961,5580,2143,4374,5581,5582,3025,2354,2355,3912, // 4320\n 516,1834,1454,4117,2708,4375,4736,2229,2620,1972,1129,3642,5583,2776,5584,2976, // 4336\n1422, 577,1470,3026,1524,3410,5585,5586, 432,4376,3074,3527,5587,2594,1455,2515, // 4352\n2230,1973,1175,5588,1020,2741,4118,3528,4737,5589,2742,5590,1743,1361,3075,3529, // 4368\n2649,4119,4377,4738,2295, 895, 924,4378,2171, 331,2247,3076, 166,1627,3077,1098, // 4384\n5591,1232,2894,2231,3411,4739, 657, 403,1196,2377, 542,3775,3412,1600,4379,3530, // 4400\n5592,4740,2777,3261, 576, 530,1362,4741,4742,2540,2676,3776,4120,5593, 842,3913, // 4416\n5594,2814,2032,1014,4121, 213,2709,3413, 665, 621,4380,5595,3777,2939,2435,5596, // 4432\n2436,3335,3643,3414,4743,4381,2541,4382,4744,3644,1682,4383,3531,1380,5597, 724, // 4448\n2282, 600,1670,5598,1337,1233,4745,3126,2248,5599,1621,4746,5600, 651,4384,5601, // 4464\n1612,4385,2621,5602,2857,5603,2743,2312,3078,5604, 716,2464,3079, 174,1255,2710, // 4480\n4122,3645, 548,1320,1398, 728,4123,1574,5605,1891,1197,3080,4124,5606,3081,3082, // 4496\n3778,3646,3779, 747,5607, 635,4386,4747,5608,5609,5610,4387,5611,5612,4748,5613, // 4512\n3415,4749,2437, 451,5614,3780,2542,2073,4388,2744,4389,4125,5615,1764,4750,5616, // 4528\n4390, 350,4751,2283,2395,2493,5617,4391,4126,2249,1434,4127, 488,4752, 458,4392, // 4544\n4128,3781, 771,1330,2396,3914,2576,3184,2160,2414,1553,2677,3185,4393,5618,2494, // 4560\n2895,2622,1720,2711,4394,3416,4753,5619,2543,4395,5620,3262,4396,2778,5621,2016, // 4576\n2745,5622,1155,1017,3782,3915,5623,3336,2313, 201,1865,4397,1430,5624,4129,5625, // 4592\n5626,5627,5628,5629,4398,1604,5630, 414,1866, 371,2595,4754,4755,3532,2017,3127, // 4608\n4756,1708, 960,4399, 887, 389,2172,1536,1663,1721,5631,2232,4130,2356,2940,1580, // 4624\n5632,5633,1744,4757,2544,4758,4759,5634,4760,5635,2074,5636,4761,3647,3417,2896, // 4640\n4400,5637,4401,2650,3418,2815, 673,2712,2465, 709,3533,4131,3648,4402,5638,1148, // 4656\n 502, 634,5639,5640,1204,4762,3649,1575,4763,2623,3783,5641,3784,3128, 948,3263, // 4672\n 121,1745,3916,1110,5642,4403,3083,2516,3027,4132,3785,1151,1771,3917,1488,4133, // 4688\n1987,5643,2438,3534,5644,5645,2094,5646,4404,3918,1213,1407,2816, 531,2746,2545, // 4704\n3264,1011,1537,4764,2779,4405,3129,1061,5647,3786,3787,1867,2897,5648,2018, 120, // 4720\n4406,4407,2063,3650,3265,2314,3919,2678,3419,1955,4765,4134,5649,3535,1047,2713, // 4736\n1266,5650,1368,4766,2858, 649,3420,3920,2546,2747,1102,2859,2679,5651,5652,2000, // 4752\n5653,1111,3651,2977,5654,2495,3921,3652,2817,1855,3421,3788,5655,5656,3422,2415, // 4768\n2898,3337,3266,3653,5657,2577,5658,3654,2818,4135,1460, 856,5659,3655,5660,2899, // 4784\n2978,5661,2900,3922,5662,4408, 632,2517, 875,3923,1697,3924,2296,5663,5664,4767, // 4800\n3028,1239, 580,4768,4409,5665, 914, 936,2075,1190,4136,1039,2124,5666,5667,5668, // 4816\n5669,3423,1473,5670,1354,4410,3925,4769,2173,3084,4137, 915,3338,4411,4412,3339, // 4832\n1605,1835,5671,2748, 398,3656,4413,3926,4138, 328,1913,2860,4139,3927,1331,4414, // 4848\n3029, 937,4415,5672,3657,4140,4141,3424,2161,4770,3425, 524, 742, 538,3085,1012, // 4864\n5673,5674,3928,2466,5675, 658,1103, 225,3929,5676,5677,4771,5678,4772,5679,3267, // 4880\n1243,5680,4142, 963,2250,4773,5681,2714,3658,3186,5682,5683,2596,2332,5684,4774, // 4896\n5685,5686,5687,3536, 957,3426,2547,2033,1931,2941,2467, 870,2019,3659,1746,2780, // 4912\n2781,2439,2468,5688,3930,5689,3789,3130,3790,3537,3427,3791,5690,1179,3086,5691, // 4928\n3187,2378,4416,3792,2548,3188,3131,2749,4143,5692,3428,1556,2549,2297, 977,2901, // 4944\n2034,4144,1205,3429,5693,1765,3430,3189,2125,1271, 714,1689,4775,3538,5694,2333, // 4960\n3931, 533,4417,3660,2184, 617,5695,2469,3340,3539,2315,5696,5697,3190,5698,5699, // 4976\n3932,1988, 618, 427,2651,3540,3431,5700,5701,1244,1690,5702,2819,4418,4776,5703, // 4992\n3541,4777,5704,2284,1576, 473,3661,4419,3432, 972,5705,3662,5706,3087,5707,5708, // 5008\n4778,4779,5709,3793,4145,4146,5710, 153,4780, 356,5711,1892,2902,4420,2144, 408, // 5024\n 803,2357,5712,3933,5713,4421,1646,2578,2518,4781,4782,3934,5714,3935,4422,5715, // 5040\n2416,3433, 752,5716,5717,1962,3341,2979,5718, 746,3030,2470,4783,4423,3794, 698, // 5056\n4784,1893,4424,3663,2550,4785,3664,3936,5719,3191,3434,5720,1824,1302,4147,2715, // 5072\n3937,1974,4425,5721,4426,3192, 823,1303,1288,1236,2861,3542,4148,3435, 774,3938, // 5088\n5722,1581,4786,1304,2862,3939,4787,5723,2440,2162,1083,3268,4427,4149,4428, 344, // 5104\n1173, 288,2316, 454,1683,5724,5725,1461,4788,4150,2597,5726,5727,4789, 985, 894, // 5120\n5728,3436,3193,5729,1914,2942,3795,1989,5730,2111,1975,5731,4151,5732,2579,1194, // 5136\n 425,5733,4790,3194,1245,3796,4429,5734,5735,2863,5736, 636,4791,1856,3940, 760, // 5152\n1800,5737,4430,2212,1508,4792,4152,1894,1684,2298,5738,5739,4793,4431,4432,2213, // 5168\n 479,5740,5741, 832,5742,4153,2496,5743,2980,2497,3797, 990,3132, 627,1815,2652, // 5184\n4433,1582,4434,2126,2112,3543,4794,5744, 799,4435,3195,5745,4795,2113,1737,3031, // 5200\n1018, 543, 754,4436,3342,1676,4796,4797,4154,4798,1489,5746,3544,5747,2624,2903, // 5216\n4155,5748,5749,2981,5750,5751,5752,5753,3196,4799,4800,2185,1722,5754,3269,3270, // 5232\n1843,3665,1715, 481, 365,1976,1857,5755,5756,1963,2498,4801,5757,2127,3666,3271, // 5248\n 433,1895,2064,2076,5758, 602,2750,5759,5760,5761,5762,5763,3032,1628,3437,5764, // 5264\n3197,4802,4156,2904,4803,2519,5765,2551,2782,5766,5767,5768,3343,4804,2905,5769, // 5280\n4805,5770,2864,4806,4807,1221,2982,4157,2520,5771,5772,5773,1868,1990,5774,5775, // 5296\n5776,1896,5777,5778,4808,1897,4158, 318,5779,2095,4159,4437,5780,5781, 485,5782, // 5312\n 938,3941, 553,2680, 116,5783,3942,3667,5784,3545,2681,2783,3438,3344,2820,5785, // 5328\n3668,2943,4160,1747,2944,2983,5786,5787, 207,5788,4809,5789,4810,2521,5790,3033, // 5344\n 890,3669,3943,5791,1878,3798,3439,5792,2186,2358,3440,1652,5793,5794,5795, 941, // 5360\n2299, 208,3546,4161,2020, 330,4438,3944,2906,2499,3799,4439,4811,5796,5797,5798, // 5376  //last 512\n\n/*************************************************************************************** \n *Everything below is of no interest for detection purpose\t\t\t\t\t\t\t   *\n ***************************************************************************************\n\n2522,1613,4812,5799,3345,3945,2523,5800,4162,5801,1637,4163,2471,4813,3946,5802, // 5392\n2500,3034,3800,5803,5804,2195,4814,5805,2163,5806,5807,5808,5809,5810,5811,5812, // 5408\n5813,5814,5815,5816,5817,5818,5819,5820,5821,5822,5823,5824,5825,5826,5827,5828, // 5424\n5829,5830,5831,5832,5833,5834,5835,5836,5837,5838,5839,5840,5841,5842,5843,5844, // 5440\n5845,5846,5847,5848,5849,5850,5851,5852,5853,5854,5855,5856,5857,5858,5859,5860, // 5456\n5861,5862,5863,5864,5865,5866,5867,5868,5869,5870,5871,5872,5873,5874,5875,5876, // 5472\n5877,5878,5879,5880,5881,5882,5883,5884,5885,5886,5887,5888,5889,5890,5891,5892, // 5488\n5893,5894,5895,5896,5897,5898,5899,5900,5901,5902,5903,5904,5905,5906,5907,5908, // 5504\n5909,5910,5911,5912,5913,5914,5915,5916,5917,5918,5919,5920,5921,5922,5923,5924, // 5520\n5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,5936,5937,5938,5939,5940, // 5536\n5941,5942,5943,5944,5945,5946,5947,5948,5949,5950,5951,5952,5953,5954,5955,5956, // 5552\n5957,5958,5959,5960,5961,5962,5963,5964,5965,5966,5967,5968,5969,5970,5971,5972, // 5568\n5973,5974,5975,5976,5977,5978,5979,5980,5981,5982,5983,5984,5985,5986,5987,5988, // 5584\n5989,5990,5991,5992,5993,5994,5995,5996,5997,5998,5999,6000,6001,6002,6003,6004, // 5600\n6005,6006,6007,6008,6009,6010,6011,6012,6013,6014,6015,6016,6017,6018,6019,6020, // 5616\n6021,6022,6023,6024,6025,6026,6027,6028,6029,6030,6031,6032,6033,6034,6035,6036, // 5632\n6037,6038,6039,6040,6041,6042,6043,6044,6045,6046,6047,6048,6049,6050,6051,6052, // 5648\n6053,6054,6055,6056,6057,6058,6059,6060,6061,6062,6063,6064,6065,6066,6067,6068, // 5664\n6069,6070,6071,6072,6073,6074,6075,6076,6077,6078,6079,6080,6081,6082,6083,6084, // 5680\n6085,6086,6087,6088,6089,6090,6091,6092,6093,6094,6095,6096,6097,6098,6099,6100, // 5696\n6101,6102,6103,6104,6105,6106,6107,6108,6109,6110,6111,6112,6113,6114,6115,6116, // 5712\n6117,6118,6119,6120,6121,6122,6123,6124,6125,6126,6127,6128,6129,6130,6131,6132, // 5728\n6133,6134,6135,6136,6137,6138,6139,6140,6141,6142,6143,6144,6145,6146,6147,6148, // 5744\n6149,6150,6151,6152,6153,6154,6155,6156,6157,6158,6159,6160,6161,6162,6163,6164, // 5760\n6165,6166,6167,6168,6169,6170,6171,6172,6173,6174,6175,6176,6177,6178,6179,6180, // 5776\n6181,6182,6183,6184,6185,6186,6187,6188,6189,6190,6191,6192,6193,6194,6195,6196, // 5792\n6197,6198,6199,6200,6201,6202,6203,6204,6205,6206,6207,6208,6209,6210,6211,6212, // 5808\n6213,6214,6215,6216,6217,6218,6219,6220,6221,6222,6223,3670,6224,6225,6226,6227, // 5824\n6228,6229,6230,6231,6232,6233,6234,6235,6236,6237,6238,6239,6240,6241,6242,6243, // 5840\n6244,6245,6246,6247,6248,6249,6250,6251,6252,6253,6254,6255,6256,6257,6258,6259, // 5856\n6260,6261,6262,6263,6264,6265,6266,6267,6268,6269,6270,6271,6272,6273,6274,6275, // 5872\n6276,6277,6278,6279,6280,6281,6282,6283,6284,6285,4815,6286,6287,6288,6289,6290, // 5888\n6291,6292,4816,6293,6294,6295,6296,6297,6298,6299,6300,6301,6302,6303,6304,6305, // 5904\n6306,6307,6308,6309,6310,6311,4817,4818,6312,6313,6314,6315,6316,6317,6318,4819, // 5920\n6319,6320,6321,6322,6323,6324,6325,6326,6327,6328,6329,6330,6331,6332,6333,6334, // 5936\n6335,6336,6337,4820,6338,6339,6340,6341,6342,6343,6344,6345,6346,6347,6348,6349, // 5952\n6350,6351,6352,6353,6354,6355,6356,6357,6358,6359,6360,6361,6362,6363,6364,6365, // 5968\n6366,6367,6368,6369,6370,6371,6372,6373,6374,6375,6376,6377,6378,6379,6380,6381, // 5984\n6382,6383,6384,6385,6386,6387,6388,6389,6390,6391,6392,6393,6394,6395,6396,6397, // 6000\n6398,6399,6400,6401,6402,6403,6404,6405,6406,6407,6408,6409,6410,3441,6411,6412, // 6016\n6413,6414,6415,6416,6417,6418,6419,6420,6421,6422,6423,6424,6425,4440,6426,6427, // 6032\n6428,6429,6430,6431,6432,6433,6434,6435,6436,6437,6438,6439,6440,6441,6442,6443, // 6048\n6444,6445,6446,6447,6448,6449,6450,6451,6452,6453,6454,4821,6455,6456,6457,6458, // 6064\n6459,6460,6461,6462,6463,6464,6465,6466,6467,6468,6469,6470,6471,6472,6473,6474, // 6080\n6475,6476,6477,3947,3948,6478,6479,6480,6481,3272,4441,6482,6483,6484,6485,4442, // 6096\n6486,6487,6488,6489,6490,6491,6492,6493,6494,6495,6496,4822,6497,6498,6499,6500, // 6112\n6501,6502,6503,6504,6505,6506,6507,6508,6509,6510,6511,6512,6513,6514,6515,6516, // 6128\n6517,6518,6519,6520,6521,6522,6523,6524,6525,6526,6527,6528,6529,6530,6531,6532, // 6144\n6533,6534,6535,6536,6537,6538,6539,6540,6541,6542,6543,6544,6545,6546,6547,6548, // 6160\n6549,6550,6551,6552,6553,6554,6555,6556,2784,6557,4823,6558,6559,6560,6561,6562, // 6176\n6563,6564,6565,6566,6567,6568,6569,3949,6570,6571,6572,4824,6573,6574,6575,6576, // 6192\n6577,6578,6579,6580,6581,6582,6583,4825,6584,6585,6586,3950,2785,6587,6588,6589, // 6208\n6590,6591,6592,6593,6594,6595,6596,6597,6598,6599,6600,6601,6602,6603,6604,6605, // 6224\n6606,6607,6608,6609,6610,6611,6612,4826,6613,6614,6615,4827,6616,6617,6618,6619, // 6240\n6620,6621,6622,6623,6624,6625,4164,6626,6627,6628,6629,6630,6631,6632,6633,6634, // 6256\n3547,6635,4828,6636,6637,6638,6639,6640,6641,6642,3951,2984,6643,6644,6645,6646, // 6272\n6647,6648,6649,4165,6650,4829,6651,6652,4830,6653,6654,6655,6656,6657,6658,6659, // 6288\n6660,6661,6662,4831,6663,6664,6665,6666,6667,6668,6669,6670,6671,4166,6672,4832, // 6304\n3952,6673,6674,6675,6676,4833,6677,6678,6679,4167,6680,6681,6682,3198,6683,6684, // 6320\n6685,6686,6687,6688,6689,6690,6691,6692,6693,6694,6695,6696,6697,4834,6698,6699, // 6336\n6700,6701,6702,6703,6704,6705,6706,6707,6708,6709,6710,6711,6712,6713,6714,6715, // 6352\n6716,6717,6718,6719,6720,6721,6722,6723,6724,6725,6726,6727,6728,6729,6730,6731, // 6368\n6732,6733,6734,4443,6735,6736,6737,6738,6739,6740,6741,6742,6743,6744,6745,4444, // 6384\n6746,6747,6748,6749,6750,6751,6752,6753,6754,6755,6756,6757,6758,6759,6760,6761, // 6400\n6762,6763,6764,6765,6766,6767,6768,6769,6770,6771,6772,6773,6774,6775,6776,6777, // 6416\n6778,6779,6780,6781,4168,6782,6783,3442,6784,6785,6786,6787,6788,6789,6790,6791, // 6432\n4169,6792,6793,6794,6795,6796,6797,6798,6799,6800,6801,6802,6803,6804,6805,6806, // 6448\n6807,6808,6809,6810,6811,4835,6812,6813,6814,4445,6815,6816,4446,6817,6818,6819, // 6464\n6820,6821,6822,6823,6824,6825,6826,6827,6828,6829,6830,6831,6832,6833,6834,6835, // 6480\n3548,6836,6837,6838,6839,6840,6841,6842,6843,6844,6845,6846,4836,6847,6848,6849, // 6496\n6850,6851,6852,6853,6854,3953,6855,6856,6857,6858,6859,6860,6861,6862,6863,6864, // 6512\n6865,6866,6867,6868,6869,6870,6871,6872,6873,6874,6875,6876,6877,3199,6878,6879, // 6528\n6880,6881,6882,4447,6883,6884,6885,6886,6887,6888,6889,6890,6891,6892,6893,6894, // 6544\n6895,6896,6897,6898,6899,6900,6901,6902,6903,6904,4170,6905,6906,6907,6908,6909, // 6560\n6910,6911,6912,6913,6914,6915,6916,6917,6918,6919,6920,6921,6922,6923,6924,6925, // 6576\n6926,6927,4837,6928,6929,6930,6931,6932,6933,6934,6935,6936,3346,6937,6938,4838, // 6592\n6939,6940,6941,4448,6942,6943,6944,6945,6946,4449,6947,6948,6949,6950,6951,6952, // 6608\n6953,6954,6955,6956,6957,6958,6959,6960,6961,6962,6963,6964,6965,6966,6967,6968, // 6624\n6969,6970,6971,6972,6973,6974,6975,6976,6977,6978,6979,6980,6981,6982,6983,6984, // 6640\n6985,6986,6987,6988,6989,6990,6991,6992,6993,6994,3671,6995,6996,6997,6998,4839, // 6656\n6999,7000,7001,7002,3549,7003,7004,7005,7006,7007,7008,7009,7010,7011,7012,7013, // 6672\n7014,7015,7016,7017,7018,7019,7020,7021,7022,7023,7024,7025,7026,7027,7028,7029, // 6688\n7030,4840,7031,7032,7033,7034,7035,7036,7037,7038,4841,7039,7040,7041,7042,7043, // 6704\n7044,7045,7046,7047,7048,7049,7050,7051,7052,7053,7054,7055,7056,7057,7058,7059, // 6720\n7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,2985,7071,7072,7073,7074, // 6736\n7075,7076,7077,7078,7079,7080,4842,7081,7082,7083,7084,7085,7086,7087,7088,7089, // 6752\n7090,7091,7092,7093,7094,7095,7096,7097,7098,7099,7100,7101,7102,7103,7104,7105, // 6768\n7106,7107,7108,7109,7110,7111,7112,7113,7114,7115,7116,7117,7118,4450,7119,7120, // 6784\n7121,7122,7123,7124,7125,7126,7127,7128,7129,7130,7131,7132,7133,7134,7135,7136, // 6800\n7137,7138,7139,7140,7141,7142,7143,4843,7144,7145,7146,7147,7148,7149,7150,7151, // 6816\n7152,7153,7154,7155,7156,7157,7158,7159,7160,7161,7162,7163,7164,7165,7166,7167, // 6832\n7168,7169,7170,7171,7172,7173,7174,7175,7176,7177,7178,7179,7180,7181,7182,7183, // 6848\n7184,7185,7186,7187,7188,4171,4172,7189,7190,7191,7192,7193,7194,7195,7196,7197, // 6864\n7198,7199,7200,7201,7202,7203,7204,7205,7206,7207,7208,7209,7210,7211,7212,7213, // 6880\n7214,7215,7216,7217,7218,7219,7220,7221,7222,7223,7224,7225,7226,7227,7228,7229, // 6896\n7230,7231,7232,7233,7234,7235,7236,7237,7238,7239,7240,7241,7242,7243,7244,7245, // 6912\n7246,7247,7248,7249,7250,7251,7252,7253,7254,7255,7256,7257,7258,7259,7260,7261, // 6928\n7262,7263,7264,7265,7266,7267,7268,7269,7270,7271,7272,7273,7274,7275,7276,7277, // 6944\n7278,7279,7280,7281,7282,7283,7284,7285,7286,7287,7288,7289,7290,7291,7292,7293, // 6960\n7294,7295,7296,4844,7297,7298,7299,7300,7301,7302,7303,7304,7305,7306,7307,7308, // 6976\n7309,7310,7311,7312,7313,7314,7315,7316,4451,7317,7318,7319,7320,7321,7322,7323, // 6992\n7324,7325,7326,7327,7328,7329,7330,7331,7332,7333,7334,7335,7336,7337,7338,7339, // 7008\n7340,7341,7342,7343,7344,7345,7346,7347,7348,7349,7350,7351,7352,7353,4173,7354, // 7024\n7355,4845,7356,7357,7358,7359,7360,7361,7362,7363,7364,7365,7366,7367,7368,7369, // 7040\n7370,7371,7372,7373,7374,7375,7376,7377,7378,7379,7380,7381,7382,7383,7384,7385, // 7056\n7386,7387,7388,4846,7389,7390,7391,7392,7393,7394,7395,7396,7397,7398,7399,7400, // 7072\n7401,7402,7403,7404,7405,3672,7406,7407,7408,7409,7410,7411,7412,7413,7414,7415, // 7088\n7416,7417,7418,7419,7420,7421,7422,7423,7424,7425,7426,7427,7428,7429,7430,7431, // 7104\n7432,7433,7434,7435,7436,7437,7438,7439,7440,7441,7442,7443,7444,7445,7446,7447, // 7120\n7448,7449,7450,7451,7452,7453,4452,7454,3200,7455,7456,7457,7458,7459,7460,7461, // 7136\n7462,7463,7464,7465,7466,7467,7468,7469,7470,7471,7472,7473,7474,4847,7475,7476, // 7152\n7477,3133,7478,7479,7480,7481,7482,7483,7484,7485,7486,7487,7488,7489,7490,7491, // 7168\n7492,7493,7494,7495,7496,7497,7498,7499,7500,7501,7502,3347,7503,7504,7505,7506, // 7184\n7507,7508,7509,7510,7511,7512,7513,7514,7515,7516,7517,7518,7519,7520,7521,4848, // 7200\n7522,7523,7524,7525,7526,7527,7528,7529,7530,7531,7532,7533,7534,7535,7536,7537, // 7216\n7538,7539,7540,7541,7542,7543,7544,7545,7546,7547,7548,7549,3801,4849,7550,7551, // 7232\n7552,7553,7554,7555,7556,7557,7558,7559,7560,7561,7562,7563,7564,7565,7566,7567, // 7248\n7568,7569,3035,7570,7571,7572,7573,7574,7575,7576,7577,7578,7579,7580,7581,7582, // 7264\n7583,7584,7585,7586,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598, // 7280\n7599,7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614, // 7296\n7615,7616,4850,7617,7618,3802,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628, // 7312\n7629,7630,7631,7632,4851,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643, // 7328\n7644,7645,7646,7647,7648,7649,7650,7651,7652,7653,7654,7655,7656,7657,7658,7659, // 7344\n7660,7661,7662,7663,7664,7665,7666,7667,7668,7669,7670,4453,7671,7672,7673,7674, // 7360\n7675,7676,7677,7678,7679,7680,7681,7682,7683,7684,7685,7686,7687,7688,7689,7690, // 7376\n7691,7692,7693,7694,7695,7696,7697,3443,7698,7699,7700,7701,7702,4454,7703,7704, // 7392\n7705,7706,7707,7708,7709,7710,7711,7712,7713,2472,7714,7715,7716,7717,7718,7719, // 7408\n7720,7721,7722,7723,7724,7725,7726,7727,7728,7729,7730,7731,3954,7732,7733,7734, // 7424\n7735,7736,7737,7738,7739,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7750, // 7440\n3134,7751,7752,4852,7753,7754,7755,4853,7756,7757,7758,7759,7760,4174,7761,7762, // 7456\n7763,7764,7765,7766,7767,7768,7769,7770,7771,7772,7773,7774,7775,7776,7777,7778, // 7472\n7779,7780,7781,7782,7783,7784,7785,7786,7787,7788,7789,7790,7791,7792,7793,7794, // 7488\n7795,7796,7797,7798,7799,7800,7801,7802,7803,7804,7805,4854,7806,7807,7808,7809, // 7504\n7810,7811,7812,7813,7814,7815,7816,7817,7818,7819,7820,7821,7822,7823,7824,7825, // 7520\n4855,7826,7827,7828,7829,7830,7831,7832,7833,7834,7835,7836,7837,7838,7839,7840, // 7536\n7841,7842,7843,7844,7845,7846,7847,3955,7848,7849,7850,7851,7852,7853,7854,7855, // 7552\n7856,7857,7858,7859,7860,3444,7861,7862,7863,7864,7865,7866,7867,7868,7869,7870, // 7568\n7871,7872,7873,7874,7875,7876,7877,7878,7879,7880,7881,7882,7883,7884,7885,7886, // 7584\n7887,7888,7889,7890,7891,4175,7892,7893,7894,7895,7896,4856,4857,7897,7898,7899, // 7600\n7900,2598,7901,7902,7903,7904,7905,7906,7907,7908,4455,7909,7910,7911,7912,7913, // 7616\n7914,3201,7915,7916,7917,7918,7919,7920,7921,4858,7922,7923,7924,7925,7926,7927, // 7632\n7928,7929,7930,7931,7932,7933,7934,7935,7936,7937,7938,7939,7940,7941,7942,7943, // 7648\n7944,7945,7946,7947,7948,7949,7950,7951,7952,7953,7954,7955,7956,7957,7958,7959, // 7664\n7960,7961,7962,7963,7964,7965,7966,7967,7968,7969,7970,7971,7972,7973,7974,7975, // 7680\n7976,7977,7978,7979,7980,7981,4859,7982,7983,7984,7985,7986,7987,7988,7989,7990, // 7696\n7991,7992,7993,7994,7995,7996,4860,7997,7998,7999,8000,8001,8002,8003,8004,8005, // 7712\n8006,8007,8008,8009,8010,8011,8012,8013,8014,8015,8016,4176,8017,8018,8019,8020, // 7728\n8021,8022,8023,4861,8024,8025,8026,8027,8028,8029,8030,8031,8032,8033,8034,8035, // 7744\n8036,4862,4456,8037,8038,8039,8040,4863,8041,8042,8043,8044,8045,8046,8047,8048, // 7760\n8049,8050,8051,8052,8053,8054,8055,8056,8057,8058,8059,8060,8061,8062,8063,8064, // 7776\n8065,8066,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8079,8080, // 7792\n8081,8082,8083,8084,8085,8086,8087,8088,8089,8090,8091,8092,8093,8094,8095,8096, // 7808\n8097,8098,8099,4864,4177,8100,8101,8102,8103,8104,8105,8106,8107,8108,8109,8110, // 7824\n8111,8112,8113,8114,8115,8116,8117,8118,8119,8120,4178,8121,8122,8123,8124,8125, // 7840\n8126,8127,8128,8129,8130,8131,8132,8133,8134,8135,8136,8137,8138,8139,8140,8141, // 7856\n8142,8143,8144,8145,4865,4866,8146,8147,8148,8149,8150,8151,8152,8153,8154,8155, // 7872\n8156,8157,8158,8159,8160,8161,8162,8163,8164,8165,4179,8166,8167,8168,8169,8170, // 7888\n8171,8172,8173,8174,8175,8176,8177,8178,8179,8180,8181,4457,8182,8183,8184,8185, // 7904\n8186,8187,8188,8189,8190,8191,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201, // 7920\n8202,8203,8204,8205,8206,8207,8208,8209,8210,8211,8212,8213,8214,8215,8216,8217, // 7936\n8218,8219,8220,8221,8222,8223,8224,8225,8226,8227,8228,8229,8230,8231,8232,8233, // 7952\n8234,8235,8236,8237,8238,8239,8240,8241,8242,8243,8244,8245,8246,8247,8248,8249, // 7968\n8250,8251,8252,8253,8254,8255,8256,3445,8257,8258,8259,8260,8261,8262,4458,8263, // 7984\n8264,8265,8266,8267,8268,8269,8270,8271,8272,4459,8273,8274,8275,8276,3550,8277, // 8000\n8278,8279,8280,8281,8282,8283,8284,8285,8286,8287,8288,8289,4460,8290,8291,8292, // 8016\n8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,8304,8305,8306,8307,4867, // 8032\n8308,8309,8310,8311,8312,3551,8313,8314,8315,8316,8317,8318,8319,8320,8321,8322, // 8048\n8323,8324,8325,8326,4868,8327,8328,8329,8330,8331,8332,8333,8334,8335,8336,8337, // 8064\n8338,8339,8340,8341,8342,8343,8344,8345,8346,8347,8348,8349,8350,8351,8352,8353, // 8080\n8354,8355,8356,8357,8358,8359,8360,8361,8362,8363,4869,4461,8364,8365,8366,8367, // 8096\n8368,8369,8370,4870,8371,8372,8373,8374,8375,8376,8377,8378,8379,8380,8381,8382, // 8112\n8383,8384,8385,8386,8387,8388,8389,8390,8391,8392,8393,8394,8395,8396,8397,8398, // 8128\n8399,8400,8401,8402,8403,8404,8405,8406,8407,8408,8409,8410,4871,8411,8412,8413, // 8144\n8414,8415,8416,8417,8418,8419,8420,8421,8422,4462,8423,8424,8425,8426,8427,8428, // 8160\n8429,8430,8431,8432,8433,2986,8434,8435,8436,8437,8438,8439,8440,8441,8442,8443, // 8176\n8444,8445,8446,8447,8448,8449,8450,8451,8452,8453,8454,8455,8456,8457,8458,8459, // 8192\n8460,8461,8462,8463,8464,8465,8466,8467,8468,8469,8470,8471,8472,8473,8474,8475, // 8208\n8476,8477,8478,4180,8479,8480,8481,8482,8483,8484,8485,8486,8487,8488,8489,8490, // 8224\n8491,8492,8493,8494,8495,8496,8497,8498,8499,8500,8501,8502,8503,8504,8505,8506, // 8240\n8507,8508,8509,8510,8511,8512,8513,8514,8515,8516,8517,8518,8519,8520,8521,8522, // 8256\n8523,8524,8525,8526,8527,8528,8529,8530,8531,8532,8533,8534,8535,8536,8537,8538, // 8272\n8539,8540,8541,8542,8543,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554, // 8288\n8555,8556,8557,8558,8559,8560,8561,8562,8563,8564,4872,8565,8566,8567,8568,8569, // 8304\n8570,8571,8572,8573,4873,8574,8575,8576,8577,8578,8579,8580,8581,8582,8583,8584, // 8320\n8585,8586,8587,8588,8589,8590,8591,8592,8593,8594,8595,8596,8597,8598,8599,8600, // 8336\n8601,8602,8603,8604,8605,3803,8606,8607,8608,8609,8610,8611,8612,8613,4874,3804, // 8352\n8614,8615,8616,8617,8618,8619,8620,8621,3956,8622,8623,8624,8625,8626,8627,8628, // 8368\n8629,8630,8631,8632,8633,8634,8635,8636,8637,8638,2865,8639,8640,8641,8642,8643, // 8384\n8644,8645,8646,8647,8648,8649,8650,8651,8652,8653,8654,8655,8656,4463,8657,8658, // 8400\n8659,4875,4876,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672, // 8416\n8673,8674,8675,8676,8677,8678,8679,8680,8681,4464,8682,8683,8684,8685,8686,8687, // 8432\n8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699,8700,8701,8702,8703, // 8448\n8704,8705,8706,8707,8708,8709,2261,8710,8711,8712,8713,8714,8715,8716,8717,8718, // 8464\n8719,8720,8721,8722,8723,8724,8725,8726,8727,8728,8729,8730,8731,8732,8733,4181, // 8480\n8734,8735,8736,8737,8738,8739,8740,8741,8742,8743,8744,8745,8746,8747,8748,8749, // 8496\n8750,8751,8752,8753,8754,8755,8756,8757,8758,8759,8760,8761,8762,8763,4877,8764, // 8512\n8765,8766,8767,8768,8769,8770,8771,8772,8773,8774,8775,8776,8777,8778,8779,8780, // 8528\n8781,8782,8783,8784,8785,8786,8787,8788,4878,8789,4879,8790,8791,8792,4880,8793, // 8544\n8794,8795,8796,8797,8798,8799,8800,8801,4881,8802,8803,8804,8805,8806,8807,8808, // 8560\n8809,8810,8811,8812,8813,8814,8815,3957,8816,8817,8818,8819,8820,8821,8822,8823, // 8576\n8824,8825,8826,8827,8828,8829,8830,8831,8832,8833,8834,8835,8836,8837,8838,8839, // 8592\n8840,8841,8842,8843,8844,8845,8846,8847,4882,8848,8849,8850,8851,8852,8853,8854, // 8608\n8855,8856,8857,8858,8859,8860,8861,8862,8863,8864,8865,8866,8867,8868,8869,8870, // 8624\n8871,8872,8873,8874,8875,8876,8877,8878,8879,8880,8881,8882,8883,8884,3202,8885, // 8640\n8886,8887,8888,8889,8890,8891,8892,8893,8894,8895,8896,8897,8898,8899,8900,8901, // 8656\n8902,8903,8904,8905,8906,8907,8908,8909,8910,8911,8912,8913,8914,8915,8916,8917, // 8672\n8918,8919,8920,8921,8922,8923,8924,4465,8925,8926,8927,8928,8929,8930,8931,8932, // 8688\n4883,8933,8934,8935,8936,8937,8938,8939,8940,8941,8942,8943,2214,8944,8945,8946, // 8704\n8947,8948,8949,8950,8951,8952,8953,8954,8955,8956,8957,8958,8959,8960,8961,8962, // 8720\n8963,8964,8965,4884,8966,8967,8968,8969,8970,8971,8972,8973,8974,8975,8976,8977, // 8736\n8978,8979,8980,8981,8982,8983,8984,8985,8986,8987,8988,8989,8990,8991,8992,4885, // 8752\n8993,8994,8995,8996,8997,8998,8999,9000,9001,9002,9003,9004,9005,9006,9007,9008, // 8768\n9009,9010,9011,9012,9013,9014,9015,9016,9017,9018,9019,9020,9021,4182,9022,9023, // 8784\n9024,9025,9026,9027,9028,9029,9030,9031,9032,9033,9034,9035,9036,9037,9038,9039, // 8800\n9040,9041,9042,9043,9044,9045,9046,9047,9048,9049,9050,9051,9052,9053,9054,9055, // 8816\n9056,9057,9058,9059,9060,9061,9062,9063,4886,9064,9065,9066,9067,9068,9069,4887, // 8832\n9070,9071,9072,9073,9074,9075,9076,9077,9078,9079,9080,9081,9082,9083,9084,9085, // 8848\n9086,9087,9088,9089,9090,9091,9092,9093,9094,9095,9096,9097,9098,9099,9100,9101, // 8864\n9102,9103,9104,9105,9106,9107,9108,9109,9110,9111,9112,9113,9114,9115,9116,9117, // 8880\n9118,9119,9120,9121,9122,9123,9124,9125,9126,9127,9128,9129,9130,9131,9132,9133, // 8896\n9134,9135,9136,9137,9138,9139,9140,9141,3958,9142,9143,9144,9145,9146,9147,9148, // 8912\n9149,9150,9151,4888,9152,9153,9154,9155,9156,9157,9158,9159,9160,9161,9162,9163, // 8928\n9164,9165,9166,9167,9168,9169,9170,9171,9172,9173,9174,9175,4889,9176,9177,9178, // 8944\n9179,9180,9181,9182,9183,9184,9185,9186,9187,9188,9189,9190,9191,9192,9193,9194, // 8960\n9195,9196,9197,9198,9199,9200,9201,9202,9203,4890,9204,9205,9206,9207,9208,9209, // 8976\n9210,9211,9212,9213,9214,9215,9216,9217,9218,9219,9220,9221,9222,4466,9223,9224, // 8992\n9225,9226,9227,9228,9229,9230,9231,9232,9233,9234,9235,9236,9237,9238,9239,9240, // 9008\n9241,9242,9243,9244,9245,4891,9246,9247,9248,9249,9250,9251,9252,9253,9254,9255, // 9024\n9256,9257,4892,9258,9259,9260,9261,4893,4894,9262,9263,9264,9265,9266,9267,9268, // 9040\n9269,9270,9271,9272,9273,4467,9274,9275,9276,9277,9278,9279,9280,9281,9282,9283, // 9056\n9284,9285,3673,9286,9287,9288,9289,9290,9291,9292,9293,9294,9295,9296,9297,9298, // 9072\n9299,9300,9301,9302,9303,9304,9305,9306,9307,9308,9309,9310,9311,9312,9313,9314, // 9088\n9315,9316,9317,9318,9319,9320,9321,9322,4895,9323,9324,9325,9326,9327,9328,9329, // 9104\n9330,9331,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,9342,9343,9344,9345, // 9120\n9346,9347,4468,9348,9349,9350,9351,9352,9353,9354,9355,9356,9357,9358,9359,9360, // 9136\n9361,9362,9363,9364,9365,9366,9367,9368,9369,9370,9371,9372,9373,4896,9374,4469, // 9152\n9375,9376,9377,9378,9379,4897,9380,9381,9382,9383,9384,9385,9386,9387,9388,9389, // 9168\n9390,9391,9392,9393,9394,9395,9396,9397,9398,9399,9400,9401,9402,9403,9404,9405, // 9184\n9406,4470,9407,2751,9408,9409,3674,3552,9410,9411,9412,9413,9414,9415,9416,9417, // 9200\n9418,9419,9420,9421,4898,9422,9423,9424,9425,9426,9427,9428,9429,3959,9430,9431, // 9216\n9432,9433,9434,9435,9436,4471,9437,9438,9439,9440,9441,9442,9443,9444,9445,9446, // 9232\n9447,9448,9449,9450,3348,9451,9452,9453,9454,9455,9456,9457,9458,9459,9460,9461, // 9248\n9462,9463,9464,9465,9466,9467,9468,9469,9470,9471,9472,4899,9473,9474,9475,9476, // 9264\n9477,4900,9478,9479,9480,9481,9482,9483,9484,9485,9486,9487,9488,3349,9489,9490, // 9280\n9491,9492,9493,9494,9495,9496,9497,9498,9499,9500,9501,9502,9503,9504,9505,9506, // 9296\n9507,9508,9509,9510,9511,9512,9513,9514,9515,9516,9517,9518,9519,9520,4901,9521, // 9312\n9522,9523,9524,9525,9526,4902,9527,9528,9529,9530,9531,9532,9533,9534,9535,9536, // 9328\n9537,9538,9539,9540,9541,9542,9543,9544,9545,9546,9547,9548,9549,9550,9551,9552, // 9344\n9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568, // 9360\n9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9581,9582,9583,9584, // 9376\n3805,9585,9586,9587,9588,9589,9590,9591,9592,9593,9594,9595,9596,9597,9598,9599, // 9392\n9600,9601,9602,4903,9603,9604,9605,9606,9607,4904,9608,9609,9610,9611,9612,9613, // 9408\n9614,4905,9615,9616,9617,9618,9619,9620,9621,9622,9623,9624,9625,9626,9627,9628, // 9424\n9629,9630,9631,9632,4906,9633,9634,9635,9636,9637,9638,9639,9640,9641,9642,9643, // 9440\n4907,9644,9645,9646,9647,9648,9649,9650,9651,9652,9653,9654,9655,9656,9657,9658, // 9456\n9659,9660,9661,9662,9663,9664,9665,9666,9667,9668,9669,9670,9671,9672,4183,9673, // 9472\n9674,9675,9676,9677,4908,9678,9679,9680,9681,4909,9682,9683,9684,9685,9686,9687, // 9488\n9688,9689,9690,4910,9691,9692,9693,3675,9694,9695,9696,2945,9697,9698,9699,9700, // 9504\n9701,9702,9703,9704,9705,4911,9706,9707,9708,9709,9710,9711,9712,9713,9714,9715, // 9520\n9716,9717,9718,9719,9720,9721,9722,9723,9724,9725,9726,9727,9728,9729,9730,9731, // 9536\n9732,9733,9734,9735,4912,9736,9737,9738,9739,9740,4913,9741,9742,9743,9744,9745, // 9552\n9746,9747,9748,9749,9750,9751,9752,9753,9754,9755,9756,9757,9758,4914,9759,9760, // 9568\n9761,9762,9763,9764,9765,9766,9767,9768,9769,9770,9771,9772,9773,9774,9775,9776, // 9584\n9777,9778,9779,9780,9781,9782,4915,9783,9784,9785,9786,9787,9788,9789,9790,9791, // 9600\n9792,9793,4916,9794,9795,9796,9797,9798,9799,9800,9801,9802,9803,9804,9805,9806, // 9616\n9807,9808,9809,9810,9811,9812,9813,9814,9815,9816,9817,9818,9819,9820,9821,9822, // 9632\n9823,9824,9825,9826,9827,9828,9829,9830,9831,9832,9833,9834,9835,9836,9837,9838, // 9648\n9839,9840,9841,9842,9843,9844,9845,9846,9847,9848,9849,9850,9851,9852,9853,9854, // 9664\n9855,9856,9857,9858,9859,9860,9861,9862,9863,9864,9865,9866,9867,9868,4917,9869, // 9680\n9870,9871,9872,9873,9874,9875,9876,9877,9878,9879,9880,9881,9882,9883,9884,9885, // 9696\n9886,9887,9888,9889,9890,9891,9892,4472,9893,9894,9895,9896,9897,3806,9898,9899, // 9712\n9900,9901,9902,9903,9904,9905,9906,9907,9908,9909,9910,9911,9912,9913,9914,4918, // 9728\n9915,9916,9917,4919,9918,9919,9920,9921,4184,9922,9923,9924,9925,9926,9927,9928, // 9744\n9929,9930,9931,9932,9933,9934,9935,9936,9937,9938,9939,9940,9941,9942,9943,9944, // 9760\n9945,9946,4920,9947,9948,9949,9950,9951,9952,9953,9954,9955,4185,9956,9957,9958, // 9776\n9959,9960,9961,9962,9963,9964,9965,4921,9966,9967,9968,4473,9969,9970,9971,9972, // 9792\n9973,9974,9975,9976,9977,4474,9978,9979,9980,9981,9982,9983,9984,9985,9986,9987, // 9808\n9988,9989,9990,9991,9992,9993,9994,9995,9996,9997,9998,9999,10000,10001,10002,10003, // 9824\n10004,10005,10006,10007,10008,10009,10010,10011,10012,10013,10014,10015,10016,10017,10018,10019, // 9840\n10020,10021,4922,10022,4923,10023,10024,10025,10026,10027,10028,10029,10030,10031,10032,10033, // 9856\n10034,10035,10036,10037,10038,10039,10040,10041,10042,10043,10044,10045,10046,10047,10048,4924, // 9872\n10049,10050,10051,10052,10053,10054,10055,10056,10057,10058,10059,10060,10061,10062,10063,10064, // 9888\n10065,10066,10067,10068,10069,10070,10071,10072,10073,10074,10075,10076,10077,10078,10079,10080, // 9904\n10081,10082,10083,10084,10085,10086,10087,4475,10088,10089,10090,10091,10092,10093,10094,10095, // 9920\n10096,10097,4476,10098,10099,10100,10101,10102,10103,10104,10105,10106,10107,10108,10109,10110, // 9936\n10111,2174,10112,10113,10114,10115,10116,10117,10118,10119,10120,10121,10122,10123,10124,10125, // 9952\n10126,10127,10128,10129,10130,10131,10132,10133,10134,10135,10136,10137,10138,10139,10140,3807, // 9968\n4186,4925,10141,10142,10143,10144,10145,10146,10147,4477,4187,10148,10149,10150,10151,10152, // 9984\n10153,4188,10154,10155,10156,10157,10158,10159,10160,10161,4926,10162,10163,10164,10165,10166, //10000\n10167,10168,10169,10170,10171,10172,10173,10174,10175,10176,10177,10178,10179,10180,10181,10182, //10016\n10183,10184,10185,10186,10187,10188,10189,10190,10191,10192,3203,10193,10194,10195,10196,10197, //10032\n10198,10199,10200,4478,10201,10202,10203,10204,4479,10205,10206,10207,10208,10209,10210,10211, //10048\n10212,10213,10214,10215,10216,10217,10218,10219,10220,10221,10222,10223,10224,10225,10226,10227, //10064\n10228,10229,10230,10231,10232,10233,10234,4927,10235,10236,10237,10238,10239,10240,10241,10242, //10080\n10243,10244,10245,10246,10247,10248,10249,10250,10251,10252,10253,10254,10255,10256,10257,10258, //10096\n10259,10260,10261,10262,10263,10264,10265,10266,10267,10268,10269,10270,10271,10272,10273,4480, //10112\n4928,4929,10274,10275,10276,10277,10278,10279,10280,10281,10282,10283,10284,10285,10286,10287, //10128\n10288,10289,10290,10291,10292,10293,10294,10295,10296,10297,10298,10299,10300,10301,10302,10303, //10144\n10304,10305,10306,10307,10308,10309,10310,10311,10312,10313,10314,10315,10316,10317,10318,10319, //10160\n10320,10321,10322,10323,10324,10325,10326,10327,10328,10329,10330,10331,10332,10333,10334,4930, //10176\n10335,10336,10337,10338,10339,10340,10341,10342,4931,10343,10344,10345,10346,10347,10348,10349, //10192\n10350,10351,10352,10353,10354,10355,3088,10356,2786,10357,10358,10359,10360,4189,10361,10362, //10208\n10363,10364,10365,10366,10367,10368,10369,10370,10371,10372,10373,10374,10375,4932,10376,10377, //10224\n10378,10379,10380,10381,10382,10383,10384,10385,10386,10387,10388,10389,10390,10391,10392,4933, //10240\n10393,10394,10395,4934,10396,10397,10398,10399,10400,10401,10402,10403,10404,10405,10406,10407, //10256\n10408,10409,10410,10411,10412,3446,10413,10414,10415,10416,10417,10418,10419,10420,10421,10422, //10272\n10423,4935,10424,10425,10426,10427,10428,10429,10430,4936,10431,10432,10433,10434,10435,10436, //10288\n10437,10438,10439,10440,10441,10442,10443,4937,10444,10445,10446,10447,4481,10448,10449,10450, //10304\n10451,10452,10453,10454,10455,10456,10457,10458,10459,10460,10461,10462,10463,10464,10465,10466, //10320\n10467,10468,10469,10470,10471,10472,10473,10474,10475,10476,10477,10478,10479,10480,10481,10482, //10336\n10483,10484,10485,10486,10487,10488,10489,10490,10491,10492,10493,10494,10495,10496,10497,10498, //10352\n10499,10500,10501,10502,10503,10504,10505,4938,10506,10507,10508,10509,10510,2552,10511,10512, //10368\n10513,10514,10515,10516,3447,10517,10518,10519,10520,10521,10522,10523,10524,10525,10526,10527, //10384\n10528,10529,10530,10531,10532,10533,10534,10535,10536,10537,10538,10539,10540,10541,10542,10543, //10400\n4482,10544,4939,10545,10546,10547,10548,10549,10550,10551,10552,10553,10554,10555,10556,10557, //10416\n10558,10559,10560,10561,10562,10563,10564,10565,10566,10567,3676,4483,10568,10569,10570,10571, //10432\n10572,3448,10573,10574,10575,10576,10577,10578,10579,10580,10581,10582,10583,10584,10585,10586, //10448\n10587,10588,10589,10590,10591,10592,10593,10594,10595,10596,10597,10598,10599,10600,10601,10602, //10464\n10603,10604,10605,10606,10607,10608,10609,10610,10611,10612,10613,10614,10615,10616,10617,10618, //10480\n10619,10620,10621,10622,10623,10624,10625,10626,10627,4484,10628,10629,10630,10631,10632,4940, //10496\n10633,10634,10635,10636,10637,10638,10639,10640,10641,10642,10643,10644,10645,10646,10647,10648, //10512\n10649,10650,10651,10652,10653,10654,10655,10656,4941,10657,10658,10659,2599,10660,10661,10662, //10528\n10663,10664,10665,10666,3089,10667,10668,10669,10670,10671,10672,10673,10674,10675,10676,10677, //10544\n10678,10679,10680,4942,10681,10682,10683,10684,10685,10686,10687,10688,10689,10690,10691,10692, //10560\n10693,10694,10695,10696,10697,4485,10698,10699,10700,10701,10702,10703,10704,4943,10705,3677, //10576\n10706,10707,10708,10709,10710,10711,10712,4944,10713,10714,10715,10716,10717,10718,10719,10720, //10592\n10721,10722,10723,10724,10725,10726,10727,10728,4945,10729,10730,10731,10732,10733,10734,10735, //10608\n10736,10737,10738,10739,10740,10741,10742,10743,10744,10745,10746,10747,10748,10749,10750,10751, //10624\n10752,10753,10754,10755,10756,10757,10758,10759,10760,10761,4946,10762,10763,10764,10765,10766, //10640\n10767,4947,4948,10768,10769,10770,10771,10772,10773,10774,10775,10776,10777,10778,10779,10780, //10656\n10781,10782,10783,10784,10785,10786,10787,10788,10789,10790,10791,10792,10793,10794,10795,10796, //10672\n10797,10798,10799,10800,10801,10802,10803,10804,10805,10806,10807,10808,10809,10810,10811,10812, //10688\n10813,10814,10815,10816,10817,10818,10819,10820,10821,10822,10823,10824,10825,10826,10827,10828, //10704\n10829,10830,10831,10832,10833,10834,10835,10836,10837,10838,10839,10840,10841,10842,10843,10844, //10720\n10845,10846,10847,10848,10849,10850,10851,10852,10853,10854,10855,10856,10857,10858,10859,10860, //10736\n10861,10862,10863,10864,10865,10866,10867,10868,10869,10870,10871,10872,10873,10874,10875,10876, //10752\n10877,10878,4486,10879,10880,10881,10882,10883,10884,10885,4949,10886,10887,10888,10889,10890, //10768\n10891,10892,10893,10894,10895,10896,10897,10898,10899,10900,10901,10902,10903,10904,10905,10906, //10784\n10907,10908,10909,10910,10911,10912,10913,10914,10915,10916,10917,10918,10919,4487,10920,10921, //10800\n10922,10923,10924,10925,10926,10927,10928,10929,10930,10931,10932,4950,10933,10934,10935,10936, //10816\n10937,10938,10939,10940,10941,10942,10943,10944,10945,10946,10947,10948,10949,4488,10950,10951, //10832\n10952,10953,10954,10955,10956,10957,10958,10959,4190,10960,10961,10962,10963,10964,10965,10966, //10848\n10967,10968,10969,10970,10971,10972,10973,10974,10975,10976,10977,10978,10979,10980,10981,10982, //10864\n10983,10984,10985,10986,10987,10988,10989,10990,10991,10992,10993,10994,10995,10996,10997,10998, //10880\n10999,11000,11001,11002,11003,11004,11005,11006,3960,11007,11008,11009,11010,11011,11012,11013, //10896\n11014,11015,11016,11017,11018,11019,11020,11021,11022,11023,11024,11025,11026,11027,11028,11029, //10912\n11030,11031,11032,4951,11033,11034,11035,11036,11037,11038,11039,11040,11041,11042,11043,11044, //10928\n11045,11046,11047,4489,11048,11049,11050,11051,4952,11052,11053,11054,11055,11056,11057,11058, //10944\n4953,11059,11060,11061,11062,11063,11064,11065,11066,11067,11068,11069,11070,11071,4954,11072, //10960\n11073,11074,11075,11076,11077,11078,11079,11080,11081,11082,11083,11084,11085,11086,11087,11088, //10976\n11089,11090,11091,11092,11093,11094,11095,11096,11097,11098,11099,11100,11101,11102,11103,11104, //10992\n11105,11106,11107,11108,11109,11110,11111,11112,11113,11114,11115,3808,11116,11117,11118,11119, //11008\n11120,11121,11122,11123,11124,11125,11126,11127,11128,11129,11130,11131,11132,11133,11134,4955, //11024\n11135,11136,11137,11138,11139,11140,11141,11142,11143,11144,11145,11146,11147,11148,11149,11150, //11040\n11151,11152,11153,11154,11155,11156,11157,11158,11159,11160,11161,4956,11162,11163,11164,11165, //11056\n11166,11167,11168,11169,11170,11171,11172,11173,11174,11175,11176,11177,11178,11179,11180,4957, //11072\n11181,11182,11183,11184,11185,11186,4958,11187,11188,11189,11190,11191,11192,11193,11194,11195, //11088\n11196,11197,11198,11199,11200,3678,11201,11202,11203,11204,11205,11206,4191,11207,11208,11209, //11104\n11210,11211,11212,11213,11214,11215,11216,11217,11218,11219,11220,11221,11222,11223,11224,11225, //11120\n11226,11227,11228,11229,11230,11231,11232,11233,11234,11235,11236,11237,11238,11239,11240,11241, //11136\n11242,11243,11244,11245,11246,11247,11248,11249,11250,11251,4959,11252,11253,11254,11255,11256, //11152\n11257,11258,11259,11260,11261,11262,11263,11264,11265,11266,11267,11268,11269,11270,11271,11272, //11168\n11273,11274,11275,11276,11277,11278,11279,11280,11281,11282,11283,11284,11285,11286,11287,11288, //11184\n11289,11290,11291,11292,11293,11294,11295,11296,11297,11298,11299,11300,11301,11302,11303,11304, //11200\n11305,11306,11307,11308,11309,11310,11311,11312,11313,11314,3679,11315,11316,11317,11318,4490, //11216\n11319,11320,11321,11322,11323,11324,11325,11326,11327,11328,11329,11330,11331,11332,11333,11334, //11232\n11335,11336,11337,11338,11339,11340,11341,11342,11343,11344,11345,11346,11347,4960,11348,11349, //11248\n11350,11351,11352,11353,11354,11355,11356,11357,11358,11359,11360,11361,11362,11363,11364,11365, //11264\n11366,11367,11368,11369,11370,11371,11372,11373,11374,11375,11376,11377,3961,4961,11378,11379, //11280\n11380,11381,11382,11383,11384,11385,11386,11387,11388,11389,11390,11391,11392,11393,11394,11395, //11296\n11396,11397,4192,11398,11399,11400,11401,11402,11403,11404,11405,11406,11407,11408,11409,11410, //11312\n11411,4962,11412,11413,11414,11415,11416,11417,11418,11419,11420,11421,11422,11423,11424,11425, //11328\n11426,11427,11428,11429,11430,11431,11432,11433,11434,11435,11436,11437,11438,11439,11440,11441, //11344\n11442,11443,11444,11445,11446,11447,11448,11449,11450,11451,11452,11453,11454,11455,11456,11457, //11360\n11458,11459,11460,11461,11462,11463,11464,11465,11466,11467,11468,11469,4963,11470,11471,4491, //11376\n11472,11473,11474,11475,4964,11476,11477,11478,11479,11480,11481,11482,11483,11484,11485,11486, //11392\n11487,11488,11489,11490,11491,11492,4965,11493,11494,11495,11496,11497,11498,11499,11500,11501, //11408\n11502,11503,11504,11505,11506,11507,11508,11509,11510,11511,11512,11513,11514,11515,11516,11517, //11424\n11518,11519,11520,11521,11522,11523,11524,11525,11526,11527,11528,11529,3962,11530,11531,11532, //11440\n11533,11534,11535,11536,11537,11538,11539,11540,11541,11542,11543,11544,11545,11546,11547,11548, //11456\n11549,11550,11551,11552,11553,11554,11555,11556,11557,11558,11559,11560,11561,11562,11563,11564, //11472\n4193,4194,11565,11566,11567,11568,11569,11570,11571,11572,11573,11574,11575,11576,11577,11578, //11488\n11579,11580,11581,11582,11583,11584,11585,11586,11587,11588,11589,11590,11591,4966,4195,11592, //11504\n11593,11594,11595,11596,11597,11598,11599,11600,11601,11602,11603,11604,3090,11605,11606,11607, //11520\n11608,11609,11610,4967,11611,11612,11613,11614,11615,11616,11617,11618,11619,11620,11621,11622, //11536\n11623,11624,11625,11626,11627,11628,11629,11630,11631,11632,11633,11634,11635,11636,11637,11638, //11552\n11639,11640,11641,11642,11643,11644,11645,11646,11647,11648,11649,11650,11651,11652,11653,11654, //11568\n11655,11656,11657,11658,11659,11660,11661,11662,11663,11664,11665,11666,11667,11668,11669,11670, //11584\n11671,11672,11673,11674,4968,11675,11676,11677,11678,11679,11680,11681,11682,11683,11684,11685, //11600\n11686,11687,11688,11689,11690,11691,11692,11693,3809,11694,11695,11696,11697,11698,11699,11700, //11616\n11701,11702,11703,11704,11705,11706,11707,11708,11709,11710,11711,11712,11713,11714,11715,11716, //11632\n11717,11718,3553,11719,11720,11721,11722,11723,11724,11725,11726,11727,11728,11729,11730,4969, //11648\n11731,11732,11733,11734,11735,11736,11737,11738,11739,11740,4492,11741,11742,11743,11744,11745, //11664\n11746,11747,11748,11749,11750,11751,11752,4970,11753,11754,11755,11756,11757,11758,11759,11760, //11680\n11761,11762,11763,11764,11765,11766,11767,11768,11769,11770,11771,11772,11773,11774,11775,11776, //11696\n11777,11778,11779,11780,11781,11782,11783,11784,11785,11786,11787,11788,11789,11790,4971,11791, //11712\n11792,11793,11794,11795,11796,11797,4972,11798,11799,11800,11801,11802,11803,11804,11805,11806, //11728\n11807,11808,11809,11810,4973,11811,11812,11813,11814,11815,11816,11817,11818,11819,11820,11821, //11744\n11822,11823,11824,11825,11826,11827,11828,11829,11830,11831,11832,11833,11834,3680,3810,11835, //11760\n11836,4974,11837,11838,11839,11840,11841,11842,11843,11844,11845,11846,11847,11848,11849,11850, //11776\n11851,11852,11853,11854,11855,11856,11857,11858,11859,11860,11861,11862,11863,11864,11865,11866, //11792\n11867,11868,11869,11870,11871,11872,11873,11874,11875,11876,11877,11878,11879,11880,11881,11882, //11808\n11883,11884,4493,11885,11886,11887,11888,11889,11890,11891,11892,11893,11894,11895,11896,11897, //11824\n11898,11899,11900,11901,11902,11903,11904,11905,11906,11907,11908,11909,11910,11911,11912,11913, //11840\n11914,11915,4975,11916,11917,11918,11919,11920,11921,11922,11923,11924,11925,11926,11927,11928, //11856\n11929,11930,11931,11932,11933,11934,11935,11936,11937,11938,11939,11940,11941,11942,11943,11944, //11872\n11945,11946,11947,11948,11949,4976,11950,11951,11952,11953,11954,11955,11956,11957,11958,11959, //11888\n11960,11961,11962,11963,11964,11965,11966,11967,11968,11969,11970,11971,11972,11973,11974,11975, //11904\n11976,11977,11978,11979,11980,11981,11982,11983,11984,11985,11986,11987,4196,11988,11989,11990, //11920\n11991,11992,4977,11993,11994,11995,11996,11997,11998,11999,12000,12001,12002,12003,12004,12005, //11936\n12006,12007,12008,12009,12010,12011,12012,12013,12014,12015,12016,12017,12018,12019,12020,12021, //11952\n12022,12023,12024,12025,12026,12027,12028,12029,12030,12031,12032,12033,12034,12035,12036,12037, //11968\n12038,12039,12040,12041,12042,12043,12044,12045,12046,12047,12048,12049,12050,12051,12052,12053, //11984\n12054,12055,12056,12057,12058,12059,12060,12061,4978,12062,12063,12064,12065,12066,12067,12068, //12000\n12069,12070,12071,12072,12073,12074,12075,12076,12077,12078,12079,12080,12081,12082,12083,12084, //12016\n12085,12086,12087,12088,12089,12090,12091,12092,12093,12094,12095,12096,12097,12098,12099,12100, //12032\n12101,12102,12103,12104,12105,12106,12107,12108,12109,12110,12111,12112,12113,12114,12115,12116, //12048\n12117,12118,12119,12120,12121,12122,12123,4979,12124,12125,12126,12127,12128,4197,12129,12130, //12064\n12131,12132,12133,12134,12135,12136,12137,12138,12139,12140,12141,12142,12143,12144,12145,12146, //12080\n12147,12148,12149,12150,12151,12152,12153,12154,4980,12155,12156,12157,12158,12159,12160,4494, //12096\n12161,12162,12163,12164,3811,12165,12166,12167,12168,12169,4495,12170,12171,4496,12172,12173, //12112\n12174,12175,12176,3812,12177,12178,12179,12180,12181,12182,12183,12184,12185,12186,12187,12188, //12128\n12189,12190,12191,12192,12193,12194,12195,12196,12197,12198,12199,12200,12201,12202,12203,12204, //12144\n12205,12206,12207,12208,12209,12210,12211,12212,12213,12214,12215,12216,12217,12218,12219,12220, //12160\n12221,4981,12222,12223,12224,12225,12226,12227,12228,12229,12230,12231,12232,12233,12234,12235, //12176\n4982,12236,12237,12238,12239,12240,12241,12242,12243,12244,12245,4983,12246,12247,12248,12249, //12192\n4984,12250,12251,12252,12253,12254,12255,12256,12257,12258,12259,12260,12261,12262,12263,12264, //12208\n4985,12265,4497,12266,12267,12268,12269,12270,12271,12272,12273,12274,12275,12276,12277,12278, //12224\n12279,12280,12281,12282,12283,12284,12285,12286,12287,4986,12288,12289,12290,12291,12292,12293, //12240\n12294,12295,12296,2473,12297,12298,12299,12300,12301,12302,12303,12304,12305,12306,12307,12308, //12256\n12309,12310,12311,12312,12313,12314,12315,12316,12317,12318,12319,3963,12320,12321,12322,12323, //12272\n12324,12325,12326,12327,12328,12329,12330,12331,12332,4987,12333,12334,12335,12336,12337,12338, //12288\n12339,12340,12341,12342,12343,12344,12345,12346,12347,12348,12349,12350,12351,12352,12353,12354, //12304\n12355,12356,12357,12358,12359,3964,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369, //12320\n12370,3965,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384, //12336\n12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400, //12352\n12401,12402,12403,12404,12405,12406,12407,12408,4988,12409,12410,12411,12412,12413,12414,12415, //12368\n12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431, //12384\n12432,12433,12434,12435,12436,12437,12438,3554,12439,12440,12441,12442,12443,12444,12445,12446, //12400\n12447,12448,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462, //12416\n12463,12464,4989,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477, //12432\n12478,12479,12480,4990,12481,12482,12483,12484,12485,12486,12487,12488,12489,4498,12490,12491, //12448\n12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507, //12464\n12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523, //12480\n12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,12535,12536,12537,12538,12539, //12496\n12540,12541,12542,12543,12544,12545,12546,12547,12548,12549,12550,12551,4991,12552,12553,12554, //12512\n12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570, //12528\n12571,12572,12573,12574,12575,12576,12577,12578,3036,12579,12580,12581,12582,12583,3966,12584, //12544\n12585,12586,12587,12588,12589,12590,12591,12592,12593,12594,12595,12596,12597,12598,12599,12600, //12560\n12601,12602,12603,12604,12605,12606,12607,12608,12609,12610,12611,12612,12613,12614,12615,12616, //12576\n12617,12618,12619,12620,12621,12622,12623,12624,12625,12626,12627,12628,12629,12630,12631,12632, //12592\n12633,12634,12635,12636,12637,12638,12639,12640,12641,12642,12643,12644,12645,12646,4499,12647, //12608\n12648,12649,12650,12651,12652,12653,12654,12655,12656,12657,12658,12659,12660,12661,12662,12663, //12624\n12664,12665,12666,12667,12668,12669,12670,12671,12672,12673,12674,12675,12676,12677,12678,12679, //12640\n12680,12681,12682,12683,12684,12685,12686,12687,12688,12689,12690,12691,12692,12693,12694,12695, //12656\n12696,12697,12698,4992,12699,12700,12701,12702,12703,12704,12705,12706,12707,12708,12709,12710, //12672\n12711,12712,12713,12714,12715,12716,12717,12718,12719,12720,12721,12722,12723,12724,12725,12726, //12688\n12727,12728,12729,12730,12731,12732,12733,12734,12735,12736,12737,12738,12739,12740,12741,12742, //12704\n12743,12744,12745,12746,12747,12748,12749,12750,12751,12752,12753,12754,12755,12756,12757,12758, //12720\n12759,12760,12761,12762,12763,12764,12765,12766,12767,12768,12769,12770,12771,12772,12773,12774, //12736\n12775,12776,12777,12778,4993,2175,12779,12780,12781,12782,12783,12784,12785,12786,4500,12787, //12752\n12788,12789,12790,12791,12792,12793,12794,12795,12796,12797,12798,12799,12800,12801,12802,12803, //12768\n12804,12805,12806,12807,12808,12809,12810,12811,12812,12813,12814,12815,12816,12817,12818,12819, //12784\n12820,12821,12822,12823,12824,12825,12826,4198,3967,12827,12828,12829,12830,12831,12832,12833, //12800\n12834,12835,12836,12837,12838,12839,12840,12841,12842,12843,12844,12845,12846,12847,12848,12849, //12816\n12850,12851,12852,12853,12854,12855,12856,12857,12858,12859,12860,12861,4199,12862,12863,12864, //12832\n12865,12866,12867,12868,12869,12870,12871,12872,12873,12874,12875,12876,12877,12878,12879,12880, //12848\n12881,12882,12883,12884,12885,12886,12887,4501,12888,12889,12890,12891,12892,12893,12894,12895, //12864\n12896,12897,12898,12899,12900,12901,12902,12903,12904,12905,12906,12907,12908,12909,12910,12911, //12880\n12912,4994,12913,12914,12915,12916,12917,12918,12919,12920,12921,12922,12923,12924,12925,12926, //12896\n12927,12928,12929,12930,12931,12932,12933,12934,12935,12936,12937,12938,12939,12940,12941,12942, //12912\n12943,12944,12945,12946,12947,12948,12949,12950,12951,12952,12953,12954,12955,12956,1772,12957, //12928\n12958,12959,12960,12961,12962,12963,12964,12965,12966,12967,12968,12969,12970,12971,12972,12973, //12944\n12974,12975,12976,12977,12978,12979,12980,12981,12982,12983,12984,12985,12986,12987,12988,12989, //12960\n12990,12991,12992,12993,12994,12995,12996,12997,4502,12998,4503,12999,13000,13001,13002,13003, //12976\n4504,13004,13005,13006,13007,13008,13009,13010,13011,13012,13013,13014,13015,13016,13017,13018, //12992\n13019,13020,13021,13022,13023,13024,13025,13026,13027,13028,13029,3449,13030,13031,13032,13033, //13008\n13034,13035,13036,13037,13038,13039,13040,13041,13042,13043,13044,13045,13046,13047,13048,13049, //13024\n13050,13051,13052,13053,13054,13055,13056,13057,13058,13059,13060,13061,13062,13063,13064,13065, //13040\n13066,13067,13068,13069,13070,13071,13072,13073,13074,13075,13076,13077,13078,13079,13080,13081, //13056\n13082,13083,13084,13085,13086,13087,13088,13089,13090,13091,13092,13093,13094,13095,13096,13097, //13072\n13098,13099,13100,13101,13102,13103,13104,13105,13106,13107,13108,13109,13110,13111,13112,13113, //13088\n13114,13115,13116,13117,13118,3968,13119,4995,13120,13121,13122,13123,13124,13125,13126,13127, //13104\n4505,13128,13129,13130,13131,13132,13133,13134,4996,4506,13135,13136,13137,13138,13139,4997, //13120\n13140,13141,13142,13143,13144,13145,13146,13147,13148,13149,13150,13151,13152,13153,13154,13155, //13136\n13156,13157,13158,13159,4998,13160,13161,13162,13163,13164,13165,13166,13167,13168,13169,13170, //13152\n13171,13172,13173,13174,13175,13176,4999,13177,13178,13179,13180,13181,13182,13183,13184,13185, //13168\n13186,13187,13188,13189,13190,13191,13192,13193,13194,13195,13196,13197,13198,13199,13200,13201, //13184\n13202,13203,13204,13205,13206,5000,13207,13208,13209,13210,13211,13212,13213,13214,13215,13216, //13200\n13217,13218,13219,13220,13221,13222,13223,13224,13225,13226,13227,4200,5001,13228,13229,13230, //13216\n13231,13232,13233,13234,13235,13236,13237,13238,13239,13240,3969,13241,13242,13243,13244,3970, //13232\n13245,13246,13247,13248,13249,13250,13251,13252,13253,13254,13255,13256,13257,13258,13259,13260, //13248\n13261,13262,13263,13264,13265,13266,13267,13268,3450,13269,13270,13271,13272,13273,13274,13275, //13264\n13276,5002,13277,13278,13279,13280,13281,13282,13283,13284,13285,13286,13287,13288,13289,13290, //13280\n13291,13292,13293,13294,13295,13296,13297,13298,13299,13300,13301,13302,3813,13303,13304,13305, //13296\n13306,13307,13308,13309,13310,13311,13312,13313,13314,13315,13316,13317,13318,13319,13320,13321, //13312\n13322,13323,13324,13325,13326,13327,13328,4507,13329,13330,13331,13332,13333,13334,13335,13336, //13328\n13337,13338,13339,13340,13341,5003,13342,13343,13344,13345,13346,13347,13348,13349,13350,13351, //13344\n13352,13353,13354,13355,13356,13357,13358,13359,13360,13361,13362,13363,13364,13365,13366,13367, //13360\n5004,13368,13369,13370,13371,13372,13373,13374,13375,13376,13377,13378,13379,13380,13381,13382, //13376\n13383,13384,13385,13386,13387,13388,13389,13390,13391,13392,13393,13394,13395,13396,13397,13398, //13392\n13399,13400,13401,13402,13403,13404,13405,13406,13407,13408,13409,13410,13411,13412,13413,13414, //13408\n13415,13416,13417,13418,13419,13420,13421,13422,13423,13424,13425,13426,13427,13428,13429,13430, //13424\n13431,13432,4508,13433,13434,13435,4201,13436,13437,13438,13439,13440,13441,13442,13443,13444, //13440\n13445,13446,13447,13448,13449,13450,13451,13452,13453,13454,13455,13456,13457,5005,13458,13459, //13456\n13460,13461,13462,13463,13464,13465,13466,13467,13468,13469,13470,4509,13471,13472,13473,13474, //13472\n13475,13476,13477,13478,13479,13480,13481,13482,13483,13484,13485,13486,13487,13488,13489,13490, //13488\n13491,13492,13493,13494,13495,13496,13497,13498,13499,13500,13501,13502,13503,13504,13505,13506, //13504\n13507,13508,13509,13510,13511,13512,13513,13514,13515,13516,13517,13518,13519,13520,13521,13522, //13520\n13523,13524,13525,13526,13527,13528,13529,13530,13531,13532,13533,13534,13535,13536,13537,13538, //13536\n13539,13540,13541,13542,13543,13544,13545,13546,13547,13548,13549,13550,13551,13552,13553,13554, //13552\n13555,13556,13557,13558,13559,13560,13561,13562,13563,13564,13565,13566,13567,13568,13569,13570, //13568\n13571,13572,13573,13574,13575,13576,13577,13578,13579,13580,13581,13582,13583,13584,13585,13586, //13584\n13587,13588,13589,13590,13591,13592,13593,13594,13595,13596,13597,13598,13599,13600,13601,13602, //13600\n13603,13604,13605,13606,13607,13608,13609,13610,13611,13612,13613,13614,13615,13616,13617,13618, //13616\n13619,13620,13621,13622,13623,13624,13625,13626,13627,13628,13629,13630,13631,13632,13633,13634, //13632\n13635,13636,13637,13638,13639,13640,13641,13642,5006,13643,13644,13645,13646,13647,13648,13649, //13648\n13650,13651,5007,13652,13653,13654,13655,13656,13657,13658,13659,13660,13661,13662,13663,13664, //13664\n13665,13666,13667,13668,13669,13670,13671,13672,13673,13674,13675,13676,13677,13678,13679,13680, //13680\n13681,13682,13683,13684,13685,13686,13687,13688,13689,13690,13691,13692,13693,13694,13695,13696, //13696\n13697,13698,13699,13700,13701,13702,13703,13704,13705,13706,13707,13708,13709,13710,13711,13712, //13712\n13713,13714,13715,13716,13717,13718,13719,13720,13721,13722,13723,13724,13725,13726,13727,13728, //13728\n13729,13730,13731,13732,13733,13734,13735,13736,13737,13738,13739,13740,13741,13742,13743,13744, //13744\n13745,13746,13747,13748,13749,13750,13751,13752,13753,13754,13755,13756,13757,13758,13759,13760, //13760\n13761,13762,13763,13764,13765,13766,13767,13768,13769,13770,13771,13772,13773,13774,3273,13775, //13776\n13776,13777,13778,13779,13780,13781,13782,13783,13784,13785,13786,13787,13788,13789,13790,13791, //13792\n13792,13793,13794,13795,13796,13797,13798,13799,13800,13801,13802,13803,13804,13805,13806,13807, //13808\n13808,13809,13810,13811,13812,13813,13814,13815,13816,13817,13818,13819,13820,13821,13822,13823, //13824\n13824,13825,13826,13827,13828,13829,13830,13831,13832,13833,13834,13835,13836,13837,13838,13839, //13840\n13840,13841,13842,13843,13844,13845,13846,13847,13848,13849,13850,13851,13852,13853,13854,13855, //13856\n13856,13857,13858,13859,13860,13861,13862,13863,13864,13865,13866,13867,13868,13869,13870,13871, //13872\n13872,13873,13874,13875,13876,13877,13878,13879,13880,13881,13882,13883,13884,13885,13886,13887, //13888\n13888,13889,13890,13891,13892,13893,13894,13895,13896,13897,13898,13899,13900,13901,13902,13903, //13904\n13904,13905,13906,13907,13908,13909,13910,13911,13912,13913,13914,13915,13916,13917,13918,13919, //13920\n13920,13921,13922,13923,13924,13925,13926,13927,13928,13929,13930,13931,13932,13933,13934,13935, //13936\n13936,13937,13938,13939,13940,13941,13942,13943,13944,13945,13946,13947,13948,13949,13950,13951, //13952\n13952,13953,13954,13955,13956,13957,13958,13959,13960,13961,13962,13963,13964,13965,13966,13967, //13968\n13968,13969,13970,13971,13972, //13973\n****************************************************************************************/\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/CharDistribution.cpp",
    "content": "/**\n * @file    CharDistribution.cpp\n * @brief   CharDistribution\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"CharDistribution.h\"\n\n#include \"JISFreq.tab\"\n#include \"Big5Freq.tab\"\n#include \"EUCKRFreq.tab\"\n#include \"EUCTWFreq.tab\"\n#include \"GB2312Freq.tab\"\n\n#define SURE_YES 0.99f\n#define SURE_NO  0.01f\n\n//return confidence base on received data\nfloat CharDistributionAnalysis::GetConfidence(void)\n{ \n  //if we didn't receive any character in our consideration range, or the\n  // number of frequent characters is below the minimum threshold, return\n  // negative answer\n  if (mTotalChars <= 0 || mFreqChars <= mDataThreshold)\n    return SURE_NO;\n\n  if (mTotalChars != mFreqChars) {\n    float r = mFreqChars / ((mTotalChars - mFreqChars) * mTypicalDistributionRatio);\n\n    if (r < SURE_YES)\n      return r;\n  }\n  //normalize confidence, (we don't want to be 100% sure)\n  return SURE_YES;\n}\n\nEUCTWDistributionAnalysis::EUCTWDistributionAnalysis()\n{\n  mCharToFreqOrder = EUCTWCharToFreqOrder;\n  mTableSize = NS_ARRAY_LENGTH (EUCTWCharToFreqOrder);\n  mTypicalDistributionRatio = EUCTW_TYPICAL_DISTRIBUTION_RATIO;\n}\n\nEUCKRDistributionAnalysis::EUCKRDistributionAnalysis()\n{\n  mCharToFreqOrder = EUCKRCharToFreqOrder;\n  mTableSize = NS_ARRAY_LENGTH (EUCKRCharToFreqOrder);\n  mTypicalDistributionRatio = EUCKR_TYPICAL_DISTRIBUTION_RATIO;\n}\n\nGB2312DistributionAnalysis::GB2312DistributionAnalysis()\n{\n  mCharToFreqOrder = GB2312CharToFreqOrder;\n  mTableSize = NS_ARRAY_LENGTH (GB2312CharToFreqOrder);\n  mTypicalDistributionRatio = GB2312_TYPICAL_DISTRIBUTION_RATIO;\n}\n\nBig5DistributionAnalysis::Big5DistributionAnalysis()\n{\n  mCharToFreqOrder = Big5CharToFreqOrder;\n  mTableSize = NS_ARRAY_LENGTH (Big5CharToFreqOrder);\n  mTypicalDistributionRatio = BIG5_TYPICAL_DISTRIBUTION_RATIO;\n}\n\nSJISDistributionAnalysis::SJISDistributionAnalysis()\n{\n  mCharToFreqOrder = JISCharToFreqOrder;\n  mTableSize = NS_ARRAY_LENGTH (JISCharToFreqOrder);\n  mTypicalDistributionRatio = JIS_TYPICAL_DISTRIBUTION_RATIO;\n}\n\nEUCJPDistributionAnalysis::EUCJPDistributionAnalysis()\n{\n  mCharToFreqOrder = JISCharToFreqOrder;\n  mTableSize = NS_ARRAY_LENGTH (JISCharToFreqOrder);\n  mTypicalDistributionRatio = JIS_TYPICAL_DISTRIBUTION_RATIO;\n}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/CharDistribution.h",
    "content": "/**\n * @file    CharDistribution.h\n * @brief   CharDistribution\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef CharDistribution_h__\n#define CharDistribution_h__\n\n#include \"nscore.h\"\n\n#define ENOUGH_DATA_THRESHOLD 1024\n \n#define MINIMUM_DATA_THRESHOLD  4\n\nclass CharDistributionAnalysis\n{\npublic:\n  CharDistributionAnalysis() {Reset(false);}\n\n  //feed a block of data and do distribution analysis\n  void HandleData(const char* aBuf, PRUint32 aLen) {}\n  \n  //Feed a character with known length\n  void HandleOneChar(const char* aStr, PRUint32 aCharLen)\n  {\n    PRInt32 order;\n\n    //we only care about 2-bytes character in our distribution analysis\n    order = (aCharLen == 2) ? GetOrder(aStr) : -1;\n\n    if (order >= 0)\n    {\n      mTotalChars++;\n      //order is valid\n      if ((PRUint32)order < mTableSize)\n      {\n        if (512 > mCharToFreqOrder[order])\n          mFreqChars++;\n      }\n    }\n  }\n\n  //return confidence base on existing data\n  float GetConfidence(void);\n\n  //Reset analyser, clear any state \n  void      Reset(bool aIsPreferredLanguage) \n  {\n    mDone = false;\n    mTotalChars = 0;\n    mFreqChars = 0;\n    mDataThreshold = aIsPreferredLanguage ? 0 : MINIMUM_DATA_THRESHOLD;\n  }\n\n  //It is not necessary to receive all data to draw conclusion. For charset detection,\n  // certain amount of data is enough\n  bool GotEnoughData() {return mTotalChars > ENOUGH_DATA_THRESHOLD;}\n\nprotected:\n  //we do not handle character base on its original encoding string, but \n  //convert this encoding string to a number, here called order.\n  //This allow multiple encoding of a language to share one frequency table \n  virtual PRInt32 GetOrder(const char* str) {return -1;}\n  \n  //If this flag is set to true, detection is done and conclusion has been made\n  bool     mDone;\n\n  //The number of characters whose frequency order is less than 512\n  PRUint32 mFreqChars;\n\n  //Total character encounted.\n  PRUint32 mTotalChars;\n\n  //Number of hi-byte characters needed to trigger detection\n  PRUint32 mDataThreshold;\n\n  //Mapping table to get frequency order from char order (get from GetOrder())\n  const PRInt16  *mCharToFreqOrder;\n\n  //Size of above table\n  PRUint32 mTableSize;\n\n  //This is a constant value varies from language to language, it is used in \n  //calculating confidence. See my paper for further detail.\n  float    mTypicalDistributionRatio;\n};\n\n\nclass EUCTWDistributionAnalysis: public CharDistributionAnalysis\n{\npublic:\n  EUCTWDistributionAnalysis();\nprotected:\n\n  //for euc-TW encoding, we are interested \n  //  first  byte range: 0xc4 -- 0xfe\n  //  second byte range: 0xa1 -- 0xfe\n  //no validation needed here. State machine has done that\n  PRInt32 GetOrder(const char* str) \n  { if ((unsigned char)*str >= (unsigned char)0xc4)  \n      return 94*((unsigned char)str[0]-(unsigned char)0xc4) + (unsigned char)str[1] - (unsigned char)0xa1;\n    else\n      return -1;\n  }\n};\n\n\nclass EUCKRDistributionAnalysis : public CharDistributionAnalysis\n{\npublic:\n  EUCKRDistributionAnalysis();\nprotected:\n  //for euc-KR encoding, we are interested \n  //  first  byte range: 0xb0 -- 0xfe\n  //  second byte range: 0xa1 -- 0xfe\n  //no validation needed here. State machine has done that\n  PRInt32 GetOrder(const char* str) \n  { if ((unsigned char)*str >= (unsigned char)0xb0)  \n      return 94*((unsigned char)str[0]-(unsigned char)0xb0) + (unsigned char)str[1] - (unsigned char)0xa1;\n    else\n      return -1;\n  }\n};\n\nclass GB2312DistributionAnalysis : public CharDistributionAnalysis\n{\npublic:\n  GB2312DistributionAnalysis();\nprotected:\n  //for GB2312 encoding, we are interested \n  //  first  byte range: 0xb0 -- 0xfe\n  //  second byte range: 0xa1 -- 0xfe\n  //no validation needed here. State machine has done that\n  PRInt32 GetOrder(const char* str) \n  { if ((unsigned char)*str >= (unsigned char)0xb0 && (unsigned char)str[1] >= (unsigned char)0xa1)  \n      return 94*((unsigned char)str[0]-(unsigned char)0xb0) + (unsigned char)str[1] - (unsigned char)0xa1;\n    else\n      return -1;\n  }\n};\n\n\nclass Big5DistributionAnalysis : public CharDistributionAnalysis\n{\npublic:\n  Big5DistributionAnalysis();\nprotected:\n  //for big5 encoding, we are interested \n  //  first  byte range: 0xa4 -- 0xfe\n  //  second byte range: 0x40 -- 0x7e , 0xa1 -- 0xfe\n  //no validation needed here. State machine has done that\n  PRInt32 GetOrder(const char* str) \n  { if ((unsigned char)*str >= (unsigned char)0xa4)  \n      if ((unsigned char)str[1] >= (unsigned char)0xa1)\n        return 157*((unsigned char)str[0]-(unsigned char)0xa4) + (unsigned char)str[1] - (unsigned char)0xa1 +63;\n      else\n        return 157*((unsigned char)str[0]-(unsigned char)0xa4) + (unsigned char)str[1] - (unsigned char)0x40;\n    else\n      return -1;\n  }\n};\n\nclass SJISDistributionAnalysis : public CharDistributionAnalysis\n{\npublic:\n  SJISDistributionAnalysis();\nprotected:\n  //for sjis encoding, we are interested \n  //  first  byte range: 0x81 -- 0x9f , 0xe0 -- 0xfe\n  //  second byte range: 0x40 -- 0x7e,  0x81 -- oxfe\n  //no validation needed here. State machine has done that\n  PRInt32 GetOrder(const char* str) \n  { \n    PRInt32 order;\n    if ((unsigned char)*str >= (unsigned char)0x81 && (unsigned char)*str <= (unsigned char)0x9f)  \n      order = 188 * ((unsigned char)str[0]-(unsigned char)0x81);\n    else if ((unsigned char)*str >= (unsigned char)0xe0 && (unsigned char)*str <= (unsigned char)0xef)  \n      order = 188 * ((unsigned char)str[0]-(unsigned char)0xe0 + 31);\n    else\n      return -1;\n    order += (unsigned char)*(str+1) - 0x40;\n    if ((unsigned char)str[1] > (unsigned char)0x7f)\n      order--;\n    return order;\n  }\n};\n\nclass EUCJPDistributionAnalysis : public CharDistributionAnalysis\n{\npublic:\n  EUCJPDistributionAnalysis();\nprotected:\n  //for euc-JP encoding, we are interested \n  //  first  byte range: 0xa0 -- 0xfe\n  //  second byte range: 0xa1 -- 0xfe\n  //no validation needed here. State machine has done that\n  PRInt32 GetOrder(const char* str) \n  { if ((unsigned char)*str >= (unsigned char)0xa0)  \n      return 94*((unsigned char)str[0]-(unsigned char)0xa1) + (unsigned char)str[1] - (unsigned char)0xa1;\n    else\n      return -1;\n  }\n};\n\n#endif //CharDistribution_h__\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/EUCKRFreq.tab",
    "content": "/**\n * @file    EUCKRFreq.tab\n * @brief   EUCKRFreq\n * @license GPL 2.0/LGPL 2.1\n */\n\n//Sampling from about 20M text materials include literature and computer technology\n\n/******************************************************************************\n * 128  --> 0.79\n * 256  --> 0.92\n * 512  --> 0.986\n * 1024 --> 0.99944\n * 2048 --> 0.99999\n *\n * Idea Distribution Ratio = 0.98653 / (1-0.98653) = 73.24\n * Random Distribution Ration = 512 / (2350-512) = 0.279.\n * \n * Typical Distribution Ratio  \n *****************************************************************************/\n\n#define EUCKR_TYPICAL_DISTRIBUTION_RATIO (float) 6.0\n\n// Char to FreqOrder table\nstatic const PRInt16 EUCKRCharToFreqOrder[] =\n{\n  13, 130, 120,1396, 481,1719,1720, 328, 609, 212,1721, 707, 400, 299,1722,  87,\n1397,1723, 104, 536,1117,1203,1724,1267, 685,1268, 508,1725,1726,1727,1728,1398,\n1399,1729,1730,1731, 141, 621, 326,1057, 368,1732, 267, 488,  20,1733,1269,1734,\n 945,1400,1735,  47, 904,1270,1736,1737, 773, 248,1738, 409, 313, 786, 429,1739,\n 116, 987, 813,1401, 683,  75,1204, 145,1740,1741,1742,1743,  16, 847, 667, 622,\n 708,1744,1745,1746, 966, 787, 304, 129,1747,  60, 820, 123, 676,1748,1749,1750,\n1751, 617,1752, 626,1753,1754,1755,1756, 653,1757,1758,1759,1760,1761,1762, 856,\n 344,1763,1764,1765,1766,  89, 401, 418, 806, 905, 848,1767,1768,1769, 946,1205,\n 709,1770,1118,1771, 241,1772,1773,1774,1271,1775, 569,1776, 999,1777,1778,1779,\n1780, 337, 751,1058,  28, 628, 254,1781, 177, 906, 270, 349, 891,1079,1782,  19,\n1783, 379,1784, 315,1785, 629, 754,1402, 559,1786, 636, 203,1206,1787, 710, 567,\n1788, 935, 814,1789,1790,1207, 766, 528,1791,1792,1208,1793,1794,1795,1796,1797,\n1403,1798,1799, 533,1059,1404,1405,1156,1406, 936, 884,1080,1800, 351,1801,1802,\n1803,1804,1805, 801,1806,1807,1808,1119,1809,1157, 714, 474,1407,1810, 298, 899,\n 885,1811,1120, 802,1158,1812, 892,1813,1814,1408, 659,1815,1816,1121,1817,1818,\n1819,1820,1821,1822, 319,1823, 594, 545,1824, 815, 937,1209,1825,1826, 573,1409,\n1022,1827,1210,1828,1829,1830,1831,1832,1833, 556, 722, 807,1122,1060,1834, 697,\n1835, 900, 557, 715,1836,1410, 540,1411, 752,1159, 294, 597,1211, 976, 803, 770,\n1412,1837,1838,  39, 794,1413, 358,1839, 371, 925,1840, 453, 661, 788, 531, 723,\n 544,1023,1081, 869,  91,1841, 392, 430, 790, 602,1414, 677,1082, 457,1415,1416,\n1842,1843, 475, 327,1024,1417, 795, 121,1844, 733, 403,1418,1845,1846,1847, 300,\n 119, 711,1212, 627,1848,1272, 207,1849,1850, 796,1213, 382,1851, 519,1852,1083,\n 893,1853,1854,1855, 367, 809, 487, 671,1856, 663,1857,1858, 956, 471, 306, 857,\n1859,1860,1160,1084,1861,1862,1863,1864,1865,1061,1866,1867,1868,1869,1870,1871,\n 282,  96, 574,1872, 502,1085,1873,1214,1874, 907,1875,1876, 827, 977,1419,1420,\n1421, 268,1877,1422,1878,1879,1880, 308,1881,   2, 537,1882,1883,1215,1884,1885,\n 127, 791,1886,1273,1423,1887,  34, 336, 404, 643,1888, 571, 654, 894, 840,1889,\n   0, 886,1274, 122, 575, 260, 908, 938,1890,1275, 410, 316,1891,1892, 100,1893,\n1894,1123,  48,1161,1124,1025,1895, 633, 901,1276,1896,1897, 115, 816,1898, 317,\n1899, 694,1900, 909, 734,1424, 572, 866,1425, 691,  85, 524,1010, 543, 394, 841,\n1901,1902,1903,1026,1904,1905,1906,1907,1908,1909,  30, 451, 651, 988, 310,1910,\n1911,1426, 810,1216,  93,1912,1913,1277,1217,1914, 858, 759,  45,  58, 181, 610,\n 269,1915,1916, 131,1062, 551, 443,1000, 821,1427, 957, 895,1086,1917,1918, 375,\n1919, 359,1920, 687,1921, 822,1922, 293,1923,1924,  40, 662, 118, 692,  29, 939,\n 887, 640, 482, 174,1925,  69,1162, 728,1428, 910,1926,1278,1218,1279, 386, 870,\n 217, 854,1163, 823,1927,1928,1929,1930, 834,1931,  78,1932, 859,1933,1063,1934,\n1935,1936,1937, 438,1164, 208, 595,1938,1939,1940,1941,1219,1125,1942, 280, 888,\n1429,1430,1220,1431,1943,1944,1945,1946,1947,1280, 150, 510,1432,1948,1949,1950,\n1951,1952,1953,1954,1011,1087,1955,1433,1043,1956, 881,1957, 614, 958,1064,1065,\n1221,1958, 638,1001, 860, 967, 896,1434, 989, 492, 553,1281,1165,1959,1282,1002,\n1283,1222,1960,1961,1962,1963,  36, 383, 228, 753, 247, 454,1964, 876, 678,1965,\n1966,1284, 126, 464, 490, 835, 136, 672, 529, 940,1088,1435, 473,1967,1968, 467,\n  50, 390, 227, 587, 279, 378, 598, 792, 968, 240, 151, 160, 849, 882,1126,1285,\n 639,1044, 133, 140, 288, 360, 811, 563,1027, 561, 142, 523,1969,1970,1971,   7,\n 103, 296, 439, 407, 506, 634, 990,1972,1973,1974,1975, 645,1976,1977,1978,1979,\n1980,1981, 236,1982,1436,1983,1984,1089, 192, 828, 618, 518,1166, 333,1127,1985,\n 818,1223,1986,1987,1988,1989,1990,1991,1992,1993, 342,1128,1286, 746, 842,1994,\n1995, 560, 223,1287,  98,   8, 189, 650, 978,1288,1996,1437,1997,  17, 345, 250,\n 423, 277, 234, 512, 226,  97, 289,  42, 167,1998, 201,1999,2000, 843, 836, 824,\n 532, 338, 783,1090, 182, 576, 436,1438,1439, 527, 500,2001, 947, 889,2002,2003,\n2004,2005, 262, 600, 314, 447,2006, 547,2007, 693, 738,1129,2008,  71,1440, 745,\n 619, 688,2009, 829,2010,2011, 147,2012,  33, 948,2013,2014,  74, 224,2015,  61,\n 191, 918, 399, 637,2016,1028,1130, 257, 902,2017,2018,2019,2020,2021,2022,2023,\n2024,2025,2026, 837,2027,2028,2029,2030, 179, 874, 591,  52, 724, 246,2031,2032,\n2033,2034,1167, 969,2035,1289, 630, 605, 911,1091,1168,2036,2037,2038,1441, 912,\n2039, 623,2040,2041, 253,1169,1290,2042,1442, 146, 620, 611, 577, 433,2043,1224,\n 719,1170, 959, 440, 437, 534,  84, 388, 480,1131, 159, 220, 198, 679,2044,1012,\n 819,1066,1443, 113,1225, 194, 318,1003,1029,2045,2046,2047,2048,1067,2049,2050,\n2051,2052,2053,  59, 913, 112,2054, 632,2055, 455, 144, 739,1291,2056, 273, 681,\n 499,2057, 448,2058,2059, 760,2060,2061, 970, 384, 169, 245,1132,2062,2063, 414,\n1444,2064,2065,  41, 235,2066, 157, 252, 877, 568, 919, 789, 580,2067, 725,2068,\n2069,1292,2070,2071,1445,2072,1446,2073,2074,  55, 588,  66,1447, 271,1092,2075,\n1226,2076, 960,1013, 372,2077,2078,2079,2080,2081,1293,2082,2083,2084,2085, 850,\n2086,2087,2088,2089,2090, 186,2091,1068, 180,2092,2093,2094, 109,1227, 522, 606,\n2095, 867,1448,1093, 991,1171, 926, 353,1133,2096, 581,2097,2098,2099,1294,1449,\n1450,2100, 596,1172,1014,1228,2101,1451,1295,1173,1229,2102,2103,1296,1134,1452,\n 949,1135,2104,2105,1094,1453,1454,1455,2106,1095,2107,2108,2109,2110,2111,2112,\n2113,2114,2115,2116,2117, 804,2118,2119,1230,1231, 805,1456, 405,1136,2120,2121,\n2122,2123,2124, 720, 701,1297, 992,1457, 927,1004,2125,2126,2127,2128,2129,2130,\n  22, 417,2131, 303,2132, 385,2133, 971, 520, 513,2134,1174,  73,1096, 231, 274,\n 962,1458, 673,2135,1459,2136, 152,1137,2137,2138,2139,2140,1005,1138,1460,1139,\n2141,2142,2143,2144,  11, 374, 844,2145, 154,1232,  46,1461,2146, 838, 830, 721,\n1233, 106,2147,  90, 428, 462, 578, 566,1175, 352,2148,2149, 538,1234, 124,1298,\n2150,1462, 761, 565,2151, 686,2152, 649,2153,  72, 173,2154, 460, 415,2155,1463,\n2156,1235, 305,2157,2158,2159,2160,2161,2162, 579,2163,2164,2165,2166,2167, 747,\n2168,2169,2170,2171,1464, 669,2172,2173,2174,2175,2176,1465,2177,  23, 530, 285,\n2178, 335, 729,2179, 397,2180,2181,2182,1030,2183,2184, 698,2185,2186, 325,2187,\n2188, 369,2189, 799,1097,1015, 348,2190,1069, 680,2191, 851,1466,2192,2193,  10,\n2194, 613, 424,2195, 979, 108, 449, 589,  27, 172,  81,1031,  80, 774, 281, 350,\n1032, 525, 301, 582,1176,2196, 674,1045,2197,2198,1467, 730, 762,2199,2200,2201,\n2202,1468,2203, 993,2204,2205, 266,1070, 963,1140,2206,2207,2208, 664,1098, 972,\n2209,2210,2211,1177,1469,1470, 871,2212,2213,2214,2215,2216,1471,2217,2218,2219,\n2220,2221,2222,2223,2224,2225,2226,2227,1472,1236,2228,2229,2230,2231,2232,2233,\n2234,2235,1299,2236,2237, 200,2238, 477, 373,2239,2240, 731, 825, 777,2241,2242,\n2243, 521, 486, 548,2244,2245,2246,1473,1300,  53, 549, 137, 875,  76, 158,2247,\n1301,1474, 469, 396,1016, 278, 712,2248, 321, 442, 503, 767, 744, 941,1237,1178,\n1475,2249,  82, 178,1141,1179, 973,2250,1302,2251, 297,2252,2253, 570,2254,2255,\n2256,  18, 450, 206,2257, 290, 292,1142,2258, 511, 162,  99, 346, 164, 735,2259,\n1476,1477,   4, 554, 343, 798,1099,2260,1100,2261,  43, 171,1303, 139, 215,2262,\n2263, 717, 775,2264,1033, 322, 216,2265, 831,2266, 149,2267,1304,2268,2269, 702,\n1238, 135, 845, 347, 309,2270, 484,2271, 878, 655, 238,1006,1478,2272,  67,2273,\n 295,2274,2275, 461,2276, 478, 942, 412,2277,1034,2278,2279,2280, 265,2281, 541,\n2282,2283,2284,2285,2286,  70, 852,1071,2287,2288,2289,2290,  21,  56, 509, 117,\n 432,2291,2292, 331, 980, 552,1101, 148, 284, 105, 393,1180,1239, 755,2293, 187,\n2294,1046,1479,2295, 340,2296,  63,1047, 230,2297,2298,1305, 763,1306, 101, 800,\n 808, 494,2299,2300,2301, 903,2302,  37,1072,  14,   5,2303,  79, 675,2304, 312,\n2305,2306,2307,2308,2309,1480,   6,1307,2310,2311,2312,   1, 470,  35,  24, 229,\n2313, 695, 210,  86, 778,  15, 784, 592, 779,  32,  77, 855, 964,2314, 259,2315,\n 501, 380,2316,2317,  83, 981, 153, 689,1308,1481,1482,1483,2318,2319, 716,1484,\n2320,2321,2322,2323,2324,2325,1485,2326,2327, 128,  57,  68, 261,1048, 211, 170,\n1240,  31,2328,  51, 435, 742,2329,2330,2331, 635,2332, 264, 456,2333,2334,2335,\n 425,2336,1486, 143, 507, 263, 943,2337, 363, 920,1487, 256,1488,1102, 243, 601,\n1489,2338,2339,2340,2341,2342,2343,2344, 861,2345,2346,2347,2348,2349,2350, 395,\n2351,1490,1491,  62, 535, 166, 225,2352,2353, 668, 419,1241, 138, 604, 928,2354,\n1181,2355,1492,1493,2356,2357,2358,1143,2359, 696,2360, 387, 307,1309, 682, 476,\n2361,2362, 332,  12, 222, 156,2363, 232,2364, 641, 276, 656, 517,1494,1495,1035,\n 416, 736,1496,2365,1017, 586,2366,2367,2368,1497,2369, 242,2370,2371,2372,1498,\n2373, 965, 713,2374,2375,2376,2377, 740, 982,1499, 944,1500,1007,2378,2379,1310,\n1501,2380,2381,2382, 785, 329,2383,2384,1502,2385,2386,2387, 932,2388,1503,2389,\n2390,2391,2392,1242,2393,2394,2395,2396,2397, 994, 950,2398,2399,2400,2401,1504,\n1311,2402,2403,2404,2405,1049, 749,2406,2407, 853, 718,1144,1312,2408,1182,1505,\n2409,2410, 255, 516, 479, 564, 550, 214,1506,1507,1313, 413, 239, 444, 339,1145,\n1036,1508,1509,1314,1037,1510,1315,2411,1511,2412,2413,2414, 176, 703, 497, 624,\n 593, 921, 302,2415, 341, 165,1103,1512,2416,1513,2417,2418,2419, 376,2420, 700,\n2421,2422,2423, 258, 768,1316,2424,1183,2425, 995, 608,2426,2427,2428,2429, 221,\n2430,2431,2432,2433,2434,2435,2436,2437, 195, 323, 726, 188, 897, 983,1317, 377,\n 644,1050, 879,2438, 452,2439,2440,2441,2442,2443,2444, 914,2445,2446,2447,2448,\n 915, 489,2449,1514,1184,2450,2451, 515,  64, 427, 495,2452, 583,2453, 483, 485,\n1038, 562, 213,1515, 748, 666,2454,2455,2456,2457, 334,2458, 780, 996,1008, 705,\n1243,2459,2460,2461,2462,2463, 114,2464, 493,1146, 366, 163,1516, 961,1104,2465,\n 291,2466,1318,1105,2467,1517, 365,2468, 355, 951,1244,2469,1319,2470, 631,2471,\n2472, 218,1320, 364, 320, 756,1518,1519,1321,1520,1322,2473,2474,2475,2476, 997,\n2477,2478,2479,2480, 665,1185,2481, 916,1521,2482,2483,2484, 584, 684,2485,2486,\n 797,2487,1051,1186,2488,2489,2490,1522,2491,2492, 370,2493,1039,1187,  65,2494,\n 434, 205, 463,1188,2495, 125, 812, 391, 402, 826, 699, 286, 398, 155, 781, 771,\n 585,2496, 590, 505,1073,2497, 599, 244, 219, 917,1018, 952, 646,1523,2498,1323,\n2499,2500,  49, 984, 354, 741,2501, 625,2502,1324,2503,1019, 190, 357, 757, 491,\n  95, 782, 868,2504,2505,2506,2507,2508,2509, 134,1524,1074, 422,1525, 898,2510,\n 161,2511,2512,2513,2514, 769,2515,1526,2516,2517, 411,1325,2518, 472,1527,2519,\n2520,2521,2522,2523,2524, 985,2525,2526,2527,2528,2529,2530, 764,2531,1245,2532,\n2533,  25, 204, 311,2534, 496,2535,1052,2536,2537,2538,2539,2540,2541,2542, 199,\n 704, 504, 468, 758, 657,1528, 196,  44, 839,1246, 272, 750,2543, 765, 862,2544,\n2545,1326,2546, 132, 615, 933,2547, 732,2548,2549,2550,1189,1529,2551, 283,1247,\n1053, 607, 929,2552,2553,2554, 930, 183, 872, 616,1040,1147,2555,1148,1020, 441,\n 249,1075,2556,2557,2558, 466, 743,2559,2560,2561,  92, 514, 426, 420, 526,2562,\n2563,2564,2565,2566,2567,2568, 185,2569,2570,2571,2572, 776,1530, 658,2573, 362,\n2574, 361, 922,1076, 793,2575,2576,2577,2578,2579,2580,1531, 251,2581,2582,2583,\n2584,1532,  54, 612, 237,1327,2585,2586, 275, 408, 647, 111,2587,1533,1106, 465,\n   3, 458,   9,  38,2588, 107, 110, 890, 209,  26, 737, 498,2589,1534,2590, 431,\n 202,  88,1535, 356, 287,1107, 660,1149,2591, 381,1536, 986,1150, 445,1248,1151,\n 974,2592,2593, 846,2594, 446, 953, 184,1249,1250, 727,2595, 923, 193, 883,2596,\n2597,2598, 102, 324, 539, 817,2599, 421,1041,2600, 832,2601,  94, 175, 197, 406,\n2602, 459,2603,2604,2605,2606,2607, 330, 555,2608,2609,2610, 706,1108, 389,2611,\n2612,2613,2614, 233,2615, 833, 558, 931, 954,1251,2616,2617,1537, 546,2618,2619,\n1009,2620,2621,2622,1538, 690,1328,2623, 955,2624,1539,2625,2626, 772,2627,2628,\n2629,2630,2631, 924, 648, 863, 603,2632,2633, 934,1540, 864, 865,2634, 642,1042,\n 670,1190,2635,2636,2637,2638, 168,2639, 652, 873, 542,1054,1541,2640,2641,2642,  //512, 256\n\n/*************************************************************************************** \n *Everything below is of no interest for detection purpose\t\t\t\t\t\t\t   *\n ***************************************************************************************\n\n2643,2644,2645,2646,2647,2648,2649,2650,2651,2652,2653,2654,2655,2656,2657,2658,\n2659,2660,2661,2662,2663,2664,2665,2666,2667,2668,2669,2670,2671,2672,2673,2674,\n2675,2676,2677,2678,2679,2680,2681,2682,2683,2684,2685,2686,2687,2688,2689,2690,\n2691,2692,2693,2694,2695,2696,2697,2698,2699,1542, 880,2700,2701,2702,2703,2704,\n2705,2706,2707,2708,2709,2710,2711,2712,2713,2714,2715,2716,2717,2718,2719,2720,\n2721,2722,2723,2724,2725,1543,2726,2727,2728,2729,2730,2731,2732,1544,2733,2734,\n2735,2736,2737,2738,2739,2740,2741,2742,2743,2744,2745,2746,2747,2748,2749,2750,\n2751,2752,2753,2754,1545,2755,2756,2757,2758,2759,2760,2761,2762,2763,2764,2765,\n2766,1546,2767,1547,2768,2769,2770,2771,2772,2773,2774,2775,2776,2777,2778,2779,\n2780,2781,2782,2783,2784,2785,2786,1548,2787,2788,2789,1109,2790,2791,2792,2793,\n2794,2795,2796,2797,2798,2799,2800,2801,2802,2803,2804,2805,2806,2807,2808,2809,\n2810,2811,2812,1329,2813,2814,2815,2816,2817,2818,2819,2820,2821,2822,2823,2824,\n2825,2826,2827,2828,2829,2830,2831,2832,2833,2834,2835,2836,2837,2838,2839,2840,\n2841,2842,2843,2844,2845,2846,2847,2848,2849,2850,2851,2852,2853,2854,2855,2856,\n1549,2857,2858,2859,2860,1550,2861,2862,1551,2863,2864,2865,2866,2867,2868,2869,\n2870,2871,2872,2873,2874,1110,1330,2875,2876,2877,2878,2879,2880,2881,2882,2883,\n2884,2885,2886,2887,2888,2889,2890,2891,2892,2893,2894,2895,2896,2897,2898,2899,\n2900,2901,2902,2903,2904,2905,2906,2907,2908,2909,2910,2911,2912,2913,2914,2915,\n2916,2917,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,1331,\n2931,2932,2933,2934,2935,2936,2937,2938,2939,2940,2941,2942,2943,1552,2944,2945,\n2946,2947,2948,2949,2950,2951,2952,2953,2954,2955,2956,2957,2958,2959,2960,2961,\n2962,2963,2964,1252,2965,2966,2967,2968,2969,2970,2971,2972,2973,2974,2975,2976,\n2977,2978,2979,2980,2981,2982,2983,2984,2985,2986,2987,2988,2989,2990,2991,2992,\n2993,2994,2995,2996,2997,2998,2999,3000,3001,3002,3003,3004,3005,3006,3007,3008,\n3009,3010,3011,3012,1553,3013,3014,3015,3016,3017,1554,3018,1332,3019,3020,3021,\n3022,3023,3024,3025,3026,3027,3028,3029,3030,3031,3032,3033,3034,3035,3036,3037,\n3038,3039,3040,3041,3042,3043,3044,3045,3046,3047,3048,3049,3050,1555,3051,3052,\n3053,1556,1557,3054,3055,3056,3057,3058,3059,3060,3061,3062,3063,3064,3065,3066,\n3067,1558,3068,3069,3070,3071,3072,3073,3074,3075,3076,1559,3077,3078,3079,3080,\n3081,3082,3083,1253,3084,3085,3086,3087,3088,3089,3090,3091,3092,3093,3094,3095,\n3096,3097,3098,3099,3100,3101,3102,3103,3104,3105,3106,3107,3108,1152,3109,3110,\n3111,3112,3113,1560,3114,3115,3116,3117,1111,3118,3119,3120,3121,3122,3123,3124,\n3125,3126,3127,3128,3129,3130,3131,3132,3133,3134,3135,3136,3137,3138,3139,3140,\n3141,3142,3143,3144,3145,3146,3147,3148,3149,3150,3151,3152,3153,3154,3155,3156,\n3157,3158,3159,3160,3161,3162,3163,3164,3165,3166,3167,3168,3169,3170,3171,3172,\n3173,3174,3175,3176,1333,3177,3178,3179,3180,3181,3182,3183,3184,3185,3186,3187,\n3188,3189,1561,3190,3191,1334,3192,3193,3194,3195,3196,3197,3198,3199,3200,3201,\n3202,3203,3204,3205,3206,3207,3208,3209,3210,3211,3212,3213,3214,3215,3216,3217,\n3218,3219,3220,3221,3222,3223,3224,3225,3226,3227,3228,3229,3230,3231,3232,3233,\n3234,1562,3235,3236,3237,3238,3239,3240,3241,3242,3243,3244,3245,3246,3247,3248,\n3249,3250,3251,3252,3253,3254,3255,3256,3257,3258,3259,3260,3261,3262,3263,3264,\n3265,3266,3267,3268,3269,3270,3271,3272,3273,3274,3275,3276,3277,1563,3278,3279,\n3280,3281,3282,3283,3284,3285,3286,3287,3288,3289,3290,3291,3292,3293,3294,3295,\n3296,3297,3298,3299,3300,3301,3302,3303,3304,3305,3306,3307,3308,3309,3310,3311,\n3312,3313,3314,3315,3316,3317,3318,3319,3320,3321,3322,3323,3324,3325,3326,3327,\n3328,3329,3330,3331,3332,3333,3334,3335,3336,3337,3338,3339,3340,3341,3342,3343,\n3344,3345,3346,3347,3348,3349,3350,3351,3352,3353,3354,3355,3356,3357,3358,3359,\n3360,3361,3362,3363,3364,1335,3365,3366,3367,3368,3369,3370,3371,3372,3373,3374,\n3375,3376,3377,3378,3379,3380,3381,3382,3383,3384,3385,3386,3387,1336,3388,3389,\n3390,3391,3392,3393,3394,3395,3396,3397,3398,3399,3400,3401,3402,3403,3404,3405,\n3406,3407,3408,3409,3410,3411,3412,3413,3414,1337,3415,3416,3417,3418,3419,1338,\n3420,3421,3422,1564,1565,3423,3424,3425,3426,3427,3428,3429,3430,3431,1254,3432,\n3433,3434,1339,3435,3436,3437,3438,3439,1566,3440,3441,3442,3443,3444,3445,3446,\n3447,3448,3449,3450,3451,3452,3453,3454,1255,3455,3456,3457,3458,3459,1567,1191,\n3460,1568,1569,3461,3462,3463,1570,3464,3465,3466,3467,3468,1571,3469,3470,3471,\n3472,3473,1572,3474,3475,3476,3477,3478,3479,3480,3481,3482,3483,3484,3485,3486,\n1340,3487,3488,3489,3490,3491,3492,1021,3493,3494,3495,3496,3497,3498,1573,3499,\n1341,3500,3501,3502,3503,3504,3505,3506,3507,3508,3509,3510,3511,1342,3512,3513,\n3514,3515,3516,1574,1343,3517,3518,3519,1575,3520,1576,3521,3522,3523,3524,3525,\n3526,3527,3528,3529,3530,3531,3532,3533,3534,3535,3536,3537,3538,3539,3540,3541,\n3542,3543,3544,3545,3546,3547,3548,3549,3550,3551,3552,3553,3554,3555,3556,3557,\n3558,3559,3560,3561,3562,3563,3564,3565,3566,3567,3568,3569,3570,3571,3572,3573,\n3574,3575,3576,3577,3578,3579,3580,1577,3581,3582,1578,3583,3584,3585,3586,3587,\n3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,\n3604,1579,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,\n3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,1580,3630,3631,1581,3632,\n3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,3643,3644,3645,3646,3647,3648,\n3649,3650,3651,3652,3653,3654,3655,3656,1582,3657,3658,3659,3660,3661,3662,3663,\n3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,3676,3677,3678,3679,\n3680,3681,3682,3683,3684,3685,3686,3687,3688,3689,3690,3691,3692,3693,3694,3695,\n3696,3697,3698,3699,3700,1192,3701,3702,3703,3704,1256,3705,3706,3707,3708,1583,\n1257,3709,3710,3711,3712,3713,3714,3715,3716,1584,3717,3718,3719,3720,3721,3722,\n3723,3724,3725,3726,3727,3728,3729,3730,3731,3732,3733,3734,3735,3736,3737,3738,\n3739,3740,3741,3742,3743,3744,3745,1344,3746,3747,3748,3749,3750,3751,3752,3753,\n3754,3755,3756,1585,3757,3758,3759,3760,3761,3762,3763,3764,3765,3766,1586,3767,\n3768,3769,3770,3771,3772,3773,3774,3775,3776,3777,3778,1345,3779,3780,3781,3782,\n3783,3784,3785,3786,3787,3788,3789,3790,3791,3792,3793,3794,3795,1346,1587,3796,\n3797,1588,3798,3799,3800,3801,3802,3803,3804,3805,3806,1347,3807,3808,3809,3810,\n3811,1589,3812,3813,3814,3815,3816,3817,3818,3819,3820,3821,1590,3822,3823,1591,\n1348,3824,3825,3826,3827,3828,3829,3830,1592,3831,3832,1593,3833,3834,3835,3836,\n3837,3838,3839,3840,3841,3842,3843,3844,1349,3845,3846,3847,3848,3849,3850,3851,\n3852,3853,3854,3855,3856,3857,3858,1594,3859,3860,3861,3862,3863,3864,3865,3866,\n3867,3868,3869,1595,3870,3871,3872,3873,1596,3874,3875,3876,3877,3878,3879,3880,\n3881,3882,3883,3884,3885,3886,1597,3887,3888,3889,3890,3891,3892,3893,3894,3895,\n1598,3896,3897,3898,1599,1600,3899,1350,3900,1351,3901,3902,1352,3903,3904,3905,\n3906,3907,3908,3909,3910,3911,3912,3913,3914,3915,3916,3917,3918,3919,3920,3921,\n3922,3923,3924,1258,3925,3926,3927,3928,3929,3930,3931,1193,3932,1601,3933,3934,\n3935,3936,3937,3938,3939,3940,3941,3942,3943,1602,3944,3945,3946,3947,3948,1603,\n3949,3950,3951,3952,3953,3954,3955,3956,3957,3958,3959,3960,3961,3962,3963,3964,\n3965,1604,3966,3967,3968,3969,3970,3971,3972,3973,3974,3975,3976,3977,1353,3978,\n3979,3980,3981,3982,3983,3984,3985,3986,3987,3988,3989,3990,3991,1354,3992,3993,\n3994,3995,3996,3997,3998,3999,4000,4001,4002,4003,4004,4005,4006,4007,4008,4009,\n4010,4011,4012,4013,4014,4015,4016,4017,4018,4019,4020,4021,4022,4023,1355,4024,\n4025,4026,4027,4028,4029,4030,4031,4032,4033,4034,4035,4036,4037,4038,4039,4040,\n1605,4041,4042,4043,4044,4045,4046,4047,4048,4049,4050,4051,4052,4053,4054,4055,\n4056,4057,4058,4059,4060,1606,4061,4062,4063,4064,1607,4065,4066,4067,4068,4069,\n4070,4071,4072,4073,4074,4075,4076,1194,4077,4078,1608,4079,4080,4081,4082,4083,\n4084,4085,4086,4087,1609,4088,4089,4090,4091,4092,4093,4094,4095,4096,4097,4098,\n4099,4100,4101,4102,4103,4104,4105,4106,4107,4108,1259,4109,4110,4111,4112,4113,\n4114,4115,4116,4117,4118,4119,4120,4121,4122,4123,4124,1195,4125,4126,4127,1610,\n4128,4129,4130,4131,4132,4133,4134,4135,4136,4137,1356,4138,4139,4140,4141,4142,\n4143,4144,1611,4145,4146,4147,4148,4149,4150,4151,4152,4153,4154,4155,4156,4157,\n4158,4159,4160,4161,4162,4163,4164,4165,4166,4167,4168,4169,4170,4171,4172,4173,\n4174,4175,4176,4177,4178,4179,4180,4181,4182,4183,4184,4185,4186,4187,4188,4189,\n4190,4191,4192,4193,4194,4195,4196,4197,4198,4199,4200,4201,4202,4203,4204,4205,\n4206,4207,4208,4209,4210,4211,4212,4213,4214,4215,4216,4217,4218,4219,1612,4220,\n4221,4222,4223,4224,4225,4226,4227,1357,4228,1613,4229,4230,4231,4232,4233,4234,\n4235,4236,4237,4238,4239,4240,4241,4242,4243,1614,4244,4245,4246,4247,4248,4249,\n4250,4251,4252,4253,4254,4255,4256,4257,4258,4259,4260,4261,4262,4263,4264,4265,\n4266,4267,4268,4269,4270,1196,1358,4271,4272,4273,4274,4275,4276,4277,4278,4279,\n4280,4281,4282,4283,4284,4285,4286,4287,1615,4288,4289,4290,4291,4292,4293,4294,\n4295,4296,4297,4298,4299,4300,4301,4302,4303,4304,4305,4306,4307,4308,4309,4310,\n4311,4312,4313,4314,4315,4316,4317,4318,4319,4320,4321,4322,4323,4324,4325,4326,\n4327,4328,4329,4330,4331,4332,4333,4334,1616,4335,4336,4337,4338,4339,4340,4341,\n4342,4343,4344,4345,4346,4347,4348,4349,4350,4351,4352,4353,4354,4355,4356,4357,\n4358,4359,4360,1617,4361,4362,4363,4364,4365,1618,4366,4367,4368,4369,4370,4371,\n4372,4373,4374,4375,4376,4377,4378,4379,4380,4381,4382,4383,4384,4385,4386,4387,\n4388,4389,4390,4391,4392,4393,4394,4395,4396,4397,4398,4399,4400,4401,4402,4403,\n4404,4405,4406,4407,4408,4409,4410,4411,4412,4413,4414,4415,4416,1619,4417,4418,\n4419,4420,4421,4422,4423,4424,4425,1112,4426,4427,4428,4429,4430,1620,4431,4432,\n4433,4434,4435,4436,4437,4438,4439,4440,4441,4442,1260,1261,4443,4444,4445,4446,\n4447,4448,4449,4450,4451,4452,4453,4454,4455,1359,4456,4457,4458,4459,4460,4461,\n4462,4463,4464,4465,1621,4466,4467,4468,4469,4470,4471,4472,4473,4474,4475,4476,\n4477,4478,4479,4480,4481,4482,4483,4484,4485,4486,4487,4488,4489,1055,4490,4491,\n4492,4493,4494,4495,4496,4497,4498,4499,4500,4501,4502,4503,4504,4505,4506,4507,\n4508,4509,4510,4511,4512,4513,4514,4515,4516,4517,4518,1622,4519,4520,4521,1623,\n4522,4523,4524,4525,4526,4527,4528,4529,4530,4531,4532,4533,4534,4535,1360,4536,\n4537,4538,4539,4540,4541,4542,4543, 975,4544,4545,4546,4547,4548,4549,4550,4551,\n4552,4553,4554,4555,4556,4557,4558,4559,4560,4561,4562,4563,4564,4565,4566,4567,\n4568,4569,4570,4571,1624,4572,4573,4574,4575,4576,1625,4577,4578,4579,4580,4581,\n4582,4583,4584,1626,4585,4586,4587,4588,4589,4590,4591,4592,4593,4594,4595,1627,\n4596,4597,4598,4599,4600,4601,4602,4603,4604,4605,4606,4607,4608,4609,4610,4611,\n4612,4613,4614,4615,1628,4616,4617,4618,4619,4620,4621,4622,4623,4624,4625,4626,\n4627,4628,4629,4630,4631,4632,4633,4634,4635,4636,4637,4638,4639,4640,4641,4642,\n4643,4644,4645,4646,4647,4648,4649,1361,4650,4651,4652,4653,4654,4655,4656,4657,\n4658,4659,4660,4661,1362,4662,4663,4664,4665,4666,4667,4668,4669,4670,4671,4672,\n4673,4674,4675,4676,4677,4678,4679,4680,4681,4682,1629,4683,4684,4685,4686,4687,\n1630,4688,4689,4690,4691,1153,4692,4693,4694,1113,4695,4696,4697,4698,4699,4700,\n4701,4702,4703,4704,4705,4706,4707,4708,4709,4710,4711,1197,4712,4713,4714,4715,\n4716,4717,4718,4719,4720,4721,4722,4723,4724,4725,4726,4727,4728,4729,4730,4731,\n4732,4733,4734,4735,1631,4736,1632,4737,4738,4739,4740,4741,4742,4743,4744,1633,\n4745,4746,4747,4748,4749,1262,4750,4751,4752,4753,4754,1363,4755,4756,4757,4758,\n4759,4760,4761,4762,4763,4764,4765,4766,4767,4768,1634,4769,4770,4771,4772,4773,\n4774,4775,4776,4777,4778,1635,4779,4780,4781,4782,4783,4784,4785,4786,4787,4788,\n4789,1636,4790,4791,4792,4793,4794,4795,4796,4797,4798,4799,4800,4801,4802,4803,\n4804,4805,4806,1637,4807,4808,4809,1638,4810,4811,4812,4813,4814,4815,4816,4817,\n4818,1639,4819,4820,4821,4822,4823,4824,4825,4826,4827,4828,4829,4830,4831,4832,\n4833,1077,4834,4835,4836,4837,4838,4839,4840,4841,4842,4843,4844,4845,4846,4847,\n4848,4849,4850,4851,4852,4853,4854,4855,4856,4857,4858,4859,4860,4861,4862,4863,\n4864,4865,4866,4867,4868,4869,4870,4871,4872,4873,4874,4875,4876,4877,4878,4879,\n4880,4881,4882,4883,1640,4884,4885,1641,4886,4887,4888,4889,4890,4891,4892,4893,\n4894,4895,4896,4897,4898,4899,4900,4901,4902,4903,4904,4905,4906,4907,4908,4909,\n4910,4911,1642,4912,4913,4914,1364,4915,4916,4917,4918,4919,4920,4921,4922,4923,\n4924,4925,4926,4927,4928,4929,4930,4931,1643,4932,4933,4934,4935,4936,4937,4938,\n4939,4940,4941,4942,4943,4944,4945,4946,4947,4948,4949,4950,4951,4952,4953,4954,\n4955,4956,4957,4958,4959,4960,4961,4962,4963,4964,4965,4966,4967,4968,4969,4970,\n4971,4972,4973,4974,4975,4976,4977,4978,4979,4980,1644,4981,4982,4983,4984,1645,\n4985,4986,1646,4987,4988,4989,4990,4991,4992,4993,4994,4995,4996,4997,4998,4999,\n5000,5001,5002,5003,5004,5005,1647,5006,1648,5007,5008,5009,5010,5011,5012,1078,\n5013,5014,5015,5016,5017,5018,5019,5020,5021,5022,5023,5024,5025,5026,5027,5028,\n1365,5029,5030,5031,5032,5033,5034,5035,5036,5037,5038,5039,1649,5040,5041,5042,\n5043,5044,5045,1366,5046,5047,5048,5049,5050,5051,5052,5053,5054,5055,1650,5056,\n5057,5058,5059,5060,5061,5062,5063,5064,5065,5066,5067,5068,5069,5070,5071,5072,\n5073,5074,5075,5076,5077,1651,5078,5079,5080,5081,5082,5083,5084,5085,5086,5087,\n5088,5089,5090,5091,5092,5093,5094,5095,5096,5097,5098,5099,5100,5101,5102,5103,\n5104,5105,5106,5107,5108,5109,5110,1652,5111,5112,5113,5114,5115,5116,5117,5118,\n1367,5119,5120,5121,5122,5123,5124,5125,5126,5127,5128,5129,1653,5130,5131,5132,\n5133,5134,5135,5136,5137,5138,5139,5140,5141,5142,5143,5144,5145,5146,5147,5148,\n5149,1368,5150,1654,5151,1369,5152,5153,5154,5155,5156,5157,5158,5159,5160,5161,\n5162,5163,5164,5165,5166,5167,5168,5169,5170,5171,5172,5173,5174,5175,5176,5177,\n5178,1370,5179,5180,5181,5182,5183,5184,5185,5186,5187,5188,5189,5190,5191,5192,\n5193,5194,5195,5196,5197,5198,1655,5199,5200,5201,5202,1656,5203,5204,5205,5206,\n1371,5207,1372,5208,5209,5210,5211,1373,5212,5213,1374,5214,5215,5216,5217,5218,\n5219,5220,5221,5222,5223,5224,5225,5226,5227,5228,5229,5230,5231,5232,5233,5234,\n5235,5236,5237,5238,5239,5240,5241,5242,5243,5244,5245,5246,5247,1657,5248,5249,\n5250,5251,1658,1263,5252,5253,5254,5255,5256,1375,5257,5258,5259,5260,5261,5262,\n5263,5264,5265,5266,5267,5268,5269,5270,5271,5272,5273,5274,5275,5276,5277,5278,\n5279,5280,5281,5282,5283,1659,5284,5285,5286,5287,5288,5289,5290,5291,5292,5293,\n5294,5295,5296,5297,5298,5299,5300,1660,5301,5302,5303,5304,5305,5306,5307,5308,\n5309,5310,5311,5312,5313,5314,5315,5316,5317,5318,5319,5320,5321,1376,5322,5323,\n5324,5325,5326,5327,5328,5329,5330,5331,5332,5333,1198,5334,5335,5336,5337,5338,\n5339,5340,5341,5342,5343,1661,5344,5345,5346,5347,5348,5349,5350,5351,5352,5353,\n5354,5355,5356,5357,5358,5359,5360,5361,5362,5363,5364,5365,5366,5367,5368,5369,\n5370,5371,5372,5373,5374,5375,5376,5377,5378,5379,5380,5381,5382,5383,5384,5385,\n5386,5387,5388,5389,5390,5391,5392,5393,5394,5395,5396,5397,5398,1264,5399,5400,\n5401,5402,5403,5404,5405,5406,5407,5408,5409,5410,5411,5412,1662,5413,5414,5415,\n5416,1663,5417,5418,5419,5420,5421,5422,5423,5424,5425,5426,5427,5428,5429,5430,\n5431,5432,5433,5434,5435,5436,5437,5438,1664,5439,5440,5441,5442,5443,5444,5445,\n5446,5447,5448,5449,5450,5451,5452,5453,5454,5455,5456,5457,5458,5459,5460,5461,\n5462,5463,5464,5465,5466,5467,5468,5469,5470,5471,5472,5473,5474,5475,5476,5477,\n5478,1154,5479,5480,5481,5482,5483,5484,5485,1665,5486,5487,5488,5489,5490,5491,\n5492,5493,5494,5495,5496,5497,5498,5499,5500,5501,5502,5503,5504,5505,5506,5507,\n5508,5509,5510,5511,5512,5513,5514,5515,5516,5517,5518,5519,5520,5521,5522,5523,\n5524,5525,5526,5527,5528,5529,5530,5531,5532,5533,5534,5535,5536,5537,5538,5539,\n5540,5541,5542,5543,5544,5545,5546,5547,5548,1377,5549,5550,5551,5552,5553,5554,\n5555,5556,5557,5558,5559,5560,5561,5562,5563,5564,5565,5566,5567,5568,5569,5570,\n1114,5571,5572,5573,5574,5575,5576,5577,5578,5579,5580,5581,5582,5583,5584,5585,\n5586,5587,5588,5589,5590,5591,5592,1378,5593,5594,5595,5596,5597,5598,5599,5600,\n5601,5602,5603,5604,5605,5606,5607,5608,5609,5610,5611,5612,5613,5614,1379,5615,\n5616,5617,5618,5619,5620,5621,5622,5623,5624,5625,5626,5627,5628,5629,5630,5631,\n5632,5633,5634,1380,5635,5636,5637,5638,5639,5640,5641,5642,5643,5644,5645,5646,\n5647,5648,5649,1381,1056,5650,5651,5652,5653,5654,5655,5656,5657,5658,5659,5660,\n1666,5661,5662,5663,5664,5665,5666,5667,5668,1667,5669,1668,5670,5671,5672,5673,\n5674,5675,5676,5677,5678,1155,5679,5680,5681,5682,5683,5684,5685,5686,5687,5688,\n5689,5690,5691,5692,5693,5694,5695,5696,5697,5698,1669,5699,5700,5701,5702,5703,\n5704,5705,1670,5706,5707,5708,5709,5710,1671,5711,5712,5713,5714,1382,5715,5716,\n5717,5718,5719,5720,5721,5722,5723,5724,5725,1672,5726,5727,1673,1674,5728,5729,\n5730,5731,5732,5733,5734,5735,5736,1675,5737,5738,5739,5740,5741,5742,5743,5744,\n1676,5745,5746,5747,5748,5749,5750,5751,1383,5752,5753,5754,5755,5756,5757,5758,\n5759,5760,5761,5762,5763,5764,5765,5766,5767,5768,1677,5769,5770,5771,5772,5773,\n1678,5774,5775,5776, 998,5777,5778,5779,5780,5781,5782,5783,5784,5785,1384,5786,\n5787,5788,5789,5790,5791,5792,5793,5794,5795,5796,5797,5798,5799,5800,1679,5801,\n5802,5803,1115,1116,5804,5805,5806,5807,5808,5809,5810,5811,5812,5813,5814,5815,\n5816,5817,5818,5819,5820,5821,5822,5823,5824,5825,5826,5827,5828,5829,5830,5831,\n5832,5833,5834,5835,5836,5837,5838,5839,5840,5841,5842,5843,5844,5845,5846,5847,\n5848,5849,5850,5851,5852,5853,5854,5855,1680,5856,5857,5858,5859,5860,5861,5862,\n5863,5864,1681,5865,5866,5867,1682,5868,5869,5870,5871,5872,5873,5874,5875,5876,\n5877,5878,5879,1683,5880,1684,5881,5882,5883,5884,1685,5885,5886,5887,5888,5889,\n5890,5891,5892,5893,5894,5895,5896,5897,5898,5899,5900,5901,5902,5903,5904,5905,\n5906,5907,1686,5908,5909,5910,5911,5912,5913,5914,5915,5916,5917,5918,5919,5920,\n5921,5922,5923,5924,5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,1687,\n5936,5937,5938,5939,5940,5941,5942,5943,5944,5945,5946,5947,5948,5949,5950,5951,\n5952,1688,1689,5953,1199,5954,5955,5956,5957,5958,5959,5960,5961,1690,5962,5963,\n5964,5965,5966,5967,5968,5969,5970,5971,5972,5973,5974,5975,5976,5977,5978,5979,\n5980,5981,1385,5982,1386,5983,5984,5985,5986,5987,5988,5989,5990,5991,5992,5993,\n5994,5995,5996,5997,5998,5999,6000,6001,6002,6003,6004,6005,6006,6007,6008,6009,\n6010,6011,6012,6013,6014,6015,6016,6017,6018,6019,6020,6021,6022,6023,6024,6025,\n6026,6027,1265,6028,6029,1691,6030,6031,6032,6033,6034,6035,6036,6037,6038,6039,\n6040,6041,6042,6043,6044,6045,6046,6047,6048,6049,6050,6051,6052,6053,6054,6055,\n6056,6057,6058,6059,6060,6061,6062,6063,6064,6065,6066,6067,6068,6069,6070,6071,\n6072,6073,6074,6075,6076,6077,6078,6079,6080,6081,6082,6083,6084,1692,6085,6086,\n6087,6088,6089,6090,6091,6092,6093,6094,6095,6096,6097,6098,6099,6100,6101,6102,\n6103,6104,6105,6106,6107,6108,6109,6110,6111,6112,6113,6114,6115,6116,6117,6118,\n6119,6120,6121,6122,6123,6124,6125,6126,6127,6128,6129,6130,6131,1693,6132,6133,\n6134,6135,6136,1694,6137,6138,6139,6140,6141,1695,6142,6143,6144,6145,6146,6147,\n6148,6149,6150,6151,6152,6153,6154,6155,6156,6157,6158,6159,6160,6161,6162,6163,\n6164,6165,6166,6167,6168,6169,6170,6171,6172,6173,6174,6175,6176,6177,6178,6179,\n6180,6181,6182,6183,6184,6185,1696,6186,6187,6188,6189,6190,6191,6192,6193,6194,\n6195,6196,6197,6198,6199,6200,6201,6202,6203,6204,6205,6206,6207,6208,6209,6210,\n6211,6212,6213,6214,6215,6216,6217,6218,6219,1697,6220,6221,6222,6223,6224,6225,\n6226,6227,6228,6229,6230,6231,6232,6233,6234,6235,6236,6237,6238,6239,6240,6241,\n6242,6243,6244,6245,6246,6247,6248,6249,6250,6251,6252,6253,1698,6254,6255,6256,\n6257,6258,6259,6260,6261,6262,6263,1200,6264,6265,6266,6267,6268,6269,6270,6271,  //1024\n6272,6273,6274,6275,6276,6277,6278,6279,6280,6281,6282,6283,6284,6285,6286,6287,\n6288,6289,6290,6291,6292,6293,6294,6295,6296,6297,6298,6299,6300,6301,6302,1699,\n6303,6304,1700,6305,6306,6307,6308,6309,6310,6311,6312,6313,6314,6315,6316,6317,\n6318,6319,6320,6321,6322,6323,6324,6325,6326,6327,6328,6329,6330,6331,6332,6333,\n6334,6335,6336,6337,6338,6339,1701,6340,6341,6342,6343,6344,1387,6345,6346,6347,\n6348,6349,6350,6351,6352,6353,6354,6355,6356,6357,6358,6359,6360,6361,6362,6363,\n6364,6365,6366,6367,6368,6369,6370,6371,6372,6373,6374,6375,6376,6377,6378,6379,\n6380,6381,6382,6383,6384,6385,6386,6387,6388,6389,6390,6391,6392,6393,6394,6395,\n6396,6397,6398,6399,6400,6401,6402,6403,6404,6405,6406,6407,6408,6409,6410,6411,\n6412,6413,1702,6414,6415,6416,6417,6418,6419,6420,6421,6422,1703,6423,6424,6425,\n6426,6427,6428,6429,6430,6431,6432,6433,6434,6435,6436,6437,6438,1704,6439,6440,\n6441,6442,6443,6444,6445,6446,6447,6448,6449,6450,6451,6452,6453,6454,6455,6456,\n6457,6458,6459,6460,6461,6462,6463,6464,6465,6466,6467,6468,6469,6470,6471,6472,\n6473,6474,6475,6476,6477,6478,6479,6480,6481,6482,6483,6484,6485,6486,6487,6488,\n6489,6490,6491,6492,6493,6494,6495,6496,6497,6498,6499,6500,6501,6502,6503,1266,\n6504,6505,6506,6507,6508,6509,6510,6511,6512,6513,6514,6515,6516,6517,6518,6519,\n6520,6521,6522,6523,6524,6525,6526,6527,6528,6529,6530,6531,6532,6533,6534,6535,\n6536,6537,6538,6539,6540,6541,6542,6543,6544,6545,6546,6547,6548,6549,6550,6551,\n1705,1706,6552,6553,6554,6555,6556,6557,6558,6559,6560,6561,6562,6563,6564,6565,\n6566,6567,6568,6569,6570,6571,6572,6573,6574,6575,6576,6577,6578,6579,6580,6581,\n6582,6583,6584,6585,6586,6587,6588,6589,6590,6591,6592,6593,6594,6595,6596,6597,\n6598,6599,6600,6601,6602,6603,6604,6605,6606,6607,6608,6609,6610,6611,6612,6613,\n6614,6615,6616,6617,6618,6619,6620,6621,6622,6623,6624,6625,6626,6627,6628,6629,\n6630,6631,6632,6633,6634,6635,6636,6637,1388,6638,6639,6640,6641,6642,6643,6644,\n1707,6645,6646,6647,6648,6649,6650,6651,6652,6653,6654,6655,6656,6657,6658,6659,\n6660,6661,6662,6663,1708,6664,6665,6666,6667,6668,6669,6670,6671,6672,6673,6674,\n1201,6675,6676,6677,6678,6679,6680,6681,6682,6683,6684,6685,6686,6687,6688,6689,\n6690,6691,6692,6693,6694,6695,6696,6697,6698,6699,6700,6701,6702,6703,6704,6705,\n6706,6707,6708,6709,6710,6711,6712,6713,6714,6715,6716,6717,6718,6719,6720,6721,\n6722,6723,6724,6725,1389,6726,6727,6728,6729,6730,6731,6732,6733,6734,6735,6736,\n1390,1709,6737,6738,6739,6740,6741,6742,1710,6743,6744,6745,6746,1391,6747,6748,\n6749,6750,6751,6752,6753,6754,6755,6756,6757,1392,6758,6759,6760,6761,6762,6763,\n6764,6765,6766,6767,6768,6769,6770,6771,6772,6773,6774,6775,6776,6777,6778,6779,\n6780,1202,6781,6782,6783,6784,6785,6786,6787,6788,6789,6790,6791,6792,6793,6794,\n6795,6796,6797,6798,6799,6800,6801,6802,6803,6804,6805,6806,6807,6808,6809,1711,\n6810,6811,6812,6813,6814,6815,6816,6817,6818,6819,6820,6821,6822,6823,6824,6825,\n6826,6827,6828,6829,6830,6831,6832,6833,6834,6835,6836,1393,6837,6838,6839,6840,\n6841,6842,6843,6844,6845,6846,6847,6848,6849,6850,6851,6852,6853,6854,6855,6856,\n6857,6858,6859,6860,6861,6862,6863,6864,6865,6866,6867,6868,6869,6870,6871,6872,\n6873,6874,6875,6876,6877,6878,6879,6880,6881,6882,6883,6884,6885,6886,6887,6888,\n6889,6890,6891,6892,6893,6894,6895,6896,6897,6898,6899,6900,6901,6902,1712,6903,\n6904,6905,6906,6907,6908,6909,6910,1713,6911,6912,6913,6914,6915,6916,6917,6918,\n6919,6920,6921,6922,6923,6924,6925,6926,6927,6928,6929,6930,6931,6932,6933,6934,\n6935,6936,6937,6938,6939,6940,6941,6942,6943,6944,6945,6946,6947,6948,6949,6950,\n6951,6952,6953,6954,6955,6956,6957,6958,6959,6960,6961,6962,6963,6964,6965,6966,\n6967,6968,6969,6970,6971,6972,6973,6974,1714,6975,6976,6977,6978,6979,6980,6981,\n6982,6983,6984,6985,6986,6987,6988,1394,6989,6990,6991,6992,6993,6994,6995,6996,\n6997,6998,6999,7000,1715,7001,7002,7003,7004,7005,7006,7007,7008,7009,7010,7011,\n7012,7013,7014,7015,7016,7017,7018,7019,7020,7021,7022,7023,7024,7025,7026,7027,\n7028,1716,7029,7030,7031,7032,7033,7034,7035,7036,7037,7038,7039,7040,7041,7042,\n7043,7044,7045,7046,7047,7048,7049,7050,7051,7052,7053,7054,7055,7056,7057,7058,\n7059,7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,7071,7072,7073,7074,\n7075,7076,7077,7078,7079,7080,7081,7082,7083,7084,7085,7086,7087,7088,7089,7090,\n7091,7092,7093,7094,7095,7096,7097,7098,7099,7100,7101,7102,7103,7104,7105,7106,\n7107,7108,7109,7110,7111,7112,7113,7114,7115,7116,7117,7118,7119,7120,7121,7122,\n7123,7124,7125,7126,7127,7128,7129,7130,7131,7132,7133,7134,7135,7136,7137,7138,\n7139,7140,7141,7142,7143,7144,7145,7146,7147,7148,7149,7150,7151,7152,7153,7154,\n7155,7156,7157,7158,7159,7160,7161,7162,7163,7164,7165,7166,7167,7168,7169,7170,\n7171,7172,7173,7174,7175,7176,7177,7178,7179,7180,7181,7182,7183,7184,7185,7186,\n7187,7188,7189,7190,7191,7192,7193,7194,7195,7196,7197,7198,7199,7200,7201,7202,\n7203,7204,7205,7206,7207,1395,7208,7209,7210,7211,7212,7213,1717,7214,7215,7216,\n7217,7218,7219,7220,7221,7222,7223,7224,7225,7226,7227,7228,7229,7230,7231,7232,\n7233,7234,7235,7236,7237,7238,7239,7240,7241,7242,7243,7244,7245,7246,7247,7248,\n7249,7250,7251,7252,7253,7254,7255,7256,7257,7258,7259,7260,7261,7262,7263,7264,\n7265,7266,7267,7268,7269,7270,7271,7272,7273,7274,7275,7276,7277,7278,7279,7280,\n7281,7282,7283,7284,7285,7286,7287,7288,7289,7290,7291,7292,7293,7294,7295,7296,\n7297,7298,7299,7300,7301,7302,7303,7304,7305,7306,7307,7308,7309,7310,7311,7312,\n7313,1718,7314,7315,7316,7317,7318,7319,7320,7321,7322,7323,7324,7325,7326,7327,\n7328,7329,7330,7331,7332,7333,7334,7335,7336,7337,7338,7339,7340,7341,7342,7343,\n7344,7345,7346,7347,7348,7349,7350,7351,7352,7353,7354,7355,7356,7357,7358,7359,\n7360,7361,7362,7363,7364,7365,7366,7367,7368,7369,7370,7371,7372,7373,7374,7375,\n7376,7377,7378,7379,7380,7381,7382,7383,7384,7385,7386,7387,7388,7389,7390,7391,\n7392,7393,7394,7395,7396,7397,7398,7399,7400,7401,7402,7403,7404,7405,7406,7407,\n7408,7409,7410,7411,7412,7413,7414,7415,7416,7417,7418,7419,7420,7421,7422,7423,\n7424,7425,7426,7427,7428,7429,7430,7431,7432,7433,7434,7435,7436,7437,7438,7439,\n7440,7441,7442,7443,7444,7445,7446,7447,7448,7449,7450,7451,7452,7453,7454,7455,\n7456,7457,7458,7459,7460,7461,7462,7463,7464,7465,7466,7467,7468,7469,7470,7471,\n7472,7473,7474,7475,7476,7477,7478,7479,7480,7481,7482,7483,7484,7485,7486,7487,\n7488,7489,7490,7491,7492,7493,7494,7495,7496,7497,7498,7499,7500,7501,7502,7503,\n7504,7505,7506,7507,7508,7509,7510,7511,7512,7513,7514,7515,7516,7517,7518,7519,\n7520,7521,7522,7523,7524,7525,7526,7527,7528,7529,7530,7531,7532,7533,7534,7535,\n7536,7537,7538,7539,7540,7541,7542,7543,7544,7545,7546,7547,7548,7549,7550,7551,\n7552,7553,7554,7555,7556,7557,7558,7559,7560,7561,7562,7563,7564,7565,7566,7567,\n7568,7569,7570,7571,7572,7573,7574,7575,7576,7577,7578,7579,7580,7581,7582,7583,\n7584,7585,7586,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598,7599,\n7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614,7615,\n7616,7617,7618,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628,7629,7630,7631,\n7632,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643,7644,7645,7646,7647,\n7648,7649,7650,7651,7652,7653,7654,7655,7656,7657,7658,7659,7660,7661,7662,7663,\n7664,7665,7666,7667,7668,7669,7670,7671,7672,7673,7674,7675,7676,7677,7678,7679,\n7680,7681,7682,7683,7684,7685,7686,7687,7688,7689,7690,7691,7692,7693,7694,7695,\n7696,7697,7698,7699,7700,7701,7702,7703,7704,7705,7706,7707,7708,7709,7710,7711,\n7712,7713,7714,7715,7716,7717,7718,7719,7720,7721,7722,7723,7724,7725,7726,7727,\n7728,7729,7730,7731,7732,7733,7734,7735,7736,7737,7738,7739,7740,7741,7742,7743,\n7744,7745,7746,7747,7748,7749,7750,7751,7752,7753,7754,7755,7756,7757,7758,7759,\n7760,7761,7762,7763,7764,7765,7766,7767,7768,7769,7770,7771,7772,7773,7774,7775,\n7776,7777,7778,7779,7780,7781,7782,7783,7784,7785,7786,7787,7788,7789,7790,7791,\n7792,7793,7794,7795,7796,7797,7798,7799,7800,7801,7802,7803,7804,7805,7806,7807,\n7808,7809,7810,7811,7812,7813,7814,7815,7816,7817,7818,7819,7820,7821,7822,7823,\n7824,7825,7826,7827,7828,7829,7830,7831,7832,7833,7834,7835,7836,7837,7838,7839,\n7840,7841,7842,7843,7844,7845,7846,7847,7848,7849,7850,7851,7852,7853,7854,7855,\n7856,7857,7858,7859,7860,7861,7862,7863,7864,7865,7866,7867,7868,7869,7870,7871,\n7872,7873,7874,7875,7876,7877,7878,7879,7880,7881,7882,7883,7884,7885,7886,7887,\n7888,7889,7890,7891,7892,7893,7894,7895,7896,7897,7898,7899,7900,7901,7902,7903,\n7904,7905,7906,7907,7908,7909,7910,7911,7912,7913,7914,7915,7916,7917,7918,7919,\n7920,7921,7922,7923,7924,7925,7926,7927,7928,7929,7930,7931,7932,7933,7934,7935,\n7936,7937,7938,7939,7940,7941,7942,7943,7944,7945,7946,7947,7948,7949,7950,7951,\n7952,7953,7954,7955,7956,7957,7958,7959,7960,7961,7962,7963,7964,7965,7966,7967,\n7968,7969,7970,7971,7972,7973,7974,7975,7976,7977,7978,7979,7980,7981,7982,7983,\n7984,7985,7986,7987,7988,7989,7990,7991,7992,7993,7994,7995,7996,7997,7998,7999,\n8000,8001,8002,8003,8004,8005,8006,8007,8008,8009,8010,8011,8012,8013,8014,8015,\n8016,8017,8018,8019,8020,8021,8022,8023,8024,8025,8026,8027,8028,8029,8030,8031,\n8032,8033,8034,8035,8036,8037,8038,8039,8040,8041,8042,8043,8044,8045,8046,8047,\n8048,8049,8050,8051,8052,8053,8054,8055,8056,8057,8058,8059,8060,8061,8062,8063,\n8064,8065,8066,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8079,\n8080,8081,8082,8083,8084,8085,8086,8087,8088,8089,8090,8091,8092,8093,8094,8095,\n8096,8097,8098,8099,8100,8101,8102,8103,8104,8105,8106,8107,8108,8109,8110,8111,\n8112,8113,8114,8115,8116,8117,8118,8119,8120,8121,8122,8123,8124,8125,8126,8127,\n8128,8129,8130,8131,8132,8133,8134,8135,8136,8137,8138,8139,8140,8141,8142,8143,\n8144,8145,8146,8147,8148,8149,8150,8151,8152,8153,8154,8155,8156,8157,8158,8159,\n8160,8161,8162,8163,8164,8165,8166,8167,8168,8169,8170,8171,8172,8173,8174,8175,\n8176,8177,8178,8179,8180,8181,8182,8183,8184,8185,8186,8187,8188,8189,8190,8191,\n8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,\n8208,8209,8210,8211,8212,8213,8214,8215,8216,8217,8218,8219,8220,8221,8222,8223,\n8224,8225,8226,8227,8228,8229,8230,8231,8232,8233,8234,8235,8236,8237,8238,8239,\n8240,8241,8242,8243,8244,8245,8246,8247,8248,8249,8250,8251,8252,8253,8254,8255,\n8256,8257,8258,8259,8260,8261,8262,8263,8264,8265,8266,8267,8268,8269,8270,8271,\n8272,8273,8274,8275,8276,8277,8278,8279,8280,8281,8282,8283,8284,8285,8286,8287,\n8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,\n8304,8305,8306,8307,8308,8309,8310,8311,8312,8313,8314,8315,8316,8317,8318,8319,\n8320,8321,8322,8323,8324,8325,8326,8327,8328,8329,8330,8331,8332,8333,8334,8335,\n8336,8337,8338,8339,8340,8341,8342,8343,8344,8345,8346,8347,8348,8349,8350,8351,\n8352,8353,8354,8355,8356,8357,8358,8359,8360,8361,8362,8363,8364,8365,8366,8367,\n8368,8369,8370,8371,8372,8373,8374,8375,8376,8377,8378,8379,8380,8381,8382,8383,\n8384,8385,8386,8387,8388,8389,8390,8391,8392,8393,8394,8395,8396,8397,8398,8399,\n8400,8401,8402,8403,8404,8405,8406,8407,8408,8409,8410,8411,8412,8413,8414,8415,\n8416,8417,8418,8419,8420,8421,8422,8423,8424,8425,8426,8427,8428,8429,8430,8431,\n8432,8433,8434,8435,8436,8437,8438,8439,8440,8441,8442,8443,8444,8445,8446,8447,\n8448,8449,8450,8451,8452,8453,8454,8455,8456,8457,8458,8459,8460,8461,8462,8463,\n8464,8465,8466,8467,8468,8469,8470,8471,8472,8473,8474,8475,8476,8477,8478,8479,\n8480,8481,8482,8483,8484,8485,8486,8487,8488,8489,8490,8491,8492,8493,8494,8495,\n8496,8497,8498,8499,8500,8501,8502,8503,8504,8505,8506,8507,8508,8509,8510,8511,\n8512,8513,8514,8515,8516,8517,8518,8519,8520,8521,8522,8523,8524,8525,8526,8527,\n8528,8529,8530,8531,8532,8533,8534,8535,8536,8537,8538,8539,8540,8541,8542,8543,\n8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554,8555,8556,8557,8558,8559,\n8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,8570,8571,8572,8573,8574,8575,\n8576,8577,8578,8579,8580,8581,8582,8583,8584,8585,8586,8587,8588,8589,8590,8591,\n8592,8593,8594,8595,8596,8597,8598,8599,8600,8601,8602,8603,8604,8605,8606,8607,\n8608,8609,8610,8611,8612,8613,8614,8615,8616,8617,8618,8619,8620,8621,8622,8623,\n8624,8625,8626,8627,8628,8629,8630,8631,8632,8633,8634,8635,8636,8637,8638,8639,\n8640,8641,8642,8643,8644,8645,8646,8647,8648,8649,8650,8651,8652,8653,8654,8655,\n8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,\n8672,8673,8674,8675,8676,8677,8678,8679,8680,8681,8682,8683,8684,8685,8686,8687,\n8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699,8700,8701,8702,8703,\n8704,8705,8706,8707,8708,8709,8710,8711,8712,8713,8714,8715,8716,8717,8718,8719,\n8720,8721,8722,8723,8724,8725,8726,8727,8728,8729,8730,8731,8732,8733,8734,8735,\n8736,8737,8738,8739,8740,8741\n****************************************************************************************/\n};\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/EUCTWFreq.tab",
    "content": "/**\n * @file    EUCTWFreq.tab\n * @brief   EUCTWFreq\n * @license GPL 2.0/LGPL 2.1\n */\n\n// EUCTW frequency table\n// Converted from big5 work \n// by Taiwan's Mandarin Promotion Council \n// <http://www.edu.tw:81/mandr/>\n\n\n/******************************************************************************\n * 128  --> 0.42261\n * 256  --> 0.57851\n * 512  --> 0.74851\n * 1024 --> 0.89384\n * 2048 --> 0.97583\n *\n * Idea Distribution Ratio = 0.74851/(1-0.74851) =2.98\n * Random Distribution Ration = 512/(5401-512)=0.105\n * \n * Typical Distribution Ratio about 25% of Ideal one, still much higher than RDR\n *****************************************************************************/\n\n#define EUCTW_TYPICAL_DISTRIBUTION_RATIO (float)0.75\n\n// Char to FreqOrder table\nstatic const PRInt16 EUCTWCharToFreqOrder[] =\n{\n   1,1800,1506, 255,1431, 198,   9,  82,   6,7310, 177, 202,3615,1256,2808, 110, // 2742\n3735,  33,3241, 261,  76,  44,2113,  16,2931,2184,1176, 659,3868,  26,3404,2643, // 2758\n1198,3869,3313,4060, 410,2211, 302, 590, 361,1963,   8, 204,  58,4296,7311,1931, // 2774\n  63,7312,7313, 317,1614,  75, 222, 159,4061,2412,1480,7314,3500,3068, 224,2809, // 2790\n3616,   3,  10,3870,1471,  29,2774,1135,2852,1939, 873, 130,3242,1123, 312,7315, // 2806\n4297,2051, 507, 252, 682,7316, 142,1914, 124, 206,2932,  34,3501,3173,  64, 604, // 2822\n7317,2494,1976,1977, 155,1990, 645, 641,1606,7318,3405, 337,  72, 406,7319,  80, // 2838\n 630, 238,3174,1509, 263, 939,1092,2644, 756,1440,1094,3406, 449,  69,2969, 591, // 2854\n 179,2095, 471, 115,2034,1843,  60,  50,2970, 134, 806,1868, 734,2035,3407, 180, // 2870\n 995,1607, 156, 537,2893, 688,7320, 319,1305, 779,2144, 514,2374, 298,4298, 359, // 2886\n2495,  90,2707,1338, 663,  11, 906,1099,2545,  20,2436, 182, 532,1716,7321, 732, // 2902\n1376,4062,1311,1420,3175,  25,2312,1056, 113, 399, 382,1949, 242,3408,2467, 529, // 2918\n3243, 475,1447,3617,7322, 117,  21, 656, 810,1297,2295,2329,3502,7323, 126,4063, // 2934\n 706, 456, 150, 613,4299,  71,1118,2036,4064, 145,3069,  85, 835, 486,2114,1246, // 2950\n1426, 428, 727,1285,1015, 800, 106, 623, 303,1281,7324,2127,2354, 347,3736, 221, // 2966\n3503,3110,7325,1955,1153,4065,  83, 296,1199,3070, 192, 624,  93,7326, 822,1897, // 2982\n2810,3111, 795,2064, 991,1554,1542,1592,  27,  43,2853, 859, 139,1456, 860,4300, // 2998\n 437, 712,3871, 164,2392,3112, 695, 211,3017,2096, 195,3872,1608,3504,3505,3618, // 3014\n3873, 234, 811,2971,2097,3874,2229,1441,3506,1615,2375, 668,2076,1638, 305, 228, // 3030\n1664,4301, 467, 415,7327, 262,2098,1593, 239, 108, 300, 200,1033, 512,1247,2077, // 3046\n7328,7329,2173,3176,3619,2673, 593, 845,1062,3244,  88,1723,2037,3875,1950, 212, // 3062\n 266, 152, 149, 468,1898,4066,4302,  77, 187,7330,3018,  37,   5,2972,7331,3876, // 3078\n7332,7333,  39,2517,4303,2894,3177,2078,  55, 148,  74,4304, 545, 483,1474,1029, // 3094\n1665, 217,1869,1531,3113,1104,2645,4067,  24, 172,3507, 900,3877,3508,3509,4305, // 3110\n  32,1408,2811,1312, 329, 487,2355,2247,2708, 784,2674,   4,3019,3314,1427,1788, // 3126\n 188, 109, 499,7334,3620,1717,1789, 888,1217,3020,4306,7335,3510,7336,3315,1520, // 3142\n3621,3878, 196,1034, 775,7337,7338, 929,1815, 249, 439,  38,7339,1063,7340, 794, // 3158\n3879,1435,2296,  46, 178,3245,2065,7341,2376,7342, 214,1709,4307, 804,  35, 707, // 3174\n 324,3622,1601,2546, 140, 459,4068,7343,7344,1365, 839, 272, 978,2257,2572,3409, // 3190\n2128,1363,3623,1423, 697, 100,3071,  48,  70,1231, 495,3114,2193,7345,1294,7346, // 3206\n2079, 462, 586,1042,3246, 853, 256, 988, 185,2377,3410,1698, 434,1084,7347,3411, // 3222\n 314,2615,2775,4308,2330,2331, 569,2280, 637,1816,2518, 757,1162,1878,1616,3412, // 3238\n 287,1577,2115, 768,4309,1671,2854,3511,2519,1321,3737, 909,2413,7348,4069, 933, // 3254\n3738,7349,2052,2356,1222,4310, 765,2414,1322, 786,4311,7350,1919,1462,1677,2895, // 3270\n1699,7351,4312,1424,2437,3115,3624,2590,3316,1774,1940,3413,3880,4070, 309,1369, // 3286\n1130,2812, 364,2230,1653,1299,3881,3512,3882,3883,2646, 525,1085,3021, 902,2000, // 3302\n1475, 964,4313, 421,1844,1415,1057,2281, 940,1364,3116, 376,4314,4315,1381,   7, // 3318\n2520, 983,2378, 336,1710,2675,1845, 321,3414, 559,1131,3022,2742,1808,1132,1313, // 3334\n 265,1481,1857,7352, 352,1203,2813,3247, 167,1089, 420,2814, 776, 792,1724,3513, // 3350\n4071,2438,3248,7353,4072,7354, 446, 229, 333,2743, 901,3739,1200,1557,4316,2647, // 3366\n1920, 395,2744,2676,3740,4073,1835, 125, 916,3178,2616,4317,7355,7356,3741,7357, // 3382\n7358,7359,4318,3117,3625,1133,2547,1757,3415,1510,2313,1409,3514,7360,2145, 438, // 3398\n2591,2896,2379,3317,1068, 958,3023, 461, 311,2855,2677,4074,1915,3179,4075,1978, // 3414\n 383, 750,2745,2617,4076, 274, 539, 385,1278,1442,7361,1154,1964, 384, 561, 210, // 3430\n  98,1295,2548,3515,7362,1711,2415,1482,3416,3884,2897,1257, 129,7363,3742, 642, // 3446\n 523,2776,2777,2648,7364, 141,2231,1333,  68, 176, 441, 876, 907,4077, 603,2592, // 3462\n 710, 171,3417, 404, 549,  18,3118,2393,1410,3626,1666,7365,3516,4319,2898,4320, // 3478\n7366,2973, 368,7367, 146, 366,  99, 871,3627,1543, 748, 807,1586,1185,  22,2258, // 3494\n 379,3743,3180,7368,3181, 505,1941,2618,1991,1382,2314,7369, 380,2357, 218, 702, // 3510\n1817,1248,3418,3024,3517,3318,3249,7370,2974,3628, 930,3250,3744,7371,  59,7372, // 3526\n 585, 601,4078, 497,3419,1112,1314,4321,1801,7373,1223,1472,2174,7374, 749,1836, // 3542\n 690,1899,3745,1772,3885,1476, 429,1043,1790,2232,2116, 917,4079, 447,1086,1629, // 3558\n7375, 556,7376,7377,2020,1654, 844,1090, 105, 550, 966,1758,2815,1008,1782, 686, // 3574\n1095,7378,2282, 793,1602,7379,3518,2593,4322,4080,2933,2297,4323,3746, 980,2496, // 3590\n 544, 353, 527,4324, 908,2678,2899,7380, 381,2619,1942,1348,7381,1341,1252, 560, // 3606\n3072,7382,3420,2856,7383,2053, 973, 886,2080, 143,4325,7384,7385, 157,3886, 496, // 3622\n4081,  57, 840, 540,2038,4326,4327,3421,2117,1445, 970,2259,1748,1965,2081,4082, // 3638\n3119,1234,1775,3251,2816,3629, 773,1206,2129,1066,2039,1326,3887,1738,1725,4083, // 3654\n 279,3120,  51,1544,2594, 423,1578,2130,2066, 173,4328,1879,7386,7387,1583, 264, // 3670\n 610,3630,4329,2439, 280, 154,7388,7389,7390,1739, 338,1282,3073, 693,2857,1411, // 3686\n1074,3747,2440,7391,4330,7392,7393,1240, 952,2394,7394,2900,1538,2679, 685,1483, // 3702\n4084,2468,1436, 953,4085,2054,4331, 671,2395,  79,4086,2441,3252, 608, 567,2680, // 3718\n3422,4087,4088,1691, 393,1261,1791,2396,7395,4332,7396,7397,7398,7399,1383,1672, // 3734\n3748,3182,1464, 522,1119, 661,1150, 216, 675,4333,3888,1432,3519, 609,4334,2681, // 3750\n2397,7400,7401,7402,4089,3025,   0,7403,2469, 315, 231,2442, 301,3319,4335,2380, // 3766\n7404, 233,4090,3631,1818,4336,4337,7405,  96,1776,1315,2082,7406, 257,7407,1809, // 3782\n3632,2709,1139,1819,4091,2021,1124,2163,2778,1777,2649,7408,3074, 363,1655,3183, // 3798\n7409,2975,7410,7411,7412,3889,1567,3890, 718, 103,3184, 849,1443, 341,3320,2934, // 3814\n1484,7413,1712, 127,  67, 339,4092,2398, 679,1412, 821,7414,7415, 834, 738, 351, // 3830\n2976,2146, 846, 235,1497,1880, 418,1992,3749,2710, 186,1100,2147,2746,3520,1545, // 3846\n1355,2935,2858,1377, 583,3891,4093,2573,2977,7416,1298,3633,1078,2549,3634,2358, // 3862\n  78,3750,3751, 267,1289,2099,2001,1594,4094, 348, 369,1274,2194,2175,1837,4338, // 3878\n1820,2817,3635,2747,2283,2002,4339,2936,2748, 144,3321, 882,4340,3892,2749,3423, // 3894\n4341,2901,7417,4095,1726, 320,7418,3893,3026, 788,2978,7419,2818,1773,1327,2859, // 3910\n3894,2819,7420,1306,4342,2003,1700,3752,3521,2359,2650, 787,2022, 506, 824,3636, // 3926\n 534, 323,4343,1044,3322,2023,1900, 946,3424,7421,1778,1500,1678,7422,1881,4344, // 3942\n 165, 243,4345,3637,2521, 123, 683,4096, 764,4346,  36,3895,1792, 589,2902, 816, // 3958\n 626,1667,3027,2233,1639,1555,1622,3753,3896,7423,3897,2860,1370,1228,1932, 891, // 3974\n2083,2903, 304,4097,7424, 292,2979,2711,3522, 691,2100,4098,1115,4347, 118, 662, // 3990\n7425, 611,1156, 854,2381,1316,2861,   2, 386, 515,2904,7426,7427,3253, 868,2234, // 4006\n1486, 855,2651, 785,2212,3028,7428,1040,3185,3523,7429,3121, 448,7430,1525,7431, // 4022\n2164,4348,7432,3754,7433,4099,2820,3524,3122, 503, 818,3898,3123,1568, 814, 676, // 4038\n1444, 306,1749,7434,3755,1416,1030, 197,1428, 805,2821,1501,4349,7435,7436,7437, // 4054\n1993,7438,4350,7439,7440,2195,  13,2779,3638,2980,3124,1229,1916,7441,3756,2131, // 4070\n7442,4100,4351,2399,3525,7443,2213,1511,1727,1120,7444,7445, 646,3757,2443, 307, // 4086\n7446,7447,1595,3186,7448,7449,7450,3639,1113,1356,3899,1465,2522,2523,7451, 519, // 4102\n7452, 128,2132,  92,2284,1979,7453,3900,1512, 342,3125,2196,7454,2780,2214,1980, // 4118\n3323,7455, 290,1656,1317, 789, 827,2360,7456,3758,4352, 562, 581,3901,7457, 401, // 4134\n4353,2248,  94,4354,1399,2781,7458,1463,2024,4355,3187,1943,7459, 828,1105,4101, // 4150\n1262,1394,7460,4102, 605,4356,7461,1783,2862,7462,2822, 819,2101, 578,2197,2937, // 4166\n7463,1502, 436,3254,4103,3255,2823,3902,2905,3425,3426,7464,2712,2315,7465,7466, // 4182\n2332,2067,  23,4357, 193, 826,3759,2102, 699,1630,4104,3075, 390,1793,1064,3526, // 4198\n7467,1579,3076,3077,1400,7468,4105,1838,1640,2863,7469,4358,4359, 137,4106, 598, // 4214\n3078,1966, 780, 104, 974,2938,7470, 278, 899, 253, 402, 572, 504, 493,1339,7471, // 4230\n3903,1275,4360,2574,2550,7472,3640,3029,3079,2249, 565,1334,2713, 863,  41,7473, // 4246\n7474,4361,7475,1657,2333,  19, 463,2750,4107, 606,7476,2981,3256,1087,2084,1323, // 4262\n2652,2982,7477,1631,1623,1750,4108,2682,7478,2864, 791,2714,2653,2334, 232,2416, // 4278\n7479,2983,1498,7480,2654,2620, 755,1366,3641,3257,3126,2025,1609, 119,1917,3427, // 4294\n 862,1026,4109,7481,3904,3760,4362,3905,4363,2260,1951,2470,7482,1125, 817,4110, // 4310\n4111,3906,1513,1766,2040,1487,4112,3030,3258,2824,3761,3127,7483,7484,1507,7485, // 4326\n2683, 733,  40,1632,1106,2865, 345,4113, 841,2524, 230,4364,2984,1846,3259,3428, // 4342\n7486,1263, 986,3429,7487, 735, 879, 254,1137, 857, 622,1300,1180,1388,1562,3907, // 4358\n3908,2939, 967,2751,2655,1349, 592,2133,1692,3324,2985,1994,4114,1679,3909,1901, // 4374\n2185,7488, 739,3642,2715,1296,1290,7489,4115,2198,2199,1921,1563,2595,2551,1870, // 4390\n2752,2986,7490, 435,7491, 343,1108, 596,  17,1751,4365,2235,3430,3643,7492,4366, // 4406\n 294,3527,2940,1693, 477, 979, 281,2041,3528, 643,2042,3644,2621,2782,2261,1031, // 4422\n2335,2134,2298,3529,4367, 367,1249,2552,7493,3530,7494,4368,1283,3325,2004, 240, // 4438\n1762,3326,4369,4370, 836,1069,3128, 474,7495,2148,2525, 268,3531,7496,3188,1521, // 4454\n1284,7497,1658,1546,4116,7498,3532,3533,7499,4117,3327,2684,1685,4118, 961,1673, // 4470\n2622, 190,2005,2200,3762,4371,4372,7500, 570,2497,3645,1490,7501,4373,2623,3260, // 4486\n1956,4374, 584,1514, 396,1045,1944,7502,4375,1967,2444,7503,7504,4376,3910, 619, // 4502\n7505,3129,3261, 215,2006,2783,2553,3189,4377,3190,4378, 763,4119,3763,4379,7506, // 4518\n7507,1957,1767,2941,3328,3646,1174, 452,1477,4380,3329,3130,7508,2825,1253,2382, // 4534\n2186,1091,2285,4120, 492,7509, 638,1169,1824,2135,1752,3911, 648, 926,1021,1324, // 4550\n4381, 520,4382, 997, 847,1007, 892,4383,3764,2262,1871,3647,7510,2400,1784,4384, // 4566\n1952,2942,3080,3191,1728,4121,2043,3648,4385,2007,1701,3131,1551,  30,2263,4122, // 4582\n7511,2026,4386,3534,7512, 501,7513,4123, 594,3431,2165,1821,3535,3432,3536,3192, // 4598\n 829,2826,4124,7514,1680,3132,1225,4125,7515,3262,4387,4126,3133,2336,7516,4388, // 4614\n4127,7517,3912,3913,7518,1847,2383,2596,3330,7519,4389, 374,3914, 652,4128,4129, // 4630\n 375,1140, 798,7520,7521,7522,2361,4390,2264, 546,1659, 138,3031,2445,4391,7523, // 4646\n2250, 612,1848, 910, 796,3765,1740,1371, 825,3766,3767,7524,2906,2554,7525, 692, // 4662\n 444,3032,2624, 801,4392,4130,7526,1491, 244,1053,3033,4131,4132, 340,7527,3915, // 4678\n1041,2987, 293,1168,  87,1357,7528,1539, 959,7529,2236, 721, 694,4133,3768, 219, // 4694\n1478, 644,1417,3331,2656,1413,1401,1335,1389,3916,7530,7531,2988,2362,3134,1825, // 4710\n 730,1515, 184,2827,  66,4393,7532,1660,2943, 246,3332, 378,1457, 226,3433, 975, // 4726\n3917,2944,1264,3537, 674, 696,7533, 163,7534,1141,2417,2166, 713,3538,3333,4394, // 4742\n3918,7535,7536,1186,  15,7537,1079,1070,7538,1522,3193,3539, 276,1050,2716, 758, // 4758\n1126, 653,2945,3263,7539,2337, 889,3540,3919,3081,2989, 903,1250,4395,3920,3434, // 4774\n3541,1342,1681,1718, 766,3264, 286,  89,2946,3649,7540,1713,7541,2597,3334,2990, // 4790\n7542,2947,2215,3194,2866,7543,4396,2498,2526, 181, 387,1075,3921, 731,2187,3335, // 4806\n7544,3265, 310, 313,3435,2299, 770,4134,  54,3034, 189,4397,3082,3769,3922,7545, // 4822\n1230,1617,1849, 355,3542,4135,4398,3336, 111,4136,3650,1350,3135,3436,3035,4137, // 4838\n2149,3266,3543,7546,2784,3923,3924,2991, 722,2008,7547,1071, 247,1207,2338,2471, // 4854\n1378,4399,2009, 864,1437,1214,4400, 373,3770,1142,2216, 667,4401, 442,2753,2555, // 4870\n3771,3925,1968,4138,3267,1839, 837, 170,1107, 934,1336,1882,7548,7549,2118,4139, // 4886\n2828, 743,1569,7550,4402,4140, 582,2384,1418,3437,7551,1802,7552, 357,1395,1729, // 4902\n3651,3268,2418,1564,2237,7553,3083,3772,1633,4403,1114,2085,4141,1532,7554, 482, // 4918\n2446,4404,7555,7556,1492, 833,1466,7557,2717,3544,1641,2829,7558,1526,1272,3652, // 4934\n4142,1686,1794, 416,2556,1902,1953,1803,7559,3773,2785,3774,1159,2316,7560,2867, // 4950\n4405,1610,1584,3036,2419,2754, 443,3269,1163,3136,7561,7562,3926,7563,4143,2499, // 4966\n3037,4406,3927,3137,2103,1647,3545,2010,1872,4144,7564,4145, 431,3438,7565, 250, // 4982\n  97,  81,4146,7566,1648,1850,1558, 160, 848,7567, 866, 740,1694,7568,2201,2830, // 4998\n3195,4147,4407,3653,1687, 950,2472, 426, 469,3196,3654,3655,3928,7569,7570,1188, // 5014\n 424,1995, 861,3546,4148,3775,2202,2685, 168,1235,3547,4149,7571,2086,1674,4408, // 5030\n3337,3270, 220,2557,1009,7572,3776, 670,2992, 332,1208, 717,7573,7574,3548,2447, // 5046\n3929,3338,7575, 513,7576,1209,2868,3339,3138,4409,1080,7577,7578,7579,7580,2527, // 5062\n3656,3549, 815,1587,3930,3931,7581,3550,3439,3777,1254,4410,1328,3038,1390,3932, // 5078\n1741,3933,3778,3934,7582, 236,3779,2448,3271,7583,7584,3657,3780,1273,3781,4411, // 5094\n7585, 308,7586,4412, 245,4413,1851,2473,1307,2575, 430, 715,2136,2449,7587, 270, // 5110\n 199,2869,3935,7588,3551,2718,1753, 761,1754, 725,1661,1840,4414,3440,3658,7589, // 5126\n7590, 587,  14,3272, 227,2598, 326, 480,2265, 943,2755,3552, 291, 650,1883,7591, // 5142\n1702,1226, 102,1547,  62,3441, 904,4415,3442,1164,4150,7592,7593,1224,1548,2756, // 5158\n 391, 498,1493,7594,1386,1419,7595,2055,1177,4416, 813, 880,1081,2363, 566,1145, // 5174\n4417,2286,1001,1035,2558,2599,2238, 394,1286,7596,7597,2068,7598,  86,1494,1730, // 5190\n3936, 491,1588, 745, 897,2948, 843,3340,3937,2757,2870,3273,1768, 998,2217,2069, // 5206\n 397,1826,1195,1969,3659,2993,3341, 284,7599,3782,2500,2137,2119,1903,7600,3938, // 5222\n2150,3939,4151,1036,3443,1904, 114,2559,4152, 209,1527,7601,7602,2949,2831,2625, // 5238\n2385,2719,3139, 812,2560,7603,3274,7604,1559, 737,1884,3660,1210, 885,  28,2686, // 5254\n3553,3783,7605,4153,1004,1779,4418,7606, 346,1981,2218,2687,4419,3784,1742, 797, // 5270\n1642,3940,1933,1072,1384,2151, 896,3941,3275,3661,3197,2871,3554,7607,2561,1958, // 5286\n4420,2450,1785,7608,7609,7610,3942,4154,1005,1308,3662,4155,2720,4421,4422,1528, // 5302\n2600, 161,1178,4156,1982, 987,4423,1101,4157, 631,3943,1157,3198,2420,1343,1241, // 5318\n1016,2239,2562, 372, 877,2339,2501,1160, 555,1934, 911,3944,7611, 466,1170, 169, // 5334\n1051,2907,2688,3663,2474,2994,1182,2011,2563,1251,2626,7612, 992,2340,3444,1540, // 5350\n2721,1201,2070,2401,1996,2475,7613,4424, 528,1922,2188,1503,1873,1570,2364,3342, // 5366\n3276,7614, 557,1073,7615,1827,3445,2087,2266,3140,3039,3084, 767,3085,2786,4425, // 5382\n1006,4158,4426,2341,1267,2176,3664,3199, 778,3945,3200,2722,1597,2657,7616,4427, // 5398\n7617,3446,7618,7619,7620,3277,2689,1433,3278, 131,  95,1504,3946, 723,4159,3141, // 5414\n1841,3555,2758,2189,3947,2027,2104,3665,7621,2995,3948,1218,7622,3343,3201,3949, // 5430\n4160,2576, 248,1634,3785, 912,7623,2832,3666,3040,3786, 654,  53,7624,2996,7625, // 5446\n1688,4428, 777,3447,1032,3950,1425,7626, 191, 820,2120,2833, 971,4429, 931,3202, // 5462\n 135, 664, 783,3787,1997, 772,2908,1935,3951,3788,4430,2909,3203, 282,2723, 640, // 5478\n1372,3448,1127, 922, 325,3344,7627,7628, 711,2044,7629,7630,3952,2219,2787,1936, // 5494\n3953,3345,2220,2251,3789,2300,7631,4431,3790,1258,3279,3954,3204,2138,2950,3955, // 5510\n3956,7632,2221, 258,3205,4432, 101,1227,7633,3280,1755,7634,1391,3281,7635,2910, // 5526\n2056, 893,7636,7637,7638,1402,4161,2342,7639,7640,3206,3556,7641,7642, 878,1325, // 5542\n1780,2788,4433, 259,1385,2577, 744,1183,2267,4434,7643,3957,2502,7644, 684,1024, // 5558\n4162,7645, 472,3557,3449,1165,3282,3958,3959, 322,2152, 881, 455,1695,1152,1340, // 5574\n 660, 554,2153,4435,1058,4436,4163, 830,1065,3346,3960,4437,1923,7646,1703,1918, // 5590\n7647, 932,2268, 122,7648,4438, 947, 677,7649,3791,2627, 297,1905,1924,2269,4439, // 5606\n2317,3283,7650,7651,4164,7652,4165,  84,4166, 112, 989,7653, 547,1059,3961, 701, // 5622\n3558,1019,7654,4167,7655,3450, 942, 639, 457,2301,2451, 993,2951, 407, 851, 494, // 5638\n4440,3347, 927,7656,1237,7657,2421,3348, 573,4168, 680, 921,2911,1279,1874, 285, // 5654\n 790,1448,1983, 719,2167,7658,7659,4441,3962,3963,1649,7660,1541, 563,7661,1077, // 5670\n7662,3349,3041,3451, 511,2997,3964,3965,3667,3966,1268,2564,3350,3207,4442,4443, // 5686\n7663, 535,1048,1276,1189,2912,2028,3142,1438,1373,2834,2952,1134,2012,7664,4169, // 5702\n1238,2578,3086,1259,7665, 700,7666,2953,3143,3668,4170,7667,4171,1146,1875,1906, // 5718\n4444,2601,3967, 781,2422, 132,1589, 203, 147, 273,2789,2402, 898,1786,2154,3968, // 5734\n3969,7668,3792,2790,7669,7670,4445,4446,7671,3208,7672,1635,3793, 965,7673,1804, // 5750\n2690,1516,3559,1121,1082,1329,3284,3970,1449,3794,  65,1128,2835,2913,2759,1590, // 5766\n3795,7674,7675,  12,2658,  45, 976,2579,3144,4447, 517,2528,1013,1037,3209,7676, // 5782\n3796,2836,7677,3797,7678,3452,7679,2602, 614,1998,2318,3798,3087,2724,2628,7680, // 5798\n2580,4172, 599,1269,7681,1810,3669,7682,2691,3088, 759,1060, 489,1805,3351,3285, // 5814\n1358,7683,7684,2386,1387,1215,2629,2252, 490,7685,7686,4173,1759,2387,2343,7687, // 5830\n4448,3799,1907,3971,2630,1806,3210,4449,3453,3286,2760,2344, 874,7688,7689,3454, // 5846\n3670,1858,  91,2914,3671,3042,3800,4450,7690,3145,3972,2659,7691,3455,1202,1403, // 5862\n3801,2954,2529,1517,2503,4451,3456,2504,7692,4452,7693,2692,1885,1495,1731,3973, // 5878\n2365,4453,7694,2029,7695,7696,3974,2693,1216, 237,2581,4174,2319,3975,3802,4454, // 5894\n4455,2694,3560,3457, 445,4456,7697,7698,7699,7700,2761,  61,3976,3672,1822,3977, // 5910\n7701, 687,2045, 935, 925, 405,2660, 703,1096,1859,2725,4457,3978,1876,1367,2695, // 5926\n3352, 918,2105,1781,2476, 334,3287,1611,1093,4458, 564,3146,3458,3673,3353, 945, // 5942\n2631,2057,4459,7702,1925, 872,4175,7703,3459,2696,3089, 349,4176,3674,3979,4460, // 5958\n3803,4177,3675,2155,3980,4461,4462,4178,4463,2403,2046, 782,3981, 400, 251,4179, // 5974\n1624,7704,7705, 277,3676, 299,1265, 476,1191,3804,2121,4180,4181,1109, 205,7706, // 5990\n2582,1000,2156,3561,1860,7707,7708,7709,4464,7710,4465,2565, 107,2477,2157,3982, // 6006\n3460,3147,7711,1533, 541,1301, 158, 753,4182,2872,3562,7712,1696, 370,1088,4183, // 6022\n4466,3563, 579, 327, 440, 162,2240, 269,1937,1374,3461, 968,3043,  56,1396,3090, // 6038\n2106,3288,3354,7713,1926,2158,4467,2998,7714,3564,7715,7716,3677,4468,2478,7717, // 6054\n2791,7718,1650,4469,7719,2603,7720,7721,3983,2661,3355,1149,3356,3984,3805,3985, // 6070\n7722,1076,  49,7723, 951,3211,3289,3290, 450,2837, 920,7724,1811,2792,2366,4184, // 6086\n1908,1138,2367,3806,3462,7725,3212,4470,1909,1147,1518,2423,4471,3807,7726,4472, // 6102\n2388,2604, 260,1795,3213,7727,7728,3808,3291, 708,7729,3565,1704,7730,3566,1351, // 6118\n1618,3357,2999,1886, 944,4185,3358,4186,3044,3359,4187,7731,3678, 422, 413,1714, // 6134\n3292, 500,2058,2345,4188,2479,7732,1344,1910, 954,7733,1668,7734,7735,3986,2404, // 6150\n4189,3567,3809,4190,7736,2302,1318,2505,3091, 133,3092,2873,4473, 629,  31,2838, // 6166\n2697,3810,4474, 850, 949,4475,3987,2955,1732,2088,4191,1496,1852,7737,3988, 620, // 6182\n3214, 981,1242,3679,3360,1619,3680,1643,3293,2139,2452,1970,1719,3463,2168,7738, // 6198\n3215,7739,7740,3361,1828,7741,1277,4476,1565,2047,7742,1636,3568,3093,7743, 869, // 6214\n2839, 655,3811,3812,3094,3989,3000,3813,1310,3569,4477,7744,7745,7746,1733, 558, // 6230\n4478,3681, 335,1549,3045,1756,4192,3682,1945,3464,1829,1291,1192, 470,2726,2107, // 6246\n2793, 913,1054,3990,7747,1027,7748,3046,3991,4479, 982,2662,3362,3148,3465,3216, // 6262\n3217,1946,2794,7749, 571,4480,7750,1830,7751,3570,2583,1523,2424,7752,2089, 984, // 6278\n4481,3683,1959,7753,3684, 852, 923,2795,3466,3685, 969,1519, 999,2048,2320,1705, // 6294\n7754,3095, 615,1662, 151, 597,3992,2405,2321,1049, 275,4482,3686,4193, 568,3687, // 6310\n3571,2480,4194,3688,7755,2425,2270, 409,3218,7756,1566,2874,3467,1002, 769,2840, // 6326\n 194,2090,3149,3689,2222,3294,4195, 628,1505,7757,7758,1763,2177,3001,3993, 521, // 6342\n1161,2584,1787,2203,2406,4483,3994,1625,4196,4197, 412,  42,3096, 464,7759,2632, // 6358\n4484,3363,1760,1571,2875,3468,2530,1219,2204,3814,2633,2140,2368,4485,4486,3295, // 6374\n1651,3364,3572,7760,7761,3573,2481,3469,7762,3690,7763,7764,2271,2091, 460,7765, // 6390\n4487,7766,3002, 962, 588,3574, 289,3219,2634,1116,  52,7767,3047,1796,7768,7769, // 6406\n7770,1467,7771,1598,1143,3691,4198,1984,1734,1067,4488,1280,3365, 465,4489,1572, // 6422\n 510,7772,1927,2241,1812,1644,3575,7773,4490,3692,7774,7775,2663,1573,1534,7776, // 6438\n7777,4199, 536,1807,1761,3470,3815,3150,2635,7778,7779,7780,4491,3471,2915,1911, // 6454\n2796,7781,3296,1122, 377,3220,7782, 360,7783,7784,4200,1529, 551,7785,2059,3693, // 6470\n1769,2426,7786,2916,4201,3297,3097,2322,2108,2030,4492,1404, 136,1468,1479, 672, // 6486\n1171,3221,2303, 271,3151,7787,2762,7788,2049, 678,2727, 865,1947,4493,7789,2013, // 6502\n3995,2956,7790,2728,2223,1397,3048,3694,4494,4495,1735,2917,3366,3576,7791,3816, // 6518\n 509,2841,2453,2876,3817,7792,7793,3152,3153,4496,4202,2531,4497,2304,1166,1010, // 6534\n 552, 681,1887,7794,7795,2957,2958,3996,1287,1596,1861,3154, 358, 453, 736, 175, // 6550\n 478,1117, 905,1167,1097,7796,1853,1530,7797,1706,7798,2178,3472,2287,3695,3473, // 6566\n3577,4203,2092,4204,7799,3367,1193,2482,4205,1458,2190,2205,1862,1888,1421,3298, // 6582\n2918,3049,2179,3474, 595,2122,7800,3997,7801,7802,4206,1707,2636, 223,3696,1359, // 6598\n 751,3098, 183,3475,7803,2797,3003, 419,2369, 633, 704,3818,2389, 241,7804,7805, // 6614\n7806, 838,3004,3697,2272,2763,2454,3819,1938,2050,3998,1309,3099,2242,1181,7807, // 6630\n1136,2206,3820,2370,1446,4207,2305,4498,7808,7809,4208,1055,2605, 484,3698,7810, // 6646\n3999, 625,4209,2273,3368,1499,4210,4000,7811,4001,4211,3222,2274,2275,3476,7812, // 6662\n7813,2764, 808,2606,3699,3369,4002,4212,3100,2532, 526,3370,3821,4213, 955,7814, // 6678\n1620,4214,2637,2427,7815,1429,3700,1669,1831, 994, 928,7816,3578,1260,7817,7818, // 6694\n7819,1948,2288, 741,2919,1626,4215,2729,2455, 867,1184, 362,3371,1392,7820,7821, // 6710\n4003,4216,1770,1736,3223,2920,4499,4500,1928,2698,1459,1158,7822,3050,3372,2877, // 6726\n1292,1929,2506,2842,3701,1985,1187,2071,2014,2607,4217,7823,2566,2507,2169,3702, // 6742\n2483,3299,7824,3703,4501,7825,7826, 666,1003,3005,1022,3579,4218,7827,4502,1813, // 6758\n2253, 574,3822,1603, 295,1535, 705,3823,4219, 283, 858, 417,7828,7829,3224,4503, // 6774\n4504,3051,1220,1889,1046,2276,2456,4004,1393,1599, 689,2567, 388,4220,7830,2484, // 6790\n 802,7831,2798,3824,2060,1405,2254,7832,4505,3825,2109,1052,1345,3225,1585,7833, // 6806\n 809,7834,7835,7836, 575,2730,3477, 956,1552,1469,1144,2323,7837,2324,1560,2457, // 6822\n3580,3226,4005, 616,2207,3155,2180,2289,7838,1832,7839,3478,4506,7840,1319,3704, // 6838\n3705,1211,3581,1023,3227,1293,2799,7841,7842,7843,3826, 607,2306,3827, 762,2878, // 6854\n1439,4221,1360,7844,1485,3052,7845,4507,1038,4222,1450,2061,2638,4223,1379,4508, // 6870\n2585,7846,7847,4224,1352,1414,2325,2921,1172,7848,7849,3828,3829,7850,1797,1451, // 6886\n7851,7852,7853,7854,2922,4006,4007,2485,2346, 411,4008,4009,3582,3300,3101,4509, // 6902\n1561,2664,1452,4010,1375,7855,7856,  47,2959, 316,7857,1406,1591,2923,3156,7858, // 6918\n1025,2141,3102,3157, 354,2731, 884,2224,4225,2407, 508,3706, 726,3583, 996,2428, // 6934\n3584, 729,7859, 392,2191,1453,4011,4510,3707,7860,7861,2458,3585,2608,1675,2800, // 6950\n 919,2347,2960,2348,1270,4511,4012,  73,7862,7863, 647,7864,3228,2843,2255,1550, // 6966\n1346,3006,7865,1332, 883,3479,7866,7867,7868,7869,3301,2765,7870,1212, 831,1347, // 6982\n4226,4512,2326,3830,1863,3053, 720,3831,4513,4514,3832,7871,4227,7872,7873,4515, // 6998\n7874,7875,1798,4516,3708,2609,4517,3586,1645,2371,7876,7877,2924, 669,2208,2665, // 7014\n2429,7878,2879,7879,7880,1028,3229,7881,4228,2408,7882,2256,1353,7883,7884,4518, // 7030\n3158, 518,7885,4013,7886,4229,1960,7887,2142,4230,7888,7889,3007,2349,2350,3833, // 7046\n 516,1833,1454,4014,2699,4231,4519,2225,2610,1971,1129,3587,7890,2766,7891,2961, // 7062\n1422, 577,1470,3008,1524,3373,7892,7893, 432,4232,3054,3480,7894,2586,1455,2508, // 7078\n2226,1972,1175,7895,1020,2732,4015,3481,4520,7896,2733,7897,1743,1361,3055,3482, // 7094\n2639,4016,4233,4521,2290, 895, 924,4234,2170, 331,2243,3056, 166,1627,3057,1098, // 7110\n7898,1232,2880,2227,3374,4522, 657, 403,1196,2372, 542,3709,3375,1600,4235,3483, // 7126\n7899,4523,2767,3230, 576, 530,1362,7900,4524,2533,2666,3710,4017,7901, 842,3834, // 7142\n7902,2801,2031,1014,4018, 213,2700,3376, 665, 621,4236,7903,3711,2925,2430,7904, // 7158\n2431,3302,3588,3377,7905,4237,2534,4238,4525,3589,1682,4239,3484,1380,7906, 724, // 7174\n2277, 600,1670,7907,1337,1233,4526,3103,2244,7908,1621,4527,7909, 651,4240,7910, // 7190\n1612,4241,2611,7911,2844,7912,2734,2307,3058,7913, 716,2459,3059, 174,1255,2701, // 7206\n4019,3590, 548,1320,1398, 728,4020,1574,7914,1890,1197,3060,4021,7915,3061,3062, // 7222\n3712,3591,3713, 747,7916, 635,4242,4528,7917,7918,7919,4243,7920,7921,4529,7922, // 7238\n3378,4530,2432, 451,7923,3714,2535,2072,4244,2735,4245,4022,7924,1764,4531,7925, // 7254\n4246, 350,7926,2278,2390,2486,7927,4247,4023,2245,1434,4024, 488,4532, 458,4248, // 7270\n4025,3715, 771,1330,2391,3835,2568,3159,2159,2409,1553,2667,3160,4249,7928,2487, // 7286\n2881,2612,1720,2702,4250,3379,4533,7929,2536,4251,7930,3231,4252,2768,7931,2015, // 7302\n2736,7932,1155,1017,3716,3836,7933,3303,2308, 201,1864,4253,1430,7934,4026,7935, // 7318\n7936,7937,7938,7939,4254,1604,7940, 414,1865, 371,2587,4534,4535,3485,2016,3104, // 7334\n4536,1708, 960,4255, 887, 389,2171,1536,1663,1721,7941,2228,4027,2351,2926,1580, // 7350\n7942,7943,7944,1744,7945,2537,4537,4538,7946,4539,7947,2073,7948,7949,3592,3380, // 7366\n2882,4256,7950,4257,2640,3381,2802, 673,2703,2460, 709,3486,4028,3593,4258,7951, // 7382\n1148, 502, 634,7952,7953,1204,4540,3594,1575,4541,2613,3717,7954,3718,3105, 948, // 7398\n3232, 121,1745,3837,1110,7955,4259,3063,2509,3009,4029,3719,1151,1771,3838,1488, // 7414\n4030,1986,7956,2433,3487,7957,7958,2093,7959,4260,3839,1213,1407,2803, 531,2737, // 7430\n2538,3233,1011,1537,7960,2769,4261,3106,1061,7961,3720,3721,1866,2883,7962,2017, // 7446\n 120,4262,4263,2062,3595,3234,2309,3840,2668,3382,1954,4542,7963,7964,3488,1047, // 7462\n2704,1266,7965,1368,4543,2845, 649,3383,3841,2539,2738,1102,2846,2669,7966,7967, // 7478\n1999,7968,1111,3596,2962,7969,2488,3842,3597,2804,1854,3384,3722,7970,7971,3385, // 7494\n2410,2884,3304,3235,3598,7972,2569,7973,3599,2805,4031,1460, 856,7974,3600,7975, // 7510\n2885,2963,7976,2886,3843,7977,4264, 632,2510, 875,3844,1697,3845,2291,7978,7979, // 7526\n4544,3010,1239, 580,4545,4265,7980, 914, 936,2074,1190,4032,1039,2123,7981,7982, // 7542\n7983,3386,1473,7984,1354,4266,3846,7985,2172,3064,4033, 915,3305,4267,4268,3306, // 7558\n1605,1834,7986,2739, 398,3601,4269,3847,4034, 328,1912,2847,4035,3848,1331,4270, // 7574\n3011, 937,4271,7987,3602,4036,4037,3387,2160,4546,3388, 524, 742, 538,3065,1012, // 7590\n7988,7989,3849,2461,7990, 658,1103, 225,3850,7991,7992,4547,7993,4548,7994,3236, // 7606\n1243,7995,4038, 963,2246,4549,7996,2705,3603,3161,7997,7998,2588,2327,7999,4550, // 7622\n8000,8001,8002,3489,3307, 957,3389,2540,2032,1930,2927,2462, 870,2018,3604,1746, // 7638\n2770,2771,2434,2463,8003,3851,8004,3723,3107,3724,3490,3390,3725,8005,1179,3066, // 7654\n8006,3162,2373,4272,3726,2541,3163,3108,2740,4039,8007,3391,1556,2542,2292, 977, // 7670\n2887,2033,4040,1205,3392,8008,1765,3393,3164,2124,1271,1689, 714,4551,3491,8009, // 7686\n2328,3852, 533,4273,3605,2181, 617,8010,2464,3308,3492,2310,8011,8012,3165,8013, // 7702\n8014,3853,1987, 618, 427,2641,3493,3394,8015,8016,1244,1690,8017,2806,4274,4552, // 7718\n8018,3494,8019,8020,2279,1576, 473,3606,4275,3395, 972,8021,3607,8022,3067,8023, // 7734\n8024,4553,4554,8025,3727,4041,4042,8026, 153,4555, 356,8027,1891,2888,4276,2143, // 7750\n 408, 803,2352,8028,3854,8029,4277,1646,2570,2511,4556,4557,3855,8030,3856,4278, // 7766\n8031,2411,3396, 752,8032,8033,1961,2964,8034, 746,3012,2465,8035,4279,3728, 698, // 7782\n4558,1892,4280,3608,2543,4559,3609,3857,8036,3166,3397,8037,1823,1302,4043,2706, // 7798\n3858,1973,4281,8038,4282,3167, 823,1303,1288,1236,2848,3495,4044,3398, 774,3859, // 7814\n8039,1581,4560,1304,2849,3860,4561,8040,2435,2161,1083,3237,4283,4045,4284, 344, // 7830\n1173, 288,2311, 454,1683,8041,8042,1461,4562,4046,2589,8043,8044,4563, 985, 894, // 7846\n8045,3399,3168,8046,1913,2928,3729,1988,8047,2110,1974,8048,4047,8049,2571,1194, // 7862\n 425,8050,4564,3169,1245,3730,4285,8051,8052,2850,8053, 636,4565,1855,3861, 760, // 7878\n1799,8054,4286,2209,1508,4566,4048,1893,1684,2293,8055,8056,8057,4287,4288,2210, // 7894\n 479,8058,8059, 832,8060,4049,2489,8061,2965,2490,3731, 990,3109, 627,1814,2642, // 7910\n4289,1582,4290,2125,2111,3496,4567,8062, 799,4291,3170,8063,4568,2112,1737,3013, // 7926\n1018, 543, 754,4292,3309,1676,4569,4570,4050,8064,1489,8065,3497,8066,2614,2889, // 7942\n4051,8067,8068,2966,8069,8070,8071,8072,3171,4571,4572,2182,1722,8073,3238,3239, // 7958\n1842,3610,1715, 481, 365,1975,1856,8074,8075,1962,2491,4573,8076,2126,3611,3240, // 7974\n 433,1894,2063,2075,8077, 602,2741,8078,8079,8080,8081,8082,3014,1628,3400,8083, // 7990\n3172,4574,4052,2890,4575,2512,8084,2544,2772,8085,8086,8087,3310,4576,2891,8088, // 8006\n4577,8089,2851,4578,4579,1221,2967,4053,2513,8090,8091,8092,1867,1989,8093,8094, // 8022\n8095,1895,8096,8097,4580,1896,4054, 318,8098,2094,4055,4293,8099,8100, 485,8101, // 8038\n 938,3862, 553,2670, 116,8102,3863,3612,8103,3498,2671,2773,3401,3311,2807,8104, // 8054\n3613,2929,4056,1747,2930,2968,8105,8106, 207,8107,8108,2672,4581,2514,8109,3015, // 8070\n 890,3614,3864,8110,1877,3732,3402,8111,2183,2353,3403,1652,8112,8113,8114, 941, // 8086\n2294, 208,3499,4057,2019, 330,4294,3865,2892,2492,3733,4295,8115,8116,8117,8118, // 8102\n\n/*************************************************************************************** \n *Everything below is of no interest for detection purpose\t\t\t\t\t\t\t   *\n ***************************************************************************************\n\n2515,1613,4582,8119,3312,3866,2516,8120,4058,8121,1637,4059,2466,4583,3867,8122, // 8118\n2493,3016,3734,8123,8124,2192,8125,8126,2162,8127,8128,8129,8130,8131,8132,8133, // 8134\n8134,8135,8136,8137,8138,8139,8140,8141,8142,8143,8144,8145,8146,8147,8148,8149, // 8150\n8150,8151,8152,8153,8154,8155,8156,8157,8158,8159,8160,8161,8162,8163,8164,8165, // 8166\n8166,8167,8168,8169,8170,8171,8172,8173,8174,8175,8176,8177,8178,8179,8180,8181, // 8182\n8182,8183,8184,8185,8186,8187,8188,8189,8190,8191,8192,8193,8194,8195,8196,8197, // 8198\n8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8208,8209,8210,8211,8212,8213, // 8214\n8214,8215,8216,8217,8218,8219,8220,8221,8222,8223,8224,8225,8226,8227,8228,8229, // 8230\n8230,8231,8232,8233,8234,8235,8236,8237,8238,8239,8240,8241,8242,8243,8244,8245, // 8246\n8246,8247,8248,8249,8250,8251,8252,8253,8254,8255,8256,8257,8258,8259,8260,8261, // 8262\n8262,8263,8264,8265,8266,8267,8268,8269,8270,8271,8272,8273,8274,8275,8276,8277, // 8278\n8278,8279,8280,8281,8282,8283,8284,8285,8286,8287,8288,8289,8290,8291,8292,8293, // 8294\n8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,8304,8305,8306,8307,8308,8309, // 8310\n8310,8311,8312,8313,8314,8315,8316,8317,8318,8319,8320,8321,8322,8323,8324,8325, // 8326\n8326,8327,8328,8329,8330,8331,8332,8333,8334,8335,8336,8337,8338,8339,8340,8341, // 8342\n8342,8343,8344,8345,8346,8347,8348,8349,8350,8351,8352,8353,8354,8355,8356,8357, // 8358\n8358,8359,8360,8361,8362,8363,8364,8365,8366,8367,8368,8369,8370,8371,8372,8373, // 8374\n8374,8375,8376,8377,8378,8379,8380,8381,8382,8383,8384,8385,8386,8387,8388,8389, // 8390\n8390,8391,8392,8393,8394,8395,8396,8397,8398,8399,8400,8401,8402,8403,8404,8405, // 8406\n8406,8407,8408,8409,8410,8411,8412,8413,8414,8415,8416,8417,8418,8419,8420,8421, // 8422\n8422,8423,8424,8425,8426,8427,8428,8429,8430,8431,8432,8433,8434,8435,8436,8437, // 8438\n8438,8439,8440,8441,8442,8443,8444,8445,8446,8447,8448,8449,8450,8451,8452,8453, // 8454\n8454,8455,8456,8457,8458,8459,8460,8461,8462,8463,8464,8465,8466,8467,8468,8469, // 8470\n8470,8471,8472,8473,8474,8475,8476,8477,8478,8479,8480,8481,8482,8483,8484,8485, // 8486\n8486,8487,8488,8489,8490,8491,8492,8493,8494,8495,8496,8497,8498,8499,8500,8501, // 8502\n8502,8503,8504,8505,8506,8507,8508,8509,8510,8511,8512,8513,8514,8515,8516,8517, // 8518\n8518,8519,8520,8521,8522,8523,8524,8525,8526,8527,8528,8529,8530,8531,8532,8533, // 8534\n8534,8535,8536,8537,8538,8539,8540,8541,8542,8543,8544,8545,8546,8547,8548,8549, // 8550\n8550,8551,8552,8553,8554,8555,8556,8557,8558,8559,8560,8561,8562,8563,8564,8565, // 8566\n8566,8567,8568,8569,8570,8571,8572,8573,8574,8575,8576,8577,8578,8579,8580,8581, // 8582\n8582,8583,8584,8585,8586,8587,8588,8589,8590,8591,8592,8593,8594,8595,8596,8597, // 8598\n8598,8599,8600,8601,8602,8603,8604,8605,8606,8607,8608,8609,8610,8611,8612,8613, // 8614\n8614,8615,8616,8617,8618,8619,8620,8621,8622,8623,8624,8625,8626,8627,8628,8629, // 8630\n8630,8631,8632,8633,8634,8635,8636,8637,8638,8639,8640,8641,8642,8643,8644,8645, // 8646\n8646,8647,8648,8649,8650,8651,8652,8653,8654,8655,8656,8657,8658,8659,8660,8661, // 8662\n8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672,8673,8674,8675,8676,8677, // 8678\n8678,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689,8690,8691,8692,8693, // 8694\n8694,8695,8696,8697,8698,8699,8700,8701,8702,8703,8704,8705,8706,8707,8708,8709, // 8710\n8710,8711,8712,8713,8714,8715,8716,8717,8718,8719,8720,8721,8722,8723,8724,8725, // 8726\n8726,8727,8728,8729,8730,8731,8732,8733,8734,8735,8736,8737,8738,8739,8740,8741, // 8742\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //13973\n****************************************************************************************/\n};\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/GB2312Freq.tab",
    "content": "/**\n * @file    GB2312Freq.tab\n * @brief   GB2312Freq\n * @license GPL 2.0/LGPL 2.1\n */\n\n//GB2312 most frequently used character table\n\n//Char to FreqOrder table , from hz6763\n\n/******************************************************************************\n * 512  --> 0.79  -- 0.79\n * 1024 --> 0.92  -- 0.13\n * 2048 --> 0.98  -- 0.06\n * 6768 --> 1.00  -- 0.02\n *\n * Idea Distribution Ratio = 0.79135/(1-0.79135) = 3.79\n * Random Distribution Ration = 512 / (3755 - 512) = 0.157\n * \n * Typical Distribution Ratio about 25% of Ideal one, still much higher that RDR\n *****************************************************************************/\n\n#define GB2312_TYPICAL_DISTRIBUTION_RATIO (float)0.9\n\nstatic const PRInt16 GB2312CharToFreqOrder[] =\n{\n1671, 749,1443,2364,3924,3807,2330,3921,1704,3463,2691,1511,1515, 572,3191,2205,\n2361, 224,2558, 479,1711, 963,3162, 440,4060,1905,2966,2947,3580,2647,3961,3842,\n2204, 869,4207, 970,2678,5626,2944,2956,1479,4048, 514,3595, 588,1346,2820,3409,\n 249,4088,1746,1873,2047,1774, 581,1813, 358,1174,3590,1014,1561,4844,2245, 670,\n1636,3112, 889,1286, 953, 556,2327,3060,1290,3141, 613, 185,3477,1367, 850,3820,\n1715,2428,2642,2303,2732,3041,2562,2648,3566,3946,1349, 388,3098,2091,1360,3585,\n 152,1687,1539, 738,1559,  59,1232,2925,2267,1388,1249,1741,1679,2960, 151,1566,\n1125,1352,4271, 924,4296, 385,3166,4459, 310,1245,2850,  70,3285,2729,3534,3575,\n2398,3298,3466,1960,2265, 217,3647, 864,1909,2084,4401,2773,1010,3269,5152, 853,\n3051,3121,1244,4251,1895, 364,1499,1540,2313,1180,3655,2268, 562, 715,2417,3061,\n 544, 336,3768,2380,1752,4075, 950, 280,2425,4382, 183,2759,3272, 333,4297,2155,\n1688,2356,1444,1039,4540, 736,1177,3349,2443,2368,2144,2225, 565, 196,1482,3406,\n 927,1335,4147, 692, 878,1311,1653,3911,3622,1378,4200,1840,2969,3149,2126,1816,\n2534,1546,2393,2760, 737,2494,  13, 447, 245,2747,  38,2765,2129,2589,1079, 606,\n 360, 471,3755,2890, 404, 848, 699,1785,1236, 370,2221,1023,3746,2074,2026,2023,\n2388,1581,2119, 812,1141,3091,2536,1519, 804,2053, 406,1596,1090, 784, 548,4414,\n1806,2264,2936,1100, 343,4114,5096, 622,3358, 743,3668,1510,1626,5020,3567,2513,\n3195,4115,5627,2489,2991,  24,2065,2697,1087,2719,  48,1634, 315,  68, 985,2052,\n 198,2239,1347,1107,1439, 597,2366,2172, 871,3307, 919,2487,2790,1867, 236,2570,\n1413,3794, 906,3365,3381,1701,1982,1818,1524,2924,1205, 616,2586,2072,2004, 575,\n 253,3099,  32,1365,1182, 197,1714,2454,1201, 554,3388,3224,2748, 756,2587, 250,\n2567,1507,1517,3529,1922,2761,2337,3416,1961,1677,2452,2238,3153, 615, 911,1506,\n1474,2495,1265,1906,2749,3756,3280,2161, 898,2714,1759,3450,2243,2444, 563,  26,\n3286,2266,3769,3344,2707,3677, 611,1402, 531,1028,2871,4548,1375, 261,2948, 835,\n1190,4134, 353, 840,2684,1900,3082,1435,2109,1207,1674, 329,1872,2781,4055,2686,\n2104, 608,3318,2423,2957,2768,1108,3739,3512,3271,3985,2203,1771,3520,1418,2054,\n1681,1153, 225,1627,2929, 162,2050,2511,3687,1954, 124,1859,2431,1684,3032,2894,\n 585,4805,3969,2869,2704,2088,2032,2095,3656,2635,4362,2209, 256, 518,2042,2105,\n3777,3657, 643,2298,1148,1779, 190, 989,3544, 414,  11,2135,2063,2979,1471, 403,\n3678, 126, 770,1563, 671,2499,3216,2877, 600,1179, 307,2805,4937,1268,1297,2694,\n 252,4032,1448,1494,1331,1394, 127,2256, 222,1647,1035,1481,3056,1915,1048, 873,\n3651, 210,  33,1608,2516, 200,1520, 415, 102,   0,3389,1287, 817,  91,3299,2940,\n 836,1814, 549,2197,1396,1669,2987,3582,2297,2848,4528,1070, 687,  20,1819, 121,\n1552,1364,1461,1968,2617,3540,2824,2083, 177, 948,4938,2291, 110,4549,2066, 648,\n3359,1755,2110,2114,4642,4845,1693,3937,3308,1257,1869,2123, 208,1804,3159,2992,\n2531,2549,3361,2418,1350,2347,2800,2568,1291,2036,2680,  72, 842,1990, 212,1233,\n1154,1586,  75,2027,3410,4900,1823,1337,2710,2676, 728,2810,1522,3026,4995, 157,\n 755,1050,4022, 710, 785,1936,2194,2085,1406,2777,2400, 150,1250,4049,1206, 807,\n1910, 534, 529,3309,1721,1660, 274,  39,2827, 661,2670,1578, 925,3248,3815,1094,\n4278,4901,4252,  41,1150,3747,2572,2227,4501,3658,4902,3813,3357,3617,2884,2258,\n 887, 538,4187,3199,1294,2439,3042,2329,2343,2497,1255, 107, 543,1527, 521,3478,\n3568, 194,5062,  15, 961,3870,1241,1192,2664,  66,5215,3260,2111,1295,1127,2152,\n3805,4135, 901,1164,1976, 398,1278, 530,1460, 748, 904,1054,1966,1426,  53,2909,\n 509, 523,2279,1534, 536,1019, 239,1685, 460,2353, 673,1065,2401,3600,4298,2272,\n1272,2363, 284,1753,3679,4064,1695,  81, 815,2677,2757,2731,1386, 859, 500,4221,\n2190,2566, 757,1006,2519,2068,1166,1455, 337,2654,3203,1863,1682,1914,3025,1252,\n1409,1366, 847, 714,2834,2038,3209, 964,2970,1901, 885,2553,1078,1756,3049, 301,\n1572,3326, 688,2130,1996,2429,1805,1648,2930,3421,2750,3652,3088, 262,1158,1254,\n 389,1641,1812, 526,1719, 923,2073,1073,1902, 468, 489,4625,1140, 857,2375,3070,\n3319,2863, 380, 116,1328,2693,1161,2244, 273,1212,1884,2769,3011,1775,1142, 461,\n3066,1200,2147,2212, 790, 702,2695,4222,1601,1058, 434,2338,5153,3640,  67,2360,\n4099,2502, 618,3472,1329, 416,1132, 830,2782,1807,2653,3211,3510,1662, 192,2124,\n 296,3979,1739,1611,3684,  23, 118, 324, 446,1239,1225, 293,2520,3814,3795,2535,\n3116,  17,1074, 467,2692,2201, 387,2922,  45,1326,3055,1645,3659,2817, 958, 243,\n1903,2320,1339,2825,1784,3289, 356, 576, 865,2315,2381,3377,3916,1088,3122,1713,\n1655, 935, 628,4689,1034,1327, 441, 800, 720, 894,1979,2183,1528,5289,2702,1071,\n4046,3572,2399,1571,3281,  79, 761,1103, 327, 134, 758,1899,1371,1615, 879, 442,\n 215,2605,2579, 173,2048,2485,1057,2975,3317,1097,2253,3801,4263,1403,1650,2946,\n 814,4968,3487,1548,2644,1567,1285,   2, 295,2636,  97, 946,3576, 832, 141,4257,\n3273, 760,3821,3521,3156,2607, 949,1024,1733,1516,1803,1920,2125,2283,2665,3180,\n1501,2064,3560,2171,1592, 803,3518,1416, 732,3897,4258,1363,1362,2458, 119,1427,\n 602,1525,2608,1605,1639,3175, 694,3064,  10, 465,  76,2000,4846,4208, 444,3781,\n1619,3353,2206,1273,3796, 740,2483, 320,1723,2377,3660,2619,1359,1137,1762,1724,\n2345,2842,1850,1862, 912, 821,1866, 612,2625,1735,2573,3369,1093, 844,  89, 937,\n 930,1424,3564,2413,2972,1004,3046,3019,2011, 711,3171,1452,4178, 428, 801,1943,\n 432, 445,2811, 206,4136,1472, 730, 349,  73, 397,2802,2547, 998,1637,1167, 789,\n 396,3217, 154,1218, 716,1120,1780,2819,4826,1931,3334,3762,2139,1215,2627, 552,\n3664,3628,3232,1405,2383,3111,1356,2652,3577,3320,3101,1703, 640,1045,1370,1246,\n4996, 371,1575,2436,1621,2210, 984,4033,1734,2638,  16,4529, 663,2755,3255,1451,\n3917,2257,1253,1955,2234,1263,2951, 214,1229, 617, 485, 359,1831,1969, 473,2310,\n 750,2058, 165,  80,2864,2419, 361,4344,2416,2479,1134, 796,3726,1266,2943, 860,\n2715, 938, 390,2734,1313,1384, 248, 202, 877,1064,2854, 522,3907, 279,1602, 297,\n2357, 395,3740, 137,2075, 944,4089,2584,1267,3802,  62,1533,2285, 178, 176, 780,\n2440, 201,3707, 590, 478,1560,4354,2117,1075,  30,  74,4643,4004,1635,1441,2745,\n 776,2596, 238,1077,1692,1912,2844, 605, 499,1742,3947, 241,3053, 980,1749, 936,\n2640,4511,2582, 515,1543,2162,5322,2892,2993, 890,2148,1924, 665,1827,3581,1032,\n 968,3163, 339,1044,1896, 270, 583,1791,1720,4367,1194,3488,3669,  43,2523,1657,\n 163,2167, 290,1209,1622,3378, 550, 634,2508,2510, 695,2634,2384,2512,1476,1414,\n 220,1469,2341,2138,2852,3183,2900,4939,2865,3502,1211,3680, 854,3227,1299,2976,\n3172, 186,2998,1459, 443,1067,3251,1495, 321,1932,3054, 909, 753,1410,1828, 436,\n2441,1119,1587,3164,2186,1258, 227, 231,1425,1890,3200,3942, 247, 959, 725,5254,\n2741, 577,2158,2079, 929, 120, 174, 838,2813, 591,1115, 417,2024,  40,3240,1536,\n1037, 291,4151,2354, 632,1298,2406,2500,3535,1825,1846,3451, 205,1171, 345,4238,\n  18,1163, 811, 685,2208,1217, 425,1312,1508,1175,4308,2552,1033, 587,1381,3059,\n2984,3482, 340,1316,4023,3972, 792,3176, 519, 777,4690, 918, 933,4130,2981,3741,\n  90,3360,2911,2200,5184,4550, 609,3079,2030, 272,3379,2736, 363,3881,1130,1447,\n 286, 779, 357,1169,3350,3137,1630,1220,2687,2391, 747,1277,3688,2618,2682,2601,\n1156,3196,5290,4034,3102,1689,3596,3128, 874, 219,2783, 798, 508,1843,2461, 269,\n1658,1776,1392,1913,2983,3287,2866,2159,2372, 829,4076,  46,4253,2873,1889,1894,\n 915,1834,1631,2181,2318, 298, 664,2818,3555,2735, 954,3228,3117, 527,3511,2173,\n 681,2712,3033,2247,2346,3467,1652, 155,2164,3382, 113,1994, 450, 899, 494, 994,\n1237,2958,1875,2336,1926,3727, 545,1577,1550, 633,3473, 204,1305,3072,2410,1956,\n2471, 707,2134, 841,2195,2196,2663,3843,1026,4940, 990,3252,4997, 368,1092, 437,\n3212,3258,1933,1829, 675,2977,2893, 412, 943,3723,4644,3294,3283,2230,2373,5154,\n2389,2241,2661,2323,1404,2524, 593, 787, 677,3008,1275,2059, 438,2709,2609,2240,\n2269,2246,1446,  36,1568,1373,3892,1574,2301,1456,3962, 693,2276,5216,2035,1143,\n2720,1919,1797,1811,2763,4137,2597,1830,1699,1488,1198,2090, 424,1694, 312,3634,\n3390,4179,3335,2252,1214, 561,1059,3243,2295,2561, 975,5155,2321,2751,3772, 472,\n1537,3282,3398,1047,2077,2348,2878,1323,3340,3076, 690,2906,  51, 369, 170,3541,\n1060,2187,2688,3670,2541,1083,1683, 928,3918, 459, 109,4427, 599,3744,4286, 143,\n2101,2730,2490,  82,1588,3036,2121, 281,1860, 477,4035,1238,2812,3020,2716,3312,\n1530,2188,2055,1317, 843, 636,1808,1173,3495, 649, 181,1002, 147,3641,1159,2414,\n3750,2289,2795, 813,3123,2610,1136,4368,   5,3391,4541,2174, 420, 429,1728, 754,\n1228,2115,2219, 347,2223,2733, 735,1518,3003,2355,3134,1764,3948,3329,1888,2424,\n1001,1234,1972,3321,3363,1672,1021,1450,1584, 226, 765, 655,2526,3404,3244,2302,\n3665, 731, 594,2184, 319,1576, 621, 658,2656,4299,2099,3864,1279,2071,2598,2739,\n 795,3086,3699,3908,1707,2352,2402,1382,3136,2475,1465,4847,3496,3865,1085,3004,\n2591,1084, 213,2287,1963,3565,2250, 822, 793,4574,3187,1772,1789,3050, 595,1484,\n1959,2770,1080,2650, 456, 422,2996, 940,3322,4328,4345,3092,2742, 965,2784, 739,\n4124, 952,1358,2498,2949,2565, 332,2698,2378, 660,2260,2473,4194,3856,2919, 535,\n1260,2651,1208,1428,1300,1949,1303,2942, 433,2455,2450,1251,1946, 614,1269, 641,\n1306,1810,2737,3078,2912, 564,2365,1419,1415,1497,4460,2367,2185,1379,3005,1307,\n3218,2175,1897,3063, 682,1157,4040,4005,1712,1160,1941,1399, 394, 402,2952,1573,\n1151,2986,2404, 862, 299,2033,1489,3006, 346, 171,2886,3401,1726,2932, 168,2533,\n  47,2507,1030,3735,1145,3370,1395,1318,1579,3609,4560,2857,4116,1457,2529,1965,\n 504,1036,2690,2988,2405, 745,5871, 849,2397,2056,3081, 863,2359,3857,2096,  99,\n1397,1769,2300,4428,1643,3455,1978,1757,3718,1440,  35,4879,3742,1296,4228,2280,\n 160,5063,1599,2013, 166, 520,3479,1646,3345,3012, 490,1937,1545,1264,2182,2505,\n1096,1188,1369,1436,2421,1667,2792,2460,1270,2122, 727,3167,2143, 806,1706,1012,\n1800,3037, 960,2218,1882, 805, 139,2456,1139,1521, 851,1052,3093,3089, 342,2039,\n 744,5097,1468,1502,1585,2087, 223, 939, 326,2140,2577, 892,2481,1623,4077, 982,\n3708, 135,2131,  87,2503,3114,2326,1106, 876,1616, 547,2997,2831,2093,3441,4530,\n4314,   9,3256,4229,4148, 659,1462,1986,1710,2046,2913,2231,4090,4880,5255,3392,\n3274,1368,3689,4645,1477, 705,3384,3635,1068,1529,2941,1458,3782,1509, 100,1656,\n2548, 718,2339, 408,1590,2780,3548,1838,4117,3719,1345,3530, 717,3442,2778,3220,\n2898,1892,4590,3614,3371,2043,1998,1224,3483, 891, 635, 584,2559,3355, 733,1766,\n1729,1172,3789,1891,2307, 781,2982,2271,1957,1580,5773,2633,2005,4195,3097,1535,\n3213,1189,1934,5693,3262, 586,3118,1324,1598, 517,1564,2217,1868,1893,4445,3728,\n2703,3139,1526,1787,1992,3882,2875,1549,1199,1056,2224,1904,2711,5098,4287, 338,\n1993,3129,3489,2689,1809,2815,1997, 957,1855,3898,2550,3275,3057,1105,1319, 627,\n1505,1911,1883,3526, 698,3629,3456,1833,1431, 746,  77,1261,2017,2296,1977,1885,\n 125,1334,1600, 525,1798,1109,2222,1470,1945, 559,2236,1186,3443,2476,1929,1411,\n2411,3135,1777,3372,2621,1841,1613,3229, 668,1430,1839,2643,2916, 195,1989,2671,\n2358,1387, 629,3205,2293,5256,4439, 123,1310, 888,1879,4300,3021,3605,1003,1162,\n3192,2910,2010, 140,2395,2859,  55,1082,2012,2901, 662, 419,2081,1438, 680,2774,\n4654,3912,1620,1731,1625,5035,4065,2328, 512,1344, 802,5443,2163,2311,2537, 524,\n3399,  98,1155,2103,1918,2606,3925,2816,1393,2465,1504,3773,2177,3963,1478,4346,\n 180,1113,4655,3461,2028,1698, 833,2696,1235,1322,1594,4408,3623,3013,3225,2040,\n3022, 541,2881, 607,3632,2029,1665,1219, 639,1385,1686,1099,2803,3231,1938,3188,\n2858, 427, 676,2772,1168,2025, 454,3253,2486,3556, 230,1950, 580, 791,1991,1280,\n1086,1974,2034, 630, 257,3338,2788,4903,1017,  86,4790, 966,2789,1995,1696,1131,\n 259,3095,4188,1308, 179,1463,5257, 289,4107,1248,  42,3413,1725,2288, 896,1947,\n 774,4474,4254, 604,3430,4264, 392,2514,2588, 452, 237,1408,3018, 988,4531,1970,\n3034,3310, 540,2370,1562,1288,2990, 502,4765,1147,   4,1853,2708, 207, 294,2814,\n4078,2902,2509, 684,  34,3105,3532,2551, 644, 709,2801,2344, 573,1727,3573,3557,\n2021,1081,3100,4315,2100,3681, 199,2263,1837,2385, 146,3484,1195,2776,3949, 997,\n1939,3973,1008,1091,1202,1962,1847,1149,4209,5444,1076, 493, 117,5400,2521, 972,\n1490,2934,1796,4542,2374,1512,2933,2657, 413,2888,1135,2762,2314,2156,1355,2369,\n 766,2007,2527,2170,3124,2491,2593,2632,4757,2437, 234,3125,3591,1898,1750,1376,\n1942,3468,3138, 570,2127,2145,3276,4131, 962, 132,1445,4196,  19, 941,3624,3480,\n3366,1973,1374,4461,3431,2629, 283,2415,2275, 808,2887,3620,2112,2563,1353,3610,\n 955,1089,3103,1053,  96,  88,4097, 823,3808,1583, 399, 292,4091,3313, 421,1128,\n 642,4006, 903,2539,1877,2082, 596,  29,4066,1790, 722,2157, 130, 995,1569, 769,\n1485, 464, 513,2213, 288,1923,1101,2453,4316, 133, 486,2445,  50, 625, 487,2207,\n  57, 423, 481,2962, 159,3729,1558, 491, 303, 482, 501, 240,2837, 112,3648,2392,\n1783, 362,   8,3433,3422, 610,2793,3277,1390,1284,1654,  21,3823, 734, 367, 623,\n 193, 287, 374,1009,1483, 816, 476, 313,2255,2340,1262,2150,2899,1146,2581, 782,\n2116,1659,2018,1880, 255,3586,3314,1110,2867,2137,2564, 986,2767,5185,2006, 650,\n 158, 926, 762, 881,3157,2717,2362,3587, 306,3690,3245,1542,3077,2427,1691,2478,\n2118,2985,3490,2438, 539,2305, 983, 129,1754, 355,4201,2386, 827,2923, 104,1773,\n2838,2771, 411,2905,3919, 376, 767, 122,1114, 828,2422,1817,3506, 266,3460,1007,\n1609,4998, 945,2612,4429,2274, 726,1247,1964,2914,2199,2070,4002,4108, 657,3323,\n1422, 579, 455,2764,4737,1222,2895,1670, 824,1223,1487,2525, 558, 861,3080, 598,\n2659,2515,1967, 752,2583,2376,2214,4180, 977, 704,2464,4999,2622,4109,1210,2961,\n 819,1541, 142,2284,  44, 418, 457,1126,3730,4347,4626,1644,1876,3671,1864, 302,\n1063,5694, 624, 723,1984,3745,1314,1676,2488,1610,1449,3558,3569,2166,2098, 409,\n1011,2325,3704,2306, 818,1732,1383,1824,1844,3757, 999,2705,3497,1216,1423,2683,\n2426,2954,2501,2726,2229,1475,2554,5064,1971,1794,1666,2014,1343, 783, 724, 191,\n2434,1354,2220,5065,1763,2752,2472,4152, 131, 175,2885,3434,  92,1466,4920,2616,\n3871,3872,3866, 128,1551,1632, 669,1854,3682,4691,4125,1230, 188,2973,3290,1302,\n1213, 560,3266, 917, 763,3909,3249,1760, 868,1958, 764,1782,2097, 145,2277,3774,\n4462,  64,1491,3062, 971,2132,3606,2442, 221,1226,1617, 218, 323,1185,3207,3147,\n 571, 619,1473,1005,1744,2281, 449,1887,2396,3685, 275, 375,3816,1743,3844,3731,\n 845,1983,2350,4210,1377, 773, 967,3499,3052,3743,2725,4007,1697,1022,3943,1464,\n3264,2855,2722,1952,1029,2839,2467,  84,4383,2215, 820,1391,2015,2448,3672, 377,\n1948,2168, 797,2545,3536,2578,2645,  94,2874,1678, 405,1259,3071, 771, 546,1315,\n 470,1243,3083, 895,2468, 981, 969,2037, 846,4181, 653,1276,2928,  14,2594, 557,\n3007,2474, 156, 902,1338,1740,2574, 537,2518, 973,2282,2216,2433,1928, 138,2903,\n1293,2631,1612, 646,3457, 839,2935, 111, 496,2191,2847, 589,3186, 149,3994,2060,\n4031,2641,4067,3145,1870,  37,3597,2136,1025,2051,3009,3383,3549,1121,1016,3261,\n1301, 251,2446,2599,2153, 872,3246, 637, 334,3705, 831, 884, 921,3065,3140,4092,\n2198,1944, 246,2964, 108,2045,1152,1921,2308,1031, 203,3173,4170,1907,3890, 810,\n1401,2003,1690, 506, 647,1242,2828,1761,1649,3208,2249,1589,3709,2931,5156,1708,\n 498, 666,2613, 834,3817,1231, 184,2851,1124, 883,3197,2261,3710,1765,1553,2658,\n1178,2639,2351,  93,1193, 942,2538,2141,4402, 235,1821, 870,1591,2192,1709,1871,\n3341,1618,4126,2595,2334, 603, 651,  69, 701, 268,2662,3411,2555,1380,1606, 503,\n 448, 254,2371,2646, 574,1187,2309,1770, 322,2235,1292,1801, 305, 566,1133, 229,\n2067,2057, 706, 167, 483,2002,2672,3295,1820,3561,3067, 316, 378,2746,3452,1112,\n 136,1981, 507,1651,2917,1117, 285,4591, 182,2580,3522,1304, 335,3303,1835,2504,\n1795,1792,2248, 674,1018,2106,2449,1857,2292,2845, 976,3047,1781,2600,2727,1389,\n1281,  52,3152, 153, 265,3950, 672,3485,3951,4463, 430,1183, 365, 278,2169,  27,\n1407,1336,2304, 209,1340,1730,2202,1852,2403,2883, 979,1737,1062, 631,2829,2542,\n3876,2592, 825,2086,2226,3048,3625, 352,1417,3724, 542, 991, 431,1351,3938,1861,\n2294, 826,1361,2927,3142,3503,1738, 463,2462,2723, 582,1916,1595,2808, 400,3845,\n3891,2868,3621,2254,  58,2492,1123, 910,2160,2614,1372,1603,1196,1072,3385,1700,\n3267,1980, 696, 480,2430, 920, 799,1570,2920,1951,2041,4047,2540,1321,4223,2469,\n3562,2228,1271,2602, 401,2833,3351,2575,5157, 907,2312,1256, 410, 263,3507,1582,\n 996, 678,1849,2316,1480, 908,3545,2237, 703,2322, 667,1826,2849,1531,2604,2999,\n2407,3146,2151,2630,1786,3711, 469,3542, 497,3899,2409, 858, 837,4446,3393,1274,\n 786, 620,1845,2001,3311, 484, 308,3367,1204,1815,3691,2332,1532,2557,1842,2020,\n2724,1927,2333,4440, 567,  22,1673,2728,4475,1987,1858,1144,1597, 101,1832,3601,\n  12, 974,3783,4391, 951,1412,   1,3720, 453,4608,4041, 528,1041,1027,3230,2628,\n1129, 875,1051,3291,1203,2262,1069,2860,2799,2149,2615,3278, 144,1758,3040,  31,\n 475,1680, 366,2685,3184, 311,1642,4008,2466,5036,1593,1493,2809, 216,1420,1668,\n 233, 304,2128,3284, 232,1429,1768,1040,2008,3407,2740,2967,2543, 242,2133, 778,\n1565,2022,2620, 505,2189,2756,1098,2273, 372,1614, 708, 553,2846,2094,2278, 169,\n3626,2835,4161, 228,2674,3165, 809,1454,1309, 466,1705,1095, 900,3423, 880,2667,\n3751,5258,2317,3109,2571,4317,2766,1503,1342, 866,4447,1118,  63,2076, 314,1881,\n1348,1061, 172, 978,3515,1747, 532, 511,3970,   6, 601, 905,2699,3300,1751, 276,\n1467,3725,2668,  65,4239,2544,2779,2556,1604, 578,2451,1802, 992,2331,2624,1320,\n3446, 713,1513,1013, 103,2786,2447,1661, 886,1702, 916, 654,3574,2031,1556, 751,\n2178,2821,2179,1498,1538,2176, 271, 914,2251,2080,1325, 638,1953,2937,3877,2432,\n2754,  95,3265,1716, 260,1227,4083, 775, 106,1357,3254, 426,1607, 555,2480, 772,\n1985, 244,2546, 474, 495,1046,2611,1851,2061,  71,2089,1675,2590, 742,3758,2843,\n3222,1433, 267,2180,2576,2826,2233,2092,3913,2435, 956,1745,3075, 856,2113,1116,\n 451,   3,1988,2896,1398, 993,2463,1878,2049,1341,2718,2721,2870,2108, 712,2904,\n4363,2753,2324, 277,2872,2349,2649, 384, 987, 435, 691,3000, 922, 164,3939, 652,\n1500,1184,4153,2482,3373,2165,4848,2335,3775,3508,3154,2806,2830,1554,2102,1664,\n2530,1434,2408, 893,1547,2623,3447,2832,2242,2532,3169,2856,3223,2078,  49,3770,\n3469, 462, 318, 656,2259,3250,3069, 679,1629,2758, 344,1138,1104,3120,1836,1283,\n3115,2154,1437,4448, 934, 759,1999, 794,2862,1038, 533,2560,1722,2342, 855,2626,\n1197,1663,4476,3127,  85,4240,2528,  25,1111,1181,3673, 407,3470,4561,2679,2713,\n 768,1925,2841,3986,1544,1165, 932, 373,1240,2146,1930,2673, 721,4766, 354,4333,\n 391,2963, 187,  61,3364,1442,1102, 330,1940,1767, 341,3809,4118, 393,2496,2062,\n2211, 105, 331, 300, 439, 913,1332, 626, 379,3304,1557, 328, 689,3952, 309,1555,\n 931, 317,2517,3027, 325, 569, 686,2107,3084,  60,1042,1333,2794, 264,3177,4014,\n1628, 258,3712,   7,4464,1176,1043,1778, 683, 114,1975,  78,1492, 383,1886, 510,\n 386, 645,5291,2891,2069,3305,4138,3867,2939,2603,2493,1935,1066,1848,3588,1015,\n1282,1289,4609, 697,1453,3044,2666,3611,1856,2412,  54, 719,1330, 568,3778,2459,\n1748, 788, 492, 551,1191,1000, 488,3394,3763, 282,1799, 348,2016,1523,3155,2390,\n1049, 382,2019,1788,1170, 729,2968,3523, 897,3926,2785,2938,3292, 350,2319,3238,\n1718,1717,2655,3453,3143,4465, 161,2889,2980,2009,1421,  56,1908,1640,2387,2232,\n1917,1874,2477,4921, 148,  83,3438, 592,4245,2882,1822,1055, 741, 115,1496,1624,\n 381,1638,4592,1020, 516,3214, 458, 947,4575,1432, 211,1514,2926,1865,2142, 189,\n 852,1221,1400,1486, 882,2299,4036, 351,  28,1122, 700,6479,6480,6481,6482,6483,  //last 512\n\n/*************************************************************************************** \n *Everything below is of no interest for detection purpose\t\t\t\t\t\t\t   *\n ***************************************************************************************\n\n5508,6484,3900,3414,3974,4441,4024,3537,4037,5628,5099,3633,6485,3148,6486,3636,\n5509,3257,5510,5973,5445,5872,4941,4403,3174,4627,5873,6276,2286,4230,5446,5874,\n5122,6102,6103,4162,5447,5123,5323,4849,6277,3980,3851,5066,4246,5774,5067,6278,\n3001,2807,5695,3346,5775,5974,5158,5448,6487,5975,5976,5776,3598,6279,5696,4806,\n4211,4154,6280,6488,6489,6490,6281,4212,5037,3374,4171,6491,4562,4807,4722,4827,\n5977,6104,4532,4079,5159,5324,5160,4404,3858,5359,5875,3975,4288,4610,3486,4512,\n5325,3893,5360,6282,6283,5560,2522,4231,5978,5186,5449,2569,3878,6284,5401,3578,\n4415,6285,4656,5124,5979,2506,4247,4449,3219,3417,4334,4969,4329,6492,4576,4828,\n4172,4416,4829,5402,6286,3927,3852,5361,4369,4830,4477,4867,5876,4173,6493,6105,\n4657,6287,6106,5877,5450,6494,4155,4868,5451,3700,5629,4384,6288,6289,5878,3189,\n4881,6107,6290,6495,4513,6496,4692,4515,4723,5100,3356,6497,6291,3810,4080,5561,\n3570,4430,5980,6498,4355,5697,6499,4724,6108,6109,3764,4050,5038,5879,4093,3226,\n6292,5068,5217,4693,3342,5630,3504,4831,4377,4466,4309,5698,4431,5777,6293,5778,\n4272,3706,6110,5326,3752,4676,5327,4273,5403,4767,5631,6500,5699,5880,3475,5039,\n6294,5562,5125,4348,4301,4482,4068,5126,4593,5700,3380,3462,5981,5563,3824,5404,\n4970,5511,3825,4738,6295,6501,5452,4516,6111,5881,5564,6502,6296,5982,6503,4213,\n4163,3454,6504,6112,4009,4450,6113,4658,6297,6114,3035,6505,6115,3995,4904,4739,\n4563,4942,4110,5040,3661,3928,5362,3674,6506,5292,3612,4791,5565,4149,5983,5328,\n5259,5021,4725,4577,4564,4517,4364,6298,5405,4578,5260,4594,4156,4157,5453,3592,\n3491,6507,5127,5512,4709,4922,5984,5701,4726,4289,6508,4015,6116,5128,4628,3424,\n4241,5779,6299,4905,6509,6510,5454,5702,5780,6300,4365,4923,3971,6511,5161,3270,\n3158,5985,4100, 867,5129,5703,6117,5363,3695,3301,5513,4467,6118,6512,5455,4232,\n4242,4629,6513,3959,4478,6514,5514,5329,5986,4850,5162,5566,3846,4694,6119,5456,\n4869,5781,3779,6301,5704,5987,5515,4710,6302,5882,6120,4392,5364,5705,6515,6121,\n6516,6517,3736,5988,5457,5989,4695,2457,5883,4551,5782,6303,6304,6305,5130,4971,\n6122,5163,6123,4870,3263,5365,3150,4871,6518,6306,5783,5069,5706,3513,3498,4409,\n5330,5632,5366,5458,5459,3991,5990,4502,3324,5991,5784,3696,4518,5633,4119,6519,\n4630,5634,4417,5707,4832,5992,3418,6124,5993,5567,4768,5218,6520,4595,3458,5367,\n6125,5635,6126,4202,6521,4740,4924,6307,3981,4069,4385,6308,3883,2675,4051,3834,\n4302,4483,5568,5994,4972,4101,5368,6309,5164,5884,3922,6127,6522,6523,5261,5460,\n5187,4164,5219,3538,5516,4111,3524,5995,6310,6311,5369,3181,3386,2484,5188,3464,\n5569,3627,5708,6524,5406,5165,4677,4492,6312,4872,4851,5885,4468,5996,6313,5709,\n5710,6128,2470,5886,6314,5293,4882,5785,3325,5461,5101,6129,5711,5786,6525,4906,\n6526,6527,4418,5887,5712,4808,2907,3701,5713,5888,6528,3765,5636,5331,6529,6530,\n3593,5889,3637,4943,3692,5714,5787,4925,6315,6130,5462,4405,6131,6132,6316,5262,\n6531,6532,5715,3859,5716,5070,4696,5102,3929,5788,3987,4792,5997,6533,6534,3920,\n4809,5000,5998,6535,2974,5370,6317,5189,5263,5717,3826,6536,3953,5001,4883,3190,\n5463,5890,4973,5999,4741,6133,6134,3607,5570,6000,4711,3362,3630,4552,5041,6318,\n6001,2950,2953,5637,4646,5371,4944,6002,2044,4120,3429,6319,6537,5103,4833,6538,\n6539,4884,4647,3884,6003,6004,4758,3835,5220,5789,4565,5407,6540,6135,5294,4697,\n4852,6320,6321,3206,4907,6541,6322,4945,6542,6136,6543,6323,6005,4631,3519,6544,\n5891,6545,5464,3784,5221,6546,5571,4659,6547,6324,6137,5190,6548,3853,6549,4016,\n4834,3954,6138,5332,3827,4017,3210,3546,4469,5408,5718,3505,4648,5790,5131,5638,\n5791,5465,4727,4318,6325,6326,5792,4553,4010,4698,3439,4974,3638,4335,3085,6006,\n5104,5042,5166,5892,5572,6327,4356,4519,5222,5573,5333,5793,5043,6550,5639,5071,\n4503,6328,6139,6551,6140,3914,3901,5372,6007,5640,4728,4793,3976,3836,4885,6552,\n4127,6553,4451,4102,5002,6554,3686,5105,6555,5191,5072,5295,4611,5794,5296,6556,\n5893,5264,5894,4975,5466,5265,4699,4976,4370,4056,3492,5044,4886,6557,5795,4432,\n4769,4357,5467,3940,4660,4290,6141,4484,4770,4661,3992,6329,4025,4662,5022,4632,\n4835,4070,5297,4663,4596,5574,5132,5409,5895,6142,4504,5192,4664,5796,5896,3885,\n5575,5797,5023,4810,5798,3732,5223,4712,5298,4084,5334,5468,6143,4052,4053,4336,\n4977,4794,6558,5335,4908,5576,5224,4233,5024,4128,5469,5225,4873,6008,5045,4729,\n4742,4633,3675,4597,6559,5897,5133,5577,5003,5641,5719,6330,6560,3017,2382,3854,\n4406,4811,6331,4393,3964,4946,6561,2420,3722,6562,4926,4378,3247,1736,4442,6332,\n5134,6333,5226,3996,2918,5470,4319,4003,4598,4743,4744,4485,3785,3902,5167,5004,\n5373,4394,5898,6144,4874,1793,3997,6334,4085,4214,5106,5642,4909,5799,6009,4419,\n4189,3330,5899,4165,4420,5299,5720,5227,3347,6145,4081,6335,2876,3930,6146,3293,\n3786,3910,3998,5900,5300,5578,2840,6563,5901,5579,6147,3531,5374,6564,6565,5580,\n4759,5375,6566,6148,3559,5643,6336,6010,5517,6337,6338,5721,5902,3873,6011,6339,\n6567,5518,3868,3649,5722,6568,4771,4947,6569,6149,4812,6570,2853,5471,6340,6341,\n5644,4795,6342,6012,5723,6343,5724,6013,4349,6344,3160,6150,5193,4599,4514,4493,\n5168,4320,6345,4927,3666,4745,5169,5903,5005,4928,6346,5725,6014,4730,4203,5046,\n4948,3395,5170,6015,4150,6016,5726,5519,6347,5047,3550,6151,6348,4197,4310,5904,\n6571,5581,2965,6152,4978,3960,4291,5135,6572,5301,5727,4129,4026,5905,4853,5728,\n5472,6153,6349,4533,2700,4505,5336,4678,3583,5073,2994,4486,3043,4554,5520,6350,\n6017,5800,4487,6351,3931,4103,5376,6352,4011,4321,4311,4190,5136,6018,3988,3233,\n4350,5906,5645,4198,6573,5107,3432,4191,3435,5582,6574,4139,5410,6353,5411,3944,\n5583,5074,3198,6575,6354,4358,6576,5302,4600,5584,5194,5412,6577,6578,5585,5413,\n5303,4248,5414,3879,4433,6579,4479,5025,4854,5415,6355,4760,4772,3683,2978,4700,\n3797,4452,3965,3932,3721,4910,5801,6580,5195,3551,5907,3221,3471,3029,6019,3999,\n5908,5909,5266,5267,3444,3023,3828,3170,4796,5646,4979,4259,6356,5647,5337,3694,\n6357,5648,5338,4520,4322,5802,3031,3759,4071,6020,5586,4836,4386,5048,6581,3571,\n4679,4174,4949,6154,4813,3787,3402,3822,3958,3215,3552,5268,4387,3933,4950,4359,\n6021,5910,5075,3579,6358,4234,4566,5521,6359,3613,5049,6022,5911,3375,3702,3178,\n4911,5339,4521,6582,6583,4395,3087,3811,5377,6023,6360,6155,4027,5171,5649,4421,\n4249,2804,6584,2270,6585,4000,4235,3045,6156,5137,5729,4140,4312,3886,6361,4330,\n6157,4215,6158,3500,3676,4929,4331,3713,4930,5912,4265,3776,3368,5587,4470,4855,\n3038,4980,3631,6159,6160,4132,4680,6161,6362,3923,4379,5588,4255,6586,4121,6587,\n6363,4649,6364,3288,4773,4774,6162,6024,6365,3543,6588,4274,3107,3737,5050,5803,\n4797,4522,5589,5051,5730,3714,4887,5378,4001,4523,6163,5026,5522,4701,4175,2791,\n3760,6589,5473,4224,4133,3847,4814,4815,4775,3259,5416,6590,2738,6164,6025,5304,\n3733,5076,5650,4816,5590,6591,6165,6592,3934,5269,6593,3396,5340,6594,5804,3445,\n3602,4042,4488,5731,5732,3525,5591,4601,5196,6166,6026,5172,3642,4612,3202,4506,\n4798,6366,3818,5108,4303,5138,5139,4776,3332,4304,2915,3415,4434,5077,5109,4856,\n2879,5305,4817,6595,5913,3104,3144,3903,4634,5341,3133,5110,5651,5805,6167,4057,\n5592,2945,4371,5593,6596,3474,4182,6367,6597,6168,4507,4279,6598,2822,6599,4777,\n4713,5594,3829,6169,3887,5417,6170,3653,5474,6368,4216,2971,5228,3790,4579,6369,\n5733,6600,6601,4951,4746,4555,6602,5418,5475,6027,3400,4665,5806,6171,4799,6028,\n5052,6172,3343,4800,4747,5006,6370,4556,4217,5476,4396,5229,5379,5477,3839,5914,\n5652,5807,4714,3068,4635,5808,6173,5342,4192,5078,5419,5523,5734,6174,4557,6175,\n4602,6371,6176,6603,5809,6372,5735,4260,3869,5111,5230,6029,5112,6177,3126,4681,\n5524,5915,2706,3563,4748,3130,6178,4018,5525,6604,6605,5478,4012,4837,6606,4534,\n4193,5810,4857,3615,5479,6030,4082,3697,3539,4086,5270,3662,4508,4931,5916,4912,\n5811,5027,3888,6607,4397,3527,3302,3798,2775,2921,2637,3966,4122,4388,4028,4054,\n1633,4858,5079,3024,5007,3982,3412,5736,6608,3426,3236,5595,3030,6179,3427,3336,\n3279,3110,6373,3874,3039,5080,5917,5140,4489,3119,6374,5812,3405,4494,6031,4666,\n4141,6180,4166,6032,5813,4981,6609,5081,4422,4982,4112,3915,5653,3296,3983,6375,\n4266,4410,5654,6610,6181,3436,5082,6611,5380,6033,3819,5596,4535,5231,5306,5113,\n6612,4952,5918,4275,3113,6613,6376,6182,6183,5814,3073,4731,4838,5008,3831,6614,\n4888,3090,3848,4280,5526,5232,3014,5655,5009,5737,5420,5527,6615,5815,5343,5173,\n5381,4818,6616,3151,4953,6617,5738,2796,3204,4360,2989,4281,5739,5174,5421,5197,\n3132,5141,3849,5142,5528,5083,3799,3904,4839,5480,2880,4495,3448,6377,6184,5271,\n5919,3771,3193,6034,6035,5920,5010,6036,5597,6037,6378,6038,3106,5422,6618,5423,\n5424,4142,6619,4889,5084,4890,4313,5740,6620,3437,5175,5307,5816,4199,5198,5529,\n5817,5199,5656,4913,5028,5344,3850,6185,2955,5272,5011,5818,4567,4580,5029,5921,\n3616,5233,6621,6622,6186,4176,6039,6379,6380,3352,5200,5273,2908,5598,5234,3837,\n5308,6623,6624,5819,4496,4323,5309,5201,6625,6626,4983,3194,3838,4167,5530,5922,\n5274,6381,6382,3860,3861,5599,3333,4292,4509,6383,3553,5481,5820,5531,4778,6187,\n3955,3956,4324,4389,4218,3945,4325,3397,2681,5923,4779,5085,4019,5482,4891,5382,\n5383,6040,4682,3425,5275,4094,6627,5310,3015,5483,5657,4398,5924,3168,4819,6628,\n5925,6629,5532,4932,4613,6041,6630,4636,6384,4780,4204,5658,4423,5821,3989,4683,\n5822,6385,4954,6631,5345,6188,5425,5012,5384,3894,6386,4490,4104,6632,5741,5053,\n6633,5823,5926,5659,5660,5927,6634,5235,5742,5824,4840,4933,4820,6387,4859,5928,\n4955,6388,4143,3584,5825,5346,5013,6635,5661,6389,5014,5484,5743,4337,5176,5662,\n6390,2836,6391,3268,6392,6636,6042,5236,6637,4158,6638,5744,5663,4471,5347,3663,\n4123,5143,4293,3895,6639,6640,5311,5929,5826,3800,6189,6393,6190,5664,5348,3554,\n3594,4749,4603,6641,5385,4801,6043,5827,4183,6642,5312,5426,4761,6394,5665,6191,\n4715,2669,6643,6644,5533,3185,5427,5086,5930,5931,5386,6192,6044,6645,4781,4013,\n5745,4282,4435,5534,4390,4267,6045,5746,4984,6046,2743,6193,3501,4087,5485,5932,\n5428,4184,4095,5747,4061,5054,3058,3862,5933,5600,6646,5144,3618,6395,3131,5055,\n5313,6396,4650,4956,3855,6194,3896,5202,4985,4029,4225,6195,6647,5828,5486,5829,\n3589,3002,6648,6397,4782,5276,6649,6196,6650,4105,3803,4043,5237,5830,6398,4096,\n3643,6399,3528,6651,4453,3315,4637,6652,3984,6197,5535,3182,3339,6653,3096,2660,\n6400,6654,3449,5934,4250,4236,6047,6401,5831,6655,5487,3753,4062,5832,6198,6199,\n6656,3766,6657,3403,4667,6048,6658,4338,2897,5833,3880,2797,3780,4326,6659,5748,\n5015,6660,5387,4351,5601,4411,6661,3654,4424,5935,4339,4072,5277,4568,5536,6402,\n6662,5238,6663,5349,5203,6200,5204,6201,5145,4536,5016,5056,4762,5834,4399,4957,\n6202,6403,5666,5749,6664,4340,6665,5936,5177,5667,6666,6667,3459,4668,6404,6668,\n6669,4543,6203,6670,4276,6405,4480,5537,6671,4614,5205,5668,6672,3348,2193,4763,\n6406,6204,5937,5602,4177,5669,3419,6673,4020,6205,4443,4569,5388,3715,3639,6407,\n6049,4058,6206,6674,5938,4544,6050,4185,4294,4841,4651,4615,5488,6207,6408,6051,\n5178,3241,3509,5835,6208,4958,5836,4341,5489,5278,6209,2823,5538,5350,5206,5429,\n6675,4638,4875,4073,3516,4684,4914,4860,5939,5603,5389,6052,5057,3237,5490,3791,\n6676,6409,6677,4821,4915,4106,5351,5058,4243,5539,4244,5604,4842,4916,5239,3028,\n3716,5837,5114,5605,5390,5940,5430,6210,4332,6678,5540,4732,3667,3840,6053,4305,\n3408,5670,5541,6410,2744,5240,5750,6679,3234,5606,6680,5607,5671,3608,4283,4159,\n4400,5352,4783,6681,6411,6682,4491,4802,6211,6412,5941,6413,6414,5542,5751,6683,\n4669,3734,5942,6684,6415,5943,5059,3328,4670,4144,4268,6685,6686,6687,6688,4372,\n3603,6689,5944,5491,4373,3440,6416,5543,4784,4822,5608,3792,4616,5838,5672,3514,\n5391,6417,4892,6690,4639,6691,6054,5673,5839,6055,6692,6056,5392,6212,4038,5544,\n5674,4497,6057,6693,5840,4284,5675,4021,4545,5609,6418,4454,6419,6213,4113,4472,\n5314,3738,5087,5279,4074,5610,4959,4063,3179,4750,6058,6420,6214,3476,4498,4716,\n5431,4960,4685,6215,5241,6694,6421,6216,6695,5841,5945,6422,3748,5946,5179,3905,\n5752,5545,5947,4374,6217,4455,6423,4412,6218,4803,5353,6696,3832,5280,6219,4327,\n4702,6220,6221,6059,4652,5432,6424,3749,4751,6425,5753,4986,5393,4917,5948,5030,\n5754,4861,4733,6426,4703,6697,6222,4671,5949,4546,4961,5180,6223,5031,3316,5281,\n6698,4862,4295,4934,5207,3644,6427,5842,5950,6428,6429,4570,5843,5282,6430,6224,\n5088,3239,6060,6699,5844,5755,6061,6431,2701,5546,6432,5115,5676,4039,3993,3327,\n4752,4425,5315,6433,3941,6434,5677,4617,4604,3074,4581,6225,5433,6435,6226,6062,\n4823,5756,5116,6227,3717,5678,4717,5845,6436,5679,5846,6063,5847,6064,3977,3354,\n6437,3863,5117,6228,5547,5394,4499,4524,6229,4605,6230,4306,4500,6700,5951,6065,\n3693,5952,5089,4366,4918,6701,6231,5548,6232,6702,6438,4704,5434,6703,6704,5953,\n4168,6705,5680,3420,6706,5242,4407,6066,3812,5757,5090,5954,4672,4525,3481,5681,\n4618,5395,5354,5316,5955,6439,4962,6707,4526,6440,3465,4673,6067,6441,5682,6708,\n5435,5492,5758,5683,4619,4571,4674,4804,4893,4686,5493,4753,6233,6068,4269,6442,\n6234,5032,4705,5146,5243,5208,5848,6235,6443,4963,5033,4640,4226,6236,5849,3387,\n6444,6445,4436,4437,5850,4843,5494,4785,4894,6709,4361,6710,5091,5956,3331,6237,\n4987,5549,6069,6711,4342,3517,4473,5317,6070,6712,6071,4706,6446,5017,5355,6713,\n6714,4988,5436,6447,4734,5759,6715,4735,4547,4456,4754,6448,5851,6449,6450,3547,\n5852,5318,6451,6452,5092,4205,6716,6238,4620,4219,5611,6239,6072,4481,5760,5957,\n5958,4059,6240,6453,4227,4537,6241,5761,4030,4186,5244,5209,3761,4457,4876,3337,\n5495,5181,6242,5959,5319,5612,5684,5853,3493,5854,6073,4169,5613,5147,4895,6074,\n5210,6717,5182,6718,3830,6243,2798,3841,6075,6244,5855,5614,3604,4606,5496,5685,\n5118,5356,6719,6454,5960,5357,5961,6720,4145,3935,4621,5119,5962,4261,6721,6455,\n4786,5963,4375,4582,6245,6246,6247,6076,5437,4877,5856,3376,4380,6248,4160,6722,\n5148,6456,5211,6457,6723,4718,6458,6724,6249,5358,4044,3297,6459,6250,5857,5615,\n5497,5245,6460,5498,6725,6251,6252,5550,3793,5499,2959,5396,6461,6462,4572,5093,\n5500,5964,3806,4146,6463,4426,5762,5858,6077,6253,4755,3967,4220,5965,6254,4989,\n5501,6464,4352,6726,6078,4764,2290,5246,3906,5438,5283,3767,4964,2861,5763,5094,\n6255,6256,4622,5616,5859,5860,4707,6727,4285,4708,4824,5617,6257,5551,4787,5212,\n4965,4935,4687,6465,6728,6466,5686,6079,3494,4413,2995,5247,5966,5618,6729,5967,\n5764,5765,5687,5502,6730,6731,6080,5397,6467,4990,6258,6732,4538,5060,5619,6733,\n4719,5688,5439,5018,5149,5284,5503,6734,6081,4607,6259,5120,3645,5861,4583,6260,\n4584,4675,5620,4098,5440,6261,4863,2379,3306,4585,5552,5689,4586,5285,6735,4864,\n6736,5286,6082,6737,4623,3010,4788,4381,4558,5621,4587,4896,3698,3161,5248,4353,\n4045,6262,3754,5183,4588,6738,6263,6739,6740,5622,3936,6741,6468,6742,6264,5095,\n6469,4991,5968,6743,4992,6744,6083,4897,6745,4256,5766,4307,3108,3968,4444,5287,\n3889,4343,6084,4510,6085,4559,6086,4898,5969,6746,5623,5061,4919,5249,5250,5504,\n5441,6265,5320,4878,3242,5862,5251,3428,6087,6747,4237,5624,5442,6266,5553,4539,\n6748,2585,3533,5398,4262,6088,5150,4736,4438,6089,6267,5505,4966,6749,6268,6750,\n6269,5288,5554,3650,6090,6091,4624,6092,5690,6751,5863,4270,5691,4277,5555,5864,\n6752,5692,4720,4865,6470,5151,4688,4825,6753,3094,6754,6471,3235,4653,6755,5213,\n5399,6756,3201,4589,5865,4967,6472,5866,6473,5019,3016,6757,5321,4756,3957,4573,\n6093,4993,5767,4721,6474,6758,5625,6759,4458,6475,6270,6760,5556,4994,5214,5252,\n6271,3875,5768,6094,5034,5506,4376,5769,6761,2120,6476,5253,5770,6762,5771,5970,\n3990,5971,5557,5558,5772,6477,6095,2787,4641,5972,5121,6096,6097,6272,6763,3703,\n5867,5507,6273,4206,6274,4789,6098,6764,3619,3646,3833,3804,2394,3788,4936,3978,\n4866,4899,6099,6100,5559,6478,6765,3599,5868,6101,5869,5870,6275,6766,4527,6767,\n*******************************************************************************/\n};\n\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/JISFreq.tab",
    "content": "/**\n * @file    JISFreq.tab\n * @brief   JISFreq\n * @license GPL 2.0/LGPL 2.1\n */\n\n//Sampling from about 20M text materials include literature and computer technology\n\n// Japanese frequency table, applied to both S-JIS and EUC-JP\n//They are sorted in order. \n\n/******************************************************************************\n * 128  --> 0.77094\n * 256  --> 0.85710\n * 512  --> 0.92635\n * 1024 --> 0.97130\n * 2048 --> 0.99431\n *\n * Idea Distribution Ratio = 0.92635 / (1-0.92635) = 12.58\n * Random Distribution Ration = 512 / (2965+62+83+86-512) = 0.191\n * \n * Typical Distribution Ratio, 25% of IDR \n *****************************************************************************/\n\n#define JIS_TYPICAL_DISTRIBUTION_RATIO (float) 3.0\n\n// Char to FreqOrder table\nstatic const PRInt16 JISCharToFreqOrder[] =\n{\n  40,   1,   6, 182, 152, 180, 295,2127, 285, 381,3295,4304,3068,4606,3165,3510, //   16\n3511,1822,2785,4607,1193,2226,5070,4608, 171,2996,1247,  18, 179,5071, 856,1661, //   32\n1262,5072, 619, 127,3431,3512,3230,1899,1700, 232, 228,1294,1298, 284, 283,2041, //   48\n2042,1061,1062,  48,  49,  44,  45, 433, 434,1040,1041, 996, 787,2997,1255,4305, //   64\n2108,4609,1684,1648,5073,5074,5075,5076,5077,5078,3687,5079,4610,5080,3927,3928, //   80\n5081,3296,3432, 290,2285,1471,2187,5082,2580,2825,1303,2140,1739,1445,2691,3375, //   96\n1691,3297,4306,4307,4611, 452,3376,1182,2713,3688,3069,4308,5083,5084,5085,5086, //  112\n5087,5088,5089,5090,5091,5092,5093,5094,5095,5096,5097,5098,5099,5100,5101,5102, //  128\n5103,5104,5105,5106,5107,5108,5109,5110,5111,5112,4097,5113,5114,5115,5116,5117, //  144\n5118,5119,5120,5121,5122,5123,5124,5125,5126,5127,5128,5129,5130,5131,5132,5133, //  160\n5134,5135,5136,5137,5138,5139,5140,5141,5142,5143,5144,5145,5146,5147,5148,5149, //  176\n5150,5151,5152,4612,5153,5154,5155,5156,5157,5158,5159,5160,5161,5162,5163,5164, //  192\n5165,5166,5167,5168,5169,5170,5171,5172,5173,5174,5175,1472, 598, 618, 820,1205, //  208\n1309,1412,1858,1307,1692,5176,5177,5178,5179,5180,5181,5182,1142,1452,1234,1172, //  224\n1875,2043,2149,1793,1382,2973, 925,2404,1067,1241, 960,1377,2935,1491, 919,1217, //  240\n1865,2030,1406,1499,2749,4098,5183,5184,5185,5186,5187,5188,2561,4099,3117,1804, //  256\n2049,3689,4309,3513,1663,5189,3166,3118,3298,1587,1561,3433,5190,3119,1625,2998, //  272\n3299,4613,1766,3690,2786,4614,5191,5192,5193,5194,2161,  26,3377,   2,3929,  20, //  288\n3691,  47,4100,  50,  17,  16,  35, 268,  27, 243,  42, 155,  24, 154,  29, 184, //  304\n   4,  91,  14,  92,  53, 396,  33, 289,   9,  37,  64, 620,  21,  39, 321,   5, //  320\n  12,  11,  52,  13,   3, 208, 138,   0,   7,  60, 526, 141, 151,1069, 181, 275, //  336\n1591,  83, 132,1475, 126, 331, 829,  15,  69, 160,  59,  22, 157,  55,1079, 312, //  352\n 109,  38,  23,  25,  10,  19,  79,5195,  61, 382,1124,   8,  30,5196,5197,5198, //  368\n5199,5200,5201,5202,5203,5204,5205,5206,  89,  62,  74,  34,2416, 112, 139, 196, //  384\n 271, 149,  84, 607, 131, 765,  46,  88, 153, 683,  76, 874, 101, 258,  57,  80, //  400\n  32, 364, 121,1508, 169,1547,  68, 235, 145,2999,  41, 360,3027,  70,  63,  31, //  416\n  43, 259, 262,1383,  99, 533, 194,  66,  93, 846, 217, 192,  56, 106,  58, 565, //  432\n 280, 272, 311, 256, 146,  82, 308,  71, 100, 128, 214, 655, 110, 261, 104,1140, //  448\n  54,  51,  36,  87,  67,3070, 185,2618,2936,2020,  28,1066,2390,2059,5207,5208, //  464\n5209,5210,5211,5212,5213,5214,5215,5216,4615,5217,5218,5219,5220,5221,5222,5223, //  480\n5224,5225,5226,5227,5228,5229,5230,5231,5232,5233,5234,5235,5236,3514,5237,5238, //  496\n5239,5240,5241,5242,5243,5244,2297,2031,4616,4310,3692,5245,3071,5246,3598,5247, //  512\n4617,3231,3515,5248,4101,4311,4618,3808,4312,4102,5249,4103,4104,3599,5250,5251, //  528\n5252,5253,5254,5255,5256,5257,5258,5259,5260,5261,5262,5263,5264,5265,5266,5267, //  544\n5268,5269,5270,5271,5272,5273,5274,5275,5276,5277,5278,5279,5280,5281,5282,5283, //  560\n5284,5285,5286,5287,5288,5289,5290,5291,5292,5293,5294,5295,5296,5297,5298,5299, //  576\n5300,5301,5302,5303,5304,5305,5306,5307,5308,5309,5310,5311,5312,5313,5314,5315, //  592\n5316,5317,5318,5319,5320,5321,5322,5323,5324,5325,5326,5327,5328,5329,5330,5331, //  608\n5332,5333,5334,5335,5336,5337,5338,5339,5340,5341,5342,5343,5344,5345,5346,5347, //  624\n5348,5349,5350,5351,5352,5353,5354,5355,5356,5357,5358,5359,5360,5361,5362,5363, //  640\n5364,5365,5366,5367,5368,5369,5370,5371,5372,5373,5374,5375,5376,5377,5378,5379, //  656\n5380,5381, 363, 642,2787,2878,2788,2789,2316,3232,2317,3434,2011, 165,1942,3930, //  672\n3931,3932,3933,5382,4619,5383,4620,5384,5385,5386,5387,5388,5389,5390,5391,5392, //  688\n5393,5394,5395,5396,5397,5398,5399,5400,5401,5402,5403,5404,5405,5406,5407,5408, //  704\n5409,5410,5411,5412,5413,5414,5415,5416,5417,5418,5419,5420,5421,5422,5423,5424, //  720\n5425,5426,5427,5428,5429,5430,5431,5432,5433,5434,5435,5436,5437,5438,5439,5440, //  736\n5441,5442,5443,5444,5445,5446,5447,5448,5449,5450,5451,5452,5453,5454,5455,5456, //  752\n5457,5458,5459,5460,5461,5462,5463,5464,5465,5466,5467,5468,5469,5470,5471,5472, //  768\n5473,5474,5475,5476,5477,5478,5479,5480,5481,5482,5483,5484,5485,5486,5487,5488, //  784\n5489,5490,5491,5492,5493,5494,5495,5496,5497,5498,5499,5500,5501,5502,5503,5504, //  800\n5505,5506,5507,5508,5509,5510,5511,5512,5513,5514,5515,5516,5517,5518,5519,5520, //  816\n5521,5522,5523,5524,5525,5526,5527,5528,5529,5530,5531,5532,5533,5534,5535,5536, //  832\n5537,5538,5539,5540,5541,5542,5543,5544,5545,5546,5547,5548,5549,5550,5551,5552, //  848\n5553,5554,5555,5556,5557,5558,5559,5560,5561,5562,5563,5564,5565,5566,5567,5568, //  864\n5569,5570,5571,5572,5573,5574,5575,5576,5577,5578,5579,5580,5581,5582,5583,5584, //  880\n5585,5586,5587,5588,5589,5590,5591,5592,5593,5594,5595,5596,5597,5598,5599,5600, //  896\n5601,5602,5603,5604,5605,5606,5607,5608,5609,5610,5611,5612,5613,5614,5615,5616, //  912\n5617,5618,5619,5620,5621,5622,5623,5624,5625,5626,5627,5628,5629,5630,5631,5632, //  928\n5633,5634,5635,5636,5637,5638,5639,5640,5641,5642,5643,5644,5645,5646,5647,5648, //  944\n5649,5650,5651,5652,5653,5654,5655,5656,5657,5658,5659,5660,5661,5662,5663,5664, //  960\n5665,5666,5667,5668,5669,5670,5671,5672,5673,5674,5675,5676,5677,5678,5679,5680, //  976\n5681,5682,5683,5684,5685,5686,5687,5688,5689,5690,5691,5692,5693,5694,5695,5696, //  992\n5697,5698,5699,5700,5701,5702,5703,5704,5705,5706,5707,5708,5709,5710,5711,5712, // 1008\n5713,5714,5715,5716,5717,5718,5719,5720,5721,5722,5723,5724,5725,5726,5727,5728, // 1024\n5729,5730,5731,5732,5733,5734,5735,5736,5737,5738,5739,5740,5741,5742,5743,5744, // 1040\n5745,5746,5747,5748,5749,5750,5751,5752,5753,5754,5755,5756,5757,5758,5759,5760, // 1056\n5761,5762,5763,5764,5765,5766,5767,5768,5769,5770,5771,5772,5773,5774,5775,5776, // 1072\n5777,5778,5779,5780,5781,5782,5783,5784,5785,5786,5787,5788,5789,5790,5791,5792, // 1088\n5793,5794,5795,5796,5797,5798,5799,5800,5801,5802,5803,5804,5805,5806,5807,5808, // 1104\n5809,5810,5811,5812,5813,5814,5815,5816,5817,5818,5819,5820,5821,5822,5823,5824, // 1120\n5825,5826,5827,5828,5829,5830,5831,5832,5833,5834,5835,5836,5837,5838,5839,5840, // 1136\n5841,5842,5843,5844,5845,5846,5847,5848,5849,5850,5851,5852,5853,5854,5855,5856, // 1152\n5857,5858,5859,5860,5861,5862,5863,5864,5865,5866,5867,5868,5869,5870,5871,5872, // 1168\n5873,5874,5875,5876,5877,5878,5879,5880,5881,5882,5883,5884,5885,5886,5887,5888, // 1184\n5889,5890,5891,5892,5893,5894,5895,5896,5897,5898,5899,5900,5901,5902,5903,5904, // 1200\n5905,5906,5907,5908,5909,5910,5911,5912,5913,5914,5915,5916,5917,5918,5919,5920, // 1216\n5921,5922,5923,5924,5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,5936, // 1232\n5937,5938,5939,5940,5941,5942,5943,5944,5945,5946,5947,5948,5949,5950,5951,5952, // 1248\n5953,5954,5955,5956,5957,5958,5959,5960,5961,5962,5963,5964,5965,5966,5967,5968, // 1264\n5969,5970,5971,5972,5973,5974,5975,5976,5977,5978,5979,5980,5981,5982,5983,5984, // 1280\n5985,5986,5987,5988,5989,5990,5991,5992,5993,5994,5995,5996,5997,5998,5999,6000, // 1296\n6001,6002,6003,6004,6005,6006,6007,6008,6009,6010,6011,6012,6013,6014,6015,6016, // 1312\n6017,6018,6019,6020,6021,6022,6023,6024,6025,6026,6027,6028,6029,6030,6031,6032, // 1328\n6033,6034,6035,6036,6037,6038,6039,6040,6041,6042,6043,6044,6045,6046,6047,6048, // 1344\n6049,6050,6051,6052,6053,6054,6055,6056,6057,6058,6059,6060,6061,6062,6063,6064, // 1360\n6065,6066,6067,6068,6069,6070,6071,6072,6073,6074,6075,6076,6077,6078,6079,6080, // 1376\n6081,6082,6083,6084,6085,6086,6087,6088,6089,6090,6091,6092,6093,6094,6095,6096, // 1392\n6097,6098,6099,6100,6101,6102,6103,6104,6105,6106,6107,6108,6109,6110,6111,6112, // 1408\n6113,6114,2044,2060,4621, 997,1235, 473,1186,4622, 920,3378,6115,6116, 379,1108, // 1424\n4313,2657,2735,3934,6117,3809, 636,3233, 573,1026,3693,3435,2974,3300,2298,4105, // 1440\n 854,2937,2463, 393,2581,2417, 539, 752,1280,2750,2480, 140,1161, 440, 708,1569, // 1456\n 665,2497,1746,1291,1523,3000, 164,1603, 847,1331, 537,1997, 486, 508,1693,2418, // 1472\n1970,2227, 878,1220, 299,1030, 969, 652,2751, 624,1137,3301,2619,  65,3302,2045, // 1488\n1761,1859,3120,1930,3694,3516, 663,1767, 852, 835,3695, 269, 767,2826,2339,1305, // 1504\n 896,1150, 770,1616,6118, 506,1502,2075,1012,2519, 775,2520,2975,2340,2938,4314, // 1520\n3028,2086,1224,1943,2286,6119,3072,4315,2240,1273,1987,3935,1557, 175, 597, 985, // 1536\n3517,2419,2521,1416,3029, 585, 938,1931,1007,1052,1932,1685,6120,3379,4316,4623, // 1552\n 804, 599,3121,1333,2128,2539,1159,1554,2032,3810, 687,2033,2904, 952, 675,1467, // 1568\n3436,6121,2241,1096,1786,2440,1543,1924, 980,1813,2228, 781,2692,1879, 728,1918, // 1584\n3696,4624, 548,1950,4625,1809,1088,1356,3303,2522,1944, 502, 972, 373, 513,2827, // 1600\n 586,2377,2391,1003,1976,1631,6122,2464,1084, 648,1776,4626,2141, 324, 962,2012, // 1616\n2177,2076,1384, 742,2178,1448,1173,1810, 222, 102, 301, 445, 125,2420, 662,2498, // 1632\n 277, 200,1476,1165,1068, 224,2562,1378,1446, 450,1880, 659, 791, 582,4627,2939, // 1648\n3936,1516,1274, 555,2099,3697,1020,1389,1526,3380,1762,1723,1787,2229, 412,2114, // 1664\n1900,2392,3518, 512,2597, 427,1925,2341,3122,1653,1686,2465,2499, 697, 330, 273, // 1680\n 380,2162, 951, 832, 780, 991,1301,3073, 965,2270,3519, 668,2523,2636,1286, 535, // 1696\n1407, 518, 671, 957,2658,2378, 267, 611,2197,3030,6123, 248,2299, 967,1799,2356, // 1712\n 850,1418,3437,1876,1256,1480,2828,1718,6124,6125,1755,1664,2405,6126,4628,2879, // 1728\n2829, 499,2179, 676,4629, 557,2329,2214,2090, 325,3234, 464, 811,3001, 992,2342, // 1744\n2481,1232,1469, 303,2242, 466,1070,2163, 603,1777,2091,4630,2752,4631,2714, 322, // 1760\n2659,1964,1768, 481,2188,1463,2330,2857,3600,2092,3031,2421,4632,2318,2070,1849, // 1776\n2598,4633,1302,2254,1668,1701,2422,3811,2905,3032,3123,2046,4106,1763,1694,4634, // 1792\n1604, 943,1724,1454, 917, 868,2215,1169,2940, 552,1145,1800,1228,1823,1955, 316, // 1808\n1080,2510, 361,1807,2830,4107,2660,3381,1346,1423,1134,4108,6127, 541,1263,1229, // 1824\n1148,2540, 545, 465,1833,2880,3438,1901,3074,2482, 816,3937, 713,1788,2500, 122, // 1840\n1575, 195,1451,2501,1111,6128, 859, 374,1225,2243,2483,4317, 390,1033,3439,3075, // 1856\n2524,1687, 266, 793,1440,2599, 946, 779, 802, 507, 897,1081, 528,2189,1292, 711, // 1872\n1866,1725,1167,1640, 753, 398,2661,1053, 246, 348,4318, 137,1024,3440,1600,2077, // 1888\n2129, 825,4319, 698, 238, 521, 187,2300,1157,2423,1641,1605,1464,1610,1097,2541, // 1904\n1260,1436, 759,2255,1814,2150, 705,3235, 409,2563,3304, 561,3033,2005,2564, 726, // 1920\n1956,2343,3698,4109, 949,3812,3813,3520,1669, 653,1379,2525, 881,2198, 632,2256, // 1936\n1027, 778,1074, 733,1957, 514,1481,2466, 554,2180, 702,3938,1606,1017,1398,6129, // 1952\n1380,3521, 921, 993,1313, 594, 449,1489,1617,1166, 768,1426,1360, 495,1794,3601, // 1968\n1177,3602,1170,4320,2344, 476, 425,3167,4635,3168,1424, 401,2662,1171,3382,1998, // 1984\n1089,4110, 477,3169, 474,6130,1909, 596,2831,1842, 494, 693,1051,1028,1207,3076, // 2000\n 606,2115, 727,2790,1473,1115, 743,3522, 630, 805,1532,4321,2021, 366,1057, 838, // 2016\n 684,1114,2142,4322,2050,1492,1892,1808,2271,3814,2424,1971,1447,1373,3305,1090, // 2032\n1536,3939,3523,3306,1455,2199, 336, 369,2331,1035, 584,2393, 902, 718,2600,6131, // 2048\n2753, 463,2151,1149,1611,2467, 715,1308,3124,1268, 343,1413,3236,1517,1347,2663, // 2064\n2093,3940,2022,1131,1553,2100,2941,1427,3441,2942,1323,2484,6132,1980, 872,2368, // 2080\n2441,2943, 320,2369,2116,1082, 679,1933,3941,2791,3815, 625,1143,2023, 422,2200, // 2096\n3816,6133, 730,1695, 356,2257,1626,2301,2858,2637,1627,1778, 937, 883,2906,2693, // 2112\n3002,1769,1086, 400,1063,1325,3307,2792,4111,3077, 456,2345,1046, 747,6134,1524, // 2128\n 884,1094,3383,1474,2164,1059, 974,1688,2181,2258,1047, 345,1665,1187, 358, 875, // 2144\n3170, 305, 660,3524,2190,1334,1135,3171,1540,1649,2542,1527, 927, 968,2793, 885, // 2160\n1972,1850, 482, 500,2638,1218,1109,1085,2543,1654,2034, 876,  78,2287,1482,1277, // 2176\n 861,1675,1083,1779, 724,2754, 454, 397,1132,1612,2332, 893, 672,1237, 257,2259, // 2192\n2370, 135,3384, 337,2244, 547, 352, 340, 709,2485,1400, 788,1138,2511, 540, 772, // 2208\n1682,2260,2272,2544,2013,1843,1902,4636,1999,1562,2288,4637,2201,1403,1533, 407, // 2224\n 576,3308,1254,2071, 978,3385, 170, 136,1201,3125,2664,3172,2394, 213, 912, 873, // 2240\n3603,1713,2202, 699,3604,3699, 813,3442, 493, 531,1054, 468,2907,1483, 304, 281, // 2256\n4112,1726,1252,2094, 339,2319,2130,2639, 756,1563,2944, 748, 571,2976,1588,2425, // 2272\n2715,1851,1460,2426,1528,1392,1973,3237, 288,3309, 685,3386, 296, 892,2716,2216, // 2288\n1570,2245, 722,1747,2217, 905,3238,1103,6135,1893,1441,1965, 251,1805,2371,3700, // 2304\n2601,1919,1078,  75,2182,1509,1592,1270,2640,4638,2152,6136,3310,3817, 524, 706, // 2320\n1075, 292,3818,1756,2602, 317,  98,3173,3605,3525,1844,2218,3819,2502, 814, 567, // 2336\n 385,2908,1534,6137, 534,1642,3239, 797,6138,1670,1529, 953,4323, 188,1071, 538, // 2352\n 178, 729,3240,2109,1226,1374,2000,2357,2977, 731,2468,1116,2014,2051,6139,1261, // 2368\n1593, 803,2859,2736,3443, 556, 682, 823,1541,6140,1369,2289,1706,2794, 845, 462, // 2384\n2603,2665,1361, 387, 162,2358,1740, 739,1770,1720,1304,1401,3241,1049, 627,1571, // 2400\n2427,3526,1877,3942,1852,1500, 431,1910,1503, 677, 297,2795, 286,1433,1038,1198, // 2416\n2290,1133,1596,4113,4639,2469,1510,1484,3943,6141,2442, 108, 712,4640,2372, 866, // 2432\n3701,2755,3242,1348, 834,1945,1408,3527,2395,3243,1811, 824, 994,1179,2110,1548, // 2448\n1453, 790,3003, 690,4324,4325,2832,2909,3820,1860,3821, 225,1748, 310, 346,1780, // 2464\n2470, 821,1993,2717,2796, 828, 877,3528,2860,2471,1702,2165,2910,2486,1789, 453, // 2480\n 359,2291,1676,  73,1164,1461,1127,3311, 421, 604, 314,1037, 589, 116,2487, 737, // 2496\n 837,1180, 111, 244, 735,6142,2261,1861,1362, 986, 523, 418, 581,2666,3822, 103, // 2512\n 855, 503,1414,1867,2488,1091, 657,1597, 979, 605,1316,4641,1021,2443,2078,2001, // 2528\n1209,  96, 587,2166,1032, 260,1072,2153, 173,  94, 226,3244, 819,2006,4642,4114, // 2544\n2203, 231,1744, 782,  97,2667, 786,3387, 887, 391, 442,2219,4326,1425,6143,2694, // 2560\n 633,1544,1202, 483,2015, 592,2052,1958,2472,1655, 419, 129,4327,3444,3312,1714, // 2576\n1257,3078,4328,1518,1098, 865,1310,1019,1885,1512,1734, 469,2444, 148, 773, 436, // 2592\n1815,1868,1128,1055,4329,1245,2756,3445,2154,1934,1039,4643, 579,1238, 932,2320, // 2608\n 353, 205, 801, 115,2428, 944,2321,1881, 399,2565,1211, 678, 766,3944, 335,2101, // 2624\n1459,1781,1402,3945,2737,2131,1010, 844, 981,1326,1013, 550,1816,1545,2620,1335, // 2640\n1008, 371,2881, 936,1419,1613,3529,1456,1395,2273,1834,2604,1317,2738,2503, 416, // 2656\n1643,4330, 806,1126, 229, 591,3946,1314,1981,1576,1837,1666, 347,1790, 977,3313, // 2672\n 764,2861,1853, 688,2429,1920,1462,  77, 595, 415,2002,3034, 798,1192,4115,6144, // 2688\n2978,4331,3035,2695,2582,2072,2566, 430,2430,1727, 842,1396,3947,3702, 613, 377, // 2704\n 278, 236,1417,3388,3314,3174, 757,1869, 107,3530,6145,1194, 623,2262, 207,1253, // 2720\n2167,3446,3948, 492,1117,1935, 536,1838,2757,1246,4332, 696,2095,2406,1393,1572, // 2736\n3175,1782, 583, 190, 253,1390,2230, 830,3126,3389, 934,3245,1703,1749,2979,1870, // 2752\n2545,1656,2204, 869,2346,4116,3176,1817, 496,1764,4644, 942,1504, 404,1903,1122, // 2768\n1580,3606,2945,1022, 515, 372,1735, 955,2431,3036,6146,2797,1110,2302,2798, 617, // 2784\n6147, 441, 762,1771,3447,3607,3608,1904, 840,3037,  86, 939,1385, 572,1370,2445, // 2800\n1336, 114,3703, 898, 294, 203,3315, 703,1583,2274, 429, 961,4333,1854,1951,3390, // 2816\n2373,3704,4334,1318,1381, 966,1911,2322,1006,1155, 309, 989, 458,2718,1795,1372, // 2832\n1203, 252,1689,1363,3177, 517,1936, 168,1490, 562, 193,3823,1042,4117,1835, 551, // 2848\n 470,4645, 395, 489,3448,1871,1465,2583,2641, 417,1493, 279,1295, 511,1236,1119, // 2864\n  72,1231,1982,1812,3004, 871,1564, 984,3449,1667,2696,2096,4646,2347,2833,1673, // 2880\n3609, 695,3246,2668, 807,1183,4647, 890, 388,2333,1801,1457,2911,1765,1477,1031, // 2896\n3316,3317,1278,3391,2799,2292,2526, 163,3450,4335,2669,1404,1802,6148,2323,2407, // 2912\n1584,1728,1494,1824,1269, 298, 909,3318,1034,1632, 375, 776,1683,2061, 291, 210, // 2928\n1123, 809,1249,1002,2642,3038, 206,1011,2132, 144, 975, 882,1565, 342, 667, 754, // 2944\n1442,2143,1299,2303,2062, 447, 626,2205,1221,2739,2912,1144,1214,2206,2584, 760, // 2960\n1715, 614, 950,1281,2670,2621, 810, 577,1287,2546,4648, 242,2168, 250,2643, 691, // 2976\n 123,2644, 647, 313,1029, 689,1357,2946,1650, 216, 771,1339,1306, 808,2063, 549, // 2992\n 913,1371,2913,2914,6149,1466,1092,1174,1196,1311,2605,2396,1783,1796,3079, 406, // 3008\n2671,2117,3949,4649, 487,1825,2220,6150,2915, 448,2348,1073,6151,2397,1707, 130, // 3024\n 900,1598, 329, 176,1959,2527,1620,6152,2275,4336,3319,1983,2191,3705,3610,2155, // 3040\n3706,1912,1513,1614,6153,1988, 646, 392,2304,1589,3320,3039,1826,1239,1352,1340, // 3056\n2916, 505,2567,1709,1437,2408,2547, 906,6154,2672, 384,1458,1594,1100,1329, 710, // 3072\n 423,3531,2064,2231,2622,1989,2673,1087,1882, 333, 841,3005,1296,2882,2379, 580, // 3088\n1937,1827,1293,2585, 601, 574, 249,1772,4118,2079,1120, 645, 901,1176,1690, 795, // 3104\n2207, 478,1434, 516,1190,1530, 761,2080, 930,1264, 355, 435,1552, 644,1791, 987, // 3120\n 220,1364,1163,1121,1538, 306,2169,1327,1222, 546,2645, 218, 241, 610,1704,3321, // 3136\n1984,1839,1966,2528, 451,6155,2586,3707,2568, 907,3178, 254,2947, 186,1845,4650, // 3152\n 745, 432,1757, 428,1633, 888,2246,2221,2489,3611,2118,1258,1265, 956,3127,1784, // 3168\n4337,2490, 319, 510, 119, 457,3612, 274,2035,2007,4651,1409,3128, 970,2758, 590, // 3184\n2800, 661,2247,4652,2008,3950,1420,1549,3080,3322,3951,1651,1375,2111, 485,2491, // 3200\n1429,1156,6156,2548,2183,1495, 831,1840,2529,2446, 501,1657, 307,1894,3247,1341, // 3216\n 666, 899,2156,1539,2549,1559, 886, 349,2208,3081,2305,1736,3824,2170,2759,1014, // 3232\n1913,1386, 542,1397,2948, 490, 368, 716, 362, 159, 282,2569,1129,1658,1288,1750, // 3248\n2674, 276, 649,2016, 751,1496, 658,1818,1284,1862,2209,2087,2512,3451, 622,2834, // 3264\n 376, 117,1060,2053,1208,1721,1101,1443, 247,1250,3179,1792,3952,2760,2398,3953, // 3280\n6157,2144,3708, 446,2432,1151,2570,3452,2447,2761,2835,1210,2448,3082, 424,2222, // 3296\n1251,2449,2119,2836, 504,1581,4338, 602, 817, 857,3825,2349,2306, 357,3826,1470, // 3312\n1883,2883, 255, 958, 929,2917,3248, 302,4653,1050,1271,1751,2307,1952,1430,2697, // 3328\n2719,2359, 354,3180, 777, 158,2036,4339,1659,4340,4654,2308,2949,2248,1146,2232, // 3344\n3532,2720,1696,2623,3827,6158,3129,1550,2698,1485,1297,1428, 637, 931,2721,2145, // 3360\n 914,2550,2587,  81,2450, 612, 827,2646,1242,4655,1118,2884, 472,1855,3181,3533, // 3376\n3534, 569,1353,2699,1244,1758,2588,4119,2009,2762,2171,3709,1312,1531,6159,1152, // 3392\n1938, 134,1830, 471,3710,2276,1112,1535,3323,3453,3535, 982,1337,2950, 488, 826, // 3408\n 674,1058,1628,4120,2017, 522,2399, 211, 568,1367,3454, 350, 293,1872,1139,3249, // 3424\n1399,1946,3006,1300,2360,3324, 588, 736,6160,2606, 744, 669,3536,3828,6161,1358, // 3440\n 199, 723, 848, 933, 851,1939,1505,1514,1338,1618,1831,4656,1634,3613, 443,2740, // 3456\n3829, 717,1947, 491,1914,6162,2551,1542,4121,1025,6163,1099,1223, 198,3040,2722, // 3472\n 370, 410,1905,2589, 998,1248,3182,2380, 519,1449,4122,1710, 947, 928,1153,4341, // 3488\n2277, 344,2624,1511, 615, 105, 161,1212,1076,1960,3130,2054,1926,1175,1906,2473, // 3504\n 414,1873,2801,6164,2309, 315,1319,3325, 318,2018,2146,2157, 963, 631, 223,4342, // 3520\n4343,2675, 479,3711,1197,2625,3712,2676,2361,6165,4344,4123,6166,2451,3183,1886, // 3536\n2184,1674,1330,1711,1635,1506, 799, 219,3250,3083,3954,1677,3713,3326,2081,3614, // 3552\n1652,2073,4657,1147,3041,1752, 643,1961, 147,1974,3955,6167,1716,2037, 918,3007, // 3568\n1994, 120,1537, 118, 609,3184,4345, 740,3455,1219, 332,1615,3830,6168,1621,2980, // 3584\n1582, 783, 212, 553,2350,3714,1349,2433,2082,4124, 889,6169,2310,1275,1410, 973, // 3600\n 166,1320,3456,1797,1215,3185,2885,1846,2590,2763,4658, 629, 822,3008, 763, 940, // 3616\n1990,2862, 439,2409,1566,1240,1622, 926,1282,1907,2764, 654,2210,1607, 327,1130, // 3632\n3956,1678,1623,6170,2434,2192, 686, 608,3831,3715, 903,3957,3042,6171,2741,1522, // 3648\n1915,1105,1555,2552,1359, 323,3251,4346,3457, 738,1354,2553,2311,2334,1828,2003, // 3664\n3832,1753,2351,1227,6172,1887,4125,1478,6173,2410,1874,1712,1847, 520,1204,2607, // 3680\n 264,4659, 836,2677,2102, 600,4660,3833,2278,3084,6174,4347,3615,1342, 640, 532, // 3696\n 543,2608,1888,2400,2591,1009,4348,1497, 341,1737,3616,2723,1394, 529,3252,1321, // 3712\n 983,4661,1515,2120, 971,2592, 924, 287,1662,3186,4349,2700,4350,1519, 908,1948, // 3728\n2452, 156, 796,1629,1486,2223,2055, 694,4126,1259,1036,3392,1213,2249,2742,1889, // 3744\n1230,3958,1015, 910, 408, 559,3617,4662, 746, 725, 935,4663,3959,3009,1289, 563, // 3760\n 867,4664,3960,1567,2981,2038,2626, 988,2263,2381,4351, 143,2374, 704,1895,6175, // 3776\n1188,3716,2088, 673,3085,2362,4352, 484,1608,1921,2765,2918, 215, 904,3618,3537, // 3792\n 894, 509, 976,3043,2701,3961,4353,2837,2982, 498,6176,6177,1102,3538,1332,3393, // 3808\n1487,1636,1637, 233, 245,3962, 383, 650, 995,3044, 460,1520,1206,2352, 749,3327, // 3824\n 530, 700, 389,1438,1560,1773,3963,2264, 719,2951,2724,3834, 870,1832,1644,1000, // 3840\n 839,2474,3717, 197,1630,3394, 365,2886,3964,1285,2133, 734, 922, 818,1106, 732, // 3856\n 480,2083,1774,3458, 923,2279,1350, 221,3086,  85,2233,2234,3835,1585,3010,2147, // 3872\n1387,1705,2382,1619,2475, 133, 239,2802,1991,1016,2084,2383, 411,2838,1113, 651, // 3888\n1985,1160,3328, 990,1863,3087,1048,1276,2647, 265,2627,1599,3253,2056, 150, 638, // 3904\n2019, 656, 853, 326,1479, 680,1439,4354,1001,1759, 413,3459,3395,2492,1431, 459, // 3920\n4355,1125,3329,2265,1953,1450,2065,2863, 849, 351,2678,3131,3254,3255,1104,1577, // 3936\n 227,1351,1645,2453,2193,1421,2887, 812,2121, 634,  95,2435, 201,2312,4665,1646, // 3952\n1671,2743,1601,2554,2702,2648,2280,1315,1366,2089,3132,1573,3718,3965,1729,1189, // 3968\n 328,2679,1077,1940,1136, 558,1283, 964,1195, 621,2074,1199,1743,3460,3619,1896, // 3984\n1916,1890,3836,2952,1154,2112,1064, 862, 378,3011,2066,2113,2803,1568,2839,6178, // 4000\n3088,2919,1941,1660,2004,1992,2194, 142, 707,1590,1708,1624,1922,1023,1836,1233, // 4016\n1004,2313, 789, 741,3620,6179,1609,2411,1200,4127,3719,3720,4666,2057,3721, 593, // 4032\n2840, 367,2920,1878,6180,3461,1521, 628,1168, 692,2211,2649, 300, 720,2067,2571, // 4048\n2953,3396, 959,2504,3966,3539,3462,1977, 701,6181, 954,1043, 800, 681, 183,3722, // 4064\n1803,1730,3540,4128,2103, 815,2314, 174, 467, 230,2454,1093,2134, 755,3541,3397, // 4080\n1141,1162,6182,1738,2039, 270,3256,2513,1005,1647,2185,3837, 858,1679,1897,1719, // 4096\n2954,2324,1806, 402, 670, 167,4129,1498,2158,2104, 750,6183, 915, 189,1680,1551, // 4112\n 455,4356,1501,2455, 405,1095,2955, 338,1586,1266,1819, 570, 641,1324, 237,1556, // 4128\n2650,1388,3723,6184,1368,2384,1343,1978,3089,2436, 879,3724, 792,1191, 758,3012, // 4144\n1411,2135,1322,4357, 240,4667,1848,3725,1574,6185, 420,3045,1546,1391, 714,4358, // 4160\n1967, 941,1864, 863, 664, 426, 560,1731,2680,1785,2864,1949,2363, 403,3330,1415, // 4176\n1279,2136,1697,2335, 204, 721,2097,3838,  90,6186,2085,2505, 191,3967, 124,2148, // 4192\n1376,1798,1178,1107,1898,1405, 860,4359,1243,1272,2375,2983,1558,2456,1638, 113, // 4208\n3621, 578,1923,2609, 880, 386,4130, 784,2186,2266,1422,2956,2172,1722, 497, 263, // 4224\n2514,1267,2412,2610, 177,2703,3542, 774,1927,1344, 616,1432,1595,1018, 172,4360, // 4240\n2325, 911,4361, 438,1468,3622, 794,3968,2024,2173,1681,1829,2957, 945, 895,3090, // 4256\n 575,2212,2476, 475,2401,2681, 785,2744,1745,2293,2555,1975,3133,2865, 394,4668, // 4272\n3839, 635,4131, 639, 202,1507,2195,2766,1345,1435,2572,3726,1908,1184,1181,2457, // 4288\n3727,3134,4362, 843,2611, 437, 916,4669, 234, 769,1884,3046,3047,3623, 833,6187, // 4304\n1639,2250,2402,1355,1185,2010,2047, 999, 525,1732,1290,1488,2612, 948,1578,3728, // 4320\n2413,2477,1216,2725,2159, 334,3840,1328,3624,2921,1525,4132, 564,1056, 891,4363, // 4336\n1444,1698,2385,2251,3729,1365,2281,2235,1717,6188, 864,3841,2515, 444, 527,2767, // 4352\n2922,3625, 544, 461,6189, 566, 209,2437,3398,2098,1065,2068,3331,3626,3257,2137, // 4368  //last 512\n\n/*************************************************************************************** \n *Everything below is of no interest for detection purpose\t\t\t\t\t\t\t   *\n ***************************************************************************************\n\n2138,2122,3730,2888,1995,1820,1044,6190,6191,6192,6193,6194,6195,6196,6197,6198, // 4384\n6199,6200,6201,6202,6203,6204,6205,4670,6206,6207,6208,6209,6210,6211,6212,6213, // 4400\n6214,6215,6216,6217,6218,6219,6220,6221,6222,6223,6224,6225,6226,6227,6228,6229, // 4416\n6230,6231,6232,6233,6234,6235,6236,6237,3187,6238,6239,3969,6240,6241,6242,6243, // 4432\n6244,4671,6245,6246,4672,6247,6248,4133,6249,6250,4364,6251,2923,2556,2613,4673, // 4448\n4365,3970,6252,6253,6254,6255,4674,6256,6257,6258,2768,2353,4366,4675,4676,3188, // 4464\n4367,3463,6259,4134,4677,4678,6260,2267,6261,3842,3332,4368,3543,6262,6263,6264, // 4480\n3013,1954,1928,4135,4679,6265,6266,2478,3091,6267,4680,4369,6268,6269,1699,6270, // 4496\n3544,4136,4681,6271,4137,6272,4370,2804,6273,6274,2593,3971,3972,4682,6275,2236, // 4512\n4683,6276,6277,4684,6278,6279,4138,3973,4685,6280,6281,3258,6282,6283,6284,6285, // 4528\n3974,4686,2841,3975,6286,6287,3545,6288,6289,4139,4687,4140,6290,4141,6291,4142, // 4544\n6292,6293,3333,6294,6295,6296,4371,6297,3399,6298,6299,4372,3976,6300,6301,6302, // 4560\n4373,6303,6304,3843,3731,6305,4688,4374,6306,6307,3259,2294,6308,3732,2530,4143, // 4576\n6309,4689,6310,6311,6312,3048,6313,6314,4690,3733,2237,6315,6316,2282,3334,6317, // 4592\n6318,3844,6319,6320,4691,6321,3400,4692,6322,4693,6323,3049,6324,4375,6325,3977, // 4608\n6326,6327,6328,3546,6329,4694,3335,6330,4695,4696,6331,6332,6333,6334,4376,3978, // 4624\n6335,4697,3979,4144,6336,3980,4698,6337,6338,6339,6340,6341,4699,4700,4701,6342, // 4640\n6343,4702,6344,6345,4703,6346,6347,4704,6348,4705,4706,3135,6349,4707,6350,4708, // 4656\n6351,4377,6352,4709,3734,4145,6353,2506,4710,3189,6354,3050,4711,3981,6355,3547, // 4672\n3014,4146,4378,3735,2651,3845,3260,3136,2224,1986,6356,3401,6357,4712,2594,3627, // 4688\n3137,2573,3736,3982,4713,3628,4714,4715,2682,3629,4716,6358,3630,4379,3631,6359, // 4704\n6360,6361,3983,6362,6363,6364,6365,4147,3846,4717,6366,6367,3737,2842,6368,4718, // 4720\n2628,6369,3261,6370,2386,6371,6372,3738,3984,4719,3464,4720,3402,6373,2924,3336, // 4736\n4148,2866,6374,2805,3262,4380,2704,2069,2531,3138,2806,2984,6375,2769,6376,4721, // 4752\n4722,3403,6377,6378,3548,6379,6380,2705,3092,1979,4149,2629,3337,2889,6381,3338, // 4768\n4150,2557,3339,4381,6382,3190,3263,3739,6383,4151,4723,4152,2558,2574,3404,3191, // 4784\n6384,6385,4153,6386,4724,4382,6387,6388,4383,6389,6390,4154,6391,4725,3985,6392, // 4800\n3847,4155,6393,6394,6395,6396,6397,3465,6398,4384,6399,6400,6401,6402,6403,6404, // 4816\n4156,6405,6406,6407,6408,2123,6409,6410,2326,3192,4726,6411,6412,6413,6414,4385, // 4832\n4157,6415,6416,4158,6417,3093,3848,6418,3986,6419,6420,3849,6421,6422,6423,4159, // 4848\n6424,6425,4160,6426,3740,6427,6428,6429,6430,3987,6431,4727,6432,2238,6433,6434, // 4864\n4386,3988,6435,6436,3632,6437,6438,2843,6439,6440,6441,6442,3633,6443,2958,6444, // 4880\n6445,3466,6446,2364,4387,3850,6447,4388,2959,3340,6448,3851,6449,4728,6450,6451, // 4896\n3264,4729,6452,3193,6453,4389,4390,2706,3341,4730,6454,3139,6455,3194,6456,3051, // 4912\n2124,3852,1602,4391,4161,3853,1158,3854,4162,3989,4392,3990,4731,4732,4393,2040, // 4928\n4163,4394,3265,6457,2807,3467,3855,6458,6459,6460,3991,3468,4733,4734,6461,3140, // 4944\n2960,6462,4735,6463,6464,6465,6466,4736,4737,4738,4739,6467,6468,4164,2403,3856, // 4960\n6469,6470,2770,2844,6471,4740,6472,6473,6474,6475,6476,6477,6478,3195,6479,4741, // 4976\n4395,6480,2867,6481,4742,2808,6482,2493,4165,6483,6484,6485,6486,2295,4743,6487, // 4992\n6488,6489,3634,6490,6491,6492,6493,6494,6495,6496,2985,4744,6497,6498,4745,6499, // 5008\n6500,2925,3141,4166,6501,6502,4746,6503,6504,4747,6505,6506,6507,2890,6508,6509, // 5024\n6510,6511,6512,6513,6514,6515,6516,6517,6518,6519,3469,4167,6520,6521,6522,4748, // 5040\n4396,3741,4397,4749,4398,3342,2125,4750,6523,4751,4752,4753,3052,6524,2961,4168, // 5056\n6525,4754,6526,4755,4399,2926,4169,6527,3857,6528,4400,4170,6529,4171,6530,6531, // 5072\n2595,6532,6533,6534,6535,3635,6536,6537,6538,6539,6540,6541,6542,4756,6543,6544, // 5088\n6545,6546,6547,6548,4401,6549,6550,6551,6552,4402,3405,4757,4403,6553,6554,6555, // 5104\n4172,3742,6556,6557,6558,3992,3636,6559,6560,3053,2726,6561,3549,4173,3054,4404, // 5120\n6562,6563,3993,4405,3266,3550,2809,4406,6564,6565,6566,4758,4759,6567,3743,6568, // 5136\n4760,3744,4761,3470,6569,6570,6571,4407,6572,3745,4174,6573,4175,2810,4176,3196, // 5152\n4762,6574,4177,6575,6576,2494,2891,3551,6577,6578,3471,6579,4408,6580,3015,3197, // 5168\n6581,3343,2532,3994,3858,6582,3094,3406,4409,6583,2892,4178,4763,4410,3016,4411, // 5184\n6584,3995,3142,3017,2683,6585,4179,6586,6587,4764,4412,6588,6589,4413,6590,2986, // 5200\n6591,2962,3552,6592,2963,3472,6593,6594,4180,4765,6595,6596,2225,3267,4414,6597, // 5216\n3407,3637,4766,6598,6599,3198,6600,4415,6601,3859,3199,6602,3473,4767,2811,4416, // 5232\n1856,3268,3200,2575,3996,3997,3201,4417,6603,3095,2927,6604,3143,6605,2268,6606, // 5248\n3998,3860,3096,2771,6607,6608,3638,2495,4768,6609,3861,6610,3269,2745,4769,4181, // 5264\n3553,6611,2845,3270,6612,6613,6614,3862,6615,6616,4770,4771,6617,3474,3999,4418, // 5280\n4419,6618,3639,3344,6619,4772,4182,6620,2126,6621,6622,6623,4420,4773,6624,3018, // 5296\n6625,4774,3554,6626,4183,2025,3746,6627,4184,2707,6628,4421,4422,3097,1775,4185, // 5312\n3555,6629,6630,2868,6631,6632,4423,6633,6634,4424,2414,2533,2928,6635,4186,2387, // 5328\n6636,4775,6637,4187,6638,1891,4425,3202,3203,6639,6640,4776,6641,3345,6642,6643, // 5344\n3640,6644,3475,3346,3641,4000,6645,3144,6646,3098,2812,4188,3642,3204,6647,3863, // 5360\n3476,6648,3864,6649,4426,4001,6650,6651,6652,2576,6653,4189,4777,6654,6655,6656, // 5376\n2846,6657,3477,3205,4002,6658,4003,6659,3347,2252,6660,6661,6662,4778,6663,6664, // 5392\n6665,6666,6667,6668,6669,4779,4780,2048,6670,3478,3099,6671,3556,3747,4004,6672, // 5408\n6673,6674,3145,4005,3748,6675,6676,6677,6678,6679,3408,6680,6681,6682,6683,3206, // 5424\n3207,6684,6685,4781,4427,6686,4782,4783,4784,6687,6688,6689,4190,6690,6691,3479, // 5440\n6692,2746,6693,4428,6694,6695,6696,6697,6698,6699,4785,6700,6701,3208,2727,6702, // 5456\n3146,6703,6704,3409,2196,6705,4429,6706,6707,6708,2534,1996,6709,6710,6711,2747, // 5472\n6712,6713,6714,4786,3643,6715,4430,4431,6716,3557,6717,4432,4433,6718,6719,6720, // 5488\n6721,3749,6722,4006,4787,6723,6724,3644,4788,4434,6725,6726,4789,2772,6727,6728, // 5504\n6729,6730,6731,2708,3865,2813,4435,6732,6733,4790,4791,3480,6734,6735,6736,6737, // 5520\n4436,3348,6738,3410,4007,6739,6740,4008,6741,6742,4792,3411,4191,6743,6744,6745, // 5536\n6746,6747,3866,6748,3750,6749,6750,6751,6752,6753,6754,6755,3867,6756,4009,6757, // 5552\n4793,4794,6758,2814,2987,6759,6760,6761,4437,6762,6763,6764,6765,3645,6766,6767, // 5568\n3481,4192,6768,3751,6769,6770,2174,6771,3868,3752,6772,6773,6774,4193,4795,4438, // 5584\n3558,4796,4439,6775,4797,6776,6777,4798,6778,4799,3559,4800,6779,6780,6781,3482, // 5600\n6782,2893,6783,6784,4194,4801,4010,6785,6786,4440,6787,4011,6788,6789,6790,6791, // 5616\n6792,6793,4802,6794,6795,6796,4012,6797,6798,6799,6800,3349,4803,3483,6801,4804, // 5632\n4195,6802,4013,6803,6804,4196,6805,4014,4015,6806,2847,3271,2848,6807,3484,6808, // 5648\n6809,6810,4441,6811,4442,4197,4443,3272,4805,6812,3412,4016,1579,6813,6814,4017, // 5664\n6815,3869,6816,2964,6817,4806,6818,6819,4018,3646,6820,6821,4807,4019,4020,6822, // 5680\n6823,3560,6824,6825,4021,4444,6826,4198,6827,6828,4445,6829,6830,4199,4808,6831, // 5696\n6832,6833,3870,3019,2458,6834,3753,3413,3350,6835,4809,3871,4810,3561,4446,6836, // 5712\n6837,4447,4811,4812,6838,2459,4448,6839,4449,6840,6841,4022,3872,6842,4813,4814, // 5728\n6843,6844,4815,4200,4201,4202,6845,4023,6846,6847,4450,3562,3873,6848,6849,4816, // 5744\n4817,6850,4451,4818,2139,6851,3563,6852,6853,3351,6854,6855,3352,4024,2709,3414, // 5760\n4203,4452,6856,4204,6857,6858,3874,3875,6859,6860,4819,6861,6862,6863,6864,4453, // 5776\n3647,6865,6866,4820,6867,6868,6869,6870,4454,6871,2869,6872,6873,4821,6874,3754, // 5792\n6875,4822,4205,6876,6877,6878,3648,4206,4455,6879,4823,6880,4824,3876,6881,3055, // 5808\n4207,6882,3415,6883,6884,6885,4208,4209,6886,4210,3353,6887,3354,3564,3209,3485, // 5824\n2652,6888,2728,6889,3210,3755,6890,4025,4456,6891,4825,6892,6893,6894,6895,4211, // 5840\n6896,6897,6898,4826,6899,6900,4212,6901,4827,6902,2773,3565,6903,4828,6904,6905, // 5856\n6906,6907,3649,3650,6908,2849,3566,6909,3567,3100,6910,6911,6912,6913,6914,6915, // 5872\n4026,6916,3355,4829,3056,4457,3756,6917,3651,6918,4213,3652,2870,6919,4458,6920, // 5888\n2438,6921,6922,3757,2774,4830,6923,3356,4831,4832,6924,4833,4459,3653,2507,6925, // 5904\n4834,2535,6926,6927,3273,4027,3147,6928,3568,6929,6930,6931,4460,6932,3877,4461, // 5920\n2729,3654,6933,6934,6935,6936,2175,4835,2630,4214,4028,4462,4836,4215,6937,3148, // 5936\n4216,4463,4837,4838,4217,6938,6939,2850,4839,6940,4464,6941,6942,6943,4840,6944, // 5952\n4218,3274,4465,6945,6946,2710,6947,4841,4466,6948,6949,2894,6950,6951,4842,6952, // 5968\n4219,3057,2871,6953,6954,6955,6956,4467,6957,2711,6958,6959,6960,3275,3101,4843, // 5984\n6961,3357,3569,6962,4844,6963,6964,4468,4845,3570,6965,3102,4846,3758,6966,4847, // 6000\n3878,4848,4849,4029,6967,2929,3879,4850,4851,6968,6969,1733,6970,4220,6971,6972, // 6016\n6973,6974,6975,6976,4852,6977,6978,6979,6980,6981,6982,3759,6983,6984,6985,3486, // 6032\n3487,6986,3488,3416,6987,6988,6989,6990,6991,6992,6993,6994,6995,6996,6997,4853, // 6048\n6998,6999,4030,7000,7001,3211,7002,7003,4221,7004,7005,3571,4031,7006,3572,7007, // 6064\n2614,4854,2577,7008,7009,2965,3655,3656,4855,2775,3489,3880,4222,4856,3881,4032, // 6080\n3882,3657,2730,3490,4857,7010,3149,7011,4469,4858,2496,3491,4859,2283,7012,7013, // 6096\n7014,2365,4860,4470,7015,7016,3760,7017,7018,4223,1917,7019,7020,7021,4471,7022, // 6112\n2776,4472,7023,7024,7025,7026,4033,7027,3573,4224,4861,4034,4862,7028,7029,1929, // 6128\n3883,4035,7030,4473,3058,7031,2536,3761,3884,7032,4036,7033,2966,2895,1968,4474, // 6144\n3276,4225,3417,3492,4226,2105,7034,7035,1754,2596,3762,4227,4863,4475,3763,4864, // 6160\n3764,2615,2777,3103,3765,3658,3418,4865,2296,3766,2815,7036,7037,7038,3574,2872, // 6176\n3277,4476,7039,4037,4477,7040,7041,4038,7042,7043,7044,7045,7046,7047,2537,7048, // 6192\n7049,7050,7051,7052,7053,7054,4478,7055,7056,3767,3659,4228,3575,7057,7058,4229, // 6208\n7059,7060,7061,3660,7062,3212,7063,3885,4039,2460,7064,7065,7066,7067,7068,7069, // 6224\n7070,7071,7072,7073,7074,4866,3768,4867,7075,7076,7077,7078,4868,3358,3278,2653, // 6240\n7079,7080,4479,3886,7081,7082,4869,7083,7084,7085,7086,7087,7088,2538,7089,7090, // 6256\n7091,4040,3150,3769,4870,4041,2896,3359,4230,2930,7092,3279,7093,2967,4480,3213, // 6272\n4481,3661,7094,7095,7096,7097,7098,7099,7100,7101,7102,2461,3770,7103,7104,4231, // 6288\n3151,7105,7106,7107,4042,3662,7108,7109,4871,3663,4872,4043,3059,7110,7111,7112, // 6304\n3493,2988,7113,4873,7114,7115,7116,3771,4874,7117,7118,4232,4875,7119,3576,2336, // 6320\n4876,7120,4233,3419,4044,4877,4878,4482,4483,4879,4484,4234,7121,3772,4880,1045, // 6336\n3280,3664,4881,4882,7122,7123,7124,7125,4883,7126,2778,7127,4485,4486,7128,4884, // 6352\n3214,3887,7129,7130,3215,7131,4885,4045,7132,7133,4046,7134,7135,7136,7137,7138, // 6368\n7139,7140,7141,7142,7143,4235,7144,4886,7145,7146,7147,4887,7148,7149,7150,4487, // 6384\n4047,4488,7151,7152,4888,4048,2989,3888,7153,3665,7154,4049,7155,7156,7157,7158, // 6400\n7159,7160,2931,4889,4890,4489,7161,2631,3889,4236,2779,7162,7163,4891,7164,3060, // 6416\n7165,1672,4892,7166,4893,4237,3281,4894,7167,7168,3666,7169,3494,7170,7171,4050, // 6432\n7172,7173,3104,3360,3420,4490,4051,2684,4052,7174,4053,7175,7176,7177,2253,4054, // 6448\n7178,7179,4895,7180,3152,3890,3153,4491,3216,7181,7182,7183,2968,4238,4492,4055, // 6464\n7184,2990,7185,2479,7186,7187,4493,7188,7189,7190,7191,7192,4896,7193,4897,2969, // 6480\n4494,4898,7194,3495,7195,7196,4899,4495,7197,3105,2731,7198,4900,7199,7200,7201, // 6496\n4056,7202,3361,7203,7204,4496,4901,4902,7205,4497,7206,7207,2315,4903,7208,4904, // 6512\n7209,4905,2851,7210,7211,3577,7212,3578,4906,7213,4057,3667,4907,7214,4058,2354, // 6528\n3891,2376,3217,3773,7215,7216,7217,7218,7219,4498,7220,4908,3282,2685,7221,3496, // 6544\n4909,2632,3154,4910,7222,2337,7223,4911,7224,7225,7226,4912,4913,3283,4239,4499, // 6560\n7227,2816,7228,7229,7230,7231,7232,7233,7234,4914,4500,4501,7235,7236,7237,2686, // 6576\n7238,4915,7239,2897,4502,7240,4503,7241,2516,7242,4504,3362,3218,7243,7244,7245, // 6592\n4916,7246,7247,4505,3363,7248,7249,7250,7251,3774,4506,7252,7253,4917,7254,7255, // 6608\n3284,2991,4918,4919,3219,3892,4920,3106,3497,4921,7256,7257,7258,4922,7259,4923, // 6624\n3364,4507,4508,4059,7260,4240,3498,7261,7262,4924,7263,2992,3893,4060,3220,7264, // 6640\n7265,7266,7267,7268,7269,4509,3775,7270,2817,7271,4061,4925,4510,3776,7272,4241, // 6656\n4511,3285,7273,7274,3499,7275,7276,7277,4062,4512,4926,7278,3107,3894,7279,7280, // 6672\n4927,7281,4513,7282,7283,3668,7284,7285,4242,4514,4243,7286,2058,4515,4928,4929, // 6688\n4516,7287,3286,4244,7288,4517,7289,7290,7291,3669,7292,7293,4930,4931,4932,2355, // 6704\n4933,7294,2633,4518,7295,4245,7296,7297,4519,7298,7299,4520,4521,4934,7300,4246, // 6720\n4522,7301,7302,7303,3579,7304,4247,4935,7305,4936,7306,7307,7308,7309,3777,7310, // 6736\n4523,7311,7312,7313,4248,3580,7314,4524,3778,4249,7315,3581,7316,3287,7317,3221, // 6752\n7318,4937,7319,7320,7321,7322,7323,7324,4938,4939,7325,4525,7326,7327,7328,4063, // 6768\n7329,7330,4940,7331,7332,4941,7333,4526,7334,3500,2780,1741,4942,2026,1742,7335, // 6784\n7336,3582,4527,2388,7337,7338,7339,4528,7340,4250,4943,7341,7342,7343,4944,7344, // 6800\n7345,7346,3020,7347,4945,7348,7349,7350,7351,3895,7352,3896,4064,3897,7353,7354, // 6816\n7355,4251,7356,7357,3898,7358,3779,7359,3780,3288,7360,7361,4529,7362,4946,4530, // 6832\n2027,7363,3899,4531,4947,3222,3583,7364,4948,7365,7366,7367,7368,4949,3501,4950, // 6848\n3781,4951,4532,7369,2517,4952,4252,4953,3155,7370,4954,4955,4253,2518,4533,7371, // 6864\n7372,2712,4254,7373,7374,7375,3670,4956,3671,7376,2389,3502,4065,7377,2338,7378, // 6880\n7379,7380,7381,3061,7382,4957,7383,7384,7385,7386,4958,4534,7387,7388,2993,7389, // 6896\n3062,7390,4959,7391,7392,7393,4960,3108,4961,7394,4535,7395,4962,3421,4536,7396, // 6912\n4963,7397,4964,1857,7398,4965,7399,7400,2176,3584,4966,7401,7402,3422,4537,3900, // 6928\n3585,7403,3782,7404,2852,7405,7406,7407,4538,3783,2654,3423,4967,4539,7408,3784, // 6944\n3586,2853,4540,4541,7409,3901,7410,3902,7411,7412,3785,3109,2327,3903,7413,7414, // 6960\n2970,4066,2932,7415,7416,7417,3904,3672,3424,7418,4542,4543,4544,7419,4968,7420, // 6976\n7421,4255,7422,7423,7424,7425,7426,4067,7427,3673,3365,4545,7428,3110,2559,3674, // 6992\n7429,7430,3156,7431,7432,3503,7433,3425,4546,7434,3063,2873,7435,3223,4969,4547, // 7008\n4548,2898,4256,4068,7436,4069,3587,3786,2933,3787,4257,4970,4971,3788,7437,4972, // 7024\n3064,7438,4549,7439,7440,7441,7442,7443,4973,3905,7444,2874,7445,7446,7447,7448, // 7040\n3021,7449,4550,3906,3588,4974,7450,7451,3789,3675,7452,2578,7453,4070,7454,7455, // 7056\n7456,4258,3676,7457,4975,7458,4976,4259,3790,3504,2634,4977,3677,4551,4260,7459, // 7072\n7460,7461,7462,3907,4261,4978,7463,7464,7465,7466,4979,4980,7467,7468,2213,4262, // 7088\n7469,7470,7471,3678,4981,7472,2439,7473,4263,3224,3289,7474,3908,2415,4982,7475, // 7104\n4264,7476,4983,2655,7477,7478,2732,4552,2854,2875,7479,7480,4265,7481,4553,4984, // 7120\n7482,7483,4266,7484,3679,3366,3680,2818,2781,2782,3367,3589,4554,3065,7485,4071, // 7136\n2899,7486,7487,3157,2462,4072,4555,4073,4985,4986,3111,4267,2687,3368,4556,4074, // 7152\n3791,4268,7488,3909,2783,7489,2656,1962,3158,4557,4987,1963,3159,3160,7490,3112, // 7168\n4988,4989,3022,4990,4991,3792,2855,7491,7492,2971,4558,7493,7494,4992,7495,7496, // 7184\n7497,7498,4993,7499,3426,4559,4994,7500,3681,4560,4269,4270,3910,7501,4075,4995, // 7200\n4271,7502,7503,4076,7504,4996,7505,3225,4997,4272,4077,2819,3023,7506,7507,2733, // 7216\n4561,7508,4562,7509,3369,3793,7510,3590,2508,7511,7512,4273,3113,2994,2616,7513, // 7232\n7514,7515,7516,7517,7518,2820,3911,4078,2748,7519,7520,4563,4998,7521,7522,7523, // 7248\n7524,4999,4274,7525,4564,3682,2239,4079,4565,7526,7527,7528,7529,5000,7530,7531, // 7264\n5001,4275,3794,7532,7533,7534,3066,5002,4566,3161,7535,7536,4080,7537,3162,7538, // 7280\n7539,4567,7540,7541,7542,7543,7544,7545,5003,7546,4568,7547,7548,7549,7550,7551, // 7296\n7552,7553,7554,7555,7556,5004,7557,7558,7559,5005,7560,3795,7561,4569,7562,7563, // 7312\n7564,2821,3796,4276,4277,4081,7565,2876,7566,5006,7567,7568,2900,7569,3797,3912, // 7328\n7570,7571,7572,4278,7573,7574,7575,5007,7576,7577,5008,7578,7579,4279,2934,7580, // 7344\n7581,5009,7582,4570,7583,4280,7584,7585,7586,4571,4572,3913,7587,4573,3505,7588, // 7360\n5010,7589,7590,7591,7592,3798,4574,7593,7594,5011,7595,4281,7596,7597,7598,4282, // 7376\n5012,7599,7600,5013,3163,7601,5014,7602,3914,7603,7604,2734,4575,4576,4577,7605, // 7392\n7606,7607,7608,7609,3506,5015,4578,7610,4082,7611,2822,2901,2579,3683,3024,4579, // 7408\n3507,7612,4580,7613,3226,3799,5016,7614,7615,7616,7617,7618,7619,7620,2995,3290, // 7424\n7621,4083,7622,5017,7623,7624,7625,7626,7627,4581,3915,7628,3291,7629,5018,7630, // 7440\n7631,7632,7633,4084,7634,7635,3427,3800,7636,7637,4582,7638,5019,4583,5020,7639, // 7456\n3916,7640,3801,5021,4584,4283,7641,7642,3428,3591,2269,7643,2617,7644,4585,3592, // 7472\n7645,4586,2902,7646,7647,3227,5022,7648,4587,7649,4284,7650,7651,7652,4588,2284, // 7488\n7653,5023,7654,7655,7656,4589,5024,3802,7657,7658,5025,3508,4590,7659,7660,7661, // 7504\n1969,5026,7662,7663,3684,1821,2688,7664,2028,2509,4285,7665,2823,1841,7666,2689, // 7520\n3114,7667,3917,4085,2160,5027,5028,2972,7668,5029,7669,7670,7671,3593,4086,7672, // 7536\n4591,4087,5030,3803,7673,7674,7675,7676,7677,7678,7679,4286,2366,4592,4593,3067, // 7552\n2328,7680,7681,4594,3594,3918,2029,4287,7682,5031,3919,3370,4288,4595,2856,7683, // 7568\n3509,7684,7685,5032,5033,7686,7687,3804,2784,7688,7689,7690,7691,3371,7692,7693, // 7584\n2877,5034,7694,7695,3920,4289,4088,7696,7697,7698,5035,7699,5036,4290,5037,5038, // 7600\n5039,7700,7701,7702,5040,5041,3228,7703,1760,7704,5042,3229,4596,2106,4089,7705, // 7616\n4597,2824,5043,2107,3372,7706,4291,4090,5044,7707,4091,7708,5045,3025,3805,4598, // 7632\n4292,4293,4294,3373,7709,4599,7710,5046,7711,7712,5047,5048,3806,7713,7714,7715, // 7648\n5049,7716,7717,7718,7719,4600,5050,7720,7721,7722,5051,7723,4295,3429,7724,7725, // 7664\n7726,7727,3921,7728,3292,5052,4092,7729,7730,7731,7732,7733,7734,7735,5053,5054, // 7680\n7736,7737,7738,7739,3922,3685,7740,7741,7742,7743,2635,5055,7744,5056,4601,7745, // 7696\n7746,2560,7747,7748,7749,7750,3923,7751,7752,7753,7754,7755,4296,2903,7756,7757, // 7712\n7758,7759,7760,3924,7761,5057,4297,7762,7763,5058,4298,7764,4093,7765,7766,5059, // 7728\n3925,7767,7768,7769,7770,7771,7772,7773,7774,7775,7776,3595,7777,4299,5060,4094, // 7744\n7778,3293,5061,7779,7780,4300,7781,7782,4602,7783,3596,7784,7785,3430,2367,7786, // 7760\n3164,5062,5063,4301,7787,7788,4095,5064,5065,7789,3374,3115,7790,7791,7792,7793, // 7776\n7794,7795,7796,3597,4603,7797,7798,3686,3116,3807,5066,7799,7800,5067,7801,7802, // 7792\n4604,4302,5068,4303,4096,7803,7804,3294,7805,7806,5069,4605,2690,7807,3026,7808, // 7808\n7809,7810,7811,7812,7813,7814,7815,7816,7817,7818,7819,7820,7821,7822,7823,7824, // 7824\n7825,7826,7827,7828,7829,7830,7831,7832,7833,7834,7835,7836,7837,7838,7839,7840, // 7840\n7841,7842,7843,7844,7845,7846,7847,7848,7849,7850,7851,7852,7853,7854,7855,7856, // 7856\n7857,7858,7859,7860,7861,7862,7863,7864,7865,7866,7867,7868,7869,7870,7871,7872, // 7872\n7873,7874,7875,7876,7877,7878,7879,7880,7881,7882,7883,7884,7885,7886,7887,7888, // 7888\n7889,7890,7891,7892,7893,7894,7895,7896,7897,7898,7899,7900,7901,7902,7903,7904, // 7904\n7905,7906,7907,7908,7909,7910,7911,7912,7913,7914,7915,7916,7917,7918,7919,7920, // 7920\n7921,7922,7923,7924,3926,7925,7926,7927,7928,7929,7930,7931,7932,7933,7934,7935, // 7936\n7936,7937,7938,7939,7940,7941,7942,7943,7944,7945,7946,7947,7948,7949,7950,7951, // 7952\n7952,7953,7954,7955,7956,7957,7958,7959,7960,7961,7962,7963,7964,7965,7966,7967, // 7968\n7968,7969,7970,7971,7972,7973,7974,7975,7976,7977,7978,7979,7980,7981,7982,7983, // 7984\n7984,7985,7986,7987,7988,7989,7990,7991,7992,7993,7994,7995,7996,7997,7998,7999, // 8000\n8000,8001,8002,8003,8004,8005,8006,8007,8008,8009,8010,8011,8012,8013,8014,8015, // 8016\n8016,8017,8018,8019,8020,8021,8022,8023,8024,8025,8026,8027,8028,8029,8030,8031, // 8032\n8032,8033,8034,8035,8036,8037,8038,8039,8040,8041,8042,8043,8044,8045,8046,8047, // 8048\n8048,8049,8050,8051,8052,8053,8054,8055,8056,8057,8058,8059,8060,8061,8062,8063, // 8064\n8064,8065,8066,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8079, // 8080\n8080,8081,8082,8083,8084,8085,8086,8087,8088,8089,8090,8091,8092,8093,8094,8095, // 8096\n8096,8097,8098,8099,8100,8101,8102,8103,8104,8105,8106,8107,8108,8109,8110,8111, // 8112\n8112,8113,8114,8115,8116,8117,8118,8119,8120,8121,8122,8123,8124,8125,8126,8127, // 8128\n8128,8129,8130,8131,8132,8133,8134,8135,8136,8137,8138,8139,8140,8141,8142,8143, // 8144\n8144,8145,8146,8147,8148,8149,8150,8151,8152,8153,8154,8155,8156,8157,8158,8159, // 8160\n8160,8161,8162,8163,8164,8165,8166,8167,8168,8169,8170,8171,8172,8173,8174,8175, // 8176\n8176,8177,8178,8179,8180,8181,8182,8183,8184,8185,8186,8187,8188,8189,8190,8191, // 8192\n8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207, // 8208\n8208,8209,8210,8211,8212,8213,8214,8215,8216,8217,8218,8219,8220,8221,8222,8223, // 8224\n8224,8225,8226,8227,8228,8229,8230,8231,8232,8233,8234,8235,8236,8237,8238,8239, // 8240\n8240,8241,8242,8243,8244,8245,8246,8247,8248,8249,8250,8251,8252,8253,8254,8255, // 8256\n8256,8257,8258,8259,8260,8261,8262,8263,8264,8265,8266,8267,8268,8269,8270,8271, // 8272\n****************************************************************************************/\n\n};\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/JpCntx.cpp",
    "content": "/**\n * @file    JpCntx.cpp\n * @brief   JpCntx\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nscore.h\"\n#include \"JpCntx.h\"\n\n//This is hiragana 2-char sequence table, the number in each cell represents its frequency category\nconst PRUint8 jp2CharContext[83][83] = \n{ \n{ 0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,},\n{ 2,4,0,4,0,3,0,4,0,3,4,4,4,2,4,3,3,4,3,2,3,3,4,2,3,3,3,2,4,1,4,3,3,1,5,4,3,4,3,4,3,5,3,0,3,5,4,2,0,3,1,0,3,3,0,3,3,0,1,1,0,4,3,0,3,3,0,4,0,2,0,3,5,5,5,5,4,0,4,1,0,3,4,},\n{ 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,},\n{ 0,4,0,5,0,5,0,4,0,4,5,4,4,3,5,3,5,1,5,3,4,3,4,4,3,4,3,3,4,3,5,4,4,3,5,5,3,5,5,5,3,5,5,3,4,5,5,3,1,3,2,0,3,4,0,4,2,0,4,2,1,5,3,2,3,5,0,4,0,2,0,5,4,4,5,4,5,0,4,0,0,4,4,},\n{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},\n{ 0,3,0,4,0,3,0,3,0,4,5,4,3,3,3,3,4,3,5,4,4,3,5,4,4,3,4,3,4,4,4,4,5,3,4,4,3,4,5,5,4,5,5,1,4,5,4,3,0,3,3,1,3,3,0,4,4,0,3,3,1,5,3,3,3,5,0,4,0,3,0,4,4,3,4,3,3,0,4,1,1,3,4,},\n{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},\n{ 0,4,0,3,0,3,0,4,0,3,4,4,3,2,2,1,2,1,3,1,3,3,3,3,3,4,3,1,3,3,5,3,3,0,4,3,0,5,4,3,3,5,4,4,3,4,4,5,0,1,2,0,1,2,0,2,2,0,1,0,0,5,2,2,1,4,0,3,0,1,0,4,4,3,5,4,3,0,2,1,0,4,3,},\n{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},\n{ 0,3,0,5,0,4,0,2,1,4,4,2,4,1,4,2,4,2,4,3,3,3,4,3,3,3,3,1,4,2,3,3,3,1,4,4,1,1,1,4,3,3,2,0,2,4,3,2,0,3,3,0,3,1,1,0,0,0,3,3,0,4,2,2,3,4,0,4,0,3,0,4,4,5,3,4,4,0,3,0,0,1,4,},\n{ 1,4,0,4,0,4,0,4,0,3,5,4,4,3,4,3,5,4,3,3,4,3,5,4,4,4,4,3,4,2,4,3,3,1,5,4,3,2,4,5,4,5,5,4,4,5,4,4,0,3,2,2,3,3,0,4,3,1,3,2,1,4,3,3,4,5,0,3,0,2,0,4,5,5,4,5,4,0,4,0,0,5,4,},\n{ 0,5,0,5,0,4,0,3,0,4,4,3,4,3,3,3,4,0,4,4,4,3,4,3,4,3,3,1,4,2,4,3,4,0,5,4,1,4,5,4,4,5,3,2,4,3,4,3,2,4,1,3,3,3,2,3,2,0,4,3,3,4,3,3,3,4,0,4,0,3,0,4,5,4,4,4,3,0,4,1,0,1,3,},\n{ 0,3,1,4,0,3,0,2,0,3,4,4,3,1,4,2,3,3,4,3,4,3,4,3,4,4,3,2,3,1,5,4,4,1,4,4,3,5,4,4,3,5,5,4,3,4,4,3,1,2,3,1,2,2,0,3,2,0,3,1,0,5,3,3,3,4,3,3,3,3,4,4,4,4,5,4,2,0,3,3,2,4,3,},\n{ 0,2,0,3,0,1,0,1,0,0,3,2,0,0,2,0,1,0,2,1,3,3,3,1,2,3,1,0,1,0,4,2,1,1,3,3,0,4,3,3,1,4,3,3,0,3,3,2,0,0,0,0,1,0,0,2,0,0,0,0,0,4,1,0,2,3,2,2,2,1,3,3,3,4,4,3,2,0,3,1,0,3,3,},\n{ 0,4,0,4,0,3,0,3,0,4,4,4,3,3,3,3,3,3,4,3,4,2,4,3,4,3,3,2,4,3,4,5,4,1,4,5,3,5,4,5,3,5,4,0,3,5,5,3,1,3,3,2,2,3,0,3,4,1,3,3,2,4,3,3,3,4,0,4,0,3,0,4,5,4,4,5,3,0,4,1,0,3,4,},\n{ 0,2,0,3,0,3,0,0,0,2,2,2,1,0,1,0,0,0,3,0,3,0,3,0,1,3,1,0,3,1,3,3,3,1,3,3,3,0,1,3,1,3,4,0,0,3,1,1,0,3,2,0,0,0,0,1,3,0,1,0,0,3,3,2,0,3,0,0,0,0,0,3,4,3,4,3,3,0,3,0,0,2,3,},\n{ 2,3,0,3,0,2,0,1,0,3,3,4,3,1,3,1,1,1,3,1,4,3,4,3,3,3,0,0,3,1,5,4,3,1,4,3,2,5,5,4,4,4,4,3,3,4,4,4,0,2,1,1,3,2,0,1,2,0,0,1,0,4,1,3,3,3,0,3,0,1,0,4,4,4,5,5,3,0,2,0,0,4,4,},\n{ 0,2,0,1,0,3,1,3,0,2,3,3,3,0,3,1,0,0,3,0,3,2,3,1,3,2,1,1,0,0,4,2,1,0,2,3,1,4,3,2,0,4,4,3,1,3,1,3,0,1,0,0,1,0,0,0,1,0,0,0,0,4,1,1,1,2,0,3,0,0,0,3,4,2,4,3,2,0,1,0,0,3,3,},\n{ 0,1,0,4,0,5,0,4,0,2,4,4,2,3,3,2,3,3,5,3,3,3,4,3,4,2,3,0,4,3,3,3,4,1,4,3,2,1,5,5,3,4,5,1,3,5,4,2,0,3,3,0,1,3,0,4,2,0,1,3,1,4,3,3,3,3,0,3,0,1,0,3,4,4,4,5,5,0,3,0,1,4,5,},\n{ 0,2,0,3,0,3,0,0,0,2,3,1,3,0,4,0,1,1,3,0,3,4,3,2,3,1,0,3,3,2,3,1,3,0,2,3,0,2,1,4,1,2,2,0,0,3,3,0,0,2,0,0,0,1,0,0,0,0,2,2,0,3,2,1,3,3,0,2,0,2,0,0,3,3,1,2,4,0,3,0,2,2,3,},\n{ 2,4,0,5,0,4,0,4,0,2,4,4,4,3,4,3,3,3,1,2,4,3,4,3,4,4,5,0,3,3,3,3,2,0,4,3,1,4,3,4,1,4,4,3,3,4,4,3,1,2,3,0,4,2,0,4,1,0,3,3,0,4,3,3,3,4,0,4,0,2,0,3,5,3,4,5,2,0,3,0,0,4,5,},\n{ 0,3,0,4,0,1,0,1,0,1,3,2,2,1,3,0,3,0,2,0,2,0,3,0,2,0,0,0,1,0,1,1,0,0,3,1,0,0,0,4,0,3,1,0,2,1,3,0,0,0,0,0,0,3,0,0,0,0,0,0,0,4,2,2,3,1,0,3,0,0,0,1,4,4,4,3,0,0,4,0,0,1,4,},\n{ 1,4,1,5,0,3,0,3,0,4,5,4,4,3,5,3,3,4,4,3,4,1,3,3,3,3,2,1,4,1,5,4,3,1,4,4,3,5,4,4,3,5,4,3,3,4,4,4,0,3,3,1,2,3,0,3,1,0,3,3,0,5,4,4,4,4,4,4,3,3,5,4,4,3,3,5,4,0,3,2,0,4,4,},\n{ 0,2,0,3,0,1,0,0,0,1,3,3,3,2,4,1,3,0,3,1,3,0,2,2,1,1,0,0,2,0,4,3,1,0,4,3,0,4,4,4,1,4,3,1,1,3,3,1,0,2,0,0,1,3,0,0,0,0,2,0,0,4,3,2,4,3,5,4,3,3,3,4,3,3,4,3,3,0,2,1,0,3,3,},\n{ 0,2,0,4,0,3,0,2,0,2,5,5,3,4,4,4,4,1,4,3,3,0,4,3,4,3,1,3,3,2,4,3,0,3,4,3,0,3,4,4,2,4,4,0,4,5,3,3,2,2,1,1,1,2,0,1,5,0,3,3,2,4,3,3,3,4,0,3,0,2,0,4,4,3,5,5,0,0,3,0,2,3,3,},\n{ 0,3,0,4,0,3,0,1,0,3,4,3,3,1,3,3,3,0,3,1,3,0,4,3,3,1,1,0,3,0,3,3,0,0,4,4,0,1,5,4,3,3,5,0,3,3,4,3,0,2,0,1,1,1,0,1,3,0,1,2,1,3,3,2,3,3,0,3,0,1,0,1,3,3,4,4,1,0,1,2,2,1,3,},\n{ 0,1,0,4,0,4,0,3,0,1,3,3,3,2,3,1,1,0,3,0,3,3,4,3,2,4,2,0,1,0,4,3,2,0,4,3,0,5,3,3,2,4,4,4,3,3,3,4,0,1,3,0,0,1,0,0,1,0,0,0,0,4,2,3,3,3,0,3,0,0,0,4,4,4,5,3,2,0,3,3,0,3,5,},\n{ 0,2,0,3,0,0,0,3,0,1,3,0,2,0,0,0,1,0,3,1,1,3,3,0,0,3,0,0,3,0,2,3,1,0,3,1,0,3,3,2,0,4,2,2,0,2,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,2,1,2,0,1,0,1,0,0,0,1,3,1,2,0,0,0,1,0,0,1,4,},\n{ 0,3,0,3,0,5,0,1,0,2,4,3,1,3,3,2,1,1,5,2,1,0,5,1,2,0,0,0,3,3,2,2,3,2,4,3,0,0,3,3,1,3,3,0,2,5,3,4,0,3,3,0,1,2,0,2,2,0,3,2,0,2,2,3,3,3,0,2,0,1,0,3,4,4,2,5,4,0,3,0,0,3,5,},\n{ 0,3,0,3,0,3,0,1,0,3,3,3,3,0,3,0,2,0,2,1,1,0,2,0,1,0,0,0,2,1,0,0,1,0,3,2,0,0,3,3,1,2,3,1,0,3,3,0,0,1,0,0,0,0,0,2,0,0,0,0,0,2,3,1,2,3,0,3,0,1,0,3,2,1,0,4,3,0,1,1,0,3,3,},\n{ 0,4,0,5,0,3,0,3,0,4,5,5,4,3,5,3,4,3,5,3,3,2,5,3,4,4,4,3,4,3,4,5,5,3,4,4,3,4,4,5,4,4,4,3,4,5,5,4,2,3,4,2,3,4,0,3,3,1,4,3,2,4,3,3,5,5,0,3,0,3,0,5,5,5,5,4,4,0,4,0,1,4,4,},\n{ 0,4,0,4,0,3,0,3,0,3,5,4,4,2,3,2,5,1,3,2,5,1,4,2,3,2,3,3,4,3,3,3,3,2,5,4,1,3,3,5,3,4,4,0,4,4,3,1,1,3,1,0,2,3,0,2,3,0,3,0,0,4,3,1,3,4,0,3,0,2,0,4,4,4,3,4,5,0,4,0,0,3,4,},\n{ 0,3,0,3,0,3,1,2,0,3,4,4,3,3,3,0,2,2,4,3,3,1,3,3,3,1,1,0,3,1,4,3,2,3,4,4,2,4,4,4,3,4,4,3,2,4,4,3,1,3,3,1,3,3,0,4,1,0,2,2,1,4,3,2,3,3,5,4,3,3,5,4,4,3,3,0,4,0,3,2,2,4,4,},\n{ 0,2,0,1,0,0,0,0,0,1,2,1,3,0,0,0,0,0,2,0,1,2,1,0,0,1,0,0,0,0,3,0,0,1,0,1,1,3,1,0,0,0,1,1,0,1,1,0,0,0,0,0,2,0,0,0,0,0,0,0,0,1,1,2,2,0,3,4,0,0,0,1,1,0,0,1,0,0,0,0,0,1,1,},\n{ 0,1,0,0,0,1,0,0,0,0,4,0,4,1,4,0,3,0,4,0,3,0,4,0,3,0,3,0,4,1,5,1,4,0,0,3,0,5,0,5,2,0,1,0,0,0,2,1,4,0,1,3,0,0,3,0,0,3,1,1,4,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,},\n{ 1,4,0,5,0,3,0,2,0,3,5,4,4,3,4,3,5,3,4,3,3,0,4,3,3,3,3,3,3,2,4,4,3,1,3,4,4,5,4,4,3,4,4,1,3,5,4,3,3,3,1,2,2,3,3,1,3,1,3,3,3,5,3,3,4,5,0,3,0,3,0,3,4,3,4,4,3,0,3,0,2,4,3,},\n{ 0,1,0,4,0,0,0,0,0,1,4,0,4,1,4,2,4,0,3,0,1,0,1,0,0,0,0,0,2,0,3,1,1,1,0,3,0,0,0,1,2,1,0,0,1,1,1,1,0,1,0,0,0,1,0,0,3,0,0,0,0,3,2,0,2,2,0,1,0,0,0,2,3,2,3,3,0,0,0,0,2,1,0,},\n{ 0,5,1,5,0,3,0,3,0,5,4,4,5,1,5,3,3,0,4,3,4,3,5,3,4,3,3,2,4,3,4,3,3,0,3,3,1,4,4,3,4,4,4,3,4,5,5,3,2,3,1,1,3,3,1,3,1,1,3,3,2,4,5,3,3,5,0,4,0,3,0,4,4,3,5,3,3,0,3,4,0,4,3,},\n{ 0,5,0,5,0,3,0,2,0,4,4,3,5,2,4,3,3,3,4,4,4,3,5,3,5,3,3,1,4,0,4,3,3,0,3,3,0,4,4,4,4,5,4,3,3,5,5,3,2,3,1,2,3,2,0,1,0,0,3,2,2,4,4,3,1,5,0,4,0,3,0,4,3,1,3,2,1,0,3,3,0,3,3,},\n{ 0,4,0,5,0,5,0,4,0,4,5,5,5,3,4,3,3,2,5,4,4,3,5,3,5,3,4,0,4,3,4,4,3,2,4,4,3,4,5,4,4,5,5,0,3,5,5,4,1,3,3,2,3,3,1,3,1,0,4,3,1,4,4,3,4,5,0,4,0,2,0,4,3,4,4,3,3,0,4,0,0,5,5,},\n{ 0,4,0,4,0,5,0,1,1,3,3,4,4,3,4,1,3,0,5,1,3,0,3,1,3,1,1,0,3,0,3,3,4,0,4,3,0,4,4,4,3,4,4,0,3,5,4,1,0,3,0,0,2,3,0,3,1,0,3,1,0,3,2,1,3,5,0,3,0,1,0,3,2,3,3,4,4,0,2,2,0,4,4,},\n{ 2,4,0,5,0,4,0,3,0,4,5,5,4,3,5,3,5,3,5,3,5,2,5,3,4,3,3,4,3,4,5,3,2,1,5,4,3,2,3,4,5,3,4,1,2,5,4,3,0,3,3,0,3,2,0,2,3,0,4,1,0,3,4,3,3,5,0,3,0,1,0,4,5,5,5,4,3,0,4,2,0,3,5,},\n{ 0,5,0,4,0,4,0,2,0,5,4,3,4,3,4,3,3,3,4,3,4,2,5,3,5,3,4,1,4,3,4,4,4,0,3,5,0,4,4,4,4,5,3,1,3,4,5,3,3,3,3,3,3,3,0,2,2,0,3,3,2,4,3,3,3,5,3,4,1,3,3,5,3,2,0,0,0,0,4,3,1,3,3,},\n{ 0,1,0,3,0,3,0,1,0,1,3,3,3,2,3,3,3,0,3,0,0,0,3,1,3,0,0,0,2,2,2,3,0,0,3,2,0,1,2,4,1,3,3,0,0,3,3,3,0,1,0,0,2,1,0,0,3,0,3,1,0,3,0,0,1,3,0,2,0,1,0,3,3,1,3,3,0,0,1,1,0,3,3,},\n{ 0,2,0,3,0,2,1,4,0,2,2,3,1,1,3,1,1,0,2,0,3,1,2,3,1,3,0,0,1,0,4,3,2,3,3,3,1,4,2,3,3,3,3,1,0,3,1,4,0,1,1,0,1,2,0,1,1,0,1,1,0,3,1,3,2,2,0,1,0,0,0,2,3,3,3,1,0,0,0,0,0,2,3,},\n{ 0,5,0,4,0,5,0,2,0,4,5,5,3,3,4,3,3,1,5,4,4,2,4,4,4,3,4,2,4,3,5,5,4,3,3,4,3,3,5,5,4,5,5,1,3,4,5,3,1,4,3,1,3,3,0,3,3,1,4,3,1,4,5,3,3,5,0,4,0,3,0,5,3,3,1,4,3,0,4,0,1,5,3,},\n{ 0,5,0,5,0,4,0,2,0,4,4,3,4,3,3,3,3,3,5,4,4,4,4,4,4,5,3,3,5,2,4,4,4,3,4,4,3,3,4,4,5,5,3,3,4,3,4,3,3,4,3,3,3,3,1,2,2,1,4,3,3,5,4,4,3,4,0,4,0,3,0,4,4,4,4,4,1,0,4,2,0,2,4,},\n{ 0,4,0,4,0,3,0,1,0,3,5,2,3,0,3,0,2,1,4,2,3,3,4,1,4,3,3,2,4,1,3,3,3,0,3,3,0,0,3,3,3,5,3,3,3,3,3,2,0,2,0,0,2,0,0,2,0,0,1,0,0,3,1,2,2,3,0,3,0,2,0,4,4,3,3,4,1,0,3,0,0,2,4,},\n{ 0,0,0,4,0,0,0,0,0,0,1,0,1,0,2,0,0,0,0,0,1,0,2,0,1,0,0,0,0,0,3,1,3,0,3,2,0,0,0,1,0,3,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,0,2,0,0,0,0,0,0,2,},\n{ 0,2,1,3,0,2,0,2,0,3,3,3,3,1,3,1,3,3,3,3,3,3,4,2,2,1,2,1,4,0,4,3,1,3,3,3,2,4,3,5,4,3,3,3,3,3,3,3,0,1,3,0,2,0,0,1,0,0,1,0,0,4,2,0,2,3,0,3,3,0,3,3,4,2,3,1,4,0,1,2,0,2,3,},\n{ 0,3,0,3,0,1,0,3,0,2,3,3,3,0,3,1,2,0,3,3,2,3,3,2,3,2,3,1,3,0,4,3,2,0,3,3,1,4,3,3,2,3,4,3,1,3,3,1,1,0,1,1,0,1,0,1,0,1,0,0,0,4,1,1,0,3,0,3,1,0,2,3,3,3,3,3,1,0,0,2,0,3,3,},\n{ 0,0,0,0,0,0,0,0,0,0,3,0,2,0,3,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,3,0,3,0,3,1,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,2,0,2,3,0,0,0,0,0,0,0,0,3,},\n{ 0,2,0,3,1,3,0,3,0,2,3,3,3,1,3,1,3,1,3,1,3,3,3,1,3,0,2,3,1,1,4,3,3,2,3,3,1,2,2,4,1,3,3,0,1,4,2,3,0,1,3,0,3,0,0,1,3,0,2,0,0,3,3,2,1,3,0,3,0,2,0,3,4,4,4,3,1,0,3,0,0,3,3,},\n{ 0,2,0,1,0,2,0,0,0,1,3,2,2,1,3,0,1,1,3,0,3,2,3,1,2,0,2,0,1,1,3,3,3,0,3,3,1,1,2,3,2,3,3,1,2,3,2,0,0,1,0,0,0,0,0,0,3,0,1,0,0,2,1,2,1,3,0,3,0,0,0,3,4,4,4,3,2,0,2,0,0,2,4,},\n{ 0,0,0,1,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,2,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,3,1,0,0,0,0,0,0,0,3,},\n{ 0,3,0,3,0,2,0,3,0,3,3,3,2,3,2,2,2,0,3,1,3,3,3,2,3,3,0,0,3,0,3,2,2,0,2,3,1,4,3,4,3,3,2,3,1,5,4,4,0,3,1,2,1,3,0,3,1,1,2,0,2,3,1,3,1,3,0,3,0,1,0,3,3,4,4,2,1,0,2,1,0,2,4,},\n{ 0,1,0,3,0,1,0,2,0,1,4,2,5,1,4,0,2,0,2,1,3,1,4,0,2,1,0,0,2,1,4,1,1,0,3,3,0,5,1,3,2,3,3,1,0,3,2,3,0,1,0,0,0,0,0,0,1,0,0,0,0,4,0,1,0,3,0,2,0,1,0,3,3,3,4,3,3,0,0,0,0,2,3,},\n{ 0,0,0,1,0,0,0,0,0,0,2,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,1,0,0,0,0,0,3,},\n{ 0,1,0,3,0,4,0,3,0,2,4,3,1,0,3,2,2,1,3,1,2,2,3,1,1,1,2,1,3,0,1,2,0,1,3,2,1,3,0,5,5,1,0,0,1,3,2,1,0,3,0,0,1,0,0,0,0,0,3,4,0,1,1,1,3,2,0,2,0,1,0,2,3,3,1,2,3,0,1,0,1,0,4,},\n{ 0,0,0,1,0,3,0,3,0,2,2,1,0,0,4,0,3,0,3,1,3,0,3,0,3,0,1,0,3,0,3,1,3,0,3,3,0,0,1,2,1,1,1,0,1,2,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,2,2,1,2,0,0,2,0,0,0,0,2,3,3,3,3,0,0,0,0,1,4,},\n{ 0,0,0,3,0,3,0,0,0,0,3,1,1,0,3,0,1,0,2,0,1,0,0,0,0,0,0,0,1,0,3,0,2,0,2,3,0,0,2,2,3,1,2,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,2,0,0,0,0,2,3,},\n{ 2,4,0,5,0,5,0,4,0,3,4,3,3,3,4,3,3,3,4,3,4,4,5,4,5,5,5,2,3,0,5,5,4,1,5,4,3,1,5,4,3,4,4,3,3,4,3,3,0,3,2,0,2,3,0,3,0,0,3,3,0,5,3,2,3,3,0,3,0,3,0,3,4,5,4,5,3,0,4,3,0,3,4,},\n{ 0,3,0,3,0,3,0,3,0,3,3,4,3,2,3,2,3,0,4,3,3,3,3,3,3,3,3,0,3,2,4,3,3,1,3,4,3,4,4,4,3,4,4,3,2,4,4,1,0,2,0,0,1,1,0,2,0,0,3,1,0,5,3,2,1,3,0,3,0,1,2,4,3,2,4,3,3,0,3,2,0,4,4,},\n{ 0,3,0,3,0,1,0,0,0,1,4,3,3,2,3,1,3,1,4,2,3,2,4,2,3,4,3,0,2,2,3,3,3,0,3,3,3,0,3,4,1,3,3,0,3,4,3,3,0,1,1,0,1,0,0,0,4,0,3,0,0,3,1,2,1,3,0,4,0,1,0,4,3,3,4,3,3,0,2,0,0,3,3,},\n{ 0,3,0,4,0,1,0,3,0,3,4,3,3,0,3,3,3,1,3,1,3,3,4,3,3,3,0,0,3,1,5,3,3,1,3,3,2,5,4,3,3,4,5,3,2,5,3,4,0,1,0,0,0,0,0,2,0,0,1,1,0,4,2,2,1,3,0,3,0,2,0,4,4,3,5,3,2,0,1,1,0,3,4,},\n{ 0,5,0,4,0,5,0,2,0,4,4,3,3,2,3,3,3,1,4,3,4,1,5,3,4,3,4,0,4,2,4,3,4,1,5,4,0,4,4,4,4,5,4,1,3,5,4,2,1,4,1,1,3,2,0,3,1,0,3,2,1,4,3,3,3,4,0,4,0,3,0,4,4,4,3,3,3,0,4,2,0,3,4,},\n{ 1,4,0,4,0,3,0,1,0,3,3,3,1,1,3,3,2,2,3,3,1,0,3,2,2,1,2,0,3,1,2,1,2,0,3,2,0,2,2,3,3,4,3,0,3,3,1,2,0,1,1,3,1,2,0,0,3,0,1,1,0,3,2,2,3,3,0,3,0,0,0,2,3,3,4,3,3,0,1,0,0,1,4,},\n{ 0,4,0,4,0,4,0,0,0,3,4,4,3,1,4,2,3,2,3,3,3,1,4,3,4,0,3,0,4,2,3,3,2,2,5,4,2,1,3,4,3,4,3,1,3,3,4,2,0,2,1,0,3,3,0,0,2,0,3,1,0,4,4,3,4,3,0,4,0,1,0,2,4,4,4,4,4,0,3,2,0,3,3,},\n{ 0,0,0,1,0,4,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,3,2,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,2,},\n{ 0,2,0,3,0,4,0,4,0,1,3,3,3,0,4,0,2,1,2,1,1,1,2,0,3,1,1,0,1,0,3,1,0,0,3,3,2,0,1,1,0,0,0,0,0,1,0,2,0,2,2,0,3,1,0,0,1,0,1,1,0,1,2,0,3,0,0,0,0,1,0,0,3,3,4,3,1,0,1,0,3,0,2,},\n{ 0,0,0,3,0,5,0,0,0,0,1,0,2,0,3,1,0,1,3,0,0,0,2,0,0,0,1,0,0,0,1,1,0,0,4,0,0,0,2,3,0,1,4,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,1,0,0,0,0,0,0,0,2,0,0,3,0,0,0,0,0,3,},\n{ 0,2,0,5,0,5,0,1,0,2,4,3,3,2,5,1,3,2,3,3,3,0,4,1,2,0,3,0,4,0,2,2,1,1,5,3,0,0,1,4,2,3,2,0,3,3,3,2,0,2,4,1,1,2,0,1,1,0,3,1,0,1,3,1,2,3,0,2,0,0,0,1,3,5,4,4,4,0,3,0,0,1,3,},\n{ 0,4,0,5,0,4,0,4,0,4,5,4,3,3,4,3,3,3,4,3,4,4,5,3,4,5,4,2,4,2,3,4,3,1,4,4,1,3,5,4,4,5,5,4,4,5,5,5,2,3,3,1,4,3,1,3,3,0,3,3,1,4,3,4,4,4,0,3,0,4,0,3,3,4,4,5,0,0,4,3,0,4,5,},\n{ 0,4,0,4,0,3,0,3,0,3,4,4,4,3,3,2,4,3,4,3,4,3,5,3,4,3,2,1,4,2,4,4,3,1,3,4,2,4,5,5,3,4,5,4,1,5,4,3,0,3,2,2,3,2,1,3,1,0,3,3,3,5,3,3,3,5,4,4,2,3,3,4,3,3,3,2,1,0,3,2,1,4,3,},\n{ 0,4,0,5,0,4,0,3,0,3,5,5,3,2,4,3,4,0,5,4,4,1,4,4,4,3,3,3,4,3,5,5,2,3,3,4,1,2,5,5,3,5,5,2,3,5,5,4,0,3,2,0,3,3,1,1,5,1,4,1,0,4,3,2,3,5,0,4,0,3,0,5,4,3,4,3,0,0,4,1,0,4,4,},\n{ 1,3,0,4,0,2,0,2,0,2,5,5,3,3,3,3,3,0,4,2,3,4,4,4,3,4,0,0,3,4,5,4,3,3,3,3,2,5,5,4,5,5,5,4,3,5,5,5,1,3,1,0,1,0,0,3,2,0,4,2,0,5,2,3,2,4,1,3,0,3,0,4,5,4,5,4,3,0,4,2,0,5,4,},\n{ 0,3,0,4,0,5,0,3,0,3,4,4,3,2,3,2,3,3,3,3,3,2,4,3,3,2,2,0,3,3,3,3,3,1,3,3,3,0,4,4,3,4,4,1,1,4,4,2,0,3,1,0,1,1,0,4,1,0,2,3,1,3,3,1,3,4,0,3,0,1,0,3,1,3,0,0,1,0,2,0,0,4,4,},\n{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},\n{ 0,3,0,3,0,2,0,3,0,1,5,4,3,3,3,1,4,2,1,2,3,4,4,2,4,4,5,0,3,1,4,3,4,0,4,3,3,3,2,3,2,5,3,4,3,2,2,3,0,0,3,0,2,1,0,1,2,0,0,0,0,2,1,1,3,1,0,2,0,4,0,3,4,4,4,5,2,0,2,0,0,1,3,},\n{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,0,0,1,1,0,0,0,4,2,1,1,0,1,0,3,2,0,0,3,1,1,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,1,0,0,0,2,0,0,0,1,4,0,4,2,1,0,0,0,0,0,1,},\n{ 0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,3,1,0,0,0,2,0,2,1,0,0,1,2,1,0,1,1,0,0,3,0,0,0,0,0,0,0,0,0,0,0,1,3,1,0,0,0,0,0,1,0,0,2,1,0,0,0,0,0,0,0,0,2,},\n{ 0,4,0,4,0,4,0,3,0,4,4,3,4,2,4,3,2,0,4,4,4,3,5,3,5,3,3,2,4,2,4,3,4,3,1,4,0,2,3,4,4,4,3,3,3,4,4,4,3,4,1,3,4,3,2,1,2,1,3,3,3,4,4,3,3,5,0,4,0,3,0,4,3,3,3,2,1,0,3,0,0,3,3,},\n{ 0,4,0,3,0,3,0,3,0,3,5,5,3,3,3,3,4,3,4,3,3,3,4,4,4,3,3,3,3,4,3,5,3,3,1,3,2,4,5,5,5,5,4,3,4,5,5,3,2,2,3,3,3,3,2,3,3,1,2,3,2,4,3,3,3,4,0,4,0,2,0,4,3,2,2,1,2,0,3,0,0,4,1,},\n};\n\n#define MINIMUM_DATA_THRESHOLD  4\n\nvoid JapaneseContextAnalysis::HandleData(const char* aBuf, PRUint32 aLen)\n{\n  PRUint32 charLen;\n  PRInt32 order;\n  PRUint32 i;\n  \n  if (mDone)\n    return;\n\n  //The buffer we got is byte oriented, and a character may span in more than one\n  //buffers. In case the last one or two byte in last buffer is not complete, we \n  //record how many byte needed to complete that character and skip these bytes here.\n  //We can choose to record those bytes as well and analyse the character once it \n  //is complete, but since a character will not make much difference, by simply skipping\n  //this character will simply our logic and improve performance.\n  for (i = mNeedToSkipCharNum; i < aLen; )\n  {\n    order = GetOrder(aBuf+i, &charLen);\n    i+= charLen;\n    if (i > aLen){\n      mNeedToSkipCharNum = i - aLen;\n      mLastCharOrder = -1;\n    }\n    else \n    {\n      if (order != -1 && mLastCharOrder != -1)\n      {\n        mTotalRel ++;\n        if (mTotalRel > MAX_REL_THRESHOLD)\n        {\n          mDone = true;\n          break;\n        }\n        mRelSample[jp2CharContext[mLastCharOrder][order]]++;\n      }\n      mLastCharOrder = order;\n    }\n  }\n  \n  return;\n}\n\nvoid JapaneseContextAnalysis::Reset(bool aIsPreferredLanguage)\n{\n  mTotalRel = 0;\n  for (PRUint32 i = 0; i < NUM_OF_CATEGORY; i++)\n    mRelSample[i] = 0;\n  mNeedToSkipCharNum = 0;\n  mLastCharOrder = -1;\n  mDone = false;\n  mDataThreshold = aIsPreferredLanguage ? 0 : MINIMUM_DATA_THRESHOLD;\n}\n#define DONT_KNOW (float)-1\n\nfloat  JapaneseContextAnalysis::GetConfidence(void)\n{\n  //This is just one way to calculate confidence. It works well for me.\n  if (mTotalRel > mDataThreshold)\n    return ((float)(mTotalRel - mRelSample[0]))/mTotalRel;\n  else \n    return (float)DONT_KNOW;\n}\n\n\nPRInt32 SJISContextAnalysis::GetOrder(const char* str, PRUint32 *charLen)\n{\n  //find out current char's byte length\n  if (((unsigned char)*str >= (unsigned char)0x81 && (unsigned char)*str <= (unsigned char)0x9f) ||\n      ((unsigned char)*str >= (unsigned char)0xe0 && (unsigned char)*str <= (unsigned char)0xfc) )\n      *charLen = 2;\n  else \n      *charLen = 1;\n\n  //return its order if it is hiragana\n  if (*str == '\\202' && \n        (unsigned char)*(str+1) >= (unsigned char)0x9f && \n        (unsigned char)*(str+1) <= (unsigned char)0xf1)\n    return (unsigned char)*(str+1) - (unsigned char)0x9f;\n  return -1;\n}\n\nPRInt32 EUCJPContextAnalysis::GetOrder(const char* str, PRUint32 *charLen)\n{\n  //find out current char's byte length\n  if ((unsigned char)*str == (unsigned char)0x8e ||\n      ((unsigned char)*str >= (unsigned char)0xa1 && \n      (unsigned char)*str <= (unsigned char)0xfe))\n      *charLen = 2;\n  else if ((unsigned char)*str == (unsigned char)0x8f)\n    *charLen = 3;\n  else\n    *charLen = 1;\n\n  //return its order if it is hiragana\n  if ((unsigned char)*str == (unsigned char)0xa4 &&\n      (unsigned char)*(str+1) >= (unsigned char)0xa1 && \n      (unsigned char)*(str+1) <= (unsigned char)0xf3)\n     return (unsigned char)*(str+1) - (unsigned char)0xa1;\n  return -1;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/JpCntx.h",
    "content": "/**\n * @file    JpCntx.h\n * @brief   JpCntx\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef __JPCNTX_H__\n#define __JPCNTX_H__\n\n#define NUM_OF_CATEGORY 6\n\n#include \"nscore.h\" \n\n#define ENOUGH_REL_THRESHOLD  100\n#define MAX_REL_THRESHOLD     1000\n\n//hiragana frequency category table\nextern const PRUint8 jp2CharContext[83][83];\n\nclass JapaneseContextAnalysis\n{\npublic:\n  JapaneseContextAnalysis() {Reset(false);}\n\n  void HandleData(const char* aBuf, PRUint32 aLen);\n\n  void HandleOneChar(const char* aStr, PRUint32 aCharLen)\n  {\n    PRInt32 order;\n\n    //if we received enough data, stop here   \n    if (mTotalRel > MAX_REL_THRESHOLD)   mDone = true;\n    if (mDone)       return;\n     \n    //Only 2-bytes characters are of our interest\n    order = (aCharLen == 2) ? GetOrder(aStr) : -1;\n    if (order != -1 && mLastCharOrder != -1)\n    {\n      mTotalRel++;\n      //count this sequence to its category counter\n      mRelSample[jp2CharContext[mLastCharOrder][order]]++;\n    }\n    mLastCharOrder = order;\n  }\n\n  float GetConfidence(void);\n  void      Reset(bool aIsPreferredLanguage);\n  bool GotEnoughData() {return mTotalRel > ENOUGH_REL_THRESHOLD;}\n\nprotected:\n  virtual PRInt32 GetOrder(const char* str, PRUint32 *charLen) = 0;\n  virtual PRInt32 GetOrder(const char* str) = 0;\n\n  //category counters, each integer counts sequences in its category\n  PRUint32 mRelSample[NUM_OF_CATEGORY];\n\n  //total sequence received\n  PRUint32 mTotalRel;\n\n  //Number of sequences needed to trigger detection\n  PRUint32 mDataThreshold;\n  \n  //The order of previous char\n  PRInt32  mLastCharOrder;\n\n  //if last byte in current buffer is not the last byte of a character, we\n  //need to know how many byte to skip in next buffer.\n  PRUint32 mNeedToSkipCharNum;\n\n  //If this flag is set to true, detection is done and conclusion has been made\n  bool     mDone;\n};\n\n\nclass SJISContextAnalysis : public JapaneseContextAnalysis\n{\n  //SJISContextAnalysis(){};\nprotected:\n  PRInt32 GetOrder(const char* str, PRUint32 *charLen);\n\n  PRInt32 GetOrder(const char* str)\n  {\n    //We only interested in Hiragana, so first byte is '\\202'\n    if (*str == '\\202' && \n          (unsigned char)*(str+1) >= (unsigned char)0x9f && \n          (unsigned char)*(str+1) <= (unsigned char)0xf1)\n      return (unsigned char)*(str+1) - (unsigned char)0x9f;\n    return -1;\n  }\n};\n\nclass EUCJPContextAnalysis : public JapaneseContextAnalysis\n{\nprotected:\n  PRInt32 GetOrder(const char* str, PRUint32 *charLen);\n  PRInt32 GetOrder(const char* str)\n    //We only interested in Hiragana, so first byte is '\\244'\n  {\n    if (*str == '\\244' &&\n          (unsigned char)*(str+1) >= (unsigned char)0xa1 &&\n          (unsigned char)*(str+1) <= (unsigned char)0xf3)\n      return (unsigned char)*(str+1) - (unsigned char)0xa1;\n    return -1;\n  }\n};\n\n#endif /* __JPCNTX_H__ */\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/LangBulgarianModel.cpp",
    "content": "/**\n * @file    LangBulgarianModel.cpp\n * @brief   LangBulgarianModel\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsSBCharSetProber.h\"\n/****************************************************************\n255: Control characters that usually does not exist in any text\n254: Carriage/Return\n253: symbol (punctuation) that does not belong to word\n252: 0 - 9\n\n*****************************************************************/\n\n//Character Mapping Table:\n//this talbe is modified base on win1251BulgarianCharToOrderMap, so \n//only number <64 is sure valid\n\nstatic const unsigned char Latin5_BulgarianCharToOrderMap[] =\n{\n255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  //00\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  //10\n253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  //20\n252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  //30\n253, 77, 90, 99,100, 72,109,107,101, 79,185, 81,102, 76, 94, 82,  //40\n110,186,108, 91, 74,119, 84, 96,111,187,115,253,253,253,253,253,  //50\n253, 65, 69, 70, 66, 63, 68,112,103, 92,194,104, 95, 86, 87, 71,  //60\n116,195, 85, 93, 97,113,196,197,198,199,200,253,253,253,253,253,  //70\n194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,  //80\n210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,  //90\n 81,226,227,228,229,230,105,231,232,233,234,235,236, 45,237,238,  //a0\n 31, 32, 35, 43, 37, 44, 55, 47, 40, 59, 33, 46, 38, 36, 41, 30,  //b0\n 39, 28, 34, 51, 48, 49, 53, 50, 54, 57, 61,239, 67,240, 60, 56,  //c0\n  1, 18,  9, 20, 11,  3, 23, 15,  2, 26, 12, 10, 14,  6,  4, 13,  //d0\n  7,  8,  5, 19, 29, 25, 22, 21, 27, 24, 17, 75, 52,241, 42, 16,  //e0\n 62,242,243,244, 58,245, 98,246,247,248,249,250,251, 91,252,253,  //f0\n};\n\nstatic const unsigned char win1251BulgarianCharToOrderMap[] =\n{\n255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  //00\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  //10\n253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  //20\n252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  //30\n253, 77, 90, 99,100, 72,109,107,101, 79,185, 81,102, 76, 94, 82,  //40\n110,186,108, 91, 74,119, 84, 96,111,187,115,253,253,253,253,253,  //50\n253, 65, 69, 70, 66, 63, 68,112,103, 92,194,104, 95, 86, 87, 71,  //60\n116,195, 85, 93, 97,113,196,197,198,199,200,253,253,253,253,253,  //70\n206,207,208,209,210,211,212,213,120,214,215,216,217,218,219,220,  //80\n221, 78, 64, 83,121, 98,117,105,222,223,224,225,226,227,228,229,  //90\n 88,230,231,232,233,122, 89,106,234,235,236,237,238, 45,239,240,  //a0\n 73, 80,118,114,241,242,243,244,245, 62, 58,246,247,248,249,250,  //b0\n 31, 32, 35, 43, 37, 44, 55, 47, 40, 59, 33, 46, 38, 36, 41, 30,  //c0\n 39, 28, 34, 51, 48, 49, 53, 50, 54, 57, 61,251, 67,252, 60, 56,  //d0\n  1, 18,  9, 20, 11,  3, 23, 15,  2, 26, 12, 10, 14,  6,  4, 13,  //e0\n  7,  8,  5, 19, 29, 25, 22, 21, 27, 24, 17, 75, 52,253, 42, 16,  //f0\n};\n\n//Model Table: \n//total sequences: 100%\n//first 512 sequences: 96.9392%\n//first 1024 sequences:3.0618%\n//rest  sequences:     0.2992%\n//negative sequences:  0.0020% \nstatic const PRUint8 BulgarianLangModel[] = \n{\n0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,3,3,3,3,3,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,2,2,3,2,2,1,2,2,\n3,1,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,3,3,3,3,3,3,0,3,0,1,\n0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,3,3,3,3,3,3,3,3,0,3,1,0,\n0,1,0,0,0,0,0,0,0,0,1,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,\n3,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,1,3,2,3,3,3,3,3,3,3,3,0,3,0,0,\n0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,1,3,2,3,3,3,3,3,3,3,3,0,3,0,0,\n0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,2,3,2,2,1,3,3,3,3,2,2,2,1,1,2,0,1,0,1,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,\n3,3,3,3,3,3,3,2,3,2,2,3,3,1,1,2,3,3,2,3,3,3,3,2,1,2,0,2,0,3,0,0,\n0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,\n3,3,3,3,3,3,3,1,3,3,3,3,3,2,3,2,3,3,3,3,3,2,3,3,1,3,0,3,0,2,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,\n3,3,3,3,3,3,3,3,1,3,3,2,3,3,3,1,3,3,2,3,2,2,2,0,0,2,0,2,0,2,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,\n3,3,3,3,3,3,3,3,3,0,3,3,3,2,2,3,3,3,1,2,2,3,2,1,1,2,0,2,0,0,0,0,\n1,0,0,0,0,0,0,0,0,0,2,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,\n3,3,3,3,3,3,3,2,3,3,1,2,3,2,2,2,3,3,3,3,3,2,2,3,1,2,0,2,1,2,0,0,\n0,0,0,0,0,0,0,0,0,0,3,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,\n3,3,3,3,3,1,3,3,3,3,3,2,3,3,3,2,3,3,2,3,2,2,2,3,1,2,0,1,0,1,0,0,\n0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,\n3,3,3,3,3,3,3,3,3,3,3,1,1,1,2,2,1,3,1,3,2,2,3,0,0,1,0,1,0,1,0,0,\n0,0,0,1,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,\n3,3,3,3,3,2,2,3,2,2,3,1,2,1,1,1,2,3,1,3,1,2,2,0,1,1,1,1,0,1,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,\n3,3,3,3,3,1,3,2,2,3,3,1,2,3,1,1,3,3,3,3,1,2,2,1,1,1,0,2,0,2,0,1,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,2,2,3,3,3,2,2,1,1,2,0,2,0,1,0,0,\n0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,\n3,0,1,2,1,3,3,2,3,3,3,3,3,2,3,2,1,0,3,1,2,1,2,1,2,3,2,1,0,1,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,1,1,2,3,3,3,3,3,3,3,3,3,3,3,3,0,0,3,1,3,3,2,3,3,2,2,2,0,1,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,3,3,3,0,3,3,3,3,3,2,1,1,2,1,3,3,0,3,1,1,1,1,3,2,0,1,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,\n3,3,2,2,2,3,3,3,3,3,3,3,3,3,3,3,1,1,3,1,3,3,2,3,2,2,2,3,0,2,0,0,\n0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,2,3,3,2,2,3,2,1,1,1,1,1,3,1,3,1,1,0,0,0,1,0,0,0,1,0,0,\n0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,2,3,2,0,3,2,0,3,0,2,0,0,2,1,3,1,0,0,1,0,0,0,1,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,\n3,3,3,3,2,1,1,1,1,2,1,1,2,1,1,1,2,2,1,2,1,1,1,0,1,1,0,1,0,1,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,\n3,3,3,3,2,1,3,1,1,2,1,3,2,1,1,0,1,2,3,2,1,1,1,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,3,3,3,2,2,1,0,1,0,0,1,0,0,0,2,1,0,3,0,0,1,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,\n3,3,3,2,3,2,3,3,1,3,2,1,1,1,2,1,1,2,1,3,0,1,0,0,0,1,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,1,1,2,2,3,3,2,3,2,2,2,3,1,2,2,1,1,2,1,1,2,2,0,1,1,0,1,0,2,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,2,1,3,1,0,2,2,1,3,2,1,0,0,2,0,2,0,1,0,0,0,0,0,0,0,1,0,0,\n0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,\n3,3,3,3,3,3,1,2,0,2,3,1,2,3,2,0,1,3,1,2,1,1,1,0,0,1,0,0,2,2,2,3,\n2,2,2,2,1,2,1,1,2,2,1,1,2,0,1,1,1,0,0,1,1,0,0,1,1,0,0,0,1,1,0,1,\n3,3,3,3,3,2,1,2,2,1,2,0,2,0,1,0,1,2,1,2,1,1,0,0,0,1,0,1,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,\n3,3,2,3,3,1,1,3,1,0,3,2,1,0,0,0,1,2,0,2,0,1,0,0,0,1,0,1,2,1,2,2,\n1,1,1,1,1,1,1,2,2,2,1,1,1,1,1,1,1,0,1,2,1,1,1,0,0,0,0,0,1,1,0,0,\n3,1,0,1,0,2,3,2,2,2,3,2,2,2,2,2,1,0,2,1,2,1,1,1,0,1,2,1,2,2,2,1,\n1,1,2,2,2,2,1,2,1,1,0,1,2,1,2,2,2,1,1,1,0,1,1,1,1,2,0,1,0,0,0,0,\n2,3,2,3,3,0,0,2,1,0,2,1,0,0,0,0,2,3,0,2,0,0,0,0,0,1,0,0,2,0,1,2,\n2,1,2,1,2,2,1,1,1,2,1,1,1,0,1,2,2,1,1,1,1,1,0,1,1,1,0,0,1,2,0,0,\n3,3,2,2,3,0,2,3,1,1,2,0,0,0,1,0,0,2,0,2,0,0,0,1,0,1,0,1,2,0,2,2,\n1,1,1,1,2,1,0,1,2,2,2,1,1,1,1,1,1,1,0,1,1,1,0,0,0,0,0,0,1,1,0,0,\n2,3,2,3,3,0,0,3,0,1,1,0,1,0,0,0,2,2,1,2,0,0,0,0,0,0,0,0,2,0,1,2,\n2,2,1,1,1,1,1,2,2,2,1,0,2,0,1,0,1,0,0,1,0,1,0,0,1,0,0,0,0,1,0,0,\n3,3,3,3,2,2,2,2,2,0,2,1,1,1,1,2,1,2,1,1,0,2,0,1,0,1,0,0,2,0,1,2,\n1,1,1,1,1,1,1,2,2,1,1,0,2,0,1,0,2,0,0,1,1,1,0,0,2,0,0,0,1,1,0,0,\n2,3,3,3,3,1,0,0,0,0,0,0,0,0,0,0,2,0,0,1,1,0,0,0,0,0,0,1,2,0,1,2,\n2,2,2,1,1,2,1,1,2,2,2,1,2,0,1,1,1,1,1,1,0,1,1,1,1,0,0,1,1,1,0,0,\n2,3,3,3,3,0,2,2,0,2,1,0,0,0,1,1,1,2,0,2,0,0,0,3,0,0,0,0,2,0,2,2,\n1,1,1,2,1,2,1,1,2,2,2,1,2,0,1,1,1,0,1,1,1,1,0,2,1,0,0,0,1,1,0,0,\n2,3,3,3,3,0,2,1,0,0,2,0,0,0,0,0,1,2,0,2,0,0,0,0,0,0,0,0,2,0,1,2,\n1,1,1,2,1,1,1,1,2,2,2,0,1,0,1,1,1,0,0,1,1,1,0,0,1,0,0,0,0,1,0,0,\n3,3,2,2,3,0,1,0,1,0,0,0,0,0,0,0,1,1,0,3,0,0,0,0,0,0,0,0,1,0,2,2,\n1,1,1,1,1,2,1,1,2,2,1,2,2,1,0,1,1,1,1,1,0,1,0,0,1,0,0,0,1,1,0,0,\n3,1,0,1,0,2,2,2,2,3,2,1,1,1,2,3,0,0,1,0,2,1,1,0,1,1,1,1,2,1,1,1,\n1,2,2,1,2,1,2,2,1,1,0,1,2,1,2,2,1,1,1,0,0,1,1,1,2,1,0,1,0,0,0,0,\n2,1,0,1,0,3,1,2,2,2,2,1,2,2,1,1,1,0,2,1,2,2,1,1,2,1,1,0,2,1,1,1,\n1,2,2,2,2,2,2,2,1,2,0,1,1,0,2,1,1,1,1,1,0,0,1,1,1,1,0,1,0,0,0,0,\n2,1,1,1,1,2,2,2,2,1,2,2,2,1,2,2,1,1,2,1,2,3,2,2,1,1,1,1,0,1,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,3,2,0,1,2,0,1,2,1,1,0,1,0,1,2,1,2,0,0,0,1,1,0,0,0,1,0,0,2,\n1,1,0,0,1,1,0,1,1,1,1,0,2,0,1,1,1,0,0,1,1,0,0,0,0,1,0,0,0,1,0,0,\n2,0,0,0,0,1,2,2,2,2,2,2,2,1,2,1,1,1,1,1,1,1,0,1,1,1,1,1,2,1,1,1,\n1,2,2,2,2,1,1,2,1,2,1,1,1,0,2,1,2,1,1,1,0,2,1,1,1,1,0,1,0,0,0,0,\n3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,\n1,1,0,1,0,1,1,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,3,2,0,0,0,0,1,0,0,0,0,0,0,1,1,0,2,0,0,0,0,0,0,0,0,1,0,1,2,\n1,1,1,1,1,1,0,0,2,2,2,2,2,0,1,1,0,1,1,1,1,1,0,0,1,0,0,0,1,1,0,1,\n2,3,1,2,1,0,1,1,0,2,2,2,0,0,1,0,0,1,1,1,1,0,0,0,0,0,0,0,1,0,1,2,\n1,1,1,1,2,1,1,1,1,1,1,1,1,0,1,1,0,1,0,1,0,1,0,0,1,0,0,0,0,1,0,0,\n2,2,2,2,2,0,0,2,0,0,2,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,2,0,2,2,\n1,1,1,1,1,0,0,1,2,1,1,0,1,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,\n1,2,2,2,2,0,0,2,0,1,1,0,0,0,1,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,1,1,\n0,0,0,1,1,1,1,1,1,1,1,1,1,0,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,\n1,2,2,3,2,0,0,1,0,0,1,0,0,0,0,0,0,1,0,2,0,0,0,1,0,0,0,0,0,0,0,2,\n1,1,0,0,1,0,0,0,1,1,0,0,1,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,\n2,1,2,2,2,1,2,1,2,2,1,1,2,1,1,1,0,1,1,1,1,2,0,1,0,1,1,1,1,0,1,1,\n1,1,2,1,1,1,1,1,1,0,0,1,2,1,1,1,1,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,\n1,0,0,1,3,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,2,1,0,0,1,0,2,0,0,0,0,0,1,1,1,0,1,0,0,0,0,0,0,0,0,2,0,0,1,\n0,2,0,1,0,0,1,1,2,0,1,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,\n1,2,2,2,2,0,1,1,0,2,1,0,1,1,1,0,0,1,0,2,0,1,0,0,0,0,0,0,0,0,0,1,\n0,1,0,0,1,0,0,0,1,1,0,0,1,0,0,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,2,2,0,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,\n0,1,0,1,1,1,0,0,1,1,1,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,\n2,0,1,0,0,1,2,1,1,1,1,1,1,2,2,1,0,0,1,0,1,0,0,0,0,1,1,1,1,0,0,0,\n1,1,2,1,1,1,1,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,1,2,1,0,0,1,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,\n0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,0,0,1,2,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,\n0,1,1,0,1,1,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,\n1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,2,0,0,2,0,1,0,0,1,0,0,1,\n1,1,0,0,1,1,0,1,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,\n1,1,1,1,1,1,1,2,0,0,0,0,0,0,2,1,0,1,1,0,0,1,1,1,0,1,0,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,1,1,1,1,0,1,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,\n};\n\nconst SequenceModel Latin5BulgarianModel = \n{\n  Latin5_BulgarianCharToOrderMap,\n  BulgarianLangModel,\n  (float)0.969392,\n  false,\n  \"ISO-8859-5\",\n  \"Bulgarian\"\n};\n\nconst SequenceModel Win1251BulgarianModel = \n{\n  win1251BulgarianCharToOrderMap,\n  BulgarianLangModel,\n  (float)0.969392,\n  false,\n  \"windows-1251\",\n  \"Bulgarian\"\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/LangCyrillicModel.cpp",
    "content": "/**\n * @file    LangCyrillicModel.cpp\n * @brief   LangCyrillicModel\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsSBCharSetProber.h\"\n\n\n\n//KOI8-R language model\n//Character Mapping Table:\nstatic const unsigned char KOI8R_CharToOrderMap[] =\n{\n255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  //00\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  //10\n253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  //20\n252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  //30\n253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  //40\n155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  //50\n253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  //60\n 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  //70\n191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,  //80\n207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,  //90\n223,224,225, 68,226,227,228,229,230,231,232,233,234,235,236,237,  //a0\n238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,  //b0\n 27,  3, 21, 28, 13,  2, 39, 19, 26,  4, 23, 11,  8, 12,  5,  1,  //c0\n 15, 16,  9,  7,  6, 14, 24, 10, 17, 18, 20, 25, 30, 29, 22, 54,  //d0\n 59, 37, 44, 58, 41, 48, 53, 46, 55, 42, 60, 36, 49, 38, 31, 34,  //e0\n 35, 43, 45, 32, 40, 52, 56, 33, 61, 62, 51, 57, 47, 63, 50, 70,  //f0\n};\n\nstatic const unsigned char win1251_CharToOrderMap[] =\n{\n255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  //00\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  //10\n253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  //20\n252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  //30\n253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  //40\n155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  //50\n253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  //60\n 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  //70\n191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,\n207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,\n223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,\n239,240,241,242,243,244,245,246, 68,247,248,249,250,251,252,253,\n 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,\n 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,\n  3, 21, 10, 19, 13,  2, 24, 20,  4, 23, 11,  8, 12,  5,  1, 15,\n  9,  7,  6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,\n};\n\nstatic const unsigned char latin5_CharToOrderMap[] =\n{\n255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  //00\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  //10\n253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  //20\n252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  //30\n253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  //40\n155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  //50\n253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  //60\n 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  //70\n191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,\n207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,\n223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,\n 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,\n 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,\n  3, 21, 10, 19, 13,  2, 24, 20,  4, 23, 11,  8, 12,  5,  1, 15,\n  9,  7,  6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,\n239, 68,240,241,242,243,244,245,246,247,248,249,250,251,252,255,\n};\n\nstatic const unsigned char macCyrillic_CharToOrderMap[] =\n{\n255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  //00\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  //10\n253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  //20\n252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  //30\n253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  //40\n155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  //50\n253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  //60\n 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  //70\n 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,\n 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,\n191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,\n207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,\n223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,\n239,240,241,242,243,244,245,246,247,248,249,250,251,252, 68, 16,\n  3, 21, 10, 19, 13,  2, 24, 20,  4, 23, 11,  8, 12,  5,  1, 15,\n  9,  7,  6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27,255,\n};\n\nstatic const unsigned char IBM855_CharToOrderMap[] =\n{\n255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  //00\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  //10\n253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  //20\n252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  //30\n253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  //40\n155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  //50\n253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  //60\n 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  //70\n191,192,193,194, 68,195,196,197,198,199,200,201,202,203,204,205,\n206,207,208,209,210,211,212,213,214,215,216,217, 27, 59, 54, 70,\n  3, 37, 21, 44, 28, 58, 13, 41,  2, 48, 39, 53, 19, 46,218,219,\n220,221,222,223,224, 26, 55,  4, 42,225,226,227,228, 23, 60,229,\n230,231,232,233,234,235, 11, 36,236,237,238,239,240,241,242,243,\n  8, 49, 12, 38,  5, 31,  1, 34, 15,244,245,246,247, 35, 16,248,\n 43,  9, 45,  7, 32,  6, 40, 14, 52, 24, 56, 10, 33, 17, 61,249,\n250, 18, 62, 20, 51, 25, 57, 30, 47, 29, 63, 22, 50,251,252,255,\n};\n\nstatic const unsigned char IBM866_CharToOrderMap[] =\n{\n255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  //00\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  //10\n253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  //20\n252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  //30\n253,142,143,144,145,146,147,148,149,150,151,152, 74,153, 75,154,  //40\n155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,  //50\n253, 71,172, 66,173, 65,174, 76,175, 64,176,177, 77, 72,178, 69,  //60\n 67,179, 78, 73,180,181, 79,182,183,184,185,253,253,253,253,253,  //70\n 37, 44, 33, 46, 41, 48, 56, 51, 42, 60, 36, 49, 38, 31, 34, 35,\n 45, 32, 40, 52, 53, 55, 58, 50, 57, 63, 70, 62, 61, 47, 59, 43,\n  3, 21, 10, 19, 13,  2, 24, 20,  4, 23, 11,  8, 12,  5,  1, 15,\n191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,\n207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,\n223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,\n  9,  7,  6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16,\n239, 68,240,241,242,243,244,245,246,247,248,249,250,251,252,255,\n};\n\n//Model Table: \n//total sequences: 100%\n//first 512 sequences: 97.6601%\n//first 1024 sequences: 2.3389%\n//rest  sequences:      0.1237%\n//negative sequences:   0.0009% \nstatic const PRUint8 RussianLangModel[] = \n{\n0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,1,3,3,3,2,3,2,3,3,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,2,2,2,2,2,0,0,2,\n3,3,3,2,3,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,3,2,3,2,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,2,2,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,2,3,3,1,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,3,3,3,3,3,3,3,3,3,3,3,2,1,\n0,0,0,0,0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,3,3,3,2,1,\n0,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,2,2,2,3,1,3,3,1,3,3,3,3,2,2,3,0,2,2,2,3,3,2,1,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,2,3,3,3,3,3,2,2,3,2,3,3,3,2,1,2,2,0,1,2,2,2,2,2,2,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,3,0,2,2,3,3,2,1,2,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,2,3,3,1,2,3,2,2,3,2,3,3,3,3,2,2,3,0,3,2,2,3,1,1,1,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,2,2,3,3,3,3,3,2,3,3,3,3,2,2,2,0,3,3,3,2,2,2,2,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,2,3,2,3,3,3,3,3,3,2,3,2,2,0,1,3,2,1,2,2,1,0,\n0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,2,1,1,3,0,1,1,1,1,2,1,1,0,2,2,2,1,2,0,1,0,\n0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,2,3,3,2,2,2,2,1,3,2,3,2,3,2,1,2,2,0,1,1,2,1,2,1,2,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,2,2,3,2,3,3,3,2,2,2,2,0,2,2,2,2,3,1,1,0,\n0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,\n3,2,3,2,2,3,3,3,3,3,3,3,3,3,1,3,2,0,0,3,3,3,3,2,3,3,3,3,2,3,2,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,3,3,3,3,2,2,3,3,0,2,1,0,3,2,3,2,3,0,0,1,2,0,0,1,0,1,2,1,1,0,\n0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,3,0,2,3,3,3,3,2,3,3,3,3,1,2,2,0,0,2,3,2,2,2,3,2,3,2,2,3,0,0,\n0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,3,0,2,3,2,3,0,1,2,3,3,2,0,2,3,0,0,2,3,2,2,0,1,3,1,3,2,2,1,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,1,3,0,2,3,3,3,3,3,3,3,3,2,1,3,2,0,0,2,2,3,3,3,2,3,3,0,2,2,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,2,2,3,3,2,2,2,3,3,0,0,1,1,1,1,1,2,0,0,1,1,1,1,0,1,0,\n0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,2,2,3,3,3,3,3,3,3,0,3,2,3,3,2,3,2,0,2,1,0,1,1,0,1,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,2,3,3,3,2,2,2,2,3,1,3,2,3,1,1,2,1,0,2,2,2,2,1,3,1,0,\n0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,\n2,2,3,3,3,3,3,1,2,2,1,3,1,0,3,0,0,3,0,0,0,1,1,0,1,2,1,0,0,0,0,0,\n0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,2,1,1,3,3,3,2,2,1,2,2,3,1,1,2,0,0,2,2,1,3,0,0,2,1,1,2,1,1,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,3,3,3,3,1,2,2,2,1,2,1,3,3,1,1,2,1,2,1,2,2,0,2,0,0,1,1,0,1,0,\n0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,3,3,3,3,2,1,3,2,2,3,2,0,3,2,0,3,0,1,0,1,1,0,0,1,1,1,1,0,1,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,3,3,3,2,2,2,3,3,1,2,1,2,1,0,1,0,1,1,0,1,0,0,2,1,1,1,0,1,0,\n0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,\n3,1,1,2,1,2,3,3,2,2,1,2,2,3,0,2,1,0,0,2,2,3,2,1,2,2,2,2,2,3,1,0,\n0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,1,1,0,1,1,2,2,1,1,3,0,0,1,3,1,1,1,0,0,0,1,0,1,1,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,1,3,3,3,2,0,0,0,2,1,0,1,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,1,0,0,2,3,2,2,2,1,2,2,2,1,2,1,0,0,1,1,1,0,2,0,1,1,1,0,0,1,1,\n1,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,\n2,3,3,3,3,0,0,0,0,1,0,0,0,0,3,0,1,2,1,0,0,0,0,0,0,0,1,1,0,0,1,1,\n1,0,1,0,1,2,0,0,1,1,2,1,0,1,1,1,1,0,1,1,1,1,0,1,0,0,1,0,0,1,1,0,\n2,2,3,2,2,2,3,1,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,0,1,0,1,1,1,0,2,1,\n1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,1,1,0,1,1,0,\n3,3,3,2,2,2,2,3,2,2,1,1,2,2,2,2,1,1,3,1,2,1,2,0,0,1,1,0,1,0,2,1,\n1,1,1,1,1,2,1,0,1,1,1,1,0,1,0,0,1,1,0,0,1,0,1,0,0,1,0,0,0,1,1,0,\n2,0,0,1,0,3,2,2,2,2,1,2,1,2,1,2,0,0,0,2,1,2,2,1,1,2,2,0,1,1,0,2,\n1,1,1,1,1,0,1,1,1,2,1,1,1,2,1,0,1,2,1,1,1,1,0,1,1,1,0,0,1,0,0,1,\n1,3,2,2,2,1,1,1,2,3,0,0,0,0,2,0,2,2,1,0,0,0,0,0,0,1,0,0,0,0,1,1,\n1,0,1,1,0,1,0,1,1,0,1,1,0,2,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,1,1,0,\n2,3,2,3,2,1,2,2,2,2,1,0,0,0,2,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,2,1,\n1,1,2,1,0,2,0,0,1,0,1,0,0,1,0,0,1,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,\n3,0,0,1,0,2,2,2,3,2,2,2,2,2,2,2,0,0,0,2,1,2,1,1,1,2,2,0,0,0,1,2,\n1,1,1,1,1,0,1,2,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,1,\n2,3,2,3,3,2,0,1,1,1,0,0,1,0,2,0,1,1,3,1,0,0,0,0,0,0,0,1,0,0,2,1,\n1,1,1,1,1,1,1,0,1,0,1,1,1,1,0,1,1,1,0,0,1,1,0,1,0,0,0,0,0,0,1,0,\n2,3,3,3,3,1,2,2,2,2,0,1,1,0,2,1,1,1,2,1,0,1,1,0,0,1,0,1,0,0,2,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,3,3,2,0,0,1,1,2,2,1,0,0,2,0,1,1,3,0,0,1,0,0,0,0,0,1,0,1,2,1,\n1,1,2,0,1,1,1,0,1,0,1,1,0,1,0,1,1,1,1,0,1,0,0,0,0,0,0,1,0,1,1,0,\n1,3,2,3,2,1,0,0,2,2,2,0,1,0,2,0,1,1,1,0,1,0,0,0,3,0,1,1,0,0,2,1,\n1,1,1,0,1,1,0,0,0,0,1,1,0,1,0,0,2,1,1,0,1,0,0,0,1,0,1,0,0,1,1,0,\n3,1,2,1,1,2,2,2,2,2,2,1,2,2,1,1,0,0,0,2,2,2,0,0,0,1,2,1,0,1,0,1,\n2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,2,1,1,1,0,1,0,1,1,0,1,1,1,0,0,1,\n3,0,0,0,0,2,0,1,1,1,1,1,1,1,0,1,0,0,0,1,1,1,0,1,0,1,1,0,0,1,0,1,\n1,1,0,0,1,0,0,0,1,0,1,1,0,0,1,0,1,0,1,0,0,0,0,1,0,0,0,1,0,0,0,1,\n1,3,3,2,2,0,0,0,2,2,0,0,0,1,2,0,1,1,2,0,0,0,0,0,0,0,0,1,0,0,2,1,\n0,1,1,0,0,1,1,0,0,0,1,1,0,1,1,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,\n2,3,2,3,2,0,0,0,0,1,1,0,0,0,2,0,2,0,2,0,0,0,0,0,1,0,0,1,0,0,1,1,\n1,1,2,0,1,2,1,0,1,1,2,1,1,1,1,1,2,1,1,0,1,0,0,1,1,1,1,1,0,1,1,0,\n1,3,2,2,2,1,0,0,2,2,1,0,1,2,2,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,1,1,\n0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,\n1,0,0,1,0,2,3,1,2,2,2,2,2,2,1,1,0,0,0,1,0,1,0,2,1,1,1,0,0,0,0,1,\n1,1,0,1,1,0,1,1,1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,\n2,0,2,0,0,1,0,3,2,1,2,1,2,2,0,1,0,0,0,2,1,0,0,2,1,1,1,1,0,2,0,2,\n2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,0,1,1,1,1,0,0,0,1,1,1,1,0,1,0,0,1,\n1,2,2,2,2,1,0,0,1,0,0,0,0,0,2,0,1,1,1,1,0,0,0,0,1,0,1,2,0,0,2,0,\n1,0,1,1,1,2,1,0,1,0,1,1,0,0,1,0,1,1,1,0,1,0,0,0,1,0,0,1,0,1,1,0,\n2,1,2,2,2,0,3,0,1,1,0,0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,\n0,0,0,1,1,1,0,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,\n1,2,2,3,2,2,0,0,1,1,2,0,1,2,1,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1,\n0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,1,1,0,0,1,0,0,0,0,0,0,0,0,1,1,0,\n2,2,1,1,2,1,2,2,2,2,2,1,2,2,0,1,0,0,0,1,2,2,2,1,2,1,1,1,1,1,2,1,\n1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,0,1,1,1,0,0,0,0,1,1,1,0,1,1,0,0,1,\n1,2,2,2,2,0,1,0,2,2,0,0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,2,0,\n0,0,1,0,0,1,0,0,0,0,1,0,1,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,\n0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,2,2,2,2,0,0,0,2,2,2,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,\n0,1,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,2,2,2,2,0,0,0,0,1,0,0,1,1,2,0,0,0,0,1,0,1,0,0,1,0,0,2,0,0,0,1,\n0,0,1,0,0,1,0,0,0,1,1,0,0,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,\n1,2,2,2,1,1,2,0,2,1,1,1,1,0,2,2,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1,\n0,0,1,0,1,1,0,0,0,0,1,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,\n1,0,2,1,2,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,\n0,0,1,0,1,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,\n1,0,0,0,0,2,0,1,2,1,0,1,1,1,0,1,0,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,\n0,0,0,0,0,1,0,0,1,1,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,\n2,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,\n1,0,0,0,1,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,\n1,1,1,0,1,0,1,0,0,1,1,1,1,0,0,0,1,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,\n1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,\n1,1,0,1,1,0,1,0,1,0,0,0,0,1,1,0,1,1,0,0,0,0,0,1,0,1,1,0,1,0,0,0,\n0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,\n};\n\n\nconst SequenceModel Koi8rModel = \n{\n  KOI8R_CharToOrderMap,\n  RussianLangModel,\n  (float)0.976601,\n  false,\n  \"KOI8-R\",\n  \"Russian\"\n};\n\nconst SequenceModel Win1251Model = \n{\n  win1251_CharToOrderMap,\n  RussianLangModel,\n  (float)0.976601,\n  false,\n  \"windows-1251\",\n  \"Russian\"\n};\n\nconst SequenceModel Latin5Model = \n{\n  latin5_CharToOrderMap,\n  RussianLangModel,\n  (float)0.976601,\n  false,\n  \"ISO-8859-5\",\n  \"Russian\"\n};\n\nconst SequenceModel MacCyrillicModel = \n{\n  macCyrillic_CharToOrderMap,\n  RussianLangModel,\n  (float)0.976601,\n  false,\n  \"x-mac-cyrillic\",\n  \"Russian\"\n};\n\nconst SequenceModel Ibm866Model = \n{\n  IBM866_CharToOrderMap,\n  RussianLangModel,\n  (float)0.976601,\n  false,\n  \"IBM866\",\n  \"Russian\"\n};\n\nconst SequenceModel Ibm855Model = \n{\n  IBM855_CharToOrderMap,\n  RussianLangModel,\n  (float)0.976601,\n  false,\n  \"IBM855\",\n  \"Russian\"\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/LangCzechModel.cpp",
    "content": "/**\n * @file    LangCzechModel.cpp\n * @brief   LangCzechModel\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsSBCharSetProber.h\"\n\nstatic const unsigned char czech_iso_8859_2CharToOrderMap[] = \n{\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255, 32, 42, 49, 41, 63, 52, 36, 38, 53, 35, 37, 59, 44, 34, 47,\n 33,180, 48, 45, 40, 56, 39, 76, 70, 75, 51,255,255,255,255,255,\n255,  3, 24, 19, 11,  1, 50, 57, 17,  8, 16, 12,  5, 10,  4,  2,\n 14, 58, 15,  6,  7, 13,  9, 80, 62, 21, 23,255,255,255,255,255,\n179,178,177,176,175,174,173,172,171,170,169,168,167,166,165,164,\n163,162,161,160,159,158,157,156,155,154,153,152,151,150,149,148,\n147,146,145,144,143,142,141,140,139, 64,138, 79,137,136, 61,135,\n134,133,132,131,130,129,128,127,126, 28,125, 43,124,123, 25,122,\n121, 71,120,119,118,117,116,115, 60, 72,114,113, 73, 69,112, 78,\n111,110,109, 68,108,107,106,105, 65, 77, 67,104,103, 74,102,101,\n100, 20, 99, 98, 97, 96, 95, 94, 27, 29, 93, 92, 22, 18, 91, 55,\n 90, 89, 54, 66, 88, 87, 86, 85, 26, 31, 46, 84, 83, 30, 82, 81,\n};\n\nstatic const PRUint8 czechLangModel[] = \n{\n1,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,1,0,0,3,3,3,3,3,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,2,0,0,0,2,2,0,2,0,0,0,0,2,0,0,\n1,2,0,3,3,3,3,2,3,3,3,3,3,3,3,3,3,0,3,0,0,0,3,3,3,3,3,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,2,2,0,2,0,0,0,0,0,0,0,\n1,2,1,3,3,3,3,2,3,3,3,3,2,3,3,3,3,0,3,0,0,0,3,3,3,3,3,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,2,2,0,2,0,0,0,0,0,0,0,\n3,3,3,3,2,3,3,3,0,0,3,3,3,0,0,0,2,3,3,3,3,3,2,2,3,0,2,2,3,3,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,\n3,3,3,3,3,3,2,3,2,2,2,3,3,0,0,3,2,3,2,3,3,0,3,2,2,0,3,2,3,3,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,0,0,0,\n3,3,3,3,3,2,3,3,3,3,2,3,3,3,3,2,2,3,3,3,3,1,0,2,0,0,1,0,1,2,2,0,\n0,0,0,0,0,0,0,0,0,0,3,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,2,2,3,3,2,2,3,3,0,3,0,2,3,2,3,3,3,1,2,0,3,2,2,3,3,3,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,2,3,3,3,3,2,3,3,3,3,2,3,2,3,3,2,3,2,0,0,3,3,3,1,3,3,1,0,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,1,0,0,0,2,2,0,2,0,0,0,0,0,0,0,\n3,3,3,3,3,3,2,3,0,1,3,2,3,2,3,2,2,3,2,3,3,3,3,2,3,3,3,3,3,3,3,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,2,3,0,0,2,2,3,2,3,0,2,3,2,3,3,3,0,2,3,2,2,1,3,3,3,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,2,3,3,2,2,3,3,3,3,2,2,3,3,3,3,3,0,3,2,3,2,3,3,3,3,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,2,3,2,3,0,3,0,2,0,2,3,3,0,0,0,2,3,1,0,3,3,3,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,1,2,3,3,3,3,3,3,3,3,3,0,3,3,3,3,0,3,0,0,0,3,3,3,2,3,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,3,0,0,0,2,2,0,0,0,0,0,0,0,0,0,\n3,3,3,2,3,3,3,3,0,0,0,2,3,2,3,2,0,3,2,3,2,3,0,0,0,3,1,2,2,2,3,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,2,2,3,3,3,2,3,2,3,3,2,1,3,0,3,3,3,0,3,2,3,0,2,3,3,3,3,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,\n3,2,3,3,3,3,3,3,2,3,3,2,3,2,2,0,2,3,2,3,0,0,2,2,2,1,2,3,0,0,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,2,3,2,3,2,2,2,3,0,3,0,0,0,3,3,3,1,0,2,2,2,1,0,3,3,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,\n0,0,0,3,3,3,3,0,3,3,3,3,0,2,3,3,3,0,3,0,0,0,3,3,3,2,3,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n3,3,2,3,2,0,3,3,2,2,0,3,2,2,0,1,3,3,0,1,1,0,0,0,0,0,0,0,1,0,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n0,0,0,3,3,3,3,0,3,3,3,3,0,3,3,2,3,0,3,2,0,0,3,2,3,3,3,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,2,0,3,3,3,3,0,2,2,3,3,2,3,2,2,3,0,3,0,0,0,2,3,3,2,3,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,\n0,0,0,3,3,3,3,0,3,3,3,3,0,2,2,3,3,0,3,0,0,0,2,2,3,2,3,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,2,3,3,2,3,3,0,2,3,0,3,2,2,0,2,3,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,2,2,3,2,2,2,2,3,0,3,2,0,3,2,3,3,3,1,0,0,3,0,2,2,3,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,2,3,2,2,2,3,2,0,3,3,2,0,2,0,0,3,2,3,0,0,0,2,0,0,0,2,2,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n3,2,3,2,2,2,2,3,1,2,0,2,2,2,0,0,0,3,1,3,0,0,0,2,0,0,2,0,0,0,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,3,3,3,0,3,3,0,1,0,3,2,1,1,0,0,3,2,3,0,0,0,0,0,0,0,0,0,0,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,3,3,3,1,3,3,2,1,0,3,2,3,2,0,0,3,2,2,0,0,0,0,0,0,2,2,2,0,1,0,\n0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n0,0,0,3,2,2,3,0,2,3,3,2,0,2,2,2,3,0,2,0,0,0,2,2,2,2,2,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,2,2,3,0,3,3,2,2,0,2,2,2,2,0,3,0,0,0,2,2,2,2,2,2,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,1,3,3,2,0,2,3,2,2,0,1,2,3,2,0,0,0,0,0,2,2,3,2,2,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n0,0,0,3,3,2,0,0,2,2,2,0,0,2,2,0,2,0,2,1,0,0,0,2,2,0,2,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,0,2,2,2,2,0,0,0,0,2,0,3,0,0,2,0,2,0,2,0,0,0,3,0,0,0,0,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,3,0,0,0,0,2,0,0,0,0,3,0,0,0,0,0,0,3,2,2,0,0,0,0,0,0,2,0,0,2,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,\n3,2,3,0,0,2,0,2,0,2,2,0,1,0,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,3,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,2,2,2,0,2,0,0,0,3,0,2,0,3,0,0,0,0,3,0,0,0,0,0,2,0,0,0,0,0,2,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,3,2,2,0,0,0,0,2,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,0,2,2,1,2,0,0,1,0,0,0,2,0,0,2,0,2,3,2,2,0,2,0,1,3,0,2,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,\n2,3,3,0,0,0,0,2,2,1,0,0,3,0,2,0,0,2,0,0,2,2,0,0,0,2,0,0,0,0,0,0,\n0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,2,2,2,0,0,2,2,0,0,0,2,0,3,0,0,2,0,2,2,2,0,0,0,2,0,0,0,0,1,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,\n2,3,2,0,1,0,0,1,0,0,0,0,3,0,2,0,0,1,0,2,3,2,0,0,0,0,0,0,0,2,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,2,3,0,0,0,2,0,0,0,0,0,2,0,0,3,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,3,2,2,0,0,3,0,0,0,0,2,0,2,0,0,2,0,2,2,2,0,0,0,0,0,0,2,0,2,1,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,2,2,1,3,2,2,2,0,2,2,2,2,0,0,0,2,2,2,2,0,2,0,0,0,0,0,0,0,0,\n0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,2,2,3,2,0,1,2,2,2,0,3,2,2,2,0,2,0,0,0,2,0,2,3,2,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,2,2,2,2,0,2,0,2,2,0,2,0,0,2,0,2,0,0,0,2,2,0,0,2,0,0,0,0,0,\n1,1,1,0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,2,0,0,0,1,0,0,0,0,0,2,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,1,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,\n2,3,0,0,0,0,2,1,1,0,0,0,0,0,0,0,3,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,3,0,2,0,1,3,0,0,0,0,1,0,2,2,0,0,0,2,2,0,0,0,0,0,0,0,0,0,1,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,3,2,2,0,1,0,2,2,2,2,0,2,2,0,0,0,0,2,0,0,0,1,0,0,0,0,0,0,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,3,0,0,0,0,3,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,2,0,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,\n0,2,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,2,0,0,1,0,0,0,0,\n0,2,2,0,0,2,2,0,0,0,0,2,2,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,1,2,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,2,2,2,2,0,2,2,2,2,0,2,0,0,0,0,1,0,0,0,0,2,2,0,2,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,2,1,0,0,2,0,0,2,0,2,0,2,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,1,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,2,0,2,0,2,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,\n2,0,2,0,2,0,1,1,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n};\n\nconst SequenceModel iso_8859_2czechModel = \n{\n  czech_iso_8859_2CharToOrderMap,\n  czechLangModel,\n  (float)0.968107,\n  PR_TRUE,\n  \"iso-8859-2\",\n  \"czech\"\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/LangFinnishModel.cpp",
    "content": "/**\n * @file    LangFinnishModel.cpp\n * @brief   LangFinnishModel\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsSBCharSetProber.h\"\n\nstatic const unsigned char finnish_WINDOWS_1252CharToOrderMap[] = \n{\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255, 30, 48, 45, 50, 22, 46, 40, 29, 27, 32, 24, 33, 21, 26, 31,\n 36, 60, 34, 23, 28, 39, 35, 59, 49, 41, 54,255,255,255,255,255,\n255,  1, 43, 47, 19,  5, 44, 37, 13,  2, 18,  9,  8, 12,  3, 11,\n 17, 57, 15,  6,  4, 10, 14, 51, 58, 16, 56,255,255,255,255,255,\n175,255,174,173,172,171,170,169,168,167,166,165,164,255,163,255,\n255,162,161,160,159,158,157,156,155,154,153,152,151,255,150,149,\n148,147,146,145,144,143, 63,142,141,140,139,138,137,136,135,134,\n133,132,131,130,129,128,127,126,125,124,123, 25,122,121,120,119,\n118,117,116,115, 38,114,113,112,111,110,109,108,107,106,105,104,\n103,102,101,100, 99, 98, 42, 97, 96, 95, 94, 93, 92, 91, 90, 89,\n 88, 87, 62, 86,  7, 55, 85, 52, 84, 53, 83, 82, 81, 80, 79, 78,\n 77, 76, 75, 74, 73, 72, 20, 71, 70, 69, 68, 67, 61, 66, 65, 64,\n};\n\nstatic const PRUint8 finnishLangModel[] = \n{\n3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,3,3,3,0,0,0,0,0,3,0,0,0,0,0,0,0,\n0,0,0,0,2,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,0,0,0,0,3,0,0,0,0,0,0,0,\n0,0,0,0,2,0,0,0,0,0,2,3,0,0,2,0,0,0,0,0,2,0,0,0,2,2,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,0,0,0,0,3,0,0,0,0,0,0,0,\n0,0,0,0,3,0,0,0,0,0,3,3,0,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,3,3,3,3,2,3,3,3,3,3,3,3,3,2,2,0,3,0,0,0,0,2,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,0,0,0,0,2,0,0,0,0,0,0,0,\n0,0,0,0,2,0,0,0,0,0,2,2,0,0,3,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,2,2,3,0,0,0,0,2,0,0,0,0,0,0,0,\n0,0,0,0,2,0,0,0,0,0,2,2,0,0,2,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,\n2,3,3,3,3,3,3,3,3,2,2,3,3,3,3,3,3,3,3,2,0,0,0,0,3,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,\n3,3,2,2,3,3,3,2,3,3,3,2,2,2,3,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,0,3,3,3,3,3,3,3,3,2,3,3,3,0,0,0,0,0,2,0,0,0,0,0,0,0,\n0,0,0,0,2,0,0,0,0,0,2,2,0,0,2,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,\n3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,3,3,3,0,0,0,0,0,2,0,0,0,0,0,0,0,\n0,0,0,0,2,0,0,0,0,0,2,2,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,2,3,2,3,0,0,3,3,3,0,0,2,3,3,0,0,3,0,0,0,0,2,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,0,3,3,3,3,3,3,2,3,3,3,0,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,0,3,2,3,0,0,3,3,0,0,0,0,3,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,3,0,0,0,0,0,2,2,0,0,2,0,0,0,2,0,0,0,2,2,0,0,0,0,0,0,0,0,\n2,3,3,3,3,3,3,3,3,0,0,3,3,3,3,3,3,3,3,3,0,0,0,0,2,0,0,0,0,0,0,0,\n0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,2,3,3,3,2,0,3,3,0,2,0,3,3,3,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,\n3,3,0,0,3,0,3,0,0,3,3,0,0,0,0,3,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,0,3,2,3,2,2,3,3,0,2,2,3,3,0,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,0,3,3,3,3,0,2,3,3,2,3,3,3,2,3,3,0,0,0,0,2,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,0,3,0,3,0,0,3,3,0,0,0,2,2,0,0,0,2,2,2,0,0,0,0,3,0,0,3,3,0,\n0,2,0,2,0,3,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,3,3,2,3,0,3,2,2,0,3,3,0,3,0,2,0,2,0,3,3,3,2,0,3,2,3,2,2,0,0,\n3,3,2,2,2,0,2,2,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,3,3,0,2,0,2,3,3,0,0,2,0,3,0,0,0,2,3,2,2,3,0,0,3,2,0,3,2,0,\n2,0,0,2,0,3,2,0,3,0,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,0,3,0,3,3,0,3,3,0,0,0,2,3,0,0,0,2,0,2,2,3,0,0,3,0,2,3,3,0,\n0,2,0,0,0,3,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,3,3,3,3,0,3,2,3,3,2,3,3,\n2,2,3,3,0,2,2,2,2,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,\n3,3,0,0,3,0,3,0,0,3,3,0,0,0,0,3,0,0,0,0,2,3,3,2,2,2,3,3,2,3,2,2,\n0,2,2,2,0,2,2,2,2,0,0,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,2,2,3,0,3,2,3,2,0,2,2,3,2,2,0,0,0,0,0,3,3,3,2,2,3,3,3,2,2,3,2,\n3,3,2,2,0,2,2,0,2,2,2,0,2,2,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,0,3,0,3,0,0,3,3,0,0,0,2,3,2,0,0,2,2,3,2,2,2,0,3,3,2,3,2,0,\n2,2,2,0,0,3,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,0,3,0,3,0,0,3,3,2,0,0,0,3,0,2,0,2,2,3,0,2,0,0,3,2,0,2,2,2,\n2,2,2,0,0,3,2,0,2,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,2,2,2,0,3,2,2,0,2,3,2,2,0,2,3,0,0,3,2,3,2,0,3,3,2,2,3,0,2,\n3,3,2,2,0,0,3,0,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,3,3,3,0,2,0,3,0,2,2,2,2,2,2,0,2,2,2,0,2,0,2,2,0,2,2,3,2,2,3,2,\n2,2,2,3,0,0,2,2,0,0,0,0,2,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,0,0,2,0,3,0,0,3,3,0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,3,2,0,\n0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,0,3,0,3,0,0,3,2,0,0,0,0,2,0,0,0,2,3,3,0,2,0,0,3,3,2,3,2,2,\n3,0,2,2,0,2,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,\n3,3,0,0,3,0,2,0,0,3,3,0,0,0,0,2,0,0,0,2,2,3,3,2,0,2,3,2,2,3,3,2,\n0,2,3,2,0,3,3,0,2,3,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,\n3,3,0,0,3,0,3,2,0,2,3,0,0,0,0,2,0,0,0,0,0,3,0,0,0,0,3,0,0,3,2,0,\n0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,2,3,2,3,0,0,3,3,0,2,0,2,3,0,0,0,2,0,3,2,0,0,0,3,2,0,2,2,0,\n2,2,0,2,0,2,2,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,2,3,2,2,2,0,2,3,2,2,0,2,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,\n0,3,0,0,0,2,2,3,2,0,0,2,2,0,0,2,0,0,0,0,2,2,2,3,0,3,3,2,2,0,0,2,\n2,3,2,2,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,2,2,2,0,3,0,2,2,2,2,2,2,0,2,0,0,0,0,0,2,0,2,2,0,3,2,2,2,2,3,0,\n3,2,2,2,0,0,2,0,0,0,0,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,0,0,2,0,0,0,0,0,2,0,0,0,3,0,0,0,0,0,0,2,0,0,0,0,2,0,0,2,2,0,\n0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,2,0,3,3,0,0,2,3,0,2,0,0,0,0,3,2,0,2,2,0,2,0,3,2,2,0,0,\n3,2,2,0,0,2,0,0,2,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,3,2,2,2,0,0,2,\n0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,0,3,2,2,2,0,2,2,0,0,0,2,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,2,3,0,2,2,0,0,3,0,0,2,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,\n3,0,0,0,2,0,0,0,0,2,2,0,2,0,3,2,0,0,0,0,0,2,0,0,0,0,2,2,2,0,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,0,0,0,0,0,0,0,2,0,0,0,3,2,0,0,0,0,0,2,0,0,0,0,2,0,0,2,0,0,\n0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,2,2,0,0,0,2,0,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,\n2,2,0,0,3,0,0,0,0,0,2,0,0,0,2,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,\n0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,0,0,0,0,0,0,2,2,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,2,0,0,2,2,0,\n0,0,0,0,0,2,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,2,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n};\n\nconst SequenceModel WINDOWS_1252finnishModel = \n{\n  finnish_WINDOWS_1252CharToOrderMap,\n  finnishLangModel,\n  (float)0.995928,\n  PR_TRUE,\n  \"WINDOWS-1252\",\n  \"finnish\"\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/LangFrenchModel.cpp",
    "content": "/**\n * @file    LangFrenchModel.cpp\n * @brief   LangFrenchModel\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsSBCharSetProber.h\"\n\nstatic const unsigned char french_WINDOWS_1252CharToOrderMap[] = \n{\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255, 30, 40, 31, 37, 27, 44, 48, 52, 32, 45, 61, 25, 29, 41, 43,\n 34, 53, 38, 35, 39, 46, 42, 68, 63, 65, 71,255,255,255,255,255,\n255,  2, 20, 12, 11,  1, 17, 18, 21,  4, 24, 57,  9, 13,  5, 10,\n 14, 19,  7,  3,  6,  8, 16, 54, 23, 28, 36,255,255,255,255,255,\n 64,180,179,178,177, 75,176,175,174,173,172,171, 91,170,169,168,\n167,166, 62,111,110, 67, 78, 88,165, 97,164, 90, 82,163,162,161,\n160,159,158,157,156,155,154, 86, 84, 69,101, 50,109,153, 96,152,\n 81,151,108,150,100,149,148, 80,147,107,146, 51,145,144,143,142,\n 70,141, 79, 72,140,139,138, 73, 77, 60, 76,137,136,135, 99,134,\n106,133,132,131, 83,130, 98, 92,129, 95,128, 94,127,126,125,124,\n 22, 93, 49,123,105,104, 89, 47, 26, 15, 33, 74,122,121, 56, 66,\n120,103,119,118, 55,102, 87,117,116, 59,115, 58, 85,114,113,112,\n};\n\nstatic const PRUint8 frenchLangModel[] = \n{\n2,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,2,3,2,0,3,2,0,0,0,3,2,0,0,0,\n0,0,0,3,0,0,1,1,0,0,0,1,0,0,2,0,2,0,2,0,0,3,1,0,2,3,0,0,0,0,1,0,\n2,2,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,0,2,3,0,0,0,3,0,0,0,0,\n0,0,1,3,0,0,0,0,0,0,0,0,0,0,3,0,0,0,1,0,0,1,1,3,3,0,0,0,0,0,0,0,\n3,3,3,3,2,3,2,3,3,3,1,3,3,3,3,1,2,2,3,2,2,0,0,1,1,3,0,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,1,0,1,2,2,0,0,0,2,0,0,\n3,3,3,2,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,1,0,3,2,1,3,0,1,0,0,0,0,\n1,2,0,3,0,0,0,2,0,0,0,0,0,0,0,0,1,0,1,0,0,1,0,0,2,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,2,3,3,3,2,2,3,3,3,3,3,2,3,0,2,2,0,2,0,2,0,1,0,0,\n3,0,0,3,0,0,0,0,1,0,0,1,0,0,3,0,2,0,1,0,0,0,1,0,2,1,0,0,0,2,0,0,\n3,3,3,3,1,3,3,3,2,3,1,2,2,3,3,0,1,0,0,1,3,0,0,0,0,3,0,2,0,0,0,0,\n3,0,0,2,0,0,0,0,0,0,0,0,0,0,0,1,2,0,1,0,0,1,3,1,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,0,1,1,0,3,0,3,0,0,0,2,\n3,0,0,2,0,0,0,0,0,0,0,0,0,0,3,0,3,0,1,0,0,1,3,1,3,2,0,0,0,0,0,0,\n3,3,3,3,3,3,3,1,3,3,3,3,3,3,3,3,3,3,3,3,2,0,3,3,0,2,0,3,0,0,0,0,\n3,0,0,2,0,0,0,0,0,0,0,0,0,0,1,1,2,0,1,0,0,0,0,1,2,0,0,0,0,2,0,0,\n3,3,3,3,1,3,1,3,3,3,2,3,3,3,3,2,2,3,3,3,3,3,1,0,0,3,1,3,0,0,0,0,\n2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,3,0,1,0,0,0,2,1,2,2,0,0,0,3,0,0,\n3,2,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,2,0,2,2,0,2,0,3,0,0,0,0,\n2,0,0,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,2,2,3,3,0,0,0,0,0,\n3,3,3,3,1,2,3,3,1,3,2,1,3,0,3,2,1,2,1,2,2,0,0,2,0,3,1,2,0,1,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,1,2,2,0,2,0,0,0,2,0,0,\n3,3,3,3,3,3,3,3,3,3,2,3,1,0,3,0,1,2,3,0,3,0,0,0,0,3,0,2,0,0,1,0,\n1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,3,0,2,1,0,0,0,2,0,0,\n3,3,2,3,3,3,1,3,2,3,0,0,3,3,3,0,0,1,0,3,0,0,0,0,0,3,0,2,0,0,0,0,\n3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,1,0,0,0,2,1,0,2,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,1,2,0,3,3,0,0,2,0,1,3,0,2,0,0,3,0,2,0,0,0,0,\n3,0,1,0,0,0,0,0,0,0,0,0,0,0,2,0,3,0,0,0,0,1,2,1,0,2,0,0,0,0,0,0,\n3,3,3,2,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,2,0,0,3,0,0,0,0,0,0,0,0,\n0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,0,2,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,\n3,3,0,3,0,0,3,3,0,3,0,0,0,0,3,0,0,1,0,0,0,0,0,0,0,3,0,1,0,0,0,0,\n3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,\n3,3,3,3,0,1,3,3,3,3,0,1,0,0,3,0,3,1,0,0,0,0,0,0,0,2,0,1,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,1,0,2,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,1,0,2,0,3,1,0,2,0,2,3,0,0,0,0,3,0,2,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,1,2,0,0,0,0,0,0,0,\n0,1,1,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,\n3,3,3,3,1,2,3,3,3,3,2,1,1,0,3,1,0,0,0,3,0,0,0,2,0,2,0,3,0,0,0,0,\n3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,0,0,0,2,0,1,0,0,0,0,0,0,\n3,3,1,3,3,3,3,3,2,3,1,0,2,2,3,0,0,0,0,0,0,0,0,0,0,3,0,2,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,3,0,1,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,3,0,3,0,2,0,2,0,3,0,3,2,0,0,0,2,0,2,0,1,0,0,1,0,1,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,1,0,0,0,3,0,3,0,0,0,2,1,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,\n3,3,0,3,0,0,0,3,2,3,0,0,0,0,2,0,0,0,0,0,2,2,0,0,2,0,3,2,2,3,1,3,\n0,0,1,0,1,0,2,0,1,1,2,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,2,1,2,0,0,\n0,0,3,0,3,3,3,0,2,0,2,3,3,1,0,3,1,3,2,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,1,3,1,3,3,2,3,3,0,2,2,3,1,0,2,1,2,1,0,3,0,2,0,2,0,2,0,2,2,2,2,\n0,2,3,1,2,3,2,2,3,1,1,1,0,2,0,1,0,0,0,2,0,0,0,0,0,0,0,0,0,0,2,0,\n3,3,3,1,2,2,3,0,2,3,2,2,2,2,3,1,1,2,0,1,0,0,1,0,0,1,0,1,0,0,0,0,\n0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,3,0,0,0,2,1,3,0,1,3,0,2,0,0,1,0,0,0,0,0,0,1,2,2,1,2,2,1,2,\n2,2,1,0,0,0,1,1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,1,2,3,3,2,3,3,3,0,2,2,2,3,0,2,2,2,1,3,3,0,0,2,2,0,1,2,2,1,2,2,\n0,2,2,2,1,2,2,2,3,2,0,2,1,2,0,2,0,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,\n3,3,0,2,0,0,2,2,3,3,0,0,0,0,2,0,1,0,0,0,3,0,0,0,2,0,2,2,0,2,1,2,\n0,2,2,0,1,1,2,0,2,0,2,1,0,2,0,2,0,0,0,2,1,0,1,0,0,0,0,0,2,1,0,0,\n1,0,2,0,3,2,2,0,3,1,2,2,2,0,0,1,0,1,0,1,0,0,0,0,2,0,3,0,2,2,2,3,\n0,2,2,1,1,2,3,2,3,3,2,2,0,0,0,2,0,0,0,1,2,0,0,0,0,0,0,1,1,0,2,0,\n0,0,0,0,2,3,0,0,2,0,0,3,3,1,0,3,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,3,0,0,3,3,3,3,0,0,0,0,2,0,0,0,0,0,3,0,0,0,2,2,2,1,0,2,1,2,\n0,1,2,0,2,3,2,0,0,0,2,1,2,2,0,0,1,0,0,2,0,0,1,0,0,0,0,1,1,0,0,0,\n3,3,0,3,0,2,0,3,1,3,0,2,1,2,2,0,0,0,1,0,2,0,0,0,0,1,2,2,1,2,1,2,\n0,2,2,0,1,1,2,2,1,0,2,2,0,2,0,0,0,0,0,1,0,0,0,0,1,1,0,2,2,0,0,0,\n3,3,0,2,1,0,1,1,1,3,0,0,1,1,2,0,0,1,0,1,1,0,0,0,0,1,0,3,0,0,0,0,\n0,0,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,3,0,0,2,3,0,2,0,0,1,2,3,0,0,0,0,0,0,0,0,1,1,2,3,0,0,2,1,2,\n0,0,2,0,0,2,0,0,1,1,2,2,1,2,0,1,0,0,0,1,0,0,0,0,0,0,0,2,0,1,0,0,\n3,3,0,2,0,0,0,2,0,3,0,0,0,0,3,0,0,0,0,0,2,0,0,0,2,0,3,1,2,2,2,2,\n0,2,2,0,2,2,2,2,2,2,3,1,0,2,0,1,0,0,0,1,0,0,0,0,0,0,0,2,0,0,0,0,\n3,3,1,2,0,0,3,3,0,3,0,1,0,0,2,0,0,0,0,0,3,0,0,0,2,1,3,1,1,2,2,3,\n0,1,2,0,0,2,2,0,1,1,2,1,0,2,0,1,0,0,0,3,0,2,0,0,0,0,0,2,0,0,0,0,\n3,3,0,3,0,0,3,2,3,3,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,2,0,1,2,1,2,\n0,0,1,0,2,2,1,1,2,0,2,1,1,2,0,0,1,0,0,0,0,1,0,0,0,0,0,2,0,0,0,0,\n3,3,0,3,0,0,0,2,0,3,0,1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,2,2,\n0,2,3,0,2,1,3,1,2,1,1,2,0,2,0,2,0,0,0,0,1,0,1,0,0,0,0,1,1,0,0,0,\n3,3,0,3,0,0,1,2,2,3,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,1,0,2,0,2,\n1,0,0,0,1,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,1,2,3,1,3,3,2,0,1,2,1,2,0,2,1,1,0,2,3,0,0,0,2,0,2,0,2,1,2,2,\n0,2,2,0,2,2,2,2,3,2,1,2,2,2,0,1,0,0,0,0,0,0,0,0,1,0,2,0,0,0,1,0,\n2,3,0,2,1,0,3,2,2,3,0,0,0,1,3,0,0,0,0,1,1,0,1,0,2,0,2,0,2,3,0,2,\n1,2,2,0,0,2,0,1,1,0,2,1,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n3,3,0,0,0,0,0,2,0,3,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,\n0,0,0,0,2,0,1,0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,\n0,0,0,0,3,2,2,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,3,0,2,2,2,2,\n0,2,2,0,2,3,2,2,2,1,2,1,0,0,0,2,0,0,0,0,0,0,0,0,1,0,0,0,0,0,2,0,\n0,3,0,0,0,0,0,3,0,3,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,\n2,3,0,2,0,0,3,3,1,3,0,0,1,0,2,0,0,0,0,0,1,0,0,0,1,0,2,1,0,2,0,1,\n1,1,1,0,0,1,1,2,2,2,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,\n0,0,1,2,2,3,0,0,3,0,0,3,2,2,0,1,0,2,1,1,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,1,1,0,0,0,0,1,1,0,1,1,1,1,0,1,0,1,0,0,0,0,0,0,2,0,2,0,2,2,2,2,\n0,2,2,0,2,1,2,2,2,2,2,1,2,1,0,1,0,0,0,2,2,0,0,0,0,0,0,1,0,0,0,0,\n0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,2,0,0,0,3,0,3,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,3,1,0,2,0,2,\n0,0,0,0,1,2,1,1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,2,0,0,0,0,\n0,1,1,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,3,2,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,2,3,0,0,3,0,2,0,2,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,3,3,0,0,2,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,3,0,1,1,2,1,3,0,1,2,0,1,0,1,1,0,1,2,0,0,0,0,0,0,1,0,0,0,0,\n0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,\n0,0,0,0,1,3,2,0,2,0,0,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,\n0,0,0,0,0,2,1,0,2,0,2,2,1,1,0,2,0,2,0,1,0,0,0,0,2,0,2,0,2,0,2,0,\n0,2,2,0,2,2,1,0,1,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,0,2,0,0,2,1,1,2,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,2,0,1,1,0,0,\n0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,\n2,2,0,2,0,0,0,2,0,2,0,0,0,0,2,0,0,0,0,0,2,1,0,0,0,0,2,1,0,2,0,2,\n1,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,\n1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,3,\n0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n};\n\nconst SequenceModel WINDOWS_1252frenchModel = \n{\n  french_WINDOWS_1252CharToOrderMap,\n  frenchLangModel,\n  (float)0.985451,\n  PR_TRUE,\n  \"WINDOWS-1252\",\n  \"french\"\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/LangGermanModel.cpp",
    "content": "/**\n * @file    LangGermanModel.cpp\n * @brief   LangGermanModel\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsSBCharSetProber.h\"\n\nstatic const unsigned char german_WINDOWS_1252CharToOrderMap[] = \n{\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255, 30, 34, 50, 25, 27, 36, 31, 28, 35, 49, 41, 39, 32, 42, 48,\n 45, 58, 44, 21, 37, 40, 43, 29, 62, 61, 47,255,255,255,255,255,\n255,  8, 16, 12,  9,  1, 18, 13,  7,  3, 46, 20, 11, 14,  2, 15,\n 33, 53,  4,  5,  6, 10, 23, 17, 55, 51, 19,255,255,255,255,255,\n180,179,178,177,176,175,174,173,172,171,170, 64,169,168,167,166,\n165,164, 54,163,162,161, 66,160,159,158,157, 63,156,155,154,153,\n 65,152,151,150,149,148,147,146,145,144,143, 57,142,141,140,139,\n138,137,136,135,134,133,132,131,130,129,128, 56,127,126,125,124,\n123,122,121,120, 59,119,118, 71,117,116,115,114,113,112,111,110,\n109,108,107,106,105,104, 60,103,102,101,100, 99, 52, 98, 97, 26,\n 70, 96, 69, 95, 24, 94, 68, 93, 92, 67, 91, 90, 89, 88, 87, 86,\n 85, 84, 83, 82, 81, 80, 38, 79, 78, 77, 76, 75, 22, 74, 73, 72,\n};\n\nstatic const PRUint8 germanLangModel[] = \n{\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,0,2,2,2,0,3,0,0,0,0,0,0,\n3,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,3,0,2,2,2,0,2,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,0,0,0,0,0,0,0,0,\n2,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,2,0,2,2,0,0,2,0,0,0,0,0,0,0,\n3,3,2,3,3,3,3,2,3,2,3,3,3,3,3,3,2,3,3,3,0,0,2,2,0,3,0,0,0,0,0,0,\n3,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,0,0,0,0,0,0,0,0,\n2,0,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,2,0,2,2,0,0,2,0,0,0,0,0,0,0,\n3,2,3,3,3,3,3,3,2,3,3,3,3,2,3,2,3,2,3,2,0,2,2,3,0,0,0,0,0,0,0,0,\n3,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,2,0,3,2,3,0,0,0,0,0,0,0,0,\n2,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,2,3,3,2,2,3,3,3,3,2,2,3,0,3,2,3,0,0,0,0,0,0,0,0,\n2,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,\n2,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,3,3,2,0,0,3,0,0,3,0,0,0,0,0,0,\n3,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,2,3,2,3,3,3,2,2,3,2,2,2,2,0,0,3,2,2,0,0,0,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,2,3,2,3,3,3,3,2,3,2,3,2,2,0,0,2,2,0,3,0,0,0,0,0,0,\n3,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,\n3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,0,3,2,3,0,0,0,0,0,0,0,0,\n2,0,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,\n2,0,2,2,0,2,3,2,0,2,2,2,0,0,2,2,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,2,3,2,3,3,0,2,2,3,2,2,2,2,3,0,2,0,2,0,0,0,0,0,0,0,0,\n0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n3,2,3,2,3,3,2,3,3,3,3,2,3,3,3,2,2,2,2,2,0,3,0,3,0,0,0,0,0,0,0,0,\n3,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n2,3,2,3,3,3,3,2,3,2,3,3,3,3,2,3,2,3,2,3,0,0,3,0,0,3,0,0,0,0,0,0,\n3,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,\n3,2,3,3,3,3,2,3,2,3,3,2,3,2,3,2,2,2,2,2,0,2,2,3,0,0,0,0,0,0,0,0,\n0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,\n3,0,3,0,0,0,0,3,0,3,2,0,0,0,3,0,2,0,0,0,0,3,0,3,0,0,0,0,0,0,0,0,\n0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,2,3,2,3,3,2,3,3,3,2,2,3,3,2,0,3,0,3,0,0,0,0,0,0,0,0,\n2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,3,0,2,3,2,3,2,3,3,2,2,0,3,2,3,2,2,2,0,3,0,3,0,0,0,0,0,0,0,0,\n2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n3,3,2,3,3,3,2,3,0,3,3,2,2,2,3,2,2,2,2,2,0,3,0,2,0,0,0,0,0,0,0,0,\n0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,3,0,0,3,2,3,0,2,0,3,0,0,3,0,0,0,2,2,2,2,0,2,0,0,2,0,0,2,0,2,\n3,0,2,0,3,2,0,0,0,0,0,0,2,0,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,3,0,3,3,3,3,0,2,0,3,3,3,2,0,3,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,3,0,0,0,0,2,0,2,0,0,0,0,3,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,\n0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,0,3,3,3,3,0,3,3,3,3,3,3,0,2,0,3,0,2,0,0,0,0,0,3,0,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,3,3,0,0,0,3,0,3,0,0,0,0,3,0,0,0,0,0,0,2,0,2,0,0,3,0,0,0,0,0,\n0,0,2,0,0,2,0,0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,2,2,2,3,2,0,0,2,2,2,2,2,0,2,2,2,0,2,0,0,2,0,0,0,0,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n0,3,3,3,3,2,2,0,2,3,3,2,0,2,0,2,2,2,0,0,3,0,0,0,2,0,0,2,0,2,0,2,\n2,2,2,0,3,0,3,0,2,3,0,3,3,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,\n3,0,3,0,0,0,0,3,0,3,0,0,0,2,3,0,0,0,0,0,0,3,0,3,0,0,3,0,0,2,0,2,\n0,0,3,0,2,3,0,0,0,2,0,0,0,0,0,2,0,0,2,2,0,0,0,0,0,0,0,2,0,0,0,0,\n3,0,3,0,0,0,0,3,0,3,0,0,0,0,3,0,0,0,0,0,0,2,0,2,0,0,2,0,0,2,0,0,\n0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,2,3,2,2,2,0,2,3,3,3,2,3,0,3,0,2,0,2,2,0,0,0,0,0,0,0,0,0,2,2,\n2,0,0,2,2,0,2,3,0,2,0,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,\n3,2,2,3,0,0,0,3,0,3,3,0,0,0,3,0,0,0,0,0,0,2,0,2,0,0,2,0,0,2,0,0,\n0,0,2,0,0,2,2,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,3,0,0,0,0,3,0,3,0,0,0,0,3,0,0,0,0,0,0,2,0,3,0,0,3,0,0,3,0,2,\n0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,\n3,0,3,3,2,3,3,3,0,3,3,2,0,0,3,0,0,3,2,0,0,2,0,2,0,0,0,0,0,0,0,0,\n3,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,3,3,0,0,0,3,0,3,3,0,0,0,3,0,0,0,0,0,0,3,0,2,0,0,2,0,0,2,0,0,\n0,0,2,0,0,2,0,2,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,\n0,3,0,2,3,2,3,0,2,0,2,3,0,3,2,2,0,0,0,0,3,0,0,0,2,0,3,0,0,0,2,2,\n0,0,2,0,2,0,2,0,2,2,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,3,3,0,0,0,3,0,3,3,0,0,0,3,0,0,0,0,0,0,3,0,2,0,0,0,0,0,3,0,0,\n0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,3,3,0,0,3,3,0,2,0,0,0,0,3,0,0,0,0,0,0,2,0,2,0,0,3,2,0,2,0,2,\n0,0,2,0,2,2,2,2,0,0,0,2,0,0,0,3,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,3,0,3,3,3,3,0,2,0,3,3,3,2,0,2,2,3,0,0,0,0,2,0,0,3,0,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,3,0,0,0,0,3,2,3,0,0,0,0,3,0,0,0,0,0,0,2,0,2,2,0,3,0,0,2,0,0,\n0,0,2,0,2,2,2,2,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,0,2,0,0,2,0,0,0,2,0,0,3,0,0,0,2,0,0,3,0,0,0,0,0,2,0,0,0,2,2,\n0,0,0,0,2,0,0,0,0,2,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,0,0,0,3,0,3,3,0,0,0,3,0,0,0,0,0,0,2,0,2,0,0,2,0,0,2,0,0,\n0,0,2,0,2,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,3,0,0,0,0,3,0,3,0,0,0,0,3,0,0,0,0,0,2,2,0,2,2,0,2,0,0,2,2,0,\n0,2,2,0,2,0,0,0,0,2,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,3,0,0,0,0,3,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,2,0,0,2,0,0,2,0,0,\n0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,3,0,0,0,2,3,0,3,0,0,0,0,2,0,0,0,0,0,2,2,0,2,0,0,3,0,0,2,3,2,\n0,0,2,0,2,2,2,2,0,2,0,2,0,0,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,2,3,0,0,2,3,0,3,3,0,0,0,2,0,0,3,0,0,0,0,0,2,0,0,2,3,0,0,0,0,\n0,0,2,0,0,2,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,0,0,0,0,0,3,0,3,0,0,0,0,2,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,3,0,0,0,0,2,0,3,0,0,0,0,2,0,3,0,0,0,0,2,0,2,0,0,2,0,2,0,0,0,\n0,0,2,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,2,0,3,2,0,2,0,2,0,2,2,0,0,0,2,0,2,2,2,2,0,0,0,0,0,0,0,0,0,2,0,\n2,0,0,0,0,0,2,0,2,2,0,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,0,0,0,0,0,3,0,3,0,0,0,0,2,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,2,0,0,3,2,0,2,2,0,0,0,2,0,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,0,\n0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,2,2,2,2,2,2,0,2,0,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,2,0,2,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,2,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,2,0,2,2,2,0,2,0,\n0,2,2,0,0,0,2,0,2,2,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,2,2,0,0,0,0,2,0,2,0,0,0,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,\n0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n};\n\nconst SequenceModel WINDOWS_1252germanModel = \n{\n  german_WINDOWS_1252CharToOrderMap,\n  germanLangModel,\n  (float)0.985431,\n  PR_TRUE,\n  \"WINDOWS-1252\",\n  \"german\"\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/LangGreekModel.cpp",
    "content": "/**\n * @file    LangGreekModel.cpp\n * @brief   LangGreekModel\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsSBCharSetProber.h\"\n/****************************************************************\n255: Control characters that usually does not exist in any text\n254: Carriage/Return\n253: symbol (punctuation) that does not belong to word\n252: 0 - 9\n\n*****************************************************************/\n\n//Character Mapping Table:\nstatic const unsigned char greek_ISO_8859_7CharToOrderMap[] = \n{\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255, 67, 59, 45, 74, 51, 61, 69,105, 88, 99, 80, 93, 77, 95, 97,\n 73,121, 92, 71, 64,110,103, 87,114,112,116,255,255,255,255,255,\n255, 32, 72, 60, 43, 29, 78, 44, 58, 28, 70, 49, 41, 55, 40, 31,\n 42,115, 37, 39, 38, 53, 90, 65, 98, 66,108,255,255,255,255,255,\n145,140,150,180,138,144,179,155,178,154,177,176,135,175,149,174,\n173,137,143,172,171,136,148,170,169,153,152,151,168,167,166,165,\n164,134,107,132,127,163,162,128,147,131,161, 84,146,160,159,142,\n133,126,130,129,120,141,102, 94, 89,109,118, 83, 85,139,122,125,\n 91, 36, 62, 75, 57, 46,111, 82,101, 56, 54, 81, 50, 68,113, 63,\n 47, 96,158, 25, 48,106, 79, 86,119,104,124,157, 17, 21, 18, 15,\n123,  1, 34, 19, 23,  5, 33,  9, 27,  6, 12, 16, 13,  4, 52,  2,\n 14,  7, 11,  8,  3, 10, 22, 26, 76, 24,100,117, 20, 30, 35,156,\n };\n\n\nstatic const unsigned char greek_WINDOWS_1253CharToOrderMap[] = \n{\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255, 67, 59, 45, 74, 51, 61, 69,105, 88, 99, 80, 93, 77, 95, 97,\n 73,121, 92, 71, 64,110,103, 87,114,112,116,255,255,255,255,255,\n255, 32, 72, 60, 43, 29, 78, 44, 58, 28, 70, 49, 41, 55, 40, 31,\n 42,115, 37, 39, 38, 53, 90, 65, 98, 66,108,255,255,255,255,255,\n127,180,179,178,177,176,175,174,173,172,171,170,169,168,167,166,\n165,134,107,164,163,162,161,160,159,158,157,156,155,154,153,152,\n151,137,102,132,150,149,148,128,139,131,147, 84,138,146,145,136,\n133,126,130,129,120,144,143, 94, 89,109,118, 83, 85,135,122,125,\n 91, 36, 62, 75, 57, 46,111, 82,101, 56, 54, 81, 50, 68,113, 63,\n 47, 96,142, 25, 48,106, 79, 86,119,104,124,141, 17, 21, 18, 15,\n123,  1, 34, 19, 23,  5, 33,  9, 27,  6, 12, 16, 13,  4, 52,  2,\n 14,  7, 11,  8,  3, 10, 22, 26, 76, 24,100,117, 20, 30, 35,140,\n};\n\n//Model Table: \n//total sequences: 100%\n//first 512 sequences: 98.2851%\n//first 1024 sequences:1.7001%\n//rest  sequences:     0.0359%\n//negative sequences:  0.0148% \nstatic const PRUint8 greekLangModel[] =\n{\n1,2,3,3,2,3,3,3,1,3,3,3,3,3,3,3,1,2,3,2,2,3,3,1,0,3,3,0,0,3,0,0,\n3,3,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,3,0,1,0,0,0,0,0,0,0,0,0,0,\n2,2,3,3,3,3,3,3,2,3,3,3,3,3,3,3,1,3,3,1,2,3,3,1,1,3,3,0,0,3,0,0,\n2,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,1,0,1,0,0,0,0,0,0,0,0,\n3,3,2,1,3,3,3,3,3,3,1,1,2,1,3,3,3,3,1,3,3,1,0,3,0,1,1,0,0,3,1,0,\n2,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,1,2,3,2,1,1,1,0,3,1,3,3,2,3,3,1,3,3,0,1,3,1,1,2,1,0,\n1,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,3,3,1,3,3,3,1,3,3,3,3,3,3,3,2,1,3,3,2,3,3,3,0,3,2,0,0,3,0,0,\n2,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,1,3,3,2,1,3,3,3,3,1,3,3,2,3,3,2,3,3,2,0,2,2,0,0,1,0,0,\n3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1,0,\n3,3,3,3,3,3,2,2,3,3,1,3,3,2,3,2,3,3,3,3,3,2,2,3,0,3,3,0,0,2,0,0,\n1,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,1,3,3,1,3,3,3,0,3,3,3,3,1,2,2,1,2,2,3,2,3,0,3,3,0,0,3,0,0,\n0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,1,3,3,0,0,3,3,1,1,3,3,3,2,1,3,1,0,3,0,0,2,2,1,0,2,3,0,0,2,0,0,\n1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,3,3,2,2,3,3,1,0,3,3,3,3,2,3,2,2,3,2,1,2,2,1,0,3,3,0,0,0,0,0,\n3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,\n3,3,3,2,3,3,3,2,3,3,1,2,1,2,3,3,3,3,1,3,3,2,2,2,0,1,2,0,0,2,0,0,\n0,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,1,2,3,3,1,1,3,2,1,0,3,3,3,0,3,3,0,3,3,3,1,3,0,0,0,0,0,2,0,0,\n0,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,2,3,3,3,0,3,2,1,0,0,2,3,3,3,3,0,3,3,1,0,3,0,0,0,0,0,3,0,0,\n0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,0,3,3,3,0,3,3,3,3,0,3,0,0,3,0,0,2,3,3,0,3,2,0,0,0,0,0,\n3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,2,3,3,0,1,3,3,1,2,2,2,3,3,3,3,2,3,3,2,2,3,0,1,2,0,0,3,0,0,\n1,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,\n1,2,3,3,2,2,3,3,1,1,3,3,3,3,0,3,0,0,3,0,0,3,3,2,0,3,3,0,0,0,0,0,\n3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,3,3,0,0,3,3,0,0,3,3,3,2,0,2,0,0,3,0,0,2,2,0,0,2,3,0,0,0,0,0,\n1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,1,3,3,3,3,0,3,3,0,3,3,0,3,2,3,3,3,2,3,1,2,2,0,2,0,0,0,2,0,0,\n0,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,\n1,2,3,3,1,2,3,3,2,1,3,2,3,3,0,3,0,0,3,0,0,2,2,1,0,2,2,0,0,0,0,0,\n2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,3,3,2,1,3,3,1,1,3,3,3,3,0,3,0,0,3,0,0,3,2,2,0,3,2,0,0,0,0,0,\n2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,2,3,3,3,1,3,2,0,0,0,0,2,2,3,3,1,2,3,1,1,3,0,0,2,0,0,2,0,0,\n0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,1,1,3,3,3,1,3,3,0,0,0,0,3,0,2,2,1,3,2,1,1,2,0,0,0,0,0,3,0,0,\n0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,1,3,3,1,1,3,3,1,1,3,2,3,3,2,2,2,2,2,1,1,2,2,0,0,2,2,0,0,0,0,0,\n1,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,0,2,2,0,0,2,3,0,2,1,2,1,1,2,1,0,1,1,1,0,2,1,2,0,0,0,2,0,0,\n0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,2,0,1,0,0,0,1,0,2,1,0,0,0,0,0,1,0,\n3,3,3,2,3,3,3,1,3,2,0,0,2,1,2,2,2,3,0,3,3,1,0,3,0,0,3,0,0,2,0,0,\n0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,1,2,3,2,3,0,3,3,0,0,2,0,2,2,2,3,0,2,3,0,0,2,0,0,0,0,0,2,0,0,\n0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,3,3,\n0,0,0,0,2,3,3,3,3,3,2,3,1,0,0,0,3,0,0,0,2,0,3,0,0,1,1,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,0,2,2,\n0,0,0,0,3,3,3,3,3,2,3,2,1,0,0,0,2,0,0,0,2,0,2,0,0,1,1,2,1,0,0,1,\n2,3,3,3,2,1,3,3,2,0,3,2,3,3,0,3,0,0,2,0,0,2,2,2,0,2,2,0,0,0,0,0,\n2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,2,2,\n0,0,0,0,3,3,3,3,2,3,2,3,0,0,0,0,2,0,0,0,3,0,3,0,0,2,0,2,0,0,0,1,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,2,2,0,2,1,\n0,0,0,0,3,3,3,3,3,2,3,3,1,0,0,0,3,0,0,0,2,0,2,0,0,2,1,2,0,0,0,1,\n2,3,0,1,3,2,0,0,2,2,0,0,1,0,2,0,2,3,0,3,2,0,0,2,0,1,0,0,0,2,0,0,\n0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,1,0,3,2,3,1,2,2,0,0,0,0,2,3,3,2,2,2,2,0,2,2,0,0,0,0,0,2,0,1,\n0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,1,3,3,1,1,3,3,1,0,3,2,3,2,0,2,0,0,2,0,0,2,2,1,0,1,2,0,0,0,0,0,\n1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,\n1,0,2,3,1,2,3,2,0,3,1,2,2,3,1,2,0,0,3,0,0,2,2,0,2,2,2,0,0,1,0,0,\n1,1,0,1,0,0,0,0,0,0,0,0,0,1,2,2,0,1,0,2,0,2,0,2,1,0,0,0,0,1,1,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,3,3,\n0,0,0,0,2,2,2,2,2,2,2,3,1,0,0,0,2,0,0,0,2,0,2,0,0,1,1,2,0,0,0,1,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,3,3,\n0,0,0,0,2,3,2,1,2,3,1,1,1,0,0,0,1,0,0,0,2,0,2,0,0,3,1,1,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,3,2,\n0,0,0,0,2,3,2,2,2,2,1,1,1,0,0,0,2,0,1,0,2,0,2,0,0,2,1,2,1,0,0,1,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,3,3,\n0,0,0,0,1,3,2,2,2,1,3,3,1,0,0,0,2,0,1,0,2,0,1,0,0,1,1,2,1,0,0,1,\n0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,3,3,\n0,0,0,0,1,2,2,1,2,1,2,1,0,0,0,0,2,0,0,0,2,0,2,0,0,1,0,1,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,0,3,2,\n0,0,0,0,2,2,2,3,2,2,1,3,0,0,0,0,1,0,0,0,2,0,1,0,0,2,0,1,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,2,3,\n0,0,0,0,2,1,3,1,1,1,2,1,0,0,0,0,1,0,0,0,2,0,1,0,0,1,0,1,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,0,2,2,\n0,0,0,0,2,1,1,2,2,1,1,1,1,0,0,0,1,0,0,0,2,0,1,0,0,3,1,1,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,2,2,\n0,0,0,0,2,1,1,0,1,1,1,0,1,0,0,0,1,0,3,0,1,0,1,0,0,2,1,1,3,0,0,2,\n1,1,1,3,0,3,2,2,0,2,1,2,3,3,3,3,2,0,2,0,0,2,2,0,2,1,2,0,0,1,0,0,\n1,1,0,1,0,0,0,0,0,0,0,0,0,1,2,1,0,1,0,2,0,1,0,2,1,0,0,0,0,1,1,0,\n3,3,1,1,3,2,3,0,2,1,0,0,0,0,2,3,2,1,0,2,2,0,0,1,2,0,0,0,0,2,0,0,\n0,0,2,2,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,2,0,\n2,3,0,0,2,2,3,2,2,2,0,0,1,0,2,0,1,1,0,2,2,0,0,1,1,0,0,0,0,1,0,0,\n2,0,2,2,0,0,0,0,0,0,0,0,0,2,1,1,0,0,0,0,0,0,0,2,0,1,0,0,0,0,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,2,0,2,2,\n0,0,0,0,2,2,2,1,2,1,1,1,0,0,0,0,2,0,0,0,1,0,1,0,0,1,1,1,0,0,0,0,\n3,2,1,1,3,2,0,0,2,2,0,0,0,3,1,0,2,1,0,2,2,0,0,2,0,0,0,0,0,1,0,0,\n0,0,1,2,0,0,0,0,0,0,0,0,0,2,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,2,0,\n0,0,0,0,0,1,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,0,0,1,\n0,0,0,0,1,1,2,2,2,1,2,1,2,0,0,0,1,0,1,0,2,0,1,0,0,0,1,1,1,0,0,1,\n3,2,1,0,3,3,0,0,2,2,0,0,0,1,2,1,2,2,1,1,2,0,1,2,0,0,0,0,0,2,0,0,\n0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,1,2,\n0,0,0,0,2,2,3,3,3,2,2,2,0,0,0,0,2,0,0,0,1,0,2,0,0,1,0,2,0,0,0,0,\n3,3,1,1,2,2,2,0,1,2,0,0,0,0,1,2,2,1,0,2,1,0,0,2,0,0,0,0,0,2,0,0,\n0,1,2,2,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,1,1,0,0,0,0,1,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,2,3,\n0,0,0,0,1,1,2,1,2,2,1,1,0,0,0,0,1,0,0,0,2,0,2,0,0,1,0,1,0,0,0,0,\n3,3,1,1,2,0,1,2,2,0,0,1,1,1,0,1,1,0,1,1,0,0,2,2,2,1,0,0,0,0,0,0,\n0,1,1,2,0,0,0,0,0,0,0,0,0,1,1,1,0,1,0,0,0,2,0,1,1,0,0,0,0,1,2,0,\n2,2,0,1,3,2,2,0,3,2,0,0,0,0,2,0,1,2,0,1,1,0,0,2,1,0,0,0,0,1,0,0,\n0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,0,2,2,\n0,0,0,0,2,3,1,2,1,2,2,1,0,0,0,0,1,0,0,0,2,0,1,0,0,1,0,1,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,2,3,\n0,0,0,0,2,0,0,1,2,1,0,1,1,0,0,0,1,0,1,0,2,0,0,0,0,0,1,1,2,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,3,2,\n0,0,0,0,2,2,2,1,2,1,1,1,1,0,0,0,2,0,0,0,2,0,1,0,0,2,1,2,1,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,3,2,\n0,0,0,0,2,1,1,0,2,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,2,0,0,1,\n2,3,0,0,2,3,2,0,1,1,0,0,0,0,2,2,2,1,1,2,1,0,0,0,0,0,0,0,0,1,0,0,\n0,0,1,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,\n0,0,1,1,0,2,2,1,0,2,0,3,2,1,1,2,0,0,0,0,0,1,2,0,2,1,1,0,0,2,0,0,\n0,1,0,1,0,0,0,0,0,0,0,0,0,1,1,1,0,1,0,1,0,1,0,1,1,0,0,0,0,1,1,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,3,2,\n0,0,0,0,2,1,1,0,0,0,1,0,1,0,1,0,1,1,1,0,1,1,1,0,0,2,0,0,1,0,0,1,\n};\n\nconst SequenceModel ISO_8859_7greekModel = \n{\n  greek_ISO_8859_7CharToOrderMap,\n  greekLangModel,\n  (float)0.944928,\n  true,\n  \"ISO-8859-7\",\n  \"greek\"\n};\n\nconst SequenceModel WINDOWS_1253greekModel = \n{\n  greek_WINDOWS_1253CharToOrderMap,\n  greekLangModel,\n  (float)0.944928,\n  true,\n  \"WINDOWS-1253\",\n  \"greek\"\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/LangHebrewModel.cpp",
    "content": "/**\n * @file    LangHebrewModel.cpp\n * @brief   LangHebrewModel\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsSBCharSetProber.h\"\n\n\n/****************************************************************\n255: Control characters that usually does not exist in any text\n254: Carriage/Return\n253: symbol (punctuation) that does not belong to word\n252: 0 - 9\n\n*****************************************************************/\n\n//Windows-1255 language model\n//Character Mapping Table:\nstatic const unsigned char win1255_CharToOrderMap[] =\n{\n255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  //00\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  //10\n253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  //20\n252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  //30\n253, 69, 91, 79, 80, 92, 89, 97, 90, 68,111,112, 82, 73, 95, 85,  //40\n 78,121, 86, 71, 67,102,107, 84,114,103,115,253,253,253,253,253,  //50\n253, 50, 74, 60, 61, 42, 76, 70, 64, 53,105, 93, 56, 65, 54, 49,  //60\n 66,110, 51, 43, 44, 63, 81, 77, 98, 75,108,253,253,253,253,253,  //70\n124,202,203,204,205, 40, 58,206,207,208,209,210,211,212,213,214,\n215, 83, 52, 47, 46, 72, 32, 94,216,113,217,109,218,219,220,221,\n 34,116,222,118,100,223,224,117,119,104,125,225,226, 87, 99,227,\n106,122,123,228, 55,229,230,101,231,232,120,233, 48, 39, 57,234,\n 30, 59, 41, 88, 33, 37, 36, 31, 29, 35,235, 62, 28,236,126,237,\n238, 38, 45,239,240,241,242,243,127,244,245,246,247,248,249,250,\n  9,  8, 20, 16,  3,  2, 24, 14, 22,  1, 25, 15,  4, 11,  6, 23,\n 12, 19, 13, 26, 18, 27, 21, 17,  7, 10,  5,251,252,128, 96,253,\n};\n\n//Model Table: \n//total sequences: 100%\n//first 512 sequences: 98.4004%\n//first 1024 sequences: 1.5981%\n//rest  sequences:      0.087%\n//negative sequences:   0.0015% \nstatic const PRUint8 HebrewLangModel[] = \n{\n0,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,2,3,2,1,2,0,1,0,0,\n3,0,3,1,0,0,1,3,2,0,1,1,2,0,2,2,2,1,1,1,1,2,1,1,1,2,0,0,2,2,0,1,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,\n1,2,1,2,1,2,0,0,2,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,\n1,2,1,3,1,1,0,0,2,0,0,0,1,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,0,1,2,2,1,3,\n1,2,1,1,2,2,0,0,2,2,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,1,0,1,1,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,2,2,2,2,3,2,\n1,2,1,2,2,2,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,2,3,2,2,3,2,2,2,1,2,2,2,2,\n1,2,1,1,2,2,0,1,2,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,0,2,2,2,2,2,\n0,2,0,2,2,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,0,2,2,2,\n0,2,1,2,2,2,0,0,2,1,0,0,0,0,1,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,1,0,\n3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,2,1,2,3,2,2,2,\n1,2,1,2,2,2,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,0,\n3,3,3,3,3,3,3,3,3,2,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,1,0,2,0,2,\n0,2,1,2,2,2,0,0,1,2,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,2,0,0,1,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,3,2,2,3,2,1,2,1,1,1,\n0,1,1,1,1,1,3,0,1,0,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,\n3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,0,1,0,0,1,0,0,0,0,\n0,0,1,0,0,0,0,0,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,\n0,2,0,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,\n3,3,3,3,3,3,3,3,3,2,3,3,3,2,1,2,3,3,2,3,3,3,3,2,3,2,1,2,0,2,1,2,\n0,2,0,2,2,2,0,0,1,2,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,\n3,3,3,3,3,3,3,3,3,2,3,3,3,1,2,2,3,3,2,3,2,3,2,2,3,1,2,2,0,2,2,2,\n0,2,1,2,2,2,0,0,1,2,0,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,1,0,0,1,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,2,3,3,2,2,2,3,3,3,3,1,3,2,2,2,\n0,2,0,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,3,3,3,2,3,2,2,2,1,2,2,0,2,2,2,2,\n0,2,0,2,2,2,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,\n3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,1,3,2,3,3,2,3,3,2,2,1,2,2,2,2,2,2,\n0,2,1,2,1,2,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,1,0,\n3,3,3,3,3,3,2,3,2,3,3,2,3,3,3,3,2,3,2,3,3,3,3,3,2,2,2,2,2,2,2,1,\n0,2,0,1,2,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,\n3,3,3,3,3,3,3,3,3,2,1,2,3,3,3,3,3,3,3,2,3,2,3,2,1,2,3,0,2,1,2,2,\n0,2,1,1,2,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,2,0,\n3,3,3,3,3,3,3,3,3,2,3,3,3,3,2,1,3,1,2,2,2,1,2,3,3,1,2,1,2,2,2,2,\n0,1,1,1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,0,2,3,3,3,1,3,3,3,1,2,2,2,2,1,1,2,2,2,2,2,2,\n0,2,0,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,\n3,3,3,3,3,3,2,3,3,3,2,2,3,3,3,2,1,2,3,2,3,2,2,2,2,1,2,1,1,1,2,2,\n0,2,1,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,\n3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,1,0,0,0,0,0,\n1,0,1,0,0,0,0,0,2,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,2,3,3,2,3,1,2,2,2,2,3,2,3,1,1,2,2,1,2,2,1,1,0,2,2,2,2,\n0,1,0,1,2,2,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,\n3,0,0,1,1,0,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,0,\n0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,1,0,1,0,1,1,0,1,1,0,0,0,1,1,0,1,1,1,0,0,0,0,0,0,1,0,0,0,0,0,\n0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,0,0,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,\n3,2,2,1,2,2,2,2,2,2,2,1,2,2,1,2,2,1,1,1,1,1,1,1,1,2,1,1,0,3,3,3,\n0,3,0,2,2,2,2,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,\n2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,1,2,2,2,1,1,1,2,0,1,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,0,2,2,0,0,0,0,0,0,\n0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,1,0,2,1,0,\n0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,\n0,3,1,1,2,2,2,2,2,1,2,2,2,1,1,2,2,2,2,2,2,2,1,2,2,1,0,1,1,1,1,0,\n0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,1,1,1,1,2,1,1,2,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,\n0,0,2,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,1,0,0,\n2,1,1,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,1,2,1,2,1,1,1,1,0,0,0,0,\n0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,2,1,2,2,2,2,2,2,2,2,2,2,1,2,1,2,1,1,2,1,1,1,2,1,2,1,2,0,1,0,1,\n0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,3,1,2,2,2,1,2,2,2,2,2,2,2,2,1,2,1,1,1,1,1,1,2,1,2,1,1,0,1,0,1,\n0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,1,2,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,\n0,2,0,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,\n3,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,1,1,1,1,1,1,1,0,1,1,0,1,0,0,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,2,0,1,1,1,0,1,0,0,0,1,1,0,1,1,0,0,0,0,0,1,1,0,0,\n0,1,1,1,2,1,2,2,2,0,2,0,2,0,1,1,2,1,1,1,1,2,1,0,1,1,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,0,1,0,0,0,0,0,1,0,1,2,2,0,1,0,0,1,1,2,2,1,2,0,2,0,0,0,1,2,0,1,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,2,0,2,1,2,0,2,0,0,1,1,1,1,1,1,0,1,0,0,0,1,0,0,1,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,1,0,0,0,0,0,1,0,2,1,1,0,1,0,0,1,1,1,2,2,0,0,1,0,0,0,1,0,0,1,\n1,1,2,1,0,1,1,1,0,1,0,1,1,1,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,2,2,1,\n0,2,0,1,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,1,0,0,1,0,1,1,1,1,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,1,1,1,1,1,1,1,1,2,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,1,1,0,1,0,0,0,1,1,0,1,\n2,0,1,0,1,0,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,1,0,1,1,1,0,1,0,0,1,1,2,1,1,2,0,1,0,0,0,1,1,0,1,\n1,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,1,0,1,1,2,0,1,0,0,0,0,2,1,1,2,0,2,0,0,0,1,1,0,1,\n1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,1,0,2,1,1,0,1,0,0,2,2,1,2,1,1,0,1,0,0,0,1,1,0,1,\n2,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,1,2,2,0,0,0,0,0,1,1,0,1,0,0,1,0,0,0,0,1,0,1,\n1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,1,2,2,0,0,0,0,2,1,1,1,0,2,1,1,0,0,0,2,1,0,1,\n1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,1,0,1,1,2,0,1,0,0,1,1,0,2,1,1,0,1,0,0,0,1,1,0,1,\n2,2,1,1,1,0,1,1,0,1,1,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,1,0,2,1,1,0,1,0,0,1,1,0,1,2,1,0,2,0,0,0,1,1,0,1,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,\n0,1,0,0,2,0,2,1,1,0,1,0,1,0,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,1,0,1,1,2,0,1,0,0,1,1,1,0,1,0,0,1,0,0,0,1,0,0,1,\n1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,0,0,0,0,0,0,0,1,0,1,1,0,0,1,0,0,2,1,1,1,1,1,0,1,0,0,0,0,1,0,1,\n0,1,1,1,2,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,1,2,1,0,0,0,0,0,1,1,1,1,1,0,1,0,0,0,1,1,0,0,\n};\n\nconst SequenceModel Win1255Model = \n{\n  win1255_CharToOrderMap,\n  HebrewLangModel,\n  (float)0.984004,\n  false,\n  \"windows-1255\",\n  \"Hebrew\"\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/LangHungarianModel.cpp",
    "content": "/**\n * @file    LangHungarianModel.cpp\n * @brief   LangHungarianModel\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsSBCharSetProber.h\"\n/****************************************************************\n255: Control characters that usually does not exist in any text\n254: Carriage/Return\n253: symbol (punctuation) that does not belong to word\n252: 0 - 9\n\n*****************************************************************/\n\n//Character Mapping Table:\nstatic const unsigned char Latin2_HungarianCharToOrderMap[] =\n{\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255, 30, 47, 46, 43, 34, 50, 52, 38, 41, 49, 36, 44, 33, 35, 53,\n 51,180, 45, 37, 42, 56, 39, 62, 64, 59, 54,255,255,255,255,255,\n255,  2, 18, 27, 17,  1, 24, 12, 20,  9, 23,  7,  5, 13,  4,  8,\n 26, 65, 10,  6,  3, 21, 19, 67, 63, 16, 11,255,255,255,255,255,\n179,178,177,176,175,174,173,172,171,170,169,168,167,166,165,164,\n163,162,161,160,159,158,157,156,155,154,153,152,151,150,149,148,\n147,146,145,144,143,142,141,140,139,138,137,136,135,134,133,132,\n131,130,129,128,127,126,125,124,123,122,121,120,119,118,117,116,\n115, 55,114,113,112,111,110,109,108, 48,107,106,105, 66,104,103,\n102,101,100, 60, 99, 61, 57, 98, 97, 96, 58, 68, 69, 95, 94, 93,\n 92, 14, 91, 90, 89, 88, 87, 86, 85, 15, 84, 70, 83, 31, 82, 81,\n 80, 79, 78, 25, 77, 28, 22, 76, 75, 74, 32, 40, 29, 73, 72, 71,\n};\n\nstatic const unsigned char win1250HungarianCharToOrderMap[] =\n{\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255, 30, 47, 46, 43, 34, 50, 52, 38, 41, 49, 36, 44, 33, 35, 53,\n 51,180, 45, 37, 42, 56, 39, 63, 65, 60, 54,255,255,255,255,255,\n255,  2, 18, 27, 17,  1, 24, 12, 20,  9, 23,  7,  5, 13,  4,  8,\n 26, 67, 10,  6,  3, 21, 19, 70, 64, 16, 11,255,255,255,255,255,\n179,178,177,176, 59,175,174,173,172,171,170,169,168,167,166,165,\n164,163,162,161,160,159,158,157,156,155,154,153,152,151,150,149,\n148,147,146,145,144,143,142,141,140,139,138, 69,137,136,135,134,\n133,132,131,130,129,128,127,126,125,124,123, 66,122,121,120,119,\n118, 55,117,116,115,114,113,112,111, 48,110,109,108, 68,107,106,\n105,104,103, 61,102, 62, 57,101,100, 99, 58, 71, 72, 98, 97, 96,\n 95, 14, 94, 93, 92, 91, 90, 89, 88, 15, 87, 73, 86, 31, 85, 84,\n 83, 82, 81, 25, 80, 28, 22, 79, 78, 77, 32, 40, 29, 76, 75, 74,\n};\n\n//Model Table: \n//total sequences: 100%\n//first 512 sequences: 94.7368%\n//first 1024 sequences:5.2623%\n//rest  sequences:     0.8894%\n//negative sequences:  0.0009% \nstatic const PRUint8 HungarianLangModel[] = \n{\n2,2,3,3,3,3,3,2,3,3,3,3,3,3,2,2,3,3,3,3,2,0,3,3,0,3,3,0,2,0,2,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,\n3,2,3,3,3,3,3,0,3,3,3,3,3,2,2,3,3,3,3,3,3,0,3,3,2,3,3,0,2,0,0,2,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,2,2,2,3,3,3,0,3,3,3,3,3,3,2,3,2,3,3,3,0,2,2,\n0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,2,3,3,3,3,2,2,3,2,3,3,3,3,3,2,3,3,3,3,2,2,2,3,3,3,0,2,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,2,0,3,2,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,2,3,3,3,3,3,3,2,3,3,3,2,2,3,2,3,3,3,0,2,3,2,2,3,3,0,3,3,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,2,0,2,3,3,2,2,3,2,3,3,3,2,2,3,2,0,2,3,0,2,2,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,3,3,3,3,3,0,2,3,3,3,3,0,2,2,3,3,3,3,2,0,2,2,0,3,3,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,2,2,3,3,3,3,3,3,0,3,3,3,3,3,2,2,3,3,3,3,0,2,0,0,2,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,3,3,3,2,3,2,3,3,3,0,2,2,\n0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,2,3,3,2,3,3,2,3,3,3,2,3,3,2,2,3,2,0,3,3,0,3,2,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,2,3,2,3,3,3,2,3,3,3,3,3,3,2,3,2,2,2,2,0,2,2,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,2,3,3,2,3,3,2,2,0,3,3,3,0,2,3,2,2,3,3,2,2,2,3,2,0,2,0,3,2,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,3,3,3,3,3,0,3,3,3,3,3,0,2,0,3,3,3,3,2,0,3,2,0,2,3,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,3,3,3,3,3,0,2,3,3,3,3,0,2,0,3,3,3,3,0,0,3,2,0,3,2,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,2,3,3,3,3,3,2,2,3,3,3,0,0,3,3,3,3,3,2,2,3,2,2,2,3,0,2,3,\n0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,2,3,2,3,3,3,2,2,2,3,3,2,3,2,3,2,3,3,3,2,3,0,0,3,2,0,3,2,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,2,3,2,2,3,3,3,0,0,0,3,3,0,2,3,2,2,3,3,2,0,3,0,0,3,2,0,2,2,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,2,0,2,0,3,3,2,0,0,0,3,3,0,0,2,2,0,2,3,2,0,2,0,0,2,2,0,2,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,2,2,2,0,3,3,0,0,0,0,3,3,0,0,0,0,2,3,3,0,0,3,0,0,2,2,0,3,3,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,3,3,3,3,3,0,2,3,3,3,3,2,0,0,3,2,2,2,0,0,3,2,0,2,2,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,3,3,3,3,3,0,0,3,3,3,3,0,0,0,2,3,3,2,0,0,2,2,0,2,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,2,2,3,2,3,2,2,2,0,2,3,3,0,3,2,2,2,3,3,3,2,3,0,2,0,2,0,0,2,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,2,2,0,0,3,3,2,0,0,2,3,3,2,0,0,0,0,3,3,3,2,2,0,0,3,3,0,0,2,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,3,3,3,3,3,0,2,3,3,2,2,0,2,0,3,3,3,2,0,0,2,2,0,2,2,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,2,2,2,2,3,3,3,2,0,0,3,3,0,2,2,2,2,3,2,3,2,2,3,2,2,2,0,2,2,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,0,2,3,3,3,3,2,2,0,0,3,2,2,0,2,2,3,2,0,0,0,0,0,2,0,0,0,2,2,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,3,3,3,3,3,0,2,3,2,2,2,2,0,0,3,3,2,2,0,0,2,2,0,2,2,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,3,3,3,3,3,0,0,3,2,3,0,0,0,0,2,2,2,2,0,0,2,0,0,2,2,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,2,2,2,0,3,0,0,2,3,0,3,0,0,0,2,2,0,2,2,0,0,2,0,2,0,0,0,0,0,0,\n0,2,2,2,2,0,2,0,2,2,0,2,2,0,0,0,0,0,2,0,0,2,0,2,0,0,0,0,0,0,0,0,\n0,0,3,3,2,2,2,0,0,3,3,3,2,0,0,0,2,2,3,0,0,0,2,0,0,2,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,2,3,2,3,3,2,0,0,3,3,3,0,0,0,0,2,0,2,0,0,0,3,2,0,0,2,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,0,0,0,0,3,3,0,0,0,0,3,2,0,0,0,0,0,2,2,0,0,0,0,0,0,2,0,2,0,\n0,2,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,2,3,2,2,0,0,2,3,3,2,0,0,0,2,2,0,2,2,0,2,0,0,0,0,0,0,0,0,0,\n2,0,2,2,2,0,0,0,0,2,2,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,0,0,0,0,0,3,2,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,\n0,2,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,2,0,0,0,0,\n3,2,0,0,0,0,0,2,3,2,0,0,0,3,3,0,0,0,0,0,2,2,0,0,0,0,0,0,2,0,2,0,\n0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,2,0,0,0,\n2,2,2,0,0,0,0,2,2,0,3,0,0,2,0,2,0,0,2,2,2,2,0,0,0,0,0,0,0,0,0,0,\n2,2,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,2,2,2,0,0,0,0,0,0,0,0,\n2,3,0,0,0,0,0,3,2,0,0,0,0,3,2,0,0,0,0,0,2,0,2,0,0,0,0,0,0,2,0,0,\n0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,0,0,0,0,0,2,3,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,2,2,2,2,2,0,2,2,2,0,0,0,0,0,0,2,2,0,0,0,2,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,2,2,2,3,0,0,0,2,2,3,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,\n0,0,2,0,2,2,2,0,2,0,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,0,0,0,0,0,2,2,2,0,0,0,2,2,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,0,0,\n0,2,0,0,2,0,0,0,2,0,0,0,0,0,0,2,0,2,0,0,0,0,2,0,2,0,0,0,0,0,0,0,\n3,2,0,0,0,0,0,2,0,2,0,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,0,0,\n0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,\n3,2,0,0,0,0,0,3,2,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,2,0,0,\n0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,\n2,3,0,0,0,0,0,2,2,0,0,0,0,2,2,0,0,0,0,2,2,2,0,0,2,0,0,0,0,2,0,0,\n0,2,0,2,2,0,0,0,2,2,2,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,\n0,3,0,0,0,3,0,2,3,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n3,2,0,0,2,0,0,2,2,2,0,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,2,0,2,0,0,\n0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,\n0,0,0,3,2,3,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,\n0,0,2,0,2,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,2,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,0,0,0,0,0,2,0,2,0,0,0,0,2,0,0,0,0,0,2,2,0,0,0,0,0,0,2,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,0,0,0,0,2,2,0,0,0,0,2,2,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,\n0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,\n2,2,0,0,0,0,0,2,2,2,0,0,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,\n0,0,2,0,3,0,2,0,0,2,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,\n0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,\n0,0,2,0,2,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,2,0,0,0,2,0,0,2,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,2,0,0,0,0,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,2,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,\n0,0,2,0,0,0,2,0,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,\n0,2,0,0,0,0,2,0,2,0,0,0,0,0,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,2,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n};\n\nconst SequenceModel Latin2HungarianModel = \n{\n  Latin2_HungarianCharToOrderMap,\n  HungarianLangModel,\n  (float)0.965178,\n  true,\n  \"ISO-8859-2\",\n  \"hungarian\"\n};\n\nconst SequenceModel Win1250HungarianModel = \n{\n  win1250HungarianCharToOrderMap,\n  HungarianLangModel,\n  (float)0.965178,\n  true,\n  \"windows-1250\",\n  \"hungarian\"\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/LangPolishModel.cpp",
    "content": "/**\n * @file    LangGreekModel.cpp\n * @brief   LangGreekModel\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsSBCharSetProber.h\"\n\nstatic const unsigned char polish_iso_8859_2CharToOrderMap[] = \n{\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255, 34, 39, 37, 46, 54, 59, 51, 43, 35, 42, 45, 49, 41, 32, 47,\n 31,180, 50, 33, 38, 53, 60, 30, 61, 58, 40,255,255,255,255,255,\n255,  1, 21, 11, 13,  3, 44, 23, 26,  2, 18, 15, 20, 14,  6,  4,\n 16, 63,  7,  8, 12, 19, 52,  9, 64, 10,  5,255,255,255,255,255,\n179,178,177,176,175,174,173,172,171,170,169,168,167,166,165,164,\n163,162,161,160,159,158,157,156,155,154,153,152,151,150,149,148,\n147, 70,146, 57,145,144, 55, 78,143,142,141,140, 74,139,138, 56,\n137, 24,136, 17,135, 82, 27,134,133,132,131, 65, 48,130,129, 25,\n128,127,126,125,124,123, 77,122,121,120, 66,119,118,117,116,115,\n114, 68,113, 62,112,111,110,109,108,107,106,105, 81,104,103,102,\n101, 76, 69,100, 80, 99, 29, 71, 98, 67, 22, 97, 96, 95, 79, 73,\n 94, 36, 93, 28, 92, 91, 75, 90, 89, 88, 87, 86, 72, 85, 84, 83,\n};\n\nstatic const PRUint8 polishLangModel[] = \n{\n2,2,2,2,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,0,3,0,3,2,3,0,3,0,0,0,\n0,0,0,3,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,3,3,3,3,3,3,3,0,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,0,3,3,3,0,0,0,\n0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,\n2,2,2,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,3,3,0,3,0,3,2,3,0,3,0,0,0,\n0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,2,2,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,3,3,0,3,0,3,2,3,0,3,0,0,0,\n0,0,0,3,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,2,3,3,3,0,3,3,3,3,0,3,2,0,2,3,0,0,3,3,3,0,0,0,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,3,3,2,3,3,3,2,2,2,3,3,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,2,2,3,3,3,3,0,3,3,3,3,2,3,2,0,2,0,3,0,2,0,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,0,3,3,3,3,2,3,3,3,2,3,2,2,3,0,3,0,0,3,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,3,3,3,3,3,3,0,3,3,3,3,3,3,3,3,2,3,3,2,3,2,3,2,3,0,3,0,0,0,\n0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,0,0,2,3,0,2,0,2,3,0,0,2,3,2,0,3,0,3,0,3,0,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,0,3,3,3,3,3,3,2,2,2,3,2,3,2,3,3,0,3,0,3,0,2,0,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,2,3,3,3,3,2,3,2,2,2,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,0,3,3,2,2,3,2,2,2,2,3,3,2,2,3,2,3,3,2,3,2,0,2,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,0,3,3,3,3,0,2,3,0,0,2,0,3,0,3,3,2,3,2,3,3,0,2,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,0,3,3,3,0,3,2,2,0,0,2,2,3,0,3,3,0,3,0,2,0,2,0,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,3,3,2,3,0,2,0,3,2,3,2,2,3,0,2,0,3,0,3,3,3,3,2,0,0,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,2,3,3,3,2,0,3,2,3,3,2,2,0,0,3,2,2,3,2,3,2,0,3,2,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,2,3,3,3,3,3,0,3,3,3,3,3,3,3,3,0,3,3,0,3,0,3,0,3,0,2,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,2,3,0,3,2,0,3,2,2,3,3,0,0,2,3,3,3,3,2,3,2,0,2,2,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,2,3,3,2,2,3,2,2,0,0,2,0,3,2,3,3,0,3,0,3,0,0,0,2,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,3,0,0,3,0,0,3,3,3,0,3,3,3,0,0,2,3,0,2,0,3,0,3,0,2,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,0,3,3,0,3,0,0,0,3,2,0,0,3,2,3,3,0,3,0,3,2,2,0,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,3,0,0,3,2,0,3,3,3,0,3,3,3,0,0,0,2,0,3,0,3,0,2,0,3,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,3,3,0,3,0,2,2,3,2,0,3,2,3,0,2,0,2,2,2,3,2,3,0,0,0,2,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,0,3,2,0,3,3,3,2,0,2,0,0,3,0,3,2,0,2,0,2,2,0,2,2,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,3,3,0,3,0,3,0,0,3,0,3,0,0,0,3,2,0,0,0,0,0,0,0,3,0,0,0,\n0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,2,0,3,2,3,0,3,2,3,2,2,2,3,3,0,3,3,0,3,0,3,0,2,0,2,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,2,0,0,0,2,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,2,2,2,2,3,0,3,2,2,0,0,2,2,2,0,0,0,0,2,0,2,0,0,2,2,0,0,0,2,\n2,2,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,\n3,3,2,3,0,0,3,2,0,2,0,0,0,0,0,0,2,0,2,2,0,0,0,0,0,0,0,2,0,0,0,0,\n0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n0,2,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,\n2,3,2,2,3,2,0,0,2,2,2,3,0,2,3,3,3,0,0,0,0,0,0,2,0,2,0,0,0,0,2,0,\n0,0,2,0,0,2,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,2,2,2,2,0,0,2,0,0,2,2,0,0,0,0,3,2,0,0,0,2,0,0,0,0,2,0,2,\n2,0,0,0,2,0,0,2,2,2,0,0,2,2,0,0,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,2,0,2,2,0,2,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,2,2,0,0,0,\n0,0,0,0,0,0,0,3,0,0,3,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,3,3,0,2,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,3,0,2,0,0,0,0,\n0,2,2,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n3,2,3,3,0,0,3,0,2,2,2,0,0,0,0,0,2,0,2,0,0,2,0,2,0,0,0,0,0,2,0,0,\n0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,2,3,0,0,2,0,0,3,0,0,0,0,0,0,2,0,2,2,0,2,0,2,0,0,0,2,0,0,0,0,\n0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n3,2,2,2,0,3,2,0,2,0,0,2,2,2,0,0,2,2,0,0,2,0,2,0,0,0,0,0,0,0,0,0,\n0,2,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,\n3,3,2,3,0,2,2,0,0,2,0,0,0,0,0,0,2,0,2,0,0,2,0,0,0,0,0,3,0,0,0,2,\n0,2,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,\n0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n3,2,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,3,0,2,2,0,0,0,0,2,0,0,2,0,0,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,0,3,0,2,3,2,2,0,0,3,0,0,0,0,2,0,2,2,0,2,0,0,0,0,0,0,0,0,0,0,\n0,2,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,\n3,2,2,3,3,0,2,0,2,2,0,0,0,0,0,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,2,0,0,0,0,0,2,0,0,0,0,0,0,2,2,0,2,0,0,0,2,0,0,0,2,0,0,0,0,0,0,\n0,0,0,0,0,2,0,2,2,0,2,3,3,0,2,2,0,2,0,2,2,0,2,0,0,0,2,0,0,2,2,2,\n2,0,0,0,2,2,0,0,2,0,0,0,2,2,0,0,2,2,0,0,0,0,2,0,2,0,0,0,0,0,0,2,\n0,0,0,0,0,3,2,0,2,0,2,0,2,2,0,0,0,0,0,2,2,0,0,0,0,0,0,0,2,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,3,3,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,\n2,0,2,3,2,0,0,0,2,2,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,2,0,2,0,0,\n0,2,0,0,0,2,0,2,0,0,0,0,0,0,2,0,0,0,0,0,2,2,0,0,0,2,0,0,0,2,0,0,\n2,2,2,2,0,2,3,0,2,0,0,0,3,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,2,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,2,2,0,2,0,2,2,2,2,0,2,0,0,2,0,0,0,0,0,2,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,2,\n2,0,0,0,2,0,0,2,2,2,0,0,2,0,0,0,2,2,2,0,0,0,2,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,2,0,0,2,0,2,0,0,2,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,\n0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,3,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,\n0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,\n0,0,0,0,2,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,\n0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n};\n\nconst SequenceModel iso_8859_2polishModel = \n{\n  polish_iso_8859_2CharToOrderMap,\n  polishLangModel,\n  (float)0.974309,\n  PR_TRUE,\n  \"iso-8859-2\",\n  \"polish\"\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/LangSpanishModel.cpp",
    "content": "/**\n * @file    LangSpanishModel.cpp\n * @brief   LangSpanishModel\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsSBCharSetProber.h\"\n\nstatic const unsigned char spanish_windows_1252CharToOrderMap[] = \n{\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255, 32, 44, 29, 38, 26, 48, 49, 53, 37, 55, 63, 31, 35, 40, 46,\n 30, 58, 36, 33, 41, 47, 54, 52, 64, 51, 67,255,255,255,255,255,\n255,  2, 15, 11,  9,  1, 19, 16, 21,  6, 27, 43,  8, 13,  4,  3,\n 14, 22,  7,  5, 10, 12, 17, 42, 39, 18, 24,255,255,255,255,255,\n180,179,178,177,176, 71,175,174,173,172,171,170,169,168,167,166,\n165, 76, 70, 61, 62,164, 57,163,162,161,160,159,158,157,156,155,\n154, 56,153,152,151,150,149,148,147, 79, 73, 59,146,145,144,143,\n 83, 82,142,141,140,139,138,137,136,135, 78, 60,134,133,132, 50,\n131, 72,130,129,128,127,126,125,124, 66,123,122,121, 68,120,119,\n118, 74,117, 69,116,115,114,113,112,111, 81,110,109,108,107,106,\n105, 25,104,103,102,101,100, 77, 75, 28, 99, 98, 97, 23, 96, 95,\n 94, 34, 80, 20, 93, 92, 91, 90, 89, 88, 45, 87, 65, 86, 85, 84,\n};\n\nstatic const PRUint8 spanishLangModel[] = \n{\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,3,3,3,2,0,3,0,0,2,2,0,\n2,3,0,0,0,0,3,0,2,3,2,3,2,0,0,0,0,0,0,2,0,0,0,0,2,0,0,2,0,2,0,2,\n3,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,0,0,3,0,0,0,0,0,\n0,3,0,0,0,0,2,0,0,2,2,0,3,0,0,0,0,0,0,0,0,2,0,0,2,0,0,2,0,2,0,0,\n2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,2,2,3,0,0,3,2,0,0,0,0,\n3,3,2,0,0,0,2,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,2,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,3,3,2,3,3,3,2,0,3,3,2,0,0,0,\n0,0,0,0,0,2,0,0,0,0,3,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,2,3,3,0,3,3,3,3,3,3,3,3,3,2,2,3,3,3,3,3,0,2,0,0,2,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,2,0,0,\n3,3,3,3,3,0,3,3,3,3,3,3,3,3,3,3,3,0,3,3,0,3,0,3,2,0,3,3,2,2,2,0,\n0,3,0,0,0,0,2,0,0,0,3,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,0,2,3,0,0,0,2,\n0,0,0,0,0,2,0,0,2,0,3,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,\n3,3,3,0,3,3,2,3,3,3,3,3,3,2,2,3,3,2,2,3,2,3,3,3,3,0,0,3,0,0,0,0,\n0,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,\n3,3,3,0,2,3,3,2,0,2,2,3,3,0,0,2,2,0,2,3,2,2,3,0,3,0,0,2,2,0,2,0,\n0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,0,3,3,3,2,0,3,3,3,2,3,0,0,0,2,0,3,3,0,3,2,3,0,0,3,0,2,0,0,\n0,0,0,0,0,0,0,0,0,3,0,2,3,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,\n3,3,3,3,2,3,3,3,0,3,3,3,2,0,0,0,0,2,0,3,3,0,3,0,3,0,0,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,3,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,3,3,2,2,0,2,3,3,3,0,3,3,0,0,0,0,\n0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,0,0,0,0,0,3,3,3,3,0,0,2,0,3,0,0,3,0,3,0,0,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,0,2,3,3,3,0,3,2,3,2,2,0,0,0,3,0,3,3,0,2,2,3,0,0,2,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,0,3,3,3,3,2,2,0,3,2,0,0,0,2,2,0,2,0,0,3,0,2,0,3,2,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,2,3,3,3,0,2,0,3,2,0,0,2,0,2,0,3,3,0,3,0,2,0,0,2,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,0,0,3,2,0,0,0,0,3,0,0,0,0,0,0,0,2,0,0,3,0,2,0,0,3,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,2,2,0,3,2,0,2,2,2,2,2,3,0,0,0,0,3,0,0,0,0,2,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,\n3,3,3,0,0,3,3,3,0,3,0,3,0,0,0,0,0,0,2,2,0,0,3,0,2,0,0,2,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,3,3,0,3,3,3,0,2,0,3,2,0,2,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,0,3,2,2,0,3,0,3,0,0,0,0,0,2,0,2,0,0,2,0,2,0,0,2,0,0,0,0,\n0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,3,3,3,0,2,2,3,3,3,0,2,2,2,2,2,0,3,0,0,2,0,0,0,0,2,0,0,0,0,0,\n0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,3,2,0,2,0,0,0,0,2,2,3,0,0,2,0,0,0,3,0,2,0,0,2,0,0,2,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,\n0,0,0,3,3,0,3,3,0,3,3,2,3,3,2,3,2,0,3,0,0,2,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,3,3,0,3,3,2,2,2,3,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,\n2,0,0,3,0,2,2,3,2,0,0,2,0,0,2,2,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,\n3,3,3,0,0,3,0,0,0,0,0,3,0,0,0,0,0,0,0,3,0,0,2,0,2,0,0,2,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,3,3,0,3,3,3,3,3,0,2,2,2,2,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,0,0,3,3,2,0,0,0,3,0,0,0,0,0,3,0,3,3,0,0,0,2,2,0,0,0,0,2,2,\n0,0,0,2,3,3,0,2,2,0,0,0,0,2,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,0,\n3,3,3,0,2,3,3,2,0,0,0,3,0,0,0,0,0,0,0,0,2,0,0,0,2,2,0,2,2,0,3,2,\n2,0,0,2,2,3,0,0,0,0,0,0,2,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,0,0,3,0,2,0,0,0,3,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,2,0,2,3,\n0,0,2,0,3,2,0,0,0,0,0,0,0,2,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,3,2,0,3,3,3,2,3,3,3,2,2,2,2,2,0,0,2,2,0,0,0,0,0,0,2,2,2,0,\n3,0,2,3,2,2,0,2,2,0,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,\n3,3,3,0,0,3,2,2,0,3,3,3,2,2,0,0,0,2,0,2,0,0,2,0,0,2,0,0,3,2,2,2,\n0,0,2,0,2,2,0,0,2,0,0,2,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,3,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,3,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,0,0,3,2,0,0,0,2,3,0,0,0,0,0,0,0,2,0,0,0,0,2,2,0,2,0,2,2,2,\n2,0,0,0,3,0,0,0,0,0,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,3,0,0,3,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,2,2,\n2,0,2,2,2,0,0,2,2,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,3,2,0,2,2,0,2,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,2,0,0,2,2,2,2,\n2,0,2,0,3,2,0,3,3,0,0,2,0,2,0,2,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,\n3,2,3,0,0,3,2,0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,3,0,2,0,2,2,3,\n0,0,0,2,3,0,0,0,0,0,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,0,0,3,0,0,0,3,3,0,0,3,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,3,0,0,3,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,2,0,2,3,\n2,0,0,2,2,2,0,0,2,0,0,0,0,2,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n3,3,3,0,0,3,3,0,0,0,0,2,0,0,0,0,0,2,0,0,3,0,0,0,0,2,0,0,0,2,0,2,\n0,0,2,2,2,0,0,0,2,2,0,2,2,2,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,\n3,3,2,2,2,3,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,2,2,3,3,0,2,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,0,0,3,3,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,2,2,2,\n0,0,2,2,2,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,2,0,3,3,0,2,3,0,2,0,0,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,0,3,2,0,2,2,0,3,2,2,0,3,2,0,0,2,0,0,2,0,0,0,0,0,0,0,3,2,2,0,\n2,0,2,2,2,2,2,2,2,0,0,2,0,2,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,\n0,0,0,3,2,0,0,2,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,\n2,0,0,2,0,0,0,2,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,3,0,0,3,3,2,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,\n0,0,0,0,2,2,0,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,0,0,2,2,2,0,0,0,3,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,2,2,0,\n2,0,0,0,2,0,0,2,0,0,0,0,0,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,2,2,0,0,2,2,2,2,0,0,2,0,0,2,2,0,0,0,2,0,0,0,2,0,0,3,3,2,2,\n2,0,2,0,2,2,0,2,2,0,0,0,0,0,2,0,0,0,3,0,2,2,0,0,0,3,0,0,0,0,0,0,\n0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,3,0,0,2,0,0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,2,\n0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,2,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,2,\n0,0,0,0,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,2,0,0,2,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,0,2,0,0,0,0,0,2,0,0,2,0,0,0,2,0,0,0,2,0,0,0,2,0,0,2,2,2,2,\n2,0,2,0,0,2,0,0,2,0,0,0,0,2,0,0,0,0,2,0,2,2,0,0,0,2,0,0,0,0,0,0,\n2,2,2,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,2,2,0,0,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,\n0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,0,0,0,0,2,0,0,2,2,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,2,2,0,\n0,0,0,2,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,\n0,0,2,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n};\n\nconst SequenceModel windows_1252spanishModel = \n{\n  spanish_windows_1252CharToOrderMap,\n  spanishLangModel,\n  (float)0.983906,\n  PR_TRUE,\n  \"windows-1252\",\n  \"spanish\"\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/LangSwedishModel.cpp",
    "content": "/**\n * @file    LangSwedishModel.cpp\n * @brief   LangSwedishModel\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsSBCharSetProber.h\"\n\nstatic const unsigned char swedish_WINDOWS_1252CharToOrderMap[] = \n{\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255, 31, 44, 47, 26, 33, 36, 38, 27, 40, 30, 42, 43, 29, 34, 35,\n 45, 70, 46, 28, 37, 48, 32, 53, 61, 60, 57,255,255,255,255,255,\n255,  1, 23, 21,  7,  2, 18, 11, 14,  9, 24, 13,  8, 12,  3, 10,\n 22, 52,  5,  6,  4, 19, 16, 55, 41, 25, 54,255,255,255,255,255,\n180,179,178,177, 66,176, 71,175,174,173,172,171,170,169,168,167,\n166,165, 56, 59,164,163,162,161,160,159,158,157,156,155,154,153,\n152,151,150, 69,149,148,147,146,145,144,143,142,141,140,139,138,\n 72, 85, 77, 62,137,136,135,134,133,132,131, 39, 73, 68, 76,130,\n129,128,127,126, 49, 50, 84,125,124, 81,123,122,121,120,119,118,\n117,116,115,114,113,112, 58,111,110,109,108,107, 83,106,105,104,\n 64,103, 80,102, 15, 17, 65, 74, 67, 51, 79, 78,101,100, 99, 98,\n 97, 96, 95, 94, 82, 93, 20, 92, 91, 90, 89, 75, 63, 88, 87, 86,\n};\n\nstatic const PRUint8 swedishLangModel[] = \n{\n2,2,3,3,3,3,3,3,2,2,3,3,3,2,1,3,2,3,3,0,3,3,3,2,2,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,2,1,2,0,0,2,0,0,0,0,0,\n3,3,3,3,3,3,3,3,2,2,3,3,3,3,2,3,2,3,3,1,3,3,3,3,2,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,2,0,2,2,2,0,0,1,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,1,0,0,0,0,0,0,0,0,0,2,1,0,2,0,2,0,0,2,0,0,0,0,0,\n3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,3,3,3,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,2,1,0,0,2,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,2,1,0,0,0,0,0,0,1,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,2,2,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,2,3,3,3,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,2,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,1,1,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,2,3,3,3,3,3,1,3,0,3,3,2,3,3,3,1,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,0,\n3,2,3,3,3,3,3,3,2,2,3,3,3,3,2,3,2,3,3,2,3,3,3,3,2,0,0,0,0,0,0,0,\n0,0,0,0,0,0,1,0,3,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,0,2,3,3,3,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,0,0,0,2,0,0,\n3,3,3,3,3,3,2,3,3,3,3,2,2,3,3,3,3,2,3,3,0,2,2,3,3,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,2,2,2,0,2,3,3,1,2,0,1,3,3,3,0,3,3,0,0,0,3,3,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,0,0,\n1,2,3,3,3,3,3,3,0,1,3,3,3,2,2,3,0,3,0,0,3,3,2,2,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,2,2,2,2,3,2,3,2,3,2,1,2,3,2,2,0,0,0,0,0,0,0,\n0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,3,3,3,3,3,3,0,1,3,2,3,2,2,3,2,2,0,1,0,2,2,2,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,3,3,3,2,3,3,3,2,2,2,2,3,3,3,3,3,3,0,2,2,3,3,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,1,0,\n2,2,3,3,3,3,3,3,2,2,3,3,3,2,0,3,2,3,2,0,3,3,3,1,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,3,3,3,3,3,3,2,1,3,3,3,2,0,3,0,3,1,1,2,3,2,3,1,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,\n2,3,0,2,2,2,0,2,3,2,0,0,3,3,0,0,0,0,2,0,2,0,0,0,2,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,2,3,3,3,2,3,2,3,3,2,3,3,3,2,0,3,2,2,2,0,0,0,0,0,0,0,\n0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,\n3,3,2,2,3,2,2,3,3,3,0,0,0,1,3,0,3,0,3,3,1,0,3,3,3,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,\n3,3,2,2,0,2,3,3,1,3,0,1,3,0,3,0,2,2,3,3,0,0,1,0,2,0,0,0,0,0,0,0,\n0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,3,3,3,3,3,3,0,2,3,3,3,2,0,2,2,3,1,0,3,3,2,2,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,0,2,0,0,0,2,2,0,0,0,0,3,1,3,0,3,2,0,0,0,2,2,0,0,0,0,1,2,0,\n2,0,1,0,0,0,0,1,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,0,0,0,0,0,2,3,0,2,0,0,3,3,2,0,3,3,0,0,0,2,2,0,0,0,0,0,2,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,3,0,1,0,2,3,3,0,2,3,0,2,3,3,0,2,2,3,2,0,2,2,0,0,2,0,2,2,0,\n2,0,2,1,2,0,0,2,0,2,1,1,2,0,0,0,0,1,2,0,0,0,2,0,0,2,0,0,0,0,1,0,\n3,3,0,0,0,0,0,0,3,3,0,0,0,0,3,0,3,0,2,2,0,0,0,2,2,0,0,0,0,0,2,0,\n1,0,2,0,2,0,0,1,0,0,0,0,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,0,0,0,0,0,0,0,3,0,0,0,0,2,0,0,2,3,2,0,0,0,0,0,0,0,0,0,0,0,0,\n1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,\n0,1,3,2,2,3,2,3,0,0,1,2,2,2,0,2,0,2,2,0,2,2,2,0,0,2,0,2,1,0,0,1,\n0,2,0,1,2,2,0,0,2,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,0,2,0,0,0,3,2,0,0,0,0,3,0,2,0,1,1,0,0,0,0,0,0,0,0,0,0,2,0,\n2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,3,3,3,2,2,3,1,0,2,2,2,2,0,2,0,2,2,0,2,1,0,2,2,2,1,1,2,0,0,0,\n0,2,0,0,2,1,0,0,2,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,\n2,3,0,0,0,0,0,0,3,3,0,0,0,0,3,0,3,0,3,2,0,0,0,0,2,2,0,2,0,0,2,0,\n2,2,2,0,1,2,0,2,0,1,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,1,2,1,2,2,2,2,0,2,0,3,2,0,0,2,0,2,2,0,3,2,2,1,0,1,0,0,2,0,1,0,\n0,2,0,1,2,0,0,0,2,1,1,0,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,0,0,3,0,0,2,3,3,0,0,0,0,2,0,2,0,2,3,0,0,0,2,2,0,0,0,0,2,1,0,\n2,0,2,1,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,\n3,2,0,0,3,1,0,0,3,3,0,0,0,2,2,2,2,0,2,2,0,1,0,2,3,0,0,1,1,2,2,0,\n2,2,2,0,2,0,0,2,0,0,2,0,0,2,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,1,0,3,0,0,2,2,2,0,0,0,0,2,0,2,0,3,2,0,0,0,1,0,0,0,1,0,0,2,0,\n2,0,2,0,0,0,0,0,0,0,1,0,0,2,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,2,1,2,2,2,1,1,2,2,2,2,0,2,0,2,1,0,0,2,2,1,0,2,2,2,2,2,2,2,\n2,2,2,2,2,2,0,2,0,2,2,2,2,1,0,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,3,2,1,2,2,2,0,0,1,2,0,0,0,1,0,2,0,0,2,0,2,0,0,1,0,2,2,0,0,2,\n1,2,2,0,2,2,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,\n3,3,2,3,0,2,1,2,3,2,0,0,2,2,0,0,0,2,1,0,1,2,2,0,1,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,2,0,2,0,0,3,2,3,0,0,0,0,2,2,1,0,2,2,0,0,0,1,2,0,1,0,0,0,2,0,\n2,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,2,0,0,0,0,0,0,3,2,0,0,0,0,2,0,2,0,3,2,0,0,0,2,2,0,0,2,0,0,2,0,\n2,2,1,1,0,0,0,2,0,0,2,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,\n3,3,0,0,3,0,1,3,2,2,0,0,0,0,2,0,2,0,2,2,0,0,0,2,2,0,0,0,0,0,0,0,\n2,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,0,1,2,0,0,2,2,2,0,0,0,1,1,0,3,1,2,0,0,0,0,0,0,0,0,0,0,0,2,0,\n1,0,2,0,0,0,0,2,0,0,0,0,2,1,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,0,0,0,0,0,2,2,0,0,0,2,2,0,2,0,2,2,0,0,0,0,2,2,0,2,1,0,2,0,\n2,2,2,0,2,2,0,2,0,1,2,1,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,\n3,2,0,0,2,0,0,2,2,2,0,0,0,3,0,0,0,0,0,0,0,0,0,0,1,0,2,0,0,0,0,0,\n0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,3,3,2,2,1,3,0,0,1,2,0,0,0,0,0,0,0,0,0,2,0,2,0,1,0,2,0,0,0,0,\n0,2,0,1,2,2,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,2,2,3,0,2,2,0,0,1,1,0,2,0,2,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,\n0,1,0,0,2,1,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,2,2,2,2,0,1,0,0,0,0,2,2,0,2,0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,0,\n0,2,0,0,2,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,2,2,1,2,2,0,0,0,0,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,0,0,0,1,0,0,2,2,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,\n2,2,2,0,0,1,0,1,2,1,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,1,2,2,0,0,\n0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,2,0,2,0,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,1,0,2,2,2,0,0,0,2,0,0,0,0,2,0,2,0,0,0,2,0,0,0,1,0,0,0,0,0,1,\n0,0,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,2,2,2,0,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,\n0,0,0,0,0,0,0,2,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,2,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n};\n\nconst SequenceModel WINDOWS_1252swedishModel = \n{\n  swedish_WINDOWS_1252CharToOrderMap,\n  swedishLangModel,\n  (float)0.989923,\n  PR_TRUE,\n  \"WINDOWS-1252\",\n  \"swedish\"\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/LangThaiModel.cpp",
    "content": "/**\n * @file    LangThaiModel.cpp\n * @brief   LangThaiModel\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsSBCharSetProber.h\"\n\n\n/****************************************************************\n255: Control characters that usually does not exist in any text\n254: Carriage/Return\n253: symbol (punctuation) that does not belong to word\n252: 0 - 9\n\n*****************************************************************/\n\n//The following result for thai was collected from a limited sample (1M). \n\n//Character Mapping Table:\nstatic const unsigned char TIS620CharToOrderMap[] =\n{\n255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,  //00\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,  //10\n253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,  //20\n252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,  //30\n253,182,106,107,100,183,184,185,101, 94,186,187,108,109,110,111,  //40\n188,189,190, 89, 95,112,113,191,192,193,194,253,253,253,253,253,  //50\n253, 64, 72, 73,114, 74,115,116,102, 81,201,117, 90,103, 78, 82,  //60\n 96,202, 91, 79, 84,104,105, 97, 98, 92,203,253,253,253,253,253,  //70\n209,210,211,212,213, 88,214,215,216,217,218,219,220,118,221,222,\n223,224, 99, 85, 83,225,226,227,228,229,230,231,232,233,234,235,\n236,  5, 30,237, 24,238, 75,  8, 26, 52, 34, 51,119, 47, 58, 57,\n 49, 53, 55, 43, 20, 19, 44, 14, 48,  3, 17, 25, 39, 62, 31, 54,\n 45,  9, 16,  2, 61, 15,239, 12, 42, 46, 18, 21, 76,  4, 66, 63,\n 22, 10,  1, 36, 23, 13, 40, 27, 32, 35, 86,240,241,242,243,244,\n 11, 28, 41, 29, 33,245, 50, 37,  6,  7, 67, 77, 38, 93,246,247,\n 68, 56, 59, 65, 69, 60, 70, 80, 71, 87,248,249,250,251,252,253,\n};\n\n\n\n\n//Model Table: \n//total sequences: 100%\n//first 512 sequences: 92.6386%\n//first 1024 sequences:7.3177%\n//rest  sequences:     1.0230%\n//negative sequences:  0.0436% \nstatic const PRUint8 ThaiLangModel[] = \n{\n0,1,3,3,3,3,0,0,3,3,0,3,3,0,3,3,3,3,3,3,3,3,0,0,3,3,3,0,3,3,3,3,\n0,3,3,0,0,0,1,3,0,3,3,2,3,3,0,1,2,3,3,3,3,0,2,0,2,0,0,3,2,1,2,2,\n3,0,3,3,2,3,0,0,3,3,0,3,3,0,3,3,3,3,3,3,3,3,3,0,3,2,3,0,2,2,2,3,\n0,2,3,0,0,0,0,1,0,1,2,3,1,1,3,2,2,0,1,1,0,0,1,0,0,0,0,0,0,0,1,1,\n3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,3,3,2,3,2,3,3,2,2,2,\n3,1,2,3,0,3,3,2,2,1,2,3,3,1,2,0,1,3,0,1,0,0,1,0,0,0,0,0,0,0,1,1,\n3,3,2,2,3,3,3,3,1,2,3,3,3,3,3,2,2,2,2,3,3,2,2,3,3,2,2,3,2,3,2,2,\n3,3,1,2,3,1,2,2,3,3,1,0,2,1,0,0,3,1,2,1,0,0,1,0,0,0,0,0,0,1,0,1,\n3,3,3,3,3,3,2,2,3,3,3,3,2,3,2,2,3,3,2,2,3,2,2,2,2,1,1,3,1,2,1,1,\n3,2,1,0,2,1,0,1,0,1,1,0,1,1,0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,\n3,3,3,2,3,2,3,3,2,2,3,2,3,3,2,3,1,1,2,3,2,2,2,3,2,2,2,2,2,1,2,1,\n2,2,1,1,3,3,2,1,0,1,2,2,0,1,3,0,0,0,1,1,0,0,0,0,0,2,3,0,0,2,1,1,\n3,3,2,3,3,2,0,0,3,3,0,3,3,0,2,2,3,1,2,2,1,1,1,0,2,2,2,0,2,2,1,1,\n0,2,1,0,2,0,0,2,0,1,0,0,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,0,\n3,3,2,3,3,2,0,0,3,3,0,2,3,0,2,1,2,2,2,2,1,2,0,0,2,2,2,0,2,2,1,1,\n0,2,1,0,2,0,0,2,0,1,1,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,\n3,3,2,3,2,3,2,0,2,2,1,3,2,1,3,2,1,2,3,2,2,3,0,2,3,2,2,1,2,2,2,2,\n1,2,2,0,0,0,0,2,0,1,2,0,1,1,1,0,1,0,3,1,1,0,0,0,0,0,0,0,0,0,1,0,\n3,3,2,3,3,2,3,2,2,2,3,2,2,3,2,2,1,2,3,2,2,3,1,3,2,2,2,3,2,2,2,3,\n3,2,1,3,0,1,1,1,0,2,1,1,1,1,1,0,1,0,1,1,0,0,0,0,0,0,0,0,0,2,0,0,\n1,0,0,3,0,3,3,3,3,3,0,0,3,0,2,2,3,3,3,3,3,0,0,0,1,1,3,0,0,0,0,2,\n0,0,1,0,0,0,0,0,0,0,2,3,0,0,0,3,0,2,0,0,0,0,0,3,0,0,0,0,0,0,0,0,\n2,0,3,3,3,3,0,0,2,3,0,0,3,0,3,3,2,3,3,3,3,3,0,0,3,3,3,0,0,0,3,3,\n0,0,3,0,0,0,0,2,0,0,2,1,1,3,0,0,1,0,0,2,3,0,1,0,0,0,0,0,0,0,1,0,\n3,3,3,3,2,3,3,3,3,3,3,3,1,2,1,3,3,2,2,1,2,2,2,3,1,1,2,0,2,1,2,1,\n2,2,1,0,0,0,1,1,0,1,0,1,1,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,\n3,0,2,1,2,3,3,3,0,2,0,2,2,0,2,1,3,2,2,1,2,1,0,0,2,2,1,0,2,1,2,2,\n0,1,1,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,2,1,3,3,1,1,3,0,2,3,1,1,3,2,1,1,2,0,2,2,3,2,1,1,1,1,1,2,\n3,0,0,1,3,1,2,1,2,0,3,0,0,0,1,0,3,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,\n3,3,1,1,3,2,3,3,3,1,3,2,1,3,2,1,3,2,2,2,2,1,3,3,1,2,1,3,1,2,3,0,\n2,1,1,3,2,2,2,1,2,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,\n3,3,2,3,2,3,3,2,3,2,3,2,3,3,2,1,0,3,2,2,2,1,2,2,2,1,2,2,1,2,1,1,\n2,2,2,3,0,1,3,1,1,1,1,0,1,1,0,2,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,2,3,2,2,1,1,3,2,3,2,3,2,0,3,2,2,1,2,0,2,2,2,1,2,2,2,2,1,\n3,2,1,2,2,1,0,2,0,1,0,0,1,1,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,0,0,1,\n3,3,3,3,3,2,3,1,2,3,3,2,2,3,0,1,1,2,0,3,3,2,2,3,0,1,1,3,0,0,0,0,\n3,1,0,3,3,0,2,0,2,1,0,0,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,2,3,2,3,3,0,1,3,1,1,2,1,2,1,1,3,1,1,0,2,3,1,1,1,1,1,1,1,1,\n3,1,1,2,2,2,2,1,1,1,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,\n3,2,2,1,1,2,1,3,3,2,3,2,2,3,2,2,3,1,2,2,1,2,0,3,2,1,2,2,2,2,2,1,\n3,2,1,2,2,2,1,1,1,1,0,0,1,1,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,1,3,3,0,2,1,0,3,2,0,0,3,1,0,1,1,0,1,0,0,0,0,0,1,\n1,0,0,1,0,3,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,2,2,2,3,0,0,1,3,0,3,2,0,3,2,2,3,3,3,3,3,1,0,2,2,2,0,2,2,1,2,\n0,2,3,0,0,0,0,1,0,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,\n3,0,2,3,1,3,3,2,3,3,0,3,3,0,3,2,2,3,2,3,3,3,0,0,2,2,3,0,1,1,1,3,\n0,0,3,0,0,0,2,2,0,1,3,0,1,2,2,2,3,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,\n3,2,3,3,2,0,3,3,2,2,3,1,3,2,1,3,2,0,1,2,2,0,2,3,2,1,0,3,0,0,0,0,\n3,0,0,2,3,1,3,0,0,3,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,1,3,2,2,2,1,2,0,1,3,1,1,3,1,3,0,0,2,1,1,1,1,2,1,1,1,0,2,1,0,1,\n1,2,0,0,0,3,1,1,0,0,0,0,1,0,1,0,0,1,0,1,0,0,0,0,0,3,1,0,0,0,1,0,\n3,3,3,3,2,2,2,2,2,1,3,1,1,1,2,0,1,1,2,1,2,1,3,2,0,0,3,1,1,1,1,1,\n3,1,0,2,3,0,0,0,3,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,2,3,0,3,3,0,2,0,0,0,0,0,0,0,3,0,0,1,0,0,0,0,0,0,0,0,0,0,0,\n0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,2,3,1,3,0,0,1,2,0,0,2,0,3,3,2,3,3,3,2,3,0,0,2,2,2,0,0,0,2,2,\n0,0,1,0,0,0,0,3,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,\n0,0,0,3,0,2,0,0,0,0,0,0,0,0,0,0,1,2,3,1,3,3,0,0,1,0,3,0,0,0,0,0,\n0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,1,2,3,1,2,3,1,0,3,0,2,2,1,0,2,1,1,2,0,1,0,0,1,1,1,1,0,1,0,0,\n1,0,0,0,0,1,1,0,3,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,2,1,0,1,1,1,3,1,2,2,2,2,2,2,1,1,1,1,0,3,1,0,1,3,1,1,1,1,\n1,1,0,2,0,1,3,1,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,2,0,1,\n3,0,2,2,1,3,3,2,3,3,0,1,1,0,2,2,1,2,1,3,3,1,0,0,3,2,0,0,0,0,2,1,\n0,1,0,0,0,0,1,2,0,1,1,3,1,1,2,2,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,\n0,0,3,0,0,1,0,0,0,3,0,0,3,0,3,1,0,1,1,1,3,2,0,0,0,3,0,0,0,0,2,0,\n0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,\n3,3,1,3,2,1,3,3,1,2,2,0,1,2,1,0,1,2,0,0,0,0,0,3,0,0,0,3,0,0,0,0,\n3,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,1,2,0,3,3,3,2,2,0,1,1,0,1,3,0,0,0,2,2,0,0,0,0,3,1,0,1,0,0,0,\n0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,2,3,1,2,0,0,2,1,0,3,1,0,1,2,0,1,1,1,1,3,0,0,3,1,1,0,2,2,1,1,\n0,2,0,0,0,0,0,1,0,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,0,3,1,2,0,0,2,2,0,1,2,0,1,0,1,3,1,2,1,0,0,0,2,0,3,0,0,0,1,0,\n0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,1,1,2,2,0,0,0,2,0,2,1,0,1,1,0,1,1,1,2,1,0,0,1,1,1,0,2,1,1,1,\n0,1,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,\n0,0,0,2,0,1,3,1,1,1,1,0,0,0,0,3,2,0,1,0,0,0,1,2,0,0,0,1,0,0,0,0,\n0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,3,3,3,3,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,0,2,3,2,2,0,0,0,1,0,0,0,0,2,3,2,1,2,2,3,0,0,0,2,3,1,0,0,0,1,1,\n0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,0,0,0,\n3,3,2,2,0,1,0,0,0,0,2,0,2,0,1,0,0,0,1,1,0,0,0,2,1,0,1,0,1,1,0,0,\n0,1,0,2,0,0,1,0,3,0,1,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,1,0,0,1,0,0,0,0,0,1,1,2,0,0,0,0,1,0,0,1,3,1,0,0,0,0,1,1,0,0,\n0,1,0,0,0,0,3,0,0,0,0,0,0,3,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,\n3,3,1,1,1,1,2,3,0,0,2,1,1,1,1,1,0,2,1,1,0,0,0,2,1,0,1,2,1,1,0,1,\n2,1,0,3,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,3,1,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,\n0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,0,0,0,0,0,0,1,2,1,0,1,1,0,2,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,2,0,0,0,1,3,0,1,0,0,0,2,0,0,0,0,0,0,0,1,2,0,0,0,0,0,\n3,3,0,0,1,1,2,0,0,1,2,1,0,1,1,1,0,1,1,0,0,2,1,1,0,1,0,0,1,1,1,0,\n0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,1,0,0,0,0,1,0,0,0,0,3,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,\n2,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,3,0,0,1,1,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n1,1,0,1,2,0,1,2,0,0,1,1,0,2,0,1,0,0,1,0,0,0,0,1,0,0,0,2,0,0,0,0,\n1,0,0,1,0,1,1,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,1,0,0,0,0,0,0,0,1,1,0,1,1,0,2,1,3,0,0,0,0,1,1,0,0,0,0,0,0,0,3,\n1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,1,0,1,0,0,2,0,0,2,0,0,1,1,2,0,0,1,1,0,0,0,1,0,0,0,1,1,0,0,0,\n1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,\n1,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,1,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,3,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,0,0,0,0,\n1,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,1,1,0,0,2,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n};\n\nconst SequenceModel TIS620ThaiModel = \n{\n  TIS620CharToOrderMap,\n  ThaiLangModel,\n  (float)0.926386,\n  false,\n  \"windows-874\",\n  \"Thai\"\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/LangTurkishModel.cpp",
    "content": "/**\n * @file    LangTurkishModel.cpp\n * @brief   LangTurkishModel\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsSBCharSetProber.h\"\n\nstatic const unsigned char turkish_ISO_8859_9CharToOrderMap[] = \n{\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,\n255, 23, 37, 47, 39, 29, 52, 36, 45, 53, 60, 16, 49, 20, 46, 42,\n 48, 69, 44, 35, 31, 51, 38, 62, 65, 43, 56,255,255,255,255,255,\n255,  1, 21, 28, 12,  2, 18, 27, 25,  3, 24, 10,  5, 13,  4, 15,\n 26, 64,  7,  8,  9, 14, 32, 57, 58, 11, 22,255,255,255,255,255,\n180,179,178,177,176,175,174,173,172,171,170,169,168,167,166,165,\n164,163,162,161,160,159,101,158,157,156,155,154,153,152,151,106,\n150,149,148,147,146,145,144,100,143,142,141,140,139,138,137,136,\n 94, 80, 93,135,105,134,133, 63,132,131,130,129,128,127,126,125,\n124,104, 73, 99, 79, 85,123, 54,122, 98, 92,121,120, 91,103,119,\n 68,118,117, 97,116,115, 50, 90,114,113,112,111, 55, 41, 40, 86,\n 89, 70, 59, 78, 71, 82, 88, 33, 77, 66, 84, 83,110, 75, 61, 96,\n 30, 67,109, 74, 87,102, 34, 95, 81,108, 76, 72, 17,  6, 19,107,\n};\n\nstatic const PRUint8 turkishLangModel[] = \n{\n3,2,3,3,3,1,3,3,3,3,3,3,3,3,2,1,1,3,3,1,3,3,0,3,3,3,3,3,0,3,1,3,\n3,2,1,0,0,1,1,0,0,0,1,0,0,1,1,1,1,0,0,0,0,0,0,0,2,2,0,0,1,0,0,1,\n3,2,2,3,3,0,3,3,3,3,3,3,3,2,3,1,0,3,3,1,3,3,0,3,3,3,3,3,0,3,0,3,\n3,1,1,0,1,0,1,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,2,2,0,0,0,1,0,1,\n3,3,2,3,3,0,3,3,3,3,3,3,3,2,3,1,1,3,3,0,3,3,1,2,3,3,3,3,0,3,0,3,\n3,1,1,0,0,0,1,0,0,0,0,1,1,0,1,2,1,0,0,0,1,0,0,0,0,2,0,0,0,0,0,1,\n3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,1,3,3,2,0,3,2,1,2,2,1,3,3,0,0,0,2,\n2,2,0,1,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,1,0,0,1,\n3,3,3,2,3,3,1,2,3,3,3,3,3,3,3,1,3,2,1,0,3,2,0,1,2,3,3,2,1,0,0,2,\n2,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,\n1,0,1,3,3,1,3,3,3,3,3,3,3,1,2,0,0,2,3,0,2,3,0,0,2,2,2,3,0,3,0,1,\n2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,0,3,2,0,2,3,2,3,3,1,0,0,2,\n3,2,0,0,1,0,0,0,0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,1,1,1,0,2,0,0,1,\n3,3,3,2,3,3,2,3,3,3,3,2,3,3,3,0,3,3,0,0,2,1,0,0,2,3,2,2,0,0,0,2,\n2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,0,1,0,2,0,0,1,\n3,3,3,2,3,3,3,3,3,3,3,2,3,3,3,0,3,2,0,1,3,2,1,1,3,2,3,2,1,0,0,2,\n2,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,\n3,3,3,2,3,3,3,3,3,3,3,2,3,3,3,0,3,2,2,0,2,3,0,0,2,2,2,2,0,0,0,2,\n3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,1,0,0,0,\n3,3,3,3,3,3,3,2,2,2,2,3,2,3,3,0,3,3,1,1,2,2,0,0,2,2,3,2,0,0,1,3,\n0,3,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,1,\n3,3,3,2,3,3,3,2,1,2,2,3,2,3,3,0,3,2,0,0,1,1,0,1,1,2,1,2,0,0,0,1,\n0,3,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,\n3,3,3,2,3,3,2,3,2,2,2,3,3,3,3,1,3,1,1,0,3,2,1,1,3,3,2,3,1,0,0,1,\n1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,0,1,\n3,2,2,3,3,0,3,3,3,3,3,3,3,2,2,1,0,3,3,1,3,3,0,1,3,3,2,3,0,3,0,3,\n2,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,\n2,2,2,3,3,0,3,3,3,3,3,3,3,3,3,0,0,3,2,0,3,3,0,3,2,3,3,3,0,3,1,3,\n2,0,0,0,0,0,0,0,0,0,0,1,0,1,2,0,1,0,0,0,0,0,0,0,2,2,0,0,1,0,0,1,\n3,3,3,1,2,3,3,1,0,0,1,0,0,3,3,2,3,0,0,2,0,0,2,0,2,0,0,0,2,0,2,0,\n0,3,1,0,1,0,0,0,2,2,1,0,1,1,2,1,2,2,2,0,2,1,1,0,0,0,2,0,0,0,0,0,\n1,2,1,3,3,0,3,3,3,3,3,2,3,0,0,0,0,2,3,0,2,3,1,0,2,3,1,3,0,3,0,2,\n3,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,1,3,3,2,2,3,2,2,0,1,2,3,0,1,2,1,0,1,0,0,0,1,0,2,2,0,0,0,1,\n1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,\n3,3,3,1,3,3,1,1,3,3,1,1,3,3,1,0,2,1,2,0,2,1,0,0,1,1,2,1,0,0,0,2,\n2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,1,0,2,1,3,0,0,2,0,0,3,3,0,3,0,0,1,0,1,2,0,0,1,1,2,2,0,1,0,\n0,1,2,1,1,0,1,0,1,1,1,1,1,0,1,1,1,2,2,1,2,0,1,0,0,0,0,0,0,1,0,0,\n3,3,3,2,3,2,3,3,0,2,2,2,3,3,3,0,3,0,0,0,2,2,0,1,2,1,1,1,0,0,0,1,\n0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,\n3,3,3,3,3,3,2,1,2,2,3,3,3,3,2,0,2,0,0,0,2,2,0,0,2,1,3,3,0,0,1,1,\n1,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,\n1,1,2,3,3,0,3,3,3,3,3,3,2,2,0,2,0,2,3,2,3,2,2,2,2,2,2,2,1,3,2,3,\n2,0,2,1,2,2,2,2,1,1,2,2,1,2,2,1,2,0,0,2,1,1,0,2,1,0,0,1,0,0,0,1,\n2,3,3,1,1,1,0,1,1,1,2,3,2,1,1,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,\n0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,2,2,2,3,2,3,2,2,1,3,3,3,0,2,1,2,0,2,1,0,0,1,1,1,1,1,0,0,1,\n2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,2,0,1,0,0,0,\n3,3,3,2,3,3,3,3,3,2,3,1,2,3,3,1,2,0,0,0,0,0,0,0,3,2,1,1,0,0,0,0,\n2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,\n3,3,3,2,2,3,3,2,1,1,1,1,1,3,3,0,3,1,0,0,1,1,0,0,3,1,2,1,0,0,0,0,\n0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,\n3,3,3,2,2,3,2,2,2,3,2,1,1,3,3,0,3,0,0,0,0,1,0,0,3,1,1,2,0,0,0,1,\n1,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,\n1,1,1,3,3,0,3,3,3,3,3,2,2,2,1,2,0,2,1,2,2,1,1,0,1,2,2,2,2,2,2,2,\n0,0,2,1,2,1,2,1,0,1,1,3,1,2,1,1,2,0,0,2,0,1,0,1,0,1,0,0,0,1,0,1,\n3,3,3,1,3,3,3,0,1,1,0,2,2,3,1,0,3,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,\n1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,2,0,0,2,2,1,0,0,1,0,0,3,3,1,3,0,0,1,1,0,2,0,3,0,0,0,2,0,1,1,\n0,1,2,0,1,2,2,0,2,2,2,2,1,0,2,1,1,0,2,0,2,1,2,0,0,0,0,0,0,0,0,0,\n3,3,3,1,3,2,3,2,0,2,2,2,1,3,2,0,2,1,2,0,1,2,0,0,1,0,2,2,0,0,0,2,\n1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,\n3,3,3,0,3,3,1,1,2,3,1,0,3,2,3,0,3,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,\n1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,3,3,0,3,3,2,3,3,2,2,0,0,0,0,1,2,0,1,3,0,0,0,3,1,1,0,3,0,2,\n2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,1,2,2,1,0,3,1,1,1,1,3,3,2,3,0,0,1,0,1,2,0,2,2,0,2,2,0,2,1,\n0,2,2,1,1,1,1,0,2,1,1,0,1,1,1,1,2,1,2,1,2,0,1,0,1,0,0,0,0,0,0,0,\n3,3,3,0,1,1,3,0,0,1,1,0,0,2,2,0,3,0,0,1,1,0,1,0,0,0,0,0,2,0,0,0,\n0,3,1,0,1,0,1,0,2,0,0,1,0,1,0,1,1,1,2,1,1,0,2,0,0,0,0,0,0,0,0,0,\n3,3,3,0,2,0,2,0,1,1,1,0,0,3,3,0,2,0,0,1,0,0,2,1,1,0,1,0,1,0,1,0,\n0,2,0,1,2,0,2,0,2,1,1,0,1,0,2,1,1,0,2,1,1,0,1,0,0,0,1,1,0,0,0,0,\n3,2,3,0,1,0,0,0,0,0,0,0,0,1,2,0,1,0,0,1,0,0,1,0,0,0,0,0,2,0,0,0,\n0,0,1,1,0,0,1,0,1,0,0,1,0,0,0,2,1,0,1,0,2,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,0,0,2,3,0,0,1,0,1,0,2,3,2,3,0,0,1,3,0,2,1,0,0,0,0,2,0,1,0,\n0,2,1,0,0,1,1,0,2,1,0,0,1,0,0,1,1,0,1,1,2,0,1,0,0,0,0,1,0,0,0,0,\n3,2,2,0,0,1,1,0,0,0,0,0,0,3,1,1,1,0,0,0,0,0,1,0,0,0,0,0,2,0,1,0,\n0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,\n0,0,0,3,3,0,2,3,2,2,1,2,2,1,1,2,0,1,3,2,2,2,0,0,2,2,0,0,0,1,2,1,\n3,0,2,1,1,0,1,1,1,0,1,2,2,2,1,1,2,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,\n0,1,1,2,3,0,3,3,3,2,2,2,2,1,0,1,0,1,0,1,2,2,0,0,2,2,1,3,1,1,2,1,\n0,0,1,1,2,0,1,1,0,0,1,2,0,2,1,1,2,0,0,1,0,0,0,1,0,1,0,1,0,0,0,0,\n3,3,2,0,0,3,1,0,0,0,0,0,0,3,2,1,2,0,0,1,0,0,2,0,0,0,0,0,2,0,1,0,\n0,2,1,1,0,0,1,0,1,2,0,0,1,1,0,0,2,1,1,1,1,0,2,0,0,0,0,0,0,0,0,0,\n3,3,2,0,0,1,0,0,0,0,1,0,0,3,3,2,2,0,0,1,0,0,2,0,1,0,0,0,2,0,1,0,\n0,0,1,1,0,0,2,0,2,1,0,0,1,1,2,1,2,0,2,1,2,1,1,1,0,0,1,1,0,0,0,0,\n3,3,2,0,0,2,2,0,0,0,1,1,0,2,2,1,3,1,0,1,0,1,2,0,0,0,0,0,1,0,1,0,\n0,1,1,0,0,0,0,0,1,0,0,1,0,0,0,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,2,0,0,0,1,0,0,1,0,0,2,3,1,2,0,0,1,0,0,2,0,0,0,1,0,2,0,2,0,\n0,1,1,2,2,1,2,0,2,1,1,0,0,1,1,0,1,1,1,1,2,1,1,0,0,0,0,0,0,0,0,0,\n3,3,3,0,2,1,2,1,0,0,1,1,0,3,3,1,2,0,0,1,0,0,2,0,2,0,1,1,2,0,0,0,\n0,0,1,1,1,1,2,0,1,1,0,1,1,1,1,0,0,0,1,1,1,0,1,0,0,0,1,0,0,0,0,0,\n3,3,3,0,2,2,3,2,0,0,1,0,0,2,3,1,0,0,0,0,0,0,2,0,2,0,0,0,2,0,0,0,\n0,1,1,0,0,0,1,0,0,1,0,1,1,0,1,0,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,\n3,2,3,0,0,0,0,0,0,0,1,0,0,2,2,2,2,0,0,1,0,0,2,0,0,0,0,0,2,0,1,0,\n0,0,2,1,1,0,1,0,2,1,1,0,0,1,1,2,1,0,2,0,2,0,1,0,0,0,2,0,0,0,0,0,\n0,0,0,2,2,0,2,1,1,1,1,2,2,0,0,1,0,1,0,0,1,3,0,0,0,0,1,0,0,2,1,0,\n0,0,1,0,1,0,0,0,0,0,2,1,0,1,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,\n2,0,0,2,3,0,2,3,1,2,2,0,2,0,0,2,0,2,1,1,1,2,1,0,0,1,2,1,1,2,1,0,\n1,0,2,0,1,0,1,1,0,0,2,2,1,2,1,1,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,\n3,3,3,0,2,1,2,0,0,0,1,0,0,3,2,0,1,0,0,1,0,0,2,0,0,0,1,2,1,0,1,0,\n0,0,0,0,1,0,1,0,0,1,0,0,0,0,1,0,1,0,1,1,1,0,1,0,0,0,0,0,0,0,0,0,\n0,0,0,2,2,0,2,2,1,1,0,1,1,1,1,1,0,0,1,2,1,1,1,0,1,0,0,0,1,1,1,1,\n0,0,2,1,0,1,1,1,0,1,1,2,1,2,1,1,2,0,1,1,2,1,0,2,0,0,0,0,0,0,0,0,\n3,2,2,0,0,2,0,0,0,0,0,0,0,2,2,0,2,0,0,1,0,0,2,0,0,0,0,0,2,0,0,0,\n0,2,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,\n0,0,0,3,2,0,2,2,0,1,1,0,1,0,0,1,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,0,\n2,0,1,0,1,0,1,1,0,0,1,2,0,1,0,1,1,0,0,1,0,1,0,2,0,0,0,0,0,0,0,0,\n2,2,2,0,1,1,0,0,0,1,0,0,0,1,2,0,1,0,0,1,0,0,1,0,0,0,0,1,2,0,1,0,\n0,0,1,0,0,0,1,0,0,1,0,0,0,0,0,0,1,0,1,0,2,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,2,1,0,1,1,1,0,0,0,0,1,2,0,0,1,0,0,0,1,0,0,1,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,\n1,1,2,0,1,0,0,0,1,0,1,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,2,0,0,0,0,0,1,\n0,0,1,2,2,0,2,1,2,1,1,2,2,0,0,0,0,1,0,0,1,1,0,0,2,0,0,0,0,1,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,\n2,2,2,0,0,0,1,0,0,0,0,0,0,2,2,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,\n0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n2,2,2,0,1,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,1,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n};\n\nconst SequenceModel ISO_8859_9turkishModel = \n{\n  turkish_ISO_8859_9CharToOrderMap,\n  turkishLangModel,\n  (float)0.970290,\n  PR_TRUE,\n  \"ISO-8859-9\",\n  \"turkish\"\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/Makefile.am",
    "content": "\n# public headers\ninclude_HEADERS = \\\n    $(top_srcdir)/include/libucd.h \\\n    $(NULL)\n\nnoinst_HEADERS = \\\n    CharDistribution.h \\\n    nsCodingStateMachine.h \\\n    nsGB2312Prober.h \\\n    nsSBCSGroupProber.h \\\n    JpCntx.h \\\n    nsEUCJPProber.h \\\n    nsHebrewProber.h \\\n    nsSBCharSetProber.h \\\n    nsEUCKRProber.h \\\n    nsLatin1Prober.h \\\n    nsSJISProber.h \\\n    nsBig5Prober.h \\\n    nsEUCTWProber.h \\\n    nsMBCSGroupProber.h \\\n    nsUTF8Prober.h \\\n    nsCharSetProber.h \\\n    nsEscCharsetProber.h \\\n    nsPkgInt.h \\\n    nsUniversalDetector.h \\\n    nsDebug.h \\\n    prmem.h \\\n    nscore.h \\\n    Big5Freq.tab \\\n    EUCKRFreq.tab \\\n    EUCTWFreq.tab \\\n    GB2312Freq.tab \\\n    JISFreq.tab \\\n    $(NULL)\n\n#EXTRA_DIST = libucd.pc.in\n#pkgconfigdir = $(libdir)/pkgconfig\n#pkgconfig_DATA = libucd.pc\n\nlib_LTLIBRARIES=libucd.la\n\nlibucd_la_SOURCES = \\\n    ucdapi.cpp \\\n    CharDistribution.cpp \\\n    JpCntx.cpp \\\n    LangBulgarianModel.cpp \\\n    LangCyrillicModel.cpp \\\n    LangGreekModel.cpp \\\n    LangHebrewModel.cpp \\\n    LangHungarianModel.cpp \\\n    LangThaiModel.cpp \\\n    LangCzechModel.cpp \\\n    LangFinnishModel.cpp \\\n    LangFrenchModel.cpp \\\n    LangGermanModel.cpp \\\n    LangPolishModel.cpp \\\n    LangSpanishModel.cpp \\\n    LangSwedishModel.cpp \\\n    LangTurkishModel.cpp \\\n    nsBig5Prober.cpp \\\n    nsCharSetProber.cpp \\\n    nsEUCJPProber.cpp \\\n    nsEUCKRProber.cpp \\\n    nsEUCTWProber.cpp \\\n    nsEscCharsetProber.cpp \\\n    nsEscSM.cpp \\\n    nsGB2312Prober.cpp \\\n    nsHebrewProber.cpp \\\n    nsLatin1Prober.cpp \\\n    nsMBCSGroupProber.cpp \\\n    nsMBCSSM.cpp \\\n    nsSBCSGroupProber.cpp \\\n    nsSBCharSetProber.cpp \\\n    nsSJISProber.cpp \\\n    nsUTF8Prober.cpp \\\n    nsUniversalDetector.cpp \\\n    $(NULL)\n\nlibucd_la_CPPFLAGS = -I$(top_srcdir)/src/ -I$(top_srcdir)/include/\n\n#DEFS+= -I$(top_srcdir)/src/ -I$(top_srcdir)/include/\n\n#DEFS+=-DMEMWATCH\n\nif DEBUG\nDEFS+= -DDEBUG=1\nendif\n\nAM_CPPFLAGS=-g -Wall\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsBig5Prober.cpp",
    "content": "/**\n * @file    nsBig5Prober.cpp\n * @brief   nsBig5Prober\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsBig5Prober.h\"\n#include \"nsDebug.h\"\n\nvoid  nsBig5Prober::Reset(void)\n{\n  mCodingSM->Reset(); \n  mState = eDetecting;\n  mDistributionAnalyser.Reset(mIsPreferredLanguage);\n}\n\nnsProbingState nsBig5Prober::HandleData(const char* aBuf, PRUint32 aLen)\n{\n  NS_ASSERTION(aLen, \"HandleData called with empty buffer\");\n  nsSMState codingState;\n\n  for (PRUint32 i = 0; i < aLen; i++)\n  {\n    codingState = mCodingSM->NextState(aBuf[i]);\n    if (codingState == eItsMe)\n    {\n      mState = eFoundIt;\n      break;\n    }\n    if (codingState == eStart)\n    {\n      PRUint32 charLen = mCodingSM->GetCurrentCharLen();\n\n      if (i == 0)\n      {\n        mLastChar[1] = aBuf[0];\n        mDistributionAnalyser.HandleOneChar(mLastChar, charLen);\n      }\n      else\n        mDistributionAnalyser.HandleOneChar(aBuf+i-1, charLen);\n    }\n  }\n\n  mLastChar[0] = aBuf[aLen-1];\n\n  if (mState == eDetecting)\n    if (mDistributionAnalyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD)\n      mState = eFoundIt;\n\n  return mState;\n}\n\nfloat nsBig5Prober::GetConfidence(void)\n{\n  float distribCf = mDistributionAnalyser.GetConfidence();\n\n  return (float)distribCf;\n}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsBig5Prober.h",
    "content": "/**\n * @file    nsBig5Prober.h\n * @brief   nsBig5Prober\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef nsBig5Prober_h__\n#define nsBig5Prober_h__\n\n#include \"nsCharSetProber.h\"\n#include \"nsCodingStateMachine.h\"\n#include \"CharDistribution.h\"\n\nclass nsBig5Prober: public nsCharSetProber {\npublic:\n  nsBig5Prober(bool aIsPreferredLanguage)\n    :mIsPreferredLanguage(aIsPreferredLanguage) \n  {mCodingSM = new nsCodingStateMachine(&Big5SMModel); \n    Reset();}\n  virtual ~nsBig5Prober(void){delete mCodingSM;}\n  nsProbingState HandleData(const char* aBuf, PRUint32 aLen);\n  const char* GetCharSetName() {return \"Big5\";}\n  nsProbingState GetState(void) {return mState;}\n  void      Reset(void);\n  float     GetConfidence(void);\n\nprotected:\n  void      GetDistribution(PRUint32 aCharLen, const char* aStr);\n  \n  nsCodingStateMachine* mCodingSM;\n  nsProbingState mState;\n\n  //Big5ContextAnalysis mContextAnalyser;\n  Big5DistributionAnalysis mDistributionAnalyser;\n  char mLastChar[2];\n  bool mIsPreferredLanguage;\n\n};\n\n\n#endif /* nsBig5Prober_h__ */\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsCharSetProber.cpp",
    "content": "/**\n * @file    nsCharSetProber.cpp\n * @brief   nsCharSetProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsCharSetProber.h\"\n#include \"prmem.h\"\n\n//This filter applies to all scripts which do not use English characters\nbool nsCharSetProber::FilterWithoutEnglishLetters(const char* aBuf, PRUint32 aLen, char** newBuf, PRUint32& newLen)\n{\n  char *newptr;\n  char *prevPtr, *curPtr;\n  \n  bool meetMSB = false;   \n  newptr = *newBuf = (char*)PR_Malloc(aLen);\n  if (!newptr)\n    return false;\n\n  for (curPtr = prevPtr = (char*)aBuf; curPtr < aBuf+aLen; curPtr++)\n  {\n    if (*curPtr & 0x80)\n    {\n      meetMSB = true;\n    }\n    else if (*curPtr < 'A' || (*curPtr > 'Z' && *curPtr < 'a') || *curPtr > 'z') \n    {\n      //current char is a symbol, most likely a punctuation. we treat it as segment delimiter\n      if (meetMSB && curPtr > prevPtr) \n      //this segment contains more than single symbol, and it has upper ASCII, we need to keep it\n      {\n        while (prevPtr < curPtr) *newptr++ = *prevPtr++;  \n        prevPtr++;\n        *newptr++ = ' ';\n        meetMSB = false;\n      }\n      else //ignore current segment. (either because it is just a symbol or just an English word)\n        prevPtr = curPtr+1;\n    }\n  }\n  if (meetMSB && curPtr > prevPtr) \n    while (prevPtr < curPtr) *newptr++ = *prevPtr++;  \n\n  newLen = newptr - *newBuf;\n\n  return true;\n}\n\n//This filter applies to all scripts which contain both English characters and upper ASCII characters.\nbool nsCharSetProber::FilterWithEnglishLetters(const char* aBuf, PRUint32 aLen, char** newBuf, PRUint32& newLen)\n{\n  //do filtering to reduce load to probers\n  char *newptr;\n  char *prevPtr, *curPtr;\n  bool isInTag = false;\n\n  newptr = *newBuf = (char*)PR_Malloc(aLen);\n  if (!newptr)\n    return false;\n\n  for (curPtr = prevPtr = (char*)aBuf; curPtr < aBuf+aLen; curPtr++)\n  {\n    if (*curPtr == '>')\n      isInTag = false;\n    else if (*curPtr == '<')\n      isInTag = true;\n\n    if (!(*curPtr & 0x80) &&\n        (*curPtr < 'A' || (*curPtr > 'Z' && *curPtr < 'a') || *curPtr > 'z') )\n    {\n      if (curPtr > prevPtr && !isInTag) // Current segment contains more than just a symbol \n                                        // and it is not inside a tag, keep it.\n      {\n        while (prevPtr < curPtr) *newptr++ = *prevPtr++;  \n        prevPtr++;\n        *newptr++ = ' ';\n      }\n      else\n        prevPtr = curPtr+1;\n    }\n  }\n\n  // If the current segment contains more than just a symbol \n  // and it is not inside a tag then keep it.\n  if (!isInTag)\n    while (prevPtr < curPtr)\n      *newptr++ = *prevPtr++;  \n\n  newLen = newptr - *newBuf;\n\n  return true;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsCharSetProber.h",
    "content": "/**\n * @file    nsCharSetProber.h\n * @brief   nsCharSetProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef nsCharSetProber_h__\n#define nsCharSetProber_h__\n\n#include \"nscore.h\"\n\n//#define DEBUG_chardet // Uncomment this for debug dump.\n\ntypedef enum {\n  eDetecting = 0,   //We are still detecting, no sure answer yet, but caller can ask for confidence.\n  eFoundIt = 1,     //That's a positive answer\n  eNotMe = 2        //Negative answer\n} nsProbingState;\n\n#define SHORTCUT_THRESHOLD      (float)0.95\n\nclass nsCharSetProber {\npublic:\n  virtual ~nsCharSetProber() {}\n  virtual const char* GetCharSetName() = 0;\n  virtual const char* GetLangName() {return \"\";};\n  virtual PRBool KeepEnglishLetters() {return PR_TRUE;}\n  virtual nsProbingState HandleData(const char* aBuf, PRUint32 aLen) = 0;\n  virtual nsProbingState GetState(void) = 0;\n  virtual void      Reset(void)  = 0;\n  virtual float     GetConfidence(void) = 0;\n\n#ifdef DEBUG_chardet\n  virtual void  DumpStatus() {};\n#endif\n\n  // Helper functions used in the Latin1 and Group probers.\n  // both functions Allocate a new buffer for newBuf. This buffer should be \n  // freed by the caller using PR_FREEIF.\n  // Both functions return false in case of memory allocation failure.\n  static bool FilterWithoutEnglishLetters(const char* aBuf, PRUint32 aLen, char** newBuf, PRUint32& newLen);\n  static bool FilterWithEnglishLetters(const char* aBuf, PRUint32 aLen, char** newBuf, PRUint32& newLen);\n\n};\n\n#endif /* nsCharSetProber_h__ */\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsCodingStateMachine.h",
    "content": "/**\n * @file    nsCodingstateMachine.h\n * @brief   nsCodingstateMachine\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef nsCodingStateMachine_h__\n#define nsCodingStateMachine_h__\n\n#include \"nsPkgInt.h\"\n#include \"nsDebug.h\"\n\ntypedef enum {\n   eStart = 0,\n   eError = 1,\n   eItsMe = 2 \n} nsSMState;\n\n#define GETCLASS(c) GETFROMPCK(((unsigned char)(c)), mModel->classTable)\n\n//state machine model\ntypedef struct \n{\n  nsPkgInt classTable;\n  PRUint32 classFactor;\n  nsPkgInt stateTable;\n  const PRUint32* charLenTable;\n#ifdef DEBUG\n  const size_t szCharLenTable;\n#endif\n  const char* name;\n} SMModel;\n\n#ifdef DEBUG\n#  define PUT_CHARTAB(a) (a), NS_ARRAY_LENGTH(a)\n#else\n#  define PUT_CHARTAB(a) (a)\n#endif\n\nclass nsCodingStateMachine {\npublic:\n  nsCodingStateMachine(const SMModel* sm) : mModel(sm) { mCurrentState = eStart; }\n  nsSMState NextState(char c){\n    //for each byte we get its class , if it is first byte, we also get byte length\n    PRUint32 byteCls = GETCLASS(c);\n    if (mCurrentState == eStart)\n    {\n      mCurrentBytePos = 0;\n#ifdef DEBUG\n      NS_ASSERTION (byteCls < mModel->szCharLenTable, \"char tab overflow!!\");\n#endif\n      mCurrentCharLen = mModel->charLenTable[byteCls];\n    }\n    //from byte's class and stateTable, we get its next state\n    mCurrentState=(nsSMState)GETFROMPCK(mCurrentState*(mModel->classFactor)+byteCls,\n                                       mModel->stateTable);\n    mCurrentBytePos++;\n    return mCurrentState;\n  }\n  PRUint32  GetCurrentCharLen(void) {return mCurrentCharLen;}\n  void      Reset(void) {mCurrentState = eStart;}\n  const char * GetCodingStateMachine() {return mModel->name;}\n\nprotected:\n  nsSMState mCurrentState;\n  PRUint32 mCurrentCharLen;\n  PRUint32 mCurrentBytePos;\n\n  const SMModel *mModel;\n};\n\nextern const SMModel UTF8SMModel;\nextern const SMModel Big5SMModel;\nextern const SMModel EUCJPSMModel;\nextern const SMModel EUCKRSMModel;\nextern const SMModel EUCTWSMModel;\nextern const SMModel GB18030SMModel;\nextern const SMModel SJISSMModel;\n\n\nextern const SMModel HZSMModel;\nextern const SMModel ISO2022CNSMModel;\nextern const SMModel ISO2022JPSMModel;\nextern const SMModel ISO2022KRSMModel;\n\n#endif /* nsCodingStateMachine_h__ */\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsDebug.h",
    "content": "/**\n * @file    nsDebug.h\n * @brief   fake nsDebug.h\n * @author  Yunhui Fu (yhfudev@gmail.com)\n * @version 1.0\n * @date    2015-01-13\n * @license GPL 2.0/LGPL 2.1\n */\n#ifndef __NS_FAKE_DEBUG_H\n#define __NS_FAKE_DEBUG_H\n\n#include <assert.h>\n#define NS_ASSERTION(a,msg) assert(a)\n\n#endif /* __NS_FAKE_DEBUG_H */\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsEUCJPProber.cpp",
    "content": "/**\n * @file    nsEUCJPProber.cpp\n * @brief   nsEUCJPProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n// for japanese encoding, obeserve characteristic:\n// 1, kana character (or hankaku?) often have hight frequency of appereance\n// 2, kana character often exist in group\n// 3, certain combination of kana is never used in japanese language\n\n#include \"nsEUCJPProber.h\"\n#include \"nsDebug.h\"\n\nvoid  nsEUCJPProber::Reset(void)\n{\n  mCodingSM->Reset(); \n  mState = eDetecting;\n  mContextAnalyser.Reset(mIsPreferredLanguage);\n  mDistributionAnalyser.Reset(mIsPreferredLanguage);\n}\n\nnsProbingState nsEUCJPProber::HandleData(const char* aBuf, PRUint32 aLen)\n{\n  NS_ASSERTION(aLen, \"HandleData called with empty buffer\");\n  nsSMState codingState;\n\n  for (PRUint32 i = 0; i < aLen; i++)\n  {\n    codingState = mCodingSM->NextState(aBuf[i]);\n    if (codingState == eItsMe)\n    {\n      mState = eFoundIt;\n      break;\n    }\n    if (codingState == eStart)\n    {\n      PRUint32 charLen = mCodingSM->GetCurrentCharLen();\n\n      if (i == 0)\n      {\n        mLastChar[1] = aBuf[0];\n        mContextAnalyser.HandleOneChar(mLastChar, charLen);\n        mDistributionAnalyser.HandleOneChar(mLastChar, charLen);\n      }\n      else\n      {\n        mContextAnalyser.HandleOneChar(aBuf+i-1, charLen);\n        mDistributionAnalyser.HandleOneChar(aBuf+i-1, charLen);\n      }\n    }\n  }\n\n  mLastChar[0] = aBuf[aLen-1];\n\n  if (mState == eDetecting)\n    if (mContextAnalyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD)\n      mState = eFoundIt;\n\n  return mState;\n}\n\nfloat nsEUCJPProber::GetConfidence(void)\n{\n  float contxtCf = mContextAnalyser.GetConfidence();\n  float distribCf = mDistributionAnalyser.GetConfidence();\n\n  return (contxtCf > distribCf ? contxtCf : distribCf);\n}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsEUCJPProber.h",
    "content": "/**\n * @file    nsEUCJPProber.h\n * @brief   nsEUCJPProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n// for S-JIS encoding, obeserve characteristic:\n// 1, kana character (or hankaku?) often have hight frequency of appereance\n// 2, kana character often exist in group\n// 3, certain combination of kana is never used in japanese language\n\n#ifndef nsEUCJPProber_h__\n#define nsEUCJPProber_h__\n\n#include \"nsCharSetProber.h\"\n#include \"nsCodingStateMachine.h\"\n#include \"JpCntx.h\"\n#include \"CharDistribution.h\"\n\nclass nsEUCJPProber: public nsCharSetProber {\npublic:\n  nsEUCJPProber(bool aIsPreferredLanguage)\n    :mIsPreferredLanguage(aIsPreferredLanguage)\n  {mCodingSM = new nsCodingStateMachine(&EUCJPSMModel);\n    Reset();}\n  virtual ~nsEUCJPProber(void){delete mCodingSM;}\n  nsProbingState HandleData(const char* aBuf, PRUint32 aLen);\n  const char* GetCharSetName() {return \"EUC-JP\";}\n  nsProbingState GetState(void) {return mState;}\n  void      Reset(void);\n  float     GetConfidence(void);\n\nprotected:\n  nsCodingStateMachine* mCodingSM;\n  nsProbingState mState;\n\n  EUCJPContextAnalysis mContextAnalyser;\n  EUCJPDistributionAnalysis mDistributionAnalyser;\n\n  char mLastChar[2];\n  bool mIsPreferredLanguage;\n};\n\n\n#endif /* nsEUCJPProber_h__ */\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsEUCKRProber.cpp",
    "content": "/**\n * @file    nsEUCKRProber.cpp\n * @brief   nsEUCKRProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsEUCKRProber.h\"\n#include \"nsDebug.h\"\n\nvoid  nsEUCKRProber::Reset(void)\n{\n  mCodingSM->Reset(); \n  mState = eDetecting;\n  mDistributionAnalyser.Reset(mIsPreferredLanguage);\n  //mContextAnalyser.Reset();\n}\n\nnsProbingState nsEUCKRProber::HandleData(const char* aBuf, PRUint32 aLen)\n{\n  NS_ASSERTION(aLen, \"HandleData called with empty buffer\");\n  nsSMState codingState;\n\n  for (PRUint32 i = 0; i < aLen; i++)\n  {\n    codingState = mCodingSM->NextState(aBuf[i]);\n    if (codingState == eItsMe)\n    {\n      mState = eFoundIt;\n      break;\n    }\n    if (codingState == eStart)\n    {\n      PRUint32 charLen = mCodingSM->GetCurrentCharLen();\n\n      if (i == 0)\n      {\n        mLastChar[1] = aBuf[0];\n        mDistributionAnalyser.HandleOneChar(mLastChar, charLen);\n      }\n      else\n        mDistributionAnalyser.HandleOneChar(aBuf+i-1, charLen);\n    }\n  }\n\n  mLastChar[0] = aBuf[aLen-1];\n\n  if (mState == eDetecting)\n    if (mDistributionAnalyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD)\n      mState = eFoundIt;\n//    else\n//      mDistributionAnalyser.HandleData(aBuf, aLen);\n\n  return mState;\n}\n\nfloat nsEUCKRProber::GetConfidence(void)\n{\n  float distribCf = mDistributionAnalyser.GetConfidence();\n\n  return (float)distribCf;\n}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsEUCKRProber.h",
    "content": "/**\n * @file    nsEUCKRProber.h\n * @brief   nsEUCKRProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef nsEUCKRProber_h__\n#define nsEUCKRProber_h__\n\n#include \"nsCharSetProber.h\"\n#include \"nsCodingStateMachine.h\"\n#include \"CharDistribution.h\"\n\nclass nsEUCKRProber: public nsCharSetProber {\npublic:\n  nsEUCKRProber(bool aIsPreferredLanguage)\n    :mIsPreferredLanguage(aIsPreferredLanguage)\n  {mCodingSM = new nsCodingStateMachine(&EUCKRSMModel);\n    Reset();\n  }\n  virtual ~nsEUCKRProber(void){delete mCodingSM;}\n  nsProbingState HandleData(const char* aBuf, PRUint32 aLen);\n  const char* GetCharSetName() {return \"EUC-KR\";}\n  nsProbingState GetState(void) {return mState;}\n  void      Reset(void);\n  float     GetConfidence(void);\n\nprotected:\n  void      GetDistribution(PRUint32 aCharLen, const char* aStr);\n  \n  nsCodingStateMachine* mCodingSM;\n  nsProbingState mState;\n\n  //EUCKRContextAnalysis mContextAnalyser;\n  EUCKRDistributionAnalysis mDistributionAnalyser;\n  char mLastChar[2];\n  bool mIsPreferredLanguage;\n\n};\n\n\n#endif /* nsEUCKRProber_h__ */\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsEUCTWProber.cpp",
    "content": "/**\n * @file    nsEUCTWProber.cpp\n * @brief   nsEUCTWProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsEUCTWProber.h\"\n#include \"nsDebug.h\"\n\nvoid  nsEUCTWProber::Reset(void)\n{\n  mCodingSM->Reset(); \n  mState = eDetecting;\n  mDistributionAnalyser.Reset(mIsPreferredLanguage);\n  //mContextAnalyser.Reset();\n}\n\nnsProbingState nsEUCTWProber::HandleData(const char* aBuf, PRUint32 aLen)\n{\n  NS_ASSERTION(aLen, \"HandleData called with empty buffer\");\n  nsSMState codingState;\n\n  for (PRUint32 i = 0; i < aLen; i++)\n  {\n    codingState = mCodingSM->NextState(aBuf[i]);\n    if (codingState == eItsMe)\n    {\n      mState = eFoundIt;\n      break;\n    }\n    if (codingState == eStart)\n    {\n      PRUint32 charLen = mCodingSM->GetCurrentCharLen();\n\n      if (i == 0)\n      {\n        mLastChar[1] = aBuf[0];\n        mDistributionAnalyser.HandleOneChar(mLastChar, charLen);\n      }\n      else\n        mDistributionAnalyser.HandleOneChar(aBuf+i-1, charLen);\n    }\n  }\n\n  mLastChar[0] = aBuf[aLen-1];\n\n  if (mState == eDetecting)\n    if (mDistributionAnalyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD)\n      mState = eFoundIt;\n//    else\n//      mDistributionAnalyser.HandleData(aBuf, aLen);\n\n  return mState;\n}\n\nfloat nsEUCTWProber::GetConfidence(void)\n{\n  float distribCf = mDistributionAnalyser.GetConfidence();\n\n  return (float)distribCf;\n}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsEUCTWProber.h",
    "content": "/**\n * @file    nsEUCTWProber.h\n * @brief   nsEUCTWProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef nsEUCTWProber_h__\n#define nsEUCTWProber_h__\n\n#include \"nsCharSetProber.h\"\n#include \"nsCodingStateMachine.h\"\n#include \"CharDistribution.h\"\n\nclass nsEUCTWProber: public nsCharSetProber {\npublic:\n  nsEUCTWProber(bool aIsPreferredLanguage)\n    :mIsPreferredLanguage(aIsPreferredLanguage)\n  {mCodingSM = new nsCodingStateMachine(&EUCTWSMModel);\n    Reset();}\n  virtual ~nsEUCTWProber(void){delete mCodingSM;}\n  nsProbingState HandleData(const char* aBuf, PRUint32 aLen);\n  const char* GetCharSetName() {return \"x-euc-tw\";}\n  nsProbingState GetState(void) {return mState;}\n  void      Reset(void);\n  float     GetConfidence(void);\n\nprotected:\n  void      GetDistribution(PRUint32 aCharLen, const char* aStr);\n  \n  nsCodingStateMachine* mCodingSM;\n  nsProbingState mState;\n\n  //EUCTWContextAnalysis mContextAnalyser;\n  EUCTWDistributionAnalysis mDistributionAnalyser;\n  char mLastChar[2];\n  bool mIsPreferredLanguage;\n\n};\n\n\n#endif /* nsEUCTWProber_h__ */\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsEscCharsetProber.cpp",
    "content": "/**\n * @file    nsEscCharsetProber.cpp\n * @brief   nsEscCharsetProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsEscCharsetProber.h\"\n#include \"nsUniversalDetector.h\"\n\nnsEscCharSetProber::nsEscCharSetProber(PRUint32 aLanguageFilter)\n{\n  for (PRUint32 i = 0; i < NUM_OF_ESC_CHARSETS; i++)\n    mCodingSM[i] = nsnull;\n  if (aLanguageFilter & NS_FILTER_CHINESE_SIMPLIFIED) \n  {\n    mCodingSM[0] = new nsCodingStateMachine(&HZSMModel);\n    mCodingSM[1] = new nsCodingStateMachine(&ISO2022CNSMModel);\n  }\n  if (aLanguageFilter & NS_FILTER_JAPANESE)\n    mCodingSM[2] = new nsCodingStateMachine(&ISO2022JPSMModel);\n  if (aLanguageFilter & NS_FILTER_KOREAN)\n    mCodingSM[3] = new nsCodingStateMachine(&ISO2022KRSMModel);\n  mActiveSM = NUM_OF_ESC_CHARSETS;\n  mState = eDetecting;\n  mDetectedCharset = nsnull;\n}\n\nnsEscCharSetProber::~nsEscCharSetProber(void)\n{\n  for (PRUint32 i = 0; i < NUM_OF_ESC_CHARSETS; i++)\n    delete mCodingSM[i];\n}\n\nvoid nsEscCharSetProber::Reset(void)\n{\n  mState = eDetecting;\n  for (PRUint32 i = 0; i < NUM_OF_ESC_CHARSETS; i++)\n    if (mCodingSM[i])\n      mCodingSM[i]->Reset();\n  mActiveSM = NUM_OF_ESC_CHARSETS;\n  mDetectedCharset = nsnull;\n}\n\nnsProbingState nsEscCharSetProber::HandleData(const char* aBuf, PRUint32 aLen)\n{\n  nsSMState codingState;\n  PRInt32 j;\n  PRUint32 i;\n\n  for ( i = 0; i < aLen && mState == eDetecting; i++)\n  {\n    for (j = mActiveSM-1; j>= 0; j--)\n    {\n      if (mCodingSM[j])\n      {\n        codingState = mCodingSM[j]->NextState(aBuf[i]);\n        if (codingState == eItsMe)\n        {\n          mState = eFoundIt;\n          mDetectedCharset = mCodingSM[j]->GetCodingStateMachine();\n          return mState;\n        }\n      }\n    }\n  }\n\n  return mState;\n}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsEscCharsetProber.h",
    "content": "/**\n * @file    nsEscCharsetProber.h\n * @brief   nsEscCharsetProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef nsEscCharSetProber_h__\n#define nsEscCharSetProber_h__\n\n#include \"nsCharSetProber.h\"\n#include \"nsCodingStateMachine.h\"\n\n#define NUM_OF_ESC_CHARSETS   4\n\nclass nsEscCharSetProber: public nsCharSetProber {\npublic:\n  nsEscCharSetProber(PRUint32 aLanguageFilter);\n  virtual ~nsEscCharSetProber(void);\n  nsProbingState HandleData(const char* aBuf, PRUint32 aLen);\n  const char* GetCharSetName() {return mDetectedCharset;}\n  nsProbingState GetState(void) {return mState;}\n  void      Reset(void);\n  float     GetConfidence(void){return (float)0.99;}\n\nprotected:\n  void      GetDistribution(PRUint32 aCharLen, const char* aStr);\n  \n  nsCodingStateMachine* mCodingSM[NUM_OF_ESC_CHARSETS] ;\n  PRUint32    mActiveSM;\n  nsProbingState mState;\n  const char *  mDetectedCharset;\n};\n\n#endif /* nsEscCharSetProber_h__ */\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsEscSM.cpp",
    "content": "/**\n * @file    nsEscSM.h\n * @brief   nsEscSM\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsCodingStateMachine.h\"\n\nstatic const PRUint32 HZ_cls[ 256 / 8 ] = {\nPCK4BITS(1,0,0,0,0,0,0,0),  // 00 - 07 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 08 - 0f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 10 - 17 \nPCK4BITS(0,0,0,1,0,0,0,0),  // 18 - 1f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 20 - 27 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 28 - 2f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 30 - 37 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 38 - 3f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 40 - 47 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 48 - 4f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 50 - 57 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 58 - 5f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 60 - 67 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 68 - 6f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 70 - 77 \nPCK4BITS(0,0,0,4,0,5,2,0),  // 78 - 7f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 80 - 87 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 88 - 8f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 90 - 97 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 98 - 9f \nPCK4BITS(1,1,1,1,1,1,1,1),  // a0 - a7 \nPCK4BITS(1,1,1,1,1,1,1,1),  // a8 - af \nPCK4BITS(1,1,1,1,1,1,1,1),  // b0 - b7 \nPCK4BITS(1,1,1,1,1,1,1,1),  // b8 - bf \nPCK4BITS(1,1,1,1,1,1,1,1),  // c0 - c7 \nPCK4BITS(1,1,1,1,1,1,1,1),  // c8 - cf \nPCK4BITS(1,1,1,1,1,1,1,1),  // d0 - d7 \nPCK4BITS(1,1,1,1,1,1,1,1),  // d8 - df \nPCK4BITS(1,1,1,1,1,1,1,1),  // e0 - e7 \nPCK4BITS(1,1,1,1,1,1,1,1),  // e8 - ef \nPCK4BITS(1,1,1,1,1,1,1,1),  // f0 - f7 \nPCK4BITS(1,1,1,1,1,1,1,1)   // f8 - ff \n};\n\n\nstatic const PRUint32 HZ_st [ 6] = {\nPCK4BITS(eStart,eError,     3,eStart,eStart,eStart,eError,eError),//00-07 \nPCK4BITS(eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe),//08-0f \nPCK4BITS(eItsMe,eItsMe,eError,eError,eStart,eStart,     4,eError),//10-17 \nPCK4BITS(     5,eError,     6,eError,     5,     5,     4,eError),//18-1f \nPCK4BITS(     4,eError,     4,     4,     4,eError,     4,eError),//20-27 \nPCK4BITS(     4,eItsMe,eStart,eStart,eStart,eStart,eStart,eStart) //28-2f \n};\n\nstatic const PRUint32 HZCharLenTable[] = {0, 0, 0, 0, 0, 0};\n\nconst SMModel HZSMModel = {\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, HZ_cls },\n   6,\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, HZ_st },\n  PUT_CHARTAB (HZCharLenTable),\n  \"HZ-GB-2312\",\n};\n\n\nstatic const PRUint32 ISO2022CN_cls [ 256 / 8 ] = {\nPCK4BITS(2,0,0,0,0,0,0,0),  // 00 - 07 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 08 - 0f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 10 - 17 \nPCK4BITS(0,0,0,1,0,0,0,0),  // 18 - 1f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 20 - 27 \nPCK4BITS(0,3,0,0,0,0,0,0),  // 28 - 2f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 30 - 37 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 38 - 3f \nPCK4BITS(0,0,0,4,0,0,0,0),  // 40 - 47 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 48 - 4f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 50 - 57 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 58 - 5f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 60 - 67 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 68 - 6f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 70 - 77 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 78 - 7f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 80 - 87 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 88 - 8f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 90 - 97 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 98 - 9f \nPCK4BITS(2,2,2,2,2,2,2,2),  // a0 - a7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // a8 - af \nPCK4BITS(2,2,2,2,2,2,2,2),  // b0 - b7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // b8 - bf \nPCK4BITS(2,2,2,2,2,2,2,2),  // c0 - c7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // c8 - cf \nPCK4BITS(2,2,2,2,2,2,2,2),  // d0 - d7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // d8 - df \nPCK4BITS(2,2,2,2,2,2,2,2),  // e0 - e7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // e8 - ef \nPCK4BITS(2,2,2,2,2,2,2,2),  // f0 - f7 \nPCK4BITS(2,2,2,2,2,2,2,2)   // f8 - ff \n};\n\n\nstatic const PRUint32 ISO2022CN_st [ 8] = {\nPCK4BITS(eStart,     3,eError,eStart,eStart,eStart,eStart,eStart),//00-07 \nPCK4BITS(eStart,eError,eError,eError,eError,eError,eError,eError),//08-0f \nPCK4BITS(eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe),//10-17 \nPCK4BITS(eItsMe,eItsMe,eItsMe,eError,eError,eError,     4,eError),//18-1f \nPCK4BITS(eError,eError,eError,eItsMe,eError,eError,eError,eError),//20-27 \nPCK4BITS(     5,     6,eError,eError,eError,eError,eError,eError),//28-2f \nPCK4BITS(eError,eError,eError,eItsMe,eError,eError,eError,eError),//30-37 \nPCK4BITS(eError,eError,eError,eError,eError,eItsMe,eError,eStart) //38-3f \n};\n\nstatic const PRUint32 ISO2022CNCharLenTable[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};\n\nconst SMModel ISO2022CNSMModel = {\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022CN_cls },\n  9,\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022CN_st },\n  PUT_CHARTAB (ISO2022CNCharLenTable),\n  \"ISO-2022-CN\",\n};\n\nstatic const PRUint32 ISO2022JP_cls [ 256 / 8 ] = {\nPCK4BITS(2,0,0,0,0,0,0,0),  // 00 - 07 \nPCK4BITS(0,0,0,0,0,0,2,2),  // 08 - 0f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 10 - 17 \nPCK4BITS(0,0,0,1,0,0,0,0),  // 18 - 1f \nPCK4BITS(0,0,0,0,7,0,0,0),  // 20 - 27 \nPCK4BITS(3,0,0,0,0,0,0,0),  // 28 - 2f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 30 - 37 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 38 - 3f \nPCK4BITS(6,0,4,0,8,0,0,0),  // 40 - 47 \nPCK4BITS(0,9,5,0,0,0,0,0),  // 48 - 4f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 50 - 57 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 58 - 5f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 60 - 67 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 68 - 6f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 70 - 77 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 78 - 7f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 80 - 87 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 88 - 8f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 90 - 97 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 98 - 9f \nPCK4BITS(2,2,2,2,2,2,2,2),  // a0 - a7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // a8 - af \nPCK4BITS(2,2,2,2,2,2,2,2),  // b0 - b7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // b8 - bf \nPCK4BITS(2,2,2,2,2,2,2,2),  // c0 - c7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // c8 - cf \nPCK4BITS(2,2,2,2,2,2,2,2),  // d0 - d7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // d8 - df \nPCK4BITS(2,2,2,2,2,2,2,2),  // e0 - e7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // e8 - ef \nPCK4BITS(2,2,2,2,2,2,2,2),  // f0 - f7 \nPCK4BITS(2,2,2,2,2,2,2,2)   // f8 - ff \n};\n\n\nstatic const PRUint32 ISO2022JP_st [ 9] = {\nPCK4BITS(eStart,     3,eError,eStart,eStart,eStart,eStart,eStart),//00-07 \nPCK4BITS(eStart,eStart,eError,eError,eError,eError,eError,eError),//08-0f \nPCK4BITS(eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe),//10-17 \nPCK4BITS(eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eError,eError),//18-1f \nPCK4BITS(eError,     5,eError,eError,eError,     4,eError,eError),//20-27 \nPCK4BITS(eError,eError,eError,     6,eItsMe,eError,eItsMe,eError),//28-2f \nPCK4BITS(eError,eError,eError,eError,eError,eError,eItsMe,eItsMe),//30-37 \nPCK4BITS(eError,eError,eError,eItsMe,eError,eError,eError,eError),//38-3f \nPCK4BITS(eError,eError,eError,eError,eItsMe,eError,eStart,eStart) //40-47 \n};\n\nstatic const PRUint32 ISO2022JPCharLenTable[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};\n\nconst SMModel ISO2022JPSMModel = {\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022JP_cls },\n  10,\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022JP_st },\n  PUT_CHARTAB (ISO2022JPCharLenTable),\n  \"ISO-2022-JP\",\n};\n\nstatic const PRUint32 ISO2022KR_cls [ 256 / 8 ] = {\nPCK4BITS(2,0,0,0,0,0,0,0),  // 00 - 07 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 08 - 0f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 10 - 17 \nPCK4BITS(0,0,0,1,0,0,0,0),  // 18 - 1f \nPCK4BITS(0,0,0,0,3,0,0,0),  // 20 - 27 \nPCK4BITS(0,4,0,0,0,0,0,0),  // 28 - 2f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 30 - 37 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 38 - 3f \nPCK4BITS(0,0,0,5,0,0,0,0),  // 40 - 47 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 48 - 4f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 50 - 57 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 58 - 5f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 60 - 67 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 68 - 6f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 70 - 77 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 78 - 7f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 80 - 87 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 88 - 8f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 90 - 97 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 98 - 9f \nPCK4BITS(2,2,2,2,2,2,2,2),  // a0 - a7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // a8 - af \nPCK4BITS(2,2,2,2,2,2,2,2),  // b0 - b7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // b8 - bf \nPCK4BITS(2,2,2,2,2,2,2,2),  // c0 - c7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // c8 - cf \nPCK4BITS(2,2,2,2,2,2,2,2),  // d0 - d7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // d8 - df \nPCK4BITS(2,2,2,2,2,2,2,2),  // e0 - e7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // e8 - ef \nPCK4BITS(2,2,2,2,2,2,2,2),  // f0 - f7 \nPCK4BITS(2,2,2,2,2,2,2,2)   // f8 - ff \n};\n\n\nstatic const PRUint32 ISO2022KR_st [ 5] = {\nPCK4BITS(eStart,     3,eError,eStart,eStart,eStart,eError,eError),//00-07 \nPCK4BITS(eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe),//08-0f \nPCK4BITS(eItsMe,eItsMe,eError,eError,eError,     4,eError,eError),//10-17 \nPCK4BITS(eError,eError,eError,eError,     5,eError,eError,eError),//18-1f \nPCK4BITS(eError,eError,eError,eItsMe,eStart,eStart,eStart,eStart) //20-27 \n};\n\nstatic const PRUint32 ISO2022KRCharLenTable[] = {0, 0, 0, 0, 0, 0};\n\nconst SMModel ISO2022KRSMModel = {\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022KR_cls },\n   6,\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022KR_st },\n  PUT_CHARTAB (ISO2022KRCharLenTable),\n  \"ISO-2022-KR\",\n};\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsGB2312Prober.cpp",
    "content": "/**\n * @file    nsGB2312Prober.cpp\n * @brief   nsGB2312Prober\n * @license GPL 2.0/LGPL 2.1\n */\n\n// for S-JIS encoding, obeserve characteristic:\n// 1, kana character (or hankaku?) often have hight frequency of appereance\n// 2, kana character often exist in group\n// 3, certain combination of kana is never used in japanese language\n\n#include \"nsGB2312Prober.h\"\n#include \"nsDebug.h\"\n\nvoid  nsGB18030Prober::Reset(void)\n{\n  mCodingSM->Reset(); \n  mState = eDetecting;\n  mDistributionAnalyser.Reset(mIsPreferredLanguage);\n  //mContextAnalyser.Reset();\n}\n\nnsProbingState nsGB18030Prober::HandleData(const char* aBuf, PRUint32 aLen)\n{\n  NS_ASSERTION(aLen, \"HandleData called with empty buffer\");\n  nsSMState codingState;\n\n  for (PRUint32 i = 0; i < aLen; i++)\n  {\n    codingState = mCodingSM->NextState(aBuf[i]);\n    if (codingState == eItsMe)\n    {\n      mState = eFoundIt;\n      break;\n    }\n    if (codingState == eStart)\n    {\n      PRUint32 charLen = mCodingSM->GetCurrentCharLen();\n\n      if (i == 0)\n      {\n        mLastChar[1] = aBuf[0];\n        mDistributionAnalyser.HandleOneChar(mLastChar, charLen);\n      }\n      else\n        mDistributionAnalyser.HandleOneChar(aBuf+i-1, charLen);\n    }\n  }\n\n  mLastChar[0] = aBuf[aLen-1];\n\n  if (mState == eDetecting)\n    if (mDistributionAnalyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD)\n      mState = eFoundIt;\n//    else\n//      mDistributionAnalyser.HandleData(aBuf, aLen);\n\n  return mState;\n}\n\nfloat nsGB18030Prober::GetConfidence(void)\n{\n  float distribCf = mDistributionAnalyser.GetConfidence();\n\n  return (float)distribCf;\n}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsGB2312Prober.h",
    "content": "/**\n * @file    nsGB2312Prober.h\n * @brief   nsGB2312Prober\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef nsGB2312Prober_h__\n#define nsGB2312Prober_h__\n\n#include \"nsCharSetProber.h\"\n#include \"nsCodingStateMachine.h\"\n#include \"CharDistribution.h\"\n\n// We use gb18030 to replace gb2312, because 18030 is a superset. \n\nclass nsGB18030Prober: public nsCharSetProber {\npublic:\n  nsGB18030Prober(bool aIsPreferredLanguage)\n    :mIsPreferredLanguage(aIsPreferredLanguage)\n  {mCodingSM = new nsCodingStateMachine(&GB18030SMModel);\n    Reset();}\n  virtual ~nsGB18030Prober(void){delete mCodingSM;}\n  nsProbingState HandleData(const char* aBuf, PRUint32 aLen);\n  const char* GetCharSetName() {return \"gb18030\";}\n  nsProbingState GetState(void) {return mState;}\n  void      Reset(void);\n  float     GetConfidence(void);\n\nprotected:\n  void      GetDistribution(PRUint32 aCharLen, const char* aStr);\n  \n  nsCodingStateMachine* mCodingSM;\n  nsProbingState mState;\n\n  //GB2312ContextAnalysis mContextAnalyser;\n  GB2312DistributionAnalysis mDistributionAnalyser;\n  char mLastChar[2];\n  bool mIsPreferredLanguage;\n\n};\n\n\n#endif /* nsGB2312Prober_h__ */\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsHebrewProber.cpp",
    "content": "/**\n * @file    nsHebrewProber.cpp\n * @brief   nsHebrewProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsHebrewProber.h\"\n#include <stdio.h>\n\n// windows-1255 / ISO-8859-8 code points of interest\n#define FINAL_KAF ('\\xea')\n#define NORMAL_KAF ('\\xeb')\n#define FINAL_MEM ('\\xed')\n#define NORMAL_MEM ('\\xee')\n#define FINAL_NUN ('\\xef')\n#define NORMAL_NUN ('\\xf0')\n#define FINAL_PE ('\\xf3')\n#define NORMAL_PE ('\\xf4')\n#define FINAL_TSADI ('\\xf5')\n#define NORMAL_TSADI ('\\xf6')\n\n// Minimum Visual vs Logical final letter score difference.\n// If the difference is below this, don't rely solely on the final letter score distance.\n#define MIN_FINAL_CHAR_DISTANCE (5)\n\n// Minimum Visual vs Logical model score difference.\n// If the difference is below this, don't rely at all on the model score distance.\n#define MIN_MODEL_DISTANCE (0.01)\n\n#define VISUAL_HEBREW_NAME (\"ISO-8859-8\")\n#define LOGICAL_HEBREW_NAME (\"windows-1255\")\n\nbool nsHebrewProber::isFinal(char c)\n{\n  return ((c == FINAL_KAF) || (c == FINAL_MEM) || (c == FINAL_NUN) || (c == FINAL_PE) || (c == FINAL_TSADI));\n}\n\nbool nsHebrewProber::isNonFinal(char c)\n{\n  return ((c == NORMAL_KAF) || (c == NORMAL_MEM) || (c == NORMAL_NUN) || (c == NORMAL_PE));\n  // The normal Tsadi is not a good Non-Final letter due to words like \n  // 'lechotet' (to chat) containing an apostrophe after the tsadi. This \n  // apostrophe is converted to a space in FilterWithoutEnglishLetters causing \n  // the Non-Final tsadi to appear at an end of a word even though this is not \n  // the case in the original text.\n  // The letters Pe and Kaf rarely display a related behavior of not being a \n  // good Non-Final letter. Words like 'Pop', 'Winamp' and 'Mubarak' for \n  // example legally end with a Non-Final Pe or Kaf. However, the benefit of \n  // these letters as Non-Final letters outweighs the damage since these words \n  // are quite rare.\n}\n\n/** HandleData\n * Final letter analysis for logical-visual decision.\n * Look for evidence that the received buffer is either logical Hebrew or \n * visual Hebrew.\n * The following cases are checked:\n * 1) A word longer than 1 letter, ending with a final letter. This is an \n *    indication that the text is laid out \"naturally\" since the final letter \n *    really appears at the end. +1 for logical score.\n * 2) A word longer than 1 letter, ending with a Non-Final letter. In normal\n *    Hebrew, words ending with Kaf, Mem, Nun, Pe or Tsadi, should not end with\n *    the Non-Final form of that letter. Exceptions to this rule are mentioned\n *    above in isNonFinal(). This is an indication that the text is laid out\n *    backwards. +1 for visual score\n * 3) A word longer than 1 letter, starting with a final letter. Final letters \n *    should not appear at the beginning of a word. This is an indication that \n *    the text is laid out backwards. +1 for visual score.\n *\n * The visual score and logical score are accumulated throughout the text and \n * are finally checked against each other in GetCharSetName().\n * No checking for final letters in the middle of words is done since that case\n * is not an indication for either Logical or Visual text.\n *\n * The input buffer should not contain any white spaces that are not (' ')\n * or any low-ascii punctuation marks. \n */\nnsProbingState nsHebrewProber::HandleData(const char* aBuf, PRUint32 aLen)\n{\n  // Both model probers say it's not them. No reason to continue.\n  if (GetState() == eNotMe)\n    return eNotMe;\n\n  const char *curPtr, *endPtr = aBuf+aLen;\n  char cur;\n\n  for (curPtr = (char*)aBuf; curPtr < endPtr; ++curPtr)\n  {\n    cur = *curPtr;\n    if (cur == ' ') // We stand on a space - a word just ended\n    {\n      if (mBeforePrev != ' ') // *(curPtr-2) was not a space so prev is not a 1 letter word\n      {\n        if (isFinal(mPrev)) // case (1) [-2:not space][-1:final letter][cur:space]\n          ++mFinalCharLogicalScore;\n        else if (isNonFinal(mPrev)) // case (2) [-2:not space][-1:Non-Final letter][cur:space]\n          ++mFinalCharVisualScore;\n      }\n    }\n    else  // Not standing on a space\n    {\n      if ((mBeforePrev == ' ') && (isFinal(mPrev)) && (cur != ' ')) // case (3) [-2:space][-1:final letter][cur:not space]\n        ++mFinalCharVisualScore;\n    }\n    mBeforePrev = mPrev;\n    mPrev = cur;\n  }\n\n  // Forever detecting, till the end or until both model probers return eNotMe (handled above).\n  return eDetecting;\n}\n\n// Make the decision: is it Logical or Visual?\nconst char* nsHebrewProber::GetCharSetName()\n{\n  // If the final letter score distance is dominant enough, rely on it.\n  PRInt32 finalsub = mFinalCharLogicalScore - mFinalCharVisualScore;\n  if (finalsub >= MIN_FINAL_CHAR_DISTANCE) \n    return LOGICAL_HEBREW_NAME;\n  if (finalsub <= -(MIN_FINAL_CHAR_DISTANCE))\n    return VISUAL_HEBREW_NAME;\n\n  // It's not dominant enough, try to rely on the model scores instead.\n  float modelsub = mLogicalProb->GetConfidence() - mVisualProb->GetConfidence();\n  if (modelsub > MIN_MODEL_DISTANCE)\n    return LOGICAL_HEBREW_NAME;\n  if (modelsub < -(MIN_MODEL_DISTANCE))\n    return VISUAL_HEBREW_NAME;\n\n  // Still no good, back to final letter distance, maybe it'll save the day.\n  if (finalsub < 0) \n    return VISUAL_HEBREW_NAME;\n\n  // (finalsub > 0 - Logical) or (don't know what to do) default to Logical.\n  return LOGICAL_HEBREW_NAME;\n}\n\n\nvoid nsHebrewProber::Reset(void)\n{\n  mFinalCharLogicalScore = 0;\n  mFinalCharVisualScore = 0;\n\n  // mPrev and mBeforePrev are initialized to space in order to simulate a word \n  // delimiter at the beginning of the data\n  mPrev = ' ';\n  mBeforePrev = ' ';\n}\n\nnsProbingState nsHebrewProber::GetState(void) \n{\n  // Remain active as long as any of the model probers are active.\n  if ((mLogicalProb->GetState() == eNotMe) && (mVisualProb->GetState() == eNotMe))\n    return eNotMe;\n  return eDetecting;\n}\n\n#ifdef DEBUG_chardet\nvoid  nsHebrewProber::DumpStatus()\n{\n  printf(\"  HEB: %d - %d [Logical-Visual score]\\r\\n\", mFinalCharLogicalScore, mFinalCharVisualScore);\n}\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsHebrewProber.h",
    "content": "/**\n * @file    nsHebrewProber.h\n * @brief   nsHebrewProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef nsHebrewProber_h__\n#define nsHebrewProber_h__\n\n#include \"nsSBCharSetProber.h\"\n\n// This prober doesn't actually recognize a language or a charset.\n// It is a helper prober for the use of the Hebrew model probers\nclass nsHebrewProber: public nsCharSetProber\n{\npublic:\n  nsHebrewProber(void) :mLogicalProb(0), mVisualProb(0) { Reset(); }\n\n  virtual ~nsHebrewProber(void) {}\n  virtual nsProbingState HandleData(const char* aBuf, PRUint32 aLen);\n  virtual const char* GetCharSetName();\n  virtual void Reset(void);\n\n  virtual nsProbingState GetState(void);\n\n  virtual float     GetConfidence(void) { return (float)0.0; }\n\n  void SetModelProbers(nsCharSetProber *logicalPrb, nsCharSetProber *visualPrb) \n  { mLogicalProb = logicalPrb; mVisualProb = visualPrb; }\n\n#ifdef DEBUG_chardet\n  virtual void  DumpStatus();\n#endif\n\nprotected:\n  static bool isFinal(char c);\n  static bool isNonFinal(char c);\n\n  PRInt32 mFinalCharLogicalScore, mFinalCharVisualScore;\n\n  // The two last characters seen in the previous buffer.\n  char mPrev, mBeforePrev;\n\n  // These probers are owned by the group prober.\n  nsCharSetProber *mLogicalProb, *mVisualProb;\n};\n\n/**\n * ** General ideas of the Hebrew charset recognition **\n *\n * Four main charsets exist in Hebrew:\n * \"ISO-8859-8\" - Visual Hebrew\n * \"windows-1255\" - Logical Hebrew \n * \"ISO-8859-8-I\" - Logical Hebrew\n * \"x-mac-hebrew\" - ?? Logical Hebrew ??\n *\n * Both \"ISO\" charsets use a completely identical set of code points, whereas\n * \"windows-1255\" and \"x-mac-hebrew\" are two different proper supersets of \n * these code points. windows-1255 defines additional characters in the range\n * 0x80-0x9F as some misc punctuation marks as well as some Hebrew-specific \n * diacritics and additional 'Yiddish' ligature letters in the range 0xc0-0xd6.\n * x-mac-hebrew defines similar additional code points but with a different \n * mapping.\n *\n * As far as an average Hebrew text with no diacritics is concerned, all four \n * charsets are identical with respect to code points. Meaning that for the \n * main Hebrew alphabet, all four map the same values to all 27 Hebrew letters \n * (including final letters).\n *\n * The dominant difference between these charsets is their directionality.\n * \"Visual\" directionality means that the text is ordered as if the renderer is\n * not aware of a BIDI rendering algorithm. The renderer sees the text and \n * draws it from left to right. The text itself when ordered naturally is read \n * backwards. A buffer of Visual Hebrew generally looks like so:\n * \"[last word of first line spelled backwards] [whole line ordered backwards\n * and spelled backwards] [first word of first line spelled backwards] \n * [end of line] [last word of second line] ... etc' \"\n * adding punctuation marks, numbers and English text to visual text is\n * naturally also \"visual\" and from left to right.\n * \n * \"Logical\" directionality means the text is ordered \"naturally\" according to\n * the order it is read. It is the responsibility of the renderer to display \n * the text from right to left. A BIDI algorithm is used to place general \n * punctuation marks, numbers and English text in the text.\n *\n * Texts in x-mac-hebrew are almost impossible to find on the Internet. From \n * what little evidence I could find, it seems that its general directionality\n * is Logical.\n *\n * To sum up all of the above, the Hebrew probing mechanism knows about two\n * charsets:\n * Visual Hebrew - \"ISO-8859-8\" - backwards text - Words and sentences are\n *    backwards while line order is natural. For charset recognition purposes\n *    the line order is unimportant (In fact, for this implementation, even \n *    word order is unimportant).\n * Logical Hebrew - \"windows-1255\" - normal, naturally ordered text.\n *\n * \"ISO-8859-8-I\" is a subset of windows-1255 and doesn't need to be \n *    specifically identified.\n * \"x-mac-hebrew\" is also identified as windows-1255. A text in x-mac-hebrew\n *    that contain special punctuation marks or diacritics is displayed with\n *    some unconverted characters showing as question marks. This problem might\n *    be corrected using another model prober for x-mac-hebrew. Due to the fact\n *    that x-mac-hebrew texts are so rare, writing another model prober isn't \n *    worth the effort and performance hit.\n *\n * *** The Prober ***\n *\n * The prober is divided between two nsSBCharSetProbers and an nsHebrewProber,\n * all of which are managed, created, fed data, inquired and deleted by the\n * nsSBCSGroupProber. The two nsSBCharSetProbers identify that the text is in\n * fact some kind of Hebrew, Logical or Visual. The final decision about which\n * one is it is made by the nsHebrewProber by combining final-letter scores\n * with the scores of the two nsSBCharSetProbers to produce a final answer.\n *\n * The nsSBCSGroupProber is responsible for stripping the original text of HTML\n * tags, English characters, numbers, low-ASCII punctuation characters, spaces\n * and new lines. It reduces any sequence of such characters to a single space.\n * The buffer fed to each prober in the SBCS group prober is pure text in\n * high-ASCII.\n * The two nsSBCharSetProbers (model probers) share the same language model:\n * Win1255Model.\n * The first nsSBCharSetProber uses the model normally as any other\n * nsSBCharSetProber does, to recognize windows-1255, upon which this model was\n * built. The second nsSBCharSetProber is told to make the pair-of-letter\n * lookup in the language model backwards. This in practice exactly simulates\n * a visual Hebrew model using the windows-1255 logical Hebrew model.\n *\n * The nsHebrewProber is not using any language model. All it does is look for\n * final-letter evidence suggesting the text is either logical Hebrew or visual\n * Hebrew. Disjointed from the model probers, the results of the nsHebrewProber\n * alone are meaningless. nsHebrewProber always returns 0.00 as confidence\n * since it never identifies a charset by itself. Instead, the pointer to the\n * nsHebrewProber is passed to the model probers as a helper \"Name Prober\".\n * When the Group prober receives a positive identification from any prober,\n * it asks for the name of the charset identified. If the prober queried is a\n * Hebrew model prober, the model prober forwards the call to the\n * nsHebrewProber to make the final decision. In the nsHebrewProber, the\n * decision is made according to the final-letters scores maintained and Both\n * model probers scores. The answer is returned in the form of the name of the\n * charset identified, either \"windows-1255\" or \"ISO-8859-8\".\n *\n */\n#endif /* nsHebrewProber_h__ */\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsLatin1Prober.cpp",
    "content": "/**\n * @file    nsLatin1Prober.cpp\n * @brief   nsLatin1Prober\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsLatin1Prober.h\"\n#include \"prmem.h\"\n#include <stdio.h>\n\n#define UDF    0        // undefined\n#define OTH    1        //other\n#define ASC    2        // ascii capital letter\n#define ASS    3        // ascii small letter\n#define ACV    4        // accent capital vowel\n#define ACO    5        // accent capital other\n#define ASV    6        // accent small vowel\n#define ASO    7        // accent small other\n#define CLASS_NUM   8    // total classes\n\nstatic const unsigned char Latin1_CharToClass[] = \n{\n  OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   // 00 - 07\n  OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   // 08 - 0F\n  OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   // 10 - 17\n  OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   // 18 - 1F\n  OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   // 20 - 27\n  OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   // 28 - 2F\n  OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   // 30 - 37\n  OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   // 38 - 3F\n  OTH, ASC, ASC, ASC, ASC, ASC, ASC, ASC,   // 40 - 47\n  ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,   // 48 - 4F\n  ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,   // 50 - 57\n  ASC, ASC, ASC, OTH, OTH, OTH, OTH, OTH,   // 58 - 5F\n  OTH, ASS, ASS, ASS, ASS, ASS, ASS, ASS,   // 60 - 67\n  ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS,   // 68 - 6F\n  ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS,   // 70 - 77\n  ASS, ASS, ASS, OTH, OTH, OTH, OTH, OTH,   // 78 - 7F\n  OTH, UDF, OTH, ASO, OTH, OTH, OTH, OTH,   // 80 - 87\n  OTH, OTH, ACO, OTH, ACO, UDF, ACO, UDF,   // 88 - 8F\n  UDF, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   // 90 - 97\n  OTH, OTH, ASO, OTH, ASO, UDF, ASO, ACO,   // 98 - 9F\n  OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   // A0 - A7\n  OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   // A8 - AF\n  OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   // B0 - B7\n  OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH,   // B8 - BF\n  ACV, ACV, ACV, ACV, ACV, ACV, ACO, ACO,   // C0 - C7\n  ACV, ACV, ACV, ACV, ACV, ACV, ACV, ACV,   // C8 - CF\n  ACO, ACO, ACV, ACV, ACV, ACV, ACV, OTH,   // D0 - D7\n  ACV, ACV, ACV, ACV, ACV, ACO, ACO, ACO,   // D8 - DF\n  ASV, ASV, ASV, ASV, ASV, ASV, ASO, ASO,   // E0 - E7\n  ASV, ASV, ASV, ASV, ASV, ASV, ASV, ASV,   // E8 - EF\n  ASO, ASO, ASV, ASV, ASV, ASV, ASV, OTH,   // F0 - F7\n  ASV, ASV, ASV, ASV, ASV, ASO, ASO, ASO,   // F8 - FF\n};\n\n\n/* 0 : illegal \n   1 : very unlikely \n   2 : normal \n   3 : very likely\n*/\nstatic const unsigned char Latin1ClassModel[] = \n{\n/*      UDF OTH ASC ASS ACV ACO ASV ASO  */\n/*UDF*/  0,  0,  0,  0,  0,  0,  0,  0,\n/*OTH*/  0,  3,  3,  3,  3,  3,  3,  3,\n/*ASC*/  0,  3,  3,  3,  3,  3,  3,  3, \n/*ASS*/  0,  3,  3,  3,  1,  1,  3,  3,\n/*ACV*/  0,  3,  3,  3,  1,  2,  1,  2,\n/*ACO*/  0,  3,  3,  3,  3,  3,  3,  3, \n/*ASV*/  0,  3,  1,  3,  1,  1,  1,  3, \n/*ASO*/  0,  3,  1,  3,  1,  1,  3,  3,\n};\n\nvoid  nsLatin1Prober::Reset(void)\n{\n  mState = eDetecting;\n  mLastCharClass = OTH;\n  for (int i = 0; i < FREQ_CAT_NUM; i++)\n    mFreqCounter[i] = 0;\n}\n\n\nnsProbingState nsLatin1Prober::HandleData(const char* aBuf, PRUint32 aLen)\n{\n  char *newBuf1 = 0;\n  PRUint32 newLen1 = 0;\n\n  if (!FilterWithEnglishLetters(aBuf, aLen, &newBuf1, newLen1)) {\n    newBuf1 = (char*)aBuf;\n    newLen1 = aLen;\n  }\n  \n  unsigned char charClass;\n  unsigned char freq;\n  for (PRUint32 i = 0; i < newLen1; i++)\n  {\n    charClass = Latin1_CharToClass[(unsigned char)newBuf1[i]];\n    freq = Latin1ClassModel[mLastCharClass*CLASS_NUM + charClass];\n    if (freq == 0) {\n      mState = eNotMe;\n      break;\n    }\n    mFreqCounter[freq]++;\n    mLastCharClass = charClass;\n  }\n\n  if (newBuf1 != aBuf)\n    PR_FREEIF(newBuf1);\n\n  return mState;\n}\n\nfloat nsLatin1Prober::GetConfidence(void)\n{\n  if (mState == eNotMe)\n    return 0.01f;\n  \n  float confidence;\n  PRUint32 total = 0;\n  for (PRInt32 i = 0; i < FREQ_CAT_NUM; i++)\n    total += mFreqCounter[i];\n\n  if(!total)\n    confidence = 0.0f;\n  else\n  {\n    confidence = mFreqCounter[3]*1.0f / total;\n    confidence -= mFreqCounter[1]*20.0f/total;\n  }\n\n  if (confidence < 0.0f)\n    confidence = 0.0f;\n  \n  // lower the confidence of latin1 so that other more accurate detector \n  // can take priority.\n  confidence *= 0.50f;\n\n  return confidence;\n}\n\n#ifdef DEBUG_chardet\nvoid  nsLatin1Prober::DumpStatus()\n{\n  printf(\" Latin1Prober: %1.3f [%s]\\r\\n\", GetConfidence(), GetCharSetName());\n}\n#endif\n\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsLatin1Prober.h",
    "content": "/**\n * @file    nsLatin1Prober.h\n * @brief   nsLatin1Prober\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef nsLatin1Prober_h__\n#define nsLatin1Prober_h__\n\n#include \"nsCharSetProber.h\"\n\n#define FREQ_CAT_NUM    4\n\nclass nsLatin1Prober: public nsCharSetProber {\npublic:\n  nsLatin1Prober(void){Reset();}\n  virtual ~nsLatin1Prober(void){}\n  nsProbingState HandleData(const char* aBuf, PRUint32 aLen);\n  const char* GetCharSetName() {return \"windows-1252\";}\n  nsProbingState GetState(void) {return mState;}\n  void      Reset(void);\n  float     GetConfidence(void);\n\n#ifdef DEBUG_chardet\n  virtual void  DumpStatus();\n#endif\n\nprotected:\n  \n  nsProbingState mState;\n  char mLastCharClass;\n  PRUint32 mFreqCounter[FREQ_CAT_NUM];\n};\n\n\n#endif /* nsLatin1Prober_h__ */\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsMBCSGroupProber.cpp",
    "content": "/**\n * @file    nsMBCSGroupProber.cpp\n * @brief   nsMBCSGroupProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include <stdio.h>\n\n#include \"nsMBCSGroupProber.h\"\n#include \"nsUniversalDetector.h\"\n\n#if defined(DEBUG_chardet) || defined(DEBUG_jgmyers)\nconst char *ProberName[NUM_OF_PROBERS] = \n{\n  \"UTF8\",\n  \"SJIS\",\n  \"EUCJP\",\n  \"GB18030\",\n  \"EUCKR\",\n  \"Big5\",\n  \"EUCTW\",\n};\n\n#endif\n\nnsMBCSGroupProber::nsMBCSGroupProber(PRUint32 aLanguageFilter)\n{\n  for (PRUint32 i = 0; i < NUM_OF_PROBERS; i++)\n    mProbers[i] = nsnull;\n\n  mProbers[0] = new nsUTF8Prober();\n  if (aLanguageFilter & NS_FILTER_JAPANESE) \n  {\n    mProbers[1] = new nsSJISProber(aLanguageFilter == NS_FILTER_JAPANESE);\n    mProbers[2] = new nsEUCJPProber(aLanguageFilter == NS_FILTER_JAPANESE);\n  }\n  if (aLanguageFilter & NS_FILTER_CHINESE_SIMPLIFIED)\n    mProbers[3] = new nsGB18030Prober(aLanguageFilter == NS_FILTER_CHINESE_SIMPLIFIED);\n  if (aLanguageFilter & NS_FILTER_KOREAN)\n    mProbers[4] = new nsEUCKRProber(aLanguageFilter == NS_FILTER_KOREAN);\n  if (aLanguageFilter & NS_FILTER_CHINESE_TRADITIONAL) \n  {\n    mProbers[5] = new nsBig5Prober(aLanguageFilter == NS_FILTER_CHINESE_TRADITIONAL);\n    mProbers[6] = new nsEUCTWProber(aLanguageFilter == NS_FILTER_CHINESE_TRADITIONAL);\n  }\n  Reset();\n}\n\nnsMBCSGroupProber::~nsMBCSGroupProber()\n{\n  for (PRUint32 i = 0; i < NUM_OF_PROBERS; i++)\n  {\n    delete mProbers[i];\n  }\n}\n\nconst char* nsMBCSGroupProber::GetCharSetName()\n{\n  if (mBestGuess == -1)\n  {\n    GetConfidence();\n    if (mBestGuess == -1)\n      mBestGuess = 0;\n  }\n  return mProbers[mBestGuess]->GetCharSetName();\n}\n\nvoid  nsMBCSGroupProber::Reset(void)\n{\n  mActiveNum = 0;\n  for (PRUint32 i = 0; i < NUM_OF_PROBERS; i++)\n  {\n    if (mProbers[i])\n    {\n      mProbers[i]->Reset();\n      mIsActive[i] = true;\n      ++mActiveNum;\n    }\n    else\n      mIsActive[i] = false;\n  }\n  mBestGuess = -1;\n  mState = eDetecting;\n  mKeepNext = 0;\n}\n\nnsProbingState nsMBCSGroupProber::HandleData(const char* aBuf, PRUint32 aLen)\n{\n  nsProbingState st;\n  PRUint32 start = 0;\n  PRUint32 keepNext = mKeepNext;\n\n  //do filtering to reduce load to probers\n  for (PRUint32 pos = 0; pos < aLen; ++pos)\n  {\n    if (aBuf[pos] & 0x80)\n    {\n      if (!keepNext)\n        start = pos;\n      keepNext = 2;\n    }\n    else if (keepNext)\n    {\n      if (--keepNext == 0)\n      {\n        for (PRUint32 i = 0; i < NUM_OF_PROBERS; i++)\n        {\n          if (!mIsActive[i])\n            continue;\n          st = mProbers[i]->HandleData(aBuf + start, pos + 1 - start);\n          if (st == eFoundIt)\n          {\n            mBestGuess = i;\n            mState = eFoundIt;\n            return mState;\n          }\n        }\n      }\n    }\n  }\n\n  if (keepNext) {\n    for (PRUint32 i = 0; i < NUM_OF_PROBERS; i++)\n    {\n      if (!mIsActive[i])\n        continue;\n      st = mProbers[i]->HandleData(aBuf + start, aLen - start);\n      if (st == eFoundIt)\n      {\n        mBestGuess = i;\n        mState = eFoundIt;\n        return mState;\n      }\n    }\n  }\n  mKeepNext = keepNext;\n\n  return mState;\n}\n\nfloat nsMBCSGroupProber::GetConfidence(void)\n{\n  PRUint32 i;\n  float bestConf = 0.0, cf;\n\n  switch (mState)\n  {\n  case eFoundIt:\n    return (float)0.99;\n  case eNotMe:\n    return (float)0.01;\n  default:\n    for (i = 0; i < NUM_OF_PROBERS; i++)\n    {\n      if (!mIsActive[i])\n        continue;\n      cf = mProbers[i]->GetConfidence();\n      if (bestConf < cf)\n      {\n        bestConf = cf;\n        mBestGuess = i;\n      }\n    }\n  }\n  return bestConf;\n}\n\n#ifdef DEBUG_chardet\nvoid nsMBCSGroupProber::DumpStatus()\n{\n  PRUint32 i;\n  float cf;\n  \n  GetConfidence();\n  for (i = 0; i < NUM_OF_PROBERS; i++)\n  {\n    if (!mIsActive[i])\n      printf(\"  MBCS inactive: [%s] (confidence is too low).\\r\\n\", ProberName[i]);\n    else\n    {\n      cf = mProbers[i]->GetConfidence();\n      printf(\"  MBCS %1.3f: [%s]\\r\\n\", cf, ProberName[i]);\n    }\n  }\n}\n#endif\n\n#ifdef DEBUG_jgmyers\nvoid nsMBCSGroupProber::GetDetectorState(nsUniversalDetector::DetectorState (&states)[nsUniversalDetector::NumDetectors], PRUint32 &offset)\n{\n  for (PRUint32 i = 0; i < NUM_OF_PROBERS; ++i) {\n    states[offset].name = ProberName[i];\n    states[offset].isActive = mIsActive[i];\n    states[offset].confidence = mIsActive[i] ? mProbers[i]->GetConfidence() : 0.0;\n    ++offset;\n  }\n}\n#endif /* DEBUG_jgmyers */\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsMBCSGroupProber.h",
    "content": "/**\n * @file    nsMBCSGroupProber.h\n * @brief   nsMBCSGroupProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef nsMBCSGroupProber_h__\n#define nsMBCSGroupProber_h__\n\n#include \"nsSJISProber.h\"\n#include \"nsUTF8Prober.h\"\n#include \"nsEUCJPProber.h\"\n#include \"nsGB2312Prober.h\"\n#include \"nsEUCKRProber.h\"\n#include \"nsBig5Prober.h\"\n#include \"nsEUCTWProber.h\"\n\n#define NUM_OF_PROBERS    7\n\nclass nsMBCSGroupProber: public nsCharSetProber {\npublic:\n  nsMBCSGroupProber(PRUint32 aLanguageFilter);\n  virtual ~nsMBCSGroupProber();\n  nsProbingState HandleData(const char* aBuf, PRUint32 aLen);\n  const char* GetCharSetName();\n  nsProbingState GetState(void) {return mState;}\n  void      Reset(void);\n  float     GetConfidence(void);\n\n#ifdef DEBUG_chardet\n  void  DumpStatus();\n#endif\n#ifdef DEBUG_jgmyers\n  void GetDetectorState(nsUniversalDetector::DetectorState (&states)[nsUniversalDetector::NumDetectors], PRUint32 &offset);\n#endif\n\nprotected:\n  nsProbingState mState;\n  nsCharSetProber* mProbers[NUM_OF_PROBERS];\n  bool            mIsActive[NUM_OF_PROBERS];\n  PRInt32 mBestGuess;\n  PRUint32 mActiveNum;\n  PRUint32 mKeepNext;\n};\n\n#endif /* nsMBCSGroupProber_h__ */\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsMBCSSM.cpp",
    "content": "/**\n * @file    nsMBCSSM.cpp\n * @brief   nsMBCSSM\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsCodingStateMachine.h\"\n\n/*\nModification from frank tang's original work:\n. 0x00 is allowed as a legal character. Since some web pages contains this char in \n  text stream.\n*/\n\n// BIG5 \n\nstatic const PRUint32 BIG5_cls [ 256 / 8 ] = {\n//PCK4BITS(0,1,1,1,1,1,1,1),  // 00 - 07 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 00 - 07    //allow 0x00 as legal value\nPCK4BITS(1,1,1,1,1,1,0,0),  // 08 - 0f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 10 - 17 \nPCK4BITS(1,1,1,0,1,1,1,1),  // 18 - 1f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 20 - 27 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 28 - 2f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 30 - 37 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 38 - 3f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 40 - 47 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 48 - 4f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 50 - 57 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 58 - 5f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 60 - 67 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 68 - 6f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 70 - 77 \nPCK4BITS(2,2,2,2,2,2,2,1),  // 78 - 7f \nPCK4BITS(4,4,4,4,4,4,4,4),  // 80 - 87 \nPCK4BITS(4,4,4,4,4,4,4,4),  // 88 - 8f \nPCK4BITS(4,4,4,4,4,4,4,4),  // 90 - 97 \nPCK4BITS(4,4,4,4,4,4,4,4),  // 98 - 9f \nPCK4BITS(4,3,3,3,3,3,3,3),  // a0 - a7 \nPCK4BITS(3,3,3,3,3,3,3,3),  // a8 - af \nPCK4BITS(3,3,3,3,3,3,3,3),  // b0 - b7 \nPCK4BITS(3,3,3,3,3,3,3,3),  // b8 - bf \nPCK4BITS(3,3,3,3,3,3,3,3),  // c0 - c7 \nPCK4BITS(3,3,3,3,3,3,3,3),  // c8 - cf \nPCK4BITS(3,3,3,3,3,3,3,3),  // d0 - d7 \nPCK4BITS(3,3,3,3,3,3,3,3),  // d8 - df \nPCK4BITS(3,3,3,3,3,3,3,3),  // e0 - e7 \nPCK4BITS(3,3,3,3,3,3,3,3),  // e8 - ef \nPCK4BITS(3,3,3,3,3,3,3,3),  // f0 - f7 \nPCK4BITS(3,3,3,3,3,3,3,0)   // f8 - ff \n};\n\n\nstatic const PRUint32 BIG5_st [ 3] = {\nPCK4BITS(eError,eStart,eStart,     3,eError,eError,eError,eError),//00-07 \nPCK4BITS(eError,eError,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eError),//08-0f \nPCK4BITS(eError,eStart,eStart,eStart,eStart,eStart,eStart,eStart) //10-17 \n};\n\nstatic const PRUint32 Big5CharLenTable[] = {0, 1, 1, 2, 0};\n\nSMModel const Big5SMModel = {\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, BIG5_cls },\n    5,\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, BIG5_st },\n  PUT_CHARTAB (Big5CharLenTable),\n  \"Big5\",\n};\n\nstatic const PRUint32 EUCJP_cls [ 256 / 8 ] = {\n//PCK4BITS(5,4,4,4,4,4,4,4),  // 00 - 07 \nPCK4BITS(4,4,4,4,4,4,4,4),  // 00 - 07 \nPCK4BITS(4,4,4,4,4,4,5,5),  // 08 - 0f \nPCK4BITS(4,4,4,4,4,4,4,4),  // 10 - 17 \nPCK4BITS(4,4,4,5,4,4,4,4),  // 18 - 1f \nPCK4BITS(4,4,4,4,4,4,4,4),  // 20 - 27 \nPCK4BITS(4,4,4,4,4,4,4,4),  // 28 - 2f \nPCK4BITS(4,4,4,4,4,4,4,4),  // 30 - 37 \nPCK4BITS(4,4,4,4,4,4,4,4),  // 38 - 3f \nPCK4BITS(4,4,4,4,4,4,4,4),  // 40 - 47 \nPCK4BITS(4,4,4,4,4,4,4,4),  // 48 - 4f \nPCK4BITS(4,4,4,4,4,4,4,4),  // 50 - 57 \nPCK4BITS(4,4,4,4,4,4,4,4),  // 58 - 5f \nPCK4BITS(4,4,4,4,4,4,4,4),  // 60 - 67 \nPCK4BITS(4,4,4,4,4,4,4,4),  // 68 - 6f \nPCK4BITS(4,4,4,4,4,4,4,4),  // 70 - 77 \nPCK4BITS(4,4,4,4,4,4,4,4),  // 78 - 7f \nPCK4BITS(5,5,5,5,5,5,5,5),  // 80 - 87 \nPCK4BITS(5,5,5,5,5,5,1,3),  // 88 - 8f \nPCK4BITS(5,5,5,5,5,5,5,5),  // 90 - 97 \nPCK4BITS(5,5,5,5,5,5,5,5),  // 98 - 9f \nPCK4BITS(5,2,2,2,2,2,2,2),  // a0 - a7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // a8 - af \nPCK4BITS(2,2,2,2,2,2,2,2),  // b0 - b7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // b8 - bf \nPCK4BITS(2,2,2,2,2,2,2,2),  // c0 - c7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // c8 - cf \nPCK4BITS(2,2,2,2,2,2,2,2),  // d0 - d7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // d8 - df \nPCK4BITS(0,0,0,0,0,0,0,0),  // e0 - e7 \nPCK4BITS(0,0,0,0,0,0,0,0),  // e8 - ef \nPCK4BITS(0,0,0,0,0,0,0,0),  // f0 - f7 \nPCK4BITS(0,0,0,0,0,0,0,5)   // f8 - ff \n};\n\n\nstatic const PRUint32 EUCJP_st [ 5] = {\nPCK4BITS(     3,     4,     3,     5,eStart,eError,eError,eError),//00-07 \nPCK4BITS(eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe),//08-0f \nPCK4BITS(eItsMe,eItsMe,eStart,eError,eStart,eError,eError,eError),//10-17 \nPCK4BITS(eError,eError,eStart,eError,eError,eError,     3,eError),//18-1f \nPCK4BITS(     3,eError,eError,eError,eStart,eStart,eStart,eStart) //20-27 \n};\n\nstatic const PRUint32 EUCJPCharLenTable[] = {2, 2, 2, 3, 1, 0};\n\nconst SMModel EUCJPSMModel = {\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCJP_cls },\n   6,\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCJP_st },\n  PUT_CHARTAB (EUCJPCharLenTable),\n  \"EUC-JP\",\n};\n\nstatic const PRUint32 EUCKR_cls [ 256 / 8 ] = {\n//PCK4BITS(0,1,1,1,1,1,1,1),  // 00 - 07 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 00 - 07 \nPCK4BITS(1,1,1,1,1,1,0,0),  // 08 - 0f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 10 - 17 \nPCK4BITS(1,1,1,0,1,1,1,1),  // 18 - 1f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 20 - 27 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 28 - 2f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 30 - 37 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 38 - 3f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 40 - 47 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 48 - 4f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 50 - 57 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 58 - 5f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 60 - 67 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 68 - 6f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 70 - 77 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 78 - 7f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 80 - 87 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 88 - 8f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 90 - 97 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 98 - 9f \nPCK4BITS(0,2,2,2,2,2,2,2),  // a0 - a7 \nPCK4BITS(2,2,2,2,2,3,3,3),  // a8 - af \nPCK4BITS(2,2,2,2,2,2,2,2),  // b0 - b7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // b8 - bf \nPCK4BITS(2,2,2,2,2,2,2,2),  // c0 - c7 \nPCK4BITS(2,3,2,2,2,2,2,2),  // c8 - cf \nPCK4BITS(2,2,2,2,2,2,2,2),  // d0 - d7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // d8 - df \nPCK4BITS(2,2,2,2,2,2,2,2),  // e0 - e7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // e8 - ef \nPCK4BITS(2,2,2,2,2,2,2,2),  // f0 - f7 \nPCK4BITS(2,2,2,2,2,2,2,0)   // f8 - ff \n};\n\n\nstatic const PRUint32 EUCKR_st [ 2] = {\nPCK4BITS(eError,eStart,     3,eError,eError,eError,eError,eError),//00-07 \nPCK4BITS(eItsMe,eItsMe,eItsMe,eItsMe,eError,eError,eStart,eStart) //08-0f \n};\n\nstatic const PRUint32 EUCKRCharLenTable[] = {0, 1, 2, 0};\n\nconst SMModel EUCKRSMModel = {\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCKR_cls },\n  4,\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCKR_st },\n  PUT_CHARTAB (EUCKRCharLenTable),\n  \"EUC-KR\",\n};\n\nstatic const PRUint32 EUCTW_cls [ 256 / 8 ] = {\n//PCK4BITS(0,2,2,2,2,2,2,2),  // 00 - 07 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 00 - 07 \nPCK4BITS(2,2,2,2,2,2,0,0),  // 08 - 0f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 10 - 17 \nPCK4BITS(2,2,2,0,2,2,2,2),  // 18 - 1f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 20 - 27 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 28 - 2f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 30 - 37 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 38 - 3f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 40 - 47 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 48 - 4f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 50 - 57 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 58 - 5f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 60 - 67 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 68 - 6f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 70 - 77 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 78 - 7f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 80 - 87 \nPCK4BITS(0,0,0,0,0,0,6,0),  // 88 - 8f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 90 - 97 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 98 - 9f \nPCK4BITS(0,3,4,4,4,4,4,4),  // a0 - a7 \nPCK4BITS(5,5,1,1,1,1,1,1),  // a8 - af \nPCK4BITS(1,1,1,1,1,1,1,1),  // b0 - b7 \nPCK4BITS(1,1,1,1,1,1,1,1),  // b8 - bf \nPCK4BITS(1,1,3,1,3,3,3,3),  // c0 - c7 \nPCK4BITS(3,3,3,3,3,3,3,3),  // c8 - cf \nPCK4BITS(3,3,3,3,3,3,3,3),  // d0 - d7 \nPCK4BITS(3,3,3,3,3,3,3,3),  // d8 - df \nPCK4BITS(3,3,3,3,3,3,3,3),  // e0 - e7 \nPCK4BITS(3,3,3,3,3,3,3,3),  // e8 - ef \nPCK4BITS(3,3,3,3,3,3,3,3),  // f0 - f7 \nPCK4BITS(3,3,3,3,3,3,3,0)   // f8 - ff \n};\n\n\nstatic const PRUint32 EUCTW_st [ 6] = {\nPCK4BITS(eError,eError,eStart,     3,     3,     3,     4,eError),//00-07 \nPCK4BITS(eError,eError,eError,eError,eError,eError,eItsMe,eItsMe),//08-0f \nPCK4BITS(eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eError,eStart,eError),//10-17 \nPCK4BITS(eStart,eStart,eStart,eError,eError,eError,eError,eError),//18-1f \nPCK4BITS(     5,eError,eError,eError,eStart,eError,eStart,eStart),//20-27 \nPCK4BITS(eStart,eError,eStart,eStart,eStart,eStart,eStart,eStart) //28-2f \n};\n\nstatic const PRUint32 EUCTWCharLenTable[] = {0, 0, 1, 2, 2, 2, 3};\n\nconst SMModel EUCTWSMModel = {\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCTW_cls },\n   7,\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCTW_st },\n  PUT_CHARTAB (EUCTWCharLenTable),\n  \"x-euc-tw\",\n};\n\n/* obsolete GB2312 by gb18030\nstatic PRUint32 GB2312_cls [ 256 / 8 ] = {\n//PCK4BITS(0,1,1,1,1,1,1,1),  // 00 - 07 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 00 - 07 \nPCK4BITS(1,1,1,1,1,1,0,0),  // 08 - 0f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 10 - 17 \nPCK4BITS(1,1,1,0,1,1,1,1),  // 18 - 1f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 20 - 27 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 28 - 2f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 30 - 37 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 38 - 3f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 40 - 47 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 48 - 4f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 50 - 57 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 58 - 5f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 60 - 67 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 68 - 6f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 70 - 77 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 78 - 7f \nPCK4BITS(1,0,0,0,0,0,0,0),  // 80 - 87 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 88 - 8f \nPCK4BITS(0,0,0,0,0,0,0,0),  // 90 - 97 \nPCK4BITS(0,0,0,0,0,0,0,0),  // 98 - 9f \nPCK4BITS(0,2,2,2,2,2,2,2),  // a0 - a7 \nPCK4BITS(2,2,3,3,3,3,3,3),  // a8 - af \nPCK4BITS(2,2,2,2,2,2,2,2),  // b0 - b7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // b8 - bf \nPCK4BITS(2,2,2,2,2,2,2,2),  // c0 - c7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // c8 - cf \nPCK4BITS(2,2,2,2,2,2,2,2),  // d0 - d7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // d8 - df \nPCK4BITS(2,2,2,2,2,2,2,2),  // e0 - e7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // e8 - ef \nPCK4BITS(2,2,2,2,2,2,2,2),  // f0 - f7 \nPCK4BITS(2,2,2,2,2,2,2,0)   // f8 - ff \n};\n\n\nstatic PRUint32 GB2312_st [ 2] = {\nPCK4BITS(eError,eStart,     3,eError,eError,eError,eError,eError),//00-07 \nPCK4BITS(eItsMe,eItsMe,eItsMe,eItsMe,eError,eError,eStart,eStart) //08-0f \n};\n\nstatic const PRUint32 GB2312CharLenTable[] = {0, 1, 2, 0};\n\nSMModel GB2312SMModel = {\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, GB2312_cls },\n   4,\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, GB2312_st },\n  PUT_CHARTAB (GB2312CharLenTable),\n  \"GB2312\",\n};\n*/\n\n// the following state machine data was created by perl script in \n// intl/chardet/tools. It should be the same as in PSM detector.\nstatic const PRUint32 GB18030_cls [ 256 / 8 ] = {\nPCK4BITS(1,1,1,1,1,1,1,1),  // 00 - 07 \nPCK4BITS(1,1,1,1,1,1,0,0),  // 08 - 0f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 10 - 17 \nPCK4BITS(1,1,1,0,1,1,1,1),  // 18 - 1f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 20 - 27 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 28 - 2f \nPCK4BITS(3,3,3,3,3,3,3,3),  // 30 - 37 \nPCK4BITS(3,3,1,1,1,1,1,1),  // 38 - 3f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 40 - 47 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 48 - 4f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 50 - 57 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 58 - 5f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 60 - 67 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 68 - 6f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 70 - 77 \nPCK4BITS(2,2,2,2,2,2,2,4),  // 78 - 7f \nPCK4BITS(5,6,6,6,6,6,6,6),  // 80 - 87 \nPCK4BITS(6,6,6,6,6,6,6,6),  // 88 - 8f \nPCK4BITS(6,6,6,6,6,6,6,6),  // 90 - 97 \nPCK4BITS(6,6,6,6,6,6,6,6),  // 98 - 9f \nPCK4BITS(6,6,6,6,6,6,6,6),  // a0 - a7 \nPCK4BITS(6,6,6,6,6,6,6,6),  // a8 - af \nPCK4BITS(6,6,6,6,6,6,6,6),  // b0 - b7 \nPCK4BITS(6,6,6,6,6,6,6,6),  // b8 - bf \nPCK4BITS(6,6,6,6,6,6,6,6),  // c0 - c7 \nPCK4BITS(6,6,6,6,6,6,6,6),  // c8 - cf \nPCK4BITS(6,6,6,6,6,6,6,6),  // d0 - d7 \nPCK4BITS(6,6,6,6,6,6,6,6),  // d8 - df \nPCK4BITS(6,6,6,6,6,6,6,6),  // e0 - e7 \nPCK4BITS(6,6,6,6,6,6,6,6),  // e8 - ef \nPCK4BITS(6,6,6,6,6,6,6,6),  // f0 - f7 \nPCK4BITS(6,6,6,6,6,6,6,0)   // f8 - ff \n};\n\n\nstatic const PRUint32 GB18030_st [ 6] = {\nPCK4BITS(eError,eStart,eStart,eStart,eStart,eStart,     3,eError),//00-07 \nPCK4BITS(eError,eError,eError,eError,eError,eError,eItsMe,eItsMe),//08-0f \nPCK4BITS(eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eError,eError,eStart),//10-17 \nPCK4BITS(     4,eError,eStart,eStart,eError,eError,eError,eError),//18-1f \nPCK4BITS(eError,eError,     5,eError,eError,eError,eItsMe,eError),//20-27 \nPCK4BITS(eError,eError,eStart,eStart,eStart,eStart,eStart,eStart) //28-2f \n};\n\n// To be accurate, the length of class 6 can be either 2 or 4. \n// But it is not necessary to discriminate between the two since \n// it is used for frequency analysis only, and we are validing \n// each code range there as well. So it is safe to set it to be \n// 2 here. \nstatic const PRUint32 GB18030CharLenTable[] = {0, 1, 1, 1, 1, 1, 2};\n\nconst SMModel GB18030SMModel = {\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, GB18030_cls },\n   7,\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, GB18030_st },\n  PUT_CHARTAB (GB18030CharLenTable),\n  \"GB18030\",\n};\n\n// sjis\n\nstatic const PRUint32 SJIS_cls [ 256 / 8 ] = {\n//PCK4BITS(0,1,1,1,1,1,1,1),  // 00 - 07 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 00 - 07 \nPCK4BITS(1,1,1,1,1,1,0,0),  // 08 - 0f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 10 - 17 \nPCK4BITS(1,1,1,0,1,1,1,1),  // 18 - 1f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 20 - 27 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 28 - 2f \nPCK4BITS(1,1,1,1,1,1,1,1),  // 30 - 37 \nPCK4BITS(1,1,1,1,1,1,1,1),  // 38 - 3f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 40 - 47 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 48 - 4f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 50 - 57 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 58 - 5f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 60 - 67 \nPCK4BITS(2,2,2,2,2,2,2,2),  // 68 - 6f \nPCK4BITS(2,2,2,2,2,2,2,2),  // 70 - 77 \nPCK4BITS(2,2,2,2,2,2,2,1),  // 78 - 7f \nPCK4BITS(3,3,3,3,3,3,3,3),  // 80 - 87 \nPCK4BITS(3,3,3,3,3,3,3,3),  // 88 - 8f \nPCK4BITS(3,3,3,3,3,3,3,3),  // 90 - 97 \nPCK4BITS(3,3,3,3,3,3,3,3),  // 98 - 9f \n//0xa0 is illegal in sjis encoding, but some pages does \n//contain such byte. We need to be more error forgiven.\nPCK4BITS(2,2,2,2,2,2,2,2),  // a0 - a7     \nPCK4BITS(2,2,2,2,2,2,2,2),  // a8 - af \nPCK4BITS(2,2,2,2,2,2,2,2),  // b0 - b7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // b8 - bf \nPCK4BITS(2,2,2,2,2,2,2,2),  // c0 - c7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // c8 - cf \nPCK4BITS(2,2,2,2,2,2,2,2),  // d0 - d7 \nPCK4BITS(2,2,2,2,2,2,2,2),  // d8 - df \nPCK4BITS(3,3,3,3,3,3,3,3),  // e0 - e7 \nPCK4BITS(3,3,3,3,3,4,4,4),  // e8 - ef \nPCK4BITS(4,4,4,4,4,4,4,4),  // f0 - f7 \nPCK4BITS(4,4,4,4,4,0,0,0)   // f8 - ff \n};\n\n\nstatic const PRUint32 SJIS_st [ 3] = {\nPCK4BITS(eError,eStart,eStart,     3,eError,eError,eError,eError),//00-07 \nPCK4BITS(eError,eError,eError,eError,eItsMe,eItsMe,eItsMe,eItsMe),//08-0f \nPCK4BITS(eItsMe,eItsMe,eError,eError,eStart,eStart,eStart,eStart) //10-17 \n};\n\nstatic const PRUint32 SJISCharLenTable[] = {0, 1, 1, 2, 0, 0};\n\nconst SMModel SJISSMModel = {\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, SJIS_cls },\n   6,\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, SJIS_st },\n  PUT_CHARTAB (SJISCharLenTable),\n  \"Shift_JIS\",\n};\n\n\nstatic const PRUint32 UTF8_cls [ 256 / 8 ] = {\nPCK4BITS( 1, 1, 1, 1, 1, 1, 1, 1),  // 00 - 07\nPCK4BITS( 1, 1, 1, 1, 1, 1, 0, 0),  // 08 - 0f\nPCK4BITS( 1, 1, 1, 1, 1, 1, 1, 1),  // 10 - 17\nPCK4BITS( 1, 1, 1, 0, 1, 1, 1, 1),  // 18 - 1f\nPCK4BITS( 1, 1, 1, 1, 1, 1, 1, 1),  // 20 - 27\nPCK4BITS( 1, 1, 1, 1, 1, 1, 1, 1),  // 28 - 2f\nPCK4BITS( 1, 1, 1, 1, 1, 1, 1, 1),  // 30 - 37\nPCK4BITS( 1, 1, 1, 1, 1, 1, 1, 1),  // 38 - 3f\nPCK4BITS( 1, 1, 1, 1, 1, 1, 1, 1),  // 40 - 47\nPCK4BITS( 1, 1, 1, 1, 1, 1, 1, 1),  // 48 - 4f\nPCK4BITS( 1, 1, 1, 1, 1, 1, 1, 1),  // 50 - 57\nPCK4BITS( 1, 1, 1, 1, 1, 1, 1, 1),  // 58 - 5f\nPCK4BITS( 1, 1, 1, 1, 1, 1, 1, 1),  // 60 - 67\nPCK4BITS( 1, 1, 1, 1, 1, 1, 1, 1),  // 68 - 6f\nPCK4BITS( 1, 1, 1, 1, 1, 1, 1, 1),  // 70 - 77\nPCK4BITS( 1, 1, 1, 1, 1, 1, 1, 1),  // 78 - 7f\nPCK4BITS( 2, 2, 2, 2, 2, 2, 2, 2),  // 80 - 87\nPCK4BITS( 2, 2, 2, 2, 2, 2, 2, 2),  // 88 - 8f\nPCK4BITS( 3, 3, 3, 3, 3, 3, 3, 3),  // 90 - 97\nPCK4BITS( 3, 3, 3, 3, 3, 3, 3, 3),  // 98 - 9f\nPCK4BITS( 4, 4, 4, 4, 4, 4, 4, 4),  // a0 - a7\nPCK4BITS( 4, 4, 4, 4, 4, 4, 4, 4),  // a8 - af\nPCK4BITS( 4, 4, 4, 4, 4, 4, 4, 4),  // b0 - b7\nPCK4BITS( 4, 4, 4, 4, 4, 4, 4, 4),  // b8 - bf\nPCK4BITS( 0, 0, 5, 5, 5, 5, 5, 5),  // c0 - c7\nPCK4BITS( 5, 5, 5, 5, 5, 5, 5, 5),  // c8 - cf\nPCK4BITS( 5, 5, 5, 5, 5, 5, 5, 5),  // d0 - d7\nPCK4BITS( 5, 5, 5, 5, 5, 5, 5, 5),  // d8 - df\nPCK4BITS( 6, 7, 7, 7, 7, 7, 7, 7),  // e0 - e7\nPCK4BITS( 7, 7, 7, 7, 7, 8, 7, 7),  // e8 - ef\nPCK4BITS( 9,10,10,10,11, 0, 0, 0),  // f0 - f7\nPCK4BITS( 0, 0, 0, 0, 0, 0, 0, 0)   // f8 - ff\n};\n\n\nstatic const PRUint32 UTF8_st [ 15] = {\nPCK4BITS(eError,eStart,eError,eError,eError,     3,     4,     5),  // 00 - 07\nPCK4BITS(     6,     7,     8,     9,eError,eError,eError,eError),  // 08 - 0f\nPCK4BITS(eError,eError,eError,eError,eError,eError,eError,eError),  // 10 - 17\nPCK4BITS(eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe,eItsMe),  // 18 - 1f\nPCK4BITS(eItsMe,eItsMe,eItsMe,eItsMe,eError,eError,eStart,eStart),  // 20 - 27\nPCK4BITS(eStart,eError,eError,eError,eError,eError,eError,eError),  // 28 - 2f\nPCK4BITS(eError,eError,eError,eError,     3,eError,eError,eError),  // 30 - 37\nPCK4BITS(eError,eError,eError,eError,eError,eError,     3,     3),  // 38 - 3f\nPCK4BITS(     3,eError,eError,eError,eError,eError,eError,eError),  // 40 - 47\nPCK4BITS(eError,eError,     3,     3,eError,eError,eError,eError),  // 48 - 4f\nPCK4BITS(eError,eError,eError,eError,eError,eError,     5,     5),  // 50 - 57\nPCK4BITS(eError,eError,eError,eError,eError,eError,eError,eError),  // 58 - 5f\nPCK4BITS(eError,eError,     5,     5,     5,eError,eError,eError),  // 60 - 67\nPCK4BITS(eError,eError,eError,eError,eError,eError,     5,eError),  // 68 - 6f\nPCK4BITS(eError,eError,eError,eError,eError,eError,eError,eError)   // 70 - 77\n};\n\nstatic const PRUint32 UTF8CharLenTable[] = {0, 1, 0, 0, 0, 2, 3, 3, 3, 4, 4, 4};\n\nconst SMModel UTF8SMModel = {\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, UTF8_cls },\n   12,\n  {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, UTF8_st },\n  PUT_CHARTAB (UTF8CharLenTable),\n  \"UTF-8\",\n};\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsPkgInt.h",
    "content": "/**\n * @file    nsPkgInt.h\n * @brief   nsPkgInt\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef nsPkgInt_h__\n#define nsPkgInt_h__\n#include \"nscore.h\"\n\ntypedef enum {\n  eIdxSft4bits  = 3,\n  eIdxSft8bits  = 2,\n  eIdxSft16bits = 1\n} nsIdxSft; \n\ntypedef enum {\n  eSftMsk4bits  = 7,\n  eSftMsk8bits  = 3,\n  eSftMsk16bits = 1\n} nsSftMsk; \n\ntypedef enum {\n  eBitSft4bits  = 2,\n  eBitSft8bits  = 3,\n  eBitSft16bits = 4\n} nsBitSft; \n\ntypedef enum {\n  eUnitMsk4bits  = 0x0000000FL,\n  eUnitMsk8bits  = 0x000000FFL,\n  eUnitMsk16bits = 0x0000FFFFL\n} nsUnitMsk; \n\ntypedef struct nsPkgInt {\n  nsIdxSft  idxsft;\n  nsSftMsk  sftmsk;\n  nsBitSft  bitsft;\n  nsUnitMsk unitmsk;\n  const PRUint32* const data;\n} nsPkgInt;\n\n\n#define PCK16BITS(a,b)            ((PRUint32)(((b) << 16) | (a)))\n\n#define PCK8BITS(a,b,c,d)         PCK16BITS( ((PRUint32)(((b) << 8) | (a))),  \\\n                                             ((PRUint32)(((d) << 8) | (c))))\n\n#define PCK4BITS(a,b,c,d,e,f,g,h) PCK8BITS(  ((PRUint32)(((b) << 4) | (a))), \\\n                                             ((PRUint32)(((d) << 4) | (c))), \\\n                                             ((PRUint32)(((f) << 4) | (e))), \\\n                                             ((PRUint32)(((h) << 4) | (g))) )\n\n#define GETFROMPCK(i, c) \\\n (((((c).data)[(i)>>(c).idxsft])>>(((i)&(c).sftmsk)<<(c).bitsft))&(c).unitmsk)\n\n#endif /* nsPkgInt_h__ */\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsSBCSGroupProber.cpp",
    "content": "/**\n * @file    nsSBCSGroupProber.cpp\n * @brief   nsSBCSGroupProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include <stdio.h>\n#include \"prmem.h\"\n\n#include \"nsSBCharSetProber.h\"\n#include \"nsSBCSGroupProber.h\"\n\n#include \"nsHebrewProber.h\"\n\nnsSBCSGroupProber::nsSBCSGroupProber()\n{\n  mProbers[0] = new nsSingleByteCharSetProber(&Win1251Model);\n  mProbers[1] = new nsSingleByteCharSetProber(&Koi8rModel);\n  mProbers[2] = new nsSingleByteCharSetProber(&Latin5Model);\n  mProbers[3] = new nsSingleByteCharSetProber(&MacCyrillicModel);\n  mProbers[4] = new nsSingleByteCharSetProber(&Ibm866Model);\n  mProbers[5] = new nsSingleByteCharSetProber(&Ibm855Model);\n  mProbers[6] = new nsSingleByteCharSetProber(&ISO_8859_7greekModel);\n  mProbers[7] = new nsSingleByteCharSetProber(&WINDOWS_1253greekModel);\n  mProbers[8] = new nsSingleByteCharSetProber(&Latin5BulgarianModel);\n  mProbers[9] = new nsSingleByteCharSetProber(&Win1251BulgarianModel);\n  mProbers[10] = new nsSingleByteCharSetProber(&TIS620ThaiModel);\n\n  nsHebrewProber *hebprober = new nsHebrewProber();\n  // Notice: Any change in these indexes - 10,11,12 must be reflected\n  // in the code below as well.\n  mProbers[11] = hebprober;\n  mProbers[12] = new nsSingleByteCharSetProber(&Win1255Model, false, hebprober); // Logical Hebrew\n  mProbers[13] = new nsSingleByteCharSetProber(&Win1255Model, true, hebprober); // Visual Hebrew\n  // Tell the Hebrew prober about the logical and visual probers\n  if (mProbers[11] && mProbers[12] && mProbers[13]) // all are not null\n  {\n    hebprober->SetModelProbers(mProbers[12], mProbers[13]);\n  }\n  else // One or more is null. avoid any Hebrew probing, null them all\n  {\n    for (PRUint32 i = 11; i <= 13; ++i)\n    { \n      delete mProbers[i]; \n      mProbers[i] = 0; \n    }\n  }\n\n  mProbers[14] = new nsSingleByteCharSetProber(&Latin2HungarianModel);\n  mProbers[15] = new nsSingleByteCharSetProber(&Win1250HungarianModel);\n  mProbers[16] = new nsSingleByteCharSetProber(&WINDOWS_1252frenchModel);\n  mProbers[17] = new nsSingleByteCharSetProber(&WINDOWS_1252germanModel);\n  mProbers[18] = new nsSingleByteCharSetProber(&WINDOWS_1252swedishModel);\n  mProbers[19] = new nsSingleByteCharSetProber(&ISO_8859_9turkishModel);\n  mProbers[20] = new nsSingleByteCharSetProber(&WINDOWS_1252finnishModel);\n  mProbers[21] = new nsSingleByteCharSetProber(&windows_1252spanishModel);\n  mProbers[22] = new nsSingleByteCharSetProber(&iso_8859_2czechModel);\n  mProbers[23] = new nsSingleByteCharSetProber(&iso_8859_2polishModel);\n\n  Reset();\n}\n\nnsSBCSGroupProber::~nsSBCSGroupProber()\n{\n  for (PRUint32 i = 0; i < NUM_OF_SBCS_PROBERS; i++)\n  {\n    delete mProbers[i];\n  }\n}\n\n\nconst char* nsSBCSGroupProber::GetCharSetName()\n{\n  //if we have no answer yet\n  if (mBestGuess == -1)\n  {\n    GetConfidence();\n    //no charset seems positive\n    if (mBestGuess == -1)\n      //we will use default.\n      mBestGuess = 0;\n  }\n  return mProbers[mBestGuess]->GetCharSetName();\n}\n\nvoid  nsSBCSGroupProber::Reset(void)\n{\n  mActiveNum = 0;\n  for (PRUint32 i = 0; i < NUM_OF_SBCS_PROBERS; i++)\n  {\n    if (mProbers[i]) // not null\n    {\n      mProbers[i]->Reset();\n      mIsActive[i] = true;\n      ++mActiveNum;\n    }\n    else\n      mIsActive[i] = false;\n  }\n  mBestGuess = -1;\n  mState = eDetecting;\n}\n\n\nnsProbingState nsSBCSGroupProber::HandleData(const char* aBuf, PRUint32 aLen)\n{\n  nsProbingState st;\n  PRUint32 i;\n  char *newBuf1 = 0;\n  PRUint32 newLen1 = 0;\n  char *newBuf2 = 0;\n  PRUint32 newLen2 = 0;\n\n  if (!FilterWithoutEnglishLetters(aBuf, aLen, &newBuf1, newLen1))\n    goto done;\n  if (!FilterWithEnglishLetters(aBuf, aLen, &newBuf2, newLen2))\n    goto done;\n  \n  if (newLen1 == 0)\n    goto done; // Nothing to see here, move on.\n\n  for (i = 0; i < NUM_OF_SBCS_PROBERS; i++)\n  {\n     if (!mIsActive[i])\n       continue;\n     if (mProbers[i]->KeepEnglishLetters()) {\n       st = mProbers[i]->HandleData(newBuf2, newLen2);\n     } \n     else \n     {\n       st = mProbers[i]->HandleData(newBuf1, newLen1);\n     }\n     if (st == eFoundIt)\n     {\n       mBestGuess = i;\n       mState = eFoundIt;\n       break;\n     }\n     else if (st == eNotMe)\n     {\n       mIsActive[i] = false;\n       mActiveNum--;\n       if (mActiveNum <= 0)\n       {\n         mState = eNotMe;\n         break;\n       }\n     }\n  }\n\ndone:\n  PR_FREEIF(newBuf1);\n  PR_FREEIF(newBuf2);\n\n  return mState;\n}\n\nfloat nsSBCSGroupProber::GetConfidence(void)\n{\n  PRUint32 i;\n  float bestConf = 0.0, cf;\n\n  switch (mState)\n  {\n  case eFoundIt:\n    return (float)0.99; //sure yes\n  case eNotMe:\n    return (float)0.01;  //sure no\n  default:\n    for (i = 0; i < NUM_OF_SBCS_PROBERS; i++)\n    {\n      if (!mIsActive[i])\n        continue;\n      cf = mProbers[i]->GetConfidence();\n      if (bestConf < cf)\n      {\n        bestConf = cf;\n        mBestGuess = i;\n      }\n    }\n  }\n  return bestConf;\n}\n\n#ifdef DEBUG_chardet\nvoid nsSBCSGroupProber::DumpStatus()\n{\n  PRUint32 i;\n  float cf;\n  \n  cf = GetConfidence();\n  printf(\" SBCS Group Prober --------begin status \\r\\n\");\n  for (i = 0; i < NUM_OF_SBCS_PROBERS; i++)\n  {\n    if (!mIsActive[i])\n      printf(\"  inactive: [%s] [%s](i.e. confidence is too low).\\r\\n\", \n             mProbers[i]? mProbers[i]->GetCharSetName() : \"UNSET\",\n             mProbers[i]? mProbers[i]->GetLangName() : \"UNSET\"\n        );\n    else\n      mProbers[i]->DumpStatus();\n  }\n  printf(\" SBCS Group found best match [%s] [%s] confidence %f.\\r\\n\",  \n         mProbers[mBestGuess]->GetCharSetName(), \n         mProbers[mBestGuess]->GetLangName(), \n         cf);\n}\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsSBCSGroupProber.h",
    "content": "/**\n * @file    nsSBCSGroupProber.h\n * @brief   nsSBCSGroupProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef nsSBCSGroupProber_h__\n#define nsSBCSGroupProber_h__\n\n\n#define NUM_OF_SBCS_PROBERS    24\n\nclass nsCharSetProber;\nclass nsSBCSGroupProber: public nsCharSetProber {\npublic:\n  nsSBCSGroupProber();\n  virtual ~nsSBCSGroupProber();\n  nsProbingState HandleData(const char* aBuf, PRUint32 aLen);\n  const char* GetCharSetName();\n  nsProbingState GetState(void) {return mState;}\n  void      Reset(void);\n  float     GetConfidence(void);\n\n#ifdef DEBUG_chardet\n  void  DumpStatus();\n#endif\n\nprotected:\n  nsProbingState mState;\n  nsCharSetProber* mProbers[NUM_OF_SBCS_PROBERS];\n  bool            mIsActive[NUM_OF_SBCS_PROBERS];\n  PRInt32 mBestGuess;\n  PRUint32 mActiveNum;\n};\n\n#endif /* nsSBCSGroupProber_h__ */\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsSBCharSetProber.cpp",
    "content": "/**\n * @file    nsSBCharSetProber.cpp\n * @brief   nsSBCharSetProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include <stdio.h>\n#include \"nsSBCharSetProber.h\"\n\nnsProbingState nsSingleByteCharSetProber::HandleData(const char* aBuf, PRUint32 aLen)\n{\n  unsigned char order;\n\n  for (PRUint32 i = 0; i < aLen; i++)\n  {\n    // Order is in [1-64] but we want 0-63 here. \n    order = mModel->charToOrderMap[(unsigned char)aBuf[i]] -1;\n\n    if (order < SYMBOL_CAT_ORDER)\n      mTotalChar++;\n    if (order < SAMPLE_SIZE)\n    {\n        mFreqChar++;\n\n      if (mLastOrder < SAMPLE_SIZE)\n      {\n        mTotalSeqs++;\n        if (!mReversed)\n          ++(mSeqCounters[mModel->precedenceMatrix[mLastOrder*SAMPLE_SIZE+order]]);\n        else // reverse the order of the letters in the lookup\n          ++(mSeqCounters[mModel->precedenceMatrix[order*SAMPLE_SIZE+mLastOrder]]);\n      }\n    }\n    mLastOrder = order;\n  }\n\n  if (mState == eDetecting)\n    if (mTotalSeqs > SB_ENOUGH_REL_THRESHOLD)\n    {\n      float cf = GetConfidence();\n      if (cf > POSITIVE_SHORTCUT_THRESHOLD)\n        mState = eFoundIt;\n      else if (cf < NEGATIVE_SHORTCUT_THRESHOLD)\n        mState = eNotMe;\n    }\n\n  return mState;\n}\n\nvoid  nsSingleByteCharSetProber::Reset(void)\n{\n  mState = eDetecting;\n  mLastOrder = 255;\n  for (PRUint32 i = 0; i < NUMBER_OF_SEQ_CAT; i++)\n    mSeqCounters[i] = 0;\n  mTotalSeqs = 0;\n  mTotalChar = 0;\n  mFreqChar = 0;\n}\n\n//#define NEGATIVE_APPROACH 1\n\nfloat nsSingleByteCharSetProber::GetConfidence(void)\n{\n#ifdef NEGATIVE_APPROACH\n  if (mTotalSeqs > 0)\n    if (mTotalSeqs > mSeqCounters[NEGATIVE_CAT]*10 )\n      return ((float)(mTotalSeqs - mSeqCounters[NEGATIVE_CAT]*10))/mTotalSeqs * mFreqChar / mTotalChar;\n  return (float)0.01;\n#else  //POSITIVE_APPROACH\n  float r;\n\n  if (mTotalSeqs > 0) {\n    r = ((float)1.0) * mSeqCounters[POSITIVE_CAT] / mTotalSeqs / mModel->mTypicalPositiveRatio;\n    r = r*mFreqChar/mTotalChar;\n    if (r >= (float)1.00)\n      r = (float)0.99;\n    return r;\n  }\n  return (float)0.01;\n#endif\n}\n\nconst char* nsSingleByteCharSetProber::GetCharSetName() \n{\n  if (!mNameProber)\n    return mModel->charsetName;\n  return mNameProber->GetCharSetName();\n}\n\n#ifdef DEBUG_chardet\nvoid nsSingleByteCharSetProber::DumpStatus()\n{\n  printf(\"  SBCS: %1.3f [%s] [%s]\\r\\n\", GetConfidence(), mModel->langName, GetCharSetName());\n}\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsSBCharSetProber.h",
    "content": "/**\n * @file    nsSBCharSetProber.h\n * @brief   nsSBCharSetProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef nsSingleByteCharSetProber_h__\n#define nsSingleByteCharSetProber_h__\n\n#include \"nsCharSetProber.h\"\n\n#define SAMPLE_SIZE 64\n#define SB_ENOUGH_REL_THRESHOLD  1024\n#define POSITIVE_SHORTCUT_THRESHOLD  (float)0.95\n#define NEGATIVE_SHORTCUT_THRESHOLD  (float)0.05\n#define SYMBOL_CAT_ORDER  250\n#define NUMBER_OF_SEQ_CAT 4\n#define POSITIVE_CAT   (NUMBER_OF_SEQ_CAT-1)\n#define NEGATIVE_CAT   0\n\ntypedef struct\n{\n  const unsigned char* const charToOrderMap;    // [256] table use to find a char's order\n  const PRUint8* const precedenceMatrix;  // [SAMPLE_SIZE][SAMPLE_SIZE]; table to find a 2-char sequence's frequency\n  float  mTypicalPositiveRatio;     // = freqSeqs / totalSeqs \n  bool keepEnglishLetter;         // says if this script contains English characters (not implemented)\n  const char* const charsetName;\n  const char* const langName;\n} SequenceModel;\n\n\nclass nsSingleByteCharSetProber : public nsCharSetProber{\npublic:\n  nsSingleByteCharSetProber(const SequenceModel *model) \n    :mModel(model), mReversed(false), mNameProber(0) { Reset(); }\n  nsSingleByteCharSetProber(const SequenceModel *model, bool reversed, nsCharSetProber* nameProber)\n    :mModel(model), mReversed(reversed), mNameProber(nameProber) { Reset(); }\n\n  virtual const char* GetCharSetName();\n  virtual const char* GetLangName() {return mModel?mModel->langName:\"\";}\n  virtual nsProbingState HandleData(const char* aBuf, PRUint32 aLen);\n  virtual nsProbingState GetState(void) {return mState;}\n  virtual void      Reset(void);\n  virtual float     GetConfidence(void);\n\n  virtual PRBool KeepEnglishLetters() {return mModel->keepEnglishLetter;}\n\n#ifdef DEBUG_chardet\n  virtual void  DumpStatus();\n#endif\n\nprotected:\n  nsProbingState mState;\n  const SequenceModel* const mModel;\n  const bool mReversed; // true if we need to reverse every pair in the model lookup\n\n  //char order of last character\n  unsigned char mLastOrder;\n\n  PRUint32 mTotalSeqs;\n  PRUint32 mSeqCounters[NUMBER_OF_SEQ_CAT];\n\n  PRUint32 mTotalChar;\n  //characters that fall in our sampling range\n  PRUint32 mFreqChar;\n  \n  // Optional auxiliary prober for name decision. created and destroyed by the GroupProber\n  nsCharSetProber* mNameProber; \n\n};\n\n\nextern const SequenceModel Koi8rModel;\nextern const SequenceModel Win1251Model;\nextern const SequenceModel Latin5Model;\nextern const SequenceModel MacCyrillicModel;\nextern const SequenceModel Ibm866Model;\nextern const SequenceModel Ibm855Model;\nextern const SequenceModel ISO_8859_7greekModel;\nextern const SequenceModel WINDOWS_1253greekModel;\nextern const SequenceModel Latin5BulgarianModel;\nextern const SequenceModel Win1251BulgarianModel;\nextern const SequenceModel Latin2HungarianModel;\nextern const SequenceModel Win1250HungarianModel;\nextern const SequenceModel Win1255Model;\nextern const SequenceModel TIS620ThaiModel;\nextern const SequenceModel WINDOWS_1252frenchModel;\nextern const SequenceModel WINDOWS_1252germanModel;\nextern const SequenceModel WINDOWS_1252swedishModel;\nextern const SequenceModel ISO_8859_9turkishModel;\nextern const SequenceModel WINDOWS_1252finnishModel;\nextern const SequenceModel windows_1252spanishModel;\nextern const SequenceModel iso_8859_2czechModel;\nextern const SequenceModel iso_8859_2polishModel;\n\n#endif /* nsSingleByteCharSetProber_h__ */\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsSJISProber.cpp",
    "content": "/**\n * @file    nsSJISProber.cpp\n * @brief   nsSJISProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n// for S-JIS encoding, obeserve characteristic:\n// 1, kana character (or hankaku?) often have hight frequency of appereance\n// 2, kana character often exist in group\n// 3, certain combination of kana is never used in japanese language\n\n#include \"nsSJISProber.h\"\n#include \"nsDebug.h\"\n\nvoid  nsSJISProber::Reset(void)\n{\n  mCodingSM->Reset(); \n  mState = eDetecting;\n  mContextAnalyser.Reset(mIsPreferredLanguage);\n  mDistributionAnalyser.Reset(mIsPreferredLanguage);\n}\n\nnsProbingState nsSJISProber::HandleData(const char* aBuf, PRUint32 aLen)\n{\n  NS_ASSERTION(aLen, \"HandleData called with empty buffer\");\n  nsSMState codingState;\n\n  for (PRUint32 i = 0; i < aLen; i++)\n  {\n    codingState = mCodingSM->NextState(aBuf[i]);\n    if (codingState == eItsMe)\n    {\n      mState = eFoundIt;\n      break;\n    }\n    if (codingState == eStart)\n    {\n      PRUint32 charLen = mCodingSM->GetCurrentCharLen();\n      if (i == 0)\n      {\n        mLastChar[1] = aBuf[0];\n        mContextAnalyser.HandleOneChar(mLastChar+2-charLen, charLen);\n        mDistributionAnalyser.HandleOneChar(mLastChar, charLen);\n      }\n      else\n      {\n        mContextAnalyser.HandleOneChar(aBuf+i+1-charLen, charLen);\n        mDistributionAnalyser.HandleOneChar(aBuf+i-1, charLen);\n      }\n    }\n  }\n\n  mLastChar[0] = aBuf[aLen-1];\n\n  if (mState == eDetecting)\n    if (mContextAnalyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD)\n      mState = eFoundIt;\n\n  return mState;\n}\n\nfloat nsSJISProber::GetConfidence(void)\n{\n  float contxtCf = mContextAnalyser.GetConfidence();\n  float distribCf = mDistributionAnalyser.GetConfidence();\n\n  return (contxtCf > distribCf ? contxtCf : distribCf);\n}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsSJISProber.h",
    "content": "/**\n * @file    nsSJISProber.h\n * @brief   nsSJISProber\n * @license GPL 2.0/LGPL 2.1\n */\n\n// for S-JIS encoding, obeserve characteristic:\n// 1, kana character (or hankaku?) often have hight frequency of appereance\n// 2, kana character often exist in group\n// 3, certain combination of kana is never used in japanese language\n\n#ifndef nsSJISProber_h__\n#define nsSJISProber_h__\n\n#include \"nsCharSetProber.h\"\n#include \"nsCodingStateMachine.h\"\n#include \"JpCntx.h\"\n#include \"CharDistribution.h\"\n\n\nclass nsSJISProber: public nsCharSetProber {\npublic:\n  nsSJISProber(bool aIsPreferredLanguage)\n    :mIsPreferredLanguage(aIsPreferredLanguage)\n  {mCodingSM = new nsCodingStateMachine(&SJISSMModel);\n    Reset();}\n  virtual ~nsSJISProber(void){delete mCodingSM;}\n  nsProbingState HandleData(const char* aBuf, PRUint32 aLen);\n  const char* GetCharSetName() {return \"Shift_JIS\";}\n  nsProbingState GetState(void) {return mState;}\n  void      Reset(void);\n  float     GetConfidence(void);\n\nprotected:\n  nsCodingStateMachine* mCodingSM;\n  nsProbingState mState;\n\n  SJISContextAnalysis mContextAnalyser;\n  SJISDistributionAnalysis mDistributionAnalyser;\n\n  char mLastChar[2];\n  bool mIsPreferredLanguage;\n\n};\n\n\n#endif /* nsSJISProber_h__ */\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsUTF8Prober.cpp",
    "content": "/**\n * @file    nsUTF8Prober.cpp\n * @brief   nsUTF8Prober\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include \"nsUTF8Prober.h\"\n\nvoid  nsUTF8Prober::Reset(void)\n{\n  mCodingSM->Reset(); \n  mNumOfMBChar = 0;\n  mState = eDetecting;\n}\n\nnsProbingState nsUTF8Prober::HandleData(const char* aBuf, PRUint32 aLen)\n{\n  nsSMState codingState;\n\n  for (PRUint32 i = 0; i < aLen; i++)\n  {\n    codingState = mCodingSM->NextState(aBuf[i]);\n    if (codingState == eItsMe)\n    {\n      mState = eFoundIt;\n      break;\n    }\n    if (codingState == eStart)\n    {\n      if (mCodingSM->GetCurrentCharLen() >= 2)\n        mNumOfMBChar++;\n    }\n  }\n\n  if (mState == eDetecting)\n    if (GetConfidence() > SHORTCUT_THRESHOLD)\n      mState = eFoundIt;\n  return mState;\n}\n\n//#define ONE_CHAR_PROB   (float)0.50\n/* use the value 0.547 so that the confident value may less than that of Thai when the file is encoded in windows-874 */\n#define ONE_CHAR_PROB   (float)0.547\n\nfloat nsUTF8Prober::GetConfidence(void)\n{\n  float unlike = (float)0.99;\n\n  if (mNumOfMBChar < 6)\n  {\n    for (PRUint32 i = 0; i < mNumOfMBChar; i++)\n      unlike *= ONE_CHAR_PROB;\n    return (float)1.0 - unlike;\n  }\n  else\n    return (float)0.99;\n}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsUTF8Prober.h",
    "content": "/**\n * @file    nsUTF8Prober.h\n * @brief   nsUTF8Prober\n * @license GPL 2.0/LGPL 2.1\n */\n\n\n#ifndef nsUTF8Prober_h__\n#define nsUTF8Prober_h__\n\n#include \"nsCharSetProber.h\"\n#include \"nsCodingStateMachine.h\"\n\nclass nsUTF8Prober: public nsCharSetProber {\npublic:\n  nsUTF8Prober(){mNumOfMBChar = 0; \n                mCodingSM = new nsCodingStateMachine(&UTF8SMModel);\n                Reset(); }\n  virtual ~nsUTF8Prober(){delete mCodingSM;}\n  nsProbingState HandleData(const char* aBuf, PRUint32 aLen);\n  const char* GetCharSetName() {return \"UTF-8\";}\n  nsProbingState GetState(void) {return mState;}\n  void      Reset(void);\n  float     GetConfidence(void);\n\nprotected:\n  nsCodingStateMachine* mCodingSM;\n  nsProbingState mState;\n  PRUint32 mNumOfMBChar;\n};\n\n#endif /* nsUTF8Prober_h__ */\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsUniversalDetector.cpp",
    "content": "/**\n * @file    nsUniversalDetector.cpp\n * @brief   nsUniversalDetector\n * @license GPL 2.0/LGPL 2.1\n */\n\n\n#include \"nscore.h\"\n\n#include \"nsUniversalDetector.h\"\n\n#include \"nsMBCSGroupProber.h\"\n#include \"nsSBCSGroupProber.h\"\n#include \"nsEscCharsetProber.h\"\n#include \"nsLatin1Prober.h\"\n\nnsUniversalDetector::nsUniversalDetector(PRUint32 aLanguageFilter)\n{\n  mDone = false;\n  mBestGuess = -1;   //illegal value as signal\n  mInTag = false;\n  mEscCharSetProber = nsnull;\n\n  mStart = true;\n  mDetectedCharset = nsnull;\n  mGotData = false;\n  mInputState = ePureAscii;\n  mLastChar = '\\0';\n  mLanguageFilter = aLanguageFilter;\n\n  PRUint32 i;\n  for (i = 0; i < NUM_OF_CHARSET_PROBERS; i++)\n    mCharSetProbers[i] = nsnull;\n}\n\nnsUniversalDetector::~nsUniversalDetector() \n{\n  for (PRInt32 i = 0; i < NUM_OF_CHARSET_PROBERS; i++)\n    delete mCharSetProbers[i];\n\n  delete mEscCharSetProber;\n}\n\nvoid \nnsUniversalDetector::Reset()\n{\n  mDone = false;\n  mBestGuess = -1;   //illegal value as signal\n  mInTag = false;\n\n  mStart = true;\n  mDetectedCharset = nsnull;\n  mGotData = false;\n  mInputState = ePureAscii;\n  mLastChar = '\\0';\n\n  if (mEscCharSetProber)\n    mEscCharSetProber->Reset();\n\n  PRUint32 i;\n  for (i = 0; i < NUM_OF_CHARSET_PROBERS; i++)\n    if (mCharSetProbers[i])\n      mCharSetProbers[i]->Reset();\n}\n\n//---------------------------------------------------------------------\n#define SHORTCUT_THRESHOLD      (float)0.95\n#define MINIMUM_THRESHOLD      (float)0.20\n\nnsresult nsUniversalDetector::HandleData(const char* aBuf, PRUint32 aLen)\n{\n  if(mDone) \n    return NS_OK;\n\n  if (aLen > 0)\n    mGotData = true;\n\n  //If the data starts with BOM, we know it is UTF\n  if (mStart)\n  {\n    mStart = false;\n    if (aLen > 2) {\n      switch (aBuf[0])\n        {\n        case '\\xEF':\n          if ((aLen > 2) && ('\\xBB' == aBuf[1]) && ('\\xBF' == aBuf[2]))\n            // EF BB BF  UTF-8 encoded BOM\n            mDetectedCharset = \"UTF-8\";\n        break;\n        case '\\xFE':\n          if ('\\xFF' == aBuf[1])\n            // FE FF  UTF-16, big endian BOM\n            mDetectedCharset = \"UTF-16BE\";\n        break;\n        case '\\xFF':\n          if ('\\xFE' == aBuf[1])\n            // FF FE  UTF-16, little endian BOM\n            mDetectedCharset = \"UTF-16LE\";\n        break;\n      }  // switch\n    }\n      if (mDetectedCharset)\n      {\n        mDone = true;\n        return NS_OK;\n      }\n  }\n\n  PRUint32 i;\n  for (i = 0; i < aLen; i++)\n  {\n    //other than 0xa0, if every othe character is ascii, the page is ascii\n    if ((aBuf[i] & '\\x80') && aBuf[i] != '\\xA0')  //Since many Ascii only page contains NBSP \n    {\n      //we got a non-ascii byte (high-byte)\n      if (mInputState != eHighbyte)\n      {\n        //adjust state\n        mInputState = eHighbyte;\n\n        //kill mEscCharSetProber if it is active\n        if (mEscCharSetProber) {\n          delete mEscCharSetProber;\n          mEscCharSetProber = nsnull;\n        }\n\n        //start multibyte and singlebyte charset prober\n        if (nsnull == mCharSetProbers[0])\n        {\n          mCharSetProbers[0] = new nsMBCSGroupProber(mLanguageFilter);\n          if (nsnull == mCharSetProbers[0])\n            return NS_ERROR_OUT_OF_MEMORY;\n        }\n        if (nsnull == mCharSetProbers[1] &&\n            (mLanguageFilter & NS_FILTER_NON_CJK))\n        {\n          mCharSetProbers[1] = new nsSBCSGroupProber;\n          if (nsnull == mCharSetProbers[1])\n            return NS_ERROR_OUT_OF_MEMORY;\n        }\n        if (nsnull == mCharSetProbers[2])\n        {\n          mCharSetProbers[2] = new nsLatin1Prober; \n          if (nsnull == mCharSetProbers[2])\n            return NS_ERROR_OUT_OF_MEMORY;\n        }\n      }\n    }\n    else\n    {\n      //ok, just pure ascii so far\n      if ( ePureAscii == mInputState &&\n        (aBuf[i] == '\\033' || (aBuf[i] == '{' && mLastChar == '~')) )\n      {\n        //found escape character or HZ \"~{\"\n        mInputState = eEscAscii;\n      }\n      mLastChar = aBuf[i];\n    }\n  }\n\n  nsProbingState st;\n  switch (mInputState)\n  {\n  case eEscAscii:\n    if (nsnull == mEscCharSetProber) {\n      mEscCharSetProber = new nsEscCharSetProber(mLanguageFilter);\n      if (nsnull == mEscCharSetProber)\n        return NS_ERROR_OUT_OF_MEMORY;\n    }\n    st = mEscCharSetProber->HandleData(aBuf, aLen);\n    if (st == eFoundIt)\n    {\n      mDone = true;\n      mDetectedCharset = mEscCharSetProber->GetCharSetName();\n    }\n    break;\n  case eHighbyte:\n    for (i = 0; i < NUM_OF_CHARSET_PROBERS; i++)\n    {\n      if (mCharSetProbers[i])\n      {\n        st = mCharSetProbers[i]->HandleData(aBuf, aLen);\n        if (st == eFoundIt) \n        {\n          mDone = true;\n          mDetectedCharset = mCharSetProbers[i]->GetCharSetName();\n          return NS_OK;\n        }\n      } \n    }\n    break;\n\n  default:  //pure ascii\n    ;//do nothing here\n  }\n  return NS_OK;\n}\n\n\n//---------------------------------------------------------------------\nvoid nsUniversalDetector::DataEnd()\n{\n  if (!mGotData)\n  {\n    // we haven't got any data yet, return immediately \n    // caller program sometimes call DataEnd before anything has been sent to detector\n    return;\n  }\n\n  if (mDetectedCharset)\n  {\n    mDone = true;\n    Report(mDetectedCharset);\n    return;\n  }\n  \n  switch (mInputState)\n  {\n  case eHighbyte:\n    {\n      float proberConfidence;\n      float maxProberConfidence = (float)0.0;\n      PRInt32 maxProber = 0;\n\n      for (PRInt32 i = 0; i < NUM_OF_CHARSET_PROBERS; i++)\n      {\n        if (mCharSetProbers[i])\n        {\n          proberConfidence = mCharSetProbers[i]->GetConfidence();\n          if (proberConfidence > maxProberConfidence)\n          {\n            maxProberConfidence = proberConfidence;\n            maxProber = i;\n          }\n        }\n      }\n      //do not report anything because we are not confident of it, that's in fact a negative answer\n      if (maxProberConfidence > MINIMUM_THRESHOLD)\n        Report(mCharSetProbers[maxProber]->GetCharSetName());\n    }\n    break;\n  case eEscAscii:\n    break;\n  default:\n    ;\n  }\n  return;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nsUniversalDetector.h",
    "content": "/**\n * @file    nsUniversalDetector.h\n * @brief   nsUniversalDetector\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef nsUniversalDetector_h__\n#define nsUniversalDetector_h__\n\nclass nsCharSetProber;\n\n#define NUM_OF_CHARSET_PROBERS  3\n\ntypedef enum {\n  ePureAscii = 0,\n  eEscAscii  = 1,\n  eHighbyte  = 2\n} nsInputState;\n\n#define NS_FILTER_CHINESE_SIMPLIFIED  0x01\n#define NS_FILTER_CHINESE_TRADITIONAL 0x02\n#define NS_FILTER_JAPANESE            0x04\n#define NS_FILTER_KOREAN              0x08\n#define NS_FILTER_NON_CJK             0x10\n#define NS_FILTER_ALL                 0x1F\n#define NS_FILTER_CHINESE (NS_FILTER_CHINESE_SIMPLIFIED | \\\n                           NS_FILTER_CHINESE_TRADITIONAL)\n#define NS_FILTER_CJK (NS_FILTER_CHINESE_SIMPLIFIED | \\\n                       NS_FILTER_CHINESE_TRADITIONAL | \\\n                       NS_FILTER_JAPANESE | \\\n                       NS_FILTER_KOREAN)\n\nclass nsUniversalDetector {\npublic:\n   nsUniversalDetector(PRUint32 aLanguageFilter = NS_FILTER_ALL);\n   virtual ~nsUniversalDetector();\n   virtual nsresult HandleData(const char* aBuf, PRUint32 aLen);\n   virtual void DataEnd(void);\n\nprotected:\n   virtual void Report(const char* aCharset) = 0;\n   virtual void Reset();\n   nsInputState  mInputState;\n   bool    mDone;\n   bool    mInTag;\n   bool    mStart;\n   bool    mGotData;\n   char    mLastChar;\n   const char *  mDetectedCharset;\n   PRInt32 mBestGuess;\n   PRUint32 mLanguageFilter;\n\n   nsCharSetProber  *mCharSetProbers[NUM_OF_CHARSET_PROBERS];\n   nsCharSetProber  *mEscCharSetProber;\n};\n\n#endif\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/nscore.h",
    "content": "/**\n * @file    nscore.h\n * @brief   fake nscore.h\n * @author  Yunhui Fu (yhfudev@gmail.com)\n * @version 1.0\n * @date    2015-01-13\n * @license GPL 2.0/LGPL 2.1\n */\n\n#ifndef __NS_FAKE_CORE_H\n#define __NS_FAKE_CORE_H\n\n#include <stdint.h>\n#include <stddef.h>\n\ntypedef bool     PRBool;\ntypedef int32_t  PRInt32;\ntypedef uint32_t PRUint32;\ntypedef int16_t  PRInt16;\ntypedef uint16_t PRUint16;\ntypedef int8_t   PRInt8;\ntypedef uint8_t  PRUint8;\n\nenum nsresult {\n    NS_OK,\n    NS_ERROR_OUT_OF_MEMORY\n};\n\n#define PR_FALSE false\n#define PR_TRUE  true\n#define nsnull   0\n\n#define NS_ARRAY_LENGTH(a) (sizeof(a)/sizeof((a)[0]))\n\n#endif /* __NS_FAKE_CORE_H */\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/prmem.h",
    "content": "/**\n * @file    prmem.h\n * @brief   fake prmem.h\n * @author  Yunhui Fu (yhfudev@gmail.com)\n * @version 1.0\n * @date    2015-01-13\n * @license GPL 2.0/LGPL 2.1\n */\n#ifndef __NS_FAKE_PRMEM_H\n#define __NS_FAKE_PRMEM_H\n\n#include <stdlib.h>\n\n#define PR_Malloc(length) malloc(length)\n#define PR_FREEIF(p) do { if (p) free(p); } while(0)\n\n#endif /* __NS_FAKE_PRMEM_H */\n"
  },
  {
    "path": "liteidex/src/3rdparty/libucd/src/ucdapi.cpp",
    "content": "/**\n * @file    ucdapi.cpp\n * @brief   charset detection functions\n * @author  Yunhui Fu (yhfudev@gmail.com)\n * @version 1.0\n * @date    2015-01-13\n * @license GPL 2.0/LGPL 2.1\n */\n\n#include <string.h>\n#include <stdlib.h>\n#include <assert.h>\n\n#ifdef _WIN32\n#  include <windows.h>\n#endif\n\n#include \"nscore.h\"\n#include \"nsUniversalDetector.h\"\n\n#include \"libucd.h\"\n\nclass DllDetector : public nsUniversalDetector\n{\nprotected:\n    char *charset_;\n\npublic:\n    DllDetector()\n        : nsUniversalDetector()\n    {\n        charset_ = NULL;\n    }\n\n    virtual ~DllDetector()\n    {\n        if (charset_) free(charset_);\n    }\n\n    virtual void Report(const char* charset)\n    {\n        if (NULL != charset_) {\n            free (charset_);\n        }\n        charset_ = strdup(charset);\n    }\n\n    virtual void Reset()\n    {\n        nsUniversalDetector::Reset();\n        if (NULL != charset_) {\n            free (charset_);\n        }\n        charset_ = NULL;\n    }\n\n    const char* GetCharset() const\n    {\n        return charset_;\n    }\n};\n\n#ifdef _WIN32\nBOOL APIENTRY DllMain( HMODULE hModule,\n                       DWORD  ul_reason_for_call,\n                       LPVOID lpReserved\n                                         )\n{\n    return TRUE;\n}\n#endif\n\nUCD_IMEXPORT\nint ucd_init (ucd_t * pdet)\n{\n    if (!pdet) return UCD_RESULT_NOMEMORY;\n\n    *pdet = reinterpret_cast<ucd_t>(new DllDetector);\n    if (*pdet) {\n        return UCD_RESULT_OK;\n    } else {\n        return UCD_RESULT_NOMEMORY;\n    }\n}\n\n\nUCD_IMEXPORT\nvoid ucd_clear (ucd_t * det)\n{\n    assert (NULL != det);\n    if (*det) {\n        delete reinterpret_cast<DllDetector *>(*det);\n    }\n    *det = NULL;\n}\n\n\nUCD_IMEXPORT\nint ucd_parse (ucd_t * det, const char* data, size_t len)\n{\n    assert (NULL != det);\n    if (*det) {\n        nsresult ret = reinterpret_cast<DllDetector *>(*det)->HandleData(data, (PRUint32)len);\n        if (ret == NS_OK) {\n            return UCD_RESULT_OK;\n        }\n        return UCD_RESULT_NOMEMORY;\n    }\n    return UCD_RESULT_INVALID_DETECTOR;\n}\n\n\nUCD_IMEXPORT\nint ucd_end (ucd_t * det)\n{\n    assert (NULL != det);\n    if (*det) {\n        reinterpret_cast<DllDetector *>(*det)->DataEnd();\n        return UCD_RESULT_OK;\n    }\n    return UCD_RESULT_INVALID_DETECTOR;\n}\n\n\nUCD_IMEXPORT\nint ucd_reset(ucd_t * det)\n{\n    assert (NULL != det);\n    if (*det) {\n        reinterpret_cast<DllDetector *>(*det)->Reset();\n        return UCD_RESULT_OK;\n    }\n    return UCD_RESULT_INVALID_DETECTOR;\n}\n\nUCD_IMEXPORT\nint ucd_results (ucd_t * det, char* namebuf, size_t buflen)\n{\n    assert (NULL != det);\n    if (*det) {\n        if (!namebuf) return UCD_RESULT_NOMEMORY;\n\n        const char* name = reinterpret_cast<DllDetector *>(*det)->GetCharset();\n        if (name == NULL || *name == 0) {\n            // could not detect encoding\n#define CSTR_DEFAULT \"ISO-8859-1\"\n            if (buflen > sizeof(CSTR_DEFAULT)-1) {\n                //*namebuf = 0;\n                strcpy (namebuf, CSTR_DEFAULT);\n                return UCD_RESULT_OK;\n            }\n            return UCD_RESULT_NOMEMORY;\n        }\n        // encoding detected\n        if (buflen >= strlen(name)+1) {\n            strcpy(namebuf, name);\n            return UCD_RESULT_OK;\n        }\n        return UCD_RESULT_NOMEMORY;\n    }\n    return UCD_RESULT_INVALID_DETECTOR;\n}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/CONTRIBUTING",
    "content": "How to Contribute\n-----------------\n\nThe main resources for this library are:\n\n  Launchpad\n    https://launchpad.net/libvterm\n\n  Freenode:\n    ##tty or #tickit on irc.freenode.net\n\n  Email:\n    Paul \"LeoNerd\" Evans <leonerd@leonerd.org.uk>\n\n\nBug reports and feature requests can be sent to any of the above resources.\n\nNew features, bug patches, etc.. should in the first instance be discussed via\nany of the resources listed above, before starting work on the actual code.\nThere may be future plans or development already in-progress that could be\naffected so it is better to discuss the ideas first before starting work\nactually writing any code.\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/LICENSE",
    "content": "\n\nThe MIT License\n\nCopyright (c) 2008 Paul Evans <leonerd@leonerd.org.uk>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/bin/unterm.c",
    "content": "#include <stdio.h>\n#include <string.h>\n\n#include <errno.h>\n#include <fcntl.h>\n#include <getopt.h>\n#include <unistd.h>\n\n#include \"vterm.h\"\n\n#include \"../src/utf8.h\" // fill_utf8\n\n#define streq(a,b) (!strcmp(a,b))\n\nstatic VTerm *vt;\nstatic VTermScreen *vts;\n\nstatic int cols;\nstatic int rows;\n\nstatic enum {\n  FORMAT_PLAIN,\n  FORMAT_SGR,\n} format = FORMAT_PLAIN;\n\nstatic int dump_cell_color(const VTermColor *col, int sgri, int sgr[], int fg)\n{\n    /* Reset the color if the given color is the default color */\n    if (fg && VTERM_COLOR_IS_DEFAULT_FG(col)) {\n        sgr[sgri++] = 39;\n        return sgri;\n    }\n    if (!fg && VTERM_COLOR_IS_DEFAULT_BG(col)) {\n        sgr[sgri++] = 49;\n        return sgri;\n    }\n\n    /* Decide whether to send an indexed color or an RGB color */\n    if (VTERM_COLOR_IS_INDEXED(col)) {\n        const uint8_t idx = col->indexed.idx;\n        if (idx < 8) {\n            sgr[sgri++] = (idx + (fg ? 30 : 40));\n        }\n        else if (idx < 16) {\n            sgr[sgri++] = (idx - 8 + (fg ? 90 : 100));\n        }\n        else {\n            sgr[sgri++] = (fg ? 38 : 48);\n            sgr[sgri++] = 5;\n            sgr[sgri++] = idx;\n        }\n    }\n    else if (VTERM_COLOR_IS_RGB(col)) {\n        sgr[sgri++] = (fg ? 38 : 48);\n        sgr[sgri++] = 2;\n        sgr[sgri++] = col->rgb.red;\n        sgr[sgri++] = col->rgb.green;\n        sgr[sgri++] = col->rgb.blue;\n    }\n    return sgri;\n}\n\nstatic void dump_cell(const VTermScreenCell *cell, const VTermScreenCell *prevcell)\n{\n  switch(format) {\n    case FORMAT_PLAIN:\n      break;\n    case FORMAT_SGR:\n      {\n        // If all 7 attributes change, that means 7 SGRs max\n        // Each colour could consume up to 5 entries\n        int sgr[7 + 2*5]; int sgri = 0;\n\n        if(!prevcell->attrs.bold && cell->attrs.bold)\n          sgr[sgri++] = 1;\n        if(prevcell->attrs.bold && !cell->attrs.bold)\n          sgr[sgri++] = 22;\n\n        if(!prevcell->attrs.underline && cell->attrs.underline)\n          sgr[sgri++] = 4;\n        if(prevcell->attrs.underline && !cell->attrs.underline)\n          sgr[sgri++] = 24;\n\n        if(!prevcell->attrs.italic && cell->attrs.italic)\n          sgr[sgri++] = 3;\n        if(prevcell->attrs.italic && !cell->attrs.italic)\n          sgr[sgri++] = 23;\n\n        if(!prevcell->attrs.blink && cell->attrs.blink)\n          sgr[sgri++] = 5;\n        if(prevcell->attrs.blink && !cell->attrs.blink)\n          sgr[sgri++] = 25;\n\n        if(!prevcell->attrs.reverse && cell->attrs.reverse)\n          sgr[sgri++] = 7;\n        if(prevcell->attrs.reverse && !cell->attrs.reverse)\n          sgr[sgri++] = 27;\n\n        if(!prevcell->attrs.strike && cell->attrs.strike)\n          sgr[sgri++] = 9;\n        if(prevcell->attrs.strike && !cell->attrs.strike)\n          sgr[sgri++] = 29;\n\n        if(!prevcell->attrs.font && cell->attrs.font)\n          sgr[sgri++] = 10 + cell->attrs.font;\n        if(prevcell->attrs.font && !cell->attrs.font)\n          sgr[sgri++] = 10;\n\n        if(!vterm_color_is_equal(&prevcell->fg, &cell->fg)) {\n          sgri = dump_cell_color(&cell->fg, sgri, sgr, 1);\n        }\n\n        if(!vterm_color_is_equal(&prevcell->bg, &cell->bg)) {\n          sgri = dump_cell_color(&cell->bg, sgri, sgr, 0);\n        }\n\n        if(!sgri)\n          break;\n\n        printf(\"\\x1b[\");\n        for(int i = 0; i < sgri; i++)\n          printf(!i               ? \"%d\" :\n              CSI_ARG_HAS_MORE(sgr[i]) ? \":%d\" :\n              \";%d\",\n              CSI_ARG(sgr[i]));\n        printf(\"m\");\n      }\n      break;\n  }\n\n  for(int i = 0; i < VTERM_MAX_CHARS_PER_CELL && cell->chars[i]; i++) {\n    char bytes[6];\n    bytes[fill_utf8(cell->chars[i], bytes)] = 0;\n    printf(\"%s\", bytes);\n  }\n}\n\nstatic void dump_eol(const VTermScreenCell *prevcell)\n{\n  switch(format) {\n    case FORMAT_PLAIN:\n      break;\n    case FORMAT_SGR:\n      if(prevcell->attrs.bold || prevcell->attrs.underline || prevcell->attrs.italic ||\n         prevcell->attrs.blink || prevcell->attrs.reverse || prevcell->attrs.strike ||\n         prevcell->attrs.font)\n        printf(\"\\x1b[m\");\n      break;\n  }\n\n  printf(\"\\n\");\n}\n\nvoid dump_row(int row)\n{\n  VTermPos pos = { .row = row, .col = 0 };\n  VTermScreenCell prevcell = { 0 };\n  vterm_state_get_default_colors(vterm_obtain_state(vt), &prevcell.fg, &prevcell.bg);\n\n  while(pos.col < cols) {\n    VTermScreenCell cell;\n    vterm_screen_get_cell(vts, pos, &cell);\n\n    dump_cell(&cell, &prevcell);\n\n    pos.col += cell.width;\n    prevcell = cell;\n  }\n\n  dump_eol(&prevcell);\n}\n\nstatic int screen_sb_pushline(int cols, const VTermScreenCell *cells, void *user)\n{\n  VTermScreenCell prevcell = { 0 };\n  vterm_state_get_default_colors(vterm_obtain_state(vt), &prevcell.fg, &prevcell.bg);\n\n  for(int col = 0; col < cols; col++) {\n    dump_cell(cells + col, &prevcell);\n    prevcell = cells[col];\n  }\n\n  dump_eol(&prevcell);\n\n  return 1;\n}\n\nstatic int screen_resize(int new_rows, int new_cols, void *user)\n{\n  rows = new_rows;\n  cols = new_cols;\n  return 1;\n}\n\nstatic VTermScreenCallbacks cb_screen = {\n  .sb_pushline = &screen_sb_pushline,\n  .resize      = &screen_resize,\n};\n\nint main(int argc, char *argv[])\n{\n  rows = 25;\n  cols = 80;\n\n  int opt;\n  while((opt = getopt(argc, argv, \"f:l:c:\")) != -1) {\n    switch(opt) {\n      case 'f':\n        if(streq(optarg, \"plain\"))\n          format = FORMAT_PLAIN;\n        else if(streq(optarg, \"sgr\"))\n          format = FORMAT_SGR;\n        else {\n          fprintf(stderr, \"Unrecognised format '%s'\\n\", optarg);\n          exit(1);\n        }\n        break;\n\n      case 'l':\n        rows = atoi(optarg);\n        if(!rows)\n          rows = 25;\n        break;\n\n      case 'c':\n        cols = atoi(optarg);\n        if(!cols)\n          cols = 80;\n        break;\n    }\n  }\n\n  const char *file = argv[optind++];\n  int fd = open(file, O_RDONLY);\n  if(fd == -1) {\n    fprintf(stderr, \"Cannot open %s - %s\\n\", file, strerror(errno));\n    exit(1);\n  }\n\n  vt = vterm_new(rows, cols);\n  vterm_set_utf8(vt, true);\n\n  vts = vterm_obtain_screen(vt);\n  vterm_screen_set_callbacks(vts, &cb_screen, NULL);\n\n  vterm_screen_reset(vts, 1);\n\n  int len;\n  char buffer[1024];\n  while((len = read(fd, buffer, sizeof(buffer))) > 0) {\n    vterm_input_write(vt, buffer, len);\n  }\n\n  for(int row = 0; row < rows; row++) {\n    dump_row(row);\n  }\n\n  close(fd);\n\n  vterm_free(vt);\n\n  return 0;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/bin/vterm-ctrl.c",
    "content": "#define _XOPEN_SOURCE 500  /* strdup */\n\n#include <stdbool.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#define streq(a,b) (strcmp(a,b)==0)\n\n#include <termios.h>\n\nstatic char *getvalue(int *argip, int argc, char *argv[])\n{\n  if(*argip >= argc) {\n    fprintf(stderr, \"Expected an option value\\n\");\n    exit(1);\n  }\n\n  return argv[(*argip)++];\n}\n\nstatic int getchoice(int *argip, int argc, char *argv[], const char *options[])\n{\n  const char *arg = getvalue(argip, argc, argv);\n\n  int value = -1;\n  while(options[++value])\n    if(streq(arg, options[value]))\n      return value;\n\n  fprintf(stderr, \"Unrecognised option value %s\\n\", arg);\n  exit(1);\n}\n\ntypedef enum {\n  OFF,\n  ON,\n  QUERY,\n} BoolQuery;\n\nstatic BoolQuery getboolq(int *argip, int argc, char *argv[])\n{\n  return getchoice(argip, argc, argv, (const char *[]){\"off\", \"on\", \"query\", NULL});\n}\n\nstatic char *helptext[] = {\n  \"reset\",\n  \"s8c1t [off|on]\",\n  \"keypad [app|num]\",\n  \"screen [off|on|query]\",\n  \"cursor [off|on|query]\",\n  \"curblink [off|on|query]\",\n  \"curshape [block|under|bar|query]\",\n  \"mouse [off|click|clickdrag|motion]\",\n  \"reportfocus [off|on|query]\",\n  \"altscreen [off|on|query]\",\n  \"bracketpaste [off|on|query]\",\n  \"icontitle [STR]\",\n  \"icon [STR]\",\n  \"title [STR]\",\n  NULL\n};\n\nstatic bool seticanon(bool icanon, bool echo)\n{\n  struct termios termios;\n\n  tcgetattr(0, &termios);\n\n  bool ret = (termios.c_lflag & ICANON);\n\n  if(icanon) termios.c_lflag |=  ICANON;\n  else       termios.c_lflag &= ~ICANON;\n\n  if(echo) termios.c_lflag |=  ECHO;\n  else     termios.c_lflag &= ~ECHO;\n\n  tcsetattr(0, TCSANOW, &termios);\n\n  return ret;\n}\n\nstatic void await_c1(unsigned char c1)\n{\n  unsigned char c;\n\n  /* await CSI - 8bit or 2byte 7bit form */\n  bool in_esc = false;\n  while((c = getchar())) {\n    if(c == c1)\n      break;\n    if(in_esc && c == (char)(c1 - 0x40))\n      break;\n    if(!in_esc && c == 0x1b)\n      in_esc = true;\n    else\n      in_esc = false;\n  }\n}\n\nstatic char *read_csi()\n{\n  await_c1(0x9B); // CSI\n\n  /* TODO: This really should be a more robust CSI parser\n   */\n  char csi[32];\n  int i = 0;\n  for(; i < sizeof(csi)-1; i++) {\n    char c = csi[i] = getchar();\n    if(c >= 0x40 && c <= 0x7e)\n      break;\n  }\n  csi[++i] = 0;\n\n  // TODO: returns longer than 32?\n\n  return strdup(csi);\n}\n\nstatic char *read_dcs()\n{\n  await_c1(0x90);\n\n  char dcs[32];\n  bool in_esc = false;\n  int i = 0;\n  for(; i < sizeof(dcs)-1; ) {\n    char c = getchar();\n    if(c == 0x9c) // ST\n      break;\n    if(in_esc && c == 0x5c)\n      break;\n    if(!in_esc && c == 0x1b)\n      in_esc = true;\n    else {\n      dcs[i++] = c;\n      in_esc = false;\n    }\n  }\n  dcs[++i] = 0;\n\n  return strdup(dcs);\n}\n\nstatic void usage(int exitcode)\n{\n  fprintf(stderr, \"Control a libvterm-based terminal\\n\"\n      \"\\n\"\n      \"Options:\\n\");\n\n  for(char **p = helptext; *p; p++)\n    fprintf(stderr, \"  %s\\n\", *p);\n\n  exit(exitcode);\n}\n\nstatic bool query_dec_mode(int mode)\n{\n  printf(\"\\x1b[?%d$p\", mode);\n\n  char *s = NULL;\n  do {\n    if(s)\n      free(s);\n    s = read_csi();\n\n    /* expect \"?\" mode \";\" value \"$y\" */\n\n    int reply_mode, reply_value;\n    char reply_cmd;\n    /* If the sscanf format string ends in a literal, we can't tell from\n     * its return value if it matches. Hence we'll %c the cmd and check it\n     * explicitly\n     */\n    if(sscanf(s, \"?%d;%d$%c\", &reply_mode, &reply_value, &reply_cmd) < 3)\n      continue;\n    if(reply_cmd != 'y')\n      continue;\n\n    if(reply_mode != mode)\n      continue;\n\n    free(s);\n\n    if(reply_value == 1 || reply_value == 3)\n      return true;\n    if(reply_value == 2 || reply_value == 4)\n      return false;\n\n    printf(\"Unrecognised reply to DECRQM: %d\\n\", reply_value);\n    return false;\n  } while(1);\n}\n\nstatic void do_dec_mode(int mode, BoolQuery val, const char *name)\n{\n  switch(val) {\n    case OFF:\n    case ON:\n      printf(\"\\x1b[?%d%c\", mode, val == ON ? 'h' : 'l');\n      break;\n\n    case QUERY:\n      if(query_dec_mode(mode))\n        printf(\"%s on\\n\", name);\n      else\n        printf(\"%s off\\n\", name);\n      break;\n  }\n}\n\nstatic int query_rqss_numeric(char *cmd)\n{\n  printf(\"\\x1bP$q%s\\x1b\\\\\", cmd);\n\n  char *s = NULL;\n  do {\n    if(s)\n      free(s);\n    s = read_dcs();\n\n    if(!s)\n      return -1;\n    if(strlen(s) < strlen(cmd))\n      return -1;\n    if(strcmp(s + strlen(s) - strlen(cmd), cmd) != 0) {\n      printf(\"No match\\n\");\n      continue;\n    }\n\n    if(s[0] != '1' || s[1] != '$' || s[2] != 'r')\n      return -1;\n\n    int num;\n    if(sscanf(s + 3, \"%d\", &num) != 1)\n      return -1;\n\n    return num;\n  } while(1);\n}\n\nbool wasicanon;\n\nvoid restoreicanon(void)\n{\n  seticanon(wasicanon, true);\n}\n\nint main(int argc, char *argv[])\n{\n  int argi = 1;\n\n  if(argc == 1)\n    usage(0);\n\n  wasicanon = seticanon(false, false);\n  atexit(restoreicanon);\n\n  while(argi < argc) {\n    const char *arg = argv[argi++];\n\n    if(streq(arg, \"reset\")) {\n      printf(\"\\x1b\" \"c\");\n    }\n    else if(streq(arg, \"s8c1t\")) {\n      switch(getchoice(&argi, argc, argv, (const char *[]){\"off\", \"on\", NULL})) {\n      case 0:\n        printf(\"\\x1b F\"); break;\n      case 1:\n        printf(\"\\x1b G\"); break;\n      }\n    }\n    else if(streq(arg, \"keypad\")) {\n      switch(getchoice(&argi, argc, argv, (const char *[]){\"app\", \"num\", NULL})) {\n      case 0:\n        printf(\"\\x1b=\"); break;\n      case 1:\n        printf(\"\\x1b>\"); break;\n      }\n    }\n    else if(streq(arg, \"screen\")) {\n      do_dec_mode(5, getboolq(&argi, argc, argv), \"screen\");\n    }\n    else if(streq(arg, \"cursor\")) {\n      do_dec_mode(25, getboolq(&argi, argc, argv), \"cursor\");\n    }\n    else if(streq(arg, \"curblink\")) {\n      do_dec_mode(12, getboolq(&argi, argc, argv), \"curblink\");\n    }\n    else if(streq(arg, \"curshape\")) {\n      // TODO: This ought to query the current value of DECSCUSR because it\n      //   may need blinking on or off\n      int shape = getchoice(&argi, argc, argv, (const char *[]){\"block\", \"under\", \"bar\", \"query\", NULL});\n      switch(shape) {\n        case 3: // query\n          shape = query_rqss_numeric(\" q\");\n          switch(shape) {\n            case 1: case 2:\n              printf(\"curshape block\\n\");\n              break;\n            case 3: case 4:\n              printf(\"curshape under\\n\");\n              break;\n            case 5: case 6:\n              printf(\"curshape bar\\n\");\n              break;\n          }\n          break;\n\n        case 0:\n        case 1:\n        case 2:\n          printf(\"\\x1b[%d q\", 1 + (shape * 2));\n          break;\n      }\n    }\n    else if(streq(arg, \"mouse\")) {\n      switch(getchoice(&argi, argc, argv, (const char *[]){\"off\", \"click\", \"clickdrag\", \"motion\", NULL})) {\n      case 0:\n        printf(\"\\x1b[?1000l\"); break;\n      case 1:\n        printf(\"\\x1b[?1000h\"); break;\n      case 2:\n        printf(\"\\x1b[?1002h\"); break;\n      case 3:\n        printf(\"\\x1b[?1003h\"); break;\n      }\n    }\n    else if(streq(arg, \"reportfocus\")) {\n      do_dec_mode(1004, getboolq(&argi, argc, argv), \"reportfocus\");\n    }\n    else if(streq(arg, \"altscreen\")) {\n      do_dec_mode(1049, getboolq(&argi, argc, argv), \"altscreen\");\n    }\n    else if(streq(arg, \"bracketpaste\")) {\n      do_dec_mode(2004, getboolq(&argi, argc, argv), \"bracketpaste\");\n    }\n    else if(streq(arg, \"icontitle\")) {\n      printf(\"\\x1b]0;%s\\a\", getvalue(&argi, argc, argv));\n    }\n    else if(streq(arg, \"icon\")) {\n      printf(\"\\x1b]1;%s\\a\", getvalue(&argi, argc, argv));\n    }\n    else if(streq(arg, \"title\")) {\n      printf(\"\\x1b]2;%s\\a\", getvalue(&argi, argc, argv));\n    }\n    else {\n      fprintf(stderr, \"Unrecognised command %s\\n\", arg);\n      exit(1);\n    }\n  }\n\n  return 0;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/bin/vterm-dump.c",
    "content": "// Require getopt(3)\n#define _XOPEN_SOURCE\n\n#include <stdio.h>\n#include <string.h>\n#define streq(a,b) (strcmp(a,b)==0)\n\n#include <errno.h>\n#include <fcntl.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <unistd.h>\n\n#include \"vterm.h\"\n\nstatic const char *special_begin = \"{\";\nstatic const char *special_end   = \"}\";\n\nstatic int parser_text(const char bytes[], size_t len, void *user)\n{\n  unsigned char *b = (unsigned char *)bytes;\n\n  int i;\n  for(i = 0; i < len; /* none */) {\n    if(b[i] < 0x20)        // C0\n      break;\n    else if(b[i] < 0x80)   // ASCII\n      i++;\n    else if(b[i] < 0xa0)   // C1\n      break;\n    else if(b[i] < 0xc0)   // UTF-8 continuation\n      break;\n    else if(b[i] < 0xe0) { // UTF-8 2-byte\n      // 2-byte UTF-8\n      if(len < i+2) break;\n      i += 2;\n    }\n    else if(b[i] < 0xf0) { // UTF-8 3-byte\n      if(len < i+3) break;\n      i += 3;\n    }\n    else if(b[i] < 0xf8) { // UTF-8 4-byte\n      if(len < i+4) break;\n      i += 4;\n    }\n    else                   // otherwise invalid\n      break;\n  }\n\n  printf(\"%.*s\", i, b);\n  return i;\n}\n\n/* 0     1      2      3       4     5      6      7      8      9      A      B      C      D      E      F    */\nstatic const char *name_c0[] = {\n  \"NUL\", \"SOH\", \"STX\", \"ETX\", \"EOT\", \"ENQ\", \"ACK\", \"BEL\", \"BS\",  \"HT\",  \"LF\",  \"VT\",  \"FF\",  \"CR\",  \"LS0\", \"LS1\",\n  \"DLE\", \"DC1\", \"DC2\", \"DC3\", \"DC4\", \"NAK\", \"SYN\", \"ETB\", \"CAN\", \"EM\",  \"SUB\", \"ESC\", \"FS\",  \"GS\",  \"RS\",  \"US\",\n};\nstatic const char *name_c1[] = {\n  NULL,  NULL,  \"BPH\", \"NBH\", NULL,  \"NEL\", \"SSA\", \"ESA\", \"HTS\", \"HTJ\", \"VTS\", \"PLD\", \"PLU\", \"RI\",  \"SS2\", \"SS3\",\n  \"DCS\", \"PU1\", \"PU2\", \"STS\", \"CCH\", \"MW\",  \"SPA\", \"EPA\", \"SOS\", NULL,  \"SCI\", \"CSI\", \"ST\",  \"OSC\", \"PM\",  \"APC\",\n};\n\nstatic int parser_control(unsigned char control, void *user)\n{\n  if(control < 0x20)\n    printf(\"%s%s%s\", special_begin, name_c0[control], special_end);\n  else if(control >= 0x80 && control < 0xa0 && name_c1[control - 0x80])\n    printf(\"%s%s%s\", special_begin, name_c1[control - 0x80], special_end);\n  else\n    printf(\"%sCONTROL 0x%02x%s\", special_begin, control, special_end);\n\n  if(control == 0x0a)\n    printf(\"\\n\");\n  return 1;\n}\n\nstatic int parser_escape(const char bytes[], size_t len, void *user)\n{\n  if(bytes[0] >= 0x20 && bytes[0] < 0x30) {\n    if(len < 2)\n      return -1;\n    len = 2;\n  }\n  else {\n    len = 1;\n  }\n\n  printf(\"%sESC %.*s%s\", special_begin, (int)len, bytes, special_end);\n\n  return len;\n}\n\n/* 0     1      2      3       4     5      6      7      8      9      A      B      C      D      E      F    */\nstatic const char *name_csi_plain[] = {\n  \"ICH\", \"CUU\", \"CUD\", \"CUF\", \"CUB\", \"CNL\", \"CPL\", \"CHA\", \"CUP\", \"CHT\", \"ED\",  \"EL\",  \"IL\",  \"DL\",  \"EF\",  \"EA\",\n  \"DCH\", \"SSE\", \"CPR\", \"SU\",  \"SD\",  \"NP\",  \"PP\",  \"CTC\", \"ECH\", \"CVT\", \"CBT\", \"SRS\", \"PTX\", \"SDS\", \"SIMD\",NULL,\n  \"HPA\", \"HPR\", \"REP\", \"DA\",  \"VPA\", \"VPR\", \"HVP\", \"TBC\", \"SM\",  \"MC\",  \"HPB\", \"VPB\", \"RM\",  \"SGR\", \"DSR\", \"DAQ\",\n};\n\n/*0           4           8           B         */\nstatic const int newline_csi_plain[] = {\n  0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0,\n};\n\nstatic int parser_csi(const char *leader, const long args[], int argcount, const char *intermed, char command, void *user)\n{\n  const char *name = NULL;\n  if(!leader && !intermed && command < 0x70)\n    name = name_csi_plain[command - 0x40];\n  else if(leader && streq(leader, \"?\") && !intermed) {\n    /* DEC */\n    switch(command) {\n      case 'h': name = \"DECSM\"; break;\n      case 'l': name = \"DECRM\"; break;\n    }\n    if(name)\n      leader = NULL;\n  }\n\n  if(!leader && !intermed && command < 0x70 && newline_csi_plain[command - 0x40])\n    printf(\"\\n\");\n\n  if(name)\n    printf(\"%s%s\", special_begin, name);\n  else\n    printf(\"%sCSI\", special_begin);\n\n  if(leader && leader[0])\n    printf(\" %s\", leader);\n\n  for(int i = 0; i < argcount; i++) {\n    printf(i ? \",\" : \" \");\n\n    if(args[i] == CSI_ARG_MISSING)\n      printf(\"*\");\n    else {\n      while(CSI_ARG_HAS_MORE(args[i]))\n        printf(\"%ld+\", CSI_ARG(args[i++]));\n      printf(\"%ld\", CSI_ARG(args[i]));\n    }\n  }\n\n  if(intermed && intermed[0])\n    printf(\" %s\", intermed);\n\n  if(name)\n    printf(\"%s\", special_end);\n  else\n    printf(\" %c%s\", command, special_end);\n\n  return 1;\n}\n\nstatic int parser_osc(const char *command, size_t cmdlen, void *user)\n{\n  printf(\"%sOSC %.*s%s\", special_begin, (int)cmdlen, command, special_end);\n\n  return 1;\n}\n\nstatic int parser_dcs(const char *command, size_t cmdlen, void *user)\n{\n  printf(\"%sDCS %.*s%s\", special_begin, (int)cmdlen, command, special_end);\n\n  return 1;\n}\n\nstatic VTermParserCallbacks parser_cbs = {\n  .text    = &parser_text,\n  .control = &parser_control,\n  .escape  = &parser_escape,\n  .csi     = &parser_csi,\n  .osc     = &parser_osc,\n  .dcs     = &parser_dcs,\n};\n\nint main(int argc, char *argv[])\n{\n  int use_colour = isatty(1);\n\n  int opt;\n  while((opt = getopt(argc, argv, \"c\")) != -1) {\n    switch(opt) {\n      case 'c': use_colour = 1; break;\n    }\n  }\n\n  const char *file = argv[optind++];\n\n  int fd;\n  if(!file || streq(file, \"-\"))\n    fd = 0; // stdin\n  else {\n    fd = open(file, O_RDONLY);\n    if(fd == -1) {\n      fprintf(stderr, \"Cannot open %s - %s\\n\", file, strerror(errno));\n      exit(1);\n    }\n  }\n\n  if(use_colour) {\n    special_begin = \"\\x1b[7m{\";\n    special_end   = \"}\\x1b[m\";\n  }\n\n  /* Size matters not for the parser */\n  VTerm *vt = vterm_new(25, 80);\n  vterm_set_utf8(vt, 1);\n  vterm_parser_set_callbacks(vt, &parser_cbs, NULL);\n\n  int len;\n  char buffer[1024];\n  while((len = read(fd, buffer, sizeof(buffer))) > 0) {\n    vterm_input_write(vt, buffer, len);\n  }\n\n  printf(\"\\n\");\n\n  close(fd);\n  vterm_free(vt);\n\n  return 0;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/doc/URLs",
    "content": "ECMA-48:\n  http://www.ecma-international.org/publications/standards/Ecma-048.htm\n\nXterm Control Sequences:\n  http://invisible-island.net/xterm/ctlseqs/ctlseqs.html\n\nDigital VT100 User Guide:\n  http://vt100.net/docs/vt100-ug/\n\nDigital VT220 Programmer Reference Manual\n  http://vt100.net/docs/vt220-rm/\n\nSummary of ANSI standards for ASCII terminals\n  http://www.inwap.com/pdp10/ansicode.txt\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/doc/seqs.txt",
    "content": "Sequences documented in parens are implicit ones from parser.c, which move\nbetween states.\n\n1 = VT100\n2 = VT220\n3 = VT320\n\n   C0 controls\n\n123   0x00             = NUL\n123   0x07             = BEL\n123   0x08             = BS\n123   0x09             = HT\n123   0x0A             = LF\n123   0x0B             = VT\n123   0x0C             = FF\n123   0x0D             = CR\n123   0x0E             = LS1\n123   0x0F             = LS0\n     (0x18             = CAN)\n     (0x1A             = SUB)\n     (0x1B             = ESC)\n\n123   0x7f             = DEL (ignored)\n\n   C1 controls\n\n123   0x84             = IND\n123   0x85             = NEL\n123   0x88             = HTS\n123   0x8D             = RI\n 23   0x8e             = SS2\n 23   0x8f             = SS3\n     (0x90             = DCS)\n     (0x9B             = CSI)\n     (0x9C             = ST)\n     (0x9D             = OSC)\n\n   Escape sequences\n    - excluding sequences that are C1 aliases\n\n123   ESC ()           = SCS, select character set (G0, G1)\n 23   ESC *+           = SCS, select character set (G2, G3)\n123   ESC 7            = DECSC - save cursor\n123   ESC 8            = DECRC - restore cursor\n123   ESC # 3          = DECDHL, double-height line (top half)\n123   ESC # 4          = DECDHL, double-height line (bottom half)\n123   ESC # 5          = DECSWL, single-width single-height line\n123   ESC # 6          = DECDWL, double-width single-height line\n123   ESC # 8          = DECALN\n123   ESC <            = Ignored (used by VT100 to exit VT52 mode)\n123   ESC =            = DECKPAM, keypad application mode\n123   ESC >            = DECKPNM, keypad numeric mode\n 23   ESC Sp F         = S7C1T\n 23   ESC Sp G         = S8C1T\n     (ESC P            = DCS)\n     (ESC [            = CSI)\n     (ESC \\            = ST)\n     (ESC ]            = OSC)\n123   ESC c            = RIS, reset initial state\n  3   ESC n            = LS2\n  3   ESC o            = LS3\n  3   ESC ~            = LS1R\n  3   ESC }            = LS2R\n  3   ESC |            = LS3R\n\n   DCSes\n\n  3   DCS $ q      ST  = DECRQSS\n  3           m        =   Request SGR\n              Sp q     =   Request DECSCUSR\n  3           \" q      =   Request DECSCA\n  3           r        =   Request DECSTBM\n              s        =   Request DECSLRM\n\n   CSIs\n 23   CSI @            = ICH\n123   CSI A            = CUU\n123   CSI B            = CUD\n123   CSI C            = CUF\n123   CSI D            = CUB\n      CSI E            = CNL\n      CSI F            = CPL\n      CSI G            = CHA\n123   CSI H            = CUP\n      CSI I            = CHT\n123   CSI J            = ED\n 23   CSI ? J          = DECSED, selective erase in display\n123   CSI K            = EL\n 23   CSI ? K          = DECSEL, selective erase in line\n 23   CSI L            = IL\n 23   CSI M            = DL\n 23   CSI P            = DCH\n      CSI S            = SU\n      CSI T            = SD\n 23   CSI X            = ECH\n      CSI Z            = CBT\n      CSI `            = HPA\n      CSI a            = HPR\n      CSI b            = REP\n123   CSI   c          = DA, device attributes\n123       0            =   DA\n 23   CSI >   c        = DECSDA\n 23         0          =   SDA\n      CSI d            = VPA\n      CSI e            = VPR\n123   CSI f            = HVP\n123   CSI g            = TBC\n123   CSI h            = SM, Set mode\n123   CSI ? h          = DECSM, DEC set mode\n      CSI j            = HPB\n      CSI k            = VPB\n123   CSI l            = RM, Reset mode\n123   CSI ? l          = DECRM, DEC reset mode\n123   CSI m            = SGR, Set Graphic Rendition\n123   CSI   n          = DSR, Device Status Report\n 23       5            =   operating status\n 23       6            =   CPR = cursor position\n 23   CSI ? n          = DECDSR; behaves as DSR but uses CSI ? instead of CSI to respond\n 23   CSI ! p          = DECSTR, soft terminal reset\n  3   CSI ? $ p        = DECRQM, request mode\n      CSI   Sp q       = DECSCUSR (odd numbers blink, even numbers solid)\n          1 or 2       =   block\n          3 or 4       =   underline\n          5 or 6       =   I-beam to left\n 23   CSI \" q          = DECSCA, select character attributes\n123   CSI r            = DECSTBM\n      CSI s            = DECSLRM\n      CSI ' }          = DECIC\n      CSI ' ~          = DECDC\n\n   OSCs\n\n      OSC 0;           = Set icon name and title\n      OSC 1;           = Set icon name\n      OSC 2;           = Set title\n\n   Standard modes\n\n 23   SM 4             = IRM\n123   SM 20            = NLM, linefeed/newline\n\n   DEC modes\n\n123   DECSM 1          = DECCKM, cursor keys\n123   DECSM 5          = DECSCNM, screen\n123   DECSM 6          = DECOM, origin\n123   DECSM 7          = DECAWM, autowrap\n      DECSM 12         = Cursor blink\n 23   DECSM 25         = DECTCEM, text cursor enable\n      DECSM 69         = DECVSSM, vertical screen split\n      DECSM 1000       = Mouse click/release tracking\n      DECSM 1002       = Mouse click/release/drag tracking\n      DECSM 1003       = Mouse all movements tracking\n      DECSM 1004       = Focus in/out reporting\n      DECSM 1005       = Mouse protocol extended (UTF-8) - not recommended\n      DECSM 1006       = Mouse protocol SGR\n      DECSM 1015       = Mouse protocol rxvt\n      DECSM 1047       = Altscreen\n      DECSM 1048       = Save cursor\n      DECSM 1049       = 1047 + 1048\n      DECSM 2004       = Bracketed paste\n\n   Graphic Renditions\n\n123   SGR 0            = Reset\n123   SGR 1            = Bold on\n      SGR 3            = Italic on\n123   SGR 4            = Underline single\n      SGR 4:x          = Underline style\n123   SGR 5            = Blink on\n123   SGR 7            = Reverse on\n      SGR 9            = Strikethrough on\n      SGR 10-19        = Select font\n      SGR 21           = Underline double\n 23   SGR 22           = Bold off\n      SGR 23           = Italic off\n 23   SGR 24           = Underline off\n 23   SGR 25           = Blink off\n 23   SGR 27           = Reverse off\n      SGR 29           = Strikethrough off\n      SGR 30-37        = Foreground ANSI\n      SGR 38           = Foreground alternative palette\n      SGR 39           = Foreground default\n      SGR 40-47        = Background ANSI\n      SGR 48           = Background alternative palette\n      SGR 49           = Background default\n      SGR 90-97        = Foreground ANSI high-intensity\n      SGR 100-107      = Background ANSI high-intensity\n\nThe state storage used by ESC 7 and DECSM 1048/1049 is shared.\n\n   Unimplemented sequences:\n\nThe following sequences are not recognised by libvterm.\n\n123   0x05             = ENQ\n  3   0x11             = DC1 (XON)\n  3   0x13             = DC3 (XOFF)\n12    ESC Z            = DECID, identify terminal\n      DCS $ q          = [DECRQSS]\n  3           \" p      =   Request DECSCL\n  3           $ }      =   Request DECSASD\n  3           $ ~      =   Request DECSSDT\n 23   DCS {            = DECDLD, down-line-loadable character set\n 23   DCS |            = DECUDK, user-defined key\n 23   CSI i            = DEC printer control\n 23   CSI \" p          = DECSCL, set compatibility level\n1     CSI q            = DECLL, load LEDs\n  3   CSI   $ u        = DECRQTSR, request terminal state report\n  3       1            =   terminal state report\n  3   CSI & u          = DECRQUPSS, request user-preferred supplemental set\n  3   CSI   $ w        = DECRQPSR, request presentation state report\n  3       1            =   cursor information report\n  3       2            =   tab stop report\n1     CSI x            = DECREQTPARM, request terminal parameters\n123   CSI y            = DECTST, invoke confidence test\n  3   CSI $ }          = DECSASD, select active status display\n  3   CSI $ ~          = DECSSDT, select status line type\n 23   SM 2             = KAM, keyboard action\n123   SM 12            = SRM, send/receive\n123   DECSM 2          = DECANM, ANSI/VT52\n123   DECSM 3          = DECCOLM, 132 column\n123   DECSM 4          = DECSCLM, scrolling\n123   DECSM 8          = DECARM, auto-repeat\n12    DECSM 9          = DECINLM, interlace\n 23   DECSM 18         = DECPFF, print form feed\n 23   DECSM 19         = DECPEX, print extent\n 23   DECSM 42         = DECNRCM, national/multinational character\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/find-wide-chars.pl",
    "content": "#!/usr/bin/perl\n\nuse strict;\nuse warnings;\n\nuse Unicode::UCD qw( charprop );\n\nSTDOUT->autoflush(1);\n\nsub iswide\n{\n   my ( $cp ) = @_;\n\n   my $width = charprop( $cp, \"East_Asian_Width\" ) or return;\n   return $width eq \"Wide\" || $width eq \"Fullwidth\";\n}\n\nmy ( $start, $end );\nforeach my $cp ( 0 .. 0x1FFFF ) {\n   iswide($cp) or next;\n\n   if( defined $end and $end == $cp-1 ) {\n      # extend the range\n      $end = $cp;\n      next;\n   }\n\n   # start a new range\n   printf \"  { %#04x, %#04x },\\n\", $start, $end if defined $start;\n\n   $start = $end = $cp;\n}\n\nprintf \"  { %#04x, %#04x },\\n\", $start, $end if defined $start;\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/include/vterm.h",
    "content": "#ifndef __VTERM_H__\n#define __VTERM_H__\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include <stdint.h>\n#include <stdlib.h>\n#include <stdbool.h>\n\n#include \"vterm_keycodes.h\"\n\n#define VTERM_VERSION_MAJOR 0\n#define VTERM_VERSION_MINOR 1\n\n#define VTERM_CHECK_VERSION \\\n        vterm_check_version(VTERM_VERSION_MAJOR, VTERM_VERSION_MINOR)\n\ntypedef struct VTerm VTerm;\ntypedef struct VTermState VTermState;\ntypedef struct VTermScreen VTermScreen;\n\ntypedef struct {\n  int row;\n  int col;\n} VTermPos;\n\n/* some small utility functions; we can just keep these static here */\n\n/* order points by on-screen flow order */\nstatic inline int vterm_pos_cmp(VTermPos a, VTermPos b)\n{\n  return (a.row == b.row) ? a.col - b.col : a.row - b.row;\n}\n\ntypedef struct {\n  int start_row;\n  int end_row;\n  int start_col;\n  int end_col;\n} VTermRect;\n\n/* true if the rect contains the point */\nstatic inline int vterm_rect_contains(VTermRect r, VTermPos p)\n{\n  return p.row >= r.start_row && p.row < r.end_row &&\n         p.col >= r.start_col && p.col < r.end_col;\n}\n\n/* move a rect */\nstatic inline void vterm_rect_move(VTermRect *rect, int row_delta, int col_delta)\n{\n  rect->start_row += row_delta; rect->end_row += row_delta;\n  rect->start_col += col_delta; rect->end_col += col_delta;\n}\n\n/**\n * Bit-field describing the content of the tagged union `VTermColor`.\n */\ntypedef enum {\n  /**\n   * If the lower bit of `type` is not set, the colour is 24-bit RGB.\n   */\n  VTERM_COLOR_RGB = 0x00,\n\n  /**\n   * The colour is an index into a palette of 256 colours.\n   */\n  VTERM_COLOR_INDEXED = 0x01,\n\n  /**\n   * Mask that can be used to extract the RGB/Indexed bit.\n   */\n  VTERM_COLOR_TYPE_MASK = 0x01,\n\n  /**\n   * If set, indicates that this colour should be the default foreground\n   * color, i.e. there was no SGR request for another colour. When\n   * rendering this colour it is possible to ignore \"idx\" and just use a\n   * colour that is not in the palette.\n   */\n  VTERM_COLOR_DEFAULT_FG = 0x02,\n\n  /**\n   * If set, indicates that this colour should be the default background\n   * color, i.e. there was no SGR request for another colour. A common\n   * option when rendering this colour is to not render a background at\n   * all, for example by rendering the window transparently at this spot.\n   */\n  VTERM_COLOR_DEFAULT_BG = 0x04,\n\n  /**\n   * Mask that can be used to extract the default foreground/background bit.\n   */\n  VTERM_COLOR_DEFAULT_MASK = 0x06\n} VTermColorType;\n\n/**\n * Returns true if the VTERM_COLOR_RGB `type` flag is set, indicating that the\n * given VTermColor instance is an indexed colour.\n */\n#define VTERM_COLOR_IS_INDEXED(col) \\\n  (((col)->type & VTERM_COLOR_TYPE_MASK) == VTERM_COLOR_INDEXED)\n\n/**\n * Returns true if the VTERM_COLOR_INDEXED `type` flag is set, indicating that\n * the given VTermColor instance is an rgb colour.\n */\n#define VTERM_COLOR_IS_RGB(col) \\\n  (((col)->type & VTERM_COLOR_TYPE_MASK) == VTERM_COLOR_RGB)\n\n/**\n * Returns true if the VTERM_COLOR_DEFAULT_FG `type` flag is set, indicating\n * that the given VTermColor instance corresponds to the default foreground\n * color.\n */\n#define VTERM_COLOR_IS_DEFAULT_FG(col) \\\n  (!!((col)->type & VTERM_COLOR_DEFAULT_FG))\n\n/**\n * Returns true if the VTERM_COLOR_DEFAULT_BG `type` flag is set, indicating\n * that the given VTermColor instance corresponds to the default background\n * color.\n */\n#define VTERM_COLOR_IS_DEFAULT_BG(col) \\\n  (!!((col)->type & VTERM_COLOR_DEFAULT_BG))\n\n/**\n * Tagged union storing either an RGB color or an index into a colour palette.\n * In order to convert indexed colours to RGB, you may use the\n * vterm_state_convert_color_to_rgb() or vterm_screen_convert_color_to_rgb()\n * functions which lookup the RGB colour from the palette maintained by a\n * VTermState or VTermScreen instance.\n */\ntypedef union {\n  /**\n   * Tag indicating which union member is actually valid. This variable\n   * coincides with the `type` member of the `rgb` and the `indexed` struct\n   * in memory. Please use the `VTERM_COLOR_IS_*` test macros to check whether\n   * a particular type flag is set.\n   */\n  uint8_t type;\n\n  /**\n   * Valid if `VTERM_COLOR_IS_RGB(type)` is true. Holds the RGB colour values.\n   */\n  struct {\n    /**\n     * Same as the top-level `type` member stored in VTermColor.\n     */\n    uint8_t type;\n\n    /**\n     * The actual 8-bit red, green, blue colour values.\n     */\n    uint8_t red, green, blue;\n  } rgb;\n\n  /**\n   * If `VTERM_COLOR_IS_INDEXED(type)` is true, this member holds the index into\n   * the colour palette.\n   */\n  struct {\n    /**\n     * Same as the top-level `type` member stored in VTermColor.\n     */\n    uint8_t type;\n\n    /**\n     * Index into the colour map.\n     */\n    uint8_t idx;\n  } indexed;\n} VTermColor;\n\n/**\n * Constructs a new VTermColor instance representing the given RGB values.\n */\nstatic inline void vterm_color_rgb(VTermColor *col, uint8_t red, uint8_t green,\n                                   uint8_t blue)\n{\n  col->type = VTERM_COLOR_RGB;\n  col->rgb.red   = red;\n  col->rgb.green = green;\n  col->rgb.blue  = blue;\n}\n\n/**\n * Construct a new VTermColor instance representing an indexed color with the\n * given index.\n */\nstatic inline void vterm_color_indexed(VTermColor *col, uint8_t idx)\n{\n  col->type = VTERM_COLOR_INDEXED;\n  col->indexed.idx = idx;\n}\n\n/**\n * Compares two colours. Returns true if the colors are equal, false otherwise.\n */\nint vterm_color_is_equal(const VTermColor *a, const VTermColor *b);\n\ntypedef enum {\n  /* VTERM_VALUETYPE_NONE = 0 */\n  VTERM_VALUETYPE_BOOL = 1,\n  VTERM_VALUETYPE_INT,\n  VTERM_VALUETYPE_STRING,\n  VTERM_VALUETYPE_COLOR,\n\n  VTERM_N_VALUETYPES\n} VTermValueType;\n\ntypedef union {\n  int boolean;\n  int number;\n  char *string;\n  VTermColor color;\n} VTermValue;\n\ntypedef enum {\n  /* VTERM_ATTR_NONE = 0 */\n  VTERM_ATTR_BOLD = 1,   // bool:   1, 22\n  VTERM_ATTR_UNDERLINE,  // number: 4, 21, 24\n  VTERM_ATTR_ITALIC,     // bool:   3, 23\n  VTERM_ATTR_BLINK,      // bool:   5, 25\n  VTERM_ATTR_REVERSE,    // bool:   7, 27\n  VTERM_ATTR_STRIKE,     // bool:   9, 29\n  VTERM_ATTR_FONT,       // number: 10-19\n  VTERM_ATTR_FOREGROUND, // color:  30-39 90-97\n  VTERM_ATTR_BACKGROUND, // color:  40-49 100-107\n\n  VTERM_N_ATTRS\n} VTermAttr;\n\ntypedef enum {\n  /* VTERM_PROP_NONE = 0 */\n  VTERM_PROP_CURSORVISIBLE = 1, // bool\n  VTERM_PROP_CURSORBLINK,       // bool\n  VTERM_PROP_ALTSCREEN,         // bool\n  VTERM_PROP_TITLE,             // string\n  VTERM_PROP_ICONNAME,          // string\n  VTERM_PROP_REVERSE,           // bool\n  VTERM_PROP_CURSORSHAPE,       // number\n  VTERM_PROP_MOUSE,             // number\n\n  VTERM_N_PROPS\n} VTermProp;\n\nenum {\n  VTERM_PROP_CURSORSHAPE_BLOCK = 1,\n  VTERM_PROP_CURSORSHAPE_UNDERLINE,\n  VTERM_PROP_CURSORSHAPE_BAR_LEFT,\n\n  VTERM_N_PROP_CURSORSHAPES\n};\n\nenum {\n  VTERM_PROP_MOUSE_NONE = 0,\n  VTERM_PROP_MOUSE_CLICK,\n  VTERM_PROP_MOUSE_DRAG,\n  VTERM_PROP_MOUSE_MOVE,\n\n  VTERM_N_PROP_MOUSES\n};\n\ntypedef struct {\n  const uint32_t *chars;\n  int             width;\n  unsigned int    protected_cell:1;  /* DECSCA-protected against DECSEL/DECSED */\n  unsigned int    dwl:1;             /* DECDWL or DECDHL double-width line */\n  unsigned int    dhl:2;             /* DECDHL double-height line (1=top 2=bottom) */\n} VTermGlyphInfo;\n\ntypedef struct {\n  unsigned int    doublewidth:1;     /* DECDWL or DECDHL line */\n  unsigned int    doubleheight:2;    /* DECDHL line (1=top 2=bottom) */\n} VTermLineInfo;\n\ntypedef struct {\n  /* libvterm relies on this memory to be zeroed out before it is returned\n   * by the allocator. */\n  void *(*malloc)(size_t size, void *allocdata);\n  void  (*free)(void *ptr, void *allocdata);\n} VTermAllocatorFunctions;\n\nvoid vterm_check_version(int major, int minor);\n\nVTerm *vterm_new(int rows, int cols);\nVTerm *vterm_new_with_allocator(int rows, int cols, VTermAllocatorFunctions *funcs, void *allocdata);\nvoid   vterm_free(VTerm* vt);\n\nvoid vterm_get_size(const VTerm *vt, int *rowsp, int *colsp);\nvoid vterm_set_size(VTerm *vt, int rows, int cols);\n\nint  vterm_get_utf8(const VTerm *vt);\nvoid vterm_set_utf8(VTerm *vt, int is_utf8);\n\nsize_t vterm_input_write(VTerm *vt, const char *bytes, size_t len);\n\n/* Setting output callback will override the buffer logic */\ntypedef void VTermOutputCallback(const char *s, size_t len, void *user);\nvoid vterm_output_set_callback(VTerm *vt, VTermOutputCallback *func, void *user);\n\n/* These buffer functions only work if output callback is NOT set\n * These are deprecated and will be removed in a later version */\nsize_t vterm_output_get_buffer_size(const VTerm *vt);\nsize_t vterm_output_get_buffer_current(const VTerm *vt);\nsize_t vterm_output_get_buffer_remaining(const VTerm *vt);\n\n/* This too */\nsize_t vterm_output_read(VTerm *vt, char *buffer, size_t len);\n\nvoid vterm_keyboard_unichar(VTerm *vt, uint32_t c, VTermModifier mod);\nvoid vterm_keyboard_key(VTerm *vt, VTermKey key, VTermModifier mod);\n\nvoid vterm_keyboard_start_paste(VTerm *vt);\nvoid vterm_keyboard_end_paste(VTerm *vt);\n\nvoid vterm_mouse_move(VTerm *vt, int row, int col, VTermModifier mod);\nvoid vterm_mouse_button(VTerm *vt, int button, bool pressed, VTermModifier mod);\n\n// ------------\n// Parser layer\n// ------------\n\n/* Flag to indicate non-final subparameters in a single CSI parameter.\n * Consider\n *   CSI 1;2:3:4;5a\n * 1 4 and 5 are final.\n * 2 and 3 are non-final and will have this bit set\n *\n * Don't confuse this with the final byte of the CSI escape; 'a' in this case.\n */\n#define CSI_ARG_FLAG_MORE (1U<<31)\n#define CSI_ARG_MASK      (~(1U<<31))\n\n#define CSI_ARG_HAS_MORE(a) ((a) & CSI_ARG_FLAG_MORE)\n#define CSI_ARG(a)          ((a) & CSI_ARG_MASK)\n\n/* Can't use -1 to indicate a missing argument; use this instead */\n#define CSI_ARG_MISSING ((1UL<<31)-1)\n\n#define CSI_ARG_IS_MISSING(a) (CSI_ARG(a) == CSI_ARG_MISSING)\n#define CSI_ARG_OR(a,def)     (CSI_ARG(a) == CSI_ARG_MISSING ? (def) : CSI_ARG(a))\n#define CSI_ARG_COUNT(a)      (CSI_ARG(a) == CSI_ARG_MISSING || CSI_ARG(a) == 0 ? 1 : CSI_ARG(a))\n\ntypedef struct {\n  int (*text)(const char *bytes, size_t len, void *user);\n  int (*control)(unsigned char control, void *user);\n  int (*escape)(const char *bytes, size_t len, void *user);\n  int (*csi)(const char *leader, const long args[], int argcount, const char *intermed, char command, void *user);\n  int (*osc)(const char *command, size_t cmdlen, void *user);\n  int (*dcs)(const char *command, size_t cmdlen, void *user);\n  int (*resize)(int rows, int cols, void *user);\n} VTermParserCallbacks;\n\nvoid  vterm_parser_set_callbacks(VTerm *vt, const VTermParserCallbacks *callbacks, void *user);\nvoid *vterm_parser_get_cbdata(VTerm *vt);\n\n// -----------\n// State layer\n// -----------\n\ntypedef struct {\n  int (*putglyph)(VTermGlyphInfo *info, VTermPos pos, void *user);\n  int (*movecursor)(VTermPos pos, VTermPos oldpos, int visible, void *user);\n  int (*scrollrect)(VTermRect rect, int downward, int rightward, void *user);\n  int (*moverect)(VTermRect dest, VTermRect src, void *user);\n  int (*erase)(VTermRect rect, int selective, void *user);\n  int (*initpen)(void *user);\n  int (*setpenattr)(VTermAttr attr, VTermValue *val, void *user);\n  int (*settermprop)(VTermProp prop, VTermValue *val, void *user);\n  int (*bell)(void *user);\n  int (*resize)(int rows, int cols, VTermPos *delta, void *user);\n  int (*setlineinfo)(int row, const VTermLineInfo *newinfo, const VTermLineInfo *oldinfo, void *user);\n} VTermStateCallbacks;\n\nVTermState *vterm_obtain_state(VTerm *vt);\n\nvoid  vterm_state_set_callbacks(VTermState *state, const VTermStateCallbacks *callbacks, void *user);\nvoid *vterm_state_get_cbdata(VTermState *state);\n\n// Only invokes control, csi, osc, dcs\nvoid  vterm_state_set_unrecognised_fallbacks(VTermState *state, const VTermParserCallbacks *fallbacks, void *user);\nvoid *vterm_state_get_unrecognised_fbdata(VTermState *state);\n\nvoid vterm_state_reset(VTermState *state, int hard);\nvoid vterm_state_get_cursorpos(const VTermState *state, VTermPos *cursorpos);\nvoid vterm_state_get_default_colors(const VTermState *state, VTermColor *default_fg, VTermColor *default_bg);\nvoid vterm_state_get_palette_color(const VTermState *state, int index, VTermColor *col);\nvoid vterm_state_set_default_colors(VTermState *state, const VTermColor *default_fg, const VTermColor *default_bg);\nvoid vterm_state_set_palette_color(VTermState *state, int index, const VTermColor *col);\nvoid vterm_state_set_bold_highbright(VTermState *state, int bold_is_highbright);\nint  vterm_state_get_penattr(const VTermState *state, VTermAttr attr, VTermValue *val);\nint  vterm_state_set_termprop(VTermState *state, VTermProp prop, VTermValue *val);\nvoid vterm_state_focus_in(VTermState *state);\nvoid vterm_state_focus_out(VTermState *state);\nconst VTermLineInfo *vterm_state_get_lineinfo(const VTermState *state, int row);\n\n/**\n * Makes sure that the given color `col` is indeed an RGB colour. After this\n * function returns, VTERM_COLOR_IS_RGB(col) will return true, while all other\n * flags stored in `col->type` will have been reset.\n *\n * @param state is the VTermState instance from which the colour palette should\n * be extracted.\n * @param col is a pointer at the VTermColor instance that should be converted\n * to an RGB colour.\n */\nvoid vterm_state_convert_color_to_rgb(const VTermState *state, VTermColor *col);\n\n// ------------\n// Screen layer\n// ------------\n\ntypedef struct {\n    unsigned int bold      : 1;\n    unsigned int underline : 2;\n    unsigned int italic    : 1;\n    unsigned int blink     : 1;\n    unsigned int reverse   : 1;\n    unsigned int strike    : 1;\n    unsigned int font      : 4; /* 0 to 9 */\n    unsigned int dwl       : 1; /* On a DECDWL or DECDHL line */\n    unsigned int dhl       : 2; /* On a DECDHL line (1=top 2=bottom) */\n} VTermScreenCellAttrs;\n\nenum {\n  VTERM_UNDERLINE_OFF,\n  VTERM_UNDERLINE_SINGLE,\n  VTERM_UNDERLINE_DOUBLE,\n  VTERM_UNDERLINE_CURLY,\n};\n\ntypedef struct {\n#define VTERM_MAX_CHARS_PER_CELL 6\n  uint32_t chars[VTERM_MAX_CHARS_PER_CELL];\n  char     width;\n  VTermScreenCellAttrs attrs;\n  VTermColor fg, bg;\n} VTermScreenCell;\n\ntypedef struct {\n  int (*damage)(VTermRect rect, void *user);\n  int (*moverect)(VTermRect dest, VTermRect src, void *user);\n  int (*movecursor)(VTermPos pos, VTermPos oldpos, int visible, void *user);\n  int (*settermprop)(VTermProp prop, VTermValue *val, void *user);\n  int (*bell)(void *user);\n  int (*resize)(int rows, int cols, void *user);\n  int (*sb_pushline)(int cols, const VTermScreenCell *cells, void *user);\n  int (*sb_popline)(int cols, VTermScreenCell *cells, void *user);\n} VTermScreenCallbacks;\n\nVTermScreen *vterm_obtain_screen(VTerm *vt);\n\nvoid  vterm_screen_set_callbacks(VTermScreen *screen, const VTermScreenCallbacks *callbacks, void *user);\nvoid *vterm_screen_get_cbdata(VTermScreen *screen);\n\n// Only invokes control, csi, osc, dcs\nvoid  vterm_screen_set_unrecognised_fallbacks(VTermScreen *screen, const VTermParserCallbacks *fallbacks, void *user);\nvoid *vterm_screen_get_unrecognised_fbdata(VTermScreen *screen);\n\nvoid vterm_screen_enable_altscreen(VTermScreen *screen, int altscreen);\n\ntypedef enum {\n  VTERM_DAMAGE_CELL,    /* every cell */\n  VTERM_DAMAGE_ROW,     /* entire rows */\n  VTERM_DAMAGE_SCREEN,  /* entire screen */\n  VTERM_DAMAGE_SCROLL,  /* entire screen + scrollrect */\n\n  VTERM_N_DAMAGES\n} VTermDamageSize;\n\nvoid vterm_screen_flush_damage(VTermScreen *screen);\nvoid vterm_screen_set_damage_merge(VTermScreen *screen, VTermDamageSize size);\n\nvoid   vterm_screen_reset(VTermScreen *screen, int hard);\n\n/* Neither of these functions NUL-terminate the buffer */\nsize_t vterm_screen_get_chars(const VTermScreen *screen, uint32_t *chars, size_t len, const VTermRect rect);\nsize_t vterm_screen_get_text(const VTermScreen *screen, char *str, size_t len, const VTermRect rect);\n\ntypedef enum {\n  VTERM_ATTR_BOLD_MASK       = 1 << 0,\n  VTERM_ATTR_UNDERLINE_MASK  = 1 << 1,\n  VTERM_ATTR_ITALIC_MASK     = 1 << 2,\n  VTERM_ATTR_BLINK_MASK      = 1 << 3,\n  VTERM_ATTR_REVERSE_MASK    = 1 << 4,\n  VTERM_ATTR_STRIKE_MASK     = 1 << 5,\n  VTERM_ATTR_FONT_MASK       = 1 << 6,\n  VTERM_ATTR_FOREGROUND_MASK = 1 << 7,\n  VTERM_ATTR_BACKGROUND_MASK = 1 << 8,\n\n  VTERM_ALL_ATTRS_MASK = (1 << 9) - 1\n} VTermAttrMask;\n\nint vterm_screen_get_attrs_extent(const VTermScreen *screen, VTermRect *extent, VTermPos pos, VTermAttrMask attrs);\n\nint vterm_screen_get_cell(const VTermScreen *screen, VTermPos pos, VTermScreenCell *cell);\n\nint vterm_screen_is_eol(const VTermScreen *screen, VTermPos pos);\n\n/**\n * Same as vterm_state_convert_color_to_rgb(), but takes a `screen` instead of a `state`\n * instance.\n */\nvoid vterm_screen_convert_color_to_rgb(const VTermScreen *screen, VTermColor *col);\n\n// ---------\n// Utilities\n// ---------\n\nVTermValueType vterm_get_attr_type(VTermAttr attr);\nVTermValueType vterm_get_prop_type(VTermProp prop);\n\nvoid vterm_scroll_rect(VTermRect rect,\n                       int downward,\n                       int rightward,\n                       int (*moverect)(VTermRect src, VTermRect dest, void *user),\n                       int (*eraserect)(VTermRect rect, int selective, void *user),\n                       void *user);\n\nvoid vterm_copy_cells(VTermRect dest,\n                      VTermRect src,\n                      void (*copycell)(VTermPos dest, VTermPos src, void *user),\n                      void *user);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/include/vterm_keycodes.h",
    "content": "#ifndef __VTERM_INPUT_H__\n#define __VTERM_INPUT_H__\n\ntypedef enum {\n  VTERM_MOD_NONE  = 0x00,\n  VTERM_MOD_SHIFT = 0x01,\n  VTERM_MOD_ALT   = 0x02,\n  VTERM_MOD_CTRL  = 0x04,\n\n  VTERM_ALL_MODS_MASK = 0x07 \n} VTermModifier;\n\ntypedef enum {\n  VTERM_KEY_NONE,\n\n  VTERM_KEY_ENTER,\n  VTERM_KEY_TAB,\n  VTERM_KEY_BACKSPACE,\n  VTERM_KEY_ESCAPE,\n\n  VTERM_KEY_UP,\n  VTERM_KEY_DOWN,\n  VTERM_KEY_LEFT,\n  VTERM_KEY_RIGHT,\n\n  VTERM_KEY_INS,\n  VTERM_KEY_DEL,\n  VTERM_KEY_HOME,\n  VTERM_KEY_END,\n  VTERM_KEY_PAGEUP,\n  VTERM_KEY_PAGEDOWN,\n\n  VTERM_KEY_FUNCTION_0   = 256,\n  VTERM_KEY_FUNCTION_MAX = VTERM_KEY_FUNCTION_0 + 255,\n\n  VTERM_KEY_KP_0,\n  VTERM_KEY_KP_1,\n  VTERM_KEY_KP_2,\n  VTERM_KEY_KP_3,\n  VTERM_KEY_KP_4,\n  VTERM_KEY_KP_5,\n  VTERM_KEY_KP_6,\n  VTERM_KEY_KP_7,\n  VTERM_KEY_KP_8,\n  VTERM_KEY_KP_9,\n  VTERM_KEY_KP_MULT,\n  VTERM_KEY_KP_PLUS,\n  VTERM_KEY_KP_COMMA,\n  VTERM_KEY_KP_MINUS,\n  VTERM_KEY_KP_PERIOD,\n  VTERM_KEY_KP_DIVIDE,\n  VTERM_KEY_KP_ENTER,\n  VTERM_KEY_KP_EQUAL,\n\n  VTERM_KEY_MAX, // Must be last\n  VTERM_N_KEYS = VTERM_KEY_MAX\n} VTermKey;\n\n#define VTERM_KEY_FUNCTION(n) (VTERM_KEY_FUNCTION_0+(n))\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/libvterm.pri",
    "content": "LIBS *= -l$$qtLibraryName(libvterm)\n\n\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/libvterm.pro",
    "content": "TARGET = libvterm\nTEMPLATE = lib\nCONFIG += staticlib\n\ninclude (../../liteideutils.pri)\n\nINCLUDEPATH += include\n\nDISTFILES += \\\n    src/encoding/DECdrawing.inc \\\n    src/encoding/DECdrawing.tbl \\\n    src/encoding/uk.inc \\\n    src/encoding/uk.tbl \\\n    src/fullwidth.inc\n\nHEADERS += \\\n    include/vterm.h \\\n    include/vterm_keycodes.h \\\n    src/rect.h \\\n    src/utf8.h \\\n    src/vterm_internal.h\n\nSOURCES += \\\n    src/encoding.c \\\n    src/keyboard.c \\\n    src/mouse.c \\\n    src/parser.c \\\n    src/pen.c \\\n    src/screen.c \\\n    src/state.c \\\n    src/unicode.c \\\n    src/vterm.c\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/encoding/DECdrawing.inc",
    "content": "static const struct StaticTableEncoding encoding_DECdrawing = {\n  { .decode = &decode_table },\n  {\n    [0x60] = 0x25C6,\n    [0x61] = 0x2592,\n    [0x62] = 0x2409,\n    [0x63] = 0x240C,\n    [0x64] = 0x240D,\n    [0x65] = 0x240A,\n    [0x66] = 0x00B0,\n    [0x67] = 0x00B1,\n    [0x68] = 0x2424,\n    [0x69] = 0x240B,\n    [0x6a] = 0x2518,\n    [0x6b] = 0x2510,\n    [0x6c] = 0x250C,\n    [0x6d] = 0x2514,\n    [0x6e] = 0x253C,\n    [0x6f] = 0x23BA,\n    [0x70] = 0x23BB,\n    [0x71] = 0x2500,\n    [0x72] = 0x23BC,\n    [0x73] = 0x23BD,\n    [0x74] = 0x251C,\n    [0x75] = 0x2524,\n    [0x76] = 0x2534,\n    [0x77] = 0x252C,\n    [0x78] = 0x2502,\n    [0x79] = 0x2A7D,\n    [0x7a] = 0x2A7E,\n    [0x7b] = 0x03C0,\n    [0x7c] = 0x2260,\n    [0x7d] = 0x00A3,\n    [0x7e] = 0x00B7,\n  }\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/encoding/DECdrawing.tbl",
    "content": "6/0 = U+25C6 # BLACK DIAMOND\n6/1 = U+2592 # MEDIUM SHADE (checkerboard)\n6/2 = U+2409 # SYMBOL FOR HORIZONTAL TAB\n6/3 = U+240C # SYMBOL FOR FORM FEED\n6/4 = U+240D # SYMBOL FOR CARRIAGE RETURN\n6/5 = U+240A # SYMBOL FOR LINE FEED\n6/6 = U+00B0 # DEGREE SIGN\n6/7 = U+00B1 # PLUS-MINUS SIGN (plus or minus)\n6/8 = U+2424 # SYMBOL FOR NEW LINE\n6/9 = U+240B # SYMBOL FOR VERTICAL TAB\n6/10 = U+2518 # BOX DRAWINGS LIGHT UP AND LEFT (bottom-right corner)\n6/11 = U+2510 # BOX DRAWINGS LIGHT DOWN AND LEFT (top-right corner)\n6/12 = U+250C # BOX DRAWINGS LIGHT DOWN AND RIGHT (top-left corner)\n6/13 = U+2514 # BOX DRAWINGS LIGHT UP AND RIGHT (bottom-left corner)\n6/14 = U+253C # BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL (crossing lines)\n6/15 = U+23BA # HORIZONTAL SCAN LINE-1\n7/0 = U+23BB # HORIZONTAL SCAN LINE-3\n7/1 = U+2500 # BOX DRAWINGS LIGHT HORIZONTAL\n7/2 = U+23BC # HORIZONTAL SCAN LINE-7\n7/3 = U+23BD # HORIZONTAL SCAN LINE-9\n7/4 = U+251C # BOX DRAWINGS LIGHT VERTICAL AND RIGHT\n7/5 = U+2524 # BOX DRAWINGS LIGHT VERTICAL AND LEFT\n7/6 = U+2534 # BOX DRAWINGS LIGHT UP AND HORIZONTAL\n7/7 = U+252C # BOX DRAWINGS LIGHT DOWN AND HORIZONTAL\n7/8 = U+2502 # BOX DRAWINGS LIGHT VERTICAL\n7/9 = U+2A7D # LESS-THAN OR SLANTED EQUAL-TO\n7/10 = U+2A7E # GREATER-THAN OR SLANTED EQUAL-TO\n7/11 = U+03C0 # GREEK SMALL LETTER PI\n7/12 = U+2260 # NOT EQUAL TO\n7/13 = U+00A3 # POUND SIGN\n7/14 = U+00B7 # MIDDLE DOT\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/encoding/uk.inc",
    "content": "static const struct StaticTableEncoding encoding_uk = {\n  { .decode = &decode_table },\n  {\n    [0x23] = 0x00a3,\n  }\n};\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/encoding/uk.tbl",
    "content": "2/3 = \"£\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/encoding.c",
    "content": "#include \"vterm_internal.h\"\n\n#define UNICODE_INVALID 0xFFFD\n\n#if defined(DEBUG) && DEBUG > 1\n# define DEBUG_PRINT_UTF8\n#endif\n\nstruct UTF8DecoderData {\n  // number of bytes remaining in this codepoint\n  int bytes_remaining;\n\n  // number of bytes total in this codepoint once it's finished\n  // (for detecting overlongs)\n  int bytes_total;\n\n  int this_cp;\n};\n\nstatic void init_utf8(VTermEncoding *enc, void *data_)\n{\n  struct UTF8DecoderData *data = data_;\n\n  data->bytes_remaining = 0;\n  data->bytes_total     = 0;\n}\n\nstatic void decode_utf8(VTermEncoding *enc, void *data_,\n                        uint32_t cp[], int *cpi, int cplen,\n                        const char bytes[], size_t *pos, size_t bytelen)\n{\n  struct UTF8DecoderData *data = data_;\n\n#ifdef DEBUG_PRINT_UTF8\n  printf(\"BEGIN UTF-8\\n\");\n#endif\n\n  for(; *pos < bytelen && *cpi < cplen; (*pos)++) {\n    unsigned char c = bytes[*pos];\n\n#ifdef DEBUG_PRINT_UTF8\n    printf(\" pos=%zd c=%02x rem=%d\\n\", *pos, c, data->bytes_remaining);\n#endif\n\n    if(c < 0x20) // C0\n      return;\n\n    else if(c >= 0x20 && c < 0x7f) {\n      if(data->bytes_remaining)\n        cp[(*cpi)++] = UNICODE_INVALID;\n\n      cp[(*cpi)++] = c;\n#ifdef DEBUG_PRINT_UTF8\n      printf(\" UTF-8 char: U+%04x\\n\", c);\n#endif\n      data->bytes_remaining = 0;\n    }\n\n    else if(c == 0x7f) // DEL\n      return;\n\n    else if(c >= 0x80 && c < 0xc0) {\n      if(!data->bytes_remaining) {\n        cp[(*cpi)++] = UNICODE_INVALID;\n        continue;\n      }\n\n      data->this_cp <<= 6;\n      data->this_cp |= c & 0x3f;\n      data->bytes_remaining--;\n\n      if(!data->bytes_remaining) {\n#ifdef DEBUG_PRINT_UTF8\n        printf(\" UTF-8 raw char U+%04x bytelen=%d \", data->this_cp, data->bytes_total);\n#endif\n        // Check for overlong sequences\n        switch(data->bytes_total) {\n        case 2:\n          if(data->this_cp <  0x0080) data->this_cp = UNICODE_INVALID;\n          break;\n        case 3:\n          if(data->this_cp <  0x0800) data->this_cp = UNICODE_INVALID;\n          break;\n        case 4:\n          if(data->this_cp < 0x10000) data->this_cp = UNICODE_INVALID;\n          break;\n        case 5:\n          if(data->this_cp < 0x200000) data->this_cp = UNICODE_INVALID;\n          break;\n        case 6:\n          if(data->this_cp < 0x4000000) data->this_cp = UNICODE_INVALID;\n          break;\n        }\n        // Now look for plain invalid ones\n        if((data->this_cp >= 0xD800 && data->this_cp <= 0xDFFF) ||\n           data->this_cp == 0xFFFE ||\n           data->this_cp == 0xFFFF)\n          data->this_cp = UNICODE_INVALID;\n#ifdef DEBUG_PRINT_UTF8\n        printf(\" char: U+%04x\\n\", data->this_cp);\n#endif\n        cp[(*cpi)++] = data->this_cp;\n      }\n    }\n\n    else if(c >= 0xc0 && c < 0xe0) {\n      if(data->bytes_remaining)\n        cp[(*cpi)++] = UNICODE_INVALID;\n\n      data->this_cp = c & 0x1f;\n      data->bytes_total = 2;\n      data->bytes_remaining = 1;\n    }\n\n    else if(c >= 0xe0 && c < 0xf0) {\n      if(data->bytes_remaining)\n        cp[(*cpi)++] = UNICODE_INVALID;\n\n      data->this_cp = c & 0x0f;\n      data->bytes_total = 3;\n      data->bytes_remaining = 2;\n    }\n\n    else if(c >= 0xf0 && c < 0xf8) {\n      if(data->bytes_remaining)\n        cp[(*cpi)++] = UNICODE_INVALID;\n\n      data->this_cp = c & 0x07;\n      data->bytes_total = 4;\n      data->bytes_remaining = 3;\n    }\n\n    else if(c >= 0xf8 && c < 0xfc) {\n      if(data->bytes_remaining)\n        cp[(*cpi)++] = UNICODE_INVALID;\n\n      data->this_cp = c & 0x03;\n      data->bytes_total = 5;\n      data->bytes_remaining = 4;\n    }\n\n    else if(c >= 0xfc && c < 0xfe) {\n      if(data->bytes_remaining)\n        cp[(*cpi)++] = UNICODE_INVALID;\n\n      data->this_cp = c & 0x01;\n      data->bytes_total = 6;\n      data->bytes_remaining = 5;\n    }\n\n    else {\n      cp[(*cpi)++] = UNICODE_INVALID;\n    }\n  }\n}\n\nstatic VTermEncoding encoding_utf8 = {\n  .init   = &init_utf8,\n  .decode = &decode_utf8,\n};\n\nstatic void decode_usascii(VTermEncoding *enc, void *data,\n                           uint32_t cp[], int *cpi, int cplen,\n                           const char bytes[], size_t *pos, size_t bytelen)\n{\n  int is_gr = bytes[*pos] & 0x80;\n\n  for(; *pos < bytelen && *cpi < cplen; (*pos)++) {\n    unsigned char c = bytes[*pos] ^ is_gr;\n\n    if(c < 0x20 || c == 0x7f || c >= 0x80)\n      return;\n\n    cp[(*cpi)++] = c;\n  }\n}\n\nstatic VTermEncoding encoding_usascii = {\n  .decode = &decode_usascii,\n};\n\nstruct StaticTableEncoding {\n  const VTermEncoding enc;\n  const uint32_t chars[128];\n};\n\nstatic void decode_table(VTermEncoding *enc, void *data,\n                         uint32_t cp[], int *cpi, int cplen,\n                         const char bytes[], size_t *pos, size_t bytelen)\n{\n  struct StaticTableEncoding *table = (struct StaticTableEncoding *)enc;\n  int is_gr = bytes[*pos] & 0x80;\n\n  for(; *pos < bytelen && *cpi < cplen; (*pos)++) {\n    unsigned char c = bytes[*pos] ^ is_gr;\n\n    if(c < 0x20 || c == 0x7f || c >= 0x80)\n      return;\n\n    if(table->chars[c])\n      cp[(*cpi)++] = table->chars[c];\n    else\n      cp[(*cpi)++] = c;\n  }\n}\n\n#include \"encoding/DECdrawing.inc\"\n#include \"encoding/uk.inc\"\n\nstatic struct {\n  VTermEncodingType type;\n  char designation;\n  VTermEncoding *enc;\n}\nencodings[] = {\n  { ENC_UTF8,      'u', &encoding_utf8 },\n  { ENC_SINGLE_94, '0', (VTermEncoding*)&encoding_DECdrawing },\n  { ENC_SINGLE_94, 'A', (VTermEncoding*)&encoding_uk },\n  { ENC_SINGLE_94, 'B', &encoding_usascii },\n  { 0 },\n};\n\n/* This ought to be INTERNAL but isn't because it's used by unit testing */\nVTermEncoding *vterm_lookup_encoding(VTermEncodingType type, char designation)\n{\n  int i = 0;\n  for(i = 0; encodings[i].designation; i++) {\n    if(encodings[i].type == type && encodings[i].designation == designation)\n      return encodings[i].enc;\n  }\n  return NULL;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/fullwidth.inc",
    "content": "  { 0x1100, 0x115f },\n  { 0x231a, 0x231b },\n  { 0x2329, 0x232a },\n  { 0x23e9, 0x23ec },\n  { 0x23f0, 0x23f0 },\n  { 0x23f3, 0x23f3 },\n  { 0x25fd, 0x25fe },\n  { 0x2614, 0x2615 },\n  { 0x2648, 0x2653 },\n  { 0x267f, 0x267f },\n  { 0x2693, 0x2693 },\n  { 0x26a1, 0x26a1 },\n  { 0x26aa, 0x26ab },\n  { 0x26bd, 0x26be },\n  { 0x26c4, 0x26c5 },\n  { 0x26ce, 0x26ce },\n  { 0x26d4, 0x26d4 },\n  { 0x26ea, 0x26ea },\n  { 0x26f2, 0x26f3 },\n  { 0x26f5, 0x26f5 },\n  { 0x26fa, 0x26fa },\n  { 0x26fd, 0x26fd },\n  { 0x2705, 0x2705 },\n  { 0x270a, 0x270b },\n  { 0x2728, 0x2728 },\n  { 0x274c, 0x274c },\n  { 0x274e, 0x274e },\n  { 0x2753, 0x2755 },\n  { 0x2757, 0x2757 },\n  { 0x2795, 0x2797 },\n  { 0x27b0, 0x27b0 },\n  { 0x27bf, 0x27bf },\n  { 0x2b1b, 0x2b1c },\n  { 0x2b50, 0x2b50 },\n  { 0x2b55, 0x2b55 },\n  { 0x2e80, 0x2e99 },\n  { 0x2e9b, 0x2ef3 },\n  { 0x2f00, 0x2fd5 },\n  { 0x2ff0, 0x2ffb },\n  { 0x3000, 0x303e },\n  { 0x3041, 0x3096 },\n  { 0x3099, 0x30ff },\n  { 0x3105, 0x312d },\n  { 0x3131, 0x318e },\n  { 0x3190, 0x31ba },\n  { 0x31c0, 0x31e3 },\n  { 0x31f0, 0x321e },\n  { 0x3220, 0x3247 },\n  { 0x3250, 0x32fe },\n  { 0x3300, 0x4dbf },\n  { 0x4e00, 0xa48c },\n  { 0xa490, 0xa4c6 },\n  { 0xa960, 0xa97c },\n  { 0xac00, 0xd7a3 },\n  { 0xf900, 0xfaff },\n  { 0xfe10, 0xfe19 },\n  { 0xfe30, 0xfe52 },\n  { 0xfe54, 0xfe66 },\n  { 0xfe68, 0xfe6b },\n  { 0xff01, 0xff60 },\n  { 0xffe0, 0xffe6 },\n  { 0x16fe0, 0x16fe0 },\n  { 0x17000, 0x187ec },\n  { 0x18800, 0x18af2 },\n  { 0x1b000, 0x1b001 },\n  { 0x1f004, 0x1f004 },\n  { 0x1f0cf, 0x1f0cf },\n  { 0x1f18e, 0x1f18e },\n  { 0x1f191, 0x1f19a },\n  { 0x1f200, 0x1f202 },\n  { 0x1f210, 0x1f23b },\n  { 0x1f240, 0x1f248 },\n  { 0x1f250, 0x1f251 },\n  { 0x1f300, 0x1f320 },\n  { 0x1f32d, 0x1f335 },\n  { 0x1f337, 0x1f37c },\n  { 0x1f37e, 0x1f393 },\n  { 0x1f3a0, 0x1f3ca },\n  { 0x1f3cf, 0x1f3d3 },\n  { 0x1f3e0, 0x1f3f0 },\n  { 0x1f3f4, 0x1f3f4 },\n  { 0x1f3f8, 0x1f43e },\n  { 0x1f440, 0x1f440 },\n  { 0x1f442, 0x1f4fc },\n  { 0x1f4ff, 0x1f53d },\n  { 0x1f54b, 0x1f54e },\n  { 0x1f550, 0x1f567 },\n  { 0x1f57a, 0x1f57a },\n  { 0x1f595, 0x1f596 },\n  { 0x1f5a4, 0x1f5a4 },\n  { 0x1f5fb, 0x1f64f },\n  { 0x1f680, 0x1f6c5 },\n  { 0x1f6cc, 0x1f6cc },\n  { 0x1f6d0, 0x1f6d2 },\n  { 0x1f6eb, 0x1f6ec },\n  { 0x1f6f4, 0x1f6f6 },\n  { 0x1f910, 0x1f91e },\n  { 0x1f920, 0x1f927 },\n  { 0x1f930, 0x1f930 },\n  { 0x1f933, 0x1f93e },\n  { 0x1f940, 0x1f94b },\n  { 0x1f950, 0x1f95e },\n  { 0x1f980, 0x1f991 },\n  { 0x1f9c0, 0x1f9c0 },\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/keyboard.c",
    "content": "#include \"vterm_internal.h\"\n\n#include <stdio.h>\n\n#include \"utf8.h\"\n\nvoid vterm_keyboard_unichar(VTerm *vt, uint32_t c, VTermModifier mod)\n{\n  /* The shift modifier is never important for Unicode characters\n   * apart from Space\n   */\n  if(c != ' ')\n    mod &= ~VTERM_MOD_SHIFT;\n\n  if(mod == 0) {\n    // Normal text - ignore just shift\n    char str[6];\n    int seqlen = fill_utf8(c, str);\n    vterm_push_output_bytes(vt, str, seqlen);\n    return;\n  }\n\n  int needs_CSIu;\n  switch(c) {\n    /* Special Ctrl- letters that can't be represented elsewise */\n    case 'i': case 'j': case 'm': case '[':\n      needs_CSIu = 1;\n      break;\n    /* Ctrl-\\ ] ^ _ don't need CSUu */\n    case '\\\\': case ']': case '^': case '_':\n      needs_CSIu = 0;\n      break;\n    /* Shift-space needs CSIu */\n    case ' ':\n      needs_CSIu = !!(mod & VTERM_MOD_SHIFT);\n      break;\n    /* All other characters needs CSIu except for letters a-z */\n    default:\n      needs_CSIu = (c < 'a' || c > 'z');\n  }\n\n  /* ALT we can just prefix with ESC; anything else requires CSI u */\n  if(needs_CSIu && (mod & ~VTERM_MOD_ALT)) {\n    vterm_push_output_sprintf_ctrl(vt, C1_CSI, \"%d;%du\", c, mod+1);\n    return;\n  }\n\n  if(mod & VTERM_MOD_CTRL)\n    c &= 0x1f;\n\n  vterm_push_output_sprintf(vt, \"%s%c\", mod & VTERM_MOD_ALT ? ESC_S : \"\", c);\n}\n\ntypedef struct {\n  enum {\n    KEYCODE_NONE,\n    KEYCODE_LITERAL,\n    KEYCODE_TAB,\n    KEYCODE_ENTER,\n    KEYCODE_SS3,\n    KEYCODE_CSI,\n    KEYCODE_CSI_CURSOR,\n    KEYCODE_CSINUM,\n    KEYCODE_KEYPAD,\n  } type;\n  char literal;\n  int csinum;\n} keycodes_s;\n\nstatic keycodes_s keycodes[] = {\n  { KEYCODE_NONE }, // NONE\n\n  { KEYCODE_ENTER,   '\\r'   }, // ENTER\n  { KEYCODE_TAB,     '\\t'   }, // TAB\n  { KEYCODE_LITERAL, '\\x7f' }, // BACKSPACE == ASCII DEL\n  { KEYCODE_LITERAL, '\\x1b' }, // ESCAPE\n\n  { KEYCODE_CSI_CURSOR, 'A' }, // UP\n  { KEYCODE_CSI_CURSOR, 'B' }, // DOWN\n  { KEYCODE_CSI_CURSOR, 'D' }, // LEFT\n  { KEYCODE_CSI_CURSOR, 'C' }, // RIGHT\n\n  { KEYCODE_CSINUM, '~', 2 },  // INS\n  { KEYCODE_CSINUM, '~', 3 },  // DEL\n  { KEYCODE_CSI_CURSOR, 'H' }, // HOME\n  { KEYCODE_CSI_CURSOR, 'F' }, // END\n  { KEYCODE_CSINUM, '~', 5 },  // PAGEUP\n  { KEYCODE_CSINUM, '~', 6 },  // PAGEDOWN\n};\n\nstatic keycodes_s keycodes_fn[] = {\n  { KEYCODE_NONE },            // F0 - shouldn't happen\n  { KEYCODE_SS3,    'P' },     // F1\n  { KEYCODE_SS3,    'Q' },     // F2\n  { KEYCODE_SS3,    'R' },     // F3\n  { KEYCODE_SS3,    'S' },     // F4\n  { KEYCODE_CSINUM, '~', 15 }, // F5\n  { KEYCODE_CSINUM, '~', 17 }, // F6\n  { KEYCODE_CSINUM, '~', 18 }, // F7\n  { KEYCODE_CSINUM, '~', 19 }, // F8\n  { KEYCODE_CSINUM, '~', 20 }, // F9\n  { KEYCODE_CSINUM, '~', 21 }, // F10\n  { KEYCODE_CSINUM, '~', 23 }, // F11\n  { KEYCODE_CSINUM, '~', 24 }, // F12\n};\n\nstatic keycodes_s keycodes_kp[] = {\n  { KEYCODE_KEYPAD, '0', 'p' }, // KP_0\n  { KEYCODE_KEYPAD, '1', 'q' }, // KP_1\n  { KEYCODE_KEYPAD, '2', 'r' }, // KP_2\n  { KEYCODE_KEYPAD, '3', 's' }, // KP_3\n  { KEYCODE_KEYPAD, '4', 't' }, // KP_4\n  { KEYCODE_KEYPAD, '5', 'u' }, // KP_5\n  { KEYCODE_KEYPAD, '6', 'v' }, // KP_6\n  { KEYCODE_KEYPAD, '7', 'w' }, // KP_7\n  { KEYCODE_KEYPAD, '8', 'x' }, // KP_8\n  { KEYCODE_KEYPAD, '9', 'y' }, // KP_9\n  { KEYCODE_KEYPAD, '*', 'j' }, // KP_MULT\n  { KEYCODE_KEYPAD, '+', 'k' }, // KP_PLUS\n  { KEYCODE_KEYPAD, ',', 'l' }, // KP_COMMA\n  { KEYCODE_KEYPAD, '-', 'm' }, // KP_MINUS\n  { KEYCODE_KEYPAD, '.', 'n' }, // KP_PERIOD\n  { KEYCODE_KEYPAD, '/', 'o' }, // KP_DIVIDE\n  { KEYCODE_KEYPAD, '\\n', 'M' }, // KP_ENTER\n  { KEYCODE_KEYPAD, '=', 'X' }, // KP_EQUAL\n};\n\nvoid vterm_keyboard_key(VTerm *vt, VTermKey key, VTermModifier mod)\n{\n  if(key == VTERM_KEY_NONE)\n    return;\n\n  keycodes_s k;\n  if(key < VTERM_KEY_FUNCTION_0) {\n    if(key >= sizeof(keycodes)/sizeof(keycodes[0]))\n      return;\n    k = keycodes[key];\n  }\n  else if(key >= VTERM_KEY_FUNCTION_0 && key <= VTERM_KEY_FUNCTION_MAX) {\n    if((key - VTERM_KEY_FUNCTION_0) >= sizeof(keycodes_fn)/sizeof(keycodes_fn[0]))\n      return;\n    k = keycodes_fn[key - VTERM_KEY_FUNCTION_0];\n  }\n  else if(key >= VTERM_KEY_KP_0) {\n    if((key - VTERM_KEY_KP_0) >= sizeof(keycodes_kp)/sizeof(keycodes_kp[0]))\n      return;\n    k = keycodes_kp[key - VTERM_KEY_KP_0];\n  }\n\n  switch(k.type) {\n  case KEYCODE_NONE:\n    break;\n\n  case KEYCODE_TAB:\n    /* Shift-Tab is CSI Z but plain Tab is 0x09 */\n    if(mod == VTERM_MOD_SHIFT)\n      vterm_push_output_sprintf_ctrl(vt, C1_CSI, \"Z\");\n    else if(mod & VTERM_MOD_SHIFT)\n      vterm_push_output_sprintf_ctrl(vt, C1_CSI, \"1;%dZ\", mod+1);\n    else\n      goto case_LITERAL;\n    break;\n\n  case KEYCODE_ENTER:\n    /* Enter is CRLF in newline mode, but just LF in linefeed */\n    if(vt->state->mode.newline)\n      vterm_push_output_sprintf(vt, \"\\r\\n\");\n    else\n      goto case_LITERAL;\n    break;\n\n  case KEYCODE_LITERAL: case_LITERAL:\n    if(mod & (VTERM_MOD_SHIFT|VTERM_MOD_CTRL))\n      vterm_push_output_sprintf_ctrl(vt, C1_CSI, \"%d;%du\", k.literal, mod+1);\n    else\n      vterm_push_output_sprintf(vt, mod & VTERM_MOD_ALT ? ESC_S \"%c\" : \"%c\", k.literal);\n    break;\n\n  case KEYCODE_SS3: case_SS3:\n    if(mod == 0)\n      vterm_push_output_sprintf_ctrl(vt, C1_SS3, \"%c\", k.literal);\n    else\n      goto case_CSI;\n    break;\n\n  case KEYCODE_CSI: case_CSI:\n    if(mod == 0)\n      vterm_push_output_sprintf_ctrl(vt, C1_CSI, \"%c\", k.literal);\n    else\n      vterm_push_output_sprintf_ctrl(vt, C1_CSI, \"1;%d%c\", mod + 1, k.literal);\n    break;\n\n  case KEYCODE_CSINUM:\n    if(mod == 0)\n      vterm_push_output_sprintf_ctrl(vt, C1_CSI, \"%d%c\", k.csinum, k.literal);\n    else\n      vterm_push_output_sprintf_ctrl(vt, C1_CSI, \"%d;%d%c\", k.csinum, mod + 1, k.literal);\n    break;\n\n  case KEYCODE_CSI_CURSOR:\n    if(vt->state->mode.cursor)\n      goto case_SS3;\n    else\n      goto case_CSI;\n\n  case KEYCODE_KEYPAD:\n    if(vt->state->mode.keypad) {\n      k.literal = k.csinum;\n      goto case_SS3;\n    }\n    else\n      goto case_LITERAL;\n  }\n}\n\nvoid vterm_keyboard_start_paste(VTerm *vt)\n{\n  if(vt->state->mode.bracketpaste)\n    vterm_push_output_sprintf_ctrl(vt, C1_CSI, \"200~\");\n}\n\nvoid vterm_keyboard_end_paste(VTerm *vt)\n{\n  if(vt->state->mode.bracketpaste)\n    vterm_push_output_sprintf_ctrl(vt, C1_CSI, \"201~\");\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/mouse.c",
    "content": "#include \"vterm_internal.h\"\n\n#include \"utf8.h\"\n\nstatic void output_mouse(VTermState *state, int code, int pressed, int modifiers, int col, int row)\n{\n  modifiers <<= 2;\n\n  switch(state->mouse_protocol) {\n  case MOUSE_X10:\n    if(col + 0x21 > 0xff)\n      col = 0xff - 0x21;\n    if(row + 0x21 > 0xff)\n      row = 0xff - 0x21;\n\n    if(!pressed)\n      code = 3;\n\n    vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, \"M%c%c%c\",\n        (code | modifiers) + 0x20, col + 0x21, row + 0x21);\n    break;\n\n  case MOUSE_UTF8:\n    {\n      char utf8[18]; size_t len = 0;\n\n      if(!pressed)\n        code = 3;\n\n      len += fill_utf8((code | modifiers) + 0x20, utf8 + len);\n      len += fill_utf8(col + 0x21, utf8 + len);\n      len += fill_utf8(row + 0x21, utf8 + len);\n      utf8[len] = 0;\n\n      vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, \"M%s\", utf8);\n    }\n    break;\n\n  case MOUSE_SGR:\n    vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, \"<%d;%d;%d%c\",\n        code | modifiers, col + 1, row + 1, pressed ? 'M' : 'm');\n    break;\n\n  case MOUSE_RXVT:\n    if(!pressed)\n      code = 3;\n\n    vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, \"%d;%d;%dM\",\n        code | modifiers, col + 1, row + 1);\n    break;\n  }\n}\n\nvoid vterm_mouse_move(VTerm *vt, int row, int col, VTermModifier mod)\n{\n  VTermState *state = vt->state;\n\n  if(col == state->mouse_col && row == state->mouse_row)\n    return;\n\n  state->mouse_col = col;\n  state->mouse_row = row;\n\n  if((state->mouse_flags & MOUSE_WANT_DRAG && state->mouse_buttons) ||\n     (state->mouse_flags & MOUSE_WANT_MOVE)) {\n    int button = state->mouse_buttons & 0x01 ? 1 :\n                 state->mouse_buttons & 0x02 ? 2 :\n                 state->mouse_buttons & 0x04 ? 3 : 4;\n    output_mouse(state, button-1 + 0x20, 1, mod, col, row);\n  }\n}\n\nvoid vterm_mouse_button(VTerm *vt, int button, bool pressed, VTermModifier mod)\n{\n  VTermState *state = vt->state;\n\n  int old_buttons = state->mouse_buttons;\n\n  if(button > 0 && button <= 3) {\n    if(pressed)\n      state->mouse_buttons |= (1 << (button-1));\n    else\n      state->mouse_buttons &= ~(1 << (button-1));\n  }\n\n  /* Most of the time we don't get button releases from 4/5 */\n  if(state->mouse_buttons == old_buttons && button < 4)\n    return;\n\n  if(button < 4) {\n    output_mouse(state, button-1, pressed, mod, state->mouse_col, state->mouse_row);\n  }\n  else if(button < 6) {\n    output_mouse(state, button-4 + 0x40, pressed, mod, state->mouse_col, state->mouse_row);\n  }\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/parser.c",
    "content": "#include \"vterm_internal.h\"\n\n#include <stdio.h>\n#include <string.h>\n\n#undef DEBUG_PARSER\n\nstatic bool is_intermed(unsigned char c)\n{\n  return c >= 0x20 && c <= 0x2f;\n}\n\nstatic void do_control(VTerm *vt, unsigned char control)\n{\n  if(vt->parser.callbacks && vt->parser.callbacks->control)\n    if((*vt->parser.callbacks->control)(control, vt->parser.cbdata))\n      return;\n\n  DEBUG_LOG(\"libvterm: Unhandled control 0x%02x\\n\", control);\n}\n\nstatic void do_csi(VTerm *vt, char command)\n{\n#ifdef DEBUG_PARSER\n  printf(\"Parsed CSI args as:\\n\", arglen, args);\n  printf(\" leader: %s\\n\", vt->parser.csi_leader);\n  for(int argi = 0; argi < vt->parser.csi_argi; argi++) {\n    printf(\" %lu\", CSI_ARG(vt->parser.csi_args[argi]));\n    if(!CSI_ARG_HAS_MORE(vt->parser.csi_args[argi]))\n      printf(\"\\n\");\n  printf(\" intermed: %s\\n\", vt->parser.intermed);\n  }\n#endif\n\n  if(vt->parser.callbacks && vt->parser.callbacks->csi)\n    if((*vt->parser.callbacks->csi)(\n          vt->parser.csi_leaderlen ? vt->parser.csi_leader : NULL, \n          vt->parser.csi_args,\n          vt->parser.csi_argi,\n          vt->parser.intermedlen ? vt->parser.intermed : NULL,\n          command,\n          vt->parser.cbdata))\n      return;\n\n  DEBUG_LOG(\"libvterm: Unhandled CSI %c\\n\", command);\n}\n\nstatic void do_escape(VTerm *vt, char command)\n{\n  char seq[INTERMED_MAX+1];\n\n  size_t len = vt->parser.intermedlen;\n  strncpy(seq, vt->parser.intermed, len);\n  seq[len++] = command;\n  seq[len]   = 0;\n\n  if(vt->parser.callbacks && vt->parser.callbacks->escape)\n    if((*vt->parser.callbacks->escape)(seq, len, vt->parser.cbdata))\n      return;\n\n  DEBUG_LOG(\"libvterm: Unhandled escape ESC 0x%02x\\n\", command);\n}\n\nstatic void append_strbuffer(VTerm *vt, const char *str, size_t len)\n{\n  if(len > vt->parser.strbuffer_len - vt->parser.strbuffer_cur) {\n    len = vt->parser.strbuffer_len - vt->parser.strbuffer_cur;\n    DEBUG_LOG(\"Truncating strbuffer preserve to %zd bytes\\n\", len);\n  }\n\n  if(len > 0) {\n    strncpy(vt->parser.strbuffer + vt->parser.strbuffer_cur, str, len);\n    vt->parser.strbuffer_cur += len;\n  }\n}\n\nstatic void start_string(VTerm *vt, VTermParserStringType type)\n{\n  vt->parser.stringtype = type;\n\n  vt->parser.strbuffer_cur = 0;\n}\n\nstatic void more_string(VTerm *vt, const char *str, size_t len)\n{\n  append_strbuffer(vt, str, len);\n}\n\nstatic void done_string(VTerm *vt, const char *str, size_t len)\n{\n  if(vt->parser.strbuffer_cur) {\n    if(str)\n      append_strbuffer(vt, str, len);\n\n    str = vt->parser.strbuffer;\n    len = vt->parser.strbuffer_cur;\n  }\n  else if(!str) {\n    DEBUG_LOG(\"parser.c: TODO: No strbuffer _and_ no final fragment???\\n\");\n    len = 0;\n  }\n\n  switch(vt->parser.stringtype) {\n  case VTERM_PARSER_OSC:\n    if(vt->parser.callbacks && vt->parser.callbacks->osc)\n      if((*vt->parser.callbacks->osc)(str, len, vt->parser.cbdata))\n        return;\n\n    DEBUG_LOG(\"libvterm: Unhandled OSC %.*s\\n\", (int)len, str);\n    return;\n\n  case VTERM_PARSER_DCS:\n    if(vt->parser.callbacks && vt->parser.callbacks->dcs)\n      if((*vt->parser.callbacks->dcs)(str, len, vt->parser.cbdata))\n        return;\n\n    DEBUG_LOG(\"libvterm: Unhandled DCS %.*s\\n\", (int)len, str);\n    return;\n\n  case VTERM_N_PARSER_TYPES:\n    return;\n  }\n}\n\nsize_t vterm_input_write(VTerm *vt, const char *bytes, size_t len)\n{\n  size_t pos = 0;\n  const char *string_start;\n\n  switch(vt->parser.state) {\n  case NORMAL:\n  case CSI_LEADER:\n  case CSI_ARGS:\n  case CSI_INTERMED:\n  case ESC:\n    string_start = NULL;\n    break;\n  case STRING:\n  case ESC_IN_STRING:\n    string_start = bytes;\n    break;\n  }\n\n#define ENTER_STRING_STATE(st) do { vt->parser.state = STRING; string_start = bytes + pos + 1; } while(0)\n#define ENTER_STATE(st)        do { vt->parser.state = st; string_start = NULL; } while(0)\n#define ENTER_NORMAL_STATE()   ENTER_STATE(NORMAL)\n\n  for( ; pos < len; pos++) {\n    unsigned char c = bytes[pos];\n\n    if(c == 0x00 || c == 0x7f) { // NUL, DEL\n      if(vt->parser.state >= STRING) {\n        more_string(vt, string_start, bytes + pos - string_start);\n        string_start = bytes + pos + 1;\n      }\n      continue;\n    }\n    if(c == 0x18 || c == 0x1a) { // CAN, SUB\n      ENTER_NORMAL_STATE();\n      continue;\n    }\n    else if(c == 0x1b) { // ESC\n      vt->parser.intermedlen = 0;\n      if(vt->parser.state == STRING)\n        vt->parser.state = ESC_IN_STRING;\n      else\n        ENTER_STATE(ESC);\n      continue;\n    }\n    else if(c == 0x07 &&  // BEL, can stand for ST in OSC or DCS state\n            vt->parser.state == STRING) {\n      // fallthrough\n    }\n    else if(c < 0x20) { // other C0\n      if(vt->parser.state >= STRING)\n        more_string(vt, string_start, bytes + pos - string_start);\n      do_control(vt, c);\n      if(vt->parser.state >= STRING)\n        string_start = bytes + pos + 1;\n      continue;\n    }\n    // else fallthrough\n\n    switch(vt->parser.state) {\n    case ESC_IN_STRING:\n      if(c == 0x5c) { // ST\n        vt->parser.state = STRING;\n        done_string(vt, string_start, bytes + pos - string_start - 1);\n        ENTER_NORMAL_STATE();\n        break;\n      }\n      vt->parser.state = ESC;\n      // else fallthrough\n\n    case ESC:\n      switch(c) {\n      case 0x50: // DCS\n        start_string(vt, VTERM_PARSER_DCS);\n        ENTER_STRING_STATE();\n        break;\n      case 0x5b: // CSI\n        vt->parser.csi_leaderlen = 0;\n        ENTER_STATE(CSI_LEADER);\n        break;\n      case 0x5d: // OSC\n        start_string(vt, VTERM_PARSER_OSC);\n        ENTER_STRING_STATE();\n        break;\n      default:\n        if(is_intermed(c)) {\n          if(vt->parser.intermedlen < INTERMED_MAX-1)\n            vt->parser.intermed[vt->parser.intermedlen++] = c;\n        }\n        else if(!vt->parser.intermedlen && c >= 0x40 && c < 0x60) {\n          do_control(vt, c + 0x40);\n          ENTER_NORMAL_STATE();\n        }\n        else if(c >= 0x30 && c < 0x7f) {\n          do_escape(vt, c);\n          ENTER_NORMAL_STATE();\n        }\n        else {\n          DEBUG_LOG(\"TODO: Unhandled byte %02x in Escape\\n\", c);\n        }\n      }\n      break;\n\n    case CSI_LEADER:\n      /* Extract leader bytes 0x3c to 0x3f */\n      if(c >= 0x3c && c <= 0x3f) {\n        if(vt->parser.csi_leaderlen < CSI_LEADER_MAX-1)\n          vt->parser.csi_leader[vt->parser.csi_leaderlen++] = c;\n        break;\n      }\n\n      /* else fallthrough */\n      vt->parser.csi_leader[vt->parser.csi_leaderlen] = 0;\n\n      vt->parser.csi_argi = 0;\n      vt->parser.csi_args[0] = CSI_ARG_MISSING;\n      vt->parser.state = CSI_ARGS;\n\n      /* fallthrough */\n    case CSI_ARGS:\n      /* Numerical value of argument */\n      if(c >= '0' && c <= '9') {\n        if(vt->parser.csi_args[vt->parser.csi_argi] == CSI_ARG_MISSING)\n          vt->parser.csi_args[vt->parser.csi_argi] = 0;\n        vt->parser.csi_args[vt->parser.csi_argi] *= 10;\n        vt->parser.csi_args[vt->parser.csi_argi] += c - '0';\n        break;\n      }\n      if(c == ':') {\n        vt->parser.csi_args[vt->parser.csi_argi] |= CSI_ARG_FLAG_MORE;\n        c = ';';\n      }\n      if(c == ';') {\n        vt->parser.csi_argi++;\n        vt->parser.csi_args[vt->parser.csi_argi] = CSI_ARG_MISSING;\n        break;\n      }\n\n      /* else fallthrough */\n      vt->parser.csi_argi++;\n      vt->parser.intermedlen = 0;\n      vt->parser.state = CSI_INTERMED;\n    case CSI_INTERMED:\n      if(is_intermed(c)) {\n        if(vt->parser.intermedlen < INTERMED_MAX-1)\n          vt->parser.intermed[vt->parser.intermedlen++] = c;\n        break;\n      }\n      else if(c == 0x1b) {\n        /* ESC in CSI cancels */\n      }\n      else if(c >= 0x40 && c <= 0x7e) {\n        vt->parser.intermed[vt->parser.intermedlen] = 0;\n        do_csi(vt, c);\n      }\n      /* else was invalid CSI */\n\n      ENTER_NORMAL_STATE();\n      break;\n\n    case STRING:\n      if(c == 0x07 || (c == 0x9c && !vt->mode.utf8)) {\n        done_string(vt, string_start, bytes + pos - string_start);\n        ENTER_NORMAL_STATE();\n      }\n      break;\n\n    case NORMAL:\n      if(c >= 0x80 && c < 0xa0 && !vt->mode.utf8) {\n        switch(c) {\n        case 0x90: // DCS\n          start_string(vt, VTERM_PARSER_DCS);\n          ENTER_STRING_STATE();\n          break;\n        case 0x9b: // CSI\n          ENTER_STATE(CSI_LEADER);\n          break;\n        case 0x9d: // OSC\n          start_string(vt, VTERM_PARSER_OSC);\n          ENTER_STRING_STATE();\n          break;\n        default:\n          do_control(vt, c);\n          break;\n        }\n      }\n      else {\n        size_t eaten = 0;\n        if(vt->parser.callbacks && vt->parser.callbacks->text)\n          eaten = (*vt->parser.callbacks->text)(bytes + pos, len - pos, vt->parser.cbdata);\n\n        if(!eaten) {\n          DEBUG_LOG(\"libvterm: Text callback did not consume any input\\n\");\n          /* force it to make progress */\n          eaten = 1;\n        }\n\n        pos += (eaten - 1); // we'll ++ it again in a moment\n      }\n      break;\n    }\n  }\n\n  return len;\n}\n\nvoid vterm_parser_set_callbacks(VTerm *vt, const VTermParserCallbacks *callbacks, void *user)\n{\n  vt->parser.callbacks = callbacks;\n  vt->parser.cbdata = user;\n}\n\nvoid *vterm_parser_get_cbdata(VTerm *vt)\n{\n  return vt->parser.cbdata;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/pen.c",
    "content": "#include \"vterm_internal.h\"\n\n#include <stdio.h>\n\n/**\n * Structure used to store RGB triples without the additional metadata stored in\n * VTermColor.\n */\ntypedef struct {\n  uint8_t red, green, blue;\n} VTermRGB;\n\nstatic const VTermRGB ansi_colors[] = {\n  /* R    G    B */\n  {   0,   0,   0 }, // black\n  { 224,   0,   0 }, // red\n  {   0, 224,   0 }, // green\n  { 224, 224,   0 }, // yellow\n  {   0,   0, 224 }, // blue\n  { 224,   0, 224 }, // magenta\n  {   0, 224, 224 }, // cyan\n  { 224, 224, 224 }, // white == light grey\n\n  // high intensity\n  { 128, 128, 128 }, // black\n  { 255,  64,  64 }, // red\n  {  64, 255,  64 }, // green\n  { 255, 255,  64 }, // yellow\n  {  64,  64, 255 }, // blue\n  { 255,  64, 255 }, // magenta\n  {  64, 255, 255 }, // cyan\n  { 255, 255, 255 }, // white for real\n};\n\nstatic int ramp6[] = {\n  0x00, 0x33, 0x66, 0x99, 0xCC, 0xFF,\n};\n\nstatic int ramp24[] = {\n  0x00, 0x0B, 0x16, 0x21, 0x2C, 0x37, 0x42, 0x4D, 0x58, 0x63, 0x6E, 0x79,\n  0x85, 0x90, 0x9B, 0xA6, 0xB1, 0xBC, 0xC7, 0xD2, 0xDD, 0xE8, 0xF3, 0xFF,\n};\n\nstatic void lookup_default_colour_ansi(long idx, VTermColor *col)\n{\n  if (idx >= 0 && idx < 16) {\n    vterm_color_rgb(\n        col,\n        ansi_colors[idx].red, ansi_colors[idx].green, ansi_colors[idx].blue);\n  }\n}\n\nstatic bool lookup_colour_ansi(const VTermState *state, long index, VTermColor *col)\n{\n  if(index >= 0 && index < 16) {\n    *col = state->colors[index];\n    return true;\n  }\n\n  return false;\n}\n\nstatic bool lookup_colour_palette(const VTermState *state, long index, VTermColor *col)\n{\n  if(index >= 0 && index < 16) {\n    // Normal 8 colours or high intensity - parse as palette 0\n    return lookup_colour_ansi(state, index, col);\n  }\n  else if(index >= 16 && index < 232) {\n    // 216-colour cube\n    index -= 16;\n\n    vterm_color_rgb(col, ramp6[index/6/6 % 6],\n                         ramp6[index/6   % 6],\n                         ramp6[index     % 6]);\n\n    return true;\n  }\n  else if(index >= 232 && index < 256) {\n    // 24 greyscales\n    index -= 232;\n\n    vterm_color_rgb(col, ramp24[index], ramp24[index], ramp24[index]);\n\n    return true;\n  }\n\n  return false;\n}\n\nstatic int lookup_colour(const VTermState *state, int palette, const long args[], int argcount, VTermColor *col)\n{\n  switch(palette) {\n  case 2: // RGB mode - 3 args contain colour values directly\n    if(argcount < 3)\n      return argcount;\n\n    vterm_color_rgb(col, CSI_ARG(args[0]), CSI_ARG(args[1]), CSI_ARG(args[2]));\n\n    return 3;\n\n  case 5: // XTerm 256-colour mode\n    if (!argcount || CSI_ARG_IS_MISSING(args[0])) {\n      return argcount ? 1 : 0;\n    }\n\n    vterm_color_indexed(col, args[0]);\n\n    return argcount ? 1 : 0;\n\n  default:\n    DEBUG_LOG(\"Unrecognised colour palette %d\\n\", palette);\n    return 0;\n  }\n}\n\n// Some conveniences\n\nstatic void setpenattr(VTermState *state, VTermAttr attr, VTermValueType type, VTermValue *val)\n{\n#ifdef DEBUG\n  if(type != vterm_get_attr_type(attr)) {\n    DEBUG_LOG(\"Cannot set attr %d as it has type %d, not type %d\\n\",\n        attr, vterm_get_attr_type(attr), type);\n    return;\n  }\n#endif\n  if(state->callbacks && state->callbacks->setpenattr)\n    (*state->callbacks->setpenattr)(attr, val, state->cbdata);\n}\n\nstatic void setpenattr_bool(VTermState *state, VTermAttr attr, int boolean)\n{\n  VTermValue val = { .boolean = boolean };\n  setpenattr(state, attr, VTERM_VALUETYPE_BOOL, &val);\n}\n\nstatic void setpenattr_int(VTermState *state, VTermAttr attr, int number)\n{\n  VTermValue val = { .number = number };\n  setpenattr(state, attr, VTERM_VALUETYPE_INT, &val);\n}\n\nstatic void setpenattr_col(VTermState *state, VTermAttr attr, VTermColor color)\n{\n  VTermValue val = { .color = color };\n  setpenattr(state, attr, VTERM_VALUETYPE_COLOR, &val);\n}\n\nstatic void set_pen_col_ansi(VTermState *state, VTermAttr attr, long col)\n{\n  VTermColor *colp = (attr == VTERM_ATTR_BACKGROUND) ? &state->pen.bg : &state->pen.fg;\n\n  vterm_color_indexed(colp, col);\n\n  setpenattr_col(state, attr, *colp);\n}\n\nINTERNAL void vterm_state_newpen(VTermState *state)\n{\n    int col = 0;\n  // 90% grey so that pure white is brighter\n  vterm_color_rgb(&state->default_fg, 240, 240, 240);\n  vterm_color_rgb(&state->default_bg, 0, 0, 0);\n  vterm_state_set_default_colors(state, &state->default_fg, &state->default_bg);\n\n  for(col = 0; col < 16; col++)\n    lookup_default_colour_ansi(col, &state->colors[col]);\n}\n\nINTERNAL void vterm_state_resetpen(VTermState *state)\n{\n  state->pen.bold = 0;      setpenattr_bool(state, VTERM_ATTR_BOLD, 0);\n  state->pen.underline = 0; setpenattr_int( state, VTERM_ATTR_UNDERLINE, 0);\n  state->pen.italic = 0;    setpenattr_bool(state, VTERM_ATTR_ITALIC, 0);\n  state->pen.blink = 0;     setpenattr_bool(state, VTERM_ATTR_BLINK, 0);\n  state->pen.reverse = 0;   setpenattr_bool(state, VTERM_ATTR_REVERSE, 0);\n  state->pen.strike = 0;    setpenattr_bool(state, VTERM_ATTR_STRIKE, 0);\n  state->pen.font = 0;      setpenattr_int( state, VTERM_ATTR_FONT, 0);\n\n  state->pen.fg = state->default_fg;  setpenattr_col(state, VTERM_ATTR_FOREGROUND, state->default_fg);\n  state->pen.bg = state->default_bg;  setpenattr_col(state, VTERM_ATTR_BACKGROUND, state->default_bg);\n}\n\nINTERNAL void vterm_state_savepen(VTermState *state, int save)\n{\n  if(save) {\n    state->saved.pen = state->pen;\n  }\n  else {\n    state->pen = state->saved.pen;\n\n    setpenattr_bool(state, VTERM_ATTR_BOLD,       state->pen.bold);\n    setpenattr_int( state, VTERM_ATTR_UNDERLINE,  state->pen.underline);\n    setpenattr_bool(state, VTERM_ATTR_ITALIC,     state->pen.italic);\n    setpenattr_bool(state, VTERM_ATTR_BLINK,      state->pen.blink);\n    setpenattr_bool(state, VTERM_ATTR_REVERSE,    state->pen.reverse);\n    setpenattr_bool(state, VTERM_ATTR_STRIKE,     state->pen.strike);\n    setpenattr_int( state, VTERM_ATTR_FONT,       state->pen.font);\n    setpenattr_col( state, VTERM_ATTR_FOREGROUND, state->pen.fg);\n    setpenattr_col( state, VTERM_ATTR_BACKGROUND, state->pen.bg);\n  }\n}\n\nint vterm_color_is_equal(const VTermColor *a, const VTermColor *b)\n{\n  /* First make sure that the two colours are of the same type (RGB/Indexed) */\n  if (a->type != b->type) {\n    return false;\n  }\n\n  /* Depending on the type inspect the corresponding members */\n  if (VTERM_COLOR_IS_INDEXED(a)) {\n    return a->indexed.idx == b->indexed.idx;\n  }\n  else if (VTERM_COLOR_IS_RGB(a)) {\n    return    (a->rgb.red   == b->rgb.red)\n           && (a->rgb.green == b->rgb.green)\n           && (a->rgb.blue  == b->rgb.blue);\n  }\n\n  return 0;\n}\n\nvoid vterm_state_get_default_colors(const VTermState *state, VTermColor *default_fg, VTermColor *default_bg)\n{\n  *default_fg = state->default_fg;\n  *default_bg = state->default_bg;\n}\n\nvoid vterm_state_get_palette_color(const VTermState *state, int index, VTermColor *col)\n{\n  lookup_colour_palette(state, index, col);\n}\n\nvoid vterm_state_set_default_colors(VTermState *state, const VTermColor *default_fg, const VTermColor *default_bg)\n{\n  /* Copy the given colors */\n  state->default_fg = *default_fg;\n  state->default_bg = *default_bg;\n\n  /* Make sure the correct type flags are set */\n  state->default_fg.type = (state->default_fg.type & ~VTERM_COLOR_DEFAULT_MASK)\n                         | VTERM_COLOR_DEFAULT_FG;\n  state->default_bg.type = (state->default_bg.type & ~VTERM_COLOR_DEFAULT_MASK)\n                         | VTERM_COLOR_DEFAULT_BG;\n}\n\nvoid vterm_state_set_palette_color(VTermState *state, int index, const VTermColor *col)\n{\n  if(index >= 0 && index < 16)\n    state->colors[index] = *col;\n}\n\nvoid vterm_state_convert_color_to_rgb(const VTermState *state, VTermColor *col)\n{\n  if (VTERM_COLOR_IS_INDEXED(col)) { /* Convert indexed colors to RGB */\n    lookup_colour_palette(state, col->indexed.idx, col);\n  }\n  col->type &= VTERM_COLOR_TYPE_MASK; /* Reset any metadata but the type */\n}\n\nvoid vterm_state_set_bold_highbright(VTermState *state, int bold_is_highbright)\n{\n  state->bold_is_highbright = bold_is_highbright;\n}\n\nINTERNAL void vterm_state_setpen(VTermState *state, const long args[], int argcount)\n{\n  // SGR - ECMA-48 8.3.117\n\n  int argi = 0;\n  int value;\n\n  while(argi < argcount) {\n    // This logic is easier to do 'done' backwards; set it true, and make it\n    // false again in the 'default' case\n    int done = 1;\n\n    long arg;\n    switch(arg = CSI_ARG(args[argi])) {\n    case CSI_ARG_MISSING:\n    case 0: // Reset\n      vterm_state_resetpen(state);\n      break;\n\n    case 1: { // Bold on\n      const VTermColor *fg = &state->pen.fg;\n      state->pen.bold = 1;\n      setpenattr_bool(state, VTERM_ATTR_BOLD, 1);\n      if(!VTERM_COLOR_IS_DEFAULT_FG(fg) && VTERM_COLOR_IS_INDEXED(fg) && fg->indexed.idx < 8 && state->bold_is_highbright)\n        set_pen_col_ansi(state, VTERM_ATTR_FOREGROUND, fg->indexed.idx + (state->pen.bold ? 8 : 0));\n      break;\n    }\n\n    case 3: // Italic on\n      state->pen.italic = 1;\n      setpenattr_bool(state, VTERM_ATTR_ITALIC, 1);\n      break;\n\n    case 4: // Underline\n      state->pen.underline = VTERM_UNDERLINE_SINGLE;\n      if(CSI_ARG_HAS_MORE(args[argi])) {\n        argi++;\n        switch(CSI_ARG(args[argi])) {\n          case 0:\n            state->pen.underline = 0;\n            break;\n          case 1:\n            state->pen.underline = VTERM_UNDERLINE_SINGLE;\n            break;\n          case 2:\n            state->pen.underline = VTERM_UNDERLINE_DOUBLE;\n            break;\n          case 3:\n            state->pen.underline = VTERM_UNDERLINE_CURLY;\n            break;\n        }\n      }\n      setpenattr_int(state, VTERM_ATTR_UNDERLINE, state->pen.underline);\n      break;\n\n    case 5: // Blink\n      state->pen.blink = 1;\n      setpenattr_bool(state, VTERM_ATTR_BLINK, 1);\n      break;\n\n    case 7: // Reverse on\n      state->pen.reverse = 1;\n      setpenattr_bool(state, VTERM_ATTR_REVERSE, 1);\n      break;\n\n    case 9: // Strikethrough on\n      state->pen.strike = 1;\n      setpenattr_bool(state, VTERM_ATTR_STRIKE, 1);\n      break;\n\n    case 10: case 11: case 12: case 13: case 14:\n    case 15: case 16: case 17: case 18: case 19: // Select font\n      state->pen.font = CSI_ARG(args[argi]) - 10;\n      setpenattr_int(state, VTERM_ATTR_FONT, state->pen.font);\n      break;\n\n    case 21: // Underline double\n      state->pen.underline = VTERM_UNDERLINE_DOUBLE;\n      setpenattr_int(state, VTERM_ATTR_UNDERLINE, state->pen.underline);\n      break;\n\n    case 22: // Bold off\n      state->pen.bold = 0;\n      setpenattr_bool(state, VTERM_ATTR_BOLD, 0);\n      break;\n\n    case 23: // Italic and Gothic (currently unsupported) off\n      state->pen.italic = 0;\n      setpenattr_bool(state, VTERM_ATTR_ITALIC, 0);\n      break;\n\n    case 24: // Underline off\n      state->pen.underline = 0;\n      setpenattr_int(state, VTERM_ATTR_UNDERLINE, 0);\n      break;\n\n    case 25: // Blink off\n      state->pen.blink = 0;\n      setpenattr_bool(state, VTERM_ATTR_BLINK, 0);\n      break;\n\n    case 27: // Reverse off\n      state->pen.reverse = 0;\n      setpenattr_bool(state, VTERM_ATTR_REVERSE, 0);\n      break;\n\n    case 29: // Strikethrough off\n      state->pen.strike = 0;\n      setpenattr_bool(state, VTERM_ATTR_STRIKE, 0);\n      break;\n\n    case 30: case 31: case 32: case 33:\n    case 34: case 35: case 36: case 37: // Foreground colour palette\n      value = CSI_ARG(args[argi]) - 30;\n      if(state->pen.bold && state->bold_is_highbright)\n        value += 8;\n      set_pen_col_ansi(state, VTERM_ATTR_FOREGROUND, value);\n      break;\n\n    case 38: // Foreground colour alternative palette\n      if(argcount - argi < 1)\n        return;\n      argi += 1 + lookup_colour(state, CSI_ARG(args[argi+1]), args+argi+2, argcount-argi-2, &state->pen.fg);\n      setpenattr_col(state, VTERM_ATTR_FOREGROUND, state->pen.fg);\n      break;\n\n    case 39: // Foreground colour default\n      state->pen.fg = state->default_fg;\n      setpenattr_col(state, VTERM_ATTR_FOREGROUND, state->pen.fg);\n      break;\n\n    case 40: case 41: case 42: case 43:\n    case 44: case 45: case 46: case 47: // Background colour palette\n      value = CSI_ARG(args[argi]) - 40;\n      set_pen_col_ansi(state, VTERM_ATTR_BACKGROUND, value);\n      break;\n\n    case 48: // Background colour alternative palette\n      if(argcount - argi < 1)\n        return;\n      argi += 1 + lookup_colour(state, CSI_ARG(args[argi+1]), args+argi+2, argcount-argi-2, &state->pen.bg);\n      setpenattr_col(state, VTERM_ATTR_BACKGROUND, state->pen.bg);\n      break;\n\n    case 49: // Default background\n      state->pen.bg = state->default_bg;\n      setpenattr_col(state, VTERM_ATTR_BACKGROUND, state->pen.bg);\n      break;\n\n    case 90: case 91: case 92: case 93:\n    case 94: case 95: case 96: case 97: // Foreground colour high-intensity palette\n      value = CSI_ARG(args[argi]) - 90 + 8;\n      set_pen_col_ansi(state, VTERM_ATTR_FOREGROUND, value);\n      break;\n\n    case 100: case 101: case 102: case 103:\n    case 104: case 105: case 106: case 107: // Background colour high-intensity palette\n      value = CSI_ARG(args[argi]) - 100 + 8;\n      set_pen_col_ansi(state, VTERM_ATTR_BACKGROUND, value);\n      break;\n\n    default:\n      done = 0;\n      break;\n    }\n\n    if(!done)\n      DEBUG_LOG(\"libvterm: Unhandled CSI SGR %lu\\n\", arg);\n\n    while(CSI_ARG_HAS_MORE(args[argi++]));\n  }\n}\n\nstatic int vterm_state_getpen_color(const VTermColor *col, int argi, long args[], int fg)\n{\n    /* Do nothing if the given color is the default color */\n    if (( fg && VTERM_COLOR_IS_DEFAULT_FG(col)) ||\n        (!fg && VTERM_COLOR_IS_DEFAULT_BG(col))) {\n        return argi;\n    }\n\n    /* Decide whether to send an indexed color or an RGB color */\n    if (VTERM_COLOR_IS_INDEXED(col)) {\n        const uint8_t idx = col->indexed.idx;\n        if (idx < 8) {\n            args[argi++] = (idx + (fg ? 30 : 40));\n        }\n        else if (idx < 16) {\n            args[argi++] = (idx - 8 + (fg ? 90 : 100));\n        }\n        else {\n            args[argi++] = CSI_ARG_FLAG_MORE | (fg ? 38 : 48);\n            args[argi++] = CSI_ARG_FLAG_MORE | 5;\n            args[argi++] = idx;\n        }\n    }\n    else if (VTERM_COLOR_IS_RGB(col)) {\n        args[argi++] = CSI_ARG_FLAG_MORE | (fg ? 38 : 48);\n        args[argi++] = CSI_ARG_FLAG_MORE | 2;\n        args[argi++] = CSI_ARG_FLAG_MORE | col->rgb.red;\n        args[argi++] = CSI_ARG_FLAG_MORE | col->rgb.green;\n        args[argi++] = col->rgb.blue;\n    }\n    return argi;\n}\n\nINTERNAL int vterm_state_getpen(VTermState *state, long args[], int argcount)\n{\n  int argi = 0;\n\n  if(state->pen.bold)\n    args[argi++] = 1;\n\n  if(state->pen.italic)\n    args[argi++] = 3;\n\n  if(state->pen.underline == VTERM_UNDERLINE_SINGLE)\n    args[argi++] = 4;\n  if(state->pen.underline == VTERM_UNDERLINE_CURLY)\n    args[argi++] = 4 | CSI_ARG_FLAG_MORE, args[argi++] = 3;\n\n  if(state->pen.blink)\n    args[argi++] = 5;\n\n  if(state->pen.reverse)\n    args[argi++] = 7;\n\n  if(state->pen.strike)\n    args[argi++] = 9;\n\n  if(state->pen.font)\n    args[argi++] = 10 + state->pen.font;\n\n  if(state->pen.underline == VTERM_UNDERLINE_DOUBLE)\n    args[argi++] = 21;\n\n  argi = vterm_state_getpen_color(&state->pen.fg, argi, args, true);\n\n  argi = vterm_state_getpen_color(&state->pen.bg, argi, args, false);\n\n  return argi;\n}\n\nint vterm_state_get_penattr(const VTermState *state, VTermAttr attr, VTermValue *val)\n{\n  switch(attr) {\n  case VTERM_ATTR_BOLD:\n    val->boolean = state->pen.bold;\n    return 1;\n\n  case VTERM_ATTR_UNDERLINE:\n    val->number = state->pen.underline;\n    return 1;\n\n  case VTERM_ATTR_ITALIC:\n    val->boolean = state->pen.italic;\n    return 1;\n\n  case VTERM_ATTR_BLINK:\n    val->boolean = state->pen.blink;\n    return 1;\n\n  case VTERM_ATTR_REVERSE:\n    val->boolean = state->pen.reverse;\n    return 1;\n\n  case VTERM_ATTR_STRIKE:\n    val->boolean = state->pen.strike;\n    return 1;\n\n  case VTERM_ATTR_FONT:\n    val->number = state->pen.font;\n    return 1;\n\n  case VTERM_ATTR_FOREGROUND:\n    val->color = state->pen.fg;\n    return 1;\n\n  case VTERM_ATTR_BACKGROUND:\n    val->color = state->pen.bg;\n    return 1;\n\n  case VTERM_N_ATTRS:\n    return 0;\n  }\n\n  return 0;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/rect.h",
    "content": "/*\n * Some utility functions on VTermRect structures\n */\n\n#define STRFrect \"(%d,%d-%d,%d)\"\n#define ARGSrect(r) (r).start_row, (r).start_col, (r).end_row, (r).end_col\n\n/* Expand dst to contain src as well */\nstatic void rect_expand(VTermRect *dst, VTermRect *src)\n{\n  if(dst->start_row > src->start_row) dst->start_row = src->start_row;\n  if(dst->start_col > src->start_col) dst->start_col = src->start_col;\n  if(dst->end_row   < src->end_row)   dst->end_row   = src->end_row;\n  if(dst->end_col   < src->end_col)   dst->end_col   = src->end_col;\n}\n\n/* Clip the dst to ensure it does not step outside of bounds */\nstatic void rect_clip(VTermRect *dst, VTermRect *bounds)\n{\n  if(dst->start_row < bounds->start_row) dst->start_row = bounds->start_row;\n  if(dst->start_col < bounds->start_col) dst->start_col = bounds->start_col;\n  if(dst->end_row   > bounds->end_row)   dst->end_row   = bounds->end_row;\n  if(dst->end_col   > bounds->end_col)   dst->end_col   = bounds->end_col;\n  /* Ensure it doesn't end up negatively-sized */\n  if(dst->end_row < dst->start_row) dst->end_row = dst->start_row;\n  if(dst->end_col < dst->start_col) dst->end_col = dst->start_col;\n}\n\n/* True if the two rectangles are equal */\nstatic int rect_equal(VTermRect *a, VTermRect *b)\n{\n  return (a->start_row == b->start_row) &&\n         (a->start_col == b->start_col) &&\n         (a->end_row   == b->end_row)   &&\n         (a->end_col   == b->end_col);\n}\n\n/* True if small is contained entirely within big */\nstatic int rect_contains(VTermRect *big, VTermRect *small)\n{\n  if(small->start_row < big->start_row) return 0;\n  if(small->start_col < big->start_col) return 0;\n  if(small->end_row   > big->end_row)   return 0;\n  if(small->end_col   > big->end_col)   return 0;\n  return 1;\n}\n\n/* True if the rectangles overlap at all */\nstatic int rect_intersects(VTermRect *a, VTermRect *b)\n{\n  if(a->start_row > b->end_row || b->start_row > a->end_row)\n    return 0;\n  if(a->start_col > b->end_col || b->start_col > a->end_col)\n    return 0;\n  return 1;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/screen.c",
    "content": "#include \"vterm_internal.h\"\n\n#include <stdio.h>\n#include <string.h>\n\n#include \"rect.h\"\n#include \"utf8.h\"\n\n#define UNICODE_SPACE 0x20\n#define UNICODE_LINEFEED 0x0a\n\n/* State of the pen at some moment in time, also used in a cell */\ntypedef struct\n{\n  /* After the bitfield */\n  VTermColor   fg, bg;\n\n  unsigned int bold      : 1;\n  unsigned int underline : 2;\n  unsigned int italic    : 1;\n  unsigned int blink     : 1;\n  unsigned int reverse   : 1;\n  unsigned int strike    : 1;\n  unsigned int font      : 4; /* 0 to 9 */\n\n  /* Extra state storage that isn't strictly pen-related */\n  unsigned int protected_cell : 1;\n  unsigned int dwl            : 1; /* on a DECDWL or DECDHL line */\n  unsigned int dhl            : 2; /* on a DECDHL line (1=top 2=bottom) */\n} ScreenPen;\n\n/* Internal representation of a screen cell */\ntypedef struct\n{\n  uint32_t chars[VTERM_MAX_CHARS_PER_CELL];\n  ScreenPen pen;\n} ScreenCell;\n\nstatic int vterm_screen_set_cell(VTermScreen *screen, VTermPos pos, const VTermScreenCell *cell);\n\nstruct VTermScreen\n{\n  VTerm *vt;\n  VTermState *state;\n\n  const VTermScreenCallbacks *callbacks;\n  void *cbdata;\n\n  VTermDamageSize damage_merge;\n  /* start_row == -1 => no damage */\n  VTermRect damaged;\n  VTermRect pending_scrollrect;\n  int pending_scroll_downward, pending_scroll_rightward;\n\n  int rows;\n  int cols;\n  int global_reverse;\n\n  /* Primary and Altscreen. buffers[1] is lazily allocated as needed */\n  ScreenCell *buffers[2];\n\n  /* buffer will == buffers[0] or buffers[1], depending on altscreen */\n  ScreenCell *buffer;\n\n  /* buffer for a single screen row used in scrollback storage callbacks */\n  VTermScreenCell *sb_buffer;\n\n  ScreenPen pen;\n};\n\nstatic inline ScreenCell *getcell(const VTermScreen *screen, int row, int col)\n{\n  if(row < 0 || row >= screen->rows)\n    return NULL;\n  if(col < 0 || col >= screen->cols)\n    return NULL;\n  return screen->buffer + (screen->cols * row) + col;\n}\n\nstatic ScreenCell *realloc_buffer(VTermScreen *screen, ScreenCell *buffer, int new_rows, int new_cols)\n{\n  ScreenCell *new_buffer = vterm_allocator_malloc(screen->vt, sizeof(ScreenCell) * new_rows * new_cols);\n  int row = 0;\n  int col = 0;\n  for(row = 0; row < new_rows; row++) {\n    for(col = 0; col < new_cols; col++) {\n      ScreenCell *new_cell = new_buffer + row*new_cols + col;\n\n      if(buffer && row < screen->rows && col < screen->cols)\n        *new_cell = buffer[row * screen->cols + col];\n      else {\n        new_cell->chars[0] = 0;\n        new_cell->pen = screen->pen;\n      }\n    }\n  }\n\n  vterm_allocator_free(screen->vt, buffer);\n\n  return new_buffer;\n}\n\nstatic void damagerect(VTermScreen *screen, VTermRect rect)\n{\n  VTermRect emit;\n\n  switch(screen->damage_merge) {\n  case VTERM_DAMAGE_CELL:\n    /* Always emit damage event */\n    emit = rect;\n    break;\n\n  case VTERM_DAMAGE_ROW:\n    /* Emit damage longer than one row. Try to merge with existing damage in\n     * the same row */\n    if(rect.end_row > rect.start_row + 1) {\n      // Bigger than 1 line - flush existing, emit this\n      vterm_screen_flush_damage(screen);\n      emit = rect;\n    }\n    else if(screen->damaged.start_row == -1) {\n      // None stored yet\n      screen->damaged = rect;\n      return;\n    }\n    else if(rect.start_row == screen->damaged.start_row) {\n      // Merge with the stored line\n      if(screen->damaged.start_col > rect.start_col)\n        screen->damaged.start_col = rect.start_col;\n      if(screen->damaged.end_col < rect.end_col)\n        screen->damaged.end_col = rect.end_col;\n      return;\n    }\n    else {\n      // Emit the currently stored line, store a new one\n      emit = screen->damaged;\n      screen->damaged = rect;\n    }\n    break;\n\n  case VTERM_DAMAGE_SCREEN:\n  case VTERM_DAMAGE_SCROLL:\n    /* Never emit damage event */\n    if(screen->damaged.start_row == -1)\n      screen->damaged = rect;\n    else {\n      rect_expand(&screen->damaged, &rect);\n    }\n    return;\n\n  default:\n    DEBUG_LOG(\"TODO: Maybe merge damage for level %d\\n\", screen->damage_merge);\n    return;\n  }\n\n  if(screen->callbacks && screen->callbacks->damage)\n    (*screen->callbacks->damage)(emit, screen->cbdata);\n}\n\nstatic void damagescreen(VTermScreen *screen)\n{\n  VTermRect rect = {\n    .start_row = 0,\n    .end_row   = screen->rows,\n    .start_col = 0,\n    .end_col   = screen->cols,\n  };\n\n  damagerect(screen, rect);\n}\n\nstatic int putglyph(VTermGlyphInfo *info, VTermPos pos, void *user)\n{\n  VTermScreen *screen = user;\n  ScreenCell *cell = getcell(screen, pos.row, pos.col);\n\n  if(!cell)\n    return 0;\n\n  int i;\n  int col;\n  for(i = 0; i < VTERM_MAX_CHARS_PER_CELL && info->chars[i]; i++) {\n    cell->chars[i] = info->chars[i];\n    cell->pen = screen->pen;\n  }\n  if(i < VTERM_MAX_CHARS_PER_CELL)\n    cell->chars[i] = 0;\n\n  for(col = 1; col < info->width; col++)\n    getcell(screen, pos.row, pos.col + col)->chars[0] = (uint32_t)-1;\n\n  VTermRect rect = {\n    .start_row = pos.row,\n    .end_row   = pos.row+1,\n    .start_col = pos.col,\n    .end_col   = pos.col+info->width,\n  };\n\n  cell->pen.protected_cell = info->protected_cell;\n  cell->pen.dwl            = info->dwl;\n  cell->pen.dhl            = info->dhl;\n\n  damagerect(screen, rect);\n\n  return 1;\n}\n\nstatic int moverect_internal(VTermRect dest, VTermRect src, void *user)\n{\n  VTermScreen *screen = user;\n\n  if(screen->callbacks && screen->callbacks->sb_pushline &&\n     dest.start_row == 0 && dest.start_col == 0 &&  // starts top-left corner\n     dest.end_col == screen->cols &&                // full width\n     screen->buffer == screen->buffers[0]) {        // not altscreen\n    VTermPos pos;\n    for(pos.row = 0; pos.row < src.start_row; pos.row++) {\n      for(pos.col = 0; pos.col < screen->cols; pos.col++)\n        vterm_screen_get_cell(screen, pos, screen->sb_buffer + pos.col);\n\n      (screen->callbacks->sb_pushline)(screen->cols, screen->sb_buffer, screen->cbdata);\n    }\n  }\n\n  int cols = src.end_col - src.start_col;\n  int downward = src.start_row - dest.start_row;\n\n  int init_row, test_row, inc_row;\n  if(downward < 0) {\n    init_row = dest.end_row - 1;\n    test_row = dest.start_row - 1;\n    inc_row  = -1;\n  }\n  else {\n    init_row = dest.start_row;\n    test_row = dest.end_row;\n    inc_row  = +1;\n  }\n  int row;\n\n  for(row = init_row; row != test_row; row += inc_row)\n    memmove(getcell(screen, row, dest.start_col),\n            getcell(screen, row + downward, src.start_col),\n            cols * sizeof(ScreenCell));\n\n  return 1;\n}\n\nstatic int moverect_user(VTermRect dest, VTermRect src, void *user)\n{\n  VTermScreen *screen = user;\n\n  if(screen->callbacks && screen->callbacks->moverect) {\n    if(screen->damage_merge != VTERM_DAMAGE_SCROLL)\n      // Avoid an infinite loop\n      vterm_screen_flush_damage(screen);\n\n    if((*screen->callbacks->moverect)(dest, src, screen->cbdata))\n      return 1;\n  }\n\n  damagerect(screen, dest);\n\n  return 1;\n}\n\nstatic int erase_internal(VTermRect rect, int selective, void *user)\n{\n  VTermScreen *screen = user;\n  int row,col;\n  for(row = rect.start_row; row < screen->state->rows && row < rect.end_row; row++) {\n    const VTermLineInfo *info = vterm_state_get_lineinfo(screen->state, row);\n\n    for(col = rect.start_col; col < rect.end_col; col++) {\n      ScreenCell *cell = getcell(screen, row, col);\n\n      if(selective && cell->pen.protected_cell)\n        continue;\n\n      cell->chars[0] = 0;\n      cell->pen = screen->pen;\n      cell->pen.dwl = info->doublewidth;\n      cell->pen.dhl = info->doubleheight;\n    }\n  }\n\n  return 1;\n}\n\nstatic int erase_user(VTermRect rect, int selective, void *user)\n{\n  VTermScreen *screen = user;\n\n  damagerect(screen, rect);\n\n  return 1;\n}\n\nstatic int erase(VTermRect rect, int selective, void *user)\n{\n  erase_internal(rect, selective, user);\n  return erase_user(rect, 0, user);\n}\n\nstatic int scrollrect(VTermRect rect, int downward, int rightward, void *user)\n{\n  VTermScreen *screen = user;\n\n  if(screen->damage_merge != VTERM_DAMAGE_SCROLL) {\n    vterm_scroll_rect(rect, downward, rightward,\n        moverect_internal, erase_internal, screen);\n\n    vterm_screen_flush_damage(screen);\n\n    vterm_scroll_rect(rect, downward, rightward,\n        moverect_user, erase_user, screen);\n\n    return 1;\n  }\n\n  if(screen->damaged.start_row != -1 &&\n     !rect_intersects(&rect, &screen->damaged)) {\n    vterm_screen_flush_damage(screen);\n  }\n\n  if(screen->pending_scrollrect.start_row == -1) {\n    screen->pending_scrollrect = rect;\n    screen->pending_scroll_downward  = downward;\n    screen->pending_scroll_rightward = rightward;\n  }\n  else if(rect_equal(&screen->pending_scrollrect, &rect) &&\n     ((screen->pending_scroll_downward  == 0 && downward  == 0) ||\n      (screen->pending_scroll_rightward == 0 && rightward == 0))) {\n    screen->pending_scroll_downward  += downward;\n    screen->pending_scroll_rightward += rightward;\n  }\n  else {\n    vterm_screen_flush_damage(screen);\n\n    screen->pending_scrollrect = rect;\n    screen->pending_scroll_downward  = downward;\n    screen->pending_scroll_rightward = rightward;\n  }\n\n  vterm_scroll_rect(rect, downward, rightward,\n      moverect_internal, erase_internal, screen);\n\n  if(screen->damaged.start_row == -1)\n    return 1;\n\n  if(rect_contains(&rect, &screen->damaged)) {\n    /* Scroll region entirely contains the damage; just move it */\n    vterm_rect_move(&screen->damaged, -downward, -rightward);\n    rect_clip(&screen->damaged, &rect);\n  }\n  /* There are a number of possible cases here, but lets restrict this to only\n   * the common case where we might actually gain some performance by\n   * optimising it. Namely, a vertical scroll that neatly cuts the damage\n   * region in half.\n   */\n  else if(rect.start_col <= screen->damaged.start_col &&\n          rect.end_col   >= screen->damaged.end_col &&\n          rightward == 0) {\n    if(screen->damaged.start_row >= rect.start_row &&\n       screen->damaged.start_row  < rect.end_row) {\n      screen->damaged.start_row -= downward;\n      if(screen->damaged.start_row < rect.start_row)\n        screen->damaged.start_row = rect.start_row;\n      if(screen->damaged.start_row > rect.end_row)\n        screen->damaged.start_row = rect.end_row;\n    }\n    if(screen->damaged.end_row >= rect.start_row &&\n       screen->damaged.end_row  < rect.end_row) {\n      screen->damaged.end_row -= downward;\n      if(screen->damaged.end_row < rect.start_row)\n        screen->damaged.end_row = rect.start_row;\n      if(screen->damaged.end_row > rect.end_row)\n        screen->damaged.end_row = rect.end_row;\n    }\n  }\n  else {\n    DEBUG_LOG(\"TODO: Just flush and redo damaged=\" STRFrect \" rect=\" STRFrect \"\\n\",\n        ARGSrect(screen->damaged), ARGSrect(rect));\n  }\n\n  return 1;\n}\n\nstatic int movecursor(VTermPos pos, VTermPos oldpos, int visible, void *user)\n{\n  VTermScreen *screen = user;\n\n  if(screen->callbacks && screen->callbacks->movecursor)\n    return (*screen->callbacks->movecursor)(pos, oldpos, visible, screen->cbdata);\n\n  return 0;\n}\n\nstatic int setpenattr(VTermAttr attr, VTermValue *val, void *user)\n{\n  VTermScreen *screen = user;\n\n  switch(attr) {\n  case VTERM_ATTR_BOLD:\n    screen->pen.bold = val->boolean;\n    return 1;\n  case VTERM_ATTR_UNDERLINE:\n    screen->pen.underline = val->number;\n    return 1;\n  case VTERM_ATTR_ITALIC:\n    screen->pen.italic = val->boolean;\n    return 1;\n  case VTERM_ATTR_BLINK:\n    screen->pen.blink = val->boolean;\n    return 1;\n  case VTERM_ATTR_REVERSE:\n    screen->pen.reverse = val->boolean;\n    return 1;\n  case VTERM_ATTR_STRIKE:\n    screen->pen.strike = val->boolean;\n    return 1;\n  case VTERM_ATTR_FONT:\n    screen->pen.font = val->number;\n    return 1;\n  case VTERM_ATTR_FOREGROUND:\n    screen->pen.fg = val->color;\n    return 1;\n  case VTERM_ATTR_BACKGROUND:\n    screen->pen.bg = val->color;\n    return 1;\n\n  case VTERM_N_ATTRS:\n    return 0;\n  }\n\n  return 0;\n}\n\nstatic int settermprop(VTermProp prop, VTermValue *val, void *user)\n{\n  VTermScreen *screen = user;\n\n  switch(prop) {\n  case VTERM_PROP_ALTSCREEN:\n    if(val->boolean && !screen->buffers[1])\n      return 0;\n\n    screen->buffer = val->boolean ? screen->buffers[1] : screen->buffers[0];\n    /* only send a damage event on disable; because during enable there's an\n     * erase that sends a damage anyway\n     */\n    if(!val->boolean)\n      damagescreen(screen);\n    break;\n  case VTERM_PROP_REVERSE:\n    screen->global_reverse = val->boolean;\n    damagescreen(screen);\n    break;\n  default:\n    ; /* ignore */\n  }\n\n  if(screen->callbacks && screen->callbacks->settermprop)\n    return (*screen->callbacks->settermprop)(prop, val, screen->cbdata);\n\n  return 1;\n}\n\nstatic int bell(void *user)\n{\n  VTermScreen *screen = user;\n\n  if(screen->callbacks && screen->callbacks->bell)\n    return (*screen->callbacks->bell)(screen->cbdata);\n\n  return 0;\n}\n\nstatic int resize(int new_rows, int new_cols, VTermPos *delta, void *user)\n{\n  VTermScreen *screen = user;\n\n  int is_altscreen = (screen->buffers[1] && screen->buffer == screen->buffers[1]);\n\n  int old_rows = screen->rows;\n  int old_cols = screen->cols;\n\n  if(!is_altscreen && new_rows < old_rows) {\n    // Fewer rows - determine if we're going to scroll at all, and if so, push\n    // those lines to scrollback\n    VTermPos pos = { 0, 0 };\n    VTermPos cursor = screen->state->pos;\n    // Find the first blank row after the cursor.\n    for(pos.row = old_rows - 1; pos.row >= new_rows; pos.row--)\n      if(!vterm_screen_is_eol(screen, pos) || cursor.row == pos.row)\n        break;\n\n    int first_blank_row = pos.row + 1;\n    if(first_blank_row > new_rows) {\n      VTermRect rect = {\n        .start_row = 0,\n        .end_row   = old_rows,\n        .start_col = 0,\n        .end_col   = old_cols,\n      };\n      scrollrect(rect, first_blank_row - new_rows, 0, user);\n      vterm_screen_flush_damage(screen);\n\n      delta->row -= first_blank_row - new_rows;\n    }\n  }\n\n  screen->buffers[0] = realloc_buffer(screen, screen->buffers[0], new_rows, new_cols);\n  if(screen->buffers[1])\n    screen->buffers[1] = realloc_buffer(screen, screen->buffers[1], new_rows, new_cols);\n\n  screen->buffer = is_altscreen ? screen->buffers[1] : screen->buffers[0];\n\n  screen->rows = new_rows;\n  screen->cols = new_cols;\n\n  vterm_allocator_free(screen->vt, screen->sb_buffer);\n\n  screen->sb_buffer = vterm_allocator_malloc(screen->vt, sizeof(VTermScreenCell) * new_cols);\n\n  if(new_cols > old_cols) {\n    VTermRect rect = {\n      .start_row = 0,\n      .end_row   = old_rows,\n      .start_col = old_cols,\n      .end_col   = new_cols,\n    };\n    damagerect(screen, rect);\n  }\n\n  if(new_rows > old_rows) {\n    if(!is_altscreen && screen->callbacks && screen->callbacks->sb_popline) {\n      int rows = new_rows - old_rows;\n      while(rows) {\n        if(!(screen->callbacks->sb_popline(screen->cols, screen->sb_buffer, screen->cbdata)))\n          break;\n\n        VTermRect rect = {\n          .start_row = 0,\n          .end_row   = screen->rows,\n          .start_col = 0,\n          .end_col   = screen->cols,\n        };\n        scrollrect(rect, -1, 0, user);\n\n        VTermPos pos = { 0, 0 };\n        for(pos.col = 0; pos.col < screen->cols; pos.col += screen->sb_buffer[pos.col].width)\n          vterm_screen_set_cell(screen, pos, screen->sb_buffer + pos.col);\n\n        rect.end_row = 1;\n        damagerect(screen, rect);\n\n        vterm_screen_flush_damage(screen);\n\n        rows--;\n        delta->row++;\n      }\n    }\n\n    VTermRect rect = {\n      .start_row = old_rows,\n      .end_row   = new_rows,\n      .start_col = 0,\n      .end_col   = new_cols,\n    };\n    damagerect(screen, rect);\n  }\n\n  if(screen->callbacks && screen->callbacks->resize)\n    return (*screen->callbacks->resize)(new_rows, new_cols, screen->cbdata);\n\n  return 1;\n}\n\nstatic int setlineinfo(int row, const VTermLineInfo *newinfo, const VTermLineInfo *oldinfo, void *user)\n{\n  VTermScreen *screen = user;\n  int col;\n  if(newinfo->doublewidth != oldinfo->doublewidth ||\n     newinfo->doubleheight != oldinfo->doubleheight) {\n    for(col = 0; col < screen->cols; col++) {\n      ScreenCell *cell = getcell(screen, row, col);\n      cell->pen.dwl = newinfo->doublewidth;\n      cell->pen.dhl = newinfo->doubleheight;\n    }\n\n    VTermRect rect = {\n      .start_row = row,\n      .end_row   = row + 1,\n      .start_col = 0,\n      .end_col   = newinfo->doublewidth ? screen->cols / 2 : screen->cols,\n    };\n    damagerect(screen, rect);\n\n    if(newinfo->doublewidth) {\n      rect.start_col = screen->cols / 2;\n      rect.end_col   = screen->cols;\n\n      erase_internal(rect, 0, user);\n    }\n  }\n\n  return 1;\n}\n\nstatic VTermStateCallbacks state_cbs = {\n  .putglyph    = &putglyph,\n  .movecursor  = &movecursor,\n  .scrollrect  = &scrollrect,\n  .erase       = &erase,\n  .setpenattr  = &setpenattr,\n  .settermprop = &settermprop,\n  .bell        = &bell,\n  .resize      = &resize,\n  .setlineinfo = &setlineinfo,\n};\n\nstatic VTermScreen *screen_new(VTerm *vt)\n{\n  VTermState *state = vterm_obtain_state(vt);\n  if (state == NULL)\n    return NULL;\n\n  VTermScreen *screen = vterm_allocator_malloc(vt, sizeof(VTermScreen));\n  if (screen == NULL)\n    return NULL;\n\n  int rows, cols;\n\n  vterm_get_size(vt, &rows, &cols);\n\n  screen->vt = vt;\n  screen->state = state;\n\n  screen->damage_merge = VTERM_DAMAGE_CELL;\n  screen->damaged.start_row = -1;\n  screen->pending_scrollrect.start_row = -1;\n\n  screen->rows = rows;\n  screen->cols = cols;\n\n  screen->callbacks = NULL;\n  screen->cbdata    = NULL;\n\n  screen->buffers[0] = realloc_buffer(screen, NULL, rows, cols);\n\n  screen->buffer = screen->buffers[0];\n\n  screen->sb_buffer = vterm_allocator_malloc(screen->vt, sizeof(VTermScreenCell) * cols);\n\n  if (screen->buffer == NULL || screen->sb_buffer == NULL)\n  {\n    vterm_screen_free(screen);\n    return NULL;\n  }\n\n  vterm_state_set_callbacks(screen->state, &state_cbs, screen);\n\n  return screen;\n}\n\nINTERNAL void vterm_screen_free(VTermScreen *screen)\n{\n  vterm_allocator_free(screen->vt, screen->buffers[0]);\n  vterm_allocator_free(screen->vt, screen->buffers[1]);\n  vterm_allocator_free(screen->vt, screen->sb_buffer);\n  vterm_allocator_free(screen->vt, screen);\n}\n\nvoid vterm_screen_reset(VTermScreen *screen, int hard)\n{\n  screen->damaged.start_row = -1;\n  screen->pending_scrollrect.start_row = -1;\n  vterm_state_reset(screen->state, hard);\n  vterm_screen_flush_damage(screen);\n}\n\nstatic size_t _get_chars(const VTermScreen *screen, const int utf8, void *buffer, size_t len, const VTermRect rect)\n{\n  size_t outpos = 0;\n  int padding = 0;\n\n#define PUT(c)                                             \\\n  if(utf8) {                                               \\\n    size_t thislen = utf8_seqlen(c);                       \\\n    if(buffer && outpos + thislen <= len)                  \\\n      outpos += fill_utf8((c), (char *)buffer + outpos);   \\\n    else                                                   \\\n      outpos += thislen;                                   \\\n  }                                                        \\\n  else {                                                   \\\n    if(buffer && outpos + 1 <= len)                        \\\n      ((uint32_t*)buffer)[outpos++] = (c);                 \\\n    else                                                   \\\n      outpos++;                                            \\\n  }\n  int row,col,i;\n  for(row = rect.start_row; row < rect.end_row; row++) {\n    for(col = rect.start_col; col < rect.end_col; col++) {\n      ScreenCell *cell = getcell(screen, row, col);\n\n      if(cell->chars[0] == 0)\n        // Erased cell, might need a space\n        padding++;\n      else if(cell->chars[0] == (uint32_t)-1)\n        // Gap behind a double-width char, do nothing\n        ;\n      else {\n        while(padding) {\n          PUT(UNICODE_SPACE);\n          padding--;\n        }\n        for(i = 0; i < VTERM_MAX_CHARS_PER_CELL && cell->chars[i]; i++) {\n          PUT(cell->chars[i]);\n        }\n      }\n    }\n\n    if(row < rect.end_row - 1) {\n      PUT(UNICODE_LINEFEED);\n      padding = 0;\n    }\n  }\n\n  return outpos;\n}\n\nsize_t vterm_screen_get_chars(const VTermScreen *screen, uint32_t *chars, size_t len, const VTermRect rect)\n{\n  return _get_chars(screen, 0, chars, len, rect);\n}\n\nsize_t vterm_screen_get_text(const VTermScreen *screen, char *str, size_t len, const VTermRect rect)\n{\n  return _get_chars(screen, 1, str, len, rect);\n}\n\n/* Copy internal to external representation of a screen cell */\nint vterm_screen_get_cell(const VTermScreen *screen, VTermPos pos, VTermScreenCell *cell)\n{\n  ScreenCell *intcell = getcell(screen, pos.row, pos.col);\n  if(!intcell)\n    return 0;\n  int i;\n  for(i = 0; i < VTERM_MAX_CHARS_PER_CELL; i++) {\n    cell->chars[i] = intcell->chars[i];\n    if(!intcell->chars[i])\n      break;\n  }\n\n  cell->attrs.bold      = intcell->pen.bold;\n  cell->attrs.underline = intcell->pen.underline;\n  cell->attrs.italic    = intcell->pen.italic;\n  cell->attrs.blink     = intcell->pen.blink;\n  cell->attrs.reverse   = intcell->pen.reverse ^ screen->global_reverse;\n  cell->attrs.strike    = intcell->pen.strike;\n  cell->attrs.font      = intcell->pen.font;\n\n  cell->attrs.dwl = intcell->pen.dwl;\n  cell->attrs.dhl = intcell->pen.dhl;\n\n  cell->fg = intcell->pen.fg;\n  cell->bg = intcell->pen.bg;\n\n  if(pos.col < (screen->cols - 1) &&\n     getcell(screen, pos.row, pos.col + 1)->chars[0] == (uint32_t)-1)\n    cell->width = 2;\n  else\n    cell->width = 1;\n\n  return 1;\n}\n\n/* Copy external to internal representation of a screen cell */\n/* static because it's only used internally for sb_popline during resize */\nstatic int vterm_screen_set_cell(VTermScreen *screen, VTermPos pos, const VTermScreenCell *cell)\n{\n  ScreenCell *intcell = getcell(screen, pos.row, pos.col);\n  if(!intcell)\n    return 0;\n  int i = 0;\n  for(i = 0; i < VTERM_MAX_CHARS_PER_CELL; i++) {\n    intcell->chars[i] = cell->chars[i];\n    if(!cell->chars[i])\n      break;\n  }\n\n  intcell->pen.bold      = cell->attrs.bold;\n  intcell->pen.underline = cell->attrs.underline;\n  intcell->pen.italic    = cell->attrs.italic;\n  intcell->pen.blink     = cell->attrs.blink;\n  intcell->pen.reverse   = cell->attrs.reverse ^ screen->global_reverse;\n  intcell->pen.strike    = cell->attrs.strike;\n  intcell->pen.font      = cell->attrs.font;\n\n  intcell->pen.fg = cell->fg;\n  intcell->pen.bg = cell->bg;\n\n  if(cell->width == 2)\n    getcell(screen, pos.row, pos.col + 1)->chars[0] = (uint32_t)-1;\n\n  return 1;\n}\n\nint vterm_screen_is_eol(const VTermScreen *screen, VTermPos pos)\n{\n  /* This cell is EOL if this and every cell to the right is black */\n  for(; pos.col < screen->cols; pos.col++) {\n    ScreenCell *cell = getcell(screen, pos.row, pos.col);\n    if(cell->chars[0] != 0)\n      return 0;\n  }\n\n  return 1;\n}\n\nVTermScreen *vterm_obtain_screen(VTerm *vt)\n{\n  if(vt->screen)\n    return vt->screen;\n\n  VTermScreen *screen = screen_new(vt);\n  vt->screen = screen;\n\n  return screen;\n}\n\nvoid vterm_screen_enable_altscreen(VTermScreen *screen, int altscreen)\n{\n\n  if(!screen->buffers[1] && altscreen) {\n    int rows, cols;\n    vterm_get_size(screen->vt, &rows, &cols);\n\n    screen->buffers[1] = realloc_buffer(screen, NULL, rows, cols);\n  }\n}\n\nvoid vterm_screen_set_callbacks(VTermScreen *screen, const VTermScreenCallbacks *callbacks, void *user)\n{\n  screen->callbacks = callbacks;\n  screen->cbdata = user;\n}\n\nvoid *vterm_screen_get_cbdata(VTermScreen *screen)\n{\n  return screen->cbdata;\n}\n\nvoid vterm_screen_set_unrecognised_fallbacks(VTermScreen *screen, const VTermParserCallbacks *fallbacks, void *user)\n{\n  vterm_state_set_unrecognised_fallbacks(screen->state, fallbacks, user);\n}\n\nvoid *vterm_screen_get_unrecognised_fbdata(VTermScreen *screen)\n{\n  return vterm_state_get_unrecognised_fbdata(screen->state);\n}\n\nvoid vterm_screen_flush_damage(VTermScreen *screen)\n{\n  if(screen->pending_scrollrect.start_row != -1) {\n    vterm_scroll_rect(screen->pending_scrollrect, screen->pending_scroll_downward, screen->pending_scroll_rightward,\n        moverect_user, erase_user, screen);\n\n    screen->pending_scrollrect.start_row = -1;\n  }\n\n  if(screen->damaged.start_row != -1) {\n    if(screen->callbacks && screen->callbacks->damage)\n      (*screen->callbacks->damage)(screen->damaged, screen->cbdata);\n\n    screen->damaged.start_row = -1;\n  }\n}\n\nvoid vterm_screen_set_damage_merge(VTermScreen *screen, VTermDamageSize size)\n{\n  vterm_screen_flush_damage(screen);\n  screen->damage_merge = size;\n}\n\nstatic int attrs_differ(VTermAttrMask attrs, ScreenCell *a, ScreenCell *b)\n{\n  if((attrs & VTERM_ATTR_BOLD_MASK)       && (a->pen.bold != b->pen.bold))\n    return 1;\n  if((attrs & VTERM_ATTR_UNDERLINE_MASK)  && (a->pen.underline != b->pen.underline))\n    return 1;\n  if((attrs & VTERM_ATTR_ITALIC_MASK)     && (a->pen.italic != b->pen.italic))\n    return 1;\n  if((attrs & VTERM_ATTR_BLINK_MASK)      && (a->pen.blink != b->pen.blink))\n    return 1;\n  if((attrs & VTERM_ATTR_REVERSE_MASK)    && (a->pen.reverse != b->pen.reverse))\n    return 1;\n  if((attrs & VTERM_ATTR_STRIKE_MASK)     && (a->pen.strike != b->pen.strike))\n    return 1;\n  if((attrs & VTERM_ATTR_FONT_MASK)       && (a->pen.font != b->pen.font))\n    return 1;\n  if((attrs & VTERM_ATTR_FOREGROUND_MASK) && !vterm_color_is_equal(&a->pen.fg, &b->pen.fg))\n    return 1;\n  if((attrs & VTERM_ATTR_BACKGROUND_MASK) && !vterm_color_is_equal(&a->pen.bg, &b->pen.bg))\n    return 1;\n\n  return 0;\n}\n\nint vterm_screen_get_attrs_extent(const VTermScreen *screen, VTermRect *extent, VTermPos pos, VTermAttrMask attrs)\n{\n  ScreenCell *target = getcell(screen, pos.row, pos.col);\n\n  // TODO: bounds check\n  extent->start_row = pos.row;\n  extent->end_row   = pos.row + 1;\n\n  if(extent->start_col < 0)\n    extent->start_col = 0;\n  if(extent->end_col < 0)\n    extent->end_col = screen->cols;\n\n  int col;\n\n  for(col = pos.col - 1; col >= extent->start_col; col--)\n    if(attrs_differ(attrs, target, getcell(screen, pos.row, col)))\n      break;\n  extent->start_col = col + 1;\n\n  for(col = pos.col + 1; col < extent->end_col; col++)\n    if(attrs_differ(attrs, target, getcell(screen, pos.row, col)))\n      break;\n  extent->end_col = col - 1;\n\n  return 1;\n}\n\nvoid vterm_screen_convert_color_to_rgb(const VTermScreen *screen, VTermColor *col)\n{\n  vterm_state_convert_color_to_rgb(screen->state, col);\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/state.c",
    "content": "#include \"vterm_internal.h\"\n\n#include <stdio.h>\n#include <string.h>\n\n#define strneq(a,b,n) (strncmp(a,b,n)==0)\n\n#if defined(DEBUG) && DEBUG > 1\n# define DEBUG_GLYPH_COMBINE\n#endif\n\n/* Some convenient wrappers to make callback functions easier */\n\nstatic void putglyph(VTermState *state, const uint32_t chars[], int width, VTermPos pos)\n{\n  VTermGlyphInfo info = {\n    .chars = chars,\n    .width = width,\n    .protected_cell = state->protected_cell,\n    .dwl = state->lineinfo[pos.row].doublewidth,\n    .dhl = state->lineinfo[pos.row].doubleheight,\n  };\n\n  if(state->callbacks && state->callbacks->putglyph)\n    if((*state->callbacks->putglyph)(&info, pos, state->cbdata))\n      return;\n\n  DEBUG_LOG(\"libvterm: Unhandled putglyph U+%04x at (%d,%d)\\n\", chars[0], pos.col, pos.row);\n}\n\nstatic void updatecursor(VTermState *state, VTermPos *oldpos, int cancel_phantom)\n{\n  if(state->pos.col == oldpos->col && state->pos.row == oldpos->row)\n    return;\n\n  if(cancel_phantom)\n    state->at_phantom = 0;\n\n  if(state->callbacks && state->callbacks->movecursor)\n    if((*state->callbacks->movecursor)(state->pos, *oldpos, state->mode.cursor_visible, state->cbdata))\n      return;\n}\n\nstatic void erase(VTermState *state, VTermRect rect, int selective)\n{\n  if(state->callbacks && state->callbacks->erase)\n    if((*state->callbacks->erase)(rect, selective, state->cbdata))\n      return;\n}\n\nstatic VTermState *vterm_state_new(VTerm *vt)\n{\n  VTermState *state = vterm_allocator_malloc(vt, sizeof(VTermState));\n\n  if (state == NULL)\n    return NULL;\n  state->vt = vt;\n\n  state->rows = vt->rows;\n  state->cols = vt->cols;\n\n  state->mouse_col     = 0;\n  state->mouse_row     = 0;\n  state->mouse_buttons = 0;\n\n  state->mouse_protocol = MOUSE_X10;\n\n  state->callbacks = NULL;\n  state->cbdata    = NULL;\n\n  vterm_state_newpen(state);\n\n  state->bold_is_highbright = 0;\n\n  return state;\n}\n\nINTERNAL void vterm_state_free(VTermState *state)\n{\n  vterm_allocator_free(state->vt, state->tabstops);\n  vterm_allocator_free(state->vt, state->lineinfo);\n  vterm_allocator_free(state->vt, state->combine_chars);\n  vterm_allocator_free(state->vt, state);\n}\n\nstatic void scroll(VTermState *state, VTermRect rect, int downward, int rightward)\n{\n  if(!downward && !rightward)\n    return;\n\n  int rows = rect.end_row - rect.start_row;\n  if(downward > rows)\n    downward = rows;\n  else if(downward < -rows)\n    downward = -rows;\n\n  int cols = rect.end_col - rect.start_col;\n  if(rightward > cols)\n    rightward = cols;\n  else if(rightward < -cols)\n    rightward = -cols;\n\n  // Update lineinfo if full line\n  if(rect.start_col == 0 && rect.end_col == state->cols && rightward == 0) {\n    int height = rect.end_row - rect.start_row - abs(downward);\n\n    if(downward > 0)\n      memmove(state->lineinfo + rect.start_row,\n              state->lineinfo + rect.start_row + downward,\n              height * sizeof(state->lineinfo[0]));\n    else\n      memmove(state->lineinfo + rect.start_row - downward,\n              state->lineinfo + rect.start_row,\n              height * sizeof(state->lineinfo[0]));\n  }\n\n  if(state->callbacks && state->callbacks->scrollrect)\n    if((*state->callbacks->scrollrect)(rect, downward, rightward, state->cbdata))\n      return;\n\n  if(state->callbacks)\n    vterm_scroll_rect(rect, downward, rightward,\n        state->callbacks->moverect, state->callbacks->erase, state->cbdata);\n}\n\nstatic void linefeed(VTermState *state)\n{\n  if(state->pos.row == SCROLLREGION_BOTTOM(state) - 1) {\n    VTermRect rect = {\n      .start_row = state->scrollregion_top,\n      .end_row   = SCROLLREGION_BOTTOM(state),\n      .start_col = SCROLLREGION_LEFT(state),\n      .end_col   = SCROLLREGION_RIGHT(state),\n    };\n\n    scroll(state, rect, 1, 0);\n  }\n  else if(state->pos.row < state->rows-1)\n    state->pos.row++;\n}\n\nstatic void grow_combine_buffer(VTermState *state)\n{\n  size_t    new_size = state->combine_chars_size * 2;\n  uint32_t *new_chars = vterm_allocator_malloc(state->vt, new_size * sizeof(new_chars[0]));\n\n  memcpy(new_chars, state->combine_chars, state->combine_chars_size * sizeof(new_chars[0]));\n\n  vterm_allocator_free(state->vt, state->combine_chars);\n\n  state->combine_chars = new_chars;\n  state->combine_chars_size = new_size;\n}\n\nstatic void set_col_tabstop(VTermState *state, int col)\n{\n  unsigned char mask = 1 << (col & 7);\n  state->tabstops[col >> 3] |= mask;\n}\n\nstatic void clear_col_tabstop(VTermState *state, int col)\n{\n  unsigned char mask = 1 << (col & 7);\n  state->tabstops[col >> 3] &= ~mask;\n}\n\nstatic int is_col_tabstop(VTermState *state, int col)\n{\n  unsigned char mask = 1 << (col & 7);\n  return state->tabstops[col >> 3] & mask;\n}\n\nstatic int is_cursor_in_scrollregion(const VTermState *state)\n{\n  if(state->pos.row < state->scrollregion_top ||\n     state->pos.row >= SCROLLREGION_BOTTOM(state))\n    return 0;\n  if(state->pos.col < SCROLLREGION_LEFT(state) ||\n     state->pos.col >= SCROLLREGION_RIGHT(state))\n    return 0;\n\n  return 1;\n}\n\nstatic void tab(VTermState *state, int count, int direction)\n{\n  while(count > 0) {\n    if(direction > 0) {\n      if(state->pos.col >= THISROWWIDTH(state)-1)\n        return;\n\n      state->pos.col++;\n    }\n    else if(direction < 0) {\n      if(state->pos.col < 1)\n        return;\n\n      state->pos.col--;\n    }\n\n    if(is_col_tabstop(state, state->pos.col))\n      count--;\n  }\n}\n\n#define NO_FORCE 0\n#define FORCE    1\n\n#define DWL_OFF 0\n#define DWL_ON  1\n\n#define DHL_OFF    0\n#define DHL_TOP    1\n#define DHL_BOTTOM 2\n\nstatic void set_lineinfo(VTermState *state, int row, int force, int dwl, int dhl)\n{\n  VTermLineInfo info = state->lineinfo[row];\n\n  if(dwl == DWL_OFF)\n    info.doublewidth = DWL_OFF;\n  else if(dwl == DWL_ON)\n    info.doublewidth = DWL_ON;\n  // else -1 to ignore\n\n  if(dhl == DHL_OFF)\n    info.doubleheight = DHL_OFF;\n  else if(dhl == DHL_TOP)\n    info.doubleheight = DHL_TOP;\n  else if(dhl == DHL_BOTTOM)\n    info.doubleheight = DHL_BOTTOM;\n\n  if((state->callbacks &&\n      state->callbacks->setlineinfo &&\n      (*state->callbacks->setlineinfo)(row, &info, state->lineinfo + row, state->cbdata))\n      || force)\n    state->lineinfo[row] = info;\n}\n\nstatic int on_text(const char bytes[], size_t len, void *user)\n{\n  VTermState *state = user;\n\n  VTermPos oldpos = state->pos;\n\n  // We'll have at most len codepoints\n#ifdef _MSC_VER\n  uint32_t *codepoints = malloc(len*sizeof(uint32_t)); // len\n#else\n  uint32_t codepoints[len];\n#endif\n  int npoints = 0;\n  size_t eaten = 0;\n\n  VTermEncodingInstance *encoding =\n    state->gsingle_set     ? &state->encoding[state->gsingle_set] :\n    !(bytes[eaten] & 0x80) ? &state->encoding[state->gl_set] :\n    state->vt->mode.utf8   ? &state->encoding_utf8 :\n                             &state->encoding[state->gr_set];\n\n  (*encoding->enc->decode)(encoding->enc, encoding->data,\n      codepoints, &npoints, state->gsingle_set ? 1 : len,\n      bytes, &eaten, len);\n\n  /* There's a chance an encoding (e.g. UTF-8) hasn't found enough bytes yet\n   * for even a single codepoint\n   */\n  if(!npoints) {\n#ifdef _MSC_VER\n    free(codepoints);\n    codepoints = NULL;\n#endif\n    return eaten;\n  }\n\n  if(state->gsingle_set && npoints)\n    state->gsingle_set = 0;\n\n  int i = 0;\n\n  /* This is a combining char. that needs to be merged with the previous\n   * glyph output */\n  if(vterm_unicode_is_combining(codepoints[i])) {\n    /* See if the cursor has moved since */\n    if(state->pos.row == state->combine_pos.row && state->pos.col == state->combine_pos.col + state->combine_width) {\n#ifdef DEBUG_GLYPH_COMBINE\n      int printpos;\n      printf(\"DEBUG: COMBINING SPLIT GLYPH of chars {\");\n      for(printpos = 0; state->combine_chars[printpos]; printpos++)\n        printf(\"U+%04x \", state->combine_chars[printpos]);\n      printf(\"} + {\");\n#endif\n\n      /* Find where we need to append these combining chars */\n      int saved_i = 0;\n      while(state->combine_chars[saved_i])\n        saved_i++;\n\n      /* Add extra ones */\n      while(i < npoints && vterm_unicode_is_combining(codepoints[i])) {\n        if(saved_i >= state->combine_chars_size)\n          grow_combine_buffer(state);\n        state->combine_chars[saved_i++] = codepoints[i++];\n      }\n      if(saved_i >= state->combine_chars_size)\n        grow_combine_buffer(state);\n      state->combine_chars[saved_i] = 0;\n\n#ifdef DEBUG_GLYPH_COMBINE\n      for(; state->combine_chars[printpos]; printpos++)\n        printf(\"U+%04x \", state->combine_chars[printpos]);\n      printf(\"}\\n\");\n#endif\n\n      /* Now render it */\n      putglyph(state, state->combine_chars, state->combine_width, state->combine_pos);\n    }\n    else {\n      DEBUG_LOG(\"libvterm: TODO: Skip over split char+combining\\n\");\n    }\n  }\n\n  for(; i < npoints; i++) {\n    // Try to find combining characters following this\n    int glyph_starts = i;\n    int glyph_ends;\n    for(glyph_ends = i + 1; glyph_ends < npoints; glyph_ends++)\n      if(!vterm_unicode_is_combining(codepoints[glyph_ends]))\n        break;\n\n    int width = 0;\n\n#ifdef _MSC_VER\n    uint32_t *chars = malloc((glyph_ends - glyph_starts + 1)*sizeof(uint32_t)); //glyph_ends - glyph_starts + 1];\n#else\n    uint32_t chars[glyph_ends - glyph_starts + 1];\n#endif\n\n    for( ; i < glyph_ends; i++) {\n      chars[i - glyph_starts] = codepoints[i];\n      int this_width = vterm_unicode_width(codepoints[i]);\n#ifdef DEBUG\n      if(this_width < 0) {\n        fprintf(stderr, \"Text with negative-width codepoint U+%04x\\n\", codepoints[i]);\n        abort();\n      }\n#endif\n      width += this_width;\n    }\n\n    chars[glyph_ends - glyph_starts] = 0;\n    i--;\n\n#ifdef DEBUG_GLYPH_COMBINE\n    int printpos;\n    printf(\"DEBUG: COMBINED GLYPH of %d chars {\", glyph_ends - glyph_starts);\n    for(printpos = 0; printpos < glyph_ends - glyph_starts; printpos++)\n      printf(\"U+%04x \", chars[printpos]);\n    printf(\"}, onscreen width %d\\n\", width);\n#endif\n\n    if(state->at_phantom || state->pos.col + width > THISROWWIDTH(state)) {\n      linefeed(state);\n      state->pos.col = 0;\n      state->at_phantom = 0;\n    }\n\n    if(state->mode.insert) {\n      /* TODO: This will be a little inefficient for large bodies of text, as\n       * it'll have to 'ICH' effectively before every glyph. We should scan\n       * ahead and ICH as many times as required\n       */\n      VTermRect rect = {\n        .start_row = state->pos.row,\n        .end_row   = state->pos.row + 1,\n        .start_col = state->pos.col,\n        .end_col   = THISROWWIDTH(state),\n      };\n      scroll(state, rect, 0, -1);\n    }\n\n    putglyph(state, chars, width, state->pos);\n\n    if(i == npoints - 1) {\n      /* End of the buffer. Save the chars in case we have to combine with\n       * more on the next call */\n      int save_i;\n      for(save_i = 0; chars[save_i]; save_i++) {\n        if(save_i >= state->combine_chars_size)\n          grow_combine_buffer(state);\n        state->combine_chars[save_i] = chars[save_i];\n      }\n      if(save_i >= state->combine_chars_size)\n        grow_combine_buffer(state);\n      state->combine_chars[save_i] = 0;\n      state->combine_width = width;\n      state->combine_pos = state->pos;\n    }\n\n#ifdef _MSC_VER\n    free(chars);\n    chars = NULL;\n#endif\n\n    if(state->pos.col + width >= THISROWWIDTH(state)) {\n      if(state->mode.autowrap)\n        state->at_phantom = 1;\n    }\n    else {\n      state->pos.col += width;\n    }\n  }\n\n#ifdef _MSC_VER\n    free(codepoints);\n    codepoints = NULL;\n#endif\n\n  updatecursor(state, &oldpos, 0);\n\n#ifdef DEBUG\n  if(state->pos.row < 0 || state->pos.row >= state->rows ||\n     state->pos.col < 0 || state->pos.col >= state->cols) {\n    fprintf(stderr, \"Position out of bounds after text: (%d,%d)\\n\",\n        state->pos.row, state->pos.col);\n    abort();\n  }\n#endif\n\n  return eaten;\n}\n\nstatic int on_control(unsigned char control, void *user)\n{\n  VTermState *state = user;\n\n  VTermPos oldpos = state->pos;\n\n  switch(control) {\n  case 0x07: // BEL - ECMA-48 8.3.3\n    if(state->callbacks && state->callbacks->bell)\n      (*state->callbacks->bell)(state->cbdata);\n    break;\n\n  case 0x08: // BS - ECMA-48 8.3.5\n    if(state->pos.col > 0)\n      state->pos.col--;\n    break;\n\n  case 0x09: // HT - ECMA-48 8.3.60\n    tab(state, 1, +1);\n    break;\n\n  case 0x0a: // LF - ECMA-48 8.3.74\n  case 0x0b: // VT\n  case 0x0c: // FF\n    linefeed(state);\n    if(state->mode.newline)\n      state->pos.col = 0;\n    break;\n\n  case 0x0d: // CR - ECMA-48 8.3.15\n    state->pos.col = 0;\n    break;\n\n  case 0x0e: // LS1 - ECMA-48 8.3.76\n    state->gl_set = 1;\n    break;\n\n  case 0x0f: // LS0 - ECMA-48 8.3.75\n    state->gl_set = 0;\n    break;\n\n  case 0x84: // IND - DEPRECATED but implemented for completeness\n    linefeed(state);\n    break;\n\n  case 0x85: // NEL - ECMA-48 8.3.86\n    linefeed(state);\n    state->pos.col = 0;\n    break;\n\n  case 0x88: // HTS - ECMA-48 8.3.62\n    set_col_tabstop(state, state->pos.col);\n    break;\n\n  case 0x8d: // RI - ECMA-48 8.3.104\n    if(state->pos.row == state->scrollregion_top) {\n      VTermRect rect = {\n        .start_row = state->scrollregion_top,\n        .end_row   = SCROLLREGION_BOTTOM(state),\n        .start_col = SCROLLREGION_LEFT(state),\n        .end_col   = SCROLLREGION_RIGHT(state),\n      };\n\n      scroll(state, rect, -1, 0);\n    }\n    else if(state->pos.row > 0)\n        state->pos.row--;\n    break;\n\n  case 0x8e: // SS2 - ECMA-48 8.3.141\n    state->gsingle_set = 2;\n    break;\n\n  case 0x8f: // SS3 - ECMA-48 8.3.142\n    state->gsingle_set = 3;\n    break;\n\n  default:\n    if(state->fallbacks && state->fallbacks->control)\n      if((*state->fallbacks->control)(control, state->fbdata))\n        return 1;\n\n    return 0;\n  }\n\n  updatecursor(state, &oldpos, 1);\n\n#ifdef DEBUG\n  if(state->pos.row < 0 || state->pos.row >= state->rows ||\n     state->pos.col < 0 || state->pos.col >= state->cols) {\n    fprintf(stderr, \"Position out of bounds after Ctrl %02x: (%d,%d)\\n\",\n        control, state->pos.row, state->pos.col);\n    abort();\n  }\n#endif\n\n  return 1;\n}\n\nstatic int settermprop_bool(VTermState *state, VTermProp prop, int v)\n{\n  VTermValue val = { .boolean = v };\n  return vterm_state_set_termprop(state, prop, &val);\n}\n\nstatic int settermprop_int(VTermState *state, VTermProp prop, int v)\n{\n  VTermValue val = { .number = v };\n  return vterm_state_set_termprop(state, prop, &val);\n}\n\nstatic int settermprop_string(VTermState *state, VTermProp prop, const char *str, size_t len)\n{\n#ifdef _MSC_VER\n  char *strvalue = malloc(len+1);// [len+1];\n#else\n    char strvalue[len+1];\n#endif\n  strncpy(strvalue, str, len);\n  strvalue[len] = 0;\n\n  VTermValue val = { .string = strvalue };\n  int n = vterm_state_set_termprop(state, prop, &val);\n#ifdef _MSC_VER\n  free(strvalue);\n  strvalue = NULL;\n#endif\n  return n;\n}\n\nstatic void savecursor(VTermState *state, int save)\n{\n  if(save) {\n    state->saved.pos = state->pos;\n    state->saved.mode.cursor_visible = state->mode.cursor_visible;\n    state->saved.mode.cursor_blink   = state->mode.cursor_blink;\n    state->saved.mode.cursor_shape   = state->mode.cursor_shape;\n\n    vterm_state_savepen(state, 1);\n  }\n  else {\n    VTermPos oldpos = state->pos;\n\n    state->pos = state->saved.pos;\n\n    settermprop_bool(state, VTERM_PROP_CURSORVISIBLE, state->saved.mode.cursor_visible);\n    settermprop_bool(state, VTERM_PROP_CURSORBLINK,   state->saved.mode.cursor_blink);\n    settermprop_int (state, VTERM_PROP_CURSORSHAPE,   state->saved.mode.cursor_shape);\n\n    vterm_state_savepen(state, 0);\n\n    updatecursor(state, &oldpos, 1);\n  }\n}\n\nstatic int on_escape(const char *bytes, size_t len, void *user)\n{\n  VTermState *state = user;\n\n  /* Easier to decode this from the first byte, even though the final\n   * byte terminates it\n   */\n  switch(bytes[0]) {\n  case ' ':\n    if(len != 2)\n      return 0;\n\n    switch(bytes[1]) {\n      case 'F': // S7C1T\n        state->vt->mode.ctrl8bit = 0;\n        break;\n\n      case 'G': // S8C1T\n        state->vt->mode.ctrl8bit = 1;\n        break;\n\n      default:\n        return 0;\n    }\n    return 2;\n\n  case '#':\n    if(len != 2)\n      return 0;\n\n    switch(bytes[1]) {\n      case '3': // DECDHL top\n        if(state->mode.leftrightmargin)\n          break;\n        set_lineinfo(state, state->pos.row, NO_FORCE, DWL_ON, DHL_TOP);\n        break;\n\n      case '4': // DECDHL bottom\n        if(state->mode.leftrightmargin)\n          break;\n        set_lineinfo(state, state->pos.row, NO_FORCE, DWL_ON, DHL_BOTTOM);\n        break;\n\n      case '5': // DECSWL\n        if(state->mode.leftrightmargin)\n          break;\n        set_lineinfo(state, state->pos.row, NO_FORCE, DWL_OFF, DHL_OFF);\n        break;\n\n      case '6': // DECDWL\n        if(state->mode.leftrightmargin)\n          break;\n        set_lineinfo(state, state->pos.row, NO_FORCE, DWL_ON, DHL_OFF);\n        break;\n\n      case '8': // DECALN\n      {\n        VTermPos pos;\n        uint32_t E[] = { 'E', 0 };\n        for(pos.row = 0; pos.row < state->rows; pos.row++)\n          for(pos.col = 0; pos.col < ROWWIDTH(state, pos.row); pos.col++)\n            putglyph(state, E, 1, pos);\n        break;\n      }\n\n      default:\n        return 0;\n    }\n    return 2;\n\n  case '(': case ')': case '*': case '+': // SCS\n    if(len != 2)\n      return 0;\n\n    {\n      int setnum = bytes[0] - 0x28;\n      VTermEncoding *newenc = vterm_lookup_encoding(ENC_SINGLE_94, bytes[1]);\n\n      if(newenc) {\n        state->encoding[setnum].enc = newenc;\n\n        if(newenc->init)\n          (*newenc->init)(newenc, state->encoding[setnum].data);\n      }\n    }\n\n    return 2;\n\n  case '7': // DECSC\n    savecursor(state, 1);\n    return 1;\n\n  case '8': // DECRC\n    savecursor(state, 0);\n    return 1;\n\n  case '<': // Ignored by VT100. Used in VT52 mode to switch up to VT100\n    return 1;\n\n  case '=': // DECKPAM\n    state->mode.keypad = 1;\n    return 1;\n\n  case '>': // DECKPNM\n    state->mode.keypad = 0;\n    return 1;\n\n  case 'c': // RIS - ECMA-48 8.3.105\n  {\n    VTermPos oldpos = state->pos;\n    vterm_state_reset(state, 1);\n    if(state->callbacks && state->callbacks->movecursor)\n      (*state->callbacks->movecursor)(state->pos, oldpos, state->mode.cursor_visible, state->cbdata);\n    return 1;\n  }\n\n  case 'n': // LS2 - ECMA-48 8.3.78\n    state->gl_set = 2;\n    return 1;\n\n  case 'o': // LS3 - ECMA-48 8.3.80\n    state->gl_set = 3;\n    return 1;\n\n  case '~': // LS1R - ECMA-48 8.3.77\n    state->gr_set = 1;\n    return 1;\n\n  case '}': // LS2R - ECMA-48 8.3.79\n    state->gr_set = 2;\n    return 1;\n\n  case '|': // LS3R - ECMA-48 8.3.81\n    state->gr_set = 3;\n    return 1;\n\n  default:\n    return 0;\n  }\n}\n\nstatic void set_mode(VTermState *state, int num, int val)\n{\n  switch(num) {\n  case 4: // IRM - ECMA-48 7.2.10\n    state->mode.insert = val;\n    break;\n\n  case 20: // LNM - ANSI X3.4-1977\n    state->mode.newline = val;\n    break;\n\n  default:\n    DEBUG_LOG(\"libvterm: Unknown mode %d\\n\", num);\n    return;\n  }\n}\n\nstatic void set_dec_mode(VTermState *state, int num, int val)\n{\n  int row = 0;\n  switch(num) {\n  case 1:\n    state->mode.cursor = val;\n    break;\n\n  case 5: // DECSCNM - screen mode\n    settermprop_bool(state, VTERM_PROP_REVERSE, val);\n    break;\n\n  case 6: // DECOM - origin mode\n    {\n      VTermPos oldpos = state->pos;\n      state->mode.origin = val;\n      state->pos.row = state->mode.origin ? state->scrollregion_top : 0;\n      state->pos.col = state->mode.origin ? SCROLLREGION_LEFT(state) : 0;\n      updatecursor(state, &oldpos, 1);\n    }\n    break;\n\n  case 7:\n    state->mode.autowrap = val;\n    break;\n\n  case 12:\n    settermprop_bool(state, VTERM_PROP_CURSORBLINK, val);\n    break;\n\n  case 25:\n    settermprop_bool(state, VTERM_PROP_CURSORVISIBLE, val);\n    break;\n\n  case 69: // DECVSSM - vertical split screen mode\n           // DECLRMM - left/right margin mode\n    state->mode.leftrightmargin = val;\n    if(val) {\n      // Setting DECVSSM must clear doublewidth/doubleheight state of every line\n      for(row = 0; row < state->rows; row++)\n        set_lineinfo(state, row, FORCE, DWL_OFF, DHL_OFF);\n    }\n\n    break;\n\n  case 1000:\n  case 1002:\n  case 1003:\n    settermprop_int(state, VTERM_PROP_MOUSE,\n        !val          ? VTERM_PROP_MOUSE_NONE  :\n        (num == 1000) ? VTERM_PROP_MOUSE_CLICK :\n        (num == 1002) ? VTERM_PROP_MOUSE_DRAG  :\n                        VTERM_PROP_MOUSE_MOVE);\n    break;\n\n  case 1004:\n    state->mode.report_focus = val;\n    break;\n\n  case 1005:\n    state->mouse_protocol = val ? MOUSE_UTF8 : MOUSE_X10;\n    break;\n\n  case 1006:\n    state->mouse_protocol = val ? MOUSE_SGR : MOUSE_X10;\n    break;\n\n  case 1015:\n    state->mouse_protocol = val ? MOUSE_RXVT : MOUSE_X10;\n    break;\n\n  case 1047:\n    settermprop_bool(state, VTERM_PROP_ALTSCREEN, val);\n    break;\n\n  case 1048:\n    savecursor(state, val);\n    break;\n\n  case 1049:\n    settermprop_bool(state, VTERM_PROP_ALTSCREEN, val);\n    savecursor(state, val);\n    break;\n\n  case 2004:\n    state->mode.bracketpaste = val;\n    break;\n\n  default:\n    DEBUG_LOG(\"libvterm: Unknown DEC mode %d\\n\", num);\n    return;\n  }\n}\n\nstatic void request_dec_mode(VTermState *state, int num)\n{\n  int reply;\n\n  switch(num) {\n    case 1:\n      reply = state->mode.cursor;\n      break;\n\n    case 5:\n      reply = state->mode.screen;\n      break;\n\n    case 6:\n      reply = state->mode.origin;\n      break;\n\n    case 7:\n      reply = state->mode.autowrap;\n      break;\n\n    case 12:\n      reply = state->mode.cursor_blink;\n      break;\n\n    case 25:\n      reply = state->mode.cursor_visible;\n      break;\n\n    case 69:\n      reply = state->mode.leftrightmargin;\n      break;\n\n    case 1000:\n      reply = state->mouse_flags == MOUSE_WANT_CLICK;\n      break;\n\n    case 1002:\n      reply = state->mouse_flags == (MOUSE_WANT_CLICK|MOUSE_WANT_DRAG);\n      break;\n\n    case 1003:\n      reply = state->mouse_flags == (MOUSE_WANT_CLICK|MOUSE_WANT_MOVE);\n      break;\n\n    case 1004:\n      reply = state->mode.report_focus;\n      break;\n\n    case 1005:\n      reply = state->mouse_protocol == MOUSE_UTF8;\n      break;\n\n    case 1006:\n      reply = state->mouse_protocol == MOUSE_SGR;\n      break;\n\n    case 1015:\n      reply = state->mouse_protocol == MOUSE_RXVT;\n      break;\n\n    case 1047:\n      reply = state->mode.alt_screen;\n      break;\n\n    case 2004:\n      reply = state->mode.bracketpaste;\n      break;\n\n    default:\n      vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, \"?%d;%d$y\", num, 0);\n      return;\n  }\n\n  vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, \"?%d;%d$y\", num, reply ? 1 : 2);\n}\n\nstatic int on_csi(const char *leader, const long args[], int argcount, const char *intermed, char command, void *user)\n{\n  VTermState *state = user;\n  int leader_byte = 0;\n  int intermed_byte = 0;\n  int cancel_phantom = 1;\n\n  if(leader && leader[0]) {\n    if(leader[1]) // longer than 1 char\n      return 0;\n\n    switch(leader[0]) {\n    case '?':\n    case '>':\n      leader_byte = leader[0];\n      break;\n    default:\n      return 0;\n    }\n  }\n\n  if(intermed && intermed[0]) {\n    if(intermed[1]) // longer than 1 char\n      return 0;\n\n    switch(intermed[0]) {\n    case ' ':\n    case '\"':\n    case '$':\n    case '\\'':\n      intermed_byte = intermed[0];\n      break;\n    default:\n      return 0;\n    }\n  }\n\n  VTermPos oldpos = state->pos;\n\n  // Some temporaries for later code\n  int count, val;\n  int row, col;\n  VTermRect rect;\n  int selective;\n\n#define LBOUND(v,min) if((v) < (min)) (v) = (min)\n#define UBOUND(v,max) if((v) > (max)) (v) = (max)\n\n#define LEADER(l,b) ((l << 8) | b)\n#define INTERMED(i,b) ((i << 16) | b)\n\n  switch(intermed_byte << 16 | leader_byte << 8 | command) {\n  case 0x40: // ICH - ECMA-48 8.3.64\n    count = CSI_ARG_COUNT(args[0]);\n\n    if(!is_cursor_in_scrollregion(state))\n      break;\n\n    rect.start_row = state->pos.row;\n    rect.end_row   = state->pos.row + 1;\n    rect.start_col = state->pos.col;\n    if(state->mode.leftrightmargin)\n      rect.end_col = SCROLLREGION_RIGHT(state);\n    else\n      rect.end_col = THISROWWIDTH(state);\n\n    scroll(state, rect, 0, -count);\n\n    break;\n\n  case 0x41: // CUU - ECMA-48 8.3.22\n    count = CSI_ARG_COUNT(args[0]);\n    state->pos.row -= count;\n    state->at_phantom = 0;\n    break;\n\n  case 0x42: // CUD - ECMA-48 8.3.19\n    count = CSI_ARG_COUNT(args[0]);\n    state->pos.row += count;\n    state->at_phantom = 0;\n    break;\n\n  case 0x43: // CUF - ECMA-48 8.3.20\n    count = CSI_ARG_COUNT(args[0]);\n    state->pos.col += count;\n    state->at_phantom = 0;\n    break;\n\n  case 0x44: // CUB - ECMA-48 8.3.18\n    count = CSI_ARG_COUNT(args[0]);\n    state->pos.col -= count;\n    state->at_phantom = 0;\n    break;\n\n  case 0x45: // CNL - ECMA-48 8.3.12\n    count = CSI_ARG_COUNT(args[0]);\n    state->pos.col = 0;\n    state->pos.row += count;\n    state->at_phantom = 0;\n    break;\n\n  case 0x46: // CPL - ECMA-48 8.3.13\n    count = CSI_ARG_COUNT(args[0]);\n    state->pos.col = 0;\n    state->pos.row -= count;\n    state->at_phantom = 0;\n    break;\n\n  case 0x47: // CHA - ECMA-48 8.3.9\n    val = CSI_ARG_OR(args[0], 1);\n    state->pos.col = val-1;\n    state->at_phantom = 0;\n    break;\n\n  case 0x48: // CUP - ECMA-48 8.3.21\n    row = CSI_ARG_OR(args[0], 1);\n    col = argcount < 2 || CSI_ARG_IS_MISSING(args[1]) ? 1 : CSI_ARG(args[1]);\n    // zero-based\n    state->pos.row = row-1;\n    state->pos.col = col-1;\n    if(state->mode.origin) {\n      state->pos.row += state->scrollregion_top;\n      state->pos.col += SCROLLREGION_LEFT(state);\n    }\n    state->at_phantom = 0;\n    break;\n\n  case 0x49: // CHT - ECMA-48 8.3.10\n    count = CSI_ARG_COUNT(args[0]);\n    tab(state, count, +1);\n    break;\n\n  case 0x4a: // ED - ECMA-48 8.3.39\n  case LEADER('?', 0x4a): // DECSED - Selective Erase in Display\n    selective = (leader_byte == '?');\n    switch(CSI_ARG(args[0])) {\n    case CSI_ARG_MISSING:\n    case 0:\n      rect.start_row = state->pos.row; rect.end_row = state->pos.row + 1;\n      rect.start_col = state->pos.col; rect.end_col = state->cols;\n      if(rect.end_col > rect.start_col)\n        erase(state, rect, selective);\n\n      rect.start_row = state->pos.row + 1; rect.end_row = state->rows;\n      rect.start_col = 0;\n      for(row = rect.start_row; row < rect.end_row; row++)\n        set_lineinfo(state, row, FORCE, DWL_OFF, DHL_OFF);\n      if(rect.end_row > rect.start_row)\n        erase(state, rect, selective);\n      break;\n\n    case 1:\n      rect.start_row = 0; rect.end_row = state->pos.row;\n      rect.start_col = 0; rect.end_col = state->cols;\n      for(row = rect.start_row; row < rect.end_row; row++)\n        set_lineinfo(state, row, FORCE, DWL_OFF, DHL_OFF);\n      if(rect.end_col > rect.start_col)\n        erase(state, rect, selective);\n\n      rect.start_row = state->pos.row; rect.end_row = state->pos.row + 1;\n                          rect.end_col = state->pos.col + 1;\n      if(rect.end_row > rect.start_row)\n        erase(state, rect, selective);\n      break;\n\n    case 2:\n      rect.start_row = 0; rect.end_row = state->rows;\n      rect.start_col = 0; rect.end_col = state->cols;\n      for(row = rect.start_row; row < rect.end_row; row++)\n        set_lineinfo(state, row, FORCE, DWL_OFF, DHL_OFF);\n      erase(state, rect, selective);\n      break;\n    }\n    break;\n\n  case 0x4b: // EL - ECMA-48 8.3.41\n  case LEADER('?', 0x4b): // DECSEL - Selective Erase in Line\n    selective = (leader_byte == '?');\n    rect.start_row = state->pos.row;\n    rect.end_row   = state->pos.row + 1;\n\n    switch(CSI_ARG(args[0])) {\n    case CSI_ARG_MISSING:\n    case 0:\n      rect.start_col = state->pos.col; rect.end_col = THISROWWIDTH(state); break;\n    case 1:\n      rect.start_col = 0; rect.end_col = state->pos.col + 1; break;\n    case 2:\n      rect.start_col = 0; rect.end_col = THISROWWIDTH(state); break;\n    default:\n      return 0;\n    }\n\n    if(rect.end_col > rect.start_col)\n      erase(state, rect, selective);\n\n    break;\n\n  case 0x4c: // IL - ECMA-48 8.3.67\n    count = CSI_ARG_COUNT(args[0]);\n\n    if(!is_cursor_in_scrollregion(state))\n      break;\n\n    rect.start_row = state->pos.row;\n    rect.end_row   = SCROLLREGION_BOTTOM(state);\n    rect.start_col = SCROLLREGION_LEFT(state);\n    rect.end_col   = SCROLLREGION_RIGHT(state);\n\n    scroll(state, rect, -count, 0);\n\n    break;\n\n  case 0x4d: // DL - ECMA-48 8.3.32\n    count = CSI_ARG_COUNT(args[0]);\n\n    if(!is_cursor_in_scrollregion(state))\n      break;\n\n    rect.start_row = state->pos.row;\n    rect.end_row   = SCROLLREGION_BOTTOM(state);\n    rect.start_col = SCROLLREGION_LEFT(state);\n    rect.end_col   = SCROLLREGION_RIGHT(state);\n\n    scroll(state, rect, count, 0);\n\n    break;\n\n  case 0x50: // DCH - ECMA-48 8.3.26\n    count = CSI_ARG_COUNT(args[0]);\n\n    if(!is_cursor_in_scrollregion(state))\n      break;\n\n    rect.start_row = state->pos.row;\n    rect.end_row   = state->pos.row + 1;\n    rect.start_col = state->pos.col;\n    if(state->mode.leftrightmargin)\n      rect.end_col = SCROLLREGION_RIGHT(state);\n    else\n      rect.end_col = THISROWWIDTH(state);\n\n    scroll(state, rect, 0, count);\n\n    break;\n\n  case 0x53: // SU - ECMA-48 8.3.147\n    count = CSI_ARG_COUNT(args[0]);\n\n    rect.start_row = state->scrollregion_top;\n    rect.end_row   = SCROLLREGION_BOTTOM(state);\n    rect.start_col = SCROLLREGION_LEFT(state);\n    rect.end_col   = SCROLLREGION_RIGHT(state);\n\n    scroll(state, rect, count, 0);\n\n    break;\n\n  case 0x54: // SD - ECMA-48 8.3.113\n    count = CSI_ARG_COUNT(args[0]);\n\n    rect.start_row = state->scrollregion_top;\n    rect.end_row   = SCROLLREGION_BOTTOM(state);\n    rect.start_col = SCROLLREGION_LEFT(state);\n    rect.end_col   = SCROLLREGION_RIGHT(state);\n\n    scroll(state, rect, -count, 0);\n\n    break;\n\n  case 0x58: // ECH - ECMA-48 8.3.38\n    count = CSI_ARG_COUNT(args[0]);\n\n    rect.start_row = state->pos.row;\n    rect.end_row   = state->pos.row + 1;\n    rect.start_col = state->pos.col;\n    rect.end_col   = state->pos.col + count;\n    UBOUND(rect.end_col, THISROWWIDTH(state));\n\n    erase(state, rect, 0);\n    break;\n\n  case 0x5a: // CBT - ECMA-48 8.3.7\n    count = CSI_ARG_COUNT(args[0]);\n    tab(state, count, -1);\n    break;\n\n  case 0x60: // HPA - ECMA-48 8.3.57\n    col = CSI_ARG_OR(args[0], 1);\n    state->pos.col = col-1;\n    state->at_phantom = 0;\n    break;\n\n  case 0x61: // HPR - ECMA-48 8.3.59\n    count = CSI_ARG_COUNT(args[0]);\n    state->pos.col += count;\n    state->at_phantom = 0;\n    break;\n\n  case 0x62: { // REP - ECMA-48 8.3.103\n    const int row_width = THISROWWIDTH(state);\n    count = CSI_ARG_COUNT(args[0]);\n    col = state->pos.col + count;\n    UBOUND(col, row_width);\n    while (state->pos.col < col) {\n      putglyph(state, state->combine_chars, state->combine_width, state->pos);\n      state->pos.col += state->combine_width;\n    }\n    if (state->pos.col + state->combine_width >= row_width) {\n      if (state->mode.autowrap) {\n        state->at_phantom = 1;\n        cancel_phantom = 0;\n      }\n    }\n    break;\n  }\n\n  case 0x63: // DA - ECMA-48 8.3.24\n    val = CSI_ARG_OR(args[0], 0);\n    if(val == 0)\n      // DEC VT100 response\n      vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, \"?1;2c\");\n    break;\n\n  case LEADER('>', 0x63): // DEC secondary Device Attributes\n    vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, \">%d;%d;%dc\", 0, 100, 0);\n    break;\n\n  case 0x64: // VPA - ECMA-48 8.3.158\n    row = CSI_ARG_OR(args[0], 1);\n    state->pos.row = row-1;\n    if(state->mode.origin)\n      state->pos.row += state->scrollregion_top;\n    state->at_phantom = 0;\n    break;\n\n  case 0x65: // VPR - ECMA-48 8.3.160\n    count = CSI_ARG_COUNT(args[0]);\n    state->pos.row += count;\n    state->at_phantom = 0;\n    break;\n\n  case 0x66: // HVP - ECMA-48 8.3.63\n    row = CSI_ARG_OR(args[0], 1);\n    col = argcount < 2 || CSI_ARG_IS_MISSING(args[1]) ? 1 : CSI_ARG(args[1]);\n    // zero-based\n    state->pos.row = row-1;\n    state->pos.col = col-1;\n    if(state->mode.origin) {\n      state->pos.row += state->scrollregion_top;\n      state->pos.col += SCROLLREGION_LEFT(state);\n    }\n    state->at_phantom = 0;\n    break;\n\n  case 0x67: // TBC - ECMA-48 8.3.154\n    val = CSI_ARG_OR(args[0], 0);\n\n    switch(val) {\n    case 0:\n      clear_col_tabstop(state, state->pos.col);\n      break;\n    case 3:\n    case 5:\n      for(col = 0; col < state->cols; col++)\n        clear_col_tabstop(state, col);\n      break;\n    case 1:\n    case 2:\n    case 4:\n      break;\n    /* TODO: 1, 2 and 4 aren't meaningful yet without line tab stops */\n    default:\n      return 0;\n    }\n    break;\n\n  case 0x68: // SM - ECMA-48 8.3.125\n    if(!CSI_ARG_IS_MISSING(args[0]))\n      set_mode(state, CSI_ARG(args[0]), 1);\n    break;\n\n  case LEADER('?', 0x68): // DEC private mode set\n    if(!CSI_ARG_IS_MISSING(args[0]))\n      set_dec_mode(state, CSI_ARG(args[0]), 1);\n    break;\n\n  case 0x6a: // HPB - ECMA-48 8.3.58\n    count = CSI_ARG_COUNT(args[0]);\n    state->pos.col -= count;\n    state->at_phantom = 0;\n    break;\n\n  case 0x6b: // VPB - ECMA-48 8.3.159\n    count = CSI_ARG_COUNT(args[0]);\n    state->pos.row -= count;\n    state->at_phantom = 0;\n    break;\n\n  case 0x6c: // RM - ECMA-48 8.3.106\n    if(!CSI_ARG_IS_MISSING(args[0]))\n      set_mode(state, CSI_ARG(args[0]), 0);\n    break;\n\n  case LEADER('?', 0x6c): // DEC private mode reset\n    if(!CSI_ARG_IS_MISSING(args[0]))\n      set_dec_mode(state, CSI_ARG(args[0]), 0);\n    break;\n\n  case 0x6d: // SGR - ECMA-48 8.3.117\n    vterm_state_setpen(state, args, argcount);\n    break;\n\n  case 0x6e: // DSR - ECMA-48 8.3.35\n  case LEADER('?', 0x6e): // DECDSR\n    val = CSI_ARG_OR(args[0], 0);\n\n    {\n      char *qmark = (leader_byte == '?') ? \"?\" : \"\";\n\n      switch(val) {\n      case 0: case 1: case 2: case 3: case 4:\n        // ignore - these are replies\n        break;\n      case 5:\n        vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, \"%s0n\", qmark);\n        break;\n      case 6: // CPR - cursor position report\n        vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, \"%s%d;%dR\", qmark, state->pos.row + 1, state->pos.col + 1);\n        break;\n      }\n    }\n    break;\n\n\n  case LEADER('!', 0x70): // DECSTR - DEC soft terminal reset\n    vterm_state_reset(state, 0);\n    break;\n\n  case LEADER('?', INTERMED('$', 0x70)):\n    request_dec_mode(state, CSI_ARG(args[0]));\n    break;\n\n  case INTERMED(' ', 0x71): // DECSCUSR - DEC set cursor shape\n    val = CSI_ARG_OR(args[0], 1);\n\n    switch(val) {\n    case 0: case 1:\n      settermprop_bool(state, VTERM_PROP_CURSORBLINK, 1);\n      settermprop_int (state, VTERM_PROP_CURSORSHAPE, VTERM_PROP_CURSORSHAPE_BLOCK);\n      break;\n    case 2:\n      settermprop_bool(state, VTERM_PROP_CURSORBLINK, 0);\n      settermprop_int (state, VTERM_PROP_CURSORSHAPE, VTERM_PROP_CURSORSHAPE_BLOCK);\n      break;\n    case 3:\n      settermprop_bool(state, VTERM_PROP_CURSORBLINK, 1);\n      settermprop_int (state, VTERM_PROP_CURSORSHAPE, VTERM_PROP_CURSORSHAPE_UNDERLINE);\n      break;\n    case 4:\n      settermprop_bool(state, VTERM_PROP_CURSORBLINK, 0);\n      settermprop_int (state, VTERM_PROP_CURSORSHAPE, VTERM_PROP_CURSORSHAPE_UNDERLINE);\n      break;\n    case 5:\n      settermprop_bool(state, VTERM_PROP_CURSORBLINK, 1);\n      settermprop_int (state, VTERM_PROP_CURSORSHAPE, VTERM_PROP_CURSORSHAPE_BAR_LEFT);\n      break;\n    case 6:\n      settermprop_bool(state, VTERM_PROP_CURSORBLINK, 0);\n      settermprop_int (state, VTERM_PROP_CURSORSHAPE, VTERM_PROP_CURSORSHAPE_BAR_LEFT);\n      break;\n    }\n\n    break;\n\n  case INTERMED('\"', 0x71): // DECSCA - DEC select character protection attribute\n    val = CSI_ARG_OR(args[0], 0);\n\n    switch(val) {\n    case 0: case 2:\n      state->protected_cell = 0;\n      break;\n    case 1:\n      state->protected_cell = 1;\n      break;\n    }\n\n    break;\n\n  case 0x72: // DECSTBM - DEC custom\n    state->scrollregion_top = CSI_ARG_OR(args[0], 1) - 1;\n    state->scrollregion_bottom = argcount < 2 || CSI_ARG_IS_MISSING(args[1]) ? -1 : CSI_ARG(args[1]);\n    LBOUND(state->scrollregion_top, 0);\n    UBOUND(state->scrollregion_top, state->rows);\n    LBOUND(state->scrollregion_bottom, -1);\n    if(state->scrollregion_top == 0 && state->scrollregion_bottom == state->rows)\n      state->scrollregion_bottom = -1;\n    else\n      UBOUND(state->scrollregion_bottom, state->rows);\n\n    if(SCROLLREGION_BOTTOM(state) <= state->scrollregion_top) {\n      // Invalid\n      state->scrollregion_top    = 0;\n      state->scrollregion_bottom = -1;\n    }\n\n    // Setting the scrolling region restores the cursor to the home position\n    state->pos.row = 0;\n    state->pos.col = 0;\n    if(state->mode.origin) {\n      state->pos.row += state->scrollregion_top;\n      state->pos.col += SCROLLREGION_LEFT(state);\n    }\n\n    break;\n\n  case 0x73: // DECSLRM - DEC custom\n    // Always allow setting these margins, just they won't take effect without DECVSSM\n    state->scrollregion_left = CSI_ARG_OR(args[0], 1) - 1;\n    state->scrollregion_right = argcount < 2 || CSI_ARG_IS_MISSING(args[1]) ? -1 : CSI_ARG(args[1]);\n    LBOUND(state->scrollregion_left, 0);\n    UBOUND(state->scrollregion_left, state->cols);\n    LBOUND(state->scrollregion_right, -1);\n    if(state->scrollregion_left == 0 && state->scrollregion_right == state->cols)\n      state->scrollregion_right = -1;\n    else\n      UBOUND(state->scrollregion_right, state->cols);\n\n    if(state->scrollregion_right > -1 &&\n       state->scrollregion_right <= state->scrollregion_left) {\n      // Invalid\n      state->scrollregion_left  = 0;\n      state->scrollregion_right = -1;\n    }\n\n    // Setting the scrolling region restores the cursor to the home position\n    state->pos.row = 0;\n    state->pos.col = 0;\n    if(state->mode.origin) {\n      state->pos.row += state->scrollregion_top;\n      state->pos.col += SCROLLREGION_LEFT(state);\n    }\n\n    break;\n\n  case INTERMED('\\'', 0x7D): // DECIC\n    count = CSI_ARG_COUNT(args[0]);\n\n    if(!is_cursor_in_scrollregion(state))\n      break;\n\n    rect.start_row = state->scrollregion_top;\n    rect.end_row   = SCROLLREGION_BOTTOM(state);\n    rect.start_col = state->pos.col;\n    rect.end_col   = SCROLLREGION_RIGHT(state);\n\n    scroll(state, rect, 0, -count);\n\n    break;\n\n  case INTERMED('\\'', 0x7E): // DECDC\n    count = CSI_ARG_COUNT(args[0]);\n\n    if(!is_cursor_in_scrollregion(state))\n      break;\n\n    rect.start_row = state->scrollregion_top;\n    rect.end_row   = SCROLLREGION_BOTTOM(state);\n    rect.start_col = state->pos.col;\n    rect.end_col   = SCROLLREGION_RIGHT(state);\n\n    scroll(state, rect, 0, count);\n\n    break;\n\n  default:\n    if(state->fallbacks && state->fallbacks->csi)\n      if((*state->fallbacks->csi)(leader, args, argcount, intermed, command, state->fbdata))\n        return 1;\n\n    return 0;\n  }\n\n  if(state->mode.origin) {\n    LBOUND(state->pos.row, state->scrollregion_top);\n    UBOUND(state->pos.row, SCROLLREGION_BOTTOM(state)-1);\n    LBOUND(state->pos.col, SCROLLREGION_LEFT(state));\n    UBOUND(state->pos.col, SCROLLREGION_RIGHT(state)-1);\n  }\n  else {\n    LBOUND(state->pos.row, 0);\n    UBOUND(state->pos.row, state->rows-1);\n    LBOUND(state->pos.col, 0);\n    UBOUND(state->pos.col, THISROWWIDTH(state)-1);\n  }\n\n  updatecursor(state, &oldpos, cancel_phantom);\n\n#ifdef DEBUG\n  if(state->pos.row < 0 || state->pos.row >= state->rows ||\n     state->pos.col < 0 || state->pos.col >= state->cols) {\n    fprintf(stderr, \"Position out of bounds after CSI %c: (%d,%d)\\n\",\n        command, state->pos.row, state->pos.col);\n    abort();\n  }\n\n  if(SCROLLREGION_BOTTOM(state) <= state->scrollregion_top) {\n    fprintf(stderr, \"Scroll region height out of bounds after CSI %c: %d <= %d\\n\",\n        command, SCROLLREGION_BOTTOM(state), state->scrollregion_top);\n    abort();\n  }\n\n  if(SCROLLREGION_RIGHT(state) <= SCROLLREGION_LEFT(state)) {\n    fprintf(stderr, \"Scroll region width out of bounds after CSI %c: %d <= %d\\n\",\n        command, SCROLLREGION_RIGHT(state), SCROLLREGION_LEFT(state));\n    abort();\n  }\n#endif\n\n  return 1;\n}\n\nstatic int on_osc(const char *command, size_t cmdlen, void *user)\n{\n  VTermState *state = user;\n\n  if(cmdlen < 2)\n    return 0;\n\n  if(strneq(command, \"0;\", 2)) {\n    settermprop_string(state, VTERM_PROP_ICONNAME, command + 2, cmdlen - 2);\n    settermprop_string(state, VTERM_PROP_TITLE, command + 2, cmdlen - 2);\n    return 1;\n  }\n  else if(strneq(command, \"1;\", 2)) {\n    settermprop_string(state, VTERM_PROP_ICONNAME, command + 2, cmdlen - 2);\n    return 1;\n  }\n  else if(strneq(command, \"2;\", 2)) {\n    settermprop_string(state, VTERM_PROP_TITLE, command + 2, cmdlen - 2);\n    return 1;\n  }\n  else if(state->fallbacks && state->fallbacks->osc)\n    if((*state->fallbacks->osc)(command, cmdlen, state->fbdata))\n      return 1;\n\n  return 0;\n}\n\nstatic void request_status_string(VTermState *state, const char *command, size_t cmdlen)\n{\n  VTerm *vt = state->vt;\n\n  if(cmdlen == 1)\n    switch(command[0]) {\n      case 'm': // Query SGR\n        {\n          long args[20];\n          int argc = vterm_state_getpen(state, args, sizeof(args)/sizeof(args[0]));\n          size_t cur = 0;\n\n          cur += snprintf(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,\n              vt->mode.ctrl8bit ? \"\\x90\" \"1$r\" : ESC_S \"P\" \"1$r\"); // DCS 1$r ...\n          if(cur >= vt->tmpbuffer_len)\n            return;\n          int argi;\n          for(argi = 0; argi < argc; argi++) {\n            cur += snprintf(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,\n                argi == argc - 1             ? \"%ld\" :\n                CSI_ARG_HAS_MORE(args[argi]) ? \"%ld:\" :\n                                               \"%ld;\",\n                CSI_ARG(args[argi]));\n            if(cur >= vt->tmpbuffer_len)\n              return;\n          }\n\n          cur += snprintf(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,\n              vt->mode.ctrl8bit ? \"m\" \"\\x9C\" : \"m\" ESC_S \"\\\\\"); // ... m ST\n          if(cur >= vt->tmpbuffer_len)\n            return;\n\n          vterm_push_output_bytes(vt, vt->tmpbuffer, cur);\n        }\n        return;\n      case 'r': // Query DECSTBM\n        vterm_push_output_sprintf_dcs(vt, \"1$r%d;%dr\", state->scrollregion_top+1, SCROLLREGION_BOTTOM(state));\n        return;\n      case 's': // Query DECSLRM\n        vterm_push_output_sprintf_dcs(vt, \"1$r%d;%ds\", SCROLLREGION_LEFT(state)+1, SCROLLREGION_RIGHT(state));\n        return;\n    }\n\n  if(cmdlen == 2) {\n    if(strneq(command, \" q\", 2)) {\n      int reply;\n      switch(state->mode.cursor_shape) {\n        case VTERM_PROP_CURSORSHAPE_BLOCK:     reply = 2; break;\n        case VTERM_PROP_CURSORSHAPE_UNDERLINE: reply = 4; break;\n        case VTERM_PROP_CURSORSHAPE_BAR_LEFT:  reply = 6; break;\n      }\n      if(state->mode.cursor_blink)\n        reply--;\n      vterm_push_output_sprintf_dcs(vt, \"1$r%d q\", reply);\n      return;\n    }\n    else if(strneq(command, \"\\\"q\", 2)) {\n      vterm_push_output_sprintf_dcs(vt, \"1$r%d\\\"q\", state->protected_cell ? 1 : 2);\n      return;\n    }\n  }\n\n  vterm_push_output_sprintf_dcs(state->vt, \"0$r%.s\", (int)cmdlen, command);\n}\n\nstatic int on_dcs(const char *command, size_t cmdlen, void *user)\n{\n  VTermState *state = user;\n\n  if(cmdlen >= 2 && strneq(command, \"$q\", 2)) {\n    request_status_string(state, command+2, cmdlen-2);\n    return 1;\n  }\n  else if(state->fallbacks && state->fallbacks->dcs)\n    if((*state->fallbacks->dcs)(command, cmdlen, state->fbdata))\n      return 1;\n\n  return 0;\n}\n\nstatic int on_resize(int rows, int cols, void *user)\n{\n  VTermState *state = user;\n  VTermPos oldpos = state->pos;\n\n  if(cols != state->cols) {\n    unsigned char *newtabstops = vterm_allocator_malloc(state->vt, (cols + 7) / 8);\n\n    /* TODO: This can all be done much more efficiently bytewise */\n    int col;\n    for(col = 0; col < state->cols && col < cols; col++) {\n      unsigned char mask = 1 << (col & 7);\n      if(state->tabstops[col >> 3] & mask)\n        newtabstops[col >> 3] |= mask;\n      else\n        newtabstops[col >> 3] &= ~mask;\n      }\n\n    for( ; col < cols; col++) {\n      unsigned char mask = 1 << (col & 7);\n      if(col % 8 == 0)\n        newtabstops[col >> 3] |= mask;\n      else\n        newtabstops[col >> 3] &= ~mask;\n    }\n\n    vterm_allocator_free(state->vt, state->tabstops);\n    state->tabstops = newtabstops;\n  }\n\n  if(rows != state->rows) {\n    VTermLineInfo *newlineinfo = vterm_allocator_malloc(state->vt, rows * sizeof(VTermLineInfo));\n\n    int row;\n    for(row = 0; row < state->rows && row < rows; row++) {\n      newlineinfo[row] = state->lineinfo[row];\n    }\n\n    for( ; row < rows; row++) {\n      newlineinfo[row] = (VTermLineInfo){\n        .doublewidth = 0,\n      };\n    }\n\n    vterm_allocator_free(state->vt, state->lineinfo);\n    state->lineinfo = newlineinfo;\n  }\n\n  state->rows = rows;\n  state->cols = cols;\n\n  if(state->scrollregion_bottom > -1)\n    UBOUND(state->scrollregion_bottom, state->rows);\n  if(state->scrollregion_right > -1)\n    UBOUND(state->scrollregion_right, state->cols);\n\n  VTermPos delta = { 0, 0 };\n\n  if(state->callbacks && state->callbacks->resize)\n    (*state->callbacks->resize)(rows, cols, &delta, state->cbdata);\n\n  if(state->at_phantom && state->pos.col < cols-1) {\n    state->at_phantom = 0;\n    state->pos.col++;\n  }\n\n  state->pos.row += delta.row;\n  state->pos.col += delta.col;\n\n  if(state->pos.row >= rows)\n    state->pos.row = rows - 1;\n  if(state->pos.col >= cols)\n    state->pos.col = cols - 1;\n\n  updatecursor(state, &oldpos, 1);\n\n  return 1;\n}\n\nstatic const VTermParserCallbacks parser_callbacks = {\n  .text    = on_text,\n  .control = on_control,\n  .escape  = on_escape,\n  .csi     = on_csi,\n  .osc     = on_osc,\n  .dcs     = on_dcs,\n  .resize  = on_resize,\n};\n\nVTermState *vterm_obtain_state(VTerm *vt)\n{\n  if(vt->state)\n    return vt->state;\n\n  VTermState *state = vterm_state_new(vt);\n  if (state == NULL)\n    return NULL;\n  vt->state = state;\n\n  state->combine_chars_size = 16;\n  state->combine_chars = vterm_allocator_malloc(state->vt, state->combine_chars_size * sizeof(state->combine_chars[0]));\n\n  state->tabstops = vterm_allocator_malloc(state->vt, (state->cols + 7) / 8);\n\n  state->lineinfo = vterm_allocator_malloc(state->vt, state->rows * sizeof(VTermLineInfo));\n\n  state->encoding_utf8.enc = vterm_lookup_encoding(ENC_UTF8, 'u');\n  if(*state->encoding_utf8.enc->init)\n    (*state->encoding_utf8.enc->init)(state->encoding_utf8.enc, state->encoding_utf8.data);\n\n  vterm_parser_set_callbacks(vt, &parser_callbacks, state);\n\n  return state;\n}\n\nvoid vterm_state_reset(VTermState *state, int hard)\n{\n  int i = 0;\n  int row = 0;\n  int col = 0;\n  state->scrollregion_top = 0;\n  state->scrollregion_bottom = -1;\n  state->scrollregion_left = 0;\n  state->scrollregion_right = -1;\n\n  state->mode.keypad          = 0;\n  state->mode.cursor          = 0;\n  state->mode.autowrap        = 1;\n  state->mode.insert          = 0;\n  state->mode.newline         = 0;\n  state->mode.alt_screen      = 0;\n  state->mode.origin          = 0;\n  state->mode.leftrightmargin = 0;\n  state->mode.bracketpaste    = 0;\n  state->mode.report_focus    = 0;\n\n  state->vt->mode.ctrl8bit   = 0;\n\n  for(col = 0; col < state->cols; col++)\n    if(col % 8 == 0)\n      set_col_tabstop(state, col);\n    else\n      clear_col_tabstop(state, col);\n\n  for(row = 0; row < state->rows; row++)\n    set_lineinfo(state, row, FORCE, DWL_OFF, DHL_OFF);\n\n  if(state->callbacks && state->callbacks->initpen)\n    (*state->callbacks->initpen)(state->cbdata);\n\n  vterm_state_resetpen(state);\n\n  VTermEncoding *default_enc = state->vt->mode.utf8 ?\n      vterm_lookup_encoding(ENC_UTF8,      'u') :\n      vterm_lookup_encoding(ENC_SINGLE_94, 'B');\n\n  for(i = 0; i < 4; i++) {\n    state->encoding[i].enc = default_enc;\n    if(default_enc->init)\n      (*default_enc->init)(default_enc, state->encoding[i].data);\n  }\n\n  state->gl_set = 0;\n  state->gr_set = 1;\n  state->gsingle_set = 0;\n\n  state->protected_cell = 0;\n\n  // Initialise the props\n  settermprop_bool(state, VTERM_PROP_CURSORVISIBLE, 1);\n  settermprop_bool(state, VTERM_PROP_CURSORBLINK,   1);\n  settermprop_int (state, VTERM_PROP_CURSORSHAPE,   VTERM_PROP_CURSORSHAPE_BLOCK);\n\n  if(hard) {\n    state->pos.row = 0;\n    state->pos.col = 0;\n    state->at_phantom = 0;\n\n    VTermRect rect = { 0, state->rows, 0, state->cols };\n    erase(state, rect, 0);\n  }\n}\n\nvoid vterm_state_get_cursorpos(const VTermState *state, VTermPos *cursorpos)\n{\n  *cursorpos = state->pos;\n}\n\nvoid vterm_state_set_callbacks(VTermState *state, const VTermStateCallbacks *callbacks, void *user)\n{\n  if(callbacks) {\n    state->callbacks = callbacks;\n    state->cbdata = user;\n\n    if(state->callbacks && state->callbacks->initpen)\n      (*state->callbacks->initpen)(state->cbdata);\n  }\n  else {\n    state->callbacks = NULL;\n    state->cbdata = NULL;\n  }\n}\n\nvoid *vterm_state_get_cbdata(VTermState *state)\n{\n  return state->cbdata;\n}\n\nvoid vterm_state_set_unrecognised_fallbacks(VTermState *state, const VTermParserCallbacks *fallbacks, void *user)\n{\n  if(fallbacks) {\n    state->fallbacks = fallbacks;\n    state->fbdata = user;\n  }\n  else {\n    state->fallbacks = NULL;\n    state->fbdata = NULL;\n  }\n}\n\nvoid *vterm_state_get_unrecognised_fbdata(VTermState *state)\n{\n  return state->fbdata;\n}\n\nint vterm_state_set_termprop(VTermState *state, VTermProp prop, VTermValue *val)\n{\n  /* Only store the new value of the property if usercode said it was happy.\n   * This is especially important for altscreen switching */\n  if(state->callbacks && state->callbacks->settermprop)\n    if(!(*state->callbacks->settermprop)(prop, val, state->cbdata))\n      return 0;\n\n  switch(prop) {\n  case VTERM_PROP_TITLE:\n  case VTERM_PROP_ICONNAME:\n    // we don't store these, just transparently pass through\n    return 1;\n  case VTERM_PROP_CURSORVISIBLE:\n    state->mode.cursor_visible = val->boolean;\n    return 1;\n  case VTERM_PROP_CURSORBLINK:\n    state->mode.cursor_blink = val->boolean;\n    return 1;\n  case VTERM_PROP_CURSORSHAPE:\n    state->mode.cursor_shape = val->number;\n    return 1;\n  case VTERM_PROP_REVERSE:\n    state->mode.screen = val->boolean;\n    return 1;\n  case VTERM_PROP_ALTSCREEN:\n    state->mode.alt_screen = val->boolean;\n    if(state->mode.alt_screen) {\n      VTermRect rect = {\n        .start_row = 0,\n        .start_col = 0,\n        .end_row = state->rows,\n        .end_col = state->cols,\n      };\n      erase(state, rect, 0);\n    }\n    return 1;\n  case VTERM_PROP_MOUSE:\n    state->mouse_flags = 0;\n    if(val->number)\n      state->mouse_flags |= MOUSE_WANT_CLICK;\n    if(val->number == VTERM_PROP_MOUSE_DRAG)\n      state->mouse_flags |= MOUSE_WANT_DRAG;\n    if(val->number == VTERM_PROP_MOUSE_MOVE)\n      state->mouse_flags |= MOUSE_WANT_MOVE;\n    return 1;\n\n  case VTERM_N_PROPS:\n    return 0;\n  }\n\n  return 0;\n}\n\nvoid vterm_state_focus_in(VTermState *state)\n{\n  if(state->mode.report_focus)\n    vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, \"I\");\n}\n\nvoid vterm_state_focus_out(VTermState *state)\n{\n  if(state->mode.report_focus)\n    vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, \"O\");\n}\n\nconst VTermLineInfo *vterm_state_get_lineinfo(const VTermState *state, int row)\n{\n  return state->lineinfo + row;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/unicode.c",
    "content": "#include \"vterm_internal.h\"\n\n// ### The following from http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c\n// With modifications:\n//   made functions static\n//   moved 'combining' table to file scope, so other functions can see it\n// ###################################################################\n\n/*\n * This is an implementation of wcwidth() and wcswidth() (defined in\n * IEEE Std 1002.1-2001) for Unicode.\n *\n * http://www.opengroup.org/onlinepubs/007904975/functions/wcwidth.html\n * http://www.opengroup.org/onlinepubs/007904975/functions/wcswidth.html\n *\n * In fixed-width output devices, Latin characters all occupy a single\n * \"cell\" position of equal width, whereas ideographic CJK characters\n * occupy two such cells. Interoperability between terminal-line\n * applications and (teletype-style) character terminals using the\n * UTF-8 encoding requires agreement on which character should advance\n * the cursor by how many cell positions. No established formal\n * standards exist at present on which Unicode character shall occupy\n * how many cell positions on character terminals. These routines are\n * a first attempt of defining such behavior based on simple rules\n * applied to data provided by the Unicode Consortium.\n *\n * For some graphical characters, the Unicode standard explicitly\n * defines a character-cell width via the definition of the East Asian\n * FullWidth (F), Wide (W), Half-width (H), and Narrow (Na) classes.\n * In all these cases, there is no ambiguity about which width a\n * terminal shall use. For characters in the East Asian Ambiguous (A)\n * class, the width choice depends purely on a preference of backward\n * compatibility with either historic CJK or Western practice.\n * Choosing single-width for these characters is easy to justify as\n * the appropriate long-term solution, as the CJK practice of\n * displaying these characters as double-width comes from historic\n * implementation simplicity (8-bit encoded characters were displayed\n * single-width and 16-bit ones double-width, even for Greek,\n * Cyrillic, etc.) and not any typographic considerations.\n *\n * Much less clear is the choice of width for the Not East Asian\n * (Neutral) class. Existing practice does not dictate a width for any\n * of these characters. It would nevertheless make sense\n * typographically to allocate two character cells to characters such\n * as for instance EM SPACE or VOLUME INTEGRAL, which cannot be\n * represented adequately with a single-width glyph. The following\n * routines at present merely assign a single-cell width to all\n * neutral characters, in the interest of simplicity. This is not\n * entirely satisfactory and should be reconsidered before\n * establishing a formal standard in this area. At the moment, the\n * decision which Not East Asian (Neutral) characters should be\n * represented by double-width glyphs cannot yet be answered by\n * applying a simple rule from the Unicode database content. Setting\n * up a proper standard for the behavior of UTF-8 character terminals\n * will require a careful analysis not only of each Unicode character,\n * but also of each presentation form, something the author of these\n * routines has avoided to do so far.\n *\n * http://www.unicode.org/unicode/reports/tr11/\n *\n * Markus Kuhn -- 2007-05-26 (Unicode 5.0)\n *\n * Permission to use, copy, modify, and distribute this software\n * for any purpose and without fee is hereby granted. The author\n * disclaims all warranties with regard to this software.\n *\n * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c\n */\n\nstruct interval {\n  int first;\n  int last;\n};\n\n/* sorted list of non-overlapping intervals of non-spacing characters */\n/* generated by \"uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c\" */\nstatic const struct interval combining[] = {\n  { 0x0300, 0x036F }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 },\n  { 0x0591, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 },\n  { 0x05C4, 0x05C5 }, { 0x05C7, 0x05C7 }, { 0x0600, 0x0603 },\n  { 0x0610, 0x0615 }, { 0x064B, 0x065E }, { 0x0670, 0x0670 },\n  { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED },\n  { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A },\n  { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x0901, 0x0902 },\n  { 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D },\n  { 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 },\n  { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD },\n  { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C },\n  { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D },\n  { 0x0A70, 0x0A71 }, { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC },\n  { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD },\n  { 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C },\n  { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, { 0x0B4D, 0x0B4D },\n  { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 },\n  { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 },\n  { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0CBC, 0x0CBC },\n  { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD },\n  { 0x0CE2, 0x0CE3 }, { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D },\n  { 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 },\n  { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E },\n  { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC },\n  { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 },\n  { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E },\n  { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 },\n  { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 },\n  { 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 },\n  { 0x1058, 0x1059 }, { 0x1160, 0x11FF }, { 0x135F, 0x135F },\n  { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 },\n  { 0x1772, 0x1773 }, { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD },\n  { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD },\n  { 0x180B, 0x180D }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 },\n  { 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193B },\n  { 0x1A17, 0x1A18 }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 },\n  { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 },\n  { 0x1B6B, 0x1B73 }, { 0x1DC0, 0x1DCA }, { 0x1DFE, 0x1DFF },\n  { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2063 },\n  { 0x206A, 0x206F }, { 0x20D0, 0x20EF }, { 0x302A, 0x302F },\n  { 0x3099, 0x309A }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B },\n  { 0xA825, 0xA826 }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F },\n  { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB },\n  { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F },\n  { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x1D167, 0x1D169 },\n  { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD },\n  { 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F },\n  { 0xE0100, 0xE01EF }\n};\n\n\n/* auxiliary function for binary search in interval table */\nstatic int bisearch(uint32_t ucs, const struct interval *table, int max) {\n  int min = 0;\n  int mid;\n\n  if (ucs < table[0].first || ucs > table[max].last)\n    return 0;\n  while (max >= min) {\n    mid = (min + max) / 2;\n    if (ucs > table[mid].last)\n      min = mid + 1;\n    else if (ucs < table[mid].first)\n      max = mid - 1;\n    else\n      return 1;\n  }\n\n  return 0;\n}\n\n\n/* The following two functions define the column width of an ISO 10646\n * character as follows:\n *\n *    - The null character (U+0000) has a column width of 0.\n *\n *    - Other C0/C1 control characters and DEL will lead to a return\n *      value of -1.\n *\n *    - Non-spacing and enclosing combining characters (general\n *      category code Mn or Me in the Unicode database) have a\n *      column width of 0.\n *\n *    - SOFT HYPHEN (U+00AD) has a column width of 1.\n *\n *    - Other format characters (general category code Cf in the Unicode\n *      database) and ZERO WIDTH SPACE (U+200B) have a column width of 0.\n *\n *    - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF)\n *      have a column width of 0.\n *\n *    - Spacing characters in the East Asian Wide (W) or East Asian\n *      Full-width (F) category as defined in Unicode Technical\n *      Report #11 have a column width of 2.\n *\n *    - All remaining characters (including all printable\n *      ISO 8859-1 and WGL4 characters, Unicode control characters,\n *      etc.) have a column width of 1.\n *\n * This implementation assumes that uint32_t characters are encoded\n * in ISO 10646.\n */\n\n\nstatic int mk_wcwidth(uint32_t ucs)\n{\n  /* test for 8-bit control characters */\n  if (ucs == 0)\n    return 0;\n  if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0))\n    return -1;\n\n  /* binary search in table of non-spacing characters */\n  if (bisearch(ucs, combining,\n               sizeof(combining) / sizeof(struct interval) - 1))\n    return 0;\n\n  /* if we arrive here, ucs is not a combining or C0/C1 control character */\n\n  return 1 + \n    (ucs >= 0x1100 &&\n     (ucs <= 0x115f ||                    /* Hangul Jamo init. consonants */\n      ucs == 0x2329 || ucs == 0x232a ||\n      (ucs >= 0x2e80 && ucs <= 0xa4cf &&\n       ucs != 0x303f) ||                  /* CJK ... Yi */\n      (ucs >= 0xac00 && ucs <= 0xd7a3) || /* Hangul Syllables */\n      (ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */\n      (ucs >= 0xfe10 && ucs <= 0xfe19) || /* Vertical forms */\n      (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */\n      (ucs >= 0xff00 && ucs <= 0xff60) || /* Fullwidth Forms */\n      (ucs >= 0xffe0 && ucs <= 0xffe6) ||\n      (ucs >= 0x20000 && ucs <= 0x2fffd) ||\n      (ucs >= 0x30000 && ucs <= 0x3fffd)));\n}\n\n\nstatic int mk_wcswidth(const uint32_t *pwcs, size_t n)\n{\n  int w, width = 0;\n\n  for (;*pwcs && n-- > 0; pwcs++)\n    if ((w = mk_wcwidth(*pwcs)) < 0)\n      return -1;\n    else\n      width += w;\n\n  return width;\n}\n\n\n/*\n * The following functions are the same as mk_wcwidth() and\n * mk_wcswidth(), except that spacing characters in the East Asian\n * Ambiguous (A) category as defined in Unicode Technical Report #11\n * have a column width of 2. This variant might be useful for users of\n * CJK legacy encodings who want to migrate to UCS without changing\n * the traditional terminal character-width behaviour. It is not\n * otherwise recommended for general use.\n */\nstatic int mk_wcwidth_cjk(uint32_t ucs)\n{\n  /* sorted list of non-overlapping intervals of East Asian Ambiguous\n   * characters, generated by \"uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf c\" */\n  static const struct interval ambiguous[] = {\n    { 0x00A1, 0x00A1 }, { 0x00A4, 0x00A4 }, { 0x00A7, 0x00A8 },\n    { 0x00AA, 0x00AA }, { 0x00AE, 0x00AE }, { 0x00B0, 0x00B4 },\n    { 0x00B6, 0x00BA }, { 0x00BC, 0x00BF }, { 0x00C6, 0x00C6 },\n    { 0x00D0, 0x00D0 }, { 0x00D7, 0x00D8 }, { 0x00DE, 0x00E1 },\n    { 0x00E6, 0x00E6 }, { 0x00E8, 0x00EA }, { 0x00EC, 0x00ED },\n    { 0x00F0, 0x00F0 }, { 0x00F2, 0x00F3 }, { 0x00F7, 0x00FA },\n    { 0x00FC, 0x00FC }, { 0x00FE, 0x00FE }, { 0x0101, 0x0101 },\n    { 0x0111, 0x0111 }, { 0x0113, 0x0113 }, { 0x011B, 0x011B },\n    { 0x0126, 0x0127 }, { 0x012B, 0x012B }, { 0x0131, 0x0133 },\n    { 0x0138, 0x0138 }, { 0x013F, 0x0142 }, { 0x0144, 0x0144 },\n    { 0x0148, 0x014B }, { 0x014D, 0x014D }, { 0x0152, 0x0153 },\n    { 0x0166, 0x0167 }, { 0x016B, 0x016B }, { 0x01CE, 0x01CE },\n    { 0x01D0, 0x01D0 }, { 0x01D2, 0x01D2 }, { 0x01D4, 0x01D4 },\n    { 0x01D6, 0x01D6 }, { 0x01D8, 0x01D8 }, { 0x01DA, 0x01DA },\n    { 0x01DC, 0x01DC }, { 0x0251, 0x0251 }, { 0x0261, 0x0261 },\n    { 0x02C4, 0x02C4 }, { 0x02C7, 0x02C7 }, { 0x02C9, 0x02CB },\n    { 0x02CD, 0x02CD }, { 0x02D0, 0x02D0 }, { 0x02D8, 0x02DB },\n    { 0x02DD, 0x02DD }, { 0x02DF, 0x02DF }, { 0x0391, 0x03A1 },\n    { 0x03A3, 0x03A9 }, { 0x03B1, 0x03C1 }, { 0x03C3, 0x03C9 },\n    { 0x0401, 0x0401 }, { 0x0410, 0x044F }, { 0x0451, 0x0451 },\n    { 0x2010, 0x2010 }, { 0x2013, 0x2016 }, { 0x2018, 0x2019 },\n    { 0x201C, 0x201D }, { 0x2020, 0x2022 }, { 0x2024, 0x2027 },\n    { 0x2030, 0x2030 }, { 0x2032, 0x2033 }, { 0x2035, 0x2035 },\n    { 0x203B, 0x203B }, { 0x203E, 0x203E }, { 0x2074, 0x2074 },\n    { 0x207F, 0x207F }, { 0x2081, 0x2084 }, { 0x20AC, 0x20AC },\n    { 0x2103, 0x2103 }, { 0x2105, 0x2105 }, { 0x2109, 0x2109 },\n    { 0x2113, 0x2113 }, { 0x2116, 0x2116 }, { 0x2121, 0x2122 },\n    { 0x2126, 0x2126 }, { 0x212B, 0x212B }, { 0x2153, 0x2154 },\n    { 0x215B, 0x215E }, { 0x2160, 0x216B }, { 0x2170, 0x2179 },\n    { 0x2190, 0x2199 }, { 0x21B8, 0x21B9 }, { 0x21D2, 0x21D2 },\n    { 0x21D4, 0x21D4 }, { 0x21E7, 0x21E7 }, { 0x2200, 0x2200 },\n    { 0x2202, 0x2203 }, { 0x2207, 0x2208 }, { 0x220B, 0x220B },\n    { 0x220F, 0x220F }, { 0x2211, 0x2211 }, { 0x2215, 0x2215 },\n    { 0x221A, 0x221A }, { 0x221D, 0x2220 }, { 0x2223, 0x2223 },\n    { 0x2225, 0x2225 }, { 0x2227, 0x222C }, { 0x222E, 0x222E },\n    { 0x2234, 0x2237 }, { 0x223C, 0x223D }, { 0x2248, 0x2248 },\n    { 0x224C, 0x224C }, { 0x2252, 0x2252 }, { 0x2260, 0x2261 },\n    { 0x2264, 0x2267 }, { 0x226A, 0x226B }, { 0x226E, 0x226F },\n    { 0x2282, 0x2283 }, { 0x2286, 0x2287 }, { 0x2295, 0x2295 },\n    { 0x2299, 0x2299 }, { 0x22A5, 0x22A5 }, { 0x22BF, 0x22BF },\n    { 0x2312, 0x2312 }, { 0x2460, 0x24E9 }, { 0x24EB, 0x254B },\n    { 0x2550, 0x2573 }, { 0x2580, 0x258F }, { 0x2592, 0x2595 },\n    { 0x25A0, 0x25A1 }, { 0x25A3, 0x25A9 }, { 0x25B2, 0x25B3 },\n    { 0x25B6, 0x25B7 }, { 0x25BC, 0x25BD }, { 0x25C0, 0x25C1 },\n    { 0x25C6, 0x25C8 }, { 0x25CB, 0x25CB }, { 0x25CE, 0x25D1 },\n    { 0x25E2, 0x25E5 }, { 0x25EF, 0x25EF }, { 0x2605, 0x2606 },\n    { 0x2609, 0x2609 }, { 0x260E, 0x260F }, { 0x2614, 0x2615 },\n    { 0x261C, 0x261C }, { 0x261E, 0x261E }, { 0x2640, 0x2640 },\n    { 0x2642, 0x2642 }, { 0x2660, 0x2661 }, { 0x2663, 0x2665 },\n    { 0x2667, 0x266A }, { 0x266C, 0x266D }, { 0x266F, 0x266F },\n    { 0x273D, 0x273D }, { 0x2776, 0x277F }, { 0xE000, 0xF8FF },\n    { 0xFFFD, 0xFFFD }, { 0xF0000, 0xFFFFD }, { 0x100000, 0x10FFFD }\n  };\n\n  /* binary search in table of non-spacing characters */\n  if (bisearch(ucs, ambiguous,\n               sizeof(ambiguous) / sizeof(struct interval) - 1))\n    return 2;\n\n  return mk_wcwidth(ucs);\n}\n\n\nstatic int mk_wcswidth_cjk(const uint32_t *pwcs, size_t n)\n{\n  int w, width = 0;\n\n  for (;*pwcs && n-- > 0; pwcs++)\n    if ((w = mk_wcwidth_cjk(*pwcs)) < 0)\n      return -1;\n    else\n      width += w;\n\n  return width;\n}\n\n// ################################\n// ### The rest added by Paul Evans\n\nstatic const struct interval fullwidth[] = {\n#include \"fullwidth.inc\"\n};\n\nINTERNAL int vterm_unicode_width(uint32_t codepoint)\n{\n  if(bisearch(codepoint, fullwidth, sizeof(fullwidth) / sizeof(fullwidth[0]) - 1))\n    return 2;\n\n  return mk_wcwidth(codepoint);\n}\n\nINTERNAL int vterm_unicode_is_combining(uint32_t codepoint)\n{\n  return bisearch(codepoint, combining, sizeof(combining) / sizeof(struct interval) - 1);\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/utf8.h",
    "content": "/* The following functions copied and adapted from libtermkey\n *\n * http://www.leonerd.org.uk/code/libtermkey/\n */\nstatic inline unsigned int utf8_seqlen(long codepoint)\n{\n  if(codepoint < 0x0000080) return 1;\n  if(codepoint < 0x0000800) return 2;\n  if(codepoint < 0x0010000) return 3;\n  if(codepoint < 0x0200000) return 4;\n  if(codepoint < 0x4000000) return 5;\n  return 6;\n}\n\n/* Does NOT NUL-terminate the buffer */\nstatic int fill_utf8(long codepoint, char *str)\n{\n  int nbytes = utf8_seqlen(codepoint);\n\n  // This is easier done backwards\n  int b = nbytes;\n  while(b > 1) {\n    b--;\n    str[b] = 0x80 | (codepoint & 0x3f);\n    codepoint >>= 6;\n  }\n\n  switch(nbytes) {\n    case 1: str[0] =        (codepoint & 0x7f); break;\n    case 2: str[0] = 0xc0 | (codepoint & 0x1f); break;\n    case 3: str[0] = 0xe0 | (codepoint & 0x0f); break;\n    case 4: str[0] = 0xf0 | (codepoint & 0x07); break;\n    case 5: str[0] = 0xf8 | (codepoint & 0x03); break;\n    case 6: str[0] = 0xfc | (codepoint & 0x01); break;\n  }\n\n  return nbytes;\n}\n/* end copy */\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/vterm.c",
    "content": "#include \"vterm_internal.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdarg.h>\n#include <string.h>\n\n/*****************\n * API functions *\n *****************/\n\nstatic void *default_malloc(size_t size, void *allocdata)\n{\n  void *ptr = malloc(size);\n  if(ptr)\n    memset(ptr, 0, size);\n  return ptr;\n}\n\nstatic void default_free(void *ptr, void *allocdata)\n{\n  free(ptr);\n}\n\nstatic VTermAllocatorFunctions default_allocator = {\n  .malloc = &default_malloc,\n  .free   = &default_free,\n};\n\nVTerm *vterm_new(int rows, int cols)\n{\n  return vterm_new_with_allocator(rows, cols, &default_allocator, NULL);\n}\n\nVTerm *vterm_new_with_allocator(int rows, int cols, VTermAllocatorFunctions *funcs, void *allocdata)\n{\n  /* Need to bootstrap using the allocator function directly */\n  VTerm *vt = (*funcs->malloc)(sizeof(VTerm), allocdata);\n\n  if (vt == NULL)\n    return NULL;\n  vt->allocator = funcs;\n  vt->allocdata = allocdata;\n\n  vt->rows = rows;\n  vt->cols = cols;\n\n  vt->parser.state = NORMAL;\n\n  vt->parser.callbacks = NULL;\n  vt->parser.cbdata    = NULL;\n\n  vt->parser.strbuffer_len = 64;\n  vt->parser.strbuffer_cur = 0;\n  vt->parser.strbuffer = vterm_allocator_malloc(vt, vt->parser.strbuffer_len);\n  if (vt->parser.strbuffer == NULL)\n  {\n    vterm_allocator_free(vt, vt);\n    return NULL;\n  }\n\n  vt->outfunc = NULL;\n  vt->outdata = NULL;\n\n  vt->outbuffer_len = 64;\n  vt->outbuffer_cur = 0;\n  vt->outbuffer = vterm_allocator_malloc(vt, vt->outbuffer_len);\n  if (vt->outbuffer == NULL)\n  {\n    vterm_allocator_free(vt, vt->parser.strbuffer);\n    vterm_allocator_free(vt, vt);\n    return NULL;\n  }\n\n  vt->tmpbuffer_len = 64;\n  vt->tmpbuffer = vterm_allocator_malloc(vt, vt->tmpbuffer_len);\n\n  return vt;\n}\n\nvoid vterm_free(VTerm *vt)\n{\n  if(vt->screen)\n    vterm_screen_free(vt->screen);\n\n  if(vt->state)\n    vterm_state_free(vt->state);\n\n  vterm_allocator_free(vt, vt->parser.strbuffer);\n  vterm_allocator_free(vt, vt->outbuffer);\n  vterm_allocator_free(vt, vt->tmpbuffer);\n\n  vterm_allocator_free(vt, vt);\n}\n\nINTERNAL void *vterm_allocator_malloc(VTerm *vt, size_t size)\n{\n  return (*vt->allocator->malloc)(size, vt->allocdata);\n}\n\nINTERNAL void vterm_allocator_free(VTerm *vt, void *ptr)\n{\n  if (ptr)\n    (*vt->allocator->free)(ptr, vt->allocdata);\n}\n\nvoid vterm_get_size(const VTerm *vt, int *rowsp, int *colsp)\n{\n  if(rowsp)\n    *rowsp = vt->rows;\n  if(colsp)\n    *colsp = vt->cols;\n}\n\nvoid vterm_set_size(VTerm *vt, int rows, int cols)\n{\n  vt->rows = rows;\n  vt->cols = cols;\n\n  if(vt->parser.callbacks && vt->parser.callbacks->resize)\n    (*vt->parser.callbacks->resize)(rows, cols, vt->parser.cbdata);\n}\n\nint vterm_get_utf8(const VTerm *vt)\n{\n  return vt->mode.utf8;\n}\n\nvoid vterm_set_utf8(VTerm *vt, int is_utf8)\n{\n  vt->mode.utf8 = is_utf8;\n}\n\nvoid vterm_output_set_callback(VTerm *vt, VTermOutputCallback *func, void *user)\n{\n  vt->outfunc = func;\n  vt->outdata = user;\n}\n\nINTERNAL void vterm_push_output_bytes(VTerm *vt, const char *bytes, size_t len)\n{\n  if(vt->outfunc) {\n    (vt->outfunc)(bytes, len, vt->outdata);\n    return;\n  }\n\n  if(len > vt->outbuffer_len - vt->outbuffer_cur)\n    return;\n\n  memcpy(vt->outbuffer + vt->outbuffer_cur, bytes, len);\n  vt->outbuffer_cur += len;\n}\n\nINTERNAL void vterm_push_output_vsprintf(VTerm *vt, const char *format, va_list args)\n{\n  size_t len = vsnprintf(vt->tmpbuffer, vt->tmpbuffer_len,\n      format, args);\n\n  vterm_push_output_bytes(vt, vt->tmpbuffer, len);\n}\n\nINTERNAL void vterm_push_output_sprintf(VTerm *vt, const char *format, ...)\n{\n  va_list args;\n  va_start(args, format);\n  vterm_push_output_vsprintf(vt, format, args);\n  va_end(args);\n}\n\nINTERNAL void vterm_push_output_sprintf_ctrl(VTerm *vt, unsigned char ctrl, const char *fmt, ...)\n{\n  size_t cur;\n\n  if(ctrl >= 0x80 && !vt->mode.ctrl8bit)\n    cur = snprintf(vt->tmpbuffer, vt->tmpbuffer_len,\n        ESC_S \"%c\", ctrl - 0x40);\n  else\n    cur = snprintf(vt->tmpbuffer, vt->tmpbuffer_len,\n        \"%c\", ctrl);\n\n  if(cur >= vt->tmpbuffer_len)\n    return;\n\n  va_list args;\n  va_start(args, fmt);\n  cur += vsnprintf(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,\n      fmt, args);\n  va_end(args);\n\n  if(cur >= vt->tmpbuffer_len)\n    return;\n\n  vterm_push_output_bytes(vt, vt->tmpbuffer, cur);\n}\n\nINTERNAL void vterm_push_output_sprintf_dcs(VTerm *vt, const char *fmt, ...)\n{\n  size_t cur = 0;\n\n  cur += snprintf(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,\n      vt->mode.ctrl8bit ? \"\\x90\" : ESC_S \"P\"); // DCS\n\n  if(cur >= vt->tmpbuffer_len)\n    return;\n\n  va_list args;\n  va_start(args, fmt);\n  cur += vsnprintf(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,\n      fmt, args);\n  va_end(args);\n\n  if(cur >= vt->tmpbuffer_len)\n    return;\n\n  cur += snprintf(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,\n      vt->mode.ctrl8bit ? \"\\x9C\" : ESC_S \"\\\\\"); // ST\n\n  if(cur >= vt->tmpbuffer_len)\n    return;\n\n  vterm_push_output_bytes(vt, vt->tmpbuffer, cur);\n}\n\nsize_t vterm_output_get_buffer_size(const VTerm *vt)\n{\n  return vt->outbuffer_len;\n}\n\nsize_t vterm_output_get_buffer_current(const VTerm *vt)\n{\n  return vt->outbuffer_cur;\n}\n\nsize_t vterm_output_get_buffer_remaining(const VTerm *vt)\n{\n  return vt->outbuffer_len - vt->outbuffer_cur;\n}\n\nsize_t vterm_output_read(VTerm *vt, char *buffer, size_t len)\n{\n  if(len > vt->outbuffer_cur)\n    len = vt->outbuffer_cur;\n\n  memcpy(buffer, vt->outbuffer, len);\n\n  if(len < vt->outbuffer_cur)\n    memmove(vt->outbuffer, vt->outbuffer + len, vt->outbuffer_cur - len);\n\n  vt->outbuffer_cur -= len;\n\n  return len;\n}\n\nVTermValueType vterm_get_attr_type(VTermAttr attr)\n{\n  switch(attr) {\n    case VTERM_ATTR_BOLD:       return VTERM_VALUETYPE_BOOL;\n    case VTERM_ATTR_UNDERLINE:  return VTERM_VALUETYPE_INT;\n    case VTERM_ATTR_ITALIC:     return VTERM_VALUETYPE_BOOL;\n    case VTERM_ATTR_BLINK:      return VTERM_VALUETYPE_BOOL;\n    case VTERM_ATTR_REVERSE:    return VTERM_VALUETYPE_BOOL;\n    case VTERM_ATTR_STRIKE:     return VTERM_VALUETYPE_BOOL;\n    case VTERM_ATTR_FONT:       return VTERM_VALUETYPE_INT;\n    case VTERM_ATTR_FOREGROUND: return VTERM_VALUETYPE_COLOR;\n    case VTERM_ATTR_BACKGROUND: return VTERM_VALUETYPE_COLOR;\n\n    case VTERM_N_ATTRS: return 0;\n  }\n  return 0; /* UNREACHABLE */\n}\n\nVTermValueType vterm_get_prop_type(VTermProp prop)\n{\n  switch(prop) {\n    case VTERM_PROP_CURSORVISIBLE: return VTERM_VALUETYPE_BOOL;\n    case VTERM_PROP_CURSORBLINK:   return VTERM_VALUETYPE_BOOL;\n    case VTERM_PROP_ALTSCREEN:     return VTERM_VALUETYPE_BOOL;\n    case VTERM_PROP_TITLE:         return VTERM_VALUETYPE_STRING;\n    case VTERM_PROP_ICONNAME:      return VTERM_VALUETYPE_STRING;\n    case VTERM_PROP_REVERSE:       return VTERM_VALUETYPE_BOOL;\n    case VTERM_PROP_CURSORSHAPE:   return VTERM_VALUETYPE_INT;\n    case VTERM_PROP_MOUSE:         return VTERM_VALUETYPE_INT;\n\n    case VTERM_N_PROPS: return 0;\n  }\n  return 0; /* UNREACHABLE */\n}\n\nvoid vterm_scroll_rect(VTermRect rect,\n    int downward,\n    int rightward,\n    int (*moverect)(VTermRect src, VTermRect dest, void *user),\n    int (*eraserect)(VTermRect rect, int selective, void *user),\n    void *user)\n{\n  VTermRect src;\n  VTermRect dest;\n\n  if(abs(downward)  >= rect.end_row - rect.start_row ||\n     abs(rightward) >= rect.end_col - rect.start_col) {\n    /* Scroll more than area; just erase the lot */\n    (*eraserect)(rect, 0, user);\n    return;\n  }\n\n  if(rightward >= 0) {\n    /* rect: [XXX................]\n     * src:     [----------------]\n     * dest: [----------------]\n     */\n    dest.start_col = rect.start_col;\n    dest.end_col   = rect.end_col   - rightward;\n    src.start_col  = rect.start_col + rightward;\n    src.end_col    = rect.end_col;\n  }\n  else {\n    /* rect: [................XXX]\n     * src:  [----------------]\n     * dest:    [----------------]\n     */\n    int leftward = -rightward;\n    dest.start_col = rect.start_col + leftward;\n    dest.end_col   = rect.end_col;\n    src.start_col  = rect.start_col;\n    src.end_col    = rect.end_col - leftward;\n  }\n\n  if(downward >= 0) {\n    dest.start_row = rect.start_row;\n    dest.end_row   = rect.end_row   - downward;\n    src.start_row  = rect.start_row + downward;\n    src.end_row    = rect.end_row;\n  }\n  else {\n    int upward = -downward;\n    dest.start_row = rect.start_row + upward;\n    dest.end_row   = rect.end_row;\n    src.start_row  = rect.start_row;\n    src.end_row    = rect.end_row - upward;\n  }\n\n  if(moverect)\n    (*moverect)(dest, src, user);\n\n  if(downward > 0)\n    rect.start_row = rect.end_row - downward;\n  else if(downward < 0)\n    rect.end_row = rect.start_row - downward;\n\n  if(rightward > 0)\n    rect.start_col = rect.end_col - rightward;\n  else if(rightward < 0)\n    rect.end_col = rect.start_col - rightward;\n\n  (*eraserect)(rect, 0, user);\n}\n\nvoid vterm_copy_cells(VTermRect dest,\n    VTermRect src,\n    void (*copycell)(VTermPos dest, VTermPos src, void *user),\n    void *user)\n{\n  int downward  = src.start_row - dest.start_row;\n  int rightward = src.start_col - dest.start_col;\n\n  int init_row, test_row, init_col, test_col;\n  int inc_row, inc_col;\n\n  if(downward < 0) {\n    init_row = dest.end_row - 1;\n    test_row = dest.start_row - 1;\n    inc_row = -1;\n  }\n  else /* downward >= 0 */ {\n    init_row = dest.start_row;\n    test_row = dest.end_row;\n    inc_row = +1;\n  }\n\n  if(rightward < 0) {\n    init_col = dest.end_col - 1;\n    test_col = dest.start_col - 1;\n    inc_col = -1;\n  }\n  else /* rightward >= 0 */ {\n    init_col = dest.start_col;\n    test_col = dest.end_col;\n    inc_col = +1;\n  }\n\n  VTermPos pos;\n  for(pos.row = init_row; pos.row != test_row; pos.row += inc_row)\n    for(pos.col = init_col; pos.col != test_col; pos.col += inc_col) {\n      VTermPos srcpos = { pos.row + downward, pos.col + rightward };\n      (*copycell)(pos, srcpos, user);\n    }\n}\n\nvoid vterm_check_version(int major, int minor)\n{\n  if(major != VTERM_VERSION_MAJOR) {\n    fprintf(stderr, \"libvterm major version mismatch; %d (wants) != %d (library)\\n\",\n        major, VTERM_VERSION_MAJOR);\n    exit(1);\n  }\n\n  if(minor > VTERM_VERSION_MINOR) {\n    fprintf(stderr, \"libvterm minor version mismatch; %d (wants) > %d (library)\\n\",\n        minor, VTERM_VERSION_MINOR);\n    exit(1);\n  }\n\n  // Happy\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/src/vterm_internal.h",
    "content": "#ifndef __VTERM_INTERNAL_H__\n#define __VTERM_INTERNAL_H__\n\n#include \"vterm.h\"\n\n#include <stdarg.h>\n\n#if defined(__GNUC__)\n# define INTERNAL __attribute__((visibility(\"internal\")))\n#else\n# define INTERNAL\n#endif\n\n#ifdef DEBUG\n# define DEBUG_LOG(...) fprintf(stderr, __VA_ARGS__)\n#else\n# define DEBUG_LOG(...)\n#endif\n\n#define ESC_S \"\\x1b\"\n\n#define INTERMED_MAX 16\n\n#define CSI_ARGS_MAX 16\n#define CSI_LEADER_MAX 16\n\ntypedef struct VTermEncoding VTermEncoding;\n\ntypedef struct {\n  VTermEncoding *enc;\n\n  // This size should be increased if required by other stateful encodings\n  char           data[4*sizeof(uint32_t)];\n} VTermEncodingInstance;\n\nstruct VTermPen\n{\n  VTermColor fg;\n  VTermColor bg;\n  unsigned int bold:1;\n  unsigned int underline:2;\n  unsigned int italic:1;\n  unsigned int blink:1;\n  unsigned int reverse:1;\n  unsigned int strike:1;\n  unsigned int font:4; /* To store 0-9 */\n};\n\nstruct VTermState\n{\n  VTerm *vt;\n\n  const VTermStateCallbacks *callbacks;\n  void *cbdata;\n\n  const VTermParserCallbacks *fallbacks;\n  void *fbdata;\n\n  int rows;\n  int cols;\n\n  /* Current cursor position */\n  VTermPos pos;\n\n  int at_phantom; /* True if we're on the \"81st\" phantom column to defer a wraparound */\n\n  int scrollregion_top;\n  int scrollregion_bottom; /* -1 means unbounded */\n#define SCROLLREGION_BOTTOM(state) ((state)->scrollregion_bottom > -1 ? (state)->scrollregion_bottom : (state)->rows)\n  int scrollregion_left;\n#define SCROLLREGION_LEFT(state)  ((state)->mode.leftrightmargin ? (state)->scrollregion_left : 0)\n  int scrollregion_right; /* -1 means unbounded */\n#define SCROLLREGION_RIGHT(state) ((state)->mode.leftrightmargin && (state)->scrollregion_right > -1 ? (state)->scrollregion_right : (state)->cols)\n\n  /* Bitvector of tab stops */\n  unsigned char *tabstops;\n\n  VTermLineInfo *lineinfo;\n#define ROWWIDTH(state,row) ((state)->lineinfo[(row)].doublewidth ? ((state)->cols / 2) : (state)->cols)\n#define THISROWWIDTH(state) ROWWIDTH(state, (state)->pos.row)\n\n  /* Mouse state */\n  int mouse_col, mouse_row;\n  int mouse_buttons;\n  int mouse_flags;\n#define MOUSE_WANT_CLICK 0x01\n#define MOUSE_WANT_DRAG  0x02\n#define MOUSE_WANT_MOVE  0x04\n\n  enum { MOUSE_X10, MOUSE_UTF8, MOUSE_SGR, MOUSE_RXVT } mouse_protocol;\n\n  /* Last glyph output, for Unicode recombining purposes */\n  uint32_t *combine_chars;\n  size_t combine_chars_size; // Number of ELEMENTS in the above\n  int combine_width; // The width of the glyph above\n  VTermPos combine_pos;   // Position before movement\n\n  struct {\n    unsigned int keypad:1;\n    unsigned int cursor:1;\n    unsigned int autowrap:1;\n    unsigned int insert:1;\n    unsigned int newline:1;\n    unsigned int cursor_visible:1;\n    unsigned int cursor_blink:1;\n    unsigned int cursor_shape:2;\n    unsigned int alt_screen:1;\n    unsigned int origin:1;\n    unsigned int screen:1;\n    unsigned int leftrightmargin:1;\n    unsigned int bracketpaste:1;\n    unsigned int report_focus:1;\n  } mode;\n\n  VTermEncodingInstance encoding[4], encoding_utf8;\n  int gl_set, gr_set, gsingle_set;\n\n  struct VTermPen pen;\n\n  VTermColor default_fg;\n  VTermColor default_bg;\n  VTermColor colors[16]; // Store the 8 ANSI and the 8 ANSI high-brights only\n\n  int bold_is_highbright;\n\n  unsigned int protected_cell : 1;\n\n  /* Saved state under DEC mode 1048/1049 */\n  struct {\n    VTermPos pos;\n    struct VTermPen pen;\n\n    struct {\n      unsigned int cursor_visible:1;\n      unsigned int cursor_blink:1;\n      unsigned int cursor_shape:2;\n    } mode;\n  } saved;\n};\n\ntypedef enum {\n  VTERM_PARSER_OSC,\n  VTERM_PARSER_DCS,\n\n  VTERM_N_PARSER_TYPES\n} VTermParserStringType;\n\nstruct VTerm\n{\n  VTermAllocatorFunctions *allocator;\n  void *allocdata;\n\n  int rows;\n  int cols;\n\n  struct {\n    unsigned int utf8:1;\n    unsigned int ctrl8bit:1;\n  } mode;\n\n  struct {\n    enum VTermParserState {\n      NORMAL,\n      CSI_LEADER,\n      CSI_ARGS,\n      CSI_INTERMED,\n      ESC,\n      /* below here are the \"string states\" */\n      STRING,\n      ESC_IN_STRING,\n    } state;\n\n    int intermedlen;\n    char intermed[INTERMED_MAX];\n\n    int csi_leaderlen;\n    char csi_leader[CSI_LEADER_MAX];\n\n    int csi_argi;\n    long csi_args[CSI_ARGS_MAX];\n\n    const VTermParserCallbacks *callbacks;\n    void *cbdata;\n\n    VTermParserStringType stringtype;\n    char  *strbuffer;\n    size_t strbuffer_len;\n    size_t strbuffer_cur;\n  } parser;\n\n  /* len == malloc()ed size; cur == number of valid bytes */\n\n  VTermOutputCallback *outfunc;\n  void                *outdata;\n\n  char  *outbuffer;\n  size_t outbuffer_len;\n  size_t outbuffer_cur;\n\n  char  *tmpbuffer;\n  size_t tmpbuffer_len;\n\n  VTermState *state;\n  VTermScreen *screen;\n};\n\nstruct VTermEncoding {\n  void (*init) (VTermEncoding *enc, void *data);\n  void (*decode)(VTermEncoding *enc, void *data,\n                 uint32_t cp[], int *cpi, int cplen,\n                 const char bytes[], size_t *pos, size_t len);\n};\n\ntypedef enum {\n  ENC_UTF8,\n  ENC_SINGLE_94\n} VTermEncodingType;\n\nvoid *vterm_allocator_malloc(VTerm *vt, size_t size);\nvoid  vterm_allocator_free(VTerm *vt, void *ptr);\n\nvoid vterm_push_output_bytes(VTerm *vt, const char *bytes, size_t len);\nvoid vterm_push_output_vsprintf(VTerm *vt, const char *format, va_list args);\nvoid vterm_push_output_sprintf(VTerm *vt, const char *format, ...);\nvoid vterm_push_output_sprintf_ctrl(VTerm *vt, unsigned char ctrl, const char *fmt, ...);\nvoid vterm_push_output_sprintf_dcs(VTerm *vt, const char *fmt, ...);\n\nvoid vterm_state_free(VTermState *state);\n\nvoid vterm_state_newpen(VTermState *state);\nvoid vterm_state_resetpen(VTermState *state);\nvoid vterm_state_setpen(VTermState *state, const long args[], int argcount);\nint  vterm_state_getpen(VTermState *state, long args[], int argcount);\nvoid vterm_state_savepen(VTermState *state, int save);\n\nenum {\n  C1_SS3 = 0x8f,\n  C1_DCS = 0x90,\n  C1_CSI = 0x9b,\n  C1_ST  = 0x9c,\n};\n\nvoid vterm_state_push_output_sprintf_CSI(VTermState *vts, const char *format, ...);\n\nvoid vterm_screen_free(VTermScreen *screen);\n\nVTermEncoding *vterm_lookup_encoding(VTermEncodingType type, char designation);\n\nint vterm_unicode_width(uint32_t codepoint);\nint vterm_unicode_is_combining(uint32_t codepoint);\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/02parser.test",
    "content": "INIT\nUTF8 0\nWANTPARSER\n\n!Basic text\nPUSH \"hello\"\n  text 0x68, 0x65, 0x6c, 0x6c, 0x6f\n\n!C0\nPUSH \"\\x03\"\n  control 3\n\nPUSH \"\\x1f\"\n  control 0x1f\n\n!C1 8bit\nPUSH \"\\x83\"\n  control 0x83\n\nPUSH \"\\x9f\"\n  control 0x9f\n\n!C1 7bit\nPUSH \"\\e\\x43\"\n  control 0x83\n\nPUSH \"\\e\\x5f\"\n  control 0x9f\n\n!High bytes\nPUSH \"\\xa0\\xcc\\xfe\"\n  text 0xa0, 0xcc, 0xfe\n\n!Mixed\nPUSH \"1\\n2\"\n  text 0x31\n  control 10\n  text 0x32\n\n!Escape\nPUSH \"\\e=\"\n  escape \"=\"\n\n!Escape 2-byte\nPUSH \"\\e(X\"\n  escape \"(X\"\n\n!Split write Escape\nPUSH \"\\e(\"\nPUSH \"Y\"\n  escape \"(Y\"\n\n!Escape cancels Escape, starts another\nPUSH \"\\e(\\e)Z\"\n  escape \")Z\"\n\n!CAN cancels Escape, returns to normal mode\nPUSH \"\\e(\\x{18}AB\"\n  text 0x41, 0x42\n\n!C0 in Escape interrupts and continues\nPUSH \"\\e(\\nX\"\n  control 10\n  escape \"(X\"\n\n!CSI 0 args\nPUSH \"\\e[a\"\n  csi 0x61 *\n\n!CSI 1 arg\nPUSH \"\\e[9b\"\n  csi 0x62 9\n\n!CSI 2 args\nPUSH \"\\e[3;4c\"\n  csi 0x63 3,4\n\n!CSI 1 arg 1 sub\nPUSH \"\\e[1:2c\"\n  csi 0x63 1+,2\n\n!CSI many digits\nPUSH \"\\e[678d\"\n  csi 0x64 678\n\n!CSI leading zero\nPUSH \"\\e[007e\"\n  csi 0x65 7\n\n!CSI qmark\nPUSH \"\\e[?2;7f\"\n  csi 0x66 L=3f 2,7\n\n!CSI greater\nPUSH \"\\e[>c\"\n  csi 0x63 L=3e *\n\n!CSI SP\nPUSH \"\\e[12 q\"\n  csi 0x71 12 I=20\n\n!Mixed CSI\nPUSH \"A\\e[8mB\"\n  text 0x41\n  csi 0x6d 8\n  text 0x42\n\n!Split write\nPUSH \"\\e\"\nPUSH \"[a\"\n  csi 0x61 *\nPUSH \"foo\\e[\"\n  text 0x66, 0x6f, 0x6f\nPUSH \"4b\"\n  csi 0x62 4\nPUSH \"\\e[12;\"\nPUSH \"3c\"\n  csi 0x63 12,3\n\n!Escape cancels CSI, starts Escape\nPUSH \"\\e[123\\e9\"\n  escape \"9\"\n\n!CAN cancels CSI, returns to normal mode\nPUSH \"\\e[12\\x{18}AB\"\n  text 0x41, 0x42\n\n!C0 in Escape interrupts and continues\nPUSH \"\\e[12\\n;3X\"\n  control 10\n  csi 0x58 12,3\n\n!OSC BEL\nPUSH \"\\e]1;Hello\\x07\"\n  osc \"1;Hello\"\n\n!OSC ST (7bit)\nPUSH \"\\e]1;Hello\\e\\\\\"\n  osc \"1;Hello\"\n\n!OSC ST (8bit)\nPUSH \"\\x{9d}1;Hello\\x9c\"\n  osc \"1;Hello\"\n\n!Escape cancels OSC, starts Escape\nPUSH \"\\e]Something\\e9\"\n  escape \"9\"\n\n!CAN cancels OSC, returns to normal mode\nPUSH \"\\e]12\\x{18}AB\"\n  text 0x41, 0x42\n\n!C0 in OSC interrupts and continues\nPUSH \"\\e]2;\\nBye\\x07\"\n  control 10\n  osc \"2;Bye\"\n\n!DCS BEL\nPUSH \"\\ePHello\\x07\"\n  dcs \"Hello\"\n\n!DCS ST (7bit)\nPUSH \"\\ePHello\\e\\\\\"\n  dcs \"Hello\"\n\n!DCS ST (8bit)\nPUSH \"\\x{90}Hello\\x9c\"\n  dcs \"Hello\"\n\n!Escape cancels DCS, starts Escape\nPUSH \"\\ePSomething\\e9\"\n  escape \"9\"\n\n!CAN cancels DCS, returns to normal mode\nPUSH \"\\eP12\\x{18}AB\"\n  text 0x41, 0x42\n\n!C0 in OSC interrupts and continues\nPUSH \"\\ePBy\\ne\\x07\"\n  control 10\n  dcs \"Bye\"\n\n!NUL ignored\nPUSH \"\\x{00}\"\n\n!NUL ignored within CSI\nPUSH \"\\e[12\\x{00}3m\"\n  csi 0x6d 123\n\n!DEL ignored\nPUSH \"\\x{7f}\"\n\n!DEL ignored within CSI\nPUSH \"\\e[12\\x{7f}3m\"\n  csi 0x6d 123\n\n!DEL inside text\"\nPUSH \"AB\\x{7f}C\"\n  text 0x41,0x42\n  text 0x43\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/03encoding_utf8.test",
    "content": "INIT\nWANTENCODING\n\n!Low\nENCIN \"123\"\n  encout 0x31,0x32,0x33\n\n# We want to prove the UTF-8 parser correctly handles all the sequences.\n# Easy way to do this is to check it does low/high boundary cases, as that\n# leaves only two for each sequence length\n#\n# These ranges are therefore:\n#\n# Two bytes:\n# U+0080 = 000 10000000 =>    00010   000000\n#                       => 11000010 10000000 = C2 80\n# U+07FF = 111 11111111 =>    11111   111111\n#                       => 11011111 10111111 = DF BF\n#\n# Three bytes:\n# U+0800 = 00001000 00000000 =>     0000   100000   000000\n#                            => 11100000 10100000 10000000 = E0 A0 80\n# U+FFFD = 11111111 11111101 =>     1111   111111   111101\n#                            => 11101111 10111111 10111101 = EF BF BD\n# (We avoid U+FFFE and U+FFFF as they're invalid codepoints)\n#\n# Four bytes:\n# U+10000  = 00001 00000000 00000000 =>      000   010000   000000   000000\n#                                    => 11110000 10010000 10000000 10000000 = F0 90 80 80\n# U+1FFFFF = 11111 11111111 11111111 =>      111   111111   111111   111111\n#                                    => 11110111 10111111 10111111 10111111 = F7 BF BF BF\n\n!2 byte\nENCIN \"\\xC2\\x80\\xDF\\xBF\"\n  encout 0x0080, 0x07FF\n\n!3 byte\nENCIN \"\\xE0\\xA0\\x80\\xEF\\xBF\\xBD\"\n  encout 0x0800,0xFFFD\n\n!4 byte\nENCIN \"\\xF0\\x90\\x80\\x80\\xF7\\xBF\\xBF\\xBF\"\n  encout 0x10000,0x1fffff\n\n# Next up, we check some invalid sequences\n#  + Early termination (back to low bytes too soon)\n#  + Early restart (another sequence introduction before the previous one was finished)\n\n!Early termination\nENCIN \"\\xC2!\"\n  encout 0xfffd,0x21\n\nENCIN \"\\xE0!\\xE0\\xA0!\"\n  encout 0xfffd,0x21,0xfffd,0x21\n\nENCIN \"\\xF0!\\xF0\\x90!\\xF0\\x90\\x80!\"\n  encout 0xfffd,0x21,0xfffd,0x21,0xfffd,0x21\n\n!Early restart\nENCIN \"\\xC2\\xC2\\x90\"\n  encout 0xfffd,0x0090\n\nENCIN \"\\xE0\\xC2\\x90\\xE0\\xA0\\xC2\\x90\"\n  encout 0xfffd,0x0090,0xfffd,0x0090\n\nENCIN \"\\xF0\\xC2\\x90\\xF0\\x90\\xC2\\x90\\xF0\\x90\\x80\\xC2\\x90\"\n  encout 0xfffd,0x0090,0xfffd,0x0090,0xfffd,0x0090\n\n# Test the overlong sequences by giving an overlong encoding of U+0000 and\n# an encoding of the highest codepoint still too short\n#\n# Two bytes:\n# U+0000 = C0 80\n# U+007F = 000 01111111 =>    00001   111111 =>\n#                       => 11000001 10111111 => C1 BF\n#\n# Three bytes:\n# U+0000 = E0 80 80\n# U+07FF = 00000111 11111111 =>     0000   011111   111111\n#                            => 11100000 10011111 10111111 = E0 9F BF\n#\n# Four bytes:\n# U+0000 = F0 80 80 80\n# U+FFFF = 11111111 11111111 =>      000   001111   111111   111111\n#                            => 11110000 10001111 10111111 10111111 = F0 8F BF BF\n\n!Overlong\nENCIN \"\\xC0\\x80\\xC1\\xBF\"\n  encout 0xfffd,0xfffd\n\nENCIN \"\\xE0\\x80\\x80\\xE0\\x9F\\xBF\"\n  encout 0xfffd,0xfffd\n\nENCIN \"\\xF0\\x80\\x80\\x80\\xF0\\x8F\\xBF\\xBF\"\n  encout 0xfffd,0xfffd\n\n# UTF-16 surrogates U+D800 and U+DFFF\n!UTF-16 Surrogates\nENCIN \"\\xED\\xA0\\x80\\xED\\xBF\\xBF\"\n  encout 0xfffd,0xfffd\n\n!Split write\nENCIN \"\\xC2\"\nENCIN \"\\xA0\"\n  encout 0x000A0\n\nENCIN \"\\xE0\"\nENCIN \"\\xA0\\x80\"\n  encout 0x00800\nENCIN \"\\xE0\\xA0\"\nENCIN \"\\x80\"\n  encout 0x00800\n\nENCIN \"\\xF0\"\nENCIN \"\\x90\\x80\\x80\"\n  encout 0x10000\nENCIN \"\\xF0\\x90\"\nENCIN \"\\x80\\x80\"\n  encout 0x10000\nENCIN \"\\xF0\\x90\\x80\"\nENCIN \"\\x80\"\n  encout 0x10000\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/10state_putglyph.test",
    "content": "INIT\nUTF8 1\nWANTSTATE g\n\n!Low\nRESET\nPUSH \"ABC\"\n  putglyph 0x41 1 0,0\n  putglyph 0x42 1 0,1\n  putglyph 0x43 1 0,2\n\n!UTF-8 1 char\n# U+00C1 = 0xC3 0x81  name: LATIN CAPITAL LETTER A WITH ACUTE\n# U+00E9 = 0xC3 0xA9  name: LATIN SMALL LETTER E WITH ACUTE\nRESET\nPUSH \"\\xC3\\x81\\xC3\\xA9\"\n  putglyph 0xc1 1 0,0\n  putglyph 0xe9 1 0,1\n\n!UTF-8 split writes\nRESET\nPUSH \"\\xC3\"\nPUSH \"\\x81\"\n  putglyph 0xc1 1 0,0\n\n!UTF-8 wide char\n# U+FF10 = 0xEF 0xBC 0x90  name: FULLWIDTH DIGIT ZERO\nRESET\nPUSH \"\\xEF\\xBC\\x90 \"\n  putglyph 0xff10 2 0,0\n  putglyph 0x20 1 0,2\n\n!UTF-8 emoji wide char\n# U+1F600 = 0xF0 0x9F 0x98 0x80  name: GRINNING FACE\nRESET\nPUSH \"\\xF0\\x9F\\x98\\x80 \"\n  putglyph 0x1f600 2 0,0\n  putglyph 0x20 1 0,2\n\n!UTF-8 combining chars\n# U+0301 = 0xCC 0x81  name: COMBINING ACUTE\nRESET\nPUSH \"e\\xCC\\x81Z\"\n  putglyph 0x65,0x301 1 0,0\n  putglyph 0x5a 1 0,1\n\n!Combining across buffers\nRESET\nPUSH \"e\"\n  putglyph 0x65 1 0,0\nPUSH \"\\xCC\\x81Z\"\n  putglyph 0x65,0x301 1 0,0\n  putglyph 0x5a 1 0,1\n\nRESET\nPUSH \"e\"\n  putglyph 0x65 1 0,0\nPUSH \"\\xCC\\x81\"\n  putglyph 0x65,0x301 1 0,0\nPUSH \"\\xCC\\x82\"\n  putglyph 0x65,0x301,0x302 1 0,0\n\n!DECSCA protected\nRESET\nPUSH \"A\\e[1\\\"qB\\e[2\\\"qC\"\n  putglyph 0x41 1 0,0\n  putglyph 0x42 1 0,1 prot\n  putglyph 0x43 1 0,2\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/11state_movecursor.test",
    "content": "INIT\nUTF8 1\nWANTSTATE\n\n!Implicit\nPUSH \"ABC\"\n  ?cursor = 0,3\n!Backspace\nPUSH \"\\b\"\n  ?cursor = 0,2\n!Horizontal Tab\nPUSH \"\\t\"\n  ?cursor = 0,8\n!Carriage Return\nPUSH \"\\r\"\n  ?cursor = 0,0\n!Linefeed\nPUSH \"\\n\"\n  ?cursor = 1,0\n\n!Backspace bounded by lefthand edge\nPUSH \"\\e[4;2H\"\n  ?cursor = 3,1\nPUSH \"\\b\"\n  ?cursor = 3,0\nPUSH \"\\b\"\n  ?cursor = 3,0\n\n!Backspace cancels phantom\nPUSH \"\\e[4;80H\"\n  ?cursor = 3,79\nPUSH \"X\"\n  ?cursor = 3,79\nPUSH \"\\b\"\n  ?cursor = 3,78\n\n!HT bounded by righthand edge\nPUSH \"\\e[1;78H\"\n  ?cursor = 0,77\nPUSH \"\\t\"\n  ?cursor = 0,79\nPUSH \"\\t\"\n  ?cursor = 0,79\n\nRESET\n\n!Index\nPUSH \"ABC\\eD\"\n  ?cursor = 1,3\n!Reverse Index\nPUSH \"\\eM\"\n  ?cursor = 0,3\n!Newline\nPUSH \"\\eE\"\n  ?cursor = 1,0\n\nRESET\n\n!Cursor Forward\nPUSH \"\\e[B\"\n  ?cursor = 1,0\nPUSH \"\\e[3B\"\n  ?cursor = 4,0\nPUSH \"\\e[0B\"\n  ?cursor = 5,0\n\n!Cursor Down\nPUSH \"\\e[C\"\n  ?cursor = 5,1\nPUSH \"\\e[3C\"\n  ?cursor = 5,4\nPUSH \"\\e[0C\"\n  ?cursor = 5,5\n\n!Cursor Up\nPUSH \"\\e[A\"\n  ?cursor = 4,5\nPUSH \"\\e[3A\"\n  ?cursor = 1,5\nPUSH \"\\e[0A\"\n  ?cursor = 0,5\n\n!Cursor Backward\nPUSH \"\\e[D\"\n  ?cursor = 0,4\nPUSH \"\\e[3D\"\n  ?cursor = 0,1\nPUSH \"\\e[0D\"\n  ?cursor = 0,0\n\n!Cursor Next Line\nPUSH \"   \"\n  ?cursor = 0,3\nPUSH \"\\e[E\"\n  ?cursor = 1,0\nPUSH \"   \"\n  ?cursor = 1,3\nPUSH \"\\e[2E\"\n  ?cursor = 3,0\nPUSH \"\\e[0E\"\n  ?cursor = 4,0\n\n!Cursor Previous Line\nPUSH \"   \"\n  ?cursor = 4,3\nPUSH \"\\e[F\"\n  ?cursor = 3,0\nPUSH \"   \"\n  ?cursor = 3,3\nPUSH \"\\e[2F\"\n  ?cursor = 1,0\nPUSH \"\\e[0F\"\n  ?cursor = 0,0\n\n!Cursor Horizonal Absolute\nPUSH \"\\n\"\n  ?cursor = 1,0\nPUSH \"\\e[20G\"\n  ?cursor = 1,19\nPUSH \"\\e[G\"\n  ?cursor = 1,0\n\n!Cursor Position\nPUSH \"\\e[10;5H\"\n  ?cursor = 9,4\nPUSH \"\\e[8H\"\n  ?cursor = 7,0\nPUSH \"\\e[H\"\n  ?cursor = 0,0\n\n!Cursor Position cancels phantom\nPUSH \"\\e[10;78H\"\n  ?cursor = 9,77\nPUSH \"ABC\"\n  ?cursor = 9,79\nPUSH \"\\e[10;80H\"\nPUSH \"C\"\n  ?cursor = 9,79\nPUSH \"X\"\n  ?cursor = 10,1\n\nRESET\n\n!Bounds Checking\nPUSH \"\\e[A\"\n  ?cursor = 0,0\nPUSH \"\\e[D\"\n  ?cursor = 0,0\nPUSH \"\\e[25;80H\"\n  ?cursor = 24,79\nPUSH \"\\e[B\"\n  ?cursor = 24,79\nPUSH \"\\e[C\"\n  ?cursor = 24,79\nPUSH \"\\e[E\"\n  ?cursor = 24,0\nPUSH \"\\e[H\"\n  ?cursor = 0,0\nPUSH \"\\e[F\"\n  ?cursor = 0,0\nPUSH \"\\e[999G\"\n  ?cursor = 0,79\nPUSH \"\\e[99;99H\"\n  ?cursor = 24,79\n\nRESET\n\n!Horizontal Position Absolute\nPUSH \"\\e[5`\"\n  ?cursor = 0,4\n\n!Horizontal Position Relative\nPUSH \"\\e[3a\"\n  ?cursor = 0,7\n\n!Horizontal Position Backward\nPUSH \"\\e[3j\"\n  ?cursor = 0,4\n\n!Horizontal and Vertical Position\nPUSH \"\\e[3;3f\"\n  ?cursor = 2,2\n\n!Vertical Position Absolute\nPUSH \"\\e[5d\"\n  ?cursor = 4,2\n\n!Vertical Position Relative\nPUSH \"\\e[2e\"\n  ?cursor = 6,2\n\n!Vertical Position Backward\nPUSH \"\\e[2k\"\n  ?cursor = 4,2\n\nRESET\n\n!Horizontal Tab\nPUSH \"\\t\"\n  ?cursor = 0,8\nPUSH \"   \"\n  ?cursor = 0,11\nPUSH \"\\t\"\n  ?cursor = 0,16\nPUSH \"       \"\n  ?cursor = 0,23\nPUSH \"\\t\"\n  ?cursor = 0,24\nPUSH \"        \"\n  ?cursor = 0,32\nPUSH \"\\t\"\n  ?cursor = 0,40\n\n!Cursor Horizontal Tab\nPUSH \"\\e[I\"\n  ?cursor = 0,48\nPUSH \"\\e[2I\"\n  ?cursor = 0,64\n\n!Cursor Backward Tab\nPUSH \"\\e[Z\"\n  ?cursor = 0,56\nPUSH \"\\e[2Z\"\n  ?cursor = 0,40\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/12state_scroll.test",
    "content": "INIT\nUTF8 1\nWANTSTATE s\n\n!Linefeed\nPUSH \"\\n\"x24\n  ?cursor = 24,0\nPUSH \"\\n\"\n  scrollrect 0..25,0..80 => +1,+0\n  ?cursor = 24,0\n\nRESET\n\n!Index\nPUSH \"\\e[25H\"\nPUSH \"\\eD\"\n  scrollrect 0..25,0..80 => +1,+0\n\nRESET\n\n!Reverse Index\nPUSH \"\\eM\"\n  scrollrect 0..25,0..80 => -1,+0\n\nRESET\n\n!Linefeed in DECSTBM\nPUSH \"\\e[1;10r\"\n  ?cursor = 0,0\nPUSH \"\\n\"x9\n  ?cursor = 9,0\nPUSH \"\\n\"\n  scrollrect 0..10,0..80 => +1,+0\n  ?cursor = 9,0\n\n!Linefeed outside DECSTBM\nPUSH \"\\e[20H\"\n  ?cursor = 19,0\nPUSH \"\\n\"\n  ?cursor = 20,0\n\n!Index in DECSTBM\nPUSH \"\\e[9;10r\"\nPUSH \"\\e[10H\"\nPUSH \"\\eM\"\n  ?cursor = 8,0\nPUSH \"\\eM\"\n  scrollrect 8..10,0..80 => -1,+0\n\n!Reverse Index in DECSTBM\nPUSH \"\\e[25H\"\n  ?cursor = 24,0\nPUSH \"\\n\"\n  # no scrollrect\n  ?cursor = 24,0\n\n!Linefeed in DECSTBM+DECSLRM\nPUSH \"\\e[?69h\"\nPUSH \"\\e[3;10r\\e[10;40s\"\nPUSH \"\\e[10;10H\\n\"\n  scrollrect 2..10,9..40 => +1,+0\n\n!IND/RI in DECSTBM+DECSLRM\nPUSH \"\\eD\"\n  scrollrect 2..10,9..40 => +1,+0\nPUSH \"\\e[3;10H\\eM\"\n  scrollrect 2..10,9..40 => -1,+0\n\n!DECRQSS on DECSTBM\nPUSH \"\\eP\\$qr\\e\\\\\"\n  output \"\\eP1\\$r3;10r\\e\\\\\"\n\n!DECRQSS on DECSLRM\nPUSH \"\\eP\\$qs\\e\\\\\"\n  output \"\\eP1\\$r10;40s\\e\\\\\"\n\n!Setting invalid DECSLRM with !DECVSSM is still rejected\nPUSH \"\\e[?69l\\e[;0s\\e[?69h\"\n\nRESET\n\n!Scroll Down\nPUSH \"\\e[S\"\n  scrollrect 0..25,0..80 => +1,+0\n  ?cursor = 0,0\nPUSH \"\\e[2S\"\n  scrollrect 0..25,0..80 => +2,+0\n  ?cursor = 0,0\nPUSH \"\\e[100S\"\n  scrollrect 0..25,0..80 => +25,+0\n\n!Scroll Up\nPUSH \"\\e[T\"\n  scrollrect 0..25,0..80 => -1,+0\n  ?cursor = 0,0\nPUSH \"\\e[2T\"\n  scrollrect 0..25,0..80 => -2,+0\n  ?cursor = 0,0\nPUSH \"\\e[100T\"\n  scrollrect 0..25,0..80 => -25,+0\n\n!SD/SU in DECSTBM\nPUSH \"\\e[5;20r\"\nPUSH \"\\e[S\"\n  scrollrect 4..20,0..80 => +1,+0\nPUSH \"\\e[T\"\n  scrollrect 4..20,0..80 => -1,+0\n\nRESET\n\n!SD/SU in DECSTBM+DECSLRM\nPUSH \"\\e[?69h\"\nPUSH \"\\e[3;10r\\e[10;40s\"\n  ?cursor = 0,0\nPUSH \"\\e[3;10H\"\n  ?cursor = 2,9\nPUSH \"\\e[S\"\n  scrollrect 2..10,9..40 => +1,+0\nPUSH \"\\e[?69l\"\nPUSH \"\\e[S\"\n  scrollrect 2..10,0..80 => +1,+0\n\n!Invalid boundaries\nRESET\n\nPUSH \"\\e[100;105r\\eD\"\nPUSH \"\\e[5;2r\\eD\"\n\nRESET\nWANTSTATE -s+me\n\n!Scroll Down move+erase emulation\nPUSH \"\\e[S\"\n  moverect 1..25,0..80 -> 0..24,0..80\n  erase 24..25,0..80\n  ?cursor = 0,0\nPUSH \"\\e[2S\"\n  moverect 2..25,0..80 -> 0..23,0..80\n  erase 23..25,0..80\n  ?cursor = 0,0\n\n!Scroll Up move+erase emulation\nPUSH \"\\e[T\"\n  moverect 0..24,0..80 -> 1..25,0..80\n  erase 0..1,0..80\n  ?cursor = 0,0\nPUSH \"\\e[2T\"\n  moverect 0..23,0..80 -> 2..25,0..80\n  erase 0..2,0..80\n  ?cursor = 0,0\n\n!DECSTBM resets cursor position\nPUSH \"\\e[5;5H\"\n  ?cursor = 4,4\nPUSH \"\\e[r\"\n  ?cursor = 0,0\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/13state_edit.test",
    "content": "INIT\nUTF8 1\nWANTSTATE se\n\n!ICH\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"ACD\"\nPUSH \"\\e[2D\"\n  ?cursor = 0,1\nPUSH \"\\e[@\"\n  scrollrect 0..1,1..80 => +0,-1\n  ?cursor = 0,1\nPUSH \"B\"\n  ?cursor = 0,2\nPUSH \"\\e[3@\"\n  scrollrect 0..1,2..80 => +0,-3\n\n!ICH with DECSLRM\nPUSH \"\\e[?69h\"\nPUSH \"\\e[;50s\"\nPUSH \"\\e[20G\\e[@\"\n  scrollrect 0..1,19..50 => +0,-1\n\n!ICH outside DECSLRM\nPUSH \"\\e[70G\\e[@\"\n  # nothing happens\n\n!DCH\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"ABBC\"\nPUSH \"\\e[3D\"\n  ?cursor = 0,1\nPUSH \"\\e[P\"\n  scrollrect 0..1,1..80 => +0,+1\n  ?cursor = 0,1\nPUSH \"\\e[3P\"\n  scrollrect 0..1,1..80 => +0,+3\n  ?cursor = 0,1\n\n!DCH with DECSLRM\nPUSH \"\\e[?69h\"\nPUSH \"\\e[;50s\"\nPUSH \"\\e[20G\\e[P\"\n  scrollrect 0..1,19..50 => +0,+1\n\n!DCH outside DECSLRM\nPUSH \"\\e[70G\\e[P\"\n  # nothing happens\n\n!ECH\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"ABC\"\nPUSH \"\\e[2D\"\n  ?cursor = 0,1\nPUSH \"\\e[X\"\n  erase 0..1,1..2\n  ?cursor = 0,1\nPUSH \"\\e[3X\"\n  erase 0..1,1..4\n  ?cursor = 0,1\n# ECH more columns than there are should be bounded\nPUSH \"\\e[100X\"\n  erase 0..1,1..80\n\n!IL\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"A\\r\\nC\"\n  ?cursor = 1,1\nPUSH \"\\e[L\"\n  scrollrect 1..25,0..80 => -1,+0\n  # TODO: ECMA-48 says we should move to line home, but neither xterm nor\n  # xfce4-terminal do this\n  ?cursor = 1,1\nPUSH \"\\rB\"\n  ?cursor = 1,1\nPUSH \"\\e[3L\"\n  scrollrect 1..25,0..80 => -3,+0\n\n!IL with DECSTBM\nPUSH \"\\e[5;15r\"\nPUSH \"\\e[5H\\e[L\"\n  scrollrect 4..15,0..80 => -1,+0\n\n!IL outside DECSTBM\nPUSH \"\\e[20H\\e[L\"\n  # nothing happens\n\n!IL with DECSTBM+DECSLRM\nPUSH \"\\e[?69h\"\nPUSH \"\\e[10;50s\"\nPUSH \"\\e[5;10H\\e[L\"\n  scrollrect 4..15,9..50 => -1,+0\n\n!DL\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"A\\r\\nB\\r\\nB\\r\\nC\"\n  ?cursor = 3,1\nPUSH \"\\e[2H\"\n  ?cursor = 1,0\nPUSH \"\\e[M\"\n  scrollrect 1..25,0..80 => +1,+0\n  ?cursor = 1,0\nPUSH \"\\e[3M\"\n  scrollrect 1..25,0..80 => +3,+0\n  ?cursor = 1,0\n\n!DL with DECSTBM\nPUSH \"\\e[5;15r\"\nPUSH \"\\e[5H\\e[M\"\n  scrollrect 4..15,0..80 => +1,+0\n\n!DL outside DECSTBM\nPUSH \"\\e[20H\\e[M\"\n  # nothing happens\n\n!DL with DECSTBM+DECSLRM\nPUSH \"\\e[?69h\"\nPUSH \"\\e[10;50s\"\nPUSH \"\\e[5;10H\\e[M\"\n  scrollrect 4..15,9..50 => +1,+0\n\n!DECIC\nRESET\n  erase 0..25,0..80\nPUSH \"\\e[20G\\e[5'}\"\n  scrollrect 0..25,19..80 => +0,-5\n\n!DECIC with DECSTBM+DECSLRM\nPUSH \"\\e[?69h\"\nPUSH \"\\e[4;20r\\e[20;60s\"\nPUSH \"\\e[4;20H\\e[3'}\"\n  scrollrect 3..20,19..60 => +0,-3\n\n!DECIC outside DECSLRM\nPUSH \"\\e[70G\\e['}\"\n  # nothing happens\n\n!DECDC\nRESET\n  erase 0..25,0..80\nPUSH \"\\e[20G\\e[5'~\"\n  scrollrect 0..25,19..80 => +0,+5\n\n!DECDC with DECSTBM+DECSLRM\nPUSH \"\\e[?69h\"\nPUSH \"\\e[4;20r\\e[20;60s\"\nPUSH \"\\e[4;20H\\e[3'~\"\n  scrollrect 3..20,19..60 => +0,+3\n\n!DECDC outside DECSLRM\nPUSH \"\\e[70G\\e['~\"\n  # nothing happens\n\n!EL 0\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"ABCDE\"\nPUSH \"\\e[3D\"\n  ?cursor = 0,2\nPUSH \"\\e[0K\"\n  erase 0..1,2..80\n  ?cursor = 0,2\n\n!EL 1\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"ABCDE\"\nPUSH \"\\e[3D\"\n  ?cursor = 0,2\nPUSH \"\\e[1K\"\n  erase 0..1,0..3\n  ?cursor = 0,2\n\n!EL 2\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"ABCDE\"\nPUSH \"\\e[3D\"\n  ?cursor = 0,2\nPUSH \"\\e[2K\"\n  erase 0..1,0..80\n  ?cursor = 0,2\n\n!SEL\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"\\e[11G\"\n  ?cursor = 0,10\nPUSH \"\\e[?0K\"\n  erase 0..1,10..80 selective\n  ?cursor = 0,10\nPUSH \"\\e[?1K\"\n  erase 0..1,0..11 selective\n  ?cursor = 0,10\nPUSH \"\\e[?2K\"\n  erase 0..1,0..80 selective\n  ?cursor = 0,10\n\n!ED 0\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"\\e[2;2H\"\n  ?cursor = 1,1\nPUSH \"\\e[0J\"\n  erase 1..2,1..80\n  erase 2..25,0..80\n  ?cursor = 1,1\n\n!ED 1\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"\\e[2;2H\"\n  ?cursor = 1,1\nPUSH \"\\e[1J\"\n  erase 0..1,0..80\n  erase 1..2,0..2\n  ?cursor = 1,1\n\n!ED 2\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"\\e[2;2H\"\n  ?cursor = 1,1\nPUSH \"\\e[2J\"\n  erase 0..25,0..80\n  ?cursor = 1,1\n\n!SED\nRESET\n  erase 0..25,0..80\nPUSH \"\\e[5;5H\"\n  ?cursor = 4,4\nPUSH \"\\e[?0J\"\n  erase 4..5,4..80 selective\n  erase 5..25,0..80 selective\n  ?cursor = 4,4\nPUSH \"\\e[?1J\"\n  erase 0..4,0..80 selective\n  erase 4..5,0..5 selective\n  ?cursor = 4,4\nPUSH \"\\e[?2J\"\n  erase 0..25,0..80 selective\n  ?cursor = 4,4\n\n!DECRQSS on DECSCA\nPUSH \"\\e[2\\\"q\"\nPUSH \"\\eP\\$q\\\"q\\e\\\\\"\n  output \"\\eP1\\$r2\\\"q\\e\\\\\"\n\nWANTSTATE -s+m\n\n!ICH move+erase emuation\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"ACD\"\nPUSH \"\\e[2D\"\n  ?cursor = 0,1\nPUSH \"\\e[@\"\n  moverect 0..1,1..79 -> 0..1,2..80\n  erase 0..1,1..2\n  ?cursor = 0,1\nPUSH \"B\"\n  ?cursor = 0,2\nPUSH \"\\e[3@\"\n  moverect 0..1,2..77 -> 0..1,5..80\n  erase 0..1,2..5\n\n!DCH move+erase emulation\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"ABBC\"\nPUSH \"\\e[3D\"\n  ?cursor = 0,1\nPUSH \"\\e[P\"\n  moverect 0..1,2..80 -> 0..1,1..79\n  erase 0..1,79..80\n  ?cursor = 0,1\nPUSH \"\\e[3P\"\n  moverect 0..1,4..80 -> 0..1,1..77\n  erase 0..1,77..80\n  ?cursor = 0,1\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/14state_encoding.test",
    "content": "INIT\nWANTSTATE g\n\n!Default\nRESET\nPUSH \"#\"\n  putglyph 0x23 1 0,0\n\n!Designate G0=UK\nRESET\nPUSH \"\\e(A\"\nPUSH \"#\"\n  putglyph 0x00a3 1 0,0\n\n!Designate G0=DEC drawing\nRESET\nPUSH \"\\e(0\"\nPUSH \"a\"\n  putglyph 0x2592 1 0,0\n\n!Designate G1 + LS1\nRESET\nPUSH \"\\e)0\"\nPUSH \"a\"\n  putglyph 0x61 1 0,0\nPUSH \"\\x0e\"\nPUSH \"a\"\n  putglyph 0x2592 1 0,1\n!LS0\nPUSH \"\\x0f\"\nPUSH \"a\"\n  putglyph 0x61 1 0,2\n\n!Designate G2 + LS2\nPUSH \"\\e*0\"\nPUSH \"a\"\n  putglyph 0x61 1 0,3\nPUSH \"\\en\"\nPUSH \"a\"\n  putglyph 0x2592 1 0,4\nPUSH \"\\x0f\"\nPUSH \"a\"\n  putglyph 0x61 1 0,5\n\n!Designate G3 + LS3\nPUSH \"\\e+0\"\nPUSH \"a\"\n  putglyph 0x61 1 0,6\nPUSH \"\\eo\"\nPUSH \"a\"\n  putglyph 0x2592 1 0,7\nPUSH \"\\x0f\"\nPUSH \"a\"\n  putglyph 0x61 1 0,8\n\n!SS2\nPUSH \"a\\x{8e}aa\"\n  putglyph 0x61 1 0,9\n  putglyph 0x2592 1 0,10\n  putglyph 0x61 1 0,11\n\n!SS3\nPUSH \"a\\x{8f}aa\"\n  putglyph 0x61 1 0,12\n  putglyph 0x2592 1 0,13\n  putglyph 0x61 1 0,14\n\n!LS1R\nRESET\nPUSH \"\\e~\"\nPUSH \"\\xe1\"\n  putglyph 0x61 1 0,0\nPUSH \"\\e)0\"\nPUSH \"\\xe1\"\n  putglyph 0x2592 1 0,1\n\n!LS2R\nRESET\nPUSH \"\\e}\"\nPUSH \"\\xe1\"\n  putglyph 0x61 1 0,0\nPUSH \"\\e*0\"\nPUSH \"\\xe1\"\n  putglyph 0x2592 1 0,1\n\n!LS3R\nRESET\nPUSH \"\\e|\"\nPUSH \"\\xe1\"\n  putglyph 0x61 1 0,0\nPUSH \"\\e+0\"\nPUSH \"\\xe1\"\n  putglyph 0x2592 1 0,1\n\nUTF8 1\n\n!Mixed US-ASCII and UTF-8\n# U+0108 == 0xc4 0x88\nRESET\nPUSH \"\\e(B\"\nPUSH \"AB\\xc4\\x88D\"\n  putglyph 0x0041 1 0,0\n  putglyph 0x0042 1 0,1\n  putglyph 0x0108 1 0,2\n  putglyph 0x0044 1 0,3\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/15state_mode.test",
    "content": "INIT\nUTF8 1\nWANTSTATE gme\n\n!Insert/Replace Mode\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"AC\\e[DB\"\n  putglyph 0x41 1 0,0\n  putglyph 0x43 1 0,1\n  putglyph 0x42 1 0,1\nPUSH \"\\e[4h\"\nPUSH \"\\e[G\"\nPUSH \"AC\\e[DB\"\n  moverect 0..1,0..79 -> 0..1,1..80\n  erase 0..1,0..1\n  putglyph 0x41 1 0,0\n  moverect 0..1,1..79 -> 0..1,2..80\n  erase 0..1,1..2\n  putglyph 0x43 1 0,1\n  moverect 0..1,1..79 -> 0..1,2..80\n  erase 0..1,1..2\n  putglyph 0x42 1 0,1\n\n!Insert mode only happens once for UTF-8 combining\nPUSH \"e\"\n  moverect 0..1,2..79 -> 0..1,3..80\n  erase 0..1,2..3\n  putglyph 0x65 1 0,2\nPUSH \"\\xCC\\x81\"\n  putglyph 0x65,0x301 1 0,2\n\n!Newline/Linefeed mode\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"\\e[5G\\n\"\n  ?cursor = 1,4\nPUSH \"\\e[20h\"\nPUSH \"\\e[5G\\n\"\n  ?cursor = 2,0\n\n!DEC origin mode\nRESET\n  erase 0..25,0..80\n  ?cursor = 0,0\nPUSH \"\\e[5;15r\"\nPUSH \"\\e[H\"\n  ?cursor = 0,0\nPUSH \"\\e[3;3H\"\n  ?cursor = 2,2\nPUSH \"\\e[?6h\"\nPUSH \"\\e[H\"\n  ?cursor = 4,0\nPUSH \"\\e[3;3H\"\n  ?cursor = 6,2\n\n!DECRQM on DECOM\nPUSH \"\\e[?6h\"\nPUSH \"\\e[?6\\$p\"\n  output \"\\e[?6;1\\$y\"\nPUSH \"\\e[?6l\"\nPUSH \"\\e[?6\\$p\"\n  output \"\\e[?6;2\\$y\"\n\n!Origin mode with DECSLRM\nPUSH \"\\e[?6h\"\nPUSH \"\\e[?69h\"\nPUSH \"\\e[20;60s\"\nPUSH \"\\e[H\"\n  ?cursor = 4,19\n\nPUSH \"\\e[?69l\"\n\n!Origin mode bounds cursor to scrolling region\nPUSH \"\\e[H\"\nPUSH \"\\e[10A\"\n  ?cursor = 4,0\nPUSH \"\\e[20B\"\n  ?cursor = 14,0\n\n!Origin mode without scroll region\nPUSH \"\\e[?6l\"\nPUSH \"\\e[r\\e[?6h\"\n  ?cursor = 0,0\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/16state_resize.test",
    "content": "INIT\nWANTSTATE g\n\n!Placement\nRESET\nPUSH \"AB\\e[79GCDE\"\n  putglyph 0x41 1 0,0\n  putglyph 0x42 1 0,1\n  putglyph 0x43 1 0,78\n  putglyph 0x44 1 0,79\n  putglyph 0x45 1 1,0\n\n!Resize\nRESET\nRESIZE 27,85\nPUSH \"AB\\e[79GCDE\"\n  putglyph 0x41 1 0,0\n  putglyph 0x42 1 0,1\n  putglyph 0x43 1 0,78\n  putglyph 0x44 1 0,79\n  putglyph 0x45 1 0,80\n  ?cursor = 0,81\n\n!Resize without reset\nRESIZE 28,90\n  ?cursor = 0,81\nPUSH \"FGHI\"\n  putglyph 0x46 1 0,81\n  putglyph 0x47 1 0,82\n  putglyph 0x48 1 0,83\n  putglyph 0x49 1 0,84\n  ?cursor = 0,85\n\n!Resize shrink moves cursor\nRESIZE 25,80\n  ?cursor = 0,79\n\n!Resize grow doesn't cancel phantom\nRESET\nPUSH \"\\e[79GAB\"\n  putglyph 0x41 1 0,78\n  putglyph 0x42 1 0,79\n  ?cursor = 0,79\nRESIZE 30,100\n  ?cursor = 0,80\nPUSH \"C\"\n  putglyph 0x43 1 0,80\n  ?cursor = 0,81\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/17state_mouse.test",
    "content": "INIT\nWANTSTATE p\n\n!DECRQM on with mouse off\nPUSH \"\\e[?1000\\$p\"\n  output \"\\e[?1000;2\\$y\"\nPUSH \"\\e[?1002\\$p\"\n  output \"\\e[?1002;2\\$y\"\nPUSH \"\\e[?1003\\$p\"\n  output \"\\e[?1003;2\\$y\"\n\n!Mouse in simple button report mode\nRESET\n  settermprop 1 true\n  settermprop 2 true\n  settermprop 7 1\nPUSH \"\\e[?1000h\"\n  settermprop 8 1\n\n!Press 1\nMOUSEMOVE 0,0 0\nMOUSEBTN d 1 0\n  output \"\\e[M\\x20\\x21\\x21\"\n\n!Release 1\nMOUSEBTN u 1 0\n  output \"\\e[M\\x23\\x21\\x21\"\n\n!Ctrl-Press 1\nMOUSEBTN d 1 C\n  output \"\\e[M\\x30\\x21\\x21\"\nMOUSEBTN u 1 C\n  output \"\\e[M\\x33\\x21\\x21\"\n\n!Button 2\nMOUSEBTN d 2 0\n  output \"\\e[M\\x21\\x21\\x21\"\nMOUSEBTN u 2 0\n  output \"\\e[M\\x23\\x21\\x21\"\n\n!Position\nMOUSEMOVE 10,20 0\nMOUSEBTN d 1 0\n  output \"\\e[M\\x20\\x35\\x2b\"\n\nMOUSEBTN u 1 0\n  output \"\\e[M\\x23\\x35\\x2b\"\nMOUSEMOVE 10,21 0\n  # no output\n\n!Wheel events\nMOUSEBTN d 4 0\n  output \"\\e[M\\x60\\x36\\x2b\"\nMOUSEBTN d 4 0\n  output \"\\e[M\\x60\\x36\\x2b\"\nMOUSEBTN d 5 0\n  output \"\\e[M\\x61\\x36\\x2b\"\n\n!DECRQM on mouse button mode\nPUSH \"\\e[?1000\\$p\"\n  output \"\\e[?1000;1\\$y\"\nPUSH \"\\e[?1002\\$p\"\n  output \"\\e[?1002;2\\$y\"\nPUSH \"\\e[?1003\\$p\"\n  output \"\\e[?1003;2\\$y\"\n\n!Drag events\nRESET\n  settermprop 1 true\n  settermprop 2 true\n  settermprop 7 1\nPUSH \"\\e[?1002h\"\n  settermprop 8 2\n\nMOUSEMOVE 5,5 0\nMOUSEBTN d 1 0\n  output \"\\e[M\\x20\\x26\\x26\"\nMOUSEMOVE 5,6 0\n  output \"\\e[M\\x40\\x27\\x26\"\nMOUSEMOVE 6,6 0\n  output \"\\e[M\\x40\\x27\\x27\"\nMOUSEMOVE 6,6 0\n  # no output\nMOUSEBTN u 1 0\n  output \"\\e[M\\x23\\x27\\x27\"\nMOUSEMOVE 6,7\n  # no output\n\n!DECRQM on mouse drag mode\nPUSH \"\\e[?1000\\$p\"\n  output \"\\e[?1000;2\\$y\"\nPUSH \"\\e[?1002\\$p\"\n  output \"\\e[?1002;1\\$y\"\nPUSH \"\\e[?1003\\$p\"\n  output \"\\e[?1003;2\\$y\"\n\n!Non-drag motion events\nPUSH \"\\e[?1003h\"\n  settermprop 8 3\n\nMOUSEMOVE 6,8 0\n  output \"\\e[M\\x43\\x29\\x27\"\n\n!DECRQM on mouse motion mode\nPUSH \"\\e[?1000\\$p\"\n  output \"\\e[?1000;2\\$y\"\nPUSH \"\\e[?1002\\$p\"\n  output \"\\e[?1002;2\\$y\"\nPUSH \"\\e[?1003\\$p\"\n  output \"\\e[?1003;1\\$y\"\n\n!Bounds checking\nMOUSEMOVE 300,300 0\n  output \"\\e[M\\x43\\xff\\xff\"\nMOUSEBTN d 1 0\n  output \"\\e[M\\x20\\xff\\xff\"\nMOUSEBTN u 1 0\n  output \"\\e[M\\x23\\xff\\xff\"\n\n!DECRQM on standard encoding mode\nPUSH \"\\e[?1005\\$p\"\n  output \"\\e[?1005;2\\$y\"\nPUSH \"\\e[?1006\\$p\"\n  output \"\\e[?1006;2\\$y\"\nPUSH \"\\e[?1015\\$p\"\n  output \"\\e[?1015;2\\$y\"\n\n!UTF-8 extended encoding mode\n# 300 + 32 + 1 = 333 = U+014d = \\xc5\\x8d\nPUSH \"\\e[?1005h\"\nMOUSEBTN d 1 0\n  output \"\\e[M\\x20\\xc5\\x8d\\xc5\\x8d\"\nMOUSEBTN u 1 0\n  output \"\\e[M\\x23\\xc5\\x8d\\xc5\\x8d\"\n\n!DECRQM on UTF-8 extended encoding mode\nPUSH \"\\e[?1005\\$p\"\n  output \"\\e[?1005;1\\$y\"\nPUSH \"\\e[?1006\\$p\"\n  output \"\\e[?1006;2\\$y\"\nPUSH \"\\e[?1015\\$p\"\n  output \"\\e[?1015;2\\$y\"\n\n!SGR extended encoding mode\nPUSH \"\\e[?1006h\"\nMOUSEBTN d 1 0\n  output \"\\e[<0;301;301M\"\nMOUSEBTN u 1 0\n  output \"\\e[<0;301;301m\"\n\n!DECRQM on SGR extended encoding mode\nPUSH \"\\e[?1005\\$p\"\n  output \"\\e[?1005;2\\$y\"\nPUSH \"\\e[?1006\\$p\"\n  output \"\\e[?1006;1\\$y\"\nPUSH \"\\e[?1015\\$p\"\n  output \"\\e[?1015;2\\$y\"\n\n!rxvt extended encoding mode\nPUSH \"\\e[?1015h\"\nMOUSEBTN d 1 0\n  output \"\\e[0;301;301M\"\nMOUSEBTN u 1 0\n  output \"\\e[3;301;301M\"\n\n!DECRQM on rxvt extended encoding mode\nPUSH \"\\e[?1005\\$p\"\n  output \"\\e[?1005;2\\$y\"\nPUSH \"\\e[?1006\\$p\"\n  output \"\\e[?1006;2\\$y\"\nPUSH \"\\e[?1015\\$p\"\n  output \"\\e[?1015;1\\$y\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/18state_termprops.test",
    "content": "INIT\nWANTSTATE p\n\nRESET\n  settermprop 1 true\n  settermprop 2 true\n  settermprop 7 1\n\n!Cursor visibility\nPUSH \"\\e[?25h\"\n  settermprop 1 true\nPUSH \"\\e[?25\\$p\"\n  output \"\\e[?25;1\\$y\"\nPUSH \"\\e[?25l\"\n  settermprop 1 false\nPUSH \"\\e[?25\\$p\"\n  output \"\\e[?25;2\\$y\"\n\n!Cursor blink\nPUSH \"\\e[?12h\"\n  settermprop 2 true\nPUSH \"\\e[?12\\$p\"\n  output \"\\e[?12;1\\$y\"\nPUSH \"\\e[?12l\"\n  settermprop 2 false\nPUSH \"\\e[?12\\$p\"\n  output \"\\e[?12;2\\$y\"\n\n!Cursor shape\nPUSH \"\\e[3 q\"\n  settermprop 2 true\n  settermprop 7 2\n\n!Title\nPUSH \"\\e]2;Here is my title\\a\"\n  settermprop 4 \"Here is my title\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/20state_wrapping.test",
    "content": "INIT\nUTF8 1\nWANTSTATE gm\n\n!79th Column\nPUSH \"\\e[75G\"\nPUSH \"A\"x5\n  putglyph 0x41 1 0,74\n  putglyph 0x41 1 0,75\n  putglyph 0x41 1 0,76\n  putglyph 0x41 1 0,77\n  putglyph 0x41 1 0,78\n  ?cursor = 0,79\n\n!80th Column Phantom\nPUSH \"A\"\n  putglyph 0x41 1 0,79\n  ?cursor = 0,79\n\n!Line Wraparound\nPUSH \"B\"\n  putglyph 0x42 1 1,0\n  ?cursor = 1,1\n\n!Line Wraparound during combined write\nPUSH \"\\e[78G\"\nPUSH \"BBBCC\"\n  putglyph 0x42 1 1,77\n  putglyph 0x42 1 1,78\n  putglyph 0x42 1 1,79\n  putglyph 0x43 1 2,0\n  putglyph 0x43 1 2,1\n  ?cursor = 2,2\n\n!DEC Auto Wrap Mode\nRESET\nPUSH \"\\e[?7l\"\nPUSH \"\\e[75G\"\nPUSH \"D\"x6\n  putglyph 0x44 1 0,74\n  putglyph 0x44 1 0,75\n  putglyph 0x44 1 0,76\n  putglyph 0x44 1 0,77\n  putglyph 0x44 1 0,78\n  putglyph 0x44 1 0,79\n  ?cursor = 0,79\nPUSH \"D\"\n  putglyph 0x44 1 0,79\n  ?cursor = 0,79\nPUSH \"\\e[?7h\"\n\n!80th column causes linefeed on wraparound\nPUSH \"\\e[25;78HABC\"\n  putglyph 0x41 1 24,77\n  putglyph 0x42 1 24,78\n  putglyph 0x43 1 24,79\n  ?cursor = 24,79\nPUSH \"D\"\n  moverect 1..25,0..80 -> 0..24,0..80\n  putglyph 0x44 1 24,0\n\n!80th column phantom linefeed phantom cancelled by explicit cursor move\nPUSH \"\\e[25;78HABC\"\n  putglyph 0x41 1 24,77\n  putglyph 0x42 1 24,78\n  putglyph 0x43 1 24,79\n  ?cursor = 24,79\nPUSH \"\\e[25;1HD\"\n  putglyph 0x44 1 24,0\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/21state_tabstops.test",
    "content": "INIT\nWANTSTATE g\n\n!Initial\nRESET\nPUSH \"\\tX\"\n  putglyph 0x58 1 0,8\nPUSH \"\\tX\"\n  putglyph 0x58 1 0,16\n  ?cursor = 0,17\n\n!HTS\nPUSH \"\\e[5G\\eH\"\nPUSH \"\\e[G\\tX\"\n  putglyph 0x58 1 0,4\n  ?cursor = 0,5\n\n!TBC 0\nPUSH \"\\e[9G\\e[g\"\nPUSH \"\\e[G\\tX\\tX\"\n  putglyph 0x58 1 0,4\n  putglyph 0x58 1 0,16\n  ?cursor = 0,17\n\n!TBC 3\nPUSH \"\\e[3g\\e[50G\\eH\\e[G\"\n  ?cursor = 0,0\nPUSH \"\\tX\"\n  putglyph 0x58 1 0,49\n  ?cursor = 0,50\n\n!Tabstops after resize\nRESET\nRESIZE 30,100\n# Should be 100/8 = 12 tabstops\nPUSH \"\\tX\"\n  putglyph 0x58 1 0,8\nPUSH \"\\tX\"\n  putglyph 0x58 1 0,16\nPUSH \"\\tX\"\n  putglyph 0x58 1 0,24\nPUSH \"\\tX\"\n  putglyph 0x58 1 0,32\nPUSH \"\\tX\"\n  putglyph 0x58 1 0,40\nPUSH \"\\tX\"\n  putglyph 0x58 1 0,48\nPUSH \"\\tX\"\n  putglyph 0x58 1 0,56\nPUSH \"\\tX\"\n  putglyph 0x58 1 0,64\nPUSH \"\\tX\"\n  putglyph 0x58 1 0,72\nPUSH \"\\tX\"\n  putglyph 0x58 1 0,80\nPUSH \"\\tX\"\n  putglyph 0x58 1 0,88\nPUSH \"\\tX\"\n  putglyph 0x58 1 0,96\n  ?cursor = 0,97\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/22state_save.test",
    "content": "INIT\nWANTSTATE p\n\nRESET\n  settermprop 1 true\n  settermprop 2 true\n  settermprop 7 1\n\n!Set up state\nPUSH \"\\e[2;2H\"\n  ?cursor = 1,1\nPUSH \"\\e[1m\"\n  ?pen bold = on\n\n!Save\nPUSH \"\\e[?1048h\"\n\n!Change state\nPUSH \"\\e[5;5H\"\n  ?cursor = 4,4\nPUSH \"\\e[4 q\"\n  settermprop 2 false\n  settermprop 7 2\nPUSH \"\\e[22;4m\"\n  ?pen bold = off\n  ?pen underline = 1\n\n!Restore\nPUSH \"\\e[?1048l\"\n  settermprop 1 true\n  settermprop 2 true\n  settermprop 7 1\n  ?cursor = 1,1\n  ?pen bold = on\n  ?pen underline = 0\n\n!Save/restore using DECSC/DECRC\nPUSH \"\\e[2;2H\\e7\"\n  ?cursor = 1,1\n\nPUSH \"\\e[5;5H\"\n  ?cursor = 4,4\nPUSH \"\\e8\"\n  settermprop 1 true\n  settermprop 2 true\n  settermprop 7 1\n  ?cursor = 1,1\n\n!Save twice, restore twice happens on both edge transitions\nPUSH \"\\e[2;10H\\e[?1048h\\e[6;10H\\e[?1048h\"\nPUSH \"\\e[H\"\n  ?cursor = 0,0\nPUSH \"\\e[?1048l\"\n  settermprop 1 true\n  settermprop 2 true\n  settermprop 7 1\n  ?cursor = 5,9\nPUSH \"\\e[H\"\n  ?cursor = 0,0\nPUSH \"\\e[?1048l\"\n  settermprop 1 true\n  settermprop 2 true\n  settermprop 7 1\n  ?cursor = 5,9\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/25state_input.test",
    "content": "INIT\nWANTSTATE\n\n!Unmodified ASCII\nINCHAR 0 41\n  output \"A\"\nINCHAR 0 61\n  output \"a\"\n\n!Ctrl modifier on ASCII letters\nINCHAR C 41\n  output \"\\e[65;5u\"\nINCHAR C 61\n  output \"\\x01\"\n\n!Alt modifier on ASCII letters\nINCHAR A 41\n  output \"\\eA\"\nINCHAR A 61\n  output \"\\ea\"\n\n!Ctrl-Alt modifier on ASCII letters\nINCHAR CA 41\n  output \"\\e[65;7u\"\nINCHAR CA 61\n  output \"\\e\\x01\"\n\n!Special handling of Ctrl-I\nINCHAR 0 49\n  output \"I\"\nINCHAR 0 69\n  output \"i\"\nINCHAR C 49\n  output \"\\e[73;5u\"\nINCHAR C 69\n  output \"\\e[105;5u\"\nINCHAR A 49\n  output \"\\eI\"\nINCHAR A 69\n  output \"\\ei\"\nINCHAR CA 49\n  output \"\\e[73;7u\"\nINCHAR CA 69\n  output \"\\e[105;7u\"\n\n!Special handling of Space\nINCHAR 0 20\n  output \" \"\nINCHAR S 20\n  output \"\\e[32;2u\"\nINCHAR C 20\n  output \"\\0\"\nINCHAR SC 20\n  output \"\\e[32;6u\"\nINCHAR A 20\n  output \"\\e \"\nINCHAR SA 20\n  output \"\\e[32;4u\"\nINCHAR CA 20\n  output \"\\e\\0\"\nINCHAR SCA 20\n  output \"\\e[32;8u\"\n\n!Cursor keys in reset (cursor) mode\nINKEY 0 Up\n  output \"\\e[A\"\nINKEY S Up\n  output \"\\e[1;2A\"\nINKEY C Up\n  output \"\\e[1;5A\"\nINKEY SC Up\n  output \"\\e[1;6A\"\nINKEY A Up\n  output \"\\e[1;3A\"\nINKEY SA Up\n  output \"\\e[1;4A\"\nINKEY CA Up\n  output \"\\e[1;7A\"\nINKEY SCA Up\n  output \"\\e[1;8A\"\n\n!Cursor keys in application mode\nPUSH \"\\e[?1h\"\n# Plain \"Up\" should be SS3 A now\nINKEY 0 Up\n  output \"\\eOA\"\n# Modified keys should still use CSI\nINKEY S Up\n  output \"\\e[1;2A\"\nINKEY C Up\n  output \"\\e[1;5A\"\n\n!Shift-Tab should be different\nINKEY 0 Tab\n  output \"\\x09\"\nINKEY S Tab\n  output \"\\e[Z\"\nINKEY C Tab\n  output \"\\e[9;5u\"\nINKEY A Tab\n  output \"\\e\\x09\"\nINKEY CA Tab\n  output \"\\e[9;7u\"\n\n!Enter in linefeed mode\nINKEY 0 Enter\n  output \"\\x0d\"\n\n!Enter in newline mode\nPUSH \"\\e[20h\"\nINKEY 0 Enter\n  output \"\\x0d\\x0a\"\n\n!Unmodified F1 is SS3 P\nINKEY 0 F1\n  output \"\\eOP\"\n\n!Modified F1 is CSI P\nINKEY S F1\n  output \"\\e[1;2P\"\nINKEY A F1\n  output \"\\e[1;3P\"\nINKEY C F1\n  output \"\\e[1;5P\"\n\n!Keypad in DECKPNM\nINKEY 0 KP0\n  output \"0\"\n\n!Keypad in DECKPAM\nPUSH \"\\e=\"\nINKEY 0 KP0\n  output \"\\eOp\"\n\n!Bracketed paste mode off\nPASTE START\nPASTE END\n\n!Bracketed paste mode on\nPUSH \"\\e[?2004h\"\nPASTE START\n  output \"\\e[200~\"\nPASTE END\n  output \"\\e[201~\"\n\n!Focus reporting disabled\nFOCUS IN\nFOCUS OUT\n\n!Focus reporting enabled\nPUSH \"\\e[?1004h\"\nFOCUS IN\n  output \"\\e[I\"\nFOCUS OUT\n  output \"\\e[O\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/26state_query.test",
    "content": "INIT\nWANTSTATE\n\n!DA\nRESET\nPUSH \"\\e[c\"\n  output \"\\e[?1;2c\"\n\n!DSR\nRESET\nPUSH \"\\e[5n\"\n  output \"\\e[0n\"\n\n!CPR\nPUSH \"\\e[6n\"\n  output \"\\e[1;1R\"\nPUSH \"\\e[10;10H\\e[6n\"\n  output \"\\e[10;10R\"\n\n!DECCPR\nPUSH \"\\e[?6n\"\n  output \"\\e[?10;10R\"\n\n!DECRQSS on DECSCUSR\nPUSH \"\\e[3 q\"\nPUSH \"\\eP\\$q q\\e\\\\\"\n  output \"\\eP1\\$r3 q\\e\\\\\"\n\n!DECRQSS on SGR\nPUSH \"\\e[1;5;7m\"\nPUSH \"\\eP\\$qm\\e\\\\\"\n  output \"\\eP1\\$r1;5;7m\\e\\\\\"\n\n!DECRQSS on SGR ANSI colours\nPUSH \"\\e[0;31;42m\"\nPUSH \"\\eP\\$qm\\e\\\\\"\n  output \"\\eP1\\$r31;42m\\e\\\\\"\n\n!DECRQSS on SGR ANSI hi-bright colours\nPUSH \"\\e[0;93;104m\"\nPUSH \"\\eP\\$qm\\e\\\\\"\n  output \"\\eP1\\$r93;104m\\e\\\\\"\n\n!DECRQSS on SGR 256-palette colours\nPUSH \"\\e[0;38:5:56;48:5:78m\"\nPUSH \"\\eP\\$qm\\e\\\\\"\n  output \"\\eP1\\$r38:5:56;48:5:78m\\e\\\\\"\n\n!DECRQSS on SGR RGB8 colours\nPUSH \"\\e[0;38:2:24:68:112;48:2:13:57:101m\"\nPUSH \"\\eP\\$qm\\e\\\\\"\n  output \"\\eP1\\$r38:2:24:68:112;48:2:13:57:101m\\e\\\\\"\n\n!S8C1T on DSR\nPUSH \"\\e G\"\nPUSH \"\\e[5n\"\n  output \"\\x{9b}0n\"\nPUSH \"\\e F\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/27state_reset.test",
    "content": "INIT\nWANTSTATE\n\nRESET\n\n!RIS homes cursor\nPUSH \"\\e[5;5H\"\n  ?cursor = 4,4\nWANTSTATE +m\nPUSH \"\\ec\"\n  ?cursor = 0,0\nWANTSTATE -m\n\n!RIS cancels scrolling region\nPUSH \"\\e[5;10r\"\nWANTSTATE +s\nPUSH \"\\ec\\e[25H\\n\"\n  scrollrect 0..25,0..80 => +1,+0\nWANTSTATE -s\n\n!RIS erases screen\nPUSH \"ABCDE\"\nWANTSTATE +e\nPUSH \"\\ec\"\n  erase 0..25,0..80\nWANTSTATE -e\n\n!RIS clears tabstops\nPUSH \"\\e[5G\\eH\\e[G\\t\"\n  ?cursor = 0,4\nPUSH \"\\ec\\t\"\n  ?cursor = 0,8\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/28state_dbl_wh.test",
    "content": "INIT\nWANTSTATE g\n\n!Single Width, Single Height\nRESET\nPUSH \"\\e#5\"\nPUSH \"Hello\"\n  putglyph 0x48 1 0,0\n  putglyph 0x65 1 0,1\n  putglyph 0x6c 1 0,2\n  putglyph 0x6c 1 0,3\n  putglyph 0x6f 1 0,4\n\n!Double Width, Single Height\nRESET\nPUSH \"\\e#6\"\nPUSH \"Hello\"\n  putglyph 0x48 1 0,0 dwl\n  putglyph 0x65 1 0,1 dwl\n  putglyph 0x6c 1 0,2 dwl\n  putglyph 0x6c 1 0,3 dwl\n  putglyph 0x6f 1 0,4 dwl\n  ?cursor = 0,5\nPUSH \"\\e[40GAB\"\n  putglyph 0x41 1 0,39 dwl\n  putglyph 0x42 1 1,0\n  ?cursor = 1,1\n\n!Double Height\nRESET\nPUSH \"\\e#3\"\nPUSH \"Hello\"\n  putglyph 0x48 1 0,0 dwl dhl-top\n  putglyph 0x65 1 0,1 dwl dhl-top\n  putglyph 0x6c 1 0,2 dwl dhl-top\n  putglyph 0x6c 1 0,3 dwl dhl-top\n  putglyph 0x6f 1 0,4 dwl dhl-top\n  ?cursor = 0,5\nPUSH \"\\r\\n\\e#4\"\nPUSH \"Hello\"\n  putglyph 0x48 1 1,0 dwl dhl-bottom\n  putglyph 0x65 1 1,1 dwl dhl-bottom\n  putglyph 0x6c 1 1,2 dwl dhl-bottom\n  putglyph 0x6c 1 1,3 dwl dhl-bottom\n  putglyph 0x6f 1 1,4 dwl dhl-bottom\n  ?cursor = 1,5\n\n!Double Width scrolling\nRESET\nPUSH \"\\e[20H\\e#6ABC\"\n  putglyph 0x41 1 19,0 dwl\n  putglyph 0x42 1 19,1 dwl\n  putglyph 0x43 1 19,2 dwl\nPUSH \"\\e[25H\\n\"\nPUSH \"\\e[19;4HDE\"\n  putglyph 0x44 1 18,3 dwl\n  putglyph 0x45 1 18,4 dwl\nPUSH \"\\e[H\\eM\"\nPUSH \"\\e[20;6HFG\"\n  putglyph 0x46 1 19,5 dwl\n  putglyph 0x47 1 19,6 dwl\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/29state_fallback.test",
    "content": "INIT\nWANTSTATE f\nRESET\n\n!Unrecognised control \nPUSH \"\\x03\"\n  control 03\n\n!Unrecognised CSI\nPUSH \"\\e[?15;2z\"\n  csi 0x7a L=3f 15,2\n\n!Unrecognised OSC\nPUSH \"\\e]27;Something\\e\\\\\"\n  osc \"27;Something\"\n\n!Unrecognised DCS\nPUSH \"\\ePz123\\e\\\\\"\n  dcs \"z123\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/30state_pen.test",
    "content": "INIT\nUTF8 1\nWANTSTATE\n\n!Reset\nPUSH \"\\e[m\"\n  ?pen bold = off\n  ?pen underline = 0\n  ?pen italic = off\n  ?pen blink = off\n  ?pen reverse = off\n  ?pen font = 0\n  ?pen foreground = rgb(240,240,240,is_default_fg)\n  ?pen background = rgb(0,0,0,is_default_bg)\n\n!Bold\nPUSH \"\\e[1m\"\n  ?pen bold = on\nPUSH \"\\e[22m\"\n  ?pen bold = off\nPUSH \"\\e[1m\\e[m\"\n  ?pen bold = off\n\n!Underline\nPUSH \"\\e[4m\"\n  ?pen underline = 1\nPUSH \"\\e[21m\"\n  ?pen underline = 2\nPUSH \"\\e[24m\"\n  ?pen underline = 0\nPUSH \"\\e[4m\\e[4:0m\"\n  ?pen underline = 0\nPUSH \"\\e[4:1m\"\n  ?pen underline = 1\nPUSH \"\\e[4:2m\"\n  ?pen underline = 2\nPUSH \"\\e[4:3m\"\n  ?pen underline = 3\nPUSH \"\\e[4m\\e[m\"\n  ?pen underline = 0\n\n!Italic\nPUSH \"\\e[3m\"\n  ?pen italic = on\nPUSH \"\\e[23m\"\n  ?pen italic = off\nPUSH \"\\e[3m\\e[m\"\n  ?pen italic = off\n\n!Blink\nPUSH \"\\e[5m\"\n  ?pen blink = on\nPUSH \"\\e[25m\"\n  ?pen blink = off\nPUSH \"\\e[5m\\e[m\"\n  ?pen blink = off\n\n!Reverse\nPUSH \"\\e[7m\"\n  ?pen reverse = on\nPUSH \"\\e[27m\"\n  ?pen reverse = off\nPUSH \"\\e[7m\\e[m\"\n  ?pen reverse = off\n\n!Font Selection\nPUSH \"\\e[11m\"\n  ?pen font = 1\nPUSH \"\\e[19m\"\n  ?pen font = 9\nPUSH \"\\e[10m\"\n  ?pen font = 0\nPUSH \"\\e[11m\\e[m\"\n  ?pen font = 0\n\n!Foreground\nPUSH \"\\e[31m\"\n  ?pen foreground = idx(1)\nPUSH \"\\e[32m\"\n  ?pen foreground = idx(2)\nPUSH \"\\e[34m\"\n  ?pen foreground = idx(4)\nPUSH \"\\e[91m\"\n  ?pen foreground = idx(9)\nPUSH \"\\e[38:2:10:20:30m\"\n  ?pen foreground = rgb(10,20,30)\nPUSH \"\\e[38:5:1m\"\n  ?pen foreground = idx(1)\nPUSH \"\\e[39m\"\n  ?pen foreground = rgb(240,240,240,is_default_fg)\n\n!Background\nPUSH \"\\e[41m\"\n  ?pen background = idx(1)\nPUSH \"\\e[42m\"\n  ?pen background = idx(2)\nPUSH \"\\e[44m\"\n  ?pen background = idx(4)\nPUSH \"\\e[101m\"\n  ?pen background = idx(9)\nPUSH \"\\e[48:2:10:20:30m\"\n  ?pen background = rgb(10,20,30)\nPUSH \"\\e[48:5:1m\"\n  ?pen background = idx(1)\nPUSH \"\\e[49m\"\n  ?pen background = rgb(0,0,0,is_default_bg)\n\n!Bold+ANSI colour == highbright\nPUSH \"\\e[m\\e[1;37m\"\n  ?pen bold = on\n  ?pen foreground = idx(15)\nPUSH \"\\e[m\\e[37;1m\"\n  ?pen bold = on\n  ?pen foreground = idx(15)\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/31state_rep.test",
    "content": "INIT\nUTF8 1\nWANTSTATE g\n\n!REP no argument\nRESET\nPUSH \"a\\e[b\"\n  putglyph 0x61 1 0,0\n  putglyph 0x61 1 0,1\n\n!REP zero (zero should be interpreted as one)\nRESET\nPUSH \"a\\e[0b\"\n  putglyph 0x61 1 0,0\n  putglyph 0x61 1 0,1\n\n!REP lowercase a times two\nRESET\nPUSH \"a\\e[2b\"\n  putglyph 0x61 1 0,0\n  putglyph 0x61 1 0,1\n  putglyph 0x61 1 0,2\n\n!REP with UTF-8 1 char\n# U+00E9 = 0xC3 0xA9  name: LATIN SMALL LETTER E WITH ACUTE\nRESET\nPUSH \"\\xC3\\xA9\\e[b\"\n  putglyph 0xe9 1 0,0\n  putglyph 0xe9 1 0,1\n\n!REP with UTF-8 wide char\n# U+00E9 = 0xC3 0xA9  name: LATIN SMALL LETTER E WITH ACUTE\nRESET\nPUSH \"\\xEF\\xBC\\x90\\e[b\"\n  putglyph 0xff10 2 0,0\n  putglyph 0xff10 2 0,2\n\n!REP with UTF-8 combining character\nRESET\nPUSH \"e\\xCC\\x81\\e[b\"\n  putglyph 0x65,0x301 1 0,0\n  putglyph 0x65,0x301 1 0,1\n\n!REP till end of line\nRESET\nPUSH \"a\\e[1000bb\"\n  putglyph 0x61 1 0,0\n  putglyph 0x61 1 0,1\n  putglyph 0x61 1 0,2\n  putglyph 0x61 1 0,3\n  putglyph 0x61 1 0,4\n  putglyph 0x61 1 0,5\n  putglyph 0x61 1 0,6\n  putglyph 0x61 1 0,7\n  putglyph 0x61 1 0,8\n  putglyph 0x61 1 0,9\n  putglyph 0x61 1 0,10\n  putglyph 0x61 1 0,11\n  putglyph 0x61 1 0,12\n  putglyph 0x61 1 0,13\n  putglyph 0x61 1 0,14\n  putglyph 0x61 1 0,15\n  putglyph 0x61 1 0,16\n  putglyph 0x61 1 0,17\n  putglyph 0x61 1 0,18\n  putglyph 0x61 1 0,19\n  putglyph 0x61 1 0,20\n  putglyph 0x61 1 0,21\n  putglyph 0x61 1 0,22\n  putglyph 0x61 1 0,23\n  putglyph 0x61 1 0,24\n  putglyph 0x61 1 0,25\n  putglyph 0x61 1 0,26\n  putglyph 0x61 1 0,27\n  putglyph 0x61 1 0,28\n  putglyph 0x61 1 0,29\n  putglyph 0x61 1 0,30\n  putglyph 0x61 1 0,31\n  putglyph 0x61 1 0,32\n  putglyph 0x61 1 0,33\n  putglyph 0x61 1 0,34\n  putglyph 0x61 1 0,35\n  putglyph 0x61 1 0,36\n  putglyph 0x61 1 0,37\n  putglyph 0x61 1 0,38\n  putglyph 0x61 1 0,39\n  putglyph 0x61 1 0,40\n  putglyph 0x61 1 0,41\n  putglyph 0x61 1 0,42\n  putglyph 0x61 1 0,43\n  putglyph 0x61 1 0,44\n  putglyph 0x61 1 0,45\n  putglyph 0x61 1 0,46\n  putglyph 0x61 1 0,47\n  putglyph 0x61 1 0,48\n  putglyph 0x61 1 0,49\n  putglyph 0x61 1 0,50\n  putglyph 0x61 1 0,51\n  putglyph 0x61 1 0,52\n  putglyph 0x61 1 0,53\n  putglyph 0x61 1 0,54\n  putglyph 0x61 1 0,55\n  putglyph 0x61 1 0,56\n  putglyph 0x61 1 0,57\n  putglyph 0x61 1 0,58\n  putglyph 0x61 1 0,59\n  putglyph 0x61 1 0,60\n  putglyph 0x61 1 0,61\n  putglyph 0x61 1 0,62\n  putglyph 0x61 1 0,63\n  putglyph 0x61 1 0,64\n  putglyph 0x61 1 0,65\n  putglyph 0x61 1 0,66\n  putglyph 0x61 1 0,67\n  putglyph 0x61 1 0,68\n  putglyph 0x61 1 0,69\n  putglyph 0x61 1 0,70\n  putglyph 0x61 1 0,71\n  putglyph 0x61 1 0,72\n  putglyph 0x61 1 0,73\n  putglyph 0x61 1 0,74\n  putglyph 0x61 1 0,75\n  putglyph 0x61 1 0,76\n  putglyph 0x61 1 0,77\n  putglyph 0x61 1 0,78\n  putglyph 0x61 1 0,79\n  putglyph 0x62 1 1,0\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/60screen_ascii.test",
    "content": "INIT\nWANTSCREEN c\n\n!Get\nRESET\nPUSH \"ABC\"\n  movecursor 0,3\n  ?screen_chars 0,0,1,3 = 0x41,0x42,0x43\n  ?screen_chars 0,0,1,80 = 0x41,0x42,0x43\n  ?screen_text 0,0,1,3 = 0x41,0x42,0x43\n  ?screen_text 0,0,1,80 = 0x41,0x42,0x43\n  ?screen_cell 0,0 = {0x41} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0)\n  ?screen_cell 0,1 = {0x42} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0)\n  ?screen_cell 0,2 = {0x43} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0)\n  ?screen_row 0 = \"ABC\"\n  ?screen_eol 0,0 = 0\n  ?screen_eol 0,2 = 0\n  ?screen_eol 0,3 = 1\nPUSH \"\\e[H\"\n  movecursor 0,0\n  ?screen_chars 0,0,1,80 = 0x41,0x42,0x43\n  ?screen_text 0,0,1,80 = 0x41,0x42,0x43\nPUSH \"E\"\n  movecursor 0,1\n  ?screen_chars 0,0,1,80 = 0x45,0x42,0x43\n  ?screen_text 0,0,1,80 = 0x45,0x42,0x43\n\nWANTSCREEN -c\n\n!Erase\nRESET\nPUSH \"ABCDE\\e[H\\e[K\"\n  ?screen_chars 0,0,1,80 = \n  ?screen_text 0,0,1,80 = \n\n!Copycell\nRESET\nPUSH \"ABC\\e[H\\e[@\"\nPUSH \"1\"\n  ?screen_chars 0,0,1,80 = 0x31,0x41,0x42,0x43\n\nRESET\nPUSH \"ABC\\e[H\\e[P\"\n  ?screen_chars 0,0,1,1 = 0x42\n  ?screen_chars 0,1,1,2 = 0x43\n  ?screen_chars 0,0,1,80 = 0x42,0x43\n\n!Space padding\nRESET\nPUSH \"Hello\\e[CWorld\"\n  ?screen_chars 0,0,1,80 = 0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f,0x72,0x6c,0x64\n  ?screen_text 0,0,1,80 = 0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f,0x72,0x6c,0x64\n\n!Linefeed padding\nRESET\nPUSH \"Hello\\r\\nWorld\"\n  ?screen_chars 0,0,2,80 = 0x48,0x65,0x6c,0x6c,0x6f,0x0a,0x57,0x6f,0x72,0x6c,0x64\n  ?screen_text 0,0,2,80 = 0x48,0x65,0x6c,0x6c,0x6f,0x0a,0x57,0x6f,0x72,0x6c,0x64\n\n!Altscreen\nRESET\nPUSH \"P\"\n  ?screen_chars 0,0,1,80 = 0x50\nPUSH \"\\e[?1049h\"\n  ?screen_chars 0,0,1,80 = \nPUSH \"\\e[2K\\e[HA\"\n  ?screen_chars 0,0,1,80 = 0x41\nPUSH \"\\e[?1049l\"\n  ?screen_chars 0,0,1,80 = 0x50\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/61screen_unicode.test",
    "content": "INIT\nUTF8 1\nWANTSCREEN\n\n!Single width UTF-8\n# U+00C1 = 0xC3 0x81  name: LATIN CAPITAL LETTER A WITH ACUTE\n# U+00E9 = 0xC3 0xA9  name: LATIN SMALL LETTER E WITH ACUTE\nRESET\nPUSH \"\\xC3\\x81\\xC3\\xA9\"\n  ?screen_chars 0,0,1,80 = 0xc1,0xe9\n  ?screen_text 0,0,1,80 = 0xc3,0x81,0xc3,0xa9\n  ?screen_cell 0,0 = {0xc1} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0)\n\n!Wide char\n# U+FF10 = 0xEF 0xBC 0x90  name: FULLWIDTH DIGIT ZERO\nRESET\nPUSH \"0123\\e[H\"\nPUSH \"\\xEF\\xBC\\x90\"\n  ?screen_chars 0,0,1,80 = 0xff10,0x32,0x33\n  ?screen_text 0,0,1,80 = 0xef,0xbc,0x90,0x32,0x33\n  ?screen_cell 0,0 = {0xff10} width=2 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0)\n\n!Combining char\n# U+0301 = 0xCC 0x81  name: COMBINING ACUTE\nRESET\nPUSH \"0123\\e[H\"\nPUSH \"e\\xCC\\x81\"\n  ?screen_chars 0,0,1,80 = 0x65,0x301,0x31,0x32,0x33\n  ?screen_text 0,0,1,80 = 0x65,0xcc,0x81,0x31,0x32,0x33\n  ?screen_cell 0,0 = {0x65,0x301} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0)\n\n!10 combining accents should not crash\nRESET\nPUSH \"e\\xCC\\x81\\xCC\\x82\\xCC\\x83\\xCC\\x84\\xCC\\x85\\xCC\\x86\\xCC\\x87\\xCC\\x88\\xCC\\x89\\xCC\\x8A\"\n  ?screen_cell 0,0 = {0x65,0x301,0x302,0x303,0x304,0x305} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0)\n\n!40 combining accents in two split writes of 20 should not crash\nRESET\nPUSH \"e\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\"\nPUSH  \"\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\\xCC\\x81\"\n  ?screen_cell 0,0 = {0x65,0x301,0x301,0x301,0x301,0x301} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0)\n\n!Outputing CJK doublewidth in 80th column should wraparound to next line and not crash\"\nRESET\nPUSH \"\\e[80G\\xEF\\xBC\\x90\"\n  ?screen_cell 0,79 = {} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0)\n  ?screen_cell 1,0 = {0xff10} width=2 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0)\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/62screen_damage.test",
    "content": "INIT\nWANTSCREEN Db\n\n!Putglyph\nRESET\n  damage 0..25,0..80\nPUSH \"123\"\n  damage 0..1,0..1 = 0<31>\n  damage 0..1,1..2 = 0<32>\n  damage 0..1,2..3 = 0<33>\n\n!Erase\nPUSH \"\\e[H\"\nPUSH \"\\e[3X\"\n  damage 0..1,0..3\n\n!Scroll damages entire line in two chunks\nPUSH \"\\e[H\\e[5@\"\n  damage 0..1,5..80\n  damage 0..1,0..5\n\n!Scroll down damages entire screen in two chunks\nPUSH \"\\e[T\"\n  damage 1..25,0..80\n  damage 0..1,0..80\n\n!Altscreen damages entire area\nPUSH \"\\e[?1049h\"\n  damage 0..25,0..80\nPUSH \"\\e[?1049l\"\n  damage 0..25,0..80\n\nWANTSCREEN m\n\n!Scroll invokes moverect but not damage\nPUSH \"\\e[5@\"\n  moverect 0..1,0..75 -> 0..1,5..80\n  damage 0..1,0..5\n\nWANTSCREEN -m\n\n!Merge to cells\nRESET\n  damage 0..25,0..80\nDAMAGEMERGE CELL\n\nPUSH \"A\"\n  damage 0..1,0..1 = 0<41>\nPUSH \"B\"\n  damage 0..1,1..2 = 0<42>\nPUSH \"C\"\n  damage 0..1,2..3 = 0<43>\n\n!Merge entire rows\nRESET\n  damage 0..25,0..80\nDAMAGEMERGE ROW\n\nPUSH \"ABCDE\\r\\nEFGH\"\n  damage 0..1,0..5 = 0<41 42 43 44 45>\nDAMAGEFLUSH\n  damage 1..2,0..4 = 1<45 46 47 48>\nPUSH \"\\e[3;6r\\e[6H\\eD\"\n  damage 2..5,0..80\nDAMAGEFLUSH\n  damage 5..6,0..80\n\n!Merge entire screen\nRESET\n  damage 0..25,0..80\nDAMAGEMERGE SCREEN\n\nPUSH \"ABCDE\\r\\nEFGH\"\nDAMAGEFLUSH\n  damage 0..2,0..5 = 0<41 42 43 44 45> 1<45 46 47 48>\nPUSH \"\\e[3;6r\\e[6H\\eD\"\nDAMAGEFLUSH\n  damage 2..6,0..80\n\n!Merge entire screen with moverect\nWANTSCREEN m\n\nRESET\n  damage 0..25,0..80\nDAMAGEMERGE SCREEN\n\nPUSH \"ABCDE\\r\\nEFGH\"\nPUSH \"\\e[3;6r\\e[6H\\eD\"\n  damage 0..2,0..5 = 0<41 42 43 44 45> 1<45 46 47 48>\n  moverect 3..6,0..80 -> 2..5,0..80\nDAMAGEFLUSH\n  damage 5..6,0..80\n\n!Merge scroll\nRESET\n  damage 0..25,0..80\nDAMAGEMERGE SCROLL\n\nPUSH \"\\e[H1\\r\\n2\\r\\n3\"\nPUSH \"\\e[25H\\n\\n\\n\"\n  sb_pushline 80 = 31\n  sb_pushline 80 = 32\n  sb_pushline 80 = 33\nDAMAGEFLUSH\n  moverect 3..25,0..80 -> 0..22,0..80\n  damage 0..25,0..80\n\n!Merge scroll with damage\nPUSH \"\\e[25H\"\nPUSH \"ABCDE\\r\\nEFGH\\r\\n\"\n  sb_pushline 80 =\n  sb_pushline 80 =\nDAMAGEFLUSH\n  moverect 2..25,0..80 -> 0..23,0..80\n  damage 22..25,0..80 = 22<41 42 43 44 45> 23<45 46 47 48>\n\n!Merge scroll with damage past region\nPUSH \"\\e[3;6r\\e[6H1\\r\\n2\\r\\n3\\r\\n4\\r\\n5\"\nDAMAGEFLUSH\n  damage 2..6,0..80 = 2<32> 3<33> 4<34> 5<35>\n\n!Damage entirely outside scroll region\nPUSH \"\\e[HABC\\e[3;6r\\e[6H\\r\\n6\"\n  damage 0..1,0..3 = 0<41 42 43>\nDAMAGEFLUSH\n  moverect 3..6,0..80 -> 2..5,0..80\n  damage 5..6,0..80 = 5<36>\n\n!Damage overlapping scroll region\nPUSH \"\\e[H\\e[2J\"\nDAMAGEFLUSH\n  damage 0..25,0..80\n\nPUSH \"\\e[HABCD\\r\\nEFGH\\r\\nIJKL\\e[2;5r\\e[5H\\r\\nMNOP\"\nDAMAGEFLUSH\n  moverect 2..5,0..80 -> 1..4,0..80\n  damage 0..5,0..80 = 0<41 42 43 44> 1<49 4A 4B 4C>\n  ## TODO: is this right?\n\n!Merge scroll*2 with damage\nRESET\n  damage 0..25,0..80\nDAMAGEMERGE SCROLL\n\nPUSH \"\\e[25H\\r\\nABCDE\\b\\b\\b\\e[2P\\r\\n\"\n  sb_pushline 80 =\n  moverect 1..25,0..80 -> 0..24,0..80\n  damage 24..25,0..80 = 24<41 42 43 44 45>\n  moverect 24..25,4..80 -> 24..25,2..78\n  damage 24..25,78..80\n  sb_pushline 80 =\nDAMAGEFLUSH\n  moverect 1..25,0..80 -> 0..24,0..80\n  damage 24..25,0..80\n  ?screen_chars 23,0,24,5 = 0x41,0x42,0x45\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/63screen_resize.test",
    "content": "INIT\nWANTSTATE\nWANTSCREEN\n\n!Resize wider preserves cells\nRESET\nRESIZE 25,80\nPUSH \"AB\\r\\nCD\"\n  ?screen_chars 0,0,1,80 = 0x41,0x42\n  ?screen_chars 1,0,2,80 = 0x43,0x44\nRESIZE 25,100\n  ?screen_chars 0,0,1,100 = 0x41,0x42\n  ?screen_chars 1,0,2,100 = 0x43,0x44\n\n!Resize wider allows print in new area\nRESET\nRESIZE 25,80\nPUSH \"AB\\e[79GCD\"\n  ?screen_chars 0,0,1,2 = 0x41,0x42\n  ?screen_chars 0,78,1,80 = 0x43,0x44\nRESIZE 25,100\n  ?screen_chars 0,0,1,2 = 0x41,0x42\n  ?screen_chars 0,78,1,80 = 0x43,0x44\nPUSH \"E\"\n  ?screen_chars 0,78,1,81 = 0x43,0x44,0x45\n\n!Resize shorter with blanks just truncates\nRESET\nRESIZE 25,80\nPUSH \"Top\\e[10HLine 10\"\n  ?screen_chars 0,0,1,80 = 0x54,0x6f,0x70\n  ?screen_chars 9,0,10,80 = 0x4c,0x69,0x6e,0x65,0x20,0x31,0x30\n  ?cursor = 9,7\nRESIZE 20,80\n  ?screen_chars 0,0,1,80 = 0x54,0x6f,0x70\n  ?screen_chars 9,0,10,80 = 0x4c,0x69,0x6e,0x65,0x20,0x31,0x30\n  ?cursor = 9,7\n\n!Resize shorter with content must scroll\nRESET\nRESIZE 25,80\nPUSH \"Top\\e[25HLine 25\\e[15H\"\n  ?screen_chars 0,0,1,80 = 0x54,0x6f,0x70\n  ?screen_chars 24,0,25,80 = 0x4c,0x69,0x6e,0x65,0x20,0x32,0x35\n  ?cursor = 14,0\nWANTSCREEN b\nRESIZE 20,80\n  sb_pushline 80 = 54 6F 70\n  sb_pushline 80 =\n  sb_pushline 80 =\n  sb_pushline 80 =\n  sb_pushline 80 =\n  ?screen_chars 0,0,1,80 = \n  ?screen_chars 19,0,20,80 = 0x4c,0x69,0x6e,0x65,0x20,0x32,0x35\n  ?cursor = 9,0\n\n!Resize shorter does not lose line with cursor\n# See also https://github.com/neovim/libvterm/commit/1b745d29d45623aa8d22a7b9288c7b0e331c7088\nRESET\nWANTSCREEN -b\nRESIZE 25,80\nWANTSCREEN b\nPUSH \"\\e[24HLine 24\\r\\nLine 25\\r\\n\"\n  sb_pushline 80 =\n  ?screen_chars 23,0,24,10 = 0x4c,0x69,0x6e,0x65,0x20,0x32,0x35\n  ?cursor = 24,0\nRESIZE 24,80\n  sb_pushline 80 =\n  ?screen_chars 22,0,23,10 = 0x4c,0x69,0x6e,0x65,0x20,0x32,0x35\n  ?cursor = 23,0\n\n!Resize taller attempts to pop scrollback\nRESET\nWANTSCREEN -b\nRESIZE 25,80\nPUSH \"Line 1\\e[25HBottom\\e[15H\"\n  ?screen_chars 0,0,1,80 = 0x4c,0x69,0x6e,0x65,0x20,0x31\n  ?screen_chars 24,0,25,80 = 0x42,0x6f,0x74,0x74,0x6f,0x6d\n  ?cursor = 14,0\nWANTSCREEN b\nRESIZE 30,80\n  sb_popline 80\n  sb_popline 80\n  sb_popline 80\n  sb_popline 80\n  sb_popline 80\n  ?screen_chars 0,0,1,80 = 0x41,0x42,0x43,0x44,0x45\n  ?screen_chars 5,0,6,80 = 0x4c,0x69,0x6e,0x65,0x20,0x31\n  ?screen_chars 29,0,30,80 = 0x42,0x6f,0x74,0x74,0x6f,0x6d\n  ?cursor = 19,0\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/64screen_pen.test",
    "content": "INIT\nWANTSCREEN\n\nRESET\n\n!Plain\nPUSH \"A\"\n  ?screen_cell 0,0 = {0x41} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0)\n\n!Bold\nPUSH \"\\e[1mB\"\n  ?screen_cell 0,1 = {0x42} width=1 attrs={B} fg=rgb(240,240,240) bg=rgb(0,0,0)\n\n!Italic\nPUSH \"\\e[3mC\"\n  ?screen_cell 0,2 = {0x43} width=1 attrs={BI} fg=rgb(240,240,240) bg=rgb(0,0,0)\n\n!Underline\nPUSH \"\\e[4mD\"\n  ?screen_cell 0,3 = {0x44} width=1 attrs={BU1I} fg=rgb(240,240,240) bg=rgb(0,0,0)\n\n!Reset\nPUSH \"\\e[mE\"\n  ?screen_cell 0,4 = {0x45} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0)\n\n!Font\nPUSH \"\\e[11mF\\e[m\"\n  ?screen_cell 0,5 = {0x46} width=1 attrs={F1} fg=rgb(240,240,240) bg=rgb(0,0,0)\n\n!Foreground\nPUSH \"\\e[31mG\\e[m\"\n  ?screen_cell 0,6 = {0x47} width=1 attrs={} fg=rgb(224,0,0) bg=rgb(0,0,0)\n\n!Background\nPUSH \"\\e[42mH\\e[m\"\n  ?screen_cell 0,7 = {0x48} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,224,0)\n\n!EL sets reverse and colours to end of line\nPUSH \"\\e[H\\e[7;33;44m\\e[K\"\n  ?screen_cell 0,0  = {} width=1 attrs={R} fg=rgb(224,224,0) bg=rgb(0,0,224)\n  ?screen_cell 0,79 = {} width=1 attrs={R} fg=rgb(224,224,0) bg=rgb(0,0,224)\n\n!DECSCNM xors reverse for entire screen\nPUSH \"\\e[?5h\"\n  ?screen_cell 0,0  = {} width=1 attrs={} fg=rgb(224,224,0) bg=rgb(0,0,224)\n  ?screen_cell 0,79 = {} width=1 attrs={} fg=rgb(224,224,0) bg=rgb(0,0,224)\n  ?screen_cell 1,0  = {} width=1 attrs={R} fg=rgb(240,240,240) bg=rgb(0,0,0)\nPUSH \"\\e[?5\\$p\"\n  output \"\\e[?5;1\\$y\"\nPUSH \"\\e[?5l\"\n  ?screen_cell 0,0  = {} width=1 attrs={R} fg=rgb(224,224,0) bg=rgb(0,0,224)\n  ?screen_cell 0,79 = {} width=1 attrs={R} fg=rgb(224,224,0) bg=rgb(0,0,224)\n  ?screen_cell 1,0  = {} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0)\nPUSH \"\\e[?5\\$p\"\n  output \"\\e[?5;2\\$y\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/65screen_protect.test",
    "content": "INIT\nWANTSCREEN \n\n!Selective erase\nRESET\nPUSH \"A\\e[1\\\"qB\\e[\\\"qC\"\n  ?screen_chars 0,0,1,3 = 0x41,0x42,0x43\nPUSH \"\\e[G\\e[?J\"\n  ?screen_chars 0,0,1,3 = 0x20,0x42\n\n!Non-selective erase\nRESET\nPUSH \"A\\e[1\\\"qB\\e[\\\"qC\"\n  ?screen_chars 0,0,1,3 = 0x41,0x42,0x43\nPUSH \"\\e[G\\e[J\"\n  ?screen_chars 0,0,1,3 = \n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/66screen_extent.test",
    "content": "INIT\nWANTSCREEN \n\n!Bold extent\nRESET\nPUSH \"AB\\e[1mCD\\e[mE\"\n  ?screen_attrs_extent 0,0 = 0,0-1,1\n  ?screen_attrs_extent 0,1 = 0,0-1,1\n  ?screen_attrs_extent 0,2 = 0,2-1,3\n  ?screen_attrs_extent 0,3 = 0,2-1,3\n  ?screen_attrs_extent 0,4 = 0,4-1,79\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/67screen_dbl_wh.test",
    "content": "INIT\nWANTSCREEN\n\nRESET\n\n!Single Width, Single Height\nRESET\nPUSH \"\\e#5\"\nPUSH \"abcde\"\n  ?screen_cell 0,0 = {0x61} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0)\n\n!Double Width, Single Height\nRESET\nPUSH \"\\e#6\"\nPUSH \"abcde\"\n  ?screen_cell 0,0 = {0x61} width=1 attrs={} dwl fg=rgb(240,240,240) bg=rgb(0,0,0)\n\n!Double Height\nRESET\nPUSH \"\\e#3\"\nPUSH \"abcde\"\nPUSH \"\\r\\n\\e#4\"\nPUSH \"abcde\"\n  ?screen_cell 0,0 = {0x61} width=1 attrs={} dwl dhl-top fg=rgb(240,240,240) bg=rgb(0,0,0)\n  ?screen_cell 1,0 = {0x61} width=1 attrs={} dwl dhl-bottom fg=rgb(240,240,240) bg=rgb(0,0,0)\n\n!Late change\nRESET\nPUSH \"abcde\"\n  ?screen_cell 0,0 = {0x61} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0)\nPUSH \"\\e#6\"\n  ?screen_cell 0,0 = {0x61} width=1 attrs={} dwl fg=rgb(240,240,240) bg=rgb(0,0,0)\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/68screen_termprops.test",
    "content": "INIT\nWANTSCREEN p\n\nRESET\n  settermprop 1 true\n  settermprop 2 true\n  settermprop 7 1\n\n!Cursor visibility\nPUSH \"\\e[?25h\"\n  settermprop 1 true\nPUSH \"\\e[?25l\"\n  settermprop 1 false\n\n!Title\nPUSH \"\\e]2;Here is my title\\a\"\n  settermprop 4 \"Here is my title\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/90vttest_01-movement-1.test",
    "content": "INIT\nWANTSTATE\nWANTSCREEN\n\nRESET\n\nPUSH \"\\e#8\"\n\nPUSH \"\\e[9;10H\\e[1J\"\nPUSH \"\\e[18;60H\\e[0J\\e[1K\"\nPUSH \"\\e[9;71H\\e[0K\"\n\n$SEQ 10 16: PUSH \"\\e[\\#;10H\\e[1K\\e[\\#;71H\\e[0K\"\n\nPUSH \"\\e[17;30H\\e[2K\"\n\n$SEQ 1 80: PUSH \"\\e[24;\\#f*\\e[1;\\#f*\"\n\nPUSH \"\\e[2;2H\"\n\n$REP 22: PUSH \"+\\e[1D\\eD\"\n\nPUSH \"\\e[23;79H\"\n$REP 22: PUSH \"+\\e[1D\\eM\"\n\nPUSH \"\\e[2;1H\"\n$SEQ 2 23: PUSH \"*\\e[\\#;80H*\\e[10D\\eE\"\n\nPUSH \"\\e[2;10H\\e[42D\\e[2C\"\n$REP 76: PUSH \"+\\e[0C\\e[2D\\e[1C\"\n\nPUSH \"\\e[23;70H\\e[42C\\e[2D\"\n\n$REP 76: PUSH \"+\\e[1D\\e[1C\\e[0D\\b\"\n\nPUSH \"\\e[1;1H\"\nPUSH \"\\e[10A\"\nPUSH \"\\e[1A\"\nPUSH \"\\e[0A\"\nPUSH \"\\e[24;80H\"\nPUSH \"\\e[10B\"\nPUSH \"\\e[1B\"\nPUSH \"\\e[0B\"\nPUSH \"\\e[10;12H\"\n\n$REP 58: PUSH \" \"\nPUSH \"\\e[1B\\e[58D\"\n\n$REP 58: PUSH \" \"\nPUSH \"\\e[1B\\e[58D\"\n\n$REP 58: PUSH \" \"\nPUSH \"\\e[1B\\e[58D\"\n\n$REP 58: PUSH \" \"\nPUSH \"\\e[1B\\e[58D\"\n\n$REP 58: PUSH \" \"\nPUSH \"\\e[1B\\e[58D\"\n\n$REP 58: PUSH \" \"\nPUSH \"\\e[1B\\e[58D\"\n\nPUSH \"\\e[5A\\e[1CThe screen should be cleared,  and have an unbroken bor-\"\nPUSH \"\\e[12;13Hder of *'s and +'s around the edge,   and exactly in the\"\nPUSH \"\\e[13;13Hmiddle  there should be a frame of E's around this  text\"\nPUSH \"\\e[14;13Hwith  one (1) free position around it.    Push <RETURN>\"\n\n# And the result is...\n\n!Output\n            ?screen_row  0 = \"********************************************************************************\"\n            ?screen_row  1 = \"*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*\"\n$SEQ  2  7: ?screen_row \\# = \"*+                                                                            +*\"\n            ?screen_row  8 = \"*+        EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE        +*\"\n            ?screen_row  9 = \"*+        E                                                          E        +*\"\n            ?screen_row 10 = \"*+        E The screen should be cleared,  and have an unbroken bor- E        +*\"\n            ?screen_row 11 = \"*+        E der of *'s and +'s around the edge,   and exactly in the E        +*\"\n            ?screen_row 12 = \"*+        E middle  there should be a frame of E's around this  text E        +*\"\n            ?screen_row 13 = \"*+        E with  one (1) free position around it.    Push <RETURN>  E        +*\"\n            ?screen_row 14 = \"*+        E                                                          E        +*\"\n            ?screen_row 15 = \"*+        EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE        +*\"\n$SEQ 16 21: ?screen_row \\# = \"*+                                                                            +*\"\n            ?screen_row 22 = \"*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*\"\n            ?screen_row 23 = \"********************************************************************************\"\n\n?cursor = 13,67\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/90vttest_01-movement-2.test",
    "content": "INIT\nWANTSTATE\nWANTSCREEN\n\nRESET\n\nPUSH \"\\e[3;21r\"\nPUSH \"\\e[?6h\"\n\nPUSH \"\\e[19;1HA\\e[19;80Ha\\x0a\\e[18;80HaB\\e[19;80HB\\b b\\x0a\\e[19;80HC\\b\\b\\t\\tc\\e[19;2H\\bC\\x0a\\e[19;80H\\x0a\\e[18;1HD\\e[18;80Hd\"\nPUSH \"\\e[19;1HE\\e[19;80He\\x0a\\e[18;80HeF\\e[19;80HF\\b f\\x0a\\e[19;80HG\\b\\b\\t\\tg\\e[19;2H\\bG\\x0a\\e[19;80H\\x0a\\e[18;1HH\\e[18;80Hh\"\nPUSH \"\\e[19;1HI\\e[19;80Hi\\x0a\\e[18;80HiJ\\e[19;80HJ\\b j\\x0a\\e[19;80HK\\b\\b\\t\\tk\\e[19;2H\\bK\\x0a\\e[19;80H\\x0a\\e[18;1HL\\e[18;80Hl\"\nPUSH \"\\e[19;1HM\\e[19;80Hm\\x0a\\e[18;80HmN\\e[19;80HN\\b n\\x0a\\e[19;80HO\\b\\b\\t\\to\\e[19;2H\\bO\\x0a\\e[19;80H\\x0a\\e[18;1HP\\e[18;80Hp\"\nPUSH \"\\e[19;1HQ\\e[19;80Hq\\x0a\\e[18;80HqR\\e[19;80HR\\b r\\x0a\\e[19;80HS\\b\\b\\t\\ts\\e[19;2H\\bS\\x0a\\e[19;80H\\x0a\\e[18;1HT\\e[18;80Ht\"\nPUSH \"\\e[19;1HU\\e[19;80Hu\\x0a\\e[18;80HuV\\e[19;80HV\\b v\\x0a\\e[19;80HW\\b\\b\\t\\tw\\e[19;2H\\bW\\x0a\\e[19;80H\\x0a\\e[18;1HX\\e[18;80Hx\"\nPUSH \"\\e[19;1HY\\e[19;80Hy\\x0a\\e[18;80HyZ\\e[19;80HZ\\b z\\x0a\"\n\n!Output\n\n?screen_row  2 = \"I                                                                              i\"\n?screen_row  3 = \"J                                                                              j\"\n?screen_row  4 = \"K                                                                              k\"\n?screen_row  5 = \"L                                                                              l\"\n?screen_row  6 = \"M                                                                              m\"\n?screen_row  7 = \"N                                                                              n\"\n?screen_row  8 = \"O                                                                              o\"\n?screen_row  9 = \"P                                                                              p\"\n?screen_row 10 = \"Q                                                                              q\"\n?screen_row 11 = \"R                                                                              r\"\n?screen_row 12 = \"S                                                                              s\"\n?screen_row 13 = \"T                                                                              t\"\n?screen_row 14 = \"U                                                                              u\"\n?screen_row 15 = \"V                                                                              v\"\n?screen_row 16 = \"W                                                                              w\"\n?screen_row 17 = \"X                                                                              x\"\n?screen_row 18 = \"Y                                                                              y\"\n?screen_row 19 = \"Z                                                                              z\"\n?screen_row 20 = \"\"\n\n?cursor = 20,79\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/90vttest_01-movement-3.test",
    "content": "# Test of cursor-control characters inside ESC sequences\nINIT\nWANTSTATE\nWANTSCREEN\n\nRESET\n\nPUSH \"A B C D E F G H I\"\nPUSH \"\\x0d\\x0a\"\nPUSH \"A\\e[2\\bCB\\e[2\\bCC\\e[2\\bCD\\e[2\\bCE\\e[2\\bCF\\e[2\\bCG\\e[2\\bCH\\e[2\\bCI\"\nPUSH \"\\x0d\\x0a\"\nPUSH \"A \\e[\\x0d2CB\\e[\\x0d4CC\\e[\\x0d6CD\\e[\\x0d8CE\\e[\\x0d10CF\\e[\\x0d12CG\\e[\\x0d14CH\\e[\\x0d16CI\"\nPUSH \"\\x0d\\x0a\"\nPUSH \"A \\e[1\\x0bAB \\e[1\\x0bAC \\e[1\\x0bAD \\e[1\\x0bAE \\e[1\\x0bAF \\e[1\\x0bAG \\e[1\\x0bAH \\e[1\\x0bAI \\e[1\\x0bA\"\n\n!Output\n\n$SEQ 0 2: ?screen_row \\# = \"A B C D E F G H I\"\n          ?screen_row  3 = \"A B C D E F G H I \"\n\n?cursor = 3,18\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/90vttest_01-movement-4.test",
    "content": "# Test of leading zeroes in ESC sequences\nINIT\nWANTSCREEN\n\nRESET\n\nPUSH \"\\e[00000000004;000000001HT\"\nPUSH \"\\e[00000000004;000000002Hh\"\nPUSH \"\\e[00000000004;000000003Hi\"\nPUSH \"\\e[00000000004;000000004Hs\"\nPUSH \"\\e[00000000004;000000005H \"\nPUSH \"\\e[00000000004;000000006Hi\"\nPUSH \"\\e[00000000004;000000007Hs\"\nPUSH \"\\e[00000000004;000000008H \"\nPUSH \"\\e[00000000004;000000009Ha\"\nPUSH \"\\e[00000000004;0000000010H \"\nPUSH \"\\e[00000000004;0000000011Hc\"\nPUSH \"\\e[00000000004;0000000012Ho\"\nPUSH \"\\e[00000000004;0000000013Hr\"\nPUSH \"\\e[00000000004;0000000014Hr\"\nPUSH \"\\e[00000000004;0000000015He\"\nPUSH \"\\e[00000000004;0000000016Hc\"\nPUSH \"\\e[00000000004;0000000017Ht\"\nPUSH \"\\e[00000000004;0000000018H \"\nPUSH \"\\e[00000000004;0000000019Hs\"\nPUSH \"\\e[00000000004;0000000020He\"\nPUSH \"\\e[00000000004;0000000021Hn\"\nPUSH \"\\e[00000000004;0000000022Ht\"\nPUSH \"\\e[00000000004;0000000023He\"\nPUSH \"\\e[00000000004;0000000024Hn\"\nPUSH \"\\e[00000000004;0000000025Hc\"\nPUSH \"\\e[00000000004;0000000026He\"\n\n!Output\n\n?screen_row 3 = \"This is a correct sentence\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/90vttest_02-screen-1.test",
    "content": "# Test of WRAP AROUND mode setting.\nINIT\nWANTSCREEN\n\nRESET\n\nPUSH \"\\e[?7h\"\n$REP 170: PUSH \"*\"\n\nPUSH \"\\e[?7l\\e[3;1H\"\n$REP 177: PUSH \"*\"\n\nPUSH \"\\e[?7h\\e[5;1HOK\"\n\n!Output\n$SEQ 0 2: ?screen_row \\# = \"********************************************************************************\"\n          ?screen_row  3 = \"\"\n          ?screen_row  4 = \"OK\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/90vttest_02-screen-2.test",
    "content": "# TAB setting/resetting\nINIT\nWANTSTATE\nWANTSCREEN\n\nRESET\n\nPUSH \"\\e[2J\\e[3g\"\n\nPUSH \"\\e[1;1H\"\n$REP 26: PUSH \"\\e[3C\\eH\"\n\nPUSH \"\\e[1;4H\"\n$REP 13: PUSH \"\\e[0g\\e[6C\"\n\nPUSH \"\\e[1;7H\"\nPUSH \"\\e[1g\\e[2g\"\n\nPUSH \"\\e[1;1H\"\n$REP 13: PUSH \"\\t*\"\n\nPUSH \"\\e[2;2H\"\n$REP 13: PUSH \"     *\"\n\n!Output\n?screen_row 0 = \"      *     *     *     *     *     *     *     *     *     *     *     *     *\"\n?screen_row 1 = \"      *     *     *     *     *     *     *     *     *     *     *     *     *\"\n\n?cursor = 1,79\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/90vttest_02-screen-3.test",
    "content": "# Origin mode\nINIT\nWANTSCREEN\n\nRESET\n\nPUSH \"\\e[?6h\"\nPUSH \"\\e[23;24r\"\nPUSH \"\\n\"\nPUSH \"Bottom\"\nPUSH \"\\e[1;1H\"\nPUSH \"Above\"\n\n!Output\n?screen_row 22 = \"Above\"\n?screen_row 23 = \"Bottom\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/90vttest_02-screen-4.test",
    "content": "# Origin mode (2)\nINIT\nWANTSCREEN\n\nRESET\n\nPUSH \"\\e[?6l\"\nPUSH \"\\e[23;24r\"\nPUSH \"\\e[24;1H\"\nPUSH \"Bottom\"\nPUSH \"\\e[1;1H\"\nPUSH \"Top\"\n\n!Output\n?screen_row 23 = \"Bottom\"\n?screen_row 0  = \"Top\"\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/92lp1640917.test",
    "content": "INIT\nWANTSTATE \n\n!Mouse reporting should not break by idempotent DECSM 1002\nPUSH \"\\e[?1002h\"\nMOUSEMOVE 0,0 0\nMOUSEBTN d 1 0\n  output \"\\e[M\\x20\\x21\\x21\"\nMOUSEMOVE 1,0 0\n  output \"\\e[M\\x40\\x21\\x22\"\nPUSH \"\\e[?1002h\"\nMOUSEMOVE 2,0 0\n  output \"\\e[M\\x40\\x21\\x23\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/harness.c",
    "content": "#include \"vterm.h\"\n#include \"../src/vterm_internal.h\" // We pull in some internal bits too\n\n#include <stdio.h>\n#include <string.h>\n\n#define streq(a,b) (!strcmp(a,b))\n#define strstartswith(a,b) (!strncmp(a,b,strlen(b)))\n\nstatic size_t inplace_hex2bytes(char *s)\n{\n  char *inpos = s, *outpos = s;\n\n  while(*inpos) {\n    unsigned int ch;\n    sscanf(inpos, \"%2x\", &ch);\n    *outpos = ch;\n    outpos += 1; inpos += 2;\n  }\n\n  return outpos - s;\n}\n\nstatic VTermModifier strpe_modifiers(char **strp)\n{\n  VTermModifier state = 0;\n\n  while((*strp)[0]) {\n    switch(((*strp)++)[0]) {\n      case 'S': state |= VTERM_MOD_SHIFT; break;\n      case 'C': state |= VTERM_MOD_CTRL;  break;\n      case 'A': state |= VTERM_MOD_ALT;   break;\n      default: return state;\n    }\n  }\n\n  return state;\n}\n\nstatic VTermKey strp_key(char *str)\n{\n  static struct {\n    char *name;\n    VTermKey key;\n  } keys[] = {\n    { \"Up\",    VTERM_KEY_UP },\n    { \"Tab\",   VTERM_KEY_TAB },\n    { \"Enter\", VTERM_KEY_ENTER },\n    { \"KP0\",   VTERM_KEY_KP_0 },\n    { \"F1\",    VTERM_KEY_FUNCTION(1) },\n    { NULL,    VTERM_KEY_NONE },\n  };\n\n  for(int i = 0; keys[i].name; i++) {\n    if(streq(str, keys[i].name))\n      return keys[i].key;\n  }\n\n  return VTERM_KEY_NONE;\n}\n\nstatic void print_color(const VTermColor *col)\n{\n  if (VTERM_COLOR_IS_RGB(col)) {\n    printf(\"rgb(%d,%d,%d\", col->rgb.red, col->rgb.green, col->rgb.blue);\n  }\n  else if (VTERM_COLOR_IS_INDEXED(col)) {\n    printf(\"idx(%d\", col->indexed.idx);\n  }\n  else {\n    printf(\"invalid(%d\", col->type);\n  }\n  if (VTERM_COLOR_IS_DEFAULT_FG(col)) {\n    printf(\",is_default_fg\");\n  }\n  if (VTERM_COLOR_IS_DEFAULT_BG(col)) {\n    printf(\",is_default_bg\");\n  }\n  printf(\")\");\n}\n\nstatic VTerm *vt;\nstatic VTermState *state;\nstatic VTermScreen *screen;\n\nstatic VTermEncodingInstance encoding;\n\nstatic void term_output(const char *s, size_t len, void *user)\n{\n  printf(\"output \");\n  for(int i = 0; i < len; i++)\n    printf(\"%x%s\", (unsigned char)s[i], i < len-1 ? \",\" : \"\\n\");\n}\n\nstatic int parser_text(const char bytes[], size_t len, void *user)\n{\n  printf(\"text \");\n  int i;\n  for(i = 0; i < len; i++) {\n    unsigned char b = bytes[i];\n    if(b < 0x20 || b == 0x7f || (b >= 0x80 && b < 0xa0))\n      break;\n    printf(i ? \",%x\" : \"%x\", b);\n  }\n  printf(\"\\n\");\n\n  return i;\n}\n\nstatic int parser_control(unsigned char control, void *user)\n{\n  printf(\"control %02x\\n\", control);\n\n  return 1;\n}\n\nstatic int parser_escape(const char bytes[], size_t len, void *user)\n{\n  if(bytes[0] >= 0x20 && bytes[0] < 0x30) {\n    if(len < 2)\n      return -1;\n    len = 2;\n  }\n  else {\n    len = 1;\n  }\n\n  printf(\"escape \");\n  for(int i = 0; i < len; i++)\n    printf(\"%02x\", bytes[i]);\n  printf(\"\\n\");\n\n  return len;\n}\n\nstatic int parser_csi(const char *leader, const long args[], int argcount, const char *intermed, char command, void *user)\n{\n  printf(\"csi %02x\", command);\n\n  if(leader && leader[0]) {\n    printf(\" L=\");\n    for(int i = 0; leader[i]; i++)\n      printf(\"%02x\", leader[i]);\n  }\n\n  for(int i = 0; i < argcount; i++) {\n    char sep = i ? ',' : ' ';\n\n    if(args[i] == CSI_ARG_MISSING)\n      printf(\"%c*\", sep);\n    else\n      printf(\"%c%ld%s\", sep, CSI_ARG(args[i]), CSI_ARG_HAS_MORE(args[i]) ? \"+\" : \"\");\n  }\n\n  if(intermed && intermed[0]) {\n    printf(\" I=\");\n    for(int i = 0; intermed[i]; i++)\n      printf(\"%02x\", intermed[i]);\n  }\n\n  printf(\"\\n\");\n\n  return 1;\n}\n\nstatic int parser_osc(const char *command, size_t cmdlen, void *user)\n{\n  printf(\"osc \");\n  for(int i = 0; i < cmdlen; i++)\n    printf(\"%02x\", command[i]);\n  printf(\"\\n\");\n\n  return 1;\n}\n\nstatic int parser_dcs(const char *command, size_t cmdlen, void *user)\n{\n  printf(\"dcs \");\n  for(int i = 0; i < cmdlen; i++)\n    printf(\"%02x\", command[i]);\n  printf(\"\\n\");\n\n  return 1;\n}\n\nstatic VTermParserCallbacks parser_cbs = {\n  .text    = parser_text,\n  .control = parser_control,\n  .escape  = parser_escape,\n  .csi     = parser_csi,\n  .osc     = parser_osc,\n  .dcs     = parser_dcs,\n};\n\n/* These callbacks are shared by State and Screen */\n\nstatic int want_movecursor = 0;\nstatic VTermPos state_pos;\nstatic int movecursor(VTermPos pos, VTermPos oldpos, int visible, void *user)\n{\n  state_pos = pos;\n\n  if(want_movecursor)\n    printf(\"movecursor %d,%d\\n\", pos.row, pos.col);\n\n  return 1;\n}\n\nstatic int want_scrollrect = 0;\nstatic int scrollrect(VTermRect rect, int downward, int rightward, void *user)\n{\n  if(!want_scrollrect)\n    return 0;\n\n  printf(\"scrollrect %d..%d,%d..%d => %+d,%+d\\n\",\n      rect.start_row, rect.end_row, rect.start_col, rect.end_col,\n      downward, rightward);\n\n  return 1;\n}\n\nstatic int want_moverect = 0;\nstatic int moverect(VTermRect dest, VTermRect src, void *user)\n{\n  if(!want_moverect)\n    return 0;\n\n  printf(\"moverect %d..%d,%d..%d -> %d..%d,%d..%d\\n\",\n      src.start_row,  src.end_row,  src.start_col,  src.end_col,\n      dest.start_row, dest.end_row, dest.start_col, dest.end_col);\n\n  return 1;\n}\n\nstatic int want_settermprop = 0;\nstatic int settermprop(VTermProp prop, VTermValue *val, void *user)\n{\n  if(!want_settermprop)\n    return 1;\n\n  VTermValueType type = vterm_get_prop_type(prop);\n  switch(type) {\n  case VTERM_VALUETYPE_BOOL:\n    printf(\"settermprop %d %s\\n\", prop, val->boolean ? \"true\" : \"false\");\n    return 1;\n  case VTERM_VALUETYPE_INT:\n    printf(\"settermprop %d %d\\n\", prop, val->number);\n    return 1;\n  case VTERM_VALUETYPE_STRING:\n    printf(\"settermprop %d \\\"%s\\\"\\n\", prop, val->string);\n    return 1;\n  case VTERM_VALUETYPE_COLOR:\n    printf(\"settermprop %d \", prop);\n    print_color(&val->color);\n    printf(\"\\n\");\n    return 1;\n\n  case VTERM_N_VALUETYPES:\n    return 0;\n  }\n\n  return 0;\n}\n\n/* These callbacks are for State */\n\nstatic int want_state_putglyph = 0;\nstatic int state_putglyph(VTermGlyphInfo *info, VTermPos pos, void *user)\n{\n  if(!want_state_putglyph)\n    return 1;\n\n  printf(\"putglyph \");\n  for(int i = 0; i < VTERM_MAX_CHARS_PER_CELL && info->chars[i]; i++)\n    printf(i ? \",%x\" : \"%x\", info->chars[i]);\n  printf(\" %d %d,%d\", info->width, pos.row, pos.col);\n  if(info->protected_cell)\n    printf(\" prot\");\n  if(info->dwl)\n    printf(\" dwl\");\n  if(info->dhl)\n    printf(\" dhl-%s\", info->dhl == 1 ? \"top\" : info->dhl == 2 ? \"bottom\" : \"?\" );\n  printf(\"\\n\");\n\n  return 1;\n}\n\nstatic int want_state_erase = 0;\nstatic int state_erase(VTermRect rect, int selective, void *user)\n{\n  if(!want_state_erase)\n    return 1;\n\n  printf(\"erase %d..%d,%d..%d%s\\n\",\n      rect.start_row, rect.end_row, rect.start_col, rect.end_col,\n      selective ? \" selective\" : \"\");\n\n  return 1;\n}\n\nstatic struct {\n  int bold;\n  int underline;\n  int italic;\n  int blink;\n  int reverse;\n  int strike;\n  int font;\n  VTermColor foreground;\n  VTermColor background;\n} state_pen;\nstatic int state_setpenattr(VTermAttr attr, VTermValue *val, void *user)\n{\n  switch(attr) {\n  case VTERM_ATTR_BOLD:\n    state_pen.bold = val->boolean;\n    break;\n  case VTERM_ATTR_UNDERLINE:\n    state_pen.underline = val->number;\n    break;\n  case VTERM_ATTR_ITALIC:\n    state_pen.italic = val->boolean;\n    break;\n  case VTERM_ATTR_BLINK:\n    state_pen.blink = val->boolean;\n    break;\n  case VTERM_ATTR_REVERSE:\n    state_pen.reverse = val->boolean;\n    break;\n  case VTERM_ATTR_STRIKE:\n    state_pen.strike = val->boolean;\n    break;\n  case VTERM_ATTR_FONT:\n    state_pen.font = val->number;\n    break;\n  case VTERM_ATTR_FOREGROUND:\n    state_pen.foreground = val->color;\n    break;\n  case VTERM_ATTR_BACKGROUND:\n    state_pen.background = val->color;\n    break;\n\n  case VTERM_N_ATTRS:\n    return 0;\n  }\n\n  return 1;\n}\n\nstatic int state_setlineinfo(int row, const VTermLineInfo *newinfo, const VTermLineInfo *oldinfo, void *user)\n{\n  return 1;\n}\n\nVTermStateCallbacks state_cbs = {\n  .putglyph    = state_putglyph,\n  .movecursor  = movecursor,\n  .scrollrect  = scrollrect,\n  .moverect    = moverect,\n  .erase       = state_erase,\n  .setpenattr  = state_setpenattr,\n  .settermprop = settermprop,\n  .setlineinfo = state_setlineinfo,\n};\n\nstatic int want_screen_damage = 0;\nstatic int want_screen_damage_cells = 0;\nstatic int screen_damage(VTermRect rect, void *user)\n{\n  if(!want_screen_damage)\n    return 1;\n\n  printf(\"damage %d..%d,%d..%d\",\n      rect.start_row, rect.end_row, rect.start_col, rect.end_col);\n\n  if(want_screen_damage_cells) {\n    bool equals = false;\n\n    for(int row = rect.start_row; row < rect.end_row; row++) {\n      int eol = rect.end_col;\n      while(eol > rect.start_col) {\n        VTermScreenCell cell;\n        vterm_screen_get_cell(screen, (VTermPos) { .row = row, .col = eol-1 }, &cell);\n        if(cell.chars[0])\n          break;\n\n        eol--;\n      }\n\n      if(eol == rect.start_col)\n        break;\n\n      if(!equals)\n        printf(\" =\"), equals = true;\n\n      printf(\" %d<\", row);\n      for(int col = rect.start_col; col < eol; col++) {\n        VTermScreenCell cell;\n        vterm_screen_get_cell(screen, (VTermPos) { .row = row, .col = col }, &cell);\n        printf(col == rect.start_col ? \"%02X\" : \" %02X\", cell.chars[0]);\n      }\n      printf(\">\");\n    }\n  }\n\n  printf(\"\\n\");\n\n  return 1;\n}\n\nstatic int want_screen_scrollback = 0;\nstatic int screen_sb_pushline(int cols, const VTermScreenCell *cells, void *user)\n{\n  if(!want_screen_scrollback)\n    return 1;\n\n  int eol = cols;\n  while(eol && !cells[eol-1].chars[0])\n    eol--;\n\n  printf(\"sb_pushline %d =\", cols);\n  for(int c = 0; c < eol; c++)\n    printf(\" %02X\", cells[c].chars[0]);\n  printf(\"\\n\");\n\n  return 1;\n}\n\nstatic int screen_sb_popline(int cols, VTermScreenCell *cells, void *user)\n{\n  if(!want_screen_scrollback)\n    return 0;\n\n  // All lines of scrollback contain \"ABCDE\"\n  for(int col = 0; col < cols; col++) {\n    if(col < 5)\n      cells[col].chars[0] = 'A' + col;\n    else\n      cells[col].chars[0] = 0;\n\n    cells[col].width = 1;\n  }\n\n  printf(\"sb_popline %d\\n\", cols);\n  return 1;\n}\n\nVTermScreenCallbacks screen_cbs = {\n  .damage      = screen_damage,\n  .moverect    = moverect,\n  .movecursor  = movecursor,\n  .settermprop = settermprop,\n  .sb_pushline = screen_sb_pushline,\n  .sb_popline  = screen_sb_popline,\n};\n\nint main(int argc, char **argv)\n{\n  char line[1024] = {0};\n  int flag;\n\n  int err;\n\n  setvbuf(stdout, NULL, _IONBF, 0);\n\n  while(fgets(line, sizeof line, stdin)) {\n    err = 0;\n\n    char *nl;\n    if((nl = strchr(line, '\\n')))\n      *nl = '\\0';\n\n    if(streq(line, \"INIT\")) {\n      if(!vt)\n        vt = vterm_new(25, 80);\n\n      vterm_output_set_callback(vt, term_output, NULL);\n    }\n\n    else if(streq(line, \"WANTPARSER\")) {\n      vterm_parser_set_callbacks(vt, &parser_cbs, NULL);\n    }\n\n    else if(strstartswith(line, \"WANTSTATE\") && (line[9] == '\\0' || line[9] == ' ')) {\n      if(!state) {\n        state = vterm_obtain_state(vt);\n        vterm_state_set_callbacks(state, &state_cbs, NULL);\n        vterm_state_set_bold_highbright(state, 1);\n        vterm_state_reset(state, 1);\n      }\n\n      int i = 9;\n      int sense = 1;\n      while(line[i] == ' ')\n        i++;\n      for( ; line[i]; i++)\n        switch(line[i]) {\n        case '+':\n          sense = 1;\n          break;\n        case '-':\n          sense = 0;\n          break;\n        case 'g':\n          want_state_putglyph = sense;\n          break;\n        case 's':\n          want_scrollrect = sense;\n          break;\n        case 'm':\n          want_moverect = sense;\n          break;\n        case 'e':\n          want_state_erase = sense;\n          break;\n        case 'p':\n          want_settermprop = sense;\n          break;\n        case 'f':\n          vterm_state_set_unrecognised_fallbacks(state, sense ? &parser_cbs : NULL, NULL);\n          break;\n        default:\n          fprintf(stderr, \"Unrecognised WANTSTATE flag '%c'\\n\", line[i]);\n        }\n    }\n\n    else if(strstartswith(line, \"WANTSCREEN\") && (line[10] == '\\0' || line[10] == ' ')) {\n      if(!screen)\n        screen = vterm_obtain_screen(vt);\n      vterm_screen_enable_altscreen(screen, 1);\n      vterm_screen_set_callbacks(screen, &screen_cbs, NULL);\n\n      int i = 10;\n      int sense = 1;\n      while(line[i] == ' ')\n        i++;\n      for( ; line[i]; i++)\n        switch(line[i]) {\n        case '-':\n          sense = 0;\n          break;\n        case 'd':\n          want_screen_damage = sense;\n          break;\n        case 'D':\n          want_screen_damage = sense;\n          want_screen_damage_cells = sense;\n          break;\n        case 'm':\n          want_moverect = sense;\n          break;\n        case 'c':\n          want_movecursor = sense;\n          break;\n        case 'p':\n          want_settermprop = 1;\n          break;\n        case 'b':\n          want_screen_scrollback = sense;\n          break;\n        default:\n          fprintf(stderr, \"Unrecognised WANTSCREEN flag '%c'\\n\", line[i]);\n        }\n    }\n\n    else if(sscanf(line, \"UTF8 %d\", &flag)) {\n      vterm_set_utf8(vt, flag);\n    }\n\n    else if(streq(line, \"RESET\")) {\n      if(state) {\n        vterm_state_reset(state, 1);\n        vterm_state_get_cursorpos(state, &state_pos);\n      }\n      if(screen) {\n        vterm_screen_reset(screen, 1);\n      }\n    }\n\n    else if(strstartswith(line, \"RESIZE \")) {\n      int rows, cols;\n      char *linep = line + 7;\n      while(linep[0] == ' ')\n        linep++;\n      sscanf(linep, \"%d, %d\", &rows, &cols);\n      vterm_set_size(vt, rows, cols);\n    }\n\n    else if(strstartswith(line, \"PUSH \")) {\n      char *bytes = line + 5;\n      size_t len = inplace_hex2bytes(bytes);\n      size_t written = vterm_input_write(vt, bytes, len);\n      if(written < len)\n        fprintf(stderr, \"! short write\\n\");\n    }\n\n    else if(streq(line, \"WANTENCODING\")) {\n      /* This isn't really external API but it's hard to get this out any\n       * other way\n       */\n      encoding.enc = vterm_lookup_encoding(ENC_UTF8, 'u');\n      if(encoding.enc->init)\n        (*encoding.enc->init)(encoding.enc, encoding.data);\n    }\n\n    else if(strstartswith(line, \"ENCIN \")) {\n      char *bytes = line + 6;\n      size_t len = inplace_hex2bytes(bytes);\n\n      uint32_t cp[len];\n      int cpi = 0;\n      size_t pos = 0;\n\n      (*encoding.enc->decode)(encoding.enc, encoding.data,\n          cp, &cpi, len, bytes, &pos, len);\n\n      if(cpi > 0) {\n        printf(\"encout \");\n        for(int i = 0; i < cpi; i++) {\n          printf(i ? \",%x\" : \"%x\", cp[i]);\n        }\n        printf(\"\\n\");\n      }\n    }\n\n    else if(strstartswith(line, \"INCHAR \")) {\n      char *linep = line + 7;\n      unsigned int c = 0;\n      while(linep[0] == ' ')\n        linep++;\n      VTermModifier mod = strpe_modifiers(&linep);\n      sscanf(linep, \" %x\", &c);\n\n      vterm_keyboard_unichar(vt, c, mod);\n    }\n\n    else if(strstartswith(line, \"INKEY \")) {\n      char *linep = line + 6;\n      while(linep[0] == ' ')\n        linep++;\n      VTermModifier mod = strpe_modifiers(&linep);\n      while(linep[0] == ' ')\n        linep++;\n      VTermKey key = strp_key(linep);\n\n      vterm_keyboard_key(vt, key, mod);\n    }\n\n    else if(strstartswith(line, \"PASTE \")) {\n      char *linep = line + 6;\n      if(streq(linep, \"START\"))\n        vterm_keyboard_start_paste(vt);\n      else if(streq(linep, \"END\"))\n        vterm_keyboard_end_paste(vt);\n      else\n        goto abort_line;\n    }\n\n    else if(strstartswith(line, \"FOCUS \")) {\n      char *linep = line + 6;\n      if(streq(linep, \"IN\"))\n        vterm_state_focus_in(state);\n      else if(streq(linep, \"OUT\"))\n        vterm_state_focus_out(state);\n      else\n        goto abort_line;\n    }\n\n    else if(strstartswith(line, \"MOUSEMOVE \")) {\n      char *linep = line + 10;\n      int row, col, len;\n      while(linep[0] == ' ')\n        linep++;\n      sscanf(linep, \"%d,%d%n\", &row, &col, &len);\n      linep += len;\n      while(linep[0] == ' ')\n        linep++;\n      VTermModifier mod = strpe_modifiers(&linep);\n      vterm_mouse_move(vt, row, col, mod);\n    }\n\n    else if(strstartswith(line, \"MOUSEBTN \")) {\n      char *linep = line + 9;\n      char press;\n      int button, len;\n      while(linep[0] == ' ')\n        linep++;\n      sscanf(linep, \"%c %d%n\", &press, &button, &len);\n      linep += len;\n      while(linep[0] == ' ')\n        linep++;\n      VTermModifier mod = strpe_modifiers(&linep);\n      vterm_mouse_button(vt, button, (press == 'd' || press == 'D'), mod);\n    }\n\n    else if(strstartswith(line, \"DAMAGEMERGE \")) {\n      char *linep = line + 12;\n      while(linep[0] == ' ')\n        linep++;\n      if(streq(linep, \"CELL\"))\n        vterm_screen_set_damage_merge(screen, VTERM_DAMAGE_CELL);\n      else if(streq(linep, \"ROW\"))\n        vterm_screen_set_damage_merge(screen, VTERM_DAMAGE_ROW);\n      else if(streq(linep, \"SCREEN\"))\n        vterm_screen_set_damage_merge(screen, VTERM_DAMAGE_SCREEN);\n      else if(streq(linep, \"SCROLL\"))\n        vterm_screen_set_damage_merge(screen, VTERM_DAMAGE_SCROLL);\n    }\n\n    else if(strstartswith(line, \"DAMAGEFLUSH\")) {\n      vterm_screen_flush_damage(screen);\n    }\n\n    else if(line[0] == '?') {\n      if(streq(line, \"?cursor\")) {\n        VTermPos pos;\n        vterm_state_get_cursorpos(state, &pos);\n        if(pos.row != state_pos.row)\n          printf(\"! row mismatch: state=%d,%d event=%d,%d\\n\",\n              pos.row, pos.col, state_pos.row, state_pos.col);\n        else if(pos.col != state_pos.col)\n          printf(\"! col mismatch: state=%d,%d event=%d,%d\\n\",\n              pos.row, pos.col, state_pos.row, state_pos.col);\n        else\n          printf(\"%d,%d\\n\", state_pos.row, state_pos.col);\n      }\n      else if(strstartswith(line, \"?pen \")) {\n        char *linep = line + 5;\n        while(linep[0] == ' ')\n          linep++;\n\n        VTermValue val;\n#define BOOLSTR(v) ((v) ? \"on\" : \"off\")\n\n        if(streq(linep, \"bold\")) {\n          vterm_state_get_penattr(state, VTERM_ATTR_BOLD, &val);\n          if(val.boolean != state_pen.bold)\n            printf(\"! pen bold mismatch; state=%s, event=%s\\n\",\n                BOOLSTR(val.boolean), BOOLSTR(state_pen.bold));\n          else\n            printf(\"%s\\n\", BOOLSTR(state_pen.bold));\n        }\n        else if(streq(linep, \"underline\")) {\n          vterm_state_get_penattr(state, VTERM_ATTR_UNDERLINE, &val);\n          if(val.boolean != state_pen.underline)\n            printf(\"! pen underline mismatch; state=%d, event=%d\\n\",\n                val.boolean, state_pen.underline);\n          else\n            printf(\"%d\\n\", state_pen.underline);\n        }\n        else if(streq(linep, \"italic\")) {\n          vterm_state_get_penattr(state, VTERM_ATTR_ITALIC, &val);\n          if(val.boolean != state_pen.italic)\n            printf(\"! pen italic mismatch; state=%s, event=%s\\n\",\n                BOOLSTR(val.boolean), BOOLSTR(state_pen.italic));\n          else\n            printf(\"%s\\n\", BOOLSTR(state_pen.italic));\n        }\n        else if(streq(linep, \"blink\")) {\n          vterm_state_get_penattr(state, VTERM_ATTR_BLINK, &val);\n          if(val.boolean != state_pen.blink)\n            printf(\"! pen blink mismatch; state=%s, event=%s\\n\",\n                BOOLSTR(val.boolean), BOOLSTR(state_pen.blink));\n          else\n            printf(\"%s\\n\", BOOLSTR(state_pen.blink));\n        }\n        else if(streq(linep, \"reverse\")) {\n          vterm_state_get_penattr(state, VTERM_ATTR_REVERSE, &val);\n          if(val.boolean != state_pen.reverse)\n            printf(\"! pen reverse mismatch; state=%s, event=%s\\n\",\n                BOOLSTR(val.boolean), BOOLSTR(state_pen.reverse));\n          else\n            printf(\"%s\\n\", BOOLSTR(state_pen.reverse));\n        }\n        else if(streq(linep, \"font\")) {\n          vterm_state_get_penattr(state, VTERM_ATTR_FONT, &val);\n          if(val.boolean != state_pen.font)\n            printf(\"! pen font mismatch; state=%d, event=%d\\n\",\n                val.boolean, state_pen.font);\n          else\n            printf(\"%d\\n\", state_pen.font);\n        }\n        else if(streq(linep, \"foreground\")) {\n          print_color(&state_pen.foreground);\n          printf(\"\\n\");\n        }\n        else if(streq(linep, \"background\")) {\n          print_color(&state_pen.background);\n          printf(\"\\n\");\n        }\n        else\n          printf(\"?\\n\");\n      }\n      else if(strstartswith(line, \"?screen_chars \")) {\n        char *linep = line + 13;\n        VTermRect rect;\n        size_t len;\n        while(linep[0] == ' ')\n          linep++;\n        if(sscanf(linep, \"%d,%d,%d,%d\", &rect.start_row, &rect.start_col, &rect.end_row, &rect.end_col) < 4) {\n          printf(\"! screen_chars unrecognised input\\n\");\n          goto abort_line;\n        }\n        len = vterm_screen_get_chars(screen, NULL, 0, rect);\n        if(len == (size_t)-1)\n          printf(\"! screen_chars error\\n\");\n        else if(len == 0)\n          printf(\"\\n\");\n        else {\n          uint32_t *chars = malloc(sizeof(uint32_t) * len);\n          vterm_screen_get_chars(screen, chars, len, rect);\n          for(size_t i = 0; i < len; i++) {\n            printf(\"0x%02x%s\", chars[i], i < len-1 ? \",\" : \"\\n\");\n          }\n          free(chars);\n        }\n      }\n      else if(strstartswith(line, \"?screen_text \")) {\n        char *linep = line + 12;\n        VTermRect rect;\n        size_t len;\n        while(linep[0] == ' ')\n          linep++;\n        if(sscanf(linep, \"%d,%d,%d,%d\", &rect.start_row, &rect.start_col, &rect.end_row, &rect.end_col) < 4) {\n          printf(\"! screen_text unrecognised input\\n\");\n          goto abort_line;\n        }\n        len = vterm_screen_get_text(screen, NULL, 0, rect);\n        if(len == (size_t)-1)\n          printf(\"! screen_text error\\n\");\n        else if(len == 0)\n          printf(\"\\n\");\n        else {\n          /* Put an overwrite guard at both ends of the buffer */\n          unsigned char *buffer = malloc(len + 4);\n          unsigned char *text = buffer + 2;\n          text[-2] = 0x55; text[-1] = 0xAA;\n          text[len] = 0x55; text[len+1] = 0xAA;\n\n          vterm_screen_get_text(screen, (char *)text, len, rect);\n\n          if(text[-2] != 0x55 || text[-1] != 0xAA)\n            printf(\"! screen_get_text buffer overrun left [%02x,%02x]\\n\", text[-2], text[-1]);\n          else if(text[len] != 0x55 || text[len+1] != 0xAA)\n            printf(\"! screen_get_text buffer overrun right [%02x,%02x]\\n\", text[len], text[len+1]);\n          else\n            for(size_t i = 0; i < len; i++) {\n              printf(\"0x%02x%s\", text[i], i < len-1 ? \",\" : \"\\n\");\n            }\n\n          free(buffer);\n        }\n      }\n      else if(strstartswith(line, \"?screen_cell \")) {\n        char *linep = line + 12;\n        VTermPos pos;\n        while(linep[0] == ' ')\n          linep++;\n        if(sscanf(linep, \"%d,%d\\n\", &pos.row, &pos.col) < 2) {\n          printf(\"! screen_cell unrecognised input\\n\");\n          goto abort_line;\n        }\n        VTermScreenCell cell;\n        if(!vterm_screen_get_cell(screen, pos, &cell))\n          goto abort_line;\n        printf(\"{\");\n        for(int i = 0; i < VTERM_MAX_CHARS_PER_CELL && cell.chars[i]; i++) {\n          printf(\"%s0x%x\", i ? \",\" : \"\", cell.chars[i]);\n        }\n        printf(\"} width=%d attrs={\", cell.width);\n        if(cell.attrs.bold)      printf(\"B\");\n        if(cell.attrs.underline) printf(\"U%d\", cell.attrs.underline);\n        if(cell.attrs.italic)    printf(\"I\");\n        if(cell.attrs.blink)     printf(\"K\");\n        if(cell.attrs.reverse)   printf(\"R\");\n        if(cell.attrs.font)      printf(\"F%d\", cell.attrs.font);\n        printf(\"} \");\n        if(cell.attrs.dwl)       printf(\"dwl \");\n        if(cell.attrs.dhl)       printf(\"dhl-%s \", cell.attrs.dhl == 2 ? \"bottom\" : \"top\");\n        printf(\"fg=\");\n        vterm_screen_convert_color_to_rgb(screen, &cell.fg);\n        print_color(&cell.fg);\n        printf(\" bg=\");\n        vterm_screen_convert_color_to_rgb(screen, &cell.bg);\n        print_color(&cell.bg);\n        printf(\"\\n\");\n      }\n      else if(strstartswith(line, \"?screen_eol \")) {\n        char *linep = line + 12;\n        while(linep[0] == ' ')\n          linep++;\n        VTermPos pos;\n        if(sscanf(linep, \"%d,%d\\n\", &pos.row, &pos.col) < 2) {\n          printf(\"! screen_eol unrecognised input\\n\");\n          goto abort_line;\n        }\n        printf(\"%d\\n\", vterm_screen_is_eol(screen, pos));\n      }\n      else if(strstartswith(line, \"?screen_attrs_extent \")) {\n        char *linep = line + 21;\n        while(linep[0] == ' ')\n          linep++;\n        VTermPos pos;\n        if(sscanf(linep, \"%d,%d\\n\", &pos.row, &pos.col) < 2) {\n          printf(\"! screen_attrs_extent unrecognised input\\n\");\n          goto abort_line;\n        }\n        VTermRect rect = {\n          .start_col = 0,\n          .end_col   = -1,\n        };\n        if(!vterm_screen_get_attrs_extent(screen, &rect, pos, ~0)) {\n          printf(\"! screen_attrs_extent failed\\n\");\n          goto abort_line;\n        }\n        printf(\"%d,%d-%d,%d\\n\", rect.start_row, rect.start_col, rect.end_row, rect.end_col);\n      }\n      else\n        printf(\"?\\n\");\n\n      memset(line, 0, sizeof line);\n      continue;\n    }\n\n    else\n      abort_line: err = 1;\n\n    size_t outlen = vterm_output_get_buffer_current(vt);\n    if(outlen > 0) {\n      char outbuff[outlen];\n      vterm_output_read(vt, outbuff, outlen);\n\n      term_output(outbuff, outlen, NULL);\n    }\n\n    printf(err ? \"?\\n\" : \"DONE\\n\");\n  }\n\n  vterm_free(vt);\n\n  return 0;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/t/run-test.pl",
    "content": "#!/usr/bin/perl\n\nuse strict;\nuse warnings;\nuse Getopt::Long;\nuse IO::Handle;\nuse IPC::Open2 qw( open2 );\nuse POSIX qw( WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG );\n\nmy $VALGRIND = 0;\nmy $EXECUTABLE = \"t/.libs/harness\";\nGetOptions(\n   'valgrind|v+' => \\$VALGRIND,\n   'executable|e=s' => \\$EXECUTABLE\n) or exit 1;\n\nmy ( $hin, $hout, $hpid );\n{\n   local $ENV{LD_LIBRARY_PATH} = \".libs\";\n   my @command = $EXECUTABLE;\n   unshift @command, \"valgrind\", \"--quiet\", \"--error-exitcode=126\" if $VALGRIND;\n\n   $hpid = open2 $hout, $hin, @command or die \"Cannot open2 harness - $!\";\n}\n\nmy $exitcode = 0;\n\nmy $command;\nmy @expect;\n\nsub do_onetest\n{\n   $hin->print( \"$command\\n\" );\n   undef $command;\n\n   my $fail_printed = 0;\n\n   while( my $outline = <$hout> ) {\n      last if $outline eq \"DONE\\n\" or $outline eq \"?\\n\";\n\n      chomp $outline;\n\n      if( !@expect ) {\n         print \"# Test failed\\n\" unless $fail_printed++;\n         print \"#    expected nothing more\\n\" .\n               \"#   Actual:   $outline\\n\";\n         next;\n      }\n\n      my $expectation = shift @expect;\n\n      next if $expectation eq $outline;\n\n      print \"# Test failed\\n\" unless $fail_printed++;\n      print \"#   Expected: $expectation\\n\" .\n            \"#   Actual:   $outline\\n\";\n   }\n\n   if( @expect ) {\n      print \"# Test failed\\n\" unless $fail_printed++;\n      print \"#   Expected: $_\\n\" .\n            \"#    didn't happen\\n\" for @expect;\n   }\n\n   $exitcode = 1 if $fail_printed;\n}\n\nsub do_line\n{\n   my ( $line ) = @_;\n\n   if( $line =~ m/^!(.*)/ ) {\n      do_onetest if defined $command;\n      print \"> $1\\n\";\n   }\n\n   # Commands have capitals\n   elsif( $line =~ m/^([A-Z]+)/ ) {\n      # Some convenience formatting\n      if( $line =~ m/^(PUSH|ENCIN) (.*)$/ ) {\n         # we're evil\n         my $string = eval($2);\n         $line = \"$1 \" . unpack \"H*\", $string;\n      }\n\n      do_onetest if defined $command;\n\n      $command = $line;\n      undef @expect;\n   }\n   # Expectations have lowercase\n   elsif( $line =~ m/^([a-z]+)/ ) {\n      # Convenience formatting\n      if( $line =~ m/^(text|encout) (.*)$/ ) {\n         $line = \"$1 \" . join \",\", map sprintf(\"%x\", $_), eval($2);\n      }\n      elsif( $line =~ m/^(output) (.*)$/ ) {\n         $line = \"$1 \" . join \",\", map sprintf(\"%x\", $_), unpack \"C*\", eval($2);\n      }\n      elsif( $line =~ m/^control (.*)$/ ) {\n         $line = sprintf \"control %02x\", eval($1);\n      }\n      elsif( $line =~ m/^csi (\\S+) (.*)$/ ) {\n         $line = sprintf \"csi %02x %s\", eval($1), $2; # TODO\n      }\n      elsif( $line =~ m/^(escape|osc|dcs) (.*)$/ ) {\n         $line = \"$1 \" . join \"\", map sprintf(\"%02x\", $_), unpack \"C*\", eval($2);\n      }\n      elsif( $line =~ m/^putglyph (\\S+) (.*)$/ ) {\n         $line = \"putglyph \" . join( \",\", map sprintf(\"%x\", $_), eval($1) ) . \" $2\";\n      }\n      elsif( $line =~ m/^(?:movecursor|scrollrect|moverect|erase|damage|sb_pushline|sb_popline|settermprop|setmousefunc) / ) {\n         # no conversion\n      }\n      else {\n         warn \"Unrecognised test expectation '$line'\\n\";\n      }\n\n      push @expect, $line;\n   }\n   # ?screen_row assertion is emulated here\n   elsif( $line =~ s/^\\?screen_row\\s+(\\d+)\\s*=\\s*// ) {\n      my $row = $1;\n      my $row1 = $row + 1;\n      my $want = eval($line);\n\n      do_onetest if defined $command;\n\n      # TODO: may not be 80\n      $hin->print( \"\\?screen_chars $row,0,$row1,80\\n\" );\n      my $response = <$hout>;\n      chomp $response;\n\n      $response = pack \"C*\", map hex, split m/,/, $response;\n      if( $response ne $want ) {\n         print \"# Assert ?screen_row $row failed:\\n\" .\n               \"# Expected: $want\\n\" .\n               \"# Actual:   $response\\n\";\n         $exitcode = 1;\n      }\n   }\n   # Assertions start with '?'\n   elsif( $line =~ s/^\\?([a-z]+.*?=)\\s+// ) {\n      do_onetest if defined $command;\n\n      my ( $assertion ) = $1 =~ m/^(.*)\\s+=/;\n\n      $hin->print( \"\\?$assertion\\n\" );\n      my $response = <$hout>; defined $response or wait, die \"Test harness failed - $?\\n\";\n      chomp $response;\n\n      if( $response ne $line ) {\n         print \"# Assert $assertion failed:\\n\" .\n               \"# Expected: $line\\n\" .\n               \"# Actual:   $response\\n\";\n         $exitcode = 1;\n      }\n   }\n   # Test controls start with '$'\n   elsif( $line =~ s/\\$SEQ\\s+(\\d+)\\s+(\\d+):\\s*// ) {\n      my ( $low, $high ) = ( $1, $2 );\n      foreach my $val ( $low .. $high ) {\n         ( my $inner = $line ) =~ s/\\\\#/$val/g;\n         do_line( $inner );\n      }\n   }\n   elsif( $line =~ s/\\$REP\\s+(\\d+):\\s*// ) {\n      my $count = $1;\n      do_line( $line ) for 1 .. $count;\n   }\n   else {\n      die \"Unrecognised TEST line $line\\n\";\n   }\n}\n\nopen my $test, \"<\", $ARGV[0] or die \"Cannot open test script $ARGV[0] - $!\";\n\nwhile( my $line = <$test> ) {\n   $line =~ s/^\\s+//;\n   chomp $line;\n\n   next if $line =~ m/^(?:#|$)/;\n   last if $line eq \"__END__\";\n\n   do_line( $line );\n}\n\ndo_onetest if defined $command;\n\nclose $hin;\nclose $hout;\n\nwaitpid $hpid, 0;\nif( $? ) {\n   printf STDERR \"Harness exited %d\\n\", WEXITSTATUS($?)   if WIFEXITED($?);\n   printf STDERR \"Harness exit signal %d\\n\", WTERMSIG($?) if WIFSIGNALED($?);\n   $exitcode = WIFEXITED($?) ? WEXITSTATUS($?) : 125;\n}\n\nexit $exitcode;\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/tbl2inc_c.pl",
    "content": "#!/usr/bin/perl\n\nuse strict;\nuse warnings;\n\nmy ( $encname ) = $ARGV[0] =~ m{/([^/.]+).tbl}\n   or die \"Cannot parse encoding name out of $ARGV[0]\\n\";\n\nprint <<\"EOF\";\nstatic const struct StaticTableEncoding encoding_$encname = {\n  { .decode = &decode_table },\n  {\nEOF\n\nwhile( <> ) {\n   s/\\s*#.*//; # strip comment\n\n   s{^(\\d+)/(\\d+)}{sprintf \"[0x%02x]\", $1*16 + $2}e; # Convert 3/1 to [0x31]\n   s{\"(.)\"}{sprintf \"0x%04x\", ord $1}e;              # Convert \"A\" to 0x41\n   s{U\\+}{0x};                                       # Convert U+0041 to 0x0041\n\n   s{$}{,}; # append comma\n\n   print \"    $_\";\n}\n\nprint <<\"EOF\";\n  }\n};\nEOF\n"
  },
  {
    "path": "liteidex/src/3rdparty/libvterm/vterm.pc.in",
    "content": "prefix=@PREFIX@\nlibdir=@LIBDIR@\nincludedir=${prefix}/include\n\nName: vterm\nDescription: Abstract VT220/Xterm/ECMA-48 emulation library\nVersion: @VERSION@\nLibs: -L${libdir} -lvterm\nCflags: -I${includedir}\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.2.0)\n\nif ($ENV{TRAVIS_BUILD_NUMBER})\n    project(ptyqt VERSION 0.0.$ENV{TRAVIS_BUILD_NUMBER} LANGUAGES CXX)\nelse ($ENV{TRAVIS_BUILD_NUMBER})\n    project(ptyqt VERSION 0.0.1 LANGUAGES CXX)\nendif ($ENV{TRAVIS_BUILD_NUMBER})\n\nset(CMAKE_CXX_STANDARD 11)\nset(CMAKE_INCLUDE_CURRENT_DIR ON)\nset(CMAKE_AUTOMOC ON)\n\n#params\n#available params:\n# - NO_BUILD_TESTS=1\n# - NO_BUILD_EXAMPLES=1\n# - WINPTY_LIBS=<path/to/winpty.lib> - redefine path to winpty lib for libkage and ignore included find mechanic\n# - WINPTY_DBGLIBS=<path/to/debug/winpty.lib> - redefine path to winpty lib for libkage and ignore included find mechanic\nIF(\"${CMAKE_BUILD_TYPE}\" STREQUAL \"Debug\")\n    set(PTYQT_DEBUG TRUE)\n    add_definitions(-DPTYQT_DEBUG)\nelse()\n    set(PTYQT_DEBUG FALSE)\nendif()\n\nset(BUILD_TYPE STATIC) #STATIC / SHARED\n\nif (MSVC)\n    #message(\"PRE_TARGET_ARCH ${TARGET_ARCH}\")\n    #message(\"VCPKG_TARGET_TRIPLET ${VCPKG_TARGET_TRIPLET}\")\n\n    #target arch for find winpty libs\n    if (\"${TARGET_ARCH}\" STREQUAL \"x86_amd64\")\n        set(TARGET_ARCH x64)\n    endif()\n\tif (\"${VCPKG_TARGET_TRIPLET}\" MATCHES \"x86\")\n        set(TARGET_ARCH x86) #x86 / x64\n    endif()\n    if (\"${TARGET_ARCH}\" STREQUAL \"\")\n        set(TARGET_ARCH x64) #x86 / x64\n    endif()\n    set(WINPTY_ROOT_DIR \"\") #user can define his own installation of WinPty for prevent auto-downloading dependency\n\n    #message(\"POST_TARGET_ARCH ${TARGET_ARCH}\")\n\n    if(\"${BUILD_TYPE}\" STREQUAL \"STATIC\")\n        set(CMAKE_MODULE_PATH \"${CMAKE_CURRENT_SOURCE_DIR}/cmake\" ${CMAKE_MODULE_PATH})\n        include(CMakeMsvc)\n        configure_msvc_runtime (\"${VCPKG_TARGET_TRIPLET}\")\n    endif()\n\nendif()\n\n#dependencies\nfind_package(Qt5Core REQUIRED)\n\nif (MSVC)\n    #for debug build we can redefine winpty libs to debug version\n    if (CMAKE_BUILD_TYPE MATCHES \"Debug\" AND NOT ${WINPTY_DBGLIBS} STREQUAL \"\")\n        set(WINPTY_LIBS ${WINPTY_DBGLIBS})\n    endif()\n\n    add_subdirectory(thirdparty)\n    find_package(Qt5Network REQUIRED)\n\n    message(\"WinPty root dir \" ${WINPTY_ROOT_DIR})\n    message(\"WinPty libs \" ${WINPTY_LIBS})\nendif()\n\n#install\n#set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR})\n\nset(PTYQT_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)\nset(PTYQT_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/bin)\nset(PTYQT_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib)\n\nset(PTYQTLIB_HEADERS_DIR ${PROJECT_SOURCE_DIR}/core)\n\ninclude_directories(${PTYQT_INSTALL_INCLUDE_DIR})\ninclude_directories(${PTYQTLIB_HEADERS_DIR})\nif (MSVC)\n    include_directories(${WINPTY_ROOT_DIR}/include)\nendif()\n\n#sub projects\nadd_subdirectory(core)\n\nif (NOT \"${NO_BUILD_TESTS}\" STREQUAL \"1\")\n  enable_testing()\n  add_subdirectory(tests)\nendif()\n\nif (NOT \"${NO_BUILD_EXAMPLES}\" STREQUAL \"1\")\n    add_subdirectory(examples)\nendif()\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2019 Vitaly Petrov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/README.md",
    "content": "# Pty-Qt - C++ library for work with PseudoTerminals\n\nPty-Qt is small library for access to console applications by pseudo-terminal interface on Mac, Linux and Windows. On Mac and Linux you can use standard PseudoTerminal API and on Windows you can use WinPty or ConPty.\n\n### CI Status\n\nUbuntu / MacOS X: [![Build Status](https://travis-ci.org/kafeg/ptyqt.svg?branch=master)](https://travis-ci.org/kafeg/ptyqt)\n\nWindows: [![Build Status](https://ci.appveyor.com/api/projects/status/github/kafeg/ptyqt?svg=true)](https://ci.appveyor.com/project/kafeg/ptyqt)\n\n## Pre-Requirements and build\n  - ConPty part works only on Windows 10 >= 1903 (build > 18309) and can be built only with Windows SDK >= 10.0.18346.0 (maybe >= 17134, but not sure)\n  - WinPty part requires winpty sdk for build and winpty.dll with winpty-agent.exe for deployment with target application. WinPty can work on Windows XP and later (depended on used build SDK: vc140 / vc140_xp). You can't link WinPty libraries inside your App, because it use cygwin for build.\n  - UnixPty part can work on both Linux/Mac versions, because it based on standard POSIX pseudo terminals API\n  - Еarget platforms: x86 or x64\n  - Required Qt >= 5.10\n  - On Windows should be installed: Git for Windows, Visual Studio >=2015\n\n### Build on Windows (cmd.exe)\n```sh\nset VCPKG_ROOT=c:/dev/ptyqtroot/vcpkg\nset GIT_PATH=\"c:\\Program Files\\Git\\bin\\git.exe\"\nset CMAKE_PATH=%VCPKG_ROOT%/downloads/tools/cmake-3.12.4-windows/cmake-3.12.4-win32-x86/bin/cmake.exe\nset TRIPLET=x64-windows\n\nmkdir %VCPKG_ROOT%\ncd %VCPKG_ROOT%\n%GIT_PATH% clone https://github.com/Microsoft/vcpkg.git\ncd vcpkg\n.\\bootstrap-vcpkg.bat\n.\\vcpkg.exe integrate install\n.\\vcpkg.exe env\ncd %VCPKG_ROOT%\n.\\vcpkg.exe install qt5-base:%TRIPLET% qt5-websockets:%TRIPLET%\ncd ..\n%GIT_PATH% clone https://github.com/kafeg/ptyqt.git ptyqt\nmkdir ptyqt-build\ncd ptyqt-build\n\n%CMAKE_PATH% ../ptyqt \"-DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake\" \"-DVCPKG_TARGET_TRIPLET=%TRIPLET%\" \"-DNO_BUILD_EXAMPLES=1\"\n%CMAKE_PATH% --build . --target winpty\n%CMAKE_PATH% --build .\n```\n\n### Build on Ubuntu\n```sh\nsudo apt-get install qtbase5-dev cmake libqt5websockets5-dev\ngit clone https://github.com/kafeg/ptyqt.git ptyqt\nmkdir ptyqt-build\ncd ptyqt-build\ncmake ../ptyqt\ncmake --build .\n```\n\n### Build on Mac\n```sh\nbrew install qt cmake\ngit clone https://github.com/kafeg/ptyqt.git ptyqt\nmkdir ptyqt-build\ncd ptyqt-build\ncmake ../ptyqt \"-DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/5.12.1\"\ncmake --build .\n```\n\n## Usage\nStandard way: build and install library then link it to your project and check examples for sample code.\n\nFor example, this code snipped works on Windows, Linux and Mac and make interface from Pty to XTermJS:\n```cpp\n#include <QCoreApplication>\n#include <QWebSocketServer>\n#include <QWebSocket>\n#include \"ptyqt.h\"\n#include <QTimer>\n#include <QProcessEnvironment>\n#include <QSysInfo>\n\n#define PORT 4242\n\n#define COLS 87\n#define ROWS 26\n\nint main(int argc, char *argv[])\n{\n    QCoreApplication app(argc, argv);\n\n    //start WebSockets server for receive connections from xterm.js\n    QWebSocketServer wsServer(\"TestServer\", QWebSocketServer::NonSecureMode);\n    if (!wsServer.listen(QHostAddress::Any, PORT))\n        return 1;\n\n    QMap<QWebSocket *, IPtyProcess *> sessions;\n\n    //create new session on new connection\n    QObject::connect(&wsServer, &QWebSocketServer::newConnection, [&wsServer, &sessions]()\n    {\n        //handle new connection\n        QWebSocket *wSocket = wsServer.nextPendingConnection();\n\n        //use cmd.exe or bash, depends on target platform\n        IPtyProcess::PtyType ptyType = IPtyProcess::WinPty;\n        qint32 buildNumber = QSysInfo::kernelVersion().split(\".\").last().toInt();\n        if (buildNumber >= CONPTY_MINIMAL_WINDOWS_VERSION)\n        {\n            qDebug() << \"Use ConPty except of WinPty\";\n            ptyType = IPtyProcess::ConPty;\n        }\n\n        QString shellPath = \"c:\\\\Windows\\\\system32\\\\cmd.exe\";\n        //shellPath = \"C:\\\\Program\\ Files\\\\Git\\\\bin\\\\bash.exe\";\n#ifdef Q_OS_UNIX\n        shellPath = \"/bin/sh\";\n        ptyType = IPtyProcess::UnixPty;\n#endif\n\n        //create new Pty instance\n        IPtyProcess *pty = PtyQt::createPtyProcess(ptyType);\n\n        qDebug() << \"New connection\" << wSocket->peerAddress() << wSocket->peerPort() << pty->pid();\n\n        //start Pty process ()\n        pty->startProcess(shellPath, QProcessEnvironment::systemEnvironment().toStringList(), COLS, ROWS);\n\n        //connect read channel from Pty process to write channel on websocket\n        QObject::connect(pty->notifier(), &QIODevice::readyRead, [wSocket, pty]()\n        {\n            wSocket->sendTextMessage(pty->readAll());\n        });\n\n        //connect read channel of Websocket to write channel of Pty process\n        QObject::connect(wSocket, &QWebSocket::textMessageReceived, [wSocket, pty](const QString &message)\n        {\n            pty->write(message.toLatin1());\n        });\n\n        //...\n        //for example handle disconnections, process crashes and stuff like that...\n        //...\n\n        //add connection to list of active connections\n        sessions.insert(wSocket, pty);\n\n        qDebug() << pty->size();\n    });\n\n    //stop eventloop if needed\n    //QTimer::singleShot(5000, [](){ qApp->quit(); });\n\n    //exec eventloop\n    bool res = app.exec();\n\n    QMapIterator<QWebSocket *, IPtyProcess *> it(sessions);\n    while (it.hasNext())\n    {\n        it.next();\n\n        it.key()->deleteLater();\n        delete it.value();\n    }\n    sessions.clear();\n\n    return res;\n}\n```\n\n## Examples\n### XtermJS\n- build and run example from cmd.exe\n- install nodejs (your prefer way)\n- open console and run:\n```sh\ncd ptyqt/examples/xtermjs\nnpm install xterm\nnpm install http-server -g\nhttp-server ./\n```\n- open http://127.0.0.1:8080/ in Web browser\n- use your terminal, for example install and run 'Midnight Commander' or 'Far' for test pseduo-graphic interface\n\n**IMPORTANT**\n- do not use Git Bash for run 'xtermjs_sample.exe' on Windows, it has some issues: https://github.com/git-for-windows/git/wiki/FAQ#some-native-console-programs-dont-work-when-run-from-git-bash-how-to-fix-it\n- Only Far manager >= 3.0 supported by XTermJS, all old versioans are unsupported\n- ConPty requires to run your application from existing terminal session, in another case it just not work. For example in Qt Creator on Windows check \"Run in Terminal\" in project run settings before run examples or tests\n\n### QVTerminal\nThis is very-very-very basic implementation of VT100 terminal + Pty-Qt.\nIt's just forked repository from https://github.com/sebcaux/QVTerminal and used for this example with connection to real PTY.\nSo, you can see basic sample howto make VT100-like terminal from scratch.\nJust build project and run executable of this example.\n\nAlso, you can find for example projects like https://github.com/lxqt/qterminal, they all based on QTermWidget and they all not-crossplatform and support only UNIX. But QTermWidget is support full VT100 protocol because it's fork from Linux/KDE/Konsole application.\n\n## More information\nResources used to develop this library:\n  - https://github.com/Microsoft/node-pty\n  - https://github.com/Microsoft/console\n  - https://github.com/rprichard/winpty\n  - https://github.com/xtermjs/xterm.js\n  - https://github.com/lxqt/qterminal\n  - https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/\n  - https://devblogs.microsoft.com/commandline/windows-command-line-backgrounder/\n  - https://github.com/sebcaux/QVTerminal\n\n## XtermJS + PTY-Qt + C++ sample screenshots\n\n![Midnight Commander](https://github.com/kafeg/ptyqt/raw/master/examples/xtermjs/screens/midnight_commander_bash_unix.png)\n\n![Far Manager](https://github.com/kafeg/ptyqt/raw/master/examples/xtermjs/screens/far_manager_cmd_windows.png)\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/core/CMakeLists.txt",
    "content": "project(ptyqt-core VERSION 0.1 LANGUAGES CXX)\n\nset(SOURCE_FILES\n    ptyqt.h\n    ptyqt.cpp\n    iptyprocess.h\n)\n\nif (MSVC)\n    set(SOURCE_FILES\n        ${SOURCE_FILES}\n        winptyprocess.h\n        winptyprocess.cpp\n        conptyprocess.h\n        conptyprocess.cpp\n        )\nelse()\n    set(SOURCE_FILES\n        ${SOURCE_FILES}\n        unixptyprocess.cpp\n        unixptyprocess.h\n        )\nendif()\n\nif(\"${BUILD_TYPE}\" STREQUAL \"STATIC\")\n    add_library( ptyqt STATIC ${SOURCE_FILES} )\n    add_definitions(-DPTYQT_BUILD_STATIC)\nelse()\n    add_library( ptyqt SHARED ${SOURCE_FILES} )\n    add_definitions(-DPTYQT_BUILD_DYNAMIC)\nendif()\n\nset(ADDITIONAL_LIBS \"\")\n\n#disable this on Travis?AppVeyor\nif (NOT BUILD_SERVER)\n    find_library(PCRE2_LIBRARIES NAMES pcre2 pcre2-16)\n    find_path(PCRE2_INCLUDE_DIRS pcre2.h)\n    if(PCRE2_LIBRARIES AND PCRE2_INCLUDE_DIRS)\n      message(STATUS \"PCRE2 libs: ${PCRE2_LIBRARIES}\")\n      message(STATUS \"PCRE2 include directory: ${PCRE2_INCLUDE_DIRS}\")\n      set(PCRE2_FOUND TRUE CACHE BOOL \"Found PCRE2 libraries\" FORCE)\n      #add_custom_target(pcre2)\n    else()\n      set(PCRE2_FOUND FALSE CACHE BOOL \"Found PCRE2 libraries\" FORCE)\n      message(STATUS \"PCRE2 library not found.\")\n    endif()\n\n    find_package(OpenSSL REQUIRED)\n    find_package(BZip2 REQUIRED)\n    find_package(ZLIB REQUIRED)\n    find_library(DBLCONV_LIBRARIES NAMES pcre2 double-conversion)\n\n    list(APPEND ADDITIONAL_LIBS ${PCRE2_LIBRARIES} OpenSSL::SSL OpenSSL::Crypto ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${DBLCONV_LIBRARIES})\n\n    if (MSVC)\n        list(APPEND ADDITIONAL_LIBS wsock32 ws2_32 crypt32 iphlpapi netapi32 version winmm userenv)\n    elseif(\"${CMAKE_SYSTEM_NAME}\" MATCHES \"Darwin\"\n            OR (UNIX AND APPLE)\n            OR \"${CMAKE_CXX_COMPILER}\" MATCHES \"/usr/bin/clang\"\n            )\n\n        set(LIBS_MACOS\n            \"-framework Security -framework AppKit -framework CoreFoundation -framework IOKit\"\n            \"-framework CoreGraphics -framework CFNetwork -framework CoreText -framework Carbon\"\n            \"-framework CoreServices -framework ApplicationServices -framework SystemConfiguration\"\n        )\n\n        list(APPEND ADDITIONAL_LIBS ${LIBS_MACOS})\n\n    elseif(UNIX AND NOT APPLE)\n        set(LIBS_LINUX \n\t\t    \"-lpthread -ldl -static-libstdc++\"\n\t\t)\n\t\tlist(APPEND ADDITIONAL_LIBS ${LIBS_LINUX})\n    endif()\nendif()\n\ntarget_link_libraries(ptyqt Qt5::Core ${ADDITIONAL_LIBS})\n\nif (MSVC)\n    target_link_libraries( ptyqt Qt5::Network ${WINPTY_LIBS})\nendif()\n\ninstall(TARGETS ptyqt DESTINATION ${PTYQT_INSTALL_LIB_DIR})\ninstall(FILES ptyqt.h iptyprocess.h DESTINATION ${PTYQT_INSTALL_INCLUDE_DIR})\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/core/conptyprocess.cpp",
    "content": "#include \"conptyprocess.h\"\n#include <QFile>\n#include <QFileInfo>\n#include <QThread>\n#include <sstream>\n#include <QTimer>\n#include <QMutexLocker>\n#include <QCoreApplication>\n#include <QDebug>\n\n#define READ_INTERVAL_MSEC 500\n\nHRESULT ConPtyProcess::createPseudoConsoleAndPipes(HPCON* phPC, HANDLE* phPipeIn, HANDLE* phPipeOut, qint16 cols, qint16 rows)\n{\n    HRESULT hr{ E_UNEXPECTED };\n    HANDLE hPipePTYIn{ INVALID_HANDLE_VALUE };\n    HANDLE hPipePTYOut{ INVALID_HANDLE_VALUE };\n\n    // Create the pipes to which the ConPTY will connect\n    if (CreatePipe(&hPipePTYIn, phPipeOut, NULL, 0) &&\n            CreatePipe(phPipeIn, &hPipePTYOut, NULL, 0))\n    {\n        // Create the Pseudo Console of the required size, attached to the PTY-end of the pipes\n        hr = m_winContext.createPseudoConsole({cols, rows}, hPipePTYIn, hPipePTYOut, 0, phPC);\n\n        // Note: We can close the handles to the PTY-end of the pipes here\n        // because the handles are dup'ed into the ConHost and will be released\n        // when the ConPTY is destroyed.\n        if (INVALID_HANDLE_VALUE != hPipePTYOut) CloseHandle(hPipePTYOut);\n        if (INVALID_HANDLE_VALUE != hPipePTYIn) CloseHandle(hPipePTYIn);\n    }\n\n    return hr;\n}\n\n// Initializes the specified startup info struct with the required properties and\n// updates its thread attribute list with the specified ConPTY handle\nHRESULT ConPtyProcess::initializeStartupInfoAttachedToPseudoConsole(STARTUPINFOEX* pStartupInfo, HPCON hPC)\n{\n    HRESULT hr{ E_UNEXPECTED };\n\n    if (pStartupInfo)\n    {\n        SIZE_T attrListSize{};\n\n        pStartupInfo->StartupInfo.cb = sizeof(STARTUPINFOEX);\n        pStartupInfo->StartupInfo.dwFlags = STARTF_USESTDHANDLES;\n\n\n        // Get the size of the thread attribute list.\n        InitializeProcThreadAttributeList(NULL, 1, 0, &attrListSize);\n\n        // Allocate a thread attribute list of the correct size\n        pStartupInfo->lpAttributeList =\n                reinterpret_cast<LPPROC_THREAD_ATTRIBUTE_LIST>(malloc(attrListSize));\n\n        // Initialize thread attribute list\n        if (pStartupInfo->lpAttributeList\n                && InitializeProcThreadAttributeList(pStartupInfo->lpAttributeList, 1, 0, &attrListSize))\n        {\n            // Set Pseudo Console attribute\n            hr = UpdateProcThreadAttribute(\n                        pStartupInfo->lpAttributeList,\n                        0,\n                        PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE,\n                        hPC,\n                        sizeof(HPCON),\n                        NULL,\n                        NULL)\n                    ? S_OK\n                    : HRESULT_FROM_WIN32(GetLastError());\n        }\n        else\n        {\n            hr = HRESULT_FROM_WIN32(GetLastError());\n        }\n    }\n    return hr;\n}\n\nConPtyProcess::ConPtyProcess()\n    : IPtyProcess()\n    , m_ptyHandler { INVALID_HANDLE_VALUE }\n    , m_hPipeIn { INVALID_HANDLE_VALUE }\n    , m_hPipeOut { INVALID_HANDLE_VALUE }\n    , m_readThread(nullptr)\n{\n\n}\n\nConPtyProcess::~ConPtyProcess()\n{\n    kill();\n}\n\nVOID NTAPI waitForExit(PVOID p, BOOLEAN b) {\n    ConPtyProcess *pThis = (ConPtyProcess*)(p);\n    emit pThis->exited();\n}\n\nbool ConPtyProcess::startProcess(const QString &shellPath,const QStringList &arguments, const QString &workingDirectory, QStringList environment, qint16 cols, qint16 rows)\n{\n    if (!isAvailable())\n    {\n        m_lastError = m_winContext.lastError();\n        return false;\n    }\n\n    //already running\n    if (m_ptyHandler != INVALID_HANDLE_VALUE)\n        return false;\n\n    QFileInfo fi(shellPath);\n    if (fi.isRelative() || !QFile::exists(shellPath))\n    {\n        //todo add auto-find executable in PATH env var\n        m_lastError = QString(\"ConPty Error: shell file path must be absolute\");\n        return false;\n    }\n\n    m_shellPath = shellPath;\n    m_size = QPair<qint16, qint16>(cols, rows);\n\n    //env\n    std::wstringstream envBlock;\n    foreach (QString line, environment)\n    {\n        envBlock << line.toStdWString() << '\\0';\n    }\n    envBlock << '\\0';\n    std::wstring env = envBlock.str();\n    auto envV = vectorFromString(env);\n    LPWSTR envArg = envV.empty() ? nullptr : envV.data();\n\n    HRESULT hr{ E_UNEXPECTED };\n\n    //  Create the Pseudo Console and pipes to it\n    hr = createPseudoConsoleAndPipes(&m_ptyHandler, &m_hPipeIn, &m_hPipeOut, cols, rows);\n\n    if (S_OK != hr)\n    {\n        m_lastError = QString(\"ConPty Error: CreatePseudoConsoleAndPipes fail\");\n        return false;\n    }\n\n    // Initialize the necessary startup info struct\n    STARTUPINFOEX startupInfo{};\n    if (S_OK != initializeStartupInfoAttachedToPseudoConsole(&startupInfo, m_ptyHandler))\n    {\n        m_lastError = QString(\"ConPty Error: InitializeStartupInfoAttachedToPseudoConsole fail\");\n        return false;\n    }\n\n    // Launch ping to emit some text back via the pipe\n    PROCESS_INFORMATION piClient{};\n    hr = CreateProcess(\n                NULL,                           // No module name - use Command Line\n                (LPWSTR)m_shellPath.toStdWString().c_str(),                         // Command Line\n                NULL,                           // Process handle not inheritable\n                NULL,                           // Thread handle not inheritable\n                FALSE,                          // Inherit handles\n                EXTENDED_STARTUPINFO_PRESENT | CREATE_UNICODE_ENVIRONMENT,   // Creation flags\n                envArg, //NULL,                           // Use parent's environment block\n                (LPCWSTR)(workingDirectory.toStdWString().c_str()),                           // Use parent's starting directory\n                &startupInfo.StartupInfo,       // Pointer to STARTUPINFO\n                &piClient)                      // Pointer to PROCESS_INFORMATION\n            ? S_OK\n            : GetLastError();\n\n    if (hr != S_OK)\n    {\n        m_lastError = QString(\"ConPty Error: Cannot create process -> %1\").arg(hr);\n        return false;\n    }\n    m_pid = piClient.dwProcessId;\n\n    HANDLE hWait = NULL;\n    RegisterWaitForSingleObject(&hWait,piClient.hThread,waitForExit,this,INFINITE,WT_EXECUTEONLYONCE);\n\n//    QThread::create([this,&piClient,&startupInfo]()\n//    {\n//        qDebug() << \"wait\";\n//         WaitForSingleObject(piClient.hProcess, INFINITE);\n//         qDebug() << \"end wait\";\n////         CloseHandle(piClient.hThread);\n////         CloseHandle(piClient.hProcess);\n////         emit exited();\n//    })->start();\n\n    //this code runned in separate thread\n    m_readThread = QThread::create([this, &piClient, &startupInfo]()\n    {\n        forever\n        {\n            //buffers\n            const DWORD BUFF_SIZE{ 512 };\n            char szBuffer[BUFF_SIZE]{};\n\n            //DWORD dwBytesWritten{};\n            DWORD dwBytesRead{};\n            BOOL fRead{ FALSE };\n\n            // Read from the pipe\n            fRead = ReadFile(m_hPipeIn, szBuffer, BUFF_SIZE, &dwBytesRead, NULL);\n            {\n                QMutexLocker locker(&m_bufferMutex);\n                m_buffer.m_readBuffer.append(szBuffer, dwBytesRead);\n                m_buffer.emitReadyRead();\n            }\n\n            if (QThread::currentThread()->isInterruptionRequested())\n                break;\n\n            QCoreApplication::processEvents();\n        }\n\n        // Now safe to clean-up client app's process-info & thread\n        CloseHandle(piClient.hThread);\n        CloseHandle(piClient.hProcess);\n\n        // Cleanup attribute list\n        DeleteProcThreadAttributeList(startupInfo.lpAttributeList);\n        //free(startupInfo.lpAttributeList);\n    });\n\n    //start read thread\n    m_readThread->start();\n\n    return true;\n}\n\nbool ConPtyProcess::resize(qint16 cols, qint16 rows)\n{\n    if (m_ptyHandler == nullptr)\n    {\n        return false;\n    }\n\n    bool res = SUCCEEDED(m_winContext.resizePseudoConsole(m_ptyHandler, {cols, rows}));\n\n    if (res)\n    {\n        m_size = QPair<qint16, qint16>(cols, rows);\n    }\n\n    return res;\n\n    return true;\n}\n\nbool ConPtyProcess::kill()\n{\n    bool exitCode = false;\n\n    if ( m_ptyHandler != INVALID_HANDLE_VALUE )\n    {\n        m_readThread->requestInterruption();\n        QThread::msleep(200);\n        m_readThread->quit();\n        m_readThread->deleteLater();\n        m_readThread = nullptr;\n\n        // Close ConPTY - this will terminate client process if running\n        m_winContext.closePseudoConsole(m_ptyHandler);\n\n        // Clean-up the pipes\n        if (INVALID_HANDLE_VALUE != m_hPipeOut) CloseHandle(m_hPipeOut);\n        if (INVALID_HANDLE_VALUE != m_hPipeIn) CloseHandle(m_hPipeIn);\n        m_pid = 0;\n        m_ptyHandler = INVALID_HANDLE_VALUE;\n        m_hPipeIn = INVALID_HANDLE_VALUE;\n        m_hPipeOut = INVALID_HANDLE_VALUE;\n\n        exitCode = true;\n    }\n\n    return exitCode;\n}\n\nIPtyProcess::PtyType ConPtyProcess::type()\n{\n    return PtyType::ConPty;\n}\n\nQString ConPtyProcess::dumpDebugInfo()\n{\n#ifdef PTYQT_DEBUG\n    return QString(\"PID: %1, Type: %2, Cols: %3, Rows: %4\")\n            .arg(m_pid).arg(type())\n            .arg(m_size.first).arg(m_size.second);\n#else\n    return QString(\"Nothing...\");\n#endif\n}\n\nQIODevice *ConPtyProcess::notifier()\n{\n    return &m_buffer;\n}\n\nQByteArray ConPtyProcess::readAll()\n{\n    QMutexLocker locker(&m_bufferMutex);\n    return m_buffer.m_readBuffer;\n}\n\nqint64 ConPtyProcess::write(const QByteArray &byteArray)\n{\n    DWORD dwBytesWritten{};\n    WriteFile(m_hPipeOut, byteArray.data(), byteArray.size(), &dwBytesWritten, NULL);\n    return dwBytesWritten;\n}\n\nbool ConPtyProcess::isAvailable()\n{\n#ifdef TOO_OLD_WINSDK\n    return false; //very importnant! ConPty can be built, but it doesn't work if built with old sdk and Win10 < 1903\n#endif\n\n    qint32 buildNumber = QSysInfo::kernelVersion().split(\".\").last().toInt();\n    if (buildNumber < CONPTY_MINIMAL_WINDOWS_VERSION)\n        return false;\n    return m_winContext.init();\n}\n\nvoid ConPtyProcess::moveToThread(QThread *targetThread)\n{\n    //nothing for now...\n}\n\nint ConPtyProcess::processList() const\n{\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/core/conptyprocess.h",
    "content": "#ifndef CONPTYPROCESS_H\n#define CONPTYPROCESS_H\n\n#include \"iptyprocess.h\"\n#include <windows.h>\n#include <process.h>\n#include <QLibrary>\n#include <stdio.h>\n#include <QMutex>\n#include <QTimer>\n#include <QThread>\n\n//Taken from the RS5 Windows SDK, but redefined here in case we're targeting <= 17733\n//Just for compile, ConPty doesn't work with Windows SDK < 17733\n#ifndef PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE\n#define PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE \\\n  ProcThreadAttributeValue(22, FALSE, TRUE, FALSE)\n\ntypedef VOID* HPCON;\n\n#define TOO_OLD_WINSDK\n#endif\n\ntemplate <typename T>\nstd::vector<T> vectorFromString(const std::basic_string<T> &str)\n{\n    return std::vector<T>(str.begin(), str.end());\n}\n\n//ConPTY available only on Windows 10 releazed after 1903 (19H1) Windows release\nclass WindowsContext\n{\npublic:\n    typedef HRESULT (*CreatePseudoConsolePtr)(\n            COORD size,         // ConPty Dimensions\n            HANDLE hInput,      // ConPty Input\n            HANDLE hOutput,\t    // ConPty Output\n            DWORD dwFlags,      // ConPty Flags\n            HPCON* phPC);       // ConPty Reference\n\n    typedef HRESULT (*ResizePseudoConsolePtr)(HPCON hPC, COORD size);\n\n    typedef VOID (*ClosePseudoConsolePtr)(HPCON hPC);\n\n    WindowsContext()\n        : createPseudoConsole(nullptr)\n        , resizePseudoConsole(nullptr)\n        , closePseudoConsole(nullptr)\n    {\n\n    }\n\n    bool init()\n    {\n        //already initialized\n        if (createPseudoConsole)\n            return true;\n\n        //try to load symbols from library\n        //if it fails -> we can't use ConPty API\n        HANDLE kernel32Handle = LoadLibraryExW(L\"kernel32.dll\", 0, 0);\n\n        if (kernel32Handle != nullptr)\n        {\n            createPseudoConsole = (CreatePseudoConsolePtr)GetProcAddress((HMODULE)kernel32Handle, \"CreatePseudoConsole\");\n            resizePseudoConsole = (ResizePseudoConsolePtr)GetProcAddress((HMODULE)kernel32Handle, \"ResizePseudoConsole\");\n            closePseudoConsole = (ClosePseudoConsolePtr)GetProcAddress((HMODULE)kernel32Handle, \"ClosePseudoConsole\");\n            if (createPseudoConsole == NULL || resizePseudoConsole == NULL || closePseudoConsole == NULL)\n            {\n                m_lastError = QString(\"WindowsContext/ConPty error: %1\").arg(\"Invalid on load API functions\");\n                return false;\n            }\n        }\n        else\n        {\n            m_lastError = QString(\"WindowsContext/ConPty error: %1\").arg(\"Unable to load kernel32\");\n            return false;\n        }\n\n        return true;\n    }\n\n    QString lastError()\n    {\n        return m_lastError;\n    }\n\npublic:\n    //vars\n    CreatePseudoConsolePtr createPseudoConsole;\n    ResizePseudoConsolePtr resizePseudoConsole;\n    ClosePseudoConsolePtr closePseudoConsole;\n\nprivate:\n    QString m_lastError;\n};\n\nclass PtyBuffer : public QIODevice\n{\n    friend class ConPtyProcess;\n    Q_OBJECT\npublic:\n\n    PtyBuffer() {  }\n    ~PtyBuffer() { }\n\n    //just empty realization, we need only 'readyRead' signal of this class\n    qint64 readData(char *data, qint64 maxlen) { return 0; }\n    qint64 writeData(const char *data, qint64 len) { return 0; }\n\n    bool   isSequential() { return true; }\n    qint64 bytesAvailable() { return m_readBuffer.size(); }\n    qint64 size() { return m_readBuffer.size(); }\n\n    void emitReadyRead()\n    {\n        //for emit signal from PtyBuffer own thread\n        QTimer::singleShot(1, this, [this]()\n        {\n             emit readyRead();\n        });\n    }\n\nprivate:\n    QByteArray m_readBuffer;\n};\n\nclass ConPtyProcess : public IPtyProcess\n{\npublic:\n    ConPtyProcess();\n    ~ConPtyProcess();\n\n    bool startProcess(const QString &shellPath, const QStringList &arguments, const QString &workingDirectory, QStringList environment, qint16 cols, qint16 rows);\n    bool resize(qint16 cols, qint16 rows);\n    bool kill();\n    PtyType type();\n    QString dumpDebugInfo();\n    virtual QIODevice *notifier();\n    virtual QByteArray readAll();\n    virtual qint64 write(const QByteArray &byteArray);\n    bool isAvailable();\n    void moveToThread(QThread *targetThread);\n    virtual int processList() const;\nprivate:\n    HRESULT createPseudoConsoleAndPipes(HPCON* phPC, HANDLE* phPipeIn, HANDLE* phPipeOut, qint16 cols, qint16 rows);\n    HRESULT initializeStartupInfoAttachedToPseudoConsole(STARTUPINFOEX* pStartupInfo, HPCON hPC);\n\nprivate:\n    WindowsContext m_winContext;\n    HPCON m_ptyHandler;\n    HANDLE m_hPipeIn, m_hPipeOut;\n\n    QThread *m_readThread;\n    QMutex m_bufferMutex;\n    PtyBuffer m_buffer;\n\n};\n\n#endif // CONPTYPROCESS_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/core/iptyprocess.h",
    "content": "#ifndef IPTYPROCESS_H\n#define IPTYPROCESS_H\n\n#include <QString>\n#include <QStringList>\n#include <QDebug>\n\n//#ifdef Q_OS_WIN\n//#include <QLocalSocket>\n//#endif\n\n#define CONPTY_MINIMAL_WINDOWS_VERSION 18309\n\nclass IPtyProcess : public QObject\n{\n    Q_OBJECT\npublic:\n    enum PtyType\n    {\n        UnixPty = 0,\n        WinPty = 1,\n        ConPty = 2,\n        AutoPty = 3\n    };\n\n    IPtyProcess()\n        : m_pid(0)\n        , m_trace(false)\n    {  }\n    virtual ~IPtyProcess() { }\n\n    virtual bool startProcess(const QString &shellPath, const QStringList &arguments, const QString &workingDirectory, QStringList environment, qint16 cols, qint16 rows) = 0;\n    virtual bool resize(qint16 cols, qint16 rows) = 0;\n    virtual bool kill() = 0;\n    virtual PtyType type() = 0;\n    virtual QString dumpDebugInfo() = 0;\n    virtual QIODevice *notifier() = 0;\n    virtual QByteArray readAll() = 0;\n    virtual qint64 write(const QByteArray &byteArray) = 0;\n    virtual bool isAvailable() = 0;\n    virtual void moveToThread(QThread *targetThread) = 0;\n    virtual int processList() const = 0; // 0 - unsupport, 1 - no process , 2 - run process\n    qint64 pid() { return m_pid; }\n    QPair<qint16, qint16> size() { return m_size; }\n    const QString lastError() { return m_lastError; }\n    bool toggleTrace() { m_trace = !m_trace; return m_trace; }\nsignals:\n    void started();\n    void exited();\nprotected:\n    QString m_shellPath;\n    QString m_lastError;\n    qint64 m_pid;\n    QPair<qint16, qint16> m_size; //cols / rows\n    bool m_trace;\n};\n\n#endif // IPTYPROCESS_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/core/ptyqt.cpp",
    "content": "#include \"ptyqt.h\"\n#include <utility>\n\n#ifdef Q_OS_WIN\n\n#ifdef _MSC_VER\n#include \"conptyprocess.h\"\n#else\n#include \"winptyprocess.h\"\n#endif\n\n#endif\n\n#ifdef Q_OS_UNIX\n#include \"unixptyprocess.h\"\n#endif\n\nIPtyProcess *PtyQt::createPtyProcess(IPtyProcess::PtyType ptyType)\n{\n    switch (ptyType)\n    {\n#ifdef Q_OS_WIN\n\n#ifdef _MSC_VER\n    case IPtyProcess::ConPty:\n        return new ConPtyProcess();\n        break;\n#else\n    case IPtyProcess::WinPty:\n        return new WinPtyProcess();\n        break;\n#endif\n\n#endif\n#ifdef Q_OS_UNIX\n    case IPtyProcess::UnixPty:\n        return new UnixPtyProcess();\n        break;\n#endif\n    case IPtyProcess::AutoPty:\n    default:\n        break;\n    }\n\n#ifdef Q_OS_WIN\n\n#ifdef _MSC_VER\n        return new ConPtyProcess();\n#else\n        return new WinPtyProcess();\n#endif\n\n#endif\n#ifdef Q_OS_UNIX\n    return new UnixPtyProcess();\n#endif\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/core/ptyqt.h",
    "content": "#ifndef PTYQT_H\n#define PTYQT_H\n\n#include \"iptyprocess.h\"\n\nclass PtyQt\n{\npublic:\n    static IPtyProcess *createPtyProcess(IPtyProcess::PtyType ptyType);\n};\n\n#endif // PTYQT_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/core/unixptyprocess.cpp",
    "content": "#include \"unixptyprocess.h\"\n//#include <QStandardPaths>\n\n#include <termios.h>\n#include <errno.h>\n#if !defined(Q_OS_ANDROID) && !defined(Q_OS_BSD4)\n#include <utmpx.h>\n#endif\n#include <fcntl.h>\n#include <sys/ioctl.h>\n#include <unistd.h>\n#include <stdlib.h>\n#include <QFileInfo>\n#include <QCoreApplication>\n#include <signal.h>\n\n/* for pty_getproc */\n#if defined(__linux__)\n#include <stdio.h>\n#include <stdint.h>\n\n// support for build with MUSL on Alpine Linux\n#ifndef _PATH_UTMPX\n#include <sys/time.h>\n# define _PATH_UTMPX\t\"/var/log/utmp\"\n#endif\n\n#elif defined(__APPLE__)\n#include <sys/sysctl.h>\n#include <libproc.h>\n#endif\n\nstatic char *pty_getproc(int fd, char *tty);\n\n\nUnixPtyProcess::UnixPtyProcess()\n    : IPtyProcess()\n    , m_readMasterNotify(0)\n{\n//    m_shellProcess.setWorkingDirectory(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));\n    connect(&m_shellProcess,SIGNAL(finished(int, QProcess::ExitStatus)),this,SLOT(finished(int, QProcess::ExitStatus)));\n    connect(&m_shellProcess,SIGNAL(stateChanged(QProcess::ProcessState)),this,SLOT(stateChanged(QProcess::ProcessState)));\n}\n\nUnixPtyProcess::~UnixPtyProcess()\n{\n    kill();\n}\n\nbool UnixPtyProcess::startProcess(const QString &shellPath, const QStringList &arguments, const QString &workingDirectory, QStringList environment, qint16 cols, qint16 rows)\n{\n//    if (!isAvailable())\n//    {\n//        m_lastError = QString(\"UnixPty Error: unavailable\");\n//        return false;\n//    }\n\n    if (m_shellProcess.state() == QProcess::Running)\n        return false;\n\n    QFileInfo fi(shellPath);\n    if (fi.isRelative() || !QFile::exists(shellPath))\n    {\n        //todo add auto-find executable in PATH env var\n        m_lastError = QString(\"UnixPty Error: shell file path must be absolute\");\n        return false;\n    }\n#ifdef Q_OS_MAC\n    m_shellName = fi.fileName();\n#else\n    m_shellName = shellPath;\n#endif\n\n    m_shellPath = shellPath;\n    m_size = QPair<qint16, qint16>(cols, rows);\n\n    int rc = 0;\n\n    m_shellProcess.m_handleMaster = ::posix_openpt(O_RDWR | O_NOCTTY);\n    if (m_shellProcess.m_handleMaster <= 0)\n    {\n        m_lastError = QString(\"UnixPty Error: unable to open master -> %1\").arg(strerror(errno));\n        kill();\n        return false;\n    }\n\n    m_shellProcess.m_handleSlaveName = ptsname(m_shellProcess.m_handleMaster);\n    if ( m_shellProcess.m_handleSlaveName.isEmpty())\n    {\n        m_lastError = QString(\"UnixPty Error: unable to get slave name -> %1\").arg(strerror(errno));\n        kill();\n        return false;\n    }\n\n    signal(SIGINT, SIG_DFL);\n\n    rc = grantpt(m_shellProcess.m_handleMaster);\n    if (rc != 0)\n    {\n        m_lastError = QString(\"UnixPty Error: unable to change perms for slave -> %1\").arg(strerror(errno));\n        kill();\n        return false;\n    }\n\n    rc = unlockpt(m_shellProcess.m_handleMaster);\n    if (rc != 0)\n    {\n        m_lastError = QString(\"UnixPty Error: unable to unlock slave -> %1\").arg(strerror(errno));\n        kill();\n        return false;\n    }\n\n    m_shellProcess.m_handleSlave = ::open(m_shellProcess.m_handleSlaveName.toLatin1().data(), O_RDWR | O_NOCTTY);\n    if (m_shellProcess.m_handleSlave < 0)\n    {\n        m_lastError = QString(\"UnixPty Error: unable to open slave -> %1\").arg(strerror(errno));\n        kill();\n        return false;\n    }\n\n    rc = fcntl(m_shellProcess.m_handleMaster, F_SETFD, FD_CLOEXEC);\n    if (rc == -1)\n    {\n        m_lastError = QString(\"UnixPty Error: unable to set flags for master -> %1\").arg(strerror(errno));\n        kill();\n        return false;\n    }\n\n    rc = fcntl(m_shellProcess.m_handleSlave, F_SETFD, FD_CLOEXEC);\n    if (rc == -1)\n    {\n        m_lastError = QString(\"UnixPty Error: unable to set flags for slave -> %1\").arg(strerror(errno));\n        kill();\n        return false;\n    }\n\n#ifdef Q_OS_MAC\n    fcntl(m_shellProcess.m_handleMaster, F_SETFL, fcntl(m_shellProcess.m_handleMaster, F_GETFL) | O_NONBLOCK);\n    fcntl(m_shellProcess.m_handleSlave, F_SETFL, fcntl(m_shellProcess.m_handleSlave, F_GETFL) | O_NONBLOCK);\n#endif\n\n    struct ::termios ttmode;\n    rc = tcgetattr(m_shellProcess.m_handleMaster, &ttmode);\n    if (rc != 0)\n    {\n        m_lastError = QString(\"UnixPty Error: termios fail -> %1\").arg(strerror(errno));\n        kill();\n        return false;\n    }\n\n    ttmode.c_iflag = ICRNL | IXON | IXANY | IMAXBEL | BRKINT;\n#if defined(IUTF8)\n    ttmode.c_iflag |= IUTF8;\n#endif\n\n    ttmode.c_oflag = OPOST | ONLCR;\n    ttmode.c_cflag = CREAD | CS8 | HUPCL;\n    ttmode.c_lflag = ICANON | ISIG | IEXTEN | ECHO | ECHOE | ECHOK | ECHOKE | ECHOCTL;\n\n    ttmode.c_cc[VEOF] = 4;\n    ttmode.c_cc[VEOL] = -1;\n    ttmode.c_cc[VEOL2] = -1;\n    ttmode.c_cc[VERASE] = 0x7f;\n    ttmode.c_cc[VWERASE] = 23;\n    ttmode.c_cc[VKILL] = 21;\n    ttmode.c_cc[VREPRINT] = 18;\n    ttmode.c_cc[VINTR] = 3;\n    ttmode.c_cc[VQUIT] = 0x1c;\n    ttmode.c_cc[VSUSP] = 26;\n    ttmode.c_cc[VSTART] = 17;\n    ttmode.c_cc[VSTOP] = 19;\n    ttmode.c_cc[VLNEXT] = 22;\n    ttmode.c_cc[VDISCARD] = 15;\n    ttmode.c_cc[VMIN] = 1;\n    ttmode.c_cc[VTIME] = 0;\n\n#if (__APPLE__)\n    ttmode.c_cc[VDSUSP] = 25;\n    ttmode.c_cc[VSTATUS] = 20;\n#endif\n\n    cfsetispeed(&ttmode, B38400);\n    cfsetospeed(&ttmode, B38400);\n\n    rc = tcsetattr(m_shellProcess.m_handleMaster, TCSANOW, &ttmode);\n    if (rc != 0)\n    {\n        m_lastError = QString(\"UnixPty Error: unabble to set associated params -> %1\").arg(strerror(errno));\n        kill();\n        return false;\n    }\n\n    m_readMasterNotify = new QSocketNotifier(m_shellProcess.m_handleMaster, QSocketNotifier::Read, &m_shellProcess);\n    m_readMasterNotify->setEnabled(true);\n    m_readMasterNotify->moveToThread(m_shellProcess.thread());\n    connect(m_readMasterNotify,SIGNAL(activated(int)),this,SLOT(readActivated(int)));\n//    QObject::connect(m_readMasterNotify, &QSocketNotifier::activated, [this](int socket)\n//    {\n//        Q_UNUSED(socket)\n\n//        QByteArray buffer;\n//        int size = 1025;\n//        int readSize = 1024;\n//        QByteArray data;\n//        do\n//        {\n//            char nativeBuffer[size];\n//            int len = ::read(m_shellProcess.m_handleMaster, nativeBuffer, readSize);\n//            data = QByteArray(nativeBuffer, len);\n//            buffer.append(data);\n//        } while (data.size() == readSize); //last data block always < readSize\n\n//        m_shellReadBuffer.append(buffer);\n//        m_shellProcess.emitReadyRead();\n//    });\n\n    QStringList defaultVars;\n\n    defaultVars.append(\"TERM=xterm-256color\");\n    defaultVars.append(\"ITERM_PROFILE=Default\");\n    defaultVars.append(\"XPC_FLAGS=0x0\");\n    defaultVars.append(\"XPC_SERVICE_NAME=0\");\n    defaultVars.append(\"LANG=en_US.UTF-8\");\n    defaultVars.append(\"LC_ALL=en_US.UTF-8\");\n    defaultVars.append(\"LC_CTYPE=UTF-8\");\n    defaultVars.append(\"INIT_CWD=\" + QCoreApplication::applicationDirPath());\n    defaultVars.append(\"COMMAND_MODE=unix2003\");\n    defaultVars.append(\"COLORTERM=truecolor\");\n\n    QStringList varNames;\n    foreach (QString line, environment)\n    {\n        varNames.append(line.split(\"=\").first());\n    }\n\n    //append default env vars only if they don't exists in current env\n    foreach (QString defVar, defaultVars)\n    {\n        if (!varNames.contains(defVar.split(\"=\").first()))\n            environment.append(defVar);\n    }\n\n    QProcessEnvironment envFormat;\n    foreach (QString line, environment)\n    {\n        envFormat.insert(line.split(\"=\").first(), line.split(\"=\").last());\n    }\n    m_shellProcess.setWorkingDirectory(workingDirectory);\n    m_shellProcess.setProcessEnvironment(envFormat);\n    m_shellProcess.setReadChannel(QProcess::StandardOutput);\n    m_shellProcess.start(m_shellPath, arguments);\n    m_shellProcess.waitForStarted();\n\n    m_pid = m_shellProcess.pid();\n\n    resize(cols, rows);\n\n    return true;\n}\n\nbool UnixPtyProcess::resize(qint16 cols, qint16 rows)\n{\n    struct winsize winp;\n    winp.ws_col = cols;\n    winp.ws_row = rows;\n    winp.ws_xpixel = 0;\n    winp.ws_ypixel = 0;\n\n    bool res =  ((ioctl(m_shellProcess.m_handleMaster, TIOCSWINSZ, &winp) != -1) && (ioctl(m_shellProcess.m_handleSlave, TIOCSWINSZ, &winp) != -1) );\n\n    if (res)\n    {\n        m_size = QPair<qint16, qint16>(cols, rows);\n    }\n\n    return res;\n}\n\n//bool tty_kill(int fd, int signal)\n//{\n//#if defined(TIOCSIG)\n//    if (ioctl(fd, TIOCSIG, signal) == -1)\n//        return false;\n//#elif defined(TIOCSIGNAL)\n//    if (ioctl(fd, TIOCSIGNAL, signal) == -1)\n//        return false;\n//#endif\n//    return  true;\n//}\n\nbool UnixPtyProcess::kill()\n{\n    m_shellProcess.m_handleSlaveName = QString();\n    if (m_shellProcess.m_handleSlave >= 0)\n    {\n        ::close(m_shellProcess.m_handleSlave);\n        m_shellProcess.m_handleSlave = -1;\n    }\n    if (m_shellProcess.m_handleMaster >= 0)\n    {\n        ::close(m_shellProcess.m_handleMaster);\n        m_shellProcess.m_handleMaster = -1;\n    }\n    if (!m_readMasterNotify) {\n       return false;\n    }\n    if (m_shellProcess.state() == QProcess::Running)\n    {\n        m_readMasterNotify->disconnect();\n        m_readMasterNotify->deleteLater();\n\n        m_shellProcess.terminate();\n        m_shellProcess.waitForFinished(1000);\n\n        if (m_shellProcess.state() == QProcess::Running)\n        {\n            QProcess::startDetached( QString(\"kill -9 %1\").arg( pid() ) );\n            m_shellProcess.kill();\n            m_shellProcess.waitForFinished(1000);\n        }\n\n        return (m_shellProcess.state() == QProcess::NotRunning);\n    }\n    return false;\n}\n\nIPtyProcess::PtyType UnixPtyProcess::type()\n{\n    return IPtyProcess::UnixPty;\n}\n\nQString UnixPtyProcess::dumpDebugInfo()\n{\n#ifdef PTYQT_DEBUG\n    return QString(\"PID: %1, In: %2, Out: %3, Type: %4, Cols: %5, Rows: %6, IsRunning: %7, Shell: %8, SlaveName: %9\")\n            .arg(m_pid).arg(m_shellProcess.m_handleMaster).arg(m_shellProcess.m_handleSlave).arg(type())\n            .arg(m_size.first).arg(m_size.second).arg(m_shellProcess.state() == QProcess::Running)\n            .arg(m_shellPath).arg(m_shellProcess.m_handleSlaveName);\n#else\n    return QString(\"Nothing...\");\n#endif\n}\n\nQIODevice *UnixPtyProcess::notifier()\n{\n    return &m_shellProcess;\n}\n\nQByteArray UnixPtyProcess::readAll()\n{\n    QByteArray tmpBuffer =  m_shellReadBuffer;\n    m_shellReadBuffer.clear();\n    return tmpBuffer;\n}\n\nqint64 UnixPtyProcess::write(const QByteArray &byteArray)\n{\n    int result = ::write(m_shellProcess.m_handleMaster, byteArray.constData(), byteArray.size());\n    Q_UNUSED(result)\n\n    return byteArray.size();\n}\n\nbool UnixPtyProcess::isAvailable()\n{\n    //todo check something more if required\n    return true;\n}\n\nint UnixPtyProcess::processList() const\n{\n    QString proc = getUnixProc();\n    if (proc.isEmpty()) {\n        return 0;\n    }\n    if (proc == m_shellName) {\n        return 1;\n    }\n    return 2;\n}\n\nQString UnixPtyProcess::getUnixProc() const\n{\n    QString tmp;\n    char *buf = pty_getproc(m_shellProcess.m_handleMaster,m_shellProcess.m_handleSlaveName.toUtf8().data());\n    if (buf) {\n        tmp = QString::fromUtf8(buf);\n        free(buf);\n    }\n    return tmp;\n}\n\nvoid UnixPtyProcess::stateChanged(QProcess::ProcessState newState)\n{\n    if (newState == QProcess::Starting) {\n        emit started();\n    }\n}\n\nvoid UnixPtyProcess::finished(int /*exitCode*/, QProcess::ExitStatus /*exitStatus*/)\n{\n    emit exited();\n}\n\nvoid UnixPtyProcess::readActivated(int socket)\n{\n    Q_UNUSED(socket)\n\n    QByteArray buffer;\n    int readSize = 4096;\n    QByteArray data;\n    do\n    {\n        char nativeBuffer[4096];\n        int len = ::read(m_shellProcess.m_handleMaster, nativeBuffer, readSize);\n        data = QByteArray(nativeBuffer, len);\n        buffer.append(data);\n    } while (data.size() == readSize); //last data block always < readSize\n\n    m_shellReadBuffer.append(buffer);\n    m_shellProcess.emitReadyRead();\n}\n\n\nvoid UnixPtyProcess::moveToThread(QThread *targetThread)\n{\n    m_shellProcess.moveToThread(targetThread);\n}\n\nvoid ShellProcess::setupChildProcess()\n{\n    dup2(m_handleSlave, STDIN_FILENO);\n    dup2(m_handleSlave, STDOUT_FILENO);\n    dup2(m_handleSlave, STDERR_FILENO);\n\n    pid_t sid = setsid();\n    ioctl(m_handleSlave, TIOCSCTTY, 0);\n    tcsetpgrp(m_handleSlave, sid);\n\n#if !defined(Q_OS_ANDROID) && !defined(Q_OS_BSD4)\n    // on Android imposible to put record to the 'utmp' file\n    struct utmpx utmpxInfo;\n    memset(&utmpxInfo, 0, sizeof(utmpxInfo));\n\n    strncpy(utmpxInfo.ut_user, qgetenv(\"USER\"), sizeof(utmpxInfo.ut_user));\n\n    QString device(m_handleSlaveName);\n    if (device.startsWith(\"/dev/\"))\n        device = device.mid(5);\n\n    const char *d = device.toLatin1().constData();\n\n    strncpy(utmpxInfo.ut_line, d, sizeof(utmpxInfo.ut_line));\n\n    strncpy(utmpxInfo.ut_id, d + strlen(d) - sizeof(utmpxInfo.ut_id), sizeof(utmpxInfo.ut_id));\n\n    struct timeval tv;\n    gettimeofday(&tv, 0);\n    utmpxInfo.ut_tv.tv_sec = tv.tv_sec;\n    utmpxInfo.ut_tv.tv_usec = tv.tv_usec;\n\n    utmpxInfo.ut_type = USER_PROCESS;\n    utmpxInfo.ut_pid = getpid();\n\n    utmpxname(_PATH_UTMPX);\n    setutxent();\n    pututxline(&utmpxInfo);\n    endutxent();\n\n#if !defined(Q_OS_UNIX)\n    updwtmpx(_PATH_UTMPX, &loginInfo);\n#endif\n\n#endif\n}\n\n/**\n * pty_getproc\n * Taken from tmux.\n */\n\n// Taken from: tmux (http://tmux.sourceforge.net/)\n// Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>\n// Copyright (c) 2009 Joshua Elsasser <josh@elsasser.org>\n// Copyright (c) 2009 Todd Carson <toc@daybefore.net>\n//\n// Permission to use, copy, modify, and distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER\n// IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING\n// OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n#if defined(__linux__)\n\nstatic char *\npty_getproc(int fd, char *tty) {\n  FILE *f;\n  char *path, *buf;\n  size_t len;\n  int ch;\n  pid_t pgrp;\n  int r;\n\n  if ((pgrp = tcgetpgrp(fd)) == -1) {\n    return NULL;\n  }\n\n  r = asprintf(&path, \"/proc/%lld/cmdline\", (long long)pgrp);\n  if (r == -1 || path == NULL) return NULL;\n\n  if ((f = fopen(path, \"r\")) == NULL) {\n    free(path);\n    return NULL;\n  }\n\n  free(path);\n\n  len = 0;\n  buf = NULL;\n  while ((ch = fgetc(f)) != EOF) {\n    if (ch == '\\0') break;\n    buf = (char *)realloc(buf, len + 2);\n    if (buf == NULL) return NULL;\n    buf[len++] = ch;\n  }\n\n  if (buf != NULL) {\n    buf[len] = '\\0';\n  }\n\n  fclose(f);\n  return buf;\n}\n\n#elif defined(__APPLE__)\n\nstatic char *\npty_getproc(int fd, char *tty) {\n  int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, 0 };\n  size_t size;\n  struct kinfo_proc kp;\n\n  if ((mib[3] = tcgetpgrp(fd)) == -1) {\n    return NULL;\n  }\n\n  size = sizeof kp;\n  if (sysctl(mib, 4, &kp, &size, NULL, 0) == -1) {\n    return NULL;\n  }\n\n  if (*kp.kp_proc.p_comm == '\\0') {\n    return NULL;\n  }\n\n  return strdup(kp.kp_proc.p_comm);\n}\n\n#else\n\nstatic char *\npty_getproc(int fd, char *tty) {\n  return NULL;\n}\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/core/unixptyprocess.h",
    "content": "#ifndef UNIXPTYPROCESS_H\n#define UNIXPTYPROCESS_H\n\n#include \"iptyprocess.h\"\n#include <QProcess>\n#include <QSocketNotifier>\n\nclass ShellProcess : public QProcess\n{\n    friend class UnixPtyProcess;\n    Q_OBJECT\npublic:\n    ShellProcess( )\n        : QProcess( )\n        , m_handleMaster(-1)\n        , m_handleSlave(-1)\n    {\n        setProcessChannelMode(QProcess::SeparateChannels);\n    }\n\n    void emitReadyRead()\n    {\n        emit readyRead();\n    }\n    int m_sid;\nprotected:\n    virtual void setupChildProcess();\n\nprivate:\n    int m_handleMaster, m_handleSlave;\n    QString m_handleSlaveName;\n};\n\nclass UnixPtyProcess : public IPtyProcess\n{\n    Q_OBJECT\npublic:\n    UnixPtyProcess();\n    virtual ~UnixPtyProcess();\n\n    virtual bool startProcess(const QString &shellPath, const QStringList &arguments, const QString &workingDirectory, QStringList environment, qint16 cols, qint16 rows);\n    virtual bool resize(qint16 cols, qint16 rows);\n    virtual bool kill();\n    virtual PtyType type();\n    virtual QString dumpDebugInfo();\n    virtual QIODevice *notifier();\n    virtual QByteArray readAll();\n    virtual qint64 write(const QByteArray &byteArray);\n    virtual bool isAvailable();\n    virtual int processList() const;\n    void moveToThread(QThread *targetThread);\n    QString getUnixProc() const;\npublic slots:\n    void stateChanged(QProcess::ProcessState newState);\n    void finished(int, QProcess::ExitStatus);\n    void readActivated(int socket);\nprivate:\n    ShellProcess m_shellProcess;\n    QSocketNotifier *m_readMasterNotify;\n    QByteArray m_shellReadBuffer;\n    QString m_shellName;\n\n};\n\n#endif // UNIXPTYPROCESS_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/core/winpty.h",
    "content": "/*\r\n * Copyright (c) 2011-2016 Ryan Prichard\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to\r\n * deal in the Software without restriction, including without limitation the\r\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\r\n * sell copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * all copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\r\n * IN THE SOFTWARE.\r\n */\r\n\r\n#ifndef WINPTY_H\r\n#define WINPTY_H\r\n\r\n#include <windows.h>\r\n\r\n#include \"winpty_constants.h\"\r\n\r\n/* On 32-bit Windows, winpty functions have the default __cdecl (not __stdcall)\r\n * calling convention.  (64-bit Windows has only a single calling convention.)\r\n * When compiled with __declspec(dllexport), with either MinGW or MSVC, the\r\n * winpty functions are unadorned--no underscore prefix or '@nn' suffix--so\r\n * GetProcAddress can be used easily. */\r\n\r\n#define WINPTY_API __cdecl\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n\r\n/* The winpty API uses wide characters, instead of UTF-8, to avoid conversion\r\n * complications related to surrogates.  Windows generally tolerates unpaired\r\n * surrogates in text, which makes conversion to and from UTF-8 ambiguous and\r\n * complicated.  (There are different UTF-8 variants that deal with UTF-16\r\n * surrogates differently.) */\r\n\r\n\r\n\r\n/*****************************************************************************\r\n * Error handling. */\r\n\r\n/* All the APIs have an optional winpty_error_t output parameter.  If a\r\n * non-NULL argument is specified, then either the API writes NULL to the\r\n * value (on success) or writes a newly allocated winpty_error_t object.  The\r\n * object must be freed using winpty_error_free. */\r\n\r\n/* An error object. */\r\ntypedef struct winpty_error_s winpty_error_t;\r\ntypedef winpty_error_t *winpty_error_ptr_t;\r\n\r\n/* An error code -- one of WINPTY_ERROR_xxx. */\r\ntypedef DWORD winpty_result_t;\r\n\r\n/* The winpty_config_t object is not thread-safe. */\r\ntypedef struct winpty_config_s winpty_config_t;\r\n/* The winpty_t object is thread-safe. */\r\ntypedef struct winpty_s winpty_t;\r\n/* The winpty_spawn_config_t object is not thread-safe. */\r\ntypedef struct winpty_spawn_config_s winpty_spawn_config_t;\r\n\r\n\r\n\r\n/****************************************************************************/\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n#endif /* WINPTY_H */\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/core/winpty_constants.h",
    "content": "/*\r\n * Copyright (c) 2016 Ryan Prichard\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to\r\n * deal in the Software without restriction, including without limitation the\r\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\r\n * sell copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * all copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\r\n * IN THE SOFTWARE.\r\n */\r\n\r\n#ifndef WINPTY_CONSTANTS_H\r\n#define WINPTY_CONSTANTS_H\r\n\r\n/*\r\n * You may want to include winpty.h instead, which includes this header.\r\n *\r\n * This file is split out from winpty.h so that the agent can access the\r\n * winpty flags without also declaring the libwinpty APIs.\r\n */\r\n\r\n/*****************************************************************************\r\n * Error codes. */\r\n\r\n#define WINPTY_ERROR_SUCCESS                        0\r\n#define WINPTY_ERROR_OUT_OF_MEMORY                  1\r\n#define WINPTY_ERROR_SPAWN_CREATE_PROCESS_FAILED    2\r\n#define WINPTY_ERROR_LOST_CONNECTION                3\r\n#define WINPTY_ERROR_AGENT_EXE_MISSING              4\r\n#define WINPTY_ERROR_UNSPECIFIED                    5\r\n#define WINPTY_ERROR_AGENT_DIED                     6\r\n#define WINPTY_ERROR_AGENT_TIMEOUT                  7\r\n#define WINPTY_ERROR_AGENT_CREATION_FAILED          8\r\n\r\n\r\n\r\n/*****************************************************************************\r\n * Configuration of a new agent. */\r\n\r\n/* Create a new screen buffer (connected to the \"conerr\" terminal pipe) and\r\n * pass it to child processes as the STDERR handle.  This flag also prevents\r\n * the agent from reopening CONOUT$ when it polls -- regardless of whether the\r\n * active screen buffer changes, winpty continues to monitor the original\r\n * primary screen buffer. */\r\n#define WINPTY_FLAG_CONERR              0x1ull\r\n\r\n/* Don't output escape sequences. */\r\n#define WINPTY_FLAG_PLAIN_OUTPUT        0x2ull\r\n\r\n/* Do output color escape sequences.  These escapes are output by default, but\r\n * are suppressed with WINPTY_FLAG_PLAIN_OUTPUT.  Use this flag to reenable\r\n * them. */\r\n#define WINPTY_FLAG_COLOR_ESCAPES       0x4ull\r\n\r\n/* On XP and Vista, winpty needs to put the hidden console on a desktop in a\r\n * service window station so that its polling does not interfere with other\r\n * (visible) console windows.  To create this desktop, it must change the\r\n * process' window station (i.e. SetProcessWindowStation) for the duration of\r\n * the winpty_open call.  In theory, this change could interfere with the\r\n * winpty client (e.g. other threads, spawning children), so winpty by default\r\n * spawns a special agent process to create the hidden desktop.  Spawning\r\n * processes on Windows is slow, though, so if\r\n * WINPTY_FLAG_ALLOW_CURPROC_DESKTOP_CREATION is set, winpty changes this\r\n * process' window station instead.\r\n * See https://github.com/rprichard/winpty/issues/58. */\r\n#define WINPTY_FLAG_ALLOW_CURPROC_DESKTOP_CREATION 0x8ull\r\n\r\n#define WINPTY_FLAG_MASK (0ull \\\r\n    | WINPTY_FLAG_CONERR \\\r\n    | WINPTY_FLAG_PLAIN_OUTPUT \\\r\n    | WINPTY_FLAG_COLOR_ESCAPES \\\r\n    | WINPTY_FLAG_ALLOW_CURPROC_DESKTOP_CREATION \\\r\n)\r\n\r\n/* QuickEdit mode is initially disabled, and the agent does not send mouse\r\n * mode sequences to the terminal.  If it receives mouse input, though, it\r\n * still writes MOUSE_EVENT_RECORD values into CONIN. */\r\n#define WINPTY_MOUSE_MODE_NONE          0\r\n\r\n/* QuickEdit mode is initially enabled.  As CONIN enters or leaves mouse\r\n * input mode (i.e. where ENABLE_MOUSE_INPUT is on and ENABLE_QUICK_EDIT_MODE\r\n * is off), the agent enables or disables mouse input on the terminal.\r\n *\r\n * This is the default mode. */\r\n#define WINPTY_MOUSE_MODE_AUTO          1\r\n\r\n/* QuickEdit mode is initially disabled, and the agent enables the terminal's\r\n * mouse input mode.  It does not disable terminal mouse mode (until exit). */\r\n#define WINPTY_MOUSE_MODE_FORCE         2\r\n\r\n\r\n\r\n/*****************************************************************************\r\n * winpty agent RPC call: process creation. */\r\n\r\n/* If the spawn is marked \"auto-shutdown\", then the agent shuts down console\r\n * output once the process exits.  The agent stops polling for new console\r\n * output, and once all pending data has been written to the output pipe, the\r\n * agent closes the pipe.  (At that point, the pipe may still have data in it,\r\n * which the client may read.  Once all the data has been read, further reads\r\n * return EOF.) */\r\n#define WINPTY_SPAWN_FLAG_AUTO_SHUTDOWN 1ull\r\n\r\n/* After the agent shuts down output, and after all output has been written\r\n * into the pipe(s), exit the agent by closing the console.  If there any\r\n * surviving processes still attached to the console, they are killed.\r\n *\r\n * Note: With this flag, an RPC call (e.g. winpty_set_size) issued after the\r\n * agent exits will fail with an I/O or dead-agent error. */\r\n#define WINPTY_SPAWN_FLAG_EXIT_AFTER_SHUTDOWN 2ull\r\n\r\n/* All the spawn flags. */\r\n#define WINPTY_SPAWN_FLAG_MASK (0ull \\\r\n    | WINPTY_SPAWN_FLAG_AUTO_SHUTDOWN \\\r\n    | WINPTY_SPAWN_FLAG_EXIT_AFTER_SHUTDOWN \\\r\n)\r\n\r\n\r\n\r\n#endif /* WINPTY_CONSTANTS_H */\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/core/winptyprocess.cpp",
    "content": "#include \"winptyprocess.h\"\n#include <QFile>\n#include <QFileInfo>\n#include <sstream>\n#include <QCoreApplication>\n#include <windows.h>\n#include <QDir>\n\n#define DEBUG_VAR_LEGACY \"WINPTYDBG\"\n#define DEBUG_VAR_ACTUAL \"WINPTY_DEBUG\"\n#define SHOW_CONSOLE_VAR \"WINPTY_SHOW_CONSOLE\"\n#define WINPTY_AGENT_NAME \"winpty-agent.exe\"\n#ifdef Q_OS_WIN64\n#define WINPTY_DLL_NAME \"winpty64.dll\"\n#else\n#define WINPTY_DLL_NAME \"winpty32.dll\"\n#endif\n\n//#define WINPTY_DLL \"winpty.dll\"\n\nstatic HMODULE hWinPtyDLL = NULL;\n\n\n/* Gets the error code from the error object. */\nWINPTY_API winpty_result_t (*winpty_error_code)(winpty_error_ptr_t err);\n\n/* Returns a textual representation of the error.  The string is freed when\n * the error is freed. */\nWINPTY_API LPCWSTR (*winpty_error_msg)(winpty_error_ptr_t err);\n\n/* Free the error object.  Every error returned from the winpty API must be\n * freed. */\nWINPTY_API void (*winpty_error_free)(winpty_error_ptr_t err);\n\n\n\nWINPTY_API winpty_config_t *\n(*winpty_config_new)(UINT64 agentFlags, winpty_error_ptr_t *err /*OPTIONAL*/);\n\n/* Free the cfg object after passing it to winpty_open. */\nWINPTY_API void (*winpty_config_free)(winpty_config_t *cfg);\n\nWINPTY_API void\n(*winpty_config_set_initial_size)(winpty_config_t *cfg, int cols, int rows);\n\n/* Set the mouse mode to one of the WINPTY_MOUSE_MODE_xxx constants. */\nWINPTY_API void\n(*winpty_config_set_mouse_mode)(winpty_config_t *cfg, int mouseMode);\n\n/* Amount of time to wait for the agent to startup and to wait for any given\n * agent RPC request.  Must be greater than 0.  Can be INFINITE. */\nWINPTY_API void\n(*winpty_config_set_agent_timeout)(winpty_config_t *cfg, DWORD timeoutMs);\n\n\n\nWINPTY_API winpty_t *\n(*winpty_open)(const winpty_config_t *cfg,\n            winpty_error_ptr_t *err /*OPTIONAL*/);\n\nWINPTY_API HANDLE (*winpty_agent_process)(winpty_t *wp);\nWINPTY_API LPCWSTR (*winpty_conin_name)(winpty_t *wp);\nWINPTY_API LPCWSTR (*winpty_conout_name)(winpty_t *wp);\nWINPTY_API LPCWSTR (*winpty_conerr_name)(winpty_t *wp);\nWINPTY_API winpty_spawn_config_t *\n(*winpty_spawn_config_new)(UINT64 spawnFlags,\n                        LPCWSTR appname /*OPTIONAL*/,\n                        LPCWSTR cmdline /*OPTIONAL*/,\n                        LPCWSTR cwd /*OPTIONAL*/,\n                        LPCWSTR env /*OPTIONAL*/,\n                        winpty_error_ptr_t *err /*OPTIONAL*/);\nWINPTY_API void (*winpty_spawn_config_free)(winpty_spawn_config_t *cfg);\nWINPTY_API BOOL\n(*winpty_spawn)(winpty_t *wp,\n             const winpty_spawn_config_t *cfg,\n             HANDLE *process_handle /*OPTIONAL*/,\n             HANDLE *thread_handle /*OPTIONAL*/,\n             DWORD *create_process_error /*OPTIONAL*/,\n             winpty_error_ptr_t *err /*OPTIONAL*/);\nWINPTY_API BOOL\n(*winpty_set_size)(winpty_t *wp, int cols, int rows,\n                winpty_error_ptr_t *err /*OPTIONAL*/);\nWINPTY_API int\n(*winpty_get_console_process_list)(winpty_t *wp, int *processList, const int processCount,\n                                winpty_error_ptr_t *err /*OPTIONAL*/);\nWINPTY_API void (*winpty_free)(winpty_t *wp);\n\n\nstatic bool winpty_init()\n{\n    int i;\n    static struct\n    {\n    char\t    *name;\n    FARPROC\t    *ptr;\n    } winpty_entry[] =\n    {\n    {\"winpty_conerr_name\", (FARPROC*)&winpty_conerr_name},\n    {\"winpty_config_free\", (FARPROC*)&winpty_config_free},\n    {\"winpty_config_new\", (FARPROC*)&winpty_config_new},\n    {\"winpty_config_set_mouse_mode\",\n                      (FARPROC*)&winpty_config_set_mouse_mode},\n    {\"winpty_config_set_initial_size\",\n                    (FARPROC*)&winpty_config_set_initial_size},\n    {\"winpty_conin_name\", (FARPROC*)&winpty_conin_name},\n    {\"winpty_conout_name\", (FARPROC*)&winpty_conout_name},\n    {\"winpty_error_free\", (FARPROC*)&winpty_error_free},\n    {\"winpty_free\", (FARPROC*)&winpty_free},\n    {\"winpty_open\", (FARPROC*)&winpty_open},\n    {\"winpty_spawn\", (FARPROC*)&winpty_spawn},\n    {\"winpty_spawn_config_free\", (FARPROC*)&winpty_spawn_config_free},\n    {\"winpty_spawn_config_new\", (FARPROC*)&winpty_spawn_config_new},\n    {\"winpty_error_msg\", (FARPROC*)&winpty_error_msg},\n    {\"winpty_set_size\", (FARPROC*)&winpty_set_size},\n    {\"winpty_agent_process\", (FARPROC*)&winpty_agent_process},\n    {\"winpty_get_console_process_list\", (FARPROC*)&winpty_get_console_process_list},\n    {NULL, NULL}\n    };\n\n    // No need to initialize twice.\n    if (hWinPtyDLL)\n        return true;\n    // Load winpty.dll, prefer using the 'winptydll' option, fall back to just\n    // winpty.dll.\n    if (!hWinPtyDLL)\n        hWinPtyDLL = LoadLibraryA(WINPTY_DLL_NAME);\n\n    if (!hWinPtyDLL)\n    {\n        return false;\n    }\n    for (i = 0; winpty_entry[i].name != NULL\n         && winpty_entry[i].ptr != NULL; ++i)\n    {\n        if ((*winpty_entry[i].ptr = (FARPROC)GetProcAddress(hWinPtyDLL,\n                                                            winpty_entry[i].name)) == NULL)\n        {\n            qDebug() << \"GetProcAddress false\" << winpty_entry[i].name;\n       //     hWinPtyDLL = NULL;\n       //     return false;\n        }\n    }\n\n    return true;\n}\n\n\nQString castErrorToString(winpty_error_ptr_t error_ptr)\n{\n    return QString::fromStdWString(winpty_error_msg(error_ptr));\n}\n\nWinPtyProcess::WinPtyProcess()\n    : IPtyProcess()\n    , m_ptyHandler(0)\n    , m_innerHandle(0)\n    , m_inSocket(0)\n    , m_outSocket(0)\n{\n    m_initPty = winpty_init();\n}\n\nWinPtyProcess::~WinPtyProcess()\n{\n    kill();\n}\n\nbool WinPtyProcess::startProcess(const QString &shellPath, const QStringList &arguments, const QString &workingDirectory, QStringList environment, qint16 cols, qint16 rows)\n{\n//    if (!isAvailable())\n//    {\n//        m_lastError = QString(\"WinPty Error: winpty-agent.exe or winpty.dll not found!\");\n//        return false;\n//    }\n\n    //already running\n    if (m_ptyHandler)\n        return false;\n\n    QFileInfo fi(shellPath);\n    if (fi.isRelative() || !QFile::exists(shellPath))\n    {\n        //todo add auto-find executable in PATH env var\n        m_lastError = QString(\"WinPty Error: shell file path must be absolute\");\n        return false;\n    }\n\n    m_shellPath = QDir::toNativeSeparators(shellPath);\n    m_size = QPair<qint16, qint16>(cols, rows);\n\n#ifdef PTYQT_DEBUG\n    if (m_trace)\n    {\n        environment.append(QString(\"%1=1\").arg(DEBUG_VAR_LEGACY));\n        environment.append(QString(\"%1=trace\").arg(DEBUG_VAR_ACTUAL));\n        environment.append(QString(\"%1=1\").arg(SHOW_CONSOLE_VAR));\n        SetEnvironmentVariable(DEBUG_VAR_LEGACY, \"1\");\n        SetEnvironmentVariable(DEBUG_VAR_ACTUAL, \"trace\");\n        SetEnvironmentVariable(SHOW_CONSOLE_VAR, \"1\");\n    }\n#endif\n\n    //env\n    std::wstringstream envBlock;\n    foreach (QString line, environment)\n    {\n        envBlock << line.toStdWString() << L'\\0';\n    }\n    std::wstring env = envBlock.str();\n\n    //create start config\n    winpty_error_ptr_t errorPtr = 0;\n    winpty_config_t* startConfig = winpty_config_new(0, &errorPtr);\n    if (startConfig == 0)\n    {\n        m_lastError = QString(\"WinPty Error: create start config -> %1\").arg(castErrorToString(errorPtr));\n        return false;\n    }\n    winpty_error_free(errorPtr);\n\n    //set params\n    winpty_config_set_initial_size(startConfig, cols, rows);\n    winpty_config_set_mouse_mode(startConfig, WINPTY_MOUSE_MODE_AUTO);\n    //winpty_config_set_agent_timeout();\n\n    //start agent\n    m_ptyHandler = winpty_open(startConfig, &errorPtr);\n    winpty_config_free(startConfig); //start config is local var, free it after use\n\n    if (m_ptyHandler == 0)\n    {\n        m_lastError = QString(\"WinPty Error: start agent -> %1\").arg(castErrorToString(errorPtr));\n        return false;\n    }\n    winpty_error_free(errorPtr);\n\n    //create spawn config\n    winpty_spawn_config_t* spawnConfig = winpty_spawn_config_new(WINPTY_SPAWN_FLAG_AUTO_SHUTDOWN, m_shellPath.toStdWString().c_str(),\n                                                                 //commandLine.toStdWString().c_str(), cwd.toStdWString().c_str(),\n                                                                 NULL, workingDirectory.toStdWString().c_str(),\n                                                                 env.c_str(),\n                                                                 &errorPtr);\n\n    if (spawnConfig == 0)\n    {\n        m_lastError = QString(\"WinPty Error: create spawn config -> %1\").arg(castErrorToString(errorPtr));\n        return false;\n    }\n    winpty_error_free(errorPtr);\n\n    //spawn the new process\n    BOOL spawnSuccess = winpty_spawn(m_ptyHandler, spawnConfig, &m_innerHandle, 0, 0, &errorPtr);\n    winpty_spawn_config_free(spawnConfig); //spawn config is local var, free it after use\n    if (!spawnSuccess)\n    {\n        m_lastError = QString(\"WinPty Error: start terminal process -> %1\").arg(castErrorToString(errorPtr));\n        return false;\n    }\n    winpty_error_free(errorPtr);\n\n    m_pid = (int)GetProcessId(m_innerHandle);\n\n    //get pipe names\n    LPCWSTR conInPipeName = winpty_conin_name(m_ptyHandler);\n    m_conInName = QString::fromStdWString(std::wstring(conInPipeName));\n    m_inSocket = new QLocalSocket();\n    m_inSocket->connectToServer(m_conInName, QIODevice::WriteOnly);\n    m_inSocket->waitForConnected();\n\n    LPCWSTR conOutPipeName = winpty_conout_name(m_ptyHandler);\n    m_conOutName = QString::fromStdWString(std::wstring(conOutPipeName));\n    m_outSocket = new QLocalSocket();\n    m_outSocket->connectToServer(m_conOutName, QIODevice::ReadOnly);\n    m_outSocket->waitForConnected();\n\n    if (m_inSocket->state() != QLocalSocket::ConnectedState && m_outSocket->state() != QLocalSocket::ConnectedState)\n    {\n        m_lastError = QString(\"WinPty Error: Unable to connect local sockets -> %1 / %2\").arg(m_inSocket->errorString()).arg(m_outSocket->errorString());\n        m_inSocket->deleteLater();\n        m_outSocket->deleteLater();\n        m_inSocket = 0;\n        m_outSocket = 0;\n        return false;\n    }\n\n    connect(m_outSocket,SIGNAL(disconnected()),this,SLOT(disconnected()));\n\n\n    return true;\n}\n\nbool WinPtyProcess::resize(qint16 cols, qint16 rows)\n{\n    if (m_ptyHandler == 0)\n    {\n        return false;\n    }\n\n    bool res = winpty_set_size(m_ptyHandler, cols, rows, 0);\n\n    if (res)\n    {\n        m_size = QPair<qint16, qint16>(cols, rows);\n    }\n\n    return res;\n}\n\nbool WinPtyProcess::kill()\n{\n    bool exitCode = false;\n    if (m_innerHandle != 0 && m_ptyHandler != 0)\n    {\n        //disconnect all signals (readyRead, ...)\n        m_inSocket->disconnect();\n        m_outSocket->disconnect();\n\n        //disconnect for server\n        m_inSocket->disconnectFromServer();\n        m_outSocket->disconnectFromServer();\n\n        m_inSocket->deleteLater();\n        m_outSocket->deleteLater();\n\n        m_inSocket = 0;\n        m_outSocket = 0;\n\n        winpty_free(m_ptyHandler);\n        exitCode = CloseHandle(m_innerHandle);\n\n        m_ptyHandler = 0;\n        m_innerHandle = 0;\n        m_conInName = QString();\n        m_conOutName = QString();\n        m_pid = 0;\n    }\n    return exitCode;\n}\n\nIPtyProcess::PtyType WinPtyProcess::type()\n{\n    return IPtyProcess::WinPty;\n}\n\nQString WinPtyProcess::dumpDebugInfo()\n{\n#ifdef PTYQT_DEBUG\n    return QString(\"PID: %1, ConIn: %2, ConOut: %3, Type: %4, Cols: %5, Rows: %6, IsRunning: %7, Shell: %8\")\n            .arg(m_pid).arg(m_conInName).arg(m_conOutName).arg(type())\n            .arg(m_size.first).arg(m_size.second).arg(m_ptyHandler != nullptr)\n            .arg(m_shellPath);\n#else\n    return QString(\"Nothing...\");\n#endif\n}\n\nQIODevice *WinPtyProcess::notifier()\n{\n    return m_outSocket;\n}\n\nQByteArray WinPtyProcess::readAll()\n{\n    return m_outSocket->readAll();\n}\n\nqint64 WinPtyProcess::write(const QByteArray &byteArray)\n{\n    return m_inSocket->write(byteArray);\n}\n\nbool WinPtyProcess::isAvailable()\n{\n    return m_initPty;\n}\n\nvoid WinPtyProcess::moveToThread(QThread *targetThread)\n{\n    m_inSocket->moveToThread(targetThread);\n    m_outSocket->moveToThread(targetThread);\n}\n\nint WinPtyProcess::processList() const\n{\n    if (winpty_get_console_process_list) {\n        int list[64];\n        int n = winpty_get_console_process_list(m_ptyHandler,list,64,0);\n        return n;\n    }\n    return 0;\n}\n\nvoid WinPtyProcess::disconnected()\n{\n    emit exited();\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/core/winptyprocess.h",
    "content": "#ifndef WINPTYPROCESS_H\n#define WINPTYPROCESS_H\n\n#include \"iptyprocess.h\"\n#define _WIN32_WINNT  0x0501\n#include <windows.h>\n#include <QLocalSocket>\n#include \"winpty.h\"\n\nclass WinPtyProcess : public IPtyProcess\n{\n    Q_OBJECT\npublic:\n    WinPtyProcess();\n    virtual ~WinPtyProcess();\n\n    virtual bool startProcess(const QString &shellPath, const QStringList &arguments, const QString &workingDirectory, QStringList environment, qint16 cols, qint16 rows);\n    virtual bool resize(qint16 cols, qint16 rows);\n    virtual bool kill();\n    virtual PtyType type();\n    virtual QString dumpDebugInfo();\n    virtual QIODevice *notifier();\n    virtual QByteArray readAll();\n    virtual qint64 write(const QByteArray &byteArray);\n    virtual bool isAvailable();\n    virtual void moveToThread(QThread *targetThread);\n    virtual int processList() const;\npublic slots:\n    void disconnected();\nprivate:\n    winpty_t *m_ptyHandler;\n    HANDLE m_innerHandle;\n    QString m_conInName;\n    QString m_conOutName;\n    QLocalSocket *m_inSocket;\n    QLocalSocket *m_outSocket;\n    bool m_initPty;\n};\n\n#endif // WINPTYPROCESS_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/examples/CMakeLists.txt",
    "content": "add_subdirectory(xtermjs)\n#add_subdirectory(vt100terminal)\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/examples/vt100terminal/CMakeLists.txt",
    "content": "project(ptyqt-vt100terminal)\n\ninclude_directories(qvterminal/src/)\n\nset(VTLIB_SOURCE_FILES\n    qvterminal/src/qvtchar.cpp\n    qvterminal/src/qvtchar.h\n    qvterminal/src/qvtcharformat.cpp\n    qvterminal/src/qvtcharformat.h\n    qvterminal/src/qvterminal.cpp\n    qvterminal/src/qvterminal.h\n    qvterminal/src/qvtlayout.cpp\n    qvterminal/src/qvtlayout.h\n    qvterminal/src/qvtline.cpp\n    qvterminal/src/qvtline.h\n)\n\nfind_package(Qt5Widgets REQUIRED)\nfind_package(Qt5Gui REQUIRED)\n\n#add_library( qvterminal STATIC ${VTLIB_SOURCE_FILES} )\n#qt5_use_modules(qvterminal Widgets)\n\nadd_executable(vt100terminal_sample vt100terminal.cpp ptydevice.h ${VTLIB_SOURCE_FILES})\nadd_dependencies(vt100terminal_sample ptyqt)\nqt5_use_modules(vt100terminal_sample Widgets)\n\ntarget_link_libraries(vt100terminal_sample ptyqt Qt5::Core)\n\nif (MSVC)\n    add_dependencies(vt100terminal_sample winpty)\n    target_link_libraries(vt100terminal_sample Qt5::Network ${WINPTY_LIBS})\nendif()\n\nforeach( file_i ${WINPTY_DIST_FILES})\n    add_custom_command(\n    TARGET vt100terminal_sample\n    POST_BUILD\n    COMMAND ${CMAKE_COMMAND}\n    ARGS -E copy ${file_i} ${CMAKE_CURRENT_BINARY_DIR}\n)\nendforeach( file_i )\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/examples/vt100terminal/ptydevice.h",
    "content": "#ifndef PTYDEVICE_H\n#define PTYDEVICE_H\n\n#include \"ptyqt.h\"\n#include <QProcessEnvironment>\n\nclass PtyDevice : public QIODevice\n{\n    Q_OBJECT\npublic:\n\n    PtyDevice()\n    {\n        //use cmd.exe or bash, depends on target platform\n        IPtyProcess::PtyType ptyType = IPtyProcess::WinPty;\n#ifdef Q_OS_UNIX\n        ptyType = IPtyProcess::UnixPty;\n#endif\n\n        //create new Pty instance\n        m_pty = PtyQt::createPtyProcess(ptyType);\n\n        connect(m_pty->notifier(), &QIODevice::readyRead, [this](){\n            m_readBuffer.append(m_pty->readAll());\n            emitReadyRead();\n        });\n\n        setOpenMode(QIODevice::ReadWrite);\n    }\n    ~PtyDevice() { delete m_pty; }\n\n    void start()\n    {\n        QString shellPath = \"c:\\\\Windows\\\\system32\\\\cmd.exe\";\n    #ifdef Q_OS_UNIX\n        shellPath = \"/bin/bash\";\n    #endif\n\n        QProcessEnvironment env = QProcessEnvironment::systemEnvironment();\n        env.insert(\"TERM\", \"vt100\");\n        env.insert(\"COLUMNS\", \"80\");\n        env.insert(\"PS1\", \"> \");\n\n        //start Pty process ()\n        m_pty->startProcess(shellPath, env.toStringList(), 80, 24);\n    }\n\n    qint64 readData(char *data, qint64 maxlen)\n    {\n        qint64 readSize = qMin(maxlen, (qint64)m_readBuffer.size());\n\n        QByteArray tmp = m_readBuffer.left(readSize);\n        m_readBuffer.remove(0, readSize);\n        memcpy(data, tmp.data(), tmp.size());\n\n        return tmp.size();\n    }\n\n    qint64 writeData(const char *data, qint64 len)\n    {\n        qDebug() << \"write\" << QByteArray(data, len);\n        return m_pty->write(QByteArray(data, len));\n    }\n\n    bool   isSequential() { return true; }\n    qint64 bytesAvailable() { return m_readBuffer.size(); }\n    qint64 size() { return m_readBuffer.size(); }\n\n    void emitReadyRead()\n    {\n        emit readyRead();\n    }\n\nprivate:\n    IPtyProcess *m_pty;\n\n    QByteArray m_readBuffer;\n};\n\n#endif // PTYDEVICE_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/examples/vt100terminal/vt100terminal.cpp",
    "content": "#include <QApplication>\n#include <QTimer>\n#include \"qvterminal.h\"\n#include \"ptydevice.h\"\n\nint main(int argc, char *argv[])\n{\n    QApplication app(argc, argv);\n\n    QVTerminal vtTerm;\n\n    PtyDevice ptyDevice;\n\n    vtTerm.setIODevice(&ptyDevice);\n#ifdef Q_OS_WIN\n    vtTerm.setCrlf(true);\n#endif\n\n    vtTerm.show();\n    vtTerm.resize(640, 480);\n    ptyDevice.start();\n\n    //exec eventloop\n    bool res = app.exec();\n\n    return res;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/examples/xtermjs/CMakeLists.txt",
    "content": "project(ptyqt-xtermjs)\n\nfind_package(Qt5WebSockets CONFIG REQUIRED)\n\nadd_executable(xtermjs_sample xtermjs.cpp)\nadd_dependencies(xtermjs_sample ptyqt)\n\ntarget_link_libraries(xtermjs_sample ptyqt Qt5::Core ${Qt5WebSockets_LIBRARIES})\n\nif (MSVC)\n    target_link_libraries(xtermjs_sample Qt5::Network ${WINPTY_LIBS})\nendif()\n\nforeach( file_i ${WINPTY_DIST_FILES})\n    add_custom_command(\n    TARGET xtermjs_sample\n    POST_BUILD\n    COMMAND ${CMAKE_COMMAND}\n    ARGS -E copy ${file_i} ${CMAKE_CURRENT_BINARY_DIR}\n)\nendforeach( file_i )\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/examples/xtermjs/index.html",
    "content": "<!doctype html>\n  <html>\n    <head>\n      <link rel=\"stylesheet\" href=\"node_modules/xterm/dist/xterm.css\" />\n      <link rel=\"stylesheet\" href=\"style.css\" />\n      <script src=\"node_modules/xterm/dist/xterm.js\"></script>\n      <script src=\"node_modules/xterm/dist/addons/attach/attach.js\"></script>\n      <script src=\"node_modules/xterm/dist/addons/fit/fit.js\"></script>\n      <!--<script src=\"node_modules/xterm/dist/addons/winptyCompat/winptyCompat.js\"></script> before 3.13.0-->\n    </head>\n    <body>\n      <h1 style=\"color: #2D2E2C\">xterm.js + Pty-Qt + C++</h1>\n      <div id=\"terminal-container\"></div>\n      <script>\n            //document.getElementById('terminal-container').style.width = 80;\n            //document.getElementById('terminal-container').style.height = 24;\n\n            Terminal.applyAddon(attach);  // Apply the `attach` addon\n            Terminal.applyAddon(fit);\n            //Terminal.applyAddon(winptyCompat); //before 3.13.0\n\n            var term = new Terminal({ windowsMode: true }); //after 3.13.0\n            term.on('resize', (size) => {\n                console.log(size);\n            });\n\n            var socket = new WebSocket('ws://localhost:4242/ws');\n\n            term.attach(socket);\n\n            term.open(document.getElementById('terminal-container'));\n            //term.winptyCompatInit(); //before 3.13.0\n            term.fit();\n            term.focus();\n\t\t\t//install and open \"C:\\Program Files (x86)\\Far Manager\\far.exe\" for example UI\n      </script>\n    </body>\n  </html>\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/examples/xtermjs/style.css",
    "content": "body {\n    font-family: helvetica, sans-serif, arial;\n    font-size: 1em;\n    color: #111;\n}\n\nh1 {\n    text-align: center;\n}\n\n#terminal-container {\n    width: 800px;\n    height: 450px;\n    margin: 0 auto;\n    padding: 2px;\n}\n\np {\n    font-size: 0.9em;\n    font-style: italic\n}\n\n#option-container {\n    display: flex;\n    justify-content: center;\n}\n\n.option-group {\n    display: inline-block;\n    padding-left: 20px;\n    vertical-align: top;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/examples/xtermjs/xtermjs.cpp",
    "content": "#include <QCoreApplication>\n#include <QWebSocketServer>\n#include <QWebSocket>\n#include \"ptyqt.h\"\n#include <QTimer>\n#include <QProcessEnvironment>\n#include <QSysInfo>\n\n#define PORT 4242\n\n#define COLS 87\n#define ROWS 26\n\nint main(int argc, char *argv[])\n{\n    QCoreApplication app(argc, argv);\n\n    //start WebSockets server for receive connections from xterm.js\n    QWebSocketServer wsServer(\"TestServer\", QWebSocketServer::NonSecureMode);\n    if (!wsServer.listen(QHostAddress::Any, PORT))\n        return 1;\n\n    QMap<QWebSocket *, IPtyProcess *> sessions;\n\n    //create new session on new connection\n    QObject::connect(&wsServer, &QWebSocketServer::newConnection, [&wsServer, &sessions]()\n    {\n        //handle new connection\n        QWebSocket *wSocket = wsServer.nextPendingConnection();\n\n        //use cmd.exe or bash, depends on target platform\n        IPtyProcess::PtyType ptyType = IPtyProcess::WinPty;\n        qint32 buildNumber = QSysInfo::kernelVersion().split(\".\").last().toInt();\n        if (buildNumber >= CONPTY_MINIMAL_WINDOWS_VERSION)\n        {\n            qDebug() << \"Use ConPty instead of WinPty\";\n            ptyType = IPtyProcess::ConPty;\n        }\n\n        //force select WinPty\n        ptyType = IPtyProcess::WinPty;\n\n        QString shellPath = \"c:\\\\Windows\\\\system32\\\\cmd.exe\";\n        //shellPath = \"C:\\\\Program\\ Files\\\\Git\\\\bin\\\\bash.exe\";\n#ifdef Q_OS_UNIX\n        shellPath = \"/bin/sh\";\n        ptyType = IPtyProcess::UnixPty;\n#endif\n\n        //create new Pty instance\n        IPtyProcess *pty = PtyQt::createPtyProcess(ptyType);\n\n        qDebug() << \"New connection\" << wSocket->peerAddress() << wSocket->peerPort() << pty->pid();\n\n        //start Pty process ()\n        pty->startProcess(shellPath, QProcessEnvironment::systemEnvironment().toStringList(), COLS, ROWS);\n\n        if (!pty->lastError().isEmpty())\n        {\n            qDebug() << pty->lastError();\n            delete pty;\n            return;\n        }\n\n        //connect read channel from Pty process to write channel on websocket\n        QObject::connect(pty->notifier(), &QIODevice::readyRead, [wSocket, pty]()\n        {\n            QByteArray data = pty->readAll();\n            //qDebug() << \"< \" << data;\n            wSocket->sendTextMessage(data);\n        });\n\n        //connect read channel of Websocket to write channel of Pty process\n        QObject::connect(wSocket, &QWebSocket::textMessageReceived, [wSocket, pty](const QString &message)\n        {\n            //qDebug() << \"> \" << message.size() << message.at(0) << message << message.toUtf8() << QString::fromUtf8(message.toUtf8());\n            pty->write(message.toUtf8());\n        });\n\n        //for example handle disconnections, process crashes and stuff like that...\n        auto endSessionHandler = [wSocket, &sessions]()\n        {\n            IPtyProcess *pty = sessions.value(wSocket);\n            if (pty == 0)\n                return; //because can be called twice\n\n            sessions.remove(wSocket);\n\n            qDebug() << \"wSockMn\" << wSocket << pty;\n\n            if (wSocket->isValid())\n                wSocket->close();\n            wSocket->deleteLater();\n\n            pty->kill();\n            delete pty;\n        };\n\n        QObject::connect(wSocket, &QWebSocket::disconnected, endSessionHandler);\n\n#ifdef Q_OS_UNIX\n        QProcess *shellProcess = qobject_cast<QProcess *>(pty->notifier());\n        QObject::connect(shellProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),\n                         [endSessionHandler](int, QProcess::ExitStatus ) { endSessionHandler(); });\n#else\n        QLocalSocket *localSocket = qobject_cast<QLocalSocket *>(pty->notifier());\n        QObject::connect(localSocket, &QLocalSocket::disconnected, endSessionHandler);\n#endif\n\n        //add connection to list of active connections\n        sessions.insert(wSocket, pty);\n\n        qDebug() << pty->size();\n    });\n\n    //stop eventloop if needed\n    //QTimer::singleShot(5000, [](){ qApp->quit(); });\n\n    //exec eventloop\n    bool res = app.exec();\n\n    QMapIterator<QWebSocket *, IPtyProcess *> it(sessions);\n    while (it.hasNext())\n    {\n        it.next();\n\n        it.key()->deleteLater();\n        delete it.value();\n    }\n    sessions.clear();\n\n    return res;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/ptyqt.pri",
    "content": "LIBS *= -l$$qtLibraryName(ptyqt)\n\n\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/ptyqt.pro",
    "content": "TARGET = ptyqt\nTEMPLATE = lib\nCONFIG += staticlib\n\ninclude (../../liteideutils.pri)\n\nHEADERS += \\\n    core/iptyprocess.h \\\n    core/ptyqt.h\n\nSOURCES += \\\n    core/ptyqt.cpp\n\nwin32 {\nHEADERS += \\\n    core/winpty.h \\\n    core/winpty_constants.h\nQT += network\n}\n\nwin32-g++ {\nHEADERS += \\\n    core/winptyprocess.h\n\nSOURCES += \\\n    core/winptyprocess.cpp\n}\n\nwin32-msvc* {\nHEADERS += \\\n    core/conptyprocess.h\n\nSOURCES += \\\n    core/conptyprocess.cpp\n}\n\nunix {\nHEADERS += \\\n    core/unixptyprocess.h\n\nSOURCES += \\\n    core/unixptyprocess.cpp\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/tests/CMakeLists.txt",
    "content": "project(ptyqt-tests)\n\nenable_testing()\n\nfind_package(Qt5Test REQUIRED)\n\nadd_executable(ptyqt_tests ptyqt_tests.cpp)\nadd_dependencies(ptyqt_tests ptyqt)\nadd_test(ptyqt_tests ptyqt_tests)\n\nif (MSVC)\n    if (\"${PTYQT_DEBUG}\")\n        set(WINPTY_DEBUG_SERVER_PATH ${WINPTY_ROOT_DIR}/${TARGET_ARCH}/bin/winpty-debugserver.exe)\n        add_definitions(-DWINPTY_DEBUG_SRV_PATH=\"${WINPTY_DEBUG_SERVER_PATH}\")\n        message(\"WinPty debug server path \" ${WINPTY_DEBUG_SERVER_PATH})\n    endif()\nendif()\n\ntarget_link_libraries(ptyqt_tests ptyqt Qt5::Core Qt5::Test)\n\nif (MSVC)\n    target_link_libraries(ptyqt_tests Qt5::Network ${WINPTY_LIBS})\nendif()\n\nforeach( file_i ${WINPTY_DIST_FILES})\n    add_custom_command(\n    TARGET ptyqt_tests\n    POST_BUILD\n    COMMAND ${CMAKE_COMMAND}\n    ARGS -E copy ${file_i} ${CMAKE_CURRENT_BINARY_DIR}\n)\nendforeach( file_i )\n\n#file(COPY ${WINPTY_DIST_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})\n"
  },
  {
    "path": "liteidex/src/3rdparty/ptyqt/tests/ptyqt_tests.cpp",
    "content": "#include <QTest>\n#include \"ptyqt.h\"\n#include <QProcessEnvironment>\n#include <QThread>\n#ifdef Q_OS_WIN\n#include <windows.h>\n#include <tlhelp32.h>\n#endif\n#include <string>\n#include <QTimer>\n\n#ifdef Q_OS_WIN\n#ifndef _WINDEF_\ntypedef unsigned long DWORD;\n#endif\n#endif\n\n#define WINPTY_DBG_SERVER_NAME \"winpty-debugserver.exe\"\n#define WINPTY_AGENT_NAME \"winpty-agent.exe\"\n\n//increase it for visual control each shell\n#define DEBUG_SLEEP_SEC 1\n\nvoid sleepByEventLoop(int seconds)\n{\n    QEventLoop sleepLoop;\n    QTimer sleepTimer;\n    QObject::connect(&sleepTimer, &QTimer::timeout, &sleepLoop, &QEventLoop::quit);\n    sleepTimer.setInterval(seconds * 1000);\n    sleepTimer.setSingleShot(true);\n    sleepTimer.start();\n    sleepLoop.exec();\n}\n\n#ifdef Q_OS_WIN\nDWORD findProcessId(const std::string& processName, int parentProcessId = 0)\n{\n    PROCESSENTRY32 processInfo;\n    processInfo.dwSize = sizeof(processInfo);\n\n    HANDLE processesSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);\n    if (processesSnapshot == INVALID_HANDLE_VALUE)\n    {\n        return 0;\n    }\n\n    Process32First(processesSnapshot, &processInfo);\n    if (!processName.compare(processInfo.szExeFile))\n    {\n        if (parentProcessId == 0 || parentProcessId == processInfo.th32ParentProcessID)\n        {\n            CloseHandle(processesSnapshot);\n            return processInfo.th32ProcessID;\n        }\n    }\n\n    while (Process32Next(processesSnapshot, &processInfo))\n    {\n        if (!processName.compare(processInfo.szExeFile))\n        {\n            if (parentProcessId == 0 || parentProcessId == processInfo.th32ParentProcessID)\n            {\n                CloseHandle(processesSnapshot);\n                return processInfo.th32ProcessID;\n            }\n        }\n    }\n\n    CloseHandle(processesSnapshot);\n    return 0;\n}\n\nvoid killProcessByName(QString processName)\n{\n    if (findProcessId(processName.toStdString()))\n    {\n        system(QString(\"taskkill /im %1 /f\").arg(processName).toStdString().c_str());\n        sleepByEventLoop(1);\n    }\n}\n\nQStringList getShells()\n{\n    QString systemRoot = QProcessEnvironment::systemEnvironment().value(\"windir\");\n    if (systemRoot.trimmed().isEmpty())\n        systemRoot = QProcessEnvironment::systemEnvironment().value(\"WINDIR\");\n    if (systemRoot.trimmed().isEmpty())\n        systemRoot = \"c:\\\\Windows\";\n\n    QStringList possibleShells;\n    possibleShells << (systemRoot + \"\\\\system32\\\\cmd.exe\"); //reversed slashes\n    //possibleShells << (\"C:/Windows/system32/cmd.exe\"); //normal slashes\n    //possibleShells << (systemRoot + \"\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe\");\n    //possibleShells << \"C:\\\\Program\\ Files\\\\Git\\\\bin\\\\bash.exe\";\n    //possibleShells << \"C:\\\\Python27\\\\python.exe\";\n    //possibleShells << \"C:/Python27/pythonw.exe\";\n\n    QStringList shells;\n    foreach (QString possibleShell, possibleShells)\n    {\n        if (QFile::exists(possibleShell))\n            shells << possibleShell;\n    }\n\n    return shells;\n}\n#endif\n\nclass PtyQtTests : public QObject\n{\n    Q_OBJECT\nprivate slots:\n\n    //unix unit tests\n#ifdef Q_OS_UNIX\n    void unixpty()\n    {\n        QString shellPath = \"/bin/bash\";\n\n        QScopedPointer<IPtyProcess> unixPty(PtyQt::createPtyProcess(IPtyProcess::UnixPty));\n        QCOMPARE(unixPty->type(), IPtyProcess::UnixPty);\n        QVERIFY(unixPty->isAvailable());\n\n        //start UnixPty agent and cmd.exe\n        bool startResult = unixPty->startProcess(shellPath, QProcessEnvironment::systemEnvironment().toStringList(), 200, 80);\n#ifdef PTYQT_DEBUG\n        if (!startResult)\n            qDebug() << unixPty->lastError() << unixPty->dumpDebugInfo();\n#endif\n        QVERIFY(startResult);\n\n        //check pid\n        QVERIFY(unixPty->pid() != 0);\n\n        //check shell welcome\n        QEventLoop el;\n        auto connection = QObject::connect(unixPty->notifier(), &QIODevice::readyRead, [&unixPty, &el]() {\n            sleepByEventLoop(1);\n            qDebug() << \"unixPty.read\" << unixPty->readAll();\n            el.quit();\n        });\n        el.exec();\n        unixPty->notifier()->disconnect(connection);\n\n        //check shell read after write\n        bool testRes = false;\n        connection = QObject::connect(unixPty->notifier(), &QIODevice::readyRead, [&unixPty, &el, &testRes]() {\n            sleepByEventLoop(1);\n            QString res = QString::fromUtf8(unixPty->readAll());\n            //qDebug() << res;\n\n            //for e.g. bash return empty strings after needed data\n            if (res.isEmpty() && testRes)\n                return;\n\n            testRes = res.contains(\"ptyqt_tests\");\n            testRes = testRes && res.contains(\"Makefile\");\n            testRes = testRes && res.contains(\"cmake_install.cmake\");\n            el.quit();\n        });\n        qDebug() << \"ptyin:\" << unixPty->write(\"ls\\n\");\n        el.exec();\n        QVERIFY(testRes);\n        qDebug() << \"ptyin:\" << unixPty->write(\"ls -alh\\n\");\n        el.exec();\n        QVERIFY(testRes);\n        unixPty->notifier()->disconnect(connection);\n\n        //resize window\n        sleepByEventLoop(1);\n        QVERIFY(unixPty->resize(240, 90));\n    }\n#endif\n\n    //windows unit tests\n#ifdef Q_OS_WIN\n\n    //ConPty available only on Windows 10 released after 1903 (19H1) Windows release\n    void conpty()\n    {\n        qint32 buildNumber = QSysInfo::kernelVersion().split(\".\").last().toInt();\n        if (buildNumber < CONPTY_MINIMAL_WINDOWS_VERSION)\n        {\n            qDebug() << QString(\"Your Windows version doesn't support ConPty. Minimal version: %1. Your version: %2\").arg(CONPTY_MINIMAL_WINDOWS_VERSION).arg(buildNumber) << QSysInfo::kernelVersion();\n            return;\n        }\n\n        qsrand(QDateTime::currentMSecsSinceEpoch());\n\n        QStringList shells = getShells();\n\n        foreach (QString shellPath, shells)\n        {\n            qDebug() << \"Test\" << shellPath;\n            IPtyProcess::PtyType ptyType = IPtyProcess::ConPty;\n            QScopedPointer<IPtyProcess> conPty(PtyQt::createPtyProcess(ptyType));\n            QCOMPARE(conPty->type(), ptyType);\n            QVERIFY(conPty->isAvailable());\n\n            //check shell welcome\n            QEventLoop el;\n            auto connection = QObject::connect(conPty->notifier(), &QIODevice::readyRead, [&conPty, &el]() {\n                sleepByEventLoop(1);\n                //qDebug() << \"conPty.read\" << conPty->readAll();\n                conPty->readAll();\n                el.quit();\n            });\n\n            //start ConPty agent and cmd.exe\n            bool startResult = conPty->startProcess(shellPath, QProcessEnvironment::systemEnvironment().toStringList(), 200, 80);\n#ifdef PTYQT_DEBUG\n            if (!startResult)\n                qDebug() << conPty->lastError() << conPty->dumpDebugInfo();\n#endif\n            QVERIFY(startResult);\n\n            //check pid\n            QVERIFY(conPty->pid() != 0);\n\n            //check shell welcome\n            el.exec();\n            conPty->notifier()->disconnect(connection);\n\n            //check shell read after write\n            bool testRes = false;\n            connection = QObject::connect(conPty->notifier(), &QIODevice::readyRead, [&conPty, &el, &testRes]() {\n                sleepByEventLoop(1);\n                QString res = QString::fromUtf8(conPty->readAll());\n                //qDebug() << res;\n\n                //for e.g. bash return empty strings after needed data\n                if (res.isEmpty() && testRes)\n                    return;\n\n                testRes = res.contains(\"winpty-agent.exe\");\n                testRes = testRes && res.contains(\"winpty.dll\");\n                testRes = testRes && res.contains(\"ptyqt_tests.exe\");\n                el.quit();\n            });\n            qDebug() << conPty->write(\"dir\\r\\n\\r\\n\");\n            //sleepByEventLoop(1);\n            //qDebug() << conPty->readAll();\n            el.exec();\n            QVERIFY(testRes);\n            conPty->notifier()->disconnect(connection);\n\n            //resize window\n            sleepByEventLoop(1);\n            QVERIFY(conPty->resize(240, 90));\n\n            //kill shell process\n#ifdef PTYQT_DEBUG\n            qDebug() << conPty->dumpDebugInfo();\n            sleepByEventLoop(DEBUG_SLEEP_SEC);\n#endif\n            QVERIFY(conPty->kill());\n            sleepByEventLoop(1);\n        }\n    }\n\n    void winpty()\n    {\n        //QVERIFY(false); //force quit\n#ifdef PTYQT_DEBUG\n        //run debug server\n        killProcessByName(WINPTY_DBG_SERVER_NAME);\n\n        qint64 debugServerPid;\n        QProcess::startDetached(QString(WINPTY_DEBUG_SRV_PATH), QStringList() << \"--everyone\",\n                                QCoreApplication::applicationDirPath(), &debugServerPid);\n        QVERIFY(debugServerPid != 0);\n#endif\n\n        QStringList shells = getShells();\n\n        foreach (QString shellPath, shells)\n        {\n            qDebug() << \"Test\" << shellPath;\n\n            //create object\n            QScopedPointer<IPtyProcess> winPty(PtyQt::createPtyProcess(IPtyProcess::WinPty));\n            QCOMPARE(winPty->type(), IPtyProcess::WinPty);\n            QVERIFY(winPty->isAvailable());\n\n            //prepare to check shell welcome\n            QEventLoop el;\n            auto connection = QObject::connect(winPty->notifier(), &QIODevice::readyRead, [&winPty, &el]() {\n                sleepByEventLoop(1);\n                //qDebug() << \"winPty.read\" << winPty->readAll();\n                winPty->readAll();\n                el.quit();\n            });\n\n            //start WinPty agent and cmd.exe\n            bool startResult = winPty->startProcess(shellPath, QProcessEnvironment::systemEnvironment().toStringList(), 200, 80);\n#ifdef PTYQT_DEBUG\n            if (!startResult)\n                qDebug() << winPty->lastError() << winPty->dumpDebugInfo();\n#endif\n            QVERIFY(startResult);\n\n            //check pid (winPty->pid() - PID of child process of winpty-agent.exe)\n            QVERIFY(winPty->pid() != 0);\n            //DWORD winPtyAgentPid = findProcessId(QString(WINPTY_AGENT_NAME).toStdString());\n            //DWORD winPtyShellPid = findProcessId(QFileInfo(shellPath).fileName().toStdString(), winPtyAgentPid);\n            //QCOMPARE(winPty->pid(), winPtyShellPid);\n\n            //check shell welcome\n            el.exec();\n            winPty->notifier()->disconnect(connection);\n\n            //check shell read after write\n            bool testRes = false;\n            connection = QObject::connect(winPty->notifier(), &QIODevice::readyRead, [&winPty, &el, &testRes]() {\n                sleepByEventLoop(1);\n                QString res = QString::fromUtf8(winPty->readAll());\n                //qDebug() << res;\n\n                //for e.g. bash return empty strings after needed data\n                if (res.isEmpty() && testRes)\n                    return;\n\n                testRes = res.contains(\"winpty-agent.exe\");\n                testRes = testRes && res.contains(\"winpty.dll\");\n                testRes = testRes && res.contains(\"ptyqt_tests.exe\");\n                el.quit();\n            });\n            winPty->write(\"dir\\r\\n\");\n            el.exec();\n            QVERIFY(testRes);\n            winPty->notifier()->disconnect(connection);\n\n            //resize window\n            sleepByEventLoop(1);\n            QVERIFY(winPty->resize(240, 90));\n\n            //kill shell and winpty-agent processes\n#ifdef PTYQT_DEBUG\n            qDebug() << winPty->dumpDebugInfo();\n            sleepByEventLoop(DEBUG_SLEEP_SEC);\n#endif\n            QVERIFY(winPty->kill());\n            sleepByEventLoop(1);\n            //QCOMPARE(findProcessId(QFileInfo(shellPath).fileName().toStdString(), winPtyAgentPid), 0);\n            //QCOMPARE(findProcessId(QString(WINPTY_AGENT_NAME).toStdString()), 0);\n        }\n\n#ifdef PTYQT_DEBUG\n        killProcessByName(WINPTY_DBG_SERVER_NAME);\n#endif\n    }\n#endif\n};\n\nQTEST_MAIN(PtyQtTests)\n#include \"ptyqt_tests.moc\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/.gitignore",
    "content": "lib\nMakefile\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/CMakeLists.txt",
    "content": "PROJECT(qjson)\n\nset( CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII\" )\n\n# Stop cmake 2.6 from whining\nCMAKE_MINIMUM_REQUIRED(VERSION 2.6)\nCMAKE_POLICY(SET CMP0003 NEW)\n\nset(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR})\n\n# compile in debug mode\nIF(NOT CMAKE_BUILD_TYPE)\n  SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING\n      \"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel.\")\nENDIF(NOT CMAKE_BUILD_TYPE)\n\nIF(\"${CMAKE_BUILD_TYPE}\" MATCHES \"^Rel.*\")\n  ADD_DEFINITIONS(\"-DQT_NO_DEBUG_OUTPUT\")\nENDIF(\"${CMAKE_BUILD_TYPE}\" MATCHES \"^Rel.*\")\n\n# Ability to disable verbose debug output\nIF(QJSON_VERBOSE_DEBUG_OUTPUT)\n  ADD_DEFINITIONS(\"-DQJSON_VERBOSE_DEBUG_OUTPUT\")\nendif(QJSON_VERBOSE_DEBUG_OUTPUT)\n\nOPTION(OSX_FRAMEWORK \"Build a Mac OS X Framework\")\nSET(FRAMEWORK_INSTALL_DIR \"${CMAKE_INSTALL_PREFIX}/Library/Frameworks\"\n    CACHE PATH \"Where to place qjson.framework if OSX_FRAMEWORK is selected\")\n\n# Don't use absolute path in qjson-targets-*.cmake\n# (This will have no effect with CMake < 2.8)\nSET(QT_USE_IMPORTED_TARGETS TRUE)\n\n# Find Qt4\nFIND_PACKAGE( Qt4 REQUIRED )\n\nIF (NOT WIN32)\n  SET( QT_DONT_USE_QTGUI TRUE )\nENDIF()\n\n# Include the cmake file needed to use qt4\nINCLUDE( ${QT_USE_FILE} )\n\n#add extra search paths for libraries and includes\nSET (LIB_SUFFIX \"\" CACHE STRING \"Define suffix of directory name (32/64)\" )\nSET (LIB_INSTALL_DIR \"${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}\" CACHE STRING \"Directory where lib will install\")\nSET (INCLUDE_INSTALL_DIR \"${CMAKE_INSTALL_PREFIX}/include\" CACHE PATH \"The directory the headers are installed in\")\nSET (CMAKECONFIG_INSTALL_DIR \"${LIB_INSTALL_DIR}/cmake/${CMAKE_PROJECT_NAME}\" CACHE PATH \"Directory where to install QJSONConfig.cmake\")\n\nset(QJSON_LIB_MAJOR_VERSION \"0\")\nset(QJSON_LIB_MINOR_VERSION \"7\")\nset(QJSON_LIB_PATCH_VERSION \"1\")\n\nset(QJSON_LIB_VERSION_STRING \"${QJSON_LIB_MAJOR_VERSION}.${QJSON_LIB_MINOR_VERSION}.${QJSON_LIB_PATCH_VERSION}\")\n\nset(LIBRARY_OUTPUT_PATH \"${CMAKE_BINARY_DIR}/lib\" )\n\n# pkg-config\nIF (NOT WIN32)\n  CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/QJson.pc.in\n                  ${CMAKE_CURRENT_BINARY_DIR}/QJson.pc\n                  @ONLY)\n  INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/QJson.pc\n           DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)\nENDIF (NOT WIN32)\n\n# Subdirs\nADD_SUBDIRECTORY(src)\nIF (KDE4_BUILD_TESTS OR QJSON_BUILD_TESTS)\n  enable_testing()\n  ADD_SUBDIRECTORY(tests)\nENDIF (KDE4_BUILD_TESTS OR QJSON_BUILD_TESTS)\n\nCONFIGURE_FILE(\n  \"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in\"\n  \"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake\"\n  IMMEDIATE @ONLY)\n\nINSTALL(EXPORT qjson-export DESTINATION ${CMAKECONFIG_INSTALL_DIR} FILE QJSONTargets.cmake)\n\n# figure out the relative path from the installed Config.cmake file to the install prefix (which may be at\n# runtime different from the chosen CMAKE_INSTALL_PREFIX if under Windows the package was installed anywhere)\n# This relative path will be configured into the QJSONConfig.cmake\nfile(RELATIVE_PATH relInstallDir ${CMAKE_INSTALL_PREFIX}/${CMAKECONFIG_INSTALL_DIR} ${CMAKE_INSTALL_PREFIX} )\n\n# cmake-modules\nCONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/QJSONConfig.cmake.in\n               ${CMAKE_CURRENT_BINARY_DIR}/QJSONConfig.cmake\n               @ONLY)\nCONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/QJSONConfigVersion.cmake.in\n               ${CMAKE_CURRENT_BINARY_DIR}/QJSONConfigVersion.cmake\n               @ONLY)\nINSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/QJSONConfig.cmake\n              ${CMAKE_CURRENT_BINARY_DIR}/QJSONConfigVersion.cmake\n        DESTINATION \"${CMAKECONFIG_INSTALL_DIR}\")\n\nADD_CUSTOM_TARGET(uninstall\n  \"${CMAKE_COMMAND}\" -P \"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake\")\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/COPYING.lib",
    "content": "\t\t  GNU LESSER GENERAL PUBLIC LICENSE\n\t\t       Version 2.1, February 1999\n\n Copyright (C) 1991, 1999 Free Software Foundation, Inc.\n 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n[This is the first released version of the Lesser GPL.  It also counts\n as the successor of the GNU Library Public License, version 2, hence\n the version number 2.1.]\n\n\t\t\t    Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicenses are intended to guarantee your freedom to share and change\nfree software--to make sure the software is free for all its users.\n\n  This license, the Lesser General Public License, applies to some\nspecially designated software packages--typically libraries--of the\nFree Software Foundation and other authors who decide to use it.  You\ncan use it too, but we suggest you first think carefully about whether\nthis license or the ordinary General Public License is the better\nstrategy to use in any particular case, based on the explanations below.\n\n  When we speak of free software, we are referring to freedom of use,\nnot price.  Our General Public Licenses are designed to make sure that\nyou have the freedom to distribute copies of free software (and charge\nfor this service if you wish); that you receive source code or can get\nit if you want it; that you can change the software and use pieces of\nit in new free programs; and that you are informed that you can do\nthese things.\n\n  To protect your rights, we need to make restrictions that forbid\ndistributors to deny you these rights or to ask you to surrender these\nrights.  These restrictions translate to certain responsibilities for\nyou if you distribute copies of the library or if you modify it.\n\n  For example, if you distribute copies of the library, whether gratis\nor for a fee, you must give the recipients all the rights that we gave\nyou.  You must make sure that they, too, receive or can get the source\ncode.  If you link other code with the library, you must provide\ncomplete object files to the recipients, so that they can relink them\nwith the library after making changes to the library and recompiling\nit.  And you must show them these terms so they know their rights.\n\n  We protect your rights with a two-step method: (1) we copyright the\nlibrary, and (2) we offer you this license, which gives you legal\npermission to copy, distribute and/or modify the library.\n\n  To protect each distributor, we want to make it very clear that\nthere is no warranty for the free library.  Also, if the library is\nmodified by someone else and passed on, the recipients should know\nthat what they have is not the original version, so that the original\nauthor's reputation will not be affected by problems that might be\nintroduced by others.\n\f\n  Finally, software patents pose a constant threat to the existence of\nany free program.  We wish to make sure that a company cannot\neffectively restrict the users of a free program by obtaining a\nrestrictive license from a patent holder.  Therefore, we insist that\nany patent license obtained for a version of the library must be\nconsistent with the full freedom of use specified in this license.\n\n  Most GNU software, including some libraries, is covered by the\nordinary GNU General Public License.  This license, the GNU Lesser\nGeneral Public License, applies to certain designated libraries, and\nis quite different from the ordinary General Public License.  We use\nthis license for certain libraries in order to permit linking those\nlibraries into non-free programs.\n\n  When a program is linked with a library, whether statically or using\na shared library, the combination of the two is legally speaking a\ncombined work, a derivative of the original library.  The ordinary\nGeneral Public License therefore permits such linking only if the\nentire combination fits its criteria of freedom.  The Lesser General\nPublic License permits more lax criteria for linking other code with\nthe library.\n\n  We call this license the \"Lesser\" General Public License because it\ndoes Less to protect the user's freedom than the ordinary General\nPublic License.  It also provides other free software developers Less\nof an advantage over competing non-free programs.  These disadvantages\nare the reason we use the ordinary General Public License for many\nlibraries.  However, the Lesser license provides advantages in certain\nspecial circumstances.\n\n  For example, on rare occasions, there may be a special need to\nencourage the widest possible use of a certain library, so that it becomes\na de-facto standard.  To achieve this, non-free programs must be\nallowed to use the library.  A more frequent case is that a free\nlibrary does the same job as widely used non-free libraries.  In this\ncase, there is little to gain by limiting the free library to free\nsoftware only, so we use the Lesser General Public License.\n\n  In other cases, permission to use a particular library in non-free\nprograms enables a greater number of people to use a large body of\nfree software.  For example, permission to use the GNU C Library in\nnon-free programs enables many more people to use the whole GNU\noperating system, as well as its variant, the GNU/Linux operating\nsystem.\n\n  Although the Lesser General Public License is Less protective of the\nusers' freedom, it does ensure that the user of a program that is\nlinked with the Library has the freedom and the wherewithal to run\nthat program using a modified version of the Library.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.  Pay close attention to the difference between a\n\"work based on the library\" and a \"work that uses the library\".  The\nformer contains code derived from the library, whereas the latter must\nbe combined with the library in order to run.\n\f\n\t\t  GNU LESSER GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License Agreement applies to any software library or other\nprogram which contains a notice placed by the copyright holder or\nother authorized party saying it may be distributed under the terms of\nthis Lesser General Public License (also called \"this License\").\nEach licensee is addressed as \"you\".\n\n  A \"library\" means a collection of software functions and/or data\nprepared so as to be conveniently linked with application programs\n(which use some of those functions and data) to form executables.\n\n  The \"Library\", below, refers to any such software library or work\nwhich has been distributed under these terms.  A \"work based on the\nLibrary\" means either the Library or any derivative work under\ncopyright law: that is to say, a work containing the Library or a\nportion of it, either verbatim or with modifications and/or translated\nstraightforwardly into another language.  (Hereinafter, translation is\nincluded without limitation in the term \"modification\".)\n\n  \"Source code\" for a work means the preferred form of the work for\nmaking modifications to it.  For a library, complete source code means\nall the source code for all modules it contains, plus any associated\ninterface definition files, plus the scripts used to control compilation\nand installation of the library.\n\n  Activities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning a program using the Library is not restricted, and output from\nsuch a program is covered only if its contents constitute a work based\non the Library (independent of the use of the Library in a tool for\nwriting it).  Whether that is true depends on what the Library does\nand what the program that uses the Library does.\n  \n  1. You may copy and distribute verbatim copies of the Library's\ncomplete source code as you receive it, in any medium, provided that\nyou conspicuously and appropriately publish on each copy an\nappropriate copyright notice and disclaimer of warranty; keep intact\nall the notices that refer to this License and to the absence of any\nwarranty; and distribute a copy of this License along with the\nLibrary.\n\n  You may charge a fee for the physical act of transferring a copy,\nand you may at your option offer warranty protection in exchange for a\nfee.\n\f\n  2. You may modify your copy or copies of the Library or any portion\nof it, thus forming a work based on the Library, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) The modified work must itself be a software library.\n\n    b) You must cause the files modified to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    c) You must cause the whole of the work to be licensed at no\n    charge to all third parties under the terms of this License.\n\n    d) If a facility in the modified Library refers to a function or a\n    table of data to be supplied by an application program that uses\n    the facility, other than as an argument passed when the facility\n    is invoked, then you must make a good faith effort to ensure that,\n    in the event an application does not supply such function or\n    table, the facility still operates, and performs whatever part of\n    its purpose remains meaningful.\n\n    (For example, a function in a library to compute square roots has\n    a purpose that is entirely well-defined independent of the\n    application.  Therefore, Subsection 2d requires that any\n    application-supplied function or table used by this function must\n    be optional: if the application does not supply it, the square\n    root function must still compute square roots.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Library,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Library, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote\nit.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Library.\n\nIn addition, mere aggregation of another work not based on the Library\nwith the Library (or with a work based on the Library) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may opt to apply the terms of the ordinary GNU General Public\nLicense instead of this License to a given copy of the Library.  To do\nthis, you must alter all the notices that refer to this License, so\nthat they refer to the ordinary GNU General Public License, version 2,\ninstead of to this License.  (If a newer version than version 2 of the\nordinary GNU General Public License has appeared, then you can specify\nthat version instead if you wish.)  Do not make any other change in\nthese notices.\n\f\n  Once this change is made in a given copy, it is irreversible for\nthat copy, so the ordinary GNU General Public License applies to all\nsubsequent copies and derivative works made from that copy.\n\n  This option is useful when you wish to copy part of the code of\nthe Library into a program that is not a library.\n\n  4. You may copy and distribute the Library (or a portion or\nderivative of it, under Section 2) in object code or executable form\nunder the terms of Sections 1 and 2 above provided that you accompany\nit with the complete corresponding machine-readable source code, which\nmust be distributed under the terms of Sections 1 and 2 above on a\nmedium customarily used for software interchange.\n\n  If distribution of object code is made by offering access to copy\nfrom a designated place, then offering equivalent access to copy the\nsource code from the same place satisfies the requirement to\ndistribute the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  5. A program that contains no derivative of any portion of the\nLibrary, but is designed to work with the Library by being compiled or\nlinked with it, is called a \"work that uses the Library\".  Such a\nwork, in isolation, is not a derivative work of the Library, and\ntherefore falls outside the scope of this License.\n\n  However, linking a \"work that uses the Library\" with the Library\ncreates an executable that is a derivative of the Library (because it\ncontains portions of the Library), rather than a \"work that uses the\nlibrary\".  The executable is therefore covered by this License.\nSection 6 states terms for distribution of such executables.\n\n  When a \"work that uses the Library\" uses material from a header file\nthat is part of the Library, the object code for the work may be a\nderivative work of the Library even though the source code is not.\nWhether this is true is especially significant if the work can be\nlinked without the Library, or if the work is itself a library.  The\nthreshold for this to be true is not precisely defined by law.\n\n  If such an object file uses only numerical parameters, data\nstructure layouts and accessors, and small macros and small inline\nfunctions (ten lines or less in length), then the use of the object\nfile is unrestricted, regardless of whether it is legally a derivative\nwork.  (Executables containing this object code plus portions of the\nLibrary will still fall under Section 6.)\n\n  Otherwise, if the work is a derivative of the Library, you may\ndistribute the object code for the work under the terms of Section 6.\nAny executables containing that work also fall under Section 6,\nwhether or not they are linked directly with the Library itself.\n\f\n  6. As an exception to the Sections above, you may also combine or\nlink a \"work that uses the Library\" with the Library to produce a\nwork containing portions of the Library, and distribute that work\nunder terms of your choice, provided that the terms permit\nmodification of the work for the customer's own use and reverse\nengineering for debugging such modifications.\n\n  You must give prominent notice with each copy of the work that the\nLibrary is used in it and that the Library and its use are covered by\nthis License.  You must supply a copy of this License.  If the work\nduring execution displays copyright notices, you must include the\ncopyright notice for the Library among them, as well as a reference\ndirecting the user to the copy of this License.  Also, you must do one\nof these things:\n\n    a) Accompany the work with the complete corresponding\n    machine-readable source code for the Library including whatever\n    changes were used in the work (which must be distributed under\n    Sections 1 and 2 above); and, if the work is an executable linked\n    with the Library, with the complete machine-readable \"work that\n    uses the Library\", as object code and/or source code, so that the\n    user can modify the Library and then relink to produce a modified\n    executable containing the modified Library.  (It is understood\n    that the user who changes the contents of definitions files in the\n    Library will not necessarily be able to recompile the application\n    to use the modified definitions.)\n\n    b) Use a suitable shared library mechanism for linking with the\n    Library.  A suitable mechanism is one that (1) uses at run time a\n    copy of the library already present on the user's computer system,\n    rather than copying library functions into the executable, and (2)\n    will operate properly with a modified version of the library, if\n    the user installs one, as long as the modified version is\n    interface-compatible with the version that the work was made with.\n\n    c) Accompany the work with a written offer, valid for at\n    least three years, to give the same user the materials\n    specified in Subsection 6a, above, for a charge no more\n    than the cost of performing this distribution.\n\n    d) If distribution of the work is made by offering access to copy\n    from a designated place, offer equivalent access to copy the above\n    specified materials from the same place.\n\n    e) Verify that the user has already received a copy of these\n    materials or that you have already sent this user a copy.\n\n  For an executable, the required form of the \"work that uses the\nLibrary\" must include any data and utility programs needed for\nreproducing the executable from it.  However, as a special exception,\nthe materials to be distributed need not include anything that is\nnormally distributed (in either source or binary form) with the major\ncomponents (compiler, kernel, and so on) of the operating system on\nwhich the executable runs, unless that component itself accompanies\nthe executable.\n\n  It may happen that this requirement contradicts the license\nrestrictions of other proprietary libraries that do not normally\naccompany the operating system.  Such a contradiction means you cannot\nuse both them and the Library together in an executable that you\ndistribute.\n\f\n  7. You may place library facilities that are a work based on the\nLibrary side-by-side in a single library together with other library\nfacilities not covered by this License, and distribute such a combined\nlibrary, provided that the separate distribution of the work based on\nthe Library and of the other library facilities is otherwise\npermitted, and provided that you do these two things:\n\n    a) Accompany the combined library with a copy of the same work\n    based on the Library, uncombined with any other library\n    facilities.  This must be distributed under the terms of the\n    Sections above.\n\n    b) Give prominent notice with the combined library of the fact\n    that part of it is a work based on the Library, and explaining\n    where to find the accompanying uncombined form of the same work.\n\n  8. You may not copy, modify, sublicense, link with, or distribute\nthe Library except as expressly provided under this License.  Any\nattempt otherwise to copy, modify, sublicense, link with, or\ndistribute the Library is void, and will automatically terminate your\nrights under this License.  However, parties who have received copies,\nor rights, from you under this License will not have their licenses\nterminated so long as such parties remain in full compliance.\n\n  9. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Library or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Library (or any work based on the\nLibrary), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Library or works based on it.\n\n  10. Each time you redistribute the Library (or any work based on the\nLibrary), the recipient automatically receives a license from the\noriginal licensor to copy, distribute, link with or modify the Library\nsubject to these terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties with\nthis License.\n\f\n  11. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Library at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Library by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Library.\n\nIf any portion of this section is held invalid or unenforceable under any\nparticular circumstance, the balance of the section is intended to apply,\nand the section as a whole is intended to apply in other circumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  12. If the distribution and/or use of the Library is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Library under this License may add\nan explicit geographical distribution limitation excluding those countries,\nso that distribution is permitted only in or among countries not thus\nexcluded.  In such case, this License incorporates the limitation as if\nwritten in the body of this License.\n\n  13. The Free Software Foundation may publish revised and/or new\nversions of the Lesser General Public License from time to time.\nSuch new versions will be similar in spirit to the present version,\nbut may differ in detail to address new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Library\nspecifies a version number of this License which applies to it and\n\"any later version\", you have the option of following the terms and\nconditions either of that version or of any later version published by\nthe Free Software Foundation.  If the Library does not specify a\nlicense version number, you may choose any version ever published by\nthe Free Software Foundation.\n\f\n  14. If you wish to incorporate parts of the Library into other free\nprograms whose distribution conditions are incompatible with these,\nwrite to the author to ask for permission.  For software which is\ncopyrighted by the Free Software Foundation, write to the Free\nSoftware Foundation; we sometimes make exceptions for this.  Our\ndecision will be guided by the two goals of preserving the free status\nof all derivatives of our free software and of promoting the sharing\nand reuse of software generally.\n\n\t\t\t    NO WARRANTY\n\n  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\nWARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\nEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\nOTHER PARTIES PROVIDE THE LIBRARY \"AS IS\" WITHOUT WARRANTY OF ANY\nKIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\nLIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\nWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\nAND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\nFOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\nCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\nLIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\nRENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\nFAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\nSUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGES.\n\n\t\t     END OF TERMS AND CONDITIONS\n\f\n           How to Apply These Terms to Your New Libraries\n\n  If you develop a new library, and you want it to be of the greatest\npossible use to the public, we recommend making it free software that\neveryone can redistribute and change.  You can do so by permitting\nredistribution under these terms (or, alternatively, under the terms of the\nordinary General Public License).\n\n  To apply these terms, attach the following notices to the library.  It is\nsafest to attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least the\n\"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the library's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License version 2.1, as published by the Free Software Foundation.\n    \n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\nAlso add information on how to contact you by electronic and paper mail.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the library, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the\n  library `Frob' (a library for tweaking knobs) written by James Random Hacker.\n\n  <signature of Ty Coon>, 1 April 1990\n  Ty Coon, President of Vice\n\nThat's all there is to it!\n\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/ChangeLog",
    "content": "Tue Jan 31 10:15:06 CET 2012  Flavio Castelli <flavio@castelli.name>\n\n\t* Make possible to build qjson as an OS X framework.\n\nFri Nov 04 16:50:56 CET 2011  Flavio Castelli <flavio@castelli.name>\n\n\t* Make possible to set double precision during serialization.\n\nWed Aug 24 17:58:56 CEST 2011  Flavio Castelli <flavio@castelli.name>\n\n\t* Buildsystem adjustments, fix issues mentioned here:\n\t\t- http://lists.kde.org/?l=kde-buildsystem&m=130947194605100&w=3\n\t\t- http://lists.kde.org/?l=kde-buildsystem&m=128835747626464&w=3\n\t\tThe biggest difference now is that FindQJSON.cmake is not provided\n\t\tanymore. Instead, QJSONConfig.cmake and QJSONConfigVersion.cmake are\n\t\tinstalled and can be used in find_package(QJSON) calls. Applications\n\t\tusing QJson can write their own FindQJSON.cmake files if they need to.\n\nFri Apr 23:04:29 CEST 2011  Flavio Castelli <flavio@castelli.name>\n\n\t* Fixed QVariant de-serialization. QVariant properties were ignored\n\t  during QVariant -> QObject conversion.\n\nSun Dec 18:59:28 CET 2010  Flavio Castelli <flavio@castelli.name>\n\n\t* It's now possible to indent the output produced by the Serializer.\n\nMon Sep 06 18:53:02 CEST 2010  Flavio Castelli  <flavio@castelli.name>\n\n\t* 50% performance improvement when parsing numbers.\n\nSun Jul 04 15:41:08 CEST 2010  Flavio Castelli  <flavio@castelli.name>\n\n\t* fix make install when not installing as root\n\t* provide \"make uninstall\"\n\nTue Jun 15 13:16:57 CEST 2010  Flavio Castelli  <flavio@castelli.name>\n\n\t* Allow top level values\n\n----------------------------------------------------------------------\nSat Mar 13 23:57:00 CEST 2009 - flavio@castelli.name\n\n  * Merged the symbian branch into master,\n\n----------------------------------------------------------------------\nSun Oct 11 19:18:00 CEST 2009 - flavio@castelli.name\n\n * Updated to 0.6.3: fixed a bug affecting ulonglong numbers serialization.\n\n-------------------------------------------------------------------\nWed Sep 15 19:21:00 CEST 2009 - flavio@castelli.name\n\n * Updated to 0.6.2: fixed a bug affecting ulonglong numbers parsing.\n\n-------------------------------------------------------------------\nWed Sep 09 09:55:00 CEST 2009 - flavio@castelli.name\n\n * Updated to 0.6.1: relevant bugs fixed.\n * Moved the SerializerRunnable class inside QJson namespace.\n * Fixed a bug in cmdline_tester.\n\n-------------------------------------------------------------------\nMon Jul 20 15:24:32 CEST 2009 - prusnak@suse.cz\n\n * Updated to 0.6.0 (KDE SVN rev 999750).\n\n-------------------------------------------------------------------\nMon Apr 07 00:00:00 UTC 2009 - flavio@castelli.name\n\n * Released 0.5.1 - added unicode support.\n\n-------------------------------------------------------------------\nMon Apr 03 00:00:00 UTC 2009 - flavio@castelli.name\n\n * First release.\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/INSTALL",
    "content": "Installing QJson\n--------------\n\nQJson requires:\n- Qt 4.0 or greater\n- cmake 2.6 or greater\n\nSome possible cmake options:\n -DCMAKE_BUILD_TYPE=DEBUG\n   enables some debug output (other than making easier to debug the code)\n -DQJSON_BUILD_TESTS=yes or -DKDE4_BUILD_TESTS=yes\n   builds the unit tests\n -DCMAKE_INSTALL_PREFIX=${HOME}/testinstall\n   install qjson in a custom directory\n -DCMAKE_INCLUDE_PATH=${HOME}/testinstall/include\n   include a custom include directory\n -DCMAKE_LIBRARY_PATH=${HOME}/testinstall/lib\n   include a custom library directory\n -DLIB_DESTINATION=lib64\n   if you have a 64 bit system with separate libraries for 64 bit libraries\n -DQJSON_VERBOSE_DEBUG_OUTPUT:BOOL=ON\n   more debugging statements are generated by the parser. It's useful only if you are trying to fix the bison grammar.\n\nFor Unix/Linux/Mac:\n  mkdir build\n  cd build\n  cmake -DCMAKE_INSTALL_PREFIX=_preferred_path_ ..\n  make\n  make install\n  /sbin/ldconfig, if necessary\n\nFor Mac:\nIt's possible to build qjson as an OS X framework using the OSX_FRAMEWORK option.\n\nFor Symbian:\n\tRead this page: http://qjson.sourceforge.net/get_it/symbian.html\n\nFor Windows:\n\tRead this page: http://qjson.sourceforge.net/get_it/windows.html\n\nPlease report problems to:\n  https://lists.sourceforge.net/mailman/listinfo/qjson-devel\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/QJSONConfig.cmake.in",
    "content": "GET_FILENAME_COMPONENT(myDir ${CMAKE_CURRENT_LIST_FILE} PATH)\n\nSET(QJSON_LIBRARIES qjson)\nSET(QJSON_INCLUDE_DIR \"@INCLUDE_INSTALL_DIR@\")\n\ninclude(${myDir}/QJSONTargets.cmake)\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/QJSONConfigVersion.cmake.in",
    "content": "SET(PACKAGE_VERSION \"@QJSON_LIB_VERSION_STRING@\")\nIF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)\n  SET(PACKAGE_VERSION_EXACT TRUE)\nENDIF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)\nIF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)\n  SET(PACKAGE_VERSION_COMPATIBLE TRUE)\nELSE (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)\n  SET(PACKAGE_VERSION_UNSUITABLE TRUE)\nENDIF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/QJson.pc.in",
    "content": "prefix=@CMAKE_INSTALL_PREFIX@\nexec_prefix=${prefix}\nlibdir=@LIB_INSTALL_DIR@\nincludedir=@INCLUDE_INSTALL_DIR@\n\nName: QJson\nDescription: QJson is a qt-based library that maps JSON data to QVariant objects\nVersion: @QJSON_LIB_MAJOR_VERSION@.@QJSON_LIB_MINOR_VERSION@.@QJSON_LIB_PATCH_VERSION@\nRequires: QtCore\nLibs: -L${libdir} -lqjson\nCflags: -I${includedir}"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/README",
    "content": "QJson\n-------------------------------------------------\nWebsite: http://qjson.sourceforge.net/\nMailing List: https://lists.sourceforge.net/mailman/listinfo/qjson-devel\n\nProject Lead/Maintainer (2008-current):\n  Flavio Castelli <flavio@castelli.name>\n\nInstall\n-------\n  For installation or compiling instructions, see the INSTALL file.\n\nLicense\n-------\n  This library is licensed under the Lesser GNU General Public License version 2.1.\n  See the COPYING.lib file for more information.\n\nDescription\n-----------\n  JSON (JavaScript Object Notation) is a lightweight data-interchange format.\n  It can represents integer, real number, string, an ordered sequence of value, and a collection of name/value pairs.\n\n  QJson is a qt-based library that maps JSON data to QVariant objects.\n  JSON arrays will be mapped to QVariantList instances, while JSON's objects will be mapped to QVariantMap.\n\nHappy hacking\nFlavio\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/cmake_uninstall.cmake.in",
    "content": "IF(NOT EXISTS \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\")\n  MESSAGE(FATAL_ERROR \"Cannot find install manifest: \\\"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\\\"\")\nENDIF(NOT EXISTS \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\")\n\nFILE(READ \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\" files)\nSTRING(REGEX REPLACE \"\\n\" \";\" files \"${files}\")\nFOREACH(file ${files})\n  MESSAGE(STATUS \"Uninstalling \\\"$ENV{DESTDIR}${file}\\\"\")\n  EXEC_PROGRAM(\n  \"@CMAKE_COMMAND@\" ARGS \"-E remove \\\"$ENV{DESTDIR}${file}\\\"\"\n  OUTPUT_VARIABLE rm_out\n  RETURN_VALUE rm_retval\n  )\n  IF(NOT \"${rm_retval}\" STREQUAL 0)\n  MESSAGE(FATAL_ERROR \"Problem when removing \\\"$ENV{DESTDIR}${file}\\\"\")\n  ENDIF(NOT \"${rm_retval}\" STREQUAL 0)\nENDFOREACH(file)\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/doc/Doxyfile",
    "content": "# Doxyfile 1.5.6\n\n#---------------------------------------------------------------------------\n# Project related configuration options\n#---------------------------------------------------------------------------\nDOXYFILE_ENCODING      = UTF-8\nPROJECT_NAME           = QJson\nPROJECT_NUMBER         = 0.7.0\nOUTPUT_DIRECTORY       = ./\nCREATE_SUBDIRS         = NO\nOUTPUT_LANGUAGE        = English\nBRIEF_MEMBER_DESC      = YES\nREPEAT_BRIEF           = YES\nABBREVIATE_BRIEF       = \"The $name class\" \\\n                         \"The $name widget\" \\\n                         \"The $name file\" \\\n                         is \\\n                         provides \\\n                         specifies \\\n                         contains \\\n                         represents \\\n                         a \\\n                         an \\\n                         the\nALWAYS_DETAILED_SEC    = NO\nINLINE_INHERITED_MEMB  = NO\nFULL_PATH_NAMES        = YES\nSTRIP_FROM_PATH        = \nSTRIP_FROM_INC_PATH    = \nSHORT_NAMES            = NO\nJAVADOC_AUTOBRIEF      = NO\nQT_AUTOBRIEF           = NO\nMULTILINE_CPP_IS_BRIEF = NO\nDETAILS_AT_TOP         = NO\nINHERIT_DOCS           = YES\nSEPARATE_MEMBER_PAGES  = NO\nTAB_SIZE               = 8\nALIASES                = \nOPTIMIZE_OUTPUT_FOR_C  = NO\nOPTIMIZE_OUTPUT_JAVA   = NO\nOPTIMIZE_FOR_FORTRAN   = NO\nOPTIMIZE_OUTPUT_VHDL   = NO\nBUILTIN_STL_SUPPORT    = NO\nCPP_CLI_SUPPORT        = NO\nSIP_SUPPORT            = NO\nIDL_PROPERTY_SUPPORT   = YES\nDISTRIBUTE_GROUP_DOC   = NO\nSUBGROUPING            = YES\nTYPEDEF_HIDES_STRUCT   = NO\n#---------------------------------------------------------------------------\n# Build related configuration options\n#---------------------------------------------------------------------------\nEXTRACT_ALL            = NO\nEXTRACT_PRIVATE        = NO\nEXTRACT_STATIC         = NO\nEXTRACT_LOCAL_CLASSES  = YES\nEXTRACT_LOCAL_METHODS  = NO\nEXTRACT_ANON_NSPACES   = NO\nHIDE_UNDOC_MEMBERS     = YES\nHIDE_UNDOC_CLASSES     = YES\nHIDE_FRIEND_COMPOUNDS  = NO\nHIDE_IN_BODY_DOCS      = NO\nINTERNAL_DOCS          = NO\nCASE_SENSE_NAMES       = YES\nHIDE_SCOPE_NAMES       = NO\nSHOW_INCLUDE_FILES     = YES\nINLINE_INFO            = YES\nSORT_MEMBER_DOCS       = YES\nSORT_BRIEF_DOCS        = NO\nSORT_GROUP_NAMES       = NO\nSORT_BY_SCOPE_NAME     = NO\nGENERATE_TODOLIST      = YES\nGENERATE_TESTLIST      = YES\nGENERATE_BUGLIST       = YES\nGENERATE_DEPRECATEDLIST= YES\nENABLED_SECTIONS       = \nMAX_INITIALIZER_LINES  = 30\nSHOW_USED_FILES        = YES\nSHOW_DIRECTORIES       = NO\nSHOW_FILES             = YES\nSHOW_NAMESPACES        = YES\nFILE_VERSION_FILTER    = \n#---------------------------------------------------------------------------\n# configuration options related to warning and progress messages\n#---------------------------------------------------------------------------\nQUIET                  = NO\nWARNINGS               = YES\nWARN_IF_UNDOCUMENTED   = YES\nWARN_IF_DOC_ERROR      = YES\nWARN_NO_PARAMDOC       = NO\nWARN_FORMAT            = \"$file:$line: $text\"\nWARN_LOGFILE           = \n#---------------------------------------------------------------------------\n# configuration options related to the input files\n#---------------------------------------------------------------------------\nINPUT                  = ./qjson.dox \\\n                         ../src\nINPUT_ENCODING         = UTF-8\nFILE_PATTERNS          = *.c \\\n                         *.cc \\\n                         *.cxx \\\n                         *.cpp \\\n                         *.c++ \\\n                         *.d \\\n                         *.java \\\n                         *.ii \\\n                         *.ixx \\\n                         *.ipp \\\n                         *.i++ \\\n                         *.inl \\\n                         *.h \\\n                         *.hh \\\n                         *.hxx \\\n                         *.hpp \\\n                         *.h++ \\\n                         *.idl \\\n                         *.odl \\\n                         *.cs \\\n                         *.php \\\n                         *.php3 \\\n                         *.inc \\\n                         *.m \\\n                         *.mm \\\n                         *.dox \\\n                         *.py \\\n                         *.f90 \\\n                         *.f \\\n                         *.vhd \\\n                         *.vhdl \\\n                         *.C \\\n                         *.CC \\\n                         *.C++ \\\n                         *.II \\\n                         *.I++ \\\n                         *.H \\\n                         *.HH \\\n                         *.H++ \\\n                         *.CS \\\n                         *.PHP \\\n                         *.PHP3 \\\n                         *.M \\\n                         *.MM \\\n                         *.PY \\\n                         *.F90 \\\n                         *.F \\\n                         *.VHD \\\n                         *.VHDL\nRECURSIVE              = YES\nEXCLUDE                = \nEXCLUDE_SYMLINKS       = NO\nEXCLUDE_PATTERNS       = \nEXCLUDE_SYMBOLS        = \nEXAMPLE_PATH           = \nEXAMPLE_PATTERNS       = *\nEXAMPLE_RECURSIVE      = NO\nIMAGE_PATH             = \nINPUT_FILTER           = \nFILTER_PATTERNS        = \nFILTER_SOURCE_FILES    = NO\n#---------------------------------------------------------------------------\n# configuration options related to source browsing\n#---------------------------------------------------------------------------\nSOURCE_BROWSER         = YES\nINLINE_SOURCES         = NO\nSTRIP_CODE_COMMENTS    = YES\nREFERENCED_BY_RELATION = YES\nREFERENCES_RELATION    = YES\nREFERENCES_LINK_SOURCE = YES\nUSE_HTAGS              = NO\nVERBATIM_HEADERS       = YES\n#---------------------------------------------------------------------------\n# configuration options related to the alphabetical class index\n#---------------------------------------------------------------------------\nALPHABETICAL_INDEX     = NO\nCOLS_IN_ALPHA_INDEX    = 5\nIGNORE_PREFIX          = \n#---------------------------------------------------------------------------\n# configuration options related to the HTML output\n#---------------------------------------------------------------------------\nGENERATE_HTML          = YES\nHTML_OUTPUT            = html\nHTML_FILE_EXTENSION    = .html\nHTML_HEADER            = ./header.html\nHTML_FOOTER            = ./footer.html\nHTML_STYLESHEET        = \nHTML_ALIGN_MEMBERS     = YES\nGENERATE_HTMLHELP      = NO\nGENERATE_DOCSET        = NO\nDOCSET_FEEDNAME        = \"Doxygen generated docs\"\nDOCSET_BUNDLE_ID       = org.doxygen.Project\nHTML_DYNAMIC_SECTIONS  = NO\nCHM_FILE               = \nHHC_LOCATION           = \nGENERATE_CHI           = NO\nCHM_INDEX_ENCODING     = \nBINARY_TOC             = NO\nTOC_EXPAND             = NO\nDISABLE_INDEX          = NO\nENUM_VALUES_PER_LINE   = 4\nGENERATE_TREEVIEW      = NO\nTREEVIEW_WIDTH         = 250\nFORMULA_FONTSIZE       = 10\n#---------------------------------------------------------------------------\n# configuration options related to the LaTeX output\n#---------------------------------------------------------------------------\nGENERATE_LATEX         = NO\nLATEX_OUTPUT           = latex\nLATEX_CMD_NAME         = latex\nMAKEINDEX_CMD_NAME     = makeindex\nCOMPACT_LATEX          = NO\nPAPER_TYPE             = a4wide\nEXTRA_PACKAGES         = \nLATEX_HEADER           = \nPDF_HYPERLINKS         = YES\nUSE_PDFLATEX           = YES\nLATEX_BATCHMODE        = NO\nLATEX_HIDE_INDICES     = NO\n#---------------------------------------------------------------------------\n# configuration options related to the RTF output\n#---------------------------------------------------------------------------\nGENERATE_RTF           = NO\nRTF_OUTPUT             = rtf\nCOMPACT_RTF            = NO\nRTF_HYPERLINKS         = NO\nRTF_STYLESHEET_FILE    = \nRTF_EXTENSIONS_FILE    = \n#---------------------------------------------------------------------------\n# configuration options related to the man page output\n#---------------------------------------------------------------------------\nGENERATE_MAN           = NO\nMAN_OUTPUT             = man\nMAN_EXTENSION          = .3\nMAN_LINKS              = NO\n#---------------------------------------------------------------------------\n# configuration options related to the XML output\n#---------------------------------------------------------------------------\nGENERATE_XML           = NO\nXML_OUTPUT             = xml\nXML_SCHEMA             = \nXML_DTD                = \nXML_PROGRAMLISTING     = YES\n#---------------------------------------------------------------------------\n# configuration options for the AutoGen Definitions output\n#---------------------------------------------------------------------------\nGENERATE_AUTOGEN_DEF   = NO\n#---------------------------------------------------------------------------\n# configuration options related to the Perl module output\n#---------------------------------------------------------------------------\nGENERATE_PERLMOD       = NO\nPERLMOD_LATEX          = NO\nPERLMOD_PRETTY         = YES\nPERLMOD_MAKEVAR_PREFIX = \n#---------------------------------------------------------------------------\n# Configuration options related to the preprocessor   \n#---------------------------------------------------------------------------\nENABLE_PREPROCESSING   = YES\nMACRO_EXPANSION        = NO\nEXPAND_ONLY_PREDEF     = NO\nSEARCH_INCLUDES        = YES\nINCLUDE_PATH           = \nINCLUDE_FILE_PATTERNS  = \nPREDEFINED             = \nEXPAND_AS_DEFINED      = \nSKIP_FUNCTION_MACROS   = YES\n#---------------------------------------------------------------------------\n# Configuration::additions related to external references   \n#---------------------------------------------------------------------------\nTAGFILES               = \nGENERATE_TAGFILE       = \nALLEXTERNALS           = NO\nEXTERNAL_GROUPS        = YES\nPERL_PATH              = /usr/bin/perl\n#---------------------------------------------------------------------------\n# Configuration options related to the dot tool   \n#---------------------------------------------------------------------------\nCLASS_DIAGRAMS         = NO\nMSCGEN_PATH            = \nHIDE_UNDOC_RELATIONS   = YES\nHAVE_DOT               = NO\nDOT_FONTNAME           = FreeSans\nDOT_FONTPATH           = \nCLASS_GRAPH            = YES\nCOLLABORATION_GRAPH    = YES\nGROUP_GRAPHS           = YES\nUML_LOOK               = NO\nTEMPLATE_RELATIONS     = NO\nINCLUDE_GRAPH          = YES\nINCLUDED_BY_GRAPH      = YES\nCALL_GRAPH             = NO\nCALLER_GRAPH           = NO\nGRAPHICAL_HIERARCHY    = YES\nDIRECTORY_GRAPH        = YES\nDOT_IMAGE_FORMAT       = png\nDOT_PATH               = \nDOTFILE_DIRS           = \nDOT_GRAPH_MAX_NODES    = 50\nMAX_DOT_GRAPH_DEPTH    = 1000\nDOT_TRANSPARENT        = YES\nDOT_MULTI_TARGETS      = NO\nGENERATE_LEGEND        = YES\nDOT_CLEANUP            = YES\n#---------------------------------------------------------------------------\n# Configuration::additions related to the search engine   \n#---------------------------------------------------------------------------\nSEARCHENGINE           = NO\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/doc/footer.html",
    "content": "<hr>\n<table width=\"100%\">\n  <tr>\n    <td width=\"10%\" align=\"left\" valign=\"center\">\n      <a href=\"http://sourceforge.net\"> \n      <img\n      src=\"http://sourceforge.net/sflogo.php?group_id=144446\"\n      width=\"88\" height=\"31\" border=\"0\" alt=\"SourceForge Logo\"></a>\n    </td>\n    <td width=\"20%\" align=\"left\" valign=\"center\">\n      hosts this site.\n    </td>\n    <td>\n    </td>\n    <td align=\"right\" valign=\"center\">\n      Send comments to:<br>\n      <a href=\"mailto:qjson-devel@lists.sourceforge.net\">QJson Developers</a>\n    </td>\n  </tr>\n</table>\n\n<script type=\"text/javascript\">\nvar gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");\ndocument.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));\n</script>\n<script type=\"text/javascript\">\nvar pageTracker = _gat._getTracker(\"UA-3214988-2\");\npageTracker._trackPageview();\n</script>\n\n</body> \n</html>\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/doc/header.html",
    "content": "<html>\n<head>\n<title>\nQJson - a Qt based library for mapping JSON data to QVariant objects\n</title>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\">\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\">\n</head>\n\n<body bgcolor=\"#ffffff\"> \n<table width=\"100%\">\n  <tr>\n    <td width=\"40%\" align=\"left\" valign=\"center\">\n      <a href=\"http://sourceforge.net/projects/qjson\">\n      QJson project page\n      </a>\n    </td>\n    <td width=\"40%\" align=\"right\" valign=\"center\">\n      <a href=\"http://qjson.sourceforge.net\">QJson home page</a>\n    </td>\n  </tr>\n</table>\n\n<hr>\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/doc/qjson.dox",
    "content": "/**\n\\mainpage\n\\section _intro Introduction\n\n<a HREF=\"http://www.json.org/\">JSON (JavaScript Object Notation)</a>\n is a lightweight data-interchange format. \nIt can represents integer, real number, string, an ordered sequence of value, and\na collection of name/value pairs.\n\nQJson is a qt-based library that maps JSON data to QVariant objects.\n\nJSON arrays will be mapped to QVariantList instances, while JSON's objects will\nbe mapped to QVariantMap.\n\n\\section _usage Usage\nConverting JSON's data to QVariant instance is really simple:\n\\code\n// create a JSonDriver instance\nQJson::Parser parser;\n\nbool ok;\n\n// json is a QString containing the data to convert\nQVariant result = parser.parse (json, &ok);\n\\endcode\n\nSuppose you're going to convert this JSON data:\n\\verbatim\n{\n    \"encoding\" : \"UTF-8\",\n    \"plug-ins\" : [\n        \"python\",\n        \"c++\",\n        \"ruby\"\n        ],\n    \"indent\" : { \"length\" : 3, \"use_space\" : true }\n}\n\\endverbatim\n\nThe following code would convert the JSON data and parse it:\n\\code\nQJson::Parser parser;\nbool ok;\n\nQVariantMap result = parser.parse (json, &ok).toMap();\nif (!ok) {\n  qFatal(\"An error occured during parsing\");\n  exit (1);\n}\n\nqDebug() << \"encoding:\" << result[\"encoding\"].toString();\nqDebug() << \"plugins:\";\n\nforeach (QVariant plugin, result[\"plug-ins\"].toList()) {\n  qDebug() << \"\\t-\" << plugin.toString();\n}\n\nQVariantMap nestedMap = result[\"indent\"].toMap();\nqDebug() << \"length:\" << nestedMap[\"length\"].toInt();\nqDebug() << \"use_space:\" << nestedMap[\"use_space\"].toBool();\n\\endcode\nThe output would be:\n\\verbatim\nencoding: \"UTF-8\"\nplugins:\n  - \"python\"\n  - \"c++\"\n  - \"ruby\"\nlength: 3\nuse_space: true\n\\endverbatim\n\nThe QJson::QObjectHelper class permits to serialize QObject instances into JSON. QJson::QObjectHelper also allows to \ninitialize a QObject using the values stored inside of a JSON object. \n\n\\section _build Build instructions\nQJson build system is based on cmake. Download QJson sources, extract them, move inside the sources directory and then:\n\\code\nmkdir build\ncd build\ncmake ..\nmake\nsudo make install\n\\endcode\n\n\\section _download Get the code\nActually QJson code is hosted on KDE subversion repository. You can download it using a svn client:\n\\code\nsvn co svn://anonsvn.kde.org/home/kde/trunk/playground/libs/qjson \n\\endcode\n\nOtherwise you can download source tarballs <a HREF=\"https://sourceforge.net/project/showfiles.php?group_id=244195\">here</a>.\n\n\\author Flavio Castelli <flavio@castelli.name>\n*/\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/include/QJson/Parser",
    "content": "#include \"../../src/parser.h\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/include/QJson/QObjectHelper",
    "content": "#include \"../../src/qobjecthelper.h\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/include/QJson/Serializer",
    "content": "#include \"../../src/serializer.h\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/qjson.pri",
    "content": "LIBS *= -l$$qtLibraryName(json)\n\n\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/qjson.pro",
    "content": "TEMPLATE = subdirs\nSUBDIRS = sub_src #sub_unittest\n\nsub_src.subdir = src\nsub_unittest.subdir = tests\nsub_unittest.depends = sub_src\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/.gitignore",
    "content": "moc_*\n*.o\nMakefile\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/CMakeLists.txt",
    "content": "# add_custom_command (OUTPUT ${qjson_SOURCE_DIR}/lib/json_parser.cc\n#                    PRE_BUILD\n#                    COMMAND bison -t -o json_parser.cc -d json_parser.yy\n#                    DEPENDS json_parser.yy\n#                    WORKING_DIRECTORY ${qjson_SOURCE_DIR}/lib/\n#                    )\n\nset(qjson_MOC_HDRS\n  parserrunnable.h\n  serializerrunnable.h\n)\n\nqt4_wrap_cpp(qjson_MOC_SRCS ${qjson_MOC_HDRS})\n\nset (qjson_SRCS parser.cpp qobjecthelper.cpp json_scanner.cpp json_parser.cc parserrunnable.cpp serializer.cpp serializerrunnable.cpp)\nset (qjson_HEADERS parser.h parserrunnable.h qobjecthelper.h serializer.h serializerrunnable.h qjson_export.h)\n\nadd_library (qjson SHARED ${qjson_SRCS} ${qjson_MOC_SRCS} ${qjson_HEADERS})\ntarget_link_libraries( qjson ${QT_LIBRARIES})\n\nif(NOT android)\n\tset_target_properties(qjson PROPERTIES\n\t                      VERSION ${QJSON_LIB_MAJOR_VERSION}.${QJSON_LIB_MINOR_VERSION}.${QJSON_LIB_PATCH_VERSION}\n                              SOVERSION ${QJSON_LIB_MAJOR_VERSION}\n\t                      )\nendif()\nset_target_properties(qjson PROPERTIES\n                      DEFINE_SYMBOL QJSON_MAKEDLL\n                      PUBLIC_HEADER \"${qjson_HEADERS}\"\n                      FRAMEWORK ${OSX_FRAMEWORK}\n                      )\n\nINSTALL(TARGETS qjson EXPORT qjson-export\n   LIBRARY DESTINATION ${LIB_INSTALL_DIR}\n   RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin\n   ARCHIVE DESTINATION ${LIB_INSTALL_DIR}\n   FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR}\n   PUBLIC_HEADER DESTINATION ${INCLUDE_INSTALL_DIR}/qjson\n)\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/json_parser.cc",
    "content": "/* A Bison parser, made by GNU Bison 2.3.  */\n\n/* Skeleton implementation for Bison LALR(1) parsers in C++\n\n   Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.\n\n   This program is free software; you can redistribute it and/or modify\n   it under the terms of the GNU General Public License as published by\n   the Free Software Foundation; either version 2, or (at your option)\n   any later version.\n\n   This program is distributed in the hope that it will be useful,\n   but WITHOUT ANY WARRANTY; without even the implied warranty of\n   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n   GNU General Public License for more details.\n\n   You should have received a copy of the GNU General Public License\n   along with this program; if not, write to the Free Software\n   Foundation, Inc., 51 Franklin Street, Fifth Floor,\n   Boston, MA 02110-1301, USA.  */\n\n/* As a special exception, you may create a larger work that contains\n   part or all of the Bison parser skeleton and distribute that work\n   under terms of your choice, so long as that work isn't itself a\n   parser generator using the skeleton or a modified version thereof\n   as a parser skeleton.  Alternatively, if you modify or redistribute\n   the parser skeleton itself, you may (at your option) remove this\n   special exception, which will cause the skeleton and the resulting\n   Bison output files to be licensed under the GNU General Public\n   License without this special exception.\n\n   This special exception was added by the Free Software Foundation in\n   version 2.2 of Bison.  */\n\n\n#include \"json_parser.hh\"\n\n/* User implementation prologue.  */\n\n\n/* Line 317 of lalr1.cc.  */\n#line 43 \"json_parser.cc\"\n\n#ifndef YY_\n# if YYENABLE_NLS\n#  if ENABLE_NLS\n#   include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */\n#   define YY_(msgid) dgettext (\"bison-runtime\", msgid)\n#  endif\n# endif\n# ifndef YY_\n#  define YY_(msgid) msgid\n# endif\n#endif\n\n/* Suppress unused-variable warnings by \"using\" E.  */\n#define YYUSE(e) ((void) (e))\n\n/* A pseudo ostream that takes yydebug_ into account.  */\n# define YYCDEBUG\t\t\t\t\t\t\t\\\n  for (bool yydebugcond_ = yydebug_; yydebugcond_; yydebugcond_ = false)\t\\\n    (*yycdebug_)\n\n/* Enable debugging if requested.  */\n#if YYDEBUG\n\n# define YY_SYMBOL_PRINT(Title, Type, Value, Location)\t\\\ndo {\t\t\t\t\t\t\t\\\n  if (yydebug_)\t\t\t\t\t\t\\\n    {\t\t\t\t\t\t\t\\\n      *yycdebug_ << Title << ' ';\t\t\t\\\n      yy_symbol_print_ ((Type), (Value), (Location));\t\\\n      *yycdebug_ << std::endl;\t\t\t\t\\\n    }\t\t\t\t\t\t\t\\\n} while (false)\n\n# define YY_REDUCE_PRINT(Rule)\t\t\\\ndo {\t\t\t\t\t\\\n  if (yydebug_)\t\t\t\t\\\n    yy_reduce_print_ (Rule);\t\t\\\n} while (false)\n\n# define YY_STACK_PRINT()\t\t\\\ndo {\t\t\t\t\t\\\n  if (yydebug_)\t\t\t\t\\\n    yystack_print_ ();\t\t\t\\\n} while (false)\n\n#else /* !YYDEBUG */\n\n# define YY_SYMBOL_PRINT(Title, Type, Value, Location)\n# define YY_REDUCE_PRINT(Rule)\n# define YY_STACK_PRINT()\n\n#endif /* !YYDEBUG */\n\n#define YYACCEPT\tgoto yyacceptlab\n#define YYABORT\t\tgoto yyabortlab\n#define YYERROR\t\tgoto yyerrorlab\n\nnamespace yy\n{\n#if YYERROR_VERBOSE\n\n  /* Return YYSTR after stripping away unnecessary quotes and\n     backslashes, so that it's suitable for yyerror.  The heuristic is\n     that double-quoting is unnecessary unless the string contains an\n     apostrophe, a comma, or backslash (other than backslash-backslash).\n     YYSTR is taken from yytname.  */\n  std::string\n  json_parser::yytnamerr_ (const char *yystr)\n  {\n    if (*yystr == '\"')\n      {\n        std::string yyr = \"\";\n        char const *yyp = yystr;\n\n        for (;;)\n          switch (*++yyp)\n            {\n            case '\\'':\n            case ',':\n              goto do_not_strip_quotes;\n\n            case '\\\\':\n              if (*++yyp != '\\\\')\n                goto do_not_strip_quotes;\n              /* Fall through.  */\n            default:\n              yyr += *yyp;\n              break;\n\n            case '\"':\n              return yyr;\n            }\n      do_not_strip_quotes: ;\n      }\n\n    return yystr;\n  }\n\n#endif\n\n  /// Build a parser object.\n  json_parser::json_parser (QJson::ParserPrivate* driver_yyarg)\n    : yydebug_ (false),\n      yycdebug_ (&std::cerr),\n      driver (driver_yyarg)\n  {\n  }\n\n  json_parser::~json_parser ()\n  {\n  }\n\n#if YYDEBUG\n  /*--------------------------------.\n  | Print this symbol on YYOUTPUT.  |\n  `--------------------------------*/\n\n  inline void\n  json_parser::yy_symbol_value_print_ (int yytype,\n\t\t\t   const semantic_type* yyvaluep, const location_type* yylocationp)\n  {\n    YYUSE (yylocationp);\n    YYUSE (yyvaluep);\n    switch (yytype)\n      {\n         default:\n\t  break;\n      }\n  }\n\n\n  void\n  json_parser::yy_symbol_print_ (int yytype,\n\t\t\t   const semantic_type* yyvaluep, const location_type* yylocationp)\n  {\n    *yycdebug_ << (yytype < yyntokens_ ? \"token\" : \"nterm\")\n\t       << ' ' << yytname_[yytype] << \" (\"\n\t       << *yylocationp << \": \";\n    yy_symbol_value_print_ (yytype, yyvaluep, yylocationp);\n    *yycdebug_ << ')';\n  }\n#endif /* ! YYDEBUG */\n\n  void\n  json_parser::yydestruct_ (const char* yymsg,\n\t\t\t   int yytype, semantic_type* yyvaluep, location_type* yylocationp)\n  {\n    YYUSE (yylocationp);\n    YYUSE (yymsg);\n    YYUSE (yyvaluep);\n\n    YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);\n\n    switch (yytype)\n      {\n  \n\tdefault:\n\t  break;\n      }\n  }\n\n  void\n  json_parser::yypop_ (unsigned int n)\n  {\n    yystate_stack_.pop (n);\n    yysemantic_stack_.pop (n);\n    yylocation_stack_.pop (n);\n  }\n\n  std::ostream&\n  json_parser::debug_stream () const\n  {\n    return *yycdebug_;\n  }\n\n  void\n  json_parser::set_debug_stream (std::ostream& o)\n  {\n    yycdebug_ = &o;\n  }\n\n\n  json_parser::debug_level_type\n  json_parser::debug_level () const\n  {\n    return yydebug_;\n  }\n\n  void\n  json_parser::set_debug_level (debug_level_type l)\n  {\n    yydebug_ = l;\n  }\n\n\n  int\n  json_parser::parse ()\n  {\n    /// Look-ahead and look-ahead in internal form.\n    int yychar = yyempty_;\n    int yytoken = 0;\n\n    /* State.  */\n    int yyn;\n    int yylen = 0;\n    int yystate = 0;\n\n    /* Error handling.  */\n    int yynerrs_ = 0;\n    int yyerrstatus_ = 0;\n\n    /// Semantic value of the look-ahead.\n    semantic_type yylval;\n    /// Location of the look-ahead.\n    location_type yylloc;\n    /// The locations where the error started and ended.\n    location yyerror_range[2];\n\n    /// $$.\n    semantic_type yyval;\n    /// @$.\n    location_type yyloc;\n\n    int yyresult;\n\n    YYCDEBUG << \"Starting parse\" << std::endl;\n\n\n    /* Initialize the stacks.  The initial state will be pushed in\n       yynewstate, since the latter expects the semantical and the\n       location values to have been already stored, initialize these\n       stacks with a primary value.  */\n    yystate_stack_ = state_stack_type (0);\n    yysemantic_stack_ = semantic_stack_type (0);\n    yylocation_stack_ = location_stack_type (0);\n    yysemantic_stack_.push (yylval);\n    yylocation_stack_.push (yylloc);\n\n    /* New state.  */\n  yynewstate:\n    yystate_stack_.push (yystate);\n    YYCDEBUG << \"Entering state \" << yystate << std::endl;\n    goto yybackup;\n\n    /* Backup.  */\n  yybackup:\n\n    /* Try to take a decision without look-ahead.  */\n    yyn = yypact_[yystate];\n    if (yyn == yypact_ninf_)\n      goto yydefault;\n\n    /* Read a look-ahead token.  */\n    if (yychar == yyempty_)\n      {\n\tYYCDEBUG << \"Reading a token: \";\n\tyychar = yylex (&yylval, &yylloc, driver);\n      }\n\n\n    /* Convert token to internal form.  */\n    if (yychar <= yyeof_)\n      {\n\tyychar = yytoken = yyeof_;\n\tYYCDEBUG << \"Now at end of input.\" << std::endl;\n      }\n    else\n      {\n\tyytoken = yytranslate_ (yychar);\n\tYY_SYMBOL_PRINT (\"Next token is\", yytoken, &yylval, &yylloc);\n      }\n\n    /* If the proper action on seeing token YYTOKEN is to reduce or to\n       detect an error, take that action.  */\n    yyn += yytoken;\n    if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken)\n      goto yydefault;\n\n    /* Reduce or error.  */\n    yyn = yytable_[yyn];\n    if (yyn <= 0)\n      {\n\tif (yyn == 0 || yyn == yytable_ninf_)\n\tgoto yyerrlab;\n\tyyn = -yyn;\n\tgoto yyreduce;\n      }\n\n    /* Accept?  */\n    if (yyn == yyfinal_)\n      goto yyacceptlab;\n\n    /* Shift the look-ahead token.  */\n    YY_SYMBOL_PRINT (\"Shifting\", yytoken, &yylval, &yylloc);\n\n    /* Discard the token being shifted unless it is eof.  */\n    if (yychar != yyeof_)\n      yychar = yyempty_;\n\n    yysemantic_stack_.push (yylval);\n    yylocation_stack_.push (yylloc);\n\n    /* Count tokens shifted since error; after three, turn off error\n       status.  */\n    if (yyerrstatus_)\n      --yyerrstatus_;\n\n    yystate = yyn;\n    goto yynewstate;\n\n  /*-----------------------------------------------------------.\n  | yydefault -- do the default action for the current state.  |\n  `-----------------------------------------------------------*/\n  yydefault:\n    yyn = yydefact_[yystate];\n    if (yyn == 0)\n      goto yyerrlab;\n    goto yyreduce;\n\n  /*-----------------------------.\n  | yyreduce -- Do a reduction.  |\n  `-----------------------------*/\n  yyreduce:\n    yylen = yyr2_[yyn];\n    /* If YYLEN is nonzero, implement the default value of the action:\n       `$$ = $1'.  Otherwise, use the top of the stack.\n\n       Otherwise, the following line sets YYVAL to garbage.\n       This behavior is undocumented and Bison\n       users should not rely upon it.  */\n    if (yylen)\n      yyval = yysemantic_stack_[yylen - 1];\n    else\n      yyval = yysemantic_stack_[0];\n\n    {\n      slice<location_type, location_stack_type> slice (yylocation_stack_, yylen);\n      YYLLOC_DEFAULT (yyloc, slice, yylen);\n    }\n    YY_REDUCE_PRINT (yyn);\n    switch (yyn)\n      {\n\t  case 2:\n#line 84 \"json_parser.yy\"\n    {\n              driver->m_result = (yysemantic_stack_[(1) - (1)]);\n              qjsonDebug() << \"json_parser - parsing finished\";\n            ;}\n    break;\n\n  case 3:\n#line 89 \"json_parser.yy\"\n    { (yyval) = (yysemantic_stack_[(1) - (1)]); ;}\n    break;\n\n  case 4:\n#line 91 \"json_parser.yy\"\n    {\n            qCritical()<< \"json_parser - syntax error found, \"\n                    << \"forcing abort, Line\" << (yyloc).begin.line << \"Column\" << (yyloc).begin.column;\n            YYABORT;\n          ;}\n    break;\n\n  case 6:\n#line 98 \"json_parser.yy\"\n    { (yyval) = (yysemantic_stack_[(3) - (2)]); ;}\n    break;\n\n  case 7:\n#line 100 \"json_parser.yy\"\n    { (yyval) = QVariant (QVariantMap()); ;}\n    break;\n\n  case 8:\n#line 101 \"json_parser.yy\"\n    {\n            QVariantMap members = (yysemantic_stack_[(2) - (2)]).toMap();\n            (yysemantic_stack_[(2) - (2)]) = QVariant(); // Allow reuse of map\n            (yyval) = QVariant(members.unite ((yysemantic_stack_[(2) - (1)]).toMap()));\n          ;}\n    break;\n\n  case 9:\n#line 107 \"json_parser.yy\"\n    { (yyval) = QVariant (QVariantMap()); ;}\n    break;\n\n  case 10:\n#line 108 \"json_parser.yy\"\n    {\n          QVariantMap members = (yysemantic_stack_[(3) - (3)]).toMap();\n          (yysemantic_stack_[(3) - (3)]) = QVariant(); // Allow reuse of map\n          (yyval) = QVariant(members.unite ((yysemantic_stack_[(3) - (2)]).toMap()));\n          ;}\n    break;\n\n  case 11:\n#line 114 \"json_parser.yy\"\n    {\n            QVariantMap pair;\n            pair.insert ((yysemantic_stack_[(3) - (1)]).toString(), QVariant((yysemantic_stack_[(3) - (3)])));\n            (yyval) = QVariant (pair);\n          ;}\n    break;\n\n  case 12:\n#line 120 \"json_parser.yy\"\n    { (yyval) = (yysemantic_stack_[(3) - (2)]); ;}\n    break;\n\n  case 13:\n#line 122 \"json_parser.yy\"\n    { (yyval) = QVariant (QVariantList()); ;}\n    break;\n\n  case 14:\n#line 123 \"json_parser.yy\"\n    {\n          QVariantList members = (yysemantic_stack_[(2) - (2)]).toList();\n          (yysemantic_stack_[(2) - (2)]) = QVariant(); // Allow reuse of list\n          members.prepend ((yysemantic_stack_[(2) - (1)]));\n          (yyval) = QVariant(members);\n        ;}\n    break;\n\n  case 15:\n#line 130 \"json_parser.yy\"\n    { (yyval) = QVariant (QVariantList()); ;}\n    break;\n\n  case 16:\n#line 131 \"json_parser.yy\"\n    {\n            QVariantList members = (yysemantic_stack_[(3) - (3)]).toList();\n            (yysemantic_stack_[(3) - (3)]) = QVariant(); // Allow reuse of list\n            members.prepend ((yysemantic_stack_[(3) - (2)]));\n            (yyval) = QVariant(members);\n          ;}\n    break;\n\n  case 17:\n#line 138 \"json_parser.yy\"\n    { (yyval) = (yysemantic_stack_[(1) - (1)]); ;}\n    break;\n\n  case 18:\n#line 139 \"json_parser.yy\"\n    { (yyval) = (yysemantic_stack_[(1) - (1)]); ;}\n    break;\n\n  case 19:\n#line 140 \"json_parser.yy\"\n    { (yyval) = (yysemantic_stack_[(1) - (1)]); ;}\n    break;\n\n  case 20:\n#line 141 \"json_parser.yy\"\n    { (yyval) = (yysemantic_stack_[(1) - (1)]); ;}\n    break;\n\n  case 21:\n#line 142 \"json_parser.yy\"\n    { (yyval) = QVariant (true); ;}\n    break;\n\n  case 22:\n#line 143 \"json_parser.yy\"\n    { (yyval) = QVariant (false); ;}\n    break;\n\n  case 23:\n#line 144 \"json_parser.yy\"\n    {\n          QVariant null_variant;\n          (yyval) = null_variant;\n        ;}\n    break;\n\n  case 24:\n#line 149 \"json_parser.yy\"\n    { (yyval) = QVariant(QVariant::Double); (yyval).setValue( -std::numeric_limits<double>::infinity() ); ;}\n    break;\n\n  case 25:\n#line 150 \"json_parser.yy\"\n    { (yyval) = QVariant(QVariant::Double); (yyval).setValue( std::numeric_limits<double>::infinity() ); ;}\n    break;\n\n  case 26:\n#line 151 \"json_parser.yy\"\n    { (yyval) = QVariant(QVariant::Double); (yyval).setValue( std::numeric_limits<double>::quiet_NaN() ); ;}\n    break;\n\n  case 28:\n#line 154 \"json_parser.yy\"\n    {\n            if ((yysemantic_stack_[(1) - (1)]).toByteArray().startsWith('-')) {\n              (yyval) = QVariant (QVariant::LongLong);\n              (yyval).setValue((yysemantic_stack_[(1) - (1)]).toLongLong());\n            }\n            else {\n              (yyval) = QVariant (QVariant::ULongLong);\n              (yyval).setValue((yysemantic_stack_[(1) - (1)]).toULongLong());\n            }\n          ;}\n    break;\n\n  case 29:\n#line 164 \"json_parser.yy\"\n    {\n            const QByteArray value = (yysemantic_stack_[(2) - (1)]).toByteArray() + (yysemantic_stack_[(2) - (2)]).toByteArray();\n            (yyval) = QVariant(QVariant::Double);\n            (yyval).setValue(value.toDouble());\n          ;}\n    break;\n\n  case 30:\n#line 169 \"json_parser.yy\"\n    { (yyval) = QVariant ((yysemantic_stack_[(2) - (1)]).toByteArray() + (yysemantic_stack_[(2) - (2)]).toByteArray()); ;}\n    break;\n\n  case 31:\n#line 170 \"json_parser.yy\"\n    {\n            const QByteArray value = (yysemantic_stack_[(3) - (1)]).toByteArray() + (yysemantic_stack_[(3) - (2)]).toByteArray() + (yysemantic_stack_[(3) - (3)]).toByteArray();\n            (yyval) = QVariant (value);\n          ;}\n    break;\n\n  case 32:\n#line 175 \"json_parser.yy\"\n    { (yyval) = QVariant ((yysemantic_stack_[(2) - (1)]).toByteArray() + (yysemantic_stack_[(2) - (2)]).toByteArray()); ;}\n    break;\n\n  case 33:\n#line 176 \"json_parser.yy\"\n    { (yyval) = QVariant (QByteArray(\"-\") + (yysemantic_stack_[(3) - (2)]).toByteArray() + (yysemantic_stack_[(3) - (3)]).toByteArray()); ;}\n    break;\n\n  case 34:\n#line 178 \"json_parser.yy\"\n    { (yyval) = QVariant (QByteArray(\"\")); ;}\n    break;\n\n  case 35:\n#line 179 \"json_parser.yy\"\n    {\n          (yyval) = QVariant((yysemantic_stack_[(2) - (1)]).toByteArray() + (yysemantic_stack_[(2) - (2)]).toByteArray());\n        ;}\n    break;\n\n  case 36:\n#line 183 \"json_parser.yy\"\n    {\n          (yyval) = QVariant(QByteArray(\".\") + (yysemantic_stack_[(2) - (2)]).toByteArray());\n        ;}\n    break;\n\n  case 37:\n#line 187 \"json_parser.yy\"\n    { (yyval) = QVariant((yysemantic_stack_[(2) - (1)]).toByteArray() + (yysemantic_stack_[(2) - (2)]).toByteArray()); ;}\n    break;\n\n  case 38:\n#line 189 \"json_parser.yy\"\n    { (yyval) = (yysemantic_stack_[(3) - (2)]); ;}\n    break;\n\n  case 39:\n#line 191 \"json_parser.yy\"\n    { (yyval) = QVariant (QString(QLatin1String(\"\"))); ;}\n    break;\n\n  case 40:\n#line 192 \"json_parser.yy\"\n    {\n                (yyval) = (yysemantic_stack_[(1) - (1)]);\n              ;}\n    break;\n\n\n    /* Line 675 of lalr1.cc.  */\n#line 628 \"json_parser.cc\"\n\tdefault: break;\n      }\n    YY_SYMBOL_PRINT (\"-> $$ =\", yyr1_[yyn], &yyval, &yyloc);\n\n    yypop_ (yylen);\n    yylen = 0;\n    YY_STACK_PRINT ();\n\n    yysemantic_stack_.push (yyval);\n    yylocation_stack_.push (yyloc);\n\n    /* Shift the result of the reduction.  */\n    yyn = yyr1_[yyn];\n    yystate = yypgoto_[yyn - yyntokens_] + yystate_stack_[0];\n    if (0 <= yystate && yystate <= yylast_\n\t&& yycheck_[yystate] == yystate_stack_[0])\n      yystate = yytable_[yystate];\n    else\n      yystate = yydefgoto_[yyn - yyntokens_];\n    goto yynewstate;\n\n  /*------------------------------------.\n  | yyerrlab -- here on detecting error |\n  `------------------------------------*/\n  yyerrlab:\n    /* If not already recovering from an error, report this error.  */\n    if (!yyerrstatus_)\n      {\n\t++yynerrs_;\n\terror (yylloc, yysyntax_error_ (yystate, yytoken));\n      }\n\n    yyerror_range[0] = yylloc;\n    if (yyerrstatus_ == 3)\n      {\n\t/* If just tried and failed to reuse look-ahead token after an\n\t error, discard it.  */\n\n\tif (yychar <= yyeof_)\n\t  {\n\t  /* Return failure if at end of input.  */\n\t  if (yychar == yyeof_)\n\t    YYABORT;\n\t  }\n\telse\n\t  {\n\t    yydestruct_ (\"Error: discarding\", yytoken, &yylval, &yylloc);\n\t    yychar = yyempty_;\n\t  }\n      }\n\n    /* Else will try to reuse look-ahead token after shifting the error\n       token.  */\n    goto yyerrlab1;\n\n\n  /*---------------------------------------------------.\n  | yyerrorlab -- error raised explicitly by YYERROR.  |\n  `---------------------------------------------------*/\n  yyerrorlab:\n\n    /* Pacify compilers like GCC when the user code never invokes\n       YYERROR and the label yyerrorlab therefore never appears in user\n       code.  */\n    if (false)\n      goto yyerrorlab;\n\n    yyerror_range[0] = yylocation_stack_[yylen - 1];\n    /* Do not reclaim the symbols of the rule which action triggered\n       this YYERROR.  */\n    yypop_ (yylen);\n    yylen = 0;\n    yystate = yystate_stack_[0];\n    goto yyerrlab1;\n\n  /*-------------------------------------------------------------.\n  | yyerrlab1 -- common code for both syntax error and YYERROR.  |\n  `-------------------------------------------------------------*/\n  yyerrlab1:\n    yyerrstatus_ = 3;\t/* Each real token shifted decrements this.  */\n\n    for (;;)\n      {\n\tyyn = yypact_[yystate];\n\tif (yyn != yypact_ninf_)\n\t{\n\t  yyn += yyterror_;\n\t  if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)\n\t    {\n\t      yyn = yytable_[yyn];\n\t      if (0 < yyn)\n\t\tbreak;\n\t    }\n\t}\n\n\t/* Pop the current state because it cannot handle the error token.  */\n\tif (yystate_stack_.height () == 1)\n\tYYABORT;\n\n\tyyerror_range[0] = yylocation_stack_[0];\n\tyydestruct_ (\"Error: popping\",\n\t\t     yystos_[yystate],\n\t\t     &yysemantic_stack_[0], &yylocation_stack_[0]);\n\tyypop_ ();\n\tyystate = yystate_stack_[0];\n\tYY_STACK_PRINT ();\n      }\n\n    if (yyn == yyfinal_)\n      goto yyacceptlab;\n\n    yyerror_range[1] = yylloc;\n    // Using YYLLOC is tempting, but would change the location of\n    // the look-ahead.  YYLOC is available though.\n    YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);\n    yysemantic_stack_.push (yylval);\n    yylocation_stack_.push (yyloc);\n\n    /* Shift the error token.  */\n    YY_SYMBOL_PRINT (\"Shifting\", yystos_[yyn],\n\t\t   &yysemantic_stack_[0], &yylocation_stack_[0]);\n\n    yystate = yyn;\n    goto yynewstate;\n\n    /* Accept.  */\n  yyacceptlab:\n    yyresult = 0;\n    goto yyreturn;\n\n    /* Abort.  */\n  yyabortlab:\n    yyresult = 1;\n    goto yyreturn;\n\n  yyreturn:\n    if (yychar != yyeof_ && yychar != yyempty_)\n      yydestruct_ (\"Cleanup: discarding lookahead\", yytoken, &yylval, &yylloc);\n\n    /* Do not reclaim the symbols of the rule which action triggered\n       this YYABORT or YYACCEPT.  */\n    yypop_ (yylen);\n    while (yystate_stack_.height () != 1)\n      {\n\tyydestruct_ (\"Cleanup: popping\",\n\t\t   yystos_[yystate_stack_[0]],\n\t\t   &yysemantic_stack_[0],\n\t\t   &yylocation_stack_[0]);\n\tyypop_ ();\n      }\n\n    return yyresult;\n  }\n\n  // Generate an error message.\n  std::string\n  json_parser::yysyntax_error_ (int yystate, int tok)\n  {\n    std::string res;\n    YYUSE (yystate);\n#if YYERROR_VERBOSE\n    int yyn = yypact_[yystate];\n    if (yypact_ninf_ < yyn && yyn <= yylast_)\n      {\n\t/* Start YYX at -YYN if negative to avoid negative indexes in\n\t   YYCHECK.  */\n\tint yyxbegin = yyn < 0 ? -yyn : 0;\n\n\t/* Stay within bounds of both yycheck and yytname.  */\n\tint yychecklim = yylast_ - yyn + 1;\n\tint yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;\n\tint count = 0;\n\tfor (int x = yyxbegin; x < yyxend; ++x)\n\t  if (yycheck_[x + yyn] == x && x != yyterror_)\n\t    ++count;\n\n\t// FIXME: This method of building the message is not compatible\n\t// with internationalization.  It should work like yacc.c does it.\n\t// That is, first build a string that looks like this:\n\t// \"syntax error, unexpected %s or %s or %s\"\n\t// Then, invoke YY_ on this string.\n\t// Finally, use the string as a format to output\n\t// yytname_[tok], etc.\n\t// Until this gets fixed, this message appears in English only.\n\tres = \"syntax error, unexpected \";\n\tres += yytnamerr_ (yytname_[tok]);\n\tif (count < 5)\n\t  {\n\t    count = 0;\n\t    for (int x = yyxbegin; x < yyxend; ++x)\n\t      if (yycheck_[x + yyn] == x && x != yyterror_)\n\t\t{\n\t\t  res += (!count++) ? \", expecting \" : \" or \";\n\t\t  res += yytnamerr_ (yytname_[x]);\n\t\t}\n\t  }\n      }\n    else\n#endif\n      res = YY_(\"syntax error\");\n    return res;\n  }\n\n\n  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing\n     STATE-NUM.  */\n  const signed char json_parser::yypact_ninf_ = -21;\n  const signed char\n  json_parser::yypact_[] =\n  {\n         3,   -21,   -21,    -6,    31,   -10,     0,   -21,   -21,   -21,\n       6,   -21,   -21,    25,   -21,   -21,   -21,   -21,   -21,   -21,\n      -5,   -21,    22,    19,    21,    23,    24,     0,   -21,     0,\n     -21,   -21,    13,   -21,     0,     0,    29,   -21,   -21,    -6,\n     -21,    31,   -21,    31,   -21,   -21,   -21,   -21,   -21,   -21,\n     -21,    19,   -21,    24,   -21,   -21\n  };\n\n  /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE\n     doesn't specify something else to do.  Zero means the default is an\n     error.  */\n  const unsigned char\n  json_parser::yydefact_[] =\n  {\n         0,     5,     4,     7,    13,     0,    34,    21,    22,    23,\n      39,    25,    26,     0,     2,    19,    20,     3,    18,    27,\n      28,    17,     0,     9,     0,     0,    15,    34,    24,    34,\n      32,    40,     0,     1,    34,    34,    29,    30,     6,     0,\n       8,     0,    12,     0,    14,    33,    35,    38,    36,    37,\n      31,     9,    11,    15,    10,    16\n  };\n\n  /* YYPGOTO[NTERM-NUM].  */\n  const signed char\n  json_parser::yypgoto_[] =\n  {\n       -21,   -21,   -21,   -21,   -21,   -20,     4,   -21,   -21,   -18,\n      -4,   -21,   -21,   -21,   -14,   -21,    -3,    -1,   -21\n  };\n\n  /* YYDEFGOTO[NTERM-NUM].  */\n  const signed char\n  json_parser::yydefgoto_[] =\n  {\n        -1,    13,    14,    15,    22,    40,    23,    16,    25,    44,\n      17,    18,    19,    20,    30,    36,    37,    21,    32\n  };\n\n  /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If\n     positive, shift that token.  If negative, reduce the rule which\n     number is the opposite.  If zero, do what YYDEFACT says.  */\n  const signed char json_parser::yytable_ninf_ = -1;\n  const unsigned char\n  json_parser::yytable_[] =\n  {\n        26,    27,    24,     1,     2,    34,     3,    35,     4,    28,\n      10,    29,     5,    45,     6,    46,     7,     8,     9,    10,\n      48,    49,    11,    12,    31,    33,    38,    39,    41,    42,\n      47,    54,    43,    50,     3,    55,     4,    52,    24,    53,\n       5,    35,     6,    51,     7,     8,     9,    10,     0,     0,\n      11,    12\n  };\n\n  /* YYCHECK.  */\n  const signed char\n  json_parser::yycheck_[] =\n  {\n         4,    11,     3,     0,     1,    10,     3,    12,     5,    19,\n      16,    11,     9,    27,    11,    29,    13,    14,    15,    16,\n      34,    35,    19,    20,    18,     0,     4,     8,     7,     6,\n      17,    51,     8,    36,     3,    53,     5,    41,    39,    43,\n       9,    12,    11,    39,    13,    14,    15,    16,    -1,    -1,\n      19,    20\n  };\n\n  /* STOS_[STATE-NUM] -- The (internal number of the) accessing\n     symbol of state STATE-NUM.  */\n  const unsigned char\n  json_parser::yystos_[] =\n  {\n         0,     0,     1,     3,     5,     9,    11,    13,    14,    15,\n      16,    19,    20,    22,    23,    24,    28,    31,    32,    33,\n      34,    38,    25,    27,    38,    29,    31,    11,    19,    11,\n      35,    18,    39,     0,    10,    12,    36,    37,     4,     8,\n      26,     7,     6,     8,    30,    35,    35,    17,    35,    35,\n      37,    27,    31,    31,    26,    30\n  };\n\n#if YYDEBUG\n  /* TOKEN_NUMBER_[YYLEX-NUM] -- Internal symbol number corresponding\n     to YYLEX-NUM.  */\n  const unsigned short int\n  json_parser::yytoken_number_[] =\n  {\n         0,   256,   257,     1,     2,     3,     4,     5,     6,     7,\n       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,\n      18\n  };\n#endif\n\n  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */\n  const unsigned char\n  json_parser::yyr1_[] =\n  {\n         0,    21,    22,    23,    23,    23,    24,    25,    25,    26,\n      26,    27,    28,    29,    29,    30,    30,    31,    31,    31,\n      31,    31,    31,    31,    32,    32,    32,    32,    33,    33,\n      33,    33,    34,    34,    35,    35,    36,    37,    38,    39,\n      39\n  };\n\n  /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */\n  const unsigned char\n  json_parser::yyr2_[] =\n  {\n         0,     2,     1,     1,     1,     1,     3,     0,     2,     0,\n       3,     3,     3,     0,     2,     0,     3,     1,     1,     1,\n       1,     1,     1,     1,     2,     1,     1,     1,     1,     2,\n       2,     3,     2,     3,     0,     2,     2,     2,     3,     0,\n       1\n  };\n\n#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE\n  /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.\n     First, the terminals, then, starting at \\a yyntokens_, nonterminals.  */\n  const char*\n  const json_parser::yytname_[] =\n  {\n    \"\\\"end of file\\\"\", \"error\", \"$undefined\", \"\\\"{\\\"\", \"\\\"}\\\"\", \"\\\"[\\\"\",\n  \"\\\"]\\\"\", \"\\\":\\\"\", \"\\\",\\\"\", \"\\\"-\\\"\", \"\\\".\\\"\", \"\\\"digit\\\"\",\n  \"\\\"exponential\\\"\", \"\\\"true\\\"\", \"\\\"false\\\"\", \"\\\"null\\\"\",\n  \"\\\"open quotation mark\\\"\", \"\\\"close quotation mark\\\"\", \"\\\"string\\\"\",\n  \"\\\"Infinity\\\"\", \"\\\"NaN\\\"\", \"$accept\", \"start\", \"data\", \"object\",\n  \"members\", \"r_members\", \"pair\", \"array\", \"values\", \"r_values\", \"value\",\n  \"special_or_number\", \"number\", \"int\", \"digits\", \"fract\", \"exp\", \"string\",\n  \"string_arg\", 0\n  };\n#endif\n\n#if YYDEBUG\n  /* YYRHS -- A `-1'-separated list of the rules' RHS.  */\n  const json_parser::rhs_number_type\n  json_parser::yyrhs_[] =\n  {\n        22,     0,    -1,    23,    -1,    31,    -1,     1,    -1,     0,\n      -1,     3,    25,     4,    -1,    -1,    27,    26,    -1,    -1,\n       8,    27,    26,    -1,    38,     7,    31,    -1,     5,    29,\n       6,    -1,    -1,    31,    30,    -1,    -1,     8,    31,    30,\n      -1,    38,    -1,    32,    -1,    24,    -1,    28,    -1,    13,\n      -1,    14,    -1,    15,    -1,     9,    19,    -1,    19,    -1,\n      20,    -1,    33,    -1,    34,    -1,    34,    36,    -1,    34,\n      37,    -1,    34,    36,    37,    -1,    11,    35,    -1,     9,\n      11,    35,    -1,    -1,    11,    35,    -1,    10,    35,    -1,\n      12,    35,    -1,    16,    39,    17,    -1,    -1,    18,    -1\n  };\n\n  /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in\n     YYRHS.  */\n  const unsigned char\n  json_parser::yyprhs_[] =\n  {\n         0,     0,     3,     5,     7,     9,    11,    15,    16,    19,\n      20,    24,    28,    32,    33,    36,    37,    41,    43,    45,\n      47,    49,    51,    53,    55,    58,    60,    62,    64,    66,\n      69,    72,    76,    79,    83,    84,    87,    90,    93,    97,\n      98\n  };\n\n  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */\n  const unsigned char\n  json_parser::yyrline_[] =\n  {\n         0,    84,    84,    89,    90,    96,    98,   100,   101,   107,\n     108,   114,   120,   122,   123,   130,   131,   138,   139,   140,\n     141,   142,   143,   144,   149,   150,   151,   152,   154,   164,\n     169,   170,   175,   176,   178,   179,   183,   187,   189,   191,\n     192\n  };\n\n  // Print the state stack on the debug stream.\n  void\n  json_parser::yystack_print_ ()\n  {\n    *yycdebug_ << \"Stack now\";\n    for (state_stack_type::const_iterator i = yystate_stack_.begin ();\n\t i != yystate_stack_.end (); ++i)\n      *yycdebug_ << ' ' << *i;\n    *yycdebug_ << std::endl;\n  }\n\n  // Report on the debug stream that the rule \\a yyrule is going to be reduced.\n  void\n  json_parser::yy_reduce_print_ (int yyrule)\n  {\n    unsigned int yylno = yyrline_[yyrule];\n    int yynrhs = yyr2_[yyrule];\n    /* Print the symbols being reduced, and their result.  */\n    *yycdebug_ << \"Reducing stack by rule \" << yyrule - 1\n\t       << \" (line \" << yylno << \"), \";\n    /* The symbols being reduced.  */\n    for (int yyi = 0; yyi < yynrhs; yyi++)\n      YY_SYMBOL_PRINT (\"   $\" << yyi + 1 << \" =\",\n\t\t       yyrhs_[yyprhs_[yyrule] + yyi],\n\t\t       &(yysemantic_stack_[(yynrhs) - (yyi + 1)]),\n\t\t       &(yylocation_stack_[(yynrhs) - (yyi + 1)]));\n  }\n#endif // YYDEBUG\n\n  /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */\n  json_parser::token_number_type\n  json_parser::yytranslate_ (int t)\n  {\n    static\n    const token_number_type\n    translate_table[] =\n    {\n           0,     3,     4,     5,     6,     7,     8,     9,    10,    11,\n      12,    13,    14,    15,    16,    17,    18,    19,    20,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,\n       2,     2,     2,     2,     2,     2,     1,     2\n    };\n    if ((unsigned int) t <= yyuser_token_number_max_)\n      return translate_table[t];\n    else\n      return yyundef_token_;\n  }\n\n  const int json_parser::yyeof_ = 0;\n  const int json_parser::yylast_ = 51;\n  const int json_parser::yynnts_ = 19;\n  const int json_parser::yyempty_ = -2;\n  const int json_parser::yyfinal_ = 33;\n  const int json_parser::yyterror_ = 1;\n  const int json_parser::yyerrcode_ = 256;\n  const int json_parser::yyntokens_ = 21;\n\n  const unsigned int json_parser::yyuser_token_number_max_ = 257;\n  const json_parser::token_number_type json_parser::yyundef_token_ = 2;\n\n} // namespace yy\n\n#line 196 \"json_parser.yy\"\n\n\nint yy::yylex(YYSTYPE *yylval, yy::location *yylloc, QJson::ParserPrivate* driver)\n{\n  JSonScanner* scanner = driver->m_scanner;\n  yylval->clear();\n  int ret = scanner->yylex(yylval, yylloc);\n\n  qjsonDebug() << \"json_parser::yylex - calling scanner yylval==|\"\n           << yylval->toByteArray() << \"|, ret==|\" << QString::number(ret) << \"|\";\n  \n  return ret;\n}\n\nvoid yy::json_parser::error (const yy::location& yyloc,\n                                 const std::string& error)\n{\n  /*qjsonDebug() << yyloc.begin.line;\n  qjsonDebug() << yyloc.begin.column;\n  qjsonDebug() << yyloc.end.line;\n  qjsonDebug() << yyloc.end.column;*/\n  qjsonDebug() << \"json_parser::error [line\" << yyloc.end.line << \"] -\" << error.c_str() ;\n  driver->setError(QString::fromLatin1(error.c_str()), yyloc.end.line);\n}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/json_parser.hh",
    "content": "/* A Bison parser, made by GNU Bison 2.3.  */\n\n/* Skeleton interface for Bison LALR(1) parsers in C++\n\n   Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.\n\n   This program is free software; you can redistribute it and/or modify\n   it under the terms of the GNU General Public License as published by\n   the Free Software Foundation; either version 2, or (at your option)\n   any later version.\n\n   This program is distributed in the hope that it will be useful,\n   but WITHOUT ANY WARRANTY; without even the implied warranty of\n   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n   GNU General Public License for more details.\n\n   You should have received a copy of the GNU General Public License\n   along with this program; if not, write to the Free Software\n   Foundation, Inc., 51 Franklin Street, Fifth Floor,\n   Boston, MA 02110-1301, USA.  */\n\n/* As a special exception, you may create a larger work that contains\n   part or all of the Bison parser skeleton and distribute that work\n   under terms of your choice, so long as that work isn't itself a\n   parser generator using the skeleton or a modified version thereof\n   as a parser skeleton.  Alternatively, if you modify or redistribute\n   the parser skeleton itself, you may (at your option) remove this\n   special exception, which will cause the skeleton and the resulting\n   Bison output files to be licensed under the GNU General Public\n   License without this special exception.\n\n   This special exception was added by the Free Software Foundation in\n   version 2.2 of Bison.  */\n\n/* C++ LALR(1) parser skeleton written by Akim Demaille.  */\n\n#ifndef PARSER_HEADER_H\n# define PARSER_HEADER_H\n\n#include <string>\n#include <iostream>\n#include \"stack.hh\"\n\nnamespace yy\n{\n  class position;\n  class location;\n}\n\n/* First part of user declarations.  */\n#line 25 \"json_parser.yy\"\n\n  #include \"parser_p.h\"\n  #include \"json_scanner.h\"\n  #include \"qjson_debug.h\"\n\n  #include <QtCore/QByteArray>\n  #include <QtCore/QMap>\n  #include <QtCore/QString>\n  #include <QtCore/QVariant>\n\n  #include <limits>\n\n  class JSonScanner;\n\n  namespace QJson {\n    class Parser;\n  }\n\n  #define YYERROR_VERBOSE 1\n\n\n/* Line 35 of lalr1.cc.  */\n#line 75 \"json_parser.hh\"\n\n#include \"location.hh\"\n\n/* Enabling traces.  */\n#ifndef YYDEBUG\n# define YYDEBUG 1\n#endif\n\n/* Enabling verbose error messages.  */\n#ifdef YYERROR_VERBOSE\n# undef YYERROR_VERBOSE\n# define YYERROR_VERBOSE 1\n#else\n# define YYERROR_VERBOSE 1\n#endif\n\n/* Enabling the token table.  */\n#ifndef YYTOKEN_TABLE\n# define YYTOKEN_TABLE 0\n#endif\n\n/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].\n   If N is 0, then set CURRENT to the empty location which ends\n   the previous symbol: RHS[0] (always defined).  */\n\n#ifndef YYLLOC_DEFAULT\n# define YYLLOC_DEFAULT(Current, Rhs, N)\t\t\\\ndo {\t\t\t\t\t\t\t\\\n  if (N)\t\t\t\t\t\t\\\n    {\t\t\t\t\t\t\t\\\n      (Current).begin = (Rhs)[1].begin;\t\t\t\\\n      (Current).end   = (Rhs)[N].end;\t\t\t\\\n    }\t\t\t\t\t\t\t\\\n  else\t\t\t\t\t\t\t\\\n    {\t\t\t\t\t\t\t\\\n      (Current).begin = (Current).end = (Rhs)[0].end;\t\\\n    }\t\t\t\t\t\t\t\\\n} while (false)\n#endif\n\nnamespace yy\n{\n\n  /// A Bison parser.\n  class json_parser\n  {\n  public:\n    /// Symbol semantic values.\n#ifndef YYSTYPE\n    typedef int semantic_type;\n#else\n    typedef YYSTYPE semantic_type;\n#endif\n    /// Symbol locations.\n    typedef location location_type;\n    /// Tokens.\n    struct token\n    {\n      /* Tokens.  */\n   enum yytokentype {\n     END = 0,\n     CURLY_BRACKET_OPEN = 1,\n     CURLY_BRACKET_CLOSE = 2,\n     SQUARE_BRACKET_OPEN = 3,\n     SQUARE_BRACKET_CLOSE = 4,\n     COLON = 5,\n     COMMA = 6,\n     MINUS = 7,\n     DOT = 8,\n     DIGIT = 9,\n     E = 10,\n     TRUE_VAL = 11,\n     FALSE_VAL = 12,\n     NULL_VAL = 13,\n     QUOTMARKOPEN = 14,\n     QUOTMARKCLOSE = 15,\n     STRING = 16,\n     INFINITY_VAL = 17,\n     NAN_VAL = 18\n   };\n\n    };\n    /// Token type.\n    typedef token::yytokentype token_type;\n\n    /// Build a parser object.\n    json_parser (QJson::ParserPrivate* driver_yyarg);\n    virtual ~json_parser ();\n\n    /// Parse.\n    /// \\returns  0 iff parsing succeeded.\n    virtual int parse ();\n\n    /// The current debugging stream.\n    std::ostream& debug_stream () const;\n    /// Set the current debugging stream.\n    void set_debug_stream (std::ostream &);\n\n    /// Type for debugging levels.\n    typedef int debug_level_type;\n    /// The current debugging level.\n    debug_level_type debug_level () const;\n    /// Set the current debugging level.\n    void set_debug_level (debug_level_type l);\n\n  private:\n    /// Report a syntax error.\n    /// \\param loc    where the syntax error is found.\n    /// \\param msg    a description of the syntax error.\n    virtual void error (const location_type& loc, const std::string& msg);\n\n    /// Generate an error message.\n    /// \\param state   the state where the error occurred.\n    /// \\param tok     the look-ahead token.\n    virtual std::string yysyntax_error_ (int yystate, int tok);\n\n#if YYDEBUG\n    /// \\brief Report a symbol value on the debug stream.\n    /// \\param yytype       The token type.\n    /// \\param yyvaluep     Its semantic value.\n    /// \\param yylocationp  Its location.\n    virtual void yy_symbol_value_print_ (int yytype,\n\t\t\t\t\t const semantic_type* yyvaluep,\n\t\t\t\t\t const location_type* yylocationp);\n    /// \\brief Report a symbol on the debug stream.\n    /// \\param yytype       The token type.\n    /// \\param yyvaluep     Its semantic value.\n    /// \\param yylocationp  Its location.\n    virtual void yy_symbol_print_ (int yytype,\n\t\t\t\t   const semantic_type* yyvaluep,\n\t\t\t\t   const location_type* yylocationp);\n#endif /* ! YYDEBUG */\n\n\n    /// State numbers.\n    typedef int state_type;\n    /// State stack type.\n    typedef stack<state_type>    state_stack_type;\n    /// Semantic value stack type.\n    typedef stack<semantic_type> semantic_stack_type;\n    /// location stack type.\n    typedef stack<location_type> location_stack_type;\n\n    /// The state stack.\n    state_stack_type yystate_stack_;\n    /// The semantic value stack.\n    semantic_stack_type yysemantic_stack_;\n    /// The location stack.\n    location_stack_type yylocation_stack_;\n\n    /// Internal symbol numbers.\n    typedef unsigned char token_number_type;\n    /* Tables.  */\n    /// For a state, the index in \\a yytable_ of its portion.\n    static const signed char yypact_[];\n    static const signed char yypact_ninf_;\n\n    /// For a state, default rule to reduce.\n    /// Unless\\a  yytable_ specifies something else to do.\n    /// Zero means the default is an error.\n    static const unsigned char yydefact_[];\n\n    static const signed char yypgoto_[];\n    static const signed char yydefgoto_[];\n\n    /// What to do in a state.\n    /// \\a yytable_[yypact_[s]]: what to do in state \\a s.\n    /// - if positive, shift that token.\n    /// - if negative, reduce the rule which number is the opposite.\n    /// - if zero, do what YYDEFACT says.\n    static const unsigned char yytable_[];\n    static const signed char yytable_ninf_;\n\n    static const signed char yycheck_[];\n\n    /// For a state, its accessing symbol.\n    static const unsigned char yystos_[];\n\n    /// For a rule, its LHS.\n    static const unsigned char yyr1_[];\n    /// For a rule, its RHS length.\n    static const unsigned char yyr2_[];\n\n#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE\n    /// For a symbol, its name in clear.\n    static const char* const yytname_[];\n#endif\n\n#if YYERROR_VERBOSE\n    /// Convert the symbol name \\a n to a form suitable for a diagnostic.\n    virtual std::string yytnamerr_ (const char *n);\n#endif\n\n#if YYDEBUG\n    /// A type to store symbol numbers and -1.\n    typedef signed char rhs_number_type;\n    /// A `-1'-separated list of the rules' RHS.\n    static const rhs_number_type yyrhs_[];\n    /// For each rule, the index of the first RHS symbol in \\a yyrhs_.\n    static const unsigned char yyprhs_[];\n    /// For each rule, its source line number.\n    static const unsigned char yyrline_[];\n    /// For each scanner token number, its symbol number.\n    static const unsigned short int yytoken_number_[];\n    /// Report on the debug stream that the rule \\a r is going to be reduced.\n    virtual void yy_reduce_print_ (int r);\n    /// Print the state stack on the debug stream.\n    virtual void yystack_print_ ();\n#endif\n\n    /// Convert a scanner token number \\a t to a symbol number.\n    token_number_type yytranslate_ (int t);\n\n    /// \\brief Reclaim the memory associated to a symbol.\n    /// \\param yymsg        Why this token is reclaimed.\n    /// \\param yytype       The symbol type.\n    /// \\param yyvaluep     Its semantic value.\n    /// \\param yylocationp  Its location.\n    inline void yydestruct_ (const char* yymsg,\n\t\t\t     int yytype,\n\t\t\t     semantic_type* yyvaluep,\n\t\t\t     location_type* yylocationp);\n\n    /// Pop \\a n symbols the three stacks.\n    inline void yypop_ (unsigned int n = 1);\n\n    /* Constants.  */\n    static const int yyeof_;\n    /* LAST_ -- Last index in TABLE_.  */\n    static const int yylast_;\n    static const int yynnts_;\n    static const int yyempty_;\n    static const int yyfinal_;\n    static const int yyterror_;\n    static const int yyerrcode_;\n    static const int yyntokens_;\n    static const unsigned int yyuser_token_number_max_;\n    static const token_number_type yyundef_token_;\n\n    /* Debugging.  */\n    int yydebug_;\n    std::ostream* yycdebug_;\n\n\n    /* User arguments.  */\n    QJson::ParserPrivate* driver;\n  };\n}\n\n\n#endif /* ! defined PARSER_HEADER_H */\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/json_parser.yy",
    "content": "/* This file is part of QJSon\n  *\n  * Copyright (C) 2008 Flavio Castelli <flavio.castelli@gmail.com>\n  *\n  * This library is free software; you can redistribute it and/or\n  * modify it under the terms of the GNU Lesser General Public\n  * License version 2.1, as published by the Free Software Foundation.\n  * \n  *\n  * This library is distributed in the hope that it will be useful,\n  * but WITHOUT ANY WARRANTY; without even the implied warranty of\n  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n  * Lesser General Public License for more details.\n  *\n  * You should have received a copy of the GNU Lesser General Public License\n  * along with this library; see the file COPYING.LIB.  If not, write to\n  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n  * Boston, MA 02110-1301, USA.\n  */\n\n%skeleton \"lalr1.cc\"\n%defines\n%define \"parser_class_name\" \"json_parser\"\n\n%{\n  #include \"parser_p.h\"\n  #include \"json_scanner.h\"\n  #include \"qjson_debug.h\"\n\n  #include <QtCore/QByteArray>\n  #include <QtCore/QMap>\n  #include <QtCore/QString>\n  #include <QtCore/QVariant>\n\n  #include <limits>\n\n  class JSonScanner;\n\n  namespace QJson {\n    class Parser;\n  }\n\n  #define YYERROR_VERBOSE 1\n%}\n\n%parse-param { QJson::ParserPrivate* driver }\n%lex-param { QJson::ParserPrivate* driver }\n\n%locations\n\n%debug\n%error-verbose\n\n%token END 0 \"end of file\"\n\n%token CURLY_BRACKET_OPEN 1 \"{\"\n%token CURLY_BRACKET_CLOSE 2 \"}\"\n%token SQUARE_BRACKET_OPEN 3 \"[\"\n%token SQUARE_BRACKET_CLOSE 4 \"]\"\n\n%token COLON 5 \":\"\n%token COMMA 6 \",\"\n%token MINUS 7 \"-\"\n%token DOT 8 \".\"\n%token DIGIT 9 \"digit\"\n%token E 10 \"exponential\"\n%token TRUE_VAL 11 \"true\"\n%token FALSE_VAL 12 \"false\"\n%token NULL_VAL 13 \"null\"\n%token QUOTMARKOPEN 14 \"open quotation mark\"\n%token QUOTMARKCLOSE 15 \"close quotation mark\"\n\n%token STRING 16 \"string\"\n%token INFINITY_VAL 17 \"Infinity\"\n%token NAN_VAL 18 \"NaN\"\n\n// define the initial token\n%start start\n\n%%\n\n// grammar rules\n\nstart: data {\n              driver->m_result = $1;\n              qjsonDebug() << \"json_parser - parsing finished\";\n            };\n\ndata: value { $$ = $1; }\n      | error\n          {\n            qCritical()<< \"json_parser - syntax error found, \"\n                    << \"forcing abort, Line\" << @$.begin.line << \"Column\" << @$.begin.column;\n            YYABORT;\n          }\n      | END;\n\nobject: CURLY_BRACKET_OPEN members CURLY_BRACKET_CLOSE { $$ = $2; };\n\nmembers: /* empty */ { $$ = QVariant (QVariantMap()); }\n        | pair r_members {\n            QVariantMap members = $2.toMap();\n            $2 = QVariant(); // Allow reuse of map\n            $$ = QVariant(members.unite ($1.toMap()));\n          };\n\nr_members: /* empty */ { $$ = QVariant (QVariantMap()); }\n        | COMMA pair r_members {\n          QVariantMap members = $3.toMap();\n          $3 = QVariant(); // Allow reuse of map\n          $$ = QVariant(members.unite ($2.toMap()));\n          };\n\npair:   string COLON value {\n            QVariantMap pair;\n            pair.insert ($1.toString(), QVariant($3));\n            $$ = QVariant (pair);\n          };\n\narray: SQUARE_BRACKET_OPEN values SQUARE_BRACKET_CLOSE { $$ = $2; };\n\nvalues: /* empty */ { $$ = QVariant (QVariantList()); }\n        | value r_values {\n          QVariantList members = $2.toList();\n          $2 = QVariant(); // Allow reuse of list\n          members.prepend ($1);\n          $$ = QVariant(members);\n        };\n\nr_values: /* empty */ { $$ = QVariant (QVariantList()); }\n          | COMMA value r_values {\n            QVariantList members = $3.toList();\n            $3 = QVariant(); // Allow reuse of list\n            members.prepend ($2);\n            $$ = QVariant(members);\n          };\n\nvalue: string { $$ = $1; }\n        | special_or_number { $$ = $1; }\n        | object { $$ = $1; }\n        | array { $$ = $1; }\n        | TRUE_VAL { $$ = QVariant (true); }\n        | FALSE_VAL { $$ = QVariant (false); }\n        | NULL_VAL {\n          QVariant null_variant;\n          $$ = null_variant;\n        };\n\nspecial_or_number: MINUS INFINITY_VAL { $$ = QVariant(QVariant::Double); $$.setValue( -std::numeric_limits<double>::infinity() ); }\n                   | INFINITY_VAL { $$ = QVariant(QVariant::Double); $$.setValue( std::numeric_limits<double>::infinity() ); }\n                   | NAN_VAL { $$ = QVariant(QVariant::Double); $$.setValue( std::numeric_limits<double>::quiet_NaN() ); }\n                   | number;\n\nnumber: int {\n            if ($1.toByteArray().startsWith('-')) {\n              $$ = QVariant (QVariant::LongLong);\n              $$.setValue($1.toLongLong());\n            }\n            else {\n              $$ = QVariant (QVariant::ULongLong);\n              $$.setValue($1.toULongLong());\n            }\n          }\n        | int fract {\n            const QByteArray value = $1.toByteArray() + $2.toByteArray();\n            $$ = QVariant(QVariant::Double);\n            $$.setValue(value.toDouble());\n          }\n        | int exp { $$ = QVariant ($1.toByteArray() + $2.toByteArray()); }\n        | int fract exp {\n            const QByteArray value = $1.toByteArray() + $2.toByteArray() + $3.toByteArray();\n            $$ = QVariant (value);\n          };\n\nint:  DIGIT digits { $$ = QVariant ($1.toByteArray() + $2.toByteArray()); }\n      | MINUS DIGIT digits { $$ = QVariant (QByteArray(\"-\") + $2.toByteArray() + $3.toByteArray()); };\n\ndigits: /* empty */ { $$ = QVariant (QByteArray(\"\")); }\n        | DIGIT digits {\n          $$ = QVariant($1.toByteArray() + $2.toByteArray());\n        };\n\nfract: DOT digits {\n          $$ = QVariant(QByteArray(\".\") + $2.toByteArray());\n        };\n\nexp: E digits { $$ = QVariant($1.toByteArray() + $2.toByteArray()); };\n\nstring: QUOTMARKOPEN string_arg QUOTMARKCLOSE { $$ = $2; };\n\nstring_arg: /*empty */ { $$ = QVariant (QString(QLatin1String(\"\"))); }\n            | STRING {\n                $$ = $1;\n              };\n\n%%\n\nint yy::yylex(YYSTYPE *yylval, yy::location *yylloc, QJson::ParserPrivate* driver)\n{\n  JSonScanner* scanner = driver->m_scanner;\n  yylval->clear();\n  int ret = scanner->yylex(yylval, yylloc);\n\n  qjsonDebug() << \"json_parser::yylex - calling scanner yylval==|\"\n           << yylval->toByteArray() << \"|, ret==|\" << QString::number(ret) << \"|\";\n  \n  return ret;\n}\n\nvoid yy::json_parser::error (const yy::location& yyloc,\n                                 const std::string& error)\n{\n  /*qjsonDebug() << yyloc.begin.line;\n  qjsonDebug() << yyloc.begin.column;\n  qjsonDebug() << yyloc.end.line;\n  qjsonDebug() << yyloc.end.column;*/\n  qjsonDebug() << \"json_parser::error [line\" << yyloc.end.line << \"] -\" << error.c_str() ;\n  driver->setError(QString::fromLatin1(error.c_str()), yyloc.end.line);\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/json_scanner.cpp",
    "content": "/* This file is part of QJson\n *\n * Copyright (C) 2008 Flavio Castelli <flavio.castelli@gmail.com>\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License version 2.1, as published by the Free Software Foundation.\n * \n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this library; see the file COPYING.LIB.  If not, write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA 02110-1301, USA.\n */\n\n#include \"qjson_debug.h\"\n#include \"json_scanner.h\"\n#include \"json_parser.hh\"\n\n#include <ctype.h>\n\n#include <QtCore/QDebug>\n#include <QtCore/QRegExp>\n\n#include <cassert>\n\nbool ishexnstring(const QString& string) {\n  for (int i = 0; i < string.length(); i++) {\n    if (isxdigit(string[i] == 0))\n      return false;\n  }\n  return true;\n}\n\nJSonScanner::JSonScanner(QIODevice* io)\n  : m_allowSpecialNumbers(false),\n    m_io (io)\n{\n  m_quotmarkClosed = true;\n  m_quotmarkCount = 0;\n}\n\nvoid JSonScanner::allowSpecialNumbers(bool allow) {\n  m_allowSpecialNumbers = allow;\n}\n\nstatic QString unescape( const QByteArray& ba, bool* ok ) {\n  assert( ok );\n  *ok = false;\n  QString res;\n  QByteArray seg;\n  bool bs = false;\n  for ( int i = 0, size = ba.size(); i < size; ++i ) {\n    const char ch = ba[i];\n    if ( !bs ) {\n      if ( ch == '\\\\' )\n        bs = true;\n      else\n        seg += ch;\n    } else {\n      bs = false;\n      switch ( ch ) {\n        case 'b':\n          seg += '\\b';\n          break;\n        case 'f':\n          seg += '\\f';\n          break;\n        case 'n':\n          seg += '\\n';\n          break;\n        case 'r':\n          seg += '\\r';\n          break;\n        case 't':\n          seg += '\\t';\n          break;\n        case 'u':\n        {\n          res += QString::fromUtf8( seg );\n          seg.clear();\n\n          if ( i > size - 5 ) {\n            //error\n            return QString();\n          }\n\n          const QString hex_digit1 = QString::fromUtf8( ba.mid( i + 1, 2 ) );\n          const QString hex_digit2 = QString::fromUtf8( ba.mid( i + 3, 2 ) );\n          i += 4;\n\n          if ( !ishexnstring( hex_digit1 ) || !ishexnstring( hex_digit2 ) ) {\n            qCritical() << \"Not an hex string:\" << hex_digit1 << hex_digit2;\n            return QString();\n          }\n          bool hexOk;\n          const ushort hex_code1 = hex_digit1.toShort( &hexOk, 16 );\n          if (!hexOk) {\n            qCritical() << \"error converting hex value to short:\" << hex_digit1;\n            return QString();\n          }\n          const ushort hex_code2 = hex_digit2.toShort( &hexOk, 16 );\n          if (!hexOk) {\n            qCritical() << \"error converting hex value to short:\" << hex_digit2;\n            return QString();\n          }\n\n          res += QChar(hex_code2, hex_code1);\n          break;\n        }\n        case '\\\\':\n          seg  += '\\\\';\n          break;\n        default:\n          seg += ch;\n          break;\n      }\n    }\n  }\n  res += QString::fromUtf8( seg );\n  *ok = true;\n  return res;\n}\n\nint JSonScanner::yylex(YYSTYPE* yylval, yy::location *yylloc)\n{\n  char ch;\n\n  if (!m_io->isOpen()) {\n    qCritical() << \"JSonScanner::yylex - io device is not open\";\n    return -1;\n  }\n\n  yylloc->step();\n\n  do {\n    bool ret;\n    if (m_io->atEnd()) {\n      qjsonDebug() << \"JSonScanner::yylex - yy::json_parser::token::END\";\n      return yy::json_parser::token::END;\n    }\n    else\n      ret = m_io->getChar(&ch);\n\n    if (!ret) {\n      qCritical() << \"JSonScanner::yylex - error reading from io device\";\n      return -1;\n    }\n\n    qjsonDebug() << \"JSonScanner::yylex - got |\" << ch << \"|\";\n    yylloc->columns();\n\n    if (ch == '\\n' || ch == '\\r')\n      yylloc->lines();\n  } while (m_quotmarkClosed && (isspace(ch) != 0));\n\n  if (m_quotmarkClosed && ((ch == 't') || (ch == 'T'))) {\n    const QByteArray buf = m_io->peek(3).toLower();\n    if (buf == \"rue\") {\n      m_io->read (3);\n      yylloc->columns(3);\n      qjsonDebug() << \"JSonScanner::yylex - TRUE_VAL\";\n      return yy::json_parser::token::TRUE_VAL;\n    }\n  }\n  else if (m_quotmarkClosed && ((ch == 'n') || (ch == 'N'))) {\n    const QByteArray buf = m_io->peek(3).toLower();\n    if (buf == \"ull\") {\n      m_io->read (3);\n      yylloc->columns(3);\n      qjsonDebug() << \"JSonScanner::yylex - NULL_VAL\";\n      return yy::json_parser::token::NULL_VAL;\n    } else if (buf.startsWith(\"an\") && m_allowSpecialNumbers) {\n      m_io->read(2);\n      yylloc->columns(2);\n      qjsonDebug() << \"JSonScanner::yylex - NAN_VAL\";\n      return yy::json_parser::token::NAN_VAL;\n\n    }\n  }\n  else if (m_quotmarkClosed && ((ch == 'f') || (ch == 'F'))) {\n    // check false value\n    const QByteArray buf = m_io->peek(4).toLower();\n    if (buf.length() == 4) {\n      if (buf == \"alse\") {\n        m_io->read (4);\n        yylloc->columns(4);\n        qjsonDebug() << \"JSonScanner::yylex - FALSE_VAL\";\n        return yy::json_parser::token::FALSE_VAL;\n      }\n    }\n  }\n  else if (m_quotmarkClosed && ((ch == 'e') || (ch == 'E'))) {\n    QByteArray ret(1, ch);\n    const QByteArray buf = m_io->peek(1);\n    if (!buf.isEmpty()) {\n      if ((buf[0] == '+' ) || (buf[0] == '-' )) {\n        ret += m_io->read (1);\n        yylloc->columns();\n      }\n    }\n    *yylval = QVariant(QString::fromUtf8(ret));\n    return yy::json_parser::token::E;\n  }\n  else if (m_allowSpecialNumbers && m_quotmarkClosed && ((ch == 'I') || (ch == 'i'))) {\n    QByteArray ret(1, ch);\n    const QByteArray buf = m_io->peek(7);\n    if (buf == \"nfinity\") {\n      m_io->read(7);\n      yylloc->columns(7);\n      qjsonDebug() << \"JSonScanner::yylex - INFINITY_VAL\";\n      return yy::json_parser::token::INFINITY_VAL;\n    }\n  }\n\n  if (ch != '\"' && !m_quotmarkClosed) {\n    // we're inside a \" \" block\n    QByteArray raw;\n    raw += ch;\n    char prevCh = ch;\n    bool escape_on = (ch == '\\\\') ? true : false;\n\n    while ( true ) {\n      char nextCh;\n      qint64 ret = m_io->peek(&nextCh, 1);\n      if (ret != 1) {\n        if (m_io->atEnd())\n          return yy::json_parser::token::END;\n        else\n          return -1;\n      } else if ( !escape_on && nextCh == '\\\"' ) {\n        bool ok;\n        const QString str = unescape( raw, &ok );\n        *yylval = ok ? str : QString();\n        return ok ? yy::json_parser::token::STRING : -1;\n      }\n#if 0\n      if ( prevCh == '\\\\' && nextCh != '\"' && nextCh != '\\\\' && nextCh != '/' &&\n           nextCh != 'b' && nextCh != 'f' && nextCh != 'n' &&\n           nextCh != 'r' && nextCh != 't' && nextCh != 'u') {\n        qjsonDebug() << \"Just read\" << nextCh;\n        qjsonDebug() << \"JSonScanner::yylex - error decoding escaped sequence\";\n        return -1;\n       }\n#endif\n      m_io->read(1); // consume\n      raw += nextCh;\n      prevCh = nextCh;\n      if (escape_on)\n        escape_on = false;\n      else\n        escape_on = (prevCh == '\\\\') ? true : false;\n#if 0\n      if (nextCh == '\\\\') {\n        char buf;\n        if (m_io->getChar (&buf)) {\n          yylloc->columns();\n          if (((buf != '\"') && (buf != '\\\\') && (buf != '/') &&\n              (buf != 'b') && (buf != 'f') && (buf != 'n') &&\n              (buf != 'r') && (buf != 't') && (buf != 'u'))) {\n                qjsonDebug() << \"Just read\" << buf;\n                qjsonDebug() << \"JSonScanner::yylex - error decoding escaped sequence\";\n                return -1;\n          }\n        } else {\n          qCritical() << \"JSonScanner::yylex - error decoding escaped sequence : io error\";\n          return -1;\n        }\n      }\n#endif\n    }\n  }\n  else if (isdigit(ch) != 0 && m_quotmarkClosed) {\n    bool ok;\n    QByteArray numArray = QByteArray::fromRawData( &ch, 1 * sizeof(char) );\n    qulonglong number = numArray.toULongLong(&ok);\n    if (!ok) {\n      //This shouldn't happen\n      qCritical() << \"JSonScanner::yylex - error while converting char to ulonglong, returning -1\";\n      return -1;\n    }\n    if (number == 0) {\n      // we have to return immediately otherwise numbers like\n      // 2.04 will be converted to 2.4\n      *yylval = QVariant(number);\n      qjsonDebug() << \"JSonScanner::yylex - yy::json_parser::token::DIGIT\";\n      return yy::json_parser::token::DIGIT;\n    }\n\n    char nextCh;\n    qint64 ret = m_io->peek(&nextCh, 1);\n    while (ret == 1 && isdigit(nextCh)) {\n      m_io->read(1); //consume\n      yylloc->columns(1);\n      numArray = QByteArray::fromRawData( &nextCh, 1 * sizeof(char) );\n      number = number * 10 + numArray.toULongLong(&ok);\n      if (!ok) {\n        //This shouldn't happen\n        qCritical() << \"JSonScanner::yylex - error while converting char to ulonglong, returning -1\";\n        return -1;\n      }\n      ret = m_io->peek(&nextCh, 1);\n    }\n\n    *yylval = QVariant(number);\n    qjsonDebug() << \"JSonScanner::yylex - yy::json_parser::token::DIGIT\";\n    return yy::json_parser::token::DIGIT;\n  }\n  else if (isalnum(ch) != 0) {\n    *yylval = QVariant(QString(QChar::fromLatin1(ch)));\n    qjsonDebug() << \"JSonScanner::yylex - yy::json_parser::token::WORD (\"\n             << ch << \")\";\n    return yy::json_parser::token::STRING;\n  }\n  else if (ch == ':') {\n    // set yylval\n    qjsonDebug() << \"JSonScanner::yylex - yy::json_parser::token::COLON\";\n    return yy::json_parser::token::COLON;\n  }\n  else if (ch == '\"') {\n    // yy::json_parser::token::QUOTMARK (\")\n\n    // set yylval\n    m_quotmarkCount++;\n    if (m_quotmarkCount %2 == 0) {\n      m_quotmarkClosed = true;\n      m_quotmarkCount = 0;\n      qjsonDebug() << \"JSonScanner::yylex - yy::json_parser::token::QUOTMARKCLOSE\";\n      return yy::json_parser::token::QUOTMARKCLOSE;\n    }\n    else {\n      m_quotmarkClosed = false;\n      qjsonDebug() << \"JSonScanner::yylex - yy::json_parser::token::QUOTMARKOPEN\";\n      return yy::json_parser::token::QUOTMARKOPEN;\n    }\n  }\n  else if (ch == ',') {\n    qjsonDebug() << \"JSonScanner::yylex - yy::json_parser::token::COMMA\";\n    return yy::json_parser::token::COMMA;\n  }\n  else if (ch == '.') {\n    qjsonDebug() << \"JSonScanner::yylex - yy::json_parser::token::DOT\";\n    return yy::json_parser::token::DOT;\n  }\n  else if (ch == '-') {\n    qjsonDebug() << \"JSonScanner::yylex - yy::json_parser::token::MINUS\";\n    return yy::json_parser::token::MINUS;\n  }\n  else if (ch == '[') {\n    qjsonDebug() << \"JSonScanner::yylex - yy::json_parser::token::SQUARE_BRACKET_OPEN\";\n    return yy::json_parser::token::SQUARE_BRACKET_OPEN;\n  }\n  else if (ch == ']') {\n    qjsonDebug() << \"JSonScanner::yylex - yy::json_parser::token::SQUARE_BRACKET_CLOSE\";\n    return yy::json_parser::token::SQUARE_BRACKET_CLOSE;\n  }\n  else if (ch == '{') {\n    qjsonDebug() << \"JSonScanner::yylex - yy::json_parser::token::CURLY_BRACKET_OPEN\";\n    return yy::json_parser::token::CURLY_BRACKET_OPEN;\n  }\n  else if (ch == '}') {\n    qjsonDebug() << \"JSonScanner::yylex - yy::json_parser::token::CURLY_BRACKET_CLOSE\";\n    return yy::json_parser::token::CURLY_BRACKET_CLOSE;\n  }\n\n  //unknown char!\n  //TODO yyerror?\n  qCritical() << \"JSonScanner::yylex - unknown char, returning -1\";\n  return -1;\n}\n\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/json_scanner.h",
    "content": "/* This file is part of QJson\n *\n * Copyright (C) 2008 Flavio Castelli <flavio.castelli@gmail.com>\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License version 2.1, as published by the Free Software Foundation.\n * \n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this library; see the file COPYING.LIB.  If not, write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA 02110-1301, USA.\n */\n\n#ifndef _JSON_SCANNER\n#define _JSON_SCANNER\n\n#include <fstream>\n#include <string>\n\n#include <QtCore/QIODevice>\n#include <QtCore/QVariant>\n\n#define YYSTYPE QVariant\n\n#include \"parser_p.h\"\n\nnamespace yy {\n  class location;\n  int yylex(YYSTYPE *yylval, yy::location *yylloc, QJson::ParserPrivate* driver);\n}\n\nclass JSonScanner\n{\n    public:\n        explicit JSonScanner(QIODevice* io);\n        int yylex(YYSTYPE* yylval, yy::location *yylloc);\n        void allowSpecialNumbers(bool allow);\n\n    protected:\n        bool m_quotmarkClosed;\n        bool m_allowSpecialNumbers;\n        unsigned int m_quotmarkCount;\n        QIODevice* m_io;\n};\n\n#endif\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/location.hh",
    "content": "/* A Bison parser, made by GNU Bison 2.3.  */\n\n/* Locations for Bison parsers in C++\n\n   Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.\n\n   This program is free software; you can redistribute it and/or modify\n   it under the terms of the GNU General Public License as published by\n   the Free Software Foundation; either version 2, or (at your option)\n   any later version.\n\n   This program is distributed in the hope that it will be useful,\n   but WITHOUT ANY WARRANTY; without even the implied warranty of\n   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n   GNU General Public License for more details.\n\n   You should have received a copy of the GNU General Public License\n   along with this program; if not, write to the Free Software\n   Foundation, Inc., 51 Franklin Street, Fifth Floor,\n   Boston, MA 02110-1301, USA.  */\n\n/* As a special exception, you may create a larger work that contains\n   part or all of the Bison parser skeleton and distribute that work\n   under terms of your choice, so long as that work isn't itself a\n   parser generator using the skeleton or a modified version thereof\n   as a parser skeleton.  Alternatively, if you modify or redistribute\n   the parser skeleton itself, you may (at your option) remove this\n   special exception, which will cause the skeleton and the resulting\n   Bison output files to be licensed under the GNU General Public\n   License without this special exception.\n\n   This special exception was added by the Free Software Foundation in\n   version 2.2 of Bison.  */\n\n/**\n ** \\file location.hh\n ** Define the yy::location class.\n */\n\n#ifndef BISON_LOCATION_HH\n# define BISON_LOCATION_HH\n\n# include <iostream>\n# include <string>\n# include \"position.hh\"\n\nnamespace yy\n{\n\n  /// Abstract a location.\n  class location\n  {\n  public:\n\n    /// Construct a location.\n    location ()\n      : begin (), end ()\n    {\n    }\n\n\n    /// Initialization.\n    inline void initialize (std::string* fn)\n    {\n      begin.initialize (fn);\n      end = begin;\n    }\n\n    /** \\name Line and Column related manipulators\n     ** \\{ */\n  public:\n    /// Reset initial location to final location.\n    inline void step ()\n    {\n      begin = end;\n    }\n\n    /// Extend the current location to the COUNT next columns.\n    inline void columns (unsigned int count = 1)\n    {\n      end += count;\n    }\n\n    /// Extend the current location to the COUNT next lines.\n    inline void lines (unsigned int count = 1)\n    {\n      end.lines (count);\n    }\n    /** \\} */\n\n\n  public:\n    /// Beginning of the located region.\n    position begin;\n    /// End of the located region.\n    position end;\n  };\n\n  /// Join two location objects to create a location.\n  inline const location operator+ (const location& begin, const location& end)\n  {\n    location res = begin;\n    res.end = end.end;\n    return res;\n  }\n\n  /// Add two location objects.\n  inline const location operator+ (const location& begin, unsigned int width)\n  {\n    location res = begin;\n    res.columns (width);\n    return res;\n  }\n\n  /// Add and assign a location.\n  inline location& operator+= (location& res, unsigned int width)\n  {\n    res.columns (width);\n    return res;\n  }\n\n  /** \\brief Intercept output stream redirection.\n   ** \\param ostr the destination output stream\n   ** \\param loc a reference to the location to redirect\n   **\n   ** Avoid duplicate information.\n   */\n  inline std::ostream& operator<< (std::ostream& ostr, const location& loc)\n  {\n    position last = loc.end - 1;\n    ostr << loc.begin;\n    if (last.filename\n    && (!loc.begin.filename\n        || *loc.begin.filename != *last.filename))\n      ostr << '-' << last;\n    else if (loc.begin.line != last.line)\n      ostr << '-' << last.line  << '.' << last.column;\n    else if (loc.begin.column != last.column)\n      ostr << '-' << last.column;\n    return ostr;\n  }\n\n}\n\n#endif // not BISON_LOCATION_HH\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/parser.cpp",
    "content": "/* This file is part of QJson\n *\n * Copyright (C) 2008 Flavio Castelli <flavio.castelli@gmail.com>\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License version 2.1, as published by the Free Software Foundation.\n * \n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this library; see the file COPYING.LIB.  If not, write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA 02110-1301, USA.\n */\n\n#include \"parser.h\"\n#include \"parser_p.h\"\n#include \"json_parser.hh\"\n#include \"json_scanner.h\"\n\n#include <QtCore/QBuffer>\n#include <QtCore/QStringList>\n#include <QtCore/QTextStream>\n#include <QtCore/QDebug>\n\nusing namespace QJson;\n\nParserPrivate::ParserPrivate() :\n    m_scanner(0)\n  , m_negate(false)\n  , m_error(false)\n  , m_errorLine(0)\n  , m_specialNumbersAllowed(false)\n{\n}\n\nParserPrivate::~ParserPrivate()\n{\n  delete m_scanner;\n}\n\nvoid ParserPrivate::setError(QString errorMsg, int errorLine) {\n  m_error = true;\n  m_errorMsg = errorMsg;\n  m_errorLine = errorLine;\n}\n\nParser::Parser() :\n    d(new ParserPrivate)\n{\n}\n\nParser::~Parser()\n{\n  delete d;\n}\n\nQVariant Parser::parse (QIODevice* io, bool* ok)\n{\n  d->m_errorMsg.clear();\n  delete d->m_scanner;\n  d->m_scanner = 0;\n\n  if (!io->isOpen()) {\n    if (!io->open(QIODevice::ReadOnly)) {\n      if (ok != 0)\n        *ok = false;\n      qCritical (\"Error opening device\");\n      return QVariant();\n    }\n  }\n\n  if (!io->isReadable()) {\n    if (ok != 0)\n      *ok = false;\n    qCritical (\"Device is not readable\");\n    io->close();\n    return QVariant();\n  }\n\n  d->m_scanner = new JSonScanner (io);\n  d->m_scanner->allowSpecialNumbers(d->m_specialNumbersAllowed);\n  yy::json_parser parser(d);\n  parser.parse();\n\n  delete d->m_scanner;\n  d->m_scanner = 0;\n\n  if (ok != 0)\n    *ok = !d->m_error;\n\n  io->close();\n  return d->m_result;\n}\n\nQVariant Parser::parse(const QByteArray& jsonString, bool* ok) {\n  QBuffer buffer;\n  buffer.open(QBuffer::ReadWrite);\n  buffer.write(jsonString);\n  buffer.seek(0);\n  return parse (&buffer, ok);\n}\n\nQString Parser::errorString() const\n{\n  return d->m_errorMsg;\n}\n\nint Parser::errorLine() const\n{\n  return d->m_errorLine;\n}\n\nvoid QJson::Parser::allowSpecialNumbers(bool allowSpecialNumbers) {\n  d->m_specialNumbersAllowed = allowSpecialNumbers;\n}\n\nbool Parser::specialNumbersAllowed() const {\n  return d->m_specialNumbersAllowed;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/parser.h",
    "content": "/* This file is part of QJson\n *\n * Copyright (C) 2008 Flavio Castelli <flavio.castelli@gmail.com>\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License version 2.1, as published by the Free Software Foundation.\n * \n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this library; see the file COPYING.LIB.  If not, write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA 02110-1301, USA.\n */\n\n#ifndef QJSON_PARSER_H\n#define QJSON_PARSER_H\n\n#include \"qjson_export.h\"\n\nclass QIODevice;\nclass QVariant;\n\nnamespace QJson {\n\n  class ParserPrivate;\n\n  /**\n  * @brief Main class used to convert JSON data to QVariant objects\n  */\n  class QJSON_EXPORT Parser\n  {\n    public:\n      Parser();\n      ~Parser();\n\n      /**\n      * Read JSON string from the I/O Device and converts it to a QVariant object\n      * @param io Input output device\n      * @param ok if a conversion error occurs, *ok is set to false; otherwise *ok is set to true.\n      * @returns a QVariant object generated from the JSON string\n      */\n      QVariant parse(QIODevice* io, bool* ok = 0);\n\n      /**\n      * This is a method provided for convenience.\n      * @param jsonData data containing the JSON object representation\n      * @param ok if a conversion error occurs, *ok is set to false; otherwise *ok is set to true.\n      * @returns a QVariant object generated from the JSON string\n      * @sa errorString\n      * @sa errorLine\n      */\n      QVariant parse(const QByteArray& jsonData, bool* ok = 0);\n\n      /**\n      * This method returns the error message\n      * @returns a QString object containing the error message of the last parse operation\n      * @sa errorLine\n      */\n      QString errorString() const;\n\n      /**\n      * This method returns line number where the error occurred\n      * @returns the line number where the error occurred\n      * @sa errorString\n      */\n      int errorLine() const;\n\n      /**\n       * Sets whether special numbers (Infinity, -Infinity, NaN) are allowed as an extension to\n       * the standard\n       * @param  allowSpecialNumbers new value of whether special numbers are allowed\n       * @sa specialNumbersAllowed\n       */\n      void allowSpecialNumbers(bool allowSpecialNumbers);\n\n      /**\n       * @returns whether special numbers (Infinity, -Infinity, NaN) are allowed\n       * @sa allowSpecialNumbers\n       */\n      bool specialNumbersAllowed() const;\n\n    private:\n      Q_DISABLE_COPY(Parser)\n      ParserPrivate* const d;\n  };\n}\n\n#endif // QJSON_PARSER_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/parser_p.h",
    "content": "/* This file is part of QJson\n *\n * Copyright (C) 2008 Flavio Castelli <flavio.castelli@gmail.com>\n * Copyright (C) 2009 Michael Leupold <lemma@confuego.org>\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License version 2.1, as published by the Free Software Foundation.\n * \n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this library; see the file COPYING.LIB.  If not, write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA 02110-1301, USA.\n */\n\n#ifndef QJSON_PARSER_P_H\n#define QJSON_PARSER_P_H\n\n#include \"parser.h\"\n\n#include <QtCore/QString>\n#include <QtCore/QVariant>\n\nclass JSonScanner;\n\nnamespace yy {\n  class json_parser;\n}\n\nnamespace QJson {\n\n  class ParserPrivate\n  {\n    public:\n      ParserPrivate();\n      ~ParserPrivate();\n\n      void setError(QString errorMsg, int line);\n\n      JSonScanner* m_scanner;\n      bool m_negate;\n      bool m_error;\n      int m_errorLine;\n      QString m_errorMsg;\n      QVariant m_result;\n      bool m_specialNumbersAllowed;\n  };\n}\n\n#endif // QJSON_PARSER_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/parserrunnable.cpp",
    "content": "/* This file is part of qjson\n  *\n  * Copyright (C) 2009 Flavio Castelli <flavio@castelli.name>\n  *\n  * This library is free software; you can redistribute it and/or\n  * modify it under the terms of the GNU Lesser General Public\n  * License version 2.1, as published by the Free Software Foundation.\n  * \n  *\n  * This library is distributed in the hope that it will be useful,\n  * but WITHOUT ANY WARRANTY; without even the implied warranty of\n  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n  * Lesser General Public License for more details.\n  *\n  * You should have received a copy of the GNU Lesser General Public License\n  * along with this library; see the file COPYING.LIB.  If not, write to\n  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n  * Boston, MA 02110-1301, USA.\n  */\n\n#include \"parserrunnable.h\"\n\n#include \"parser.h\"\n\n#include <QtCore/QDebug>\n#include <QtCore/QVariant>\n\nusing namespace QJson;\n\nclass QJson::ParserRunnable::Private\n{\n  public:\n    QByteArray m_data;\n};\n\nParserRunnable::ParserRunnable(QObject* parent)\n    : QObject(parent),\n      QRunnable(),\n      d(new Private)\n{\n  qRegisterMetaType<QVariant>(\"QVariant\");\n}\n\nParserRunnable::~ParserRunnable()\n{\n  delete d;\n}\n\nvoid ParserRunnable::setData( const QByteArray& data ) {\n  d->m_data = data;\n}\n\nvoid ParserRunnable::run()\n{\n  //qDebug() << Q_FUNC_INFO;\n\n  bool ok;\n  Parser parser;\n  QVariant result = parser.parse (d->m_data, &ok);\n  if (ok) {\n    //qDebug() << \"successfully converted json item to QVariant object\";\n    emit parsingFinished(result, true, QString());\n  } else {\n    const QString errorText = tr(\"An error occurred while parsing json: %1\").arg(parser.errorString());\n    //qCritical() << errorText;\n    emit parsingFinished(QVariant(), false, errorText);\n  }\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/parserrunnable.h",
    "content": "/* This file is part of qjson\n  *\n  * Copyright (C) 2009 Flavio Castelli <flavio@castelli.name>\n  *\n  * This library is free software; you can redistribute it and/or\n  * modify it under the terms of the GNU Lesser General Public\n  * License version 2.1, as published by the Free Software Foundation.\n  * \n  *\n  * This library is distributed in the hope that it will be useful,\n  * but WITHOUT ANY WARRANTY; without even the implied warranty of\n  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n  * Lesser General Public License for more details.\n  *\n  * You should have received a copy of the GNU Lesser General Public License\n  * along with this library; see the file COPYING.LIB.  If not, write to\n  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n  * Boston, MA 02110-1301, USA.\n  */\n\n#ifndef PARSERRUNNABLE_H\n#define PARSERRUNNABLE_H\n\n#include \"qjson_export.h\"\n\n#include <QtCore/QObject>\n#include <QtCore/QRunnable>\n\nclass QVariant;\n\nnamespace QJson {\n  /**\n  * @brief Convenience class for converting JSON data to QVariant objects using a dedicated thread\n  */\n  class QJSON_EXPORT ParserRunnable  : public QObject, public QRunnable\n  {\n    Q_OBJECT\n    public:\n      /**\n      * This signal is emitted when the conversion process has been completed\n      * @param data contains the JSON data that has to be converted\n      * @param parent parent of the object\n      **/\n      explicit ParserRunnable(QObject* parent = 0);\n      ~ParserRunnable();\n\n      void setData( const QByteArray& data );\n\n      void run();\n\n    Q_SIGNALS:\n      /**\n      * This signal is emitted when the parsing process has been completed\n      * @param json contains the result of the parsing\n      * @param ok if a parsing error occurs ok is set to false, otherwise it's set to true.\n      * @param error_msg contains a string explaining the failure reason\n      **/\n      void parsingFinished(const QVariant& json, bool ok, const QString& error_msg);\n\n    private:\n      Q_DISABLE_COPY(ParserRunnable)\n      class Private;\n      Private* const d;\n  };\n}\n\n#endif // PARSERRUNNABLE_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/position.hh",
    "content": "/* A Bison parser, made by GNU Bison 2.3.  */\n\n/* Positions for Bison parsers in C++\n\n   Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.\n\n   This program is free software; you can redistribute it and/or modify\n   it under the terms of the GNU General Public License as published by\n   the Free Software Foundation; either version 2, or (at your option)\n   any later version.\n\n   This program is distributed in the hope that it will be useful,\n   but WITHOUT ANY WARRANTY; without even the implied warranty of\n   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n   GNU General Public License for more details.\n\n   You should have received a copy of the GNU General Public License\n   along with this program; if not, write to the Free Software\n   Foundation, Inc., 51 Franklin Street, Fifth Floor,\n   Boston, MA 02110-1301, USA.  */\n\n/* As a special exception, you may create a larger work that contains\n   part or all of the Bison parser skeleton and distribute that work\n   under terms of your choice, so long as that work isn't itself a\n   parser generator using the skeleton or a modified version thereof\n   as a parser skeleton.  Alternatively, if you modify or redistribute\n   the parser skeleton itself, you may (at your option) remove this\n   special exception, which will cause the skeleton and the resulting\n   Bison output files to be licensed under the GNU General Public\n   License without this special exception.\n\n   This special exception was added by the Free Software Foundation in\n   version 2.2 of Bison.  */\n\n/**\n ** \\file position.hh\n ** Define the yy::position class.\n */\n\n#ifndef BISON_POSITION_HH\n# define BISON_POSITION_HH\n\n# include <iostream>\n# include <string>\n\nnamespace yy\n{\n  /// Abstract a position.\n  class position\n  {\n  public:\n\n    /// Construct a position.\n    position ()\n      : filename (0), line (1), column (0)\n    {\n    }\n\n\n    /// Initialization.\n    inline void initialize (std::string* fn)\n    {\n      filename = fn;\n      line = 1;\n      column = 0;\n    }\n\n    /** \\name Line and Column related manipulators\n     ** \\{ */\n  public:\n    /// (line related) Advance to the COUNT next lines.\n    inline void lines (int count = 1)\n    {\n      column = 0;\n      line += count;\n    }\n\n    /// (column related) Advance to the COUNT next columns.\n    inline void columns (int count = 1)\n    {\n      int leftmost = 0;\n      int current  = column;\n      if (leftmost <= current + count)\n\tcolumn += count;\n      else\n\tcolumn = 0;\n    }\n    /** \\} */\n\n  public:\n    /// File name to which this position refers.\n    std::string* filename;\n    /// Current line number.\n    unsigned int line;\n    /// Current column number.\n    unsigned int column;\n  };\n\n  /// Add and assign a position.\n  inline const position&\n  operator+= (position& res, const int width)\n  {\n    res.columns (width);\n    return res;\n  }\n\n  /// Add two position objects.\n  inline const position\n  operator+ (const position& begin, const int width)\n  {\n    position res = begin;\n    return res += width;\n  }\n\n  /// Add and assign a position.\n  inline const position&\n  operator-= (position& res, const int width)\n  {\n    return res += -width;\n  }\n\n  /// Add two position objects.\n  inline const position\n  operator- (const position& begin, const int width)\n  {\n    return begin + -width;\n  }\n\n  /** \\brief Intercept output stream redirection.\n   ** \\param ostr the destination output stream\n   ** \\param pos a reference to the position to redirect\n   */\n  inline std::ostream&  operator<< (std::ostream& ostr, const position& pos)\n  {\n    if (pos.filename) {\n      ostr << (*pos.filename).c_str();\n      ostr << ':';\n    }\n    return ostr << pos.line << '.' << pos.column;\n  }\n}\n\n#endif // not BISON_POSITION_HH\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/qjson_debug.h",
    "content": "/* This file is part of qjson\n  *\n  * Copyright (C) 2009 Michael Leupold <lemma@confuego.org>\n  *\n  * This library is free software; you can redistribute it and/or\n  * modify it under the terms of the GNU Lesser General Public\n  * License version 2.1, as published by the Free Software Foundation.\n  * \n  *\n  * This library is distributed in the hope that it will be useful,\n  * but WITHOUT ANY WARRANTY; without even the implied warranty of\n  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n  * Lesser General Public License for more details.\n  *\n  * You should have received a copy of the GNU Lesser General Public License\n  * along with this library; see the file COPYING.LIB.  If not, write to\n  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n  * Boston, MA 02110-1301, USA.\n  */\n\n#ifndef QJSON_DEBUG_H\n#define QJSON_DEBUG_H\n\n#include <QtCore/QDebug>\n\n// define qjsonDebug()\n#ifdef QJSON_VERBOSE_DEBUG_OUTPUT\n  inline QDebug qjsonDebug() { return QDebug(QtDebugMsg); }\n#else\n  inline QNoDebug qjsonDebug() { return QNoDebug(); }\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/qjson_export.h",
    "content": "/*  This file is part of the KDE project\n    Copyright (C) 2009 Pino Toscano <pino@kde.org>\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License version 2.1, as published by the Free Software Foundation.\n    \n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public License\n    along with this library; see the file COPYING.LIB.  If not, write to\n    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n    Boston, MA 02110-1301, USA.\n*/\n\n#ifndef QJSON_EXPORT_H\n#define QJSON_EXPORT_H\n\n#include <QtCore/qglobal.h>\n\n#define QJSON_EXPORT\n\n#ifndef QJSON_EXPORT\n# if defined(QJSON_MAKEDLL)\n   /* We are building this library */\n#  define QJSON_EXPORT Q_DECL_EXPORT\n# else\n   /* We are using this library */\n#  define QJSON_EXPORT Q_DECL_IMPORT\n# endif\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/qobjecthelper.cpp",
    "content": "/* This file is part of qjson\n  *\n  * Copyright (C) 2009 Till Adam <adam@kde.org>\n  * Copyright (C) 2009 Flavio Castelli <flavio@castelli.name>\n  *\n  * This library is free software; you can redistribute it and/or\n  * modify it under the terms of the GNU Lesser General Public\n  * License version 2.1, as published by the Free Software Foundation.\n  * \n  *\n  * This library is distributed in the hope that it will be useful,\n  * but WITHOUT ANY WARRANTY; without even the implied warranty of\n  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n  * Lesser General Public License for more details.\n  *\n  * You should have received a copy of the GNU Lesser General Public License\n  * along with this library; see the file COPYING.LIB.  If not, write to\n  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n  * Boston, MA 02110-1301, USA.\n  */\n\n\n#include \"qobjecthelper.h\"\n\n#include <QtCore/QMetaObject>\n#include <QtCore/QMetaProperty>\n#include <QtCore/QObject>\n\nusing namespace QJson;\n\nclass QObjectHelper::QObjectHelperPrivate {\n};\n\nQObjectHelper::QObjectHelper()\n  : d (new QObjectHelperPrivate)\n{\n}\n\nQObjectHelper::~QObjectHelper()\n{\n  delete d;\n}\n\nQVariantMap QObjectHelper::qobject2qvariant( const QObject* object,\n                              const QStringList& ignoredProperties)\n{\n  QVariantMap result;\n  const QMetaObject *metaobject = object->metaObject();\n  int count = metaobject->propertyCount();\n  for (int i=0; i<count; ++i) {\n    QMetaProperty metaproperty = metaobject->property(i);\n    const char *name = metaproperty.name();\n\n    if (ignoredProperties.contains(QLatin1String(name)) || (!metaproperty.isReadable()))\n      continue;\n\n    QVariant value = object->property(name);\n    result[QLatin1String(name)] = value;\n }\n  return result;\n}\n\nvoid QObjectHelper::qvariant2qobject(const QVariantMap& variant, QObject* object)\n{\n  const QMetaObject *metaobject = object->metaObject();\n\n  QVariantMap::const_iterator iter;\n  for (iter = variant.constBegin(); iter != variant.constEnd(); ++iter) {\n    int pIdx = metaobject->indexOfProperty( iter.key().toLatin1() );\n\n    if ( pIdx < 0 ) {\n      continue;\n    }\n\n    QMetaProperty metaproperty = metaobject->property( pIdx );\n    QVariant::Type type = metaproperty.type();\n    QVariant v( iter.value() );\n    if ( v.canConvert( type ) ) {\n      v.convert( type );\n      metaproperty.write( object, v );\n    } else if (QString(QLatin1String(\"QVariant\")).compare(QLatin1String(metaproperty.typeName())) == 0) {\n     metaproperty.write( object, v );\n    }\n  }\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/qobjecthelper.h",
    "content": "/* This file is part of qjson\n  *\n  * Copyright (C) 2009 Flavio Castelli <flavio@castelli.name>\n  *\n  * This library is free software; you can redistribute it and/or\n  * modify it under the terms of the GNU Lesser General Public\n  * License version 2.1, as published by the Free Software Foundation.\n  * \n  *\n  * This library is distributed in the hope that it will be useful,\n  * but WITHOUT ANY WARRANTY; without even the implied warranty of\n  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n  * Lesser General Public License for more details.\n  *\n  * You should have received a copy of the GNU Lesser General Public License\n  * along with this library; see the file COPYING.LIB.  If not, write to\n  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n  * Boston, MA 02110-1301, USA.\n  */\n\n#ifndef QOBJECTHELPER_H\n#define QOBJECTHELPER_H\n\n#include \"qjson_export.h\"\n\n#include <QtCore/QLatin1String>\n#include <QtCore/QStringList>\n#include <QtCore/QVariantMap>\n\nclass QObject;\n\nnamespace QJson {\n  /**\n  * @brief Class used to convert QObject into QVariant and vivce-versa.\n  * During these operations only the class attributes defined as properties will\n  * be considered.\n  * Properties marked as 'non-stored' will be ignored.\n  *\n  * Suppose the declaration of the Person class looks like this:\n  * \\code\n  * class Person : public QObject\n    {\n      Q_OBJECT\n\n      Q_PROPERTY(QString name READ name WRITE setName)\n      Q_PROPERTY(int phoneNumber READ phoneNumber WRITE setPhoneNumber)\n      Q_PROPERTY(Gender gender READ gender WRITE setGender)\n      Q_PROPERTY(QDate dob READ dob WRITE setDob)\n      Q_ENUMS(Gender)\n\n     public:\n        Person(QObject* parent = 0);\n        ~Person();\n\n        QString name() const;\n        void setName(const QString& name);\n\n        int phoneNumber() const;\n        void setPhoneNumber(const int  phoneNumber);\n\n        enum Gender {Male, Female};\n        void setGender(Gender gender);\n        Gender gender() const;\n\n        QDate dob() const;\n        void setDob(const QDate& dob);\n\n      private:\n        QString m_name;\n        int m_phoneNumber;\n        Gender m_gender;\n        QDate m_dob;\n    };\n    \\endcode\n\n    The following code will serialize an instance of Person to JSON :\n\n    \\code\n    Person person;\n    person.setName(\"Flavio\");\n    person.setPhoneNumber(123456);\n    person.setGender(Person::Male);\n    person.setDob(QDate(1982, 7, 12));\n\n    QVariantMap variant = QObjectHelper::qobject2qvariant(&person);\n    Serializer serializer;\n    qDebug() << serializer.serialize( variant);\n    \\endcode\n\n    The generated output will be:\n    \\code\n    { \"dob\" : \"1982-07-12\", \"gender\" : 0, \"name\" : \"Flavio\", \"phoneNumber\" : 123456 }\n    \\endcode\n\n    It's also possible to initialize a QObject using the values stored inside of\n    a QVariantMap.\n\n    Suppose you have the following JSON data stored into a QString:\n    \\code\n    { \"dob\" : \"1982-07-12\", \"gender\" : 0, \"name\" : \"Flavio\", \"phoneNumber\" : 123456 }\n    \\endcode\n\n    The following code will initialize an already allocated instance of Person\n    using the JSON values:\n    \\code\n    Parser parser;\n    QVariant variant = parser.parse(json);\n\n    Person person;\n    QObjectHelper::qvariant2qobject(variant.toMap(), &person);\n    \\endcode\n\n    \\sa Parser\n    \\sa Serializer\n  */\n  class QJSON_EXPORT QObjectHelper {\n    public:\n      QObjectHelper();\n      ~QObjectHelper();\n      \n    /**\n    * This method converts a QObject instance into a QVariantMap.\n    *\n    * @param object The QObject instance to be converted.\n    * @param ignoredProperties Properties that won't be converted.\n    */\n    static QVariantMap qobject2qvariant( const QObject* object,\n                                  const QStringList& ignoredProperties = QStringList(QString(QLatin1String(\"objectName\"))));\n\n    /**\n    * This method converts a QVariantMap instance into a QObject\n    *\n    * @param object The QObject instance to be converted.\n    */\n    static void qvariant2qobject(const QVariantMap& variant, QObject* object);\n\n    private:\n      Q_DISABLE_COPY(QObjectHelper)\n      class QObjectHelperPrivate;\n      QObjectHelperPrivate* const d;\n  };\n}\n\n#endif // QOBJECTHELPER_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/serializer.cpp",
    "content": "/* This file is part of qjson\n  *\n  * Copyright (C) 2009 Till Adam <adam@kde.org>\n  * Copyright (C) 2009 Flavio Castelli <flavio@castelli.name>\n  *\n  * This library is free software; you can redistribute it and/or\n  * modify it under the terms of the GNU Lesser General Public\n  * License version 2.1, as published by the Free Software Foundation.\n  * \n  *\n  * This library is distributed in the hope that it will be useful,\n  * but WITHOUT ANY WARRANTY; without even the implied warranty of\n  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n  * Lesser General Public License for more details.\n  *\n  * You should have received a copy of the GNU Lesser General Public License\n  * along with this library; see the file COPYING.LIB.  If not, write to\n  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n  * Boston, MA 02110-1301, USA.\n  */\n\n#include \"serializer.h\"\n\n#include <QtCore/QDataStream>\n#include <QtCore/QStringList>\n#include <QtCore/QVariant>\n\n#include <cmath>\n\n#ifdef _MSC_VER  // using MSVC compiler\n#include <float.h>\n#endif\n\nusing namespace QJson;\n\nclass Serializer::SerializerPrivate {\n  public:\n    SerializerPrivate() :\n      specialNumbersAllowed(false),\n      indentMode(QJson::IndentNone),\n      doublePrecision(6) {\n      }\n    bool specialNumbersAllowed;\n    IndentMode indentMode;\n    int doublePrecision;\n    QByteArray buildIndent(int spaces);\n    QByteArray serialize( const QVariant &v, int reserved = 0);\n    QString sanitizeString( QString str );\n    QByteArray join( const QList<QByteArray>& list, const QByteArray& sep );\n};\n\nQByteArray Serializer::SerializerPrivate::join( const QList<QByteArray>& list, const QByteArray& sep ) {\n  QByteArray res;\n  Q_FOREACH( const QByteArray& i, list ) {\n    if ( !res.isEmpty() )\n      res += sep;\n    res += i;\n  }\n  return res;\n}\n\nQByteArray Serializer::SerializerPrivate::serialize( const QVariant &v, int reserved )\n{\n  QByteArray str;\n  bool error = false;\n  QByteArray indent;\n\n  if ( ! v.isValid() ) { // invalid or null?\n    str = \"null\";\n  } else if (( v.type() == QVariant::List ) || ( v.type() == QVariant::StringList )){ // an array or a stringlist?\n    const QVariantList list = v.toList();\n    QList<QByteArray> values;\n    Q_FOREACH( const QVariant& var, list )\n    {\n      reserved++;\n      QByteArray serializedValue = serialize( var,reserved );\n      reserved--;\n      if ( serializedValue.isNull() ) {\n        error = true;\n        break;\n      }\n      values << serializedValue;\n    }\n\n    if (indentMode == QJson::IndentMinimum) {\n      QByteArray indent = buildIndent(reserved - 1);\n      str = \"[\\n\" + join( values, \",\\n\" ) + \"\\n\" + indent + \"]\";\n    }\n    else if (indentMode == QJson::IndentMedium || indentMode == QJson::IndentFull) {\n      QByteArray indent = buildIndent(reserved);\n      str = \"[\\n\" + join( values, \",\\n\" ) + \"\\n\" + indent + \"]\";\n    }\n    else if (indentMode == QJson::IndentCompact) {\n      str = \"[\" + join( values, \",\" ) + \"]\";\n    }\n    else {\n      str = \"[ \" + join( values, \", \" ) + \" ]\";\n    }\n\n  } else if ( v.type() == QVariant::Map ) { // variant is a map?\n    const QVariantMap vmap = v.toMap();\n    QMapIterator<QString, QVariant> it( vmap );\n\n    if (indentMode == QJson::IndentMinimum) {\n      QByteArray indent = buildIndent(reserved);\n      str = indent + \"{ \";\n    }\n    else if (indentMode == QJson::IndentMedium || indentMode == QJson::IndentFull) {\n      QByteArray indent = buildIndent(reserved);\n      QByteArray nextindent = buildIndent(reserved + 1);\n      str = indent + \"{\\n\" + nextindent;\n    }\n    else if (indentMode == QJson::IndentCompact) {\n      str = \"{\";\n    }\n    else {\n      str = \"{ \";\n    }\n\n    QList<QByteArray> pairs;\n    while ( it.hasNext() ) {\n      it.next();\n      reserved++;\n      QByteArray serializedValue = serialize( it.value() , reserved);\n      reserved--;\n      if ( serializedValue.isNull() ) {\n        error = true;\n        break;\n      }\n      QByteArray key   = sanitizeString( it.key() ).toUtf8();\n      QByteArray value = serializedValue;\n      if (indentMode == QJson::IndentCompact) {\n        pairs << key + \":\" + value;\n      } else {\n        pairs << key + \" : \" + value;\n      }\n    }\n\n    if (indentMode == QJson::IndentFull) {\n      QByteArray indent = buildIndent(reserved + 1);\n      str += join( pairs, \",\\n\" + indent);\n    }\n    else if (indentMode == QJson::IndentCompact) {\n      str += join( pairs, \",\" );\n    }\n    else {\n      str += join( pairs, \", \" );\n    }\n\n    if (indentMode == QJson::IndentMedium || indentMode == QJson::IndentFull) {\n      QByteArray indent = buildIndent(reserved);\n      str += \"\\n\" + indent + \"}\";\n    }\n    else if (indentMode == QJson::IndentCompact) {\n      str += \"}\";\n    }\n    else {\n      str += \" }\";\n    }\n\n  } else if (( v.type() == QVariant::String ) ||  ( v.type() == QVariant::ByteArray )) { // a string or a byte array?\n    str = sanitizeString( v.toString() ).toUtf8();\n  } else if (( v.type() == QVariant::Double) || ((QMetaType::Type)v.type() == QMetaType::Float)) { // a double or a float?\n    const double value = v.toDouble();\n#if defined _WIN32 && !defined(Q_OS_SYMBIAN)\n    const bool special = _isnan(value) || !_finite(value);\n#elif defined(Q_OS_SYMBIAN) || defined(Q_OS_ANDROID)\n    const bool special = isnan(value) || isinf(value);\n#else\n    const bool special = std::isnan(value) || std::isinf(value);\n#endif\n    if (special) {\n      if (specialNumbersAllowed) {\n#if defined _WIN32 && !defined(Q_OS_SYMBIAN)\n        if (_isnan(value)) {\n#elif defined(Q_OS_SYMBIAN) || defined(Q_OS_ANDROID)\n        if (isnan(value)) {\n#else\n        if (std::isnan(value)) {\n#endif\n          str += \"NaN\";\n        } else {\n          if (value<0) {\n            str += '-';\n          }\n          str += \"Infinity\";\n        }\n      } else {\n        qCritical(\"Attempt to write NaN or infinity, which is not supported by json\");\n        error = true;\n    }\n    } else {\n      str = QByteArray::number( value , 'g', doublePrecision);\n      if( ! str.contains( \".\" ) && ! str.contains( \"e\" ) ) {\n        str += \".0\";\n      }\n    }\n  } else if ( v.type() == QVariant::Bool ) { // boolean value?\n    str = ( v.toBool() ? \"true\" : \"false\" );\n  } else if ( v.type() == QVariant::ULongLong ) { // large unsigned number?\n    str = QByteArray::number( v.value<qulonglong>() );\n  } else if ( v.canConvert<qlonglong>() ) { // any signed number?\n    str = QByteArray::number( v.value<qlonglong>() );\n  } else if ( v.canConvert<QString>() ){ // can value be converted to string?\n    // this will catch QDate, QDateTime, QUrl, ...\n    str = sanitizeString( v.toString() ).toUtf8();\n    //TODO: catch other values like QImage, QRect, ...\n  } else {\n    error = true;\n  }\n  if ( !error )\n  {\n    return str;\n  }\n  else\n    return QByteArray();\n}\n\nQByteArray Serializer::SerializerPrivate::buildIndent(int spaces)\n{\n   QByteArray indent;\n   if (spaces < 0) {\n     spaces = 0;\n   }\n   for (int i = 0; i < spaces; i++ ) {\n     indent += \" \";\n   }\n   return indent;\n}\n\nQString Serializer::SerializerPrivate::sanitizeString( QString str )\n{\n  str.replace( QLatin1String( \"\\\\\" ), QLatin1String( \"\\\\\\\\\" ) );\n\n  // escape unicode chars\n  QString result;\n  const ushort* unicode = str.utf16();\n  unsigned int i = 0;\n\n  while ( unicode[ i ] ) {\n    if ( unicode[ i ] < 128 ) {\n      result.append( QChar( unicode[ i ] ) );\n    }\n    else {\n      QString hexCode = QString::number( unicode[ i ], 16 ).rightJustified( 4,\n                                                           QLatin1Char('0') );\n\n      result.append( QLatin1String (\"\\\\u\") ).append( hexCode );\n    }\n    ++i;\n  }\n  str = result;\n\n  str.replace( QLatin1String( \"\\\"\" ), QLatin1String( \"\\\\\\\"\" ) );\n  str.replace( QLatin1String( \"\\b\" ), QLatin1String( \"\\\\b\" ) );\n  str.replace( QLatin1String( \"\\f\" ), QLatin1String( \"\\\\f\" ) );\n  str.replace( QLatin1String( \"\\n\" ), QLatin1String( \"\\\\n\" ) );\n  str.replace( QLatin1String( \"\\r\" ), QLatin1String( \"\\\\r\" ) );\n  str.replace( QLatin1String( \"\\t\" ), QLatin1String( \"\\\\t\" ) );\n\n  return QString( QLatin1String( \"\\\"%1\\\"\" ) ).arg( str );\n}\n\nSerializer::Serializer()\n  : d( new SerializerPrivate )\n{\n}\n\nSerializer::~Serializer() {\n  delete d;\n}\n\nvoid Serializer::serialize( const QVariant& v, QIODevice* io, bool* ok)\n{\n  Q_ASSERT( io );\n  if (ok)\n      *ok = false;\n\n  if (!io->isOpen()) {\n    if (!io->open(QIODevice::WriteOnly)) {\n      qCritical (\"Error opening device\");\n      return;\n    }\n  }\n\n  if (!io->isWritable()) {\n    qCritical (\"Device is not readable\");\n    io->close();\n    return;\n  }\n\n  const QByteArray str = serialize( v );\n  if (io->write(str) == str.count()) {\n    if (ok)\n      *ok = true;\n  }\n}\n\nQByteArray Serializer::serialize( const QVariant &v)\n{\n  return d->serialize(v);\n}\n\nvoid QJson::Serializer::allowSpecialNumbers(bool allow) {\n  d->specialNumbersAllowed = allow;\n}\n\nbool QJson::Serializer::specialNumbersAllowed() const {\n  return d->specialNumbersAllowed;\n}\n\nvoid QJson::Serializer::setIndentMode(IndentMode mode) {\n  d->indentMode = mode;\n}\n\nvoid QJson::Serializer::setDoublePrecision(int precision) {\n  d->doublePrecision = precision;\n}\n\nIndentMode QJson::Serializer::indentMode() const {\n  return d->indentMode;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/serializer.h",
    "content": "/* This file is part of qjson\n  *\n  * Copyright (C) 2009 Till Adam <adam@kde.org>\n  *\n  * This library is free software; you can redistribute it and/or\n  * modify it under the terms of the GNU Lesser General Public\n  * License version 2.1, as published by the Free Software Foundation.\n  * \n  *\n  * This library is distributed in the hope that it will be useful,\n  * but WITHOUT ANY WARRANTY; without even the implied warranty of\n  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n  * Lesser General Public License for more details.\n  *\n  * You should have received a copy of the GNU Lesser General Public License\n  * along with this library; see the file COPYING.LIB.  If not, write to\n  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n  * Boston, MA 02110-1301, USA.\n  */\n\n#ifndef QJSON_SERIALIZER_H\n#define QJSON_SERIALIZER_H\n\n#include \"qjson_export.h\"\n\nclass QIODevice;\nclass QString;\nclass QVariant;\n\nnamespace QJson {\n  /**\n  * @brief How the indentation should work.\n  *\n  * none (default) : { \"foo\" : 0, \"foo1\" : 1, \"foo2\" : [ { \"foo3\" : 3, \"foo4\" : 4 } ] }\n  *\n  * compact : {\"foo\":0,\"foo1\":1,\"foo2\":[{\"foo3\":3,\"foo4\":4}]}\n  *\n  * minimum : { \"foo\" : 0, \"foo1\" : 1, \"foo2\" : [\n  *             { \"foo3\" : 3, \"foo4\" : 4 }\n  *           ] }\n  *\n  * medium : {\n  *           \"foo\" : 0, \"foo1\" : 1, \"foo2\" : [\n  *            {\n  *             \"foo3\" : 3, \"foo4\" : 4\n  *            }\n  *           ]\n  *          }\n  * full : {\n  *         \"foo\" : 0,\n  *         \"foo1\" : 1,\n  *         \"foo2\" : [\n  *          {\n  *           \"foo3\" : 3,\n  *           \"foo4\" : 4\n  *          }\n  *         ]\n  *        }\n  */\n  enum IndentMode {\n    IndentNone,\n    IndentCompact,\n    IndentMinimum,\n    IndentMedium,\n    IndentFull\n  };\n  /**\n  * @brief Main class used to convert QVariant objects to JSON data.\n  *\n  * QVariant objects are converted to a string containing the JSON data.\n  * If QVariant object is empty or not valid a <em>null</em> json object is returned.\n  */\n  class QJSON_EXPORT Serializer {\n  public:\n    Serializer();\n    ~Serializer();\n\n     /**\n      * This method generates a textual JSON representation and outputs it to the\n      * passed in I/O Device.\n      * @param variant The JSON document in its in-memory representation as generated by the\n      * parser.\n      * @param out Input output device\n      * @param ok if a conversion error occurs, *ok is set to false; otherwise *ok is set to true\n      */\n    void serialize( const QVariant& variant, QIODevice* out, bool* ok = 0);\n\n    /**\n      * This is a method provided for convenience. It turns the passed in in-memory\n      * representation of the JSON document into a textual one, which is returned.\n      * If the returned string is empty, the document was empty. If it was null, there\n      * was a parsing error.\n      *\n      * @param variant The JSON document in its in-memory representation as generated by the\n      * parser.\n      */\n\n    QByteArray serialize( const QVariant& variant);\n\n    /**\n     * Allow or disallow writing of NaN and/or Infinity (as an extension to QJson)\n     */\n    void allowSpecialNumbers(bool allow);\n\n    /**\n     * Is Nan and/or Infinity allowed?\n     */\n    bool specialNumbersAllowed() const;\n\n    /**\n     * set output indentation mode as defined in QJson::IndentMode\n     */\n    void setIndentMode(IndentMode mode = QJson::IndentNone);\n\n\n    /**\n    * set double precision used while converting Double\n    * \\sa QByteArray::number\n    */\n    void setDoublePrecision(int precision);\n\n    /**\n     * Returns one of the indentation modes defined in QJson::IndentMode\n     */\n    IndentMode indentMode() const;\n\n  private:\n    Q_DISABLE_COPY(Serializer)\n    class SerializerPrivate;\n    SerializerPrivate* const d;\n  };\n}\n\n#endif // QJSON_SERIALIZER_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/serializerrunnable.cpp",
    "content": "#include \"serializerrunnable.h\"\n\n/* This file is part of qjson\n *\n * Copyright (C) 2009 Flavio Castelli <flavio@castelli.name>\n *               2009 Frank Osterfeld <osterfeld@kde.org>\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License version 2.1, as published by the Free Software Foundation.\n * \n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this library; see the file COPYING.LIB.  If not, write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA 02110-1301, USA.\n */\n\n#include \"parserrunnable.h\"\n#include \"serializer.h\"\n\n#include <QtCore/QDebug>\n#include <QtCore/QVariant>\n\nusing namespace QJson;\n\nclass SerializerRunnable::Private\n{\npublic:\n  QVariant json;\n};\n\nSerializerRunnable::SerializerRunnable(QObject* parent)\n    : QObject(parent),\n      QRunnable(),\n      d(new Private)\n{\n  qRegisterMetaType<QVariant>(\"QVariant\");\n}\n\nSerializerRunnable::~SerializerRunnable()\n{\n  delete d;\n}\n\nvoid SerializerRunnable::setJsonObject( const QVariant& json )\n{\n  d->json = json;\n}\n\nvoid SerializerRunnable::run()\n{\n  Serializer serializer;\n  emit parsingFinished( Serializer().serialize( d->json ), true, QString() );\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/serializerrunnable.h",
    "content": "/* This file is part of qjson\n *\n * Copyright (C) 2009 Frank Osterfeld <osterfeld@kde.org>\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License version 2.1, as published by the Free Software Foundation.\n * \n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this library; see the file COPYING.LIB.  If not, write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA 02110-1301, USA.\n */\n\n#ifndef SERIALIZERRUNNABLE_H\n#define SERIALIZERRUNNABLE_H\n\n#include \"qjson_export.h\"\n\n#include <QtCore/QObject>\n#include <QtCore/QRunnable>\n\nclass QByteArray;\nclass QString;\nclass QVariant;\n\nnamespace QJson {\n  /**\n  * @brief Convenience class for converting JSON data to QVariant objects using a dedicated thread\n  */\n  class QJSON_EXPORT SerializerRunnable  : public QObject, public QRunnable\n  {\n    Q_OBJECT\n    public:\n      /**\n      * This signal is emitted when the conversion process has been completed\n      * @param data contains the JSON data that has to be converted\n      * @param parent parent of the object\n      **/\n      explicit SerializerRunnable(QObject* parent = 0);\n      ~SerializerRunnable();\n\n      /**\n       * Sets the json object to serialize.\n       *\n       * @param json QVariant containing the json representation to be serialized\n       */\n      void setJsonObject( const QVariant& json );\n\n      /* reimp */ void run();\n\n    Q_SIGNALS:\n      /**\n      * This signal is emitted when the serialization process has been completed\n      * @param serialized contains the result of the serialization\n      * @param ok if a serialization error occurs ok is set to false, otherwise it's set to true.\n      * @param error_msg contains a string explaining the failure reason\n      **/\n      void parsingFinished(const QByteArray& serialized, bool ok, const QString& error_msg);\n\n    private:\n      Q_DISABLE_COPY(SerializerRunnable)\n      class Private;\n      Private* const d;\n  };\n}\n\n#endif // SERIALIZERRUNNABLE_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/src.pro",
    "content": "TARGET = json\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude(../../../liteideutils.pri)\n\n\nVERSION = 0.7.1\n\nPRIVATE_HEADERS += \\\n  json_parser.hh \\\n  json_scanner.h \\\n  location.hh \\\n  parser_p.h  \\\n  position.hh \\\n  qjson_debug.h  \\\n  stack.hh\n\nPUBLIC_HEADERS += \\\n  parser.h \\\n  parserrunnable.h \\\n  qobjecthelper.h \\\n  serializer.h \\\n  serializerrunnable.h \\\n  qjson_export.h\n\nHEADERS += $$PRIVATE_HEADERS $$PUBLIC_HEADERS\n\nSOURCES += \\\n  json_parser.cc \\\n  json_scanner.cpp \\\n  parser.cpp \\\n  parserrunnable.cpp \\\n  qobjecthelper.cpp \\\n  serializer.cpp \\\n  serializerrunnable.cpp\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/src/stack.hh",
    "content": "/* A Bison parser, made by GNU Bison 2.3.  */\n\n/* Stack handling for Bison parsers in C++\n\n   Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.\n\n   This program is free software; you can redistribute it and/or modify\n   it under the terms of the GNU General Public License as published by\n   the Free Software Foundation; either version 2, or (at your option)\n   any later version.\n\n   This program is distributed in the hope that it will be useful,\n   but WITHOUT ANY WARRANTY; without even the implied warranty of\n   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n   GNU General Public License for more details.\n\n   You should have received a copy of the GNU General Public License\n   along with this program; if not, write to the Free Software\n   Foundation, Inc., 51 Franklin Street, Fifth Floor,\n   Boston, MA 02110-1301, USA.  */\n\n/* As a special exception, you may create a larger work that contains\n   part or all of the Bison parser skeleton and distribute that work\n   under terms of your choice, so long as that work isn't itself a\n   parser generator using the skeleton or a modified version thereof\n   as a parser skeleton.  Alternatively, if you modify or redistribute\n   the parser skeleton itself, you may (at your option) remove this\n   special exception, which will cause the skeleton and the resulting\n   Bison output files to be licensed under the GNU General Public\n   License without this special exception.\n\n   This special exception was added by the Free Software Foundation in\n   version 2.2 of Bison.  */\n\n#ifndef BISON_STACK_HH\n# define BISON_STACK_HH\n\n#include <deque>\n\nnamespace yy\n{\n  template <class T, class S = std::deque<T> >\n  class stack\n  {\n  public:\n\n    // Hide our reversed order.\n    typedef typename S::reverse_iterator iterator;\n    typedef typename S::const_reverse_iterator const_iterator;\n\n    stack () : seq_ ()\n    {\n    }\n\n    stack (unsigned int n) : seq_ (n)\n    {\n    }\n\n    inline\n    T&\n    operator [] (unsigned int i)\n    {\n      return seq_[i];\n    }\n\n    inline\n    const T&\n    operator [] (unsigned int i) const\n    {\n      return seq_[i];\n    }\n\n    inline\n    void\n    push (const T& t)\n    {\n      seq_.push_front (t);\n    }\n\n    inline\n    void\n    pop (unsigned int n = 1)\n    {\n      for (; n; --n)\n\tseq_.pop_front ();\n    }\n\n    inline\n    unsigned int\n    height () const\n    {\n      return seq_.size ();\n    }\n\n    inline const_iterator begin () const { return seq_.rbegin (); }\n    inline const_iterator end () const { return seq_.rend (); }\n\n  private:\n\n    S seq_;\n  };\n\n  /// Present a slice of the top of a stack.\n  template <class T, class S = stack<T> >\n  class slice\n  {\n  public:\n\n    slice (const S& stack,\n\t   unsigned int range) : stack_ (stack),\n\t\t\t\t range_ (range)\n    {\n    }\n\n    inline\n    const T&\n    operator [] (unsigned int i) const\n    {\n      return stack_[range_ - i];\n    }\n\n  private:\n\n    const S& stack_;\n    unsigned int range_;\n  };\n}\n\n#endif // not BISON_STACK_HH\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/tests/.gitignore",
    "content": "Makefile\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/tests/CMakeLists.txt",
    "content": "ADD_SUBDIRECTORY(cmdline_tester)\nADD_SUBDIRECTORY(parser)\nADD_SUBDIRECTORY(qobjecthelper)\nADD_SUBDIRECTORY(serializer)\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjson/tests/tests.pro",
    "content": "TEMPLATE = subdirs\nSUBDIRS = cmdline_tester \\\n          parser \\\n          qobjecthelper \\\n          serializer\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/AUTHORS",
    "content": "Matt Broadstone (mbroadstone (at) devonit.com)\nMatt Godshall (mgodshall (at) devonit.com)\nAlgirdas Mockus (algirdas.mockus (at) gmail.com)\nEtienne Savard (esavard (at) symbiosoft.net)\nAlex Skorodumov\nFargier Sylvain (fargier.sylvain (at) free.fr)"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/CHANGES",
    "content": "qjsonrpc 1.0 (10-29-2013)\n * added support for Compact wire format\n * various fixes for stability/performance improvements\n * eliminate use of QMetaObject::invokeMethod leading to unexpected timeouts\n * improve unit tests to use QBuffer-backed jsonrpc sockets\n\nqjsonrpc 1.1 (UNRELEASED)\n * allow calling of Q_SIGNALS on service objects\n * allow for removal of services from QJsonRpcServiceProvider\n * qt5 cleanups\n * split most classes out into their own headers/source files \n * added ObjectCreator for handling object cleanup in dispatch through RAII (Alex Skorodumov)\n * added QJsonRpcHttpClient for easy access to web services using jsonrpc\n * removed QVariant-based API for QJsonRpcMessage in favor of QJsonValue/QJsonArray\n * added support for named parameters (Alexandros Dermenakis)\n * remove QtGui dependency in manual tests"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/LICENSE",
    "content": "\n QJsonRpc is Copyright (C) 2012-2013 Matt Broadstone\n\n You may use, distribute and copy QJsonRpc under the terms of\n GNU Library General Public License version 2, which is displayed below.\n\n-------------------------------------------------------------------------\n                  GNU LIBRARY GENERAL PUBLIC LICENSE\n                       Version 2, June 1991\n\n Copyright (C) 1991 Free Software Foundation, Inc.\n 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n[This is the first released version of the library GPL.  It is\n numbered 2 because it goes with version 2 of the ordinary GPL.]\n\n                            Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicenses are intended to guarantee your freedom to share and change\nfree software--to make sure the software is free for all its users.\n\n  This license, the Library General Public License, applies to some\nspecially designated Free Software Foundation software, and to any\nother libraries whose authors decide to use it.  You can use it for\nyour libraries, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthis service if you wish), that you receive source code or can get it\nif you want it, that you can change the software or use pieces of it\nin new free programs; and that you know you can do these things.\n\n  To protect your rights, we need to make restrictions that forbid\nanyone to deny you these rights or to ask you to surrender the rights.\nThese restrictions translate to certain responsibilities for you if\nyou distribute copies of the library, or if you modify it.\n\n  For example, if you distribute copies of the library, whether gratis\nor for a fee, you must give the recipients all the rights that we gave\nyou.  You must make sure that they, too, receive or can get the source\ncode.  If you link a program with the library, you must provide\ncomplete object files to the recipients so that they can relink them\nwith the library, after making changes to the library and recompiling\nit.  And you must show them these terms so they know their rights.\n\n  Our method of protecting your rights has two steps: (1) copyright\nthe library, and (2) offer you this license which gives you legal\npermission to copy, distribute and/or modify the library.\n\n  Also, for each distributor's protection, we want to make certain\nthat everyone understands that there is no warranty for this free\nlibrary.  If the library is modified by someone else and passed on, we\nwant its recipients to know that what they have is not the original\nversion, so that any problems introduced by others will not reflect on\nthe original authors' reputations.\n\f\n  Finally, any free program is threatened constantly by software\npatents.  We wish to avoid the danger that companies distributing free\nsoftware will individually obtain patent licenses, thus in effect\ntransforming the program into proprietary software.  To prevent this,\nwe have made it clear that any patent must be licensed for everyone's\nfree use or not licensed at all.\n\n  Most GNU software, including some libraries, is covered by the ordinary\nGNU Lesser General Public License, which was designed for utility programs.  This\nlicense, the GNU Library General Public License, applies to certain\ndesignated libraries.  This license is quite different from the ordinary\none; be sure to read it in full, and don't assume that anything in it is\nthe same as in the ordinary license.\n\n  The reason we have a separate public license for some libraries is that\nthey blur the distinction we usually make between modifying or adding to a\nprogram and simply using it.  Linking a program with a library, without\nchanging the library, is in some sense simply using the library, and is\nanalogous to running a utility program or application program.  However, in\na textual and legal sense, the linked executable is a combined work, a\nderivative of the original library, and the ordinary General Public License\ntreats it as such.\n\n  Because of this blurred distinction, using the ordinary General\nPublic License for libraries did not effectively promote software\nsharing, because most developers did not use the libraries.  We\nconcluded that weaker conditions might promote sharing better.\n\n  However, unrestricted linking of non-free programs would deprive the\nusers of those programs of all benefit from the free status of the\nlibraries themselves.  This Library General Public License is intended to\npermit developers of non-free programs to use free libraries, while\npreserving your freedom as a user of such programs to change the free\nlibraries that are incorporated in them.  (We have not seen how to achieve\nthis as regards changes in header files, but we have achieved it as regards\nchanges in the actual functions of the Library.)  The hope is that this\nwill lead to faster development of free libraries.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.  Pay close attention to the difference between a\n\"work based on the library\" and a \"work that uses the library\".  The\nformer contains code derived from the library, while the latter only\nworks together with the library.\n\n  Note that it is possible for a library to be covered by the ordinary\nGeneral Public License rather than by this special one.\n\f\n                  GNU LIBRARY GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License Agreement applies to any software library which\ncontains a notice placed by the copyright holder or other authorized\nparty saying it may be distributed under the terms of this Library\nGeneral Public License (also called \"this License\").  Each licensee is\naddressed as \"you\".\n\n  A \"library\" means a collection of software functions and/or data\nprepared so as to be conveniently linked with application programs\n(which use some of those functions and data) to form executables.\n\n  The \"Library\", below, refers to any such software library or work\nwhich has been distributed under these terms.  A \"work based on the\nLibrary\" means either the Library or any derivative work under\ncopyright law: that is to say, a work containing the Library or a\nportion of it, either verbatim or with modifications and/or translated\nstraightforwardly into another language.  (Hereinafter, translation is\nincluded without limitation in the term \"modification\".)\n\n  \"Source code\" for a work means the preferred form of the work for\nmaking modifications to it.  For a library, complete source code means\nall the source code for all modules it contains, plus any associated\ninterface definition files, plus the scripts used to control compilation\nand installation of the library.\n\n  Activities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning a program using the Library is not restricted, and output from\nsuch a program is covered only if its contents constitute a work based\non the Library (independent of the use of the Library in a tool for\nwriting it).  Whether that is true depends on what the Library does\nand what the program that uses the Library does.\n  \n  1. You may copy and distribute verbatim copies of the Library's\ncomplete source code as you receive it, in any medium, provided that\nyou conspicuously and appropriately publish on each copy an\nappropriate copyright notice and disclaimer of warranty; keep intact\nall the notices that refer to this License and to the absence of any\nwarranty; and distribute a copy of this License along with the\nLibrary.\n\n  You may charge a fee for the physical act of transferring a copy,\nand you may at your option offer warranty protection in exchange for a\nfee.\n\f\n  2. You may modify your copy or copies of the Library or any portion\nof it, thus forming a work based on the Library, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) The modified work must itself be a software library.\n\n    b) You must cause the files modified to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    c) You must cause the whole of the work to be licensed at no\n    charge to all third parties under the terms of this License.\n\n    d) If a facility in the modified Library refers to a function or a\n    table of data to be supplied by an application program that uses\n    the facility, other than as an argument passed when the facility\n    is invoked, then you must make a good faith effort to ensure that,\n    in the event an application does not supply such function or\n    table, the facility still operates, and performs whatever part of\n    its purpose remains meaningful.\n\n    (For example, a function in a library to compute square roots has\n    a purpose that is entirely well-defined independent of the\n    application.  Therefore, Subsection 2d requires that any\n    application-supplied function or table used by this function must\n    be optional: if the application does not supply it, the square\n    root function must still compute square roots.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Library,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Library, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote\nit.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Library.\n\nIn addition, mere aggregation of another work not based on the Library\nwith the Library (or with a work based on the Library) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may opt to apply the terms of the ordinary GNU General Public\nLicense instead of this License to a given copy of the Library.  To do\nthis, you must alter all the notices that refer to this License, so\nthat they refer to the ordinary GNU Lesser General Public License, version 2,\ninstead of to this License.  (If a newer version than version 2 of the\nordinary GNU Lesser General Public License has appeared, then you can specify\nthat version instead if you wish.)  Do not make any other change in\nthese notices.\n\f\n  Once this change is made in a given copy, it is irreversible for\nthat copy, so the ordinary GNU Lesser General Public License applies to all\nsubsequent copies and derivative works made from that copy.\n\n  This option is useful when you wish to copy part of the code of\nthe Library into a program that is not a library.\n\n  4. You may copy and distribute the Library (or a portion or\nderivative of it, under Section 2) in object code or executable form\nunder the terms of Sections 1 and 2 above provided that you accompany\nit with the complete corresponding machine-readable source code, which\nmust be distributed under the terms of Sections 1 and 2 above on a\nmedium customarily used for software interchange.\n\n  If distribution of object code is made by offering access to copy\nfrom a designated place, then offering equivalent access to copy the\nsource code from the same place satisfies the requirement to\ndistribute the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  5. A program that contains no derivative of any portion of the\nLibrary, but is designed to work with the Library by being compiled or\nlinked with it, is called a \"work that uses the Library\".  Such a\nwork, in isolation, is not a derivative work of the Library, and\ntherefore falls outside the scope of this License.\n\n  However, linking a \"work that uses the Library\" with the Library\ncreates an executable that is a derivative of the Library (because it\ncontains portions of the Library), rather than a \"work that uses the\nlibrary\".  The executable is therefore covered by this License.\nSection 6 states terms for distribution of such executables.\n\n  When a \"work that uses the Library\" uses material from a header file\nthat is part of the Library, the object code for the work may be a\nderivative work of the Library even though the source code is not.\nWhether this is true is especially significant if the work can be\nlinked without the Library, or if the work is itself a library.  The\nthreshold for this to be true is not precisely defined by law.\n\n  If such an object file uses only numerical parameters, data\nstructure layouts and accessors, and small macros and small inline\nfunctions (ten lines or less in length), then the use of the object\nfile is unrestricted, regardless of whether it is legally a derivative\nwork.  (Executables containing this object code plus portions of the\nLibrary will still fall under Section 6.)\n\n  Otherwise, if the work is a derivative of the Library, you may\ndistribute the object code for the work under the terms of Section 6.\nAny executables containing that work also fall under Section 6,\nwhether or not they are linked directly with the Library itself.\n\f\n  6. As an exception to the Sections above, you may also compile or\nlink a \"work that uses the Library\" with the Library to produce a\nwork containing portions of the Library, and distribute that work\nunder terms of your choice, provided that the terms permit\nmodification of the work for the customer's own use and reverse\nengineering for debugging such modifications.\n\n  You must give prominent notice with each copy of the work that the\nLibrary is used in it and that the Library and its use are covered by\nthis License.  You must supply a copy of this License.  If the work\nduring execution displays copyright notices, you must include the\ncopyright notice for the Library among them, as well as a reference\ndirecting the user to the copy of this License.  Also, you must do one\nof these things:\n\n    a) Accompany the work with the complete corresponding\n    machine-readable source code for the Library including whatever\n    changes were used in the work (which must be distributed under\n    Sections 1 and 2 above); and, if the work is an executable linked\n    with the Library, with the complete machine-readable \"work that\n    uses the Library\", as object code and/or source code, so that the\n    user can modify the Library and then relink to produce a modified\n    executable containing the modified Library.  (It is understood\n    that the user who changes the contents of definitions files in the\n    Library will not necessarily be able to recompile the application\n    to use the modified definitions.)\n\n    b) Accompany the work with a written offer, valid for at\n    least three years, to give the same user the materials\n    specified in Subsection 6a, above, for a charge no more\n    than the cost of performing this distribution.\n\n    c) If distribution of the work is made by offering access to copy\n    from a designated place, offer equivalent access to copy the above\n    specified materials from the same place.\n\n    d) Verify that the user has already received a copy of these\n    materials or that you have already sent this user a copy.\n\n  For an executable, the required form of the \"work that uses the\nLibrary\" must include any data and utility programs needed for\nreproducing the executable from it.  However, as a special exception,\nthe source code distributed need not include anything that is normally\ndistributed (in either source or binary form) with the major\ncomponents (compiler, kernel, and so on) of the operating system on\nwhich the executable runs, unless that component itself accompanies\nthe executable.\n\n  It may happen that this requirement contradicts the license\nrestrictions of other proprietary libraries that do not normally\naccompany the operating system.  Such a contradiction means you cannot\nuse both them and the Library together in an executable that you\ndistribute.\n\f\n  7. You may place library facilities that are a work based on the\nLibrary side-by-side in a single library together with other library\nfacilities not covered by this License, and distribute such a combined\nlibrary, provided that the separate distribution of the work based on\nthe Library and of the other library facilities is otherwise\npermitted, and provided that you do these two things:\n\n    a) Accompany the combined library with a copy of the same work\n    based on the Library, uncombined with any other library\n    facilities.  This must be distributed under the terms of the\n    Sections above.\n\n    b) Give prominent notice with the combined library of the fact\n    that part of it is a work based on the Library, and explaining\n    where to find the accompanying uncombined form of the same work.\n\n  8. You may not copy, modify, sublicense, link with, or distribute\nthe Library except as expressly provided under this License.  Any\nattempt otherwise to copy, modify, sublicense, link with, or\ndistribute the Library is void, and will automatically terminate your\nrights under this License.  However, parties who have received copies,\nor rights, from you under this License will not have their licenses\nterminated so long as such parties remain in full compliance.\n\n  9. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Library or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Library (or any work based on the\nLibrary), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Library or works based on it.\n\n  10. Each time you redistribute the Library (or any work based on the\nLibrary), the recipient automatically receives a license from the\noriginal licensor to copy, distribute, link with or modify the Library\nsubject to these terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties to\nthis License.\n\f\n  11. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Library at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Library by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Library.\n\nIf any portion of this section is held invalid or unenforceable under any\nparticular circumstance, the balance of the section is intended to apply,\nand the section as a whole is intended to apply in other circumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  12. If the distribution and/or use of the Library is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Library under this License may add\nan explicit geographical distribution limitation excluding those countries,\nso that distribution is permitted only in or among countries not thus\nexcluded.  In such case, this License incorporates the limitation as if\nwritten in the body of this License.\n\n  13. The Free Software Foundation may publish revised and/or new\nversions of the Library General Public License from time to time.\nSuch new versions will be similar in spirit to the present version,\nbut may differ in detail to address new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Library\nspecifies a version number of this License which applies to it and\n\"any later version\", you have the option of following the terms and\nconditions either of that version or of any later version published by\nthe Free Software Foundation.  If the Library does not specify a\nlicense version number, you may choose any version ever published by\nthe Free Software Foundation.\n\f\n  14. If you wish to incorporate parts of the Library into other free\nprograms whose distribution conditions are incompatible with these,\nwrite to the author to ask for permission.  For software which is\ncopyrighted by the Free Software Foundation, write to the Free\nSoftware Foundation; we sometimes make exceptions for this.  Our\ndecision will be guided by the two goals of preserving the free status\nof all derivatives of our free software and of promoting the sharing\nand reuse of software generally.\n\n                            NO WARRANTY\n\n  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\nWARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\nEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\nOTHER PARTIES PROVIDE THE LIBRARY \"AS IS\" WITHOUT WARRANTY OF ANY\nKIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\nLIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\nWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\nAND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\nFOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\nCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\nLIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\nRENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\nFAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\nSUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGES.\n\n                     END OF TERMS AND CONDITIONS\n\f\n           How to Apply These Terms to Your New Libraries\n\n  If you develop a new library, and you want it to be of the greatest\npossible use to the public, we recommend making it free software that\neveryone can redistribute and change.  You can do so by permitting\nredistribution under these terms (or, alternatively, under the terms of the\nordinary General Public License).\n\n  To apply these terms, attach the following notices to the library.  It is\nsafest to attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least the\n\"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the library's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Library General Public\n    License as published by the Free Software Foundation; either\n    version 2 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Library General Public License for more details.\n\n    You should have received a copy of the GNU Library General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\nAlso add information on how to contact you by electronic and paper mail.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the library, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the\n  library `Frob' (a library for tweaking knobs) written by James Random Hacker.\n\n  <signature of Ty Coon>, 1 April 1990\n  Ty Coon, President of Vice\n\nThat's all there is to it!\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/README.md",
    "content": "[![Build Status](https://drone.io/bitbucket.org/devonit/qjsonrpc/status.png)](https://drone.io/bitbucket.org/devonit/qjsonrpc/latest)\n\nOverview\n=======\n\nQJsonRpc is a Qt implementation of the JSON-RPC protocol.\nIt integrates nicely with Qt, leveraging Qt's meta object system in order\nto provide services over the JSON-RPC protocol. QJsonRpc is licensed under\nthe LGPLv2.1.\n\n- [JSON](http://www.json.org/) is a lightweight data interchange format.\n- [JSON-RPC](http://jsonrpc.org/) is lightweight remote procedure call protocol similar to XML-RPC.\n\nHelp / Questions / Suggestions\n============\n[qjsonrpc-development](http://groups.google.com/group/qjsonrpc-development)\n\nRequirements\n============\n\n- Qt 4.7 or greater\n\nFeatures\n========\n\n- Support for JSON-RPC 2.0\n- Easily create services using the Qt meta object system\n- QtScript integration\n\nBuilding\n========\n\n    mkdir build\n    cd build\n    qmake .. && make install\n\nYou can pass the following arguments to qmake:\n\n    PREFIX=<prefix>                 to change the install prefix\n                                    default:\n                                        unix:  /usr\n                                        other: $$[QT_INSTALL_PREFIX]\n    QJSONRPC_LIBRARY_TYPE=staticlib to build a static version of the library\n    -config private-headers         build with qt private headers (to reduce allocations)\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/TODO",
    "content": "- handle default parameters properly\n- reenable bulk message transfer"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/debian/changelog",
    "content": "qjsonrpc (1.0) precise; urgency=low\n\n  * initial packaging of qjsonrpc\n\n -- Devon IT Support <support@devonit.com>  Thu, 17 Jan 2013 15:49:50 -0500\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/debian/compat",
    "content": "5\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/debian/control",
    "content": "Source: qjsonrpc\nSection: libs\nPriority: extra\nMaintainer: Devon IT Developers <development@devonit.com>\nBuild-Depends: libqt4-dev (>= 4.8),\n               cdbs (>= 0.4.41),\n               debhelper (>= 5.0.37.2)\nStandards-Version: 3.7.2\nHomepage: http://symbiosoft.net/projects/qjsonrpc\nVcs-Git: git://gitorious.org/qjsonrpc/qjsonrpc.git\nVcs-Browser: https://gitorious.org/qjsonrpc/\n\nPackage: libqjsonrpc\nSection: libs\nArchitecture: any\nDepends: libqtcore4 (>= 4.8),\n         libqt4-network (>= 4.8),\n         ${shlibs:Depends},\n         ${misc:Depends}\nDescription: The qjsonrpc library is a Qt implementation of the\n JSON-RPC ( http://jsonrpc.org/ ) protocol\n\nPackage: libqjsonrpc-dev\nSection: libdevel\nArchitecture: any\nDepends: libqjsonrpc (= ${binary:Version})\nDescription: Development files for the qjsonrpc library\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/debian/copyright",
    "content": "Format: http://dep.debian.net/deps/dep5\nUpstream-Name: qjsonrpc\nSource: https://gitorious.org/qjsonrpc/\n\nFiles: *\nCopyright: 2012-2013 Etienne Savard <esavard (at) symbiosoft.net>\n           2012-2013 Matt Broadstone <mbroadst (at) gmail.com>\n           2012-2013 Matt Godshall <mgodshall (at) devonit.com>\nLicense: LGPL-3.0+\n\nFiles: debian/*\nCopyright: 2013 Devon IT Support <support@devonit.com>\nLicense: LGPL-3.0+\n\nLicense: LGPL-3.0+\n This package is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 3 of the License, or (at your option) any later version.\n .\n This package is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n Lesser General Public License for more details.\n .\n You should have received a copy of the GNU General Public License\n along with this program. If not, see <http://www.gnu.org/licenses/>.\n .\n On Debian systems, the complete text of the GNU Lesser General\n Public License can be found in \"/usr/share/common-licenses/LGPL-3\".\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/debian/libqjsonrpc-dev.install",
    "content": "debian/tmp/usr/include\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/debian/libqjsonrpc.install",
    "content": "debian/tmp/usr/lib\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/debian/rules",
    "content": "#!/usr/bin/make -f\n\ninclude /usr/share/cdbs/1/rules/debhelper.mk\ninclude /usr/share/cdbs/1/class/qmake.mk\n\nDEB_QMAKE_ARGS = \"PREFIX=/usr\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/debian/source/format",
    "content": "3.0 (native)\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/qjsonrpc.pri",
    "content": "QJSONRPC_VERSION = 1.1.0\n\nQJSONRPC_LIBRARY_TYPE = staticlib\n\nisEmpty(QJSONRPC_LIBRARY_TYPE) {\n    QJSONRPC_LIBRARY_TYPE = shared\n}\n\nprivate-headers {\n    DEFINES += USE_QT_PRIVATE_HEADERS\n    QT += core-private\n}\n\nQT += network\nQJSONRPC_INCLUDEPATH = $${PWD}/src\n\ncontains(QJSONRPC_LIBRARY_TYPE, staticlib) {\n    DEFINES += QJSONRPC_STATIC\n} else {\n    DEFINES += QJSONRPC_SHARED\n}\n\nisEmpty(PREFIX) {\n    unix {\n        PREFIX = /usr\n    } else {\n        PREFIX = $$[QT_INSTALL_PREFIX]\n    }\n}\nisEmpty(LIBDIR) {\n    LIBDIR = lib\n}\n\n LIBS *= -l$$qtLibraryName(qjsonrpc)\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/qjsonrpc.pro",
    "content": "TEMPLATE = subdirs\r\nSUBDIRS += src\r\nCONFIG += ordered\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/http-parser/.gitignore",
    "content": "/out/\ncore\ntags\n*.o\ntest\ntest_g\ntest_fast\nurl_parser\nparsertrace\nparsertrace_g\n*.mk\n*.Makefile\n*.so\n*.a\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/http-parser/.mailmap",
    "content": "# update AUTHORS with:\n#   git log --all --reverse --format='%aN <%aE>' | perl -ne 'BEGIN{print \"# Authors ordered by first contribution.\\n\"} print unless $h{$_}; $h{$_} = 1' > AUTHORS\nRyan Dahl <ry@tinyclouds.org>\nSalman Haq <salman.haq@asti-usa.com>\nSimon Zimmermann <simonz05@gmail.com>\nThomas LE ROUX <thomas@november-eleven.fr> LE ROUX Thomas <thomas@procheo.fr>\nThomas LE ROUX <thomas@november-eleven.fr> Thomas LE ROUX <thomas@procheo.fr>\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/http-parser/.travis.yml",
    "content": "language: c\n\ncompiler:\n  - clang\n  - gcc\n\nscript:\n  - \"make\"\n\nnotifications:\n  email: false\n  irc:\n    - \"irc.freenode.net#libuv\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/http-parser/AUTHORS",
    "content": "# Authors ordered by first contribution.\nRyan Dahl <ry@tinyclouds.org>\nJeremy Hinegardner <jeremy@hinegardner.org>\nSergey Shepelev <temotor@gmail.com>\nJoe Damato <ice799@gmail.com>\ntomika <tomika_nospam@freemail.hu>\nPhoenix Sol <phoenix@burninglabs.com>\nCliff Frey <cliff@meraki.com>\nEwen Cheslack-Postava <ewencp@cs.stanford.edu>\nSantiago Gala <sgala@apache.org>\nTim Becker <tim.becker@syngenio.de>\nJeff Terrace <jterrace@gmail.com>\nBen Noordhuis <info@bnoordhuis.nl>\nNathan Rajlich <nathan@tootallnate.net>\nMark Nottingham <mnot@mnot.net>\nAman Gupta <aman@tmm1.net>\nTim Becker <tim.becker@kuriositaet.de>\nSean Cunningham <sean.cunningham@mandiant.com>\nPeter Griess <pg@std.in>\nSalman Haq <salman.haq@asti-usa.com>\nCliff Frey <clifffrey@gmail.com>\nJon Kolb <jon@b0g.us>\nFouad Mardini <f.mardini@gmail.com>\nPaul Querna <pquerna@apache.org>\nFelix Geisendörfer <felix@debuggable.com>\nkoichik <koichik@improvement.jp>\nAndre Caron <andre.l.caron@gmail.com>\nIvo Raisr <ivosh@ivosh.net>\nJames McLaughlin <jamie@lacewing-project.org>\nDavid Gwynne <loki@animata.net>\nThomas LE ROUX <thomas@november-eleven.fr>\nRandy Rizun <rrizun@ortivawireless.com>\nAndre Louis Caron <andre.louis.caron@usherbrooke.ca>\nSimon Zimmermann <simonz05@gmail.com>\nErik Dubbelboer <erik@dubbelboer.com>\nMartell Malone <martellmalone@gmail.com>\nBertrand Paquet <bpaquet@octo.com>\nBogDan Vatra <bogdan@kde.org>\nPeter Faiman <peter@thepicard.org>\nCorey Richardson <corey@octayn.net>\nTóth Tamás <tomika_nospam@freemail.hu>\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/http-parser/CONTRIBUTIONS",
    "content": "Contributors must agree to the Contributor License Agreement before patches\ncan be accepted.\n\nhttp://spreadsheets2.google.com/viewform?hl=en&formkey=dDJXOGUwbzlYaWM4cHN1MERwQS1CSnc6MQ\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/http-parser/LICENSE-MIT",
    "content": "http_parser.c is based on src/http/ngx_http_parse.c from NGINX copyright\nIgor Sysoev.\n\nAdditional changes are licensed under the same terms as NGINX and\ncopyright Joyent, Inc. and other Node contributors. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE. \n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/http-parser/README.md",
    "content": "HTTP Parser\n===========\n\n[![Build Status](https://travis-ci.org/joyent/http-parser.png?branch=master)](https://travis-ci.org/joyent/http-parser)\n\nThis is a parser for HTTP messages written in C. It parses both requests and\nresponses. The parser is designed to be used in performance HTTP\napplications. It does not make any syscalls nor allocations, it does not\nbuffer data, it can be interrupted at anytime. Depending on your\narchitecture, it only requires about 40 bytes of data per message\nstream (in a web server that is per connection).\n\nFeatures:\n\n  * No dependencies\n  * Handles persistent streams (keep-alive).\n  * Decodes chunked encoding.\n  * Upgrade support\n  * Defends against buffer overflow attacks.\n\nThe parser extracts the following information from HTTP messages:\n\n  * Header fields and values\n  * Content-Length\n  * Request method\n  * Response status code\n  * Transfer-Encoding\n  * HTTP version\n  * Request URL\n  * Message body\n\n\nUsage\n-----\n\nOne `http_parser` object is used per TCP connection. Initialize the struct\nusing `http_parser_init()` and set the callbacks. That might look something\nlike this for a request parser:\n\n    http_parser_settings settings;\n    settings.on_url = my_url_callback;\n    settings.on_header_field = my_header_field_callback;\n    /* ... */\n\n    http_parser *parser = malloc(sizeof(http_parser));\n    http_parser_init(parser, HTTP_REQUEST);\n    parser->data = my_socket;\n\nWhen data is received on the socket execute the parser and check for errors.\n\n    size_t len = 80*1024, nparsed;\n    char buf[len];\n    ssize_t recved;\n\n    recved = recv(fd, buf, len, 0);\n\n    if (recved < 0) {\n      /* Handle error. */\n    }\n\n    /* Start up / continue the parser.\n     * Note we pass recved==0 to signal that EOF has been recieved.\n     */\n    nparsed = http_parser_execute(parser, &settings, buf, recved);\n\n    if (parser->upgrade) {\n      /* handle new protocol */\n    } else if (nparsed != recved) {\n      /* Handle error. Usually just close the connection. */\n    }\n\nHTTP needs to know where the end of the stream is. For example, sometimes\nservers send responses without Content-Length and expect the client to\nconsume input (for the body) until EOF. To tell http_parser about EOF, give\n`0` as the forth parameter to `http_parser_execute()`. Callbacks and errors\ncan still be encountered during an EOF, so one must still be prepared\nto receive them.\n\nScalar valued message information such as `status_code`, `method`, and the\nHTTP version are stored in the parser structure. This data is only\ntemporally stored in `http_parser` and gets reset on each new message. If\nthis information is needed later, copy it out of the structure during the\n`headers_complete` callback.\n\nThe parser decodes the transfer-encoding for both requests and responses\ntransparently. That is, a chunked encoding is decoded before being sent to\nthe on_body callback.\n\n\nThe Special Problem of Upgrade\n------------------------------\n\nHTTP supports upgrading the connection to a different protocol. An\nincreasingly common example of this is the Web Socket protocol which sends\na request like\n\n        GET /demo HTTP/1.1\n        Upgrade: WebSocket\n        Connection: Upgrade\n        Host: example.com\n        Origin: http://example.com\n        WebSocket-Protocol: sample\n\nfollowed by non-HTTP data.\n\n(See http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75 for more\ninformation the Web Socket protocol.)\n\nTo support this, the parser will treat this as a normal HTTP message without a\nbody. Issuing both on_headers_complete and on_message_complete callbacks. However\nhttp_parser_execute() will stop parsing at the end of the headers and return.\n\nThe user is expected to check if `parser->upgrade` has been set to 1 after\n`http_parser_execute()` returns. Non-HTTP data begins at the buffer supplied\noffset by the return value of `http_parser_execute()`.\n\n\nCallbacks\n---------\n\nDuring the `http_parser_execute()` call, the callbacks set in\n`http_parser_settings` will be executed. The parser maintains state and\nnever looks behind, so buffering the data is not necessary. If you need to\nsave certain data for later usage, you can do that from the callbacks.\n\nThere are two types of callbacks:\n\n* notification `typedef int (*http_cb) (http_parser*);`\n    Callbacks: on_message_begin, on_headers_complete, on_message_complete.\n* data `typedef int (*http_data_cb) (http_parser*, const char *at, size_t length);`\n    Callbacks: (requests only) on_uri,\n               (common) on_header_field, on_header_value, on_body;\n\nCallbacks must return 0 on success. Returning a non-zero value indicates\nerror to the parser, making it exit immediately.\n\nIn case you parse HTTP message in chunks (i.e. `read()` request line\nfrom socket, parse, read half headers, parse, etc) your data callbacks\nmay be called more than once. Http-parser guarantees that data pointer is only\nvalid for the lifetime of callback. You can also `read()` into a heap allocated\nbuffer to avoid copying memory around if this fits your application.\n\nReading headers may be a tricky task if you read/parse headers partially.\nBasically, you need to remember whether last header callback was field or value\nand apply following logic:\n\n    (on_header_field and on_header_value shortened to on_h_*)\n     ------------------------ ------------ --------------------------------------------\n    | State (prev. callback) | Callback   | Description/action                         |\n     ------------------------ ------------ --------------------------------------------\n    | nothing (first call)   | on_h_field | Allocate new buffer and copy callback data |\n    |                        |            | into it                                    |\n     ------------------------ ------------ --------------------------------------------\n    | value                  | on_h_field | New header started.                        |\n    |                        |            | Copy current name,value buffers to headers |\n    |                        |            | list and allocate new buffer for new name  |\n     ------------------------ ------------ --------------------------------------------\n    | field                  | on_h_field | Previous name continues. Reallocate name   |\n    |                        |            | buffer and append callback data to it      |\n     ------------------------ ------------ --------------------------------------------\n    | field                  | on_h_value | Value for current header started. Allocate |\n    |                        |            | new buffer and copy callback data to it    |\n     ------------------------ ------------ --------------------------------------------\n    | value                  | on_h_value | Value continues. Reallocate value buffer   |\n    |                        |            | and append callback data to it             |\n     ------------------------ ------------ --------------------------------------------\n\n\nParsing URLs\n------------\n\nA simplistic zero-copy URL parser is provided as `http_parser_parse_url()`.\nUsers of this library may wish to use it to parse URLs constructed from\nconsecutive `on_url` callbacks.\n\nSee examples of reading in headers:\n\n* [partial example](http://gist.github.com/155877) in C\n* [from http-parser tests](http://github.com/joyent/http-parser/blob/37a0ff8/test.c#L403) in C\n* [from Node library](http://github.com/joyent/node/blob/842eaf4/src/http.js#L284) in Javascript\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/http-parser/contrib/parsertrace.c",
    "content": "/* Based on src/http/ngx_http_parse.c from NGINX copyright Igor Sysoev\n *\n * Additional changes are licensed under the same terms as NGINX and\n * copyright Joyent, Inc. and other Node contributors. All rights reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/* Dump what the parser finds to stdout as it happen */\n\n#include \"http_parser.h\"\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\nint on_message_begin(http_parser* _) {\n  (void)_;\n  printf(\"\\n***MESSAGE BEGIN***\\n\\n\");\n  return 0;\n}\n\nint on_headers_complete(http_parser* _) {\n  (void)_;\n  printf(\"\\n***HEADERS COMPLETE***\\n\\n\");\n  return 0;\n}\n\nint on_message_complete(http_parser* _) {\n  (void)_;\n  printf(\"\\n***MESSAGE COMPLETE***\\n\\n\");\n  return 0;\n}\n\nint on_url(http_parser* _, const char* at, size_t length) {\n  (void)_;\n  printf(\"Url: %.*s\\n\", (int)length, at);\n  return 0;\n}\n\nint on_header_field(http_parser* _, const char* at, size_t length) {\n  (void)_;\n  printf(\"Header field: %.*s\\n\", (int)length, at);\n  return 0;\n}\n\nint on_header_value(http_parser* _, const char* at, size_t length) {\n  (void)_;\n  printf(\"Header value: %.*s\\n\", (int)length, at);\n  return 0;\n}\n\nint on_body(http_parser* _, const char* at, size_t length) {\n  (void)_;\n  printf(\"Body: %.*s\\n\", (int)length, at);\n  return 0;\n}\n\nvoid usage(const char* name) {\n  fprintf(stderr,\n          \"Usage: %s $type $filename\\n\"\n          \"  type: -x, where x is one of {r,b,q}\\n\"\n          \"  parses file as a Response, reQuest, or Both\\n\",\n          name);\n  exit(EXIT_FAILURE);\n}\n\nint main(int argc, char* argv[]) {\n  enum http_parser_type file_type;\n\n  if (argc != 3) {\n    usage(argv[0]);\n  }\n\n  char* type = argv[1];\n  if (type[0] != '-') {\n    usage(argv[0]);\n  }\n\n  switch (type[1]) {\n    /* in the case of \"-\", type[1] will be NUL */\n    case 'r':\n      file_type = HTTP_RESPONSE;\n      break;\n    case 'q':\n      file_type = HTTP_REQUEST;\n      break;\n    case 'b':\n      file_type = HTTP_BOTH;\n      break;\n    default:\n      usage(argv[0]);\n  }\n\n  char* filename = argv[2];\n  FILE* file = fopen(filename, \"r\");\n  if (file == NULL) {\n    perror(\"fopen\");\n    return EXIT_FAILURE;\n  }\n\n  fseek(file, 0, SEEK_END);\n  long file_length = ftell(file);\n  if (file_length == -1) {\n    perror(\"ftell\");\n    return EXIT_FAILURE;\n  }\n  fseek(file, 0, SEEK_SET);\n\n  char* data = malloc(file_length);\n  if (fread(data, 1, file_length, file) != (size_t)file_length) {\n    fprintf(stderr, \"couldn't read entire file\\n\");\n    free(data);\n    return EXIT_FAILURE;\n  }\n\n  http_parser_settings settings;\n  memset(&settings, 0, sizeof(settings));\n  settings.on_message_begin = on_message_begin;\n  settings.on_url = on_url;\n  settings.on_header_field = on_header_field;\n  settings.on_header_value = on_header_value;\n  settings.on_headers_complete = on_headers_complete;\n  settings.on_body = on_body;\n  settings.on_message_complete = on_message_complete;\n\n  http_parser parser;\n  http_parser_init(&parser, file_type);\n  size_t nparsed = http_parser_execute(&parser, &settings, data, file_length);\n  free(data);\n\n  if (nparsed != (size_t)file_length) {\n    fprintf(stderr,\n            \"Error: %s (%s)\\n\",\n            http_errno_description(HTTP_PARSER_ERRNO(&parser)),\n            http_errno_name(HTTP_PARSER_ERRNO(&parser)));\n    return EXIT_FAILURE;\n  }\n\n  return EXIT_SUCCESS;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/http-parser/contrib/url_parser.c",
    "content": "#include \"http_parser.h\"\n#include <stdio.h>\n#include <string.h>\n\nvoid\ndump_url (const char *url, const struct http_parser_url *u)\n{\n  unsigned int i;\n\n  printf(\"\\tfield_set: 0x%x, port: %u\\n\", u->field_set, u->port);\n  for (i = 0; i < UF_MAX; i++) {\n    if ((u->field_set & (1 << i)) == 0) {\n      printf(\"\\tfield_data[%u]: unset\\n\", i);\n      continue;\n    }\n\n    printf(\"\\tfield_data[%u]: off: %u len: %u part: \\\"%.*s\\n\",\n           i,\n           u->field_data[i].off,\n           u->field_data[i].len,\n           u->field_data[i].len,\n           url + u->field_data[i].off);\n  }\n}\n\nint main(int argc, char ** argv) {\n  if (argc != 3) {\n    printf(\"Syntax : %s connect|get url\\n\", argv[0]);\n    return 1;\n  }\n  struct http_parser_url u;\n  int len = strlen(argv[2]);\n  int connect = strcmp(\"connect\", argv[1]) == 0 ? 1 : 0;\n  printf(\"Parsing %s, connect %d\\n\", argv[2], connect);\n\n  int result = http_parser_parse_url(argv[2], len, connect, &u);\n  if (result != 0) {\n    printf(\"Parse error : %d\\n\", result);\n    return result;\n  }\n  printf(\"Parse ok, result : \\n\");\n  dump_url(argv[2], &u);\n  return 0;\n}"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/http-parser/http-parser.pri",
    "content": "INCLUDEPATH += $${PWD}\nPRIVATE_HEADERS += $${PWD}/http_parser.h\nSOURCES += $${PWD}/http_parser.c\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/http-parser/http_parser.c",
    "content": "/* Based on src/http/ngx_http_parse.c from NGINX copyright Igor Sysoev\n *\n * Additional changes are licensed under the same terms as NGINX and\n * copyright Joyent, Inc. and other Node contributors. All rights reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n#include \"http_parser.h\"\n#include <assert.h>\n#include <stddef.h>\n#include <ctype.h>\n#include <stdlib.h>\n#include <string.h>\n#include <limits.h>\n\n#ifndef ULLONG_MAX\n# define ULLONG_MAX ((uint64_t) -1) /* 2^64-1 */\n#endif\n\n#ifndef MIN\n# define MIN(a,b) ((a) < (b) ? (a) : (b))\n#endif\n\n#ifndef ARRAY_SIZE\n# define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))\n#endif\n\n#ifndef BIT_AT\n# define BIT_AT(a, i)                                                \\\n  (!!((unsigned int) (a)[(unsigned int) (i) >> 3] &                  \\\n   (1 << ((unsigned int) (i) & 7))))\n#endif\n\n#ifndef ELEM_AT\n# define ELEM_AT(a, i, v) ((unsigned int) (i) < ARRAY_SIZE(a) ? (a)[(i)] : (v))\n#endif\n\n#define SET_ERRNO(e)                                                 \\\ndo {                                                                 \\\n  parser->http_errno = (e);                                          \\\n} while(0)\n\n\n/* Run the notify callback FOR, returning ER if it fails */\n#define CALLBACK_NOTIFY_(FOR, ER)                                    \\\ndo {                                                                 \\\n  assert(HTTP_PARSER_ERRNO(parser) == HPE_OK);                       \\\n                                                                     \\\n  if (settings->on_##FOR) {                                          \\\n    if (0 != settings->on_##FOR(parser)) {                           \\\n      SET_ERRNO(HPE_CB_##FOR);                                       \\\n    }                                                                \\\n                                                                     \\\n    /* We either errored above or got paused; get out */             \\\n    if (HTTP_PARSER_ERRNO(parser) != HPE_OK) {                       \\\n      return (ER);                                                   \\\n    }                                                                \\\n  }                                                                  \\\n} while (0)\n\n/* Run the notify callback FOR and consume the current byte */\n#define CALLBACK_NOTIFY(FOR)            CALLBACK_NOTIFY_(FOR, p - data + 1)\n\n/* Run the notify callback FOR and don't consume the current byte */\n#define CALLBACK_NOTIFY_NOADVANCE(FOR)  CALLBACK_NOTIFY_(FOR, p - data)\n\n/* Run data callback FOR with LEN bytes, returning ER if it fails */\n#define CALLBACK_DATA_(FOR, LEN, ER)                                 \\\ndo {                                                                 \\\n  assert(HTTP_PARSER_ERRNO(parser) == HPE_OK);                       \\\n                                                                     \\\n  if (FOR##_mark) {                                                  \\\n    if (settings->on_##FOR) {                                        \\\n      if (0 != settings->on_##FOR(parser, FOR##_mark, (LEN))) {      \\\n        SET_ERRNO(HPE_CB_##FOR);                                     \\\n      }                                                              \\\n                                                                     \\\n      /* We either errored above or got paused; get out */           \\\n      if (HTTP_PARSER_ERRNO(parser) != HPE_OK) {                     \\\n        return (ER);                                                 \\\n      }                                                              \\\n    }                                                                \\\n    FOR##_mark = NULL;                                               \\\n  }                                                                  \\\n} while (0)\n  \n/* Run the data callback FOR and consume the current byte */\n#define CALLBACK_DATA(FOR)                                           \\\n    CALLBACK_DATA_(FOR, p - FOR##_mark, p - data + 1)\n\n/* Run the data callback FOR and don't consume the current byte */\n#define CALLBACK_DATA_NOADVANCE(FOR)                                 \\\n    CALLBACK_DATA_(FOR, p - FOR##_mark, p - data)\n\n/* Set the mark FOR; non-destructive if mark is already set */\n#define MARK(FOR)                                                    \\\ndo {                                                                 \\\n  if (!FOR##_mark) {                                                 \\\n    FOR##_mark = p;                                                  \\\n  }                                                                  \\\n} while (0)\n\n\n#define PROXY_CONNECTION \"proxy-connection\"\n#define CONNECTION \"connection\"\n#define CONTENT_LENGTH \"content-length\"\n#define TRANSFER_ENCODING \"transfer-encoding\"\n#define UPGRADE \"upgrade\"\n#define CHUNKED \"chunked\"\n#define KEEP_ALIVE \"keep-alive\"\n#define CLOSE \"close\"\n\n\nstatic const char *method_strings[] =\n  {\n#define XX(num, name, string) #string,\n  HTTP_METHOD_MAP(XX)\n#undef XX\n  };\n\n\n/* Tokens as defined by rfc 2616. Also lowercases them.\n *        token       = 1*<any CHAR except CTLs or separators>\n *     separators     = \"(\" | \")\" | \"<\" | \">\" | \"@\"\n *                    | \",\" | \";\" | \":\" | \"\\\" | <\">\n *                    | \"/\" | \"[\" | \"]\" | \"?\" | \"=\"\n *                    | \"{\" | \"}\" | SP | HT\n */\nstatic const char tokens[256] = {\n/*   0 nul    1 soh    2 stx    3 etx    4 eot    5 enq    6 ack    7 bel  */\n        0,       0,       0,       0,       0,       0,       0,       0,\n/*   8 bs     9 ht    10 nl    11 vt    12 np    13 cr    14 so    15 si   */\n        0,       0,       0,       0,       0,       0,       0,       0,\n/*  16 dle   17 dc1   18 dc2   19 dc3   20 dc4   21 nak   22 syn   23 etb */\n        0,       0,       0,       0,       0,       0,       0,       0,\n/*  24 can   25 em    26 sub   27 esc   28 fs    29 gs    30 rs    31 us  */\n        0,       0,       0,       0,       0,       0,       0,       0,\n/*  32 sp    33  !    34  \"    35  #    36  $    37  %    38  &    39  '  */\n        0,      '!',      0,      '#',     '$',     '%',     '&',    '\\'',\n/*  40  (    41  )    42  *    43  +    44  ,    45  -    46  .    47  /  */\n        0,       0,      '*',     '+',      0,      '-',     '.',      0,\n/*  48  0    49  1    50  2    51  3    52  4    53  5    54  6    55  7  */\n       '0',     '1',     '2',     '3',     '4',     '5',     '6',     '7',\n/*  56  8    57  9    58  :    59  ;    60  <    61  =    62  >    63  ?  */\n       '8',     '9',      0,       0,       0,       0,       0,       0,\n/*  64  @    65  A    66  B    67  C    68  D    69  E    70  F    71  G  */\n        0,      'a',     'b',     'c',     'd',     'e',     'f',     'g',\n/*  72  H    73  I    74  J    75  K    76  L    77  M    78  N    79  O  */\n       'h',     'i',     'j',     'k',     'l',     'm',     'n',     'o',\n/*  80  P    81  Q    82  R    83  S    84  T    85  U    86  V    87  W  */\n       'p',     'q',     'r',     's',     't',     'u',     'v',     'w',\n/*  88  X    89  Y    90  Z    91  [    92  \\    93  ]    94  ^    95  _  */\n       'x',     'y',     'z',      0,       0,       0,      '^',     '_',\n/*  96  `    97  a    98  b    99  c   100  d   101  e   102  f   103  g  */\n       '`',     'a',     'b',     'c',     'd',     'e',     'f',     'g',\n/* 104  h   105  i   106  j   107  k   108  l   109  m   110  n   111  o  */\n       'h',     'i',     'j',     'k',     'l',     'm',     'n',     'o',\n/* 112  p   113  q   114  r   115  s   116  t   117  u   118  v   119  w  */\n       'p',     'q',     'r',     's',     't',     'u',     'v',     'w',\n/* 120  x   121  y   122  z   123  {   124  |   125  }   126  ~   127 del */\n       'x',     'y',     'z',      0,      '|',      0,      '~',       0 };\n\n\nstatic const int8_t unhex[256] =\n  {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1\n  ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1\n  ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1\n  , 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1\n  ,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1\n  ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1\n  ,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1\n  ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1\n  };\n\n\n#if HTTP_PARSER_STRICT\n# define T(v) 0\n#else\n# define T(v) v\n#endif\n\n\nstatic const uint8_t normal_url_char[32] = {\n/*   0 nul    1 soh    2 stx    3 etx    4 eot    5 enq    6 ack    7 bel  */\n        0    |   0    |   0    |   0    |   0    |   0    |   0    |   0,\n/*   8 bs     9 ht    10 nl    11 vt    12 np    13 cr    14 so    15 si   */\n        0    | T(2)   |   0    |   0    | T(16)  |   0    |   0    |   0,\n/*  16 dle   17 dc1   18 dc2   19 dc3   20 dc4   21 nak   22 syn   23 etb */\n        0    |   0    |   0    |   0    |   0    |   0    |   0    |   0,\n/*  24 can   25 em    26 sub   27 esc   28 fs    29 gs    30 rs    31 us  */\n        0    |   0    |   0    |   0    |   0    |   0    |   0    |   0,\n/*  32 sp    33  !    34  \"    35  #    36  $    37  %    38  &    39  '  */\n        0    |   2    |   4    |   0    |   16   |   32   |   64   |  128,\n/*  40  (    41  )    42  *    43  +    44  ,    45  -    46  .    47  /  */\n        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,\n/*  48  0    49  1    50  2    51  3    52  4    53  5    54  6    55  7  */\n        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,\n/*  56  8    57  9    58  :    59  ;    60  <    61  =    62  >    63  ?  */\n        1    |   2    |   4    |   8    |   16   |   32   |   64   |   0,\n/*  64  @    65  A    66  B    67  C    68  D    69  E    70  F    71  G  */\n        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,\n/*  72  H    73  I    74  J    75  K    76  L    77  M    78  N    79  O  */\n        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,\n/*  80  P    81  Q    82  R    83  S    84  T    85  U    86  V    87  W  */\n        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,\n/*  88  X    89  Y    90  Z    91  [    92  \\    93  ]    94  ^    95  _  */\n        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,\n/*  96  `    97  a    98  b    99  c   100  d   101  e   102  f   103  g  */\n        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,\n/* 104  h   105  i   106  j   107  k   108  l   109  m   110  n   111  o  */\n        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,\n/* 112  p   113  q   114  r   115  s   116  t   117  u   118  v   119  w  */\n        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,\n/* 120  x   121  y   122  z   123  {   124  |   125  }   126  ~   127 del */\n        1    |   2    |   4    |   8    |   16   |   32   |   64   |   0, };\n\n#undef T\n\nenum state\n  { s_dead = 1 /* important that this is > 0 */\n\n  , s_start_req_or_res\n  , s_res_or_resp_H\n  , s_start_res\n  , s_res_H\n  , s_res_HT\n  , s_res_HTT\n  , s_res_HTTP\n  , s_res_first_http_major\n  , s_res_http_major\n  , s_res_first_http_minor\n  , s_res_http_minor\n  , s_res_first_status_code\n  , s_res_status_code\n  , s_res_status\n  , s_res_line_almost_done\n\n  , s_start_req\n\n  , s_req_method\n  , s_req_spaces_before_url\n  , s_req_schema\n  , s_req_schema_slash\n  , s_req_schema_slash_slash\n  , s_req_server_start\n  , s_req_server\n  , s_req_server_with_at\n  , s_req_path\n  , s_req_query_string_start\n  , s_req_query_string\n  , s_req_fragment_start\n  , s_req_fragment\n  , s_req_http_start\n  , s_req_http_H\n  , s_req_http_HT\n  , s_req_http_HTT\n  , s_req_http_HTTP\n  , s_req_first_http_major\n  , s_req_http_major\n  , s_req_first_http_minor\n  , s_req_http_minor\n  , s_req_line_almost_done\n\n  , s_header_field_start\n  , s_header_field\n  , s_header_value_start\n  , s_header_value\n  , s_header_value_lws\n\n  , s_header_almost_done\n\n  , s_chunk_size_start\n  , s_chunk_size\n  , s_chunk_parameters\n  , s_chunk_size_almost_done\n\n  , s_headers_almost_done\n  , s_headers_done\n\n  /* Important: 's_headers_done' must be the last 'header' state. All\n   * states beyond this must be 'body' states. It is used for overflow\n   * checking. See the PARSING_HEADER() macro.\n   */\n\n  , s_chunk_data\n  , s_chunk_data_almost_done\n  , s_chunk_data_done\n\n  , s_body_identity\n  , s_body_identity_eof\n\n  , s_message_done\n  };\n\n\n#define PARSING_HEADER(state) (state <= s_headers_done)\n\n\nenum header_states\n  { h_general = 0\n  , h_C\n  , h_CO\n  , h_CON\n\n  , h_matching_connection\n  , h_matching_proxy_connection\n  , h_matching_content_length\n  , h_matching_transfer_encoding\n  , h_matching_upgrade\n\n  , h_connection\n  , h_content_length\n  , h_transfer_encoding\n  , h_upgrade\n\n  , h_matching_transfer_encoding_chunked\n  , h_matching_connection_keep_alive\n  , h_matching_connection_close\n\n  , h_transfer_encoding_chunked\n  , h_connection_keep_alive\n  , h_connection_close\n  };\n\nenum http_host_state\n  {\n    s_http_host_dead = 1\n  , s_http_userinfo_start\n  , s_http_userinfo\n  , s_http_host_start\n  , s_http_host_v6_start\n  , s_http_host\n  , s_http_host_v6\n  , s_http_host_v6_end\n  , s_http_host_port_start\n  , s_http_host_port\n};\n\n/* Macros for character classes; depends on strict-mode  */\n#define CR                  '\\r'\n#define LF                  '\\n'\n#define LOWER(c)            (unsigned char)(c | 0x20)\n#define IS_ALPHA(c)         (LOWER(c) >= 'a' && LOWER(c) <= 'z')\n#define IS_NUM(c)           ((c) >= '0' && (c) <= '9')\n#define IS_ALPHANUM(c)      (IS_ALPHA(c) || IS_NUM(c))\n#define IS_HEX(c)           (IS_NUM(c) || (LOWER(c) >= 'a' && LOWER(c) <= 'f'))\n#define IS_MARK(c)          ((c) == '-' || (c) == '_' || (c) == '.' || \\\n  (c) == '!' || (c) == '~' || (c) == '*' || (c) == '\\'' || (c) == '(' || \\\n  (c) == ')')\n#define IS_USERINFO_CHAR(c) (IS_ALPHANUM(c) || IS_MARK(c) || (c) == '%' || \\\n  (c) == ';' || (c) == ':' || (c) == '&' || (c) == '=' || (c) == '+' || \\\n  (c) == '$' || (c) == ',')\n\n#if HTTP_PARSER_STRICT\n#define TOKEN(c)            (tokens[(unsigned char)c])\n#define IS_URL_CHAR(c)      (BIT_AT(normal_url_char, (unsigned char)c))\n#define IS_HOST_CHAR(c)     (IS_ALPHANUM(c) || (c) == '.' || (c) == '-')\n#else\n#define TOKEN(c)            ((c == ' ') ? ' ' : tokens[(unsigned char)c])\n#define IS_URL_CHAR(c)                                                         \\\n  (BIT_AT(normal_url_char, (unsigned char)c) || ((c) & 0x80))\n#define IS_HOST_CHAR(c)                                                        \\\n  (IS_ALPHANUM(c) || (c) == '.' || (c) == '-' || (c) == '_')\n#endif\n\n\n#define start_state (parser->type == HTTP_REQUEST ? s_start_req : s_start_res)\n\n\n#if HTTP_PARSER_STRICT\n# define STRICT_CHECK(cond)                                          \\\ndo {                                                                 \\\n  if (cond) {                                                        \\\n    SET_ERRNO(HPE_STRICT);                                           \\\n    goto error;                                                      \\\n  }                                                                  \\\n} while (0)\n# define NEW_MESSAGE() (http_should_keep_alive(parser) ? start_state : s_dead)\n#else\n# define STRICT_CHECK(cond)\n# define NEW_MESSAGE() start_state\n#endif\n\n\n/* Map errno values to strings for human-readable output */\n#define HTTP_STRERROR_GEN(n, s) { \"HPE_\" #n, s },\nstatic struct {\n  const char *name;\n  const char *description;\n} http_strerror_tab[] = {\n  HTTP_ERRNO_MAP(HTTP_STRERROR_GEN)\n};\n#undef HTTP_STRERROR_GEN\n\nint http_message_needs_eof(const http_parser *parser);\n\n/* Our URL parser.\n *\n * This is designed to be shared by http_parser_execute() for URL validation,\n * hence it has a state transition + byte-for-byte interface. In addition, it\n * is meant to be embedded in http_parser_parse_url(), which does the dirty\n * work of turning state transitions URL components for its API.\n *\n * This function should only be invoked with non-space characters. It is\n * assumed that the caller cares about (and can detect) the transition between\n * URL and non-URL states by looking for these.\n */\nstatic enum state\nparse_url_char(enum state s, const char ch)\n{\n  if (ch == ' ' || ch == '\\r' || ch == '\\n') {\n    return s_dead;\n  }\n\n#if HTTP_PARSER_STRICT\n  if (ch == '\\t' || ch == '\\f') {\n    return s_dead;\n  }\n#endif\n\n  switch (s) {\n    case s_req_spaces_before_url:\n      /* Proxied requests are followed by scheme of an absolute URI (alpha).\n       * All methods except CONNECT are followed by '/' or '*'.\n       */\n\n      if (ch == '/' || ch == '*') {\n        return s_req_path;\n      }\n\n      if (IS_ALPHA(ch)) {\n        return s_req_schema;\n      }\n\n      break;\n\n    case s_req_schema:\n      if (IS_ALPHA(ch)) {\n        return s;\n      }\n\n      if (ch == ':') {\n        return s_req_schema_slash;\n      }\n\n      break;\n\n    case s_req_schema_slash:\n      if (ch == '/') {\n        return s_req_schema_slash_slash;\n      }\n\n      break;\n\n    case s_req_schema_slash_slash:\n      if (ch == '/') {\n        return s_req_server_start;\n      }\n\n      break;\n\n    case s_req_server_with_at:\n      if (ch == '@') {\n        return s_dead;\n      }\n\n    /* FALLTHROUGH */\n    case s_req_server_start:\n    case s_req_server:\n      if (ch == '/') {\n        return s_req_path;\n      }\n\n      if (ch == '?') {\n        return s_req_query_string_start;\n      }\n\n      if (ch == '@') {\n        return s_req_server_with_at;\n      }\n\n      if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {\n        return s_req_server;\n      }\n\n      break;\n\n    case s_req_path:\n      if (IS_URL_CHAR(ch)) {\n        return s;\n      }\n\n      switch (ch) {\n        case '?':\n          return s_req_query_string_start;\n\n        case '#':\n          return s_req_fragment_start;\n      }\n\n      break;\n\n    case s_req_query_string_start:\n    case s_req_query_string:\n      if (IS_URL_CHAR(ch)) {\n        return s_req_query_string;\n      }\n\n      switch (ch) {\n        case '?':\n          /* allow extra '?' in query string */\n          return s_req_query_string;\n\n        case '#':\n          return s_req_fragment_start;\n      }\n\n      break;\n\n    case s_req_fragment_start:\n      if (IS_URL_CHAR(ch)) {\n        return s_req_fragment;\n      }\n\n      switch (ch) {\n        case '?':\n          return s_req_fragment;\n\n        case '#':\n          return s;\n      }\n\n      break;\n\n    case s_req_fragment:\n      if (IS_URL_CHAR(ch)) {\n        return s;\n      }\n\n      switch (ch) {\n        case '?':\n        case '#':\n          return s;\n      }\n\n      break;\n\n    default:\n      break;\n  }\n\n  /* We should never fall out of the switch above unless there's an error */\n  return s_dead;\n}\n\nsize_t http_parser_execute (http_parser *parser,\n                            const http_parser_settings *settings,\n                            const char *data,\n                            size_t len)\n{\n  char c, ch;\n  int8_t unhex_val;\n  const char *p = data;\n  const char *header_field_mark = 0;\n  const char *header_value_mark = 0;\n  const char *url_mark = 0;\n  const char *body_mark = 0;\n\n  /* We're in an error state. Don't bother doing anything. */\n  if (HTTP_PARSER_ERRNO(parser) != HPE_OK) {\n    return 0;\n  }\n\n  if (len == 0) {\n    switch (parser->state) {\n      case s_body_identity_eof:\n        /* Use of CALLBACK_NOTIFY() here would erroneously return 1 byte read if\n         * we got paused.\n         */\n        CALLBACK_NOTIFY_NOADVANCE(message_complete);\n        return 0;\n\n      case s_dead:\n      case s_start_req_or_res:\n      case s_start_res:\n      case s_start_req:\n        return 0;\n\n      default:\n        SET_ERRNO(HPE_INVALID_EOF_STATE);\n        return 1;\n    }\n  }\n\n\n  if (parser->state == s_header_field)\n    header_field_mark = data;\n  if (parser->state == s_header_value)\n    header_value_mark = data;\n  switch (parser->state) {\n  case s_req_path:\n  case s_req_schema:\n  case s_req_schema_slash:\n  case s_req_schema_slash_slash:\n  case s_req_server_start:\n  case s_req_server:\n  case s_req_server_with_at:\n  case s_req_query_string_start:\n  case s_req_query_string:\n  case s_req_fragment_start:\n  case s_req_fragment:\n    url_mark = data;\n    break;\n  }\n\n  for (p=data; p != data + len; p++) {\n    ch = *p;\n\n    if (PARSING_HEADER(parser->state)) {\n      ++parser->nread;\n      /* Buffer overflow attack */\n      if (parser->nread > HTTP_MAX_HEADER_SIZE) {\n        SET_ERRNO(HPE_HEADER_OVERFLOW);\n        goto error;\n      }\n    }\n\n    reexecute_byte:\n    switch (parser->state) {\n\n      case s_dead:\n        /* this state is used after a 'Connection: close' message\n         * the parser will error out if it reads another message\n         */\n        if (ch == CR || ch == LF)\n          break;\n\n        SET_ERRNO(HPE_CLOSED_CONNECTION);\n        goto error;\n\n      case s_start_req_or_res:\n      {\n        if (ch == CR || ch == LF)\n          break;\n        parser->flags = 0;\n        parser->content_length = ULLONG_MAX;\n\n        if (ch == 'H') {\n          parser->state = s_res_or_resp_H;\n\n          CALLBACK_NOTIFY(message_begin);\n        } else {\n          parser->type = HTTP_REQUEST;\n          parser->state = s_start_req;\n          goto reexecute_byte;\n        }\n\n        break;\n      }\n\n      case s_res_or_resp_H:\n        if (ch == 'T') {\n          parser->type = HTTP_RESPONSE;\n          parser->state = s_res_HT;\n        } else {\n          if (ch != 'E') {\n            SET_ERRNO(HPE_INVALID_CONSTANT);\n            goto error;\n          }\n\n          parser->type = HTTP_REQUEST;\n          parser->method = HTTP_HEAD;\n          parser->index = 2;\n          parser->state = s_req_method;\n        }\n        break;\n\n      case s_start_res:\n      {\n        parser->flags = 0;\n        parser->content_length = ULLONG_MAX;\n\n        switch (ch) {\n          case 'H':\n            parser->state = s_res_H;\n            break;\n\n          case CR:\n          case LF:\n            break;\n\n          default:\n            SET_ERRNO(HPE_INVALID_CONSTANT);\n            goto error;\n        }\n\n        CALLBACK_NOTIFY(message_begin);\n        break;\n      }\n\n      case s_res_H:\n        STRICT_CHECK(ch != 'T');\n        parser->state = s_res_HT;\n        break;\n\n      case s_res_HT:\n        STRICT_CHECK(ch != 'T');\n        parser->state = s_res_HTT;\n        break;\n\n      case s_res_HTT:\n        STRICT_CHECK(ch != 'P');\n        parser->state = s_res_HTTP;\n        break;\n\n      case s_res_HTTP:\n        STRICT_CHECK(ch != '/');\n        parser->state = s_res_first_http_major;\n        break;\n\n      case s_res_first_http_major:\n        if (ch < '0' || ch > '9') {\n          SET_ERRNO(HPE_INVALID_VERSION);\n          goto error;\n        }\n\n        parser->http_major = ch - '0';\n        parser->state = s_res_http_major;\n        break;\n\n      /* major HTTP version or dot */\n      case s_res_http_major:\n      {\n        if (ch == '.') {\n          parser->state = s_res_first_http_minor;\n          break;\n        }\n\n        if (!IS_NUM(ch)) {\n          SET_ERRNO(HPE_INVALID_VERSION);\n          goto error;\n        }\n\n        parser->http_major *= 10;\n        parser->http_major += ch - '0';\n\n        if (parser->http_major > 999) {\n          SET_ERRNO(HPE_INVALID_VERSION);\n          goto error;\n        }\n\n        break;\n      }\n\n      /* first digit of minor HTTP version */\n      case s_res_first_http_minor:\n        if (!IS_NUM(ch)) {\n          SET_ERRNO(HPE_INVALID_VERSION);\n          goto error;\n        }\n\n        parser->http_minor = ch - '0';\n        parser->state = s_res_http_minor;\n        break;\n\n      /* minor HTTP version or end of request line */\n      case s_res_http_minor:\n      {\n        if (ch == ' ') {\n          parser->state = s_res_first_status_code;\n          break;\n        }\n\n        if (!IS_NUM(ch)) {\n          SET_ERRNO(HPE_INVALID_VERSION);\n          goto error;\n        }\n\n        parser->http_minor *= 10;\n        parser->http_minor += ch - '0';\n\n        if (parser->http_minor > 999) {\n          SET_ERRNO(HPE_INVALID_VERSION);\n          goto error;\n        }\n\n        break;\n      }\n\n      case s_res_first_status_code:\n      {\n        if (!IS_NUM(ch)) {\n          if (ch == ' ') {\n            break;\n          }\n\n          SET_ERRNO(HPE_INVALID_STATUS);\n          goto error;\n        }\n        parser->status_code = ch - '0';\n        parser->state = s_res_status_code;\n        break;\n      }\n\n      case s_res_status_code:\n      {\n        if (!IS_NUM(ch)) {\n          switch (ch) {\n            case ' ':\n              parser->state = s_res_status;\n              break;\n            case CR:\n              parser->state = s_res_line_almost_done;\n              break;\n            case LF:\n              parser->state = s_header_field_start;\n              break;\n            default:\n              SET_ERRNO(HPE_INVALID_STATUS);\n              goto error;\n          }\n          break;\n        }\n\n        parser->status_code *= 10;\n        parser->status_code += ch - '0';\n\n        if (parser->status_code > 999) {\n          SET_ERRNO(HPE_INVALID_STATUS);\n          goto error;\n        }\n\n        break;\n      }\n\n      case s_res_status:\n        /* the human readable status. e.g. \"NOT FOUND\"\n         * we are not humans so just ignore this */\n        if (ch == CR) {\n          parser->state = s_res_line_almost_done;\n          break;\n        }\n\n        if (ch == LF) {\n          parser->state = s_header_field_start;\n          break;\n        }\n        break;\n\n      case s_res_line_almost_done:\n        STRICT_CHECK(ch != LF);\n        parser->state = s_header_field_start;\n        CALLBACK_NOTIFY(status_complete);\n        break;\n\n      case s_start_req:\n      {\n        if (ch == CR || ch == LF)\n          break;\n        parser->flags = 0;\n        parser->content_length = ULLONG_MAX;\n\n        if (!IS_ALPHA(ch)) {\n          SET_ERRNO(HPE_INVALID_METHOD);\n          goto error;\n        }\n\n        parser->method = (enum http_method) 0;\n        parser->index = 1;\n        switch (ch) {\n          case 'C': parser->method = HTTP_CONNECT; /* or COPY, CHECKOUT */ break;\n          case 'D': parser->method = HTTP_DELETE; break;\n          case 'G': parser->method = HTTP_GET; break;\n          case 'H': parser->method = HTTP_HEAD; break;\n          case 'L': parser->method = HTTP_LOCK; break;\n          case 'M': parser->method = HTTP_MKCOL; /* or MOVE, MKACTIVITY, MERGE, M-SEARCH */ break;\n          case 'N': parser->method = HTTP_NOTIFY; break;\n          case 'O': parser->method = HTTP_OPTIONS; break;\n          case 'P': parser->method = HTTP_POST;\n            /* or PROPFIND|PROPPATCH|PUT|PATCH|PURGE */\n            break;\n          case 'R': parser->method = HTTP_REPORT; break;\n          case 'S': parser->method = HTTP_SUBSCRIBE; /* or SEARCH */ break;\n          case 'T': parser->method = HTTP_TRACE; break;\n          case 'U': parser->method = HTTP_UNLOCK; /* or UNSUBSCRIBE */ break;\n          default:\n            SET_ERRNO(HPE_INVALID_METHOD);\n            goto error;\n        }\n        parser->state = s_req_method;\n\n        CALLBACK_NOTIFY(message_begin);\n\n        break;\n      }\n\n      case s_req_method:\n      {\n        const char *matcher;\n        if (ch == '\\0') {\n          SET_ERRNO(HPE_INVALID_METHOD);\n          goto error;\n        }\n\n        matcher = method_strings[parser->method];\n        if (ch == ' ' && matcher[parser->index] == '\\0') {\n          parser->state = s_req_spaces_before_url;\n        } else if (ch == matcher[parser->index]) {\n          ; /* nada */\n        } else if (parser->method == HTTP_CONNECT) {\n          if (parser->index == 1 && ch == 'H') {\n            parser->method = HTTP_CHECKOUT;\n          } else if (parser->index == 2  && ch == 'P') {\n            parser->method = HTTP_COPY;\n          } else {\n            goto error;\n          }\n        } else if (parser->method == HTTP_MKCOL) {\n          if (parser->index == 1 && ch == 'O') {\n            parser->method = HTTP_MOVE;\n          } else if (parser->index == 1 && ch == 'E') {\n            parser->method = HTTP_MERGE;\n          } else if (parser->index == 1 && ch == '-') {\n            parser->method = HTTP_MSEARCH;\n          } else if (parser->index == 2 && ch == 'A') {\n            parser->method = HTTP_MKACTIVITY;\n          } else {\n            goto error;\n          }\n        } else if (parser->method == HTTP_SUBSCRIBE) {\n          if (parser->index == 1 && ch == 'E') {\n            parser->method = HTTP_SEARCH;\n          } else {\n            goto error;\n          }\n        } else if (parser->index == 1 && parser->method == HTTP_POST) {\n          if (ch == 'R') {\n            parser->method = HTTP_PROPFIND; /* or HTTP_PROPPATCH */\n          } else if (ch == 'U') {\n            parser->method = HTTP_PUT; /* or HTTP_PURGE */\n          } else if (ch == 'A') {\n            parser->method = HTTP_PATCH;\n          } else {\n            goto error;\n          }\n        } else if (parser->index == 2) {\n          if (parser->method == HTTP_PUT) {\n            if (ch == 'R') parser->method = HTTP_PURGE;\n          } else if (parser->method == HTTP_UNLOCK) {\n            if (ch == 'S') parser->method = HTTP_UNSUBSCRIBE;\n          }\n        } else if (parser->index == 4 && parser->method == HTTP_PROPFIND && ch == 'P') {\n          parser->method = HTTP_PROPPATCH;\n        } else {\n          SET_ERRNO(HPE_INVALID_METHOD);\n          goto error;\n        }\n\n        ++parser->index;\n        break;\n      }\n\n      case s_req_spaces_before_url:\n      {\n        if (ch == ' ') break;\n\n        MARK(url);\n        if (parser->method == HTTP_CONNECT) {\n          parser->state = s_req_server_start;\n        }\n\n        parser->state = parse_url_char((enum state)parser->state, ch);\n        if (parser->state == s_dead) {\n          SET_ERRNO(HPE_INVALID_URL);\n          goto error;\n        }\n\n        break;\n      }\n\n      case s_req_schema:\n      case s_req_schema_slash:\n      case s_req_schema_slash_slash:\n      case s_req_server_start:\n      {\n        switch (ch) {\n          /* No whitespace allowed here */\n          case ' ':\n          case CR:\n          case LF:\n            SET_ERRNO(HPE_INVALID_URL);\n            goto error;\n          default:\n            parser->state = parse_url_char((enum state)parser->state, ch);\n            if (parser->state == s_dead) {\n              SET_ERRNO(HPE_INVALID_URL);\n              goto error;\n            }\n        }\n\n        break;\n      }\n\n      case s_req_server:\n      case s_req_server_with_at:\n      case s_req_path:\n      case s_req_query_string_start:\n      case s_req_query_string:\n      case s_req_fragment_start:\n      case s_req_fragment:\n      {\n        switch (ch) {\n          case ' ':\n            parser->state = s_req_http_start;\n            CALLBACK_DATA(url);\n            break;\n          case CR:\n          case LF:\n            parser->http_major = 0;\n            parser->http_minor = 9;\n            parser->state = (ch == CR) ?\n              s_req_line_almost_done :\n              s_header_field_start;\n            CALLBACK_DATA(url);\n            break;\n          default:\n            parser->state = parse_url_char((enum state)parser->state, ch);\n            if (parser->state == s_dead) {\n              SET_ERRNO(HPE_INVALID_URL);\n              goto error;\n            }\n        }\n        break;\n      }\n\n      case s_req_http_start:\n        switch (ch) {\n          case 'H':\n            parser->state = s_req_http_H;\n            break;\n          case ' ':\n            break;\n          default:\n            SET_ERRNO(HPE_INVALID_CONSTANT);\n            goto error;\n        }\n        break;\n\n      case s_req_http_H:\n        STRICT_CHECK(ch != 'T');\n        parser->state = s_req_http_HT;\n        break;\n\n      case s_req_http_HT:\n        STRICT_CHECK(ch != 'T');\n        parser->state = s_req_http_HTT;\n        break;\n\n      case s_req_http_HTT:\n        STRICT_CHECK(ch != 'P');\n        parser->state = s_req_http_HTTP;\n        break;\n\n      case s_req_http_HTTP:\n        STRICT_CHECK(ch != '/');\n        parser->state = s_req_first_http_major;\n        break;\n\n      /* first digit of major HTTP version */\n      case s_req_first_http_major:\n        if (ch < '1' || ch > '9') {\n          SET_ERRNO(HPE_INVALID_VERSION);\n          goto error;\n        }\n\n        parser->http_major = ch - '0';\n        parser->state = s_req_http_major;\n        break;\n\n      /* major HTTP version or dot */\n      case s_req_http_major:\n      {\n        if (ch == '.') {\n          parser->state = s_req_first_http_minor;\n          break;\n        }\n\n        if (!IS_NUM(ch)) {\n          SET_ERRNO(HPE_INVALID_VERSION);\n          goto error;\n        }\n\n        parser->http_major *= 10;\n        parser->http_major += ch - '0';\n\n        if (parser->http_major > 999) {\n          SET_ERRNO(HPE_INVALID_VERSION);\n          goto error;\n        }\n\n        break;\n      }\n\n      /* first digit of minor HTTP version */\n      case s_req_first_http_minor:\n        if (!IS_NUM(ch)) {\n          SET_ERRNO(HPE_INVALID_VERSION);\n          goto error;\n        }\n\n        parser->http_minor = ch - '0';\n        parser->state = s_req_http_minor;\n        break;\n\n      /* minor HTTP version or end of request line */\n      case s_req_http_minor:\n      {\n        if (ch == CR) {\n          parser->state = s_req_line_almost_done;\n          break;\n        }\n\n        if (ch == LF) {\n          parser->state = s_header_field_start;\n          break;\n        }\n\n        /* XXX allow spaces after digit? */\n\n        if (!IS_NUM(ch)) {\n          SET_ERRNO(HPE_INVALID_VERSION);\n          goto error;\n        }\n\n        parser->http_minor *= 10;\n        parser->http_minor += ch - '0';\n\n        if (parser->http_minor > 999) {\n          SET_ERRNO(HPE_INVALID_VERSION);\n          goto error;\n        }\n\n        break;\n      }\n\n      /* end of request line */\n      case s_req_line_almost_done:\n      {\n        if (ch != LF) {\n          SET_ERRNO(HPE_LF_EXPECTED);\n          goto error;\n        }\n\n        parser->state = s_header_field_start;\n        break;\n      }\n\n      case s_header_field_start:\n      {\n        if (ch == CR) {\n          parser->state = s_headers_almost_done;\n          break;\n        }\n\n        if (ch == LF) {\n          /* they might be just sending \\n instead of \\r\\n so this would be\n           * the second \\n to denote the end of headers*/\n          parser->state = s_headers_almost_done;\n          goto reexecute_byte;\n        }\n\n        c = TOKEN(ch);\n\n        if (!c) {\n          SET_ERRNO(HPE_INVALID_HEADER_TOKEN);\n          goto error;\n        }\n\n        MARK(header_field);\n\n        parser->index = 0;\n        parser->state = s_header_field;\n\n        switch (c) {\n          case 'c':\n            parser->header_state = h_C;\n            break;\n\n          case 'p':\n            parser->header_state = h_matching_proxy_connection;\n            break;\n\n          case 't':\n            parser->header_state = h_matching_transfer_encoding;\n            break;\n\n          case 'u':\n            parser->header_state = h_matching_upgrade;\n            break;\n\n          default:\n            parser->header_state = h_general;\n            break;\n        }\n        break;\n      }\n\n      case s_header_field:\n      {\n        c = TOKEN(ch);\n\n        if (c) {\n          switch (parser->header_state) {\n            case h_general:\n              break;\n\n            case h_C:\n              parser->index++;\n              parser->header_state = (c == 'o' ? h_CO : h_general);\n              break;\n\n            case h_CO:\n              parser->index++;\n              parser->header_state = (c == 'n' ? h_CON : h_general);\n              break;\n\n            case h_CON:\n              parser->index++;\n              switch (c) {\n                case 'n':\n                  parser->header_state = h_matching_connection;\n                  break;\n                case 't':\n                  parser->header_state = h_matching_content_length;\n                  break;\n                default:\n                  parser->header_state = h_general;\n                  break;\n              }\n              break;\n\n            /* connection */\n\n            case h_matching_connection:\n              parser->index++;\n              if (parser->index > sizeof(CONNECTION)-1\n                  || c != CONNECTION[parser->index]) {\n                parser->header_state = h_general;\n              } else if (parser->index == sizeof(CONNECTION)-2) {\n                parser->header_state = h_connection;\n              }\n              break;\n\n            /* proxy-connection */\n\n            case h_matching_proxy_connection:\n              parser->index++;\n              if (parser->index > sizeof(PROXY_CONNECTION)-1\n                  || c != PROXY_CONNECTION[parser->index]) {\n                parser->header_state = h_general;\n              } else if (parser->index == sizeof(PROXY_CONNECTION)-2) {\n                parser->header_state = h_connection;\n              }\n              break;\n\n            /* content-length */\n\n            case h_matching_content_length:\n              parser->index++;\n              if (parser->index > sizeof(CONTENT_LENGTH)-1\n                  || c != CONTENT_LENGTH[parser->index]) {\n                parser->header_state = h_general;\n              } else if (parser->index == sizeof(CONTENT_LENGTH)-2) {\n                parser->header_state = h_content_length;\n              }\n              break;\n\n            /* transfer-encoding */\n\n            case h_matching_transfer_encoding:\n              parser->index++;\n              if (parser->index > sizeof(TRANSFER_ENCODING)-1\n                  || c != TRANSFER_ENCODING[parser->index]) {\n                parser->header_state = h_general;\n              } else if (parser->index == sizeof(TRANSFER_ENCODING)-2) {\n                parser->header_state = h_transfer_encoding;\n                /* Multiple `Transfer-Encoding` headers should be treated as\n                 * one, but with values separate by a comma.\n                 *\n                 * See: https://tools.ietf.org/html/rfc7230#section-3.2.2\n                 */\n                parser->flags &= ~F_CHUNKED;\n              }\n              break;\n\n            /* upgrade */\n\n            case h_matching_upgrade:\n              parser->index++;\n              if (parser->index > sizeof(UPGRADE)-1\n                  || c != UPGRADE[parser->index]) {\n                parser->header_state = h_general;\n              } else if (parser->index == sizeof(UPGRADE)-2) {\n                parser->header_state = h_upgrade;\n              }\n              break;\n\n            case h_connection:\n            case h_content_length:\n            case h_transfer_encoding:\n            case h_upgrade:\n              if (ch != ' ') parser->header_state = h_general;\n              break;\n\n            default:\n              assert(0 && \"Unknown header_state\");\n              break;\n          }\n          break;\n        }\n\n        if (ch == ':') {\n          parser->state = s_header_value_start;\n          CALLBACK_DATA(header_field);\n          break;\n        }\n\n        if (ch == CR) {\n          parser->state = s_header_almost_done;\n          CALLBACK_DATA(header_field);\n          break;\n        }\n\n        if (ch == LF) {\n          parser->state = s_header_field_start;\n          CALLBACK_DATA(header_field);\n          break;\n        }\n\n        SET_ERRNO(HPE_INVALID_HEADER_TOKEN);\n        goto error;\n      }\n\n      case s_header_value_start:\n      {\n        if (ch == ' ' || ch == '\\t') break;\n\n        MARK(header_value);\n\n        parser->state = s_header_value;\n        parser->index = 0;\n\n        if (ch == CR) {\n          parser->header_state = h_general;\n          parser->state = s_header_almost_done;\n          CALLBACK_DATA(header_value);\n          break;\n        }\n\n        if (ch == LF) {\n          parser->state = s_header_field_start;\n          CALLBACK_DATA(header_value);\n          break;\n        }\n\n        c = LOWER(ch);\n\n        switch (parser->header_state) {\n          case h_upgrade:\n            parser->flags |= F_UPGRADE;\n            parser->header_state = h_general;\n            break;\n\n          case h_transfer_encoding:\n            /* looking for 'Transfer-Encoding: chunked' */\n            if ('c' == c) {\n              parser->header_state = h_matching_transfer_encoding_chunked;\n            } else {\n              parser->header_state = h_general;\n            }\n            break;\n\n          case h_content_length:\n            if (!IS_NUM(ch)) {\n              SET_ERRNO(HPE_INVALID_CONTENT_LENGTH);\n              goto error;\n            }\n\n            parser->content_length = ch - '0';\n            break;\n\n          case h_connection:\n            /* looking for 'Connection: keep-alive' */\n            if (c == 'k') {\n              parser->header_state = h_matching_connection_keep_alive;\n            /* looking for 'Connection: close' */\n            } else if (c == 'c') {\n              parser->header_state = h_matching_connection_close;\n            } else {\n              parser->header_state = h_general;\n            }\n            break;\n\n          default:\n            parser->header_state = h_general;\n            break;\n        }\n        break;\n      }\n\n      case s_header_value:\n      {\n\n        if (ch == CR) {\n          parser->state = s_header_almost_done;\n          CALLBACK_DATA(header_value);\n          break;\n        }\n\n        if (ch == LF) {\n          parser->state = s_header_almost_done;\n          CALLBACK_DATA_NOADVANCE(header_value);\n          goto reexecute_byte;\n        }\n\n        c = LOWER(ch);\n\n        switch (parser->header_state) {\n          case h_general:\n            break;\n\n          case h_connection:\n          case h_transfer_encoding:\n            assert(0 && \"Shouldn't get here.\");\n            break;\n\n          case h_content_length:\n          {\n            uint64_t t;\n\n            if (ch == ' ') break;\n\n            if (!IS_NUM(ch)) {\n              SET_ERRNO(HPE_INVALID_CONTENT_LENGTH);\n              goto error;\n            }\n\n            t = parser->content_length;\n            t *= 10;\n            t += ch - '0';\n\n            /* Overflow? */\n            if (t < parser->content_length || t == ULLONG_MAX) {\n              SET_ERRNO(HPE_INVALID_CONTENT_LENGTH);\n              goto error;\n            }\n\n            parser->content_length = t;\n            break;\n          }\n\n          /* Transfer-Encoding: chunked */\n          case h_matching_transfer_encoding_chunked:\n            parser->index++;\n            if (parser->index > sizeof(CHUNKED)-1\n                || c != CHUNKED[parser->index]) {\n              parser->header_state = h_general;\n            } else if (parser->index == sizeof(CHUNKED)-2) {\n              parser->header_state = h_transfer_encoding_chunked;\n            }\n            break;\n\n          /* looking for 'Connection: keep-alive' */\n          case h_matching_connection_keep_alive:\n            parser->index++;\n            if (parser->index > sizeof(KEEP_ALIVE)-1\n                || c != KEEP_ALIVE[parser->index]) {\n              parser->header_state = h_general;\n            } else if (parser->index == sizeof(KEEP_ALIVE)-2) {\n              parser->header_state = h_connection_keep_alive;\n            }\n            break;\n\n          /* looking for 'Connection: close' */\n          case h_matching_connection_close:\n            parser->index++;\n            if (parser->index > sizeof(CLOSE)-1 || c != CLOSE[parser->index]) {\n              parser->header_state = h_general;\n            } else if (parser->index == sizeof(CLOSE)-2) {\n              parser->header_state = h_connection_close;\n            }\n            break;\n\n          case h_transfer_encoding_chunked:\n          case h_connection_keep_alive:\n          case h_connection_close:\n            if (ch != ' ') parser->header_state = h_general;\n            break;\n\n          default:\n            parser->state = s_header_value;\n            parser->header_state = h_general;\n            break;\n        }\n        break;\n      }\n\n      case s_header_almost_done:\n      {\n        STRICT_CHECK(ch != LF);\n\n        parser->state = s_header_value_lws;\n\n        switch (parser->header_state) {\n          case h_connection_keep_alive:\n            parser->flags |= F_CONNECTION_KEEP_ALIVE;\n            break;\n          case h_connection_close:\n            parser->flags |= F_CONNECTION_CLOSE;\n            break;\n          case h_transfer_encoding_chunked:\n            parser->flags |= F_CHUNKED;\n            break;\n          default:\n            break;\n        }\n\n        break;\n      }\n\n      case s_header_value_lws:\n      {\n        if (ch == ' ' || ch == '\\t')\n          parser->state = s_header_value_start;\n        else\n        {\n          parser->state = s_header_field_start;\n          goto reexecute_byte;\n        }\n        break;\n      }\n\n      case s_headers_almost_done:\n      {\n        STRICT_CHECK(ch != LF);\n\n        if (parser->flags & F_TRAILING) {\n          /* End of a chunked request */\n          parser->state = NEW_MESSAGE();\n          CALLBACK_NOTIFY(message_complete);\n          break;\n        }\n\n        parser->state = s_headers_done;\n\n        /* Set this here so that on_headers_complete() callbacks can see it */\n        parser->upgrade =\n          (parser->flags & F_UPGRADE || parser->method == HTTP_CONNECT);\n\n        /* Here we call the headers_complete callback. This is somewhat\n         * different than other callbacks because if the user returns 1, we\n         * will interpret that as saying that this message has no body. This\n         * is needed for the annoying case of recieving a response to a HEAD\n         * request.\n         *\n         * We'd like to use CALLBACK_NOTIFY_NOADVANCE() here but we cannot, so\n         * we have to simulate it by handling a change in errno below.\n         */\n        if (settings->on_headers_complete) {\n          switch (settings->on_headers_complete(parser)) {\n            case 0:\n              break;\n\n            case 1:\n              parser->flags |= F_SKIPBODY;\n              break;\n\n            default:\n              SET_ERRNO(HPE_CB_headers_complete);\n              return p - data; /* Error */\n          }\n        }\n\n        if (HTTP_PARSER_ERRNO(parser) != HPE_OK) {\n          return p - data;\n        }\n\n        goto reexecute_byte;\n      }\n\n      case s_headers_done:\n      {\n        STRICT_CHECK(ch != LF);\n\n        parser->nread = 0;\n\n        /* Exit, the rest of the connect is in a different protocol. */\n        if (parser->upgrade) {\n          parser->state = NEW_MESSAGE();\n          CALLBACK_NOTIFY(message_complete);\n          return (p - data) + 1;\n        }\n\n        if (parser->flags & F_SKIPBODY) {\n          parser->state = NEW_MESSAGE();\n          CALLBACK_NOTIFY(message_complete);\n        } else if (parser->flags & F_CHUNKED) {\n          /* chunked encoding - ignore Content-Length header */\n          parser->state = s_chunk_size_start;\n        } else {\n          if (parser->content_length == 0) {\n            /* Content-Length header given but zero: Content-Length: 0\\r\\n */\n            parser->state = NEW_MESSAGE();\n            CALLBACK_NOTIFY(message_complete);\n          } else if (parser->content_length != ULLONG_MAX) {\n            /* Content-Length header given and non-zero */\n            parser->state = s_body_identity;\n          } else {\n            if (parser->type == HTTP_REQUEST ||\n                !http_message_needs_eof(parser)) {\n              /* Assume content-length 0 - read the next */\n              parser->state = NEW_MESSAGE();\n              CALLBACK_NOTIFY(message_complete);\n            } else {\n              /* Read body until EOF */\n              parser->state = s_body_identity_eof;\n            }\n          }\n        }\n\n        break;\n      }\n\n      case s_body_identity:\n      {\n        uint64_t to_read = MIN(parser->content_length,\n                               (uint64_t) ((data + len) - p));\n\n        assert(parser->content_length != 0\n            && parser->content_length != ULLONG_MAX);\n\n        /* The difference between advancing content_length and p is because\n         * the latter will automaticaly advance on the next loop iteration.\n         * Further, if content_length ends up at 0, we want to see the last\n         * byte again for our message complete callback.\n         */\n        MARK(body);\n        parser->content_length -= to_read;\n        p += to_read - 1;\n\n        if (parser->content_length == 0) {\n          parser->state = s_message_done;\n\n          /* Mimic CALLBACK_DATA_NOADVANCE() but with one extra byte.\n           *\n           * The alternative to doing this is to wait for the next byte to\n           * trigger the data callback, just as in every other case. The\n           * problem with this is that this makes it difficult for the test\n           * harness to distinguish between complete-on-EOF and\n           * complete-on-length. It's not clear that this distinction is\n           * important for applications, but let's keep it for now.\n           */\n          CALLBACK_DATA_(body, p - body_mark + 1, p - data);\n          goto reexecute_byte;\n        }\n\n        break;\n      }\n\n      /* read until EOF */\n      case s_body_identity_eof:\n        MARK(body);\n        p = data + len - 1;\n\n        break;\n\n      case s_message_done:\n        parser->state = NEW_MESSAGE();\n        CALLBACK_NOTIFY(message_complete);\n        break;\n\n      case s_chunk_size_start:\n      {\n        assert(parser->nread == 1);\n        assert(parser->flags & F_CHUNKED);\n\n        unhex_val = unhex[(unsigned char)ch];\n        if (unhex_val == -1) {\n          SET_ERRNO(HPE_INVALID_CHUNK_SIZE);\n          goto error;\n        }\n\n        parser->content_length = unhex_val;\n        parser->state = s_chunk_size;\n        break;\n      }\n\n      case s_chunk_size:\n      {\n        uint64_t t;\n\n        assert(parser->flags & F_CHUNKED);\n\n        if (ch == CR) {\n          parser->state = s_chunk_size_almost_done;\n          break;\n        }\n\n        unhex_val = unhex[(unsigned char)ch];\n\n        if (unhex_val == -1) {\n          if (ch == ';' || ch == ' ') {\n            parser->state = s_chunk_parameters;\n            break;\n          }\n\n          SET_ERRNO(HPE_INVALID_CHUNK_SIZE);\n          goto error;\n        }\n\n        t = parser->content_length;\n        t *= 16;\n        t += unhex_val;\n\n        /* Overflow? */\n        if (t < parser->content_length || t == ULLONG_MAX) {\n          SET_ERRNO(HPE_INVALID_CONTENT_LENGTH);\n          goto error;\n        }\n\n        parser->content_length = t;\n        break;\n      }\n\n      case s_chunk_parameters:\n      {\n        assert(parser->flags & F_CHUNKED);\n        /* just ignore this shit. TODO check for overflow */\n        if (ch == CR) {\n          parser->state = s_chunk_size_almost_done;\n          break;\n        }\n        break;\n      }\n\n      case s_chunk_size_almost_done:\n      {\n        assert(parser->flags & F_CHUNKED);\n        STRICT_CHECK(ch != LF);\n\n        parser->nread = 0;\n\n        if (parser->content_length == 0) {\n          parser->flags |= F_TRAILING;\n          parser->state = s_header_field_start;\n        } else {\n          parser->state = s_chunk_data;\n        }\n        break;\n      }\n\n      case s_chunk_data:\n      {\n        uint64_t to_read = MIN(parser->content_length,\n                               (uint64_t) ((data + len) - p));\n\n        assert(parser->flags & F_CHUNKED);\n        assert(parser->content_length != 0\n            && parser->content_length != ULLONG_MAX);\n\n        /* See the explanation in s_body_identity for why the content\n         * length and data pointers are managed this way.\n         */\n        MARK(body);\n        parser->content_length -= to_read;\n        p += to_read - 1;\n\n        if (parser->content_length == 0) {\n          parser->state = s_chunk_data_almost_done;\n        }\n\n        break;\n      }\n\n      case s_chunk_data_almost_done:\n        assert(parser->flags & F_CHUNKED);\n        assert(parser->content_length == 0);\n        STRICT_CHECK(ch != CR);\n        parser->state = s_chunk_data_done;\n        CALLBACK_DATA(body);\n        break;\n\n      case s_chunk_data_done:\n        assert(parser->flags & F_CHUNKED);\n        STRICT_CHECK(ch != LF);\n        parser->nread = 0;\n        parser->state = s_chunk_size_start;\n        break;\n\n      default:\n        assert(0 && \"unhandled state\");\n        SET_ERRNO(HPE_INVALID_INTERNAL_STATE);\n        goto error;\n    }\n  }\n\n  /* Run callbacks for any marks that we have leftover after we ran our of\n   * bytes. There should be at most one of these set, so it's OK to invoke\n   * them in series (unset marks will not result in callbacks).\n   *\n   * We use the NOADVANCE() variety of callbacks here because 'p' has already\n   * overflowed 'data' and this allows us to correct for the off-by-one that\n   * we'd otherwise have (since CALLBACK_DATA() is meant to be run with a 'p'\n   * value that's in-bounds).\n   */\n\n  assert(((header_field_mark ? 1 : 0) +\n          (header_value_mark ? 1 : 0) +\n          (url_mark ? 1 : 0)  +\n          (body_mark ? 1 : 0)) <= 1);\n\n  CALLBACK_DATA_NOADVANCE(header_field);\n  CALLBACK_DATA_NOADVANCE(header_value);\n  CALLBACK_DATA_NOADVANCE(url);\n  CALLBACK_DATA_NOADVANCE(body);\n\n  return len;\n\nerror:\n  if (HTTP_PARSER_ERRNO(parser) == HPE_OK) {\n    SET_ERRNO(HPE_UNKNOWN);\n  }\n\n  return (p - data);\n}\n\n\n/* Does the parser need to see an EOF to find the end of the message? */\nint\nhttp_message_needs_eof (const http_parser *parser)\n{\n  if (parser->type == HTTP_REQUEST) {\n    return 0;\n  }\n\n  /* See RFC 2616 section 4.4 */\n  if (parser->status_code / 100 == 1 || /* 1xx e.g. Continue */\n      parser->status_code == 204 ||     /* No Content */\n      parser->status_code == 304 ||     /* Not Modified */\n      parser->flags & F_SKIPBODY) {     /* response to a HEAD request */\n    return 0;\n  }\n\n  if ((parser->flags & F_CHUNKED) || parser->content_length != ULLONG_MAX) {\n    return 0;\n  }\n\n  return 1;\n}\n\n\nint\nhttp_should_keep_alive (const http_parser *parser)\n{\n  if (parser->http_major > 0 && parser->http_minor > 0) {\n    /* HTTP/1.1 */\n    if (parser->flags & F_CONNECTION_CLOSE) {\n      return 0;\n    }\n  } else {\n    /* HTTP/1.0 or earlier */\n    if (!(parser->flags & F_CONNECTION_KEEP_ALIVE)) {\n      return 0;\n    }\n  }\n\n  return !http_message_needs_eof(parser);\n}\n\n\nconst char *\nhttp_method_str (enum http_method m)\n{\n  return ELEM_AT(method_strings, m, \"<unknown>\");\n}\n\n\nvoid\nhttp_parser_init (http_parser *parser, enum http_parser_type t)\n{\n  void *data = parser->data; /* preserve application data */\n  memset(parser, 0, sizeof(*parser));\n  parser->data = data;\n  parser->type = t;\n  parser->state = (t == HTTP_REQUEST ? s_start_req : (t == HTTP_RESPONSE ? s_start_res : s_start_req_or_res));\n  parser->http_errno = HPE_OK;\n}\n\nconst char *\nhttp_errno_name(enum http_errno err) {\n  assert(err < (sizeof(http_strerror_tab)/sizeof(http_strerror_tab[0])));\n  return http_strerror_tab[err].name;\n}\n\nconst char *\nhttp_errno_description(enum http_errno err) {\n  assert(err < (sizeof(http_strerror_tab)/sizeof(http_strerror_tab[0])));\n  return http_strerror_tab[err].description;\n}\n\nstatic enum http_host_state\nhttp_parse_host_char(enum http_host_state s, const char ch) {\n  switch(s) {\n    case s_http_userinfo:\n    case s_http_userinfo_start:\n      if (ch == '@') {\n        return s_http_host_start;\n      }\n\n      if (IS_USERINFO_CHAR(ch)) {\n        return s_http_userinfo;\n      }\n      break;\n\n    case s_http_host_start:\n      if (ch == '[') {\n        return s_http_host_v6_start;\n      }\n\n      if (IS_HOST_CHAR(ch)) {\n        return s_http_host;\n      }\n\n      break;\n\n    case s_http_host:\n      if (IS_HOST_CHAR(ch)) {\n        return s_http_host;\n      }\n\n    /* FALLTHROUGH */\n    case s_http_host_v6_end:\n      if (ch == ':') {\n        return s_http_host_port_start;\n      }\n\n      break;\n\n    case s_http_host_v6:\n      if (ch == ']') {\n        return s_http_host_v6_end;\n      }\n\n    /* FALLTHROUGH */\n    case s_http_host_v6_start:\n      if (IS_HEX(ch) || ch == ':' || ch == '.') {\n        return s_http_host_v6;\n      }\n\n      break;\n\n    case s_http_host_port:\n    case s_http_host_port_start:\n      if (IS_NUM(ch)) {\n        return s_http_host_port;\n      }\n\n      break;\n\n    default:\n      break;\n  }\n  return s_http_host_dead;\n}\n\nstatic int\nhttp_parse_host(const char * buf, struct http_parser_url *u, int found_at) {\n  enum http_host_state s;\n\n  const char *p;\n  size_t buflen = u->field_data[UF_HOST].off + u->field_data[UF_HOST].len;\n\n  u->field_data[UF_HOST].len = 0;\n\n  s = found_at ? s_http_userinfo_start : s_http_host_start;\n\n  for (p = buf + u->field_data[UF_HOST].off; p < buf + buflen; p++) {\n    enum http_host_state new_s = http_parse_host_char(s, *p);\n\n    if (new_s == s_http_host_dead) {\n      return 1;\n    }\n\n    switch(new_s) {\n      case s_http_host:\n        if (s != s_http_host) {\n          u->field_data[UF_HOST].off = p - buf;\n        }\n        u->field_data[UF_HOST].len++;\n        break;\n\n      case s_http_host_v6:\n        if (s != s_http_host_v6) {\n          u->field_data[UF_HOST].off = p - buf;\n        }\n        u->field_data[UF_HOST].len++;\n        break;\n\n      case s_http_host_port:\n        if (s != s_http_host_port) {\n          u->field_data[UF_PORT].off = p - buf;\n          u->field_data[UF_PORT].len = 0;\n          u->field_set |= (1 << UF_PORT);\n        }\n        u->field_data[UF_PORT].len++;\n        break;\n\n      case s_http_userinfo:\n        if (s != s_http_userinfo) {\n          u->field_data[UF_USERINFO].off = p - buf ;\n          u->field_data[UF_USERINFO].len = 0;\n          u->field_set |= (1 << UF_USERINFO);\n        }\n        u->field_data[UF_USERINFO].len++;\n        break;\n\n      default:\n        break;\n    }\n    s = new_s;\n  }\n\n  /* Make sure we don't end somewhere unexpected */\n  switch (s) {\n    case s_http_host_start:\n    case s_http_host_v6_start:\n    case s_http_host_v6:\n    case s_http_host_port_start:\n    case s_http_userinfo:\n    case s_http_userinfo_start:\n      return 1;\n    default:\n      break;\n  }\n\n  return 0;\n}\n\nint\nhttp_parser_parse_url(const char *buf, size_t buflen, int is_connect,\n                      struct http_parser_url *u)\n{\n  enum state s;\n  const char *p;\n  enum http_parser_url_fields uf, old_uf;\n  int found_at = 0;\n\n  u->port = u->field_set = 0;\n  s = is_connect ? s_req_server_start : s_req_spaces_before_url;\n  uf = old_uf = UF_MAX;\n\n  for (p = buf; p < buf + buflen; p++) {\n    s = parse_url_char(s, *p);\n\n    /* Figure out the next field that we're operating on */\n    switch (s) {\n      case s_dead:\n        return 1;\n\n      /* Skip delimeters */\n      case s_req_schema_slash:\n      case s_req_schema_slash_slash:\n      case s_req_server_start:\n      case s_req_query_string_start:\n      case s_req_fragment_start:\n        continue;\n\n      case s_req_schema:\n        uf = UF_SCHEMA;\n        break;\n\n      case s_req_server_with_at:\n        found_at = 1;\n\n      /* FALLTROUGH */\n      case s_req_server:\n        uf = UF_HOST;\n        break;\n\n      case s_req_path:\n        uf = UF_PATH;\n        break;\n\n      case s_req_query_string:\n        uf = UF_QUERY;\n        break;\n\n      case s_req_fragment:\n        uf = UF_FRAGMENT;\n        break;\n\n      default:\n        assert(!\"Unexpected state\");\n        return 1;\n    }\n\n    /* Nothing's changed; soldier on */\n    if (uf == old_uf) {\n      u->field_data[uf].len++;\n      continue;\n    }\n\n    u->field_data[uf].off = p - buf;\n    u->field_data[uf].len = 1;\n\n    u->field_set |= (1 << uf);\n    old_uf = uf;\n  }\n\n  /* host must be present if there is a schema */\n  /* parsing http:///toto will fail */\n  if ((u->field_set & ((1 << UF_SCHEMA) | (1 << UF_HOST))) != 0) {\n    if (http_parse_host(buf, u, found_at) != 0) {\n      return 1;\n    }\n  }\n\n  /* CONNECT requests can only contain \"hostname:port\" */\n  if (is_connect && u->field_set != ((1 << UF_HOST)|(1 << UF_PORT))) {\n    return 1;\n  }\n\n  if (u->field_set & (1 << UF_PORT)) {\n    /* Don't bother with endp; we've already validated the string */\n    unsigned long v = strtoul(buf + u->field_data[UF_PORT].off, NULL, 10);\n\n    /* Ports have a max value of 2^16 */\n    if (v > 0xffff) {\n      return 1;\n    }\n\n    u->port = (uint16_t) v;\n  }\n\n  return 0;\n}\n\nvoid\nhttp_parser_pause(http_parser *parser, int paused) {\n  /* Users should only be pausing/unpausing a parser that is not in an error\n   * state. In non-debug builds, there's not much that we can do about this\n   * other than ignore it.\n   */\n  if (HTTP_PARSER_ERRNO(parser) == HPE_OK ||\n      HTTP_PARSER_ERRNO(parser) == HPE_PAUSED) {\n    SET_ERRNO((paused) ? HPE_PAUSED : HPE_OK);\n  } else {\n    assert(0 && \"Attempting to pause parser in error state\");\n  }\n}\n\nint\nhttp_body_is_final(const struct http_parser *parser) {\n    return parser->state == s_message_done;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/http-parser/http_parser.gyp",
    "content": "# This file is used with the GYP meta build system.\n# http://code.google.com/p/gyp/\n# To build try this:\n#   svn co http://gyp.googlecode.com/svn/trunk gyp\n#   ./gyp/gyp -f make --depth=`pwd` http_parser.gyp \n#   ./out/Debug/test \n{\n  'target_defaults': {\n    'default_configuration': 'Debug',\n    'configurations': {\n      # TODO: hoist these out and put them somewhere common, because\n      #       RuntimeLibrary MUST MATCH across the entire project\n      'Debug': {\n        'defines': [ 'DEBUG', '_DEBUG' ],\n        'cflags': [ '-Wall', '-Wextra', '-O0', '-g', '-ftrapv' ],\n        'msvs_settings': {\n          'VCCLCompilerTool': {\n            'RuntimeLibrary': 1, # static debug\n          },\n        },\n      },\n      'Release': {\n        'defines': [ 'NDEBUG' ],\n        'cflags': [ '-Wall', '-Wextra', '-O3' ],\n        'msvs_settings': {\n          'VCCLCompilerTool': {\n            'RuntimeLibrary': 0, # static release\n          },\n        },\n      }\n    },\n    'msvs_settings': {\n      'VCCLCompilerTool': {\n      },\n      'VCLibrarianTool': {\n      },\n      'VCLinkerTool': {\n        'GenerateDebugInformation': 'true',\n      },\n    },\n    'conditions': [\n      ['OS == \"win\"', {\n        'defines': [\n          'WIN32'\n        ],\n      }]\n    ],\n  },\n\n  'targets': [\n    {\n      'target_name': 'http_parser',\n      'type': 'static_library',\n      'include_dirs': [ '.' ],\n      'direct_dependent_settings': {\n        'defines': [ 'HTTP_PARSER_STRICT=0' ],\n        'include_dirs': [ '.' ],\n      },\n      'defines': [ 'HTTP_PARSER_STRICT=0' ],\n      'sources': [ './http_parser.c', ],\n      'conditions': [\n        ['OS==\"win\"', {\n          'msvs_settings': {\n            'VCCLCompilerTool': {\n              # Compile as C++. http_parser.c is actually C99, but C++ is\n              # close enough in this case.\n              'CompileAs': 2,\n            },\n          },\n        }]\n      ],\n    },\n\n    {\n      'target_name': 'http_parser_strict',\n      'type': 'static_library',\n      'include_dirs': [ '.' ],\n      'direct_dependent_settings': {\n        'defines': [ 'HTTP_PARSER_STRICT=1' ],\n        'include_dirs': [ '.' ],\n      },\n      'defines': [ 'HTTP_PARSER_STRICT=1' ],\n      'sources': [ './http_parser.c', ],\n      'conditions': [\n        ['OS==\"win\"', {\n          'msvs_settings': {\n            'VCCLCompilerTool': {\n              # Compile as C++. http_parser.c is actually C99, but C++ is\n              # close enough in this case.\n              'CompileAs': 2,\n            },\n          },\n        }]\n      ],\n    },\n\n    {\n      'target_name': 'test-nonstrict',\n      'type': 'executable',\n      'dependencies': [ 'http_parser' ],\n      'sources': [ 'test.c' ]\n    },\n\n    {\n      'target_name': 'test-strict',\n      'type': 'executable',\n      'dependencies': [ 'http_parser_strict' ],\n      'sources': [ 'test.c' ]\n    }\n  ]\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/http-parser/http_parser.h",
    "content": "/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n#ifndef http_parser_h\n#define http_parser_h\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#define HTTP_PARSER_VERSION_MAJOR 2\n#define HTTP_PARSER_VERSION_MINOR 0\n\n#include <sys/types.h>\n#if defined(_WIN32) && !defined(__MINGW32__) && (!defined(_MSC_VER) || _MSC_VER<1600)\n#include <BaseTsd.h>\n#include <stddef.h>\ntypedef __int8 int8_t;\ntypedef unsigned __int8 uint8_t;\ntypedef __int16 int16_t;\ntypedef unsigned __int16 uint16_t;\ntypedef __int32 int32_t;\ntypedef unsigned __int32 uint32_t;\ntypedef __int64 int64_t;\ntypedef unsigned __int64 uint64_t;\n#else\n#include <stdint.h>\n#endif\n\n/* Compile with -DHTTP_PARSER_STRICT=0 to make less checks, but run\n * faster\n */\n#ifndef HTTP_PARSER_STRICT\n# define HTTP_PARSER_STRICT 1\n#endif\n\n/* Maximium header size allowed */\n#define HTTP_MAX_HEADER_SIZE (80*1024)\n\n\ntypedef struct http_parser http_parser;\ntypedef struct http_parser_settings http_parser_settings;\n\n\n/* Callbacks should return non-zero to indicate an error. The parser will\n * then halt execution.\n *\n * The one exception is on_headers_complete. In a HTTP_RESPONSE parser\n * returning '1' from on_headers_complete will tell the parser that it\n * should not expect a body. This is used when receiving a response to a\n * HEAD request which may contain 'Content-Length' or 'Transfer-Encoding:\n * chunked' headers that indicate the presence of a body.\n *\n * http_data_cb does not return data chunks. It will be call arbitrarally\n * many times for each string. E.G. you might get 10 callbacks for \"on_url\"\n * each providing just a few characters more data.\n */\ntypedef int (*http_data_cb) (http_parser*, const char *at, size_t length);\ntypedef int (*http_cb) (http_parser*);\n\n\n/* Request Methods */\n#define HTTP_METHOD_MAP(XX)         \\\n  XX(0,  DELETE,      DELETE)       \\\n  XX(1,  GET,         GET)          \\\n  XX(2,  HEAD,        HEAD)         \\\n  XX(3,  POST,        POST)         \\\n  XX(4,  PUT,         PUT)          \\\n  /* pathological */                \\\n  XX(5,  CONNECT,     CONNECT)      \\\n  XX(6,  OPTIONS,     OPTIONS)      \\\n  XX(7,  TRACE,       TRACE)        \\\n  /* webdav */                      \\\n  XX(8,  COPY,        COPY)         \\\n  XX(9,  LOCK,        LOCK)         \\\n  XX(10, MKCOL,       MKCOL)        \\\n  XX(11, MOVE,        MOVE)         \\\n  XX(12, PROPFIND,    PROPFIND)     \\\n  XX(13, PROPPATCH,   PROPPATCH)    \\\n  XX(14, SEARCH,      SEARCH)       \\\n  XX(15, UNLOCK,      UNLOCK)       \\\n  /* subversion */                  \\\n  XX(16, REPORT,      REPORT)       \\\n  XX(17, MKACTIVITY,  MKACTIVITY)   \\\n  XX(18, CHECKOUT,    CHECKOUT)     \\\n  XX(19, MERGE,       MERGE)        \\\n  /* upnp */                        \\\n  XX(20, MSEARCH,     M-SEARCH)     \\\n  XX(21, NOTIFY,      NOTIFY)       \\\n  XX(22, SUBSCRIBE,   SUBSCRIBE)    \\\n  XX(23, UNSUBSCRIBE, UNSUBSCRIBE)  \\\n  /* RFC-5789 */                    \\\n  XX(24, PATCH,       PATCH)        \\\n  XX(25, PURGE,       PURGE)        \\\n\nenum http_method\n  {\n#define XX(num, name, string) HTTP_##name = num,\n  HTTP_METHOD_MAP(XX)\n#undef XX\n  };\n\n\nenum http_parser_type { HTTP_REQUEST, HTTP_RESPONSE, HTTP_BOTH };\n\n\n/* Flag values for http_parser.flags field */\nenum flags\n  { F_CHUNKED               = 1 << 0\n  , F_CONNECTION_KEEP_ALIVE = 1 << 1\n  , F_CONNECTION_CLOSE      = 1 << 2\n  , F_TRAILING              = 1 << 3\n  , F_UPGRADE               = 1 << 4\n  , F_SKIPBODY              = 1 << 5\n  };\n\n\n/* Map for errno-related constants\n * \n * The provided argument should be a macro that takes 2 arguments.\n */\n#define HTTP_ERRNO_MAP(XX)                                           \\\n  /* No error */                                                     \\\n  XX(OK, \"success\")                                                  \\\n                                                                     \\\n  /* Callback-related errors */                                      \\\n  XX(CB_message_begin, \"the on_message_begin callback failed\")       \\\n  XX(CB_status_complete, \"the on_status_complete callback failed\")   \\\n  XX(CB_url, \"the on_url callback failed\")                           \\\n  XX(CB_header_field, \"the on_header_field callback failed\")         \\\n  XX(CB_header_value, \"the on_header_value callback failed\")         \\\n  XX(CB_headers_complete, \"the on_headers_complete callback failed\") \\\n  XX(CB_body, \"the on_body callback failed\")                         \\\n  XX(CB_message_complete, \"the on_message_complete callback failed\") \\\n                                                                     \\\n  /* Parsing-related errors */                                       \\\n  XX(INVALID_EOF_STATE, \"stream ended at an unexpected time\")        \\\n  XX(HEADER_OVERFLOW,                                                \\\n     \"too many header bytes seen; overflow detected\")                \\\n  XX(CLOSED_CONNECTION,                                              \\\n     \"data received after completed connection: close message\")      \\\n  XX(INVALID_VERSION, \"invalid HTTP version\")                        \\\n  XX(INVALID_STATUS, \"invalid HTTP status code\")                     \\\n  XX(INVALID_METHOD, \"invalid HTTP method\")                          \\\n  XX(INVALID_URL, \"invalid URL\")                                     \\\n  XX(INVALID_HOST, \"invalid host\")                                   \\\n  XX(INVALID_PORT, \"invalid port\")                                   \\\n  XX(INVALID_PATH, \"invalid path\")                                   \\\n  XX(INVALID_QUERY_STRING, \"invalid query string\")                   \\\n  XX(INVALID_FRAGMENT, \"invalid fragment\")                           \\\n  XX(LF_EXPECTED, \"LF character expected\")                           \\\n  XX(INVALID_HEADER_TOKEN, \"invalid character in header\")            \\\n  XX(INVALID_CONTENT_LENGTH,                                         \\\n     \"invalid character in content-length header\")                   \\\n  XX(INVALID_CHUNK_SIZE,                                             \\\n     \"invalid character in chunk size header\")                       \\\n  XX(INVALID_CONSTANT, \"invalid constant string\")                    \\\n  XX(INVALID_INTERNAL_STATE, \"encountered unexpected internal state\")\\\n  XX(STRICT, \"strict mode assertion failed\")                         \\\n  XX(PAUSED, \"parser is paused\")                                     \\\n  XX(UNKNOWN, \"an unknown error occurred\")\n\n\n/* Define HPE_* values for each errno value above */\n#define HTTP_ERRNO_GEN(n, s) HPE_##n,\nenum http_errno {\n  HTTP_ERRNO_MAP(HTTP_ERRNO_GEN)\n};\n#undef HTTP_ERRNO_GEN\n\n\n/* Get an http_errno value from an http_parser */\n#define HTTP_PARSER_ERRNO(p)            ((enum http_errno) (p)->http_errno)\n\n\nstruct http_parser {\n  /** PRIVATE **/\n  unsigned char type : 2;     /* enum http_parser_type */\n  unsigned char flags : 6;    /* F_* values from 'flags' enum; semi-public */\n  unsigned char state;        /* enum state from http_parser.c */\n  unsigned char header_state; /* enum header_state from http_parser.c */\n  unsigned char index;        /* index into current matcher */\n\n  uint32_t nread;          /* # bytes read in various scenarios */\n  uint64_t content_length; /* # bytes in body (0 if no Content-Length header) */\n\n  /** READ-ONLY **/\n  unsigned short http_major;\n  unsigned short http_minor;\n  unsigned short status_code; /* responses only */\n  unsigned char method;       /* requests only */\n  unsigned char http_errno : 7;\n\n  /* 1 = Upgrade header was present and the parser has exited because of that.\n   * 0 = No upgrade header present.\n   * Should be checked when http_parser_execute() returns in addition to\n   * error checking.\n   */\n  unsigned char upgrade : 1;\n\n  /** PUBLIC **/\n  void *data; /* A pointer to get hook to the \"connection\" or \"socket\" object */\n};\n\n\nstruct http_parser_settings {\n  http_cb      on_message_begin;\n  http_data_cb on_url;\n  http_cb      on_status_complete;\n  http_data_cb on_header_field;\n  http_data_cb on_header_value;\n  http_cb      on_headers_complete;\n  http_data_cb on_body;\n  http_cb      on_message_complete;\n};\n\n\nenum http_parser_url_fields\n  { UF_SCHEMA           = 0\n  , UF_HOST             = 1\n  , UF_PORT             = 2\n  , UF_PATH             = 3\n  , UF_QUERY            = 4\n  , UF_FRAGMENT         = 5\n  , UF_USERINFO         = 6\n  , UF_MAX              = 7\n  };\n\n\n/* Result structure for http_parser_parse_url().\n *\n * Callers should index into field_data[] with UF_* values iff field_set\n * has the relevant (1 << UF_*) bit set. As a courtesy to clients (and\n * because we probably have padding left over), we convert any port to\n * a uint16_t.\n */\nstruct http_parser_url {\n  uint16_t field_set;           /* Bitmask of (1 << UF_*) values */\n  uint16_t port;                /* Converted UF_PORT string */\n\n  struct {\n    uint16_t off;               /* Offset into buffer in which field starts */\n    uint16_t len;               /* Length of run in buffer */\n  } field_data[UF_MAX];\n};\n\n\nvoid http_parser_init(http_parser *parser, enum http_parser_type type);\n\n\nsize_t http_parser_execute(http_parser *parser,\n                           const http_parser_settings *settings,\n                           const char *data,\n                           size_t len);\n\n\n/* If http_should_keep_alive() in the on_headers_complete or\n * on_message_complete callback returns 0, then this should be\n * the last message on the connection.\n * If you are the server, respond with the \"Connection: close\" header.\n * If you are the client, close the connection.\n */\nint http_should_keep_alive(const http_parser *parser);\n\n/* Returns a string version of the HTTP method. */\nconst char *http_method_str(enum http_method m);\n\n/* Return a string name of the given error */\nconst char *http_errno_name(enum http_errno err);\n\n/* Return a string description of the given error */\nconst char *http_errno_description(enum http_errno err);\n\n/* Parse a URL; return nonzero on failure */\nint http_parser_parse_url(const char *buf, size_t buflen,\n                          int is_connect,\n                          struct http_parser_url *u);\n\n/* Pause or un-pause the parser; a nonzero value pauses */\nvoid http_parser_pause(http_parser *parser, int paused);\n\n/* Checks if this is the final chunk of the body. */\nint http_body_is_final(const http_parser *parser);\n\n#ifdef __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/http-parser/test.c",
    "content": "/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n#include \"http_parser.h\"\n#include <stdlib.h>\n#include <assert.h>\n#include <stdio.h>\n#include <stdlib.h> /* rand */\n#include <string.h>\n#include <stdarg.h>\n\n#undef TRUE\n#define TRUE 1\n#undef FALSE\n#define FALSE 0\n\n#define MAX_HEADERS 13\n#define MAX_ELEMENT_SIZE 2048\n\n#define MIN(a,b) ((a) < (b) ? (a) : (b))\n\nstatic http_parser *parser;\n\nstruct message {\n  const char *name; // for debugging purposes\n  const char *raw;\n  enum http_parser_type type;\n  enum http_method method;\n  int status_code;\n  char request_path[MAX_ELEMENT_SIZE];\n  char request_url[MAX_ELEMENT_SIZE];\n  char fragment[MAX_ELEMENT_SIZE];\n  char query_string[MAX_ELEMENT_SIZE];\n  char body[MAX_ELEMENT_SIZE];\n  size_t body_size;\n  const char *host;\n  const char *userinfo;\n  uint16_t port;\n  int num_headers;\n  enum { NONE=0, FIELD, VALUE } last_header_element;\n  char headers [MAX_HEADERS][2][MAX_ELEMENT_SIZE];\n  int should_keep_alive;\n\n  const char *upgrade; // upgraded body\n\n  unsigned short http_major;\n  unsigned short http_minor;\n\n  int message_begin_cb_called;\n  int headers_complete_cb_called;\n  int message_complete_cb_called;\n  int message_complete_on_eof;\n  int body_is_final;\n};\n\nstatic int currently_parsing_eof;\n\nstatic struct message messages[5];\nstatic int num_messages;\nstatic http_parser_settings *current_pause_parser;\n\n/* * R E Q U E S T S * */\nconst struct message requests[] =\n#define CURL_GET 0\n{ {.name= \"curl get\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET /test HTTP/1.1\\r\\n\"\n         \"User-Agent: curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1\\r\\n\"\n         \"Host: 0.0.0.0=5000\\r\\n\"\n         \"Accept: */*\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_GET\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/test\"\n  ,.request_url= \"/test\"\n  ,.num_headers= 3\n  ,.headers=\n    { { \"User-Agent\", \"curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1\" }\n    , { \"Host\", \"0.0.0.0=5000\" }\n    , { \"Accept\", \"*/*\" }\n    }\n  ,.body= \"\"\n  }\n\n#define FIREFOX_GET 1\n, {.name= \"firefox get\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET /favicon.ico HTTP/1.1\\r\\n\"\n         \"Host: 0.0.0.0=5000\\r\\n\"\n         \"User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0\\r\\n\"\n         \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\\r\\n\"\n         \"Accept-Language: en-us,en;q=0.5\\r\\n\"\n         \"Accept-Encoding: gzip,deflate\\r\\n\"\n         \"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\\r\\n\"\n         \"Keep-Alive: 300\\r\\n\"\n         \"Connection: keep-alive\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_GET\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/favicon.ico\"\n  ,.request_url= \"/favicon.ico\"\n  ,.num_headers= 8\n  ,.headers=\n    { { \"Host\", \"0.0.0.0=5000\" }\n    , { \"User-Agent\", \"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0\" }\n    , { \"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\" }\n    , { \"Accept-Language\", \"en-us,en;q=0.5\" }\n    , { \"Accept-Encoding\", \"gzip,deflate\" }\n    , { \"Accept-Charset\", \"ISO-8859-1,utf-8;q=0.7,*;q=0.7\" }\n    , { \"Keep-Alive\", \"300\" }\n    , { \"Connection\", \"keep-alive\" }\n    }\n  ,.body= \"\"\n  }\n\n#define DUMBFUCK 2\n, {.name= \"dumbfuck\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET /dumbfuck HTTP/1.1\\r\\n\"\n         \"aaaaaaaaaaaaa:++++++++++\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_GET\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/dumbfuck\"\n  ,.request_url= \"/dumbfuck\"\n  ,.num_headers= 1\n  ,.headers=\n    { { \"aaaaaaaaaaaaa\",  \"++++++++++\" }\n    }\n  ,.body= \"\"\n  }\n\n#define FRAGMENT_IN_URI 3\n, {.name= \"fragment in url\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET /forums/1/topics/2375?page=1#posts-17408 HTTP/1.1\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_GET\n  ,.query_string= \"page=1\"\n  ,.fragment= \"posts-17408\"\n  ,.request_path= \"/forums/1/topics/2375\"\n  /* XXX request url does include fragment? */\n  ,.request_url= \"/forums/1/topics/2375?page=1#posts-17408\"\n  ,.num_headers= 0\n  ,.body= \"\"\n  }\n\n#define GET_NO_HEADERS_NO_BODY 4\n, {.name= \"get no headers no body\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET /get_no_headers_no_body/world HTTP/1.1\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE /* would need Connection: close */\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_GET\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/get_no_headers_no_body/world\"\n  ,.request_url= \"/get_no_headers_no_body/world\"\n  ,.num_headers= 0\n  ,.body= \"\"\n  }\n\n#define GET_ONE_HEADER_NO_BODY 5\n, {.name= \"get one header no body\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET /get_one_header_no_body HTTP/1.1\\r\\n\"\n         \"Accept: */*\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE /* would need Connection: close */\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_GET\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/get_one_header_no_body\"\n  ,.request_url= \"/get_one_header_no_body\"\n  ,.num_headers= 1\n  ,.headers=\n    { { \"Accept\" , \"*/*\" }\n    }\n  ,.body= \"\"\n  }\n\n#define GET_FUNKY_CONTENT_LENGTH 6\n, {.name= \"get funky content length body hello\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET /get_funky_content_length_body_hello HTTP/1.0\\r\\n\"\n         \"conTENT-Length: 5\\r\\n\"\n         \"\\r\\n\"\n         \"HELLO\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 0\n  ,.method= HTTP_GET\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/get_funky_content_length_body_hello\"\n  ,.request_url= \"/get_funky_content_length_body_hello\"\n  ,.num_headers= 1\n  ,.headers=\n    { { \"conTENT-Length\" , \"5\" }\n    }\n  ,.body= \"HELLO\"\n  }\n\n#define POST_IDENTITY_BODY_WORLD 7\n, {.name= \"post identity body world\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"POST /post_identity_body_world?q=search#hey HTTP/1.1\\r\\n\"\n         \"Accept: */*\\r\\n\"\n         \"Transfer-Encoding: identity\\r\\n\"\n         \"Content-Length: 5\\r\\n\"\n         \"\\r\\n\"\n         \"World\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_POST\n  ,.query_string= \"q=search\"\n  ,.fragment= \"hey\"\n  ,.request_path= \"/post_identity_body_world\"\n  ,.request_url= \"/post_identity_body_world?q=search#hey\"\n  ,.num_headers= 3\n  ,.headers=\n    { { \"Accept\", \"*/*\" }\n    , { \"Transfer-Encoding\", \"identity\" }\n    , { \"Content-Length\", \"5\" }\n    }\n  ,.body= \"World\"\n  }\n\n#define POST_CHUNKED_ALL_YOUR_BASE 8\n, {.name= \"post - chunked body: all your base are belong to us\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"POST /post_chunked_all_your_base HTTP/1.1\\r\\n\"\n         \"Transfer-Encoding: chunked\\r\\n\"\n         \"\\r\\n\"\n         \"1e\\r\\nall your base are belong to us\\r\\n\"\n         \"0\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_POST\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/post_chunked_all_your_base\"\n  ,.request_url= \"/post_chunked_all_your_base\"\n  ,.num_headers= 1\n  ,.headers=\n    { { \"Transfer-Encoding\" , \"chunked\" }\n    }\n  ,.body= \"all your base are belong to us\"\n  }\n\n#define TWO_CHUNKS_MULT_ZERO_END 9\n, {.name= \"two chunks ; triple zero ending\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"POST /two_chunks_mult_zero_end HTTP/1.1\\r\\n\"\n         \"Transfer-Encoding: chunked\\r\\n\"\n         \"\\r\\n\"\n         \"5\\r\\nhello\\r\\n\"\n         \"6\\r\\n world\\r\\n\"\n         \"000\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_POST\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/two_chunks_mult_zero_end\"\n  ,.request_url= \"/two_chunks_mult_zero_end\"\n  ,.num_headers= 1\n  ,.headers=\n    { { \"Transfer-Encoding\", \"chunked\" }\n    }\n  ,.body= \"hello world\"\n  }\n\n#define CHUNKED_W_TRAILING_HEADERS 10\n, {.name= \"chunked with trailing headers. blech.\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"POST /chunked_w_trailing_headers HTTP/1.1\\r\\n\"\n         \"Transfer-Encoding: chunked\\r\\n\"\n         \"\\r\\n\"\n         \"5\\r\\nhello\\r\\n\"\n         \"6\\r\\n world\\r\\n\"\n         \"0\\r\\n\"\n         \"Vary: *\\r\\n\"\n         \"Content-Type: text/plain\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_POST\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/chunked_w_trailing_headers\"\n  ,.request_url= \"/chunked_w_trailing_headers\"\n  ,.num_headers= 3\n  ,.headers=\n    { { \"Transfer-Encoding\",  \"chunked\" }\n    , { \"Vary\", \"*\" }\n    , { \"Content-Type\", \"text/plain\" }\n    }\n  ,.body= \"hello world\"\n  }\n\n#define CHUNKED_W_BULLSHIT_AFTER_LENGTH 11\n, {.name= \"with bullshit after the length\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"POST /chunked_w_bullshit_after_length HTTP/1.1\\r\\n\"\n         \"Transfer-Encoding: chunked\\r\\n\"\n         \"\\r\\n\"\n         \"5; ihatew3;whatthefuck=aretheseparametersfor\\r\\nhello\\r\\n\"\n         \"6; blahblah; blah\\r\\n world\\r\\n\"\n         \"0\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_POST\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/chunked_w_bullshit_after_length\"\n  ,.request_url= \"/chunked_w_bullshit_after_length\"\n  ,.num_headers= 1\n  ,.headers=\n    { { \"Transfer-Encoding\", \"chunked\" }\n    }\n  ,.body= \"hello world\"\n  }\n\n#define WITH_QUOTES 12\n, {.name= \"with quotes\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET /with_\\\"stupid\\\"_quotes?foo=\\\"bar\\\" HTTP/1.1\\r\\n\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_GET\n  ,.query_string= \"foo=\\\"bar\\\"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/with_\\\"stupid\\\"_quotes\"\n  ,.request_url= \"/with_\\\"stupid\\\"_quotes?foo=\\\"bar\\\"\"\n  ,.num_headers= 0\n  ,.headers= { }\n  ,.body= \"\"\n  }\n\n#define APACHEBENCH_GET 13\n/* The server receiving this request SHOULD NOT wait for EOF\n * to know that content-length == 0.\n * How to represent this in a unit test? message_complete_on_eof\n * Compare with NO_CONTENT_LENGTH_RESPONSE.\n */\n, {.name = \"apachebench get\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET /test HTTP/1.0\\r\\n\"\n         \"Host: 0.0.0.0:5000\\r\\n\"\n         \"User-Agent: ApacheBench/2.3\\r\\n\"\n         \"Accept: */*\\r\\n\\r\\n\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 0\n  ,.method= HTTP_GET\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/test\"\n  ,.request_url= \"/test\"\n  ,.num_headers= 3\n  ,.headers= { { \"Host\", \"0.0.0.0:5000\" }\n             , { \"User-Agent\", \"ApacheBench/2.3\" }\n             , { \"Accept\", \"*/*\" }\n             }\n  ,.body= \"\"\n  }\n\n#define QUERY_URL_WITH_QUESTION_MARK_GET 14\n/* Some clients include '?' characters in query strings.\n */\n, {.name = \"query url with question mark\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET /test.cgi?foo=bar?baz HTTP/1.1\\r\\n\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_GET\n  ,.query_string= \"foo=bar?baz\"\n  ,.fragment= \"\"\n  ,.request_path= \"/test.cgi\"\n  ,.request_url= \"/test.cgi?foo=bar?baz\"\n  ,.num_headers= 0\n  ,.headers= {}\n  ,.body= \"\"\n  }\n\n#define PREFIX_NEWLINE_GET 15\n/* Some clients, especially after a POST in a keep-alive connection,\n * will send an extra CRLF before the next request\n */\n, {.name = \"newline prefix get\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"\\r\\nGET /test HTTP/1.1\\r\\n\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_GET\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/test\"\n  ,.request_url= \"/test\"\n  ,.num_headers= 0\n  ,.headers= { }\n  ,.body= \"\"\n  }\n\n#define UPGRADE_REQUEST 16\n, {.name = \"upgrade request\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET /demo HTTP/1.1\\r\\n\"\n         \"Host: example.com\\r\\n\"\n         \"Connection: Upgrade\\r\\n\"\n         \"Sec-WebSocket-Key2: 12998 5 Y3 1  .P00\\r\\n\"\n         \"Sec-WebSocket-Protocol: sample\\r\\n\"\n         \"Upgrade: WebSocket\\r\\n\"\n         \"Sec-WebSocket-Key1: 4 @1  46546xW%0l 1 5\\r\\n\"\n         \"Origin: http://example.com\\r\\n\"\n         \"\\r\\n\"\n         \"Hot diggity dogg\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_GET\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/demo\"\n  ,.request_url= \"/demo\"\n  ,.num_headers= 7\n  ,.upgrade=\"Hot diggity dogg\"\n  ,.headers= { { \"Host\", \"example.com\" }\n             , { \"Connection\", \"Upgrade\" }\n             , { \"Sec-WebSocket-Key2\", \"12998 5 Y3 1  .P00\" }\n             , { \"Sec-WebSocket-Protocol\", \"sample\" }\n             , { \"Upgrade\", \"WebSocket\" }\n             , { \"Sec-WebSocket-Key1\", \"4 @1  46546xW%0l 1 5\" }\n             , { \"Origin\", \"http://example.com\" }\n             }\n  ,.body= \"\"\n  }\n\n#define CONNECT_REQUEST 17\n, {.name = \"connect request\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"CONNECT 0-home0.netscape.com:443 HTTP/1.0\\r\\n\"\n         \"User-agent: Mozilla/1.1N\\r\\n\"\n         \"Proxy-authorization: basic aGVsbG86d29ybGQ=\\r\\n\"\n         \"\\r\\n\"\n         \"some data\\r\\n\"\n         \"and yet even more data\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 0\n  ,.method= HTTP_CONNECT\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"\"\n  ,.request_url= \"0-home0.netscape.com:443\"\n  ,.num_headers= 2\n  ,.upgrade=\"some data\\r\\nand yet even more data\"\n  ,.headers= { { \"User-agent\", \"Mozilla/1.1N\" }\n             , { \"Proxy-authorization\", \"basic aGVsbG86d29ybGQ=\" }\n             }\n  ,.body= \"\"\n  }\n\n#define REPORT_REQ 18\n, {.name= \"report request\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"REPORT /test HTTP/1.1\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_REPORT\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/test\"\n  ,.request_url= \"/test\"\n  ,.num_headers= 0\n  ,.headers= {}\n  ,.body= \"\"\n  }\n\n#define NO_HTTP_VERSION 19\n, {.name= \"request with no http version\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET /\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 0\n  ,.http_minor= 9\n  ,.method= HTTP_GET\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/\"\n  ,.request_url= \"/\"\n  ,.num_headers= 0\n  ,.headers= {}\n  ,.body= \"\"\n  }\n\n#define MSEARCH_REQ 20\n, {.name= \"m-search request\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"M-SEARCH * HTTP/1.1\\r\\n\"\n         \"HOST: 239.255.255.250:1900\\r\\n\"\n         \"MAN: \\\"ssdp:discover\\\"\\r\\n\"\n         \"ST: \\\"ssdp:all\\\"\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_MSEARCH\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"*\"\n  ,.request_url= \"*\"\n  ,.num_headers= 3\n  ,.headers= { { \"HOST\", \"239.255.255.250:1900\" }\n             , { \"MAN\", \"\\\"ssdp:discover\\\"\" }\n             , { \"ST\", \"\\\"ssdp:all\\\"\" }\n             }\n  ,.body= \"\"\n  }\n\n#define LINE_FOLDING_IN_HEADER 21\n, {.name= \"line folding in header value\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET / HTTP/1.1\\r\\n\"\n         \"Line1:   abc\\r\\n\"\n         \"\\tdef\\r\\n\"\n         \" ghi\\r\\n\"\n         \"\\t\\tjkl\\r\\n\"\n         \"  mno \\r\\n\"\n         \"\\t \\tqrs\\r\\n\"\n         \"Line2: \\t line2\\t\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_GET\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/\"\n  ,.request_url= \"/\"\n  ,.num_headers= 2\n  ,.headers= { { \"Line1\", \"abcdefghijklmno qrs\" }\n             , { \"Line2\", \"line2\\t\" }\n             }\n  ,.body= \"\"\n  }\n\n\n#define QUERY_TERMINATED_HOST 22\n, {.name= \"host terminated by a query string\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET http://hypnotoad.org?hail=all HTTP/1.1\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_GET\n  ,.query_string= \"hail=all\"\n  ,.fragment= \"\"\n  ,.request_path= \"\"\n  ,.request_url= \"http://hypnotoad.org?hail=all\"\n  ,.host= \"hypnotoad.org\"\n  ,.num_headers= 0\n  ,.headers= { }\n  ,.body= \"\"\n  }\n\n#define QUERY_TERMINATED_HOSTPORT 23\n, {.name= \"host:port terminated by a query string\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET http://hypnotoad.org:1234?hail=all HTTP/1.1\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_GET\n  ,.query_string= \"hail=all\"\n  ,.fragment= \"\"\n  ,.request_path= \"\"\n  ,.request_url= \"http://hypnotoad.org:1234?hail=all\"\n  ,.host= \"hypnotoad.org\"\n  ,.port= 1234\n  ,.num_headers= 0\n  ,.headers= { }\n  ,.body= \"\"\n  }\n\n#define SPACE_TERMINATED_HOSTPORT 24\n, {.name= \"host:port terminated by a space\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET http://hypnotoad.org:1234 HTTP/1.1\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_GET\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"\"\n  ,.request_url= \"http://hypnotoad.org:1234\"\n  ,.host= \"hypnotoad.org\"\n  ,.port= 1234\n  ,.num_headers= 0\n  ,.headers= { }\n  ,.body= \"\"\n  }\n\n#define PATCH_REQ 25\n, {.name = \"PATCH request\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"PATCH /file.txt HTTP/1.1\\r\\n\"\n         \"Host: www.example.com\\r\\n\"\n         \"Content-Type: application/example\\r\\n\"\n         \"If-Match: \\\"e0023aa4e\\\"\\r\\n\"\n         \"Content-Length: 10\\r\\n\"\n         \"\\r\\n\"\n         \"cccccccccc\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_PATCH\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/file.txt\"\n  ,.request_url= \"/file.txt\"\n  ,.num_headers= 4\n  ,.headers= { { \"Host\", \"www.example.com\" }\n             , { \"Content-Type\", \"application/example\" }\n             , { \"If-Match\", \"\\\"e0023aa4e\\\"\" }\n             , { \"Content-Length\", \"10\" }\n             }\n  ,.body= \"cccccccccc\"\n  }\n\n#define CONNECT_CAPS_REQUEST 26\n, {.name = \"connect caps request\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"CONNECT HOME0.NETSCAPE.COM:443 HTTP/1.0\\r\\n\"\n         \"User-agent: Mozilla/1.1N\\r\\n\"\n         \"Proxy-authorization: basic aGVsbG86d29ybGQ=\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 0\n  ,.method= HTTP_CONNECT\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"\"\n  ,.request_url= \"HOME0.NETSCAPE.COM:443\"\n  ,.num_headers= 2\n  ,.upgrade=\"\"\n  ,.headers= { { \"User-agent\", \"Mozilla/1.1N\" }\n             , { \"Proxy-authorization\", \"basic aGVsbG86d29ybGQ=\" }\n             }\n  ,.body= \"\"\n  }\n\n#if !HTTP_PARSER_STRICT\n#define UTF8_PATH_REQ 27\n, {.name= \"utf-8 path request\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET /δ¶/δt/pope?q=1#narf HTTP/1.1\\r\\n\"\n         \"Host: github.com\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_GET\n  ,.query_string= \"q=1\"\n  ,.fragment= \"narf\"\n  ,.request_path= \"/δ¶/δt/pope\"\n  ,.request_url= \"/δ¶/δt/pope?q=1#narf\"\n  ,.num_headers= 1\n  ,.headers= { {\"Host\", \"github.com\" }\n             }\n  ,.body= \"\"\n  }\n\n#define HOSTNAME_UNDERSCORE 28\n, {.name = \"hostname underscore\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"CONNECT home_0.netscape.com:443 HTTP/1.0\\r\\n\"\n         \"User-agent: Mozilla/1.1N\\r\\n\"\n         \"Proxy-authorization: basic aGVsbG86d29ybGQ=\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 0\n  ,.method= HTTP_CONNECT\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"\"\n  ,.request_url= \"home_0.netscape.com:443\"\n  ,.num_headers= 2\n  ,.upgrade=\"\"\n  ,.headers= { { \"User-agent\", \"Mozilla/1.1N\" }\n             , { \"Proxy-authorization\", \"basic aGVsbG86d29ybGQ=\" }\n             }\n  ,.body= \"\"\n  }\n#endif  /* !HTTP_PARSER_STRICT */\n\n/* see https://github.com/ry/http-parser/issues/47 */\n#define EAT_TRAILING_CRLF_NO_CONNECTION_CLOSE 29\n, {.name = \"eat CRLF between requests, no \\\"Connection: close\\\" header\"\n  ,.raw= \"POST / HTTP/1.1\\r\\n\"\n         \"Host: www.example.com\\r\\n\"\n         \"Content-Type: application/x-www-form-urlencoded\\r\\n\"\n         \"Content-Length: 4\\r\\n\"\n         \"\\r\\n\"\n         \"q=42\\r\\n\" /* note the trailing CRLF */\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_POST\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/\"\n  ,.request_url= \"/\"\n  ,.num_headers= 3\n  ,.upgrade= 0\n  ,.headers= { { \"Host\", \"www.example.com\" }\n             , { \"Content-Type\", \"application/x-www-form-urlencoded\" }\n             , { \"Content-Length\", \"4\" }\n             }\n  ,.body= \"q=42\"\n  }\n\n/* see https://github.com/ry/http-parser/issues/47 */\n#define EAT_TRAILING_CRLF_WITH_CONNECTION_CLOSE 30\n, {.name = \"eat CRLF between requests even if \\\"Connection: close\\\" is set\"\n  ,.raw= \"POST / HTTP/1.1\\r\\n\"\n         \"Host: www.example.com\\r\\n\"\n         \"Content-Type: application/x-www-form-urlencoded\\r\\n\"\n         \"Content-Length: 4\\r\\n\"\n         \"Connection: close\\r\\n\"\n         \"\\r\\n\"\n         \"q=42\\r\\n\" /* note the trailing CRLF */\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= FALSE /* input buffer isn't empty when on_message_complete is called */\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_POST\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/\"\n  ,.request_url= \"/\"\n  ,.num_headers= 4\n  ,.upgrade= 0\n  ,.headers= { { \"Host\", \"www.example.com\" }\n             , { \"Content-Type\", \"application/x-www-form-urlencoded\" }\n             , { \"Content-Length\", \"4\" }\n             , { \"Connection\", \"close\" }\n             }\n  ,.body= \"q=42\"\n  }\n\n#define PURGE_REQ 31\n, {.name = \"PURGE request\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"PURGE /file.txt HTTP/1.1\\r\\n\"\n         \"Host: www.example.com\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_PURGE\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/file.txt\"\n  ,.request_url= \"/file.txt\"\n  ,.num_headers= 1\n  ,.headers= { { \"Host\", \"www.example.com\" } }\n  ,.body= \"\"\n  }\n\n#define SEARCH_REQ 32\n, {.name = \"SEARCH request\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"SEARCH / HTTP/1.1\\r\\n\"\n         \"Host: www.example.com\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_SEARCH\n  ,.query_string= \"\"\n  ,.fragment= \"\"\n  ,.request_path= \"/\"\n  ,.request_url= \"/\"\n  ,.num_headers= 1\n  ,.headers= { { \"Host\", \"www.example.com\" } }\n  ,.body= \"\"\n  }\n\n#define PROXY_WITH_BASIC_AUTH 33\n, {.name= \"host:port and basic_auth\"\n  ,.type= HTTP_REQUEST\n  ,.raw= \"GET http://a%12:b!&*$@hypnotoad.org:1234/toto HTTP/1.1\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.method= HTTP_GET\n  ,.fragment= \"\"\n  ,.request_path= \"/toto\"\n  ,.request_url= \"http://a%12:b!&*$@hypnotoad.org:1234/toto\"\n  ,.host= \"hypnotoad.org\"\n  ,.userinfo= \"a%12:b!&*$\"\n  ,.port= 1234\n  ,.num_headers= 0\n  ,.headers= { }\n  ,.body= \"\"\n  }\n\n\n, {.name= NULL } /* sentinel */\n};\n\n/* * R E S P O N S E S * */\nconst struct message responses[] =\n#define GOOGLE_301 0\n{ {.name= \"google 301\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.1 301 Moved Permanently\\r\\n\"\n         \"Location: http://www.google.com/\\r\\n\"\n         \"Content-Type: text/html; charset=UTF-8\\r\\n\"\n         \"Date: Sun, 26 Apr 2009 11:11:49 GMT\\r\\n\"\n         \"Expires: Tue, 26 May 2009 11:11:49 GMT\\r\\n\"\n         \"X-$PrototypeBI-Version: 1.6.0.3\\r\\n\" /* $ char in header field */\n         \"Cache-Control: public, max-age=2592000\\r\\n\"\n         \"Server: gws\\r\\n\"\n         \"Content-Length:  219  \\r\\n\"\n         \"\\r\\n\"\n         \"<HTML><HEAD><meta http-equiv=\\\"content-type\\\" content=\\\"text/html;charset=utf-8\\\">\\n\"\n         \"<TITLE>301 Moved</TITLE></HEAD><BODY>\\n\"\n         \"<H1>301 Moved</H1>\\n\"\n         \"The document has moved\\n\"\n         \"<A HREF=\\\"http://www.google.com/\\\">here</A>.\\r\\n\"\n         \"</BODY></HTML>\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.status_code= 301\n  ,.num_headers= 8\n  ,.headers=\n    { { \"Location\", \"http://www.google.com/\" }\n    , { \"Content-Type\", \"text/html; charset=UTF-8\" }\n    , { \"Date\", \"Sun, 26 Apr 2009 11:11:49 GMT\" }\n    , { \"Expires\", \"Tue, 26 May 2009 11:11:49 GMT\" }\n    , { \"X-$PrototypeBI-Version\", \"1.6.0.3\" }\n    , { \"Cache-Control\", \"public, max-age=2592000\" }\n    , { \"Server\", \"gws\" }\n    , { \"Content-Length\", \"219  \" }\n    }\n  ,.body= \"<HTML><HEAD><meta http-equiv=\\\"content-type\\\" content=\\\"text/html;charset=utf-8\\\">\\n\"\n          \"<TITLE>301 Moved</TITLE></HEAD><BODY>\\n\"\n          \"<H1>301 Moved</H1>\\n\"\n          \"The document has moved\\n\"\n          \"<A HREF=\\\"http://www.google.com/\\\">here</A>.\\r\\n\"\n          \"</BODY></HTML>\\r\\n\"\n  }\n\n#define NO_CONTENT_LENGTH_RESPONSE 1\n/* The client should wait for the server's EOF. That is, when content-length\n * is not specified, and \"Connection: close\", the end of body is specified\n * by the EOF.\n * Compare with APACHEBENCH_GET\n */\n, {.name= \"no content-length response\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.1 200 OK\\r\\n\"\n         \"Date: Tue, 04 Aug 2009 07:59:32 GMT\\r\\n\"\n         \"Server: Apache\\r\\n\"\n         \"X-Powered-By: Servlet/2.5 JSP/2.1\\r\\n\"\n         \"Content-Type: text/xml; charset=utf-8\\r\\n\"\n         \"Connection: close\\r\\n\"\n         \"\\r\\n\"\n         \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\"\n         \"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">\\n\"\n         \"  <SOAP-ENV:Body>\\n\"\n         \"    <SOAP-ENV:Fault>\\n\"\n         \"       <faultcode>SOAP-ENV:Client</faultcode>\\n\"\n         \"       <faultstring>Client Error</faultstring>\\n\"\n         \"    </SOAP-ENV:Fault>\\n\"\n         \"  </SOAP-ENV:Body>\\n\"\n         \"</SOAP-ENV:Envelope>\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= TRUE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.status_code= 200\n  ,.num_headers= 5\n  ,.headers=\n    { { \"Date\", \"Tue, 04 Aug 2009 07:59:32 GMT\" }\n    , { \"Server\", \"Apache\" }\n    , { \"X-Powered-By\", \"Servlet/2.5 JSP/2.1\" }\n    , { \"Content-Type\", \"text/xml; charset=utf-8\" }\n    , { \"Connection\", \"close\" }\n    }\n  ,.body= \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\"\n          \"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">\\n\"\n          \"  <SOAP-ENV:Body>\\n\"\n          \"    <SOAP-ENV:Fault>\\n\"\n          \"       <faultcode>SOAP-ENV:Client</faultcode>\\n\"\n          \"       <faultstring>Client Error</faultstring>\\n\"\n          \"    </SOAP-ENV:Fault>\\n\"\n          \"  </SOAP-ENV:Body>\\n\"\n          \"</SOAP-ENV:Envelope>\"\n  }\n\n#define NO_HEADERS_NO_BODY_404 2\n, {.name= \"404 no headers no body\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.1 404 Not Found\\r\\n\\r\\n\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= TRUE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.status_code= 404\n  ,.num_headers= 0\n  ,.headers= {}\n  ,.body_size= 0\n  ,.body= \"\"\n  }\n\n#define NO_REASON_PHRASE 3\n, {.name= \"301 no response phrase\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.1 301\\r\\n\\r\\n\"\n  ,.should_keep_alive = FALSE\n  ,.message_complete_on_eof= TRUE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.status_code= 301\n  ,.num_headers= 0\n  ,.headers= {}\n  ,.body= \"\"\n  }\n\n#define TRAILING_SPACE_ON_CHUNKED_BODY 4\n, {.name=\"200 trailing space on chunked body\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.1 200 OK\\r\\n\"\n         \"Content-Type: text/plain\\r\\n\"\n         \"Transfer-Encoding: chunked\\r\\n\"\n         \"\\r\\n\"\n         \"25  \\r\\n\"\n         \"This is the data in the first chunk\\r\\n\"\n         \"\\r\\n\"\n         \"1C\\r\\n\"\n         \"and this is the second one\\r\\n\"\n         \"\\r\\n\"\n         \"0  \\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.status_code= 200\n  ,.num_headers= 2\n  ,.headers=\n    { {\"Content-Type\", \"text/plain\" }\n    , {\"Transfer-Encoding\", \"chunked\" }\n    }\n  ,.body_size = 37+28\n  ,.body =\n         \"This is the data in the first chunk\\r\\n\"\n         \"and this is the second one\\r\\n\"\n\n  }\n\n#define NO_CARRIAGE_RET 5\n, {.name=\"no carriage ret\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.1 200 OK\\n\"\n         \"Content-Type: text/html; charset=utf-8\\n\"\n         \"Connection: close\\n\"\n         \"\\n\"\n         \"these headers are from http://news.ycombinator.com/\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= TRUE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.status_code= 200\n  ,.num_headers= 2\n  ,.headers=\n    { {\"Content-Type\", \"text/html; charset=utf-8\" }\n    , {\"Connection\", \"close\" }\n    }\n  ,.body= \"these headers are from http://news.ycombinator.com/\"\n  }\n\n#define PROXY_CONNECTION 6\n, {.name=\"proxy connection\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.1 200 OK\\r\\n\"\n         \"Content-Type: text/html; charset=UTF-8\\r\\n\"\n         \"Content-Length: 11\\r\\n\"\n         \"Proxy-Connection: close\\r\\n\"\n         \"Date: Thu, 31 Dec 2009 20:55:48 +0000\\r\\n\"\n         \"\\r\\n\"\n         \"hello world\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.status_code= 200\n  ,.num_headers= 4\n  ,.headers=\n    { {\"Content-Type\", \"text/html; charset=UTF-8\" }\n    , {\"Content-Length\", \"11\" }\n    , {\"Proxy-Connection\", \"close\" }\n    , {\"Date\", \"Thu, 31 Dec 2009 20:55:48 +0000\"}\n    }\n  ,.body= \"hello world\"\n  }\n\n#define UNDERSTORE_HEADER_KEY 7\n  // shown by\n  // curl -o /dev/null -v \"http://ad.doubleclick.net/pfadx/DARTSHELLCONFIGXML;dcmt=text/xml;\"\n, {.name=\"underscore header key\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.1 200 OK\\r\\n\"\n         \"Server: DCLK-AdSvr\\r\\n\"\n         \"Content-Type: text/xml\\r\\n\"\n         \"Content-Length: 0\\r\\n\"\n         \"DCLK_imp: v7;x;114750856;0-0;0;17820020;0/0;21603567/21621457/1;;~okv=;dcmt=text/xml;;~cs=o\\r\\n\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.status_code= 200\n  ,.num_headers= 4\n  ,.headers=\n    { {\"Server\", \"DCLK-AdSvr\" }\n    , {\"Content-Type\", \"text/xml\" }\n    , {\"Content-Length\", \"0\" }\n    , {\"DCLK_imp\", \"v7;x;114750856;0-0;0;17820020;0/0;21603567/21621457/1;;~okv=;dcmt=text/xml;;~cs=o\" }\n    }\n  ,.body= \"\"\n  }\n\n#define BONJOUR_MADAME_FR 8\n/* The client should not merge two headers fields when the first one doesn't\n * have a value.\n */\n, {.name= \"bonjourmadame.fr\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.0 301 Moved Permanently\\r\\n\"\n         \"Date: Thu, 03 Jun 2010 09:56:32 GMT\\r\\n\"\n         \"Server: Apache/2.2.3 (Red Hat)\\r\\n\"\n         \"Cache-Control: public\\r\\n\"\n         \"Pragma: \\r\\n\"\n         \"Location: http://www.bonjourmadame.fr/\\r\\n\"\n         \"Vary: Accept-Encoding\\r\\n\"\n         \"Content-Length: 0\\r\\n\"\n         \"Content-Type: text/html; charset=UTF-8\\r\\n\"\n         \"Connection: keep-alive\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 0\n  ,.status_code= 301\n  ,.num_headers= 9\n  ,.headers=\n    { { \"Date\", \"Thu, 03 Jun 2010 09:56:32 GMT\" }\n    , { \"Server\", \"Apache/2.2.3 (Red Hat)\" }\n    , { \"Cache-Control\", \"public\" }\n    , { \"Pragma\", \"\" }\n    , { \"Location\", \"http://www.bonjourmadame.fr/\" }\n    , { \"Vary\",  \"Accept-Encoding\" }\n    , { \"Content-Length\", \"0\" }\n    , { \"Content-Type\", \"text/html; charset=UTF-8\" }\n    , { \"Connection\", \"keep-alive\" }\n    }\n  ,.body= \"\"\n  }\n\n#define RES_FIELD_UNDERSCORE 9\n/* Should handle spaces in header fields */\n, {.name= \"field underscore\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.1 200 OK\\r\\n\"\n         \"Date: Tue, 28 Sep 2010 01:14:13 GMT\\r\\n\"\n         \"Server: Apache\\r\\n\"\n         \"Cache-Control: no-cache, must-revalidate\\r\\n\"\n         \"Expires: Mon, 26 Jul 1997 05:00:00 GMT\\r\\n\"\n         \".et-Cookie: PlaxoCS=1274804622353690521; path=/; domain=.plaxo.com\\r\\n\"\n         \"Vary: Accept-Encoding\\r\\n\"\n         \"_eep-Alive: timeout=45\\r\\n\" /* semantic value ignored */\n         \"_onnection: Keep-Alive\\r\\n\" /* semantic value ignored */\n         \"Transfer-Encoding: chunked\\r\\n\"\n         \"Content-Type: text/html\\r\\n\"\n         \"Connection: close\\r\\n\"\n         \"\\r\\n\"\n         \"0\\r\\n\\r\\n\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.status_code= 200\n  ,.num_headers= 11\n  ,.headers=\n    { { \"Date\", \"Tue, 28 Sep 2010 01:14:13 GMT\" }\n    , { \"Server\", \"Apache\" }\n    , { \"Cache-Control\", \"no-cache, must-revalidate\" }\n    , { \"Expires\", \"Mon, 26 Jul 1997 05:00:00 GMT\" }\n    , { \".et-Cookie\", \"PlaxoCS=1274804622353690521; path=/; domain=.plaxo.com\" }\n    , { \"Vary\", \"Accept-Encoding\" }\n    , { \"_eep-Alive\", \"timeout=45\" }\n    , { \"_onnection\", \"Keep-Alive\" }\n    , { \"Transfer-Encoding\", \"chunked\" }\n    , { \"Content-Type\", \"text/html\" }\n    , { \"Connection\", \"close\" }\n    }\n  ,.body= \"\"\n  }\n\n#define NON_ASCII_IN_STATUS_LINE 10\n/* Should handle non-ASCII in status line */\n, {.name= \"non-ASCII in status line\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.1 500 Oriëntatieprobleem\\r\\n\"\n         \"Date: Fri, 5 Nov 2010 23:07:12 GMT+2\\r\\n\"\n         \"Content-Length: 0\\r\\n\"\n         \"Connection: close\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.status_code= 500\n  ,.num_headers= 3\n  ,.headers=\n    { { \"Date\", \"Fri, 5 Nov 2010 23:07:12 GMT+2\" }\n    , { \"Content-Length\", \"0\" }\n    , { \"Connection\", \"close\" }\n    }\n  ,.body= \"\"\n  }\n\n#define HTTP_VERSION_0_9 11\n/* Should handle HTTP/0.9 */\n, {.name= \"http version 0.9\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/0.9 200 OK\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= TRUE\n  ,.http_major= 0\n  ,.http_minor= 9\n  ,.status_code= 200\n  ,.num_headers= 0\n  ,.headers=\n    {}\n  ,.body= \"\"\n  }\n\n#define NO_CONTENT_LENGTH_NO_TRANSFER_ENCODING_RESPONSE 12\n/* The client should wait for the server's EOF. That is, when neither\n * content-length nor transfer-encoding is specified, the end of body\n * is specified by the EOF.\n */\n, {.name= \"neither content-length nor transfer-encoding response\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.1 200 OK\\r\\n\"\n         \"Content-Type: text/plain\\r\\n\"\n         \"\\r\\n\"\n         \"hello world\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= TRUE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.status_code= 200\n  ,.num_headers= 1\n  ,.headers=\n    { { \"Content-Type\", \"text/plain\" }\n    }\n  ,.body= \"hello world\"\n  }\n\n#define NO_BODY_HTTP10_KA_200 13\n, {.name= \"HTTP/1.0 with keep-alive and EOF-terminated 200 status\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.0 200 OK\\r\\n\"\n         \"Connection: keep-alive\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= TRUE\n  ,.http_major= 1\n  ,.http_minor= 0\n  ,.status_code= 200\n  ,.num_headers= 1\n  ,.headers=\n    { { \"Connection\", \"keep-alive\" }\n    }\n  ,.body_size= 0\n  ,.body= \"\"\n  }\n\n#define NO_BODY_HTTP10_KA_204 14\n, {.name= \"HTTP/1.0 with keep-alive and a 204 status\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.0 204 No content\\r\\n\"\n         \"Connection: keep-alive\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 0\n  ,.status_code= 204\n  ,.num_headers= 1\n  ,.headers=\n    { { \"Connection\", \"keep-alive\" }\n    }\n  ,.body_size= 0\n  ,.body= \"\"\n  }\n\n#define NO_BODY_HTTP11_KA_200 15\n, {.name= \"HTTP/1.1 with an EOF-terminated 200 status\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.1 200 OK\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= TRUE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.status_code= 200\n  ,.num_headers= 0\n  ,.headers={}\n  ,.body_size= 0\n  ,.body= \"\"\n  }\n\n#define NO_BODY_HTTP11_KA_204 16\n, {.name= \"HTTP/1.1 with a 204 status\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.1 204 No content\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.status_code= 204\n  ,.num_headers= 0\n  ,.headers={}\n  ,.body_size= 0\n  ,.body= \"\"\n  }\n\n#define NO_BODY_HTTP11_NOKA_204 17\n, {.name= \"HTTP/1.1 with a 204 status and keep-alive disabled\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.1 204 No content\\r\\n\"\n         \"Connection: close\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= FALSE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.status_code= 204\n  ,.num_headers= 1\n  ,.headers=\n    { { \"Connection\", \"close\" }\n    }\n  ,.body_size= 0\n  ,.body= \"\"\n  }\n\n#define NO_BODY_HTTP11_KA_CHUNKED_200 18\n, {.name= \"HTTP/1.1 with chunked endocing and a 200 response\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.1 200 OK\\r\\n\"\n         \"Transfer-Encoding: chunked\\r\\n\"\n         \"\\r\\n\"\n         \"0\\r\\n\"\n         \"\\r\\n\"\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.status_code= 200\n  ,.num_headers= 1\n  ,.headers=\n    { { \"Transfer-Encoding\", \"chunked\" }\n    }\n  ,.body_size= 0\n  ,.body= \"\"\n  }\n\n#if !HTTP_PARSER_STRICT\n#define SPACE_IN_FIELD_RES 19\n/* Should handle spaces in header fields */\n, {.name= \"field space\"\n  ,.type= HTTP_RESPONSE\n  ,.raw= \"HTTP/1.1 200 OK\\r\\n\"\n         \"Server: Microsoft-IIS/6.0\\r\\n\"\n         \"X-Powered-By: ASP.NET\\r\\n\"\n         \"en-US Content-Type: text/xml\\r\\n\" /* this is the problem */\n         \"Content-Type: text/xml\\r\\n\"\n         \"Content-Length: 16\\r\\n\"\n         \"Date: Fri, 23 Jul 2010 18:45:38 GMT\\r\\n\"\n         \"Connection: keep-alive\\r\\n\"\n         \"\\r\\n\"\n         \"<xml>hello</xml>\" /* fake body */\n  ,.should_keep_alive= TRUE\n  ,.message_complete_on_eof= FALSE\n  ,.http_major= 1\n  ,.http_minor= 1\n  ,.status_code= 200\n  ,.num_headers= 7\n  ,.headers=\n    { { \"Server\",  \"Microsoft-IIS/6.0\" }\n    , { \"X-Powered-By\", \"ASP.NET\" }\n    , { \"en-US Content-Type\", \"text/xml\" }\n    , { \"Content-Type\", \"text/xml\" }\n    , { \"Content-Length\", \"16\" }\n    , { \"Date\", \"Fri, 23 Jul 2010 18:45:38 GMT\" }\n    , { \"Connection\", \"keep-alive\" }\n    }\n  ,.body= \"<xml>hello</xml>\"\n  }\n#endif /* !HTTP_PARSER_STRICT */\n\n, {.name= NULL } /* sentinel */\n};\n\n/* strnlen() is a POSIX.2008 addition. Can't rely on it being available so\n * define it ourselves.\n */\nsize_t\nstrnlen(const char *s, size_t maxlen)\n{\n  const char *p;\n\n  p = memchr(s, '\\0', maxlen);\n  if (p == NULL)\n    return maxlen;\n\n  return p - s;\n}\n\nsize_t\nstrlncat(char *dst, size_t len, const char *src, size_t n)\n{\n  size_t slen;\n  size_t dlen;\n  size_t rlen;\n  size_t ncpy;\n\n  slen = strnlen(src, n);\n  dlen = strnlen(dst, len);\n\n  if (dlen < len) {\n    rlen = len - dlen;\n    ncpy = slen < rlen ? slen : (rlen - 1);\n    memcpy(dst + dlen, src, ncpy);\n    dst[dlen + ncpy] = '\\0';\n  }\n\n  assert(len > slen + dlen);\n  return slen + dlen;\n}\n\nsize_t\nstrlcat(char *dst, const char *src, size_t len)\n{\n  return strlncat(dst, len, src, (size_t) -1);\n}\n\nsize_t\nstrlncpy(char *dst, size_t len, const char *src, size_t n)\n{\n  size_t slen;\n  size_t ncpy;\n\n  slen = strnlen(src, n);\n\n  if (len > 0) {\n    ncpy = slen < len ? slen : (len - 1);\n    memcpy(dst, src, ncpy);\n    dst[ncpy] = '\\0';\n  }\n\n  assert(len > slen);\n  return slen;\n}\n\nsize_t\nstrlcpy(char *dst, const char *src, size_t len)\n{\n  return strlncpy(dst, len, src, (size_t) -1);\n}\n\nint\nrequest_url_cb (http_parser *p, const char *buf, size_t len)\n{\n  assert(p == parser);\n  strlncat(messages[num_messages].request_url,\n           sizeof(messages[num_messages].request_url),\n           buf,\n           len);\n  return 0;\n}\n\nint\nstatus_complete_cb (http_parser *p) {\n  assert(p == parser);\n  p->data++;\n  return 0;\n}\n\nint\nheader_field_cb (http_parser *p, const char *buf, size_t len)\n{\n  assert(p == parser);\n  struct message *m = &messages[num_messages];\n\n  if (m->last_header_element != FIELD)\n    m->num_headers++;\n\n  strlncat(m->headers[m->num_headers-1][0],\n           sizeof(m->headers[m->num_headers-1][0]),\n           buf,\n           len);\n\n  m->last_header_element = FIELD;\n\n  return 0;\n}\n\nint\nheader_value_cb (http_parser *p, const char *buf, size_t len)\n{\n  assert(p == parser);\n  struct message *m = &messages[num_messages];\n\n  strlncat(m->headers[m->num_headers-1][1],\n           sizeof(m->headers[m->num_headers-1][1]),\n           buf,\n           len);\n\n  m->last_header_element = VALUE;\n\n  return 0;\n}\n\nvoid\ncheck_body_is_final (const http_parser *p)\n{\n  if (messages[num_messages].body_is_final) {\n    fprintf(stderr, \"\\n\\n *** Error http_body_is_final() should return 1 \"\n                    \"on last on_body callback call \"\n                    \"but it doesn't! ***\\n\\n\");\n    assert(0);\n    abort();\n  }\n  messages[num_messages].body_is_final = http_body_is_final(p);\n}\n\nint\nbody_cb (http_parser *p, const char *buf, size_t len)\n{\n  assert(p == parser);\n  strlncat(messages[num_messages].body,\n           sizeof(messages[num_messages].body),\n           buf,\n           len);\n  messages[num_messages].body_size += len;\n  check_body_is_final(p);\n // printf(\"body_cb: '%s'\\n\", requests[num_messages].body);\n  return 0;\n}\n\nint\ncount_body_cb (http_parser *p, const char *buf, size_t len)\n{\n  assert(p == parser);\n  assert(buf);\n  messages[num_messages].body_size += len;\n  check_body_is_final(p);\n  return 0;\n}\n\nint\nmessage_begin_cb (http_parser *p)\n{\n  assert(p == parser);\n  messages[num_messages].message_begin_cb_called = TRUE;\n  return 0;\n}\n\nint\nheaders_complete_cb (http_parser *p)\n{\n  assert(p == parser);\n  messages[num_messages].method = parser->method;\n  messages[num_messages].status_code = parser->status_code;\n  messages[num_messages].http_major = parser->http_major;\n  messages[num_messages].http_minor = parser->http_minor;\n  messages[num_messages].headers_complete_cb_called = TRUE;\n  messages[num_messages].should_keep_alive = http_should_keep_alive(parser);\n  return 0;\n}\n\nint\nmessage_complete_cb (http_parser *p)\n{\n  assert(p == parser);\n  if (messages[num_messages].should_keep_alive != http_should_keep_alive(parser))\n  {\n    fprintf(stderr, \"\\n\\n *** Error http_should_keep_alive() should have same \"\n                    \"value in both on_message_complete and on_headers_complete \"\n                    \"but it doesn't! ***\\n\\n\");\n    assert(0);\n    abort();\n  }\n\n  if (messages[num_messages].body_size &&\n      http_body_is_final(p) &&\n      !messages[num_messages].body_is_final)\n  {\n    fprintf(stderr, \"\\n\\n *** Error http_body_is_final() should return 1 \"\n                    \"on last on_body callback call \"\n                    \"but it doesn't! ***\\n\\n\");\n    assert(0);\n    abort();\n  }\n\n  messages[num_messages].message_complete_cb_called = TRUE;\n\n  messages[num_messages].message_complete_on_eof = currently_parsing_eof;\n\n  num_messages++;\n  return 0;\n}\n\n/* These dontcall_* callbacks exist so that we can verify that when we're\n * paused, no additional callbacks are invoked */\nint\ndontcall_message_begin_cb (http_parser *p)\n{\n  if (p) { } // gcc\n  fprintf(stderr, \"\\n\\n*** on_message_begin() called on paused parser ***\\n\\n\");\n  abort();\n}\n\nint\ndontcall_header_field_cb (http_parser *p, const char *buf, size_t len)\n{\n  if (p || buf || len) { } // gcc\n  fprintf(stderr, \"\\n\\n*** on_header_field() called on paused parser ***\\n\\n\");\n  abort();\n}\n\nint\ndontcall_header_value_cb (http_parser *p, const char *buf, size_t len)\n{\n  if (p || buf || len) { } // gcc\n  fprintf(stderr, \"\\n\\n*** on_header_value() called on paused parser ***\\n\\n\");\n  abort();\n}\n\nint\ndontcall_request_url_cb (http_parser *p, const char *buf, size_t len)\n{\n  if (p || buf || len) { } // gcc\n  fprintf(stderr, \"\\n\\n*** on_request_url() called on paused parser ***\\n\\n\");\n  abort();\n}\n\nint\ndontcall_body_cb (http_parser *p, const char *buf, size_t len)\n{\n  if (p || buf || len) { } // gcc\n  fprintf(stderr, \"\\n\\n*** on_body_cb() called on paused parser ***\\n\\n\");\n  abort();\n}\n\nint\ndontcall_headers_complete_cb (http_parser *p)\n{\n  if (p) { } // gcc\n  fprintf(stderr, \"\\n\\n*** on_headers_complete() called on paused \"\n                  \"parser ***\\n\\n\");\n  abort();\n}\n\nint\ndontcall_message_complete_cb (http_parser *p)\n{\n  if (p) { } // gcc\n  fprintf(stderr, \"\\n\\n*** on_message_complete() called on paused \"\n                  \"parser ***\\n\\n\");\n  abort();\n}\n\nstatic http_parser_settings settings_dontcall =\n  {.on_message_begin = dontcall_message_begin_cb\n  ,.on_header_field = dontcall_header_field_cb\n  ,.on_header_value = dontcall_header_value_cb\n  ,.on_url = dontcall_request_url_cb\n  ,.on_body = dontcall_body_cb\n  ,.on_headers_complete = dontcall_headers_complete_cb\n  ,.on_message_complete = dontcall_message_complete_cb\n  };\n\n/* These pause_* callbacks always pause the parser and just invoke the regular\n * callback that tracks content. Before returning, we overwrite the parser\n * settings to point to the _dontcall variety so that we can verify that\n * the pause actually did, you know, pause. */\nint\npause_message_begin_cb (http_parser *p)\n{\n  http_parser_pause(p, 1);\n  *current_pause_parser = settings_dontcall;\n  return message_begin_cb(p);\n}\n\nint\npause_header_field_cb (http_parser *p, const char *buf, size_t len)\n{\n  http_parser_pause(p, 1);\n  *current_pause_parser = settings_dontcall;\n  return header_field_cb(p, buf, len);\n}\n\nint\npause_header_value_cb (http_parser *p, const char *buf, size_t len)\n{\n  http_parser_pause(p, 1);\n  *current_pause_parser = settings_dontcall;\n  return header_value_cb(p, buf, len);\n}\n\nint\npause_request_url_cb (http_parser *p, const char *buf, size_t len)\n{\n  http_parser_pause(p, 1);\n  *current_pause_parser = settings_dontcall;\n  return request_url_cb(p, buf, len);\n}\n\nint\npause_body_cb (http_parser *p, const char *buf, size_t len)\n{\n  http_parser_pause(p, 1);\n  *current_pause_parser = settings_dontcall;\n  return body_cb(p, buf, len);\n}\n\nint\npause_headers_complete_cb (http_parser *p)\n{\n  http_parser_pause(p, 1);\n  *current_pause_parser = settings_dontcall;\n  return headers_complete_cb(p);\n}\n\nint\npause_message_complete_cb (http_parser *p)\n{\n  http_parser_pause(p, 1);\n  *current_pause_parser = settings_dontcall;\n  return message_complete_cb(p);\n}\n\nstatic http_parser_settings settings_pause =\n  {.on_message_begin = pause_message_begin_cb\n  ,.on_header_field = pause_header_field_cb\n  ,.on_header_value = pause_header_value_cb\n  ,.on_url = pause_request_url_cb\n  ,.on_body = pause_body_cb\n  ,.on_headers_complete = pause_headers_complete_cb\n  ,.on_message_complete = pause_message_complete_cb\n  };\n\nstatic http_parser_settings settings =\n  {.on_message_begin = message_begin_cb\n  ,.on_header_field = header_field_cb\n  ,.on_header_value = header_value_cb\n  ,.on_url = request_url_cb\n  ,.on_body = body_cb\n  ,.on_headers_complete = headers_complete_cb\n  ,.on_message_complete = message_complete_cb\n  };\n\nstatic http_parser_settings settings_count_body =\n  {.on_message_begin = message_begin_cb\n  ,.on_header_field = header_field_cb\n  ,.on_header_value = header_value_cb\n  ,.on_url = request_url_cb\n  ,.on_body = count_body_cb\n  ,.on_headers_complete = headers_complete_cb\n  ,.on_message_complete = message_complete_cb\n  };\n\nstatic http_parser_settings settings_null =\n  {.on_message_begin = 0\n  ,.on_header_field = 0\n  ,.on_header_value = 0\n  ,.on_url = 0\n  ,.on_body = 0\n  ,.on_headers_complete = 0\n  ,.on_message_complete = 0\n  };\n\nvoid\nparser_init (enum http_parser_type type)\n{\n  num_messages = 0;\n\n  assert(parser == NULL);\n\n  parser = malloc(sizeof(http_parser));\n\n  http_parser_init(parser, type);\n\n  memset(&messages, 0, sizeof messages);\n\n}\n\nvoid\nparser_free ()\n{\n  assert(parser);\n  free(parser);\n  parser = NULL;\n}\n\nsize_t parse (const char *buf, size_t len)\n{\n  size_t nparsed;\n  currently_parsing_eof = (len == 0);\n  nparsed = http_parser_execute(parser, &settings, buf, len);\n  return nparsed;\n}\n\nsize_t parse_count_body (const char *buf, size_t len)\n{\n  size_t nparsed;\n  currently_parsing_eof = (len == 0);\n  nparsed = http_parser_execute(parser, &settings_count_body, buf, len);\n  return nparsed;\n}\n\nsize_t parse_pause (const char *buf, size_t len)\n{\n  size_t nparsed;\n  http_parser_settings s = settings_pause;\n\n  currently_parsing_eof = (len == 0);\n  current_pause_parser = &s;\n  nparsed = http_parser_execute(parser, current_pause_parser, buf, len);\n  return nparsed;\n}\n\nstatic inline int\ncheck_str_eq (const struct message *m,\n              const char *prop,\n              const char *expected,\n              const char *found) {\n  if ((expected == NULL) != (found == NULL)) {\n    printf(\"\\n*** Error: %s in '%s' ***\\n\\n\", prop, m->name);\n    printf(\"expected %s\\n\", (expected == NULL) ? \"NULL\" : expected);\n    printf(\"   found %s\\n\", (found == NULL) ? \"NULL\" : found);\n    return 0;\n  }\n  if (expected != NULL && 0 != strcmp(expected, found)) {\n    printf(\"\\n*** Error: %s in '%s' ***\\n\\n\", prop, m->name);\n    printf(\"expected '%s'\\n\", expected);\n    printf(\"   found '%s'\\n\", found);\n    return 0;\n  }\n  return 1;\n}\n\nstatic inline int\ncheck_num_eq (const struct message *m,\n              const char *prop,\n              int expected,\n              int found) {\n  if (expected != found) {\n    printf(\"\\n*** Error: %s in '%s' ***\\n\\n\", prop, m->name);\n    printf(\"expected %d\\n\", expected);\n    printf(\"   found %d\\n\", found);\n    return 0;\n  }\n  return 1;\n}\n\n#define MESSAGE_CHECK_STR_EQ(expected, found, prop) \\\n  if (!check_str_eq(expected, #prop, expected->prop, found->prop)) return 0\n\n#define MESSAGE_CHECK_NUM_EQ(expected, found, prop) \\\n  if (!check_num_eq(expected, #prop, expected->prop, found->prop)) return 0\n\n#define MESSAGE_CHECK_URL_EQ(u, expected, found, prop, fn)           \\\ndo {                                                                 \\\n  char ubuf[256];                                                    \\\n                                                                     \\\n  if ((u)->field_set & (1 << (fn))) {                                \\\n    memcpy(ubuf, (found)->request_url + (u)->field_data[(fn)].off,   \\\n      (u)->field_data[(fn)].len);                                    \\\n    ubuf[(u)->field_data[(fn)].len] = '\\0';                          \\\n  } else {                                                           \\\n    ubuf[0] = '\\0';                                                  \\\n  }                                                                  \\\n                                                                     \\\n  check_str_eq(expected, #prop, expected->prop, ubuf);               \\\n} while(0)\n\nint\nmessage_eq (int index, const struct message *expected)\n{\n  int i;\n  struct message *m = &messages[index];\n\n  MESSAGE_CHECK_NUM_EQ(expected, m, http_major);\n  MESSAGE_CHECK_NUM_EQ(expected, m, http_minor);\n\n  if (expected->type == HTTP_REQUEST) {\n    MESSAGE_CHECK_NUM_EQ(expected, m, method);\n  } else {\n    MESSAGE_CHECK_NUM_EQ(expected, m, status_code);\n  }\n\n  MESSAGE_CHECK_NUM_EQ(expected, m, should_keep_alive);\n  MESSAGE_CHECK_NUM_EQ(expected, m, message_complete_on_eof);\n\n  assert(m->message_begin_cb_called);\n  assert(m->headers_complete_cb_called);\n  assert(m->message_complete_cb_called);\n\n\n  MESSAGE_CHECK_STR_EQ(expected, m, request_url);\n\n  /* Check URL components; we can't do this w/ CONNECT since it doesn't\n   * send us a well-formed URL.\n   */\n  if (*m->request_url && m->method != HTTP_CONNECT) {\n    struct http_parser_url u;\n\n    if (http_parser_parse_url(m->request_url, strlen(m->request_url), 0, &u)) {\n      fprintf(stderr, \"\\n\\n*** failed to parse URL %s ***\\n\\n\",\n        m->request_url);\n      abort();\n    }\n\n    if (expected->host) {\n      MESSAGE_CHECK_URL_EQ(&u, expected, m, host, UF_HOST);\n    }\n\n    if (expected->userinfo) {\n      MESSAGE_CHECK_URL_EQ(&u, expected, m, userinfo, UF_USERINFO);\n    }\n\n    m->port = (u.field_set & (1 << UF_PORT)) ?\n      u.port : 0;\n\n    MESSAGE_CHECK_URL_EQ(&u, expected, m, query_string, UF_QUERY);\n    MESSAGE_CHECK_URL_EQ(&u, expected, m, fragment, UF_FRAGMENT);\n    MESSAGE_CHECK_URL_EQ(&u, expected, m, request_path, UF_PATH);\n    MESSAGE_CHECK_NUM_EQ(expected, m, port);\n  }\n\n  if (expected->body_size) {\n    MESSAGE_CHECK_NUM_EQ(expected, m, body_size);\n  } else {\n    MESSAGE_CHECK_STR_EQ(expected, m, body);\n  }\n\n  MESSAGE_CHECK_NUM_EQ(expected, m, num_headers);\n\n  int r;\n  for (i = 0; i < m->num_headers; i++) {\n    r = check_str_eq(expected, \"header field\", expected->headers[i][0], m->headers[i][0]);\n    if (!r) return 0;\n    r = check_str_eq(expected, \"header value\", expected->headers[i][1], m->headers[i][1]);\n    if (!r) return 0;\n  }\n\n  MESSAGE_CHECK_STR_EQ(expected, m, upgrade);\n\n  return 1;\n}\n\n/* Given a sequence of varargs messages, return the number of them that the\n * parser should successfully parse, taking into account that upgraded\n * messages prevent all subsequent messages from being parsed.\n */\nsize_t\ncount_parsed_messages(const size_t nmsgs, ...) {\n  size_t i;\n  va_list ap;\n\n  va_start(ap, nmsgs);\n\n  for (i = 0; i < nmsgs; i++) {\n    struct message *m = va_arg(ap, struct message *);\n\n    if (m->upgrade) {\n      va_end(ap);\n      return i + 1;\n    }\n  }\n\n  va_end(ap);\n  return nmsgs;\n}\n\n/* Given a sequence of bytes and the number of these that we were able to\n * parse, verify that upgrade bodies are correct.\n */\nvoid\nupgrade_message_fix(char *body, const size_t nread, const size_t nmsgs, ...) {\n  va_list ap;\n  size_t i;\n  size_t off = 0;\n \n  va_start(ap, nmsgs);\n\n  for (i = 0; i < nmsgs; i++) {\n    struct message *m = va_arg(ap, struct message *);\n\n    off += strlen(m->raw);\n\n    if (m->upgrade) {\n      off -= strlen(m->upgrade);\n\n      /* Check the portion of the response after its specified upgrade */\n      if (!check_str_eq(m, \"upgrade\", body + off, body + nread)) {\n        abort();\n      }\n\n      /* Fix up the response so that message_eq() will verify the beginning\n       * of the upgrade */\n      *(body + nread + strlen(m->upgrade)) = '\\0';\n      messages[num_messages -1 ].upgrade = body + nread;\n\n      va_end(ap);\n      return;\n    }\n  }\n\n  va_end(ap);\n  printf(\"\\n\\n*** Error: expected a message with upgrade ***\\n\");\n\n  abort();\n}\n\nstatic void\nprint_error (const char *raw, size_t error_location)\n{\n  fprintf(stderr, \"\\n*** %s ***\\n\\n\",\n          http_errno_description(HTTP_PARSER_ERRNO(parser)));\n\n  int this_line = 0, char_len = 0;\n  size_t i, j, len = strlen(raw), error_location_line = 0;\n  for (i = 0; i < len; i++) {\n    if (i == error_location) this_line = 1;\n    switch (raw[i]) {\n      case '\\r':\n        char_len = 2;\n        fprintf(stderr, \"\\\\r\");\n        break;\n\n      case '\\n':\n        char_len = 2;\n        fprintf(stderr, \"\\\\n\\n\");\n\n        if (this_line) goto print;\n\n        error_location_line = 0;\n        continue;\n\n      default:\n        char_len = 1;\n        fputc(raw[i], stderr);\n        break;\n    }\n    if (!this_line) error_location_line += char_len;\n  }\n\n  fprintf(stderr, \"[eof]\\n\");\n\n print:\n  for (j = 0; j < error_location_line; j++) {\n    fputc(' ', stderr);\n  }\n  fprintf(stderr, \"^\\n\\nerror location: %u\\n\", (unsigned int)error_location);\n}\n\nvoid\ntest_preserve_data (void)\n{\n  char my_data[] = \"application-specific data\";\n  http_parser parser;\n  parser.data = my_data;\n  http_parser_init(&parser, HTTP_REQUEST);\n  if (parser.data != my_data) {\n    printf(\"\\n*** parser.data not preserved accross http_parser_init ***\\n\\n\");\n    abort();\n  }\n}\n\nstruct url_test {\n  const char *name;\n  const char *url;\n  int is_connect;\n  struct http_parser_url u;\n  int rv;\n};\n\nconst struct url_test url_tests[] =\n{ {.name=\"proxy request\"\n  ,.url=\"http://hostname/\"\n  ,.is_connect=0\n  ,.u=\n    {.field_set=(1 << UF_SCHEMA) | (1 << UF_HOST) | (1 << UF_PATH)\n    ,.port=0\n    ,.field_data=\n      {{  0,  4 } /* UF_SCHEMA */\n      ,{  7,  8 } /* UF_HOST */\n      ,{  0,  0 } /* UF_PORT */\n      ,{ 15,  1 } /* UF_PATH */\n      ,{  0,  0 } /* UF_QUERY */\n      ,{  0,  0 } /* UF_FRAGMENT */\n      ,{  0,  0 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n, {.name=\"proxy request with port\"\n  ,.url=\"http://hostname:444/\"\n  ,.is_connect=0\n  ,.u=\n    {.field_set=(1 << UF_SCHEMA) | (1 << UF_HOST) | (1 << UF_PORT) | (1 << UF_PATH)\n    ,.port=444\n    ,.field_data=\n      {{  0,  4 } /* UF_SCHEMA */\n      ,{  7,  8 } /* UF_HOST */\n      ,{ 16,  3 } /* UF_PORT */\n      ,{ 19,  1 } /* UF_PATH */\n      ,{  0,  0 } /* UF_QUERY */\n      ,{  0,  0 } /* UF_FRAGMENT */\n      ,{  0,  0 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n, {.name=\"CONNECT request\"\n  ,.url=\"hostname:443\"\n  ,.is_connect=1\n  ,.u=\n    {.field_set=(1 << UF_HOST) | (1 << UF_PORT)\n    ,.port=443\n    ,.field_data=\n      {{  0,  0 } /* UF_SCHEMA */\n      ,{  0,  8 } /* UF_HOST */\n      ,{  9,  3 } /* UF_PORT */\n      ,{  0,  0 } /* UF_PATH */\n      ,{  0,  0 } /* UF_QUERY */\n      ,{  0,  0 } /* UF_FRAGMENT */\n      ,{  0,  0 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n, {.name=\"CONNECT request but not connect\"\n  ,.url=\"hostname:443\"\n  ,.is_connect=0\n  ,.rv=1\n  }\n\n, {.name=\"proxy ipv6 request\"\n  ,.url=\"http://[1:2::3:4]/\"\n  ,.is_connect=0\n  ,.u=\n    {.field_set=(1 << UF_SCHEMA) | (1 << UF_HOST) | (1 << UF_PATH)\n    ,.port=0\n    ,.field_data=\n      {{  0,  4 } /* UF_SCHEMA */\n      ,{  8,  8 } /* UF_HOST */\n      ,{  0,  0 } /* UF_PORT */\n      ,{ 17,  1 } /* UF_PATH */\n      ,{  0,  0 } /* UF_QUERY */\n      ,{  0,  0 } /* UF_FRAGMENT */\n      ,{  0,  0 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n, {.name=\"proxy ipv6 request with port\"\n  ,.url=\"http://[1:2::3:4]:67/\"\n  ,.is_connect=0\n  ,.u=\n    {.field_set=(1 << UF_SCHEMA) | (1 << UF_HOST) | (1 << UF_PORT) | (1 << UF_PATH)\n    ,.port=67\n    ,.field_data=\n      {{  0,  4 } /* UF_SCHEMA */\n      ,{  8,  8 } /* UF_HOST */\n      ,{ 18,  2 } /* UF_PORT */\n      ,{ 20,  1 } /* UF_PATH */\n      ,{  0,  0 } /* UF_QUERY */\n      ,{  0,  0 } /* UF_FRAGMENT */\n      ,{  0,  0 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n, {.name=\"CONNECT ipv6 address\"\n  ,.url=\"[1:2::3:4]:443\"\n  ,.is_connect=1\n  ,.u=\n    {.field_set=(1 << UF_HOST) | (1 << UF_PORT)\n    ,.port=443\n    ,.field_data=\n      {{  0,  0 } /* UF_SCHEMA */\n      ,{  1,  8 } /* UF_HOST */\n      ,{ 11,  3 } /* UF_PORT */\n      ,{  0,  0 } /* UF_PATH */\n      ,{  0,  0 } /* UF_QUERY */\n      ,{  0,  0 } /* UF_FRAGMENT */\n      ,{  0,  0 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n, {.name=\"ipv4 in ipv6 address\"\n  ,.url=\"http://[2001:0000:0000:0000:0000:0000:1.9.1.1]/\"\n  ,.is_connect=0\n  ,.u=\n    {.field_set=(1 << UF_SCHEMA) | (1 << UF_HOST) | (1 << UF_PATH)\n    ,.port=0\n    ,.field_data=\n      {{  0,  4 } /* UF_SCHEMA */\n      ,{  8, 37 } /* UF_HOST */\n      ,{  0,  0 } /* UF_PORT */\n      ,{ 46,  1 } /* UF_PATH */\n      ,{  0,  0 } /* UF_QUERY */\n      ,{  0,  0 } /* UF_FRAGMENT */\n      ,{  0,  0 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n, {.name=\"extra ? in query string\"\n  ,.url=\"http://a.tbcdn.cn/p/fp/2010c/??fp-header-min.css,fp-base-min.css,\"\n  \"fp-channel-min.css,fp-product-min.css,fp-mall-min.css,fp-category-min.css,\"\n  \"fp-sub-min.css,fp-gdp4p-min.css,fp-css3-min.css,fp-misc-min.css?t=20101022.css\"\n  ,.is_connect=0\n  ,.u=\n    {.field_set=(1<<UF_SCHEMA) | (1<<UF_HOST) | (1<<UF_PATH) | (1<<UF_QUERY)\n    ,.port=0\n    ,.field_data=\n      {{  0,  4 } /* UF_SCHEMA */\n      ,{  7, 10 } /* UF_HOST */\n      ,{  0,  0 } /* UF_PORT */\n      ,{ 17, 12 } /* UF_PATH */\n      ,{ 30,187 } /* UF_QUERY */\n      ,{  0,  0 } /* UF_FRAGMENT */\n      ,{  0,  0 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n, {.name=\"space URL encoded\"\n  ,.url=\"/toto.html?toto=a%20b\"\n  ,.is_connect=0\n  ,.u=\n    {.field_set= (1<<UF_PATH) | (1<<UF_QUERY)\n    ,.port=0\n    ,.field_data=\n      {{  0,  0 } /* UF_SCHEMA */\n      ,{  0,  0 } /* UF_HOST */\n      ,{  0,  0 } /* UF_PORT */\n      ,{  0, 10 } /* UF_PATH */\n      ,{ 11, 10 } /* UF_QUERY */\n      ,{  0,  0 } /* UF_FRAGMENT */\n      ,{  0,  0 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n\n, {.name=\"URL fragment\"\n  ,.url=\"/toto.html#titi\"\n  ,.is_connect=0\n  ,.u=\n    {.field_set= (1<<UF_PATH) | (1<<UF_FRAGMENT)\n    ,.port=0\n    ,.field_data=\n      {{  0,  0 } /* UF_SCHEMA */\n      ,{  0,  0 } /* UF_HOST */\n      ,{  0,  0 } /* UF_PORT */\n      ,{  0, 10 } /* UF_PATH */\n      ,{  0,  0 } /* UF_QUERY */\n      ,{ 11,  4 } /* UF_FRAGMENT */\n      ,{  0,  0 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n, {.name=\"complex URL fragment\"\n  ,.url=\"http://www.webmasterworld.com/r.cgi?f=21&d=8405&url=\"\n    \"http://www.example.com/index.html?foo=bar&hello=world#midpage\"\n  ,.is_connect=0\n  ,.u=\n    {.field_set= (1<<UF_SCHEMA) | (1<<UF_HOST) | (1<<UF_PATH) | (1<<UF_QUERY) |\\\n      (1<<UF_FRAGMENT)\n    ,.port=0\n    ,.field_data=\n      {{  0,  4 } /* UF_SCHEMA */\n      ,{  7, 22 } /* UF_HOST */\n      ,{  0,  0 } /* UF_PORT */\n      ,{ 29,  6 } /* UF_PATH */\n      ,{ 36, 69 } /* UF_QUERY */\n      ,{106,  7 } /* UF_FRAGMENT */\n      ,{  0,  0 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n, {.name=\"complex URL from node js url parser doc\"\n  ,.url=\"http://host.com:8080/p/a/t/h?query=string#hash\"\n  ,.is_connect=0\n  ,.u=\n    {.field_set= (1<<UF_SCHEMA) | (1<<UF_HOST) | (1<<UF_PORT) | (1<<UF_PATH) |\\\n      (1<<UF_QUERY) | (1<<UF_FRAGMENT)\n    ,.port=8080\n    ,.field_data=\n      {{  0,  4 } /* UF_SCHEMA */\n      ,{  7,  8 } /* UF_HOST */\n      ,{ 16,  4 } /* UF_PORT */\n      ,{ 20,  8 } /* UF_PATH */\n      ,{ 29, 12 } /* UF_QUERY */\n      ,{ 42,  4 } /* UF_FRAGMENT */\n      ,{  0,  0 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n, {.name=\"complex URL with basic auth from node js url parser doc\"\n  ,.url=\"http://a:b@host.com:8080/p/a/t/h?query=string#hash\"\n  ,.is_connect=0\n  ,.u=\n    {.field_set= (1<<UF_SCHEMA) | (1<<UF_HOST) | (1<<UF_PORT) | (1<<UF_PATH) |\\\n      (1<<UF_QUERY) | (1<<UF_FRAGMENT) | (1<<UF_USERINFO)\n    ,.port=8080\n    ,.field_data=\n      {{  0,  4 } /* UF_SCHEMA */\n      ,{ 11,  8 } /* UF_HOST */\n      ,{ 20,  4 } /* UF_PORT */\n      ,{ 24,  8 } /* UF_PATH */\n      ,{ 33, 12 } /* UF_QUERY */\n      ,{ 46,  4 } /* UF_FRAGMENT */\n      ,{  7,  3 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n, {.name=\"double @\"\n  ,.url=\"http://a:b@@hostname:443/\"\n  ,.is_connect=0\n  ,.rv=1\n  }\n\n, {.name=\"proxy empty host\"\n  ,.url=\"http://:443/\"\n  ,.is_connect=0\n  ,.rv=1\n  }\n\n, {.name=\"proxy empty port\"\n  ,.url=\"http://hostname:/\"\n  ,.is_connect=0\n  ,.rv=1\n  }\n\n, {.name=\"CONNECT with basic auth\"\n  ,.url=\"a:b@hostname:443\"\n  ,.is_connect=1\n  ,.rv=1\n  }\n\n, {.name=\"CONNECT empty host\"\n  ,.url=\":443\"\n  ,.is_connect=1\n  ,.rv=1\n  }\n\n, {.name=\"CONNECT empty port\"\n  ,.url=\"hostname:\"\n  ,.is_connect=1\n  ,.rv=1\n  }\n\n, {.name=\"CONNECT with extra bits\"\n  ,.url=\"hostname:443/\"\n  ,.is_connect=1\n  ,.rv=1\n  }\n\n, {.name=\"space in URL\"\n  ,.url=\"/foo bar/\"\n  ,.rv=1 /* s_dead */\n  }\n\n, {.name=\"proxy basic auth with space url encoded\"\n  ,.url=\"http://a%20:b@host.com/\"\n  ,.is_connect=0\n  ,.u=\n    {.field_set= (1<<UF_SCHEMA) | (1<<UF_HOST) | (1<<UF_PATH) | (1<<UF_USERINFO)\n    ,.port=0\n    ,.field_data=\n      {{  0,  4 } /* UF_SCHEMA */\n      ,{ 14,  8 } /* UF_HOST */\n      ,{  0,  0 } /* UF_PORT */\n      ,{ 22,  1 } /* UF_PATH */\n      ,{  0,  0 } /* UF_QUERY */\n      ,{  0,  0 } /* UF_FRAGMENT */\n      ,{  7,  6 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n, {.name=\"carriage return in URL\"\n  ,.url=\"/foo\\rbar/\"\n  ,.rv=1 /* s_dead */\n  }\n\n, {.name=\"proxy double : in URL\"\n  ,.url=\"http://hostname::443/\"\n  ,.rv=1 /* s_dead */\n  }\n\n, {.name=\"proxy basic auth with double :\"\n  ,.url=\"http://a::b@host.com/\"\n  ,.is_connect=0\n  ,.u=\n    {.field_set= (1<<UF_SCHEMA) | (1<<UF_HOST) | (1<<UF_PATH) | (1<<UF_USERINFO)\n    ,.port=0\n    ,.field_data=\n      {{  0,  4 } /* UF_SCHEMA */\n      ,{ 12,  8 } /* UF_HOST */\n      ,{  0,  0 } /* UF_PORT */\n      ,{ 20,  1 } /* UF_PATH */\n      ,{  0,  0 } /* UF_QUERY */\n      ,{  0,  0 } /* UF_FRAGMENT */\n      ,{  7,  4 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n, {.name=\"line feed in URL\"\n  ,.url=\"/foo\\nbar/\"\n  ,.rv=1 /* s_dead */\n  }\n\n, {.name=\"proxy empty basic auth\"\n  ,.url=\"http://@hostname/fo\"\n  ,.u=\n    {.field_set= (1<<UF_SCHEMA) | (1<<UF_HOST) | (1<<UF_PATH)\n    ,.port=0\n    ,.field_data=\n      {{  0,  4 } /* UF_SCHEMA */\n      ,{  8,  8 } /* UF_HOST */\n      ,{  0,  0 } /* UF_PORT */\n      ,{ 16,  3 } /* UF_PATH */\n      ,{  0,  0 } /* UF_QUERY */\n      ,{  0,  0 } /* UF_FRAGMENT */\n      ,{  0,  0 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n, {.name=\"proxy line feed in hostname\"\n  ,.url=\"http://host\\name/fo\"\n  ,.rv=1 /* s_dead */\n  }\n\n, {.name=\"proxy % in hostname\"\n  ,.url=\"http://host%name/fo\"\n  ,.rv=1 /* s_dead */\n  }\n\n, {.name=\"proxy ; in hostname\"\n  ,.url=\"http://host;ame/fo\"\n  ,.rv=1 /* s_dead */\n  }\n\n, {.name=\"proxy basic auth with unreservedchars\"\n  ,.url=\"http://a!;-_!=+$@host.com/\"\n  ,.is_connect=0\n  ,.u=\n    {.field_set= (1<<UF_SCHEMA) | (1<<UF_HOST) | (1<<UF_PATH) | (1<<UF_USERINFO)\n    ,.port=0\n    ,.field_data=\n      {{  0,  4 } /* UF_SCHEMA */\n      ,{ 17,  8 } /* UF_HOST */\n      ,{  0,  0 } /* UF_PORT */\n      ,{ 25,  1 } /* UF_PATH */\n      ,{  0,  0 } /* UF_QUERY */\n      ,{  0,  0 } /* UF_FRAGMENT */\n      ,{  7,  9 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n, {.name=\"proxy only empty basic auth\"\n  ,.url=\"http://@/fo\"\n  ,.rv=1 /* s_dead */\n  }\n\n, {.name=\"proxy only basic auth\"\n  ,.url=\"http://toto@/fo\"\n  ,.rv=1 /* s_dead */\n  }\n\n, {.name=\"proxy emtpy hostname\"\n  ,.url=\"http:///fo\"\n  ,.rv=1 /* s_dead */\n  }\n\n, {.name=\"proxy = in URL\"\n  ,.url=\"http://host=ame/fo\"\n  ,.rv=1 /* s_dead */\n  }\n\n#if HTTP_PARSER_STRICT\n\n, {.name=\"tab in URL\"\n  ,.url=\"/foo\\tbar/\"\n  ,.rv=1 /* s_dead */\n  }\n\n, {.name=\"form feed in URL\"\n  ,.url=\"/foo\\fbar/\"\n  ,.rv=1 /* s_dead */\n  }\n\n#else /* !HTTP_PARSER_STRICT */\n\n, {.name=\"tab in URL\"\n  ,.url=\"/foo\\tbar/\"\n  ,.u=\n    {.field_set=(1 << UF_PATH)\n    ,.field_data=\n      {{  0,  0 } /* UF_SCHEMA */\n      ,{  0,  0 } /* UF_HOST */\n      ,{  0,  0 } /* UF_PORT */\n      ,{  0,  9 } /* UF_PATH */\n      ,{  0,  0 } /* UF_QUERY */\n      ,{  0,  0 } /* UF_FRAGMENT */\n      ,{  0,  0 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n\n, {.name=\"form feed in URL\"\n  ,.url=\"/foo\\fbar/\"\n  ,.u=\n    {.field_set=(1 << UF_PATH)\n    ,.field_data=\n      {{  0,  0 } /* UF_SCHEMA */\n      ,{  0,  0 } /* UF_HOST */\n      ,{  0,  0 } /* UF_PORT */\n      ,{  0,  9 } /* UF_PATH */\n      ,{  0,  0 } /* UF_QUERY */\n      ,{  0,  0 } /* UF_FRAGMENT */\n      ,{  0,  0 } /* UF_USERINFO */\n      }\n    }\n  ,.rv=0\n  }\n#endif\n};\n\nvoid\ndump_url (const char *url, const struct http_parser_url *u)\n{\n  unsigned int i;\n\n  printf(\"\\tfield_set: 0x%x, port: %u\\n\", u->field_set, u->port);\n  for (i = 0; i < UF_MAX; i++) {\n    if ((u->field_set & (1 << i)) == 0) {\n      printf(\"\\tfield_data[%u]: unset\\n\", i);\n      continue;\n    }\n\n    printf(\"\\tfield_data[%u]: off: %u len: %u part: \\\"%.*s\\n\\\"\",\n           i,\n           u->field_data[i].off,\n           u->field_data[i].len,\n           u->field_data[i].len,\n           url + u->field_data[i].off);\n  }\n}\n\nvoid\ntest_parse_url (void)\n{\n  struct http_parser_url u;\n  const struct url_test *test;\n  unsigned int i;\n  int rv;\n\n  for (i = 0; i < (sizeof(url_tests) / sizeof(url_tests[0])); i++) {\n    test = &url_tests[i];\n    memset(&u, 0, sizeof(u));\n\n    rv = http_parser_parse_url(test->url,\n                               strlen(test->url),\n                               test->is_connect,\n                               &u);\n\n    if (test->rv == 0) {\n      if (rv != 0) {\n        printf(\"\\n*** http_parser_parse_url(\\\"%s\\\") \\\"%s\\\" test failed, \"\n               \"unexpected rv %d ***\\n\\n\", test->url, test->name, rv);\n        abort();\n      }\n\n      if (memcmp(&u, &test->u, sizeof(u)) != 0) {\n        printf(\"\\n*** http_parser_parse_url(\\\"%s\\\") \\\"%s\\\" failed ***\\n\",\n               test->url, test->name);\n\n        printf(\"target http_parser_url:\\n\");\n        dump_url(test->url, &test->u);\n        printf(\"result http_parser_url:\\n\");\n        dump_url(test->url, &u);\n\n        abort();\n      }\n    } else {\n      /* test->rv != 0 */\n      if (rv == 0) {\n        printf(\"\\n*** http_parser_parse_url(\\\"%s\\\") \\\"%s\\\" test failed, \"\n               \"unexpected rv %d ***\\n\\n\", test->url, test->name, rv);\n        abort();\n      }\n    }\n  }\n}\n\nvoid\ntest_method_str (void)\n{\n  assert(0 == strcmp(\"GET\", http_method_str(HTTP_GET)));\n  assert(0 == strcmp(\"<unknown>\", http_method_str(1337)));\n}\n\nvoid\ntest_message (const struct message *message)\n{\n  size_t raw_len = strlen(message->raw);\n  size_t msg1len;\n  for (msg1len = 0; msg1len < raw_len; msg1len++) {\n    parser_init(message->type);\n\n    size_t read;\n    const char *msg1 = message->raw;\n    const char *msg2 = msg1 + msg1len;\n    size_t msg2len = raw_len - msg1len;\n\n    if (msg1len) {\n      read = parse(msg1, msg1len);\n\n      if (message->upgrade && parser->upgrade) {\n        messages[num_messages - 1].upgrade = msg1 + read;\n        goto test;\n      }\n\n      if (read != msg1len) {\n        print_error(msg1, read);\n        abort();\n      }\n    }\n\n\n    read = parse(msg2, msg2len);\n\n    if (message->upgrade && parser->upgrade) {\n      messages[num_messages - 1].upgrade = msg2 + read;\n      goto test;\n    }\n\n    if (read != msg2len) {\n      print_error(msg2, read);\n      abort();\n    }\n\n    read = parse(NULL, 0);\n\n    if (read != 0) {\n      print_error(message->raw, read);\n      abort();\n    }\n\n  test:\n\n    if (num_messages != 1) {\n      printf(\"\\n*** num_messages != 1 after testing '%s' ***\\n\\n\", message->name);\n      abort();\n    }\n\n    if(!message_eq(0, message)) abort();\n\n    parser_free();\n  }\n}\n\nvoid\ntest_message_count_body (const struct message *message)\n{\n  parser_init(message->type);\n\n  size_t read;\n  size_t l = strlen(message->raw);\n  size_t i, toread;\n  size_t chunk = 4024;\n\n  for (i = 0; i < l; i+= chunk) {\n    toread = MIN(l-i, chunk);\n    read = parse_count_body(message->raw + i, toread);\n    if (read != toread) {\n      print_error(message->raw, read);\n      abort();\n    }\n  }\n\n\n  read = parse_count_body(NULL, 0);\n  if (read != 0) {\n    print_error(message->raw, read);\n    abort();\n  }\n\n  if (num_messages != 1) {\n    printf(\"\\n*** num_messages != 1 after testing '%s' ***\\n\\n\", message->name);\n    abort();\n  }\n\n  if(!message_eq(0, message)) abort();\n\n  parser_free();\n}\n\nvoid\ntest_simple (const char *buf, enum http_errno err_expected)\n{\n  parser_init(HTTP_REQUEST);\n\n  size_t parsed;\n  int pass;\n  enum http_errno err;\n\n  parsed = parse(buf, strlen(buf));\n  pass = (parsed == strlen(buf));\n  err = HTTP_PARSER_ERRNO(parser);\n  parsed = parse(NULL, 0);\n  pass &= (parsed == 0);\n\n  parser_free();\n\n  /* In strict mode, allow us to pass with an unexpected HPE_STRICT as\n   * long as the caller isn't expecting success.\n   */\n#if HTTP_PARSER_STRICT\n  if (err_expected != err && err_expected != HPE_OK && err != HPE_STRICT) {\n#else\n  if (err_expected != err) {\n#endif\n    fprintf(stderr, \"\\n*** test_simple expected %s, but saw %s ***\\n\\n%s\\n\",\n        http_errno_name(err_expected), http_errno_name(err), buf);\n    abort();\n  }\n}\n\nvoid\ntest_header_overflow_error (int req)\n{\n  http_parser parser;\n  http_parser_init(&parser, req ? HTTP_REQUEST : HTTP_RESPONSE);\n  size_t parsed;\n  const char *buf;\n  buf = req ? \"GET / HTTP/1.1\\r\\n\" : \"HTTP/1.0 200 OK\\r\\n\";\n  parsed = http_parser_execute(&parser, &settings_null, buf, strlen(buf));\n  assert(parsed == strlen(buf));\n\n  buf = \"header-key: header-value\\r\\n\";\n  size_t buflen = strlen(buf);\n\n  int i;\n  for (i = 0; i < 10000; i++) {\n    parsed = http_parser_execute(&parser, &settings_null, buf, buflen);\n    if (parsed != buflen) {\n      //fprintf(stderr, \"error found on iter %d\\n\", i);\n      assert(HTTP_PARSER_ERRNO(&parser) == HPE_HEADER_OVERFLOW);\n      return;\n    }\n  }\n\n  fprintf(stderr, \"\\n*** Error expected but none in header overflow test ***\\n\");\n  abort();\n}\n\nstatic void\ntest_content_length_overflow (const char *buf, size_t buflen, int expect_ok)\n{\n  http_parser parser;\n  http_parser_init(&parser, HTTP_RESPONSE);\n  http_parser_execute(&parser, &settings_null, buf, buflen);\n\n  if (expect_ok)\n    assert(HTTP_PARSER_ERRNO(&parser) == HPE_OK);\n  else\n    assert(HTTP_PARSER_ERRNO(&parser) == HPE_INVALID_CONTENT_LENGTH);\n}\n\nvoid\ntest_header_content_length_overflow_error (void)\n{\n#define X(size)                                                               \\\n  \"HTTP/1.1 200 OK\\r\\n\"                                                       \\\n  \"Content-Length: \" #size \"\\r\\n\"                                             \\\n  \"\\r\\n\"\n  const char a[] = X(18446744073709551614); /* 2^64-2 */\n  const char b[] = X(18446744073709551615); /* 2^64-1 */\n  const char c[] = X(18446744073709551616); /* 2^64   */\n#undef X\n  test_content_length_overflow(a, sizeof(a) - 1, 1); /* expect ok      */\n  test_content_length_overflow(b, sizeof(b) - 1, 0); /* expect failure */\n  test_content_length_overflow(c, sizeof(c) - 1, 0); /* expect failure */\n}\n\nvoid\ntest_chunk_content_length_overflow_error (void)\n{\n#define X(size)                                                               \\\n    \"HTTP/1.1 200 OK\\r\\n\"                                                     \\\n    \"Transfer-Encoding: chunked\\r\\n\"                                          \\\n    \"\\r\\n\"                                                                    \\\n    #size \"\\r\\n\"                                                              \\\n    \"...\"\n  const char a[] = X(FFFFFFFFFFFFFFFE);  /* 2^64-2 */\n  const char b[] = X(FFFFFFFFFFFFFFFF);  /* 2^64-1 */\n  const char c[] = X(10000000000000000); /* 2^64   */\n#undef X\n  test_content_length_overflow(a, sizeof(a) - 1, 1); /* expect ok      */\n  test_content_length_overflow(b, sizeof(b) - 1, 0); /* expect failure */\n  test_content_length_overflow(c, sizeof(c) - 1, 0); /* expect failure */\n}\n\nvoid\ntest_no_overflow_long_body (int req, size_t length)\n{\n  http_parser parser;\n  http_parser_init(&parser, req ? HTTP_REQUEST : HTTP_RESPONSE);\n  size_t parsed;\n  size_t i;\n  char buf1[3000];\n  size_t buf1len = sprintf(buf1, \"%s\\r\\nConnection: Keep-Alive\\r\\nContent-Length: %lu\\r\\n\\r\\n\",\n      req ? \"POST / HTTP/1.0\" : \"HTTP/1.0 200 OK\", (unsigned long)length);\n  parsed = http_parser_execute(&parser, &settings_null, buf1, buf1len);\n  if (parsed != buf1len)\n    goto err;\n\n  for (i = 0; i < length; i++) {\n    char foo = 'a';\n    parsed = http_parser_execute(&parser, &settings_null, &foo, 1);\n    if (parsed != 1)\n      goto err;\n  }\n\n  parsed = http_parser_execute(&parser, &settings_null, buf1, buf1len);\n  if (parsed != buf1len) goto err;\n  return;\n\n err:\n  fprintf(stderr,\n          \"\\n*** error in test_no_overflow_long_body %s of length %lu ***\\n\",\n          req ? \"REQUEST\" : \"RESPONSE\",\n          (unsigned long)length);\n  abort();\n}\n\nvoid\ntest_multiple3 (const struct message *r1, const struct message *r2, const struct message *r3)\n{\n  int message_count = count_parsed_messages(3, r1, r2, r3);\n\n  char total[ strlen(r1->raw)\n            + strlen(r2->raw)\n            + strlen(r3->raw)\n            + 1\n            ];\n  total[0] = '\\0';\n\n  strcat(total, r1->raw);\n  strcat(total, r2->raw);\n  strcat(total, r3->raw);\n\n  parser_init(r1->type);\n\n  size_t read;\n\n  read = parse(total, strlen(total));\n\n  if (parser->upgrade) {\n    upgrade_message_fix(total, read, 3, r1, r2, r3);\n    goto test;\n  }\n\n  if (read != strlen(total)) {\n    print_error(total, read);\n    abort();\n  }\n\n  read = parse(NULL, 0);\n\n  if (read != 0) {\n    print_error(total, read);\n    abort();\n  }\n\ntest:\n\n  if (message_count != num_messages) {\n    fprintf(stderr, \"\\n\\n*** Parser didn't see 3 messages only %d *** \\n\", num_messages);\n    abort();\n  }\n\n  if (!message_eq(0, r1)) abort();\n  if (message_count > 1 && !message_eq(1, r2)) abort();\n  if (message_count > 2 && !message_eq(2, r3)) abort();\n\n  parser_free();\n}\n\n/* SCAN through every possible breaking to make sure the\n * parser can handle getting the content in any chunks that\n * might come from the socket\n */\nvoid\ntest_scan (const struct message *r1, const struct message *r2, const struct message *r3)\n{\n  char total[80*1024] = \"\\0\";\n  char buf1[80*1024] = \"\\0\";\n  char buf2[80*1024] = \"\\0\";\n  char buf3[80*1024] = \"\\0\";\n\n  strcat(total, r1->raw);\n  strcat(total, r2->raw);\n  strcat(total, r3->raw);\n\n  size_t read;\n\n  int total_len = strlen(total);\n\n  int total_ops = 2 * (total_len - 1) * (total_len - 2) / 2;\n  int ops = 0 ;\n\n  size_t buf1_len, buf2_len, buf3_len;\n  int message_count = count_parsed_messages(3, r1, r2, r3);\n\n  int i,j,type_both;\n  for (type_both = 0; type_both < 2; type_both ++ ) {\n    for (j = 2; j < total_len; j ++ ) {\n      for (i = 1; i < j; i ++ ) {\n\n        if (ops % 1000 == 0)  {\n          printf(\"\\b\\b\\b\\b%3.0f%%\", 100 * (float)ops /(float)total_ops);\n          fflush(stdout);\n        }\n        ops += 1;\n\n        parser_init(type_both ? HTTP_BOTH : r1->type);\n\n        buf1_len = i;\n        strlncpy(buf1, sizeof(buf1), total, buf1_len);\n        buf1[buf1_len] = 0;\n\n        buf2_len = j - i;\n        strlncpy(buf2, sizeof(buf1), total+i, buf2_len);\n        buf2[buf2_len] = 0;\n\n        buf3_len = total_len - j;\n        strlncpy(buf3, sizeof(buf1), total+j, buf3_len);\n        buf3[buf3_len] = 0;\n\n        read = parse(buf1, buf1_len);\n\n        if (parser->upgrade) goto test;\n\n        if (read != buf1_len) {\n          print_error(buf1, read);\n          goto error;\n        }\n\n        read += parse(buf2, buf2_len);\n\n        if (parser->upgrade) goto test;\n\n        if (read != buf1_len + buf2_len) {\n          print_error(buf2, read);\n          goto error;\n        }\n\n        read += parse(buf3, buf3_len);\n\n        if (parser->upgrade) goto test;\n\n        if (read != buf1_len + buf2_len + buf3_len) {\n          print_error(buf3, read);\n          goto error;\n        }\n\n        parse(NULL, 0);\n\ntest:\n        if (parser->upgrade) {\n          upgrade_message_fix(total, read, 3, r1, r2, r3);\n        }\n\n        if (message_count != num_messages) {\n          fprintf(stderr, \"\\n\\nParser didn't see %d messages only %d\\n\",\n            message_count, num_messages);\n          goto error;\n        }\n\n        if (!message_eq(0, r1)) {\n          fprintf(stderr, \"\\n\\nError matching messages[0] in test_scan.\\n\");\n          goto error;\n        }\n\n        if (message_count > 1 && !message_eq(1, r2)) {\n          fprintf(stderr, \"\\n\\nError matching messages[1] in test_scan.\\n\");\n          goto error;\n        }\n\n        if (message_count > 2 && !message_eq(2, r3)) {\n          fprintf(stderr, \"\\n\\nError matching messages[2] in test_scan.\\n\");\n          goto error;\n        }\n\n        parser_free();\n      }\n    }\n  }\n  puts(\"\\b\\b\\b\\b100%\");\n  return;\n\n error:\n  fprintf(stderr, \"i=%d  j=%d\\n\", i, j);\n  fprintf(stderr, \"buf1 (%u) %s\\n\\n\", (unsigned int)buf1_len, buf1);\n  fprintf(stderr, \"buf2 (%u) %s\\n\\n\", (unsigned int)buf2_len , buf2);\n  fprintf(stderr, \"buf3 (%u) %s\\n\", (unsigned int)buf3_len, buf3);\n  abort();\n}\n\n// user required to free the result\n// string terminated by \\0\nchar *\ncreate_large_chunked_message (int body_size_in_kb, const char* headers)\n{\n  int i;\n  size_t wrote = 0;\n  size_t headers_len = strlen(headers);\n  size_t bufsize = headers_len + (5+1024+2)*body_size_in_kb + 6;\n  char * buf = malloc(bufsize);\n\n  memcpy(buf, headers, headers_len);\n  wrote += headers_len;\n\n  for (i = 0; i < body_size_in_kb; i++) {\n    // write 1kb chunk into the body.\n    memcpy(buf + wrote, \"400\\r\\n\", 5);\n    wrote += 5;\n    memset(buf + wrote, 'C', 1024);\n    wrote += 1024;\n    strcpy(buf + wrote, \"\\r\\n\");\n    wrote += 2;\n  }\n\n  memcpy(buf + wrote, \"0\\r\\n\\r\\n\", 6);\n  wrote += 6;\n  assert(wrote == bufsize);\n\n  return buf;\n}\n\nvoid\ntest_status_complete (void)\n{\n  parser_init(HTTP_RESPONSE);\n  parser->data = 0;\n  http_parser_settings settings = settings_null;\n  settings.on_status_complete = status_complete_cb;\n\n  char *response = \"don't mind me, just a simple response\";\n  http_parser_execute(parser, &settings, response, strlen(response));\n  assert(parser->data == (void*)0); // the status_complete callback was never called\n  assert(parser->http_errno == HPE_INVALID_CONSTANT); // the errno for an invalid status line\n}\n\n/* Verify that we can pause parsing at any of the bytes in the\n * message and still get the result that we're expecting. */\nvoid\ntest_message_pause (const struct message *msg)\n{\n  char *buf = (char*) msg->raw;\n  size_t buflen = strlen(msg->raw);\n  size_t nread;\n\n  parser_init(msg->type);\n\n  do {\n    nread = parse_pause(buf, buflen);\n\n    // We can only set the upgrade buffer once we've gotten our message\n    // completion callback.\n    if (messages[0].message_complete_cb_called &&\n        msg->upgrade &&\n        parser->upgrade) {\n      messages[0].upgrade = buf + nread;\n      goto test;\n    }\n\n    if (nread < buflen) {\n\n      // Not much do to if we failed a strict-mode check\n      if (HTTP_PARSER_ERRNO(parser) == HPE_STRICT) {\n        parser_free();\n        return;\n      }\n\n      assert (HTTP_PARSER_ERRNO(parser) == HPE_PAUSED);\n    }\n\n    buf += nread;\n    buflen -= nread;\n    http_parser_pause(parser, 0);\n  } while (buflen > 0);\n\n  nread = parse_pause(NULL, 0);\n  assert (nread == 0);\n\ntest:\n  if (num_messages != 1) {\n    printf(\"\\n*** num_messages != 1 after testing '%s' ***\\n\\n\", msg->name);\n    abort();\n  }\n\n  if(!message_eq(0, msg)) abort();\n\n  parser_free();\n}\n\nint\nmain (void)\n{\n  parser = NULL;\n  int i, j, k;\n  int request_count;\n  int response_count;\n\n  printf(\"sizeof(http_parser) = %u\\n\", (unsigned int)sizeof(http_parser));\n\n  for (request_count = 0; requests[request_count].name; request_count++);\n  for (response_count = 0; responses[response_count].name; response_count++);\n\n  //// API\n  test_preserve_data();\n  test_parse_url();\n  test_method_str();\n\n  //// OVERFLOW CONDITIONS\n\n  test_header_overflow_error(HTTP_REQUEST);\n  test_no_overflow_long_body(HTTP_REQUEST, 1000);\n  test_no_overflow_long_body(HTTP_REQUEST, 100000);\n\n  test_header_overflow_error(HTTP_RESPONSE);\n  test_no_overflow_long_body(HTTP_RESPONSE, 1000);\n  test_no_overflow_long_body(HTTP_RESPONSE, 100000);\n\n  test_header_content_length_overflow_error();\n  test_chunk_content_length_overflow_error();\n\n  //// RESPONSES\n\n  for (i = 0; i < response_count; i++) {\n    test_message(&responses[i]);\n  }\n\n  for (i = 0; i < response_count; i++) {\n    test_message_pause(&responses[i]);\n  }\n\n  for (i = 0; i < response_count; i++) {\n    if (!responses[i].should_keep_alive) continue;\n    for (j = 0; j < response_count; j++) {\n      if (!responses[j].should_keep_alive) continue;\n      for (k = 0; k < response_count; k++) {\n        test_multiple3(&responses[i], &responses[j], &responses[k]);\n      }\n    }\n  }\n\n  test_message_count_body(&responses[NO_HEADERS_NO_BODY_404]);\n  test_message_count_body(&responses[TRAILING_SPACE_ON_CHUNKED_BODY]);\n\n  // test very large chunked response\n  {\n    char * msg = create_large_chunked_message(31337,\n      \"HTTP/1.0 200 OK\\r\\n\"\n      \"Transfer-Encoding: chunked\\r\\n\"\n      \"Content-Type: text/plain\\r\\n\"\n      \"\\r\\n\");\n    struct message large_chunked =\n      {.name= \"large chunked\"\n      ,.type= HTTP_RESPONSE\n      ,.raw= msg\n      ,.should_keep_alive= FALSE\n      ,.message_complete_on_eof= FALSE\n      ,.http_major= 1\n      ,.http_minor= 0\n      ,.status_code= 200\n      ,.num_headers= 2\n      ,.headers=\n        { { \"Transfer-Encoding\", \"chunked\" }\n        , { \"Content-Type\", \"text/plain\" }\n        }\n      ,.body_size= 31337*1024\n      };\n    test_message_count_body(&large_chunked);\n    free(msg);\n  }\n\n\n\n  printf(\"response scan 1/2      \");\n  test_scan( &responses[TRAILING_SPACE_ON_CHUNKED_BODY]\n           , &responses[NO_BODY_HTTP10_KA_204]\n           , &responses[NO_REASON_PHRASE]\n           );\n\n  printf(\"response scan 2/2      \");\n  test_scan( &responses[BONJOUR_MADAME_FR]\n           , &responses[UNDERSTORE_HEADER_KEY]\n           , &responses[NO_CARRIAGE_RET]\n           );\n\n  puts(\"responses okay\");\n\n\n  /// REQUESTS\n\n  test_simple(\"hello world\", HPE_INVALID_METHOD);\n  test_simple(\"GET / HTP/1.1\\r\\n\\r\\n\", HPE_INVALID_VERSION);\n\n\n  test_simple(\"ASDF / HTTP/1.1\\r\\n\\r\\n\", HPE_INVALID_METHOD);\n  test_simple(\"PROPPATCHA / HTTP/1.1\\r\\n\\r\\n\", HPE_INVALID_METHOD);\n  test_simple(\"GETA / HTTP/1.1\\r\\n\\r\\n\", HPE_INVALID_METHOD);\n\n  // Well-formed but incomplete\n  test_simple(\"GET / HTTP/1.1\\r\\n\"\n              \"Content-Type: text/plain\\r\\n\"\n              \"Content-Length: 6\\r\\n\"\n              \"\\r\\n\"\n              \"fooba\",\n              HPE_OK);\n\n  static const char *all_methods[] = {\n    \"DELETE\",\n    \"GET\",\n    \"HEAD\",\n    \"POST\",\n    \"PUT\",\n    //\"CONNECT\", //CONNECT can't be tested like other methods, it's a tunnel\n    \"OPTIONS\",\n    \"TRACE\",\n    \"COPY\",\n    \"LOCK\",\n    \"MKCOL\",\n    \"MOVE\",\n    \"PROPFIND\",\n    \"PROPPATCH\",\n    \"UNLOCK\",\n    \"REPORT\",\n    \"MKACTIVITY\",\n    \"CHECKOUT\",\n    \"MERGE\",\n    \"M-SEARCH\",\n    \"NOTIFY\",\n    \"SUBSCRIBE\",\n    \"UNSUBSCRIBE\",\n    \"PATCH\",\n    0 };\n  const char **this_method;\n  for (this_method = all_methods; *this_method; this_method++) {\n    char buf[200];\n    sprintf(buf, \"%s / HTTP/1.1\\r\\n\\r\\n\", *this_method);\n    test_simple(buf, HPE_OK);\n  }\n\n  static const char *bad_methods[] = {\n      \"C******\",\n      \"M****\",\n      0 };\n  for (this_method = bad_methods; *this_method; this_method++) {\n    char buf[200];\n    sprintf(buf, \"%s / HTTP/1.1\\r\\n\\r\\n\", *this_method);\n    test_simple(buf, HPE_UNKNOWN);\n  }\n\n  const char *dumbfuck2 =\n    \"GET / HTTP/1.1\\r\\n\"\n    \"X-SSL-Bullshit:   -----BEGIN CERTIFICATE-----\\r\\n\"\n    \"\\tMIIFbTCCBFWgAwIBAgICH4cwDQYJKoZIhvcNAQEFBQAwcDELMAkGA1UEBhMCVUsx\\r\\n\"\n    \"\\tETAPBgNVBAoTCGVTY2llbmNlMRIwEAYDVQQLEwlBdXRob3JpdHkxCzAJBgNVBAMT\\r\\n\"\n    \"\\tAkNBMS0wKwYJKoZIhvcNAQkBFh5jYS1vcGVyYXRvckBncmlkLXN1cHBvcnQuYWMu\\r\\n\"\n    \"\\tdWswHhcNMDYwNzI3MTQxMzI4WhcNMDcwNzI3MTQxMzI4WjBbMQswCQYDVQQGEwJV\\r\\n\"\n    \"\\tSzERMA8GA1UEChMIZVNjaWVuY2UxEzARBgNVBAsTCk1hbmNoZXN0ZXIxCzAJBgNV\\r\\n\"\n    \"\\tBAcTmrsogriqMWLAk1DMRcwFQYDVQQDEw5taWNoYWVsIHBhcmQYJKoZIhvcNAQEB\\r\\n\"\n    \"\\tBQADggEPADCCAQoCggEBANPEQBgl1IaKdSS1TbhF3hEXSl72G9J+WC/1R64fAcEF\\r\\n\"\n    \"\\tW51rEyFYiIeZGx/BVzwXbeBoNUK41OK65sxGuflMo5gLflbwJtHBRIEKAfVVp3YR\\r\\n\"\n    \"\\tgW7cMA/s/XKgL1GEC7rQw8lIZT8RApukCGqOVHSi/F1SiFlPDxuDfmdiNzL31+sL\\r\\n\"\n    \"\\t0iwHDdNkGjy5pyBSB8Y79dsSJtCW/iaLB0/n8Sj7HgvvZJ7x0fr+RQjYOUUfrePP\\r\\n\"\n    \"\\tu2MSpFyf+9BbC/aXgaZuiCvSR+8Snv3xApQY+fULK/xY8h8Ua51iXoQ5jrgu2SqR\\r\\n\"\n    \"\\twgA7BUi3G8LFzMBl8FRCDYGUDy7M6QaHXx1ZWIPWNKsCAwEAAaOCAiQwggIgMAwG\\r\\n\"\n    \"\\tA1UdEwEB/wQCMAAwEQYJYIZIAYb4QgHTTPAQDAgWgMA4GA1UdDwEB/wQEAwID6DAs\\r\\n\"\n    \"\\tBglghkgBhvhCAQ0EHxYdVUsgZS1TY2llbmNlIFVzZXIgQ2VydGlmaWNhdGUwHQYD\\r\\n\"\n    \"\\tVR0OBBYEFDTt/sf9PeMaZDHkUIldrDYMNTBZMIGaBgNVHSMEgZIwgY+AFAI4qxGj\\r\\n\"\n    \"\\tloCLDdMVKwiljjDastqooXSkcjBwMQswCQYDVQQGEwJVSzERMA8GA1UEChMIZVNj\\r\\n\"\n    \"\\taWVuY2UxEjAQBgNVBAsTCUF1dGhvcml0eTELMAkGA1UEAxMCQ0ExLTArBgkqhkiG\\r\\n\"\n    \"\\t9w0BCQEWHmNhLW9wZXJhdG9yQGdyaWQtc3VwcG9ydC5hYy51a4IBADApBgNVHRIE\\r\\n\"\n    \"\\tIjAggR5jYS1vcGVyYXRvckBncmlkLXN1cHBvcnQuYWMudWswGQYDVR0gBBIwEDAO\\r\\n\"\n    \"\\tBgwrBgEEAdkvAQEBAQYwPQYJYIZIAYb4QgEEBDAWLmh0dHA6Ly9jYS5ncmlkLXN1\\r\\n\"\n    \"\\tcHBvcnQuYWMudmT4sopwqlBWsvcHViL2NybC9jYWNybC5jcmwwPQYJYIZIAYb4QgEDBDAWLmh0\\r\\n\"\n    \"\\tdHA6Ly9jYS5ncmlkLXN1cHBvcnQuYWMudWsvcHViL2NybC9jYWNybC5jcmwwPwYD\\r\\n\"\n    \"\\tVR0fBDgwNjA0oDKgMIYuaHR0cDovL2NhLmdyaWQt5hYy51ay9wdWIv\\r\\n\"\n    \"\\tY3JsL2NhY3JsLmNybDANBgkqhkiG9w0BAQUFAAOCAQEAS/U4iiooBENGW/Hwmmd3\\r\\n\"\n    \"\\tXCy6Zrt08YjKCzGNjorT98g8uGsqYjSxv/hmi0qlnlHs+k/3Iobc3LjS5AMYr5L8\\r\\n\"\n    \"\\tUO7OSkgFFlLHQyC9JzPfmLCAugvzEbyv4Olnsr8hbxF1MbKZoQxUZtMVu29wjfXk\\r\\n\"\n    \"\\thTeApBv7eaKCWpSp7MCbvgzm74izKhu3vlDk9w6qVrxePfGgpKPqfHiOoGhFnbTK\\r\\n\"\n    \"\\twTC6o2xq5y0qZ03JonF7OJspEd3I5zKY3E+ov7/ZhW6DqT8UFvsAdjvQbXyhV8Eu\\r\\n\"\n    \"\\tYhixw1aKEPzNjNowuIseVogKOLXxWI5vAi5HgXdS0/ES5gDGsABo4fqovUKlgop3\\r\\n\"\n    \"\\tRA==\\r\\n\"\n    \"\\t-----END CERTIFICATE-----\\r\\n\"\n    \"\\r\\n\";\n  test_simple(dumbfuck2, HPE_OK);\n\n#if 0\n  // NOTE(Wed Nov 18 11:57:27 CET 2009) this seems okay. we just read body\n  // until EOF.\n  //\n  // no content-length\n  // error if there is a body without content length\n  const char *bad_get_no_headers_no_body = \"GET /bad_get_no_headers_no_body/world HTTP/1.1\\r\\n\"\n                                           \"Accept: */*\\r\\n\"\n                                           \"\\r\\n\"\n                                           \"HELLO\";\n  test_simple(bad_get_no_headers_no_body, 0);\n#endif\n  /* TODO sending junk and large headers gets rejected */\n\n\n  /* check to make sure our predefined requests are okay */\n  for (i = 0; requests[i].name; i++) {\n    test_message(&requests[i]);\n  }\n\n  for (i = 0; i < request_count; i++) {\n    test_message_pause(&requests[i]);\n  }\n\n  for (i = 0; i < request_count; i++) {\n    if (!requests[i].should_keep_alive) continue;\n    for (j = 0; j < request_count; j++) {\n      if (!requests[j].should_keep_alive) continue;\n      for (k = 0; k < request_count; k++) {\n        test_multiple3(&requests[i], &requests[j], &requests[k]);\n      }\n    }\n  }\n\n  printf(\"request scan 1/4      \");\n  test_scan( &requests[GET_NO_HEADERS_NO_BODY]\n           , &requests[GET_ONE_HEADER_NO_BODY]\n           , &requests[GET_NO_HEADERS_NO_BODY]\n           );\n\n  printf(\"request scan 2/4      \");\n  test_scan( &requests[POST_CHUNKED_ALL_YOUR_BASE]\n           , &requests[POST_IDENTITY_BODY_WORLD]\n           , &requests[GET_FUNKY_CONTENT_LENGTH]\n           );\n\n  printf(\"request scan 3/4      \");\n  test_scan( &requests[TWO_CHUNKS_MULT_ZERO_END]\n           , &requests[CHUNKED_W_TRAILING_HEADERS]\n           , &requests[CHUNKED_W_BULLSHIT_AFTER_LENGTH]\n           );\n\n  printf(\"request scan 4/4      \");\n  test_scan( &requests[QUERY_URL_WITH_QUESTION_MARK_GET]\n           , &requests[PREFIX_NEWLINE_GET ]\n           , &requests[CONNECT_REQUEST]\n           );\n\n  test_status_complete();\n\n  puts(\"requests okay\");\n\n  return 0;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/json/json.pri",
    "content": "INCLUDEPATH += $${PWD}\n\nQJSON_INSTALL_HEADERS += \\\n    $${PWD}/qjson_export.h\n\nPRIVATE_HEADERS += \\\n    $${PWD}/qjson_p.h \\\n    $${PWD}/qjsonwriter_p.h \\\n    $${PWD}/qjsonparser_p.h \\\n    $${PWD}/qjsondocument.h \\\n    $${PWD}/qjsonobject.h \\\n    $${PWD}/qjsonvalue.h \\\n    $${PWD}/qjsonarray.h\n\nSOURCES += \\\n    $${PWD}/qjson.cpp \\\n    $${PWD}/qjsondocument.cpp \\\n    $${PWD}/qjsonobject.cpp \\\n    $${PWD}/qjsonarray.cpp \\\n    $${PWD}/qjsonvalue.cpp \\\n    $${PWD}/qjsonwriter.cpp \\\n    $${PWD}/qjsonparser.cpp\n\n\njson.files = \\\n    $${PWD}/qjsondocument.h \\\n    $${PWD}/qjsonobject.h \\\n    $${PWD}/qjsonvalue.h \\\n    $${PWD}/qjsonarray.h\n\njson.path = $${PREFIX}/include/qjsonrpc/json\nINSTALLS += json\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/json/qjson.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the QtCore module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL21$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia. For licensing terms and\n** conditions see http://qt.digia.com/licensing. For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 or version 3 as published by the Free\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\n** LICENSE.LGPLv3 included in the packaging of this file. Please review the\n** following information to ensure the GNU Lesser General Public License\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights. These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#include \"qjson_p.h\"\n#include <qalgorithms.h>\n\nQT_BEGIN_NAMESPACE\n\nnamespace QJsonPrivate\n{\n\n#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN\n#define Q_TO_LITTLE_ENDIAN(x) (x)\n#else\n#define Q_TO_LITTLE_ENDIAN(x) ( ((x & 0xff) << 24) | ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | ((x & 0xff000000) >> 24) )\n#endif\n\nstatic const Base emptyArray = { { Q_TO_LITTLE_ENDIAN(sizeof(Base)) }, { 0 }, { 0 } };\nstatic const Base emptyObject = { { Q_TO_LITTLE_ENDIAN(sizeof(Base)) }, { 0 }, { 0 } };\n\n\nvoid Data::compact()\n{\n    Q_ASSERT(sizeof(Value) == sizeof(offset));\n\n    if (!compactionCounter)\n        return;\n\n    Base *base = header->root();\n    int reserve = 0;\n    if (base->is_object) {\n        Object *o = static_cast<Object *>(base);\n        for (int i = 0; i < (int)o->length; ++i)\n            reserve += o->entryAt(i)->usedStorage(o);\n    } else {\n        Array *a = static_cast<Array *>(base);\n        for (int i = 0; i < (int)a->length; ++i)\n            reserve += (*a)[i].usedStorage(a);\n    }\n\n    int size = sizeof(Base) + reserve + base->length*sizeof(offset);\n    int alloc = sizeof(Header) + size;\n    Header *h = (Header *) malloc(alloc);\n    h->tag = QJsonDocument::BinaryFormatTag;\n    h->version = 1;\n    Base *b = h->root();\n    b->size = size;\n    b->is_object = header->root()->is_object;\n    b->length = base->length;\n    b->tableOffset = reserve + sizeof(Array);\n\n    int offset = sizeof(Base);\n    if (b->is_object) {\n        Object *o = static_cast<Object *>(base);\n        Object *no = static_cast<Object *>(b);\n\n        for (int i = 0; i < (int)o->length; ++i) {\n            no->table()[i] = offset;\n\n            const Entry *e = o->entryAt(i);\n            Entry *ne = no->entryAt(i);\n            int s = e->size();\n            memcpy(ne, e, s);\n            offset += s;\n            int dataSize = e->value.usedStorage(o);\n            if (dataSize) {\n                memcpy((char *)no + offset, e->value.data(o), dataSize);\n                ne->value.value = offset;\n                offset += dataSize;\n            }\n        }\n    } else {\n        Array *a = static_cast<Array *>(base);\n        Array *na = static_cast<Array *>(b);\n\n        for (int i = 0; i < (int)a->length; ++i) {\n            const Value &v = (*a)[i];\n            Value &nv = (*na)[i];\n            nv = v;\n            int dataSize = v.usedStorage(a);\n            if (dataSize) {\n                memcpy((char *)na + offset, v.data(a), dataSize);\n                nv.value = offset;\n                offset += dataSize;\n            }\n        }\n    }\n    Q_ASSERT(offset == (int)b->tableOffset);\n\n    free(header);\n    header = h;\n    this->alloc = alloc;\n    compactionCounter = 0;\n}\n\nbool Data::valid() const\n{\n    if (header->tag != QJsonDocument::BinaryFormatTag || header->version != 1u)\n        return false;\n\n    bool res = false;\n    if (header->root()->is_object)\n        res = static_cast<Object *>(header->root())->isValid();\n    else\n        res = static_cast<Array *>(header->root())->isValid();\n\n    return res;\n}\n\n\nint Base::reserveSpace(uint dataSize, int posInTable, uint numItems, bool replace)\n{\n    Q_ASSERT(posInTable >= 0 && posInTable <= (int)length);\n    if (size + dataSize >= Value::MaxSize) {\n        qWarning(\"QJson: Document too large to store in data structure %d %d %d\", (uint)size, dataSize, Value::MaxSize);\n        return 0;\n    }\n\n    offset off = tableOffset;\n    // move table to new position\n    if (replace) {\n        memmove((char *)(table()) + dataSize, table(), length*sizeof(offset));\n    } else {\n        memmove((char *)(table() + posInTable + numItems) + dataSize, table() + posInTable, (length - posInTable)*sizeof(offset));\n        memmove((char *)(table()) + dataSize, table(), posInTable*sizeof(offset));\n    }\n    tableOffset += dataSize;\n    for (int i = 0; i < (int)numItems; ++i)\n        table()[posInTable + i] = off;\n    size += dataSize;\n    if (!replace) {\n        length += numItems;\n        size += numItems * sizeof(offset);\n    }\n    return off;\n}\n\nvoid Base::removeItems(int pos, int numItems)\n{\n    Q_ASSERT(pos >= 0 && pos <= (int)length);\n    if (pos + numItems < (int)length)\n        memmove(table() + pos, table() + pos + numItems, (length - pos - numItems)*sizeof(offset));\n    length -= numItems;\n}\n\nint Object::indexOf(const QString &key, bool *exists)\n{\n    int min = 0;\n    int n = length;\n    while (n > 0) {\n        int half = n >> 1;\n        int middle = min + half;\n        if (*entryAt(middle) >= key) {\n            n = half;\n        } else {\n            min = middle + 1;\n            n -= half + 1;\n        }\n    }\n    if (min < (int)length && *entryAt(min) == key) {\n        *exists = true;\n        return min;\n    }\n    *exists = false;\n    return min;\n}\n\nbool Object::isValid() const\n{\n    if (tableOffset + length*sizeof(offset) > size)\n        return false;\n\n    for (uint i = 0; i < length; ++i) {\n        offset entryOffset = table()[i];\n        if (entryOffset + sizeof(Entry) >= tableOffset)\n            return false;\n        Entry *e = entryAt(i);\n        int s = e->size();\n        if (table()[i] + s > tableOffset)\n            return false;\n        if (!e->value.isValid(this))\n            return false;\n    }\n    return true;\n}\n\n\n\nbool Array::isValid() const\n{\n    if (tableOffset + length*sizeof(offset) > size)\n        return false;\n\n    for (uint i = 0; i < length; ++i) {\n        if (!at(i).isValid(this))\n            return false;\n    }\n    return true;\n}\n\n\nbool Entry::operator ==(const QString &key) const\n{\n    if (value.latinKey)\n        return (shallowLatin1Key() == key);\n    else\n        return (shallowKey() == key);\n}\n\nbool Entry::operator ==(const Entry &other) const\n{\n    if (value.latinKey) {\n        if (other.value.latinKey)\n            return shallowLatin1Key() == other.shallowLatin1Key();\n        return shallowLatin1Key() == other.shallowKey();\n    } else if (other.value.latinKey) {\n        return shallowKey() == other.shallowLatin1Key();\n    }\n    return shallowKey() == other.shallowKey();\n}\n\nbool Entry::operator >=(const Entry &other) const\n{\n    if (value.latinKey) {\n        if (other.value.latinKey)\n            return shallowLatin1Key() >= other.shallowLatin1Key();\n        return shallowLatin1Key() >= other.shallowKey();\n    } else if (other.value.latinKey) {\n        return shallowKey() >= other.shallowLatin1Key();\n    }\n    return shallowKey() >= other.shallowKey();\n}\n\n\nint Value::usedStorage(const Base *b) const\n{\n    int s = 0;\n    switch (type) {\n    case QJsonValue::Double:\n        if (latinOrIntValue)\n            break;\n        s = sizeof(double);\n        break;\n    case QJsonValue::String: {\n        char *d = data(b);\n        if (latinOrIntValue)\n            s = sizeof(ushort) + qFromLittleEndian(*(ushort *)d);\n        else\n            s = sizeof(int) + sizeof(ushort) * qFromLittleEndian(*(int *)d);\n        break;\n    }\n    case QJsonValue::Array:\n    case QJsonValue::Object:\n        s = base(b)->size;\n        break;\n    case QJsonValue::Null:\n    case QJsonValue::Bool:\n    default:\n        break;\n    }\n    return alignedSize(s);\n}\n\nbool Value::isValid(const Base *b) const\n{\n    int offset = 0;\n    switch (type) {\n    case QJsonValue::Double:\n        if (latinOrIntValue)\n            break;\n        // fall through\n    case QJsonValue::String:\n    case QJsonValue::Array:\n    case QJsonValue::Object:\n        offset = value;\n        break;\n    case QJsonValue::Null:\n    case QJsonValue::Bool:\n    default:\n        break;\n    }\n\n    if (!offset)\n        return true;\n    if (offset + sizeof(uint) > b->tableOffset)\n        return false;\n\n    int s = usedStorage(b);\n    if (!s)\n        return true;\n    if (s < 0 || offset + s > (int)b->tableOffset)\n        return false;\n    if (type == QJsonValue::Array)\n        return static_cast<Array *>(base(b))->isValid();\n    if (type == QJsonValue::Object)\n        return static_cast<Object *>(base(b))->isValid();\n    return true;\n}\n\n/*!\n    \\internal\n */\nint Value::requiredStorage(QJsonValue &v, bool *compressed)\n{\n    *compressed = false;\n    switch (v.t) {\n    case QJsonValue::Double:\n        if (QJsonPrivate::compressedNumber(v.dbl) != INT_MAX) {\n            *compressed = true;\n            return 0;\n        }\n        return sizeof(double);\n    case QJsonValue::String: {\n        QString s = v.toString();\n        *compressed = QJsonPrivate::useCompressed(s);\n        return QJsonPrivate::qStringSize(s, *compressed);\n    }\n    case QJsonValue::Array:\n    case QJsonValue::Object:\n        if (v.d && v.d->compactionCounter) {\n            v.detach();\n            v.d->compact();\n            v.base = static_cast<QJsonPrivate::Base *>(v.d->header->root());\n        }\n        return v.base ? v.base->size : sizeof(QJsonPrivate::Base);\n    case QJsonValue::Undefined:\n    case QJsonValue::Null:\n    case QJsonValue::Bool:\n        break;\n    }\n    return 0;\n}\n\n/*!\n    \\internal\n */\nuint Value::valueToStore(const QJsonValue &v, uint offset)\n{\n    switch (v.t) {\n    case QJsonValue::Undefined:\n    case QJsonValue::Null:\n        break;\n    case QJsonValue::Bool:\n        return v.b;\n    case QJsonValue::Double: {\n        int c = QJsonPrivate::compressedNumber(v.dbl);\n        if (c != INT_MAX)\n            return c;\n    }\n        // fall through\n    case QJsonValue::String:\n    case QJsonValue::Array:\n    case QJsonValue::Object:\n        return offset;\n    }\n    return 0;\n}\n\n/*!\n    \\internal\n */\nvoid Value::copyData(const QJsonValue &v, char *dest, bool compressed)\n{\n    switch (v.t) {\n    case QJsonValue::Double:\n        if (!compressed) {\n            qToLittleEndian(v.ui, (uchar *)dest);\n        }\n        break;\n    case QJsonValue::String: {\n        QString str = v.toString();\n        QJsonPrivate::copyString(dest, str, compressed);\n        break;\n    }\n    case QJsonValue::Array:\n    case QJsonValue::Object: {\n        const QJsonPrivate::Base *b = v.base;\n        if (!b)\n            b = (v.t == QJsonValue::Array ? &emptyArray : &emptyObject);\n        memcpy(dest, b, b->size);\n        break;\n    }\n    default:\n        break;\n    }\n}\n\n} // namespace QJsonPrivate\n\nQT_END_NAMESPACE\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/json/qjson_export.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSON_EXPORT_H\n#define QJSON_EXPORT_H\n\n#ifdef QJSONRPC_SHARED\n#   ifdef QJSONRPC_BUILD\n#       define QJSON_EXPORT Q_DECL_EXPORT\n#   else\n#       define QJSON_EXPORT Q_DECL_IMPORT\n#   endif\n#else\n#   define QJSON_EXPORT\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/json/qjson_p.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the QtCore module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL21$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia. For licensing terms and\n** conditions see http://qt.digia.com/licensing. For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 or version 3 as published by the Free\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\n** LICENSE.LGPLv3 included in the packaging of this file. Please review the\n** following information to ensure the GNU Lesser General Public License\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights. These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#ifndef QJSON_P_H\n#define QJSON_P_H\n\n//\n//  W A R N I N G\n//  -------------\n//\n// This file is not part of the Qt API.  It exists purely as an\n// implementation detail.  This header file may change from version to\n// version without notice, or even be removed.\n//\n// We mean it.\n//\n\n#include \"qjsonobject.h\"\n#include \"qjsonvalue.h\"\n#include \"qjsondocument.h\"\n#include \"qjsonarray.h\"\n\n#include <qatomic.h>\n#include <qstring.h>\n#include <qendian.h>\n#include <qnumeric.h>\n\n#include <limits.h>\n#include <limits>\n\nQT_BEGIN_NAMESPACE\n\n/*\n  This defines a binary data structure for Json data. The data structure is optimised for fast reading\n  and minimum allocations. The whole data structure can be mmap'ed and used directly.\n\n  In most cases the binary structure is not as space efficient as a utf8 encoded text representation, but\n  much faster to access.\n\n  The size requirements are:\n\n  String:\n    Latin1 data: 2 bytes header + string.length()\n    Full Unicode: 4 bytes header + 2*(string.length())\n\n  Values: 4 bytes + size of data (size can be 0 for some data)\n    bool: 0 bytes\n    double: 8 bytes (0 if integer with less than 27bits)\n    string: see above\n    array: size of array\n    object: size of object\n  Array: 12 bytes + 4*length + size of Value data\n  Object: 12 bytes + 8*length + size of Key Strings + size of Value data\n\n  For an example such as\n\n    {                                           // object: 12 + 5*8                   = 52\n         \"firstName\": \"John\",                   // key 12, value 8                    = 20\n         \"lastName\" : \"Smith\",                  // key 12, value 8                    = 20\n         \"age\"      : 25,                       // key 8, value 0                     = 8\n         \"address\"  :                           // key 12, object below               = 140\n         {                                      // object: 12 + 4*8\n             \"streetAddress\": \"21 2nd Street\",  // key 16, value 16\n             \"city\"         : \"New York\",       // key 8, value 12\n             \"state\"        : \"NY\",             // key 8, value 4\n             \"postalCode\"   : \"10021\"           // key 12, value 8\n         },                                     // object total: 128\n         \"phoneNumber\":                         // key: 16, value array below         = 172\n         [                                      // array: 12 + 2*4 + values below: 156\n             {                                  // object 12 + 2*8\n               \"type\"  : \"home\",                // key 8, value 8\n               \"number\": \"212 555-1234\"         // key 8, value 16\n             },                                 // object total: 68\n             {                                  // object 12 + 2*8\n               \"type\"  : \"fax\",                 // key 8, value 8\n               \"number\": \"646 555-4567\"         // key 8, value 16\n             }                                  // object total: 68\n         ]                                      // array total: 156\n    }                                           // great total:                         412 bytes\n\n    The uncompressed text file used roughly 500 bytes, so in this case we end up using about\n    the same space as the text representation.\n\n    Other measurements have shown a slightly bigger binary size than a compact text\n    representation where all possible whitespace was stripped out.\n*/\nnamespace QJsonPrivate {\n\nclass Array;\nclass Object;\nclass Value;\nclass Entry;\n\ntemplate<typename T>\nclass q_littleendian\n{\npublic:\n    T val;\n\n    q_littleendian &operator =(T i) { val = qToLittleEndian(i); return *this; }\n    operator T() const { return qFromLittleEndian(val); }\n\n    bool operator ==(T i) { return qFromLittleEndian(val) == i; }\n    bool operator !=(T i) { return qFromLittleEndian(val) != i; }\n    bool operator ==(q_littleendian<T> i) { return val == i.val; }\n    bool operator !=(q_littleendian<T> i) { return val != i.val; }\n    bool operator <(T i) { return qFromLittleEndian(val) < i; }\n    bool operator >(T i) { return qFromLittleEndian(val) > i; }\n    bool operator <=(T i) { return qFromLittleEndian(val) <= i; }\n    bool operator >=(T i) { return qFromLittleEndian(val) >= i; }\n    q_littleendian &operator +=(T i) {\n        val = qToLittleEndian(qFromLittleEndian(val) + i);\n        return *this;\n    }\n};\n\ntypedef q_littleendian<short> qle_short;\ntypedef q_littleendian<unsigned short> qle_ushort;\ntypedef q_littleendian<int> qle_int;\ntypedef q_littleendian<unsigned int> qle_uint;\n\ntemplate<int pos, int width>\nclass qle_bitfield\n{\npublic:\n    uint val;\n\n    enum {\n        mask = ((1u << width) - 1) << pos\n    };\n\n    void operator =(uint t) {\n        uint i = qFromLittleEndian(val);\n        i &= ~mask;\n        i |= t << pos;\n        val = qToLittleEndian(i);\n    }\n    operator uint() const {\n        uint t = qFromLittleEndian(val);\n        t &= mask;\n        t >>= pos;\n        return t;\n    }\n    bool operator !() const {\n        return !operator uint();\n    }\n\n    bool operator ==(uint t) { return uint(*this) == t; }\n    bool operator !=(uint t) { return uint(*this) != t; }\n    bool operator <(uint t) { return uint(*this) < t; }\n    bool operator >(uint t) { return uint(*this) > t; }\n    bool operator <=(uint t) { return uint(*this) <= t; }\n    bool operator >=(uint t) { return uint(*this) >= t; }\n    qle_bitfield &operator +=(uint i) {\n        *this = (uint(*this) + i);\n        return *this;\n    }\n    qle_bitfield &operator -=(uint i) {\n        *this = (uint(*this) - i);\n        return *this;\n    }\n};\n\ntemplate<int pos, int width>\nclass qle_signedbitfield\n{\npublic:\n    uint val;\n\n    enum {\n        mask = ((1u << width) - 1) << pos\n    };\n\n    void operator =(int t) {\n        uint i = qFromLittleEndian(val);\n        i &= ~mask;\n        i |= t << pos;\n        val = qToLittleEndian(i);\n    }\n    operator int() const {\n        uint i = qFromLittleEndian(val);\n        i <<= 32 - width - pos;\n        int t = (int) i;\n        t >>= pos;\n        return t;\n    }\n    bool operator !() const {\n        return !operator int();\n    }\n\n    bool operator ==(int t) { return int(*this) == t; }\n    bool operator !=(int t) { return int(*this) != t; }\n    bool operator <(int t) { return int(*this) < t; }\n    bool operator >(int t) { return int(*this) > t; }\n    bool operator <=(int t) { return int(*this) <= t; }\n    bool operator >=(int t) { return int(*this) >= t; }\n    qle_signedbitfield &operator +=(int i) {\n        *this = (int(*this) + i);\n        return *this;\n    }\n    qle_signedbitfield &operator -=(int i) {\n        *this = (int(*this) - i);\n        return *this;\n    }\n};\n\ntypedef qle_uint offset;\n\n// round the size up to the next 4 byte boundary\ninline int alignedSize(int size) { return (size + 3) & ~3; }\n\nstatic inline bool useCompressed(const QString &s)\n{\n    if (s.length() >= 0x8000)\n        return false;\n    const ushort *uc = (const ushort *)s.constData();\n    const ushort *e = uc + s.length();\n    while (uc < e) {\n        if (*uc > 0xff)\n            return false;\n        ++uc;\n    }\n    return true;\n}\n\nstatic inline int qStringSize(const QString &string, bool compress)\n{\n    int l = 2 + string.length();\n    if (!compress)\n        l *= 2;\n    return alignedSize(l);\n}\n\n// returns INT_MAX if it can't compress it into 28 bits\nstatic inline int compressedNumber(double d)\n{\n    // this relies on details of how ieee floats are represented\n    const int exponent_off = 52;\n    const quint64 fraction_mask = 0x000fffffffffffffull;\n    const quint64 exponent_mask = 0x7ff0000000000000ull;\n\n    quint64 val;\n    memcpy (&val, &d, sizeof(double));\n    int exp = (int)((val & exponent_mask) >> exponent_off) - 1023;\n    if (exp < 0 || exp > 25)\n        return INT_MAX;\n\n    quint64 non_int = val & (fraction_mask >> exp);\n    if (non_int)\n        return INT_MAX;\n\n    bool neg = (val >> 63);\n    val &= fraction_mask;\n    val |= ((quint64)1 << 52);\n    int res = (int)(val >> (52 - exp));\n    return neg ? -res : res;\n}\n\nclass Latin1String;\n\nclass String\n{\npublic:\n    String(const char *data) { d = (Data *)data; }\n\n    struct Data {\n        qle_int length;\n        qle_ushort utf16[1];\n    };\n\n    Data *d;\n\n    inline String &operator=(const QString &str)\n    {\n        d->length = str.length();\n#if Q_BYTE_ORDER == Q_BIG_ENDIAN\n        const qle_ushort *uc = (const qle_ushort *)str.unicode();\n        for (int i = 0; i < str.length(); ++i)\n            d->utf16[i] = uc[i];\n#else\n        memcpy(d->utf16, str.unicode(), str.length()*sizeof(ushort));\n#endif\n        if (str.length() & 1)\n            d->utf16[str.length()] = 0;\n        return *this;\n    }\n\n    inline bool operator ==(const QString &str) const {\n        int slen = str.length();\n        int l = d->length;\n        if (slen != l)\n            return false;\n        const ushort *s = (const ushort *)str.constData();\n        const qle_ushort *a = d->utf16;\n        const ushort *b = s;\n        while (l-- && *a == *b)\n            a++,b++;\n        return (l == -1);\n    }\n    inline bool operator !=(const QString &str) const {\n        return !operator ==(str);\n    }\n    inline bool operator >=(const QString &str) const {\n        // ###\n        return toString() >= str;\n    }\n\n    inline bool operator<(const Latin1String &str) const;\n    inline bool operator>=(const Latin1String &str) const { return !operator <(str); }\n    inline bool operator ==(const Latin1String &str) const;\n\n    inline bool operator ==(const String &str) const {\n        if (d->length != str.d->length)\n            return false;\n        return !memcmp(d->utf16, str.d->utf16, d->length*sizeof(ushort));\n    }\n    inline bool operator<(const String &other) const;\n    inline bool operator >=(const String &other) const { return !(*this < other); }\n\n    inline QString toString() const {\n#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN\n        return QString((QChar *)d->utf16, d->length);\n#else\n        int l = d->length;\n        QString str(l, Qt::Uninitialized);\n        QChar *ch = str.data();\n        for (int i = 0; i < l; ++i)\n            ch[i] = QChar(d->utf16[i]);\n        return str;\n#endif\n    }\n\n};\n\nclass Latin1String\n{\npublic:\n    Latin1String(const char *data) { d = (Data *)data; }\n\n    struct Data {\n        qle_short length;\n        char latin1[1];\n    };\n    Data *d;\n\n    inline Latin1String &operator=(const QString &str)\n    {\n        d->length = str.length();\n        uchar *l = (uchar *)d->latin1;\n        const ushort *uc = (const ushort *)str.unicode();\n        for (int i = 0; i < str.length(); ++i)\n            *l++ = uc[i];\n        while ((quintptr)l & 0x3)\n            *l++ = 0;\n        return *this;\n    }\n\n    inline bool operator ==(const QString &str) const {\n//      return QLatin1String(d->latin1, d->length) == str;\n        return QString::fromLatin1(d->latin1, d->length) == str;\n    }\n    inline bool operator !=(const QString &str) const {\n        return !operator ==(str);\n    }\n    inline bool operator >=(const QString &str) const {\n//        return QLatin1String(d->latin1, d->length) >= str;\n        return QString::fromLatin1(d->latin1, d->length) >= str;\n    }\n\n    inline bool operator ==(const Latin1String &str) const {\n        return d->length == str.d->length && !strcmp(d->latin1, str.d->latin1);\n    }\n    inline bool operator >=(const Latin1String &str) const {\n        int l = qMin(d->length, str.d->length);\n        int val = strncmp(d->latin1, str.d->latin1, l);\n        if (!val)\n            val = d->length - str.d->length;\n        return val >= 0;\n    }\n    inline bool operator<(const String &str) const\n    {\n        const qle_ushort *uc = (qle_ushort *) str.d->utf16;\n        if (!uc || *uc == 0)\n            return false;\n\n        const uchar *c = (uchar *)d->latin1;\n        const uchar *e = c + qMin((int)d->length, (int)str.d->length);\n\n        while (c < e) {\n            if (*c != *uc)\n                break;\n            ++c;\n            ++uc;\n        }\n        return (c == e ? (int)d->length < (int)str.d->length : *c < *uc);\n\n    }\n    inline bool operator ==(const String &str) const {\n        return (str == *this);\n    }\n    inline bool operator >=(const String &str) const {\n        return !(*this < str);\n    }\n\n    inline QString toString() const {\n        return QString::fromLatin1(d->latin1, d->length);\n    }\n};\n\ninline bool String::operator ==(const Latin1String &str) const\n{\n    if ((int)d->length != (int)str.d->length)\n        return false;\n    const qle_ushort *uc = d->utf16;\n    const qle_ushort *e = uc + d->length;\n    const uchar *c = (uchar *)str.d->latin1;\n\n    while (uc < e) {\n        if (*uc != *c)\n            return false;\n        ++uc;\n        ++c;\n    }\n    return true;\n}\n\ninline bool String::operator <(const String &other) const\n{\n    int alen = d->length;\n    int blen = other.d->length;\n    int l = qMin(alen, blen);\n    qle_ushort *a = d->utf16;\n    qle_ushort *b = other.d->utf16;\n\n    while (l-- && *a == *b)\n        a++,b++;\n    if (l==-1)\n        return (alen < blen);\n    return (ushort)*a < (ushort)*b;\n}\n\ninline bool String::operator<(const Latin1String &str) const\n{\n    const uchar *c = (uchar *) str.d->latin1;\n    if (!c || *c == 0)\n        return false;\n\n    const qle_ushort *uc = d->utf16;\n    const qle_ushort *e = uc + qMin((int)d->length, (int)str.d->length);\n\n    while (uc < e) {\n        if (*uc != *c)\n            break;\n        ++uc;\n        ++c;\n    }\n    return (uc == e ? (int)d->length < (int)str.d->length : (ushort)*uc < *c);\n\n}\n\nstatic inline void copyString(char *dest, const QString &str, bool compress)\n{\n    if (compress) {\n        Latin1String string(dest);\n        string = str;\n    } else {\n        String string(dest);\n        string = str;\n    }\n}\n\n\n/*\n Base is the base class for both Object and Array. Both classe work more or less the same way.\n The class starts with a header (defined by the struct below), then followed by data (the data for\n values in the Array case and Entry's (see below) for objects.\n\n After the data a table follows (tableOffset points to it) containing Value objects for Arrays, and\n offsets from the beginning of the object to Entry's in the case of Object.\n\n Entry's in the Object's table are lexicographically sorted by key in the table(). This allows the usage\n of a binary search over the keys in an Object.\n */\nclass Base\n{\npublic:\n    qle_uint size;\n    union {\n        uint _dummy;\n        qle_bitfield<0, 1> is_object;\n        qle_bitfield<1, 31> length;\n    };\n    offset tableOffset;\n    // content follows here\n\n    inline bool isObject() const { return is_object; }\n    inline bool isArray() const { return !isObject(); }\n\n    inline offset *table() const { return (offset *) (((char *) this) + tableOffset); }\n\n    int reserveSpace(uint dataSize, int posInTable, uint numItems, bool replace);\n    void removeItems(int pos, int numItems);\n};\n\nclass Object : public Base\n{\npublic:\n    Entry *entryAt(int i) const {\n        return reinterpret_cast<Entry *>(((char *)this) + table()[i]);\n    }\n    int indexOf(const QString &key, bool *exists);\n\n    bool isValid() const;\n};\n\n\nclass Array : public Base\n{\npublic:\n    inline Value at(int i) const;\n    inline Value &operator [](int i);\n\n    bool isValid() const;\n};\n\n\nclass Value\n{\npublic:\n    enum {\n        MaxSize = (1<<27) - 1\n    };\n    union {\n        uint _dummy;\n        qle_bitfield<0, 3> type;\n        qle_bitfield<3, 1> latinOrIntValue;\n        qle_bitfield<4, 1> latinKey;\n        qle_bitfield<5, 27> value;\n        qle_signedbitfield<5, 27> int_value;\n    };\n\n    inline char *data(const Base *b) const { return ((char *)b) + value; }\n    int usedStorage(const Base *b) const;\n\n    bool toBoolean() const;\n    double toDouble(const Base *b) const;\n    QString toString(const Base *b) const;\n    String asString(const Base *b) const;\n    Latin1String asLatin1String(const Base *b) const;\n    Base *base(const Base *b) const;\n\n    bool isValid(const Base *b) const;\n\n    static int requiredStorage(QJsonValue &v, bool *compressed);\n    static uint valueToStore(const QJsonValue &v, uint offset);\n    static void copyData(const QJsonValue &v, char *dest, bool compressed);\n};\n\ninline Value Array::at(int i) const\n{\n    return *(Value *) (table() + i);\n}\n\ninline Value &Array::operator [](int i)\n{\n    return *(Value *) (table() + i);\n}\n\n\n\nclass Entry {\npublic:\n    Value value;\n    // key\n    // value data follows key\n\n    int size() const {\n        int s = sizeof(Entry);\n        if (value.latinKey)\n            s += sizeof(ushort) + qFromLittleEndian(*(ushort *) ((const char *)this + sizeof(Entry)));\n        else\n            s += sizeof(uint) + qFromLittleEndian(*(int *) ((const char *)this + sizeof(Entry)));\n        return alignedSize(s);\n    }\n\n    int usedStorage(Base *b) const {\n        return size() + value.usedStorage(b);\n    }\n\n    String shallowKey() const\n    {\n        Q_ASSERT(!value.latinKey);\n        return String((const char *)this + sizeof(Entry));\n    }\n    Latin1String shallowLatin1Key() const\n    {\n        Q_ASSERT(value.latinKey);\n        return Latin1String((const char *)this + sizeof(Entry));\n    }\n    QString key() const\n    {\n        if (value.latinKey) {\n            return shallowLatin1Key().toString();\n        }\n        return shallowKey().toString();\n    }\n\n    bool operator ==(const QString &key) const;\n    inline bool operator !=(const QString &key) const { return !operator ==(key); }\n    inline bool operator >=(const QString &key) const;\n\n    bool operator ==(const Entry &other) const;\n    bool operator >=(const Entry &other) const;\n};\n\ninline bool Entry::operator >=(const QString &key) const\n{\n    if (value.latinKey)\n        return (shallowLatin1Key() >= key);\n    else\n        return (shallowKey() >= key);\n}\n\ninline bool operator <(const QString &key, const Entry &e)\n{ return e >= key; }\n\n\nclass Header {\npublic:\n    qle_uint tag; // 'qbjs'\n    qle_uint version; // 1\n    Base *root() { return (Base *)(this + 1); }\n};\n\n\ninline bool Value::toBoolean() const\n{\n    Q_ASSERT(type == QJsonValue::Bool);\n    return value != 0;\n}\n\ninline double Value::toDouble(const Base *b) const\n{\n    Q_ASSERT(type == QJsonValue::Double);\n    if (latinOrIntValue)\n        return int_value;\n\n    quint64 i = qFromLittleEndian<quint64>((const uchar *)b + value);\n    double d;\n    memcpy(&d, &i, sizeof(double));\n    return d;\n}\n\ninline String Value::asString(const Base *b) const\n{\n    Q_ASSERT(type == QJsonValue::String && !latinOrIntValue);\n    return String(data(b));\n}\n\ninline Latin1String Value::asLatin1String(const Base *b) const\n{\n    Q_ASSERT(type == QJsonValue::String && latinOrIntValue);\n    return Latin1String(data(b));\n}\n\ninline QString Value::toString(const Base *b) const\n{\n    if (latinOrIntValue)\n        return asLatin1String(b).toString();\n    else\n        return asString(b).toString();\n}\n\ninline Base *Value::base(const Base *b) const\n{\n    Q_ASSERT(type == QJsonValue::Array || type == QJsonValue::Object);\n    return reinterpret_cast<Base *>(data(b));\n}\n\nclass Data {\npublic:\n    enum Validation {\n        Unchecked,\n        Validated,\n        Invalid\n    };\n\n    QAtomicInt ref;\n    int alloc;\n    union {\n        char *rawData;\n        Header *header;\n    };\n    uint compactionCounter : 31;\n    uint ownsData : 1;\n\n    inline Data(char *raw, int a)\n        : alloc(a), rawData(raw), compactionCounter(0), ownsData(true)\n    {\n    }\n    inline Data(int reserved, QJsonValue::Type valueType)\n        : rawData(0), compactionCounter(0), ownsData(true)\n    {\n        Q_ASSERT(valueType == QJsonValue::Array || valueType == QJsonValue::Object);\n\n        alloc = sizeof(Header) + sizeof(Base) + reserved + sizeof(offset);\n        header = (Header *)malloc(alloc);\n        Q_CHECK_PTR(header);\n        header->tag = QJsonDocument::BinaryFormatTag;\n        header->version = 1;\n        Base *b = header->root();\n        b->size = sizeof(Base);\n        b->is_object = (valueType == QJsonValue::Object);\n        b->tableOffset = sizeof(Base);\n        b->length = 0;\n    }\n    inline ~Data()\n    { if (ownsData) free(rawData); }\n\n    uint offsetOf(const void *ptr) const { return (uint)(((char *)ptr - rawData)); }\n\n    QJsonObject toObject(Object *o) const\n    {\n        return QJsonObject(const_cast<Data *>(this), o);\n    }\n\n    QJsonArray toArray(Array *a) const\n    {\n        return QJsonArray(const_cast<Data *>(this), a);\n    }\n\n    Data *clone(Base *b, int reserve = 0)\n    {\n        int size = sizeof(Header) + b->size;\n        if (b == header->root() && int(ref) == 1 && alloc >= size + reserve)\n            return this;\n\n        if (reserve) {\n            if (reserve < 128)\n                reserve = 128;\n            size = qMax(size + reserve, size *2);\n        }\n        char *raw = (char *)malloc(size);\n        Q_CHECK_PTR(raw);\n        memcpy(raw + sizeof(Header), b, b->size);\n        Header *h = (Header *)raw;\n        h->tag = QJsonDocument::BinaryFormatTag;\n        h->version = 1;\n        Data *d = new Data(raw, size);\n        d->compactionCounter = (b == header->root()) ? compactionCounter : 0;\n        return d;\n    }\n\n    void compact();\n    bool valid() const;\n\nprivate:\n    Q_DISABLE_COPY(Data)\n};\n\n}\n\nQT_END_NAMESPACE\n\n#endif // QJSON_P_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/json/qjsonarray.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the QtCore module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL21$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia. For licensing terms and\n** conditions see http://qt.digia.com/licensing. For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 or version 3 as published by the Free\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\n** LICENSE.LGPLv3 included in the packaging of this file. Please review the\n** following information to ensure the GNU Lesser General Public License\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights. These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#include <qjsonobject.h>\n#include <qjsonvalue.h>\n#include <qjsonarray.h>\n#include <qstringlist.h>\n#include <qvariant.h>\n#include <qdebug.h>\n\n#include \"qjsonwriter_p.h\"\n#include \"qjson_p.h\"\n\nQT_BEGIN_NAMESPACE\n\n/*!\n    \\class QJsonArray\n    \\inmodule QtCore\n    \\ingroup json\n    \\reentrant\n    \\since 5.0\n\n    \\brief The QJsonArray class encapsulates a JSON array.\n\n    A JSON array is a list of values. The list can be manipulated by inserting and\n    removing QJsonValue's from the array.\n\n    A QJsonArray can be converted to and from a QVariantList. You can query the\n    number of entries with size(), insert(), and removeAt() entries from it\n    and iterate over its content using the standard C++ iterator pattern.\n\n    QJsonArray is an implicitly shared class and shares the data with the document\n    it has been created from as long as it is not being modified.\n\n    You can convert the array to and from text based JSON through QJsonDocument.\n\n    \\sa {JSON Support in Qt}, {JSON Save Game Example}\n*/\n\n/*!\n    \\typedef QJsonArray::Iterator\n\n    Qt-style synonym for QJsonArray::iterator.\n*/\n\n/*!\n    \\typedef QJsonArray::ConstIterator\n\n    Qt-style synonym for QJsonArray::const_iterator.\n*/\n\n/*!\n    \\typedef QJsonArray::size_type\n\n    Typedef for int. Provided for STL compatibility.\n*/\n\n/*!\n    \\typedef QJsonArray::value_type\n\n    Typedef for QJsonValue. Provided for STL compatibility.\n*/\n\n/*!\n    \\typedef QJsonArray::difference_type\n\n    Typedef for int. Provided for STL compatibility.\n*/\n\n/*!\n    \\typedef QJsonArray::pointer\n\n    Typedef for QJsonValue *. Provided for STL compatibility.\n*/\n\n/*!\n    \\typedef QJsonArray::const_pointer\n\n    Typedef for const QJsonValue *. Provided for STL compatibility.\n*/\n\n/*!\n    \\typedef QJsonArray::reference\n\n    Typedef for QJsonValue &. Provided for STL compatibility.\n*/\n\n/*!\n    \\typedef QJsonArray::const_reference\n\n    Typedef for const QJsonValue &. Provided for STL compatibility.\n*/\n\n/*!\n    Creates an empty array.\n */\nQJsonArray::QJsonArray()\n    : d(0), a(0)\n{\n}\n\n/*!\n    \\fn QJsonArray::QJsonArray(std::initializer_list<QJsonValue> args)\n    \\since 5.4\n    Creates an array initialized from \\a args initialization list.\n\n    QJsonArray can be constructed in a way similar to JSON notation,\n    for example:\n    \\code\n    QJsonArray array = { 1, 2.2, QString() };\n    \\endcode\n */\n\n/*!\n    \\internal\n */\nQJsonArray::QJsonArray(QJsonPrivate::Data *data, QJsonPrivate::Array *array)\n    : d(data), a(array)\n{\n    Q_ASSERT(data);\n    Q_ASSERT(array);\n    d->ref.ref();\n}\n\n/*!\n    This method replaces part of QJsonArray(std::initializer_list<QJsonValue> args) .\n    The constructor needs to be inline, but we do not want to leak implementation details\n    of this class.\n    \\note this method is called for an uninitialized object\n    \\internal\n */\nvoid QJsonArray::initialize()\n{\n    d = 0;\n    a = 0;\n}\n\n/*!\n    Deletes the array.\n */\nQJsonArray::~QJsonArray()\n{\n    if (d && !d->ref.deref())\n        delete d;\n}\n\n/*!\n    Creates a copy of \\a other.\n\n    Since QJsonArray is implicitly shared, the copy is shallow\n    as long as the object doesn't get modified.\n */\nQJsonArray::QJsonArray(const QJsonArray &other)\n{\n    d = other.d;\n    a = other.a;\n    if (d)\n        d->ref.ref();\n}\n\n/*!\n    Assigns \\a other to this array.\n */\nQJsonArray &QJsonArray::operator =(const QJsonArray &other)\n{\n    if (d != other.d) {\n        if (d && !d->ref.deref())\n            delete d;\n        d = other.d;\n        if (d)\n            d->ref.ref();\n    }\n    a = other.a;\n\n    return *this;\n}\n\n/*! \\fn QJsonArray &QJsonArray::operator+=(const QJsonValue &value)\n\n    Appends \\a value to the array, and returns a reference to the array itself.\n\n    \\since 5.3\n    \\sa append(), operator<<()\n*/\n\n/*! \\fn QJsonArray QJsonArray::operator+(const QJsonValue &value) const\n\n    Returns an array that contains all the items in this array followed\n    by the provided \\a value.\n\n    \\since 5.3\n    \\sa operator+=()\n*/\n\n/*! \\fn QJsonArray &QJsonArray::operator<<(const QJsonValue &value)\n\n    Appends \\a value to the array, and returns a reference to the array itself.\n\n    \\since 5.3\n    \\sa operator+=(), append()\n*/\n\n/*!\n    Converts the string list \\a list to a QJsonArray.\n\n    The values in \\a list will be converted to JSON values.\n\n    \\sa toVariantList(), QJsonValue::fromVariant()\n */\nQJsonArray QJsonArray::fromStringList(const QStringList &list)\n{\n    QJsonArray array;\n    for (QStringList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it)\n        array.append(QJsonValue(*it));\n    return array;\n}\n\n/*!\n    Converts the variant list \\a list to a QJsonArray.\n\n    The QVariant values in \\a list will be converted to JSON values.\n\n    \\sa toVariantList(), QJsonValue::fromVariant()\n */\nQJsonArray QJsonArray::fromVariantList(const QVariantList &list)\n{\n    QJsonArray array;\n    for (QVariantList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it)\n        array.append(QJsonValue::fromVariant(*it));\n    return array;\n}\n\n/*!\n    Converts this object to a QVariantList.\n\n    Returns the created map.\n */\nQVariantList QJsonArray::toVariantList() const\n{\n    QVariantList list;\n\n    if (a) {\n        for (int i = 0; i < (int)a->length; ++i)\n            list.append(QJsonValue(d, a, a->at(i)).toVariant());\n    }\n    return list;\n}\n\n\n/*!\n    Returns the number of values stored in the array.\n */\nint QJsonArray::size() const\n{\n    if (!d)\n        return 0;\n\n    return (int)a->length;\n}\n\n/*!\n    \\fn QJsonArray::count() const\n\n    Same as size().\n\n    \\sa size()\n*/\n\n/*!\n    Returns \\c true if the object is empty. This is the same as size() == 0.\n\n    \\sa size()\n */\nbool QJsonArray::isEmpty() const\n{\n    if (!d)\n        return true;\n\n    return !a->length;\n}\n\n/*!\n    Returns a QJsonValue representing the value for index \\a i.\n\n    The returned QJsonValue is \\c Undefined, if \\a i is out of bounds.\n\n */\nQJsonValue QJsonArray::at(int i) const\n{\n    if (!a || i < 0 || i >= (int)a->length)\n        return QJsonValue(QJsonValue::Undefined);\n\n    return QJsonValue(d, a, a->at(i));\n}\n\n/*!\n    Returns the first value stored in the array.\n\n    Same as \\c at(0).\n\n    \\sa at()\n */\nQJsonValue QJsonArray::first() const\n{\n    return at(0);\n}\n\n/*!\n    Returns the last value stored in the array.\n\n    Same as \\c{at(size() - 1)}.\n\n    \\sa at()\n */\nQJsonValue QJsonArray::last() const\n{\n    return at(a ? (a->length - 1) : 0);\n}\n\n/*!\n    Inserts \\a value at the beginning of the array.\n\n    This is the same as \\c{insert(0, value)} and will prepend \\a value to the array.\n\n    \\sa append(), insert()\n */\nvoid QJsonArray::prepend(const QJsonValue &value)\n{\n    insert(0, value);\n}\n\n/*!\n    Inserts \\a value at the end of the array.\n\n    \\sa prepend(), insert()\n */\nvoid QJsonArray::append(const QJsonValue &value)\n{\n    insert(a ? (int)a->length : 0, value);\n}\n\n/*!\n    Removes the value at index position \\a i. \\a i must be a valid\n    index position in the array (i.e., \\c{0 <= i < size()}).\n\n    \\sa insert(), replace()\n */\nvoid QJsonArray::removeAt(int i)\n{\n    if (!a || i < 0 || i >= (int)a->length)\n        return;\n\n    detach();\n    a->removeItems(i, 1);\n    ++d->compactionCounter;\n    if (d->compactionCounter > 32u && d->compactionCounter >= unsigned(a->length) / 2u)\n        compact();\n}\n\n/*! \\fn void QJsonArray::removeFirst()\n\n    Removes the first item in the array. Calling this function is\n    equivalent to calling \\c{removeAt(0)}. The array must not be empty. If\n    the array can be empty, call isEmpty() before calling this\n    function.\n\n    \\sa removeAt(), removeLast()\n*/\n\n/*! \\fn void QJsonArray::removeLast()\n\n    Removes the last item in the array. Calling this function is\n    equivalent to calling \\c{removeAt(size() - 1)}. The array must not be\n    empty. If the array can be empty, call isEmpty() before calling\n    this function.\n\n    \\sa removeAt(), removeFirst()\n*/\n\n/*!\n    Removes the item at index position \\a i and returns it. \\a i must\n    be a valid index position in the array (i.e., \\c{0 <= i < size()}).\n\n    If you don't use the return value, removeAt() is more efficient.\n\n    \\sa removeAt()\n */\nQJsonValue QJsonArray::takeAt(int i)\n{\n    if (!a || i < 0 || i >= (int)a->length)\n        return QJsonValue(QJsonValue::Undefined);\n\n    QJsonValue v(d, a, a->at(i));\n    removeAt(i); // detaches\n    return v;\n}\n\n/*!\n    Inserts \\a value at index position \\a i in the array. If \\a i\n    is \\c 0, the value is prepended to the array. If \\a i is size(), the\n    value is appended to the array.\n\n    \\sa append(), prepend(), replace(), removeAt()\n */\nvoid QJsonArray::insert(int i, const QJsonValue &value)\n{\n    Q_ASSERT (i >= 0 && i <= (a ? (int)a->length : 0));\n    QJsonValue val = value;\n\n    bool compressed;\n    int valueSize = QJsonPrivate::Value::requiredStorage(val, &compressed);\n\n    detach(valueSize + sizeof(QJsonPrivate::Value));\n\n    if (!a->length)\n        a->tableOffset = sizeof(QJsonPrivate::Array);\n\n    int valueOffset = a->reserveSpace(valueSize, i, 1, false);\n    if (!valueOffset)\n        return;\n\n    QJsonPrivate::Value &v = (*a)[i];\n    v.type = (val.t == QJsonValue::Undefined ? QJsonValue::Null : val.t);\n    v.latinOrIntValue = compressed;\n    v.latinKey = false;\n    v.value = QJsonPrivate::Value::valueToStore(val, valueOffset);\n    if (valueSize)\n        QJsonPrivate::Value::copyData(val, (char *)a + valueOffset, compressed);\n}\n\n/*!\n    \\fn QJsonArray::iterator QJsonArray::insert(iterator before, const QJsonValue &value)\n\n    Inserts \\a value before the position pointed to by \\a before, and returns an iterator\n    pointing to the newly inserted item.\n\n    \\sa erase(), insert()\n*/\n\n/*!\n    \\fn QJsonArray::iterator QJsonArray::erase(iterator it)\n\n    Removes the item pointed to by \\a it, and returns an iterator pointing to the\n    next item.\n\n    \\sa removeAt()\n*/\n\n/*!\n    Replaces the item at index position \\a i with \\a value. \\a i must\n    be a valid index position in the array (i.e., \\c{0 <= i < size()}).\n\n    \\sa operator[](), removeAt()\n */\nvoid QJsonArray::replace(int i, const QJsonValue &value)\n{\n    Q_ASSERT (a && i >= 0 && i < (int)(a->length));\n    QJsonValue val = value;\n\n    bool compressed;\n    int valueSize = QJsonPrivate::Value::requiredStorage(val, &compressed);\n\n    detach(valueSize);\n\n    if (!a->length)\n        a->tableOffset = sizeof(QJsonPrivate::Array);\n\n    int valueOffset = a->reserveSpace(valueSize, i, 1, true);\n    if (!valueOffset)\n        return;\n\n    QJsonPrivate::Value &v = (*a)[i];\n    v.type = (val.t == QJsonValue::Undefined ? QJsonValue::Null : val.t);\n    v.latinOrIntValue = compressed;\n    v.latinKey = false;\n    v.value = QJsonPrivate::Value::valueToStore(val, valueOffset);\n    if (valueSize)\n        QJsonPrivate::Value::copyData(val, (char *)a + valueOffset, compressed);\n\n    ++d->compactionCounter;\n    if (d->compactionCounter > 32u && d->compactionCounter >= unsigned(a->length) / 2u)\n        compact();\n}\n\n/*!\n    Returns \\c true if the array contains an occurrence of \\a value, otherwise \\c false.\n\n    \\sa count()\n */\nbool QJsonArray::contains(const QJsonValue &value) const\n{\n    for (int i = 0; i < size(); i++) {\n        if (at(i) == value)\n            return true;\n    }\n    return false;\n}\n\n/*!\n    Returns the value at index position \\a i as a modifiable reference.\n    \\a i must be a valid index position in the array (i.e., \\c{0 <= i <\n    size()}).\n\n    The return value is of type QJsonValueRef, a helper class for QJsonArray\n    and QJsonObject. When you get an object of type QJsonValueRef, you can\n    use it as if it were a reference to a QJsonValue. If you assign to it,\n    the assignment will apply to the character in the QJsonArray of QJsonObject\n    from which you got the reference.\n\n    \\sa at()\n */\nQJsonValueRef QJsonArray::operator [](int i)\n{\n    Q_ASSERT(a && i >= 0 && i < (int)a->length);\n    return QJsonValueRef(this, i);\n}\n\n/*!\n    \\overload\n\n    Same as at().\n */\nQJsonValue QJsonArray::operator[](int i) const\n{\n    return at(i);\n}\n\n/*!\n    Returns \\c true if this array is equal to \\a other.\n */\nbool QJsonArray::operator==(const QJsonArray &other) const\n{\n    if (a == other.a)\n        return true;\n\n    if (!a)\n        return !other.a->length;\n    if (!other.a)\n        return !a->length;\n    if (a->length != other.a->length)\n        return false;\n\n    for (int i = 0; i < (int)a->length; ++i) {\n        if (QJsonValue(d, a, a->at(i)) != QJsonValue(other.d, other.a, other.a->at(i)))\n            return false;\n    }\n    return true;\n}\n\n/*!\n    Returns \\c true if this array is not equal to \\a other.\n */\nbool QJsonArray::operator!=(const QJsonArray &other) const\n{\n    return !(*this == other);\n}\n\n/*! \\fn QJsonArray::iterator QJsonArray::begin()\n\n    Returns an \\l{STL-style iterators}{STL-style iterator} pointing to the first item in\n    the array.\n\n    \\sa constBegin(), end()\n*/\n\n/*! \\fn QJsonArray::const_iterator QJsonArray::begin() const\n\n    \\overload\n*/\n\n/*! \\fn QJsonArray::const_iterator QJsonArray::constBegin() const\n\n    Returns a const \\l{STL-style iterators}{STL-style iterator} pointing to the first item\n    in the array.\n\n    \\sa begin(), constEnd()\n*/\n\n/*! \\fn QJsonArray::iterator QJsonArray::end()\n\n    Returns an \\l{STL-style iterators}{STL-style iterator} pointing to the imaginary item\n    after the last item in the array.\n\n    \\sa begin(), constEnd()\n*/\n\n/*! \\fn const_iterator QJsonArray::end() const\n\n    \\overload\n*/\n\n/*! \\fn QJsonArray::const_iterator QJsonArray::constEnd() const\n\n    Returns a const \\l{STL-style iterators}{STL-style iterator} pointing to the imaginary\n    item after the last item in the array.\n\n    \\sa constBegin(), end()\n*/\n\n/*! \\fn void QJsonArray::push_back(const QJsonValue &value)\n\n    This function is provided for STL compatibility. It is equivalent\n    to \\l{QJsonArray::append()}{append(value)} and will append \\a value to the array.\n*/\n\n/*! \\fn void QJsonArray::push_front(const QJsonValue &value)\n\n    This function is provided for STL compatibility. It is equivalent\n    to \\l{QJsonArray::prepend()}{prepend(value)} and will prepend \\a value to the array.\n*/\n\n/*! \\fn void QJsonArray::pop_front()\n\n    This function is provided for STL compatibility. It is equivalent\n    to removeFirst(). The array must not be empty. If the array can be\n    empty, call isEmpty() before calling this function.\n*/\n\n/*! \\fn void QJsonArray::pop_back()\n\n    This function is provided for STL compatibility. It is equivalent\n    to removeLast(). The array must not be empty. If the array can be\n    empty, call isEmpty() before calling this function.\n*/\n\n/*! \\fn bool QJsonArray::empty() const\n\n    This function is provided for STL compatibility. It is equivalent\n    to isEmpty() and returns \\c true if the array is empty.\n*/\n\n/*! \\class QJsonArray::iterator\n    \\inmodule QtCore\n    \\brief The QJsonArray::iterator class provides an STL-style non-const iterator for QJsonArray.\n\n    QJsonArray::iterator allows you to iterate over a QJsonArray\n    and to modify the array item associated with the\n    iterator. If you want to iterate over a const QJsonArray, use\n    QJsonArray::const_iterator instead. It is generally a good practice to\n    use QJsonArray::const_iterator on a non-const QJsonArray as well, unless\n    you need to change the QJsonArray through the iterator. Const\n    iterators are slightly faster and improves code readability.\n\n    The default QJsonArray::iterator constructor creates an uninitialized\n    iterator. You must initialize it using a QJsonArray function like\n    QJsonArray::begin(), QJsonArray::end(), or QJsonArray::insert() before you can\n    start iterating.\n\n    Most QJsonArray functions accept an integer index rather than an\n    iterator. For that reason, iterators are rarely useful in\n    connection with QJsonArray. One place where STL-style iterators do\n    make sense is as arguments to \\l{generic algorithms}.\n\n    Multiple iterators can be used on the same array. However, be\n    aware that any non-const function call performed on the QJsonArray\n    will render all existing iterators undefined.\n\n    \\sa QJsonArray::const_iterator\n*/\n\n/*! \\typedef QJsonArray::iterator::iterator_category\n\n  A synonym for \\e {std::random_access_iterator_tag} indicating\n  this iterator is a random access iterator.\n*/\n\n/*! \\typedef QJsonArray::iterator::difference_type\n\n    \\internal\n*/\n\n/*! \\typedef QJsonArray::iterator::value_type\n\n    \\internal\n*/\n\n/*! \\typedef QJsonArray::iterator::reference\n\n    \\internal\n*/\n\n/*! \\typedef QJsonArray::iterator::pointer\n\n    \\internal\n*/\n\n/*! \\fn QJsonArray::iterator::iterator()\n\n    Constructs an uninitialized iterator.\n\n    Functions like operator*() and operator++() should not be called\n    on an uninitialized iterator. Use operator=() to assign a value\n    to it before using it.\n\n    \\sa QJsonArray::begin(), QJsonArray::end()\n*/\n\n/*! \\fn QJsonArray::iterator::iterator(QJsonArray *array, int index)\n    \\internal\n*/\n\n/*! \\fn QJsonValueRef QJsonArray::iterator::operator*() const\n\n    Returns a modifiable reference to the current item.\n\n    You can change the value of an item by using operator*() on the\n    left side of an assignment.\n\n    The return value is of type QJsonValueRef, a helper class for QJsonArray\n    and QJsonObject. When you get an object of type QJsonValueRef, you can\n    use it as if it were a reference to a QJsonValue. If you assign to it,\n    the assignment will apply to the character in the QJsonArray of QJsonObject\n    from which you got the reference.\n*/\n\n/*! \\fn QJsonValueRef *QJsonArray::iterator::operator->() const\n\n    Returns a pointer to a modifiable reference to the current item.\n*/\n\n/*! \\fn QJsonValueRef QJsonArray::iterator::operator[](int j) const\n\n    Returns a modifiable reference to the item at offset \\a j from the\n    item pointed to by this iterator (the item at position \\c{*this + j}).\n\n    This function is provided to make QJsonArray iterators behave like C++\n    pointers.\n\n    The return value is of type QJsonValueRef, a helper class for QJsonArray\n    and QJsonObject. When you get an object of type QJsonValueRef, you can\n    use it as if it were a reference to a QJsonValue. If you assign to it,\n    the assignment will apply to the character in the QJsonArray of QJsonObject\n    from which you got the reference.\n\n    \\sa operator+()\n*/\n\n/*!\n    \\fn bool QJsonArray::iterator::operator==(const iterator &other) const\n    \\fn bool QJsonArray::iterator::operator==(const const_iterator &other) const\n\n    Returns \\c true if \\a other points to the same item as this\n    iterator; otherwise returns \\c false.\n\n    \\sa operator!=()\n*/\n\n/*!\n    \\fn bool QJsonArray::iterator::operator!=(const iterator &other) const\n    \\fn bool QJsonArray::iterator::operator!=(const const_iterator &other) const\n\n    Returns \\c true if \\a other points to a different item than this\n    iterator; otherwise returns \\c false.\n\n    \\sa operator==()\n*/\n\n/*!\n    \\fn bool QJsonArray::iterator::operator<(const iterator& other) const\n    \\fn bool QJsonArray::iterator::operator<(const const_iterator& other) const\n\n    Returns \\c true if the item pointed to by this iterator is less than\n    the item pointed to by the \\a other iterator.\n*/\n\n/*!\n    \\fn bool QJsonArray::iterator::operator<=(const iterator& other) const\n    \\fn bool QJsonArray::iterator::operator<=(const const_iterator& other) const\n\n    Returns \\c true if the item pointed to by this iterator is less than\n    or equal to the item pointed to by the \\a other iterator.\n*/\n\n/*!\n    \\fn bool QJsonArray::iterator::operator>(const iterator& other) const\n    \\fn bool QJsonArray::iterator::operator>(const const_iterator& other) const\n\n    Returns \\c true if the item pointed to by this iterator is greater\n    than the item pointed to by the \\a other iterator.\n*/\n\n/*!\n    \\fn bool QJsonArray::iterator::operator>=(const iterator& other) const\n    \\fn bool QJsonArray::iterator::operator>=(const const_iterator& other) const\n\n    Returns \\c true if the item pointed to by this iterator is greater\n    than or equal to the item pointed to by the \\a other iterator.\n*/\n\n/*! \\fn QJsonArray::iterator &QJsonArray::iterator::operator++()\n\n    The prefix ++ operator, \\c{++it}, advances the iterator to the\n    next item in the array and returns an iterator to the new current\n    item.\n\n    Calling this function on QJsonArray::end() leads to undefined results.\n\n    \\sa operator--()\n*/\n\n/*! \\fn QJsonArray::iterator QJsonArray::iterator::operator++(int)\n\n    \\overload\n\n    The postfix ++ operator, \\c{it++}, advances the iterator to the\n    next item in the array and returns an iterator to the previously\n    current item.\n*/\n\n/*! \\fn QJsonArray::iterator &QJsonArray::iterator::operator--()\n\n    The prefix -- operator, \\c{--it}, makes the preceding item\n    current and returns an iterator to the new current item.\n\n    Calling this function on QJsonArray::begin() leads to undefined results.\n\n    \\sa operator++()\n*/\n\n/*! \\fn QJsonArray::iterator QJsonArray::iterator::operator--(int)\n\n    \\overload\n\n    The postfix -- operator, \\c{it--}, makes the preceding item\n    current and returns an iterator to the previously current item.\n*/\n\n/*! \\fn QJsonArray::iterator &QJsonArray::iterator::operator+=(int j)\n\n    Advances the iterator by \\a j items. If \\a j is negative, the\n    iterator goes backward.\n\n    \\sa operator-=(), operator+()\n*/\n\n/*! \\fn QJsonArray::iterator &QJsonArray::iterator::operator-=(int j)\n\n    Makes the iterator go back by \\a j items. If \\a j is negative,\n    the iterator goes forward.\n\n    \\sa operator+=(), operator-()\n*/\n\n/*! \\fn QJsonArray::iterator QJsonArray::iterator::operator+(int j) const\n\n    Returns an iterator to the item at \\a j positions forward from\n    this iterator. If \\a j is negative, the iterator goes backward.\n\n    \\sa operator-(), operator+=()\n*/\n\n/*! \\fn QJsonArray::iterator QJsonArray::iterator::operator-(int j) const\n\n    Returns an iterator to the item at \\a j positions backward from\n    this iterator. If \\a j is negative, the iterator goes forward.\n\n    \\sa operator+(), operator-=()\n*/\n\n/*! \\fn int QJsonArray::iterator::operator-(iterator other) const\n\n    Returns the number of items between the item pointed to by \\a\n    other and the item pointed to by this iterator.\n*/\n\n/*! \\class QJsonArray::const_iterator\n    \\inmodule QtCore\n    \\brief The QJsonArray::const_iterator class provides an STL-style const iterator for QJsonArray.\n\n    QJsonArray::const_iterator allows you to iterate over a\n    QJsonArray. If you want to modify the QJsonArray as\n    you iterate over it, use QJsonArray::iterator instead. It is generally a\n    good practice to use QJsonArray::const_iterator on a non-const QJsonArray\n    as well, unless you need to change the QJsonArray through the\n    iterator. Const iterators are slightly faster and improves\n    code readability.\n\n    The default QJsonArray::const_iterator constructor creates an\n    uninitialized iterator. You must initialize it using a QJsonArray\n    function like QJsonArray::constBegin(), QJsonArray::constEnd(), or\n    QJsonArray::insert() before you can start iterating.\n\n    Most QJsonArray functions accept an integer index rather than an\n    iterator. For that reason, iterators are rarely useful in\n    connection with QJsonArray. One place where STL-style iterators do\n    make sense is as arguments to \\l{generic algorithms}.\n\n    Multiple iterators can be used on the same array. However, be\n    aware that any non-const function call performed on the QJsonArray\n    will render all existing iterators undefined.\n\n    \\sa QJsonArray::iterator\n*/\n\n/*! \\fn QJsonArray::const_iterator::const_iterator()\n\n    Constructs an uninitialized iterator.\n\n    Functions like operator*() and operator++() should not be called\n    on an uninitialized iterator. Use operator=() to assign a value\n    to it before using it.\n\n    \\sa QJsonArray::constBegin(), QJsonArray::constEnd()\n*/\n\n/*! \\fn QJsonArray::const_iterator::const_iterator(const QJsonArray *array, int index)\n    \\internal\n*/\n\n/*! \\typedef QJsonArray::const_iterator::iterator_category\n\n  A synonym for \\e {std::random_access_iterator_tag} indicating\n  this iterator is a random access iterator.\n*/\n\n/*! \\typedef QJsonArray::const_iterator::difference_type\n\n    \\internal\n*/\n\n/*! \\typedef QJsonArray::const_iterator::value_type\n\n    \\internal\n*/\n\n/*! \\typedef QJsonArray::const_iterator::reference\n\n    \\internal\n*/\n\n/*! \\typedef QJsonArray::const_iterator::pointer\n\n    \\internal\n*/\n\n/*! \\fn QJsonArray::const_iterator::const_iterator(const const_iterator &other)\n\n    Constructs a copy of \\a other.\n*/\n\n/*! \\fn QJsonArray::const_iterator::const_iterator(const iterator &other)\n\n    Constructs a copy of \\a other.\n*/\n\n/*! \\fn QJsonValue QJsonArray::const_iterator::operator*() const\n\n    Returns the current item.\n*/\n\n/*! \\fn QJsonValue *QJsonArray::const_iterator::operator->() const\n\n    Returns a pointer to the current item.\n*/\n\n/*! \\fn QJsonValue QJsonArray::const_iterator::operator[](int j) const\n\n    Returns the item at offset \\a j from the item pointed to by this iterator (the item at\n    position \\c{*this + j}).\n\n    This function is provided to make QJsonArray iterators behave like C++\n    pointers.\n\n    \\sa operator+()\n*/\n\n/*! \\fn bool QJsonArray::const_iterator::operator==(const const_iterator &other) const\n\n    Returns \\c true if \\a other points to the same item as this\n    iterator; otherwise returns \\c false.\n\n    \\sa operator!=()\n*/\n\n/*! \\fn bool QJsonArray::const_iterator::operator!=(const const_iterator &other) const\n\n    Returns \\c true if \\a other points to a different item than this\n    iterator; otherwise returns \\c false.\n\n    \\sa operator==()\n*/\n\n/*!\n    \\fn bool QJsonArray::const_iterator::operator<(const const_iterator& other) const\n\n    Returns \\c true if the item pointed to by this iterator is less than\n    the item pointed to by the \\a other iterator.\n*/\n\n/*!\n    \\fn bool QJsonArray::const_iterator::operator<=(const const_iterator& other) const\n\n    Returns \\c true if the item pointed to by this iterator is less than\n    or equal to the item pointed to by the \\a other iterator.\n*/\n\n/*!\n    \\fn bool QJsonArray::const_iterator::operator>(const const_iterator& other) const\n\n    Returns \\c true if the item pointed to by this iterator is greater\n    than the item pointed to by the \\a other iterator.\n*/\n\n/*!\n    \\fn bool QJsonArray::const_iterator::operator>=(const const_iterator& other) const\n\n    Returns \\c true if the item pointed to by this iterator is greater\n    than or equal to the item pointed to by the \\a other iterator.\n*/\n\n/*! \\fn QJsonArray::const_iterator &QJsonArray::const_iterator::operator++()\n\n    The prefix ++ operator, \\c{++it}, advances the iterator to the\n    next item in the array and returns an iterator to the new current\n    item.\n\n    Calling this function on QJsonArray::end() leads to undefined results.\n\n    \\sa operator--()\n*/\n\n/*! \\fn QJsonArray::const_iterator QJsonArray::const_iterator::operator++(int)\n\n    \\overload\n\n    The postfix ++ operator, \\c{it++}, advances the iterator to the\n    next item in the array and returns an iterator to the previously\n    current item.\n*/\n\n/*! \\fn QJsonArray::const_iterator &QJsonArray::const_iterator::operator--()\n\n    The prefix -- operator, \\c{--it}, makes the preceding item\n    current and returns an iterator to the new current item.\n\n    Calling this function on QJsonArray::begin() leads to undefined results.\n\n    \\sa operator++()\n*/\n\n/*! \\fn QJsonArray::const_iterator QJsonArray::const_iterator::operator--(int)\n\n    \\overload\n\n    The postfix -- operator, \\c{it--}, makes the preceding item\n    current and returns an iterator to the previously current item.\n*/\n\n/*! \\fn QJsonArray::const_iterator &QJsonArray::const_iterator::operator+=(int j)\n\n    Advances the iterator by \\a j items. If \\a j is negative, the\n    iterator goes backward.\n\n    \\sa operator-=(), operator+()\n*/\n\n/*! \\fn QJsonArray::const_iterator &QJsonArray::const_iterator::operator-=(int j)\n\n    Makes the iterator go back by \\a j items. If \\a j is negative,\n    the iterator goes forward.\n\n    \\sa operator+=(), operator-()\n*/\n\n/*! \\fn QJsonArray::const_iterator QJsonArray::const_iterator::operator+(int j) const\n\n    Returns an iterator to the item at \\a j positions forward from\n    this iterator. If \\a j is negative, the iterator goes backward.\n\n    \\sa operator-(), operator+=()\n*/\n\n/*! \\fn QJsonArray::const_iterator QJsonArray::const_iterator::operator-(int j) const\n\n    Returns an iterator to the item at \\a j positions backward from\n    this iterator. If \\a j is negative, the iterator goes forward.\n\n    \\sa operator+(), operator-=()\n*/\n\n/*! \\fn int QJsonArray::const_iterator::operator-(const_iterator other) const\n\n    Returns the number of items between the item pointed to by \\a\n    other and the item pointed to by this iterator.\n*/\n\n\n/*!\n    \\internal\n */\nvoid QJsonArray::detach(uint reserve)\n{\n    if (!d) {\n        d = new QJsonPrivate::Data(reserve, QJsonValue::Array);\n        a = static_cast<QJsonPrivate::Array *>(d->header->root());\n        d->ref.ref();\n        return;\n    }\n    /*\n    if (reserve == 0 && d->ref.load() == 1)\n        return;\n    */\n    if (reserve == 0 && int(d->ref) == 1)\n        return;\n\n    QJsonPrivate::Data *x = d->clone(a, reserve);\n    x->ref.ref();\n    if (!d->ref.deref())\n        delete d;\n    d = x;\n    a = static_cast<QJsonPrivate::Array *>(d->header->root());\n}\n\n/*!\n    \\internal\n */\nvoid QJsonArray::compact()\n{\n    if (!d || !d->compactionCounter)\n        return;\n\n    detach();\n    d->compact();\n    a = static_cast<QJsonPrivate::Array *>(d->header->root());\n}\n\n\n#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY)\nQDebug operator<<(QDebug dbg, const QJsonArray &a)\n{\n    if (!a.a) {\n        dbg << \"QJsonArray()\";\n        return dbg;\n    }\n    QByteArray json;\n    QJsonPrivate::Writer::arrayToJson(a.a, json, 0, true);\n    dbg.nospace() << \"QJsonArray(\"\n                  << json.constData() // print as utf-8 string without extra quotation marks\n                  << \")\";\n    return dbg.space();\n}\n#endif\n\nQT_END_NAMESPACE\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/json/qjsonarray.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the QtCore module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL21$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia. For licensing terms and\n** conditions see http://qt.digia.com/licensing. For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 or version 3 as published by the Free\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\n** LICENSE.LGPLv3 included in the packaging of this file. Please review the\n** following information to ensure the GNU Lesser General Public License\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights. These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#ifndef QJSONARRAY_H\n#define QJSONARRAY_H\n\n#include \"qjsonvalue.h\"\n\n#include <QtCore/qmetatype.h>\n#include <QtCore/qiterator.h>\n#if defined(Q_COMPILER_INITIALIZER_LISTS)\n#include <initializer_list>\n#endif\n\nQT_BEGIN_NAMESPACE\n\nclass QDebug;\nclass QStringList;\ntemplate <typename T> class QList;\ntypedef QList<QVariant> QVariantList;\n\nclass QJSON_EXPORT QJsonArray\n{\npublic:\n    QJsonArray();\n\n#if defined(Q_COMPILER_INITIALIZER_LISTS) || defined(Q_QDOC)\n    QJsonArray(std::initializer_list<QJsonValue> args)\n    {\n        initialize();\n        for (std::initializer_list<QJsonValue>::const_iterator i = args.begin(); i != args.end(); ++i)\n            append(*i);\n    }\n#endif\n\n    ~QJsonArray();\n\n    QJsonArray(const QJsonArray &other);\n    QJsonArray &operator =(const QJsonArray &other);\n\n    static QJsonArray fromStringList(const QStringList &list);\n    static QJsonArray fromVariantList(const QVariantList &list);\n    QVariantList toVariantList() const;\n\n    int size() const;\n    inline int count() const { return size(); }\n\n    bool isEmpty() const;\n    QJsonValue at(int i) const;\n    QJsonValue first() const;\n    QJsonValue last() const;\n\n    void prepend(const QJsonValue &value);\n    void append(const QJsonValue &value);\n    void removeAt(int i);\n    QJsonValue takeAt(int i);\n    inline void removeFirst() { removeAt(0); }\n    inline void removeLast() { removeAt(size() - 1); }\n\n    void insert(int i, const QJsonValue &value);\n    void replace(int i, const QJsonValue &value);\n\n    bool contains(const QJsonValue &element) const;\n    QJsonValueRef operator[](int i);\n    QJsonValue operator[](int i) const;\n\n    bool operator==(const QJsonArray &other) const;\n    bool operator!=(const QJsonArray &other) const;\n\n    class const_iterator;\n\n    class iterator {\n    public:\n        QJsonArray *a;\n        int i;\n        typedef std::random_access_iterator_tag  iterator_category;\n        typedef int difference_type;\n        typedef QJsonValue value_type;\n        typedef QJsonValueRef reference;\n        typedef QJsonValueRefPtr pointer;\n\n        inline iterator() : a(0), i(0) { }\n        explicit inline iterator(QJsonArray *array, int index) : a(array), i(index) { }\n\n        inline QJsonValueRef operator*() const { return QJsonValueRef(a, i); }\n#ifdef Q_QDOC\n        inline QJsonValueRef* operator->() const;\n#else\n        inline QJsonValueRefPtr operator->() const { return QJsonValueRefPtr(a, i); }\n#endif\n        inline QJsonValueRef operator[](int j) const { return QJsonValueRef(a, i + j); }\n\n        inline bool operator==(const iterator &o) const { return i == o.i; }\n        inline bool operator!=(const iterator &o) const { return i != o.i; }\n        inline bool operator<(const iterator& other) const { return i < other.i; }\n        inline bool operator<=(const iterator& other) const { return i <= other.i; }\n        inline bool operator>(const iterator& other) const { return i > other.i; }\n        inline bool operator>=(const iterator& other) const { return i >= other.i; }\n        inline bool operator==(const const_iterator &o) const { return i == o.i; }\n        inline bool operator!=(const const_iterator &o) const { return i != o.i; }\n        inline bool operator<(const const_iterator& other) const { return i < other.i; }\n        inline bool operator<=(const const_iterator& other) const { return i <= other.i; }\n        inline bool operator>(const const_iterator& other) const { return i > other.i; }\n        inline bool operator>=(const const_iterator& other) const { return i >= other.i; }\n        inline iterator &operator++() { ++i; return *this; }\n        inline iterator operator++(int) { iterator n = *this; ++i; return n; }\n        inline iterator &operator--() { i--; return *this; }\n        inline iterator operator--(int) { iterator n = *this; i--; return n; }\n        inline iterator &operator+=(int j) { i+=j; return *this; }\n        inline iterator &operator-=(int j) { i-=j; return *this; }\n        inline iterator operator+(int j) const { return iterator(a, i+j); }\n        inline iterator operator-(int j) const { return iterator(a, i-j); }\n        inline int operator-(iterator j) const { return i - j.i; }\n    };\n    friend class iterator;\n\n    class const_iterator {\n    public:\n        const QJsonArray *a;\n        int i;\n        typedef std::random_access_iterator_tag  iterator_category;\n        typedef qptrdiff difference_type;\n        typedef QJsonValue value_type;\n        typedef QJsonValue reference;\n        typedef QJsonValuePtr pointer;\n\n        inline const_iterator() : a(0), i(0) { }\n        explicit inline const_iterator(const QJsonArray *array, int index) : a(array), i(index) { }\n        inline const_iterator(const const_iterator &o) : a(o.a), i(o.i) {}\n        inline const_iterator(const iterator &o) : a(o.a), i(o.i) {}\n\n        inline QJsonValue operator*() const { return a->at(i); }\n#ifdef Q_QDOC\n        inline QJsonValue* operator->() const;\n#else\n        inline QJsonValuePtr operator->() const { return QJsonValuePtr(a->at(i)); }\n#endif\n        inline QJsonValue operator[](int j) const { return a->at(i+j); }\n        inline bool operator==(const const_iterator &o) const { return i == o.i; }\n        inline bool operator!=(const const_iterator &o) const { return i != o.i; }\n        inline bool operator<(const const_iterator& other) const { return i < other.i; }\n        inline bool operator<=(const const_iterator& other) const { return i <= other.i; }\n        inline bool operator>(const const_iterator& other) const { return i > other.i; }\n        inline bool operator>=(const const_iterator& other) const { return i >= other.i; }\n        inline const_iterator &operator++() { ++i; return *this; }\n        inline const_iterator operator++(int) { const_iterator n = *this; ++i; return n; }\n        inline const_iterator &operator--() { i--; return *this; }\n        inline const_iterator operator--(int) { const_iterator n = *this; i--; return n; }\n        inline const_iterator &operator+=(int j) { i+=j; return *this; }\n        inline const_iterator &operator-=(int j) { i-=j; return *this; }\n        inline const_iterator operator+(int j) const { return const_iterator(a, i+j); }\n        inline const_iterator operator-(int j) const { return const_iterator(a, i-j); }\n        inline int operator-(const_iterator j) const { return i - j.i; }\n    };\n    friend class const_iterator;\n\n    // stl style\n    inline iterator begin() { detach(); return iterator(this, 0); }\n    inline const_iterator begin() const { return const_iterator(this, 0); }\n    inline const_iterator constBegin() const { return const_iterator(this, 0); }\n    inline iterator end() { detach(); return iterator(this, size()); }\n    inline const_iterator end() const { return const_iterator(this, size()); }\n    inline const_iterator constEnd() const { return const_iterator(this, size()); }\n    iterator insert(iterator before, const QJsonValue &value) { insert(before.i, value); return before; }\n    iterator erase(iterator it) { removeAt(it.i); return it; }\n\n    // more Qt\n    typedef iterator Iterator;\n    typedef const_iterator ConstIterator;\n\n    // convenience\n    inline QJsonArray operator+(const QJsonValue &v) const\n    { QJsonArray n = *this; n += v; return n; }\n    inline QJsonArray &operator+=(const QJsonValue &v)\n    { append(v); return *this; }\n    inline QJsonArray &operator<< (const QJsonValue &v)\n    { append(v); return *this; }\n\n    // stl compatibility\n    inline void push_back(const QJsonValue &t) { append(t); }\n    inline void push_front(const QJsonValue &t) { prepend(t); }\n    inline void pop_front() { removeFirst(); }\n    inline void pop_back() { removeLast(); }\n    inline bool empty() const { return isEmpty(); }\n    typedef int size_type;\n    typedef QJsonValue value_type;\n    typedef value_type *pointer;\n    typedef const value_type *const_pointer;\n    typedef QJsonValueRef reference;\n    typedef QJsonValue const_reference;\n    typedef int difference_type;\n\nprivate:\n    friend class QJsonPrivate::Data;\n    friend class QJsonValue;\n    friend class QJsonDocument;\n    friend QJSON_EXPORT QDebug operator<<(QDebug, const QJsonArray &);\n\n    QJsonArray(QJsonPrivate::Data *data, QJsonPrivate::Array *array);\n    void initialize();\n    void compact();\n    void detach(uint reserve = 0);\n\n    QJsonPrivate::Data *d;\n    QJsonPrivate::Array *a;\n};\n\nQ_DECLARE_METATYPE(QJsonArray)\n\n#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY)\nQJSON_EXPORT QDebug operator<<(QDebug, const QJsonArray &);\n#endif\n\nQT_END_NAMESPACE\n\n#endif // QJSONARRAY_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/json/qjsondocument.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the QtCore module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL21$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia. For licensing terms and\n** conditions see http://qt.digia.com/licensing. For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 or version 3 as published by the Free\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\n** LICENSE.LGPLv3 included in the packaging of this file. Please review the\n** following information to ensure the GNU Lesser General Public License\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights. These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#include \"qjsondocument.h\"\n#include \"qjsonobject.h\"\n#include \"qjsonvalue.h\"\n#include \"qjsonarray.h\"\n#include <qstringlist.h>\n#include <qvariant.h>\n#include <qdebug.h>\n#include \"qjsonwriter_p.h\"\n#include \"qjsonparser_p.h\"\n#include \"qjson_p.h\"\n\nQT_BEGIN_NAMESPACE\n\n/*! \\class QJsonDocument\n    \\inmodule QtCore\n    \\ingroup json\n    \\reentrant\n    \\since 5.0\n\n    \\brief The QJsonDocument class provides a way to read and write JSON documents.\n\n    QJsonDocument is a class that wraps a complete JSON document and can read and\n    write this document both from a UTF-8 encoded text based representation as well\n    as Qt's own binary format.\n\n    A JSON document can be converted from its text-based representation to a QJsonDocument\n    using QJsonDocument::fromJson(). toJson() converts it back to text. The parser is very\n    fast and efficient and converts the JSON to the binary representation used by Qt.\n\n    Validity of the parsed document can be queried with !isNull()\n\n    A document can be queried as to whether it contains an array or an object using isArray()\n    and isObject(). The array or object contained in the document can be retrieved using\n    array() or object() and then read or manipulated.\n\n    A document can also be created from a stored binary representation using fromBinaryData() or\n    fromRawData().\n\n    \\sa {JSON Support in Qt}, {JSON Save Game Example}\n*/\n\n/*!\n * Constructs an empty and invalid document.\n */\nQJsonDocument::QJsonDocument()\n    : d(0)\n{\n}\n\n/*!\n * Creates a QJsonDocument from \\a object.\n */\nQJsonDocument::QJsonDocument(const QJsonObject &object)\n    : d(0)\n{\n    setObject(object);\n}\n\n/*!\n * Constructs a QJsonDocument from \\a array.\n */\nQJsonDocument::QJsonDocument(const QJsonArray &array)\n    : d(0)\n{\n    setArray(array);\n}\n\n/*!\n    \\internal\n */\nQJsonDocument::QJsonDocument(QJsonPrivate::Data *data)\n    : d(data)\n{\n    Q_ASSERT(d);\n    d->ref.ref();\n}\n\n/*!\n Deletes the document.\n\n Binary data set with fromRawData is not freed.\n */\nQJsonDocument::~QJsonDocument()\n{\n    if (d && !d->ref.deref())\n        delete d;\n}\n\n/*!\n * Creates a copy of the \\a other document.\n */\nQJsonDocument::QJsonDocument(const QJsonDocument &other)\n{\n    d = other.d;\n    if (d)\n        d->ref.ref();\n}\n\n/*!\n * Assigns the \\a other document to this QJsonDocument.\n * Returns a reference to this object.\n */\nQJsonDocument &QJsonDocument::operator =(const QJsonDocument &other)\n{\n    if (d != other.d) {\n        if (d && !d->ref.deref())\n            delete d;\n        d = other.d;\n        if (d)\n            d->ref.ref();\n    }\n\n    return *this;\n}\n\n/*! \\enum QJsonDocument::DataValidation\n\n  This value is used to tell QJsonDocument whether to validate the binary data\n  when converting to a QJsonDocument using fromBinaryData() or fromRawData().\n\n  \\value Validate Validate the data before using it. This is the default.\n  \\value BypassValidation Bypasses data validation. Only use if you received the\n  data from a trusted place and know it's valid, as using of invalid data can crash\n  the application.\n  */\n\n/*!\n Creates a QJsonDocument that uses the first \\a size bytes from\n \\a data. It assumes \\a data contains a binary encoded JSON document.\n The created document does not take ownership of \\a data and the caller\n has to guarantee that \\a data will not be deleted or modified as long as\n any QJsonDocument, QJsonObject or QJsonArray still references the data.\n\n \\a data has to be aligned to a 4 byte boundary.\n\n \\a validation decides whether the data is checked for validity before being used.\n By default the data is validated. If the \\a data is not valid, the method returns\n a null document.\n\n Returns a QJsonDocument representing the data.\n\n \\sa rawData(), fromBinaryData(), isNull(), DataValidation\n */\nQJsonDocument QJsonDocument::fromRawData(const char *data, int size, DataValidation validation)\n{\n    if (quintptr(data) & 3) {\n        qWarning() <<\"QJsonDocument::fromRawData: data has to have 4 byte alignment\";\n        return QJsonDocument();\n    }\n\n    QJsonPrivate::Data *d = new QJsonPrivate::Data((char *)data, size);\n    d->ownsData = false;\n\n    if (validation != BypassValidation && !d->valid()) {\n        delete d;\n        return QJsonDocument();\n    }\n\n    return QJsonDocument(d);\n}\n\n/*!\n  Returns the raw binary representation of the data\n  \\a size will contain the size of the returned data.\n\n  This method is useful to e.g. stream the JSON document\n  in it's binary form to a file.\n */\nconst char *QJsonDocument::rawData(int *size) const\n{\n    if (!d) {\n        *size = 0;\n        return 0;\n    }\n    *size = d->alloc;\n    return d->rawData;\n}\n\n/*!\n Creates a QJsonDocument from \\a data.\n\n \\a validation decides whether the data is checked for validity before being used.\n By default the data is validated. If the \\a data is not valid, the method returns\n a null document.\n\n \\sa toBinaryData(), fromRawData(), isNull(), DataValidation\n */\nQJsonDocument QJsonDocument::fromBinaryData(const QByteArray &data, DataValidation validation)\n{\n    if (data.size() < (int)(sizeof(QJsonPrivate::Header) + sizeof(QJsonPrivate::Base)))\n        return QJsonDocument();\n\n    QJsonPrivate::Header h;\n    memcpy(&h, data.constData(), sizeof(QJsonPrivate::Header));\n    QJsonPrivate::Base root;\n    memcpy(&root, data.constData() + sizeof(QJsonPrivate::Header), sizeof(QJsonPrivate::Base));\n\n    // do basic checks here, so we don't try to allocate more memory than we can.\n    if (h.tag != QJsonDocument::BinaryFormatTag || h.version != 1u ||\n        sizeof(QJsonPrivate::Header) + root.size > (uint)data.size())\n        return QJsonDocument();\n\n    const uint size = sizeof(QJsonPrivate::Header) + root.size;\n    char *raw = (char *)malloc(size);\n    if (!raw)\n        return QJsonDocument();\n\n    memcpy(raw, data.constData(), size);\n    QJsonPrivate::Data *d = new QJsonPrivate::Data(raw, size);\n\n    if (validation != BypassValidation && !d->valid()) {\n        delete d;\n        return QJsonDocument();\n    }\n\n    return QJsonDocument(d);\n}\n\n/*!\n Creates a QJsonDocument from the QVariant \\a variant.\n\n If the \\a variant contains any other type than a QVariantMap,\n QVariantList or QStringList, the returned document\n document is invalid.\n\n \\sa toVariant()\n */\nQJsonDocument QJsonDocument::fromVariant(const QVariant &variant)\n{\n    QJsonDocument doc;\n    if (variant.type() == QVariant::Map) {\n        doc.setObject(QJsonObject::fromVariantMap(variant.toMap()));\n    } else if (variant.type() == QVariant::List) {\n        doc.setArray(QJsonArray::fromVariantList(variant.toList()));\n    } else if (variant.type() == QVariant::StringList) {\n        doc.setArray(QJsonArray::fromStringList(variant.toStringList()));\n    }\n    return doc;\n}\n\n/*!\n Returns a QVariant representing the Json document.\n\n The returned variant will be a QVariantList if the document is\n a QJsonArray and a QVariantMap if the document is a QJsonObject.\n\n \\sa fromVariant(), QJsonValue::toVariant()\n */\nQVariant QJsonDocument::toVariant() const\n{\n    if (!d)\n        return QVariant();\n\n    if (d->header->root()->isArray())\n        return QJsonArray(d, static_cast<QJsonPrivate::Array *>(d->header->root())).toVariantList();\n    else\n        return QJsonObject(d, static_cast<QJsonPrivate::Object *>(d->header->root())).toVariantMap();\n}\n\n/*!\n Converts the QJsonDocument to a UTF-8 encoded JSON document.\n\n \\sa fromJson()\n */\n#ifndef QT_JSON_READONLY\nQByteArray QJsonDocument::toJson() const\n{\n    return toJson(Indented);\n}\n#endif\n\n/*!\n    \\enum QJsonDocument::JsonFormat\n\n    This value defines the format of the JSON byte array produced\n    when converting to a QJsonDocument using toJson().\n\n    \\value Indented Defines human readable output as follows:\n        \\code\n        {\n            \"Array\": [\n                true,\n                999,\n                \"string\"\n            ],\n            \"Key\": \"Value\",\n            \"null\": null\n        }\n        \\endcode\n\n    \\value Compact Defines a compact output as follows:\n        \\code\n        {\"Array\":[true,999,\"string\"],\"Key\":\"Value\",\"null\":null}\n        \\endcode\n  */\n\n/*!\n    Converts the QJsonDocument to a UTF-8 encoded JSON document in the provided \\a format.\n\n    \\sa fromJson(), JsonFormat\n */\n#ifndef QT_JSON_READONLY\nQByteArray QJsonDocument::toJson(JsonFormat format) const\n{\n    if (!d)\n        return QByteArray();\n\n    QByteArray json;\n\n    if (d->header->root()->isArray())\n        QJsonPrivate::Writer::arrayToJson(static_cast<QJsonPrivate::Array *>(d->header->root()), json, 0, (format == Compact));\n    else\n        QJsonPrivate::Writer::objectToJson(static_cast<QJsonPrivate::Object *>(d->header->root()), json, 0, (format == Compact));\n\n    return json;\n}\n#endif\n\n/*!\n Parses a UTF-8 encoded JSON document and creates a QJsonDocument\n from it.\n\n \\a json contains the json document to be parsed.\n\n The optional \\a error variable can be used to pass in a QJsonParseError data\n structure that will contain information about possible errors encountered during\n parsing.\n\n \\sa toJson(), QJsonParseError\n */\nQJsonDocument QJsonDocument::fromJson(const QByteArray &json, QJsonParseError *error)\n{\n    QJsonPrivate::Parser parser(json.constData(), json.length());\n    return parser.parse(error);\n}\n\n/*!\n    Returns \\c true if the document doesn't contain any data.\n */\nbool QJsonDocument::isEmpty() const\n{\n    if (!d)\n        return true;\n\n    return false;\n}\n\n/*!\n Returns a binary representation of the document.\n\n The binary representation is also the native format used internally in Qt,\n and is very efficient and fast to convert to and from.\n\n The binary format can be stored on disk and interchanged with other applications\n or computers. fromBinaryData() can be used to convert it back into a\n JSON document.\n\n \\sa fromBinaryData()\n */\nQByteArray QJsonDocument::toBinaryData() const\n{\n    if (!d || !d->rawData)\n        return QByteArray();\n\n    return QByteArray(d->rawData, d->header->root()->size + sizeof(QJsonPrivate::Header));\n}\n\n/*!\n    Returns \\c true if the document contains an array.\n\n    \\sa array(), isObject()\n */\nbool QJsonDocument::isArray() const\n{\n    if (!d)\n        return false;\n\n    QJsonPrivate::Header *h = (QJsonPrivate::Header *)d->rawData;\n    return h->root()->isArray();\n}\n\n/*!\n    Returns \\c true if the document contains an object.\n\n    \\sa object(), isArray()\n */\nbool QJsonDocument::isObject() const\n{\n    if (!d)\n        return false;\n\n    QJsonPrivate::Header *h = (QJsonPrivate::Header *)d->rawData;\n    return h->root()->isObject();\n}\n\n/*!\n    Returns the QJsonObject contained in the document.\n\n    Returns an empty object if the document contains an\n    array.\n\n    \\sa isObject(), array(), setObject()\n */\nQJsonObject QJsonDocument::object() const\n{\n    if (d) {\n        QJsonPrivate::Base *b = d->header->root();\n        if (b->isObject())\n            return QJsonObject(d, static_cast<QJsonPrivate::Object *>(b));\n    }\n    return QJsonObject();\n}\n\n/*!\n    Returns the QJsonArray contained in the document.\n\n    Returns an empty array if the document contains an\n    object.\n\n    \\sa isArray(), object(), setArray()\n */\nQJsonArray QJsonDocument::array() const\n{\n    if (d) {\n        QJsonPrivate::Base *b = d->header->root();\n        if (b->isArray())\n            return QJsonArray(d, static_cast<QJsonPrivate::Array *>(b));\n    }\n    return QJsonArray();\n}\n\n/*!\n    Sets \\a object as the main object of this document.\n\n    \\sa setArray(), object()\n */\nvoid QJsonDocument::setObject(const QJsonObject &object)\n{\n    if (d && !d->ref.deref())\n        delete d;\n\n    d = object.d;\n\n    if (!d) {\n        d = new QJsonPrivate::Data(0, QJsonValue::Object);\n    } else if (d->compactionCounter || object.o != d->header->root()) {\n        QJsonObject o(object);\n        if (d->compactionCounter)\n            o.compact();\n        else\n            o.detach();\n        d = o.d;\n        d->ref.ref();\n        return;\n    }\n    d->ref.ref();\n}\n\n/*!\n    Sets \\a array as the main object of this document.\n\n    \\sa setObject(), array()\n */\nvoid QJsonDocument::setArray(const QJsonArray &array)\n{\n    if (d && !d->ref.deref())\n        delete d;\n\n    d = array.d;\n\n    if (!d) {\n        d = new QJsonPrivate::Data(0, QJsonValue::Array);\n    } else if (d->compactionCounter || array.a != d->header->root()) {\n        QJsonArray a(array);\n        if (d->compactionCounter)\n            a.compact();\n        else\n            a.detach();\n        d = a.d;\n        d->ref.ref();\n        return;\n    }\n    d->ref.ref();\n}\n\n/*!\n    Returns \\c true if the \\a other document is equal to this document.\n */\nbool QJsonDocument::operator==(const QJsonDocument &other) const\n{\n    if (d == other.d)\n        return true;\n\n    if (!d || !other.d)\n        return false;\n\n    if (d->header->root()->isArray() != other.d->header->root()->isArray())\n        return false;\n\n    if (d->header->root()->isObject())\n        return QJsonObject(d, static_cast<QJsonPrivate::Object *>(d->header->root()))\n                == QJsonObject(other.d, static_cast<QJsonPrivate::Object *>(other.d->header->root()));\n    else\n        return QJsonArray(d, static_cast<QJsonPrivate::Array *>(d->header->root()))\n                == QJsonArray(other.d, static_cast<QJsonPrivate::Array *>(other.d->header->root()));\n}\n\n/*!\n \\fn bool QJsonDocument::operator!=(const QJsonDocument &other) const\n\n    returns \\c true if \\a other is not equal to this document\n */\n\n/*!\n    returns \\c true if this document is null.\n\n    Null documents are documents created through the default constructor.\n\n    Documents created from UTF-8 encoded text or the binary format are\n    validated during parsing. If validation fails, the returned document\n    will also be null.\n */\nbool QJsonDocument::isNull() const\n{\n    return (d == 0);\n}\n\n#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY)\nQDebug operator<<(QDebug dbg, const QJsonDocument &o)\n{\n    if (!o.d) {\n        dbg << \"QJsonDocument()\";\n        return dbg;\n    }\n    QByteArray json;\n    if (o.d->header->root()->isArray())\n        QJsonPrivate::Writer::arrayToJson(static_cast<QJsonPrivate::Array *>(o.d->header->root()), json, 0, true);\n    else\n        QJsonPrivate::Writer::objectToJson(static_cast<QJsonPrivate::Object *>(o.d->header->root()), json, 0, true);\n    dbg.nospace() << \"QJsonDocument(\"\n                  << json.constData() // print as utf-8 string without extra quotation marks\n                  << \")\";\n    return dbg.space();\n}\n#endif\n\nQT_END_NAMESPACE\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/json/qjsondocument.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the QtCore module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL21$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia. For licensing terms and\n** conditions see http://qt.digia.com/licensing. For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 or version 3 as published by the Free\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\n** LICENSE.LGPLv3 included in the packaging of this file. Please review the\n** following information to ensure the GNU Lesser General Public License\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights. These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#ifndef QJSONDOCUMENT_H\n#define QJSONDOCUMENT_H\n\n#include \"qjsonvalue.h\"\n\nQT_BEGIN_NAMESPACE\n\nclass QDebug;\n\nnamespace QJsonPrivate {\n    class Parser;\n}\n\nstruct QJSON_EXPORT QJsonParseError\n{\n    enum ParseError {\n        NoError = 0,\n        UnterminatedObject,\n        MissingNameSeparator,\n        UnterminatedArray,\n        MissingValueSeparator,\n        IllegalValue,\n        TerminationByNumber,\n        IllegalNumber,\n        IllegalEscapeSequence,\n        IllegalUTF8String,\n        UnterminatedString,\n        MissingObject,\n        DeepNesting,\n        DocumentTooLarge,\n        GarbageAtEnd\n    };\n\n    QString    errorString() const;\n\n    int        offset;\n    ParseError error;\n};\n\nclass QJSON_EXPORT QJsonDocument\n{\npublic:\n#ifdef Q_LITTLE_ENDIAN\n    static const uint BinaryFormatTag = ('q') | ('b' << 8) | ('j' << 16) | ('s' << 24);\n#else\n    static const uint BinaryFormatTag = ('q' << 24) | ('b' << 16) | ('j' << 8) | ('s');\n#endif\n\n    QJsonDocument();\n    explicit QJsonDocument(const QJsonObject &object);\n    explicit QJsonDocument(const QJsonArray &array);\n    ~QJsonDocument();\n\n    QJsonDocument(const QJsonDocument &other);\n    QJsonDocument &operator =(const QJsonDocument &other);\n\n    enum DataValidation {\n        Validate,\n        BypassValidation\n    };\n\n    static QJsonDocument fromRawData(const char *data, int size, DataValidation validation = Validate);\n    const char *rawData(int *size) const;\n\n    static QJsonDocument fromBinaryData(const QByteArray &data, DataValidation validation  = Validate);\n    QByteArray toBinaryData() const;\n\n    static QJsonDocument fromVariant(const QVariant &variant);\n    QVariant toVariant() const;\n\n    enum JsonFormat {\n        Indented,\n        Compact\n    };\n\n    static QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error = 0);\n\n#ifdef Q_QDOC\n    QByteArray toJson(JsonFormat format = Indented) const;\n#elif !defined(QT_JSON_READONLY)\n    QByteArray toJson() const; //### Merge in Qt6\n    QByteArray toJson(JsonFormat format) const;\n#endif\n\n    bool isEmpty() const;\n    bool isArray() const;\n    bool isObject() const;\n\n    QJsonObject object() const;\n    QJsonArray array() const;\n\n    void setObject(const QJsonObject &object);\n    void setArray(const QJsonArray &array);\n\n    bool operator==(const QJsonDocument &other) const;\n    bool operator!=(const QJsonDocument &other) const { return !(*this == other); }\n\n    bool isNull() const;\n\nprivate:\n    friend class QJsonValue;\n    friend class QJsonPrivate::Data;\n    friend class QJsonPrivate::Parser;\n    friend QJSON_EXPORT QDebug operator<<(QDebug, const QJsonDocument &);\n\n    QJsonDocument(QJsonPrivate::Data *data);\n\n    QJsonPrivate::Data *d;\n};\n\n#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY)\nQJSON_EXPORT QDebug operator<<(QDebug, const QJsonDocument &);\n#endif\n\nQT_END_NAMESPACE\n\n#endif // QJSONDOCUMENT_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/json/qjsonobject.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the QtCore module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL21$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia. For licensing terms and\n** conditions see http://qt.digia.com/licensing. For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 or version 3 as published by the Free\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\n** LICENSE.LGPLv3 included in the packaging of this file. Please review the\n** following information to ensure the GNU Lesser General Public License\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights. These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#include <qjsonobject.h>\n#include <qjsonvalue.h>\n#include <qjsonarray.h>\n#include <qstringlist.h>\n#include <qdebug.h>\n#include <qvariant.h>\n#include \"qjson_p.h\"\n#include \"qjsonwriter_p.h\"\n\nQT_BEGIN_NAMESPACE\n\n/*!\n    \\class QJsonObject\n    \\inmodule QtCore\n    \\ingroup json\n    \\reentrant\n    \\since 5.0\n\n    \\brief The QJsonObject class encapsulates a JSON object.\n\n    A JSON object is a list of key value pairs, where the keys are unique strings\n    and the values are represented by a QJsonValue.\n\n    A QJsonObject can be converted to and from a QVariantMap. You can query the\n    number of (key, value) pairs with size(), insert(), and remove() entries from it\n    and iterate over its content using the standard C++ iterator pattern.\n\n    QJsonObject is an implicitly shared class, and shares the data with the document\n    it has been created from as long as it is not being modified.\n\n    You can convert the object to and from text based JSON through QJsonDocument.\n\n    \\sa {JSON Support in Qt}, {JSON Save Game Example}\n*/\n\n/*!\n    \\typedef QJsonObject::Iterator\n\n    Qt-style synonym for QJsonObject::iterator.\n*/\n\n/*!\n    \\typedef QJsonObject::ConstIterator\n\n    Qt-style synonym for QJsonObject::const_iterator.\n*/\n\n/*!\n    \\typedef QJsonObject::key_type\n\n    Typedef for QString. Provided for STL compatibility.\n*/\n\n/*!\n    \\typedef QJsonObject::mapped_type\n\n    Typedef for QJsonValue. Provided for STL compatibility.\n*/\n\n/*!\n    \\typedef QJsonObject::size_type\n\n    Typedef for int. Provided for STL compatibility.\n*/\n\n\n/*!\n    Constructs an empty JSON object.\n\n    \\sa isEmpty()\n */\nQJsonObject::QJsonObject()\n    : d(0), o(0)\n{\n}\n\n/*!\n    \\fn QJsonObject::QJsonObject(std::initializer_list<QPair<QString, QJsonValue> > args)\n    \\since 5.4\n    Constructs a QJsonObject instance initialized from \\a args initialization list.\n    For example:\n    \\code\n    QJsonObject object\n    {\n        {\"property1\", 1},\n        {\"property2\", 2}\n    };\n    \\endcode\n*/\n\n/*!\n    \\internal\n */\nQJsonObject::QJsonObject(QJsonPrivate::Data *data, QJsonPrivate::Object *object)\n    : d(data), o(object)\n{\n    Q_ASSERT(d);\n    Q_ASSERT(o);\n    d->ref.ref();\n}\n\n/*!\n    This method replaces part of the QJsonObject(std::initializer_list<QPair<QString, QJsonValue>> args) body.\n    The constructor needs to be inline, but we do not want to leak implementation details\n    of this class.\n    \\note this method is called for an uninitialized object\n    \\internal\n */\n\nvoid QJsonObject::initialize()\n{\n    d = 0;\n    o = 0;\n}\n\n/*!\n    Destroys the object.\n */\nQJsonObject::~QJsonObject()\n{\n    if (d && !d->ref.deref())\n        delete d;\n}\n\n/*!\n    Creates a copy of \\a other.\n\n    Since QJsonObject is implicitly shared, the copy is shallow\n    as long as the object does not get modified.\n */\nQJsonObject::QJsonObject(const QJsonObject &other)\n{\n    d = other.d;\n    o = other.o;\n    if (d)\n        d->ref.ref();\n}\n\n/*!\n    Assigns \\a other to this object.\n */\nQJsonObject &QJsonObject::operator =(const QJsonObject &other)\n{\n    if (d != other.d) {\n        if (d && !d->ref.deref())\n            delete d;\n        d = other.d;\n        if (d)\n            d->ref.ref();\n    }\n    o = other.o;\n\n    return *this;\n}\n\n/*!\n    Converts the variant map \\a map to a QJsonObject.\n\n    The keys in \\a map will be used as the keys in the JSON object,\n    and the QVariant values will be converted to JSON values.\n\n    \\sa toVariantMap(), QJsonValue::fromVariant()\n */\nQJsonObject QJsonObject::fromVariantMap(const QVariantMap &map)\n{\n    // ### this is implemented the trivial way, not the most efficient way\n\n    QJsonObject object;\n    for (QVariantMap::const_iterator it = map.constBegin(); it != map.constEnd(); ++it)\n        object.insert(it.key(), QJsonValue::fromVariant(it.value()));\n    return object;\n}\n\n/*!\n    Converts this object to a QVariantMap.\n\n    Returns the created map.\n */\nQVariantMap QJsonObject::toVariantMap() const\n{\n    QVariantMap map;\n    if (o) {\n        for (uint i = 0; i < o->length; ++i) {\n            QJsonPrivate::Entry *e = o->entryAt(i);\n            map.insert(e->key(), QJsonValue(d, o, e->value).toVariant());\n        }\n    }\n    return map;\n}\n\n/*!\n    Returns a list of all keys in this object.\n */\nQStringList QJsonObject::keys() const\n{\n    if (!d)\n        return QStringList();\n\n    QStringList keys;\n\n    for (uint i = 0; i < o->length; ++i) {\n        QJsonPrivate::Entry *e = o->entryAt(i);\n        keys.append(e->key());\n    }\n\n    return keys;\n}\n\n/*!\n    Returns the number of (key, value) pairs stored in the object.\n */\nint QJsonObject::size() const\n{\n    if (!d)\n        return 0;\n\n    return o->length;\n}\n\n/*!\n    Returns \\c true if the object is empty. This is the same as size() == 0.\n\n    \\sa size()\n */\nbool QJsonObject::isEmpty() const\n{\n    if (!d)\n        return true;\n\n    return !o->length;\n}\n\n/*!\n    Returns a QJsonValue representing the value for the key \\a key.\n\n    The returned QJsonValue is QJsonValue::Undefined if the key does not exist.\n\n    \\sa QJsonValue, QJsonValue::isUndefined()\n */\nQJsonValue QJsonObject::value(const QString &key) const\n{\n    if (!d)\n        return QJsonValue(QJsonValue::Undefined);\n\n    bool keyExists;\n    int i = o->indexOf(key, &keyExists);\n    if (!keyExists)\n        return QJsonValue(QJsonValue::Undefined);\n    return QJsonValue(d, o, o->entryAt(i)->value);\n}\n\n/*!\n    Returns a QJsonValue representing the value for the key \\a key.\n\n    This does the same as value().\n\n    The returned QJsonValue is QJsonValue::Undefined if the key does not exist.\n\n    \\sa value(), QJsonValue, QJsonValue::isUndefined()\n */\nQJsonValue QJsonObject::operator [](const QString &key) const\n{\n    return value(key);\n}\n\n/*!\n    Returns a reference to the value for \\a key.\n\n    The return value is of type QJsonValueRef, a helper class for QJsonArray\n    and QJsonObject. When you get an object of type QJsonValueRef, you can\n    use it as if it were a reference to a QJsonValue. If you assign to it,\n    the assignment will apply to the element in the QJsonArray or QJsonObject\n    from which you got the reference.\n\n    \\sa value()\n */\nQJsonValueRef QJsonObject::operator [](const QString &key)\n{\n    // ### somewhat inefficient, as we lookup the key twice if it doesn't yet exist\n    bool keyExists = false;\n    int index = o ? o->indexOf(key, &keyExists) : -1;\n    if (!keyExists) {\n        iterator i = insert(key, QJsonValue());\n        index = i.i;\n    }\n    return QJsonValueRef(this, index);\n}\n\n/*!\n    Inserts a new item with the key \\a key and a value of \\a value.\n\n    If there is already an item with the key \\a key, then that item's value\n    is replaced with \\a value.\n\n    Returns an iterator pointing to the inserted item.\n\n    If the value is QJsonValue::Undefined, it will cause the key to get removed\n    from the object. The returned iterator will then point to end().\n\n    \\sa remove(), take(), QJsonObject::iterator, end()\n */\nQJsonObject::iterator QJsonObject::insert(const QString &key, const QJsonValue &value)\n{\n    if (value.t == QJsonValue::Undefined) {\n        remove(key);\n        return end();\n    }\n    QJsonValue val = value;\n\n    bool latinOrIntValue;\n    int valueSize = QJsonPrivate::Value::requiredStorage(val, &latinOrIntValue);\n\n    bool latinKey = QJsonPrivate::useCompressed(key);\n    int valueOffset = sizeof(QJsonPrivate::Entry) + QJsonPrivate::qStringSize(key, latinKey);\n    int requiredSize = valueOffset + valueSize;\n\n    detach(requiredSize + sizeof(QJsonPrivate::offset)); // offset for the new index entry\n\n    if (!o->length)\n        o->tableOffset = sizeof(QJsonPrivate::Object);\n\n    bool keyExists = false;\n    int pos = o->indexOf(key, &keyExists);\n    if (keyExists)\n        ++d->compactionCounter;\n\n    uint off = o->reserveSpace(requiredSize, pos, 1, keyExists);\n    if (!off)\n        return end();\n\n    QJsonPrivate::Entry *e = o->entryAt(pos);\n    e->value.type = val.t;\n    e->value.latinKey = latinKey;\n    e->value.latinOrIntValue = latinOrIntValue;\n    e->value.value = QJsonPrivate::Value::valueToStore(val, (char *)e - (char *)o + valueOffset);\n    QJsonPrivate::copyString((char *)(e + 1), key, latinKey);\n    if (valueSize)\n        QJsonPrivate::Value::copyData(val, (char *)e + valueOffset, latinOrIntValue);\n\n    if (d->compactionCounter > 32u && d->compactionCounter >= unsigned(o->length) / 2u)\n        compact();\n\n    return iterator(this, pos);\n}\n\n/*!\n    Removes \\a key from the object.\n\n    \\sa insert(), take()\n */\nvoid QJsonObject::remove(const QString &key)\n{\n    if (!d)\n        return;\n\n    bool keyExists;\n    int index = o->indexOf(key, &keyExists);\n    if (!keyExists)\n        return;\n\n    detach();\n    o->removeItems(index, 1);\n    ++d->compactionCounter;\n    if (d->compactionCounter > 32u && d->compactionCounter >= unsigned(o->length) / 2u)\n        compact();\n}\n\n/*!\n    Removes \\a key from the object.\n\n    Returns a QJsonValue containing the value referenced by \\a key.\n    If \\a key was not contained in the object, the returned QJsonValue\n    is QJsonValue::Undefined.\n\n    \\sa insert(), remove(), QJsonValue\n */\nQJsonValue QJsonObject::take(const QString &key)\n{\n    if (!o)\n        return QJsonValue(QJsonValue::Undefined);\n\n    bool keyExists;\n    int index = o->indexOf(key, &keyExists);\n    if (!keyExists)\n        return QJsonValue(QJsonValue::Undefined);\n\n    QJsonValue v(d, o, o->entryAt(index)->value);\n    detach();\n    o->removeItems(index, 1);\n    ++d->compactionCounter;\n    if (d->compactionCounter > 32u && d->compactionCounter >= unsigned(o->length) / 2u)\n        compact();\n\n    return v;\n}\n\n/*!\n    Returns \\c true if the object contains key \\a key.\n\n    \\sa insert(), remove(), take()\n */\nbool QJsonObject::contains(const QString &key) const\n{\n    if (!o)\n        return false;\n\n    bool keyExists;\n    o->indexOf(key, &keyExists);\n    return keyExists;\n}\n\n/*!\n    Returns \\c true if \\a other is equal to this object.\n */\nbool QJsonObject::operator==(const QJsonObject &other) const\n{\n    if (o == other.o)\n        return true;\n\n    if (!o)\n        return !other.o->length;\n    if (!other.o)\n        return !o->length;\n    if (o->length != other.o->length)\n        return false;\n\n    for (uint i = 0; i < o->length; ++i) {\n        QJsonPrivate::Entry *e = o->entryAt(i);\n        QJsonValue v(d, o, e->value);\n        if (other.value(e->key()) != v)\n            return false;\n    }\n\n    return true;\n}\n\n/*!\n    Returns \\c true if \\a other is not equal to this object.\n */\nbool QJsonObject::operator!=(const QJsonObject &other) const\n{\n    return !(*this == other);\n}\n\n/*!\n    Removes the (key, value) pair pointed to by the iterator \\a it\n    from the map, and returns an iterator to the next item in the\n    map.\n\n    \\sa remove()\n */\nQJsonObject::iterator QJsonObject::erase(QJsonObject::iterator it)\n{\n    Q_ASSERT(d && int(d->ref) == 1);\n    if (it.o != this || it.i < 0 || it.i >= (int)o->length)\n        return iterator(this, o->length);\n\n    int index = it.i;\n\n    o->removeItems(index, 1);\n    ++d->compactionCounter;\n    if (d->compactionCounter > 32u && d->compactionCounter >= unsigned(o->length) / 2u)\n        compact();\n\n    // iterator hasn't changed\n    return it;\n}\n\n/*!\n    Returns an iterator pointing to the item with key \\a key in the\n    map.\n\n    If the map contains no item with key \\a key, the function\n    returns end().\n */\nQJsonObject::iterator QJsonObject::find(const QString &key)\n{\n    bool keyExists = false;\n    int index = o ? o->indexOf(key, &keyExists) : 0;\n    if (!keyExists)\n        return end();\n    detach();\n    return iterator(this, index);\n}\n\n/*! \\fn QJsonObject::const_iterator QJsonObject::find(const QString &key) const\n\n    \\overload\n*/\n\n/*!\n    Returns a const iterator pointing to the item with key \\a key in the\n    map.\n\n    If the map contains no item with key \\a key, the function\n    returns constEnd().\n */\nQJsonObject::const_iterator QJsonObject::constFind(const QString &key) const\n{\n    bool keyExists = false;\n    int index = o ? o->indexOf(key, &keyExists) : 0;\n    if (!keyExists)\n        return end();\n    return const_iterator(this, index);\n}\n\n/*! \\fn int QJsonObject::count() const\n\n    \\overload\n\n    Same as size().\n*/\n\n/*! \\fn int QJsonObject::length() const\n\n    \\overload\n\n    Same as size().\n*/\n\n/*! \\fn QJsonObject::iterator QJsonObject::begin()\n\n    Returns an \\l{STL-style iterators}{STL-style iterator} pointing to the first item in\n    the object.\n\n    \\sa constBegin(), end()\n*/\n\n/*! \\fn QJsonObject::const_iterator QJsonObject::begin() const\n\n    \\overload\n*/\n\n/*! \\fn QJsonObject::const_iterator QJsonObject::constBegin() const\n\n    Returns a const \\l{STL-style iterators}{STL-style iterator} pointing to the first item\n    in the object.\n\n    \\sa begin(), constEnd()\n*/\n\n/*! \\fn QJsonObject::iterator QJsonObject::end()\n\n    Returns an \\l{STL-style iterators}{STL-style iterator} pointing to the imaginary item\n    after the last item in the object.\n\n    \\sa begin(), constEnd()\n*/\n\n/*! \\fn QJsonObject::const_iterator QJsonObject::end() const\n\n    \\overload\n*/\n\n/*! \\fn QJsonObject::const_iterator QJsonObject::constEnd() const\n\n    Returns a const \\l{STL-style iterators}{STL-style iterator} pointing to the imaginary\n    item after the last item in the object.\n\n    \\sa constBegin(), end()\n*/\n\n/*!\n    \\fn bool QJsonObject::empty() const\n\n    This function is provided for STL compatibility. It is equivalent\n    to isEmpty(), returning \\c true if the object is empty; otherwise\n    returning \\c false.\n*/\n\n/*! \\class QJsonObject::iterator\n    \\inmodule QtCore\n    \\ingroup json\n    \\reentrant\n    \\since 5.0\n\n    \\brief The QJsonObject::iterator class provides an STL-style non-const iterator for QJsonObject.\n\n    QJsonObject::iterator allows you to iterate over a QJsonObject\n    and to modify the value (but not the key) stored under\n    a particular key. If you want to iterate over a const QJsonObject, you\n    should use QJsonObject::const_iterator. It is generally good practice to\n    use QJsonObject::const_iterator on a non-const QJsonObject as well, unless you\n    need to change the QJsonObject through the iterator. Const iterators are\n    slightly faster, and improve code readability.\n\n    The default QJsonObject::iterator constructor creates an uninitialized\n    iterator. You must initialize it using a QJsonObject function like\n    QJsonObject::begin(), QJsonObject::end(), or QJsonObject::find() before you can\n    start iterating.\n\n    Multiple iterators can be used on the same object. Existing iterators will however\n    become dangling once the object gets modified.\n\n    \\sa QJsonObject::const_iterator, {JSON Support in Qt}, {JSON Save Game Example}\n*/\n\n/*! \\typedef QJsonObject::iterator::difference_type\n\n    \\internal\n*/\n\n/*! \\typedef QJsonObject::iterator::iterator_category\n\n    A synonym for \\e {std::bidirectional_iterator_tag} indicating\n    this iterator is a bidirectional iterator.\n*/\n\n/*! \\typedef QJsonObject::iterator::reference\n\n    \\internal\n*/\n\n/*! \\typedef QJsonObject::iterator::value_type\n\n    \\internal\n*/\n\n/*! \\fn QJsonObject::iterator::iterator()\n\n    Constructs an uninitialized iterator.\n\n    Functions like key(), value(), and operator++() must not be\n    called on an uninitialized iterator. Use operator=() to assign a\n    value to it before using it.\n\n    \\sa QJsonObject::begin(), QJsonObject::end()\n*/\n\n/*! \\fn QJsonObject::iterator::iterator(QJsonObject *obj, int index)\n    \\internal\n*/\n\n/*! \\fn QString QJsonObject::iterator::key() const\n\n    Returns the current item's key.\n\n    There is no direct way of changing an item's key through an\n    iterator, although it can be done by calling QJsonObject::erase()\n    followed by QJsonObject::insert().\n\n    \\sa value()\n*/\n\n/*! \\fn QJsonValueRef QJsonObject::iterator::value() const\n\n    Returns a modifiable reference to the current item's value.\n\n    You can change the value of an item by using value() on\n    the left side of an assignment.\n\n    The return value is of type QJsonValueRef, a helper class for QJsonArray\n    and QJsonObject. When you get an object of type QJsonValueRef, you can\n    use it as if it were a reference to a QJsonValue. If you assign to it,\n    the assignment will apply to the element in the QJsonArray or QJsonObject\n    from which you got the reference.\n\n    \\sa key(), operator*()\n*/\n\n/*! \\fn QJsonValueRef QJsonObject::iterator::operator*() const\n\n    Returns a modifiable reference to the current item's value.\n\n    Same as value().\n\n    The return value is of type QJsonValueRef, a helper class for QJsonArray\n    and QJsonObject. When you get an object of type QJsonValueRef, you can\n    use it as if it were a reference to a QJsonValue. If you assign to it,\n    the assignment will apply to the element in the QJsonArray or QJsonObject\n    from which you got the reference.\n\n    \\sa key()\n*/\n\n/*! \\fn QJsonValueRef *QJsonObject::iterator::operator->() const\n\n    Returns a pointer to a modifiable reference to the current item.\n*/\n\n/*!\n    \\fn bool QJsonObject::iterator::operator==(const iterator &other) const\n    \\fn bool QJsonObject::iterator::operator==(const const_iterator &other) const\n\n    Returns \\c true if \\a other points to the same item as this\n    iterator; otherwise returns \\c false.\n\n    \\sa operator!=()\n*/\n\n/*!\n    \\fn bool QJsonObject::iterator::operator!=(const iterator &other) const\n    \\fn bool QJsonObject::iterator::operator!=(const const_iterator &other) const\n\n    Returns \\c true if \\a other points to a different item than this\n    iterator; otherwise returns \\c false.\n\n    \\sa operator==()\n*/\n\n/*! \\fn QJsonObject::iterator QJsonObject::iterator::operator++()\n\n    The prefix ++ operator, \\c{++i}, advances the iterator to the\n    next item in the object and returns an iterator to the new current\n    item.\n\n    Calling this function on QJsonObject::end() leads to undefined results.\n\n    \\sa operator--()\n*/\n\n/*! \\fn QJsonObject::iterator QJsonObject::iterator::operator++(int)\n\n    \\overload\n\n    The postfix ++ operator, \\c{i++}, advances the iterator to the\n    next item in the object and returns an iterator to the previously\n    current item.\n*/\n\n/*! \\fn QJsonObject::iterator QJsonObject::iterator::operator--()\n\n    The prefix -- operator, \\c{--i}, makes the preceding item\n    current and returns an iterator pointing to the new current item.\n\n    Calling this function on QJsonObject::begin() leads to undefined\n    results.\n\n    \\sa operator++()\n*/\n\n/*! \\fn QJsonObject::iterator QJsonObject::iterator::operator--(int)\n\n    \\overload\n\n    The postfix -- operator, \\c{i--}, makes the preceding item\n    current and returns an iterator pointing to the previously\n    current item.\n*/\n\n/*! \\fn QJsonObject::iterator QJsonObject::iterator::operator+(int j) const\n\n    Returns an iterator to the item at \\a j positions forward from\n    this iterator. If \\a j is negative, the iterator goes backward.\n\n    \\sa operator-()\n\n*/\n\n/*! \\fn QJsonObject::iterator QJsonObject::iterator::operator-(int j) const\n\n    Returns an iterator to the item at \\a j positions backward from\n    this iterator. If \\a j is negative, the iterator goes forward.\n\n    \\sa operator+()\n*/\n\n/*! \\fn QJsonObject::iterator &QJsonObject::iterator::operator+=(int j)\n\n    Advances the iterator by \\a j items. If \\a j is negative, the\n    iterator goes backward.\n\n    \\sa operator-=(), operator+()\n*/\n\n/*! \\fn QJsonObject::iterator &QJsonObject::iterator::operator-=(int j)\n\n    Makes the iterator go back by \\a j items. If \\a j is negative,\n    the iterator goes forward.\n\n    \\sa operator+=(), operator-()\n*/\n\n/*!\n    \\class QJsonObject::const_iterator\n    \\inmodule QtCore\n    \\ingroup json\n    \\since 5.0\n    \\brief The QJsonObject::const_iterator class provides an STL-style const iterator for QJsonObject.\n\n    QJsonObject::const_iterator allows you to iterate over a QJsonObject.\n    If you want to modify the QJsonObject as you iterate\n    over it, you must use QJsonObject::iterator instead. It is generally\n    good practice to use QJsonObject::const_iterator on a non-const QJsonObject as\n    well, unless you need to change the QJsonObject through the iterator.\n    Const iterators are slightly faster and improve code\n    readability.\n\n    The default QJsonObject::const_iterator constructor creates an\n    uninitialized iterator. You must initialize it using a QJsonObject\n    function like QJsonObject::constBegin(), QJsonObject::constEnd(), or\n    QJsonObject::find() before you can start iterating.\n\n    Multiple iterators can be used on the same object. Existing iterators\n    will however become dangling if the object gets modified.\n\n    \\sa QJsonObject::iterator, {JSON Support in Qt}, {JSON Save Game Example}\n*/\n\n/*! \\typedef QJsonObject::const_iterator::difference_type\n\n    \\internal\n*/\n\n/*! \\typedef QJsonObject::const_iterator::iterator_category\n\n    A synonym for \\e {std::bidirectional_iterator_tag} indicating\n    this iterator is a bidirectional iterator.\n*/\n\n/*! \\typedef QJsonObject::const_iterator::reference\n\n    \\internal\n*/\n\n/*! \\typedef QJsonObject::const_iterator::value_type\n\n    \\internal\n*/\n\n/*! \\fn QJsonObject::const_iterator::const_iterator()\n\n    Constructs an uninitialized iterator.\n\n    Functions like key(), value(), and operator++() must not be\n    called on an uninitialized iterator. Use operator=() to assign a\n    value to it before using it.\n\n    \\sa QJsonObject::constBegin(), QJsonObject::constEnd()\n*/\n\n/*! \\fn QJsonObject::const_iterator::const_iterator(const QJsonObject *obj, int index)\n    \\internal\n*/\n\n/*! \\fn QJsonObject::const_iterator::const_iterator(const iterator &other)\n\n    Constructs a copy of \\a other.\n*/\n\n/*! \\fn QString QJsonObject::const_iterator::key() const\n\n    Returns the current item's key.\n\n    \\sa value()\n*/\n\n/*! \\fn QJsonValue QJsonObject::const_iterator::value() const\n\n    Returns the current item's value.\n\n    \\sa key(), operator*()\n*/\n\n/*! \\fn QJsonValue QJsonObject::const_iterator::operator*() const\n\n    Returns the current item's value.\n\n    Same as value().\n\n    \\sa key()\n*/\n\n/*! \\fn QJsonValue *QJsonObject::const_iterator::operator->() const\n\n    Returns a pointer to the current item.\n*/\n\n/*! \\fn bool QJsonObject::const_iterator::operator==(const const_iterator &other) const\n    \\fn bool QJsonObject::const_iterator::operator==(const iterator &other) const\n\n    Returns \\c true if \\a other points to the same item as this\n    iterator; otherwise returns \\c false.\n\n    \\sa operator!=()\n*/\n\n/*! \\fn bool QJsonObject::const_iterator::operator!=(const const_iterator &other) const\n    \\fn bool QJsonObject::const_iterator::operator!=(const iterator &other) const\n\n    Returns \\c true if \\a other points to a different item than this\n    iterator; otherwise returns \\c false.\n\n    \\sa operator==()\n*/\n\n/*! \\fn QJsonObject::const_iterator QJsonObject::const_iterator::operator++()\n\n    The prefix ++ operator, \\c{++i}, advances the iterator to the\n    next item in the object and returns an iterator to the new current\n    item.\n\n    Calling this function on QJsonObject::end() leads to undefined results.\n\n    \\sa operator--()\n*/\n\n/*! \\fn QJsonObject::const_iterator QJsonObject::const_iterator::operator++(int)\n\n    \\overload\n\n    The postfix ++ operator, \\c{i++}, advances the iterator to the\n    next item in the object and returns an iterator to the previously\n    current item.\n*/\n\n/*! \\fn QJsonObject::const_iterator &QJsonObject::const_iterator::operator--()\n\n    The prefix -- operator, \\c{--i}, makes the preceding item\n    current and returns an iterator pointing to the new current item.\n\n    Calling this function on QJsonObject::begin() leads to undefined\n    results.\n\n    \\sa operator++()\n*/\n\n/*! \\fn QJsonObject::const_iterator QJsonObject::const_iterator::operator--(int)\n\n    \\overload\n\n    The postfix -- operator, \\c{i--}, makes the preceding item\n    current and returns an iterator pointing to the previously\n    current item.\n*/\n\n/*! \\fn QJsonObject::const_iterator QJsonObject::const_iterator::operator+(int j) const\n\n    Returns an iterator to the item at \\a j positions forward from\n    this iterator. If \\a j is negative, the iterator goes backward.\n\n    This operation can be slow for large \\a j values.\n\n    \\sa operator-()\n*/\n\n/*! \\fn QJsonObject::const_iterator QJsonObject::const_iterator::operator-(int j) const\n\n    Returns an iterator to the item at \\a j positions backward from\n    this iterator. If \\a j is negative, the iterator goes forward.\n\n    This operation can be slow for large \\a j values.\n\n    \\sa operator+()\n*/\n\n/*! \\fn QJsonObject::const_iterator &QJsonObject::const_iterator::operator+=(int j)\n\n    Advances the iterator by \\a j items. If \\a j is negative, the\n    iterator goes backward.\n\n    This operation can be slow for large \\a j values.\n\n    \\sa operator-=(), operator+()\n*/\n\n/*! \\fn QJsonObject::const_iterator &QJsonObject::const_iterator::operator-=(int j)\n\n    Makes the iterator go back by \\a j items. If \\a j is negative,\n    the iterator goes forward.\n\n    This operation can be slow for large \\a j values.\n\n    \\sa operator+=(), operator-()\n*/\n\n\n/*!\n    \\internal\n */\nvoid QJsonObject::detach(uint reserve)\n{\n    if (!d) {\n        d = new QJsonPrivate::Data(reserve, QJsonValue::Object);\n        o = static_cast<QJsonPrivate::Object *>(d->header->root());\n        d->ref.ref();\n        return;\n    }\n    /*\n    if (reserve == 0 && d->ref.load() == 1)\n        return;\n    */\n    if (reserve == 0 && int(d->ref) == 1)\n        return;\n\n    QJsonPrivate::Data *x = d->clone(o, reserve);\n    x->ref.ref();\n    if (!d->ref.deref())\n        delete d;\n    d = x;\n    o = static_cast<QJsonPrivate::Object *>(d->header->root());\n}\n\n/*!\n    \\internal\n */\nvoid QJsonObject::compact()\n{\n    if (!d || !d->compactionCounter)\n        return;\n\n    detach();\n    d->compact();\n    o = static_cast<QJsonPrivate::Object *>(d->header->root());\n}\n\n/*!\n    \\internal\n */\nQString QJsonObject::keyAt(int i) const\n{\n    Q_ASSERT(o && i >= 0 && i < (int)o->length);\n\n    QJsonPrivate::Entry *e = o->entryAt(i);\n    return e->key();\n}\n\n/*!\n    \\internal\n */\nQJsonValue QJsonObject::valueAt(int i) const\n{\n    if (!o || i < 0 || i >= (int)o->length)\n        return QJsonValue(QJsonValue::Undefined);\n\n    QJsonPrivate::Entry *e = o->entryAt(i);\n    return QJsonValue(d, o, e->value);\n}\n\n/*!\n    \\internal\n */\nvoid QJsonObject::setValueAt(int i, const QJsonValue &val)\n{\n    Q_ASSERT(o && i >= 0 && i < (int)o->length);\n\n    QJsonPrivate::Entry *e = o->entryAt(i);\n    insert(e->key(), val);\n}\n\n#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY)\nQDebug operator<<(QDebug dbg, const QJsonObject &o)\n{\n    if (!o.o) {\n        dbg << \"QJsonObject()\";\n        return dbg;\n    }\n    QByteArray json;\n    QJsonPrivate::Writer::objectToJson(o.o, json, 0, true);\n    dbg.nospace() << \"QJsonObject(\"\n                  << json.constData() // print as utf-8 string without extra quotation marks\n                  << \")\";\n    return dbg.space();\n}\n#endif\n\nQT_END_NAMESPACE\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/json/qjsonobject.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the QtCore module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL21$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia. For licensing terms and\n** conditions see http://qt.digia.com/licensing. For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 or version 3 as published by the Free\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\n** LICENSE.LGPLv3 included in the packaging of this file. Please review the\n** following information to ensure the GNU Lesser General Public License\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights. These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#ifndef QJSONOBJECT_H\n#define QJSONOBJECT_H\n\n#include \"qjsonvalue.h\"\n\n#include <QtCore/qmetatype.h>\n#include <QtCore/qiterator.h>\n#ifdef Q_COMPILER_INITIALIZER_LISTS\n#include <QtCore/qpair.h>\n#include <initializer_list>\n#endif\n\nQT_BEGIN_NAMESPACE\n\nclass QDebug;\ntemplate <class Key, class T> class QMap;\ntypedef QMap<QString, QVariant> QVariantMap;\n\nclass QJSON_EXPORT QJsonObject\n{\npublic:\n    QJsonObject();\n\n#if defined(Q_COMPILER_INITIALIZER_LISTS) || defined(Q_QDOC)\n    QJsonObject(std::initializer_list<QPair<QString, QJsonValue> > args)\n    {\n        initialize();\n        for (std::initializer_list<QPair<QString, QJsonValue> >::const_iterator i = args.begin(); i != args.end(); ++i)\n            insert(i->first, i->second);\n    }\n#endif\n\n    ~QJsonObject();\n\n    QJsonObject(const QJsonObject &other);\n    QJsonObject &operator =(const QJsonObject &other);\n\n    static QJsonObject fromVariantMap(const QVariantMap &map);\n    QVariantMap toVariantMap() const;\n\n    QStringList keys() const;\n    int size() const;\n    inline int count() const { return size(); }\n    inline int length() const { return size(); }\n    bool isEmpty() const;\n\n    QJsonValue value(const QString &key) const;\n    QJsonValue operator[] (const QString &key) const;\n    QJsonValueRef operator[] (const QString &key);\n\n    void remove(const QString &key);\n    QJsonValue take(const QString &key);\n    bool contains(const QString &key) const;\n\n    bool operator==(const QJsonObject &other) const;\n    bool operator!=(const QJsonObject &other) const;\n\n    class const_iterator;\n\n    class iterator\n    {\n        friend class const_iterator;\n        friend class QJsonObject;\n        QJsonObject *o;\n        int i;\n\n    public:\n        typedef std::bidirectional_iterator_tag iterator_category;\n        typedef int difference_type;\n        typedef QJsonValue value_type;\n        typedef QJsonValueRef reference;\n\n        inline iterator() : o(0), i(0) {}\n        inline iterator(QJsonObject *obj, int index) : o(obj), i(index) {}\n\n        inline QString key() const { return o->keyAt(i); }\n        inline QJsonValueRef value() const { return QJsonValueRef(o, i); }\n        inline QJsonValueRef operator*() const { return QJsonValueRef(o, i); }\n#ifdef Q_QDOC\n        inline QJsonValueRef* operator->() const;\n#else\n        inline QJsonValueRefPtr operator->() const { return QJsonValueRefPtr(o, i); }\n#endif\n        inline bool operator==(const iterator &other) const { return i == other.i; }\n        inline bool operator!=(const iterator &other) const { return i != other.i; }\n\n        inline iterator &operator++() { ++i; return *this; }\n        inline iterator operator++(int) { iterator r = *this; ++i; return r; }\n        inline iterator &operator--() { --i; return *this; }\n        inline iterator operator--(int) { iterator r = *this; --i; return r; }\n        inline iterator operator+(int j) const\n        { iterator r = *this; r.i += j; return r; }\n        inline iterator operator-(int j) const { return operator+(-j); }\n        inline iterator &operator+=(int j) { i += j; return *this; }\n        inline iterator &operator-=(int j) { i -= j; return *this; }\n\n    public:\n        inline bool operator==(const const_iterator &other) const { return i == other.i; }\n        inline bool operator!=(const const_iterator &other) const { return i != other.i; }\n    };\n    friend class iterator;\n\n    class const_iterator\n    {\n        friend class iterator;\n        const QJsonObject *o;\n        int i;\n\n    public:\n        typedef std::bidirectional_iterator_tag iterator_category;\n        typedef int difference_type;\n        typedef QJsonValue value_type;\n        typedef QJsonValue reference;\n\n        inline const_iterator() : o(0), i(0) {}\n        inline const_iterator(const QJsonObject *obj, int index)\n            : o(obj), i(index) {}\n        inline const_iterator(const iterator &other)\n            : o(other.o), i(other.i) {}\n\n        inline QString key() const { return o->keyAt(i); }\n        inline QJsonValue value() const { return o->valueAt(i); }\n        inline QJsonValue operator*() const { return o->valueAt(i); }\n#ifdef Q_QDOC\n        inline QJsonValue* operator->() const;\n#else\n        inline QJsonValuePtr operator->() const { return QJsonValuePtr(o->valueAt(i)); }\n#endif\n        inline bool operator==(const const_iterator &other) const { return i == other.i; }\n        inline bool operator!=(const const_iterator &other) const { return i != other.i; }\n\n        inline const_iterator &operator++() { ++i; return *this; }\n        inline const_iterator operator++(int) { const_iterator r = *this; ++i; return r; }\n        inline const_iterator &operator--() { --i; return *this; }\n        inline const_iterator operator--(int) { const_iterator r = *this; --i; return r; }\n        inline const_iterator operator+(int j) const\n        { const_iterator r = *this; r.i += j; return r; }\n        inline const_iterator operator-(int j) const { return operator+(-j); }\n        inline const_iterator &operator+=(int j) { i += j; return *this; }\n        inline const_iterator &operator-=(int j) { i -= j; return *this; }\n\n        inline bool operator==(const iterator &other) const { return i == other.i; }\n        inline bool operator!=(const iterator &other) const { return i != other.i; }\n    };\n    friend class const_iterator;\n\n    // STL style\n    inline iterator begin() { detach(); return iterator(this, 0); }\n    inline const_iterator begin() const { return const_iterator(this, 0); }\n    inline const_iterator constBegin() const { return const_iterator(this, 0); }\n    inline iterator end() { detach(); return iterator(this, size()); }\n    inline const_iterator end() const { return const_iterator(this, size()); }\n    inline const_iterator constEnd() const { return const_iterator(this, size()); }\n    iterator erase(iterator it);\n\n    // more Qt\n    typedef iterator Iterator;\n    typedef const_iterator ConstIterator;\n    iterator find(const QString &key);\n    const_iterator find(const QString &key) const { return constFind(key); }\n    const_iterator constFind(const QString &key) const;\n    iterator insert(const QString &key, const QJsonValue &value);\n\n    // STL compatibility\n    typedef QJsonValue mapped_type;\n    typedef QString key_type;\n    typedef int size_type;\n\n    inline bool empty() const { return isEmpty(); }\n\nprivate:\n    friend class QJsonPrivate::Data;\n    friend class QJsonValue;\n    friend class QJsonDocument;\n    friend class QJsonValueRef;\n\n    friend QJSON_EXPORT QDebug operator<<(QDebug, const QJsonObject &);\n\n    QJsonObject(QJsonPrivate::Data *data, QJsonPrivate::Object *object);\n    void initialize();\n    void detach(uint reserve = 0);\n    void compact();\n\n    QString keyAt(int i) const;\n    QJsonValue valueAt(int i) const;\n    void setValueAt(int i, const QJsonValue &val);\n\n    QJsonPrivate::Data *d;\n    QJsonPrivate::Object *o;\n};\n\nQ_DECLARE_METATYPE(QJsonObject)\n\n#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY)\nQJSON_EXPORT QDebug operator<<(QDebug, const QJsonObject &);\n#endif\n\nQT_END_NAMESPACE\n\n#endif // QJSONOBJECT_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/json/qjsonparser.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Copyright (C) 2013 Intel Corporation\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the QtCore module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL21$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia. For licensing terms and\n** conditions see http://qt.digia.com/licensing. For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 or version 3 as published by the Free\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\n** LICENSE.LGPLv3 included in the packaging of this file. Please review the\n** following information to ensure the GNU Lesser General Public License\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights. These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#ifndef QT_BOOTSTRAPPED\n#include <qcoreapplication.h>\n#endif\n#include <qdebug.h>\n#include \"qjsonparser_p.h\"\n#include \"qjson_p.h\"\n\n//#define PARSER_DEBUG\n#ifdef PARSER_DEBUG\nstatic int indent = 0;\n#define BEGIN qDebug() << QByteArray(4*indent++, ' ').constData() << \"pos=\" << current\n#define END --indent\n#define DEBUG qDebug() << QByteArray(4*indent, ' ').constData()\n#else\n#define BEGIN if (1) ; else qDebug()\n#define END do {} while (0)\n#define DEBUG if (1) ; else qDebug()\n#endif\n\nstatic const int nestingLimit = 1024;\n\nQT_BEGIN_NAMESPACE\n\n// error strings for the JSON parser\n#define JSONERR_OK          QT_TRANSLATE_NOOP(\"QJsonParseError\", \"no error occurred\")\n#define JSONERR_UNTERM_OBJ  QT_TRANSLATE_NOOP(\"QJsonParseError\", \"unterminated object\")\n#define JSONERR_MISS_NSEP   QT_TRANSLATE_NOOP(\"QJsonParseError\", \"missing name separator\")\n#define JSONERR_UNTERM_AR   QT_TRANSLATE_NOOP(\"QJsonParseError\", \"unterminated array\")\n#define JSONERR_MISS_VSEP   QT_TRANSLATE_NOOP(\"QJsonParseError\", \"missing value separator\")\n#define JSONERR_ILLEGAL_VAL QT_TRANSLATE_NOOP(\"QJsonParseError\", \"illegal value\")\n#define JSONERR_END_OF_NUM  QT_TRANSLATE_NOOP(\"QJsonParseError\", \"invalid termination by number\")\n#define JSONERR_ILLEGAL_NUM QT_TRANSLATE_NOOP(\"QJsonParseError\", \"illegal number\")\n#define JSONERR_STR_ESC_SEQ QT_TRANSLATE_NOOP(\"QJsonParseError\", \"invalid escape sequence\")\n#define JSONERR_STR_UTF8    QT_TRANSLATE_NOOP(\"QJsonParseError\", \"invalid UTF8 string\")\n#define JSONERR_UTERM_STR   QT_TRANSLATE_NOOP(\"QJsonParseError\", \"unterminated string\")\n#define JSONERR_MISS_OBJ    QT_TRANSLATE_NOOP(\"QJsonParseError\", \"object is missing after a comma\")\n#define JSONERR_DEEP_NEST   QT_TRANSLATE_NOOP(\"QJsonParseError\", \"too deeply nested document\")\n#define JSONERR_DOC_LARGE   QT_TRANSLATE_NOOP(\"QJsonParseError\", \"too large document\")\n#define JSONERR_GARBAGEEND  QT_TRANSLATE_NOOP(\"QJsonParseError\", \"garbage at the end of the document\")\n\n/*!\n    \\class QJsonParseError\n    \\inmodule QtCore\n    \\ingroup json\n    \\reentrant\n    \\since 5.0\n\n    \\brief The QJsonParseError class is used to report errors during JSON parsing.\n\n    \\sa {JSON Support in Qt}, {JSON Save Game Example}\n*/\n\n/*!\n    \\enum QJsonParseError::ParseError\n\n    This enum describes the type of error that occurred during the parsing of a JSON document.\n\n    \\value NoError                  No error occurred\n    \\value UnterminatedObject       An object is not correctly terminated with a closing curly bracket\n    \\value MissingNameSeparator     A comma separating different items is missing\n    \\value UnterminatedArray        The array is not correctly terminated with a closing square bracket\n    \\value MissingValueSeparator    A colon separating keys from values inside objects is missing\n    \\value IllegalValue             The value is illegal\n    \\value TerminationByNumber      The input stream ended while parsing a number\n    \\value IllegalNumber            The number is not well formed\n    \\value IllegalEscapeSequence    An illegal escape sequence occurred in the input\n    \\value IllegalUTF8String        An illegal UTF8 sequence occurred in the input\n    \\value UnterminatedString       A string wasn't terminated with a quote\n    \\value MissingObject            An object was expected but couldn't be found\n    \\value DeepNesting              The JSON document is too deeply nested for the parser to parse it\n    \\value DocumentTooLarge         The JSON document is too large for the parser to parse it\n    \\value GarbageAtEnd             The parsed document contains additional garbage characters at the end\n\n*/\n\n/*!\n    \\variable QJsonParseError::error\n\n    Contains the type of the parse error. Is equal to QJsonParseError::NoError if the document\n    was parsed correctly.\n\n    \\sa ParseError, errorString()\n*/\n\n\n/*!\n    \\variable QJsonParseError::offset\n\n    Contains the offset in the input string where the parse error occurred.\n\n    \\sa error, errorString()\n*/\n\n/*!\n  Returns the human-readable message appropriate to the reported JSON parsing error.\n\n  \\sa error\n */\nQString QJsonParseError::errorString() const\n{\n    const char *sz = \"\";\n    switch (error) {\n    case NoError:\n        sz = JSONERR_OK;\n        break;\n    case UnterminatedObject:\n        sz = JSONERR_UNTERM_OBJ;\n        break;\n    case MissingNameSeparator:\n        sz = JSONERR_MISS_NSEP;\n        break;\n    case UnterminatedArray:\n        sz = JSONERR_UNTERM_AR;\n        break;\n    case MissingValueSeparator:\n        sz = JSONERR_MISS_VSEP;\n        break;\n    case IllegalValue:\n        sz = JSONERR_ILLEGAL_VAL;\n        break;\n    case TerminationByNumber:\n        sz = JSONERR_END_OF_NUM;\n        break;\n    case IllegalNumber:\n        sz = JSONERR_ILLEGAL_NUM;\n        break;\n    case IllegalEscapeSequence:\n        sz = JSONERR_STR_ESC_SEQ;\n        break;\n    case IllegalUTF8String:\n        sz = JSONERR_STR_UTF8;\n        break;\n    case UnterminatedString:\n        sz = JSONERR_UTERM_STR;\n        break;\n    case MissingObject:\n        sz = JSONERR_MISS_OBJ;\n        break;\n    case DeepNesting:\n        sz = JSONERR_DEEP_NEST;\n        break;\n    case DocumentTooLarge:\n        sz = JSONERR_DOC_LARGE;\n        break;\n    case GarbageAtEnd:\n        sz = JSONERR_GARBAGEEND;\n        break;\n    }\n#ifndef QT_BOOTSTRAPPED\n    return QCoreApplication::translate(\"QJsonParseError\", sz);\n#else\n    return QLatin1String(sz);\n#endif\n}\n\nusing namespace QJsonPrivate;\n\nParser::Parser(const char *json, int length)\n    : head(json), json(json), data(0), dataLength(0), current(0), nestingLevel(0), lastError(QJsonParseError::NoError)\n{\n    end = json + length;\n}\n\n\n\n/*\n\nbegin-array     = ws %x5B ws  ; [ left square bracket\n\nbegin-object    = ws %x7B ws  ; { left curly bracket\n\nend-array       = ws %x5D ws  ; ] right square bracket\n\nend-object      = ws %x7D ws  ; } right curly bracket\n\nname-separator  = ws %x3A ws  ; : colon\n\nvalue-separator = ws %x2C ws  ; , comma\n\nInsignificant whitespace is allowed before or after any of the six\nstructural characters.\n\nws = *(\n          %x20 /              ; Space\n          %x09 /              ; Horizontal tab\n          %x0A /              ; Line feed or New line\n          %x0D                ; Carriage return\n      )\n\n*/\n\nenum {\n    Space = 0x20,\n    Tab = 0x09,\n    LineFeed = 0x0a,\n    Return = 0x0d,\n    BeginArray = 0x5b,\n    BeginObject = 0x7b,\n    EndArray = 0x5d,\n    EndObject = 0x7d,\n    NameSeparator = 0x3a,\n    ValueSeparator = 0x2c,\n    Quote = 0x22\n};\n\nvoid Parser::eatBOM()\n{\n    // eat UTF-8 byte order mark\n    uchar utf8bom[3] = { 0xef, 0xbb, 0xbf };\n    if (end - json > 3 &&\n        (uchar)json[0] == utf8bom[0] &&\n        (uchar)json[1] == utf8bom[1] &&\n        (uchar)json[2] == utf8bom[2])\n        json += 3;\n}\n\nbool Parser::eatSpace()\n{\n    while (json < end) {\n        if (*json > Space)\n            break;\n        if (*json != Space &&\n            *json != Tab &&\n            *json != LineFeed &&\n            *json != Return)\n            break;\n        ++json;\n    }\n    return (json < end);\n}\n\nchar Parser::nextToken()\n{\n    if (!eatSpace())\n        return 0;\n    char token = *json++;\n    switch (token) {\n    case BeginArray:\n    case BeginObject:\n    case NameSeparator:\n    case ValueSeparator:\n    case EndArray:\n    case EndObject:\n        eatSpace();\n    case Quote:\n        break;\n    default:\n        token = 0;\n        break;\n    }\n    return token;\n}\n\n/*\n    JSON-text = object / array\n*/\nQJsonDocument Parser::parse(QJsonParseError *error)\n{\n#ifdef PARSER_DEBUG\n    indent = 0;\n    qDebug() << \">>>>> parser begin\";\n#endif\n    // allocate some space\n    dataLength = qMax(end - json, (ptrdiff_t) 256);\n    data = (char *)malloc(dataLength);\n\n    // fill in Header data\n    QJsonPrivate::Header *h = (QJsonPrivate::Header *)data;\n    h->tag = QJsonDocument::BinaryFormatTag;\n    h->version = 1u;\n\n    current = sizeof(QJsonPrivate::Header);\n\n    eatBOM();\n    char token = nextToken();\n\n    DEBUG << hex << (uint)token;\n    if (token == BeginArray) {\n        if (!parseArray())\n            goto error;\n    } else if (token == BeginObject) {\n        if (!parseObject())\n            goto error;\n    } else {\n        lastError = QJsonParseError::IllegalValue;\n        goto error;\n    }\n\n    eatSpace();\n    if (json < end) {\n        lastError = QJsonParseError::GarbageAtEnd;\n        goto error;\n    }\n\n    END;\n    {\n        if (error) {\n            error->offset = 0;\n            error->error = QJsonParseError::NoError;\n        }\n        QJsonPrivate::Data *d = new QJsonPrivate::Data(data, current);\n        return QJsonDocument(d);\n    }\n\nerror:\n#ifdef PARSER_DEBUG\n    qDebug() << \">>>>> parser error\";\n#endif\n    if (error) {\n        error->offset = json - head;\n        error->error  = lastError;\n    }\n    free(data);\n    return QJsonDocument();\n}\n\n\nvoid Parser::ParsedObject::insert(uint offset) {\n    const QJsonPrivate::Entry *newEntry = reinterpret_cast<const QJsonPrivate::Entry *>(parser->data + objectPosition + offset);\n    int min = 0;\n    int n = offsets.size();\n    while (n > 0) {\n        int half = n >> 1;\n        int middle = min + half;\n        if (*entryAt(middle) >= *newEntry) {\n            n = half;\n        } else {\n            min = middle + 1;\n            n -= half + 1;\n        }\n    }\n    if (min < offsets.size() && *entryAt(min) == *newEntry) {\n        offsets[min] = offset;\n    } else {\n        offsets.insert(min, offset);\n    }\n}\n\n/*\n    object = begin-object [ member *( value-separator member ) ]\n    end-object\n*/\n\nbool Parser::parseObject()\n{\n    if (++nestingLevel > nestingLimit) {\n        lastError = QJsonParseError::DeepNesting;\n        return false;\n    }\n\n    int objectOffset = reserveSpace(sizeof(QJsonPrivate::Object));\n    BEGIN << \"parseObject pos=\" << objectOffset << current << json;\n\n    ParsedObject parsedObject(this, objectOffset);\n\n    char token = nextToken();\n    while (token == Quote) {\n        int off = current - objectOffset;\n        if (!parseMember(objectOffset))\n            return false;\n        parsedObject.insert(off);\n        token = nextToken();\n        if (token != ValueSeparator)\n            break;\n        token = nextToken();\n        if (token == EndObject) {\n            lastError = QJsonParseError::MissingObject;\n            return false;\n        }\n    }\n\n    DEBUG << \"end token=\" << token;\n    if (token != EndObject) {\n        lastError = QJsonParseError::UnterminatedObject;\n        return false;\n    }\n\n    DEBUG << \"numEntries\" << parsedObject.offsets.size();\n    int table = objectOffset;\n    // finalize the object\n    if (parsedObject.offsets.size()) {\n        int tableSize = parsedObject.offsets.size()*sizeof(uint);\n        table = reserveSpace(tableSize);\n#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN\n        memcpy(data + table, parsedObject.offsets.constData(), tableSize);\n#else\n        offset *o = (offset *)(data + table);\n        for (int i = 0; i < parsedObject.offsets.size(); ++i)\n            o[i] = parsedObject.offsets[i];\n\n#endif\n    }\n\n    QJsonPrivate::Object *o = (QJsonPrivate::Object *)(data + objectOffset);\n    o->tableOffset = table - objectOffset;\n    o->size = current - objectOffset;\n    o->is_object = true;\n    o->length = parsedObject.offsets.size();\n\n    DEBUG << \"current=\" << current;\n    END;\n\n    --nestingLevel;\n    return true;\n}\n\n/*\n    member = string name-separator value\n*/\nbool Parser::parseMember(int baseOffset)\n{\n    int entryOffset = reserveSpace(sizeof(QJsonPrivate::Entry));\n    BEGIN << \"parseMember pos=\" << entryOffset;\n\n    bool latin1;\n    if (!parseString(&latin1))\n        return false;\n    char token = nextToken();\n    if (token != NameSeparator) {\n        lastError = QJsonParseError::MissingNameSeparator;\n        return false;\n    }\n    QJsonPrivate::Value val;\n    if (!parseValue(&val, baseOffset))\n        return false;\n\n    // finalize the entry\n    QJsonPrivate::Entry *e = (QJsonPrivate::Entry *)(data + entryOffset);\n    e->value = val;\n    e->value.latinKey = latin1;\n\n    END;\n    return true;\n}\n\n/*\n    array = begin-array [ value *( value-separator value ) ] end-array\n*/\nbool Parser::parseArray()\n{\n    BEGIN << \"parseArray\";\n\n    if (++nestingLevel > nestingLimit) {\n        lastError = QJsonParseError::DeepNesting;\n        return false;\n    }\n\n    int arrayOffset = reserveSpace(sizeof(QJsonPrivate::Array));\n\n    QVarLengthArray<QJsonPrivate::Value, 64> values;\n\n    if (!eatSpace()) {\n        lastError = QJsonParseError::UnterminatedArray;\n        return false;\n    }\n    if (*json == EndArray) {\n        nextToken();\n    } else {\n        while (1) {\n            QJsonPrivate::Value val;\n            if (!parseValue(&val, arrayOffset))\n                return false;\n            values.append(val);\n            char token = nextToken();\n            if (token == EndArray)\n                break;\n            else if (token != ValueSeparator) {\n                if (!eatSpace())\n                    lastError = QJsonParseError::UnterminatedArray;\n                else\n                    lastError = QJsonParseError::MissingValueSeparator;\n                return false;\n            }\n        }\n    }\n\n    DEBUG << \"size =\" << values.size();\n    int table = arrayOffset;\n    // finalize the object\n    if (values.size()) {\n        int tableSize = values.size()*sizeof(QJsonPrivate::Value);\n        table = reserveSpace(tableSize);\n        memcpy(data + table, values.constData(), tableSize);\n    }\n\n    QJsonPrivate::Array *a = (QJsonPrivate::Array *)(data + arrayOffset);\n    a->tableOffset = table - arrayOffset;\n    a->size = current - arrayOffset;\n    a->is_object = false;\n    a->length = values.size();\n\n    DEBUG << \"current=\" << current;\n    END;\n\n    --nestingLevel;\n    return true;\n}\n\n/*\nvalue = false / null / true / object / array / number / string\n\n*/\n\nbool Parser::parseValue(QJsonPrivate::Value *val, int baseOffset)\n{\n    BEGIN << \"parse Value\" << json;\n    val->_dummy = 0;\n\n    switch (*json++) {\n    case 'n':\n        if (end - json < 4) {\n            lastError = QJsonParseError::IllegalValue;\n            return false;\n        }\n        if (*json++ == 'u' &&\n            *json++ == 'l' &&\n            *json++ == 'l') {\n            val->type = QJsonValue::Null;\n            DEBUG << \"value: null\";\n            END;\n            return true;\n        }\n        lastError = QJsonParseError::IllegalValue;\n        return false;\n    case 't':\n        if (end - json < 4) {\n            lastError = QJsonParseError::IllegalValue;\n            return false;\n        }\n        if (*json++ == 'r' &&\n            *json++ == 'u' &&\n            *json++ == 'e') {\n            val->type = QJsonValue::Bool;\n            val->value = true;\n            DEBUG << \"value: true\";\n            END;\n            return true;\n        }\n        lastError = QJsonParseError::IllegalValue;\n        return false;\n    case 'f':\n        if (end - json < 5) {\n            lastError = QJsonParseError::IllegalValue;\n            return false;\n        }\n        if (*json++ == 'a' &&\n            *json++ == 'l' &&\n            *json++ == 's' &&\n            *json++ == 'e') {\n            val->type = QJsonValue::Bool;\n            val->value = false;\n            DEBUG << \"value: false\";\n            END;\n            return true;\n        }\n        lastError = QJsonParseError::IllegalValue;\n        return false;\n    case Quote: {\n        val->type = QJsonValue::String;\n        if (current - baseOffset >= Value::MaxSize) {\n            lastError = QJsonParseError::DocumentTooLarge;\n            return false;\n        }\n        val->value = current - baseOffset;\n        bool latin1;\n        if (!parseString(&latin1))\n            return false;\n        val->latinOrIntValue = latin1;\n        DEBUG << \"value: string\";\n        END;\n        return true;\n    }\n    case BeginArray:\n        val->type = QJsonValue::Array;\n        if (current - baseOffset >= Value::MaxSize) {\n            lastError = QJsonParseError::DocumentTooLarge;\n            return false;\n        }\n        val->value = current - baseOffset;\n        if (!parseArray())\n            return false;\n        DEBUG << \"value: array\";\n        END;\n        return true;\n    case BeginObject:\n        val->type = QJsonValue::Object;\n        if (current - baseOffset >= Value::MaxSize) {\n            lastError = QJsonParseError::DocumentTooLarge;\n            return false;\n        }\n        val->value = current - baseOffset;\n        if (!parseObject())\n            return false;\n        DEBUG << \"value: object\";\n        END;\n        return true;\n    case EndArray:\n        lastError = QJsonParseError::MissingObject;\n        return false;\n    default:\n        --json;\n        if (!parseNumber(val, baseOffset))\n            return false;\n        DEBUG << \"value: number\";\n        END;\n    }\n\n    return true;\n}\n\n\n\n\n\n/*\n        number = [ minus ] int [ frac ] [ exp ]\n        decimal-point = %x2E       ; .\n        digit1-9 = %x31-39         ; 1-9\n        e = %x65 / %x45            ; e E\n        exp = e [ minus / plus ] 1*DIGIT\n        frac = decimal-point 1*DIGIT\n        int = zero / ( digit1-9 *DIGIT )\n        minus = %x2D               ; -\n        plus = %x2B                ; +\n        zero = %x30                ; 0\n\n*/\n\nbool Parser::parseNumber(QJsonPrivate::Value *val, int baseOffset)\n{\n    BEGIN << \"parseNumber\" << json;\n    val->type = QJsonValue::Double;\n\n    const char *start = json;\n    bool isInt = true;\n\n    // minus\n    if (json < end && *json == '-')\n        ++json;\n\n    // int = zero / ( digit1-9 *DIGIT )\n    if (json < end && *json == '0') {\n        ++json;\n    } else {\n        while (json < end && *json >= '0' && *json <= '9')\n            ++json;\n    }\n\n    // frac = decimal-point 1*DIGIT\n    if (json < end && *json == '.') {\n        isInt = false;\n        ++json;\n        while (json < end && *json >= '0' && *json <= '9')\n            ++json;\n    }\n\n    // exp = e [ minus / plus ] 1*DIGIT\n    if (json < end && (*json == 'e' || *json == 'E')) {\n        isInt = false;\n        ++json;\n        if (json < end && (*json == '-' || *json == '+'))\n            ++json;\n        while (json < end && *json >= '0' && *json <= '9')\n            ++json;\n    }\n\n    if (json >= end) {\n        lastError = QJsonParseError::TerminationByNumber;\n        return false;\n    }\n\n    QByteArray number(start, json - start);\n    DEBUG << \"numberstring\" << number;\n\n    if (isInt) {\n        bool ok;\n        int n = number.toInt(&ok);\n        if (ok && n < (1<<25) && n > -(1<<25)) {\n            val->int_value = n;\n            val->latinOrIntValue = true;\n            END;\n            return true;\n        }\n    }\n\n    bool ok;\n    union {\n        quint64 ui;\n        double d;\n    };\n    d = number.toDouble(&ok);\n\n    if (!ok) {\n        lastError = QJsonParseError::IllegalNumber;\n        return false;\n    }\n\n    int pos = reserveSpace(sizeof(double));\n    *(quint64 *)(data + pos) = qToLittleEndian(ui);\n    if (current - baseOffset >= Value::MaxSize) {\n        lastError = QJsonParseError::DocumentTooLarge;\n        return false;\n    }\n    val->value = pos - baseOffset;\n    val->latinOrIntValue = false;\n\n    END;\n    return true;\n}\n\n/*\n\n        string = quotation-mark *char quotation-mark\n\n        char = unescaped /\n               escape (\n                   %x22 /          ; \"    quotation mark  U+0022\n                   %x5C /          ; \\    reverse solidus U+005C\n                   %x2F /          ; /    solidus         U+002F\n                   %x62 /          ; b    backspace       U+0008\n                   %x66 /          ; f    form feed       U+000C\n                   %x6E /          ; n    line feed       U+000A\n                   %x72 /          ; r    carriage return U+000D\n                   %x74 /          ; t    tab             U+0009\n                   %x75 4HEXDIG )  ; uXXXX                U+XXXX\n\n        escape = %x5C              ; \\\n\n        quotation-mark = %x22      ; \"\n\n        unescaped = %x20-21 / %x23-5B / %x5D-10FFFF\n */\nstatic inline bool addHexDigit(char digit, uint *result)\n{\n    *result <<= 4;\n    if (digit >= '0' && digit <= '9')\n        *result |= (digit - '0');\n    else if (digit >= 'a' && digit <= 'f')\n        *result |= (digit - 'a') + 10;\n    else if (digit >= 'A' && digit <= 'F')\n        *result |= (digit - 'A') + 10;\n    else\n        return false;\n    return true;\n}\n\nstatic inline bool scanEscapeSequence(const char *&json, const char *end, uint *ch)\n{\n    ++json;\n    if (json >= end)\n        return false;\n\n    DEBUG << \"scan escape\" << (char)*json;\n    uint escaped = *json++;\n    switch (escaped) {\n    case '\"':\n        *ch = '\"'; break;\n    case '\\\\':\n        *ch = '\\\\'; break;\n    case '/':\n        *ch = '/'; break;\n    case 'b':\n        *ch = 0x8; break;\n    case 'f':\n        *ch = 0xc; break;\n    case 'n':\n        *ch = 0xa; break;\n    case 'r':\n        *ch = 0xd; break;\n    case 't':\n        *ch = 0x9; break;\n    case 'u': {\n        *ch = 0;\n        if (json > end - 4)\n            return false;\n        for (int i = 0; i < 4; ++i) {\n            if (!addHexDigit(*json, ch))\n                return false;\n            ++json;\n        }\n        return true;\n    }\n    default:\n        // this is not as strict as one could be, but allows for more Json files\n        // to be parsed correctly.\n        *ch = escaped;\n        return true;\n    }\n    return true;\n}\n\nstatic inline bool isUnicodeNonCharacter(uint ucs4)\n{\n    // Unicode has a couple of \"non-characters\" that one can use internally,\n    // but are not allowed to be used for text interchange.\n    //\n    // Those are the last two entries each Unicode Plane (U+FFFE, U+FFFF,\n    // U+1FFFE, U+1FFFF, etc.) as well as the entries between U+FDD0 and\n    // U+FDEF (inclusive)\n\n    return (ucs4 & 0xfffe) == 0xfffe\n            || (ucs4 - 0xfdd0U) < 16;\n}\n\nstatic inline bool scanUtf8Char(const char *&json, const char *end, uint *result)\n{\n    int need;\n    uint min_uc;\n    uint uc;\n    uchar ch = *json++;\n    if (ch < 128) {\n        *result = ch;\n        return true;\n    } else if ((ch & 0xe0) == 0xc0) {\n        uc = ch & 0x1f;\n        need = 1;\n        min_uc = 0x80;\n    } else if ((ch & 0xf0) == 0xe0) {\n        uc = ch & 0x0f;\n        need = 2;\n        min_uc = 0x800;\n    } else if ((ch&0xf8) == 0xf0) {\n        uc = ch & 0x07;\n        need = 3;\n        min_uc = 0x10000;\n    } else {\n        return false;\n    }\n\n    if (json >= end - need)\n        return false;\n\n    for (int i = 0; i < need; ++i) {\n        ch = *json++;\n        if ((ch&0xc0) != 0x80)\n            return false;\n        uc = (uc << 6) | (ch & 0x3f);\n    }\n\n    if (isUnicodeNonCharacter(uc) || uc >= 0x110000 ||\n        (uc < min_uc) || (uc >= 0xd800 && uc <= 0xdfff))\n        return false;\n\n    *result = uc;\n    return true;\n}\n\nbool Parser::parseString(bool *latin1)\n{\n    *latin1 = true;\n\n    const char *start = json;\n    int outStart = current;\n\n    // try to write out a latin1 string\n\n    int stringPos = reserveSpace(2);\n    BEGIN << \"parse string stringPos=\" << stringPos << json;\n    while (json < end) {\n        uint ch = 0;\n        if (*json == '\"')\n            break;\n        else if (*json == '\\\\') {\n            if (!scanEscapeSequence(json, end, &ch)) {\n                lastError = QJsonParseError::IllegalEscapeSequence;\n                return false;\n            }\n        } else {\n            if (!scanUtf8Char(json, end, &ch)) {\n                lastError = QJsonParseError::IllegalUTF8String;\n                return false;\n            }\n        }\n        // bail out if the string is not pure latin1 or too long to hold as a latin1string (which has only 16 bit for the length)\n        if (ch > 0xff || json - start >= 0x8000) {\n            *latin1 = false;\n            break;\n        }\n        int pos = reserveSpace(1);\n        DEBUG << \"  \" << ch << (char)ch;\n        data[pos] = (uchar)ch;\n    }\n    ++json;\n    DEBUG << \"end of string\";\n    if (json >= end) {\n        lastError = QJsonParseError::UnterminatedString;\n        return false;\n    }\n\n    // no unicode string, we are done\n    if (*latin1) {\n        // write string length\n        *(QJsonPrivate::qle_ushort *)(data + stringPos) = ushort(current - outStart - sizeof(ushort));\n        int pos = reserveSpace((4 - current) & 3);\n        while (pos & 3)\n            data[pos++] = 0;\n        END;\n        return true;\n    }\n\n    *latin1 = false;\n    DEBUG << \"not latin\";\n\n    json = start;\n    current = outStart + sizeof(int);\n\n    while (json < end) {\n        uint ch = 0;\n        if (*json == '\"')\n            break;\n        else if (*json == '\\\\') {\n            if (!scanEscapeSequence(json, end, &ch)) {\n                lastError = QJsonParseError::IllegalEscapeSequence;\n                return false;\n            }\n        } else {\n            if (!scanUtf8Char(json, end, &ch)) {\n                lastError = QJsonParseError::IllegalUTF8String;\n                return false;\n            }\n        }\n        if (QChar::requiresSurrogates(ch)) {\n            int pos = reserveSpace(4);\n            *(QJsonPrivate::qle_ushort *)(data + pos) = QChar::highSurrogate(ch);\n            *(QJsonPrivate::qle_ushort *)(data + pos + 2) = QChar::lowSurrogate(ch);\n        } else {\n            int pos = reserveSpace(2);\n            *(QJsonPrivate::qle_ushort *)(data + pos) = (ushort)ch;\n        }\n    }\n    ++json;\n\n    if (json >= end) {\n        lastError = QJsonParseError::UnterminatedString;\n        return false;\n    }\n\n    // write string length\n    *(QJsonPrivate::qle_int *)(data + stringPos) = (current - outStart - sizeof(int))/2;\n    int pos = reserveSpace((4 - current) & 3);\n    while (pos & 3)\n        data[pos++] = 0;\n    END;\n    return true;\n}\n\nQT_END_NAMESPACE\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/json/qjsonparser_p.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the QtCore module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL21$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia. For licensing terms and\n** conditions see http://qt.digia.com/licensing. For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 or version 3 as published by the Free\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\n** LICENSE.LGPLv3 included in the packaging of this file. Please review the\n** following information to ensure the GNU Lesser General Public License\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights. These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#ifndef QJSONPARSER_P_H\n#define QJSONPARSER_P_H\n\n//\n//  W A R N I N G\n//  -------------\n//\n// This file is not part of the Qt API.  It exists purely as an\n// implementation detail.  This header file may change from version to\n// version without notice, or even be removed.\n//\n// We mean it.\n//\n\n#include \"qjsondocument.h\"\n#include <qvarlengtharray.h>\n\nQT_BEGIN_NAMESPACE\n\nnamespace QJsonPrivate {\n\nclass Parser\n{\npublic:\n    Parser(const char *json, int length);\n\n    QJsonDocument parse(QJsonParseError *error);\n\n    class ParsedObject\n    {\n    public:\n        ParsedObject(Parser *p, int pos) : parser(p), objectPosition(pos) {\n#if QT_VERSION >= 0x040800\n            offsets.reserve(64);\n#endif\n        }\n        void insert(uint offset);\n\n        Parser *parser;\n        int objectPosition;\n#if QT_VERSION >= 0x040800\n        QVarLengthArray<uint, 64> offsets;\n#else\n        QVector<uint> offsets;\n#endif\n        inline QJsonPrivate::Entry *entryAt(int i) const {\n            return reinterpret_cast<QJsonPrivate::Entry *>(parser->data + objectPosition + offsets[i]);\n        }\n    };\n\n\nprivate:\n    inline void eatBOM();\n    inline bool eatSpace();\n    inline char nextToken();\n\n    bool parseObject();\n    bool parseArray();\n    bool parseMember(int baseOffset);\n    bool parseString(bool *latin1);\n    bool parseValue(QJsonPrivate::Value *val, int baseOffset);\n    bool parseNumber(QJsonPrivate::Value *val, int baseOffset);\n    const char *head;\n    const char *json;\n    const char *end;\n\n    char *data;\n    int dataLength;\n    int current;\n    int nestingLevel;\n    QJsonParseError::ParseError lastError;\n\n    inline int reserveSpace(int space) {\n        if (current + space >= dataLength) {\n            dataLength = 2*dataLength + space;\n            data = (char *)realloc(data, dataLength);\n        }\n        int pos = current;\n        current += space;\n        return pos;\n    }\n};\n\n}\n\nQT_END_NAMESPACE\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/json/qjsonvalue.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the QtCore module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL21$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia. For licensing terms and\n** conditions see http://qt.digia.com/licensing. For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 or version 3 as published by the Free\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\n** LICENSE.LGPLv3 included in the packaging of this file. Please review the\n** following information to ensure the GNU Lesser General Public License\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights. These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#include \"qjsonobject.h\"\n#include \"qjsonvalue.h\"\n#include \"qjsonarray.h\"\n#include <qvariant.h>\n#include <qstringlist.h>\n#include <qdebug.h>\n\n#include \"qjson_p.h\"\n\nQT_BEGIN_NAMESPACE\n\n/*!\n    \\class QJsonValue\n    \\inmodule QtCore\n    \\ingroup json\n    \\reentrant\n    \\since 5.0\n\n    \\brief The QJsonValue class encapsulates a value in JSON.\n\n    A value in JSON can be one of 6 basic types:\n\n    JSON is a format to store structured data. It has 6 basic data types:\n\n    \\list\n    \\li bool QJsonValue::Bool\n    \\li double QJsonValue::Double\n    \\li string QJsonValue::String\n    \\li array QJsonValue::Array\n    \\li object QJsonValue::Object\n    \\li null QJsonValue::Null\n    \\endlist\n\n    A value can represent any of the above data types. In addition, QJsonValue has one special\n    flag to represent undefined values. This can be queried with isUndefined().\n\n    The type of the value can be queried with type() or accessors like isBool(), isString(), and so on.\n    Likewise, the value can be converted to the type stored in it using the toBool(), toString() and so on.\n\n    Values are strictly typed internally and contrary to QVariant will not attempt to do any implicit type\n    conversions. This implies that converting to a type that is not stored in the value will return a default\n    constructed return value.\n\n    \\sa {JSON Support in Qt}, {JSON Save Game Example}\n*/\n\n/*!\n    Creates a QJsonValue of type \\a type.\n\n    The default is to create a Null value.\n */\nQJsonValue::QJsonValue(Type type)\n    : ui(0), d(0), t(type)\n{\n}\n\n/*!\n    \\internal\n */\nQJsonValue::QJsonValue(QJsonPrivate::Data *data, QJsonPrivate::Base *base, const QJsonPrivate::Value &v)\n    : d(0)\n{\n    t = (Type)(uint)v.type;\n    switch (t) {\n    case Undefined:\n    case Null:\n        dbl = 0;\n        break;\n    case Bool:\n        b = v.toBoolean();\n        break;\n    case Double:\n        dbl = v.toDouble(base);\n        break;\n    case String: {\n        /*\n        QString s = v.toString(base);\n        stringData = s.data_ptr();\n        stringData->ref.ref();\n        */\n        stringValue = v.toString(base);\n        break;\n    }\n    case Array:\n    case Object:\n        d = data;\n        this->base = v.base(base);\n        break;\n    }\n    if (d)\n        d->ref.ref();\n}\n\n/*!\n    Creates a value of type Bool, with value \\a b.\n */\nQJsonValue::QJsonValue(bool b)\n    : d(0), t(Bool)\n{\n    this->b = b;\n}\n\n/*!\n    Creates a value of type Double, with value \\a n.\n */\nQJsonValue::QJsonValue(double n)\n    : d(0), t(Double)\n{\n    this->dbl = n;\n}\n\n/*!\n    \\overload\n    Creates a value of type Double, with value \\a n.\n */\nQJsonValue::QJsonValue(int n)\n    : d(0), t(Double)\n{\n    this->dbl = n;\n}\n\n/*!\n    \\overload\n    Creates a value of type Double, with value \\a n.\n    NOTE: the integer limits for IEEE 754 double precision data is 2^53 (-9007199254740992 to +9007199254740992).\n    If you pass in values outside this range expect a loss of precision to occur.\n */\nQJsonValue::QJsonValue(qint64 n)\n    : d(0), t(Double)\n{\n    this->dbl = n;\n}\n\n/*!\n    Creates a value of type String, with value \\a s.\n */\nQJsonValue::QJsonValue(const QString &s)\n    : d(0), t(String)\n{\n    stringDataFromQStringHelper(s);\n}\n\n/*!\n    \\fn QJsonValue::QJsonValue(const char *s)\n\n    Creates a value of type String with value \\a s, assuming\n    UTF-8 encoding of the input.\n\n    You can disable this constructor by defining \\c\n    QT_NO_CAST_FROM_ASCII when you compile your applications.\n\n    \\since 5.3\n */\n\nvoid QJsonValue::stringDataFromQStringHelper(const QString &string)\n{\n    // stringData = *(QStringData **)(&string);\n    // stringData->ref.ref();\n    stringValue = string;\n}\n\n/*!\n    Creates a value of type String, with value \\a s.\n */\nQJsonValue::QJsonValue(QLatin1String s)\n    : d(0), t(String)\n{\n    // ### FIXME: Avoid creating the temp QString below\n    QString str(s);\n    stringDataFromQStringHelper(str);\n}\n\n/*!\n    Creates a value of type Array, with value \\a a.\n */\nQJsonValue::QJsonValue(const QJsonArray &a)\n    : d(a.d), t(Array)\n{\n    base = a.a;\n    if (d)\n        d->ref.ref();\n}\n\n/*!\n    Creates a value of type Object, with value \\a o.\n */\nQJsonValue::QJsonValue(const QJsonObject &o)\n    : d(o.d), t(Object)\n{\n    base = o.o;\n    if (d)\n        d->ref.ref();\n}\n\n\n/*!\n    Destroys the value.\n */\nQJsonValue::~QJsonValue()\n{\n    /*\n    if (t == String && stringData && !stringData->ref.deref())\n        free(stringData);\n    */\n\n    if (d && !d->ref.deref())\n        delete d;\n}\n\n/*!\n    Creates a copy of \\a other.\n */\nQJsonValue::QJsonValue(const QJsonValue &other)\n{\n    t = other.t;\n    d = other.d;\n    ui = other.ui;\n    stringValue = other.stringValue;\n\n    if (d)\n        d->ref.ref();\n\n    /*\n    if (t == String && stringData)\n        stringData->ref.ref();\n    */\n}\n\n/*!\n    Assigns the value stored in \\a other to this object.\n */\nQJsonValue &QJsonValue::operator =(const QJsonValue &other)\n{\n    /*\n    if (t == String && stringData && !stringData->ref.deref())\n        free(stringData);\n    */\n\n    t = other.t;\n    dbl = other.dbl;\n    stringValue = other.stringValue;\n\n    if (d != other.d) {\n\n        if (d && !d->ref.deref())\n            delete d;\n        d = other.d;\n        if (d)\n            d->ref.ref();\n\n    }\n\n    /*\n    if (t == String && stringData)\n        stringData->ref.ref();\n    */\n\n    return *this;\n}\n\n/*!\n    \\fn bool QJsonValue::isNull() const\n\n    Returns \\c true if the value is null.\n*/\n\n/*!\n    \\fn bool QJsonValue::isBool() const\n\n    Returns \\c true if the value contains a boolean.\n\n    \\sa toBool()\n */\n\n/*!\n    \\fn bool QJsonValue::isDouble() const\n\n    Returns \\c true if the value contains a double.\n\n    \\sa toDouble()\n */\n\n/*!\n    \\fn bool QJsonValue::isString() const\n\n    Returns \\c true if the value contains a string.\n\n    \\sa toString()\n */\n\n/*!\n    \\fn bool QJsonValue::isArray() const\n\n    Returns \\c true if the value contains an array.\n\n    \\sa toArray()\n */\n\n/*!\n    \\fn bool QJsonValue::isObject() const\n\n    Returns \\c true if the value contains an object.\n\n    \\sa toObject()\n */\n\n/*!\n    \\fn bool QJsonValue::isUndefined() const\n\n    Returns \\c true if the value is undefined. This can happen in certain\n    error cases as e.g. accessing a non existing key in a QJsonObject.\n */\n\n\n/*!\n    Converts \\a variant to a QJsonValue and returns it.\n\n    The conversion will convert QVariant types as follows:\n\n    \\table\n    \\header\n        \\li Source type\n        \\li Destination type\n    \\row\n        \\li\n            \\list\n                \\li QMetaType::Bool\n            \\endlist\n        \\li QJsonValue::Bool\n    \\row\n        \\li\n            \\list\n                \\li QMetaType::Int\n                \\li QMetaType::UInt\n                \\li QMetaType::LongLong\n                \\li QMetaType::ULongLong\n                \\li QMetaType::Float\n                \\li QMetaType::Double\n            \\endlist\n        \\li QJsonValue::Double\n    \\row\n        \\li\n            \\list\n                \\li QMetaType::QString\n            \\endlist\n        \\li QJsonValue::String\n    \\row\n        \\li\n            \\list\n                \\li QMetaType::QStringList\n                \\li QMetaType::QVariantList\n            \\endlist\n        \\li QJsonValue::Array\n    \\row\n        \\li\n            \\list\n                \\li QMetaType::QVariantMap\n            \\endlist\n        \\li QJsonValue::Object\n    \\endtable\n\n    For all other QVariant types a conversion to a QString will be attempted. If the returned string\n    is empty, a Null QJsonValue will be stored, otherwise a String value using the returned QString.\n\n    \\sa toVariant()\n */\nQJsonValue QJsonValue::fromVariant(const QVariant &variant)\n{\n    switch (variant.userType()) {\n    case QVariant::Bool:\n        return QJsonValue(variant.toBool());\n    case QVariant::Int:\n    case QMetaType::Float:\n    case QVariant::Double:\n    case QVariant::LongLong:\n    case QVariant::ULongLong:\n    case QVariant::UInt:\n        return QJsonValue(variant.toDouble());\n    case QVariant::String:\n        return QJsonValue(variant.toString());\n    case QVariant::StringList:\n        return QJsonValue(QJsonArray::fromStringList(variant.toStringList()));\n    case QVariant::List:\n        return QJsonValue(QJsonArray::fromVariantList(variant.toList()));\n    case QVariant::Map:\n        return QJsonValue(QJsonObject::fromVariantMap(variant.toMap()));\n    default:\n        break;\n    }\n    QString string = variant.toString();\n    if (string.isEmpty())\n        return QJsonValue();\n    return QJsonValue(string);\n}\n\n/*!\n    Converts the value to a \\l {QVariant::}{QVariant()}.\n\n    The QJsonValue types will be converted as follows:\n\n    \\value Null     {QVariant::}{QVariant()}\n    \\value Bool     QMetaType::Bool\n    \\value Double   QMetaType::Double\n    \\value String   QString\n    \\value Array    QVariantList\n    \\value Object   QVariantMap\n    \\value Undefined {QVariant::}{QVariant()}\n\n    \\sa fromVariant()\n */\nQVariant QJsonValue::toVariant() const\n{\n    switch (t) {\n    case Bool:\n        return b;\n    case Double:\n        return dbl;\n    case String:\n        return toString();\n    case Array:\n        return d ?\n               QJsonArray(d, static_cast<QJsonPrivate::Array *>(base)).toVariantList() :\n               QVariantList();\n    case Object:\n        return d ?\n               QJsonObject(d, static_cast<QJsonPrivate::Object *>(base)).toVariantMap() :\n               QVariantMap();\n    case Null:\n    case Undefined:\n        break;\n    }\n    return QVariant();\n}\n\n/*!\n    \\enum QJsonValue::Type\n\n    This enum describes the type of the JSON value.\n\n    \\value Null     A Null value\n    \\value Bool     A boolean value. Use toBool() to convert to a bool.\n    \\value Double   A double. Use toDouble() to convert to a double.\n    \\value String   A string. Use toString() to convert to a QString.\n    \\value Array    An array. Use toArray() to convert to a QJsonArray.\n    \\value Object   An object. Use toObject() to convert to a QJsonObject.\n    \\value Undefined The value is undefined. This is usually returned as an\n                    error condition, when trying to read an out of bounds value\n                    in an array or a non existent key in an object.\n*/\n\n/*!\n    Returns the type of the value.\n\n    \\sa QJsonValue::Type\n */\nQJsonValue::Type QJsonValue::type() const\n{\n    return t;\n}\n\n/*!\n    Converts the value to a bool and returns it.\n\n    If type() is not bool, the \\a defaultValue will be returned.\n */\nbool QJsonValue::toBool(bool defaultValue) const\n{\n    if (t != Bool)\n        return defaultValue;\n    return b;\n}\n\n/*!\n    Converts the value to an int and returns it.\n\n    If type() is not Double or the value is not a whole number,\n    the \\a defaultValue will be returned.\n */\nint QJsonValue::toInt(int defaultValue) const\n{\n    if (t == Double && int(dbl) == dbl)\n        return dbl;\n    return defaultValue;\n}\n\n/*!\n    Converts the value to a double and returns it.\n\n    If type() is not Double, the \\a defaultValue will be returned.\n */\ndouble QJsonValue::toDouble(double defaultValue) const\n{\n    if (t != Double)\n        return defaultValue;\n    return dbl;\n}\n\n/*!\n    Converts the value to a QString and returns it.\n\n    If type() is not String, the \\a defaultValue will be returned.\n */\nQString QJsonValue::toString(const QString &defaultValue) const\n{\n    if (t != String)\n        return defaultValue;\n\n    /*\n    stringData->ref.ref(); // the constructor below doesn't add a ref.\n    QStringDataPtr holder = { stringData };\n    return QString(holder);\n    */\n    return stringValue;\n}\n\n/*!\n    Converts the value to an array and returns it.\n\n    If type() is not Array, the \\a defaultValue will be returned.\n */\nQJsonArray QJsonValue::toArray(const QJsonArray &defaultValue) const\n{\n    if (!d || t != Array)\n        return defaultValue;\n\n    return QJsonArray(d, static_cast<QJsonPrivate::Array *>(base));\n}\n\n/*!\n    \\overload\n\n    Converts the value to an array and returns it.\n\n    If type() is not Array, a \\l{QJsonArray::}{QJsonArray()} will be returned.\n */\nQJsonArray QJsonValue::toArray() const\n{\n    return toArray(QJsonArray());\n}\n\n/*!\n    Converts the value to an object and returns it.\n\n    If type() is not Object, the \\a defaultValue will be returned.\n */\nQJsonObject QJsonValue::toObject(const QJsonObject &defaultValue) const\n{\n    if (!d || t != Object)\n        return defaultValue;\n\n    return QJsonObject(d, static_cast<QJsonPrivate::Object *>(base));\n}\n\n/*!\n    \\overload\n\n    Converts the value to an object and returns it.\n\n    If type() is not Object, the \\l {QJsonObject::}{QJsonObject()} will be returned.\n*/\nQJsonObject QJsonValue::toObject() const\n{\n    return toObject(QJsonObject());\n}\n\n/*!\n    Returns \\c true if the value is equal to \\a other.\n */\nbool QJsonValue::operator==(const QJsonValue &other) const\n{\n    if (t != other.t)\n        return false;\n\n    switch (t) {\n    case Undefined:\n    case Null:\n        break;\n    case Bool:\n        return b == other.b;\n    case Double:\n        return dbl == other.dbl;\n    case String:\n        return toString() == other.toString();\n    case Array:\n        if (base == other.base)\n            return true;\n        if (!base)\n            return !other.base->length;\n        if (!other.base)\n            return !base->length;\n        return QJsonArray(d, static_cast<QJsonPrivate::Array *>(base))\n                == QJsonArray(other.d, static_cast<QJsonPrivate::Array *>(other.base));\n    case Object:\n        if (base == other.base)\n            return true;\n        if (!base)\n            return !other.base->length;\n        if (!other.base)\n            return !base->length;\n        return QJsonObject(d, static_cast<QJsonPrivate::Object *>(base))\n                == QJsonObject(other.d, static_cast<QJsonPrivate::Object *>(other.base));\n    }\n    return true;\n}\n\n/*!\n    Returns \\c true if the value is not equal to \\a other.\n */\nbool QJsonValue::operator!=(const QJsonValue &other) const\n{\n    return !(*this == other);\n}\n\n/*!\n    \\internal\n */\nvoid QJsonValue::detach()\n{\n    if (!d)\n        return;\n\n    QJsonPrivate::Data *x = d->clone(base);\n    x->ref.ref();\n    if (!d->ref.deref())\n        delete d;\n    d = x;\n    base = static_cast<QJsonPrivate::Object *>(d->header->root());\n}\n\n\n/*!\n    \\class QJsonValueRef\n    \\inmodule QtCore\n    \\reentrant\n    \\brief The QJsonValueRef class is a helper class for QJsonValue.\n\n    \\internal\n\n    \\ingroup json\n\n    When you get an object of type QJsonValueRef, if you can assign to it,\n    the assignment will apply to the character in the string from\n    which you got the reference. That is its whole purpose in life.\n\n    You can use it exactly in the same way as a reference to a QJsonValue.\n\n    The QJsonValueRef becomes invalid once modifications are made to the\n    string: if you want to keep the character, copy it into a QJsonValue.\n\n    Most of the QJsonValue member functions also exist in QJsonValueRef.\n    However, they are not explicitly documented here.\n*/\n\n\nQJsonValueRef &QJsonValueRef::operator =(const QJsonValue &val)\n{\n    if (is_object)\n        o->setValueAt(index, val);\n    else\n        a->replace(index, val);\n\n    return *this;\n}\n\nQJsonValueRef &QJsonValueRef::operator =(const QJsonValueRef &ref)\n{\n    if (is_object)\n        o->setValueAt(index, ref);\n    else\n        a->replace(index, ref);\n\n    return *this;\n}\n\nQJsonArray QJsonValueRef::toArray() const\n{\n    return toValue().toArray();\n}\n\nQJsonObject QJsonValueRef::toObject() const\n{\n    return toValue().toObject();\n}\n\nQJsonValue QJsonValueRef::toValue() const\n{\n    if (!is_object)\n        return a->at(index);\n    return o->valueAt(index);\n}\n\n#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY)\nQDebug operator<<(QDebug dbg, const QJsonValue &o)\n{\n    switch (o.t) {\n    case QJsonValue::Undefined:\n        dbg.nospace() << \"QJsonValue(undefined)\";\n        break;\n    case QJsonValue::Null:\n        dbg.nospace() << \"QJsonValue(null)\";\n        break;\n    case QJsonValue::Bool:\n        dbg.nospace() << \"QJsonValue(bool, \" << o.toBool() << \")\";\n        break;\n    case QJsonValue::Double:\n        dbg.nospace() << \"QJsonValue(double, \" << o.toDouble() << \")\";\n        break;\n    case QJsonValue::String:\n        dbg.nospace() << \"QJsonValue(string, \" << o.toString() << \")\";\n        break;\n    case QJsonValue::Array:\n        dbg.nospace() << \"QJsonValue(array, \";\n        dbg.nospace() << o.toArray();\n        dbg.nospace() << \")\";\n        break;\n    case QJsonValue::Object:\n        dbg.nospace() << \"QJsonValue(object, \";\n        dbg.nospace() << o.toObject();\n        dbg.nospace() << \")\";\n        break;\n    }\n    return dbg.space();\n}\n#endif\n\nQT_END_NAMESPACE\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/json/qjsonvalue.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the QtCore module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL21$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia. For licensing terms and\n** conditions see http://qt.digia.com/licensing. For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 or version 3 as published by the Free\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\n** LICENSE.LGPLv3 included in the packaging of this file. Please review the\n** following information to ensure the GNU Lesser General Public License\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights. These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#ifndef QJSONVALUE_H\n#define QJSONVALUE_H\n\n#include \"qjson_export.h\"\n\n#include <QtCore/qglobal.h>\n#include <QtCore/qstring.h>\n#include <QtCore/qmetatype.h>\n\nQT_BEGIN_NAMESPACE\n\nclass QDebug;\nclass QVariant;\nclass QJsonArray;\nclass QJsonObject;\n\nnamespace QJsonPrivate {\n    class Data;\n    class Base;\n    class Object;\n    class Header;\n    class Array;\n    class Value;\n    class Entry;\n}\n\nclass QJSON_EXPORT QJsonValue\n{\npublic:\n    enum Type {\n        Null =  0x0,\n        Bool = 0x1,\n        Double = 0x2,\n        String = 0x3,\n        Array = 0x4,\n        Object = 0x5,\n        Undefined = 0x80\n    };\n\n    QJsonValue(Type = Null);\n    QJsonValue(bool b);\n    QJsonValue(double n);\n    QJsonValue(int n);\n    QJsonValue(qint64 n);\n    QJsonValue(const QString &s);\n    QJsonValue(QLatin1String s);\n#ifndef QT_NO_CAST_FROM_ASCII\n    inline QT_ASCII_CAST_WARN QJsonValue(const char *s)\n        : d(0), t(String) { stringDataFromQStringHelper(QString::fromUtf8(s)); }\n#endif\n    QJsonValue(const QJsonArray &a);\n    QJsonValue(const QJsonObject &o);\n\n    ~QJsonValue();\n\n    QJsonValue(const QJsonValue &other);\n    QJsonValue &operator =(const QJsonValue &other);\n\n    static QJsonValue fromVariant(const QVariant &variant);\n    QVariant toVariant() const;\n\n    Type type() const;\n    inline bool isNull() const { return type() == Null; }\n    inline bool isBool() const { return type() == Bool; }\n    inline bool isDouble() const { return type() == Double; }\n    inline bool isString() const { return type() == String; }\n    inline bool isArray() const { return type() == Array; }\n    inline bool isObject() const { return type() == Object; }\n    inline bool isUndefined() const { return type() == Undefined; }\n\n    bool toBool(bool defaultValue = false) const;\n    int toInt(int defaultValue = 0) const;\n    double toDouble(double defaultValue = 0) const;\n    QString toString(const QString &defaultValue = QString()) const;\n    QJsonArray toArray() const;\n    QJsonArray toArray(const QJsonArray &defaultValue) const;\n    QJsonObject toObject() const;\n    QJsonObject toObject(const QJsonObject &defaultValue) const;\n\n    bool operator==(const QJsonValue &other) const;\n    bool operator!=(const QJsonValue &other) const;\n\nprivate:\n    // avoid implicit conversions from char * to bool\n    inline QJsonValue(const void *) {}\n    friend class QJsonPrivate::Value;\n    friend class QJsonArray;\n    friend class QJsonObject;\n    friend QJSON_EXPORT QDebug operator<<(QDebug, const QJsonValue &);\n\n    QJsonValue(QJsonPrivate::Data *d, QJsonPrivate::Base *b, const QJsonPrivate::Value& v);\n    void stringDataFromQStringHelper(const QString &string);\n\n    void detach();\n\n    union {\n        quint64 ui;\n        bool b;\n        double dbl;\n//        QStringData *stringData;\n        QJsonPrivate::Base *base;\n    };\n\n    QString stringValue;\n\n    QJsonPrivate::Data *d; // needed for Objects and Arrays\n    Type t;\n};\n\nclass QJSON_EXPORT QJsonValueRef\n{\npublic:\n    QJsonValueRef(QJsonArray *array, int idx)\n        : a(array), is_object(false), index(idx) {}\n    QJsonValueRef(QJsonObject *object, int idx)\n        : o(object), is_object(true), index(idx) {}\n\n    inline operator QJsonValue() const { return toValue(); }\n    QJsonValueRef &operator = (const QJsonValue &val);\n    QJsonValueRef &operator = (const QJsonValueRef &val);\n\n    inline QJsonValue::Type type() const { return toValue().type(); }\n    inline bool isNull() const { return type() == QJsonValue::Null; }\n    inline bool isBool() const { return type() == QJsonValue::Bool; }\n    inline bool isDouble() const { return type() == QJsonValue::Double; }\n    inline bool isString() const { return type() == QJsonValue::String; }\n    inline bool isArray() const { return type() == QJsonValue::Array; }\n    inline bool isObject() const { return type() == QJsonValue::Object; }\n    inline bool isUndefined() const { return type() == QJsonValue::Undefined; }\n\n    inline bool toBool() const { return toValue().toBool(); }\n    inline int toInt() const { return toValue().toInt(); }\n    inline double toDouble() const { return toValue().toDouble(); }\n    inline QString toString() const { return toValue().toString(); }\n    QJsonArray toArray() const;\n    QJsonObject toObject() const;\n\n    // ### Qt 6: Add default values\n    inline bool toBool(bool defaultValue) const { return toValue().toBool(defaultValue); }\n    inline int toInt(int defaultValue) const { return toValue().toInt(defaultValue); }\n    inline double toDouble(double defaultValue) const { return toValue().toDouble(defaultValue); }\n    inline QString toString(const QString &defaultValue) const { return toValue().toString(defaultValue); }\n\n    inline bool operator==(const QJsonValue &other) const { return toValue() == other; }\n    inline bool operator!=(const QJsonValue &other) const { return toValue() != other; }\n\nprivate:\n    QJsonValue toValue() const;\n\n    union {\n        QJsonArray *a;\n        QJsonObject *o;\n    };\n    uint is_object : 1;\n    uint index : 31;\n};\n\n#ifndef Q_QDOC\n// ### Qt 6: Get rid of these fake pointer classes\nclass QJsonValuePtr\n{\n    QJsonValue value;\npublic:\n    explicit QJsonValuePtr(const QJsonValue& val)\n        : value(val) {}\n\n    QJsonValue& operator*() { return value; }\n    QJsonValue* operator->() { return &value; }\n};\n\nclass QJsonValueRefPtr\n{\n    QJsonValueRef valueRef;\npublic:\n    QJsonValueRefPtr(QJsonArray *array, int idx)\n        : valueRef(array, idx) {}\n    QJsonValueRefPtr(QJsonObject *object, int idx)\n        : valueRef(object, idx)  {}\n\n    QJsonValueRef& operator*() { return valueRef; }\n    QJsonValueRef* operator->() { return &valueRef; }\n};\n#endif\n\nQ_DECLARE_METATYPE(QJsonValue)\n\n#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY)\nQJSON_EXPORT QDebug operator<<(QDebug, const QJsonValue &);\n#endif\n\nQT_END_NAMESPACE\n\n#endif // QJSONVALUE_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/json/qjsonwriter.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Copyright (C) 2013 Intel Corporation\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the QtCore module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL21$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia. For licensing terms and\n** conditions see http://qt.digia.com/licensing. For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 or version 3 as published by the Free\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\n** LICENSE.LGPLv3 included in the packaging of this file. Please review the\n** following information to ensure the GNU Lesser General Public License\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights. These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#include \"qjsonwriter_p.h\"\n#include \"qjson_p.h\"\n\nQT_BEGIN_NAMESPACE\n\nusing namespace QJsonPrivate;\n\nstatic void objectContentToJson(const QJsonPrivate::Object *o, QByteArray &json, int indent, bool compact);\nstatic void arrayContentToJson(const QJsonPrivate::Array *a, QByteArray &json, int indent, bool compact);\n\n// some code from qutfcodec.cpp, inlined here for performance reasons\n// to allow fast escaping of strings\nstatic inline bool isUnicodeNonCharacter(uint ucs4)\n{\n    // Unicode has a couple of \"non-characters\" that one can use internally,\n    // but are not allowed to be used for text interchange.\n    //\n    // Those are the last two entries each Unicode Plane (U+FFFE, U+FFFF,\n    // U+1FFFE, U+1FFFF, etc.) as well as the entries between U+FDD0 and\n    // U+FDEF (inclusive)\n\n    return (ucs4 & 0xfffe) == 0xfffe\n            || (ucs4 - 0xfdd0U) < 16;\n}\n\nstatic inline uchar hexdig(uint u)\n{\n    return (u < 0xa ? '0' + u : 'a' + u - 0xa);\n}\n\nstatic QByteArray escapedString(const QString &s)\n{\n    const uchar replacement = '?';\n    QByteArray ba(s.length(), Qt::Uninitialized);\n\n    uchar *cursor = (uchar *)ba.data();\n    const uchar *ba_end = cursor + ba.length();\n\n    const QChar *ch = (const QChar *)s.constData();\n    const QChar *end = ch + s.length();\n\n    int surrogate_high = -1;\n\n    while (ch < end) {\n        if (cursor >= ba_end - 6) {\n            // ensure we have enough space\n            int pos = cursor - (const uchar *)ba.constData();\n            ba.resize(ba.size()*2);\n            cursor = (uchar *)ba.data() + pos;\n            ba_end = (const uchar *)ba.constData() + ba.length();\n        }\n\n        uint u = ch->unicode();\n        if (surrogate_high >= 0) {\n            if (ch->isLowSurrogate()) {\n                u = QChar::surrogateToUcs4(surrogate_high, u);\n                surrogate_high = -1;\n            } else {\n                // high surrogate without low\n                *cursor = replacement;\n                ++ch;\n                surrogate_high = -1;\n                continue;\n            }\n        } else if (ch->isLowSurrogate()) {\n            // low surrogate without high\n            *cursor = replacement;\n            ++ch;\n            continue;\n        } else if (ch->isHighSurrogate()) {\n            surrogate_high = u;\n            ++ch;\n            continue;\n        }\n\n        if (u < 0x80) {\n            if (u < 0x20 || u == 0x22 || u == 0x5c) {\n                *cursor++ = '\\\\';\n                switch (u) {\n                case 0x22:\n                    *cursor++ = '\"';\n                    break;\n                case 0x5c:\n                    *cursor++ = '\\\\';\n                    break;\n                case 0x8:\n                    *cursor++ = 'b';\n                    break;\n                case 0xc:\n                    *cursor++ = 'f';\n                    break;\n                case 0xa:\n                    *cursor++ = 'n';\n                    break;\n                case 0xd:\n                    *cursor++ = 'r';\n                    break;\n                case 0x9:\n                    *cursor++ = 't';\n                    break;\n                default:\n                    *cursor++ = 'u';\n                    *cursor++ = '0';\n                    *cursor++ = '0';\n                    *cursor++ = hexdig(u>>4);\n                    *cursor++ = hexdig(u & 0xf);\n               }\n            } else {\n                *cursor++ = (uchar)u;\n            }\n        } else {\n            if (u < 0x0800) {\n                *cursor++ = 0xc0 | ((uchar) (u >> 6));\n            } else {\n                // is it one of the Unicode non-characters?\n                if (isUnicodeNonCharacter(u)) {\n                    *cursor++ = replacement;\n                    ++ch;\n                    continue;\n                }\n\n                if (u > 0xffff) {\n                    *cursor++ = 0xf0 | ((uchar) (u >> 18));\n                    *cursor++ = 0x80 | (((uchar) (u >> 12)) & 0x3f);\n                } else {\n                    *cursor++ = 0xe0 | (((uchar) (u >> 12)) & 0x3f);\n                }\n                *cursor++ = 0x80 | (((uchar) (u >> 6)) & 0x3f);\n            }\n            *cursor++ = 0x80 | ((uchar) (u&0x3f));\n        }\n        ++ch;\n    }\n\n    ba.resize(cursor - (const uchar *)ba.constData());\n    return ba;\n}\n\nstatic void valueToJson(const QJsonPrivate::Base *b, const QJsonPrivate::Value &v, QByteArray &json, int indent, bool compact)\n{\n    QJsonValue::Type type = (QJsonValue::Type)(uint)v.type;\n    switch (type) {\n    case QJsonValue::Bool:\n        json += v.toBoolean() ? \"true\" : \"false\";\n        break;\n    case QJsonValue::Double: {\n        const double d = v.toDouble(b);\n        if (qIsFinite(d)) // +2 to format to ensure the expected precision\n            json += QByteArray::number(d, 'g', std::numeric_limits<double>::digits10 + 2); // ::digits10 is 15\n        else\n            json += \"null\"; // +INF || -INF || NaN (see RFC4627#section2.4)\n        break;\n    }\n    case QJsonValue::String:\n        json += '\"';\n        json += escapedString(v.toString(b));\n        json += '\"';\n        break;\n    case QJsonValue::Array:\n        json += compact ? \"[\" : \"[\\n\";\n        arrayContentToJson(static_cast<QJsonPrivate::Array *>(v.base(b)), json, indent + (compact ? 0 : 1), compact);\n        json += QByteArray(4*indent, ' ');\n        json += \"]\";\n        break;\n    case QJsonValue::Object:\n        json += compact ? \"{\" : \"{\\n\";\n        objectContentToJson(static_cast<QJsonPrivate::Object *>(v.base(b)), json, indent + (compact ? 0 : 1), compact);\n        json += QByteArray(4*indent, ' ');\n        json += \"}\";\n        break;\n    case QJsonValue::Null:\n    default:\n        json += \"null\";\n    }\n}\n\nstatic void arrayContentToJson(const QJsonPrivate::Array *a, QByteArray &json, int indent, bool compact)\n{\n    if (!a || !a->length)\n        return;\n\n    QByteArray indentString(4*indent, ' ');\n\n    uint i = 0;\n    while (1) {\n        json += indentString;\n        valueToJson(a, a->at(i), json, indent, compact);\n\n        if (++i == a->length) {\n            if (!compact)\n                json += '\\n';\n            break;\n        }\n\n        json += compact ? \",\" : \",\\n\";\n    }\n}\n\n\nstatic void objectContentToJson(const QJsonPrivate::Object *o, QByteArray &json, int indent, bool compact)\n{\n    if (!o || !o->length)\n        return;\n\n    QByteArray indentString(4*indent, ' ');\n\n    uint i = 0;\n    while (1) {\n        QJsonPrivate::Entry *e = o->entryAt(i);\n        json += indentString;\n        json += '\"';\n        json += escapedString(e->key());\n        json += compact ? \"\\\":\" : \"\\\": \";\n        valueToJson(o, e->value, json, indent, compact);\n\n        if (++i == o->length) {\n            if (!compact)\n                json += '\\n';\n            break;\n        }\n\n        json += compact ? \",\" : \",\\n\";\n    }\n}\n\nvoid Writer::objectToJson(const QJsonPrivate::Object *o, QByteArray &json, int indent, bool compact)\n{\n    json.reserve(json.size() + (o ? (int)o->size : 16));\n    json += compact ? \"{\" : \"{\\n\";\n    objectContentToJson(o, json, indent + (compact ? 0 : 1), compact);\n    json += QByteArray(4*indent, ' ');\n    json += compact ? \"}\" : \"}\\n\";\n}\n\nvoid Writer::arrayToJson(const QJsonPrivate::Array *a, QByteArray &json, int indent, bool compact)\n{\n    json.reserve(json.size() + (a ? (int)a->size : 16));\n    json += compact ? \"[\" : \"[\\n\";\n    arrayContentToJson(a, json, indent + (compact ? 0 : 1), compact);\n    json += QByteArray(4*indent, ' ');\n    json += compact ? \"]\" : \"]\\n\";\n}\n\nQT_END_NAMESPACE\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/json/qjsonwriter_p.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the QtCore module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL21$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia. For licensing terms and\n** conditions see http://qt.digia.com/licensing. For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 or version 3 as published by the Free\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\n** LICENSE.LGPLv3 included in the packaging of this file. Please review the\n** following information to ensure the GNU Lesser General Public License\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights. These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#ifndef QJSONWRITER_P_H\n#define QJSONWRITER_P_H\n\n//\n//  W A R N I N G\n//  -------------\n//\n// This file is not part of the Qt API.  It exists purely as an\n// implementation detail.  This header file may change from version to\n// version without notice, or even be removed.\n//\n// We mean it.\n//\n#include \"qjsonvalue.h\"\n\nQT_BEGIN_NAMESPACE\n\nnamespace QJsonPrivate\n{\n\nclass Writer\n{\npublic:\n    static void objectToJson(const QJsonPrivate::Object *o, QByteArray &json, int indent, bool compact = false);\n    static void arrayToJson(const QJsonPrivate::Array *a, QByteArray &json, int indent, bool compact = false);\n};\n\n}\n\nQT_END_NAMESPACE\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcabstractserver.cpp",
    "content": "#include \"qjsonrpcsocket.h\"\n#include \"qjsonrpcabstractserver_p.h\"\n#include \"qjsonrpcabstractserver.h\"\n\nQJsonRpcAbstractServer::~QJsonRpcAbstractServer()\n{\n}\n\nvoid QJsonRpcAbstractServerPrivate::_q_notifyConnectedClients(const QString &method,\n                                                              const QJsonArray &params)\n{\n    QJsonRpcMessage notification =\n        QJsonRpcMessage::createNotification(method, params);\n    _q_notifyConnectedClients(notification);\n}\n\nvoid QJsonRpcAbstractServerPrivate::_q_notifyConnectedClients(const QJsonRpcMessage &message)\n{\n    for (int i = 0; i < clients.size(); ++i)\n        clients[i]->notify(message);\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcabstractserver.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSONRPCABSTRACTSERVER_H\n#define QJSONRPCABSTRACTSERVER_H\n\n#include \"qjsonrpcserviceprovider.h\"\n#include \"qjsonrpcglobal.h\"\n\nclass QJsonArray;\nclass QJsonRpcMessage;\nclass QJsonRpcAbstractServerPrivate;\nclass QJSONRPC_EXPORT QJsonRpcAbstractServer : public QJsonRpcServiceProvider\n{\npublic:\n    virtual ~QJsonRpcAbstractServer();\n    virtual int connectedClientCount() const = 0;\n\n// Q_SIGNALS:\n    virtual void clientConnected() = 0;\n    virtual void clientDisconnected() = 0;\n\n// public Q_SLOTS:\n    virtual void notifyConnectedClients(const QJsonRpcMessage &message) = 0;\n    virtual void notifyConnectedClients(const QString &method, const QJsonArray &params) = 0;\n\n};\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcabstractserver_p.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSONRPCABSTRACTSERVER_P_H\n#define QJSONRPCABSTRACTSERVER_P_H\n\n#include \"qjsonrpcabstractserver.h\"\n\nclass QJsonRpcSocket;\n#if defined(USE_QT_PRIVATE_HEADERS)\n#include <private/qobject_p.h>\n\nclass QJsonRpcAbstractServerPrivate : public QObjectPrivate\n#else\nclass QJsonRpcAbstractServerPrivate\n#endif\n{\npublic:\n#if !defined(USE_QT_PRIVATE_HEADERS)\n    virtual ~QJsonRpcAbstractServerPrivate() {}\n#endif\n\n    void _q_notifyConnectedClients(const QJsonRpcMessage &message);\n    void _q_notifyConnectedClients(const QString &method, const QJsonArray &params);\n\n    QList<QJsonRpcSocket*> clients;\n};\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcglobal.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSONRPCGLOBAL_H\n#define QJSONRPCGLOBAL_H\n\n#include <QtGlobal>\n#include <QMetaType>\n\n// error codes defined by spec\nnamespace QJsonRpc {\n    enum ErrorCode {\n        NoError         = 0,\n        ParseError      = -32700,           // Invalid JSON was received by the server.\n                                            // An error occurred on the server while parsing the JSON text.\n        InvalidRequest  = -32600,           // The JSON sent is not a valid Request object.\n        MethodNotFound  = -32601,           // The method does not exist / is not available.\n        InvalidParams   = -32602,           // Invalid method parameter(s).\n        InternalError   = -32603,           // Internal JSON-RPC error.\n        ServerErrorBase = -32000,           // Reserved for implementation-defined server-errors.\n        UserError       = -32099,           // Anything after this is user defined\n        TimeoutError    = -32100\n    };\n}\nQ_DECLARE_METATYPE(QJsonRpc::ErrorCode)\n\n#define qJsonRpcDebug if (qgetenv(\"QJSONRPC_DEBUG\").isEmpty()); else qDebug\n\n#ifdef QJSONRPC_SHARED\n#   ifdef QJSONRPC_BUILD\n#       define QJSONRPC_EXPORT Q_DECL_EXPORT\n#   else\n#       define QJSONRPC_EXPORT Q_DECL_IMPORT\n#   endif\n#else\n#   define QJSONRPC_EXPORT\n#endif\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpchttpclient.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QEventLoop>\n#include <QTimer>\n#include <QDebug>\n\n#if QT_VERSION >= 0x050000\n#include <QJsonDocument>\n#else\n#include \"json/qjsondocument.h\"\n#endif\n\n#include \"qjsonrpcsocket_p.h\"\n#include \"qjsonrpcservicereply_p.h\"\n#include \"qjsonrpchttpclient.h\"\n\nclass QJsonRpcHttpReplyPrivate : public QJsonRpcServiceReplyPrivate\n{\npublic:\n    QNetworkReply *reply;\n};\n\nclass QJsonRpcHttpReply : public QJsonRpcServiceReply\n{\n    Q_OBJECT\npublic:\n    QJsonRpcHttpReply(const QJsonRpcMessage &request,\n                      QNetworkReply *reply, QObject *parent = 0)\n        : QJsonRpcServiceReply(*new QJsonRpcHttpReplyPrivate, parent)\n    {\n        Q_D(QJsonRpcHttpReply);\n        d->request = request;\n        d->reply = reply;\n        connect(d->reply, SIGNAL(finished()), this, SLOT(networkReplyFinished()));\n        connect(d->reply, SIGNAL(error(QNetworkReply::NetworkError)),\n                    this, SLOT(networkReplyError(QNetworkReply::NetworkError)));\n    }\n\n    virtual ~QJsonRpcHttpReply() {}\n\nQ_SIGNALS:\n    void messageReceived(const QJsonRpcMessage &message);\n\nprivate Q_SLOTS:\n    void networkReplyFinished()\n    {\n        Q_D(QJsonRpcHttpReply);\n        QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender());\n        if (!reply) {\n            qJsonRpcDebug() << Q_FUNC_INFO << \"invalid reply\";\n            return;\n        }\n\n        if (reply->error() != QNetworkReply::NoError) {\n            // this should be handled by the networkReplyError slot\n        } else {\n            QByteArray data = reply->readAll();\n            QJsonDocument doc = QJsonDocument::fromJson(data);\n            if (doc.isEmpty() || doc.isNull() || !doc.isObject()) {\n                d->response =\n                    d->request.createErrorResponse(QJsonRpc::ParseError,\n                                                   \"unable to process incoming JSON data\",\n                                                   QString::fromUtf8(data));\n            } else {\n                qJsonRpcDebug() << \"received: \" << doc.toJson();\n                QJsonRpcMessage response = QJsonRpcMessage::fromObject(doc.object());\n                Q_EMIT messageReceived(response);\n\n                if (d->request.type() == QJsonRpcMessage::Request &&\n                    d->request.id() != response.id()) {\n                    d->response =\n                        d->request.createErrorResponse(QJsonRpc::InternalError,\n                                                       \"invalid response id\",\n                                                       QString::fromUtf8(data));\n                } else {\n                    d->response = response;\n                }\n            }\n        }\n\n        reply->deleteLater();\n        Q_EMIT finished();\n    }\n\n    void networkReplyError(QNetworkReply::NetworkError code)\n    {\n        Q_D(QJsonRpcHttpReply);\n        QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender());\n        if (!reply) {\n            qJsonRpcDebug() << Q_FUNC_INFO << \"invalid reply\";\n            return;\n        }\n\n        if (code == QNetworkReply::NoError)\n            return;\n\n        QJsonRpcMessage response = QJsonRpcMessage::fromJson(reply->readAll());\n        if (response.isValid()) {\n            d->response = response;\n            Q_EMIT messageReceived(response);\n        } else {\n            d->response = d->request.createErrorResponse(QJsonRpc::InternalError,\n                                           QString(\"error with http request: %1\").arg(reply->error()),\n                                           reply->errorString());\n        }\n    }\n\nprivate:\n    Q_DISABLE_COPY(QJsonRpcHttpReply)\n    Q_DECLARE_PRIVATE(QJsonRpcHttpReply)\n\n};\n\nclass QJsonRpcHttpClientPrivate : public QJsonRpcAbstractSocketPrivate\n{\npublic:\n    void initializeNetworkAccessManager(QJsonRpcHttpClient *client) {\n        QObject::connect(networkAccessManager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),\n                client, SLOT(handleAuthenticationRequired(QNetworkReply*,QAuthenticator*)));\n        QObject::connect(networkAccessManager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),\n                client, SLOT(handleSslErrors(QNetworkReply*,QList<QSslError>)));\n    }\n\n    QNetworkReply *writeMessage(const QJsonRpcMessage &message) {\n        QNetworkRequest request(endPoint);\n        request.setHeader(QNetworkRequest::ContentTypeHeader, \"application/json\");\n        request.setRawHeader(\"Accept\", \"application/json-rpc\");\n        if (!sslConfiguration.isNull())\n            request.setSslConfiguration(sslConfiguration);\n\n        QByteArray data = message.toJson();\n        qJsonRpcDebug() << \"sending: \" << data;\n        return networkAccessManager->post(request, data);\n    }\n\n    QUrl endPoint;\n    QNetworkAccessManager *networkAccessManager;\n    QSslConfiguration sslConfiguration;\n};\n\nQJsonRpcHttpClient::QJsonRpcHttpClient(QObject *parent)\n    : QJsonRpcAbstractSocket(*new QJsonRpcHttpClientPrivate, parent)\n{\n    Q_D(QJsonRpcHttpClient);\n    d->networkAccessManager = new QNetworkAccessManager(this);\n    d->initializeNetworkAccessManager(this);\n}\n\nQJsonRpcHttpClient::QJsonRpcHttpClient(QNetworkAccessManager *manager, QObject *parent)\n    : QJsonRpcAbstractSocket(*new QJsonRpcHttpClientPrivate, parent)\n{\n    Q_D(QJsonRpcHttpClient);\n    d->networkAccessManager = manager;\n    d->initializeNetworkAccessManager(this);\n}\n\nQJsonRpcHttpClient::QJsonRpcHttpClient(const QString &endPoint, QObject *parent)\n    : QJsonRpcAbstractSocket(*new QJsonRpcHttpClientPrivate, parent)\n{\n    Q_D(QJsonRpcHttpClient);\n    d->endPoint = QUrl::fromUserInput(endPoint);\n    d->networkAccessManager = new QNetworkAccessManager(this);\n    d->initializeNetworkAccessManager(this);\n}\n\nQJsonRpcHttpClient::~QJsonRpcHttpClient()\n{\n}\n\nbool QJsonRpcHttpClient::isValid() const\n{\n    Q_D(const QJsonRpcHttpClient);\n    return d->networkAccessManager && !d->endPoint.isEmpty() && d->endPoint.isValid();\n}\n\nQUrl QJsonRpcHttpClient::endPoint() const\n{\n    Q_D(const QJsonRpcHttpClient);\n    return d->endPoint;\n}\n\nvoid QJsonRpcHttpClient::setEndPoint(const QUrl &endPoint)\n{\n    Q_D(QJsonRpcHttpClient);\n    d->endPoint = endPoint;\n}\n\nvoid QJsonRpcHttpClient::setEndPoint(const QString &endPoint)\n{\n    Q_D(QJsonRpcHttpClient);\n    d->endPoint = QUrl::fromUserInput(endPoint);\n}\n\nQNetworkAccessManager *QJsonRpcHttpClient::networkAccessManager()\n{\n    Q_D(QJsonRpcHttpClient);\n    return d->networkAccessManager;\n}\n\nQSslConfiguration QJsonRpcHttpClient::sslConfiguration() const\n{\n    Q_D(const QJsonRpcHttpClient);\n    return d->sslConfiguration;\n}\n\nvoid QJsonRpcHttpClient::setSslConfiguration(const QSslConfiguration &sslConfiguration)\n{\n    Q_D(QJsonRpcHttpClient);\n    d->sslConfiguration = sslConfiguration;\n}\n\nvoid QJsonRpcHttpClient::notify(const QJsonRpcMessage &message)\n{\n    Q_D(QJsonRpcHttpClient);\n    if (d->endPoint.isEmpty()) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"invalid endpoint specified\";\n        return;\n    }\n\n    QNetworkReply *reply = d->writeMessage(message);\n    connect(reply, SIGNAL(finished()), reply, SLOT(deleteLater()));\n\n    // NOTE: we might want to connect this to a local slot to track errors\n    //       for debugging later?\n    connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), reply, SLOT(deleteLater()));\n}\n\nQJsonRpcServiceReply *QJsonRpcHttpClient::sendMessage(const QJsonRpcMessage &message)\n{\n    Q_D(QJsonRpcHttpClient);\n    if (d->endPoint.isEmpty()) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"invalid endpoint specified\";\n        return 0;\n    }\n\n    QNetworkReply *reply = d->writeMessage(message);\n    QJsonRpcHttpReply *serviceReply = new QJsonRpcHttpReply(message, reply);\n    connect(serviceReply, SIGNAL(messageReceived(QJsonRpcMessage)),\n                    this, SIGNAL(messageReceived(QJsonRpcMessage)));\n\n    return serviceReply;\n}\n\nQJsonRpcMessage QJsonRpcHttpClient::sendMessageBlocking(const QJsonRpcMessage &message, int msecs)\n{\n    QJsonRpcServiceReply *reply = sendMessage(message);\n    QScopedPointer<QJsonRpcServiceReply> replyPtr(reply);\n\n    QEventLoop responseLoop;\n    connect(reply, SIGNAL(finished()), &responseLoop, SLOT(quit()));\n    QTimer::singleShot(msecs, &responseLoop, SLOT(quit()));\n    responseLoop.exec();\n\n    if (!reply->response().isValid())\n        return message.createErrorResponse(QJsonRpc::TimeoutError, \"request timed out\");\n    return reply->response();\n}\n\nQJsonRpcMessage QJsonRpcHttpClient::invokeRemoteMethodBlocking(const QString &method, int msecs, const QVariant &param1,\n                                                               const QVariant &param2, const QVariant &param3,\n                                                               const QVariant &param4, const QVariant &param5,\n                                                               const QVariant &param6, const QVariant &param7,\n                                                               const QVariant &param8, const QVariant &param9,\n                                                               const QVariant &param10)\n{\n    QVariantList params;\n    if (param1.isValid()) params.append(param1);\n    if (param2.isValid()) params.append(param2);\n    if (param3.isValid()) params.append(param3);\n    if (param4.isValid()) params.append(param4);\n    if (param5.isValid()) params.append(param5);\n    if (param6.isValid()) params.append(param6);\n    if (param7.isValid()) params.append(param7);\n    if (param8.isValid()) params.append(param8);\n    if (param9.isValid()) params.append(param9);\n    if (param10.isValid()) params.append(param10);\n\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(method, QJsonArray::fromVariantList(params));\n    return sendMessageBlocking(request, msecs);\n}\n\nQJsonRpcMessage QJsonRpcHttpClient::invokeRemoteMethodBlocking(const QString &method, const QVariant &param1,\n                                                               const QVariant &param2, const QVariant &param3,\n                                                               const QVariant &param4, const QVariant &param5,\n                                                               const QVariant &param6, const QVariant &param7,\n                                                               const QVariant &param8, const QVariant &param9,\n                                                               const QVariant &param10)\n{\n    Q_D(QJsonRpcHttpClient);\n\n    return invokeRemoteMethodBlocking(method, d->defaultRequestTimeout, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10);\n}\n\nQJsonRpcServiceReply *QJsonRpcHttpClient::invokeRemoteMethod(const QString &method, const QVariant &param1,\n                                                             const QVariant &param2, const QVariant &param3,\n                                                             const QVariant &param4, const QVariant &param5,\n                                                             const QVariant &param6, const QVariant &param7,\n                                                             const QVariant &param8, const QVariant &param9,\n                                                             const QVariant &param10)\n{\n    QVariantList params;\n    if (param1.isValid()) params.append(param1);\n    if (param2.isValid()) params.append(param2);\n    if (param3.isValid()) params.append(param3);\n    if (param4.isValid()) params.append(param4);\n    if (param5.isValid()) params.append(param5);\n    if (param6.isValid()) params.append(param6);\n    if (param7.isValid()) params.append(param7);\n    if (param8.isValid()) params.append(param8);\n    if (param9.isValid()) params.append(param9);\n    if (param10.isValid()) params.append(param10);\n\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(method, QJsonArray::fromVariantList(params));\n    return sendMessage(request);\n}\n\nvoid QJsonRpcHttpClient::handleAuthenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator)\n{\n    Q_UNUSED(reply)\n    Q_UNUSED(authenticator)\n}\n\nvoid QJsonRpcHttpClient::handleSslErrors(QNetworkReply *reply, const QList<QSslError> &errors)\n{\n    Q_UNUSED(errors)\n    reply->ignoreSslErrors();\n}\n\n#include \"qjsonrpchttpclient.moc\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpchttpclient.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSONRPCHTTPCLIENT_H\n#define QJSONRPCHTTPCLIENT_H\n\n#include <QObject>\n#include <QNetworkReply>\n#include <QSslConfiguration>\n\n#include \"qjsonrpcglobal.h\"\n#include \"qjsonrpcmessage.h\"\n#include \"qjsonrpcsocket.h\"\n#include \"qjsonrpcservicereply.h\"\n\nclass QNetwokReply;\nclass QAuthenticator;\nclass QSslError;\nclass QNetworkAccessManager;\nclass QJsonRpcHttpClientPrivate;\nclass QJSONRPC_EXPORT QJsonRpcHttpClient : public QJsonRpcAbstractSocket\n{\n    Q_OBJECT\npublic:\n    QJsonRpcHttpClient(QObject *parent = 0);\n    QJsonRpcHttpClient(const QString &endPoint, QObject *parent = 0);\n    QJsonRpcHttpClient(QNetworkAccessManager *manager, QObject *parent = 0);\n    ~QJsonRpcHttpClient();\n\n    virtual bool isValid() const;\n\n    QUrl endPoint() const;\n    void setEndPoint(const QUrl &endPoint);\n    void setEndPoint(const QString &endPoint);\n\n    QNetworkAccessManager *networkAccessManager();\n\n    QSslConfiguration sslConfiguration() const;\n    void setSslConfiguration(const QSslConfiguration &sslConfiguration);\n\npublic Q_SLOTS:\n    virtual void notify(const QJsonRpcMessage &message);\n    virtual QJsonRpcMessage sendMessageBlocking(const QJsonRpcMessage &message, int msecs = DEFAULT_MSECS_REQUEST_TIMEOUT);\n    virtual QJsonRpcServiceReply *sendMessage(const QJsonRpcMessage &message);\n\n    virtual QJsonRpcMessage invokeRemoteMethodBlocking(const QString &method, int msecs, const QVariant &arg1 = QVariant(),\n                                               const QVariant &arg2 = QVariant(), const QVariant &arg3 = QVariant(),\n                                               const QVariant &arg4 = QVariant(), const QVariant &arg5 = QVariant(),\n                                               const QVariant &arg6 = QVariant(), const QVariant &arg7 = QVariant(),\n                                               const QVariant &arg8 = QVariant(), const QVariant &arg9 = QVariant(),\n                                               const QVariant &arg10 = QVariant());\n    virtual QJsonRpcMessage invokeRemoteMethodBlocking(const QString &method, const QVariant &arg1 = QVariant(),\n                                               const QVariant &arg2 = QVariant(), const QVariant &arg3 = QVariant(),\n                                               const QVariant &arg4 = QVariant(), const QVariant &arg5 = QVariant(),\n                                               const QVariant &arg6 = QVariant(), const QVariant &arg7 = QVariant(),\n                                               const QVariant &arg8 = QVariant(), const QVariant &arg9 = QVariant(),\n                                               const QVariant &arg10 = QVariant());\n    virtual QJsonRpcServiceReply *invokeRemoteMethod(const QString &method, const QVariant &arg1 = QVariant(),\n                                             const QVariant &arg2 = QVariant(), const QVariant &arg3 = QVariant(),\n                                             const QVariant &arg4 = QVariant(), const QVariant &arg5 = QVariant(),\n                                             const QVariant &arg6 = QVariant(), const QVariant &arg7 = QVariant(),\n                                             const QVariant &arg8 = QVariant(), const QVariant &arg9 = QVariant(),\n                                             const QVariant &arg10 = QVariant());\n\nprotected Q_SLOTS:\n    virtual void handleAuthenticationRequired(QNetworkReply *reply, QAuthenticator * authenticator);\n    virtual void handleSslErrors( QNetworkReply * reply, const QList<QSslError> &errors);\n\nprivate:\n    Q_DISABLE_COPY(QJsonRpcHttpClient)\n    Q_DECLARE_PRIVATE(QJsonRpcHttpClient)\n\n};\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpchttpserver.cpp",
    "content": "#include <QStringList>\n#include <QDateTime>\n\n#if QT_VERSION >= 0x050000\n#include <QJsonDocument>\n#else\n#include \"json/qjsondocument.h\"\n#endif\n\n#include \"qjsonrpcsocket.h\"\n#include \"qjsonrpcmessage.h\"\n#include \"qjsonrpchttpserver_p.h\"\n#include \"qjsonrpchttpserver.h\"\n\nQJsonRpcHttpServerSocket::QJsonRpcHttpServerSocket(QObject *parent)\n    : QSslSocket(parent),\n      m_requestParser(0)\n{\n    // initialize request parser\n    m_requestParser = (http_parser*)malloc(sizeof(http_parser));\n    http_parser_init(m_requestParser, HTTP_REQUEST);\n    m_requestParserSettings.on_message_begin = onMessageBegin;\n    m_requestParserSettings.on_url = onUrl;\n    m_requestParserSettings.on_header_field = onHeaderField;\n    m_requestParserSettings.on_header_value = onHeaderValue;\n    m_requestParserSettings.on_headers_complete = onHeadersComplete;\n    m_requestParserSettings.on_body = onBody;\n    m_requestParserSettings.on_message_complete = onMessageComplete;\n    m_requestParser->data = this;\n\n    connect(this, SIGNAL(readyRead()), this, SLOT(readIncomingData()));\n}\n\nQJsonRpcHttpServerSocket::~QJsonRpcHttpServerSocket()\n{\n    free(m_requestParser);\n}\n\nstatic inline QByteArray statusMessageForCode(int code)\n{\n    switch (code) {\n    case 200:\n        return \"OK\";\n    case 400:\n        return \"Bad Request\";\n    case 404:\n        return \"Not Found\";\n    case 405:\n        return \"Method Not Allowed\";\n    case 500:\n        return \"Internal Server Error\";\n    }\n\n    return QByteArray();\n}\n\nqint64 QJsonRpcHttpServerSocket::writeData(const char *data, qint64 maxSize)\n{\n    m_responseBuffer.append(data, (int)maxSize);\n    QJsonDocument document = QJsonDocument::fromJson(m_responseBuffer);\n    if (document.isObject()) {\n        // determine the HTTP code to respond with\n        int statusCode = 200;\n        QJsonRpcMessage message = QJsonRpcMessage::fromObject(document.object());\n        switch (message.type()) {\n        case QJsonRpcMessage::Error:\n            switch (message.errorCode()) {\n            case QJsonRpc::InvalidRequest:\n                statusCode = 400;\n                break;\n\n            case QJsonRpc::MethodNotFound:\n                statusCode = 404;\n                break;\n\n            default:\n                statusCode = 500;\n                break;\n            }\n            break;\n\n        case QJsonRpcMessage::Invalid:\n            statusCode = 400;\n            break;\n\n        case QJsonRpcMessage::Notification:\n        case QJsonRpcMessage::Response:\n        case QJsonRpcMessage::Request:\n            statusCode = 200;\n            break;\n        }\n\n        // header\n        QByteArray responseHeader;\n        responseHeader += \"HTTP/1.1 \" + QByteArray::number(statusCode) +\" \" + statusMessageForCode(statusCode) + \"\\r\\n\";\n\n        if(m_requestHeaders.contains(\"origin\")) {\n          QString origin = m_requestHeaders[\"origin\"];\n          responseHeader += \"Access-Control-Allow-Origin: \" + origin.toUtf8() + \"\\r\\n\";\n        }\n\n        responseHeader += \"Content-Type: application/json-rpc\\r\\n\";\n        responseHeader += \"Content-Length: \" + QByteArray::number(m_responseBuffer.size()) + \"\\r\\n\";\n        responseHeader += \"\\r\\n\";\n\n        // body\n        m_responseBuffer.prepend(responseHeader);\n        qint64 bytesWritten = QSslSocket::writeData(m_responseBuffer.constData(), m_responseBuffer.size());\n        close();\n\n        // then clear the buffer\n        m_responseBuffer.clear();\n        return bytesWritten;\n    }\n\n    return maxSize;\n}\n\nvoid QJsonRpcHttpServerSocket::sendOptionsResponse(int statusCode)\n{\n    QByteArray responseHeader;\n\n    responseHeader += \"HTTP/1.1 \" + QByteArray::number(statusCode) +\" \" + statusMessageForCode(statusCode) + \"\\r\\n\";\n    \n    if(m_requestHeaders.contains(\"origin\")) {\n      QByteArray origin = m_requestHeaders[\"origin\"].toLatin1();\n      responseHeader += \"Access-Control-Allow-Origin: \" + origin + \"\\r\\n\";\n    }\n\n    if(m_requestHeaders.contains(\"access-control-request-method\")) {\n      QByteArray allowed_method = m_requestHeaders[\"access-control-request-method\"].toLatin1();\n      responseHeader += \"Access-Control-Allow-Methods: \" + allowed_method + \"\\r\\n\";\n    }\n\n    if(m_requestHeaders.contains(\"access-control-request-headers\")) {\n      QByteArray allowed_headers = m_requestHeaders[\"access-control-request-headers\"].toLatin1();\n      responseHeader += \"Access-Control-Allow-Headers: \" + allowed_headers + \"\\r\\n\";\n    }\n\n    responseHeader += \"Content-Type: text/plain\\r\\n\";\n    responseHeader += \"Connection: keep-alive\\r\\n\";\n    responseHeader += \"\\r\\n\";\n\n    QSslSocket::writeData(responseHeader.constData(), responseHeader.size());\n    close();\n}\n\nvoid QJsonRpcHttpServerSocket::sendErrorResponse(int statusCode)\n{\n    QByteArray responseHeader;\n    responseHeader += \"HTTP/1.1 \" + QByteArray::number(statusCode) +\" \" + statusMessageForCode(statusCode) + \"\\r\\n\";\n    responseHeader += \"\\r\\n\";\n\n    QSslSocket::writeData(responseHeader.constData(), responseHeader.size());\n    close();\n}\n\nvoid QJsonRpcHttpServerSocket::readIncomingData()\n{\n    QByteArray requestBuffer = readAll();\n    http_parser_execute(m_requestParser, &m_requestParserSettings,\n                        requestBuffer.constData(), requestBuffer.size());\n}\n\nint QJsonRpcHttpServerSocket::onBody(http_parser *parser, const char *at, size_t length)\n{\n    QJsonRpcHttpServerSocket *request = (QJsonRpcHttpServerSocket *)parser->data;\n    request->m_requestPayload = QByteArray(at, length);\n    return 0;\n}\n\nint QJsonRpcHttpServerSocket::onMessageComplete(http_parser *parser)\n{\n    QJsonRpcHttpServerSocket *request = (QJsonRpcHttpServerSocket *)parser->data;\n    QJsonRpcMessage message = QJsonRpcMessage::fromJson(request->m_requestPayload);\n    Q_EMIT request->messageReceived(message);\n    return 0;\n}\n\nint QJsonRpcHttpServerSocket::onHeadersComplete(http_parser *parser)\n{\n    QJsonRpcHttpServerSocket *request = (QJsonRpcHttpServerSocket *)parser->data;\n\n    if (parser->method == HTTP_OPTIONS) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"OPTIONS method\" << parser->method;\n        request->sendOptionsResponse(200);\n        return 0;\n    }\n\n    // need to add the final headers received\n    if (!request->m_currentHeaderField.isEmpty() && !request->m_currentHeaderValue.isEmpty()) {\n        request->m_requestHeaders.insert(request->m_currentHeaderField.toLower(), request->m_currentHeaderValue);\n        request->m_currentHeaderField.clear();\n        request->m_currentHeaderValue.clear();\n    }\n\n    if (parser->method != HTTP_GET && parser->method != HTTP_POST) {\n        // NOTE: close the socket, cleanup, delete, etc..\n        qJsonRpcDebug() << Q_FUNC_INFO << \"invalid method: \" << parser->method;\n        request->sendErrorResponse(405);\n        return -1;\n    }\n\n    // check headers\n    // see: http://www.jsonrpc.org/historical/json-rpc-over-http.html#http-header\n    QStringList requiredHeaders =\n        QStringList() << \"content-type\" << \"content-length\" << \"accept\";\n    foreach (QString requiredHeader, requiredHeaders) {\n        if (!request->m_requestHeaders.contains(requiredHeader)) {\n            qJsonRpcDebug() << Q_FUNC_INFO << \"error: \" << request->m_requestHeaders;\n            request->sendErrorResponse(400);\n            return -1;\n        }\n    }\n\n    QStringList supportedContentTypes =\n        QStringList() << \"application/json-rpc\" << \"application/json\" << \"application/jsonrequest\";\n    QString contentType = request->m_requestHeaders.value(\"content-type\");\n    bool foundSupportedContentType = false;\n    foreach (QString supportedContentType, supportedContentTypes) {\n        if (contentType.contains(supportedContentType)) {\n            foundSupportedContentType = true;\n            break;\n        }\n    }\n\n    QString acceptType = request->m_requestHeaders.value(\"accept\");\n    if (!foundSupportedContentType || !supportedContentTypes.contains(acceptType)) {\n        // NOTE: signal the error\n        qJsonRpcDebug() << Q_FUNC_INFO << \"invalid content or accept type\";\n        request->sendErrorResponse(400);\n        return -1;\n    }\n\n    return 0;\n}\n\nint QJsonRpcHttpServerSocket::onHeaderField(http_parser *parser, const char *at, size_t length)\n{\n    QJsonRpcHttpServerSocket *request = (QJsonRpcHttpServerSocket *)parser->data;\n    if (!request->m_currentHeaderField.isEmpty() && !request->m_currentHeaderValue.isEmpty()) {\n        request->m_requestHeaders.insert(request->m_currentHeaderField.toLower(), request->m_currentHeaderValue);\n        request->m_currentHeaderField.clear();\n        request->m_currentHeaderValue.clear();\n    }\n\n    request->m_currentHeaderField.append(QString::fromUtf8(at, length));\n    return 0;\n}\n\nint QJsonRpcHttpServerSocket::onHeaderValue(http_parser *parser, const char *at, size_t length)\n{\n    QJsonRpcHttpServerSocket *request = (QJsonRpcHttpServerSocket *)parser->data;\n    request->m_currentHeaderValue.append(QString::fromUtf8(at, length));\n    return 0;\n}\n\nint QJsonRpcHttpServerSocket::onMessageBegin(http_parser *parser)\n{\n    QJsonRpcHttpServerSocket *request = (QJsonRpcHttpServerSocket *)parser->data;\n    request->m_requestHeaders.clear();\n    return 0;\n}\n\nint QJsonRpcHttpServerSocket::onUrl(http_parser *parser, const char *at, size_t length)\n{\n    Q_UNUSED(parser)\n    Q_UNUSED(at)\n    Q_UNUSED(length)\n//    QString url = QString::fromLatin1(at, length);\n//    qDebug() << \"requested url: \" << url;\n\n    return 0;\n}\n\nQJsonRpcHttpServerRpcSocket::QJsonRpcHttpServerRpcSocket(QIODevice *device, QObject *parent)\n    : QJsonRpcSocket(device, parent)\n{\n    disconnect(device, SIGNAL(readyRead()), this, SLOT(_q_processIncomingData()));\n}\n\nQJsonRpcHttpServer::QJsonRpcHttpServer(QObject *parent)\n    : QTcpServer(parent),\n      d_ptr(new QJsonRpcHttpServerPrivate(this))\n{\n}\n\nQJsonRpcHttpServer::~QJsonRpcHttpServer()\n{\n}\n\nQSslConfiguration QJsonRpcHttpServer::sslConfiguration() const\n{\n    Q_D(const QJsonRpcHttpServer);\n    return d->sslConfiguration;\n}\n\nvoid QJsonRpcHttpServer::setSslConfiguration(const QSslConfiguration &config)\n{\n    Q_D(QJsonRpcHttpServer);\n    d->sslConfiguration = config;\n}\n\n#if QT_VERSION >= 0x050000\nvoid QJsonRpcHttpServer::incomingConnection(qintptr socketDescriptor)\n#else\nvoid QJsonRpcHttpServer::incomingConnection(int socketDescriptor)\n#endif\n{\n    Q_D(QJsonRpcHttpServer);\n    QJsonRpcHttpServerSocket *socket = new QJsonRpcHttpServerSocket(this);\n    if (!socket->setSocketDescriptor(socketDescriptor)) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"unable to set socket descriptor\";\n        socket->deleteLater();\n        return;\n    }\n\n    if (!d->sslConfiguration.isNull()) {\n        socket->setSslConfiguration(d->sslConfiguration);\n        socket->startServerEncryption();\n        // connect ssl error signals etc\n\n        // NOTE: unsafe\n        connect(socket, SIGNAL(sslErrors(QList<QSslError>)), socket, SLOT(ignoreSslErrors()));\n    }\n\n    connect(socket, SIGNAL(disconnected()), this, SLOT(_q_socketDisconnected()));\n    connect(socket, SIGNAL(messageReceived(QJsonRpcMessage)),\n              this, SLOT(processIncomingMessage(QJsonRpcMessage)));\n    QJsonRpcHttpServerRpcSocket *rpcSocket = new QJsonRpcHttpServerRpcSocket(socket, this);\n    d->requestSocketLookup.insert(socket, rpcSocket);\n}\n\nvoid QJsonRpcHttpServer::processIncomingMessage(const QJsonRpcMessage &message)\n{\n    Q_D(QJsonRpcHttpServer);\n    QJsonRpcHttpServerSocket *request = qobject_cast<QJsonRpcHttpServerSocket*>(sender());\n    if (!request)\n        return;\n\n    QJsonRpcSocket *socket = d->requestSocketLookup.value(request);\n    processMessage(socket, message);\n}\n\nint QJsonRpcHttpServer::connectedClientCount() const\n{\n    return 0;\n}\n\nvoid QJsonRpcHttpServer::notifyConnectedClients(const QJsonRpcMessage &message)\n{\n    Q_UNUSED(message);\n}\n\nvoid QJsonRpcHttpServer::notifyConnectedClients(const QString &method, const QJsonArray &params)\n{\n    Q_UNUSED(method);\n    Q_UNUSED(params);\n}\n\nvoid QJsonRpcHttpServerPrivate::_q_socketDisconnected()\n{\n    Q_Q(QJsonRpcHttpServer);\n    QJsonRpcHttpServerSocket *socket = qobject_cast<QJsonRpcHttpServerSocket*>(q->sender());\n    if (!socket)\n        return;\n\n    QJsonRpcSocket *rpcSocket = requestSocketLookup.take(socket);\n    rpcSocket->deleteLater();\n    socket->deleteLater();\n}\n\n#include \"moc_qjsonrpchttpserver.cpp\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpchttpserver.h",
    "content": "#ifndef QJSONRPCHTTPSERVER_H\n#define QJSONRPCHTTPSERVER_H\n\n#include <QSslConfiguration>\n#include <QTcpServer>\n#include <QHash>\n\n#include \"qjsonrpcabstractserver.h\"\n#include \"qjsonrpcglobal.h\"\n\nclass QJsonRpcHttpServerPrivate;\nclass QJSONRPC_EXPORT QJsonRpcHttpServer : public QTcpServer,\n                                           public QJsonRpcAbstractServer\n{\n    Q_OBJECT\npublic:\n    QJsonRpcHttpServer(QObject *parent = 0);\n    ~QJsonRpcHttpServer();\n\n    QSslConfiguration sslConfiguration() const;\n    void setSslConfiguration(const QSslConfiguration &config);\n\n    virtual int connectedClientCount() const;\n\nQ_SIGNALS:\n    void clientConnected();\n    void clientDisconnected();\n\npublic Q_SLOTS:\n    virtual void notifyConnectedClients(const QJsonRpcMessage &message);\n    virtual void notifyConnectedClients(const QString &method, const QJsonArray &params);\n\nprotected:\n#if QT_VERSION >= 0x050000\n    virtual void incomingConnection(qintptr socketDescriptor);\n#else\n    virtual void incomingConnection(int socketDescriptor);\n#endif\n\nprivate Q_SLOTS:\n    void processIncomingMessage(const QJsonRpcMessage &message);\n\nprivate:\n    Q_DECLARE_PRIVATE(QJsonRpcHttpServer)\n    Q_DISABLE_COPY(QJsonRpcHttpServer)\n    QScopedPointer<QJsonRpcHttpServerPrivate> d_ptr;\n\n    Q_PRIVATE_SLOT(d_func(), void _q_socketDisconnected())\n\n};\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpchttpserver_p.h",
    "content": "#ifndef QJSONRPCHTTPSERVER_P_H\n#define QJSONRPCHTTPSERVER_P_H\n\n#include <QHash>\n#include <QSslSocket>\n#include <QSslConfiguration>\n\n#include \"qjsonrpcsocket.h\"\n#include \"qjsonrpcmessage.h\"\n#include \"qjsonrpcabstractserver_p.h\"\n\n#include \"http_parser.h\"\n\nclass QJsonRpcHttpServerRpcSocket : public QJsonRpcSocket\n{\npublic:\n    explicit QJsonRpcHttpServerRpcSocket(QIODevice *device, QObject *parent = 0);\n};\n\nclass QAbstractSocket;\nclass QJsonRpcHttpServerSocket : public QSslSocket\n{\n    Q_OBJECT\npublic:\n    explicit QJsonRpcHttpServerSocket(QObject *parent = 0);\n    ~QJsonRpcHttpServerSocket();\n\n    void sendErrorResponse(int statusCode);\n    void sendOptionsResponse(int statusCode);\nQ_SIGNALS:\n    void messageReceived(const QJsonRpcMessage &message);\n\nprotected:\n    virtual qint64 writeData(const char *data, qint64 maxSize);\n\nprivate Q_SLOTS:\n    void readIncomingData();\n\nprivate:\n    static int onMessageBegin(http_parser *parser);\n    static int onUrl(http_parser *parser, const char *at, size_t length);\n    static int onHeaderField(http_parser *parser, const char *at, size_t length);\n    static int onHeaderValue(http_parser *parser, const char *at, size_t length);\n    static int onHeadersComplete(http_parser *parser);\n    static int onBody(http_parser *parser, const char *at, size_t length);\n    static int onMessageComplete(http_parser *parser);\n\nprivate:\n    Q_DISABLE_COPY(QJsonRpcHttpServerSocket)\n\n    // request\n    QByteArray m_requestPayload;\n    http_parser *m_requestParser;\n    http_parser_settings m_requestParserSettings;\n\n    // for header processing\n    QHash<QString, QString> m_requestHeaders;\n    QString m_currentHeaderField;\n    QString m_currentHeaderValue;\n\n    // response\n    QByteArray m_responseBuffer;\n\n};\n\nclass QJsonRpcHttpServer;\nclass QJsonRpcHttpServerPrivate : public QJsonRpcAbstractServerPrivate\n{\npublic:\n    QJsonRpcHttpServerPrivate(QJsonRpcHttpServer *qq)\n        : q_ptr(qq)\n    {\n    }\n\n    // slots\n    void _q_socketDisconnected();\n\n    QHash<QJsonRpcHttpServerSocket*, QJsonRpcHttpServerRpcSocket*> requestSocketLookup;\n    QSslConfiguration sslConfiguration;\n\n    QJsonRpcHttpServer * const q_ptr;\n    Q_DECLARE_PUBLIC(QJsonRpcHttpServer)\n};\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpclocalserver.cpp",
    "content": "#include <QLocalServer>\n#include <QLocalSocket>\n\n#include \"qjsonrpcsocket.h\"\n#include \"qjsonrpcabstractserver_p.h\"\n#include \"qjsonrpclocalserver.h\"\n\nclass QJsonRpcLocalServerPrivate : public QJsonRpcAbstractServerPrivate\n{\npublic:\n    QHash<QLocalSocket*, QJsonRpcSocket*> socketLookup;\n\n};\n\nQJsonRpcLocalServer::QJsonRpcLocalServer(QObject *parent)\n#if defined(USE_QT_PRIVATE_HEADERS)\n    : QLocalServer(*new QJsonRpcLocalServerPrivate, parent)\n#else\n    : QLocalServer(parent),\n      d_ptr(new QJsonRpcLocalServerPrivate)\n#endif\n{\n}\n\nQJsonRpcLocalServer::~QJsonRpcLocalServer()\n{\n    Q_D(QJsonRpcLocalServer);\n    foreach (QLocalSocket *socket, d->socketLookup.keys()) {\n        socket->flush();\n        socket->deleteLater();\n    }\n    d->socketLookup.clear();\n\n    foreach (QJsonRpcSocket *client, d->clients)\n        client->deleteLater();\n    d->clients.clear();\n}\n\nint QJsonRpcLocalServer::connectedClientCount() const\n{\n    Q_D(const QJsonRpcLocalServer);\n    return d->clients.size();\n}\n\nbool QJsonRpcLocalServer::addService(QJsonRpcService *service)\n{\n    if (!QJsonRpcServiceProvider::addService(service))\n        return false;\n\n    connect(service, SIGNAL(notifyConnectedClients(QJsonRpcMessage)),\n               this, SLOT(notifyConnectedClients(QJsonRpcMessage)));\n    connect(service, SIGNAL(notifyConnectedClients(QString,QJsonArray)),\n               this, SLOT(notifyConnectedClients(QString,QJsonArray)));\n    return true;\n}\n\nbool QJsonRpcLocalServer::removeService(QJsonRpcService *service)\n{\n    if (!QJsonRpcServiceProvider::removeService(service))\n        return false;\n\n    disconnect(service, SIGNAL(notifyConnectedClients(QJsonRpcMessage)),\n                  this, SLOT(notifyConnectedClients(QJsonRpcMessage)));\n    disconnect(service, SIGNAL(notifyConnectedClients(QString,QJsonArray)),\n                  this, SLOT(notifyConnectedClients(QString,QJsonArray)));\n    return true;\n}\n\nvoid QJsonRpcLocalServer::incomingConnection(quintptr socketDescriptor)\n{\n    Q_D(QJsonRpcLocalServer);\n    QLocalSocket *localSocket = new QLocalSocket(this);\n    if (!localSocket->setSocketDescriptor(socketDescriptor)) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"nextPendingConnection is null\";\n        localSocket->deleteLater();\n        return;\n    }\n\n    QIODevice *device = qobject_cast<QIODevice*>(localSocket);\n    QJsonRpcSocket *socket = new QJsonRpcSocket(device, this);\n    connect(socket, SIGNAL(messageReceived(QJsonRpcMessage)),\n              this, SLOT(_q_processMessage(QJsonRpcMessage)));\n    d->clients.append(socket);\n    connect(localSocket, SIGNAL(disconnected()), this, SLOT(_q_clientDisconnected()));\n    d->socketLookup.insert(localSocket, socket);\n    Q_EMIT clientConnected();\n}\n\nvoid QJsonRpcLocalServer::_q_clientDisconnected()\n{\n    Q_D(QJsonRpcLocalServer);\n    QLocalSocket *localSocket = static_cast<QLocalSocket*>(sender());\n    if (!localSocket) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"called with invalid socket\";\n        return;\n    }\n\n    if (d->socketLookup.contains(localSocket)) {\n        QJsonRpcSocket *socket = d->socketLookup.take(localSocket);\n        d->clients.removeAll(socket);\n        socket->deleteLater();\n    }\n\n    localSocket->deleteLater();\n    Q_EMIT clientDisconnected();\n}\n\nvoid QJsonRpcLocalServer::_q_processMessage(const QJsonRpcMessage &message)\n{\n    QJsonRpcSocket *socket = static_cast<QJsonRpcSocket*>(sender());\n    if (!socket) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"called without service socket\";\n        return;\n    }\n\n    processMessage(socket, message);\n}\n\nvoid QJsonRpcLocalServer::notifyConnectedClients(const QJsonRpcMessage &message)\n{\n    Q_D(QJsonRpcLocalServer);\n    d->_q_notifyConnectedClients(message);\n}\n\nvoid QJsonRpcLocalServer::notifyConnectedClients(const QString &method, const QJsonArray &params)\n{\n    Q_D(QJsonRpcLocalServer);\n    d->_q_notifyConnectedClients(method, params);\n}\n\n#include \"moc_qjsonrpclocalserver.cpp\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpclocalserver.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSONRPCLOCALSERVER_H\n#define QJSONRPCLOCALSERVER_H\n\n#include <QLocalServer>\n#include \"qjsonrpcabstractserver.h\"\n\nclass QJsonRpcLocalServerPrivate;\nclass QJSONRPC_EXPORT QJsonRpcLocalServer : public QLocalServer, public QJsonRpcAbstractServer\n{\n    Q_OBJECT\npublic:\n    explicit QJsonRpcLocalServer(QObject *parent = 0);\n    ~QJsonRpcLocalServer();\n\n    virtual int connectedClientCount() const;\n\n    // reimp\n    bool addService(QJsonRpcService *service);\n    bool removeService(QJsonRpcService *service);\n\nQ_SIGNALS:\n    void clientConnected();\n    void clientDisconnected();\n\npublic Q_SLOTS:\n    void notifyConnectedClients(const QJsonRpcMessage &message);\n    void notifyConnectedClients(const QString &method, const QJsonArray &params);\n\nprotected:\n    virtual void incomingConnection(quintptr socketDescriptor);\n\nprivate Q_SLOTS:\n    void _q_clientDisconnected();\n    void _q_processMessage(const QJsonRpcMessage &message);\n\nprivate:\n    Q_DECLARE_PRIVATE(QJsonRpcLocalServer)\n    Q_DISABLE_COPY(QJsonRpcLocalServer)\n#if !defined(USE_QT_PRIVATE_HEADERS)\n    QScopedPointer<QJsonRpcLocalServerPrivate> d_ptr;\n#endif\n};\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcmessage.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n\n#include <QDebug>\n\n#if QT_VERSION >= 0x050000\n#   include <QJsonDocument>\n#else\n#   include \"json/qjsondocument.h\"\n#endif\n\n#include \"qjsonrpcmessage.h\"\n\nclass QJsonRpcMessagePrivate : public QSharedData\n{\npublic:\n    QJsonRpcMessagePrivate();\n    ~QJsonRpcMessagePrivate();\n    QJsonRpcMessagePrivate(const QJsonRpcMessagePrivate &other);\n\n    void initializeWithObject(const QJsonObject &message);\n    static QJsonRpcMessage createBasicRequest(const QString &method, const QJsonArray &params);\n    static QJsonRpcMessage createBasicRequest(const QString &method,\n                                              const QJsonObject &namedParameters);\n\n    QJsonRpcMessage::Type type;\n    QScopedPointer<QJsonObject> object;\n\n    static int uniqueRequestCounter;\n};\n\nint QJsonRpcMessagePrivate::uniqueRequestCounter = 0;\n\nQJsonRpcMessagePrivate::QJsonRpcMessagePrivate()\n    : type(QJsonRpcMessage::Invalid),\n      object(0)\n{\n}\n\nQJsonRpcMessagePrivate::QJsonRpcMessagePrivate(const QJsonRpcMessagePrivate &other)\n    : QSharedData(other),\n      type(other.type),\n      object(other.object ? new QJsonObject(*other.object) : 0)\n{\n}\n\nvoid QJsonRpcMessagePrivate::initializeWithObject(const QJsonObject &message)\n{\n    object.reset(new QJsonObject(message));\n    if (message.contains(QLatin1String(\"id\"))) {\n        if (message.contains(QLatin1String(\"result\")) ||\n            message.contains(QLatin1String(\"error\"))) {\n            if (message.contains(QLatin1String(\"error\")) &&\n                !message.value(QLatin1String(\"error\")).isNull())\n                type = QJsonRpcMessage::Error;\n            else\n                type = QJsonRpcMessage::Response;\n        } else if (message.contains(QLatin1String(\"method\"))) {\n            type = QJsonRpcMessage::Request;\n        }\n    } else {\n        if (message.contains(QLatin1String(\"method\")))\n            type = QJsonRpcMessage::Notification;\n    }\n}\n\nQJsonRpcMessagePrivate::~QJsonRpcMessagePrivate()\n{\n}\n\nQJsonRpcMessage::QJsonRpcMessage()\n    : d(new QJsonRpcMessagePrivate)\n{\n    d->object.reset(new QJsonObject);\n}\n\nQJsonRpcMessage::QJsonRpcMessage(const QJsonRpcMessage &other)\n    : d(other.d)\n{\n}\n\nQJsonRpcMessage::~QJsonRpcMessage()\n{\n}\n\nQJsonRpcMessage &QJsonRpcMessage::operator=(const QJsonRpcMessage &other)\n{\n    d = other.d;\n    return *this;\n}\n\nbool QJsonRpcMessage::operator==(const QJsonRpcMessage &message) const\n{\n    if (message.d == d)\n        return true;\n\n    if (message.type() == type()) {\n        if (message.type() == QJsonRpcMessage::Error) {\n            return (message.errorCode() == errorCode() &&\n                    message.errorMessage() == errorMessage() &&\n                    message.errorData() == errorData());\n        } else {\n            if (message.type() == QJsonRpcMessage::Notification) {\n                return (message.method() == method() &&\n                        message.params() == params());\n            } else {\n                return (message.id() == id() &&\n                        message.method() == method() &&\n                        message.params() == params());\n            }\n        }\n    }\n\n    return false;\n}\n\nQJsonRpcMessage QJsonRpcMessage::fromJson(const QByteArray &message)\n{\n    QJsonRpcMessage result;\n    QJsonParseError error;\n    QJsonDocument document = QJsonDocument::fromJson(message, &error);\n    if (error.error != QJsonParseError::NoError) {\n        qJsonRpcDebug() << Q_FUNC_INFO << error.errorString();\n        return result;\n    }\n\n    if (!document.isObject()) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"invalid message: \" << message;\n        return result;\n    }\n\n    result.d->initializeWithObject(document.object());\n    return result;\n}\n\nQJsonRpcMessage QJsonRpcMessage::fromObject(const QJsonObject &message)\n{\n    QJsonRpcMessage result;\n    result.d->initializeWithObject(message);\n    return result;\n}\n\nQJsonObject QJsonRpcMessage::toObject() const\n{\n    if (d->object)\n        return QJsonObject(*d->object);\n    return QJsonObject();\n}\n\nQByteArray QJsonRpcMessage::toJson() const\n{\n    if (d->object) {\n        QJsonDocument doc(*d->object);\n        return doc.toJson();\n    }\n\n    return QByteArray();\n}\n\nbool QJsonRpcMessage::isValid() const\n{\n    return d->type != QJsonRpcMessage::Invalid;\n}\n\nQJsonRpcMessage::Type QJsonRpcMessage::type() const\n{\n    return d->type;\n}\n\nQJsonRpcMessage QJsonRpcMessagePrivate::createBasicRequest(const QString &method, const QJsonArray &params)\n{\n    QJsonRpcMessage request;\n    request.d->object->insert(QLatin1String(\"jsonrpc\"), QLatin1String(\"2.0\"));\n    request.d->object->insert(QLatin1String(\"method\"), method);\n    //if (!params.isEmpty())\n        request.d->object->insert(QLatin1String(\"params\"), params);\n    return request;\n}\n\nQJsonRpcMessage QJsonRpcMessagePrivate::createBasicRequest(const QString &method,\n                                                           const QJsonObject &namedParameters)\n{\n    QJsonRpcMessage request;\n    request.d->object->insert(QLatin1String(\"jsonrpc\"), QLatin1String(\"2.0\"));\n    request.d->object->insert(QLatin1String(\"method\"), method);\n    //if (!namedParameters.isEmpty())\n        request.d->object->insert(QLatin1String(\"params\"), namedParameters);\n    return request;\n}\n\nQJsonRpcMessage QJsonRpcMessage::createRequest(const QString &method, const QJsonArray &params)\n{\n    QJsonRpcMessage request = QJsonRpcMessagePrivate::createBasicRequest(method, params);\n    request.d->type = QJsonRpcMessage::Request;\n    QJsonRpcMessagePrivate::uniqueRequestCounter++;\n    request.d->object->insert(QLatin1String(\"id\"), QJsonRpcMessagePrivate::uniqueRequestCounter);\n    return request;\n}\n\nQJsonRpcMessage QJsonRpcMessage::createRequest(const QString &method, const QJsonValue &param)\n{\n    QJsonArray params;\n    params.append(param);\n    return createRequest(method, params);\n}\n\nQJsonRpcMessage QJsonRpcMessage::createRequest(const QString &method,\n                                               const QJsonObject &namedParameters)\n{\n    QJsonRpcMessage request =\n        QJsonRpcMessagePrivate::createBasicRequest(method, namedParameters);\n    request.d->type = QJsonRpcMessage::Request;\n    QJsonRpcMessagePrivate::uniqueRequestCounter++;\n    request.d->object->insert(QLatin1String(\"id\"), QJsonRpcMessagePrivate::uniqueRequestCounter);\n    return request;\n}\n\nQJsonRpcMessage QJsonRpcMessage::createNotification(const QString &method, const QJsonArray &params)\n{\n    QJsonRpcMessage notification = QJsonRpcMessagePrivate::createBasicRequest(method, params);\n    notification.d->type = QJsonRpcMessage::Notification;\n    return notification;\n}\n\nQJsonRpcMessage QJsonRpcMessage::createNotification(const QString &method, const QJsonValue &param)\n{\n    QJsonArray params;\n    params.append(param);\n    return createNotification(method, params);\n}\n\nQJsonRpcMessage QJsonRpcMessage::createNotification(const QString &method,\n                                                    const QJsonObject &namedParameters)\n{\n    QJsonRpcMessage notification =\n        QJsonRpcMessagePrivate::createBasicRequest(method, namedParameters);\n    notification.d->type = QJsonRpcMessage::Notification;\n    return notification;\n}\n\nQJsonRpcMessage QJsonRpcMessage::createResponse(const QJsonValue &result) const\n{\n    QJsonRpcMessage response;\n    if (d->object->contains(QLatin1String(\"id\"))) {\n        QJsonObject *object = response.d->object.data();\n        object->insert(QLatin1String(\"jsonrpc\"), QLatin1String(\"2.0\"));\n        object->insert(QLatin1String(\"id\"), d->object->value(QLatin1String(\"id\")));\n        object->insert(QLatin1String(\"result\"), result);\n        response.d->type = QJsonRpcMessage::Response;\n    }\n\n    return response;\n}\n\nQJsonRpcMessage QJsonRpcMessage::createErrorResponse(QJsonRpc::ErrorCode code,\n                                                     const QString &message,\n                                                     const QJsonValue &data) const\n{\n    QJsonRpcMessage response;\n    QJsonObject error;\n    error.insert(QLatin1String(\"code\"), code);\n    if (!message.isEmpty())\n        error.insert(QLatin1String(\"message\"), message);\n    if (!data.isUndefined())\n        error.insert(QLatin1String(\"data\"), data);\n\n    response.d->type = QJsonRpcMessage::Error;\n    QJsonObject *object = response.d->object.data();\n    object->insert(QLatin1String(\"jsonrpc\"), QLatin1String(\"2.0\"));\n    if (d->object->contains(QLatin1String(\"id\")))\n        object->insert(QLatin1String(\"id\"), d->object->value(QLatin1String(\"id\")));\n    else\n        object->insert(QLatin1String(\"id\"), 0);\n    object->insert(QLatin1String(\"error\"), error);\n    return response;\n}\n\nint QJsonRpcMessage::id() const\n{\n    if (d->type == QJsonRpcMessage::Notification || !d->object)\n        return -1;\n\n    const QJsonValue &value = d->object->value(QLatin1String(\"id\"));\n    if (value.isString())\n        return value.toString().toInt();\n#if QT_VERSION >= 0x050200\n    return value.toInt();\n#else\n    return value.toDouble();\n#endif\n}\n\nQString QJsonRpcMessage::method() const\n{\n    if (d->type == QJsonRpcMessage::Response || !d->object)\n        return QString();\n\n    return d->object->value(QLatin1String(\"method\")).toString();\n}\n\nQJsonValue QJsonRpcMessage::params() const\n{\n    if (d->type == QJsonRpcMessage::Response || d->type == QJsonRpcMessage::Error)\n        return QJsonValue(QJsonValue::Undefined);\n    if (!d->object)\n        return QJsonValue(QJsonValue::Undefined);\n\n    return d->object->value(QLatin1String(\"params\"));\n}\n\nQJsonValue QJsonRpcMessage::result() const\n{\n    if (d->type != QJsonRpcMessage::Response || !d->object)\n        return QJsonValue(QJsonValue::Undefined);\n\n    return d->object->value(QLatin1String(\"result\"));\n}\n\nint QJsonRpcMessage::errorCode() const\n{\n    if (d->type != QJsonRpcMessage::Error || !d->object)\n        return 0;\n\n    QJsonObject error =\n        d->object->value(QLatin1String(\"error\")).toObject();\n    const QJsonValue &value = error.value(QLatin1String(\"code\"));\n    if (value.isString())\n        return value.toString().toInt();\n#if QT_VERSION >= 0x050200\n    return value.toInt();\n#else\n    return value.toDouble();\n#endif\n}\n\nQString QJsonRpcMessage::errorMessage() const\n{\n    if (d->type != QJsonRpcMessage::Error || !d->object)\n        return QString();\n\n    QJsonObject error =\n        d->object->value(QLatin1String(\"error\")).toObject();\n    return error.value(QLatin1String(\"message\")).toString();\n}\n\nQJsonValue QJsonRpcMessage::errorData() const\n{\n    if (d->type != QJsonRpcMessage::Error || !d->object)\n        return QJsonValue(QJsonValue::Undefined);\n\n    QJsonObject error =\n        d->object->value(QLatin1String(\"error\")).toObject();\n    return error.value(QLatin1String(\"data\"));\n}\n\n#if QT_VERSION < 0x050000\nbool QJsonRpcMessage::isDetached() const\n{\n    return d && d->ref == 1;\n}\n#endif\n\nstatic QDebug operator<<(QDebug dbg, QJsonRpcMessage::Type type)\n{\n    switch (type) {\n    case QJsonRpcMessage::Request:\n        return dbg << \"QJsonRpcMessage::Request\";\n    case QJsonRpcMessage::Response:\n        return dbg << \"QJsonRpcMessage::Response\";\n    case QJsonRpcMessage::Notification:\n        return dbg << \"QJsonRpcMessage::Notification\";\n    case QJsonRpcMessage::Error:\n        return dbg << \"QJsonRpcMessage::Error\";\n    default:\n        return dbg << \"QJsonRpcMessage::Invalid\";\n    }\n}\n\nQDebug operator<<(QDebug dbg, const QJsonRpcMessage &msg)\n{\n    dbg.nospace() << \"QJsonRpcMessage(type=\" << msg.type();\n    if (msg.type() != QJsonRpcMessage::Notification) {\n        dbg.nospace() << \", id=\" << msg.id();\n    }\n\n    if (msg.type() == QJsonRpcMessage::Request ||\n        msg.type() == QJsonRpcMessage::Notification) {\n        dbg.nospace() << \", method=\" << msg.method()\n                      << \", params=\" << msg.params();\n    } else if (msg.type() == QJsonRpcMessage::Response) {\n        dbg.nospace() << \", result=\" << msg.result();\n    } else if (msg.type() == QJsonRpcMessage::Error) {\n        dbg.nospace() << \", code=\" << msg.errorCode()\n                      << \", message=\" << msg.errorMessage()\n                      << \", data=\" << msg.errorData();\n    }\n    dbg.nospace() << \")\";\n    return dbg.space();\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcmessage.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSONRPCMESSAGE_H\n#define QJSONRPCMESSAGE_H\n\n#include <QSharedDataPointer>\n#include <QMetaType>\n\n#if QT_VERSION >= 0x050000\n#include <QJsonValue>\n#include <QJsonObject>\n#include <QJsonArray>\n#else\n#include \"json/qjsonvalue.h\"\n#include \"json/qjsonobject.h\"\n#include \"json/qjsonarray.h\"\n#endif\n\n#include \"qjsonrpcglobal.h\"\n\nclass QJsonRpcMessagePrivate;\nclass QJSONRPC_EXPORT QJsonRpcMessage\n{\npublic:\n    QJsonRpcMessage();\n    QJsonRpcMessage(const QJsonRpcMessage &other);\n    QJsonRpcMessage &operator=(const QJsonRpcMessage &other);\n    ~QJsonRpcMessage();\n\n#if QT_VERSION >= 0x050000\n    inline void swap(QJsonRpcMessage &other) { qSwap(d, other.d); }\n#endif\n\n    enum Type {\n        Invalid,\n        Request,\n        Response,\n        Notification,\n        Error\n    };\n\n    static QJsonRpcMessage createRequest(const QString &method,\n                                         const QJsonArray &params = QJsonArray());\n    static QJsonRpcMessage createRequest(const QString &method, const QJsonValue &param);\n    static QJsonRpcMessage createRequest(const QString &method, const QJsonObject &namedParameters);\n\n    static QJsonRpcMessage createNotification(const QString &method,\n                                              const QJsonArray &params = QJsonArray());\n    static QJsonRpcMessage createNotification(const QString &method, const QJsonValue &param);\n    static QJsonRpcMessage createNotification(const QString &method,\n                                              const QJsonObject &namedParameters);\n\n    QJsonRpcMessage createResponse(const QJsonValue &result) const;\n    QJsonRpcMessage createErrorResponse(QJsonRpc::ErrorCode code,\n                                        const QString &message = QString(),\n                                        const QJsonValue &data = QJsonValue()) const;\n\n    QJsonRpcMessage::Type type() const;\n    bool isValid() const;\n    int id() const;\n\n    // request\n    QString method() const;\n    QJsonValue params() const;\n\n    // response\n    QJsonValue result() const;\n\n    // error\n    int errorCode() const;\n    QString errorMessage() const;\n    QJsonValue errorData() const;\n\n    QJsonObject toObject() const;\n    static QJsonRpcMessage fromObject(const QJsonObject &object);\n\n    QByteArray toJson() const;\n    static QJsonRpcMessage fromJson(const QByteArray &data);\n\n    bool operator==(const QJsonRpcMessage &message) const;\n    inline bool operator!=(const QJsonRpcMessage &message) const { return !(operator==(message)); }\n\nprivate:\n    friend class QJsonRpcMessagePrivate;\n    QSharedDataPointer<QJsonRpcMessagePrivate> d;\n\n#if QT_VERSION < 0x050000\npublic:\n    typedef QSharedDataPointer<QJsonRpcMessagePrivate> DataPtr;\n    inline DataPtr &data_ptr() { return d; }\n\n    // internal\n    bool isDetached() const;\n#endif\n};\n\nQJSONRPC_EXPORT QDebug operator<<(QDebug, const QJsonRpcMessage &);\nQ_DECLARE_METATYPE(QJsonRpcMessage)\n\n#if QT_VERSION < 0x050000\nQ_DECLARE_TYPEINFO(QJsonRpcMessage, Q_MOVABLE_TYPE);\n#endif\nQ_DECLARE_SHARED(QJsonRpcMessage)\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcmetatype.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Copyright (C) 2013 Fargier Sylvain\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSONRPCMETATYPE_H\n#define QJSONRPCMETATYPE_H\n\n#include <QMetaType>\n\ntemplate <typename T>\nvoid qRegisterJsonRpcMetaType(const char *typeName, T * = 0)\n{\n    Q_UNUSED(typeName)\n    QMetaType::registerConverter<T, QJsonValue>(&T::toJson);\n    QMetaType::registerConverter<QJsonValue, T>(&T::fromJson);\n}\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcservice.cpp",
    "content": "/*\n * Copyright (C) 2012-2014 Matt Broadstone\n * Copyright (C) 2013 Fargier Sylvain\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QVarLengthArray>\n#include <QMetaMethod>\n#include <QEventLoop>\n#include <QDebug>\n\n#include \"qjsonrpcsocket.h\"\n#include \"qjsonrpcservice_p.h\"\n#include \"qjsonrpcservice.h\"\n\nQJsonRpcServiceRequest::QJsonRpcServiceRequest()\n    : d(new QJsonRpcServiceRequestPrivate)\n{\n}\n\nQJsonRpcServiceRequest::QJsonRpcServiceRequest(const QJsonRpcServiceRequest &other)\n    : d (other.d)\n{\n}\n\nQJsonRpcServiceRequest::QJsonRpcServiceRequest(const QJsonRpcMessage &request,\n                                               QJsonRpcAbstractSocket *socket)\n    : d(new QJsonRpcServiceRequestPrivate)\n{\n    d->request = request;\n    d->socket = socket;\n}\n\nQJsonRpcServiceRequest &QJsonRpcServiceRequest::operator=(const QJsonRpcServiceRequest &other)\n{\n    d = other.d;\n    return *this;\n}\n\nQJsonRpcServiceRequest::~QJsonRpcServiceRequest()\n{\n}\n\nbool QJsonRpcServiceRequest::isValid() const\n{\n    return (d && d->request.isValid() && !d->socket.isNull());\n}\n\nQJsonRpcMessage QJsonRpcServiceRequest::request() const\n{\n    return d->request;\n}\n\nQJsonRpcAbstractSocket *QJsonRpcServiceRequest::socket() const\n{\n    return d->socket;\n}\n\nbool QJsonRpcServiceRequest::respond(QVariant returnValue)\n{\n    if (!d->socket) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"socket was closed\";\n        return false;\n    }\n\n    QJsonRpcMessage response =\n        d->request.createResponse(QJsonRpcServicePrivate::convertReturnValue(returnValue));\n    return respond(response);\n}\n\nbool QJsonRpcServiceRequest::respond(const QJsonRpcMessage &response)\n{\n    if (!d->socket) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"socket was closed\";\n        return false;\n    }\n\n    QMetaObject::invokeMethod(d->socket, \"notify\", Q_ARG(QJsonRpcMessage, response));\n    return true;\n}\n\nQJsonRpcServicePrivate::ParameterInfo::ParameterInfo(const QString &n, int t, bool o)\n    : type(t),\n      jsType(convertVariantTypeToJSType(t)),\n      name(n),\n      out(o)\n{\n}\n\nQJsonRpcServicePrivate::MethodInfo::MethodInfo()\n    : returnType(QMetaType::Void),\n      valid(false),\n      hasOut(false)\n{\n}\n\nQJsonRpcServicePrivate::MethodInfo::MethodInfo(const QMetaMethod &method)\n    : returnType(QMetaType::Void),\n      valid(true),\n      hasOut(false)\n{\n#if QT_VERSION >= 0x050000\n    returnType = method.returnType();\n    if (returnType == QMetaType::UnknownType) {\n        qJsonRpcDebug() << \"QJsonRpcService: can't bind method's return type\"\n                      << QString(method.name());\n        valid = false;\n        return;\n    }\n\n    parameters.reserve(method.parameterCount());\n#else\n    returnType = QMetaType::type(method.typeName());\n    parameters.reserve(method.parameterNames().count());\n#endif\n\n    const QList<QByteArray> &types = method.parameterTypes();\n    const QList<QByteArray> &names = method.parameterNames();\n    for (int i = 0; i < types.size(); ++i) {\n        QByteArray parameterType = types.at(i);\n        const QByteArray &parameterName = names.at(i);\n        bool out = parameterType.endsWith('&');\n\n        if (out) {\n            hasOut = true;\n            parameterType.resize(parameterType.size() - 1);\n        }\n\n        int type = QMetaType::type(parameterType);\n        if (type == 0) {\n            qJsonRpcDebug() << \"QJsonRpcService: can't bind method's parameter\"\n                          << QString(parameterType);\n            valid = false;\n            break;\n        }\n\n        parameters.append(ParameterInfo(parameterName, type, out));\n    }\n}\n\nQJsonRpcService::QJsonRpcService(QObject *parent)\n#if defined(USE_QT_PRIVATE_HEADERS)\n    : QObject(*new QJsonRpcServicePrivate(this), parent)\n#else\n    : QObject(parent),\n      d_ptr(new QJsonRpcServicePrivate(this))\n#endif\n{\n}\n\nQJsonRpcService::~QJsonRpcService()\n{\n}\n\nQJsonRpcServiceRequest QJsonRpcService::currentRequest() const\n{\n    Q_D(const QJsonRpcService);\n    return d->currentRequest;\n}\n\nvoid QJsonRpcService::beginDelayedResponse()\n{\n    Q_D(QJsonRpcService);\n    d->delayedResponse = true;\n}\n\nint QJsonRpcServicePrivate::convertVariantTypeToJSType(int type)\n{\n    switch (type) {\n    case QMetaType::Int:\n    case QMetaType::UInt:\n    case QMetaType::Double:\n    case QMetaType::Long:\n    case QMetaType::LongLong:\n    case QMetaType::Short:\n    case QMetaType::Char:\n    case QMetaType::ULong:\n    case QMetaType::ULongLong:\n    case QMetaType::UShort:\n    case QMetaType::UChar:\n    case QMetaType::Float:\n        return QJsonValue::Double;    // all numeric types in js are doubles\n    case QMetaType::QVariantList:\n    case QMetaType::QStringList:\n        return QJsonValue::Array;\n    case QMetaType::QVariantMap:\n        return QJsonValue::Object;\n    case QMetaType::QString:\n        return QJsonValue::String;\n    case QMetaType::Bool:\n        return QJsonValue::Bool;\n    default:\n        break;\n    }\n\n    return QJsonValue::Undefined;\n}\n\nint QJsonRpcServicePrivate::qjsonRpcMessageType = qRegisterMetaType<QJsonRpcMessage>(\"QJsonRpcMessage\");\nvoid QJsonRpcServicePrivate::cacheInvokableInfo()\n{\n    Q_Q(QJsonRpcService);\n    const QMetaObject *obj = q->metaObject();\n    int startIdx = q->staticMetaObject.methodCount(); // skip QObject slots\n    for (int idx = startIdx; idx < obj->methodCount(); ++idx) {\n        const QMetaMethod method = obj->method(idx);\n        if ((method.methodType() == QMetaMethod::Slot &&\n             method.access() == QMetaMethod::Public) ||\n             method.methodType() == QMetaMethod::Signal) {\n\n#if QT_VERSION >= 0x050000\n            QByteArray signature = method.methodSignature();\n            QByteArray methodName = method.name();\n#else\n            QByteArray signature = method.signature();\n            QByteArray methodName = signature.left(signature.indexOf('('));\n#endif\n\n            MethodInfo info(method);\n            if (!info.valid)\n                continue;\n\n            if (signature.contains(\"QVariant\"))\n                invokableMethodHash[methodName].append(idx);\n            else\n                invokableMethodHash[methodName].prepend(idx);\n            methodInfoHash[idx] = info;\n        }\n    }\n}\n\nstatic bool jsParameterCompare(const QJsonArray &parameters,\n                               const QJsonRpcServicePrivate::MethodInfo &info)\n{\n    int j = 0;\n    for (int i = 0; i < info.parameters.size() && j < parameters.size(); ++i) {\n        int jsType = info.parameters.at(i).jsType;\n        if (jsType != QJsonValue::Undefined && jsType != parameters.at(j).type()) {\n            if (!info.parameters.at(i).out)\n                return false;\n        } else {\n            ++j;\n        }\n    }\n\n    return (j == parameters.size());\n}\n\nstatic  bool jsParameterCompare(const QJsonObject &parameters,\n                                const QJsonRpcServicePrivate::MethodInfo &info)\n{\n    for (int i = 0; i < info.parameters.size(); ++i) {\n        int jsType = info.parameters.at(i).jsType;\n        QJsonValue value = parameters.value(info.parameters.at(i).name);\n        if (value == QJsonValue::Undefined) {\n            if (!info.parameters.at(i).out)\n                return false;\n        } else if (jsType == QJsonValue::Undefined) {\n            continue;\n        } else if (jsType != value.type()) {\n            return false;\n        }\n    }\n\n    return true;\n}\n\nstatic inline QVariant convertArgument(const QJsonValue &argument,\n                                       const QJsonRpcServicePrivate::ParameterInfo &info)\n{\n    if (argument.isUndefined())\n#if QT_VERSION >= 0x050000\n        return QVariant(info.type, Q_NULLPTR);\n#else\n        return QVariant(info.type, (const void *) NULL);\n#endif\n\n#if QT_VERSION >= 0x050200\n    if (info.type == QMetaType::QJsonValue || info.type == QMetaType::QVariant ||\n        info.type >= QMetaType::User) {\n\n        if (info.type == QMetaType::QVariant)\n            return argument.toVariant();\n\n        QVariant result(argument);\n        if (info.type >= QMetaType::User && result.canConvert(info.type))\n            result.convert(info.type);\n        return result;\n    }\n\n    QVariant result = argument.toVariant();\n    if (result.userType() == info.type || info.type == QMetaType::QVariant) {\n        return result;\n    } else if (result.canConvert(info.type)) {\n        result.convert(info.type);\n        return result;\n    } else if (info.type < QMetaType::User) {\n        // already tried for >= user, this is the last resort\n        QVariant result(argument);\n        if (result.canConvert(info.type)) {\n            result.convert(info.type);\n            return result;\n        }\n    }\n\n    return QVariant();\n#else\n    QVariant result = argument.toVariant();\n    QVariant::Type variantType = static_cast<QVariant::Type>(info.type);\n    if (info.type != QMetaType::QVariant && variantType != result.type() &&\n        !result.canConvert(variantType))\n        return QVariant();\n\n    if (!result.canConvert(variantType)) {\n        // toVariant succeeded, no need to convert\n        return result;\n    }\n\n    result.convert(variantType);\n    return result;\n#endif\n}\n\nQJsonValue QJsonRpcServicePrivate::convertReturnValue(QVariant &returnValue)\n{\n#if QT_VERSION >= 0x050200\n    if (static_cast<int>(returnValue.type()) == qMetaTypeId<QJsonObject>())\n        return QJsonValue(returnValue.toJsonObject());\n    else if (static_cast<int>(returnValue.type()) == qMetaTypeId<QJsonArray>())\n        return QJsonValue(returnValue.toJsonArray());\n\n    switch (returnValue.type()) {\n    case QMetaType::Bool:\n    case QMetaType::Int:\n    case QMetaType::Double:\n    case QMetaType::LongLong:\n    case QMetaType::ULongLong:\n    case QMetaType::UInt:\n    case QMetaType::QString:\n    case QMetaType::QStringList:\n    case QMetaType::QVariantList:\n    case QMetaType::QVariantMap:\n        return QJsonValue::fromVariant(returnValue);\n    default:\n        // if a conversion operator was registered it will be used\n        if (returnValue.convert(QMetaType::QJsonValue))\n            return returnValue.toJsonValue();\n        else\n            return QJsonValue();\n    }\n#else\n    // custom conversions could not be registered before 5.2, so this is only an optimization\n    return QJsonValue::fromVariant(returnValue);\n#endif\n}\n\nstatic inline QByteArray methodName(const QJsonRpcMessage &request)\n{\n    const QString &methodPath(request.method());\n    return methodPath.midRef(methodPath.lastIndexOf('.') + 1).toLatin1();\n}\n\nQJsonRpcMessage QJsonRpcService::dispatch(const QJsonRpcMessage &request)\n{\n    Q_D(QJsonRpcService);\n    if (request.type() != QJsonRpcMessage::Request &&\n        request.type() != QJsonRpcMessage::Notification) {\n        return request.createErrorResponse(QJsonRpc::InvalidRequest, \"invalid request\");\n    }\n\n    const QByteArray &method(methodName(request));\n    if (!d->invokableMethodHash.contains(method)) {\n        return request.createErrorResponse(QJsonRpc::MethodNotFound, \"invalid method called\");\n    }\n\n    int idx = -1;\n    QVariantList arguments;\n    const QList<int> &indexes = d->invokableMethodHash.value(method);\n    const QJsonValue &params = request.params();\n    QVarLengthArray<void *, 10> parameters;\n    QVariant returnValue;\n    QMetaType::Type returnType = QMetaType::Void;\n\n    bool usingNamedParameters = params.isObject();\n    foreach (int methodIndex, indexes) {\n        QJsonRpcServicePrivate::MethodInfo &info = d->methodInfoHash[methodIndex];\n        bool methodMatch = usingNamedParameters ?\n            jsParameterCompare(params.toObject(), info) :\n            jsParameterCompare(params.toArray(), info);\n\n        if (methodMatch) {\n            idx = methodIndex;\n            arguments.reserve(info.parameters.size());\n            returnType = static_cast<QMetaType::Type>(info.returnType);\n#if QT_VERSION >= 0x050000\n            returnValue = (returnType == QMetaType::Void) ?\n                QVariant() : QVariant(returnType, Q_NULLPTR);\n#else\n            returnValue = (returnType == QMetaType::Void) ?\n                QVariant() : QVariant(returnType, (const void *) NULL);\n#endif\n            if (returnType == QMetaType::QVariant)\n                parameters.append(&returnValue);\n            else\n                parameters.append(returnValue.data());\n\n            for (int i = 0; i < info.parameters.size(); ++i) {\n                const QJsonRpcServicePrivate::ParameterInfo &parameterInfo = info.parameters.at(i);\n                QJsonValue incomingArgument = usingNamedParameters ?\n                    params.toObject().value(parameterInfo.name) :\n                    params.toArray().at(i);\n\n                QVariant argument = convertArgument(incomingArgument, parameterInfo);\n                if (!argument.isValid()) {\n                    QString message = incomingArgument.isUndefined() ?\n                        QString(\"failed to construct default object for '%1'\").arg(parameterInfo.name) :\n                        QString(\"failed to convert from JSON for '%1'\").arg(parameterInfo.name);\n                    return request.createErrorResponse(QJsonRpc::InvalidParams, message);\n                }\n\n                arguments.push_back(argument);\n                if (parameterInfo.type == QMetaType::QVariant)\n                    parameters.append(static_cast<void *>(&arguments.last()));\n                else\n                    parameters.append(const_cast<void *>(arguments.last().constData()));\n            }\n\n            // found a match\n            break;\n        }\n    }\n\n    if (idx == -1) {\n        return request.createErrorResponse(QJsonRpc::InvalidParams, \"invalid parameters\");\n    }\n\n    QJsonRpcServicePrivate::MethodInfo &info = d->methodInfoHash[idx];\n\n    bool success =\n        const_cast<QJsonRpcService*>(this)->qt_metacall(QMetaObject::InvokeMetaMethod, idx, parameters.data()) < 0;\n    if (!success) {\n        QString message = QString(\"dispatch for method '%1' failed\").arg(method.constData());\n        return request.createErrorResponse(QJsonRpc::InvalidRequest, message);\n    }\n\n    if (d->delayedResponse) {\n        d->delayedResponse = false;\n        return QJsonRpcMessage();\n    }\n\n    if (info.hasOut) {\n        QJsonArray ret;\n        if (info.returnType != QMetaType::Void)\n            ret.append(QJsonRpcServicePrivate::convertReturnValue(returnValue));\n        for (int i = 0; i < info.parameters.size(); ++i)\n            if (info.parameters.at(i).out)\n                ret.append(QJsonRpcServicePrivate::convertReturnValue(arguments[i]));\n        if (ret.size() > 1)\n            return request.createResponse(ret);\n        return request.createResponse(ret.first());\n    }\n\n    return request.createResponse(QJsonRpcServicePrivate::convertReturnValue(returnValue));\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcservice.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSONRPCSERVICE_H\n#define QJSONRPCSERVICE_H\n\n#include <QVariant>\n#include <QPointer>\n\n#include \"qjsonrpcmessage.h\"\n\nclass QJsonRpcAbstractSocket;\nclass QJsonRpcServiceRequestPrivate;\nclass QJSONRPC_EXPORT QJsonRpcServiceRequest\n{\npublic:\n    QJsonRpcServiceRequest();\n    QJsonRpcServiceRequest(const QJsonRpcServiceRequest &other);\n    QJsonRpcServiceRequest(const QJsonRpcMessage &request, QJsonRpcAbstractSocket *socket);\n    QJsonRpcServiceRequest &operator=(const QJsonRpcServiceRequest &other);\n    ~QJsonRpcServiceRequest();\n\n    bool isValid() const;\n    QJsonRpcMessage request() const;\n    QJsonRpcAbstractSocket *socket() const;\n\n    bool respond(const QJsonRpcMessage &response);\n    bool respond(QVariant returnValue);\n\nprivate:\n    QSharedDataPointer<QJsonRpcServiceRequestPrivate> d;\n};\n\nclass QJsonRpcServiceProvider;\nclass QJsonRpcServicePrivate;\nclass QJSONRPC_EXPORT QJsonRpcService : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit QJsonRpcService(QObject *parent = 0);\n    ~QJsonRpcService();\n\nQ_SIGNALS:\n    void result(const QJsonRpcMessage &result);\n    void notifyConnectedClients(const QJsonRpcMessage &message);\n    void notifyConnectedClients(const QString &method, const QJsonArray &params = QJsonArray());\n\nprotected:\n    QJsonRpcServiceRequest currentRequest() const;\n    void beginDelayedResponse();\n\nprotected Q_SLOTS:\n    QJsonRpcMessage dispatch(const QJsonRpcMessage &request);\n\nprivate:\n    Q_DISABLE_COPY(QJsonRpcService)\n    Q_DECLARE_PRIVATE(QJsonRpcService)\n    friend class QJsonRpcServiceProvider;\n\n#if !defined(USE_QT_PRIVATE_HEADERS)\n    QScopedPointer<QJsonRpcServicePrivate> d_ptr;\n#endif\n\n};\n\n#endif\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcservice_p.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Copyright (C) 2013 Fargier Sylvain\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSONRPCSERVICE_P_H\n#define QJSONRPCSERVICE_P_H\n\n#include <QHash>\n#include <QPointer>\n#include <QVarLengthArray>\n#include <QStringList>\n\n#include \"qjsonrpcservice.h\"\n\nclass QJsonRpcAbstractSocket;\nclass QJsonRpcServiceRequestPrivate : public QSharedData\n{\npublic:\n    QJsonRpcMessage request;\n    QPointer<QJsonRpcAbstractSocket> socket;\n};\n\nclass QJsonRpcService;\n#if defined(USE_QT_PRIVATE_HEADERS)\n#include <private/qobject_p.h>\n\nclass QJsonRpcServicePrivate : public QObjectPrivate\n#else\nclass QJsonRpcServicePrivate\n#endif\n{\npublic:\n    QJsonRpcServicePrivate(QJsonRpcService *parent)\n        : delayedResponse(false),\n          q_ptr(parent)\n    {\n    }\n\n    void cacheInvokableInfo();\n    static int qjsonRpcMessageType;\n    static int convertVariantTypeToJSType(int type);\n    static QJsonValue convertReturnValue(QVariant &returnValue);\n\n    struct ParameterInfo\n    {\n        ParameterInfo(const QString &name = QString(), int type = 0, bool out = false);\n\n        int type;\n        int jsType;\n        QString name;\n        bool out;\n    };\n\n    struct MethodInfo\n    {\n        MethodInfo();\n        MethodInfo(const QMetaMethod &method);\n\n        QVarLengthArray<ParameterInfo> parameters;\n        int returnType;\n        bool valid;\n        bool hasOut;\n    };\n\n    QHash<int, MethodInfo > methodInfoHash;\n    QHash<QByteArray, QList<int> > invokableMethodHash;\n    QJsonRpcServiceRequest currentRequest;\n    bool delayedResponse;\n\n    QJsonRpcService * const q_ptr;\n    Q_DECLARE_PUBLIC(QJsonRpcService)\n};\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcserviceprovider.cpp",
    "content": "#include <QObjectCleanupHandler>\n#include <QMetaObject>\n#include <QMetaClassInfo>\n#include <QDebug>\n\n#include \"qjsonrpcservice.h\"\n#include \"qjsonrpcservice_p.h\"\n#include \"qjsonrpcsocket.h\"\n#include \"qjsonrpcserviceprovider.h\"\n\nclass QJsonRpcServiceProviderPrivate\n{\npublic:\n    QByteArray serviceName(QJsonRpcService *service);\n\n    QHash<QByteArray, QJsonRpcService*> services;\n    QObjectCleanupHandler cleanupHandler;\n\n};\n\nQJsonRpcServiceProvider::QJsonRpcServiceProvider()\n    : d(new QJsonRpcServiceProviderPrivate)\n{\n}\n\nQJsonRpcServiceProvider::~QJsonRpcServiceProvider()\n{\n}\n\nQByteArray QJsonRpcServiceProviderPrivate::serviceName(QJsonRpcService *service)\n{\n    const QMetaObject *mo = service->metaObject();\n    for (int i = 0; i < mo->classInfoCount(); i++) {\n        const QMetaClassInfo mci = mo->classInfo(i);\n        if (mci.name() == QLatin1String(\"serviceName\"))\n            return mci.value();\n    }\n\n    return QByteArray(mo->className()).toLower();\n}\n\nbool QJsonRpcServiceProvider::addService(QJsonRpcService *service)\n{\n    QByteArray serviceName = d->serviceName(service);\n    if (serviceName.isEmpty()) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"service added without serviceName classinfo, aborting\";\n        return false;\n    }\n\n    if (d->services.contains(serviceName)) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"service with name \" << serviceName << \" already exist\";\n        return false;\n    }\n\n    service->d_func()->cacheInvokableInfo();\n    d->services.insert(serviceName, service);\n    if (!service->parent())\n        d->cleanupHandler.add(service);\n    return true;\n}\n\nbool QJsonRpcServiceProvider::removeService(QJsonRpcService *service)\n{\n    QByteArray serviceName = d->serviceName(service);\n    if (!d->services.contains(serviceName)) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"can not find service with name \" << serviceName;\n        return false;\n    }\n\n    d->cleanupHandler.remove(d->services.value(serviceName));\n    d->services.remove(serviceName);\n    return true;\n}\n\nvoid QJsonRpcServiceProvider::processMessage(QJsonRpcAbstractSocket *socket, const QJsonRpcMessage &message)\n{\n    switch (message.type()) {\n        case QJsonRpcMessage::Request:\n        case QJsonRpcMessage::Notification: {\n            QByteArray serviceName = message.method().section(\".\", 0, -2).toLatin1();\n            if (serviceName.isEmpty() || !d->services.contains(serviceName)) {\n                if (message.type() == QJsonRpcMessage::Request) {\n                    QJsonRpcMessage error =\n                        message.createErrorResponse(QJsonRpc::MethodNotFound,\n                            QString(\"service '%1' not found\").arg(serviceName.constData()));\n                    socket->notify(error);\n                }\n            } else {\n                QJsonRpcService *service = d->services.value(serviceName);\n                service->d_func()->currentRequest = QJsonRpcServiceRequest(message, socket);\n                if (message.type() == QJsonRpcMessage::Request)\n                    QObject::connect(service, SIGNAL(result(QJsonRpcMessage)),\n                                      socket, SLOT(notify(QJsonRpcMessage)), Qt::UniqueConnection);\n                QJsonRpcMessage response = service->dispatch(message);\n                if (response.isValid())\n                    socket->notify(response);\n            }\n        }\n        break;\n\n        case QJsonRpcMessage::Response:\n            // we don't handle responses in the provider\n            break;\n\n        default: {\n            QJsonRpcMessage error =\n                message.createErrorResponse(QJsonRpc::InvalidRequest, QString(\"invalid request\"));\n            socket->notify(error);\n            break;\n        }\n    };\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcserviceprovider.h",
    "content": "/*\n * Copyright (C) 2012-2014 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSONRPCSERVICEPROVIDER_H\n#define QJSONRPCSERVICEPROVIDER_H\n\n#include \"qjsonrpcglobal.h\"\n\nclass QJsonRpcMessage;\nclass QJsonRpcService;\nclass QJsonRpcAbstractSocket;\nclass QJsonRpcServiceProviderPrivate;\nclass QJSONRPC_EXPORT QJsonRpcServiceProvider\n{\npublic:\n    ~QJsonRpcServiceProvider();\n    virtual bool addService(QJsonRpcService *service);\n    virtual bool removeService(QJsonRpcService *service);\n\nprotected:\n    QJsonRpcServiceProvider();\n    void processMessage(QJsonRpcAbstractSocket *socket, const QJsonRpcMessage &message);\n\nprivate:\n    QScopedPointer<QJsonRpcServiceProviderPrivate> d;\n\n};\n\n#endif // QJSONRPCSERVICEPROVIDER_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcservicereply.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include \"qjsonrpcservicereply_p.h\"\n#include \"qjsonrpcservicereply.h\"\n\nQJsonRpcServiceReply::QJsonRpcServiceReply(QObject *parent)\n#if defined(USE_QT_PRIVATE_HEADERS)\n    : QObject(*new QJsonRpcServiceReplyPrivate, parent)\n#else\n    : QObject(parent),\n      d_ptr(new QJsonRpcServiceReplyPrivate)\n#endif\n{\n}\n\nQJsonRpcServiceReply::~QJsonRpcServiceReply()\n{\n}\n\nQJsonRpcServiceReply::QJsonRpcServiceReply(QJsonRpcServiceReplyPrivate &dd, QObject *parent)\n#if defined(USE_QT_PRIVATE_HEADERS)\n    : QObject(dd, parent)\n#else\n    : QObject(parent),\n      d_ptr(&dd)\n#endif\n{\n}\n\nQJsonRpcMessage QJsonRpcServiceReply::request() const\n{\n    Q_D(const QJsonRpcServiceReply);\n    return d->request;\n}\n\nQJsonRpcMessage QJsonRpcServiceReply::response() const\n{\n    Q_D(const QJsonRpcServiceReply);\n    return d->response;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcservicereply.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSONRPCSERVICEREPLY_H\n#define QJSONRPCSERVICEREPLY_H\n\n#include <QObject>\n#include <QNetworkReply>\n\n#include \"qjsonrpcglobal.h\"\n#include \"qjsonrpcmessage.h\"\n\nclass QJsonRpcServiceReplyPrivate;\nclass QJSONRPC_EXPORT QJsonRpcServiceReply : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit QJsonRpcServiceReply(QObject *parent = 0);\n    virtual ~QJsonRpcServiceReply();\n\n    QJsonRpcMessage request() const;\n    QJsonRpcMessage response() const;\n\nQ_SIGNALS:\n    void finished();\n\nprotected:\n    Q_DECLARE_PRIVATE(QJsonRpcServiceReply)\n    Q_DISABLE_COPY(QJsonRpcServiceReply)\n    QJsonRpcServiceReply(QJsonRpcServiceReplyPrivate &dd, QObject *parent = 0);\n    friend class QJsonRpcSocketPrivate;\n    friend class QJsonRpcSocket;\n\n#if !defined(USE_QT_PRIVATE_HEADERS)\n    QScopedPointer<QJsonRpcServiceReplyPrivate> d_ptr;\n#endif\n\n};\n\n#endif // QJSONRPCSERVICEREPLY_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcservicereply_p.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSONRPCSERVICEREPLY_P_H\n#define QJSONRPCSERVICEREPLY_P_H\n\n#include \"qjsonrpcmessage.h\"\n\n#if defined(USE_QT_PRIVATE_HEADERS)\n#include <private/qobject_p.h>\n\nclass QJsonRpcServiceReplyPrivate : public QObjectPrivate\n#else\nclass QJsonRpcServiceReplyPrivate\n#endif\n{\npublic:\n    QJsonRpcMessage request;\n    QJsonRpcMessage response;\n};\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcsocket.cpp",
    "content": "#include <QTimer>\n#include <QEventLoop>\n#include <QDebug>\n\n#if QT_VERSION >= 0x050000\n#include <QJsonDocument>\n#else\n#include \"json/qjsondocument.h\"\n#endif\n\n#include \"qjsonrpcservice.h\"\n#include \"qjsonrpcservicereply_p.h\"\n#include \"qjsonrpcservicereply.h\"\n#include \"qjsonrpcsocket_p.h\"\n#include \"qjsonrpcsocket.h\"\n\nint QJsonRpcSocketPrivate::findJsonDocumentEnd(const QByteArray &jsonData)\n{\n    const char* pos = jsonData.constData();\n    const char* end = pos + jsonData.length();\n\n    char blockStart = 0;\n    char blockEnd = 0;\n    int index = 0;\n\n    // Find the beginning of the JSON document and determine if it is an object or an array\n    while (true) {\n        if (pos == end) {\n            return -1;\n        } else if (*pos == '{') {\n            blockStart = '{';\n            blockEnd = '}';\n            break;\n        } else if(*pos == '[') {\n            blockStart = '[';\n            blockEnd = ']';\n            break;\n        }\n\n        pos++;\n        index++;\n    }\n\n    // Find the end of the JSON document\n    pos++;\n    index++;\n    int depth = 1;\n    bool inString = false;\n    while (depth > 0 && pos <= end) {\n        if (*pos == '\\\\') {\n            pos += 2;\n            index += 2;\n            continue;\n        } else if (*pos == '\"') {\n            inString = !inString;\n        } else if (!inString) {\n            if (*pos == blockStart)\n                depth++;\n            else if (*pos == blockEnd)\n                depth--;\n        }\n\n        pos++;\n        index++;\n    }\n\n    // index-1 because we are one position ahead\n    return depth == 0 ? index-1 : -1;\n}\n\nvoid QJsonRpcSocketPrivate::writeData(const QJsonRpcMessage &message)\n{\n    Q_Q(QJsonRpcSocket);\n    QJsonDocument doc = QJsonDocument(message.toObject());\n#if QT_VERSION >= 0x050100 || QT_VERSION <= 0x050000\n    QByteArray data = doc.toJson(QJsonDocument::Compact);\n#else\n    QByteArray data = doc.toJson();\n#endif\n\n    device.data()->write(data);\n    qJsonRpcDebug() << \"sending(\" << q << \"): \" << data;\n}\n\nQJsonRpcAbstractSocket::QJsonRpcAbstractSocket(QObject *parent)\n#if defined(USE_QT_PRIVATE_HEADERS)\n    : QObject(*new QJsonRpcAbstractSocketPrivate, parent)\n#else\n    : QObject(parent),\n      d_ptr(new QJsonRpcAbstractSocketPrivate)\n#endif\n{\n}\n\nQJsonRpcAbstractSocket::~QJsonRpcAbstractSocket()\n{\n}\n\nQJsonRpcAbstractSocket::QJsonRpcAbstractSocket(QJsonRpcAbstractSocketPrivate &dd, QObject *parent)\n#if defined(USE_QT_PRIVATE_HEADERS)\n    : QObject(dd, parent)\n#else\n    : QObject(parent),\n      d_ptr(&dd)\n#endif\n{\n}\n\nbool QJsonRpcAbstractSocket::isValid() const\n{\n    return false;\n}\n\nvoid QJsonRpcAbstractSocket::setDefaultRequestTimeout(int msecs)\n{\n    Q_D(QJsonRpcAbstractSocket);\n\n    if (msecs < 0) {\n        qJsonRpcDebug() << \"Cannot set a negative request timeout msecs value\";\n        return;\n    }\n\n    d->defaultRequestTimeout = msecs;\n}\n\nint QJsonRpcAbstractSocket::getDefaultRequestTimeout() const\n{\n    Q_D(const QJsonRpcAbstractSocket);\n\n    return d->defaultRequestTimeout;\n}\n\nQJsonRpcMessage QJsonRpcAbstractSocket::sendMessageBlocking(const QJsonRpcMessage &message, int msecs)\n{\n    Q_UNUSED(message)\n    Q_UNUSED(msecs)\n\n    return QJsonRpcMessage();\n}\n\nQJsonRpcServiceReply *QJsonRpcAbstractSocket::sendMessage(const QJsonRpcMessage &message)\n{\n    Q_UNUSED(message)\n\n    return 0;\n}\n\nQJsonRpcMessage QJsonRpcAbstractSocket::invokeRemoteMethodBlocking(const QString &method, int msecs, const QVariant &arg1,\n                                                                   const QVariant &arg2, const QVariant &arg3,\n                                                                   const QVariant &arg4, const QVariant &arg5,\n                                                                   const QVariant &arg6, const QVariant &arg7,\n                                                                   const QVariant &arg8, const QVariant &arg9,\n                                                                   const QVariant &arg10)\n{\n    Q_UNUSED(method)\n    Q_UNUSED(msecs)\n    Q_UNUSED(arg1)\n    Q_UNUSED(arg2)\n    Q_UNUSED(arg3)\n    Q_UNUSED(arg4)\n    Q_UNUSED(arg5)\n    Q_UNUSED(arg6)\n    Q_UNUSED(arg7)\n    Q_UNUSED(arg8)\n    Q_UNUSED(arg9)\n    Q_UNUSED(arg10)\n\n    return QJsonRpcMessage();\n}\n\nQJsonRpcMessage QJsonRpcAbstractSocket::invokeRemoteMethodBlocking(const QString &method, const QVariant &arg1,\n                                                                   const QVariant &arg2, const QVariant &arg3,\n                                                                   const QVariant &arg4, const QVariant &arg5,\n                                                                   const QVariant &arg6, const QVariant &arg7,\n                                                                   const QVariant &arg8, const QVariant &arg9,\n                                                                   const QVariant &arg10)\n{\n    Q_D(QJsonRpcAbstractSocket);\n    return invokeRemoteMethodBlocking(method, d->defaultRequestTimeout, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);\n}\n\nQJsonRpcServiceReply *QJsonRpcAbstractSocket::invokeRemoteMethod(const QString &method, const QVariant &arg1,\n                                                                 const QVariant &arg2, const QVariant &arg3,\n                                                                 const QVariant &arg4, const QVariant &arg5,\n                                                                 const QVariant &arg6, const QVariant &arg7,\n                                                                 const QVariant &arg8, const QVariant &arg9,\n                                                                 const QVariant &arg10)\n{\n    Q_UNUSED(method)\n    Q_UNUSED(arg1)\n    Q_UNUSED(arg2)\n    Q_UNUSED(arg3)\n    Q_UNUSED(arg4)\n    Q_UNUSED(arg5)\n    Q_UNUSED(arg6)\n    Q_UNUSED(arg7)\n    Q_UNUSED(arg8)\n    Q_UNUSED(arg9)\n    Q_UNUSED(arg10)\n\n    return 0;\n}\n\nQJsonRpcSocket::QJsonRpcSocket(QIODevice *device, QObject *parent)\n#if defined(USE_QT_PRIVATE_HEADERS)\n    : QJsonRpcAbstractSocket(*new QJsonRpcSocketPrivate(this), parent)\n#else\n    : QJsonRpcAbstractSocket(parent),\n      d_ptr(new QJsonRpcSocketPrivate(this))\n#endif\n{\n    Q_D(QJsonRpcSocket);\n    connect(device, SIGNAL(readyRead()), this, SLOT(_q_processIncomingData()));\n    d->device = device;\n}\n\nQJsonRpcSocket::QJsonRpcSocket(QJsonRpcSocketPrivate &dd, QObject *parent)\n#if defined(USE_QT_PRIVATE_HEADERS)\n    : QJsonRpcAbstractSocket(dd, parent)\n#else\n    : QJsonRpcAbstractSocket(parent),\n      d_ptr(&dd)\n#endif\n{\n    Q_D(QJsonRpcSocket);\n    connect(d->device, SIGNAL(readyRead()), this, SLOT(_q_processIncomingData()));\n}\n\nQJsonRpcSocket::~QJsonRpcSocket()\n{\n}\n\nbool QJsonRpcSocket::isValid() const\n{\n    Q_D(const QJsonRpcSocket);\n    return d->device && d->device.data()->isOpen();\n}\n\n/*\nvoid QJsonRpcSocket::sendMessage(const QList<QJsonRpcMessage> &messages)\n{\n    QJsonArray array;\n    foreach (QJsonRpcMessage message, messages) {\n        array.append(message.toObject());\n    }\n\n    QJsonDocument doc = QJsonDocument(array);\n    m_device.data()->write(doc.toBinaryData());\n}\n*/\n\nQJsonRpcMessage QJsonRpcSocket::sendMessageBlocking(const QJsonRpcMessage &message, int msecs)\n{\n    Q_D(QJsonRpcSocket);\n    QJsonRpcServiceReply *reply = sendMessage(message);\n    QScopedPointer<QJsonRpcServiceReply> replyPtr(reply);\n\n    QEventLoop responseLoop;\n    connect(reply, SIGNAL(finished()), &responseLoop, SLOT(quit()));\n    QTimer::singleShot(msecs, &responseLoop, SLOT(quit()));\n    responseLoop.exec();\n\n    if (!reply->response().isValid()) {\n        d->replies.remove(message.id());\n        return message.createErrorResponse(QJsonRpc::TimeoutError, \"request timed out\");\n    }\n\n    return reply->response();\n}\n\nQJsonRpcServiceReply *QJsonRpcSocket::sendMessage(const QJsonRpcMessage &message)\n{\n    Q_D(QJsonRpcSocket);\n    if (!d->device) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"trying to send message without device\";\n        return 0;\n    }\n\n    notify(message);\n    QPointer<QJsonRpcServiceReply> reply(new QJsonRpcServiceReply);\n    reply->d_func()->request = message;\n    d->replies.insert(message.id(), reply);\n    return reply;\n}\n\nvoid QJsonRpcSocket::notify(const QJsonRpcMessage &message)\n{\n    Q_D(QJsonRpcSocket);\n    if (!d->device) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"trying to send message without device\";\n        return;\n    }\n\n    // disconnect the result message if we need to\n    QJsonRpcService *service = qobject_cast<QJsonRpcService*>(sender());\n    if (service)\n        disconnect(service, SIGNAL(result(QJsonRpcMessage)), this, SLOT(notify(QJsonRpcMessage)));\n\n    d->writeData(message);\n}\n\nQJsonRpcMessage QJsonRpcSocket::invokeRemoteMethodBlocking(const QString &method, int msecs, const QVariant &param1,\n                                                           const QVariant &param2, const QVariant &param3,\n                                                           const QVariant &param4, const QVariant &param5,\n                                                           const QVariant &param6, const QVariant &param7,\n                                                           const QVariant &param8, const QVariant &param9,\n                                                           const QVariant &param10)\n{\n    QVariantList params;\n    if (param1.isValid()) params.append(param1);\n    if (param2.isValid()) params.append(param2);\n    if (param3.isValid()) params.append(param3);\n    if (param4.isValid()) params.append(param4);\n    if (param5.isValid()) params.append(param5);\n    if (param6.isValid()) params.append(param6);\n    if (param7.isValid()) params.append(param7);\n    if (param8.isValid()) params.append(param8);\n    if (param9.isValid()) params.append(param9);\n    if (param10.isValid()) params.append(param10);\n\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(method, QJsonArray::fromVariantList(params));\n    return sendMessageBlocking(request, msecs);\n}\n\nQJsonRpcMessage QJsonRpcSocket::invokeRemoteMethodBlocking(const QString &method, const QVariant &param1,\n                                                           const QVariant &param2, const QVariant &param3,\n                                                           const QVariant &param4, const QVariant &param5,\n                                                           const QVariant &param6, const QVariant &param7,\n                                                           const QVariant &param8, const QVariant &param9,\n                                                           const QVariant &param10)\n{\n    Q_D(QJsonRpcSocket);\n    return invokeRemoteMethodBlocking(method, d->defaultRequestTimeout, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10);\n}\n\nQJsonRpcServiceReply *QJsonRpcSocket::invokeRemoteMethod(const QString &method, const QVariant &param1,\n                                                         const QVariant &param2, const QVariant &param3,\n                                                         const QVariant &param4, const QVariant &param5,\n                                                         const QVariant &param6, const QVariant &param7,\n                                                         const QVariant &param8, const QVariant &param9,\n                                                         const QVariant &param10)\n{\n    QVariantList params;\n    if (param1.isValid()) params.append(param1);\n    if (param2.isValid()) params.append(param2);\n    if (param3.isValid()) params.append(param3);\n    if (param4.isValid()) params.append(param4);\n    if (param5.isValid()) params.append(param5);\n    if (param6.isValid()) params.append(param6);\n    if (param7.isValid()) params.append(param7);\n    if (param8.isValid()) params.append(param8);\n    if (param9.isValid()) params.append(param9);\n    if (param10.isValid()) params.append(param10);\n\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(method, QJsonArray::fromVariantList(params));\n    return sendMessage(request);\n}\n\nvoid QJsonRpcSocketPrivate::_q_processIncomingData()\n{\n    Q_Q(QJsonRpcSocket);\n    if (!device) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"called without device\";\n        return;\n    }\n\n    buffer.append(device.data()->readAll());\n    while (!buffer.isEmpty()) {\n        int dataSize = findJsonDocumentEnd(buffer);\n        if (dataSize == -1) {\n            // incomplete data, wait for more\n            return;\n        }\n\n        QJsonParseError error;\n        QJsonDocument document = QJsonDocument::fromJson(buffer.mid(0, dataSize + 1), &error);\n        if (document.isEmpty()) {\n            if (error.error != QJsonParseError::NoError) {\n                qJsonRpcDebug() << Q_FUNC_INFO << error.errorString();\n            }\n\n            break;\n        }\n\n        buffer = buffer.mid(dataSize + 1);\n        if (document.isArray()) {\n            qJsonRpcDebug() << Q_FUNC_INFO << \"bulk support is current disabled\";\n            /*\n            for (int i = 0; i < document.array().size(); ++i) {\n                QJsonObject messageObject = document.array().at(i).toObject();\n                if (!messageObject.isEmpty()) {\n                    QJsonRpcMessage message(messageObject);\n                    Q_EMIT messageReceived(message);\n                }\n            }\n            */\n        } else if (document.isObject()){\n            qJsonRpcDebug() << \"received(\" << q << \"): \" << document.toJson(QJsonDocument::Compact);\n            QJsonRpcMessage message = QJsonRpcMessage::fromObject(document.object());\n            Q_EMIT q->messageReceived(message);\n\n            if (message.type() == QJsonRpcMessage::Response ||\n                message.type() == QJsonRpcMessage::Error) {\n                if (replies.contains(message.id())) {\n                    QPointer<QJsonRpcServiceReply> reply = replies.take(message.id());\n                    if (!reply.isNull()) {\n                        reply->d_func()->response = message;\n                        reply->finished();\n                    }\n                }\n            } else {\n                q->processRequestMessage(message);\n            }\n        }\n    }\n}\n\nvoid QJsonRpcSocket::processRequestMessage(const QJsonRpcMessage &message)\n{\n    Q_UNUSED(message)\n    // we don't do anything the default case with requests and notifications,\n    // these are only handled by the provider\n}\n\nQJsonRpcServiceSocket::QJsonRpcServiceSocket(QIODevice *device, QObject *parent)\n    : QJsonRpcSocket(device, parent)\n{\n}\n\nQJsonRpcServiceSocket::~QJsonRpcServiceSocket()\n{\n}\n\nvoid QJsonRpcServiceSocket::processRequestMessage(const QJsonRpcMessage &message)\n{\n    QJsonRpcServiceProvider::processMessage(this, message);\n}\n\n#include \"moc_qjsonrpcsocket.cpp\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcsocket.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSONRPCSOCKET_H\n#define QJSONRPCSOCKET_H\n\n#include <QObject>\n#include <QIODevice>\n\n#include \"qjsonrpcabstractserver.h\"\n#include \"qjsonrpcservice.h\"\n#include \"qjsonrpcmessage.h\"\n#include \"qjsonrpcglobal.h\"\n\n#define DEFAULT_MSECS_REQUEST_TIMEOUT (30000)\n\nclass QJsonRpcServiceReply;\nclass QJsonRpcAbstractSocketPrivate;\nclass QJSONRPC_EXPORT QJsonRpcAbstractSocket : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit QJsonRpcAbstractSocket(QObject *parent = 0);\n    ~QJsonRpcAbstractSocket();\n\n    virtual bool isValid() const;\n    void setDefaultRequestTimeout(int msecs);\n    int getDefaultRequestTimeout() const;\n\nQ_SIGNALS:\n    void messageReceived(const QJsonRpcMessage &message);\n\npublic Q_SLOTS:\n    virtual void notify(const QJsonRpcMessage &message) = 0;\n    virtual QJsonRpcMessage sendMessageBlocking(const QJsonRpcMessage &message, int msecs = DEFAULT_MSECS_REQUEST_TIMEOUT);\n    virtual QJsonRpcServiceReply *sendMessage(const QJsonRpcMessage &message);\n    virtual QJsonRpcMessage invokeRemoteMethodBlocking(const QString &method, int msecs, const QVariant &arg1 = QVariant(),\n                                               const QVariant &arg2 = QVariant(), const QVariant &arg3 = QVariant(),\n                                               const QVariant &arg4 = QVariant(), const QVariant &arg5 = QVariant(),\n                                               const QVariant &arg6 = QVariant(), const QVariant &arg7 = QVariant(),\n                                               const QVariant &arg8 = QVariant(), const QVariant &arg9 = QVariant(),\n                                               const QVariant &arg10 = QVariant());\n    virtual QJsonRpcMessage invokeRemoteMethodBlocking(const QString &method, const QVariant &arg1 = QVariant(),\n                                               const QVariant &arg2 = QVariant(), const QVariant &arg3 = QVariant(),\n                                               const QVariant &arg4 = QVariant(), const QVariant &arg5 = QVariant(),\n                                               const QVariant &arg6 = QVariant(), const QVariant &arg7 = QVariant(),\n                                               const QVariant &arg8 = QVariant(), const QVariant &arg9 = QVariant(),\n                                               const QVariant &arg10 = QVariant());\n    virtual QJsonRpcServiceReply *invokeRemoteMethod(const QString &method, const QVariant &arg1 = QVariant(),\n                                             const QVariant &arg2 = QVariant(), const QVariant &arg3 = QVariant(),\n                                             const QVariant &arg4 = QVariant(), const QVariant &arg5 = QVariant(),\n                                             const QVariant &arg6 = QVariant(), const QVariant &arg7 = QVariant(),\n                                             const QVariant &arg8 = QVariant(), const QVariant &arg9 = QVariant(),\n                                             const QVariant &arg10 = QVariant());\nprotected:\n    QJsonRpcAbstractSocket(QJsonRpcAbstractSocketPrivate &dd, QObject *parent = 0);\n\n#if !defined(USE_QT_PRIVATE_HEADERS)\n    QScopedPointer<QJsonRpcAbstractSocketPrivate> d_ptr;\n#endif\n\nprivate:\n    Q_DECLARE_PRIVATE(QJsonRpcAbstractSocket)\n    Q_DISABLE_COPY(QJsonRpcAbstractSocket)\n\n};\n\nclass QJsonRpcSocketPrivate;\nclass QJSONRPC_EXPORT QJsonRpcSocket : public QJsonRpcAbstractSocket\n{\n    Q_OBJECT\npublic:\n    explicit QJsonRpcSocket(QIODevice *device, QObject *parent = 0);\n    ~QJsonRpcSocket();\n\n    virtual bool isValid() const;\n\npublic Q_SLOTS:\n    virtual void notify(const QJsonRpcMessage &message);\n    virtual QJsonRpcMessage sendMessageBlocking(const QJsonRpcMessage &message, int msecs = DEFAULT_MSECS_REQUEST_TIMEOUT);\n    virtual QJsonRpcServiceReply *sendMessage(const QJsonRpcMessage &message);\n    QJsonRpcMessage invokeRemoteMethodBlocking(const QString &method, int msecs, const QVariant &arg1 = QVariant(),\n                                               const QVariant &arg2 = QVariant(), const QVariant &arg3 = QVariant(),\n                                               const QVariant &arg4 = QVariant(), const QVariant &arg5 = QVariant(),\n                                               const QVariant &arg6 = QVariant(), const QVariant &arg7 = QVariant(),\n                                               const QVariant &arg8 = QVariant(), const QVariant &arg9 = QVariant(),\n                                               const QVariant &arg10 = QVariant());\n    QJsonRpcMessage invokeRemoteMethodBlocking(const QString &method, const QVariant &arg1 = QVariant(),\n                                               const QVariant &arg2 = QVariant(), const QVariant &arg3 = QVariant(),\n                                               const QVariant &arg4 = QVariant(), const QVariant &arg5 = QVariant(),\n                                               const QVariant &arg6 = QVariant(), const QVariant &arg7 = QVariant(),\n                                               const QVariant &arg8 = QVariant(), const QVariant &arg9 = QVariant(),\n                                               const QVariant &arg10 = QVariant());\n    QJsonRpcServiceReply *invokeRemoteMethod(const QString &method, const QVariant &arg1 = QVariant(),\n                                             const QVariant &arg2 = QVariant(), const QVariant &arg3 = QVariant(),\n                                             const QVariant &arg4 = QVariant(), const QVariant &arg5 = QVariant(),\n                                             const QVariant &arg6 = QVariant(), const QVariant &arg7 = QVariant(),\n                                             const QVariant &arg8 = QVariant(), const QVariant &arg9 = QVariant(),\n                                             const QVariant &arg10 = QVariant());\n\nprotected:\n    QJsonRpcSocket(QJsonRpcSocketPrivate &dd, QObject *parent);\n    virtual void processRequestMessage(const QJsonRpcMessage &message);\n\nprivate:\n    Q_DECLARE_PRIVATE(QJsonRpcSocket)\n    Q_DISABLE_COPY(QJsonRpcSocket)\n    Q_PRIVATE_SLOT(d_func(), void _q_processIncomingData())\n\n#if !defined(USE_QT_PRIVATE_HEADERS)\n    QScopedPointer<QJsonRpcSocketPrivate> d_ptr;\n#endif\n};\n\nclass QJSONRPC_EXPORT QJsonRpcServiceSocket : public QJsonRpcSocket, public QJsonRpcServiceProvider\n{\n    Q_OBJECT\npublic:\n    explicit QJsonRpcServiceSocket(QIODevice *device, QObject *parent = 0);\n    ~QJsonRpcServiceSocket();\n\nprivate:\n    virtual void processRequestMessage(const QJsonRpcMessage &message);\n\n};\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpcsocket_p.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSONRPCSOCKET_P_H\n#define QJSONRPCSOCKET_P_H\n\n#include <QPointer>\n#include <QHash>\n#include <QIODevice>\n\n#include \"qjsonrpcsocket.h\"\n#include \"qjsonrpcmessage.h\"\n#include \"qjsonrpcglobal.h\"\n\n#if defined(USE_QT_PRIVATE_HEADERS)\n#include <private/qobject_p.h>\n\nclass QJSONRPC_EXPORT QJsonRpcAbstractSocketPrivate : public QObjectPrivate\n#else\nclass QJSONRPC_EXPORT QJsonRpcAbstractSocketPrivate\n#endif\n{\npublic:\n    QJsonRpcAbstractSocketPrivate()\n        : defaultRequestTimeout(DEFAULT_MSECS_REQUEST_TIMEOUT)\n    {}\n\n    int defaultRequestTimeout;\n\n#if !defined(USE_QT_PRIVATE_HEADERS)\n    virtual ~QJsonRpcAbstractSocketPrivate() {}\n#endif\n};\n\nclass QJsonRpcServiceReply;\nclass QJSONRPC_EXPORT QJsonRpcSocketPrivate : public QJsonRpcAbstractSocketPrivate\n{\npublic:\n    QJsonRpcSocketPrivate(QJsonRpcSocket *socket)\n        : q_ptr(socket)\n    {}\n\n#if !defined(USE_QT_PRIVATE_HEADERS)\n    virtual ~QJsonRpcSocketPrivate() {}\n#endif\n\n    // slots\n    virtual void _q_processIncomingData();\n\n    int findJsonDocumentEnd(const QByteArray &jsonData);\n    void writeData(const QJsonRpcMessage &message);\n\n    QPointer<QIODevice> device;\n    QByteArray buffer;\n    QHash<int, QPointer<QJsonRpcServiceReply> > replies;\n\n    QJsonRpcSocket * const q_ptr;\n    Q_DECLARE_PUBLIC(QJsonRpcSocket)\n};\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpctcpserver.cpp",
    "content": "#include <QTcpServer>\n#include <QTcpSocket>\n\n#include \"qjsonrpcsocket.h\"\n#include \"qjsonrpcabstractserver_p.h\"\n#include \"qjsonrpctcpserver.h\"\n\nclass QJsonRpcTcpServerPrivate : public QJsonRpcAbstractServerPrivate\n{\npublic:\n    QHash<QTcpSocket*, QJsonRpcSocket*> socketLookup;\n};\n\nQJsonRpcTcpServer::QJsonRpcTcpServer(QObject *parent)\n#if defined(USE_QT_PRIVATE_HEADERS)\n    : QTcpServer(*new QJsonRpcTcpServerPrivate, parent)\n#else\n    : QTcpServer(parent),\n      d_ptr(new QJsonRpcTcpServerPrivate)\n#endif\n{\n}\n\nQJsonRpcTcpServer::~QJsonRpcTcpServer()\n{\n    Q_D(QJsonRpcTcpServer);\n    foreach (QTcpSocket *socket, d->socketLookup.keys()) {\n        socket->flush();\n        socket->deleteLater();\n    }\n    d->socketLookup.clear();\n\n    foreach (QJsonRpcSocket *client, d->clients)\n        client->deleteLater();\n    d->clients.clear();\n}\n\nbool QJsonRpcTcpServer::addService(QJsonRpcService *service)\n{\n    if (!QJsonRpcServiceProvider::addService(service))\n        return false;\n\n    connect(service, SIGNAL(notifyConnectedClients(QJsonRpcMessage)),\n               this, SLOT(notifyConnectedClients(QJsonRpcMessage)));\n    connect(service, SIGNAL(notifyConnectedClients(QString,QJsonArray)),\n               this, SLOT(notifyConnectedClients(QString,QJsonArray)));\n    return true;\n}\n\nbool QJsonRpcTcpServer::removeService(QJsonRpcService *service)\n{\n    if (!QJsonRpcServiceProvider::removeService(service))\n        return false;\n\n    disconnect(service, SIGNAL(notifyConnectedClients(QJsonRpcMessage)),\n                  this, SLOT(notifyConnectedClients(QJsonRpcMessage)));\n    disconnect(service, SIGNAL(notifyConnectedClients(QString,QJsonArray)),\n                  this, SLOT(notifyConnectedClients(QString,QJsonArray)));\n    return true;\n}\n\nint QJsonRpcTcpServer::connectedClientCount() const\n{\n    Q_D(const QJsonRpcTcpServer);\n    return d->clients.size();\n}\n\n#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)\nvoid QJsonRpcTcpServer::incomingConnection(qintptr socketDescriptor)\n#else\nvoid QJsonRpcTcpServer::incomingConnection(int socketDescriptor)\n#endif\n{\n    Q_D(QJsonRpcTcpServer);\n    QTcpSocket *tcpSocket = new QTcpSocket(this);\n    if (!tcpSocket->setSocketDescriptor(socketDescriptor)) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"can't set socket descriptor\";\n        tcpSocket->deleteLater();\n        return;\n    }\n\n    QIODevice *device = qobject_cast<QIODevice*>(tcpSocket);\n    QJsonRpcSocket *socket = new QJsonRpcSocket(device, this);\n    connect(socket, SIGNAL(messageReceived(QJsonRpcMessage)),\n              this, SLOT(_q_processMessage(QJsonRpcMessage)));\n    d->clients.append(socket);\n    connect(tcpSocket, SIGNAL(disconnected()), this, SLOT(_q_clientDisconnected()));\n    d->socketLookup.insert(tcpSocket, socket);\n    Q_EMIT clientConnected();\n}\n\nvoid QJsonRpcTcpServer::_q_clientDisconnected()\n{\n    Q_D(QJsonRpcTcpServer);\n    QTcpSocket *tcpSocket = static_cast<QTcpSocket*>(sender());\n    if (!tcpSocket) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"called with invalid socket\";\n        return;\n    }\n\n    if (d->socketLookup.contains(tcpSocket)) {\n        QJsonRpcSocket *socket = d->socketLookup.take(tcpSocket);\n        d->clients.removeAll(socket);\n        socket->deleteLater();\n    }\n\n    tcpSocket->deleteLater();\n    Q_EMIT clientDisconnected();\n}\n\nvoid QJsonRpcTcpServer::_q_processMessage(const QJsonRpcMessage &message)\n{\n    QJsonRpcSocket *socket = static_cast<QJsonRpcSocket*>(sender());\n    if (!socket) {\n        qJsonRpcDebug() << Q_FUNC_INFO << \"called without service socket\";\n        return;\n    }\n\n    processMessage(socket, message);\n}\n\nvoid QJsonRpcTcpServer::notifyConnectedClients(const QJsonRpcMessage &message)\n{\n    Q_D(QJsonRpcTcpServer);\n    d->_q_notifyConnectedClients(message);\n}\n\nvoid QJsonRpcTcpServer::notifyConnectedClients(const QString &method, const QJsonArray &params)\n{\n    Q_D(QJsonRpcTcpServer);\n    d->_q_notifyConnectedClients(method, params);\n}\n\n#include \"moc_qjsonrpctcpserver.cpp\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/qjsonrpctcpserver.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSONRPCTCPSERVER_H\n#define QJSONRPCTCPSERVER_H\n\n#include <QTcpServer>\n#include \"qjsonrpcabstractserver.h\"\n\nclass QJsonRpcTcpServerPrivate;\nclass QJSONRPC_EXPORT QJsonRpcTcpServer : public QTcpServer, public QJsonRpcAbstractServer\n{\n    Q_OBJECT\npublic:\n    explicit QJsonRpcTcpServer(QObject *parent = 0);\n    ~QJsonRpcTcpServer();\n\n    virtual int connectedClientCount() const;\n\n    // reimp\n    bool addService(QJsonRpcService *service);\n    bool removeService(QJsonRpcService *service);\n\nQ_SIGNALS:\n    void clientConnected();\n    void clientDisconnected();\n\npublic Q_SLOTS:\n    void notifyConnectedClients(const QJsonRpcMessage &message);\n    void notifyConnectedClients(const QString &method, const QJsonArray &params);\n\nprotected:\n#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)\n    virtual void incomingConnection(qintptr socketDescriptor);\n#else\n    virtual void incomingConnection(int socketDescriptor);\n#endif\n\nprivate Q_SLOTS:\n    void _q_clientDisconnected();\n    void _q_processMessage(const QJsonRpcMessage &message);\n\nprivate:\n    Q_DECLARE_PRIVATE(QJsonRpcTcpServer)\n    Q_DISABLE_COPY(QJsonRpcTcpServer)\n#if !defined(USE_QT_PRIVATE_HEADERS)\n    QScopedPointer<QJsonRpcTcpServerPrivate> d_ptr;\n#endif\n};\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/src/src.pro",
    "content": "include(http-parser/http-parser.pri)\n\nINCLUDEPATH += .\nTEMPLATE = lib\nTARGET = qjsonrpc\nQT += core gui network\n\nDEFINES += QJSONRPC_BUILD\nCONFIG += $${QJSONRPC_LIBRARY_TYPE}\nVERSION = $${QJSONRPC_VERSION}\n\nCONFIG += staticlib\n\ninclude(../../../liteideutils.pri)\n\n#win32:DESTDIR = $$OUT_PWD\n#macx:QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/\n\n# check if we need to build qjson\nlessThan(QT_MAJOR_VERSION, 5) {\n    include(json/json.pri)\n}\n\nPRIVATE_HEADERS += \\\n    qjsonrpcservice_p.h \\\n    qjsonrpcsocket_p.h \\\n    qjsonrpcabstractserver_p.h \\\n    qjsonrpcservicereply_p.h \\\n    qjsonrpchttpserver_p.h\n\nINSTALL_HEADERS += \\\n    qjsonrpcmessage.h \\\n    qjsonrpcservice.h \\\n    qjsonrpcsocket.h \\\n    qjsonrpcserviceprovider.h \\\n    qjsonrpcabstractserver.h \\\n    qjsonrpclocalserver.h \\\n    qjsonrpctcpserver.h \\\n    qjsonrpcglobal.h \\\n    qjsonrpcservicereply.h \\\n    qjsonrpchttpclient.h \\\n    qjsonrpchttpserver.h\n\ngreaterThan(QT_MAJOR_VERSION, 4) {\n    greaterThan(QT_MINOR_VERSION, 1) {\n        INSTALL_HEADERS += qjsonrpcmetatype.h\n    }\n}\n\nHEADERS += \\\n    $${INSTALL_HEADERS} \\\n    $${PRIVATE_HEADERS}\n\nSOURCES += \\\n    qjsonrpcmessage.cpp \\\n    qjsonrpcservice.cpp \\\n    qjsonrpcsocket.cpp \\\n    qjsonrpcserviceprovider.cpp \\\n    qjsonrpcabstractserver.cpp \\\n    qjsonrpclocalserver.cpp \\\n    qjsonrpctcpserver.cpp \\\n    qjsonrpcservicereply.cpp \\\n    qjsonrpchttpclient.cpp \\\n    qjsonrpchttpserver.cpp\n\n# install\n#headers.files = $${INSTALL_HEADERS}\n#headers.path = $${PREFIX}/include/qjsonrpc\n#qjson_headers.files = $${QJSON_INSTALL_HEADERS}\n#qjson_headers.path = $${PREFIX}/include/qjsonrpc/json\n#private_headers.files = $${PRIVATE_HEADERS}\n#private_headers.path = $${PREFIX}/include/qjsonrpc/private\n#target.path = $${PREFIX}/$${LIBDIR}\n#INSTALLS += headers qjson_headers private_headers target\n\n# pkg-config support\n#CONFIG += create_pc create_prl no_install_prl\n#QMAKE_PKGCONFIG_DESTDIR = pkgconfig\n#QMAKE_PKGCONFIG_LIBDIR = $$target.path\n#QMAKE_PKGCONFIG_INCDIR = $$headers.path\nequals(QJSONRPC_LIBRARY_TYPE, staticlib) {\n    QMAKE_PKGCONFIG_CFLAGS = -DQJSONRPC_STATIC\n} else {\n    QMAKE_PKGCONFIG_CFLAGS = -DQJSONRPC_SHARED\n}\n#unix:QMAKE_CLEAN += -r pkgconfig lib$${TARGET}.prl\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/auto.pro",
    "content": "TEMPLATE = subdirs\nSUBDIRS += \\\n    qjsonrpcmessage \\\n    qjsonrpcsocket \\\n    qjsonrpcserver \\\n    qjsonrpcservice \\\n    qjsonrpchttpclient \\\n    qjsonrpchttpserver \\\n    issue22\n\nlessThan(QT_MAJOR_VERSION, 5) {\n    SUBDIRS += json\n}\n\ngreaterThan(QT_MAJOR_VERSION, 4) {\n    greaterThan(QT_MINOR_VERSION, 1) {\n        SUBDIRS += qjsonrpcmetatype\n    }\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/issue22/issue22.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\n\nTARGET = tst_issue22\nSOURCES = tst_issue22.cpp\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/issue22/tst_issue22.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QLocalSocket>\n#include <QTcpSocket>\n#include <QScopedPointer>\n\n#include <QtCore/QEventLoop>\n#include <QtCore/QVariant>\n#include <QtTest/QtTest>\n\n#if QT_VERSION >= 0x050000\n#include <QJsonDocument>\n#else\n#include \"json/qjsondocument.h\"\n#endif\n\n#include \"qjsonrpcabstractserver.h\"\n#include \"qjsonrpctcpserver.h\"\n#include \"qjsonrpcsocket.h\"\n#include \"qjsonrpcmessage.h\"\n#include \"signalspy.h\"\n\nclass TestIssue22: public QObject\n{\n    Q_OBJECT\npublic:\n    TestIssue22();\n\nprivate Q_SLOTS:\n    void initTestCase();\n    void cleanupTestCase();\n    void init();\n    void cleanup();\n\n    void testIssue21();\n\nprivate:\n    QThread serverThread;\n    QScopedPointer<QJsonRpcTcpServer> tcpServer;\n    quint16 tcpServerPort;\n};\n\nTestIssue22::TestIssue22()\n{\n    tcpServerPort = quint16(8118 + qrand() % 1000);\n}\n\nvoid TestIssue22::initTestCase()\n{\n    serverThread.start();\n}\n\nvoid TestIssue22::cleanupTestCase()\n{\n    serverThread.quit();\n    QVERIFY(serverThread.wait());\n}\n\nvoid TestIssue22::init()\n{\n    tcpServer.reset(new QJsonRpcTcpServer);\n    QVERIFY(tcpServer->listen(QHostAddress::LocalHost, tcpServerPort));\n    tcpServer->moveToThread(&serverThread);\n}\n\nvoid TestIssue22::cleanup()\n{\n    tcpServer->close();\n}\n\nclass Issue21Service : public QJsonRpcService\n{\n    Q_OBJECT\n    Q_CLASSINFO(\"serviceName\", \"service\")\npublic:\n    Issue21Service(QObject *parent = 0) : QJsonRpcService(parent) {}\n\npublic Q_SLOTS:\n    QString fastMethod(const QString &name)\n    {\n        QEventLoop loop;\n        QTimer::singleShot(150, &loop, SLOT(quit()));\n        loop.exec();\n\n        return QString(\"fast %1\").arg(name);\n    }\n\n    QString slowMethod(const QString &name)\n    {\n        QEventLoop loop;\n        QTimer::singleShot(2000, &loop, SLOT(quit()));\n        loop.exec();\n\n        return QString(\"slow %1\").arg(name);\n    }\n};\n\nclass TestClientRunnable : public QObject, public QRunnable\n{\n    Q_OBJECT\npublic:\n    TestClientRunnable(bool slow, quint16 port)\n        : m_slow(slow), m_port(port)\n    {\n        setAutoDelete(true);\n    }\n\n    virtual void run() {\n        QTcpSocket socket;\n        socket.connectToHost(QHostAddress::LocalHost, m_port);\n        QVERIFY(socket.waitForConnected());\n\n        // run tests\n        QJsonRpcSocket client(&socket);\n        QJsonRpcMessage request = m_slow ?\n            QJsonRpcMessage::createRequest(\"service.slowMethod\", QLatin1String(\"slow\")) :\n            QJsonRpcMessage::createRequest(\"service.fastMethod\", QLatin1String(\"fast\"));\n        QJsonRpcMessage response = client.sendMessageBlocking(request);\n        Q_EMIT messageReceived(request, response);\n        socket.disconnectFromHost();\n    }\n\nQ_SIGNALS:\n    void messageReceived(const QJsonRpcMessage &request, const QJsonRpcMessage &response);\n\nprivate:\n    bool m_slow;\n    quint16 m_port;\n    QJsonRpcMessage m_message;\n\n};\n\nvoid TestIssue22::testIssue21()\n{\n    QVERIFY(tcpServer->addService(new Issue21Service));\n\n    TestClientRunnable *fastClient = new TestClientRunnable(false, tcpServerPort);\n    SignalSpy fastClientSpy(fastClient, SIGNAL(messageReceived(QJsonRpcMessage, QJsonRpcMessage)));\n    TestClientRunnable *slowClient = new TestClientRunnable(true, tcpServerPort);\n    SignalSpy slowClientSpy(slowClient, SIGNAL(messageReceived(QJsonRpcMessage, QJsonRpcMessage)));\n\n    QThreadPool::globalInstance()->setMaxThreadCount(10);\n    QThreadPool::globalInstance()->start(fastClient);\n    QThreadPool::globalInstance()->start(slowClient);\n\n    fastClientSpy.wait();\n    slowClientSpy.wait();\n    QCOMPARE(fastClientSpy.length(), slowClientSpy.length());\n\n    QList<QVariant> fastClientPair = fastClientSpy.first();\n    QJsonRpcMessage fastRequest = fastClientPair.at(0).value<QJsonRpcMessage>();\n    QJsonRpcMessage fastResponse = fastClientPair.at(1).value<QJsonRpcMessage>();\n    QCOMPARE(fastRequest.id(), fastResponse.id());\n\n    QList<QVariant> slowClientPair = slowClientSpy.first();\n    QJsonRpcMessage slowRequest = slowClientPair.at(0).value<QJsonRpcMessage>();\n    QJsonRpcMessage slowResponse = slowClientPair.at(1).value<QJsonRpcMessage>();\n    QCOMPARE(slowRequest.id(), slowResponse.id());\n}\n\nQTEST_MAIN(TestIssue22)\n#include \"tst_issue22.moc\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/json/bom.json",
    "content": "﻿{\n    \"info-version\": \"1.0\"\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/json/json.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\n\nTARGET = tst_qtjson\nQT = core testlib\nCONFIG -= app_bundle\nCONFIG += testcase\n\nTESTDATA += test.json test.bjson test3.json test2.json\nSOURCES += tst_qtjson.cpp\nRESOURCES += tst_qtjson.qrc\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/json/test.json",
    "content": "[\n    \"JSON Test Pattern pass1\",\n    {\"object with 1 member\":[\"array with 1 element\"]},\n    {},\n    [],\n    -42,\n    true,\n    false,\n    null,\n    {\n        \"integer\": 1234567890,\n        \"real\": -9876.543210,\n        \"e\": 0.123456789e-12,\n        \"E\": 1.234567890E+34,\n        \"\":  23456789012E66,\n        \"zero\": 0,\n        \"one\": 1,\n        \"space\": \" \",\n        \"quote\": \"\\\"\",\n        \"backslash\": \"\\\\\",\n        \"controls\": \"\\b\\f\\n\\r\\t\",\n        \"slash\": \"/ & \\/\",\n        \"alpha\": \"abcdefghijklmnopqrstuvwxyz\",\n        \"ALPHA\": \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",\n        \"digit\": \"0123456789\",\n        \"0123456789\": \"digit\",\n        \"special\": \"`1~!@#$%^&*()_+-={\\':[,]}|;.</>?\",\n        \"hex\": \"\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A\",\n        \"true\": true,\n        \"false\": false,\n        \"null\": null,\n        \"array\":[  ],\n        \"object\":{  },\n        \"address\": \"50 St. James Street\",\n        \"url\": \"http://www.JSON.org/\",\n        \"comment\": \"// /* <!-- --\",\n        \"# -- --> */\": \" \",\n        \" s p a c e d \" :[1,2 , 3\n\n,\n\n4 , 5        ,          6           ,7        ],\"compact\":[1,2,3,4,5,6,7],\n        \"jsontext\": \"{\\\"object with 1 member\\\":[\\\"array with 1 element\\\"]}\",\n        \"quotes\": \"&#34; \\u0022 %22 0x22 034 &#x22;\",\n        \"\\/\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t`1~!@#$%^&*()_+-=[]{}|;:\\',./<>?\" : \"A key can be any string\"\n    },\n    0.5 ,98.6\n,\n99.44\n,\n\n1066,\n1e1,\n0.1e1,\n1e-1,\n1e00,\n2e+00,\n2e-00,\n\"rosebud\",\n{\"foo\": \"bar\"},\n{\"classification\":{\"relevancyScore\":1000,\"searchUrl\":{\"value\":\"http://www.bizrate.com/iphone-cases/index__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"}},\"products\":{\"priceSet\":{\"minPrice\":{\"value\":\"$0.01\",\"integral\":1},\"maxPrice\":{\"value\":\"$4,833.99\",\"integral\":483399}},\"product\":[{\"type\":\"PRODUCT\",\"title\":\"Silicone case for iPhone 3G/ 3GS\",\"description\":\"Elite Horizontal Leather Pouch for Apple iPhone 3G/3Gs - Premium quality horizontal case for your Apple iPhone 3G/3Gs. This pouch is ideal for the style conscious on the go. This great looking case is made from high-quality leather with classic black...\",\"manufacturer\":\"Apple\",\"url\":{\"value\":\"http://www.bizrate.com/silicone-case-for-iphone-3g-3gs--pid1968262863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=1968262863\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=1968262863\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=1968262863\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=1968262863\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":310711221747712.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.56\",\"integral\":156},\"maxPrice\":{\"value\":\"$29.99\",\"integral\":2999},\"stores\":14},\"id\":1968262863,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Nonslip Checkered Silicone Skin Soft Case for iPhone 4 4G\",\"description\":\"Specification:Product Name Silicone Skin Case Model for Apple iPhone 4 Color Black Material Soft Silicone Skin Weight 26g Package 1 x Case for Apple iPhone 4 Description:This is a non-OEM product.Accessory Only, Phone is not included.\",\"manufacturer\":\"H&B\",\"url\":{\"value\":\"http://www.bizrate.com/nonslip-checkered-silicone-skin-soft-case-for-iphone-4-4g--pid2534935499/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2534935499\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2534935499\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2534935499\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2534935499\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":175580930637824.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.45\",\"integral\":45},\"maxPrice\":{\"value\":\"$194.95\",\"integral\":19495},\"stores\":34},\"id\":2534935499,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Plastic Case for iPhone 4 - Black\",\"description\":\"Description:Detachable Windmill Type Matte Hard Plastic Case Cover for iPhone 4 (Black / Magenta)Customised your iPhone with this wonderful Plastic Case which is a accessory for your iPhone 4 which is made of high quality and durable plastic, protect\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/plastic-case-for-iphone-4-black--pid2305624670/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2305624670\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2305624670\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2305624670\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2305624670\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":132488642953216.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.99\",\"integral\":99},\"maxPrice\":{\"value\":\"$303.68\",\"integral\":30368},\"stores\":33},\"id\":2305624670,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Protective Silicone Case for iPhone 4\",\"description\":\"Made of high quality PVC material Protects your iPhone 4 from any scratch and dirt Easy to install and remove, no any tool needed Cut-out design allows user can access all keypad / button and slot without having to remove the case\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/protective-silicone-case-for-iphone-4--pid2120981405/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2120981405\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2120981405\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2120981405\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2120981405\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":108614681362432.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.70\",\"integral\":170},\"maxPrice\":{\"value\":\"$99.99\",\"integral\":9999},\"stores\":11},\"id\":2120981405,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"IphoneÂ® 4 Aerosport Case\",\"description\":\"Do more than just protect your iPhone 4 with this case bundle from rooCASE. This 3 in 1 bundle include a snap-on case, screen protector and a Nike+ sensor shoe pouch that can be use on most running shoes. Color: Purple Design: Love Provides protection...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/iphone-4-aerosport-case--pid2203798762/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2203798762\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2203798762\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2203798762\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2203798762\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":96203484168192.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$2.49\",\"integral\":249},\"maxPrice\":{\"value\":\"$79.95\",\"integral\":7995},\"stores\":16},\"id\":2203798762,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Case Reflect For Iphone 3G\",\"description\":\"NCAA iPhone 3G faceplate features the schools primary logo silk screened on the front of the case.\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/case-reflect-for-iphone-3g--pid1114627445/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=1114627445\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=1114627445\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=1114627445\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=1114627445\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":84727583211520.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.69\",\"integral\":69},\"maxPrice\":{\"value\":\"$75.52\",\"integral\":7552},\"stores\":59},\"id\":1114627445,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Infuse Protector Case for iPhone 4 Black\",\"description\":\"Protect and personalize your iPhone 4 with this front and back image design Protector Case. Form-fitting front and back hard plastic covers Protects your cell phone without adding a lot of bulk Smooth glossy finish Snaps on to the front edges, sides...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/infuse-protector-case-for-iphone-4-black--pid2557462717/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2557462717\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2557462717\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2557462717\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2557462717\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":80831066406912.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.59\",\"integral\":59},\"maxPrice\":{\"value\":\"$79.00\",\"integral\":7900},\"stores\":24},\"id\":2557462717,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Dragonfly iPhone 4 Kream Case - Black\",\"description\":\"DF-0030219 - White, Kream Case for iPhone 4 by Dragon-Fly\",\"url\":{\"value\":\"http://www.bizrate.com/dragonfly-iphone-4-kream-case-black--pid2442061740/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2442061740\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2442061740\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2442061740\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2442061740\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":70900229603328.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.05\",\"integral\":105},\"maxPrice\":{\"value\":\"$94.49\",\"integral\":9449},\"stores\":30},\"id\":2442061740,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Apple iPhone 3G/3GS Silicone Case (Black)\",\"description\":\"Snap on Apple iPhone 3G 3GS Synthetic Leather Hardshell Case! Premium Qualtiy Synthetic Leather cover provides style, comfort, and protection to your iPhone 3G & 3GS. It also adds a sophisticated elegance and cool to your fashion. The case allows Quick...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/apple-iphone-3g3gs-silicone-case-black--pid2004746863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2004746863\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2004746863\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2004746863\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2004746863\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":65194915004416.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.01\",\"integral\":1},\"maxPrice\":{\"value\":\"$414.99\",\"integral\":41499},\"stores\":39},\"id\":2004746863,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Otterbox iPhone 4 Defender Case - Black\",\"description\":\"Your iPhone 4 has become a big part of your life. With FaceTime video, retina display, multitasking, HD video recording and more - you've got a lot to lose. You won't find a tougher case than the OtterBox Defender Series for iPhone 4. This three-layer...\",\"manufacturer\":\"Universal\",\"url\":{\"value\":\"http://www.bizrate.com/otterbox-iphone-4-defender-case-black--pid2584611575/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2584611575\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2584611575\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2584611575\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2584611575\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":61515478597632.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$3.28\",\"integral\":328},\"maxPrice\":{\"value\":\"$110.65\",\"integral\":11065},\"stores\":25},\"id\":2584611575,\"categoryId\":8515}],\"includedResults\":10,\"totalResults\":2000}},\n{\"classification\":{\"relevancyScore\":1000,\"searchUrl\":{\"value\":\"http://www.bizrate.com/iphone-cases/index__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"}},\"products\":{\"priceSet\":{\"minPrice\":{\"value\":\"$0.01\",\"integral\":1},\"maxPrice\":{\"value\":\"$4,833.99\",\"integral\":483399}},\"product\":[{\"type\":\"PRODUCT\",\"title\":\"Silicone case for iPhone 3G/ 3GS\",\"description\":\"Elite Horizontal Leather Pouch for Apple iPhone 3G/3Gs - Premium quality horizontal case for your Apple iPhone 3G/3Gs. This pouch is ideal for the style conscious on the go. This great looking case is made from high-quality leather with classic black...\",\"manufacturer\":\"Apple\",\"url\":{\"value\":\"http://www.bizrate.com/silicone-case-for-iphone-3g-3gs--pid1968262863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=1968262863\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=1968262863\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=1968262863\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=1968262863\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":310711221747712.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.56\",\"integral\":156},\"maxPrice\":{\"value\":\"$29.99\",\"integral\":2999},\"stores\":14},\"id\":1968262863,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Nonslip Checkered Silicone Skin Soft Case for iPhone 4 4G\",\"description\":\"Specification:Product Name Silicone Skin Case Model for Apple iPhone 4 Color Black Material Soft Silicone Skin Weight 26g Package 1 x Case for Apple iPhone 4 Description:This is a non-OEM product.Accessory Only, Phone is not included.\",\"manufacturer\":\"H&B\",\"url\":{\"value\":\"http://www.bizrate.com/nonslip-checkered-silicone-skin-soft-case-for-iphone-4-4g--pid2534935499/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2534935499\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2534935499\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2534935499\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2534935499\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":175580930637824.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.45\",\"integral\":45},\"maxPrice\":{\"value\":\"$194.95\",\"integral\":19495},\"stores\":34},\"id\":2534935499,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Plastic Case for iPhone 4 - Black\",\"description\":\"Description:Detachable Windmill Type Matte Hard Plastic Case Cover for iPhone 4 (Black / Magenta)Customised your iPhone with this wonderful Plastic Case which is a accessory for your iPhone 4 which is made of high quality and durable plastic, protect\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/plastic-case-for-iphone-4-black--pid2305624670/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2305624670\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2305624670\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2305624670\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2305624670\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":132488642953216.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.99\",\"integral\":99},\"maxPrice\":{\"value\":\"$303.68\",\"integral\":30368},\"stores\":33},\"id\":2305624670,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Protective Silicone Case for iPhone 4\",\"description\":\"Made of high quality PVC material Protects your iPhone 4 from any scratch and dirt Easy to install and remove, no any tool needed Cut-out design allows user can access all keypad / button and slot without having to remove the case\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/protective-silicone-case-for-iphone-4--pid2120981405/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2120981405\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2120981405\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2120981405\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2120981405\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":108614681362432.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.70\",\"integral\":170},\"maxPrice\":{\"value\":\"$99.99\",\"integral\":9999},\"stores\":11},\"id\":2120981405,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"IphoneÂ® 4 Aerosport Case\",\"description\":\"Do more than just protect your iPhone 4 with this case bundle from rooCASE. This 3 in 1 bundle include a snap-on case, screen protector and a Nike+ sensor shoe pouch that can be use on most running shoes. Color: Purple Design: Love Provides protection...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/iphone-4-aerosport-case--pid2203798762/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2203798762\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2203798762\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2203798762\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2203798762\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":96203484168192.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$2.49\",\"integral\":249},\"maxPrice\":{\"value\":\"$79.95\",\"integral\":7995},\"stores\":16},\"id\":2203798762,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Case Reflect For Iphone 3G\",\"description\":\"NCAA iPhone 3G faceplate features the schools primary logo silk screened on the front of the case.\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/case-reflect-for-iphone-3g--pid1114627445/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=1114627445\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=1114627445\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=1114627445\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=1114627445\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":84727583211520.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.69\",\"integral\":69},\"maxPrice\":{\"value\":\"$75.52\",\"integral\":7552},\"stores\":59},\"id\":1114627445,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Infuse Protector Case for iPhone 4 Black\",\"description\":\"Protect and personalize your iPhone 4 with this front and back image design Protector Case. Form-fitting front and back hard plastic covers Protects your cell phone without adding a lot of bulk Smooth glossy finish Snaps on to the front edges, sides...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/infuse-protector-case-for-iphone-4-black--pid2557462717/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2557462717\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2557462717\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2557462717\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2557462717\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":80831066406912.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.59\",\"integral\":59},\"maxPrice\":{\"value\":\"$79.00\",\"integral\":7900},\"stores\":24},\"id\":2557462717,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Dragonfly iPhone 4 Kream Case - Black\",\"description\":\"DF-0030219 - White, Kream Case for iPhone 4 by Dragon-Fly\",\"url\":{\"value\":\"http://www.bizrate.com/dragonfly-iphone-4-kream-case-black--pid2442061740/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2442061740\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2442061740\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2442061740\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2442061740\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":70900229603328.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.05\",\"integral\":105},\"maxPrice\":{\"value\":\"$94.49\",\"integral\":9449},\"stores\":30},\"id\":2442061740,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Apple iPhone 3G/3GS Silicone Case (Black)\",\"description\":\"Snap on Apple iPhone 3G 3GS Synthetic Leather Hardshell Case! Premium Qualtiy Synthetic Leather cover provides style, comfort, and protection to your iPhone 3G & 3GS. It also adds a sophisticated elegance and cool to your fashion. The case allows Quick...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/apple-iphone-3g3gs-silicone-case-black--pid2004746863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2004746863\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2004746863\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2004746863\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2004746863\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":65194915004416.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.01\",\"integral\":1},\"maxPrice\":{\"value\":\"$414.99\",\"integral\":41499},\"stores\":39},\"id\":2004746863,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Otterbox iPhone 4 Defender Case - Black\",\"description\":\"Your iPhone 4 has become a big part of your life. With FaceTime video, retina display, multitasking, HD video recording and more - you've got a lot to lose. You won't find a tougher case than the OtterBox Defender Series for iPhone 4. This three-layer...\",\"manufacturer\":\"Universal\",\"url\":{\"value\":\"http://www.bizrate.com/otterbox-iphone-4-defender-case-black--pid2584611575/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2584611575\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2584611575\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2584611575\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2584611575\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":61515478597632.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$3.28\",\"integral\":328},\"maxPrice\":{\"value\":\"$110.65\",\"integral\":11065},\"stores\":25},\"id\":2584611575,\"categoryId\":8515}],\"includedResults\":10,\"totalResults\":2000}},\n{\"classification\":{\"relevancyScore\":1000,\"searchUrl\":{\"value\":\"http://www.bizrate.com/iphone-cases/index__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"}},\"products\":{\"priceSet\":{\"minPrice\":{\"value\":\"$0.01\",\"integral\":1},\"maxPrice\":{\"value\":\"$4,833.99\",\"integral\":483399}},\"product\":[{\"type\":\"PRODUCT\",\"title\":\"Silicone case for iPhone 3G/ 3GS\",\"description\":\"Elite Horizontal Leather Pouch for Apple iPhone 3G/3Gs - Premium quality horizontal case for your Apple iPhone 3G/3Gs. This pouch is ideal for the style conscious on the go. This great looking case is made from high-quality leather with classic black...\",\"manufacturer\":\"Apple\",\"url\":{\"value\":\"http://www.bizrate.com/silicone-case-for-iphone-3g-3gs--pid1968262863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=1968262863\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=1968262863\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=1968262863\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=1968262863\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":310711221747712.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.56\",\"integral\":156},\"maxPrice\":{\"value\":\"$29.99\",\"integral\":2999},\"stores\":14},\"id\":1968262863,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Nonslip Checkered Silicone Skin Soft Case for iPhone 4 4G\",\"description\":\"Specification:Product Name Silicone Skin Case Model for Apple iPhone 4 Color Black Material Soft Silicone Skin Weight 26g Package 1 x Case for Apple iPhone 4 Description:This is a non-OEM product.Accessory Only, Phone is not included.\",\"manufacturer\":\"H&B\",\"url\":{\"value\":\"http://www.bizrate.com/nonslip-checkered-silicone-skin-soft-case-for-iphone-4-4g--pid2534935499/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2534935499\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2534935499\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2534935499\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2534935499\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":175580930637824.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.45\",\"integral\":45},\"maxPrice\":{\"value\":\"$194.95\",\"integral\":19495},\"stores\":34},\"id\":2534935499,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Plastic Case for iPhone 4 - Black\",\"description\":\"Description:Detachable Windmill Type Matte Hard Plastic Case Cover for iPhone 4 (Black / Magenta)Customised your iPhone with this wonderful Plastic Case which is a accessory for your iPhone 4 which is made of high quality and durable plastic, protect\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/plastic-case-for-iphone-4-black--pid2305624670/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2305624670\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2305624670\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2305624670\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2305624670\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":132488642953216.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.99\",\"integral\":99},\"maxPrice\":{\"value\":\"$303.68\",\"integral\":30368},\"stores\":33},\"id\":2305624670,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Protective Silicone Case for iPhone 4\",\"description\":\"Made of high quality PVC material Protects your iPhone 4 from any scratch and dirt Easy to install and remove, no any tool needed Cut-out design allows user can access all keypad / button and slot without having to remove the case\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/protective-silicone-case-for-iphone-4--pid2120981405/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2120981405\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2120981405\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2120981405\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2120981405\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":108614681362432.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.70\",\"integral\":170},\"maxPrice\":{\"value\":\"$99.99\",\"integral\":9999},\"stores\":11},\"id\":2120981405,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"IphoneÂ® 4 Aerosport Case\",\"description\":\"Do more than just protect your iPhone 4 with this case bundle from rooCASE. This 3 in 1 bundle include a snap-on case, screen protector and a Nike+ sensor shoe pouch that can be use on most running shoes. Color: Purple Design: Love Provides protection...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/iphone-4-aerosport-case--pid2203798762/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2203798762\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2203798762\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2203798762\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2203798762\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":96203484168192.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$2.49\",\"integral\":249},\"maxPrice\":{\"value\":\"$79.95\",\"integral\":7995},\"stores\":16},\"id\":2203798762,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Case Reflect For Iphone 3G\",\"description\":\"NCAA iPhone 3G faceplate features the schools primary logo silk screened on the front of the case.\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/case-reflect-for-iphone-3g--pid1114627445/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=1114627445\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=1114627445\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=1114627445\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=1114627445\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":84727583211520.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.69\",\"integral\":69},\"maxPrice\":{\"value\":\"$75.52\",\"integral\":7552},\"stores\":59},\"id\":1114627445,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Infuse Protector Case for iPhone 4 Black\",\"description\":\"Protect and personalize your iPhone 4 with this front and back image design Protector Case. Form-fitting front and back hard plastic covers Protects your cell phone without adding a lot of bulk Smooth glossy finish Snaps on to the front edges, sides...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/infuse-protector-case-for-iphone-4-black--pid2557462717/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2557462717\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2557462717\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2557462717\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2557462717\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":80831066406912.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.59\",\"integral\":59},\"maxPrice\":{\"value\":\"$79.00\",\"integral\":7900},\"stores\":24},\"id\":2557462717,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Dragonfly iPhone 4 Kream Case - Black\",\"description\":\"DF-0030219 - White, Kream Case for iPhone 4 by Dragon-Fly\",\"url\":{\"value\":\"http://www.bizrate.com/dragonfly-iphone-4-kream-case-black--pid2442061740/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2442061740\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2442061740\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2442061740\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2442061740\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":70900229603328.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.05\",\"integral\":105},\"maxPrice\":{\"value\":\"$94.49\",\"integral\":9449},\"stores\":30},\"id\":2442061740,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Apple iPhone 3G/3GS Silicone Case (Black)\",\"description\":\"Snap on Apple iPhone 3G 3GS Synthetic Leather Hardshell Case! Premium Qualtiy Synthetic Leather cover provides style, comfort, and protection to your iPhone 3G & 3GS. It also adds a sophisticated elegance and cool to your fashion. The case allows Quick...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/apple-iphone-3g3gs-silicone-case-black--pid2004746863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2004746863\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2004746863\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2004746863\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2004746863\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":65194915004416.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.01\",\"integral\":1},\"maxPrice\":{\"value\":\"$414.99\",\"integral\":41499},\"stores\":39},\"id\":2004746863,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Otterbox iPhone 4 Defender Case - Black\",\"description\":\"Your iPhone 4 has become a big part of your life. With FaceTime video, retina display, multitasking, HD video recording and more - you've got a lot to lose. You won't find a tougher case than the OtterBox Defender Series for iPhone 4. This three-layer...\",\"manufacturer\":\"Universal\",\"url\":{\"value\":\"http://www.bizrate.com/otterbox-iphone-4-defender-case-black--pid2584611575/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2584611575\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2584611575\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2584611575\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2584611575\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":61515478597632.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$3.28\",\"integral\":328},\"maxPrice\":{\"value\":\"$110.65\",\"integral\":11065},\"stores\":25},\"id\":2584611575,\"categoryId\":8515}],\"includedResults\":10,\"totalResults\":2000}},\n{\"classification\":{\"relevancyScore\":1000,\"searchUrl\":{\"value\":\"http://www.bizrate.com/iphone-cases/index__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"}},\"products\":{\"priceSet\":{\"minPrice\":{\"value\":\"$0.01\",\"integral\":1},\"maxPrice\":{\"value\":\"$4,833.99\",\"integral\":483399}},\"product\":[{\"type\":\"PRODUCT\",\"title\":\"Silicone case for iPhone 3G/ 3GS\",\"description\":\"Elite Horizontal Leather Pouch for Apple iPhone 3G/3Gs - Premium quality horizontal case for your Apple iPhone 3G/3Gs. This pouch is ideal for the style conscious on the go. This great looking case is made from high-quality leather with classic black...\",\"manufacturer\":\"Apple\",\"url\":{\"value\":\"http://www.bizrate.com/silicone-case-for-iphone-3g-3gs--pid1968262863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=1968262863\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=1968262863\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=1968262863\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=1968262863\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":310711221747712.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.56\",\"integral\":156},\"maxPrice\":{\"value\":\"$29.99\",\"integral\":2999},\"stores\":14},\"id\":1968262863,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Nonslip Checkered Silicone Skin Soft Case for iPhone 4 4G\",\"description\":\"Specification:Product Name Silicone Skin Case Model for Apple iPhone 4 Color Black Material Soft Silicone Skin Weight 26g Package 1 x Case for Apple iPhone 4 Description:This is a non-OEM product.Accessory Only, Phone is not included.\",\"manufacturer\":\"H&B\",\"url\":{\"value\":\"http://www.bizrate.com/nonslip-checkered-silicone-skin-soft-case-for-iphone-4-4g--pid2534935499/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2534935499\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2534935499\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2534935499\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2534935499\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":175580930637824.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.45\",\"integral\":45},\"maxPrice\":{\"value\":\"$194.95\",\"integral\":19495},\"stores\":34},\"id\":2534935499,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Plastic Case for iPhone 4 - Black\",\"description\":\"Description:Detachable Windmill Type Matte Hard Plastic Case Cover for iPhone 4 (Black / Magenta)Customised your iPhone with this wonderful Plastic Case which is a accessory for your iPhone 4 which is made of high quality and durable plastic, protect\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/plastic-case-for-iphone-4-black--pid2305624670/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2305624670\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2305624670\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2305624670\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2305624670\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":132488642953216.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.99\",\"integral\":99},\"maxPrice\":{\"value\":\"$303.68\",\"integral\":30368},\"stores\":33},\"id\":2305624670,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Protective Silicone Case for iPhone 4\",\"description\":\"Made of high quality PVC material Protects your iPhone 4 from any scratch and dirt Easy to install and remove, no any tool needed Cut-out design allows user can access all keypad / button and slot without having to remove the case\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/protective-silicone-case-for-iphone-4--pid2120981405/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2120981405\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2120981405\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2120981405\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2120981405\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":108614681362432.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.70\",\"integral\":170},\"maxPrice\":{\"value\":\"$99.99\",\"integral\":9999},\"stores\":11},\"id\":2120981405,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"IphoneÂ® 4 Aerosport Case\",\"description\":\"Do more than just protect your iPhone 4 with this case bundle from rooCASE. This 3 in 1 bundle include a snap-on case, screen protector and a Nike+ sensor shoe pouch that can be use on most running shoes. Color: Purple Design: Love Provides protection...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/iphone-4-aerosport-case--pid2203798762/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2203798762\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2203798762\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2203798762\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2203798762\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":96203484168192.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$2.49\",\"integral\":249},\"maxPrice\":{\"value\":\"$79.95\",\"integral\":7995},\"stores\":16},\"id\":2203798762,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Case Reflect For Iphone 3G\",\"description\":\"NCAA iPhone 3G faceplate features the schools primary logo silk screened on the front of the case.\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/case-reflect-for-iphone-3g--pid1114627445/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=1114627445\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=1114627445\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=1114627445\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=1114627445\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":84727583211520.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.69\",\"integral\":69},\"maxPrice\":{\"value\":\"$75.52\",\"integral\":7552},\"stores\":59},\"id\":1114627445,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Infuse Protector Case for iPhone 4 Black\",\"description\":\"Protect and personalize your iPhone 4 with this front and back image design Protector Case. Form-fitting front and back hard plastic covers Protects your cell phone without adding a lot of bulk Smooth glossy finish Snaps on to the front edges, sides...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/infuse-protector-case-for-iphone-4-black--pid2557462717/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2557462717\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2557462717\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2557462717\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2557462717\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":80831066406912.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.59\",\"integral\":59},\"maxPrice\":{\"value\":\"$79.00\",\"integral\":7900},\"stores\":24},\"id\":2557462717,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Dragonfly iPhone 4 Kream Case - Black\",\"description\":\"DF-0030219 - White, Kream Case for iPhone 4 by Dragon-Fly\",\"url\":{\"value\":\"http://www.bizrate.com/dragonfly-iphone-4-kream-case-black--pid2442061740/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2442061740\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2442061740\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2442061740\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2442061740\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":70900229603328.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.05\",\"integral\":105},\"maxPrice\":{\"value\":\"$94.49\",\"integral\":9449},\"stores\":30},\"id\":2442061740,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Apple iPhone 3G/3GS Silicone Case (Black)\",\"description\":\"Snap on Apple iPhone 3G 3GS Synthetic Leather Hardshell Case! Premium Qualtiy Synthetic Leather cover provides style, comfort, and protection to your iPhone 3G & 3GS. It also adds a sophisticated elegance and cool to your fashion. The case allows Quick...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/apple-iphone-3g3gs-silicone-case-black--pid2004746863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2004746863\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2004746863\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2004746863\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2004746863\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":65194915004416.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.01\",\"integral\":1},\"maxPrice\":{\"value\":\"$414.99\",\"integral\":41499},\"stores\":39},\"id\":2004746863,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Otterbox iPhone 4 Defender Case - Black\",\"description\":\"Your iPhone 4 has become a big part of your life. With FaceTime video, retina display, multitasking, HD video recording and more - you've got a lot to lose. You won't find a tougher case than the OtterBox Defender Series for iPhone 4. This three-layer...\",\"manufacturer\":\"Universal\",\"url\":{\"value\":\"http://www.bizrate.com/otterbox-iphone-4-defender-case-black--pid2584611575/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2584611575\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2584611575\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2584611575\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2584611575\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":61515478597632.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$3.28\",\"integral\":328},\"maxPrice\":{\"value\":\"$110.65\",\"integral\":11065},\"stores\":25},\"id\":2584611575,\"categoryId\":8515}],\"includedResults\":10,\"totalResults\":2000}}\n]\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/json/test2.json",
    "content": "{ \"foo\": [\"ab\"] }\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/json/test3.json",
    "content": "{\n    \"firstName\": \"John\",\n    \"lastName\" : \"Smith\",\n    \"age\"      : 25,\n    \"address\"  : {\n        \"streetAddress\": \"21 2nd Street\",\n        \"city\"         : \"New York\",\n        \"state\"        : \"NY\",\n        \"postalCode\"   : \"10021\"\n    },\n    \"phoneNumber\": [\n        { \"type\"  : \"home\", \"number\": \"212 555-1234\" },\n        { \"type\"  : \"fax\", \"number\": \"646 555-4567\" }\n    ]\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/json/tst_qtjson.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the test suite of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL21$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia. For licensing terms and\n** conditions see http://qt.digia.com/licensing. For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 or version 3 as published by the Free\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\n** LICENSE.LGPLv3 included in the packaging of this file. Please review the\n** following information to ensure the GNU Lesser General Public License\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights. These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#include <QtTest>\n\n#include \"json/qjsonarray.h\"\n#include \"json/qjsonobject.h\"\n#include \"json/qjsonvalue.h\"\n#include \"json/qjsondocument.h\"\n#include <limits>\n\n#define INVALID_UNICODE \"\\xCE\\xBA\\xE1\"\n#define UNICODE_NON_CHARACTER \"\\xEF\\xBF\\xBF\"\n#define UNICODE_DJE \"\\320\\202\" // Character from the Serbian Cyrillic alphabet\n\nclass tst_QtJson: public QObject\n{\n    Q_OBJECT\npublic:\n    tst_QtJson(QObject *parent = 0);\n\nprivate Q_SLOTS:\n    void initTestCase();\n    void cleanupTestCase();\n    void init();\n    void cleanup();\n\n    void testValueSimple();\n    void testNumbers();\n    void testNumbers_2();\n    void testNumbers_3();\n\n    void testObjectSimple();\n    void testObjectSmallKeys();\n    void testArraySimple();\n    void testValueObject();\n    void testValueArray();\n    void testObjectNested();\n    void testArrayNested();\n    void testArrayNestedEmpty();\n    void testArrayComfortOperators();\n    void testObjectNestedEmpty();\n\n    void testValueRef();\n    void testObjectIteration();\n    void testArrayIteration();\n\n    void testObjectFind();\n\n    void testDocument();\n\n    void nullValues();\n    void nullArrays();\n    void nullObject();\n    void constNullObject();\n\n    void keySorting();\n\n    void undefinedValues();\n\n    void fromVariant();\n    void fromVariantMap();\n    void toVariantMap();\n    void toVariantList();\n\n    void toJson();\n    void toJsonSillyNumericValues();\n    void toJsonLargeNumericValues();\n    void fromJson();\n    void fromJsonErrors();\n    void fromBinary();\n    void toAndFromBinary_data();\n    void toAndFromBinary();\n    void parseNumbers();\n    void parseStrings();\n    void parseDuplicateKeys();\n    void testParser();\n\n    void compactArray();\n    void compactObject();\n\n    void validation();\n\n    void assignToDocument();\n\n    void testDuplicateKeys();\n    void testCompaction();\n    void testDebugStream();\n    void testCompactionError();\n\n    void parseUnicodeEscapes();\n\n    void assignObjects();\n    void assignArrays();\n\n    void testTrailingComma();\n    void testDetachBug();\n    void testJsonValueRefDefault();\n\n    void valueEquals();\n    void objectEquals_data();\n    void objectEquals();\n    void arrayEquals_data();\n    void arrayEquals();\n\n    void bom();\n    void nesting();\n\n    void longStrings();\n\n    void arrayInitializerList();\n    void objectInitializerList();\n\n    void unicodeKeys();\n    void garbageAtEnd();\n};\n\ntst_QtJson::tst_QtJson(QObject *parent) : QObject(parent)\n{\n}\n\nvoid tst_QtJson::initTestCase()\n{\n}\n\nvoid tst_QtJson::cleanupTestCase()\n{\n}\n\nvoid tst_QtJson::init()\n{\n}\n\nvoid tst_QtJson::cleanup()\n{\n}\n\nvoid tst_QtJson::testValueSimple()\n{\n    QJsonObject object;\n    object.insert(\"number\", 999.);\n    QJsonArray array;\n    for (int i = 0; i < 10; ++i)\n        array.append((double)i);\n\n    QJsonValue value(true);\n    QCOMPARE(value.type(), QJsonValue::Bool);\n    QCOMPARE(value.toDouble(), 0.);\n    QCOMPARE(value.toString(), QString());\n    QCOMPARE(value.toBool(), true);\n    QCOMPARE(value.toObject(), QJsonObject());\n    QCOMPARE(value.toArray(), QJsonArray());\n    QCOMPARE(value.toDouble(99.), 99.);\n    QCOMPARE(value.toString(QString(\"test\")), QString(\"test\"));\n    QCOMPARE(value.toObject(object), object);\n    QCOMPARE(value.toArray(array), array);\n\n    value = 999.;\n    QCOMPARE(value.type(), QJsonValue::Double);\n    QCOMPARE(value.toDouble(), 999.);\n    QCOMPARE(value.toString(), QString());\n    QCOMPARE(value.toBool(), false);\n    QCOMPARE(value.toBool(true), true);\n    QCOMPARE(value.toObject(), QJsonObject());\n    QCOMPARE(value.toArray(), QJsonArray());\n\n    value = QLatin1String(\"test\");\n    QCOMPARE(value.toDouble(), 0.);\n    QCOMPARE(value.toString(), QLatin1String(\"test\"));\n    QCOMPARE(value.toBool(), false);\n    QCOMPARE(value.toObject(), QJsonObject());\n    QCOMPARE(value.toArray(), QJsonArray());\n}\n\nvoid tst_QtJson::testNumbers()\n{\n    {\n        int numbers[] = {\n            0,\n            -1,\n            1,\n            (1<<26),\n            (1<<27),\n            (1<<28),\n            -(1<<26),\n            -(1<<27),\n            -(1<<28),\n            (1<<26) - 1,\n            (1<<27) - 1,\n            (1<<28) - 1,\n            -((1<<26) - 1),\n            -((1<<27) - 1),\n            -((1<<28) - 1)\n        };\n        int n = sizeof(numbers)/sizeof(int);\n\n        QJsonArray array;\n        for (int i = 0; i < n; ++i)\n            array.append((double)numbers[i]);\n\n        QByteArray serialized = QJsonDocument(array).toJson();\n        QJsonDocument json = QJsonDocument::fromJson(serialized);\n        QJsonArray array2 = json.array();\n\n        QCOMPARE(array.size(), array2.size());\n        for (int i = 0; i < array.size(); ++i) {\n            QCOMPARE(array.at(i).type(), QJsonValue::Double);\n            QCOMPARE(array.at(i).toDouble(), (double)numbers[i]);\n            QCOMPARE(array2.at(i).type(), QJsonValue::Double);\n            QCOMPARE(array2.at(i).toDouble(), (double)numbers[i]);\n        }\n    }\n\n    {\n        qint64 numbers[] = {\n            0,\n            -1,\n            1,\n            (1ll<<54),\n            (1ll<<55),\n            (1ll<<56),\n            -(1ll<<54),\n            -(1ll<<55),\n            -(1ll<<56),\n            (1ll<<54) - 1,\n            (1ll<<55) - 1,\n            (1ll<<56) - 1,\n            -((1ll<<54) - 1),\n            -((1ll<<55) - 1),\n            -((1ll<<56) - 1)\n        };\n        int n = sizeof(numbers)/sizeof(qint64);\n\n        QJsonArray array;\n        for (int i = 0; i < n; ++i)\n            array.append((double)numbers[i]);\n\n        QByteArray serialized = QJsonDocument(array).toJson();\n        QJsonDocument json = QJsonDocument::fromJson(serialized);\n        QJsonArray array2 = json.array();\n\n        QCOMPARE(array.size(), array2.size());\n        for (int i = 0; i < array.size(); ++i) {\n            QCOMPARE(array.at(i).type(), QJsonValue::Double);\n            QCOMPARE(array.at(i).toDouble(), (double)numbers[i]);\n            QCOMPARE(array2.at(i).type(), QJsonValue::Double);\n            QCOMPARE(array2.at(i).toDouble(), (double)numbers[i]);\n        }\n    }\n\n    {\n        double numbers[] = {\n            0,\n            -1,\n            1,\n            double(1ll<<54),\n            double(1ll<<55),\n            double(1ll<<56),\n            double(-(1ll<<54)),\n            double(-(1ll<<55)),\n            double(-(1ll<<56)),\n            double((1ll<<54) - 1),\n            double((1ll<<55) - 1),\n            double((1ll<<56) - 1),\n            double(-((1ll<<54) - 1)),\n            double(-((1ll<<55) - 1)),\n            double(-((1ll<<56) - 1)),\n            1.1,\n            0.1,\n            -0.1,\n            -1.1,\n            1e200,\n            -1e200\n        };\n        int n = sizeof(numbers)/sizeof(double);\n\n        QJsonArray array;\n        for (int i = 0; i < n; ++i)\n            array.append(numbers[i]);\n\n        QByteArray serialized = QJsonDocument(array).toJson();\n        QJsonDocument json = QJsonDocument::fromJson(serialized);\n        QJsonArray array2 = json.array();\n\n        QCOMPARE(array.size(), array2.size());\n        for (int i = 0; i < array.size(); ++i) {\n            QCOMPARE(array.at(i).type(), QJsonValue::Double);\n            QCOMPARE(array.at(i).toDouble(), numbers[i]);\n            QCOMPARE(array2.at(i).type(), QJsonValue::Double);\n            QCOMPARE(array2.at(i).toDouble(), numbers[i]);\n        }\n    }\n\n}\n\nvoid tst_QtJson::testNumbers_2()\n{\n    // test cases from TC39 test suite for ECMAScript\n    // http://hg.ecmascript.org/tests/test262/file/d067d2f0ca30/test/suite/ch08/8.5/8.5.1.js\n\n    // Fill an array with 2 to the power of (0 ... -1075)\n    double value = 1;\n    double floatValues[1076], floatValues_1[1076];\n    QJsonObject jObject;\n    for (int power = 0; power <= 1075; power++) {\n        floatValues[power] = value;\n        jObject.insert(QString::number(power), QJsonValue(floatValues[power]));\n        // Use basic math operations for testing, which are required to support 'gradual underflow' rather\n        // than Math.pow etc..., which are defined as 'implementation dependent'.\n        value = value * 0.5;\n    }\n\n    QJsonDocument jDocument1(jObject);\n    QByteArray ba(jDocument1.toJson());\n\n    QJsonDocument jDocument2(QJsonDocument::fromJson(ba));\n    for (int power = 0; power <= 1075; power++) {\n        floatValues_1[power] = jDocument2.object().value(QString::number(power)).toDouble();\n#ifdef Q_OS_QNX\n        if (power >= 970)\n            QEXPECT_FAIL(\"\", \"See QTBUG-37066\", Abort);\n#endif\n        QVERIFY2(floatValues[power] == floatValues_1[power], QString(\"floatValues[%1] != floatValues_1[%1]\").arg(power).toLatin1());\n    }\n\n    // The last value is below min denorm and should round to 0, everything else should contain a value\n    QVERIFY2(floatValues_1[1075] == 0, \"Value after min denorm should round to 0\");\n\n    // Validate the last actual value is min denorm\n    QVERIFY2(floatValues_1[1074] == 4.9406564584124654417656879286822e-324, QString(\"Min denorm value is incorrect: %1\").arg(floatValues_1[1074]).toLatin1());\n\n    // Validate that every value is half the value before it up to 1\n    for (int index = 1074; index > 0; index--) {\n        QVERIFY2(floatValues_1[index] != 0, QString(\"2**- %1 should not be 0\").arg(index).toLatin1());\n\n        QVERIFY2(floatValues_1[index - 1] == (floatValues_1[index] * 2), QString(\"Value should be double adjacent value at index %1\").arg(index).toLatin1());\n    }\n}\n\nvoid tst_QtJson::testNumbers_3()\n{\n    // test case from QTBUG-31926\n    double d1 = 1.123451234512345;\n    double d2 = 1.123451234512346;\n\n    QJsonObject jObject;\n    jObject.insert(\"d1\", QJsonValue(d1));\n    jObject.insert(\"d2\", QJsonValue(d2));\n    QJsonDocument jDocument1(jObject);\n    QByteArray ba(jDocument1.toJson());\n\n    QJsonDocument jDocument2(QJsonDocument::fromJson(ba));\n\n    double d1_1(jDocument2.object().value(\"d1\").toDouble());\n    double d2_1(jDocument2.object().value(\"d2\").toDouble());\n    QVERIFY(d1_1 != d2_1);\n}\n\nvoid tst_QtJson::testObjectSimple()\n{\n    QJsonObject object;\n    object.insert(\"number\", 999.);\n    QCOMPARE(object.value(\"number\").type(), QJsonValue::Double);\n    QCOMPARE(object.value(\"number\").toDouble(), 999.);\n    object.insert(\"string\", QString::fromLatin1(\"test\"));\n    QCOMPARE(object.value(\"string\").type(), QJsonValue::String);\n    QCOMPARE(object.value(\"string\").toString(), QString(\"test\"));\n    object.insert(\"boolean\", true);\n    QCOMPARE(object.value(\"boolean\").toBool(), true);\n\n    QStringList keys = object.keys();\n    QVERIFY2(keys.contains(\"number\"), \"key number not found\");\n    QVERIFY2(keys.contains(\"string\"), \"key string not found\");\n    QVERIFY2(keys.contains(\"boolean\"), \"key boolean not found\");\n\n    // if we put a JsonValue into the JsonObject and retrieve\n    // it, it should be identical.\n    QJsonValue value(QLatin1String(\"foo\"));\n    object.insert(\"value\", value);\n    QCOMPARE(object.value(\"value\"), value);\n\n    int size = object.size();\n    object.remove(\"boolean\");\n    QCOMPARE(object.size(), size - 1);\n    QVERIFY2(!object.contains(\"boolean\"), \"key boolean should have been removed\");\n\n    QJsonValue taken = object.take(\"value\");\n    QCOMPARE(taken, value);\n    QVERIFY2(!object.contains(\"value\"), \"key value should have been removed\");\n\n    QString before = object.value(\"string\").toString();\n    object.insert(\"string\", QString::fromLatin1(\"foo\"));\n    QVERIFY2(object.value(\"string\").toString() != before, \"value should have been updated\");\n\n    size = object.size();\n    QJsonObject subobject;\n    subobject.insert(\"number\", 42);\n    subobject.insert(QLatin1String(\"string\"), QLatin1String(\"foobar\"));\n    object.insert(\"subobject\", subobject);\n    QCOMPARE(object.size(), size+1);\n    QJsonValue subvalue = object.take(QLatin1String(\"subobject\"));\n    QCOMPARE(object.size(), size);\n    QCOMPARE(subvalue.toObject(), subobject);\n    // make object detach by modifying it many times\n    for (int i = 0; i < 64; ++i)\n        object.insert(QLatin1String(\"string\"), QLatin1String(\"bar\"));\n    QCOMPARE(object.size(), size);\n    QCOMPARE(subvalue.toObject(), subobject);\n}\n\nvoid tst_QtJson::testObjectSmallKeys()\n{\n    QJsonObject data1;\n    data1.insert(QLatin1String(\"1\"), 123);\n    QVERIFY(data1.contains(QLatin1String(\"1\")));\n    QCOMPARE(data1.value(QLatin1String(\"1\")).toDouble(), (double)123);\n    data1.insert(QLatin1String(\"12\"), 133);\n    QCOMPARE(data1.value(QLatin1String(\"12\")).toDouble(), (double)133);\n    QVERIFY(data1.contains(QLatin1String(\"12\")));\n    data1.insert(QLatin1String(\"123\"), 323);\n    QCOMPARE(data1.value(QLatin1String(\"12\")).toDouble(), (double)133);\n    QVERIFY(data1.contains(QLatin1String(\"123\")));\n    QCOMPARE(data1.value(QLatin1String(\"123\")).type(), QJsonValue::Double);\n    QCOMPARE(data1.value(QLatin1String(\"123\")).toDouble(), (double)323);\n}\n\nvoid tst_QtJson::testArraySimple()\n{\n    QJsonArray array;\n    array.append(999.);\n    array.append(QString::fromLatin1(\"test\"));\n    array.append(true);\n\n    QJsonValue val = array.at(0);\n    QCOMPARE(array.at(0).toDouble(), 999.);\n    QCOMPARE(array.at(1).toString(), QString(\"test\"));\n    QCOMPARE(array.at(2).toBool(), true);\n    QCOMPARE(array.size(), 3);\n\n    // if we put a JsonValue into the JsonArray and retrieve\n    // it, it should be identical.\n    QJsonValue value(QLatin1String(\"foo\"));\n    array.append(value);\n    QCOMPARE(array.at(3), value);\n\n    int size = array.size();\n    array.removeAt(2);\n    --size;\n    QCOMPARE(array.size(), size);\n\n    QJsonValue taken = array.takeAt(0);\n    --size;\n    QCOMPARE(taken.toDouble(), 999.);\n    QCOMPARE(array.size(), size);\n\n    // check whether null values work\n    array.append(QJsonValue());\n    ++size;\n    QCOMPARE(array.size(), size);\n    QCOMPARE(array.last().type(), QJsonValue::Null);\n    QCOMPARE(array.last(), QJsonValue());\n\n    QCOMPARE(array.first().type(), QJsonValue::String);\n    QCOMPARE(array.first(), QJsonValue(QLatin1String(\"test\")));\n\n    array.prepend(false);\n    QCOMPARE(array.first().type(), QJsonValue::Bool);\n    QCOMPARE(array.first(), QJsonValue(false));\n\n    QCOMPARE(array.at(-1), QJsonValue(QJsonValue::Undefined));\n    QCOMPARE(array.at(array.size()), QJsonValue(QJsonValue::Undefined));\n\n    array.replace(0, -555.);\n    QCOMPARE(array.first().type(), QJsonValue::Double);\n    QCOMPARE(array.first(), QJsonValue(-555.));\n    QCOMPARE(array.at(1).type(), QJsonValue::String);\n    QCOMPARE(array.at(1), QJsonValue(QLatin1String(\"test\")));\n}\n\nvoid tst_QtJson::testValueObject()\n{\n    QJsonObject object;\n    object.insert(\"number\", 999.);\n    object.insert(\"string\", QLatin1String(\"test\"));\n    object.insert(\"boolean\", true);\n\n    QJsonValue value(object);\n\n    // if we don't modify the original JsonObject, toObject()\n    // on the JsonValue should return the same object (non-detached).\n    QCOMPARE(value.toObject(), object);\n\n    // if we modify the original object, it should detach\n    object.insert(\"test\", QJsonValue(QLatin1String(\"test\")));\n    QVERIFY2(value.toObject() != object, \"object should have detached\");\n}\n\nvoid tst_QtJson::testValueArray()\n{\n    QJsonArray array;\n    array.append(999.);\n    array.append(QLatin1String(\"test\"));\n    array.append(true);\n\n    QJsonValue value(array);\n\n    // if we don't modify the original JsonArray, toArray()\n    // on the JsonValue should return the same object (non-detached).\n    QCOMPARE(value.toArray(), array);\n\n    // if we modify the original array, it should detach\n    array.append(QLatin1String(\"test\"));\n    QVERIFY2(value.toArray() != array, \"array should have detached\");\n}\n\nvoid tst_QtJson::testObjectNested()\n{\n    QJsonObject inner, outer;\n    inner.insert(\"number\", 999.);\n    outer.insert(\"nested\", inner);\n\n    // if we don't modify the original JsonObject, value()\n    // should return the same object (non-detached).\n    QJsonObject value = outer.value(\"nested\").toObject();\n    QCOMPARE(value, inner);\n    QCOMPARE(value.value(\"number\").toDouble(), 999.);\n\n    // if we modify the original object, it should detach and not\n    // affect the nested object\n    inner.insert(\"number\", 555.);\n    value = outer.value(\"nested\").toObject();\n    QVERIFY2(inner.value(\"number\").toDouble() != value.value(\"number\").toDouble(),\n             \"object should have detached\");\n\n    // array in object\n    QJsonArray array;\n    array.append(123.);\n    array.append(456.);\n    outer.insert(\"array\", array);\n    QCOMPARE(outer.value(\"array\").toArray(), array);\n    QCOMPARE(outer.value(\"array\").toArray().at(1).toDouble(), 456.);\n\n    // two deep objects\n    QJsonObject twoDeep;\n    twoDeep.insert(\"boolean\", true);\n    inner.insert(\"nested\", twoDeep);\n    outer.insert(\"nested\", inner);\n    QCOMPARE(outer.value(\"nested\").toObject().value(\"nested\").toObject(), twoDeep);\n    QCOMPARE(outer.value(\"nested\").toObject().value(\"nested\").toObject().value(\"boolean\").toBool(),\n             true);\n}\n\nvoid tst_QtJson::testArrayNested()\n{\n    QJsonArray inner, outer;\n    inner.append(999.);\n    outer.append(inner);\n\n    // if we don't modify the original JsonArray, value()\n    // should return the same array (non-detached).\n    QJsonArray value = outer.at(0).toArray();\n    QCOMPARE(value, inner);\n    QCOMPARE(value.at(0).toDouble(), 999.);\n\n    // if we modify the original array, it should detach and not\n    // affect the nested array\n    inner.append(555.);\n    value = outer.at(0).toArray();\n    QVERIFY2(inner.size() != value.size(), \"array should have detached\");\n\n    // objects in arrays\n    QJsonObject object;\n    object.insert(\"boolean\", true);\n    outer.append(object);\n    QCOMPARE(outer.last().toObject(), object);\n    QCOMPARE(outer.last().toObject().value(\"boolean\").toBool(), true);\n\n    // two deep arrays\n    QJsonArray twoDeep;\n    twoDeep.append(QJsonValue(QString::fromLatin1(\"nested\")));\n    inner.append(twoDeep);\n    outer.append(inner);\n    QCOMPARE(outer.last().toArray().last().toArray(), twoDeep);\n    QCOMPARE(outer.last().toArray().last().toArray().at(0).toString(), QString(\"nested\"));\n}\n\nvoid tst_QtJson::testArrayNestedEmpty()\n{\n    QJsonObject object;\n    QJsonArray inner;\n    object.insert(\"inner\", inner);\n    QJsonValue val = object.value(\"inner\");\n    QJsonArray value = object.value(\"inner\").toArray();\n    QCOMPARE(value.size(), 0);\n    QCOMPARE(value, inner);\n    QCOMPARE(value.size(), 0);\n    object.insert(\"count\", 0.);\n    QCOMPARE(object.value(\"inner\").toArray().size(), 0);\n    QVERIFY(object.value(\"inner\").toArray().isEmpty());\n    QJsonDocument(object).toBinaryData();\n    QCOMPARE(object.value(\"inner\").toArray().size(), 0);\n}\n\nvoid tst_QtJson::testObjectNestedEmpty()\n{\n    QJsonObject object;\n    QJsonObject inner;\n    QJsonObject inner2;\n    object.insert(\"inner\", inner);\n    object.insert(\"inner2\", inner2);\n    QJsonObject value = object.value(\"inner\").toObject();\n    QCOMPARE(value.size(), 0);\n    QCOMPARE(value, inner);\n    QCOMPARE(value.size(), 0);\n    object.insert(\"count\", 0.);\n    QCOMPARE(object.value(\"inner\").toObject().size(), 0);\n    QCOMPARE(object.value(\"inner\").type(), QJsonValue::Object);\n    QJsonDocument(object).toBinaryData();\n    QVERIFY(object.value(\"inner\").toObject().isEmpty());\n    QVERIFY(object.value(\"inner2\").toObject().isEmpty());\n    QJsonDocument doc = QJsonDocument::fromBinaryData(QJsonDocument(object).toBinaryData());\n    QVERIFY(!doc.isNull());\n    QJsonObject reconstituted(doc.object());\n    QCOMPARE(reconstituted.value(\"inner\").toObject().size(), 0);\n    QCOMPARE(reconstituted.value(\"inner\").type(), QJsonValue::Object);\n    QCOMPARE(reconstituted.value(\"inner2\").type(), QJsonValue::Object);\n}\n\nvoid tst_QtJson::testArrayComfortOperators()\n{\n    QJsonArray first;\n    first.append(123.);\n    first.append(QLatin1String(\"foo\"));\n\n    QJsonArray second = QJsonArray() << 123. << QLatin1String(\"foo\");\n    QCOMPARE(first, second);\n\n    first = first + QLatin1String(\"bar\");\n    second += QLatin1String(\"bar\");\n    QCOMPARE(first, second);\n}\n\nvoid tst_QtJson::testValueRef()\n{\n    QJsonArray array;\n    array.append(1.);\n    array.append(2.);\n    array.append(3.);\n    array.append(4);\n    array.append(4.1);\n    array[1] = false;\n\n    QCOMPARE(array.size(), 5);\n    QCOMPARE(array.at(0).toDouble(), 1.);\n    QCOMPARE(array.at(2).toDouble(), 3.);\n#if QT_VERSION >= 0x050200\n    QCOMPARE(array.at(3).toInt(), 4);\n    QCOMPARE(array.at(4).toInt(), 0);\n#endif\n    QCOMPARE(array.at(1).type(), QJsonValue::Bool);\n    QCOMPARE(array.at(1).toBool(), false);\n\n    QJsonObject object;\n    object[QLatin1String(\"key\")] = true;\n    QCOMPARE(object.size(), 1);\n    object.insert(QLatin1String(\"null\"), QJsonValue());\n    QCOMPARE(object.value(QLatin1String(\"null\")), QJsonValue());\n    object[QLatin1String(\"null\")] = 100.;\n    QCOMPARE(object.value(QLatin1String(\"null\")).type(), QJsonValue::Double);\n    QJsonValue val = object[QLatin1String(\"null\")];\n    QCOMPARE(val.toDouble(), 100.);\n    QCOMPARE(object.size(), 2);\n\n    array[1] = array[2] = object[QLatin1String(\"key\")] = 42;\n    QCOMPARE(array[1], array[2]);\n    QCOMPARE(array[2], object[QLatin1String(\"key\")]);\n    QCOMPARE(object.value(QLatin1String(\"key\")), QJsonValue(42));\n}\n\nvoid tst_QtJson::testObjectIteration()\n{\n    QJsonObject object;\n\n    for (QJsonObject::iterator it = object.begin(); it != object.end(); ++it)\n        QVERIFY(false);\n\n    const QString property = \"kkk\";\n    object.insert(property, 11);\n    object.take(property);\n    for (QJsonObject::iterator it = object.begin(); it != object.end(); ++it)\n        QVERIFY(false);\n\n    for (int i = 0; i < 10; ++i)\n        object[QString::number(i)] = (double)i;\n\n    QCOMPARE(object.size(), 10);\n\n    QCOMPARE(object.begin()->toDouble(), object.constBegin()->toDouble());\n\n    for (QJsonObject::iterator it = object.begin(); it != object.end(); ++it) {\n        QJsonValue value = it.value();\n        QCOMPARE((double)it.key().toInt(), value.toDouble());\n    }\n\n    {\n        QJsonObject object2 = object;\n        QVERIFY(object == object2);\n\n        QJsonValue val = *object2.begin();\n        object2.erase(object2.begin());\n        QCOMPARE(object.size(), 10);\n        QCOMPARE(object2.size(), 9);\n\n        for (QJsonObject::const_iterator it = object2.constBegin(); it != object2.constEnd(); ++it) {\n            QJsonValue value = it.value();\n            QVERIFY(it.value() != val);\n            QCOMPARE((double)it.key().toInt(), value.toDouble());\n        }\n    }\n\n    {\n        QJsonObject object2 = object;\n        QVERIFY(object == object2);\n\n        QJsonObject::iterator it = object2.find(QString::number(5));\n        object2.erase(it);\n        QCOMPARE(object.size(), 10);\n        QCOMPARE(object2.size(), 9);\n    }\n\n    {\n        QJsonObject::Iterator it = object.begin();\n        it += 5;\n        QCOMPARE(QJsonValue(it.value()).toDouble(), 5.);\n        it -= 3;\n        QCOMPARE(QJsonValue(it.value()).toDouble(), 2.);\n        QJsonObject::Iterator it2 = it + 5;\n        QCOMPARE(QJsonValue(it2.value()).toDouble(), 7.);\n        it2 = it - 1;\n        QCOMPARE(QJsonValue(it2.value()).toDouble(), 1.);\n    }\n\n    {\n        QJsonObject::ConstIterator it = object.constBegin();\n        it += 5;\n        QCOMPARE(QJsonValue(it.value()).toDouble(), 5.);\n        it -= 3;\n        QCOMPARE(QJsonValue(it.value()).toDouble(), 2.);\n        QJsonObject::ConstIterator it2 = it + 5;\n        QCOMPARE(QJsonValue(it2.value()).toDouble(), 7.);\n        it2 = it - 1;\n        QCOMPARE(QJsonValue(it2.value()).toDouble(), 1.);\n    }\n\n    QJsonObject::Iterator it = object.begin();\n    while (!object.isEmpty())\n        it = object.erase(it);\n    QCOMPARE(object.size() , 0);\n    QVERIFY(it == object.end());\n}\n\nvoid tst_QtJson::testArrayIteration()\n{\n    QJsonArray array;\n    for (int i = 0; i < 10; ++i)\n        array.append(i);\n\n    QCOMPARE(array.size(), 10);\n\n    int i = 0;\n    for (QJsonArray::iterator it = array.begin(); it != array.end(); ++it, ++i) {\n        QJsonValue value = (*it);\n        QCOMPARE((double)i, value.toDouble());\n    }\n\n    QCOMPARE(array.begin()->toDouble(), array.constBegin()->toDouble());\n\n    {\n        QJsonArray array2 = array;\n        QVERIFY(array == array2);\n\n        QJsonValue val = *array2.begin();\n        array2.erase(array2.begin());\n        QCOMPARE(array.size(), 10);\n        QCOMPARE(array2.size(), 9);\n\n        i = 1;\n        for (QJsonArray::const_iterator it = array2.constBegin(); it != array2.constEnd(); ++it, ++i) {\n            QJsonValue value = (*it);\n            QCOMPARE((double)i, value.toDouble());\n        }\n    }\n\n    {\n        QJsonArray::Iterator it = array.begin();\n        it += 5;\n        QCOMPARE(QJsonValue((*it)).toDouble(), 5.);\n        it -= 3;\n        QCOMPARE(QJsonValue((*it)).toDouble(), 2.);\n        QJsonArray::Iterator it2 = it + 5;\n        QCOMPARE(QJsonValue(*it2).toDouble(), 7.);\n        it2 = it - 1;\n        QCOMPARE(QJsonValue(*it2).toDouble(), 1.);\n    }\n\n    {\n        QJsonArray::ConstIterator it = array.constBegin();\n        it += 5;\n        QCOMPARE(QJsonValue((*it)).toDouble(), 5.);\n        it -= 3;\n        QCOMPARE(QJsonValue((*it)).toDouble(), 2.);\n        QJsonArray::ConstIterator it2 = it + 5;\n        QCOMPARE(QJsonValue(*it2).toDouble(), 7.);\n        it2 = it - 1;\n        QCOMPARE(QJsonValue(*it2).toDouble(), 1.);\n    }\n\n    QJsonArray::Iterator it = array.begin();\n    while (!array.isEmpty())\n        it = array.erase(it);\n    QCOMPARE(array.size() , 0);\n    QVERIFY(it == array.end());\n}\n\nvoid tst_QtJson::testObjectFind()\n{\n    QJsonObject object;\n    for (int i = 0; i < 10; ++i)\n        object[QString::number(i)] = i;\n\n    QCOMPARE(object.size(), 10);\n\n    QJsonObject::iterator it = object.find(QLatin1String(\"1\"));\n    QCOMPARE((*it).toDouble(), 1.);\n    it = object.find(QLatin1String(\"11\"));\n    QVERIFY((*it).type() == QJsonValue::Undefined);\n    QVERIFY(it == object.end());\n\n    QJsonObject::const_iterator cit = object.constFind(QLatin1String(\"1\"));\n    QCOMPARE((*cit).toDouble(), 1.);\n    cit = object.constFind(QLatin1String(\"11\"));\n    QVERIFY((*it).type() == QJsonValue::Undefined);\n    QVERIFY(it == object.end());\n}\n\nvoid tst_QtJson::testDocument()\n{\n    QJsonDocument doc;\n    QCOMPARE(doc.isEmpty(), true);\n    QCOMPARE(doc.isArray(), false);\n    QCOMPARE(doc.isObject(), false);\n\n    QJsonObject object;\n    doc.setObject(object);\n    QCOMPARE(doc.isEmpty(), false);\n    QCOMPARE(doc.isArray(), false);\n    QCOMPARE(doc.isObject(), true);\n\n    object.insert(QLatin1String(\"Key\"), QLatin1String(\"Value\"));\n    doc.setObject(object);\n    QCOMPARE(doc.isEmpty(), false);\n    QCOMPARE(doc.isArray(), false);\n    QCOMPARE(doc.isObject(), true);\n    QVERIFY(doc.object() == object);\n    QVERIFY(doc.array() == QJsonArray());\n\n    doc = QJsonDocument();\n    QCOMPARE(doc.isEmpty(), true);\n    QCOMPARE(doc.isArray(), false);\n    QCOMPARE(doc.isObject(), false);\n\n    QJsonArray array;\n    doc.setArray(array);\n    QCOMPARE(doc.isEmpty(), false);\n    QCOMPARE(doc.isArray(), true);\n    QCOMPARE(doc.isObject(), false);\n\n    array.append(QLatin1String(\"Value\"));\n    doc.setArray(array);\n    QCOMPARE(doc.isEmpty(), false);\n    QCOMPARE(doc.isArray(), true);\n    QCOMPARE(doc.isObject(), false);\n    QVERIFY(doc.array() == array);\n    QVERIFY(doc.object() == QJsonObject());\n\n    QJsonObject outer;\n    outer.insert(QLatin1String(\"outerKey\"), 22);\n    QJsonObject inner;\n    inner.insert(QLatin1String(\"innerKey\"), 42);\n    outer.insert(QLatin1String(\"innter\"), inner);\n    QJsonArray innerArray;\n    innerArray.append(23);\n    outer.insert(QLatin1String(\"innterArray\"), innerArray);\n\n    QJsonDocument doc2(outer.value(QLatin1String(\"innter\")).toObject());\n    QVERIFY(doc2.object().contains(QLatin1String(\"innerKey\")));\n    QCOMPARE(doc2.object().value(QLatin1String(\"innerKey\")), QJsonValue(42));\n\n    QJsonDocument doc3;\n    doc3.setObject(outer.value(QLatin1String(\"innter\")).toObject());\n    QCOMPARE(doc3.isArray(), false);\n    QCOMPARE(doc3.isObject(), true);\n    QVERIFY(doc3.object().contains(QLatin1String(\"innerKey\")));\n    QCOMPARE(doc3.object().value(QLatin1String(\"innerKey\")), QJsonValue(42));\n\n    QJsonDocument doc4(outer.value(QLatin1String(\"innterArray\")).toArray());\n    QCOMPARE(doc4.isArray(), true);\n    QCOMPARE(doc4.isObject(), false);\n    QCOMPARE(doc4.array().size(), 1);\n    QCOMPARE(doc4.array().at(0), QJsonValue(23));\n\n    QJsonDocument doc5;\n    doc5.setArray(outer.value(QLatin1String(\"innterArray\")).toArray());\n    QCOMPARE(doc5.isArray(), true);\n    QCOMPARE(doc5.isObject(), false);\n    QCOMPARE(doc5.array().size(), 1);\n    QCOMPARE(doc5.array().at(0), QJsonValue(23));\n}\n\nvoid tst_QtJson::nullValues()\n{\n    QJsonArray array;\n    array.append(QJsonValue());\n\n    QCOMPARE(array.size(), 1);\n    QCOMPARE(array.at(0), QJsonValue());\n\n    QJsonObject object;\n    object.insert(QString(\"key\"), QJsonValue());\n    QCOMPARE(object.contains(\"key\"), true);\n    QCOMPARE(object.size(), 1);\n    QCOMPARE(object.value(\"key\"), QJsonValue());\n}\n\nvoid tst_QtJson::nullArrays()\n{\n    QJsonArray nullArray;\n    QJsonArray nonNull;\n    nonNull.append(QLatin1String(\"bar\"));\n\n    QCOMPARE(nullArray, QJsonArray());\n    QVERIFY(nullArray != nonNull);\n    QVERIFY(nonNull != nullArray);\n\n    QCOMPARE(nullArray.size(), 0);\n    QCOMPARE(nullArray.takeAt(0), QJsonValue(QJsonValue::Undefined));\n    QCOMPARE(nullArray.first(), QJsonValue(QJsonValue::Undefined));\n    QCOMPARE(nullArray.last(), QJsonValue(QJsonValue::Undefined));\n    nullArray.removeAt(0);\n    nullArray.removeAt(-1);\n\n    nullArray.append(QString(\"bar\"));\n    nullArray.removeAt(0);\n\n    QCOMPARE(nullArray.size(), 0);\n    QCOMPARE(nullArray.takeAt(0), QJsonValue(QJsonValue::Undefined));\n    QCOMPARE(nullArray.first(), QJsonValue(QJsonValue::Undefined));\n    QCOMPARE(nullArray.last(), QJsonValue(QJsonValue::Undefined));\n    nullArray.removeAt(0);\n    nullArray.removeAt(-1);\n}\n\nvoid tst_QtJson::nullObject()\n{\n    QJsonObject nullObject;\n    QJsonObject nonNull;\n    nonNull.insert(QLatin1String(\"foo\"), QLatin1String(\"bar\"));\n\n    QCOMPARE(nullObject, QJsonObject());\n    QVERIFY(nullObject != nonNull);\n    QVERIFY(nonNull != nullObject);\n\n    QCOMPARE(nullObject.size(), 0);\n    QCOMPARE(nullObject.keys(), QStringList());\n    nullObject.remove(\"foo\");\n    QCOMPARE(nullObject, QJsonObject());\n    QCOMPARE(nullObject.take(\"foo\"), QJsonValue(QJsonValue::Undefined));\n    QCOMPARE(nullObject.contains(\"foo\"), false);\n\n    nullObject.insert(\"foo\", QString(\"bar\"));\n    nullObject.remove(\"foo\");\n\n    QCOMPARE(nullObject.size(), 0);\n    QCOMPARE(nullObject.keys(), QStringList());\n    nullObject.remove(\"foo\");\n    QCOMPARE(nullObject, QJsonObject());\n    QCOMPARE(nullObject.take(\"foo\"), QJsonValue(QJsonValue::Undefined));\n    QCOMPARE(nullObject.contains(\"foo\"), false);\n}\n\nvoid tst_QtJson::constNullObject()\n{\n    const QJsonObject nullObject;\n    QJsonObject nonNull;\n    nonNull.insert(QLatin1String(\"foo\"), QLatin1String(\"bar\"));\n\n    QCOMPARE(nullObject, QJsonObject());\n    QVERIFY(nullObject != nonNull);\n    QVERIFY(nonNull != nullObject);\n\n    QCOMPARE(nullObject.size(), 0);\n    QCOMPARE(nullObject.keys(), QStringList());\n    QCOMPARE(nullObject, QJsonObject());\n    QCOMPARE(nullObject.contains(\"foo\"), false);\n    QCOMPARE(nullObject[\"foo\"], QJsonValue(QJsonValue::Undefined));\n}\n\nvoid tst_QtJson::keySorting()\n{\n    const char *json = \"{ \\\"B\\\": true, \\\"A\\\": false }\";\n    QJsonDocument doc = QJsonDocument::fromJson(json);\n\n    QCOMPARE(doc.isObject(), true);\n\n    QJsonObject o = doc.object();\n    QCOMPARE(o.size(), 2);\n    QJsonObject::const_iterator it = o.constBegin();\n    QCOMPARE(it.key(), QLatin1String(\"A\"));\n    ++it;\n    QCOMPARE(it.key(), QLatin1String(\"B\"));\n}\n\nvoid tst_QtJson::undefinedValues()\n{\n    QJsonObject object;\n    object.insert(\"Key\", QJsonValue(QJsonValue::Undefined));\n    QCOMPARE(object.size(), 0);\n\n    object.insert(\"Key\", QLatin1String(\"Value\"));\n    QCOMPARE(object.size(), 1);\n    QCOMPARE(object.value(\"Key\").type(), QJsonValue::String);\n    QCOMPARE(object.value(\"foo\").type(), QJsonValue::Undefined);\n    object.insert(\"Key\", QJsonValue(QJsonValue::Undefined));\n    QCOMPARE(object.size(), 0);\n    QCOMPARE(object.value(\"Key\").type(), QJsonValue::Undefined);\n\n    QJsonArray array;\n    array.append(QJsonValue(QJsonValue::Undefined));\n    QCOMPARE(array.size(), 1);\n    QCOMPARE(array.at(0).type(), QJsonValue::Null);\n\n    QCOMPARE(array.at(1).type(), QJsonValue::Undefined);\n    QCOMPARE(array.at(-1).type(), QJsonValue::Undefined);\n}\n\nvoid tst_QtJson::fromVariant()\n{\n    bool boolValue = true;\n    int intValue = -1;\n    uint uintValue = 1;\n    long long longlongValue = -2;\n    unsigned long long ulonglongValue = 2;\n    float floatValue = 3.3f;\n    double doubleValue = 4.4;\n    QString stringValue(\"str\");\n\n    QStringList stringList;\n    stringList.append(stringValue);\n    stringList.append(\"str2\");\n    QJsonArray jsonArray_string;\n    jsonArray_string.append(stringValue);\n    jsonArray_string.append(\"str2\");\n\n    QVariantList variantList;\n    variantList.append(boolValue);\n    variantList.append(floatValue);\n    variantList.append(doubleValue);\n    variantList.append(stringValue);\n    variantList.append(stringList);\n    variantList.append(QVariant());\n    QJsonArray jsonArray_variant;\n    jsonArray_variant.append(boolValue);\n    jsonArray_variant.append(floatValue);\n    jsonArray_variant.append(doubleValue);\n    jsonArray_variant.append(stringValue);\n    jsonArray_variant.append(jsonArray_string);\n    jsonArray_variant.append(QJsonValue());\n\n    QVariantMap variantMap;\n    variantMap[\"bool\"] = boolValue;\n    variantMap[\"float\"] = floatValue;\n    variantMap[\"string\"] = stringValue;\n    variantMap[\"array\"] = variantList;\n    QJsonObject jsonObject;\n    jsonObject[\"bool\"] = boolValue;\n    jsonObject[\"float\"] = floatValue;\n    jsonObject[\"string\"] = stringValue;\n    jsonObject[\"array\"] = jsonArray_variant;\n\n    QCOMPARE(QJsonValue::fromVariant(QVariant(boolValue)), QJsonValue(boolValue));\n    QCOMPARE(QJsonValue::fromVariant(QVariant(intValue)), QJsonValue(intValue));\n    QCOMPARE(QJsonValue::fromVariant(QVariant(uintValue)), QJsonValue(static_cast<double>(uintValue)));\n    QCOMPARE(QJsonValue::fromVariant(QVariant(longlongValue)), QJsonValue(longlongValue));\n    QCOMPARE(QJsonValue::fromVariant(QVariant(ulonglongValue)), QJsonValue(static_cast<double>(ulonglongValue)));\n    QCOMPARE(QJsonValue::fromVariant(QVariant(floatValue)), QJsonValue(static_cast<double>(floatValue)));\n    QCOMPARE(QJsonValue::fromVariant(QVariant(doubleValue)), QJsonValue(doubleValue));\n    QCOMPARE(QJsonValue::fromVariant(QVariant(stringValue)), QJsonValue(stringValue));\n    QCOMPARE(QJsonValue::fromVariant(QVariant(stringList)), QJsonValue(jsonArray_string));\n    QCOMPARE(QJsonValue::fromVariant(QVariant(variantList)), QJsonValue(jsonArray_variant));\n    QCOMPARE(QJsonValue::fromVariant(QVariant(variantMap)), QJsonValue(jsonObject));\n}\n\nvoid tst_QtJson::fromVariantMap()\n{\n    QVariantMap map;\n    map.insert(QLatin1String(\"key1\"), QLatin1String(\"value1\"));\n    map.insert(QLatin1String(\"key2\"), QLatin1String(\"value2\"));\n    QJsonObject object = QJsonObject::fromVariantMap(map);\n    QCOMPARE(object.size(), 2);\n    QCOMPARE(object.value(QLatin1String(\"key1\")), QJsonValue(QLatin1String(\"value1\")));\n    QCOMPARE(object.value(QLatin1String(\"key2\")), QJsonValue(QLatin1String(\"value2\")));\n\n    QVariantList list;\n    list.append(true);\n    list.append(QVariant());\n    list.append(999.);\n    list.append(QLatin1String(\"foo\"));\n    map.insert(\"list\", list);\n    object = QJsonObject::fromVariantMap(map);\n    QCOMPARE(object.size(), 3);\n    QCOMPARE(object.value(QLatin1String(\"key1\")), QJsonValue(QLatin1String(\"value1\")));\n    QCOMPARE(object.value(QLatin1String(\"key2\")), QJsonValue(QLatin1String(\"value2\")));\n    QCOMPARE(object.value(QLatin1String(\"list\")).type(), QJsonValue::Array);\n    QJsonArray array = object.value(QLatin1String(\"list\")).toArray();\n    QCOMPARE(array.size(), 4);\n    QCOMPARE(array.at(0).type(), QJsonValue::Bool);\n    QCOMPARE(array.at(0).toBool(), true);\n    QCOMPARE(array.at(1).type(), QJsonValue::Null);\n    QCOMPARE(array.at(2).type(), QJsonValue::Double);\n    QCOMPARE(array.at(2).toDouble(), 999.);\n    QCOMPARE(array.at(3).type(), QJsonValue::String);\n    QCOMPARE(array.at(3).toString(), QLatin1String(\"foo\"));\n}\n\nvoid tst_QtJson::toVariantMap()\n{\n    QCOMPARE(QMetaType::Type(QJsonValue(QJsonObject()).toVariant().type()), QMetaType::QVariantMap); // QTBUG-32524\n\n    QJsonObject object;\n    QVariantMap map = object.toVariantMap();\n    QVERIFY(map.isEmpty());\n\n    object.insert(\"Key\", QString(\"Value\"));\n    object.insert(\"null\", QJsonValue());\n    QJsonArray array;\n    array.append(true);\n    array.append(999.);\n    array.append(QLatin1String(\"string\"));\n    array.append(QJsonValue());\n    object.insert(\"Array\", array);\n\n    map = object.toVariantMap();\n\n    QCOMPARE(map.size(), 3);\n    QCOMPARE(map.value(\"Key\"), QVariant(QString(\"Value\")));\n    QCOMPARE(map.value(\"null\"), QVariant());\n    QCOMPARE(map.value(\"Array\").type(), QVariant::List);\n    QVariantList list = map.value(\"Array\").toList();\n    QCOMPARE(list.size(), 4);\n    QCOMPARE(list.at(0), QVariant(true));\n    QCOMPARE(list.at(1), QVariant(999.));\n    QCOMPARE(list.at(2), QVariant(QLatin1String(\"string\")));\n    QCOMPARE(list.at(3), QVariant());\n}\n\nvoid tst_QtJson::toVariantList()\n{\n    QCOMPARE(QMetaType::Type(QJsonValue(QJsonArray()).toVariant().type()), QMetaType::QVariantList); // QTBUG-32524\n\n    QJsonArray array;\n    QVariantList list = array.toVariantList();\n    QVERIFY(list.isEmpty());\n\n    array.append(QString(\"Value\"));\n    array.append(QJsonValue());\n    QJsonArray inner;\n    inner.append(true);\n    inner.append(999.);\n    inner.append(QLatin1String(\"string\"));\n    inner.append(QJsonValue());\n    array.append(inner);\n\n    list = array.toVariantList();\n\n    QCOMPARE(list.size(), 3);\n    QCOMPARE(list[0], QVariant(QString(\"Value\")));\n    QCOMPARE(list[1], QVariant());\n    QCOMPARE(list[2].type(), QVariant::List);\n    QVariantList vlist = list[2].toList();\n    QCOMPARE(vlist.size(), 4);\n    QCOMPARE(vlist.at(0), QVariant(true));\n    QCOMPARE(vlist.at(1), QVariant(999.));\n    QCOMPARE(vlist.at(2), QVariant(QLatin1String(\"string\")));\n    QCOMPARE(vlist.at(3), QVariant());\n}\n\nvoid tst_QtJson::toJson()\n{\n    // Test QJsonDocument::Indented format\n    {\n        QJsonObject object;\n        object.insert(\"\\\\Key\\n\", QString(\"Value\"));\n        object.insert(\"null\", QJsonValue());\n        QJsonArray array;\n        array.append(true);\n        array.append(999.);\n        array.append(QLatin1String(\"string\"));\n        array.append(QJsonValue());\n        array.append(QLatin1String(\"\\\\\\a\\n\\r\\b\\tabcABC\\\"\"));\n        object.insert(\"Array\", array);\n\n        QByteArray json = QJsonDocument(object).toJson();\n\n        QByteArray expected =\n                \"{\\n\"\n                \"    \\\"Array\\\": [\\n\"\n                \"        true,\\n\"\n                \"        999,\\n\"\n                \"        \\\"string\\\",\\n\"\n                \"        null,\\n\"\n                \"        \\\"\\\\\\\\\\\\u0007\\\\n\\\\r\\\\b\\\\tabcABC\\\\\\\"\\\"\\n\"\n                \"    ],\\n\"\n                \"    \\\"\\\\\\\\Key\\\\n\\\": \\\"Value\\\",\\n\"\n                \"    \\\"null\\\": null\\n\"\n                \"}\\n\";\n        QCOMPARE(json, expected);\n\n        QJsonDocument doc;\n        doc.setObject(object);\n        json = doc.toJson();\n        QCOMPARE(json, expected);\n\n        doc.setArray(array);\n        json = doc.toJson();\n        expected =\n                \"[\\n\"\n                \"    true,\\n\"\n                \"    999,\\n\"\n                \"    \\\"string\\\",\\n\"\n                \"    null,\\n\"\n                \"    \\\"\\\\\\\\\\\\u0007\\\\n\\\\r\\\\b\\\\tabcABC\\\\\\\"\\\"\\n\"\n                \"]\\n\";\n        QCOMPARE(json, expected);\n    }\n\n    // Test QJsonDocument::Compact format\n    {\n        QJsonObject object;\n        object.insert(\"\\\\Key\\n\", QString(\"Value\"));\n        object.insert(\"null\", QJsonValue());\n        QJsonArray array;\n        array.append(true);\n        array.append(999.);\n        array.append(QLatin1String(\"string\"));\n        array.append(QJsonValue());\n        array.append(QLatin1String(\"\\\\\\a\\n\\r\\b\\tabcABC\\\"\"));\n        object.insert(\"Array\", array);\n\n        QByteArray json = QJsonDocument(object).toJson(QJsonDocument::Compact);\n        QByteArray expected =\n                \"{\\\"Array\\\":[true,999,\\\"string\\\",null,\\\"\\\\\\\\\\\\u0007\\\\n\\\\r\\\\b\\\\tabcABC\\\\\\\"\\\"],\\\"\\\\\\\\Key\\\\n\\\":\\\"Value\\\",\\\"null\\\":null}\";\n        QCOMPARE(json, expected);\n\n        QJsonDocument doc;\n        doc.setObject(object);\n        json = doc.toJson(QJsonDocument::Compact);\n        QCOMPARE(json, expected);\n\n        doc.setArray(array);\n        json = doc.toJson(QJsonDocument::Compact);\n        expected = \"[true,999,\\\"string\\\",null,\\\"\\\\\\\\\\\\u0007\\\\n\\\\r\\\\b\\\\tabcABC\\\\\\\"\\\"]\";\n        QCOMPARE(json, expected);\n    }\n\n}\n\nvoid tst_QtJson::toJsonSillyNumericValues()\n{\n    QJsonObject object;\n    QJsonArray array;\n    array.append(QJsonValue(std::numeric_limits<double>::infinity()));  // encode to: null\n    array.append(QJsonValue(-std::numeric_limits<double>::infinity())); // encode to: null\n    array.append(QJsonValue(std::numeric_limits<double>::quiet_NaN())); // encode to: null\n    object.insert(\"Array\", array);\n\n    QByteArray json = QJsonDocument(object).toJson();\n\n    QByteArray expected =\n            \"{\\n\"\n            \"    \\\"Array\\\": [\\n\"\n            \"        null,\\n\"\n            \"        null,\\n\"\n            \"        null\\n\"\n            \"    ]\\n\"\n            \"}\\n\";\n\n    QCOMPARE(json, expected);\n\n    QJsonDocument doc;\n    doc.setObject(object);\n    json = doc.toJson();\n    QCOMPARE(json, expected);\n}\n\nvoid tst_QtJson::toJsonLargeNumericValues()\n{\n    QJsonObject object;\n    QJsonArray array;\n    array.append(QJsonValue(1.234567)); // actual precision bug in Qt 5.0.0\n    array.append(QJsonValue(1.7976931348623157e+308)); // JS Number.MAX_VALUE\n    array.append(QJsonValue(5e-324));                  // JS Number.MIN_VALUE\n    array.append(QJsonValue(std::numeric_limits<double>::min()));\n    array.append(QJsonValue(std::numeric_limits<double>::max()));\n    array.append(QJsonValue(std::numeric_limits<double>::epsilon()));\n    array.append(QJsonValue(std::numeric_limits<double>::denorm_min()));\n    array.append(QJsonValue(0.0));\n    array.append(QJsonValue(-std::numeric_limits<double>::min()));\n    array.append(QJsonValue(-std::numeric_limits<double>::max()));\n    array.append(QJsonValue(-std::numeric_limits<double>::epsilon()));\n    array.append(QJsonValue(-std::numeric_limits<double>::denorm_min()));\n    array.append(QJsonValue(-0.0));\n    array.append(QJsonValue(9007199254740992LL));  // JS Number max integer\n    array.append(QJsonValue(-9007199254740992LL)); // JS Number min integer\n    object.insert(\"Array\", array);\n\n    QByteArray json = QJsonDocument(object).toJson();\n\n    QByteArray expected =\n            \"{\\n\"\n            \"    \\\"Array\\\": [\\n\"\n            \"        1.234567,\\n\"\n            \"        1.7976931348623157e+308,\\n\"\n            //     ((4.9406564584124654e-324 == 5e-324) == true)\n            // I can only think JavaScript has a special formatter to\n            //  emit this value for this IEEE754 bit pattern.\n            \"        4.9406564584124654e-324,\\n\"\n            \"        2.2250738585072014e-308,\\n\"\n            \"        1.7976931348623157e+308,\\n\"\n            \"        2.2204460492503131e-16,\\n\"\n            \"        4.9406564584124654e-324,\\n\"\n            \"        0,\\n\"\n            \"        -2.2250738585072014e-308,\\n\"\n            \"        -1.7976931348623157e+308,\\n\"\n            \"        -2.2204460492503131e-16,\\n\"\n            \"        -4.9406564584124654e-324,\\n\"\n            \"        0,\\n\"\n            \"        9007199254740992,\\n\"\n            \"        -9007199254740992\\n\"\n            \"    ]\\n\"\n            \"}\\n\";\n\n#ifdef Q_OS_QNX\n    QEXPECT_FAIL(\"\", \"See QTBUG-37066\", Continue);\n#endif\n    QCOMPARE(json, expected);\n\n    QJsonDocument doc;\n    doc.setObject(object);\n    json = doc.toJson();\n#ifdef Q_OS_QNX\n    QEXPECT_FAIL(\"\", \"See QTBUG-37066\", Continue);\n#endif\n    QCOMPARE(json, expected);\n}\n\nvoid tst_QtJson::fromJson()\n{\n    {\n        QByteArray json = \"[\\n    true\\n]\\n\";\n        QJsonDocument doc = QJsonDocument::fromJson(json);\n        QVERIFY(!doc.isEmpty());\n        QCOMPARE(doc.isArray(), true);\n        QCOMPARE(doc.isObject(), false);\n        QJsonArray array = doc.array();\n        QCOMPARE(array.size(), 1);\n        QCOMPARE(array.at(0).type(), QJsonValue::Bool);\n        QCOMPARE(array.at(0).toBool(), true);\n        QCOMPARE(doc.toJson(), json);\n    }\n    /*{\n        //regression test: test if unicode_control_characters are correctly decoded\n        QByteArray json = \"[\\n    \\\"\" UNICODE_NON_CHARACTER \"\\\"\\n]\\n\";\n        QJsonDocument doc = QJsonDocument::fromJson(json);\n        QVERIFY(!doc.isEmpty());\n        QCOMPARE(doc.isArray(), true);\n        QCOMPARE(doc.isObject(), false);\n        QJsonArray array = doc.array();\n        QCOMPARE(array.size(), 1);\n        QCOMPARE(array.at(0).type(), QJsonValue::String);\n        QCOMPARE(array.at(0).toString(), QString::fromUtf8(UNICODE_NON_CHARACTER));\n        QCOMPARE(doc.toJson(), json);\n    }*/\n    {\n        QByteArray json = \"[]\";\n        QJsonDocument doc = QJsonDocument::fromJson(json);\n        QVERIFY(!doc.isEmpty());\n        QCOMPARE(doc.isArray(), true);\n        QCOMPARE(doc.isObject(), false);\n        QJsonArray array = doc.array();\n        QCOMPARE(array.size(), 0);\n    }\n    {\n        QByteArray json = \"{}\";\n        QJsonDocument doc = QJsonDocument::fromJson(json);\n        QVERIFY(!doc.isEmpty());\n        QCOMPARE(doc.isArray(), false);\n        QCOMPARE(doc.isObject(), true);\n        QJsonObject object = doc.object();\n        QCOMPARE(object.size(), 0);\n    }\n    {\n        QByteArray json = \"{\\n    \\\"Key\\\": true\\n}\\n\";\n        QJsonDocument doc = QJsonDocument::fromJson(json);\n        QVERIFY(!doc.isEmpty());\n        QCOMPARE(doc.isArray(), false);\n        QCOMPARE(doc.isObject(), true);\n        QJsonObject object = doc.object();\n        QCOMPARE(object.size(), 1);\n        QCOMPARE(object.value(\"Key\"), QJsonValue(true));\n        QCOMPARE(doc.toJson(), json);\n    }\n    {\n        QByteArray json = \"[ null, true, false, \\\"Foo\\\", 1, [], {} ]\";\n        QJsonDocument doc = QJsonDocument::fromJson(json);\n        QVERIFY(!doc.isEmpty());\n        QCOMPARE(doc.isArray(), true);\n        QCOMPARE(doc.isObject(), false);\n        QJsonArray array = doc.array();\n        QCOMPARE(array.size(), 7);\n        QCOMPARE(array.at(0).type(), QJsonValue::Null);\n        QCOMPARE(array.at(1).type(), QJsonValue::Bool);\n        QCOMPARE(array.at(1).toBool(), true);\n        QCOMPARE(array.at(2).type(), QJsonValue::Bool);\n        QCOMPARE(array.at(2).toBool(), false);\n        QCOMPARE(array.at(3).type(), QJsonValue::String);\n        QCOMPARE(array.at(3).toString(), QLatin1String(\"Foo\"));\n        QCOMPARE(array.at(4).type(), QJsonValue::Double);\n        QCOMPARE(array.at(4).toDouble(), 1.);\n        QCOMPARE(array.at(5).type(), QJsonValue::Array);\n        QCOMPARE(array.at(5).toArray().size(), 0);\n        QCOMPARE(array.at(6).type(), QJsonValue::Object);\n        QCOMPARE(array.at(6).toObject().size(), 0);\n    }\n    {\n        QByteArray json = \"{ \\\"0\\\": null, \\\"1\\\": true, \\\"2\\\": false, \\\"3\\\": \\\"Foo\\\", \\\"4\\\": 1, \\\"5\\\": [], \\\"6\\\": {} }\";\n        QJsonDocument doc = QJsonDocument::fromJson(json);\n        QVERIFY(!doc.isEmpty());\n        QCOMPARE(doc.isArray(), false);\n        QCOMPARE(doc.isObject(), true);\n        QJsonObject object = doc.object();\n        QCOMPARE(object.size(), 7);\n        QCOMPARE(object.value(\"0\").type(), QJsonValue::Null);\n        QCOMPARE(object.value(\"1\").type(), QJsonValue::Bool);\n        QCOMPARE(object.value(\"1\").toBool(), true);\n        QCOMPARE(object.value(\"2\").type(), QJsonValue::Bool);\n        QCOMPARE(object.value(\"2\").toBool(), false);\n        QCOMPARE(object.value(\"3\").type(), QJsonValue::String);\n        QCOMPARE(object.value(\"3\").toString(), QLatin1String(\"Foo\"));\n        QCOMPARE(object.value(\"4\").type(), QJsonValue::Double);\n        QCOMPARE(object.value(\"4\").toDouble(), 1.);\n        QCOMPARE(object.value(\"5\").type(), QJsonValue::Array);\n        QCOMPARE(object.value(\"5\").toArray().size(), 0);\n        QCOMPARE(object.value(\"6\").type(), QJsonValue::Object);\n        QCOMPARE(object.value(\"6\").toObject().size(), 0);\n    }\n    {\n        QByteArray compactJson = \"{\\\"Array\\\": [true,999,\\\"string\\\",null,\\\"\\\\\\\\\\\\u0007\\\\n\\\\r\\\\b\\\\tabcABC\\\\\\\"\\\"],\\\"\\\\\\\\Key\\\\n\\\": \\\"Value\\\",\\\"null\\\": null}\";\n        QJsonDocument doc = QJsonDocument::fromJson(compactJson);\n        QVERIFY(!doc.isEmpty());\n        QCOMPARE(doc.isArray(), false);\n        QCOMPARE(doc.isObject(), true);\n        QJsonObject object = doc.object();\n        QCOMPARE(object.size(), 3);\n        QCOMPARE(object.value(\"\\\\Key\\n\").isString(), true);\n        QCOMPARE(object.value(\"\\\\Key\\n\").toString(), QString(\"Value\"));\n        QCOMPARE(object.value(\"null\").isNull(), true);\n        QCOMPARE(object.value(\"Array\").isArray(), true);\n        QJsonArray array = object.value(\"Array\").toArray();\n        QCOMPARE(array.size(), 5);\n        QCOMPARE(array.at(0).isBool(), true);\n        QCOMPARE(array.at(0).toBool(), true);\n        QCOMPARE(array.at(1).isDouble(), true);\n        QCOMPARE(array.at(1).toDouble(), 999.);\n        QCOMPARE(array.at(2).isString(), true);\n        QCOMPARE(array.at(2).toString(), QLatin1String(\"string\"));\n        QCOMPARE(array.at(3).isNull(), true);\n        QCOMPARE(array.at(4).isString(), true);\n        QCOMPARE(array.at(4).toString(), QLatin1String(\"\\\\\\a\\n\\r\\b\\tabcABC\\\"\"));\n    }\n}\n\nvoid tst_QtJson::fromJsonErrors()\n{\n    {\n        QJsonParseError error;\n        QByteArray json = \"{\\n    \\n\\n\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::UnterminatedObject);\n        QCOMPARE(error.offset, 8);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"{\\n    \\\"key\\\" 10\\n\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::MissingNameSeparator);\n        QCOMPARE(error.offset, 13);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n    \\n\\n\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::UnterminatedArray);\n        QCOMPARE(error.offset, 8);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n   1, true\\n\\n\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::UnterminatedArray);\n        QCOMPARE(error.offset, 14);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n  1 true\\n\\n\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::MissingValueSeparator);\n        QCOMPARE(error.offset, 7);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n    nul\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::IllegalValue);\n        QCOMPARE(error.offset, 7);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n    nulzz\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::IllegalValue);\n        QCOMPARE(error.offset, 10);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n    tru\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::IllegalValue);\n        QCOMPARE(error.offset, 7);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n    trud]\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::IllegalValue);\n        QCOMPARE(error.offset, 10);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n    fal\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::IllegalValue);\n        QCOMPARE(error.offset, 7);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n    falsd]\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::IllegalValue);\n        QCOMPARE(error.offset, 11);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n    11111\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::TerminationByNumber);\n        QCOMPARE(error.offset, 11);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n    -1E10000]\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::IllegalNumber);\n        QCOMPARE(error.offset, 14);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n    -1e-10000]\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::IllegalNumber);\n        QCOMPARE(error.offset, 15);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n    \\\"\\\\u12\\\"]\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::IllegalEscapeSequence);\n        QCOMPARE(error.offset, 11);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n    \\\"foo\" INVALID_UNICODE \"bar\\\"]\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::IllegalUTF8String);\n        QCOMPARE(error.offset, 14);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n    \\\"\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::UnterminatedString);\n        QCOMPARE(error.offset, 8);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n    \\\"c\" UNICODE_DJE \"a\\\\u12\\\"]\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::IllegalEscapeSequence);\n        QCOMPARE(error.offset, 15);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n    \\\"c\" UNICODE_DJE \"a\" INVALID_UNICODE \"bar\\\"]\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::IllegalUTF8String);\n        QCOMPARE(error.offset, 15);\n    }\n    {\n        QJsonParseError error;\n        QByteArray json = \"[\\n    \\\"c\" UNICODE_DJE \"a ]\";\n        QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n        QVERIFY(doc.isEmpty());\n        QCOMPARE(error.error, QJsonParseError::UnterminatedString);\n        QCOMPARE(error.offset, 14);\n    }\n}\n\nvoid tst_QtJson::fromBinary()\n{\n    QFile file(\":/test.json\");\n    file.open(QFile::ReadOnly);\n    QByteArray testJson = file.readAll();\n\n    QJsonDocument doc = QJsonDocument::fromJson(testJson);\n    QJsonDocument outdoc = QJsonDocument::fromBinaryData(doc.toBinaryData());\n    QVERIFY(!outdoc.isNull());\n    QVERIFY(doc == outdoc);\n\n    QFile bfile(\":/test.bjson\");\n    bfile.open(QFile::ReadOnly);\n    QByteArray binary = bfile.readAll();\n\n    QJsonDocument bdoc = QJsonDocument::fromBinaryData(binary);\n    QVERIFY(!bdoc.isNull());\n    QVERIFY(doc.toVariant() == bdoc.toVariant());\n    QVERIFY(doc == bdoc);\n}\n\nvoid tst_QtJson::toAndFromBinary_data()\n{\n    QTest::addColumn<QString>(\"filename\");\n    QTest::newRow(\"test.json\") << (\":/test.json\");\n    QTest::newRow(\"test2.json\") << (\":/test2.json\");\n}\n\nvoid tst_QtJson::toAndFromBinary()\n{\n    QFETCH(QString, filename);\n    QFile file(filename);\n    QVERIFY(file.open(QFile::ReadOnly));\n    QByteArray data = file.readAll();\n\n    QJsonDocument doc = QJsonDocument::fromJson(data);\n    QVERIFY(!doc.isNull());\n    QJsonDocument outdoc = QJsonDocument::fromBinaryData(doc.toBinaryData());\n    QVERIFY(!outdoc.isNull());\n    QVERIFY(doc == outdoc);\n}\n\nvoid tst_QtJson::parseNumbers()\n{\n    {\n        // test number parsing\n        struct Numbers {\n            const char *str;\n            int n;\n        };\n        Numbers numbers [] = {\n            { \"0\", 0 },\n            { \"1\", 1 },\n            { \"10\", 10 },\n            { \"-1\", -1 },\n            { \"100000\", 100000 },\n            { \"-999\", -999 }\n        };\n        int size = sizeof(numbers)/sizeof(Numbers);\n        for (int i = 0; i < size; ++i) {\n            QByteArray json = \"[ \";\n            json += numbers[i].str;\n            json += \" ]\";\n            QJsonDocument doc = QJsonDocument::fromJson(json);\n            QVERIFY(!doc.isEmpty());\n            QCOMPARE(doc.isArray(), true);\n            QCOMPARE(doc.isObject(), false);\n            QJsonArray array = doc.array();\n            QCOMPARE(array.size(), 1);\n            QJsonValue val = array.at(0);\n            QCOMPARE(val.type(), QJsonValue::Double);\n            QCOMPARE(val.toDouble(), (double)numbers[i].n);\n        }\n    }\n    {\n        // test number parsing\n        struct Numbers {\n            const char *str;\n            double n;\n        };\n        Numbers numbers [] = {\n            { \"0\", 0 },\n            { \"1\", 1 },\n            { \"10\", 10 },\n            { \"-1\", -1 },\n            { \"100000\", 100000 },\n            { \"-999\", -999 },\n            { \"1.1\", 1.1 },\n            { \"1e10\", 1e10 },\n            { \"-1.1\", -1.1 },\n            { \"-1e10\", -1e10 },\n            { \"-1E10\", -1e10 },\n            { \"1.1e10\", 1.1e10 },\n            { \"1.1e308\", 1.1e308 },\n            { \"-1.1e308\", -1.1e308 },\n            { \"1.1e-308\", 1.1e-308 },\n            { \"-1.1e-308\", -1.1e-308 },\n            { \"1.1e+308\", 1.1e+308 },\n            { \"-1.1e+308\", -1.1e+308 },\n            { \"1.e+308\", 1.e+308 },\n            { \"-1.e+308\", -1.e+308 }\n        };\n        int size = sizeof(numbers)/sizeof(Numbers);\n        for (int i = 0; i < size; ++i) {\n            QByteArray json = \"[ \";\n            json += numbers[i].str;\n            json += \" ]\";\n            QJsonDocument doc = QJsonDocument::fromJson(json);\n#ifdef Q_OS_QNX\n            if (0 == QString::compare(numbers[i].str, \"1.1e-308\"))\n                QEXPECT_FAIL(\"\", \"See QTBUG-37066\", Abort);\n#endif\n            QVERIFY(!doc.isEmpty());\n            QCOMPARE(doc.isArray(), true);\n            QCOMPARE(doc.isObject(), false);\n            QJsonArray array = doc.array();\n            QCOMPARE(array.size(), 1);\n            QJsonValue val = array.at(0);\n            QCOMPARE(val.type(), QJsonValue::Double);\n            QCOMPARE(val.toDouble(), numbers[i].n);\n        }\n    }\n}\n\nvoid tst_QtJson::parseStrings()\n{\n    const char *strings [] =\n    {\n        \"Foo\",\n        \"abc\\\\\\\"abc\",\n        \"abc\\\\\\\\abc\",\n        \"abc\\\\babc\",\n        \"abc\\\\fabc\",\n        \"abc\\\\nabc\",\n        \"abc\\\\rabc\",\n        \"abc\\\\tabc\",\n        \"abc\\\\u0019abc\"\n//        \"abc\" UNICODE_DJE \"abc\",\n//        UNICODE_NON_CHARACTER\n    };\n    int size = sizeof(strings)/sizeof(const char *);\n\n    for (int i = 0; i < size; ++i) {\n        QByteArray json = \"[\\n    \\\"\";\n        json += strings[i];\n        json += \"\\\"\\n]\\n\";\n        QJsonDocument doc = QJsonDocument::fromJson(json);\n        QVERIFY(!doc.isEmpty());\n        QCOMPARE(doc.isArray(), true);\n        QCOMPARE(doc.isObject(), false);\n        QJsonArray array = doc.array();\n        QCOMPARE(array.size(), 1);\n        QJsonValue val = array.at(0);\n        QCOMPARE(val.type(), QJsonValue::String);\n\n        QCOMPARE(doc.toJson(), json);\n    }\n\n    struct Pairs {\n        const char *in;\n        const char *out;\n    };\n    Pairs pairs [] = {\n        { \"abc\\\\/abc\", \"abc/abc\" },\n//        { \"abc\\\\u0402abc\", \"abc\" UNICODE_DJE \"abc\" },\n        { \"abc\\\\u0065abc\", \"abceabc\" }\n//        { \"abc\\\\uFFFFabc\", \"abc\" UNICODE_NON_CHARACTER \"abc\" }\n    };\n    size = sizeof(pairs)/sizeof(Pairs);\n\n    for (int i = 0; i < size; ++i) {\n        QByteArray json = \"[\\n    \\\"\";\n        json += pairs[i].in;\n        json += \"\\\"\\n]\\n\";\n        QByteArray out = \"[\\n    \\\"\";\n        out += pairs[i].out;\n        out += \"\\\"\\n]\\n\";\n        QJsonDocument doc = QJsonDocument::fromJson(json);\n        QVERIFY(!doc.isEmpty());\n        QCOMPARE(doc.isArray(), true);\n        QCOMPARE(doc.isObject(), false);\n        QJsonArray array = doc.array();\n        QCOMPARE(array.size(), 1);\n        QJsonValue val = array.at(0);\n        QCOMPARE(val.type(), QJsonValue::String);\n\n        QCOMPARE(doc.toJson(), out);\n    }\n\n}\n\nvoid tst_QtJson::parseDuplicateKeys()\n{\n    const char *json = \"{ \\\"B\\\": true, \\\"A\\\": null, \\\"B\\\": false }\";\n\n    QJsonDocument doc = QJsonDocument::fromJson(json);\n    QCOMPARE(doc.isObject(), true);\n\n    QJsonObject o = doc.object();\n    QCOMPARE(o.size(), 2);\n    QJsonObject::const_iterator it = o.constBegin();\n    QCOMPARE(it.key(), QLatin1String(\"A\"));\n    QCOMPARE(it.value(), QJsonValue());\n    ++it;\n    QCOMPARE(it.key(), QLatin1String(\"B\"));\n    QCOMPARE(it.value(), QJsonValue(false));\n}\n\nvoid tst_QtJson::testParser()\n{\n    QFile file(\":/test.json\");\n    file.open(QFile::ReadOnly);\n    QByteArray testJson = file.readAll();\n\n    QJsonDocument doc = QJsonDocument::fromJson(testJson);\n    QVERIFY(!doc.isEmpty());\n}\n\nvoid tst_QtJson::compactArray()\n{\n    QJsonArray array;\n    array.append(QLatin1String(\"First Entry\"));\n    array.append(QLatin1String(\"Second Entry\"));\n    array.append(QLatin1String(\"Third Entry\"));\n    QJsonDocument doc(array);\n    int s =  doc.toBinaryData().size();\n    array.removeAt(1);\n    doc.setArray(array);\n    QVERIFY(s > doc.toBinaryData().size());\n    s = doc.toBinaryData().size();\n    QCOMPARE(doc.toJson(),\n             QByteArray(\"[\\n\"\n                        \"    \\\"First Entry\\\",\\n\"\n                        \"    \\\"Third Entry\\\"\\n\"\n                        \"]\\n\"));\n\n    array.removeAt(0);\n    doc.setArray(array);\n    QVERIFY(s > doc.toBinaryData().size());\n    s = doc.toBinaryData().size();\n    QCOMPARE(doc.toJson(),\n             QByteArray(\"[\\n\"\n                        \"    \\\"Third Entry\\\"\\n\"\n                        \"]\\n\"));\n\n    array.removeAt(0);\n    doc.setArray(array);\n    QVERIFY(s > doc.toBinaryData().size());\n    s = doc.toBinaryData().size();\n    QCOMPARE(doc.toJson(),\n             QByteArray(\"[\\n\"\n                        \"]\\n\"));\n\n}\n\nvoid tst_QtJson::compactObject()\n{\n    QJsonObject object;\n    object.insert(QLatin1String(\"Key1\"), QLatin1String(\"First Entry\"));\n    object.insert(QLatin1String(\"Key2\"), QLatin1String(\"Second Entry\"));\n    object.insert(QLatin1String(\"Key3\"), QLatin1String(\"Third Entry\"));\n    QJsonDocument doc(object);\n    int s =  doc.toBinaryData().size();\n    object.remove(QLatin1String(\"Key2\"));\n    doc.setObject(object);\n    QVERIFY(s > doc.toBinaryData().size());\n    s = doc.toBinaryData().size();\n    QCOMPARE(doc.toJson(),\n             QByteArray(\"{\\n\"\n                        \"    \\\"Key1\\\": \\\"First Entry\\\",\\n\"\n                        \"    \\\"Key3\\\": \\\"Third Entry\\\"\\n\"\n                        \"}\\n\"));\n\n    object.remove(QLatin1String(\"Key1\"));\n    doc.setObject(object);\n    QVERIFY(s > doc.toBinaryData().size());\n    s = doc.toBinaryData().size();\n    QCOMPARE(doc.toJson(),\n             QByteArray(\"{\\n\"\n                        \"    \\\"Key3\\\": \\\"Third Entry\\\"\\n\"\n                        \"}\\n\"));\n\n    object.remove(QLatin1String(\"Key3\"));\n    doc.setObject(object);\n    QVERIFY(s > doc.toBinaryData().size());\n    s = doc.toBinaryData().size();\n    QCOMPARE(doc.toJson(),\n             QByteArray(\"{\\n\"\n                        \"}\\n\"));\n\n}\n\nvoid tst_QtJson::validation()\n{\n    // this basically tests that we don't crash on corrupt data\n    QFile file(\":/test.json\");\n    QVERIFY(file.open(QFile::ReadOnly));\n    QByteArray testJson = file.readAll();\n    QVERIFY(!testJson.isEmpty());\n\n    QJsonDocument doc = QJsonDocument::fromJson(testJson);\n    QVERIFY(!doc.isNull());\n\n    QByteArray binary = doc.toBinaryData();\n\n    // only test the first 1000 bytes. Testing the full file takes too long\n    for (int i = 0; i < 1000; ++i) {\n        QByteArray corrupted = binary;\n        corrupted[i] = char(0xff);\n        QJsonDocument doc = QJsonDocument::fromBinaryData(corrupted);\n        if (doc.isNull())\n            continue;\n        QByteArray json = doc.toJson();\n    }\n\n\n    QFile file2(\":/test3.json\");\n    file2.open(QFile::ReadOnly);\n    testJson = file2.readAll();\n    QVERIFY(!testJson.isEmpty());\n\n    doc = QJsonDocument::fromJson(testJson);\n    QVERIFY(!doc.isNull());\n\n    binary = doc.toBinaryData();\n\n    for (int i = 0; i < binary.size(); ++i) {\n        QByteArray corrupted = binary;\n        corrupted[i] = char(0xff);\n        QJsonDocument doc = QJsonDocument::fromBinaryData(corrupted);\n        if (doc.isNull())\n            continue;\n        QByteArray json = doc.toJson();\n\n        corrupted = binary;\n        corrupted[i] = 0x00;\n        doc = QJsonDocument::fromBinaryData(corrupted);\n        if (doc.isNull())\n            continue;\n        json = doc.toJson();\n    }\n}\n\nvoid tst_QtJson::assignToDocument()\n{\n    {\n        const char *json = \"{ \\\"inner\\\": { \\\"key\\\": true } }\";\n        QJsonDocument doc = QJsonDocument::fromJson(json);\n\n        QJsonObject o = doc.object();\n        QJsonValue inner = o.value(\"inner\");\n\n        QJsonDocument innerDoc(inner.toObject());\n\n        QVERIFY(innerDoc != doc);\n        QVERIFY(innerDoc.object() == inner.toObject());\n    }\n    {\n        const char *json = \"[ [ true ] ]\";\n        QJsonDocument doc = QJsonDocument::fromJson(json);\n\n        QJsonArray a = doc.array();\n        QJsonValue inner = a.at(0);\n\n        QJsonDocument innerDoc(inner.toArray());\n\n        QVERIFY(innerDoc != doc);\n        QVERIFY(innerDoc.array() == inner.toArray());\n    }\n}\n\n\nvoid tst_QtJson::testDuplicateKeys()\n{\n    QJsonObject obj;\n    obj.insert(QLatin1String(\"foo\"), QLatin1String(\"bar\"));\n    obj.insert(QLatin1String(\"foo\"), QLatin1String(\"zap\"));\n    QCOMPARE(obj.size(), 1);\n    QCOMPARE(obj.value(QLatin1String(\"foo\")).toString(), QLatin1String(\"zap\"));\n}\n\nvoid tst_QtJson::testCompaction()\n{\n    // modify object enough times to trigger compactionCounter\n    // and make sure the data is still valid\n    QJsonObject obj;\n    for (int i = 0; i < 33; ++i) {\n        obj.remove(QLatin1String(\"foo\"));\n        obj.insert(QLatin1String(\"foo\"), QLatin1String(\"bar\"));\n    }\n    QCOMPARE(obj.size(), 1);\n    QCOMPARE(obj.value(QLatin1String(\"foo\")).toString(), QLatin1String(\"bar\"));\n\n    QJsonDocument doc = QJsonDocument::fromBinaryData(QJsonDocument(obj).toBinaryData());\n    QVERIFY(!doc.isNull());\n    QVERIFY(!doc.isEmpty());\n    QCOMPARE(doc.isArray(), false);\n    QCOMPARE(doc.isObject(), true);\n    QVERIFY(doc.object() == obj);\n}\n\nvoid tst_QtJson::testDebugStream()\n{\n    {\n        // QJsonObject\n\n        QJsonObject object;\n        QTest::ignoreMessage(QtDebugMsg, \"QJsonObject() \");\n        qDebug() << object;\n\n        object.insert(QLatin1String(\"foo\"), QLatin1String(\"bar\"));\n        QTest::ignoreMessage(QtDebugMsg, \"QJsonObject({\\\"foo\\\":\\\"bar\\\"}) \");\n        qDebug() << object;\n    }\n\n    {\n        // QJsonArray\n\n        QJsonArray array;\n        QTest::ignoreMessage(QtDebugMsg, \"QJsonArray() \");\n        qDebug() << array;\n\n        array.append(1);\n        array.append(QLatin1String(\"foo\"));\n        QTest::ignoreMessage(QtDebugMsg, \"QJsonArray([1,\\\"foo\\\"]) \");\n        qDebug() << array;\n    }\n\n    {\n        // QJsonDocument\n\n        QJsonDocument doc;\n        QTest::ignoreMessage(QtDebugMsg, \"QJsonDocument() \");\n        qDebug() << doc;\n\n        QJsonObject object;\n        object.insert(QLatin1String(\"foo\"), QLatin1String(\"bar\"));\n        doc.setObject(object);\n        QTest::ignoreMessage(QtDebugMsg, \"QJsonDocument({\\\"foo\\\":\\\"bar\\\"}) \");\n        qDebug() << doc;\n\n        QJsonArray array;\n        array.append(1);\n        array.append(QLatin1String(\"foo\"));\n        QTest::ignoreMessage(QtDebugMsg, \"QJsonDocument([1,\\\"foo\\\"]) \");\n        doc.setArray(array);\n        qDebug() << doc;\n    }\n\n    {\n        // QJsonValue\n\n        QJsonValue value;\n\n        QTest::ignoreMessage(QtDebugMsg, \"QJsonValue(null) \");\n        qDebug() << value;\n\n        value = QJsonValue(true); // bool\n        QTest::ignoreMessage(QtDebugMsg, \"QJsonValue(bool, true) \");\n        qDebug() << value;\n\n        value = QJsonValue((double)4.2); // double\n        QTest::ignoreMessage(QtDebugMsg, \"QJsonValue(double, 4.2) \");\n        qDebug() << value;\n\n        value = QJsonValue((int)42); // int\n        QTest::ignoreMessage(QtDebugMsg, \"QJsonValue(double, 42) \");\n        qDebug() << value;\n\n        value = QJsonValue(QLatin1String(\"foo\")); // string\n        QTest::ignoreMessage(QtDebugMsg, \"QJsonValue(string, \\\"foo\\\") \");\n        qDebug() << value;\n\n        QJsonArray array;\n        array.append(1);\n        array.append(QLatin1String(\"foo\"));\n        value = QJsonValue(array); // array\n        QTest::ignoreMessage(QtDebugMsg, \"QJsonValue(array, QJsonArray([1,\\\"foo\\\"]) ) \");\n        qDebug() << value;\n\n        QJsonObject object;\n        object.insert(QLatin1String(\"foo\"), QLatin1String(\"bar\"));\n        value = QJsonValue(object); // object\n        QTest::ignoreMessage(QtDebugMsg, \"QJsonValue(object, QJsonObject({\\\"foo\\\":\\\"bar\\\"}) ) \");\n        qDebug() << value;\n    }\n}\n\nvoid tst_QtJson::testCompactionError()\n{\n    QJsonObject schemaObject;\n    schemaObject.insert(\"_Type\", QLatin1String(\"_SchemaType\"));\n    schemaObject.insert(\"name\", QLatin1String(\"Address\"));\n    schemaObject.insert(\"schema\", QJsonObject());\n    {\n        QJsonObject content(schemaObject);\n        QJsonDocument doc(content);\n        QVERIFY(!doc.isNull());\n        QByteArray hash = QCryptographicHash::hash(doc.toBinaryData(), QCryptographicHash::Md5).toHex();\n        schemaObject.insert(\"_Version\", QString::fromLatin1(hash.constData(), hash.size()));\n    }\n\n    QJsonObject schema;\n    schema.insert(\"streetNumber\", schema.value(\"number\").toObject());\n    schemaObject.insert(\"schema\", schema);\n    {\n        QJsonObject content(schemaObject);\n        content.remove(\"_Uuid\");\n        content.remove(\"_Version\");\n        QJsonDocument doc(content);\n        QVERIFY(!doc.isNull());\n        QByteArray hash = QCryptographicHash::hash(doc.toBinaryData(), QCryptographicHash::Md5).toHex();\n        schemaObject.insert(\"_Version\", QString::fromLatin1(hash.constData(), hash.size()));\n    }\n}\n\nvoid tst_QtJson::parseUnicodeEscapes()\n{\n    const QByteArray json = \"[ \\\"A\\\\u00e4\\\\u00C4\\\" ]\";\n\n    QJsonDocument doc = QJsonDocument::fromJson(json);\n    QJsonArray array = doc.array();\n\n    QString result = QLatin1String(\"A\");\n    result += QChar(0xe4);\n    result += QChar(0xc4);\n\n    QCOMPARE(array.first().toString(), result);\n}\n\nvoid tst_QtJson::assignObjects()\n{\n    const char *json =\n            \"[ { \\\"Key\\\": 1 }, { \\\"Key\\\": 2 } ]\";\n\n    QJsonDocument doc = QJsonDocument::fromJson(json);\n    QJsonArray array = doc.array();\n\n    QJsonObject object = array.at(0).toObject();\n    QCOMPARE(object.value(\"Key\").toDouble(), 1.);\n\n    object = array.at(1).toObject();\n    QCOMPARE(object.value(\"Key\").toDouble(), 2.);\n}\n\nvoid tst_QtJson::assignArrays()\n{\n    const char *json =\n            \"[ [ 1 ], [ 2 ] ]\";\n\n    QJsonDocument doc = QJsonDocument::fromJson(json);\n    QJsonArray array = doc.array();\n\n    QJsonArray inner = array.at(0).toArray()  ;\n    QCOMPARE(inner.at(0).toDouble(), 1.);\n\n    inner= array.at(1).toArray();\n    QCOMPARE(inner.at(0).toDouble(), 2.);\n}\n\nvoid tst_QtJson::testTrailingComma()\n{\n    const char *jsons[] = { \"{ \\\"Key\\\": 1, }\", \"[ { \\\"Key\\\": 1 }, ]\" };\n\n    for (unsigned i = 0; i < sizeof(jsons)/sizeof(jsons[0]); ++i) {\n        QJsonParseError error;\n        QJsonDocument doc = QJsonDocument::fromJson(jsons[i], &error);\n        QCOMPARE(error.error, QJsonParseError::MissingObject);\n    }\n}\n\nvoid tst_QtJson::testDetachBug()\n{\n    QJsonObject dynamic;\n    QJsonObject embedded;\n\n    QJsonObject local;\n\n    embedded.insert(\"Key1\", QString(\"Value1\"));\n    embedded.insert(\"Key2\", QString(\"Value2\"));\n    dynamic.insert(QLatin1String(\"Bogus\"), QString(\"bogusValue\"));\n    dynamic.insert(\"embedded\", embedded);\n    local = dynamic.value(\"embedded\").toObject();\n\n    dynamic.remove(\"embedded\");\n\n    QCOMPARE(local.keys().size(),2);\n    local.remove(\"Key1\");\n    local.remove(\"Key2\");\n    QCOMPARE(local.keys().size(), 0);\n\n    local.insert(\"Key1\", QString(\"anotherValue\"));\n    QCOMPARE(local.keys().size(), 1);\n}\n\nvoid tst_QtJson::valueEquals()\n{\n    QVERIFY(QJsonValue() == QJsonValue());\n    QVERIFY(QJsonValue() != QJsonValue(QJsonValue::Undefined));\n    QVERIFY(QJsonValue() != QJsonValue(true));\n    QVERIFY(QJsonValue() != QJsonValue(1.));\n    QVERIFY(QJsonValue() != QJsonValue(QJsonArray()));\n    QVERIFY(QJsonValue() != QJsonValue(QJsonObject()));\n\n    QVERIFY(QJsonValue(true) == QJsonValue(true));\n    QVERIFY(QJsonValue(true) != QJsonValue(false));\n    QVERIFY(QJsonValue(true) != QJsonValue(QJsonValue::Undefined));\n    QVERIFY(QJsonValue(true) != QJsonValue());\n    QVERIFY(QJsonValue(true) != QJsonValue(1.));\n    QVERIFY(QJsonValue(true) != QJsonValue(QJsonArray()));\n    QVERIFY(QJsonValue(true) != QJsonValue(QJsonObject()));\n\n    QVERIFY(QJsonValue(1) == QJsonValue(1));\n    QVERIFY(QJsonValue(1) != QJsonValue(2));\n    QVERIFY(QJsonValue(1) == QJsonValue(1.));\n    QVERIFY(QJsonValue(1) != QJsonValue(1.1));\n    QVERIFY(QJsonValue(1) != QJsonValue(QJsonValue::Undefined));\n    QVERIFY(QJsonValue(1) != QJsonValue());\n    QVERIFY(QJsonValue(1) != QJsonValue(true));\n    QVERIFY(QJsonValue(1) != QJsonValue(QJsonArray()));\n    QVERIFY(QJsonValue(1) != QJsonValue(QJsonObject()));\n\n    QVERIFY(QJsonValue(1.) == QJsonValue(1.));\n    QVERIFY(QJsonValue(1.) != QJsonValue(2.));\n    QVERIFY(QJsonValue(1.) != QJsonValue(QJsonValue::Undefined));\n    QVERIFY(QJsonValue(1.) != QJsonValue());\n    QVERIFY(QJsonValue(1.) != QJsonValue(true));\n    QVERIFY(QJsonValue(1.) != QJsonValue(QJsonArray()));\n    QVERIFY(QJsonValue(1.) != QJsonValue(QJsonObject()));\n\n    QVERIFY(QJsonValue(QJsonArray()) == QJsonValue(QJsonArray()));\n    QJsonArray nonEmptyArray;\n    nonEmptyArray.append(true);\n    QVERIFY(QJsonValue(QJsonArray()) != nonEmptyArray);\n    QVERIFY(QJsonValue(QJsonArray()) != QJsonValue(QJsonValue::Undefined));\n    QVERIFY(QJsonValue(QJsonArray()) != QJsonValue());\n    QVERIFY(QJsonValue(QJsonArray()) != QJsonValue(true));\n    QVERIFY(QJsonValue(QJsonArray()) != QJsonValue(1.));\n    QVERIFY(QJsonValue(QJsonArray()) != QJsonValue(QJsonObject()));\n\n    QVERIFY(QJsonValue(QJsonObject()) == QJsonValue(QJsonObject()));\n    QJsonObject nonEmptyObject;\n    nonEmptyObject.insert(\"Key\", true);\n    QVERIFY(QJsonValue(QJsonObject()) != nonEmptyObject);\n    QVERIFY(QJsonValue(QJsonObject()) != QJsonValue(QJsonValue::Undefined));\n    QVERIFY(QJsonValue(QJsonObject()) != QJsonValue());\n    QVERIFY(QJsonValue(QJsonObject()) != QJsonValue(true));\n    QVERIFY(QJsonValue(QJsonObject()) != QJsonValue(1.));\n    QVERIFY(QJsonValue(QJsonObject()) != QJsonValue(QJsonArray()));\n\n    QVERIFY(QJsonValue(\"foo\") == QJsonValue(QLatin1String(\"foo\")));\n    QVERIFY(QJsonValue(\"foo\") == QJsonValue(QString(\"foo\")));\n    QVERIFY(QJsonValue(\"\\x66\\x6f\\x6f\") == QJsonValue(QString(\"foo\")));\n    QVERIFY(QJsonValue(\"\\x62\\x61\\x72\") == QJsonValue(\"bar\"));\n    /*\n    QVERIFY(QJsonValue(UNICODE_NON_CHARACTER) == QJsonValue(QString(UNICODE_NON_CHARACTER)));\n    QVERIFY(QJsonValue(UNICODE_DJE) == QJsonValue(QString(UNICODE_DJE)));\n    QVERIFY(QJsonValue(\"\\xc3\\xa9\") == QJsonValue(QString(\"\\xc3\\xa9\")));\n    */\n}\n\nvoid tst_QtJson::objectEquals_data()\n{\n    QTest::addColumn<QJsonObject>(\"left\");\n    QTest::addColumn<QJsonObject>(\"right\");\n    QTest::addColumn<bool>(\"result\");\n\n    QTest::newRow(\"two defaults\") << QJsonObject() << QJsonObject() << true;\n\n    QJsonObject object1;\n    object1.insert(\"property\", 1);\n    QJsonObject object2;\n    object2[\"property\"] = 1;\n    QJsonObject object3;\n    object3.insert(\"property1\", 1);\n    object3.insert(\"property2\", 2);\n\n    QTest::newRow(\"the same object (1 vs 2)\") << object1 << object2 << true;\n    QTest::newRow(\"the same object (3 vs 3)\") << object3 << object3 << true;\n    QTest::newRow(\"different objects (2 vs 3)\") << object2 << object3 << false;\n    QTest::newRow(\"object vs default\") << object1 << QJsonObject() << false;\n\n    QJsonObject empty;\n    empty.insert(\"property\", 1);\n    empty.take(\"property\");\n    QTest::newRow(\"default vs empty\") << QJsonObject() << empty << true;\n    QTest::newRow(\"empty vs empty\") << empty << empty << true;\n    QTest::newRow(\"object vs empty\") << object1 << empty << false;\n\n    QJsonObject referencedEmpty;\n    referencedEmpty[\"undefined\"];\n    QTest::newRow(\"referenced empty vs referenced empty\") << referencedEmpty << referencedEmpty << true;\n    QTest::newRow(\"referenced empty vs object\") << referencedEmpty << object1 << false;\n\n    QJsonObject referencedObject1;\n    referencedObject1.insert(\"property\", 1);\n    referencedObject1[\"undefined\"];\n    QJsonObject referencedObject2;\n    referencedObject2.insert(\"property\", 1);\n    referencedObject2[\"aaaaaaaaa\"]; // earlier then \"property\"\n    referencedObject2[\"zzzzzzzzz\"]; // after \"property\"\n    QTest::newRow(\"referenced object vs default\") << referencedObject1 << QJsonObject() << false;\n    QTest::newRow(\"referenced object vs referenced object\") << referencedObject1 << referencedObject1 << true;\n    QTest::newRow(\"referenced object vs object (different)\") << referencedObject1 << object3 << false;\n}\n\nvoid tst_QtJson::objectEquals()\n{\n    QFETCH(QJsonObject, left);\n    QFETCH(QJsonObject, right);\n    QFETCH(bool, result);\n\n    QCOMPARE(left == right, result);\n    QCOMPARE(right == left, result);\n\n    // invariants checks\n    QCOMPARE(left, left);\n    QCOMPARE(right, right);\n    QCOMPARE(left != right, !result);\n    QCOMPARE(right != left, !result);\n\n    // The same but from QJsonValue perspective\n    QCOMPARE(QJsonValue(left) == QJsonValue(right), result);\n    QCOMPARE(QJsonValue(left) != QJsonValue(right), !result);\n    QCOMPARE(QJsonValue(right) == QJsonValue(left), result);\n    QCOMPARE(QJsonValue(right) != QJsonValue(left), !result);\n}\n\nvoid tst_QtJson::arrayEquals_data()\n{\n    QTest::addColumn<QJsonArray>(\"left\");\n    QTest::addColumn<QJsonArray>(\"right\");\n    QTest::addColumn<bool>(\"result\");\n\n    QTest::newRow(\"two defaults\") << QJsonArray() << QJsonArray() << true;\n\n    QJsonArray array1;\n    array1.append(1);\n    QJsonArray array2;\n    array2.append(2111);\n    array2[0] = 1;\n    QJsonArray array3;\n    array3.insert(0, 1);\n    array3.insert(1, 2);\n\n    QTest::newRow(\"the same array (1 vs 2)\") << array1 << array2 << true;\n    QTest::newRow(\"the same array (3 vs 3)\") << array3 << array3 << true;\n    QTest::newRow(\"different arrays (2 vs 3)\") << array2 << array3 << false;\n    QTest::newRow(\"array vs default\") << array1 << QJsonArray() << false;\n\n    QJsonArray empty;\n    empty.append(1);\n    empty.takeAt(0);\n    QTest::newRow(\"default vs empty\") << QJsonArray() << empty << true;\n    QTest::newRow(\"empty vs default\") << empty << QJsonArray() << true;\n    QTest::newRow(\"empty vs empty\") << empty << empty << true;\n    QTest::newRow(\"array vs empty\") << array1 << empty << false;\n}\n\nvoid tst_QtJson::arrayEquals()\n{\n    QFETCH(QJsonArray, left);\n    QFETCH(QJsonArray, right);\n    QFETCH(bool, result);\n\n    QCOMPARE(left == right, result);\n    QCOMPARE(right == left, result);\n\n    // invariants checks\n    QCOMPARE(left, left);\n    QCOMPARE(right, right);\n    QCOMPARE(left != right, !result);\n    QCOMPARE(right != left, !result);\n\n    // The same but from QJsonValue perspective\n    QCOMPARE(QJsonValue(left) == QJsonValue(right), result);\n    QCOMPARE(QJsonValue(left) != QJsonValue(right), !result);\n    QCOMPARE(QJsonValue(right) == QJsonValue(left), result);\n    QCOMPARE(QJsonValue(right) != QJsonValue(left), !result);\n}\n\nvoid tst_QtJson::bom()\n{\n    QFile file(\":/bom.json\");\n    file.open(QFile::ReadOnly);\n    QByteArray json = file.readAll();\n\n    // Import json document into a QJsonDocument\n    QJsonParseError error;\n    QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n\n    QVERIFY(!doc.isNull());\n    QVERIFY(error.error == QJsonParseError::NoError);\n}\n\nvoid tst_QtJson::nesting()\n{\n    // check that we abort parsing too deeply nested json documents.\n    // this is to make sure we don't crash because the parser exhausts the\n    // stack.\n\n    const char *array_data =\n            \"[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\"\n            \"[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\"\n            \"[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\"\n            \"[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\"\n            \"[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\"\n            \"[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\"\n            \"[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\"\n            \"[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\"\n            \"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\"\n            \"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\"\n            \"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\"\n            \"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\"\n            \"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\"\n            \"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\"\n            \"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\"\n            \"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\";\n\n    QByteArray json(array_data);\n    QJsonParseError error;\n    QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n\n    QVERIFY(!doc.isNull());\n    QVERIFY(error.error == QJsonParseError::NoError);\n\n    json.prepend(\"[\");\n    json.append(\"]\");\n    doc = QJsonDocument::fromJson(json, &error);\n\n    QVERIFY(doc.isNull());\n    QVERIFY(error.error == QJsonParseError::DeepNesting);\n\n    json = QByteArray(\"true \");\n\n    for (int i = 0; i < 1024; ++i) {\n        json.prepend(\"{ \\\"Key\\\": \");\n        json.append(\" }\");\n    }\n\n    doc = QJsonDocument::fromJson(json, &error);\n\n    QVERIFY(!doc.isNull());\n    QVERIFY(error.error == QJsonParseError::NoError);\n\n    json.prepend(\"[\");\n    json.append(\"]\");\n    doc = QJsonDocument::fromJson(json, &error);\n\n    QVERIFY(doc.isNull());\n    QVERIFY(error.error == QJsonParseError::DeepNesting);\n\n}\n\nvoid tst_QtJson::longStrings()\n{\n    // test around 15 and 16 bit boundaries, as these are limits\n    // in the data structures (for Latin1String in qjson_p.h)\n    QString s(0x7ff0, 'a');\n    for (int i = 0x7ff0; i < 0x8010; i++) {\n        s.append(\"c\");\n\n        QMap <QString, QVariant> map;\n        map[\"key\"] = s;\n\n        /* Create a QJsonDocument from the QMap ... */\n        QJsonDocument d1 = QJsonDocument::fromVariant(QVariant(map));\n        /* ... and a QByteArray from the QJsonDocument */\n        QByteArray a1 = d1.toJson();\n\n        /* Create a QJsonDocument from the QByteArray ... */\n        QJsonDocument d2 = QJsonDocument::fromJson(a1);\n        /* ... and a QByteArray from the QJsonDocument */\n        QByteArray a2 = d2.toJson();\n        QVERIFY(a1 == a2);\n    }\n\n    s = QString(0xfff0, 'a');\n    for (int i = 0xfff0; i < 0x10010; i++) {\n        s.append(\"c\");\n\n        QMap <QString, QVariant> map;\n        map[\"key\"] = s;\n\n        /* Create a QJsonDocument from the QMap ... */\n        QJsonDocument d1 = QJsonDocument::fromVariant(QVariant(map));\n        /* ... and a QByteArray from the QJsonDocument */\n        QByteArray a1 = d1.toJson();\n\n        /* Create a QJsonDocument from the QByteArray ... */\n        QJsonDocument d2 = QJsonDocument::fromJson(a1);\n        /* ... and a QByteArray from the QJsonDocument */\n        QByteArray a2 = d2.toJson();\n        QVERIFY(a1 == a2);\n    }\n}\n\nvoid tst_QtJson::testJsonValueRefDefault()\n{\n    QJsonObject empty;\n\n    QCOMPARE(empty[\"n/a\"].toString(), QString());\n    QCOMPARE(empty[\"n/a\"].toString(\"default\"), QLatin1String(\"default\"));\n\n    QCOMPARE(empty[\"n/a\"].toBool(), false);\n    QCOMPARE(empty[\"n/a\"].toBool(true), true);\n\n    QCOMPARE(empty[\"n/a\"].toInt(), 0);\n    QCOMPARE(empty[\"n/a\"].toInt(42), 42);\n\n    QCOMPARE(empty[\"n/a\"].toDouble(), 0.0);\n    QCOMPARE(empty[\"n/a\"].toDouble(42.0), 42.0);\n}\n\nvoid tst_QtJson::arrayInitializerList()\n{\n#ifndef Q_COMPILER_INITIALIZER_LISTS\n    QSKIP(\"initializer_list is enabled only with c++11 support\", SkipSingle);\n#else\n    QVERIFY(QJsonArray{}.isEmpty());\n    QCOMPARE(QJsonArray{\"one\"}.count(), 1);\n    QCOMPARE(QJsonArray{1}.count(), 1);\n\n    {\n        QJsonArray a{1.3, \"hello\", 0};\n        QCOMPARE(QJsonValue(a[0]), QJsonValue(1.3));\n        QCOMPARE(QJsonValue(a[1]), QJsonValue(\"hello\"));\n        QCOMPARE(QJsonValue(a[2]), QJsonValue(0));\n        QCOMPARE(a.count(), 3);\n    }\n    {\n        QJsonObject o;\n        o[\"property\"] = 1;\n        QJsonArray a1 {o};\n        QCOMPARE(a1.count(), 1);\n        QCOMPARE(a1[0].toObject(), o);\n\n        QJsonArray a2 {o, 23};\n        QCOMPARE(a2.count(), 2);\n        QCOMPARE(a2[0].toObject(), o);\n        QCOMPARE(QJsonValue(a2[1]), QJsonValue(23));\n\n        QJsonArray a3 { a1, o, a2 };\n        QCOMPARE(QJsonValue(a3[0]), QJsonValue(a1));\n        QCOMPARE(QJsonValue(a3[1]), QJsonValue(o));\n        QCOMPARE(QJsonValue(a3[2]), QJsonValue(a2));\n\n        QJsonArray a4 { 1, QJsonArray{1,2,3}, QJsonArray{\"hello\", 2}, QJsonObject{{\"one\", 1}} };\n        QCOMPARE(a4.count(), 4);\n        QCOMPARE(QJsonValue(a4[0]), QJsonValue(1));\n\n        {\n            QJsonArray a41 = a4[1].toArray();\n            QJsonArray a42 = a4[2].toArray();\n            QJsonObject a43 = a4[3].toObject();\n            QCOMPARE(a41.count(), 3);\n            QCOMPARE(a42.count(), 2);\n            QCOMPARE(a43.count(), 1);\n\n            QCOMPARE(QJsonValue(a41[2]), QJsonValue(3));\n            QCOMPARE(QJsonValue(a42[1]), QJsonValue(2));\n            QCOMPARE(QJsonValue(a43[\"one\"]), QJsonValue(1));\n        }\n    }\n#endif\n}\n\nvoid tst_QtJson::objectInitializerList()\n{\n#ifndef Q_COMPILER_INITIALIZER_LISTS\n    QSKIP(\"initializer_list is enabled only with c++11 support\", SkipSingle);\n#else\n    QVERIFY(QJsonObject{}.isEmpty());\n\n    {   // one property\n        QJsonObject one {{\"one\", 1}};\n        QCOMPARE(one.count(), 1);\n        QVERIFY(one.contains(\"one\"));\n        QCOMPARE(QJsonValue(one[\"one\"]), QJsonValue(1));\n    }\n    {   // two properties\n        QJsonObject two {\n                           {\"one\", 1},\n                           {\"two\", 2}\n                        };\n        QCOMPARE(two.count(), 2);\n        QVERIFY(two.contains(\"one\"));\n        QVERIFY(two.contains(\"two\"));\n        QCOMPARE(QJsonValue(two[\"one\"]), QJsonValue(1));\n        QCOMPARE(QJsonValue(two[\"two\"]), QJsonValue(2));\n    }\n    {   // nested object\n        QJsonObject object{{\"nested\", QJsonObject{{\"innerProperty\", 2}}}};\n        QCOMPARE(object.count(), 1);\n        QVERIFY(object.contains(\"nested\"));\n        QVERIFY(object[\"nested\"].isObject());\n\n        QJsonObject nested = object[\"nested\"].toObject();\n        QCOMPARE(QJsonValue(nested[\"innerProperty\"]), QJsonValue(2));\n    }\n    {   // nested array\n        QJsonObject object{{\"nested\", QJsonArray{\"innerValue\", 2.1, \"bum cyk cyk\"}}};\n        QCOMPARE(object.count(), 1);\n        QVERIFY(object.contains(\"nested\"));\n        QVERIFY(object[\"nested\"].isArray());\n\n        QJsonArray nested = object[\"nested\"].toArray();\n        QCOMPARE(nested.count(), 3);\n        QCOMPARE(QJsonValue(nested[0]), QJsonValue(\"innerValue\"));\n        QCOMPARE(QJsonValue(nested[1]), QJsonValue(2.1));\n    }\n#endif\n}\n\nvoid tst_QtJson::unicodeKeys()\n{\n    QByteArray json = \"{\"\n                      \"\\\"x\\\\u2090_1\\\": \\\"hello_1\\\",\"\n                      \"\\\"y\\\\u2090_2\\\": \\\"hello_2\\\",\"\n                      \"\\\"T\\\\u2090_3\\\": \\\"hello_3\\\",\"\n                      \"\\\"xyz_4\\\": \\\"hello_4\\\",\"\n                      \"\\\"abc_5\\\": \\\"hello_5\\\"\"\n                      \"}\";\n\n    QJsonParseError error;\n    QJsonDocument doc = QJsonDocument::fromJson(json, &error);\n    QVERIFY(error.error == QJsonParseError::NoError);\n    QJsonObject o = doc.object();\n\n    QCOMPARE(o.keys().size(), 5);\n    Q_FOREACH (const QString &key, o.keys()) {\n        QString suffix = key.mid(key.indexOf(QLatin1Char('_')));\n        QCOMPARE(o[key].toString(), QString(\"hello\") + suffix);\n    }\n}\n\nvoid tst_QtJson::garbageAtEnd()\n{\n    QJsonParseError error;\n    QJsonDocument doc = QJsonDocument::fromJson(\"{},\", &error);\n    QVERIFY(error.error == QJsonParseError::GarbageAtEnd);\n    QVERIFY(error.offset == 2);\n    QVERIFY(doc.isEmpty());\n\n    doc = QJsonDocument::fromJson(\"{}    \", &error);\n    QVERIFY(error.error == QJsonParseError::NoError);\n    QVERIFY(!doc.isEmpty());\n}\n\nQTEST_MAIN(tst_QtJson)\n#include \"tst_qtjson.moc\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/json/tst_qtjson.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/\">\n        <file>test.bjson</file>\n        <file>test.json</file>\n        <file>test2.json</file>\n        <file>test3.json</file>\n\t<file>bom.json</file>\n    </qresource>\n</RCC>"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpchttpclient/qjsonrpchttpclient.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\ninclude($${DEPTH}/src/http-parser/http-parser.pri)\n\nTARGET = tst_qjsonrpchttpclient\nHEADERS += \\\n    testhttpserver.h\nSOURCES += \\\n    testhttpserver.cpp \\\n    tst_qjsonrpchttpclient.cpp\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpchttpclient/testhttpserver.cpp",
    "content": "#include <QtTest>\n#include <QPointer>\n#include <QTcpSocket>\n\n#include \"http_parser.h\"\n#include \"testhttpserver.h\"\n\nclass TestHttpServerPrivate\n{\npublic:\n    TestHttpServerPrivate();\n    virtual ~TestHttpServerPrivate();\n\n    // http parsing\n    http_parser *httpParser;\n    http_parser_settings httpParserSettings;\n    QByteArray currentHeaderField;\n    QByteArray currentHeaderValue;\n\n    static int onMessageBegin(http_parser *parser);\n    static int onUrl(http_parser *parser, const char *at, size_t length);\n    static int onHeaderField(http_parser *parser, const char *at, size_t length);\n    static int onHeaderValue(http_parser *parser, const char *at, size_t length);\n    static int onHeadersComplete(http_parser *parser);\n    static int onBody(http_parser *parser, const char *at, size_t length);\n    static int onMessageComplete(http_parser *parser);\n\n    // private slots\n    void _q_socketReadyRead();\n    void _q_socketError(QAbstractSocket::SocketError error);\n    void _q_handleRequest();\n\n    TestHttpServerRequestHandler *requestHandler;\n    QPointer<QTcpSocket> socket;\n\n    QNetworkAccessManager::Operation operation;\n    QNetworkRequest request;\n    QByteArray body;\n};\n\nTestHttpServerPrivate::TestHttpServerPrivate()\n    : httpParser(0),\n      requestHandler(0)\n{\n    // initialize request parser\n    httpParser = (http_parser*)malloc(sizeof(http_parser));\n    http_parser_init(httpParser, HTTP_REQUEST);\n    httpParserSettings.on_message_begin = onMessageBegin;\n    httpParserSettings.on_url = onUrl;\n    httpParserSettings.on_header_field = onHeaderField;\n    httpParserSettings.on_header_value = onHeaderValue;\n    httpParserSettings.on_headers_complete = onHeadersComplete;\n    httpParserSettings.on_body = onBody;\n    httpParserSettings.on_message_complete = onMessageComplete;\n    httpParser->data = this;\n}\n\nTestHttpServerPrivate::~TestHttpServerPrivate()\n{\n    free(httpParser);\n}\n\nint TestHttpServerPrivate::onMessageBegin(http_parser *parser)\n{\n    TestHttpServerPrivate *priv = (TestHttpServerPrivate *)parser->data;\n    priv->request = QNetworkRequest();\n    priv->currentHeaderField.clear();\n    priv->currentHeaderValue.clear();\n    priv->body.clear();\n    return 0;\n}\n\nint TestHttpServerPrivate::onUrl(http_parser *parser, const char *at, size_t length)\n{\n    TestHttpServerPrivate *priv = (TestHttpServerPrivate *)parser->data;\n    QUrl requestUrl = priv->request.url();\n    requestUrl.setPath(QByteArray(at, length));\n    priv->request.setUrl(requestUrl);\n    return 0;\n}\n\nint TestHttpServerPrivate::onHeaderField(http_parser *parser, const char *at, size_t length)\n{\n    TestHttpServerPrivate *priv = (TestHttpServerPrivate *)parser->data;\n    if (!priv->currentHeaderField.isEmpty() && !priv->currentHeaderValue.isEmpty()) {\n        priv->request.setRawHeader(priv->currentHeaderField, priv->currentHeaderValue);\n        priv->currentHeaderField.clear();\n        priv->currentHeaderValue.clear();\n    }\n\n    priv->currentHeaderField.append(at, length);\n    return 0;\n}\n\nint TestHttpServerPrivate::onHeaderValue(http_parser *parser, const char *at, size_t length)\n{\n    TestHttpServerPrivate *priv = (TestHttpServerPrivate *)parser->data;\n    priv->currentHeaderValue.append(at, length);\n    return 0;\n}\n\nint TestHttpServerPrivate::onHeadersComplete(http_parser *parser)\n{\n    Q_UNUSED(parser);\n    return 0;\n}\n\nint TestHttpServerPrivate::onBody(http_parser *parser, const char *at, size_t length)\n{\n    TestHttpServerPrivate *priv = (TestHttpServerPrivate *)parser->data;\n    priv->body.append(at, length);\n    return 0;\n}\n\nint TestHttpServerPrivate::onMessageComplete(http_parser *parser)\n{\n    TestHttpServerPrivate *priv = (TestHttpServerPrivate *)parser->data;\n    switch (parser->method) {\n    case HTTP_HEAD:\n        priv->operation = QNetworkAccessManager::HeadOperation;\n        break;\n    case HTTP_GET:\n        priv->operation = QNetworkAccessManager::GetOperation;\n        break;\n    case HTTP_PUT:\n        priv->operation = QNetworkAccessManager::PutOperation;\n        break;\n    case HTTP_POST:\n        priv->operation = QNetworkAccessManager::PostOperation;\n        break;\n    case HTTP_DELETE:\n        priv->operation = QNetworkAccessManager::DeleteOperation;\n        break;\n    default:\n        priv->operation = QNetworkAccessManager::CustomOperation;\n        break;\n    }\n\n    priv->_q_handleRequest();\n    return 0;\n}\n\nvoid TestHttpServerPrivate::_q_socketReadyRead()\n{\n    Q_ASSERT(httpParser);\n    Q_ASSERT(!socket.isNull());\n    QByteArray buffer = socket->readAll();\n    http_parser_execute(httpParser, &httpParserSettings, buffer.constData(), buffer.size());\n}\n\nvoid TestHttpServerPrivate::_q_socketError(QAbstractSocket::SocketError error)\n{\n    Q_UNUSED(error)\n    Q_ASSERT(!socket.isNull());\n    socket->close();\n    socket->deleteLater();\n}\n\nvoid TestHttpServerPrivate::_q_handleRequest()\n{\n    if (!requestHandler) {\n        qDebug() << Q_FUNC_INFO << \"no request handler installed\";\n        return;\n    }\n\n    QByteArray response = requestHandler->handleRequest(operation, request, body);\n    QCOMPARE(socket->write(response), (qint64)response.size());\n}\n\nclass TestHttpServerSimpleRequestHandler : public TestHttpServerRequestHandler\n{\npublic:\n    explicit TestHttpServerSimpleRequestHandler(const QByteArray &d)\n        : data(d)\n    {\n    }\n\n    virtual QByteArray handleRequest(QNetworkAccessManager::Operation operation,\n                                     const QNetworkRequest &request, const QByteArray &body)\n    {\n        Q_UNUSED(operation);\n        Q_UNUSED(request);\n        Q_UNUSED(body);\n        return data;\n    }\n\nprivate:\n    QByteArray data;\n\n};\n\nTestHttpServer::TestHttpServer(QObject *parent)\n    : QTcpServer(parent),\n      d_ptr(new TestHttpServerPrivate)\n{\n}\n\nTestHttpServer::TestHttpServer(TestHttpServerRequestHandler *requestHandler, QObject *parent)\n    : QTcpServer(parent),\n      d_ptr(new TestHttpServerPrivate)\n{\n    d_func()->requestHandler = requestHandler;\n}\n\nTestHttpServer::~TestHttpServer()\n{\n    Q_D(TestHttpServer);\n    if (d->requestHandler) {\n        delete d->requestHandler;\n        d->requestHandler = 0;\n    }\n}\n\nTestHttpServerRequestHandler *TestHttpServer::requestHandler() const\n{\n    Q_D(const TestHttpServer);\n    return d->requestHandler;\n}\n\nvoid TestHttpServer::setRequestHandler(TestHttpServerRequestHandler *requestHandler)\n{\n    Q_D(TestHttpServer);\n    if (d->requestHandler) {\n        delete d->requestHandler;\n        d->requestHandler = 0;\n    }\n\n    d->requestHandler = requestHandler;\n}\n\nvoid TestHttpServer::setResponseData(const QByteArray &data)\n{\n    setRequestHandler(new TestHttpServerSimpleRequestHandler(data));\n}\n\n#if QT_VERSION >= 0x050000\nvoid TestHttpServer::incomingConnection(qintptr socketDescriptor)\n#else\nvoid TestHttpServer::incomingConnection(int socketDescriptor)\n#endif\n{\n    Q_D(TestHttpServer);\n    d->socket = new QTcpSocket(this);\n    QVERIFY(d->socket->setSocketDescriptor(socketDescriptor));\n    connect(d->socket.data(), SIGNAL(readyRead()), this, SLOT(_q_socketReadyRead()));\n    connect(d->socket.data(), SIGNAL(error(QAbstractSocket::SocketError)),\n                        this, SLOT(_q_socketError(QAbstractSocket::SocketError)));\n}\n\n#include \"moc_testhttpserver.cpp\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpchttpclient/testhttpserver.h",
    "content": "#ifndef TESTHTTPSERVER_H\n#define TESTHTTPSERVER_H\n\n#include <QTcpServer>\n#include <QNetworkAccessManager>\n#include <QNetworkRequest>\n\nclass TestHttpServerRequestHandler\n{\npublic:\n    virtual ~TestHttpServerRequestHandler() {}\n    virtual QByteArray handleRequest(QNetworkAccessManager::Operation operation,\n                                     const QNetworkRequest &request, const QByteArray &body) = 0;\n};\n\nclass TestHttpServerPrivate;\nclass TestHttpServer : public QTcpServer\n{\n    Q_OBJECT\npublic:\n    explicit TestHttpServer(QObject *parent = 0);\n    TestHttpServer(TestHttpServerRequestHandler *requestHandler, QObject *parent = 0);\n    virtual ~TestHttpServer();\n\n    TestHttpServerRequestHandler *requestHandler() const;\n    void setRequestHandler(TestHttpServerRequestHandler *requestHandler);\n\n    void setResponseData(const QByteArray &data);\n\nprotected:\n#if QT_VERSION >= 0x050000\n    virtual void incomingConnection(qintptr socketDescriptor);\n#else\n    virtual void incomingConnection(int socketDescriptor);\n#endif\n\nprivate:\n    Q_DISABLE_COPY(TestHttpServer)\n    Q_DECLARE_PRIVATE(TestHttpServer)\n    QScopedPointer<TestHttpServerPrivate> d_ptr;\n\n    Q_PRIVATE_SLOT(d_func(), void _q_socketReadyRead())\n    Q_PRIVATE_SLOT(d_func(), void _q_socketError(QAbstractSocket::SocketError))\n\n};\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpchttpclient/tst_qjsonrpchttpclient.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QtTest/QtTest>\n\n#include \"testhttpserver.h\"\n#include \"qjsonrpcmessage.h\"\n#include \"qjsonrpchttpclient.h\"\n\n#if QT_VERSION < 0x050000\ntemplate <typename T>\nstruct QScopedPointerObjectDeleteLater\n{\n    static inline void cleanup(T *pointer) { if (pointer) pointer->deleteLater(); }\n};\n\nclass QObject;\ntypedef QScopedPointerObjectDeleteLater<QObject> QScopedPointerDeleteLater;\n#endif\n\nclass TestQJsonRpcHttpClient : public QObject\n{\n    Q_OBJECT\nprivate Q_SLOTS:\n    void init();\n\n    void properties();\n    void basicRequest();\n    void invalidResponse_data();\n    void invalidResponse();\n    void connectionRefused();\n    void requestTimedOut();\n    void issue23_doubleFinishedEmitted();\n};\n\nvoid TestQJsonRpcHttpClient::init()\n{\n}\n\nclass JsonRpcRequestHandler : public TestHttpServerRequestHandler\n{\npublic:\n    virtual QByteArray handleRequest(QNetworkAccessManager::Operation operation,\n                                     const QNetworkRequest &request, const QByteArray &body)\n    {\n        Q_UNUSED(operation)\n        Q_UNUSED(request)\n        QJsonRpcMessage requestMessage = QJsonRpcMessage::fromJson(body);\n        QJsonRpcMessage responseMessage =\n            requestMessage.createResponse(QLatin1String(\"some response data\"));\n        QByteArray responseData = responseMessage.toJson();\n\n        QByteArray reply;\n        reply += \"HTTP/1.0 200\\r\\n\";\n        reply += \"Content-Type: application/json\\r\\n\";\n        reply += \"Content-length: \" + QByteArray::number(responseData.size()) + \"\\r\\n\";\n        reply += \"\\r\\n\";\n        reply += responseData;\n        return reply;\n    }\n};\n\nvoid TestQJsonRpcHttpClient::properties()\n{\n    QJsonRpcHttpClient client;\n    client.setEndPoint(\"testing\");\n    QCOMPARE(client.endPoint(), QUrl(\"http://testing\"));\n    client.setEndPoint(QUrl(\"http://www.google.com\"));\n    QCOMPARE(client.endPoint(), QUrl(\"http://www.google.com\"));\n\n    QNetworkAccessManager manager;\n    QJsonRpcHttpClient withManager(&manager);\n    QCOMPARE(withManager.networkAccessManager(), &manager);\n}\n\nvoid TestQJsonRpcHttpClient::basicRequest()\n{\n    TestHttpServer server;\n    server.setRequestHandler(new JsonRpcRequestHandler);\n    QVERIFY(server.listen());\n\n    QString url =\n        QString(\"%1://localhost:%2\").arg(\"http\").arg(server.serverPort());\n    QJsonRpcHttpClient client(url);\n    QJsonRpcMessage message = QJsonRpcMessage::createRequest(\"testMethod\");\n    QJsonRpcMessage response = client.sendMessageBlocking(message);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n    QCOMPARE(response.result().toString(), QLatin1String(\"some response data\"));\n}\n\nvoid TestQJsonRpcHttpClient::invalidResponse_data()\n{\n    QTest::addColumn<QByteArray>(\"responseData\");\n    QTest::addColumn<QJsonRpc::ErrorCode>(\"expectedError\");\n\n    QTest::newRow(\"empty-data\") <<\n        QByteArray(\"HTTP/1.0 200\\r\\nContent-Type: application/json\\r\\nContent-length: 0\\r\\n\\r\\n\") << QJsonRpc::ParseError;\n    QTest::newRow(\"invalid-json\") <<\n        QByteArray(\"HTTP/1.0 200\\r\\nContent-Type: application/json\\r\\nContent-length: 2\\r\\n\\r\\n{}\") << QJsonRpc::InternalError;\n}\n\nvoid TestQJsonRpcHttpClient::invalidResponse()\n{\n    QFETCH(QByteArray, responseData);\n    QFETCH(QJsonRpc::ErrorCode, expectedError);\n\n    TestHttpServer server;\n    server.setResponseData(responseData);\n    QVERIFY(server.listen());\n\n    QString url =\n        QString(\"%1://localhost:%2\").arg(\"http\").arg(server.serverPort());\n    QJsonRpcHttpClient client(url);\n    QJsonRpcMessage message = QJsonRpcMessage::createRequest(\"someMethod\");\n    QJsonRpcMessage response = client.sendMessageBlocking(message);\n    QCOMPARE(response.type(), QJsonRpcMessage::Error);\n    QCOMPARE(response.errorCode(), int(expectedError));\n}\n\nvoid TestQJsonRpcHttpClient::connectionRefused()\n{\n    QString url = QString(\"%1://localhost:%2\").arg(\"http\").arg(9191);\n    QJsonRpcHttpClient client(url);\n    QJsonRpcMessage message = QJsonRpcMessage::createRequest(\"someMethod\");\n    QJsonRpcMessage response = client.sendMessageBlocking(message);\n    QCOMPARE(response.type(), QJsonRpcMessage::Error);\n    QCOMPARE(response.errorCode(), int(QJsonRpc::InternalError));\n}\n\nvoid TestQJsonRpcHttpClient::requestTimedOut()\n{\n    TestHttpServer server;\n    server.setResponseData(\"HTTP/1.0 200\\r\\n\\r\\n\");\n    QVERIFY(server.listen());\n\n    QString url =\n        QString(\"%1://localhost:%2\").arg(\"http\").arg(server.serverPort());\n    QJsonRpcHttpClient client(url);\n    QJsonRpcMessage message = QJsonRpcMessage::createRequest(\"someMethod\");\n    QJsonRpcMessage response = client.sendMessageBlocking(message, 1);\n    QCOMPARE(response.type(), QJsonRpcMessage::Error);\n    QCOMPARE(response.errorCode(), int(QJsonRpc::TimeoutError));\n}\n\nvoid TestQJsonRpcHttpClient::issue23_doubleFinishedEmitted()\n{\n    QString url = QString(\"%1://localhost:%2\").arg(\"http\").arg(9191);\n    QJsonRpcHttpClient client(url);\n    QJsonRpcMessage message = QJsonRpcMessage::createRequest(\"someMethod\");\n    QJsonRpcServiceReply *reply = client.sendMessage(message);\n    QScopedPointer<QJsonRpcServiceReply> replyPtr(reply);\n    QSignalSpy spy(reply, SIGNAL(finished()));\n\n    QEventLoop responseLoop;\n    connect(reply, SIGNAL(finished()), &responseLoop, SLOT(quit()));\n    QTimer::singleShot(10000, &responseLoop, SLOT(quit()));\n    responseLoop.exec();\n\n    QJsonRpcMessage response = reply->response();\n    QCOMPARE(response.type(), QJsonRpcMessage::Error);\n    QCOMPARE(response.errorCode(), int(QJsonRpc::InternalError));\n    QCOMPARE(spy.size(), 1);\n}\n\nQTEST_MAIN(TestQJsonRpcHttpClient)\n#include \"tst_qjsonrpchttpclient.moc\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpchttpserver/certificates.qrc",
    "content": "<!DOCTYPE RCC>\n<RCC version=\"1.0\">\n <qresource prefix=\"/\">\n\t<file>certs/aspiriniks.ca.crt</file>\n\t<file>certs/fake-login.live.com.pem</file>\n\t<file>certs/fake-login.live.com.key</file>\n\t<file>certs/fluke.key</file>\n\t<file>certs/fluke.cert</file>\n\t<file>certs/qt-test-server-cacert.pem</file>\n </qresource>\n </RCC>\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpchttpserver/certs/aspiriniks.ca.crt",
    "content": "-----BEGIN CERTIFICATE-----\nMIIDnDCCAoQCCQDV3otC4hs2KTANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMC\nTk8xDTALBgNVBAgTBE9zbG8xDTALBgNVBAcTBE9zbG8xDzANBgNVBAoTBlRUIEFT\nQTEOMAwGA1UECxMFUVQgU1cxHDAaBgNVBAMTE2FzcGlyaW5pa3MudHJvbGwubm8x\nIzAhBgkqhkiG9w0BCQEWFGFiYWJpY0B0cm9sbHRlY2guY29tMB4XDTA4MTEwMTA4\nNTcyOFoXDTA5MTEwMTA4NTcyOFowgY8xCzAJBgNVBAYTAk5PMQ0wCwYDVQQIEwRP\nc2xvMQ0wCwYDVQQHEwRPc2xvMQ8wDQYDVQQKEwZUVCBBU0ExDjAMBgNVBAsTBVFU\nIFNXMRwwGgYDVQQDExNhc3BpcmluaWtzLnRyb2xsLm5vMSMwIQYJKoZIhvcNAQkB\nFhRhYmFiaWNAdHJvbGx0ZWNoLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC\nAQoCggEBAMV2bMD1DN3DMgbxU3DXw2i7EWGDXcWjTDtdHvqgIb+9nHqo3MJSrzJy\nqgEPoOsXqswMla9wDPZAsWv5gVAmVSqpy2lfEgfY7LaSHiGD75seF7zIy+CxREHW\nDofHXpJGGJpBCZEKQt2HfHu3+yAYNPucN78tWNZAcPbUg5tfxMZeepRimAZNIxBI\n93SDrl/f9Ka7hvPSzUQsnp8hfdpHlFPFznKfD6yPrjxgz2mT9efavJ4DhtyIa4m+\npaiX515CidDz4A8CFxKZbYvuqq1ilibF/si2so9VhALC77ZcAJP1IMuT8T+WUCxq\nskJqiSCncl0Hgr+ba8MDGF9UQYowgjMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA\nKcJuNUHvjB8ok3cnTmQEeF0LPPkgj28Tqb5TFB8xpVfRI+wvTYsHsmGdOKCgYJ3a\n7VflIsr63ojG8/rXK8H/cx2o2f2Hr3liJdi1UnoLDDRjBqGGz7JNuMreYokPvIbm\neP01mVyK4PO2iYRwHUIAw5eeB1vMWKX2z95MupD+HRLtmGyaLALg8aQxj5N84Ewl\neU2PQfhv8A1wj7aL17kfEUxDerQ1kUzlThJMV1J8Dl0l4C9N8evQkelROJU00i46\noJikA8BW6EpgbnGyNyyj5Loy4wLPKew9nTS8MCJ5xPMQc0urbY/VzuOeUK7WQof7\nxOFSsRAVyQv+yqgmcZMCtg==\n-----END CERTIFICATE-----\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpchttpserver/certs/fake-login.live.com.key",
    "content": "-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAKBgQDOtxdvMa0VHUQYG5q7Tsi1Jj4qKEJppyZEkmuRXOi0fDbd1SwE\nbwHrLGMvDO6OMrYBbq3WDNrtnIfF9CvzUOEch+gjr4hEVQqecU5fb45Wor7yNel3\n/C/gxfbzuXHrsj/gUjNghL2i10+c2NW+hUo/sWO6OusaBT6d6s7ee+YBcQIDAQAB\nAoGAb8cVhu0HuLkgjyCuJMbPRRUu3ED02Iin6sB6JhplQuNAD+grayJTmUVhRJnr\njTziqhedLHe7Em1oBaSo92MutfMpXvWiccSlbNygI61VgmrJpVB+qIN5H9cQc9ql\nZymc+nIPa1+i5rsrOzlpUytTh7AsbZ27QG4tQXR/kQejEiECQQD6BgTxBeT8D7x9\nDuukoBaSCkLwx7U7P1NXx15EI3lA1nO51t6UHfvk/jGPp8Sl4wv4alJ7AQxr5uQ/\nvC3kzA/1AkEA06gNu10se8pe3n8qL2RRt+FmVjHkQdD9Mm2Dx9oWCs2A4wOSOrlo\n6/nKYF1CaQNYn9HgsNbHVEUpnICVO18qDQJBALEw/uOJ1+TDikPfBSWgxx4s45Ad\nGNWqZXh6NNZ5hX9r/IwiOZAjR9fcRmeW8IjYRi2BvH6sGY+HDRAWXzgdXtkCQCma\ndOiJTf8fLjqp4E7kdzOfuI/kyqstOze4Uxjrgz2oW1dEEnA8laUcumzqp+0gXUE8\n7d+UuCWWWrGKjMrYz9kCQQDh5E5+b6Djn082Jo6gvyuXWC5eXju6IdmihlJ2SMzD\ns2y3IDjOUtTeQQRDymLneteMz0ha79KeUp6VnAvZCOVe\n-----END RSA PRIVATE KEY-----\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpchttpserver/certs/fake-login.live.com.pem",
    "content": "-----BEGIN CERTIFICATE-----\nMIIDDjCCAnegAwIBAgIRALC3Ez7Qlvm1b66RyHS9OsAwDQYJKoZIhvcNAQEFBQAw\nXjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGElu\ndGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEXMBUGA1UEAxMObG9naW4ubGl2ZS5jb20w\nHhcNMTEwMzI1MTMyODUwWhcNMTEwNDI0MTMyODUwWjBeMQswCQYDVQQGEwJBVTET\nMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ\ndHkgTHRkMRcwFQYDVQQDEw5sb2dpbi5saXZlLmNvbTCBnzANBgkqhkiG9w0BAQEF\nAAOBjQAwgYkCgYEAzrcXbzGtFR1EGBuau07ItSY+KihCaacmRJJrkVzotHw23dUs\nBG8B6yxjLwzujjK2AW6t1gza7ZyHxfQr81DhHIfoI6+IRFUKnnFOX2+OVqK+8jXp\nd/wv4MX287lx67I/4FIzYIS9otdPnNjVvoVKP7FjujrrGgU+nerO3nvmAXECAwEA\nAaOByzCByDAdBgNVHQ4EFgQUpSOEcmtkQITvBdM2IDfcXnJ0FCAwgZgGA1UdIwSB\nkDCBjYAUpSOEcmtkQITvBdM2IDfcXnJ0FCChYqRgMF4xCzAJBgNVBAYTAkFVMRMw\nEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0\neSBMdGQxFzAVBgNVBAMTDmxvZ2luLmxpdmUuY29tghEAsLcTPtCW+bVvrpHIdL06\nwDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAD+2HT4GSHHKCdbl9VkX\nzsl+D+drMm2b0ksxz9SgPihP7aW50EEIJDEEihNMTa27mhpeOXHc/sLqDi4ECUao\n/0Ns/5uoVuAIrAKCydmtPsonVFh9XWjyrfUzPOHAc9p2bmJ1i9a3kTsLB6jlrVDO\nVufGzsowHlHZ0TtKf5omojU5\n-----END CERTIFICATE-----\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpchttpserver/certs/fluke.cert",
    "content": "Certificate:\n    Data:\n        Version: 3 (0x2)\n        Serial Number: 0 (0x0)\n        Signature Algorithm: sha1WithRSAEncryption\n        Issuer: C=NO, ST=Oslo, L=Nydalen, O=Nokia Corporation and/or its subsidiary(-ies), OU=Development, CN=fluke.troll.no/emailAddress=ahanssen@trolltech.com\n        Validity\n            Not Before: Dec  4 01:10:32 2007 GMT\n            Not After : Apr 21 01:10:32 2035 GMT\n        Subject: C=NO, ST=Oslo, O=Nokia Corporation and/or its subsidiary(-ies), OU=Development, CN=fluke.troll.no\n        Subject Public Key Info:\n            Public Key Algorithm: rsaEncryption\n            RSA Public Key: (1024 bit)\n                Modulus (1024 bit):\n                    00:a7:c8:a0:4a:c4:19:05:1b:66:ba:32:e2:d2:f1:\n                    1c:6f:17:82:e4:39:2e:01:51:90:db:04:34:32:11:\n                    21:c2:0d:6f:59:d8:53:90:54:3f:83:8f:a9:d3:b3:\n                    d5:ee:1a:9b:80:ae:c3:25:c9:5e:a5:af:4b:60:05:\n                    aa:a0:d1:91:01:1f:ca:04:83:e3:58:1c:99:32:45:\n                    84:70:72:58:03:98:4a:63:8b:41:f5:08:49:d2:91:\n                    02:60:6b:e4:64:fe:dd:a0:aa:74:08:e9:34:4c:91:\n                    5f:12:3d:37:4d:54:2c:ad:7f:5b:98:60:36:02:8c:\n                    3b:f6:45:f3:27:6a:9b:94:9d\n                Exponent: 65537 (0x10001)\n        X509v3 extensions:\n            X509v3 Basic Constraints: \n                CA:FALSE\n            Netscape Comment: \n                OpenSSL Generated Certificate\n            X509v3 Subject Key Identifier: \n                21:85:04:3D:23:01:66:E5:F7:9F:1A:84:24:8A:AF:0A:79:F4:E5:AC\n            X509v3 Authority Key Identifier: \n                DirName:/C=NO/ST=Oslo/L=Nydalen/O=Nokia Corporation and/or its subsidiary(-ies)/OU=Development/CN=fluke.troll.no/emailAddress=ahanssen@trolltech.com\n                serial:8E:A8:B4:E8:91:B7:54:2E\n\n    Signature Algorithm: sha1WithRSAEncryption\n        6d:57:5f:d1:05:43:f0:62:05:ec:2a:71:a5:dc:19:08:f2:c4:\n        a6:bd:bb:25:d9:ca:89:01:0e:e4:cf:1f:c1:8c:c8:24:18:35:\n        53:59:7b:c0:43:b4:32:e6:98:b2:a6:ef:15:05:0b:48:5f:e1:\n        a0:0c:97:a9:a1:77:d8:35:18:30:bc:a9:8f:d3:b7:54:c7:f1:\n        a9:9e:5d:e6:19:bf:f6:3c:5b:2b:d8:e4:3e:62:18:88:8b:d3:\n        24:e1:40:9b:0c:e6:29:16:62:ab:ea:05:24:70:36:aa:55:93:\n        ef:02:81:1b:23:10:a2:04:eb:56:95:75:fc:f8:94:b1:5d:42:\n        c5:3f:36:44:85:5d:3a:2e:90:46:8a:a2:b9:6f:87:ae:0c:15:\n        40:19:31:90:fc:3b:25:bb:ae:f1:66:13:0d:85:90:d9:49:34:\n        8f:f2:5d:f9:7a:db:4d:5d:27:f6:76:9d:35:8c:06:a6:4c:a3:\n        b1:b2:b6:6f:1d:d7:a3:00:fd:72:eb:9e:ea:44:a1:af:21:34:\n        7d:c7:42:e2:49:91:19:8b:c0:ad:ba:82:80:a8:71:70:f4:35:\n        31:91:63:84:20:95:e9:60:af:64:8b:cc:ff:3d:8a:76:74:3d:\n        c8:55:6d:e4:8e:c3:2b:1c:e8:42:18:ae:9f:e6:6b:9c:34:06:\n        ec:6a:f2:c3\n-----BEGIN CERTIFICATE-----\nMIIEEzCCAvugAwIBAgIBADANBgkqhkiG9w0BAQUFADCBnDELMAkGA1UEBhMCTk8x\nDTALBgNVBAgTBE9zbG8xEDAOBgNVBAcTB055ZGFsZW4xFjAUBgNVBAoTDVRyb2xs\ndGVjaCBBU0ExFDASBgNVBAsTC0RldmVsb3BtZW50MRcwFQYDVQQDEw5mbHVrZS50\ncm9sbC5ubzElMCMGCSqGSIb3DQEJARYWYWhhbnNzZW5AdHJvbGx0ZWNoLmNvbTAe\nFw0wNzEyMDQwMTEwMzJaFw0zNTA0MjEwMTEwMzJaMGMxCzAJBgNVBAYTAk5PMQ0w\nCwYDVQQIEwRPc2xvMRYwFAYDVQQKEw1Ucm9sbHRlY2ggQVNBMRQwEgYDVQQLEwtE\nZXZlbG9wbWVudDEXMBUGA1UEAxMOZmx1a2UudHJvbGwubm8wgZ8wDQYJKoZIhvcN\nAQEBBQADgY0AMIGJAoGBAKfIoErEGQUbZroy4tLxHG8XguQ5LgFRkNsENDIRIcIN\nb1nYU5BUP4OPqdOz1e4am4CuwyXJXqWvS2AFqqDRkQEfygSD41gcmTJFhHByWAOY\nSmOLQfUISdKRAmBr5GT+3aCqdAjpNEyRXxI9N01ULK1/W5hgNgKMO/ZF8ydqm5Sd\nAgMBAAGjggEaMIIBFjAJBgNVHRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NM\nIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4EFgQUIYUEPSMBZuX3nxqEJIqv\nCnn05awwgbsGA1UdIwSBszCBsKGBoqSBnzCBnDELMAkGA1UEBhMCTk8xDTALBgNV\nBAgTBE9zbG8xEDAOBgNVBAcTB055ZGFsZW4xFjAUBgNVBAoTDVRyb2xsdGVjaCBB\nU0ExFDASBgNVBAsTC0RldmVsb3BtZW50MRcwFQYDVQQDEw5mbHVrZS50cm9sbC5u\nbzElMCMGCSqGSIb3DQEJARYWYWhhbnNzZW5AdHJvbGx0ZWNoLmNvbYIJAI6otOiR\nt1QuMA0GCSqGSIb3DQEBBQUAA4IBAQBtV1/RBUPwYgXsKnGl3BkI8sSmvbsl2cqJ\nAQ7kzx/BjMgkGDVTWXvAQ7Qy5piypu8VBQtIX+GgDJepoXfYNRgwvKmP07dUx/Gp\nnl3mGb/2PFsr2OQ+YhiIi9Mk4UCbDOYpFmKr6gUkcDaqVZPvAoEbIxCiBOtWlXX8\n+JSxXULFPzZEhV06LpBGiqK5b4euDBVAGTGQ/Dslu67xZhMNhZDZSTSP8l35ettN\nXSf2dp01jAamTKOxsrZvHdejAP1y657qRKGvITR9x0LiSZEZi8CtuoKAqHFw9DUx\nkWOEIJXpYK9ki8z/PYp2dD3IVW3kjsMrHOhCGK6f5mucNAbsavLD\n-----END CERTIFICATE-----\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpchttpserver/certs/fluke.key",
    "content": "-----BEGIN RSA PRIVATE KEY-----\nMIICXAIBAAKBgQCnyKBKxBkFG2a6MuLS8RxvF4LkOS4BUZDbBDQyESHCDW9Z2FOQ\nVD+Dj6nTs9XuGpuArsMlyV6lr0tgBaqg0ZEBH8oEg+NYHJkyRYRwclgDmEpji0H1\nCEnSkQJga+Rk/t2gqnQI6TRMkV8SPTdNVCytf1uYYDYCjDv2RfMnapuUnQIDAQAB\nAoGANFzLkanTeSGNFM0uttBipFT9F4a00dqHz6JnO7zXAT26I5r8sU1pqQBb6uLz\n/+Qz5Zwk8RUAQcsMRgJetuPQUb0JZjF6Duv24hNazqXBCu7AZzUenjafwmKC/8ri\nKpX3fTwqzfzi//FKGgbXQ80yykSSliDL3kn/drATxsLCgQECQQDXhEFWLJ0vVZ1s\n1Ekf+3NITE+DR16X+LQ4W6vyEHAjTbaNWtcTKdAWLA2l6N4WAAPYSi6awm+zMxx4\nVomVTsjdAkEAx0z+e7natLeFcrrq8pbU+wa6SAP1VfhQWKitxL1e7u/QO90NCpxE\noQYKzMkmmpOOFjQwEMAy1dvFMbm4LHlewQJAC/ksDBaUcQHHqjktCtrUb8rVjAyW\nA8lscckeB2fEYyG5J6dJVaY4ClNOOs5yMDS2Afk1F6H/xKvtQ/5CzInA/QJATDub\nK+BPU8jO9q+gpuIi3VIZdupssVGmCgObVCHLakG4uO04y9IyPhV9lA9tALtoIf4c\nVIvv5fWGXBrZ48kZAQJBAJmVCdzQxd9LZI5vxijUCj5EI4e+x5DRqVUvyP8KCZrC\nAiNyoDP85T+hBZaSXK3aYGpVwelyj3bvo1GrTNwNWLw=\n-----END RSA PRIVATE KEY-----\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpchttpserver/certs/qt-test-server-cacert.pem",
    "content": "-----BEGIN CERTIFICATE-----\nMIICrTCCAhYCCQCdDn5rci6VDjANBgkqhkiG9w0BAQQFADCBmjEOMAwGA1UEChMF\nTm9raWExFDASBgNVBAsTC1F0IFNvZnR3YXJlMSIwIAYJKoZIhvcNAQkBFhNub2Jv\nZHlAbm9kb21haW4ub3JnMQ0wCwYDVQQHEwRPc2xvMQ0wCwYDVQQIEwRPc2xvMQsw\nCQYDVQQGEwJOTzEjMCEGA1UEAxMacXQtdGVzdC1zZXJ2ZXIucXQtdGVzdC1uZXQw\nHhcNMDkwNzEwMDc0MTIzWhcNMTkwNzA4MDc0MTIzWjCBmjEOMAwGA1UEChMFTm9r\naWExFDASBgNVBAsTC1F0IFNvZnR3YXJlMSIwIAYJKoZIhvcNAQkBFhNub2JvZHlA\nbm9kb21haW4ub3JnMQ0wCwYDVQQHEwRPc2xvMQ0wCwYDVQQIEwRPc2xvMQswCQYD\nVQQGEwJOTzEjMCEGA1UEAxMacXQtdGVzdC1zZXJ2ZXIucXQtdGVzdC1uZXQwgZ8w\nDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM2q22/WNMmn8cC+5EEYGeICySLmp9W6\nAy6eKHr0Xxp3X3epETuPfvAuxp7rOtkS18EMUegkUj8jw0IMEcbyHKFC/rTCaYOt\n93CxGBXMIChiMPAsFeYzGa/D6xzAkfcRaJRQ+Ek3CDLXPnXfo7xpABXezYcPXAJr\ngsgBfWrwHdxzAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAy7YOLCZABQy2Ygkchq1I\n+TUpvMn+gLwAyW8TNErM1V4lNY2+K78RawzKx3SqM97ymCy4TD45EA3A2gmi32NI\nxSKBNjFyzngUqsXBdcSasALiowlZCiJrGwlGX5qCkBlxXvJeUEbuJLPYVl5FBjXZ\n6o00K4cSPCqtqUez7WSmDZU=\n-----END CERTIFICATE-----\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpchttpserver/qjsonrpchttpserver.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\n\nTARGET = tst_qjsonrpchttpserver\nSOURCES = tst_qjsonrpchttpserver.cpp\n\nRESOURCES = certificates.qrc\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpchttpserver/tst_qjsonrpchttpserver.cpp",
    "content": "#include <QtCore/QEventLoop>\n#include <QtCore/QVariant>\n#include <QtTest/QtTest>\n\n#include <QNetworkAccessManager>\n#include <QNetworkRequest>\n#include <QNetworkReply>\n\n#if QT_VERSION >= 0x050000\n#include <QJsonDocument>\n#else\n#include \"json/qjsondocument.h\"\n#endif\n\n#include \"qjsonrpchttpclient.h\"\n#include \"qjsonrpcservice.h\"\n#include \"qjsonrpchttpserver.h\"\n#include \"qjsonrpcmessage.h\"\n\nclass TestQJsonRpcHttpServer: public QObject\n{\n    Q_OBJECT\nprivate Q_SLOTS:\n    void initTestCase();\n    void quickTest();\n    void statusCodes_data();\n    void statusCodes();\n    void invalidMethod_data();\n    void invalidMethod();\n    void missingHeaders_data();\n    void missingHeaders();\n    void testAccessControlHeader();\n    void testMissingAccessControlHeader();\n\nprivate:\n    // temporarily disabled\n    void sslTest();\n\nprivate:\n    QSslConfiguration serverSslConfiguration;\n    QSslConfiguration clientSslConfiguration;\n\n};\n\nQ_DECLARE_METATYPE(QNetworkAccessManager::Operation)\n\nclass TestService : public QJsonRpcService\n{\n    Q_OBJECT\n    Q_CLASSINFO(\"serviceName\", \"service\")\npublic:\n    TestService(QObject *parent = 0)\n        : QJsonRpcService(parent),\n          m_called(0)\n    {}\n\n    void resetCount() { m_called = 0; }\n    int callCount() const {\n        return m_called;\n    }\n\npublic Q_SLOTS:\n    void noParam() const {}\n    QString singleParam(const QString &string) const { return string; }\n    QString multipleParam(const QString &first,\n                          const QString &second,\n                          const QString &third) const\n    {\n        return first + second + third;\n    }\n\n    void numberParameters(int intParam, double doubleParam, float floatParam)\n    {\n        Q_UNUSED(intParam)\n        Q_UNUSED(doubleParam)\n        Q_UNUSED(floatParam)\n    }\n\n    bool variantParameter(const QVariant &variantParam) const\n    {\n        return variantParam.toBool();\n    }\n\n    QVariant variantStringResult() {\n        return \"hello\";\n    }\n\n    QVariantList variantListResult() {\n        return QVariantList() << \"one\" << 2 << 3.0;\n    }\n\n    QVariantMap variantMapResult() {\n        QVariantMap result;\n        result[\"one\"] = 1;\n        result[\"two\"] = 2.0;\n        return result;\n    }\n\n    void increaseCalled() {\n        m_called++;\n    }\n\nprivate:\n    int m_called;\n};\n\nvoid TestQJsonRpcHttpServer::initTestCase()\n{\n    // setup ssl configuration for tests\n    QList<QSslCertificate> caCerts =\n        QSslCertificate::fromPath(QLatin1String(\":/certs/qt-test-server-cacert.pem\"));\n    serverSslConfiguration.setCaCertificates(caCerts);\n    serverSslConfiguration.setProtocol(QSsl::AnyProtocol);\n}\n\nvoid TestQJsonRpcHttpServer::quickTest()\n{\n    QJsonRpcHttpServer server;\n    server.addService(new TestService);\n    QVERIFY(server.listen(QHostAddress::LocalHost, 8118));\n\n    QJsonRpcHttpClient client;\n    client.setEndPoint(\"http://127.0.0.1:8118\");\n\n    QJsonRpcMessage request = QJsonRpcMessage::createRequest(\"service.noParam\");\n    QJsonRpcMessage response = client.sendMessageBlocking(request);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n    QCOMPARE(request.id(), response.id());\n}\n\nvoid TestQJsonRpcHttpServer::sslTest()\n{\n    QJsonRpcHttpServer server;\n    server.setSslConfiguration(serverSslConfiguration);\n    server.addService(new TestService);\n    server.listen(QHostAddress::LocalHost, 8118);\n\n    QJsonRpcHttpClient client;\n    client.setEndPoint(\"http://127.0.0.1:8118\");\n    client.setSslConfiguration(serverSslConfiguration);\n\n    QJsonRpcMessage request = QJsonRpcMessage::createRequest(\"service.noParam\");\n    QJsonRpcMessage response = client.sendMessageBlocking(request);\n    qDebug() << response;\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n    QCOMPARE(request.id(), response.id());\n}\n\nvoid TestQJsonRpcHttpServer::statusCodes_data()\n{\n    QTest::addColumn<QByteArray>(\"body\");\n    QTest::addColumn<int>(\"statusCode\");\n    QTest::addColumn<QByteArray>(\"statusReason\");\n    QTest::addColumn<QByteArray>(\"contentType\");\n\n    {\n        QJsonRpcMessage invalidMethod = QJsonRpcMessage::createRequest(\"invalidMethod\");\n        QTest::newRow(\"404-not-found\") << invalidMethod.toJson() << 404\n                                       << QByteArray(\"Not Found\") << QByteArray(\"application/json\");\n    }\n\n    {\n        QTest::newRow(\"400-bad-request\") << QByteArray(\"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"id\\\": 666}\")\n                                         << 400 << QByteArray(\"Bad Request\") << QByteArray(\"application/json\");\n    }\n\n    {\n        QJsonRpcMessage invalidParameters =\n            QJsonRpcMessage::createRequest(\"service.numberParameters\", false);\n        QTest::newRow(\"500-internal-server-error\") << invalidParameters.toJson()\n                                                   << 500 << QByteArray(\"Internal Server Error\")\n                                                   << QByteArray(\"application/json\");\n    }\n\n    {\n        QJsonRpcMessage request = QJsonRpcMessage::createRequest(\"service.noParam\");\n        QTest::newRow(\"200-ok\") << request.toJson() << 200\n                                << QByteArray(\"OK\") << QByteArray(\"application/json\");\n    }\n\n    {\n        QJsonRpcMessage request = QJsonRpcMessage::createRequest(\"service.noParam\");\n        QTest::newRow(\"200-composite-content-type\") << request.toJson() << 200\n                                << QByteArray(\"OK\") << QByteArray(\"application/json;charset=UTF-8\");\n    }\n\n    /*\n     * TODO: support notifications\n    {\n        QJsonRpcMessage notification = QJsonRpcMessage::createNotification(\"service.noParam\");\n        QTest::newRow(\"204-no-content\") << notification.toJson() << 204\n                               << QByteArray(\"No Content\") << QByteArray(\"OK\") << QByteArray(\"application/json\");\n    }\n    */\n}\n\nvoid TestQJsonRpcHttpServer::statusCodes()\n{\n    QFETCH(QByteArray, body);\n    QFETCH(int, statusCode);\n    QFETCH(QByteArray, statusReason);\n    QFETCH(QByteArray, contentType);\n\n    QJsonRpcHttpServer server;\n    server.addService(new TestService);\n    QVERIFY(server.listen(QHostAddress::LocalHost, 8118));\n\n    QNetworkAccessManager manager;\n    QNetworkRequest request(QUrl(\"http://127.0.0.1:8118\"));\n    request.setHeader(QNetworkRequest::ContentTypeHeader, contentType);\n    request.setRawHeader(\"Accept\", \"application/json-rpc\");\n\n    QScopedPointer<QNetworkReply> reply(manager.post(request, body));\n    connect(reply.data(), SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));\n    connect(reply.data(), SIGNAL(error(QNetworkReply::NetworkError)), &QTestEventLoop::instance(), SLOT(exitLoop()));\n    QTestEventLoop::instance().enterLoop(5);\n    QVERIFY(!QTestEventLoop::instance().timeout());\n\n    QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), statusCode);\n    QCOMPARE(reply->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toByteArray(), statusReason);\n}\n\nvoid TestQJsonRpcHttpServer::invalidMethod_data()\n{\n    QTest::addColumn<QNetworkAccessManager::Operation>(\"operation\");\n    QTest::newRow(\"head-request\") << QNetworkAccessManager::HeadOperation;\n    QTest::newRow(\"put-request\") << QNetworkAccessManager::PutOperation;\n    QTest::newRow(\"delete-request\") << QNetworkAccessManager::DeleteOperation;\n}\n\nvoid TestQJsonRpcHttpServer::invalidMethod()\n{\n    QJsonRpcHttpServer server;\n    server.addService(new TestService);\n    QVERIFY(server.listen(QHostAddress::LocalHost, 8118));\n\n    QNetworkAccessManager manager;\n    QNetworkRequest request(QUrl(\"http://127.0.0.1:8118\"));\n    request.setHeader(QNetworkRequest::ContentTypeHeader, \"application/json\");\n    request.setRawHeader(\"Accept\", \"application/json-rpc\");\n    QJsonRpcMessage requestMessage = QJsonRpcMessage::createRequest(\"service.noParam\");\n\n    QScopedPointer<QNetworkReply> reply;\n    QFETCH(QNetworkAccessManager::Operation, operation);\n    switch (operation) {\n    case QNetworkAccessManager::HeadOperation:\n        reply.reset(manager.head(request));\n        break;\n\n    case QNetworkAccessManager::PutOperation:\n        reply.reset(manager.put(request, requestMessage.toJson()));\n        break;\n\n    case QNetworkAccessManager::DeleteOperation:\n        reply.reset(manager.deleteResource(request));\n        break;\n\n    default:\n        QFAIL(\"untested operation\");\n    }\n\n    connect(reply.data(), SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));\n    connect(reply.data(), SIGNAL(error(QNetworkReply::NetworkError)), &QTestEventLoop::instance(), SLOT(exitLoop()));\n    QTestEventLoop::instance().enterLoop(5);\n    QVERIFY(!QTestEventLoop::instance().timeout());\n\n    QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 405);\n    QCOMPARE(reply->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toByteArray(), QByteArray(\"Method Not Allowed\"));\n}\n\nvoid TestQJsonRpcHttpServer::missingHeaders_data()\n{\n    QTest::addColumn<QNetworkRequest>(\"request\");\n\n    {\n        QNetworkRequest request(QUrl(\"http://127.0.0.1:8118\"));\n        request.setRawHeader(\"Accept\", \"application/json-rpc\");\n        QTest::newRow(\"no-content-type\") << request;\n    }\n\n    {\n        QNetworkRequest request(QUrl(\"http://127.0.0.1:8118\"));\n        request.setHeader(QNetworkRequest::ContentTypeHeader, \"application/json\");\n        QTest::newRow(\"no-accept\") << request;\n    }\n\n    {\n        QNetworkRequest request(QUrl(\"http://127.0.0.1:8118\"));\n        request.setHeader(QNetworkRequest::ContentTypeHeader, \"application/json\");\n        request.setRawHeader(\"Accept\", \"application/invalid\");\n        QTest::newRow(\"no-invalid-accept\") << request;\n    }\n\n    {\n        QNetworkRequest request(QUrl(\"http://127.0.0.1:8118\"));\n        QTest::newRow(\"no-jsonpc-headers\") << request;\n    }\n}\n\nvoid TestQJsonRpcHttpServer::missingHeaders()\n{\n    QJsonRpcHttpServer server;\n    server.addService(new TestService);\n    QVERIFY(server.listen(QHostAddress::LocalHost, 8118));\n\n    QFETCH(QNetworkRequest, request);\n    QNetworkAccessManager manager;\n    QJsonRpcMessage requestMessage = QJsonRpcMessage::createRequest(\"service.noParam\");\n    QScopedPointer<QNetworkReply> reply(manager.post(request, requestMessage.toJson()));\n    connect(reply.data(), SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));\n    connect(reply.data(), SIGNAL(error(QNetworkReply::NetworkError)), &QTestEventLoop::instance(), SLOT(exitLoop()));\n    QTestEventLoop::instance().enterLoop(5);\n    QVERIFY(!QTestEventLoop::instance().timeout());\n\n    QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 400);\n    QCOMPARE(reply->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toByteArray(), QByteArray(\"Bad Request\"));\n}\n\nvoid TestQJsonRpcHttpServer::testMissingAccessControlHeader()\n{\n    QJsonRpcHttpServer server;\n    server.addService(new TestService);\n    QVERIFY(server.listen(QHostAddress::LocalHost, 8118));\n\n    //OPTIONS call *missing* headers on reply\n    QNetworkAccessManager manager;\n    QNetworkRequest request(QUrl(\"http://127.0.0.1:8118\"));\n    request.setRawHeader(\"content-type\", \"text/plain\");\n\n    QScopedPointer<QNetworkReply> reply(manager.sendCustomRequest(request,QByteArray(\"OPTIONS\")));\n    QJsonRpcMessage request_client = QJsonRpcMessage::createRequest(\"service.noParam\");\n    connect(reply.data(), SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));\n    connect(reply.data(), SIGNAL(error(QNetworkReply::NetworkError)), &QTestEventLoop::instance(), SLOT(exitLoop()));\n    QTestEventLoop::instance().enterLoop(1);\n    QVERIFY(!QTestEventLoop::instance().timeout());\n\n    QCOMPARE(reply->rawHeader(\"Access-Control-Allow-Origin\"), QByteArray(\"\"));\n    QCOMPARE(reply->rawHeader(\"Access-Control-Allow-Methods\"), QByteArray(\"\"));\n    QCOMPARE(reply->rawHeader(\"Access-Control-Allow-Headers\"), QByteArray(\"\"));\n    QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);\n}\n\nvoid TestQJsonRpcHttpServer::testAccessControlHeader()\n{\n    QJsonRpcHttpServer server;\n    server.addService(new TestService);\n    QVERIFY(server.listen(QHostAddress::LocalHost, 8118));\n\n    //OPTIONS call check headers on reply\n    QNetworkAccessManager manager;\n    QNetworkRequest request(QUrl(\"http://127.0.0.1:8118\"));\n    request.setRawHeader(\"access-control-request-method\", \"POST\");\n    request.setRawHeader(\"access-control-request-headers\", \"accept, content-type\");\n    request.setRawHeader(\"content-type\", \"text/plain\");\n    request.setRawHeader(\"origin\", \"http://127.0.0.1:8118\");\n\n    QScopedPointer<QNetworkReply> reply(manager.sendCustomRequest(request,QByteArray(\"OPTIONS\")));\n    QJsonRpcMessage request_client = QJsonRpcMessage::createRequest(\"service.noParam\");\n    connect(reply.data(), SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));\n    connect(reply.data(), SIGNAL(error(QNetworkReply::NetworkError)), &QTestEventLoop::instance(), SLOT(exitLoop()));\n    QTestEventLoop::instance().enterLoop(1);\n    QVERIFY(!QTestEventLoop::instance().timeout());\n\n    QVERIFY(reply->hasRawHeader(\"Access-Control-Allow-Origin\"));\n    QCOMPARE(reply->rawHeader(\"Access-Control-Allow-Origin\"), QByteArray(\"http://127.0.0.1:8118\"));\n    QVERIFY(reply->hasRawHeader(\"Access-Control-Allow-Methods\"));\n    QCOMPARE(reply->rawHeader(\"Access-Control-Allow-Methods\"), QByteArray(\"POST\"));\n    QVERIFY(reply->hasRawHeader(\"Access-Control-Allow-Headers\"));\n    QCOMPARE(reply->rawHeader(\"Access-Control-Allow-Headers\"), QByteArray(\"accept, content-type\"));\n}\n\nQTEST_MAIN(TestQJsonRpcHttpServer)\n#include \"tst_qjsonrpchttpserver.moc\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpcmessage/qjsonrpcmessage.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\n\nTARGET = tst_qjsonrpcmessage\nSOURCES = tst_qjsonrpcmessage.cpp\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpcmessage/tst_qjsonrpcmessage.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QtCore/QVariant>\n#include <QtTest/QtTest>\n\n#if QT_VERSION >= 0x050000\n#include <QJsonDocument>\n#else\n#include \"json/qjsondocument.h\"\n#endif\n\n#include \"qjsonrpcmessage.h\"\n\nclass TestQJsonRpcMessage: public QObject\n{\n    Q_OBJECT\nprivate slots:\n    void debugStreams_data();\n    void debugStreams();\n    void invalidData();\n    void invalidStringData_data();\n    void invalidStringData();\n    void invalidDataResponseWithId();\n    void invalidDataResponseWithoutId();\n    void responseSameId();\n    void notificationNoId();\n    void messageTypes();\n    void positionalParameters();\n    void equivalence_data();\n    void equivalence();\n    void withVariantListArgs();\n    void idSentAsString();\n};\n\nvoid TestQJsonRpcMessage::debugStreams_data()\n{\n    QTest::addColumn<QJsonRpcMessage>(\"message\");\n    QTest::addColumn<QString>(\"expectedOutput\");\n\n    QTest::newRow(\"invalid-message\") << QJsonRpcMessage() <<\n        \"QJsonRpcMessage(type=QJsonRpcMessage::Invalid, id=0)\";\n    QJsonRpcMessage request = QJsonRpcMessage::createRequest(\"service.method\");\n    QTest::newRow(\"request-message\") << request <<\n        \"QJsonRpcMessage(type=QJsonRpcMessage::Request, id=1, method=\\\"service.method\\\", params=QJsonValue(undefined) )\";\n\n    QJsonRpcMessage response = request.createResponse(QLatin1String(\"response\"));\n    QTest::newRow(\"response-message\") << response <<\n        \"QJsonRpcMessage(type=QJsonRpcMessage::Response, id=1, result=QJsonValue(string, \\\"response\\\") )\";\n\n    QJsonRpcMessage error = request.createErrorResponse(QJsonRpc::MethodNotFound);\n    QTest::newRow(\"error-message\") << error <<\n        \"QJsonRpcMessage(type=QJsonRpcMessage::Error, id=1, code=-32601, message=\\\"\\\", data=QJsonValue(null) )\";\n\n    QJsonRpcMessage notification = QJsonRpcMessage::createNotification(\"service.notification\");\n    QTest::newRow(\"notification-message\") << notification <<\n        \"QJsonRpcMessage(type=QJsonRpcMessage::Notification, method=\\\"service.notification\\\", params=QJsonValue(undefined) )\";\n}\n\nvoid TestQJsonRpcMessage::debugStreams()\n{\n    QFETCH(QJsonRpcMessage, message);\n    QFETCH(QString, expectedOutput);\n\n    QString actualOutput;\n    QDebug debug(&actualOutput);\n    debug << message;\n    QCOMPARE(actualOutput.trimmed(), expectedOutput.trimmed());\n}\n\nvoid TestQJsonRpcMessage::invalidData()\n{\n    QJsonObject invalidData;\n    QJsonRpcMessage message = QJsonRpcMessage::fromObject(invalidData);\n    QCOMPARE(message.isValid(), false);\n    QCOMPARE(message.type(), QJsonRpcMessage::Invalid);\n    QVERIFY(message.toObject().isEmpty());\n}\n\nvoid TestQJsonRpcMessage::invalidStringData_data()\n{\n    QTest::addColumn<QByteArray>(\"stringData\");\n    QTest::newRow(\"not-json\") << QByteArray(\"invalid json string\");\n    QTest::newRow(\"not-an-object\") << QByteArray(\"[\\\"string\\\"]\");\n}\n\nvoid TestQJsonRpcMessage::invalidStringData()\n{\n    QFETCH(QByteArray, stringData);\n    QJsonRpcMessage message = QJsonRpcMessage::fromJson(stringData);\n    QCOMPARE(message.isValid(), false);\n    QCOMPARE(message.type(), QJsonRpcMessage::Invalid);\n    QVERIFY(message.toObject().isEmpty());\n    QVERIFY(message.params().isUndefined() || message.params().isNull());\n    QVERIFY(message.result().isUndefined() || message.params().isNull());\n    QVERIFY(message.errorData().isUndefined() || message.params().isNull());\n}\n\nvoid TestQJsonRpcMessage::invalidDataResponseWithId()\n{\n    // invalid with id\n    const char *invalid = \"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"params\\\": [], \\\"id\\\": 666}\";\n    QJsonRpcMessage request = QJsonRpcMessage::fromJson(invalid);\n    QJsonRpcMessage error =\n        request.createErrorResponse(QJsonRpc::NoError, QString());\n    QJsonRpcMessage response = request.createResponse(QString());\n    QCOMPARE(request.type(), QJsonRpcMessage::Invalid);\n    QCOMPARE(response.id(), request.id());\n    QCOMPARE(error.type(), QJsonRpcMessage::Error);\n}\n\nvoid TestQJsonRpcMessage::invalidDataResponseWithoutId()\n{\n    // invalid without id\n    const char *invalid = \"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"params\\\": []}\";\n    QJsonRpcMessage request = QJsonRpcMessage::fromJson(invalid);\n    QJsonRpcMessage error =\n        request.createErrorResponse(QJsonRpc::NoError, QString());\n    QJsonRpcMessage response = request.createResponse(QString());\n    QCOMPARE(request.type(), QJsonRpcMessage::Invalid);\n    QCOMPARE(response.type(), QJsonRpcMessage::Invalid);\n    QCOMPARE(error.id(), 0);\n}\n\nvoid TestQJsonRpcMessage::responseSameId()\n{\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"testMethod\");\n    QJsonRpcMessage response =\n        request.createResponse(QLatin1String(\"testResponse\"));\n    QCOMPARE(response.id(), request.id());\n}\n\nvoid TestQJsonRpcMessage::notificationNoId()\n{\n    QJsonRpcMessage notification =\n        QJsonRpcMessage::createNotification(\"testNotification\");\n    QCOMPARE(notification.id(), -1);\n}\n\nvoid TestQJsonRpcMessage::messageTypes()\n{\n    QJsonRpcMessage invalid;\n    QCOMPARE(invalid.type(), QJsonRpcMessage::Invalid);\n\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"testMethod\");\n    QCOMPARE(request.type(), QJsonRpcMessage::Request);\n\n    QJsonRpcMessage response =\n        request.createResponse(QLatin1String(\"testResponse\"));\n    QCOMPARE(response.type(), QJsonRpcMessage::Response);\n\n    QJsonRpcMessage error = request.createErrorResponse(QJsonRpc::NoError);\n    QCOMPARE(error.type(), QJsonRpcMessage::Error);\n\n    QJsonRpcMessage notification =\n        QJsonRpcMessage::createNotification(\"testNotification\");\n    QCOMPARE(notification.type(), QJsonRpcMessage::Notification);\n}\n\n// this is from the spec, I don't think it proves much..\nvoid TestQJsonRpcMessage::positionalParameters()\n{\n    const char *first = \"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"method\\\": \\\"subtract\\\", \\\"params\\\": [42, 23], \\\"id\\\": 1}\";\n    QJsonObject firstObject = QJsonDocument::fromJson(first).object();\n    const char *second = \"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"method\\\": \\\"subtract\\\", \\\"params\\\": [23, 42], \\\"id\\\": 2}\";\n    QJsonObject secondObject = QJsonDocument::fromJson(second).object();\n    QVERIFY2(firstObject.value(\"params\").toArray() != secondObject.value(\"params\").toArray(), \"params should maintain order\");\n}\n\nvoid TestQJsonRpcMessage::equivalence_data()\n{\n    QTest::addColumn<QJsonRpcMessage>(\"lhs\");\n    QTest::addColumn<QJsonRpcMessage>(\"rhs\");\n    QTest::addColumn<bool>(\"equal\");\n\n    QJsonRpcMessage invalid;\n    {\n        // REQUESTS\n        const char *simpleData =\n            \"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"id\\\": 1, \\\"method\\\": \\\"request\\\" }\";\n        QJsonRpcMessage simpleRequest = QJsonRpcMessage::fromJson(simpleData);\n        QJsonRpcMessage simpleRequestCopyCtor(simpleRequest);\n        QJsonRpcMessage simpleRequestEqualsOp = simpleRequest;\n\n        const char *withParametersData =\n            \"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"id\\\": 1, \\\"method\\\": \\\"request\\\", \\\"params\\\": [\\\"with\\\", \\\"parameters\\\"]}\";\n        QJsonRpcMessage simpleRequestWithParameters =\n            QJsonRpcMessage::fromJson(withParametersData);\n\n        const char *withNamedParametersData =\n            \"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"id\\\": 1, \\\"method\\\": \\\"request\\\", \\\"params\\\": {\\\"firstName\\\": \\\"yogi\\\", \\\"lastName\\\": \\\"thebear\\\"}}\";\n        QJsonRpcMessage simpleRequestWithNamedParameters =\n            QJsonRpcMessage::fromJson(withNamedParametersData);\n\n        QTest::newRow(\"simpleRequestCopiesEqual_1\") << simpleRequest << simpleRequestCopyCtor << true;\n        QTest::newRow(\"simpleRequestCopiesEqual_2\") << simpleRequest << simpleRequestEqualsOp << true;\n        QTest::newRow(\"simpleRequestAndSimpleRequestWithParamsNotEqual\") << simpleRequest\n            << simpleRequestWithParameters << false;\n        QTest::newRow(\"simpleRequestAndSimpleRequestWithNamedParamsNotEqual\") << simpleRequest\n            << simpleRequestWithNamedParameters << false;\n        QTest::newRow(\"requestWithParamsNotEqualWithNamedParameters\")\n            << simpleRequestWithParameters << simpleRequestWithNamedParameters << false;\n        QTest::newRow(\"simpleRequestNotEqualInvalid\") << simpleRequest << invalid << false;\n    }\n\n    {\n        // NOTIFICATIONS\n        QJsonRpcMessage simpleNotification = QJsonRpcMessage::createNotification(\"notification\");\n        QJsonRpcMessage simpleNotificationCopyCtor(simpleNotification);\n        QJsonRpcMessage simpleNotificationEqualsOp = simpleNotification;\n\n        QJsonArray params;\n        params.append(QLatin1String(\"yogi\"));\n        params.append(QLatin1String(\"thebear\"));\n        QJsonRpcMessage simpleNotificationWithParams =\n            QJsonRpcMessage::createNotification(\"notification\", params);\n\n        QJsonObject namedParameters;\n        namedParameters.insert(\"firstName\", QLatin1String(\"yogi\"));\n        namedParameters.insert(\"lastName\", QLatin1String(\"thebear\"));\n        QJsonRpcMessage simpleNotificationWithNamedParameters =\n            QJsonRpcMessage::createNotification(\"notification\", namedParameters);\n\n        QTest::newRow(\"simpleNotificationCopiesEqual_1\")\n            << simpleNotification << simpleNotificationCopyCtor << true;\n        QTest::newRow(\"simpleNotificationCopiesEqual_2\")\n            << simpleNotification << simpleNotificationEqualsOp << true;\n        QTest::newRow(\"simpleNotificationNotEqualNotificationWithParams\")\n            << simpleNotification << simpleNotificationWithParams << false;\n        QTest::newRow(\"simpleNotificationNotEqualNotificationWithNamedParameters\")\n            << simpleNotification << simpleNotificationWithNamedParameters << false;\n        QTest::newRow(\"notificationWithParamsNotEqualWithNamedParameters\")\n            << simpleNotificationWithParams << simpleNotificationWithNamedParameters << false;\n        QTest::newRow(\"simpleNotificationNotEqualInvalid\") << simpleNotification << invalid << false;\n    }\n\n    {\n        // ERRORS\n        QJsonRpcMessage basicRequest = QJsonRpcMessage::createRequest(\"blah\", QLatin1String(\"first\"));\n        QJsonRpcMessage lhs = basicRequest.createErrorResponse(QJsonRpc::InternalError, \"some error\");\n        QJsonRpcMessage rhs = basicRequest.createErrorResponse(QJsonRpc::InternalError, \"some error\");\n        QJsonRpcMessage invalidRhs = basicRequest.createErrorResponse(QJsonRpc::InvalidRequest, \"some error\");\n\n        QTest::newRow(\"errorResponseEqual\") << lhs << rhs << true;\n        QTest::newRow(\"errorResponseNotEqual\") << lhs << invalidRhs << false;\n    }\n}\n\nvoid TestQJsonRpcMessage::equivalence()\n{\n    QFETCH(QJsonRpcMessage, lhs);\n    QFETCH(QJsonRpcMessage, rhs);\n    QFETCH(bool, equal);\n\n    if (equal)\n        QCOMPARE(lhs, rhs);\n    else\n        QVERIFY(lhs != rhs);\n}\n\nvoid TestQJsonRpcMessage::withVariantListArgs()\n{\n    const char *varListArgsFormat = \"{ \" \\\n            \"\\\"id\\\": %1, \" \\\n            \"\\\"jsonrpc\\\": \\\"2.0\\\", \" \\\n            \"\\\"method\\\": \\\"service.variantListParameter\\\", \" \\\n            \"\\\"params\\\": [[ 1, 20, \\\"hello\\\", false ]] \" \\\n            \"}\";\n\n    QVariantList firstParameter;\n    firstParameter << 1 << 20 << \"hello\" << false;\n\n    QJsonArray params;\n    params.append(QJsonArray::fromVariantList(firstParameter));\n    QJsonRpcMessage requestFromQJsonRpc =\n        QJsonRpcMessage::createRequest(\"service.variantListParameter\", params);\n\n    // QJsonRpcMessage::createRequest is creating objects with an unique id,\n    // and to allow a random test execution order - json data must have the same id\n    int id = requestFromQJsonRpc.id();\n    QByteArray varListArgs = QString(varListArgsFormat).arg(id).toLatin1();\n\n    QJsonRpcMessage requestFromData = QJsonRpcMessage::fromJson(varListArgs);\n    QCOMPARE(requestFromQJsonRpc, requestFromData);\n}\n\nvoid TestQJsonRpcMessage::idSentAsString()\n{\n    const char *messageWithStringId = \"{ \" \\\n            \"\\\"id\\\": \\\"%1\\\", \" \\\n            \"\\\"jsonrpc\\\": \\\"2.0\\\", \" \\\n            \"\\\"method\\\": \\\"service.someMethod\\\", \" \\\n            \"\\\"params\\\": [[ 1, 20, \\\"hello\\\", false ]] \" \\\n            \"}\";\n\n    const char *errorMessageWithStringId = \"{ \" \\\n            \"\\\"id\\\": \\\"%1\\\", \" \\\n            \"\\\"jsonrpc\\\": \\\"2.0\\\", \" \\\n            \"\\\"error\\\": { \\\"code\\\": \\\"-32601\\\", \\\"data\\\": null } \" \\\n            \"}\";\n\n    QVariantList firstParameter;\n    firstParameter << 1 << 20 << \"hello\" << false;\n\n    QJsonArray params;\n    params.append(QJsonArray::fromVariantList(firstParameter));\n    QJsonRpcMessage requestFromQJsonRpc =\n        QJsonRpcMessage::createRequest(\"service.someMethod\", params);\n    int id = requestFromQJsonRpc.id();\n    QByteArray messageData = QString(messageWithStringId).arg(id).toLatin1();\n    QJsonRpcMessage requestFromData = QJsonRpcMessage::fromJson(messageData);\n\n    QJsonRpcMessage errorFromQJsonRpc =\n        requestFromQJsonRpc.createErrorResponse(QJsonRpc::MethodNotFound);\n    QByteArray errorData = QString(errorMessageWithStringId).arg(id).toLatin1();\n    QJsonRpcMessage errorFromData = QJsonRpcMessage::fromJson(errorData);\n\n    QCOMPARE(requestFromQJsonRpc, requestFromData);\n    QCOMPARE(errorFromQJsonRpc, errorFromData);\n}\n\nQTEST_MAIN(TestQJsonRpcMessage)\n#include \"tst_qjsonrpcmessage.moc\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpcmetatype/qjsonrpcmetatype.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\n\nTARGET = tst_qjsonrpcmetatype\nSOURCES = \\\n    tst_qjsonrpcmetatype.cpp\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpcmetatype/tst_qjsonrpcmetatype.cpp",
    "content": "/*\n * Copyright (C) 2013 Fargier Sylvain\n * Copyright (C) 2014 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QtCore/QVariant>\n#include <QtTest/QtTest>\n\n#if QT_VERSION >= 0x050000\n#include <QJsonDocument>\n#else\n#include \"json/qjsondocument.h\"\n#endif\n\n#include \"qjsonrpcmetatype.h\"\n#include \"qjsonrpcabstractserver.h\"\n#include \"qjsonrpcmessage.h\"\n#include \"qjsonrpcservice.h\"\n\nclass TestQJsonRpcMetaType: public QObject\n{\n    Q_OBJECT\nprivate slots:\n    void initTestCase();\n    void customParameterTypes();\n    void customReturnTypes();\n    void invalidParameterTypes();\n    void enums();\n\nprivate:\n    /*\n     * There's no way to guess which method is the best to dispatch a custom type\n     * for the moment, something like a signature, or a typetesting functor might\n     * be good.\n     *\n     * This test will fail until then\n     */\n    void commonMethodName();\n\n};\n\nclass CustomClass : public QObject\n{\npublic:\n    CustomClass(int data = 0, QObject *parent = 0)\n        : QObject(parent),\n          data(data)\n    {}\n\n    CustomClass(const CustomClass &other)\n        : QObject(),\n          data(other.data)\n    {}\n\n    CustomClass &operator=(const CustomClass &other) {\n        if (&other != this)\n            data = other.data;\n        return *this;\n    }\n\n    QJsonValue toJson() const {\n        return QJsonValue(data);\n    }\n\n    static CustomClass fromJson(const QJsonValue &value) {\n        return CustomClass(value.toInt());\n    }\n\n    int data;\n};\nQ_DECLARE_METATYPE(CustomClass)\n\nclass AnotherCustomClass\n{\npublic:\n    explicit AnotherCustomClass(const QString &str = QString())\n        : data(str)\n    {}\n\n    QJsonValue toJson() const {\n        return QJsonValue(data);\n    }\n\n    static AnotherCustomClass fromJson(const QJsonValue &value) {\n        return AnotherCustomClass(value.toString());\n    }\n\n    QString data;\n};\nQ_DECLARE_METATYPE(AnotherCustomClass)\n\nclass UnboundClass : public QObject\n{\npublic:\n    UnboundClass(QObject *parent = 0)\n        : QObject(parent)\n    {}\n};\n\nclass TestService : public QJsonRpcService\n{\n    Q_OBJECT\n    Q_CLASSINFO(\"serviceName\", \"service\")\n    Q_ENUMS(TestEnum)\n\npublic:\n    TestService(QObject *parent = 0)\n        : QJsonRpcService(parent)\n    {}\n\n    QJsonRpcMessage testDispatch(const QJsonRpcMessage &message) {\n        return QJsonRpcService::dispatch(message);\n    }\n\n    enum TestEnum {\n        ZERO = 0, ONE = 1, TWO = 2, THREE = 3\n    };\n\n    static QMetaEnum TestMetaEnum() {\n        static int i = TestService::staticMetaObject.indexOfEnumerator(\"TestEnum\");\n        return TestService::staticMetaObject.enumerator(i);\n    }\n\npublic Q_SLOTS:\n    void customParameterType(const CustomClass &param) const {\n        QCOMPARE(param.data, 42);\n    }\n\n    CustomClass customReturnType(const CustomClass &param) const {\n        CustomClass ret(param);\n        ++ret.data;\n        return ret;\n    }\n\n    void invalidParameterType(const UnboundClass &) const {\n        QVERIFY(false);\n    }\n\n    void enums(TestService::TestEnum) {\n        QVERIFY(true);\n    }\n\n    int commonMethodName(const CustomClass &c) {\n        return c.data;\n    }\n\n    QString commonMethodName(const AnotherCustomClass &c) {\n        return c.data;\n    }\n};\nQ_DECLARE_METATYPE(TestService::TestEnum)\n\nQJsonValue toJson(TestService::TestEnum e)\n{\n    return QString(TestService::TestMetaEnum().valueToKey(e));\n}\n\nTestService::TestEnum fromJson(const QJsonValue &val)\n{\n    if (val.isString()) {\n        QString str(val.toString());\n        if (str.isEmpty())\n            return TestService::ZERO;\n        return (TestService::TestEnum) TestService::TestMetaEnum().keysToValue(str.toLatin1().constData());\n    } else if (val.isDouble()) {\n        int idx = (int) val.toDouble();\n        if (!TestService::TestMetaEnum().valueToKey(idx))\n            return TestService::ZERO;\n        return (TestService::TestEnum) idx;\n    }\n\n    return TestService::ZERO;\n}\n\nclass TestServiceProvider : public QObject, public QJsonRpcServiceProvider\n{\npublic:\n    TestServiceProvider() {}\n};\n\nvoid TestQJsonRpcMetaType::initTestCase()\n{\n    qRegisterJsonRpcMetaType<CustomClass>(\"CustomClass\");\n    qRegisterJsonRpcMetaType<AnotherCustomClass>(\"CustomClass\");\n\n    // TODO: incorporate enums into qRegisterJsonRpcMetaType\n    QMetaType::registerConverter<TestService::TestEnum, QJsonValue>(&toJson);\n    QMetaType::registerConverter<QJsonValue, TestService::TestEnum>(&fromJson);\n}\n\n/*\n * Custom class parameter\n */\nvoid TestQJsonRpcMetaType::customParameterTypes()\n{\n    TestServiceProvider provider;\n    TestService service;\n    provider.addService(&service);\n\n    CustomClass custom(42);\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"service.customParameterType\", custom.toJson());\n    QJsonRpcMessage response = service.testDispatch(request);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n}\n\nvoid TestQJsonRpcMetaType::customReturnTypes()\n{\n    TestServiceProvider provider;\n    TestService service;\n    provider.addService(&service);\n\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"service.customReturnType\", CustomClass().toJson());\n    QJsonRpcMessage response = service.testDispatch(request);\n\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n    QVariant result = response.result();\n    QVERIFY(result.canConvert<CustomClass>());\n    QCOMPARE(result.value<CustomClass>().data, 1);\n}\n\nvoid TestQJsonRpcMetaType::invalidParameterTypes()\n{\n    TestServiceProvider provider;\n    TestService service;\n    provider.addService(&service);\n\n    UnboundClass custom;\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"service.invalidParameterType\",\n                QJsonValue::fromVariant(QVariant::fromValue(CustomClass())));\n    QJsonRpcMessage response = service.testDispatch(request);\n    QVERIFY(response.type() == QJsonRpcMessage::Error);\n    QCOMPARE(response.errorCode(), (int) QJsonRpc::MethodNotFound);\n}\n\nvoid TestQJsonRpcMetaType::enums()\n{\n    TestServiceProvider provider;\n    TestService service;\n    provider.addService(&service);\n\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"service.enums\", TestService::ONE);\n    QJsonRpcMessage response = service.testDispatch(request);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n\n    request = QJsonRpcMessage::createRequest(\"service.enums\", QLatin1String(\"ONE\"));\n    response = service.testDispatch(request);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n}\n\nvoid TestQJsonRpcMetaType::commonMethodName()\n{\n    TestServiceProvider provider;\n    TestService service;\n    provider.addService(&service);\n\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"service.commonMethodName\", CustomClass(42).toJson());\n    QJsonRpcMessage response = service.testDispatch(request);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n\n    CustomClass c(CustomClass::fromJson(response.result()));\n    QCOMPARE(c.data, 42);\n\n    request = QJsonRpcMessage::createRequest(\"service.commonMethodName\",\n                AnotherCustomClass(\"test string\").toJson());\n    response = service.testDispatch(request);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n\n    AnotherCustomClass ac(AnotherCustomClass::fromJson(response.result()));\n    QCOMPARE(ac.data, QLatin1String(\"test string\"));\n}\n\nQTEST_MAIN(TestQJsonRpcMetaType)\n#include \"tst_qjsonrpcmetatype.moc\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpcserver/qjsonrpcserver.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\n\nTARGET = tst_qjsonrpcserver\nHEADERS = \\\n    testservices.h\nSOURCES = \\\n    testservices.cpp \\\n    tst_qjsonrpcserver.cpp\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpcserver/testservices.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QEventLoop>\n#include <QTimer>\n#include <QDebug>\n#include <QtTest>\n\n#include \"qjsonrpcsocket.h\"\n#include \"testservices.h\"\n\nTestService::TestService(QObject *parent)\n    : QJsonRpcService(parent),\n      m_called(0)\n{\n}\n\nvoid TestService::resetCount()\n{\n    m_called = 0;\n}\n\nint TestService::callCount() const\n{\n    return m_called;\n}\n\nvoid TestService::noParam() const\n{\n}\n\nQString TestService::singleParam(const QString &string) const\n{\n    return string;\n}\n\nQString TestService::multipleParam(const QString &first, const QString &second, const QString &third) const\n{\n    return first + second + third;\n}\n\nvoid TestService::numberParameters(int intParam, double doubleParam)\n{\n    if (intParam == 10 && doubleParam == 3.14159) {\n        m_called++;\n        Q_EMIT numberParametersCalled();\n    }\n}\n\nbool TestService::variantParameter(const QVariant &variantParam) const\n{\n    return variantParam.toBool();\n}\n\nQVariantList TestService::variantListParameter(const QVariantList &data)\n{\n    return data;\n}\n\nQVariant TestService::variantStringResult()\n{\n    return QLatin1String(\"hello\");\n}\n\nQVariantList TestService::variantListResult()\n{\n    return QVariantList() << \"one\" << 2 << 3.0;\n}\n\nQVariantMap TestService::variantMapResult()\n{\n    QVariantMap result;\n    result[\"one\"] = 1;\n    result[\"two\"] = 2.0;\n    return result;\n}\n\n/* NOTE: suppress binding warnings\nbool TestService::methodWithListOfInts(const QList<int> &list)\n{\n    if (list.size() < 3)\n        return false;\n    if (list.at(0) != 300)\n        return false;\n    if (list.at(1) != 30)\n        return false;\n    if (list.at(2) != 3)\n        return false;\n    return true;\n}\n*/\n\nQString TestService::variantMapInvalidParam(const QVariantMap &map)\n{\n    return map[\"foo\"].toString();\n}\n\nvoid TestService::outputParameter(int in1, int &out, int in2)\n{\n    out = in1 + out + in2;\n}\n\nvoid TestService::outputParameterWithStrings(const QString &first, QString &output, const QString &last)\n{\n    if (output.isEmpty())\n        output = QString(\"%1 %2\").arg(first).arg(last);\n    else\n        output.append(QString(\" %1 %2\").arg(first).arg(last));\n}\n\nbool TestService::overloadedMethod(int input)\n{\n    Q_UNUSED(input)\n    return true;\n}\n\nbool TestService::overloadedMethod(const QString &input)\n{\n    Q_UNUSED(input)\n    return false;\n}\n\nbool TestService::stringListParameter(int one, const QString &two, const QString &three, const QStringList &list)\n{\n    Q_UNUSED(one);\n    Q_UNUSED(two);\n    Q_UNUSED(three);\n    Q_UNUSED(list);\n    return true;\n}\n\nQJsonArray TestService::returnQJsonArray()\n{\n    QJsonArray array;\n    array.append(1);\n    array.append(QLatin1String(\"two\"));\n    array.append(true);\n    return array;\n}\n\nQJsonObject TestService::returnQJsonObject()\n{\n    QJsonObject object;\n    object.insert(\"one\", QLatin1String(\"one\"));\n    object.insert(\"two\", 2);\n    object.insert(\"three\", true);\n    return object;\n}\n\nQVariantMap TestService::hugeResponse()\n{\n    QVariantMap result;\n    for (int i = 0; i < 1000; i++) {\n        QString key = QString(\"testKeyForHugeResponse%1\").arg(i);\n        result[key] = \"some sample data to make the response larger\";\n    }\n\n    return result;\n}\n\nQString TestService::defaultParametersMethod(const QString &name)\n{\n    if (name.isEmpty())\n        return \"empty string\";\n    return QString(\"hello %1\").arg(name);\n}\n\nQString TestService::defaultParametersMethod2(const QString &name, int year)\n{\n    return QString(\"%1%2\").arg(name).arg(year);\n}\n\nTestServiceWithoutServiceName::TestServiceWithoutServiceName(QObject *parent)\n    : QJsonRpcService(parent)\n{\n}\n\nQString TestServiceWithoutServiceName::testMethod(const QString &string) const\n{\n    return string;\n}\n\nTestComplexMethodService::TestComplexMethodService(QObject *parent)\n    : QJsonRpcService(parent)\n{\n}\n\nvoid TestComplexMethodService::testMethod()\n{\n}\n\nTestDelayedResponseService::TestDelayedResponseService(QObject *parent)\n    : QJsonRpcService(parent)\n{\n}\n\nvoid TestDelayedResponseService::delayedResponse()\n{\n    QVERIFY(currentRequest().isValid());\n    beginDelayedResponse();\n    m_request = currentRequest();\n    QTimer::singleShot(250, this, SLOT(delayedResponseComplete()));\n}\n\nvoid TestDelayedResponseService::delayedResponseWithClosedSocket()\n{\n    QVERIFY(currentRequest().isValid());\n    beginDelayedResponse();\n    m_request = currentRequest();\n    QTimer::singleShot(250, this, SLOT(delayedResponseWithClosedSocketComplete()));\n}\n\nQString TestDelayedResponseService::immediateResponse()\n{\n    return QLatin1String(\"immediate\");\n}\n\nvoid TestDelayedResponseService::delayedResponseComplete()\n{\n    m_request.respond(QLatin1String(\"delayed\"));\n}\n\nvoid TestDelayedResponseService::delayedResponseWithClosedSocketComplete()\n{\n    QJsonRpcMessage requestMessage = m_request.request();\n    QJsonRpcMessage responseMessage = requestMessage.createResponse(QLatin1String(\"delayed\"));\n    bool result = m_request.respond(responseMessage);\n    Q_EMIT responseResult(result);\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpcserver/testservices.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef TESTSERVICES_H\n#define TESTSERVICES_H\n\n#include \"qjsonrpcservice.h\"\n\nclass TestService : public QJsonRpcService\n{\n    Q_OBJECT\n    Q_CLASSINFO(\"serviceName\", \"service\")\npublic:\n    explicit TestService(QObject *parent = 0);\n\n    void resetCount();\n    int callCount() const;\n\nQ_SIGNALS:\n    void numberParametersCalled();\n\npublic Q_SLOTS:\n    void noParam() const;\n    QString singleParam(const QString &string) const;\n    QString multipleParam(const QString &first, const QString &second, const QString &third) const;\n    void numberParameters(int intParam, double doubleParam);\n    bool variantParameter(const QVariant &variantParam) const;\n    QVariantList variantListParameter(const QVariantList &data);\n    QVariant variantStringResult();\n    QVariantList variantListResult();\n    QVariantMap variantMapResult();\n    QVariantMap hugeResponse();\n    QString defaultParametersMethod(const QString &name = QString());\n    QString defaultParametersMethod2(const QString &name = QString(), int year = 2012);\n\n    // NOTE: suppress binding warnings\n    // bool methodWithListOfInts(const QList<int> &list);\n\n    QString variantMapInvalidParam(const QVariantMap &map);\n    void outputParameter(int in1, int &out, int in2);\n    void outputParameterWithStrings(const QString &first, QString &output, const QString &last);\n    bool overloadedMethod(int input);\n    bool overloadedMethod(const QString &input);\n    bool stringListParameter(int one, const QString &two, const QString &three, const QStringList &list);\n\n    // return values\n    QJsonArray returnQJsonArray();\n    QJsonObject returnQJsonObject();\n\nprivate:\n    int m_called;\n\n};\n\nclass TestServiceWithoutServiceName : public QJsonRpcService\n{\n    Q_OBJECT\npublic:\n    TestServiceWithoutServiceName(QObject *parent = 0);\n\npublic Q_SLOTS:\n    QString testMethod(const QString &string) const;\n\n};\n\nclass TestComplexMethodService : public QJsonRpcService\n{\n    Q_OBJECT\n    Q_CLASSINFO(\"serviceName\", \"service.complex.prefix.for\")\npublic:\n    TestComplexMethodService(QObject *parent = 0);\n\npublic Q_SLOTS:\n    void testMethod();\n};\n\nclass TestDelayedResponseService : public QJsonRpcService\n{\n    Q_OBJECT\n    Q_CLASSINFO(\"serviceName\", \"service\")\npublic:\n    TestDelayedResponseService(QObject *parent = 0);\n\nQ_SIGNALS:\n    void responseResult(bool result);\n\npublic Q_SLOTS:\n    void delayedResponse();\n    void delayedResponseWithClosedSocket();\n    QString immediateResponse();\n\nprivate Q_SLOTS:\n    void delayedResponseComplete();\n    void delayedResponseWithClosedSocketComplete();\n\nprivate:\n    QJsonRpcServiceRequest m_request;\n\n};\n\n#endif  // TESTSERVICES_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpcserver/tst_qjsonrpcserver.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QLocalSocket>\n#include <QTcpSocket>\n#include <QScopedPointer>\n\n#include <QtCore/QEventLoop>\n#include <QtCore/QVariant>\n#include <QtTest/QtTest>\n\n#if QT_VERSION >= 0x050000\n#include <QJsonDocument>\n#else\n#include \"json/qjsondocument.h\"\n#endif\n\n#include \"qjsonrpcabstractserver.h\"\n#include \"qjsonrpclocalserver.h\"\n#include \"qjsonrpctcpserver.h\"\n#include \"qjsonrpchttpserver.h\"\n#include \"qjsonrpchttpclient.h\"\n#include \"qjsonrpcsocket.h\"\n#include \"qjsonrpcmessage.h\"\n#include \"qjsonrpcservicereply.h\"\n#include \"testservices.h\"\n\nclass TestQJsonRpcServer: public QObject\n{\n    Q_OBJECT\npublic:\n    TestQJsonRpcServer();\n\n    enum ServerType {\n        TcpServer,\n        LocalServer,\n        HttpServer\n    };\n\nprivate Q_SLOTS:\n    void initTestCase_data();\n    void initTestCase();\n    void cleanupTestCase();\n    void init();\n    void cleanup();\n\n    void noParameter();\n    void singleParameter();\n    void multiParameter();\n    void variantParameter();\n    void variantListParameter();\n    void variantResult();\n    void invalidArgs();\n    void methodNotFound();\n    void invalidRequest();\n    void notifyConnectedClients_data();\n    void notifyConnectedClients();\n    void numberParameters();\n    void hugeResponse();\n    void complexMethod();\n    void defaultParameters();\n    void overloadedMethod();\n    void qVariantMapInvalidParam();\n    void stringListParameter();\n    void outputParameter();\n#if QT_VERSION >= 0x050200\n    void jsonReturnTypes();\n#endif\n    void notifyServiceSocket();\n    void userDeletesReplyOnDelayedResponse();\n    void delayedResponseBasic();\n    void delayedResponseSocketClosed();\n\n    void addRemoveService();\n    void serviceWithNoGivenName();\n    void cantRemoveInvalidService();\n    void cantAddServiceTwice();\n\nprivate:\n    QJsonRpcAbstractSocket *createClient();\n\n    // client related\n    QScopedPointer<QJsonRpcAbstractSocket> clientSocket;\n    QList<QTcpSocket*> tcpSockets;\n    QList<QLocalSocket*> localSockets;\n\n    // server related\n    QJsonRpcAbstractServer *server;\n    QThread serverThread;\n    QScopedPointer<QJsonRpcTcpServer> tcpServer;\n    QScopedPointer<QJsonRpcLocalServer> localServer;\n    QScopedPointer<QJsonRpcHttpServer> httpServer;\n\n    quint16 tcpServerPort;\n    quint16 httpServerPort;\n\nprivate:\n    // temporarily disabled\n    // void testListOfInts();\n};\nQ_DECLARE_METATYPE(TestQJsonRpcServer::ServerType)\nQ_DECLARE_METATYPE(QJsonRpcMessage::Type)\n\nTestQJsonRpcServer::TestQJsonRpcServer()\n    : server(0)\n{\n}\n\nvoid TestQJsonRpcServer::initTestCase_data()\n{\n    QTest::addColumn<ServerType>(\"serverType\");\n    QTest::newRow(\"tcp\") << TcpServer;\n    QTest::newRow(\"local\") << LocalServer;\n    QTest::newRow(\"http\") << HttpServer;\n}\n\nvoid TestQJsonRpcServer::initTestCase()\n{\n    serverThread.start();\n}\n\nvoid TestQJsonRpcServer::cleanupTestCase()\n{\n    serverThread.quit();\n    QVERIFY(serverThread.wait());\n}\n\nQJsonRpcAbstractSocket *TestQJsonRpcServer::createClient()\n{\n    QFETCH_GLOBAL(ServerType, serverType);\n\n    QJsonRpcAbstractSocket *socket = 0;\n    if (serverType == LocalServer) {\n        QLocalSocket *localSocket = new QLocalSocket;\n        connect(localServer.data(), SIGNAL(clientConnected()),\n                &QTestEventLoop::instance(), SLOT(exitLoop()));\n        localSocket->connectToServer(\"qjsonrpc-test-local-server\");\n        QTestEventLoop::instance().enterLoop(5);\n        if (QTestEventLoop::instance().timeout() || !localSocket->waitForConnected()) {\n            delete localSocket;\n            return 0;\n        }\n\n        socket = new QJsonRpcSocket(localSocket);\n        localSockets.append(localSocket);\n    } else if (serverType == TcpServer) {\n        QTcpSocket *tcpSocket = new QTcpSocket;\n        connect(tcpServer.data(), SIGNAL(clientConnected()),\n                &QTestEventLoop::instance(), SLOT(exitLoop()));\n        tcpSocket->connectToHost(QHostAddress::LocalHost, tcpServerPort);\n        QTestEventLoop::instance().enterLoop(5);\n        if (QTestEventLoop::instance().timeout() || !tcpSocket->waitForConnected()) {\n            delete tcpSocket;\n            return 0;\n        }\n\n        socket = new QJsonRpcSocket(tcpSocket);\n        tcpSockets.append(tcpSocket);\n    } else if (serverType == HttpServer) {\n        QJsonRpcHttpClient *client = new QJsonRpcHttpClient;\n        client->setEndPoint(\"http://127.0.0.1:\" + QString::number(httpServerPort));\n        socket = client;\n    }\n\n    return socket;\n}\n\nvoid TestQJsonRpcServer::init()\n{\n    QFETCH_GLOBAL(ServerType, serverType);\n    if (serverType == LocalServer) {\n        localServer.reset(new QJsonRpcLocalServer);\n        QVERIFY(localServer->listen(\"qjsonrpc-test-local-server\"));\n        localServer->moveToThread(&serverThread);\n        server = localServer.data();\n    } else if (serverType == TcpServer) {\n        tcpServer.reset(new QJsonRpcTcpServer);\n        tcpServerPort = quint16(91919 + qrand() % 1000);\n        QVERIFY(tcpServer->listen(QHostAddress::LocalHost, tcpServerPort));\n        tcpServer->moveToThread(&serverThread);\n        server = tcpServer.data();\n    } else if (serverType == HttpServer) {\n        httpServer.reset(new QJsonRpcHttpServer);\n        httpServerPort = quint16(8118 + qrand() % 1000);\n        QVERIFY(httpServer->listen(QHostAddress::LocalHost, httpServerPort));\n        httpServer->moveToThread(&serverThread);\n        server = httpServer.data();\n    }\n\n    clientSocket.reset(createClient());\n    QVERIFY(!clientSocket.isNull());\n\n    if (serverType == LocalServer || serverType == TcpServer)\n        QCOMPARE(server->connectedClientCount(), 1);\n}\n\nvoid TestQJsonRpcServer::cleanup()\n{\n    QFETCH_GLOBAL(ServerType, serverType);\n    if (serverType == TcpServer) {\n        // disconnect clients\n        while (!tcpSockets.isEmpty()) {\n            QTcpSocket *tcpSocket = tcpSockets.takeFirst();\n            connect(tcpServer.data(), SIGNAL(clientDisconnected()), &QTestEventLoop::instance(), SLOT(exitLoop()));\n            if (tcpSocket->state() == QAbstractSocket::ConnectedState) {\n                tcpSocket->disconnectFromHost();\n                QTestEventLoop::instance().enterLoop(5);\n                QVERIFY(!QTestEventLoop::instance().timeout());\n            }\n\n            delete tcpSocket;\n        }\n\n        // close server\n        tcpServer->close();\n    } else if (serverType == LocalServer) {\n        // disconnect clients\n        while (!localSockets.isEmpty()) {\n            QLocalSocket *localSocket = localSockets.takeFirst();\n            connect(localServer.data(), SIGNAL(clientDisconnected()), &QTestEventLoop::instance(), SLOT(exitLoop()));\n            if (localSocket->state() == QLocalSocket::ConnectedState) {\n                localSocket->disconnectFromServer();\n                QTestEventLoop::instance().enterLoop(5);\n                QVERIFY(!QTestEventLoop::instance().timeout());\n            }\n\n            delete localSocket;\n        }\n\n        // close server\n        localServer->close();\n    } else if (serverType == HttpServer) {\n        httpServer->close();\n    }\n\n    QCOMPARE(server->connectedClientCount(), 0);\n}\n\nvoid TestQJsonRpcServer::noParameter()\n{\n    QVERIFY(server->addService(new TestService));\n\n    QSignalSpy spyMessageReceived(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)));\n    QJsonRpcMessage request = QJsonRpcMessage::createRequest(\"service.noParam\");\n    QJsonRpcMessage response = clientSocket->sendMessageBlocking(request);\n    QVERIFY(response.errorCode() == QJsonRpc::NoError);\n    QCOMPARE(request.id(), response.id());\n    QCOMPARE(spyMessageReceived.count(), 1);\n}\n\nvoid TestQJsonRpcServer::singleParameter()\n{\n    QVERIFY(server->addService(new TestService));\n\n    QSignalSpy spyMessageReceived(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)));\n    QJsonRpcMessage request = QJsonRpcMessage::createRequest(\"service.singleParam\", QString(\"single\"));\n    QJsonRpcMessage response = clientSocket->sendMessageBlocking(request);\n    QCOMPARE(spyMessageReceived.count(), 1);\n    QVERIFY(response.errorCode() == QJsonRpc::NoError);\n    QCOMPARE(request.id(), response.id());\n    QCOMPARE(response.result().toString(), QLatin1String(\"single\"));\n}\n\nvoid TestQJsonRpcServer::overloadedMethod()\n{\n    QVERIFY(server->addService(new TestService));\n    QSignalSpy spyMessageReceived(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)));\n\n    QJsonRpcMessage stringRequest = QJsonRpcMessage::createRequest(\"service.overloadedMethod\", QString(\"single\"));\n    QJsonRpcMessage stringResponse = clientSocket->sendMessageBlocking(stringRequest);\n    QCOMPARE(spyMessageReceived.count(), 1);\n    QVERIFY(stringResponse.errorCode() == QJsonRpc::NoError);\n    QCOMPARE(stringRequest.id(), stringResponse.id());\n    QCOMPARE(stringResponse.result().toBool(), false);\n\n    QJsonRpcMessage intRequest = QJsonRpcMessage::createRequest(\"service.overloadedMethod\", 10);\n    QJsonRpcMessage intResponse = clientSocket->sendMessageBlocking(intRequest);\n    QCOMPARE(spyMessageReceived.count(), 2);\n    QVERIFY(intResponse.errorCode() == QJsonRpc::NoError);\n    QCOMPARE(intRequest.id(), intResponse.id());\n    QCOMPARE(intResponse.result().toBool(), true);\n\n    QVariantMap testMap;\n    testMap[\"one\"] = 1;\n    testMap[\"two\"] = 2;\n    testMap[\"three\"] = 3;\n    QJsonRpcMessage mapRequest =\n        QJsonRpcMessage::createRequest(\"service.overloadedMethod\", QJsonValue::fromVariant(testMap));\n    QJsonRpcMessage mapResponse = clientSocket->sendMessageBlocking(mapRequest);\n    QCOMPARE(spyMessageReceived.count(), 3);\n    QVERIFY(mapResponse.errorCode() == QJsonRpc::InvalidParams);\n    QCOMPARE(mapRequest.id(), mapResponse.id());\n}\n\nvoid TestQJsonRpcServer::multiParameter()\n{\n    QVERIFY(server->addService(new TestService));\n\n    QSignalSpy spyMessageReceived(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)));\n\n    QJsonArray params;\n    params.append(QLatin1String(\"a\"));\n    params.append(QLatin1String(\"b\"));\n    params.append(QLatin1String(\"c\"));\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"service.multipleParam\", params);\n    QJsonRpcMessage response = clientSocket->sendMessageBlocking(request);\n    QCOMPARE(spyMessageReceived.count(), 1);\n    QVERIFY(response.errorCode() == QJsonRpc::NoError);\n    QCOMPARE(request.id(), response.id());\n    QCOMPARE(response.result().toString(), QLatin1String(\"abc\"));\n}\n\nvoid TestQJsonRpcServer::variantParameter()\n{\n    QVERIFY(server->addService(new TestService));\n\n    QSignalSpy spyMessageReceived(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)));\n\n    QJsonArray params;\n    params.append(QJsonValue::fromVariant(QVariant(true)));\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"service.variantParameter\", params);\n    QJsonRpcMessage response = clientSocket->sendMessageBlocking(request);\n    QCOMPARE(spyMessageReceived.count(), 1);\n    QVERIFY(response.errorCode() == QJsonRpc::NoError);\n    QCOMPARE(request.id(), response.id());\n    QVERIFY(response.result() == true);\n}\n\nvoid TestQJsonRpcServer::variantListParameter()\n{\n    QVERIFY(server->addService(new TestService));\n\n    QJsonArray data;\n    data.append(1);\n    data.append(20);\n    data.append(QLatin1String(\"hello\"));\n    data.append(false);\n\n    QSignalSpy spyMessageReceived(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)));\n\n    QJsonArray params;\n    params.append(data);\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"service.variantListParameter\", params);\n    QJsonRpcMessage response = clientSocket->sendMessageBlocking(request);\n    QCOMPARE(spyMessageReceived.count(), 1);\n    QVERIFY(response.errorCode() == QJsonRpc::NoError);\n    QCOMPARE(request.id(), response.id());\n    QCOMPARE(response.result().toArray(), data);\n}\n\nvoid TestQJsonRpcServer::variantResult()\n{\n    QVERIFY(server->addService(new TestService));\n\n    QJsonRpcMessage response =\n        clientSocket->invokeRemoteMethodBlocking(\"service.variantStringResult\");\n    QVERIFY(response.errorCode() == QJsonRpc::NoError);\n    QString stringResult = response.result().toString();\n    QCOMPARE(stringResult, QLatin1String(\"hello\"));\n}\n\nvoid TestQJsonRpcServer::invalidArgs()\n{\n    QVERIFY(server->addService(new TestService));\n\n    QSignalSpy spyMessageReceived(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)));\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"service.noParam\", false);\n    clientSocket->sendMessageBlocking(request);\n    QCOMPARE(spyMessageReceived.count(), 1);\n    QVariant message = spyMessageReceived.takeFirst().at(0);\n    QJsonRpcMessage error = message.value<QJsonRpcMessage>();\n    QCOMPARE(request.id(), error.id());\n    QVERIFY(error.errorCode() == QJsonRpc::InvalidParams);\n}\n\nvoid TestQJsonRpcServer::methodNotFound()\n{\n    QVERIFY(server->addService(new TestService));\n\n    QSignalSpy spyMessageReceived(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)));\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"service.doesNotExist\");\n    QJsonRpcMessage response = clientSocket->sendMessageBlocking(request);\n    QCOMPARE(spyMessageReceived.count(), 1);\n    QVERIFY(response.isValid());\n    QVariant message = spyMessageReceived.takeFirst().at(0);\n    QJsonRpcMessage error = message.value<QJsonRpcMessage>();\n    QCOMPARE(request.id(), error.id());\n    QVERIFY(error.errorCode() == QJsonRpc::MethodNotFound);\n}\n\nvoid TestQJsonRpcServer::invalidRequest()\n{\n    QVERIFY(server->addService(new TestService));\n\n    QSignalSpy spyMessageReceived(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)));\n    QJsonRpcMessage request = QJsonRpcMessage::fromJson(\"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"id\\\": 666}\");\n    clientSocket->sendMessageBlocking(request);\n\n    QCOMPARE(spyMessageReceived.count(), 1);\n    QVariant message = spyMessageReceived.takeFirst().at(0);\n    QJsonRpcMessage error = message.value<QJsonRpcMessage>();\n    QCOMPARE(request.id(), error.id());\n    QVERIFY(error.errorCode() == QJsonRpc::InvalidRequest);\n}\n\nvoid TestQJsonRpcServer::qVariantMapInvalidParam()\n{\n    QVERIFY(server->addService(new TestService));\n\n    QSignalSpy spyMessageReceived(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)));\n    const char *invalid = \"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"id\\\": 0, \\\"method\\\": \\\"service.variantMapInvalidParam\\\",\\\"params\\\": [[{\\\"foo\\\":\\\"bar\\\",\\\"baz\\\":\\\"quux\\\"}, {\\\"foo\\\":\\\"bar\\\"}]]}\";\n    QJsonRpcMessage request = QJsonRpcMessage::fromJson(invalid);\n    clientSocket->sendMessageBlocking(request);\n\n    QCOMPARE(spyMessageReceived.count(), 1);\n    QVariant message = spyMessageReceived.takeFirst().at(0);\n    QJsonRpcMessage error = message.value<QJsonRpcMessage>();\n    QCOMPARE(request.id(), error.id());\n    QVERIFY(error.errorCode() == QJsonRpc::InvalidParams);\n}\n\nclass ServerNotificationHelper : public QObject\n{\n    Q_OBJECT\npublic:\n    ServerNotificationHelper(const QJsonRpcMessage &message, QJsonRpcAbstractServer *provider)\n        : m_provider(provider),\n          m_notification(message) {}\n\npublic Q_SLOTS:\n    void activate() {\n        m_provider->notifyConnectedClients(m_notification);\n    }\n\nprivate:\n    QJsonRpcAbstractServer *m_provider;\n    QJsonRpcMessage m_notification;\n\n};\n\nvoid TestQJsonRpcServer::notifyConnectedClients_data()\n{\n    QTest::addColumn<QString>(\"method\");\n    QTest::addColumn<QJsonRpcMessage::Type>(\"type\");\n    QTest::addColumn<QJsonArray>(\"parameters\");\n    QTest::addColumn<bool>(\"sendAsMessage\");\n\n    QTest::newRow(\"notification-message\") << \"testNotification\" << QJsonRpcMessage::Notification << QJsonArray() << true;\n    QTest::newRow(\"notification-direct\") << \"testNotification\" << QJsonRpcMessage::Notification << QJsonArray() << false;\n\n    QJsonArray parameters;\n    parameters.append(QLatin1String(\"test\"));\n    QTest::newRow(\"request-message\") << \"testRequest\" << QJsonRpcMessage::Request << parameters << true;\n    QTest::newRow(\"request-direct\") << \"testRequest\" << QJsonRpcMessage::Request << parameters << false;\n}\n\nvoid TestQJsonRpcServer::notifyConnectedClients()\n{\n    QFETCH(QString, method);\n    QFETCH(QJsonRpcMessage::Type, type);\n    QFETCH(QJsonArray, parameters);\n    QFETCH(bool, sendAsMessage);\n    QFETCH_GLOBAL(ServerType, serverType);\n\n    if (serverType == HttpServer) {\n#if QT_VERSION >= 0x050000\n        QSKIP(\"Not supported for HTTP connections\");\n#else\n        QSKIP(\"Not supported for HTTP connections\", SkipAll);\n#endif\n    }\n\n    QVERIFY(server->addService(new TestService));\n    QEventLoop loop;\n    connect(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)), &loop, SLOT(quit()));\n    QSignalSpy spy(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)));\n    QJsonRpcMessage message;\n    if (sendAsMessage) {\n        switch (type) {\n        case QJsonRpcMessage::Request:\n            message = QJsonRpcMessage::createRequest(method, parameters);\n            break;\n        case QJsonRpcMessage::Notification:\n            message = QJsonRpcMessage::createNotification(method, parameters);\n            break;\n        default:\n            break;\n        }\n\n        if (serverType == TcpServer)\n            QMetaObject::invokeMethod(tcpServer.data(), \"notifyConnectedClients\", Q_ARG(QJsonRpcMessage, message));\n        else if (serverType == LocalServer)\n            QMetaObject::invokeMethod(localServer.data(), \"notifyConnectedClients\", Q_ARG(QJsonRpcMessage, message));\n\n        // server->notifyConnectedClients(message);\n    } else {\n        if (serverType == TcpServer)\n            QMetaObject::invokeMethod(tcpServer.data(), \"notifyConnectedClients\", Q_ARG(QString, method), Q_ARG(QJsonArray, parameters));\n        else if (serverType == LocalServer)\n            QMetaObject::invokeMethod(localServer.data(), \"notifyConnectedClients\", Q_ARG(QString, method), Q_ARG(QJsonArray, parameters));\n        // server->notifyConnectedClients(method, parameters);\n    }\n\n    QTimer::singleShot(2000, &loop, SLOT(quit()));\n    loop.exec();\n\n    QCOMPARE(spy.count(), 1);\n    QJsonRpcMessage receivedMessage = spy.takeFirst().first().value<QJsonRpcMessage>();\n    if (sendAsMessage) {\n        QCOMPARE(receivedMessage, message);\n    } else {\n        QCOMPARE(receivedMessage.method(), method);\n        QCOMPARE(receivedMessage.params().toArray(), parameters);\n    }\n}\n\nvoid TestQJsonRpcServer::numberParameters()\n{\n    TestService *service = new TestService;\n    QVERIFY(server->addService(service));\n\n    QJsonArray params;\n    params.append(10);\n    params.append(3.14159);\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"service.numberParameters\", params);\n    clientSocket->sendMessageBlocking(request);\n    QCOMPARE(service->callCount(), 1);\n}\n\nvoid TestQJsonRpcServer::hugeResponse()\n{\n    QVERIFY(server->addService(new TestService));\n    QSignalSpy spyMessageReceived(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)));\n    QJsonRpcMessage request = QJsonRpcMessage::createRequest(\"service.hugeResponse\");\n    QJsonRpcMessage response = clientSocket->sendMessageBlocking(request);\n    QCOMPARE(spyMessageReceived.count(), 1);\n    QVERIFY(response.isValid());\n}\n\nvoid TestQJsonRpcServer::complexMethod()\n{\n    QVERIFY(server->addService(new TestComplexMethodService));\n    QSignalSpy spyMessageReceived(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)));\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"service.complex.prefix.for.testMethod\");\n    QJsonRpcMessage response = clientSocket->sendMessageBlocking(request);\n    QCOMPARE(spyMessageReceived.count(), 1);\n    QVERIFY(response.errorCode() == QJsonRpc::NoError);\n    QCOMPARE(request.id(), response.id());\n}\n\nvoid TestQJsonRpcServer::defaultParameters()\n{\n    QVERIFY(server->addService(new TestService));\n\n    // test without name\n    QJsonRpcMessage noNameRequest =\n        QJsonRpcMessage::createRequest(\"service.defaultParametersMethod\");\n    QJsonRpcMessage response = clientSocket->sendMessageBlocking(noNameRequest);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n    QCOMPARE(response.result().toString(), QLatin1String(\"empty string\"));\n\n    // test with name\n    QJsonRpcMessage nameRequest =\n        QJsonRpcMessage::createRequest(\"service.defaultParametersMethod\", QLatin1String(\"matt\"));\n    response = clientSocket->sendMessageBlocking(nameRequest);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n    QCOMPARE(response.result().toString(), QLatin1String(\"hello matt\"));\n\n    // test multiparameter\n    QJsonRpcMessage konyRequest =\n        QJsonRpcMessage::createRequest(\"service.defaultParametersMethod2\", QLatin1String(\"KONY\"));\n    response = clientSocket->sendMessageBlocking(konyRequest);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n    QCOMPARE(response.result().toString(), QLatin1String(\"KONY2012\"));\n}\n\nvoid TestQJsonRpcServer::notifyServiceSocket()\n{\n    QFETCH_GLOBAL(ServerType, serverType);\n    if (serverType == HttpServer) {\n#if QT_VERSION >= 0x050000\n        QSKIP(\"Not supported for HTTP connections\");\n#else\n        QSKIP(\"Not supported for HTTP connections\", SkipAll);\n#endif\n    }\n\n    QScopedPointer<QJsonRpcServiceSocket> serviceSocket;\n    clientSocket.reset();   // we only want a service socket, this would override that\n    if (serverType == TcpServer) {\n        serviceSocket.reset(new QJsonRpcServiceSocket(tcpSockets.first()));\n    } else if (serverType == LocalServer) {\n        serviceSocket.reset(new QJsonRpcServiceSocket(localSockets.first()));\n    }\n\n    TestService *service = new TestService;\n    QVERIFY(serviceSocket->addService(service));\n    QCOMPARE(service->callCount(), 0);\n    connect(service, SIGNAL(numberParametersCalled()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);\n\n    QJsonArray params;\n    params.append(10);\n    params.append(3.14159);\n    QJsonRpcMessage notification = QJsonRpcMessage::createNotification(\"service.numberParameters\", params);\n    if (serverType == TcpServer)\n        QMetaObject::invokeMethod(tcpServer.data(), \"notifyConnectedClients\", Q_ARG(QJsonRpcMessage, notification));\n    else if (serverType == LocalServer)\n        QMetaObject::invokeMethod(localServer.data(), \"notifyConnectedClients\", Q_ARG(QJsonRpcMessage, notification));\n    QTestEventLoop::instance().enterLoop(5);\n    QVERIFY(!QTestEventLoop::instance().timeout());\n    QCOMPARE(service->callCount(), 1);\n}\n\n/*\nQ_DECLARE_METATYPE(QList<int>)\nvoid TestQJsonRpcServer::testListOfInts()\n{\n    server->addService(new TestService);\n    qRegisterMetaType<QList<int> >(\"QList<int>\");\n    QList<int> intList = QList<int>() << 300 << 30 << 3;\n    QVariant variant = QVariant::fromValue(intList);\n    QJsonRpcMessage intRequest =\n        QJsonRpcMessage::createRequest(\"service.methodWithListOfInts\", variant);\n    QJsonRpcMessage response = clientSocket->sendMessageBlocking(intRequest);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n    QVERIFY(response.result().toBool());\n}\n*/\n\nvoid TestQJsonRpcServer::stringListParameter()\n{\n    QVERIFY(server->addService(new TestService));\n    QStringList strings = QStringList() << \"one\" << \"two\" << \"three\";\n\n    QJsonArray params;\n    params.append(1);\n    params.append(QLatin1String(\"A\"));\n    params.append(QLatin1String(\"B\"));\n    params.append(QJsonValue::fromVariant(strings));\n    QJsonRpcMessage strRequest =\n        QJsonRpcMessage::createRequest(\"service.stringListParameter\", params);\n    QJsonRpcMessage response = clientSocket->sendMessageBlocking(strRequest);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n    QVERIFY(response.result().toBool());\n}\n\nvoid TestQJsonRpcServer::outputParameter()\n{\n    QVERIFY(server->addService(new TestService));\n\n    // use argument 2 as in/out parameter\n    QJsonArray arrParams;\n    arrParams.push_back(1);\n    arrParams.push_back(0);\n    arrParams.push_back(2);\n    QJsonRpcMessage strRequest =\n        QJsonRpcMessage::createRequest(\"service.outputParameter\", arrParams);\n    QJsonRpcMessage response = clientSocket->sendMessageBlocking(strRequest);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n    QCOMPARE((int) response.result().toDouble(), 3);\n\n    // only input parameters are provided\n    QJsonObject objParams;\n    objParams[\"in1\"] = 1;\n    objParams[\"in2\"] = 3;\n    strRequest =\n        QJsonRpcMessage::createRequest(\"service.outputParameter\", objParams);\n    response = clientSocket->sendMessageBlocking(strRequest);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n    QCOMPARE((int) response.result().toDouble(), 4);\n\n    // also provide the in/out parameter\n    objParams[\"out\"] = 2;\n    strRequest =\n        QJsonRpcMessage::createRequest(\"service.outputParameter\", objParams);\n    response = clientSocket->sendMessageBlocking(strRequest);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n    QCOMPARE((int) response.result().toDouble(), 6);\n\n    // test strings\n    QJsonArray stringParams;\n    stringParams.push_back(QLatin1String(\"Sherlock\"));\n    stringParams.push_back(QLatin1String(\"\"));\n    stringParams.push_back(QLatin1String(\"Holmes\"));\n    strRequest =\n        QJsonRpcMessage::createRequest(\"service.outputParameterWithStrings\", stringParams);\n    response = clientSocket->sendMessageBlocking(strRequest);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n    QCOMPARE(response.result().toString(), QLatin1String(\"Sherlock Holmes\"));\n\n    // only input parameters are provided\n    QJsonObject stringObjectParams;\n    stringObjectParams[\"first\"] = QLatin1String(\"Sherlock\");\n    stringObjectParams[\"output\"] = QLatin1String(\"Hello\");\n    stringObjectParams[\"last\"] = QLatin1String(\"Holmes\");\n    strRequest =\n        QJsonRpcMessage::createRequest(\"service.outputParameterWithStrings\", stringObjectParams);\n    response = clientSocket->sendMessageBlocking(strRequest);\n    QVERIFY(response.type() != QJsonRpcMessage::Error);\n    QCOMPARE(response.result().toString(), QLatin1String(\"Hello Sherlock Holmes\"));\n}\n\nvoid TestQJsonRpcServer::userDeletesReplyOnDelayedResponse()\n{\n    QVERIFY(server->addService(new TestService));\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"service.delayedResponse\");\n\n    connect(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)),\n            &QTestEventLoop::instance(), SLOT(exitLoop()));\n    QJsonRpcServiceReply *reply = clientSocket->sendMessage(request);\n    delete reply;\n\n    // While this is not applicable for HTTP connections, I've left the code\n    // up until this point to ensure that no memory is leaked\n\n    QFETCH_GLOBAL(ServerType, serverType);\n    if (serverType == HttpServer) {\n#if QT_VERSION >= 0x050000\n        QSKIP(\"Not applicable for HTTP connections\");\n#else\n        QSKIP(\"Not applicable for HTTP connections\", SkipAll);\n#endif\n    }\n\n    QTestEventLoop::instance().enterLoop(5);\n    QVERIFY(!QTestEventLoop::instance().timeout());\n}\n\n#if QT_VERSION >= 0x050200\nvoid TestQJsonRpcServer::jsonReturnTypes()\n{\n    QVERIFY(server->addService(new TestService));\n\n    {\n        QJsonArray array;\n        array.append(1);\n        array.append(QLatin1String(\"two\"));\n        array.append(true);\n        QJsonRpcMessage request =\n            QJsonRpcMessage::createRequest(\"service.returnQJsonArray\");\n        QJsonRpcMessage response = clientSocket->sendMessageBlocking(request);\n        QVERIFY(response.type() != QJsonRpcMessage::Error);\n        QCOMPARE(response.result().toArray(), array);\n    }\n\n    {\n        QJsonObject object;\n        object.insert(\"one\", QLatin1String(\"one\"));\n        object.insert(\"two\", 2);\n        object.insert(\"three\", true);\n        QJsonRpcMessage request =\n            QJsonRpcMessage::createRequest(\"service.returnQJsonObject\");\n        QJsonRpcMessage response = clientSocket->sendMessageBlocking(request);\n        QVERIFY(response.type() != QJsonRpcMessage::Error);\n        QCOMPARE(response.result().toObject(), object);\n    }\n}\n#endif\n\nclass QJsonRpcServiceReplySpy : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit QJsonRpcServiceReplySpy(int expectedReplies, QObject *parent = 0)\n        : QObject(parent),\n          m_expectedReplies(expectedReplies)\n    {\n    }\n\n    QList<QJsonRpcMessage> responses() const { return m_responses; }\n\nQ_SIGNALS:\n    void finished();\n\npublic Q_SLOTS:\n    void replyFinished() {\n        QJsonRpcServiceReply *reply = qobject_cast<QJsonRpcServiceReply*>(sender());\n        if (!reply)\n            return;\n\n        m_responses.append(reply->response());\n        reply->deleteLater();\n\n        if (m_responses.size() == m_expectedReplies)\n            Q_EMIT finished();\n    }\n\nprivate:\n    int m_expectedReplies;\n    QList<QJsonRpcMessage> m_responses;\n\n};\n\nvoid TestQJsonRpcServer::delayedResponseBasic()\n{\n    QFETCH_GLOBAL(ServerType, serverType);\n    if (serverType == HttpServer) {\n#if QT_VERSION >= 0x050000\n        QSKIP(\"QNAM makes deterministic order impossible here\");\n#else\n        QSKIP(\"QNAM makes deterministic order impossible here\", SkipAll);\n#endif\n    }\n\n    QVERIFY(server->addService(new TestDelayedResponseService));\n    QJsonRpcServiceReplySpy spy(6);\n    connect(&spy, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));\n\n    int delayedMessageId = 0;\n    {\n        QJsonRpcMessage request = QJsonRpcMessage::createRequest(\"service.delayedResponse\");\n        QJsonRpcServiceReply *reply = clientSocket->sendMessage(request);\n        connect(reply, SIGNAL(finished()), &spy, SLOT(replyFinished()));\n        delayedMessageId = request.id();\n    }\n\n    QList<int> expectedMessageOrder;\n    for (int i = 0; i < 5; ++i) {\n        QJsonRpcMessage request = QJsonRpcMessage::createRequest(\"service.immediateResponse\");\n        QJsonRpcServiceReply *reply = clientSocket->sendMessage(request);\n        connect(reply, SIGNAL(finished()), &spy, SLOT(replyFinished()));\n        expectedMessageOrder.append(request.id());\n    }\n    expectedMessageOrder.append(delayedMessageId);\n\n    QTestEventLoop::instance().enterLoop(10);\n    QVERIFY(!QTestEventLoop::instance().timeout());\n    QList<int> actualMessageOrder;\n    foreach (QJsonRpcMessage response, spy.responses())\n        actualMessageOrder.append(response.id());\n    QCOMPARE(expectedMessageOrder, actualMessageOrder);\n}\n\nvoid TestQJsonRpcServer::delayedResponseSocketClosed()\n{\n    QFETCH_GLOBAL(ServerType, serverType);\n    if (serverType == HttpServer) {\n#if QT_VERSION >= 0x050000\n        QSKIP(\"Not applicable for HTTP connections\");\n#else\n        QSKIP(\"Not applicable for HTTP connections\", SkipAll);\n#endif\n    }\n\n    TestDelayedResponseService *service = new TestDelayedResponseService;\n    QVERIFY(server->addService(service));\n\n    QSignalSpy spy(service, SIGNAL(responseResult(bool)));\n    connect(service, SIGNAL(responseResult(bool)), &QTestEventLoop::instance(), SLOT(exitLoop()));\n    QJsonRpcMessage request = QJsonRpcMessage::createRequest(\"service.delayedResponseWithClosedSocket\");\n    QScopedPointer<QJsonRpcServiceReply> reply(clientSocket->sendMessage(request));\n    if (serverType == TcpServer)\n        tcpSockets.first()->disconnectFromHost();\n    else if (serverType == LocalServer)\n        localSockets.first()->disconnectFromServer();\n\n    QTestEventLoop::instance().enterLoop(5);\n    QVERIFY(!QTestEventLoop::instance().timeout());\n    QList<QVariant> arguments = spy.takeFirst();\n    QCOMPARE(arguments.at(0).toBool(), false);\n}\n\nvoid TestQJsonRpcServer::addRemoveService()\n{\n    TestService service;\n    QVERIFY(server->addService(&service));\n\n    QSignalSpy spyMessageReceived(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)));\n    QJsonRpcMessage request = QJsonRpcMessage::createRequest(\"service.noParam\");\n    QJsonRpcMessage response = clientSocket->sendMessageBlocking(request);\n    QVERIFY(response.errorCode() == QJsonRpc::NoError);\n    QCOMPARE(request.id(), response.id());\n    QCOMPARE(spyMessageReceived.count(), 1);\n\n    QVERIFY(server->removeService(&service));\n    response = clientSocket->sendMessageBlocking(request);\n    QVERIFY(response.errorCode() == QJsonRpc::MethodNotFound);\n\n    QFETCH_GLOBAL(ServerType, serverType);\n    if (serverType == TcpServer)\n        QVERIFY(tcpServer->errorString().isEmpty());\n    else if (serverType == LocalServer)\n        QVERIFY(localServer->errorString().isEmpty());\n}\n\nvoid TestQJsonRpcServer::serviceWithNoGivenName()\n{\n    QVERIFY(server->addService(new TestServiceWithoutServiceName));\n    QSignalSpy spyMessageReceived(clientSocket.data(), SIGNAL(messageReceived(QJsonRpcMessage)));\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"testservicewithoutservicename.testMethod\", QLatin1String(\"foo\"));\n    QJsonRpcMessage response = clientSocket->sendMessageBlocking(request);\n    QVERIFY(response.errorCode() == QJsonRpc::NoError);\n    QCOMPARE(request.id(), response.id());\n    QCOMPARE(spyMessageReceived.count(), 1);\n}\n\nvoid TestQJsonRpcServer::cantRemoveInvalidService()\n{\n    TestService service;\n    QCOMPARE(server->removeService(&service), false);\n}\n\nvoid TestQJsonRpcServer::cantAddServiceTwice()\n{\n    TestService service;\n    QVERIFY(server->addService(&service));\n    QCOMPARE(server->addService(&service), false);\n}\n\nQTEST_MAIN(TestQJsonRpcServer)\n#include \"tst_qjsonrpcserver.moc\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpcservice/qjsonrpcservice.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\n\nTARGET = tst_qjsonrpcservice\nSOURCES = tst_qjsonrpcservice.cpp\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpcservice/tst_qjsonrpcservice.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QtCore/QVariant>\n#include <QtTest/QtTest>\n\n#if QT_VERSION >= 0x050000\n#include <QJsonDocument>\n#else\n#include \"json/qjsondocument.h\"\n#endif\n\n#include \"qjsonrpcabstractserver.h\"\n#include \"qjsonrpcmessage.h\"\n#include \"qjsonrpcservice.h\"\n\nclass TestQJsonRpcService: public QObject\n{\n    Q_OBJECT\nprivate slots:\n    void dispatch_data();\n    void dispatch();\n    void ambiguousDispatch();\n    void dispatchSignals_data();\n    void dispatchSignals();\n\n};\n\nclass TestService : public QJsonRpcService\n{\n    Q_OBJECT\n    Q_CLASSINFO(\"serviceName\", \"service\")\npublic:\n    TestService(QObject *parent = 0)\n        : QJsonRpcService(parent),\n          m_stringCount(0),\n          m_intCount(0),\n          m_variantCount(0)\n    {}\n\n    QJsonRpcMessage testDispatch(const QJsonRpcMessage &message) {\n        return QJsonRpcService::dispatch(message);\n    }\n\n    int stringCount() const { return m_stringCount; }\n    int intCount() const { return m_intCount; }\n    int variantCount() const { return m_variantCount; }\n    void resetCounters() { m_stringCount = m_intCount = m_variantCount = 0; }\n\nQ_SIGNALS:\n    void testSignal();\n    void testSignalWithParameter(const QString &param);\n\npublic Q_SLOTS:\n    QString testMethod(const QString &string) const {\n        return string;\n    }\n\n    // note: order of definition matters here for ambiguousDispatch test\n    void ambiguousMethod(const QString &) {\n        m_stringCount++;\n    }\n\n    void ambiguousMethod(int) {\n        m_intCount++;\n    }\n\n    void ambiguousMethod(const QVariant &) {\n        m_variantCount++;\n    }\n\nprivate:\n    int m_stringCount;\n    int m_intCount;\n    int m_variantCount;\n\n};\n\nclass TestServiceProvider : public QJsonRpcServiceProvider\n{\npublic:\n    TestServiceProvider() {}\n};\n\nvoid TestQJsonRpcService::dispatch_data()\n{\n    QTest::addColumn<QJsonRpcMessage>(\"request\");\n    QTest::addColumn<bool>(\"shouldSucceed\");\n\n    {\n        QJsonRpcMessage request =\n            QJsonRpcMessage::createRequest(\"service.testMethod\", QLatin1String(\"testParam\"));\n        QTest::newRow(\"valid-request-dispatch\") << request << true;\n\n        QJsonRpcMessage response = request.createResponse(QLatin1String(\"testResult\"));\n        QTest::newRow(\"invalid-response-dispatch\") << response << false;\n    }\n\n    {\n        QJsonObject namedParameters;\n        namedParameters.insert(\"string\", QLatin1String(\"testParam\"));\n        QJsonRpcMessage request =\n            QJsonRpcMessage::createRequest(\"service.testMethod\", namedParameters);\n        QTest::newRow(\"valid-request-dispatch-with-named-parameters\") << request << true;\n    }\n\n    {\n        QJsonObject invalidNamedParameters;\n        invalidNamedParameters.insert(\"testParameter\", QLatin1String(\"testParam\"));\n        QJsonRpcMessage request =\n            QJsonRpcMessage::createRequest(\"service.testMethod\", invalidNamedParameters);\n        QTest::newRow(\"invalid-request-dispatch-with-named-parameters\") << request << false;\n    }\n\n    {\n        QJsonRpcMessage request =\n            QJsonRpcMessage::createNotification(\"service.testMethod\", QLatin1String(\"testParam\"));\n        QTest::newRow(\"valid-notification-dispatch\") << request << true;\n    }\n\n    {\n        QJsonObject namedParameters;\n        namedParameters.insert(\"string\", QLatin1String(\"testParam\"));\n        QJsonRpcMessage request =\n            QJsonRpcMessage::createNotification(\"service.testMethod\", namedParameters);\n        QTest::newRow(\"valid-notification-dispatch-with-named-parameters\") << request << true;\n    }\n\n    QTest::newRow(\"invalid-dispatch\") << QJsonRpcMessage() << false;\n}\n\nvoid TestQJsonRpcService::dispatch()\n{\n    QFETCH(QJsonRpcMessage, request);\n    QFETCH(bool, shouldSucceed);\n\n    TestServiceProvider provider;\n    TestService service;\n    provider.addService(&service);\n\n    QJsonRpcMessage response = service.testDispatch(request);\n    if (shouldSucceed)\n        QVERIFY(response.type() != QJsonRpcMessage::Error);\n    else\n        QVERIFY(response.type() == QJsonRpcMessage::Error);\n}\n\nvoid TestQJsonRpcService::ambiguousDispatch()\n{\n    TestServiceProvider provider;\n    TestService service;\n    provider.addService(&service);\n\n    QJsonRpcMessage stringDispatch =\n        QJsonRpcMessage::createRequest(\"service.ambiguousMethod\", QLatin1String(\"testParam\"));\n    service.testDispatch(stringDispatch);\n    QCOMPARE(service.stringCount(), 1);\n    QCOMPARE(service.intCount(), 0);\n    QCOMPARE(service.variantCount(), 0);\n\n    QJsonRpcMessage intDispatch =\n        QJsonRpcMessage::createRequest(\"service.ambiguousMethod\", 10);\n    service.testDispatch(intDispatch);\n    QCOMPARE(service.stringCount(), 1);\n    QCOMPARE(service.intCount(), 1);\n    QCOMPARE(service.variantCount(), 0);\n\n    QStringList stringList = QStringList() << \"test\" << \"string\" << \"list\";\n    QJsonRpcMessage stringListDispatch =\n        QJsonRpcMessage::createRequest(\"service.ambiguousMethod\", QJsonValue::fromVariant(stringList));\n    service.testDispatch(stringListDispatch);\n    QCOMPARE(service.stringCount(), 1);\n    QCOMPARE(service.intCount(), 1);\n    QCOMPARE(service.variantCount(), 1);\n}\n\nvoid TestQJsonRpcService::dispatchSignals_data()\n{\n    QTest::addColumn<QJsonRpcMessage>(\"request\");\n    QTest::addColumn<bool>(\"shouldSucceed\");\n\n    {\n        QJsonRpcMessage request = QJsonRpcMessage::createRequest(\"service.testSignal\");\n        QTest::newRow(\"valid-request-signal-dispatch\") << request << true;\n    }\n\n    {\n        QJsonRpcMessage request =\n            QJsonRpcMessage::createRequest(\"service.testSignalWithParameter\", QLatin1String(\"testParam\"));\n        QTest::newRow(\"valid-request-signal-with-param-dispatch\") << request << true;\n    }\n\n    {\n        QJsonRpcMessage request =\n            QJsonRpcMessage::createRequest(\"service.testSignal\", QLatin1String(\"testParam\"));\n        QTest::newRow(\"invalid-request-signal-dispatch\") << request << false;\n    }\n}\n\nvoid TestQJsonRpcService::dispatchSignals()\n{\n    QFETCH(QJsonRpcMessage, request);\n    QFETCH(bool, shouldSucceed);\n\n    TestServiceProvider provider;\n    TestService service;\n    provider.addService(&service);\n\n    QJsonRpcMessage response = service.testDispatch(request);\n    QJsonRpcMessage::Type messageType = shouldSucceed ?\n        QJsonRpcMessage::Response : QJsonRpcMessage::Error;\n    QCOMPARE(response.type(), messageType);\n}\n\nQTEST_MAIN(TestQJsonRpcService)\n#include \"tst_qjsonrpcservice.moc\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpcsocket/qjsonrpcsocket.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\n\nTARGET = tst_qjsonrpcsocket\nSOURCES = tst_qjsonrpcsocket.cpp\nRESOURCES = tst_qjsonrpcsocket.qrc\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpcsocket/testwire.json",
    "content": "{\"object with 1 member\":[\"array with 1 element\"]}\n{}\n{\n    \"integer\": 1234567890,\n    \"real\": -9876.543210,\n    \"e\": 0.123456789e-12,\n    \"E\": 1.234567890E+34,\n    \"\":  23456789012E66,\n    \"zero\": 0,\n    \"one\": 1,\n    \"space\": \" \",\n    \"quote\": \"\\\"\",\n    \"backslash\": \"\\\\\",\n    \"controls\": \"\\b\\f\\n\\r\\t\",\n    \"slash\": \"/ & \\/\",\n    \"alpha\": \"abcdefghijklmnopqrstuvwxyz\",\n    \"ALPHA\": \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",\n    \"digit\": \"0123456789\",\n    \"0123456789\": \"digit\",\n    \"special\": \"`1~!@#$%^&*()_+-={\\':[,]}|;.</>?\",\n    \"hex\": \"\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A\",\n    \"true\": true,\n    \"false\": false,\n    \"null\": null,\n    \"array\":[  ],\n    \"object\":{  },\n    \"address\": \"50 St. James Street\",\n    \"url\": \"http://www.JSON.org/\",\n    \"comment\": \"// /* <!-- --\",\n    \"# -- --> */\": \" \",\n    \" s p a c e d \" :[1,2 , 3\n\n,\n\n4 , 5        ,          6           ,7        ],\"compact\":[1,2,3,4,5,6,7],\n    \"jsontext\": \"{\\\"object with 1 member\\\":[\\\"array with 1 element\\\"]}\",\n    \"quotes\": \"&#34; \\u0022 %22 0x22 034 &#x22;\",\n    \"\\/\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t`1~!@#$%^&*()_+-=[]{}|;:\\',./<>?\" : \"A key can be any string\"\n}\n{\"foo\": \"bar\"}\n{\"classification\":{\"relevancyScore\":1000,\"searchUrl\":{\"value\":\"http://www.bizrate.com/iphone-cases/index__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"}},\"products\":{\"priceSet\":{\"minPrice\":{\"value\":\"$0.01\",\"integral\":1},\"maxPrice\":{\"value\":\"$4,833.99\",\"integral\":483399}},\"product\":[{\"type\":\"PRODUCT\",\"title\":\"Silicone case for iPhone 3G/ 3GS\",\"description\":\"Elite Horizontal Leather Pouch for Apple iPhone 3G/3Gs - Premium quality horizontal case for your Apple iPhone 3G/3Gs. This pouch is ideal for the style conscious on the go. This great looking case is made from high-quality leather with classic black...\",\"manufacturer\":\"Apple\",\"url\":{\"value\":\"http://www.bizrate.com/silicone-case-for-iphone-3g-3gs--pid1968262863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=1968262863\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=1968262863\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=1968262863\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=1968262863\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":310711221747712.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.56\",\"integral\":156},\"maxPrice\":{\"value\":\"$29.99\",\"integral\":2999},\"stores\":14},\"id\":1968262863,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Nonslip Checkered Silicone Skin Soft Case for iPhone 4 4G\",\"description\":\"Specification:Product Name Silicone Skin Case Model for Apple iPhone 4 Color Black Material Soft Silicone Skin Weight 26g Package 1 x Case for Apple iPhone 4 Description:This is a non-OEM product.Accessory Only, Phone is not included.\",\"manufacturer\":\"H&B\",\"url\":{\"value\":\"http://www.bizrate.com/nonslip-checkered-silicone-skin-soft-case-for-iphone-4-4g--pid2534935499/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2534935499\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2534935499\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2534935499\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2534935499\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":175580930637824.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.45\",\"integral\":45},\"maxPrice\":{\"value\":\"$194.95\",\"integral\":19495},\"stores\":34},\"id\":2534935499,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Plastic Case for iPhone 4 - Black\",\"description\":\"Description:Detachable Windmill Type Matte Hard Plastic Case Cover for iPhone 4 (Black / Magenta)Customised your iPhone with this wonderful Plastic Case which is a accessory for your iPhone 4 which is made of high quality and durable plastic, protect\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/plastic-case-for-iphone-4-black--pid2305624670/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2305624670\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2305624670\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2305624670\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2305624670\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":132488642953216.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.99\",\"integral\":99},\"maxPrice\":{\"value\":\"$303.68\",\"integral\":30368},\"stores\":33},\"id\":2305624670,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Protective Silicone Case for iPhone 4\",\"description\":\"Made of high quality PVC material Protects your iPhone 4 from any scratch and dirt Easy to install and remove, no any tool needed Cut-out design allows user can access all keypad / button and slot without having to remove the case\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/protective-silicone-case-for-iphone-4--pid2120981405/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2120981405\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2120981405\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2120981405\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2120981405\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":108614681362432.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.70\",\"integral\":170},\"maxPrice\":{\"value\":\"$99.99\",\"integral\":9999},\"stores\":11},\"id\":2120981405,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"IphoneÂ® 4 Aerosport Case\",\"description\":\"Do more than just protect your iPhone 4 with this case bundle from rooCASE. This 3 in 1 bundle include a snap-on case, screen protector and a Nike+ sensor shoe pouch that can be use on most running shoes. Color: Purple Design: Love Provides protection...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/iphone-4-aerosport-case--pid2203798762/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2203798762\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2203798762\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2203798762\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2203798762\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":96203484168192.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$2.49\",\"integral\":249},\"maxPrice\":{\"value\":\"$79.95\",\"integral\":7995},\"stores\":16},\"id\":2203798762,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Case Reflect For Iphone 3G\",\"description\":\"NCAA iPhone 3G faceplate features the schools primary logo silk screened on the front of the case.\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/case-reflect-for-iphone-3g--pid1114627445/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=1114627445\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=1114627445\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=1114627445\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=1114627445\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":84727583211520.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.69\",\"integral\":69},\"maxPrice\":{\"value\":\"$75.52\",\"integral\":7552},\"stores\":59},\"id\":1114627445,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Infuse Protector Case for iPhone 4 Black\",\"description\":\"Protect and personalize your iPhone 4 with this front and back image design Protector Case. Form-fitting front and back hard plastic covers Protects your cell phone without adding a lot of bulk Smooth glossy finish Snaps on to the front edges, sides...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/infuse-protector-case-for-iphone-4-black--pid2557462717/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2557462717\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2557462717\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2557462717\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2557462717\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":80831066406912.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.59\",\"integral\":59},\"maxPrice\":{\"value\":\"$79.00\",\"integral\":7900},\"stores\":24},\"id\":2557462717,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Dragonfly iPhone 4 Kream Case - Black\",\"description\":\"DF-0030219 - White, Kream Case for iPhone 4 by Dragon-Fly\",\"url\":{\"value\":\"http://www.bizrate.com/dragonfly-iphone-4-kream-case-black--pid2442061740/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2442061740\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2442061740\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2442061740\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2442061740\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":70900229603328.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.05\",\"integral\":105},\"maxPrice\":{\"value\":\"$94.49\",\"integral\":9449},\"stores\":30},\"id\":2442061740,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Apple iPhone 3G/3GS Silicone Case (Black)\",\"description\":\"Snap on Apple iPhone 3G 3GS Synthetic Leather Hardshell Case! Premium Qualtiy Synthetic Leather cover provides style, comfort, and protection to your iPhone 3G & 3GS. It also adds a sophisticated elegance and cool to your fashion. The case allows Quick...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/apple-iphone-3g3gs-silicone-case-black--pid2004746863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2004746863\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2004746863\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2004746863\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2004746863\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":65194915004416.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.01\",\"integral\":1},\"maxPrice\":{\"value\":\"$414.99\",\"integral\":41499},\"stores\":39},\"id\":2004746863,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Otterbox iPhone 4 Defender Case - Black\",\"description\":\"Your iPhone 4 has become a big part of your life. With FaceTime video, retina display, multitasking, HD video recording and more - you've got a lot to lose. You won't find a tougher case than the OtterBox Defender Series for iPhone 4. This three-layer...\",\"manufacturer\":\"Universal\",\"url\":{\"value\":\"http://www.bizrate.com/otterbox-iphone-4-defender-case-black--pid2584611575/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2584611575\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2584611575\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2584611575\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2584611575\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":61515478597632.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$3.28\",\"integral\":328},\"maxPrice\":{\"value\":\"$110.65\",\"integral\":11065},\"stores\":25},\"id\":2584611575,\"categoryId\":8515}],\"includedResults\":10,\"totalResults\":2000}}\n{\"classification\":{\"relevancyScore\":1000,\"searchUrl\":{\"value\":\"http://www.bizrate.com/iphone-cases/index__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"}},\"products\":{\"priceSet\":{\"minPrice\":{\"value\":\"$0.01\",\"integral\":1},\"maxPrice\":{\"value\":\"$4,833.99\",\"integral\":483399}},\"product\":[{\"type\":\"PRODUCT\",\"title\":\"Silicone case for iPhone 3G/ 3GS\",\"description\":\"Elite Horizontal Leather Pouch for Apple iPhone 3G/3Gs - Premium quality horizontal case for your Apple iPhone 3G/3Gs. This pouch is ideal for the style conscious on the go. This great looking case is made from high-quality leather with classic black...\",\"manufacturer\":\"Apple\",\"url\":{\"value\":\"http://www.bizrate.com/silicone-case-for-iphone-3g-3gs--pid1968262863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=1968262863\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=1968262863\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=1968262863\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=1968262863\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":310711221747712.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.56\",\"integral\":156},\"maxPrice\":{\"value\":\"$29.99\",\"integral\":2999},\"stores\":14},\"id\":1968262863,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Nonslip Checkered Silicone Skin Soft Case for iPhone 4 4G\",\"description\":\"Specification:Product Name Silicone Skin Case Model for Apple iPhone 4 Color Black Material Soft Silicone Skin Weight 26g Package 1 x Case for Apple iPhone 4 Description:This is a non-OEM product.Accessory Only, Phone is not included.\",\"manufacturer\":\"H&B\",\"url\":{\"value\":\"http://www.bizrate.com/nonslip-checkered-silicone-skin-soft-case-for-iphone-4-4g--pid2534935499/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2534935499\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2534935499\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2534935499\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2534935499\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":175580930637824.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.45\",\"integral\":45},\"maxPrice\":{\"value\":\"$194.95\",\"integral\":19495},\"stores\":34},\"id\":2534935499,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Plastic Case for iPhone 4 - Black\",\"description\":\"Description:Detachable Windmill Type Matte Hard Plastic Case Cover for iPhone 4 (Black / Magenta)Customised your iPhone with this wonderful Plastic Case which is a accessory for your iPhone 4 which is made of high quality and durable plastic, protect\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/plastic-case-for-iphone-4-black--pid2305624670/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2305624670\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2305624670\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2305624670\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2305624670\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":132488642953216.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.99\",\"integral\":99},\"maxPrice\":{\"value\":\"$303.68\",\"integral\":30368},\"stores\":33},\"id\":2305624670,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Protective Silicone Case for iPhone 4\",\"description\":\"Made of high quality PVC material Protects your iPhone 4 from any scratch and dirt Easy to install and remove, no any tool needed Cut-out design allows user can access all keypad / button and slot without having to remove the case\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/protective-silicone-case-for-iphone-4--pid2120981405/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2120981405\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2120981405\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2120981405\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2120981405\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":108614681362432.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.70\",\"integral\":170},\"maxPrice\":{\"value\":\"$99.99\",\"integral\":9999},\"stores\":11},\"id\":2120981405,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"IphoneÂ® 4 Aerosport Case\",\"description\":\"Do more than just protect your iPhone 4 with this case bundle from rooCASE. This 3 in 1 bundle include a snap-on case, screen protector and a Nike+ sensor shoe pouch that can be use on most running shoes. Color: Purple Design: Love Provides protection...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/iphone-4-aerosport-case--pid2203798762/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2203798762\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2203798762\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2203798762\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2203798762\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":96203484168192.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$2.49\",\"integral\":249},\"maxPrice\":{\"value\":\"$79.95\",\"integral\":7995},\"stores\":16},\"id\":2203798762,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Case Reflect For Iphone 3G\",\"description\":\"NCAA iPhone 3G faceplate features the schools primary logo silk screened on the front of the case.\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/case-reflect-for-iphone-3g--pid1114627445/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=1114627445\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=1114627445\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=1114627445\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=1114627445\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":84727583211520.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.69\",\"integral\":69},\"maxPrice\":{\"value\":\"$75.52\",\"integral\":7552},\"stores\":59},\"id\":1114627445,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Infuse Protector Case for iPhone 4 Black\",\"description\":\"Protect and personalize your iPhone 4 with this front and back image design Protector Case. Form-fitting front and back hard plastic covers Protects your cell phone without adding a lot of bulk Smooth glossy finish Snaps on to the front edges, sides...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/infuse-protector-case-for-iphone-4-black--pid2557462717/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2557462717\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2557462717\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2557462717\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2557462717\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":80831066406912.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.59\",\"integral\":59},\"maxPrice\":{\"value\":\"$79.00\",\"integral\":7900},\"stores\":24},\"id\":2557462717,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Dragonfly iPhone 4 Kream Case - Black\",\"description\":\"DF-0030219 - White, Kream Case for iPhone 4 by Dragon-Fly\",\"url\":{\"value\":\"http://www.bizrate.com/dragonfly-iphone-4-kream-case-black--pid2442061740/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2442061740\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2442061740\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2442061740\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2442061740\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":70900229603328.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.05\",\"integral\":105},\"maxPrice\":{\"value\":\"$94.49\",\"integral\":9449},\"stores\":30},\"id\":2442061740,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Apple iPhone 3G/3GS Silicone Case (Black)\",\"description\":\"Snap on Apple iPhone 3G 3GS Synthetic Leather Hardshell Case! Premium Qualtiy Synthetic Leather cover provides style, comfort, and protection to your iPhone 3G & 3GS. It also adds a sophisticated elegance and cool to your fashion. The case allows Quick...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/apple-iphone-3g3gs-silicone-case-black--pid2004746863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2004746863\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2004746863\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2004746863\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2004746863\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":65194915004416.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.01\",\"integral\":1},\"maxPrice\":{\"value\":\"$414.99\",\"integral\":41499},\"stores\":39},\"id\":2004746863,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Otterbox iPhone 4 Defender Case - Black\",\"description\":\"Your iPhone 4 has become a big part of your life. With FaceTime video, retina display, multitasking, HD video recording and more - you've got a lot to lose. You won't find a tougher case than the OtterBox Defender Series for iPhone 4. This three-layer...\",\"manufacturer\":\"Universal\",\"url\":{\"value\":\"http://www.bizrate.com/otterbox-iphone-4-defender-case-black--pid2584611575/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2584611575\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2584611575\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2584611575\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2584611575\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":61515478597632.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$3.28\",\"integral\":328},\"maxPrice\":{\"value\":\"$110.65\",\"integral\":11065},\"stores\":25},\"id\":2584611575,\"categoryId\":8515}],\"includedResults\":10,\"totalResults\":2000}}\n{\"classification\":{\"relevancyScore\":1000,\"searchUrl\":{\"value\":\"http://www.bizrate.com/iphone-cases/index__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"}},\"products\":{\"priceSet\":{\"minPrice\":{\"value\":\"$0.01\",\"integral\":1},\"maxPrice\":{\"value\":\"$4,833.99\",\"integral\":483399}},\"product\":[{\"type\":\"PRODUCT\",\"title\":\"Silicone case for iPhone 3G/ 3GS\",\"description\":\"Elite Horizontal Leather Pouch for Apple iPhone 3G/3Gs - Premium quality horizontal case for your Apple iPhone 3G/3Gs. This pouch is ideal for the style conscious on the go. This great looking case is made from high-quality leather with classic black...\",\"manufacturer\":\"Apple\",\"url\":{\"value\":\"http://www.bizrate.com/silicone-case-for-iphone-3g-3gs--pid1968262863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=1968262863\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=1968262863\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=1968262863\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=1968262863\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":310711221747712.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.56\",\"integral\":156},\"maxPrice\":{\"value\":\"$29.99\",\"integral\":2999},\"stores\":14},\"id\":1968262863,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Nonslip Checkered Silicone Skin Soft Case for iPhone 4 4G\",\"description\":\"Specification:Product Name Silicone Skin Case Model for Apple iPhone 4 Color Black Material Soft Silicone Skin Weight 26g Package 1 x Case for Apple iPhone 4 Description:This is a non-OEM product.Accessory Only, Phone is not included.\",\"manufacturer\":\"H&B\",\"url\":{\"value\":\"http://www.bizrate.com/nonslip-checkered-silicone-skin-soft-case-for-iphone-4-4g--pid2534935499/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2534935499\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2534935499\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2534935499\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2534935499\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":175580930637824.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.45\",\"integral\":45},\"maxPrice\":{\"value\":\"$194.95\",\"integral\":19495},\"stores\":34},\"id\":2534935499,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Plastic Case for iPhone 4 - Black\",\"description\":\"Description:Detachable Windmill Type Matte Hard Plastic Case Cover for iPhone 4 (Black / Magenta)Customised your iPhone with this wonderful Plastic Case which is a accessory for your iPhone 4 which is made of high quality and durable plastic, protect\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/plastic-case-for-iphone-4-black--pid2305624670/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2305624670\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2305624670\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2305624670\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2305624670\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":132488642953216.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.99\",\"integral\":99},\"maxPrice\":{\"value\":\"$303.68\",\"integral\":30368},\"stores\":33},\"id\":2305624670,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Protective Silicone Case for iPhone 4\",\"description\":\"Made of high quality PVC material Protects your iPhone 4 from any scratch and dirt Easy to install and remove, no any tool needed Cut-out design allows user can access all keypad / button and slot without having to remove the case\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/protective-silicone-case-for-iphone-4--pid2120981405/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2120981405\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2120981405\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2120981405\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2120981405\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":108614681362432.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.70\",\"integral\":170},\"maxPrice\":{\"value\":\"$99.99\",\"integral\":9999},\"stores\":11},\"id\":2120981405,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"IphoneÂ® 4 Aerosport Case\",\"description\":\"Do more than just protect your iPhone 4 with this case bundle from rooCASE. This 3 in 1 bundle include a snap-on case, screen protector and a Nike+ sensor shoe pouch that can be use on most running shoes. Color: Purple Design: Love Provides protection...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/iphone-4-aerosport-case--pid2203798762/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2203798762\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2203798762\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2203798762\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2203798762\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":96203484168192.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$2.49\",\"integral\":249},\"maxPrice\":{\"value\":\"$79.95\",\"integral\":7995},\"stores\":16},\"id\":2203798762,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Case Reflect For Iphone 3G\",\"description\":\"NCAA iPhone 3G faceplate features the schools primary logo silk screened on the front of the case.\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/case-reflect-for-iphone-3g--pid1114627445/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=1114627445\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=1114627445\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=1114627445\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=1114627445\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":84727583211520.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.69\",\"integral\":69},\"maxPrice\":{\"value\":\"$75.52\",\"integral\":7552},\"stores\":59},\"id\":1114627445,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Infuse Protector Case for iPhone 4 Black\",\"description\":\"Protect and personalize your iPhone 4 with this front and back image design Protector Case. Form-fitting front and back hard plastic covers Protects your cell phone without adding a lot of bulk Smooth glossy finish Snaps on to the front edges, sides...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/infuse-protector-case-for-iphone-4-black--pid2557462717/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2557462717\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2557462717\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2557462717\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2557462717\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":80831066406912.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.59\",\"integral\":59},\"maxPrice\":{\"value\":\"$79.00\",\"integral\":7900},\"stores\":24},\"id\":2557462717,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Dragonfly iPhone 4 Kream Case - Black\",\"description\":\"DF-0030219 - White, Kream Case for iPhone 4 by Dragon-Fly\",\"url\":{\"value\":\"http://www.bizrate.com/dragonfly-iphone-4-kream-case-black--pid2442061740/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2442061740\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2442061740\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2442061740\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2442061740\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":70900229603328.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.05\",\"integral\":105},\"maxPrice\":{\"value\":\"$94.49\",\"integral\":9449},\"stores\":30},\"id\":2442061740,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Apple iPhone 3G/3GS Silicone Case (Black)\",\"description\":\"Snap on Apple iPhone 3G 3GS Synthetic Leather Hardshell Case! Premium Qualtiy Synthetic Leather cover provides style, comfort, and protection to your iPhone 3G & 3GS. It also adds a sophisticated elegance and cool to your fashion. The case allows Quick...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/apple-iphone-3g3gs-silicone-case-black--pid2004746863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2004746863\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2004746863\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2004746863\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2004746863\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":65194915004416.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.01\",\"integral\":1},\"maxPrice\":{\"value\":\"$414.99\",\"integral\":41499},\"stores\":39},\"id\":2004746863,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Otterbox iPhone 4 Defender Case - Black\",\"description\":\"Your iPhone 4 has become a big part of your life. With FaceTime video, retina display, multitasking, HD video recording and more - you've got a lot to lose. You won't find a tougher case than the OtterBox Defender Series for iPhone 4. This three-layer...\",\"manufacturer\":\"Universal\",\"url\":{\"value\":\"http://www.bizrate.com/otterbox-iphone-4-defender-case-black--pid2584611575/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2584611575\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2584611575\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2584611575\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2584611575\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":61515478597632.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$3.28\",\"integral\":328},\"maxPrice\":{\"value\":\"$110.65\",\"integral\":11065},\"stores\":25},\"id\":2584611575,\"categoryId\":8515}],\"includedResults\":10,\"totalResults\":2000}}\n{\"classification\":{\"relevancyScore\":1000,\"searchUrl\":{\"value\":\"http://www.bizrate.com/iphone-cases/index__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"}},\"products\":{\"priceSet\":{\"minPrice\":{\"value\":\"$0.01\",\"integral\":1},\"maxPrice\":{\"value\":\"$4,833.99\",\"integral\":483399}},\"product\":[{\"type\":\"PRODUCT\",\"title\":\"Silicone case for iPhone 3G/ 3GS\",\"description\":\"Elite Horizontal Leather Pouch for Apple iPhone 3G/3Gs - Premium quality horizontal case for your Apple iPhone 3G/3Gs. This pouch is ideal for the style conscious on the go. This great looking case is made from high-quality leather with classic black...\",\"manufacturer\":\"Apple\",\"url\":{\"value\":\"http://www.bizrate.com/silicone-case-for-iphone-3g-3gs--pid1968262863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=1968262863\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=1968262863\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=1968262863\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=1968262863\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":310711221747712.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.56\",\"integral\":156},\"maxPrice\":{\"value\":\"$29.99\",\"integral\":2999},\"stores\":14},\"id\":1968262863,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Nonslip Checkered Silicone Skin Soft Case for iPhone 4 4G\",\"description\":\"Specification:Product Name Silicone Skin Case Model for Apple iPhone 4 Color Black Material Soft Silicone Skin Weight 26g Package 1 x Case for Apple iPhone 4 Description:This is a non-OEM product.Accessory Only, Phone is not included.\",\"manufacturer\":\"H&B\",\"url\":{\"value\":\"http://www.bizrate.com/nonslip-checkered-silicone-skin-soft-case-for-iphone-4-4g--pid2534935499/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2534935499\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2534935499\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2534935499\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2534935499\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":175580930637824.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.45\",\"integral\":45},\"maxPrice\":{\"value\":\"$194.95\",\"integral\":19495},\"stores\":34},\"id\":2534935499,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Plastic Case for iPhone 4 - Black\",\"description\":\"Description:Detachable Windmill Type Matte Hard Plastic Case Cover for iPhone 4 (Black / Magenta)Customised your iPhone with this wonderful Plastic Case which is a accessory for your iPhone 4 which is made of high quality and durable plastic, protect\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/plastic-case-for-iphone-4-black--pid2305624670/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2305624670\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2305624670\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2305624670\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2305624670\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":132488642953216.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.99\",\"integral\":99},\"maxPrice\":{\"value\":\"$303.68\",\"integral\":30368},\"stores\":33},\"id\":2305624670,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Protective Silicone Case for iPhone 4\",\"description\":\"Made of high quality PVC material Protects your iPhone 4 from any scratch and dirt Easy to install and remove, no any tool needed Cut-out design allows user can access all keypad / button and slot without having to remove the case\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/protective-silicone-case-for-iphone-4--pid2120981405/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2120981405\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2120981405\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2120981405\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2120981405\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":108614681362432.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.70\",\"integral\":170},\"maxPrice\":{\"value\":\"$99.99\",\"integral\":9999},\"stores\":11},\"id\":2120981405,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"IphoneÂ® 4 Aerosport Case\",\"description\":\"Do more than just protect your iPhone 4 with this case bundle from rooCASE. This 3 in 1 bundle include a snap-on case, screen protector and a Nike+ sensor shoe pouch that can be use on most running shoes. Color: Purple Design: Love Provides protection...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/iphone-4-aerosport-case--pid2203798762/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2203798762\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2203798762\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2203798762\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2203798762\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":96203484168192.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$2.49\",\"integral\":249},\"maxPrice\":{\"value\":\"$79.95\",\"integral\":7995},\"stores\":16},\"id\":2203798762,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Case Reflect For Iphone 3G\",\"description\":\"NCAA iPhone 3G faceplate features the schools primary logo silk screened on the front of the case.\",\"manufacturer\":\"Griffin\",\"url\":{\"value\":\"http://www.bizrate.com/case-reflect-for-iphone-3g--pid1114627445/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=1114627445\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=1114627445\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=1114627445\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=1114627445\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":84727583211520.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.69\",\"integral\":69},\"maxPrice\":{\"value\":\"$75.52\",\"integral\":7552},\"stores\":59},\"id\":1114627445,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Infuse Protector Case for iPhone 4 Black\",\"description\":\"Protect and personalize your iPhone 4 with this front and back image design Protector Case. Form-fitting front and back hard plastic covers Protects your cell phone without adding a lot of bulk Smooth glossy finish Snaps on to the front edges, sides...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/infuse-protector-case-for-iphone-4-black--pid2557462717/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2557462717\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2557462717\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2557462717\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2557462717\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":80831066406912.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.59\",\"integral\":59},\"maxPrice\":{\"value\":\"$79.00\",\"integral\":7900},\"stores\":24},\"id\":2557462717,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Dragonfly iPhone 4 Kream Case - Black\",\"description\":\"DF-0030219 - White, Kream Case for iPhone 4 by Dragon-Fly\",\"url\":{\"value\":\"http://www.bizrate.com/dragonfly-iphone-4-kream-case-black--pid2442061740/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2442061740\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2442061740\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2442061740\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2442061740\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":70900229603328.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$1.05\",\"integral\":105},\"maxPrice\":{\"value\":\"$94.49\",\"integral\":9449},\"stores\":30},\"id\":2442061740,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Apple iPhone 3G/3GS Silicone Case (Black)\",\"description\":\"Snap on Apple iPhone 3G 3GS Synthetic Leather Hardshell Case! Premium Qualtiy Synthetic Leather cover provides style, comfort, and protection to your iPhone 3G & 3GS. It also adds a sophisticated elegance and cool to your fashion. The case allows Quick...\",\"manufacturer\":\"Luxmo\",\"url\":{\"value\":\"http://www.bizrate.com/apple-iphone-3g3gs-silicone-case-black--pid2004746863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2004746863\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2004746863\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2004746863\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2004746863\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":65194915004416.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$0.01\",\"integral\":1},\"maxPrice\":{\"value\":\"$414.99\",\"integral\":41499},\"stores\":39},\"id\":2004746863,\"categoryId\":8515},{\"type\":\"PRODUCT\",\"title\":\"Otterbox iPhone 4 Defender Case - Black\",\"description\":\"Your iPhone 4 has become a big part of your life. With FaceTime video, retina display, multitasking, HD video recording and more - you've got a lot to lose. You won't find a tougher case than the OtterBox Defender Series for iPhone 4. This three-layer...\",\"manufacturer\":\"Universal\",\"url\":{\"value\":\"http://www.bizrate.com/otterbox-iphone-4-defender-case-black--pid2584611575/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html\"},\"images\":{\"image\":[{\"value\":\"http://image10.bizrate-images.com/resize?sq=60&uid=2584611575\",\"xsize\":60,\"ysize\":60},{\"value\":\"http://image10.bizrate-images.com/resize?sq=100&uid=2584611575\",\"xsize\":100,\"ysize\":100},{\"value\":\"http://image10.bizrate-images.com/resize?sq=160&uid=2584611575\",\"xsize\":160,\"ysize\":160},{\"value\":\"http://image10.bizrate-images.com/resize?sq=400&uid=2584611575\",\"xsize\":400,\"ysize\":400}]},\"relevancy\":61515478597632.000000,\"priceSet\":{\"minPrice\":{\"value\":\"$3.28\",\"integral\":328},\"maxPrice\":{\"value\":\"$110.65\",\"integral\":11065},\"stores\":25},\"id\":2584611575,\"categoryId\":8515}],\"includedResults\":10,\"totalResults\":2000}}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpcsocket/tst_qjsonrpcsocket.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QLocalServer>\n#include <QLocalSocket>\n\n#include <QtCore/QEventLoop>\n#include <QtCore/QVariant>\n#include <QtTest/QtTest>\n\n#if QT_VERSION >= 0x050000\n#include <QJsonDocument>\n#else\n#include \"json/qjsondocument.h\"\n#endif\n\n#include \"qjsonrpcservice_p.h\"\n#include \"qjsonrpcservice.h\"\n#include \"qjsonrpcmessage.h\"\n#include \"qjsonrpcservicereply.h\"\n#include \"qjsonrpcsocket_p.h\"\n#include \"qjsonrpcsocket.h\"\n\nclass QBufferBackedQJsonRpcSocketPrivate : public QJsonRpcSocketPrivate\n{\npublic:\n    QBufferBackedQJsonRpcSocketPrivate(QBuffer *b, QJsonRpcSocket *q)\n        : QJsonRpcSocketPrivate(q),\n          buffer(b)\n    {\n        device = b;\n    }\n\n    virtual void _q_processIncomingData() {\n        buffer->seek(0);\n        QJsonRpcSocketPrivate::_q_processIncomingData();\n    }\n\n    QBuffer *buffer;\n\n};\n\nclass QBufferBackedQJsonRpcSocket : public QJsonRpcSocket\n{\n    Q_OBJECT\npublic:\n    QBufferBackedQJsonRpcSocket(QBuffer *buffer, QObject *parent = 0)\n        : QJsonRpcSocket(*new QBufferBackedQJsonRpcSocketPrivate(buffer, this), parent)\n    {\n    }\n};\n\nclass TestQJsonRpcSocket: public QObject\n{\n    Q_OBJECT\npublic:\n    enum InvokeType {\n        SendMessage,\n        InvokeRemoteMethod\n    };\n\nprivate Q_SLOTS:\n    void initTestCase_data();\n    void noParameters();\n    void multiParameter();\n    void notification();\n    void response();\n    void delayedMessageReceive();\n\nprivate:\n    // benchmark parsing speed\n    void jsonParsingBenchmark();\n};\nQ_DECLARE_METATYPE(TestQJsonRpcSocket::InvokeType)\n\nvoid TestQJsonRpcSocket::initTestCase_data()\n{\n    QTest::addColumn<InvokeType>(\"invokeType\");\n    QTest::newRow(\"sendMessage\") << SendMessage;\n    QTest::newRow(\"invokeRemoteMethod\") << InvokeRemoteMethod;\n}\n\nvoid TestQJsonRpcSocket::noParameters()\n{\n    QFETCH_GLOBAL(InvokeType, invokeType);\n\n    QBuffer buffer;\n    buffer.open(QIODevice::ReadWrite);\n    QJsonRpcSocket serviceSocket(&buffer, this);\n    QSignalSpy spyMessageReceived(&serviceSocket,\n                                  SIGNAL(messageReceived(QJsonRpcMessage)));\n    QVERIFY(serviceSocket.isValid());\n\n    QJsonRpcMessage request;\n    QScopedPointer<QJsonRpcServiceReply> reply;\n    if (invokeType == SendMessage) {\n        request = QJsonRpcMessage::createRequest(QString(\"test.noParam\"));\n        reply.reset(serviceSocket.sendMessage(request));\n    } else if (invokeType == InvokeRemoteMethod) {\n        reply.reset(serviceSocket.invokeRemoteMethod(\"test.noParam\"));\n        request = reply->request();\n    }\n\n    QJsonRpcMessage bufferMessage = QJsonRpcMessage::fromJson(buffer.data());\n    QCOMPARE(request.id(), bufferMessage.id());\n    QCOMPARE(request.type(), bufferMessage.type());\n    QCOMPARE(request.method(), bufferMessage.method());\n    QCOMPARE(request.params(), bufferMessage.params());\n    QCOMPARE(spyMessageReceived.count(), 0);\n}\n\nvoid TestQJsonRpcSocket::multiParameter()\n{\n    QFETCH_GLOBAL(InvokeType, invokeType);\n\n    QBuffer buffer;\n    buffer.open(QIODevice::ReadWrite);\n    QJsonRpcSocket serviceSocket(&buffer, this);\n    QSignalSpy spyMessageReceived(&serviceSocket,\n                                  SIGNAL(messageReceived(QJsonRpcMessage)));\n    QVERIFY(serviceSocket.isValid());\n\n    QJsonArray params;\n    params.append(false);\n    params.append(true);\n    QJsonRpcMessage request;\n    QScopedPointer<QJsonRpcServiceReply> reply;\n    if (invokeType == SendMessage) {\n        request = QJsonRpcMessage::createRequest(\"test.multiParam\", params);\n        reply.reset(serviceSocket.sendMessage(request));\n    } else if (invokeType == InvokeRemoteMethod) {\n#if QT_VERSION <= 0x050000\n        QVariant paramsVariant = QVariant::fromValue(params);\n        reply.reset(serviceSocket.invokeRemoteMethod(\"test.multiParam\", paramsVariant));\n#else\n        reply.reset(serviceSocket.invokeRemoteMethod(\"test.multiParam\", params));\n#endif\n        request = reply->request();\n    }\n\n    QJsonRpcMessage bufferMessage = QJsonRpcMessage::fromJson(buffer.data());\n    QCOMPARE(request.id(), bufferMessage.id());\n    QCOMPARE(request.type(), bufferMessage.type());\n    QCOMPARE(request.method(), bufferMessage.method());\n    QCOMPARE(request.params(), bufferMessage.params());\n    QCOMPARE(spyMessageReceived.count(), 0);\n}\n\nvoid TestQJsonRpcSocket::notification()\n{\n    QFETCH_GLOBAL(InvokeType, invokeType);\n\n    QBuffer buffer;\n    buffer.open(QIODevice::ReadWrite);\n    QJsonRpcSocket serviceSocket(&buffer, this);\n    QSignalSpy spyMessageReceived(&serviceSocket,\n                                  SIGNAL(messageReceived(QJsonRpcMessage)));\n    QVERIFY(serviceSocket.isValid());\n\n    QJsonRpcMessage notification;\n    QScopedPointer<QJsonRpcServiceReply> reply;\n    if (invokeType == SendMessage) {\n        notification = QJsonRpcMessage::createRequest(\"test.notify\");\n        reply.reset(serviceSocket.sendMessage(notification));\n    } else if (invokeType == InvokeRemoteMethod) {\n        reply.reset(serviceSocket.invokeRemoteMethod(\"test.notify\"));\n        notification = reply->request();\n    }\n\n    QJsonRpcMessage bufferMessage = QJsonRpcMessage::fromJson(buffer.data());\n    QCOMPARE(notification.id(), bufferMessage.id());\n    QCOMPARE(notification.type(), bufferMessage.type());\n    QCOMPARE(notification.method(), bufferMessage.method());\n    QCOMPARE(notification.params(), bufferMessage.params());\n    QCOMPARE(spyMessageReceived.count(), 0);\n}\n\nvoid TestQJsonRpcSocket::response()\n{\n    QBuffer buffer;\n    buffer.open(QIODevice::ReadWrite);\n    QJsonRpcSocket serviceSocket(&buffer, this);\n    QSignalSpy spyMessageReceived(&serviceSocket,\n                                  SIGNAL(messageReceived(QJsonRpcMessage)));\n    QVERIFY(serviceSocket.isValid());\n\n    QJsonRpcMessage response = QJsonRpcMessage::createRequest(\"test.response\");\n    response = response.createResponse(QJsonValue());\n\n    QScopedPointer<QJsonRpcServiceReply> reply;\n    reply.reset(serviceSocket.sendMessage(response));\n\n    QJsonRpcMessage bufferMessage = QJsonRpcMessage::fromJson(buffer.data());\n    QCOMPARE(response.id(), bufferMessage.id());\n    QCOMPARE(response.type(), bufferMessage.type());\n    QCOMPARE(response.method(), bufferMessage.method());\n    QCOMPARE(response.params(), bufferMessage.params());\n    QCOMPARE(spyMessageReceived.count(), 0);\n}\n\nvoid TestQJsonRpcSocket::jsonParsingBenchmark()\n{\n    QFile testData(\":/testwire.json\");\n    QVERIFY(testData.open(QIODevice::ReadOnly));\n    QByteArray jsonData = testData.readAll();\n    QJsonRpcSocketPrivate socketPrivate(0);\n\n    int messageCount = 0;\n    while (!jsonData.isEmpty()) {\n        int pos = 0;\n        QBENCHMARK {\n            pos = socketPrivate.findJsonDocumentEnd(jsonData);\n        }\n\n        if (pos > -1) {\n            messageCount++;\n            jsonData = jsonData.mid(pos + 1);\n        } else {\n            break;\n        }\n    }\n\n    QCOMPARE(messageCount, 8);\n}\n\nvoid TestQJsonRpcSocket::delayedMessageReceive()\n{\n    QBuffer buffer;\n    buffer.open(QIODevice::ReadWrite);\n    QBufferBackedQJsonRpcSocket serviceSocket(&buffer, this);\n    QSignalSpy spyMessageReceived(&serviceSocket,\n                                  SIGNAL(messageReceived(QJsonRpcMessage)));\n    QVERIFY(serviceSocket.isValid());\n\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"test.multiParam\");\n\n    QJsonRpcMessage response = serviceSocket.sendMessageBlocking(request, 1);\n    QVERIFY(response.type() == QJsonRpcMessage::Error);\n    spyMessageReceived.removeLast();\n\n    // this should cause a crash, before the fix\n    const char *fakeDelayedResult =\n        \"{\" \\\n            \"\\\"id\\\": %1,\" \\\n            \"\\\"jsonrpc\\\": \\\"2.0\\\",\" \\\n            \"\\\"result\\\": true\" \\\n        \"}\";\n\n    buffer.write(QString(fakeDelayedResult).arg(request.id()).toLatin1());\n    while (!spyMessageReceived.size())\n        qApp->processEvents();\n}\n\nQTEST_MAIN(TestQJsonRpcSocket)\n#include \"tst_qjsonrpcsocket.moc\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/auto/qjsonrpcsocket/tst_qjsonrpcsocket.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/\">\n        <file>testwire.json</file>\n    </qresource>\n</RCC>"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/common/signalspy.h",
    "content": "#ifndef SIGNALSPY_H\n#define SIGNALSPY_H\n\n#if QT_VERSION >= 0x050000\ntypedef QSignalSpy SignalSpy;\n#else\n#include <QtCore/qbytearray.h>\n#include <QtCore/qlist.h>\n#include <QtCore/qobject.h>\n#include <QtCore/qmetaobject.h>\n#include <QtCore/qvariant.h>\n#include <QtCore/qvector.h>\n#include <QtTest/qtesteventloop.h>\n\nclass QVariant;\nclass SignalSpy: public QObject, public QList<QList<QVariant> >\n{\npublic:\n    explicit SignalSpy(const QObject *obj, const char *aSignal)\n        : m_waiting(false)\n    {\n        static const int memberOffset = QObject::staticMetaObject.methodCount();\n        if (!obj) {\n            qWarning(\"SignalSpy: Cannot spy on a null object\");\n            return;\n        }\n\n        if (!aSignal) {\n            qWarning(\"SignalSpy: Null signal name is not valid\");\n            return;\n        }\n\n        if (((aSignal[0] - '0') & 0x03) != QSIGNAL_CODE) {\n            qWarning(\"SignalSpy: Not a valid signal, use the SIGNAL macro\");\n            return;\n        }\n\n        const QByteArray ba = QMetaObject::normalizedSignature(aSignal + 1);\n        const QMetaObject * const mo = obj->metaObject();\n        const int sigIndex = mo->indexOfMethod(ba.constData());\n        if (sigIndex < 0) {\n            qWarning(\"SignalSpy: No such signal: '%s'\", ba.constData());\n            return;\n        }\n\n        if (!QMetaObject::connect(obj, sigIndex, this, memberOffset,\n                    Qt::DirectConnection, 0)) {\n            qWarning(\"SignalSpy: QMetaObject::connect returned false. Unable to connect.\");\n            return;\n        }\n        sig = ba;\n        initArgs(mo->method(sigIndex), obj);\n    }\n\n    inline bool isValid() const { return !sig.isEmpty(); }\n    inline QByteArray signal() const { return sig; }\n\n    bool wait(int timeout = 5)\n    {\n        Q_ASSERT(!m_waiting);\n        const int origCount = count();\n        m_waiting = true;\n        m_loop.enterLoop(timeout);\n        m_waiting = false;\n        return count() > origCount;\n    }\n\n    int qt_metacall(QMetaObject::Call call, int methodId, void **a)\n    {\n        methodId = QObject::qt_metacall(call, methodId, a);\n        if (methodId < 0)\n            return methodId;\n\n        if (call == QMetaObject::InvokeMetaMethod) {\n            if (methodId == 0) {\n                appendArgs(a);\n            }\n            --methodId;\n        }\n        return methodId;\n    }\n\nprivate:\n    void initArgs(const QMetaMethod &member)\n    {\n        initArgs(member, 0);\n    }\n\n    void initArgs(const QMetaMethod &member, const QObject *obj)\n    {\n        Q_UNUSED(obj)\n        QList<QByteArray> params = member.parameterTypes();\n        for (int i = 0; i < params.count(); ++i) {\n            int tp = QMetaType::type(params.at(i).constData());\n            if (tp == QMetaType::Void)\n                qWarning(\"Don't know how to handle '%s', use qRegisterMetaType to register it.\",\n                         params.at(i).constData());\n            args << tp;\n        }\n    }\n\n    void appendArgs(void **a)\n    {\n        QList<QVariant> list;\n        for (int i = 0; i < args.count(); ++i) {\n            QMetaType::Type type = static_cast<QMetaType::Type>(args.at(i));\n            list << QVariant(type, a[i + 1]);\n        }\n        append(list);\n\n        if (m_waiting)\n            m_loop.exitLoop();\n    }\n\n    // the full, normalized signal name\n    QByteArray sig;\n    // holds the QMetaType types for the argument list of the signal\n    QVector<int> args;\n\n    QTestEventLoop m_loop;\n    bool m_waiting;\n};\n#endif\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/gen-coverage.sh",
    "content": "#!/bin/bash\nlcov --capture --directory . --output-file coverage-gcov.info --no-external\nlcov --output-file coverage-gcov.info --remove coverage-gcov.info 'moc_*.cpp' '*.moc*' '.*rcc*' '*3rdparty*' 'qrc_*'\ngenhtml coverage-gcov.info --output-directory doc/coverage\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/benchmark/benchmark.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\nCONFIG -= testcase\n\nTARGET = benchmark\nSOURCES = \\\n    tst_benchmark.cpp\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/benchmark/tst_benchmark.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QScopedPointer>\n\n#include <QtCore/QEventLoop>\n#include <QtCore/QVariant>\n#include <QtTest/QtTest>\n#include <QElapsedTimer>\n#include <QThread>\n\n#if QT_VERSION >= 0x050000\n#include <QJsonDocument>\n#else\n#include \"json/qjsondocument.h\"\n#endif\n\n#include \"qjsonrpcabstractserver.h\"\n#include \"qjsonrpcsocket.h\"\n#include \"qjsonrpcservice.h\"\n#include \"qjsonrpcmessage.h\"\n\nclass TestBenchmark: public QObject\n{\n    Q_OBJECT\nprivate Q_SLOTS:\n    void simple();\n    void namedParameters();\n\n};\n\nclass TestService : public QJsonRpcService\n{\n    Q_OBJECT\n    Q_CLASSINFO(\"serviceName\", \"service\")\npublic:\n    TestService(QObject *parent = 0) : QJsonRpcService(parent)\n    {}\n\n    QJsonRpcMessage testDispatch(const QJsonRpcMessage &message) {\n        return QJsonRpcService::dispatch(message);\n    }\n\npublic Q_SLOTS:\n    QString singleParam(int i) const { return QString::number(i); }\n    QString singleParam(const QString &string) const { return string; }\n    QString singleParam(const QVariant &k) const { return k.toString(); }\n\n    QString namedParams(int integer, const QString &string, double doub)\n    {\n        (void) integer;\n        (void) doub;\n\n        return string;\n    }\n};\n\nclass TestServiceProvider : public QJsonRpcServiceProvider\n{\npublic:\n    TestServiceProvider() {}\n};\n\nvoid TestBenchmark::simple()\n{\n    TestServiceProvider provider;\n    TestService service;\n    provider.addService(&service);\n\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"service.singleParam\", QString(\"test\"));\n    QBENCHMARK {\n        QJsonRpcMessage response = service.testDispatch(request);\n        QVERIFY(response.type() != QJsonRpcMessage::Error);\n    }\n}\n\nvoid TestBenchmark::namedParameters()\n{\n    TestServiceProvider provider;\n    TestService service;\n    provider.addService(&service);\n\n    QJsonObject obj;\n    obj[\"integer\"] = 1;\n    obj[\"string\"] = QLatin1String(\"str\");\n    obj[\"doub\"] = 1.2;\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(\"service.namedParams\", obj);\n\n    QBENCHMARK {\n        QJsonRpcMessage response = service.testDispatch(request);\n        QVERIFY(response.type() != QJsonRpcMessage::Error);\n    }\n}\n\nQTEST_MAIN(TestBenchmark)\n#include \"tst_benchmark.moc\"\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/console/console.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\nCONFIG -= testcase\n\nTEMPLATE = app\nQT += script core\nHEADERS = interface.h\nSOURCES = interface.cpp \\\n          main.cpp\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/console/interface.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QLocalSocket>\n#include <QEventLoop>\n#include <QTimer>\n#include <QScriptContext>\n\n#include \"qjsonrpcsocket.h\"\n#include \"qjsonrpcservice.h\"\n#include \"qjsonrpcservicereply.h\"\n#include \"interface.h\"\n\nQJsonRpcServiceSocketPrototype::QJsonRpcServiceSocketPrototype(QObject *parent)\n    : QObject(parent),\n      m_socket(0)\n{    \n}\n\nQJsonRpcServiceSocketPrototype::~QJsonRpcServiceSocketPrototype()\n{\n}\n\nvoid QJsonRpcServiceSocketPrototype::connectToLocalService(const QString &service)\n{\n    if (m_socket) {\n        context()->throwError(\"already connected to local service\");\n        return;\n    }\n\n    QLocalSocket *localSocket = new QLocalSocket(this);\n    localSocket->connectToServer(service);\n    if (!localSocket->waitForConnected()) {\n        context()->throwError(\"could not connect to local sevice: \" + service);\n        localSocket->deleteLater();\n        return;\n    }\n\n    m_socket = new QJsonRpcSocket(localSocket, this);\n}\n\nQVariant QJsonRpcServiceSocketPrototype::invokeRemoteMethod(const QString &method,\n                                                         const QVariant &param1, const QVariant &param2, const QVariant &param3,\n                                                         const QVariant &param4, const QVariant &param5, const QVariant &param6,\n                                                         const QVariant &param7, const QVariant &param8, const QVariant &param9,\n                                                         const QVariant &param10)\n{\n    QVariantList params;\n    if (param1.isValid()) params.append(param1);\n    if (param2.isValid()) params.append(param2);\n    if (param3.isValid()) params.append(param3);\n    if (param4.isValid()) params.append(param4);\n    if (param5.isValid()) params.append(param5);\n    if (param6.isValid()) params.append(param6);\n    if (param7.isValid()) params.append(param7);\n    if (param8.isValid()) params.append(param8);\n    if (param9.isValid()) params.append(param9);\n    if (param10.isValid()) params.append(param10);\n\n    QJsonRpcMessage request =\n        QJsonRpcMessage::createRequest(method, QJsonArray::fromVariantList(params));\n    QJsonRpcServiceReply *reply = m_socket->sendMessage(request);\n    QEventLoop loop;\n    connect(m_socket, SIGNAL(messageReceived(QJsonRpcMessage)), &loop, SLOT(quit()));\n    connect(reply, SIGNAL(finished()), &loop, SLOT(quit()));\n    loop.exec();\n\n    if (reply->response().type() == QJsonRpcMessage::Invalid) {\n        context()->throwError(\"request timed out\");\n        return QVariant();\n    }\n    return reply->response().result().toVariant();\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/console/interface.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef QJSONRPCSERVICESCRIPT_H\n#define QJSONRPCSERVICESCRIPT_H\n\n#include <QObject>\n#include <QVariant>\n#include <QScriptClass>\n#include <QScriptable>\n\nclass QJsonRpcSocket;\nclass QJsonRpcServiceSocketPrototype : public QObject,\n                                       protected QScriptable\n{\n    Q_OBJECT\npublic:\n    QJsonRpcServiceSocketPrototype(QObject *parent = 0);\n    ~QJsonRpcServiceSocketPrototype();\n\npublic Q_SLOTS:\n    void connectToLocalService(const QString &service);\n    QVariant invokeRemoteMethod(const QString &method, const QVariant &arg1 = QVariant(),\n                                const QVariant &arg2 = QVariant(), const QVariant &arg3 = QVariant(),\n                                const QVariant &arg4 = QVariant(), const QVariant &arg5 = QVariant(),\n                                const QVariant &arg6 = QVariant(), const QVariant &arg7 = QVariant(),\n                                const QVariant &arg8 = QVariant(), const QVariant &arg9 = QVariant(),\n                                const QVariant &arg10 = QVariant());\n\nprivate:\n    QJsonRpcSocket *m_socket;\n\n};\n\n#endif\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/console/main.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <qscriptengine.h>\n\n#include <QtCore/QFile>\n#include <QtCore/QTextStream>\n#include <QtCore/QStringList>\n#include <QCoreApplication>\n\n#include <stdlib.h>\n\n#include \"interface.h\"\n\nstatic bool wantsToQuit;\n\nstatic QScriptValue qtscript_quit(QScriptContext *ctx, QScriptEngine *eng)\n{\n    Q_UNUSED(ctx);\n    wantsToQuit = true;\n    return eng->undefinedValue();\n}\n\nstatic void interactive(QScriptEngine *eng)\n{\n    QScriptValue global = eng->globalObject();\n    QScriptValue quitFunction = eng->newFunction(qtscript_quit);\n    if (!global.property(QLatin1String(\"exit\")).isValid())\n        global.setProperty(QLatin1String(\"exit\"), quitFunction);\n    if (!global.property(QLatin1String(\"quit\")).isValid())\n        global.setProperty(QLatin1String(\"quit\"), quitFunction);\n    wantsToQuit = false;\n\n    QTextStream qin(stdin, QFile::ReadOnly);\n\n    const char *qscript_prompt = \"console> \";\n    const char *dot_prompt = \".... \";\n    const char *prompt = qscript_prompt;\n\n    QString code;\n\n    forever {\n        QString line;\n\n        printf(\"%s\", prompt);\n        fflush(stdout);\n\n        line = qin.readLine();\n        if (line.isNull())\n            break;\n\n        code += line;\n        code += QLatin1Char('\\n');\n\n        if (line.trimmed().isEmpty()) {\n            continue;\n\n        } else if (! eng->canEvaluate(code)) {\n            prompt = dot_prompt;\n\n        } else {\n            QScriptValue result = eng->evaluate(code, QLatin1String(\"typein\"));\n\n            code.clear();\n            prompt = qscript_prompt;\n\n            if (! result.isUndefined())\n                fprintf(stderr, \"%s\\n\", qPrintable(result.toString()));\n\n            if (wantsToQuit)\n                break;\n        }\n    }\n}\n\nstatic QScriptValue importExtension(QScriptContext *context, QScriptEngine *engine)\n{\n    return engine->importExtension(context->argument(0).toString());\n}\n\nstatic QScriptValue loadScripts(QScriptContext *context, QScriptEngine *engine)\n{\n    for (int i = 0; i < context->argumentCount(); ++i) {\n        QString fileName = context->argument(0).toString();\n        QFile file(fileName);\n        if (!file.open(QIODevice::ReadOnly))\n            return context->throwError(QString::fromLatin1(\"could not open %0 for reading\").arg(fileName));\n        QTextStream ts(&file);\n        QString contents = ts.readAll();\n        file.close();\n        QScriptContext *pc = context->parentContext();\n        context->setActivationObject(pc->activationObject());\n        context->setThisObject(pc->thisObject());\n        QScriptValue ret = engine->evaluate(contents);\n        if (engine->hasUncaughtException())\n            return ret;\n    }\n    return engine->undefinedValue();\n}\n\nint main(int argc, char *argv[])\n{\n    QCoreApplication *app;\n    if (argc >= 2 && !qstrcmp(argv[1], \"-tty\")) {\n        ++argv;\n       --argc;\n        app = new QCoreApplication(argc, argv);\n    } else {\n        app = new QCoreApplication(argc, argv);\n    }\n\n    QScriptEngine *eng = new QScriptEngine();\n\n    QScriptValue globalObject = eng->globalObject();\n\n    globalObject.setProperty(\"load\", eng->newFunction(loadScripts, /*length=*/1));\n\n    {\n        if (!globalObject.property(\"qt\").isObject())\n            globalObject.setProperty(\"qt\", eng->newObject());            \n        QScriptValue qscript = eng->newObject();\n        qscript.setProperty(\"importExtension\", eng->newFunction(importExtension));\n        globalObject.property(\"qt\").setProperty(\"script\", qscript);\n    }\n\n    //    ByteArrayClass *byteArrayClass = new ByteArrayClass(eng);\n    //    globalObject.setProperty(\"ByteArray\", byteArrayClass->constructor());\n\n    QScriptValue rpcObject = eng->newQObject(new QJsonRpcServiceSocketPrototype);\n    globalObject.setProperty(\"qjsonrpc\", rpcObject);\n\n    if (! *++argv) {\n        interactive(eng);\n        return EXIT_SUCCESS;\n    }\n\n    while (const char *arg = *argv++) {\n        QString fn = QString::fromLocal8Bit(arg);\n\n        if (fn == QLatin1String(\"-i\")) {\n            interactive(eng);\n            break;\n        }\n\n        QString contents;\n        int lineNumber = 1;\n\n        if (fn == QLatin1String(\"-\")) {\n            QTextStream stream(stdin, QFile::ReadOnly);\n            contents = stream.readAll();\n        }\n\n        else {\n            QFile file(fn);\n\n            if (file.open(QFile::ReadOnly)) {\n                QTextStream stream(&file);\n                contents = stream.readAll();\n                file.close();\n\n                // strip off #!/usr/bin/env qscript line\n                if (contents.startsWith(\"#!\")) {\n                    contents.remove(0, contents.indexOf(\"\\n\"));\n                    ++lineNumber;\n                }\n            }\n        }\n\n        if (contents.isEmpty())\n            continue;\n\n        QScriptValue r = eng->evaluate(contents, fn, lineNumber);\n        if (eng->hasUncaughtException()) {\n            QStringList backtrace = eng->uncaughtExceptionBacktrace();\n            fprintf (stderr, \"    %s\\n%s\\n\\n\", qPrintable(r.toString()),\n                     qPrintable(backtrace.join(\"\\n\")));\n            return EXIT_FAILURE;\n        }\n    }\n\n    delete eng;\n    delete app;\n\n    return EXIT_SUCCESS;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/httpclient/httpclient.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\nCONFIG -= testcase\n\nTEMPLATE = app\nTARGET = httpclient\nSOURCES = \\\n    main.cpp\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/httpclient/main.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QCoreApplication>\n#include <QAuthenticator>\n#include <QStringList>\n#include <QDebug>\n\n#include \"qjsonrpchttpclient.h\"\n\nclass HttpClient : public QJsonRpcHttpClient\n{\n    Q_OBJECT\npublic:\n    HttpClient(const QString &endpoint, QObject *parent = 0)\n        : QJsonRpcHttpClient(endpoint, parent)\n    {\n        // defaults added for my local test server\n        m_username = \"bitcoinrpc\";\n        m_password = \"232fb3276bbb7437d265298ea48bdc46\";\n    }\n\n    void setUsername(const QString &username) {\n        m_username = username;\n    }\n\n    void setPassword(const QString &password) {\n        m_password = password;\n    }\n\nprivate Q_SLOTS:\n    virtual void handleAuthenticationRequired(QNetworkReply *reply, QAuthenticator * authenticator)\n    {\n        Q_UNUSED(reply)\n        authenticator->setUser(m_username);\n        authenticator->setPassword(m_password);\n    }\n\nprivate:\n    QString m_username;\n    QString m_password;\n\n};\n\nint main(int argc, char **argv)\n{\n    QCoreApplication app(argc, argv);\n    if (app.arguments().size() < 2) {\n        qDebug() << \"usage: \" << argv[0] << \"[-u username] [-p password] <command> <arguments>\";\n        return -1;\n    }\n\n    HttpClient client(\"http://127.0.0.1:8332\");\n    if (app.arguments().contains(\"-u\")) {\n        int idx = app.arguments().indexOf(\"-u\");\n        app.arguments().removeAt(idx);\n        client.setUsername(app.arguments().takeAt(idx));\n    }\n\n    if (app.arguments().contains(\"-p\")) {\n        int idx = app.arguments().indexOf(\"-p\");\n        app.arguments().removeAt(idx);\n        client.setPassword(app.arguments().takeAt(idx));\n    }\n\n    QJsonRpcMessage message = QJsonRpcMessage::createRequest(app.arguments().at(1));\n    QJsonRpcMessage response = client.sendMessageBlocking(message);\n    if (response.type() == QJsonRpcMessage::Error) {\n        qDebug() << response.errorData();\n        return -1;\n    }\n\n    qDebug() << response.toJson();\n}\n\n#include \"main.moc\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/httpserver/httpserver.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QCoreApplication>\n\n#include \"qjsonrpchttpserver.h\"\n#include \"testservice.h\"\n\nint main(int argc, char **argv)\n{\n    QCoreApplication app(argc, argv);\n    QJsonRpcHttpServer rpcServer;\n    rpcServer.addService(new TestService);\n    if (!rpcServer.listen(QHostAddress::LocalHost, 5555)) {\n        qDebug() << \"can't start tcp server: \" << rpcServer.errorString();\n        return -1;\n    }\n\n    return app.exec();\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/httpserver/httpserver.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\nCONFIG -= testcase\n\nTEMPLATE = app\nTARGET = httpserver\nHEADERS = \\\n    testservice.h\nSOURCES = \\\n    testservice.cpp \\\n    httpserver.cpp\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/httpserver/testservice.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QDebug>\n#include <QTimer>\n#include <QEventLoop>\n#include <QThreadPool>\n#include <QRunnable>\n\n#include \"testservice.h\"\n\nTestService::TestService(QObject *parent)\n    : QJsonRpcService(parent)\n{\n    QThreadPool::globalInstance()->setMaxThreadCount(10);\n}\n\nvoid TestService::testMethod()\n{\n    qDebug() << Q_FUNC_INFO << \"called\" << endl;\n}\n\nvoid TestService::testMethodWithParams(const QString &first, bool second, double third)\n{\n    qDebug() << Q_FUNC_INFO << \"called with parameters: \" << endl\n             << \" first: \" << first << endl\n             << \"second: \" << second << endl\n             << \" third: \" << third << endl;\n}\n\nvoid TestService::testMethodWithVariantParams(const QString &first, bool second, double third, const QVariant &fourth)\n{\n    qDebug() << Q_FUNC_INFO << \"called with variant parameters: \" << endl\n             << \" first: \" << first << endl\n             << \"second: \" << second << endl\n             << \" third: \" << third << endl\n             << \"fourth: \" << fourth << endl;\n}\n\nQString TestService::testMethodWithParamsAndReturnValue(const QString &name)\n{\n    return QString(\"Hello %1\").arg(name);\n}\n\nvoid TestService::testMethodWithDefaultParameter(const QString &first, const QString &second)\n{\n    qDebug() << Q_FUNC_INFO << endl\n             << \"first: \" << first << endl\n             << (second.isEmpty() ? \"not defined, default parameter\" : second) << endl;\n}\n\nQString TestService::immediateResponse()\n{\n    return \"immediate\";\n}\n\nQString TestService::longTaskWithImmediateResponse()\n{\n    QEventLoop loop;\n    QTimer::singleShot(1000, &loop, SLOT(quit()));\n    loop.exec();\n    return \"long immediate\";\n}\n\nclass DelayedResponseJob : public QRunnable\n{\npublic:\n    DelayedResponseJob(const QJsonRpcServiceRequest &request)\n        : m_request(request)\n    {\n    }\n\nprotected:\n    virtual void run() {\n        // do some work\n        QEventLoop loop;\n        QTimer::singleShot(1000, &loop, SLOT(quit()));\n        loop.exec();\n\n        // respond\n        QJsonRpcMessage response = m_request.request().createResponse(QLatin1String(\"long delayed\"));\n        m_request.respond(response);\n    }\n\nprivate:\n    QJsonRpcServiceRequest m_request;\n\n};\n\nQString TestService::longTaskWithDelayedResponse()\n{\n    beginDelayedResponse();\n    QThreadPool::globalInstance()->start(new DelayedResponseJob(currentRequest()));\n    return QString();\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/httpserver/testservice.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef TESTSERVICE_H\n#define TESTSERVICE_H\n\n#include \"qjsonrpcservice.h\"\n\nclass TestService : public QJsonRpcService\n{\n    Q_OBJECT\n    Q_CLASSINFO(\"serviceName\", \"agent\")\npublic:\n    TestService(QObject *parent = 0);\n\npublic Q_SLOTS:\n    void testMethod();\n    void testMethodWithParams(const QString &first, bool second, double third);\n    void testMethodWithVariantParams(const QString &first, bool second, double third, const QVariant &fourth);\n    QString testMethodWithParamsAndReturnValue(const QString &name);\n    void testMethodWithDefaultParameter(const QString &first, const QString &second = QString());\n\n    QString immediateResponse();\n    QString longTaskWithImmediateResponse();\n    QString longTaskWithDelayedResponse();\n\n};\n\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/localclient/localclient.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QLocalSocket>\n#include <QDir>\n\n#include \"qjsonrpcsocket.h\"\n#include \"qjsonrpcservice.h\"\n#include \"qjsonrpcservicereply.h\"\n#include \"localclient.h\"\n\nLocalClient::LocalClient(QObject *parent)\n    : QObject(parent),\n      m_client(0)\n{\n}\n\nvoid LocalClient::run()\n{\n    QLocalSocket *socket = new QLocalSocket(this);\n    QString serviceName = QDir::temp().absoluteFilePath(\"testservice\");\n    socket->connectToServer(serviceName);\n    if (!socket->waitForConnected()) {\n        qDebug() << \"could not connect to server: \" << socket->errorString();\n        return;\n    }\n\n    m_client = new QJsonRpcSocket(socket, this);\n    QJsonRpcServiceReply *reply = m_client->invokeRemoteMethod(\"agent.testMethod\");\n    connect(reply, SIGNAL(finished()), this, SLOT(processResponse()));\n\n    reply = m_client->invokeRemoteMethod(\"agent.testMethodWithParams\", \"one\", false, 10);\n    connect(reply, SIGNAL(finished()), this, SLOT(processResponse()));\n\n    reply = m_client->invokeRemoteMethod(\"agent.testMethodWithVariantParams\", \"one\", false, 10, QVariant(2.5));\n    connect(reply, SIGNAL(finished()), this, SLOT(processResponse()));\n\n    reply = m_client->invokeRemoteMethod(\"agent.testMethodWithParamsAndReturnValue\", \"matt\");\n    connect(reply, SIGNAL(finished()), this, SLOT(processResponse()));\n}\n\nvoid LocalClient::processResponse()\n{\n    QJsonRpcServiceReply *reply = static_cast<QJsonRpcServiceReply *>(sender());\n    if (!reply) {\n        qDebug() << \"invalid response received\";\n        return;\n    }\n\n    qDebug() << \"response received: \" << reply->response();\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/localclient/localclient.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef CLIENT_H\n#define CLIENT_H\n\n#include <QObject>\n#include \"qjsonrpcmessage.h\"\n\nclass QJsonRpcSocket;\nclass LocalClient : public QObject\n{\n    Q_OBJECT\npublic:\n    LocalClient(QObject *parent = 0);\n    void run();\n\nprivate Q_SLOTS:\n    void processResponse();\n\nprivate:\n    QJsonRpcSocket *m_client;\n\n};\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/localclient/localclient.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\nCONFIG -= testcase\n\nTEMPLATE = app\nTARGET = localclient\nHEADERS = \\\n    localclient.h\nSOURCES = \\\n    localclient.cpp \\\n    main.cpp\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/localclient/main.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QCoreApplication>\n\n#include \"localclient.h\"\n\nint main(int argc, char **argv)\n{\n    QCoreApplication app(argc, argv);\n    LocalClient client;\n    client.run();\n    return app.exec();\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/localclient/runclientmac",
    "content": "#!/bin/bash\nDYLD_FRAMEWORK_PATH=../../../qjson/lib:../../../lib ./client"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/localserver/localserver.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QCoreApplication>\n#include <QLocalServer>\n#include <QFile>\n#include <QDir>\n\n#include \"qjsonrpclocalserver.h\"\n#include \"testservice.h\"\n\nint main(int argc, char **argv)\n{\n    QCoreApplication app(argc, argv);\n    QString serviceName = QDir::temp().absoluteFilePath(\"testservice\");\n    if (QFile::exists(serviceName)) {\n        if (!QFile::remove(serviceName)) {\n            qDebug() << \"couldn't delete temporary service\";\n            return -1;\n        }\n    }\n\n    QJsonRpcLocalServer rpcServer;\n    rpcServer.addService(new TestService);\n    if (!rpcServer.listen(serviceName)) {\n        qDebug() << \"could not start server: \" << rpcServer.errorString();\n        return -1;\n    }\n\n    return app.exec();\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/localserver/localserver.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\nCONFIG -= testcase\n\nTEMPLATE = app\nTARGET = localserver\nHEADERS = \\\n    testservice.h\nSOURCES = \\\n    testservice.cpp \\\n    localserver.cpp\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/localserver/runservermac",
    "content": "#!/bin/bash\nDYLD_FRAMEWORK_PATH=../../../qjson/lib:../../../lib ./server"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/localserver/testservice.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QDebug>\n#include \"testservice.h\"\n\nTestService::TestService(QObject *parent)\n    : QJsonRpcService(parent)\n{\n}\n\nvoid TestService::testMethod()\n{\n    qDebug() << Q_FUNC_INFO << \"called\" << endl;\n}\n\nvoid TestService::testMethodWithParams(const QString &first, bool second, double third)\n{\n    qDebug() << Q_FUNC_INFO << \"called with parameters: \" << endl\n             << \" first: \" << first << endl\n             << \"second: \" << second << endl\n             << \" third: \" << third << endl;\n}\n\nvoid TestService::testMethodWithVariantParams(const QString &first, bool second, double third, const QVariant &fourth)\n{\n    qDebug() << Q_FUNC_INFO << \"called with variant parameters: \" << endl\n             << \" first: \" << first << endl\n             << \"second: \" << second << endl\n             << \" third: \" << third << endl\n             << \"fourth: \" << fourth << endl;\n}\n\nQString TestService::testMethodWithParamsAndReturnValue(const QString &name)\n{\n    qDebug() << Q_FUNC_INFO << \"called\" << endl;\n    return QString(\"Hello %1\").arg(name);\n}\n\nvoid TestService::testMethodWithDefaultParameter(const QString &first, const QString &second)\n{\n    qDebug() << Q_FUNC_INFO << endl\n             << \"first: \" << first << endl\n             << (second.isEmpty() ? \"not defined, default parameter\" : second) << endl;\n}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/localserver/testservice.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef TESTSERVICE_H\n#define TESTSERVICE_H\n\n#include \"qjsonrpcservice.h\"\n\nclass TestService : public QJsonRpcService\n{\n    Q_OBJECT\n    Q_CLASSINFO(\"serviceName\", \"agent\")\npublic:\n    TestService(QObject *parent = 0);\n\npublic Q_SLOTS:\n    void testMethod();\n    void testMethodWithParams(const QString &first, bool second, double third);\n    void testMethodWithVariantParams(const QString &first, bool second, double third, const QVariant &fourth);\n    QString testMethodWithParamsAndReturnValue(const QString &name);\n    void testMethodWithDefaultParameter(const QString &first, const QString &second = QString());\n\n};\n\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/manual.pro",
    "content": "TEMPLATE = subdirs\nSUBDIRS += localserver \\\n           localclient \\\n           tcpserver \\\n           tcpclient \\\n           qjsonrpc \\\n           httpclient \\\n           httpserver \\\n           benchmark\n\ngreaterThan(QT_MAJOR_VERSION, 4) {\n    qtHaveModule(script): SUBDIRS += console\n} else {\n    SUBDIRS += console\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/python/jsonrpc.py",
    "content": "#!/usr/bin/env python\n# -*- coding: ascii -*-\n\"\"\"\nJSON-RPC (remote procedure call).\n\nIt consists of 3 (independent) parts:\n    - proxy/dispatcher\n    - data structure / serializer\n    - transport\n\nIt's intended for JSON-RPC, but since the above 3 parts are independent,\nit could be used for other RPCs as well.\n\nCurrently, JSON-RPC 2.0(pre) and JSON-RPC 1.0 are implemented\n\n:Version:   2008-08-31-beta\n:Status:    experimental\n\n:Example:\n    simple Client with JsonRPC2.0 and TCP/IP::\n\n        >>> proxy = ServerProxy( JsonRpc20(), TransportTcpIp(addr=(\"127.0.0.1\",31415)) )\n        >>> proxy.echo( \"hello world\" )\n        u'hello world'\n        >>> proxy.echo( \"bye.\" )\n        u'bye.'\n\n    simple Server with JsonRPC2.0 and TCP/IP with logging to STDOUT::\n\n        >>> server = Server( JsonRpc20(), TransportTcpIp(addr=(\"127.0.0.1\",31415), logfunc=log_stdout) )\n        >>> def echo( s ):\n        ...   return s\n        >>> server.register_function( echo )\n        >>> server.serve( 2 )   # serve 2 requests          # doctest: +ELLIPSIS\n        listen ('127.0.0.1', 31415)\n        ('127.0.0.1', ...) connected\n        ('127.0.0.1', ...) <-- {\"jsonrpc\": \"2.0\", \"method\": \"echo\", \"params\": [\"hello world\"], \"id\": 0}\n        ('127.0.0.1', ...) --> {\"jsonrpc\": \"2.0\", \"result\": \"hello world\", \"id\": 0}\n        ('127.0.0.1', ...) close\n        ('127.0.0.1', ...) connected\n        ('127.0.0.1', ...) <-- {\"jsonrpc\": \"2.0\", \"method\": \"echo\", \"params\": [\"bye.\"], \"id\": 0}\n        ('127.0.0.1', ...) --> {\"jsonrpc\": \"2.0\", \"result\": \"bye.\", \"id\": 0}\n        ('127.0.0.1', ...) close\n        close ('127.0.0.1', 31415)\n\n    Client with JsonRPC2.0 and an abstract Unix Domain Socket::\n    \n        >>> proxy = ServerProxy( JsonRpc20(), TransportUnixSocket(addr=\"\\\\x00.rpcsocket\") )\n        >>> proxy.hi( message=\"hello\" )         #named parameters\n        u'hi there'\n        >>> proxy.test()                        #fault\n        Traceback (most recent call last):\n          ...\n        jsonrpc.RPCMethodNotFound: <RPCFault -32601: u'Method not found.' (None)>\n        >>> proxy.debug.echo( \"hello world\" )   #hierarchical procedures\n        u'hello world'\n\n    Server with JsonRPC2.0 and abstract Unix Domain Socket with a logfile::\n        \n        >>> server = Server( JsonRpc20(), TransportUnixSocket(addr=\"\\\\x00.rpcsocket\", logfunc=log_file(\"mylog.txt\")) )\n        >>> def echo( s ):\n        ...   return s\n        >>> def hi( message ):\n        ...   return \"hi there\"\n        >>> server.register_function( hi )\n        >>> server.register_function( echo, name=\"debug.echo\" )\n        >>> server.serve( 3 )   # serve 3 requests\n\n        \"mylog.txt\" then contains:\n        listen '\\\\x00.rpcsocket'\n        '' connected\n        '' --> '{\"jsonrpc\": \"2.0\", \"method\": \"hi\", \"params\": {\"message\": \"hello\"}, \"id\": 0}'\n        '' <-- '{\"jsonrpc\": \"2.0\", \"result\": \"hi there\", \"id\": 0}'\n        '' close\n        '' connected\n        '' --> '{\"jsonrpc\": \"2.0\", \"method\": \"test\", \"id\": 0}'\n        '' <-- '{\"jsonrpc\": \"2.0\", \"error\": {\"code\":-32601, \"message\": \"Method not found.\"}, \"id\": 0}'\n        '' close\n        '' connected\n        '' --> '{\"jsonrpc\": \"2.0\", \"method\": \"debug.echo\", \"params\": [\"hello world\"], \"id\": 0}'\n        '' <-- '{\"jsonrpc\": \"2.0\", \"result\": \"hello world\", \"id\": 0}'\n        '' close\n        close '\\\\x00.rpcsocket'\n\n:Note:      all exceptions derived from RPCFault are propagated to the client.\n            other exceptions are logged and result in a sent-back \"empty\" INTERNAL_ERROR.\n:Uses:      simplejson, socket, sys,time,codecs\n:SeeAlso:   JSON-RPC 2.0 proposal, 1.0 specification\n:Warning:\n    .. Warning::\n        This is **experimental** code!\n:Bug:\n\n:Author:    Roland Koebler (rk(at)simple-is-better.org)\n:Copyright: 2007-2008 by Roland Koebler (rk(at)simple-is-better.org)\n:License:   see __license__\n:Changelog:\n        - 2008-08-31:     1st release\n\nTODO:\n        - server: multithreading rpc-server\n        - client: multicall (send several requests)\n        - transport: SSL sockets, maybe HTTP, HTTPS\n        - types: support for date/time (ISO 8601)\n        - errors: maybe customizable error-codes/exceptions\n        - mixed 1.0/2.0 server ?\n        - system description etc. ?\n        - maybe test other json-serializers, like cjson?\n\"\"\"\n\n__version__ = \"2008-08-31-beta\"\n__author__   = \"Roland Koebler <rk(at)simple-is-better.org>\"\n__license__  = \"\"\"Copyright (c) 2007-2008 by Roland Koebler (rk(at)simple-is-better.org)\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\"\"\"\n\n#=========================================\n#import\n\nimport sys\n\n#=========================================\n# errors\n\n#----------------------\n# error-codes + exceptions\n\n#JSON-RPC 2.0 error-codes\nPARSE_ERROR           = -32700\nINVALID_REQUEST       = -32600\nMETHOD_NOT_FOUND      = -32601\nINVALID_METHOD_PARAMS = -32602  #invalid number/type of parameters\nINTERNAL_ERROR        = -32603  #\"all other errors\"\n\n#additional error-codes\nPROCEDURE_EXCEPTION    = -32000\nAUTHENTIFICATION_ERROR = -32001\nPERMISSION_DENIED      = -32002\nINVALID_PARAM_VALUES   = -32003\n\n#human-readable messages\nERROR_MESSAGE = {\n    PARSE_ERROR           : \"Parse error.\",\n    INVALID_REQUEST       : \"Invalid Request.\",\n    METHOD_NOT_FOUND      : \"Method not found.\",\n    INVALID_METHOD_PARAMS : \"Invalid parameters.\",\n    INTERNAL_ERROR        : \"Internal error.\",\n\n    PROCEDURE_EXCEPTION   : \"Procedure exception.\",\n    AUTHENTIFICATION_ERROR : \"Authentification error.\",\n    PERMISSION_DENIED   : \"Permission denied.\",\n    INVALID_PARAM_VALUES: \"Invalid parameter values.\"\n    }\n \n#----------------------\n# exceptions\n\nclass RPCError(Exception):\n    \"\"\"Base class for rpc-errors.\"\"\"\n\n\nclass RPCTransportError(RPCError):\n    \"\"\"Transport error.\"\"\"\nclass RPCTimeoutError(RPCTransportError):\n    \"\"\"Transport/reply timeout.\"\"\"\n\nclass RPCFault(RPCError):\n    \"\"\"RPC error/fault package received.\n    \n    This exception can also be used as a class, to generate a\n    RPC-error/fault message.\n\n    :Variables:\n        - error_code:   the RPC error-code\n        - error_string: description of the error\n        - error_data:   optional additional information\n                        (must be json-serializable)\n    :TODO: improve __str__\n    \"\"\"\n    def __init__(self, error_code, error_message, error_data=None):\n        RPCError.__init__(self)\n        self.error_code   = error_code\n        self.error_message = error_message\n        self.error_data   = error_data\n    def __str__(self):\n        return repr(self)\n    def __repr__(self):\n        return( \"<RPCFault %s: %s (%s)>\" % (self.error_code, repr(self.error_message), repr(self.error_data)) )\n\nclass RPCParseError(RPCFault):\n    \"\"\"Broken rpc-package. (PARSE_ERROR)\"\"\"\n    def __init__(self, error_data=None):\n        RPCFault.__init__(self, PARSE_ERROR, ERROR_MESSAGE[PARSE_ERROR], error_data)\n\nclass RPCInvalidRPC(RPCFault):\n    \"\"\"Invalid rpc-package. (INVALID_REQUEST)\"\"\"\n    def __init__(self, error_data=None):\n        RPCFault.__init__(self, INVALID_REQUEST, ERROR_MESSAGE[INVALID_REQUEST], error_data)\n\nclass RPCMethodNotFound(RPCFault):\n    \"\"\"Method not found. (METHOD_NOT_FOUND)\"\"\"\n    def __init__(self, error_data=None):\n        RPCFault.__init__(self, METHOD_NOT_FOUND, ERROR_MESSAGE[METHOD_NOT_FOUND], error_data)\n\nclass RPCInvalidMethodParams(RPCFault):\n    \"\"\"Invalid method-parameters. (INVALID_METHOD_PARAMS)\"\"\"\n    def __init__(self, error_data=None):\n        RPCFault.__init__(self, INVALID_METHOD_PARAMS, ERROR_MESSAGE[INVALID_METHOD_PARAMS], error_data)\n\nclass RPCInternalError(RPCFault):\n    \"\"\"Internal error. (INTERNAL_ERROR)\"\"\"\n    def __init__(self, error_data=None):\n        RPCFault.__init__(self, INTERNAL_ERROR, ERROR_MESSAGE[INTERNAL_ERROR], error_data)\n\n\nclass RPCProcedureException(RPCFault):\n    \"\"\"Procedure exception. (PROCEDURE_EXCEPTION)\"\"\"\n    def __init__(self, error_data=None):\n        RPCFault.__init__(self, PROCEDURE_EXCEPTION, ERROR_MESSAGE[PROCEDURE_EXCEPTION], error_data)\nclass RPCAuthentificationError(RPCFault):\n    \"\"\"AUTHENTIFICATION_ERROR\"\"\"\n    def __init__(self, error_data=None):\n        RPCFault.__init__(self, AUTHENTIFICATION_ERROR, ERROR_MESSAGE[AUTHENTIFICATION_ERROR], error_data)\nclass RPCPermissionDenied(RPCFault):\n    \"\"\"PERMISSION_DENIED\"\"\"\n    def __init__(self, error_data=None):\n        RPCFault.__init__(self, PERMISSION_DENIED, ERROR_MESSAGE[PERMISSION_DENIED], error_data)\nclass RPCInvalidParamValues(RPCFault):\n    \"\"\"INVALID_PARAM_VALUES\"\"\"\n    def __init__(self, error_data=None):\n        RPCFault.__init__(self, INVALID_PARAM_VALUES, ERROR_MESSAGE[INVALID_PARAM_VALUES], error_data)\n\n\n#=========================================\n# data structure / serializer\n\ntry:\n    import simplejson\nexcept ImportError, err:\n    print \"FATAL: json-module 'simplejson' is missing (%s)\" % (err)\n    sys.exit(1)\n\n#----------------------\n#\ndef dictkeyclean(d):\n    \"\"\"Convert all keys of the dict 'd' to (ascii-)strings.\n\n    :Raises: UnicodeEncodeError\n    \"\"\"\n    new_d = {}\n    for (k, v) in d.iteritems():\n        new_d[str(k)] = v\n    return new_d\n\n#----------------------\n# JSON-RPC 1.0\n\nclass JsonRpc10:\n    \"\"\"JSON-RPC V1.0 data-structure / serializer\n\n    This implementation is quite liberal in what it accepts: It treats\n    missing \"params\" and \"id\" in Requests and missing \"result\"/\"error\" in\n    Responses as empty/null.\n\n    :SeeAlso:   JSON-RPC 1.0 specification\n    :TODO:      catch simplejson.dumps not-serializable-exceptions\n    \"\"\"\n    def __init__(self, dumps=simplejson.dumps, loads=simplejson.loads):\n        \"\"\"init: set serializer to use\n\n        :Parameters:\n            - dumps: json-encoder-function\n            - loads: json-decoder-function\n        :Note: The dumps_* functions of this class already directly create\n               the invariant parts of the resulting json-object themselves,\n               without using the given json-encoder-function.\n        \"\"\"\n        self.dumps = dumps\n        self.loads = loads\n\n    def dumps_request( self, method, params=(), id=0 ):\n        \"\"\"serialize JSON-RPC-Request\n\n        :Parameters:\n            - method: the method-name (str/unicode)\n            - params: the parameters (list/tuple)\n            - id:     if id=None, this results in a Notification\n        :Returns:   | {\"method\": \"...\", \"params\": ..., \"id\": ...}\n                    | \"method\", \"params\" and \"id\" are always in this order.\n        :Raises:    TypeError if method/params is of wrong type or \n                    not JSON-serializable\n        \"\"\"\n        if not isinstance(method, (str, unicode)):\n            raise TypeError('\"method\" must be a string (or unicode string).')\n        if not isinstance(params, (tuple, list)):\n            raise TypeError(\"params must be a tuple/list.\")\n\n        return '{\"method\": %s, \"params\": %s, \"id\": %s}' % \\\n                (self.dumps(method), self.dumps(params), self.dumps(id))\n\n    def dumps_notification( self, method, params=() ):\n        \"\"\"serialize a JSON-RPC-Notification\n\n        :Parameters: see dumps_request\n        :Returns:   | {\"method\": \"...\", \"params\": ..., \"id\": null}\n                    | \"method\", \"params\" and \"id\" are always in this order.\n        :Raises:    see dumps_request\n        \"\"\"\n        if not isinstance(method, (str, unicode)):\n            raise TypeError('\"method\" must be a string (or unicode string).')\n        if not isinstance(params, (tuple, list)):\n            raise TypeError(\"params must be a tuple/list.\")\n\n        return '{\"method\": %s, \"params\": %s, \"id\": null}' % \\\n                (self.dumps(method), self.dumps(params))\n\n    def dumps_response( self, result, id=None ):\n        \"\"\"serialize a JSON-RPC-Response (without error)\n\n        :Returns:   | {\"result\": ..., \"error\": null, \"id\": ...}\n                    | \"result\", \"error\" and \"id\" are always in this order.\n        :Raises:    TypeError if not JSON-serializable\n        \"\"\"\n        return '{\"result\": %s, \"error\": null, \"id\": %s}' % \\\n                (self.dumps(result), self.dumps(id))\n\n    def dumps_error( self, error, id=None ):\n        \"\"\"serialize a JSON-RPC-Response-error\n\n        Since JSON-RPC 1.0 does not define an error-object, this uses the\n        JSON-RPC 2.0 error-object.\n      \n        :Parameters:\n            - error: a RPCFault instance\n        :Returns:   | {\"result\": null, \"error\": {\"code\": error_code, \"message\": error_message, \"data\": error_data}, \"id\": ...}\n                    | \"result\", \"error\" and \"id\" are always in this order, data is omitted if None.\n        :Raises:    ValueError if error is not a RPCFault instance,\n                    TypeError if not JSON-serializable\n        \"\"\"\n        if not isinstance(error, RPCFault):\n            raise ValueError(\"\"\"error must be a RPCFault-instance.\"\"\")\n        if error.error_data is None:\n            return '{\"result\": null, \"error\": {\"code\":%s, \"message\": %s}, \"id\": %s}' % \\\n                    (self.dumps(error.error_code), self.dumps(error.error_message), self.dumps(id))\n        else:\n            return '{\"result\": null, \"error\": {\"code\":%s, \"message\": %s, \"data\": %s}, \"id\": %s}' % \\\n                    (self.dumps(error.error_code), self.dumps(error.error_message), self.dumps(error.error_data), self.dumps(id))\n\n    def loads_request( self, string ):\n        \"\"\"de-serialize a JSON-RPC Request/Notification\n\n        :Returns:   | [method_name, params, id] or [method_name, params]\n                    | params is a tuple/list\n                    | if id is missing, this is a Notification\n        :Raises:    RPCParseError, RPCInvalidRPC, RPCInvalidMethodParams\n        \"\"\"\n        try:\n            data = self.loads(string)\n        except ValueError, err:\n            raise RPCParseError(\"No valid JSON. (%s)\" % str(err))\n        if not isinstance(data, dict):  raise RPCInvalidRPC(\"No valid RPC-package.\")\n        if \"method\" not in data:        raise RPCInvalidRPC(\"\"\"Invalid Request, \"method\" is missing.\"\"\")\n        if not isinstance(data[\"method\"], (str, unicode)):\n            raise RPCInvalidRPC(\"\"\"Invalid Request, \"method\" must be a string.\"\"\")\n        if \"id\"     not in data:        data[\"id\"]     = None   #be liberal\n        if \"params\" not in data:        data[\"params\"] = ()     #be liberal\n        if not isinstance(data[\"params\"], (list, tuple)):\n            raise RPCInvalidRPC(\"\"\"Invalid Request, \"params\" must be an array.\"\"\")\n        if len(data) != 3:          raise RPCInvalidRPC(\"\"\"Invalid Request, additional fields found.\"\"\")\n\n        # notification / request\n        if data[\"id\"] is None:\n            return data[\"method\"], data[\"params\"]               #notification\n        else:\n            return data[\"method\"], data[\"params\"], data[\"id\"]   #request\n\n    def loads_response( self, string ):\n        \"\"\"de-serialize a JSON-RPC Response/error\n\n        :Returns: | [result, id] for Responses\n        :Raises:  | RPCFault+derivates for error-packages/faults, RPCParseError, RPCInvalidRPC\n                  | Note that for error-packages which do not match the\n                    V2.0-definition, RPCFault(-1, \"Error\", RECEIVED_ERROR_OBJ)\n                    is raised.\n        \"\"\"\n        try:\n            data = self.loads(string)\n        except ValueError, err:\n            raise RPCParseError(\"No valid JSON. (%s)\" % str(err))\n        if not isinstance(data, dict):  raise RPCInvalidRPC(\"No valid RPC-package.\")\n        if \"id\" not in data:            raise RPCInvalidRPC(\"\"\"Invalid Response, \"id\" missing.\"\"\")\n        if \"result\" not in data:        data[\"result\"] = None    #be liberal\n        if \"error\"  not in data:        data[\"error\"]  = None    #be liberal\n        if len(data) != 3:              raise RPCInvalidRPC(\"\"\"Invalid Response, additional or missing fields.\"\"\")\n\n        #error\n        if data[\"error\"] is not None:\n            if data[\"result\"] is not None:\n                raise RPCInvalidRPC(\"\"\"Invalid Response, one of \"result\" or \"error\" must be null.\"\"\")\n            #v2.0 error-format\n            if( isinstance(data[\"error\"], dict)  and  \"code\" in data[\"error\"]  and  \"message\" in data[\"error\"]  and\n                (len(data[\"error\"])==2 or (\"data\" in data[\"error\"] and len(data[\"error\"])==3)) ):\n                if \"data\" not in data[\"error\"]:\n                    error_data = None\n                else:\n                    error_data = data[\"error\"][\"data\"]\n\n                if   data[\"error\"][\"code\"] == PARSE_ERROR:\n                    raise RPCParseError(error_data)\n                elif data[\"error\"][\"code\"] == INVALID_REQUEST:\n                    raise RPCInvalidRPC(error_data)\n                elif data[\"error\"][\"code\"] == METHOD_NOT_FOUND:\n                    raise RPCMethodNotFound(error_data)\n                elif data[\"error\"][\"code\"] == INVALID_METHOD_PARAMS:\n                    raise RPCInvalidMethodParams(error_data)\n                elif data[\"error\"][\"code\"] == INTERNAL_ERROR:\n                    raise RPCInternalError(error_data)\n                elif data[\"error\"][\"code\"] == PROCEDURE_EXCEPTION:\n                    raise RPCProcedureException(error_data)\n                elif data[\"error\"][\"code\"] == AUTHENTIFICATION_ERROR:\n                    raise RPCAuthentificationError(error_data)\n                elif data[\"error\"][\"code\"] == PERMISSION_DENIED:\n                    raise RPCPermissionDenied(error_data)\n                elif data[\"error\"][\"code\"] == INVALID_PARAM_VALUES:\n                    raise RPCInvalidParamValues(error_data)\n                else:\n                    raise RPCFault(data[\"error\"][\"code\"], data[\"error\"][\"message\"], error_data)\n            #other error-format\n            else:\n                raise RPCFault(-1, \"Error\", data[\"error\"])\n        #result\n        else:\n            return data[\"result\"], data[\"id\"]\n\n#----------------------\n# JSON-RPC 2.0\n\nclass JsonRpc20:\n    \"\"\"JSON-RPC V2.0 data-structure / serializer\n\n    :SeeAlso:   JSON-RPC 2.0 specification\n    :TODO:      catch simplejson.dumps not-serializable-exceptions\n    \"\"\"\n    def __init__(self, dumps=simplejson.dumps, loads=simplejson.loads):\n        \"\"\"init: set serializer to use\n\n        :Parameters:\n            - dumps: json-encoder-function\n            - loads: json-decoder-function\n        :Note: The dumps_* functions of this class already directly create\n               the invariant parts of the resulting json-object themselves,\n               without using the given json-encoder-function.\n        \"\"\"\n        self.dumps = dumps\n        self.loads = loads\n\n    def dumps_request( self, method, params=(), id=0 ):\n        \"\"\"serialize JSON-RPC-Request\n\n        :Parameters:\n            - method: the method-name (str/unicode)\n            - params: the parameters (list/tuple/dict)\n            - id:     the id (should not be None)\n        :Returns:   | {\"jsonrpc\": \"2.0\", \"method\": \"...\", \"params\": ..., \"id\": ...}\n                    | \"jsonrpc\", \"method\", \"params\" and \"id\" are always in this order.\n                    | \"params\" is omitted if empty\n        :Raises:    TypeError if method/params is of wrong type or \n                    not JSON-serializable\n        \"\"\"\n        if not isinstance(method, (str, unicode)):\n            raise TypeError('\"method\" must be a string (or unicode string).')\n        if not isinstance(params, (tuple, list, dict)):\n            raise TypeError(\"params must be a tuple/list/dict or None.\")\n\n        if params:\n            return '{\"jsonrpc\": \"2.0\", \"method\": %s, \"params\": %s, \"id\": %s}' % \\\n                    (self.dumps(method), self.dumps(params), self.dumps(id))\n        else:\n            return '{\"jsonrpc\": \"2.0\", \"method\": %s, \"id\": %s}' % \\\n                    (self.dumps(method), self.dumps(id))\n\n    def dumps_notification( self, method, params=() ):\n        \"\"\"serialize a JSON-RPC-Notification\n\n        :Parameters: see dumps_request\n        :Returns:   | {\"jsonrpc\": \"2.0\", \"method\": \"...\", \"params\": ...}\n                    | \"jsonrpc\", \"method\" and \"params\" are always in this order.\n        :Raises:    see dumps_request\n        \"\"\"\n        if not isinstance(method, (str, unicode)):\n            raise TypeError('\"method\" must be a string (or unicode string).')\n        if not isinstance(params, (tuple, list, dict)):\n            raise TypeError(\"params must be a tuple/list/dict or None.\")\n\n        if params:\n            return '{\"jsonrpc\": \"2.0\", \"method\": %s, \"params\": %s}' % \\\n                    (self.dumps(method), self.dumps(params))\n        else:\n            return '{\"jsonrpc\": \"2.0\", \"method\": %s}' % \\\n                    (self.dumps(method))\n\n    def dumps_response( self, result, id=None ):\n        \"\"\"serialize a JSON-RPC-Response (without error)\n\n        :Returns:   | {\"jsonrpc\": \"2.0\", \"result\": ..., \"id\": ...}\n                    | \"jsonrpc\", \"result\", and \"id\" are always in this order.\n        :Raises:    TypeError if not JSON-serializable\n        \"\"\"\n        return '{\"jsonrpc\": \"2.0\", \"result\": %s, \"id\": %s}' % \\\n                (self.dumps(result), self.dumps(id))\n\n    def dumps_error( self, error, id=None ):\n        \"\"\"serialize a JSON-RPC-Response-error\n      \n        :Parameters:\n            - error: a RPCFault instance\n        :Returns:   | {\"jsonrpc\": \"2.0\", \"error\": {\"code\": error_code, \"message\": error_message, \"data\": error_data}, \"id\": ...}\n                    | \"jsonrpc\", \"result\", \"error\" and \"id\" are always in this order, data is omitted if None.\n        :Raises:    ValueError if error is not a RPCFault instance,\n                    TypeError if not JSON-serializable\n        \"\"\"\n        if not isinstance(error, RPCFault):\n            raise ValueError(\"\"\"error must be a RPCFault-instance.\"\"\")\n        if error.error_data is None:\n            return '{\"jsonrpc\": \"2.0\", \"error\": {\"code\":%s, \"message\": %s}, \"id\": %s}' % \\\n                    (self.dumps(error.error_code), self.dumps(error.error_message), self.dumps(id))\n        else:\n            return '{\"jsonrpc\": \"2.0\", \"error\": {\"code\":%s, \"message\": %s, \"data\": %s}, \"id\": %s}' % \\\n                    (self.dumps(error.error_code), self.dumps(error.error_message), self.dumps(error.error_data), self.dumps(id))\n\n    def loads_request( self, string ):\n        \"\"\"de-serialize a JSON-RPC Request/Notification\n\n        :Returns:   | [method_name, params, id] or [method_name, params]\n                    | params is a tuple/list or dict (with only str-keys)\n                    | if id is missing, this is a Notification\n        :Raises:    RPCParseError, RPCInvalidRPC, RPCInvalidMethodParams\n        \"\"\"\n        try:\n            data = self.loads(string)\n        except ValueError, err:\n            raise RPCParseError(\"No valid JSON. (%s)\" % str(err))\n        if not isinstance(data, dict):  raise RPCInvalidRPC(\"No valid RPC-package.\")\n        if \"jsonrpc\" not in data:       raise RPCInvalidRPC(\"\"\"Invalid Response, \"jsonrpc\" missing.\"\"\")\n        if not isinstance(data[\"jsonrpc\"], (str, unicode)):\n            raise RPCInvalidRPC(\"\"\"Invalid Response, \"jsonrpc\" must be a string.\"\"\")\n        if data[\"jsonrpc\"] != \"2.0\":    raise RPCInvalidRPC(\"\"\"Invalid jsonrpc version.\"\"\")\n        if \"method\" not in data:        raise RPCInvalidRPC(\"\"\"Invalid Request, \"method\" is missing.\"\"\")\n        if not isinstance(data[\"method\"], (str, unicode)):\n            raise RPCInvalidRPC(\"\"\"Invalid Request, \"method\" must be a string.\"\"\")\n        if \"params\" not in data:        data[\"params\"] = ()\n        #convert params-keys from unicode to str\n        elif isinstance(data[\"params\"], dict):\n            try:\n                data[\"params\"] = dictkeyclean(data[\"params\"])\n            except UnicodeEncodeError:\n                raise RPCInvalidMethodParams(\"Parameter-names must be in ascii.\")\n        elif not isinstance(data[\"params\"], (list, tuple)):\n            raise RPCInvalidRPC(\"\"\"Invalid Request, \"params\" must be an array or object.\"\"\")\n        if not( len(data)==3 or (\"id\" in data and len(data)==4) ):\n            raise RPCInvalidRPC(\"\"\"Invalid Request, additional fields found.\"\"\")\n\n        # notification / request\n        if \"id\" not in data:\n            return data[\"method\"], data[\"params\"]               #notification\n        else:\n            return data[\"method\"], data[\"params\"], data[\"id\"]   #request\n\n    def loads_response( self, string ):\n        \"\"\"de-serialize a JSON-RPC Response/error\n\n        :Returns: | [result, id] for Responses\n        :Raises:  | RPCFault+derivates for error-packages/faults, RPCParseError, RPCInvalidRPC\n        \"\"\"\n        try:\n            data = self.loads(string)\n        except ValueError, err:\n            raise RPCParseError(\"No valid JSON. (%s)\" % str(err))\n        if not isinstance(data, dict):  raise RPCInvalidRPC(\"No valid RPC-package.\")\n        if \"jsonrpc\" not in data:       raise RPCInvalidRPC(\"\"\"Invalid Response, \"jsonrpc\" missing.\"\"\")\n        if not isinstance(data[\"jsonrpc\"], (str, unicode)):\n            raise RPCInvalidRPC(\"\"\"Invalid Response, \"jsonrpc\" must be a string.\"\"\")\n        if data[\"jsonrpc\"] != \"2.0\":    raise RPCInvalidRPC(\"\"\"Invalid jsonrpc version.\"\"\")\n        if \"id\" not in data:            raise RPCInvalidRPC(\"\"\"Invalid Response, \"id\" missing.\"\"\")\n        if \"result\" not in data:        data[\"result\"] = None\n        if \"error\"  not in data:        data[\"error\"]  = None\n        if len(data) != 4:              raise RPCInvalidRPC(\"\"\"Invalid Response, additional or missing fields.\"\"\")\n\n        #error\n        if data[\"error\"] is not None:\n            if data[\"result\"] is not None:\n                raise RPCInvalidRPC(\"\"\"Invalid Response, only \"result\" OR \"error\" allowed.\"\"\")\n            if not isinstance(data[\"error\"], dict): raise RPCInvalidRPC(\"Invalid Response, invalid error-object.\")\n            if \"code\" not in data[\"error\"]  or  \"message\" not in data[\"error\"]:\n                raise RPCInvalidRPC(\"Invalid Response, invalid error-object.\")\n            if \"data\" not in data[\"error\"]:  data[\"error\"][\"data\"] = None\n            if len(data[\"error\"]) != 3:\n                raise RPCInvalidRPC(\"Invalid Response, invalid error-object.\")\n\n            error_data = data[\"error\"][\"data\"]\n            if   data[\"error\"][\"code\"] == PARSE_ERROR:\n                raise RPCParseError(error_data)\n            elif data[\"error\"][\"code\"] == INVALID_REQUEST:\n                raise RPCInvalidRPC(error_data)\n            elif data[\"error\"][\"code\"] == METHOD_NOT_FOUND:\n                raise RPCMethodNotFound(error_data)\n            elif data[\"error\"][\"code\"] == INVALID_METHOD_PARAMS:\n                raise RPCInvalidMethodParams(error_data)\n            elif data[\"error\"][\"code\"] == INTERNAL_ERROR:\n                raise RPCInternalError(error_data)\n            elif data[\"error\"][\"code\"] == PROCEDURE_EXCEPTION:\n                raise RPCProcedureException(error_data)\n            elif data[\"error\"][\"code\"] == AUTHENTIFICATION_ERROR:\n                raise RPCAuthentificationError(error_data)\n            elif data[\"error\"][\"code\"] == PERMISSION_DENIED:\n                raise RPCPermissionDenied(error_data)\n            elif data[\"error\"][\"code\"] == INVALID_PARAM_VALUES:\n                raise RPCInvalidParamValues(error_data)\n            else:\n                raise RPCFault(data[\"error\"][\"code\"], data[\"error\"][\"message\"], error_data)\n        #result\n        else:\n            return data[\"result\"], data[\"id\"]\n\n\n#=========================================\n# transports\n\n#----------------------\n# transport-logging\n\nimport codecs\nimport time\n\ndef log_dummy( message ):\n    \"\"\"dummy-logger: do nothing\"\"\"\n    pass\ndef log_stdout( message ):\n    \"\"\"print message to STDOUT\"\"\"\n    print message\n\ndef log_file( filename ):\n    \"\"\"return a logfunc which logs to a file (in utf-8)\"\"\"\n    def logfile( message ):\n        f = codecs.open( filename, 'a', encoding='utf-8' )\n        f.write( message+\"\\n\" )\n        f.close()\n    return logfile\n\ndef log_filedate( filename ):\n    \"\"\"return a logfunc which logs date+message to a file (in utf-8)\"\"\"\n    def logfile( message ):\n        f = codecs.open( filename, 'a', encoding='utf-8' )\n        f.write( time.strftime(\"%Y-%m-%d %H:%M:%S \")+message+\"\\n\" )\n        f.close()\n    return logfile\n\n#----------------------\n\nclass Transport:\n    \"\"\"generic Transport-interface.\n    \n    This class, and especially its methods and docstrings,\n    define the Transport-Interface.\n    \"\"\"\n    def __init__(self):\n        pass\n\n    def send( self, data ):\n        \"\"\"send all data. must be implemented by derived classes.\"\"\"\n        raise NotImplementedError\n    def recv( self ):\n        \"\"\"receive data. must be implemented by derived classes.\"\"\"\n        raise NotImplementedError\n\n    def sendrecv( self, string ):\n        \"\"\"send + receive data\"\"\"\n        self.send( string )\n        return self.recv()\n    def serve( self, handler, n=None ):\n        \"\"\"serve (forever or for n communicaions).\n        \n        - receive data\n        - call result = handler(data)\n        - send back result if not None\n\n        The serving can be stopped by SIGINT.\n\n        :TODO:\n            - how to stop?\n              maybe use a .run-file, and stop server if file removed?\n            - maybe make n_current accessible? (e.g. for logging)\n        \"\"\"\n        n_current = 0\n        while 1:\n            if n is not None  and  n_current >= n:\n                break\n            data = self.recv()\n            result = handler(data)\n            if result is not None:\n                self.send( result )\n            n_current += 1\n\n\nclass TransportSTDINOUT(Transport):\n    \"\"\"receive from STDIN, send to STDOUT.\n\n    Useful e.g. for debugging.\n    \"\"\"\n    def send(self, string):\n        \"\"\"write data to STDOUT with '***SEND:' prefix \"\"\"\n        print \"***SEND:\"\n        print string\n    def recv(self):\n        \"\"\"read data from STDIN\"\"\"\n        print \"***RECV (please enter, ^D ends.):\"\n        return sys.stdin.read()\n\n\nimport socket, select\nclass TransportSocket(Transport):\n    \"\"\"Transport via socket.\n   \n    :SeeAlso:   python-module socket\n    :TODO:\n        - documentation\n        - improve this (e.g. make sure that connections are closed, socket-files are deleted etc.)\n        - exception-handling? (socket.error)\n    \"\"\"\n    def __init__( self, addr, limit=4096, sock_type=socket.AF_INET, sock_prot=socket.SOCK_STREAM, timeout=1.0, logfunc=log_dummy ):\n        \"\"\"\n        :Parameters:\n            - addr: socket-address\n            - timeout: timeout in seconds\n            - logfunc: function for logging, logfunc(message)\n        :Raises: socket.timeout after timeout\n        \"\"\"\n        self.limit  = limit\n        self.addr   = addr\n        self.s_type = sock_type\n        self.s_prot = sock_prot\n        self.s      = None\n        self.timeout = timeout\n        self.log    = logfunc\n    def connect( self ):\n        self.close()\n        self.log( \"connect to %s\" % repr(self.addr) )\n        self.s = socket.socket( self.s_type, self.s_prot )\n        self.s.settimeout( self.timeout )\n        self.s.connect( self.addr )\n    def close( self ):\n        if self.s is not None:\n            self.log( \"close %s\" % repr(self.addr) )\n            self.s.close()\n            self.s = None\n    def __repr__(self):\n        return \"<TransportSocket, %s>\" % repr(self.addr)\n    \n    def send( self, string ):\n        if self.s is None:\n            self.connect()\n        self.log( \"--> \"+repr(string) )\n        self.s.sendall( string )\n    def recv( self ):\n        if self.s is None:\n            self.connect()\n        data = self.s.recv( self.limit )\n        while( select.select((self.s,), (), (), 0.1)[0] ):  #TODO: this select is probably not necessary, because server closes this socket\n            d = self.s.recv( self.limit )\n            if len(d) == 0:\n                break\n            data += d\n        self.log( \"<-- \"+repr(data) )\n        return data\n\n    def sendrecv( self, string ):\n        \"\"\"send data + receive data + close\"\"\"\n        try:\n            self.send( string )\n            return self.recv()\n        finally:\n            self.close()\n    def serve(self, handler, n=None):\n        \"\"\"open socket, wait for incoming connections and handle them.\n        \n        :Parameters:\n            - n: serve n requests, None=forever\n        \"\"\"\n        self.close()\n        self.s = socket.socket( self.s_type, self.s_prot )\n        try:\n            self.log( \"listen %s\" % repr(self.addr) )\n            self.s.bind( self.addr )\n            self.s.listen(1)\n            n_current = 0\n            while 1:\n                if n is not None  and  n_current >= n:\n                    break\n                conn, addr = self.s.accept()\n                self.log( \"%s connected\" % repr(addr) )\n                data = conn.recv(self.limit)\n                self.log( \"%s --> %s\" % (repr(addr), repr(data)) )\n                result = handler(data)\n                if data is not None:\n                    self.log( \"%s <-- %s\" % (repr(addr), repr(result)) )\n                    conn.send( result )\n                self.log( \"%s close\" % repr(addr) )\n                conn.close()\n                n_current += 1\n        finally:\n            self.close()\n\n\nif hasattr(socket, 'AF_UNIX'):\n    \n    class TransportUnixSocket(TransportSocket):\n        \"\"\"Transport via Unix Domain Socket.\n        \"\"\"\n        def __init__(self, addr=None, limit=4096, timeout=1.0, logfunc=log_dummy):\n            \"\"\"\n            :Parameters:\n                - addr: \"socket_file\"\n            :Note: | The socket-file is not deleted.\n                   | If the socket-file begins with \\x00, abstract sockets are used,\n                     and no socket-file is created.\n            :SeeAlso:   TransportSocket\n            \"\"\"\n            TransportSocket.__init__( self, addr, limit, socket.AF_UNIX, socket.SOCK_STREAM, timeout, logfunc )\n\nclass TransportTcpIp(TransportSocket):\n    \"\"\"Transport via TCP/IP.\n    \"\"\"\n    def __init__(self, addr=None, limit=4096, timeout=1.0, logfunc=log_dummy):\n        \"\"\"\n        :Parameters:\n            - addr: (\"host\",port)\n        :SeeAlso:   TransportSocket\n        \"\"\"\n        TransportSocket.__init__( self, addr, limit, socket.AF_INET, socket.SOCK_STREAM, timeout, logfunc )\n\n\n#=========================================\n# client side: server proxy\n\nclass ServerProxy:\n    \"\"\"RPC-client: server proxy\n\n    A logical connection to a RPC server.\n\n    It works with different data/serializers and different transports.\n\n    Notifications and id-handling/multicall are not yet implemented.\n\n    :Example:\n        see module-docstring\n\n    :TODO: verbose/logging?\n    \"\"\"\n    def __init__( self, data_serializer, transport ):\n        \"\"\"\n        :Parameters:\n            - data_serializer: a data_structure+serializer-instance\n            - transport: a Transport instance\n        \"\"\"\n        #TODO: check parameters\n        self.__data_serializer = data_serializer\n        if not isinstance(transport, Transport):\n            raise ValueError('invalid \"transport\" (must be a Transport-instance)\"')\n        self.__transport = transport\n\n    def __str__(self):\n        return repr(self)\n    def __repr__(self):\n        return \"<ServerProxy for %s, with serializer %s>\" % (self.__transport, self.__data_serializer)\n\n    def __req( self, methodname, args=None, kwargs=None, id=0 ):\n        # JSON-RPC 1.0: only positional parameters\n        if len(kwargs) > 0 and isinstance(self.data_serializer, JsonRpc10):\n            raise ValueError(\"Only positional parameters allowed in JSON-RPC 1.0\")\n        # JSON-RPC 2.0: only args OR kwargs allowed!\n        if len(args) > 0 and len(kwargs) > 0:\n            raise ValueError(\"Only positional or named parameters are allowed!\")\n        if len(kwargs) == 0:\n            req_str  = self.__data_serializer.dumps_request( methodname, args, id )\n        else:\n            req_str  = self.__data_serializer.dumps_request( methodname, kwargs, id )\n\n        try:\n            resp_str = self.__transport.sendrecv( req_str )\n        except Exception,err:\n            raise RPCTransportError(err)\n        resp = self.__data_serializer.loads_response( resp_str )\n        return resp[0]\n\n    def __getattr__(self, name):\n        # magic method dispatcher\n        #  note: to call a remote object with an non-standard name, use\n        #  result getattr(my_server_proxy, \"strange-python-name\")(args)\n        return _method(self.__req, name)\n\n# request dispatcher\nclass _method:\n    \"\"\"some \"magic\" to bind an RPC method to an RPC server.\n\n    Supports \"nested\" methods (e.g. examples.getStateName).\n\n    :Raises: AttributeError for method-names/attributes beginning with '_'.\n    \"\"\"\n    def __init__(self, req, name):\n        if name[0] == \"_\":  #prevent rpc-calls for proxy._*-functions\n            raise AttributeError(\"invalid attribute '%s'\" % name)\n        self.__req  = req\n        self.__name = name\n    def __getattr__(self, name):\n        if name[0] == \"_\":  #prevent rpc-calls for proxy._*-functions\n            raise AttributeError(\"invalid attribute '%s'\" % name)\n        return _method(self.__req, \"%s.%s\" % (self.__name, name))\n    def __call__(self, *args, **kwargs):\n        return self.__req(self.__name, args, kwargs)\n\n#=========================================\n# server side: Server\n\nclass Server:\n    \"\"\"RPC-server.\n\n    It works with different data/serializers and \n    with different transports.\n\n    :Example:\n        see module-docstring\n\n    :TODO:\n        - mixed JSON-RPC 1.0/2.0 server?\n        - logging/loglevels?\n    \"\"\"\n    def __init__( self, data_serializer, transport, logfile=None ):\n        \"\"\"\n        :Parameters:\n            - data_serializer: a data_structure+serializer-instance\n            - transport: a Transport instance\n            - logfile: file to log (\"unexpected\") errors to\n        \"\"\"\n        #TODO: check parameters\n        self.__data_serializer = data_serializer\n        if not isinstance(transport, Transport):\n            raise ValueError('invalid \"transport\" (must be a Transport-instance)\"')\n        self.__transport = transport\n        self.logfile = logfile\n        if self.logfile is not None:    #create logfile (or raise exception)\n            f = codecs.open( self.logfile, 'a', encoding='utf-8' )\n            f.close()\n\n        self.funcs = {}\n\n    def __repr__(self):\n        return \"<Server for %s, with serializer %s>\" % (self.__transport, self.__data_serializer)\n\n    def log(self, message):\n        \"\"\"write a message to the logfile (in utf-8)\"\"\"\n        if self.logfile is not None:\n            f = codecs.open( self.logfile, 'a', encoding='utf-8' )\n            f.write( time.strftime(\"%Y-%m-%d %H:%M:%S \")+message+\"\\n\" )\n            f.close()\n\n    def register_instance(self, myinst, name=None):\n        \"\"\"Add all functions of a class-instance to the RPC-services.\n        \n        All entries of the instance which do not begin with '_' are added.\n\n        :Parameters:\n            - myinst: class-instance containing the functions\n            - name:   | hierarchical prefix.\n                      | If omitted, the functions are added directly.\n                      | If given, the functions are added as \"name.function\".\n        :TODO:\n            - only add functions and omit attributes?\n            - improve hierarchy?\n        \"\"\"\n        for e in dir(myinst):\n            if e[0][0] != \"_\":\n                if name is None:\n                    self.register_function( getattr(myinst, e) )\n                else:\n                    self.register_function( getattr(myinst, e), name=\"%s.%s\" % (name, e) )\n    def register_function(self, function, name=None):\n        \"\"\"Add a function to the RPC-services.\n        \n        :Parameters:\n            - function: function to add\n            - name:     RPC-name for the function. If omitted/None, the original\n                        name of the function is used.\n        \"\"\"\n        if name is None:\n            self.funcs[function.__name__] = function\n        else:\n            self.funcs[name] = function\n    \n    def handle(self, rpcstr):\n        \"\"\"Handle a RPC-Request.\n\n        :Parameters:\n            - rpcstr: the received rpc-string\n        :Returns: the data to send back or None if nothing should be sent back\n        :Raises:  RPCFault (and maybe others)\n        \"\"\"\n        #TODO: id\n        notification = False\n        try:\n            req = self.__data_serializer.loads_request( rpcstr )\n            if len(req) == 2:       #notification\n                method, params = req\n                notification = True\n            else:                   #request\n                method, params, id = req\n        except RPCFault, err:\n            return self.__data_serializer.dumps_error( err, id=None )\n        except Exception, err:\n            self.log( \"%d (%s): %s\" % (INTERNAL_ERROR, ERROR_MESSAGE[INTERNAL_ERROR], str(err)) )\n            return self.__data_serializer.dumps_error( RPCFault(INTERNAL_ERROR, ERROR_MESSAGE[INTERNAL_ERROR]), id=None )\n\n        if method not in self.funcs:\n            if notification:\n                return None\n            return self.__data_serializer.dumps_error( RPCFault(METHOD_NOT_FOUND, ERROR_MESSAGE[METHOD_NOT_FOUND]), id )\n\n        try:\n            if isinstance(params, dict):\n                result = self.funcs[method]( **params )\n            else:\n                result = self.funcs[method]( *params )\n        except RPCFault, err:\n            if notification:\n                return None\n            return self.__data_serializer.dumps_error( err, id=None )\n        except Exception, err:\n            if notification:\n                return None\n            self.log( \"%d (%s): %s\" % (INTERNAL_ERROR, ERROR_MESSAGE[INTERNAL_ERROR], str(err)) )\n            return self.__data_serializer.dumps_error( RPCFault(INTERNAL_ERROR, ERROR_MESSAGE[INTERNAL_ERROR]), id )\n\n        if notification:\n            return None\n        try:\n            return self.__data_serializer.dumps_response( result, id )\n        except Exception, err:\n            self.log( \"%d (%s): %s\" % (INTERNAL_ERROR, ERROR_MESSAGE[INTERNAL_ERROR], str(err)) )\n            return self.__data_serializer.dumps_error( RPCFault(INTERNAL_ERROR, ERROR_MESSAGE[INTERNAL_ERROR]), id )\n\n    def serve(self, n=None):\n        \"\"\"serve (forever or for n communicaions).\n        \n        :See: Transport\n        \"\"\"\n        self.__transport.serve( self.handle, n )\n\n#=========================================\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/python/testqjsonrpc.py",
    "content": "#!/usr/bin/python\n\nimport jsonrpc\nimport socket\n\nrpc = jsonrpc.ServerProxy(jsonrpc.JsonRpc20(), jsonrpc.TransportSocket(addr=\"/tmp/testservice\", sock_type=socket.AF_UNIX))\nprint rpc.agent.testMethod()\nprint rpc.agent.testMethodWithParams(\"one\", False, 10)\nprint rpc.agent.testMethodWithParamsAndReturnValue(\"matt\")\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/qjsonrpc/qjsonrpc.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QCoreApplication>\n#include <QStringList>\n#include <QLocalSocket>\n#include <QTcpSocket>\n#include <QScopedPointer>\n#include <QUrl>\n#include <QHostAddress>\n\n#include \"qjsonrpcsocket.h\"\n#include \"qjsonrpcservice.h\"\n\nint main(int argc, char **argv)\n{\n    QCoreApplication app(argc, argv);\n    QStringList args = app.arguments();\n    QString appName = args.takeFirst();\n    bool notification = args.contains(\"-n\");\n    if (notification)\n        args.removeAll(\"-n\");\n\n    if (args.size() < 2) {\n        qDebug(\"usage: %s [-n] <service> <method> <arguments>\", appName.toLocal8Bit().data());\n        return -1;\n    }\n\n    // try to process socket\n    QIODevice *device = 0;\n    QScopedPointer<QIODevice> devicePtr(device);\n    QString service = args.takeFirst();\n    QUrl serviceUrl = QUrl::fromUserInput(service);\n    QHostAddress serviceAddress(serviceUrl.host());\n    if (serviceAddress.isNull()) {\n        QLocalSocket *localSocket = new QLocalSocket;\n        device = localSocket;\n        localSocket->connectToServer(service);\n        if (!localSocket->waitForConnected(5000)) {\n            qDebug(\"could not connect to service: %s\", service.toLocal8Bit().data());\n            return -1;\n        }\n    } else {\n        QTcpSocket *tcpSocket = new QTcpSocket;\n        device = tcpSocket;\n        int servicePort = serviceUrl.port() ? serviceUrl.port() : 5555;\n        tcpSocket->connectToHost(serviceAddress, servicePort);\n        if (!tcpSocket->waitForConnected(5000)) {\n            qDebug(\"could not connect to host at %s:%d\", serviceUrl.host().toLocal8Bit().data(),\n                   servicePort);\n            return -1;\n        }\n    }\n\n    QJsonRpcSocket socket(device);\n    QString method = args.takeFirst();\n    QVariantList arguments;\n    foreach (QString arg, args)\n        arguments.append(arg);\n\n    QJsonRpcMessage request = notification ?\n        QJsonRpcMessage::createNotification(method, QJsonArray::fromVariantList(arguments)) :\n        QJsonRpcMessage::createRequest(method, QJsonArray::fromVariantList(arguments));\n\n    qDebug() << request.toJson();\n\n    QJsonRpcMessage response = socket.sendMessageBlocking(request, 5000);\n    if (response.type() == QJsonRpcMessage::Error) {\n        qDebug(\"error(%d): %s\", response.errorCode(), response.errorMessage().toLocal8Bit().data());\n        return -1;\n    }\n\n    qDebug() << response.result();\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/qjsonrpc/qjsonrpc.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\nCONFIG -= testcase\n\nTEMPLATE = app\nTARGET = qjsonrpc\nSOURCES = \\\n    qjsonrpc.cpp\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/tcpclient/main.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QCoreApplication>\n\n#include \"tcpclient.h\"\n\nint main(int argc, char **argv)\n{\n    QCoreApplication app(argc, argv);\n    TcpClient client;\n    client.run();\n    return app.exec();\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/tcpclient/runclientmac",
    "content": "#!/bin/bash\nDYLD_FRAMEWORK_PATH=../../../qjson/lib:../../../lib ./client"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/tcpclient/tcpclient.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QHostAddress>\n#include <QTcpSocket>\n\n#include \"qjsonrpcsocket.h\"\n#include \"qjsonrpcservice.h\"\n#include \"qjsonrpcservicereply.h\"\n#include \"tcpclient.h\"\n\nTcpClient::TcpClient(QObject *parent)\n    : QObject(parent),\n      m_client(0)\n{\n}\n\nvoid TcpClient::run()\n{\n    QTcpSocket *socket = new QTcpSocket(this);\n    socket->connectToHost(QHostAddress::LocalHost, 5555);\n    if (!socket->waitForConnected()) {\n        qDebug() << \"could not connect to server: \" << socket->errorString();\n        return;\n    }\n\n    // run tests\n    m_client = new QJsonRpcSocket(socket, this);\n    QJsonRpcServiceReply *reply = m_client->invokeRemoteMethod(\"agent.testMethod\");\n    connect(reply, SIGNAL(finished()), this, SLOT(processResponse()));\n\n    reply = m_client->invokeRemoteMethod(\"agent.testMethodWithParams\", \"one\", false, 10);\n    connect(reply, SIGNAL(finished()), this, SLOT(processResponse()));\n\n    reply = m_client->invokeRemoteMethod(\"agent.testMethodWithVariantParams\", \"one\", false, 10, QVariant(2.5));\n    connect(reply, SIGNAL(finished()), this, SLOT(processResponse()));\n\n    reply = m_client->invokeRemoteMethod(\"agent.testMethodWithParamsAndReturnValue\", \"matt\");\n    connect(reply, SIGNAL(finished()), this, SLOT(processResponse()));\n\n    connect(m_client, SIGNAL(messageReceived(QJsonRpcMessage)), this, SLOT(processMessage(QJsonRpcMessage)));\n    reply = m_client->invokeRemoteMethod(\"agent.testNotifyConnectedClients\", \"some data\");\n}\n\nvoid TcpClient::processResponse()\n{\n    QJsonRpcServiceReply *reply = static_cast<QJsonRpcServiceReply *>(sender());\n    if (!reply) {\n        qDebug() << \"invalid response received\";\n        return;\n    }\n\n    qDebug() << \"response received: \" << reply->response();\n}\n\nvoid TcpClient::processMessage(const QJsonRpcMessage &message)\n{\n    if (message.method() == \"callback\")\n      qDebug() << \"received message: \" << message.method() << message.params();\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/tcpclient/tcpclient.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef TCPCLIENT_H\n#define TCPCLIENT_H\n\n#include <QObject>\n#include \"qjsonrpcmessage.h\"\n\nclass QJsonRpcSocket;\nclass TcpClient : public QObject\n{\n    Q_OBJECT\npublic:\n    TcpClient(QObject *parent = 0);\n    void run();\n\nprivate Q_SLOTS:\n    void processResponse();\n    void processMessage(const QJsonRpcMessage &message);\n\nprivate:\n    QJsonRpcSocket *m_client;\n\n};\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/tcpclient/tcpclient.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\nCONFIG -= testcase\n\nTEMPLATE = app\nTARGET = tcpclient\nHEADERS = \\\n    tcpclient.h\nSOURCES = \\\n    tcpclient.cpp \\\n    main.cpp\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/tcpserver/runservermac",
    "content": "#!/bin/bash\nDYLD_FRAMEWORK_PATH=../../../qjson/lib:../../../lib ./server"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/tcpserver/tcpserver.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QCoreApplication>\n\n#include \"qjsonrpctcpserver.h\"\n#include \"testservice.h\"\n\nint main(int argc, char **argv)\n{\n    QCoreApplication app(argc, argv);\n    QJsonRpcTcpServer rpcServer;\n    rpcServer.addService(new TestService);\n    if (!rpcServer.listen(QHostAddress::LocalHost, 5555)) {\n        qDebug() << \"can't start tcp server: \" << rpcServer.errorString();\n        return -1;\n    }\n\n    return app.exec();\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/tcpserver/tcpserver.pro",
    "content": "DEPTH = ../../..\ninclude($${DEPTH}/qjsonrpc.pri)\ninclude($${DEPTH}/tests/tests.pri)\nCONFIG -= testcase\n\nTEMPLATE = app\nTARGET = tcpserver\nHEADERS = \\\n    testservice.h\nSOURCES = \\\n    testservice.cpp \\\n    tcpserver.cpp\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/tcpserver/testservice.cpp",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#include <QDebug>\n#include \"testservice.h\"\n\nTestService::TestService(QObject *parent)\n    : QJsonRpcService(parent)\n{\n}\n\nvoid TestService::testMethod()\n{\n    qDebug() << Q_FUNC_INFO << \"called\" << endl;\n}\n\nvoid TestService::testMethodWithParams(const QString &first, bool second, double third)\n{\n    qDebug() << Q_FUNC_INFO << \"called with parameters: \" << endl\n             << \" first: \" << first << endl\n             << \"second: \" << second << endl\n             << \" third: \" << third << endl;\n}\n\nvoid TestService::testMethodWithVariantParams(const QString &first, bool second, double third, const QVariant &fourth)\n{\n    qDebug() << Q_FUNC_INFO << \"called with variant parameters: \" << endl\n             << \" first: \" << first << endl\n             << \"second: \" << second << endl\n             << \" third: \" << third << endl\n             << \"fourth: \" << fourth << endl;\n}\n\nQString TestService::testMethodWithParamsAndReturnValue(const QString &name)\n{\n    qDebug() << Q_FUNC_INFO << \"called\" << endl;\n    return QString(\"Hello %1\").arg(name);\n}\n\nvoid TestService::testMethodWithDefaultParameter(const QString &first, const QString &second)\n{\n    qDebug() << Q_FUNC_INFO << endl\n             << \"first: \" << first << endl\n             << (second.isEmpty() ? \"not defined, default parameter\" : second) << endl;\n}\n\nvoid TestService::testNotifyConnectedClients(const QString &message)\n{\n    QJsonArray args;\n    args.append(message);\n    Q_EMIT notifyConnectedClients(\"callback\", args);\n}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/manual/tcpserver/testservice.h",
    "content": "/*\n * Copyright (C) 2012-2013 Matt Broadstone\n * Contact: http://bitbucket.org/devonit/qjsonrpc\n *\n * This file is part of the QJsonRpc Library.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n */\n#ifndef TESTSERVICE_H\n#define TESTSERVICE_H\n\n#include \"qjsonrpcservice.h\"\n\nclass TestService : public QJsonRpcService\n{\n    Q_OBJECT\n    Q_CLASSINFO(\"serviceName\", \"agent\")\npublic:\n    TestService(QObject *parent = 0);\n\npublic Q_SLOTS:\n    void testMethod();\n    void testMethodWithParams(const QString &first, bool second, double third);\n    void testMethodWithVariantParams(const QString &first, bool second, double third, const QVariant &fourth);\n    QString testMethodWithParamsAndReturnValue(const QString &name);\n    void testMethodWithDefaultParameter(const QString &first, const QString &second = QString());\n    void testNotifyConnectedClients(const QString &message);\n\n};\n\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/tests.pri",
    "content": "INCLUDEPATH += $${QJSONRPC_INCLUDEPATH} \\\n               $${QJSONRPC_INCLUDEPATH}/json \\\n               $${PWD}/common\n               \nLIBS += -L$${DEPTH}/src $${QJSONRPC_LIBS}\nQT = core network testlib\nQT -= gui\nCONFIG -= app_bundle\nCONFIG += testcase no_testcase_installs\n\nHEADERS += \\\n    $${PWD}/common/signalspy.h \n    \nunix:!macx:QMAKE_RPATHDIR += $${OUT_PWD}/$${DEPTH}/src\nmacx {\n    QMAKE_RPATHDIR += @loader_path/$${DEPTH}/src\n    QMAKE_LFLAGS += -Wl,-rpath,@loader_path/$${DEPTH}/src\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qjsonrpc/tests/tests.pro",
    "content": "TEMPLATE = subdirs\nSUBDIRS = auto \\\n          manual\n"
  },
  {
    "path": "liteidex/src/3rdparty/qt_browser/chasewidget.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the demonstration applications of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** GNU General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU\n** General Public License version 3.0 as published by the Free Software\n** Foundation and appearing in the file LICENSE.GPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU General Public License version 3.0 requirements will be\n** met: http://www.gnu.org/copyleft/gpl.html.\n**\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#include \"chasewidget.h\"\n\n#include <QPoint>\n\n#include <QApplication>\n#include <QHideEvent>\n#include <QPainter>\n#include <QPaintEvent>\n#include <QShowEvent>\n\nChaseWidget::ChaseWidget(QWidget *parent, QPixmap pixmap, bool pixmapEnabled)\n    : QWidget(parent)\n    , m_segment(0)\n    , m_delay(100)\n    , m_step(60)\n    , m_timerId(-1)\n    , m_animated(false)\n    , m_pixmap(pixmap)\n    , m_pixmapEnabled(pixmapEnabled)\n{\n}\n\nvoid ChaseWidget::setAnimated(bool value)\n{\n    if (m_animated == value)\n        return;\n    m_animated = value;\n    if (m_timerId != -1) {\n        killTimer(m_timerId);\n        m_timerId = -1;\n    }\n    if (m_animated) {\n        m_segment = 0;\n        m_timerId = startTimer(m_delay);\n    }\n    update();\n}\n\nvoid ChaseWidget::paintEvent(QPaintEvent *event)\n{\n    Q_UNUSED(event);\n    QPainter p(this);\n    if (m_pixmapEnabled && !m_pixmap.isNull()) {\n        p.drawPixmap(0, 0, m_pixmap);\n        return;\n    }\n\n    const int extent = qMin(width(), height());\n    const int displ = extent / 4-1;\n    const int ext = extent / 4;// - 1;\n\n    p.setRenderHint(QPainter::Antialiasing, true);\n\n    if(m_animated)\n        p.setPen(Qt::gray);\n    else\n        p.setPen(QPen(palette().dark().color()));\n\n    p.translate(width() / 2, height() / 2); // center\n\n    for (int segment = 0; segment < segmentCount(); ++segment) {\n        p.rotate(QApplication::isRightToLeft() ? m_step : -m_step);\n        if(m_animated)\n            p.setBrush(colorForSegment(segment));\n        else\n            p.setBrush(palette().background());\n        p.drawEllipse(QRect(displ, -ext / 2, ext, ext));\n    }\n}\n\nQSize ChaseWidget::sizeHint() const\n{\n    return QSize(24, 24);\n}\n\nvoid ChaseWidget::timerEvent(QTimerEvent *event)\n{\n    if (event->timerId() == m_timerId) {\n        ++m_segment;\n        update();\n    }\n    QWidget::timerEvent(event);\n}\n\nQColor ChaseWidget::colorForSegment(int seg) const\n{\n    int index = ((seg + m_segment) % segmentCount());\n    int comp = qMax(0, 255 - (index * (255 / segmentCount())));\n    return QColor(comp, comp, comp, 255);\n}\n\nint ChaseWidget::segmentCount() const\n{\n    return 360 / m_step;\n}\n\nvoid ChaseWidget::setPixmapEnabled(bool enable)\n{\n    m_pixmapEnabled = enable;\n}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qt_browser/chasewidget.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of the demonstration applications of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** GNU General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU\n** General Public License version 3.0 as published by the Free Software\n** Foundation and appearing in the file LICENSE.GPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU General Public License version 3.0 requirements will be\n** met: http://www.gnu.org/copyleft/gpl.html.\n**\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#ifndef CHASEWIDGET_H\n#define CHASEWIDGET_H\n\n#include <QWidget>\n\n#include <QSize>\n#include <QColor>\n#include <QPixmap>\n\nQT_BEGIN_NAMESPACE\nclass QHideEvent;\nclass QShowEvent;\nclass QPaintEvent;\nclass QTimerEvent;\nQT_END_NAMESPACE\n\nclass ChaseWidget : public QWidget\n{\n    Q_OBJECT\npublic:\n    ChaseWidget(QWidget *parent = 0, QPixmap pixmap = QPixmap(), bool pixmapEnabled = false);\n\n    void setAnimated(bool value);\n    void setPixmapEnabled(bool enable);\n    QSize sizeHint() const;\n\nprotected:\n    void paintEvent(QPaintEvent *event);\n    void timerEvent(QTimerEvent *event);\n\nprivate:\n    int segmentCount() const;\n    QColor colorForSegment(int segment) const;\n\n    int m_segment;\n    int m_delay;\n    int m_step;\n    int m_timerId;\n    bool m_animated;\n    QPixmap m_pixmap;\n    bool m_pixmapEnabled;\n};\n\n#endif\n"
  },
  {
    "path": "liteidex/src/3rdparty/qt_browser/qt_browser.pri",
    "content": "LIBS *= -l$$qtLibraryName(qt_browser)\n"
  },
  {
    "path": "liteidex/src/3rdparty/qt_browser/qt_browser.pro",
    "content": "TARGET = qt_browser\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude(../../liteideutils.pri)\n\nHEADERS += \\\n    chasewidget.h\n\nSOURCES += \\\n    chasewidget.cpp  \n\nRESOURCES +=\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_editutil/fancylineedit.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** Commercial Usage\n**\n** Licensees holding valid Qt Commercial licenses may use this file in\n** accordance with the Qt Commercial License Agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Nokia.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** If you are unsure which license is appropriate for your use, please\n** contact the sales department at http://qt.nokia.com/contact.\n**\n**************************************************************************/\n\n#include \"fancylineedit.h\"\n\n#include <QtCore/QEvent>\n#include <QtCore/QDebug>\n#include <QtCore/QString>\n#include <QtCore/QPropertyAnimation>\n#include <QApplication>\n#include <QMenu>\n#include <QMouseEvent>\n#include <QLabel>\n#include <QAbstractButton>\n#ifndef QT_NO_PRINTER\n#include <QPainter>\n#endif\n#include <QStyle>\n#include <QPaintEvent>\n\nenum { margin = 6 };\n\n#define ICONBUTTON_HEIGHT 18\n#define FADE_TIME 160\n\nnamespace Utils {\n\n// --------- FancyLineEditPrivate\nclass FancyLineEditPrivate : public QObject {\npublic:\n    explicit FancyLineEditPrivate(FancyLineEdit *parent);\n\n    virtual bool eventFilter(QObject *obj, QEvent *event);\n\n    FancyLineEdit  *m_lineEdit;\n    QPixmap m_pixmap[2];\n    QMenu *m_menu[2];\n    bool m_menuTabFocusTrigger[2];\n    IconButton *m_iconbutton[2];\n    bool m_iconEnabled[2];\n};\n\n\nFancyLineEditPrivate::FancyLineEditPrivate(FancyLineEdit *parent) :\n    QObject(parent),\n    m_lineEdit(parent)\n{\n    for (int i = 0; i < 2; ++i) {\n        m_menu[i] = 0;\n        m_menuTabFocusTrigger[i] = false;\n        m_iconbutton[i] = new IconButton(parent);\n        m_iconbutton[i]->installEventFilter(this);\n        m_iconbutton[i]->hide();\n        m_iconbutton[i]->setAutoHide(false);\n        m_iconEnabled[i] = false;\n    }\n}\n\nbool FancyLineEditPrivate::eventFilter(QObject *obj, QEvent *event)\n{\n    int buttonIndex = -1;\n    for (int i = 0; i < 2; ++i) {\n        if (obj == m_iconbutton[i]) {\n            buttonIndex = i;\n            break;\n        }\n    }\n    if (buttonIndex == -1)\n        return QObject::eventFilter(obj, event);\n    switch (event->type()) {\n    case QEvent::FocusIn:\n        if (m_menuTabFocusTrigger[buttonIndex] && m_menu[buttonIndex]) {\n            m_lineEdit->setFocus();\n            m_menu[buttonIndex]->exec(m_iconbutton[buttonIndex]->mapToGlobal(\n                    m_iconbutton[buttonIndex]->rect().center()));\n            return true;\n        }\n    default:\n        break;\n    }\n    return QObject::eventFilter(obj, event);\n}\n\n\n// --------- FancyLineEdit\nFancyLineEdit::FancyLineEdit(QWidget *parent) :\n    QLineEdit(parent),\n    m_d(new FancyLineEditPrivate(this))\n{\n    ensurePolished();\n    updateMargins();\n\n    connect(this, SIGNAL(textChanged(QString)), this, SLOT(checkButtons(QString)));\n    connect(m_d->m_iconbutton[Left], SIGNAL(clicked()), this, SLOT(iconClicked()));\n    connect(m_d->m_iconbutton[Right], SIGNAL(clicked()), this, SLOT(iconClicked()));\n}\n\nvoid FancyLineEdit::checkButtons(const QString &text)\n{\n    if (m_oldText.isEmpty() || text.isEmpty()) {\n        for (int i = 0; i < 2; ++i) {\n            if (m_d->m_iconbutton[i]->hasAutoHide())\n                m_d->m_iconbutton[i]->animateShow(!text.isEmpty());\n        }\n        m_oldText = text;\n    }\n}\n\nFancyLineEdit::~FancyLineEdit()\n{\n}\n\nvoid FancyLineEdit::setButtonVisible(Side side, bool visible)\n{\n    m_d->m_iconbutton[side]->setVisible(visible);\n    m_d->m_iconEnabled[side] = visible;\n    updateMargins();\n    updateButtonPositions();\n}\n\nbool FancyLineEdit::isButtonVisible(Side side) const\n{\n    return m_d->m_iconEnabled[side];\n}\n\nvoid FancyLineEdit::iconClicked()\n{\n    IconButton *button = qobject_cast<IconButton *>(sender());\n    int index = -1;\n    for (int i = 0; i < 2; ++i)\n        if (m_d->m_iconbutton[i] == button)\n            index = i;\n    if (index == -1)\n        return;\n    if (m_d->m_menu[index]) {\n        m_d->m_menu[index]->exec(QCursor::pos());\n    } else {\n        emit buttonClicked((Side)index);\n        if (index == Left)\n            emit leftButtonClicked();\n        else if (index == Right)\n            emit rightButtonClicked();\n    }\n}\n\nvoid FancyLineEdit::updateMargins()\n{\n    bool leftToRight = (layoutDirection() == Qt::LeftToRight);\n    Side realLeft = (leftToRight ? Left : Right);\n    Side realRight = (leftToRight ? Right : Left);\n\n    int leftMargin = m_d->m_iconbutton[realLeft]->pixmap().width() + 8;\n    int rightMargin = m_d->m_iconbutton[realRight]->pixmap().width() + 8;\n    // Note KDE does not reserve space for the highlight color\n    if (style()->inherits(\"OxygenStyle\")) {\n        leftMargin = qMax(24, leftMargin);\n        rightMargin = qMax(24, rightMargin);\n    }\n\n    QMargins margins((m_d->m_iconEnabled[realLeft] ? leftMargin : 0), 0,\n                     (m_d->m_iconEnabled[realRight] ? rightMargin : 0), 0);\n\n    setTextMargins(margins);\n}\n\nvoid FancyLineEdit::updateButtonPositions()\n{\n    QRect contentRect = rect();\n    for (int i = 0; i < 2; ++i) {\n        Side iconpos = (Side)i;\n        if (layoutDirection() == Qt::RightToLeft)\n            iconpos = (iconpos == Left ? Right : Left);\n\n        if (iconpos == FancyLineEdit::Right) {\n            const int iconoffset = textMargins().right() + 4;\n            m_d->m_iconbutton[i]->setGeometry(contentRect.adjusted(width() - iconoffset, 0, 0, 0));\n        } else {\n            const int iconoffset = textMargins().left() + 4;\n            m_d->m_iconbutton[i]->setGeometry(contentRect.adjusted(0, 0, -width() + iconoffset, 0));\n        }\n    }\n}\n\nvoid FancyLineEdit::resizeEvent(QResizeEvent *)\n{\n    updateButtonPositions();\n}\n\nvoid FancyLineEdit::setButtonPixmap(Side side, const QPixmap &buttonPixmap)\n{\n    m_d->m_iconbutton[side]->setPixmap(buttonPixmap);\n    updateMargins();\n    updateButtonPositions();\n    update();\n}\n\nQPixmap FancyLineEdit::buttonPixmap(Side side) const\n{\n    return m_d->m_pixmap[side];\n}\n\nvoid FancyLineEdit::setButtonMenu(Side side, QMenu *buttonMenu)\n{\n     m_d->m_menu[side] = buttonMenu;\n     m_d->m_iconbutton[side]->setIconOpacity(1.0);\n }\n\nQMenu *FancyLineEdit::buttonMenu(Side side) const\n{\n    return  m_d->m_menu[side];\n}\n\nbool FancyLineEdit::hasMenuTabFocusTrigger(Side side) const\n{\n    return m_d->m_menuTabFocusTrigger[side];\n}\n\nvoid FancyLineEdit::setMenuTabFocusTrigger(Side side, bool v)\n{\n    if (m_d->m_menuTabFocusTrigger[side] == v)\n        return;\n\n    m_d->m_menuTabFocusTrigger[side] = v;\n    m_d->m_iconbutton[side]->setFocusPolicy(v ? Qt::TabFocus : Qt::NoFocus);\n}\n\nbool FancyLineEdit::hasAutoHideButton(Side side) const\n{\n    return m_d->m_iconbutton[side]->hasAutoHide();\n}\n\nvoid FancyLineEdit::setAutoHideButton(Side side, bool h)\n{\n    m_d->m_iconbutton[side]->setAutoHide(h);\n    if (h)\n        m_d->m_iconbutton[side]->setIconOpacity(text().isEmpty() ?  0.0 : 1.0);\n    else\n        m_d->m_iconbutton[side]->setIconOpacity(1.0);\n}\n\nvoid FancyLineEdit::setButtonToolTip(Side side, const QString &tip)\n{\n    m_d->m_iconbutton[side]->setToolTip(tip);\n}\n\nvoid FancyLineEdit::setButtonFocusPolicy(Side side, Qt::FocusPolicy policy)\n{\n    m_d->m_iconbutton[side]->setFocusPolicy(policy);\n}\n\n// IconButton - helper class to represent a clickable icon\n\nIconButton::IconButton(QWidget *parent)\n    : QAbstractButton(parent), m_autoHide(false)\n{\n    setCursor(Qt::ArrowCursor);\n    setFocusPolicy(Qt::NoFocus);\n}\n\nvoid IconButton::paintEvent(QPaintEvent *)\n{\n    QPainter painter(this);\n    // Note isDown should really use the active state but in most styles\n    // this has no proper feedback\n    QIcon::Mode state = QIcon::Disabled;\n    if (isEnabled())\n        state = isDown() ? QIcon::Selected : QIcon::Normal;\n    QRect pixmapRect = QRect(0, 0, m_pixmap.width(), m_pixmap.height());\n    pixmapRect.moveCenter(rect().center());\n\n    if (m_autoHide)\n        painter.setOpacity(m_iconOpacity);\n\n    painter.drawPixmap(pixmapRect, m_pixmap);\n}\n\nvoid IconButton::animateShow(bool visible)\n{\n    if (visible) {\n        QPropertyAnimation *animation = new QPropertyAnimation(this, \"iconOpacity\");\n        animation->setDuration(FADE_TIME);\n        animation->setEndValue(1.0);\n        animation->start(QAbstractAnimation::DeleteWhenStopped);\n    } else {\n        QPropertyAnimation *animation = new QPropertyAnimation(this, \"iconOpacity\");\n        animation->setDuration(FADE_TIME);\n        animation->setEndValue(0.0);\n        animation->start(QAbstractAnimation::DeleteWhenStopped);\n    }\n}\n\n} // namespace Utils\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_editutil/fancylineedit.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** Commercial Usage\n**\n** Licensees holding valid Qt Commercial licenses may use this file in\n** accordance with the Qt Commercial License Agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Nokia.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** If you are unsure which license is appropriate for your use, please\n** contact the sales department at http://qt.nokia.com/contact.\n**\n**************************************************************************/\n\n#ifndef FANCYLINEEDIT_H\n#define FANCYLINEEDIT_H\n\n#include <QLineEdit>\n#include <QAbstractButton>\n\nnamespace Utils {\n\nclass FancyLineEditPrivate;\n\nclass IconButton: public QAbstractButton\n{\n    Q_OBJECT\n    Q_PROPERTY(float iconOpacity READ iconOpacity WRITE setIconOpacity)\n    Q_PROPERTY(bool autoHide READ hasAutoHide WRITE setAutoHide)\n    Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap)\npublic:\n    explicit IconButton(QWidget *parent = 0);\n    void paintEvent(QPaintEvent *event);\n    void setPixmap(const QPixmap &pixmap) { m_pixmap = pixmap; update(); }\n    QPixmap pixmap() const { return m_pixmap; }\n    float iconOpacity() { return m_iconOpacity; }\n    void setIconOpacity(float value) { m_iconOpacity = value; update(); }\n    void animateShow(bool visible);\n\n    void setAutoHide(bool hide) { m_autoHide = hide; }\n    bool hasAutoHide() const { return m_autoHide; }\nprivate:\n    float m_iconOpacity;\n    bool m_autoHide;\n    QPixmap m_pixmap;\n};\n\n\n/* A line edit with an embedded pixmap on one side that is connected to\n * a menu. Additionally, it can display a grayed hintText (like \"Type Here to\")\n * when not focused and empty. When connecting to the changed signals and\n * querying text, one has to be aware that the text is set to that hint\n * text if isShowingHintText() returns true (that is, does not contain\n * valid user input).\n */\nclass FancyLineEdit : public QLineEdit\n{\n    Q_DISABLE_COPY(FancyLineEdit)\n    Q_OBJECT\n    Q_ENUMS(Side)\n\npublic:\n    enum Side {Left = 0, Right = 1};\n\n    explicit FancyLineEdit(QWidget *parent = 0);\n    ~FancyLineEdit();\n\n    QPixmap buttonPixmap(Side side) const;\n    void setButtonPixmap(Side side, const QPixmap &pixmap);\n\n    QMenu *buttonMenu(Side side) const;\n    void setButtonMenu(Side side, QMenu *menu);\n\n    void setButtonVisible(Side side, bool visible);\n    bool isButtonVisible(Side side) const;\n\n    void setButtonToolTip(Side side, const QString &);\n    void setButtonFocusPolicy(Side side, Qt::FocusPolicy policy);\n\n    // Set whether tabbing in will trigger the menu.\n    void setMenuTabFocusTrigger(Side side, bool v);\n    bool hasMenuTabFocusTrigger(Side side) const;\n\n    // Set if icon should be hidden when text is empty\n    void setAutoHideButton(Side side, bool h);\n    bool hasAutoHideButton(Side side) const;\nsignals:\n    void buttonClicked(Utils::FancyLineEdit::Side side);\n    void leftButtonClicked();\n    void rightButtonClicked();\n\nprivate slots:\n    void checkButtons(const QString &);\n    void iconClicked();\n\nprotected:\n    virtual void resizeEvent(QResizeEvent *e);\n\nprivate:\n    void updateMargins();\n    void updateButtonPositions();\n    friend class Utils::FancyLineEditPrivate;\n\n    FancyLineEditPrivate *m_d;\n    QString m_oldText;\n};\n\n} // namespace Utils\n\n#endif // FANCYLINEEDIT_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_editutil/filterlineedit.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** Commercial Usage\n**\n** Licensees holding valid Qt Commercial licenses may use this file in\n** accordance with the Qt Commercial License Agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Nokia.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** If you are unsure which license is appropriate for your use, please\n** contact the sales department at http://qt.nokia.com/contact.\n**\n**************************************************************************/\n\n#include \"filterlineedit.h\"\n#include <QTimer>\n\nnamespace Utils {\n\nFilterLineEdit::FilterLineEdit(int dly, QWidget *parent) :\n   FancyLineEdit(parent),\n   m_lastFilterText(text()),\n    m_dlytimer(dly)\n{\n    // KDE has custom icons for this. Notice that icon namings are counter intuitive\n    // If these icons are not avaiable we use the freedesktop standard name before\n    // falling back to a bundled resource\n\n    QIcon icon = QIcon::fromTheme(layoutDirection() == Qt::LeftToRight ?\n                     QLatin1String(\"edit-clear-locationbar-rtl\") :\n                     QLatin1String(\"edit-clear-locationbar-ltr\"),\n                     QIcon::fromTheme(QLatin1String(\"edit-clear\"), QIcon(QLatin1String(\"icon:images/editclear.png\"))));\n\n    setButtonPixmap(Right, icon.pixmap(16));\n    setButtonVisible(Right, true);\n    setPlaceholderText(tr(\"Filter\"));\n    setButtonToolTip(Right, tr(\"Clear text\"));\n    setAutoHideButton(Right, true);\n    m_timer = new QTimer(this);\n    m_timer->setSingleShot(true);\n    connect(m_timer,SIGNAL(timeout()),this,SLOT(dlyTextChanged()));\n    connect(this, SIGNAL(rightButtonClicked()), this, SLOT(clear()));\n    connect(this, SIGNAL(textChanged(QString)), this, SLOT(slotTextChanged()));\n}\n\nvoid FilterLineEdit::slotTextChanged()\n{\n    const QString newlyTypedText = text();\n    if (newlyTypedText != m_lastFilterText) {\n        m_lastFilterText = newlyTypedText;\n        if (m_dlytimer == 0) {\n            emit filterChanged(m_lastFilterText);\n        } else {\n            m_timer->start(m_dlytimer);\n        }\n    }\n}\n\nvoid FilterLineEdit::dlyTextChanged()\n{\n    emit filterChanged(m_lastFilterText);\n}\n\n} // namespace Utils\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_editutil/filterlineedit.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** Commercial Usage\n**\n** Licensees holding valid Qt Commercial licenses may use this file in\n** accordance with the Qt Commercial License Agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Nokia.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** If you are unsure which license is appropriate for your use, please\n** contact the sales department at http://qt.nokia.com/contact.\n**\n**************************************************************************/\n\n#ifndef FILTERLINEEDIT_H\n#define FILTERLINEEDIT_H\n\n#include \"fancylineedit.h\"\n\nnamespace Utils {\n\n/* A fancy line edit customized for filtering purposes with a clear button. */\n\nclass FilterLineEdit : public FancyLineEdit\n{\n    Q_OBJECT\npublic:\n    explicit FilterLineEdit(int dly,QWidget *parent = 0);\n\nsignals:\n    void filterChanged(const QString &);\n\nprivate slots:\n    void slotTextChanged();\n    void dlyTextChanged();\n\nprivate:\n    QString m_lastFilterText;\n    int m_dlytimer;\n    QTimer  *m_timer;\n};\n\n} // namespace Utils\n\n#endif // FILTERLINEEDIT_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_editutil/qtc_editutil.pri",
    "content": "LIBS *= -l$$qtLibraryName(qtc_editutil)\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_editutil/qtc_editutil.pro",
    "content": "TARGET = qtc_editutil\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude(../../liteideutils.pri)\n\nHEADERS += \\\n    filterlineedit.h \\\n    fancylineedit.h \\\n    uncommentselection.h \\\n    utils_global.h\n\nSOURCES += \\\n    filterlineedit.cpp \\\n    fancylineedit.cpp \\\n    uncommentselection.cpp\n\nRESOURCES +=\n\nQMAKE_CFLAGS_WARN_ON -= -W -Wextra -Wall\nQMAKE_CXXFLAGS_WARN_ON -= -W -Wextra -Wall\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_editutil/uncommentselection.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n**\n** GNU Lesser General Public License Usage\n**\n** This file may be used under the terms of the GNU Lesser General Public\n** License version 2.1 as published by the Free Software Foundation and\n** appearing in the file LICENSE.LGPL included in the packaging of this file.\n** Please review the following information to ensure the GNU Lesser General\n** Public License version 2.1 requirements will be met:\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights. These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** Other Usage\n**\n** Alternatively, this file may be used in accordance with the terms and\n** conditions contained in a signed written agreement between you and Nokia.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"uncommentselection.h\"\n#include <QtCore/QtGlobal>\n#include <QPlainTextEdit>\n#include <QTextCursor>\n#include <QTextBlock>\n#include <QTextDocument>\n\nusing namespace Utils;\n\nCommentDefinition::CommentDefinition() :\n    m_afterWhiteSpaces(true),\n    m_afterWhiteSpacesAddSpace(true),\n    m_singleLine(QLatin1String(\"//\")),\n    m_multiLineStart(QLatin1String(\"/*\")),\n    m_multiLineEnd(QLatin1String(\"*/\"))\n{}\n\nCommentDefinition &CommentDefinition::setAfterWhiteSpaces(const bool afterWhiteSpaces)\n{\n    m_afterWhiteSpaces = afterWhiteSpaces;\n    return *this;\n}\n\nCommentDefinition &CommentDefinition::setAfterWhiteSpacesAddSpace(const bool afterWhiteSpacesAddSpace)\n{\n    m_afterWhiteSpacesAddSpace = afterWhiteSpacesAddSpace;\n    return *this;\n}\n\nCommentDefinition &CommentDefinition::setSingleLine(const QString &singleLine)\n{\n    m_singleLine = singleLine;\n    return *this;\n}\n\nCommentDefinition &CommentDefinition::setMultiLineStart(const QString &multiLineStart)\n{\n    m_multiLineStart = multiLineStart;\n    return *this;\n}\n\nCommentDefinition &CommentDefinition::setMultiLineEnd(const QString &multiLineEnd)\n{\n    m_multiLineEnd = multiLineEnd;\n    return *this;\n}\n\nbool CommentDefinition::isAfterWhiteSpaces() const\n{ return m_afterWhiteSpaces; }\n\nbool CommentDefinition::isAfterWhiteSpacesAddSpace() const\n{   return m_afterWhiteSpacesAddSpace; }\n\nconst QString &CommentDefinition::singleLine() const\n{ return m_singleLine; }\n\nconst QString &CommentDefinition::multiLineStart() const\n{ return m_multiLineStart; }\n\nconst QString &CommentDefinition::multiLineEnd() const\n{ return m_multiLineEnd; }\n\nbool CommentDefinition::hasSingleLineStyle() const\n{ return !m_singleLine.isEmpty(); }\n\nbool CommentDefinition::hasMultiLineStyle() const\n{ return !m_multiLineStart.isEmpty() && !m_multiLineEnd.isEmpty(); }\n\nvoid CommentDefinition::clearCommentStyles()\n{\n    m_singleLine.clear();\n    m_multiLineStart.clear();\n    m_multiLineEnd.clear();\n}\n\nnamespace {\n\nbool isComment(const QString &text,\n               int index,\n               const CommentDefinition &definition,\n               const QString & (CommentDefinition::* comment) () const)\n{\n    const QString &commentType = ((definition).*(comment))();\n    const int length = commentType.length();\n\n    Q_ASSERT(text.length() - index >= length);\n\n    int i = 0;\n    while (i < length) {\n        if (text.at(index + i) != commentType.at(i))\n            return false;\n        ++i;\n    }\n    return true;\n}\n\n} // namespace anynomous\n\nvoid Utils::unCommentSelection(QPlainTextEdit *edit, CommentFlag flag, const CommentDefinition &definition)\n{\n    if (!definition.hasSingleLineStyle() && !definition.hasMultiLineStyle())\n        return;\n\n    QTextCursor cursor = edit->textCursor();\n    QTextDocument *doc = cursor.document();\n\n    if (!cursor.hasSelection() && (flag == BlockComment) ) {\n        if (definition.hasMultiLineStyle()) {\n            cursor.beginEditBlock();\n            cursor.insertText(definition.multiLineStart());\n            cursor.insertText(definition.multiLineEnd());\n            cursor.movePosition(QTextCursor::Left,QTextCursor::MoveAnchor,definition.multiLineEnd().length());\n            cursor.endEditBlock();\n            edit->setTextCursor(cursor);\n            return;\n        }\n    }\n\n    cursor.beginEditBlock();\n\n    int pos = cursor.position();\n    int anchor = cursor.anchor();\n    int start = qMin(anchor, pos);\n    int end = qMax(anchor, pos);\n    bool anchorIsStart = (anchor == start);\n\n    QTextBlock startBlock = doc->findBlock(start);\n    QTextBlock endBlock = doc->findBlock(end);\n\n    if (end > start && endBlock.position() == end) {\n        --end;\n        endBlock = endBlock.previous();\n    }\n\n    bool doMultiLineStyleUncomment = false;\n    bool doMultiLineStyleComment = false;\n    bool doSingleLineStyleUncomment = false;\n\n    bool hasSelection = cursor.hasSelection();\n    int firstSpacesOffset = -1;\n\n    if (hasSelection && definition.hasMultiLineStyle()) {\n\n        QString startText = startBlock.text();\n        int startPos = start - startBlock.position();\n        const int multiLineStartLength = definition.multiLineStart().length();\n        bool hasLeadingCharacters = !startText.left(startPos).trimmed().isEmpty();\n\n        if (startPos >= multiLineStartLength\n            && isComment(startText,\n                         startPos - multiLineStartLength,\n                         definition,\n                         &CommentDefinition::multiLineStart)) {\n            startPos -= multiLineStartLength;\n            start -= multiLineStartLength;\n        }\n\n        bool hasSelStart = (startPos <= startText.length() - multiLineStartLength\n                            && isComment(startText,\n                                         startPos,\n                                         definition,\n                                         &CommentDefinition::multiLineStart));\n\n        QString endText = endBlock.text();\n        int endPos = end - endBlock.position();\n        const int multiLineEndLength = definition.multiLineEnd().length();\n        bool hasTrailingCharacters =\n                !endText.left(endPos).remove(definition.singleLine()).trimmed().isEmpty()\n                && !endText.mid(endPos).trimmed().isEmpty();\n\n        if (endPos <= endText.length() - multiLineEndLength\n            && isComment(endText, endPos, definition, &CommentDefinition::multiLineEnd)) {\n            endPos += multiLineEndLength;\n            end += multiLineEndLength;\n        }\n\n        bool hasSelEnd = (endPos >= multiLineEndLength\n                          && isComment(endText,\n                                       endPos - multiLineEndLength,\n                                       definition,\n                                       &CommentDefinition::multiLineEnd));\n\n        doMultiLineStyleUncomment = hasSelStart && hasSelEnd;\n        doMultiLineStyleComment = !doMultiLineStyleUncomment\n                                  && (hasLeadingCharacters\n                                      || hasTrailingCharacters\n                                      || !definition.hasSingleLineStyle()\n                                      || (flag == BlockComment));\n    } else if (!hasSelection && !definition.hasSingleLineStyle()) {\n\n        QString text = startBlock.text().trimmed();\n        doMultiLineStyleUncomment = text.startsWith(definition.multiLineStart())\n                                    && text.endsWith(definition.multiLineEnd());\n        doMultiLineStyleComment = !doMultiLineStyleUncomment && !text.isEmpty();\n\n        start = startBlock.position();\n        end = endBlock.position() + endBlock.length() - 1;\n\n        if (doMultiLineStyleUncomment) {\n            int offset = 0;\n            text = startBlock.text();\n            const int length = text.length();\n            while (offset < length && text.at(offset).isSpace())\n                ++offset;\n            start += offset;\n        }\n    }\n\n    if (flag == SingleComment) {\n        if (doMultiLineStyleComment) {\n            doMultiLineStyleComment = false;\n        }\n    }\n\n    if (doMultiLineStyleUncomment) {\n        cursor.setPosition(end);\n        cursor.movePosition(QTextCursor::PreviousCharacter,\n                            QTextCursor::KeepAnchor,\n                            definition.multiLineEnd().length());\n        cursor.removeSelectedText();\n        cursor.setPosition(start);\n        cursor.movePosition(QTextCursor::NextCharacter,\n                            QTextCursor::KeepAnchor,\n                            definition.multiLineStart().length());\n        cursor.removeSelectedText();\n    } else if (doMultiLineStyleComment) {\n        cursor.setPosition(end);\n        cursor.insertText(definition.multiLineEnd());\n        cursor.setPosition(start);\n        cursor.insertText(definition.multiLineStart());\n    } else {\n        endBlock = endBlock.next();\n        doSingleLineStyleUncomment = true;\n        for (QTextBlock block = startBlock; block != endBlock; block = block.next()) {\n            QString text = block.text().trimmed();\n            if (!text.isEmpty() && !text.startsWith(definition.singleLine())) {\n                doSingleLineStyleUncomment = false;\n                break;\n            }\n        }\n        if (!hasSelection && cursor.block().text().isEmpty()) {\n            doSingleLineStyleUncomment = false;\n        }\n        const int singleLineLength = definition.singleLine().length();\n        for (QTextBlock block = startBlock; block != endBlock; block = block.next()) {\n            if (doSingleLineStyleUncomment) {\n                QString text = block.text();\n                int i = 0;\n                while (i <= text.size() - singleLineLength) {\n                    if (isComment(text, i, definition, &CommentDefinition::singleLine)) {\n                        cursor.setPosition(block.position() + i);\n                        cursor.movePosition(QTextCursor::NextCharacter,\n                                            QTextCursor::KeepAnchor,\n                                            singleLineLength);\n                        if (definition.isAfterWhiteSpacesAddSpace()) {\n                            if (i < text.size()-singleLineLength) {\n                                if (text.at(i+singleLineLength) == 0x0020) {\n                                    cursor.movePosition(QTextCursor::NextCharacter,QTextCursor::KeepAnchor,1);\n                                }\n                            }\n                        }\n                        cursor.removeSelectedText();\n                        break;\n                    }\n                    if (!text.at(i).isSpace())\n                        break;\n                    ++i;\n                }\n            } else {\n                QString text = block.text();\n                foreach(QChar c, text) {\n                    if (!c.isSpace()) {\n                        if (definition.isAfterWhiteSpaces()) {\n                            int offset = text.indexOf(c);\n                            if (firstSpacesOffset != -1 && offset > firstSpacesOffset) {\n                                offset = firstSpacesOffset;\n                            }\n                            cursor.setPosition(block.position() + offset);\n                        } else {\n                            cursor.setPosition(block.position());\n                        }\n                        if (firstSpacesOffset == -1) {\n                            firstSpacesOffset = cursor.position()-cursor.block().position();\n                        }\n                        if (definition.isAfterWhiteSpaces() && definition.isAfterWhiteSpacesAddSpace()) {\n                            cursor.insertText(definition.singleLine()+\" \");\n                        } else {\n                            cursor.insertText(definition.singleLine());\n                        }\n                        break;\n                    }\n                }\n            }\n        }\n    }\n\n    // adjust selection when commenting out\n    if (hasSelection && !doMultiLineStyleUncomment && !doSingleLineStyleUncomment) {\n        cursor = edit->textCursor();\n        if (!doMultiLineStyleComment)\n            start = startBlock.position(); // move the comment into the selection\n        int lastSelPos = anchorIsStart ? cursor.position() : cursor.anchor();\n        if (anchorIsStart) {\n            cursor.setPosition(start);\n            cursor.setPosition(lastSelPos, QTextCursor::KeepAnchor);\n        } else {\n            cursor.setPosition(lastSelPos);\n            cursor.setPosition(start, QTextCursor::KeepAnchor);\n        }\n        edit->setTextCursor(cursor);\n    }\n\n    cursor.endEditBlock();\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_editutil/uncommentselection.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n**\n** GNU Lesser General Public License Usage\n**\n** This file may be used under the terms of the GNU Lesser General Public\n** License version 2.1 as published by the Free Software Foundation and\n** appearing in the file LICENSE.LGPL included in the packaging of this file.\n** Please review the following information to ensure the GNU Lesser General\n** Public License version 2.1 requirements will be met:\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights. These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** Other Usage\n**\n** Alternatively, this file may be used in accordance with the terms and\n** conditions contained in a signed written agreement between you and Nokia.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef UNCOMMENTSELECTION_H\n#define UNCOMMENTSELECTION_H\n\n#include \"utils_global.h\"\n\n#include <QtCore/QString>\n\nQT_BEGIN_NAMESPACE\nclass QPlainTextEdit;\nQT_END_NAMESPACE\n\nnamespace Utils {\n\nenum CommentFlag {\n    AutoComment = 0,\n    SingleComment,\n    BlockComment,\n};\n\nclass QTCREATOR_UTILS_EXPORT CommentDefinition\n{\npublic:\n    CommentDefinition();\n\n    CommentDefinition &setAfterWhiteSpaces(const bool);\n    CommentDefinition &setAfterWhiteSpacesAddSpace(const bool);\n    CommentDefinition &setAfterMaxSpaces(int spaces);\n    CommentDefinition &setSingleLine(const QString &singleLine);\n    CommentDefinition &setMultiLineStart(const QString &multiLineStart);\n    CommentDefinition &setMultiLineEnd(const QString &multiLineEnd);\n\n    bool isAfterWhiteSpaces() const;\n    bool isAfterWhiteSpacesAddSpace() const;\n    const QString &singleLine() const;\n    const QString &multiLineStart() const;\n    const QString &multiLineEnd() const;\n\n    bool hasSingleLineStyle() const;\n    bool hasMultiLineStyle() const;\n\n    void clearCommentStyles();\n\nprivate:\n    bool m_afterWhiteSpaces;\n    bool m_afterWhiteSpacesAddSpace;\n    QString m_singleLine;\n    QString m_multiLineStart;\n    QString m_multiLineEnd;\n};\n\nQTCREATOR_UTILS_EXPORT\nvoid unCommentSelection(QPlainTextEdit *edit,\n                        CommentFlag flag,\n                        const CommentDefinition &definiton = CommentDefinition());\n\n} // namespace Utils\n\n#endif // UNCOMMENTSELECTION_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_editutil/utils_global.h",
    "content": "#ifndef  QTCREATOR_UTILS_GLOBAL_H\n#define  QTCREATOR_UTILS_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#define QTCREATOR_UTILS_EXPORT\n/*\n#if defined(TEXTEDITOR_LIBRARY)\n#  define TEXTEDITOR_EXPORT Q_DECL_EXPORT\n#else\n#  define TEXTEDITOR_EXPORT Q_DECL_IMPORT\n#endif\n*/\n#endif //  QTCREATOR_UTILS_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_gdbmi/gdbmi.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (info@qt.nokia.com)\n**\n**\n** GNU Lesser General Public License Usage\n**\n** This file may be used under the terms of the GNU Lesser General Public\n** License version 2.1 as published by the Free Software Foundation and\n** appearing in the file LICENSE.LGPL included in the packaging of this file.\n** Please review the following information to ensure the GNU Lesser General\n** Public License version 2.1 requirements will be met:\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights. These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** Other Usage\n**\n** Alternatively, this file may be used in accordance with the terms and\n** conditions contained in a signed written agreement between you and Nokia.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at info@qt.nokia.com.\n**\n**************************************************************************/\n\n\n#include \"gdbmi.h\"\n\n#include <QTextStream>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nvoid skipCommas(const char *&from, const char *to)\n{\n    while (*from == ',' && from != to)\n        ++from;\n}\n\nQTextStream &operator<<(QTextStream &os, const GdbMiValue &mi)\n{\n    return os << mi.toString();\n}\n\nvoid GdbMiValue::parseResultOrValue(const char *&from, const char *to)\n{\n    while (from != to && isspace(*from))\n        ++from;\n\n    //qDebug() << \"parseResultOrValue: \" << QByteArray(from, to - from);\n    parseValue(from, to);\n    if (isValid()) {\n        //qDebug() << \"no valid result in \" << QByteArray(from, to - from);\n        return;\n    }\n    if (from == to || *from == '(')\n        return;\n    const char *ptr = from;\n    while (ptr < to && *ptr != '=') {\n        //qDebug() << \"adding\" << QChar(*ptr) << \"to name\";\n        ++ptr;\n    }\n    m_name = QByteArray(from, ptr - from);\n    from = ptr;\n    if (from < to && *from == '=') {\n        ++from;\n        parseValue(from, to);\n    }\n}\n\nQByteArray GdbMiValue::parseCString(const char *&from, const char *to)\n{\n    QByteArray result;\n    //qDebug() << \"parseCString: \" << QByteArray(from, to - from);\n    if (*from != '\"') {\n        qDebug() << \"MI Parse Error, double quote expected\";\n        ++from; // So we don't hang\n        return QByteArray();\n    }\n    const char *ptr = from;\n    ++ptr;\n    while (ptr < to) {\n        if (*ptr == '\"') {\n            ++ptr;\n            result = QByteArray(from + 1, ptr - from - 2);\n            break;\n        }\n        if (*ptr == '\\\\') {\n            ++ptr;\n            if (ptr == to) {\n                qDebug() << \"MI Parse Error, unterminated backslash escape\";\n                from = ptr; // So we don't hang\n                return QByteArray();\n            }\n        }\n        ++ptr;\n    }\n    from = ptr;\n\n    int idx = result.indexOf('\\\\');\n    if (idx >= 0) {\n        char *dst = result.data() + idx;\n        const char *src = dst + 1, *end = result.data() + result.length();\n        do {\n            char c = *src++;\n            switch (c) {\n                case 'a': *dst++ = '\\a'; break;\n                case 'b': *dst++ = '\\b'; break;\n                case 'f': *dst++ = '\\f'; break;\n                case 'n': *dst++ = '\\n'; break;\n                case 'r': *dst++ = '\\r'; break;\n                case 't': *dst++ = '\\t'; break;\n                case 'v': *dst++ = '\\v'; break;\n                case '\"': *dst++ = '\"'; break;\n                case '\\\\': *dst++ = '\\\\'; break;\n                default:\n                    {\n                        int chars = 0;\n                        uchar prod = 0;\n                        forever {\n                            if (c < '0' || c > '7') {\n                                --src;\n                                break;\n                            }\n                            prod = prod * 8 + c - '0';\n                            if (++chars == 3 || src == end)\n                                break;\n                            c = *src++;\n                        }\n                        if (!chars) {\n                            qDebug() << \"MI Parse Error, unrecognized backslash escape\";\n                            return QByteArray();\n                        }\n                        *dst++ = prod;\n                    }\n            }\n            while (src != end) {\n                char c = *src++;\n                if (c == '\\\\')\n                    break;\n                *dst++ = c;\n            }\n        } while (src != end);\n        *dst = 0;\n        result.truncate(dst - result.data());\n    }\n\n    return result;\n}\n\nvoid GdbMiValue::parseValue(const char *&from, const char *to)\n{\n    //qDebug() << \"parseValue: \" << QByteArray(from, to - from);\n    switch (*from) {\n        case '{':\n            parseTuple(from, to);\n            break;\n        case '[':\n            parseList(from, to);\n            break;\n        case '\"':\n            m_type = Const;\n            m_data = parseCString(from, to);\n            break;\n        default:\n            break;\n    }\n}\n\n\nvoid GdbMiValue::parseTuple(const char *&from, const char *to)\n{\n    //qDebug() << \"parseTuple: \" << QByteArray(from, to - from);\n    if (*from != '{') {\n        return;\n    }\n    ++from;\n    parseTuple_helper(from, to);\n}\n\nvoid GdbMiValue::parseTuple_helper(const char *&from, const char *to)\n{\n    skipCommas(from, to);\n    //qDebug() << \"parseTuple_helper: \" << QByteArray(from, to - from);\n    m_type = Tuple;\n    while (from < to) {\n        if (*from == '}') {\n            ++from;\n            break;\n        }\n        GdbMiValue child;\n        child.parseResultOrValue(from, to);\n        //qDebug() << \"\\n=======\\n\" << qPrintable(child.toString()) << \"\\n========\\n\";\n        if (!child.isValid())\n            return;\n        m_children += child;\n        skipCommas(from, to);\n    }\n}\n\nvoid GdbMiValue::parseList(const char *&from, const char *to)\n{\n    //qDebug() << \"parseList: \" << QByteArray(from, to - from);\n    if (*from != '[') {\n        return;\n    }\n    ++from;\n    m_type = List;\n    skipCommas(from, to);\n    while (from < to) {\n        if (*from == ']') {\n            ++from;\n            break;\n        }\n        GdbMiValue child;\n        child.parseResultOrValue(from, to);\n        if (child.isValid())\n            m_children += child;\n        skipCommas(from, to);\n    }\n}\n\nstatic QByteArray ind(int indent)\n{\n    return QByteArray(2 * indent, ' ');\n}\n\nvoid GdbMiValue::dumpChildren(QByteArray * str, bool multiline, int indent) const\n{\n    for (int i = 0; i < m_children.size(); ++i) {\n        if (i != 0) {\n            *str += ',';\n            if (multiline)\n                *str += '\\n';\n        }\n        if (multiline)\n            *str += ind(indent);\n        *str += m_children.at(i).toString(multiline, indent);\n    }\n}\n\nclass MyString : public QString {\npublic:\n    ushort at(int i) const { return constData()[i].unicode(); }\n};\n\ntemplate<class ST, typename CT>\ninline ST escapeCStringTpl(const ST &ba)\n{\n    ST ret;\n    ret.reserve(ba.length() * 2);\n    for (int i = 0; i < ba.length(); ++i) {\n        CT c = ba.at(i);\n        switch (c) {\n            case '\\\\': ret += \"\\\\\\\\\"; break;\n            case '\\a': ret += \"\\\\a\"; break;\n            case '\\b': ret += \"\\\\b\"; break;\n            case '\\f': ret += \"\\\\f\"; break;\n            case '\\n': ret += \"\\\\n\"; break;\n            case '\\r': ret += \"\\\\r\"; break;\n            case '\\t': ret += \"\\\\t\"; break;\n            case '\\v': ret += \"\\\\v\"; break;\n            case '\"': ret += \"\\\\\\\"\"; break;\n            default:\n                if (c < 32 || c == 127) {\n                    ret += '\\\\';\n                    ret += '0' + (c >> 6);\n                    ret += '0' + ((c >> 3) & 7);\n                    ret += '0' + (c & 7);\n                } else {\n                    ret += c;\n                }\n        }\n    }\n    return ret;\n}\n\nQString GdbMiValue::escapeCString(const QString &ba)\n{\n    return escapeCStringTpl<MyString, ushort>(static_cast<const MyString &>(ba));\n}\n\nQByteArray GdbMiValue::escapeCString(const QByteArray &ba)\n{\n    return escapeCStringTpl<QByteArray, uchar>(ba);\n}\n\nQByteArray GdbMiValue::toString(bool multiline, int indent) const\n{\n    QByteArray result;\n    switch (m_type) {\n        case Invalid:\n            if (multiline)\n                result += ind(indent) + \"Invalid\\n\";\n            else\n                result += \"Invalid\";\n            break;\n        case Const:\n            if (!m_name.isEmpty())\n                result += m_name + '=';\n            result += '\"' + escapeCString(m_data) + '\"';\n            break;\n        case Tuple:\n            if (!m_name.isEmpty())\n                result += m_name + '=';\n            if (multiline) {\n                result += \"{\\n\";\n                dumpChildren(&result, multiline, indent + 1);\n                result += '\\n' + ind(indent) + '}';\n            } else {\n                result += '{';\n                dumpChildren(&result, multiline, indent + 1);\n                result += '}';\n            }\n            break;\n        case List:\n            if (!m_name.isEmpty())\n                result += m_name + '=';\n            if (multiline) {\n                result += \"[\\n\";\n                dumpChildren(&result, multiline, indent + 1);\n                result += '\\n' + ind(indent) + ']';\n            } else {\n                result += '[';\n                dumpChildren(&result, multiline, indent + 1);\n                result += ']';\n            }\n            break;\n    }\n    return result;\n}\n\nvoid GdbMiValue::fromString(const QByteArray &ba)\n{\n    const char *from = ba.constBegin();\n    const char *to = ba.constEnd();\n    parseResultOrValue(from, to);\n}\n\nvoid GdbMiValue::fromStringMultiple(const QByteArray &ba)\n{\n    const char *from = ba.constBegin();\n    const char *to = ba.constEnd();\n    parseTuple_helper(from, to);\n}\n\nGdbMiValue GdbMiValue::findChild(const char *name) const\n{\n    for (int i = 0; i < m_children.size(); ++i)\n        if (m_children.at(i).m_name == name)\n            return m_children.at(i);\n    return GdbMiValue();\n}\n\nqulonglong GdbMiValue::toAddress() const\n{\n    QByteArray ba = m_data;\n    if (ba.endsWith('L'))\n        ba.chop(1);\n    if (ba.startsWith('*') || ba.startsWith('@'))\n        ba = ba.mid(1);\n    return ba.toULongLong(0, 0);\n}\n\nQByteArray GdbResponse::stringFromResultClass(GdbResultClass resultClass)\n{\n    switch (resultClass) {\n        case GdbResultDone: return \"done\";\n        case GdbResultRunning: return \"running\";\n        case GdbResultConnected: return \"connected\";\n        case GdbResultError: return \"error\";\n        case GdbResultExit: return \"exit\";\n        default: return \"unknown\";\n    }\n}\n\nQByteArray GdbResponse::toString() const\n{\n    QByteArray result;\n    if (token != -1)\n        result = QByteArray::number(token);\n    result += '^';\n    result += stringFromResultClass(resultClass);\n    if (data.isValid())\n        result += ',' + data.toString();\n    result += '\\n';\n    return result;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_gdbmi/gdbmi.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (info@qt.nokia.com)\n**\n**\n** GNU Lesser General Public License Usage\n**\n** This file may be used under the terms of the GNU Lesser General Public\n** License version 2.1 as published by the Free Software Foundation and\n** appearing in the file LICENSE.LGPL included in the packaging of this file.\n** Please review the following information to ensure the GNU Lesser General\n** Public License version 2.1 requirements will be met:\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights. These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** Other Usage\n**\n** Alternatively, this file may be used in accordance with the terms and\n** conditions contained in a signed written agreement between you and Nokia.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at info@qt.nokia.com.\n**\n**************************************************************************/\n\n#ifndef GDBMI_H\n#define GDBMI_H\n\n#include <QByteArray>\n#include <QList>\n#include <QVariant>\n\nclass GdbMiValue\n{\npublic:\n    GdbMiValue() : m_type(Invalid) {}\n\n    QByteArray m_name;\n    QByteArray m_data;\n    QList<GdbMiValue> m_children;\n\n    enum Type {\n        Invalid,\n        Const,\n        Tuple,\n        List\n    };\n\n    Type m_type;\n\n    inline Type type() const { return m_type; }\n    inline QByteArray name() const { return m_name; }\n    inline bool hasName(const char *name) const { return m_name == name; }\n\n    inline bool isValid() const { return m_type != Invalid; }\n    inline bool isConst() const { return m_type == Const; }\n    inline bool isTuple() const { return m_type == Tuple; }\n    inline bool isList() const { return m_type == List; }\n\n\n    inline QByteArray data() const { return m_data; }\n    inline const QList<GdbMiValue> &children() const { return m_children; }\n    inline int childCount() const { return m_children.size(); }\n\n    const GdbMiValue &childAt(int index) const { return m_children[index]; }\n    GdbMiValue &childAt(int index) { return m_children[index]; }\n    GdbMiValue findChild(const char *name) const;\n\n    QByteArray toString(bool multiline = false, int indent = 0) const;\n    qulonglong toAddress() const;\n    void fromString(const QByteArray &str);\n    void fromStringMultiple(const QByteArray &str);\n\npublic:\n    static QByteArray parseCString(const char *&from, const char *to);\n    static QByteArray escapeCString(const QByteArray &ba);\n    static QString escapeCString(const QString &ba);\n    void parseResultOrValue(const char *&from, const char *to);\n    void parseValue(const char *&from, const char *to);\n    void parseTuple(const char *&from, const char *to);\n    void parseTuple_helper(const char *&from, const char *to);\n    void parseList(const char *&from, const char *to);\n\n    void dumpChildren(QByteArray *str, bool multiline, int indent) const;\n};\n\nenum GdbResultClass\n{\n    // \"done\" | \"running\" | \"connected\" | \"error\" | \"exit\"\n    GdbResultUnknown,\n    GdbResultDone,\n    GdbResultRunning,\n    GdbResultConnected,\n    GdbResultError,\n    GdbResultExit\n};\n\nclass GdbResponse\n{\npublic:\n    GdbResponse() : token(-1), resultClass(GdbResultUnknown) {}\n    QByteArray toString() const;\n    static QByteArray stringFromResultClass(GdbResultClass resultClass);\n\n    int            token;\n    GdbResultClass resultClass;\n    GdbMiValue     data;\n    QVariant       cookie;\n    QByteArray     logStreamOutput;\n    QByteArray     consoleStreamOutput;\n};\n\n\n#endif // GDBMI_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_gdbmi/qtc_gdbmi.pri",
    "content": "LIBS *= -l$$qtLibraryName(qtcgdbmi)\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_gdbmi/qtc_gdbmi.pro",
    "content": "TARGET = qtcgdbmi\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude(../../liteideutils.pri)\n\nHEADERS += gdbmi.h\n\nSOURCES += gdbmi.cpp\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_itemview/itemviews.cpp",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing\r\n**\r\n** This file is part of Qt Creator.\r\n**\r\n** Commercial License Usage\r\n** Licensees holding valid commercial Qt licenses may use this file in\r\n** accordance with the commercial license agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and The Qt Company.  For licensing terms and\r\n** conditions see http://www.qt.io/terms-conditions.  For further information\r\n** use the contact form at http://www.qt.io/contact-us.\r\n**\r\n** GNU Lesser General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU Lesser\r\n** General Public License version 2.1 or version 3 as published by the Free\r\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\r\n** LICENSE.LGPLv3 included in the packaging of this file.  Please review the\r\n** following information to ensure the GNU Lesser General Public License\r\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\r\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r\n**\r\n** In addition, as a special exception, The Qt Company gives you certain additional\r\n** rights.  These rights are described in The Qt Company LGPL Exception\r\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n****************************************************************************/\r\n\r\n#include \"itemviews.h\"\r\n\r\n/*!\r\n   \\class Utils::TreeView\r\n\r\n    \\brief The TreeView adds setActivationMode to QTreeView\r\n    to allow for single click/double click behavior on\r\n    platforms where the default is different. Use with care.\r\n\r\n    Also adds sane keyboard navigation for mac.\r\n */\r\n\r\n/*!\r\n   \\class Utils::TreeWidget\r\n\r\n    \\brief The TreeWidget adds setActivationMode to QTreeWidget\r\n    to allow for single click/double click behavior on\r\n    platforms where the default is different. Use with care.\r\n\r\n    Also adds sane keyboard navigation for mac.\r\n */\r\n\r\n/*!\r\n   \\class Utils::ListView\r\n\r\n    \\brief The ListView adds setActivationMode to QListView\r\n    to allow for single click/double click behavior on\r\n    platforms where the default is different. Use with care.\r\n\r\n    Also adds sane keyboard navigation for mac.\r\n */\r\n\r\n/*!\r\n   \\class Utils::ListWidget\r\n\r\n    \\brief The ListWidget adds setActivationMode to QListWidget\r\n    to allow for single click/double click behavior on\r\n    platforms where the default is different. Use with care.\r\n\r\n    Also adds sane keyboard navigation for mac.\r\n */\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_itemview/itemviews.h",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing\r\n**\r\n** This file is part of Qt Creator.\r\n**\r\n** Commercial License Usage\r\n** Licensees holding valid commercial Qt licenses may use this file in\r\n** accordance with the commercial license agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and The Qt Company.  For licensing terms and\r\n** conditions see http://www.qt.io/terms-conditions.  For further information\r\n** use the contact form at http://www.qt.io/contact-us.\r\n**\r\n** GNU Lesser General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU Lesser\r\n** General Public License version 2.1 or version 3 as published by the Free\r\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\r\n** LICENSE.LGPLv3 included in the packaging of this file.  Please review the\r\n** following information to ensure the GNU Lesser General Public License\r\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\r\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r\n**\r\n** In addition, as a special exception, The Qt Company gives you certain additional\r\n** rights.  These rights are described in The Qt Company LGPL Exception\r\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n****************************************************************************/\r\n\r\n#ifndef TREEVIEW_H\r\n#define TREEVIEW_H\r\n\r\nstatic const char activationModeC[] = \"ActivationMode\";\r\n\r\n#include <QListView>\r\n#include <QListWidget>\r\n#include <QTreeView>\r\n#include <QTreeWidget>\r\n\r\n#include <QKeyEvent>\r\n\r\n\r\nnamespace Utils {\r\n\r\nenum ActivationMode {\r\n    DoubleClickActivation = 0,\r\n    SingleClickActivation = 1,\r\n    PlatformDefaultActivation = 2\r\n};\r\n\r\ntemplate<class BaseT>\r\nclass View : public BaseT\r\n{\r\npublic:\r\n    View(QWidget *parent = 0)\r\n        : BaseT(parent)\r\n    {}\r\n    void setActivationMode(ActivationMode mode)\r\n    {\r\n        if (mode == PlatformDefaultActivation)\r\n            BaseT::setProperty(activationModeC, QVariant());\r\n        else\r\n            BaseT::setProperty(activationModeC, QVariant(bool(mode)));\r\n    }\r\n\r\n    ActivationMode activationMode() const\r\n    {\r\n        QVariant v = BaseT::property(activationModeC);\r\n        if (!v.isValid())\r\n            return PlatformDefaultActivation;\r\n        return v.toBool() ? SingleClickActivation : DoubleClickActivation;\r\n    }\r\n\r\n    void keyPressEvent(QKeyEvent *event)\r\n    {\r\n        // Note: This always eats the event\r\n        // whereas QAbstractItemView never eats it\r\n        if ((event->key() == Qt::Key_Return\r\n                || event->key() == Qt::Key_Enter)\r\n                && event->modifiers() == 0\r\n                && BaseT::currentIndex().isValid()\r\n                && BaseT::state() != QAbstractItemView::EditingState) {\r\n            emit BaseT::activated(BaseT::currentIndex());\r\n            return;\r\n        }\r\n        BaseT::keyPressEvent(event);\r\n    }\r\n\r\n};\r\n\r\nclass TreeView : public View<QTreeView>\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    TreeView(QWidget *parent = 0)\r\n        : View<QTreeView>(parent)\r\n    {}\r\n};\r\n\r\nclass TreeWidget : public View<QTreeWidget>\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    TreeWidget(QWidget *parent = 0)\r\n        : View<QTreeWidget>(parent)\r\n    {}\r\n};\r\n\r\nclass ListView : public View<QListView>\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    ListView(QWidget *parent = 0)\r\n        : View<QListView>(parent)\r\n    {}\r\n};\r\n\r\nclass ListWidget : public View<QListWidget>\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    ListWidget(QWidget *parent = 0)\r\n        : View<QListWidget>(parent)\r\n    {}\r\n};\r\n\r\n\r\n}\r\n\r\n#endif // TREEVIEW_H\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_itemview/opendocumentstreeview.cpp",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing\r\n**\r\n** This file is part of Qt Creator.\r\n**\r\n** Commercial License Usage\r\n** Licensees holding valid commercial Qt licenses may use this file in\r\n** accordance with the commercial license agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and The Qt Company.  For licensing terms and\r\n** conditions see http://www.qt.io/terms-conditions.  For further information\r\n** use the contact form at http://www.qt.io/contact-us.\r\n**\r\n** GNU Lesser General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU Lesser\r\n** General Public License version 2.1 or version 3 as published by the Free\r\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\r\n** LICENSE.LGPLv3 included in the packaging of this file.  Please review the\r\n** following information to ensure the GNU Lesser General Public License\r\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\r\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r\n**\r\n** In addition, as a special exception, The Qt Company gives you certain additional\r\n** rights.  These rights are described in The Qt Company LGPL Exception\r\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n****************************************************************************/\r\n\r\n#include \"opendocumentstreeview.h\"\r\n\r\n#include <QApplication>\r\n#include <QHeaderView>\r\n#include <QPainter>\r\n#include <QStyledItemDelegate>\r\n\r\n#include <QDebug>\r\n\r\nnamespace Core {\r\nnamespace Internal {\r\n\r\nclass OpenDocumentsDelegate : public QStyledItemDelegate\r\n{\r\npublic:\r\n    explicit OpenDocumentsDelegate(QObject *parent = 0);\r\n\r\n    void setCloseButtonVisible(bool visible);\r\n    void handlePressed(const QModelIndex &index);\r\n    void paint(QPainter *painter, const QStyleOptionViewItem &option,\r\n               const QModelIndex &index) const;\r\n\r\n    mutable QModelIndex pressedIndex;\r\n    bool closeButtonVisible;\r\n};\r\n\r\nOpenDocumentsDelegate::OpenDocumentsDelegate(QObject *parent)\r\n : QStyledItemDelegate(parent),\r\n   closeButtonVisible(true)\r\n{\r\n}\r\n\r\nvoid OpenDocumentsDelegate::setCloseButtonVisible(bool visible)\r\n{\r\n    closeButtonVisible = visible;\r\n}\r\n\r\nvoid OpenDocumentsDelegate::handlePressed(const QModelIndex &index)\r\n{\r\n    if (index.column() == 0)\r\n        pressedIndex = index;\r\n}\r\n\r\nvoid OpenDocumentsDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,\r\n           const QModelIndex &index) const\r\n{\r\n    if (option.state & QStyle::State_MouseOver) {\r\n        if ((QApplication::mouseButtons() & Qt::LeftButton) == 0)\r\n            pressedIndex = QModelIndex();\r\n        QBrush brush = option.palette.alternateBase();\r\n        if (index == pressedIndex)\r\n            brush = option.palette.dark();\r\n        painter->fillRect(option.rect, brush);\r\n    }\r\n\r\n    QStyledItemDelegate::paint(painter, option, index);\r\n\r\n    if (closeButtonVisible && index.column() == 0 && option.state & QStyle::State_MouseOver) {\r\n        //const QIcon icon(QLatin1String((option.state & QStyle::State_Selected) ?\r\n        //                               \":/images/closebutton.png\" : \":/images/darkclosebutton.png\"));\r\n\r\n        const QIcon icon(\"icon:images/darkclosebutton.png\");\r\n\r\n        QRect iconRect(option.rect.right() - option.rect.height(),\r\n                       option.rect.top(),\r\n                       option.rect.height(),\r\n                       option.rect.height());\r\n\r\n        icon.paint(painter, iconRect, Qt::AlignRight | Qt::AlignVCenter);\r\n    }\r\n\r\n}\r\n\r\n} // namespace Internal\r\n\r\nOpenDocumentsTreeView::OpenDocumentsTreeView(QWidget *parent) :\r\n    Utils::TreeView(parent)\r\n{\r\n    m_delegate = new Internal::OpenDocumentsDelegate(this);\r\n    setItemDelegate(m_delegate);\r\n    setIndentation(0);\r\n    setUniformRowHeights(true);\r\n    setTextElideMode(Qt::ElideMiddle);\r\n    setFrameStyle(QFrame::NoFrame);\r\n    setAttribute(Qt::WA_MacShowFocusRect, false);\r\n    viewport()->setAttribute(Qt::WA_Hover);\r\n\r\n    setSelectionMode(QAbstractItemView::SingleSelection);\r\n    setSelectionBehavior(QAbstractItemView::SelectRows);\r\n    setActivationMode(Utils::SingleClickActivation);\r\n\r\n    installEventFilter(this);\r\n    viewport()->installEventFilter(this);\r\n\r\n    connect(this,SIGNAL(pressed(QModelIndex)),this,SLOT(handlePressed(QModelIndex)));\r\n}\r\n\r\nvoid OpenDocumentsTreeView::setModel(QAbstractItemModel *model)\r\n{\r\n    Utils::TreeView::setModel(model);\r\n    header()->hide();\r\n    header()->setStretchLastSection(true);\r\n//#if QT_VERSION >= 0x050000\r\n//    header()->setSectionResizeMode(0, QHeaderView::Stretch);\r\n//    //header()->setSectionResizeMode(1, QHeaderView::Fixed);\r\n//#else\r\n//    header()->setResizeMode(0,QHeaderView::Stretch);\r\n//    //header()->setResizeMode(1,QHeaderView::Fixed);\r\n//#endif\r\n    //header()->resizeSection(1, 16);\r\n}\r\n\r\nvoid OpenDocumentsTreeView::setCloseButtonVisible(bool visible)\r\n{\r\n    m_delegate->setCloseButtonVisible(visible);\r\n}\r\n\r\nbool OpenDocumentsTreeView::eventFilter(QObject *obj, QEvent *event)\r\n{\r\n    if (obj == this && event->type() == QEvent::KeyPress\r\n            && currentIndex().isValid()) {\r\n        QKeyEvent *ke = static_cast<QKeyEvent*>(event);\r\n        if ((ke->key() == Qt::Key_Delete\r\n                   || ke->key() == Qt::Key_Backspace)\r\n                && ke->modifiers() == 0) {\r\n            emit closeActivated(currentIndex());\r\n        }\r\n    } else if (obj == viewport()\r\n             && event->type() == QEvent::MouseButtonRelease) {\r\n        QMouseEvent * me = static_cast<QMouseEvent*>(event);\r\n        if (me->button() == Qt::MiddleButton\r\n                && me->modifiers() == Qt::NoModifier) {\r\n            QModelIndex index = indexAt(me->pos());\r\n            if (index.isValid()) {\r\n                emit closeActivated(index);\r\n                return true;\r\n            }\r\n        } else if (me->button() == Qt::LeftButton\r\n                   && me->modifiers() == Qt::NoModifier) {\r\n            QModelIndex index = indexAt(me->pos());\r\n            if (index.isValid()) {\r\n                QRect rc = this->visualRect(index);\r\n                QRect rc2 = QRect(rc.right()-rc.height(),rc.top(),rc.height(),rc.height());\r\n                if (rc2.contains(me->pos())) {\r\n                     emit closeActivated(index);\r\n                     return true;\r\n                }\r\n            }\r\n        }\r\n    }\r\n    return false;\r\n}\r\n\r\nvoid OpenDocumentsTreeView::handlePressed(const QModelIndex &index)\r\n{\r\n    m_delegate->handlePressed(index);\r\n}\r\n\r\n} // namespace Core\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_itemview/opendocumentstreeview.h",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing\r\n**\r\n** This file is part of Qt Creator.\r\n**\r\n** Commercial License Usage\r\n** Licensees holding valid commercial Qt licenses may use this file in\r\n** accordance with the commercial license agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and The Qt Company.  For licensing terms and\r\n** conditions see http://www.qt.io/terms-conditions.  For further information\r\n** use the contact form at http://www.qt.io/contact-us.\r\n**\r\n** GNU Lesser General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU Lesser\r\n** General Public License version 2.1 or version 3 as published by the Free\r\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\r\n** LICENSE.LGPLv3 included in the packaging of this file.  Please review the\r\n** following information to ensure the GNU Lesser General Public License\r\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\r\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r\n**\r\n** In addition, as a special exception, The Qt Company gives you certain additional\r\n** rights.  These rights are described in The Qt Company LGPL Exception\r\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n****************************************************************************/\r\n\r\n#ifndef OPENDOCUMENTSTREEVIEW_H\r\n#define OPENDOCUMENTSTREEVIEW_H\r\n\r\n#include \"itemviews.h\"\r\n\r\nnamespace Core {\r\nnamespace Internal { class OpenDocumentsDelegate; }\r\n\r\nclass OpenDocumentsTreeView : public Utils::TreeView\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    explicit OpenDocumentsTreeView(QWidget *parent = 0);\r\n\r\n    void setModel(QAbstractItemModel *model);    \r\n    void setCloseButtonVisible(bool visible);\r\n\r\nsignals:\r\n    void closeActivated(const QModelIndex &index);\r\n\r\nprotected:\r\n    bool eventFilter(QObject *obj, QEvent *event);\r\nprotected slots:\r\n    void handlePressed(const QModelIndex &index);\r\nprivate:\r\n    Internal::OpenDocumentsDelegate *m_delegate;\r\n};\r\n\r\n} // namespace Core\r\n\r\n#endif // OPENDOCUMENTSTREEVIEW_H\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_itemview/proxymodel.cpp",
    "content": "#include \"proxymodel.h\"\r\n\r\nusing namespace Core;\r\n\r\nProxyModel::ProxyModel(QObject *parent) : QAbstractProxyModel(parent)\r\n{\r\n}\r\n\r\nQModelIndex ProxyModel::mapFromSource(const QModelIndex &sourceIndex) const\r\n{\r\n    // root\r\n    if (!sourceIndex.isValid())\r\n        return QModelIndex();\r\n    // hide the <no document>\r\n    int row = sourceIndex.row() - 1;\r\n    if (row < 0)\r\n        return QModelIndex();\r\n    return createIndex(row, sourceIndex.column());\r\n}\r\n\r\nQModelIndex ProxyModel::mapToSource(const QModelIndex &proxyIndex) const\r\n{\r\n    if (!proxyIndex.isValid())\r\n        return QModelIndex();\r\n    // handle missing <no document>\r\n    return sourceModel()->index(proxyIndex.row() + 1, proxyIndex.column());\r\n}\r\n\r\nQModelIndex ProxyModel::index(int row, int column, const QModelIndex &parent) const\r\n{\r\n    if (parent.isValid() || row < 0 || row >= sourceModel()->rowCount(mapToSource(parent)) - 1\r\n            || column < 0 || column > 1)\r\n        return QModelIndex();\r\n    return createIndex(row, column);\r\n}\r\n\r\nQModelIndex ProxyModel::parent(const QModelIndex &child) const\r\n{\r\n    Q_UNUSED(child)\r\n    return QModelIndex();\r\n}\r\n\r\nint ProxyModel::rowCount(const QModelIndex &parent) const\r\n{\r\n    if (!parent.isValid())\r\n        return sourceModel()->rowCount(mapToSource(parent)) - 1;\r\n    return 0;\r\n}\r\n\r\nint ProxyModel::columnCount(const QModelIndex &parent) const\r\n{\r\n    return sourceModel()->columnCount(mapToSource(parent));\r\n}\r\n\r\nvoid ProxyModel::setSourceModel(QAbstractItemModel *sm)\r\n{\r\n    QAbstractItemModel *previousModel = sourceModel();\r\n    if (previousModel) {\r\n        disconnect(previousModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)),\r\n                   this, SLOT(sourceDataChanged(QModelIndex,QModelIndex)));\r\n        disconnect(previousModel, SIGNAL(rowsInserted(QModelIndex,int,int)),\r\n                   this, SLOT(sourceRowsInserted(QModelIndex,int,int)));\r\n        disconnect(previousModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),\r\n                   this, SLOT(sourceRowsRemoved(QModelIndex,int,int)));\r\n        disconnect(previousModel, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),\r\n                   this, SLOT(sourceRowsAboutToBeInserted(QModelIndex,int,int)));\r\n        disconnect(previousModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),\r\n                   this, SLOT(sourceRowsAboutToBeRemoved(QModelIndex,int,int)));\r\n    }\r\n    QAbstractProxyModel::setSourceModel(sm);\r\n    if (sm) {\r\n        connect(sm, SIGNAL(dataChanged(QModelIndex,QModelIndex)),\r\n                this, SLOT(sourceDataChanged(QModelIndex,QModelIndex)));\r\n        connect(sm, SIGNAL(rowsInserted(QModelIndex,int,int)),\r\n                this, SLOT(sourceRowsInserted(QModelIndex,int,int)));\r\n        connect(sm, SIGNAL(rowsRemoved(QModelIndex,int,int)),\r\n                this, SLOT(sourceRowsRemoved(QModelIndex,int,int)));\r\n        connect(sm, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),\r\n                this, SLOT(sourceRowsAboutToBeInserted(QModelIndex,int,int)));\r\n        connect(sm, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),\r\n                this, SLOT(sourceRowsAboutToBeRemoved(QModelIndex,int,int)));\r\n    }\r\n}\r\n\r\nQModelIndex ProxyModel::sibling(int row, int column, const QModelIndex &idx) const\r\n{\r\n    return QAbstractItemModel::sibling(row, column, idx);\r\n}\r\n\r\nQt::DropActions ProxyModel::supportedDragActions() const\r\n{\r\n    return sourceModel()->supportedDragActions();\r\n}\r\n\r\nvoid ProxyModel::sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)\r\n{\r\n    QModelIndex topLeftIndex = mapFromSource(topLeft);\r\n    if (!topLeftIndex.isValid())\r\n        topLeftIndex = index(0, topLeft.column());\r\n    QModelIndex bottomRightIndex = mapFromSource(bottomRight);\r\n    if (!bottomRightIndex.isValid())\r\n        bottomRightIndex = index(0, bottomRight.column());\r\n    emit dataChanged(topLeftIndex, bottomRightIndex);\r\n}\r\n\r\nvoid ProxyModel::sourceRowsRemoved(const QModelIndex &parent, int start, int end)\r\n{\r\n    Q_UNUSED(parent)\r\n    Q_UNUSED(start)\r\n    Q_UNUSED(end)\r\n    endRemoveRows();\r\n}\r\n\r\nvoid ProxyModel::sourceRowsInserted(const QModelIndex &parent, int start, int end)\r\n{\r\n    Q_UNUSED(parent)\r\n    Q_UNUSED(start)\r\n    Q_UNUSED(end)\r\n    endInsertRows();\r\n}\r\n\r\nvoid ProxyModel::sourceRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)\r\n{\r\n    int realStart = parent.isValid() || start == 0 ? start : start - 1;\r\n    int realEnd = parent.isValid() || end == 0 ? end : end - 1;\r\n    beginRemoveRows(parent, realStart, realEnd);\r\n}\r\n\r\nvoid ProxyModel::sourceRowsAboutToBeInserted(const QModelIndex &parent, int start, int end)\r\n{\r\n    int realStart = parent.isValid() || start == 0 ? start : start - 1;\r\n    int realEnd = parent.isValid() || end == 0 ? end : end - 1;\r\n    beginInsertRows(parent, realStart, realEnd);\r\n}\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_itemview/proxymodel.h",
    "content": "#ifndef PROXYMODEL_H\r\n#define PROXYMODEL_H\r\n\r\n#include <QAbstractProxyModel>\r\n\r\nnamespace Core {\r\n\r\nclass ProxyModel : public QAbstractProxyModel\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    explicit ProxyModel(QObject *parent = 0);\r\n    QModelIndex mapFromSource(const QModelIndex & sourceIndex) const;\r\n    QModelIndex mapToSource(const QModelIndex & proxyIndex) const;\r\n\r\n    QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;\r\n    QModelIndex parent(const QModelIndex &child) const;\r\n    int rowCount(const QModelIndex &parent = QModelIndex()) const;\r\n    int columnCount(const QModelIndex &parent = QModelIndex()) const;\r\n\r\n    void setSourceModel(QAbstractItemModel *sourceModel);\r\n\r\n    // QAbstractProxyModel::sibling is broken in Qt 5\r\n    QModelIndex sibling(int row, int column, const QModelIndex &idx) const;\r\n    // QAbstractProxyModel::supportedDragActions delegation is missing in Qt 5\r\n    Qt::DropActions supportedDragActions() const;\r\n\r\nprivate slots:\r\n    void sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);\r\n    void sourceRowsRemoved(const QModelIndex &parent, int start, int end);\r\n    void sourceRowsInserted(const QModelIndex &parent, int start, int end);\r\n    void sourceRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);\r\n    void sourceRowsAboutToBeInserted(const QModelIndex &parent, int start, int end);\r\n};\r\n\r\n}\r\n\r\n#endif // PROXYMODEL_H\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_itemview/qtc_itemview.pri",
    "content": "LIBS *= -l$$qtLibraryName(qtc_itemview)\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_itemview/qtc_itemview.pro",
    "content": "TARGET = qtc_itemview\r\nTEMPLATE = lib\r\n\r\nCONFIG += staticlib\r\n\r\ninclude(../../liteideutils.pri)\r\n\r\nHEADERS += \\\r\n    opendocumentstreeview.h \\\r\n    itemviews.h \\\r\n    proxymodel.h\r\n\r\nSOURCES += \\\r\n    opendocumentstreeview.cpp \\ \r\n    itemviews.cpp \\\r\n    proxymodel.cpp\r\n\r\nRESOURCES += \\\r\n    qtc_itemview.qrc\r\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_itemview/qtc_itemview.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/\">\n        <file>images/closebutton.png</file>\n        <file>images/darkclosebutton.png</file>\n    </qresource>\n</RCC>\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_searchresult/qtc_searchresult.pri",
    "content": "LIBS *= -l$$qtLibraryName(qtc_searchresult)\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_searchresult/qtc_searchresult.pro",
    "content": "TARGET = qtc_searchresult\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude(../../liteideutils.pri)\n\nHEADERS += \\ \n    searchresultcolor.h \\\n    searchresulttreeitemdelegate.h \\\n    searchresulttreeitemroles.h \\\n    searchresulttreeitems.h \\\n    searchresulttreemodel.h \\\n    searchresulttreeview.h \\\n    searchresultitem.h \\\n    searchresultitem.h \\\n    searchresultwidget.h\n\nSOURCES += \\ \n    searchresulttreeitemdelegate.cpp \\\n    searchresulttreeitems.cpp \\\n    searchresulttreemodel.cpp \\\n    searchresulttreeview.cpp \\\n    searchresultwidget.cpp\n\nRESOURCES +=\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_searchresult/searchresultcolor.h",
    "content": "#ifndef SEARCHRESULTCOLOR_H\n#define SEARCHRESULTCOLOR_H\n\n#include <QColor>\n\nnamespace Find {\nnamespace Internal {\n\nclass SearchResultColor{\npublic:\n    QColor textBackground;\n    QColor textForeground;\n    QColor highlightBackground;\n    QColor highlightForeground;\n};\n\n} // namespace Internal\n} // namespace Find\n\n#endif // SEARCHRESULTCOLOR_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_searchresult/searchresultitem.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#ifndef SEARCHRESULTITEM_H\n#define SEARCHRESULTITEM_H\n\n#include <QStringList>\n#include <QVariant>\n#include <QIcon>\n\nnamespace Find {\n\nenum AddMode {\n    AddSorted,\n    AddOrdered\n};\n\nclass SearchResultItem\n{\npublic:\n    SearchResultItem()\n        : textMarkPos(-1),\n        textMarkLength(0),\n        lineNumber(-1),\n        useTextEditorFont(false)\n    {\n    }\n\n    SearchResultItem(const SearchResultItem &other)\n        : path(other.path),\n        text(other.text),\n        textMarkPos(other.textMarkPos),\n        textMarkLength(other.textMarkLength),\n        icon(other.icon),\n        lineNumber(other.lineNumber),\n        useTextEditorFont(other.useTextEditorFont),\n        userData(other.userData)\n    {\n    }\n\n    QStringList path; // hierarchy to the parent item of this item\n    QString text; // text to show for the item itself\n    int textMarkPos; // 0-based starting position for a mark (-1 for no mark)\n    int textMarkLength; // length of the mark (0 for no mark)\n    QIcon icon; // icon to show in front of the item (by be null icon to hide)\n    int lineNumber; // (0 or -1 for no line number)\n    bool useTextEditorFont;\n    QVariant userData; // user data for identification of the item\n};\n\n//inline SearchResultItem makeResult(const QString &fileName, int lineNumber, const QString &rowText,\n//    int searchTermStart, int searchTermLength, const QVariant &userData)\n//{\n//    SearchResultItem item;\n//    item.path = QStringList() << QDir::toNativeSeparators(fileName);\n//    item.lineNumber = lineNumber;\n//    item.text = rowText;\n//    item.textMarkPos = searchTermStart;\n//    item.textMarkLength = searchTermLength;\n//    item.useTextEditorFont = true;\n//    item.userData = userData;\n//    return item;\n//}\n\n} // namespace Find\n\nQ_DECLARE_METATYPE(Find::SearchResultItem)\n\n#endif //SEARCHRESULTITEM_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_searchresult/searchresulttreeitemdelegate.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#include \"searchresulttreeitemdelegate.h\"\n#include \"searchresulttreeitemroles.h\"\n\n#include <QPainter>\n#include <QApplication>\n\n#include <QModelIndex>\n#include <QDebug>\n\nusing namespace Find::Internal;\n\nSearchResultTreeItemDelegate::SearchResultTreeItemDelegate(QObject *parent)\n  : QItemDelegate(parent)\n{\n}\n\nvoid SearchResultTreeItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const\n{\n    static const int iconSize = 16;\n\n    painter->save();\n\n    QStyleOptionViewItemV3 opt = setOptions(index, option);\n    painter->setFont(opt.font);\n\n    QItemDelegate::drawBackground(painter, opt, index);\n\n    // ---- do the layout\n    QRect checkRect;\n    QRect pixmapRect;\n    QRect textRect;\n\n    // check mark\n    bool checkable = (index.model()->flags(index) & Qt::ItemIsUserCheckable);\n    Qt::CheckState checkState = Qt::Unchecked;\n    if (checkable) {\n        QVariant checkStateData = index.data(Qt::CheckStateRole);\n        checkState = static_cast<Qt::CheckState>(checkStateData.toInt());\n#if QT_VERSION >= 0x050000\n        checkRect = doCheck(opt, opt.rect, checkStateData);\n#else // Qt4\n        checkRect = check(opt, opt.rect, checkStateData);\n#endif\n    }\n\n    // icon\n    QIcon icon = index.model()->data(index, ItemDataRoles::ResultIconRole).value<QIcon>();\n    if (!icon.isNull())\n        pixmapRect = QRect(0, 0, iconSize, iconSize);\n\n    // text\n    textRect = opt.rect.adjusted(0, 0, checkRect.width() + pixmapRect.width(), 0);\n\n    // do layout\n    doLayout(opt, &checkRect, &pixmapRect, &textRect, false);\n\n    // ---- draw the items\n    // icon\n    if (!icon.isNull())\n        QItemDelegate::drawDecoration(painter, opt, pixmapRect, icon.pixmap(iconSize));\n\n    // line numbers\n    int lineNumberAreaWidth = drawLineNumber(painter, opt, textRect, index);\n    textRect.adjust(lineNumberAreaWidth, 0, 0, 0);\n\n    // text and focus/selection\n    drawText(painter, opt, textRect, index);\n    QItemDelegate::drawFocus(painter, opt, opt.rect);\n\n    // check mark\n    if (checkable)\n        QItemDelegate::drawCheck(painter, opt, checkRect, checkState);\n\n    painter->restore();\n}\n\n// returns the width of the line number area\nint SearchResultTreeItemDelegate::drawLineNumber(QPainter *painter, const QStyleOptionViewItemV3 &option,\n                                                 const QRect &rect,\n                                                 const QModelIndex &index) const\n{\n    static const int lineNumberAreaHorizontalPadding = 4;\n    int lineNumber = index.model()->data(index, ItemDataRoles::ResultLineNumberRole).toInt();\n    if (lineNumber < 1)\n        return 0;\n    const bool isSelected = option.state & QStyle::State_Selected;\n    QString lineText = QString::number(lineNumber);\n    int minimumLineNumberDigits = qMax((int)m_minimumLineNumberDigits, lineText.count());\n    int fontWidth = painter->fontMetrics().width(QString(minimumLineNumberDigits, QLatin1Char('0')));\n    int lineNumberAreaWidth = lineNumberAreaHorizontalPadding + fontWidth + lineNumberAreaHorizontalPadding;\n    QRect lineNumberAreaRect(rect);\n    lineNumberAreaRect.setWidth(lineNumberAreaWidth);\n\n    QPalette::ColorGroup cg = QPalette::Normal;\n    if (!(option.state & QStyle::State_Active))\n        cg = QPalette::Inactive;\n    else if (!(option.state & QStyle::State_Enabled))\n        cg = QPalette::Disabled;\n\n    painter->fillRect(lineNumberAreaRect, QBrush(isSelected ?\n        option.palette.brush(cg, QPalette::Highlight) :\n        option.palette.color(cg, QPalette::Base).darker(111)));\n\n    QStyleOptionViewItemV3 opt = option;\n    opt.displayAlignment = Qt::AlignRight | Qt::AlignVCenter;\n    opt.palette.setColor(cg, QPalette::Text, Qt::darkGray);\n\n    const QStyle *style = QApplication::style();\n    const int textMargin = style->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, 0) + 1;\n\n    const QRect rowRect = lineNumberAreaRect.adjusted(-textMargin, 0, textMargin-lineNumberAreaHorizontalPadding, 0);\n    QItemDelegate::drawDisplay(painter, opt, rowRect, lineText);\n\n    return lineNumberAreaWidth;\n}\n\nvoid SearchResultTreeItemDelegate::drawText(QPainter *painter,\n                                            const QStyleOptionViewItem &option,\n                                            const QRect &rect,\n                                            const QModelIndex &index) const\n{\n    QString text = index.model()->data(index, Qt::DisplayRole).toString();\n    // show number of subresults in displayString\n    if (index.model()->hasChildren(index)) {\n        text += QLatin1String(\" (\")\n                + QString::number(index.model()->rowCount(index))\n                + QLatin1Char(')');\n    }\n\n    const int searchTermStart = index.model()->data(index, ItemDataRoles::SearchTermStartRole).toInt();\n    int searchTermLength = index.model()->data(index, ItemDataRoles::SearchTermLengthRole).toInt();\n    if (searchTermStart < 0 || searchTermStart >= text.length() || searchTermLength < 1) {\n        QItemDelegate::drawDisplay(painter, option, rect, text);\n        return;\n    }\n    // clip searchTermLength to end of line\n    searchTermLength = qMin(searchTermLength, text.length() - searchTermStart);\n    const int textMargin = QApplication::style()->pixelMetric(QStyle::PM_FocusFrameHMargin) + 1;\n    int searchTermStartPixels = painter->fontMetrics().width(text.left(searchTermStart));\n    int searchTermLengthPixels = painter->fontMetrics().width(text.mid(searchTermStart, searchTermLength));\n\n    // rects\n    QRect beforeHighlightRect(rect);\n    beforeHighlightRect.setRight(beforeHighlightRect.left() + searchTermStartPixels);\n\n    QRect resultHighlightRect(rect);\n    resultHighlightRect.setLeft(beforeHighlightRect.right());\n    resultHighlightRect.setRight(resultHighlightRect.left() + searchTermLengthPixels);\n\n    QRect afterHighlightRect(rect);\n    afterHighlightRect.setLeft(resultHighlightRect.right());\n\n    // paint all highlight backgrounds\n    // qitemdelegate has problems with painting background when highlighted\n    // (highlighted background at wrong position because text is offset with textMargin)\n    // so we duplicate a lot here, see qitemdelegate for reference\n    bool isSelected = option.state & QStyle::State_Selected;\n    QPalette::ColorGroup cg = option.state & QStyle::State_Enabled\n                              ? QPalette::Normal : QPalette::Disabled;\n    if (cg == QPalette::Normal && !(option.state & QStyle::State_Active))\n        cg = QPalette::Inactive;\n    QStyleOptionViewItem baseOption = option;\n    baseOption.state &= ~QStyle::State_Selected;\n    if (isSelected) {\n        painter->fillRect(beforeHighlightRect.adjusted(textMargin, 0, textMargin, 0),\n                          option.palette.brush(cg, QPalette::Highlight));\n        painter->fillRect(afterHighlightRect.adjusted(textMargin, 0, textMargin, 0),\n                          option.palette.brush(cg, QPalette::Highlight));\n    }\n    const QColor highlightBackground =\n            index.model()->data(index, ItemDataRoles::ResultHighlightBackgroundColor).value<QColor>();\n    painter->fillRect(resultHighlightRect.adjusted(textMargin, 0, textMargin - 1, 0), QBrush(highlightBackground));\n\n    // Text before the highlighting\n    QStyleOptionViewItem noHighlightOpt = baseOption;\n    noHighlightOpt.rect = beforeHighlightRect;\n    noHighlightOpt.textElideMode = Qt::ElideNone;\n    if (isSelected)\n        noHighlightOpt.palette.setColor(QPalette::Text, noHighlightOpt.palette.color(cg, QPalette::HighlightedText));\n    QItemDelegate::drawDisplay(painter, noHighlightOpt,\n                               beforeHighlightRect, text.mid(0, searchTermStart));\n\n    // Highlight text\n    QStyleOptionViewItem highlightOpt = noHighlightOpt;\n    const QColor highlightForeground =\n            index.model()->data(index, ItemDataRoles::ResultHighlightForegroundColor).value<QColor>();\n    highlightOpt.palette.setColor(QPalette::Text, highlightForeground);\n    QItemDelegate::drawDisplay(painter, highlightOpt, resultHighlightRect,\n                               text.mid(searchTermStart, searchTermLength));\n\n    // Text after the Highlight\n    noHighlightOpt.rect = afterHighlightRect;\n    QItemDelegate::drawDisplay(painter, noHighlightOpt, afterHighlightRect,\n                               text.mid(searchTermStart + searchTermLength));\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_searchresult/searchresulttreeitemdelegate.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#ifndef SEARCHRESULTTREEITEMDELEGATE_H\n#define SEARCHRESULTTREEITEMDELEGATE_H\n\n#include <QItemDelegate>\n\nnamespace Find {\nnamespace Internal {\n\nclass SearchResultTreeItemDelegate: public QItemDelegate\n{\npublic:\n    SearchResultTreeItemDelegate(QObject *parent = 0);\n    void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;\n\nprivate:\n    int drawLineNumber(QPainter *painter, const QStyleOptionViewItemV3 &option, const QRect &rect, const QModelIndex &index) const;\n    void drawText(QPainter *painter, const QStyleOptionViewItem &option,\n                           const QRect &rect, const QModelIndex &index) const;\n\n    static const int m_minimumLineNumberDigits = 6;\n};\n\n} // namespace Internal\n} // namespace Find\n\n#endif // SEARCHRESULTTREEITEMDELEGATE_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_searchresult/searchresulttreeitemroles.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#ifndef SEARCHRESULTTREEITEMROLES_H\n#define SEARCHRESULTTREEITEMROLES_H\n\n#include <QAbstractItemView>\n\nnamespace Find {\nnamespace Internal {\nnamespace ItemDataRoles {\n\nenum Roles\n{\n    ResultItemRole = Qt::UserRole,\n    ResultLineRole,\n    ResultLineNumberRole,\n    ResultIconRole,\n    ResultHighlightBackgroundColor,\n    ResultHighlightForegroundColor,\n    SearchTermStartRole,\n    SearchTermLengthRole,\n    IsGeneratedRole\n};\n\n} // namespace Internal\n} // namespace Find\n} // namespace ItemDataRoles\n\n#endif // SEARCHRESULTTREEITEMROLES_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_searchresult/searchresulttreeitems.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#include \"searchresulttreeitems.h\"\n\nnamespace Find {\nnamespace Internal {\n\nSearchResultTreeItem::SearchResultTreeItem(const SearchResultItem &item,\n                                           SearchResultTreeItem *parent)\n  : item(item),\n  m_parent(parent),\n  m_isUserCheckable(false),\n  m_isGenerated(false),\n  m_checkState(Qt::Unchecked)\n{\n}\n\nSearchResultTreeItem::~SearchResultTreeItem()\n{\n    clearChildren();\n}\n\nbool SearchResultTreeItem::isLeaf() const\n{\n    return childrenCount() == 0 && parent() != 0;\n}\n\nbool SearchResultTreeItem::isUserCheckable() const\n{\n    return m_isUserCheckable;\n}\n\nvoid SearchResultTreeItem::setIsUserCheckable(bool isUserCheckable)\n{\n    m_isUserCheckable = isUserCheckable;\n}\n\nQt::CheckState SearchResultTreeItem::checkState() const\n{\n    return m_checkState;\n}\n\nvoid SearchResultTreeItem::setCheckState(Qt::CheckState checkState)\n{\n    m_checkState = checkState;\n}\n\nvoid SearchResultTreeItem::clearChildren()\n{\n    qDeleteAll(m_children);\n    m_children.clear();\n}\n\nint SearchResultTreeItem::childrenCount() const\n{\n    return m_children.count();\n}\n\nint SearchResultTreeItem::rowOfItem() const\n{\n    return (m_parent ? m_parent->m_children.indexOf(const_cast<SearchResultTreeItem*>(this)):0);\n}\n\nSearchResultTreeItem* SearchResultTreeItem::childAt(int index) const\n{\n    return m_children.at(index);\n}\n\nSearchResultTreeItem *SearchResultTreeItem::parent() const\n{\n    return m_parent;\n}\n\nstatic bool lessThanByText(SearchResultTreeItem *a, const QString &b)\n{\n    return a->item.text < b;\n}\n\nint SearchResultTreeItem::insertionIndex(const QString &text, SearchResultTreeItem **existingItem) const\n{\n    QList<SearchResultTreeItem *>::const_iterator insertionPosition =\n            qLowerBound(m_children.begin(), m_children.end(), text, lessThanByText);\n    if (existingItem) {\n        if (insertionPosition != m_children.end() && (*insertionPosition)->item.text == text)\n            (*existingItem) = (*insertionPosition);\n        else\n            *existingItem = 0;\n    }\n    return insertionPosition - m_children.begin();\n}\n\nint SearchResultTreeItem::insertionIndex(const SearchResultItem &item, SearchResultTreeItem **existingItem) const\n{\n    return insertionIndex(item.text, existingItem);\n}\n\nvoid SearchResultTreeItem::insertChild(int index, SearchResultTreeItem *child)\n{\n    m_children.insert(index, child);\n}\n\nvoid SearchResultTreeItem::insertChild(int index, const SearchResultItem &item)\n{\n    SearchResultTreeItem *child = new SearchResultTreeItem(item, this);\n    if (isUserCheckable()) {\n        child->setIsUserCheckable(true);\n        child->setCheckState(Qt::Checked);\n    }\n    insertChild(index, child);\n}\n\nvoid SearchResultTreeItem::appendChild(const SearchResultItem &item)\n{\n    insertChild(m_children.count(), item);\n}\n\n} // namespace Internal\n} // namespace Find\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_searchresult/searchresulttreeitems.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#ifndef SEARCHRESULTTREEITEMS_H\n#define SEARCHRESULTTREEITEMS_H\n\n#include \"searchresultitem.h\"\n\n#include <QString>\n#include <QList>\n\nnamespace Find {\nnamespace Internal {\n\nclass SearchResultTreeItem\n{\npublic:\n    explicit SearchResultTreeItem(const SearchResultItem &item = SearchResultItem(),\n                                  SearchResultTreeItem *parent = NULL);\n    virtual ~SearchResultTreeItem();\n\n    bool isLeaf() const;\n    SearchResultTreeItem *parent() const;\n    SearchResultTreeItem *childAt(int index) const;\n    int insertionIndex(const QString &text, SearchResultTreeItem **existingItem) const;\n    int insertionIndex(const SearchResultItem &item, SearchResultTreeItem **existingItem) const;\n    void insertChild(int index, SearchResultTreeItem *child);\n    void insertChild(int index, const SearchResultItem &item);\n    void appendChild(const SearchResultItem &item);\n    int childrenCount() const;\n    int rowOfItem() const;\n    void clearChildren();\n\n    bool isUserCheckable() const;\n    void setIsUserCheckable(bool isUserCheckable);\n\n    Qt::CheckState checkState() const;\n    void setCheckState(Qt::CheckState checkState);\n\n    bool isGenerated() const { return m_isGenerated; }\n    void setGenerated(bool value) { m_isGenerated = value; }\n\n    SearchResultItem item;\n\nprivate:\n    SearchResultTreeItem *m_parent;\n    QList<SearchResultTreeItem *> m_children;\n    bool m_isUserCheckable;\n    bool m_isGenerated;\n    Qt::CheckState m_checkState;\n};\n\n} // namespace Internal\n} // namespace Find\n\n#endif // SEARCHRESULTTREEITEMS_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_searchresult/searchresulttreemodel.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#include \"searchresulttreemodel.h\"\n#include \"searchresulttreeitems.h\"\n#include \"searchresulttreeitemroles.h\"\n\n#include <QApplication>\n#include <QFont>\n#include <QFontMetrics>\n#include <QDebug>\n\nusing namespace Find;\nusing namespace Find::Internal;\n\nSearchResultTreeModel::SearchResultTreeModel(QObject *parent)\n    : QAbstractItemModel(parent)\n    , m_currentParent(0)\n    , m_showReplaceUI(false)\n    , m_editorFontIsUsed(false)\n{\n    m_rootItem = new SearchResultTreeItem;\n    m_textEditorFont = QFont(QLatin1String(\"Courier\"));\n}\n\nSearchResultTreeModel::~SearchResultTreeModel()\n{\n    delete m_rootItem;\n}\n\nvoid SearchResultTreeModel::setShowReplaceUI(bool show)\n{\n    m_showReplaceUI = show;\n}\n\nvoid SearchResultTreeModel::setTextEditorFont(const QFont &font, const SearchResultColor color)\n{\n    layoutAboutToBeChanged();\n    m_textEditorFont = font;\n    m_color = color;\n    layoutChanged();\n}\n\nQt::ItemFlags SearchResultTreeModel::flags(const QModelIndex &idx) const\n{\n    Qt::ItemFlags flags = QAbstractItemModel::flags(idx);\n\n    if (idx.isValid()) {\n        if (const SearchResultTreeItem *item = treeItemAtIndex(idx)) {\n            if (item->isUserCheckable())\n                flags |= Qt::ItemIsUserCheckable;\n        }\n    }\n\n    return flags;\n}\n\nQModelIndex SearchResultTreeModel::index(int row, int column,\n                                         const QModelIndex &parent) const\n{\n    if (!hasIndex(row, column, parent))\n        return QModelIndex();\n\n    const SearchResultTreeItem *parentItem;\n\n    if (!parent.isValid())\n        parentItem = m_rootItem;\n    else\n        parentItem = treeItemAtIndex(parent);\n\n    const SearchResultTreeItem *childItem = parentItem->childAt(row);\n    if (childItem)\n        return createIndex(row, column, (void *)childItem);\n    else\n        return QModelIndex();\n}\n\nQModelIndex SearchResultTreeModel::index(SearchResultTreeItem *item) const\n{\n    return createIndex(item->rowOfItem(), 0, (void *)item);\n}\n\nQModelIndex SearchResultTreeModel::parent(const QModelIndex &idx) const\n{\n    if (!idx.isValid())\n        return QModelIndex();\n\n    const SearchResultTreeItem *childItem = treeItemAtIndex(idx);\n    const SearchResultTreeItem *parentItem = childItem->parent();\n\n    if (parentItem == m_rootItem)\n        return QModelIndex();\n\n    return createIndex(parentItem->rowOfItem(), 0, (void *)parentItem);\n}\n\nint SearchResultTreeModel::rowCount(const QModelIndex &parent) const\n{\n    if (parent.column() > 0)\n        return 0;\n\n    const SearchResultTreeItem *parentItem;\n\n    if (!parent.isValid())\n        parentItem = m_rootItem;\n    else\n        parentItem = treeItemAtIndex(parent);\n\n    return parentItem->childrenCount();\n}\n\nint SearchResultTreeModel::columnCount(const QModelIndex &parent) const\n{\n    Q_UNUSED(parent)\n    return 1;\n}\n\nSearchResultTreeItem *SearchResultTreeModel::treeItemAtIndex(const QModelIndex &idx) const\n{\n    return static_cast<SearchResultTreeItem*>(idx.internalPointer());\n}\n\nQVariant SearchResultTreeModel::data(const QModelIndex &idx, int role) const\n{\n    if (!idx.isValid())\n        return QVariant();\n    return data(treeItemAtIndex(idx), role);\n//    QVariant result;\n\n//    if (role == Qt::SizeHintRole) {\n//        int height = QApplication::fontMetrics().height();\n//        if (m_editorFontIsUsed) {\n//            const int editorFontHeight = QFontMetrics(m_textEditorFont).height();\n//            height = qMax(height, editorFontHeight);\n//        }\n//        result = QSize(0, height);\n//    } else {\n//        result = data(treeItemAtIndex(idx), role);\n//    }\n\n//    return result;\n}\n\nbool SearchResultTreeModel::setData(const QModelIndex &idx, const QVariant &value, int role)\n{\n    if (role == Qt::CheckStateRole) {\n        Qt::CheckState checkState = static_cast<Qt::CheckState>(value.toInt());\n        return setCheckState(idx, checkState);\n    }\n    return QAbstractItemModel::setData(idx, value, role);\n}\n\nbool SearchResultTreeModel::setCheckState(const QModelIndex &idx, Qt::CheckState checkState, bool firstCall)\n{\n    SearchResultTreeItem *item = treeItemAtIndex(idx);\n    if (item->checkState() == checkState)\n        return false;\n    item->setCheckState(checkState);\n    if (firstCall) {\n        emit dataChanged(idx, idx);\n        // check parents\n        SearchResultTreeItem *currentItem = item;\n        QModelIndex currentIndex = idx;\n        while (SearchResultTreeItem *parent = currentItem->parent()) {\n            if (parent->isUserCheckable()) {\n                bool hasChecked = false;\n                bool hasUnchecked = false;\n                for (int i = 0; i < parent->childrenCount(); ++i) {\n                    SearchResultTreeItem *child = parent->childAt(i);\n                    if (!child->isUserCheckable())\n                        continue;\n                    if (child->checkState() == Qt::Checked)\n                        hasChecked = true;\n                    else if (child->checkState() == Qt::Unchecked)\n                        hasUnchecked = true;\n                    else if (child->checkState() == Qt::PartiallyChecked)\n                        hasChecked = hasUnchecked = true;\n                }\n                if (hasChecked && hasUnchecked)\n                    parent->setCheckState(Qt::PartiallyChecked);\n                else if (hasChecked)\n                    parent->setCheckState(Qt::Checked);\n                else\n                    parent->setCheckState(Qt::Unchecked);\n                emit dataChanged(idx.parent(), idx.parent());\n            }\n            currentItem = parent;\n            currentIndex = idx.parent();\n        }\n    }\n    // check children\n    if (int children = item->childrenCount()) {\n        for (int i = 0; i < children; ++i) {\n            setCheckState(idx.child(i, 0), checkState, false);\n        }\n        emit dataChanged(idx.child(0, 0), idx.child(children-1, 0));\n    }\n    return true;\n}\n\nvoid setDataInternal(const QModelIndex &index, const QVariant &value, int role);\n\nQVariant SearchResultTreeModel::data(const SearchResultTreeItem *row, int role) const\n{\n    QVariant result;\n\n    switch (role)\n    {\n    case Qt::CheckStateRole:\n        if (row->isUserCheckable())\n            result = row->checkState();\n        break;\n    case Qt::ToolTipRole:\n        result = row->item.text.trimmed();\n        break;\n    case Qt::FontRole:\n        if (row->item.useTextEditorFont)\n            result = m_textEditorFont;\n        else\n            result = QVariant();\n        break;\n//    case Qt::TextColorRole:\n//        result = m_color.textForeground;\n//        break;\n//    case Qt::BackgroundRole:\n//        result = m_color.textBackground;\n//        break;\n    case ItemDataRoles::ResultLineRole:\n    case Qt::DisplayRole:\n        result = row->item.text;\n        break;\n    case ItemDataRoles::ResultItemRole:\n        result = qVariantFromValue(row->item);\n        break;\n    case ItemDataRoles::ResultLineNumberRole:\n        result = row->item.lineNumber;\n        break;\n    case ItemDataRoles::ResultIconRole:\n        result = row->item.icon;\n        break;\n    case ItemDataRoles::ResultHighlightBackgroundColor:\n        result = m_color.highlightBackground;\n        break;\n    case ItemDataRoles::ResultHighlightForegroundColor:\n        result = m_color.highlightForeground;\n        break;\n    case ItemDataRoles::SearchTermStartRole:\n        result = row->item.textMarkPos;\n        break;\n    case ItemDataRoles::SearchTermLengthRole:\n        result = row->item.textMarkLength;\n        break;\n    case ItemDataRoles::IsGeneratedRole:\n        result = row->isGenerated();\n        break;\n    default:\n        result = QVariant();\n        break;\n    }\n\n    return result;\n}\n\nQVariant SearchResultTreeModel::headerData(int section, Qt::Orientation orientation,\n                                           int role) const\n{\n    Q_UNUSED(section)\n    Q_UNUSED(orientation)\n    Q_UNUSED(role)\n    return QVariant();\n}\n\n/**\n * Makes sure that the nodes for a specific path exist and sets\n * m_currentParent to the last final\n */\nQSet<SearchResultTreeItem *> SearchResultTreeModel::addPath(const QStringList &path)\n{\n    QSet<SearchResultTreeItem *> pathNodes;\n    SearchResultTreeItem *currentItem = m_rootItem;\n    QModelIndex currentItemIndex = QModelIndex();\n    SearchResultTreeItem *partItem = 0;\n    QStringList currentPath;\n    foreach (const QString &part, path) {\n        const int insertionIndex = currentItem->insertionIndex(part, &partItem);\n        if (!partItem) {\n            SearchResultItem item;\n            item.path = currentPath;\n            item.text = part;\n            partItem = new SearchResultTreeItem(item, currentItem);\n            if (m_showReplaceUI) {\n                partItem->setIsUserCheckable(true);\n                partItem->setCheckState(Qt::Checked);\n            }\n            partItem->setGenerated(true);\n            beginInsertRows(currentItemIndex, insertionIndex, insertionIndex);\n            currentItem->insertChild(insertionIndex, partItem);\n            endInsertRows();\n        }\n        pathNodes << partItem;\n        currentItemIndex = index(insertionIndex, 0, currentItemIndex);\n        currentItem = partItem;\n        currentPath << part;\n    }\n\n    m_currentParent = currentItem;\n    m_currentPath = currentPath;\n    m_currentIndex = currentItemIndex;\n    return pathNodes;\n}\n\nvoid SearchResultTreeModel::addResultsToCurrentParent(const QList<SearchResultItem> &items, AddMode mode)\n{\n    if (!m_currentParent)\n        return;\n\n    if (mode == AddOrdered) {\n        // this is the mode for e.g. text search\n        beginInsertRows(m_currentIndex, m_currentParent->childrenCount(), m_currentParent->childrenCount() + items.count());\n        foreach (const SearchResultItem &item, items) {\n            m_currentParent->appendChild(item);\n        }\n        endInsertRows();\n    } else if (mode == AddSorted) {\n        foreach (const SearchResultItem &item, items) {\n            SearchResultTreeItem *existingItem;\n            const int insertionIndex = m_currentParent->insertionIndex(item, &existingItem);\n            if (existingItem) {\n                existingItem->setGenerated(false);\n                existingItem->item = item;\n                QModelIndex itemIndex = m_currentIndex.child(insertionIndex, 0);\n                dataChanged(itemIndex, itemIndex);\n            } else {\n                beginInsertRows(m_currentIndex, insertionIndex, insertionIndex);\n                m_currentParent->insertChild(insertionIndex, item);\n                endInsertRows();\n            }\n        }\n    }\n    dataChanged(m_currentIndex, m_currentIndex); // Make sure that the number after the file name gets updated\n}\n\nstatic bool lessThanByPath(const SearchResultItem &a, const SearchResultItem &b)\n{\n    if (a.path.size() < b.path.size())\n        return true;\n    if (a.path.size() > b.path.size())\n        return false;\n    for (int i = 0; i < a.path.size(); ++i) {\n        if (a.path.at(i) < b.path.at(i))\n            return true;\n        if (a.path.at(i) > b.path.at(i))\n            return false;\n    }\n    return false;\n}\n\n/**\n * Adds the search result to the list of results, creating nodes for the path when\n * necessary.\n */\nQList<QModelIndex> SearchResultTreeModel::addResults(const QList<SearchResultItem> &items, AddMode mode)\n{\n    QSet<SearchResultTreeItem *> pathNodes;\n    QList<SearchResultItem> sortedItems = items;\n    qStableSort(sortedItems.begin(), sortedItems.end(), lessThanByPath);\n    QList<SearchResultItem> itemSet;\n    foreach (const SearchResultItem &item, sortedItems) {\n        m_editorFontIsUsed |= item.useTextEditorFont;\n        if (!m_currentParent || (m_currentPath != item.path)) {\n            // first add all the items from before\n            if (!itemSet.isEmpty()) {\n                addResultsToCurrentParent(itemSet, mode);\n                itemSet.clear();\n            }\n            // switch parent\n            pathNodes += addPath(item.path);\n        }\n        itemSet << item;\n    }\n    if (!itemSet.isEmpty()) {\n        addResultsToCurrentParent(itemSet, mode);\n        itemSet.clear();\n    }\n    QList<QModelIndex> pathIndices;\n    foreach (SearchResultTreeItem *item, pathNodes)\n        pathIndices << index(item);\n    return pathIndices;\n}\n\nvoid SearchResultTreeModel::clear()\n{\n    beginResetModel();\n    m_currentParent = NULL;\n    m_rootItem->clearChildren();\n    m_editorFontIsUsed = false;\n    endResetModel();\n}\n\nQModelIndex SearchResultTreeModel::nextIndex(const QModelIndex &idx, bool *wrapped) const\n{\n    if (wrapped)\n        *wrapped = false;\n    // pathological\n    if (!idx.isValid())\n        return index(0, 0);\n\n    if (rowCount(idx) > 0) {\n        // node with children\n        return idx.child(0, 0);\n    }\n    // leaf node\n    QModelIndex nextIndex;\n    QModelIndex current = idx;\n    while (!nextIndex.isValid()) {\n        int row = current.row();\n        current = current.parent();\n        if (row + 1 < rowCount(current)) {\n            // Same parent has another child\n            nextIndex = index(row + 1, 0, current);\n        } else {\n            // go up one parent\n            if (!current.isValid()) {\n                // we start from the beginning\n                if (wrapped)\n                    *wrapped = true;\n                nextIndex = index(0, 0);\n            }\n        }\n    }\n    return nextIndex;\n}\n\nQModelIndex SearchResultTreeModel::next(const QModelIndex &idx, bool includeGenerated, bool *wrapped) const\n{\n    QModelIndex value = idx;\n    do {\n        value = nextIndex(value, wrapped);\n    } while (value != idx && !includeGenerated && treeItemAtIndex(value)->isGenerated());\n    return value;\n}\n\nQModelIndex SearchResultTreeModel::prevIndex(const QModelIndex &idx, bool *wrapped) const\n{\n    if (wrapped)\n        *wrapped = false;\n    QModelIndex current = idx;\n    bool checkForChildren = true;\n    if (current.isValid()) {\n        int row = current.row();\n        if (row > 0) {\n            current = index(row - 1, 0, current.parent());\n        } else {\n            current = current.parent();\n            checkForChildren = !current.isValid();\n            if (checkForChildren && wrapped) {\n                // we start from the end\n                *wrapped = true;\n            }\n        }\n    }\n    if (checkForChildren) {\n        // traverse down the hierarchy\n        while (int rc = rowCount(current)) {\n            current = index(rc - 1, 0, current);\n        }\n    }\n    return current;\n}\n\nQModelIndex SearchResultTreeModel::prev(const QModelIndex &idx, bool includeGenerated, bool *wrapped) const\n{\n    QModelIndex value = idx;\n    do {\n        value = prevIndex(value, wrapped);\n    } while (value != idx && !includeGenerated && treeItemAtIndex(value)->isGenerated());\n    return value;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_searchresult/searchresulttreemodel.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#ifndef SEARCHRESULTTREEMODEL_H\n#define SEARCHRESULTTREEMODEL_H\n\n#include \"searchresultitem.h\"\n#include \"searchresultcolor.h\"\n\n#include <QAbstractItemModel>\n#include <QFont>\n\nnamespace Find {\nnamespace Internal {\n\nclass SearchResultTreeItem;\n\nclass SearchResultTreeModel : public QAbstractItemModel\n{\n    Q_OBJECT\n\npublic:\n    SearchResultTreeModel(QObject *parent = 0);\n    ~SearchResultTreeModel();\n\n    void setShowReplaceUI(bool show);\n    void setTextEditorFont(const QFont &font, const SearchResultColor color);\n\n    Qt::ItemFlags flags(const QModelIndex &index) const;\n    QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;\n    QModelIndex parent(const QModelIndex &child) const;\n    int rowCount(const QModelIndex &parent = QModelIndex()) const;\n    int columnCount(const QModelIndex &parent = QModelIndex()) const;\n    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;\n    bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);\n    QVariant headerData(int section, Qt::Orientation orientation, int role) const;\n\n    QModelIndex next(const QModelIndex &idx, bool includeGenerated = false, bool *wrapped = 0) const;\n    QModelIndex prev(const QModelIndex &idx, bool includeGenerated = false, bool *wrapped = 0) const;\n\n    QList<QModelIndex> addResults(const QList<SearchResultItem> &items, AddMode mode);\n\nsignals:\n    void jumpToSearchResult(const QString &fileName, int lineNumber,\n                            int searchTermStart, int searchTermLength);\n\npublic slots:\n    void clear();\n\nprivate:\n    QModelIndex index(SearchResultTreeItem *item) const;\n    void addResultsToCurrentParent(const QList<SearchResultItem> &items, AddMode mode);\n    QSet<SearchResultTreeItem *> addPath(const QStringList &path);\n    QVariant data(const SearchResultTreeItem *row, int role) const;\n    bool setCheckState(const QModelIndex &idx, Qt::CheckState checkState, bool firstCall = true);\n    QModelIndex nextIndex(const QModelIndex &idx, bool *wrapped = 0) const;\n    QModelIndex prevIndex(const QModelIndex &idx, bool *wrapped = 0) const;\n    SearchResultTreeItem *treeItemAtIndex(const QModelIndex &idx) const;\n\n    SearchResultTreeItem *m_rootItem;\n    SearchResultTreeItem *m_currentParent;\n    SearchResultColor m_color;\n    QModelIndex m_currentIndex;\n    QStringList m_currentPath; // the path that belongs to the current parent\n    QFont m_textEditorFont;\n    bool m_showReplaceUI;\n    bool m_editorFontIsUsed;\n};\n\n} // namespace Internal\n} // namespace Find\n\n#endif // SEARCHRESULTTREEMODEL_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_searchresult/searchresulttreeview.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#include \"searchresulttreeview.h\"\n#include \"searchresulttreeitemroles.h\"\n#include \"searchresulttreemodel.h\"\n#include \"searchresulttreeitemdelegate.h\"\n\n#include <QHeaderView>\n#include <QKeyEvent>\n\nnamespace Find {\nnamespace Internal {\n\nSearchResultTreeView::SearchResultTreeView(QWidget *parent)\n    : QTreeView(parent)\n    , m_model(new SearchResultTreeModel(this))\n    , m_autoExpandResults(false)\n{\n    setModel(m_model);\n    setItemDelegate(new SearchResultTreeItemDelegate(this));\n    setIndentation(14);\n    setUniformRowHeights(true);\n    setExpandsOnDoubleClick(true);\n    header()->hide();\n\n    connect(this, SIGNAL(activated(QModelIndex)), this, SLOT(emitJumpToSearchResult(QModelIndex)));\n}\n\nvoid SearchResultTreeView::setAutoExpandResults(bool expand)\n{\n    m_autoExpandResults = expand;\n}\n\nvoid SearchResultTreeView::setTextEditorFont(const QFont &font, const SearchResultColor color)\n{\n    m_model->setTextEditorFont(font, color);\n\n    QPalette p = palette();\n    p.setColor(QPalette::Base, color.textBackground);\n    setPalette(p);\n}\n\nvoid SearchResultTreeView::clear()\n{\n    m_model->clear();\n}\n\nvoid SearchResultTreeView::addResults(const QList<SearchResultItem> &items, AddMode mode)\n{\n    QList<QModelIndex> addedParents = m_model->addResults(items, mode);\n    if (m_autoExpandResults && !addedParents.isEmpty()) {\n        foreach (const QModelIndex &index, addedParents)\n            setExpanded(index, true);\n    }\n}\n\nvoid SearchResultTreeView::emitJumpToSearchResult(const QModelIndex &index)\n{\n    if (model()->data(index, ItemDataRoles::IsGeneratedRole).toBool())\n        return;\n    SearchResultItem item = model()->data(index, ItemDataRoles::ResultItemRole).value<SearchResultItem>();\n\n    emit jumpToSearchResult(item);\n}\n\nvoid SearchResultTreeView::keyPressEvent(QKeyEvent *e)\n{\n    if (!e->modifiers() && e->key() == Qt::Key_Return) {\n        emit activated(currentIndex());\n        e->accept();\n        return;\n    }\n    QTreeView::keyPressEvent(e);\n}\n\nSearchResultTreeModel *SearchResultTreeView::model() const\n{\n    return m_model;\n}\n\n} // namespace Internal\n} // namespace Find\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_searchresult/searchresulttreeview.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#ifndef SEARCHRESULTTREEVIEW_H\n#define SEARCHRESULTTREEVIEW_H\n\n#include \"searchresultitem.h\"\n\n#include <QTreeView>\n\nnamespace Find {\nnamespace Internal {\n\nclass SearchResultTreeModel;\nclass SearchResultColor;\n\nclass SearchResultTreeView : public QTreeView\n{\n    Q_OBJECT\n\npublic:\n    explicit SearchResultTreeView(QWidget *parent = 0);\n\n    void setAutoExpandResults(bool expand);\n    void setTextEditorFont(const QFont &font, const SearchResultColor color);\n\n    SearchResultTreeModel *model() const;\n    void addResults(const QList<SearchResultItem> &items, AddMode mode);\n\nsignals:\n    void jumpToSearchResult(const SearchResultItem &item);\n\npublic slots:\n    void clear();\n    void emitJumpToSearchResult(const QModelIndex &index);\n\nprotected:\n    void keyPressEvent(QKeyEvent *e);\n\n    SearchResultTreeModel *m_model;\n    bool m_autoExpandResults;\n};\n\n} // namespace Internal\n} // namespace Find\n\n#endif // SEARCHRESULTTREEVIEW_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_searchresult/searchresultwidget.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#include \"searchresultwidget.h\"\n#include \"searchresulttreeview.h\"\n#include \"searchresulttreemodel.h\"\n#include \"searchresulttreeitems.h\"\n#include \"searchresulttreeitemroles.h\"\n\n//#include \"treeviewfind.h\"\n\n//#include <aggregation/aggregate.h>\n\n#include <QDir>\n#include <QFrame>\n#include <QLabel>\n#include <QLineEdit>\n#include <QToolButton>\n#include <QCheckBox>\n#include <QVBoxLayout>\n#include <QHBoxLayout>\n#include <QToolBar>\n\nstatic const int SEARCHRESULT_WARNING_LIMIT = 200000;\nstatic const char SIZE_WARNING_ID[] = \"sizeWarningLabel\";\n\nnamespace Find {\nnamespace Internal {\n\nclass WideEnoughLineEdit : public QLineEdit {\n    Q_OBJECT\npublic:\n    WideEnoughLineEdit(QWidget *parent):QLineEdit(parent){\n        connect(this, SIGNAL(textChanged(QString)),\n                this, SLOT(updateGeometry()));\n    }\n    ~WideEnoughLineEdit(){}\n    QSize sizeHint() const {\n        QSize sh = QLineEdit::minimumSizeHint();\n        sh.rwidth() += qMax(25 * fontMetrics().width(QLatin1Char('x')),\n                            fontMetrics().width(text()));\n        return sh;\n    }\npublic slots:\n    void updateGeometry() { QLineEdit::updateGeometry(); }\n};\n\n} // Internal\n} // Find\n\nusing namespace Find;\nusing namespace Find::Internal;\n\nSearchResultWidget::SearchResultWidget(QWidget *parent) :\n    QWidget(parent),\n    m_count(0),\n    m_isShowingReplaceUI(false),\n    m_searchAgainSupported(false),\n    m_preserveCaseSupported(false),\n    m_cancelSupported(true)\n{\n    QVBoxLayout *layout = new QVBoxLayout(this);\n    layout->setMargin(2);\n    layout->setSpacing(1);\n    setLayout(layout);\n\n    QFrame *topWidget = new QFrame;\n//    QPalette pal = topWidget->palette();\n//    pal.setColor(QPalette::Window, QColor(255, 255, 225));\n//    pal.setColor(QPalette::WindowText, Qt::black);\n//    topWidget->setPalette(pal);\n    topWidget->setFrameStyle(QFrame::Panel);// | QFrame::Raised);\n    topWidget->setLineWidth(0);\n    //topWidget->setAutoFillBackground(true);\n    QHBoxLayout *topLayout = new QHBoxLayout(topWidget);\n    topLayout->setMargin(0);\n    topWidget->setLayout(topLayout);\n    layout->addWidget(topWidget);\n\n    m_infoWidget = new QFrame;\n//    pal = m_infoWidget->palette();\n//    pal.setColor(QPalette::Window, QColor(255, 255, 225));\n//    pal.setColor(QPalette::WindowText, Qt::black);\n//    m_infoWidget->setPalette(pal);\n    m_infoWidget->setFrameStyle(QFrame::Panel);// | QFrame::Raised);\n    m_infoWidget->setLineWidth(0);\n    //m_infoWidget->setAutoFillBackground(true);\n\n    QHBoxLayout *infoLayout = new QHBoxLayout(m_infoWidget);\n    infoLayout->setMargin(2);\n    m_infoLabel = new QLabel();\n    infoLayout->addWidget(m_infoLabel);\n    layout->addWidget(m_infoWidget);\n\n\n    m_messageWidget = new QFrame;\n//    pal.setColor(QPalette::Window, QColor(255, 255, 225));\n//    pal.setColor(QPalette::WindowText, Qt::red);\n//    m_messageWidget->setPalette(pal);\n    m_messageWidget->setFrameStyle(QFrame::Panel);// | QFrame::Raised);\n    m_messageWidget->setLineWidth(0);\n    //m_messageWidget->setAutoFillBackground(true);\n    QHBoxLayout *messageLayout = new QHBoxLayout(m_messageWidget);\n    messageLayout->setMargin(2);\n    m_messageWidget->setLayout(messageLayout);\n    QLabel *messageLabel = new QLabel(tr(\"Search was canceled.\"));\n    //messageLabel->setPalette(pal);\n    messageLayout->addWidget(messageLabel);\n    layout->addWidget(m_messageWidget);\n    m_messageWidget->setVisible(false);\n\n    m_searchResultTreeView = new Internal::SearchResultTreeView(this);\n    //m_searchResultTreeView->setFrameStyle(QFrame::NoFrame);\n    //m_searchResultTreeView->setAttribute(Qt::WA_MacShowFocusRect, false);\n//    Aggregation::Aggregate * agg = new Aggregation::Aggregate;\n//    agg->add(m_searchResultTreeView);\n//    agg->add(new TreeViewFind(m_searchResultTreeView,\n//                              ItemDataRoles::ResultLineRole));\n    layout->addWidget(m_searchResultTreeView);\n\n//    m_infoBarDisplay.setTarget(layout, 2);\n//    m_infoBarDisplay.setInfoBar(&m_infoBar);\n\n    m_descriptionContainer = new QWidget(topWidget);\n    QHBoxLayout *descriptionLayout = new QHBoxLayout(m_descriptionContainer);\n    m_descriptionContainer->setLayout(descriptionLayout);\n    descriptionLayout->setMargin(0);\n    m_descriptionContainer->setMinimumWidth(200);\n    m_descriptionContainer->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);\n    m_label = new QLabel(m_descriptionContainer);\n    m_label->setVisible(false);\n    m_searchTerm = new QLabel(m_descriptionContainer);\n    m_searchTerm->setVisible(false);\n    descriptionLayout->addWidget(m_label);\n    descriptionLayout->addWidget(m_searchTerm);\n    m_cancelButton = new QToolButton(topWidget);\n    m_cancelButton->setText(tr(\"Cancel\"));\n    m_cancelButton->setToolButtonStyle(Qt::ToolButtonTextOnly);\n    connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));\n    m_searchAgainButton = new QToolButton(topWidget);\n    m_searchAgainButton->setToolTip(tr(\"Repeat the search with same parameters\"));\n    m_searchAgainButton->setText(tr(\"Search again\"));\n    m_searchAgainButton->setToolButtonStyle(Qt::ToolButtonTextOnly);\n    m_searchAgainButton->setVisible(false);\n    connect(m_searchAgainButton, SIGNAL(clicked()), this, SLOT(searchAgain()));\n\n    m_showReplaceModeButton = new QToolButton(topWidget);\n    m_showReplaceModeButton->setToolTip(tr(\"Set show replace mode ui\"));\n    m_showReplaceModeButton->setText(tr(\"Show Replace\"));\n    m_showReplaceModeButton->setToolButtonStyle(Qt::ToolButtonTextOnly);\n    m_showReplaceModeButton->setVisible(false);\n    connect(m_showReplaceModeButton,SIGNAL(clicked()),this,SLOT(showReplaceMode()));\n\n    m_replaceLabel = new QLabel(tr(\"Replace with:\"), topWidget);\n    m_replaceTextEdit = new WideEnoughLineEdit(topWidget);\n    m_replaceTextEdit->setMinimumWidth(120);\n    m_replaceTextEdit->setEnabled(false);\n    m_replaceTextEdit->setTabOrder(m_replaceTextEdit, m_searchResultTreeView);\n    m_replaceButton = new QToolButton(topWidget);\n    m_replaceButton->setToolTip(tr(\"Replace all occurrences\"));\n    m_replaceButton->setText(tr(\"Replace\"));\n    m_replaceButton->setToolButtonStyle(Qt::ToolButtonTextOnly);\n    m_replaceButton->setEnabled(false);\n    m_preserveCaseCheck = new QCheckBox(topWidget);\n    m_preserveCaseCheck->setText(tr(\"Preserve case\"));\n    m_preserveCaseCheck->setEnabled(false);\n\n//    if (FindPlugin * plugin = FindPlugin::instance()) {\n//        m_preserveCaseCheck->setChecked(plugin->hasFindFlag(FindPreserveCase));\n//        connect(m_preserveCaseCheck, SIGNAL(clicked(bool)), plugin, SLOT(setPreserveCase(bool)));\n//    }\n\n    m_matchesFoundLabel = new QLabel(topWidget);\n    endMatchesFoundLabel();\n\n    m_expandAll = new QToolButton;\n    m_expandAll->setText(\"+\");\n    m_expandAll->setToolTip(tr(\"Expand all items\"));\n    connect(m_expandAll,SIGNAL(clicked()),this,SLOT(expandAll()));\n\n    m_collapseAll = new QToolButton;\n    m_collapseAll->setText(\"-\");\n    m_collapseAll->setToolTip(tr(\"Collapse all items\"));\n    connect(m_collapseAll,SIGNAL(clicked()),this,SLOT(collapseAll()));\n\n    topLayout->addWidget(m_expandAll);\n    topLayout->addWidget(m_collapseAll);\n\n\n    topLayout->addWidget(m_descriptionContainer);\n    topLayout->addWidget(m_cancelButton);\n    topLayout->addWidget(m_searchAgainButton);\n    topLayout->addWidget(m_showReplaceModeButton);\n    topLayout->addWidget(m_replaceLabel);\n    topLayout->addWidget(m_replaceTextEdit);\n    topLayout->addWidget(m_replaceButton);\n    topLayout->addWidget(m_preserveCaseCheck);\n    topLayout->addStretch(2);\n    topLayout->addWidget(m_matchesFoundLabel);\n    topWidget->setMinimumHeight(m_cancelButton->sizeHint().height()\n                                + topLayout->contentsMargins().top() + topLayout->contentsMargins().bottom()\n                                + topWidget->lineWidth());\n    setShowReplaceUI(false);\n\n    connect(m_searchResultTreeView, SIGNAL(jumpToSearchResult(SearchResultItem)),\n            this, SLOT(handleJumpToSearchResult(SearchResultItem)));\n    connect(m_replaceTextEdit, SIGNAL(returnPressed()), this, SLOT(handleReplaceButton()));\n    connect(m_replaceButton, SIGNAL(clicked()), this, SLOT(handleReplaceButton()));\n}\n\nSearchResultWidget::~SearchResultWidget()\n{\n//    if (m_infoBar.containsInfo(Core::Id(SIZE_WARNING_ID)))\n//        cancelAfterSizeWarning();\n}\n\nvoid SearchResultWidget::setInfo(const QString &label, const QString &toolTip, const QString &term)\n{\n    m_label->setText(label);\n    m_label->setVisible(!label.isEmpty());\n    m_descriptionContainer->setToolTip(toolTip);\n    m_searchTerm->setText(term);\n    m_searchTerm->setVisible(!term.isEmpty());\n}\n\nQString SearchResultWidget::searchText() const\n{\n    return m_searchTerm->text();\n}\n\nvoid SearchResultWidget::addResult(const QString &fileName, int lineNumber, const QString &rowText,\n    int searchTermStart, int searchTermLength, const QVariant &userData)\n{\n    SearchResultItem item;\n    item.path = QStringList() << QDir::toNativeSeparators(fileName);\n    item.lineNumber = lineNumber;\n    item.text = rowText;\n    item.textMarkPos = searchTermStart;\n    item.textMarkLength = searchTermLength;\n    item.useTextEditorFont = true;\n    item.userData = userData;\n    addResults(QList<SearchResultItem>() << item, AddOrdered);\n}\n\nvoid SearchResultWidget::addResults(const QList<SearchResultItem> &items, AddMode mode, bool revert)\n{\n    bool firstItems = (m_count == 0);\n    m_count += items.size();\n    m_searchResultTreeView->addResults(items, mode);\n    updateMatchesFoundLabel(revert);\n    if (firstItems) {\n//        if (!m_dontAskAgainGroup.isEmpty()) {\n//            Core::Id undoWarningId = Core::Id(\"warninglabel/\").withSuffix(m_dontAskAgainGroup);\n//            if (m_infoBar.canInfoBeAdded(undoWarningId)) {\n//                Core::InfoBarEntry info(undoWarningId, tr(\"This change cannot be undone.\"),\n//                                        Core::InfoBarEntry::GlobalSuppressionEnabled);\n//                m_infoBar.addInfo(info);\n//            }\n//        }\n\n        m_replaceTextEdit->setEnabled(true);\n        // We didn't have an item before, set the focus to the search widget or replace text edit\n        if (m_isShowingReplaceUI) {\n            m_replaceTextEdit->setFocus();\n            m_replaceTextEdit->selectAll();\n        } else {\n            m_searchResultTreeView->setFocus();\n        }\n        m_searchResultTreeView->selectionModel()->select(m_searchResultTreeView->model()->index(0, 0, QModelIndex()), QItemSelectionModel::Select);\n        emit navigateStateChanged();\n    } else if (m_count <= SEARCHRESULT_WARNING_LIMIT) {\n        return;\n    } else {\n//        Core::Id sizeWarningId(SIZE_WARNING_ID);\n//        if (!m_infoBar.canInfoBeAdded(sizeWarningId))\n//            return;\n//        emit paused(true);\n//        Core::InfoBarEntry info(sizeWarningId,\n//                                tr(\"The search resulted in more than %n items, do you still want to continue?\",\n//                                0, SEARCHRESULT_WARNING_LIMIT));\n//        info.setCancelButtonInfo(tr(\"Cancel\"), this, SLOT(cancelAfterSizeWarning()));\n//        info.setCustomButtonInfo(tr(\"Continue\"), this, SLOT(continueAfterSizeWarning()));\n//        m_infoBar.addInfo(info);\n//        emit requestPopup(false/*no focus*/);\n    }\n}\n\nvoid SearchResultWidget::setRevertMode(const QString &replaceText, const QString &searchText)\n{\n    m_searchTerm->setText(replaceText);\n    this->setTextToReplace(searchText);\n    this->m_replaceLabel->setText(tr(\"Revert with:\"));\n    this->m_replaceButton->setText(tr(\"Revert\"));\n    this->m_replaceButton->setToolTip(tr(\"Revert all occurrences\"));\n}\n\nint SearchResultWidget::count() const\n{\n    return m_count;\n}\n\nQString SearchResultWidget::dontAskAgainGroup() const\n{\n    return m_dontAskAgainGroup;\n}\n\nvoid SearchResultWidget::setDontAskAgainGroup(const QString &group)\n{\n    m_dontAskAgainGroup = group;\n}\n\n\nvoid SearchResultWidget::setTextToReplace(const QString &textToReplace)\n{\n    m_replaceTextEdit->setText(textToReplace);\n}\n\nQString SearchResultWidget::textToReplace() const\n{\n    return m_replaceTextEdit->text();\n}\n\nvoid SearchResultWidget::setShowReplaceUI(bool visible)\n{\n    m_searchResultTreeView->model()->setShowReplaceUI(visible);\n    m_replaceLabel->setVisible(visible);\n    m_replaceTextEdit->setVisible(visible);\n    m_replaceButton->setVisible(visible);\n    m_preserveCaseCheck->setVisible(m_preserveCaseSupported && visible);\n    m_isShowingReplaceUI = visible;\n    m_infoWidget->setVisible(visible);\n    m_showReplaceModeButton->setVisible(false);\n}\n\nvoid SearchResultWidget::setReadOnly(bool readOnly) {\n    m_isReadOnly = readOnly;\n}\n\nvoid SearchResultWidget::setInfoWidgetLabel(const QString &infoText)\n{\n    m_infoLabel->setText(infoText);\n}\n\nbool SearchResultWidget::hasFocusInternally() const\n{\n    return m_searchResultTreeView->hasFocus() || (m_isShowingReplaceUI && m_replaceTextEdit->hasFocus());\n}\n\nvoid SearchResultWidget::setFocusInternally()\n{\n    if (m_count > 0) {\n        if (m_isShowingReplaceUI) {\n            if (!focusWidget() || focusWidget() == m_replaceTextEdit) {\n                m_replaceTextEdit->setFocus();\n                m_replaceTextEdit->selectAll();\n            } else {\n                m_searchResultTreeView->setFocus();\n            }\n        } else {\n            m_searchResultTreeView->setFocus();\n        }\n    }\n}\n\nbool SearchResultWidget::canFocusInternally() const\n{\n    return m_count > 0;\n}\n\nvoid SearchResultWidget::notifyVisibilityChanged(bool visible)\n{\n    emit visibilityChanged(visible);\n}\n\nvoid SearchResultWidget::setTextEditorFont(const QFont &font, const SearchResultColor color)\n{\n    m_searchResultTreeView->setTextEditorFont(font, color);\n}\n\nvoid SearchResultWidget::setAutoExpandResults(bool expand)\n{\n    m_searchResultTreeView->setAutoExpandResults(expand);\n}\n\nvoid SearchResultWidget::goToNext()\n{\n    if (m_count == 0)\n        return;\n    QModelIndex idx = m_searchResultTreeView->model()->next(m_searchResultTreeView->currentIndex());\n    if (idx.isValid()) {\n        m_searchResultTreeView->setCurrentIndex(idx);\n        m_searchResultTreeView->emitJumpToSearchResult(idx);\n    }\n}\n\nvoid SearchResultWidget::goToPrevious()\n{\n    if (!m_searchResultTreeView->model()->rowCount())\n        return;\n    QModelIndex idx = m_searchResultTreeView->model()->prev(m_searchResultTreeView->currentIndex());\n    if (idx.isValid()) {\n        m_searchResultTreeView->setCurrentIndex(idx);\n        m_searchResultTreeView->emitJumpToSearchResult(idx);\n    }\n}\n\nvoid SearchResultWidget::restart()\n{\n    m_replaceTextEdit->setEnabled(false);\n    m_replaceButton->setEnabled(false);\n    m_searchResultTreeView->clear();\n    m_count = 0;\n//    Core::Id sizeWarningId(SIZE_WARNING_ID);\n//    m_infoBar.removeInfo(sizeWarningId);\n//    m_infoBar.enableInfo(sizeWarningId);\n    m_cancelButton->setVisible(m_cancelSupported);\n    m_searchAgainButton->setVisible(false);\n    m_messageWidget->setVisible(false);\n    m_replaceLabel->setText(tr(\"Replace with:\"));\n    m_replaceButton->setToolTip(tr(\"Replace all occurrences\"));\n    m_replaceButton->setText(tr(\"Replace\"));\n    //updateMatchesFoundLabel();\n    beginMatchesFoundLabel();\n    emit restarted();\n}\n\nvoid SearchResultWidget::clear()\n{\n    m_searchResultTreeView->clear();\n    m_count = 0;\n    endMatchesFoundLabel();\n}\n\nvoid SearchResultWidget::setCancelSupported(bool supported)\n{\n    m_cancelSupported = supported;\n}\n\nvoid SearchResultWidget::setSearchAgainSupported(bool supported)\n{\n    m_searchAgainSupported = supported;\n    m_searchAgainButton->setVisible(supported && !m_cancelButton->isVisible());\n}\n\nvoid SearchResultWidget::setSearchAgainEnabled(bool enabled)\n{\n    m_searchAgainButton->setEnabled(enabled);\n}\n\nvoid SearchResultWidget::setPreserveCaseSupported(bool supported)\n{\n    m_preserveCaseSupported = supported;\n    m_preserveCaseCheck->setVisible(supported);\n}\n\nvoid SearchResultWidget::finishSearch(bool canceled)\n{\n    endMatchesFoundLabel();\n    m_replaceTextEdit->setEnabled(m_count > 0);\n    m_replaceButton->setEnabled(m_count > 0);\n    m_preserveCaseCheck->setEnabled(m_count > 0);\n    m_cancelButton->setVisible(false);\n    m_messageWidget->setVisible(canceled);\n    m_searchAgainButton->setVisible(m_searchAgainSupported);\n    m_showReplaceModeButton->setVisible(!this->m_isShowingReplaceUI && !canceled && m_count > 0 && !m_isReadOnly);\n}\n\nvoid SearchResultWidget::sendRequestPopup()\n{\n    emit requestPopup(true/*focus*/);\n}\n\nvoid SearchResultWidget::continueAfterSizeWarning()\n{\n    //m_infoBar.suppressInfo(Core::Id(SIZE_WARNING_ID));\n    emit paused(false);\n}\n\nvoid SearchResultWidget::cancelAfterSizeWarning()\n{\n    //m_infoBar.suppressInfo(Core::Id(SIZE_WARNING_ID));\n    emit cancelled();\n    emit paused(false);\n}\n\nvoid SearchResultWidget::handleJumpToSearchResult(const SearchResultItem &item)\n{\n    emit activated(item);\n}\n\nvoid SearchResultWidget::handleReplaceButton()\n{\n    // check if button is actually enabled, because this is also triggered\n    // by pressing return in replace line edit\n    if (m_replaceButton->isEnabled()) {\n        //m_infoBar.clear();\n        emit replaceButtonClicked(m_replaceTextEdit->text(), checkedItems(), m_preserveCaseCheck->isChecked());\n    }\n}\n\nvoid SearchResultWidget::cancel()\n{\n    m_cancelButton->setVisible(false);\n//    if (m_infoBar.containsInfo(Core::Id(SIZE_WARNING_ID)))\n//        cancelAfterSizeWarning();\n//    else\n        emit cancelled();\n}\n\nvoid SearchResultWidget::searchAgain()\n{\n    emit searchAgainRequested();\n}\n\nvoid SearchResultWidget::expandAll()\n{\n   m_searchResultTreeView->expandAll();\n   m_searchResultTreeView->repaint();\n}\n\nvoid SearchResultWidget::collapseAll()\n{\n    m_searchResultTreeView->collapseAll();\n    m_searchResultTreeView->repaint();\n}\n\nvoid SearchResultWidget::showReplaceMode()\n{\n    this->setShowReplaceUI(true);\n    Internal::SearchResultTreeModel *model = m_searchResultTreeView->model();\n    const int fileCount = model->rowCount(QModelIndex());\n    for (int i = 0; i < fileCount; ++i) {\n        QModelIndex fileIndex = model->index(i, 0, QModelIndex());\n        Internal::SearchResultTreeItem *fileItem = static_cast<Internal::SearchResultTreeItem *>(fileIndex.internalPointer());\n        fileItem->setIsUserCheckable(true);\n        fileItem->setCheckState(Qt::Checked);\n        for (int rowIndex = 0; rowIndex < fileItem->childrenCount(); ++rowIndex) {\n            QModelIndex textIndex = model->index(rowIndex, 0, fileIndex);\n            Internal::SearchResultTreeItem *rowItem = static_cast<Internal::SearchResultTreeItem *>(textIndex.internalPointer());\n            rowItem->setIsUserCheckable(true);\n            rowItem->setCheckState(Qt::Checked);\n        }\n    }\n    this->m_replaceTextEdit->setFocus();\n    this->m_searchResultTreeView->repaint();\n}\n\nQList<SearchResultItem> SearchResultWidget::checkedItems() const\n{\n    QList<SearchResultItem> result;\n    Internal::SearchResultTreeModel *model = m_searchResultTreeView->model();\n    const int fileCount = model->rowCount(QModelIndex());\n    for (int i = 0; i < fileCount; ++i) {\n        QModelIndex fileIndex = model->index(i, 0, QModelIndex());\n        Internal::SearchResultTreeItem *fileItem = static_cast<Internal::SearchResultTreeItem *>(fileIndex.internalPointer());\n        Q_ASSERT(fileItem != 0);\n        for (int rowIndex = 0; rowIndex < fileItem->childrenCount(); ++rowIndex) {\n            QModelIndex textIndex = model->index(rowIndex, 0, fileIndex);\n            Internal::SearchResultTreeItem *rowItem = static_cast<Internal::SearchResultTreeItem *>(textIndex.internalPointer());\n            if (rowItem->checkState())\n                result << rowItem->item;\n        }\n    }\n    return result;\n}\n\nvoid SearchResultWidget::updateMatchesFoundLabel(bool revert)\n{\n    if (revert) {\n        m_matchesFoundLabel->setText(tr(\"%n matches replaced.\", 0, m_count));\n    } else {\n        m_matchesFoundLabel->setText(tr(\"searching... %n matches found.\", 0, m_count));\n    }\n}\n\nvoid SearchResultWidget::beginMatchesFoundLabel()\n{\n    m_matchesFoundLabel->setText(tr(\"searching ...\"));\n}\n\nvoid SearchResultWidget::endMatchesFoundLabel()\n{\n    if (m_count == 0)\n        m_matchesFoundLabel->setText(tr(\"No matches found.\"));\n    else\n        m_matchesFoundLabel->setText(tr(\"%n matches found.\", 0, m_count));\n}\n\n#include \"searchresultwidget.moc\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_searchresult/searchresultwidget.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#ifndef SEARCHRESULTWIDGET_H\n#define SEARCHRESULTWIDGET_H\n\n#include \"searchresultitem.h\"\n\n//#include <coreplugin/infobar.h>\n\n#include <QWidget>\n\nQT_BEGIN_NAMESPACE\nclass QFrame;\nclass QLabel;\nclass QLineEdit;\nclass QToolButton;\nclass QCheckBox;\nQT_END_NAMESPACE\n\nnamespace Find {\nnamespace Internal {\n\nclass SearchResultTreeView;\nclass SearchResultColor;\n\nclass SearchResultWidget : public QWidget\n{\n    Q_OBJECT\npublic:\n    explicit SearchResultWidget(QWidget *parent = 0);\n    ~SearchResultWidget();\n\n    void setInfo(const QString &label, const QString &toolTip, const QString &term);\n    QString searchText() const;\n\n    void addResult(const QString &fileName, int lineNumber, const QString &lineText,\n                   int searchTermStart, int searchTermLength, const QVariant &userData = QVariant());\n    void addResults(const QList<SearchResultItem> &items, AddMode mode, bool revert = false);\n\n    void setRevertMode(const QString &replaceText, const QString &searchText);\n\n    int count() const;\n\n    QString dontAskAgainGroup() const;\n    void setDontAskAgainGroup(const QString &group);\n\n    void setTextToReplace(const QString &textToReplace);\n    QString textToReplace() const;\n    void setShowReplaceUI(bool visible);\n    void setReadOnly(bool readOnly);\n\n    void setInfoWidgetLabel(const QString &infoText);\n\n    bool hasFocusInternally() const;\n    void setFocusInternally();\n    bool canFocusInternally() const;\n\n    void notifyVisibilityChanged(bool visible);\n\n    void setTextEditorFont(const QFont &font, const SearchResultColor color);\n\n    void setAutoExpandResults(bool expand);\n\n    void goToNext();\n    void goToPrevious();\n\n    void restart();\n    void clear();\n\n    void setCancelSupported(bool supported);\n    void setSearchAgainSupported(bool supported);\n    void setSearchAgainEnabled(bool enabled);\n    void setPreserveCaseSupported(bool enabled);\npublic slots:\n    void finishSearch(bool canceled);\n    void sendRequestPopup();\n\nsignals:\n    void activated(const Find::SearchResultItem &item);\n    void replaceButtonClicked(const QString &replaceText, const QList<Find::SearchResultItem> &checkedItems, bool preserveCase);\n    void searchAgainRequested();\n    void cancelled();\n    void paused(bool paused);\n    void restarted();\n    void visibilityChanged(bool visible);\n    void requestPopup(bool focus);\n\n    void navigateStateChanged();\n\nprivate slots:\n    void continueAfterSizeWarning();\n    void cancelAfterSizeWarning();\n    void handleJumpToSearchResult(const SearchResultItem &item);\n    void handleReplaceButton();\n    void cancel();\n    void searchAgain();\n    void showReplaceMode();\n    void expandAll();\n    void collapseAll();\nprivate:\n    QList<SearchResultItem> checkedItems() const;\n    void updateMatchesFoundLabel(bool revert);\n    void beginMatchesFoundLabel();\n    void endMatchesFoundLabel();\n\n    SearchResultTreeView *m_searchResultTreeView;\n    int m_count;\n    QString m_dontAskAgainGroup;\n    QFrame *m_messageWidget;\n//    Core::InfoBar m_infoBar;\n//    Core::InfoBarDisplay m_infoBarDisplay;\n    QLabel *m_replaceLabel;\n    QLineEdit *m_replaceTextEdit;\n    QToolButton *m_replaceButton;\n    QToolButton *m_searchAgainButton;\n    QCheckBox *m_preserveCaseCheck;\n    QToolButton *m_showReplaceModeButton;\n    bool m_isShowingReplaceUI;\n    bool m_isReadOnly;\n    bool m_searchAgainSupported;\n    bool m_preserveCaseSupported;\n    bool m_cancelSupported;\n    QWidget *m_descriptionContainer;\n    QLabel *m_label;\n    QLabel *m_searchTerm;\n    QToolButton *m_cancelButton;\n    QLabel *m_matchesFoundLabel;\n    QFrame *m_infoWidget;\n    QLabel *m_infoLabel;\n    QToolButton *m_collapseAll;\n    QToolButton *m_expandAll;\n};\n\n} // Internal\n} // Find\n\n#endif // SEARCHRESULTWIDGET_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/autocompleter.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#include \"autocompleter.h\"\n#include \"basetextdocumentlayout.h\"\n#include \"tabsettings.h\"\n\n#include <QDebug>\n#include <QTextCursor>\n\nusing namespace TextEditor;\n\nAutoCompleter::AutoCompleter() :\n    m_allowSkippingOfBlockEnd(false),\n    m_surroundWithEnabled(true),\n    m_autoParenthesesEnabled(true)\n{}\n\nAutoCompleter::~AutoCompleter()\n{}\n\nvoid AutoCompleter::setAutoParenthesesEnabled(bool b)\n{\n    m_autoParenthesesEnabled = b;\n}\n\nbool AutoCompleter::isAutoParenthesesEnabled() const\n{\n    return m_autoParenthesesEnabled;\n}\n\nvoid AutoCompleter::setSurroundWithEnabled(bool b)\n{\n    m_surroundWithEnabled = b;\n}\n\nbool AutoCompleter::isSurroundWithEnabled() const\n{\n    return m_surroundWithEnabled;\n}\n\nvoid AutoCompleter::countBracket(QChar open, QChar close, QChar c, int *errors, int *stillopen)\n{\n    if (c == open)\n        ++*stillopen;\n    else if (c == close)\n        --*stillopen;\n\n    if (*stillopen < 0) {\n        *errors += -1 * (*stillopen);\n        *stillopen = 0;\n    }\n}\n\nvoid AutoCompleter::countBrackets(QTextCursor cursor,\n                                  int from,\n                                  int end,\n                                  QChar open,\n                                  QChar close,\n                                  int *errors,\n                                  int *stillopen)\n{\n    cursor.setPosition(from);\n    QTextBlock block = cursor.block();\n    while (block.isValid() && block.position() < end) {\n        TextEditor::Parentheses parenList = TextEditor::BaseTextDocumentLayout::parentheses(block);\n        if (!parenList.isEmpty() && !TextEditor::BaseTextDocumentLayout::ifdefedOut(block)) {\n            for (int i = 0; i < parenList.count(); ++i) {\n                TextEditor::Parenthesis paren = parenList.at(i);\n                int position = block.position() + paren.pos;\n                if (position < from || position >= end)\n                    continue;\n                countBracket(open, close, paren.chr, errors, stillopen);\n            }\n        }\n        block = block.next();\n    }\n}\n\nQString AutoCompleter::autoComplete(QTextCursor &cursor, const QString &textToInsert) const\n{\n    const bool checkBlockEnd = m_allowSkippingOfBlockEnd;\n    m_allowSkippingOfBlockEnd = false; // consume blockEnd.\n\n    if (m_surroundWithEnabled && cursor.hasSelection()) {\n        if (textToInsert == QLatin1String(\"(\"))\n            return cursor.selectedText() + QLatin1String(\")\");\n        if (textToInsert == QLatin1String(\"{\")) {\n            //If the text span multiple lines, insert on different lines\n            QString str = cursor.selectedText();\n            if (str.contains(QChar::ParagraphSeparator)) {\n                //Also, try to simulate auto-indent\n                str = (str.startsWith(QChar::ParagraphSeparator) ? QString() : QString(QChar::ParagraphSeparator)) +\n                      str;\n                if (str.endsWith(QChar::ParagraphSeparator))\n                    str += QLatin1String(\"}\") + QString(QChar::ParagraphSeparator);\n                else\n                    str += QString(QChar::ParagraphSeparator) + QLatin1String(\"}\");\n            } else {\n                str += QLatin1String(\"}\");\n            }\n            return str;\n        }\n        if (textToInsert == QLatin1String(\"[\"))\n            return cursor.selectedText() + QLatin1String(\"]\");\n        if (textToInsert == QLatin1String(\"\\\"\"))\n            return cursor.selectedText() + QLatin1String(\"\\\"\");\n        if (textToInsert == QLatin1String(\"'\"))\n            return cursor.selectedText() + QLatin1String(\"'\");\n    }\n\n    if (!m_autoParenthesesEnabled)\n        return QString();\n\n    if (!contextAllowsAutoParentheses(cursor, textToInsert))\n        return QString();\n\n    QTextDocument *doc = cursor.document();\n    const QString text = textToInsert;\n    const QChar lookAhead = doc->characterAt(cursor.selectionEnd());\n\n    const QChar character = textToInsert.at(0);\n    const QString parentheses = QLatin1String(\"()\");\n    const QString brackets = QLatin1String(\"[]\");\n    if (parentheses.contains(character) || brackets.contains(character)) {\n        QTextCursor tmp= cursor;\n        bool foundBlockStart = TextEditor::TextBlockUserData::findPreviousBlockOpenParenthesis(&tmp);\n        int blockStart = foundBlockStart ? tmp.position() : 0;\n        tmp = cursor;\n        bool foundBlockEnd = TextEditor::TextBlockUserData::findNextBlockClosingParenthesis(&tmp);\n        int blockEnd = foundBlockEnd ? tmp.position() : (cursor.document()->characterCount() - 1);\n        const QChar openChar = parentheses.contains(character) ? QLatin1Char('(') : QLatin1Char('[');\n        const QChar closeChar = parentheses.contains(character) ? QLatin1Char(')') : QLatin1Char(']');\n\n        int errors = 0;\n        int stillopen = 0;\n        countBrackets(cursor, blockStart, blockEnd, openChar, closeChar, &errors, &stillopen);\n        int errorsBeforeInsertion = errors + stillopen;\n        errors = 0;\n        stillopen = 0;\n        countBrackets(cursor, blockStart, cursor.position(), openChar, closeChar, &errors, &stillopen);\n        countBracket(openChar, closeChar, character, &errors, &stillopen);\n        countBrackets(cursor, cursor.position(), blockEnd, openChar, closeChar, &errors, &stillopen);\n        int errorsAfterInsertion = errors + stillopen;\n        if (errorsAfterInsertion < errorsBeforeInsertion)\n            return QString(); // insertion fixes parentheses or bracket errors, do not auto complete\n    }\n\n    int skippedChars = 0;\n    const QString autoText = insertMatchingBrace(cursor, text, lookAhead, &skippedChars);\n\n    if (checkBlockEnd && textToInsert.at(0) == QLatin1Char('}')) {\n        if (textToInsert.length() > 1)\n            qWarning() << \"*** handle event compression\";\n\n        int startPos = cursor.selectionEnd(), pos = startPos;\n        while (doc->characterAt(pos).isSpace())\n            ++pos;\n\n        if (doc->characterAt(pos) == QLatin1Char('}'))\n            skippedChars += (pos - startPos) + 1;\n    }\n\n    if (skippedChars) {\n        const int pos = cursor.position();\n        cursor.setPosition(pos + skippedChars);\n        cursor.setPosition(pos, QTextCursor::KeepAnchor);\n    }\n\n    return autoText;\n}\n\nbool AutoCompleter::autoBackspace(QTextCursor &cursor)\n{\n    m_allowSkippingOfBlockEnd = false;\n\n    if (!m_autoParenthesesEnabled)\n        return false;\n\n    int pos = cursor.position();\n    if (pos == 0)\n        return false;\n    QTextCursor c = cursor;\n    c.setPosition(pos - 1);\n\n    QTextDocument *doc = cursor.document();\n    const QChar lookAhead = doc->characterAt(pos);\n    const QChar lookBehind = doc->characterAt(pos - 1);\n    const QChar lookFurtherBehind = doc->characterAt(pos - 2);\n\n    const QChar character = lookBehind;\n    if (character == QLatin1Char('(') || character == QLatin1Char('[')) {\n        QTextCursor tmp = cursor;\n        TextEditor::TextBlockUserData::findPreviousBlockOpenParenthesis(&tmp);\n        int blockStart = tmp.isNull() ? 0 : tmp.position();\n        tmp = cursor;\n        TextEditor::TextBlockUserData::findNextBlockClosingParenthesis(&tmp);\n        int blockEnd = tmp.isNull() ? (cursor.document()->characterCount()-1) : tmp.position();\n        QChar openChar = character;\n        QChar closeChar = (character == QLatin1Char('(')) ? QLatin1Char(')') : QLatin1Char(']');\n\n        int errors = 0;\n        int stillopen = 0;\n        countBrackets(cursor, blockStart, blockEnd, openChar, closeChar, &errors, &stillopen);\n        int errorsBeforeDeletion = errors + stillopen;\n        errors = 0;\n        stillopen = 0;\n        countBrackets(cursor, blockStart, pos - 1, openChar, closeChar, &errors, &stillopen);\n        countBrackets(cursor, pos, blockEnd, openChar, closeChar, &errors, &stillopen);\n        int errorsAfterDeletion = errors + stillopen;\n\n        if (errorsAfterDeletion < errorsBeforeDeletion)\n            return false; // insertion fixes parentheses or bracket errors, do not auto complete\n    }\n\n    // ### this code needs to be generalized\n    if    ((lookBehind == QLatin1Char('(') && lookAhead == QLatin1Char(')'))\n        || (lookBehind == QLatin1Char('[') && lookAhead == QLatin1Char(']'))\n        || (lookBehind == QLatin1Char('\"') && lookAhead == QLatin1Char('\"')\n            && lookFurtherBehind != QLatin1Char('\\\\'))\n        || (lookBehind == QLatin1Char('\\'') && lookAhead == QLatin1Char('\\'')\n            && lookFurtherBehind != QLatin1Char('\\\\'))) {\n        if (! isInComment(c)) {\n            cursor.beginEditBlock();\n            cursor.deleteChar();\n            cursor.deletePreviousChar();\n            cursor.endEditBlock();\n            return true;\n        }\n    }\n    return false;\n}\n\nint AutoCompleter::paragraphSeparatorAboutToBeInserted(QTextCursor &cursor,\n                                                       const TabSettings &tabSettings)\n{\n    if (!m_autoParenthesesEnabled)\n        return 0;\n\n    QTextDocument *doc = cursor.document();\n    if (doc->characterAt(cursor.position() - 1) != QLatin1Char('{'))\n        return 0;\n\n    if (!contextAllowsAutoParentheses(cursor))\n        return 0;\n\n    // verify that we indeed do have an extra opening brace in the document\n    QTextBlock block = cursor.block();\n    const QString textFromCusror = block.text().mid(cursor.positionInBlock()).trimmed();\n    int braceDepth = BaseTextDocumentLayout::braceDepth(doc->lastBlock());\n\n    if (braceDepth <= 0 && (textFromCusror.isEmpty() || textFromCusror.at(0) != QLatin1Char('}')))\n        return 0; // braces are all balanced or worse, no need to do anything and separator inserted not between '{' and '}'\n\n    // we have an extra brace , let's see if we should close it\n\n    /* verify that the next block is not further intended compared to the current block.\n       This covers the following case:\n\n            if (condition) {|\n                statement;\n    */\n    int indentation = tabSettings.indentationColumn(block.text());\n\n    if (block.next().isValid()) { // not the last block\n        block = block.next();\n        //skip all empty blocks\n        while (block.isValid() && tabSettings.onlySpace(block.text()))\n            block = block.next();\n        if (block.isValid()\n                && tabSettings.indentationColumn(block.text()) > indentation)\n            return 0;\n    }\n\n    const QString &textToInsert = insertParagraphSeparator(cursor);\n    int pos = cursor.position();\n    cursor.insertBlock();\n    cursor.insertText(textToInsert);\n    cursor.setPosition(pos);\n\n    // if we actually insert a separator, allow it to be overwritten if\n    // user types it\n    if (!textToInsert.isEmpty())\n        m_allowSkippingOfBlockEnd = true;\n\n    return 1;\n}\n\nbool AutoCompleter::contextAllowsAutoParentheses(const QTextCursor &cursor,\n                                                 const QString &textToInsert) const\n{\n    Q_UNUSED(cursor);\n    Q_UNUSED(textToInsert);\n    return true;\n}\n\nbool AutoCompleter::contextAllowsElectricCharacters(const QTextCursor &cursor) const\n{\n    return contextAllowsAutoParentheses(cursor);\n}\n\nbool AutoCompleter::isInComment(const QTextCursor &cursor) const\n{\n    Q_UNUSED(cursor);\n    return false;\n}\n\nQString AutoCompleter::insertMatchingBrace(const QTextCursor &cursor,\n                                           const QString &text,\n                                           QChar la,\n                                           int *skippedChars) const\n{\n    Q_UNUSED(cursor);\n    Q_UNUSED(text);\n    Q_UNUSED(la);\n    Q_UNUSED(skippedChars);\n    return QString();\n}\n\nQString AutoCompleter::insertParagraphSeparator(const QTextCursor &cursor) const\n{\n    Q_UNUSED(cursor);\n    return QString();\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/autocompleter.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#ifndef AUTOCOMPLETER_H\n#define AUTOCOMPLETER_H\n\n#include \"texteditor_global.h\"\n\n#include <QString>\n\nQT_BEGIN_NAMESPACE\nclass QTextCursor;\nQT_END_NAMESPACE\n\nnamespace TextEditor {\n\nclass TabSettings;\n\nclass TEXTEDITOR_EXPORT AutoCompleter\n{\npublic:\n    AutoCompleter();\n    virtual ~AutoCompleter();\n\n    void setAutoParenthesesEnabled(bool b);\n    bool isAutoParenthesesEnabled() const;\n\n    void setSurroundWithEnabled(bool b);\n    bool isSurroundWithEnabled() const;\n\n    // Returns the text to complete at the cursor position, or an empty string\n    virtual QString autoComplete(QTextCursor &cursor, const QString &text) const;\n\n    // Handles backspace. When returning true, backspace processing is stopped\n    virtual bool autoBackspace(QTextCursor &cursor);\n\n    // Hook to insert special characters on enter. Returns the number of extra blocks inserted.\n    virtual int paragraphSeparatorAboutToBeInserted(QTextCursor &cursor,\n                                                    const TabSettings &tabSettings);\n\n    virtual bool contextAllowsAutoParentheses(const QTextCursor &cursor,\n                                              const QString &textToInsert = QString()) const;\n    virtual bool contextAllowsElectricCharacters(const QTextCursor &cursor) const;\n\n    // Returns true if the cursor is inside a comment.\n    virtual bool isInComment(const QTextCursor &cursor) const;\n\n    virtual QString insertMatchingBrace(const QTextCursor &cursor, const\n                                        QString &text,\n                                        QChar la,\n                                        int *skippedChars) const;\n\n    // Returns the text that needs to be inserted\n    virtual QString insertParagraphSeparator(const QTextCursor &cursor) const;\n\nprotected:\n    static void countBracket(QChar open, QChar close, QChar c, int *errors, int *stillopen);\n    static void countBrackets(QTextCursor cursor, int from, int end, QChar open, QChar close,\n                              int *errors, int *stillopen);\n\nprivate:\n    mutable bool m_allowSkippingOfBlockEnd;\n    bool m_surroundWithEnabled;\n    bool m_autoParenthesesEnabled;\n};\n\n} // TextEditor\n\n#endif // AUTOCOMPLETER_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/basetextblockselection.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#include \"basetextblockselection.h\"\n#include <QTextBlock>\n#include <QTextCursor>\n#include <QTextDocument>\n\nusing namespace TextEditor;\n\nBaseTextBlockSelection::BaseTextBlockSelection()\n    :firstVisualColumn(0), lastVisualColumn(0), anchor(BottomRight)\n{\n}\n\nvoid BaseTextBlockSelection::moveAnchor(int blockNumber, int visualColumn)\n{\n    if (visualColumn >= 0) {\n        if (anchor % 2) {\n            lastVisualColumn = visualColumn;\n            if (lastVisualColumn < firstVisualColumn) {\n                qSwap(firstVisualColumn, lastVisualColumn);\n                anchor = (Anchor) (anchor - 1);\n            }\n        } else {\n            firstVisualColumn = visualColumn;\n            if (firstVisualColumn > lastVisualColumn) {\n                qSwap(firstVisualColumn, lastVisualColumn);\n                anchor = (Anchor) (anchor + 1);\n            }\n        }\n    }\n\n    if (blockNumber >= 0 && blockNumber < firstBlock.document()->blockCount()) {\n        if (anchor <= TopRight) {\n            firstBlock.setPosition(firstBlock.document()->findBlockByNumber(blockNumber).position());\n            if (firstBlock.blockNumber() > lastBlock.blockNumber()) {\n                qSwap(firstBlock, lastBlock);\n                anchor = (Anchor) (anchor + 2);\n            }\n        } else {\n            lastBlock.setPosition(firstBlock.document()->findBlockByNumber(blockNumber).position());\n            if (lastBlock.blockNumber() < firstBlock.blockNumber()) {\n                qSwap(firstBlock, lastBlock);\n                anchor = (Anchor) (anchor - 2);\n            }\n        }\n    }\n    firstBlock.movePosition(QTextCursor::StartOfBlock);\n    lastBlock.movePosition(QTextCursor::EndOfBlock);\n}\n\nint BaseTextBlockSelection::position(const TabSettings &ts) const\n{\n    const QTextBlock &block = anchor <= TopRight ? lastBlock.block() : firstBlock.block();\n    const int column = anchor % 2 ? firstVisualColumn : lastVisualColumn;\n    return block.position() + ts.positionAtColumn(block.text(), column);\n}\n\nQTextCursor BaseTextBlockSelection::selection(const TabSettings &ts) const\n{\n    QTextCursor cursor = firstBlock;\n    if (anchor <= TopRight) {\n        cursor.setPosition(lastBlock.block().position() + ts.positionAtColumn(lastBlock.block().text(), lastVisualColumn));\n        cursor.setPosition(firstBlock.block().position() + ts.positionAtColumn(firstBlock.block().text(), firstVisualColumn),\n                           QTextCursor::KeepAnchor);\n    } else {\n        cursor.setPosition(firstBlock.block().position() + ts.positionAtColumn(firstBlock.block().text(), firstVisualColumn));\n        cursor.setPosition(lastBlock.block().position() + ts.positionAtColumn(lastBlock.block().text(), lastVisualColumn),\n                           QTextCursor::KeepAnchor);\n    }\n    return cursor;\n}\n\nvoid BaseTextBlockSelection::fromSelection(const TabSettings &ts, const QTextCursor &selection)\n{\n    firstBlock = selection;\n    firstBlock.setPosition(selection.selectionStart());\n    firstVisualColumn = ts.columnAt(firstBlock.block().text(), firstBlock.positionInBlock());\n    lastBlock = selection;\n    lastBlock.setPosition(selection.selectionEnd());\n    lastVisualColumn = ts.columnAt(lastBlock.block().text(), lastBlock.positionInBlock());\n    if (selection.anchor() > selection.position())\n        anchor = TopLeft;\n    else\n        anchor = BottomRight;\n\n    firstBlock.movePosition(QTextCursor::StartOfBlock);\n    lastBlock.movePosition(QTextCursor::EndOfBlock);\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/basetextblockselection.h",
    "content": "#ifndef BASETEXTBLOCKSELECTION_H\n/****************************************************************************\n**\n** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n** Contact: http://www.qt-project.org/legal\n**\n** This file is part of Qt Creator.\n**\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and Digia.  For licensing terms and\n** conditions see http://qt.digia.com/licensing.  For further information\n** use the contact form at http://qt.digia.com/contact-us.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Digia gives you certain additional\n** rights.  These rights are described in the Digia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n****************************************************************************/\n\n#define BASETEXTBLOCKSELECTION_H\n\n#include \"qtc_texteditor/tabsettings.h\"\n#include <QTextBlock>\n#include <QTextCursor>\n\nnamespace TextEditor {\n\nclass BaseTextBlockSelection\n{\npublic:\n    BaseTextBlockSelection();\n    bool isValid() const{ return !firstBlock.isNull() && !lastBlock.isNull(); }\n    void clear() { firstBlock = lastBlock = QTextCursor(); }\n    void moveAnchor(int blockNumber, int visualColumn);\n    int position(const TabSettings &ts) const;\n    inline int anchorColumnNumber() const { return (anchor % 2) ? lastVisualColumn : firstVisualColumn; }\n    inline int anchorBlockNumber() const {\n        return (anchor <= TopRight ? firstBlock.blockNumber() : lastBlock.blockNumber()); }\n    QTextCursor selection(const TabSettings &ts) const;\n    void fromSelection(const TabSettings &ts, const QTextCursor &selection);\npublic:\n    QTextCursor firstBlock; // defines the first block\n    QTextCursor lastBlock; // defines the last block\n    int firstVisualColumn; // defines the first visual column of the selection\n    int lastVisualColumn; // defines the last visual column of the selection\n    enum Anchor {TopLeft = 0, TopRight, BottomLeft, BottomRight} anchor;\n};\n\n} //namespace TextEditor\n\n#endif // BASETEXTBLOCKSELECTION_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/basetextdocumentlayout.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"basetextdocumentlayout.h\"\n#include <QDebug>\n\nusing namespace TextEditor;\n\nCodeFormatterData::~CodeFormatterData()\n{\n}\n\nTextBlockUserData::~TextBlockUserData()\n{\n    TextMarks marks = m_marks;\n    m_marks.clear();\n    foreach (ITextMark *mrk, marks) {\n        mrk->removedFromEditor();\n    }\n\n    if (m_codeFormatterData)\n        delete m_codeFormatterData;\n}\n\nint TextBlockUserData::braceDepthDelta() const\n{\n    int delta = 0;\n    for (int i = 0; i < m_parentheses.size(); ++i) {\n        switch (m_parentheses.at(i).chr.unicode()) {\n        case '{': case '+': case '[': ++delta; break;\n        case '}': case '-': case ']': --delta; break;\n        default: break;\n        }\n    }\n    return delta;\n}\n\nvoid TextBlockUserData::clearSpellCheckZones(bool defaultSpellCheck)\n{\n    m_spellCheckZones.clear();\n    addSpellCheckZone(0, defaultSpellCheck);\n}\n\nvoid TextBlockUserData::addSpellCheckZone(int position, bool spellCheck)\n{\n    if (m_spellCheckZones.isEmpty() || spellCheck != shouldSpellCheck(position)) {\n        m_spellCheckZones[position] = spellCheck;\n    }\n}\n\nbool TextBlockUserData::shouldSpellCheck(int position) const\n{\n    bool spellCheck = true;\n    \n    if (!m_spellCheckZones.isEmpty()) {\n        QMap<int,bool>::const_iterator it = m_spellCheckZones.constEnd();\n        do {\n            --it;\n            spellCheck = it.value();\n        } while (it.key() >= position && it != m_spellCheckZones.constBegin());\n    }\n\n    return spellCheck;\n}\n\nTextBlockUserData::MatchType TextBlockUserData::checkOpenParenthesis(QTextCursor *cursor, QChar c)\n{\n    QTextBlock block = cursor->block();\n    if (!BaseTextDocumentLayout::hasParentheses(block) || BaseTextDocumentLayout::ifdefedOut(block))\n        return NoMatch;\n\n    Parentheses parenList = BaseTextDocumentLayout::parentheses(block);\n    Parenthesis openParen, closedParen;\n    QTextBlock closedParenParag = block;\n\n    const int cursorPos = cursor->position() - closedParenParag.position();\n    int i = 0;\n    int ignore = 0;\n    bool foundOpen = false;\n    for (;;) {\n        if (!foundOpen) {\n            if (i >= parenList.count())\n                return NoMatch;\n            openParen = parenList.at(i);\n            if (openParen.pos != cursorPos) {\n                ++i;\n                continue;\n            } else {\n                foundOpen = true;\n                ++i;\n            }\n        }\n\n        if (i >= parenList.count()) {\n            for (;;) {\n                closedParenParag = closedParenParag.next();\n                if (!closedParenParag.isValid())\n                    return NoMatch;\n                if (BaseTextDocumentLayout::hasParentheses(closedParenParag)\n                    && !BaseTextDocumentLayout::ifdefedOut(closedParenParag)) {\n                    parenList = BaseTextDocumentLayout::parentheses(closedParenParag);\n                    break;\n                }\n            }\n            i = 0;\n        }\n\n        closedParen = parenList.at(i);\n        if (closedParen.type == Parenthesis::Opened) {\n            ignore++;\n            ++i;\n            continue;\n        } else {\n            if (ignore > 0) {\n                ignore--;\n                ++i;\n                continue;\n            }\n\n            cursor->clearSelection();\n            cursor->setPosition(closedParenParag.position() + closedParen.pos + 1, QTextCursor::KeepAnchor);\n\n            if ((c == QLatin1Char('{') && closedParen.chr != QLatin1Char('}'))\n                || (c == QLatin1Char('(') && closedParen.chr != QLatin1Char(')'))\n                || (c == QLatin1Char('[') && closedParen.chr != QLatin1Char(']'))\n                || (c == QLatin1Char('+') && closedParen.chr != QLatin1Char('-'))\n               )\n                return Mismatch;\n\n            return Match;\n        }\n    }\n}\n\nTextBlockUserData::MatchType TextBlockUserData::checkClosedParenthesis(QTextCursor *cursor, QChar c)\n{\n    QTextBlock block = cursor->block();\n    if (!BaseTextDocumentLayout::hasParentheses(block) || BaseTextDocumentLayout::ifdefedOut(block))\n        return NoMatch;\n\n    Parentheses parenList = BaseTextDocumentLayout::parentheses(block);\n    Parenthesis openParen, closedParen;\n    QTextBlock openParenParag = block;\n\n    const int cursorPos = cursor->position() - openParenParag.position();\n    int i = parenList.count() - 1;\n    int ignore = 0;\n    bool foundClosed = false;\n    for (;;) {\n        if (!foundClosed) {\n            if (i < 0)\n                return NoMatch;\n            closedParen = parenList.at(i);\n            if (closedParen.pos != cursorPos - 1) {\n                --i;\n                continue;\n            } else {\n                foundClosed = true;\n                --i;\n            }\n        }\n\n        if (i < 0) {\n            for (;;) {\n                openParenParag = openParenParag.previous();\n                if (!openParenParag.isValid())\n                    return NoMatch;\n\n                if (BaseTextDocumentLayout::hasParentheses(openParenParag)\n                    && !BaseTextDocumentLayout::ifdefedOut(openParenParag)) {\n                    parenList = BaseTextDocumentLayout::parentheses(openParenParag);\n                    break;\n                }\n            }\n            i = parenList.count() - 1;\n        }\n\n        openParen = parenList.at(i);\n        if (openParen.type == Parenthesis::Closed) {\n            ignore++;\n            --i;\n            continue;\n        } else {\n            if (ignore > 0) {\n                ignore--;\n                --i;\n                continue;\n            }\n\n            cursor->clearSelection();\n            cursor->setPosition(openParenParag.position() + openParen.pos, QTextCursor::KeepAnchor);\n\n            if ((c == '}' && openParen.chr != '{')    ||\n                 (c == ')' && openParen.chr != '(')   ||\n                 (c == ']' && openParen.chr != '[')   ||\n                 (c == '-' && openParen.chr != '+'))\n                return Mismatch;\n\n            return Match;\n        }\n    }\n}\n\nbool TextBlockUserData::findPreviousOpenParenthesis(QTextCursor *cursor, bool select)\n{\n    QTextBlock block = cursor->block();\n    int position = cursor->position();\n    int ignore = 0;\n    while (block.isValid()) {\n        Parentheses parenList = BaseTextDocumentLayout::parentheses(block);\n        if (!parenList.isEmpty() && !BaseTextDocumentLayout::ifdefedOut(block)) {\n            for (int i = parenList.count()-1; i >= 0; --i) {\n                Parenthesis paren = parenList.at(i);\n                if (block == cursor->block() &&\n                    (position - block.position() <= paren.pos + (paren.type == Parenthesis::Closed ? 1 : 0)))\n                        continue;\n                if (paren.type == Parenthesis::Closed) {\n                    ++ignore;\n                } else if (ignore > 0) {\n                    --ignore;\n                } else {\n                    cursor->setPosition(block.position() + paren.pos, select ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor);\n                    return true;\n                }\n            }\n        }\n        block = block.previous();\n    }\n    return false;\n}\n\nbool TextBlockUserData::findPreviousBlockOpenParenthesis(QTextCursor *cursor, bool checkStartPosition)\n{\n    QTextBlock block = cursor->block();\n    int position = cursor->position();\n    int ignore = 0;\n    while (block.isValid()) {\n        Parentheses parenList = BaseTextDocumentLayout::parentheses(block);\n        if (!parenList.isEmpty() && !BaseTextDocumentLayout::ifdefedOut(block)) {\n            for (int i = parenList.count()-1; i >= 0; --i) {\n                Parenthesis paren = parenList.at(i);\n                if (paren.chr != QLatin1Char('{') && paren.chr != QLatin1Char('}')\n                    && paren.chr != QLatin1Char('+') && paren.chr != QLatin1Char('-')\n                    && paren.chr != QLatin1Char('[') && paren.chr != QLatin1Char(']'))\n                    continue;\n                if (block == cursor->block()) {\n                    if (position - block.position() <= paren.pos + (paren.type == Parenthesis::Closed ? 1 : 0))\n                        continue;\n                    if (checkStartPosition && paren.type == Parenthesis::Opened && paren.pos== cursor->position()) {\n                        return true;\n                    }\n                }\n                if (paren.type == Parenthesis::Closed) {\n                    ++ignore;\n                } else if (ignore > 0) {\n                    --ignore;\n                } else {\n                    cursor->setPosition(block.position() + paren.pos);\n                    return true;\n                }\n            }\n        }\n        block = block.previous();\n    }\n    return false;\n}\n\nbool TextBlockUserData::findNextClosingParenthesis(QTextCursor *cursor, bool select)\n{\n    QTextBlock block = cursor->block();\n    int position = cursor->position();\n    int ignore = 0;\n    while (block.isValid()) {\n        Parentheses parenList = BaseTextDocumentLayout::parentheses(block);\n        if (!parenList.isEmpty() && !BaseTextDocumentLayout::ifdefedOut(block)) {\n            for (int i = 0; i < parenList.count(); ++i) {\n                Parenthesis paren = parenList.at(i);\n                if (block == cursor->block() &&\n                    (position - block.position() > paren.pos - (paren.type == Parenthesis::Opened ? 1 : 0)))\n                    continue;\n                if (paren.type == Parenthesis::Opened) {\n                    ++ignore;\n                } else if (ignore > 0) {\n                    --ignore;\n                } else {\n                    cursor->setPosition(block.position() + paren.pos+1, select ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor);\n                    return true;\n                }\n            }\n        }\n        block = block.next();\n    }\n    return false;\n}\n\nbool TextBlockUserData::findNextBlockClosingParenthesis(QTextCursor *cursor)\n{\n    QTextBlock block = cursor->block();\n    int position = cursor->position();\n    int ignore = 0;\n    while (block.isValid()) {\n        Parentheses parenList = BaseTextDocumentLayout::parentheses(block);\n        if (!parenList.isEmpty() && !BaseTextDocumentLayout::ifdefedOut(block)) {\n            for (int i = 0; i < parenList.count(); ++i) {\n                Parenthesis paren = parenList.at(i);\n                if (paren.chr != QLatin1Char('{') && paren.chr != QLatin1Char('}')\n                    && paren.chr != QLatin1Char('+') && paren.chr != QLatin1Char('-')\n                    && paren.chr != QLatin1Char('[') && paren.chr != QLatin1Char(']'))\n                    continue;\n                if (block == cursor->block() &&\n                    (position - block.position() > paren.pos - (paren.type == Parenthesis::Opened ? 1 : 0)))\n                    continue;\n                if (paren.type == Parenthesis::Opened) {\n                    ++ignore;\n                } else if (ignore > 0) {\n                    --ignore;\n                } else {\n                    cursor->setPosition(block.position() + paren.pos+1);\n                    return true;\n                }\n            }\n        }\n        block = block.next();\n    }\n    return false;\n}\n\nTextBlockUserData::MatchType TextBlockUserData::matchCursorBackward(QTextCursor *cursor)\n{\n    cursor->clearSelection();\n    const QTextBlock block = cursor->block();\n\n    if (!BaseTextDocumentLayout::hasParentheses(block) || BaseTextDocumentLayout::ifdefedOut(block))\n        return NoMatch;\n\n    const int relPos = cursor->position() - block.position();\n\n    Parentheses parentheses = BaseTextDocumentLayout::parentheses(block);\n    const Parentheses::const_iterator cend = parentheses.constEnd();\n    for (Parentheses::const_iterator it = parentheses.constBegin();it != cend; ++it) {\n        const Parenthesis &paren = *it;\n        if (paren.pos == relPos - 1\n            && paren.type == Parenthesis::Closed) {\n            return checkClosedParenthesis(cursor, paren.chr);\n        }\n    }\n    return NoMatch;\n}\n\nTextBlockUserData::MatchType TextBlockUserData::matchCursorForward(QTextCursor *cursor)\n{\n    cursor->clearSelection();\n    const QTextBlock block = cursor->block();\n\n    if (!BaseTextDocumentLayout::hasParentheses(block) || BaseTextDocumentLayout::ifdefedOut(block))\n        return NoMatch;\n\n    const int relPos = cursor->position() - block.position();\n\n    Parentheses parentheses = BaseTextDocumentLayout::parentheses(block);\n    const Parentheses::const_iterator cend = parentheses.constEnd();\n    for (Parentheses::const_iterator it = parentheses.constBegin();it != cend; ++it) {\n        const Parenthesis &paren = *it;\n        if (paren.pos == relPos\n            && paren.type == Parenthesis::Opened) {\n            return checkOpenParenthesis(cursor, paren.chr);\n        }\n    }\n    return NoMatch;\n}\n\nvoid TextBlockUserData::setCodeFormatterData(CodeFormatterData *data)\n{\n    if (m_codeFormatterData)\n        delete m_codeFormatterData;\n\n    m_codeFormatterData = data;\n}\n\nvoid TextBlockUserData::addMark(ITextMark *mark)\n{\n    int i = 0;\n    for ( ; i < m_marks.size(); ++i) {\n        if (mark->type() < m_marks.at(i)->type())\n            break;\n    }\n    m_marks.insert(i, mark);\n}\n\n\nBaseTextDocumentLayout::BaseTextDocumentLayout(QTextDocument *doc)\n    :QPlainTextDocumentLayout(doc) {\n    lastSaveRevision = 0;\n    hasMarks = 0;\n    maxMarkWidthFactor = 1.0;\n    m_requiredWidth = 0;\n}\n\nBaseTextDocumentLayout::~BaseTextDocumentLayout()\n{\n}\n\nvoid BaseTextDocumentLayout::setParentheses(const QTextBlock &block, const Parentheses &parentheses)\n{\n    if (parentheses.isEmpty()) {\n        if (TextBlockUserData *userData = testUserData(block))\n            userData->clearParentheses();\n    } else {\n        userData(block)->setParentheses(parentheses);\n    }\n}\n\nParentheses BaseTextDocumentLayout::parentheses(const QTextBlock &block)\n{\n    if (TextBlockUserData *userData = testUserData(block))\n        return userData->parentheses();\n    return Parentheses();\n}\n\nbool BaseTextDocumentLayout::hasParentheses(const QTextBlock &block)\n{\n    if (TextBlockUserData *userData = testUserData(block))\n        return userData->hasParentheses();\n    return false;\n}\n\nbool BaseTextDocumentLayout::setIfdefedOut(const QTextBlock &block)\n{\n    return userData(block)->setIfdefedOut();\n}\n\nbool BaseTextDocumentLayout::clearIfdefedOut(const QTextBlock &block)\n{\n    if (TextBlockUserData *userData = testUserData(block))\n        return userData->clearIfdefedOut();\n    return false;\n}\n\nbool BaseTextDocumentLayout::ifdefedOut(const QTextBlock &block)\n{\n    if (TextBlockUserData *userData = testUserData(block))\n        return userData->ifdefedOut();\n    return false;\n}\n\nint BaseTextDocumentLayout::braceDepthDelta(const QTextBlock &block)\n{\n    if (TextBlockUserData *userData = testUserData(block))\n        return userData->braceDepthDelta();\n    return 0;\n}\n\nint BaseTextDocumentLayout::braceDepth(const QTextBlock &block)\n{\n    int state = block.userState();\n    if (state == -1)\n        return 0;\n    return state >> 8;\n}\n\nvoid BaseTextDocumentLayout::setBraceDepth(QTextBlock &block, int depth)\n{\n    int state = block.userState();\n    if (state == -1)\n        state = 0;\n    state = state & 0xff;\n    block.setUserState((depth << 8) | state);\n}\n\nvoid BaseTextDocumentLayout::changeBraceDepth(QTextBlock &block, int delta)\n{\n    if (delta)\n        setBraceDepth(block, braceDepth(block) + delta);\n}\n\nvoid BaseTextDocumentLayout::setLexerState(const QTextBlock &block, int state)\n{\n    if (state == 0) {\n        if (TextBlockUserData *userData = testUserData(block))\n            userData->setLexerState(0);\n    } else {\n        userData(block)->setLexerState(qMax(0,state));\n    }\n}\n\nint BaseTextDocumentLayout::lexerState(const QTextBlock &block)\n{\n    if (TextBlockUserData *userData = testUserData(block))\n        return userData->lexerState();\n    return 0;\n}\n\nvoid BaseTextDocumentLayout::setFoldingIndent(const QTextBlock &block, int indent)\n{\n    if (indent == 0) {\n        if (TextBlockUserData *userData = testUserData(block))\n            userData->setFoldingIndent(0);\n    } else {\n        userData(block)->setFoldingIndent(qMax(0,indent));\n    }\n}\n\nint BaseTextDocumentLayout::foldingIndent(const QTextBlock &block)\n{\n    if (TextBlockUserData *userData = testUserData(block))\n        return userData->foldingIndent();\n    return 0;\n}\n\nvoid BaseTextDocumentLayout::changeFoldingIndent(QTextBlock &block, int delta)\n{\n    if (delta)\n        setFoldingIndent(block, foldingIndent(block) + delta);\n}\n\nbool BaseTextDocumentLayout::canFold(const QTextBlock &block)\n{\n    return (block.next().isValid() && foldingIndent(block.next()) > foldingIndent(block));\n}\n\nbool BaseTextDocumentLayout::isFolded(const QTextBlock &block)\n{\n    if (TextBlockUserData *userData = testUserData(block))\n        return userData->folded();\n    return false;\n}\n\nvoid BaseTextDocumentLayout::setFolded(const QTextBlock &block, bool folded)\n{\n    if (folded)\n        userData(block)->setFolded(true);\n    else {\n        if (TextBlockUserData *userData = testUserData(block))\n            return userData->setFolded(false);\n    }\n}\n\nbool BaseTextDocumentLayout::isFindExpressionMark(const QTextBlock &block)\n{\n    if (TextBlockUserData *userData = testUserData(block))\n        return userData->isFindExpressionMark();\n    return false;\n}\n\nvoid BaseTextDocumentLayout::doFoldOrUnfold(const QTextBlock& block, bool unfold)\n{\n    if (!canFold(block))\n        return;\n    QTextBlock b = block.next();\n\n    int indent = foldingIndent(block);\n    while (b.isValid() && foldingIndent(b) > indent && (unfold || b.next().isValid())) {\n        b.setVisible(unfold);\n        b.setLineCount(unfold? qMax(1, b.layout()->lineCount()) : 0);\n        if (unfold) { // do not unfold folded sub-blocks\n            if (isFolded(b) && b.next().isValid()) {\n                int jndent = foldingIndent(b);\n                b = b.next();\n                while (b.isValid() && foldingIndent(b) > jndent)\n                    b = b.next();\n                continue;\n            }\n        }\n        b = b.next();\n    }\n    setFolded(block, !unfold);\n}\n\nvoid BaseTextDocumentLayout::setRequiredWidth(int width)\n{\n    int oldw = m_requiredWidth;\n    m_requiredWidth = width;\n    int dw = QPlainTextDocumentLayout::documentSize().width();\n    if (oldw > dw || width > dw)\n        emitDocumentSizeChanged();\n}\n\n\nQSizeF BaseTextDocumentLayout::documentSize() const\n{\n    QSizeF size = QPlainTextDocumentLayout::documentSize();\n    size.setWidth(qMax((qreal)m_requiredWidth, size.width()));\n    return size;\n}\n\nvoid BaseTextDocumentLayout::updateMarksLineNumber()\n{\n    QTextBlock block = document()->begin();\n    int blockNumber = 0;\n    while (block.isValid()) {\n        if (const TextBlockUserData *userData = testUserData(block))\n            foreach (ITextMark *mrk, userData->marks())\n                mrk->updateBlockNumber(blockNumber);\n        block = block.next();\n        ++blockNumber;\n    }\n}\n\nvoid BaseTextDocumentLayout::updateMarksBlock(const QTextBlock &block)\n{\n    if (const TextBlockUserData *userData = testUserData(block))\n        foreach (ITextMark *mrk, userData->marks())\n            mrk->updateBlock(block);\n}\n\nBaseTextDocumentLayout::FoldValidator::FoldValidator()\n    : m_layout(0)\n    , m_requestDocUpdate(false)\n    , m_insideFold(0)\n{}\n\nvoid BaseTextDocumentLayout::FoldValidator::setup(BaseTextDocumentLayout *layout)\n{\n    m_layout = layout;\n}\n\nvoid BaseTextDocumentLayout::FoldValidator::reset()\n{\n    m_insideFold = 0;\n    m_requestDocUpdate = false;\n}\n\nvoid BaseTextDocumentLayout::FoldValidator::process(QTextBlock block)\n{\n    if (!m_layout)\n        return;\n\n    const QTextBlock &previous = block.previous();\n    if (!previous.isValid())\n        return;\n\n    if ((BaseTextDocumentLayout::isFolded(previous)\n            && !BaseTextDocumentLayout::canFold(previous))\n            || (!BaseTextDocumentLayout::isFolded(previous)\n                && BaseTextDocumentLayout::canFold(previous)\n                && !block.isVisible())) {\n        BaseTextDocumentLayout::setFolded(previous, !BaseTextDocumentLayout::isFolded(previous));\n    }\n\n    if (BaseTextDocumentLayout::isFolded(previous) && !m_insideFold)\n        m_insideFold = BaseTextDocumentLayout::foldingIndent(block);\n\n    bool toggleVisibility = false;\n    if (m_insideFold) {\n        if (BaseTextDocumentLayout::foldingIndent(block) >= m_insideFold) {\n            if (block.isVisible())\n                toggleVisibility = true;\n        } else {\n            m_insideFold = 0;\n            if (!block.isVisible())\n                toggleVisibility = true;\n        }\n    } else if (!block.isVisible()) {\n        toggleVisibility = true;\n    }\n\n    if (toggleVisibility) {\n        block.setVisible(!block.isVisible());\n        block.setLineCount(block.isVisible() ? qMax(1, block.layout()->lineCount()) : 0);\n        m_requestDocUpdate = true;\n    }\n}\n\nvoid BaseTextDocumentLayout::FoldValidator::finalize()\n{\n    if (m_requestDocUpdate && m_layout) {\n        m_layout->requestUpdate();\n        m_layout->emitDocumentSizeChanged();\n    }\n}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/basetextdocumentlayout.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef BASETEXTDOCUMENTLAYOUT_H\n#define BASETEXTDOCUMENTLAYOUT_H\n\n#include \"texteditor_global.h\"\n\n#include \"itexteditor.h\"\n#include \"tabsettings.h\"\n\n#include <QTextBlockUserData>\n#include <QPlainTextDocumentLayout>\n\nnamespace TextEditor {\n\nstruct Parenthesis;\ntypedef QVector<Parenthesis> Parentheses;\n\nstruct SyntaxToken\n{\n    int offset;\n    int count;\n    int id;\n};\n\nstruct TEXTEDITOR_EXPORT Parenthesis\n{\n    enum Type { Opened, Closed };\n\n    inline Parenthesis() : type(Opened), pos(-1) {}\n    inline Parenthesis(Type t, QChar c, int position)\n        : type(t), chr(c), pos(position) {}\n    Type type;\n    QChar chr;\n    int pos;\n};\n\nclass TEXTEDITOR_EXPORT CodeFormatterData\n{\npublic:\n    virtual ~CodeFormatterData();\n};\n\nclass TEXTEDITOR_EXPORT TextBlockUserData : public QTextBlockUserData\n{\npublic:\n\n    inline TextBlockUserData()\n        : m_folded(false),\n          m_ifdefedOut(false),\n          m_foldingIndent(0),\n          m_lexerState(0),\n          m_foldingStartIncluded(false),\n          m_foldingEndIncluded(false),\n          m_findExpressionMark(false),\n          m_codeFormatterData(0)\n    {}\n    ~TextBlockUserData();\n\n    inline TextMarks marks() const { return m_marks; }\n    void addMark(ITextMark *mark);\n    inline bool removeMark(ITextMark *mark) { return m_marks.removeAll(mark); }\n    inline bool hasMark(ITextMark *mark) const { return m_marks.contains(mark); }\n    inline void clearMarks() { m_marks.clear(); }\n    inline void documentClosing() { Q_FOREACH(ITextMark *tm, m_marks) { tm->documentClosing(); } m_marks.clear();}\n\n    inline void setFolded(bool b) { m_folded = b; }\n    inline bool folded() const { return m_folded; }\n\n    inline void setParentheses(const Parentheses &parentheses) { m_parentheses = parentheses; }\n    inline void appendParenthese(const Parenthesis &parenthesis) { m_parentheses.append(parenthesis); }\n    inline void clearParentheses() { m_parentheses.clear(); }\n    inline const Parentheses &parentheses() const { return m_parentheses; }\n    inline bool hasParentheses() const { return !m_parentheses.isEmpty(); }\n    int braceDepthDelta() const;\n\n    void clearSpellCheckZones(bool defaultSpellCheck);\n    void addSpellCheckZone(int position, bool spellCheck);\n    bool shouldSpellCheck(int position) const;\n\n    inline bool setIfdefedOut() { bool result = m_ifdefedOut; m_ifdefedOut = true; return !result; }\n    inline bool clearIfdefedOut() { bool result = m_ifdefedOut; m_ifdefedOut = false; return result;}\n    inline bool ifdefedOut() const { return m_ifdefedOut; }\n\n\n    enum MatchType { NoMatch, Match, Mismatch  };\n    static MatchType checkOpenParenthesis(QTextCursor *cursor, QChar c);\n    static MatchType checkClosedParenthesis(QTextCursor *cursor, QChar c);\n    static MatchType matchCursorBackward(QTextCursor *cursor);\n    static MatchType matchCursorForward(QTextCursor *cursor);\n    static bool findPreviousOpenParenthesis(QTextCursor *cursor, bool select = false);\n    static bool findNextClosingParenthesis(QTextCursor *cursor, bool select = false);\n\n    static bool findPreviousBlockOpenParenthesis(QTextCursor *cursor, bool checkStartPosition = false);\n    static bool findNextBlockClosingParenthesis(QTextCursor *cursor);\n\n    // Get the code folding level\n    inline int foldingIndent() const { return m_foldingIndent; }\n    /* Set the code folding level.\n     *\n     * A code folding marker will appear the line *before* the one where the indention\n     * level increases. The code folding reagion will end in the last line that has the same\n     * indention level (or higher).\n     */\n    inline void setFoldingIndent(int indent) { m_foldingIndent = indent < 0 ? 0 : indent; }\n    // Set whether the first character of the folded region will show when the code is folded.\n    inline void setFoldingStartIncluded(bool included) { m_foldingStartIncluded = included; }\n    inline bool foldingStartIncluded() const { return m_foldingStartIncluded; }\n    // Set whether the last character of the folded region will show when the code is folded.\n    inline void setFoldingEndIncluded(bool included) { m_foldingEndIncluded = included; }\n    inline bool foldingEndIncluded() const { return m_foldingEndIncluded; }\n    inline int lexerState() const { return m_lexerState; }\n    inline void setLexerState(int state) {m_lexerState = state; }\n    inline void setFindExpressionMark(bool b) { m_findExpressionMark = b; }\n    inline bool isFindExpressionMark() { return m_findExpressionMark; }\n\n    CodeFormatterData *codeFormatterData() const { return m_codeFormatterData; }\n    void setCodeFormatterData(CodeFormatterData *data);\n    void setTokens(const QList<SyntaxToken> &tokens) {m_tokens = tokens; }\n    QList<SyntaxToken> tokens() const { return m_tokens; }\nprivate:\n    TextMarks m_marks;\n    uint m_folded : 1;\n    uint m_ifdefedOut : 1;\n    uint m_foldingIndent : 16;\n    uint m_lexerState : 4;\n    uint m_foldingStartIncluded : 1;\n    uint m_foldingEndIncluded : 1;\n    uint m_findExpressionMark:1;\n    Parentheses m_parentheses;\n    QMap<int,bool> m_spellCheckZones;\n    QList<SyntaxToken> m_tokens;\n    CodeFormatterData *m_codeFormatterData;\n};\n\n\nclass TEXTEDITOR_EXPORT BaseTextDocumentLayout : public QPlainTextDocumentLayout\n{\n    Q_OBJECT\n\npublic:\n    BaseTextDocumentLayout(QTextDocument *doc);\n    ~BaseTextDocumentLayout();\n\n    static void setParentheses(const QTextBlock &block, const Parentheses &parentheses);\n    static void clearParentheses(const QTextBlock &block) { setParentheses(block, Parentheses());}\n    static Parentheses parentheses(const QTextBlock &block);\n    static bool hasParentheses(const QTextBlock &block);\n    static bool setIfdefedOut(const QTextBlock &block);\n    static bool clearIfdefedOut(const QTextBlock &block);\n    static bool ifdefedOut(const QTextBlock &block);\n    static int braceDepthDelta(const QTextBlock &block);\n    static int braceDepth(const QTextBlock &block);\n    static void setBraceDepth(QTextBlock &block, int depth);\n    static void changeBraceDepth(QTextBlock &block, int delta);\n    static void setFoldingIndent(const QTextBlock &block, int indent);\n    static int foldingIndent(const QTextBlock &block);\n    static void setLexerState(const QTextBlock &block, int state);\n    static int lexerState(const QTextBlock &block);\n    static void changeFoldingIndent(QTextBlock &block, int delta);\n    static bool canFold(const QTextBlock &block);\n    static void doFoldOrUnfold(const QTextBlock& block, bool unfold);\n    static bool isFolded(const QTextBlock &block);\n    static void setFolded(const QTextBlock &block, bool folded);\n    static bool isFindExpressionMark(const QTextBlock &block);\n\n    static TextBlockUserData *testUserData(const QTextBlock &block) {\n        return static_cast<TextBlockUserData*>(block.userData());\n    }\n    static TextBlockUserData *userData(const QTextBlock &block) {\n        TextBlockUserData *data = static_cast<TextBlockUserData*>(block.userData());\n        if (!data && block.isValid())\n            const_cast<QTextBlock &>(block).setUserData((data = new TextBlockUserData));\n        return data;\n    }\n\n    class TEXTEDITOR_EXPORT FoldValidator\n    {\n    public:\n        FoldValidator();\n\n        void setup(BaseTextDocumentLayout *layout);\n        void reset();\n        void process(QTextBlock block);\n        void finalize();\n        bool requestDocUpdate() const { return m_requestDocUpdate; }\n    private:\n        BaseTextDocumentLayout *m_layout;\n        bool m_requestDocUpdate;\n        int m_insideFold;\n    };\n\npublic:\n    void emitDocumentSizeChanged() { emit documentSizeChanged(documentSize()); }\n    void setRequiredWidth(int width);\n    QSizeF documentSize() const;\n    void updateMarksLineNumber();\n    void updateMarksBlock(const QTextBlock &block);\npublic:\n    int lastSaveRevision;\n    bool hasMarks;\n    double maxMarkWidthFactor;\n\n    int m_requiredWidth;\n    TabSettings m_tabSettings;\n};\n\n} // namespace TextEditor\n\n#endif // BASETEXTDOCUMENTLAYOUT_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/colorscheme.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"colorscheme.h\"\n\n#include \"texteditorconstants.h\"\n\n#include <QtCore/QFile>\n#include <QtCore/QCoreApplication>\n#include <QXmlStreamWriter>\n\nusing namespace TextEditor;\n\nstatic const char *trueString = \"true\";\n\n// Format\n\nFormat::Format() :\n    m_foreground(Qt::black),\n    m_background(Qt::white),\n    m_bold(false),\n    m_italic(false)\n{\n}\n\nvoid Format::setForeground(const QColor &foreground)\n{\n    m_foreground = foreground;\n}\n\nvoid Format::setBackground(const QColor &background)\n{\n    m_background = background;\n}\n\nvoid Format::setBold(bool bold)\n{\n    m_bold = bold;\n}\n\nvoid Format::setItalic(bool italic)\n{\n    m_italic = italic;\n}\n\nstatic QColor stringToColor(const QString &string)\n{\n    if (string == QLatin1String(\"invalid\"))\n        return QColor();\n    return QColor(string);\n}\n\nbool Format::equals(const Format &f) const\n{\n    return m_foreground ==  f.m_foreground && m_background == f.m_background &&\n           m_bold == f.m_bold && m_italic == f.m_italic;\n}\n\nbool Format::fromString(const QString &str)\n{\n    *this = Format();\n\n    const QStringList lst = str.split(QLatin1Char(';'));\n    if (lst.count() != 4)\n        return false;\n\n    m_foreground = stringToColor(lst.at(0));\n    m_background = stringToColor(lst.at(1));\n    m_bold = lst.at(2) == QLatin1String(trueString);\n    m_italic = lst.at(3) == QLatin1String(trueString);\n    return true;\n}\n\n\n// ColorScheme\n\nColorScheme::ColorScheme()\n{\n}\n\nbool ColorScheme::contains(const QString &category) const\n{\n    return m_formats.contains(category);\n}\n\nFormat &ColorScheme::formatFor(const QString &category)\n{\n    return m_formats[category];\n}\n\nFormat ColorScheme::formatFor(const QString &category) const\n{\n    return m_formats.value(category);\n}\n\nvoid ColorScheme::setFormatFor(const QString &category, const Format &format)\n{\n    m_formats[category] = format;\n}\n\nvoid ColorScheme::clear()\n{\n    m_formats.clear();\n}\n\nbool ColorScheme::save(const QString &fileName) const\n{\n    QFile file(fileName);\n    if (!file.open(QIODevice::WriteOnly))\n        return false;\n\n    QXmlStreamWriter w(&file);\n    w.setAutoFormatting(true);\n    w.setAutoFormattingIndent(2);\n\n    w.writeStartDocument();\n    w.writeStartElement(QLatin1String(\"style-scheme\"));\n    w.writeAttribute(QLatin1String(\"version\"), QLatin1String(\"1.0\"));\n    if (!m_displayName.isEmpty())\n        w.writeAttribute(QLatin1String(\"name\"), m_displayName);\n\n    QMapIterator<QString, Format> i(m_formats);\n    while (i.hasNext()) {\n        const Format &format = i.next().value();\n        w.writeStartElement(QLatin1String(\"style\"));\n        w.writeAttribute(QLatin1String(\"name\"), i.key());\n        if (format.foreground().isValid())\n            w.writeAttribute(QLatin1String(\"foreground\"), format.foreground().name().toLower());\n        if (format.background().isValid())\n            w.writeAttribute(QLatin1String(\"background\"), format.background().name().toLower());\n        if (format.bold())\n            w.writeAttribute(QLatin1String(\"bold\"), QLatin1String(trueString));\n        if (format.italic())\n            w.writeAttribute(QLatin1String(\"italic\"), QLatin1String(trueString));\n        w.writeEndElement();\n    }\n\n    w.writeEndElement();\n    w.writeEndDocument();\n\n    return true;\n}\n\nnamespace {\n\nclass ColorSchemeReader : public QXmlStreamReader\n{\npublic:\n    ColorSchemeReader() :\n        m_scheme(0)\n    {}\n\n    bool read(const QString &fileName, ColorScheme *scheme);\n    QString readName(const QString &fileName);\n\nprivate:\n    bool readNextStartElement();\n    void skipCurrentElement();\n    void readStyleScheme();\n    void readStyle();\n\n    ColorScheme *m_scheme;\n    QString m_name;\n};\n\nbool ColorSchemeReader::read(const QString &fileName, ColorScheme *scheme)\n{\n    m_scheme = scheme;\n\n    if (m_scheme)\n        m_scheme->clear();\n\n    QFile file(fileName);\n    if (!file.open(QFile::ReadOnly | QFile::Text))\n        return false;\n\n    setDevice(&file);\n\n    if (readNextStartElement() && name() == QLatin1String(\"style-scheme\"))\n        readStyleScheme();\n    else\n        raiseError(QCoreApplication::translate(\"TextEditor::Internal::ColorScheme\", \"Not a color scheme file.\"));\n\n    return true;\n}\n\nQString ColorSchemeReader::readName(const QString &fileName)\n{\n    read(fileName, 0);\n    return m_name;\n}\n\nbool ColorSchemeReader::readNextStartElement()\n{\n    while (readNext() != Invalid) {\n        if (isStartElement())\n            return true;\n        else if (isEndElement())\n            return false;\n    }\n    return false;\n}\n\nvoid ColorSchemeReader::skipCurrentElement()\n{\n    while (readNextStartElement())\n        skipCurrentElement();\n}\n\nvoid ColorSchemeReader::readStyleScheme()\n{\n    Q_ASSERT(isStartElement() && name() == QLatin1String(\"style-scheme\"));\n\n    const QXmlStreamAttributes attr = attributes();\n    m_name = attr.value(QLatin1String(\"name\")).toString();\n    if (!m_scheme)\n        // We're done\n        raiseError(QLatin1String(\"name loaded\"));\n    else\n        m_scheme->setDisplayName(m_name);\n\n    while (readNextStartElement()) {\n        if (name() == QLatin1String(\"style\"))\n            readStyle();\n        else\n            skipCurrentElement();\n    }\n}\n\nvoid ColorSchemeReader::readStyle()\n{\n    Q_ASSERT(isStartElement() && name() == QLatin1String(\"style\"));\n\n    const QXmlStreamAttributes attr = attributes();\n    QString name = attr.value(QLatin1String(\"name\")).toString();\n    QString foreground = attr.value(QLatin1String(\"foreground\")).toString();\n    QString background = attr.value(QLatin1String(\"background\")).toString();\n    bool bold = attr.value(QLatin1String(\"bold\")) == QLatin1String(trueString);\n    bool italic = attr.value(QLatin1String(\"italic\")) == QLatin1String(trueString);\n\n    Format format;\n\n    if (QColor::isValidColor(foreground))\n        format.setForeground(QColor(foreground));\n    else\n        format.setForeground(QColor());\n\n    if (QColor::isValidColor(background))\n        format.setBackground(QColor(background));\n    else\n        format.setBackground(QColor());\n\n    format.setBold(bold);\n    format.setItalic(italic);\n\n    m_scheme->setFormatFor(name, format);\n\n    skipCurrentElement();\n}\n\n} // anonymous namespace\n\n\nbool ColorScheme::load(const QString &fileName)\n{\n    ColorSchemeReader reader;\n    return reader.read(fileName, this) && !reader.hasError();\n}\n\nQString ColorScheme::readNameOfScheme(const QString &fileName)\n{\n    return ColorSchemeReader().readName(fileName);\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/colorscheme.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef COLORSCHEME_H\n#define COLORSCHEME_H\n\n#include \"texteditor_global.h\"\n\n#include <QtCore/QMap>\n#include <QtCore/QString>\n#include <QtGui/QColor>\n\nnamespace TextEditor {\n\n/*! Format for a particular piece of text (text/comment, etc). */\nclass TEXTEDITOR_EXPORT Format\n{\npublic:\n    Format();\n\n    QColor foreground() const { return m_foreground; }\n    void setForeground(const QColor &foreground);\n\n    QColor background() const { return m_background; }\n    void setBackground(const QColor &background);\n\n    bool bold() const { return m_bold; }\n    void setBold(bool bold);\n\n    bool italic() const { return m_italic; }\n    void setItalic(bool italic);\n\n    bool equals(const Format &f) const;\n\n    QString toString() const;\n    bool fromString(const QString &str);\n\nprivate:\n    QColor m_foreground;\n    QColor m_background;\n    bool m_bold;\n    bool m_italic;\n};\n\ninline bool operator==(const Format &f1, const Format &f2) { return f1.equals(f2); }\ninline bool operator!=(const Format &f1, const Format &f2) { return !f1.equals(f2); }\n\n\n/*! A color scheme combines a set of formats for different highlighting\n    categories. It also provides saving and loading of the scheme to a file.\n */\nclass ColorScheme\n{\npublic:\n    ColorScheme();\n\n    void setDisplayName(const QString &name)\n    { m_displayName = name; }\n\n    QString displayName() const\n    { return m_displayName; }\n\n    inline bool isEmpty() const\n    { return m_formats.isEmpty(); }\n\n    bool contains(const QString &category) const;\n\n    Format &formatFor(const QString &category);\n    Format formatFor(const QString &category) const;\n\n    void setFormatFor(const QString &category, const Format &format);\n\n    void clear();\n\n    bool save(const QString &fileName) const;\n    bool load(const QString &fileName);\n\n    inline bool equals(const ColorScheme &cs) const\n    {\n        return m_formats == cs.m_formats\n                && m_displayName == cs.m_displayName;\n    }\n\n    static QString readNameOfScheme(const QString &fileName);\n\nprivate:\n    QMap<QString, Format> m_formats;\n    QString m_displayName;\n};\n\ninline bool operator==(const ColorScheme &cs1, const ColorScheme &cs2) { return cs1.equals(cs2); }\ninline bool operator!=(const ColorScheme &cs1, const ColorScheme &cs2) { return !cs1.equals(cs2); }\n\n} // namespace TextEditor\n\n#endif // COLORSCHEME_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/context.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"context.h\"\n\nusing namespace TextEditor;\nusing namespace Internal;\n\nContext::Context() : m_fallthrough(false), m_dynamic(false)\n{}\n\nContext::Context(const Context &context) :\n    m_id(context.m_id), m_name(context.m_name), m_lineBeginContext(context.m_lineBeginContext),\n    m_lineEndContext(context.m_lineEndContext), m_fallthroughContext(context.m_fallthroughContext),\n    m_itemData(context.m_itemData), m_fallthrough(context.m_fallthrough),\n    m_dynamic(context.m_dynamic), m_instructions(context.m_instructions),\n    m_definition(context.m_definition)\n{\n    // Rules need to be deeply copied because of dynamic contexts.\n    foreach (const QSharedPointer<Rule> &rule, context.m_rules)\n        m_rules.append(QSharedPointer<Rule>(rule->clone()));\n}\n\n\nContext::~Context()\n{}\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/context.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef CONTEXT_H\n#define CONTEXT_H\n\n#include \"includerulesinstruction.h\"\n#include \"reuse.h\"\n#include \"dynamicrule.h\"\n#include \"highlightdefinition.h\"\n#include <QtCore/QString>\n#include <QtCore/QList>\n#include <QtCore/QSharedPointer>\n\nnamespace TextEditor {\nnamespace Internal {\n\nclass Context\n{\npublic:\n    Context();\n    Context(const Context &context);\n    ~Context();\n    const Context &operator=(Context copy)\n    {\n        swap(copy);\n        return *this;\n    }\n    void swap(Context &context)\n    {\n        qSwap(m_id, context.m_id);\n        qSwap(m_name, context.m_name);\n        qSwap(m_lineBeginContext, context.m_lineBeginContext);\n        qSwap(m_lineEndContext, context.m_lineEndContext);\n        qSwap(m_fallthroughContext, context.m_fallthroughContext);\n        qSwap(m_itemData, context.m_itemData);\n        qSwap(m_fallthrough, context.m_fallthrough);\n        qSwap(m_dynamic, context.m_dynamic);\n        qSwap(m_rules, context.m_rules);\n        qSwap(m_instructions, context.m_instructions);\n        qSwap(m_definition, context.m_definition);\n    }\n\n    void configureId(const int unique)\n    { m_id.append(QString::number(unique)); }\n\n    const QString &id() const\n    { return m_id; }\n\n    void setName(const QString &name)\n    {\n        m_name = name;\n        m_id = name;\n    }\n\n    const QString &name() const\n    { return m_name; }\n\n    void setLineBeginContext(const QString &context)\n    { m_lineBeginContext = context; }\n\n    const QString &lineBeginContext() const\n    { return m_lineBeginContext; }\n\n    void setLineEndContext(const QString &context)\n    { m_lineEndContext = context; }\n\n    const QString &lineEndContext() const\n    { return m_lineEndContext; }\n\n    void setFallthroughContext(const QString &context)\n    { m_fallthroughContext = context; }\n\n    const QString &fallthroughContext() const\n    { return m_fallthroughContext; }\n\n    void setItemData(const QString &itemData)\n    { m_itemData = itemData; }\n\n    const QString &itemData() const\n    { return m_itemData; }\n\n    void setFallthrough(const QString &fallthrough)\n    { m_fallthrough = toBool(fallthrough); }\n\n    bool isFallthrough() const\n    { return m_fallthrough; }\n\n    void setDynamic(const QString &dynamic)\n    { m_dynamic = toBool(dynamic); }\n\n    bool isDynamic() const\n    { return m_dynamic; }\n\n    void updateDynamicRules(const QStringList &captures) const\n    {\n        TextEditor::Internal::updateDynamicRules(m_rules, captures);\n    }\n\n    void addRule(const QSharedPointer<Rule> &rule)\n    { m_rules.append(rule); }\n\n    void addRule(const QSharedPointer<Rule> &rule, int index)\n    { m_rules.insert(index, rule); }\n\n    const QList<QSharedPointer<Rule> > & rules() const\n    { return m_rules; }\n\n    void addIncludeRulesInstruction(const IncludeRulesInstruction &instruction)\n    { m_instructions.append(instruction); }\n\n    const QList<IncludeRulesInstruction> &includeRulesInstructions() const\n    { return m_instructions; }\n\n    void clearIncludeRulesInstructions()\n    { m_instructions.clear(); }\n\n    void setDefinition(const QSharedPointer<HighlightDefinition> &definition)\n    { m_definition = definition; }\n\n    const QSharedPointer<HighlightDefinition> &definition() const\n    { return m_definition; }\n\nprotected:\n    QString m_id;\n    QString m_name;\n    QString m_lineBeginContext;\n    QString m_lineEndContext;\n    QString m_fallthroughContext;\n    QString m_itemData;\n    bool m_fallthrough;\n    bool m_dynamic;\n\n    QList<QSharedPointer<Rule> > m_rules;\n    QList<IncludeRulesInstruction> m_instructions;\n\n    QSharedPointer<HighlightDefinition> m_definition;\n};\n\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // CONTEXT_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/definitiondownloader.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"definitiondownloader.h\"\n\n#include <QtCore/QLatin1Char>\n#include <QtCore/QEventLoop>\n#include <QtCore/QFile>\n#include <QtCore/QScopedPointer>\n#include <QtNetwork/QNetworkAccessManager>\n#include <QtNetwork/QNetworkRequest>\n#include <QtNetwork/QNetworkReply>\n\nusing namespace TextEditor;\nusing namespace Internal;\n\nDefinitionDownloader::DefinitionDownloader(const QUrl &url, const QString &localPath) :\n    m_url(url), m_localPath(localPath), m_status(Unknown)\n{}\n\nvoid DefinitionDownloader::run()\n{\n    QNetworkAccessManager manager;\n\n    int currentAttempt = 0;\n    const int maxAttempts = 5;\n    while (currentAttempt < maxAttempts) {\n        QScopedPointer<QNetworkReply> reply(getData(&manager));\n        if (reply->error() != QNetworkReply::NoError) {\n            m_status = NetworkError;\n            return;\n        }\n\n        ++currentAttempt;\n        QVariant variant = reply->attribute(QNetworkRequest::RedirectionTargetAttribute);\n        if (variant.isValid() && currentAttempt < maxAttempts) {\n            m_url = variant.toUrl();\n        } else if (!variant.isValid()) {\n            saveData(reply.data());\n            return;\n        }\n    }\n}\n\nQNetworkReply *DefinitionDownloader::getData(QNetworkAccessManager *manager) const\n{\n    QNetworkRequest request(m_url);\n    QNetworkReply *reply = manager->get(request);\n\n    QEventLoop eventLoop;\n    connect(reply, SIGNAL(finished()), &eventLoop, SLOT(quit()));\n    eventLoop.exec();\n\n    return reply;\n}\n\nvoid DefinitionDownloader::saveData(QNetworkReply *reply)\n{\n    const QString &urlPath = m_url.path();\n    const QString &fileName =\n        urlPath.right(urlPath.length() - urlPath.lastIndexOf(QLatin1Char('/')) - 1);\n    QFile file(m_localPath + fileName);\n    if (file.open(QIODevice::Text | QIODevice::WriteOnly)) {\n        file.write(reply->readAll());\n        file.close();\n        m_status = Ok;\n    } else {\n        m_status = WriteError;\n    }\n}\n\nDefinitionDownloader::Status DefinitionDownloader::status() const\n{ return m_status; }\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/definitiondownloader.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef DEFINITIONDOWNLOADER_H\n#define DEFINITIONDOWNLOADER_H\n\n#include <QtCore/QObject>\n#include <QtCore/QString>\n#include <QtCore/QUrl>\n\nQT_BEGIN_NAMESPACE\nclass QNetworkReply;\nclass QNetworkAccessManager;\nQT_END_NAMESPACE\n\nnamespace TextEditor {\nnamespace Internal {\n\nclass DefinitionDownloader : public QObject\n{\n    Q_OBJECT\npublic:\n    DefinitionDownloader(const QUrl &url, const QString &localPath);\n\n    enum Status {\n        NetworkError,\n        WriteError,\n        Ok,\n        Unknown\n    };\n\n    void run();\n    Status status() const;\n\nprivate:\n    QNetworkReply *getData(QNetworkAccessManager *manager) const;\n    void saveData(QNetworkReply *reply);\n\n    QUrl m_url;\n    QString m_localPath;\n    Status m_status;\n};\n\n// Currently QtConcurrent::map does not support passing member functions for sequence of pointers\n// (only works for operator.*) which is the case for the downloaders held by the manager. Then the\n// reason for the following functor. If something is implemented (for example a type traits) to\n// handle operator->* in QtConcurrent::map this functor will not be necessary since it would be\n// possible to directly pass DefinitionDownloader::run.\nstruct DownloaderStarter\n{\n    void operator()(DefinitionDownloader *downloader)\n    { downloader->run(); }\n};\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // DEFINITIONDOWNLOADER_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/dynamicrule.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"dynamicrule.h\"\n#include \"reuse.h\"\n\nusing namespace TextEditor;\nusing namespace Internal;\n\nDynamicRule::DynamicRule() : m_active(false)\n{}\n\nDynamicRule::~DynamicRule()\n{}\n\nvoid DynamicRule::setActive(const QString &active)\n{ m_active = toBool(active); }\n\nbool DynamicRule::isActive() const\n{ return m_active; }\n\nvoid DynamicRule::replaceExpressions(const QStringList &captures)\n{\n    doReplaceExpressions(captures);\n    updateDynamicRules(children(), captures);\n}\n\nnamespace TextEditor {\nnamespace Internal {\n\nvoid updateDynamicRules(const QList<QSharedPointer<Rule> > &rules, const QStringList &captures)\n{\n    foreach (QSharedPointer<Rule> rule, rules) {\n        DynamicRule *dynamicRule = dynamic_cast<DynamicRule *>(rule.data());\n        if (dynamicRule && dynamicRule->isActive())\n            dynamicRule->replaceExpressions(captures);\n    }\n}\n\n} // namespace Internal\n} // namespace TextEditor\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/dynamicrule.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef DYNAMICRULE_H\n#define DYNAMICRULE_H\n\n#include \"rule.h\"\n\nQT_BEGIN_NAMESPACE\nclass QStringList;\nQT_END_NAMESPACE\n\nnamespace TextEditor {\nnamespace Internal {\n\nclass DynamicRule : public Rule\n{\npublic:\n    DynamicRule();\n    virtual ~DynamicRule();\n\n    void setActive(const QString &active);\n    bool isActive() const;\n\n    virtual void replaceExpressions(const QStringList &captures);\n\nprivate:\n    virtual void doReplaceExpressions(const QStringList &captures) = 0;\n\n    bool m_active;\n};\n\nvoid updateDynamicRules(const QList<QSharedPointer<Rule> > &rules, const QStringList &captures);\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // DYNAMICRULE_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/highlightdefinition.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"highlightdefinition.h\"\n#include \"highlighterexception.h\"\n#include \"context.h\"\n#include \"keywordlist.h\"\n#include \"itemdata.h\"\n#include \"reuse.h\"\n\n#include <QtCore/QString>\n\nusing namespace TextEditor;\nusing namespace Internal;\n\nHighlightDefinition::HighlightDefinition() :\n    m_singleLineCommentAfterWhiteSpaces(false),\n    m_keywordCaseSensitivity(Qt::CaseSensitive),\n    m_indentationBasedFolding(false)\n{\n    QString s(QLatin1String(\".():!+,-<=>%&/;?[]^{|}~\\\\*, \\t\"));\n    foreach (const QChar &c, s)\n        m_delimiters.insert(c);\n}\n\nHighlightDefinition::~HighlightDefinition()\n{}\n\ntemplate <class Element, class Container>\nQSharedPointer<Element> HighlightDefinition::\nGenericHelper::create(const QString &name, Container &container)\n{\n    if (name.isEmpty())\n        throw HighlighterException();\n\n    if (container.contains(name))\n        throw HighlighterException();\n\n    return container.insert(name, QSharedPointer<Element>(new Element)).value();\n}\n\ntemplate <class Element, class Container>\nQSharedPointer<Element> HighlightDefinition::\nGenericHelper::find(const QString &name, const Container &container) const\n{\n    typename Container::const_iterator it = container.find(name);\n    if (it == container.end())\n        throw HighlighterException();\n\n    return it.value();\n}\n\nQSharedPointer<KeywordList> HighlightDefinition::createKeywordList(const QString &list)\n{ return m_helper.create<KeywordList>(list, m_lists); }\n\nQSharedPointer<KeywordList> HighlightDefinition::keywordList(const QString &list)\n{ return m_helper.find<KeywordList>(list, m_lists); }\n\nQSharedPointer<Context> HighlightDefinition::createContext(const QString &context, bool initial)\n{\n    if (initial)\n        m_initialContext = context;\n\n    QSharedPointer<Context> newContext = m_helper.create<Context>(context, m_contexts);\n    newContext->setName(context);\n    return newContext;\n}\n\nQSharedPointer<Context> HighlightDefinition::initialContext() const\n{ return m_helper.find<Context>(m_initialContext, m_contexts); }\n\nQSharedPointer<Context> HighlightDefinition::context(const QString &context) const\n{ return m_helper.find<Context>(context, m_contexts); }\n\nconst QHash<QString, QSharedPointer<Context> > &HighlightDefinition::contexts() const\n{ return m_contexts; }\n\nQSharedPointer<ItemData> HighlightDefinition::createItemData(const QString &itemData)\n{ return m_helper.create<ItemData>(itemData, m_itemsData); }\n\nQSharedPointer<ItemData> HighlightDefinition::itemData(const QString &itemData) const\n{ return m_helper.find<ItemData>(itemData, m_itemsData); }\n\nvoid HighlightDefinition::setSingleLineComment(const QString &start)\n{ m_singleLineComment = start; }\n\nconst QString &HighlightDefinition::singleLineComment() const\n{ return m_singleLineComment; }\n\nvoid HighlightDefinition::setCommentAfterWhitespaces(const QString &after)\n{\n    if (after == QLatin1String(\"afterwhitespace\"))\n        m_singleLineCommentAfterWhiteSpaces = true;\n}\n\nbool HighlightDefinition::isCommentAfterWhiteSpaces() const\n{ return m_singleLineCommentAfterWhiteSpaces; }\n\nvoid HighlightDefinition::setMultiLineCommentStart(const QString &start)\n{ m_multiLineCommentStart = start; }\n\nconst QString &HighlightDefinition::multiLineCommentStart() const\n{ return m_multiLineCommentStart; }\n\nvoid HighlightDefinition::setMultiLineCommentEnd(const QString &end)\n{ m_multiLineCommentEnd = end; }\n\nconst QString &HighlightDefinition::multiLineCommentEnd() const\n{ return m_multiLineCommentEnd; }\n\nvoid HighlightDefinition::setMultiLineCommentRegion(const QString &region)\n{ m_multiLineCommentRegion = region; }\n\nconst QString &HighlightDefinition::multiLineCommentRegion() const\n{ return m_multiLineCommentRegion; }\n\nvoid HighlightDefinition::removeDelimiters(const QString &characters)\n{\n    for (int i = 0; i < characters.length(); ++i)\n        m_delimiters.remove(characters.at(i));\n}\n\nvoid HighlightDefinition::addDelimiters(const QString &characters)\n{\n    for (int i = 0; i < characters.length(); ++i) {\n        if (!m_delimiters.contains(characters.at(i)))\n            m_delimiters.insert(characters.at(i));\n    }\n}\n\nbool HighlightDefinition::isDelimiter(const QChar &character) const\n{\n    if (m_delimiters.contains(character))\n        return true;\n    return false;\n}\n\nvoid HighlightDefinition::setKeywordsSensitive(const QString &sensitivity)\n{\n    if (!sensitivity.isEmpty())\n        m_keywordCaseSensitivity = toCaseSensitivity(toBool(sensitivity));\n}\n\nQt::CaseSensitivity HighlightDefinition::keywordsSensitive() const\n{ return m_keywordCaseSensitivity; }\n\nvoid HighlightDefinition::setIndentationBasedFolding(const QString &indentationBasedFolding)\n{ m_indentationBasedFolding = toBool(indentationBasedFolding); }\n\nbool HighlightDefinition::isIndentationBasedFolding() const\n{ return m_indentationBasedFolding; }\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/highlightdefinition.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef HIGHLIGHTDEFINITION_H\n#define HIGHLIGHTDEFINITION_H\n\n#include <QtCore/QString>\n#include <QtCore/QHash>\n#include <QtCore/QSet>\n#include <QtCore/QSharedPointer>\n\nnamespace TextEditor {\nnamespace Internal {\n\nclass KeywordList;\nclass Context;\nclass ItemData;\n\nclass HighlightDefinition\n{\npublic:\n    HighlightDefinition();\n    ~HighlightDefinition();\n\n    QSharedPointer<KeywordList> createKeywordList(const QString &list);\n    QSharedPointer<KeywordList> keywordList(const QString &list);\n\n    QSharedPointer<Context> createContext(const QString &context, bool initial);\n    QSharedPointer<Context> initialContext() const;\n    QSharedPointer<Context> context(const QString &context) const;\n    const QHash<QString, QSharedPointer<Context> > &contexts() const;\n\n    QSharedPointer<ItemData> createItemData(const QString &itemData);\n    QSharedPointer<ItemData> itemData(const QString &itemData) const;\n\n    void setKeywordsSensitive(const QString &sensitivity);\n    Qt::CaseSensitivity keywordsSensitive() const;\n\n    void addDelimiters(const QString &characters);\n    void removeDelimiters(const QString &characters);\n    bool isDelimiter(const QChar &character) const;\n\n    void setSingleLineComment(const QString &start);\n    const QString &singleLineComment() const;\n\n    void setCommentAfterWhitespaces(const QString &after);\n    bool isCommentAfterWhiteSpaces() const;\n\n    void setMultiLineCommentStart(const QString &start);\n    const QString &multiLineCommentStart() const;\n\n    void setMultiLineCommentEnd(const QString &end);\n    const QString &multiLineCommentEnd() const;\n\n    void setMultiLineCommentRegion(const QString &region);\n    const QString &multiLineCommentRegion() const;\n\n    void setIndentationBasedFolding(const QString &indentationBasedFolding);\n    bool isIndentationBasedFolding() const;\n\nprivate:\n    Q_DISABLE_COPY(HighlightDefinition)\n\n    struct GenericHelper\n    {\n        template <class Element, class Container>\n        QSharedPointer<Element> create(const QString &name, Container &container);\n\n        template <class Element, class Container>\n        QSharedPointer<Element> find(const QString &name, const Container &container) const;\n    };\n    GenericHelper m_helper;\n\n    QHash<QString, QSharedPointer<KeywordList> > m_lists;\n    QHash<QString, QSharedPointer<Context> > m_contexts;\n    QHash<QString, QSharedPointer<ItemData> > m_itemsData;\n\n    QString m_initialContext;\n\n    QString m_singleLineComment;\n    bool m_singleLineCommentAfterWhiteSpaces;\n\n    QString m_multiLineCommentStart;\n    QString m_multiLineCommentEnd;\n    QString m_multiLineCommentRegion;\n\n    Qt::CaseSensitivity m_keywordCaseSensitivity;\n\n    bool m_indentationBasedFolding;\n\n    QSet<QChar> m_delimiters;\n};\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // HIGHLIGHTDEFINITION_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/highlightdefinitionhandler.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"highlightdefinitionhandler.h\"\n#include \"highlightdefinition.h\"\n#include \"specificrules.h\"\n#include \"itemdata.h\"\n#include \"keywordlist.h\"\n#include \"context.h\"\n#include \"reuse.h\"\n#include \"manager2.h\"\n#include \"highlighterexception.h\"\n#include <QDebug>\n\n#include <QtCore/QLatin1String>\n\nusing namespace TextEditor;\nusing namespace Internal;\n\nnamespace {\n    static const QLatin1String kName(\"name\");\n    static const QLatin1String kList(\"list\");\n    static const QLatin1String kItem(\"item\");\n    static const QLatin1String kContext(\"context\");\n    static const QLatin1String kAttribute(\"attribute\");\n    static const QLatin1String kDynamic(\"dynamic\");\n    static const QLatin1String kFallthrough(\"fallthrough\");\n    static const QLatin1String kLineEndContext(\"lineEndContext\");\n    static const QLatin1String kLineBeginContext(\"lineBeginContext\");\n    static const QLatin1String kFallthroughContext(\"fallthroughContext\");\n    static const QLatin1String kBeginRegion(\"beginRegion\");\n    static const QLatin1String kEndRegion(\"endRegion\");\n    static const QLatin1String kLookAhead(\"lookAhead\");\n    static const QLatin1String kFirstNonSpace(\"firstNonSpace\");\n    static const QLatin1String kColumn(\"column\");\n    static const QLatin1String kItemData(\"itemData\");\n    static const QLatin1String kDefStyleNum(\"defStyleNum\");\n    static const QLatin1String kColor(\"color\");\n    static const QLatin1String kSelColor(\"selColor\");\n    static const QLatin1String kItalic(\"italic\");\n    static const QLatin1String kBold(\"bold\");\n    static const QLatin1String kUnderline(\"underline\");\n    static const QLatin1String kStrikeout(\"strikeOut\");\n    static const QLatin1String kSpellChecking(\"spellChecking\");\n    static const QLatin1String kChar(\"char\");\n    static const QLatin1String kChar1(\"char1\");\n    static const QLatin1String kString(\"String\");\n    static const QLatin1String kInsensitive(\"insensitive\");\n    static const QLatin1String kMinimal(\"minimal\");\n    static const QLatin1String kKeywords(\"keywords\");\n    static const QLatin1String kCaseSensitive(\"casesensitive\");\n    static const QLatin1String kWeakDeliminator(\"weakDeliminator\");\n    static const QLatin1String kAdditionalDeliminator(\"additionalDeliminator\");\n    static const QLatin1String kWordWrapDeliminator(\"wordWrapDeliminator\");\n    static const QLatin1String kComment(\"comment\");\n    static const QLatin1String kPosition(\"position\");\n    static const QLatin1String kSingleLine(\"singleline\");\n    static const QLatin1String kMultiLine(\"multiline\");\n    static const QLatin1String kStart(\"start\");\n    static const QLatin1String kEnd(\"end\");\n    static const QLatin1String kRegion(\"region\");\n    static const QLatin1String kDetectChar(\"DetectChar\");\n    static const QLatin1String kDetect2Chars(\"Detect2Chars\");\n    static const QLatin1String kAnyChar(\"AnyChar\");\n    static const QLatin1String kStringDetect(\"StringDetect\");\n    static const QLatin1String kRegExpr(\"RegExpr\");\n    static const QLatin1String kKeyword(\"keyword\");\n    static const QLatin1String kInt(\"Int\");\n    static const QLatin1String kFloat(\"Float\");\n    static const QLatin1String kHlCOct(\"HlCOct\");\n    static const QLatin1String kHlCHex(\"HlCHex\");\n    static const QLatin1String kHlCStringChar(\"HlCStringChar\");\n    static const QLatin1String kHlCChar(\"HlCChar\");\n    static const QLatin1String kRangeDetect(\"RangeDetect\");\n    static const QLatin1String kLineContinue(\"LineContinue\");\n    static const QLatin1String kIncludeRules(\"IncludeRules\");\n    static const QLatin1String kDetectSpaces(\"DetectSpaces\");\n    static const QLatin1String kDetectIdentifier(\"DetectIdentifier\");\n    static const QLatin1String kLanguage(\"language\");\n    static const QLatin1String kExtensions(\"extensions\");\n    static const QLatin1String kIncludeAttrib(\"includeAttrib\");\n    static const QLatin1String kFolding(\"folding\");\n    static const QLatin1String kIndentationSensitive(\"indentationsensitive\");\n    static const QLatin1String kHash(\"#\");\n    static const QLatin1String kDoubleHash(\"##\");\n}\n\nHighlightDefinitionHandler::\nHighlightDefinitionHandler(const QSharedPointer<HighlightDefinition> &definition) :\n    m_definition(definition),\n    m_processingKeyword(false),\n    m_initialContext(true)\n{}\n\nHighlightDefinitionHandler::~HighlightDefinitionHandler()\n{}\n\nbool HighlightDefinitionHandler::startDocument()\n{\n    return true;\n}\n\nbool HighlightDefinitionHandler::endDocument()\n{\n    processIncludeRules();\n    return true;\n}\n\nbool HighlightDefinitionHandler::startElement(const QString &,\n                                              const QString &,\n                                              const QString &qName,\n                                              const QXmlAttributes &atts)\n{\n    if (qName == kList) {\n        listElementStarted(atts);\n    } else if (qName == kItem) {\n        itemElementStarted();\n    } else if (qName == kContext) {\n        contextElementStarted(atts);\n    } else if (qName == kItemData) {\n        itemDataElementStarted(atts);\n    } else if (qName == kComment) {\n        commentElementStarted(atts);\n    } else if (qName == kKeywords) {\n        keywordsElementStarted(atts);\n    } else if (qName == kFolding) {\n        foldingElementStarted(atts);\n    } else if (qName == kDetectChar) {\n        detectCharStarted(atts);\n    } else if (qName == kDetect2Chars) {\n        detect2CharsStarted(atts);\n    } else if (qName == kAnyChar) {\n        anyCharStarted(atts);\n    } else if (qName == kStringDetect) {\n        stringDetectedStarted(atts);\n    } else if (qName == kRegExpr) {\n        regExprStarted(atts);\n    } else if (qName == kKeyword) {\n        keywordStarted(atts);\n    } else if (qName == kInt) {\n        intStarted(atts);\n    } else if (qName == kFloat) {\n        floatStarted(atts);\n    } else if (qName == kHlCOct) {\n        hlCOctStarted(atts);\n    } else if (qName == kHlCHex) {\n        hlCHexStarted(atts);\n    } else if (qName == kHlCStringChar) {\n        hlCStringCharStarted(atts);\n    } else if (qName == kHlCChar) {\n        hlCCharStarted(atts);\n    } else if (qName == kRangeDetect) {\n        rangeDetectStarted(atts);\n    } else if (qName == kLineContinue) {\n        lineContinue(atts);\n    } else if (qName == kIncludeRules) {\n        includeRulesStarted(atts);\n    } else if (qName == kDetectSpaces) {\n        detectSpacesStarted(atts);\n    } else if (qName == kDetectIdentifier) {\n        detectIdentifier(atts);\n    }\n\n    return true;\n}\n\nbool HighlightDefinitionHandler::endElement(const QString &, const QString &, const QString &qName)\n{\n    if (qName == kItem) {\n        m_currentList->addKeyword(m_currentKeyword.trimmed());\n        m_processingKeyword = false;\n    } else if (qName == kDetectChar || qName == kDetect2Chars || qName == kAnyChar ||\n               qName == kStringDetect || qName == kRegExpr || qName == kKeyword || qName == kInt ||\n               qName == kFloat || qName == kHlCOct || qName == kHlCHex || qName == kHlCStringChar ||\n               qName == kHlCChar || qName == kRangeDetect || qName == kLineContinue ||\n               qName == kDetectSpaces || qName == kDetectIdentifier) {\n        m_currentRule.pop();\n    }\n\n    return true;\n}\n\nbool HighlightDefinitionHandler::characters(const QString& ch)\n{\n    // Character data of an element may be reported in more than one chunk.\n    if (m_processingKeyword)\n        m_currentKeyword.append(ch);\n\n    return true;\n}\n\nvoid HighlightDefinitionHandler::listElementStarted(const QXmlAttributes &atts)\n{\n    m_currentList = m_definition->createKeywordList(atts.value(kName));\n}\n\nvoid HighlightDefinitionHandler::itemElementStarted()\n{\n    m_currentKeyword.clear();\n    m_processingKeyword = true;\n}\n\nvoid HighlightDefinitionHandler::contextElementStarted(const QXmlAttributes &atts)\n{\n    m_currentContext = m_definition->createContext(atts.value(kName), m_initialContext);\n    m_currentContext->setDefinition(m_definition);\n    m_currentContext->setItemData(atts.value(kAttribute));\n    m_currentContext->setDynamic(atts.value(kDynamic));\n    m_currentContext->setFallthrough(atts.value(kFallthrough));\n    m_currentContext->setFallthroughContext(atts.value(kFallthroughContext));\n    m_currentContext->setLineBeginContext(atts.value(kLineBeginContext));\n    m_currentContext->setLineEndContext(atts.value(kLineEndContext));\n\n    m_initialContext = false;\n}\n\nvoid HighlightDefinitionHandler::ruleElementStarted(const QXmlAttributes &atts,\n                                                    const QSharedPointer<Rule> &rule)\n{\n    // The definition of a rule is not necessarily the same of its enclosing context because of\n    // externally included rules.\n    rule->setDefinition(m_definition);\n    rule->setItemData(atts.value(kAttribute));\n    rule->setContext(atts.value(kContext));\n    rule->setBeginRegion(atts.value(kBeginRegion));\n    rule->setEndRegion(atts.value(kEndRegion));\n    rule->setLookAhead(atts.value(kLookAhead));\n    rule->setFirstNonSpace(atts.value(kFirstNonSpace));\n    rule->setColumn(atts.value(kColumn));\n\n    if (m_currentRule.isEmpty())\n        m_currentContext->addRule(rule);\n    else\n        m_currentRule.top()->addChild(rule);\n\n    m_currentRule.push(rule);\n}\n\nvoid HighlightDefinitionHandler::itemDataElementStarted(const QXmlAttributes &atts) const\n{\n    QSharedPointer<ItemData> itemData = m_definition->createItemData(atts.value(kName));\n    itemData->setStyle(atts.value(kDefStyleNum));\n    itemData->setColor(atts.value(kColor));\n    itemData->setSelectionColor(atts.value(kSelColor));\n    itemData->setItalic(atts.value(kItalic));\n    itemData->setBold(atts.value(kBold));\n    itemData->setUnderlined(atts.value(kUnderline));\n    itemData->setStrikeOut(atts.value(kStrikeout));\n    itemData->setSpellChecking(atts.value(kSpellChecking));\n}\n\nvoid HighlightDefinitionHandler::commentElementStarted(const QXmlAttributes &atts) const\n{\n    const QString &commentType = atts.value(kName);\n    if (commentType.compare(kSingleLine, Qt::CaseInsensitive) == 0) {\n        m_definition->setSingleLineComment(atts.value(kStart));\n        m_definition->setCommentAfterWhitespaces(atts.value(kPosition));\n    } else if (commentType.compare(kMultiLine, Qt::CaseInsensitive) == 0) {\n        m_definition->setMultiLineCommentStart(atts.value(kStart));\n        m_definition->setMultiLineCommentEnd(atts.value(kEnd));\n        m_definition->setMultiLineCommentRegion(atts.value(kRegion));\n    }\n}\n\nvoid HighlightDefinitionHandler::keywordsElementStarted(const QXmlAttributes &atts) const\n{\n    // Global case sensitivity appears last in the document (required by dtd) and is set here.\n    m_definition->setKeywordsSensitive(atts.value(kCaseSensitive));\n    m_definition->removeDelimiters(atts.value(kWeakDeliminator));\n    m_definition->addDelimiters(atts.value(kAdditionalDeliminator));\n    //@todo: wordWrapDelimiters?\n}\n\nvoid HighlightDefinitionHandler::foldingElementStarted(const QXmlAttributes &atts) const\n{\n    m_definition->setIndentationBasedFolding(atts.value(kIndentationSensitive));\n}\n\nvoid HighlightDefinitionHandler::detectCharStarted(const QXmlAttributes &atts)\n{\n    DetectCharRule *rule = new DetectCharRule;\n    rule->setChar(atts.value(kChar));\n    rule->setActive(atts.value(kDynamic));\n    ruleElementStarted(atts, QSharedPointer<Rule>(rule));\n}\n\nvoid HighlightDefinitionHandler::detect2CharsStarted(const QXmlAttributes &atts)\n{\n    Detect2CharsRule *rule = new Detect2CharsRule;\n    rule->setChar(atts.value(kChar));\n    rule->setChar1(atts.value(kChar1));\n    rule->setActive(atts.value(kDynamic));\n    ruleElementStarted(atts, QSharedPointer<Rule>(rule));\n}\n\nvoid HighlightDefinitionHandler::anyCharStarted(const QXmlAttributes &atts)\n{\n    AnyCharRule *rule = new AnyCharRule;\n    rule->setCharacterSet(atts.value(kString));\n    ruleElementStarted(atts, QSharedPointer<Rule>(rule));\n}\n\nvoid HighlightDefinitionHandler::stringDetectedStarted(const QXmlAttributes &atts)\n{\n    StringDetectRule *rule = new StringDetectRule;\n    rule->setString(atts.value(kString));\n    rule->setInsensitive(atts.value(kInsensitive));\n    rule->setActive(atts.value(kDynamic));\n    ruleElementStarted(atts, QSharedPointer<Rule>(rule));\n}\n\nvoid HighlightDefinitionHandler::regExprStarted(const QXmlAttributes &atts)\n{\n    RegExprRule *rule = new RegExprRule;\n    rule->setPattern(atts.value(kString));\n    rule->setMinimal(atts.value(kMinimal));\n    rule->setInsensitive(atts.value(kInsensitive));\n    rule->setActive(atts.value(kDynamic));\n    ruleElementStarted(atts, QSharedPointer<Rule>(rule));\n}\n\nvoid HighlightDefinitionHandler::keywordStarted(const QXmlAttributes &atts)\n{\n    KeywordRule *rule = new KeywordRule(m_definition);\n    rule->setList(atts.value(kString));\n    rule->setInsensitive(atts.value(kInsensitive));\n    ruleElementStarted(atts, QSharedPointer<Rule>(rule));\n}\n\nvoid HighlightDefinitionHandler::intStarted(const QXmlAttributes &atts)\n{    \n    ruleElementStarted(atts, QSharedPointer<Rule>(new IntRule));\n}\n\nvoid HighlightDefinitionHandler::floatStarted(const QXmlAttributes &atts)\n{\n    ruleElementStarted(atts, QSharedPointer<Rule>(new FloatRule));\n}\n\nvoid HighlightDefinitionHandler::hlCOctStarted(const QXmlAttributes &atts)\n{    \n    ruleElementStarted(atts, QSharedPointer<Rule>(new HlCOctRule));\n}\n\nvoid HighlightDefinitionHandler::hlCHexStarted(const QXmlAttributes &atts)\n{    \n    ruleElementStarted(atts, QSharedPointer<Rule>(new HlCHexRule));\n}\n\nvoid HighlightDefinitionHandler::hlCStringCharStarted(const QXmlAttributes &atts)\n{    \n    ruleElementStarted(atts, QSharedPointer<Rule>(new HlCStringCharRule));\n}\n\nvoid HighlightDefinitionHandler::hlCCharStarted(const QXmlAttributes &atts)\n{\n    ruleElementStarted(atts, QSharedPointer<Rule>(new HlCCharRule));\n}\n\nvoid HighlightDefinitionHandler::rangeDetectStarted(const QXmlAttributes &atts)\n{\n    RangeDetectRule *rule = new RangeDetectRule;\n    rule->setChar(atts.value(kChar));\n    rule->setChar1(atts.value(kChar1));\n    ruleElementStarted(atts, QSharedPointer<Rule>(rule));\n}\n\nvoid HighlightDefinitionHandler::lineContinue(const QXmlAttributes &atts)\n{    \n    ruleElementStarted(atts, QSharedPointer<Rule>(new LineContinueRule));\n}\n\nvoid HighlightDefinitionHandler::includeRulesStarted(const QXmlAttributes &atts)\n{\n    // Include rules are treated as instructions for latter processing.\n    IncludeRulesInstruction instruction(atts.value(kContext), m_currentContext->rules().size(),\n                                        atts.value(kIncludeAttrib));\n\n    // Include rules (as many others) are not allowed as a child.\n    m_currentContext->addIncludeRulesInstruction(instruction);\n}\n\nvoid HighlightDefinitionHandler::detectSpacesStarted(const QXmlAttributes &atts)\n{\n    ruleElementStarted(atts, QSharedPointer<Rule>(new DetectSpacesRule));\n}\n\nvoid HighlightDefinitionHandler::detectIdentifier(const QXmlAttributes &atts)\n{\n    ruleElementStarted(atts, QSharedPointer<Rule>(new DetectIdentifierRule));\n}\n\nvoid HighlightDefinitionHandler::processIncludeRules() const\n{\n    const QHash<QString, QSharedPointer<Context> > &allContexts = m_definition->contexts();\n    foreach (const QSharedPointer<Context> &context, allContexts)\n        processIncludeRules(context);\n}\n\nvoid HighlightDefinitionHandler::processIncludeRules(const QSharedPointer<Context> &context) const\n{\n    if (context->includeRulesInstructions().isEmpty())\n        return;\n\n    int rulesIncluded = 0;\n    const QList<IncludeRulesInstruction> &instructions = context->includeRulesInstructions();\n    foreach (const IncludeRulesInstruction &instruction, instructions) {\n\n        QSharedPointer<Context> sourceContext;\n        const QString &sourceName = instruction.sourceContext();\n        if (sourceName.startsWith(kDoubleHash)) {\n            // This refers to an external definition. The rules included are the ones from its\n            // initial context. Others contexts and rules from the external definition will work\n            // transparently to the highlighter. This is because contexts and rules know the\n            // definition they are from.\n            QString externalName = QString::fromRawData(sourceName.unicode() + 2,\n                                                        sourceName.length() - 2);\n            const QString &id = Manager2::instance()->definitionIdByName(externalName);\n\n            // If there is an incorrect circular dependency among definitions this is skipped.\n            if (Manager2::instance()->isBuildingDefinition(id))\n                continue;\n\n            const QSharedPointer<HighlightDefinition> &externalDefinition =\n                Manager2::instance()->definition(id);\n            if (externalDefinition.isNull())\n                continue;\n\n            sourceContext = externalDefinition->initialContext();\n        } else if (!sourceName.startsWith(kHash)) {\n            sourceContext = m_definition->context(sourceName);\n\n            // Recursion is done only for context direct rules. Child rules are not processed\n            // because they cannot be include rules.\n            processIncludeRules(sourceContext);\n        } else {\n            continue;\n        }\n\n        if (instruction.replaceItemData()) {\n            context->setItemData(sourceContext->itemData());\n            context->setDefinition(sourceContext->definition());\n        }\n\n        foreach (QSharedPointer<Rule> rule, sourceContext->rules()) {\n            context->addRule(rule, instruction.indexHint() + rulesIncluded);\n            ++rulesIncluded;\n        }\n    }\n    context->clearIncludeRulesInstructions();\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/highlightdefinitionhandler.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef HIGHLIGHTDEFINITIONHANDLER_H\n#define HIGHLIGHTDEFINITIONHANDLER_H\n\n#include <QtCore/QString>\n#include <QtCore/QList>\n#include <QtCore/QSharedPointer>\n#include <QtCore/QStack>\n\n#include <QtXml/QXmlDefaultHandler>\n\nnamespace TextEditor {\nnamespace Internal {\n\nclass KeywordList;\nclass Context;\nclass Rule;\nclass HighlightDefinition;\n\nclass HighlightDefinitionHandler : public QXmlDefaultHandler\n{\npublic:\n    HighlightDefinitionHandler(const QSharedPointer<HighlightDefinition> &definition);\n    ~HighlightDefinitionHandler();\n\n    bool startDocument();\n    bool endDocument();\n    bool startElement(const QString &namespaceURI, const QString &localName,\n                      const QString &qName, const QXmlAttributes &atts);\n    bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName);\n    bool characters(const QString &ch);\n\nprivate:\n    void listElementStarted(const QXmlAttributes &atts);\n    void itemElementStarted();\n    void contextElementStarted(const QXmlAttributes &atts);\n    void itemDataElementStarted(const QXmlAttributes &atts) const;\n    void commentElementStarted(const QXmlAttributes &atts) const;\n    void keywordsElementStarted(const QXmlAttributes &atts) const;\n    void foldingElementStarted(const QXmlAttributes &atts) const;\n    void ruleElementStarted(const QXmlAttributes &atts, const QSharedPointer<Rule> &rule);\n\n    // Specific rules.\n    void detectCharStarted(const QXmlAttributes &atts);\n    void detect2CharsStarted(const QXmlAttributes &atts);\n    void anyCharStarted(const QXmlAttributes &atts);\n    void stringDetectedStarted(const QXmlAttributes &atts);\n    void regExprStarted(const QXmlAttributes &atts);\n    void keywordStarted(const QXmlAttributes &atts);\n    void intStarted(const QXmlAttributes &atts);\n    void floatStarted(const QXmlAttributes &atts);\n    void hlCOctStarted(const QXmlAttributes &atts);\n    void hlCHexStarted(const QXmlAttributes &atts);\n    void hlCStringCharStarted(const QXmlAttributes &atts);\n    void hlCCharStarted(const QXmlAttributes &atts);\n    void rangeDetectStarted(const QXmlAttributes &atts);\n    void lineContinue(const QXmlAttributes &atts);\n    void includeRulesStarted(const QXmlAttributes &atts);\n    void detectSpacesStarted(const QXmlAttributes &atts);\n    void detectIdentifier(const QXmlAttributes &atts);\n\n    void processIncludeRules() const;\n    void processIncludeRules(const QSharedPointer<Context> &context) const;\n\n    QSharedPointer<HighlightDefinition> m_definition;\n\n    bool m_processingKeyword;\n    QString m_currentKeyword;\n    QSharedPointer<KeywordList> m_currentList;\n    QSharedPointer<Context> m_currentContext;\n    QStack<QSharedPointer<Rule> > m_currentRule;\n\n    bool m_initialContext;\n};\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // HIGHLIGHTDEFINITIONHANDLER_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/highlightdefinitionmetadata.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"highlightdefinitionmetadata.h\"\n\nusing namespace TextEditor;\nusing namespace Internal;\n\nconst QLatin1String HighlightDefinitionMetaData::kPriority(\"priority\");\nconst QLatin1String HighlightDefinitionMetaData::kName(\"name\");\nconst QLatin1String HighlightDefinitionMetaData::kExtensions(\"extensions\");\nconst QLatin1String HighlightDefinitionMetaData::kMimeType(\"mimetype\");\nconst QLatin1String HighlightDefinitionMetaData::kVersion(\"version\");\nconst QLatin1String HighlightDefinitionMetaData::kUrl(\"url\");\n\nHighlightDefinitionMetaData::HighlightDefinitionMetaData() : m_priority(0)\n{}\n\nvoid HighlightDefinitionMetaData::setPriority(const int priority)\n{ m_priority = priority; }\n\nint HighlightDefinitionMetaData::priority() const\n{ return m_priority; }\n\nvoid HighlightDefinitionMetaData::setId(const QString &id)\n{ m_id = id; }\n\nconst QString &HighlightDefinitionMetaData::id() const\n{ return m_id; }\n\nvoid HighlightDefinitionMetaData::setName(const QString &name)\n{ m_name = name; }\n\nconst QString &HighlightDefinitionMetaData::name() const\n{ return m_name; }\n\nvoid HighlightDefinitionMetaData::setVersion(const QString &version)\n{ m_version = version; }\n\nconst QString &HighlightDefinitionMetaData::version() const\n{ return m_version; }\n\nvoid HighlightDefinitionMetaData::setFileName(const QString &fileName)\n{ m_fileName = fileName; }\n\nconst QString &HighlightDefinitionMetaData::fileName() const\n{ return m_fileName; }\n\nvoid HighlightDefinitionMetaData::setPatterns(const QStringList &patterns)\n{ m_patterns = patterns; }\n\nconst QStringList &HighlightDefinitionMetaData::patterns() const\n{ return m_patterns; }\n\nvoid HighlightDefinitionMetaData::setMimeTypes(const QStringList &mimeTypes)\n{ m_mimeTypes = mimeTypes; }\n\nconst QStringList &HighlightDefinitionMetaData::mimeTypes() const\n{ return m_mimeTypes; }\n\nvoid HighlightDefinitionMetaData::setUrl(const QUrl &url)\n{ m_url = url; }\n\nconst QUrl &HighlightDefinitionMetaData::url() const\n{ return m_url; }\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/highlightdefinitionmetadata.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef HIGHLIGHTDEFINITIONMETADATA_H\n#define HIGHLIGHTDEFINITIONMETADATA_H\n\n#include <QtCore/QString>\n#include <QtCore/QLatin1String>\n#include <QtCore/QStringList>\n#include <QtCore/QUrl>\n\nnamespace TextEditor {\nnamespace Internal {\n\nclass HighlightDefinitionMetaData\n{\npublic:\n    HighlightDefinitionMetaData();\n\n    void setPriority(const int priority);\n    int priority() const;\n\n    void setId(const QString &id);\n    const QString &id() const;\n\n    void setName(const QString &name);\n    const QString &name() const;\n\n    void setVersion(const QString &version);\n    const QString &version() const;\n\n    void setFileName(const QString &fileName);\n    const QString &fileName() const;\n\n    void setPatterns(const QStringList &patterns);\n    const QStringList &patterns() const;\n\n    void setMimeTypes(const QStringList &mimeTypes);\n    const QStringList &mimeTypes() const;\n\n    void setUrl(const QUrl &url);\n    const QUrl &url() const;\n\n    static const QLatin1String kPriority;\n    static const QLatin1String kName;\n    static const QLatin1String kExtensions;\n    static const QLatin1String kMimeType;\n    static const QLatin1String kVersion;\n    static const QLatin1String kUrl;\n\nprivate:\n    int m_priority;\n    QString m_id;\n    QString m_name;\n    QString m_version;\n    QString m_fileName;\n    QStringList m_patterns;\n    QStringList m_mimeTypes;\n    QUrl m_url;\n};\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // HIGHLIGHTDEFINITIONMETADATA_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/highlighter.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"highlighter.h\"\n#include \"highlightdefinition.h\"\n#include \"context.h\"\n#include \"rule.h\"\n#include \"itemdata.h\"\n#include \"highlighterexception.h\"\n#include \"progressdata.h\"\n#include \"reuse.h\"\n#include \"tabsettings.h\"\n\n#include <QtCore/QLatin1String>\n#include <QtCore/QLatin1Char>\n#include <QDebug>\n\nusing namespace TextEditor;\nusing namespace Internal;\n\nnamespace {\n    static const QLatin1String kStay(\"#stay\");\n    static const QLatin1String kPop(\"#pop\");\n    static const QLatin1Char kBackSlash('\\\\');\n    static const QLatin1Char kHash('#');\n}\n\nHighlighter::Highlighter(QTextDocument *parent) :\n    TextEditor::SyntaxHighlighter(parent),\n    m_regionDepth(0),\n    m_lastRegionDepth(0),\n    m_indentationBasedFolding(false),\n    m_tabSize(4),\n    m_persistentObservableStatesCounter(PersistentsStart),\n    m_dynamicContextsCounter(0),\n    m_isBroken(false),\n    m_stringOrComment(false)\n{}\n\nHighlighter::~Highlighter()\n{}\n\nHighlighter::BlockData::BlockData() : m_foldingIndentDelta(0), m_originalObservableState(-1)\n{}\n\nHighlighter::BlockData::~BlockData()\n{}\n\nvoid  Highlighter::setDefaultContext(const QSharedPointer<Context> &defaultContext)\n{\n    m_defaultContext = defaultContext;\n    m_persistentObservableStates.insert(m_defaultContext->name(), Default);\n    m_indentationBasedFolding = defaultContext->definition()->isIndentationBasedFolding();\n}\n\n//void Highlighter::setTabSettings(const TabSettings &ts)\n//{\n//    m_tabSettings = &ts;\n//}\n\nvoid Highlighter::setTabSize(int tabSize)\n{\n    m_tabSize = tabSize;\n}\n\nvoid Highlighter::highlightBlock(const QString &text)\n{\n    if (!m_defaultContext.isNull() && !m_isBroken) {\n        try {\n            if (!currentBlockUserData())\n                initializeBlockData();\n            setupDataForBlock(text);\n\n            handleContextChange(m_currentContext->lineBeginContext(),\n                                m_currentContext->definition());\n\n            ProgressData progress;\n            const int length = text.length();\n            m_lastRegionChanged = -1;\n            while (progress.offset() < length)\n                iterateThroughRules(text, length, &progress, false, m_currentContext->rules());\n\n            handleContextChange(m_currentContext->lineEndContext(),\n                                m_currentContext->definition(),\n                                false);\n            m_contexts.clear();\n\n            if (m_indentationBasedFolding) {\n                applyIndentationBasedFolding(text);\n            } else {\n                applyRegionBasedFolding();\n\n                // In the case region depth has changed since the last time the state was set.\n                setCurrentBlockState(computeState(extractObservableState(currentBlockState())));\n            }\n        } catch (const HighlighterException &) {\n            m_isBroken = true;\n        }\n    }\n\n    applyFormatToSpaces(text, m_creatorFormats[VisualWhitespace]);\n}\n\nvoid Highlighter::setupDataForBlock(const QString &text)\n{\n    if (extractObservableState(currentBlockState()) == WillContinue)\n        analyseConsistencyOfWillContinueBlock(text);\n\n    if (previousBlockState() == -1) {\n        m_regionDepth = 0;\n        m_lastRegionDepth = 0;\n        setupDefault();\n    } else {\n        m_regionDepth = extractRegionDepth(previousBlockState());\n        m_lastRegionDepth = m_regionDepth;\n        const int observablePreviousState = extractObservableState(previousBlockState());\n        if (observablePreviousState == Default)\n            setupDefault();\n        else if (observablePreviousState == WillContinue)\n            setupFromWillContinue();\n        else if (observablePreviousState == Continued)\n            setupFromContinued();\n        else\n            setupFromPersistent();\n\n        blockData(currentBlockUserData())->m_foldingRegions =\n            blockData(currentBlock().previous().userData())->m_foldingRegions;\n        blockData(currentBlockUserData())->clearParentheses();\n    }\n    blockData(currentBlockUserData())->clearSpellCheckZones(true);\n\n    assignCurrentContext();\n}\n\nvoid Highlighter::setupDefault()\n{\n    m_contexts.push_back(m_defaultContext);\n\n    setCurrentBlockState(computeState(Default));\n}\n\nvoid Highlighter::setupFromWillContinue()\n{\n    BlockData *previousData = blockData(currentBlock().previous().userData());\n    m_contexts.push_back(previousData->m_contextToContinue);\n\n    BlockData *data = blockData(currentBlock().userData());\n    data->m_originalObservableState = previousData->m_originalObservableState;\n\n    if (currentBlockState() == -1 || extractObservableState(currentBlockState()) == Default)\n        setCurrentBlockState(computeState(Continued));\n}\n\nvoid Highlighter::setupFromContinued()\n{\n    BlockData *previousData = blockData(currentBlock().previous().userData());\n\n    Q_ASSERT(previousData->m_originalObservableState != WillContinue &&\n             previousData->m_originalObservableState != Continued);\n\n    if (previousData->m_originalObservableState == Default ||\n        previousData->m_originalObservableState == -1) {\n        m_contexts.push_back(m_defaultContext);\n    } else {\n        pushContextSequence(previousData->m_originalObservableState);\n    }\n\n    setCurrentBlockState(computeState(previousData->m_originalObservableState));\n}\n\nvoid Highlighter::setupFromPersistent()\n{\n    pushContextSequence(extractObservableState(previousBlockState()));\n\n    setCurrentBlockState(previousBlockState());\n}\n\nvoid Highlighter::iterateThroughRules(const QString &text,\n                                      const int length,\n                                      ProgressData *progress,\n                                      const bool childRule,\n                                      const QList<QSharedPointer<Rule> > &rules)\n{\n    typedef QList<QSharedPointer<Rule> >::const_iterator RuleIterator;\n\n    bool contextChanged = false;\n    bool atLeastOneMatch = false;\n\n    RuleIterator it = rules.begin();\n    RuleIterator endIt = rules.end();\n    bool detlaDeptn = false;\n    while (it != endIt && progress->offset() < length) {\n        int startOffset = progress->offset();\n        const QSharedPointer<Rule> &rule = *it;\n\n        if (rule->itemData() == \"String\" ||\n                rule->itemData() == \"Comment\") {\n            m_stringOrComment = true;\n        } else {\n            m_stringOrComment = false;\n        }\n\n        if (rule->matchSucceed(text, length, progress)) {\n            atLeastOneMatch = true;\n            if (!m_stringOrComment) {\n                if (!rule->beginRegion().isEmpty()) {\n                    QChar ch = text.at(startOffset);\n                    if (ch == '{' || ch == '(' || ch == '[' ) {\n                        blockData(currentBlockUserData())->appendParenthese(Parenthesis(Parenthesis::Opened,ch,startOffset));\n                    }\n                }\n                if (!rule->endRegion().isEmpty()) {\n                    QChar ch = text.at(startOffset);\n                    if (ch == '}' || ch == ')' || ch == ']' ) {\n                        blockData(currentBlockUserData())->appendParenthese(Parenthesis(Parenthesis::Closed,ch,startOffset));\n                    }\n                }\n            }\n\n            if (!m_indentationBasedFolding) {\n                if (!rule->endRegion().isEmpty()) {\n                    QStack<QString> *currentRegions =\n                        &blockData(currentBlockUserData())->m_foldingRegions;\n                    if (!currentRegions->isEmpty() && rule->endRegion() == currentRegions->top()) {\n                        currentRegions->pop();\n                        --m_regionDepth;\n                        if (m_lastRegionDepth > m_regionDepth) {\n                            detlaDeptn = true;\n                        }\n//                        if (!m_stringOrComment && progress->isClosingBraceMatchAtNonEnd()) {\n//                            --blockData(currentBlockUserData())->m_foldingIndentDelta;\n//                        }\n                    }\n                }\n                if (!rule->beginRegion().isEmpty()) {\n                    blockData(currentBlockUserData())->m_foldingRegions.push(rule->beginRegion());\n                    ++m_regionDepth;                    \n//                    if (!m_stringOrComment && progress->isOpeningBraceMatchAtFirstNonSpace()) {\n//                        ++blockData(currentBlockUserData())->m_foldingIndentDelta;\n//                    }\n                }\n                progress->clearBracesMatches();\n            }\n\n            if (progress->isWillContinueLine()) {\n                createWillContinueBlock();\n                progress->setWillContinueLine(false);\n            } else {\n                if (rule->hasChildren())\n                    iterateThroughRules(text, length, progress, true, rule->children());\n\n                if (!rule->context().isEmpty() && contextChangeRequired(rule->context())) {\n                    m_currentCaptures = progress->captures();\n                    changeContext(rule->context(), rule->definition());\n                    contextChanged = true;\n                }\n            }\n\n            // Format is not applied to child rules directly (but relative to the offset of their\n            // parent) nor to look ahead rules.\n            if (!childRule && !rule->isLookAhead()) {\n                if (rule->itemData().isEmpty())\n                    applyFormat(startOffset, progress->offset() - startOffset,\n                                m_currentContext->itemData(), m_currentContext->definition());\n                else\n                    applyFormat(startOffset, progress->offset() - startOffset, rule->itemData(),\n                                rule->definition());\n            }\n\n            // When there is a match of one child rule the others should be skipped. Otherwise\n            // the highlighting would be incorret in a case like 9ULLLULLLUULLULLUL, for example.\n            if (contextChanged || childRule) {\n                break;\n            } else {\n                it = rules.begin();\n                continue;\n            }\n        }\n        ++it;\n    }\n\n    if (!childRule && !atLeastOneMatch) {\n        if (m_currentContext->isFallthrough()) {\n            handleContextChange(m_currentContext->fallthroughContext(),\n                                m_currentContext->definition());\n            iterateThroughRules(text, length, progress, false, m_currentContext->rules());\n        } else {\n            applyFormat(progress->offset(), 1, m_currentContext->itemData(),\n                        m_currentContext->definition());\n            if (progress->isOnlySpacesSoFar() && !text.at(progress->offset()).isSpace())\n                progress->setOnlySpacesSoFar(false);\n            progress->incrementOffset();\n        }\n    }\n\n    if (m_lastRegionDepth == m_regionDepth &&\n        m_lastRegionChanged != m_lastRegionDepth) {\n        m_lastRegionChanged = m_lastRegionDepth;\n        if (detlaDeptn || (\n                    blockData(currentBlockUserData())->hasParentheses() &&\n                    ( blockData(currentBlockUserData())->parentheses().last().type == Parenthesis::Opened)\n                    ) ) {\n            blockData(currentBlockUserData())->m_foldingIndentDelta--;\n        }\n    }\n\n//    if (detlaDeptn && (m_lastRegionDepth == m_regionDepth)) {\n//        blockData(currentBlockUserData())->m_foldingIndentDelta--;\n//    }\n}\n\nbool Highlighter::contextChangeRequired(const QString &contextName) const\n{\n    if (contextName == kStay)\n        return false;\n    return true;\n}\n\nvoid Highlighter::changeContext(const QString &contextName,\n                                const QSharedPointer<HighlightDefinition> &definition,\n                                const bool assignCurrent)\n{\n    if (contextName.startsWith(kPop)) {\n        QStringList list = contextName.split(kHash, qtSkipEmptyParts);\n        for (int i = 0; i < list.size(); ++i)\n            m_contexts.pop_back();\n\n        if (extractObservableState(currentBlockState()) >= PersistentsStart) {\n            // One or more contexts were popped during during a persistent state.\n            const QString &currentSequence = currentContextSequence();\n            if (m_persistentObservableStates.contains(currentSequence))\n                setCurrentBlockState(\n                    computeState(m_persistentObservableStates.value(currentSequence)));\n            else\n                setCurrentBlockState(\n                    computeState(m_leadingObservableStates.value(currentSequence)));\n        }\n    } else {\n        const QSharedPointer<Context> &context = definition->context(contextName);\n\n        if (context->isDynamic())\n            pushDynamicContext(context);\n        else\n            m_contexts.push_back(context);\n\n        if (m_contexts.back()->lineEndContext() == kStay ||\n            extractObservableState(currentBlockState()) >= PersistentsStart) {\n            const QString &currentSequence = currentContextSequence();\n            mapLeadingSequence(currentSequence);\n            if (m_contexts.back()->lineEndContext() == kStay) {\n                // A persistent context was pushed.\n                mapPersistentSequence(currentSequence);\n                setCurrentBlockState(\n                    computeState(m_persistentObservableStates.value(currentSequence)));\n            }\n        }\n    }\n\n    if (assignCurrent)\n        assignCurrentContext();\n}\n\nvoid Highlighter::handleContextChange(const QString &contextName,\n                                      const QSharedPointer<HighlightDefinition> &definition,\n                                      const bool setCurrent)\n{\n    if (!contextName.isEmpty() && contextChangeRequired(contextName))\n        changeContext(contextName, definition, setCurrent);\n}\n\nvoid Highlighter::applyFormat(int offset,\n                              int count,\n                              const QString &itemDataName,\n                              const QSharedPointer<HighlightDefinition> &definition)\n{\n    if (count == 0)\n        return;\n\n    QSharedPointer<ItemData> itemData;\n    try {\n        itemData = definition->itemData(itemDataName);\n    } catch (const HighlighterException &) {\n        // There are some broken files. For instance, the Printf context in java.xml points to an\n        // inexistent Printf item data. These cases are considered to have normal text style.\n        return;\n    }\n\n    blockData(currentBlockUserData())->addSpellCheckZone(offset, itemData->isSpellChecking());\n\n    TextFormatId formatId = m_kateFormats.m_ids.value(itemData->style());\n    if (formatId == Normal && !itemData->isCustomized()) {\n        return;\n    }\n//    if (formatId != Normal) {\n//        QHash<TextFormatId, QTextCharFormat>::const_iterator cit =\n//            m_creatorFormats.constFind(formatId);\n//        if (cit != m_creatorFormats.constEnd()) {\n//            QTextCharFormat format = cit.value();\n            QTextCharFormat format = m_creatorFormats[formatId];\n            //if (itemData->isCustomized()) {\n                // Please notice that the following are applied every time for item datas which have\n                // customizations. The configureFormats method could be used to provide a \"one time\"\n                // configuration, but it would probably require to traverse all item datas from all\n                // definitions available/loaded (either to set the values or for some \"notifying\"\n                // strategy). This is because the highlighter does not really know on which\n                // definition(s) it is working. Since not many item datas specify customizations I\n                // think this approach would fit better. If there are other ideas...\n                if (itemData->color().isValid())\n                    format.setForeground(itemData->color());\n                if (itemData->isItalicSpecified())\n                    format.setFontItalic(itemData->isItalic());\n                if (itemData->isBoldSpecified())\n                    format.setFontWeight(toFontWeight(itemData->isBold()));\n                if (itemData->isUnderlinedSpecified())\n                    format.setFontUnderline(itemData->isUnderlined());\n                if (itemData->isStrikeOutSpecified())\n                    format.setFontStrikeOut(itemData->isStrikeOut());\n            //}\n            setFormat(offset, count, format, formatId);\n        //}\n    //}\n}\n\nvoid Highlighter::createWillContinueBlock()\n{\n    BlockData *data = blockData(currentBlockUserData());\n    const int currentObservableState = extractObservableState(currentBlockState());\n    if (currentObservableState == Continued) {\n        BlockData *previousData = blockData(currentBlock().previous().userData());\n        data->m_originalObservableState = previousData->m_originalObservableState;\n    } else if (currentObservableState != WillContinue) {\n        data->m_originalObservableState = currentObservableState;\n    }\n    data->m_contextToContinue = m_currentContext;\n\n    setCurrentBlockState(computeState(WillContinue));\n}\n\nvoid Highlighter::analyseConsistencyOfWillContinueBlock(const QString &text)\n{\n    if (currentBlock().next().isValid() && (\n        text.length() == 0 || text.at(text.length() - 1) != kBackSlash) &&\n        extractObservableState(currentBlock().next().userState()) != Continued) {\n        currentBlock().next().setUserState(computeState(Continued));\n    }\n\n    if (text.length() == 0 || text.at(text.length() - 1) != kBackSlash) {\n        BlockData *data = blockData(currentBlockUserData());\n        data->m_contextToContinue.clear();\n        setCurrentBlockState(computeState(data->m_originalObservableState));\n    }\n}\n\nvoid Highlighter::mapPersistentSequence(const QString &contextSequence)\n{\n    if (!m_persistentObservableStates.contains(contextSequence)) {\n        int newState = m_persistentObservableStatesCounter;\n        m_persistentObservableStates.insert(contextSequence, newState);\n        m_persistentContexts.insert(newState, m_contexts);\n        ++m_persistentObservableStatesCounter;\n    }\n}\n\nvoid Highlighter::mapLeadingSequence(const QString &contextSequence)\n{\n    if (!m_leadingObservableStates.contains(contextSequence))\n        m_leadingObservableStates.insert(contextSequence,\n                                         extractObservableState(currentBlockState()));\n}\n\nvoid Highlighter::pushContextSequence(int state)\n{\n    const QVector<QSharedPointer<Context> > &contexts = m_persistentContexts.value(state);\n    for (int i = 0; i < contexts.size(); ++i)\n        m_contexts.push_back(contexts.at(i));\n}\n\nQString Highlighter::currentContextSequence() const\n{\n    QString sequence;\n    for (int i = 0; i < m_contexts.size(); ++i)\n        sequence.append(m_contexts.at(i)->id());\n\n    return sequence;\n}\n\nHighlighter::BlockData *Highlighter::initializeBlockData()\n{\n    BlockData *data = new BlockData;\n    setCurrentBlockUserData(data);\n    return data;\n}\n\nHighlighter::BlockData *Highlighter::blockData(QTextBlockUserData *userData)\n{\n    return static_cast<BlockData *>(userData);\n}\n\nvoid Highlighter::pushDynamicContext(const QSharedPointer<Context> &baseContext)\n{\n    // A dynamic context is created from another context which serves as its basis. Then,\n    // its rules are updated according to the captures from the calling regular expression which\n    // triggered the push of the dynamic context.\n    QSharedPointer<Context> context(new Context(*baseContext));\n    context->configureId(m_dynamicContextsCounter);\n    context->updateDynamicRules(m_currentCaptures);\n    m_contexts.push_back(context);\n    ++m_dynamicContextsCounter;\n}\n\nvoid Highlighter::assignCurrentContext()\n{\n    if (m_contexts.isEmpty()) {\n        // This is not supposed to happen. However, there are broken files (for example, php.xml)\n        // which will cause this behaviour. In such cases pushing the default context is enough to\n        // keep highlighter working.\n        m_contexts.push_back(m_defaultContext);\n    }\n    m_currentContext = m_contexts.back();\n}\n\nint Highlighter::extractRegionDepth(const int state)\n{\n    return state >> 12;\n}\n\nint Highlighter::extractObservableState(const int state)\n{\n    return state & 0xFFF;\n}\n\nint Highlighter::computeState(const int observableState) const\n{\n    return m_regionDepth << 12 | observableState;\n}\n\nint Highlighter::firstNonSpace(const QString &text) const\n{\n    int i = 0;\n    while (i < text.size()) {\n        if (!text.at(i).isSpace())\n            return i;\n        ++i;\n    }\n    return i;\n}\n\nint Highlighter::tabIndentationColumn(const QString &text) const\n{\n    return tabColumnAt(text, firstNonSpace(text));\n}\n\nint Highlighter::tabColumnAt(const QString &text, int position) const\n{\n    int column = 0;\n    for (int i = 0; i < position; ++i) {\n        if (text.at(i) == QLatin1Char('\\t'))\n            column = column - (column % m_tabSize) + m_tabSize;\n        else\n            ++column;\n    }\n    return column;\n}\n\nvoid Highlighter::setFoldIndent(BlockData *data, int indent, const QTextBlock &block)\n{\n    if (data->foldingIndent() != indent) {\n        emit foldIndentChanged(block);\n    }\n    data->setFoldingIndent(indent);\n}\n\nvoid Highlighter::applyRegionBasedFolding()\n{\n    int folding = 0;\n    BlockData *data = blockData(currentBlockUserData());\n    BlockData *previousData = blockData(currentBlock().previous().userData());\n    if (previousData) {\n        folding = extractRegionDepth(previousBlockState());\n        if (data->m_foldingIndentDelta != 0) {\n            folding += data->m_foldingIndentDelta;\n            if (data->m_foldingIndentDelta > 0)\n                data->setFoldingStartIncluded(true);\n            else\n                previousData->setFoldingEndIncluded(false);\n            data->m_foldingIndentDelta = 0;\n        }\n    }\n    data->setFoldingEndIncluded(true);\n    //data->setFoldingIndent(folding);\n    setFoldIndent(data,folding,currentBlock());\n}\n\nvoid Highlighter::applyIndentationBasedFolding(const QString &text)\n{\n    BlockData *data = blockData(currentBlockUserData());\n    data->setFoldingEndIncluded(true);\n\n    // If this line is empty, check its neighbours. They all might be part of the same block.\n    if (text.trimmed().isEmpty()) {\n        //data->setFoldingIndent(0);\n        setFoldIndent(data,0,currentBlock());\n        const int previousIndent = neighbouringNonEmptyBlockIndent(currentBlock().previous(), true);\n        if (previousIndent > 0) {\n            const int nextIndent = neighbouringNonEmptyBlockIndent(currentBlock().next(), false);\n            if (previousIndent == nextIndent) {\n                //data->setFoldingIndent(previousIndent);\n                setFoldIndent(data,0,currentBlock());\n            }\n        }\n    } else {\n        //data->setFoldingIndent(m_tabSettings->indentationColumn(text));\n        setFoldIndent(data,tabIndentationColumn(text),currentBlock());\n    }\n}\n\nint Highlighter::neighbouringNonEmptyBlockIndent(QTextBlock block, const bool previous) const\n{\n    while (true) {\n        if (!block.isValid())\n            return 0;\n        if (block.text().trimmed().isEmpty()) {\n            if (previous)\n                block = block.previous();\n            else\n                block = block.next();\n        } else {\n            return tabIndentationColumn(block.text());\n        }\n    }\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/highlighter.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef HIGHLIGHTER_H\n#define HIGHLIGHTER_H\n\n#include \"../basetextdocumentlayout.h\"\n#include \"../syntaxhighlighter.h\"\n#include \"context.h\"\n\n#include <QtCore/QString>\n#include <QtCore/QVector>\n#include <QtCore/QStack>\n#include <QtCore/QSharedPointer>\n#include <QtCore/QStringList>\n\n#include <QtGui/QSyntaxHighlighter>\n#include <QtGui/QTextCharFormat>\n\nnamespace TextEditor {\n\nclass TabSettings;\n\nnamespace Internal {\n\nclass Rule;\nclass Context;\nclass HighlightDefinition;\nclass ProgressData;\n\nclass Highlighter : public TextEditor::SyntaxHighlighter\n{\n    Q_OBJECT\n\npublic:\n    Highlighter(QTextDocument *parent = 0);\n    virtual ~Highlighter();\n\n    //void setTabSettings(const TabSettings &ts);\n    virtual void setTabSize(int tabSize);\n    void setDefaultContext(const QSharedPointer<Context> &defaultContext);\nprotected:\n    virtual void highlightBlock(const QString &text);\n\nprivate:\n\n    void setupDataForBlock(const QString &text);\n    void setupDefault();\n    void setupFromWillContinue();\n    void setupFromContinued();\n    void setupFromPersistent();\n\n    void iterateThroughRules(const QString &text,\n                             const int length,\n                             ProgressData *progress,\n                             const bool childRule,\n                             const QList<QSharedPointer<Rule> > &rules);\n\n    void assignCurrentContext();\n    bool contextChangeRequired(const QString &contextName) const;\n    void handleContextChange(const QString &contextName,\n                             const QSharedPointer<HighlightDefinition> &definition,\n                             const bool setCurrent = true);\n    void changeContext(const QString &contextName,\n                       const QSharedPointer<HighlightDefinition> &definition,\n                       const bool assignCurrent = true);\n\n    QString currentContextSequence() const;\n    void mapPersistentSequence(const QString &contextSequence);\n    void mapLeadingSequence(const QString &contextSequence);\n    void pushContextSequence(int state);\n\n    void pushDynamicContext(const QSharedPointer<Context> &baseContext);\n\n    void createWillContinueBlock();\n    void analyseConsistencyOfWillContinueBlock(const QString &text);\n\n    void applyFormat(int offset,\n                     int count,\n                     const QString &itemDataName,\n                     const QSharedPointer<HighlightDefinition> &definition);\n\n    void applyRegionBasedFolding();\n    void applyIndentationBasedFolding(const QString &text);\n    int neighbouringNonEmptyBlockIndent(QTextBlock block, const bool previous) const;\n    // Mapping from Kate format strings to format ids.\npublic:\n    struct BlockData : TextBlockUserData\n    {\n        BlockData();\n        virtual ~BlockData();\n\n        int m_foldingIndentDelta;\n        int m_originalObservableState;\n        QStack<QString> m_foldingRegions;\n        QSharedPointer<Context> m_contextToContinue;\n    };\nprotected:\n    void setFoldIndent(BlockData *data, int indent, const QTextBlock &block);\n    BlockData *initializeBlockData();\n    static BlockData *blockData(QTextBlockUserData *userData);\n\n    // Block states are composed by the region depth (used for code folding) and what I call\n    // observable states. Observable states occupy the 12 least significant bits. They might have\n    // the following values:\n    // - Default [0]: Nothing special.\n    // - WillContinue [1]: When there is match of the LineContinue rule (backslash as the last\n    //   character).\n    // - Continued [2]: Blocks that happen after a WillContinue block and continue from their\n    //   context until the next line end.\n    // - Persistent(s) [Anything >= 3]: Correspond to persistent contexts which last until a pop\n    //   occurs due to a matching rule. Every sequence of persistent contexts seen so far is\n    //   associated with a number (incremented by a unit each time).\n    // Region depths occupy the remaining bits.\n    enum ObservableBlockState {\n        Default = 0,\n        WillContinue,\n        Continued,\n        PersistentsStart\n    };\n    int computeState(const int observableState) const;\n    int tabIndentationColumn(const QString &text) const;\n    int tabColumnAt(const QString &text, int position) const;\n    int firstNonSpace(const QString &text) const;\n    static int extractRegionDepth(const int state);\n    static int extractObservableState(const int state);\n\n    int m_regionDepth;\n    int m_lastRegionDepth;\n    int m_lastRegionChanged;\n    bool m_indentationBasedFolding;\n    //const TabSettings *m_tabSettings;\n    int m_tabSize;\n\n    int m_persistentObservableStatesCounter;\n    int m_dynamicContextsCounter;\n\n    bool m_isBroken;\n    bool m_stringOrComment;\n    TextFormatId m_currentFormat;\n\n    QSharedPointer<Context> m_defaultContext;\n    QSharedPointer<Context> m_currentContext;\n    QVector<QSharedPointer<Context> > m_contexts;\n\n    // Mapping from context sequences to the observable persistent state they represent.\n    QHash<QString, int> m_persistentObservableStates;\n    // Mapping from context sequences to the non-persistent observable state that led to them.\n    QHash<QString, int> m_leadingObservableStates;\n    // Mapping from observable persistent states to context sequences (the actual \"stack\").\n    QHash<int, QVector<QSharedPointer<Context> > > m_persistentContexts;\n\n    // Captures used in dynamic rules.\n    QStringList m_currentCaptures;\n};\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // HIGHLIGHTER_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/highlighterexception.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef HIGHLIGHTEREXCEPTION_H\n#define HIGHLIGHTEREXCEPTION_H\n\nnamespace TextEditor {\nnamespace Internal {\n\nclass HighlighterException {};\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // HIGHLIGHTEREXCEPTION_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/highlightersettingspage.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>HighlighterSettingsPage</class>\n <widget class=\"QWidget\" name=\"HighlighterSettingsPage\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>521</width>\n    <height>332</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_4\">\n   <item>\n    <widget class=\"QLabel\" name=\"definitionsInfolabel\">\n     <property name=\"sizePolicy\">\n      <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Preferred\">\n       <horstretch>0</horstretch>\n       <verstretch>0</verstretch>\n      </sizepolicy>\n     </property>\n     <property name=\"text\">\n      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;\n&lt;p&gt;Highlight definitions are provided by the &lt;a href=&quot;http://kate-editor.org/&quot;&gt;Kate Text Editor&lt;/a&gt;.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>\n     </property>\n     <property name=\"textFormat\">\n      <enum>Qt::RichText</enum>\n     </property>\n     <property name=\"alignment\">\n      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>\n     </property>\n     <property name=\"wordWrap\">\n      <bool>true</bool>\n     </property>\n     <property name=\"openExternalLinks\">\n      <bool>true</bool>\n     </property>\n    </widget>\n   </item>\n   <item>\n    <spacer name=\"verticalSpacer_2\">\n     <property name=\"orientation\">\n      <enum>Qt::Vertical</enum>\n     </property>\n     <property name=\"sizeType\">\n      <enum>QSizePolicy::Fixed</enum>\n     </property>\n     <property name=\"sizeHint\" stdset=\"0\">\n      <size>\n       <width>20</width>\n       <height>3</height>\n      </size>\n     </property>\n    </spacer>\n   </item>\n   <item>\n    <widget class=\"QGroupBox\" name=\"definitionFilesGroupBox\">\n     <property name=\"title\">\n      <string>Syntax Highlight Definition Files</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout_3\">\n      <item>\n       <layout class=\"QHBoxLayout\" name=\"horizontalLayout_3\">\n        <item>\n         <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n          <item>\n           <widget class=\"QLabel\" name=\"locationLabel\">\n            <property name=\"text\">\n             <string>Location:</string>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"Utils::PathChooser\" name=\"definitionFilesPath\" native=\"true\"/>\n          </item>\n         </layout>\n        </item>\n       </layout>\n      </item>\n      <item>\n       <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n        <property name=\"spacing\">\n         <number>0</number>\n        </property>\n        <item>\n         <widget class=\"QCheckBox\" name=\"useFallbackLocation\">\n          <property name=\"text\">\n           <string>Use fallback location</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <widget class=\"Utils::PathChooser\" name=\"fallbackDefinitionFilesPath\" native=\"true\"/>\n        </item>\n       </layout>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QGroupBox\" name=\"behaviorGroupBox\">\n     <property name=\"title\">\n      <string>Behavior</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n      <item>\n       <widget class=\"QCheckBox\" name=\"alertWhenNoDefinition\">\n        <property name=\"text\">\n         <string>Alert when a highlight definition is not found</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\">\n        <item>\n         <widget class=\"QLabel\" name=\"ignoreLabel\">\n          <property name=\"text\">\n           <string>Ignored file patterns:</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <widget class=\"QLineEdit\" name=\"ignoreEdit\"/>\n        </item>\n       </layout>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <spacer name=\"verticalSpacer\">\n     <property name=\"orientation\">\n      <enum>Qt::Vertical</enum>\n     </property>\n     <property name=\"sizeHint\" stdset=\"0\">\n      <size>\n       <width>20</width>\n       <height>117</height>\n      </size>\n     </property>\n    </spacer>\n   </item>\n  </layout>\n </widget>\n <customwidgets>\n  <customwidget>\n   <class>Utils::PathChooser</class>\n   <extends>QWidget</extends>\n   <header location=\"global\">utils/pathchooser.h</header>\n   <container>1</container>\n   <slots>\n    <signal>editingFinished()</signal>\n    <signal>browsingFinished()</signal>\n   </slots>\n  </customwidget>\n </customwidgets>\n <tabstops>\n  <tabstop>alertWhenNoDefinition</tabstop>\n  <tabstop>ignoreEdit</tabstop>\n </tabstops>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/includerulesinstruction.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"includerulesinstruction.h\"\n#include \"reuse.h\"\n\nusing namespace TextEditor;\nusing namespace Internal;\n\nIncludeRulesInstruction::IncludeRulesInstruction(const QString &context,\n                                                 int hint,\n                                                 const QString &replaceItemData) :\n    m_sourceContext(context), m_indexHint(hint), m_replaceItemData(toBool(replaceItemData))\n{\n}\n\nconst QString &IncludeRulesInstruction::sourceContext() const\n{ return m_sourceContext; }\n\nint IncludeRulesInstruction::indexHint() const\n{ return m_indexHint; }\n\nbool IncludeRulesInstruction::replaceItemData() const\n{ return m_replaceItemData; }\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/includerulesinstruction.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef INCLUDERULESINSTRUCTION_H\n#define INCLUDERULESINSTRUCTION_H\n\n#include <QtCore/QString>\n\nnamespace TextEditor {\nnamespace Internal {\n\nclass IncludeRulesInstruction\n{\npublic:\n    IncludeRulesInstruction(const QString &context, int hint, const QString &replaceItemData);\n\n    const QString &sourceContext() const;\n    int indexHint() const;\n    bool replaceItemData() const;\n\nprivate:\n    QString m_sourceContext;\n    int m_indexHint;\n    bool m_replaceItemData;\n};\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // INCLUDERULESINSTRUCTION_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/itemdata.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"itemdata.h\"\n#include \"reuse.h\"\n\nusing namespace TextEditor;\nusing namespace Internal;\n\nItemData::ItemData() :\n    m_italic(false),\n    m_italicSpecified(false),\n    m_bold(false),\n    m_boldSpecified(false),\n    m_underlined(false),\n    m_underlinedSpecified(false),\n    m_strikedOut(false),\n    m_strikeOutSpecified(false),\n    m_spellChecking(true),\n    m_spellCheckingSpecified(false),\n    m_isCustomized(false)\n{}\n\nvoid ItemData::setStyle(const QString &style)\n{ m_style = style; }\n\nconst QString &ItemData::style() const\n{ return m_style; }\n\nvoid ItemData::setColor(const QString &color)\n{\n    if (!color.isEmpty()) {\n        m_color.setNamedColor(color);\n        m_isCustomized = true;\n    }\n}\n\nconst QColor &ItemData::color() const\n{ return m_color; }\n\nvoid ItemData::setSelectionColor(const QString &color)\n{\n    if (!color.isEmpty()) {\n        m_selectionColor.setNamedColor(color);\n        m_isCustomized = true;\n    }\n}\n\nconst QColor &ItemData::selectionColor() const\n{ return m_selectionColor; }\n\nvoid ItemData::setItalic(const QString &italic)\n{\n    if (!italic.isEmpty()) {\n        m_italic = toBool(italic);\n        m_italicSpecified = true;\n        m_isCustomized = true;\n    }\n}\n\nbool ItemData::isItalic() const\n{ return m_italic; }\n\nbool ItemData::isItalicSpecified() const\n{ return m_italicSpecified; }\n\nvoid ItemData::setBold(const QString &bold)\n{\n    if (!bold.isEmpty()) {\n        m_bold = toBool(bold);\n        m_boldSpecified = true;\n        m_isCustomized = true;\n    }\n}\n\nbool ItemData::isBold() const\n{ return m_bold; }\n\nbool ItemData::isBoldSpecified() const\n{ return m_boldSpecified; }\n\nvoid ItemData::setUnderlined(const QString &underlined)\n{\n    if (!underlined.isEmpty()) {\n        m_underlined = toBool(underlined);\n        m_underlinedSpecified = true;\n        m_isCustomized = true;\n    }\n}\n\nbool ItemData::isUnderlined() const\n{ return m_underlined; }\n\nbool ItemData::isUnderlinedSpecified() const\n{ return m_underlinedSpecified; }\n\nvoid ItemData::setStrikeOut(const QString &strike)\n{\n    if (!strike.isEmpty()) {\n        m_strikedOut = toBool(strike);\n        m_strikeOutSpecified = true;\n        m_isCustomized = true;\n    }\n}\n\nbool ItemData::isStrikeOut() const\n{ return m_strikedOut; }\n\nbool ItemData::isStrikeOutSpecified() const\n{ return m_strikeOutSpecified; }\n\nvoid ItemData::setSpellChecking(const QString &checking)\n{\n    if (!checking.isEmpty()) {\n        m_spellChecking = toBool(checking);\n        m_spellCheckingSpecified = true;\n        m_isCustomized = true;\n    }\n}\n\nbool ItemData::isSpellChecking() const\n{ return m_spellChecking; }\n\nbool ItemData::isSpellCheckingSpecified() const\n{ return m_spellCheckingSpecified; }\n\nbool ItemData::isCustomized() const\n{ return m_isCustomized; }\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/itemdata.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef ITEMDATA_H\n#define ITEMDATA_H\n\n#include <QtCore/QString>\n#include <QtGui/QColor>\n\nnamespace TextEditor {\nnamespace Internal {\n\nclass ItemData\n{\npublic:\n    ItemData();\n\n    void setStyle(const QString &style);\n    const QString &style() const;\n\n    void setColor(const QString &color);\n    const QColor &color() const;\n\n    void setSelectionColor(const QString &color);\n    const QColor &selectionColor() const;\n\n    void setItalic(const QString &italic);\n    bool isItalic() const;\n    bool isItalicSpecified() const;\n\n    void setBold(const QString &bold);\n    bool isBold() const;\n    bool isBoldSpecified() const;\n\n    void setUnderlined(const QString &underlined);\n    bool isUnderlined() const;\n    bool isUnderlinedSpecified() const;\n\n    void setStrikeOut(const QString &strike);\n    bool isStrikeOut() const;\n    bool isStrikeOutSpecified() const;\n\n    void setSpellChecking(const QString &checking);\n    bool isSpellChecking() const;\n    bool isSpellCheckingSpecified() const;\n\n    bool isCustomized() const;\n\nprivate:\n    bool m_italic;\n    bool m_italicSpecified;\n    bool m_bold;\n    bool m_boldSpecified;\n    bool m_underlined;\n    bool m_underlinedSpecified;\n    bool m_strikedOut;\n    bool m_strikeOutSpecified;\n    bool m_spellChecking;\n    bool m_spellCheckingSpecified;\n    bool m_isCustomized;\n    QString m_style;\n    QColor m_color;\n    QColor m_selectionColor;\n};\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // ITEMDATA_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/keywordlist.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"keywordlist.h\"\n\nusing namespace TextEditor;\nusing namespace Internal;\n\nvoid KeywordList::addKeyword(const QString &keyword)\n{\n    if (keyword.isEmpty())\n        return; \n\n    m_keywords.insert(keyword);\n}\n\nbool KeywordList::isKeyword(const QString &keyword, Qt::CaseSensitivity sensitivity) const\n{\n    if (keyword.isEmpty())\n        return false;\n\n    // Case sensitivity could be implemented, for example, by converting all keywords to lower\n    // if the global sensitivity attribute is insensitive, then always checking for containment\n    // (with a conversion to lower in the necessary cases). But the code below is one alternative\n    // to support the existence of local sensitivity attributes (which override the global one -\n    // currently not documented).\n    if (sensitivity == Qt::CaseSensitive) {\n        return m_keywords.contains(keyword);\n    } else {\n        foreach (const QString &s, m_keywords)\n            if (keyword.compare(s, Qt::CaseInsensitive) == 0)\n                return true;\n        return false;\n    }\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/keywordlist.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef KEYWORDLIST_H\n#define KEYWORDLIST_H\n\n#include <QtCore/QString>\n#include <QtCore/QSet>\n\nnamespace TextEditor {\nnamespace Internal {\n\nclass KeywordList\n{\npublic:\n\n    void addKeyword(const QString &keyword);\n    bool isKeyword(const QString &keyword, Qt::CaseSensitivity sensitivity) const;\n\nprivate:\n    QSet<QString> m_keywords;\n};\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // KEYWORDLIST_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/managedefinitionsdialog.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"managedefinitionsdialog.h\"\n#include \"manager.h\"\n\n#include <QtCore/QUrl>\n#include <QtCore/QIODevice>\n#include <QtCore/QXmlStreamReader>\n#include <QtCore/QXmlStreamAttributes>\n#include <QtCore/QFuture>\n#include <QtCore/QFutureWatcher>\n#include <QtCore/QtConcurrentMap>\n#include <QtCore/QFile>\n#include <QtCore/QFileInfo>\n#include <QtGui/QMessageBox>\n\n#include <QtCore/QDebug>\n\nusing namespace TextEditor;\nusing namespace Internal;\n\nManageDefinitionsDialog::ManageDefinitionsDialog(\n        const QList<HighlightDefinitionMetaData> &metaDataList,\n        const QString &path,\n        QWidget *parent) :\n    QDialog(parent),\n    m_definitionsMetaData(metaDataList),\n    m_path(path)\n{\n    ui.setupUi(this);    \n    ui.definitionsTable->setHorizontalHeaderLabels(\n        QStringList() << tr(\"Name\") << tr(\"Installed\") << tr(\"Available\"));\n    ui.definitionsTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);\n\n    setWindowTitle(tr(\"Download Definitions\"));\n\n    populateDefinitionsWidget();\n\n    connect(ui.downloadButton, SIGNAL(clicked()), this, SLOT(downloadDefinitions()));\n    connect(ui.allButton, SIGNAL(clicked()), this, SLOT(selectAll()));\n    connect(ui.clearButton, SIGNAL(clicked()), this, SLOT(clearSelection()));\n    connect(ui.invertButton, SIGNAL(clicked()), this, SLOT(invertSelection()));\n}\n\nvoid ManageDefinitionsDialog::populateDefinitionsWidget()\n{\n    const int size = m_definitionsMetaData.size();\n    ui.definitionsTable->setRowCount(size);\n    for (int i = 0; i < size; ++i) {\n        const HighlightDefinitionMetaData &downloadData = m_definitionsMetaData.at(i);\n\n        // Look for this definition in the current path specified by the user, not the one\n        // stored in the settings. So the manager should not be queried for this information.\n        QString dirVersion;\n        QFileInfo fi(m_path + downloadData.fileName());\n        QFile definitionFile(fi.absoluteFilePath());\n        if (definitionFile.open(QIODevice::ReadOnly | QIODevice::Text)) {\n            const QSharedPointer<HighlightDefinitionMetaData> &data = Manager::parseMetadata(fi);\n            if (!data.isNull())\n                dirVersion = data->version();\n        }\n\n        for (int j = 0; j < 3; ++j) {\n            QTableWidgetItem *item = new QTableWidgetItem;\n            if (j == 0)\n                item->setText(downloadData.name());\n            else if (j == 1) {\n                item->setText(dirVersion);\n                item->setTextAlignment(Qt::AlignCenter);\n            } else if (j == 2) {\n                item->setText(downloadData.version());\n                item->setTextAlignment(Qt::AlignCenter);\n            }\n            ui.definitionsTable->setItem(i, j, item);\n        }\n    }\n}\n\nvoid ManageDefinitionsDialog::downloadDefinitions()\n{\n    if (Manager::instance()->isDownloadingDefinitions()) {\n        QMessageBox::information(\n            this,\n            tr(\"Download Information\"),\n            tr(\"There is already one download in progress. Please wait until it is finished.\"));\n        return;\n    }\n\n    QList<QUrl> urls;\n    foreach (const QModelIndex &index, ui.definitionsTable->selectionModel()->selectedRows())\n        urls.append(m_definitionsMetaData.at(index.row()).url());\n    Manager::instance()->downloadDefinitions(urls, m_path);\n    accept();\n}\n\nvoid ManageDefinitionsDialog::selectAll()\n{\n    ui.definitionsTable->selectAll();\n    ui.definitionsTable->setFocus();\n}\n\nvoid ManageDefinitionsDialog::clearSelection()\n{\n    ui.definitionsTable->clearSelection();\n}\n\nvoid ManageDefinitionsDialog::invertSelection()\n{\n    const QModelIndex &topLeft = ui.definitionsTable->model()->index(0, 0);\n    const QModelIndex &bottomRight =\n        ui.definitionsTable->model()->index(ui.definitionsTable->rowCount() - 1,\n                                            ui.definitionsTable->columnCount() - 1);\n    QItemSelection itemSelection(topLeft, bottomRight);\n    ui.definitionsTable->selectionModel()->select(itemSelection, QItemSelectionModel::Toggle);\n    ui.definitionsTable->setFocus();\n}\n\nvoid ManageDefinitionsDialog::changeEvent(QEvent *e)\n{\n    QDialog::changeEvent(e);\n    switch (e->type()) {\n    case QEvent::LanguageChange:\n        ui.retranslateUi(this);\n        break;\n    default:\n        break;\n    }\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/managedefinitionsdialog.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef MANAGEDEFINITIONSDIALOG_H\n#define MANAGEDEFINITIONSDIALOG_H\n\n#include \"ui_managedefinitionsdialog.h\"\n#include \"highlightdefinitionmetadata.h\"\n\n#include <QtCore/QList>\n\nnamespace TextEditor {\nnamespace Internal {\n\nclass ManageDefinitionsDialog : public QDialog\n{\n    Q_OBJECT\npublic:\n    explicit ManageDefinitionsDialog(const QList<HighlightDefinitionMetaData> &metaDataList,\n                                     const QString &path,\n                                     QWidget *parent = 0);\n\nprotected:\n    void changeEvent(QEvent *e);\n\nprivate slots:\n    void downloadDefinitions();\n    void selectAll();\n    void clearSelection();\n    void invertSelection();\n\nprivate:\n    void populateDefinitionsWidget();\n\n    QList<HighlightDefinitionMetaData> m_definitionsMetaData;\n    QString m_path;\n    Ui::ManageDefinitionsDialog ui;\n};\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // MANAGEDEFINITIONSDIALOG_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/managedefinitionsdialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>ManageDefinitionsDialog</class>\n <widget class=\"QDialog\" name=\"ManageDefinitionsDialog\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>586</width>\n    <height>280</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Dialog</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n   <item>\n    <widget class=\"QGroupBox\" name=\"definitionsGroupBox\">\n     <property name=\"title\">\n      <string>Definitions</string>\n     </property>\n     <layout class=\"QGridLayout\" name=\"gridLayout\">\n      <item row=\"0\" column=\"0\" rowspan=\"4\">\n       <widget class=\"QTableWidget\" name=\"definitionsTable\">\n        <property name=\"editTriggers\">\n         <set>QAbstractItemView::NoEditTriggers</set>\n        </property>\n        <property name=\"alternatingRowColors\">\n         <bool>false</bool>\n        </property>\n        <property name=\"selectionMode\">\n         <enum>QAbstractItemView::ExtendedSelection</enum>\n        </property>\n        <property name=\"selectionBehavior\">\n         <enum>QAbstractItemView::SelectRows</enum>\n        </property>\n        <property name=\"showGrid\">\n         <bool>false</bool>\n        </property>\n        <property name=\"gridStyle\">\n         <enum>Qt::NoPen</enum>\n        </property>\n        <property name=\"columnCount\">\n         <number>3</number>\n        </property>\n        <attribute name=\"horizontalHeaderHighlightSections\">\n         <bool>false</bool>\n        </attribute>\n        <attribute name=\"verticalHeaderVisible\">\n         <bool>false</bool>\n        </attribute>\n        <attribute name=\"verticalHeaderDefaultSectionSize\">\n         <number>20</number>\n        </attribute>\n        <attribute name=\"verticalHeaderHighlightSections\">\n         <bool>false</bool>\n        </attribute>\n        <column/>\n        <column/>\n        <column/>\n       </widget>\n      </item>\n      <item row=\"0\" column=\"1\">\n       <widget class=\"QPushButton\" name=\"allButton\">\n        <property name=\"text\">\n         <string>Select All</string>\n        </property>\n       </widget>\n      </item>\n      <item row=\"1\" column=\"1\">\n       <widget class=\"QPushButton\" name=\"clearButton\">\n        <property name=\"text\">\n         <string>Clear Selection</string>\n        </property>\n       </widget>\n      </item>\n      <item row=\"2\" column=\"1\">\n       <widget class=\"QPushButton\" name=\"invertButton\">\n        <property name=\"text\">\n         <string>Invert Selection</string>\n        </property>\n       </widget>\n      </item>\n      <item row=\"3\" column=\"1\">\n       <spacer name=\"verticalSpacer\">\n        <property name=\"orientation\">\n         <enum>Qt::Vertical</enum>\n        </property>\n        <property name=\"sizeHint\" stdset=\"0\">\n         <size>\n          <width>20</width>\n          <height>244</height>\n         </size>\n        </property>\n       </spacer>\n      </item>\n      <item row=\"4\" column=\"0\" colspan=\"2\">\n       <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n        <item>\n         <widget class=\"QPushButton\" name=\"downloadButton\">\n          <property name=\"text\">\n           <string>Download Selected Definitions</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <spacer name=\"horizontalSpacer\">\n          <property name=\"orientation\">\n           <enum>Qt::Horizontal</enum>\n          </property>\n          <property name=\"sizeHint\" stdset=\"0\">\n           <size>\n            <width>188</width>\n            <height>20</height>\n           </size>\n          </property>\n         </spacer>\n        </item>\n       </layout>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QDialogButtonBox\" name=\"buttonBox\">\n     <property name=\"standardButtons\">\n      <set>QDialogButtonBox::Close</set>\n     </property>\n    </widget>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections>\n  <connection>\n   <sender>buttonBox</sender>\n   <signal>rejected()</signal>\n   <receiver>ManageDefinitionsDialog</receiver>\n   <slot>close()</slot>\n   <hints>\n    <hint type=\"sourcelabel\">\n     <x>385</x>\n     <y>420</y>\n    </hint>\n    <hint type=\"destinationlabel\">\n     <x>223</x>\n     <y>222</y>\n    </hint>\n   </hints>\n  </connection>\n </connections>\n</ui>\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/manager.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"manager.h\"\n#include \"highlightdefinition.h\"\n#include \"highlightdefinitionhandler.h\"\n#include \"highlighterexception.h\"\n//#include \"definitiondownloader.h\"\n//#include \"highlightersettings.h\"\n\n#include <QtCore/QtAlgorithms>\n#include <QtCore/QtPlugin>\n#include <QtCore/QString>\n#include <QtCore/QLatin1Char>\n#include <QtCore/QLatin1String>\n#include <QtCore/QStringList>\n#include <QtCore/QFile>\n#include <QtCore/QFileInfo>\n#include <QtCore/QDir>\n#include <QtCore/QRegExp>\n#include <QtCore/QFuture>\n#include <QtCore/QtConcurrentRun>\n#include <QtCore/QtConcurrentMap>\n#include <QtCore/QUrl>\n#include <QtCore/QSet>\n#include <QtGui/QDesktopServices>\n#include <QtGui/QMessageBox>\n#include <QtXml/QXmlSimpleReader>\n#include <QtXml/QXmlInputSource>\n#include <QtXml/QXmlStreamReader>\n#include <QtXml/QXmlStreamAttributes>\n#include <QtNetwork/QNetworkRequest>\n#include <QtNetwork/QNetworkReply>\n#include <QtAlgorithms>\n\nusing namespace TextEditor;\nusing namespace Internal;\n\nManager::Manager() :\n    m_downloadingDefinitions(false),\n    m_registeringMimeTypes(false),\n    m_queuedMimeTypeRegistrations(0)\n{\n    //connect(&m_mimeTypeWatcher, SIGNAL(resultReadyAt(int)), this, SLOT(registerMimeType(int)));\n    //connect(&m_mimeTypeWatcher, SIGNAL(finished()), this, SLOT(registerMimeTypesFinished()));\n    connect(&m_downloadWatcher, SIGNAL(finished()), this, SLOT(downloadDefinitionsFinished()));\n}\n\nManager::~Manager()\n{}\n\nManager *Manager::instance()\n{\n    static Manager manager;\n    return &manager;\n}\n\nQString Manager::definitionIdByName(const QString &name) const\n{ return m_idByName.value(name); }\n\nQString Manager::definitionIdByMimeType(const QString &mimeType) const\n{ return m_idByMimeType.value(mimeType); }\n\nQString Manager::definitionIdByAnyMimeType(const QStringList &mimeTypes) const\n{\n    QString definitionId;\n    foreach (const QString &mimeType, mimeTypes) {\n        definitionId = definitionIdByMimeType(mimeType);\n        if (!definitionId.isEmpty())\n            break;\n    }\n    return definitionId;\n}\n\nQSharedPointer<HighlightDefinition> Manager::definition(const QString &id)\n{\n    if (!id.isEmpty() && !m_definitions.contains(id)) {\n        QFile definitionFile(id);\n        if (!definitionFile.open(QIODevice::ReadOnly | QIODevice::Text))\n            return QSharedPointer<HighlightDefinition>();\n\n        QSharedPointer<HighlightDefinition> definition(new HighlightDefinition);\n        HighlightDefinitionHandler handler(definition);\n\n        QXmlInputSource source(&definitionFile);\n        QXmlSimpleReader reader;\n        reader.setContentHandler(&handler);\n        m_isBuilding.insert(id);\n        try {\n            reader.parse(source);\n        } catch (HighlighterException &) {\n            definition.clear();\n        }\n        m_isBuilding.remove(id);\n        definitionFile.close();\n\n        m_definitions.insert(id, definition);\n    }\n\n    return m_definitions.value(id);\n}\n\nQSharedPointer<HighlightDefinitionMetaData> Manager::definitionMetaData(const QString &id) const\n{ return m_definitionsMetaData.value(id); }\n\nbool Manager::isBuildingDefinition(const QString &id) const\n{ return m_isBuilding.contains(id); }\n\nvoid Manager::loadFromPath(const QStringList & definitionsPaths)\n{\n    foreach (const QString &path, definitionsPaths) {\n        if (path.isEmpty())\n            continue;\n\n        QDir definitionsDir(path);\n        QStringList filter(QLatin1String(\"*.xml\"));\n        definitionsDir.setNameFilters(filter);\n\n        QList<QSharedPointer<HighlightDefinitionMetaData> > allMetaData;\n        const QFileInfoList &filesInfo = definitionsDir.entryInfoList();\n        foreach (const QFileInfo &fileInfo, filesInfo) {\n            const QSharedPointer<HighlightDefinitionMetaData> &metaData = parseMetadata(fileInfo);\n            if (!metaData.isNull())\n                allMetaData.append(metaData);\n        }\n\n        // Consider definitions with higher priority first.\n        qSort(allMetaData.begin(), allMetaData.end(), PriorityComp());\n\n        foreach (const QSharedPointer<HighlightDefinitionMetaData> &metaData, allMetaData) {\n            if (m_idByName.contains(metaData->name()))\n                // Name already exists... This is a fallback item, do not consider it.\n                continue;\n\n            const QString &id = metaData->id();\n            m_idByName.insert(metaData->name(), id);\n            m_definitionsMetaData.insert(id, metaData);\n            qDebug() << metaData->mimeTypes();\n            foreach (const QString &type, metaData->mimeTypes()) {\n                if (m_idByMimeType.contains(type))\n                    continue;\n\n                m_idByMimeType.insert(type, id);\n            }\n//            static const QStringList textPlain(QLatin1String(\"text/plain\"));\n\n//            // A definition can specify multiple MIME types and file extensions/patterns.\n//            // However, each thing is done with a single string. There is no direct way to\n//            // tell which patterns belong to which MIME types nor whether a MIME type is just\n//            // an alias for the other. Currently, I associate all patterns with all MIME\n//            // types from a definition.\n//            QList<Core::MimeGlobPattern> globPatterns;\n//            foreach (const QString &type, metaData->mimeTypes()) {\n//                if (m_idByMimeType.contains(type))\n//                    continue;\n\n//                m_idByMimeType.insert(type, id);\n//                Core::MimeType mimeType = mimeDatabase->findByType(type);\n//                if (mimeType.isNull()) {\n//                    mimeType.setType(type);\n//                    mimeType.setSubClassesOf(textPlain);\n//                    mimeType.setComment(metaData->name());\n\n//                    // If there's a user modification for this mime type, we want to use the\n//                    // modified patterns and rule-based matchers. If not, just consider what\n//                    // is specified in the definition file.\n//                    QHash<QString, Core::MimeType>::const_iterator it =\n//                            userModified.find(mimeType.type());\n//                    if (it == userModified.end()) {\n//                        if (globPatterns.isEmpty()) {\n//                            foreach (const QString &pattern, metaData->patterns()) {\n//                                static const QLatin1String mark(\"*.\");\n//                                if (pattern.startsWith(mark)) {\n//                                    const QString &suffix = pattern.right(pattern.length() - 2);\n//                                    if (!knownSuffixes.contains(suffix))\n//                                        knownSuffixes.insert(suffix);\n//                                    else\n//                                        continue;\n//                                }\n//                                QRegExp regExp(pattern, Qt::CaseSensitive, QRegExp::Wildcard);\n//                                globPatterns.append(Core::MimeGlobPattern(regExp, 50));\n//                            }\n//                        }\n//                        mimeType.setGlobPatterns(globPatterns);\n//                    } else {\n//                        mimeType.setGlobPatterns(it.value().globPatterns());\n//                        mimeType.setMagicRuleMatchers(it.value().magicRuleMatchers());\n//                    }\n\n//                    mimeDatabase->addMimeType(mimeType);\n//                    future.reportResult(mimeType);\n//                }\n//            }\n        }\n    }\n}\n\nvoid Manager::registerMimeTypes()\n{\n//    if (!m_registeringMimeTypes) {\n//        m_registeringMimeTypes = true;\n//        clear();\n//        QFuture<Core::MimeType> future =\n//            QtConcurrent::run(&Manager::gatherDefinitionsMimeTypes, this);\n//        m_mimeTypeWatcher.setFuture(future);\n//        Core::ICore::instance()->progressManager()->addTask(future,\n//                                                            tr(\"Registering definitions\"),\n//                                                            Constants::TASK_REGISTER_DEFINITIONS);\n//    } else {\n//        // QFutures returned from QConcurrent::run cannot be cancelled. So the queue.\n//        ++m_queuedMimeTypeRegistrations;\n//    }\n}\n\n//void Manager::gatherDefinitionsMimeTypes(QFutureInterface<Core::MimeType> &future)\n//{\n//    // Please be aware of the following limitation in the current implementation.\n//    // The generic highlighter only register its types after all other plugins\n//    // have populated Creator's MIME database (so it does not override anything).\n//    // When the generic highlighter settings change only its internal data is cleaned-up\n//    // and rebuilt. Creator's MIME database is not touched. So depending on how the\n//    // user plays around with the generic highlighter file definitions (changing\n//    // duplicated patterns, for example), some changes might not be reflected.\n//    // A definitive implementation would require some kind of re-load or update\n//    // (considering hierarchies, aliases, etc) of the MIME database whenever there\n//    // is a change in the generic highlighter settings.\n\n//    QStringList definitionsPaths;\n//    const HighlighterSettings &settings = TextEditorSettings::instance()->highlighterSettings();\n//    definitionsPaths.append(settings.definitionFilesPath());\n//    if (settings.useFallbackLocation())\n//        definitionsPaths.append(settings.fallbackDefinitionFilesPath());\n\n//    Core::MimeDatabase *mimeDatabase = Core::ICore::instance()->mimeDatabase();\n//    QSet<QString> knownSuffixes = QSet<QString>::fromList(mimeDatabase->suffixes());\n\n//    QHash<QString, Core::MimeType> userModified;\n//    const QList<Core::MimeType> &userMimeTypes = mimeDatabase->readUserModifiedMimeTypes();\n//    foreach (const Core::MimeType &userMimeType, userMimeTypes)\n//        userModified.insert(userMimeType.type(), userMimeType);\n\n//    foreach (const QString &path, definitionsPaths) {\n//        if (path.isEmpty())\n//            continue;\n\n//        QDir definitionsDir(path);\n//        QStringList filter(QLatin1String(\"*.xml\"));\n//        definitionsDir.setNameFilters(filter);\n\n//        QList<QSharedPointer<HighlightDefinitionMetaData> > allMetaData;\n//        const QFileInfoList &filesInfo = definitionsDir.entryInfoList();\n//        foreach (const QFileInfo &fileInfo, filesInfo) {\n//            const QSharedPointer<HighlightDefinitionMetaData> &metaData = parseMetadata(fileInfo);\n//            if (!metaData.isNull())\n//                allMetaData.append(metaData);\n//        }\n\n//        // Consider definitions with higher priority first.\n//        qSort(allMetaData.begin(), allMetaData.end(), PriorityComp());\n\n//        foreach (const QSharedPointer<HighlightDefinitionMetaData> &metaData, allMetaData) {\n//            if (m_idByName.contains(metaData->name()))\n//                // Name already exists... This is a fallback item, do not consider it.\n//                continue;\n\n//            const QString &id = metaData->id();\n//            m_idByName.insert(metaData->name(), id);\n//            m_definitionsMetaData.insert(id, metaData);\n\n//            static const QStringList textPlain(QLatin1String(\"text/plain\"));\n\n//            // A definition can specify multiple MIME types and file extensions/patterns.\n//            // However, each thing is done with a single string. There is no direct way to\n//            // tell which patterns belong to which MIME types nor whether a MIME type is just\n//            // an alias for the other. Currently, I associate all patterns with all MIME\n//            // types from a definition.\n//            QList<Core::MimeGlobPattern> globPatterns;\n//            foreach (const QString &type, metaData->mimeTypes()) {\n//                if (m_idByMimeType.contains(type))\n//                    continue;\n\n//                m_idByMimeType.insert(type, id);\n//                Core::MimeType mimeType = mimeDatabase->findByType(type);\n//                if (mimeType.isNull()) {\n//                    mimeType.setType(type);\n//                    mimeType.setSubClassesOf(textPlain);\n//                    mimeType.setComment(metaData->name());\n\n//                    // If there's a user modification for this mime type, we want to use the\n//                    // modified patterns and rule-based matchers. If not, just consider what\n//                    // is specified in the definition file.\n//                    QHash<QString, Core::MimeType>::const_iterator it =\n//                        userModified.find(mimeType.type());\n//                    if (it == userModified.end()) {\n//                        if (globPatterns.isEmpty()) {\n//                            foreach (const QString &pattern, metaData->patterns()) {\n//                                static const QLatin1String mark(\"*.\");\n//                                if (pattern.startsWith(mark)) {\n//                                    const QString &suffix = pattern.right(pattern.length() - 2);\n//                                    if (!knownSuffixes.contains(suffix))\n//                                        knownSuffixes.insert(suffix);\n//                                    else\n//                                        continue;\n//                                }\n//                                QRegExp regExp(pattern, Qt::CaseSensitive, QRegExp::Wildcard);\n//                                globPatterns.append(Core::MimeGlobPattern(regExp, 50));\n//                            }\n//                        }\n//                        mimeType.setGlobPatterns(globPatterns);\n//                    } else {\n//                        mimeType.setGlobPatterns(it.value().globPatterns());\n//                        mimeType.setMagicRuleMatchers(it.value().magicRuleMatchers());\n//                    }\n\n//                    mimeDatabase->addMimeType(mimeType);\n//                    future.reportResult(mimeType);\n//                }\n//            }\n//        }\n//    }\n//}\n\nvoid Manager::registerMimeType(int index) const\n{\n    //const Core::MimeType &mimeType = m_mimeTypeWatcher.resultAt(index);\n    //TextEditorPlugin::instance()->editorFactory()->addMimeType(mimeType.type());\n}\n\nvoid Manager::registerMimeTypesFinished()\n{\n    m_registeringMimeTypes = false;\n    if (m_queuedMimeTypeRegistrations > 0) {\n        --m_queuedMimeTypeRegistrations;\n        registerMimeTypes();\n    } else {\n        emit mimeTypesRegistered();\n    }\n}\n\nQSharedPointer<HighlightDefinitionMetaData> Manager::parseMetadata(const QFileInfo &fileInfo)\n{\n    static const QLatin1Char kSemiColon(';');\n    static const QLatin1Char kSpace(' ');\n    static const QLatin1Char kDash('-');\n    static const QLatin1String kLanguage(\"language\");\n    static const QLatin1String kArtificial(\"text/x-artificial-\");\n\n    QFile definitionFile(fileInfo.absoluteFilePath());\n    if (!definitionFile.open(QIODevice::ReadOnly | QIODevice::Text))\n        return QSharedPointer<HighlightDefinitionMetaData>();\n\n    QSharedPointer<HighlightDefinitionMetaData> metaData(new HighlightDefinitionMetaData);\n\n    QXmlStreamReader reader(&definitionFile);\n    while (!reader.atEnd() && !reader.hasError()) {\n        if (reader.readNext() == QXmlStreamReader::StartElement && reader.name() == kLanguage) {\n            const QXmlStreamAttributes &atts = reader.attributes();\n\n            metaData->setFileName(fileInfo.fileName());\n            metaData->setId(fileInfo.absoluteFilePath());\n            metaData->setName(atts.value(HighlightDefinitionMetaData::kName).toString());\n            metaData->setVersion(atts.value(HighlightDefinitionMetaData::kVersion).toString());\n            metaData->setPriority(atts.value(HighlightDefinitionMetaData::kPriority).toString()\n                                  .toInt());\n            metaData->setPatterns(atts.value(HighlightDefinitionMetaData::kExtensions)\n                                  .toString().split(kSemiColon, QString::SkipEmptyParts));\n\n            QStringList mimeTypes = atts.value(HighlightDefinitionMetaData::kMimeType).\n                                    toString().split(kSemiColon, QString::SkipEmptyParts);\n            if (mimeTypes.isEmpty()) {\n                // There are definitions which do not specify a MIME type, but specify file\n                // patterns. Creating an artificial MIME type is a workaround.\n                QString artificialType(kArtificial);\n                artificialType.append(metaData->name().trimmed().replace(kSpace, kDash));\n                mimeTypes.append(artificialType);\n            }\n            metaData->setMimeTypes(mimeTypes);\n\n            break;\n        }\n    }\n    reader.clear();\n    definitionFile.close();\n\n    return metaData;\n}\n\nQList<HighlightDefinitionMetaData> Manager::parseAvailableDefinitionsList(QIODevice *device) const\n{\n    static const QLatin1Char kSlash('/');\n    static const QLatin1String kDefinition(\"Definition\");\n\n    QList<HighlightDefinitionMetaData> metaDataList;\n    QXmlStreamReader reader(device);\n    while (!reader.atEnd() && !reader.hasError()) {\n        if (reader.readNext() == QXmlStreamReader::StartElement &&\n            reader.name() == kDefinition) {\n            const QXmlStreamAttributes &atts = reader.attributes();\n\n            HighlightDefinitionMetaData metaData;\n            metaData.setName(atts.value(HighlightDefinitionMetaData::kName).toString());\n            metaData.setVersion(atts.value(HighlightDefinitionMetaData::kVersion).toString());\n            QString url(atts.value(HighlightDefinitionMetaData::kUrl).toString());\n            metaData.setUrl(QUrl(url));\n            const int slash = url.lastIndexOf(kSlash);\n            if (slash != -1)\n                metaData.setFileName(url.right(url.length() - slash - 1));\n\n            metaDataList.append(metaData);\n        }\n    }\n    reader.clear();\n\n    return metaDataList;\n}\n\nvoid Manager::downloadAvailableDefinitionsMetaData()\n{\n//    QUrl url(QLatin1String(\"http://www.kate-editor.org/syntax/update-3.2.xml\"));\n//    QNetworkRequest request(url);\n    // Currently this takes a couple of seconds on Windows 7: QTBUG-10106.\n  //  QNetworkReply *reply = m_networkManager.get(request);\n  //  connect(reply, SIGNAL(finished()), this, SLOT(downloadAvailableDefinitionsListFinished()));\n}\n\nvoid Manager::downloadAvailableDefinitionsListFinished()\n{\n//    if (QNetworkReply *reply = qobject_cast<QNetworkReply *>(sender())) {\n//        if (reply->error() == QNetworkReply::NoError)\n//            emit definitionsMetaDataReady(parseAvailableDefinitionsList(reply));\n//        else\n//            emit errorDownloadingDefinitionsMetaData();\n//        reply->deleteLater();\n//    }\n}\n\nvoid Manager::downloadDefinitions(const QList<QUrl> &urls, const QString &savePath)\n{\n//    m_downloaders.clear();\n//    foreach (const QUrl &url, urls)\n//        m_downloaders.append(new DefinitionDownloader(url, savePath));\n\n//    m_downloadingDefinitions = true;\n//    QFuture<void> future = QtConcurrent::map(m_downloaders, DownloaderStarter());\n//    m_downloadWatcher.setFuture(future);\n//    Core::ICore::instance()->progressManager()->addTask(future,\n//                                                        tr(\"Downloading definitions\"),\n//                                                        Constants::TASK_DOWNLOAD_DEFINITIONS);\n}\n\nvoid Manager::downloadDefinitionsFinished()\n{\n//    int errors = 0;\n//    bool writeError = false;\n//    foreach (DefinitionDownloader *downloader, m_downloaders) {\n//        DefinitionDownloader::Status status = downloader->status();\n//        if (status != DefinitionDownloader::Ok) {\n//            ++errors;\n//            if (status == DefinitionDownloader::WriteError && !writeError)\n//                writeError = true;\n//        }\n//        delete downloader;\n//    }\n\n//    if (errors > 0) {\n//        QString text;\n//        if (errors == m_downloaders.size())\n//            text = tr(\"Error downloading selected definition(s).\");\n//        else\n//            text = tr(\"Error downloading one or more definitions.\");\n//        if (writeError)\n//            text.append(tr(\"\\nPlease check the directory's access rights.\"));\n//        QMessageBox::critical(0, tr(\"Download Error\"), text);\n//    }\n\n//    m_downloadingDefinitions = false;\n}\n\nbool Manager::isDownloadingDefinitions() const\n{\n    return m_downloadingDefinitions;\n}\n\nvoid Manager::clear()\n{\n    m_idByName.clear();\n    m_idByMimeType.clear();\n    m_definitions.clear();\n    m_definitionsMetaData.clear();\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/manager.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef MANAGER_H\n#define MANAGER_H\n\n#include \"highlightdefinitionmetadata.h\"\n\n#include <QtCore/QString>\n#include <QtCore/QHash>\n#include <QtCore/QSet>\n#include <QtCore/QUrl>\n#include <QtCore/QList>\n#include <QtCore/QSharedPointer>\n#include <QtCore/QFutureWatcher>\n//#include <QtNetwork/QNetworkAccessManager>\n\nQT_BEGIN_NAMESPACE\nclass QFileInfo;\nclass QStringList;\nclass QIODevice;\ntemplate <class> class QFutureInterface;\ntemplate <class> class QSharedPointer;\nQT_END_NAMESPACE\n\nnamespace TextEditor {\nnamespace Internal {\n\nclass HighlightDefinition;\nclass DefinitionDownloader;\n\n// This is the generic highlighter manager. It is not thread-safe.\n\nclass Manager : public QObject\n{\n    Q_OBJECT\npublic:\n    virtual ~Manager();\n    static Manager *instance();\n\n    QString definitionIdByName(const QString &name) const;\n    QString definitionIdByMimeType(const QString &mimeType) const;\n    QString definitionIdByAnyMimeType(const QStringList &mimeTypes) const;\n\n    bool isBuildingDefinition(const QString &id) const;\n\n    QSharedPointer<HighlightDefinition> definition(const QString &id);\n    QSharedPointer<HighlightDefinitionMetaData> definitionMetaData(const QString &id) const;\n\n    void downloadAvailableDefinitionsMetaData();\n    void downloadDefinitions(const QList<QUrl> &urls, const QString &savePath);\n    bool isDownloadingDefinitions() const;\n\n    static QSharedPointer<HighlightDefinitionMetaData> parseMetadata(const QFileInfo &fileInfo);\n    void loadFromPath(const QStringList & definitionsPaths);\npublic slots:\n    void registerMimeTypes();\n\nprivate slots:\n    void registerMimeType(int index) const;\n    void registerMimeTypesFinished();\n    void downloadAvailableDefinitionsListFinished();\n    void downloadDefinitionsFinished();\n\nsignals:\n    void mimeTypesRegistered();\n\nprivate:\n    Manager();\n    Q_DISABLE_COPY(Manager)\n\n//    void gatherDefinitionsMimeTypes(QFutureInterface<Core::MimeType> &future);\n    QList<HighlightDefinitionMetaData> parseAvailableDefinitionsList(QIODevice *device) const;\n    void clear();\n\n    bool m_downloadingDefinitions;\n    bool m_registeringMimeTypes;\n    int m_queuedMimeTypeRegistrations;\n\n    QHash<QString, QString> m_idByName;\n    QHash<QString, QString> m_idByMimeType;\n    QHash<QString, QSharedPointer<HighlightDefinition> > m_definitions;\n    QHash<QString, QSharedPointer<HighlightDefinitionMetaData> > m_definitionsMetaData;\n    QSet<QString> m_isBuilding;\n\n    //QList<DefinitionDownloader *> m_downloaders;\n    //QNetworkAccessManager m_networkManager;\n\n    QFutureWatcher<void> m_downloadWatcher;\n    //QFutureWatcher<Core::MimeType> m_mimeTypeWatcher;\n\n    struct PriorityComp\n    {\n        bool operator()(const QSharedPointer<HighlightDefinitionMetaData> &a,\n                        const QSharedPointer<HighlightDefinitionMetaData> &b) {\n            return a->priority() > b->priority();\n        }\n    };\nsignals:\n    void definitionsMetaDataReady(const QList<Internal::HighlightDefinitionMetaData>&);\n    void errorDownloadingDefinitionsMetaData();\n};\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // MANAGER_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/manager2.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"manager2.h\"\n#include \"highlighter.h\"\n#include \"highlightdefinition.h\"\n#include \"highlightdefinitionhandler.h\"\n#include \"highlighterexception.h\"\n#include \"highlightdefinitionmetadata.h\"\n\n#include <QDir>\n#include <QFileInfo>\n#include <QXmlStreamReader>\n\nusing namespace TextEditor::Internal;\n\n\nManager2 *Manager2::instance()\n{\n    static Manager2 manager;\n    return &manager;\n}\n\nQSharedPointer<HighlightDefinitionMetaData> Manager2::parseMetadata(const QFileInfo &fileInfo)\n{\n    static const QLatin1Char kSemiColon(';');\n    static const QLatin1Char kSpace(' ');\n    static const QLatin1Char kDash('-');\n    static const QLatin1String kLanguage(\"language\");\n    static const QLatin1String kArtificial(\"text/x-artificial-\");\n\n    QFile definitionFile(fileInfo.absoluteFilePath());\n    if (!definitionFile.open(QIODevice::ReadOnly | QIODevice::Text))\n        return QSharedPointer<HighlightDefinitionMetaData>();\n\n    QSharedPointer<HighlightDefinitionMetaData> metaData(new HighlightDefinitionMetaData);\n\n    QXmlStreamReader reader(&definitionFile);\n    while (!reader.atEnd() && !reader.hasError()) {\n        if (reader.readNext() == QXmlStreamReader::StartElement && reader.name() == kLanguage) {\n            const QXmlStreamAttributes &atts = reader.attributes();\n\n            metaData->setFileName(fileInfo.fileName());\n            metaData->setId(fileInfo.absoluteFilePath());\n            metaData->setName(atts.value(HighlightDefinitionMetaData::kName).toString());\n            metaData->setVersion(atts.value(HighlightDefinitionMetaData::kVersion).toString());\n            metaData->setPriority(atts.value(HighlightDefinitionMetaData::kPriority).toString()\n                                  .toInt());\n            metaData->setPatterns(atts.value(HighlightDefinitionMetaData::kExtensions)\n                                  .toString().split(kSemiColon, qtSkipEmptyParts));\n\n            QStringList mimeTypes = atts.value(HighlightDefinitionMetaData::kMimeType).\n                                    toString().split(kSemiColon, qtSkipEmptyParts);\n            if (mimeTypes.isEmpty()) {\n                // There are definitions which do not specify a MIME type, but specify file\n                // patterns. Creating an artificial MIME type is a workaround.\n                QString artificialType(kArtificial);\n                artificialType.append(metaData->name().trimmed().replace(kSpace, kDash));\n                mimeTypes.append(artificialType);\n            }\n            metaData->setMimeTypes(mimeTypes);\n\n            break;\n        }\n    }\n    reader.clear();\n    definitionFile.close();\n\n    return metaData;\n}\n\nstruct PriorityComp\n{\n    bool operator()(const QSharedPointer<HighlightDefinitionMetaData> &a,\n                    const QSharedPointer<HighlightDefinitionMetaData> &b) {\n        return a->priority() > b->priority();\n    }\n};\n\nvoid Manager2::loadPath(const QStringList &definitionsPaths)\n{\n    foreach (const QString &path, definitionsPaths) {\n        if (path.isEmpty())\n            continue;\n\n        QDir definitionsDir(path);\n        QStringList filter(QLatin1String(\"*.xml\"));\n        definitionsDir.setNameFilters(filter);\n\n        QList<QSharedPointer<HighlightDefinitionMetaData> > allMetaData;\n        const QFileInfoList &filesInfo = definitionsDir.entryInfoList();\n        foreach (const QFileInfo &fileInfo, filesInfo) {\n            const QSharedPointer<HighlightDefinitionMetaData> &metaData = parseMetadata(fileInfo);\n            if (!metaData.isNull())\n                allMetaData.append(metaData);\n        }\n\n        // Consider definitions with higher priority first.\n        qSort(allMetaData.begin(), allMetaData.end(), PriorityComp());\n\n        foreach (const QSharedPointer<HighlightDefinitionMetaData> &metaData, allMetaData) {\n            if (m_idByName.contains(metaData->name()))\n                // Name already exists... This is a fallback item, do not consider it.\n                continue;\n\n            const QString &id = metaData->id();\n            m_idByName.insert(metaData->name(), id);\n            m_definitionsMetaData.insert(id, metaData);\n\n            foreach (const QString &type, metaData->mimeTypes()) {\n                if (m_idByMimeType.contains(type))\n                    continue;\n\n                m_idByMimeType.insert(type, id);\n            }\n//            static const QStringList textPlain(QLatin1String(\"text/plain\"));\n\n//            // A definition can specify multiple MIME types and file extensions/patterns.\n//            // However, each thing is done with a single string. There is no direct way to\n//            // tell which patterns belong to which MIME types nor whether a MIME type is just\n//            // an alias for the other. Currently, I associate all patterns with all MIME\n//            // types from a definition.\n//            QList<Core::MimeGlobPattern> globPatterns;\n//            foreach (const QString &type, metaData->mimeTypes()) {\n//                if (m_idByMimeType.contains(type))\n//                    continue;\n\n//                m_idByMimeType.insert(type, id);\n//                Core::MimeType mimeType = mimeDatabase->findByType(type);\n//                if (mimeType.isNull()) {\n//                    mimeType.setType(type);\n//                    mimeType.setSubClassesOf(textPlain);\n//                    mimeType.setComment(metaData->name());\n\n//                    // If there's a user modification for this mime type, we want to use the\n//                    // modified patterns and rule-based matchers. If not, just consider what\n//                    // is specified in the definition file.\n//                    QHash<QString, Core::MimeType>::const_iterator it =\n//                            userModified.find(mimeType.type());\n//                    if (it == userModified.end()) {\n//                        if (globPatterns.isEmpty()) {\n//                            foreach (const QString &pattern, metaData->patterns()) {\n//                                static const QLatin1String mark(\"*.\");\n//                                if (pattern.startsWith(mark)) {\n//                                    const QString &suffix = pattern.right(pattern.length() - 2);\n//                                    if (!knownSuffixes.contains(suffix))\n//                                        knownSuffixes.insert(suffix);\n//                                    else\n//                                        continue;\n//                                }\n//                                QRegExp regExp(pattern, Qt::CaseSensitive, QRegExp::Wildcard);\n//                                globPatterns.append(Core::MimeGlobPattern(regExp, 50));\n//                            }\n//                        }\n//                        mimeType.setGlobPatterns(globPatterns);\n//                    } else {\n//                        mimeType.setGlobPatterns(it.value().globPatterns());\n//                        mimeType.setMagicRuleMatchers(it.value().magicRuleMatchers());\n//                    }\n\n//                    mimeDatabase->addMimeType(mimeType);\n//                    future.reportResult(mimeType);\n//                }\n//            }\n        }\n    }\n\n}\n\nQString Manager2::definitionIdByName(const QString &name) const\n{ return m_idByName.value(name); }\n\nQString Manager2::definitionIdByMimeType(const QString &mimeType) const\n{ return m_idByMimeType.value(mimeType); }\n\nQStringList  Manager2::mimeTypes() const\n{\n    return m_idByMimeType.keys();\n}\n\nQString Manager2::definitionIdByAnyMimeType(const QStringList &mimeTypes) const\n{\n    QString definitionId;\n    foreach (const QString &mimeType, mimeTypes) {\n        definitionId = definitionIdByMimeType(mimeType);\n        if (!definitionId.isEmpty())\n            break;\n    }\n    return definitionId;\n}\n\nQSharedPointer<HighlightDefinition> Manager2::definition(const QString &id)\n{\n    if (!id.isEmpty() && !m_definitions.contains(id)) {\n        QFile definitionFile(id);\n        if (!definitionFile.open(QIODevice::ReadOnly | QIODevice::Text))\n            return QSharedPointer<HighlightDefinition>();\n\n        QSharedPointer<HighlightDefinition> definition(new HighlightDefinition);\n        HighlightDefinitionHandler handler(definition);\n\n        QXmlInputSource source(&definitionFile);\n        QXmlSimpleReader reader;\n        reader.setContentHandler(&handler);\n        m_isBuilding.insert(id);\n        try {\n            reader.parse(source);\n        } catch (HighlighterException &) {\n            definition.clear();\n        }\n        m_isBuilding.remove(id);\n        definitionFile.close();\n\n        m_definitions.insert(id, definition);\n    }\n\n    return m_definitions.value(id);\n}\n\nQSharedPointer<HighlightDefinitionMetaData> Manager2::definitionMetaData(const QString &id) const\n{ return m_definitionsMetaData.value(id); }\n\nbool Manager2::isBuildingDefinition(const QString &id) const\n{ return m_isBuilding.contains(id); }\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/manager2.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef MANAGER2_H\n#define MANAGER2_H\n\n#include \"highlightdefinitionmetadata.h\"\n#include \"highlightdefinition.h\"\n\n#include <QtCore/QString>\n#include <QtCore/QHash>\n#include <QtCore/QSet>\n#include <QtCore/QUrl>\n#include <QtCore/QList>\n#include <QtCore/QSharedPointer>\n#include <QtCore/QFutureWatcher>\n\nQT_BEGIN_NAMESPACE\nclass QFileInfo;\nclass QStringList;\nclass QIODevice;\ntemplate <class> class QFutureInterface;\ntemplate <class> class QSharedPointer;\nQT_END_NAMESPACE\n\nnamespace TextEditor {\nnamespace Internal {\n\n// This is the generic highlighter manager. It is not thread-safe.\n\nclass Manager2 : public QObject\n{\n    Q_OBJECT\npublic:\n    static Manager2 *instance();\n    void loadPath(const QStringList &definitionsPaths);\npublic:\n    QSharedPointer<HighlightDefinitionMetaData> parseMetadata(const QFileInfo &fileInfo);\n    QString definitionIdByName(const QString &name) const;\n    QString definitionIdByMimeType(const QString &mimeType) const;\n    QString definitionIdByAnyMimeType(const QStringList &mimeTypes) const;\n\n    QSharedPointer<HighlightDefinition> definition(const QString &id);\n    QSharedPointer<HighlightDefinitionMetaData> definitionMetaData(const QString &id) const;\n    bool isBuildingDefinition(const QString &id) const;\npublic:\n    QStringList mimeTypes() const;\nprotected:\n    QHash<QString, QString> m_idByName;\n    QHash<QString, QString> m_idByMimeType;\n    QHash<QString, QSharedPointer<TextEditor::Internal::HighlightDefinition> > m_definitions;\n    QHash<QString, QSharedPointer<TextEditor::Internal::HighlightDefinitionMetaData> > m_definitionsMetaData;\n    QSet<QString> m_isBuilding;\n};\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // MANAGER2_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/progressdata.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"progressdata.h\"\n#include \"rule.h\"\n\n#include <QtCore/QtGlobal>\n\nusing namespace TextEditor;\nusing namespace Internal;\n\nProgressData::ProgressData() :\n    m_offset(0),\n    m_savedOffset(-1),\n    m_onlySpacesSoFar(true),\n    m_openingBraceMatchAtFirstNonSpace(false),\n    m_closingBraceMatchAtNonEnd(false),\n    m_willContinueLine(false)\n{}\n\nProgressData::~ProgressData()\n{\n    foreach (Rule *rule, m_trackedRules)\n        rule->progressFinished();\n}\n\nvoid ProgressData::setOffset(const int offset)\n{ m_offset = offset; }\n\nint ProgressData::offset() const\n{ return m_offset; }\n\nvoid ProgressData::incrementOffset()\n{ ++m_offset; }\n\nvoid ProgressData::incrementOffset(const int increment)\n{ m_offset += increment; }\n\nvoid ProgressData::saveOffset()\n{ m_savedOffset = m_offset; }\n\nvoid ProgressData::restoreOffset()\n{\n    Q_ASSERT(m_savedOffset != -1);\n    m_offset = m_savedOffset;\n    m_savedOffset = -1;\n}\n\nvoid ProgressData::setOnlySpacesSoFar(const bool onlySpaces)\n{ m_onlySpacesSoFar = onlySpaces; }\n\nbool ProgressData::isOnlySpacesSoFar() const\n{ return m_onlySpacesSoFar; }\n\nvoid ProgressData::setOpeningBraceMatchAtFirstNonSpace(const bool match)\n{ m_openingBraceMatchAtFirstNonSpace = match; }\n\nbool ProgressData::isOpeningBraceMatchAtFirstNonSpace() const\n{ return m_openingBraceMatchAtFirstNonSpace; }\n\nvoid ProgressData::setClosingBraceMatchAtNonEnd(const bool match)\n{ m_closingBraceMatchAtNonEnd = match; }\n\nbool ProgressData::isClosingBraceMatchAtNonEnd() const\n{ return m_closingBraceMatchAtNonEnd; }\n\nvoid ProgressData::clearBracesMatches()\n{\n    if (m_openingBraceMatchAtFirstNonSpace)\n        m_openingBraceMatchAtFirstNonSpace = false;\n    if (m_closingBraceMatchAtNonEnd)\n        m_closingBraceMatchAtNonEnd = false;\n}\n\nvoid ProgressData::setWillContinueLine(const bool willContinue)\n{ m_willContinueLine = willContinue; }\n\nbool ProgressData::isWillContinueLine() const\n{ return m_willContinueLine; }\n\nvoid ProgressData::setCaptures(const QStringList &captures)\n{ m_captures = captures; }\n\nconst QStringList &ProgressData::captures() const\n{ return m_captures; }\n\nvoid ProgressData::trackRule(Rule *rule)\n{\n    m_trackedRules.append(rule);\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/progressdata.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef PROGRESSDATA_H\n#define PROGRESSDATA_H\n\n#include <QtCore/QStringList>\n\nnamespace TextEditor {\nnamespace Internal {\n\nclass Rule;\n\nclass ProgressData\n{\npublic:\n    ProgressData();\n    ~ProgressData();\n\n    void setOffset(const int offset);\n    int offset() const;\n\n    void incrementOffset();\n    void incrementOffset(const int increment);\n\n    void saveOffset();\n    void restoreOffset();\n\n    void setOnlySpacesSoFar(const bool onlySpaces);\n    bool isOnlySpacesSoFar() const;\n\n    void setOpeningBraceMatchAtFirstNonSpace(const bool match);\n    bool isOpeningBraceMatchAtFirstNonSpace() const;\n\n    void setClosingBraceMatchAtNonEnd(const bool match);\n    bool isClosingBraceMatchAtNonEnd() const;\n\n    void clearBracesMatches();\n\n    void setWillContinueLine(const bool willContinue);\n    bool isWillContinueLine() const;\n\n    void setCaptures(const QStringList &captures);\n    const QStringList &captures() const;\n\n    void trackRule(Rule *rule);\n\nprivate:\n    int m_offset;\n    int m_savedOffset;\n    bool m_onlySpacesSoFar;\n    bool m_openingBraceMatchAtFirstNonSpace;\n    bool m_closingBraceMatchAtNonEnd;\n    bool m_willContinueLine;\n    QStringList m_captures;\n    QList<Rule *> m_trackedRules;\n};\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // PROGRESSDATA_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/reuse.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef REUSE_H\n#define REUSE_H\n\n#include <Qt>\n#include <QtCore/QString>\n#include <QtCore/QLatin1String>\n#include <QtCore/QChar>\n#include <QtGui/QFont>\n\nnamespace TextEditor {\nnamespace Internal {\n\ninline bool toBool(const QString &s)\n{\n    static const QLatin1String kTrue(\"true\");\n    static const QLatin1String k1(\"1\");\n\n    if (s.toLower() == kTrue || s == k1)\n        return true;\n    return false;\n}\n\n\ninline Qt::CaseSensitivity toCaseSensitivity(const bool sensitive)\n{\n    if (sensitive)\n        return Qt::CaseSensitive;\n    return Qt::CaseInsensitive;\n}\n\ninline QFont::Weight toFontWeight(const bool bold)\n{\n    if (bold)\n        return QFont::Bold;\n    else\n        return QFont::Normal;\n}\n\ninline bool isOctalDigit(const QChar &c)\n{\n    static const QLatin1Char k0('0');\n    static const QLatin1Char k7('7');\n\n    return c >= k0 && c <= k7;\n}\n\ninline bool isHexDigit(const QChar &c)\n{\n    static const QLatin1Char k0('0');\n    static const QLatin1Char k9('9');\n    static const QLatin1Char kA('A');\n    static const QLatin1Char kF('F');\n    static const QLatin1Char ka('a');\n    static const QLatin1Char kf('f');\n\n    if ((c >= k0 && c <= k9) || (c >= kA && c <= kF) || (c >= ka && c <= kf))\n        return true;\n\n    return false;\n}\n\ninline void setStartCharacter(QChar *c, const QString &character)\n{\n    if (!character.isEmpty())\n        *c = character.at(0);\n}\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // REUSE_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/rule.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"rule.h\"\n#include \"highlighterexception.h\"\n#include \"progressdata.h\"\n#include \"highlightdefinition.h\"\n#include \"reuse.h\"\n\n#include <QtCore/QStringList>\n\n#include <functional>\n\nusing namespace TextEditor;\nusing namespace Internal;\n\nconst QLatin1Char Rule::kBackSlash('\\\\');\nconst QLatin1Char Rule::kUnderscore('_');\nconst QLatin1Char Rule::kDot('.');\nconst QLatin1Char Rule::kPlus('+');\nconst QLatin1Char Rule::kMinus('-');\nconst QLatin1Char Rule::kZero('0');\nconst QLatin1Char Rule::kQuote('\\\"');\nconst QLatin1Char Rule::kSingleQuote('\\'');\nconst QLatin1Char Rule::kQuestion('?');\nconst QLatin1Char Rule::kX('x');\nconst QLatin1Char Rule::kA('a');\nconst QLatin1Char Rule::kB('b');\nconst QLatin1Char Rule::kE('e');\nconst QLatin1Char Rule::kF('f');\nconst QLatin1Char Rule::kN('n');\nconst QLatin1Char Rule::kR('r');\nconst QLatin1Char Rule::kT('t');\nconst QLatin1Char Rule::kV('v');\nconst QLatin1Char Rule::kOpeningBrace('{');\nconst QLatin1Char Rule::kClosingBrace('}');\n\nRule::Rule(bool consumesNonSpace) :\n    m_lookAhead(false), m_firstNonSpace(false), m_column(-1), m_consumesNonSpace(consumesNonSpace)\n{}\n\nRule::~Rule()\n{}\n\nvoid Rule::setContext(const QString &context)\n{ m_context = context; }\n\nconst QString &Rule::context() const\n{ return m_context; }\n\nvoid Rule::setItemData(const QString &itemData)\n{ m_itemData = itemData; }\n\nconst QString &Rule::itemData() const\n{ return m_itemData; }\n\nvoid Rule::setBeginRegion(const QString &begin)\n{ m_beginRegion = begin; }\n\nconst QString &Rule::beginRegion() const\n{ return m_beginRegion; }\n\nvoid Rule::setEndRegion(const QString &end)\n{ m_endRegion = end; }\n\nconst QString &Rule::endRegion() const\n{ return m_endRegion; }\n\nvoid Rule::setLookAhead(const QString &lookAhead)\n{ m_lookAhead = toBool(lookAhead); }\n\nbool Rule::isLookAhead() const\n{ return m_lookAhead; }\n\nvoid Rule::setFirstNonSpace(const QString &firstNonSpace)\n{ m_firstNonSpace = toBool(firstNonSpace); }\n\nbool Rule::isFirstNonSpace() const\n{ return m_firstNonSpace; }\n\nvoid Rule::setColumn(const QString &column)\n{\n    bool ok;\n    m_column = column.toInt(&ok);\n    if (!ok)\n        m_column = -1;\n}\n\nint Rule::column() const\n{ return m_column; }\n\nvoid Rule::addChild(const QSharedPointer<Rule> &rule)\n{ m_children.append(rule); }\n\nbool Rule::hasChildren() const\n{ return !m_children.isEmpty(); }\n\nconst QList<QSharedPointer<Rule> > &Rule::children() const\n{ return m_children; }\n\nvoid Rule::setDefinition(const QSharedPointer<HighlightDefinition> &definition)\n{ m_definition = definition; }\n\nconst QSharedPointer<HighlightDefinition> &Rule::definition() const\n{ return m_definition; }\n\ntemplate <class predicate_t>\nbool Rule::predicateMatchSucceed(const QString &text,\n                                 const int length,\n                                 ProgressData *progress,\n                                 const predicate_t &p) const\n{\n    int original = progress->offset();\n    while (progress->offset() < length && p(text.at(progress->offset())))\n        progress->incrementOffset();\n\n    if (original != progress->offset())\n        return true;\n\n    return false;\n}\n\nbool Rule::charPredicateMatchSucceed(const QString &text,\n                                     const int length,\n                                     ProgressData *progress,\n                                     bool (QChar::* predicate)() const) const\n{\n    return predicateMatchSucceed(text, length, progress, std::mem_fun_ref(predicate));\n}\n\nbool Rule::charPredicateMatchSucceed(const QString &text,\n                                     const int length,\n                                     ProgressData *progress,\n                                     bool (*predicate)(const QChar &)) const\n{\n    return predicateMatchSucceed(text, length, progress, std::ptr_fun(predicate));\n}\n\nbool Rule::matchSucceed(const QString &text, const int length, ProgressData *progress)\n{ \n    if (m_firstNonSpace && !progress->isOnlySpacesSoFar())\n        return false;\n\n    if (m_column != -1 && m_column != progress->offset())\n        return false;\n\n    int original = progress->offset();\n    if (doMatchSucceed(text, length, progress)) {\n        if (progress->isOnlySpacesSoFar() && !m_lookAhead && m_consumesNonSpace)\n            progress->setOnlySpacesSoFar(false);\n\n        if (m_lookAhead)\n            progress->setOffset(original);\n\n        return true;\n    }\n\n    return false;\n}\n\nRule *Rule::clone() const\n{ return doClone(); }\n\nvoid Rule::progressFinished()\n{ doProgressFinished(); }\n\nbool Rule::matchCharacter(const QString &text,\n                          const int length,\n                          ProgressData *progress,\n                          const QChar &c,\n                          bool saveRestoreOffset) const\n{\n    Q_UNUSED(length)\n    Q_ASSERT(progress->offset() < length);\n\n    if (text.at(progress->offset()) == c) {\n        if (saveRestoreOffset)\n            progress->saveOffset();\n        progress->incrementOffset();\n        return true;\n    }\n\n    return false;\n}\n\nbool Rule::matchEscapeSequence(const QString &text,\n                               const int length,\n                               ProgressData *progress,\n                               bool saveRestoreOffset) const\n{\n    if (matchCharacter(text, length, progress, kBackSlash, saveRestoreOffset)) {\n\n        if (progress->offset() < length) {\n            const QChar &c = text.at(progress->offset());\n            if (c == kA || c == kB || c == kE || c == kF || c == kN || c == kR || c == kT ||\n                c == kV || c == kQuestion || c == kSingleQuote || c == kQuote || c == kBackSlash) {\n                progress->incrementOffset();\n                return true;\n            } else if (saveRestoreOffset) {\n                    progress->restoreOffset();\n            }\n        } else if (saveRestoreOffset) {\n            progress->restoreOffset();\n        }\n    }\n\n    return false;\n}\n\nbool Rule::matchOctalSequence(const QString &text,\n                              const int length,\n                              ProgressData *progress,\n                              bool saveRestoreOffset) const\n{\n    // An octal sequence is identified as in the C++ Standard.\n    // octal-escape-sequence:\n    //   \\ octal-digit\n    //   \\ octal-digit octal-digit\n    //   \\ octal-digit octal-digit octal-digit\n\n    if (matchCharacter(text, length, progress, kBackSlash, saveRestoreOffset)) {\n\n        int count = 0;\n        while (progress->offset() < length &&\n               count < 3 &&\n               isOctalDigit(text.at(progress->offset()))) {\n            ++count;\n            progress->incrementOffset();\n        }\n\n        if (count > 0)\n            return true;\n        else if (saveRestoreOffset)\n            progress->restoreOffset();\n    }\n\n    return false;\n}\n\nbool Rule::matchHexSequence(const QString &text,\n                            const int length,\n                            ProgressData *progress,\n                            bool saveRestoreOffset) const\n{\n    // An hex sequence is identified as in the C++ Standard.\n    // hexadecimal-escape-sequence:\n    //   \\x hexadecimal-digit\n    //   hexadecimal-escape-sequence hexadecimal-digit\n\n    if (matchCharacter(text, length, progress, kBackSlash, saveRestoreOffset)) {\n\n        if (progress->offset() < length && matchCharacter(text, length, progress, kX, false)) {\n            bool found = false;\n            while (progress->offset() < length && isHexDigit(text.at(progress->offset()))) {\n                if (!found)\n                    found = true;\n                progress->incrementOffset();\n            }\n\n            if (found)\n                return true;\n            else if (saveRestoreOffset)\n                progress->restoreOffset();\n        } else if (saveRestoreOffset) {\n            progress->restoreOffset();\n        }\n    }\n\n    return false;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/rule.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef RULE_H\n#define RULE_H\n\n#include <QtCore/QString>\n#include <QtCore/QList>\n#include <QtCore/QSharedPointer>\n\nnamespace TextEditor {\nnamespace Internal {\n\nclass ProgressData;\nclass HighlightDefinition;\n\nclass Rule\n{\npublic:\n    Rule(bool consumesNonSpace = true);\n    virtual ~Rule();\n\n    void setContext(const QString &context);\n    const QString &context() const;\n\n    void setItemData(const QString &itemData);\n    const QString &itemData() const;\n\n    void setBeginRegion(const QString &begin);\n    const QString &beginRegion() const;\n\n    void setEndRegion(const QString &end);\n    const QString &endRegion() const;\n\n    void setLookAhead(const QString &lookAhead);\n    bool isLookAhead() const;\n\n    void setFirstNonSpace(const QString &firstNonSpace);\n    bool isFirstNonSpace() const;\n\n    void setColumn(const QString &column);\n    int column() const;\n\n    void addChild(const QSharedPointer<Rule> &rule);\n    const QList<QSharedPointer<Rule> > &children() const;\n    bool hasChildren() const;\n\n    void setDefinition(const QSharedPointer<HighlightDefinition> &definition);\n    const QSharedPointer<HighlightDefinition> &definition() const;\n\n    bool matchSucceed(const QString &text, const int length, ProgressData *progress);\n\n    Rule *clone() const;\n\n    void progressFinished();\n\nprotected:\n    bool charPredicateMatchSucceed(const QString &text,\n                                   const int length,\n                                   ProgressData *progress,\n                                   bool (QChar::* predicate)() const) const;\n    bool charPredicateMatchSucceed(const QString &text,\n                                   const int length,\n                                   ProgressData *progress,\n                                   bool (*predicate)(const QChar &)) const;\n\n    bool matchCharacter(const QString &text,\n                        const int length,\n                        ProgressData *progress,\n                        const QChar &c,\n                        bool saveRestoreOffset = true) const;\n    bool matchEscapeSequence(const QString &text,\n                             const int length,\n                             ProgressData *progress,\n                             bool saveRestoreOffset = true) const;\n    bool matchOctalSequence(const QString &text,\n                            const int length,\n                            ProgressData *progress,\n                            bool saveRestoreOffset = true) const;\n    bool matchHexSequence(const QString &text,\n                          const int length,\n                          ProgressData *progress,\n                          bool saveRestoreOffset = true) const;\n\n    static const QLatin1Char kBackSlash;\n    static const QLatin1Char kUnderscore;\n    static const QLatin1Char kDot;\n    static const QLatin1Char kPlus;\n    static const QLatin1Char kMinus;\n    static const QLatin1Char kZero;\n    static const QLatin1Char kQuote;\n    static const QLatin1Char kSingleQuote;\n    static const QLatin1Char kQuestion;\n    static const QLatin1Char kX;\n    static const QLatin1Char kA;\n    static const QLatin1Char kB;\n    static const QLatin1Char kE;\n    static const QLatin1Char kF;\n    static const QLatin1Char kN;\n    static const QLatin1Char kR;\n    static const QLatin1Char kT;\n    static const QLatin1Char kV;\n    static const QLatin1Char kOpeningBrace;\n    static const QLatin1Char kClosingBrace;\n\nprivate:\n    virtual bool doMatchSucceed(const QString &text, const int length, ProgressData *progress) = 0;\n\n    virtual Rule *doClone() const = 0;\n\n    virtual void doProgressFinished() {}\n\n    template <class predicate_t>\n    bool predicateMatchSucceed(const QString &text,\n                               const int length,\n                               ProgressData *progress,\n                               const predicate_t &p) const;\n\n    QString m_context;\n    QString m_itemData;\n    QString m_beginRegion;\n    QString m_endRegion;\n    bool m_lookAhead;\n    bool m_firstNonSpace;\n    int m_column;\n    bool m_consumesNonSpace;\n\n    QList<QSharedPointer<Rule> > m_children;\n\n    // Rules are represented within contexts. However, they have their own definition because\n    // of externally included rules.\n    QSharedPointer<HighlightDefinition> m_definition;\n};\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // RULE_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/specificrules.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"specificrules.h\"\n#include \"highlightdefinition.h\"\n#include \"keywordlist.h\"\n#include \"progressdata.h\"\n#include \"reuse.h\"\n#include <QDebug>\n\n#include <QtCore/QLatin1Char>\n\nusing namespace TextEditor;\nusing namespace Internal;\n\nnamespace {\n\nvoid replaceByCaptures(QChar *c, const QStringList &captures)\n{\n    int index = c->digitValue();\n    if (index > 0) {\n        const QString &capture = captures.at(index);\n        if (!capture.isEmpty())\n            *c = capture.at(0);\n    }\n}\n\nvoid replaceByCaptures(QString *s, const QStringList &captures)\n{\n    static const QLatin1Char kPercent('%');\n\n    int index;\n    int from = 0;\n    while ((index = s->indexOf(kPercent, from)) != -1) {\n        from = index + 1;\n\n        QString accumulator;\n        while (from < s->length() && s->at(from).isDigit()) {\n            accumulator.append(s->at(from));\n            ++from;\n        }\n\n        bool ok;\n        int number = accumulator.toInt(&ok);\n        Q_ASSERT(ok);\n\n        s->replace(index, accumulator.length() + 1, captures.at(number));\n    }\n}\n}\n\n// DetectChar\nvoid DetectCharRule::setChar(const QString &character)\n{ setStartCharacter(&m_char, character); }\n\nvoid DetectCharRule::doReplaceExpressions(const QStringList &captures)\n{ replaceByCaptures(&m_char, captures); }\n\nbool DetectCharRule::doMatchSucceed(const QString &text,\n                                    const int length,\n                                    ProgressData *progress)\n{\n    if (matchCharacter(text, length, progress, m_char)) {\n        return true;\n    }\n    return false;\n//    if (matchCharacter(text, length, progress, m_char)) {\n//        return true;\n//        // This is to make code folding have a control flow style look in the case of braces.\n//        // Naturally, this assumes that language definitions use braces with this meaning.\n//        if (m_char == kOpeningBrace && progress->isOnlySpacesSoFar() && !isLookAhead()) {\n//            progress->setOpeningBraceMatchAtFirstNonSpace(true);\n//        } else if (m_char == kClosingBrace &&\n//                   !text.right(length - progress->offset()).trimmed().isEmpty()) {\n//            progress->setClosingBraceMatchAtNonEnd(true);\n//        }\n//        return true;\n//    }\n//    return false;\n\n//    if (matchCharacter(text, length, progress, m_char)) {\n//        qDebug() << m_char << text;\n//        if (text.trimmed() == \"} else {\" && m_char == '}') {\n//            //qDebug() << \"error\";\n//             progress->setClosingBraceMatchAtNonEnd(true);\n//        }\n//        return true;\n//        // This is to make code folding have a control flow style look in the case of braces.\n//        // Naturally, this assumes that language definitions use braces with this meaning.\n//        if ( (m_char == '{' || m_char == '(' || m_char == '[')\n//             && progress->isOnlySpacesSoFar() && !isLookAhead()) {\n//            progress->setOpeningBraceMatchAtFirstNonSpace(true);\n//        } else if ( (m_char == '}' || m_char == ')' || m_char == ']') &&\n//                    !text.right(length - progress->offset()).trimmed().isEmpty()) {\n//            progress->setClosingBraceMatchAtNonEnd(true);\n//        }\n//        if (m_char == kOpeningBrace && progress->isOnlySpacesSoFar() && !isLookAhead()) {\n//            progress->setOpeningBraceMatchAtFirstNonSpace(true);\n//        } else if (m_char == kClosingBrace &&\n//                   !text.right(length - progress->offset()).trimmed().isEmpty()) {\n//            progress->setClosingBraceMatchAtNonEnd(true);\n//        }\n//        return true;\n//    }\n//    return false;\n}\n\n// Detect2Chars\nvoid Detect2CharsRule::setChar(const QString &character)\n{ setStartCharacter(&m_char, character); }\n\nvoid Detect2CharsRule::setChar1(const QString &character)\n{ setStartCharacter(&m_char1, character); }\n\nvoid Detect2CharsRule::doReplaceExpressions(const QStringList &captures)\n{\n    replaceByCaptures(&m_char, captures);\n    replaceByCaptures(&m_char1, captures);\n}\n\nbool Detect2CharsRule::doMatchSucceed(const QString &text,\n                                      const int length,\n                                      ProgressData *progress)\n{\n    if (matchCharacter(text, length, progress, m_char)) {\n        if (progress->offset() < length && matchCharacter(text, length, progress, m_char1, false))\n            return true;\n        else\n            progress->restoreOffset();\n    }\n\n    return false;\n}\n\n// AnyChar\nvoid AnyCharRule::setCharacterSet(const QString &s)\n{ m_characterSet = s; }\n\nbool AnyCharRule::doMatchSucceed(const QString &text,\n                                 const int length,\n                                 ProgressData *progress)\n{\n    Q_UNUSED(length)\n\n    if (m_characterSet.contains(text.at(progress->offset()))) {\n        progress->incrementOffset();\n        return true;\n    }\n\n    return false;\n}\n\n// StringDetect\nvoid StringDetectRule::setString(const QString &s)\n{\n    m_string = s;\n    m_length = m_string.length();\n}\n\nvoid StringDetectRule::setInsensitive(const QString &insensitive)\n{ m_caseSensitivity = toCaseSensitivity(!toBool(insensitive)); }\n\nvoid StringDetectRule::doReplaceExpressions(const QStringList &captures)\n{\n    replaceByCaptures(&m_string, captures);\n    m_length = m_string.length();\n}\n\nbool StringDetectRule::doMatchSucceed(const QString &text,\n                                      const int length,\n                                      ProgressData *progress)\n{\n    if (length - progress->offset() >= m_length) {\n        QString candidate = text.fromRawData(text.unicode() + progress->offset(), m_length);\n        if (candidate.compare(m_string, m_caseSensitivity) == 0) {\n            progress->incrementOffset(m_length);\n            return true;\n        }\n    }\n\n    return false;\n}\n\n// RegExpr\nvoid RegExprRule::setPattern(const QString &pattern)\n{\n    if (pattern.startsWith(QLatin1Char('^')))\n        m_onlyBegin = true;\n    m_expression.setPattern(pattern);\n}\n\nvoid RegExprRule::setInsensitive(const QString &insensitive)\n{ m_expression.setCaseSensitivity(toCaseSensitivity(!toBool(insensitive))); }\n\nvoid RegExprRule::setMinimal(const QString &minimal)\n{ m_expression.setMinimal(toBool(minimal)); }\n\nvoid RegExprRule::doReplaceExpressions(const QStringList &captures)\n{\n    QString s = m_expression.pattern();\n    replaceByCaptures(&s, captures);\n    m_expression.setPattern(s);\n}\n\nvoid RegExprRule::doProgressFinished()\n{\n    m_isCached = false;\n}\n\nbool RegExprRule::isExactMatch(ProgressData *progress)\n{\n    if (progress->offset() == m_offset && m_length > 0) {\n        progress->incrementOffset(m_length);\n        progress->setCaptures(m_captures);\n        return true;\n    }\n    return false;\n}\n\nbool RegExprRule::doMatchSucceed(const QString &text,\n                                 const int length,\n                                 ProgressData *progress)\n{\n    Q_UNUSED(length)\n\n    // A regular expression match is considered valid if it happens at the current position\n    // and if the match length is not zero.\n    const int offset = progress->offset();\n    if (offset > 0 && m_onlyBegin)\n        return false;\n\n    if (m_isCached) {\n        if (offset < m_offset || m_offset == -1 || m_length == 0)\n            return false;\n        if (isExactMatch(progress))\n            return true;\n    }\n\n    m_offset = m_expression.indexIn(text, offset, QRegExp::CaretAtOffset);\n    m_length = m_expression.matchedLength();\n    m_captures = m_expression.capturedTexts();\n\n    if (isExactMatch(progress))\n        return true;\n\n    m_isCached = true;\n    progress->trackRule(this);\n\n    return false;\n}\n\n// Keyword\nKeywordRule::KeywordRule(const QSharedPointer<HighlightDefinition> &definition) :\n    m_overrideGlobal(false),\n    m_localCaseSensitivity(Qt::CaseSensitive)\n{\n    setDefinition(definition);\n}\n\nKeywordRule::~KeywordRule()\n{}\n\nvoid KeywordRule::setInsensitive(const QString &insensitive)\n{\n    if (!insensitive.isEmpty()) {\n        m_overrideGlobal = true;\n        m_localCaseSensitivity = toCaseSensitivity(!toBool(insensitive));\n    }\n}\n\nvoid KeywordRule::setList(const QString &listName)\n{ m_list = definition()->keywordList(listName); }\n\nbool KeywordRule::doMatchSucceed(const QString &text,\n                                 const int length,\n                                 ProgressData *progress)\n{\n    int current = progress->offset();\n\n    if (current > 0 && !definition()->isDelimiter(text.at(current - 1)))\n        return false;\n    if (definition()->isDelimiter(text.at(current)))\n        return false;\n\n    while (current < length && !definition()->isDelimiter(text.at(current)))\n        ++current;\n\n    QString candidate =\n        QString::fromRawData(text.unicode() + progress->offset(), current - progress->offset());\n    if ((m_overrideGlobal && m_list->isKeyword(candidate, m_localCaseSensitivity)) ||\n        (!m_overrideGlobal && m_list->isKeyword(candidate, definition()->keywordsSensitive()))) {\n        progress->setOffset(current);\n        return true;\n    }\n\n    return false;\n}\n\n// Int\nbool IntRule::doMatchSucceed(const QString &text,\n                             const int length,\n                             ProgressData *progress)\n{\n    const int offset = progress->offset();\n\n    // This is necessary to correctly highlight an invalid octal like 09, for example.\n    if (offset > 0 && text.at(offset - 1).isDigit())\n        return false;\n\n    if (text.at(offset).isDigit() && text.at(offset) != kZero) {\n        progress->incrementOffset();\n        charPredicateMatchSucceed(text, length, progress, &QChar::isDigit);\n        return true;\n    }\n\n    return false;\n}\n\n// Float\nbool FloatRule::doMatchSucceed(const QString &text, const int length, ProgressData *progress)\n{\n    progress->saveOffset();\n\n    bool integralPart = charPredicateMatchSucceed(text, length, progress, &QChar::isDigit);\n\n    bool decimalPoint = false;\n    if (progress->offset() < length && text.at(progress->offset()) == kDot) {\n        progress->incrementOffset();\n        decimalPoint = true;\n    }\n\n    bool fractionalPart = charPredicateMatchSucceed(text, length, progress, &QChar::isDigit);\n\n    bool exponentialPart = false;\n    int offset = progress->offset();\n    if (offset < length && (text.at(offset) == kE || text.at(offset).toLower() == kE)) {\n        progress->incrementOffset();\n\n        offset = progress->offset();\n        if (offset < length && (text.at(offset) == kPlus || text.at(offset) == kMinus))\n            progress->incrementOffset();\n\n        if (charPredicateMatchSucceed(text, length, progress, &QChar::isDigit)) {\n            exponentialPart = true;\n        } else {\n            progress->restoreOffset();\n            return false;\n        }\n    }\n\n    if ((integralPart || fractionalPart) && (decimalPoint || exponentialPart))\n        return true;\n\n    progress->restoreOffset();\n    return false;\n}\n\n// COctal\nbool HlCOctRule::doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress)\n{\n    if (matchCharacter(text, length, progress, kZero)) {\n        // In the definition files the number matching rules which are more restrictive should\n        // appear before the rules which are least resctritive. Although this happens in general\n        // there is at least one case where this is not strictly followed for existent definition\n        // files (specifically, HlCHex comes before HlCOct). So the condition below.\n        const int offset = progress->offset();\n        if (offset < length && (text.at(offset) == kX || text.at(offset).toLower() == kX)) {\n            progress->restoreOffset();\n            return false;\n        }\n\n        charPredicateMatchSucceed(text, length, progress, &isOctalDigit);\n        return true;\n    }\n\n    return false;\n}\n\n// CHex\nbool HlCHexRule::doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress)\n{\n    if (matchCharacter(text, length, progress, kZero)) {\n        const int offset = progress->offset();\n        if (offset < length && text.at(offset) != kX && text.at(offset).toLower() != kX) {\n            progress->restoreOffset();\n            return false;\n        }\n\n        progress->incrementOffset();\n        if (charPredicateMatchSucceed(text, length, progress, &isHexDigit))\n            return true;\n        else\n            progress->restoreOffset();\n    }\n\n    return false;\n}\n\n// CString\nbool HlCStringCharRule::doMatchSucceed(const QString &text,\n                                       const int length,\n                                       ProgressData *progress)\n{\n    if (matchEscapeSequence(text, length, progress))\n        return true;\n\n    if (matchOctalSequence(text, length, progress))\n        return true;\n\n    if (matchHexSequence(text, length, progress))\n        return true;\n\n    return false;\n}\n\n// CChar\nbool HlCCharRule::doMatchSucceed(const QString &text,\n                                 const int length,\n                                 ProgressData *progress)\n{\n    if (matchCharacter(text, length, progress, kSingleQuote)) {\n        if (progress->offset() < length) {\n            if (text.at(progress->offset()) != kBackSlash &&\n                text.at(progress->offset()) != kSingleQuote) {\n                progress->incrementOffset();\n            } else if (!matchEscapeSequence(text, length, progress, false)) {\n                progress->restoreOffset();\n                return false;\n            }\n\n            if (progress->offset() < length &&\n                matchCharacter(text, length, progress, kSingleQuote, false)) {\n                return true;\n            } else {\n                progress->restoreOffset();\n            }\n        } else {\n            progress->restoreOffset();\n        }\n    }\n\n    return false;\n}\n\n// RangeDetect\nvoid RangeDetectRule::setChar(const QString &character)\n{ setStartCharacter(&m_char, character); }\n\nvoid RangeDetectRule::setChar1(const QString &character)\n{ setStartCharacter(&m_char1, character); }\n\nbool RangeDetectRule::doMatchSucceed(const QString &text,\n                                     const int length,\n                                     ProgressData *progress)\n{\n    if (matchCharacter(text, length, progress, m_char)) {\n        while (progress->offset() < length) {\n            if (matchCharacter(text, length, progress, m_char1, false))\n                return true;\n            progress->incrementOffset();\n        }\n        progress->restoreOffset();\n    }\n\n    return false;\n}\n\n// LineContinue\nbool LineContinueRule::doMatchSucceed(const QString &text,\n                                      const int length,\n                                      ProgressData *progress)\n{\n    if (progress->offset() != length - 1)\n        return false;\n\n    if (text.at(progress->offset()) == kBackSlash) {\n        progress->incrementOffset();\n        progress->setWillContinueLine(true);\n        return true;\n    }\n\n    return false;\n}\n\n// DetectSpaces\nDetectSpacesRule::DetectSpacesRule() : Rule(false)\n{}\n\nbool DetectSpacesRule::doMatchSucceed(const QString &text,\n                                      const int length,\n                                      ProgressData *progress)\n{\n    return charPredicateMatchSucceed(text, length, progress, &QChar::isSpace);\n}\n\n// DetectIdentifier\nbool DetectIdentifierRule::doMatchSucceed(const QString &text,\n                                          const int length,\n                                          ProgressData *progress)\n{\n    // Identifiers are characterized by a letter or underscore as the first character and then\n    // zero or more word characters (\\w*).\n    if (text.at(progress->offset()).isLetter() || text.at(progress->offset()) == kUnderscore) {\n        progress->incrementOffset();\n        while (progress->offset() < length) {\n            const QChar &current = text.at(progress->offset());\n            if (current.isLetterOrNumber() || current.isMark() || current == kUnderscore)\n                progress->incrementOffset();\n            else\n                break;\n        }\n        return true;\n    }\n    return false;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/generichighlighter/specificrules.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef SPECIFICRULES_H\n#define SPECIFICRULES_H\n\n#include \"rule.h\"\n#include \"dynamicrule.h\"\n\n#include <QtCore/QChar>\n#include <QtCore/QStringList>\n#include <QtCore/QRegExp>\n#include <QtCore/QSharedPointer>\n\nnamespace TextEditor {\nnamespace Internal {\n\nclass KeywordList;\nclass HighlightDefinition;\n\nclass DetectCharRule : public DynamicRule\n{\npublic:\n    virtual ~DetectCharRule() {}\n\n    void setChar(const QString &character);\n\nprivate:\n    virtual bool doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress);\n    virtual DetectCharRule *doClone() const { return new DetectCharRule(*this); }\n    virtual void doReplaceExpressions(const QStringList &captures);\n\n    QChar m_char;\n};\n\nclass Detect2CharsRule : public DynamicRule\n{\npublic:\n    virtual ~Detect2CharsRule() {}\n\n    void setChar(const QString &character);\n    void setChar1(const QString &character);\n\nprivate:\n    virtual bool doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress);\n    virtual Detect2CharsRule *doClone() const { return new Detect2CharsRule(*this); }\n    virtual void doReplaceExpressions(const QStringList &captures);\n\n    QChar m_char;\n    QChar m_char1;\n};\n\nclass AnyCharRule : public Rule\n{\npublic:\n    virtual ~AnyCharRule() {}\n\n    void setCharacterSet(const QString &s);\n\nprivate:\n    virtual bool doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress);\n    virtual AnyCharRule *doClone() const { return new AnyCharRule(*this); }\n\n    QString m_characterSet;\n};\n\nclass StringDetectRule : public DynamicRule\n{\npublic:\n    virtual ~StringDetectRule() {}\n\n    void setString(const QString &s);\n    void setInsensitive(const QString &insensitive);\n\nprivate:\n    virtual bool doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress);\n    virtual StringDetectRule *doClone() const { return new StringDetectRule(*this); }\n    virtual void doReplaceExpressions(const QStringList &captures);\n\n    QString m_string;\n    int m_length;\n    Qt::CaseSensitivity m_caseSensitivity;\n};\n\nclass RegExprRule : public DynamicRule\n{\npublic:\n    RegExprRule() : m_onlyBegin(false), m_isCached(false) {}\n    virtual ~RegExprRule() {}\n\n    void setPattern(const QString &pattern);\n    void setInsensitive(const QString &insensitive);\n    void setMinimal(const QString &minimal);    \n\nprivate:\n    virtual bool doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress);\n    virtual RegExprRule *doClone() const { return new RegExprRule(*this); }\n    virtual void doReplaceExpressions(const QStringList &captures);\n    virtual void doProgressFinished();\n\n    bool isExactMatch(ProgressData *progress);\n\n    bool m_onlyBegin;\n    bool m_isCached;\n    int m_offset;\n    int m_length;\n    QStringList m_captures;\n    QRegExp m_expression;\n};\n\nclass KeywordRule : public Rule\n{\npublic:\n    KeywordRule(const QSharedPointer<HighlightDefinition> &definition);\n    virtual ~KeywordRule();\n\n    void setInsensitive(const QString &insensitive);\n    void setList(const QString &listName);\n\nprivate:\n    virtual bool doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress);\n    virtual KeywordRule *doClone() const { return new KeywordRule(*this); }\n\n    bool m_overrideGlobal;\n    Qt::CaseSensitivity m_localCaseSensitivity;\n    QSharedPointer<KeywordList> m_list;\n};\n\nclass IntRule : public Rule\n{\npublic:\n    virtual ~IntRule() {}\n\nprivate:\n    virtual bool doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress);\n    virtual IntRule *doClone() const { return new IntRule(*this); }\n};\n\nclass FloatRule : public Rule\n{\npublic:\n    virtual ~FloatRule() {}\n\nprivate:\n    virtual bool doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress);\n    virtual FloatRule *doClone() const { return new FloatRule(*this); }\n};\n\nclass HlCOctRule : public Rule\n{\npublic:\n    virtual ~HlCOctRule() {}\n\nprivate:\n    virtual bool doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress);\n    virtual HlCOctRule *doClone() const { return new HlCOctRule(*this); }\n};\n\nclass HlCHexRule : public Rule\n{\npublic:\n    virtual ~HlCHexRule() {}\n\nprivate:\n    virtual bool doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress);\n    virtual HlCHexRule *doClone() const { return new HlCHexRule(*this); }\n};\n\nclass HlCStringCharRule : public Rule\n{\npublic:\n    virtual ~HlCStringCharRule() {}\n\nprivate:\n    virtual bool doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress);\n    virtual HlCStringCharRule *doClone() const { return new HlCStringCharRule(*this); }\n};\n\nclass HlCCharRule : public Rule\n{\npublic:\n    virtual ~HlCCharRule() {}\n\nprivate:\n    virtual bool doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress);\n    virtual HlCCharRule *doClone() const { return new HlCCharRule(*this); }\n};\n\nclass RangeDetectRule : public Rule\n{\npublic:\n    virtual ~RangeDetectRule() {}\n\n    void setChar(const QString &character);\n    void setChar1(const QString &character);\n\nprivate:\n    virtual bool doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress);\n    virtual RangeDetectRule *doClone() const { return new RangeDetectRule(*this); }\n\n    QChar m_char;\n    QChar m_char1;\n};\n\nclass LineContinueRule : public Rule\n{\npublic:\n    virtual ~LineContinueRule() {}\n\nprivate:\n    virtual bool doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress);\n    virtual LineContinueRule *doClone() const { return new LineContinueRule(*this); }\n};\n\nclass DetectSpacesRule : public Rule\n{\npublic:\n    DetectSpacesRule();\n    virtual ~DetectSpacesRule() {}\n\nprivate:\n    virtual bool doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress);\n    virtual DetectSpacesRule *doClone() const { return new DetectSpacesRule(*this); }\n};\n\nclass DetectIdentifierRule : public Rule\n{\npublic:\n    virtual ~DetectIdentifierRule() {}\n\nprivate:\n    virtual bool doMatchSucceed(const QString &text,\n                                const int length,\n                                ProgressData *progress);\n    virtual DetectIdentifierRule *doClone() const { return new DetectIdentifierRule(*this); }\n};\n\n} // namespace Internal\n} // namespace TextEditor\n\n#endif // SPECIFICRULES_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/itexteditor.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"itexteditor.h\"\n\n//#include <coreplugin/editormanager/editormanager.h>\n\n#include <QtCore/QTextCodec>\n#include <QDebug>\n\nusing namespace TextEditor;\n\nvoid ITextMark::paint(QPainter *painter, const QRect &rect) const\n{\n    m_icon.paint(painter, rect, Qt::AlignCenter);\n}\n\nint ITextMark::blockNumber() const\n{\n    return m_blockNumber;\n}\n\nvoid ITextMark::updateBlockNumber(int lineNumber)\n{\n     m_blockNumber = lineNumber;\n}\n\nvoid ITextMark::updateBlock(const QTextBlock &)\n{}\n\nvoid ITextMark::removedFromEditor()\n{}\n\nvoid ITextMark::documentClosing()\n{}\n\nvoid ITextMark::setIcon(const QIcon &icon)\n{\n    m_icon = icon;\n}\n\nint ITextMark::type() const\n{\n    return m_type;\n}\n\nint ITextMark::indexOfType() const\n{\n    return m_indexOfType;\n}\n\ndouble ITextMark::widthFactor() const\n{\n    return 1.0;\n}\n\nQTextBlock ITextMark::block() const\n{\n    return QTextBlock();\n}\n\nQMap<QString, QString> ITextEditor::openedTextEditorsContents()\n{\n    QMap<QString, QString> workingCopy;\n//    foreach (Core::IEditor *editor, Core::EditorManager::instance()->openedEditors()) {\n//        ITextEditor *textEditor = qobject_cast<ITextEditor *>(editor);\n//        if (!textEditor)\n//            continue;\n//        QString fileName = textEditor->file()->fileName();\n//        workingCopy[fileName] = textEditor->contents();\n//    }\n    return workingCopy;\n}\n\nQMap<QString, QTextCodec *> TextEditor::ITextEditor::openedTextEditorsEncodings()\n{\n    QMap<QString, QTextCodec *> workingCopy;\n//    foreach (Core::IEditor *editor, Core::EditorManager::instance()->openedEditors()) {\n//        ITextEditor *textEditor = qobject_cast<ITextEditor *>(editor);\n//        if (!textEditor)\n//            continue;\n//        QString fileName = textEditor->file()->fileName();\n//        workingCopy[fileName] = textEditor->textCodec();\n//    }\n    return workingCopy;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/itexteditor.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef ITEXTEDITOR_H\n#define ITEXTEDITOR_H\n\n#include \"texteditor_global.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n\n//#include <coreplugin/editormanager/ieditor.h>\n\n#include <QtCore/QObject>\n#include <QtCore/QList>\n#include <QtCore/QMap>\n#include <QtGui/QIcon>\n\nQT_BEGIN_NAMESPACE\nclass QIcon;\nclass QMenu;\nclass QPainter;\nclass QPoint;\nclass QRect;\nclass QTextBlock;\nQT_END_NAMESPACE\n\nnamespace TextEditor {\n\nclass ITextEditor;\n\nclass TEXTEDITOR_EXPORT ITextMark : public LiteApi::IEditorMarkNode\n{\n    Q_OBJECT\npublic:\n    ITextMark(QObject *parent = 0) : LiteApi::IEditorMarkNode(parent), m_blockNumber(-1), m_type(-1), m_indexOfType(0) {}\n    virtual ~ITextMark() {}\n\n    // determine order on markers on the same line. \n    virtual void paint(QPainter *painter, const QRect &rect) const;\n    virtual int blockNumber() const;\n    virtual void updateBlockNumber(int blockNumber);\n    virtual void updateBlock(const QTextBlock &block);\n    virtual void removedFromEditor();\n    virtual void documentClosing();\n    virtual void setIcon(const QIcon &icon);\n    virtual int type() const;\n    virtual int indexOfType() const;\n    virtual double widthFactor() const;\n    virtual QTextBlock block() const;\n\nprotected:\n    QIcon m_icon;\n    int  m_blockNumber;\n    int  m_type;\n    int  m_indexOfType;\n};\n\ntypedef QList<ITextMark *> TextMarks;\n\n\nclass TEXTEDITOR_EXPORT ITextMarkable : public QObject\n{\n    Q_OBJECT\npublic:\n    ITextMarkable(QObject *parent = 0) : QObject(parent) {}\n    virtual ~ITextMarkable() {}\n    virtual bool addMark(ITextMark *mark, int line) = 0;\n\n    virtual TextMarks marksAt(int line) const = 0;\n    virtual void removeMark(ITextMark *mark) = 0;\n    virtual bool hasMark(ITextMark *mark) const = 0;\n    virtual void updateMark(ITextMark *mark) = 0;\n};\n\nclass TEXTEDITOR_EXPORT ITextEditor : public QObject//Core::IEditor\n{\n    Q_OBJECT\npublic:\n    enum PositionOperation {\n        Current = 1,\n        EndOfLine = 2,\n        StartOfLine = 3,\n        Anchor = 4,\n        EndOfDoc = 5\n    };\n\n    ITextEditor() {}\n    virtual ~ITextEditor() {}\n\n    virtual int find(const QString &string) const = 0;\n\n    virtual int position(PositionOperation posOp = Current, int at = -1) const = 0;\n    virtual void convertPosition(int pos, int *line, int *column) const = 0;\n    virtual QRect cursorRect(int pos = -1) const = 0;\n    virtual int columnCount() const = 0;\n    virtual int rowCount() const = 0;\n\n    virtual QString contents() const = 0;\n    virtual QString selectedText() const = 0;\n    virtual QString textAt(int pos, int length) const = 0;\n    virtual QChar characterAt(int pos) const = 0;\n\n    /*! Removes \\a length characters to the right of the cursor. */\n    virtual void remove(int length) = 0;\n    /*! Inserts the given string to the right of the cursor. */\n    virtual void insert(const QString &string) = 0;\n    /*! Replaces \\a length characters to the right of the cursor with the given string. */\n    virtual void replace(int length, const QString &string) = 0;\n    /*! Sets current cursor position to \\a pos. */\n    virtual void setCursorPosition(int pos) = 0;\n    /*! Selects text between current cursor position and \\a toPos. */\n    virtual void select(int toPos) = 0;\n\n    virtual ITextMarkable *markableInterface() = 0;\n\n    virtual void setContextHelpId(const QString &) = 0;\n\n    enum TextCodecReason {\n        TextCodecOtherReason,\n        TextCodecFromSystemSetting,\n        TextCodecFromProjectSetting\n    };\n\n    virtual void setTextCodec(QTextCodec *, TextCodecReason reason = TextCodecOtherReason) = 0;\n    virtual QTextCodec *textCodec() const = 0;\n\n    static QMap<QString, QString> openedTextEditorsContents();\n    static QMap<QString, QTextCodec *> openedTextEditorsEncodings();\n\nsignals:\n    void contentsChanged();\n    void contentsChangedBecauseOfUndo();\n    void markRequested(TextEditor::ITextEditor *editor, int line);\n    void markContextMenuRequested(TextEditor::ITextEditor *editor, int line, QMenu *menu);\n    void tooltipOverrideRequested(TextEditor::ITextEditor *editor, const QPoint &globalPos, int position, bool *handled);\n    void tooltipRequested(TextEditor::ITextEditor *editor, const QPoint &globalPos, int position);\n    void contextHelpIdRequested(TextEditor::ITextEditor *editor, int position);\n};\n\n} // namespace TextEditor\n\n#endif // ITEXTEDITOR_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/katehighlighter.cpp",
    "content": "#include \"katehighlighter.h\"\n#include \"generichighlighter/highlighter.h\"\n#include \"generichighlighter/highlightdefinition.h\"\n#include \"generichighlighter/highlightdefinitionhandler.h\"\n#include \"generichighlighter/highlighterexception.h\"\n#include \"generichighlighter/highlightdefinitionmetadata.h\"\n#include \"generichighlighter/manager2.h\"\n#include \"texteditorconstants.h\"\n\n#include <QDir>\n#include <QFileInfo>\n#include <QXmlStreamReader>\n\n#include \"colorstyle/colorstyle.h\"\n\nusing namespace TextEditor::Internal;\nusing namespace TextEditor::Constants;\nusing namespace TextEditor;\n\nKateHighlighter::KateHighlighter(QObject *parent) :\n    QObject(parent)\n{\n}\n\nvoid KateHighlighter::loadPath(const QString &definitionsPaths)\n{\n    Manager2::instance()->loadPath(QStringList(definitionsPaths));\n}\n\nQStringList KateHighlighter::mimeTypes() const\n{\n    return Manager2::instance()->mimeTypes();\n}\n\nQString KateHighlighter::mimeTypeName(const QString &mimeType) const\n{\n    QString id = Manager2::instance()->definitionIdByMimeType(mimeType);\n    QSharedPointer<HighlightDefinitionMetaData> data = Manager2::instance()->definitionMetaData(id);\n    if (data) {\n        return data->name();\n    }\n    return QString();\n}\n\nQStringList KateHighlighter::mimeTypePatterns(const QString &mimeType) const\n{\n    QString id = Manager2::instance()->definitionIdByMimeType(mimeType);\n    QSharedPointer<HighlightDefinitionMetaData> data = Manager2::instance()->definitionMetaData(id);\n    if (data) {\n        return data->patterns();\n    }\n    return QStringList();\n}\n\nTextEditor::SyntaxHighlighter *KateHighlighter::create(QTextDocument *doc, const QString &mimeType)\n{\n    Highlighter *h = new Highlighter(doc);\n    //reset(h);\n    QString id = Manager2::instance()->definitionIdByMimeType(mimeType);\n    QSharedPointer<HighlightDefinition> def = Manager2::instance()->definition(id);\n    if (def) {\n        SyntaxComment comment;\n        comment.singleLineComment = def->singleLineComment();\n        comment.multiLineCommentStart = def->multiLineCommentStart();\n        comment.multiLineCommentEnd = def->multiLineCommentEnd();\n        comment.isCommentAfterWhiteSpaces = def->isCommentAfterWhiteSpaces();\n        if (comment.isCommentAfterWhiteSpaces) {\n            comment.isCommentAfterWhiteSpacesAddSpace = true;\n        }\n        h->setupComment(comment);\n        h->setDefaultContext(def->initialContext());\n    }\n    return h;\n}\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/katehighlighter.h",
    "content": "#ifndef KATEHIGHLIGHTER_H\n#define KATEHIGHLIGHTER_H\n\n#include \"texteditor_global.h\"\n\n#include <QObject>\n#include <QTextDocument>\n#include <QSharedPointer>\n#include <QFileInfo>\n#include \"syntaxhighlighter.h\"\n#include \"colorscheme.h\"\n\nclass ColorStyleScheme;\nclass TEXTEDITOR_EXPORT KateHighlighter : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit KateHighlighter(QObject *parent = 0);\npublic:\n    void loadPath(const QString &definitionsPaths);\n    QStringList mimeTypes() const;\n    QStringList mimeTypePatterns(const QString &mimeType) const;\n    QString mimeTypeName(const QString &mimeType) const;\n    TextEditor::SyntaxHighlighter *create(QTextDocument *doc, const QString &mimeType);\n    QTextCharFormat toTextCharFormat(const QString &name);\n};\n\n#endif // KATEHIGHLIGHTER_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/qtc_texteditor.pri",
    "content": "LIBS *= -l$$qtLibraryName(qtctexteditor)\n\n\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/qtc_texteditor.pro",
    "content": "TARGET = qtctexteditor\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude(../../liteideutils.pri)\ninclude(../../utils/colorstyle/colorstyle.pri)\n\nDEFINES += TEXTEDITOR_LIBRARY\nINCLUDEPATH += .\n\nHEADERS += \\\n    texteditor_global.h \\\n    tabsettings.h \\\n    syntaxhighlighter.h \\\n    itexteditor.h \\\n    basetextdocumentlayout.h \\\n    generichighlighter/specificrules.h \\\n    generichighlighter/rule.h \\\n    generichighlighter/reuse.h \\\n    generichighlighter/progressdata.h \\\n    generichighlighter/keywordlist.h \\\n    generichighlighter/itemdata.h \\\n    generichighlighter/includerulesinstruction.h \\\n    generichighlighter/highlighterexception.h \\\n    generichighlighter/highlighter.h \\\n    generichighlighter/highlightdefinitionmetadata.h \\\n    generichighlighter/highlightdefinitionhandler.h \\\n    generichighlighter/highlightdefinition.h \\\n    generichighlighter/dynamicrule.h \\\n    generichighlighter/context.h \\\n    katehighlighter.h \\\n    generichighlighter/manager2.h \\\n    colorscheme.h \\\n    autocompleter.h \\\n    basetextblockselection.h\n\nSOURCES += \\\n    tabsettings.cpp \\\n    syntaxhighlighter.cpp \\\n    itexteditor.cpp \\\n    basetextdocumentlayout.cpp \\\n    generichighlighter/specificrules.cpp \\\n    generichighlighter/rule.cpp \\\n    generichighlighter/progressdata.cpp \\\n    generichighlighter/keywordlist.cpp \\\n    generichighlighter/itemdata.cpp \\\n    generichighlighter/includerulesinstruction.cpp \\\n    generichighlighter/highlighter.cpp \\\n    generichighlighter/highlightdefinitionmetadata.cpp \\\n    generichighlighter/highlightdefinitionhandler.cpp \\\n    generichighlighter/highlightdefinition.cpp \\\n    generichighlighter/dynamicrule.cpp \\\n    generichighlighter/context.cpp \\\n    katehighlighter.cpp \\\n    generichighlighter/manager2.cpp \\\n    colorscheme.cpp \\\n    autocompleter.cpp \\\n    basetextblockselection.cpp\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/syntaxhighlighter.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).\n** All rights reserved.\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** This file is part of the QtGui module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL$\n** No Commercial Usage\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**\n**\n**\n**\n**\n**\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#include \"syntaxhighlighter.h\"\n#include \"basetextdocumentlayout.h\"\n#include <qtextdocument.h>\n#include <qtextlayout.h>\n#include <qpointer.h>\n#include <qtextobject.h>\n#include <qtextcursor.h>\n#include <qdebug.h>\n#include <qtextedit.h>\n#include <qtimer.h>\n\nusing namespace TextEditor;\n\nclass TextEditor::SyntaxHighlighterPrivate\n{\n    SyntaxHighlighter *q_ptr;\n    Q_DECLARE_PUBLIC(SyntaxHighlighter)\npublic:\n    inline SyntaxHighlighterPrivate()\n        : q_ptr(0), rehighlightPending(false), inReformatBlocks(false)\n    {}\n\n    QPointer<QTextDocument> doc;\n\n    void _q_reformatBlocks(int from, int charsRemoved, int charsAdded);\n    void reformatBlocks(int from, int charsRemoved, int charsAdded);\n    void reformatBlock(const QTextBlock &block, int from, int charsRemoved, int charsAdded);\n\n    inline void rehighlight(QTextCursor &cursor, QTextCursor::MoveOperation operation) {\n        inReformatBlocks = true;\n        cursor.beginEditBlock();\n        int from = cursor.position();\n        cursor.movePosition(operation);\n        reformatBlocks(from, 0, cursor.position() - from);\n        cursor.endEditBlock();\n        inReformatBlocks = false;\n    }\n\n    inline void _q_delayedRehighlight() {\n        if (!rehighlightPending)\n            return;\n        rehighlightPending = false;\n        q_func()->rehighlight();\n    }\n\n    void applyFormatChanges(int from, int charsRemoved, int charsAdded);\n    QVector<QTextCharFormat> formatChanges;\n    QTextBlock currentBlock;\n    QList<SyntaxToken> tokens;\n    SyntaxComment comment;\n    bool rehighlightPending;\n    bool inReformatBlocks;\n};\n\nstatic bool adjustRange(QTextLayout::FormatRange &range, int from, int charsRemoved, int charsAdded) {\n\n    if (range.start >= from) {\n        range.start += charsAdded - charsRemoved;\n        return true;\n    } else if (range.start + range.length > from) {\n        range.length += charsAdded - charsRemoved;\n        return true;\n    }\n    return false;\n}\n\nvoid SyntaxHighlighterPrivate::applyFormatChanges(int from, int charsRemoved, int charsAdded)\n{\n    bool formatsChanged = false;\n\n    QTextLayout *layout = currentBlock.layout();\n\n    QList<QTextLayout::FormatRange> ranges = layout->additionalFormats();\n\n    bool doAdjustRange = currentBlock.contains(from);\n\n    QList<QTextLayout::FormatRange> old_ranges;\n\n    if (!ranges.isEmpty()) {\n        QList<QTextLayout::FormatRange>::Iterator it = ranges.begin();\n        while (it != ranges.end()) {\n            if (it->format.property(QTextFormat::UserProperty).toBool()) {\n                if (doAdjustRange)\n                    formatsChanged = adjustRange(*it, from - currentBlock.position(), charsRemoved, charsAdded)\n                            || formatsChanged;\n                ++it;\n            } else {\n                old_ranges.append(*it);\n                it = ranges.erase(it);\n            }\n        }\n    }\n\n    QTextCharFormat emptyFormat;\n\n    QTextLayout::FormatRange r;\n    r.start = -1;\n\n    QList<QTextLayout::FormatRange> new_ranges;\n    int i = 0;\n    while (i < formatChanges.count()) {\n\n        while (i < formatChanges.count() && formatChanges.at(i) == emptyFormat)\n            ++i;\n\n        if (i >= formatChanges.count())\n            break;\n\n        r.start = i;\n        r.format = formatChanges.at(i);\n\n        while (i < formatChanges.count() && formatChanges.at(i) == r.format)\n            ++i;\n\n        if (i >= formatChanges.count())\n            break;\n\n        r.length = i - r.start;\n\n        new_ranges << r;\n        r.start = -1;\n    }\n\n    if (r.start != -1) {\n        r.length = formatChanges.count() - r.start;\n\n        new_ranges << r;\n    }\n\n    formatsChanged = formatsChanged || (new_ranges.size() != old_ranges.size());\n\n    for (int i = 0; !formatsChanged && i < new_ranges.size(); ++i) {\n        const QTextLayout::FormatRange &o = old_ranges.at(i);\n        const QTextLayout::FormatRange &n = new_ranges.at(i);\n        formatsChanged = (o.start != n.start || o.length != n.length || o.format != n.format);\n    }\n\n    if (formatsChanged) {\n        ranges.append(new_ranges);\n        layout->setAdditionalFormats(ranges);\n        doc->markContentsDirty(currentBlock.position(), currentBlock.length());\n    }\n}\n\nvoid SyntaxHighlighterPrivate::_q_reformatBlocks(int from, int charsRemoved, int charsAdded)\n{\n    if (!inReformatBlocks)\n        reformatBlocks(from, charsRemoved, charsAdded);\n}\n\nvoid SyntaxHighlighterPrivate::reformatBlocks(int from, int charsRemoved, int charsAdded)\n{\n    rehighlightPending = false;\n\n    QTextBlock block = doc->findBlock(from);\n    if (!block.isValid())\n        return;\n\n    int endPosition;\n    QTextBlock lastBlock = doc->findBlock(from + charsAdded + (charsRemoved > 0 ? 1 : 0));\n    if (lastBlock.isValid())\n        endPosition = lastBlock.position() + lastBlock.length();\n    else\n        endPosition =  doc->lastBlock().position() + doc->lastBlock().length(); //doc->docHandle()->length();\n\n    bool forceHighlightOfNextBlock = false;\n\n    while (block.isValid() && (block.position() < endPosition || forceHighlightOfNextBlock)) {\n        const int stateBeforeHighlight = block.userState();\n\n        reformatBlock(block, from, charsRemoved, charsAdded);\n\n        forceHighlightOfNextBlock = (block.userState() != stateBeforeHighlight);\n\n        block = block.next();\n    }\n\n    formatChanges.clear();\n}\n\nvoid SyntaxHighlighterPrivate::reformatBlock(const QTextBlock &block, int from, int charsRemoved, int charsAdded)\n{\n    Q_Q(SyntaxHighlighter);\n\n    Q_ASSERT_X(!currentBlock.isValid(), \"SyntaxHighlighter::reformatBlock()\", \"reFormatBlock() called recursively\");\n\n    currentBlock = block;\n    tokens.clear();\n    formatChanges.fill(QTextCharFormat(), block.length() - 1);\n    q->highlightBlock(block.text());\n\n    BaseTextDocumentLayout::userData(block)->setTokens(tokens);\n    BaseTextDocumentLayout::setLexerState(block,q->currentBlockState());\n\n    applyFormatChanges(from, charsRemoved, charsAdded);\n\n    currentBlock = QTextBlock();\n}\n\nconst SyntaxHighlighter::KateFormatMap SyntaxHighlighter::m_kateFormats;\n\nSyntaxHighlighter::KateFormatMap::KateFormatMap()\n{\n    m_ids.insert(QLatin1String(\"dsNormal\"), SyntaxHighlighter::Normal);\n    m_ids.insert(QLatin1String(\"dsKeyword\"), SyntaxHighlighter::Keyword);\n    m_ids.insert(QLatin1String(\"dsDataType\"), SyntaxHighlighter::DataType);\n    m_ids.insert(QLatin1String(\"dsDecVal\"), SyntaxHighlighter::Decimal);\n    m_ids.insert(QLatin1String(\"dsBaseN\"), SyntaxHighlighter::BaseN);\n    m_ids.insert(QLatin1String(\"dsFloat\"), SyntaxHighlighter::Float);\n    m_ids.insert(QLatin1String(\"dsChar\"), SyntaxHighlighter::Char);\n    m_ids.insert(QLatin1String(\"dsString\"), SyntaxHighlighter::String);\n    m_ids.insert(QLatin1String(\"dsComment\"), SyntaxHighlighter::Comment);\n    m_ids.insert(QLatin1String(\"dsOthers\"), SyntaxHighlighter::Others);\n    m_ids.insert(QLatin1String(\"dsAlert\"), SyntaxHighlighter::Alert);\n    m_ids.insert(QLatin1String(\"dsFunction\"), SyntaxHighlighter::Function);\n    m_ids.insert(QLatin1String(\"dsRegionMarker\"), SyntaxHighlighter::RegionMarker);\n    m_ids.insert(QLatin1String(\"dsError\"), SyntaxHighlighter::Error);\n    m_ids.insert(QLatin1String(\"dsSymbol\"),SyntaxHighlighter::Symbol);\n    m_ids.insert(QLatin1String(\"dsBuiltinFunc\"), SyntaxHighlighter::BuiltinFunc);\n    m_ids.insert(QLatin1String(\"dsPredeclared\"), SyntaxHighlighter::Predeclared);\n    m_ids.insert(QLatin1String(\"dsFuncDecl\"), SyntaxHighlighter::FuncDecl);\n    m_ids.insert(QLatin1String(\"dsPlaceholder\"), SyntaxHighlighter::Placeholder);\n    m_ids.insert(QLatin1String(\"dsToDo\"), SyntaxHighlighter::ToDo);\n    m_ids.insert(QLatin1String(\"dsPreprocessorFormat\"),SyntaxHighlighter::PreprocessorFormat);\n}\n\nvoid SyntaxHighlighter::configureFormat(TextFormatId id, const QTextCharFormat &format)\n{\n    m_creatorFormats[id] = format;\n}\n\nvoid SyntaxHighlighter::setTabSize(int /*tabSize*/)\n{\n}\n\nSyntaxComment SyntaxHighlighter::comment() const\n{\n    Q_D(const SyntaxHighlighter);\n    return d->comment;\n}\n\nvoid SyntaxHighlighter::setupComment(const SyntaxComment &comment)\n{\n    Q_D(SyntaxHighlighter);\n    d->comment = comment;\n}\n\n/*!\n    \\class SyntaxHighlighter\n    \\reentrant\n\n    \\brief The SyntaxHighlighter class allows you to define syntax\n    highlighting rules, and in addition you can use the class to query\n    a document's current formatting or user data.\n\n    \\since 4.1\n\n    \\ingroup richtext-processing\n\n    The SyntaxHighlighter class is a base class for implementing\n    QTextEdit syntax highlighters.  A syntax highligher automatically\n    highlights parts of the text in a QTextEdit, or more generally in\n    a QTextDocument. Syntax highlighters are often used when the user\n    is entering text in a specific format (for example source code)\n    and help the user to read the text and identify syntax errors.\n\n    To provide your own syntax highlighting, you must subclass\n    SyntaxHighlighter and reimplement highlightBlock().\n\n    When you create an instance of your SyntaxHighlighter subclass,\n    pass it the QTextEdit or QTextDocument that you want the syntax\n    highlighting to be applied to. For example:\n\n    \\snippet doc/src/snippets/code/src_gui_text_SyntaxHighlighter.cpp 0\n\n    After this your highlightBlock() function will be called\n    automatically whenever necessary. Use your highlightBlock()\n    function to apply formatting (e.g. setting the font and color) to\n    the text that is passed to it. SyntaxHighlighter provides the\n    setFormat() function which applies a given QTextCharFormat on\n    the current text block. For example:\n\n    \\snippet doc/src/snippets/code/src_gui_text_SyntaxHighlighter.cpp 1\n\n    Some syntaxes can have constructs that span several text\n    blocks. For example, a C++ syntax highlighter should be able to\n    cope with \\c{/}\\c{*...*}\\c{/} multiline comments. To deal with\n    these cases it is necessary to know the end state of the previous\n    text block (e.g. \"in comment\").\n\n    Inside your highlightBlock() implementation you can query the end\n    state of the previous text block using the previousBlockState()\n    function. After parsing the block you can save the last state\n    using setCurrentBlockState().\n\n    The currentBlockState() and previousBlockState() functions return\n    an int value. If no state is set, the returned value is -1. You\n    can designate any other value to identify any given state using\n    the setCurrentBlockState() function. Once the state is set the\n    QTextBlock keeps that value until it is set set again or until the\n    corresponding paragraph of text is deleted.\n\n    For example, if you're writing a simple C++ syntax highlighter,\n    you might designate 1 to signify \"in comment\":\n\n    \\snippet doc/src/snippets/code/src_gui_text_SyntaxHighlighter.cpp 2\n\n    In the example above, we first set the current block state to\n    0. Then, if the previous block ended within a comment, we higlight\n    from the beginning of the current block (\\c {startIndex =\n    0}). Otherwise, we search for the given start expression. If the\n    specified end expression cannot be found in the text block, we\n    change the current block state by calling setCurrentBlockState(),\n    and make sure that the rest of the block is higlighted.\n\n    In addition you can query the current formatting and user data\n    using the format() and currentBlockUserData() functions\n    respectively. You can also attach user data to the current text\n    block using the setCurrentBlockUserData() function.\n    QTextBlockUserData can be used to store custom settings. In the\n    case of syntax highlighting, it is in particular interesting as\n    cache storage for information that you may figure out while\n    parsing the paragraph's text. For an example, see the\n    setCurrentBlockUserData() documentation.\n\n    \\sa QTextEdit, {Syntax Highlighter Example}\n*/\n\n/*!\n    Constructs a SyntaxHighlighter with the given \\a parent.\n*/\nSyntaxHighlighter::SyntaxHighlighter(QObject *parent)\n    : QObject(parent), d_ptr(new SyntaxHighlighterPrivate)\n{\n    d_ptr->q_ptr = this;\n}\n\n/*!\n    Constructs a SyntaxHighlighter and installs it on \\a parent.\n    The specified QTextDocument also becomes the owner of the\n    SyntaxHighlighter.\n*/\nSyntaxHighlighter::SyntaxHighlighter(QTextDocument *parent)\n    : QObject(parent), d_ptr(new SyntaxHighlighterPrivate)\n{\n    d_ptr->q_ptr = this;\n    setDocument(parent);\n}\n\n/*!\n    Constructs a SyntaxHighlighter and installs it on \\a parent 's\n    QTextDocument. The specified QTextEdit also becomes the owner of\n    the SyntaxHighlighter.\n*/\nSyntaxHighlighter::SyntaxHighlighter(QTextEdit *parent)\n    : QObject(parent), d_ptr(new SyntaxHighlighterPrivate)\n{\n    d_ptr->q_ptr = this;\n    setDocument(parent->document());\n}\n\n/*!\n    Destructor. Uninstalls this syntax highlighter from the text document.\n*/\nSyntaxHighlighter::~SyntaxHighlighter()\n{\n    setDocument(0);\n}\n\n/*!\n    Installs the syntax highlighter on the given QTextDocument \\a doc.\n    A SyntaxHighlighter can only be used with one document at a time.\n*/\nvoid SyntaxHighlighter::setDocument(QTextDocument *doc)\n{\n    Q_D(SyntaxHighlighter);\n    if (d->doc) {\n        disconnect(d->doc, SIGNAL(contentsChange(int,int,int)),\n                   this, SLOT(_q_reformatBlocks(int,int,int)));\n\n        QTextCursor cursor(d->doc);\n        cursor.beginEditBlock();\n        for (QTextBlock blk = d->doc->begin(); blk.isValid(); blk = blk.next())\n            blk.layout()->clearAdditionalFormats();\n        cursor.endEditBlock();\n    }\n    d->doc = doc;\n    if (d->doc) {\n        connect(d->doc, SIGNAL(contentsChange(int,int,int)),\n                this, SLOT(_q_reformatBlocks(int,int,int)));\n        d->rehighlightPending = true;\n        QTimer::singleShot(0, this, SLOT(_q_delayedRehighlight()));\n    }\n}\n\n/*!\n    Returns the QTextDocument on which this syntax highlighter is\n    installed.\n*/\nQTextDocument *SyntaxHighlighter::document() const\n{\n    Q_D(const SyntaxHighlighter);\n    return d->doc;\n}\n\n/*!\n    \\since 4.2\n\n    Reapplies the highlighting to the whole document.\n\n    \\sa rehighlightBlock()\n*/\nvoid SyntaxHighlighter::rehighlight()\n{\n    Q_D(SyntaxHighlighter);\n    if (!d->doc)\n        return;\n\n    QTextCursor cursor(d->doc);\n    d->rehighlight(cursor, QTextCursor::End);\n}\n\n/*!\n    \\since 4.6\n\n    Reapplies the highlighting to the given QTextBlock \\a block.\n\n    \\sa rehighlight()\n*/\nvoid SyntaxHighlighter::rehighlightBlock(const QTextBlock &block)\n{\n    Q_D(SyntaxHighlighter);\n    if (!d->doc || !block.isValid() || block.document() != d->doc)\n        return;\n\n    const bool rehighlightPending = d->rehighlightPending;\n\n    QTextCursor cursor(block);\n    d->rehighlight(cursor, QTextCursor::EndOfBlock);\n\n    if (rehighlightPending)\n        d->rehighlightPending = rehighlightPending;\n}\n\n/*!\n    \\fn void SyntaxHighlighter::highlightBlock(const QString &text)\n\n    Highlights the given text block. This function is called when\n    necessary by the rich text engine, i.e. on text blocks which have\n    changed.\n\n    To provide your own syntax highlighting, you must subclass\n    SyntaxHighlighter and reimplement highlightBlock(). In your\n    reimplementation you should parse the block's \\a text and call\n    setFormat() as often as necessary to apply any font and color\n    changes that you require. For example:\n\n    \\snippet doc/src/snippets/code/src_gui_text_SyntaxHighlighter.cpp 3\n\n    Some syntaxes can have constructs that span several text\n    blocks. For example, a C++ syntax highlighter should be able to\n    cope with \\c{/}\\c{*...*}\\c{/} multiline comments. To deal with\n    these cases it is necessary to know the end state of the previous\n    text block (e.g. \"in comment\").\n\n    Inside your highlightBlock() implementation you can query the end\n    state of the previous text block using the previousBlockState()\n    function. After parsing the block you can save the last state\n    using setCurrentBlockState().\n\n    The currentBlockState() and previousBlockState() functions return\n    an int value. If no state is set, the returned value is -1. You\n    can designate any other value to identify any given state using\n    the setCurrentBlockState() function. Once the state is set the\n    QTextBlock keeps that value until it is set set again or until the\n    corresponding paragraph of text gets deleted.\n\n    For example, if you're writing a simple C++ syntax highlighter,\n    you might designate 1 to signify \"in comment\". For a text block\n    that ended in the middle of a comment you'd set 1 using\n    setCurrentBlockState, and for other paragraphs you'd set 0.\n    In your parsing code if the return value of previousBlockState()\n    is 1, you would highlight the text as a C++ comment until you\n    reached the closing \\c{*}\\c{/}.\n\n    \\sa previousBlockState(), setFormat(), setCurrentBlockState()\n*/\n\n/*!\n    This function is applied to the syntax highlighter's current text\n    block (i.e. the text that is passed to the highlightBlock()\n    function).\n\n    The specified \\a format is applied to the text from the \\a start\n    position for a length of \\a count characters (if \\a count is 0,\n    nothing is done). The formatting properties set in \\a format are\n    merged at display time with the formatting information stored\n    directly in the document, for example as previously set with\n    QTextCursor's functions. Note that the document itself remains\n    unmodified by the format set through this function.\n\n    \\sa format(), highlightBlock()\n*/\nvoid SyntaxHighlighter::setFormat(int start, int count, const QTextCharFormat &format, int id)\n{\n    Q_D(SyntaxHighlighter);\n    if (start < 0 || start >= d->formatChanges.count())\n        return;\n\n    const int end = qMin(start + count, d->formatChanges.count());\n    for (int i = start; i < end; ++i)\n        d->formatChanges[i] = format;\n\n    if (id >= Normal) {\n        int offset = start;\n        int count = end-start;\n        if (!d->tokens.empty()) {\n            SyntaxToken &last = d->tokens.last();\n            if ((last.id == id) && (last.offset+last.count == offset)) {\n                last.count += count;\n                return;\n            }\n        }\n        SyntaxToken token;\n        token.offset = offset;\n        token.count = count;\n        token.id = id;\n        d->tokens.append(token);\n    }\n}\n\n/*!\n    \\overload\n\n    The specified \\a color is applied to the current text block from\n    the \\a start position for a length of \\a count characters.\n\n    The other attributes of the current text block, e.g. the font and\n    background color, are reset to default values.\n\n    \\sa format(), highlightBlock()\n*/\n//void SyntaxHighlighter::setFormat(int start, int count, const QColor &color)\n//{\n//    QTextCharFormat format;\n//    format.setForeground(color);\n//    setFormat(start, count, format);\n//}\n\n/*!\n    \\overload\n\n    The specified \\a font is applied to the current text block from\n    the \\a start position for a length of \\a count characters.\n\n    The other attributes of the current text block, e.g. the font and\n    background color, are reset to default values.\n\n    \\sa format(), highlightBlock()\n*/\n//void SyntaxHighlighter::setFormat(int start, int count, const QFont &font)\n//{\n//    QTextCharFormat format;\n//    format.setFont(font);\n//    setFormat(start, count, format);\n//}\n\nvoid SyntaxHighlighter::applyFormatToSpaces(const QString &text, const QTextCharFormat &format)\n{\n    int offset = 0;\n    const int length = text.length();\n    while (offset < length) {\n        if (text.at(offset).isSpace()) {\n            int start = offset++;\n            while (offset < length && text.at(offset).isSpace())\n                ++offset;\n            setFormat(start, offset - start, format);\n        } else {\n            ++offset;\n        }\n    }\n}\n\n/*!\n    \\fn QTextCharFormat SyntaxHighlighter::format(int position) const\n\n    Returns the format at \\a position inside the syntax highlighter's\n    current text block.\n*/\nQTextCharFormat SyntaxHighlighter::format(int pos) const\n{\n    Q_D(const SyntaxHighlighter);\n    if (pos < 0 || pos >= d->formatChanges.count())\n        return QTextCharFormat();\n    return d->formatChanges.at(pos);\n}\n\n/*!\n    Returns the end state of the text block previous to the\n    syntax highlighter's current block. If no value was\n    previously set, the returned value is -1.\n\n    \\sa highlightBlock(), setCurrentBlockState()\n*/\nint SyntaxHighlighter::previousBlockState() const\n{\n    Q_D(const SyntaxHighlighter);\n    if (!d->currentBlock.isValid())\n        return -1;\n\n    const QTextBlock previous = d->currentBlock.previous();\n    if (!previous.isValid())\n        return -1;\n\n    return previous.userState();\n}\n\n/*!\n    Returns the state of the current text block. If no value is set,\n    the returned value is -1.\n*/\nint SyntaxHighlighter::currentBlockState() const\n{\n    Q_D(const SyntaxHighlighter);\n    if (!d->currentBlock.isValid())\n        return -1;\n\n    return d->currentBlock.userState();\n}\n\n/*!\n    Sets the state of the current text block to \\a newState.\n\n    \\sa highlightBlock()\n*/\nvoid SyntaxHighlighter::setCurrentBlockState(int newState)\n{\n    Q_D(SyntaxHighlighter);\n    if (!d->currentBlock.isValid())\n        return;\n\n    d->currentBlock.setUserState(newState);\n}\n\n/*!\n    Attaches the given \\a data to the current text block.  The\n    ownership is passed to the underlying text document, i.e. the\n    provided QTextBlockUserData object will be deleted if the\n    corresponding text block gets deleted.\n\n    QTextBlockUserData can be used to store custom settings. In the\n    case of syntax highlighting, it is in particular interesting as\n    cache storage for information that you may figure out while\n    parsing the paragraph's text.\n\n    For example while parsing the text, you can keep track of\n    parenthesis characters that you encounter ('{[(' and the like),\n    and store their relative position and the actual QChar in a simple\n    class derived from QTextBlockUserData:\n\n    \\snippet doc/src/snippets/code/src_gui_text_SyntaxHighlighter.cpp 4\n\n    During cursor navigation in the associated editor, you can ask the\n    current QTextBlock (retrieved using the QTextCursor::block()\n    function) if it has a user data object set and cast it to your \\c\n    BlockData object. Then you can check if the current cursor\n    position matches with a previously recorded parenthesis position,\n    and, depending on the type of parenthesis (opening or closing),\n    find the next opening or closing parenthesis on the same level.\n\n    In this way you can do a visual parenthesis matching and highlight\n    from the current cursor position to the matching parenthesis. That\n    makes it easier to spot a missing parenthesis in your code and to\n    find where a corresponding opening/closing parenthesis is when\n    editing parenthesis intensive code.\n\n    \\sa QTextBlock::setUserData()\n*/\nvoid SyntaxHighlighter::setCurrentBlockUserData(QTextBlockUserData *data)\n{\n    Q_D(SyntaxHighlighter);\n    if (!d->currentBlock.isValid())\n        return;\n\n    d->currentBlock.setUserData(data);\n}\n\n/*!\n    Returns the QTextBlockUserData object previously attached to the\n    current text block.\n\n    \\sa QTextBlock::userData(), setCurrentBlockUserData()\n*/\nQTextBlockUserData *SyntaxHighlighter::currentBlockUserData() const\n{\n    Q_D(const SyntaxHighlighter);\n    if (!d->currentBlock.isValid())\n        return 0;\n\n    return d->currentBlock.userData();\n}\n\n/*!\n    \\since 4.4\n\n    Returns the current text block.\n*/\nQTextBlock SyntaxHighlighter::currentBlock() const\n{\n    Q_D(const SyntaxHighlighter);\n    return d->currentBlock;\n}\n\nstatic bool byStartOfRange(const QTextLayout::FormatRange &range, const QTextLayout::FormatRange &other)\n{\n    return range.start < other.start;\n}\n\nvoid SyntaxHighlighter::setExtraAdditionalFormats(const QTextBlock& block,\n                                                  const QList<QTextLayout::FormatRange> &fmts)\n{\n\n//    qDebug() << \"setAdditionalFormats() on block\" << block.blockNumber();\n//    for (int i = 0; i < overrides.count(); ++i)\n//        qDebug() << \"   from \" << overrides.at(i).start << \"length\"\n//                 << overrides.at(i).length\n//                 << \"color:\" << overrides.at(i).format.foreground().color();\n    Q_D(SyntaxHighlighter);\n\n    if (block.layout() == 0)\n        return;\n\n    QList<QTextLayout::FormatRange> formats;\n    formats.reserve(fmts.size());\n    foreach (QTextLayout::FormatRange r, fmts) {\n        r.format.setProperty(QTextFormat::UserProperty, true);\n        formats.append(r);\n    }\n    qSort(formats.begin(), formats.end(), byStartOfRange);\n\n    QList<QTextLayout::FormatRange> previousSemanticFormats;\n    QList<QTextLayout::FormatRange> formatsToApply;\n\n    const QList<QTextLayout::FormatRange> all = block.layout()->additionalFormats();\n    foreach (const QTextLayout::FormatRange &r, all) {\n        if (r.format.hasProperty(QTextFormat::UserProperty))\n            previousSemanticFormats.append(r);\n        else\n            formatsToApply.append(r);\n    }\n\n    if (formats.size() == previousSemanticFormats.size()) {\n        qSort(previousSemanticFormats.begin(), previousSemanticFormats.end(), byStartOfRange);\n\n        int index = 0;\n        for (; index != formats.size(); ++index) {\n            const QTextLayout::FormatRange &range = formats.at(index);\n            const QTextLayout::FormatRange &previousRange = previousSemanticFormats.at(index);\n\n            if (range.start != previousRange.start ||\n                    range.length != previousRange.length ||\n                    range.format != previousRange.format)\n                break;\n        }\n\n        if (index == formats.size())\n            return;\n    }\n\n    formatsToApply += formats;\n\n    bool wasInReformatBlocks = d->inReformatBlocks;\n    d->inReformatBlocks = true;\n    block.layout()->setAdditionalFormats(formatsToApply);\n    document()->markContentsDirty(block.position(), block.length()-1);\n    d->inReformatBlocks = wasInReformatBlocks;\n}\n\n#include \"moc_syntaxhighlighter.cpp\"\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/syntaxhighlighter.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).\n** All rights reserved.\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** This file is part of the QtGui module of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:LGPL$\n** No Commercial Usage\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**\n**\n**\n**\n**\n**\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#ifndef TEXTEDITOR_SYNTAXHIGHLIGHTER_H\n#define TEXTEDITOR_SYNTAXHIGHLIGHTER_H\n\n#include \"texteditor_global.h\"\n\n#include <QtCore/QObject>\n#include <QtGui/QTextLayout>\n\nQT_BEGIN_NAMESPACE\nclass QTextDocument;\nclass QSyntaxHighlighterPrivate;\nclass QTextCharFormat;\nclass QFont;\nclass QColor;\nclass QTextBlockUserData;\nclass QTextEdit;\nQT_END_NAMESPACE\n\nnamespace TextEditor {\n\nclass SyntaxHighlighterPrivate;\n\nstruct SyntaxComment {\n    SyntaxComment() : isCommentAfterWhiteSpaces(true), isCommentAfterWhiteSpacesAddSpace (true)\n    {}\n    bool isEmpty() const {\n        return singleLineComment.isEmpty() &&\n                multiLineCommentStart.isEmpty() &&\n                multiLineCommentEnd.isEmpty();\n    }\n    QString singleLineComment;\n    QString multiLineCommentStart;\n    QString multiLineCommentEnd;\n    bool isCommentAfterWhiteSpaces;\n    bool isCommentAfterWhiteSpacesAddSpace;\n};\n\nclass TEXTEDITOR_EXPORT SyntaxHighlighter : public QObject\n{\n    Q_OBJECT\n    Q_DECLARE_PRIVATE(SyntaxHighlighter)\npublic:\n    enum TextFormatId {\n        Normal = 1,\n        VisualWhitespace,\n        Keyword,\n        DataType,\n        Decimal,\n        BaseN,\n        Float,\n        Char,\n        String,\n        Comment,\n        Alert,\n        Error,\n        Function,\n        RegionMarker,\n        Others,\n        Symbol,\n        BuiltinFunc,\n        Predeclared,\n        FuncDecl,\n        Placeholder,\n        ToDo,\n        PreprocessorFormat,\n        TextFormatId_MAX\n    };\npublic:\n    SyntaxHighlighter(QObject *parent);\n    SyntaxHighlighter(QTextDocument *parent);\n    SyntaxHighlighter(QTextEdit *parent);\n    virtual ~SyntaxHighlighter();\n\n    void setDocument(QTextDocument *doc);\n    QTextDocument *document() const;\n\n    void setContextData(const QString &id, const QString &value) {\n        m_contextMap[id] = value;\n    }\n    QString contextData(const QString &id) {\n        return m_contextMap[id];\n    }\n\n    void setExtraAdditionalFormats(const QTextBlock& block, const QList<QTextLayout::FormatRange> &formats);\n    void configureFormat(TextFormatId id, const QTextCharFormat &format);\n    virtual void setTabSize(int tabSize);\npublic:\n    SyntaxComment comment() const;\n    void setupComment(const SyntaxComment &comment);\nsignals:\n    void foldIndentChanged(QTextBlock block);\npublic Q_SLOTS:\n    void rehighlight();\n    void rehighlightBlock(const QTextBlock &block);\n\nprotected:\n    virtual void highlightBlock(const QString &text) = 0;\n\n    void setFormat(int start, int count, const QTextCharFormat &format, int id = 0);\n    //void setFormat(int start, int count, const QColor &color);\n    //void setFormat(int start, int count, const QFont &font);\n    QTextCharFormat format(int pos) const;\n\n    void applyFormatToSpaces(const QString &text, const QTextCharFormat &format);\n\n    int previousBlockState() const;\n    int currentBlockState() const;\n    void setCurrentBlockState(int newState);\n\n    void setCurrentBlockUserData(QTextBlockUserData *data);\n    QTextBlockUserData *currentBlockUserData() const;\n\n    QTextBlock currentBlock() const;\n    QMap<QString,QString> m_contextMap;\nprotected:\n    struct KateFormatMap\n    {\n        KateFormatMap();\n        QHash<QString, TextFormatId> m_ids;\n    };\n    static const KateFormatMap m_kateFormats;\n    QTextCharFormat m_creatorFormats[TextFormatId_MAX];\nprivate:\n    Q_DISABLE_COPY(SyntaxHighlighter)\n    Q_PRIVATE_SLOT(d_ptr, void _q_reformatBlocks(int from, int charsRemoved, int charsAdded))\n    Q_PRIVATE_SLOT(d_ptr, void _q_delayedRehighlight())\n\n    QScopedPointer<SyntaxHighlighterPrivate> d_ptr;\n};\n\n} // namespace TextEditor\n\n#endif // TEXTEDITOR_SYNTAXHIGHLIGHTER_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/tabsettings.cpp",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#include \"tabsettings.h\"\n\n#include <utils/settingsutils.h>\n\n#include <QtCore/QDebug>\n#include <QtCore/QSettings>\n#include <QtCore/QString>\n#include <QtGui/QTextCursor>\n#include <QtGui/QTextDocument>\n\nstatic const char *spacesForTabsKey = \"SpacesForTabs\";\nstatic const char *autoSpacesForTabsKey = \"AutoSpacesForTabs\";\nstatic const char *smartBackspaceKey = \"SmartBackspace\";\nstatic const char *autoIndentKey = \"AutoIndent\";\nstatic const char *tabSizeKey = \"TabSize\";\nstatic const char *indentSizeKey = \"IndentSize\";\nstatic const char *indentBracesKey = \"IndentBraces\";\nstatic const char *doubleIndentBlocksKey = \"DoubleIndentBlocks\";\nstatic const char *tabKeyBehaviorKey = \"TabKeyBehavior\";\nstatic const char *groupPostfix = \"TabSettings\";\nstatic const char *paddingModeKey = \"PaddingMode\";\n\nnamespace TextEditor {\n\nTabSettings::TabSettings() :\n    m_spacesForTabs(true),\n    m_autoSpacesForTabs(false),\n    m_autoIndent(true),\n    m_smartBackspace(false),\n    m_tabSize(4),\n    m_indentSize(4),\n    m_indentBraces(false),\n    m_doubleIndentBlocks(false),\n    m_tabKeyBehavior(TabNeverIndents),\n    m_continuationAlignBehavior(ContinuationAlignWithSpaces)\n{\n}\n\nvoid TabSettings::toSettings(const QString &category, QSettings *s) const\n{\n    Utils::toSettings(QLatin1String(groupPostfix), category, s, this);\n}\n\nvoid TabSettings::fromSettings(const QString &category, const QSettings *s)\n{\n    *this = TabSettings(); // Assign defaults\n    Utils::fromSettings(QLatin1String(groupPostfix), category, s, this);\n}\n\nvoid TabSettings::toMap(const QString &prefix, QVariantMap *map) const\n{\n    map->insert(prefix + QLatin1String(spacesForTabsKey), m_spacesForTabs);\n    map->insert(prefix + QLatin1String(autoSpacesForTabsKey), m_autoSpacesForTabs);\n    map->insert(prefix + QLatin1String(autoIndentKey), m_autoIndent);\n    map->insert(prefix + QLatin1String(smartBackspaceKey), m_smartBackspace);\n    map->insert(prefix + QLatin1String(tabSizeKey), m_tabSize);\n    map->insert(prefix + QLatin1String(indentSizeKey), m_indentSize);\n    map->insert(prefix + QLatin1String(indentBracesKey), m_indentBraces);\n    map->insert(prefix + QLatin1String(doubleIndentBlocksKey), m_doubleIndentBlocks);\n    map->insert(prefix + QLatin1String(tabKeyBehaviorKey), m_tabKeyBehavior);\n    map->insert(prefix + QLatin1String(paddingModeKey), m_continuationAlignBehavior);\n}\n\nvoid TabSettings::fromMap(const QString &prefix, const QVariantMap &map)\n{\n    m_spacesForTabs =\n        map.value(prefix + QLatin1String(spacesForTabsKey), m_spacesForTabs).toBool();\n    m_autoSpacesForTabs =\n        map.value(prefix + QLatin1String(autoSpacesForTabsKey), m_autoSpacesForTabs).toBool();\n    m_autoIndent = map.value(prefix + QLatin1String(autoIndentKey), m_autoIndent).toBool();\n    m_smartBackspace =\n            map.value(prefix + QLatin1String(smartBackspaceKey), m_smartBackspace).toBool();\n    m_tabSize = map.value(prefix + QLatin1String(tabSizeKey), m_tabSize).toInt();\n    m_indentSize = map.value(prefix + QLatin1String(indentSizeKey), m_indentSize).toInt();\n    m_indentBraces = map.value(prefix + QLatin1String(indentBracesKey), m_indentBraces).toBool();\n    m_doubleIndentBlocks =\n        map.value(prefix + QLatin1String(doubleIndentBlocksKey), m_doubleIndentBlocks).toBool();\n    m_tabKeyBehavior = (TabKeyBehavior)\n        map.value(prefix + QLatin1String(tabKeyBehaviorKey), m_tabKeyBehavior).toInt();\n    m_continuationAlignBehavior = (ContinuationAlignBehavior)\n        map.value(prefix + QLatin1String(paddingModeKey), m_continuationAlignBehavior).toInt();\n}\n\nbool TabSettings::cursorIsAtBeginningOfLine(const QTextCursor &cursor) const\n{\n    QString text = cursor.block().text();\n    int fns = firstNonSpace(text);\n    return (cursor.position() - cursor.block().position() <= fns);\n}\n\nint TabSettings::lineIndentPosition(const QString &text) const\n{\n    int i = 0;\n    while (i < text.size()) {\n        if (!text.at(i).isSpace())\n            break;\n        ++i;\n    }\n    int column = columnAt(text, i);\n    return i - (column % m_indentSize);\n}\n\nint TabSettings::firstNonSpace(const QString &text) const\n{\n    int i = 0;\n    while (i < text.size()) {\n        if (!text.at(i).isSpace())\n            return i;\n        ++i;\n    }\n    return i;\n}\n\nQString TabSettings::indentationString(const QString &text) const\n{\n    return text.left(firstNonSpace(text));\n}\n\n\nint TabSettings::indentationColumn(const QString &text) const\n{\n    return columnAt(text, firstNonSpace(text));\n}\n\nint TabSettings::maximumPadding(const QString &text) const\n{\n    int fns = firstNonSpace(text);\n    int i = fns;\n    while (i > 0) {\n        if (text.at(i-1) != QLatin1Char(' '))\n            break;\n        --i;\n    }\n    return fns - i;\n}\n\n\nint TabSettings::trailingWhitespaces(const QString &text) const\n{\n    int i = 0;\n    while (i < text.size()) {\n        if (!text.at(text.size()-1-i).isSpace())\n            return i;\n        ++i;\n    }\n    return i;\n}\n\nbool TabSettings::isIndentationClean(const QTextBlock &block) const\n{\n    int i = 0;\n    int spaceCount = 0;\n    QString text = block.text();\n    bool spacesForTabs = guessSpacesForTabs(block);\n    while (i < text.size()) {\n        QChar c = text.at(i);\n        if (!c.isSpace())\n            return true;\n\n        if (c == QLatin1Char(' ')) {\n            ++spaceCount;\n            if (!spacesForTabs && spaceCount == m_tabSize)\n                return false;\n        } else if (c == QLatin1Char('\\t')) {\n            if (spacesForTabs || spaceCount != m_indentSize)\n                return false;\n            spaceCount = 0;\n        }\n        ++i;\n    }\n    return true;\n}\n\nbool TabSettings::tabShouldIndent(const QTextDocument *document, QTextCursor cursor, int *suggestedPosition) const\n{\n    if (m_tabKeyBehavior == TabNeverIndents)\n        return false;\n    QTextCursor tc = cursor;\n    if (suggestedPosition)\n        *suggestedPosition = tc.position(); // At least suggest original position\n    tc.movePosition(QTextCursor::StartOfLine);\n    if (tc.atBlockEnd()) // cursor was on a blank line\n        return true;\n    if (document->characterAt(tc.position()).isSpace()) {\n        tc.movePosition(QTextCursor::WordRight);\n        if (tc.positionInBlock() >= cursor.positionInBlock()) {\n            if (suggestedPosition)\n                *suggestedPosition = tc.position(); // Suggest position after whitespace\n            if (m_tabKeyBehavior == TabLeadingWhitespaceIndents)\n                return true;\n        }\n    }\n    return (m_tabKeyBehavior == TabAlwaysIndents);\n}\n\nint TabSettings::columnAt(const QString &text, int position) const\n{\n    int column = 0;\n    for (int i = 0; i < position; ++i) {\n        if (text.at(i) == QLatin1Char('\\t'))\n            column = column - (column % m_tabSize) + m_tabSize;\n        else\n            ++column;\n    }\n    return column;\n}\n\nint TabSettings::positionAtColumn(const QString &text, int column, int *offset) const\n{\n    int col = 0;\n    int i = 0;\n    while (i < text.size() && col < column) {\n        if (text.at(i) == QLatin1Char('\\t'))\n            col = col - (col % m_tabSize) + m_tabSize;\n        else\n            ++col;\n        ++i;\n    }\n    if (offset)\n        *offset = column - col;\n    return i;\n}\n\nint TabSettings::spacesLeftFromPosition(const QString &text, int position) const\n{\n    int i = position;\n    while (i > 0) {\n        if (!text.at(i-1).isSpace())\n            break;\n        --i;\n    }\n    return position - i;\n}\n\nint TabSettings::indentedColumn(int column, bool doIndent) const\n{\n    int aligned = (column / m_indentSize) * m_indentSize;\n    if (doIndent)\n        return aligned + m_indentSize;\n    if (aligned < column)\n        return aligned;\n    return qMax(0, aligned - m_indentSize);\n}\n\nbool TabSettings::guessSpacesForTabs(const QTextBlock &_block) const\n{\n    if (m_spacesForTabs && m_autoSpacesForTabs && _block.isValid()) {\n        const QTextDocument *doc = _block.document();\n        QVector<QTextBlock> currentBlocks(2, _block); // [0] looks back; [1] looks forward\n        int maxLookAround = 100;\n        while (maxLookAround-- > 0) {\n            if (currentBlocks.at(0).isValid())\n                currentBlocks[0] = currentBlocks.at(0).previous();\n            if (currentBlocks.at(1).isValid())\n                currentBlocks[1] = currentBlocks.at(1).next();\n            bool done = true;\n            foreach (const QTextBlock &block, currentBlocks) {\n                if (block.isValid())\n                    done = false;\n                if (!block.isValid() || block.length() == 0)\n                    continue;\n                const QChar firstChar = doc->characterAt(block.position());\n                if (firstChar == QLatin1Char(' ')) {\n                    return true;\n                } else if (firstChar == QLatin1Char('\\t')) {\n                    return false;\n                }\n            }\n            if (done)\n                break;\n        }\n    }\n    return m_spacesForTabs;\n}\n\nQString TabSettings::indentationString(int startColumn, int targetColumn, const QTextBlock &block) const\n{\n    targetColumn = qMax(startColumn, targetColumn);\n    if (guessSpacesForTabs(block))\n        return QString(targetColumn - startColumn, QLatin1Char(' '));\n\n    QString s;\n    int alignedStart = startColumn - (startColumn % m_tabSize) + m_tabSize;\n    if (alignedStart > startColumn && alignedStart <= targetColumn) {\n        s += QLatin1Char('\\t');\n        startColumn = alignedStart;\n    }\n    if (int columns = targetColumn - startColumn) {\n        int tabs = columns / m_tabSize;\n        s += QString(tabs, QLatin1Char('\\t'));\n        s += QString(columns - tabs * m_tabSize, QLatin1Char(' '));\n    }\n    return s;\n}\n\nvoid TabSettings::indentLine(QTextBlock block, int newIndent, int padding) const\n{\n    const QString text = block.text();\n    const int oldBlockLength = text.size();\n\n    if (m_continuationAlignBehavior == NoContinuationAlign) {\n        newIndent -= padding;\n        padding = 0;\n    } else if (m_continuationAlignBehavior == ContinuationAlignWithIndent) {\n        padding = 0;\n    }\n\n    // Quickly check whether indenting is required.\n    if (indentationColumn(text) == newIndent)\n        return;\n\n    QString indentString;\n\n    if (!m_spacesForTabs) {\n        // user likes tabs for spaces and uses tabs for indentation, preserve padding\n        indentString = indentationString(0, newIndent - padding, block);\n        indentString += QString(padding, QLatin1Char(' '));\n    } else {\n        indentString = indentationString(0, newIndent, block);\n    }\n\n    if (oldBlockLength == indentString.length() && text == indentString)\n        return;\n\n    QTextCursor cursor(block);\n    cursor.beginEditBlock();\n    cursor.movePosition(QTextCursor::StartOfBlock);\n    cursor.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, firstNonSpace(text));\n    cursor.removeSelectedText();\n    cursor.insertText(indentString);\n    cursor.endEditBlock();\n}\n\nvoid TabSettings::reindentLine(QTextBlock block, int delta) const\n{\n    const QString text = block.text();\n    const int oldBlockLength = text.size();\n\n    int oldIndent = indentationColumn(text);\n    int newIndent = qMax(oldIndent + delta, 0);\n\n    if (oldIndent == newIndent)\n        return;\n\n    QString indentString;\n    if (!m_spacesForTabs && m_tabSize == m_indentSize) {\n        // user likes tabs for spaces and uses tabs for indentation, preserve padding\n        int padding = qMin(maximumPadding(text), newIndent);\n        indentString = indentationString(0, newIndent - padding, block);\n        indentString += QString(padding, QLatin1Char(' '));\n    } else {\n        indentString = indentationString(0, newIndent, block);\n    }\n\n    if (oldBlockLength == indentString.length() && text == indentString)\n        return;\n\n    QTextCursor cursor(block);\n    cursor.beginEditBlock();\n    cursor.movePosition(QTextCursor::StartOfBlock);\n    cursor.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, firstNonSpace(text));\n    cursor.removeSelectedText();\n    cursor.insertText(indentString);\n    cursor.endEditBlock();\n}\n\nbool TabSettings::equals(const TabSettings &ts) const\n{\n    return m_spacesForTabs == ts.m_spacesForTabs\n        && m_autoSpacesForTabs == ts.m_autoSpacesForTabs\n        && m_autoIndent == ts.m_autoIndent\n        && m_smartBackspace == ts.m_smartBackspace\n        && m_tabSize == ts.m_tabSize\n        && m_indentSize == ts.m_indentSize\n        && m_indentBraces == ts.m_indentBraces\n\t&& m_doubleIndentBlocks == ts.m_doubleIndentBlocks\n        && m_tabKeyBehavior == ts.m_tabKeyBehavior\n        && m_continuationAlignBehavior == ts.m_continuationAlignBehavior;\n}\n\n} // namespace TextEditor\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/tabsettings.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef TABSETTINGS_H\n#define TABSETTINGS_H\n\n#include \"texteditor_global.h\"\n\n#include <QtCore/QVariant>\n#include <QtGui/QTextBlock>\n\nQT_BEGIN_NAMESPACE\nclass QSettings;\nQT_END_NAMESPACE\n\nnamespace TextEditor {\n\n// Tab settings: Data type the GeneralSettingsPage acts on\n// with some convenience functions for formatting.\nclass TEXTEDITOR_EXPORT TabSettings\n{\npublic:\n    // This enum must match the indexes of tabKeyBehavior widget\n    enum TabKeyBehavior {\n        TabNeverIndents = 0,\n        TabAlwaysIndents = 1,\n        TabLeadingWhitespaceIndents = 2\n    };\n\n    // This enum must match the indexes of continuationAlignBehavior widget\n    enum ContinuationAlignBehavior {\n        NoContinuationAlign = 0,\n        ContinuationAlignWithSpaces = 1,\n        ContinuationAlignWithIndent = 2\n    };\n\n    TabSettings();\n\n    void toSettings(const QString &category, QSettings *s) const;\n    void fromSettings(const QString &category, const QSettings *s);\n\n    void toMap(const QString &prefix, QVariantMap *map) const;\n    void fromMap(const QString &prefix, const QVariantMap &map);\n\n    int lineIndentPosition(const QString &text) const;\n    int firstNonSpace(const QString &text) const;\n    inline bool onlySpace(const QString &text) const { return firstNonSpace(text) == text.length(); }\n    int columnAt(const QString &text, int position) const;\n    int positionAtColumn(const QString &text, int column, int *offset = 0) const;\n    int spacesLeftFromPosition(const QString &text, int position) const;\n    int indentedColumn(int column, bool doIndent = true) const;\n    QString indentationString(int startColumn, int targetColumn, const QTextBlock &currentBlock = QTextBlock()) const;\n    QString indentationString(const QString &text) const;\n    int indentationColumn(const QString &text) const;\n    int maximumPadding(const QString &text) const;\n\n    bool cursorIsAtBeginningOfLine(const QTextCursor &cursor) const;\n\n    void indentLine(QTextBlock block, int newIndent, int padding = 0) const;\n    void reindentLine(QTextBlock block, int delta) const;\n\n    int trailingWhitespaces(const QString &text) const;\n    bool isIndentationClean(const QTextBlock &block) const;\n    bool tabShouldIndent(const QTextDocument *document, QTextCursor cursor, int *suggestedPosition = 0) const;\n    bool guessSpacesForTabs(const QTextBlock &block) const;\n\n    bool m_spacesForTabs;\n    bool m_autoSpacesForTabs;\n    bool m_autoIndent;\n    bool m_smartBackspace;\n    int m_tabSize;\n    int m_indentSize;\n    bool m_indentBraces;\n    bool m_doubleIndentBlocks;\n    TabKeyBehavior m_tabKeyBehavior;\n    ContinuationAlignBehavior m_continuationAlignBehavior;\n\n    bool equals(const TabSettings &ts) const;\n};\n\ninline bool operator==(const TabSettings &t1, const TabSettings &t2) { return t1.equals(t2); }\ninline bool operator!=(const TabSettings &t1, const TabSettings &t2) { return !t1.equals(t2); }\n\n} // namespace TextEditor\n\n#endif // TABSETTINGS_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/texteditor_global.h",
    "content": "#ifndef TEXTEDITOR_GLOBAL_H\n#define TEXTEDITOR_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#define TEXTEDITOR_EXPORT\n/*\n#if defined(TEXTEDITOR_LIBRARY)\n#  define TEXTEDITOR_EXPORT Q_DECL_EXPORT\n#else\n#  define TEXTEDITOR_EXPORT Q_DECL_IMPORT\n#endif\n*/\n#endif // TEXTEDITOR_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/texteditorconstants.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef TEXTEDITORCONSTANTS_H\n#define TEXTEDITORCONSTANTS_H\n\n#include <QtCore/QtGlobal>\n\nnamespace TextEditor {\nnamespace Constants {\n\nconst char * const C_TEXTEDITOR          = \"Text Editor\";\nconst char * const COMPLETE_THIS         = \"TextEditor.CompleteThis\";\nconst char * const QUICKFIX_THIS         = \"TextEditor.QuickFix\";\nconst char * const VISUALIZE_WHITESPACE  = \"TextEditor.VisualizeWhitespace\";\nconst char * const CLEAN_WHITESPACE      = \"TextEditor.CleanWhitespace\";\nconst char * const TEXT_WRAPPING         = \"TextEditor.TextWrapping\";\nconst char * const UN_COMMENT_SELECTION  = \"TextEditor.UnCommentSelection\";\nconst char * const REFORMAT              = \"TextEditor.Reformat\";\nconst char * const FOLD              = \"TextEditor.Fold\";\nconst char * const UNFOLD                = \"TextEditor.Unfold\";\nconst char * const UNFOLD_ALL       = \"TextEditor.UnFoldAll\";\nconst char * const AUTO_INDENT_SELECTION = \"TextEditor.AutoIndentSelection\";\nconst char * const INCREASE_FONT_SIZE    = \"TextEditor.IncreaseFontSize\";\nconst char * const DECREASE_FONT_SIZE    = \"TextEditor.DecreaseFontSize\";\nconst char * const RESET_FONT_SIZE    = \"TextEditor.ResetFontSize\";\nconst char * const GOTO_BLOCK_START      = \"TextEditor.GotoBlockStart\";\nconst char * const GOTO_BLOCK_START_WITH_SELECTION = \"TextEditor.GotoBlockStartWithSelection\";\nconst char * const GOTO_BLOCK_END        = \"TextEditor.GotoBlockEnd\";\nconst char * const GOTO_BLOCK_END_WITH_SELECTION = \"TextEditor.GotoBlockEndWithSelection\";\nconst char * const SELECT_BLOCK_UP       = \"TextEditor.SelectBlockUp\";\nconst char * const SELECT_BLOCK_DOWN     = \"TextEditor.SelectBlockDown\";\nconst char * const MOVE_LINE_UP          = \"TextEditor.MoveLineUp\";\nconst char * const MOVE_LINE_DOWN        = \"TextEditor.MoveLineDown\";\nconst char * const COPY_LINE_UP          = \"TextEditor.CopyLineUp\";\nconst char * const COPY_LINE_DOWN        = \"TextEditor.CopyLineDown\";\nconst char * const JOIN_LINES            = \"TextEditor.JoinLines\";\nconst char * const INSERT_LINE_ABOVE     = \"TextEditor.InsertLineAboveCurrentLine\";\nconst char * const INSERT_LINE_BELOW     = \"TextEditor.InsertLineBelowCurrentLine\";\nconst char * const UPPERCASE_SELECTION   = \"TextEditor.UppercaseSelection\";\nconst char * const LOWERCASE_SELECTION   = \"TextEditor.LowercaseSelection\";\nconst char * const CUT_LINE              = \"TextEditor.CutLine\";\nconst char * const COPY_LINE             = \"TextEditor.CopyLine\";\nconst char * const DELETE_LINE           = \"TextEditor.DeleteLine\";\nconst char * const DELETE_WORD           = \"TextEditor.DeleteWord\";\nconst char * const SELECT_ENCODING       = \"TextEditor.SelectEncoding\";\nconst char * const REWRAP_PARAGRAPH       =  \"TextEditor.RewrapParagraph\";\nconst char * const GOTO_OPENING_PARENTHESIS = \"TextEditor.GotoOpeningParenthesis\";\nconst char * const GOTO_CLOSING_PARENTHESIS = \"TextEditor.GotoClosingParenthesis\";\nconst char * const GOTO_LINE_START = \"TextEditor.GotoLineStart\";\nconst char * const GOTO_LINE_END = \"TextEditor.GotoLineEnd\";\nconst char * const GOTO_NEXT_LINE = \"TextEditor.GotoNextLine\";\nconst char * const GOTO_PREVIOUS_LINE = \"TextEditor.GotoPreviousLine\";\nconst char * const GOTO_PREVIOUS_CHARACTER = \"TextEditor.GotoPreviousCharacter\";\nconst char * const GOTO_NEXT_CHARACTER = \"TextEditor.GotoNextCharacter\";\nconst char * const GOTO_PREVIOUS_WORD = \"TextEditor.GotoPreviousWord\";\nconst char * const GOTO_NEXT_WORD = \"TextEditor.GotoNextWord\";\nconst char * const GOTO_PREVIOUS_WORD_CAMEL_CASE = \"TextEditor.GotoPreviousWordCamelCase\";\nconst char * const GOTO_NEXT_WORD_CAMEL_CASE = \"TextEditor.GotoNextWordCamelCase\";\nconst char * const GOTO_LINE_START_WITH_SELECTION = \"TextEditor.GotoLineStartWithSelection\";\nconst char * const GOTO_LINE_END_WITH_SELECTION = \"TextEditor.GotoLineEndWithSelection\";\nconst char * const GOTO_NEXT_LINE_WITH_SELECTION = \"TextEditor.GotoNextLineWithSelection\";\nconst char * const GOTO_PREVIOUS_LINE_WITH_SELECTION = \"TextEditor.GotoPreviousLineWithSelection\";\nconst char * const GOTO_PREVIOUS_CHARACTER_WITH_SELECTION = \"TextEditor.GotoPreviousCharacterWithSelection\";\nconst char * const GOTO_NEXT_CHARACTER_WITH_SELECTION = \"TextEditor.GotoNextCharacterWithSelection\";\nconst char * const GOTO_PREVIOUS_WORD_WITH_SELECTION = \"TextEditor.GotoPreviousWordWithSelection\";\nconst char * const GOTO_NEXT_WORD_WITH_SELECTION = \"TextEditor.GotoNextWordWithSelection\";\nconst char * const GOTO_PREVIOUS_WORD_CAMEL_CASE_WITH_SELECTION = \"TextEditor.GotoPreviousWordCamelCaseWithSelection\";\nconst char * const GOTO_NEXT_WORD_CAMEL_CASE_WITH_SELECTION = \"TextEditor.GotoNextWordCamelCaseWithSelection\";\nconst char * const C_TEXTEDITOR_MIMETYPE_TEXT = \"text/plain\";\nconst char * const INFO_SYNTAX_DEFINITION = \"TextEditor.InfoSyntaxDefinition\";\nconst char * const TASK_DOWNLOAD_DEFINITIONS = \"TextEditor.Task.Download\";\nconst char * const TASK_REGISTER_DEFINITIONS = \"TextEditor.Task.Register\";\nconst char * const TASK_OPEN_FILE = \"TextEditor.Task.OpenFile\";\n\n// Text color and style categories\nconst char * const C_TEXT                = \"Text\";\n\nconst char * const C_LINK                = \"Link\";\nconst char * const C_SELECTION           = \"Selection\";\nconst char * const C_LINE_NUMBER         = \"LineNumber\";\nconst char * const C_SEARCH_RESULT       = \"SearchResult\";\nconst char * const C_SEARCH_SCOPE        = \"SearchScope\";\nconst char * const C_PARENTHESES         = \"Parentheses\";\nconst char * const C_CURRENT_LINE        = \"CurrentLine\";\nconst char * const C_CURRENT_LINE_NUMBER = \"CurrentLineNumber\";\nconst char * const C_OCCURRENCES         = \"Occurrences\";\nconst char * const C_OCCURRENCES_UNUSED  = \"Occurrences.Unused\";\nconst char * const C_OCCURRENCES_RENAME  = \"Occurrences.Rename\";\n\nconst char * const C_NUMBER              = \"Number\";\nconst char * const C_STRING              = \"String\";\nconst char * const C_TYPE                = \"Type\";\nconst char * const C_LOCAL               = \"Local\";\nconst char * const C_FIELD               = \"Field\";\nconst char * const C_STATIC              = \"Static\";\nconst char * const C_VIRTUAL_METHOD      = \"VirtualMethod\";\nconst char * const C_KEYWORD             = \"Keyword\";\nconst char * const C_OPERATOR            = \"Operator\";\nconst char * const C_PREPROCESSOR        = \"Preprocessor\";\nconst char * const C_LABEL               = \"Label\";\nconst char * const C_COMMENT             = \"Comment\";\nconst char * const C_DOXYGEN_COMMENT     = \"Doxygen.Comment\";\nconst char * const C_DOXYGEN_TAG         = \"Doxygen.Tag\";\nconst char * const C_VISUAL_WHITESPACE   = \"VisualWhitespace\";\n\nconst char * const C_DISABLED_CODE       = \"DisabledCode\";\n\nconst char * const C_ADDED_LINE          = \"AddedLine\";\nconst char * const C_REMOVED_LINE        = \"RemovedLine\";\nconst char * const C_DIFF_FILE           = \"DiffFile\";\nconst char * const C_DIFF_LOCATION       = \"DiffLocation\";\n\nconst char * const TEXT_EDITOR_SETTINGS_CATEGORY = \"C.TextEditor\";\nconst char * const TEXT_EDITOR_SETTINGS_CATEGORY_ICON = \":/core/images/category_texteditor.png\";\nconst char * const TEXT_EDITOR_SETTINGS_TR_CATEGORY = QT_TRANSLATE_NOOP(\"TextEditor\", \"Text Editor\");\nconst char * const TEXT_EDITOR_FONT_SETTINGS = \"A.FontSettings\";\nconst char * const TEXT_EDITOR_BEHAVIOR_SETTINGS = \"B.BehaviourSettings\";\nconst char * const TEXT_EDITOR_DISPLAY_SETTINGS = \"D.DisplaySettings\";\nconst char * const TEXT_EDITOR_HIGHLIGHTER_SETTINGS = \"E.HighlighterSettings\";\nconst char * const TEXT_EDITOR_SNIPPETS_SETTINGS = \"F.SnippetsSettings\";\n\nconst char * const SNIPPET_EDITOR_ID     = \"TextEditor.SnippetEditor\";\nconst char * const TEXT_SNIPPET_GROUP_ID = \"Text\";\n\n} // namespace Constants\n} // namespace TextEditor\n\n#endif // TEXTEDITORCONSTANTS_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/qtc_texteditor/utils/settingsutils.h",
    "content": "/**************************************************************************\n**\n** This file is part of Qt Creator\n**\n** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).\n**\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** No Commercial Usage\n**\n** This file contains pre-release code and may not be distributed.\n** You may use this file in accordance with the terms and conditions\n** contained in the Technology Preview License Agreement accompanying\n** this package.\n**\n** GNU Lesser General Public License Usage\n**\n** Alternatively, this file may be used under the terms of the GNU Lesser\n** General Public License version 2.1 as published by the Free Software\n** Foundation and appearing in the file LICENSE.LGPL included in the\n** packaging of this file.  Please review the following information to\n** ensure the GNU Lesser General Public License version 2.1 requirements\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n**\n** In addition, as a special exception, Nokia gives you certain additional\n** rights.  These rights are described in the Nokia Qt LGPL Exception\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n**\n** If you have questions regarding the use of this file, please contact\n** Nokia at qt-info@nokia.com.\n**\n**************************************************************************/\n\n#ifndef SETTINGSUTILS_H\n#define SETTINGSUTILS_H\n\n#include <QtCore/QSettings>\n#include <QtCore/QString>\n#include <QtCore/QStringList>\n#include <QtCore/QVariant>\n\nnamespace Utils {\n\ntemplate <class SettingsClassT>\nvoid fromSettings(const QString &postFix,\n                  const QString &category,\n                  const QSettings *s,\n                  SettingsClassT *obj)\n{\n    QVariantMap map;\n    const QStringList &keys = s->allKeys();\n    foreach (const QString &key, keys)\n        map.insert(key, s->value(key));\n\n    QString group = postFix;\n    if (!category.isEmpty())\n        group.insert(0, category);\n    group += QLatin1Char('/');\n    obj->fromMap(group, map);\n}\n\ntemplate <class SettingsClassT>\nvoid toSettings(const QString &postFix,\n                const QString &category,\n                QSettings *s,\n                const SettingsClassT *obj)\n{\n    QString group = postFix;\n    if (!category.isEmpty())\n        group.insert(0, category);\n    group += QLatin1Char('/');\n\n    QVariantMap map;\n    obj->toMap(group, &map);\n    QVariantMap::const_iterator it = map.constBegin();\n    for (; it != map.constEnd(); ++it)\n        s->setValue(it.key(), it.value());\n}\n\n} // Utils\n\n#endif // SETTINGSUTILS_H\n"
  },
  {
    "path": "liteidex/src/3rdparty/treemodelcompleter/treemodelcompleter.cpp",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).\n** All rights reserved.\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** This file is part of the examples of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:BSD$\n** You may use this file under the terms of the BSD license as follows:\n**\n** \"Redistribution and use in source and binary forms, with or without\n** modification, are permitted provided that the following conditions are\n** met:\n**   * Redistributions of source code must retain the above copyright\n**     notice, this list of conditions and the following disclaimer.\n**   * Redistributions in binary form must reproduce the above copyright\n**     notice, this list of conditions and the following disclaimer in\n**     the documentation and/or other materials provided with the\n**     distribution.\n**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor\n**     the names of its contributors may be used to endorse or promote\n**     products derived from this software without specific prior written\n**     permission.\n**\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#include \"treemodelcompleter.h\"\n#include <QStringList>\n#include <QDebug>\n\n//! [0]\nTreeModelCompleter::TreeModelCompleter(QObject *parent)\n    : QCompleter(parent)\n{\n}\n//! [0]\n\n//! [1]\nTreeModelCompleter::TreeModelCompleter(QAbstractItemModel *model, QObject *parent)\n    : QCompleter(model, parent)\n{\n}\n//! [1]\n\nvoid TreeModelCompleter::setSeparator(const QString &separator)\n{\n    sep = separator;\n}\n\n//! [2]\nQString TreeModelCompleter::separator() const\n{\n    return sep;\n}\n//! [2]\n\n//! [3]\nQStringList TreeModelCompleter::splitPath(const QString &path) const\n{\n    if (sep.isNull()) {\n        return QCompleter::splitPath(path);\n    }\n    return path.split(sep);\n}\n//! [3]\n\n//! [4]\nQString TreeModelCompleter::pathFromIndex(const QModelIndex &index) const\n{\n    if (sep.isNull()) {\n        return QCompleter::pathFromIndex(index);\n    }\n\n    // navigate up and accumulate data\n    QStringList dataList;\n    for (QModelIndex i = index; i.isValid(); i = i.parent()) {\n        dataList.prepend(model()->data(i, completionRole()).toString());\n    }\n    return dataList.join(sep);\n}\n//! [4]\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/treemodelcompleter/treemodelcompleter.h",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).\n** All rights reserved.\n** Contact: Nokia Corporation (qt-info@nokia.com)\n**\n** This file is part of the examples of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:BSD$\n** You may use this file under the terms of the BSD license as follows:\n**\n** \"Redistribution and use in source and binary forms, with or without\n** modification, are permitted provided that the following conditions are\n** met:\n**   * Redistributions of source code must retain the above copyright\n**     notice, this list of conditions and the following disclaimer.\n**   * Redistributions in binary form must reproduce the above copyright\n**     notice, this list of conditions and the following disclaimer in\n**     the documentation and/or other materials provided with the\n**     distribution.\n**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor\n**     the names of its contributors may be used to endorse or promote\n**     products derived from this software without specific prior written\n**     permission.\n**\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n#ifndef TREEMODELCOMPLETER_H\n#define TREEMODELCOMPLETER_H\n\n#include <QCompleter>\n\n//! [0]\nclass TreeModelCompleter : public QCompleter\n{\n    Q_OBJECT\n    Q_PROPERTY(QString separator READ separator WRITE setSeparator)\n\npublic:\n    TreeModelCompleter(QObject *parent = 0);\n    TreeModelCompleter(QAbstractItemModel *model, QObject *parent = 0);\n\n    QString separator() const;\npublic slots:\n    void setSeparator(const QString &separator);\n\nprotected:\n    QStringList splitPath(const QString &path) const;\n    QString pathFromIndex(const QModelIndex &index) const;\n\nprivate:\n    QString sep;\n};\n//! [0]\n\n#endif // TREEMODELCOMPLETER_H\n\n"
  },
  {
    "path": "liteidex/src/3rdparty/treemodelcompleter/treemodelcompleter.pri",
    "content": "LIBS *= -l$$qtLibraryName(treemodelcompleter)\n"
  },
  {
    "path": "liteidex/src/3rdparty/treemodelcompleter/treemodelcompleter.pro",
    "content": "TARGET = treemodelcompleter\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude(../../liteideutils.pri)\n\nHEADERS += treemodelcompleter.h\n\nSOURCES += treemodelcompleter.cpp\n"
  },
  {
    "path": "liteidex/src/api/api.pro",
    "content": "# USE .subdir AND .depends !\n# OTHERWISE PLUGINS WILL BUILD IN WRONG ORDER (DIRECTORIES ARE COMPILED IN PARALLEL)\n\nTEMPLATE  = subdirs\nCONFIG   += ordered\n\nSUBDIRS = \\\n    liteapi \\\n    liteenvapi  \\\n    litefindapi \\\n    litebuildapi \\\n    liteeditorapi \\\n    litedebugapi \\\n    litettyapi \\\n    docbrowserapi \\\n    golangdocapi \\\n    golangastapi \\\n    quickopenapi \\\n    terminalapi\n"
  },
  {
    "path": "liteidex/src/api/docbrowserapi/docbrowserapi.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: docbrowserapi.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEDOCBROWSERAPI_H\n#define LITEDOCBROWSERAPI_H\n\n#include \"liteapi/liteapi.h\"\n#include \"liteapi/litehtml.h\"\n#include <QTextBrowser>\n#include <QComboBox>\n#include <QToolBar>\n\nnamespace LiteApi {\n\nclass IDocumentBrowser : public IBrowserEditor\n{\n    Q_OBJECT\npublic:\n    IDocumentBrowser(QObject *parent) : IBrowserEditor(parent) {}\n    virtual void setSearchPaths(const QStringList &paths) = 0;\n    virtual void setUrlHtml(const QUrl &url,const QString &html) = 0;\n    virtual void scrollToAnchor(const QString &text) = 0;\n    virtual QToolBar *toolBar() = 0;\n    virtual QComboBox *urlComboBox() = 0;\n    virtual IHtmlWidget *htmlWidget() = 0;\nsignals:\n    void linkHovered(const QUrl &url);\n    void requestUrl(const QUrl &url);\n    void forwardAvailable(bool available);\n    void backwardAvailable(bool available);\n    void documentLoaded();\n    void anchorChanged(const QString &anchor);\npublic slots:\n    virtual void backward() = 0;\n    virtual void forward() = 0;\n};\n\n}\n\n#endif //LITEDOCBROWSERAPI_H\n\n"
  },
  {
    "path": "liteidex/src/api/docbrowserapi/docbrowserapi.pri",
    "content": "LIBS *= -l$$qtLibraryName(docbrowserapi)\nINCLUDEPATH *= $$PWD\n\n\n\n"
  },
  {
    "path": "liteidex/src/api/docbrowserapi/docbrowserapi.pro",
    "content": "TARGET = docbrowserapi\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude (../../liteideapi.pri)\ninclude (../liteapi/liteapi.pri)\n\nDEFINES += DOCBROWSERAPI_LIBRARY\n\nHEADERS += docbrowserapi.h\n"
  },
  {
    "path": "liteidex/src/api/golangastapi/golangastapi.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangastapi.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGASTAPI_H\n#define GOLANGASTAPI_H\n\n#include \"liteapi/liteapi.h\"\n#include <QProcessEnvironment>\n\nnamespace LiteApi {\n/*\nconst (\n        tag_package      = \"p\"\n        tag_type         = \"t\"\n        tag_struct       = \"s\"\n        tag_interface    = \"i\"\n        tag_value        = \"v\"\n        tag_const        = \"c\"\n        tag_func         = \"f\"\n        tag_value_folder = \"+v\"\n        tag_const_folder = \"+c\"\n        tag_func_folder  = \"+f\"\n        tag_type_method  = \"tm\"\n        tag_type_factor  = \"tf\"\n        tag_type_value   = \"tv\"\n        tag_todo         = \"b\"\n        tag_todo_folder  = \"+b\"\n)\n*/\n\nenum ASTTAG_ENUM {\n    TagNone = 0,\n    TagPackage,\n    TagImport,\n    TagImportFolder,\n    TagType,\n    TagStruct,\n    TagInterface,\n    TagValue,\n    TagConst,\n    TagFunc,\n    TagValueFolder,\n    TagConstFolder,\n    TagFuncFolder,\n    TagTypeMethod,\n    TagTypeFactor,\n    TagTypeValue,\n    TagTodo,\n    TagTodoFolder\n};\n\nclass IGolangAst : public QObject\n{\n    Q_OBJECT\npublic:\n    IGolangAst(QObject *parent = 0): QObject(parent) {}\n    virtual ~IGolangAst() {}\n    virtual QIcon iconFromTag(const QString &tag, bool pub) const = 0;\n    virtual QIcon iconFromTagEnum(LiteApi::ASTTAG_ENUM tag, bool pub) const = 0;\n};\n\n} //namespace LiteApi\n\n\n#endif //GOLANGASTAPI_H\n\n"
  },
  {
    "path": "liteidex/src/api/golangastapi/golangastapi.pri",
    "content": "LIBS *= -l$$qtLibraryName(golangastapi)\n\n\n\n"
  },
  {
    "path": "liteidex/src/api/golangastapi/golangastapi.pro",
    "content": "TARGET = golangastapi\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude (../../liteideapi.pri)\ninclude (../liteapi/liteapi.pri)\n\nHEADERS += golangastapi.h\n"
  },
  {
    "path": "liteidex/src/api/golangdocapi/golangdocapi.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangdocapi.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGDOCAPI_H\n#define GOLANGDOCAPI_H\n\n#include \"liteapi/liteapi.h\"\n\n/*\nopenUrl(const QUrl &url);\nurl scheme\nfile : open html or plain file\nlist : url path only [pkg|cmd]\nfind : find pkg name\npdoc : show pkg doc\n*/\n\nnamespace LiteApi {\n\nenum PkgApiEnum {\n    NullApi = 0,\n    PkgApi = 0x0001,\n    ConstApi = 0x0002,\n    VarApi = 0x0004,\n    StructApi = 0x0008,\n    InterfaceApi = 0x0010,\n    TypeApi = 0x0020,\n    FuncApi = 0x0040,\n    TypeMethodApi = 0x0080,\n    TypeVarApi = 0x0100,\n    AllTypeApi = StructApi | InterfaceApi | TypeApi,\n    AllGolangApi = PkgApi | ConstApi | VarApi | StructApi | InterfaceApi | TypeApi | FuncApi | TypeMethodApi | TypeVarApi\n};\n\nclass IGolangApi : public QObject\n{\n    Q_OBJECT\npublic:\n    IGolangApi(QObject *parent) : QObject(parent) {}\npublic:\n    virtual QStringList all(int flag = AllGolangApi) const = 0;\n    virtual PkgApiEnum findExp(const QString &tag, QString &exp) const = 0;\n    virtual QStringList findDocUrl(const QString &tag) const = 0;\n    virtual QString findDocInfo(const QString &tag) const = 0;\n};\n\nclass IGolangDoc : public IObject\n{\n    Q_OBJECT\npublic:\n    IGolangDoc(QObject *parent) : IObject(parent) {}\npublic slots:\n    virtual void openUrl(const QUrl &url, const QVariant &addin = QVariant()) = 0;\n    virtual void activeBrowser() = 0;\n};\n\ninline IGolangDoc *getGolangDoc(LiteApi::IApplication *app)\n{\n    return LiteApi::findExtensionObject<IGolangDoc*>(app,\"LiteApi.IGolangDoc\");\n}\n\n}\n\n#endif //GOLANGDOCAPI_H\n\n"
  },
  {
    "path": "liteidex/src/api/golangdocapi/golangdocapi.pri",
    "content": "LIBS *= -l$$qtLibraryName(golangdocapi)\n\n\n\n"
  },
  {
    "path": "liteidex/src/api/golangdocapi/golangdocapi.pro",
    "content": "TARGET = golangdocapi\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude (../../liteideapi.pri)\ninclude (../liteapi/liteapi.pri)\n\nDEFINES += DOCBROWSERAPI_LIBRARY\n\nHEADERS += golangdocapi.h\n"
  },
  {
    "path": "liteidex/src/api/liteapi/liteapi.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteapi.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEAPI_H\n#define LITEAPI_H\n\n#include \"liteqt.h\"\n#include \"liteobj.h\"\n#include \"litehtml.h\"\n\n#include <QWidget>\n#include <QMenu>\n#include <QToolBar>\n#include <QPlainTextEdit>\n#include <QSettings>\n#include <QMainWindow>\n#include <QDockWidget>\n#include <QFlags>\n#include <QUrl>\n#include <QDir>\n#include <QFileInfo>\n#include <QDesktopServices>\n#include <QTextCursor>\n#include <QAbstractItemModel>\n\nclass ColorStyle;\nclass ColorStyleScheme;\n\nnamespace LiteApi {\n\nclass IApplication;\nclass IManager;\nclass IFile;\nclass IProject;\nclass IEditor;\n/*\nvalueForKey\n\nEDITORPATH\nEDITORNAME\nEDITORDIR\n\nPROJECTPATH\nPROJECTNAME\nPROJECTDIR\n\nWORKDIR\n\nTARGETPATH\nTARGETNAME\nTARGETDIR\n*/\n\nstruct TargetInfo1\n{\n    QString workDir;\n    QString targetPath;\n    QString targetName;\n    QString targetDir;\n};\n\nstruct ProjectInfo\n{\n    QString projectPath;\n    QString projectName;\n    QString projectDir;\n};\n\nstruct EditorInfo\n{\n    QString editorPath;\n    QString editorName;\n    QString editorDir;\n};\n\nclass IManager : public QObject\n{\n    Q_OBJECT\npublic:\n    IManager(QObject *parent = 0) : QObject(parent) {}\n    virtual ~IManager() {}\n    virtual bool initWithApp(IApplication *app) {\n        m_liteApp = app;\n        return true;\n    }\n    virtual IApplication* application() {\n        return m_liteApp;\n    }\n\nprotected:\n    IApplication *m_liteApp;\n};\n\nclass IMimeType\n{\npublic:\n    virtual ~IMimeType() {}\n\n    virtual QString package() const = 0;\n    virtual QString type() const = 0;\n    virtual QString scheme() const = 0;\n    virtual QString comment() const = 0;\n    virtual QString codec() const = 0;\n    virtual bool tabToSpace() const = 0;\n    virtual int tabWidth() const = 0;\n    virtual QStringList globPatterns() const = 0;\n    virtual QStringList subClassesOf() const = 0;\n    virtual void merge(const IMimeType *mimeType) = 0;\n    virtual void setCustomPatterns(const QStringList &custom) = 0;\n    virtual QStringList customPatterns() const = 0;\n    virtual QStringList allPatterns() const = 0;\n};\n\nclass IMimeTypeManager : public IManager\n{\n    Q_OBJECT\npublic:\n    IMimeTypeManager(QObject *parent = 0) : IManager(parent) {}\n    virtual bool addMimeType(IMimeType *mimeType) = 0;\n    virtual void removeMimeType(IMimeType *mimeType) = 0;\n    virtual QList<IMimeType*> mimeTypeList() const= 0;\n    virtual IMimeType *findMimeType(const QString &type) const = 0;\n    virtual QString findPackageByMimeType(const QString &type) const = 0;\n    virtual QString findMimeTypeByFile(const QString &fileName) const = 0;\n    virtual QString findMimeTypeBySuffix(const QString &suffix) const = 0;\n    virtual QString findMimeTypeByScheme(const QString &scheme) const = 0;\n    virtual QStringList findAllFilesByMimeType(const QString &dir, const QString &type, int deep = 0) const = 0;\n};\n\ninline QString mimeHead(const QString &mimeType)\n{\n    int find = mimeType.indexOf('/');\n    if (find == -1) {\n        return mimeType;\n    }\n    return mimeType.left(find);\n}\n\ninline bool mimeIsText(const QString &mimeType)\n{\n    return mimeHead(mimeType) == \"text\";\n}\n\ninline bool mimeIsFolder(const QString &mimeType)\n{\n    return mimeHead(mimeType) == \"folder\";\n}\n\nclass IFile : public QObject\n{\n    Q_OBJECT\npublic:\n    IFile(QObject *parent = 0) : QObject(parent) {}\n    virtual ~IFile() { }\n    virtual bool loadText(const QString &filePath, const QString &mimeType, QString &outText) = 0;\n    virtual bool reloadText(QString &outText) = 0;\n    virtual bool saveText(const QString &filePath, const QString &text) = 0;\n    virtual bool isReadOnly() const = 0;\n    virtual bool isBinary() const = 0;\n    virtual QString filePath() const = 0;\n    virtual QString mimeType() const = 0;\n};\n\nclass IEditorFactory : public QObject\n{\n    Q_OBJECT\npublic:\n    IEditorFactory(QObject *parent = 0) : QObject(parent) {}\n    virtual QStringList mimeTypes() const = 0;\n    virtual IEditor *open(const QString &fileName, const QString &mimeType) = 0;\n    virtual IEditor *create(const QString &contents, const QString &mimeType) = 0;\n    virtual QString id() const = 0;\n    virtual QString displayName() const = 0;\n    virtual bool testMimeType(const QString &mimeType) = 0;\n};\n\nclass IProjectFactory : public QObject\n{\n    Q_OBJECT\npublic:\n    IProjectFactory(QObject *parent = 0) : QObject(parent) {}\n    virtual QStringList mimeTypes() const = 0;\n    virtual IProject *open(const QString &fileName, const QString &mimeType) = 0;\n    virtual bool findTargetInfo(const QString &fileName, const QString &mimetype, QMap<QString,QString>& targetInfo) const = 0;\n};\n\nenum FILESYSTEM_CONTEXT_FLAG {\n    FILESYSTEM_ROOT = 0,\n    FILESYSTEM_ROOTFOLDER,\n    FILESYSTEM_FOLDER,\n    FILESYSTEM_FILES\n};\n\nclass IRecent : public QObject\n{\n    Q_OBJECT\npublic:\n    IRecent(QObject *parent = 0) : QObject(parent) {}\n    virtual QString type() const = 0;\n    virtual QString displyType() const = 0;\n    virtual void addRecent(const QString &name, int maxRecent) = 0;\n    virtual void removeRecent(const QString &name) = 0;\n    virtual QStringList recentNameList() = 0;\n    virtual void clearRecentNameList() = 0;\n    virtual void openRecent(const QString &name) = 0;\n};\n\nclass ISettingRecent : public IRecent\n{\n    Q_OBJECT\npublic:\n    ISettingRecent(QSettings *setting, QObject *parent) : IRecent(parent), m_settings(setting)\n    {\n    }\n\n    virtual void addRecent(const QString &name, int maxRecent)\n    {\n        QString key = recentKey();\n        QStringList files = m_settings->value(key).toStringList();\n        files.removeAll(name);\n        files.prepend(name);\n        while (files.size() > maxRecent) {\n            files.removeLast();\n        }\n        m_settings->setValue(key, files);\n    }\n\n    virtual void removeRecent(const QString &name)\n    {\n        QString key = recentKey();\n        QStringList values = m_settings->value(key).toStringList();\n        values.removeAll(name);\n        m_settings->setValue(key, values);\n    }\n\n    virtual QStringList recentNameList()\n    {\n        QString key = recentKey();\n        return m_settings->value(key).toStringList();\n    }\n\n    virtual void clearRecentNameList()\n    {\n        QString key = recentKey();\n        m_settings->remove(key);\n    }\nprotected:\n    virtual QString recentKey() const\n    {\n        return QString(\"Recent1/%1\").arg(type());\n    }\nprotected:\n    QSettings   *m_settings;\n};\n\nclass IRecentManager : public IManager\n{\n    Q_OBJECT\npublic:\n    IRecentManager(QObject *parent = 0) : IManager(parent) {}\n\n    virtual void registerRecent(IRecent *recent) = 0;\n    virtual QList<IRecent*> recentList() const = 0;\n    virtual IRecent *findRecent(const QString &type) const = 0;\n    virtual QStringList recentTypeList() const = 0;\n\n    virtual void addRecent(const QString &name, const QString &type) = 0;\n    virtual void removeRecent(const QString &name, const QString &type) = 0;\n    virtual QStringList recentNameList(const QString &type) = 0;\n    virtual void clearRecentNameList(const QString &type) = 0;\n    virtual void openRecent(const QString &name, const QString &type) = 0;\n    virtual void updateRecentMenu(const QString &type) = 0;\nsignals:\n    void recentNameListChanged(const QString &type);\n};\n\nclass IFileManager : public IManager\n{\n    Q_OBJECT\npublic:\n    IFileManager(QObject *parent = 0) : IManager(parent) {}\n\n    virtual void execFileWizard(const QString &projPath, const QString &filePath, const QString &gopath = QString()) = 0;\n    virtual bool openFile(const QString &fileName) = 0;\n    virtual IEditor *openEditor(const QString &fileName, bool bActive = true, bool ignoreNavigationHistory = false) = 0;\n    virtual IEditor *openEditorByFactory(const QString &fileName, const QString &factoryId, bool bActive = true, bool ignoreNavigationHistory = false) = 0;\n    virtual IEditor *createEditor(const QString &contents, const QString &_mimeType) = 0;\n    virtual IEditor *createEditor(const QString &fileName) = 0;\n    virtual IProject *openProject(const QString &fileName) = 0;\n    virtual IProject *openProjectScheme(const QString &fileName, const QString &scheme) = 0;\n    virtual bool findProjectTargetInfo(const QString &fileName, QMap<QString,QString>& targetInfo) const = 0;\n    //virtual IApplication* openFolderEx(const QString &folder) = 0;\n    virtual QStringList folderList() const = 0;\n    virtual void setFolderList(const QStringList &folders) = 0;\n    virtual void addFolderList(const QString &folders) = 0;\n    virtual IApplication* openFolderInNewWindow(const QString &folder) = 0;\n    virtual void emitAboutToShowFolderContextMenu(QMenu *menu, LiteApi::FILESYSTEM_CONTEXT_FLAG flag, const QFileInfo &info, const QString &context) = 0;\nsignals:\n    void fileListChanged();\n    void fileWizardFinished(const QString &type, const QString &scheme, const QString &location);\n    void aboutToShowFolderContextMenu(QMenu *menu, LiteApi::FILESYSTEM_CONTEXT_FLAG flag, const QFileInfo &info,const QString &context);\npublic slots:\n    virtual void newFile() = 0;\n    virtual void openFiles() = 0;\n    virtual void openFolder() = 0;\n    virtual void openEditors() = 0;\n    virtual void openProjects() = 0;\n};\n\nclass IEditContext : public QObject\n{\n    Q_OBJECT\npublic:\n    IEditContext(QObject *parent) : QObject(parent) {}\n    virtual QWidget *focusWidget() const = 0;\n    virtual QMenu   *focusMenu() const = 0;\n    virtual QToolBar *focusToolBar() const = 0;\n};\n\nclass IView : public IObject\n{\n    Q_OBJECT\npublic:\n    IView(QObject *parent = 0) : IObject(parent) {}\n    virtual QWidget *widget() = 0;\n    virtual QString name() const = 0;\n    virtual QIcon icon() const { return QIcon(); }\n};\n\nclass IEditor : public IView\n{\n    Q_OBJECT\npublic:\n    IEditor(QObject *parent = 0) : IView(parent) {}\n    virtual bool open(const QString &filePath,const QString &mimeType) = 0;\n    virtual bool reload() = 0;\n    virtual bool save() = 0;\n    virtual bool saveAs(const QString &filePath) = 0;\n    virtual void setReadOnly(bool b) = 0;\n    virtual bool isReadOnly() const = 0;\n    virtual bool isModified() const = 0;\n    virtual QString filePath() const = 0;\n    virtual QString mimeType() const = 0;\n    virtual QByteArray saveState() const = 0;\n    virtual bool restoreState(const QByteArray &array) = 0;\n    virtual void onActive() = 0;\nsignals:\n    void modificationChanged(bool);\n    void contentsChanged();\n    void reloaded();\n};\n\nstruct FindOption {\n    QString findText;\n    bool    useRegexp;\n    bool    matchWord;\n    bool    matchCase;\n    bool    wrapAround;\n    bool    backWard;\n};\n\nclass ITextEditor : public IEditor\n{\n    Q_OBJECT\npublic:\n    enum PositionOperation {\n        Current = 1,\n        EndOfLine = 2,\n        StartOfLine = 3,\n        Anchor = 4,\n        EndOfDoc = 5\n    };\n    ITextEditor(QObject *parent = 0) : IEditor(parent) {}\n    virtual int line() const = 0;\n    virtual int column() const = 0;\n    virtual int utf8Position(bool realFile = false, int pos = -1) const = 0;\n    virtual QByteArray utf8Data() const = 0;\n    virtual void setLineWrap(bool wrap) = 0;\n    virtual bool isLineWrap() const = 0;\n    virtual void gotoLine(int blockNumber, int column, bool center = false, int selection = 0) = 0;\n    virtual void setFindOption(FindOption *opt) = 0;\n    virtual int position(PositionOperation posOp = Current, int at = -1) const = 0;\n    virtual QString textAt(int pos, int length) const = 0;\n    virtual QRect cursorRect(int pos = -1) const = 0;\n    virtual QTextCursor textCursor() const = 0;\n    virtual QTextDocument *document() const = 0;\n};\n\ninline ITextEditor *getTextEditor(IEditor *editor)\n{\n    if (editor && editor->extension()) {\n        return findExtensionObject<ITextEditor*>(editor->extension(),\"LiteApi.ITextEditor\");\n    }\n    return 0;\n}\n\ninline QMenu *getMenu(IObject *obj, const QString &id)\n{\n    if (obj && obj->extension()) {\n        return findExtensionObject<QMenu*>(obj->extension(),QString(\"LiteApi.Menu.%1\").arg(id));\n    }\n    return 0;\n}\n\ninline IEditContext *getEditContext(IObject *obj)\n{\n    if (obj && obj->extension()) {\n        return findExtensionObject<IEditContext*>(obj->extension(),\"LiteApi.IEditContext\");\n    }\n    return 0;\n}\n\ninline QMenu *getEditMenu(IObject *obj)\n{\n    return getMenu(obj,\"Edit\");\n}\n\ninline QMenu *getContextMenu(IObject *obj)\n{\n    if (obj && obj->extension()) {\n        return findExtensionObject<QMenu*>(obj->extension(),\"LiteApi.ContextMenu\");\n    }\n    return 0;\n}\n\ninline QPlainTextEdit *getPlainTextEdit(IEditor *editor) {\n    if (editor && editor->extension()) {\n        return findExtensionObject<QPlainTextEdit*>(editor->extension(),\"LiteApi.QPlainTextEdit\");\n    }\n    return 0;\n}\n\ninline QToolBar *getEditToolBar(IEditor *editor) {\n    if (editor && editor->extension()) {\n        return findExtensionObject<QToolBar*>(editor->extension(),\"LiteApi.QToolBar.Edit\");\n    }\n    return 0;\n}\n\ninline QToolBar *getBuildToolBar(IEditor *editor) {\n    if (editor && editor->extension()) {\n        return findExtensionObject<QToolBar*>(editor->extension(),\"LiteApi.QToolBar.Build\");\n    }\n    return 0;\n}\n\n\nclass IEditorManager : public IManager\n{\n    Q_OBJECT\npublic:\n    IEditorManager(QObject *parent = 0) : IManager(parent) {}\n    virtual IEditor *openEditor(const QString &fileName, const QString &mimeType) = 0;\n    virtual IEditor *openEditorByFactory(const QString &fileName, const QString &mimeType, const QString &factoryId) = 0;\n    virtual void addFactory(IEditorFactory *factory) = 0;\n    virtual void removeFactory(IEditorFactory *factory) = 0;\n    virtual QList<IEditorFactory*> factoryList() const = 0;\n    virtual QStringList mimeTypeList() const = 0;\n    virtual QWidget *widget() = 0;\n    virtual IEditor *currentEditor() const = 0;\n    virtual void setCurrentEditor(IEditor *editor, bool ignoreNavigationHistory = false) = 0;\n    virtual IEditor *findEditor(const QString &fileName, bool canonical) const = 0;\n    virtual QList<IEditor*> editorList() const = 0;\n    virtual QAction *registerBrowser(IEditor *editor) = 0;\n    virtual void activeBrowser(IEditor *editor) = 0;\n    virtual void addNavigationHistory(IEditor *editor = 0,const QByteArray &saveState = QByteArray()) = 0;\n    virtual void cutForwardNavigationHistory() = 0;\n    virtual void loadColorStyleScheme(const QString &fileName) = 0;\n    virtual const ColorStyleScheme *colorStyleScheme() const = 0;\n    virtual void addEditContext(IEditContext *context) = 0;\n    virtual void removeEditContext(IEditContext *context) = 0;\n    virtual void updateEditInfo(const QString &info) = 0;\npublic slots:\n    virtual bool saveEditor(IEditor *editor = 0, bool emitAboutSave = true) = 0;\n    virtual bool saveEditorAs(IEditor *editor = 0) = 0;\n    virtual bool saveAllEditors(bool emitAboutSave = true) = 0;\n    virtual bool closeEditor(IEditor *editor = 0) = 0;\n    virtual bool closeAllEditors() = 0;\nsignals:\n    void currentEditorChanged(LiteApi::IEditor *editor);\n    void editorCreated(LiteApi::IEditor *editor);\n    void editorAboutToClose(LiteApi::IEditor *editor);\n    void editorAboutToSave(LiteApi::IEditor *editor);\n    void editorSaved(LiteApi::IEditor *editor);\n    void editorModifyChanged(LiteApi::IEditor *editor, bool b);\n    void colorStyleSchemeChanged();\n};\n\nclass IBrowserEditor : public IEditor\n{\n    Q_OBJECT\npublic:\n    IBrowserEditor(QObject *parent = 0)  : IEditor(parent) {}\n    virtual bool open(const QString &/*fileName*/,const QString &/*mimeType*/) { return false; }\n    virtual bool reload() { return false; }\n    virtual bool save() { return false; }\n    virtual bool saveAs(const QString &/*fileName*/){ return false; }\n    virtual void setReadOnly(bool /*b*/) {}\n    virtual bool isReadOnly() const { return true; }\n    virtual bool isModified() const { return false; }\n    virtual QString filePath() const { return QString(); }\n    virtual QMap<QString,QString> editorInfo() const { return QMap<QString,QString>(); }\n    virtual QMap<QString,QString> targetInfo() const { return QMap<QString,QString>(); }\n    virtual QByteArray saveState() const {return QByteArray(); }\n    virtual bool restoreState(const QByteArray &) { return false; }\n    virtual void onActive(){}\n};\n\nclass IWebKitBrowser : public IBrowserEditor\n{\n    Q_OBJECT\npublic:\n    IWebKitBrowser(QObject *parent = 0)  : IBrowserEditor(parent) {}\n    virtual void openUrl(const QUrl &url) = 0;\nsignals:\n    void loadFinished(bool);\n};\n\nclass IProject : public IView\n{\n    Q_OBJECT\npublic:\n    virtual QString filePath() const = 0;\n    virtual QString mimeType() const = 0;\n    virtual QStringList folderList() const = 0;\n    virtual QStringList fileNameList() const = 0;\n    virtual QStringList filePathList() const = 0;\n    virtual QString fileNameToFullPath(const QString &filePath) = 0;\n    virtual QMap<QString,QString> targetInfo() const = 0;\n    virtual void load() = 0;\nsignals:\n    void reloaded();\n};\n\nclass IFileProject : public IProject\n{\n    Q_OBJECT\npublic:\n    virtual bool isFolder() const { return false; }\n};\n\nclass IFolderProject : public IProject\n{\n    Q_OBJECT\npublic:\n    virtual bool isFolder() const { return true; }\n    virtual QStringList folderList() const = 0;\n};\n\nclass IOption : public IView\n{\n    Q_OBJECT\npublic:\n    IOption(QObject *parent = 0) : IView(parent) {}\n    virtual QString mimeType() const = 0;\n    virtual void save() = 0;\n    virtual void load() = 0;\n};\n\nclass IOptionFactory : public QObject\n{\n    Q_OBJECT\npublic:\n    IOptionFactory(QObject *parent = 0) : QObject(parent) {}\n    virtual QStringList mimeTypes() const = 0;\n    virtual IOption *create(const QString &mimeType) = 0;\n};\n\nclass IOptionManager : public IManager\n{\n    Q_OBJECT\npublic:\n    IOptionManager(QObject *parent = 0) : IManager(parent) {}\n    virtual void addFactory(IOptionFactory *factory) = 0;\n    virtual void removeFactory(IOptionFactory *factory) = 0;\n    virtual QList<IOptionFactory*> factoryList() const = 0;\n    virtual void emitApplyOption(const QString &mimetype) = 0;\npublic slots:\n    virtual void exec(const QString &mimeType) = 0;\nsignals:\n    void applyOption(QString);\n};\n\nclass IProjectManager : public IManager\n{\n    Q_OBJECT\npublic:\n    IProjectManager(QObject *parent = 0) : IManager(parent) {}\n    virtual IFolderProject *openFolder(const QString &folderPath) = 0;\n    virtual IProject *openProject(const QString &fileName, const QString &mimeType) = 0;\n    virtual void addFactory(IProjectFactory *factory) = 0;\n    virtual void removeFactory(IProjectFactory *factory) = 0;\n    virtual QList<IProjectFactory*> factoryList() const = 0;\n    virtual QStringList mimeTypeList() const = 0;\n    virtual void setCurrentProject(IProject *project) = 0;\n    virtual IProject *currentProject() const = 0;\n    virtual QList<IEditor*> editorList(IProject *project) const = 0;\n    virtual void addImportAction(QAction *act) = 0;\n    virtual QWidget *widget() = 0;\npublic slots:\n    virtual void saveProject(IProject *project = 0) = 0;\n    virtual void closeProject(IProject *project = 0) = 0;\n    virtual void openSchemeDialog(const QString &scheme) = 0;\nsignals:\n    void currentProjectChanged(LiteApi::IProject *project);\n    void projectAboutToClose(LiteApi::IProject *project);\n};\n\nclass IToolWindowManager : public IManager\n{\n    Q_OBJECT\npublic:\n    IToolWindowManager(QObject *parent = 0) : IManager(parent) {}\n    virtual QAction *addToolWindow(Qt::DockWidgetArea area, QWidget *widget, const QString &id, const QString &title, bool split,\n                                   QList<QAction*> widgetActions = QList<QAction*>(),\n                                   QList<QWidget*> widgetList = QList<QWidget*>() ) = 0;\n    virtual void moveToolWindow(Qt::DockWidgetArea from, Qt::DockWidgetArea to,QAction *action, bool split) = 0;\n    virtual QAction *findToolWindow(QWidget *widget) = 0;\n    virtual void removeToolWindow(QAction *action) = 0;\n    virtual void removeToolWindow(QWidget *widget) = 0;\n};\n\nclass IDockManager : public IManager\n{\n    Q_OBJECT\npublic:\n    IDockManager(QObject *parent = 0) : IManager(parent) {}\n    virtual QWidget *widget() = 0;\n    virtual QDockWidget *addDock(QWidget *widget,\n                         const QString &title,\n                         Qt::DockWidgetArea ares = Qt::LeftDockWidgetArea,\n                         Qt::DockWidgetAreas alowedAreas = Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea,\n                         QDockWidget::DockWidgetFeatures  features = QDockWidget::AllDockWidgetFeatures) = 0;\n    virtual void removeDock(QWidget *widget) = 0;\n    virtual void showDock(QWidget *widget) = 0;\n    virtual void hideDock(QWidget *widget) = 0;\n    virtual QDockWidget *dockWidget(QWidget *widget) = 0;\n};\n\nenum VIEWMENU_ACTION_POS\n{\n    ViewMenuToolBarPos = 1,\n    ViewMenuToolWindowPos,\n    ViewMenuBrowserPos,\n    ViewMenuLastPos\n};\n\nstruct ActionInfo {\n    QString label;\n    QString defks;\n    QString ks;\n    bool    standard;\n    QList<QKeySequence> keys;\n    QAction *action;\n};\n\nclass IActionContext {\npublic:\n    virtual ~IActionContext() {}\n    virtual QString contextName() const = 0;\n    virtual void regAction(QAction *act, const QString &id, const QString &defks, bool standard = false) = 0;\n    virtual void regAction(QAction *act, const QString &id, const QKeySequence::StandardKey &def) = 0;\n    virtual QStringList actionKeys() const = 0;\n    virtual ActionInfo *actionInfo(const QString &id) const = 0;\n    virtual void setActionShortcuts(const QString &id, const QString &shortcuts) = 0;\n};\n\nclass IActionManager : public IManager\n{\n    Q_OBJECT\npublic:\n    IActionManager(QObject *parent = 0) : IManager(parent) {}\n    virtual QMenu *insertMenu(const QString &id, const QString &title, const QString &idBefore = QString()) = 0;\n    virtual QMenu *loadMenu(const QString &id) = 0;\n    virtual void removeMenu(QMenu *menu) = 0;\n    virtual QList<QString>  menuList() const = 0;\n    virtual QToolBar *insertToolBar(const QString &id, const QString &title, const QString &before = QString()) = 0;\n    virtual void insertToolBar(QToolBar *toolBar,const QString &before = QString()) = 0;\n    virtual QToolBar *loadToolBar(const QString &id) = 0;\n    virtual void removeToolBar(QToolBar* toolBar) = 0;\n    virtual QList<QString> toolBarList() const = 0;\n    virtual void insertViewMenu(VIEWMENU_ACTION_POS pos, QAction *act) = 0;\n    virtual void setViewMenuSeparator(const QString &sepid, bool group = false) = 0;\n    virtual void insertViewMenuAction(QAction *act, const QString &sepid) = 0;    \n    virtual bool insertMenuActions(const QString &idMenu, const QString &idBeforeSep, bool newGroup,  QList<QAction*> &actions) = 0;\n    virtual IActionContext *getActionContext(QObject *obj, const QString &name) = 0;\n    virtual QStringList actionKeys() const = 0;\n    virtual ActionInfo *actionInfo(const QString &id) const = 0;\n    virtual void setActionShourtcuts(const QString &id, const QString &shortcuts) = 0;\n    virtual QStringList actionContextNameList() const = 0;\n    virtual IActionContext *actionContextForName(const QString &name) = 0;\n};\n\nclass IGoProxy : public QObject\n{\n    Q_OBJECT\npublic:\n    IGoProxy(QObject *parent) : QObject(parent) {}\n    virtual bool isValid() const = 0;\n    virtual bool isRunning() const = 0;\n    virtual QByteArray commandId() const = 0;\n    virtual void writeStdin(const QByteArray &data) = 0;\nsignals:\n    void started();\n    void stdoutput(const QByteArray &data);\n    void stderror(const QByteArray &data);\n    void finished(int code, const QByteArray &msg);\npublic slots:\n    virtual void call(const QByteArray &id, const QByteArray &args = QByteArray()) = 0;\n};\n\nclass IPlugin;\nclass IApplication : public IObject\n{\n    Q_OBJECT\npublic:\n    virtual ~IApplication() {}\n    virtual IApplication    *newInstance(const QString &session) = 0;\n    virtual QList<IApplication*> instanceList() const = 0;\n    virtual bool hasGoProxy() const = 0;\n    virtual IGoProxy *createGoProxy(QObject *parent) = 0;\n    virtual IProjectManager *projectManager() = 0;\n    virtual IEditorManager  *editorManager() = 0;\n    virtual IFileManager    *fileManager() = 0;\n    virtual IActionManager  *actionManager() = 0;\n    virtual IMimeTypeManager *mimeTypeManager() = 0;\n    virtual IOptionManager  *optionManager() = 0;\n    virtual IToolWindowManager *toolWindowManager() = 0;\n    virtual IHtmlWidgetManager *htmlWidgetManager() = 0;\n    virtual IRecentManager *recentManager() = 0;\n\n    virtual QMainWindow *mainWindow() const = 0;\n    virtual QSettings *settings() = 0;\n    virtual QMap<QString,QVariant> &globalCookie() = 0; //global cookie\n\n    virtual QString rootPath() const = 0;\n    virtual QString applicationPath() const = 0;\n    virtual QString toolPath() const = 0;\n    virtual QString resourcePath() const = 0;\n    virtual QString pluginPath() const = 0;\n    virtual QString storagePath() const = 0;\n\n    virtual QString ideVersion() const = 0;\n    virtual QString ideFullName() const = 0;\n    virtual QString ideName() const = 0;\n    virtual QString ideCopyright() const = 0;\n\n    virtual QList<IPlugin*> pluginList() const = 0;\n\n    virtual void loadSession(const QString &sessioin) = 0;\n    virtual void saveSession(const QString &sessioin) = 0;\n    virtual QStringList sessionList() const = 0;\n    virtual QString currentSession() const = 0;\n\n    virtual void loadState() = 0;\n    virtual void saveState() = 0;\n\n    virtual void appendLog(const QString &model, const QString &log, bool error = false) = 0;\n    virtual void sendBroadcast(const QString &module, const QString &id, const QVariant &param = QVariant()) = 0;\nsignals:    \n    void loaded();\n    void aboutToQuit();\n    void key_escape();\n    void broadcast(QString,QString,QVariant);\n    void sessionListChanged();\n};\n\nclass PluginInfo\n{\npublic:\n    PluginInfo() : m_mustLoad(false)\n    {}\n    virtual ~PluginInfo() {}\n    QString author() const { return m_author; }\n    QString info() const { return m_info; }\n    QString id() const { return m_id; }\n    QString name() const { return m_name; }\n    QString ver() const { return m_ver; }\n    QStringList dependList() const { return m_dependList; }\n    QString filePath() const { return m_filePath; }\n    bool isMustLoad() const { return m_mustLoad; }\n    void setAuthor(const QString &author) { m_author = author; }\n    void setInfo(const QString &info) { m_info = info; }\n    void setId(const QString &id) { m_id = id.toLower(); }\n    void setName(const QString &name) { m_name = name; }\n    void setVer(const QString &ver) { m_ver = ver; }\n    void setFilePath(const QString &path) { m_filePath = path; }\n    void setDependList(const QStringList &dependList) { m_dependList = dependList; }\n    void appendDepend(const QString &depend) { m_dependList.append(depend); }\n    void setMustLoad(bool b) { m_mustLoad = b; }\nprotected:\n    bool m_mustLoad;\n    QString m_author;\n    QString m_info;\n    QString m_id;\n    QString m_name;\n    QString m_filePath;\n    QString m_ver;\n    QStringList m_dependList;\n};\n\nclass IPlugin : public IObject\n{\n    Q_OBJECT\npublic:\n    virtual bool load(LiteApi::IApplication *app) = 0;\n};\n\nclass IPluginFactory : public QObject\n{\n    Q_OBJECT\npublic:\n    virtual ~IPluginFactory() {}\n    virtual QString id() const = 0;\n    virtual PluginInfo *info() const = 0;    \n    virtual QStringList dependPluginList() const = 0;\n    virtual void setFilePath(const QString &path) = 0;\n    virtual QString filePath() const = 0;\n    virtual IPlugin *createPlugin() = 0;\n};\n\nclass IPluginFactoryImpl : public IPluginFactory\n{\n    Q_OBJECT\npublic:\n    IPluginFactoryImpl() : m_info(new PluginInfo)\n    {\n    }\n    virtual ~IPluginFactoryImpl()\n    {\n        delete m_info;\n    }\n    virtual QString id() const\n    {\n        return m_info->id();\n    }\n    virtual PluginInfo *info() const\n    {\n        return m_info;\n    }\n    virtual QStringList dependPluginList() const{\n        return m_info->dependList();\n    }\n    virtual void setFilePath(const QString &path)\n    {\n        m_info->setFilePath(path);\n    }\n    virtual QString filePath() const\n    {\n        return m_info->filePath();\n    }\nprotected:\n    PluginInfo *m_info;\n};\n\ntemplate <typename T>\nclass PluginFactoryT : public IPluginFactoryImpl\n{\npublic:\n    virtual IPlugin *createPlugin()\n    {\n        return new T;\n    }\n};\n\nclass IAppIdleTimer : public QObject\n{\n    Q_OBJECT\nsignals:\n    void appIdle(int sec);\npublic:\n    virtual void resetTimer() = 0;\n};\n\ninline IAppIdleTimer *GetAppIdleTimer(LiteApi::IApplication *app)\n{\n    return static_cast<IAppIdleTimer*>(app->extension()->findObject(\"LiteApi.IAppIdleTimer\"));\n}\n\ninline bool gotoLine(IApplication *app, const QString &fileName, int line, int col, bool forceCenter, bool saveHistory) {\n    if (saveHistory) {\n        app->editorManager()->addNavigationHistory();\n    }\n    IEditor *cur = app->editorManager()->currentEditor();\n    IEditor *edit = app->fileManager()->openEditor(fileName);\n    ITextEditor *textEdit = getTextEditor(edit);\n    if (textEdit) {\n        if (cur == edit) {\n            textEdit->gotoLine(line,col,forceCenter);\n        } else {\n            textEdit->gotoLine(line,col,true);\n        }\n        return true;\n    }\n    return false;\n}\n\ninline QSize getToolBarIconSize(LiteApi::IApplication *app) {\n    int v = app->settings()->value(\"General/ToolBarIconSize\",0).toInt();\n    switch (v) {\n    case 0:\n        return QSize(16,16);\n    case 1:\n        return QSize(18,18);\n    case 2:\n        return QSize(20,20);\n    case 3:\n        return QSize(22,22);\n    case 4:\n        return QSize(24,24);\n    }\n    return QSize(16,16);\n}\n\ninline IWebKitBrowser *getWebKitBrowser(LiteApi::IApplication *app)\n{\n    return static_cast<IWebKitBrowser*>(app->extension()->findObject(\"LiteApp.IWebKitBrowser\"));\n}\n\ninline QString getGotools(LiteApi::IApplication *app)\n{\n#ifdef Q_OS_WIN\n    return app->toolPath()+\"/gotools.exe\";\n#else\n    return app->toolPath()+\"/gotools\";\n#endif\n}\n\ninline QString findPackageByMimeType(LiteApi::IApplication *app, const QString mimeType)\n{\n    return app->mimeTypeManager()->findPackageByMimeType(mimeType);\n}\n\n} //namespace LiteApi\n\nQ_DECLARE_INTERFACE(LiteApi::IPluginFactory,\"LiteApi.IPluginFactory.X37\")\n\n\n#endif //LITEAPI_H\n\n"
  },
  {
    "path": "liteidex/src/api/liteapi/liteapi.pri",
    "content": "LIBS *= -l$$qtLibraryName(liteapi)\n\n\n\n"
  },
  {
    "path": "liteidex/src/api/liteapi/liteapi.pro",
    "content": "TARGET = liteapi\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude (../../liteideapi.pri)\n\nDEFINES += LITEAPI_LIBRARY\n\nHEADERS += liteobj.h \\\n           liteapi.h \\\n    litehtml.h \\\n    liteqt.h \\\n    liteutil.h \\\n    liteids.h\n"
  },
  {
    "path": "liteidex/src/api/liteapi/litehtml.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litehtml.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEHTML_H\n#define LITEHTML_H\n\n#include <QWidget>\n#include <QUrl>\n#include <QTextDocument>\n#ifndef QT_NO_PRINTER\n#include <QPrinter>\n#endif\n\nnamespace LiteApi {\n\nclass IHtmlWidget : public QObject\n{\n    Q_OBJECT\npublic:\n    IHtmlWidget(QObject *parent) :QObject(parent){}\n    virtual ~IHtmlWidget() {}\npublic:\n    virtual QWidget *widget() const = 0;\n    virtual QString className() const = 0;\n    virtual void setSearchPaths(const QStringList &paths) = 0;\n    virtual void setHtml(const QString &html, const QUrl &url) = 0;\n    virtual QUrl url() const = 0;\n    virtual void clear() = 0;\n    virtual void scrollToAnchor(const QString &anchor) = 0;\n    virtual void setScrollBarValue(Qt::Orientation orientation, int value) = 0;\n    virtual int scrollBarValue(Qt::Orientation orientation) const = 0;\n    virtual int scrollBarMinimum(Qt::Orientation orientation) const = 0;\n    virtual int scrollBarMaximum(Qt::Orientation orientation) const = 0;\n    virtual QString selectedText() const = 0;\n    virtual bool findText(const QString & exp, QTextDocument::FindFlags options) = 0;\npublic slots:\n#ifndef QT_NO_PRINTER\n    virtual void print(QPrinter *printer) = 0;\n#endif\nsignals:\n    void contentsSizeChanged();\n    void loadFinished(bool);\n    void anchorChanged(const QString & anchor);\n    void linkClicked(const QUrl & url);\n    void linkHovered(const QUrl & url);\n};\n\n//html document util\nclass IHtmlDocument : public QObject\n{\n    Q_OBJECT\npublic:\n    IHtmlDocument(QObject *parent) : QObject(parent){}\n    virtual ~IHtmlDocument() {}\npublic:\n    virtual void setHtml(const QString &html, const QUrl &url) = 0;\npublic slots:\n#ifndef QT_NO_PRINTER\n    virtual void print(QPrinter *printer) = 0;\n#endif\n    virtual QString\ttoHtml () const = 0;\n    virtual QString\ttoPlainText () const = 0;\nsignals:\n    void loadFinished(bool);\n};\n\nclass IHtmlWidgetFactory : public QObject\n{\n    Q_OBJECT\npublic:\n    IHtmlWidgetFactory(QObject *parent = 0) : QObject(parent) {}\n    virtual QString className() const = 0;\n    virtual IHtmlWidget *create(QObject *parent) = 0;\n    virtual IHtmlDocument  *createDocument(QObject *parent) = 0;\n};\n\n// QTextBrowser and QWebView\nclass IHtmlWidgetManager : public QObject\n{\n    Q_OBJECT\npublic:\n    IHtmlWidgetManager(QObject *parent = 0) : QObject(parent) {}\n    virtual QStringList classNameList() const = 0;\n    virtual void addFactory(IHtmlWidgetFactory *factory) = 0;\n    virtual QList<IHtmlWidgetFactory*> factoryList() const = 0;\n    virtual bool setDefaultClassName(const QString &className) = 0;\n    virtual QString defaultClassName() const = 0;\n    virtual IHtmlWidget *create(QObject *parent) = 0;\n    virtual IHtmlWidget *createByName(QObject *parent, const QString &className) = 0;\n    virtual IHtmlDocument *createDocument(QObject *parent) = 0;\n    virtual IHtmlDocument *createDocumentByName(QObject *parent, const QString &className) = 0;\n};\n\n} //namespace LiteApi\n\n#endif // LITEHTML_H\n"
  },
  {
    "path": "liteidex/src/api/liteapi/liteids.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: liteids.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef LITEIDS_H\r\n#define LITEIDS_H\r\n\r\n#define ID_MENU_FILE \"menu/file\"\r\n#define ID_MENU_RECENT \"menu/recent\"\r\n#define ID_MENU_VIEW \"menu/view\"\r\n#define ID_MENU_EDIT \"menu/edit\"\r\n#define ID_MENU_FIND \"menu/find\"\r\n#define ID_MENU_TOOLS \"menu/tools\"\r\n#define ID_MENU_BUILD \"menu/build\"\r\n#define ID_MENU_DEBUG \"menu/debug\"\r\n#define ID_MENU_HELP \"menu/help\"\r\n\r\n#define ID_TOOLBAR_STD \"toolbar/std\"\r\n#define ID_TOOLBAR_ENV \"toolbar/env\"\r\n#define ID_TOOLBAR_BUILD \"toolbar/build\"\r\n\r\n#endif // LITEIDS_H\r\n"
  },
  {
    "path": "liteidex/src/api/liteapi/liteobj.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteobj.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEOBJ_H\n#define LITEOBJ_H\n\n#include <QObject>\n#include <QStringList>\n#include <QHash>\n\nnamespace LiteApi {\n\n#ifdef Q_OS_MAC\nenum { UseMacShortcuts = 1 };\n#else\nenum { UseMacShortcuts = 0 };\n#endif\n\nclass IObject;\nclass IExtension\n{\npublic:\n    virtual ~IExtension() {}\n    virtual void addObject(const QString &meta, QObject *obj) = 0;\n    virtual void removeObject(const QString &meta) = 0;\n    virtual QObject *findObject(const QString &meta) const = 0;\n    virtual QStringList objectMetaList() const = 0;\n};\n\nclass IObject : public QObject\n{\npublic:\n    IObject(QObject *parent = 0) : QObject(parent) {}\n    virtual ~IObject() {}\n    virtual IExtension *extension() { return 0; }\n};\n\ntemplate <typename T>\ninline T findExtensionObject(IObject *obj, const QString & meta)\n{\n    IExtension *ext = obj->extension();\n    if (!ext) {\n        return 0;\n    }\n    QObject *t = ext->findObject(meta);\n    if (!t) {\n        return 0;\n    }\n    return static_cast<T>(t);\n}\n\n\ntemplate <typename T>\ninline T findExtensionObject(IExtension *ext, const QString & meta)\n{\n    QObject *t = ext->findObject(meta);\n    if (!t) {\n        return 0;\n    }\n    return static_cast<T>(t);\n}\n\n} //LiteApi\n\n#endif // LITEOBJ_H\n"
  },
  {
    "path": "liteidex/src/api/liteapi/liteqt.h",
    "content": "#ifndef LITEQT_H\n#define LITEQT_H\n\n#include <Qt>\n#include <QString>\n\n#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)\n#define qtKeepEmptyParts Qt::KeepEmptyParts\n#define qtSkipEmptyParts Qt::SkipEmptyParts\n#else\n#define qtKeepEmptyParts QString::KeepEmptyParts\n#define qtSkipEmptyParts QString::SkipEmptyParts\n#endif\n\n\n#endif // LITEQT_H\n"
  },
  {
    "path": "liteidex/src/api/liteapi/liteutil.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteutil.h\n// Creator: visualfc <visualfc@gmail.com>\n#ifndef LITEUTIL_H\n#define LITEUTIL_H\n\n#include \"liteapi.h\"\n\nnamespace LiteApi {\n\ninline void updateSetting(QSettings *setting, const QString &key, const QVariant &value, const QVariant &def)\n{\n    if (value == def) {\n        setting->remove(key);\n    } else {\n        setting->setValue(key,value);\n    }\n}\n\ninline void updateAppSetting(LiteApi::IApplication *app, const QString &key, const QVariant &value, const QVariant &def)\n{\n    updateSetting(app->settings(),key,value,def);\n}\n\n}\n\n\n#endif // LITEUTIL_H\n"
  },
  {
    "path": "liteidex/src/api/litebuildapi/litebuildapi.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litebuildapi.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEBUILDAPI_H\n#define LITEBUILDAPI_H\n\n#include \"liteapi/liteapi.h\"\n#include <QProcessEnvironment>\n\nnamespace LiteApi {\n\nclass BuildAction\n{  \npublic:\n    BuildAction():\n        m_debug(false),\n        m_output(false),\n        m_readline(false),\n        m_separator(false),\n        m_killold(false),\n        m_navigate(false),\n        m_folder(false),\n        m_takeall(false)\n    {}\n    void setId(const QString &id) { m_id = id; }\n    void setOs(const QString &os) { m_os = os; }\n    void setMenu(const QString &menu) { m_menu = menu; }\n    void setKey(const QString &key) { m_key = key; }\n    void setFunc(const QString &func) { m_func = func; }\n    void setCmd(const QString &cmd) { m_cmd = cmd; }\n    void setArgs(const QString &args) { m_args = args; }\n    void setSave(const QString &save) { m_save = save; }\n    void setDebug(const QString &text) {\n        m_debug = QVariant(text).toBool();\n    }\n    void setOutput(const QString &text) {\n        m_output = QVariant(text).toBool();\n    }\n    void setReadline(const QString &text) {\n        m_readline = QVariant(text).toBool();\n    }\n    void setSeparator(const QString &text) {\n        m_separator = QVariant(text).toBool();\n    }\n    void setKillold(const QString &text) {\n        m_killold = QVariant(text).toBool();\n    }\n    void setNavigate(const QString &text) {\n        m_navigate = QVariant(text).toBool();\n    }\n    void setFolder(const QString &text) {\n        m_folder = QVariant(text).toBool();\n    }\n    void setTakeall(const QString &text) {\n        m_takeall = QVariant(text).toBool();\n    }\n    void setWork(const QString &work) { m_work = work; }\n    void setCodec(const QString &codec) { m_codec = codec; }\n    void setRegex(const QString &regex) { m_regex = regex; }\n    void setImg(const QString &img) {m_img = img; }\n    void setTask(const QStringList &task) { m_task = task; }\n    QString work() const { return m_work; }\n    QString id() const { return m_id; }\n    QString os() const { return m_os; }\n    QString menu() const { return m_menu; }\n    QString key() const { return m_key; }\n    QString cmd() const { return m_cmd; }\n    QString func() const { return m_func; }\n    QString args() const { return m_args; }\n    QString save() const { return m_save; }\n    bool isDebug() const { return m_debug; }\n    bool isOutput() const { return m_output; }\n    bool isReadline() const {return m_readline; }\n    bool isSeparator() const { return m_separator; }\n    bool isFolder() const { return m_folder; }\n    bool isKillOld() const { return m_killold; }\n    bool isNavigate() const { return m_navigate; }\n    bool isTakeall() const { return m_takeall; }\n    QString codec() const { return m_codec; }\n    QString regex() const { return m_regex; }\n    QString img() const { return m_img; }\n    QStringList task() const { return m_task; }\n    void clear() {\n        m_id.clear();\n        m_cmd.clear();\n        m_key.clear();\n        m_args.clear();\n        m_codec.clear();\n        m_regex.clear();\n        m_img.clear();\n        m_save.clear();\n        m_task.clear();\n        m_debug = false;\n        m_output = false;\n        m_readline = false;\n        m_separator = false;\n        m_killold = false;\n        m_folder = false;\n        m_takeall = false;\n    }\n    bool isEmpty() {\n        return m_id.isEmpty();\n    }\n    bool isHidden() {\n        return m_id.isEmpty() || m_id[0].isLower();\n    }\nprotected:\n    QString m_id;\n    QString m_os;\n    QString m_key;\n    QString m_cmd;\n    QString m_func;\n    QString m_args;\n    QString m_codec;\n    QString m_regex;\n    QString m_save;\n    QString m_img;\n    QString m_work;\n    QString m_menu;\n    QStringList m_task;\n    bool    m_debug;\n    bool    m_output;\n    bool    m_readline;\n    bool    m_separator;\n    bool    m_killold;\n    bool    m_navigate;\n    bool    m_folder;\n    bool    m_takeall;\n};\n\nclass BuildLookup\n{\npublic:\n    BuildLookup() : m_top(1)\n    {\n    }\n    void setMimeType(const QString &type) {m_type=type;}\n    void setFile(const QString &file) {m_file=file;}\n    void setTop(const QString &top) {\n        if (top.isEmpty()) {\n            return;\n        }\n        bool ok = false;\n        int value = top.toInt(&ok);\n        if (ok) {\n            m_top=value;\n        }\n    }\n    QString mimeType() const {return m_type;}\n    QString file() const {return m_file;}\n    int top() const {return m_top;}\nprotected:\n    QString m_type;\n    QString m_file;\n    int     m_top;\n};\n\nclass BuildConfig\n{\npublic:\n    BuildConfig()\n    {\n    }\n    void setId(const QString &id) { m_id = id; }\n    void setName(const QString &name) { m_name = name; }\n    void setValue(const QString &value) { m_value = value; }\n    QString id() const { return m_id; }\n    QString name() const { return m_name; }\n    QString value() const { return m_value; }\nprotected:\n    QString m_id;\n    QString m_name;\n    QString m_value;\n};\n\nclass BuildCustom\n{\npublic:\n    BuildCustom() : m_hasShared(false), m_isReadOnly(false), m_isEscaped(false)\n    {\n    }\n    void setId(const QString &id) { m_id = id; }\n    void setName(const QString &name) { m_name = name; }\n    void setValue(const QString &value) { m_value = value; }\n    void setSharedValue(const QString &value) {\n        m_hasShared = true;\n        m_sharedValue = value;\n    }\n    void setReadOnly(const QString &value)\n    {\n        m_isReadOnly = QVariant(value).toBool();\n    }\n    void setEscaped(const QString &value)\n    {\n        m_isEscaped = QVariant(value).toBool();\n    }\n    QString id() const { return m_id; }\n    QString name() const { return m_name; }\n    QString value() const { return m_value; }\n    bool hasShared() const { return m_hasShared; }\n    QString sharedValue() const { return m_sharedValue; }\n    bool isReadOnly() const { return m_isReadOnly; }\n    bool isEscaped() const { return m_isEscaped; }\nprotected:\n    QString m_id;\n    QString m_name;\n    QString m_value;\n    QString m_sharedValue;\n    bool    m_hasShared;\n    bool    m_isReadOnly;\n    bool    m_isEscaped;\n};\n\nclass BuildTarget\n{\npublic:\n    BuildTarget()\n    {\n    }\n    void setId(const QString &id) { m_id = id; }\n    void setCmd(const QString &cmd) { m_cmd = cmd; }\n    void setDebug(const QString &debug) { m_debug = debug; }\n    void setArgs(const QString &args) { m_args = args; }\n    void setWork(const QString &work) { m_work = work; }\n    void setBuildArgs(const QString &args) { m_buildArgs = args; }\n    QString id() const { return m_id; }\n    QString cmd() const { return m_cmd; }\n    QString debug() const { return m_debug; }\n    QString args() const { return m_args; }\n    QString work() const { return m_work; }\n    QString buildArgs() const { return m_buildArgs; }\n    bool isEmpty() {\n        return m_id.isEmpty();\n    }\nprotected:\n    QString m_id;\n    QString m_cmd;\n    QString m_debug;\n    QString m_buildArgs;\n    QString m_args;\n    QString m_work;\n};\n\nclass IBuild : public QObject\n{\n    Q_OBJECT\npublic:\n    IBuild(QObject *parent = 0): QObject(parent) {}\n    virtual ~IBuild() {}\n    virtual QString mimeType() const = 0;\n    virtual QString id() const = 0;\n    virtual QString work() const = 0;\n    virtual QString lock() const = 0;\n    virtual QList<BuildAction*> actionList() const = 0;\n    virtual QList<BuildLookup*> lookupList() const = 0;\n    virtual QList<BuildConfig*> configList() const = 0;\n    virtual QList<BuildCustom*> customList() const = 0;\n    virtual QList<BuildTarget*>  targetList() const = 0;\n    virtual BuildAction *findAction(const QString &name) = 0;\n    virtual QList<QAction*> actions() = 0;\nsignals:\n    void buildAction(LiteApi::IBuild *build, LiteApi::BuildAction *act);\n};\n\nclass IBuildManager : public IManager\n{\n    Q_OBJECT\npublic:\n    IBuildManager(QObject *parent = 0) : IManager(parent) {}\n    virtual void addBuild(IBuild *build) = 0;\n    virtual void removeBuild(IBuild *build) = 0;\n    virtual IBuild *findBuild(const QString &mimeType) = 0;\n    virtual QList<IBuild*> buildList() const = 0;\n    virtual void setCurrentBuild(IBuild *build) = 0;\n    virtual IBuild *currentBuild() const = 0;\nsignals:\n    void buildChanged(LiteApi::IBuild*);\n};\n\nstruct TargetInfo {\n    QString buildRootPath;\n    QString targetName;\n    QString debugName;\n    QString buildArgs;\n    QString targetArgs;\n    QString targetWorkDir;\n};\n\nclass ILiteBuild : public IObject\n{\n    Q_OBJECT\npublic:\n    ILiteBuild(QObject *parent) : IObject(parent)\n    {\n    }\npublic:\n    virtual QString buildTag() const = 0;\n    virtual QMap<QString,QString> buildEnvMap() const = 0;\n    virtual TargetInfo getTargetInfo() = 0;\n    virtual IBuildManager *buildManager() const = 0;   \n    virtual QString envValue(LiteApi::IBuild *build, const QString &value) = 0;\n    virtual QString buildPathEnvValue(LiteApi::IBuild *build, const QString &buildFilePath, const QString &value) = 0;\n    virtual void appendOutput(const QString &str, const QBrush &brush, bool active, bool updateExistsTextColor = true) = 0;\n    virtual void execCommand(const QString &cmd, const QString &args, const QString &workDir, bool updateExistsTextColor = true, bool activateOutputCheck = true, bool navigate = true, bool command = true) = 0;\n    virtual bool execGoCommand(const QStringList &args, const QString &work, bool waitFinish = true) = 0;\npublic slots:\n    virtual void execBuildAction(LiteApi::IBuild*,LiteApi::BuildAction*) = 0;\n};\n\ninline QString sourceBuildFilePath(const QString &filePath)\n{\n    QFileInfo info(filePath);\n    if (info.isDir()) {\n        return info.filePath();\n    }\n    return info.path();\n}\n\ninline QString editorBuildFilePath(IEditor *editor)\n{\n    QString buildFilePath;\n    if (editor) {\n        QString filePath = editor->filePath();\n        if (!filePath.isEmpty()) {\n            buildFilePath = QFileInfo(filePath).path();\n        }\n    }\n    return buildFilePath;\n}\n\n\ninline ILiteBuild *getLiteBuild(LiteApi::IApplication* app)\n{\n    return LiteApi::findExtensionObject<ILiteBuild*>(app,\"LiteApi.ILiteBuild\");\n}\n\ninline IBuild *getGoBuild(LiteApi::IApplication *app)\n{\n    ILiteBuild *build = getLiteBuild(app);\n    if (!build) {\n        return 0;\n    }\n    return build->buildManager()->findBuild(\"text/x-gosrc\");\n}\n\ninline QString parserArgumentValue(const QString &opt, const QString &text)\n{\n    int pos = text.indexOf(opt);\n    if (pos == -1) {\n        return QString();\n    }\n    QString value = text.mid(pos+opt.length());\n    if (value.startsWith('=')) {\n        value = value.mid(1);\n    } else if (value.startsWith(' ')) {\n        value = value.trimmed();\n    }\n    if (value.isEmpty()) {\n        return QString();\n    }\n    if (value.startsWith('\\'')) {\n        int pos = value.indexOf('\\'',1);\n        if (pos != -1) {\n            return value.left(pos+1);\n        }\n    } else if (value.startsWith('\\\"')) {\n        int pos = value.indexOf('\\\"',1);\n        if (pos != -1) {\n            return value.left(pos+1);\n        }\n    } else {\n        int pos = value.indexOf(' ');\n        if (pos != -1) {\n            return value.left(pos);\n        }\n        return value;\n    }\n    return QString();\n}\n\ninline QString getGoBuildFlagsArgument(LiteApi::IApplication *app, const QString &buildFilePath, const QString &opt)\n{\n    ILiteBuild *liteBuild = getLiteBuild(app);\n    LiteApi::IBuild *build = getGoBuild(app);\n    if (!liteBuild || !build ) {\n        return QString();\n    }\n    QString value = liteBuild->buildPathEnvValue(build,buildFilePath,\"$(BUILDFLAGS)\");\n    QString tags = parserArgumentValue(opt,value);\n    if (tags.isEmpty()) {\n        value = liteBuild->buildPathEnvValue(build,buildFilePath,\"$(BUILDARGS)\");\n        tags = parserArgumentValue(opt,value);\n    }\n    return tags;\n}\n\ninline QString getGoBuildFlagsArgument(LiteApi::IApplication *app, LiteApi::IEditor *editor, const QString &opt)\n{\n    ILiteBuild *liteBuild = getLiteBuild(app);\n    if (!liteBuild) {\n        return QString();\n    }\n    QString buildFilePath = editorBuildFilePath(editor);\n    return getGoBuildFlagsArgument(app,buildFilePath,opt);\n}\n\n} //namespace LiteApi\n\n\n#endif //LITEBUILDAPI_H\n\n"
  },
  {
    "path": "liteidex/src/api/litebuildapi/litebuildapi.pri",
    "content": "LIBS *= -l$$qtLibraryName(litebuildapi)\n\n\n\n"
  },
  {
    "path": "liteidex/src/api/litebuildapi/litebuildapi.pro",
    "content": "TARGET = litebuildapi\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude (../../liteideapi.pri)\ninclude (../liteapi/liteapi.pri)\n\nHEADERS += litebuildapi.h\n"
  },
  {
    "path": "liteidex/src/api/litedebugapi/litedebugapi.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litedebugapi.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEDEBUGAPI_H\n#define LITEDEBUGAPI_H\n\n#include \"liteapi/liteapi.h\"\n#include <QAbstractItemModel>\n\nnamespace LiteApi {\n\nenum DEBUG_MODEL_TYPE{\n    ASYNC_MODEL = 1,\n    VARS_MODEL,\n    WATCHES_MODEL,\n    FRAMES_MODEL,\n    BREAKPOINTS_MODEL,\n    THREADS_MODEL,\n    LIBRARY_MODEL,\n    GOROUTINES_MODEL,\n    REGS_MODEL,\n    ASM_MODEL\n};\n\nenum DEBUG_LOG_TYPE {\n    DebugConsoleLog = 1,\n    DebugApplationLog,\n    DebugRuntimeLog,\n    DebugErrorLog\n};\n\nenum DEBUG_EDITOR_MARKTYPE {\n    BreakPointMarkType = 2000,\n    CurrentLineMarkType = 3000\n};\n\nclass IDebugger : public QObject\n{\n    Q_OBJECT\npublic:\n    IDebugger(QObject *parent = 0): QObject(parent) {}\n    virtual ~IDebugger() {}\npublic:\n    virtual QString mimeType() const = 0;\n    virtual QAbstractItemModel *debugModel(DEBUG_MODEL_TYPE type) = 0;\n    virtual void setWorkingDirectory(const QString &dir) = 0;\n    virtual void setEnvironment (const QStringList &environment) = 0;\n    virtual bool start(const QString &cmd, const QString &arguments) = 0;\n    virtual void stop() = 0;\n    virtual bool isRunning() = 0;\n    virtual void stepOver() = 0;\n    virtual void stepInto() = 0;\n    virtual void stepOut() = 0;\n    virtual void continueRun() = 0;\n    virtual void runToLine(const QString &fileName, int line) = 0;\n    virtual void command(const QByteArray &cmd) = 0;\n    virtual void enterAppText(const QString &text) = 0;\n    virtual void enterDebugText(const QString &text) = 0;\n    virtual void expandItem(QModelIndex index, DEBUG_MODEL_TYPE type) = 0;\n    virtual void setInitBreakTable(const QMultiMap<QString,int> &bks) = 0;\n    virtual void setInitWatchList(const QStringList &names) = 0;\n    virtual void insertBreakPoint(const QString &fileName, int line) = 0;\n    virtual void removeBreakPoint(const QString &fileName, int line) = 0;\n    virtual void createWatch(const QString &var) = 0;\n    virtual void removeWatch(const QString &var) = 0;\n    virtual void removeAllWatch() = 0;\n    virtual void dbclickItem(QModelIndex index, DEBUG_MODEL_TYPE type) = 0;\nsignals:\n    void debugStarted();\n    void debugStoped();\n    void debugLoaded();\n    void debugLog(LiteApi::DEBUG_LOG_TYPE type, const QString &log);\n    void setExpand(LiteApi::DEBUG_MODEL_TYPE type, const QModelIndex &index, bool expanded);\n    void setCurrentLine(const QString &fileName, int line);\n    void gotoLine(const QString &fileName, int line);\n    void watchCreated(const QString &watch,const QString &name);\n    void watchRemoved(const QString &watch);\n    void beginUpdateModel(LiteApi::DEBUG_MODEL_TYPE type);\n    void endUpdateModel(LiteApi::DEBUG_MODEL_TYPE type);\n    void scrollTo(LiteApi::DEBUG_MODEL_TYPE type, const QModelIndex &index);\n};\n\nclass IDebuggerManager : public IManager\n{\n    Q_OBJECT\npublic:\n    IDebuggerManager(QObject *parent = 0) : IManager(parent) {}\n    virtual void addDebugger(IDebugger *debug) = 0;\n    virtual void removeDebugger(IDebugger *debug) = 0;\n    virtual IDebugger *findDebugger(const QString &mimeType) = 0;\n    virtual QList<IDebugger*> debuggerList() const = 0;\n    virtual void setCurrentDebugger(IDebugger *debug) = 0;\n    virtual IDebugger *currentDebugger() = 0;\nsignals:\n    void currentDebuggerChanged(LiteApi::IDebugger*);\n};\n\ninline IDebuggerManager *getDebugManager(LiteApi::IApplication *app)\n{\n    return LiteApi::findExtensionObject<IDebuggerManager*>(app,\"LiteApi.IDebuggerManager\");\n}\n\nclass ILiteDebug : public IObject\n{\n    Q_OBJECT\npublic:\n    ILiteDebug(QObject *parent) : IObject(parent)\n    {\n    }\npublic:\n    virtual IDebuggerManager *debugManager() const = 0;\n    virtual void startDebug(const QString &cmd, const QString &args, const QString &work) = 0;\n    virtual bool isRunning() const = 0;\npublic slots:\n    virtual void continueRun() = 0;\n    virtual void runToLine() = 0;\n    virtual void stopDebug() = 0;\n    virtual void stepOver() = 0;\n    virtual void stepInto() = 0;\n    virtual void stepOut() = 0;\n    virtual void showLine() = 0;\n    virtual void toggleBreakPoint() = 0;\n    virtual void removeAllBreakPoints() = 0;\nsignals:\n    void debugBefore();\n    void debugEnd();\n};\n\ninline ILiteDebug *getLiteDebug(LiteApi::IApplication *app)\n{\n    return LiteApi::findExtensionObject<ILiteDebug*>(app,\"LiteApi.ILiteDebug\");\n}\n\n} //namespace LiteApi\n\n#endif //LITEDEBUGAPI_H\n\n"
  },
  {
    "path": "liteidex/src/api/litedebugapi/litedebugapi.pri",
    "content": "LIBS *= -l$$qtLibraryName(litedebugapi)\n\n\n\n"
  },
  {
    "path": "liteidex/src/api/litedebugapi/litedebugapi.pro",
    "content": "TARGET = litedebugapi\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude (../../liteideapi.pri)\ninclude (../liteapi/liteapi.pri)\n\nHEADERS += litedebugapi.h\n"
  },
  {
    "path": "liteidex/src/api/liteeditorapi/liteeditorapi.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: liteeditorapi.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef LITEEDITORAPI_H\r\n#define LITEEDITORAPI_H\r\n\r\n#include \"liteapi/liteapi.h\"\r\n#include <QTextCursor>\r\n#include <QTextBlock>\r\n#include <QCompleter>\r\n#include <QStandardItem>\r\n\r\nnamespace TextEditor {\r\nclass SyntaxHighlighter;\r\n}\r\n\r\nnamespace LiteApi {\r\n\r\nclass ILiteEditor;\r\nclass IWordApi\r\n{\r\npublic:\r\n    virtual ~IWordApi() {}\r\n    virtual QString package() const = 0;\r\n    virtual QStringList apiFiles() const = 0;\r\n    virtual bool loadApi() = 0;\r\n    virtual QStringList wordList() const = 0;\r\n    virtual QStringList expList() const = 0;\r\n    virtual void appendExp(const QStringList &list) = 0;\r\n};\r\n\r\nstruct Snippet\r\n{\r\n    QString Name;\r\n    QString Info;\r\n    QString Text;\r\n};\r\n\r\nclass ISnippetApi\r\n{\r\npublic:\r\n    virtual ~ISnippetApi() {}\r\n    virtual QString package() const = 0;\r\n    virtual QStringList apiFiles() const = 0;\r\n    virtual bool loadApi() = 0;\r\n    virtual QList<Snippet*> snippetList() const = 0;\r\n};\r\n\r\nclass IEditorApiManager : public IManager\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    IEditorApiManager(QObject *parent = 0) : IManager(parent) {}\r\n    virtual void addWordApi(IWordApi *api) = 0;\r\n    virtual void removeWordApi(IWordApi *api) = 0;\r\n    virtual IWordApi *findWordApi(const QString &mimeType) = 0;\r\n    virtual QList<IWordApi*> wordApiList() const = 0;\r\n    virtual void addSnippetApi(ISnippetApi *api) = 0;\r\n    virtual void removeSnippetApi(ISnippetApi *api) = 0;\r\n    virtual ISnippetApi *findSnippetApi(const QString &mimeType) = 0;\r\n    virtual QList<ISnippetApi*> snippetApiList() const = 0;\r\n};\r\n\r\nenum CompletionContext {\r\n    CompleterCodeContext = 0,\r\n    CompleterImportContext,\r\n};\r\n\r\nclass ICompleter : public QObject\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    ICompleter(QObject *parent): QObject(parent) {}\r\n    virtual void setEditor(QPlainTextEdit *editor) = 0;\r\n    virtual QStandardItem *findRoot(const QString &name) = 0;\r\n    virtual void clearChildItem(QStandardItem *root) = 0;\r\n    virtual void appendChildItem(QStandardItem *root,QString name,const QString &kind, const QString &info,const QIcon &icon, bool temp) = 0;\r\n    virtual bool appendItem(const QString &name,const QIcon &icon, bool temp) = 0;\r\n    virtual bool appendItemEx(const QString &name,const QString &kind, const QString &info,const QIcon &icon, bool temp) = 0;\r\n    virtual void appendItems(QStringList items, const QString &kind, const QString &info,const QIcon &icon, bool temp) = 0;\r\n    virtual void appendSnippetItem(const QString &name, const QString &info, const QString &content) = 0;\r\n    virtual void clearItemChilds(const QString &name) = 0;\r\n    virtual void clearTemp() = 0;\r\n    virtual void clear() = 0;\r\n    virtual void setSearchSeparator(bool b) = 0;\r\n    virtual bool searchSeparator() const = 0;\r\n    virtual void setExternalMode(bool b) = 0;\r\n    virtual bool externalMode() const = 0;\r\n    virtual void setCaseSensitivity(Qt::CaseSensitivity caseSensitivity) = 0;\r\n    virtual void setFuzzy(bool fuzzy) = 0;\r\n    virtual void setCompletionPrefix(const QString &prefix) = 0;\r\n    virtual QString completionPrefix() const = 0;\r\n    virtual void setCompletionContext(CompletionContext ctx) = 0;\r\n    virtual CompletionContext completionContext() const = 0;\r\n    virtual void setSeparator(const QString &sep) = 0;\r\n    virtual QString separator() const = 0;\r\n    virtual void showPopup() = 0;\r\n    virtual void hidePopup() = 0;\r\n    virtual QAbstractItemView *popup() const = 0;\r\n    virtual QModelIndex currentIndex() const = 0;\r\n    virtual QString currentCompletion() const = 0;\r\n    virtual QAbstractItemModel *completionModel() const = 0;\r\n    virtual bool startCompleter(const QString &completionPrefix) = 0;\r\n    virtual void updateCompleterModel() = 0;\r\n    virtual void updateCompleteInfo(QModelIndex index) = 0;\r\n    virtual void setImportList(const QStringList &importList) = 0;\r\n    virtual void setPrefixMin(int min) = 0;\r\n    virtual int prefixMin() const = 0;\r\nsignals:\r\n    void prefixChanged(QTextCursor,QString,bool force);\r\n    void wordCompleted(const QString &func, const QString &kind, const QString &info);\r\n};\r\n\r\nclass IEditorMark : public QObject\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    IEditorMark(QObject *parent) : QObject(parent) {}\r\n    virtual void addMark(int line, int type) = 0;\r\n    virtual void addMarkList(const QList<int> &lines, int type) = 0;\r\n    virtual void removeMark(int line, int type) = 0;\r\n    virtual void removeMarkList(const QList<int> &lines, int type) = 0;\r\n    virtual QList<int> markLinesByType(int type) const = 0;\r\n    virtual QList<QTextBlock> markBlocksByType(int type) const = 0;\r\n    virtual QList<int> markTypesByLine(int line) const = 0;\r\n    virtual ILiteEditor *editor() const = 0;\r\n    virtual QString filePath() const = 0;\r\nsignals:\r\n    void markListChanged(int type);\r\n};\r\n\r\nclass IEditorMarkNode : public QObject\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    IEditorMarkNode(QObject *parent = 0) : QObject(parent) {}\r\n    virtual ~IEditorMarkNode() {}\r\n\r\n    virtual int blockNumber() const = 0;\r\n    virtual int type() const = 0;\r\n    virtual QTextBlock block() const = 0;\r\n};\r\n\r\nclass IEditorMarkManager : public IManager\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    IEditorMarkManager(QObject *parent = 0) : IManager(parent) {}\r\n    virtual void registerMark(int type, const QIcon &icon) = 0;\r\n    virtual QList<int> markTypeList() const = 0;\r\n    virtual QIcon iconForType(int type) const = 0;\r\n    virtual int indexOfType(int type) const = 0;\r\n    virtual QList<LiteApi::IEditorMark*> editorMarkList() const = 0;\r\nsignals:\r\n    void editorMarkCreated(LiteApi::IEditorMark *mark);\r\n    void editorMarkRemoved(LiteApi::IEditorMark *mark);\r\n    void editorMarkListChanged(LiteApi::IEditorMark *mark, int type);\r\n    void editorMarkNodeCreated(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node);\r\n    void editorMarkNodeRemoved(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node);\r\n    void editorMarkNodeChanged(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node);\r\n};\r\n\r\nenum EditorNaviagteType{\r\n    EditorNavigateNormal = 1,\r\n    EditorNavigateWarning = 2,\r\n    EditorNavigateError = 4,\r\n    EditorNavigateReload = 8,\r\n    EditorNavigateFind = 16,\r\n    EditorNavigateSelection = 32,\r\n    EditorNavigateBad = EditorNavigateWarning|EditorNavigateError\r\n};\r\n\r\nenum ExtraSelectionKind {\r\n    CurrentLineSelection,\r\n    ParenthesesMatchingSelection,\r\n    LinkSelection,\r\n};\r\n\r\nstruct Link\r\n{\r\n    Link(): linkTextStart(-1)\r\n        , linkTextEnd(-1)\r\n        , targetLine(-1)\r\n        , targetColumn(-1)\r\n        , showTip(false)\r\n        , showNav(false)\r\n    {}\r\n\r\n    void clear()\r\n    {\r\n        linkTextStart = -1;\r\n        linkTextEnd = -1;\r\n        targetOpenDir.clear();\r\n        targetOpenDirInfo.clear();\r\n        targetFileName.clear();\r\n        targetInfo.clear();\r\n        sourceInfo.clear();\r\n        targetLine = 0;\r\n        targetColumn = 0;\r\n        showTip = false;\r\n        showNav = false;\r\n        text.clear();\r\n    }\r\n\r\n    bool hasValidTarget() const\r\n    { return !targetFileName.isEmpty(); }\r\n\r\n    bool hasValidLinkText() const\r\n    { return linkTextStart != linkTextEnd; }\r\n\r\n    bool operator==(const Link &other) const\r\n    { return linkTextStart == other.linkTextStart && linkTextEnd == other.linkTextEnd; }\r\n\r\n    int linkTextStart;\r\n    int linkTextEnd;\r\n    int targetLine;\r\n    int targetColumn;\r\n    bool    showTip;\r\n    bool    showNav;\r\n    QString targetOpenDir;\r\n    QString targetOpenDirInfo;\r\n    QString targetFileName;\r\n    QString targetInfo;\r\n    QString sourceInfo;\r\n    QPoint cursorPos;\r\n    QString text;\r\n};\r\n\r\nclass ITextLexer : public QObject\r\n{\r\npublic:\r\n    ITextLexer(QObject *parent = 0) : QObject(parent)\r\n    {}\r\n    virtual ~ITextLexer()\r\n    {}\r\n    virtual bool isLangSupport() const = 0;\r\n    virtual bool isInComment(const QTextCursor &cursor) const = 0;\r\n    virtual bool isInString(const QTextCursor &cursor) const = 0;\r\n    virtual bool isInEmptyString(const QTextCursor &cursor) const = 0;\r\n    virtual bool isEndOfString(const QTextCursor &cursor) const = 0;\r\n    virtual bool isInStringOrComment(const QTextCursor &cursor) const = 0;\r\n    virtual bool isCanAutoCompleter(const QTextCursor &cursor) const = 0;\r\n    virtual bool isInImport(const QTextCursor &cursor) const = 0;\r\n    virtual int startOfFunctionCall(const QTextCursor &cursor) const = 0;\r\n    virtual QString fetchFunctionTip(const QString &func, const QString &kind, const QString &info) = 0;\r\n    virtual bool fetchFunctionArgs(const QString &str, int &argnr, int &parcount) = 0;\r\n    virtual QString stringQuoteList() const = 0;\r\n    virtual bool hasStringBackslash() const = 0;\r\n};\r\n\r\nclass ILiteEditor : public ITextEditor\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    ILiteEditor(QObject *parent = 0) : ITextEditor(parent) {}\r\n    virtual QTextDocument* document() const = 0;\r\n    virtual void setCompleter(ICompleter *complter) = 0;\r\n    virtual void setEditorMark(IEditorMark *mark) = 0;\r\n    virtual void setTextLexer(ITextLexer *lexer) = 0;\r\n    virtual void setSpellCheckZoneDontComplete(bool b) = 0;\r\n    virtual void insertNavigateMark(int line, EditorNaviagteType type, const QString &msg, const QString &tag = \"\", int offset = 0, int selection = 0) = 0;\r\n    virtual void clearNavigateMarak(int line) = 0;\r\n    virtual void clearAllNavigateMarks() = 0;\r\n    virtual void clearAllNavigateMark(EditorNaviagteType types, const QString &tag = \"\") = 0;\r\n    virtual void setNavigateHead(EditorNaviagteType type, const QString &msg) = 0;\r\n    virtual void showLink(const Link &link) = 0;\r\n    virtual void clearLink() = 0;\r\n    virtual void setTabOption(int tabSize, bool tabToSpace) = 0;\r\n    virtual void setEnableAutoIndentAction(bool b) = 0;\r\n    virtual bool isLineEndUnix() const = 0;\r\n    virtual void setLineEndUnix(bool b) = 0;\r\n    virtual void showToolTipInfo(const QPoint & pos, const QString & text) = 0;\r\n    virtual void loadDiff(const QString &diff) = 0;\r\n    virtual void loadTextUseDiff(const QString &text) = 0;\r\nsignals:\r\n    void updateLink(const QTextCursor &cursor, const QPoint &pos, bool nav);\r\n};\r\n\r\ninline ILiteEditor *getLiteEditor(IEditor *editor)\r\n{\r\n    if (editor && editor->extension()) {\r\n        return findExtensionObject<ILiteEditor*>(editor->extension(),\"LiteApi.ILiteEditor\");\r\n    }\r\n    return 0;\r\n}\r\n\r\ninline ITextLexer *getTextLexer(IEditor *editor) {\r\n    if (editor && editor->extension()) {\r\n        return findExtensionObject<ITextLexer*>(editor->extension(),\"LiteApi.ITextLexer\");\r\n    }\r\n    return 0;\r\n}\r\n\r\ninline IEditorMark *getEditorMark(IEditor *editor) {\r\n    if (editor && editor->extension()) {\r\n        return findExtensionObject<IEditorMark*>(editor->extension(),\"LiteApi.IEditorMark\");\r\n    }\r\n    return 0;\r\n}\r\n\r\ninline IEditorMarkManager *getEditorMarkManager(IApplication *app) {\r\n    if (app && app->extension()) {\r\n        return findExtensionObject<IEditorMarkManager*>(app->extension(),\"LiteApi.IEditorMarkManager\");\r\n    }\r\n    return 0;\r\n}\r\n\r\nclass IHighlighterFactory : public QObject\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    IHighlighterFactory(QObject *parent) : QObject(parent)\r\n    {}\r\n    virtual QStringList mimeTypes() const = 0;\r\n    virtual TextEditor::SyntaxHighlighter* create(ITextEditor *editor, QTextDocument *doc, const QString &mimeType) = 0;\r\n};\r\n\r\nclass IHighlighterManager :public IManager\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    IHighlighterManager(QObject *parent) : IManager(parent)\r\n    {}\r\n    virtual void addFactory(IHighlighterFactory *factroy) = 0;\r\n    virtual void removeFactory(IHighlighterFactory *factory) = 0;\r\n    virtual QList<IHighlighterFactory*> factoryList() const = 0;\r\n    virtual QStringList mimeTypeList() const = 0;\r\n    virtual IHighlighterFactory *findFactory(const QString &mimeType) const = 0;\r\n};\r\n\r\ninline IHighlighterManager *getHighlighterManager(LiteApi::IApplication *app)\r\n{\r\n    return static_cast<IHighlighterManager*>(app->extension()->findObject(\"LiteApi.IHighlighterManager\"));\r\n}\r\n\r\ninline QString wordUnderCursor(QTextCursor tc, bool *moveLeft = 0, int *selectStart = 0)\r\n{\r\n    QString text = tc.block().text();\r\n    int pos = tc.positionInBlock();\r\n    if (pos > 0 && pos < text.length()) {\r\n        QChar ch = text.at(pos-1);\r\n        if (ch.isLetterOrNumber() || ch == '_') {\r\n            tc.movePosition(QTextCursor::Left);\r\n            if (moveLeft) {\r\n                *moveLeft = true;\r\n            }\r\n        }\r\n    }\r\n    tc.select(QTextCursor::WordUnderCursor);\r\n    if (selectStart) {\r\n        *selectStart = tc.selectionStart();\r\n    }\r\n    return tc.selectedText();\r\n}\r\n\r\ninline void selectWordUnderCursor(QTextCursor &tc, bool *moveLeft = 0)\r\n{\r\n    QString text = tc.block().text();\r\n    int pos = tc.positionInBlock();\r\n    if (pos > 0 && pos < text.length()) {\r\n        QChar ch = text.at(pos-1);\r\n        if (ch.isLetterOrNumber() || ch == '_') {\r\n            tc.movePosition(QTextCursor::Left);\r\n            if (moveLeft) {\r\n                *moveLeft = true;\r\n            }\r\n        }\r\n    }\r\n    tc.select(QTextCursor::WordUnderCursor);\r\n}\r\n\r\n} //namespace LiteApi\r\n\r\n\r\n#endif //LITEEDITORAPI_H\r\n\r\n"
  },
  {
    "path": "liteidex/src/api/liteeditorapi/liteeditorapi.pri",
    "content": "LIBS *= -l$$qtLibraryName(liteeditorapi)\n\n\n\n"
  },
  {
    "path": "liteidex/src/api/liteeditorapi/liteeditorapi.pro",
    "content": "TARGET = liteeditorapi\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude (../../liteideapi.pri)\ninclude (../liteapi/liteapi.pri)\n\nHEADERS += liteeditorapi.h\n"
  },
  {
    "path": "liteidex/src/api/liteenvapi/liteenvapi.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteenvapi.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEENVAPI_H\n#define LITEENVAPI_H\n\n#include \"liteapi/liteapi.h\"\n#include <QProcessEnvironment>\n#include <QDir>\n#include <QDebug>\n\nnamespace LiteApi {\n\nclass IEnv : public QObject\n{\n    Q_OBJECT\npublic:\n    IEnv(QObject *parent = 0): QObject(parent) {}\n    virtual ~IEnv() {}\n    virtual QString id() const = 0;\n    virtual QString filePath() const = 0;\n    virtual QStringList orgEnvLines() const = 0;\n    virtual QMap<QString,QString> goEnvMap() const = 0;\n    virtual QProcessEnvironment& environment() = 0;\n    virtual void reload() = 0;\nsignals:\n    void goenvError(QString,QString);\n    void goenvChanged(QString);\n};\n\nclass IEnvManager : public IManager\n{\n    Q_OBJECT\npublic:\n    IEnvManager(QObject *parent = 0) : IManager(parent) {}\n    virtual QList<IEnv*> envList() const = 0;\n    virtual IEnv *findEnv(const QString &id, const QString &backup = \"system\") const = 0;\n    virtual void setCurrentEnvId(const QString &id) = 0;\n    virtual IEnv *currentEnv() const = 0;\n    virtual QProcessEnvironment currentEnvironment() const = 0;\n    virtual void reloadCurrentEnv() = 0;\nsignals:\n    void currentEnvChanged(LiteApi::IEnv*);\n};\n\nclass IGoEnvManger: public IManager\n{\n    Q_OBJECT\npublic:\n    IGoEnvManger(QObject *parent = 0) : IManager(parent) {}\n    virtual QString gocmd() const = 0;\n    virtual QString gotools() const = 0;\n    virtual QString GOROOT() const = 0;\n    virtual QStringList GOPATH() const = 0;\n    virtual QProcessEnvironment environment() const = 0;\n    virtual QProcessEnvironment customEnvironment(const QString &buildFilePath, QString *pCustomBuildPath = 0) const = 0;\n    virtual QStringList customGOPATH(const QString &buildPath, QString *pCustomBuildPath = 0) const = 0;\n    virtual QString findRealCustomBuildPath(const QString &buildPath) const = 0;\n    virtual bool hasCustomGOPATH(const QString &buildPath) const = 0;\n    virtual void updateGoEnv() = 0;\n    virtual void updateCustomGOPATH(const QString &buildPath) = 0;\nsignals:\n    void globalGOPATHChanged();\n    void customGOPATHChanged(const QString &buildPath);\n};\n\ninline IEnvManager *getEnvManager(LiteApi::IApplication* app)\n{\n    return LiteApi::findExtensionObject<IEnvManager*>(app,\"LiteApi.IEnvManager\");\n}\n\ninline IGoEnvManger *getGoEnvManager(LiteApi::IApplication *app)\n{\n    return LiteApi::findExtensionObject<IGoEnvManger*>(app,\"LiteApi.IGoEnvManger\");\n}\n\ninline QProcessEnvironment getCurrentEnvironment(LiteApi::IApplication *app)\n{\n    QProcessEnvironment e;\n    IEnvManager *env = getEnvManager(app);\n    if (env) {\n        e = env->currentEnvironment();\n    } else {\n        e = QProcessEnvironment::systemEnvironment();\n    }\n#ifdef Q_OS_WIN\n    QString sep = \";\";\n#else\n    QString sep = \":\";\n#endif\n    QStringList pathList;\n    foreach (QString path, e.value(\"PATH\").split(sep,qtSkipEmptyParts)) {\n        pathList.append(QDir::toNativeSeparators(path));\n    }\n    pathList.append(app->applicationPath());\n    pathList.removeDuplicates();\n    e.insert(\"PATH\",pathList.join(sep));\n    return e;\n}\n\ninline QString getDefaultGOOS()\n{\n    const char* goos = \"\";\n#ifdef Q_OS_WIN\n    goos = \"windows\";\n#endif\n#ifdef Q_OS_LINUX\n    goos = \"linux\";\n#endif\n#ifdef Q_OS_DARWIN\n    goos = \"darwin\";\n#endif\n#ifdef Q_OS_FREEBSD\n    goos = \"freebsd\";\n#endif\n#ifdef Q_OS_OPENBSD\n    goos = \"openbsd\";\n#endif\n\treturn goos;\n}\n\ninline QString getDefaultGOROOT()\n{\n#ifdef Q_OS_WIN\n    return \"c:\\\\go\";\n#else\n    return \"/usr/local/go\";\n#endif\n}\n\ninline bool hasGoEnv(const QProcessEnvironment &env)\n{\n    return env.contains(\"GOROOT\") && env.contains(\"GOARCH\");\n}\n\ninline QProcessEnvironment getSysEnvironment(LiteApi::IApplication *app)\n{\n    QProcessEnvironment env = getCurrentEnvironment(app);\n#ifdef Q_OS_WIN\n    QString sep = \";\";\n#else\n    QString sep = \":\";\n#endif\n\n    IEnvManager *mgr = LiteApi::getEnvManager(app);\n    if (mgr) {\n        LiteApi::IEnv *ce = mgr->currentEnv();\n        if (ce) {\n            QMapIterator<QString,QString> i(ce->goEnvMap());\n            while(i.hasNext()) {\n                i.next();\n                env.insert(i.key(),i.value());\n            }\n        }\n    }\n\n    QString goos = env.value(\"GOOS\");\n    if (goos.isEmpty()) {\n        goos = getDefaultGOOS();\n    }\n\n    QString goroot = env.value(\"GOROOT\");\n    if (goroot.isEmpty()) {\n        goroot = getDefaultGOROOT();\n    }\n    return env;\n}\n\n\ninline QProcessEnvironment getGoEnvironment(LiteApi::IApplication *app)\n{\n    QProcessEnvironment env = getCurrentEnvironment(app);\n#ifdef Q_OS_WIN\n    QString sep = \";\";\n#else\n    QString sep = \":\";\n#endif\n\n    IEnvManager *mgr = LiteApi::getEnvManager(app);\n    if (mgr) {\n        LiteApi::IEnv *ce = mgr->currentEnv();\n        if (ce) {\n            QMapIterator<QString,QString> i(ce->goEnvMap());\n            while(i.hasNext()) {\n                i.next();\n                env.insert(i.key(),i.value());\n            }\n        }\n    }\n\n    QString goos = env.value(\"GOOS\");\n    if (goos.isEmpty()) {\n        goos = getDefaultGOOS();\n    }\n    if (!env.contains(\"GOEXE\")) {\n        QString goexe;\n        if (goos == \"windows\") {\n            goexe = \".exe\";\n        }\n        env.insert(\"GOEXE\",goexe);\n    }\n\n    QString goarch = env.value(\"GOARCH\");\n    QString goroot = env.value(\"GOROOT\");\n    if (goroot.isEmpty()) {\n        goroot = getDefaultGOROOT();\n    }\n\n    if (app->settings()->value(\"liteide/use111gomodule\",false).toBool()) {\n        env.insert(\"GO111MODULE\",app->settings()->value(\"liteide/go111module\").toString());\n    }\n    if (app->settings()->value(\"liteide/usegoproxy\",false).toBool()) {\n        env.insert(\"GOPROXY\",app->settings()->value(\"liteide/goproxy\").toString());\n    }\n    if (app->settings()->value(\"liteide/usegoprivate\",false).toBool()) {\n        env.insert(\"GOPRIVATE\",app->settings()->value(\"liteide/goprivate\").toString());\n    }\n    if (app->settings()->value(\"liteide/usegonoproxy\",false).toBool()) {\n        env.insert(\"GONOPROXY\",app->settings()->value(\"liteide/gonoproxy\").toString());\n    }\n    if (app->settings()->value(\"liteide/usegonosumdb\",false).toBool()) {\n        env.insert(\"GONOSUMDB\",app->settings()->value(\"liteide/gonosumdb\").toString());\n    }\n\n    QStringList pathList;\n    if (app->settings()->value(\"liteide/usesysgopath\",true).toBool()) {\n        foreach (QString path, env.value(\"GOPATH\").split(sep,qtSkipEmptyParts)) {\n            pathList.append(QDir::toNativeSeparators(path));\n        }\n    }\n    if (app->settings()->value(\"liteide/uselitegopath\",true).toBool()) {\n        foreach (QString path, app->settings()->value(\"liteide/gopath\").toStringList()) {\n            pathList.append(QDir::toNativeSeparators(path));\n        }\n    }\n    pathList.removeDuplicates();\n    env.insert(\"GOPATH\",pathList.join(sep));\n\n    if (!goroot.isEmpty()) {\n        pathList.prepend(goroot);\n    }\n\n    QStringList binList;    \n    QString gobin = env.value(\"GOBIN\");\n    if (!gobin.isEmpty()) {\n        binList.append(gobin);\n    }\n    foreach (QString path, pathList) {\n        binList.append(QFileInfo(path,\"bin\").filePath());\n        binList.append(QFileInfo(path,\"bin/\"+goos+\"_\"+goarch).filePath());\n    }\n    env.insert(\"PATH\",env.value(\"PATH\")+sep+binList.join(sep)+sep);\n\n    return env;\n}\n\ninline QStringList getGOPATH(LiteApi::IApplication *app, bool includeGoroot)\n{\n    QProcessEnvironment env = getGoEnvironment(app);\n#ifdef Q_OS_WIN\n    QString sep = \";\";\n#else\n    QString sep = \":\";\n#endif\n    QStringList pathList;\n    QString goroot = QDir::toNativeSeparators(env.value(\"GOROOT\"));\n    if (includeGoroot) {\n        pathList.append(goroot);\n    }\n    foreach (QString path, env.value(\"GOPATH\").split(sep,qtSkipEmptyParts)) {\n        pathList.append(QDir::toNativeSeparators(path));\n    }\n    if (!includeGoroot) {\n        pathList.removeAll(goroot);\n    }\n    pathList.removeDuplicates();\n    return pathList;\n}\n\ninline QString getGOROOT(LiteApi::IApplication *app)\n{\n    return getGoEnvironment(app).value(\"GOROOT\");\n}\n\ninline QString lookupSrcRoot(const QString &buildFilePath)\n{\n    int index = buildFilePath.indexOf(\"/src/\");\n    if (index < 0) {\n        return QString();\n    }\n    return buildFilePath.left(index+4);\n}\n\ninline QString lookupParentHasCustom(LiteApi::IApplication *app, const QString &buildFilePath, const QString &srcRoot, QString *pCustomParent = 0)\n{\n    QFileInfo info(buildFilePath);\n    QString parent = info.path();\n\n    if (parent == srcRoot || info.dir().isRoot()) {\n        return QString();\n    }\n    QString customKey = \"litebuild-custom/\"+parent;\n    bool use_custom_gopath = app->settings()->value(customKey+\"#use_custom_gopath\",false).toBool();\n    if (use_custom_gopath) {\n        if (pCustomParent) {\n            *pCustomParent = parent;\n        }\n        return customKey;\n    }\n    return lookupParentHasCustom(app,parent,srcRoot);\n}\n\ninline QProcessEnvironment getCustomGoEnvironment(LiteApi::IApplication *app, const QString &buildFilePath, QString *pCustomBuildPath = 0)\n{\n    if (buildFilePath.isEmpty()) {\n        return getGoEnvironment(app);\n    }\n    QString customKey = \"litebuild-custom/\"+buildFilePath;\n    QString customBuildPath = buildFilePath;\n    bool use_custom_gopath = app->settings()->value(customKey+\"#use_custom_gopath\",false).toBool();\n    if (!use_custom_gopath) {\n        QString srcRoot = lookupSrcRoot(buildFilePath);\n        if (!srcRoot.isEmpty()) {\n            customKey = lookupParentHasCustom(app,buildFilePath,srcRoot, &customBuildPath);\n            if (!customKey.isEmpty()) {\n                use_custom_gopath = true;\n            }\n        }\n    }\n    if (!use_custom_gopath) {\n        return getGoEnvironment(app);\n    }\n    if (pCustomBuildPath) {\n        *pCustomBuildPath = customBuildPath;\n    }\n\n    QProcessEnvironment env = getCurrentEnvironment(app);\n#ifdef Q_OS_WIN\n    QString sep = \";\";\n#else\n    QString sep = \":\";\n#endif\n\n    IEnvManager *mgr = LiteApi::getEnvManager(app);\n    if (mgr) {\n        LiteApi::IEnv *ce = mgr->currentEnv();\n        if (ce) {\n            QMapIterator<QString,QString> i(ce->goEnvMap());\n            while(i.hasNext()) {\n                i.next();\n                env.insert(i.key(),i.value());\n            }\n        }\n    }\n\n    QString goos = env.value(\"GOOS\");\n    if (goos.isEmpty()) {\n        goos = getDefaultGOOS();\n    }\n    if (!env.contains(\"GOEXE\")) {\n        QString goexe;\n        if (goos == \"windows\") {\n            goexe = \".exe\";\n        }\n        env.insert(\"GOEXE\",goexe);\n    }\n\n    QString goarch = env.value(\"GOARCH\");\n    QString goroot = env.value(\"GOROOT\");\n    if (goroot.isEmpty()) {\n        goroot = getDefaultGOROOT();\n    }\n\n    QStringList pathList;\n\n    bool inherit_sys_gopath = app->settings()->value(customKey+\"#inherit_sys_gopath\",true).toBool();\n    bool inherit_lite_gopath = app->settings()->value(customKey+\"#inherit_lite_gopath\",true).toBool();\n    bool custom_gopath = app->settings()->value(customKey+\"#custom_gopath\",false).toBool();\n\n    if (inherit_sys_gopath) {\n        foreach (QString path, env.value(\"GOPATH\").split(sep,qtSkipEmptyParts)) {\n            pathList.append(QDir::toNativeSeparators(path));\n        }\n    }\n    if (inherit_lite_gopath) {\n        foreach (QString path, app->settings()->value(\"liteide/gopath\").toStringList()) {\n            pathList.append(QDir::toNativeSeparators(path));\n        }\n    }\n    if (custom_gopath) {\n        foreach (QString path, app->settings()->value(customKey+\"#gopath\").toStringList()) {\n            pathList.append(QDir::toNativeSeparators(path));\n        }\n    }\n    pathList.removeDuplicates();\n    env.insert(\"GOPATH\",pathList.join(sep));\n\n    if (!goroot.isEmpty()) {\n        pathList.prepend(goroot);\n    }\n\n    QStringList binList;\n    QString gobin = env.value(\"GOBIN\");\n    if (!gobin.isEmpty()) {\n        binList.append(gobin);\n    }\n    foreach (QString path, pathList) {\n        binList.append(QFileInfo(path,\"bin\").filePath());\n        binList.append(QFileInfo(path,\"bin/\"+goos+\"_\"+goarch).filePath());\n    }\n    env.insert(\"PATH\",env.value(\"PATH\")+sep+binList.join(sep)+sep);\n    return env;\n}\n\ninline QProcessEnvironment getCustomGoEnvironment(LiteApi::IApplication *app, LiteApi::IEditor *editor)\n{\n    QString buildFilePath;\n    if (editor) {\n        QString filePath = editor->filePath();\n        if (!filePath.isEmpty()) {\n            buildFilePath = QFileInfo(filePath).path();\n        }\n    }\n    return getCustomGoEnvironment(app,buildFilePath);\n}\n\n} //namespace LiteApi\n\n\n#endif //LITEENVAPI_H\n\n"
  },
  {
    "path": "liteidex/src/api/liteenvapi/liteenvapi.pri",
    "content": "LIBS *= -l$$qtLibraryName(liteenvapi)\n\n\n\n"
  },
  {
    "path": "liteidex/src/api/liteenvapi/liteenvapi.pro",
    "content": "TARGET = liteenvapi\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude (../../liteideapi.pri)\ninclude (../liteapi/liteapi.pri)\n\nHEADERS += liteenvapi.h\n"
  },
  {
    "path": "liteidex/src/api/litefindapi/litefindapi.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litefindapi.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEFINDAPI_H\n#define LITEFINDAPI_H\n\n#include \"liteapi/liteapi.h\"\n\nnamespace LiteApi {\n\nclass FileSearchResult\n{\npublic:\n    FileSearchResult()\n        : line(0), col(0), len(0) {}\n\n    FileSearchResult(const QString &path, const QString &lineText, int line, int col, int len)\n        : path(path), lineText(lineText), line(line), col(col), len(len) {}\n\npublic:\n    QString path;\n    QString lineText;\n    int line;\n    int col;\n    int len;\n};\n\nclass IFileSearch : public QObject\n{\n    Q_OBJECT\npublic:\n    IFileSearch(QObject *parent) : QObject(parent) {}\n    virtual QString mimeType() const = 0;\n    virtual QString displayName() const = 0;\n    virtual QWidget* widget() const = 0;\n    virtual void start() = 0;\n    virtual void cancel() = 0;\n    virtual void activate() = 0;\n    virtual QString searchText() const = 0;\n    virtual bool replaceMode() const = 0;\n    virtual bool readOnly() const = 0;\n    virtual bool canCancel() const = 0;\n    virtual void setSearchInfo(const QString &text, const QString &filter, const QString &path) = 0;\nsignals:\n    void searchTextChanged(const QString &text);\n    void findStarted();\n    void findFinished(bool b = true);\n    void findResult(const LiteApi::FileSearchResult &result);\n    void findError(const QString &error);\n};\n\nclass IFileSearchManager : public IManager\n{\n    Q_OBJECT\npublic:\n    IFileSearchManager(QObject *parent = 0) : IManager(parent) {}\n    virtual void addFileSearch(IFileSearch* search) = 0;\n    virtual IFileSearch *findFileSearch(const QString &mime) = 0;\n    virtual QList<IFileSearch*> fileSearchList() const = 0;\n    virtual void setCurrentSearch(LiteApi::IFileSearch *search) = 0;\n    virtual void showFileSearch(const QString &text, const QString &filter, const QString &path) = 0;\npublic slots:\n    virtual void newSearch() = 0;\n};\n\ninline IFileSearchManager* getFileSearchManager(LiteApi::IApplication *app)\n{\n    return LiteApi::findExtensionObject<IFileSearchManager*>(app,\"LiteApi.IFileSearchManager\");\n}\n\n} //namespace LiteApi\n\n#endif //LITEFINDAPI_H\n\n"
  },
  {
    "path": "liteidex/src/api/litefindapi/litefindapi.pri",
    "content": "LIBS *= -l$$qtLibraryName(litefindapi)\n\n\n\n"
  },
  {
    "path": "liteidex/src/api/litefindapi/litefindapi.pro",
    "content": "TARGET = litefindapi\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude (../../liteideapi.pri)\ninclude (../liteapi/liteapi.pri)\n\nHEADERS += litefindapi.h\n"
  },
  {
    "path": "liteidex/src/api/litettyapi/litettyapi.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litettyapi.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITETTYAPI_H\n#define LITETTYAPI_H\n\n#include \"liteapi/liteapi.h\"\n#include <QProcessEnvironment>\n#include <QDir>\n\nnamespace LiteApi {\n\nclass ITty : public QObject\n{\n    Q_OBJECT\npublic:\n    ITty(QObject *parent = 0): QObject(parent) {}\n    virtual QString serverName() const = 0;\n    virtual QString errorString() const = 0;\n    virtual bool listen() = 0;\n    virtual void shutdown() = 0;\n    virtual void write(const QByteArray &data) = 0;\nsignals:\n    void byteDelivery(const QByteArray &data);\n};\n\nclass ILiteTty : public QObject\n{\npublic:\n    ILiteTty(QObject *parent) : QObject(parent) { }\n    virtual ITty* createTty(QObject *parent) const = 0;\n};\n\ninline ILiteTty *getLiteTty(LiteApi::IApplication* app)\n{\n    return LiteApi::findExtensionObject<ILiteTty*>(app,\"LiteApi.ILiteTty\");\n}\n\ninline ITty *createTty(LiteApi::IApplication *app,QObject *parent)\n{\n    ILiteTty *liteTty = getLiteTty(app);\n    if (liteTty) {\n        return liteTty->createTty(parent);\n    }\n    return 0;\n}\n\n} //namespace LiteApi\n\n\n#endif //LITETTYAPI_H\n\n"
  },
  {
    "path": "liteidex/src/api/litettyapi/litettyapi.pri",
    "content": "LIBS *= -l$$qtLibraryName(litettyapi)\n\n\n\n"
  },
  {
    "path": "liteidex/src/api/litettyapi/litettyapi.pro",
    "content": "TARGET = litettyapi\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude (../../liteideapi.pri)\ninclude (../liteapi/liteapi.pri)\n\nHEADERS += litettyapi.h\n"
  },
  {
    "path": "liteidex/src/api/quickopenapi/quickopenapi.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: quickopenapi.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef QUICKOPENAPI_H\n#define QUICKOPENAPI_H\n\n#include \"liteapi/liteapi.h\"\n\nclass QTreeView;\nclass QLineEdit;\nnamespace LiteApi {\n\nclass IQuickOpen : public QObject\n{\n    Q_OBJECT\npublic:\n    IQuickOpen(QObject *parent = 0) : QObject(parent) {}\n    virtual QString id() const = 0;\n    virtual QString info() const = 0;\n    virtual QString placeholderText() const = 0;\n    virtual void activate() = 0;\n    virtual QAbstractItemModel *model() const = 0;\n    virtual QModelIndex rootIndex() const = 0;\n    virtual void updateModel() = 0;\n    virtual QModelIndex filterChanged(const QString &text) = 0;\n    virtual void indexChanged(const QModelIndex &index) = 0;\n    virtual bool selected(const QString &text, const QModelIndex &index) = 0;\n    virtual void cancel() = 0;\n};\n\nclass IQuickOpenFolder : public IQuickOpen\n{\n    Q_OBJECT\npublic:\n    IQuickOpenFolder(QObject *parent = 0) : IQuickOpen(parent) {}\n    virtual void setFolder(const QString &folder) = 0;\n    virtual void setPlaceholderText(const QString &text) = 0;\n};\n\nclass IQuickOpenFileSystem : public IQuickOpen\n{\npublic:\n    IQuickOpenFileSystem(QObject *parent = 0) : IQuickOpen(parent) {}\n    virtual void setRootPath(const QString &root) = 0;\n    virtual void setPlaceholderText(const QString &text) = 0;\n    virtual QModelIndex indexForPath(const QString &indexForPath) const = 0;\n    virtual QString pathForIndex(const QModelIndex &index) const = 0;\n};\n\nclass IQuickOpenAdapter : public QObject\n{\n    Q_OBJECT\npublic:\n    IQuickOpenAdapter(QObject *parent = 0) : QObject(parent) {}\n    virtual QStringList mimeTypes() const = 0;\n    virtual IQuickOpen *load(const QString &mimeType) = 0;\n};\n\nclass IQuickOpenMimeType : public LiteApi::IQuickOpen\n{\npublic:\n    IQuickOpenMimeType(QObject *parent) : LiteApi::IQuickOpen(parent) {}\n    virtual void addAdapter(LiteApi::IQuickOpenAdapter *factory) = 0;\n    virtual void setId(const QString &id) = 0;\n    virtual void setInfo(const QString &info) = 0;\n    virtual void setNoFoundMessage(const QString &message) = 0;\n};\n\nclass IQuickOpenManager : public IManager\n{\n    Q_OBJECT\npublic:\n    IQuickOpenManager(QObject *parent = 0) : IManager(parent) {}\n    virtual void addFilter(const QString &sym, IQuickOpen *filter) = 0;\n    virtual void removeFilter(IQuickOpen *filter) = 0;\n    virtual QList<IQuickOpen*> filterList() const = 0;\n    virtual QMap<QString,IQuickOpen*> symFilterMap() const = 0;\n    virtual void setCurrentFilter(IQuickOpen *filter) = 0;\n    virtual IQuickOpen *currentFilter() const = 0;\n    virtual QModelIndex currentIndex() const = 0;\n    virtual void showById(const QString &id) = 0;\n    virtual void showBySymbol(const QString &sym) = 0;\n    virtual IQuickOpen *findById(const QString &id) = 0;\n    virtual IQuickOpen *findBySymbol(const QString &sym) = 0;\n    virtual QWidget *widget() const = 0;\n    virtual QTreeView *modelView() const = 0;\n    virtual QLineEdit *lineEdit() const = 0;\n    virtual void setTempToolBar(QToolBar *tooBar) = 0;\npublic:\n    virtual void showPopup(QPoint *pos = 0) = 0;\n    virtual void hidePopup() = 0;\npublic:\n    virtual IQuickOpenMimeType *registerQuickOpenMimeType(const QString &sym) = 0;\nsignals:\n    void currentFilterChanged(IQuickOpen *filter);\n};\n\ninline IQuickOpenManager *getQuickOpenManager(LiteApi::IApplication* app)\n{\n    return LiteApi::findExtensionObject<IQuickOpenManager*>(app,\"LiteApi.IQuickOpenManager\");\n}\n\ninline IQuickOpenFolder *getQuickOpenFolder(LiteApi::IQuickOpenManager *mgr)\n{\n    return (IQuickOpenFolder*)mgr->findById(\"quickopen/folder\");\n}\n\ninline IQuickOpenFileSystem *getQuickOpenFileSystem(LiteApi::IQuickOpenManager *mgr)\n{\n    return (IQuickOpenFileSystem*)mgr->findById(\"quickopen/filesystem\");\n}\n\n\n} //namespace LiteApi\n\n\n#endif //QUICKOPENAPI_H\n\n"
  },
  {
    "path": "liteidex/src/api/quickopenapi/quickopenapi.pri",
    "content": "LIBS *= -l$$qtLibraryName(quickopenapi)\n\n\n\n"
  },
  {
    "path": "liteidex/src/api/quickopenapi/quickopenapi.pro",
    "content": "TARGET = quickopenapi\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude (../../liteideapi.pri)\ninclude (../liteapi/liteapi.pri)\n\nHEADERS += quickopenapi.h\n"
  },
  {
    "path": "liteidex/src/api/terminalapi/terminalapi.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2020 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: terminalapi.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef TERMINALAPI_H\n#define TERMINALAPI_H\n\n#include \"liteapi/liteapi.h\"\n\nclass QTreeView;\nclass QLineEdit;\nnamespace LiteApi {\n\nclass ITerminal : public QObject\n{\n    Q_OBJECT\npublic:\n    ITerminal(QObject *parent = 0) : QObject(parent) {}\n    virtual void openDefaultTerminal(const QString &workDir) = 0;\n};\n\ninline ITerminal* getTerminalManager(LiteApi::IApplication *app)\n{\n    return LiteApi::findExtensionObject<ITerminal*>(app,\"LiteApi.ITerminal\");\n}\n\n} //namespace LiteApi\n\n\n#endif //TERMINALAPI_H\n\n"
  },
  {
    "path": "liteidex/src/api/terminalapi/terminalapi.pri",
    "content": "LIBS *= -l$$qtLibraryName(terminalapi)\n\n\n\n"
  },
  {
    "path": "liteidex/src/api/terminalapi/terminalapi.pro",
    "content": "TARGET = terminalapi\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude (../../liteideapi.pri)\ninclude (../liteapi/liteapi.pri)\n\nHEADERS += terminalapi.h\n"
  },
  {
    "path": "liteidex/src/libgopher/libgopher.go",
    "content": "package main\n\n/*\n//flag: 1 stdout, 2 stderr, 0 finished\ntypedef struct {char *data; int size;} TString;\ntypedef int (*CB)(void *ctx, int flag, char *data, int size);\nstatic int WriteContext(void *ctx, void *cb, int flag, char *data, int size)\n{\n\treturn ((CB)cb)(ctx,flag,data,size);\n}\n\n#include <stdlib.h>\n*/\nimport \"C\"\n\nimport (\n\t\"bytes\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n\t\"unsafe\"\n\n\t\"github.com/visualfc/gotools/astview\"\n\t\"github.com/visualfc/gotools/buildctx\"\n\t\"github.com/visualfc/gotools/command\"\n\t\"github.com/visualfc/gotools/docview\"\n\t\"github.com/visualfc/gotools/finddoc\"\n\t\"github.com/visualfc/gotools/gofmt\"\n\t\"github.com/visualfc/gotools/gopresent\"\n\t\"github.com/visualfc/gotools/jsonfmt\"\n\t\"github.com/visualfc/gotools/pkgs\"\n\t\"github.com/visualfc/gotools/runcmd\"\n\t\"github.com/visualfc/gotools/types\"\n)\n\ntype Context struct {\n\tctx  unsafe.Pointer\n\tcb   unsafe.Pointer\n\tflag C.int\n}\n\nfunc (c *Context) Write(data []byte) (n int, err error) {\n\tcdata := C.CBytes(data)\n\tdefer C.free(unsafe.Pointer(cdata))\n\treturn int(C.WriteContext(c.ctx, c.cb, c.flag, (*C.char)(cdata), C.int(len(data)))), nil\n}\n\nfunc (c *Context) Finished(err error) {\n\tif err == nil {\n\t\tC.WriteContext(c.ctx, c.cb, 0, nil, 0)\n\t\treturn\n\t}\n\ts := err.Error()\n\tif s == \"\" {\n\t\ts = \"unknown error\"\n\t}\n\tcdata := C.CString(s)\n\tdefer C.free(unsafe.Pointer(cdata))\n\tC.WriteContext(c.ctx, c.cb, 0, cdata, C.int(len(s)))\n}\n\nvar (\n\tbuildEnv = make(map[string]string)\n)\n\n//export Setenv\nfunc Setenv(ck *C.TString, cv *C.TString) {\n\tos.Setenv(C.GoStringN(ck.data, ck.size), C.GoStringN(ck.data, ck.size))\n}\n\n//export SetBuildEnv\nfunc SetBuildEnv(ck *C.TString, cv *C.TString) {\n\tkey := C.GoStringN(ck.data, ck.size)\n\tvalue := C.GoStringN(cv.data, cv.size)\n\tbuildEnv[key] = value\n}\n\n//export ClearBuildEnv\nfunc ClearBuildEnv() {\n\tbuildEnv = make(map[string]string)\n}\n\nfunc init() {\n\tbuildctx.SetLookupEnv(func(key string) (string, bool) {\n\t\tr, ok := buildEnv[key]\n\t\treturn r, ok\n\t})\n}\n\n//export InvokeAsync\nfunc InvokeAsync(cid *C.TString, cargs *C.TString, csep *C.TString, csin *C.TString, ctx unsafe.Pointer, cb unsafe.Pointer) {\n\tid := C.GoStringN(cid.data, cid.size)\n\targs := C.GoStringN(cargs.data, cargs.size)\n\tsep := C.GoStringN(csep.data, csep.size)\n\tsin := C.GoStringN(csin.data, csin.size)\n\tgo func(id string, args string, sep string, sin string) {\n\t\tstdout := &Context{ctx, cb, 1}\n\t\tstderr := &Context{ctx, cb, 2}\n\t\terr := InvokeHelper(id, args, sep, bytes.NewBufferString(sin), stdout, stderr)\n\t\tstdout.Finished(err)\n\t}(id, args, sep, sin)\n}\n\n//export Invoke\nfunc Invoke(id string, args string, sep string, sin string, sout *string, serr *string) int32 {\n\tvar err error\n\tvar stdout bytes.Buffer\n\tvar stderr bytes.Buffer\n\terr = InvokeHelper(id, args, sep, bytes.NewBufferString(sin), &stdout, &stderr)\n\t*sout = stdout.String()\n\t*serr = stderr.String()\n\tif err != nil {\n\t\t*serr = err.Error()\n\t\treturn -1\n\t}\n\treturn 0\n}\n\nfunc InvokeCommand(id string, args string, sep string, stdin string) (sout string, serr string, err error) {\n\tvar stdout bytes.Buffer\n\tvar stderr bytes.Buffer\n\terr = InvokeHelper(id, args, sep, bytes.NewBufferString(stdin), &stdout, &stderr)\n\tsout = stdout.String()\n\tserr = stderr.String()\n\treturn\n}\n\nfunc InvokeHelper(id string, args string, sep string, stdin io.Reader, stdout io.Writer, stderr io.Writer) error {\n\tfor _, cmd := range command.CommandList() {\n\t\tif cmd == string(id) {\n\t\t\tvar arguments []string\n\t\t\targuments = append(arguments, id)\n\t\t\tif len(args) > 0 {\n\t\t\t\tif sep == \"\" {\n\t\t\t\t\tsep = \" \"\n\t\t\t\t}\n\t\t\t\tfor _, opt := range strings.Split(args, sep) {\n\t\t\t\t\tif len(opt) > 0 {\n\t\t\t\t\t\targuments = append(arguments, opt)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\terr := command.RunArgs(arguments,\n\t\t\t\tstdin,\n\t\t\t\tstdout,\n\t\t\t\tstderr,\n\t\t\t)\n\t\t\treturn err\n\t\t}\n\t}\n\treturn os.ErrInvalid\n}\n\nfunc init() {\n\tcommand.Register(types.Command)\n\tcommand.Register(jsonfmt.Command)\n\tcommand.Register(finddoc.Command)\n\tcommand.Register(runcmd.Command)\n\tcommand.Register(docview.Command)\n\tcommand.Register(astview.Command)\n\tcommand.Register(gofmt.Command)\n\tcommand.Register(gopresent.Command)\n\tcommand.Register(pkgs.Command)\n}\n\nfunc main() {}\n"
  },
  {
    "path": "liteidex/src/license_update.lua",
    "content": "local tmp = \"/tmp\"\nlocal sep = \"/\"\nlocal upper = \"..\"\n\nrequire\"lfs\"\nprint (\"license update\")\n\nlocal license = [[\n/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2020 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n]]\n\nlocal info = [[\n// Module: $FILENAME\n// Creator: $ANCHOR $EMAIL\n\n]]\n\nfunction update_head(file,name)\n\tlocal f = io.open(file,\"r\")\n\tif f == nil then return end\n\tlocal data = f:read(\"*all\")\n\tf:close()\n\tlocal i0 = string.find(data,\"Module:\")\n\tlocal i1 = string.find(data,\"Creator:\")\n\tif i0 ~= nil and i1 ~= nil then\n\t\tprint(\"skip\",file)\n\t\treturn\n\tend\n\tlocal i = string.find(data,\"#\")\n\tif i == nil then\n\t\ti = 1\n\tend\n\tf = io.open(file,\"w\")\n\tif f == nil then return end\n\tlocal w_info = string.gsub(info,\"$FILENAME\",name)\n\tw_info = string.gsub(w_info,\"$ANCHOR\",\"visualfc\")\n\tw_info = string.gsub(w_info,\"$EMAIL\",\"<visualfc@gmail.com>\")\n\tf:write(license..w_info..string.sub(data,i,#data))\n\tf:close()\n\tprint(file)\nend\n\nfunction process_file(file,name)\n\tlocal ext = string.match(file,\"%.%w+$\")\n\tif  ext == \".h\" or ext == \".cpp\" then\n\t\tupdate_head(file,name)\n\tend\nend\n\nfunction attrdir (path)\n\tfor file in lfs.dir(path) do\n\t\tif file ~= \".\" and file ~= \"..\" then\n\t\t\tlocal f = path..sep..file\n\t\t\tlocal attr = lfs.attributes (f)\n\t\t\tassert (type(attr) == \"table\")\n\t\t\tif attr.mode == \"directory\" then\n\t\t\t\tattrdir (f)\n\t\t\telse\n\t\t\t\tprocess_file(f,file)\n\t\t\tend\n\t\tend\n\tend\nend\n\nattrdir(\"./liteapp\")\nattrdir(\"./plugins\")\nattrdir(\"./utils\")\nattrdir(\"./api\")\n"
  },
  {
    "path": "liteidex/src/liteapp/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>NSPrincipalClass</key>\n\t\t<string>NSApplication</string>\n\t<key>NSHighResolutionCapable</key>\n\t\t<string>True</string>\n\t<key>NSHumanReadableCopyright</key>\n\t\t<string>Copyright © 2011-2025 visualfc. All rights reserved.</string>\n\t<key>CFBundleIconFile</key>\n\t\t<string>liteide.icns</string>\n\t<key>CFBundlePackageType</key>\n\t\t<string>APPL</string>\n\t<key>CFBundleSignature</key>\n\t\t<string>????</string>\n\t<key>CFBundleExecutable</key>\n\t\t<string>LiteIDE</string>\n\t<key>CFBundleIdentifier</key>\n\t\t<string>com.visualfc.liteide</string>\n\t<key>CFBundleVersion</key>\n\t\t<string>X38</string>\n\t<key>CFBundleShortVersionString</key>\n\t\t<string>38.4</string>\n        <key>CFBundleDocumentTypes</key>\n        <array>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>h</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>c.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>C header file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>c</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>c.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>C source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>gitattributes</string>\n                            <string>gitconfig</string>\n                            <string>gitignore</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>config.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Git configuration file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>asp</string>\n                            <string>aspx</string>\n                            <string>cshtml</string>\n                            <string>jshtm</string>\n                            <string>jsp</string>\n                            <string>phtml</string>\n                            <string>shtml</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>html.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>HTML template document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>bat</string>\n                            <string>cmd</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>bat.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Windows command script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>bowerrc</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Bower.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Bower document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>config</string>\n                            <string>editorconfig</string>\n                            <string>ini</string>\n                            <string>cfg</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>config.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Configuration file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>hh</string>\n                            <string>hpp</string>\n                            <string>hxx</string>\n                            <string>h++</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>cpp.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>C++ header file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>cc</string>\n                            <string>cpp</string>\n                            <string>cxx</string>\n                            <string>c++</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>cpp.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>C++ source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>m</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Objective-C source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>mm</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>cpp.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Objective-C++ source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>cs</string>\n                            <string>csx</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>csharp.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>C# source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>css</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>css.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>CSS</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>go</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>go.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Go source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>htm</string>\n                            <string>html</string>\n                            <string>xhtml</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>HTML.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>HTML document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>jade</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Jade.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Jade document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>jav</string>\n                            <string>java</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Java.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Java document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>js</string>\n                            <string>jscsrc</string>\n                            <string>jshintrc</string>\n                            <string>mjs</string>\n                            <string>cjs</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Javascript.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Javascript file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>json</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>JSON.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>JSON document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>less</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Less.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Less document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>markdown</string>\n                            <string>md</string>\n                            <string>mdoc</string>\n                            <string>mdown</string>\n                            <string>mdtext</string>\n                            <string>mdtxt</string>\n                            <string>mdwn</string>\n                            <string>mkd</string>\n                            <string>mkdn</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Markdown.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Markdown document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>php</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>PHP.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>PHP source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>ps1</string>\n                            <string>psd1</string>\n                            <string>psm1</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Powershell.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Powershell script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>py</string>\n                            <string>pyi</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Python.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Python script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>gemspec</string>\n                            <string>rb</string>\n                            <string>erb</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Ruby.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Ruby source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>scss</string>\n                            <string>sass</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>SASS.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>SASS file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>sql</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>SQL.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>SQL script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>ts</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>TypeScript.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>TypeScript file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>tsx</string>\n                            <string>jsx</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>React.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>React source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>vue</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Vue.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Vue source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>ascx</string>\n                            <string>csproj</string>\n                            <string>dtd</string>\n                            <string>plist</string>\n                            <string>wxi</string>\n                            <string>wxl</string>\n                            <string>wxs</string>\n                            <string>xml</string>\n                            <string>xaml</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>XML.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>XML document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>eyaml</string>\n                            <string>eyml</string>\n                            <string>yaml</string>\n                            <string>yml</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>YAML.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>YAML document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>bash</string>\n                            <string>bash_login</string>\n                            <string>bash_logout</string>\n                            <string>bash_profile</string>\n                            <string>bashrc</string>\n                            <string>profile</string>\n                            <string>rhistory</string>\n                            <string>rprofile</string>\n                            <string>sh</string>\n                            <string>zlogin</string>\n                            <string>zlogout</string>\n                            <string>zprofile</string>\n                            <string>zsh</string>\n                            <string>zshenv</string>\n                            <string>zshrc</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Shell.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Shell script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>clj</string>\n                            <string>cljs</string>\n                            <string>cljx</string>\n                            <string>clojure</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Clojure source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>code-workspace</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>VS Code workspace file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>coffee</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>CoffeeScript source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>csv</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Comma Separated Values</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>cmake</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>CMake script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>dart</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Dart script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>diff</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Diff file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>dockerfile</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Dockerfile</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>gradle</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Gradle file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>groovy</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Groovy script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>makefile</string>\n                            <string>mk</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Makefile</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>lua</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Lua script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>pug</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Pug document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>ipynb</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Jupyter</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>lock</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Lockfile</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>log</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Log file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>txt</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Plain Text File</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>xcodeproj</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Xcode project file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>xcworkspace</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Xcode workspace file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>vb</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Visual Basic script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>r</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>R source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>rs</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Rust source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>rst</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Restructured Text document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>tex</string>\n                            <string>cls</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>LaTeX document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>fs</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>F# source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>fsi</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>F# signature file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>fsx</string>\n                            <string>fsscript</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>F# script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>svg</string>\n                            <string>svgz</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>SVG document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>toml</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>TOML document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>swift</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Swift source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>containerfile</string>\n                            <string>ctp</string>\n                            <string>dot</string>\n                            <string>edn</string>\n                            <string>handlebars</string>\n                            <string>hbs</string>\n                            <string>ml</string>\n                            <string>mli</string>\n                            <string>pl</string>\n                            <string>pl6</string>\n                            <string>pm</string>\n                            <string>pm6</string>\n                            <string>pod</string>\n                            <string>pp</string>\n                            <string>properties</string>\n                            <string>psgi</string>\n                            <string>rt</string>\n                            <string>t</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Visual Studio Code document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array/>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Folder</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n                    <key>LSItemContentTypes</key>\n                    <array>\n                            <string>public.folder</string>\n                    </array>\n            </dict>\n        </array>\n</dict>\n</plist>\n"
  },
  {
    "path": "liteidex/src/liteapp/aboutdialog.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: aboutdialog.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"aboutdialog.h\"\n#include \"ui_aboutdialog.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nAboutDialog::AboutDialog(LiteApi::IApplication *app,QWidget *parent) :\n    QDialog(parent),\n    ui(new Ui::AboutDialog)\n{\n    ui->setupUi(this);\n    ui->verLabel->setText(app->ideVersion());\n    ui->qtVerLabel->setText(QString(tr(\"Based on Qt %1 (%2 bit)\")).arg(QLatin1String(qVersion())).\n                            arg(QString::number(QSysInfo::WordSize)));\n}\n\nAboutDialog::~AboutDialog()\n{\n    delete ui;\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/aboutdialog.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: aboutdialog.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef ABOUTDIALOG_H\n#define ABOUTDIALOG_H\n\n#include <QDialog>\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class AboutDialog;\n}\n\nclass AboutDialog : public QDialog\n{\n    Q_OBJECT\npublic:\n    explicit AboutDialog(LiteApi::IApplication *app, QWidget *parent = 0);\n    ~AboutDialog();\nprivate:\n    Ui::AboutDialog *ui;\n};\n\n#endif // ABOUTDIALOG_H\n"
  },
  {
    "path": "liteidex/src/liteapp/aboutdialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>AboutDialog</class>\n <widget class=\"QDialog\" name=\"AboutDialog\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>552</width>\n    <height>468</height>\n   </rect>\n  </property>\n  <property name=\"sizePolicy\">\n   <sizepolicy hsizetype=\"Preferred\" vsizetype=\"Preferred\">\n    <horstretch>0</horstretch>\n    <verstretch>0</verstretch>\n   </sizepolicy>\n  </property>\n  <property name=\"windowTitle\">\n   <string>About LiteIDE</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_8\">\n   <item>\n    <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\" stretch=\"0,1,0\">\n     <property name=\"spacing\">\n      <number>0</number>\n     </property>\n     <item>\n      <widget class=\"QLabel\" name=\"label_2\">\n       <property name=\"text\">\n        <string/>\n       </property>\n       <property name=\"pixmap\">\n        <pixmap resource=\"liteapp.qrc\">:/images/liteide-logo64.png</pixmap>\n       </property>\n       <property name=\"alignment\">\n        <set>Qt::AlignCenter</set>\n       </property>\n      </widget>\n     </item>\n     <item>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout\" stretch=\"3,1,1\">\n       <item>\n        <widget class=\"QLabel\" name=\"label\">\n         <property name=\"text\">\n          <string notr=\"true\">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;\n&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;\np, li { white-space: pre-wrap; }\n&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:24pt; font-weight:600; font-style:italic;&quot;&gt;LiteIDE X&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>\n         </property>\n         <property name=\"alignment\">\n          <set>Qt::AlignCenter</set>\n         </property>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QLabel\" name=\"label_5\">\n         <property name=\"text\">\n          <string notr=\"true\">Simple Cross Platform Open Source IDE</string>\n         </property>\n         <property name=\"alignment\">\n          <set>Qt::AlignCenter</set>\n         </property>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QLabel\" name=\"label_9\">\n         <property name=\"text\">\n          <string notr=\"true\">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;2011-2023 (c) visualfc &amp;lt;visualfc@gmail.com&amp;gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>\n         </property>\n         <property name=\"alignment\">\n          <set>Qt::AlignCenter</set>\n         </property>\n        </widget>\n       </item>\n      </layout>\n     </item>\n     <item>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_6\">\n       <property name=\"spacing\">\n        <number>0</number>\n       </property>\n       <property name=\"sizeConstraint\">\n        <enum>QLayout::SetMinimumSize</enum>\n       </property>\n       <item>\n        <widget class=\"QLabel\" name=\"label_11\">\n         <property name=\"sizePolicy\">\n          <sizepolicy hsizetype=\"Preferred\" vsizetype=\"Preferred\">\n           <horstretch>0</horstretch>\n           <verstretch>0</verstretch>\n          </sizepolicy>\n         </property>\n         <property name=\"text\">\n          <string/>\n         </property>\n         <property name=\"pixmap\">\n          <pixmap resource=\"liteapp.qrc\">:/images/logo/space.png</pixmap>\n         </property>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QLabel\" name=\"label_31\">\n         <property name=\"text\">\n          <string/>\n         </property>\n         <property name=\"pixmap\">\n          <pixmap resource=\"liteapp.qrc\">:/images/logo/li.png</pixmap>\n         </property>\n         <property name=\"alignment\">\n          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>\n         </property>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QLabel\" name=\"label_27\">\n         <property name=\"text\">\n          <string/>\n         </property>\n         <property name=\"pixmap\">\n          <pixmap resource=\"liteapp.qrc\">:/images/logo/dui.png</pixmap>\n         </property>\n         <property name=\"alignment\">\n          <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>\n         </property>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QLabel\" name=\"label_32\">\n         <property name=\"text\">\n          <string/>\n         </property>\n         <property name=\"pixmap\">\n          <pixmap resource=\"liteapp.qrc\">:/images/logo/space.png</pixmap>\n         </property>\n        </widget>\n       </item>\n      </layout>\n     </item>\n    </layout>\n   </item>\n   <item>\n    <widget class=\"QTabWidget\" name=\"tabWidget\">\n     <property name=\"sizePolicy\">\n      <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Preferred\">\n       <horstretch>0</horstretch>\n       <verstretch>0</verstretch>\n      </sizepolicy>\n     </property>\n     <property name=\"currentIndex\">\n      <number>0</number>\n     </property>\n     <widget class=\"QWidget\" name=\"tab_5\">\n      <attribute name=\"title\">\n       <string>Information</string>\n      </attribute>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_7\">\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox_4\">\n         <property name=\"title\">\n          <string>Welcome:</string>\n         </property>\n         <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n          <item>\n           <widget class=\"QLabel\" name=\"label_4\">\n            <property name=\"text\">\n             <string>Welcome to LiteIDE X! LiteIDE is a simple, open source, cross-platform IDE.</string>\n            </property>\n           </widget>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox_5\">\n         <property name=\"title\">\n          <string>Project:</string>\n         </property>\n         <layout class=\"QGridLayout\" name=\"gridLayout_4\">\n          <item row=\"0\" column=\"1\">\n           <widget class=\"QLabel\" name=\"label_8\">\n            <property name=\"text\">\n             <string notr=\"true\">LiteIDE X</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"4\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_13\">\n            <property name=\"text\">\n             <string>Author:</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"5\" column=\"1\">\n           <widget class=\"QLabel\" name=\"label_18\">\n            <property name=\"text\">\n             <string notr=\"true\">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/visualfc/liteide&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;https://github.com/visualfc/liteide&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>\n            </property>\n            <property name=\"openExternalLinks\">\n             <bool>true</bool>\n            </property>\n           </widget>\n          </item>\n          <item row=\"0\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_12\">\n            <property name=\"text\">\n             <string>Name:</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"3\" column=\"1\">\n           <widget class=\"QLabel\" name=\"qtVerLabel\">\n            <property name=\"text\">\n             <string>Based on Qt</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"2\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_15\">\n            <property name=\"text\">\n             <string>Version:</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"4\" column=\"1\">\n           <widget class=\"QLabel\" name=\"label_14\">\n            <property name=\"text\">\n             <string notr=\"true\">visualfc@gmail.com</string>\n            </property>\n            <property name=\"textFormat\">\n             <enum>Qt::AutoText</enum>\n            </property>\n            <property name=\"openExternalLinks\">\n             <bool>false</bool>\n            </property>\n           </widget>\n          </item>\n          <item row=\"3\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_39\">\n            <property name=\"text\">\n             <string>Build:</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"5\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_17\">\n            <property name=\"text\">\n             <string>Source Code:</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"2\" column=\"1\">\n           <widget class=\"QLabel\" name=\"verLabel\">\n            <property name=\"text\">\n             <string notr=\"true\">X64</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"6\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_40\">\n            <property name=\"text\">\n             <string>Support LiteIDE:</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"6\" column=\"1\">\n           <widget class=\"QLabel\" name=\"label_41\">\n            <property name=\"text\">\n             <string notr=\"true\">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;http://visualfc.github.com/support&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;https://visualfc.github.com/support&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>\n            </property>\n            <property name=\"openExternalLinks\">\n             <bool>true</bool>\n            </property>\n           </widget>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <spacer name=\"verticalSpacer_2\">\n         <property name=\"orientation\">\n          <enum>Qt::Vertical</enum>\n         </property>\n         <property name=\"sizeHint\" stdset=\"0\">\n          <size>\n           <width>20</width>\n           <height>40</height>\n          </size>\n         </property>\n        </spacer>\n       </item>\n      </layout>\n     </widget>\n     <widget class=\"QWidget\" name=\"tab_6\">\n      <attribute name=\"title\">\n       <string>Developers</string>\n      </attribute>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_5\">\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox\">\n         <property name=\"title\">\n          <string notr=\"true\">LiteIDE X</string>\n         </property>\n         <layout class=\"QGridLayout\" name=\"gridLayout\">\n          <item row=\"0\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_6\">\n            <property name=\"text\">\n             <string notr=\"true\">Developer</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"0\" column=\"1\">\n           <widget class=\"QLabel\" name=\"label_19\">\n            <property name=\"text\">\n             <string notr=\"true\">visualfc &lt;visualfc@gmail.com&gt;</string>\n            </property>\n           </widget>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox_2\">\n         <property name=\"title\">\n          <string notr=\"true\">LiteIDE 0.1.2-0.2.1</string>\n         </property>\n         <layout class=\"QGridLayout\" name=\"gridLayout_2\">\n          <item row=\"0\" column=\"1\">\n           <widget class=\"QLabel\" name=\"label_22\">\n            <property name=\"text\">\n             <string notr=\"true\">visualfc &lt;visualfc@gmail.com&gt;</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"0\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_21\">\n            <property name=\"text\">\n             <string notr=\"true\">Developer</string>\n            </property>\n           </widget>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox_3\">\n         <property name=\"title\">\n          <string notr=\"true\">LiteIDE 0.1</string>\n         </property>\n         <layout class=\"QGridLayout\" name=\"gridLayout_3\">\n          <item row=\"0\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_24\">\n            <property name=\"text\">\n             <string notr=\"true\">Developer</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"0\" column=\"1\">\n           <widget class=\"QLabel\" name=\"label_25\">\n            <property name=\"text\">\n             <string notr=\"true\">visualfc &lt;visualfc@gmail.com&gt;</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"1\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_28\">\n            <property name=\"text\">\n             <string notr=\"true\">Developer</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"1\" column=\"1\">\n           <widget class=\"QLabel\" name=\"label_29\">\n            <property name=\"text\">\n             <string notr=\"true\">xushiwei &lt;xushiweizh@gmail.com&gt;</string>\n            </property>\n           </widget>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <spacer name=\"verticalSpacer_3\">\n         <property name=\"orientation\">\n          <enum>Qt::Vertical</enum>\n         </property>\n         <property name=\"sizeHint\" stdset=\"0\">\n          <size>\n           <width>20</width>\n           <height>40</height>\n          </size>\n         </property>\n        </spacer>\n       </item>\n      </layout>\n     </widget>\n     <widget class=\"QWidget\" name=\"tab_3\">\n      <attribute name=\"title\">\n       <string>Translations</string>\n      </attribute>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_9\">\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox_6\">\n         <property name=\"title\">\n          <string notr=\"true\">LiteIDE X</string>\n         </property>\n         <layout class=\"QGridLayout\" name=\"gridLayout_5\">\n          <item row=\"0\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_10\">\n            <property name=\"text\">\n             <string>Chinese</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"0\" column=\"1\">\n           <widget class=\"QLabel\" name=\"label_33\">\n            <property name=\"text\">\n             <string notr=\"true\">visualfc &lt;visualfc@gmail.com&gt;</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"2\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_34\">\n            <property name=\"text\">\n             <string>Japanese</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"2\" column=\"1\">\n           <widget class=\"QLabel\" name=\"label_35\">\n            <property name=\"text\">\n             <string notr=\"true\">mattn &lt;mattn.jp@gmail.com&gt;</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"3\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_36\">\n            <property name=\"text\">\n             <string>Russian</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"3\" column=\"1\">\n           <widget class=\"QLabel\" name=\"label_37\">\n            <property name=\"text\">\n             <string notr=\"true\">Lockals &lt;lockalsash@gmail.com&gt;</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"4\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_3\">\n            <property name=\"text\">\n             <string>French</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"4\" column=\"1\">\n           <widget class=\"QLabel\" name=\"label_20\">\n            <property name=\"text\">\n             <string notr=\"true\">TomBoss &lt;tomboss@gmx.com&gt;</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"1\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_23\">\n            <property name=\"text\">\n             <string>Traditional Chinese</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"1\" column=\"1\">\n           <widget class=\"QLabel\" name=\"label_26\">\n            <property name=\"text\">\n             <string notr=\"true\">Timothy Lin &lt;zh9102@gmail.com&gt;</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"5\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_16\">\n            <property name=\"text\">\n             <string>German</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"5\" column=\"1\">\n           <widget class=\"QLabel\" name=\"label_38\">\n            <property name=\"text\">\n             <string notr=\"true\">Helge Plaschke &lt;github.com/HelgePlaschke&gt;</string>\n            </property>\n            <property name=\"textFormat\">\n             <enum>Qt::AutoText</enum>\n            </property>\n           </widget>\n          </item>\n          <item row=\"6\" column=\"1\">\n           <widget class=\"QLabel\" name=\"label_30\">\n            <property name=\"text\">\n             <string notr=\"true\">Michael &lt;github.com/michael-k&gt;</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"7\" column=\"1\">\n           <widget class=\"QLabel\" name=\"label_42\">\n            <property name=\"text\">\n             <string notr=\"true\">Roman Shmelev &lt;rshmelev@gmail.com&gt;</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"7\" column=\"0\">\n           <widget class=\"QLabel\" name=\"label_43\">\n            <property name=\"text\">\n             <string>Ukrainian</string>\n            </property>\n           </widget>\n          </item>\n          <item row=\"8\" column=\"1\">\n           <widget class=\"QLabel\" name=\"labelTranslator_cl0ne\">\n            <property name=\"text\">\n             <string notr=\"true\">Vladislav Glinsky &lt;cl0ne@mithril.org.ua&gt;</string>\n            </property>\n           </widget>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <spacer name=\"verticalSpacer_5\">\n         <property name=\"orientation\">\n          <enum>Qt::Vertical</enum>\n         </property>\n         <property name=\"sizeHint\" stdset=\"0\">\n          <size>\n           <width>20</width>\n           <height>40</height>\n          </size>\n         </property>\n        </spacer>\n       </item>\n      </layout>\n     </widget>\n     <widget class=\"QWidget\" name=\"tab\">\n      <attribute name=\"title\">\n       <string>Thanks to...</string>\n      </attribute>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_3\">\n       <item>\n        <widget class=\"QTextBrowser\" name=\"textBrowser\">\n         <property name=\"html\">\n          <string notr=\"true\">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;\n&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;meta charset=&quot;utf-8&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;\np, li { white-space: pre-wrap; }\nhr { height: 1px; border-width: 0; }\nli.unchecked::marker { content: &quot;\\2610&quot;; }\nli.checked::marker { content: &quot;\\2612&quot;; }\n&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;All contributors that provided patches.&lt;/p&gt;\n&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The Go Project &amp;lt;http://golang.org&amp;gt;&lt;/p&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The Qt Project &amp;lt;https://qt-project.org&amp;gt;&lt;/p&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The QtCreator Project &amp;lt;https://qt-project.org&amp;gt;&lt;/p&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The Kate Project &amp;lt;http://kate-editor.org&amp;gt;&lt;/p&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The GNU Software Foundation &amp;lt;https://www.gnu.org&amp;gt;&lt;/p&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The CommonMark cmark library &amp;lt;https://github.com/commonmark/cmark&amp;gt;&lt;/p&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The Sundown project &amp;lt;https://github.com/vmg/sundown&amp;gt;&lt;/p&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The Markdown CSS files from Mou &amp;lt;http://mouapp.com&amp;gt;&lt;/p&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The Gocode tool &amp;lt;https://github.com/nsf/gocode&amp;gt;&lt;/p&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The libvterm project &amp;lt;https://github.com/neovim/libvterm&amp;gt;&lt;/p&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The ptyqt project &amp;lt;https://github.com/kafeg/ptyqt&amp;gt;&lt;/p&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The LiteIDE logo designed by BESD &amp;lt;http://www.besdlab.cn&amp;gt;&lt;/p&gt;\n&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Last, but not least, the open-source community.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>\n         </property>\n        </widget>\n       </item>\n      </layout>\n     </widget>\n     <widget class=\"QWidget\" name=\"tab_2\">\n      <attribute name=\"title\">\n       <string>License</string>\n      </attribute>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_10\">\n       <item>\n        <widget class=\"QTextBrowser\" name=\"textBrowser_2\">\n         <property name=\"html\">\n          <string notr=\"true\">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;\n&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;meta charset=&quot;utf-8&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;\np, li { white-space: pre-wrap; }\nhr { height: 1px; border-width: 0; }\nli.unchecked::marker { content: &quot;\\2610&quot;; }\nli.checked::marker { content: &quot;\\2612&quot;; }\n&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Copyright (c) 2011-2022 LiteIDE. All rights reserved.&lt;/p&gt;\n&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.&lt;/p&gt;\n&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This library 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 Lesser General Public License for more details.&lt;/p&gt;\n&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;\n&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;In addition, as a special exception, that plugins developed for LiteIDE, are allowed to remain closed sourced and can be distributed under any license .These rights are included in the file LGPL_EXCEPTION.txt in this package.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>\n         </property>\n        </widget>\n       </item>\n      </layout>\n     </widget>\n    </widget>\n   </item>\n   <item>\n    <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n     <item>\n      <spacer name=\"horizontalSpacer\">\n       <property name=\"orientation\">\n        <enum>Qt::Horizontal</enum>\n       </property>\n       <property name=\"sizeHint\" stdset=\"0\">\n        <size>\n         <width>40</width>\n         <height>20</height>\n        </size>\n       </property>\n      </spacer>\n     </item>\n     <item>\n      <widget class=\"QPushButton\" name=\"closeButton\">\n       <property name=\"text\">\n        <string>Close</string>\n       </property>\n      </widget>\n     </item>\n    </layout>\n   </item>\n  </layout>\n </widget>\n <resources>\n  <include location=\"liteapp.qrc\"/>\n </resources>\n <connections>\n  <connection>\n   <sender>closeButton</sender>\n   <signal>clicked()</signal>\n   <receiver>AboutDialog</receiver>\n   <slot>accept()</slot>\n   <hints>\n    <hint type=\"sourcelabel\">\n     <x>406</x>\n     <y>268</y>\n    </hint>\n    <hint type=\"destinationlabel\">\n     <x>232</x>\n     <y>147</y>\n    </hint>\n   </hints>\n  </connection>\n </connections>\n</ui>\n"
  },
  {
    "path": "liteidex/src/liteapp/actionmanager.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: actionmanager.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"actionmanager.h\"\n#include \"liteapp_global.h\"\n#include \"liteapi/liteids.h\"\n#include <QMenuBar>\n#include <QToolBar>\n#include <QAction>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nActionManager::ActionManager(QObject *parent) :\n    IActionManager(parent),\n    m_viewMenu(0),\n    m_baseToolBarAct(0),\n    m_baseBrowserAct(0)\n{\n}\n\nActionManager::~ActionManager()\n{\n    QMapIterator<QObject*,IActionContext*> it(m_objContextMap);\n    while(it.hasNext()) {\n        it.next();\n        delete it.value();\n    }\n}\n\nbool ActionManager::initWithApp(IApplication *app)\n{\n    if (!IActionManager::initWithApp(app)) {\n        return false;\n    }\n\n    insertMenu(ID_MENU_FILE,tr(\"&File\"));\n    insertMenu(ID_MENU_RECENT,tr(\"&Recent\"));\n    insertMenu(ID_MENU_EDIT,tr(\"&Edit\"));\n    insertMenu(ID_MENU_FIND,tr(\"F&ind\"));\n    m_viewMenu = insertMenu(ID_MENU_VIEW,tr(\"&View\"));\n    m_viewMenu->addSeparator();\n    m_baseToolBarAct = m_viewMenu->addSeparator();\n    m_baseBrowserAct = m_viewMenu->addSeparator();\n    m_viewMenu->addSeparator();\n    insertMenu(ID_MENU_TOOLS,tr(\"&Tools\"));\n    insertMenu(ID_MENU_BUILD,tr(\"&Build\"));\n    insertMenu(ID_MENU_DEBUG,tr(\"&Debug\"));\n    insertMenu(ID_MENU_HELP,tr(\"&Help\"));\n\n    QToolBar *stdToolBar = insertToolBar(ID_TOOLBAR_STD,tr(\"Standard Toolbar\"));\n\n    insertViewMenu(LiteApi::ViewMenuToolBarPos,stdToolBar->toggleViewAction());\n\n    return true;\n}\n\nQMenu *ActionManager::insertMenu(const QString &id, const QString &title, const QString &idBefore)\n{    \n    QMenu *menu = m_idMenuMap.value(id);\n    if (menu) {\n        return menu;\n    }\n    menu = new QMenu(title,m_liteApp->mainWindow());\n    menu->setObjectName(id);\n    QMenu *m = 0;\n    if (!idBefore.isEmpty()) {\n        m = m_idMenuMap.value(idBefore);\n    }\n    if (m) {\n        m_liteApp->mainWindow()->menuBar()->insertMenu(m->menuAction(),menu);\n    } else {\n        m_liteApp->mainWindow()->menuBar()->addAction(menu->menuAction());\n    }\n    m_idMenuMap.insert(id,menu);\n    return menu;\n}\n\nvoid ActionManager::removeMenu(QMenu *menu)\n{\n    if (!menu) {\n        return;\n    }\n    QString id = m_idMenuMap.key(menu);\n    if (!id.isEmpty()) {\n        m_idMenuMap.remove(id);\n    }\n    m_liteApp->mainWindow()->menuBar()->removeAction(menu->menuAction());\n}\n\nQList<QString> ActionManager::menuList() const\n{\n    return m_idMenuMap.keys();\n}\n\nQMenu *ActionManager::loadMenu(const QString &id)\n{\n    return m_idMenuMap.value(id);\n}\n\nQToolBar *ActionManager::insertToolBar(const QString &id, const QString &title, const QString &idBefore)\n{\n    QToolBar *toolBar = m_idToolBarMap.value(id);\n    if (toolBar) {\n        return toolBar;\n    }\n    toolBar = new QToolBar(title, m_liteApp->mainWindow());\n    toolBar->setObjectName(id);\n    toolBar->setIconSize(LiteApi::getToolBarIconSize(m_liteApp));\n\n    QToolBar *m = 0;\n    if (!idBefore.isEmpty()) {\n        m = m_idToolBarMap.value(idBefore);\n    }\n    if (m) {\n        m_liteApp->mainWindow()->insertToolBar(m,toolBar);\n    } else {\n        m_liteApp->mainWindow()->addToolBar(toolBar);\n    }\n    m_idToolBarMap.insert(id,toolBar);\n\n    return toolBar;\n}\n\nvoid ActionManager::insertToolBar(QToolBar *toolBar, const QString &idBefore)\n{\n    QString id = toolBar->objectName();\n\n    toolBar->setIconSize(LiteApi::getToolBarIconSize(m_liteApp));\n\n    QToolBar *m = 0;\n    if (!idBefore.isEmpty()) {\n        m = m_idToolBarMap.value(idBefore);\n    }\n    if (m) {\n        m_liteApp->mainWindow()->insertToolBar(m,toolBar);\n    } else {\n        m_liteApp->mainWindow()->addToolBar(toolBar);\n    }\n    m_idToolBarMap.insert(id,toolBar);\n}\n\nQToolBar *ActionManager::loadToolBar(const QString &id)\n{\n    return m_idToolBarMap.value(id);\n}\n\nQList<QString> ActionManager::toolBarList() const\n{\n    return m_idToolBarMap.keys();\n}\n\nvoid ActionManager::removeToolBar(QToolBar* toolBar)\n{\n    if (!toolBar) {\n        return;\n    }\n    QString id = m_idToolBarMap.key(toolBar);\n    if (!id.isEmpty()) {\n        m_idToolBarMap.remove(id);\n    }\n    m_liteApp->mainWindow()->removeToolBar(toolBar);\n}\n\nvoid ActionManager::insertViewMenu(VIEWMENU_ACTION_POS pos, QAction *act)\n{\n    if (pos == ViewMenuToolBarPos) {\n        m_viewMenu->insertAction(m_baseToolBarAct,act);\n    } else if(pos == ViewMenuBrowserPos){\n        m_viewMenu->insertAction(m_baseBrowserAct,act);\n    } else {\n        m_viewMenu->addAction(act);\n    }\n}\n\nvoid ActionManager::setViewMenuSeparator(const QString &sepid, bool group)\n{\n    if (sepid.isEmpty()) {\n        return;\n    }\n    if (m_idSeperatorMap.contains(sepid)) {\n        return;\n    }\n    if (group) {\n        m_viewMenu->addSeparator();\n    }\n    QAction *sep = m_viewMenu->addSeparator();\n    m_idSeperatorMap.insert(sepid,sep);\n}\n\nbool ActionManager::insertMenuActions(const QString &idMenu, const QString &idBeforeSep, bool newGroup,  QList<QAction*> &actions)\n{\n    if (idMenu.isEmpty()) {\n        return false;\n    }\n    QMenu *menu = loadMenu(idMenu);\n    if (!menu) {\n        return false;\n    }\n    if (newGroup) {\n        QMenu *realMenu = menu->menuAction()->menu();\n        if (realMenu) {\n            if (!realMenu->actions().isEmpty() && !realMenu->actions().last()->isSeparator()) {\n                menu->addSeparator();\n            }\n        } else {\n            menu->addSeparator();\n        }\n    }\n    QAction *sep = 0;\n    if (!idBeforeSep.isEmpty()) {\n        sep = m_idMenuSepMap[idMenu][idBeforeSep];\n        if (!sep) {\n            sep = menu->addSeparator();\n            m_idMenuSepMap[idMenu].insert(idBeforeSep,sep);\n        }\n    }\n    foreach (QAction *act, actions) {\n        menu->insertAction(sep,act);\n    }\n    return true;\n}\n\nvoid ActionManager::insertViewMenuAction(QAction *act, const QString &sepid)\n{\n    QAction *sep = m_idSeperatorMap[sepid];\n    m_viewMenu->insertAction(sep,act);\n}\n\nIActionContext *ActionManager::getActionContext(QObject *obj, const QString &name)\n{\n    IActionContext *context = m_objContextMap.value(obj);\n    if (!context) {\n        context = new ActionContext(m_liteApp,name);\n        connect(obj,SIGNAL(destroyed(QObject*)),this,SLOT(removeActionContext(QObject*)));\n        m_objContextMap.insert(obj,context);\n    }\n    return context;\n}\n\nQStringList ActionManager::actionKeys() const\n{\n    QStringList keys;\n    QMapIterator<QObject*,IActionContext*> it(m_objContextMap);\n    while(it.hasNext()) {\n        it.next();\n        keys.append(it.value()->actionKeys());\n    }\n    keys.removeDuplicates();\n    return keys;\n}\n\nActionInfo *ActionManager::actionInfo(const QString &id) const\n{\n    QMapIterator<QObject*,IActionContext*> it(m_objContextMap);\n    while (it.hasNext()) {\n        it.next();\n        ActionInfo *info = it.value()->actionInfo(id);\n        if (info) {\n            return info;\n        }\n    }\n    return 0;\n}\n\nQList<QKeySequence> ActionManager::toShortcuts(const QString &ks)\n{\n    QString keyseq = ks;\n    QString part;\n    int p = 0, diff = 0;\n\n    QList<QKeySequence> keys;\n    while (keyseq.length()) {\n        // We MUST use something to separate each sequence, and space\n        // does not cut it, since some of the key names have space\n        // in them.. (Let's hope no one translate with a comma in it:)\n        p = keyseq.indexOf(QLatin1Char(';'));\n        if (-1 != p) {\n            if (p == keyseq.count() - 1) { // Last comma 'Ctrl+;'\n                p = -1;\n            } else {\n                if (QLatin1Char(';') == keyseq.at(p+1)) // e.g. 'Ctrl+;; Shift+;;'\n                    p++;\n                if (QLatin1Char(' ') == keyseq.at(p+1)) { // Space after comma\n                    diff = 1;\n                    p++;\n                } else {\n                    diff = 0;\n                }\n            }\n        }\n        part = keyseq.left(-1 == p ? keyseq.length() : p - diff);\n        keyseq = keyseq.right(-1 == p ? 0 : keyseq.length() - (p + 1));\n        QKeySequence key(part);\n        if (!key.isEmpty()) {\n            keys.append(key);\n        }\n    }\n    return keys;\n}\n\nQString ActionManager::formatShortcutsString(const QString &ks)\n{\n    QStringList ksList;\n    foreach(QKeySequence k, toShortcuts(ks)) {\n        ksList.append(k.toString());\n    }\n    return ksList.join(\"; \");\n}\n\nQString ActionManager::formatShortcutsNativeString(const QString &ks)\n{\n    QStringList ksList;\n    foreach(QKeySequence k, toShortcuts(ks)) {\n        ksList.append(k.toString(QKeySequence::NativeText));\n    }\n    return ksList.join(\"; \");\n\n}\n\nvoid ActionManager::setActionShourtcuts(const QString &id, const QString &shortcuts)\n{\n    QMapIterator<QObject*,IActionContext*> it(m_objContextMap);\n    while(it.hasNext()) {\n        it.next();\n        it.value()->setActionShortcuts(id,shortcuts);\n    }\n}\n\nQStringList ActionManager::actionContextNameList() const\n{\n    QStringList nameList;\n    QMapIterator<QObject*,IActionContext*> it(m_objContextMap);\n    while(it.hasNext()) {\n        it.next();\n        nameList.append(it.value()->contextName());\n    }\n    nameList.removeDuplicates();\n    return nameList;\n}\n\nIActionContext *ActionManager::actionContextForName(const QString &name)\n{\n    QMapIterator<QObject*,IActionContext*> it(m_objContextMap);\n    while(it.hasNext()) {\n        it.next();\n        if (it.value()->contextName().compare(name,Qt::CaseInsensitive) == 0) {\n            return it.value();\n        }\n    }\n    return 0;\n}\n\nvoid ActionManager::removeActionContext(QObject *obj)\n{\n    QMutableMapIterator<QObject*,IActionContext*> it(m_objContextMap);\n    while (it.hasNext()) {\n        it.next();\n        if (it.key() == obj) {\n            delete it.value();\n            it.remove();\n            break;\n        }\n    }\n}\n\nActionContext::ActionContext(IApplication *app, const QString &name)\n    : m_liteApp(app), m_name(name)\n{\n}\n\nQString ActionContext::contextName() const\n{\n    return m_name;\n}\n\nActionContext::~ActionContext()\n{\n    QMapIterator<QString,ActionInfo*> it(m_actionInfoMap);\n    while(it.hasNext()) {\n        it.next();\n        ActionInfo* info = it.value();\n        delete info;\n    }\n    m_actionInfoMap.clear();\n}\n\nvoid ActionContext::regAction(QAction *act, const QString &id, const QString &defks, bool standard)\n{\n    ActionInfo *info = m_actionInfoMap.value(id);\n    if (info == 0) {\n        info = new ActionInfo;\n        m_actionInfoMap.insert(id,info);\n    }\n    info->standard = standard;\n    info->defks = ActionManager::formatShortcutsString(defks);\n    info->ks = m_liteApp->settings()->value(LITEAPP_SHORTCUTS+id,info->defks).toString();\n    info->ks = ActionManager::formatShortcutsString(info->ks);\n    info->keys = ActionManager::toShortcuts(info->ks);\n    if (act) {\n        info->label = act->text();\n        act->setShortcuts(info->keys);\n        act->setData(id);\n        if (!info->ks.isEmpty()) {\n            act->setToolTip(QString(\"%1 (%2)\").arg(act->text()).arg(ActionManager::formatShortcutsNativeString(info->ks)));\n        }\n        info->action = act;\n    } else {\n        info->action = 0;\n    }\n}\n\nvoid ActionContext::regAction(QAction *act, const QString &id, const QKeySequence::StandardKey &def)\n{\n    regAction(act,id,QKeySequence(def).toString(),true);\n}\n\nQStringList ActionContext::actionKeys() const\n{\n    return m_actionInfoMap.keys();\n}\n\nActionInfo *ActionContext::actionInfo(const QString &id) const\n{\n    return m_actionInfoMap.value(id);\n}\n\nvoid ActionContext::setActionShortcuts(const QString &id, const QString &shortcuts)\n{\n    ActionInfo *info = m_actionInfoMap.value(id);\n    if (!info) {\n        return;\n    }\n    info->ks = ActionManager::formatShortcutsString(shortcuts);\n    info->keys = ActionManager::toShortcuts(info->ks);\n    if (info->action) {\n        info->action->setShortcuts(info->keys);\n        if (!info->ks.isEmpty()) {\n            info->action->setToolTip(QString(\"%1 (%2)\").arg(info->action->text()).arg(ActionManager::formatShortcutsNativeString(info->ks)));\n        }\n    }\n    if (info->ks != info->defks) {\n        m_liteApp->settings()->setValue(LITEAPP_SHORTCUTS+id,info->ks);\n    } else {\n        m_liteApp->settings()->remove(LITEAPP_SHORTCUTS+id);\n    }\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/actionmanager.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: actionmanager.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef ACTIONMANAGER_H\n#define ACTIONMANAGER_H\n\n#include \"liteapi/liteapi.h\"\n\nusing namespace LiteApi;\n\nclass ActionContext : public IActionContext {\npublic:\n    ActionContext(LiteApi::IApplication *app, const QString &name);\n    virtual ~ActionContext();\n    virtual QString contextName() const;\n    virtual void regAction(QAction *act, const QString &id, const QString &defks, bool standard = false);\n    virtual void regAction(QAction *act, const QString &id, const QKeySequence::StandardKey &def);\n    virtual QStringList actionKeys() const;\n    virtual ActionInfo *actionInfo(const QString &id) const;\n    virtual void setActionShortcuts(const QString &id, const QString &shortcuts);\nprotected:\n    LiteApi::IApplication   *m_liteApp;\n    QString m_name;\n    QMap<QString,ActionInfo*> m_actionInfoMap;\n};\n\nclass ActionManager : public IActionManager\n{\n    Q_OBJECT\npublic:\n    ActionManager(QObject *parent = 0);\n    virtual ~ActionManager();\n    virtual bool initWithApp(IApplication *app);\n    virtual QMenu *insertMenu(const QString &id, const QString &title, const QString &idBefore = QString());\n    virtual QMenu *loadMenu(const QString &id);\n    virtual void removeMenu(QMenu *menu);\n    virtual QList<QString>  menuList() const;\n    virtual QToolBar *insertToolBar(const QString &id, const QString &title, const QString &before = QString());\n    virtual void insertToolBar(QToolBar *toolBar,const QString &before = QString());\n    virtual QToolBar *loadToolBar(const QString &id);\n    virtual void removeToolBar(QToolBar* toolBar);\n    virtual QList<QString> toolBarList() const;\n    virtual void insertViewMenu(VIEWMENU_ACTION_POS pos, QAction *act);\n    virtual void setViewMenuSeparator(const QString &sepid, bool group);\n    virtual void insertViewMenuAction(QAction *act, const QString &sepid);\n    virtual bool insertMenuActions(const QString &idMenu, const QString &idBeforeSep, bool newGroup,  QList<QAction*> &actions);\n    virtual IActionContext *getActionContext(QObject *obj, const QString &name);\n    virtual QStringList actionKeys() const;\n    virtual ActionInfo *actionInfo(const QString &id) const;\n    virtual void setActionShourtcuts(const QString &id, const QString &shortcuts);\n    virtual QStringList actionContextNameList() const;\n    virtual IActionContext *actionContextForName(const QString &name);\nprotected slots:\n    void removeActionContext(QObject *obj);\npublic:\n    static QList<QKeySequence> toShortcuts(const QString &ks);\n    static QString formatShortcutsString(const QString &ks);\n    static QString formatShortcutsNativeString(const QString &ks);\nprotected:\n    QMap<QString,QMenu*>   m_idMenuMap;\n    QMap<QString,QToolBar*> m_idToolBarMap;\n    QMap<QString,QAction*> m_idSeperatorMap;\n    QMap<QString, QMap<QString,QAction*> > m_idMenuSepMap;\n    QMenu *m_viewMenu;\n    QAction *m_baseToolBarAct;\n    QAction *m_baseBrowserAct;\n    QMap<QObject*,IActionContext*> m_objContextMap;\n};\n\n#endif // ACTIONMANAGER_H\n"
  },
  {
    "path": "liteidex/src/liteapp/cdrv.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: cdrv.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef CDRV_H\n#define CDRV_H\n\n#include \"liteapp_global.h\"\n\ntypedef void (*DRV_CALLBACK)(char *id, int id_size, char *reply, int len, int err, void *ctx);\ntypedef int (*GODRV_CALL)(char* id,int id_size, char* args, int args_size, DRV_CALLBACK cb, void *ctx);\n\nextern \"C\"\nint LITEIDESHARED_EXPORT cdrv_main(int argc, char **argv);\n\nextern \"C\"\nvoid LITEIDESHARED_EXPORT cdrv_init(void *fn);\n\nextern \"C\"\nvoid LITEIDESHARED_EXPORT cdrv_cb(DRV_CALLBACK cb, char *id, char *reply, int size, int err, void* ctx);\n\n\n#endif // CDRV_H\n"
  },
  {
    "path": "liteidex/src/liteapp/editormanager.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: editormanager.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"editormanager.h\"\n#include \"liteapp_global.h\"\n#include \"liteapi/liteids.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"terminalapi/terminalapi.h\"\n#include <QFileInfo>\n#include <QTabWidget>\n#include <QMessageBox>\n#include <QMenu>\n#include <QAction>\n#include <QStackedWidget>\n#include <QToolBar>\n#include <QVBoxLayout>\n#include <QFileInfo>\n#include <QFileDialog>\n#include <QEvent>\n#include <QKeyEvent>\n#include <QTabBar>\n#include <QApplication>\n#include <QStatusBar>\n#include <QToolButton>\n#include <QComboBox>\n#include <QTextCodec>\n#include <QClipboard>\n#include <QLabel>\n#include <QStandardItemModel>\n#include <QHeaderView>\n#include <QDebug>\n#include \"fileutil/fileutil.h\"\n#include \"liteapp.h\"\n#include \"openeditorswidget.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nEditorManager::~EditorManager()\n{\n    delete m_tabContextFileMenu;\n    delete m_tabContextNofileMenu;\n    delete m_editorTabWidget;\n    delete m_listMenu;\n    delete m_openEditorWidget;\n    m_browserActionMap.clear();\n    if (!m_nullMenu->parent()) {\n        delete m_nullMenu;\n    }\n}\n\nbool EditorManager::initWithApp(IApplication *app)\n{\n    if (!IEditorManager::initWithApp(app)) {\n        return false;\n    }\n    m_updateMenuInFocus = false;\n    m_mouseExtNavigate = true;\n    m_nullMenu = new QMenu;\n    m_nullMenu->setEnabled(false);\n    m_currentNavigationHistoryPosition = 0;\n    m_colorStyleScheme = new ColorStyleScheme(this);\n\n    m_maxEditorCount = m_liteApp->settings()->value(LITEAPP_MAXEDITORCOUNT,64).toInt();\n\n    m_widget = new QWidget;\n    //create editor tab widget\n    m_editorTabWidget = new LiteTabWidget(LiteApi::getToolBarIconSize(m_liteApp));\n\n    //create list menu\n    m_listMenu = new QMenu;\n    m_listGroup = new QActionGroup(this);\n    m_editorTabWidget->setListMenu(m_listMenu);\n    connect(m_listMenu,SIGNAL(aboutToShow()),this,SLOT(aboutToShowListMenu()));\n    connect(m_listGroup,SIGNAL(triggered(QAction*)),this,SLOT(triggeredListAction(QAction*)));\n\n    //create editor model\n    m_editorModel = new QStandardItemModel(this);\n\n    //create opne editor for model\n    m_openEditorWidget = new OpenEditorsWidget(app);\n    m_openEditorWidget->setEditorModel(m_editorModel);\n\n    m_liteApp->toolWindowManager()->addToolWindow(Qt::LeftDockWidgetArea,m_openEditorWidget,\"OpenEditor\",tr(\"Open Editor\"),true);\n\n    m_editorTabWidget->tabBar()->setTabsClosable(m_liteApp->settings()->value(LITEAPP_EDITTABSCLOSABLE,true).toBool());\n    m_editorTabWidget->tabBar()->setEnableWheel(m_liteApp->settings()->value(LITEAPP_EDITTABSENABLEWHELL,true).toBool());\n\n    //m_editorTabWidget->tabBar()->setIconSize(LiteApi::getToolBarIconSize());\n    QVBoxLayout *mainLayout = new QVBoxLayout;\n    mainLayout->setMargin(0);\n    mainLayout->setSpacing(0);\n\n//    QToolBar *toolBar = m_editorTabWidget->headerToolBar();\n//    toolBar->setObjectName(\"toolbar/tabs\");\n//    m_liteApp->actionManager()->insertToolBar(toolBar);\n//    m_editorTabWidget->headerToolBar()->setAllowedAreas(Qt::TopToolBarArea|Qt::BottomToolBarArea);\n    mainLayout->addWidget(m_editorTabWidget->tabBarWidget());\n    mainLayout->addWidget(m_editorTabWidget->stackedWidget());\n    m_widget->setLayout(mainLayout);\n\n    connect(m_editorTabWidget,SIGNAL(currentChanged(int)),this,SLOT(editorTabChanged(int)));\n    connect(m_editorTabWidget,SIGNAL(tabCloseRequested(int)),this,SLOT(editorTabCloseRequested(int)));\n    connect(m_editorTabWidget,SIGNAL(tabAddRequest()),this,SIGNAL(tabAddRequest()));\n\n    m_editorTabWidget->stackedWidget()->installEventFilter(this);\n    m_editorTabWidget->tabBar()->installEventFilter(this);\n\n    m_tabContextFileMenu = new QMenu;\n    m_tabContextNofileMenu = new QMenu;\n    m_tabContextIndex = -1;\n    QAction *closeAct = new QAction(tr(\"Close\"),this);\n    closeAct->setShortcut(QKeySequence(\"Ctrl+W\"));\n    QAction *closeOthersAct = new QAction(tr(\"Close Others\"),this);\n    QAction *closeAllAct = new QAction(tr(\"Close All\"),this);\n    QAction *closeLeftAct = new QAction(tr(\"Close Left Tabs\"),this);\n    QAction *closeRightAct = new QAction(tr(\"Close Right Tabs\"),this);\n    QAction *closeSameFolderFiles = new QAction(tr(\"Close Files in Same Folder\"),this);\n    QAction *closeOtherFolderFiles = new QAction(tr(\"Close Files in Other Folders\"),this);\n    QAction *copyPathToClipboard = new QAction(tr(\"Copy Full Path to Clipboard\"),this);\n\n#if defined(Q_OS_WIN)\n    QAction *showInExplorer = new QAction(tr(\"Show in Explorer\"),this);\n#elif defined(Q_OS_MAC)\n    QAction *showInExplorer = new QAction(tr(\"Show in Finder\"),this);\n#else\n    QAction *showInExplorer = new QAction(tr(\"Show Containing Folder\"),this);\n#endif\n\n#ifdef Q_OS_WIN\n    QAction *openInShell = new QAction(tr(\"Open Command Prompt Here\"),this);\n#else\n    QAction *openInShell = new QAction(tr(\"Open Terminal Here\"),this);\n#endif\n    QAction *openTerminal = new QAction(tr(\"Open in Integrated Terminal\"),this);\n\n\n    QAction *moveToAct = new QAction(tr(\"Move to New Window\"),this);\n\n    m_tabContextFileMenu->addAction(closeAct);\n    m_tabContextFileMenu->addAction(closeOthersAct);\n    m_tabContextFileMenu->addAction(closeLeftAct);\n    m_tabContextFileMenu->addAction(closeRightAct);\n    m_tabContextFileMenu->addAction(closeAllAct);\n    m_tabContextFileMenu->addSeparator();\n    m_tabContextFileMenu->addAction(closeSameFolderFiles);\n    m_tabContextFileMenu->addAction(closeOtherFolderFiles);\n    m_tabContextFileMenu->addSeparator();\n    m_tabContextFileMenu->addAction(copyPathToClipboard);\n    m_tabContextFileMenu->addAction(showInExplorer);\n    m_tabContextFileMenu->addAction(openInShell);\n    m_tabContextFileMenu->addAction(openTerminal);\n    m_tabContextFileMenu->addSeparator();\n    m_tabContextFileMenu->addAction(moveToAct);\n\n    m_tabContextNofileMenu->addAction(closeAct);\n    m_tabContextNofileMenu->addAction(closeOthersAct);\n    m_tabContextNofileMenu->addAction(closeLeftAct);\n    m_tabContextNofileMenu->addAction(closeRightAct);\n    m_tabContextNofileMenu->addAction(closeAllAct);\n\n    connect(closeAct,SIGNAL(triggered()),this,SLOT(tabContextClose()));\n    connect(closeOthersAct,SIGNAL(triggered()),this,SLOT(tabContextCloseOthers()));\n    connect(closeLeftAct,SIGNAL(triggered()),this,SLOT(tabContextCloseLefts()));\n    connect(closeRightAct,SIGNAL(triggered()),this,SLOT(tabContextCloseRights()));\n    connect(closeAllAct,SIGNAL(triggered()),this,SLOT(tabContextCloseAll()));\n    connect(closeSameFolderFiles,SIGNAL(triggered()),this,SLOT(tabContextCloseSameFolderFiles()));\n    connect(closeOtherFolderFiles,SIGNAL(triggered()),this,SLOT(tabContextCloseOtherFolderFiles()));\n    connect(copyPathToClipboard,SIGNAL(triggered()),this,SLOT(tabContextCopyPathToClipboard()));\n    connect(showInExplorer,SIGNAL(triggered()),this,SLOT(tabContextShowInExplorer()));\n    connect(openInShell,SIGNAL(triggered()),this,SLOT(tabContextOpenInShell()));\n    connect(openTerminal,SIGNAL(triggered()),this,SLOT(tabContextOpenInTerminal()));\n    connect(moveToAct,SIGNAL(triggered()),this,SLOT(moveToNewWindow()));\n    connect(qApp,SIGNAL(focusChanged(QWidget*,QWidget*)),this,SLOT(focusChanged(QWidget*,QWidget*)));\n\n    QStatusBar *bar = m_liteApp->mainWindow()->statusBar();\n\n    m_lineInfo = new QLabel(\"000:000\");\n    bar->addPermanentWidget(m_lineInfo);\n\n    LiteApi::IAppIdleTimer *idleTimer = LiteApi::GetAppIdleTimer(m_liteApp);\n    if (idleTimer) {\n        connect(idleTimer,SIGNAL(appIdle(int)),this,SLOT(appIdle(int)));\n    }\n\n    m_editorTabWidget->tabBar()->setElideMode(Qt::ElideNone);\n    applyOption(OPTION_LITEAPP);\n    return true;\n}\n\nvoid EditorManager::createActions()\n{\n    m_editMenu = m_liteApp->actionManager()->loadMenu(ID_MENU_EDIT);\n\n    QToolBar *toolBar = m_liteApp->actionManager()->loadToolBar(ID_TOOLBAR_STD);\n\n    m_goBackAct = new QAction(tr(\"Navigate Backward\"),this);\n    m_goBackAct->setIcon(QIcon(\"icon:images/backward.png\"));\n    m_goForwardAct = new QAction(tr(\"Navigate Forward\"),this);\n    m_goForwardAct->setIcon(QIcon(\"icon:images/forward.png\"));\n    m_gotoNextTab = new QAction(tr(\"Go to next tab\"),this);\n    m_gotoPrevTab = new QAction(tr(\"Go to previous tab\"),this);\n\n    IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(m_liteApp,\"App\");\n#ifdef Q_OS_MAC\n    actionContext->regAction(m_goBackAct,\"Backward\",\"Ctrl+Alt+Left\");\n    actionContext->regAction(m_goForwardAct,\"Forward\",\"Ctrl+Alt+Right\");\n    actionContext->regAction(m_gotoNextTab,\"GotoNextTab\",\"Alt+Tab\");\n    actionContext->regAction(m_gotoPrevTab,\"GotoPreviusTab\",\"Alt+Shift+Tab\");\n#else\n    actionContext->regAction(m_goBackAct,\"Backward\",\"Alt+Left\");\n    actionContext->regAction(m_goForwardAct,\"Forward\",\"Alt+Right\");\n    actionContext->regAction(m_gotoNextTab,\"GotoNextTab\",\"Ctrl+Tab\");\n    actionContext->regAction(m_gotoPrevTab,\"GotoPreviusTab\",\"Ctrl+Shift+Tab\");\n#endif\n\n    m_liteApp->actionManager()->setViewMenuSeparator(\"sep/nav\",true);\n    m_liteApp->actionManager()->insertViewMenuAction(m_goBackAct,\"sep/nav\");\n    m_liteApp->actionManager()->insertViewMenuAction(m_goForwardAct,\"sep/nav\");\n\n    updateNavigatorActions();\n\n    toolBar->addSeparator();\n    toolBar->addAction(m_goBackAct);\n    toolBar->addAction(m_goForwardAct);\n    m_widget->addAction(m_gotoNextTab);\n    m_widget->addAction(m_gotoPrevTab);\n\n    connect(m_goBackAct,SIGNAL(triggered()),this,SLOT(goBack()));\n    connect(m_goForwardAct,SIGNAL(triggered()),this,SLOT(goForward()));\n    connect(m_gotoNextTab,SIGNAL(triggered()),this,SLOT(gotoNextTab()));\n    connect(m_gotoPrevTab,SIGNAL(triggered()),this,SLOT(gotoPrevTab()));\n}\n\nQWidget *EditorManager::widget()\n{\n    return m_widget;\n}\n\nvoid EditorManager::editorTabChanged(int /*index*/)\n{\n    QWidget *w = m_editorTabWidget->currentWidget();\n    if (w == 0) {\n        this->setCurrentEditor(0);\n    } else {\n        IEditor *ed = m_widgetEditorMap.value(w,0);\n        this->setCurrentEditor(ed);\n    }\n}\n\nvoid EditorManager::editorTabCloseRequested(int index)\n{\n    QWidget *w = m_editorTabWidget->widget(index);\n    IEditor *ed = m_widgetEditorMap.value(w,0);\n    closeEditor(ed);\n}\n\nQList<IEditor*> EditorManager::sortedEditorList() const\n{\n    QList<IEditor*> editorList;\n    foreach (QWidget *w,m_editorTabWidget->widgetList()) {\n        IEditor *ed = m_widgetEditorMap.value(w);\n        if (ed) {\n            editorList << ed;\n        }\n    }\n    return editorList;\n}\n\nclass EditorItem : public QStandardItem\n{\npublic:\n    LiteApi::IEditor    *editor;\n};\n\nvoid EditorManager::addEditor(IEditor *editor)\n{\n    QWidget *w = m_widgetEditorMap.key(editor,0);\n    if (w == 0) {\n        w = editor->widget();\n        if (w == 0) {\n            return;\n        }\n        m_editorTabWidget->addTab(w,QIcon(),editor->name(),editor->filePath());\n        m_widgetEditorMap.insert(w,editor);\n        emit editorCreated(editor);\n        connect(editor,SIGNAL(modificationChanged(bool)),this,SLOT(modificationChanged(bool)));\n        LiteApi::IEditContext *context = LiteApi::getEditContext(editor);\n        if (context) {\n            this->addEditContext(context);\n        }\n        if (!editor->filePath().isEmpty()) {\n            QStandardItem *item = new QStandardItem(editor->name());\n            item->setToolTip(editor->filePath());\n            m_editorModel->appendRow(QList<QStandardItem*>() << item);\n        }\n    }\n}\n\nvoid EditorManager::gotoNextTab()\n{\n    int index = m_editorTabWidget->tabBar()->currentIndex();\n    index++;\n    if (index >= m_editorTabWidget->tabBar()->count()) {\n        index = 0;\n    }\n    m_editorTabWidget->setCurrentIndex(index);\n//    qDebug() << \"Changing to next tab:\" << index;\n}\n\nvoid EditorManager::gotoPrevTab()\n{\n    int index = m_editorTabWidget->tabBar()->currentIndex();\n    index--;\n    if (index < 0) {\n        index = m_editorTabWidget->tabBar()->count()-1;\n    }\n    m_editorTabWidget->setCurrentIndex(index);\n//    qDebug() << \"Changing to previous tab:\" << index;\n}\n\nbool EditorManager::eventFilter(QObject *target, QEvent *event)\n{\n    if (event->type() == QEvent::MouseButtonDblClick && target == m_editorTabWidget->tabBar()) {\n        QMouseEvent *ev = (QMouseEvent*)event;\n        if (ev->button() == Qt::LeftButton) {\n            emit doubleClickedTab();\n        }\n    } else if (event->type() == QEvent::MouseButtonPress) {\n        QMouseEvent *ev = (QMouseEvent*)event;\n        if (m_mouseExtNavigate) {\n            if ( ev->button() == 0x00000008/*Qt::BackButton*/) {\n                this->goBack();\n            } else if (ev->button() == 0x00000010/*Qt::ForwardButton*/) {\n                this->goForward();\n            }\n        }\n        if (target == m_editorTabWidget->tabBar()) {\n            if (ev->button() == Qt::RightButton) {\n                m_tabContextIndex = m_editorTabWidget->tabBar()->tabAt(ev->pos());\n                if (m_tabContextIndex >= 0) {\n                    QString filePath = tabContextFilePath();\n                    if (filePath.isEmpty()) {\n                        m_tabContextNofileMenu->popup(ev->globalPos());\n                    } else {\n                        m_tabContextFileMenu->popup(ev->globalPos());\n                    }\n                }\n            } else if (ev->button() == Qt::MiddleButton) {\n                int index = m_editorTabWidget->tabBar()->tabAt(ev->pos());\n                if (index >= 0) {\n                    editorTabCloseRequested(index);\n                }\n            }\n        }\n    }\n    return IEditorManager::eventFilter(target,event);\n}\n\nQString EditorManager::tabContextFilePath() const\n{\n    if (m_tabContextIndex < 0) {\n        return QString();\n    }\n    QWidget *w = m_editorTabWidget->widget(m_tabContextIndex);\n    IEditor *ed = m_widgetEditorMap.value(w,0);\n    if (!ed) {\n        return QString();\n    }\n    return ed->filePath();\n}\n\nQAction *EditorManager::registerBrowser(IEditor *editor)\n{\n    QAction *act = new QAction(editor->name(),this);\n    act->setCheckable(true);\n    act->setChecked(false);\n    connect(act,SIGNAL(toggled(bool)),this,SLOT(toggleBrowserAction(bool)));\n    m_browserActionMap.insert(editor,act);\n    return act;\n}\n\nvoid EditorManager::activeBrowser(IEditor *editor)\n{\n    QAction *act = m_browserActionMap.value(editor);\n    if (!act) {\n        return;\n    }\n    if (!act->isChecked()) {\n        act->toggle();\n    }\n    setCurrentEditor(editor);\n}\n\nbool EditorManager::closeEditor(IEditor *editor)\n{\n    if (!editor) {\n        editor = m_currentEditor;\n    }\n    if (editor == 0) {\n        return false;\n    }\n\n    if (editor->isModified() && !editor->isReadOnly()) {\n        QString text = QString(tr(\"Save changes to %1?\")).arg(editor->filePath());\n        int ret = QMessageBox::question(m_widget,tr(\"Unsaved Modifications\"),text,QMessageBox::Save | QMessageBox::No | QMessageBox::Cancel);\n        if (ret == QMessageBox::Cancel) {\n            return false;\n        } else if (ret == QMessageBox::Save) {\n            //cur->save();\n            saveEditor(editor);\n        }\n    }\n\n    if (!editor->filePath().isEmpty()) {\n        m_liteApp->settings()->setValue(QString(\"state_%1\").arg(editor->filePath()),editor->saveState());\n    }\n    int index = m_editorTabWidget->indexOf(editor->widget());\n    if (index < 0) {\n        return false;\n    }\n    emit editorAboutToClose(editor);\n    m_editorTabWidget->removeTab(index);\n    m_widgetEditorMap.remove(editor->widget());\n    QString filePath = editor->filePath();\n    if (!filePath.isEmpty()) {\n        for (int i = 0; i < m_editorModel->rowCount(); i++) {\n            QStandardItem *item = m_editorModel->item(i,0);\n            if (item->toolTip() == filePath) {\n                m_editorModel->removeRow(i);\n                break;\n            }\n        }\n    }\n\n    QMapIterator<IEditor*,QAction*> i(m_browserActionMap);\n    while (i.hasNext()) {\n        i.next();\n        if (i.key() == editor) {\n            i.value()->blockSignals(true);\n            i.value()->setChecked(false);\n            i.value()->blockSignals(false);\n            return true;\n        }\n    }\n    LiteApi::IEditContext *context = LiteApi::getEditContext(editor);\n    if (context) {\n        this->removeEditContext(context);\n    }\n    editor->deleteLater();\n    return true;\n}\n\nbool EditorManager::saveEditor(IEditor *editor, bool emitAboutSave)\n{\n    IEditor *cur = 0;\n    if (editor) {\n        cur = editor;\n    } else {\n        cur = m_currentEditor;\n    }\n\n    if (cur && cur->isModified()) {\n        if (emitAboutSave) {\n            emit editorAboutToSave(cur);\n        }\n\n        if (cur->save()) {\n            emit editorSaved(cur);\n        } else if (cur->isReadOnly()){\n            m_liteApp->appendLog(\"Editor\",QString(\"File is read only %1\").arg(cur->filePath()),false);\n        } else {\n            m_liteApp->appendLog(\"Editor\",QString(\"Failed to save %1\").arg(cur->filePath()),true);\n        }\n\n        return true;\n    }\n    return false;\n}\n\nbool EditorManager::saveEditorAs(IEditor *editor)\n{\n    IEditor *cur = 0;\n    if (editor) {\n        cur = editor;\n    } else {\n        cur = m_currentEditor;\n    }\n    if (cur == 0) {\n        return false;\n    }\n    QString fileName = cur->filePath();\n    if (fileName.isEmpty()) {\n        return false;\n    }\n\n    QFileInfo info(fileName);\n    QStringList filter;\n    QString ext = info.suffix();\n    if (!ext.isEmpty()) {\n        filter.append(QString(\"%1 (*.%1)\").arg(ext).arg(ext));\n    }\n    filter.append(tr(\"All Files (*)\"));\n    QString path = info.absolutePath();\n    QString saveFileName = QFileDialog::getSaveFileName(m_liteApp->mainWindow(),tr(\"Save As\"),path,filter.join(\";;\"));\n    if (FileUtil::compareFile(fileName,saveFileName,false)) {\n        return false;\n    }\n    if (!cur->saveAs(saveFileName)) {\n        return false;\n    }\n    QWidget *w = m_widgetEditorMap.key(cur,0);\n    if(w) {\n        int index = m_editorTabWidget->indexOf(w);\n        m_editorTabWidget->setTabText(index,cur->name());\n    }\n\n    emit currentEditorChanged(cur);\n    return true;\n}\n\nbool EditorManager::saveAllEditors(bool emitAboutSave)\n{\n    QList<IEditor*> editorList = m_widgetEditorMap.values();\n    foreach (IEditor *editor, editorList) {\n        saveEditor(editor,emitAboutSave);\n    }\n    return true;\n}\n\nbool EditorManager::closeAllEditors()\n{\n    bool bCloseAll = true;\n\n    QMapIterator<QWidget *, IEditor *> i (m_widgetEditorMap);\n    while (i.hasNext()) {\n        i.next();\n        if (!closeEditor(i.value())) {\n            bCloseAll = false;\n            break;\n        }\n    }\n\n    return bCloseAll;\n}\n\nIEditor *EditorManager::currentEditor() const\n{\n    return m_currentEditor;\n}\n\nvoid EditorManager::updateEditorMenu(IEditContext *context)\n{\n    if (context && context->focusMenu()) {\n#if defined(Q_OS_OSX)\n        // dirty trick to show the correct edit menu at the first time on Mac OS X\n        m_editMenu->setEnabled(false);\n#endif\n        m_editMenu->menuAction()->setMenu(context->focusMenu());\n        m_editMenu->setEnabled(true);\n    } else {\n        m_editMenu->menuAction()->setMenu(m_nullMenu);\n        m_editMenu->setEnabled(false);\n    }\n    if (context && context->focusToolBar()) {\n        context->focusToolBar()->setEnabled(true);\n    }\n}\n\nvoid EditorManager::setCurrentEditor(IEditor *editor, bool ignoreNavigationHistory)\n{\n    if (m_currentEditor == editor) {\n        return;\n    }\n    if (editor && !ignoreNavigationHistory) {\n        this->addNavigationHistory();\n    }\n    m_currentEditor = editor;\n    this->updateEditInfo(\"\");\n    if (editor != 0) {\n        m_editorTabWidget->setCurrentWidget(editor->widget());\n        editor->onActive();\n    }\n    if (!m_updateMenuInFocus) {\n        IEditContext *context = LiteApi::getEditContext(editor);\n        updateEditorMenu(context);\n    }\n\n    emit currentEditorChanged(editor);\n}\n\nIEditor *EditorManager::findEditor(const QString &fileName, bool canonical) const\n{\n    QMapIterator<QWidget *, IEditor *> i(m_widgetEditorMap);\n    while (i.hasNext()) {\n        i.next();\n        if (FileUtil::compareFile(i.value()->filePath(),fileName,canonical)) {\n            return i.value();\n        }\n    }\n    return 0;\n}\n\nQList<IEditor*> EditorManager::editorList() const\n{\n    return m_widgetEditorMap.values();\n}\n\nvoid EditorManager::addFactory(IEditorFactory *factory)\n{\n    m_factoryList.append(factory);\n}\n\nvoid EditorManager::removeFactory(IEditorFactory *factory)\n{\n    m_factoryList.removeOne(factory);\n}\n\nQList<IEditorFactory*>  EditorManager::factoryList() const\n{\n    return m_factoryList;\n}\n\nQStringList EditorManager::mimeTypeList() const\n{\n    QStringList types;\n    foreach(IEditorFactory *factory, m_factoryList) {\n        types.append(factory->mimeTypes());\n    }\n    return types;\n}\n\nIEditor *EditorManager::openEditor(const QString &fileName, const QString &mimeType)\n{\n    IEditor *editor = findEditor(fileName,true);\n    if (editor) {\n        return editor;\n    }\n    bool matchFactory = false;\n    foreach (IEditorFactory *factory, m_factoryList) {\n        if (factory->mimeTypes().contains(mimeType)) {\n            matchFactory = true;\n            try {\n                editor = factory->open(fileName,mimeType);\n            } catch(std::bad_alloc &ba) {\n                m_liteApp->appendLog(\"EditorManager\",QString(\"exception %1! can not load file %2\").arg(ba.what()).arg(fileName),true);\n                return 0;\n            }\n            if (editor) {\n                break;\n            }\n        }\n    }\n    if (editor == 0 && !matchFactory) {\n        QString type = \"liteide/default.editor\";\n        foreach (IEditorFactory *factory, m_factoryList) {\n            if (factory->mimeTypes().contains(type)) {\n                try {\n                    editor = factory->open(fileName,type);\n                } catch(std::bad_alloc &ba) {\n                    m_liteApp->appendLog(\"EditorManager\",QString(\"exception %1! can not load file %2\").arg(ba.what()).arg(fileName),true);\n                    return 0;\n                }\n                if (editor) {\n                    break;\n                }\n            }\n        }\n    }\n    if (editor) {\n        addEditor(editor);\n        ITextEditor *textEditor = getTextEditor(editor);\n        if (textEditor) {\n            textEditor->restoreState(m_liteApp->settings()->value(QString(\"state_%1\").arg(editor->filePath())).toByteArray());\n        }\n        while (m_editorTabWidget->tabBar()->count() > m_maxEditorCount) {\n            this->closeEditorForTab(0);\n        }\n    }\n    return editor;\n}\n\nIEditor *EditorManager::openEditorByFactory(const QString &fileName, const QString &mimeType, const QString &factoryId)\n{\n    IEditor *editor1 = findEditor(fileName,true);\n    IEditor *editor = 0;\n    foreach (IEditorFactory *factory, m_factoryList) {\n        if (factory->id() == factoryId) {\n            if (factory->testMimeType(mimeType)) {\n                try {\n                    editor = factory->open(fileName,mimeType);\n                } catch(std::bad_alloc &ba) {\n                    m_liteApp->appendLog(\"EditorManager\",QString(\"exception %1! can not load file %2\").arg(ba.what()).arg(fileName),true);\n                    return 0;\n                }\n                if (editor) {\n                    break;\n                }\n            }\n            break;\n        }\n    }\n    if (editor1) {\n        if (editor) {\n            this->closeEditor(editor1);\n        } else {\n            return editor1;\n        }\n    }\n    if (editor) {\n        addEditor(editor);\n        ITextEditor *textEditor = getTextEditor(editor);\n        if (textEditor) {\n            textEditor->restoreState(m_liteApp->settings()->value(QString(\"state_%1\").arg(editor->filePath())).toByteArray());\n        }\n        while (m_editorTabWidget->tabBar()->count() > m_maxEditorCount) {\n            this->closeEditorForTab(0);\n        }\n    }\n    return editor;\n}\n\nvoid EditorManager::toggleBrowserAction(bool b)\n{\n    QAction *act = (QAction*)sender();\n    if (act) {\n        IEditor *editor = m_browserActionMap.key(act,0);\n        if (editor) {\n            if (b) {\n                addEditor(editor);\n                setCurrentEditor(editor);\n            } else {\n                closeEditor(editor);\n            }\n        }\n    }\n}\n\nvoid EditorManager::modificationChanged(bool b)\n{\n    IEditor *editor = static_cast<IEditor*>(sender());\n    if (editor) {\n        QString text = editor->name();\n        QString filePath = editor->filePath();\n        if (b) {\n            text += \" *\";\n        }\n        int index = m_editorTabWidget->indexOf(editor->widget());\n        if (index >= 0) {\n            m_editorTabWidget->setTabText(index,text);\n        }\n        for (int i = 0; i < m_editorModel->rowCount(); i++) {\n            QStandardItem *item = m_editorModel->item(i,0);\n            if (item->toolTip() == filePath) {\n                item->setText(text);\n                break;\n            }\n        }\n        emit editorModifyChanged(editor,b);\n    }\n}\n\nvoid EditorManager::addNavigationHistory(IEditor *editor,const QByteArray &saveState)\n{\n    if (editor && editor != currentEditor()) {\n        return; // we only save editor sate for the current editor, when the user interacts\n    }\n\n    if (!editor)\n        editor = currentEditor();\n    if (!editor)\n        return;\n\n    QString filePath = editor->filePath();\n    if (filePath.isEmpty()) {\n        return;\n    }\n\n    QByteArray state;\n    if (saveState.isNull()) {\n        state = editor->saveState();\n    } else {\n        state = saveState;\n    }\n\n    m_currentNavigationHistoryPosition = qMin(m_currentNavigationHistoryPosition, m_navigationHistory.size()); // paranoia\n    if (m_currentNavigationHistoryPosition > 0 && m_currentNavigationHistoryPosition <= m_navigationHistory.size()) {\n        EditLocation &prev = m_navigationHistory[m_currentNavigationHistoryPosition-1];\n        if (prev.filePath == filePath && prev.state == state) {\n            return;\n        }\n    }\n    EditLocation location;\n    location.filePath = filePath;\n    location.state = state;\n\n    m_navigationHistory.insert(m_currentNavigationHistoryPosition, location);\n    ++m_currentNavigationHistoryPosition;\n\n    while (m_navigationHistory.size() >= 100) {\n        if (m_currentNavigationHistoryPosition > 50) {\n            m_navigationHistory.removeFirst();\n            --m_currentNavigationHistoryPosition;\n        } else {\n            m_navigationHistory.removeLast();\n        }\n    }\n    updateNavigatorActions();\n}\n\nvoid EditorManager::goBack()\n{\n    updateCurrentPositionInNavigationHistory();\n    if (m_currentNavigationHistoryPosition > 0) {\n        --m_currentNavigationHistoryPosition;\n        EditLocation location = m_navigationHistory.at(m_currentNavigationHistoryPosition);\n        IEditor *editor = m_liteApp->fileManager()->openEditor(location.filePath,true,true);\n        if (editor) {\n            editor->restoreState(location.state);\n        } else {\n            m_navigationHistory.removeAt(m_currentNavigationHistoryPosition);\n        }\n    }\n    updateNavigatorActions();\n}\n\nvoid EditorManager::goForward()\n{\n    updateCurrentPositionInNavigationHistory();\n    if (m_currentNavigationHistoryPosition >= m_navigationHistory.size()-1)\n        return;\n    ++m_currentNavigationHistoryPosition;\n    EditLocation location = m_navigationHistory.at(m_currentNavigationHistoryPosition);\n    IEditor *editor = m_liteApp->fileManager()->openEditor(location.filePath,true,true);\n    if (!editor) {\n        return;\n    }\n    editor->restoreState(location.state);\n    updateNavigatorActions();\n}\n\nvoid EditorManager::updateNavigatorActions()\n{\n    m_goBackAct->setEnabled(m_currentNavigationHistoryPosition > 0);\n    m_goForwardAct->setEnabled(m_currentNavigationHistoryPosition < m_navigationHistory.size()-1);\n}\n\nvoid EditorManager::cutForwardNavigationHistory()\n{\n    while (m_currentNavigationHistoryPosition < m_navigationHistory.size() - 1)\n        m_navigationHistory.removeLast();\n}\n\nvoid EditorManager::loadColorStyleScheme(const QString &fileName)\n{\n    if (m_colorStyleScheme->load(fileName)) {\n        emit colorStyleSchemeChanged();\n    }\n}\n\nconst ColorStyleScheme *EditorManager::colorStyleScheme() const\n{\n    return m_colorStyleScheme;\n}\n\nvoid EditorManager::addEditContext(IEditContext *context)\n{\n    m_editContextMap.insert(context->focusWidget(),context);\n}\n\nvoid EditorManager::removeEditContext(IEditContext *context)\n{\n    m_editContextMap.remove(context->focusWidget());\n}\n\nvoid EditorManager::updateEditInfo(const QString &info)\n{\n    m_lineInfo->setText(info);\n}\n\nvoid EditorManager::updateCurrentPositionInNavigationHistory()\n{\n    IEditor *editor = currentEditor();\n    if (!editor)\n        return;\n    QString filePath = editor->filePath();\n    if(filePath.isEmpty()) {\n        return;\n    }\n\n    EditLocation *location;\n    if (m_currentNavigationHistoryPosition < m_navigationHistory.size()) {\n        location = &m_navigationHistory[m_currentNavigationHistoryPosition];\n    } else {\n        m_navigationHistory.append(EditLocation());\n        location = &m_navigationHistory[m_navigationHistory.size()-1];\n    }\n    location->filePath = filePath;\n    location->state = editor->saveState();\n}\n\nvoid EditorManager::tabContextClose()\n{\n    if (m_tabContextIndex < 0) {\n        return;\n    }\n    editorTabCloseRequested(m_tabContextIndex);\n}\n\nvoid EditorManager::tabContextCloseOthers()\n{\n    if (m_tabContextIndex < 0) {\n        return;\n    }\n    QList<IEditor*> closeList;\n    for (int i = 0; i < m_editorTabWidget->tabBar()->count(); i++) {\n        if (i != m_tabContextIndex) {\n            QWidget *w = m_editorTabWidget->widget(i);\n            IEditor *ed = m_widgetEditorMap.value(w,0);\n            closeList << ed;\n        }\n    }\n    foreach(IEditor *ed, closeList ) {\n        closeEditor(ed);\n    }\n}\n\nvoid EditorManager::tabContextCloseLefts()\n{\n    if (m_tabContextIndex < 0) {\n        return;\n    }\n    QList<IEditor*> closeList;\n    for (int i = 0; i < m_tabContextIndex; i++) {\n        QWidget *w = m_editorTabWidget->widget(i);\n        IEditor *ed = m_widgetEditorMap.value(w,0);\n        closeList << ed;\n    }\n    foreach(IEditor *ed, closeList ) {\n        closeEditor(ed);\n    }\n}\n\nvoid EditorManager::tabContextCloseRights()\n{\n    if (m_tabContextIndex < 0) {\n        return;\n    }\n    QList<IEditor*> closeList;\n    for (int i = m_tabContextIndex+1; i < m_editorTabWidget->tabBar()->count(); i++) {\n        QWidget *w = m_editorTabWidget->widget(i);\n        IEditor *ed = m_widgetEditorMap.value(w,0);\n        closeList << ed;\n    }\n    foreach(IEditor *ed, closeList ) {\n        closeEditor(ed);\n    }\n}\n\nvoid EditorManager::tabContextCloseAll()\n{\n    closeAllEditors();\n}\n\nvoid EditorManager::tabContextCopyPathToClipboard()\n{\n    QString filePath = tabContextFilePath();\n    if (filePath.isEmpty()) {\n        return;\n    }\n    qApp->clipboard()->setText(QDir::toNativeSeparators(filePath));\n}\n\nvoid EditorManager::tabContextShowInExplorer()\n{\n    QString filePath = tabContextFilePath();\n    if (filePath.isEmpty()) {\n        return;\n    }\n    FileUtil::openInExplorer(filePath);\n}\n\nvoid EditorManager::tabContextOpenInShell()\n{\n    QString filePath = tabContextFilePath();\n    if (filePath.isEmpty()) {\n        return;\n    }\n    QProcessEnvironment env = LiteApi::getCurrentEnvironment(m_liteApp);\n    FileUtil::openInShell(env,filePath);\n}\n\nvoid EditorManager::tabContextOpenInTerminal()\n{\n    QString filePath = tabContextFilePath();\n    if (filePath.isEmpty()) {\n        return;\n    }\n    QFileInfo info(filePath);\n    LiteApi::ITerminal *terminal = LiteApi::getTerminalManager(m_liteApp);\n    if (terminal) {\n        terminal->openDefaultTerminal(info.path());\n    }\n}\n\nvoid EditorManager::tabContextCloseOtherFolderFiles()\n{\n    QString filePath = tabContextFilePath();\n    if (filePath.isEmpty()) {\n        return;\n    }\n    QFileInfo info(filePath);\n    QString path = info.path();\n\n    QList<IEditor*> closeList;\n    for (int i = 0; i < m_editorTabWidget->tabBar()->count(); i++) {\n        if (i != m_tabContextIndex) {\n            QWidget *w = m_editorTabWidget->widget(i);\n            IEditor *ed = m_widgetEditorMap.value(w,0);\n            QString filePath = ed->filePath();\n            if (filePath.isEmpty()) {\n                continue;\n            }\n            QFileInfo info(filePath);\n            if (info.path() != path) {\n                closeList << ed;\n            }\n        }\n    }\n    foreach(IEditor *ed, closeList ) {\n        closeEditor(ed);\n    }\n}\n\nvoid EditorManager::tabContextCloseSameFolderFiles()\n{\n    if (m_tabContextIndex < 0) {\n        return;\n    }\n    QWidget *w = m_editorTabWidget->widget(m_tabContextIndex);\n    IEditor *ed = m_widgetEditorMap.value(w,0);\n    if (!ed) {\n        return;\n    }\n    QString filePath = ed->filePath();\n    if (filePath.isEmpty()) {\n        return;\n    }\n    QFileInfo info(filePath);\n    QString path = info.path();\n\n    QList<IEditor*> closeList;\n    closeList << ed;\n    for (int i = 0; i < m_editorTabWidget->tabBar()->count(); i++) {\n        if (i != m_tabContextIndex) {\n            QWidget *w = m_editorTabWidget->widget(i);\n            IEditor *ed = m_widgetEditorMap.value(w,0);\n            QString filePath = ed->filePath();\n            if (filePath.isEmpty()) {\n                continue;\n            }\n            QFileInfo info(filePath);\n            if (info.path() == path) {\n                closeList << ed;\n            }\n        }\n    }\n    foreach(IEditor *ed, closeList ) {\n        closeEditor(ed);\n    }\n}\n\nvoid EditorManager::moveToNewWindow()\n{\n    if (m_tabContextIndex < 0) {\n        return;\n    }\n    QWidget *w = m_editorTabWidget->widget(m_tabContextIndex);\n    IEditor *ed = m_widgetEditorMap.value(w,0);\n    if (!ed) {\n        return;\n    }\n    QString filePath = ed->filePath();\n    if (filePath.isEmpty()) {\n        return;\n    }\n    QString sessionName = \"dir:\"+QFileInfo(filePath).dir().dirName();\n    IApplication *app = m_liteApp->newInstance(sessionName);\n    QFileInfo info(filePath);\n    if (app->fileManager()->openEditor(filePath)) {\n        this->closeEditor(ed);\n        app->fileManager()->addFolderList(info.path());\n    }\n}\n\nvoid EditorManager::focusChanged(QWidget *old, QWidget *now)\n{\n    if (!m_updateMenuInFocus) {\n        return;\n    }\n    IEditContext *context = m_editContextMap.value(now);\n    updateEditorMenu(context);\n    context = m_editContextMap.value(old);\n    if (context && context->focusToolBar()) {\n        context->focusToolBar()->setEnabled(false);\n    }\n}\n\nvoid EditorManager::aboutToShowListMenu()\n{\n    m_listMenu->clear();\n    QList<QAction*> actions = m_listGroup->actions();\n    qDeleteAll(actions);\n\n    foreach (QWidget *widget, m_editorTabWidget->widgetList()) {\n        LiteApi::IEditor *editor = m_widgetEditorMap.value(widget);\n        if (!editor) {\n            continue;\n        }\n        QAction *act = new QAction(editor->name()+\"\\t\"+editor->filePath(),m_listGroup);\n        act->setCheckable(true);\n        act->setToolTip(editor->filePath());\n        m_listGroup->addAction(act);\n        if (m_currentEditor == editor) {\n            act->setChecked(true);\n        }\n    }\n    m_listMenu->addActions(m_listGroup->actions());\n}\n\nvoid EditorManager::triggeredListAction(QAction *act)\n{\n    int index = m_listGroup->actions().indexOf(act);\n    if (index < 0) {\n        return;\n    }\n    m_editorTabWidget->setCurrentIndex(index);\n}\n\nvoid EditorManager::applyOption(QString id)\n{\n    if (id != OPTION_LITEAPP) {\n        return;\n    }\n    m_isAutoIdleSaveDocuments = m_liteApp->settings()->value(LITEAPP_AUTOIDLESAVEDOCUMENTS,false).toBool();\n    m_autoIdleSaveDocumentsTime = m_liteApp->settings()->value(LITEAPP_AUTOIDLESAVEDOCUMENTS_TIME,3).toInt();\n    if (m_autoIdleSaveDocumentsTime < 1) {\n        m_autoIdleSaveDocumentsTime = 1;\n    }\n    m_maxEditorCount = m_liteApp->settings()->value(LITEAPP_MAXEDITORCOUNT,64).toInt();\n\n    m_editorTabWidget->tabBar()->setTabsClosable(m_liteApp->settings()->value(LITEAPP_EDITTABSCLOSABLE,true).toBool());\n    m_editorTabWidget->tabBar()->setEnableWheel(m_liteApp->settings()->value(LITEAPP_EDITTABSENABLEWHELL,true).toBool());\n    m_mouseExtNavigate = m_liteApp->settings()->value(LITEAPP_EDITORMOUSEEXTNAVIGATE,true).toBool();\n\n#ifdef Q_OS_MAC\n#if QT_VERSION >= 0x050900\n    QString qss = m_liteApp->settings()->value(LITEAPP_QSS,\"default.qss\").toString();\n    if (qss == \"default.qss\") {\n        m_editorTabWidget->tabBar()->setStyleSheet(\n                    \"QTabBar::tab {\"\n                    \"border: 1px solid #C4C4C3;\"\n                    \"border-bottom-color: #C2C7CB; /* same as the pane color */\"\n                    \"min-width: 8ex;\"\n                    \"padding: 4px 2px 4px 2px;\"\n                    \"}\"\n                    \"QTabBar::close-button:hover,QTabBar::close-button:selected {\"\n                    \"margin: 0px;\"\n                    \"image: url(:/images/close.png);\"\n                    \"subcontrol-position: left;\"\n                    \"padding: 1px;\"\n                    \"}\"\n                    \"QTabBar::tab:selected, QTabBar::tab:hover {\"\n                    \"background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\"\n                    \"stop: 0 #fafafa, stop: 0.4 #f4f4f4,\"\n                    \"stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);\"\n                    \"}\"\n                    \"QTabBar::tab:selected {\"\n                    \"border-color: #9B9B9B;\"\n                    \"border-bottom-color: #C2C7CB; /* same as pane color */\"\n                    \"}\"\n                    \"QTabBar::tab:!selected {\"\n                    \"margin-top: 2px; /* make non-selected tabs look smaller */\"\n                    \"}\");\n    } else {\n      m_editorTabWidget->tabBar()->setStyleSheet(\"QTabBar::close-button:hover,QTabBar::close-button:selected {margin: 0px; image: url(:/images/close.png); subcontrol-position: left; }\");\n    }\n#endif\n#endif\n\n}\n\nvoid EditorManager::appIdle(int sec)\n{\n    if (m_isAutoIdleSaveDocuments) {\n        if (sec == m_autoIdleSaveDocumentsTime) {\n            this->saveAllEditors(false);\n        }\n    }\n}\n\nvoid EditorManager::closeEditorForTab(int index)\n{\n    QWidget *w = m_editorTabWidget->widget(index);\n    IEditor *ed = m_widgetEditorMap.value(w,0);\n    closeEditor(ed);\n}\n\n"
  },
  {
    "path": "liteidex/src/liteapp/editormanager.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: editormanager.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef EDITORMANAGER_H\n#define EDITORMANAGER_H\n\n#include \"liteapi/liteapi.h\"\n#include \"colorstyle/colorstyle.h\"\n#include \"tabwidget/litetabwidget.h\"\n#include <QPointer>\n\nusing namespace LiteApi;\n\nclass LiteTabWidget;\nclass QStackedWidget;\nclass QToolButton;\nclass QLabel;\nclass QStandardItemModel;\nclass OpenEditorsWidget;\nclass QTreeView;\n\nstruct EditLocation {\n    QString filePath;\n    QByteArray state;\n};\n\nclass EditorManager : public IEditorManager\n{\n    Q_OBJECT\npublic:\n    ~EditorManager();\n    virtual bool initWithApp(IApplication *app);\n    void createActions();\npublic:\n    virtual IEditor *openEditor(const QString &fileName, const QString &mimeType);\n    virtual IEditor *openEditorByFactory(const QString &fileName, const QString &mimeType, const QString &factoryId);\n    virtual void addFactory(IEditorFactory *factory);\n    virtual void removeFactory(IEditorFactory *factory);\n    virtual QList<IEditorFactory*>  factoryList() const;\n    virtual QStringList mimeTypeList() const;\npublic:\n    virtual QWidget *widget();\n    virtual IEditor *currentEditor() const;\n    virtual void setCurrentEditor(IEditor *editor, bool ignoreNavigationHistory = false);\n    virtual IEditor *findEditor(const QString &fileName, bool canonical) const;\n    virtual QList<IEditor*> editorList() const;\n    virtual QAction *registerBrowser(IEditor *editor);\n    virtual void activeBrowser(IEditor *editor);\n    virtual void addNavigationHistory(IEditor *editor = 0,const QByteArray &saveState = QByteArray());\n    virtual void cutForwardNavigationHistory();\n    virtual void loadColorStyleScheme(const QString &file);\n    virtual const ColorStyleScheme *colorStyleScheme() const;\n    virtual void addEditContext(IEditContext *context);\n    virtual void removeEditContext(IEditContext *context);\n    virtual void updateEditInfo(const QString &info);\nprotected:\n    void addEditor(IEditor *editor);\n    bool eventFilter(QObject *target, QEvent *event);\n    QString tabContextFilePath() const;\npublic:\n    QList<IEditor*> sortedEditorList() const;\npublic slots:\n    virtual bool saveEditor(IEditor *editor = 0, bool emitAboutSave = true);\n    virtual bool saveEditorAs(IEditor *editor = 0);\n    virtual bool saveAllEditors(bool emitAboutSave = true);\n    virtual bool closeEditor(IEditor *editor = 0);\n    virtual bool closeAllEditors();\n    void tabContextClose();\n    void tabContextCloseOthers();\n    void tabContextCloseLefts();\n    void tabContextCloseRights();\n    void tabContextCloseAll();\n    void tabContextCloseOtherFolderFiles();\n    void tabContextCloseSameFolderFiles();\n    void tabContextCopyPathToClipboard();\n    void tabContextShowInExplorer();\n    void tabContextOpenInShell();\n    void tabContextOpenInTerminal();\n    void goBack();\n    void goForward();\n    void updateNavigatorActions();\n    void updateCurrentPositionInNavigationHistory();\n    void moveToNewWindow();\n    void focusChanged(QWidget *old,QWidget *now);\n    void aboutToShowListMenu();\n    void triggeredListAction(QAction *act);\n    void applyOption(QString);\n    void appIdle(int sec);\n    void closeEditorForTab(int index);\n    void updateEditorMenu(IEditContext *context);\nsignals:\n    void tabAddRequest();\n    void doubleClickedTab();\nprotected slots:\n    void editorTabChanged(int);\n    void editorTabCloseRequested(int);\n    void modificationChanged(bool);\n    void toggleBrowserAction(bool);\n    void gotoNextTab();\n    void gotoPrevTab();\nprotected:\n    QMenu *m_nullMenu;\n    QList<EditLocation> m_navigationHistory;\n    int m_currentNavigationHistoryPosition;\n    QWidget      *m_widget;\n    LiteTabWidget *m_editorTabWidget;\n    QMap<QWidget *, IEditor *> m_widgetEditorMap;\n    QStandardItemModel         *m_editorModel;\n    OpenEditorsWidget          *m_openEditorWidget;\n    QPointer<IEditor> m_currentEditor;\n    QList<IEditorFactory*>    m_factoryList;\n    QMap<IEditor*,QAction*>   m_browserActionMap;\n    QMap<QWidget*,IEditContext*> m_editContextMap;\n    QAction     *m_goBackAct;\n    QAction     *m_goForwardAct;\n    QAction     *m_gotoNextTab;\n    QAction     *m_gotoPrevTab;\n    QMenu       *m_listMenu;\n    QActionGroup *m_listGroup;\n    QMenu       *m_editMenu;\n    QMenu       *m_tabContextFileMenu;\n    QMenu       *m_tabContextNofileMenu;\n    ColorStyleScheme *m_colorStyleScheme;\n    int          m_tabContextIndex;\n    int          m_maxEditorCount;\n    QLabel      *m_lineInfo;\n    bool         m_isAutoIdleSaveDocuments;\n    bool         m_updateMenuInFocus;\n    bool         m_mouseExtNavigate;\n    int          m_autoIdleSaveDocumentsTime;\n};\n\n#endif // EDITORMANAGER_H\n"
  },
  {
    "path": "liteidex/src/liteapp/filemanager.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filemanager.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"filemanager.h\"\n#include \"newfiledialog.h\"\n#include \"fileutil/fileutil.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"folderview/folderlistview.h\"\n#include \"folderview/multifolderview.h\"\n#include \"liteapp_global.h\"\n#include \"multifolderwindow.h\"\n#include \"splitfolderwindow.h\"\n\n#include <QApplication>\n#include <QMenu>\n#include <QAction>\n#include <QFileDialog>\n#include <QFileInfo>\n#include <QRegExp>\n#include <QMenu>\n#include <QMessageBox>\n#include <QFileInfo>\n#include <QDateTime>\n#include <QFileSystemWatcher>\n#include <QMessageBox>\n#include <QTimer>\n#include <QDesktopServices>\n#include <QDir>\n#include <QVBoxLayout>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nbool FileManager::initWithApp(IApplication *app)\n{\n    if (!IFileManager::initWithApp(app)) {\n        return false;\n    }\n   // m_folderWindow = new MultiFolderWindow(app);\n\n    m_fileWatcher = new QFileSystemWatcher(this);\n    connect(m_fileWatcher,SIGNAL(fileChanged(QString)),this,SLOT(fileChanged(QString)));\n\n    m_newFileDialog = 0;\n    m_initPath = m_liteApp->settings()->value(\"FileManager/initpath\",QDir::homePath()).toString();\n\n    m_fileWatcherAutoReload = m_liteApp->settings()->value(LITEAPP_FILEWATCHERAUTORELOAD,false).toBool();\n\n    m_showHideFilesAct = new QAction(tr(\"Show Hidden Files\"),this);\n    m_showHideFilesAct->setCheckable(true);\n\n    m_showDetailsAct = new QAction(tr(\"Show Details\"),this);\n    m_showDetailsAct->setCheckable(true);\n\n    m_syncEditorAct = new QAction(QIcon(\"icon:images/sync.png\"),tr(\"Synchronize with editor\"),this);\n    m_syncEditorAct->setCheckable(true);\n\n    m_splitModeAct = new QAction(tr(\"Split Mode\"),this);\n    m_splitModeAct->setCheckable(true);\n    bool bSplitMode = m_liteApp->settings()->value(LITEAPP_FOLDERSPLITMODE,false).toBool();\n    if (bSplitMode) {\n        m_folderWindow = new SplitFolderWindow(app);\n    } else {\n        m_folderWindow = new MultiFolderWindow(app);\n    }\n    m_splitModeAct->setChecked(bSplitMode);\n\n    bool bShowHiddenFiles = m_liteApp->settings()->value(LITEAPP_FOLDERSHOWHIDENFILES,false).toBool();\n    m_showHideFilesAct->setChecked(bShowHiddenFiles);\n    m_folderWindow->setShowHideFiles(bShowHiddenFiles);\n\n    bool bShowDetails = m_liteApp->settings()->value(LITEAPP_FOLDERSHOWDETAILS,false).toBool();\n    m_showDetailsAct->setChecked(bShowDetails);\n    m_folderWindow->setShowDetails(bShowDetails);\n\n    bool bSyncEditor = m_liteApp->settings()->value(LITEAPP_FOLDERSSYNCEDITOR,false).toBool();\n    m_syncEditorAct->setChecked(bSyncEditor);\n    m_folderWindow->setSyncEditor(bSyncEditor);\n\n    connect(m_showHideFilesAct,SIGNAL(triggered(bool)),this,SLOT(setShowHideFiles(bool)));\n    connect(m_showDetailsAct,SIGNAL(triggered(bool)),this,SLOT(setShowDetails(bool)));\n    connect(m_syncEditorAct,SIGNAL(triggered(bool)),this,SLOT(setSyncEditor(bool)));\n    connect(m_splitModeAct,SIGNAL(triggered(bool)),this,SLOT(setSplitMode(bool)));\n\n    QList<QAction*> actions;\n    m_filterMenu = new QMenu(tr(\"Filter\"));\n    m_filterMenu->setIcon(QIcon(\"icon:images/filter.png\"));\n    m_filterMenu->addAction(m_showHideFilesAct);\n    m_filterMenu->addAction(m_showDetailsAct);\n    m_filterMenu->addSeparator();\n    m_filterMenu->addAction(m_splitModeAct);\n    actions << m_filterMenu->menuAction() << m_syncEditorAct;\n\n    m_folderWidget = new QWidget;\n    m_layout = new QVBoxLayout;\n    m_layout->setMargin(0);\n    m_folderWidget->setLayout(m_layout);\n    m_layout->addWidget(m_folderWindow->widget());\n\n    m_toolWindowAct = m_liteApp->toolWindowManager()->addToolWindow(Qt::LeftDockWidgetArea,m_folderWidget,\"Folders\",tr(\"Folders\"),false,actions);\n\n    return true;\n}\n\nFileManager::FileManager()\n    : m_newFileDialog(0),\n      m_folderWindow(0),\n      m_checkBlockActivated(false),\n      m_checkOnFocusChange(false)\n{\n    connect(qApp, SIGNAL(focusChanged(QWidget*,QWidget*)), this, SLOT(onApplicationFocusChange()));\n}\n\nFileManager::~FileManager()\n{\n    m_liteApp->settings()->setValue(LITEAPP_FOLDERSSYNCEDITOR,m_syncEditorAct->isChecked());\n    m_liteApp->settings()->setValue(LITEAPP_FOLDERSHOWHIDENFILES,m_showHideFilesAct->isChecked());\n    m_liteApp->settings()->setValue(LITEAPP_FOLDERSHOWDETAILS,m_showDetailsAct->isChecked());\n    m_liteApp->settings()->setValue(LITEAPP_FOLDERSPLITMODE,m_splitModeAct->isChecked());\n    delete m_filterMenu;\n    delete m_fileWatcher;\n    m_liteApp->settings()->setValue(\"FileManager/initpath\",m_initPath);\n    if (m_newFileDialog) {\n        delete m_newFileDialog;\n    }\n    delete m_folderWindow;\n}\n\nbool FileManager::findProjectTargetInfo(const QString &fileName, QMap<QString,QString>& targetInfo) const\n{\n    QString mimeType = m_liteApp->mimeTypeManager()->findMimeTypeByFile(fileName);\n    if (m_liteApp->projectManager()->mimeTypeList().contains(mimeType)) {\n        QList<IProjectFactory*> factoryList = m_liteApp->projectManager()->factoryList();\n        foreach(LiteApi::IProjectFactory *factory, factoryList) {\n            if (factory->mimeTypes().contains(mimeType)) {\n                bool ret = factory->findTargetInfo(fileName,mimeType,targetInfo);\n                if (ret) {\n                    return true;\n                }\n            }\n        }\n    }\n    return false;\n}\n\n\nQString FileManager::openAllTypeFilter() const\n{\n    QStringList types;\n    QStringList filter;\n    foreach (IMimeType *mimeType, m_liteApp->mimeTypeManager()->mimeTypeList()) {\n        QStringList patterns = mimeType->allPatterns();\n        types.append(patterns);\n        filter.append(QString(\"%1 (%2)\").arg(mimeType->comment()).arg(patterns.join(\" \")));\n    }\n    types.removeDuplicates();\n    filter.removeDuplicates();\n    if (!types.isEmpty()) {\n        QString all = QString(tr(\"All Support Files (%1)\")).arg(types.join(\" \"));\n        filter.insert(0,all);\n    }\n    filter.append(tr(\"All Files (*)\"));\n    return filter.join(\";;\");\n}\n\nQString FileManager::openProjectTypeFilter() const\n{\n    QStringList types;\n    QStringList filter;\n    QStringList projectMimeTypes = m_liteApp->projectManager()->mimeTypeList();\n    foreach (IMimeType *mimeType, m_liteApp->mimeTypeManager()->mimeTypeList()) {\n        QStringList patterns = mimeType->allPatterns();\n        if (projectMimeTypes.contains(mimeType->type())) {\n            types.append(patterns);\n            filter.append(QString(\"%1 (%2)\").arg(mimeType->comment()).arg(patterns.join(\" \")));\n        }\n    }\n    types.removeDuplicates();\n    filter.removeDuplicates();\n    if (!types.isEmpty()) {\n        QString all = QString(tr(\"All Support Files (%1)\")).arg(types.join(\" \"));\n        filter.insert(0,all);\n    }\n    filter.append(tr(\"All Files (*)\"));\n    return filter.join(\";;\");\n}\n\nQString FileManager::openEditorTypeFilter() const\n{\n    QStringList types;\n    QStringList filter;\n    QStringList projectMimeTypes = m_liteApp->editorManager()->mimeTypeList();\n    foreach (IMimeType *mimeType, m_liteApp->mimeTypeManager()->mimeTypeList()) {\n        if (projectMimeTypes.contains(mimeType->type())) {\n            QStringList patterns = mimeType->allPatterns();\n            types.append(patterns);\n            filter.append(QString(\"%1 (%2)\").arg(mimeType->comment()).arg(patterns.join(\" \")));\n        }\n    }\n    types.removeDuplicates();\n    filter.removeDuplicates();\n    if (!types.isEmpty()) {\n        QString all = QString(tr(\"All Support Files (%1)\")).arg(types.join(\" \"));\n        filter.insert(0,all);\n    }\n    filter.append(tr(\"All Files (*)\"));\n    return filter.join(\";;\");\n}\n\nQStringList FileManager::folderList() const\n{\n    return m_folderWindow->folderList();\n}\n\nvoid FileManager::setFolderList(const QStringList &folders)\n{\n    m_folderWindow->setFolderList(folders);\n}\n\nvoid FileManager::addFolderList(const QString &folder)\n{\n    m_folderWindow->addFolderList(folder);\n}\n\nIApplication* FileManager::openFolderInNewWindow(const QString &folder)\n{\n    IApplication *app = m_liteApp->newInstance(\"dir:\"+QDir(folder).dirName());\n    app->fileManager()->setFolderList(QStringList() << folder);\n    return app;\n}\n\nvoid FileManager::emitAboutToShowFolderContextMenu(QMenu *menu, FILESYSTEM_CONTEXT_FLAG flag, const QFileInfo &info, const QString &context)\n{\n    emit aboutToShowFolderContextMenu(menu,flag,info,context);\n}\n\nvoid FileManager::newFile()\n{\n    QString projPath;\n    QString filePath;\n    IProject *project = m_liteApp->projectManager()->currentProject();\n    if (project) {\n        QFileInfo info(project->filePath());\n        if (info.isDir()) {\n            projPath = info.filePath();\n        } else {\n            projPath = info.path();\n        }\n    }\n    IEditor *editor = m_liteApp->editorManager()->currentEditor();\n    if (editor && !editor->filePath().isEmpty()) {\n        filePath = QFileInfo(editor->filePath()).absolutePath();\n    }\n    if (filePath.isEmpty()) {\n#if QT_VERSION >= 0x050000\n        filePath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);\n#else\n        filePath = QDesktopServices::storageLocation(QDesktopServices::HomeLocation);\n#endif\n    }\n    if (projPath.isEmpty()) {\n#if QT_VERSION >= 0x050000\n        projPath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);\n#else\n        projPath = QDesktopServices::storageLocation(QDesktopServices::HomeLocation);\n#endif\n    }\n    execFileWizard(projPath,filePath);\n}\n\nvoid FileManager::openFiles()\n{\n    QStringList fileNames = QFileDialog::getOpenFileNames(m_liteApp->mainWindow(),\n           tr(\"Open Project or File\"), m_initPath,openAllTypeFilter());\n    if (fileNames.isEmpty())\n        return;\n    foreach (QString fileName, fileNames) {\n        if (openFile(fileName)) {\n            m_initPath = QFileInfo(fileName).canonicalPath();\n        }\n    }\n}\n\nvoid FileManager::openFolder()\n{\n     QString folder = QFileDialog::getExistingDirectory(m_liteApp->mainWindow(),\n           tr(\"Select a folder:\"), m_initPath);\n    if (!folder.isEmpty()) {\n        QDir dir(folder);\n        if (dir.cdUp()) {\n            m_initPath = dir.path();\n        }\n        this->addFolderList(folder);\n    }\n}\n\nvoid FileManager::newInstance()\n{\n    m_liteApp->newInstance(\"\");\n}\n\nvoid FileManager::openFolderNewWindow()\n{\n    QString folder = QFileDialog::getExistingDirectory(m_liteApp->mainWindow(),\n          tr(\"Select a folder:\"), m_initPath);\n   if (!folder.isEmpty()) {\n       QDir dir(folder);\n       if (dir.cdUp()) {\n           m_initPath = dir.path();\n       }\n       this->openFolderInNewWindow(folder);\n   }\n}\n\nvoid FileManager::closeAllFolders()\n{\n    m_folderWindow->closeAllFolders();\n}\n\nvoid FileManager::openEditors()\n{\n    QStringList fileNames = QFileDialog::getOpenFileNames(m_liteApp->mainWindow(),\n           tr(\"Open Files\"), m_initPath,openEditorTypeFilter());\n    if (fileNames.isEmpty())\n        return;\n    foreach (QString fileName, fileNames) {\n        if (openEditor(fileName)) {\n            m_initPath = QFileInfo(fileName).canonicalPath();\n        }\n    }\n}\n\nvoid FileManager::openProjects()\n{\n    QStringList fileNames = QFileDialog::getOpenFileNames(m_liteApp->mainWindow(),\n           tr(\"Open Project\"), m_initPath,openProjectTypeFilter());\n    if (fileNames.isEmpty())\n        return;\n    foreach (QString fileName, fileNames) {\n        if (openProject(fileName)) {\n            m_initPath = QFileInfo(fileName).canonicalPath();\n        }\n    }\n}\n\nvoid FileManager::execFileWizard(const QString &projPath, const QString &filePath, const QString &gopath)\n{\n    if (!m_newFileDialog) {\n        m_newFileDialog = new NewFileDialog(m_liteApp->mainWindow());\n        m_newFileDialog->loadTemplate(m_liteApp->resourcePath()+\"/liteapp/template\");\n    }\n    QStringList pathList = LiteApi::getGOPATH(m_liteApp,false);\n    //pathList.append(LiteApi::getGOROOT(m_liteApp));\n    pathList.removeDuplicates();\n    m_newFileDialog->setPathList(pathList);\n    if (!gopath.isEmpty()) {\n        m_newFileDialog->setGopath(gopath);\n    }\n    m_newFileDialog->setFileLocation(filePath);\n    m_newFileDialog->setProjectLocation(projPath);\n    m_newFileDialog->updateLocation();\n    if (pathList.isEmpty() && gopath.isEmpty()) {\n        m_newFileDialog->setGopath(projPath);\n    }\n\n    if (m_newFileDialog->exec() == QDialog::Accepted) {\n        //emit fileWizardFinished(m_newFileDialog->openPath(),m_newFileDialog->f)\n        emit fileWizardFinished(m_newFileDialog->type(),m_newFileDialog->scheme(),m_newFileDialog->openPath());\n        QMessageBox::StandardButton ret;\n        ret = QMessageBox::question(m_liteApp->mainWindow(), tr(\"LiteIDE\"),\n                                    tr(\"Project '%1' has been created.\\n\"\n                                       \"Do you want to open it now?\")\n                                    .arg(m_newFileDialog->openFiles().join(\" \")),\n                                    QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,\n                                    QMessageBox::Yes);\n        if (ret == QMessageBox::Yes) {\n            QString scheme = m_newFileDialog->scheme();\n            if (scheme == \"folder\") {\n                this->addFolderList(m_newFileDialog->openPath());\n            }\n            foreach(QString file, m_newFileDialog->openFiles()) {\n                this->openFile(file);\n            }\n        }\n    }\n}\n\nbool FileManager::openFile(const QString &fileName)\n{\n    QString mimeType = m_liteApp->mimeTypeManager()->findMimeTypeByFile(fileName);\n    if (m_liteApp->projectManager()->mimeTypeList().contains(mimeType)) {\n        return openProject(fileName) != 0;\n    } else {\n        return openEditor(fileName) != 0;\n    }\n    return false;\n}\n\nIEditor *FileManager::createEditor(const QString &contents, const QString &mimeType)\n{\n    foreach(LiteApi::IEditorFactory *factory, m_liteApp->editorManager()->factoryList()) {\n        if (factory->mimeTypes().contains(mimeType)) {\n            LiteApi::IEditor *editor = factory->create(contents,mimeType);\n            if (editor) {\n                return editor;\n            }\n        }\n    }\n    return NULL;\n}\n\nIEditor *FileManager::createEditor(const QString &_fileName)\n{\n    QString fileName = QDir::fromNativeSeparators(_fileName);\n\n    QString mimeType = m_liteApp->mimeTypeManager()->findMimeTypeByFile(fileName);\n\n    foreach(LiteApi::IEditorFactory *factory, m_liteApp->editorManager()->factoryList()) {\n        if (factory->mimeTypes().contains(mimeType)) {\n            LiteApi::IEditor *editor = factory->open(fileName,mimeType);\n            if (editor) {\n                return editor;\n            }\n        }\n    }\n    return NULL;\n}\n\n\nIEditor *FileManager::openEditor(const QString &_fileName, bool bActive, bool ignoreNavigationHistory)\n{\n    QString fileName = QDir::fromNativeSeparators(QDir::cleanPath(_fileName));\n\n    QString mimeType = m_liteApp->mimeTypeManager()->findMimeTypeByFile(fileName);\n\n    IEditor *editor = m_liteApp->editorManager()->openEditor(fileName,mimeType);\n    if (editor && bActive) {\n        m_liteApp->editorManager()->setCurrentEditor(editor,ignoreNavigationHistory);\n    }\n    if (editor) {\n        m_liteApp->recentManager()->addRecent(fileName,\"file\");\n    } else {\n        m_liteApp->recentManager()->removeRecent(fileName,\"file\");\n    }\n    return editor;\n}\n\nIEditor *FileManager::openEditorByFactory(const QString &_fileName, const QString &factoryId, bool bActive, bool ignoreNavigationHistory)\n{\n    QString fileName = QDir::fromNativeSeparators(QDir::cleanPath(_fileName));\n    QString mimeType = m_liteApp->mimeTypeManager()->findMimeTypeByFile(fileName);\n    IEditor *editor = m_liteApp->editorManager()->openEditorByFactory(fileName,mimeType,factoryId);\n    if (editor && bActive) {\n        m_liteApp->editorManager()->setCurrentEditor(editor,ignoreNavigationHistory);\n    }\n    if (editor) {\n        m_liteApp->recentManager()->addRecent(fileName,\"file\");\n    } else {\n        m_liteApp->recentManager()->removeRecent(fileName,\"file\");\n    }\n    return editor;\n}\n\nIProject *FileManager::openProject(const QString &_fileName)\n{\n    QString fileName = QDir::fromNativeSeparators(_fileName);\n    QString mimeType = m_liteApp->mimeTypeManager()->findMimeTypeByFile(fileName);\n    IProject *proj = m_liteApp->projectManager()->openProject(fileName,mimeType);\n    if (proj) {\n        m_liteApp->recentManager()->addRecent(fileName,\"proj\");\n    } else {\n        m_liteApp->recentManager()->removeRecent(fileName,\"proj\");\n    }\n    return proj;\n}\n\n//IApplication* FileManager::openFolderEx(const QString &folder)\n//{\n//    QDir dir(folder);\n//    if (!dir.exists()) {\n//        return m_liteApp;\n//    }\n//    if (m_folderWidget->rootPathList().isEmpty()) {\n//        m_folderWidget->setRootPath(folder);\n//    } else {\n//        if (m_liteApp->settings()->value(LITEAPP_OPTNFOLDERINNEWWINDOW,true).toBool()) {\n//            return this->openFolderInNewWindow(folder);\n//        } else {\n//            m_folderWidget->setRootPath(folder);\n//        }\n//    }\n//    m_toolWindowAct->setChecked(true);\n//    addRecentFile(folder,\"folder\");\n//    return m_liteApp;\n//}\n\nIProject *FileManager::openProjectScheme(const QString &_fileName, const QString &scheme)\n{\n    QString fileName = QDir::fromNativeSeparators(_fileName);\n    QString mimeType = m_liteApp->mimeTypeManager()->findMimeTypeByScheme(scheme);\n    if (mimeType.isEmpty()) {\n        return 0;\n    }\n    IProject *proj = m_liteApp->projectManager()->openProject(QDir::fromNativeSeparators(fileName),mimeType);\n    if (proj) {\n        m_liteApp->recentManager()->addRecent(fileName,scheme);\n    } else {\n        m_liteApp->recentManager()->removeRecent(fileName,scheme);\n    }\n    return proj;\n}\n\nvoid FileManager::applyOption(QString id)\n{\n    if (id != OPTION_LITEAPP) {\n        return;\n    }\n\n    m_fileWatcherAutoReload = m_liteApp->settings()->value(LITEAPP_FILEWATCHERAUTORELOAD,false).toBool();\n}\n\nvoid FileManager::updateFileState(const QString &fileName)\n{\n    if (fileName.isEmpty()) {\n        return;\n    }\n    m_fileStateMap.insert(fileName,QFileInfo(fileName).lastModified());\n    if (!m_fileWatcher->files().contains(fileName)) {\n        m_fileWatcher->addPath(fileName);;\n    }\n}\n\nvoid FileManager::editorCreated(LiteApi::IEditor *editor)\n{\n    if (!editor) {\n        return;\n    }\n    QString fileName = editor->filePath();\n    if (!fileName.isEmpty()) {\n        updateFileState(fileName);\n    }\n}\n\nvoid FileManager::editorAboutToClose(LiteApi::IEditor *editor)\n{    \n    if (!editor) {\n        return;\n    }\n    QString fileName = editor->filePath();\n    if (!fileName.isEmpty()) {\n        m_fileStateMap.remove(fileName);\n        m_changedFiles.remove(fileName);\n        m_fileWatcher->removePath(fileName);\n    }\n}\n\nvoid FileManager::editorSaved(LiteApi::IEditor *editor)\n{\n    if (!editor) {\n        return;\n    }\n    updateFileState(editor->filePath());\n}\n\nvoid FileManager::fileChanged(QString fileName)\n{\n    const bool wasempty = m_changedFiles.isEmpty();\n    if (m_fileStateMap.contains(fileName)) {\n        m_changedFiles.insert(fileName);\n    }\n\n    if (wasempty && !m_changedFiles.isEmpty()) {\n        QTimer::singleShot(200, this, SLOT(checkForReload()));\n    }\n}\n\nvoid FileManager::onApplicationFocusChange()\n{\n    if (!m_checkOnFocusChange)\n        return;\n    m_checkOnFocusChange = false;\n    checkForReload();\n}\n\nvoid FileManager::setShowHideFiles(bool b)\n{\n    m_folderWindow->setShowHideFiles(b);\n}\n\nvoid FileManager::setShowDetails(bool b)\n{\n    m_folderWindow->setShowDetails(b);\n}\n\nvoid FileManager::setSyncEditor(bool b)\n{\n    m_folderWindow->setSyncEditor(b);\n}\n\nvoid FileManager::setSplitMode(bool b)\n{\n    QStringList folderList = m_folderWindow->folderList();\n    delete m_folderWindow;\n    if (b) {\n        m_folderWindow = new SplitFolderWindow(m_liteApp);\n    } else {\n        m_folderWindow = new MultiFolderWindow(m_liteApp);\n    }\n    m_layout->addWidget(m_folderWindow->widget());\n    m_folderWindow->setFolderList(folderList);\n    m_folderWindow->setShowHideFiles(m_showHideFilesAct->isChecked());\n    m_folderWindow->setShowDetails(m_showDetailsAct->isChecked());\n    m_folderWindow->setSyncEditor(m_syncEditorAct->isChecked());\n}\n\nvoid FileManager::checkForReload()\n{\n    if (m_changedFiles.isEmpty()) {\n        return;\n    }\n\n    if (this->m_checkBlockActivated)\n        return;\n    if (QApplication::activeModalWidget()) {\n        // We do not want to prompt for modified file if we currently have some modal dialog open.\n        // There is no really sensible way to get notified globally if a window closed,\n        // so just check on every focus change.\n        m_checkOnFocusChange = true;\n        return;\n    }\n\n    this->m_checkBlockActivated = true;\n\n    int lastReloadRet = QMessageBox::Yes;\n    int lastCloseRet = QMessageBox::Yes;\n    QStringList files = m_changedFiles.toList();\n    m_changedFiles.clear();\n    foreach (QString fileName, files) {\n        if (!QFile::exists(fileName)) {\n            //remove\n            if (m_fileStateMap.contains(fileName)) {\n                if (!fileName.isEmpty()) {\n                    LiteApi::IEditor *editor = m_liteApp->editorManager()->findEditor(fileName,false);\n                    if (editor) {\n                        // The file has been deleted.\n                        // If the buffer is modified, ask the user what he wants to do.\n                        // Otherwise, apply the default action : close the editor.\n                        int ret = QMessageBox::Yes;\n                        if (lastCloseRet != QMessageBox::YesToAll) {\n                            if (m_fileWatcherAutoReload) {\n                                if (editor->isModified() ) {\n                                    QString text = QString(tr(\"%1\\nThis file has been deleted from the drive,\\n\"\n                                                              \"but you have unsaved modifications in your LiteIDE editor.\\n\"\n                                                              \"\\nDo you want to close the editor?\"\n                                                              \"\\nAnswering \\\"Yes\\\" will discard your unsaved changes.\")).arg(fileName);\n                                    ret = QMessageBox::question(m_liteApp->mainWindow(),tr(\"LiteIDE X\"),text,QMessageBox::YesToAll|QMessageBox::Yes|QMessageBox::No,QMessageBox::No);\n                                }\n                            } else {\n                                QString text = QString(tr(\"%1\\nThis file has been deleted from the drive.\\n\"\n                                                          \"\\nDo you want to close the editor?\")).arg(fileName);\n                                ret = QMessageBox::question(m_liteApp->mainWindow(),tr(\"LiteIDE X\"),text,QMessageBox::YesToAll|QMessageBox::Yes|QMessageBox::No,QMessageBox::No);\n                            }\n                        }\n\n                        if (ret == QMessageBox::Yes || ret == QMessageBox::YesToAll) {\n                            m_liteApp->editorManager()->closeEditor(editor);\n                            m_liteApp->appendLog(\"EditorManager\",fileName+\" remove\",false);\n                        }\n                        if (ret == QMessageBox::YesToAll) {\n                            lastCloseRet = QMessageBox::YesToAll;\n                        }\n                    }\n                }\n            }\n        } else {\n            if (m_fileStateMap.contains(fileName)) {\n                LiteApi::IEditor *editor = m_liteApp->editorManager()->findEditor(fileName,true);\n                if (editor) {\n                    // The file has been modified.\n                    // If the buffer is modified, ask the user what he wants to do.\n                    // Otherwise, apply the default action : reload the new content in the editor.\n                    QDateTime lastModified = QFileInfo(fileName).lastModified();\n                    QDateTime modified = m_fileStateMap.value(fileName);\n                    if (!m_fileWatcher->files().contains(fileName)) {\n                        m_fileWatcher->addPath(fileName);;\n                    }\n                    if (lastModified > modified) {\n                        int ret = QMessageBox::Yes;\n                        if (lastReloadRet != QMessageBox::YesToAll) {\n                            if (m_fileWatcherAutoReload) {\n                                if (editor->isModified()) {\n                                    QString text = QString(tr(\"%1\\nThis file has been modified on the drive,\\n\"\n                                        \"but you have unsaved modifications in your LiteIDE editor.\\n\"\n                                        \"\\nDo you want to reload the file from disk?\"\n                                        \"\\nAnswering \\\"Yes\\\" will discard your unsaved changes.\")).arg(fileName);\n                                    ret = QMessageBox::question(m_liteApp->mainWindow(),tr(\"LiteIDE X\"),text,QMessageBox::YesToAll|QMessageBox::Yes|QMessageBox::No,QMessageBox::YesToAll);\n                                }\n                            } else {\n                                QString text = QString(tr(\"%1\\nThis file has been modified on the drive.\\n\"\n                                    \"\\nDo you want to reload the file from disk?\")).arg(fileName);\n                                ret = QMessageBox::question(m_liteApp->mainWindow(),tr(\"LiteIDE X\"),text,QMessageBox::YesToAll|QMessageBox::Yes|QMessageBox::No,QMessageBox::YesToAll);\n                            }\n                        }\n                        if (ret == QMessageBox::YesToAll || ret == QMessageBox::Yes) {\n                            // If the file modification is the result of an internal Ctrl+S, do not reload\n                            QDateTime lastModified = QFileInfo(fileName).lastModified();\n                            QDateTime modified = m_fileStateMap.value(fileName);\n                            if (lastModified != modified) {\n                                editor->reload();\n                                m_fileStateMap.insert(fileName,lastModified);\n                                m_liteApp->appendLog(\"EditorManager\",fileName+\" reload\",false);\n\n                            }\n                        }\n                        if (ret == QMessageBox::YesToAll) {\n                            lastReloadRet = QMessageBox::YesToAll;\n                        }\n                    }\n                }\n            }\n        }\n    }\n    m_checkBlockActivated = false;\n    QTimer::singleShot(200, this, SLOT(checkForReload()));\n}\n\n\n"
  },
  {
    "path": "liteidex/src/liteapp/filemanager.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filemanager.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FILEMANAGER_H\n#define FILEMANAGER_H\n\n#include \"liteapi/liteapi.h\"\n#include <QModelIndex>\n\nusing namespace LiteApi;\n\nclass QFileSystemWatcher;\nclass NewFileDialog;\nclass FolderListView;\nclass MultiFolderView;\nclass QVBoxLayout;\n\nclass IFolderWindow : public QObject\n{\npublic:\n    IFolderWindow(QObject *parent) : QObject(parent)\n    {\n    }\n    virtual QString id() const = 0;\n    virtual QWidget *widget() const = 0;\n    virtual QStringList folderList() const = 0;\n    virtual void setFolderList(const QStringList &folders) = 0;\n    virtual void addFolderList(const QString &folder) = 0;\n    virtual void closeAllFolders() = 0;\n    virtual void setShowHideFiles(bool b) = 0;\n    virtual void setShowDetails(bool b) = 0;\n    virtual void setSyncEditor(bool b) = 0;\n};\n\nclass FileManager : public IFileManager\n{\n    Q_OBJECT\npublic:\n    FileManager();\n    virtual bool initWithApp(IApplication *app);\n    virtual ~FileManager();\npublic:\n    virtual void execFileWizard(const QString &projPath, const QString &filePath, const QString &gopath = QString());\n    virtual bool openFile(const QString &fileName);\n    virtual IEditor *openEditor(const QString &fileName, bool bActive = true, bool ignoreNavigationHistory = false);\n    virtual IEditor *openEditorByFactory(const QString &fileName, const QString &factoryId, bool bActive = true, bool ignoreNavigationHistory = false);\n    virtual IEditor *createEditor(const QString &contents, const QString &mimeType);\n    virtual IEditor *createEditor(const QString &fileName);\n    virtual IProject *openProject(const QString &fileName);\n    virtual IProject *openProjectScheme(const QString &fileName, const QString &scheme);\n\n    virtual bool findProjectTargetInfo(const QString &fileName, QMap<QString,QString>& targetInfo) const;\n    //virtual IApplication* openFolderEx(const QString &folder);\n    virtual QStringList folderList() const;\n    virtual void setFolderList(const QStringList &folders);\n    virtual void addFolderList(const QString &folder);\n    virtual IApplication* openFolderInNewWindow(const QString &folder);\n    virtual void emitAboutToShowFolderContextMenu(QMenu *menu, LiteApi::FILESYSTEM_CONTEXT_FLAG flag, const QFileInfo &info, const QString &context);\npublic:\n    QString openAllTypeFilter() const;\n    QString openProjectTypeFilter() const;\n    QString openEditorTypeFilter() const;\nprotected:\n    void updateFileState(const QString &fileName);\npublic slots:\n    void newFile();\n    void openFiles();\n    void openFolder();\n    void openFolderNewWindow();\n    void closeAllFolders();\n    void newInstance();\n    void openEditors();\n    void openProjects();\n    void fileChanged(QString);\n    void editorSaved(LiteApi::IEditor*);\n    void editorCreated(LiteApi::IEditor*);\n    void editorAboutToClose(LiteApi::IEditor*);\n    void checkForReload();\n    void applyOption(QString);\n    void onApplicationFocusChange();\n    void setShowHideFiles(bool b);\n    void setShowDetails(bool b);\n    void setSyncEditor(bool b);\n    void setSplitMode(bool b);\nprotected:\n    NewFileDialog        *m_newFileDialog;\n    IFolderWindow        *m_folderWindow;\n    QFileSystemWatcher   *m_fileWatcher;\n    QMap<QString,QDateTime> m_fileStateMap;\n    QSet<QString>           m_changedFiles;\n    bool                 m_checkBlockActivated;\n    bool                 m_checkOnFocusChange;\n    bool                 m_fileWatcherAutoReload;\n    QString              m_initPath;\n    QWidget              *m_folderWidget;\n    QVBoxLayout          *m_layout;\n    QMenu*       m_filterMenu;\n    QAction*     m_showHideFilesAct;\n    QAction*     m_showDetailsAct;\n    QAction*     m_syncEditorAct;\n    QAction*     m_splitModeAct;\n    QAction*     m_toolWindowAct;\n};\n\n#endif // FILEMANAGER_H\n"
  },
  {
    "path": "liteidex/src/liteapp/folderproject.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: folderproject.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"folderproject.h\"\n#include <QFileInfo>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nFolderProject::FolderProject(IApplication *app) :\n    m_liteApp(app), m_folderView(0)\n{\n#ifdef Q_OS_MAC\n    m_folderView = new FolderListView(true,m_liteApp);\n#else\n    m_folderView = new FolderListView(false,m_liteApp);\n#endif\n//    m_folderView = new FolderListView(false,m_liteApp);\n    m_folderView->setDragEnabled(true);\n    m_folderView->setDragDropMode(QAbstractItemView::InternalMove);\n}\n\nFolderProject::~FolderProject()\n{\n    if (m_folderView) {\n        delete m_folderView;\n    }\n}\n\nQWidget *FolderProject::widget()\n{\n    return m_folderView;\n}\n\nQString FolderProject::name() const\n{\n    return \"FolderProject\";\n}\n\nQString FolderProject::filePath() const\n{\n    QStringList paths = m_folderView->rootPathList();\n    if (!paths.isEmpty()) {\n        return paths[0];\n    }\n    return QString();\n}\n\nQString FolderProject::mimeType() const\n{\n    return \"folder/x-path\";\n}\n\nvoid FolderProject::openFolder(const QString &folder)\n{\n    m_folderView->setRootPathList(QStringList() << folder);\n}\n\nvoid FolderProject::appendFolder(const QString &folder)\n{\n    m_folderView->addRootPath(folder);\n}\n\nvoid FolderProject::clear()\n{\n    m_folderView->clear();\n}\n\nQStringList FolderProject::folderList() const\n{\n    return m_folderView->rootPathList();\n}\n\nQStringList FolderProject::fileNameList() const\n{\n    return QStringList();\n}\n\nQStringList FolderProject::filePathList() const\n{\n    return QStringList();\n}\n\nQString FolderProject::fileNameToFullPath(const QString &filePath)\n{\n    return filePath;\n}\n\nQMap<QString,QString> FolderProject::targetInfo() const\n{\n    return QMap<QString,QString>();\n}\n\nvoid FolderProject::load()\n{\n\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/folderproject.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: folderproject.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FOLDERPROJECT_H\n#define FOLDERPROJECT_H\n\n#include \"liteapi/liteapi.h\"\n#include \"folderview/folderlistview.h\"\n\nusing namespace LiteApi;\n\nclass FolderProject : public IFolderProject\n{\n    Q_OBJECT\npublic:\n    FolderProject(IApplication *app);\n    virtual ~FolderProject();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QIcon icon() const { return QIcon(); }\n    virtual QString filePath() const;\n    virtual QString mimeType() const;\n    virtual void openFolder(const QString &folder);\n    virtual void appendFolder(const QString &folder);\n    virtual void clear();\n    virtual QStringList folderList() const;\n    virtual QStringList fileNameList() const;\n    virtual QStringList filePathList() const;\n    virtual QString fileNameToFullPath(const QString &filePath);\n    virtual QMap<QString,QString> targetInfo() const;\n    virtual void load();\nprotected:\n    IApplication *m_liteApp;\n    FolderListView *m_folderView;\n};\n\n#endif // FOLDERPROJECT_H\n"
  },
  {
    "path": "liteidex/src/liteapp/folderprojectfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: folderprojectfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"folderprojectfactory.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nFolderProjectFactory::FolderProjectFactory(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IProjectFactory(parent),\n    m_liteApp(app)\n{\n    m_mimeTypes.append(\"folder/x-path\");\n}\n\nQStringList FolderProjectFactory::mimeTypes() const\n{\n    return m_mimeTypes;\n}\n\nLiteApi::IProject *FolderProjectFactory::open(const QString &fileName, const QString &mimeType)\n{\n    if (!m_mimeTypes.contains(mimeType)) {\n        return 0;\n    }\n    return m_liteApp->projectManager()->openFolder(fileName);\n}\n\nbool FolderProjectFactory::findTargetInfo(const QString&, const QString&, QMap<QString,QString>&) const\n{\n    return false;\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/folderprojectfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: folderprojectfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FOLDERPROJECTFACTORY_H\n#define FOLDERPROJECTFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass FolderProjectFactory : public LiteApi::IProjectFactory\n{\npublic:\n    FolderProjectFactory(LiteApi::IApplication *app, QObject *parnet);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IProject *open(const QString &fileName, const QString &mimeType);\n    virtual bool findTargetInfo(const QString &fileName, const QString &mimetype,  QMap<QString,QString>& targetInfo) const;\npublic:\n    LiteApi::IApplication *m_liteApp;\n    QStringList m_mimeTypes;\n};\n\n#endif // FOLDERPROJECTFACTORY_H\n"
  },
  {
    "path": "liteidex/src/liteapp/goproxy.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: goproxy.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"goproxy.h\"\n#include \"cdrv.h\"\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nstatic GODRV_CALL godrv_call_fn = 0;\n\nstatic int godrv_call(const QByteArray &id, const QByteArray &args, DRV_CALLBACK cb, void *ctx)\n{\n    if (godrv_call_fn == 0) {\n        return -1;\n    }\n    return godrv_call_fn((char*)id.constData(),id.length(),(char*)args.constData(),args.length(),cb,ctx);\n}\n\nstatic void cdrv_callback(char *id, int id_size, char *reply, int len, int err, void *ctx)\n{\n    ((GoProxy*)(ctx))->callback(id,id_size,reply,len,err);\n}\n\nGoProxy::GoProxy(QObject *parent) :\n    LiteApi::IGoProxy(parent)\n{\n    m_isRuning = false;\n}\n\nbool GoProxy::isValid() const\n{\n    return godrv_call_fn != 0;\n}\n\nbool GoProxy::hasProxy()\n{\n    return godrv_call_fn != 0;\n}\n\nbool GoProxy::isRunning() const\n{\n    return m_isRuning;\n}\n\nQByteArray GoProxy::commandId() const\n{\n    return m_id;\n}\n\nvoid GoProxy::writeStdin(const QByteArray &data)\n{\n    godrv_call(\"stdin\",data,&cdrv_callback,this);\n}\n\nvoid GoProxy::call(const QByteArray &id, const QByteArray &args)\n{\n    m_id = id;\n    m_isRuning = false;\n    godrv_call(id,args,&cdrv_callback,this);\n}\n\nvoid GoProxy::callback(char *id, int id_size, char *reply, int reply_size, int flag)\n{\n    if (m_id != QByteArray(id,id_size)) {\n        return;\n    }\n    if (flag == 0) {\n        m_isRuning = true;\n        emit started();\n    } else if(flag == 1) {\n        emit stdoutput(QByteArray(reply,reply_size));\n    } else if (flag == 2) {\n        emit stderror(QByteArray(reply,reply_size));\n    } else if (flag == 3) {\n        m_isRuning = false;\n        emit finished(0,\"\");\n    } else if (flag == 4) {\n        m_isRuning = false;\n        emit finished(2,QByteArray(reply,reply_size));\n    }\n}\n\nvoid cdrv_init(void *fn)\n{\n    godrv_call_fn = (GODRV_CALL)fn;\n}\n\nvoid cdrv_cb(DRV_CALLBACK cb, char *id, int id_size, char *reply, int size, int err, void* ctx)\n{\n    cb(id,id_size,reply,size,err,ctx);\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/goproxy.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: goproxy.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOPROXY_H\n#define GOPROXY_H\n\n#include \"liteapi/liteapi.h\"\n#include <QMap>\n\nclass GoProxy : public LiteApi::IGoProxy\n{\n    Q_OBJECT\npublic:\n    explicit GoProxy(QObject *parent = 0);\n    static bool hasProxy();\n    virtual bool isValid() const;\n    virtual bool isRunning() const;\n    virtual QByteArray commandId() const;\n    virtual void writeStdin(const QByteArray &data);\npublic slots:\n    virtual void call(const QByteArray &id, const QByteArray &args = QByteArray());\npublic:\n    void callback(char *id, int id_size, char *reply, int reply_size, int err);\nprotected:\n    bool m_isRuning;\n    QByteArray m_id;\n};\n\n#endif // GOPROXY_H\n"
  },
  {
    "path": "liteidex/src/liteapp/htmlwidgetmanager.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: htmlwidgetmanager.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"htmlwidgetmanager.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nHtmlWidgetManager::HtmlWidgetManager(QObject *parent) :\n    IHtmlWidgetManager(parent)\n{\n}\n\nQStringList HtmlWidgetManager::classNameList() const\n{\n    QStringList names;\n    foreach(IHtmlWidgetFactory *factory, m_factoryList) {\n        names.append(factory->className());\n    }\n    return names;\n}\n\nvoid HtmlWidgetManager::addFactory(IHtmlWidgetFactory *factory)\n{\n    m_factoryList.append(factory);\n    if (m_factoryList.size() == 1) {\n        m_defaultClassName = factory->className();\n    }\n}\n\nQList<IHtmlWidgetFactory *> HtmlWidgetManager::factoryList() const\n{\n    return m_factoryList;\n}\n\nIHtmlWidget *HtmlWidgetManager::create(QObject *parent)\n{\n    return createByName(parent,m_defaultClassName);\n}\n\nIHtmlWidget *HtmlWidgetManager::createByName(QObject *parent, const QString &className)\n{\n    foreach(IHtmlWidgetFactory *factory, m_factoryList) {\n        if (factory->className() == className) {\n            return factory->create(parent);\n        }\n    }\n    return 0;\n}\n\nIHtmlDocument *HtmlWidgetManager::createDocument(QObject *parent)\n{\n   return createDocumentByName(parent,m_defaultClassName);\n}\n\nIHtmlDocument *HtmlWidgetManager::createDocumentByName(QObject *parent, const QString &className)\n{\n    foreach(IHtmlWidgetFactory *factory, m_factoryList) {\n        if (factory->className() == className) {\n            return factory->createDocument(parent);\n        }\n    }\n    return 0;\n}\n\nbool HtmlWidgetManager::setDefaultClassName(const QString &className)\n{\n    foreach(IHtmlWidgetFactory *factory, m_factoryList) {\n        if (factory->className() == className) {\n            m_defaultClassName = className;\n            return true;\n        }\n    }\n    return false;\n}\n\nQString HtmlWidgetManager::defaultClassName() const\n{\n    return m_defaultClassName;\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/htmlwidgetmanager.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: htmlwidgetmanager.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef HTMLWIDGETMANAGER_H\n#define HTMLWIDGETMANAGER_H\n\n#include \"liteapi/litehtml.h\"\n\nusing namespace LiteApi;\n\nclass HtmlWidgetManager : public IHtmlWidgetManager\n{\n    Q_OBJECT\npublic:\n    explicit HtmlWidgetManager(QObject *parent = 0);\n    virtual QStringList classNameList() const;\n    virtual void addFactory(IHtmlWidgetFactory *factory);\n    virtual QList<IHtmlWidgetFactory*> factoryList() const;\n    virtual bool setDefaultClassName(const QString &className);\n    virtual QString defaultClassName() const;\n    virtual IHtmlWidget *create(QObject *parent);\n    virtual IHtmlWidget *createByName(QObject *parent, const QString &className);\n    virtual IHtmlDocument *createDocument(QObject *parent);\n    virtual IHtmlDocument *createDocumentByName(QObject *parent, const QString &className);\nprotected:\n    QList<IHtmlWidgetFactory*> m_factoryList;\n    QString m_defaultClassName;\n};\n\n#endif // HTMLWIDGETMANAGER_H\n"
  },
  {
    "path": "liteidex/src/liteapp/idletimer.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: idletimer.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"idletimer.h\"\r\n#include <QApplication>\r\n#include <QTimer>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nAppIdleTimer::AppIdleTimer()\r\n{\r\n    m_timer = new QTimer(this);\r\n    m_timer->setInterval(1000);\r\n    connect(m_timer,SIGNAL(timeout()),this,SLOT(timeout()));\r\n    qApp->installEventFilter(this);\r\n    m_count = 0;\r\n    m_timer->start();\r\n}\r\n\r\nAppIdleTimer::~AppIdleTimer()\r\n{\r\n    m_timer->stop();\r\n}\r\n\r\nvoid AppIdleTimer::resetTimer()\r\n{\r\n    m_count = 0;\r\n    m_timer->stop();\r\n    m_timer->start();\r\n}\r\n\r\nvoid AppIdleTimer::timeout()\r\n{\r\n    m_count++;\r\n    emit appIdle(m_count);\r\n}\r\n\r\nbool AppIdleTimer::eventFilter(QObject *obj, QEvent *event)\r\n{\r\n    switch (event->type()) {\r\n    case QEvent::KeyPress:\r\n    case QEvent::KeyRelease:\r\n    case QEvent::MouseButtonPress:\r\n    case QEvent::MouseButtonRelease:\r\n    case QEvent::MouseButtonDblClick:\r\n    case QEvent::MouseMove:\r\n        resetTimer();\r\n        break;\r\n    default:\r\n        break;\r\n    }\r\n    return QObject::eventFilter(obj,event);\r\n}\r\n"
  },
  {
    "path": "liteidex/src/liteapp/idletimer.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: idletimer.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef IDLETIMER_H\r\n#define IDLETIMER_H\r\n\r\n#include \"liteapi/liteapi.h\"\r\n\r\nclass AppIdleTimer : public LiteApi::IAppIdleTimer\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    AppIdleTimer();\r\n    virtual ~AppIdleTimer();\r\npublic:\r\n    virtual void resetTimer();\r\nprotected slots:\r\n    void timeout();\r\nprotected:\r\n    bool eventFilter(QObject *obj, QEvent *event);\r\nprotected:\r\n    QTimer *m_timer;\r\n    int     m_count;\r\n};\r\n\r\n#endif // IDLETIMER_H\r\n"
  },
  {
    "path": "liteidex/src/liteapp/liteapp.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteapp.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"liteapp.h\"\n#include \"filemanager.h\"\n#include \"editormanager.h\"\n#include \"projectmanager.h\"\n#include \"pluginmanager.h\"\n#include \"actionmanager.h\"\n#include \"mimetypemanager.h\"\n#include \"optionmanager.h\"\n#include \"toolwindowmanager.h\"\n#include \"htmlwidgetmanager.h\"\n#include \"recentmanager.h\"\n#include \"mainwindow.h\"\n#include \"liteappoptionfactory.h\"\n#include \"folderprojectfactory.h\"\n#include \"textbrowserhtmlwidget.h\"\n#include \"pluginsdialog.h\"\n#include \"liteapp_global.h\"\n#ifdef Q_OS_MAC\n#include \"macsupport.h\"\n#endif\n#include \"splitwindowstyle.h\"\n#include \"sidewindowstyle.h\"\n#include \"idletimer.h\"\n#include \"iconutil/iconutil.h\"\n#include \"liteapi/liteutil.h\"\n#include \"liteapi/liteids.h\"\n#include <QApplication>\n#include <QSplashScreen>\n#include <QMenuBar>\n#include <QDir>\n#include <QToolBar>\n#include <QAction>\n#include <QDateTime>\n#include <QSplitter>\n#include <QTextCursor>\n#include <QTextBlock>\n#include <QTimer>\n#include <QPainter>\n#include <QComboBox>\n#include <QProcessEnvironment>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n#define LITEIDE_VERSION \"X38.4\"\n\n\nQString LiteApp::getRootPath()\n{\n    QDir rootDir = QApplication::applicationDirPath();\n    rootDir.cdUp();\n    return rootDir.canonicalPath();\n}\n\nQString LiteApp::getToolPath()\n{\n    static QProcessEnvironment env = QProcessEnvironment::systemEnvironment();\n    QString path = env.value(\"LITEIDE_TOOL_PATH\");\n    if (!path.isEmpty()) {\n        return path;\n    }\n    return QApplication::applicationDirPath();\n}\n\nQString LiteApp::getPluginPath()\n{\n    static QProcessEnvironment env = QProcessEnvironment::systemEnvironment();\n    QString path = env.value(\"LITEIDE_PLUGIN_PATH\");\n    if (!path.isEmpty()) {\n        return path;\n    }\n    QString root = getRootPath();\n#ifdef Q_OS_MAC\n    return root+\"/PlugIns\";\n#else\n    return root+\"/lib/liteide/plugins\";\n#endif\n}\n\nQString LiteApp::getResoucePath()\n{\n    static QProcessEnvironment env = QProcessEnvironment::systemEnvironment();\n    QString path = env.value(\"LITEIDE_RES_PATH\");\n    if (!path.isEmpty()) {\n        return path;\n    }\n    QString root = getRootPath();\n#ifdef Q_OS_MAC\n    return root+\"/Resources\";\n#else\n    return root+\"/share/liteide\";\n#endif\n}\n\nQString LiteApp::getStoragePath()\n{\n#if QT_VERSION >= 0x050000\n    QString root = QStandardPaths::writableLocation(QStandardPaths::DataLocation);\n#else\n    QString root = QDesktopServices::storageLocation(QDesktopServices::DataLocation);\n#endif\n    return root+\"/liteide\";\n}\n\nIApplication* LiteApp::NewApplication(const QString &sessionName, IApplication *baseApp)\n{\n    LiteApp *app = new LiteApp;\n    app->load(sessionName,baseApp);\n    return app;\n}\n\nPluginManager *LiteApp::pluginManager()\n{\n    static PluginManager manager;\n    return &manager;\n}\n\nQList<IApplication *> LiteApp::appList()\n{\n    return s_appList;\n}\n\nQMap<QString,QVariant> LiteApp::s_cookie;\n\nQList<IApplication*> LiteApp::s_appList;\n\nLiteApp::LiteApp()\n    : m_rootPath(LiteApp::getRootPath()),\n      m_applicationPath(QApplication::applicationDirPath()),\n      m_toolPath(LiteApp::getToolPath()),\n      m_pluginPath(LiteApp::getPluginPath()),\n      m_resourcePath(LiteApp::getResoucePath()),\n      m_storagePath(LiteApp::getStoragePath())\n{    \n    s_appList.append(this);\n\n    QSettings global(m_resourcePath+\"/liteapp/config/global.ini\",QSettings::IniFormat);\n    bool storeLocal = global.value(LITEIDE_STORELOCAL,false).toBool();\n\n    QString flagLocalSetting = \"--local-setting\";\n    QString flagUserSetting = \"--user-setting\";\n\n    if (s_cookie.value(flagUserSetting).toBool()) {\n        storeLocal = false;\n    } else if (s_cookie.value(flagLocalSetting).toBool()) {\n        storeLocal = true;\n    }\n\n    if (storeLocal) {\n        m_settings = new QSettings(m_resourcePath+\"/liteapp/config/liteide.ini\", QSettings::IniFormat);\n    } else {\n        m_settings = new QSettings(QSettings::IniFormat,QSettings::UserScope,\"liteide\",\"liteide\",this);\n    }\n\n    QStringList searchPathList;\n    if (m_settings->value(LITEIDE_CUSTOMEICON,false).toBool()) {\n        QString iconPath = m_settings->value(LITEIDE_CUSTOMEICONPATH,\"default\").toString();\n        if (!iconPath.isEmpty()) {\n            searchPathList << m_resourcePath+\"/liteapp/qrc/\"+iconPath+\"/liteapp\";\n            searchPathList << m_resourcePath+\"/liteapp/qrc/\"+iconPath;\n        }\n    }\n    searchPathList << \":/\";\n    searchPathList << m_resourcePath+\"/liteapp/qrc/default/liteapp\";\n    searchPathList << m_resourcePath+\"/liteapp/qrc/default\";\n    QDir::setSearchPaths(\"icon\",searchPathList);\n\n    m_extension = new Extension;\n\n    //install idle timer;\n    m_idleTimer = new AppIdleTimer;\n    m_extension->addObject(\"LiteApi.IAppIdleTimer\",m_idleTimer);\n\n    m_mainwindow = new MainWindow(this);\n\n    QString style = this->settings()->value(LITEAPP_STYLE,\"sidebar\").toString();\n    if (style == \"splitter\") {\n        SplitWindowStyle *style = new SplitWindowStyle(this,m_mainwindow);\n        m_mainwindow->setWindowStyle(style);\n    } else {\n        SideWindowStyle *style = new SideWindowStyle(this,m_mainwindow);\n        m_mainwindow->setWindowStyle(style);\n    }\n\n    m_toolWindowManager = new ToolWindowManager;\n    m_htmlWidgetManager = new HtmlWidgetManager;\n    m_actionManager = new ActionManager;\n    m_projectManager = new ProjectManager;\n    m_fileManager = new FileManager;\n    m_editorManager = new EditorManager;\n    m_mimeTypeManager = new MimeTypeManager;\n    m_optionManager = new OptionManager;\n    m_recentManager = new RecentManager;\n\n    m_goProxy = new GoProxy(this);\n    m_actionManager->initWithApp(this);\n\n    m_mainwindow->createToolWindowMenu();\n\n    m_toolWindowManager->initWithApp(this);\n    m_mimeTypeManager->initWithApp(this);\n    m_recentManager->initWithApp(this);\n    m_projectManager->initWithApp(this);\n    m_fileManager->initWithApp(this);\n    m_editorManager->initWithApp(this);\n    m_optionManager->initWithApp(this);\n\n    //m_mainwindow->setCentralWidget(m_editorManager->widget());\n    m_mainwindow->splitter()->addWidget(m_editorManager->widget());\n    //m_mainwindow->splitter()->addWidget(m_outputManager->widget());\n    m_mainwindow->splitter()->setStretchFactor(0,50);\n    //m_mainwindow->setStatusBar(m_outputManager->statusBar());\n\n    m_htmlWidgetManager->addFactory(new TextBrowserHtmlWidgetFactory(this));\n\n    m_extension->addObject(\"LiteApi.IMimeTypeManager\",m_mimeTypeManager);\n    m_extension->addObject(\"LiteApi.IProjectManager\",m_projectManager);\n    m_extension->addObject(\"LiteApi.IEditManager\",m_editorManager);\n    m_extension->addObject(\"LiteApi.IOptoinManager\",m_optionManager);\n    m_extension->addObject(\"LiteApi.IToolWindowManager\",m_toolWindowManager);\n    m_extension->addObject(\"LiteApi.QMainWindow\",m_mainwindow);\n    m_extension->addObject(\"LiteApi.QMainWindow.QSplitter\",m_mainwindow->splitter());\n    m_extension->addObject(\"LiteApi.IHtmlWidgetManager\",m_htmlWidgetManager);\n\n    //add actions\n    connect(m_projectManager,SIGNAL(currentProjectChanged(LiteApi::IProject*)),this,SLOT(currentProjectChanged(LiteApi::IProject*)));\n    connect(m_editorManager,SIGNAL(currentEditorChanged(LiteApi::IEditor*)),m_projectManager,SLOT(currentEditorChanged(LiteApi::IEditor*)));\n    connect(m_editorManager,SIGNAL(currentEditorChanged(LiteApi::IEditor*)),m_mainwindow,SLOT(currentEditorChanged(LiteApi::IEditor*)));\n    connect(m_editorManager,SIGNAL(editorModifyChanged(LiteApi::IEditor*,bool)),m_mainwindow,SLOT(editorModifyChanged(LiteApi::IEditor*,bool)));\n    connect(m_editorManager,SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(currentEditorChanged(LiteApi::IEditor*)));\n    connect(m_editorManager,SIGNAL(tabAddRequest()),m_fileManager,SLOT(openEditors()));\n    connect(m_editorManager,SIGNAL(editorSaved(LiteApi::IEditor*)),m_fileManager,SLOT(editorSaved(LiteApi::IEditor*)));\n    connect(m_editorManager,SIGNAL(editorCreated(LiteApi::IEditor*)),m_fileManager,SLOT(editorCreated(LiteApi::IEditor*)));\n    connect(m_editorManager,SIGNAL(editorAboutToClose(LiteApi::IEditor*)),m_fileManager,SLOT(editorAboutToClose(LiteApi::IEditor*)));\n    connect(m_editorManager,SIGNAL(doubleClickedTab()),m_mainwindow,SLOT(showOrHideToolWindow()));\n    connect(m_optionManager,SIGNAL(applyOption(QString)),m_fileManager,SLOT(applyOption(QString)));\n    connect(m_optionManager,SIGNAL(applyOption(QString)),m_projectManager,SLOT(applyOption(QString)));\n    connect(m_optionManager,SIGNAL(applyOption(QString)),m_editorManager,SLOT(applyOption(QString)));\n    connect(m_optionManager,SIGNAL(applyOption(QString)),this,SLOT(applyOption(QString)));\n\n    QAction *esc = new QAction(tr(\"Escape\"),this);\n    m_actionManager->getActionContext(this,\"App\")->regAction(esc,\"Escape\",\"ESC\");\n    m_mainwindow->addAction(esc);\n    connect(esc,SIGNAL(triggered()),this,SLOT(escape()));\n\n    createActions();\n    createMenus();\n    createToolBars();\n\n    m_editorManager->createActions();\n\n    m_logOutput = new TextOutput(this);\n    //m_outputManager->addOutuput(m_logOutput,tr(\"Console\"));\n    m_logAct = m_toolWindowManager->addToolWindow(Qt::BottomDockWidgetArea,m_logOutput,\"EventLog\",tr(\"Event Log\"),true);\n    connect(m_logOutput,SIGNAL(dbclickEvent(QTextCursor)),this,SLOT(dbclickLogOutput(QTextCursor)));\n\n    m_optionAct = new QAction(loadIcon(\"icon:images/options.png\"),tr(\"Options\"),this);\n    m_optionAct->setMenuRole(QAction::PreferencesRole);\n    m_actionManager->setViewMenuSeparator(\"sep/option\",true);\n    m_actionManager->insertViewMenuAction(m_optionAct,\"sep/option\");\n\n    m_stdToolBar->addSeparator();\n    m_stdToolBar->addAction(m_optionAct);\n\n    connect(m_optionAct,SIGNAL(triggered()),m_optionManager,SLOT(exec()));\n\n    this->appendLog(\"LiteApp\",\"Initializing\");\n    this->appendLog(\"Load Setting\",m_settings->fileName());\n\n    m_liteAppOptionFactory = new LiteAppOptionFactory(this,this);\n\n    m_optionManager->addFactory(m_liteAppOptionFactory);\n\n    connect(m_goProxy,SIGNAL(stdoutput(QByteArray)),this,SLOT(goproxyDone(QByteArray)));\n    //connect(this,SIGNAL(key_escape()),m_mainwindow,SLOT(hideOutputWindow()));\n    connect(m_mainwindow,SIGNAL(fullScreenStateChanged(bool)),m_fullScreent,SLOT(setChecked(bool)));\n}\n\nstatic QImage makeSplashImage(LiteApi::IApplication *app)\n{\n    QRect r(0,0,400,280);\n    QImage image(r.size(),QImage::Format_ARGB32_Premultiplied);\n\n    QPainter painter(&image);\n    painter.setRenderHint(QPainter::Antialiasing,true);\n\n    QLinearGradient lg(0,0,r.width(),r.height());\n    lg.setColorAt(0.0,qRgb(0,125,127));\n    lg.setColorAt(1.0,qRgb(0,88,127));\n\n    QBrush bk(lg);\n    painter.fillRect(r,bk);\n    int th = r.height()*2/5;\n    int bh = r.height()-th;\n    painter.fillRect(1,th,r.width()-2,bh-1,Qt::white);\n\n    QFont font(\"Timer\",32);\n    font.setPointSize(32);\n    font.setItalic(true);\n    painter.setPen(Qt::white);\n    painter.setFont(font);\n    painter.drawText(2,2,r.width()-2,th,Qt::AlignCenter,app->ideFullName());\n\n    font.setPointSize(9);\n    font.setItalic(false);\n    font.setBold(true);\n    painter.setPen(Qt::black);\n    painter.setFont(font);\n    painter.drawText(10,th,r.width()-10,bh,Qt::AlignLeft|Qt::AlignVCenter,app->ideCopyright());\n\n    painter.drawImage(r.width()-145,r.height()-145,QImage(\"icon:/images/liteide-logo128.png\"));\n    return image;\n}\n\nvoid LiteApp::load(const QString &sessionName, IApplication *baseApp)\n{\n    bool bLoadSession = true;\n    if (baseApp == 0) {\n        bLoadSession = m_settings->value(LITEAPP_AUTOLOADLASTSESSION,true).toBool();\n    }\n\n    m_currentSession = sessionName;\n    if (!bLoadSession) {\n        m_currentSession = \"emtpy\";\n    }\n\n    QSplashScreen *splash = 0;\n    bool bSplash = m_settings->value(LITEAPP_SPLASHVISIBLE,true).toBool();\n    if (baseApp) {\n        bSplash = false;\n    }\n    if (bSplash) {\n        splash = new QSplashScreen(QPixmap::fromImage(makeSplashImage(this)),Qt::WindowStaysOnTopHint);\n    }\n    if (bSplash) {\n        splash->show();\n    }\n\n    if (bSplash) {\n        splash->showMessage(\"Scanning plugins...\",Qt::AlignLeft|Qt::AlignBottom);\n    }\n\n    qApp->processEvents();\n\n    loadMimeType();\n    loadPlugins();\n\n    if (bSplash) {\n        splash->showMessage(\"Loading plugins...\",Qt::AlignLeft|Qt::AlignBottom);\n    }\n\n    qApp->processEvents();\n    initPlugins();\n\n    if (bSplash) {\n        splash->showMessage(\"Loading state...\",Qt::AlignLeft|Qt::AlignBottom);\n    }\n\n    qApp->processEvents();\n    loadState();\n    if (baseApp) {\n        if (baseApp->mainWindow()->isMaximized()) {\n            m_mainwindow->resize(800,600);\n            m_mainwindow->show();\n        } else {\n            QRect rc = baseApp->mainWindow()->geometry();\n            rc.adjust(20,20,20,20);\n            m_mainwindow->setGeometry(rc);\n            m_mainwindow->show();\n        }\n    } else {\n        m_mainwindow->show();\n    }\n\n    emit loaded();\n    m_projectManager->setCurrentProject(0);\n\n    if (bSplash) {\n        splash->showMessage(\"Loading session...\",Qt::AlignLeft|Qt::AlignBottom);\n    }\n\n    qApp->processEvents();\n\n    if (bLoadSession && !sessionName.isEmpty()) {\n        loadSession(sessionName);\n        this->appendLog(\"Load session\",sessionName);\n    }\n\n    if (bSplash) {\n        m_mainwindow->raise();\n        splash->finish(m_mainwindow);\n        splash->deleteLater();\n    }\n\n    this->appendLog(\"HtmlWidgetFactory\",m_htmlWidgetManager->classNameList().join(\" \"));\n    this->appendLog(\"DefaultHtmlWidgetFactory\",m_htmlWidgetManager->defaultClassName());\n\n    m_goProxy->call(\"version\");\n\t\n    appendLog(\"LiteApp\",\"Finished loading\");\n}\n\nLiteApp::~LiteApp()\n{\n    s_appList.removeAll(this);\n    cleanup();\n}\n\nIExtension *LiteApp::extension()\n{\n    return m_extension;\n}\n\nvoid LiteApp::cleanup()\n{\n    //\n    emit aboutToQuit();\n    //delete plugin by reverse depend\n    QListIterator<IPlugin*> it(m_pluginList);\n    it.toBack();\n    while(it.hasPrevious()) {\n        IPlugin *p = it.previous();\n        //qDebug() << \"clean plugin\" << p;\n        delete p;\n    }\n    m_pluginList.clear();\n\n    delete m_idleTimer;\n    delete m_projectManager;\n    delete m_editorManager;\n    delete m_htmlWidgetManager;\n    delete m_liteAppOptionFactory;\n    delete m_fileManager;\n    delete m_mimeTypeManager;\n    delete m_optionManager;\n    delete m_logOutput;\n    delete m_toolWindowManager;\n    delete m_recentManager;\n    delete m_actionManager;\n    delete m_extension;\n    delete m_settings;\n}\n\nvoid LiteApp::aboutPlugins()\n{\n    PluginsDialog *dlg = new PluginsDialog(this,m_mainwindow);\n    foreach (LiteApi::IPluginFactory *factory, pluginManager()->factoryList()) {\n        dlg->appendInfo(factory->info());\n    }\n    dlg->exec();\n}\n\nvoid LiteApp::escape()\n{\n    IEditor *editor = m_editorManager->currentEditor();\n    if (!editor) {\n        return;\n    }\n    bool bFocus = editor->widget()->isAncestorOf(qApp->focusWidget());\n    if (!bFocus) {\n        editor->onActive();\n    } else {\n        emit key_escape();\n        m_mainwindow->hideOutputWindow();\n    }\n}\n\nvoid LiteApp::newWindow()\n{\n    LiteApp::newInstance(\"default\");\n}\n\nvoid LiteApp::closeWindow()\n{\n    m_mainwindow->close();\n}\n\nvoid LiteApp::exit()\n{\n    qApp->closeAllWindows();\n}\n\nvoid LiteApp::applyOption(QString id)\n{\n    if (id != OPTION_LITEAPP) {\n        return;\n    }\n    //bool b = m_settings->value(LITEAPP_OPTNFOLDERINNEWWINDOW,true).toBool();\n    //m_openFolderNewWindowAct->setVisible(!b);\n}\n\nbool LiteApp::hasGoProxy() const\n{\n    return GoProxy::hasProxy();\n}\n\nIGoProxy *LiteApp::createGoProxy(QObject *parent)\n{\n    return new GoProxy(parent);\n}\n\nIApplication *LiteApp::newInstance(const QString &sessionName)\n{\n    return LiteApp::NewApplication(sessionName,this);\n}\n\nQList<IApplication *> LiteApp::instanceList() const\n{\n    return s_appList;\n}\n\nIEditorManager *LiteApp::editorManager()\n{\n    return m_editorManager;\n}\n\nIFileManager *LiteApp::fileManager()\n{\n    return m_fileManager;\n}\n\nIProjectManager *LiteApp::projectManager()\n{\n    return m_projectManager;\n}\n\nIActionManager  *LiteApp::actionManager()\n{\n    return m_actionManager;\n}\n\nIMimeTypeManager *LiteApp::mimeTypeManager()\n{\n    return m_mimeTypeManager;\n}\n\nIOptionManager  *LiteApp::optionManager()\n{\n    return m_optionManager;\n}\n\nIToolWindowManager *LiteApp::toolWindowManager()\n{\n    return m_toolWindowManager;\n}\n\nIHtmlWidgetManager *LiteApp::htmlWidgetManager()\n{\n    return m_htmlWidgetManager;\n}\n\nIRecentManager *LiteApp::recentManager()\n{\n    return m_recentManager;\n}\n\nQMainWindow *LiteApp::mainWindow() const\n{\n    return m_mainwindow;\n}\n\nQSettings *LiteApp::settings()\n{\n    return m_settings;\n}\n\nQMap<QString,QVariant> &LiteApp::globalCookie()\n{\n    return s_cookie;\n}\n\nQString LiteApp::rootPath() const\n{\n    return m_rootPath;\n}\n\nQString LiteApp::resourcePath() const\n{\n    return m_resourcePath;\n}\n\nQString LiteApp::applicationPath() const\n{\n    return m_applicationPath;\n}\n\nQString LiteApp::toolPath() const\n{\n    return m_toolPath;\n}\n\nQString LiteApp::pluginPath() const\n{\n    return m_pluginPath;\n}\n\nQString LiteApp::storagePath() const\n{\n    return m_storagePath;\n}\n\nQString LiteApp::ideVersion() const\n{\n    return LITEIDE_VERSION;\n}\n\nQString LiteApp::ideFullName() const\n{\n    return this->ideName()+\" \"+this->ideVersion();\n}\n\nQString LiteApp::ideName() const\n{\n    return \"LiteIDE\";\n}\n\nQString LiteApp::ideCopyright() const\n{\n    static QString s_info =\n    \"2011-2023(c)\\n\"\n    \"visualfc@gmail.com\\n\"\n    \"\\n\"\n    \"https://github.com/visualfc/liteide\\n\";\n    return s_info;\n}\n\nvoid LiteApp::setPluginPath(const QString &path)\n{\n    m_pluginPath = path;\n    appendLog(\"LiteApp\",\"Set plugin path to \"+path);\n}\n\nvoid LiteApp::setResourcePath(const QString &path)\n{\n    m_resourcePath = path;\n    appendLog(\"LiteApp\",\"Set resource path to \"+path);\n}\n\n\nQList<IPlugin*> LiteApp::pluginList() const\n{\n    return m_pluginList;\n}\n\nvoid LiteApp::appendLog(const QString &model, const QString &log, bool error)\n{\n    QDateTime dt = QDateTime::currentDateTime();\n    QString text = dt.toString(\"hh:mm:ss\");\n    text += QLatin1Char(' ');\n    text += model;\n    text += \": \";\n    text += log;\n    text += QLatin1Char('\\n');\n    m_logOutput->updateExistsTextColor();\n    if (error) {\n        m_logOutput->append(text,Qt::red);\n        m_logAct->setChecked(true);\n    } else {\n        m_logOutput->append(text);\n    }\n}\n\nvoid LiteApp::sendBroadcast(const QString &module, const QString &id, const QVariant &param)\n{\n    emit broadcast(module,id,param);\n}\n\nvoid LiteApp::loadPlugins()\n{\n    pluginManager()->loadPlugins(m_pluginPath);\n}\n\nvoid LiteApp::loadMimeType()\n{\n    QDir dir(m_resourcePath+\"/liteapp/mimetype\");\n    if (dir.exists()) {\n        m_mimeTypeManager->loadMimeTypes(dir.absolutePath());\n    }\n}\n\nvoid LiteApp::initPlugins()\n{\n    foreach (IPluginFactory *factory,pluginManager()->factoryList()) {\n        bool load = m_settings->value(QString(\"liteapp/%1_load\").arg(factory->id()),true).toBool();\n        if (!load) {\n            continue;\n        }\n        LiteApi::IPlugin *plugin = factory->createPlugin();\n        if (plugin) {\n            bool ret = plugin->load(this);\n            if (ret) {\n                m_pluginList.append(plugin);\n            }\n            appendLog(\"LiteApp\",QString(\"%1 %2\").arg(ret?\"Loaded\":\"ERROR while loading\").arg(factory->id()),!ret);\n        }\n    }\n}\n\nvoid LiteApp::createActions()\n{\n    IActionContext *actionContext =  m_actionManager->getActionContext(this,\"App\");\n\n    m_newAct = new QAction(loadIcon(\"icon:images/new.png\"),tr(\"New...\"),m_mainwindow);\n    actionContext->regAction(m_newAct,\"New\",QKeySequence::New);\n\n    m_openFileAct = new QAction(loadIcon(\"icon:images/openfile.png\"),tr(\"Open File...\"),m_mainwindow);\n    actionContext->regAction(m_openFileAct,\"OpenFile\",QKeySequence::Open);\n\n    m_openFolderAct = new QAction(loadIcon(\"icon:images/openfolder.png\"),tr(\"Open Folder...\"),m_mainwindow);\n    actionContext->regAction(m_openFolderAct,\"OpenFolder\",\"\");\n\n    m_openFolderNewWindowAct = new QAction(loadIcon(\"icon:images/openfolder.png\"),tr(\"Open Folder in New Window...\"),m_mainwindow);\n    //bool b = m_settings->value(LITEAPP_OPTNFOLDERINNEWWINDOW,true).toBool();\n    //m_openFolderNewWindowAct->setVisible(!b);\n    actionContext->regAction(m_openFolderNewWindowAct,\"OpenFolderNewWindow\",\"\");\n\n    m_closeAllFolderAct = new QAction(tr(\"Close All Folders\"),m_mainwindow);\n    actionContext->regAction(m_closeAllFolderAct,\"CloseAllFolders\",\"\");\n\n    m_newWindow = new QAction(tr(\"New Window\"),m_mainwindow);\n    actionContext->regAction(m_newWindow,\"NewWindow\",\"Ctrl+Shift+N\");\n\n    m_closeWindow = new QAction(tr(\"Close Window\"),m_mainwindow);\n    actionContext->regAction(m_closeWindow,\"CloseWindow\",\"Ctrl+Shift+W\");\n\n    m_closeAct = new QAction(loadIcon(\"icon:images/closefile.png\"),tr(\"Close File\"),m_mainwindow);\n    actionContext->regAction(m_closeAct,\"CloseFile\",\"Ctrl+W\");\n\n    m_closeAllAct = new QAction(tr(\"Close All Files\"),m_mainwindow);\n    actionContext->regAction(m_closeAllAct,\"CloseAllFiles\",\"\");\n\n    m_openProjectAct = new QAction(loadIcon(\"icon:images/openproject.png\"),tr(\"Open Project\"),m_mainwindow);\n\n    m_saveProjectAct = new QAction(loadIcon(\"icon:images/saveproject.png\"),tr(\"Save Project\"),m_mainwindow);\n\n    m_closeProjectAct = new QAction(loadIcon(\"icon:images/closeproject.png\"),tr(\"Close Project\"),m_mainwindow);\n    actionContext->regAction(m_closeProjectAct,\"CloseProject\",\"\");\n\n    m_saveAct = new QAction(loadIcon(\"icon:images/save.png\"),tr(\"Save File\"),m_mainwindow);\n    actionContext->regAction(m_saveAct,\"SaveFile\",QKeySequence::Save);\n\n    m_saveAsAct = new QAction(tr(\"Save File As...\"),m_mainwindow);\n    actionContext->regAction(m_saveAsAct,\"SaveFileAs\",QKeySequence::SaveAs);\n\n    m_saveAllAct = new QAction(loadIcon(\"icon:images/saveall.png\"),tr(\"Save All Files\"),m_mainwindow);\n    actionContext->regAction(m_saveAllAct,\"SaveAllFiles\",\"\");\n\n    m_exitAct = new QAction(tr(\"Exit\"),m_mainwindow);\n#ifdef Q_OS_WIN\n    actionContext->regAction(m_exitAct,\"Exit\",\"Ctrl+Q\");\n#else\n    actionContext->regAction(m_exitAct,\"Exit\",QKeySequence::Quit);\n#endif\n    m_fullScreent = new QAction(tr(\"Full Screen\"),m_mainwindow);\n    m_fullScreent->setCheckable(true);\n    actionContext->regAction(m_fullScreent,\"FullScreen\",\"Ctrl+Shift+F11\");\n\n    m_aboutAct = new QAction(tr(\"About LiteIDE\"),m_mainwindow);\n#if defined(Q_OS_OSX)\n    m_aboutAct->setMenuRole(QAction::AboutRole);\n#endif\n    actionContext->regAction(m_aboutAct,\"About\",\"\");\n\n    m_aboutPluginsAct = new QAction(tr(\"About Plugins\"),m_mainwindow);\n#if defined(Q_OS_OSX)\n    m_aboutPluginsAct->setMenuRole(QAction::ApplicationSpecificRole);\n#endif\n    actionContext->regAction(m_aboutPluginsAct,\"AboutPlugins\",\"\");\n\n    connect(m_newAct,SIGNAL(triggered()),m_fileManager,SLOT(newFile()));\n    connect(m_openFileAct,SIGNAL(triggered()),m_fileManager,SLOT(openFiles()));\n    connect(m_openFolderAct,SIGNAL(triggered()),m_fileManager,SLOT(openFolder()));\n    connect(m_openFolderNewWindowAct,SIGNAL(triggered()),m_fileManager,SLOT(openFolderNewWindow()));\n    connect(m_closeAllFolderAct,SIGNAL(triggered()),m_fileManager,SLOT(closeAllFolders()));\n    connect(m_newWindow,SIGNAL(triggered()),this,SLOT(newWindow()));\n    connect(m_closeWindow,SIGNAL(triggered()),this,SLOT(closeWindow()));\n    connect(m_closeAct,SIGNAL(triggered()),m_editorManager,SLOT(closeEditor()));\n    connect(m_closeAllAct,SIGNAL(triggered()),m_editorManager,SLOT(closeAllEditors()));\n    connect(m_openProjectAct,SIGNAL(triggered()),m_fileManager,SLOT(openProjects()));\n    connect(m_saveProjectAct,SIGNAL(triggered()),m_projectManager,SLOT(saveProject()));\n    connect(m_closeProjectAct,SIGNAL(triggered()),m_projectManager,SLOT(closeProject()));\n    connect(m_saveAct,SIGNAL(triggered()),m_editorManager,SLOT(saveEditor()));\n    connect(m_saveAsAct,SIGNAL(triggered()),m_editorManager,SLOT(saveEditorAs()));\n    connect(m_saveAllAct,SIGNAL(triggered()),m_editorManager,SLOT(saveAllEditors()));\n    connect(m_exitAct,SIGNAL(triggered()),this,SLOT(exit()));\n    connect(m_aboutAct,SIGNAL(triggered()),m_mainwindow,SLOT(about()));\n    connect(m_aboutPluginsAct,SIGNAL(triggered()),this,SLOT(aboutPlugins()));\n    connect(m_fullScreent,SIGNAL(toggled(bool)),m_mainwindow,SLOT(setFullScreen(bool)));\n}\n\nvoid LiteApp::createMenus()\n{\n    m_fileMenu = m_actionManager->loadMenu(ID_MENU_FILE);\n    m_viewMenu = m_actionManager->loadMenu(ID_MENU_VIEW);\n    m_helpMenu = m_actionManager->loadMenu(ID_MENU_HELP);\n\n    m_fileMenu->addAction(m_newAct);\n    m_fileMenu->addAction(m_openFileAct);\n    m_fileMenu->addAction(m_openFolderAct);\n    m_fileMenu->addAction(m_openFolderNewWindowAct);\n    m_fileMenu->addSeparator();\n    m_fileMenu->addAction(m_saveAct);\n    m_fileMenu->addAction(m_saveAsAct);\n    m_fileMenu->addAction(m_saveAllAct);\n    m_fileMenu->addSeparator();\n    m_fileMenu->addAction(m_newWindow);\n    m_fileMenu->addAction(m_closeWindow);\n    m_fileMenu->addSeparator();\n\n    m_fileMenu->addAction(m_closeAct);\n    m_fileMenu->addAction(m_closeAllAct);\n    m_fileMenu->addAction(m_closeAllFolderAct);\n    //m_fileMenu->addAction(m_closeProjectAct);\n    //m_fileMenu->addAction(m_openProjectAct);\n    //m_fileMenu->addAction(m_saveProjectAct);\n    m_fileMenu->addSeparator();\n    m_fileMenu->addAction(m_exitAct);\n\n#ifdef Q_OS_MAC\n    if (MacSupport::isLionOrHigh()) {\n        MacSupport::setFullScreen(m_mainwindow);\n    } else {\n        m_viewMenu->addAction(m_fullScreent);\n    }\n#else\n    m_viewMenu->addAction(m_fullScreent);\n#endif\n\n    m_viewMenu->addSeparator();\n\n    m_helpMenu->addAction(m_aboutAct);\n    m_helpMenu->addAction(m_aboutPluginsAct);\n}\n\nvoid LiteApp::createToolBars()\n{\n    m_stdToolBar = m_actionManager->loadToolBar(ID_TOOLBAR_STD);\n    m_stdToolBar->addAction(m_newAct);\n    m_stdToolBar->addSeparator();\n    m_stdToolBar->addAction(m_openFileAct);\n    m_stdToolBar->addAction(m_openFolderAct);\n    m_stdToolBar->addAction(m_saveAct);\n    m_stdToolBar->addAction(m_saveAllAct);\n    //m_stdToolBar->addSeparator();\n    //m_stdToolBar->addAction(m_openProjectAct);\n    //m_stdToolBar->addAction(m_saveProjectAct);\n    //m_stdToolBar->addAction(m_closeProjectAct);\n}\n\nvoid LiteApp::projectReloaded()\n{\n    LiteApi::IProject *project = (LiteApi::IProject*)sender();\n    if (project) {\n        //m_outputManager->setProjectInfo(project->filePath());\n    }\n}\n\nvoid LiteApp::currentProjectChanged(IProject *project)\n{\n    bool b = (project != 0);\n    m_saveProjectAct->setEnabled(b);\n    m_closeProjectAct->setEnabled(b);\n    if (project) {\n        //m_outputManager->setProjectInfo(project->filePath());\n        connect(project,SIGNAL(reloaded()),this,SLOT(projectReloaded()));\n    } else {\n        //m_outputManager->setProjectInfo(\"\");\n    }\n}\n\nvoid LiteApp::currentEditorChanged(IEditor *editor)\n{\n    bool b = (editor != 0);\n\n    if (b) {\n        connect(editor,SIGNAL(modificationChanged(bool)),this,SLOT(editorModifyChanged(bool)));\n    }\n    m_saveAct->setEnabled(b && editor->isModified() && !editor->isReadOnly());\n    m_saveAsAct->setEnabled(editor && !editor->filePath().isEmpty());\n    m_saveAllAct->setEnabled(b);\n    m_closeAct->setEnabled(b);\n    m_closeAllAct->setEnabled(b);\n}\n\nvoid LiteApp::editorModifyChanged(bool /*b*/)\n{\n    IEditor *editor = (IEditor*)sender();\n    if (editor && editor->isModified() && !editor->isReadOnly()) {\n        m_saveAct->setEnabled(true);\n    } else {\n        m_saveAct->setEnabled(false);\n    }\n}\n\nvoid LiteApp::loadState()\n{\n    QByteArray  geometry = m_settings->value(\"liteapp/geometry\").toByteArray();\n    if (!geometry.isEmpty()) {\n        m_mainwindow->restoreGeometry(geometry);\n    } else {\n        m_mainwindow->resize(800,600);\n    }\n    m_mainwindow->updateConer();\n    //fix Qt 5.9.6 QDockWidget bug\n#if QT_VERSION == 0x050906\n    QList<QDockWidget *> docks = m_mainwindow->findChildren<QDockWidget *>();\n    QList<int> horz;\n    QList<int> vert;\n    QList<QDockWidget*> ds;\n    foreach (QDockWidget *dock, docks) {\n        bool b = m_settings->value(\"dock_visible/\"+dock->objectName()).toBool();\n        if (!b) {\n            continue;\n        }\n        dock->setVisible(b);\n        QSize sz = m_settings->value(\"dock_size/\"+dock->objectName()).toSize();\n        horz << sz.width();\n        vert << sz.height();\n        ds << dock;\n    }\n    m_mainwindow->resizeDocks(ds,horz,Qt::Horizontal);\n    m_mainwindow->resizeDocks(ds,vert,Qt::Vertical);\n    foreach (QString id, m_actionManager->toolBarList()) {\n        QToolBar *tbar = m_actionManager->loadToolBar(id);\n        bool b = m_settings->value(\"toolbar_visible/\"+tbar->objectName(),true).toBool();\n        tbar->setVisible(b);\n    }\n#else\n    m_mainwindow->restoreState(m_settings->value(\"liteapp/state\").toByteArray());\n#endif\n}\n\nvoid LiteApp::saveState()\n{\n    m_settings->setValue(\"liteapp/geometry\",m_mainwindow->saveGeometry());\n    m_settings->setValue(\"liteapp/state\",m_mainwindow->saveState());\n\n    //fix Qt 5.9.6 QDockWidget bug\n#if QT_VERSION == 0x050906\n    QList<QDockWidget *> docks = m_mainwindow->findChildren<QDockWidget *>();\n    foreach (QDockWidget *dock, docks) {\n        m_settings->setValue(\"dock_size/\"+dock->objectName(),dock->size());\n        m_settings->setValue(\"dock_visible/\"+dock->objectName(),dock->isVisible());\n    }\n    foreach (QString id, m_actionManager->toolBarList()) {\n        QToolBar *tbar = m_actionManager->loadToolBar(id);\n        m_settings->setValue(\"toolbar_visible/\"+tbar->objectName(),tbar->isVisible());\n    }\n#endif\n}\n\n\nvoid LiteApp::loadSession(const QString &session)\n{\n    if (session.isEmpty()) {\n        return;\n    }\n\n    m_recentManager->addRecent(session,\"session\");\n\n    QString sessionKey = \"session/\"+session;\n    QString projectName = m_settings->value(sessionKey+\"_project\").toString();\n    QString scheme = m_settings->value(sessionKey+\"_scheme\").toString();\n    QString editorName = m_settings->value(sessionKey+\"_cureditor\").toString();\n    QStringList fileList = m_settings->value(sessionKey+\"_alleditor\").toStringList();\n    QStringList folderList = m_settings->value(sessionKey+\"_folderList\").toStringList();\n\n    m_fileManager->setFolderList(folderList);\n\n    if (!projectName.isEmpty()) {\n        if (scheme.isEmpty()) {\n            m_fileManager->openProject(projectName);\n        } else {\n            m_fileManager->openProjectScheme(projectName,scheme);\n        }\n    } else {\n        m_projectManager->closeProject();\n    }\n\n    if (m_settings->value(LITEAPP_STARTUPRELOADFILES,true).toBool()) {\n        foreach(QString fileName, fileList) {\n            m_fileManager->openEditor(fileName,false);\n        }\n        if (!editorName.isEmpty()) {\n            m_fileManager->openEditor(editorName,true);\n        } else if (!fileList.isEmpty()){\n            m_fileManager->openEditor(fileList.last(),true);\n        }\n    }\n\n    emit sessionListChanged();\n}\n\nvoid LiteApp::saveSession(const QString &session)\n{\n    if (session.isEmpty() || session == \"empty\") {\n        return;\n    }\n    QString projectName;\n    QString editorName;\n    QString scheme;\n    IProject *project = m_projectManager->currentProject();\n    if (project) {\n        projectName = project->filePath();\n        IMimeType *type = m_mimeTypeManager->findMimeType(project->mimeType());\n        if (type) {\n            scheme = type->scheme();\n        }\n    }\n\n    QStringList fileList;\n    foreach (IEditor* ed,m_editorManager->sortedEditorList()) {\n        if (ed->filePath().isEmpty()) {\n            continue;\n        }\n        if (ed == m_editorManager->currentEditor()) {\n            editorName = ed->filePath();\n        } else {\n            fileList.append(ed->filePath());\n        }\n    }\n    QString sessionKey = \"session/\"+session;\n\n    LiteApi::updateSetting(m_settings,sessionKey+\"_project\",projectName,\"\");\n    LiteApi::updateSetting(m_settings,sessionKey+\"_scheme\",scheme,\"\");\n    LiteApi::updateSetting(m_settings,sessionKey+\"_cureditor\",editorName,\"\");\n    LiteApi::updateSetting(m_settings,sessionKey+\"_alleditor\",fileList,QStringList());\n    LiteApi::updateSetting(m_settings,sessionKey+\"_folderList\",m_fileManager->folderList(),QStringList());\n}\n\nQStringList LiteApp::sessionList() const\n{\n    return m_recentManager->recentNameList(\"session\");\n}\n\nQString LiteApp::currentSession() const\n{\n    return m_currentSession;\n}\n\nvoid LiteApp::dbclickLogOutput(QTextCursor cur)\n{\n    //QRegExp rep(\"(\\\\w?:?[\\\\w\\\\d_@\\\\-\\\\\\\\/\\\\.]+):(\\\\d+):\");\n    QString text = cur.block().text().trimmed();\n    //skip time 08:38:49\n    if (text.length() < 9) {\n        return;\n    }\n    QRegExp rep(\"(\\\\w?\\\\:?[\\\\w\\\\d\\\\_\\\\-\\\\\\\\/\\\\.]+):(\\\\d+):\");\n    int index = rep.indexIn(text.mid(8));\n    if (index < 0)\n        return;\n    QStringList capList = rep.capturedTexts();\n\n    if (capList.count() < 3)\n        return;\n    QString fileName = capList[1];\n    QString fileLine = capList[2];\n\n    bool ok = false;\n    int line = fileLine.toInt(&ok);\n    if (!ok)\n        return;\n\n    LiteApi::IEditor *editor = m_fileManager->openEditor(fileName);\n    if (editor) {\n        LiteApi::ITextEditor *textEditor =  LiteApi::getTextEditor(editor);\n        if (textEditor) {\n            textEditor->gotoLine(line-1,0,true);\n        }\n    }\n}\n\nvoid LiteApp::goproxyDone(const QByteArray &reply)\n{\n    this->appendLog(\"GoProxy\",QString(\"%1 = %2\").arg(QString::fromUtf8(m_goProxy->commandId())).arg(QString::fromUtf8(reply).trimmed()));\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/liteapp.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteapp.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEAPP_H\n#define LITEAPP_H\n\n#include \"liteapi/liteapi.h\"\n#include \"textoutput/textoutput.h\"\n#include \"extension/extension.h\"\n#include \"goproxy.h\"\n\nusing namespace LiteApi;\n\nclass MainWindow;\nclass PluginManager;\nclass EditorManager;\nclass FileManager;\nclass ProjectManager;\nclass ActionManager;\nclass MimeTypeManager;\nclass OptionManager;\nclass ToolWindowManager;\nclass HtmlWidgetManager;\nclass QuickOpenManager;\nclass RecentManager;\nclass QSettings;\nclass QSplitter;\nclass QComboBox;\nclass LiteAppOptionFactory;\nclass AppIdleTimer;\n\nclass LiteApp : public IApplication\n{\n    Q_OBJECT\npublic:\n    static QString getRootPath();\n    static QString getToolPath();\n    static QString getPluginPath();\n    static QString getResoucePath();\n    static QString getStoragePath();\n    static IApplication* NewApplication(const QString &sessionName, IApplication *base = 0);\n    static PluginManager *pluginManager();\n    static QList<IApplication*> appList();\npublic:\n    LiteApp();    \n    virtual ~LiteApp();    \n    virtual IExtension *extension();\n    virtual IApplication *newInstance(const QString &sessionName);\n    virtual QList<IApplication*> instanceList() const;\n    virtual bool hasGoProxy() const;\n    virtual IGoProxy *createGoProxy(QObject *parent);\n    virtual IProjectManager *projectManager();\n    virtual IEditorManager  *editorManager();\n    virtual IFileManager    *fileManager();\n    virtual IActionManager  *actionManager();\n    virtual IMimeTypeManager *mimeTypeManager();\n    virtual IOptionManager  *optionManager();\n    virtual IToolWindowManager *toolWindowManager();\n    virtual IHtmlWidgetManager *htmlWidgetManager();\n    virtual IRecentManager *recentManager();\n\n    virtual QMainWindow *mainWindow() const;\n    virtual QSettings *settings();\n    virtual QMap<QString,QVariant> &globalCookie();\n\n    virtual QString rootPath() const;\n    virtual QString applicationPath() const;\n    virtual QString toolPath() const;\n    virtual QString resourcePath() const;\n    virtual QString pluginPath() const;\n    virtual QString storagePath() const;\n\n    virtual QString ideVersion() const;\n    virtual QString ideFullName() const;\n    virtual QString ideName() const;\n    virtual QString ideCopyright() const;\n\n    virtual QList<IPlugin*> pluginList() const;\n\n    virtual void loadSession(const QString &session);\n    virtual void saveSession(const QString &session);\n    virtual QStringList sessionList() const;\n    virtual QString currentSession() const;\n\n    virtual void loadState();\n    virtual void saveState();\n\n    virtual void appendLog(const QString &model, const QString &log = QString(), bool error = false);\n    virtual void sendBroadcast(const QString &module, const QString &id, const QVariant &param = QVariant());\npublic:\n    void load(const QString &sessionName, IApplication *baseApp);\n    void createActions();\n    void createMenus();\n    void createToolBars();\n    void loadPlugins();\n    void loadMimeType();\n    void initPlugins();\n    void setPluginPath(const QString &path); \n    void setResourcePath(const QString &path);\nprotected slots:\n    void goproxyDone(const QByteArray &reply);\n    void dbclickLogOutput(QTextCursor);\n    void projectReloaded();\n    void currentProjectChanged(LiteApi::IProject *project);\n    void currentEditorChanged(LiteApi::IEditor *editor);\n    void editorModifyChanged(bool);\n    void cleanup();\n    void aboutPlugins();\n    void escape();\n    void newWindow();\n    void closeWindow();\n    void exit();\n    void applyOption(QString id);\nprotected:\n    QString         m_currentSession;\n    QString         m_rootPath;\n    QString         m_applicationPath;\n    QString         m_toolPath;\n    QString         m_pluginPath;\n    QString         m_resourcePath;\n    QString         m_storagePath;\n    QSettings       *m_settings;\n    Extension     *m_extension;\n    MainWindow      *m_mainwindow;\n    ToolWindowManager *m_toolWindowManager;\n    HtmlWidgetManager *m_htmlWidgetManager;\n    RecentManager     *m_recentManager;\n    ActionManager  *m_actionManager;\n    ProjectManager *m_projectManager;\n    EditorManager   *m_editorManager;\n    FileManager    *m_fileManager;\n    MimeTypeManager *m_mimeTypeManager;\n    OptionManager   *m_optionManager;\n    TextOutput    *m_logOutput;\n    QAction       *m_logAct;\n    LiteAppOptionFactory *m_liteAppOptionFactory;\n    QList<IPlugin*> m_pluginList;\n    AppIdleTimer     *m_idleTimer;\npublic:\n    static QMap<QString,QVariant> s_cookie;\n    static QList<IApplication*> s_appList;\nprotected:\n    QAction     *m_newAct;\n    QAction     *m_openFileAct;\n    QAction     *m_openFolderAct;\n    QAction     *m_openFolderNewWindowAct;\n    QAction     *m_closeAllFolderAct;\n    QAction     *m_newWindow;\n    QAction     *m_closeWindow;\n    QAction     *m_closeAct;\n    QAction     *m_closeAllAct;\n    QAction     *m_openProjectAct;\n    QAction     *m_saveProjectAct;\n    QAction     *m_closeProjectAct;\n    QAction     *m_saveAct;\n    QAction     *m_saveAsAct;\n    QAction     *m_saveAllAct;\n    QAction     *m_exitAct;\n    QAction     *m_optionAct;\n    QAction     *m_aboutAct;\n    QAction     *m_aboutPluginsAct;\n    QAction     *m_fullScreent;\n    QToolBar    *m_stdToolBar;\n    QMenu       *m_fileMenu;\n    QMenu       *m_viewMenu;\n    QMenu       *m_helpMenu;    \nprotected:\n    GoProxy     *m_goProxy;\n};\n\n#endif // LITEAPP_H\n"
  },
  {
    "path": "liteidex/src/liteapp/liteapp.pri",
    "content": "LIBS *= -l$$qtLibraryName(liteapp)\n\n\n\n"
  },
  {
    "path": "liteidex/src/liteapp/liteapp.pro",
    "content": "#-------------------------------------------------\n#\n# Project created by QtCreator 2011-03-18T16:21:43\n#\n#-------------------------------------------------\ninclude (../../liteidex.pri)\ninclude (../rpath.pri)\ninclude (../api/liteapi/liteapi.pri)\ninclude (../utils/fileutil/fileutil.pri)\ninclude (../utils/mimetype/mimetype.pri)\ninclude (../utils/textoutput/textoutput.pri)\ninclude (../utils/extension/extension.pri)\ninclude (../utils/folderview/folderview.pri)\ninclude (../utils/symboltreeview/symboltreeview.pri)\ninclude (../utils/colorstyle/colorstyle.pri)\ninclude (../utils/tabwidget/tabwidget.pri)\ninclude (../3rdparty/elidedlabel/elidedlabel.pri)\ninclude (../3rdparty/qtc_editutil/qtc_editutil.pri)\ninclude (../3rdparty/qtc_itemview/qtc_itemview.pri)\n\nisEmpty(PRECOMPILED_HEADER):PRECOMPILED_HEADER = $$IDE_SOURCE_TREE/src/pch/liteide_gui_pch.h\n\nQT += core gui\n\nmacx {\n    QT += xml\n}\n\nDESTDIR = $$IDE_APP_PATH\nTEMPLATE = app\nTARGET = $$qtLibraryName(liteapp)\n\ncontains(DEFINES, LITEAPP_LIBRARY) {\n    TEMPLATE = lib\n    win32 {\n        DESTDIR = $$IDE_APP_PATH\n    } else:macx {\n        DESTDIR = $$IDE_BIN_PATH\n    } else {\n        DESTDIR = $$IDE_LIBRARY_PATH\n    }\n}\n\nLIBS += -L$$IDE_LIBRARY_PATH\n\nmacx {\n    LIBS += -framework AppKit\n}\n\nINCLUDEPATH += $$IDE_SOURCE_TREE/src/api\nINCLUDEPATH += $$IDE_SOURCE_TREE/src/utils\nINCLUDEPATH += $$IDE_SOURCE_TREE/src/3rdparty\n\nSOURCES += main.cpp\\\n        mainwindow.cpp \\\n    liteapp.cpp \\\n    filemanager.cpp \\\n    editormanager.cpp \\\n    projectmanager.cpp \\\n    pluginmanager.cpp \\\n    actionmanager.cpp \\\n    aboutdialog.cpp \\\n    pluginsdialog.cpp \\\n    mimetypemanager.cpp \\\n    optionmanager.cpp \\\n    newfiledialog.cpp \\\n    optionsbrowser.cpp \\\n    liteappoption.cpp \\\n    liteappoptionfactory.cpp \\\n    toolmainwindow.cpp \\\n    tooldockwidget.cpp \\\n    rotationtoolbutton.cpp \\\n    toolwindowmanager.cpp \\\n    folderproject.cpp \\\n    folderprojectfactory.cpp \\\n    goproxy.cpp \\\n    htmlwidgetmanager.cpp \\\n    textbrowserhtmlwidget.cpp \\\n    splitwindowstyle.cpp \\\n    sidewindowstyle.cpp \\\n    outputoption.cpp \\\n    openeditorswidget.cpp \\\n    idletimer.cpp \\\n    recentmanager.cpp \\\n    multifolderwindow.cpp \\\n    splitfolderwindow.cpp\n\nHEADERS  += mainwindow.h \\\n    liteapp.h \\\n    liteapp_global.h \\\n    filemanager.h \\\n    editormanager.h \\\n    projectmanager.h \\\n    pluginmanager.h \\\n    actionmanager.h \\\n    aboutdialog.h \\\n    pluginsdialog.h \\\n    mimetypemanager.h \\\n    optionmanager.h \\\n    newfiledialog.h \\\n    optionsbrowser.h \\\n    liteappoption.h \\\n    liteappoptionfactory.h \\\n    toolmainwindow.h \\\n    tooldockwidget.h \\\n    rotationtoolbutton.h \\\n    toolwindowmanager.h \\\n    folderproject.h \\\n    folderprojectfactory.h \\\n    goproxy.h \\\n    cdrv.h \\\n    htmlwidgetmanager.h \\\n    textbrowserhtmlwidget.h \\\n    windowstyle.h \\\n    splitwindowstyle.h \\\n    sidewindowstyle.h \\\n    outputoption.h \\\n    openeditorswidget.h \\\n    idletimer.h \\\n    recentmanager.h \\\n    multifolderwindow.h \\\n    splitfolderwindow.h\n\nFORMS += \\\n    aboutdialog.ui \\\n    pluginsdialog.ui \\\n    newfiledialog.ui \\\n    optionswidget.ui \\\n    liteappoption.ui \\\n    outputoption.ui\n\nRESOURCES += \\\n    liteapp.qrc\n\nmacx {\n    HEADERS  += macsupport.h\n    OBJECTIVE_SOURCES += macsupport.mm\n}\n\ncontains(DEFINES, LITEAPP_LIBRARY) {\n    win32 {\n        target.path = /bin\n        INSTALLS += target\n        RC_FILE += liteapp.rc\n    } else:macx {\n        ICON = images/liteide.icns\n        QMAKE_INFO_PLIST = Info.plist\n    } else {\n        target.path  = $$LIBPREFIX\n        INSTALLS    += target\n    }\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/liteapp.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/\">\n        <file>images/closefile.png</file>\n        <file>images/closeproject.png</file>\n        <file>images/new.png</file>\n        <file>images/openfile.png</file>\n        <file>images/openproject.png</file>\n        <file>images/redo.png</file>\n        <file>images/save.png</file>\n        <file>images/saveproject.png</file>\n        <file>images/undo.png</file>\n        <file>images/saveall.png</file>\n        <file>images/closepage.png</file>\n        <file>images/listpage.png</file>\n        <file>images/addpage.png</file>\n        <file>images/fileitem.png</file>\n        <file>images/folderitem.png</file>\n        <file>images/projectitem.png</file>\n        <file>images/cleanoutput.png</file>\n        <file>images/hideoutput.png</file>\n        <file>images/logo/dui.png</file>\n        <file>images/logo/gen.png</file>\n        <file>images/logo/kan.png</file>\n        <file>images/logo/kun.png</file>\n        <file>images/logo/li.png</file>\n        <file>images/logo/qian.png</file>\n        <file>images/logo/space.png</file>\n        <file>images/logo/xun.png</file>\n        <file>images/logo/zhen.png</file>\n        <file>images/backward.png</file>\n        <file>images/forward.png</file>\n        <file>images/reload.png</file>\n        <file>images/gopher.png</file>\n        <file>images/editclear.png</file>\n        <file>images/close.png</file>\n        <file>images/movemenu.png</file>\n        <file>images/openfolder.png</file>\n        <file>images/hidesidebar.png</file>\n        <file>images/copy.png</file>\n        <file>images/cut.png</file>\n        <file>images/paste.png</file>\n        <file>images/lock.png</file>\n        <file>images/unlock.png</file>\n        <file>images/liteide-logo64.png</file>\n        <file>images/liteide16.png</file>\n        <file>images/liteide24.png</file>\n        <file>images/liteide32.png</file>\n        <file>images/liteide48.png</file>\n        <file>images/liteide64.png</file>\n        <file>images/liteide128.png</file>\n        <file>images/liteide-logo128.png</file>\n        <file>images/config.png</file>\n        <file>images/godoc.png</file>\n        <file>images/gopath.png</file>\n        <file>images/home.png</file>\n        <file>images/filter.png</file>\n        <file>images/sync.png</file>\n        <file>images/setup.png</file>\n        <file>images/darkclosebutton.png</file>\n        <file>images/options.png</file>\n        <file>images/closetab.png</file>\n        <file>images/hidetool.png</file>\n    </qresource>\n</RCC>\n"
  },
  {
    "path": "liteidex/src/liteapp/liteapp.rc",
    "content": "IDI_ICON1\tICON DISCARDABLE \"images/liteide.ico\"\n"
  },
  {
    "path": "liteidex/src/liteapp/liteapp_global.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: liteapp_global.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef LITEAPP_GLOBAL_H\r\n#define LITEAPP_GLOBAL_H\r\n\r\n#include <QtCore/qglobal.h>\r\n\r\n#if defined(LITEAPP_LIBRARY)\r\n#  define LITEIDESHARED_EXPORT Q_DECL_EXPORT\r\n#else\r\n#  define LITEIDESHARED_EXPORT Q_DECL_IMPORT\r\n#endif\r\n\r\n#define LITEIDE_STORELOCAL \"LiteIDE/StoreLocal\"\r\n\r\n#define OPTION_LITEAPP \"option/liteapp\"\r\n#define OPTION_LITEOUTPUT  \"option/liteoutput\"\r\n\r\n#define LITEAPP_MAXRECENTFILES \"LiteApp/MaxRecentFile\"\r\n#define LITEAPP_MAXEDITORCOUNT \"LiteApp/MaxEditorCount\"\r\n#define LITEAPP_AUTOCLOSEPROEJCTFILES \"LiteApp/AutoCloseProjectEditors\"\r\n#define LITEAPP_AUTOLOADLASTSESSION \"LiteApp/AutoLoadLastSession\"\r\n#define LITEAPP_AUTOIDLESAVEDOCUMENTS \"LiteApp/AutoIdleSaveDocuments\"\r\n#define LITEAPP_AUTOIDLESAVEDOCUMENTS_TIME  \"LiteApp/AutoIdelSaveDocumentsTime\"\r\n#define LITEAPP_AUTOIDLESAVEDOCUMENTS_EMITMESSAGE  \"LiteApp/AutoIdelSaveDocumentsEmitMessage\"\r\n#define LITEAPP_LANGUAGE \"General/Language\"\r\n#define LITEAPP_STYLE \"LiteApp/WindowStyle\"\r\n#define LITEAPP_SPLASHVISIBLE \"LiteApp/SplashVisible\"\r\n#define LITEAPP_WELCOMEPAGEVISIBLE \"General/WelcomePageVisible\"\r\n#define LITEAPP_TOOLBARICONSIZE \"General/ToolBarIconSize\"\r\n#define LITEAPP_EDITTABSCLOSABLE \"LiteApp/EditTabsClosable\"\r\n#define LITEAPP_EDITTABSENABLEWHELL \"LiteApp/EditTabEnableWhell\"\r\n#define LITEAPP_SHOWEDITTOOLBAR \"LiteApp/ShowEditToolbar\"\r\n#define LITEAPP_QSS \"LiteApp/Qss\"\r\n#define LITEAPP_FULLSCREEN \"LiteApp/FullScreen\"\r\n#define LITEAPP_WINSTATE   \"LiteApp/WinState\"\r\n#define LITEAPP_SHORTCUTS \"keybord_shortcuts/\"\r\n#define LITEAPP_OPTNFOLDERINNEWWINDOW \"LiteApp/OpenFolderInNewWindow\"\r\n#define LITEAPP_FOLDERSHOWHIDENFILES \"LiteApp/FolderShowHidenFiles\"\r\n#define LITEAPP_FOLDERSHOWDETAILS \"LiteApp/FolderShowDetails\"\r\n#define LITEAPP_FOLDERSSYNCEDITOR \"FileManager/synceditor\"\r\n#define LITEAPP_FOLDERSPLITMODE \"LiteApp/FolderSplitMode\"\r\n#define LITEAPP_STARTUPRELOADFILES   \"LiteApp/StartupReloadFiles\"\r\n#define LITEAPP_STARTUPRELOADFOLDERS   \"LiteApp/StartupReloadFolders\"\r\n#define LITEAPP_FILEWATCHERAUTORELOAD \"LiteApp/FileWatcherAutoReload\"\r\n#define LITEIDE_CUSTOMEICONPATH    \"LiteApp/CustomeIconPath\"\r\n#define LITEIDE_CUSTOMEICON \"LiteApp/CustomeIcon\"\r\n#define LITEAPP_TOOLWINDOW_SHORTCUTS \"LiteApp/ToolWindowShortcuts\"\r\n#define LITEAPP_USE_LIBGOPHER \"LiteApp/UseLibgopher\"\r\n#define LITEAPP_EDITORMOUSEEXTNAVIGATE \"LiteApp/EditorMouseExtNavigate\"\r\n\r\n#define OUTPUT_FAMILY \"output/family\"\r\n#define OUTPUT_FONTSIZE \"output/fontsize\"\r\n#define OUTPUT_FONTZOOM \"output/fontzoom\"\r\n#define OUTPUT_ANTIALIAS \"output/antialias\"\r\n#define OUTPUT_MAXLINES  \"output/maxlines\"\r\n#define OUTPUT_USECOLORSCHEME \"output/colorscheme\"\r\n\r\n#define LITEAPP_FILESFILTER_MAXCOUNT \"LiteApp/FilesFilterMaxCount\"\r\n\r\n#define LITEAPP_SESSIONLIST \"LiteApp/SessionList\"\r\n\r\n\r\nenum TOOLBAR_ICONSIZE {\r\n    TOOLBAR_ICONSIZE_16 = 0,\r\n    TOOLBAR_ICONSIZE_18,\r\n    TOOLBAR_ICONSIZE_20,\r\n    TOOLBAR_ICONSIZE_22,\r\n    TOOLBAR_ICONSIZE_24\r\n};\r\n\r\n#endif // LITEAPP_GLOBAL_H\r\n"
  },
  {
    "path": "liteidex/src/liteapp/liteappoption.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteappoption.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"liteappoption.h\"\n#include \"actionmanager.h\"\n#include \"liteapp_global.h\"\n#include \"ui_liteappoption.h\"\n#include <QDir>\n#include <QFileInfo>\n#include <QLocale>\n#include <QStandardItemModel>\n#include <QStandardItem>\n#include <QFileDialog>\n#include <QMessageBox>\n#include <QDebug>\n\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nLiteAppOption::LiteAppOption(LiteApi::IApplication *app,QObject *parent) :\n    LiteApi::IOption(parent),\n    m_liteApp(app),\n    m_widget(new QWidget),\n    ui(new Ui::LiteAppOption)\n{\n    ui->setupUi(m_widget);\n\n\n    const QString &liteideTrPath = m_liteApp->resourcePath()+\"/translations\";\n    QLocale eng(QLocale::English);\n    ui->langComboBox->addItem(QLocale::languageToString(QLocale::English),eng.name());\n    QDir dir(liteideTrPath);\n    if (dir.exists()) {\n        foreach (QFileInfo info,dir.entryInfoList(QStringList() << \"liteide_*.qm\")) {\n            QString base = info.baseName();\n            QLocale lc(base.right(base.length()-8));\n            if (lc.name().isEmpty()) {\n                continue;\n            }\n            QLocale::Language lang = lc.language();\n            QString text = QString(\"%1 (%2)\").arg(QLocale::languageToString(lang)).arg(lc.name());\n            ui->langComboBox->addItem(text,lc.name());\n        }\n    }\n\n    connect(ui->customIconCheckBox,SIGNAL(toggled(bool)),ui->iconPathComboBox,SLOT(setEnabled(bool)));\n\n\n    QDir iconDir(m_liteApp->resourcePath()+\"/liteapp/qrc\");\n    foreach (QFileInfo info, iconDir.entryInfoList(QDir::Dirs|QDir::NoDotAndDotDot)) {\n        ui->iconPathComboBox->addItem(info.fileName());\n    }\n\n    m_keysModel = new QStandardItemModel(0,5,this);\n    m_keysModel->setHeaderData(0,Qt::Horizontal,tr(\"Command\"));\n    m_keysModel->setHeaderData(1,Qt::Horizontal,tr(\"Label\"));\n    m_keysModel->setHeaderData(2,Qt::Horizontal,tr(\"Shortcuts\"));\n    m_keysModel->setHeaderData(3,Qt::Horizontal,tr(\"NativeText\"));\n    m_keysModel->setHeaderData(4,Qt::Horizontal,tr(\"Standard\"));\n    ui->keysTreeView->setModel(m_keysModel);  \n#if QT_VERSION >= 0x050000\n    ui->keysTreeView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);\n#else\n    ui->keysTreeView->header()->setResizeMode(QHeaderView::ResizeToContents);\n#endif\n#ifndef Q_OS_MAC\n    ui->keysTreeView->header()->hideSection(3);\n#endif\n\n    ui->styleComboBox->addItem(tr(\"SideBarStyle\"),\"sidebar\");\n    ui->styleComboBox->addItem(tr(\"SplitterStyle\"),\"splitter\");\n    const QString &liteQssPath = m_liteApp->resourcePath()+\"/liteapp/qss\";\n    QDir qssDir(liteQssPath);\n    if (qssDir.exists()) {\n        foreach (QFileInfo info, qssDir.entryInfoList(QStringList() << \"*.qss\")) {\n            ui->qssComboBox->addItem(info.fileName());\n        }\n    }\n\n//    if (libgopher.isValid()) {\n//        ui->gopherInfoLabel->setText(tr(\"libgopher is valid\"));\n//    } else {\n//        ui->gopherInfoLabel->setText(tr(\"libgopher is invalid!\"));\n//    }\n//    bool useGopher = m_liteApp->settings()->value(LITEAPP_USE_LIBGOPHER,false).toBool();\n//    ui->useLibgopherCheckBox->setChecked(useGopher);\n\n    connect(m_keysModel,SIGNAL(itemChanged(QStandardItem*)),this,SLOT(shortcutsChanaged(QStandardItem*)));\n    connect(ui->resetAllButton,SIGNAL(clicked()),this,SLOT(resetAllShortcuts()));\n    connect(ui->resetButton,SIGNAL(clicked()),this,SLOT(resetShortcuts()));\n    connect(ui->importButton,SIGNAL(clicked()),this,SLOT(importShortcuts()));\n    connect(ui->exportButton,SIGNAL(clicked()),this,SLOT(exportShortcuts()));\n    connect(ui->standardCheckBox,SIGNAL(toggled(bool)),this,SLOT(reloadShortcuts()));\n    connect(ui->autoLoadLastSessionCheckBox,SIGNAL(toggled(bool)),this,SLOT(autoLoadLastSessionToggled(bool)));    \n    connect(ui->autoIdleSaveDocumentsCheckBox,SIGNAL(toggled(bool)),this,SLOT(autoIdleSaveDocumentsToggled(bool)));\n    connect(ui->autoIdleSaveDocumentsCheckBox,SIGNAL(toggled(bool)),ui->autoIdleSaveDocumentsTimeSpinBox,SLOT(setEnabled(bool)));\n}\n\nLiteAppOption::~LiteAppOption()\n{\n    delete m_widget;\n    delete ui;\n}\n\nQWidget *LiteAppOption::widget()\n{\n    return m_widget;\n}\n\nQString LiteAppOption::name() const\n{\n    return \"LiteApp\";\n}\n\nQString LiteAppOption::mimeType() const\n{\n    return OPTION_LITEAPP;\n}\n\nvoid LiteAppOption::save()\n{\n    bool storeLocal = ui->storeLocalCheckBox->isChecked();\n    QSettings global(m_liteApp->resourcePath()+\"/liteapp/config/global.ini\",QSettings::IniFormat);\n    global.setValue(LITEIDE_STORELOCAL,storeLocal);\n\n    int index = ui->langComboBox->currentIndex();\n    if (index >= 0 && index < ui->langComboBox->count()) {\n        QString lc = ui->langComboBox->itemData(index).toString();\n        m_liteApp->settings()->setValue(LITEAPP_LANGUAGE,lc);\n    }\n\n    index = ui->styleComboBox->currentIndex();\n    if (index >= 0 && index < ui->styleComboBox->count()) {\n        QString style = ui->styleComboBox->itemData(index).toString();\n        m_liteApp->settings()->setValue(LITEAPP_STYLE,style);\n    }\n\n\n    //QString max = ui->maxRecentLineEdit->text();\n    int max = ui->maxRecentFilesSpinBox->value();\n    m_liteApp->settings()->setValue(LITEAPP_MAXRECENTFILES,max);\n    max = ui->maxEditorCountSpinBox->value();\n    m_liteApp->settings()->setValue(LITEAPP_MAXEDITORCOUNT,max);\n    //bool b = ui->autoCloseProjecEditorsCheckBox->isChecked();\n   // m_liteApp->settings()->setValue(LITEAPP_AUTOCLOSEPROEJCTFILES,b);\n    bool b1 = ui->autoLoadLastSessionCheckBox->isChecked();\n    m_liteApp->settings()->setValue(LITEAPP_AUTOLOADLASTSESSION,b1);\n    bool b2 = ui->splashVisibleCheckBox->isChecked();\n    m_liteApp->settings()->setValue(LITEAPP_SPLASHVISIBLE,b2);\n    bool b3 = ui->welcomeVisibleCheckBox->isChecked();\n    m_liteApp->settings()->setValue(LITEAPP_WELCOMEPAGEVISIBLE,b3);\n    bool b4 = ui->editorTabsClosableCheckBox->isChecked();\n    m_liteApp->settings()->setValue(LITEAPP_EDITTABSCLOSABLE,b4);\n    bool b5 = ui->startupReloadFilesCheckBox->isChecked();\n    m_liteApp->settings()->setValue(LITEAPP_STARTUPRELOADFILES,b5);\n//    bool b6 = ui->startupReloadFoldersCheckBox->isChecked();\n//    m_liteApp->settings()->setValue(LITEAPP_STARTUPRELOADFOLDERS,b6);\n    bool b7 = ui->fileWatcherAutoReloadCheckBox->isChecked();\n    m_liteApp->settings()->setValue(LITEAPP_FILEWATCHERAUTORELOAD,b7);\n    bool b8 = ui->editorTabsEnableWhellCheckBox->isChecked();\n    m_liteApp->settings()->setValue(LITEAPP_EDITTABSENABLEWHELL,b8);\n\n    bool b9 = ui->autoIdleSaveDocumentsCheckBox->isChecked();\n    m_liteApp->settings()->setValue(LITEAPP_AUTOIDLESAVEDOCUMENTS,b9);\n\n    int time = ui->autoIdleSaveDocumentsTimeSpinBox->value();\n    m_liteApp->settings()->setValue(LITEAPP_AUTOIDLESAVEDOCUMENTS_TIME,time);\n\n    bool toolwindowshortcuts = ui->toolWindowShortcutsCheckBox->isChecked();\n    m_liteApp->settings()->setValue(LITEAPP_TOOLWINDOW_SHORTCUTS,toolwindowshortcuts);\n\n    bool ext = ui->editorMouseExtNavigateCheckBox->isChecked();\n    m_liteApp->settings()->setValue(LITEAPP_EDITORMOUSEEXTNAVIGATE,ext);\n\n    int size = ui->buttonGroup->buttons().size();\n    for (int i = 0; i < size; i++) {\n        if (ui->buttonGroup->buttons().at(i)->isChecked()) {\n            m_liteApp->settings()->setValue(LITEAPP_TOOLBARICONSIZE,i);\n            break;\n        }\n    }\n\n//    bool useGopher = ui->useLibgopherCheckBox->isChecked();\n//    bool oldUseGopher = m_liteApp->settings()->value(LITEAPP_USE_LIBGOPHER,false).toBool();\n//    if (useGopher != oldUseGopher) {\n//        m_liteApp->settings()->setValue(LITEAPP_USE_LIBGOPHER,useGopher);\n//        if (!libgopher.isValid()) {\n//            m_liteApp->appendLog(\"LiteApp\",QString(\"libgopher is invalid\"));\n//        } else {\n//            m_liteApp->appendLog(\"LiteApp\",useGopher ? QString(\"enable use libgopher\"):QString(\"disable use libgopher\"));\n//        }\n//    }\n\n    QString qss = ui->qssComboBox->currentText();\n    if (!qss.isEmpty()) {\n        QFile f(m_liteApp->resourcePath()+\"/liteapp/qss/\"+qss);\n        if (f.open(QFile::ReadOnly)) {\n            m_liteApp->settings()->setValue(LITEAPP_QSS,qss);\n            QString styleSheet = QLatin1String(f.readAll());\n            qApp->setStyleSheet(styleSheet);\n        }\n    }\n\n    bool customelIcon = ui->customIconCheckBox->isChecked();\n    m_liteApp->settings()->setValue(LITEIDE_CUSTOMEICON,customelIcon);\n\n    QString iconPath = ui->iconPathComboBox->currentText();\n    m_liteApp->settings()->setValue(LITEIDE_CUSTOMEICONPATH,iconPath);\n\n    for (int i = 0; i < m_keysModel->rowCount(); i++) {\n        QStandardItem *root = m_keysModel->item(i,0);\n        if (!root) {\n            continue;\n        }\n        LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->actionContextForName(root->text());\n        if (!actionContext) {\n            continue;\n        }\n\n        for (int j = 0; j < root->rowCount(); j++) {\n            QStandardItem *id = root->child(j,0);\n            if (!id) {\n                continue;\n            }\n            QStandardItem *bind = root->child(j,2);\n            if (!bind) {\n                continue;\n            }\n            m_liteApp->actionManager()->setActionShourtcuts(id->text(),bind->text());\n       }\n    }\n}\n\nvoid LiteAppOption::load()\n{\n    QSettings global(m_liteApp->resourcePath()+\"/liteapp/config/global.ini\",QSettings::IniFormat);\n    bool storeLocal = global.value(LITEIDE_STORELOCAL,false).toBool();\n    ui->storeLocalCheckBox->setChecked(storeLocal);\n\n    QString locale = QLocale::system().name();\n    locale = m_liteApp->settings()->value(LITEAPP_LANGUAGE,locale).toString();\n    if (!locale.isEmpty()) {\n        for (int i = 0; i < ui->langComboBox->count(); i++) {\n            if (locale == ui->langComboBox->itemData(i).toString()) {\n                ui->langComboBox->setCurrentIndex(i);\n                break;\n            }\n        }\n    }\n    QString style = m_liteApp->settings()->value(LITEAPP_STYLE,\"sidebar\").toString();\n    for (int i = 0; i < ui->styleComboBox->count(); i++) {\n        if (style == ui->styleComboBox->itemData(i).toString()) {\n            ui->styleComboBox->setCurrentIndex(i);\n            break;\n        }\n    }\n\n    bool customeIcon = m_liteApp->settings()->value(LITEIDE_CUSTOMEICON,false).toBool();\n    ui->customIconCheckBox->setChecked(customeIcon);\n    ui->iconPathComboBox->setEnabled(customeIcon);\n\n    QString qss = m_liteApp->settings()->value(LITEAPP_QSS,\"default.qss\").toString();\n    int index = ui->qssComboBox->findText(qss,Qt::MatchFixedString);\n    if (index >= 0 && index < ui->qssComboBox->count()) {\n        ui->qssComboBox->setCurrentIndex(index);\n    }\n\n    int max = m_liteApp->settings()->value(LITEAPP_MAXRECENTFILES,32).toInt();\n    //ui->maxRecentLineEdit->setText(QString(\"%1\").arg(max));\n    ui->maxRecentFilesSpinBox->setValue(max);\n    max = m_liteApp->settings()->value(LITEAPP_MAXEDITORCOUNT,64).toInt();\n    ui->maxEditorCountSpinBox->setValue(max);\n    //bool b = m_liteApp->settings()->value(LITEAPP_AUTOCLOSEPROEJCTFILES,true).toBool();\n    //ui->autoCloseProjecEditorsCheckBox->setChecked(b);\n    bool b1 = m_liteApp->settings()->value(LITEAPP_AUTOLOADLASTSESSION,true).toBool();\n    ui->autoLoadLastSessionCheckBox->setChecked(b1);\n    bool b2 = m_liteApp->settings()->value(LITEAPP_SPLASHVISIBLE,true).toBool();\n    ui->splashVisibleCheckBox->setChecked(b2);\n    bool b3 = m_liteApp->settings()->value(LITEAPP_WELCOMEPAGEVISIBLE,true).toBool();\n    ui->welcomeVisibleCheckBox->setChecked(b3);\n\n    bool b4 = m_liteApp->settings()->value(LITEAPP_EDITTABSCLOSABLE,true).toBool();\n    ui->editorTabsClosableCheckBox->setChecked(b4);\n\n//    bool b5 = m_liteApp->settings()->value(LITEAPP_STARTUPRELOADFOLDERS,true).toBool();\n//    ui->startupReloadFoldersCheckBox->setChecked(b5);\n\n    bool b6 = m_liteApp->settings()->value(LITEAPP_STARTUPRELOADFILES,true).toBool();\n    ui->startupReloadFilesCheckBox->setChecked(b6);\n\n    bool b7 = m_liteApp->settings()->value(LITEAPP_FILEWATCHERAUTORELOAD,false).toBool();\n    ui->fileWatcherAutoReloadCheckBox->setChecked(b7);\n\n    bool b8 = m_liteApp->settings()->value(LITEAPP_EDITTABSENABLEWHELL,true).toBool();\n    ui->editorTabsEnableWhellCheckBox->setChecked(b8);\n\n    int id = m_liteApp->settings()->value(LITEAPP_TOOLBARICONSIZE,0).toInt();\n    if (id >= 0 && id < ui->buttonGroup->buttons().size()) {\n        ui->buttonGroup->buttons().at(id)->setChecked(true);\n    }\n\n\n    bool b9 = m_liteApp->settings()->value(LITEAPP_AUTOIDLESAVEDOCUMENTS,false).toBool();\n    ui->autoIdleSaveDocumentsCheckBox->setChecked(b9);\n\n    int time = m_liteApp->settings()->value(LITEAPP_AUTOIDLESAVEDOCUMENTS_TIME,3).toInt();\n    if (time < 1) {\n        time = 1;\n    }\n    ui->autoIdleSaveDocumentsTimeSpinBox->setValue(time);\n\n    bool toolwndshortcuts = m_liteApp->settings()->value(LITEAPP_TOOLWINDOW_SHORTCUTS,true).toBool();\n    ui->toolWindowShortcutsCheckBox->setChecked(toolwndshortcuts);\n\n    bool ext = m_liteApp->settings()->value(LITEAPP_EDITORMOUSEEXTNAVIGATE,true).toBool();\n    ui->editorMouseExtNavigateCheckBox->setChecked(ext);\n\n    QString iconPath = m_liteApp->settings()->value(LITEIDE_CUSTOMEICONPATH,\"default\").toString();\n    index = ui->iconPathComboBox->findText(iconPath,Qt::MatchFixedString);\n    if (index >= 0 && index < ui->iconPathComboBox->count()) {\n        ui->iconPathComboBox->setCurrentIndex(index);\n    }\n\n    ui->standardCheckBox->setChecked(true);\n    autoLoadLastSessionToggled(ui->autoLoadLastSessionCheckBox->isChecked());\n\n    this->reloadShortcuts();\n}\n\nvoid LiteAppOption::reloadShortcuts()\n{\n    m_keysModel->removeRows(0,m_keysModel->rowCount());\n    bool bCheckStandard = ui->standardCheckBox->isChecked();\n    foreach(QString name, m_liteApp->actionManager()->actionContextNameList() ) {\n        LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->actionContextForName(name);\n        if (actionContext) {\n            QStandardItem *root = new QStandardItem(name);\n            root->setEditable(false);\n            foreach(QString id, actionContext->actionKeys()) {\n                LiteApi::ActionInfo *info = actionContext->actionInfo(id);\n                if (!info) {\n                    continue;\n                }\n                if (bCheckStandard && info->standard && (info->ks == info->defks)) {\n                    continue;\n                }\n                QStandardItem *item = new QStandardItem(id);\n                item->setEditable(false);\n                QStandardItem *label = new QStandardItem(info->label);\n                label->setEditable(false);\n                QStandardItem *std = new QStandardItem;\n                std->setCheckable(true);\n                std->setEnabled(false);\n                std->setCheckState(info->standard?Qt::Checked:Qt::Unchecked);\n                QStandardItem *bind = new QStandardItem(info->ks);\n                bind->setEditable(true);\n                if (info->ks != info->defks) {\n                    QFont font = bind->font();\n                    font.setBold(true);\n                    bind->setFont(font);\n                }\n                QStandardItem *native = new QStandardItem(ActionManager::formatShortcutsNativeString(info->ks));\n                native->setEditable(false);\n\n                root->appendRow(QList<QStandardItem*>() << item << label << bind << native << std);\n            }\n            m_keysModel->appendRow(root);\n        }\n    }\n    ui->keysTreeView->expandAll();\n}\n\nvoid LiteAppOption::shortcutsChanaged(QStandardItem *bind)\n{\n    if (!bind) {\n        return;\n    }\n    QStandardItem *root = bind->parent();\n    if (!root) {\n        return;\n    }\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->actionContextForName(root->text());\n     if (!actionContext) {\n         return;\n    }\n    QStandardItem *item = root->child(bind->row(),0);\n    if (!item) {\n        return;\n    }\n    QStandardItem *native = root->child(bind->row(),3);\n    LiteApi::ActionInfo *info = actionContext->actionInfo(item->text());\n    if (!info) {\n        return;\n    }\n    m_keysModel->blockSignals(true);\n    bind->setText(ActionManager::formatShortcutsString(bind->text()));\n    native->setText(ActionManager::formatShortcutsNativeString(bind->text()));\n    m_keysModel->blockSignals(false);\n    QFont font = bind->font();\n    if (info->defks != bind->text()) {\n        font.setBold(true);\n    } else {\n        font.setBold(false);\n    }\n    bind->setFont(font);\n}\n\nvoid LiteAppOption::resetAllShortcuts()\n{\n    for (int i = 0; i < m_keysModel->rowCount(); i++) {\n        QStandardItem *root = m_keysModel->item(i,0);\n        if (!root) {\n            continue;\n        }\n        LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->actionContextForName(root->text());\n        if (!actionContext) {\n            continue;\n        }\n        for (int j = 0; j < root->rowCount(); j++) {\n            QStandardItem *id = root->child(j,0);\n            if (!id) {\n                continue;\n            }\n            QStandardItem *bind = root->child(j,2);\n            if (!bind) {\n                continue;\n            }\n            LiteApi::ActionInfo *info = actionContext->actionInfo(id->text());\n            if (!info) {\n                continue;\n            }\n            bind->setText(info->defks);\n            QFont font = bind->font();\n            font.setBold(false);\n            bind->setFont(font);\n        }\n    }\n}\n\nvoid LiteAppOption::resetShortcuts()\n{\n    QModelIndex index = ui->keysTreeView->currentIndex();\n    if (!index.isValid()) {\n        return;\n    }    \n    QModelIndex rootIndex = index.parent();\n    if (!rootIndex.isValid()) {\n        return;\n    }\n    QStandardItem *root = m_keysModel->item(rootIndex.row());\n    if (!root) {\n        return;\n    }\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->actionContextForName(root->text());\n    if (!actionContext) {\n        return;\n    }\n    QStandardItem *id = root->child(index.row(),0);\n    if (!id) {\n        return;\n    }\n    QStandardItem *bind = root->child(index.row(),2);\n    if (!bind) {\n        return;\n    }\n    LiteApi::ActionInfo *info = actionContext->actionInfo(id->text());\n    if (!info) {\n        return;\n    }\n    bind->setText(info->defks);\n    QFont font = bind->font();\n    font.setBold(false);\n    bind->setFont(font);\n}\n\nvoid LiteAppOption::importShortcuts()\n{\n    QString dir = m_liteApp->resourcePath()+\"/liteapp/kms\";\n    QString filePath = QFileDialog::getOpenFileName(m_liteApp->mainWindow(),tr(\"Import Keyboard Mapping Scheme\"),dir,QString(tr(\"Keyboard Mapping Scheme (%1)\")).arg(\"*.kms\"));\n    if (filePath.isEmpty()) {\n        return;\n    }\n    QSettings read(filePath,QSettings::IniFormat);\n    int version = read.value(\"liteidex/version\",0).toInt();\n    if (version < 1) {\n        QMessageBox::critical(m_liteApp->mainWindow(),\"Import Error\",QString(tr(\"Could not read scheme from %1!\")).arg(filePath));\n        return;\n    }\n\n    for (int i = 0; i < m_keysModel->rowCount(); i++) {\n        QStandardItem *root = m_keysModel->item(i,0);\n        for (int j = 0; j < root->rowCount(); j++) {\n            QStandardItem *id = root->child(j,0);\n            if (!id) {\n                continue;\n            }\n            QStandardItem *bind = root->child(j,2);\n            if (!bind) {\n                continue;\n            }\n            QVariant val = read.value(root->text()+\"/\"+id->text());\n            if (!val.isValid()) {\n                continue;\n            }\n            bind->setText(ActionManager::formatShortcutsString(val.toString()));\n        }\n    }\n}\n\nvoid LiteAppOption::exportShortcuts()\n{\n    QString dir = m_liteApp->resourcePath()+\"/liteapp/kms\";\n    QString filePath = QFileDialog::getSaveFileName(m_liteApp->mainWindow(),tr(\"Export Keyboard Mapping Scheme\"),dir,QString(tr(\"Keyboard Mapping Scheme (%1)\")).arg(\"*.kms\"));\n    if (filePath.isEmpty()) {\n        return;\n    }\n    QFileInfo info(filePath);\n    if (info.suffix() != \"kms\") {\n        filePath += \".kms\";\n    }\n\n    QSettings write(filePath,QSettings::IniFormat);\n    if (!write.isWritable()) {\n        QMessageBox::critical(m_liteApp->mainWindow(),\"Export Error\",QString(tr(\"Could not write scheme to %1!\")).arg(filePath));\n        return;\n    }\n    write.clear();\n    write.setValue(\"liteidex/version\",1);\n    for (int i = 0; i < m_keysModel->rowCount(); i++) {\n        QStandardItem *root = m_keysModel->item(i,0);\n        for (int j = 0; j < root->rowCount(); j++) {\n            QStandardItem *id = root->child(j,0);\n            if (!id) {\n                continue;\n            }\n            QStandardItem *bind = root->child(j,2);\n            if (!bind) {\n                continue;\n            }\n            write.setValue(root->text()+\"/\"+id->text(),bind->text());\n        }\n    }\n}\n\nvoid LiteAppOption::autoLoadLastSessionToggled(bool b)\n{\n    //ui->startupReloadFoldersCheckBox->setEnabled(b);\n    ui->startupReloadFilesCheckBox->setEnabled(b);\n}\n\nvoid LiteAppOption::autoIdleSaveDocumentsToggled(bool /*b*/)\n{\n\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/liteappoption.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteappoption.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEAPPOPTION_H\n#define LITEAPPOPTION_H\n\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class LiteAppOption;\n}\n\nclass QStandardItemModel;\nclass QStandardItem;\n\nclass LiteAppOption : public LiteApi::IOption\n{\n    Q_OBJECT\n\npublic:\n    explicit LiteAppOption(LiteApi::IApplication *app, QObject *parent = 0);\n    ~LiteAppOption();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void save();\n    virtual void load();\npublic slots:\n    void reloadShortcuts();\n    void shortcutsChanaged(QStandardItem*);\n    void resetAllShortcuts();\n    void resetShortcuts();\n    void importShortcuts();\n    void exportShortcuts();\n    void autoLoadLastSessionToggled(bool b);\n    void autoIdleSaveDocumentsToggled(bool);\nprivate:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget           *m_widget;\n    Ui::LiteAppOption *ui;\n    QStandardItemModel *m_keysModel;\n    //GopherLib libgopher;\n};\n\n#endif // LITEAPPOPTION_H\n"
  },
  {
    "path": "liteidex/src/liteapp/liteappoption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>LiteAppOption</class>\n <widget class=\"QWidget\" name=\"LiteAppOption\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>640</width>\n    <height>435</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_7\">\n   <item>\n    <widget class=\"QTabWidget\" name=\"tabWidget\">\n     <property name=\"currentIndex\">\n      <number>0</number>\n     </property>\n     <widget class=\"QWidget\" name=\"tab\">\n      <attribute name=\"title\">\n       <string>Generic</string>\n      </attribute>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_4\">\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox_4\">\n         <property name=\"title\">\n          <string>Store [*]</string>\n         </property>\n         <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\">\n          <item>\n           <widget class=\"QCheckBox\" name=\"storeLocalCheckBox\">\n            <property name=\"font\">\n             <font>\n              <italic>false</italic>\n             </font>\n            </property>\n            <property name=\"text\">\n             <string>Store settings to local ini file</string>\n            </property>\n           </widget>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox\">\n         <property name=\"title\">\n          <string>Interface [*]</string>\n         </property>\n         <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n          <item>\n           <widget class=\"QLabel\" name=\"label\">\n            <property name=\"text\">\n             <string>Language:</string>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QComboBox\" name=\"langComboBox\">\n            <property name=\"sizePolicy\">\n             <sizepolicy hsizetype=\"Preferred\" vsizetype=\"Fixed\">\n              <horstretch>0</horstretch>\n              <verstretch>0</verstretch>\n             </sizepolicy>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QLabel\" name=\"label_6\">\n            <property name=\"text\">\n             <string>Style:</string>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QComboBox\" name=\"styleComboBox\"/>\n          </item>\n          <item>\n           <widget class=\"QCheckBox\" name=\"toolWindowShortcutsCheckBox\">\n            <property name=\"text\">\n             <string>Use tool window shortcuts</string>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <spacer name=\"horizontalSpacer_3\">\n            <property name=\"orientation\">\n             <enum>Qt::Horizontal</enum>\n            </property>\n            <property name=\"sizeType\">\n             <enum>QSizePolicy::Expanding</enum>\n            </property>\n            <property name=\"sizeHint\" stdset=\"0\">\n             <size>\n              <width>40</width>\n              <height>20</height>\n             </size>\n            </property>\n           </spacer>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <layout class=\"QHBoxLayout\" name=\"horizontalLayout_11\">\n         <item>\n          <widget class=\"QGroupBox\" name=\"groupBox_6\">\n           <property name=\"title\">\n            <string>Theme [*]</string>\n           </property>\n           <layout class=\"QHBoxLayout\" name=\"horizontalLayout_6\">\n            <item>\n             <widget class=\"QLabel\" name=\"label_4\">\n              <property name=\"text\">\n               <string>Theme:</string>\n              </property>\n             </widget>\n            </item>\n            <item>\n             <widget class=\"QComboBox\" name=\"qssComboBox\"/>\n            </item>\n            <item>\n             <spacer name=\"horizontalSpacer\">\n              <property name=\"orientation\">\n               <enum>Qt::Horizontal</enum>\n              </property>\n              <property name=\"sizeHint\" stdset=\"0\">\n               <size>\n                <width>40</width>\n                <height>20</height>\n               </size>\n              </property>\n             </spacer>\n            </item>\n           </layout>\n          </widget>\n         </item>\n         <item>\n          <widget class=\"QGroupBox\" name=\"groupBox_11\">\n           <property name=\"title\">\n            <string>Icon [*]</string>\n           </property>\n           <property name=\"checkable\">\n            <bool>false</bool>\n           </property>\n           <layout class=\"QHBoxLayout\" name=\"horizontalLayout_4\">\n            <item>\n             <widget class=\"QCheckBox\" name=\"customIconCheckBox\">\n              <property name=\"toolTip\">\n               <string>Fallback build-in icon library and liteapp/qrc/default</string>\n              </property>\n              <property name=\"text\">\n               <string>Load the external file icon library</string>\n              </property>\n             </widget>\n            </item>\n            <item>\n             <widget class=\"QComboBox\" name=\"iconPathComboBox\"/>\n            </item>\n            <item>\n             <spacer name=\"horizontalSpacer_4\">\n              <property name=\"orientation\">\n               <enum>Qt::Horizontal</enum>\n              </property>\n              <property name=\"sizeHint\" stdset=\"0\">\n               <size>\n                <width>40</width>\n                <height>20</height>\n               </size>\n              </property>\n             </spacer>\n            </item>\n           </layout>\n          </widget>\n         </item>\n        </layout>\n       </item>\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox_10\">\n         <property name=\"title\">\n          <string>Automatically save documents</string>\n         </property>\n         <layout class=\"QHBoxLayout\" name=\"horizontalLayout_8\">\n          <item>\n           <widget class=\"QCheckBox\" name=\"autoIdleSaveDocumentsCheckBox\">\n            <property name=\"text\">\n             <string>Automatically save documents when application is idle</string>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QSpinBox\" name=\"autoIdleSaveDocumentsTimeSpinBox\">\n            <property name=\"specialValueText\">\n             <string/>\n            </property>\n            <property name=\"suffix\">\n             <string>sec</string>\n            </property>\n            <property name=\"minimum\">\n             <number>1</number>\n            </property>\n            <property name=\"maximum\">\n             <number>120</number>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <spacer name=\"horizontalSpacer_5\">\n            <property name=\"orientation\">\n             <enum>Qt::Horizontal</enum>\n            </property>\n            <property name=\"sizeHint\" stdset=\"0\">\n             <size>\n              <width>40</width>\n              <height>20</height>\n             </size>\n            </property>\n           </spacer>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox_5\">\n         <property name=\"title\">\n          <string>Monitoring files for modifications</string>\n         </property>\n         <layout class=\"QVBoxLayout\" name=\"verticalLayout_3\">\n          <item>\n           <widget class=\"QCheckBox\" name=\"fileWatcherAutoReloadCheckBox\">\n            <property name=\"text\">\n             <string>Auto reload or close editor buffer,if underlying file is modified/deleted.</string>\n            </property>\n           </widget>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <spacer name=\"verticalSpacer\">\n         <property name=\"orientation\">\n          <enum>Qt::Vertical</enum>\n         </property>\n         <property name=\"sizeHint\" stdset=\"0\">\n          <size>\n           <width>20</width>\n           <height>40</height>\n          </size>\n         </property>\n        </spacer>\n       </item>\n      </layout>\n      <zorder>groupBox</zorder>\n      <zorder>groupBox_4</zorder>\n      <zorder>groupBox_5</zorder>\n      <zorder>groupBox_10</zorder>\n     </widget>\n     <widget class=\"QWidget\" name=\"tab_5\">\n      <attribute name=\"title\">\n       <string>Session</string>\n      </attribute>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_10\">\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox_3\">\n         <property name=\"title\">\n          <string>Session</string>\n         </property>\n         <layout class=\"QVBoxLayout\" name=\"verticalLayout_6\">\n          <item>\n           <widget class=\"QCheckBox\" name=\"autoLoadLastSessionCheckBox\">\n            <property name=\"text\">\n             <string>Reload session on startup</string>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <layout class=\"QHBoxLayout\" name=\"horizontalLayout_5\">\n            <item>\n             <spacer name=\"horizontalSpacer_6\">\n              <property name=\"orientation\">\n               <enum>Qt::Horizontal</enum>\n              </property>\n              <property name=\"sizeType\">\n               <enum>QSizePolicy::Fixed</enum>\n              </property>\n              <property name=\"sizeHint\" stdset=\"0\">\n               <size>\n                <width>40</width>\n                <height>20</height>\n               </size>\n              </property>\n             </spacer>\n            </item>\n            <item>\n             <widget class=\"QCheckBox\" name=\"startupReloadFilesCheckBox\">\n              <property name=\"text\">\n               <string>Reload files in session</string>\n              </property>\n             </widget>\n            </item>\n           </layout>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox_2\">\n         <property name=\"title\">\n          <string>Recent Files</string>\n         </property>\n         <layout class=\"QHBoxLayout\" name=\"horizontalLayout_3\" stretch=\"0,0,0\">\n          <item>\n           <widget class=\"QLabel\" name=\"label_3\">\n            <property name=\"text\">\n             <string>Max Count:</string>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QSpinBox\" name=\"maxRecentFilesSpinBox\">\n            <property name=\"toolTip\">\n             <string>0-99</string>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <spacer name=\"horizontalSpacer_2\">\n            <property name=\"orientation\">\n             <enum>Qt::Horizontal</enum>\n            </property>\n            <property name=\"sizeType\">\n             <enum>QSizePolicy::Expanding</enum>\n            </property>\n            <property name=\"sizeHint\" stdset=\"0\">\n             <size>\n              <width>40</width>\n              <height>20</height>\n             </size>\n            </property>\n           </spacer>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox_12\">\n         <property name=\"title\">\n          <string>Editor Tabs</string>\n         </property>\n         <layout class=\"QHBoxLayout\" name=\"horizontalLayout_9\">\n          <item>\n           <widget class=\"QLabel\" name=\"label_2\">\n            <property name=\"text\">\n             <string>Max Count:</string>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QSpinBox\" name=\"maxEditorCountSpinBox\">\n            <property name=\"toolTip\">\n             <string>10-999</string>\n            </property>\n            <property name=\"minimum\">\n             <number>10</number>\n            </property>\n            <property name=\"maximum\">\n             <number>999</number>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <spacer name=\"horizontalSpacer_8\">\n            <property name=\"orientation\">\n             <enum>Qt::Horizontal</enum>\n            </property>\n            <property name=\"sizeHint\" stdset=\"0\">\n             <size>\n              <width>40</width>\n              <height>20</height>\n             </size>\n            </property>\n           </spacer>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <spacer name=\"verticalSpacer_3\">\n         <property name=\"orientation\">\n          <enum>Qt::Vertical</enum>\n         </property>\n         <property name=\"sizeHint\" stdset=\"0\">\n          <size>\n           <width>20</width>\n           <height>48</height>\n          </size>\n         </property>\n        </spacer>\n       </item>\n      </layout>\n     </widget>\n     <widget class=\"QWidget\" name=\"tab_3\">\n      <attribute name=\"title\">\n       <string>Display</string>\n      </attribute>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox_8\">\n         <property name=\"title\">\n          <string>Display [*]</string>\n         </property>\n         <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n          <item>\n           <widget class=\"QCheckBox\" name=\"splashVisibleCheckBox\">\n            <property name=\"text\">\n             <string>Show splash screen on startup</string>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QCheckBox\" name=\"welcomeVisibleCheckBox\">\n            <property name=\"text\">\n             <string>Show welcome page on startup</string>\n            </property>\n           </widget>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox_9\">\n         <property name=\"title\">\n          <string>Toolbar Icon Size [*]</string>\n         </property>\n         <layout class=\"QHBoxLayout\" name=\"horizontalLayout_10\">\n          <item>\n           <widget class=\"QRadioButton\" name=\"radioButton\">\n            <property name=\"text\">\n             <string notr=\"true\">16x16</string>\n            </property>\n            <attribute name=\"buttonGroup\">\n             <string notr=\"true\">buttonGroup</string>\n            </attribute>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QRadioButton\" name=\"radioButton_2\">\n            <property name=\"text\">\n             <string notr=\"true\">18x18</string>\n            </property>\n            <attribute name=\"buttonGroup\">\n             <string notr=\"true\">buttonGroup</string>\n            </attribute>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QRadioButton\" name=\"radioButton_3\">\n            <property name=\"text\">\n             <string notr=\"true\">20x20</string>\n            </property>\n            <attribute name=\"buttonGroup\">\n             <string notr=\"true\">buttonGroup</string>\n            </attribute>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QRadioButton\" name=\"radioButton_4\">\n            <property name=\"text\">\n             <string notr=\"true\">22x22</string>\n            </property>\n            <attribute name=\"buttonGroup\">\n             <string notr=\"true\">buttonGroup</string>\n            </attribute>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QRadioButton\" name=\"radioButton_5\">\n            <property name=\"text\">\n             <string notr=\"true\">24x24</string>\n            </property>\n            <attribute name=\"buttonGroup\">\n             <string notr=\"true\">buttonGroup</string>\n            </attribute>\n           </widget>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <spacer name=\"verticalSpacer_4\">\n         <property name=\"orientation\">\n          <enum>Qt::Vertical</enum>\n         </property>\n         <property name=\"sizeHint\" stdset=\"0\">\n          <size>\n           <width>20</width>\n           <height>40</height>\n          </size>\n         </property>\n        </spacer>\n       </item>\n      </layout>\n     </widget>\n     <widget class=\"QWidget\" name=\"tab_4\">\n      <attribute name=\"title\">\n       <string>Editor</string>\n      </attribute>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_9\">\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox_7\">\n         <property name=\"title\">\n          <string>Editor tab [*]</string>\n         </property>\n         <layout class=\"QVBoxLayout\" name=\"verticalLayout_8\">\n          <item>\n           <widget class=\"QCheckBox\" name=\"editorTabsClosableCheckBox\">\n            <property name=\"text\">\n             <string>Show close buttons on each editor tab</string>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QCheckBox\" name=\"editorTabsEnableWhellCheckBox\">\n            <property name=\"text\">\n             <string>Enable mouse wheel navigation on tabs</string>\n            </property>\n           </widget>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QGroupBox\" name=\"groupBox_13\">\n         <property name=\"title\">\n          <string>Editor navigate</string>\n         </property>\n         <layout class=\"QHBoxLayout\" name=\"horizontalLayout_12\">\n          <item>\n           <widget class=\"QCheckBox\" name=\"editorMouseExtNavigateCheckBox\">\n            <property name=\"text\">\n             <string>Enable mouse extra 'Back' button and 'Forward' button for go back and forward</string>\n            </property>\n           </widget>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <spacer name=\"verticalSpacer_2\">\n         <property name=\"orientation\">\n          <enum>Qt::Vertical</enum>\n         </property>\n         <property name=\"sizeHint\" stdset=\"0\">\n          <size>\n           <width>20</width>\n           <height>270</height>\n          </size>\n         </property>\n        </spacer>\n       </item>\n      </layout>\n     </widget>\n     <widget class=\"QWidget\" name=\"tab_2\">\n      <attribute name=\"title\">\n       <string>Keyboard</string>\n      </attribute>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_5\">\n       <item>\n        <widget class=\"QLabel\" name=\"label_5\">\n         <property name=\"text\">\n          <string>Format: {Ctrl+B},{Ctrl+Shift+B},{Ctrl+K,Ctrl+U},{Ctrl+Shift+Z;Ctrl+Y}</string>\n         </property>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QTreeView\" name=\"keysTreeView\"/>\n       </item>\n       <item>\n        <layout class=\"QHBoxLayout\" name=\"horizontalLayout_7\">\n         <item>\n          <widget class=\"QCheckBox\" name=\"standardCheckBox\">\n           <property name=\"text\">\n            <string>Hide standard commands</string>\n           </property>\n          </widget>\n         </item>\n         <item>\n          <widget class=\"QPushButton\" name=\"resetButton\">\n           <property name=\"text\">\n            <string>Reset</string>\n           </property>\n          </widget>\n         </item>\n         <item>\n          <widget class=\"QPushButton\" name=\"resetAllButton\">\n           <property name=\"text\">\n            <string>Reset All</string>\n           </property>\n          </widget>\n         </item>\n         <item>\n          <spacer name=\"horizontalSpacer_7\">\n           <property name=\"orientation\">\n            <enum>Qt::Horizontal</enum>\n           </property>\n           <property name=\"sizeHint\" stdset=\"0\">\n            <size>\n             <width>40</width>\n             <height>20</height>\n            </size>\n           </property>\n          </spacer>\n         </item>\n         <item>\n          <widget class=\"QPushButton\" name=\"importButton\">\n           <property name=\"text\">\n            <string>Import...</string>\n           </property>\n          </widget>\n         </item>\n         <item>\n          <widget class=\"QPushButton\" name=\"exportButton\">\n           <property name=\"text\">\n            <string>Export...</string>\n           </property>\n          </widget>\n         </item>\n        </layout>\n       </item>\n      </layout>\n     </widget>\n    </widget>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n <buttongroups>\n  <buttongroup name=\"buttonGroup\"/>\n </buttongroups>\n</ui>\n"
  },
  {
    "path": "liteidex/src/liteapp/liteappoptionfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteappoptionfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"liteappoption.h\"\n#include \"outputoption.h\"\n#include \"liteappoptionfactory.h\"\n#include \"liteapp_global.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nLiteAppOptionFactory::LiteAppOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n}\n\nQStringList LiteAppOptionFactory::mimeTypes() const\n{\n    return QStringList() << OPTION_LITEAPP << OPTION_LITEOUTPUT;\n}\n\nLiteApi::IOption *LiteAppOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == OPTION_LITEAPP) {\n        return new LiteAppOption(m_liteApp,this);\n    } else if (mimeType == OPTION_LITEOUTPUT) {\n        return new OutputOption(m_liteApp,this);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/liteappoptionfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteappoptionfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEAPPOPTIONFACTORY_H\n#define LITEAPPOPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass LiteAppOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n    LiteAppOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // LITEAPPOPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/liteapp/macsupport.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: macsupport.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MACSUPPORT_H\n#define MACSUPPORT_H\n\n#include <QMainWindow>\n#include <QSysInfo>\n\nclass MacSupport\n{\npublic:\n    static void setFullScreen(QMainWindow *window);\n    static bool isLionOrHigh()\n    {\n        return QSysInfo::MacintoshVersion > QSysInfo::MV_10_6;\n    }\n};\n\n#endif // MACSUPPORT_H\n"
  },
  {
    "path": "liteidex/src/liteapp/macsupport.mm",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 visualfc. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: macsupport.mm\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"macsupport.h\"\n#include <AppKit/NSView.h>\n#include <AppKit/NSWindow.h>\n\n#ifndef NSWindowCollectionBehaviorFullScreenPrimary\n#define NSWindowCollectionBehaviorFullScreenPrimary 1 << 7\n#endif\n\nvoid MacSupport::setFullScreen(QMainWindow *window)\n{\n    NSView *nsview = (NSView*)window->winId();\n    NSWindow *nswindow = [nsview window];\n    [nswindow setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/main.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: main.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include <QApplication>\n#include <QTranslator>\n#include <QLocale>\n#include <QLibraryInfo>\n#include <QDir>\n#include <QSettings>\n#include <QSplashScreen>\n#include <QTextCodec>\n#if QT_VERSION >= 0x050000\n#include <QStandardPaths>\n#endif\n#ifdef Q_OS_MACOS\n#include <QtConcurrent/QtConcurrent>\n#endif\n#include <QDebug>\n#include <QtGlobal>\n#include \"mainwindow.h\"\n#include \"liteapp.h\"\n#include \"goproxy.h\"\n#include \"cdrv.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n#ifdef Q_OS_MACOS\nclass LiteIDEApplication : public QApplication {\npublic:\n    IApplication *liteApp = nullptr;\n\n    LiteIDEApplication(int &argc, char **argv) : QApplication(argc, argv) {}\n\n    bool event(QEvent *event) override\n    {\n        if (event->type() == QEvent::FileOpen) {\n            QString filePath = static_cast<QFileOpenEvent *>(event)->file();\n            if (liteApp == nullptr) {\n                // Cold start, wait liteApp ready\n                QFuture<void> future = QtConcurrent::run([this, filePath](){\n                    while(this->liteApp == nullptr) QThread::sleep(1);\n                    QMetaObject::invokeMethod(this, [this, filePath]() {\n                        openFileOrFolder(filePath);\n                    }, Qt::QueuedConnection);\n                });\n            } else {\n                openFileOrFolder(filePath);\n            }\n        }\n        return QApplication::event(event);\n    }\n\nprivate:\n    void openFileOrFolder(QString filePath) {\n        QFileInfo f(filePath);\n        if (!f.exists() || liteApp == nullptr) return;\n        if (f.isFile()) {\n            liteApp->fileManager()->openEditor(filePath);\n        } else if (f.isDir()) {\n            liteApp->fileManager()->addFolderList(filePath);\n        }\n    }\n};\n#endif\n\n#ifdef LITEAPP_LIBRARY\nint liteapp_main(int argc, char *argv[])\n#else\nint main(int argc, char *argv[])\n#endif\n{\n#ifndef LITEAPP_LIBRARY\n    #if defined(_MSC_VER) && defined(_DEBUG)\n        _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF);\n    #endif\n#endif\n    \n#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)\n    QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);\n#endif\n\n#ifdef Q_OS_MACOS\n    LiteIDEApplication app(argc, argv);\n#else\n    QApplication app(argc, argv);\n#endif\n    QStringList arguments = app.arguments();\n\n    //init load file or folder list\n    QStringList fileList;\n\n    //liteide --select-env [system|win32|cross-linux64|...]     select init environment id\n    //liteide --reset-setting   reset current setting\n    //liteide --local-setting   force user local setting\n    //liteide --user-setting    force use user setting\n    QString flagSelectEnv = \"--select-env\";\n    QString argSelectEnv;\n    QString flagResetSetting = \"--reset-setting\";\n    QString flagLocalSetting = \"--local-setting\";\n    QString flagUserSetting = \"--user-setting\";\n    bool argResetSetting = false;\n    bool argLocalSetting = false;\n    bool argUserSetting = false;\n    for(int i = 1; i < arguments.size(); i++) {\n        QString arg = arguments[i];\n        if (arg.startsWith(\"-\")) {\n            if (arg.indexOf(flagSelectEnv+\"=\") == 0) {\n                argSelectEnv = arg.mid(flagSelectEnv.length()+1);\n            } else if (arg == flagSelectEnv) {\n                i++;\n                if (i < arguments.size()) {\n                    argSelectEnv = arguments[i];\n                }\n            } else if (arg == flagResetSetting) {\n                argResetSetting = true;\n            } else if (arg == flagLocalSetting) {\n                argLocalSetting = true;\n            } else if (arg == flagUserSetting) {\n                argUserSetting = true;\n            }\n            continue;\n        }\n        fileList.append(arg);\n    }\n\n    //save to global\n    if (!argSelectEnv.isEmpty()) {\n        LiteApp::s_cookie.insert(flagSelectEnv,argSelectEnv);\n    }\n    if (argLocalSetting) {\n        LiteApp::s_cookie.insert(flagLocalSetting,true);\n    }\n    if (argUserSetting) {\n        LiteApp::s_cookie.insert(flagUserSetting,true);\n    }\n\n#if QT_VERSION >= 0x050100\n    app.setAttribute(Qt::AA_UseHighDpiPixmaps);\n#endif\n\n    //QFont::insertSubstitution(\".Lucida Grande UI\", \"Lucida Grande\");\n    QTranslator translator;\n    QTranslator qtTranslator;\n\n    QString resPath = LiteApp::getResoucePath();\n    QString locale = QLocale::system().name();\n    QString qss;\n    QSettings global(resPath+\"/liteapp/config/global.ini\",QSettings::IniFormat);\n    bool storeLocal = global.value(LITEIDE_STORELOCAL,false).toBool();\n\n    if (argUserSetting) {\n        storeLocal = false;\n    } else if (argLocalSetting) {\n        storeLocal = true;\n    }\n\n    if (storeLocal) {\n        QSettings settings(resPath+\"/liteapp/config/liteide.ini\", QSettings::IniFormat);\n        if (argResetSetting) {\n            settings.clear();\n        }\n        locale = settings.value(LITEAPP_LANGUAGE,locale).toString();\n        qss = settings.value(LITEAPP_QSS,\"default.qss\").toString();\n    } else {\n        QSettings settings(QSettings::IniFormat,QSettings::UserScope,\"liteide\",\"liteide\");\n        if (argResetSetting) {\n            settings.clear();\n        }\n        locale = settings.value(LITEAPP_LANGUAGE,locale).toString();\n        qss = settings.value(LITEAPP_QSS,\"default.qss\").toString();\n    }\n\n    if (!locale.isEmpty()) {\n        const QString &liteideTrPath = resPath+\"/translations\";\n        if (translator.load(QLatin1String(\"liteide_\") + locale, liteideTrPath)) {\n            const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);\n            const QString &qtTrFile = QLatin1String(\"qt_\") + locale;\n            // Binary installer puts Qt tr files into creatorTrPath            \n            app.installTranslator(&translator);\n            if (qtTranslator.load(qtTrFile, qtTrPath) || qtTranslator.load(qtTrFile, liteideTrPath)) {\n                app.installTranslator(&qtTranslator);\n            }\n            app.setProperty(\"liteide_locale\", locale);\n        }\n    }\n    if (!qss.isEmpty()) {\n        QFile f(resPath+\"/liteapp/qss/\"+qss);\n        if (f.open(QFile::ReadOnly)) {\n            QString styleSheet = QLatin1String(f.readAll());\n            app.setStyleSheet(styleSheet);\n        }\n    }\n\n    IApplication *liteApp = LiteApp::NewApplication(\"default\",0);\n\n#ifdef Q_OS_MACOS\n    app.liteApp = liteApp;\n#endif\n\n    foreach(QString file, fileList) {\n        QFileInfo f(file);\n        if (f.isFile()) {\n            liteApp->fileManager()->openEditor(file);\n        } else if (f.isDir()) {\n            liteApp->fileManager()->addFolderList(file);\n        }\n    }\n\n    int ret = app.exec();\n    return ret;\n}\n\nint cdrv_main(int argc, char **argv)\n{\n    return liteapp_main(argc,argv);\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/mainwindow.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: mainwindow.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"mainwindow.h\"\n#include \"aboutdialog.h\"\n\n#include <QAction>\n#include <QActionGroup>\n#include <QIcon>\n#include <QMenuBar>\n#include <QToolBar>\n#include <QStatusBar>\n#include <QMessageBox>\n#include <QDockWidget>\n#include <QPushButton>\n#include <QFileDialog>\n#include <QCloseEvent>\n#include <QVBoxLayout>\n#include <QUrl>\n#include <QMimeData>\n#include <QTextBlock>\n#include <QRegExp>\n#include <QFileInfo>\n#include <QSplitter>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nQMenu* MainWindow::s_macDocMenu = 0;\nQMap<QWidget*, QAction*> MainWindow::s_windowActions;\n\nMainWindow::MainWindow(IApplication *app, QWidget *parent)\n    : ToolMainWindow(parent),\n      m_liteApp(app),\n      m_windowClosedCheck(false)\n{\n    this->setAttribute(Qt::WA_DeleteOnClose);\n    QIcon icon;\n    icon.addFile(\"icon:images/liteide16.png\");\n    icon.addFile(\"icon:images/liteide24.png\");\n    icon.addFile(\"icon:images/liteide32.png\");\n    icon.addFile(\"icon:images/liteide48.png\");\n    icon.addFile(\"icon:images/liteide64.png\");\n    icon.addFile(\"icon:images/liteide128.png\");\n    this->setWindowIcon(icon);\n    this->setContextMenuPolicy(Qt::CustomContextMenu);\n    this->setAcceptDrops(true);\n\n    m_mainSplitter = new QSplitter(Qt::Vertical,this);\n    setCentralWidget(m_mainSplitter);\n\n#if QT_VERSION >= 0x050200\n#ifdef Q_OS_OSX\n    if (!s_macDocMenu) {\n        s_macDocMenu = new QMenu;\n        s_macDocMenu->setAsDockMenu();\n    }\n    if (s_macDocMenu) {\n        QAction *act = new QAction(\"macOS\",this);\n        act->setCheckable(true);\n        s_macDocMenu->addAction(act);\n        connect(act,SIGNAL(triggered(bool)),this,SLOT(triggeredWindowsAct()));\n        s_windowActions.insert(this,act);\n    }\n#endif\n#endif\n}\n\nQSplitter *MainWindow::splitter()\n{\n    return m_mainSplitter;\n}\n\nvoid MainWindow::setWindowStyle(IWindowStyle *style)\n{\n    ToolMainWindow::setWindowStyle(style);\n    //loadInitToolState(m_liteApp->settings()->value(\"liteapp/toolState\").toByteArray());\n}\n\nMainWindow::~MainWindow()\n{\n    s_windowActions.remove(this);\n    delete m_liteApp;\n}\n\nvoid MainWindow::closeEvent(QCloseEvent *event)\n{\n    if (this->m_windowClosedCheck) {\n        return;\n    }\n    m_liteApp->saveSession(m_liteApp->currentSession());\n    m_liteApp->saveState();\n\n    m_liteApp->projectManager()->closeProject();\n    if (m_liteApp->editorManager()->closeAllEditors()) {\n        this->m_windowClosedCheck = true;\n        this->hideAllToolWindows();\n        event->accept();\n    } else {\n        event->ignore();\n    }\n}\n\nvoid MainWindow::dragEnterEvent(QDragEnterEvent *event)\n{\n    if (event->mimeData()->hasUrls())\n        event->acceptProposedAction();\n}\n\nvoid MainWindow::changeEvent(QEvent *e)\n{\n    if (e->type() == QEvent::WindowStateChange) {\n        bool b = (windowState() & Qt::WindowFullScreen) != 0;\n        emit fullScreenStateChanged(b);\n    }\n}\n\nbool MainWindow::event(QEvent *event)\n{\n    if (event->type() == QEvent::WindowActivate) {\n        setActiveWindowAction(this);\n    }\n    return ToolMainWindow::event(event);\n}\n\nvoid MainWindow::setFullScreen(bool b)\n{\n    if (bool(windowState() & Qt::WindowFullScreen) == b)\n        return;\n    if (b) {\n        setWindowState(windowState() | Qt::WindowFullScreen);\n    } else {\n        setWindowState(windowState() & ~Qt::WindowFullScreen);\n    }\n}\n\nvoid MainWindow::dropEvent(QDropEvent *event)\n{\n    QList<QUrl> urls = event->mimeData()->urls();\n    if (urls.isEmpty())\n        return;\n    QStringList folders;\n    foreach (QUrl url, urls) {\n        QString fileName = url.toLocalFile();\n        if (fileName.isEmpty()) {\n            return;\n        }\n        QFileInfo info(fileName);\n        if (info.isFile()) {\n            m_liteApp->fileManager()->openFile(fileName);\n        } else if(info.isDir()) {\n            folders.append(info.filePath());\n        }\n    }\n    if (!folders.isEmpty()) {\n        foreach (QString folder, folders) {\n            m_liteApp->fileManager()->addFolderList(folder);\n        }\n    }\n}\n\nvoid MainWindow::setWindowTitle(const QString &name, const QString &filePath, bool isModify)\n{\n    QAction *act = s_windowActions.value(this);\n    if (act) {\n        QString title = QString(\"(%1)\").arg(m_liteApp->currentSession());\n        if (!name.isEmpty()) {\n            title = name + \" - \"+title;\n        }\n        act->setText(title);\n    }\n\n    QString title = QString(\"LiteIDE (%1)\").arg(m_liteApp->currentSession());\n    if (!filePath.isEmpty()) {\n        QString path = QDir::toNativeSeparators(filePath);\n        if (isModify) {\n            path += \"*\";\n        }\n        title = path + \" - \"+title;\n    } else if (!name.isEmpty()) {\n        title = name + \" - \"+title;\n    }\n    ToolMainWindow::setWindowTitle(title);\n}\n\nvoid MainWindow::currentEditorChanged(IEditor *editor)\n{\n    QString name;\n    QString filePath;\n    bool isModified = false;\n    if (editor) {\n        name = editor->name();\n        filePath = editor->filePath();\n        isModified = editor->isModified();\n    }\n    this->setWindowTitle(name,filePath,isModified);\n}\n\nvoid MainWindow::editorModifyChanged(IEditor *editor, bool b)\n{\n    QString name;\n    QString filePath;\n    if (editor) {\n        name = editor->name();\n        filePath = editor->filePath();\n    }\n    this->setWindowTitle(name,filePath,b);\n}\n\nvoid MainWindow::about()\n{\n    AboutDialog *dlg = new AboutDialog(m_liteApp,m_liteApp->mainWindow());\n    dlg->setAttribute(Qt::WA_DeleteOnClose);\n    dlg->exec();\n}\n\nvoid MainWindow::triggeredWindowsAct()\n{\n    QAction *act = (QAction*)sender();\n    if (!act) {\n        return;\n    }\n    QWidget *widget = s_windowActions.key(act,0);\n    if (!widget) {\n        return;\n    }\n    QWidget *window = widget->window();\n    if (window == this) {\n        act->setChecked(true);\n        this->setWindowState(windowState() & ~Qt::WindowMinimized);\n    }\n    window->raise();\n    window->activateWindow();\n}\n\nvoid MainWindow::setActiveWindowAction(QWidget *window)\n{\n    QMapIterator<QWidget*,QAction*> it(s_windowActions);\n    while (it.hasNext()) {\n        it.next();\n        it.value()->setChecked(it.key() == window);\n    }\n}\n\n"
  },
  {
    "path": "liteidex/src/liteapp/mainwindow.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: mainwindow.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MAINWINDOW_H\n#define MAINWINDOW_H\n\n#include \"liteapi/liteapi.h\"\n#include \"toolmainwindow.h\"\n#include \"windowstyle.h\"\n\nclass IMainWindow : public QObject\n{\n    Q_OBJECT\npublic:\n    IMainWindow(QObject *parent) : QObject(parent) {}\n    virtual QMainWindow *mainWindow() = 0;\n    virtual LiteApi::IToolWindowManager *toolWindowManager() = 0;\nsignals:\n    void fullScreenStateChanged(bool b);\npublic slots:\n    virtual void setFullScreen(bool b) = 0;\n    virtual void editorModifyChanged(bool b) = 0;\n    virtual void currentEditorChanged(LiteApi::IEditor *editor) = 0;\n};\n\nusing namespace LiteApi;\nclass QSplitter;\nclass MainWindow : public ToolMainWindow\n{\n    Q_OBJECT\npublic:\n    MainWindow(IApplication *app, QWidget *parent = 0);\n    ~MainWindow();\npublic:\n    QSplitter *splitter();\n    void setWindowStyle(IWindowStyle *style);\nprotected:\n    virtual void closeEvent(QCloseEvent *event);\n    virtual void dropEvent(QDropEvent *event);\n    virtual void dragEnterEvent(QDragEnterEvent *event);\n    virtual void changeEvent(QEvent *e);\n    virtual bool event(QEvent *event);\nsignals:\n    void fullScreenStateChanged(bool b);\npublic slots:\n    void setFullScreen(bool b);\n    void currentEditorChanged(LiteApi::IEditor *editor);\n    void editorModifyChanged(LiteApi::IEditor *editor, bool b);\n    void about();\n    void triggeredWindowsAct();\nprotected:\n    IApplication     *m_liteApp;\n    QAction          *m_aboutAct;\n    QSplitter *m_mainSplitter;\n    bool              m_windowClosedCheck;\nprotected:\n    void setActiveWindowAction(QWidget *window);\n    void setWindowTitle(const QString &name, const QString &filePath, bool isModify);\n    static QMap<QWidget*, QAction *> s_windowActions;\n    static QMenu       *s_macDocMenu;\n};\n\n\n#endif // MAINWINDOW_H\n"
  },
  {
    "path": "liteidex/src/liteapp/mimetypemanager.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: mimetypemanager.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"mimetypemanager.h\"\n#include \"mimetype/mimetype.h\"\n#include <QDir>\n#include <QFileInfo>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nMimeTypeManager::~MimeTypeManager()\n{\n    qDeleteAll(m_mimeTypeList);\n}\n\nbool MimeTypeManager::addMimeType(IMimeType *mimeType)\n{\n    foreach (IMimeType *m, m_mimeTypeList) {\n        if (m->type() == mimeType->type()) {\n            m->merge(mimeType);\n            return false;\n        }\n    }\n    m_mimeTypeList.append(mimeType);\n    return true;\n}\n\nvoid MimeTypeManager::removeMimeType(IMimeType *mimeType)\n{\n    m_mimeTypeList.removeOne(mimeType);\n}\n\nQList<IMimeType*> MimeTypeManager::mimeTypeList() const\n{\n    return m_mimeTypeList;\n}\n\nIMimeType *MimeTypeManager::findMimeType(const QString &type) const\n{\n    foreach(IMimeType *mimeType, m_mimeTypeList) {\n        if (mimeType->type() == type) {\n            return mimeType;\n        }\n    }\n    return 0;\n}\n\nQString MimeTypeManager::findPackageByMimeType(const QString &type) const\n{\n    if (type.isEmpty()) {\n        return QString();\n    }\n    foreach(IMimeType *mimeType, m_mimeTypeList) {\n        if (mimeType->type() == type) {\n            return mimeType->package();\n        }\n    }\n    return QString();\n}\n\nQString MimeTypeManager::findMimeTypeByFile(const QString &fileName) const\n{\n    QFileInfo info(fileName);\n    QString name = info.fileName();\n    //first check full name\n    foreach (IMimeType *mimeType, m_mimeTypeList) {\n        foreach (QString pattern, mimeType->allPatterns()) {\n            if (!pattern.startsWith(\"*\")) {\n                if (name == pattern) {\n                    return mimeType->type();\n                }\n            }\n        }\n    }\n    //check *.ext\n    QString find = info.suffix();\n    if (find.isEmpty()) {\n        return QString();\n    }\n    find = \"*.\"+find;\n    foreach (IMimeType *mimeType, m_mimeTypeList) {\n        foreach (QString pattern, mimeType->allPatterns()) {\n            if (find.compare(pattern,Qt::CaseInsensitive) == 0) {\n               return mimeType->type();\n            }\n        }\n    }\n    return  QString();\n}\n\nQString MimeTypeManager::findMimeTypeBySuffix(const QString &suffix) const\n{\n    QString find = \"*.\"+suffix;\n    foreach (IMimeType *mimeType, m_mimeTypeList) {\n        foreach (QString pattern, mimeType->allPatterns()) {\n            if (find.compare(pattern,Qt::CaseInsensitive) == 0) {\n               return mimeType->type();\n            }\n        }\n    }\n    return  QString();\n}\n\nQString MimeTypeManager::findMimeTypeByScheme(const QString &scheme) const\n{\n    foreach (IMimeType *mimeType, m_mimeTypeList) {\n        QString type = mimeType->scheme();\n        if (type.isEmpty()) {\n            type = \"file\";\n        }\n        if (scheme == type) {\n            return mimeType->type();\n        }\n    }\n    return QString();\n}\n\nvoid MimeTypeManager::loadMimeTypes(const QString &path)\n{\n    QDir dir = path;\n    dir.setFilter(QDir::Files | QDir::NoSymLinks);\n    dir.setNameFilters(QStringList(\"*.xml\"));\n    foreach (QString fileName, dir.entryList()) {\n        bool b = MimeType::loadMimeTypes(this,QFileInfo(dir,fileName).absoluteFilePath());\n        m_liteApp->appendLog(\"LiteApp\",QString(\"%1 MIME %2\").arg(b?\"Loaded\":\"ERROR loading\").arg(fileName),!b);\n    }\n}\n\nQStringList MimeTypeManager::findAllFilesByMimeType(const QString &dirPath, const QString &type, int deep) const\n{\n    LiteApi::IMimeType *mimeType = findMimeType(type);\n    if (mimeType) {\n        QDir dir(dirPath);\n        for (int i = 0; i <= deep; i++) {\n            QStringList files = dir.entryList(QStringList() << mimeType->allPatterns(),QDir::Files);\n            if (!files.isEmpty()) {\n                return files;\n            }\n            dir.cdUp();\n        }\n    }\n    return QStringList();\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/mimetypemanager.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: mimetypemanager.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MIMETYPEMANAGER_H\n#define MIMETYPEMANAGER_H\n\n#include \"liteapi/liteapi.h\"\n\nusing namespace LiteApi;\n\nclass MimeTypeManager : public IMimeTypeManager\n{\npublic:\n    ~MimeTypeManager();\n    virtual bool addMimeType(IMimeType *mimeType);\n    virtual void removeMimeType(IMimeType *mimeType);\n    virtual QList<IMimeType*> mimeTypeList() const;\n    virtual IMimeType *findMimeType(const QString &type) const;\n    virtual QString findPackageByMimeType(const QString &type) const;\n    virtual QString findMimeTypeByFile(const QString &fileName) const;\n    virtual QString findMimeTypeBySuffix(const QString &suffix) const;\n    virtual QString findMimeTypeByScheme(const QString &scheme) const;\n    virtual QStringList findAllFilesByMimeType(const QString &dir, const QString &type, int deep = 0) const;\n    void loadMimeTypes(const QString &path);\nprotected:\n    QList<IMimeType*>   m_mimeTypeList;\n};\n\n#endif // MIMETYPEMANAGER_H\n"
  },
  {
    "path": "liteidex/src/liteapp/multifolderwindow.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2018 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: multifolderwindow.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"multifolderwindow.h\"\r\n#include \"liteapp_global.h\"\r\n#include <QMenu>\r\n#include <QAction>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nMultiFolderWindow::MultiFolderWindow(LiteApi::IApplication *app, QObject *parent) : IFolderWindow(parent)\r\n{\r\n    m_liteApp = app;\r\n    m_folderListView = new MultiFolderView(app);\r\n\r\n    QDir::Filters filters = QDir::AllDirs | QDir::Files | QDir::Drives\r\n                            | QDir::Readable| QDir::Writable\r\n                            | QDir::Executable /*| QDir::Hidden*/\r\n                            | QDir::NoDotAndDotDot;\r\n    m_folderListView->setFilter(filters);\r\n    m_bSyncEditor = false;\r\n\r\n    connect(m_folderListView,SIGNAL(aboutToShowContextMenu(QMenu*,LiteApi::FILESYSTEM_CONTEXT_FLAG,QFileInfo)),this,SLOT(aboutToShowFolderContextMenu(QMenu*,LiteApi::FILESYSTEM_CONTEXT_FLAG,QFileInfo)));\r\n    connect(m_folderListView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(doubleClickedFolderView(QModelIndex)));\r\n    connect(m_folderListView,SIGNAL(enterKeyPressed(QModelIndex)),this,SLOT(enterKeyPressedFolderView(QModelIndex)));\r\n    connect(m_liteApp->editorManager(),SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(currentEditorChanged(LiteApi::IEditor*)));\r\n}\r\n\r\nMultiFolderWindow::~MultiFolderWindow()\r\n{\r\n    delete m_folderListView;\r\n}\r\n\r\nQWidget *MultiFolderWindow::widget() const\r\n{\r\n    return m_folderListView;\r\n}\r\n\r\nQString MultiFolderWindow::id() const\r\n{\r\n    return \"folderwindow/multifolder\";\r\n}\r\n\r\nvoid MultiFolderWindow::setShowHideFiles(bool b)\r\n{\r\n    QDir::Filters filters = m_folderListView->filter();\r\n    if (b) {\r\n        filters |= QDir::Hidden;\r\n    } else if (filters.testFlag(QDir::Hidden)){\r\n        filters ^= QDir::Hidden;\r\n    }\r\n    m_folderListView->setFilter(filters);\r\n}\r\n\r\nvoid MultiFolderWindow::setShowDetails(bool b)\r\n{\r\n    m_folderListView->setShowDetails(b);\r\n}\r\n\r\nvoid MultiFolderWindow::setSyncEditor(bool b)\r\n{\r\n    m_bSyncEditor = b;\r\n    if (b) {\r\n        this->currentEditorChanged(m_liteApp->editorManager()->currentEditor());\r\n    }\r\n}\r\n\r\nvoid MultiFolderWindow::doubleClickedFolderView(const QModelIndex &index)\r\n{\r\n    if (!index.isValid()) {\r\n        return;\r\n    }\r\n    QFileInfo info = m_folderListView->fileInfo(index);\r\n    if (info.isFile()) {\r\n       m_liteApp->fileManager()->openEditor(info.filePath());\r\n    }\r\n}\r\n\r\nvoid MultiFolderWindow::enterKeyPressedFolderView(const QModelIndex &index)\r\n{\r\n    if (!index.isValid()) {\r\n        return;\r\n    }\r\n    QFileInfo info = m_folderListView->fileInfo(index);\r\n    if (info.isFile()) {\r\n        m_liteApp->fileManager()->openEditor(info.filePath());\r\n    } else {\r\n        m_folderListView->setExpanded(index,!m_folderListView->isExpanded(index));\r\n    }\r\n}\r\n\r\nQStringList MultiFolderWindow::folderList() const\r\n{\r\n    return m_folderListView->rootPathList();\r\n}\r\n\r\nvoid MultiFolderWindow::setFolderList(const QStringList &folders)\r\n{\r\n    QStringList all = folders;\r\n    all.removeDuplicates();\r\n    m_folderListView->setRootPathList(all);\r\n    foreach (QString folder, all) {\r\n        m_liteApp->recentManager()->addRecent(folder,\"folder\");\r\n    }\r\n    if (m_folderListView->rootPathList().size() == 1) {\r\n        m_folderListView->expandFolder(m_folderListView->rootPathList().first(),true);\r\n    }\r\n}\r\n\r\nvoid MultiFolderWindow::addFolderList(const QString &folder)\r\n{\r\n    if (!m_folderListView->addRootPath(folder)) {\r\n        return;\r\n    }\r\n    m_liteApp->recentManager()->addRecent(folder,\"folder\");\r\n    m_folderListView->expandFolder(folder,true);\r\n}\r\n\r\nvoid MultiFolderWindow::closeAllFolders()\r\n{\r\n    m_folderListView->closeAllFolders();\r\n}\r\n\r\nvoid MultiFolderWindow::currentEditorChanged(LiteApi::IEditor *editor)\r\n{\r\n    if (!editor || !m_bSyncEditor) {\r\n        return;\r\n    }\r\n\r\n    QString fileName = editor->filePath();\r\n    if (fileName.isEmpty()) {\r\n        return;\r\n    }\r\n    QList<QModelIndex> indexList = m_folderListView->indexForPath(fileName);\r\n    if (indexList.isEmpty()) {\r\n        return;\r\n    }\r\n    QModelIndex index = indexList.first();\r\n    m_folderListView->scrollTo(index,QAbstractItemView::EnsureVisible);\r\n    m_folderListView->clearSelection();\r\n    m_folderListView->setCurrentIndex(index);\r\n}\r\n\r\nvoid MultiFolderWindow::aboutToShowFolderContextMenu(QMenu *menu, LiteApi::FILESYSTEM_CONTEXT_FLAG flag, const QFileInfo &info)\r\n{\r\n    m_liteApp->fileManager()->emitAboutToShowFolderContextMenu(menu,flag,info,\"liteapp/folder\");\r\n}\r\n"
  },
  {
    "path": "liteidex/src/liteapp/multifolderwindow.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2018 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: multifolderwindow.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FOLDERWINDOW_H\n#define FOLDERWINDOW_H\n\n#include <QObject>\n#include \"folderview/multifolderview.h\"\n#include \"filemanager.h\"\n\nclass MultiFolderWindow : public IFolderWindow\n{\n    Q_OBJECT\npublic:\n    explicit MultiFolderWindow(LiteApi::IApplication *app, QObject *parent = 0);\n    virtual ~MultiFolderWindow();\n    virtual QString id() const;\n    virtual QWidget *widget() const;\n    virtual QStringList folderList() const;\n    virtual void setFolderList(const QStringList &folders);\n    virtual void addFolderList(const QString &folder);\n    virtual void closeAllFolders();\n    virtual void setShowHideFiles(bool b);\n    virtual void setShowDetails(bool b);\n    virtual void setSyncEditor(bool b);\npublic slots:\n    void doubleClickedFolderView(const QModelIndex &index);\n    void enterKeyPressedFolderView(const QModelIndex &index);\n    void currentEditorChanged(LiteApi::IEditor *editor);\n    void aboutToShowFolderContextMenu(QMenu *menu, LiteApi::FILESYSTEM_CONTEXT_FLAG flag, const QFileInfo &info);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    MultiFolderView *m_folderListView;\n    bool m_bSyncEditor;\n};\n\n#endif // FOLDERWINDOW_H\n"
  },
  {
    "path": "liteidex/src/liteapp/newfiledialog.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: newfiledialog.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"newfiledialog.h\"\n#include \"ui_newfiledialog.h\"\n#include \"liteapi/liteqt.h\"\n\n#include <QStandardItemModel>\n#include <QStandardItem>\n#include <QStringListModel>\n#include <QDir>\n#include <QFileInfo>\n#include <QSettings>\n#include <QTextCodec>\n#include <QFileDialog>\n#include <QMessageBox>\n#include <QDateTime>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nNewFileDialog::NewFileDialog(QWidget *parent) :\n    QDialog(parent),\n    ui(new Ui::NewFileDialog)\n{\n    ui->setupUi(this);\n    m_templateModel = new QStandardItemModel(this);\n    m_pathModel = new QStringListModel(this);\n\n    ui->templateTreeView->setModel(m_templateModel);\n    ui->pathTreeView->setModel(m_pathModel);\n\n    ui->pathTreeView->setEditTriggers(0);\n    ui->pathTreeView->setRootIsDecorated(false);\n    ui->pathTreeView->setHeaderHidden(true);\n\n    ui->templateTreeView->setEditTriggers(0);\n    ui->templateTreeView->setRootIsDecorated(false);\n    ui->templateTreeView->setHeaderHidden(true);\n\n    connect(ui->templateTreeView,SIGNAL(clicked(QModelIndex)),this,SLOT(activeTemplate(QModelIndex)));\n    connect(ui->nameLineEdit,SIGNAL(textChanged(QString)),this,SLOT(nameLineChanged(QString)));\n    connect(ui->locationLineEdit,SIGNAL(textChanged(QString)),this,SLOT(locationLineChanged(QString)));\n    connect(ui->pathTreeView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(activePath(QModelIndex)));\n}\n\nNewFileDialog::~NewFileDialog()\n{\n    delete ui;\n}\n\nvoid NewFileDialog::setPathList(const QStringList &pathList)\n{\n    m_pathModel->setStringList(pathList);\n    if (m_gopath.isEmpty() && !pathList.isEmpty()) {\n        m_gopath = pathList.first();\n    }  \n}\n\nvoid NewFileDialog::setGopath(const QString &path)\n{\n    m_gopath = path;\n}\n\nvoid NewFileDialog::setProjectLocation(const QString &path)\n{\n    m_projectLocation = path;\n}\n\nvoid NewFileDialog::setFileLocation(const QString &path)\n{\n    m_fileLocation = path;\n}\n\nvoid NewFileDialog::updateLocation()\n{\n    ui->nameLineEdit->clear();\n    QModelIndex index = ui->templateTreeView->currentIndex();\n    if (index.isValid()) {\n        activeTemplate(index);\n    }\n}\n\nvoid NewFileDialog::accept()\n{\n    if (!m_cur.isValid()) {\n        return;\n    }\n\n    QString location = ui->locationLineEdit->text().trimmed();\n    QString name = ui->nameLineEdit->text().trimmed();\n\n    if (name.isEmpty() || location.isEmpty()) {\n        return;\n    }\n    QDir dir(location);\n    if (!dir.exists()) {\n        if (!dir.mkpath(location)) {\n            QMessageBox::warning(this,tr(\"Error\"),tr(\"Could not create the target directory: %1\").arg(location));\n            return;\n        }\n    } else {\n        if (m_cur.type != \"file\" && !dir.entryList(QDir::Files).isEmpty()) {\n            int ret = QMessageBox::warning(this,tr(\"Warning\"),QString(tr(\"Location %1 is not empty.\\nUse the target directory anyway?\")).arg(location),\n                                 QMessageBox::Yes|QMessageBox::No,QMessageBox::No);\n            if (ret != QMessageBox::Yes) {\n                return;\n            }\n        }\n    }\n\n    static const char * const shortMonthNames[] = {\n        \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\",\n        \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\" };\n\n    m_stringMap.clear();    \n    m_stringMap.insert(\"$ROOT$\",QFileInfo(name).fileName());    \n    QDate dt = QDate::currentDate();\n    QTime tm = QTime::currentTime();\n    m_stringMap.insert(\"$DATE$\", QString(\"%1 %2 %3\").arg(dt.day()).arg(shortMonthNames[dt.month()-1]).arg(dt.year()));\n    m_stringMap.insert(\"$DATETIME$\",QString(\"%1 %2 %3 %4\").arg(tm.toString(\"hh:mm\")).arg(dt.day()).arg(shortMonthNames[dt.month()-1]).arg(dt.year()));\n    m_openFiles.clear();\n\n    m_openPath = location;\n\n    QStringList ofiles;\n    foreach (QString file, m_cur.files) {\n        QString infile = QFileInfo(m_cur.dir,file).absoluteFilePath();\n        QString ofile = file;\n        QFileInfo oi(name);\n        QString base = oi.fileName();\n        if (!oi.suffix().isEmpty() &&\n            (oi.suffix() == QFileInfo(infile).suffix())) {\n            ofile.replace(\"root\",base.left(base.length()-oi.suffix().length()-1));\n        } else {\n            ofile.replace(\"root\",base);\n        }\n\n        QString outfile = QFileInfo(location,ofile).absoluteFilePath();\n        if (QFile::exists(outfile)) {\n            int ret = QMessageBox::warning(this,tr(\"Overwrite File\"),QString(tr(\"%1 already exists.\\nDo you want to replace it?\").arg(outfile)),\n                                 QMessageBox::Yes|QMessageBox::No|QMessageBox::Abort,QMessageBox::Abort);\n            if (ret == QMessageBox::Abort) {\n                return;\n            } else if (ret == QMessageBox::No) {\n                continue;\n            }\n        }\n        if (processFile(infile,outfile)) {\n            ofiles.append(outfile);\n            if (m_cur.open.contains(file)) {\n                m_openFiles.append(QDir::toNativeSeparators(outfile));\n            }\n        }\n    }\n    if (ofiles.isEmpty()) {\n        QMessageBox::warning(this,tr(\"Error\"),tr(\"No files could be created.\"));\n        return;\n    }\n    QDialog::accept();\n}\n\nvoid NewFileDialog::activePath(QModelIndex index)\n{\n    if (!index.isValid()) {\n        return;\n    }\n    if (m_cur.type == \"project\") {\n        m_projectLocation = index.data(Qt::DisplayRole).toString();\n    } else if (m_cur.type == \"file\"){\n        m_fileLocation = index.data(Qt::DisplayRole).toString();\n    } else if (m_cur.type == \"gopath\") {\n        m_gopath = index.data(Qt::DisplayRole).toString();\n    }\n    QModelIndex i = ui->templateTreeView->currentIndex();\n    if (i.isValid()) {\n        activeTemplate(i);\n    }\n}\n\nvoid  NewFileDialog::loadTemplate(const QString &root)\n{\n    m_templateModel->clear();\n    m_cur.clear();\n    ui->nameLineEdit->clear();\n    ui->locationLineEdit->clear();\n\n    QStringList files;\n    files << \"file.sub\" << \"project.sub\";\n    foreach (QString file, files) {\n        QFile f(root+\"/\"+file);\n        if (!f.open(QIODevice::ReadOnly)) {\n            continue;\n        }\n        while (!f.atEnd()) {\n            QString line = f.readLine().trimmed();\n            QString setup = root+\"/\"+line+\"/setup.inf\";\n            QSettings  set(setup,QSettings::IniFormat);\n            if (set.status() != QSettings::NoError) {\n                continue;\n            }\n            QString name = set.value(\"SETUP/NAME\").toString();\n            QString type = set.value(\"SETUP/type\").toString();\n            if (!name.isEmpty()) {\n                QStandardItem *item = new QStandardItem(name);\n                item->setData(setup);\n                QFont font = item->font();\n                if (type == \"file\") {\n                    font.setItalic(true);\n                } else {\n                    font.setBold(true);\n                }\n                item->setFont(font);\n                m_templateModel->appendRow(item);\n            }\n        }\n        f.close();\n    }\n    if (m_templateModel->rowCount() > 0) {\n        QModelIndex index = m_templateModel->index(0,0);\n        ui->templateTreeView->setCurrentIndex(index);\n        activeTemplate(index);\n    }\n}\n\nvoid  NewFileDialog::activeTemplate(QModelIndex index)\n{\n    m_cur.clear();\n    if (index.isValid()) {\n        QString fileName = index.data(Qt::UserRole+1).toString();\n        QSettings  set(fileName,QSettings::IniFormat);\n        if (set.status() != QSettings::NoError) {\n            return;\n        }\n        m_cur.dir = QFileInfo(fileName).absolutePath();\n        m_cur.name = set.value(\"SETUP/NAME\").toString();\n        m_cur.author = set.value(\"SETUP/AUTHOR\").toString();\n        m_cur.info = set.value(\"SETUP/INFO\").toString();\n        m_cur.type = set.value(\"SETUP/TYPE\").toString().toLower();\n        m_cur.files = set.value(\"SETUP/FILES\").toString().trimmed().split(\" \",qtSkipEmptyParts);\n        m_cur.open = set.value(\"SETUP/OPEN\").toString().trimmed().split(\" \",qtSkipEmptyParts);\n        m_cur.scheme = set.value(\"SETUP/SCHEME\").toString().toLower();\n        if (m_cur.open.isEmpty() && m_cur.files.count() > 0) {\n            m_cur.open.append(m_cur.files.at(0));\n        }\n        if (m_cur.type.isEmpty()) {\n            m_cur.type = \"file\";\n        }\n\n    }\n    if (m_cur.type == \"file\") {\n        ui->typeLabel->setText(tr(\"File template details:\"));\n    } else {\n        ui->typeLabel->setText(tr(\"Project template details:\"));\n    }\n    QStringList infos;\n    if (!m_cur.name.isEmpty()) {\n        infos.append(\"Name = \"+m_cur.name);\n    }\n    if (!m_cur.author.isEmpty()) {\n        infos.append(\"Author = \"+m_cur.author);\n    }\n    if (!m_cur.info.isEmpty()) {\n        infos.append(\"Info = \"+m_cur.info);\n    }\n    ui->infoLabel->setText(infos.join(\"\\n\"));\n    QString location;\n    bool b = true;\n    if (m_cur.type == \"gopath\") {\n        location = QFileInfo(m_gopath,\"src\").filePath();\n        //b = false;\n    } else if (m_cur.type == \"project\") {\n        location = m_projectLocation;\n    } else {\n        location = m_fileLocation;\n    }\n    ui->locationLineEdit->setEnabled(b);\n    ui->locationBrowseButton->setEnabled(b);\n    ui->locationLineEdit->setText(QDir::toNativeSeparators(location));\n\n    //update\n    nameLineChanged(ui->nameLineEdit->text());\n}\n\nbool NewFileDialog::processFile(const QString &infile, const QString &outfile)\n{\n    QFile in(infile);\n    if (!in.open(QIODevice::ReadOnly|QIODevice::Text)) {\n        return false;\n    }\n    QFile out(outfile);\n    if (!out.open(QIODevice::WriteOnly|QIODevice::Text)) {\n        return false;\n    }\n    QTextCodec *codec = QTextCodec::codecForName(\"UTF-8\");\n    QString all = codec->toUnicode(in.readAll());\n\n    QMapIterator<QString,QString> i(m_stringMap);\n    while (i.hasNext()) {\n        i.next();\n        all.replace(i.key(),i.value());\n    }\n\n    out.write(codec->fromUnicode(all));\n\n    in.close();\n    out.close();\n    return true;\n}\n\nQStringList NewFileDialog::openFiles() const\n{\n    return m_openFiles;\n}\n\nQString NewFileDialog::type() const\n{\n    return m_cur.type;\n}\n\nQString NewFileDialog::scheme() const\n{\n    return m_cur.scheme;\n}\n\nQString NewFileDialog::openPath() const\n{\n    return m_openPath;\n}\n\nvoid NewFileDialog::on_locationBrowseButton_clicked()\n{\n    QString location = ui->locationLineEdit->text();\n    location = QFileDialog::getExistingDirectory(this,tr(\"Choose a directory for the new content:\"),location);\n    if (location.isEmpty()) {\n        return;\n    }\n    ui->locationLineEdit->setText(location);\n\n    if (m_cur.type == \"project\") {\n        m_projectLocation = location;\n    } else if (m_cur.type == \"file\"){\n        m_fileLocation = location;\n    }    \n}\n\nvoid NewFileDialog::locationLineChanged(QString)\n{\n    QString location = ui->locationLineEdit->text();\n    if (location.isEmpty()) {\n        return;\n    }\n    if (m_cur.type == \"project\") {\n        m_projectLocation = location;\n    } else if (m_cur.type == \"file\"){\n        m_fileLocation = location;\n    }\n}\n\nvoid NewFileDialog::nameLineChanged(QString)\n{\n    if (m_cur.type == \"file\") {\n        return;\n    }\n    QString name = ui->nameLineEdit->text();\n    QString location;\n    if (m_cur.type == \"gopath\") {\n        location = QFileInfo(m_gopath,\"src\").filePath();\n    } else if (m_cur.type == \"project\") {\n        location = m_projectLocation;\n    } else {\n        location = m_fileLocation;\n    }\n    location = QFileInfo(location,name).absoluteFilePath();\n    ui->locationLineEdit->blockSignals(true);\n    ui->locationLineEdit->setText(QDir::toNativeSeparators(location));\n    ui->locationLineEdit->blockSignals(false);\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/newfiledialog.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: newfiledialog.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef NEWFILEDIALOG_H\n#define NEWFILEDIALOG_H\n\n#include <QDialog>\n#include <QModelIndex>\n\nnamespace Ui {\n    class NewFileDialog;\n}\nclass QStandardItemModel;\nclass QStringListModel;\nclass TemplateInfo\n{\npublic:\n    void clear()\n    {\n        name.clear();\n        author.clear();\n        type.clear();\n        info.clear();\n        files.clear();\n        open.clear();\n        scheme.clear();\n    }\n    bool isValid()\n    {\n        return !name.isEmpty() && !files.isEmpty();\n    }\n\n    QString name;\n    QString author;\n    QString type;\n    QString info;\n    QStringList files;\n    QStringList open;\n    QString scheme;\n    QString dir;\n};\n\nclass NewFileDialog : public QDialog\n{\n    Q_OBJECT\n\npublic:\n    explicit NewFileDialog(QWidget *parent = 0);\n    ~NewFileDialog();\n    void setPathList(const QStringList &pathList);\n    void setGopath(const QString &path);\n    void setProjectLocation(const QString &path);\n    void setFileLocation(const QString &path);\n    void updateLocation();\n    virtual void accept();\n    bool processFile(const QString &infile, const QString &outfile);\n    QStringList openFiles() const;\n    QString type() const;\n    QString scheme() const;\n    QString openPath() const;\npublic slots:\n    void loadTemplate(const QString &root);\n    void activePath(QModelIndex);\n    void activeTemplate(QModelIndex);\n    void nameLineChanged(QString);\n    void locationLineChanged(QString);\nprivate slots:\n    void on_locationBrowseButton_clicked();        \nprivate:\n    Ui::NewFileDialog *ui;\n    QStandardItemModel  *m_templateModel;\n    QStringListModel    *m_pathModel;\n    QString m_projectLocation;\n    QString m_fileLocation;\n    QString m_gopath;\n    QString m_openPath;\n    QStringList m_openFiles;\n    QMap<QString,QString> m_stringMap;\n    TemplateInfo    m_cur;\n};\n\n#endif // NEWFILEDIALOG_H\n"
  },
  {
    "path": "liteidex/src/liteapp/newfiledialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>NewFileDialog</class>\n <widget class=\"QDialog\" name=\"NewFileDialog\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>552</width>\n    <height>403</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>New Project or File</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n   <item>\n    <layout class=\"QHBoxLayout\" name=\"horizontalLayout_3\" stretch=\"1,3\">\n     <item>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_3\">\n       <item>\n        <widget class=\"QLabel\" name=\"label_4\">\n         <property name=\"text\">\n          <string>GOPATH:</string>\n         </property>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QTreeView\" name=\"pathTreeView\"/>\n       </item>\n      </layout>\n     </item>\n     <item>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n       <item>\n        <widget class=\"QLabel\" name=\"label_2\">\n         <property name=\"text\">\n          <string>Template:</string>\n         </property>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QTreeView\" name=\"templateTreeView\"/>\n       </item>\n      </layout>\n     </item>\n    </layout>\n   </item>\n   <item>\n    <layout class=\"QHBoxLayout\" name=\"horizontalLayout_4\">\n     <item>\n      <widget class=\"QLabel\" name=\"typeLabel\">\n       <property name=\"text\">\n        <string>Type</string>\n       </property>\n      </widget>\n     </item>\n     <item>\n      <widget class=\"QLabel\" name=\"infoLabel\">\n       <property name=\"sizePolicy\">\n        <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Preferred\">\n         <horstretch>0</horstretch>\n         <verstretch>0</verstretch>\n        </sizepolicy>\n       </property>\n       <property name=\"frameShape\">\n        <enum>QFrame::Panel</enum>\n       </property>\n       <property name=\"frameShadow\">\n        <enum>QFrame::Sunken</enum>\n       </property>\n       <property name=\"text\">\n        <string>Information</string>\n       </property>\n       <property name=\"wordWrap\">\n        <bool>true</bool>\n       </property>\n      </widget>\n     </item>\n    </layout>\n   </item>\n   <item>\n    <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\">\n     <item>\n      <widget class=\"QLabel\" name=\"label_3\">\n       <property name=\"text\">\n        <string>Name:</string>\n       </property>\n      </widget>\n     </item>\n     <item>\n      <widget class=\"QLineEdit\" name=\"nameLineEdit\"/>\n     </item>\n     <item>\n      <spacer name=\"horizontalSpacer\">\n       <property name=\"orientation\">\n        <enum>Qt::Horizontal</enum>\n       </property>\n       <property name=\"sizeHint\" stdset=\"0\">\n        <size>\n         <width>40</width>\n         <height>20</height>\n        </size>\n       </property>\n      </spacer>\n     </item>\n    </layout>\n   </item>\n   <item>\n    <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n     <item>\n      <widget class=\"QLabel\" name=\"label_7\">\n       <property name=\"text\">\n        <string>Location:</string>\n       </property>\n      </widget>\n     </item>\n     <item>\n      <widget class=\"QLineEdit\" name=\"locationLineEdit\"/>\n     </item>\n     <item>\n      <widget class=\"QToolButton\" name=\"locationBrowseButton\">\n       <property name=\"text\">\n        <string>Browse...</string>\n       </property>\n      </widget>\n     </item>\n    </layout>\n   </item>\n   <item>\n    <widget class=\"QDialogButtonBox\" name=\"buttonBox\">\n     <property name=\"orientation\">\n      <enum>Qt::Horizontal</enum>\n     </property>\n     <property name=\"standardButtons\">\n      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>\n     </property>\n    </widget>\n   </item>\n  </layout>\n  <zorder>buttonBox</zorder>\n  <zorder>infoLabel</zorder>\n  <zorder>typeLabel</zorder>\n </widget>\n <resources/>\n <connections>\n  <connection>\n   <sender>buttonBox</sender>\n   <signal>accepted()</signal>\n   <receiver>NewFileDialog</receiver>\n   <slot>accept()</slot>\n   <hints>\n    <hint type=\"sourcelabel\">\n     <x>248</x>\n     <y>254</y>\n    </hint>\n    <hint type=\"destinationlabel\">\n     <x>157</x>\n     <y>274</y>\n    </hint>\n   </hints>\n  </connection>\n  <connection>\n   <sender>buttonBox</sender>\n   <signal>rejected()</signal>\n   <receiver>NewFileDialog</receiver>\n   <slot>reject()</slot>\n   <hints>\n    <hint type=\"sourcelabel\">\n     <x>316</x>\n     <y>260</y>\n    </hint>\n    <hint type=\"destinationlabel\">\n     <x>286</x>\n     <y>274</y>\n    </hint>\n   </hints>\n  </connection>\n </connections>\n</ui>\n"
  },
  {
    "path": "liteidex/src/liteapp/openeditorswidget.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: openeditorswidget.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"openeditorswidget.h\"\r\n#include <QCoreApplication>\r\n#include <QSortFilterProxyModel>\r\n#include <QHeaderView>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nOpenEditorsWidget::OpenEditorsWidget(LiteApi::IApplication *app)\r\n    : m_liteApp(app)\r\n{\r\n    //m_model = new Core::ProxyModel(this);\r\n\r\n    setWindowTitle(tr(\"Open Documents\"));\r\n    setDragEnabled(true);\r\n    setDragDropMode(QAbstractItemView::DragOnly);\r\n    setCloseButtonVisible(true);\r\n\r\n    m_model = new QSortFilterProxyModel(this);\r\n    this->setModel(m_model);\r\n\r\n    setContextMenuPolicy(Qt::CustomContextMenu);\r\n\r\n    this->setEditTriggers(QTreeView::NoEditTriggers);\r\n\r\n    this->header()->setCascadingSectionResizes( true );\r\n    connect(m_liteApp->editorManager(),SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(updateCurrentItem(LiteApi::IEditor*)));\r\n    connect(this,SIGNAL(activated(QModelIndex)),this,SLOT(handleActivated(QModelIndex)));\r\n    connect(this,SIGNAL(closeActivated(QModelIndex)),this,SLOT(closeDocument(QModelIndex)));\r\n    connect(this,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(contextMenuRequested(QPoint)));\r\n}\r\n\r\nvoid OpenEditorsWidget::setEditorModel(QAbstractItemModel *model)\r\n{\r\n    m_model->setSourceModel(model);\r\n}\r\n\r\nvoid OpenEditorsWidget::handleActivated(const QModelIndex &index)\r\n{\r\n    if (index.column() == 0) {\r\n        activateEditor(index);\r\n    } else if (index.column() == 1) { // the funky close button\r\n        closeDocument(index);\r\n\r\n        // work around a bug in itemviews where the delegate wouldn't get the QStyle::State_MouseOver\r\n        QPoint cursorPos = QCursor::pos();\r\n        QWidget *vp = viewport();\r\n        QMouseEvent e(QEvent::MouseMove, vp->mapFromGlobal(cursorPos), cursorPos, Qt::NoButton, 0, 0);\r\n        QCoreApplication::sendEvent(vp, &e);\r\n    }\r\n}\r\n\r\nvoid OpenEditorsWidget::updateCurrentItem(LiteApi::IEditor *editor)\r\n{\r\n    QModelIndex index = indexFromEditor(editor);\r\n    if (!index.isValid()) {\r\n        clearSelection();\r\n        return;\r\n    }\r\n    setCurrentIndex(index);\r\n    selectionModel()->select(currentIndex(), QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);\r\n    scrollTo(currentIndex());\r\n}\r\n\r\nvoid OpenEditorsWidget::contextMenuRequested(QPoint /*pos*/)\r\n{\r\n\r\n}\r\n\r\nvoid OpenEditorsWidget::activateEditor(const QModelIndex &index)\r\n{\r\n    LiteApi::IEditor *editor = editorFormIndex(index);\r\n    if (editor) {\r\n        m_liteApp->editorManager()->setCurrentEditor(editor);\r\n    }\r\n}\r\n\r\nvoid OpenEditorsWidget::closeDocument(const QModelIndex &index)\r\n{\r\n    LiteApi::IEditor *editor = editorFormIndex(index);\r\n    if (editor) {\r\n        m_liteApp->editorManager()->closeEditor(editor);\r\n    }\r\n    updateCurrentItem(m_liteApp->editorManager()->currentEditor());\r\n}\r\n\r\nLiteApi::IEditor *OpenEditorsWidget::editorFormIndex(const QModelIndex &index)\r\n{\r\n    QString filePath = index.data(Qt::ToolTipRole).toString();\r\n    if (filePath.isEmpty()) {\r\n        return 0;\r\n    }\r\n    return m_liteApp->editorManager()->findEditor(filePath,true);\r\n}\r\n\r\nQModelIndex OpenEditorsWidget::indexFromEditor(LiteApi::IEditor *editor)\r\n{\r\n    QModelIndex r;\r\n    if (!editor) {\r\n        return r;\r\n    }\r\n    QString filePath = editor->filePath();\r\n    if (filePath.isEmpty()) {\r\n        return r;\r\n    }\r\n    for (int i = 0; i < model()->rowCount(); i++) {\r\n        QModelIndex index = model()->index(i,0);\r\n        if (index.data(Qt::ToolTipRole).toString() == filePath) {\r\n            return index;\r\n        }\r\n    }\r\n    return r;\r\n}\r\n"
  },
  {
    "path": "liteidex/src/liteapp/openeditorswidget.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: openeditorswidget.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef OPENEDITORSWIDGET_H\r\n#define OPENEDITORSWIDGET_H\r\n\r\n#include <liteapi/liteapi.h>\r\n#include <qtc_itemview/opendocumentstreeview.h>\r\n#include <qtc_itemview/proxymodel.h>\r\n\r\nclass QSortFilterProxyModel;\r\nclass OpenEditorsWidget : public Core::OpenDocumentsTreeView\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    OpenEditorsWidget(LiteApi::IApplication *app);\r\n    void setEditorModel(QAbstractItemModel *model);\r\npublic slots:\r\n    void handleActivated(const QModelIndex &index);\r\n    void updateCurrentItem(LiteApi::IEditor *editor);\r\n    void contextMenuRequested(QPoint);\r\n    void activateEditor(const QModelIndex &index);\r\n    void closeDocument(const QModelIndex &index);\r\nprotected:\r\n    LiteApi::IEditor *editorFormIndex(const QModelIndex &index);\r\n    QModelIndex indexFromEditor(LiteApi::IEditor *editor);\r\nprotected:\r\n    LiteApi::IApplication *m_liteApp;\r\n    QSortFilterProxyModel      *m_model;\r\n};\r\n\r\n#endif // OPENEDITORSWIDGET_H\r\n"
  },
  {
    "path": "liteidex/src/liteapp/optionmanager.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: optionmanager.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"optionmanager.h\"\n#include \"optionsbrowser.h\"\n#include <QAction>\n#include <QApplication>\n#include <QDesktopWidget>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nOptionManager::OptionManager()\n    : m_browser(0)\n{\n}\n\nOptionManager::~OptionManager()\n{\n    if (m_browser) {\n        delete m_browser;\n    }\n}\n\nbool OptionManager::initWithApp(IApplication *app)\n{\n    if (!IManager::initWithApp(app)) {\n        return false;\n    }\n    return true;\n}\n\nvoid OptionManager::addFactory(IOptionFactory *factory)\n{\n    m_factoryList.append(factory);\n}\n\nvoid OptionManager::removeFactory(IOptionFactory *factory)\n{\n    m_factoryList.removeOne(factory);\n}\n\nQList<IOptionFactory*> OptionManager::factoryList() const\n{\n    return m_factoryList;\n}\n\nvoid OptionManager::emitApplyOption(const QString &mimetype)\n{\n    emit applyOption(mimetype);\n}\n\nvoid OptionManager::exec(const QString &mimeType)\n{\n    if (!m_browser) {\n        m_browser = new OptionsBrowser(m_liteApp,m_liteApp->mainWindow());\n        QRect rc = qApp->desktop()->screenGeometry(m_browser);\n        int width = rc.width();\n        if (width > 900) {\n            width = 900;\n        }\n        int height = rc.height();\n        if (height > 600) {\n            height = 600;\n        }\n        m_browser->resize(width,height);\n\n        connect(m_browser,SIGNAL(applyOption(QString)),this,SIGNAL(applyOption(QString)));\n        foreach (IOptionFactory *f, m_factoryList) {\n            QStringList mimeTypes = f->mimeTypes();\n            foreach (QString mimeType, mimeTypes) {\n                IOption *opt = f->create(mimeType);\n                if (opt) {\n                    m_browser->addOption(opt);\n                }\n            }\n        }\n    }\n    QString last = m_liteApp->globalCookie().value(\"optionmanager/current\").toString();\n    if (!mimeType.isEmpty()) {\n        last = mimeType;\n    }\n    m_browser->execute(last);\n    m_liteApp->globalCookie().insert(\"optionmanager/current\",m_browser->currenMimeType());\n}\n\nvoid OptionManager::loadOption(const QString &opt)\n{\n    foreach (IOptionFactory *f, m_factoryList) {\n        QStringList mimeTypes = f->mimeTypes();\n        foreach (QString mimeType, mimeTypes) {\n            if (opt == mimeType) {\n                emit applyOption(mimeType);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/optionmanager.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: optionmanager.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef OPTIONMANAGER_H\n#define OPTIONMANAGER_H\n\n#include \"liteapi/liteapi.h\"\n\nusing namespace LiteApi;\n\nclass OptionsBrowser;\nclass BrowserEditorImpl;\nclass OptionManager : public IOptionManager\n{\n    Q_OBJECT\npublic:\n    OptionManager();\n    ~OptionManager();\n    virtual bool initWithApp(IApplication *app);\n    virtual void addFactory(IOptionFactory *factory);\n    virtual void removeFactory(IOptionFactory *factory);\n    virtual QList<IOptionFactory*> factoryList() const;\n    virtual void emitApplyOption(const QString &mimetype);\npublic slots:\n    virtual void exec(const QString &mimeType = QString());\n    void loadOption(const QString &opt);\nprotected:\n    OptionsBrowser  *m_browser;\n    QList<IOptionFactory*>  m_factoryList;\n};\n\n#endif // OPTIONMANAGER_H\n"
  },
  {
    "path": "liteidex/src/liteapp/optionsbrowser.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: optionsbrowser.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"optionsbrowser.h\"\n#include \"ui_optionswidget.h\"\n\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nOptionsBrowser::OptionsBrowser(LiteApi::IApplication *app, QWidget *parent) :\n    QDialog(parent),\n    m_liteApp(app),\n    ui(new Ui::OptionsWidget)\n{\n    ui->setupUi(this);\n    connect(ui->listWidget,SIGNAL(itemSelectionChanged()),this,SLOT(itemSelectionChanged()));\n    connect(ui->buttonBox,SIGNAL(clicked(QAbstractButton*)),this,SLOT(clicked(QAbstractButton*)));\n}\n\nOptionsBrowser::~OptionsBrowser()\n{\n    delete ui;\n    //delete m_widget;\n}\n\nQString OptionsBrowser::name() const\n{\n    return tr(\"Options\");\n}\n\nQString OptionsBrowser::mimeType() const\n{\n    return \"browser/options\";\n}\n\nvoid OptionsBrowser::addOption(LiteApi::IOption *opt)\n{\n    if (!opt || !opt->widget()) {\n        return;\n    }\n\n    QListWidgetItem *item = new QListWidgetItem;\n    item->setIcon(opt->icon());\n    item->setText(opt->name());\n    item->setTextAlignment(Qt::AlignLeft);// | Qt::AlignHCenter);\n    item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);\n    QLayout *layout = opt->widget()->layout();\n    if (layout) {\n        layout->setMargin(0);\n    }\n    ui->listWidget->addItem(item);\n    ui->stackedWidget->addWidget(opt->widget());\n    m_widgetOptionMap.insert(item,opt);\n}\n\nint OptionsBrowser::execute(const QString &mimeType)\n{\n    if (ui->listWidget->count() == 0) {\n        return exec();\n    }\n    QListWidgetItem *item = ui->listWidget->item(0);\n    QMapIterator<QListWidgetItem*,LiteApi::IOption*> i(m_widgetOptionMap);\n    while (i.hasNext()) {\n        i.next();\n        if (i.value()->mimeType() == mimeType) {\n            item = i.key();\n            break;\n        }\n    }\n    ui->listWidget->setCurrentItem(item);\n    LiteApi::IOption *opt = m_widgetOptionMap.value(item);\n    if (opt) {\n        //ui->scrollArea->resize(opt->widget()->size());\n        opt->load();\n    }\n//    this->setMinimumHeight(600);\n//#ifdef Q_OS_MAC\n//    this->setMinimumWidth(900);\n//#else\n//    this->setMinimumWidth(800);\n//#endif\n    return exec();\n}\n\nQString OptionsBrowser::currenMimeType() const\n{\n    QListWidgetItem *item = ui->listWidget->currentItem();\n    if (item) {\n        LiteApi::IOption *opt = m_widgetOptionMap.value(item);\n        if (opt) {\n            return opt->mimeType();\n        }\n    }\n    return QString();\n}\n\nvoid OptionsBrowser::itemSelectionChanged()\n{\n    QListWidgetItem *item = ui->listWidget->currentItem();\n    if (!item) {\n        return;\n    }\n    LiteApi::IOption *opt = m_widgetOptionMap.value(item);\n    if (opt) {\n        opt->load();\n        ui->stackedWidget->setCurrentWidget(opt->widget());\n        ui->infoLabel->setText(QString(\"Name : %1    MimeType : %2\").arg(opt->name()).arg(opt->mimeType()));\n        opt->widget()->updateGeometry();\n    }\n}\n\nvoid OptionsBrowser::clicked(QAbstractButton *button)\n{\n    QDialogButtonBox::ButtonRole role = ui->buttonBox->buttonRole(button);\n    if (role == QDialogButtonBox::AcceptRole) {\n        this->applay();\n        this->accept();\n    } else if (role == QDialogButtonBox::RejectRole) {\n        this->reject();\n    } else if (role == QDialogButtonBox::ApplyRole) {\n        this->applay();\n    }\n}\n\nvoid OptionsBrowser::applay()\n{\n    QListWidgetItem *item = ui->listWidget->currentItem();\n    if (!item) {\n        return;\n    }\n    LiteApi::IOption *opt = m_widgetOptionMap.value(item);\n    if (opt) {\n        opt->save();\n        emit applyOption(opt->mimeType());\n    }\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/optionsbrowser.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: optionsbrowser.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef OPTIONSBROWSER_H\n#define OPTIONSBROWSER_H\n\n#include <QWidget>\n#include <QDialog>\n\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class OptionsWidget;\n}\n\nclass QListWidgetItem;\nclass QAbstractButton;\nclass OptionsBrowser : public QDialog//LiteApi::IBrowserEditor\n{\n    Q_OBJECT\npublic:\n    explicit OptionsBrowser(LiteApi::IApplication *app, QWidget *parent = 0);\n    ~OptionsBrowser();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    void addOption(LiteApi::IOption *opt);\n    int execute(const QString &mimeType);\n    QString currenMimeType() const;\nsignals:\n    void applyOption(QString);\nprotected slots:\n    void itemSelectionChanged();    \nprivate slots:\n    void clicked(QAbstractButton*);\n    void applay();\nprivate:\n    LiteApi::IApplication   *m_liteApp;\n    Ui::OptionsWidget *ui;\n    QMap<QListWidgetItem*,LiteApi::IOption*>    m_widgetOptionMap;\n};\n\n#endif // OPTIONSBROWSER_H\n"
  },
  {
    "path": "liteidex/src/liteapp/optionswidget.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>OptionsWidget</class>\r\n <widget class=\"QDialog\" name=\"OptionsWidget\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>602</width>\r\n    <height>304</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Options</string>\r\n  </property>\r\n  <property name=\"sizeGripEnabled\">\r\n   <bool>true</bool>\r\n  </property>\r\n  <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\" stretch=\"0,1\">\r\n   <item>\r\n    <widget class=\"QListWidget\" name=\"listWidget\">\r\n     <property name=\"sizePolicy\">\r\n      <sizepolicy hsizetype=\"Preferred\" vsizetype=\"Expanding\">\r\n       <horstretch>0</horstretch>\r\n       <verstretch>0</verstretch>\r\n      </sizepolicy>\r\n     </property>\r\n     <property name=\"minimumSize\">\r\n      <size>\r\n       <width>100</width>\r\n       <height>0</height>\r\n      </size>\r\n     </property>\r\n     <property name=\"maximumSize\">\r\n      <size>\r\n       <width>150</width>\r\n       <height>16777215</height>\r\n      </size>\r\n     </property>\r\n    </widget>\r\n   </item>\r\n   <item>\r\n    <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\r\n     <item>\r\n      <widget class=\"QLabel\" name=\"infoLabel\">\r\n       <property name=\"frameShape\">\r\n        <enum>QFrame::Panel</enum>\r\n       </property>\r\n       <property name=\"frameShadow\">\r\n        <enum>QFrame::Sunken</enum>\r\n       </property>\r\n       <property name=\"lineWidth\">\r\n        <number>1</number>\r\n       </property>\r\n       <property name=\"text\">\r\n        <string>Info</string>\r\n       </property>\r\n       <property name=\"alignment\">\r\n        <set>Qt::AlignCenter</set>\r\n       </property>\r\n       <property name=\"margin\">\r\n        <number>2</number>\r\n       </property>\r\n      </widget>\r\n     </item>\r\n     <item>\r\n      <widget class=\"QScrollArea\" name=\"scrollArea\">\r\n       <property name=\"verticalScrollBarPolicy\">\r\n        <enum>Qt::ScrollBarAsNeeded</enum>\r\n       </property>\r\n       <property name=\"horizontalScrollBarPolicy\">\r\n        <enum>Qt::ScrollBarAsNeeded</enum>\r\n       </property>\r\n       <property name=\"widgetResizable\">\r\n        <bool>true</bool>\r\n       </property>\r\n       <widget class=\"QWidget\" name=\"scrollAreaWidgetContents\">\r\n        <property name=\"geometry\">\r\n         <rect>\r\n          <x>0</x>\r\n          <y>0</y>\r\n          <width>448</width>\r\n          <height>188</height>\r\n         </rect>\r\n        </property>\r\n        <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\r\n         <item>\r\n          <widget class=\"QStackedWidget\" name=\"stackedWidget\">\r\n           <property name=\"sizePolicy\">\r\n            <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Preferred\">\r\n             <horstretch>0</horstretch>\r\n             <verstretch>0</verstretch>\r\n            </sizepolicy>\r\n           </property>\r\n          </widget>\r\n         </item>\r\n        </layout>\r\n       </widget>\r\n      </widget>\r\n     </item>\r\n     <item>\r\n      <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\r\n       <item>\r\n        <widget class=\"QLabel\" name=\"label\">\r\n         <property name=\"text\">\r\n          <string>[*] item request restart of LiteIDE</string>\r\n         </property>\r\n        </widget>\r\n       </item>\r\n       <item>\r\n        <spacer name=\"horizontalSpacer\">\r\n         <property name=\"orientation\">\r\n          <enum>Qt::Horizontal</enum>\r\n         </property>\r\n         <property name=\"sizeHint\" stdset=\"0\">\r\n          <size>\r\n           <width>40</width>\r\n           <height>20</height>\r\n          </size>\r\n         </property>\r\n        </spacer>\r\n       </item>\r\n       <item>\r\n        <widget class=\"QDialogButtonBox\" name=\"buttonBox\">\r\n         <property name=\"standardButtons\">\r\n          <set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>\r\n         </property>\r\n        </widget>\r\n       </item>\r\n      </layout>\r\n     </item>\r\n    </layout>\r\n   </item>\r\n  </layout>\r\n </widget>\r\n <tabstops>\r\n  <tabstop>listWidget</tabstop>\r\n </tabstops>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "liteidex/src/liteapp/outputoption.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: outputoption.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"outputoption.h\"\r\n#include \"ui_outputoption.h\"\r\n#include \"liteapp_global.h\"\r\n#include <QFontDatabase>\r\n#include <QStandardItemModel>\r\n#include <QStandardItem>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nOutputOption::OutputOption(LiteApi::IApplication *app,QObject *parent) :\r\n    LiteApi::IOption(parent),\r\n    m_liteApp(app),\r\n    m_widget(new QWidget),\r\n    ui(new Ui::OutputOption)\r\n{\r\n    ui->setupUi(m_widget);\r\n\r\n    QFontDatabase db;\r\n    m_familyList = db.families();\r\n    ui->familyComboBox->addItems(m_familyList);\r\n}\r\n\r\nOutputOption::~OutputOption()\r\n{\r\n    delete m_widget;\r\n    delete ui;\r\n}\r\n\r\nQWidget *OutputOption::widget()\r\n{\r\n    return m_widget;\r\n}\r\n\r\nQString OutputOption::name() const\r\n{\r\n    return \"LiteOutput\";\r\n}\r\n\r\nQString OutputOption::mimeType() const\r\n{\r\n    return OPTION_LITEOUTPUT;\r\n}\r\n\r\nvoid OutputOption::save()\r\n{\r\n    m_fontFamily = ui->familyComboBox->currentText();\r\n    if (ui->sizeComboBox->count()) {\r\n        const QString curSize = ui->sizeComboBox->currentText();\r\n        bool ok = true;\r\n        int size = curSize.toInt(&ok);\r\n        if (ok) {\r\n            m_fontSize = size;\r\n        }\r\n    }\r\n\r\n    int fontZoom = ui->fontZoomSpinBox->value();\r\n    if (fontZoom <= 10) {\r\n        fontZoom = 10;\r\n    }\r\n    m_liteApp->settings()->setValue(OUTPUT_FAMILY,m_fontFamily);\r\n    m_liteApp->settings()->setValue(OUTPUT_FONTSIZE,m_fontSize);\r\n    m_liteApp->settings()->setValue(OUTPUT_FONTZOOM,fontZoom);\r\n\r\n    bool antialias = ui->antialiasCheckBox->isChecked();\r\n    m_liteApp->settings()->setValue(OUTPUT_ANTIALIAS,antialias);\r\n\r\n    bool colorScheme = ui->useColorSchemeCheckBox->isChecked();\r\n    int maxLines = ui->spinBoxOutputMaxLines->value();\r\n\r\n    m_liteApp->settings()->setValue(OUTPUT_USECOLORSCHEME,colorScheme);\r\n    m_liteApp->settings()->setValue(OUTPUT_MAXLINES,maxLines);\r\n}\r\n\r\nvoid OutputOption::load()\r\n{\r\n#if defined(Q_OS_WIN)\r\n    m_fontFamily = m_liteApp->settings()->value(OUTPUT_FAMILY,\"Courier\").toString();\r\n#elif defined(Q_OS_LINUX)\r\n    m_fontFamily = m_liteApp->settings()->value(OUTPUT_FAMILY,\"Monospace\").toString();\r\n#elif defined(Q_OS_MAC)\r\n    m_fontFamily = m_liteApp->settings()->value(OUTPUT_FAMILY,\"Menlo\").toString();\r\n#else\r\n    m_fontFamily = m_liteApp->settings()->value(OUTPUT_FAMILY,\"Monospace\").toString();\r\n#endif\r\n    m_fontSize = m_liteApp->settings()->value(OUTPUT_FONTSIZE,12).toInt();\r\n\r\n    int fontZoom = m_liteApp->settings()->value(OUTPUT_FONTZOOM,100).toInt();\r\n\r\n    bool antialias = m_liteApp->settings()->value(OUTPUT_ANTIALIAS,true).toBool();\r\n    ui->antialiasCheckBox->setChecked(antialias);\r\n\r\n    const int idx = m_familyList.indexOf(m_fontFamily);\r\n    ui->familyComboBox->setCurrentIndex(idx);\r\n\r\n    updatePointSizes();\r\n\r\n    ui->fontZoomSpinBox->setValue(fontZoom);\r\n\r\n    bool useColorScheme = m_liteApp->settings()->value(OUTPUT_USECOLORSCHEME,true).toBool();\r\n    ui->useColorSchemeCheckBox->setChecked(useColorScheme);\r\n\r\n    int maxLines = m_liteApp->settings()->value(OUTPUT_MAXLINES,5000).toInt();\r\n    ui->spinBoxOutputMaxLines->setValue(maxLines);\r\n}\r\n\r\nvoid OutputOption::updatePointSizes()\r\n{\r\n    // Update point sizes\r\n    const int oldSize = m_fontSize;\r\n    if (ui->sizeComboBox->count()) {\r\n        ui->sizeComboBox->clear();\r\n    }\r\n    const QList<int> sizeLst = pointSizesForSelectedFont();\r\n    int idx = 0;\r\n    int i = 0;\r\n    for (; i < sizeLst.count(); ++i) {\r\n        if (idx == 0 && sizeLst.at(i) >= oldSize)\r\n            idx = i;\r\n        ui->sizeComboBox->addItem(QString::number(sizeLst.at(i)));\r\n    }\r\n    if (ui->sizeComboBox->count())\r\n        ui->sizeComboBox->setCurrentIndex(idx);\r\n}\r\n\r\nQList<int> OutputOption::pointSizesForSelectedFont() const\r\n{\r\n    QFontDatabase db;\r\n    const QString familyName = ui->familyComboBox->currentText();\r\n    QList<int> sizeLst = db.pointSizes(familyName);\r\n    if (!sizeLst.isEmpty())\r\n        return sizeLst;\r\n\r\n    QStringList styles = db.styles(familyName);\r\n    if (!styles.isEmpty())\r\n        sizeLst = db.pointSizes(familyName, styles.first());\r\n    if (sizeLst.isEmpty())\r\n        sizeLst = QFontDatabase::standardSizes();\r\n\r\n    return sizeLst;\r\n}\r\n\r\n"
  },
  {
    "path": "liteidex/src/liteapp/outputoption.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: outputoption.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef OUTPUTOPTION_H\n#define OUTPUTOPTION_H\n\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class OutputOption;\n}\n\nclass OutputOption : public LiteApi::IOption\n{\n    Q_OBJECT\n\npublic:\n    explicit OutputOption(LiteApi::IApplication *app, QObject *parent = 0);\n    ~OutputOption();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void save();\n    virtual void load();\n    void updatePointSizes();\n    QList<int> pointSizesForSelectedFont() const;\nprotected:\n    int m_fontSize;\n    QString m_fontFamily;\n    QStringList m_familyList;\nprivate:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget           *m_widget;\n    Ui::OutputOption *ui;\n};\n\n#endif // OUTPUTOPTION_H\n"
  },
  {
    "path": "liteidex/src/liteapp/outputoption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>OutputOption</class>\r\n <widget class=\"QWidget\" name=\"OutputOption\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>455</width>\r\n    <height>161</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Form</string>\r\n  </property>\r\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\r\n   <item>\r\n    <widget class=\"QGroupBox\" name=\"groupBox_7\">\r\n     <property name=\"title\">\r\n      <string>Font</string>\r\n     </property>\r\n     <layout class=\"QHBoxLayout\" name=\"horizontalLayout_8\">\r\n      <item>\r\n       <widget class=\"QLabel\" name=\"label_2\">\r\n        <property name=\"text\">\r\n         <string>Family:</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item>\r\n       <widget class=\"QComboBox\" name=\"familyComboBox\">\r\n        <property name=\"sizePolicy\">\r\n         <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Fixed\">\r\n          <horstretch>0</horstretch>\r\n          <verstretch>0</verstretch>\r\n         </sizepolicy>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item>\r\n       <widget class=\"QLabel\" name=\"label_7\">\r\n        <property name=\"text\">\r\n         <string>Size:</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item>\r\n       <widget class=\"QComboBox\" name=\"sizeComboBox\">\r\n        <property name=\"sizePolicy\">\r\n         <sizepolicy hsizetype=\"Preferred\" vsizetype=\"Fixed\">\r\n          <horstretch>0</horstretch>\r\n          <verstretch>0</verstretch>\r\n         </sizepolicy>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item>\r\n       <widget class=\"QLabel\" name=\"label_8\">\r\n        <property name=\"text\">\r\n         <string>Zoom:</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item>\r\n       <widget class=\"QSpinBox\" name=\"fontZoomSpinBox\">\r\n        <property name=\"suffix\">\r\n         <string>%</string>\r\n        </property>\r\n        <property name=\"minimum\">\r\n         <number>10</number>\r\n        </property>\r\n        <property name=\"maximum\">\r\n         <number>1000</number>\r\n        </property>\r\n        <property name=\"singleStep\">\r\n         <number>10</number>\r\n        </property>\r\n        <property name=\"value\">\r\n         <number>100</number>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item>\r\n       <widget class=\"QCheckBox\" name=\"antialiasCheckBox\">\r\n        <property name=\"text\">\r\n         <string>Antialias</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item>\r\n       <spacer name=\"horizontalSpacer_5\">\r\n        <property name=\"orientation\">\r\n         <enum>Qt::Horizontal</enum>\r\n        </property>\r\n        <property name=\"sizeHint\" stdset=\"0\">\r\n         <size>\r\n          <width>40</width>\r\n          <height>20</height>\r\n         </size>\r\n        </property>\r\n       </spacer>\r\n      </item>\r\n     </layout>\r\n    </widget>\r\n   </item>\r\n   <item>\r\n    <widget class=\"QGroupBox\" name=\"groupBox_10\">\r\n     <property name=\"title\">\r\n      <string>Display</string>\r\n     </property>\r\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\r\n      <item>\r\n       <widget class=\"QCheckBox\" name=\"useColorSchemeCheckBox\">\r\n        <property name=\"text\">\r\n         <string>Use editor color scheme</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item>\r\n       <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\r\n        <item>\r\n         <widget class=\"QLabel\" name=\"label\">\r\n          <property name=\"text\">\r\n           <string>Sets the maximum number of lines</string>\r\n          </property>\r\n         </widget>\r\n        </item>\r\n        <item>\r\n         <widget class=\"QSpinBox\" name=\"spinBoxOutputMaxLines\">\r\n          <property name=\"minimum\">\r\n           <number>10</number>\r\n          </property>\r\n          <property name=\"maximum\">\r\n           <number>10000000</number>\r\n          </property>\r\n          <property name=\"value\">\r\n           <number>5000</number>\r\n          </property>\r\n         </widget>\r\n        </item>\r\n        <item>\r\n         <spacer name=\"horizontalSpacer\">\r\n          <property name=\"orientation\">\r\n           <enum>Qt::Horizontal</enum>\r\n          </property>\r\n          <property name=\"sizeHint\" stdset=\"0\">\r\n           <size>\r\n            <width>40</width>\r\n            <height>20</height>\r\n           </size>\r\n          </property>\r\n         </spacer>\r\n        </item>\r\n       </layout>\r\n      </item>\r\n     </layout>\r\n    </widget>\r\n   </item>\r\n   <item>\r\n    <spacer name=\"verticalSpacer\">\r\n     <property name=\"orientation\">\r\n      <enum>Qt::Vertical</enum>\r\n     </property>\r\n     <property name=\"sizeHint\" stdset=\"0\">\r\n      <size>\r\n       <width>20</width>\r\n       <height>33</height>\r\n      </size>\r\n     </property>\r\n    </spacer>\r\n   </item>\r\n  </layout>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "liteidex/src/liteapp/pluginmanager.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: pluginmanager.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"pluginmanager.h\"\n#include \"pluginsdialog.h\"\n\n#include <QDir>\n#include <QPluginLoader>\n#include <QMenu>\n#include <QAction>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nPluginManager::~PluginManager()\n{\n    qDeleteAll(m_factoryList);\n}\n\nQList<IPluginFactory*> PluginManager::factoryList()\n{\n    return m_factoryList;\n}\n\nvoid PluginManager::loadPlugins(const QString &dir)\n{\n    if (m_bLoaded) {\n        return;\n    }\n    m_bLoaded = true;\n\n    QDir pluginsDir = dir;\n    pluginsDir.setFilter(QDir::Files | QDir::NoSymLinks);\n\n    QMap<QString,int> idIndexMap;\n    QMap<QString,IPluginFactory*> idPlguinMap;\n    foreach (QFileInfo info, pluginsDir.entryInfoList()) {\n        QPluginLoader loader(info.filePath());\n        if (IPluginFactory *factory = qobject_cast<IPluginFactory*>(loader.instance())) {\n            if (factory) {\n                factory->setFilePath(info.filePath());\n                idIndexMap.insert(factory->id(),0);\n                idPlguinMap.insert(factory->id(),factory);\n            }\n        }\n    }\n\n    if (idIndexMap.isEmpty()) {\n        return;\n    }\n\n    foreach(IPluginFactory *p, idPlguinMap.values()) {\n        foreach(QString depId, p->dependPluginList()) {\n            idIndexMap.insert(depId,idIndexMap.value(depId)-1);\n        }\n    }\n    QMultiMap<int,IPluginFactory*> deps;\n    QMapIterator<QString,int> i(idIndexMap);\n    while (i.hasNext()) {\n        i.next();\n        deps.insertMulti(i.value(),idPlguinMap.value(i.key()));\n    }\n    QList<int> keys = deps.keys().toSet().toList();\n    qSort(keys);\n    foreach(int index, keys) {\n        foreach(IPluginFactory *p, deps.values(index)) {\n            m_factoryList.append(p);\n        }\n    }\n}\n\nbool PluginManager::isLoaded() const\n{\n    return m_bLoaded;\n}\n\nPluginManager::PluginManager(QObject *parent) :\n    QObject(parent),\n    m_bLoaded(false)\n{\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/pluginmanager.h",
    "content": "﻿/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: pluginmanager.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef PLUGINMANAGER_H\n#define PLUGINMANAGER_H\n\n#include \"liteapi/liteapi.h\"\n\nusing namespace LiteApi;\n\nclass PluginManager : public QObject\n{\n    Q_OBJECT\npublic:\n    PluginManager(QObject *parent = 0);\n    virtual ~PluginManager();\n    QList<IPluginFactory*> factoryList();\n    void loadPlugins(const QString &dir);\n    bool isLoaded() const;\nprotected:\n    bool            m_bLoaded;\n    QAction         *m_aboutPluginsAct;\n    QList<IPluginFactory*> m_factoryList;\n};\n\n#endif // PLUGINMANAGER_H\n"
  },
  {
    "path": "liteidex/src/liteapp/pluginsdialog.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: pluginsdialog.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"pluginsdialog.h\"\n#include \"ui_pluginsdialog.h\"\n#include \"pluginmanager.h\"\n\n#include <QStandardItemModel>\n#include <QStandardItem>\n#include <QFileInfo>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nPluginsDialog::PluginsDialog(LiteApi::IApplication *app, QWidget *parent) :\n    QDialog(parent),\n    m_liteApp(app),\n    ui(new Ui::PluginsDialog)\n{\n    ui->setupUi(this);\n    this->setAttribute(Qt::WA_DeleteOnClose);\n\n    m_model = new QStandardItemModel(0,6,this);\n    m_model->setHeaderData(0, Qt::Horizontal, tr(\"Name\"));\n    m_model->setHeaderData(1, Qt::Horizontal, tr(\"Enabled\"));\n    m_model->setHeaderData(2, Qt::Horizontal, tr(\"Details\"));\n    m_model->setHeaderData(3, Qt::Horizontal, tr(\"Author\"));\n    m_model->setHeaderData(4, Qt::Horizontal, tr(\"Version\"));\n    m_model->setHeaderData(5, Qt::Horizontal, tr(\"File Name\"));\n    ui->treeView->setModel(m_model);\n    ui->treeView->setEditTriggers(QAbstractItemView::NoEditTriggers);\n    ui->treeView->setItemsExpandable(true);\n    ui->treeView->setRootIsDecorated(false);\n#if QT_VERSION >= 0x050000\n    ui->treeView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);\n#else\n    ui->treeView->header()->setResizeMode(QHeaderView::ResizeToContents);\n#endif\n\n    connect(m_model,SIGNAL(itemChanged(QStandardItem*)),this,SLOT(itemChanged(QStandardItem*)));\n}\n\nPluginsDialog::~PluginsDialog()\n{\n    delete ui;\n}\n\nvoid PluginsDialog::appendInfo(const LiteApi::PluginInfo *info)\n{\n    if (!info) {\n        return;\n    }\n    QList<QStandardItem*> items;\n    items.append(new QStandardItem(info->name()));\n    QStandardItem *load = new QStandardItem();\n    load->setCheckable(true);\n    load->setData(info->id());\n    if (info->isMustLoad()) {\n        load->setEnabled(false);\n    }\n    bool b = m_liteApp->settings()->value(QString(\"liteapp/%1_load\").arg(info->id()),true).toBool();\n    if (b) {\n        load->setCheckState(Qt::Checked);\n    } else {\n        load->setCheckState(Qt::Unchecked);\n    }\n    items.append(load);\n    items.append(new QStandardItem(info->info()));\n    items.append(new QStandardItem(info->author()));\n    items.append(new QStandardItem(info->ver()));\n    items.append(new QStandardItem(QFileInfo(info->filePath()).fileName()));\n    items.at(5)->setToolTip(info->filePath());\n    m_model->appendRow(items);\n}\n\nvoid PluginsDialog::itemChanged(QStandardItem *item)\n{\n    if (item && item->isCheckable()) {\n        QString id = item->data(Qt::UserRole+1).toString();\n        if (!id.isEmpty()) {\n            m_liteApp->settings()->setValue(QString(\"liteapp/%1_load\").arg(id),item->checkState() == Qt::Checked);\n        }\n    }\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/pluginsdialog.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: pluginsdialog.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef PLUGINSDIALOG_H\n#define PLUGINSDIALOG_H\n\n#include <QDialog>\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class PluginsDialog;\n}\n\nclass QStandardItemModel;\nclass QStandardItem;\n\nclass PluginManager;\nclass PluginsDialog : public QDialog\n{\n    Q_OBJECT\n\npublic:\n    explicit PluginsDialog(LiteApi::IApplication *app, QWidget *parent = 0);\n    ~PluginsDialog();\n    void appendInfo(const LiteApi::PluginInfo *info);\npublic slots:\n    void itemChanged(QStandardItem*);\nprivate:\n    LiteApi::IApplication *m_liteApp;\n    Ui::PluginsDialog *ui;\n    QStandardItemModel  *m_model;\n};\n\n#endif // PLUGINSDIALOG_H\n"
  },
  {
    "path": "liteidex/src/liteapp/pluginsdialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>PluginsDialog</class>\n <widget class=\"QDialog\" name=\"PluginsDialog\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>712</width>\n    <height>413</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Installed Plugins</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n   <item>\n    <widget class=\"QTreeView\" name=\"treeView\">\n     <property name=\"sizePolicy\">\n      <sizepolicy hsizetype=\"Preferred\" vsizetype=\"Expanding\">\n       <horstretch>0</horstretch>\n       <verstretch>0</verstretch>\n      </sizepolicy>\n     </property>\n    </widget>\n   </item>\n   <item>\n    <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n     <item>\n      <spacer name=\"horizontalSpacer\">\n       <property name=\"orientation\">\n        <enum>Qt::Horizontal</enum>\n       </property>\n       <property name=\"sizeHint\" stdset=\"0\">\n        <size>\n         <width>40</width>\n         <height>20</height>\n        </size>\n       </property>\n      </spacer>\n     </item>\n     <item>\n      <widget class=\"QPushButton\" name=\"closeButton\">\n       <property name=\"text\">\n        <string>Close</string>\n       </property>\n      </widget>\n     </item>\n    </layout>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections>\n  <connection>\n   <sender>closeButton</sender>\n   <signal>clicked()</signal>\n   <receiver>PluginsDialog</receiver>\n   <slot>accept()</slot>\n   <hints>\n    <hint type=\"sourcelabel\">\n     <x>431</x>\n     <y>328</y>\n    </hint>\n    <hint type=\"destinationlabel\">\n     <x>244</x>\n     <y>177</y>\n    </hint>\n   </hints>\n  </connection>\n </connections>\n</ui>\n"
  },
  {
    "path": "liteidex/src/liteapp/projectmanager.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: projectmanager.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"projectmanager.h\"\n#include \"liteapp_global.h\"\n#include <QFileInfo>\n#include <QComboBox>\n#include <QVBoxLayout>\n#include <QHBoxLayout>\n#include <QPushButton>\n#include <QStackedWidget>\n#include <QStandardItemModel>\n#include <QStandardItem>\n#include <QStackedLayout>\n#include <QMenu>\n#include <QActionGroup>\n#include <QFileDialog>\n#include <QDebug>\n#include <QScrollArea>\n#include <QTabWidget>\n#include \"fileutil/fileutil.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nProjectManager::ProjectManager()\n    : m_widget(0), m_folderProject(0)\n{\n}\n\nProjectManager::~ProjectManager()\n{\n    if (m_folderProject) {\n        delete m_folderProject;\n    }\n    if (m_widget) {\n        m_liteApp->toolWindowManager()->removeToolWindow(m_widget);\n        delete m_widget;\n    }\n}\n\nbool ProjectManager::initWithApp(IApplication *app)\n{\n    if (!IProjectManager::initWithApp(app)) {\n        return false;\n    }\n\n    m_widget = new QScrollArea;\n    m_widget->setFrameShape(QFrame::NoFrame);\n    m_widget->setWidgetResizable(true);\n\n    m_folderProject = new FolderProject(m_liteApp);\n    //m_toolWindowAct = m_liteApp->toolWindowManager()->addToolWindow(Qt::LeftDockWidgetArea,m_widget,\"projects\",tr(\"Projects\"),false);\n\n    connect(m_liteApp,SIGNAL(loaded()),this,SLOT(appLoaded()));\n\n    m_bAutoCloseProjectEditors = m_liteApp->settings()->value(LITEAPP_AUTOCLOSEPROEJCTFILES,true).toBool();\n\n    return true;\n}\n\nvoid ProjectManager::appLoaded()\n{\n    foreach (IProjectFactory *factory, this->m_factoryList) {\n        foreach(QString type, factory->mimeTypes()) {\n            IMimeType *mimeType = m_liteApp->mimeTypeManager()->findMimeType(type);\n            if (mimeType && !mimeType->scheme().isEmpty()) {\n                QAction *act = new QAction(QString(tr(\"Project <%1>\").arg(mimeType->scheme())),this);\n                act->setData(mimeType->scheme());\n                connect(act,SIGNAL(triggered()),this,SLOT(openSchemeAct()));\n                //m_importMenu->addAction(act);\n            }\n        }\n    }\n}\n\nQWidget *ProjectManager::widget()\n{\n    return m_widget;\n}\n\nvoid ProjectManager::triggeredProject(QAction* act)\n{\n    QString fileName = act->text();\n    m_liteApp->fileManager()->openProject(fileName);\n}\n\nvoid ProjectManager::openSchemeDialog(const QString &scheme)\n{\n    static QString last = QDir::homePath();\n    QString dir = QFileDialog::getExistingDirectory(m_liteApp->mainWindow(),\n                                                    QString(tr(\"Import Directory <%1>\").arg(scheme)),\n                                                     last,\n                                                     QFileDialog::ShowDirsOnly\n                                                     | QFileDialog::DontResolveSymlinks);\n    if (dir.isEmpty()) {\n        return;\n    }\n    last = dir;\n    m_liteApp->fileManager()->openProjectScheme(dir,scheme);\n}\n\nvoid ProjectManager::openSchemeAct()\n{\n    QAction *act = (QAction*)sender();\n    if (!act) {\n        return;\n    }\n    QString scheme = act->data().toString();\n    if (scheme.isEmpty()) {\n        return;\n    }\n    openSchemeDialog(scheme);\n}\n\nvoid ProjectManager::currentEditorChanged(LiteApi::IEditor* editor)\n{\n    if (!editor) {\n        return;\n    }\n//    QString fileName = editor->fileName();\n//    IProject *project = 0;\n//    foreach (IProjectFactory *factory , m_factoryList) {\n//        project = factory->findByEditor(editor);\n//        if (project) {\n//            break;\n//        }\n//    }\n//    if (project) {\n//        QAction *act = m_mapNameToAction.value(fileName);\n//        if (act == 0) {\n//            act = m_projectActGroup->addAction(fileName);\n//            act->setCheckable(true);\n//            m_mapNameToAction.insert(fileName,act);\n//            m_projectMenu->addAction(act);\n//        }\n//        setCurrentProject(project);\n//    }\n}\n\nIFolderProject *ProjectManager::openFolder(const QString &folderPath)\n{\n    m_folderProject->openFolder(folderPath);\n    setCurrentProject(m_folderProject);\n    return m_folderProject;\n}\n\nIProject *ProjectManager::openProject(const QString &fileName, const QString &mimeType)\n{\n    if (m_currentProject && m_currentProject->filePath() == fileName) {\n        return m_currentProject;\n    }\n    IProject *project = 0;\n    foreach (IProjectFactory *factory , m_factoryList) {\n        if (factory->mimeTypes().contains(mimeType)) {\n            project = factory->open(fileName,mimeType);\n            if (project) {\n                break;\n            }\n        }\n    }\n\n    if (project) {\n        setCurrentProject(project);\n    }\n    return project;\n}\n\nvoid ProjectManager::addFactory(IProjectFactory *factory)\n{\n    m_factoryList.append(factory);\n}\n\nvoid ProjectManager::removeFactory(IProjectFactory *factory)\n{\n    m_factoryList.removeOne(factory);\n}\n\nQList<IProjectFactory*> ProjectManager::factoryList() const\n{\n    return m_factoryList;\n}\n\nQStringList ProjectManager::mimeTypeList() const\n{\n    QStringList types;\n    foreach(IProjectFactory *factory, m_factoryList) {\n        types.append(factory->mimeTypes());\n    }\n    return types;\n}\n\nvoid ProjectManager::setCurrentProject(IProject *project)\n{\n    if (m_currentProject) {\n        closeProjectHelper(m_currentProject);\n    }\n    m_currentProject = project;\n\n    if (m_currentProject) {\n        //m_toolWindowAct->setChecked(true);\n        m_widget->setWidget(m_currentProject->widget());\n        m_currentProject->load();\n        m_liteApp->appendLog(\"ProjectManager\",\"Loaded project \"+m_currentProject->name());\n    }\n    emit currentProjectChanged(project);\n}\n\nIProject *ProjectManager::currentProject() const\n{\n    return m_currentProject;\n}\n\nQList<IEditor*> ProjectManager::editorList(IProject *project) const\n{\n    QList<IEditor*> editors;\n    if (project) {\n        foreach (QString fileName, project->filePathList()) {\n             foreach(IEditor *editor, m_liteApp->editorManager()->editorList()) {\n                if (FileUtil::compareFile(editor->filePath(),fileName)) {\n                    editors << editor;\n                    break;\n                }\n            }\n        }\n    }\n    return editors;\n}\n\nvoid ProjectManager::addImportAction(QAction*)\n{\n    //m_importMenu->addAction(act);\n}\n\nvoid ProjectManager::saveProject(IProject *project)\n{\n    IProject *cur = 0;\n    if (project == 0) {\n        cur = m_currentProject;\n    } else {\n        cur = project;\n    }\n    if (cur == 0) {\n        return;\n    }\n    foreach (IEditor *editor, editorList(cur)) {\n        if (editor->isModified()) {\n            m_liteApp->editorManager()->saveEditor(editor);\n        }\n    }\n}\n\nvoid ProjectManager::closeProjectHelper(IProject *project)\n{\n    IProject *cur = 0;\n    if (project) {\n        cur = project;\n    } else {\n       cur = m_currentProject;\n    }\n    if (cur == 0) {\n        return;\n    }\n    //m_widget->clear();\n    emit projectAboutToClose(cur);\n\n    m_widget->takeWidget();\n\n    if (m_bAutoCloseProjectEditors) {\n        foreach (IEditor *editor, editorList(cur)) {\n            m_liteApp->editorManager()->closeEditor(editor);\n        }\n    }\n\n    m_liteApp->appendLog(\"ProjectManager\",\"Closed project \"+cur->name());\n    if (cur != m_folderProject) {\n        delete cur;\n    } else if (cur && (cur == m_currentProject) ){\n        m_currentProject = 0;\n    }\n}\n\nvoid ProjectManager::closeProject(IProject *project)\n{\n    //m_toolWindowAct->setChecked(false);\n    closeProjectHelper(project);\n    emit currentProjectChanged(0);\n}\n\nvoid ProjectManager::applyOption(QString id)\n{\n    if (id != OPTION_LITEAPP) {\n        return;\n    }\n    m_bAutoCloseProjectEditors = m_liteApp->settings()->value(LITEAPP_AUTOCLOSEPROEJCTFILES,true).toBool();\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/projectmanager.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: projectmanager.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef PROJECTMANAGER_H\n#define PROJECTMANAGER_H\n\n#include \"liteapi/liteapi.h\"\n#include \"filesystem/filesystemwidget.h\"\n#include \"folderproject.h\"\n\n#include <QPointer>\n\nusing namespace LiteApi;\n\nclass QComboBox;\nclass QStackedWidget;\nclass QStandardItem;\nclass QStandardItemModel;\nclass QVBoxLayout;\nclass QComboBox;\nclass QStackedLayout;\nclass QActionGroup;\nclass QScrollArea;\n\nclass ProjectManager : public IProjectManager\n{\n    Q_OBJECT\npublic:\n    ProjectManager();\n    ~ProjectManager();\n    virtual bool initWithApp(IApplication *app);\n    virtual IFolderProject* openFolder(const QString &folderPath);\n    virtual IProject *openProject(const QString &fileName, const QString &mimeType);\n    virtual void addFactory(IProjectFactory *factory);\n    virtual void removeFactory(IProjectFactory *factory);\n    virtual QList<IProjectFactory*> factoryList() const;\n    virtual QStringList mimeTypeList() const;\npublic:\n    virtual void setCurrentProject(IProject *project);\n    virtual IProject *currentProject() const;\n    virtual QList<IEditor*> editorList(IProject *project) const;\n    virtual void addImportAction(QAction *act);\n    virtual QWidget *widget();\npublic slots:    \n    virtual void saveProject(IProject *project = 0);\n    virtual void closeProject(IProject *project = 0);\n    virtual void openSchemeDialog(const QString &scheme);\n    void currentEditorChanged(LiteApi::IEditor*);\n    void triggeredProject(QAction* act);\n    void openSchemeAct();    \n    void appLoaded();\n    void applyOption(QString);\nprotected:\n    virtual void closeProjectHelper(IProject *project);\nprotected:\n    QPointer<IProject>      m_currentProject;\n    QList<IProjectFactory*>    m_factoryList;\n    QScrollArea             *m_widget;\n    //QAction                 *m_toolWindowAct;\n    bool                    m_bAutoCloseProjectEditors;\n    FolderProject           *m_folderProject;\n};\n\n#endif // PROJECTMANAGER_H\n"
  },
  {
    "path": "liteidex/src/liteapp/recentmanager.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: recentmanager.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"recentmanager.h\"\r\n#include \"liteapp_global.h\"\r\n#include \"liteapi/liteids.h\"\r\n#include <QMenu>\r\n#include <QAction>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nRecentManager::RecentManager(QObject *parent)\r\n    : IRecentManager(parent)\r\n{\r\n    m_maxRecentFiles = 32;\r\n}\r\n\r\nbool RecentManager::initWithApp(IApplication *app)\r\n{\r\n    if (!IRecentManager::initWithApp(app)) {\r\n        return false;\r\n    }\r\n\r\n    m_maxRecentFiles = m_liteApp->settings()->value(LITEAPP_MAXRECENTFILES,32).toInt();\r\n\r\n    m_recentMenu = m_liteApp->actionManager()->loadMenu(ID_MENU_RECENT);\r\n    QAction *clearAllRecent = new QAction(tr(\"Clear All History\"),this);\r\n    m_recentSeparator = m_recentMenu->addSeparator();\r\n    m_recentMenu->addAction(clearAllRecent);\r\n    connect(clearAllRecent,SIGNAL(triggered(bool)),this,SLOT(clearAllRecentMenu()));\r\n\r\n    registerRecent(new FileRecent(app,this));\r\n    registerRecent(new FolderRecent(app,this));\r\n    registerRecent(new SessionRecent(app,this));\r\n\r\n    connect(m_liteApp->optionManager(),SIGNAL(applyOption(QString)),this,SLOT(applyOption(QString)));\r\n\r\n    return true;\r\n}\r\n\r\nvoid RecentManager::registerRecent(IRecent *recent)\r\n{\r\n    if (m_recentTypeList.contains(recent->type())) {\r\n        return;\r\n    }\r\n    m_recentTypeList.append(recent->type());\r\n    m_recentList.append(recent);\r\n\r\n    updateRecentMenu(recent->type());\r\n}\r\n\r\nQList<IRecent *> RecentManager::recentList() const\r\n{\r\n    return m_recentList;\r\n}\r\n\r\nIRecent *RecentManager::findRecent(const QString &type) const\r\n{\r\n    foreach (IRecent *recent, m_recentList) {\r\n        if (recent->type() == type) {\r\n            return recent;\r\n        }\r\n    }\r\n    return 0;\r\n}\r\n\r\nQStringList RecentManager::recentTypeList() const\r\n{\r\n    return m_recentTypeList;\r\n}\r\n\r\nvoid RecentManager::addRecent(const QString &name, const QString &type)\r\n{\r\n    IRecent *recent = findRecent(type);\r\n    if (!recent) {\r\n        return;\r\n    }\r\n    recent->addRecent(name,m_maxRecentFiles);\r\n\r\n    updateAppListRecentMenu(type);\r\n}\r\n\r\nvoid RecentManager::removeRecent(const QString &name, const QString &type)\r\n{\r\n    IRecent *recent = findRecent(type);\r\n    if (!recent) {\r\n        return;\r\n    }\r\n    recent->removeRecent(name);\r\n\r\n    updateAppListRecentMenu(type);\r\n}\r\n\r\nQStringList RecentManager::recentNameList(const QString &type)\r\n{\r\n    IRecent *recent = findRecent(type);\r\n    if (!recent) {\r\n        return QStringList();\r\n    }\r\n    return recent->recentNameList();\r\n}\r\n\r\nvoid RecentManager::clearRecentNameList(const QString &type)\r\n{\r\n    IRecent *recent = findRecent(type);\r\n    if (!recent) {\r\n        return;\r\n    }\r\n    recent->clearRecentNameList();\r\n\r\n    updateAppListRecentMenu(type);\r\n}\r\n\r\nvoid RecentManager::openRecent(const QString &name, const QString &type)\r\n{\r\n    IRecent *recent = findRecent(type);\r\n    if (recent) {\r\n        recent->openRecent(name);\r\n    }\r\n}\r\n\r\nvoid RecentManager::updateRecentMenu(const QString &type)\r\n{\r\n    IRecent *recent = findRecent(type);\r\n    if (!recent) {\r\n        return;\r\n    }\r\n    QMenu *menu = m_mapRecentTypeMenu.value(type,0);\r\n    if (!menu) {\r\n        QString name = recent->displyType();\r\n        QAction *act = new QAction(name,this);\r\n        m_recentMenu->insertAction(m_recentSeparator,act);\r\n        menu = new QMenu(type,m_recentMenu);\r\n        act->setMenu(menu);\r\n        m_mapRecentTypeMenu.insert(type,menu);\r\n    }\r\n    if (!menu) {\r\n        return;\r\n    }\r\n    menu->clear();\r\n    QAction *sep = menu->addSeparator();\r\n    QAction *clear = menu->addAction(tr(\"Clear Menu\"));\r\n    clear->setData(type);\r\n    connect(clear,SIGNAL(triggered(bool)),this,SLOT(clearRecentMenu()));\r\n    int count = 0;\r\n    foreach (QString name, this->recentNameList(type)) {\r\n        if (count++ > m_maxRecentFiles) {\r\n            return;\r\n        }\r\n        QAction *act = new QAction(name,menu);\r\n        menu->insertAction(sep,act);\r\n        act->setData(type);\r\n        connect(act,SIGNAL(triggered()),this,SLOT(openRecentAction()));\r\n    }\r\n}\r\n\r\nvoid RecentManager::updateAppListRecentMenu(const QString &type)\r\n{\r\n    foreach (IApplication *app, m_liteApp->instanceList()) {\r\n        app->recentManager()->updateRecentMenu(type);\r\n        ((RecentManager*)app->recentManager())->emitRecentNameListChanged(type);\r\n    }\r\n}\r\n\r\nvoid RecentManager::emitRecentNameListChanged(const QString &type)\r\n{\r\n    emit recentNameListChanged(type);\r\n}\r\n\r\nvoid RecentManager::applyOption(const QString &opt)\r\n{\r\n    if (opt != OPTION_LITEAPP) {\r\n        return;\r\n    }\r\n    m_maxRecentFiles = m_liteApp->settings()->value(LITEAPP_MAXRECENTFILES,32).toInt();\r\n}\r\n\r\nvoid RecentManager::openRecentAction()\r\n{\r\n    QAction *act = (QAction*)sender();\r\n    if (!act) {\r\n        return;\r\n    }\r\n    QString name = act->text();\r\n    QString type = act->data().toString();\r\n    IRecent *recent = findRecent(type);\r\n    if (recent) {\r\n        recent->openRecent(name);\r\n    }\r\n}\r\n\r\nvoid RecentManager::clearRecentMenu()\r\n{\r\n    QAction *act = (QAction*)sender();\r\n    if (!act) {\r\n        return;\r\n    }\r\n    QString type = act->data().toString();\r\n\r\n    clearRecentNameList(type);\r\n}\r\n\r\nvoid RecentManager::clearAllRecentMenu()\r\n{\r\n    foreach (IRecent *recent, m_recentList) {\r\n        recent->clearRecentNameList();\r\n        updateAppListRecentMenu(recent->type());\r\n    }\r\n}\r\n\r\n"
  },
  {
    "path": "liteidex/src/liteapp/recentmanager.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: recentmanager.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef RECENTMANAGER_H\r\n#define RECENTMANAGER_H\r\n\r\n#include \"liteapi/liteapi.h\"\r\n\r\nusing namespace LiteApi;\r\n\r\nclass RecentManager : public IRecentManager\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    RecentManager(QObject *parent = 0);\r\n    virtual bool initWithApp(IApplication *app);\r\n\r\n    virtual void registerRecent(IRecent *recent);\r\n    virtual QList<IRecent*> recentList() const;\r\n    virtual IRecent *findRecent(const QString &type) const;\r\n    virtual QStringList recentTypeList() const;\r\n\r\n    virtual void addRecent(const QString &name, const QString &type);\r\n    virtual void removeRecent(const QString &name, const QString &type);\r\n    virtual QStringList recentNameList(const QString &type);\r\n    virtual void clearRecentNameList(const QString &type);\r\n    virtual void openRecent(const QString &name, const QString &type);\r\n    virtual void updateRecentMenu(const QString &type);\r\nprotected:\r\n    void updateAppListRecentMenu(const QString &type);\r\n    void emitRecentNameListChanged(const QString &type);\r\npublic slots:\r\n    void applyOption(const QString &opt);\r\n    void openRecentAction();\r\n    void clearRecentMenu();\r\n    void clearAllRecentMenu();\r\nprotected:\r\n    QStringList     m_recentTypeList;\r\n    QList<IRecent*> m_recentList;\r\n    int            m_maxRecentFiles;\r\n    QMenu        *m_recentMenu;\r\n    QAction      *m_recentSeparator;\r\n    QMap<QString,QMenu*> m_mapRecentTypeMenu;\r\n};\r\n\r\nclass BookmarkRecent : public ISettingRecent\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    BookmarkRecent(LiteApi::IApplication *app, QObject *parent) : ISettingRecent(app->settings(),parent), m_liteApp(app)\r\n    {\r\n    }\r\n\r\n    virtual QString type() const\r\n    {\r\n        return \"bookmark\";\r\n    }\r\n\r\n    virtual QString displyType() const\r\n    {\r\n        return tr(\"Bookmarks\");\r\n    }\r\n\r\n    virtual void addRecent(const QString &name,int maxRecent)\r\n    {\r\n        ISettingRecent::addRecent(QDir::toNativeSeparators(name), maxRecent);\r\n    }\r\n\r\n    virtual void openRecent(const QString &name)\r\n    {\r\n        int pos = name.lastIndexOf(\":\");\r\n        if (pos == -1) {\r\n            return;\r\n        }\r\n        bool ok = false;\r\n        int line = name.mid(pos+1).toInt(&ok);\r\n        if (!ok) {\r\n            return;\r\n        }\r\n        QString filePath = name.left(pos);\r\n        LiteApi::IEditor *editor = m_liteApp->fileManager()->openEditor(filePath,true,false);\r\n        if (!editor) {\r\n            return;\r\n        }\r\n        LiteApi::ITextEditor *textEditor = LiteApi::getTextEditor(editor);\r\n        if (!textEditor) {\r\n            return;\r\n        }\r\n        textEditor->gotoLine(line,0,true);\r\n    }\r\nprotected:\r\n    virtual QString recentKey() const\r\n    {\r\n        return QString(\"Bookmark/%1\").arg(type());\r\n    }\r\n    LiteApi::IApplication *m_liteApp;\r\n};\r\n\r\n\r\nclass FileRecent : public ISettingRecent\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    FileRecent(LiteApi::IApplication *app, QObject *parent) : ISettingRecent(app->settings(),parent), m_liteApp(app)\r\n    {\r\n    }\r\n\r\n    virtual QString type() const\r\n    {\r\n        return \"file\";\r\n    }\r\n\r\n    virtual QString displyType() const\r\n    {\r\n        return tr(\"Files\");\r\n    }\r\n\r\n    virtual void addRecent(const QString &name,int maxRecent)\r\n    {\r\n        ISettingRecent::addRecent(QDir::toNativeSeparators(name), maxRecent);\r\n    }\r\n\r\n    virtual void openRecent(const QString &name)\r\n    {\r\n        m_liteApp->fileManager()->openFile(name);\r\n    }\r\nprotected:\r\n    LiteApi::IApplication *m_liteApp;\r\n};\r\n\r\nclass FolderRecent : public ISettingRecent\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    FolderRecent(LiteApi::IApplication *app, QObject *parent) : ISettingRecent(app->settings(),parent), m_liteApp(app)\r\n    {\r\n    }\r\n\r\n    virtual QString type() const\r\n    {\r\n        return \"folder\";\r\n    }\r\n\r\n    virtual QString displyType() const\r\n    {\r\n        return tr(\"Folders\");\r\n    }\r\n\r\n    virtual void addRecent(const QString &name,int maxRecent)\r\n    {\r\n        ISettingRecent::addRecent(QDir::toNativeSeparators(name), maxRecent);\r\n    }\r\n\r\n    virtual void openRecent(const QString &name)\r\n    {\r\n        m_liteApp->fileManager()->addFolderList(name);\r\n    }\r\nprotected:\r\n    LiteApi::IApplication *m_liteApp;\r\n};\r\n\r\nclass SessionRecent : public ISettingRecent\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    SessionRecent(LiteApi::IApplication *app, QObject *parent) : ISettingRecent(app->settings(),parent), m_liteApp(app)\r\n    {\r\n    }\r\n\r\n    virtual QString type() const\r\n    {\r\n        return \"session\";\r\n    }\r\n\r\n    virtual QString displyType() const\r\n    {\r\n        return tr(\"Sessions\");\r\n    }\r\n\r\n    virtual void addRecent(const QString &name, int maxRecent)\r\n    {\r\n        QString key = recentKey();\r\n        QStringList files = m_settings->value(key).toStringList();\r\n        files.removeAll(name);\r\n        files.prepend(name);\r\n        while (files.size() > maxRecent) {\r\n            files.removeLast();\r\n        }\r\n        m_settings->setValue(key, files);\r\n    }\r\n\r\n    virtual void removeRecent(const QString &name)\r\n    {\r\n        if (name == \"default\") {\r\n            return;\r\n        }\r\n        ISettingRecent::removeRecent(name);\r\n    }\r\n\r\n    virtual QStringList recentNameList()\r\n    {\r\n        QString key = recentKey();\r\n        QStringList values = m_settings->value(key).toStringList();\r\n        values.prepend(\"default\");\r\n        values.removeDuplicates();\r\n        return values;\r\n    }\r\n\r\n    virtual void clearRecentNameList()\r\n    {\r\n        QString key = recentKey();\r\n        QStringList values = m_settings->value(key).toStringList();\r\n        values.clear();\r\n        values.append(\"default\");\r\n        m_settings->setValue(key, values);\r\n    }\r\n\r\n    virtual void openRecent(const QString &name)\r\n    {\r\n        if (name != m_liteApp->currentSession()) {\r\n            m_liteApp->newInstance(name);\r\n        } else {\r\n            m_liteApp->loadSession(name);\r\n        }\r\n    }\r\nprotected:\r\n    LiteApi::IApplication *m_liteApp;\r\n};\r\n\r\n\r\n#endif // RECENTMANAGER_H\r\n"
  },
  {
    "path": "liteidex/src/liteapp/rotationtoolbutton.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: rotationtoolbutton.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"rotationtoolbutton.h\"\n#include <QStylePainter>\n#include <QStyleOptionToolButton>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nstatic const int Vertical_Mask = 0x02;\n\nRotationToolButton::RotationToolButton(QWidget *parent) :\n    QToolButton(parent), rot(NoRotation)\n{\n}\n\nvoid RotationToolButton::setRotation(Rotation rotation)\n{\n    if (rot != rotation)\n    {\n        rot = rotation;\n        switch (rotation)\n        {\n        case NoRotation:\n        case UpsideDown:\n            setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);\n            break;\n\n        case Clockwise:\n        case CounterClockwise:\n            setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);\n            break;\n        default:\n            break;\n        }\n        updateGeometry();\n        update();\n    }\n}\n\nRotationToolButton::Rotation RotationToolButton::rotation() const\n{\n    return rot;\n}\n\nQSize RotationToolButton::sizeHint() const\n{\n    QSize size;\n    size = QToolButton::sizeHint();\n\n    if (rot & Vertical_Mask)\n        size.transpose();\n    return size;\n}\n\nQSize RotationToolButton::minimumSizeHint() const\n{\n    return sizeHint();\n}\n\nvoid RotationToolButton::paintEvent(QPaintEvent*)\n{\n    QStylePainter painter(this);\n    painter.rotate(rot);\n    switch (rot)\n    {\n    case UpsideDown:\n        painter.translate(-width(), -height());\n        break;\n\n    case Clockwise:\n        painter.translate(0, -width());\n        break;\n\n    case CounterClockwise:\n        painter.translate(-height(), 0);\n        break;\n\n    default:\n        // nothing to do\n        break;\n    }\n\n    QStyleOptionToolButton opt;\n    initStyleOption(&opt);\n    if (rot & Vertical_Mask)\n    {\n        QSize size = opt.rect.size();\n        size.transpose();\n        opt.rect.setSize(size);\n    }\n    painter.drawComplexControl(QStyle::CC_ToolButton, opt);\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/rotationtoolbutton.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: rotationtoolbutton.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef ROTATIONTOOLBUTTON_H\n#define ROTATIONTOOLBUTTON_H\n\n#include <QToolButton>\n\nclass RotationToolButton : public QToolButton\n{\n    Q_OBJECT\npublic:\n    enum Rotation {\n        NoRotation  = 0,\n        UpsideDown  = 180,\n        Clockwise  = 90,\n        CounterClockwise = 270\n    };\n    explicit RotationToolButton(QWidget *parent = 0);\n    void setRotation(Rotation rotation);\n    Rotation rotation() const;\n    QSize sizeHint() const;\n    QSize minimumSizeHint() const;\nprotected:\n    void paintEvent(QPaintEvent *);\nprotected:\n    Rotation  rot;\n};\n\n#endif // ROTATIONTOOLBUTTON_H\n"
  },
  {
    "path": "liteidex/src/liteapp/sidewindowstyle.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: sidewindowstyle.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"sidewindowstyle.h\"\n#include \"tooldockwidget.h\"\n#include \"rotationtoolbutton.h\"\n#include \"liteapp_global.h\"\n#include \"liteapi/liteids.h\"\n#include <QStatusBar>\n#include <QDebug>\n\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nSideDockWidget::SideDockWidget(QSize iconSize, QWidget *parent) :\n    BaseDockWidget(iconSize,parent)\n{\n}\n\nvoid SideDockWidget::createMenu(Qt::DockWidgetArea area)\n{\n    m_area = area;\n    m_moveMenu = new QMenu(tr(\"Move To\"),this);\n\n    QAction *sideAct = new QAction(this);\n    if (area == Qt::LeftDockWidgetArea) {\n        sideAct->setText(tr(\"RightSideBar\"));\n        sideAct->setData(Qt::RightDockWidgetArea);\n        m_areaInfo = tr(\"LeftDockWidgt\");\n    } else {\n        sideAct->setText(tr(\"LeftSideBar\"));\n        sideAct->setData(Qt::LeftDockWidgetArea);\n        m_areaInfo = tr(\"RightDockWidget\");\n    }\n    m_moveMenu->addAction(sideAct);\n    QAction *outAct = new QAction(tr(\"OutputBar\"),this);\n    outAct->setData(Qt::BottomDockWidgetArea);\n    m_moveMenu->addAction(outAct);\n    connect(sideAct,SIGNAL(triggered()),this,SLOT(moveAction()));\n    connect(outAct,SIGNAL(triggered()),this,SLOT(moveAction()));\n\n    m_menu = new QMenu(this);\n\n    QToolButton *btn = new QToolButton(m_toolBar);\n    btn->setPopupMode(QToolButton::InstantPopup);\n    btn->setIcon(QIcon(\"icon:images/movemenu.png\"));\n    btn->setMenu(m_menu);\n    btn->setText(tr(\"SideBar\"));\n    btn->setToolTip(tr(\"Show SideBar\"));\n    btn->setStyleSheet(\"QToolButton::menu-indicator {image: none;}\");\n    m_toolBar->insertWidget(m_closeAct,btn);\n}\n\nvoid SideDockWidget::moveAction()\n{\n    QAction *action = static_cast<QAction*>(sender());\n    if (!action) {\n        return;\n    }\n    this->setFloatingWindow(false);\n    Qt::DockWidgetArea area = (Qt::DockWidgetArea)action->data().toInt();\n    emit moveActionTo(m_area,area,current);\n}\n\nvoid SideDockWidget::actionChanged()\n{\n\n}\n\nvoid SideDockWidget::activeComboBoxIndex(int index)\n{\n    if (index < 0 || index >= m_comboBox->count()) {\n        return;\n    }\n    QString objName = m_comboBox->itemData(index).toString();\n    foreach(QAction *act, m_actions) {\n        if (act->objectName() == objName) {\n            QAction *org = current.data();\n            current = act;\n            emit currenActionChanged(org,act);\n            break;\n        }\n    }\n}\n\nvoid SideDockWidget::topLevelChanged(bool b)\n{\n    BaseDockWidget::topLevelChanged(b);\n    if (b) {\n        m_comboBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);\n        m_spacer->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum);\n    } else {\n        m_comboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);\n        m_spacer->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Minimum);\n    }\n}\n\n\nvoid SideDockWidget::setCheckedAction(QAction *action)\n{\n    current = action;\n    for (int i = 0; i < m_comboBox->count(); i++) {\n        if (m_comboBox->itemData(i).toString() == action->objectName()) {\n            m_comboBox->setCurrentIndex(i);\n            //m_titleLabel->setText(m_comboBox->currentText());\n            break;\n        }\n    }\n}\n\nstatic bool actionThan(const QAction *s1, const QAction *s2)\n{\n    return s1->text() < s2->text();\n}\n\n\nvoid SideDockWidget::setActions(const QMap<QAction *, SideActionState *> &m)\n{\n    m_actions = m.keys();\n    m_comboBox->clear();\n    int cur = 0;\n    int index = 0;\n    m_menu->clear();\n//    QMapIterator<QAction *, SideActionState *> i(m);\n    QList<QAction*> keys = m.keys();\n    qSort(keys.begin(),keys.end(),actionThan);\n    for (int i = 0; i < keys.size(); i++) {\n        QAction *act = keys[i];\n        m_comboBox->addItem(m.value(act)->title,act->objectName());\n        m_menu->addAction(act);\n        if (current && (current->objectName() == act->objectName())) {\n            cur = index;\n        }\n        index++;\n    }\n//    while(i.hasNext()) {\n//        i.next();\n//        QAction *act = i.key();\n//        m_comboBox->addItem(i.value()->title,act->objectName());\n//        m_menu->addAction(act);\n//        if (current && (current->objectName() == act->objectName())) {\n//            cur = index;\n//        }\n//        index++;\n//    }\n    m_menu->addSeparator();\n    m_menu->addAction(m_floatAct);\n    m_menu->addMenu(m_moveMenu);\n    m_comboBox->setCurrentIndex(cur);\n}\n\nvoid SideDockWidget::setWindowTitle(const QString &text)\n{\n    BaseDockWidget::setWindowTitle(m_areaInfo+\"  -  \"+text);\n}\n\nSideActionBar::SideActionBar(QSize iconSize, QMainWindow *window, Qt::DockWidgetArea area)\n    : BaseActionBar(window), m_iconSize(iconSize), m_window(window),m_area(area), m_bHideToolBar(false)\n{\n    m_toolBar = new QToolBar;\n    m_toolBar->hide();\n    m_toolBar->setObjectName(QString(\"side_tool_%1\").arg(m_area));\n    m_toolBar->setMovable(false);\n\n//    QWidget *spacer = new QWidget;\n//    spacer->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);\n//    spacerAct = toolBar->addWidget(spacer);\n//    toolBar->addSeparator();\n}\n\nSideActionBar::~SideActionBar()\n{\n    qDeleteAll(m_actionStateMap);\n}\n\nvoid SideActionBar::addAction(QAction *action, QWidget *widget, const QString &id, const QString &title, QList<QAction *> widgetActions, QList<QWidget *> widgetList)\n{\n    RotationToolButton *btn = new RotationToolButton;\n    btn->setDefaultAction(action);    \n    if (m_area == Qt::LeftDockWidgetArea) {\n        btn->setRotation(RotationToolButton::CounterClockwise);\n    } else if (m_area == Qt::RightDockWidgetArea) {\n        btn->setRotation(RotationToolButton::Clockwise);\n    }\n\n    SideDockWidget *dock = new SideDockWidget(m_iconSize, m_window);\n    dock->setObjectName(dockWidgetObjName(id));\n    dock->setWindowTitle(title);\n    dock->setAllowedAreas(m_area);\n    dock->setFeatures(QDockWidget::DockWidgetClosable);\n    dock->hide();\n    dock->createMenu(m_area);\n\n    m_window->addDockWidget(m_area,dock);\n\n    connect(dock,SIGNAL(visibilityChanged(bool)),this,SLOT(dockVisible(bool)));\n    connect(dock,SIGNAL(moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*)),this,SIGNAL(moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*)));\n    connect(dock,SIGNAL(currenActionChanged(QAction*,QAction*)),this,SLOT(currenActionChanged(QAction*,QAction*)));\n\n    SideActionState *state = new SideActionState;\n    state->toolBtn = btn;\n    state->widget = widget;\n    state->id = id;\n    state->title = title;\n    state->widgetActions = widgetActions;\n    state->widgetList = widgetList;\n    m_actionStateMap.insert(action,state);\n    dock->setCheckedAction(action);\n    //toolBar->insertWidget(spacerAct,btn);\n    m_toolBar->addWidget(btn);\n    if (m_toolBar->isHidden() && !m_bHideToolBar) {\n        m_toolBar->show();\n    }\n    m_dockList.append(dock);\n    connect(action,SIGNAL(toggled(bool)),this,SLOT(toggledAction(bool)));\n    //update actions\n    foreach(SideDockWidget *dock, m_dockList) {\n        dock->setActions(m_actionStateMap);\n    }\n}\n\nvoid SideActionBar::removeAction(QAction *action)\n{\n    for (int i = 0; i < m_dockList.size(); i++) {\n        SideDockWidget *dock = m_dockList[i];\n        if (dock->checkedAction() == action) {\n            dock->hide();\n            m_window->removeDockWidget(dock);\n            m_dockList.removeAt(i);\n            m_toolBar->removeAction(action);\n            dock->deleteLater();\n            break;\n        }\n    }\n\n    SideActionState *state = m_actionStateMap.value(action);\n    if (state) {\n        delete state->toolBtn;\n    }\n    m_actionStateMap.remove(action);\n    delete state;\n\n    foreach(SideDockWidget *dock, m_dockList) {\n        dock->setActions(m_actionStateMap);\n    }\n    if (m_actionStateMap.isEmpty()) {\n        m_toolBar->hide();\n    }\n}\n\nvoid SideActionBar::setHideToolBar(bool b)\n{\n    m_bHideToolBar = b;\n    if (m_bHideToolBar) {\n        m_toolBar->hide();\n    } else {\n        m_toolBar->show();\n    }\n}\n\nQAction *SideActionBar::findToolAction(QWidget *widget) const\n{\n    QMapIterator<QAction*,SideActionState*> i(m_actionStateMap);\n    while (i.hasNext()) {\n        i.next();\n        if (i.value()->widget == widget) {\n            return i.key();\n        }\n    }\n    return 0;\n}\n\nvoid SideActionBar::dockVisible(bool b)\n{\n    SideDockWidget *dock = (SideDockWidget*)sender();\n    QAction *action = dock->checkedAction();\n    if (action) {\n        action->setChecked(dock->isVisible());\n    } else if (b && !dock->actions().isEmpty()) {\n        dock->actions().first()->setChecked(true);\n    }\n}\n\nQString SideActionBar::dockWidgetObjName(const QString &id) const\n{\n    return QString(\"side_dock_x_%1\").arg(id);\n}\n\nvoid SideActionBar::updateAction(QAction *action)\n{\n    SideActionState *state = m_actionStateMap.value(action);\n    foreach (SideDockWidget *dock, m_dockList) {\n        if (dock->checkedAction() == action) {\n            if (action->isChecked()) {\n                if (dock->isHidden()) {\n                    dock->show();\n                }\n                dock->setWidget(state->widget);\n                if (!state->widgetList.isEmpty()) {\n                    dock->setWidgetList(state->widgetList);\n                } else {\n                    dock->setWidgetActions(state->widgetActions);\n                }\n                dock->setObjectName(dockWidgetObjName(state->id));\n                dock->setWindowTitle(state->title);\n                state->widget->setVisible(true);\n            } else {\n                dock->hide();\n                state->widget->setVisible(false);\n            }\n            break;\n        }\n    }\n}\n\nvoid SideActionBar::setShowToolBar(bool visible)\n{\n    if (!visible) {\n        m_toolBar->hide();\n    } else if (!m_actionStateMap.isEmpty()) {\n        m_toolBar->show();\n    }\n}\n\n\nvoid SideActionBar::toggledAction(bool)\n{\n    QAction *action = (QAction*)sender();\n    updateAction(action);\n}\n\nvoid SideActionBar::currenActionChanged(QAction *org, QAction *act)\n{\n    if (org == act) {\n        return;\n    }\n    SideDockWidget *curDock = (SideDockWidget*)sender();\n    foreach (SideDockWidget *dock, m_dockList) {\n        if ((dock->checkedAction() == act) && (dock != curDock)) {\n            dock->setCheckedAction(org);\n            org->setChecked(act->isChecked());\n            updateAction(org);\n            break;\n        }\n    }\n    curDock->setCheckedAction(act);\n    act->setChecked(true);\n    updateAction(act);\n}\n\n\nOutputActionBar::OutputActionBar(QSize iconSize, QMainWindow *window, Qt::DockWidgetArea _area)\n    : BaseActionBar(window), m_area(_area), m_bHideToolBar(false)\n{\n    m_toolBar = new QToolBar;\n    m_toolBar->hide();\n    m_toolBar->setObjectName(QString(\"side_tool_%1\").arg(m_area));\n    m_toolBar->setMovable(false);\n\n//    QWidget *spacer = new QWidget;\n//    spacer->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);\n//    spacerAct = toolBar->addWidget(spacer);\n//    toolBar->addSeparator();\n\n    m_dock = new OutputDockWidget(iconSize, window);\n    m_dock->setObjectName(QString(\"side_dock_%1\").arg(m_area));\n    m_dock->setWindowTitle(QString(\"side_dock_%1\").arg(m_area));\n    m_dock->setFeatures(QDockWidget::DockWidgetClosable);\n    m_dock->hide();\n    m_dock->createMenu(m_area);\n\n    window->addDockWidget(m_area,m_dock);\n\n    connect(m_dock,SIGNAL(visibilityChanged(bool)),this,SLOT(dockVisible(bool)));\n    connect(m_dock,SIGNAL(moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*)),this,SIGNAL(moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*)));\n}\n\nOutputActionBar::~OutputActionBar()\n{\n    qDeleteAll(m_actionStateMap);\n}\n\nOutputDockWidget *OutputActionBar::dockWidget() const\n{\n    return m_dock;\n}\n\nvoid OutputActionBar::addAction(QAction *action, QWidget *widget, const QString &id, const QString &title, QList<QAction *> widgetActions, QList<QWidget *> widgetList)\n{\n    RotationToolButton *btn = new RotationToolButton;\n    btn->setDefaultAction(action);\n    if (m_area == Qt::LeftDockWidgetArea) {\n        btn->setRotation(RotationToolButton::CounterClockwise);\n    } else if (m_area == Qt::RightDockWidgetArea) {\n        btn->setRotation(RotationToolButton::Clockwise);\n    }\n    SideActionState *state = new SideActionState;\n    state->toolBtn = btn;\n    state->widget = widget;\n    state->id = id;\n    state->title = title;\n    state->widgetActions = widgetActions;\n    state->widgetList = widgetList;\n    m_actionStateMap.insert(action,state);\n    m_dock->addAction(action,title);\n    //toolBar->insertWidget(spacerAct,btn);\n    m_toolBar->addWidget(btn);\n    if (m_toolBar->isHidden() && !m_bHideToolBar) {\n        m_toolBar->show();\n    }\n    connect(action,SIGNAL(toggled(bool)),this,SLOT(toggledAction(bool)));\n}\n\nvoid OutputActionBar::removeAction(QAction *action)\n{\n    if (action->isChecked()) {\n        action->setChecked(false);\n    }\n    SideActionState *state = m_actionStateMap.value(action);\n    if (state) {\n        delete state->toolBtn;\n    }\n    m_dock->removeAction(action);\n    m_actionStateMap.remove(action);\n    delete state;\n    if (m_dock->actions().isEmpty()) {\n        m_toolBar->hide();\n    }\n}\n\nvoid OutputActionBar::setHideToolBar(bool b)\n{\n    m_bHideToolBar = b;\n    if (m_bHideToolBar) {\n        m_toolBar->hide();\n    } else {\n        if (!m_dock->actions().isEmpty()){\n            m_toolBar->show();\n        }\n    }\n}\n\nQAction *OutputActionBar::findToolAction(QWidget *widget) const\n{\n    QMapIterator<QAction*,SideActionState*> i(m_actionStateMap);\n    while (i.hasNext()) {\n        i.next();\n        if (i.value()->widget == widget) {\n            return i.key();\n        }\n    }\n    return 0;\n}\n\nvoid OutputActionBar::dockVisible(bool b)\n{\n    QAction *action = m_dock->checkedAction();\n    if (action) {\n        action->setChecked(m_dock->isVisible());\n    } else if (b && !m_dock->actions().isEmpty()) {\n       // m_dock->actions().first()->setChecked(true)\n        int index = m_dock->currentIndex();\n        if (index >= 0 && index < m_dock->actions().size()) {\n            m_dock->actions()[index]->setChecked(true);\n        }\n    }\n}\n\nvoid OutputActionBar::toggledAction(bool)\n{\n    QAction *action = (QAction*)sender();\n    SideActionState *state = m_actionStateMap.value(action);\n    if (!state) {\n        return;\n    }\n    if (action->isChecked()) {\n        if (m_dock->isHidden()) {\n            m_dock->show();\n        }\n        m_dock->setWidget(state->widget);\n        if (!state->widgetList.isEmpty()) {\n            m_dock->setWidgetList(state->widgetList);\n        } else {\n            m_dock->setWidgetActions(state->widgetActions);\n        }\n        m_dock->setWindowTitle(state->title);\n        state->widget->setVisible(true);\n    } else {\n        if (!m_dock->checkedAction()) {\n            m_dock->hide();\n            state->widget->setVisible(false);\n        }\n    }\n}\n\nSideWindowStyle::SideWindowStyle(LiteApi::IApplication *app, QMainWindow *window, QObject *parent)\n    : IWindowStyle(parent),m_liteApp(app),m_mainWindow(window)\n{\n    QSize iconSize = LiteApi::getToolBarIconSize(app);\n    m_leftSideBar = new SideActionBar(iconSize,window,Qt::LeftDockWidgetArea);\n    m_rightSideBar = new SideActionBar(iconSize,window,Qt::RightDockWidgetArea);\n    m_outputBar = new OutputActionBar(iconSize,window,Qt::BottomDockWidgetArea);\n    connect(m_leftSideBar,SIGNAL(moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*)),this,SLOT(moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*)));\n    connect(m_rightSideBar,SIGNAL(moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*)),this,SLOT(moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*)));\n    connect(m_outputBar,SIGNAL(moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*)),this,SLOT(moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*)));\n\n    m_actionBarMap[Qt::LeftDockWidgetArea] = m_leftSideBar;\n    m_actionBarMap[Qt::RightDockWidgetArea] = m_rightSideBar;\n    m_actionBarMap[Qt::BottomDockWidgetArea] = m_outputBar;\n\n    m_mainWindow->addToolBar(Qt::LeftToolBarArea,m_leftSideBar->toolBar());\n    m_mainWindow->addToolBar(Qt::RightToolBarArea,m_rightSideBar->toolBar());\n    m_mainWindow->addDockWidget(Qt::BottomDockWidgetArea,m_outputBar->dockWidget());\n\n    m_mainWindow->setDockNestingEnabled(true);\n    m_mainWindow->setDockOptions(QMainWindow::AllowNestedDocks);\n\n    m_statusBar = new QStatusBar;\n\n    m_hideSideAct = new QAction(tr(\"Hide SideBar\"),this);\n    m_hideSideAct->setIcon(QIcon(\"icon:images/hidesidebar.png\"));\n    m_hideSideAct->setCheckable(true);\n\n    QToolButton *btn = new QToolButton;\n    btn->setDefaultAction(m_hideSideAct);\n    btn->setStyleSheet(\"QToolButton {border:0}\"\n                       \"QToolButton:checked {background : qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(55, 57, 59, 255), stop:1 rgba(255, 255, 255, 255));}\");\n    m_statusBar->addWidget(btn);\n\n    m_statusBar->setContentsMargins(0,0,0,0);\n\n    m_statusBar->addWidget(m_outputBar->toolBar(),1);\n\n    m_mainWindow->setStatusBar(m_statusBar);\n    //m_mainWindow->addToolBar(Qt::BottomToolBarArea,m_outputBar->toolBar);\n\n    m_sideMenu = 0;\n    m_outputMenu = 0;\n\n    connect(m_hideSideAct,SIGNAL(toggled(bool)),this,SLOT(hideSideBar(bool)));\n\n    m_useShortcuts = m_liteApp->settings()->value(LITEAPP_TOOLWINDOW_SHORTCUTS,true).toBool();\n}\n\nSideWindowStyle::~SideWindowStyle()\n{\n    delete m_sideMenu;\n    delete m_outputMenu;\n    delete m_leftSideBar;\n    delete m_rightSideBar;\n}\n\nvoid SideWindowStyle::createToolWindowMenu()\n{\n    QMenu *menu = m_liteApp->actionManager()->loadMenu(ID_MENU_VIEW);\n    if (menu) {\n        menu->addAction(m_hideSideAct);\n        m_sideMenu = menu->addMenu(tr(\"SideBar Windows\"));\n        m_outputMenu = menu->addMenu(tr(\"Output Windows\"));\n    }\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(m_liteApp,\"App\");\n    actionContext->regAction(m_hideSideAct,\"HideSideBar\",LiteApi::UseMacShortcuts?\"Ctrl+Alt+0\":\"Alt+0\");\n}\n\nvoid SideWindowStyle::restoreHideToolWindows()\n{\n    foreach(QAction *action,m_hideActionList) {\n        action->setChecked(true);\n    }\n    m_hideActionList.clear();\n}\n\nvoid SideWindowStyle::restoreHideSideToolWindows()\n{\n    foreach(QAction *action,m_hideSideActionList) {\n        action->setChecked(true);\n    }\n    m_hideSideActionList.clear();\n    m_leftSideBar->setShowToolBar(true);\n    m_rightSideBar->setShowToolBar(true);\n}\n\nvoid SideWindowStyle::hideSideToolWindows()\n{\n    m_hideSideActionList.clear();\n\n    foreach(QAction *action, m_leftSideBar->actionMap().keys()) {\n        if (action->isChecked()) {\n            m_hideSideActionList.append(action);\n            action->setChecked(false);\n        }\n    }\n    foreach(QAction *action, m_rightSideBar->actionMap().keys()) {\n        if (action->isChecked()) {\n            m_hideSideActionList.append(action);\n            action->setChecked(false);\n        }\n    }\n    m_leftSideBar->setShowToolBar(false);\n    m_rightSideBar->setShowToolBar(false);\n}\n\nvoid SideWindowStyle::hideAllToolWindows()\n{\n    m_hideActionList.clear();\n\n    foreach(QAction *action, m_leftSideBar->actionMap().keys()) {\n        if (action->isChecked()) {\n            m_hideActionList.append(action);\n            action->setChecked(false);\n        }\n    }\n    foreach(QAction *action, m_rightSideBar->actionMap().keys()) {\n        if (action->isChecked()) {\n            m_hideActionList.append(action);\n            action->setChecked(false);\n        }\n    }\n    foreach(QAction *action, m_outputBar->actionMap().keys()) {\n        if (action->isChecked()) {\n            m_hideActionList.append(action);\n            action->setChecked(false);\n        }\n    }\n}\n\nvoid SideWindowStyle::hideSideBar(bool b)\n{\n    if (b) {\n        hideSideToolWindows();\n    } else {\n        restoreHideSideToolWindows();\n    }\n}\n\nvoid SideWindowStyle::toggledSideBar(bool b)\n{\n    if (b) {\n        m_hideSideAct->setChecked(false);\n    }\n}\n\nvoid SideWindowStyle::showOrHideToolWindow()\n{\n    bool hide = false;\n    foreach(QAction *action, m_leftSideBar->actionMap().keys()) {\n        if (action->isChecked()) {\n            hide = true;\n            break;\n        }\n    }\n    foreach(QAction *action, m_rightSideBar->actionMap().keys()) {\n        if (action->isChecked()) {\n            hide = true;\n            break;\n        }\n    }\n    if (hide) {\n        hideAllToolWindows();\n    } else {\n        restoreHideToolWindows();\n    }\n}\n\nvoid SideWindowStyle::hideOutputWindow()\n{\n    foreach(QAction *act, m_outputBar->actionMap().keys()) {\n        if (act->isChecked()) {\n            act->setChecked(false);\n        }\n    }\n}\n\nvoid SideWindowStyle::saveToolState() const\n{\n    m_liteApp->settings()->setValue(\"side_side_hide\",m_hideSideAct->isChecked());\n}\n\nvoid SideWindowStyle::restoreToolsState()\n{\n    m_hideSideAct->setChecked(m_liteApp->settings()->value(\"side_side_hide\").toBool());\n}\n\nvoid SideWindowStyle::updateConer()\n{\n    m_mainWindow->setCorner(Qt::BottomLeftCorner,Qt::LeftDockWidgetArea);\n    m_mainWindow->setCorner(Qt::BottomRightCorner,Qt::RightDockWidgetArea);\n}\n\nvoid SideWindowStyle::moveToolWindow(Qt::DockWidgetArea from, Qt::DockWidgetArea to, QAction *action, bool /*split*/)\n{\n    if (from == to) {\n        return;\n    }\n    BaseActionBar *fromBar = m_actionBarMap[from];\n    BaseActionBar *toBar = m_actionBarMap[to];\n    if (!fromBar || !toBar) {\n        return;\n    }\n    SideActionState *state = fromBar->actionMap().value(action);\n    QWidget *widget = state->widget;\n    QString id = state->id;\n    QString title = state->title;\n    QList<QAction*> widgetActions = state->widgetActions;\n    QWidgetList  widgetList = state->widgetList;\n    fromBar->removeAction(action);\n    toBar->addAction(action,widget,id,title,widgetActions,widgetList);\n    action->setChecked(true);\n    //save\n    m_liteApp->settings()->setValue(\"sidebar_area/\"+action->objectName(),to);\n\n    if (from == Qt::BottomDockWidgetArea && to != Qt::BottomDockWidgetArea) {\n        m_outputMenu->removeAction(action);\n        m_sideMenu->addAction(action);\n        action->setText(title);\n        if (m_useShortcuts) {\n            int index = m_leftSideBar->actionMap().size()+m_rightSideBar->actionMap().size();\n            if (index <= 9) {\n                action->setText(QString(\"%1: %2\").arg(index).arg(title));\n                QKeySequence ks(QString(\"Ctrl+Alt+%1\").arg(index));\n                LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(m_liteApp,\"App\");\n                actionContext->regAction(action,\"ToolWindow_\"+id,ks.toString());\n            } else {\n                LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(m_liteApp,\"App\");\n                actionContext->regAction(action,\"ToolWindow_\"+id,\"\");\n            }\n        }\n    } else if (from != Qt::BottomDockWidgetArea && to == Qt::BottomDockWidgetArea) {\n        m_sideMenu->removeAction(action);\n        m_outputMenu->addAction(action);\n        action->setText(title);\n        if (m_useShortcuts) {\n            int index = m_outputBar->actionMap().size();\n            if (index <= 9) {\n                action->setText(QString(\"%1: %2\").arg(index).arg(title));\n#ifdef Q_OS_MAC\n                QKeySequence ks(QString(\"Ctrl+Meta+%1\").arg(index));\n#else\n                QKeySequence ks(QString(\"Ctrl+Shift+%1\").arg(index));\n#endif\n                LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(m_liteApp,\"App\");\n                actionContext->regAction(action,\"ToolWindow_\"+id,ks.toString());\n            } else {\n                LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(m_liteApp,\"App\");\n                actionContext->regAction(action,\"ToolWindow_\"+id,\"\");\n            }\n        }\n    }\n}\n\nvoid SideWindowStyle::moveActionTo(Qt::DockWidgetArea from, Qt::DockWidgetArea to, QAction *action)\n{\n    this->moveToolWindow(from,to,action,false);\n}\n\nQAction *SideWindowStyle::findToolWindow(QWidget *widget)\n{\n    QAction *act = m_leftSideBar->findToolAction(widget);\n    if (act) {\n        return act;\n    }\n    act = m_rightSideBar->findToolAction(widget);\n    if (act) {\n        return act;\n    }\n    return m_outputBar->findToolAction(widget);\n}\n\nvoid SideWindowStyle::removeToolWindow(QAction */*action*/)\n{\n\n}\n\nQAction *SideWindowStyle::addToolWindow(LiteApi::IApplication *app, Qt::DockWidgetArea area, QWidget *widget, const QString &id, const QString &title, bool /*split*/, QList<QAction *> widgetActions, QList<QWidget *> widgetList)\n{\n    QAction *action = new QAction(this);\n    action->setText(title);\n    action->setCheckable(true);\n    action->setObjectName(id);\n\n    area = (Qt::DockWidgetArea)m_liteApp->settings()->value(\"sidebar_area/\"+id,area).toInt();\n\n    if (area == Qt::TopDockWidgetArea || area == Qt::BottomDockWidgetArea) {\n        m_outputBar->addAction(action,widget,id,title,widgetActions,widgetList);\n        int index = m_outputBar->actionMap().size();\n        action->setText(title);\n        if ((index <= 9) && m_useShortcuts) {\n            action->setText(QString(\"%1: %2\").arg(index).arg(title));\n            //QKeySequence ks(LiteApi::UseMacShortcuts?QString(\"Ctrl+Alt+%1\").arg(index):QString(\"Alt+%1\").arg(index));\n#ifdef Q_OS_MAC\n            QKeySequence ks(QString(\"Ctrl+Meta+%1\").arg(index));\n#else\n            QKeySequence ks(QString(\"Ctrl+Shift+%1\").arg(index));\n#endif\n            LiteApi::IActionContext *actionContext = app->actionManager()->getActionContext(app,\"App\");\n            actionContext->regAction(action,\"ToolWindow_\"+id,ks.toString());\n        }\n        if (m_outputMenu) {\n            m_outputMenu->addAction(action);\n        }\n    } else {\n        SideActionBar *sideBar = (area == Qt::LeftDockWidgetArea) ? m_leftSideBar : m_rightSideBar;\n        sideBar->addAction(action,widget,id,title,widgetActions,widgetList);\n        int index = m_leftSideBar->actionMap().size()+m_rightSideBar->actionMap().size();\n        action->setText(title);\n        if ((index <= 9) && m_useShortcuts) {\n            action->setText(QString(\"%1: %2\").arg(index).arg(title));\n            //QKeySequence ks(LiteApi::UseMacShortcuts?QString(\"Ctrl+Alt+%1\").arg(index):QString(\"Ctrl+Alt+%1\").arg(index));\n            QKeySequence ks(QString(\"Ctrl+Alt+%1\").arg(index));\n            LiteApi::IActionContext *actionContext = app->actionManager()->getActionContext(app,\"App\");\n            actionContext->regAction(action,\"ToolWindow_\"+id,ks.toString());\n        }\n        connect(action,SIGNAL(toggled(bool)),this,SLOT(toggledSideBar(bool)));\n        if (m_sideMenu) {\n            m_sideMenu->addAction(action);\n        }\n    }\n    return action;\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/sidewindowstyle.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: sidewindowstyle.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef SIDEWINDOWSTYLE_H\n#define SIDEWINDOWSTYLE_H\n\n#include \"windowstyle.h\"\n#include \"tooldockwidget.h\"\n\nclass SideDockWidget;\nclass OutputDockWidget;\nclass QToolButton;\n\nstruct SideActionState\n{\n    QWidget *toolBtn;\n    QWidget *widget;\n    QList<QWidget*> widgetList;\n    QList<QAction*> widgetActions;\n    QString id;\n    QString title;\n};\n\nclass SideDockWidget : public BaseDockWidget\n{\n    Q_OBJECT\npublic:\n    explicit SideDockWidget(QSize iconSize, QWidget *parent = 0);\n    void createMenu(Qt::DockWidgetArea area);\n    void setCheckedAction(QAction *action);\n    void setActions(const QMap<QAction*,SideActionState*> &m);\n    virtual void setWindowTitle(const QString &text);\nsignals:\n    void moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea, QAction*);\n    void currenActionChanged(QAction *org, QAction *act);\nprotected slots:\n    void moveAction();\n    void actionChanged();\n    virtual void activeComboBoxIndex(int);\n    virtual void topLevelChanged(bool b);\nprotected:\n    QMenu *m_menu;\n    QMenu *m_moveMenu;\n    Qt::DockWidgetArea m_area;\n    QString m_areaInfo;\n};\n\nclass BaseActionBar : public QObject\n{\n    Q_OBJECT\npublic:\n    BaseActionBar(QObject *parent) : QObject(parent)\n    {}\n    virtual void addAction(QAction *action, QWidget *widget, const QString &id, const QString &title, QList<QAction*> widgetActions, QList<QWidget*> widgetList) = 0;\n    virtual void removeAction(QAction *action) = 0;\n    virtual QAction *findToolAction(QWidget *widget) const = 0;\n    virtual QToolBar *toolBar() const = 0;\n    virtual QMap<QAction*,SideActionState*> actionMap() const = 0;\n};\n\nclass SideActionBar : public BaseActionBar\n{\n    Q_OBJECT\npublic:\n    SideActionBar(QSize iconSize, QMainWindow *window, Qt::DockWidgetArea area);\n    virtual ~SideActionBar();\n    void addAction(QAction *action, QWidget *widget, const QString &id, const QString &title, QList<QAction*> widgetActions, QList<QWidget*> widgetList);\n    void removeAction(QAction *action);\n    QAction *findToolAction(QWidget *widget) const;\n    virtual QToolBar *toolBar() const { return m_toolBar; }\n    virtual QMap<QAction*,SideActionState*> actionMap() const { return m_actionStateMap; }\n    void updateAction(QAction *action);\n    void setShowToolBar(bool visible);\nsignals:\n    void moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*);\nprotected slots:\n    void setHideToolBar(bool b);\n    void dockVisible(bool);\n    void toggledAction(bool b);\n    void currenActionChanged(QAction *org, QAction *act);\nprotected:\n    QSize m_iconSize;\n    QMainWindow *m_window;\n    Qt::DockWidgetArea m_area;\n    QToolBar *m_toolBar;\n    //QAction  *spacerAct;\n    QList<SideDockWidget*> m_dockList;\n    QMap<QAction*,SideActionState*> m_actionStateMap;\n    bool m_bHideToolBar;\n    QString dockWidgetObjName(const QString &id) const;\n};\n\n\nclass OutputActionBar : public BaseActionBar\n{\n    Q_OBJECT\npublic:\n    OutputActionBar(QSize iconSize, QMainWindow *window, Qt::DockWidgetArea m_area = Qt::BottomDockWidgetArea);\n    virtual ~OutputActionBar();\n    OutputDockWidget *dockWidget() const;\n    void addAction(QAction *action, QWidget *widget, const QString &id, const QString &title, QList<QAction*> widgetActions, QList<QWidget*> widgetList);\n    void removeAction(QAction *action);\n    void setHideToolBar(bool b);\n    virtual QAction *findToolAction(QWidget *widget) const;\n    virtual QToolBar *toolBar() const { return m_toolBar; }\n    virtual QMap<QAction*,SideActionState*> actionMap() const { return m_actionStateMap; }\nsignals:\n    void moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*);\nprotected slots:\n    void dockVisible(bool);\n    void toggledAction(bool b);\nprotected:\n    Qt::DockWidgetArea m_area;\n    QToolBar *m_toolBar;\n   // QAction  *spacerAct;\n    OutputDockWidget *m_dock;\n    QMap<QAction*,SideActionState*> m_actionStateMap;\n    bool m_bHideToolBar;\n};\n\nclass SideWindowStyle : public IWindowStyle\n{\n    Q_OBJECT\npublic:\n    SideWindowStyle(LiteApi::IApplication *app, QMainWindow *window, QObject *parent = 0);\n    ~SideWindowStyle();\n    virtual void createToolWindowMenu();\n    virtual QAction *addToolWindow(LiteApi::IApplication *app, Qt::DockWidgetArea area, QWidget *widget, const QString &id, const QString &title, bool split = false,\n                                   QList<QAction*> widgetActions = QList<QAction*>(),\n                                   QList<QWidget*> widgetList = QList<QWidget*>());\n    virtual void removeToolWindow(QAction *action);\n    virtual QAction *findToolWindow(QWidget *widget);\n    virtual void moveToolWindow(Qt::DockWidgetArea from, Qt::DockWidgetArea to, QAction *action, bool split);\n    virtual void saveToolState() const;\n    virtual void restoreToolsState();\n    virtual void updateConer();\n    void restoreHideToolWindows();\n    void restoreHideSideToolWindows();\n    void hideSideToolWindows();\npublic slots:\n    void moveActionTo(Qt::DockWidgetArea from, Qt::DockWidgetArea to, QAction*action);\n    virtual void hideOutputWindow();\n    virtual void showOrHideToolWindow();\n    virtual void hideAllToolWindows();\n    void hideSideBar(bool);\n    void toggledSideBar(bool);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QMainWindow *m_mainWindow;\n    SideActionBar *m_leftSideBar;\n    SideActionBar *m_rightSideBar;\n    OutputActionBar *m_outputBar;\n    QMap<Qt::DockWidgetArea, BaseActionBar*> m_actionBarMap;\n    QStatusBar  *m_statusBar;\n    QAction     *m_hideSideAct;\n    QList<QAction*> m_hideActionList;\n    QList<QAction*> m_hideSideActionList;\n    QMenu       *m_sideMenu;\n    QMenu       *m_outputMenu;\n    bool         m_useShortcuts;\n};\n\n#endif // SIDEWINDOWSTYLE_H\n"
  },
  {
    "path": "liteidex/src/liteapp/splitfolderwindow.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2018 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: splitfolderwindow.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"splitfolderwindow.h\"\r\n#include \"symboltreeview/symboltreeview.h\"\r\n#include \"liteapp_global.h\"\r\n#include <QTreeView>\r\n#include <QStackedWidget>\r\n#include <QSplitter>\r\n#include <QDir>\r\n#include <QAction>\r\n#include <QStandardItem>\r\n#include <QStandardItemModel>\r\n#include <QMenu>\r\n#include <QDebug>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nSplitFolderWindow::SplitFolderWindow(IApplication *app, QObject *parent)\r\n    : IFolderWindow(parent), m_liteApp(app)\r\n{\r\n    m_spliter = new QSplitter(Qt::Vertical);\r\n\r\n    m_tree = new SplitFolderView(app);\r\n    m_tree->setHeaderHidden(true);\r\n    m_tree->setRootIsDecorated(false);\r\n\r\n    m_stacked = new QStackedWidget();\r\n    m_spliter->addWidget(m_tree);\r\n    m_spliter->addWidget(m_stacked);\r\n    m_spliter->setStretchFactor(0,0);\r\n    m_spliter->setStretchFactor(1,1);\r\n\r\n    m_filters = QDir::AllDirs | QDir::Files | QDir::Drives\r\n                            | QDir::Readable| QDir::Writable\r\n                            | QDir::Executable /*| QDir::Hidden*/\r\n                            | QDir::NoDotAndDotDot;\r\n    m_bShowDetails = false;\r\n    m_bSyncEditor = false;\r\n\r\n    connect(m_tree,SIGNAL(currentIndexChanged(QModelIndex,QModelIndex)),this,SLOT(currentIndexChanged(QModelIndex,QModelIndex)));\r\n    connect(m_tree,SIGNAL(aboutToShowContextMenu(QMenu*,LiteApi::FILESYSTEM_CONTEXT_FLAG,QFileInfo)),this,SLOT(aboutToShowFolderContextMenu(QMenu*,LiteApi::FILESYSTEM_CONTEXT_FLAG,QFileInfo)));\r\n    connect(m_tree,SIGNAL(closeFolderIndex(QModelIndex)),this,SLOT(closeFolderIndex(QModelIndex)));\r\n    connect(m_tree,SIGNAL(reloadFolderIndex(QModelIndex)),this,SLOT(reloadFolderIndex(QModelIndex)));\r\n\r\n    connect(m_liteApp->editorManager(),SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(currentEditorChanged(LiteApi::IEditor*)));\r\n\r\n    QByteArray state = m_liteApp->settings()->value(\"LiteApp/BoxFolderSplitter\").toByteArray();\r\n    m_spliter->restoreState(state);\r\n}\r\n\r\nSplitFolderWindow::~SplitFolderWindow()\r\n{\r\n    m_liteApp->settings()->setValue(\"LiteApp/BoxFolderSplitter\",m_spliter->saveState());\r\n\r\n    delete m_spliter;\r\n}\r\n\r\nQString SplitFolderWindow::id() const\r\n{\r\n    return \"folderwindow/splitfolder\";\r\n}\r\n\r\nQWidget *SplitFolderWindow::widget() const\r\n{\r\n    return m_spliter;\r\n}\r\n\r\nQStringList SplitFolderWindow::folderList() const\r\n{\r\n    return m_folderList;\r\n}\r\n\r\nvoid SplitFolderWindow::setFolderList(const QStringList &folders)\r\n{\r\n    foreach (QString folder, folders) {\r\n       addFolderImpl(folder);\r\n    }\r\n}\r\n\r\nvoid SplitFolderWindow::addFolderList(const QString &folder)\r\n{\r\n    addFolderImpl(folder);\r\n}\r\n\r\nvoid SplitFolderWindow::closeAllFolders()\r\n{\r\n    m_folderList.clear();\r\n    m_tree->clear();\r\n    int count = m_stacked->count();\r\n    while (count) {\r\n        count--;\r\n        QWidget *widget = m_stacked->widget(count);\r\n        m_stacked->removeWidget(widget);\r\n        delete widget;\r\n    }\r\n}\r\n\r\nvoid SplitFolderWindow::currentIndexChanged(const QModelIndex &index, const QModelIndex &/*prev*/)\r\n{\r\n    int row = findInStacked(index);\r\n    if (row == -1) {\r\n        return;\r\n    }\r\n    QString folder = index.data(Qt::UserRole+1).toString();\r\n    if (!QFileInfo(folder).exists()) {\r\n        m_tree->closeFolder();\r\n        return;\r\n    }\r\n    FolderView *widget = (FolderView*)m_stacked->widget(row);\r\n    if (widget->filter() != m_filters) {\r\n        widget->setFilter(m_filters);\r\n    }\r\n\r\n    if (widget->isShowDetails() != m_bShowDetails) {\r\n        widget->setShowDetails(m_bShowDetails);\r\n    }\r\n    m_stacked->setCurrentIndex(row);\r\n}\r\n\r\nvoid SplitFolderWindow::closeFolderIndex(const QModelIndex &index)\r\n{\r\n    int row = findInStacked(index);\r\n    if (row == -1) {\r\n        return;\r\n    }\r\n    QWidget *widget = m_stacked->widget(row);\r\n    m_stacked->removeWidget(widget);\r\n    delete widget;\r\n    m_folderList.removeAt(row);\r\n}\r\n\r\nvoid SplitFolderWindow::reloadFolderIndex(const QModelIndex &index)\r\n{\r\n    int row = findInStacked(index);\r\n    if (row == -1) {\r\n        return;\r\n    }\r\n    FolderView *widget = (FolderView*)m_stacked->widget(row);\r\n    widget->reload();\r\n}\r\n\r\nvoid SplitFolderWindow::setShowHideFiles(bool b)\r\n{\r\n    if (b) {\r\n        m_filters |= QDir::Hidden;\r\n    } else if (m_filters.testFlag(QDir::Hidden)) {\r\n        m_filters ^= QDir::Hidden;\r\n    }\r\n    FolderView *widget = (FolderView*)m_stacked->currentWidget();\r\n    if (!widget) {\r\n        return;\r\n    }\r\n    if (widget->filter() != m_filters) {\r\n        widget->setFilter(m_filters);\r\n    }\r\n}\r\n\r\nvoid SplitFolderWindow::setShowDetails(bool b)\r\n{\r\n    m_bShowDetails = b;\r\n    FolderView *widget = (FolderView*)m_stacked->currentWidget();\r\n    if (!widget) {\r\n        return;\r\n    }\r\n    if (widget->isShowDetails() != b) {\r\n        widget->setShowDetails(b);\r\n    }\r\n}\r\n\r\nvoid SplitFolderWindow::setSyncEditor(bool b)\r\n{\r\n    m_bSyncEditor = b;\r\n    if (b) {\r\n        this->currentEditorChanged(m_liteApp->editorManager()->currentEditor());\r\n    }\r\n}\r\n\r\nvoid SplitFolderWindow::currentEditorChanged(IEditor *editor)\r\n{\r\n    if (!editor || !m_bSyncEditor) {\r\n        return;\r\n    }\r\n    QString filePath = editor->filePath();\r\n    if (filePath.isEmpty()) {\r\n        return;\r\n    }\r\n    filePath = QDir::toNativeSeparators(filePath);\r\n\r\n    FolderView *widget = (FolderView*)m_stacked->currentWidget();\r\n    if (widget) {\r\n        QModelIndex index = widget->indexForPath(filePath);\r\n        if (index.isValid()) {\r\n            widget->scrollTo(index);\r\n            widget->clearSelection();\r\n            widget->setCurrentIndex(index);\r\n            return;\r\n        }\r\n    }\r\n    int count = m_folderList.count();\r\n    for (int i = 0; i < count; i++) {\r\n        QString folder = m_folderList.at(i);\r\n        if (!QFileInfo(folder).exists()) {\r\n            continue;\r\n        }\r\n        FolderView *widget = (FolderView*)m_stacked->widget(i);\r\n        QModelIndex index = widget->indexForPath(filePath);\r\n        if (index.isValid()) {\r\n            widget->scrollTo(index);\r\n            widget->clearSelection();\r\n            widget->setCurrentIndex(index);\r\n            m_tree->setCurrentIndex(m_tree->model()->index(i,0));\r\n            m_stacked->setCurrentIndex(i);\r\n            return;\r\n        }\r\n    }\r\n}\r\n\r\nvoid SplitFolderWindow::doubleClickedFolderView(const QModelIndex &index)\r\n{\r\n    if (!index.isValid()) {\r\n        return;\r\n    }\r\n    FolderView *view = (FolderView*)(sender());\r\n    QFileInfo info = view->fileInfo(index);\r\n    if (info.isFile()) {\r\n       m_liteApp->fileManager()->openEditor(info.filePath());\r\n    }\r\n}\r\n\r\nvoid SplitFolderWindow::enterKeyPressedFolderView(const QModelIndex &index)\r\n{\r\n    if (!index.isValid()) {\r\n        return;\r\n    }\r\n    FolderView *view = (FolderView*)(sender());\r\n    QFileInfo info = view->fileInfo(index);\r\n    if (info.isFile()) {\r\n        m_liteApp->fileManager()->openEditor(info.filePath());\r\n    } else {\r\n        view->setExpanded(index,!view->isExpanded(index));\r\n    }\r\n}\r\n\r\nvoid SplitFolderWindow::addFolderImpl(const QString &_folder)\r\n{\r\n    QString folder = QDir::toNativeSeparators(_folder);\r\n    if (m_folderList.contains(folder)) {\r\n        return;\r\n    }\r\n    if (!QDir(folder).exists()) {\r\n        return;\r\n    }\r\n    FolderView *view = new FolderView(true,m_liteApp);\r\n    view->setFilter(m_filters);\r\n    view->setShowDetails(m_bShowDetails);\r\n    view->setRootPath(folder);\r\n    connect(view,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(doubleClickedFolderView(QModelIndex)));\r\n    connect(view,SIGNAL(enterKeyPressed(QModelIndex)),this,SLOT(enterKeyPressedFolderView(QModelIndex)));\r\n    connect(view,SIGNAL(aboutToShowContextMenu(QMenu*,LiteApi::FILESYSTEM_CONTEXT_FLAG,QFileInfo)),this,SLOT(aboutToShowFolderContextMenu(QMenu*,LiteApi::FILESYSTEM_CONTEXT_FLAG,QFileInfo)));\r\n\r\n    m_stacked->addWidget(view);\r\n    m_folderList.append(folder);\r\n    m_tree->addRootPath(folder);\r\n    m_liteApp->recentManager()->addRecent(folder,\"folder\");\r\n}\r\n\r\nint SplitFolderWindow::findInStacked(const QModelIndex &index)\r\n{\r\n    if (!index.isValid()) {\r\n        return -1;\r\n    }\r\n    QString folder = index.data(Qt::UserRole+1).toString();\r\n    return m_folderList.indexOf(folder);\r\n}\r\n\r\nvoid SplitFolderWindow::aboutToShowFolderContextMenu(QMenu *menu, LiteApi::FILESYSTEM_CONTEXT_FLAG flag, const QFileInfo &info)\r\n{\r\n    m_liteApp->fileManager()->emitAboutToShowFolderContextMenu(menu,flag,info,\"liteapp/folder\");\r\n}\r\n\r\n\r\nSplitFolderView::SplitFolderView(IApplication *app, QWidget *parent)\r\n    : BaseFolderView(app,parent)\r\n{\r\n    m_model = new QStandardItemModel(this);\r\n    this->setModel(m_model);\r\n    m_contextMenu = new QMenu();\r\n\r\n    this->setContextMenuPolicy(Qt::CustomContextMenu);\r\n    connect(this,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(customContextMenuRequested(QPoint)));\r\n}\r\n\r\nvoid SplitFolderView::addRootPath(const QString &folder)\r\n{\r\n    QStandardItem *item = new QStandardItem(folder);\r\n    item->setData(folder,Qt::UserRole+1);\r\n    item->setToolTip(folder);\r\n\r\n    m_model->appendRow(item);\r\n    this->setCurrentIndex(m_model->indexFromItem(item));\r\n}\r\n\r\nvoid SplitFolderView::clear()\r\n{\r\n    m_model->clear();\r\n}\r\n\r\nvoid SplitFolderView::openFolder()\r\n{\r\n    m_liteApp->fileManager()->openFolder();\r\n}\r\n\r\nvoid SplitFolderView::closeFolder()\r\n{\r\n    QModelIndex index = this->currentIndex();\r\n    if (!index.isValid()) {\r\n        return;\r\n    }\r\n    emit closeFolderIndex(index);\r\n    m_model->removeRow(index.row());\r\n}\r\n\r\nvoid SplitFolderView::reloadFolder()\r\n{\r\n    QModelIndex index = this->currentIndex();\r\n    if (!index.isValid()) {\r\n        return;\r\n    }\r\n    emit reloadFolderIndex(index);\r\n}\r\n\r\nvoid SplitFolderView::customContextMenuRequested(const QPoint &pos)\r\n{\r\n    QModelIndex index = this->currentIndex();\r\n    if (!index.isValid()) {\r\n        return;\r\n    }\r\n    QString dir = index.data(Qt::UserRole+1).toString();\r\n    QFileInfo fileInfo(dir);\r\n\r\n    m_contextMenu->clear();\r\n    m_contextInfo = fileInfo;\r\n\r\n    LiteApi::FILESYSTEM_CONTEXT_FLAG flag = LiteApi::FILESYSTEM_ROOTFOLDER;\r\n    m_contextMenu->addAction(m_openInNewWindowAct);\r\n    m_contextMenu->addSeparator();\r\n    m_contextMenu->addAction(m_newFileAct);\r\n    m_contextMenu->addAction(m_newFileWizardAct);\r\n    m_contextMenu->addAction(m_newFolderAct);\r\n    m_contextMenu->addSeparator();\r\n    m_contextMenu->addAction(m_openFolderAct);\r\n    m_contextMenu->addAction(m_reloadFolderAct);\r\n    m_contextMenu->addAction(m_closeFolderAct);\r\n    m_contextMenu->addSeparator();\r\n    m_contextMenu->addAction(m_copyFullPathToClipboardAct);\r\n    m_contextMenu->addSeparator();\r\n    m_contextMenu->addAction(m_openExplorerAct);\r\n    m_contextMenu->addAction(m_openShellAct);\r\n    m_contextMenu->addAction(m_openTerminalAct);\r\n    emit aboutToShowContextMenu(m_contextMenu,flag,m_contextInfo);\r\n    m_contextMenu->exec(this->mapToGlobal(pos));\r\n}\r\n"
  },
  {
    "path": "liteidex/src/liteapp/splitfolderwindow.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2018 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: splitfolderwindow.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef SPLITFOLDERWINDOW_H\n#define SPLITFOLDERWINDOW_H\n\n#include \"filemanager.h\"\n#include \"folderview/folderview.h\"\n\nclass QStackedWidget;\nclass QTreeWidget;\nclass QSplitter;\nclass QStandardItemModel;\nclass SplitFolderView;\nclass SplitFolderWindow : public IFolderWindow\n{\n    Q_OBJECT\npublic:\n    SplitFolderWindow(LiteApi::IApplication *app, QObject *parent = 0);\n    virtual ~SplitFolderWindow();\n    virtual QString id() const;\n    virtual QWidget *widget() const;\n    virtual QStringList folderList() const;\n    virtual void setFolderList(const QStringList &folders);\n    virtual void addFolderList(const QString &folder);\n    virtual void closeAllFolders();\n    virtual void setShowHideFiles(bool b);\n    virtual void setShowDetails(bool b);\n    virtual void setSyncEditor(bool b);\npublic slots:\n    void currentIndexChanged(const QModelIndex &index,const QModelIndex &prev);\n    void closeFolderIndex(const QModelIndex &index);\n    void reloadFolderIndex(const QModelIndex &index);\n    void currentEditorChanged(LiteApi::IEditor *editor);\n    void doubleClickedFolderView(const QModelIndex &index);\n    void enterKeyPressedFolderView(const QModelIndex &index);\n    void aboutToShowFolderContextMenu(QMenu *menu, LiteApi::FILESYSTEM_CONTEXT_FLAG flag, const QFileInfo &info);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QSplitter *m_spliter;\n    SplitFolderView *m_tree;\n    QStandardItemModel *m_model;\n    QStackedWidget *m_stacked;\n    QStringList m_folderList;\n    QDir::Filters m_filters;\n    bool m_bShowDetails;\n    bool m_bSyncEditor;\nprotected:\n    void addFolderImpl(const QString &folder);\n    int findInStacked(const QModelIndex &index);\n};\n\nclass SplitFolderView : public BaseFolderView\n{\n    Q_OBJECT\npublic:\n    SplitFolderView(LiteApi::IApplication *app, QWidget *parent = 0);\n    void addRootPath(const QString &folder);\n    void clear();\nsignals:\n    void closeFolderIndex(const QModelIndex &index);\n    void reloadFolderIndex(const QModelIndex &index);\npublic slots:\n    void customContextMenuRequested(const QPoint &pos);\n    virtual void openFolder();\n    virtual void closeFolder();\n    virtual void reloadFolder();\nprotected:\n    QStandardItemModel *m_model;\n    QMenu *m_contextMenu;\n};\n\n#endif // SPLITFOLDERWINDOW_H\n"
  },
  {
    "path": "liteidex/src/liteapp/splitwindowstyle.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: splitwindowstyle.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"splitwindowstyle.h\"\n#include \"rotationtoolbutton.h\"\n#include \"tooldockwidget.h\"\n#include \"liteapp_global.h\"\n#include \"liteapi/liteids.h\"\n#include <QToolBar>\n#include <QAction>\n#include <QActionGroup>\n#include <QStatusBar>\n#include <QLabel>\n#include <QDockWidget>\n#include <QStatusBar>\n#include <QKeySequence>\n#include <QMenu>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nActionGroup::ActionGroup(QObject *parent) : QObject(parent)\n{\n    current = 0;\n}\n\nQList<QAction *> ActionGroup::actions() const\n{\n    return m_actions;\n}\n\nvoid ActionGroup::addAction(QAction *action)\n{\n    if(!m_actions.contains(action)) {\n        m_actions.append(action);\n        QObject::connect(action, SIGNAL(changed()), this, SLOT(actionChanged()));\n    }\n    if (current && current->isChecked()) {\n        current->setChecked(false);\n    }\n    if (action->isChecked()) {\n        current = action;\n    }\n}\n\nvoid ActionGroup::removeAction(QAction *action)\n{\n    if (m_actions.removeAll(action)) {\n        if (action == current)\n            current = 0;\n        QObject::disconnect(action, SIGNAL(changed()), this, SLOT(actionChanged()));\n    }\n}\n\nQAction * ActionGroup::checkedAction () const\n{\n    return current;\n}\n\nvoid ActionGroup::actionChanged()\n{\n    QAction *action = qobject_cast<QAction*>(sender());\n    Q_ASSERT_X(action != 0, \"ActionGroup::actionChanged\", \"internal error\");\n    if (action->isChecked()) {\n        if (action != current) {\n            if(current)\n                current->setChecked(false);\n            current = action;\n        }\n    } else if (action == current) {\n        current = 0;\n    }\n}\n\nSplitActionToolBar::SplitActionToolBar(QSize iconSize, QWidget *parent, Qt::DockWidgetArea _area)\n    : QObject(parent), area(_area), bHideToolBar(false)\n{\n    toolBar = new QToolBar;\n    toolBar->hide();\n    toolBar->setObjectName(QString(\"tool_%1\").arg(area));\n    toolBar->setMovable(false);\n\n    QWidget *spacer = new QWidget;\n    spacer->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);\n    spacerAct = toolBar->addWidget(spacer);\n    toolBar->addSeparator();\n    QWidget *spacer2 = new QWidget;\n    spacer2->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);\n    toolBar->addWidget(spacer2);\n\n    dock1 = new SplitDockWidget(iconSize, parent);\n    dock1->setObjectName(QString(\"dock_%1\").arg(area));\n    dock1->setWindowTitle(QString(\"dock_%1\").arg(area));\n    dock1->setFeatures(QDockWidget::DockWidgetClosable);\n    dock1->hide();\n    dock1->createMenu(area,false);\n\n    dock2 = new SplitDockWidget(iconSize,parent);\n    dock2->setObjectName(QString(\"dock_%1_split\").arg(area));\n    dock2->setWindowTitle(QString(\"dock_%1_split\").arg(area));\n    dock2->setFeatures(QDockWidget::DockWidgetClosable);\n    dock2->hide();\n    dock2->createMenu(area,true);\n\n    connect(dock1,SIGNAL(visibilityChanged(bool)),this,SLOT(dock1Visible(bool)));\n    connect(dock2,SIGNAL(visibilityChanged(bool)),this,SLOT(dock2Visible(bool)));\n    connect(dock1,SIGNAL(moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*,bool)),this,SIGNAL(moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*,bool)));\n    connect(dock2,SIGNAL(moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*,bool)),this,SIGNAL(moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*,bool)));\n}\n\nSplitDockWidget *SplitActionToolBar::dock(bool split) const\n{\n    return split?dock2:dock1;\n}\n\nvoid SplitActionToolBar::addAction(QAction *action, const QString &title, bool split)\n{\n    RotationToolButton *btn = new RotationToolButton;\n    btn->setDefaultAction(action);\n    if (area == Qt::LeftDockWidgetArea) {\n        btn->setRotation(RotationToolButton::CounterClockwise);\n    } else if (area == Qt::RightDockWidgetArea) {\n        btn->setRotation(RotationToolButton::Clockwise);\n    }\n    m_actionWidgetMap.insert(action,btn);\n    if (split) {\n        dock2->addAction(action,title);\n        toolBar->addWidget(btn);\n    } else {\n        dock1->addAction(action,title);\n        toolBar->insertWidget(spacerAct,btn);\n    }\n    if (toolBar->isHidden() && !bHideToolBar) {\n        toolBar->show();\n    }\n}\n\nvoid SplitActionToolBar::removeAction(QAction *action, bool split)\n{\n    QWidget *widget = m_actionWidgetMap.value(action);\n    if (widget) {\n        delete widget;\n    }\n    m_actionWidgetMap.remove(action);\n    if (split) {\n        dock2->removeAction(action);\n    } else {\n        dock1->removeAction(action);\n    }\n    if (dock1->actions().isEmpty() && dock2->actions().isEmpty()) {\n        toolBar->hide();\n    }\n}\n\nvoid SplitActionToolBar::setHideToolBar(bool b)\n{\n    bHideToolBar = b;\n    if (bHideToolBar) {\n        toolBar->hide();\n    } else {\n        if (!dock1->actions().isEmpty() || !dock2->actions().isEmpty()){\n            toolBar->show();\n        }\n    }\n}\n\nvoid SplitActionToolBar::dock1Visible(bool b)\n{\n    QAction *action = dock1->checkedAction();\n    if (action) {\n        action->setChecked(dock1->isVisible());\n    } else if (b && !dock1->actions().isEmpty()) {\n        dock1->actions().first()->setChecked(true);\n    }\n}\n\nvoid SplitActionToolBar::dock2Visible(bool b)\n{\n    QAction *action = dock2->checkedAction();\n    if (action) {\n        action->setChecked(dock2->isVisible());\n    } else if (b && !dock2->actions().isEmpty()) {\n        dock2->actions().first()->setChecked(true);\n    }\n}\n\n\nSplitWindowStyle::SplitWindowStyle(LiteApi::IApplication *app, QMainWindow *window, QObject *parent)\n    : IWindowStyle(parent), m_liteApp(app), m_mainWindow(window)\n{\n    QSize iconSize = LiteApi::getToolBarIconSize(app);\n    m_areaToolBar.insert(Qt::TopDockWidgetArea,new SplitActionToolBar(iconSize, m_mainWindow,Qt::TopDockWidgetArea));\n    m_areaToolBar.insert(Qt::BottomDockWidgetArea,new SplitActionToolBar(iconSize, m_mainWindow,Qt::BottomDockWidgetArea));\n    m_areaToolBar.insert(Qt::LeftDockWidgetArea,new SplitActionToolBar(iconSize, m_mainWindow,Qt::LeftDockWidgetArea));\n    m_areaToolBar.insert(Qt::RightDockWidgetArea,new SplitActionToolBar(iconSize, m_mainWindow,Qt::RightDockWidgetArea));\n\n    QMapIterator<Qt::DockWidgetArea,SplitActionToolBar*> it(m_areaToolBar);\n    while(it.hasNext()) {\n        it.next();\n        Qt::DockWidgetArea area = it.key();\n        SplitActionToolBar *actionToolBar = it.value();\n        m_mainWindow->addToolBar((Qt::ToolBarArea)area,actionToolBar->toolBar);\n        m_mainWindow->addDockWidget(area,actionToolBar->dock1);\n        m_mainWindow->addDockWidget(area,actionToolBar->dock2);\n        if (area == Qt::TopDockWidgetArea || area == Qt::BottomDockWidgetArea)\n            m_mainWindow->splitDockWidget(actionToolBar->dock1,actionToolBar->dock2,Qt::Horizontal);\n        else\n            m_mainWindow->splitDockWidget(actionToolBar->dock1,actionToolBar->dock2,Qt::Vertical);\n        connect(actionToolBar,SIGNAL(moveActionTo(Qt::DockWidgetArea, Qt::DockWidgetArea,QAction*,bool)),this,SLOT(moveToolWindow(Qt::DockWidgetArea, Qt::DockWidgetArea,QAction*,bool)));\n    }\n\n    m_mainWindow->setDockNestingEnabled(true);\n    m_mainWindow->setDockOptions(QMainWindow::AllowNestedDocks);\n\n    m_statusBar = new QStatusBar;\n\n    m_hideSideAct = new QAction(tr(\"Hide Sidebars\"),this);\n    m_hideSideAct->setIcon(QIcon(\"icon:images/hidesidebar.png\"));\n    m_hideSideAct->setCheckable(true);\n\n    QToolButton *btn = new QToolButton;\n    btn->setDefaultAction(m_hideSideAct);\n    btn->setStyleSheet(\"QToolButton {border:0}\"\n                       \"QToolButton:checked {background : qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(55, 57, 59, 255), stop:1 rgba(255, 255, 255, 255));}\");\n    m_statusBar->addWidget(btn);\n\n    m_statusBar->setContentsMargins(0,0,0,0);\n\n    SplitActionToolBar *bar = m_areaToolBar.value(Qt::BottomDockWidgetArea);\n    if (bar) {\n        m_statusBar->addWidget(bar->toolBar,1);\n    }\n\n    m_mainWindow->setStatusBar(m_statusBar);\n\n    m_windowMenu = 0;\n\n    connect(m_hideSideAct,SIGNAL(toggled(bool)),this,SLOT(hideSideBar(bool)));\n    m_useShortcuts = m_liteApp->settings()->value(LITEAPP_TOOLWINDOW_SHORTCUTS,true).toBool();\n}\n\nSplitWindowStyle::~SplitWindowStyle()\n{\n    qDeleteAll(m_actStateMap);\n}\n\nvoid SplitWindowStyle::createToolWindowMenu()\n{\n    QMenu *menu = m_liteApp->actionManager()->loadMenu(ID_MENU_VIEW);\n    if (menu) {\n        m_windowMenu = menu->addMenu(tr(\"Tool Windows\"));\n    }\n}\n\nvoid SplitWindowStyle::toggledAction(bool)\n{\n    QAction *action = static_cast<QAction*>(sender());\n    if (!action) {\n        return;\n    }\n    SplitActionState *state = m_actStateMap.value(action);\n    if (!state) {\n        return;\n    }\n    SplitDockWidget *dock = m_areaToolBar.value(state->area)->dock(state->split);\n    if (action->isChecked()) {\n        if (dock->isHidden()) {\n            dock->show();\n        }\n        dock->setWidget(state->widget);\n        if (!state->widgetList.isEmpty()) {\n            dock->setWidgetList(state->widgetList);\n        } else {\n            dock->setWidgetActions(state->widgetActions);\n        }\n        dock->setWindowTitle(state->title);\n        state->widget->setVisible(true);\n    } else {\n        if (!dock->checkedAction()) {\n            dock->hide();\n            state->widget->setVisible(false);\n        }\n    }\n}\n\nQAction *SplitWindowStyle::findToolWindow(QWidget *widget)\n{\n    QMapIterator<QAction*,SplitActionState*> it(m_actStateMap);\n    while (it.hasNext()) {\n        it.next();\n        if (it.value()->widget == widget) {\n            return it.key();\n        }\n    }\n    return NULL;\n}\n\nvoid SplitWindowStyle::removeToolWindow(QAction *action)\n{\n    SplitActionState *state = m_actStateMap.value(action);\n    if (!state) {\n        return;\n    }\n    if (action->isChecked()) {\n        action->setChecked(false);\n    }\n    SplitActionToolBar *actToolBar = m_areaToolBar.value(state->area);\n    if (actToolBar) {\n        actToolBar->removeAction(action,state->split);\n    }\n}\n\nQAction *SplitWindowStyle::addToolWindow(LiteApi::IApplication *app,Qt::DockWidgetArea area, QWidget *widget, const QString &id, const QString &title, bool split, QList<QAction*> widgetActions, QList<QWidget*> widgetList)\n{\n//    QMap<QString,SplitInitToolSate>::iterator it = m_initIdStateMap.find(id);\n//    if (it != m_initIdStateMap.end()) {\n//        area = it.value().area;\n//        split = it.value().split;\n//    }\n    area = (Qt::DockWidgetArea)m_liteApp->settings()->value(\"split_area/\"+id,area).toInt();\n    split = m_liteApp->settings()->value(\"split_split/\"+id,split).toBool();\n\n\n    SplitActionToolBar *actToolBar = m_areaToolBar.value(area);\n    QAction *action = new QAction(this);\n    action->setText(title);\n    action->setCheckable(true);\n    action->setObjectName(id);\n\n    SplitActionState *state = new SplitActionState;\n    state->area = area;\n    state->split = split;\n    state->widget = widget;\n    state->widgetList = widgetList;\n    state->widgetActions = widgetActions;\n    state->id = id;\n    state->title = title;\n\n    actToolBar->addAction(action,title,split);\n\n    action->setText(title);\n    int index = m_actStateMap.size();\n    if ((index <= 9) && m_useShortcuts) {\n        action->setText(QString(\"%1: %2\").arg(index).arg(title));\n        QKeySequence ks(LiteApi::UseMacShortcuts?QString(\"Ctrl+Alt+%1\").arg(index):QString(\"Alt+%1\").arg(index));\n        LiteApi::IActionContext *actionContext = app->actionManager()->getActionContext(app,\"App\");\n        actionContext->regAction(action,\"ToolWindow_\"+id,ks.toString());\n    }\n    m_actStateMap.insert(action,state);    \n\n    connect(action,SIGNAL(toggled(bool)),this,SLOT(toggledAction(bool)));\n    if (m_windowMenu) {\n        m_windowMenu->addAction(action);\n    }\n    return action;\n}\n\nvoid SplitWindowStyle::moveToolWindow(Qt::DockWidgetArea from, Qt::DockWidgetArea to, QAction *action, bool split)\n{\n    SplitActionState *state = m_actStateMap.value(action);\n    if (!state) {\n        return;\n    }\n    if (state->area == to && state->split == split) {\n        return;\n    }\n    SplitActionToolBar *actionToolBar = m_areaToolBar.value(to);\n    SplitActionToolBar *oldActToolBar = m_areaToolBar.value(from);\n\n    if (action->isChecked()) {\n        action->setChecked(false);\n    }\n\n    oldActToolBar->removeAction(action,state->split);\n    actionToolBar->addAction(action,state->title,split);\n\n    state->area = to;\n    state->split = split;\n    action->setChecked(true);\n}\n\nvoid SplitWindowStyle::restoreToolWindows()\n{\n    foreach(QAction *action,m_hideActionList) {\n        action->setChecked(true);\n    }\n    m_hideActionList.clear();\n}\n\nvoid SplitWindowStyle::showOrHideToolWindow()\n{\n    bool hide = false;\n    foreach(QAction *action, m_actStateMap.keys()) {\n        if (action->isChecked()) {\n            hide = true;\n            break;\n        }\n    }\n    if (hide) {\n        hideAllToolWindows();\n    } else {\n        restoreToolWindows();\n    }\n}\n\nvoid SplitWindowStyle::hideAllToolWindows()\n{\n    m_hideActionList.clear();\n    foreach(QAction *action, m_actStateMap.keys()) {\n        if (action->isChecked()) {\n            m_hideActionList.append(action);\n            action->setChecked(false);\n        }\n    }\n}\n\nvoid SplitWindowStyle::hideOutputWindow()\n{\n    this->hideToolWindow(Qt::TopDockWidgetArea);\n    this->hideToolWindow(Qt::BottomDockWidgetArea);\n}\n\nvoid SplitWindowStyle::hideSideBar(bool b)\n{\n    QMapIterator<Qt::DockWidgetArea,SplitActionToolBar*> it(m_areaToolBar);\n    while (it.hasNext()) {\n        it.next();\n        if (it.key() != Qt::BottomDockWidgetArea) {\n            it.value()->setHideToolBar(b);\n        }\n    }\n}\n\nvoid SplitWindowStyle::saveToolState() const\n{\n    QMapIterator<QAction*,SplitActionState*> i(m_actStateMap);\n    while (i.hasNext()) {\n        i.next();\n        SplitActionState *state = i.value();\n        m_liteApp->settings()->setValue(\"split_area/\"+state->id,state->area);\n        m_liteApp->settings()->setValue(\"split_split/\"+state->id,state->split);\n        m_liteApp->settings()->setValue(\"split_check/\"+state->id,i.key()->isChecked());\n    }\n    m_liteApp->settings()->setValue(\"split_side_hide\",m_hideSideAct->isChecked());\n}\n\nvoid SplitWindowStyle::restoreToolsState()\n{\n    m_hideSideAct->setChecked(m_liteApp->settings()->value(\"split_side_hide\").toBool());\n}\n\nvoid SplitWindowStyle::updateConer()\n{\n    m_mainWindow->setCorner(Qt::BottomLeftCorner,Qt::LeftDockWidgetArea);\n    m_mainWindow->setCorner(Qt::BottomRightCorner,Qt::RightDockWidgetArea);\n}\n\nvoid SplitWindowStyle::hideToolWindow(Qt::DockWidgetArea area)\n{\n    SplitActionToolBar *bar = m_areaToolBar.value(area);\n    if (bar) {\n        bar->dock1->close();\n        bar->dock2->close();\n    }\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/splitwindowstyle.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: splitwindowstyle.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef SPLITWINDOWSSTYLE_H\n#define SPLITWINDOWSSTYLE_H\n\n#include \"windowstyle.h\"\n\n#include <QMap>\n#include <QPointer>\n#include <QAction>\n\nclass ActionGroup;\nclass QSplitter;\nclass RotationToolButton;\nclass SplitDockWidget;\n\nclass ActionGroup : public QObject\n{\n    Q_OBJECT\npublic:\n    ActionGroup(QObject *parent);\n    QList<QAction *> actions() const;\n    void addAction(QAction *act);\n    void removeAction(QAction *act);\n    QAction * checkedAction () const;\nprotected slots:\n    void actionChanged();\nprotected:\n    QList<QAction *> m_actions;\n    QPointer<QAction> current;\n};\n\nclass SplitActionToolBar : public QObject\n{\n    Q_OBJECT\npublic:\n    SplitActionToolBar(QSize iconSize, QWidget *parent, Qt::DockWidgetArea area);\n    SplitDockWidget *dock(bool split) const;\n    void addAction(QAction *action, const QString &title, bool split);\n    void removeAction(QAction *action, bool split);\n    void setHideToolBar(bool b);\nsignals:\n    void moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea,QAction*,bool);\nprotected slots:\n    void dock1Visible(bool);\n    void dock2Visible(bool);\npublic:\n    Qt::DockWidgetArea area;\n    QToolBar *toolBar;\n    QAction  *spacerAct;\n    SplitDockWidget *dock1;\n    SplitDockWidget *dock2;\n    QMap<QAction*,QWidget*> m_actionWidgetMap;\n    bool bHideToolBar;\n};\n\nstruct SplitActionState\n{\n    QWidget *widget;\n    QList<QWidget*> widgetList;\n    QList<QAction*> widgetActions;\n    Qt::DockWidgetArea area;\n    bool    split;\n    QString id;\n    QString  title;\n};\n\nclass SplitWindowStyle : public IWindowStyle\n{\n    Q_OBJECT\npublic:\n    SplitWindowStyle(LiteApi::IApplication *app, QMainWindow *window, QObject *parent = 0);\n    ~SplitWindowStyle();\n    virtual void createToolWindowMenu();\n    virtual QAction *addToolWindow(LiteApi::IApplication *app, Qt::DockWidgetArea area, QWidget *widget, const QString &id, const QString &title, bool split = false,\n                                   QList<QAction*> widgetActions = QList<QAction*>(),\n                                   QList<QWidget*> widgetList = QList<QWidget*>() );\n    virtual void removeToolWindow(QAction *action);\n    virtual QAction *findToolWindow(QWidget *wiget);\n    virtual void saveToolState() const;\n    virtual void restoreToolsState();\n    virtual void updateConer();\npublic slots:\n    void hideToolWindow(Qt::DockWidgetArea area = Qt::BottomDockWidgetArea);\n    void showOrHideToolWindow();\n    void hideAllToolWindows();\n    void hideOutputWindow();\n    void restoreToolWindows();\n    void hideSideBar(bool b);\n    void moveToolWindow(Qt::DockWidgetArea from, Qt::DockWidgetArea to, QAction *action,bool split = false);\nprotected slots:\n    void toggledAction(bool);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QMainWindow *m_mainWindow;\n    QMap<Qt::DockWidgetArea,SplitActionToolBar*> m_areaToolBar;\n    QMap<QAction*,SplitActionState*> m_actStateMap;\n    QStatusBar  *m_statusBar;\n    QAction     *m_hideSideAct;\n    QMenu       *m_windowMenu;\n    QList<QAction*> m_hideActionList;\n    bool  m_useShortcuts;\n};\n\n#endif // SPLITWINDOWSSTYLE_H\n"
  },
  {
    "path": "liteidex/src/liteapp/textbrowserhtmlwidget.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: textbrowserhtmlwidget.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"textbrowserhtmlwidget.h\"\n#include <QTextBrowser>\n#include <QScrollBar>\n#include <QFileInfo>\n#include <QFile>\n#include <QTextCursor>\n#include <QTextBlock>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nTextBrowserHtmlWidget::TextBrowserHtmlWidget(QObject *parent) :\n    IHtmlWidget(parent)\n{\n    m_widget = new QTextBrowser;\n    m_widget->setOpenLinks(false);\n    m_widget->setOpenExternalLinks(false);\n    connect(m_widget,SIGNAL(anchorClicked(QUrl)),this,SIGNAL(linkClicked(QUrl)));\n    connect(m_widget,SIGNAL(highlighted(QUrl)),this,SIGNAL(linkHovered(QUrl)));\n}\n\nQWidget *TextBrowserHtmlWidget::widget() const\n{\n    return m_widget;\n}\n\nQString TextBrowserHtmlWidget::className() const\n{\n    return QLatin1String(\"QTextBrowser\");\n}\n\nvoid TextBrowserHtmlWidget::setSearchPaths(const QStringList &paths)\n{\n    m_widget->setSearchPaths(paths);\n}\n\nvoid TextBrowserHtmlWidget::setHtml(const QString &html, const QUrl &url)\n{\n    m_widget->setHtml(html);\n    m_url = url;\n    if (!url.isEmpty()) {\n        QString file = url.toLocalFile();\n        if (!file.isEmpty()) {\n            QFileInfo info(file);\n            QStringList paths = m_widget->searchPaths();\n            paths.append(info.path());\n            paths.removeDuplicates();\n            m_widget->setSearchPaths(paths);\n        }\n    }\n    emit contentsSizeChanged();\n    emit loadFinished(true);\n}\n\nQUrl TextBrowserHtmlWidget::url() const\n{\n    return m_url;\n}\n\nvoid TextBrowserHtmlWidget::clear()\n{\n    m_widget->clear();\n}\n\nvoid TextBrowserHtmlWidget::scrollToAnchor(const QString &anchor)\n{\n    m_widget->scrollToAnchor(anchor);\n    emit anchorChanged(anchor);\n}\n\nvoid TextBrowserHtmlWidget::setScrollBarValue(Qt::Orientation orientation, int value)\n{\n    if (orientation == Qt::Horizontal) {\n        m_widget->horizontalScrollBar()->setValue(value);\n    } else {\n        m_widget->verticalScrollBar()->setValue(value);\n    }\n}\n\nint TextBrowserHtmlWidget::scrollBarValue(Qt::Orientation orientation) const\n{\n    if (orientation == Qt::Horizontal) {\n        return m_widget->horizontalScrollBar()->value();\n    }\n    return m_widget->verticalScrollBar()->value();\n}\n\nint TextBrowserHtmlWidget::scrollBarMinimum(Qt::Orientation orientation) const\n{\n    if (orientation == Qt::Horizontal) {\n        return m_widget->horizontalScrollBar()->minimum();\n    }\n    return m_widget->verticalScrollBar()->minimum();\n\n}\n\nint TextBrowserHtmlWidget::scrollBarMaximum(Qt::Orientation orientation) const\n{\n    if (orientation == Qt::Horizontal) {\n        return m_widget->horizontalScrollBar()->maximum();\n    }\n    return m_widget->verticalScrollBar()->maximum();\n}\n\nQString TextBrowserHtmlWidget::selectedText() const\n{\n    return m_widget->textCursor().selectedText();\n}\n\nbool TextBrowserHtmlWidget::findText(const QString &exp, QTextDocument::FindFlags options)\n{\n    QTextDocument *doc = m_widget->document();\n    if (!doc) {\n        return false;\n    }\n    QTextCursor cursor = m_widget->cursorForPosition(QPoint(0,0));\n    int from = cursor.position();\n    if (cursor.hasSelection()) {\n        if (options & QTextDocument::FindBackward) {\n            from = cursor.selectionStart();\n        } else {\n            from = cursor.selectionEnd();\n        }\n    }\n    QTextCursor find;\n    find = doc->find(exp,from,options);\n    if (!find.isNull()) {\n        m_widget->setTextCursor(find);\n        m_widget->ensureCursorVisible();\n        return true;\n    }\n    return false;\n}\n\n#ifndef QT_NO_PRINTER\nvoid TextBrowserHtmlWidget::print(QPrinter *printer)\n{\n    m_widget->print(printer);\n}\n#endif\n\nTextBrowserHtmlWidgetFactory::TextBrowserHtmlWidgetFactory(QObject *parent)\n    : IHtmlWidgetFactory(parent)\n{\n}\n\nQString TextBrowserHtmlWidgetFactory::className() const\n{\n    return \"QTextBrowser\";\n}\n\nIHtmlWidget *TextBrowserHtmlWidgetFactory::create(QObject *parent)\n{\n    return new TextBrowserHtmlWidget(parent);\n}\n\nIHtmlDocument *TextBrowserHtmlWidgetFactory::createDocument(QObject *parent)\n{\n    return new TextBrowserHtmlDocument(parent);\n}\n\n\nTextBrowserHtmlDocument::TextBrowserHtmlDocument(QObject *parent) :\n    IHtmlDocument(parent)\n{\n    m_doc = new QTextBrowser;\n    m_doc->setVisible(false);\n}\n\nTextBrowserHtmlDocument::~TextBrowserHtmlDocument()\n{\n    delete m_doc;\n}\n\nvoid TextBrowserHtmlDocument::setHtml(const QString &html, const QUrl &url)\n{\n    m_doc->setHtml(html);\n    if (!url.isEmpty()) {\n        QString file = url.toLocalFile();\n        if (!file.isEmpty()) {\n            QFileInfo info(file);\n            QStringList paths = m_doc->searchPaths();\n            paths.append(info.path());\n            paths.removeDuplicates();\n            m_doc->setSearchPaths(paths);\n        }\n    }\n    emit loadFinished(true);\n}\n\n#ifndef QT_NO_PRINTER\nvoid TextBrowserHtmlDocument::print(QPrinter *printer)\n{\n    m_doc->print(printer);\n}\n#endif\n\nQString TextBrowserHtmlDocument::toHtml() const\n{\n    return m_doc->toHtml();\n}\n\nQString TextBrowserHtmlDocument::toPlainText() const\n{\n    return m_doc->toPlainText();\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/textbrowserhtmlwidget.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: textbrowserhtmlwidget.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef TEXTBROWSERHTMLWIDGET_H\n#define TEXTBROWSERHTMLWIDGET_H\n\n#include \"liteapi/litehtml.h\"\n\nusing namespace LiteApi;\n\nclass QTextBrowser;\n\nclass TextBrowserHtmlWidget : public IHtmlWidget\n{\n    Q_OBJECT\npublic:\n    TextBrowserHtmlWidget(QObject *parent);\npublic:\n    virtual QWidget *widget() const;\n    virtual QString className() const;\n    virtual void setSearchPaths(const QStringList &paths);\n    virtual void setHtml(const QString &html, const QUrl &url);\n    virtual QUrl url() const;\n    virtual void clear();\n    virtual void scrollToAnchor(const QString &anchor);\n    virtual void setScrollBarValue(Qt::Orientation orientation, int value) ;\n    virtual int scrollBarValue(Qt::Orientation orientation) const;\n    virtual int scrollBarMinimum(Qt::Orientation orientation) const;\n    virtual int scrollBarMaximum(Qt::Orientation orientation) const;\n    virtual QString selectedText() const;\n    virtual bool findText(const QString & exp, QTextDocument::FindFlags options);\npublic slots:\n#ifndef QT_NO_PRINTER\n    virtual void print(QPrinter *printer);\n#endif\nprotected:\n    QTextBrowser *m_widget;\n    QUrl          m_url;\n};\n\nclass TextBrowserHtmlDocument : public IHtmlDocument\n{\n    Q_OBJECT\npublic:\n    TextBrowserHtmlDocument(QObject *parent);\n    virtual ~TextBrowserHtmlDocument();\npublic:\n    virtual void setHtml(const QString &html, const QUrl &url);\npublic slots:\n#ifndef QT_NO_PRINTER\n    virtual void print(QPrinter *printer);\n#endif\n    virtual QString\ttoHtml () const;\n    virtual QString\ttoPlainText () const;\nprotected:\n    QTextBrowser *m_doc;\n};\n\nclass TextBrowserHtmlWidgetFactory : public IHtmlWidgetFactory\n{\n    Q_OBJECT\npublic:\n    TextBrowserHtmlWidgetFactory(QObject *parent = 0);\n    virtual QString className() const;\n    virtual IHtmlWidget *create(QObject *parent);\n    virtual IHtmlDocument  *createDocument(QObject *parent);\n};\n\n#endif // TEXTBROWSERHTMLWIDGET_H\n"
  },
  {
    "path": "liteidex/src/liteapp/tooldockwidget.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: tooldockwidget.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"tooldockwidget.h\"\n#include \"liteapi/liteapi.h\"\n#include <QAction>\n#include <QIcon>\n#include <QLabel>\n#include <QHBoxLayout>\n#include <QHBoxLayout>\n#include <QVariant>\n#include <QMenu>\n#include <QToolButton>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nBaseDockWidget::BaseDockWidget(QSize iconSize, QWidget *parent) :\n    QDockWidget(parent), current(0)\n{\n    m_mainWidget = new QWidget;\n    m_widget = 0;\n    QDockWidget::setWidget(m_mainWidget);\n    m_mainLayout = new QVBoxLayout;\n    m_mainLayout->setMargin(0);\n    m_mainLayout->setSpacing(1);\n    m_mainWidget->setLayout(m_mainLayout);\n\n    m_comboBox = new QComboBox;\n    m_comboBox->setMinimumContentsLength(4);\n    //m_comboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);\n    m_comboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);\n    //m_comboBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);\n\n    m_toolBar = new QToolBar(this);\n    m_toolBar->setContentsMargins(0, 0, 0, 0);\n    m_toolBar->setIconSize(iconSize);\n    //m_toolBar->setFixedHeight(24);\n//    m_titleLabel = new QLabel;\n//    m_titleLabel->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum);\n    m_comboBoxAct = m_toolBar->addWidget(m_comboBox);\n//    m_titleLabelAct = m_toolBar->addWidget(m_titleLabel);\n//    m_titleLabelAct->setChecked(false);\n\n    m_spacer = new QWidget;\n    m_spacer->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);\n    m_toolBar->addSeparator();\n    m_spacerAct = m_toolBar->addWidget(m_spacer);\n\n    m_closeAct = new QAction(tr(\"Hide\"), m_toolBar);\n    m_closeAct->setToolTip(tr(\"Hide Tool Window\"));\n    m_closeAct->setIcon(QIcon(\"icon:images/hidetool.png\"));\n    m_toolBar->addAction(m_closeAct);\n\n    connect(m_closeAct,SIGNAL(triggered()),this,SLOT(close()));\n    connect(m_comboBox,SIGNAL(activated(int)),this,SLOT(activeComboBoxIndex(int)));\n\n    this->setTitleBarWidget(m_toolBar);\n\n    m_floatAct = new QAction(tr(\"Floating Window\"),this);\n    m_floatAct->setCheckable(true);\n    connect(m_floatAct,SIGNAL(triggered(bool)),this,SLOT(setFloatingWindow(bool)));\n    connect(this,SIGNAL(topLevelChanged(bool)),this,SLOT(topLevelChanged(bool)));\n    /*\n    m_toolBar->setStyleSheet(\"QToolBar {border: 1px ; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #eeeeee, stop: 1 #ababab); }\"\\\n                             \"QToolBar QToolButton { border:1px ; border-radius: 1px; }\"\\\n                             \"QToolBar QToolButton::hover { background-color: #ababab;}\"\\\n                             \"QToolBar::separator {width:2px; margin-left:2px; margin-right:2px; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #dedede, stop: 1 #a0a0a0);}\");\n*/\n}\n\nvoid BaseDockWidget::setWindowTitle(const QString &text)\n{\n    QDockWidget::setWindowTitle(text);\n}\n\nQAction *BaseDockWidget::addWidget(QWidget *widget)\n{\n   return m_toolBar->insertWidget(m_closeAct,widget);\n}\n\nvoid BaseDockWidget::setToolMenu(QMenu *menu)\n{\n    QToolButton *btn = new QToolButton;\n    btn->setPopupMode(QToolButton::InstantPopup);\n    btn->setMenu(menu);\n    btn->setStyleSheet(\"QToolButton::menu-indicator{image:none;}\");\n\n    m_toolBar->insertWidget(m_closeAct,btn);\n}\n\nvoid BaseDockWidget::setWidgetActions(QList<QAction*> actions)\n{\n    foreach(QAction *action, m_widgetActions) {\n        m_toolBar->removeAction(action);\n    }\n    m_widgetActions = actions;\n    //m_spacerAct->setVisible(!m_widgetActions.isEmpty());\n    foreach(QAction *action, m_widgetActions) {\n        m_toolBar->insertAction(m_spacerAct,action);\n        if (action->menu()) {\n            QWidget *w = m_toolBar->widgetForAction(action);\n            QToolButton *btn = qobject_cast<QToolButton*>(w);\n            if (btn) {\n                btn->setPopupMode(QToolButton::InstantPopup);\n                btn->setStyleSheet(\"QToolButton::menu-indicator{image:none;}\");\n            }\n        }\n    }\n}\n\nvoid BaseDockWidget::setWidgetList(QList<QWidget *> widgets)\n{\n    foreach(QAction *action, m_widgetActions) {\n        m_toolBar->removeAction(action);\n    }\n    m_widgetActions.clear();\n    m_widgetList = widgets;\n    //m_spacerAct->setVisible(!m_widgetActions.isEmpty());\n    foreach(QWidget *widget, m_widgetList) {\n        QAction *action = m_toolBar->insertWidget(m_spacerAct,widget);\n        m_widgetActions.push_back(action);\n        if (action->menu()) {\n            QWidget *w = m_toolBar->widgetForAction(action);\n            QToolButton *btn = qobject_cast<QToolButton*>(w);\n            if (btn) {\n                btn->setPopupMode(QToolButton::InstantPopup);\n                btn->setStyleSheet(\"QToolButton::menu-indicator{image:none;}\");\n            }\n        }\n    }\n}\n\nQList<QAction *> BaseDockWidget::actions() const\n{\n    return m_actions;\n}\n\nvoid BaseDockWidget::removeAction(QAction *action)\n{\n    if (m_actions.removeAll(action)) {\n        if (action == current)\n            current = 0;\n        int index = m_comboBox->findData(action->objectName());\n        if (index >= 0) {\n            m_comboBox->removeItem(index);\n        }\n        QObject::disconnect(action, SIGNAL(changed()), this, SLOT(actionChanged()));\n    }\n}\n\nvoid BaseDockWidget::setWidget(QWidget *widget)\n{\n    if (m_widget) {\n        m_mainLayout->removeWidget(m_widget);\n    }\n    m_widget = widget;\n    if (m_widget) {\n        m_mainLayout->addWidget(m_widget);\n    }\n}\n\nQWidget *BaseDockWidget::widget() const\n{\n    return m_widget;\n}\n\nQAction * BaseDockWidget::checkedAction () const\n{\n    return current;\n}\n\nvoid BaseDockWidget::actionChanged()\n{\n    QAction *action = qobject_cast<QAction*>(sender());\n    Q_ASSERT_X(action != 0, \"ActionGroup::actionChanged\", \"internal error\");\n    if (action->isChecked()) {\n        if (action != current) {\n            if(current)\n                current->setChecked(false);\n            current = action;\n            int index = m_comboBox->findData(action->objectName());\n            if (index >= 0) {\n                m_comboBox->setCurrentIndex(index);\n                //m_titleLabel->setText(m_comboBox->currentText());\n            }\n        }\n    } else if (action == current) {\n        current = 0;\n    }\n}\n\nvoid BaseDockWidget::activeComboBoxIndex(int index)\n{\n    if (index < 0 || index >= m_comboBox->count()) {\n        return;\n    }\n    QString objName = m_comboBox->itemData(index).toString();\n    foreach(QAction *act, m_actions) {\n        if (act->objectName() == objName) {\n            if (!act->isChecked()) {\n                act->setChecked(true);\n            }\n            break;\n        }\n    }\n}\n\nvoid BaseDockWidget::topLevelChanged(bool b)\n{\n   // m_comboBoxAct->setVisible(!b);\n//    m_titleLabel->setText(m_comboBox->currentText());\n//    m_titleLabelAct->setVisible(b);\n    m_closeAct->setVisible(!b);\n    DockWidgetFeatures flags = this->features();\n    if (b) {\n        this->setTitleBarWidget(0);\n        m_mainLayout->insertWidget(0,m_toolBar);\n        m_mainLayout->setMargin(2);\n        m_toolBar->setVisible(true);\n        flags |= QDockWidget::DockWidgetFloatable;\n    } else {\n        m_mainLayout->setMargin(0);\n        m_toolBar->setVisible(false);\n        m_mainLayout->removeWidget(m_toolBar);\n        this->setTitleBarWidget(m_toolBar);\n        flags &= (~QDockWidget::DockWidgetFloatable);\n    }\n    this->setFeatures(flags);\n    m_floatAct->setChecked(b);\n}\n\nvoid BaseDockWidget::setFloatingWindow(bool b)\n{\n    if (this->isFloating() != b) {\n        DockWidgetFeatures flags = this->features();\n        if (b) {\n            flags |= QDockWidget::DockWidgetFloatable;\n        } else {\n            flags &= (~QDockWidget::DockWidgetFloatable);\n        }\n        this->setFeatures(flags);\n        this->setFloating(b);\n    }\n    if (m_floatAct->isChecked() != b) {\n        m_floatAct->setChecked(b);\n    }\n}\n\nvoid BaseDockWidget::addAction(QAction *action, const QString &title)\n{\n    if(!m_actions.contains(action)) {\n        m_actions.append(action);\n        m_comboBox->addItem(title,action->objectName());\n        QObject::connect(action, SIGNAL(changed()), this, SLOT(actionChanged()));\n    }\n    if (current && current->isChecked()) {\n        current->setChecked(false);\n    }\n    if (action->isChecked()) {\n        current = action;\n    }\n}\n\nSplitDockWidget::SplitDockWidget(QSize iconSize, QWidget *parent) :\n    BaseDockWidget(iconSize,parent)\n{\n}\n\nvoid SplitDockWidget::createMenu(Qt::DockWidgetArea area, bool split)\n{\n    m_area = area;\n    QMenu *moveMenu = new QMenu(tr(\"Move To\"),this);\n    if (area != Qt::TopDockWidgetArea) {\n        QAction *act = new QAction(tr(\"Top\"),this);\n        act->setData(Qt::TopDockWidgetArea);\n        moveMenu->addAction(act);\n        connect(act,SIGNAL(triggered()),this,SLOT(moveAction()));\n        QAction *act1 = new QAction(tr(\"Top (Split)\"),this);\n        act1->setData(Qt::TopDockWidgetArea);\n        moveMenu->addAction(act1);\n        connect(act1,SIGNAL(triggered()),this,SLOT(moveActionSplit()));\n    }\n    if (area != Qt::BottomDockWidgetArea) {\n        QAction *act = new QAction(tr(\"Bottom\"),this);\n        act->setData(Qt::BottomDockWidgetArea);\n        moveMenu->addAction(act);\n        connect(act,SIGNAL(triggered()),this,SLOT(moveAction()));\n        QAction *act1 = new QAction(tr(\"Bottom (Split)\"),this);\n        act1->setData(Qt::BottomDockWidgetArea);\n        moveMenu->addAction(act1);\n        connect(act1,SIGNAL(triggered()),this,SLOT(moveActionSplit()));\n    }\n    if (area != Qt::LeftDockWidgetArea) {\n        QAction *act = new QAction(tr(\"Left\"),this);\n        act->setData(Qt::LeftDockWidgetArea);\n        moveMenu->addAction(act);\n        connect(act,SIGNAL(triggered()),this,SLOT(moveAction()));\n        QAction *act1 = new QAction(tr(\"Left (Split)\"),this);\n        act1->setData(Qt::LeftDockWidgetArea);\n        moveMenu->addAction(act1);\n        connect(act1,SIGNAL(triggered()),this,SLOT(moveActionSplit()));\n    }\n    if (area != Qt::RightDockWidgetArea) {\n        QAction *act = new QAction(tr(\"Right\"),this);\n        act->setData(Qt::RightDockWidgetArea);\n        moveMenu->addAction(act);\n        connect(act,SIGNAL(triggered()),this,SLOT(moveAction()));\n        QAction *act1 = new QAction(tr(\"Right (Split)\"),this);\n        act1->setData(Qt::RightDockWidgetArea);\n        moveMenu->addAction(act1);\n        connect(act1,SIGNAL(triggered()),this,SLOT(moveActionSplit()));\n    }\n\n    if (area == Qt::TopDockWidgetArea) {\n        m_areaInfo = split ? tr(\"TopDockWidget (Split)\") : tr(\"TopDockWidget\");\n    } else if (area == Qt::BottomDockWidgetArea) {\n        m_areaInfo = split ? tr(\"BottomDockWidget (Split)\") : tr(\"BottomDockWidget\");\n    } else if (area == Qt::LeftDockWidgetArea) {\n        m_areaInfo = split ? tr(\"LeftDockWidget (Split)\") : tr(\"LeftDockWidget\");\n    } else if (area == Qt::RightDockWidgetArea) {\n        m_areaInfo = split ? tr(\"RightDockWidget (Split)\") : tr(\"RightDockWidget\");\n    }\n\n    QMenu *menu = new QMenu(this);\n    menu->addAction(m_floatAct);\n    if (split) {\n        QAction *unsplitAct = new QAction(tr(\"Unsplit\"),this);\n        unsplitAct->setData(area);\n        connect(unsplitAct,SIGNAL(triggered()),this,SLOT(unsplitAction()));\n        menu->addAction(unsplitAct);\n    } else {\n        QAction *splitAct = new QAction(tr(\"Split\"),this);\n        splitAct->setData(area);\n        connect(splitAct,SIGNAL(triggered()),this,SLOT(splitAction()));\n        menu->addAction(splitAct);\n    }\n    menu->addAction(moveMenu->menuAction());\n\n    if (area == Qt::BottomDockWidgetArea || area == Qt::TopDockWidgetArea) {\n        m_comboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);\n        m_comboBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);\n        QWidget *spacer = new QWidget;\n        spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);\n        m_toolBar->insertWidget(m_closeAct,spacer);\n    }\n\n    QToolButton *btn = new QToolButton(m_toolBar);\n    btn->setPopupMode(QToolButton::InstantPopup);\n    btn->setIcon(QIcon(\"icon:images/movemenu.png\"));\n    btn->setMenu(menu);\n    btn->setText(tr(\"Move To\"));\n    btn->setToolTip(tr(\"Move To\"));\n    btn->setStyleSheet(\"QToolButton::menu-indicator {image: none;}\");\n    m_toolBar->insertWidget(m_closeAct,btn);\n}\n\nvoid SplitDockWidget::setWindowTitle(const QString &text)\n{\n    BaseDockWidget::setWindowTitle(m_areaInfo+\"  -  \"+text);\n}\n\nvoid SplitDockWidget::moveAction()\n{\n    QAction *action = static_cast<QAction*>(sender());\n    if (!action) {\n        return;\n    }\n    Qt::DockWidgetArea area = (Qt::DockWidgetArea)action->data().toInt();\n    emit moveActionTo(m_area,area,current,false);\n}\n\nvoid SplitDockWidget::moveActionSplit()\n{\n    QAction *action = static_cast<QAction*>(sender());\n    if (!action) {\n        return;\n    }\n    Qt::DockWidgetArea area = (Qt::DockWidgetArea)action->data().toInt();\n    emit moveActionTo(m_area,area,current,true);\n}\n\nvoid SplitDockWidget::splitAction()\n{\n    QAction *action = static_cast<QAction*>(sender());\n    if (!action) {\n        return;\n    }\n    Qt::DockWidgetArea area = (Qt::DockWidgetArea)action->data().toInt();\n    emit moveActionTo(m_area,area,current,true);\n}\n\nvoid SplitDockWidget::unsplitAction()\n{\n    QAction *action = static_cast<QAction*>(sender());\n    if (!action) {\n        return;\n    }\n    Qt::DockWidgetArea area = (Qt::DockWidgetArea)action->data().toInt();\n    emit moveActionTo(m_area,area,current,false);\n}\n\n\nOutputDockWidget::OutputDockWidget(QSize iconSize, QWidget *parent) :\n    BaseDockWidget(iconSize,parent)\n{\n    m_comboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);\n    m_comboBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);\n    QWidget *spacer = new QWidget;\n    spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);\n    m_toolBar->insertWidget(m_closeAct,spacer);\n}\n\nvoid OutputDockWidget::createMenu(Qt::DockWidgetArea area)\n{    \n    this->setAllowedAreas(area);\n    QMenu *moveMenu = new QMenu(tr(\"Move To\"),this);\n\n    QAction *leftAct = new QAction(tr(\"LeftSideBar\"),this);\n    QAction *rightAct = new QAction(tr(\"RightSideBar\"),this);\n\n    leftAct->setData(Qt::LeftDockWidgetArea);\n    rightAct->setData(Qt::RightDockWidgetArea);\n\n    moveMenu->addAction(leftAct);\n    moveMenu->addAction(rightAct);\n\n    connect(leftAct,SIGNAL(triggered()),this,SLOT(moveAction()));\n    connect(rightAct,SIGNAL(triggered()),this,SLOT(moveAction()));\n\n    QMenu *menu = new QMenu(this);\n    menu->addAction(m_floatAct);\n    menu->addAction(moveMenu->menuAction());\n\n    m_comboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);\n    m_comboBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);\n    QWidget *spacer = new QWidget;\n    spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);\n    m_toolBar->insertWidget(m_closeAct,spacer);\n\n    QToolButton *btn = new QToolButton(m_toolBar);\n    btn->setPopupMode(QToolButton::InstantPopup);\n    btn->setIcon(QIcon(\"icon:images/movemenu.png\"));\n    btn->setMenu(menu);\n    btn->setText(tr(\"Move To\"));\n    btn->setToolTip(tr(\"Move To\"));\n    btn->setStyleSheet(\"QToolButton::menu-indicator {image: none;}\");\n    m_toolBar->insertWidget(m_closeAct,btn);\n}\n\nvoid OutputDockWidget::setWindowTitle(const QString &text)\n{\n    BaseDockWidget::setWindowTitle(QString(tr(\"BottomDockWidget\"))+\"  -  \"+text);\n}\n\nvoid OutputDockWidget::setWidget(QWidget *widget)\n{\n    if (m_widget) {\n        m_mainLayout->removeWidget(m_widget);\n        m_widget->setVisible(false);\n    }\n    m_widget = widget;\n    if (m_widget) {\n        m_mainLayout->addWidget(m_widget);\n        m_widget->setVisible(true);\n    }\n}\n\nvoid OutputDockWidget::moveAction()\n{\n    QAction *action = static_cast<QAction*>(sender());\n    if (!action) {\n        return;\n    }\n    this->setFloatingWindow(false);\n    Qt::DockWidgetArea area = (Qt::DockWidgetArea)action->data().toInt();\n    emit moveActionTo(Qt::BottomDockWidgetArea,area,current);\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/tooldockwidget.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: tooldockwidget.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef TOOLDOCKWIDGET_H\n#define TOOLDOCKWIDGET_H\n\n#include <QDockWidget>\n#include <QToolBar>\n#include <QComboBox>\n#include <QLabel>\n#include <QPointer>\n#include <QAction>\n\nclass QVBoxLayout;\nclass BaseDockWidget : public QDockWidget\n{\n    Q_OBJECT\npublic:\n    explicit BaseDockWidget(QSize iconSize, QWidget *parent = 0);\n    virtual QAction *addWidget(QWidget *widget);\n    virtual void setWindowTitle(const QString &text);\n    virtual QList<QAction *> actions() const;\n    virtual QAction * checkedAction() const;\n    virtual void setToolMenu(QMenu *menu);\n    virtual void setWidgetActions(QList<QAction*> actions);\n    virtual void setWidgetList(QList<QWidget*> widgets);\n    virtual void addAction(QAction *act, const QString &title);\n    virtual void removeAction(QAction *act);\n    virtual void setWidget(QWidget *widget);\n    virtual QWidget *widget() const;\n    int currentIndex() const {\n        return m_comboBox->currentIndex();\n    }\nprotected slots:\n    virtual void actionChanged();\n    virtual void activeComboBoxIndex(int);\n    virtual void topLevelChanged(bool);\n    void  setFloatingWindow(bool b);\nprotected:\n    QToolBar *m_toolBar;\n    QWidget  *m_widget;\n    QWidget  *m_mainWidget;\n    QVBoxLayout *m_mainLayout;\n    //QLabel   *m_titleLabel;\n    QComboBox *m_comboBox;\n    QAction *m_comboBoxAct;\n    //QAction *m_titleLabelAct;\n    QWidget  *m_spacer;\n    QAction  *m_spacerAct;\n    QAction  *m_closeAct;\n    QAction  *m_floatAct;\n    QMap<QString,QAction*> m_idActionMap;\n    QList<QAction*> m_widgetActions;\n    QList<QWidget*> m_widgetList;\n    QList<QAction*> m_actions;\n    QPointer<QAction> current;\n};\n\nclass SplitDockWidget : public BaseDockWidget\n{\n    Q_OBJECT\npublic:\n    explicit SplitDockWidget(QSize iconSize, QWidget *parent = 0);\n    void createMenu(Qt::DockWidgetArea area, bool split);\n    void setWindowTitle(const QString &text);\nsignals:\n    void moveActionTo(Qt::DockWidgetArea, Qt::DockWidgetArea, QAction*, bool);\nprotected slots:\n    void moveAction();\n    void splitAction();\n    void unsplitAction();\n    void moveActionSplit();\nprotected:\n    Qt::DockWidgetArea m_area;\n    QString m_areaInfo;\n};\n\nclass OutputDockWidget : public BaseDockWidget\n{\n    Q_OBJECT\npublic:\n    explicit OutputDockWidget(QSize iconSize, QWidget *parent = 0);\n    void createMenu(Qt::DockWidgetArea area);\n    virtual void setWindowTitle(const QString &text);\n    virtual void setWidget(QWidget *widget);\nsignals:\n    void moveActionTo(Qt::DockWidgetArea,Qt::DockWidgetArea, QAction*);\nprotected slots:\n    void moveAction();\n};\n\n#endif // TOOLDOCKWIDGET_H\n"
  },
  {
    "path": "liteidex/src/liteapp/toolmainwindow.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: toolmainwindow.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"toolmainwindow.h\"\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nToolMainWindow::ToolMainWindow(QWidget *parent)\n    : QMainWindow(parent), m_windowStyle(0)\n{\n\n}\n\nToolMainWindow::~ToolMainWindow()\n{\n    if (m_windowStyle) {\n        delete m_windowStyle;\n    }\n}\n\nvoid ToolMainWindow::setWindowStyle(IWindowStyle *style)\n{\n    m_windowStyle = style;\n}\n\nvoid ToolMainWindow::createToolWindowMenu()\n{\n    m_windowStyle->createToolWindowMenu();\n}\n\nQAction *ToolMainWindow::findToolWindow(QWidget *widget)\n{\n    return m_windowStyle->findToolWindow(widget);\n}\n\nQByteArray ToolMainWindow::saveState(int version) const\n{\n    m_windowStyle->saveToolState();\n    return QMainWindow::saveState(version);\n}\n\nbool ToolMainWindow::restoreState(const QByteArray &state, int version)\n{\n    bool b = QMainWindow::restoreState(state,version);\n    m_windowStyle->restoreToolsState();\n    return b;\n}\n\nvoid ToolMainWindow::updateConer()\n{\n    m_windowStyle->updateConer();\n}\n\nvoid ToolMainWindow::removeToolWindow(QAction *action)\n{\n    m_windowStyle->removeToolWindow(action);\n}\n\nQAction *ToolMainWindow::addToolWindow(LiteApi::IApplication *app, Qt::DockWidgetArea area, QWidget *widget, const QString &id, const QString &title, bool split, QList<QAction*> widgetActions, QList<QWidget *> widgetList)\n{\n    return m_windowStyle->addToolWindow(app,area,widget,id,title,split,widgetActions,widgetList);\n}\n\nvoid ToolMainWindow::moveToolWindow(Qt::DockWidgetArea from, Qt::DockWidgetArea to, QAction *action, bool split)\n{\n    m_windowStyle->moveToolWindow(from,to,action,split);\n}\n\nvoid ToolMainWindow::showOrHideToolWindow()\n{\n    m_windowStyle->showOrHideToolWindow();\n}\n\nvoid ToolMainWindow::hideOutputWindow()\n{\n    m_windowStyle->hideOutputWindow();\n}\n\nvoid ToolMainWindow::hideAllToolWindows()\n{\n    m_windowStyle->hideAllToolWindows();\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/toolmainwindow.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: toolmainwindow.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef TOOLMAINWINDOW_H\n#define TOOLMAINWINDOW_H\n\n#include \"liteapi/liteapi.h\"\n#include \"windowstyle.h\"\n\nclass ToolMainWindow : public QMainWindow\n{\n    Q_OBJECT    \npublic:\n    ToolMainWindow(QWidget *parent = 0);\n    ~ToolMainWindow();\n    void setWindowStyle(IWindowStyle *style);\n    void createToolWindowMenu();\n    QAction *addToolWindow(LiteApi::IApplication *app, Qt::DockWidgetArea area, QWidget *widget, const QString &id, const QString &title,\n                           bool split = false,\n                           QList<QAction*> widgetActions = QList<QAction*>(),\n                           QList<QWidget*> widgetList = QList<QWidget*>());\n    void removeToolWindow(QAction *action);\n    QAction *findToolWindow(QWidget *wiget);\n    QByteArray saveState(int version = 0) const;\n    bool restoreState(const QByteArray &state, int version = 0);\n    void updateConer();\npublic slots:\n    void showOrHideToolWindow();\n    void hideOutputWindow();\n    void hideAllToolWindows();\n    void moveToolWindow(Qt::DockWidgetArea from, Qt::DockWidgetArea to, QAction *action,bool split = false);\nprotected:\n    IWindowStyle *m_windowStyle;\n};\n\n#endif // TOOLMAINWINDOW_H\n"
  },
  {
    "path": "liteidex/src/liteapp/toolwindowmanager.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: toolwindowmanager.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"toolwindowmanager.h\"\n#include \"toolmainwindow.h\"\n#include \"liteapp_global.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nQAction *ToolWindowManager::addToolWindow(Qt::DockWidgetArea area, QWidget *widget, const QString &id, const QString &title, bool split, QList<QAction*> widgetActions, QList<QWidget *> widgetList)\n{\n    return ((ToolMainWindow*)m_liteApp->mainWindow())->addToolWindow(m_liteApp,area,widget,id,title,split,widgetActions,widgetList);\n}\n\nvoid ToolWindowManager::moveToolWindow(Qt::DockWidgetArea from, Qt::DockWidgetArea to, QAction *action, bool split)\n{\n    ((ToolMainWindow*)m_liteApp->mainWindow())->moveToolWindow(from,to,action,split);\n}\n\nQAction *ToolWindowManager::findToolWindow(QWidget *widget)\n{\n    return ((ToolMainWindow*)m_liteApp->mainWindow())->findToolWindow(widget);\n}\n\nvoid ToolWindowManager::removeToolWindow(QAction *action)\n{\n    ((ToolMainWindow*)m_liteApp->mainWindow())->removeToolWindow(action);\n}\n\nvoid ToolWindowManager::removeToolWindow(QWidget *widget)\n{\n    QAction *act = this->findToolWindow(widget);\n    if (act) {\n        this->removeToolWindow(act);\n    }\n}\n"
  },
  {
    "path": "liteidex/src/liteapp/toolwindowmanager.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: toolwindowmanager.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef TOOLWINDOWMANAGER_H\n#define TOOLWINDOWMANAGER_H\n\n#include \"liteapi/liteapi.h\"\n\nusing namespace LiteApi;\n\nclass ToolWindowManager : public IToolWindowManager\n{\npublic:\n    virtual QAction *addToolWindow(Qt::DockWidgetArea area, QWidget *widget, const QString &id, const QString &title, bool split,\n                                   QList<QAction*> widgetActions = QList<QAction*>(),\n                                   QList<QWidget*> widgetList = QList<QWidget*>());\n    virtual void moveToolWindow(Qt::DockWidgetArea from, Qt::DockWidgetArea to,QAction *action, bool split);\n    virtual QAction *findToolWindow(QWidget *widget);\n    virtual void removeToolWindow(QAction *action);\n    virtual void removeToolWindow(QWidget *widget);\n};\n\n#endif // TOOLWINDOWMANAGER_H\n"
  },
  {
    "path": "liteidex/src/liteapp/windowstyle.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: windowstyle.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef WINDOWSTYLE_H\n#define WINDOWSTYLE_H\n\n#include <liteapi/liteapi.h>\n\nclass IWindowStyle : public QObject\n{\n    Q_OBJECT\npublic:\n    IWindowStyle(QObject *parent) : QObject(parent) {}\n    virtual void createToolWindowMenu() = 0;\n    virtual QAction *addToolWindow(LiteApi::IApplication *app, Qt::DockWidgetArea area, QWidget *widget, const QString &id, const QString &title,\n                                   bool split = false,\n                                   QList<QAction*> widgetActions = QList<QAction*>(),\n                                   QList<QWidget*> widgetList = QList<QWidget*>()) = 0;\n    virtual void removeToolWindow(QAction *action) = 0;\n    virtual QAction *findToolWindow(QWidget *wiget) = 0;\n    virtual void moveToolWindow(Qt::DockWidgetArea from, Qt::DockWidgetArea to,QAction *action,bool split) = 0;\n    virtual void saveToolState() const = 0;\n    virtual void restoreToolsState() = 0;\n    virtual void updateConer() = 0;\npublic slots:\n    virtual void hideOutputWindow() = 0;\n    virtual void showOrHideToolWindow() = 0;\n    virtual void hideAllToolWindows() = 0;\n};\n\n#endif // WINDOWSTYLE_H\n"
  },
  {
    "path": "liteidex/src/liteide/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>NSPrincipalClass</key>\n\t\t<string>NSApplication</string>\n\t<key>NSHighResolutionCapable</key>\n\t\t<string>True</string>\n\t<key>NSHumanReadableCopyright</key>\n\t\t<string>Copyright © 2011-2025 visualfc. All rights reserved.</string>\n\t<key>CFBundleIconFile</key>\n\t\t<string>liteide.icns</string>\n\t<key>CFBundlePackageType</key>\n\t\t<string>APPL</string>\n\t<key>CFBundleSignature</key>\n\t\t<string>????</string>\n\t<key>CFBundleExecutable</key>\n\t\t<string>LiteIDE</string>\n\t<key>CFBundleIdentifier</key>\n\t\t<string>com.visualfc.liteide</string>\n\t<key>CFBundleVersion</key>\n\t\t<string>X38</string>\n\t<key>CFBundleShortVersionString</key>\n\t\t<string>38.4</string>\n        <key>CFBundleDocumentTypes</key>\n        <array>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>h</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>c.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>C header file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>c</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>c.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>C source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>gitattributes</string>\n                            <string>gitconfig</string>\n                            <string>gitignore</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>config.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Git configuration file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>asp</string>\n                            <string>aspx</string>\n                            <string>cshtml</string>\n                            <string>jshtm</string>\n                            <string>jsp</string>\n                            <string>phtml</string>\n                            <string>shtml</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>html.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>HTML template document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>bat</string>\n                            <string>cmd</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>bat.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Windows command script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>bowerrc</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Bower.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Bower document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>config</string>\n                            <string>editorconfig</string>\n                            <string>ini</string>\n                            <string>cfg</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>config.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Configuration file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>hh</string>\n                            <string>hpp</string>\n                            <string>hxx</string>\n                            <string>h++</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>cpp.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>C++ header file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>cc</string>\n                            <string>cpp</string>\n                            <string>cxx</string>\n                            <string>c++</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>cpp.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>C++ source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>m</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Objective-C source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>mm</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>cpp.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Objective-C++ source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>cs</string>\n                            <string>csx</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>csharp.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>C# source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>css</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>css.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>CSS</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>go</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>go.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Go source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>htm</string>\n                            <string>html</string>\n                            <string>xhtml</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>HTML.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>HTML document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>jade</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Jade.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Jade document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>jav</string>\n                            <string>java</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Java.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Java document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>js</string>\n                            <string>jscsrc</string>\n                            <string>jshintrc</string>\n                            <string>mjs</string>\n                            <string>cjs</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Javascript.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Javascript file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>json</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>JSON.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>JSON document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>less</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Less.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Less document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>markdown</string>\n                            <string>md</string>\n                            <string>mdoc</string>\n                            <string>mdown</string>\n                            <string>mdtext</string>\n                            <string>mdtxt</string>\n                            <string>mdwn</string>\n                            <string>mkd</string>\n                            <string>mkdn</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Markdown.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Markdown document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>php</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>PHP.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>PHP source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>ps1</string>\n                            <string>psd1</string>\n                            <string>psm1</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Powershell.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Powershell script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>py</string>\n                            <string>pyi</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Python.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Python script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>gemspec</string>\n                            <string>rb</string>\n                            <string>erb</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Ruby.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Ruby source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>scss</string>\n                            <string>sass</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>SASS.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>SASS file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>sql</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>SQL.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>SQL script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>ts</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>TypeScript.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>TypeScript file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>tsx</string>\n                            <string>jsx</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>React.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>React source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>vue</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Vue.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Vue source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>ascx</string>\n                            <string>csproj</string>\n                            <string>dtd</string>\n                            <string>plist</string>\n                            <string>wxi</string>\n                            <string>wxl</string>\n                            <string>wxs</string>\n                            <string>xml</string>\n                            <string>xaml</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>XML.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>XML document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>eyaml</string>\n                            <string>eyml</string>\n                            <string>yaml</string>\n                            <string>yml</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>YAML.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>YAML document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>bash</string>\n                            <string>bash_login</string>\n                            <string>bash_logout</string>\n                            <string>bash_profile</string>\n                            <string>bashrc</string>\n                            <string>profile</string>\n                            <string>rhistory</string>\n                            <string>rprofile</string>\n                            <string>sh</string>\n                            <string>zlogin</string>\n                            <string>zlogout</string>\n                            <string>zprofile</string>\n                            <string>zsh</string>\n                            <string>zshenv</string>\n                            <string>zshrc</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>Shell.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Shell script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>clj</string>\n                            <string>cljs</string>\n                            <string>cljx</string>\n                            <string>clojure</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Clojure source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>code-workspace</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>VS Code workspace file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>coffee</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>CoffeeScript source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>csv</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Comma Separated Values</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>cmake</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>CMake script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>dart</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Dart script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>diff</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Diff file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>dockerfile</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Dockerfile</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>gradle</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Gradle file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>groovy</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Groovy script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>makefile</string>\n                            <string>mk</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Makefile</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>lua</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Lua script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>pug</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Pug document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>ipynb</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Jupyter</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>lock</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Lockfile</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>log</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Log file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>txt</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Plain Text File</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>xcodeproj</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Xcode project file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>xcworkspace</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Xcode workspace file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>vb</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Visual Basic script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>r</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>R source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>rs</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Rust source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>rst</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Restructured Text document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>tex</string>\n                            <string>cls</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>LaTeX document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>fs</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>F# source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>fsi</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>F# signature file</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>fsx</string>\n                            <string>fsscript</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>F# script</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>svg</string>\n                            <string>svgz</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>SVG document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>toml</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>TOML document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>swift</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Swift source code</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array>\n                            <string>containerfile</string>\n                            <string>ctp</string>\n                            <string>dot</string>\n                            <string>edn</string>\n                            <string>handlebars</string>\n                            <string>hbs</string>\n                            <string>ml</string>\n                            <string>mli</string>\n                            <string>pl</string>\n                            <string>pl6</string>\n                            <string>pm</string>\n                            <string>pm6</string>\n                            <string>pod</string>\n                            <string>pp</string>\n                            <string>properties</string>\n                            <string>psgi</string>\n                            <string>rt</string>\n                            <string>t</string>\n                    </array>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Visual Studio Code document</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n            </dict>\n            <dict>\n                    <key>CFBundleTypeExtensions</key>\n                    <array/>\n                    <key>CFBundleTypeIconFile</key>\n                    <string>default.icns</string>\n                    <key>CFBundleTypeName</key>\n                    <string>Folder</string>\n                    <key>CFBundleTypeOSTypes</key>\n                    <array>\n                            <string>TEXT</string>\n                            <string>utxt</string>\n                            <string>TUTX</string>\n                            <string>****</string>\n                    </array>\n                    <key>CFBundleTypeRole</key>\n                    <string>Editor</string>\n                    <key>LSItemContentTypes</key>\n                    <array>\n                            <string>public.folder</string>\n                    </array>\n            </dict>\n        </array>\n</dict>\n</plist>\n"
  },
  {
    "path": "liteidex/src/liteide/liteide.pro",
    "content": "#-------------------------------------------------\n#\n# Project created by QtCreator 2012-11-19T17:09:35\n#\n#-------------------------------------------------\n\ninclude (../../liteidex.pri)\ninclude (../liteapp/liteapp.pri)\n\nQT += core gui\n\nmacx {\n    QT += xml\n}\n\nTARGET = $$IDE_APP_TARGET\nDESTDIR = $$IDE_APP_PATH\nTEMPLATE = app\nLIBS += -L$$IDE_LIBRARY_PATH\n\nmacx {\n    LIBS += -L$$IDE_BIN_PATH\n} else {\n    LIBS += -L$$IDE_APP_PATH\n}\n\nlinux-*|freebsd-*|openbsd-*|netbsd-* {\n    #do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR\n    # this expands to $ORIGIN (after qmake and make), it does NOT read a qmake var\n    QMAKE_RPATHDIR += \\$\\$ORIGIN\n    QMAKE_RPATHDIR += \\$\\$ORIGIN/../$$IDE_LIBRARY_BASENAME/liteide\n    IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, \":\")\n\n    QMAKE_LFLAGS += -Wl,-z,origin \\'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\\'\n    QMAKE_RPATHDIR =\n}\n\n\nSOURCES += main.cpp\n\nwin32 {\n    target.path = /bin\n    INSTALLS += target\n    RC_FILE += liteide.rc\n} else:macx {\n    ICON = liteide.icns\n    QMAKE_INFO_PLIST = Info.plist\n} else {\n    target.path  = $$BINPREFIX\n    INSTALLS    += target\n}\n"
  },
  {
    "path": "liteidex/src/liteide/liteide.rc",
    "content": "IDI_ICON1\tICON DISCARDABLE \"liteide.ico\"\n"
  },
  {
    "path": "liteidex/src/liteide/main.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2012 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: main.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n#include \"../liteapp/cdrv.h\"\n\nint main(int argc, char *argv[])\n{\n#if defined(_MSC_VER) && defined(_DEBUG)\n    _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF);\n#endif\n\n    return cdrv_main(argc,argv);\n}\n"
  },
  {
    "path": "liteidex/src/liteideapi.pri",
    "content": "include (../liteidex.pri)\n\nDESTDIR = $$IDE_LIBRARY_PATH\nLIBS += -L$$IDE_LIBRARY_PATH\n\nINCLUDEPATH += $$IDE_SOURCE_TREE/src/api\n\nisEmpty(TARGET) {\n    error(\"liteideapi.pri: You must provide a TARGET\")\n}\n\ncontains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols\n\n!macx {\n    target.path = $$LIBPREFIX\n    INSTALLS += target\n}\n\nTARGET = $$qtLibraryTarget($$TARGET)\n\n"
  },
  {
    "path": "liteidex/src/liteideplugin.pri",
    "content": "include (../liteidex.pri)\ninclude (api/liteapi/liteapi.pri)\n\nisEmpty(PRECOMPILED_HEADER):PRECOMPILED_HEADER = $$IDE_SOURCE_TREE/src/pch/liteide_gui_pch.h\n\nDESTDIR = $$IDE_PLUGIN_PATH\nLIBS += -L$$IDE_PLUGIN_PATH\nLIBS += -L$$IDE_LIBRARY_PATH\n\nINCLUDEPATH += $$IDE_SOURCE_TREE/src/api\nINCLUDEPATH += $$IDE_SOURCE_TREE/src/utils\nINCLUDEPATH += $$IDE_SOURCE_TREE/src/3rdparty\n\nisEmpty(TARGET) {\n    error(\"liteideplugin.pri: You must provide a TARGET\")\n}\n\nmacx {\n    QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../PlugIns/\n} else:linux-* {\n    #do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR\n    QMAKE_RPATHDIR += \\$\\$ORIGIN\n    QMAKE_RPATHDIR += \\$\\$ORIGIN/..\n    QMAKE_RPATHDIR += \\$\\$ORIGIN/../..\n    IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, \":\")\n    QMAKE_LFLAGS += -Wl,-z,origin \\'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\\'\n    QMAKE_RPATHDIR =\n}\n\n\ncontains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols\n\nCONFIG += plugin plugin_with_soname\n\n!macx {\n    target.path = $$PLUGINPREFIX\n    INSTALLS += target\n}\n\nTARGET = $$qtLibraryTarget($$TARGET)\n\n"
  },
  {
    "path": "liteidex/src/liteideutils.pri",
    "content": "include (../liteidex.pri)\n\nisEmpty(PRECOMPILED_HEADER):PRECOMPILED_HEADER = $$IDE_SOURCE_TREE/src/pch/liteide_gui_pch.h\n\n\nDESTDIR = $$IDE_LIBRARY_PATH\nLIBS += -L$$IDE_LIBRARY_PATH\nLIBS += -L$$IDE_PLUGIN_PATH\n\nINCLUDEPATH += $$IDE_SOURCE_TREE/src/api\nINCLUDEPATH += $$IDE_SOURCE_TREE/src/api/liteapi\nINCLUDEPATH += $$IDE_SOURCE_TREE/src/utils\nINCLUDEPATH += $$IDE_SOURCE_TREE/src/3rdparty\n\n\nisEmpty(TARGET) {\n    error(\"liteideutils.pri: You must provide a TARGET\")\n}\n\ncontains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols\n\n!macx {\n    target.path = $$LIBPREFIX\n    INSTALLS += target\n}\n\nTARGET = $$qtLibraryTarget($$TARGET)\n"
  },
  {
    "path": "liteidex/src/liteshell/ReadMe.txt",
    "content": "========================================================================\r\n       DYNAMIC LINK LIBRARY : liteshell\r\n========================================================================\r\n\r\n\r\nAppWizard has created this liteshell DLL for you.  \r\n\r\nThis file contains a summary of what you will find in each of the files that\r\nmake up your liteshell application.\r\n\r\nliteshell.dsp\r\n    This file (the project file) contains information at the project level and\r\n    is used to build a single project or subproject. Other users can share the\r\n    project (.dsp) file, but they should export the makefiles locally.\r\n\r\nliteshell.cpp\r\n    This is the main DLL source file.\r\n\r\n\tWhen created, this DLL does not export any symbols. As a result, it \r\n\twill not produce a .lib file when it is built. If you wish this project\r\n\tto be a project dependency of some other project, you will either need to \r\n\tadd code to export some symbols from the DLL so that an export library \r\n\twill be produced, or you can check the \"doesn't produce lib\" checkbox in \r\n\tthe Linker settings page for this project. \r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\nOther standard files:\r\n\r\nStdAfx.h, StdAfx.cpp\r\n    These files are used to build a precompiled header (PCH) file\r\n    named liteshell.pch and a precompiled types file named StdAfx.obj.\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\nOther notes:\r\n\r\nAppWizard uses \"TODO:\" to indicate parts of the source code you\r\nshould add to or customize.\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n"
  },
  {
    "path": "liteidex/src/liteshell/StdAfx.cpp",
    "content": "// stdafx.cpp : source file that includes just the standard includes\r\n//\tliteshell.pch will be the pre-compiled header\r\n//\tstdafx.obj will contain the pre-compiled type information\r\n\r\n#include \"stdafx.h\"\r\n\r\n// TODO: reference any additional headers you need in STDAFX.H\r\n// and not in this file\r\n"
  },
  {
    "path": "liteidex/src/liteshell/StdAfx.h",
    "content": "// stdafx.h : include file for standard system include files,\r\n//  or project specific include files that are used frequently, but\r\n//      are changed infrequently\r\n//\r\n\r\n#if !defined(AFX_STDAFX_H__7D13489B_7727_47BC_A405_EA7AEA845BC6__INCLUDED_)\r\n#define AFX_STDAFX_H__7D13489B_7727_47BC_A405_EA7AEA845BC6__INCLUDED_\r\n\r\n#if _MSC_VER > 1000\r\n#pragma once\r\n#endif // _MSC_VER > 1000\r\n\r\n\r\n// Insert your headers here\r\n#define WIN32_LEAN_AND_MEAN\t\t// Exclude rarely-used stuff from Windows headers\r\n\r\n#include <windows.h>\r\n\r\n// TODO: reference additional headers your program requires here\r\n\r\n//{{AFX_INSERT_LOCATION}}\r\n// Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r\n\r\n#endif // !defined(AFX_STDAFX_H__7D13489B_7727_47BC_A405_EA7AEA845BC6__INCLUDED_)\r\n"
  },
  {
    "path": "liteidex/src/liteshell/liteshell.cpp",
    "content": "// liteshell.cpp : Defines the entry point for the DLL application.\r\n//\r\n\r\n#include \"stdafx.h\"\r\n\r\n#include <windows.h>\r\n#include <shlobj.h>\r\n\r\nBOOL APIENTRY DllMain( HANDLE hModule, \r\n\t\t\t\t\t  DWORD  ul_reason_for_call, \r\n\t\t\t\t\t  LPVOID lpReserved\r\n\t\t\t\t\t  )\r\n{\r\n\tif (ul_reason_for_call == DLL_PROCESS_ATTACH) {\r\n\t\tCoInitialize(NULL);\r\n\t}\r\n    return TRUE;\r\n}\r\n\r\nextern \"C\" \r\n_declspec(dllexport) BOOL BrowseToFile(const wchar_t* filename)\r\n{\r\n\tITEMIDLIST *pidl = ILCreateFromPath(filename);\r\n    if(pidl) {\r\n        SHOpenFolderAndSelectItems(pidl,0,0,0);\r\n        ILFree(pidl);\r\n\t\treturn TRUE;\r\n    }\r\n\treturn FALSE;\r\n}\r\n\r\n"
  },
  {
    "path": "liteidex/src/liteshell/liteshell.dsp",
    "content": "# Microsoft Developer Studio Project File - Name=\"liteshell\" - Package Owner=<4>\r\n# Microsoft Developer Studio Generated Build File, Format Version 6.00\r\n# ** DO NOT EDIT **\r\n\r\n# TARGTYPE \"Win32 (x86) Dynamic-Link Library\" 0x0102\r\n\r\nCFG=liteshell - Win32 Debug\r\n!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r\n!MESSAGE use the Export Makefile command and run\r\n!MESSAGE \r\n!MESSAGE NMAKE /f \"liteshell.mak\".\r\n!MESSAGE \r\n!MESSAGE You can specify a configuration when running NMAKE\r\n!MESSAGE by defining the macro CFG on the command line. For example:\r\n!MESSAGE \r\n!MESSAGE NMAKE /f \"liteshell.mak\" CFG=\"liteshell - Win32 Debug\"\r\n!MESSAGE \r\n!MESSAGE Possible choices for configuration are:\r\n!MESSAGE \r\n!MESSAGE \"liteshell - Win32 Release\" (based on \"Win32 (x86) Dynamic-Link Library\")\r\n!MESSAGE \"liteshell - Win32 Debug\" (based on \"Win32 (x86) Dynamic-Link Library\")\r\n!MESSAGE \r\n\r\n# Begin Project\r\n# PROP AllowPerConfigDependencies 0\r\n# PROP Scc_ProjName \"\"\r\n# PROP Scc_LocalPath \"\"\r\nCPP=cl.exe\r\nMTL=midl.exe\r\nRSC=rc.exe\r\n\r\n!IF  \"$(CFG)\" == \"liteshell - Win32 Release\"\r\n\r\n# PROP BASE Use_MFC 0\r\n# PROP BASE Use_Debug_Libraries 0\r\n# PROP BASE Output_Dir \"Release\"\r\n# PROP BASE Intermediate_Dir \"Release\"\r\n# PROP BASE Target_Dir \"\"\r\n# PROP Use_MFC 0\r\n# PROP Use_Debug_Libraries 0\r\n# PROP Output_Dir \"Release\"\r\n# PROP Intermediate_Dir \"Release\"\r\n# PROP Ignore_Export_Lib 0\r\n# PROP Target_Dir \"\"\r\n# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_WINDOWS\" /D \"_MBCS\" /D \"_USRDLL\" /D \"LITESHELL_EXPORTS\" /Yu\"stdafx.h\" /FD /c\r\n# ADD CPP /nologo /MT /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_WINDOWS\" /D \"_UNICODE\" /D \"UNICODE\" /D \"_USRDLL\" /D \"LITESHELL_EXPORTS\" /Yu\"stdafx.h\" /FD /c\r\n# ADD BASE MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32\r\n# ADD MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32\r\n# ADD BASE RSC /l 0x804 /d \"NDEBUG\"\r\n# ADD RSC /l 0x804 /d \"NDEBUG\"\r\nBSC32=bscmake.exe\r\n# ADD BASE BSC32 /nologo\r\n# ADD BSC32 /nologo\r\nLINK32=link.exe\r\n# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386\r\n# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:\"../../liteide/bin/liteshell.dll\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"liteshell - Win32 Debug\"\r\n\r\n# PROP BASE Use_MFC 0\r\n# PROP BASE Use_Debug_Libraries 1\r\n# PROP BASE Output_Dir \"Debug\"\r\n# PROP BASE Intermediate_Dir \"Debug\"\r\n# PROP BASE Target_Dir \"\"\r\n# PROP Use_MFC 0\r\n# PROP Use_Debug_Libraries 1\r\n# PROP Output_Dir \"Debug\"\r\n# PROP Intermediate_Dir \"Debug\"\r\n# PROP Ignore_Export_Lib 0\r\n# PROP Target_Dir \"\"\r\n# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D \"WIN32\" /D \"_DEBUG\" /D \"_WINDOWS\" /D \"_MBCS\" /D \"_USRDLL\" /D \"LITESHELL_EXPORTS\" /Yu\"stdafx.h\" /FD /GZ  /c\r\n# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D \"WIN32\" /D \"_DEBUG\" /D \"_WINDOWS\" /D \"_UNICODE\" /D \"UNICODE\" /D \"_USRDLL\" /D \"LITESHELL_EXPORTS\" /Yu\"stdafx.h\" /FD /GZ  /c\r\n# ADD BASE MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\r\n# ADD MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\r\n# ADD BASE RSC /l 0x804 /d \"_DEBUG\"\r\n# ADD RSC /l 0x804 /d \"_DEBUG\"\r\nBSC32=bscmake.exe\r\n# ADD BASE BSC32 /nologo\r\n# ADD BSC32 /nologo\r\nLINK32=link.exe\r\n# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept\r\n# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept\r\n\r\n!ENDIF \r\n\r\n# Begin Target\r\n\r\n# Name \"liteshell - Win32 Release\"\r\n# Name \"liteshell - Win32 Debug\"\r\n# Begin Group \"Source Files\"\r\n\r\n# PROP Default_Filter \"cpp;c;cxx;rc;def;r;odl;idl;hpj;bat\"\r\n# Begin Source File\r\n\r\nSOURCE=.\\liteshell.cpp\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=.\\StdAfx.cpp\r\n# ADD CPP /Yc\"stdafx.h\"\r\n# End Source File\r\n# End Group\r\n# Begin Group \"Header Files\"\r\n\r\n# PROP Default_Filter \"h;hpp;hxx;hm;inl\"\r\n# Begin Source File\r\n\r\nSOURCE=.\\StdAfx.h\r\n# End Source File\r\n# End Group\r\n# Begin Group \"Resource Files\"\r\n\r\n# PROP Default_Filter \"ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe\"\r\n# End Group\r\n# Begin Source File\r\n\r\nSOURCE=.\\ReadMe.txt\r\n# End Source File\r\n# End Target\r\n# End Project\r\n"
  },
  {
    "path": "liteidex/src/liteshell/liteshell.dsw",
    "content": "Microsoft Developer Studio Workspace File, Format Version 6.00\r\n# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r\n\r\n###############################################################################\r\n\r\nProject: \"liteshell\"=\".\\liteshell.dsp\" - Package Owner=<4>\r\n\r\nPackage=<5>\r\n{{{\r\n}}}\r\n\r\nPackage=<4>\r\n{{{\r\n}}}\r\n\r\n###############################################################################\r\n\r\nGlobal:\r\n\r\nPackage=<5>\r\n{{{\r\n}}}\r\n\r\nPackage=<3>\r\n{{{\r\n}}}\r\n\r\n###############################################################################\r\n\r\n"
  },
  {
    "path": "liteidex/src/memleak_readme.txt",
    "content": "Not support leak check for QIcon"
  },
  {
    "path": "liteidex/src/memleak_remove.lua",
    "content": "local tmp = \"/tmp\"\nlocal sep = \"/\"\nlocal upper = \"..\"\n\nrequire\"lfs\"\nprint (lfs._VERSION)\n\nlocal memcheck = [[\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n]]\n\nfunction update_memleak(file,name)\n\tlocal f = io.open(file,\"r\")\n\tif f == nil then return end\n\tlocal data = f:read(\"*all\")\n\tf:close()\n\tlocal i1,j1 = string.find(data,[[//lite_memory_check_begin]])\n\tlocal i2,j2 = string.find(data,[[//lite_memory_check_end]])\n\tif i1 == nil or j1 == nil or i2 == nil or j2 == nil  then\n\t\tprint(\"no find memleak\",file,i1,j1,i2,j2)\n\t\treturn\n\tend\n\tf = io.open(file,\"w\")\n\tif f == nil then return end\n\tf:write(string.sub(data,1,i1-1)..string.sub(data,j2+2,#data))\n\tf:close()\nend\n\nfunction process_file(file,name)\n\tlocal ext = string.match(file,\"%.%w+$\")\n\tif ext == \".cpp\" then\n\t\tprint(file)\n\t\tupdate_memleak(file,name)\n\tend\nend\n\nfunction attrdir (path)\n\tfor file in lfs.dir(path) do\n\t\tif file ~= \".\" and file ~= \"..\" then\n\t\t\tlocal f = path..sep..file\n\t\t\tlocal attr = lfs.attributes (f)\n\t\t\tassert (type(attr) == \"table\")\n\t\t\tif attr.mode == \"directory\" then\n\t\t\t\tattrdir (f)\n\t\t\telse\n\t\t\t\tprocess_file(f,file)\n\t\t\tend\n\t\tend\n\tend\nend\nattrdir(\"./liteapp\")\nattrdir(\"./api\")\nattrdir(\"./plugins\")\nattrdir(\"./utils\")\n\n"
  },
  {
    "path": "liteidex/src/memleak_update.lua",
    "content": "local tmp = \"/tmp\"\nlocal sep = \"/\"\nlocal upper = \"..\"\n\nrequire\"lfs\"\nprint (lfs._VERSION)\n\nlocal memcheck = [[\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n]]\n\nfunction update_memleak(file,name)\n\tlocal f = io.open(file,\"r\")\n\tif f == nil then return end\n\tlocal data = f:read(\"*all\")\n\tf:close()\n\tlocal find = string.find(data,\"//lite_memory_check_begin\")\n\tif find ~= nil then\n\t\tprint(\"skip file:\",file)\n\t\treturn\n\tend\n\tprint(\">>process file:\",file)\n\tlocal i = 0\n\tlocal last = 0\n\twhile true do\n\t\ti = string.find(data,\"#include\",i+1)\n\t\tif i == nil then break end\n\t\tlast = i\n\tend\n\ti = string.find(data,\"\\n\",last+1)\n\tif i == nil then\n\t\treturn\n\tend\n\tf = io.open(file,\"w\")\n\tif f == nil then return end\n\tf:write(string.sub(data,1,i)..memcheck..string.sub(data,i+1,#data))\n\tf:close()\nend\n\nfunction process_file(file,name)\n\tlocal ext = string.match(file,\"%.%w+$\")\n\tif ext == \".cpp\" then\n\t\tupdate_memleak(file,name)\n\tend\nend\n\nfunction attrdir (path)\n\tfor file in lfs.dir(path) do\n\t\tif file ~= \".\" and file ~= \"..\" then\n\t\t\tlocal f = path..sep..file\n\t\t\tlocal attr = lfs.attributes (f)\n\t\t\tassert (type(attr) == \"table\")\n\t\t\tif attr.mode == \"directory\" then\n\t\t\t\tattrdir (f)\n\t\t\telse\n\t\t\t\tprocess_file(f,file)\n\t\t\tend\n\t\tend\n\tend\nend\nattrdir(\"./liteapp\")\nattrdir(\"./api\")\nattrdir(\"./plugins\")\nattrdir(\"./utils\")\n\n"
  },
  {
    "path": "liteidex/src/pch/liteide_gui_pch.h",
    "content": "/*\n * This is a precompiled header file for use in Xcode / Mac GCC /\n * GCC >= 3.4 / VC to greatly speed the building of Qt Creator.\n */\n\n#include \"liteide_pch.h\"\n\n#if defined __cplusplus\n\n#include <QApplication>\n#include <QCursor>\n#include <QDesktopWidget>\n#include <QClipboard>\n\n#include <QBitmap>\n#include <QImage>\n#include <QPainter>\n#include <QPixmap>\n#include <QStyle>\n\n#include <QTextDocument>\n#include <QTextCursor>\n#include <QTextBlock>\n#include <QTextCharFormat>\n#include <QTextBlockFormat>\n\n#include <QModelIndex>\n#include <QStandardItem>\n#include <QAbstractItemModel>\n#include <QAbstractItemView>\n#include <QStandardItemModel>\n#include <QSortFilterProxyModel>\n#include <QStringListModel>\n\n#include <QWidget>\n#include <QStackedWidget>\n#include <QDockWidget>\n#include <QTreeView>\n#include <QListView>\n#include <QHeaderView>\n\n#include <QDialog>\n#include <QDialogButtonBox>\n#include <QFileDialog>\n#include <QInputDialog>\n#include <QMessageBox>\n\n#include <QMenu>\n#include <QMenuBar>\n#include <QToolBar>\n#include <QAction>\n#include <QActionGroup>\n\n#include <QLabel>\n#include <QFrame>\n#include <QPushButton>\n#include <QRadioButton>\n#include <QCheckBox>\n#include <QComboBox>\n#include <QLineEdit>\n#include <QScrollBar>\n#include <QToolButton>\n#include <QPlainTextEdit>\n#include <QTextBrowser>\n#include <QToolTip>\n#include <QGroupBox>\n#include <QButtonGroup>\n\n#include <QLayout>\n#include <QVBoxLayout>\n#include <QHBoxLayout>\n#include <QGridLayout>\n#include <QStackedLayout>\n\n#endif\n"
  },
  {
    "path": "liteidex/src/pch/liteide_pch.h",
    "content": "/*\n * This is a precompiled header file for use in Xcode / Mac GCC /\n * GCC >= 3.4 / VC to greatly speed the building of Qt Creator.\n */\n\n#if defined __cplusplus\n#include <QtGlobal>\n\n#ifdef Q_WS_WIN\n# define _POSIX_\n# include <limits.h>\n# undef _POSIX_\n#endif\n\n#include <QCoreApplication>\n#include <QList>\n#include <QMap>\n#include <QSet>\n#include <QStack>\n#include <QVariant>\n#include <QObject>\n#include <QRegExp>\n#include <QString>\n#include <QStringList>\n#include <QTextCodec>\n#include <QPointer>\n#include <QScopedPointer>\n#include <QSharedPointer>\n#include <QUrl>\n#include <QDir>\n#include <QFileInfo>\n#include <QFile>\n#include <QTextDocumentWriter>\n#include <QProcess>\n#include <QProcessEnvironment>\n#include <QMimeData>\n#include <QTimer>\n#include <QEvent>\n#include <QDebug>\n\n#include <stdlib.h>\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/bookmarks/bookmarkmanager.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: bookmarkmanager.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"bookmarkmanager.h\"\r\n#include <QStandardItemModel>\r\n#include <QTreeView>\r\n#include <QHeaderView>\r\n#include <QDebug>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nBookmarkManager::BookmarkManager(QObject *parent)\r\n    : LiteApi::IManager(parent)\r\n{\r\n}\r\n\r\nBookmarkManager::~BookmarkManager()\r\n{\r\n    delete m_contextMenu;\r\n    delete m_treeView;\r\n}\r\n\r\nbool BookmarkManager::initWithApp(LiteApi::IApplication *app)\r\n{\r\n    if (!IManager::initWithApp(app)) {\r\n        return false;\r\n    }\r\n\r\n    LiteApi::IEditorMarkManager *manager = LiteApi::getEditorMarkManager(app);\r\n    if (!manager) {\r\n        return false;\r\n    }\r\n    manager->registerMark(BookMarkType,QIcon(\"icon:bookmarks/images/bookmark16.png\"));\r\n\r\n    m_toggleBookmarkAct = new QAction(tr(\"Toggle Bookmark\"),this);\r\n\r\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(this,\"Bookmarks\");\r\n#ifdef Q_OS_MAC\r\n    actionContext->regAction(m_toggleBookmarkAct,\"ToggleBookmark\",\"Meta+M\");\r\n#else\r\n    actionContext->regAction(m_toggleBookmarkAct,\"ToggleBookmark\",\"Ctrl+M\");\r\n#endif\r\n\r\n    connect(m_toggleBookmarkAct,SIGNAL(triggered()),this,SLOT(toggledBookmark()));\r\n\r\n    connect(m_liteApp->editorManager(),SIGNAL(editorCreated(LiteApi::IEditor*)),this,SLOT(editorCreated(LiteApi::IEditor*)));\r\n    connect(m_liteApp->editorManager(),SIGNAL(editorAboutToClose(LiteApi::IEditor*)),this,SLOT(editorAboutToClose(LiteApi::IEditor*)));\r\n    connect(manager,SIGNAL(editorMarkListChanged(LiteApi::IEditorMark*,int)),this,SLOT(editorMarkListChanged(LiteApi::IEditorMark*,int)));\r\n    connect(manager,SIGNAL(editorMarkNodeCreated(LiteApi::IEditorMark*,LiteApi::IEditorMarkNode*)),this,SLOT(editorMarkNodeCreated(LiteApi::IEditorMark*,LiteApi::IEditorMarkNode*)));\r\n    connect(manager,SIGNAL(editorMarkNodeRemoved(LiteApi::IEditorMark*,LiteApi::IEditorMarkNode*)),this,SLOT(editorMarkNodeRemoved(LiteApi::IEditorMark*,LiteApi::IEditorMarkNode*)));\r\n    connect(manager,SIGNAL(editorMarkNodeChanged(LiteApi::IEditorMark*,LiteApi::IEditorMarkNode*)),this,SLOT(editorMarkNodeChanged(LiteApi::IEditorMark*,LiteApi::IEditorMarkNode*)));\r\n\r\n    m_treeView = new SymbolTreeView();\r\n    m_treeView->setHeaderHidden(true);\r\n    m_treeView->setEditTriggers(QTreeView::NoEditTriggers);\r\n    m_treeView->setRootIsDecorated(false);\r\n\r\n    m_bookmarkModel = new BookmarkModel(this);\r\n    m_proxyModel = new BookmarkSortProxyModel(this);\r\n    m_proxyModel->setSourceModel(m_bookmarkModel);\r\n    m_proxyModel->sort(0);\r\n\r\n    m_treeView->setModel(m_proxyModel);\r\n\r\n    m_treeView->setItemDelegate(new BookmarkDelegate(this));\r\n    m_treeView->setFrameStyle(QFrame::NoFrame);\r\n    m_treeView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);\r\n    m_treeView->setContextMenuPolicy(Qt::CustomContextMenu);\r\n\r\n    m_gotoBookmarkAct = new QAction(tr(\"Goto bookmark\"),this);\r\n    m_removeBookmarkAct = new QAction(tr(\"Remove bookmark\"),this);\r\n    m_removeFileBookmaraksAct = new QAction(tr(\"Remove all bookmarks for this file\"),this);\r\n    m_removeAllFileBookmarksAct = new QAction(tr(\"Remove all bookmarks for all files\"),this);\r\n\r\n    m_contextMenu = new QMenu;\r\n    m_contextMenu->addAction(m_gotoBookmarkAct);\r\n    m_contextMenu->addAction(m_removeBookmarkAct);\r\n    m_contextMenu->addAction(m_removeFileBookmaraksAct);\r\n    m_contextMenu->addAction(m_removeAllFileBookmarksAct);\r\n\r\n //   m_treeView->setFocusPolicy(Qt::NoFocus);\r\n//    m_treeView->setSelectionModel(manager->selectionModel());\r\n//    m_treeView->setSelectionMode(QAbstractItemView::SingleSelection);\r\n//    m_treeView->setSelectionBehavior(QAbstractItemView::SelectRows);\r\n//    m_treeView->setDragEnabled(true);\r\n//    m_treeView->setDragDropMode(QAbstractItemView::DragOnly);\r\n\r\n\r\n    m_liteApp->toolWindowManager()->addToolWindow(Qt::LeftDockWidgetArea,m_treeView,\"Bookmarks\",tr(\"Bookmarks\"),true);\r\n\r\n    connect(m_treeView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(gotoBookmark(QModelIndex)));\r\n    connect(m_treeView,SIGNAL(enterKeyPressed(QModelIndex)),this,SLOT(gotoBookmark(QModelIndex)));\r\n    connect(m_treeView,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(contextMenuRequested(QPoint)));\r\n\r\n    connect(m_gotoBookmarkAct,SIGNAL(triggered(bool)),this,SLOT(gotoBookmarkAction()));\r\n    connect(m_removeBookmarkAct,SIGNAL(triggered(bool)),this,SLOT(removeBookmarkAction()));\r\n    connect(m_removeFileBookmaraksAct,SIGNAL(triggered(bool)),this,SLOT(removeFileBookmarksAction()));\r\n    connect(m_removeAllFileBookmarksAct,SIGNAL(triggered(bool)),this,SLOT(removeAllFileBookmarksAction()));\r\n\r\n    return true;\r\n}\r\n\r\nvoid BookmarkManager::editorCreated(LiteApi::IEditor *editor)\r\n{\r\n    if (!editor) {\r\n        return;\r\n    }\r\n    LiteApi::IEditorMark *mark = LiteApi::getEditorMark(editor);\r\n    if (!mark) {\r\n        return;\r\n    }\r\n\r\n    QMenu *menu = LiteApi::getEditMenu(editor);\r\n    if (menu) {\r\n        menu->addSeparator();\r\n        menu->addAction(m_toggleBookmarkAct);\r\n    }\r\n    menu = LiteApi::getContextMenu(editor);\r\n    if (menu) {\r\n        menu->addSeparator();\r\n        menu->addAction(m_toggleBookmarkAct);\r\n    }\r\n    bool ok;\r\n    QString key = QString(\"bookmarks/%1\").arg(editor->filePath());\r\n    QList<int> bpList;\r\n    foreach(QString bp, m_liteApp->settings()->value(key).toStringList()) {\r\n        int i = bp.toInt(&ok);\r\n        if (ok) {\r\n            bpList << i;\r\n        }\r\n    }\r\n    mark->addMarkList(bpList,BookMarkType);\r\n}\r\n\r\nvoid BookmarkManager::editorAboutToClose(LiteApi::IEditor *editor)\r\n{\r\n    if (!editor) {\r\n        return;\r\n    }\r\n    LiteApi::IEditorMark *mark = LiteApi::getEditorMark(editor);\r\n    if (!mark) {\r\n        return;\r\n    }\r\n    QList<int> bpList = mark->markLinesByType(BookMarkType);\r\n    QStringList save;\r\n    foreach(int bp, bpList) {\r\n        save.append(QString(\"%1\").arg(bp));\r\n    }\r\n    QString key = QString(\"bookmarks/%1\").arg(editor->filePath());\r\n    if (save.isEmpty()) {\r\n        m_liteApp->settings()->remove(key);\r\n    } else {\r\n        m_liteApp->settings()->setValue(key,save);\r\n    }\r\n    mark->removeMarkList(bpList,BookMarkType);\r\n}\r\n\r\nvoid BookmarkManager::toggledBookmark()\r\n{\r\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\r\n    if (!editor) {\r\n        return;\r\n    }\r\n    LiteApi::IEditorMark *mark = LiteApi::getEditorMark(editor);\r\n    if (!mark) {\r\n        return;\r\n    }\r\n    LiteApi::ITextEditor *textEditor = LiteApi::getTextEditor(editor);\r\n    int line = textEditor->line();\r\n    QList<int> types = mark->markTypesByLine(line);\r\n    if (types.contains(BookMarkType)) {\r\n        mark->removeMark(line,BookMarkType);\r\n    } else {\r\n        mark->addMark(line,BookMarkType);\r\n    }\r\n}\r\n\r\nvoid BookmarkManager::editorMarkListChanged(LiteApi::IEditorMark *mark, int type)\r\n{\r\n    if (type != BookMarkType) {\r\n        return;\r\n    }\r\n}\r\n\r\nvoid BookmarkManager::editorMarkNodeCreated(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node)\r\n{\r\n    if (node->type() != BookMarkType) {\r\n        return;\r\n    }\r\n//    MarkNodeItem *item = new MarkNodeItem();\r\n//    item->mark = mark;\r\n//    item->node = node;\r\n//    item->setText(QString(\"%1\\t%2\").arg(mark->fileName()).arg(node->lineNumber()));\r\n//    item->setToolTip(QString(\"%1\").arg(mark->filePath()));\r\n//    m_bookmarkModel->appendRow(item);\r\n    m_bookmarkModel->addNode(mark,node);\r\n}\r\n\r\nvoid BookmarkManager::editorMarkNodeRemoved(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node)\r\n{\r\n    if (node->type() != BookMarkType) {\r\n        return;\r\n    }\r\n    m_bookmarkModel->removeNode(mark,node);\r\n//    for (int i = 0; i < m_bookmarkModel->rowCount(); i++) {\r\n//        MarkNodeItem *item = (MarkNodeItem*)m_bookmarkModel->item(i,0);\r\n//        if (item->mark == mark && item->node == node) {\r\n//            m_bookmarkModel->removeRow(i);\r\n//            break;\r\n//        }\r\n//    }\r\n}\r\n\r\nvoid BookmarkManager::editorMarkNodeChanged(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node)\r\n{\r\n    if (node->type() != BookMarkType) {\r\n        return;\r\n    }\r\n    m_bookmarkModel->updateNode(mark,node);\r\n//    for (int i = 0; i < m_bookmarkModel->rowCount(); i++) {\r\n//        MarkNodeItem *item = (MarkNodeItem*)m_bookmarkModel->item(i,0);\r\n//        if (item->mark == mark && item->node == node) {\r\n//            item->setText(QString(\"%1\\t%2\").arg(mark->fileName()).arg(node->lineNumber()));\r\n//            break;\r\n//        }\r\n    //    }\r\n}\r\n\r\nvoid BookmarkManager::gotoBookmark(const QModelIndex &index)\r\n{\r\n    if (!index.isValid()) {\r\n        return;\r\n    }\r\n    QString filePath = index.data(BookmarkModel::FilePath).toString();\r\n    int lineNumber = index.data(BookmarkModel::LineNumber).toInt();\r\n    if (!filePath.isEmpty() && (lineNumber > 0)) {\r\n        LiteApi::gotoLine(m_liteApp,filePath,lineNumber-1,0,true,true);\r\n    }\r\n}\r\n\r\nvoid BookmarkManager::contextMenuRequested(QPoint pt)\r\n{\r\n    QModelIndex index =  m_treeView->indexAt(pt);\r\n    m_contextIndex = index;\r\n    if (!index.isValid()) {\r\n        return;\r\n    }\r\n    m_contextMenu->popup(m_treeView->mapToGlobal(pt));\r\n}\r\n\r\nvoid BookmarkManager::gotoBookmarkAction()\r\n{\r\n    gotoBookmark(m_contextIndex);\r\n}\r\n\r\nvoid BookmarkManager::removeBookmarkAction()\r\n{\r\n    if (!m_contextIndex.isValid()) {\r\n        return;\r\n    }\r\n    QString filePath = m_contextIndex.data(BookmarkModel::FilePath).toString();\r\n    int line = m_contextIndex.data(BookmarkModel::LineNumber).toInt()-1;\r\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->findEditor(filePath,true);\r\n    if (!editor) {\r\n        return;\r\n    }\r\n    LiteApi::IEditorMark *mark = LiteApi::getEditorMark(editor);\r\n    if (!mark) {\r\n        return;\r\n    }\r\n    QList<int> types = mark->markTypesByLine(line);\r\n    if (types.contains(BookMarkType)) {\r\n        mark->removeMark(line,BookMarkType);\r\n    }\r\n}\r\n\r\nvoid BookmarkManager::removeFileBookmarksAction()\r\n{\r\n    if (!m_contextIndex.isValid()) {\r\n        return;\r\n    }\r\n    QString filePath = m_contextIndex.data(BookmarkModel::FilePath).toString();\r\n    removeFileBookmarks(filePath);\r\n}\r\n\r\nvoid BookmarkManager::removeFileBookmarks(const QString &filePath)\r\n{\r\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->findEditor(filePath,true);\r\n    if (!editor) {\r\n        return;\r\n    }\r\n    LiteApi::IEditorMark *mark = LiteApi::getEditorMark(editor);\r\n    if (!mark) {\r\n        return;\r\n    }\r\n    QList<int> lines = mark->markLinesByType(BookMarkType);\r\n    mark->removeMarkList(lines,BookMarkType);\r\n}\r\n\r\n\r\nvoid BookmarkManager::removeAllFileBookmarksAction()\r\n{\r\n    int count = m_bookmarkModel->rowCount();\r\n    QSet<QString> files;\r\n    for (int i = 0; i < count; i++) {\r\n        QModelIndex index = m_bookmarkModel->index(i,0);\r\n        QString filePath = index.data(BookmarkModel::FilePath).toString();\r\n        files.insert(filePath);\r\n    }\r\n    foreach (QString file, files) {\r\n        removeFileBookmarks(file);\r\n    }\r\n}\r\n\r\n"
  },
  {
    "path": "liteidex/src/plugins/bookmarks/bookmarkmanager.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: bookmarkmanager.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef BOOKMARKMANAGER_H\r\n#define BOOKMARKMANAGER_H\r\n\r\n#include \"liteapi/liteapi.h\"\r\n#include \"liteeditorapi/liteeditorapi.h\"\r\n#include \"symboltreeview/symboltreeview.h\"\r\n#include \"bookmarkmodel.h\"\r\n\r\n#include <QSortFilterProxyModel>\r\n\r\nenum BOOKMARK_EDITOR_MARKTYPE {\r\n    BookMarkType = 1000\r\n};\r\n\r\nclass QTreeView;\r\nclass BookmarkManager : public LiteApi::IManager\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    BookmarkManager(QObject *parent = 0);\r\n    virtual ~BookmarkManager();\r\n    virtual bool initWithApp(LiteApi::IApplication *app);\r\npublic slots:\r\n    void editorCreated(LiteApi::IEditor *editor);\r\n    void editorAboutToClose(LiteApi::IEditor *editor);\r\n    void toggledBookmark();\r\n    void editorMarkListChanged(LiteApi::IEditorMark *mark, int type);\r\n    void editorMarkNodeCreated(LiteApi::IEditorMark *mark,LiteApi::IEditorMarkNode *node);\r\n    void editorMarkNodeRemoved(LiteApi::IEditorMark *mark,LiteApi::IEditorMarkNode *node);\r\n    void editorMarkNodeChanged(LiteApi::IEditorMark *mark,LiteApi::IEditorMarkNode *node);\r\n    void gotoBookmark(const QModelIndex &index);\r\n    void contextMenuRequested(QPoint pt);\r\n    void gotoBookmarkAction();\r\n    void removeBookmarkAction();\r\n    void removeFileBookmarksAction();\r\n    void removeAllFileBookmarksAction();\r\nprotected:\r\n    void removeFileBookmarks(const QString &filePath);\r\nprotected:\r\n    QAction *m_toggleBookmarkAct;\r\n    BookmarkModel *m_bookmarkModel;\r\n    BookmarkSortProxyModel *m_proxyModel;\r\n    SymbolTreeView *m_treeView;\r\n    QAction *m_gotoBookmarkAct;\r\n    QAction *m_removeBookmarkAct;\r\n    QAction *m_removeFileBookmaraksAct;\r\n    QAction *m_removeAllFileBookmarksAct;\r\n    QMenu   *m_contextMenu;\r\n    QModelIndex m_contextIndex;\r\n};\r\n\r\n\r\n\r\n#endif // BOOKMARKMANAGER_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/bookmarks/bookmarkmodel.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: bookmarkmodel.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"bookmarkmodel.h\"\r\n#include <QPainter>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nvoid BookmarkModel::addNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node)\r\n{\r\n    beginInsertRows(QModelIndex(), m_nodeList.size(), m_nodeList.size());\r\n\r\n    BookmarkNode *bn = createBookmarkNode(mark,node);\r\n    m_nodeList.append(bn);\r\n    m_nodeMap.insert(node,bn);\r\n\r\n    endInsertRows();\r\n    //selectionModel()->setCurrentIndex(index(m_bookmarksList.size()-1 , 0, QModelIndex()), QItemSelectionModel::Select | QItemSelectionModel::Clear);\r\n}\r\n\r\nvoid BookmarkModel::removeNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node)\r\n{\r\n    BookmarkNode *bn = findBookmarkNode(mark,node);\r\n    if (!bn) {\r\n        return;\r\n    }\r\n    int idx = m_nodeList.indexOf(bn);\r\n    beginRemoveRows(QModelIndex(), idx, idx);\r\n\r\n    m_nodeMap.remove(node);\r\n\r\n    delete bn;\r\n\r\n    m_nodeList.removeAt(idx);\r\n    endRemoveRows();\r\n //   if (selectionModel()->currentIndex().isValid())\r\n    //       selectionModel()->setCurrentIndex(selectionModel()->currentIndex(), QItemSelectionModel::Select | QItemSelectionModel::Clear);\r\n}\r\n\r\nvoid BookmarkModel::updateNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node)\r\n{\r\n    BookmarkNode *bn = findBookmarkNode(mark,node);\r\n    if (!bn) {\r\n        return;\r\n    }\r\n    bn->setLineNumber(node->blockNumber()+1);\r\n    bn->setLineText(node->block().text());\r\n    int idx = m_nodeList.indexOf(bn);\r\n    QModelIndex i = index(idx,0,QModelIndex());\r\n    emit dataChanged(i,i);\r\n}\r\n\r\nBookmarkNode *BookmarkModel::createBookmarkNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node) const\r\n{\r\n    BookmarkNode *n = new BookmarkNode();\r\n    n->setFilePath(mark->filePath());\r\n    n->setLineNumber(node->blockNumber()+1);\r\n    n->setLineText(node->block().text());\r\n    return n;\r\n}\r\n\r\nBookmarkNode *BookmarkModel::bookmarkNodeForIndex(const QModelIndex &index) const\r\n{\r\n    if (!index.isValid() || index.row() >= m_nodeList.size())\r\n        return 0;\r\n    return m_nodeList.at(index.row());\r\n}\r\n\r\nBookmarkNode *BookmarkModel::findBookmarkNode(LiteApi::IEditorMark */*mark*/, LiteApi::IEditorMarkNode *node) const\r\n{\r\n    return m_nodeMap.value(node);\r\n}\r\n\r\nBookmarkModel::BookmarkModel(QObject *parent)\r\n    : QAbstractItemModel(parent)\r\n{\r\n}\r\n\r\nQModelIndex BookmarkModel::index(int row, int column, const QModelIndex &parent) const\r\n{\r\n    if (parent.isValid())\r\n        return QModelIndex();\r\n    else\r\n        return createIndex(row, column);\r\n}\r\n\r\nQModelIndex BookmarkModel::parent(const QModelIndex &index) const\r\n{\r\n    return QModelIndex();\r\n}\r\n\r\nint BookmarkModel::rowCount(const QModelIndex &parent) const\r\n{\r\n    if (parent.isValid())\r\n        return 0;\r\n\r\n    return m_nodeList.size();\r\n}\r\n\r\nint BookmarkModel::columnCount(const QModelIndex &parent) const\r\n{\r\n    if (parent.isValid())\r\n        return 0;\r\n\r\n    return 1;\r\n}\r\n\r\nQVariant BookmarkModel::data(const QModelIndex &index, int role) const\r\n{\r\n    if (!index.isValid() || index.column() !=0 || index.row() < 0 || index.row() >= m_nodeList.count())\r\n        return QVariant();\r\n\r\n    BookmarkNode *node = m_nodeList.at(index.row());\r\n    if (role == BookmarkModel::FileName)\r\n        return node->fileName();\r\n    if (role == BookmarkModel::LineNumber)\r\n        return node->lineNumber();\r\n    if (role == BookmarkModel::FilePath)\r\n        return node->filePath();\r\n    if (role == BookmarkModel::LineText)\r\n        return node->lineText();\r\n    if (role == BookmarkModel::Note)\r\n        return node->noteText();\r\n    if (role == Qt::ToolTipRole)\r\n        return QDir::toNativeSeparators(node->filePath());\r\n    return QVariant();\r\n}\r\n\r\nBookmarkDelegate::BookmarkDelegate(QObject *parent)\r\n    : QStyledItemDelegate(parent)\r\n{\r\n}\r\n\r\nQSize BookmarkDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const\r\n{\r\n    QStyleOptionViewItem opt = option;\r\n    initStyleOption(&opt, index);\r\n\r\n    QFontMetrics fm(option.font);\r\n    QSize s;\r\n    s.setWidth(option.rect.width());\r\n    s.setHeight(fm.height() * 2 + 10);\r\n    return s;\r\n}\r\n\r\nvoid BookmarkDelegate::generateGradientPixmap(int width, int height, const QColor &color, bool selected) const\r\n{\r\n    QColor c = color;\r\n    c.setAlpha(0);\r\n\r\n    QPixmap pixmap(width+1, height);\r\n    pixmap.fill(c);\r\n\r\n    QPainter painter(&pixmap);\r\n    painter.setPen(Qt::NoPen);\r\n\r\n    QLinearGradient lg;\r\n    lg.setCoordinateMode(QGradient::ObjectBoundingMode);\r\n    lg.setFinalStop(1,0);\r\n\r\n    lg.setColorAt(0, c);\r\n    lg.setColorAt(0.4, color);\r\n\r\n    painter.setBrush(lg);\r\n    painter.drawRect(0, 0, width+1, height);\r\n\r\n    if (selected)\r\n        m_selectedPixmap = pixmap;\r\n    else\r\n        m_normalPixmap = pixmap;\r\n}\r\n\r\nvoid BookmarkDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const\r\n{\r\n    QStyleOptionViewItem opt = option;\r\n    initStyleOption(&opt, index);\r\n    painter->save();\r\n\r\n    QFontMetrics fm(opt.font);\r\n    static int lwidth = fm.width(QLatin1String(\"8888\")) + 18;\r\n\r\n    QColor backgroundColor;\r\n    QColor textColor;\r\n\r\n    bool selected = opt.state & QStyle::State_Selected;\r\n\r\n    if (selected) {\r\n        painter->setBrush(opt.palette.highlight().color());\r\n        backgroundColor = opt.palette.highlight().color();\r\n        if (!m_selectedPixmap)\r\n            generateGradientPixmap(lwidth, fm.height()+1, backgroundColor, selected);\r\n    } else {\r\n        painter->setBrush(opt.palette.background().color());\r\n        backgroundColor = opt.palette.background().color();\r\n        if (!m_normalPixmap)\r\n            generateGradientPixmap(lwidth, fm.height(), backgroundColor, selected);\r\n    }\r\n    painter->setPen(Qt::NoPen);\r\n    painter->drawRect(opt.rect);\r\n\r\n    // Set Text Color\r\n    if (opt.state & QStyle::State_Selected)\r\n        textColor = opt.palette.highlightedText().color();\r\n    else\r\n        textColor = opt.palette.text().color();\r\n\r\n    painter->setPen(textColor);\r\n\r\n\r\n    // TopLeft\r\n    QString topLeft = index.data(BookmarkModel::FileName).toString();\r\n    //painter->drawText(6, 2 + opt.rect.top() + fm.ascent(), topLeft);\r\n\r\n    QString topRight = index.data(BookmarkModel::LineNumber).toString();\r\n    // Check whether we need to be fancy and paint some background\r\n    int fwidth = fm.width(topLeft);\r\n    if (fwidth + lwidth > opt.rect.width()) {\r\n        int left = opt.rect.right() - lwidth;\r\n        painter->drawPixmap(left, opt.rect.top(), selected ? m_selectedPixmap : m_normalPixmap);\r\n    }\r\n    // topRight\r\n    painter->drawText(opt.rect.right() - fm.width(topRight) - 6 , 2 + opt.rect.top() + fm.ascent(), topRight);\r\n\r\n    // Directory\r\n    QColor mix;\r\n    mix.setRgbF(0.7 * textColor.redF()   + 0.3 * backgroundColor.redF(),\r\n                0.7 * textColor.greenF() + 0.3 * backgroundColor.greenF(),\r\n                0.7 * textColor.blueF()  + 0.3 * backgroundColor.blueF());\r\n    painter->setPen(mix);\r\n\r\n    QString directory = index.data(BookmarkModel::FilePath).toString();\r\n    int availableSpace = opt.rect.width() - fm.width(\"888\");\r\n    if (fm.width(directory) > availableSpace) {\r\n        // We need a shorter directory\r\n        availableSpace -= fm.width(\"...\");\r\n\r\n        int pos = directory.size();\r\n        int idx;\r\n        forever {\r\n            idx = directory.lastIndexOf(\"/\", pos-1);\r\n            if (idx == -1) {\r\n                // Can't happen, this means the string did fit after all?\r\n                break;\r\n            }\r\n            int width = fm.width(directory.mid(idx, pos-idx));\r\n            if (width > availableSpace) {\r\n                directory = \"...\" + directory.mid(pos);\r\n                break;\r\n            } else {\r\n                pos = idx;\r\n                availableSpace -= width;\r\n            }\r\n        }\r\n    }\r\n\r\n    //painter->drawText(3, opt.rect.top() + fm.ascent() + fm.height() + 6, directory);\r\n    painter->drawText(6, 2 + opt.rect.top() + fm.ascent(), directory);\r\n\r\n    QString lineText = index.data(BookmarkModel::Note).toString().trimmed();\r\n    if (lineText.isEmpty())\r\n        lineText = index.data(BookmarkModel::LineText).toString().trimmed();\r\n\r\n    painter->drawText(6, opt.rect.top() + fm.ascent() + fm.height() + 6, lineText);\r\n\r\n    // Separator lines\r\n    const QRectF innerRect = QRectF(opt.rect).adjusted(0.5, 0.5, -0.5, -0.5);\r\n    painter->setPen(QColor::fromRgb(150,150,150));\r\n    painter->drawLine(innerRect.bottomLeft(), innerRect.bottomRight());\r\n    painter->restore();\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/bookmarks/bookmarkmodel.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: bookmarkmodel.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef BOOKMARKMODEL_H\r\n#define BOOKMARKMODEL_H\r\n\r\n#include <QAbstractItemModel>\r\n#include <QSortFilterProxyModel>\r\n#include <QStyledItemDelegate>\r\n#include <QList>\r\n#include <QFileInfo>\r\n#include <QDir>\r\n#include \"liteeditorapi/liteeditorapi.h\"\r\n\r\nclass BookmarkNode\r\n{\r\npublic:\r\n    BookmarkNode() : m_lineNumber(-1)\r\n    {\r\n    }\r\npublic:\r\n    void setFilePath(const QString &filePath)\r\n    {\r\n        m_filePath = QDir::toNativeSeparators(filePath);\r\n        m_fileName = QFileInfo(m_filePath).fileName();\r\n    }\r\n    void setLineNumber(int lineNumber)\r\n    {\r\n        m_lineNumber = lineNumber;\r\n    }\r\n    void setLineText(const QString &text)\r\n    {\r\n        m_lineText = text;\r\n        m_lineText.replace(\"\\t\",\"    \");\r\n    }\r\n    void setNodeText(const QString &node)\r\n    {\r\n        m_nodeText = node;\r\n    }\r\npublic:\r\n    QString fileName() const\r\n    {\r\n        return m_fileName;\r\n    }\r\n    QString filePath() const\r\n    {\r\n        return m_filePath;\r\n    }\r\n    int lineNumber() const\r\n    {\r\n        return m_lineNumber;\r\n    }\r\n    QString lineText() const\r\n    {\r\n        return m_lineText;\r\n    }\r\n    QString noteText() const\r\n    {\r\n        return m_nodeText;\r\n    }\r\nprotected:\r\n    int     m_lineNumber;\r\n    QString m_filePath;\r\n    QString m_fileName;\r\n    QString m_lineText;\r\n    QString m_nodeText;\r\n};\r\n\r\nclass BookmarkModel : public QAbstractItemModel\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    enum Roles {\r\n        FileName = Qt::UserRole,\r\n        LineNumber = Qt::UserRole + 1,\r\n        FilePath = Qt::UserRole + 2,\r\n        LineText = Qt::UserRole + 3,\r\n        Note = Qt::UserRole + 4\r\n    };\r\n    void addNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node);\r\n    void removeNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node);\r\n    void updateNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node);\r\n    BookmarkNode *createBookmarkNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node) const;\r\n    BookmarkNode *bookmarkNodeForIndex(const QModelIndex &index) const;\r\n    BookmarkNode *findBookmarkNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node) const;\r\npublic:\r\n    explicit BookmarkModel(QObject *parent = 0);\r\n\r\n    // Basic functionality:\r\n    QModelIndex index(int row, int column,\r\n                      const QModelIndex &parent = QModelIndex()) const;\r\n    QModelIndex parent(const QModelIndex &index) const;\r\n\r\n    int rowCount(const QModelIndex &parent = QModelIndex()) const;\r\n    int columnCount(const QModelIndex &parent = QModelIndex()) const;\r\n\r\n    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;\r\nprivate:\r\n    QList<BookmarkNode*> m_nodeList;\r\n    QMap<LiteApi::IEditorMarkNode*, BookmarkNode*> m_nodeMap;\r\n};\r\n\r\nclass BookmarkSortProxyModel : public QSortFilterProxyModel\r\n{\r\npublic:\r\n    explicit BookmarkSortProxyModel(QObject *parent = 0) : QSortFilterProxyModel(parent)\r\n    {\r\n    }\r\n    virtual bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const\r\n    {\r\n        QString leftPath = source_left.data(BookmarkModel::FilePath).toString();\r\n        QString rightPath = source_right.data(BookmarkModel::FilePath).toString();\r\n        if (leftPath == rightPath) {\r\n            int leftNumber = source_left.data(BookmarkModel::LineNumber).toInt();\r\n            int rightNumber = source_right.data(BookmarkModel::LineNumber).toInt();\r\n            return leftNumber < rightNumber;\r\n        }\r\n        return leftPath < rightPath;\r\n    }\r\n};\r\n\r\nclass BookmarkDelegate : public QStyledItemDelegate\r\n{\r\n    Q_OBJECT\r\n\r\npublic:\r\n    BookmarkDelegate(QObject *parent = 0);\r\n\r\nprivate:\r\n    void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;\r\n    QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;\r\n    void generateGradientPixmap(int width, int height, const QColor &color, bool selected) const;\r\n\r\n    mutable QPixmap m_normalPixmap;\r\n    mutable QPixmap m_selectedPixmap;\r\n};\r\n\r\n\r\n#endif // BOOKMARKMODEL_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/bookmarks/bookmarks.pro",
    "content": "TARGET = bookmarks\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude (../../api/liteeditorapi/liteeditorapi.pri)\ninclude (../../utils/symboltreeview/symboltreeview.pri)\n\n\nDEFINES += BOOKMARKS_LIBRARY\n\nSOURCES += bookmarksplugin.cpp \\\n    bookmarkmanager.cpp \\\n    bookmarkmodel.cpp\n\nHEADERS += bookmarksplugin.h\\\n        bookmarks_global.h \\\n    bookmarkmanager.h \\\n    bookmarkmodel.h\n\nDISTFILES +=\n\nRESOURCES += \\\n    bookmarks.qrc\n"
  },
  {
    "path": "liteidex/src/plugins/bookmarks/bookmarks.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/bookmarks\">\n        <file>images/bookmark16.png</file>\n        <file>images/bookmark32.png</file>\n    </qresource>\n</RCC>\n"
  },
  {
    "path": "liteidex/src/plugins/bookmarks/bookmarks_global.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: bookmarks_global.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef BOOKMARKS_GLOBAL_H\r\n#define BOOKMARKS_GLOBAL_H\r\n\r\n#include <QtCore/qglobal.h>\r\n\r\n#if defined(BOOKMARKS_LIBRARY)\r\n#  define BOOKMARKSSHARED_EXPORT Q_DECL_EXPORT\r\n#else\r\n#  define BOOKMARKSSHARED_EXPORT Q_DECL_IMPORT\r\n#endif\r\n\r\n#endif // BOOKMARKS_GLOBAL_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/bookmarks/bookmarksplugin.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: bookmarksplugin.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"bookmarksplugin.h\"\r\n#include \"bookmarkmanager.h\"\r\n#include <QtPlugin>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nBookmarksPlugin::BookmarksPlugin()\r\n{\r\n}\r\n\r\nbool BookmarksPlugin::load(LiteApi::IApplication *app)\r\n{\r\n    BookmarkManager *manager = new BookmarkManager(app);\r\n    if (!manager->initWithApp(app)) {\r\n        return false;\r\n    }\r\n    return true;\r\n}\r\n\r\n#if QT_VERSION < 0x050000\r\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\r\n#endif\r\n"
  },
  {
    "path": "liteidex/src/plugins/bookmarks/bookmarksplugin.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: bookmarksplugin.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef BOOKMARKSPLUGIN_H\r\n#define BOOKMARKSPLUGIN_H\r\n\r\n#include \"bookmarks_global.h\"\r\n#include \"liteapi/liteapi.h\"\r\n\r\nclass BookmarksPlugin : public LiteApi::IPlugin\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    BookmarksPlugin();\r\n    virtual bool load(LiteApi::IApplication *app);\r\n};\r\n\r\nclass PluginFactory : public LiteApi::PluginFactoryT<BookmarksPlugin>\r\n{\r\n    Q_OBJECT\r\n    Q_INTERFACES(LiteApi::IPluginFactory)\r\n#if QT_VERSION >= 0x050000\r\n    Q_PLUGIN_METADATA(IID \"liteidex.BookmarksPlugin\")\r\n#endif\r\npublic:\r\n    PluginFactory() {\r\n        m_info->setId(\"plugin/Bookmarks\");\r\n        m_info->setVer(\"X38.1\");\r\n        m_info->setName(\"Bookmarks\");\r\n        m_info->setAuthor(\"visualfc\");\r\n        m_info->setInfo(\"Bookmarks\");\r\n        //m_info->setMustLoad(true);\r\n        m_info->appendDepend(\"plugin/liteeditor\");\r\n    }\r\n};\r\n\r\n\r\n#endif // BOOKMARKSPLUGIN_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/dlvdebugger/dlvdebugger.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: dlvdebugger.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"dlvdebugger.h\"\n#include \"fileutil/fileutil.h\"\n#include \"processex/processex.h\"\n#include \"dlvdebuggeroption.h\"\n#include \"../litedebug/litedebug_global.h\"\n\n#include <QStandardItemModel>\n#include <QProcess>\n#include <QFile>\n#include <QDir>\n#include <QFileInfo>\n#include <QTextCodec>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nstatic void GdbMiValueToItem(QStandardItem *item, const GdbMiValue &value)\n{\n    switch (value.type()) {\n    case GdbMiValue::Invalid:\n        item->appendRow(new QStandardItem(\"Invalid\"));\n        break;\n    case GdbMiValue::Const:\n        if (value.name().isEmpty()) {\n            item->appendRow(new QStandardItem(QString(value.data())));\n        } else {\n            item->appendRow(new QStandardItem(QString(value.name()+\"=\"+value.data())));\n        }\n        break;\n    case GdbMiValue::List: {\n            QStandardItem *in = new QStandardItem(QString(value.name()));\n            item->appendRow(in);\n            for (int i = 0; i < value.childCount(); i++) {\n                QStandardItem *iv = new QStandardItem(QString(\"[%1]\").arg(i));\n                in->appendRow(iv);\n                GdbMiValueToItem(iv,value.childAt(i));\n            }\n            break;\n        }\n    case GdbMiValue::Tuple: {\n            QStandardItem *iv = item;\n            if (!value.name().isEmpty()) {\n                iv = new QStandardItem(QString(value.name()));\n                item->appendRow(iv);\n            }\n            foreach (const GdbMiValue &v, value.children()) {\n                GdbMiValueToItem(iv,v);\n            }\n            break;\n       }\n    }\n}\n\nDlvDebugger::DlvDebugger(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IDebugger(parent),\n    m_liteApp(app),\n    m_envManager(0)\n{\n    m_process = new LiteProcess(m_liteApp,this);\n    m_process->setUseCtrlC(true);\n\n    m_asyncModel = new QStandardItemModel(this);\n    m_asyncItem = new QStandardItem;\n    m_asyncModel->appendRow(m_asyncItem);\n    /*\n    m_asyncModel->setHeaderData(0,Qt::Horizontal,\"Reason\");\n    m_asyncModel->setHeaderData(1,Qt::Horizontal,\"Address\");\n    m_asyncModel->setHeaderData(2,Qt::Horizontal,\"Function\");\n    m_asyncModel->setHeaderData(3,Qt::Horizontal,\"File\");\n    m_asyncModel->setHeaderData(4,Qt::Horizontal,\"Line\");\n    m_asyncModel->setHeaderData(5,Qt::Horizontal,\"Thread ID\");\n    m_asyncModel->setHeaderData(6,Qt::Horizontal,\"Stoped Threads\");\n    */\n    m_varsModel = new QStandardItemModel(0,2,this);\n    m_varsModel->setHeaderData(0,Qt::Horizontal,\"Name\");\n    m_varsModel->setHeaderData(1,Qt::Horizontal,\"Value\");\n    //m_varsModel->setHeaderData(2,Qt::Horizontal,\"Type\");\n\n    m_watchModel = new QStandardItemModel(0,2,this);\n    m_watchModel->setHeaderData(0,Qt::Horizontal,\"Name\");\n    m_watchModel->setHeaderData(1,Qt::Horizontal,\"Value\");\n    //m_watchModel->setHeaderData(2,Qt::Horizontal,\"Type\");\n\n    m_framesModel = new QStandardItemModel(0,5,this);\n    m_framesModel->setHeaderData(0,Qt::Horizontal,\"Level\");\n    m_framesModel->setHeaderData(1,Qt::Horizontal,\"Address\");\n    m_framesModel->setHeaderData(2,Qt::Horizontal,\"Function\");\n    m_framesModel->setHeaderData(3,Qt::Horizontal,\"File\");\n    m_framesModel->setHeaderData(4,Qt::Horizontal,\"Line\");\n\n    m_libraryModel = new QStandardItemModel(0,2,this);\n    m_libraryModel->setHeaderData(0,Qt::Horizontal,\"Id\");\n    m_libraryModel->setHeaderData(1,Qt::Horizontal,\"Thread Groups\");\n\n    m_dlvInit = false;\n    m_dlvExit = false;\n    m_readDataBusy = false;\n    m_writeDataBusy = false;\n\n    m_headlessMode = true;\n\n    m_headlessInitAddress = false;\n    m_headlessProcess = new LiteProcess(m_liteApp,this);\n    m_headlessProcess->setUseCtrlC(true);\n\n    m_dlvRunningCmdList << \"c\" << \"continue\"\n        << \"n\" << \"next\"\n        << \"s\" << \"step\"\n        << \"si\" << \"step-instruction\"\n        << \"stepout\";\n\n    connect(app,SIGNAL(loaded()),this,SLOT(appLoaded()));\n    connect(m_process,SIGNAL(started()),this,SIGNAL(debugStarted()));\n    connect(m_process,SIGNAL(finished(int)),this,SLOT(finished(int)));\n    connect(m_process,SIGNAL(error(QProcess::ProcessError)),this,SLOT(error(QProcess::ProcessError)));\n    connect(m_process,SIGNAL(readyReadStandardError()),this,SLOT(readStdError()));\n    connect(m_process,SIGNAL(readyReadStandardOutput()),this,SLOT(readStdOutput()));\n\n    connect(m_headlessProcess,SIGNAL(started()),this,SIGNAL(debugStarted()));\n    connect(m_headlessProcess,SIGNAL(finished(int)),this,SLOT(headlessFinished(int)));\n    connect(m_headlessProcess,SIGNAL(error(QProcess::ProcessError)),this,SLOT(headlessError(QProcess::ProcessError)));\n    connect(m_headlessProcess,SIGNAL(readyReadStandardError()),this,SLOT(headlessReadStdError()));\n    connect(m_headlessProcess,SIGNAL(readyReadStandardOutput()),this,SLOT(headlessReadStdOutput()));\n}\n\nDlvDebugger::~DlvDebugger()\n{\n    stop();\n}\n\nvoid DlvDebugger::appLoaded()\n{\n    m_envManager = LiteApi::findExtensionObject<LiteApi::IEnvManager*>(m_liteApp,\"LiteApi.IEnvManager\");\n}\n\nQString DlvDebugger::mimeType() const\n{\n    return QLatin1String(\"debugger/delve1\");\n}\n\nQAbstractItemModel *DlvDebugger::debugModel(LiteApi::DEBUG_MODEL_TYPE type)\n{\n    if (type == LiteApi::ASYNC_MODEL) {\n        return m_asyncModel;\n    } else if (type == LiteApi::VARS_MODEL) {\n        return m_varsModel;\n    } else if (type == LiteApi::WATCHES_MODEL) {\n        return m_watchModel;\n    }else if (type == LiteApi::FRAMES_MODEL) {\n        return m_framesModel;\n    } else if (type == LiteApi::LIBRARY_MODEL) {\n        return m_libraryModel;\n    }\n    return 0;\n}\n\nvoid DlvDebugger::setWorkingDirectory(const QString &dir)\n{\n    m_headlessProcess->setWorkingDirectory(dir);\n    m_process->setWorkingDirectory(dir);\n}\n\nvoid DlvDebugger::setEnvironment (const QStringList &environment)\n{\n    m_headlessProcess->setEnvironment(environment);\n    m_process->setEnvironment(environment);\n}\n\nbool DlvDebugger::start(const QString &cmd, const QString &arguments)\n{\n    if (!m_envManager) {\n        return false;\n    }\n\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\n\n    QString goroot = env.value(\"GOROOT\");\n    if (!goroot.isEmpty()) {\n        m_runtimeFilePath = QFileInfo(QDir(goroot),\"src/pkg/runtime/\").path();\n    }\n\n    QString dlv = FileUtil::lookupGoBin(\"dlv\",m_liteApp,env,true);\n    if (dlv.isEmpty()) {\n        dlv = FileUtil::lookPath(\"dlv\",env,false);\n    }\n    m_dlvFilePath = dlv;\n\n    //m_checkFuncDecl = false;\n\n    if (m_dlvFilePath.isEmpty()) {\n        m_liteApp->appendLog(\"DlvDebugger\",\"dlv was not found on system PATH (hint: is Delve installed?)\",true);\n        return false;\n    }\n\n    clear();\n\n    if (m_headlessMode) {\n        QStringList argsList;\n        argsList << \"--headless\" << \"--api-version=2\" << \"--accept-multiclient\";\n        argsList << \"exec\" << cmd;\n        if (!arguments.isEmpty()) {\n            argsList << \"--\" << arguments;\n        }\n#ifdef Q_OS_WIN\n        //m_headlessProcess->setNativeArguments(argsList.join(\" \"));\n        m_headlessProcess->startEx(\"\\\"\"+m_dlvFilePath+\"\\\"\", argsList.join(\" \"));\n#else\n        m_headlessProcess->startEx(m_dlvFilePath, argsList.join(\" \"));\n#endif\n        QString log = QString(\"%1 %2 [%3]\").arg(m_dlvFilePath).arg(argsList.join(\" \")).arg(m_headlessProcess->workingDirectory());\n        emit debugLog(LiteApi::DebugRuntimeLog,log);\n    } else {\n        QStringList argsList;\n        argsList << \"exec\" << cmd;\n        if (!arguments.isEmpty()) {\n            argsList << \"--\" << arguments;\n        }\n#ifdef Q_OS_WIN\n        //m_process->setNativeArguments(argsList.join(\" \"));\n        m_process->startEx(\"\\\"\"+m_dlvFilePath+\"\\\"\",argsList.join(\" \"));\n#else\n        m_process->startEx(m_dlvFilePath,argsList.join(\" \"));\n#endif\n\n        QString log = QString(\"%1 %2 [%3]\").arg(m_dlvFilePath).arg(argsList.join(\" \")).arg(m_process->workingDirectory());\n        emit debugLog(LiteApi::DebugRuntimeLog,log);\n    }\n\n    return true;\n}\n\nvoid DlvDebugger::stop()\n{\n    if (m_dlvExit) {\n        return;\n    }\n    m_dlvExit = true;\n    if (m_headlessMode) {\n        if (!m_headlessProcess->isStop()) {\n            m_headlessProcess->interrupt();\n        }\n        if (!m_process->isStop()) {\n            m_process->interrupt();\n        }\n        if (!m_headlessProcess->isStop() && !m_headlessProcess->waitForFinished(500)) {\n            m_headlessProcess->kill();\n        }\n        if (!m_process->isStop() && !m_process->waitForFinished(500)) {\n            command_helper(\"exit\",true);\n            if (!m_process->waitForFinished(500)) {\n                m_process->kill();\n            }\n        }\n    } else {\n        if (!m_process->isStop()) {\n            m_process->interrupt();\n        }\n        command_helper(\"exit\",true);\n        if (!m_process->isStop() && !m_process->waitForFinished(1000)) {\n             m_process->kill();\n        }\n    }\n}\n\nbool DlvDebugger::isRunning()\n{\n    return m_process->state() != QProcess::NotRunning;\n}\n\nvoid DlvDebugger::continueRun()\n{    \n    command(\"continue\");\n}\n\nvoid DlvDebugger::stepOver()\n{\n    command(\"next\");\n}\n\nvoid DlvDebugger::stepInto()\n{\n    command(\"step\");\n}\n\nvoid DlvDebugger::stepOut()\n{\n    command(\"stepout\");\n//    QString cmd = LiteApi::getGotools(m_liteApp);\n//    QProcess process;\n//    process.setEnvironment(LiteApi::getCurrentEnvironment(m_liteApp).toStringList());\n//    QFileInfo info(m_lastFileName);\n//    process.setWorkingDirectory(info.path());\n//    QStringList args;\n//    args << \"finddecl\" << \"-file\" << info.fileName() << \"-line\" << QString(\"%1\").arg(m_lastFileLine+1);\n//    process.start(cmd,args);\n//    if (!process.waitForFinished(3000)) {\n//        emit debugLog(LiteApi::DebugErrorLog,\"error wait find decl process\");\n//        process.kill();\n//        return;\n//    }\n//    if (process.exitCode() != 0) {\n//        emit debugLog(LiteApi::DebugErrorLog,\"error get find decl result\");\n//        return;\n//    }\n//    QByteArray data = process.readAll().trimmed();\n//    QStringList ar = QString::fromUtf8(data).split(\" \");\n//    if (ar.size() != 4 || ar[0] != \"func\") {\n//        emit debugLog(LiteApi::DebugErrorLog,\"error find func decl in line\");\n//        return;\n//    }\n//    m_funcDecl.fileName = m_lastFileName;\n//    m_funcDecl.funcName = ar[1];\n//    m_funcDecl.start = ar[2].toInt()-1;\n//    m_funcDecl.end = ar[3].toInt()-1;\n//    m_checkFuncDecl = true;\n//    command(\"next\");\n}\n\nvoid DlvDebugger::runToLine(const QString &fileName, int line)\n{\n    bool find = findBreakPoint(fileName,line);\n    if (!find) {\n        insertBreakPoint(fileName,line);\n        command(\"continue\");\n        removeBreakPoint(fileName,line);\n    } else {\n        command(\"continue\");\n    }\n}\n\nvoid DlvDebugger::createWatch(const QString &var)\n{\n    QString cmd = \"vars \"+QRegExp::escape(var);\n    m_updateCmdHistroy.push_back(cmd);\n    command_helper(cmd.toUtf8(),true);\n}\n\nvoid DlvDebugger::removeWatch(const QString &value)\n{\n    m_watchNameMap.remove(value);\n    for (int i = 0; i < m_watchModel->rowCount(); i++) {\n        QStandardItem *nameItem = m_watchModel->item(i,0);\n        if (nameItem->text() == value) {\n            m_watchModel->removeRow(i);\n            break;\n        }\n    }\n    emit watchRemoved(value);\n}\n\nvoid DlvDebugger::removeAllWatch()\n{\n    m_watchNameMap.clear();\n    m_watchModel->removeRows(0,m_watchModel->rowCount());\n}\n\nvoid DlvDebugger::showFrame(QModelIndex index)\n{\n    QStandardItem* file = m_framesModel->item( index.row(), 3 );\n    QStandardItem* line = m_framesModel->item( index.row(), 4 );\n    if( !file || !line ) {\n        return;\n    }\n    QString filename = file->text();\n    int lineno = line->text().toInt();\n    if( lineno <= 0 ) {\n        return;\n    }\n    emit gotoLine(filename, lineno - 1 );\n}\n\nvoid DlvDebugger::dbclickItem(QModelIndex index, LiteApi::DEBUG_MODEL_TYPE type)\n{\n\n}\n\nvoid DlvDebugger::expandItem(QModelIndex index, LiteApi::DEBUG_MODEL_TYPE type)\n{\n    QStandardItem *parent = 0;\n    if (type == LiteApi::VARS_MODEL) {\n        parent = m_varsModel->itemFromIndex(index);\n    } else if (type == LiteApi::WATCHES_MODEL) {\n        parent = m_watchModel->itemFromIndex(index);\n    }\n    if (!parent) {\n        return;\n    }\n    if (parent->data(VarExpanded).toInt() == 1) {\n        return;\n    }\n    parent->setData(1,VarExpanded);\n}\n\nvoid DlvDebugger::setInitBreakTable(const QMultiMap<QString,int> &bks)\n{\n    m_initBks = bks;\n}\n\nvoid DlvDebugger::setInitWatchList(const QStringList &names)\n{\n    foreach (QString name, names) {\n        m_watchNameMap.insert(name,\"\");\n    }\n}\n\nvoid DlvDebugger::insertBreakPoint(const QString &fileName, int line)\n{\n    insertBreakPointHelper(fileName,line,false);\n}\n\nvoid DlvDebugger::insertBreakPointHelper(const QString &fileName, int line, bool force)\n{\n    line++;\n    QString location = QString(\"%1:%2\").arg(fileName).arg(line);\n    if (m_locationBkMap.contains(location)) {\n        return;\n    }\n    QString id = QString(\"bk%1\").arg(qHash(location));\n    m_locationBkMap.insert(location,id);\n    QStringList args;\n    args << \"break\";\n    args << id;\n    args << QString(\"%1:%2\").arg(fileName).arg(line);\n    command_helper(args.join(\" \").toUtf8(),force);\n}\n\nvoid DlvDebugger::removeBreakPoint(const QString &fileName, int line)\n{\n    line++;\n    QString location = QString(\"%1:%2\").arg(fileName).arg(line);\n    QString id = m_locationBkMap.value(location);\n    if (id.isEmpty()) {\n        return;\n    }\n    m_locationBkMap.remove(location);\n    QStringList args;\n    args << \"clear\";\n    args << id;\n    command_helper(args.join(\" \").toUtf8(),false);\n}\n\nbool DlvDebugger::findBreakPoint(const QString &fileName, int line)\n{\n    QString location = QString(\"%1:%2\").arg(fileName).arg(line);\n    QString id = m_locationBkMap.value(location);\n    return m_locationBkMap.contains(location);\n}\n\nvoid DlvDebugger::command_helper(const QByteArray &cmd, bool force)\n{\n    if (m_writeDataBusy && !force) {\n        return;\n    }\n    m_writeDataBusy = true;\n    m_lastCmd = cmd;\n\n    if (m_dlvRunningCmdList.contains(cmd)) {\n        m_asyncItem->removeRows(0,m_asyncItem->rowCount());\n        m_asyncItem->setText(\"runing\");\n    }\n#ifdef Q_OS_WIN\n    m_process->write(cmd+\"\\r\\n\");\n#else\n    m_process->write(cmd+\"\\n\");\n#endif\n}\n\nvoid DlvDebugger::enterAppText(const QString &text)\n{\n    m_updateCmdList.clear();\n    m_updateCmdHistroy.clear();\n\n    QString cmd = text.trimmed();\n    if (cmd == \"r\" || cmd == \"restart\") {\n        m_processId.clear();\n    }\n\n    if (m_headlessMode) {\n        m_headlessProcess->write(text.toUtf8());\n    } else {\n        m_process->write(text.toUtf8());\n    }\n}\n\nvoid DlvDebugger::enterDebugText(const QString &text)\n{\n    m_updateCmdList.clear();\n    m_updateCmdHistroy.clear();\n\n    QString cmd = text.trimmed();\n    if (cmd == \"r\" || cmd == \"restart\") {\n        m_processId.clear();\n    }\n\n    command(text.toUtf8());\n}\n\nvoid  DlvDebugger::command(const QByteArray &cmd)\n{\n    command_helper(cmd,false);\n}\n\nvoid DlvDebugger::readStdError()\n{\n    //Process 4084 has exited with status 0\n    QString data = QString::fromUtf8(m_process->readAllStandardError());\n   // qDebug() << data << m_processId;\n    //QRegExp reg;\n    emit debugLog(LiteApi::DebugConsoleLog,data);\n    foreach (QString line, data.split(\"\\n\",qtSkipEmptyParts)) {\n        if (line.startsWith(\"Process \"+m_processId)) {\n            m_processId.clear();\n            this->stop();\n        }\n    }\n}\n\n\n\n//static bool isNameChar(char c)\n//{\n//    // could be 'stopped' or 'shlibs-added'\n//    return (c >= 'a' && c <= 'z') || c == '-';\n//}\n\nvoid DlvDebugger::handleResponse(const QByteArray &buff)\n{\n    if (buff.isEmpty()) {\n        return;\n    }\n    if (!m_headlessMode) {\n        if (m_processId.isEmpty()) {\n            //Process restarted with PID\n            int n = buff.indexOf(\"PID\");\n            if (n != -1) {\n                m_processId = buff.mid(n+3).replace(\"(dlv)\",\"\").trimmed();\n            }\n        }\n    }\n    //Process restarted with PID 4532\n    //> main.main() H:/goproj/src/hello/main.go:13 (hits goroutine(1):1 total:1) (PC: 0x401172)\n    //> main.main() H:/goproj/src/hello/main.go:14 (PC: 0x401179)\n    //> main.main() H:/goproj/src/hello/main.go:21 (hits goroutine(1):1 total:1) (PC: 0x40161a)\n    //> fmt.Println() c:/go/go1.6/src/fmt/print.go:263 (PC: 0x45aeca)\n    //> runtime.convT2E() c:/go/go1.6/src/runtime/iface.go:128 (PC: 0x40caaa)\"\n    //> github.com/derekparker/delve/cmd/dlv/cmds.New() /src/github.com/derekparker/delve/cmd/dlv/cmds/commands.go:61 (PC: 0x45d09f)\n    //> [bk6767010] main.test() H:/goproj/src/hello/main.go:12 (hits goroutine(1):1 total:1) (PC: 0x401066)\n    //> [bk101903173] github.com/derekparker/delve/vendor/github.com/spf13/cobra.(*Command).Execute() github.com/derekparker/delve/vendor/github.com/spf13/cobra/command.go:615 (hits goroutine(1):1 total:1) (PC: 0x524ea6)\n    //> qlang.io/qlang%2espec%2ev1.Import()\n    //> main.main() goapi/_test/_testmain.go:50 (hits goroutine(1):1 total:1) (PC: 0x4011ca)\n    if (buff.contains(\"> \")) {\n        static QRegExp reg(\">(\\\\s+\\\\[[\\\\w\\\\d]+\\\\])?\\\\s+([\\\\w\\\\d_\\\\.\\\\%\\\\*\\\\(\\\\)\\\\/]+)\\\\(\\\\)\\\\s+((?:[a-zA-Z]:)?[\\\\w\\\\d_@\\\\s\\\\-\\\\/\\\\.\\\\\\\\]+):(\\\\d+)\\\\s?(.*)\\\\s?(\\\\(PC:\\\\s+.*)\");\n        int n = reg.indexIn(QString::fromUtf8(buff));\n        if (n < 0) {\n            return;\n        }\n        QString fileName = reg.cap(3);\n        if (fileName.startsWith(\"./\")) {\n            fileName = QDir::cleanPath(m_process->workingDirectory()+\"/\"+fileName);\n        }\n        QString line = reg.cap(4);\n\n        if (!fileName.isEmpty() && !line.isEmpty()) {\n            bool ok = false;\n            int n = line.toInt(&ok);\n            if (ok) {\n                m_lastFileName = fileName;\n                m_lastFileLine = n-1;\n                //check step out\n                emit setCurrentLine(fileName,n-1);\n            }\n        }\n        m_handleState.setStopped(true);\n\n        m_asyncItem->removeRows(0,m_asyncItem->rowCount());\n        m_asyncItem->setText(\"stopped\");\n        QString func = reg.cap(2).trimmed();\n        //hack\n        if (func.contains(\"%\")) {\n            func.replace(\"%2e\",\".\");\n        }\n        QString hits = reg.cap(5).trimmed();\n        QString pc = reg.cap(6).trimmed();\n        int pos = pc.indexOf('\\n');\n        if (pos != -1) {\n            pc.truncate(pos);\n        }\n        if (!hits.isEmpty()) {\n            m_asyncItem->appendRow(new QStandardItem(hits));\n        }\n        m_asyncItem->appendRow(new QStandardItem(pc));\n        m_asyncItem->appendRow(new QStandardItem(\"func=\"+func));\n        m_asyncItem->appendRow(new QStandardItem(\"file=\"+fileName));\n        m_asyncItem->appendRow(new QStandardItem(\"line=\"+line));\n        emit setExpand(LiteApi::ASYNC_MODEL,m_asyncModel->indexFromItem(m_asyncItem),true);\n    }\n}\n\nvoid DlvDebugger::cleanup()\n{\n    stop();\n}\n\nvoid DlvDebugger::clear()\n{\n    m_headlessInitAddress = false;\n    m_lastFileLine = 0;\n    m_lastFileName.clear();\n    m_dlvInit = false;\n    m_dlvExit = false;\n    m_readDataBusy = false;\n    m_writeDataBusy = false;\n    m_handleState.clear();\n    m_varNameMap.clear();\n    m_watchNameMap.clear();\n    m_watchList.clear();\n    m_updateCmdHistroy.clear();\n    m_nameItemMap.clear();\n    m_varChangedItemList.clear();\n    m_inbuffer.clear();\n    m_locationBkMap.clear();\n    m_cmdList.clear();\n    m_framesModel->removeRows(0,m_framesModel->rowCount());\n    m_libraryModel->removeRows(0,m_libraryModel->rowCount());\n    m_varsModel->removeRows(0,m_varsModel->rowCount());\n    m_watchModel->removeRows(0,m_watchModel->rowCount());\n}\n\nvoid DlvDebugger::initDebug()\n{\n    //get thread id\n    m_processId.clear();\n\n    if (!m_headlessMode) {\n        command_helper(\"restart\",true);\n    }\n\n    QMapIterator<QString,int> i(m_initBks);\n\n    while (i.hasNext()) {\n        i.next();\n        QString fileName = i.key();\n        QList<int> lines = m_initBks.values(fileName);\n        foreach(int line, lines) {\n            insertBreakPointHelper(fileName,line,true);\n        }\n    }\n    if (m_liteApp->settings()->value(LITEDEBUG_AUTOBREAKMAIN,false).toBool()) {\n        command_helper(\"break main.main\",true);\n    }\n    command_helper(\"continue\",true);\n\n    emit debugLoaded();\n}\n\nstatic QString valueToolTip(const QString &value)\n{\n    int offset = 0;\n    QString toolTip;\n    QString text = value;\n    text.replace(\", \",\",\");\n    for (int i = 0; i < text.size(); i++) {\n//        if (text[i] == '[')  {\n//            int j = i;\n//            for (; j++; j < text.size()) {\n//                if (text[j] == ']') {\n//                    break;\n//                }\n//            }\n//            toolTip += text.mid(i,j+1-i);\n//            i = j;\n//            continue;\n//        }\n        if (text[i] == '{') {\n            if ( (i+1) < text.size() && text[i+1] == '}' ) {\n                toolTip += \"{}\";\n                i++;\n            } else {\n                offset++;\n                toolTip += text[i];\n                toolTip += \"\\n\"+QString(\"\\t\").repeated(offset);\n            }\n        } else if (text[i] == '}') {\n            offset--;\n            toolTip += \"\\n\"+QString(\"\\t\").repeated(offset);\n            toolTip += text[i];\n        } else if (text[i] == ',') {\n            toolTip += text[i];\n            int pos = text.lastIndexOf(QRegExp(\"\\\\{|\\\\[|\\\\]|\\\\}\"),i-1);\n            if (pos != -1 && text[pos] == '[') {\n                continue;\n            }\n            toolTip += \"\\n\"+QString(\"\\t\").repeated(offset);\n        } else {\n            toolTip += text[i];\n        }\n    }\n    return toolTip;\n}\n\nvoid DlvDebugger::readStdOutput()\n{\n    QByteArray data = m_process->readAllStandardOutput();\n    if (!m_dlvInit) {\n        m_dlvInit = true;\n        initDebug();\n    }\n    m_writeDataBusy = false;\n\n    if (m_dlvExit) {\n        return;\n    }\n\n    int newstart = 0;\n    int scan = m_inbuffer.size();\n    m_inbuffer.append(data);\n\n    //hack check (dlv)\n    static bool first_check = true;\n    static bool dlv_check = false;\n    if (first_check) {\n        first_check = false;\n        dlv_check = m_inbuffer.indexOf(\"(dlv)\") != -1;\n    }\n    if (dlv_check && !m_inbuffer.endsWith(\"(dlv) \")) {\n        return;\n    }\n\n    // This can trigger when a dialog starts a nested event loop.\n    if (m_readDataBusy)\n        return;\n    QStringList dataList;\n    while (newstart < m_inbuffer.size()) {\n        int start = newstart;\n        int end = m_inbuffer.indexOf('\\n', scan);\n        if (end < 0) {\n            //m_inbuffer.remove(0, start);\n            //return;\n            end = m_inbuffer.size()-1;\n        }\n        newstart = end + 1;\n        scan = newstart;\n        if (end == start)\n            continue;\n#ifdef Q_OS_WIN\n        if (m_inbuffer.at(end - 1) == '\\r') {\n            --end;\n            if (end == start)\n                continue;\n        }\n#endif\n        m_readDataBusy = true;\n        QByteArray data = QByteArray::fromRawData(m_inbuffer.constData() + start, end - start);\n        dataList.append(QString::fromUtf8(data));\n        handleResponse(data);\n        m_readDataBusy = false;\n    }\n\n//    if (m_checkFuncDecl) {\n//        if (m_lastFileName == m_funcDecl.fileName && m_lastFileLine >= m_funcDecl.start && m_lastFileLine <= m_funcDecl.end) {\n//            command(\"next\");\n//            m_inbuffer.clear();\n//            return;\n//        }\n//        m_checkFuncDecl = false;\n//        m_funcDecl.clear();\n//    }\n\n    bool emitLog = true;\n    if (!m_updateCmdHistroy.isEmpty()) {\n        QString cmdHistroy = m_updateCmdHistroy.takeFirst();\n        if (cmdHistroy == \"stack\") {\n//            0  0x000000000040135a in main.main\n//               at H:/goproj/src/hello/main.go:24\n//            1  0x000000000042c629 in runtime.main\n//               at c:/go/go1.6/src/runtime/proc.go:188\n//            2  0x0000000000456560 in runtime.goexit\n//               at c:/go/go1.6/src/runtime/asm_amd64.s:1998\n             m_framesModel->removeRows(0,m_framesModel->rowCount());\n             QString data = QString::fromUtf8(m_inbuffer);\n             QStringList dataList = data.split(\"\\n\",qtSkipEmptyParts);\n             bool head = true;\n             QList<QStandardItem*> items;\n             foreach (QString data, dataList) {\n                 if (head) {\n                    // data.\n                     items.clear();\n                     QStringList ar = data.split(\" \",qtSkipEmptyParts);\n                     if (ar.size() == 4) {\n                         items << new QStandardItem(ar[0]);\n                         items << new QStandardItem(ar[1]);\n                         items << new QStandardItem(ar[3]);\n                     }\n                 } else {\n                    data = data.trimmed();\n                    if (data.startsWith(\"at\")) {\n                        data = data.mid(2).trimmed();\n                        int n = data.lastIndexOf(\":\");\n                        if (n > 0) {\n                            items << new QStandardItem(data.left(n));\n                            items << new QStandardItem(data.mid(n+1));\n                            m_framesModel->appendRow(items);\n                        }\n                    }\n                 }\n                 head = !head;\n             }\n        } else if (cmdHistroy == \"stack 0 -full\") {\n            // s = \" \\x04S\\x00\\x00\\x00\\x00\\x00\\x1d\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n            // v = []int len: 0, cap: 4257785, []\"\n            // args = []string len: 1, cap: 1, [\"H:\\\\goproj\\\\src\\\\hello\\\\debug\"]\n            m_varsModel->removeRows(0,m_varsModel->rowCount());\n            QString data = QString::fromUtf8(m_inbuffer);\n            QStringList dataList = data.split(\"\\n\",qtSkipEmptyParts);\n            QMap<QString,QString> nameMap;\n            foreach(QString text, dataList) {\n                int n = text.indexOf(\"=\");\n                if (n == -1) {\n                    continue;\n                }\n                QString name = text.left(n).trimmed();\n                QString value = text.mid(n+1).trimmed();\n                n = value.indexOf(\"(unreadable\");\n                if (n != -1) {\n                    value = value.left(n)+\"(unreadable ...\";\n                }\n                nameMap.insert(name,value);\n                QStandardItem *nameItem = new QStandardItem(name);\n                QStandardItem *valueItem = new QStandardItem(value);\n                valueItem->setToolTip(valueToolTip(value));\n                QMap<QString,QString>::iterator it = m_varNameMap.find(name);\n                if (it != m_varNameMap.end() && it.value() != value) {\n#if QT_VERSION >= 0x050000\n        valueItem->setData(QColor(Qt::red),Qt::TextColorRole);\n#else\n        valueItem->setData(Qt::red,Qt::TextColorRole);\n#endif\n                }\n                m_varsModel->appendRow(QList<QStandardItem*>() << nameItem << valueItem);\n            }\n            m_varNameMap = nameMap;\n        } else if (cmdHistroy.startsWith(\"vars \")) {\n            foreach (QString data, QString::fromUtf8(m_inbuffer).split(\"\\n\",qtSkipEmptyParts)) {\n                int n = data.indexOf(\"=\");\n                if (n >= 0) {\n                    QString name = data.left(n-1);\n                    QString value = data.mid(n+1).trimmed();\n                    if (name.isEmpty() || value.isEmpty() || name.contains(\" \")) {\n                        continue;\n                    }\n\n                    bool find = false;\n                    for (int i = 0; i < m_watchModel->rowCount(); i++) {\n                        QStandardItem *nameItem = m_watchModel->item(i,0);\n                        QStandardItem *valueItem = m_watchModel->item(i,1);\n                        if (nameItem->text() == name) {\n                            find = true;\n                            if (m_watchNameMap.value(name) == value) {\n#if QT_VERSION >= 0x050000\n                                valueItem->setData(QColor(Qt::black),Qt::TextColorRole);\n#else\n                                valueItem->setData(Qt::black,Qt::TextColorRole);\n#endif\n                            } else {\n#if QT_VERSION >= 0x050000\n                                valueItem->setData(QColor(Qt::red),Qt::TextColorRole);\n#else\n                                valueItem->setData(Qt::red,Qt::TextColorRole);\n#endif\n                                valueItem->setText(value);\n                            }\n                        }\n                    }\n                    if (!find) {\n                        QStandardItem *nameItem = new QStandardItem(name);\n                        nameItem->setData(name,VarNameRole);\n                        QStandardItem *valueItem = new QStandardItem(value);\n                        valueItem->setToolTip(valueToolTip(value));\n                        m_watchModel->appendRow(QList<QStandardItem*>() << nameItem << valueItem );\n\n                        emit watchCreated(name,name);\n                    }\n                    m_watchNameMap.insert(name,value);\n                }\n            }\n        }\n        emitLog = false;\n    } else if (!m_headlessMode) {\n         emit debugLog(LiteApi::DebugApplationLog,QString::fromUtf8(m_inbuffer));\n    }\n    if (emitLog) {\n         emit debugLog(LiteApi::DebugConsoleLog,QString::fromUtf8(m_inbuffer));\n    }\n    m_inbuffer.clear();\n\n    if (m_handleState.exited() && !m_dlvExit) {\n        m_dlvExit = true;\n        stop();\n    } else if (m_handleState.stopped()) {\n        m_updateCmdList.clear();\n        m_updateCmdList << \"stack\" << \"stack 0 -full\";\n        foreach (QString s, m_watchNameMap.keys()) {\n            if (s.isEmpty()) {\n                continue;\n            }\n            m_updateCmdList << \"vars \"+QRegExp::escape(s);\n        }\n    }\n\n    m_handleState.clear();\n\n    if (!m_updateCmdList.isEmpty()) {\n        foreach(QString cmd, m_updateCmdList.takeFirst().split(\"|\")) {\n            m_updateCmdHistroy.push_back(cmd.trimmed());\n            command(cmd.trimmed().toUtf8());\n        }\n    }\n}\n\nvoid DlvDebugger::finished(int code)\n{\n    emit debugStoped();\n    emit debugLog(LiteApi::DebugRuntimeLog,QString(\"Dlv exited with code %1\").arg(code));\n    cleanup();\n}\n\nvoid DlvDebugger::error(QProcess::ProcessError err)\n{\n    emit debugStoped();\n    emit debugLog(LiteApi::DebugRuntimeLog,QString(\"Dlv error! %1\").arg(ProcessEx::processErrorText(err)));\n    cleanup();\n}\n\nvoid DlvDebugger::readTty(const QByteArray &data)\n{\n    emit debugLog(LiteApi::DebugApplationLog,QString::fromUtf8(data));\n}\n\nvoid DlvDebugger::headlessReadStdError()\n{\n    QString data = QString::fromUtf8(m_headlessProcess->readAllStandardError());\n    //qDebug() << data;\n    emit debugLog(LiteApi::DebugErrorLog,data);\n}\n\nvoid DlvDebugger::headlessReadStdOutput()\n{\n    QString data = QString::fromUtf8(m_headlessProcess->readAllStandardOutput());\n    //API server listening at: 127.0.0.1:54151\n    if (!m_headlessInitAddress) {\n        QString tmp = data.trimmed();\n        QString addr;\n        if (tmp.startsWith(\"API\")) {\n            int pos = tmp.lastIndexOf(\" \");\n            if (pos != -1) {\n                addr = tmp.mid(pos+1);\n                if (addr.indexOf(\":\") > 0) {\n                    m_headlessInitAddress = true;\n                }\n            }\n        }\n        if (m_headlessInitAddress) {\n            QStringList argsList;\n            argsList << \"connect\" << addr;\n#ifdef Q_OS_WIN\n            m_process->setNativeArguments(argsList.join(\" \"));\n            m_process->start(\"\\\"\"+m_dlvFilePath+\"\\\"\");\n#else\n            m_process->start(m_dlvFilePath + \" \" + argsList.join(\" \"));\n#endif\n            QString log = QString(\"%1 %2 [%3]\").arg(m_dlvFilePath).arg(argsList.join(\" \")).arg(m_process->workingDirectory());\n           emit debugLog(LiteApi::DebugRuntimeLog,log);\n        }\n    }\n\n    emit debugLog(LiteApi::DebugApplationLog,data);\n}\n\nvoid DlvDebugger::headlessFinished(int code)\n{\n    emit debugStoped();\n    emit debugLog(LiteApi::DebugRuntimeLog,QString(\"Dlv server exited with code %1\").arg(code));\n    cleanup();\n}\n\nvoid DlvDebugger::headlessError(QProcess::ProcessError err)\n{\n    emit debugStoped();\n    emit debugLog(LiteApi::DebugRuntimeLog,QString(\"Dlv server error! %1\").arg(ProcessEx::processErrorText(err)));\n    cleanup();\n}\n"
  },
  {
    "path": "liteidex/src/plugins/dlvdebugger/dlvdebugger.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: dlvdebugger.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef DLVDEBUGGER_H\n#define DLVDEBUGGER_H\n\n#include \"litedebugapi/litedebugapi.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"litettyapi/litettyapi.h\"\n#include \"qtc_gdbmi/gdbmi.h\"\n\n#include <QSet>\n\nclass QProcess;\nclass LiteProcess;\nclass DlvHandleState\n{\npublic:\n    DlvHandleState() : m_exited(false),m_stopped(false) {}\n    void clear()\n    {\n        m_reason.clear();\n        m_exited = false;\n        m_stopped = false;\n    }\n    void setExited(bool b) {m_exited = b;}\n    void setStopped(bool b) {m_stopped = b;}\n    void setReason(const QByteArray &reason) { m_reason = reason; }\n    bool exited() const { return m_exited; }\n    bool stopped() const { return m_stopped; }\n    QByteArray reason() const { return m_reason; }\npublic:\n    bool       m_exited;\n    bool       m_stopped;\n    QByteArray m_reason;\n};\n\nclass QStandardItemModel;\nclass QStandardItem;\n\nclass DlvDebugger : public LiteApi::IDebugger\n{\n    Q_OBJECT\npublic:\n    DlvDebugger(LiteApi::IApplication *app, QObject *parent = 0);\n    ~DlvDebugger();\n    enum VarItemDataRole{\n        VarNameRole = Qt::UserRole + 1,\n        VarNumChildRole,\n        VarExpanded\n    };\npublic:\n    virtual QString mimeType() const;\n    virtual QAbstractItemModel *debugModel(LiteApi::DEBUG_MODEL_TYPE type);\n    virtual void setWorkingDirectory(const QString &dir);\n    virtual void setEnvironment (const QStringList &environment);\n    virtual bool start(const QString &cmd, const QString &arguments);\n    virtual void stop();\n    virtual bool isRunning();\n    virtual void stepOver();\n    virtual void stepInto();\n    virtual void stepOut();\n    virtual void continueRun();\n    virtual void runToLine(const QString &fileName, int line);\n    virtual void command(const QByteArray &cmd);\n    virtual void enterAppText(const QString &text);\n    virtual void enterDebugText(const QString &text);\n    virtual void expandItem(QModelIndex index, LiteApi::DEBUG_MODEL_TYPE type);\n    virtual void setInitBreakTable(const QMultiMap<QString,int> &bks);\n    virtual void setInitWatchList(const QStringList &names);\n    virtual void insertBreakPoint(const QString &fileName, int line);\n    virtual void removeBreakPoint(const QString &fileName, int line);\n    bool findBreakPoint(const QString &fileName,int line);\npublic:\n    virtual void createWatch(const QString &var);\n    virtual void removeWatch(const QString &value);\n    virtual void removeAllWatch();\n    virtual void dbclickItem(QModelIndex index, LiteApi::DEBUG_MODEL_TYPE type);\n    void showFrame(QModelIndex index);\nprotected:\n    void insertBreakPointHelper(const QString &fileName, int line, bool force);\n    void command_helper(const QByteArray &cmd, bool force);\npublic slots:\n    void appLoaded();\n    void readStdError();\n    void readStdOutput();\n    void finished(int);\n    void error(QProcess::ProcessError);\n    void readTty(const QByteArray &data);\n    void headlessReadStdError();\n    void headlessReadStdOutput();\n    void headlessFinished(int);\n    void headlessError(QProcess::ProcessError err);\nprotected:\n    void handleResponse(const QByteArray &buff);\nprotected:\n    void cleanup();\n    void clear();\n    void initDebug();\nprotected:\n    QString                 m_lastFileName;\n    int                     m_lastFileLine;\n    LiteApi::IApplication   *m_liteApp;\n    LiteApi::IEnvManager    *m_envManager;\n    QMap<QString,QString>   m_watchNameMap;\n    QStringList             m_updateCmdList;\n    QStringList             m_updateCmdHistroy;\n    QString                 m_lastCmd;\n    QString                 m_processId;\n    LiteProcess *m_process;\n    LiteProcess *m_headlessProcess;\n    QStandardItemModel *m_asyncModel;\n    QStandardItemModel *m_varsModel;\n    QStandardItemModel *m_watchModel;\n    QStandardItemModel *m_framesModel;\n    QStandardItemModel *m_libraryModel;\n    QStandardItem   *m_asyncItem;\n    QMap<QString,QString> m_varNameMap;\n    QList<QString> m_watchList;\n    QMap<QString,QStandardItem*> m_nameItemMap;\n    QSet<QStandardItem*> m_varChangedItemList;\n    QString m_dlvFilePath;\n    QString m_runtimeFilePath;\n    QByteArray m_inbuffer;\n    DlvHandleState m_handleState;\n    QMultiMap<QString,int>  m_initBks;\n    QMap<QString,QString> m_locationBkMap;\n    QList<QByteArray> m_cmdList;\n    QList<QByteArray> m_dlvRunningCmdList;\n    bool    m_readDataBusy;\n    bool    m_writeDataBusy;\n    bool    m_dlvInit;\n    bool    m_dlvExit;\n    bool    m_headlessInitAddress;\n    bool    m_headlessMode;\n};\n\n#endif // DLVDEBUGGER_H\n"
  },
  {
    "path": "liteidex/src/plugins/dlvdebugger/dlvdebugger.pro",
    "content": "TARGET = dlvdebugger\nTEMPLATE = lib\n\nCONFIG += liteide_use_dlvclient\n\ninclude(../../liteideplugin.pri)\ninclude(../../api/litedebugapi/litedebugapi.pri)\ninclude(../../utils/fileutil/fileutil.pri)\ninclude(../../utils/processex/processex.pri)\ninclude(../../3rdparty/qtc_gdbmi/qtc_gdbmi.pri)\n\ncontains(CONFIG, liteide_use_dlvclient) {\nQT += network\nDEFINES += USE_DLVCLIENT\ninclude(../../utils/dlvclient/dlvclient.pri)\ninclude(../../3rdparty/qjsonrpc/qjsonrpc.pri)\n\nSOURCES += dlvrpcdebugger.cpp\n\nHEADERS += dlvrpcdebugger.h\n}\n\nDEFINES += GDBDEBUGER_LIBRARY\n\nSOURCES += dlvdebuggerplugin.cpp \\\n    dlvdebugger.cpp \\\n    dlvdebuggeroptionfactory.cpp \\\n    dlvdebuggeroption.cpp\n\nHEADERS += dlvdebuggerplugin.h\\\n        dlvdebugger_global.h \\\n    dlvdebugger.h \\\n    dlvdebuggeroptionfactory.h \\\n    dlvdebuggeroption.h\n\nFORMS += \\\n    dlvdebuggeroption.ui\n"
  },
  {
    "path": "liteidex/src/plugins/dlvdebugger/dlvdebugger_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: dlvdebugger_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef DLVDEBUGGER_GLOBAL_H\n#define DLVDEBUGGER_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(GDBDEBUGER_LIBRARY)\n#  define GDBDEBUGERSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define GDBDEBUGERSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#define OPTION_DLVDEBUGGER \"option/dlvdebugger\"\n#define DLVDEBUGGER_EXTFLAGS \"dlvdebugger/extflags\"\n#define DLVDEBUGGER_ASMSYNTAX \"dlvdebugger/asmsyntax\"\n\n#endif // DLVDEBUGGER_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/dlvdebugger/dlvdebuggeroption.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: dlvdebuggeroption.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"dlvdebuggeroption.h\"\n#include \"ui_dlvdebuggeroption.h\"\n#include \"dlvdebugger_global.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nDlvDebuggerOption::DlvDebuggerOption(LiteApi::IApplication *app,QObject *parent) :\n    LiteApi::IOption(parent),\n    m_liteApp(app),\n    m_widget(new QWidget),\n    ui(new Ui::DlvDebuggerOption)\n{\n    ui->setupUi(m_widget);\n}\n\nDlvDebuggerOption::~DlvDebuggerOption()\n{\n    delete m_widget;\n    delete ui;\n}\n\nQWidget *DlvDebuggerOption::widget()\n{\n    return m_widget;\n}\n\nQString DlvDebuggerOption::name() const\n{\n    return \"DlvDebugger\";\n}\n\nQString DlvDebuggerOption::mimeType() const\n{\n    return OPTION_DLVDEBUGGER;\n}\n\nvoid DlvDebuggerOption::load()\n{\n    ui->flagsLineEdit->setText(m_liteApp->settings()->value(DLVDEBUGGER_EXTFLAGS,\"\").toString());\n    int id = m_liteApp->settings()->value(DLVDEBUGGER_ASMSYNTAX,1).toInt();\n    if (id >= 0 && id < ui->buttonGroup->buttons().size()) {\n        ui->buttonGroup->buttons().at(id)->setChecked(true);\n    }\n}\n\nvoid DlvDebuggerOption::save()\n{\n    m_liteApp->settings()->setValue(DLVDEBUGGER_EXTFLAGS,ui->flagsLineEdit->text());\n    int size = ui->buttonGroup->buttons().size();\n    for (int i = 0; i < size; i++) {\n        if (ui->buttonGroup->buttons().at(i)->isChecked()) {\n            m_liteApp->settings()->setValue(DLVDEBUGGER_ASMSYNTAX,i);\n            break;\n        }\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/dlvdebugger/dlvdebuggeroption.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: dlvdebuggeroption.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef DLVDEBUGGEROPTION_H\n#define DLVDEBUGGEROPTION_H\n\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class DlvDebuggerOption;\n}\n\nclass DlvDebuggerOption : public LiteApi::IOption\n{\n    Q_OBJECT\n\npublic:\n    explicit DlvDebuggerOption(LiteApi::IApplication *app, QObject *parent = 0);\n    ~DlvDebuggerOption();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void load();\n    virtual void save();\nprivate:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget           *m_widget;\n    Ui::DlvDebuggerOption *ui;\n};\n\nbool isGdbDebuggerUseTty(LiteApi::IApplication *app);\n\n#endif // DLVDEBUGGEROPTION_H\n"
  },
  {
    "path": "liteidex/src/plugins/dlvdebugger/dlvdebuggeroption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>DlvDebuggerOption</class>\n <widget class=\"QWidget\" name=\"DlvDebuggerOption\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>473</width>\n    <height>213</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox\">\n     <property name=\"title\">\n      <string>Delve Pass Flags</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n      <item>\n       <widget class=\"QLabel\" name=\"label\">\n        <property name=\"text\">\n         <string>example --check-go-version=false</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QLineEdit\" name=\"flagsLineEdit\"/>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QGroupBox\" name=\"GroupBox\">\n     <property name=\"title\">\n      <string>Assembly Syntax</string>\n     </property>\n     <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n      <item>\n       <widget class=\"QRadioButton\" name=\"radioButton\">\n        <property name=\"text\">\n         <string>Gnu</string>\n        </property>\n        <attribute name=\"buttonGroup\">\n         <string notr=\"true\">buttonGroup</string>\n        </attribute>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QRadioButton\" name=\"radioButton_2\">\n        <property name=\"text\">\n         <string>Intel</string>\n        </property>\n        <attribute name=\"buttonGroup\">\n         <string notr=\"true\">buttonGroup</string>\n        </attribute>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QRadioButton\" name=\"radioButton_3\">\n        <property name=\"text\">\n         <string>Go</string>\n        </property>\n        <attribute name=\"buttonGroup\">\n         <string notr=\"true\">buttonGroup</string>\n        </attribute>\n       </widget>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <spacer name=\"verticalSpacer\">\n     <property name=\"orientation\">\n      <enum>Qt::Vertical</enum>\n     </property>\n     <property name=\"sizeHint\" stdset=\"0\">\n      <size>\n       <width>20</width>\n       <height>40</height>\n      </size>\n     </property>\n    </spacer>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n <buttongroups>\n  <buttongroup name=\"buttonGroup\"/>\n </buttongroups>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/dlvdebugger/dlvdebuggeroptionfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: dlvdebuggeroptionfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"dlvdebuggeroption.h\"\n#include \"dlvdebuggeroptionfactory.h\"\n#include \"dlvdebugger_global.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nDlvDebuggerOptionFactory::DlvDebuggerOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n}\n\nQStringList DlvDebuggerOptionFactory::mimeTypes() const\n{\n    return QStringList() << OPTION_DLVDEBUGGER;\n}\n\nLiteApi::IOption *DlvDebuggerOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == OPTION_DLVDEBUGGER) {\n        return new DlvDebuggerOption(m_liteApp,this);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/dlvdebugger/dlvdebuggeroptionfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: dlvdebuggeroptionfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef DLVDEBUGGEROPTIONFACTORY_H\n#define DLVDEBUGGEROPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass DlvDebuggerOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n    DlvDebuggerOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // DLVDEBUGGEROPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/dlvdebugger/dlvdebuggerplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gdbdebuggerplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"dlvdebuggerplugin.h\"\n#include \"dlvdebugger.h\"\n\n#ifdef USE_DLVCLIENT\n#include \"dlvrpcdebugger.h\"\n#endif\n\n#include \"dlvdebuggeroptionfactory.h\"\n#include \"litedebugapi/litedebugapi.h\"\n\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nDlvDebuggerPlugin::DlvDebuggerPlugin()\n{\n}\n\nbool DlvDebuggerPlugin::load(LiteApi::IApplication *app)\n{\n    LiteApi::IDebuggerManager *manager = LiteApi::getDebugManager(app);\n    if (!manager) {\n        return false;\n    }\n#ifdef USE_DLVCLIENT\n    DlvRpcDebugger *debug = new DlvRpcDebugger(app);\n#else\n    DlvDebugger *debug = new DlvDebugger(app);\n#endif\n    manager->addDebugger(debug);\n    manager->setCurrentDebugger(debug);\n    app->optionManager()->addFactory(new DlvDebuggerOptionFactory(app,this));\n    return true;\n}\n\nQStringList DlvDebuggerPlugin::dependPluginList() const\n{\n    return QStringList() << \"plugin/litedebug\";\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/dlvdebugger/dlvdebuggerplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: dlvdebuggerplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef DLVDEBUGGERPLUGIN_H\n#define DLVDEBUGGERPLUGIN_H\n\n#include \"dlvdebugger_global.h\"\n#include \"liteapi/liteapi.h\"\n#include <QtPlugin>\n\nclass DlvDebuggerPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    DlvDebuggerPlugin();\n    virtual bool load(LiteApi::IApplication *app);\n    virtual QStringList dependPluginList() const;\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<DlvDebuggerPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.DlvDebuggerPlugin\")\n#endif\npublic:\n    PluginFactory()\n    {\n        m_info->setId(\"plugin/DlvDebugger\");\n        m_info->setName(\"DlvDebugger\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setVer(\"X38.2\");\n        m_info->setInfo(\"Core Delve Debugger\");\n        m_info->setMustLoad(true);\n    }\n};\n\n#endif // DLVDEBUGGERPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/dlvdebugger/dlvrpcdebugger.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: dlvrpcdebugger.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"dlvrpcdebugger.h\"\n#include \"fileutil/fileutil.h\"\n#include \"processex/processex.h\"\n#include \"dlvdebuggeroption.h\"\n#include \"dlvdebugger_global.h\"\n#include \"../litedebug/litedebug_global.h\"\n\n#include <QStandardItemModel>\n#include <QProcess>\n#include <QFile>\n#include <QDir>\n#include <QFileInfo>\n#include <QTextCodec>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nstatic void GdbMiValueToItem(QStandardItem *item, const GdbMiValue &value)\n{\n    switch (value.type()) {\n    case GdbMiValue::Invalid:\n        item->appendRow(new QStandardItem(\"Invalid\"));\n        break;\n    case GdbMiValue::Const:\n        if (value.name().isEmpty()) {\n            item->appendRow(new QStandardItem(QString(value.data())));\n        } else {\n            item->appendRow(new QStandardItem(QString(value.name()+\"=\"+value.data())));\n        }\n        break;\n    case GdbMiValue::List: {\n            QStandardItem *in = new QStandardItem(QString(value.name()));\n            item->appendRow(in);\n            for (int i = 0; i < value.childCount(); i++) {\n                QStandardItem *iv = new QStandardItem(QString(\"[%1]\").arg(i));\n                in->appendRow(iv);\n                GdbMiValueToItem(iv,value.childAt(i));\n            }\n            break;\n        }\n    case GdbMiValue::Tuple: {\n            QStandardItem *iv = item;\n            if (!value.name().isEmpty()) {\n                iv = new QStandardItem(QString(value.name()));\n                item->appendRow(iv);\n            }\n            foreach (const GdbMiValue &v, value.children()) {\n                GdbMiValueToItem(iv,v);\n            }\n            break;\n       }\n    }\n}\n\nDlvRpcDebugger::DlvRpcDebugger(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IDebugger(parent),\n    m_liteApp(app),\n    m_envManager(0)\n{\n    m_process = new LiteProcess(m_liteApp,this);\n    m_process->setUseCtrlC(true);\n\n    m_asyncModel = new QStandardItemModel(0,1,this);\n    m_asyncItem = new QStandardItem;\n    m_asyncModel->appendRow(m_asyncItem);\n    /*\n    m_asyncModel->setHeaderData(0,Qt::Horizontal,\"Reason\");\n    m_asyncModel->setHeaderData(1,Qt::Horizontal,\"Address\");\n    m_asyncModel->setHeaderData(2,Qt::Horizontal,\"Function\");\n    m_asyncModel->setHeaderData(3,Qt::Horizontal,\"File\");\n    m_asyncModel->setHeaderData(4,Qt::Horizontal,\"Line\");\n    m_asyncModel->setHeaderData(5,Qt::Horizontal,\"Thread ID\");\n    m_asyncModel->setHeaderData(6,Qt::Horizontal,\"Stoped Threads\");\n    */\n    m_varsModel = new QStandardItemModel(0,4,this);\n    m_varsModel->setHeaderData(0,Qt::Horizontal,\"Name\");\n    m_varsModel->setHeaderData(1,Qt::Horizontal,\"Type\");\n    m_varsModel->setHeaderData(2,Qt::Horizontal,\"Value\");\n    m_varsModel->setHeaderData(3,Qt::Horizontal,\"Address\");\n\n    m_watchModel = new QStandardItemModel(0,4,this);\n    m_watchModel->setHeaderData(0,Qt::Horizontal,\"Name\");\n    m_watchModel->setHeaderData(1,Qt::Horizontal,\"Type\");\n    m_watchModel->setHeaderData(2,Qt::Horizontal,\"Value\");\n    m_watchModel->setHeaderData(3,Qt::Horizontal,\"Address\");\n    connect(m_watchModel,SIGNAL(itemChanged(QStandardItem*)),this,SLOT(watchItemChanged(QStandardItem*)));\n\n    m_framesModel = new QStandardItemModel(0,5,this);\n    m_framesModel->setHeaderData(0,Qt::Horizontal,\"Level\");\n    m_framesModel->setHeaderData(1,Qt::Horizontal,\"Address\");\n    m_framesModel->setHeaderData(2,Qt::Horizontal,\"Function\");\n    m_framesModel->setHeaderData(3,Qt::Horizontal,\"File\");\n    m_framesModel->setHeaderData(4,Qt::Horizontal,\"Line\");\n\n    m_goroutinesModel = new QStandardItemModel(0,5,this);\n    m_goroutinesModel->setHeaderData(0,Qt::Horizontal,\"Goroutine\");\n    m_goroutinesModel->setHeaderData(1,Qt::Horizontal,\"Address\");\n    m_goroutinesModel->setHeaderData(2,Qt::Horizontal,\"Function\");\n    m_goroutinesModel->setHeaderData(3,Qt::Horizontal,\"File\");\n    m_goroutinesModel->setHeaderData(4,Qt::Horizontal,\"Line\");\n\n    m_threadsModel = new QStandardItemModel(0,6,this);\n    m_threadsModel->setHeaderData(0,Qt::Horizontal,\"Thread\");\n    m_threadsModel->setHeaderData(1,Qt::Horizontal,\"Goroutine\");\n    m_threadsModel->setHeaderData(2,Qt::Horizontal,\"Address\");\n    m_threadsModel->setHeaderData(3,Qt::Horizontal,\"Function\");\n    m_threadsModel->setHeaderData(4,Qt::Horizontal,\"File\");\n    m_threadsModel->setHeaderData(5,Qt::Horizontal,\"Line\");\n\n    m_registersModel = new QStandardItemModel(0,2,this);\n    m_registersModel->setHeaderData(0,Qt::Horizontal,\"Name\");\n    m_registersModel->setHeaderData(1,Qt::Horizontal,\"Value\");\n    //m_libraryModel->setHeaderData(0,Qt::Horizontal,\"Id\");\n    //m_libraryModel->setHeaderData(1,Qt::Horizontal,\"Thread Groups\");`\n   // m_asynJsonItem = new QStandardItem(0,2);\n   // m_asynJsonItem->setText(\"stop\");\n    //m_libraryModel->appendRow(m_asynJsonItem);\n\n    m_asmModel = new QStandardItemModel(0,6,this);\n    m_asmModel->setHeaderData(0,Qt::Horizontal,\"State\");\n    m_asmModel->setHeaderData(1,Qt::Horizontal,\"Address\");\n    m_asmModel->setHeaderData(2,Qt::Horizontal,\"Code\");\n    m_asmModel->setHeaderData(3,Qt::Horizontal,\"Text\");\n    m_asmModel->setHeaderData(4,Qt::Horizontal,\"File\");\n    m_asmModel->setHeaderData(5,Qt::Horizontal,\"Line\");\n\n    m_dlvInit = false;\n    m_dlvExit = false;\n    m_readDataBusy = false;\n    m_writeDataBusy = false;\n\n    m_headlessInitAddress = false;\n    m_headlessProcess = new Process(this);\n//    m_headlessProcess->setUseCtrlC(true);\n\n    m_dlvClient = new DlvClient(this);\n    connect(m_dlvClient,SIGNAL(commandSuccess(QString,DebuggerState,QVariant)),this,SLOT(clientCommandSuccess(QString,DebuggerState,QVariant)));\n\n    m_dlvRunningCmdList << \"c\" << \"continue\"\n        << \"n\" << \"next\"\n        << \"s\" << \"step\"\n        << \"si\" << \"step-instruction\"\n        << \"stepout\";\n\n    connect(app,SIGNAL(loaded()),this,SLOT(appLoaded()));\n    connect(m_process,SIGNAL(started()),this,SIGNAL(debugStarted()));\n    connect(m_process,SIGNAL(finished(int)),this,SLOT(finished(int)));\n    connect(m_process,SIGNAL(error(QProcess::ProcessError)),this,SLOT(error(QProcess::ProcessError)));\n    connect(m_process,SIGNAL(readyReadStandardError()),this,SLOT(readStdError()));\n    connect(m_process,SIGNAL(readyReadStandardOutput()),this,SLOT(readStdOutput()));\n\n    connect(m_headlessProcess,SIGNAL(started()),this,SIGNAL(debugStarted()));\n    connect(m_headlessProcess,SIGNAL(finished(int)),this,SLOT(headlessFinished(int)));\n    connect(m_headlessProcess,SIGNAL(error(QProcess::ProcessError)),this,SLOT(headlessError(QProcess::ProcessError)));\n    connect(m_headlessProcess,SIGNAL(readyReadStandardError()),this,SLOT(headlessReadStdError()));\n    connect(m_headlessProcess,SIGNAL(readyReadStandardOutput()),this,SLOT(headlessReadStdOutput()));\n}\n\nDlvRpcDebugger::~DlvRpcDebugger()\n{\n    stop();\n}\n\nvoid DlvRpcDebugger::appLoaded()\n{\n    m_envManager = LiteApi::findExtensionObject<LiteApi::IEnvManager*>(m_liteApp,\"LiteApi.IEnvManager\");\n}\n\nQString DlvRpcDebugger::mimeType() const\n{\n    return QLatin1String(\"debugger/delve\");\n}\n\nQAbstractItemModel *DlvRpcDebugger::debugModel(LiteApi::DEBUG_MODEL_TYPE type)\n{\n    if (type == LiteApi::ASYNC_MODEL) {\n        return m_asyncModel;\n    } else if (type == LiteApi::VARS_MODEL) {\n        return m_varsModel;\n    } else if (type == LiteApi::WATCHES_MODEL) {\n        return m_watchModel;\n    }else if (type == LiteApi::FRAMES_MODEL) {\n        return m_framesModel;\n    } else if (type == LiteApi::GOROUTINES_MODEL) {\n        return m_goroutinesModel;\n    } else if (type == LiteApi::THREADS_MODEL) {\n        return m_threadsModel;\n    } else if (type == LiteApi::REGS_MODEL) {\n        return m_registersModel;\n    } else if (type == LiteApi::ASM_MODEL) {\n        return m_asmModel;\n    }\n    return 0;\n}\n\nvoid DlvRpcDebugger::setWorkingDirectory(const QString &dir)\n{\n    m_headlessProcess->setWorkingDirectory(dir);\n    m_process->setWorkingDirectory(dir);\n}\n\nvoid DlvRpcDebugger::setEnvironment (const QStringList &environment)\n{\n    m_headlessProcess->setEnvironment(environment);\n    m_process->setEnvironment(environment);\n}\n\nbool DlvRpcDebugger::start(const QString &cmd, const QString &arguments)\n{\n    if (!m_envManager) {\n        return false;\n    }\n\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\n\n    QString goroot = env.value(\"GOROOT\");\n    if (!goroot.isEmpty()) {\n        m_runtimeFilePath = QFileInfo(QDir(goroot),\"src/pkg/runtime/\").path();\n    }\n\n    QString dlv = FileUtil::lookupGoBin(\"dlv\",m_liteApp,env,true);\n    if (dlv.isEmpty()) {\n        dlv = FileUtil::lookPath(\"dlv\",env,false);\n    }\n    m_dlvFilePath = dlv;\n\n    //m_checkFuncDecl = false;\n\n    if (m_dlvFilePath.isEmpty()) {\n        m_liteApp->appendLog(\"DlvRpcDebugger\",\"dlv was not found on system PATH (hint: is Delve installed? \\\"go install github.com/go-delve/delve/cmd/dlv@latest\\\")\",true);\n        return false;\n    }\n\n    clear();\n\n    QStringList argsList;\n    argsList << \"--headless\" << \"--api-version=2\" << \"--accept-multiclient\";\n    QStringList flags = m_liteApp->settings()->value(DLVDEBUGGER_EXTFLAGS).toString().split(\" \",qtSkipEmptyParts);\n    if (!flags.isEmpty()) {\n        foreach(QString flag, flags) {\n            if (flag.startsWith(\"--\")) {\n                argsList << flag;\n            }\n        }\n    }\n    //argsList << \"--log\";\n    argsList << \"exec\" << cmd;\n    if (!arguments.isEmpty()) {\n        argsList << \"--\" << arguments;\n    }\n#ifdef Q_OS_WIN\n    //m_headlessProcess->setNativeArguments(argsList.join(\" \"));\n    m_headlessProcess->startEx(\"\\\"\"+m_dlvFilePath+\"\\\"\", argsList.join(\" \"));\n#else\n    m_headlessProcess->startEx(m_dlvFilePath, argsList.join(\" \"));\n#endif\n    QString log = QString(\"%1 %2 [%3]\").arg(m_dlvFilePath).arg(argsList.join(\" \")).arg(m_headlessProcess->workingDirectory());\n    emit debugLog(LiteApi::DebugRuntimeLog,log);\n\n    return true;\n}\n\nvoid DlvRpcDebugger::stop()\n{\n    m_dlvExit = true;\n\n    if (!m_headlessProcess->isStop()) {\n        m_dlvClient->Detach();\n        m_headlessProcess->waitForFinished(500);\n    }\n    if (!m_process->isStop()) {\n        m_process->interrupt();\n    }\n    if (!m_headlessProcess->isStop() && !m_headlessProcess->waitForFinished(500)) {\n        m_headlessProcess->kill();\n    }\n    if (!m_process->isStop() && !m_process->waitForFinished(500)) {\n        command_helper(\"exit\",true);\n        if (!m_process->waitForFinished(500)) {\n            m_process->kill();\n        }\n    }\n}\n\nbool DlvRpcDebugger::isRunning()\n{\n    return m_headlessProcess->state() != QProcess::NotRunning;\n}\n\nvoid DlvRpcDebugger::continueRun()\n{\n    command(\"continue\");\n}\n\nvoid DlvRpcDebugger::stepOver()\n{\n    command(\"next\");\n}\n\nvoid DlvRpcDebugger::stepInto()\n{\n    command(\"step\");\n}\n\nvoid DlvRpcDebugger::stepOut()\n{\n    command(\"stepout\");\n}\n\nvoid DlvRpcDebugger::runToLine(const QString &fileName, int line)\n{\n    bool find = findBreakPoint(fileName,line);\n    if (!find) {\n        insertBreakPointHelper(fileName,line,true);\n        command_helper(\"continue\",true);\n        removeBreakPointHelper(fileName,line,true);\n    } else {\n        command(\"continue\");\n    }\n}\n\nvoid DlvRpcDebugger::createWatch(const QString &var)\n{\n    if (var.isEmpty()) {\n        return;\n    }\n    if (m_watchList.contains(var)) {\n        return;\n    }\n    //m_watchNameMap.insert(var,\"\");\n    m_watchList.push_back(var);\n    emit watchCreated(var,var);\n    if (var.contains(\".\")) {\n        updateWatch(-1);\n        return;\n    }\n    DebuggerState state = m_dlvClient->GetState();\n    if (!state.pCurrentThread) {\n        return;\n    }\n    updateWatch(state.pCurrentThread->GoroutineID);\n//    QString cmd = \"vars \"+QRegExp::escape(var);\n//    m_updateCmdHistroy.push_back(cmd);\n//    command_helper(cmd.toUtf8(),true);\n}\n\nvoid DlvRpcDebugger::removeWatch(const QString &value)\n{\n    //m_watchNameMap.remove(value);\n    m_watchList.removeAll(value);\n    for (int i = 0; i < m_watchModel->rowCount(); i++) {\n        QStandardItem *nameItem = m_watchModel->item(i,0);\n        if (nameItem->text() == value) {\n            m_watchModel->removeRow(i);\n            break;\n        }\n    }\n    emit watchRemoved(value);\n}\n\nvoid DlvRpcDebugger::removeAllWatch()\n{\n    m_watchNameMap.clear();\n    m_watchList.clear();\n    m_watchModel->removeRows(0,m_watchModel->rowCount());\n}\n\nvoid DlvRpcDebugger::gotoFileByIndex(const QStandardItemModel *model, QModelIndex index, int ifile, int iline)\n{\n    QVariant file = index.sibling(index.row(),ifile).data();\n    QVariant line = index.sibling(index.row(),iline).data();\n    if( !file.isValid() || !line.isValid() ) {\n        return;\n    }\n    QString filename = file.toString();\n    int lineno = line.toInt();\n    if( lineno <= 0 ) {\n        return;\n    }\n    emit gotoLine(filename, lineno - 1 );\n}\n\nvoid DlvRpcDebugger::dbclickItem(QModelIndex index, LiteApi::DEBUG_MODEL_TYPE type)\n{\n    switch (type) {\n    case LiteApi::FRAMES_MODEL:\n        gotoFileByIndex(m_framesModel,index,3,4);\n        break;\n    case LiteApi::THREADS_MODEL:\n        gotoFileByIndex(m_threadsModel,index,4,5);\n        break;\n    case LiteApi::GOROUTINES_MODEL:\n        gotoFileByIndex(m_goroutinesModel,index,3,4);\n        break;\n    case LiteApi::ASM_MODEL:\n        gotoFileByIndex(m_asmModel,index,4,5);\n        break;\n    }\n}\n\nvoid DlvRpcDebugger::expandItem(QModelIndex index, LiteApi::DEBUG_MODEL_TYPE type)\n{\n    QStandardItem *parent = 0;\n    if (type == LiteApi::VARS_MODEL) {\n        parent = m_varsModel->itemFromIndex(index);\n    } else if (type == LiteApi::WATCHES_MODEL) {\n        parent = m_watchModel->itemFromIndex(index);\n    }\n    if (!parent) {\n        return;\n    }\n    if (parent->data(VarExpanded).toInt() == 1) {\n        return;\n    }\n    parent->setData(1,VarExpanded);\n}\n\nvoid DlvRpcDebugger::setInitBreakTable(const QMultiMap<QString,int> &bks)\n{\n    m_initBks = bks;\n}\n\nvoid DlvRpcDebugger::setInitWatchList(const QStringList &names)\n{\n    m_watchList = names;\n    foreach (QString name, names) {\n        emit watchCreated(name,name);\n    }\n}\n\nvoid DlvRpcDebugger::insertBreakPoint(const QString &fileName, int line)\n{\n    insertBreakPointHelper(fileName,line,false);\n}\n\nvoid DlvRpcDebugger::insertBreakPointHelper(const QString &fileName, int line, bool force)\n{\n    line++;\n    QString location = QString(\"%1:%2\").arg(fileName).arg(line);\n    if (m_locationBkMap.contains(location)) {\n        return;\n    }\n    QString id = QString(\"bk%1\").arg(qHash(location));\n    m_locationBkMap.insert(location,id);\n    QStringList args;\n    args << \"break\";\n    args << id;\n    args << QString(\"%1:%2\").arg(fileName).arg(line);\n    command_helper(args.join(\" \").toUtf8(),force);\n}\n\nvoid DlvRpcDebugger::removeBreakPoint(const QString &fileName, int line)\n{\n    removeBreakPointHelper(fileName,line,false);\n}\n\nvoid DlvRpcDebugger::removeBreakPointHelper(const QString &fileName, int line, bool force)\n{\n    line++;\n    QString location = QString(\"%1:%2\").arg(fileName).arg(line);\n    QString id = m_locationBkMap.value(location);\n    if (id.isEmpty()) {\n        return;\n    }\n    m_locationBkMap.remove(location);\n    QStringList args;\n    args << \"clear\";\n    args << id;\n    command_helper(args.join(\" \").toUtf8(),force);\n}\n\nbool DlvRpcDebugger::findBreakPoint(const QString &fileName, int line)\n{\n    QString location = QString(\"%1:%2\").arg(fileName).arg(line);\n    QString id = m_locationBkMap.value(location);\n    return m_locationBkMap.contains(location);\n}\n\nvoid DlvRpcDebugger::command_helper(const QByteArray &cmd, bool force)\n{\n    if (m_writeDataBusy && !force) {\n        return;\n    }\n    m_writeDataBusy = true;\n    m_lastCmd = cmd;\n\n    if (m_dlvRunningCmdList.contains(cmd)) {\n        m_asyncItem->removeRows(0,m_asyncItem->rowCount());\n        m_asyncItem->setText(\"runing\");\n    }\n#ifdef Q_OS_WIN\n    m_process->write(cmd+\"\\r\\n\");\n#else\n    m_process->write(cmd+\"\\n\");\n#endif\n}\n\nvoid DlvRpcDebugger::enterAppText(const QString &text)\n{\n    m_updateCmdList.clear();\n    m_updateCmdHistroy.clear();\n\n    QString cmd = text.trimmed();\n    if (cmd == \"r\" || cmd == \"restart\") {\n        m_processId.clear();\n    }\n\n    m_headlessProcess->write(text.toUtf8());\n}\n\nvoid DlvRpcDebugger::enterDebugText(const QString &text)\n{\n    m_updateCmdList.clear();\n    m_updateCmdHistroy.clear();\n\n    QString cmd = text.trimmed();\n    if (cmd == \"r\" || cmd == \"restart\") {\n        m_processId.clear();\n    }\n\n    command(text.toUtf8());\n}\n\nvoid  DlvRpcDebugger::command(const QByteArray &cmd)\n{\n    command_helper(cmd,false);\n}\n\nvoid DlvRpcDebugger::readStdError()\n{\n    //Process 4084 has exited with status 0\n    QString data = QString::fromUtf8(m_process->readAllStandardError());\n   // qDebug() << data << m_processId;\n    //QRegExp reg;\n    emit debugLog(LiteApi::DebugConsoleLog,data);\n    foreach (QString line, data.split(\"\\n\",qtSkipEmptyParts)) {\n        if (line.startsWith(\"Process \"+m_processId)) {\n            m_processId.clear();\n            this->stop();\n        }\n    }\n}\n\n\n\n//static bool isNameChar(char c)\n//{\n//    // could be 'stopped' or 'shlibs-added'\n//    return (c >= 'a' && c <= 'z') || c == '-';\n//}\n\nvoid DlvRpcDebugger::handleResponse(const QByteArray &buff)\n{\n    if (buff.isEmpty()) {\n        return;\n    }\n    //Process restarted with PID 4532\n    //> main.main() H:/goproj/src/hello/main.go:13 (hits goroutine(1):1 total:1) (PC: 0x401172)\n    //> main.main() H:/goproj/src/hello/main.go:14 (PC: 0x401179)\n    //> main.main() H:/goproj/src/hello/main.go:21 (hits goroutine(1):1 total:1) (PC: 0x40161a)\n    //> fmt.Println() c:/go/go1.6/src/fmt/print.go:263 (PC: 0x45aeca)\n    //> runtime.convT2E() c:/go/go1.6/src/runtime/iface.go:128 (PC: 0x40caaa)\"\n    //> github.com/derekparker/delve/cmd/dlv/cmds.New() /src/github.com/derekparker/delve/cmd/dlv/cmds/commands.go:61 (PC: 0x45d09f)\n    //> [bk6767010] main.test() H:/goproj/src/hello/main.go:12 (hits goroutine(1):1 total:1) (PC: 0x401066)\n    //> [bk101903173] github.com/derekparker/delve/vendor/github.com/spf13/cobra.(*Command).Execute() github.com/derekparker/delve/vendor/github.com/spf13/cobra/command.go:615 (hits goroutine(1):1 total:1) (PC: 0x524ea6)\n    //> qlang.io/qlang%2espec%2ev1.Import()\n    //> main.main() goapi/_test/_testmain.go:50 (hits goroutine(1):1 total:1) (PC: 0x4011ca)\n    //> [bk3711824616] main.test[go.shape.int_0]() ./main.go:9 (hits goroutine(1):1 total:1) (PC: 0x10b2be2)\n    //> [bk1584098684] main.(*My[go.shape.int]).Test1() c:/dev/demo/main.go:16 (hits goroutine(1):1 total:1) (PC: 0x4daa88)\n    if (buff.contains(\"> \")) {\n        // [bk] main.test[shape]() file:line\n        static QRegExp reg(\">(\\\\s+\\\\[[\\\\w\\\\d]+\\\\])?\\\\s+([\\\\w\\\\d_\\\\-\\\\.\\\\%\\\\*\\\\[\\\\]\\\\(\\\\)\\\\/]+)\\\\(\\\\)\\\\s+((?:[a-zA-Z]:)?[\\\\w\\\\d_@\\\\s\\\\-\\\\/\\\\.\\\\\\\\]+):(\\\\d+)\\\\s?(.*)\\\\s?(\\\\(PC:\\\\s+.*)\");\n\n        int n = reg.indexIn(QString::fromUtf8(buff));\n        if (n < 0) {\n            return;\n        }\n        QString fileName = reg.cap(3);\n        if (fileName.startsWith(\"./\")) {\n            fileName = QDir::cleanPath(m_process->workingDirectory()+\"/\"+fileName);\n        }\n        QString line = reg.cap(4);\n\n        if (!fileName.isEmpty() && !line.isEmpty()) {\n            bool ok = false;\n            int n = line.toInt(&ok);\n            if (ok) {\n                m_lastFileName = fileName;\n                m_lastFileLine = n-1;\n                //check step out\n                emit setCurrentLine(fileName,n-1);\n            }\n        }\n        m_handleState.setStopped(true);\n\n        m_asyncItem->removeRows(0,m_asyncItem->rowCount());\n        m_asyncItem->setText(\"stopped\");\n        QString func = reg.cap(2).trimmed();\n        //hack\n        if (func.contains(\"%\")) {\n            func.replace(\"%2e\",\".\");\n        }\n        QString hits = reg.cap(5).trimmed();\n        QString pc = reg.cap(6).trimmed();\n        int pos = pc.indexOf('\\n');\n        if (pos != -1) {\n            pc.truncate(pos);\n        }\n        if (!hits.isEmpty()) {\n            m_asyncItem->appendRow(new QStandardItem(hits));\n        }\n        m_asyncItem->appendRow(new QStandardItem(pc));\n        m_asyncItem->appendRow(new QStandardItem(\"func=\"+func));\n        m_asyncItem->appendRow(new QStandardItem(\"file=\"+fileName));\n        m_asyncItem->appendRow(new QStandardItem(\"line=\"+line));\n        emit setExpand(LiteApi::ASYNC_MODEL,m_asyncModel->indexFromItem(m_asyncItem),true);\n    }\n}\n\nvoid DlvRpcDebugger::cleanup()\n{\n    stop();\n}\n\nvoid DlvRpcDebugger::clear()\n{\n    m_headlessInitAddress = false;\n    m_lastFileLine = 0;\n    m_lastFileName.clear();\n    m_dlvInit = false;\n    m_dlvExit = false;\n    m_readDataBusy = false;\n    m_writeDataBusy = false;\n    m_handleState.clear();\n    m_checkVarsMap.clear();\n    m_watchNameMap.clear();\n    m_watchList.clear();\n    m_updateCmdHistroy.clear();\n    m_nameItemMap.clear();\n    m_varChangedItemList.clear();\n    m_inbuffer.clear();\n    m_locationBkMap.clear();\n    m_cmdList.clear();\n    m_framesModel->removeRows(0,m_framesModel->rowCount());\n    m_threadsModel->removeRows(0,m_threadsModel->rowCount());\n    m_goroutinesModel->removeRows(0,m_goroutinesModel->rowCount());\n    m_varsModel->removeRows(0,m_varsModel->rowCount());\n    m_watchModel->removeRows(0,m_watchModel->rowCount());\n    m_asmModel->removeRows(0,m_asmModel->rowCount());\n}\n\nvoid DlvRpcDebugger::initDebug()\n{\n    //get thread id\n    m_processId.clear();\n\n    QMapIterator<QString,int> i(m_initBks);\n\n    while (i.hasNext()) {\n        i.next();\n        QString fileName = i.key();\n        QList<int> lines = m_initBks.values(fileName);\n        foreach(int line, lines) {\n            insertBreakPointHelper(fileName,line,true);\n        }\n    }\n    if (m_liteApp->settings()->value(LITEDEBUG_AUTOBREAKMAIN,false).toBool()) {\n        command_helper(\"break main.main\",true);\n    }\n    command_helper(\"continue\",true);\n\n    emit debugLoaded();\n}\n\nstatic QString valueToolTip(const QString &value)\n{\n    int offset = 0;\n    QString toolTip;\n    QString text = value;\n    text.replace(\", \",\",\");\n    for (int i = 0; i < text.size(); i++) {\n//        if (text[i] == '[')  {\n//            int j = i;\n//            for (; j++; j < text.size()) {\n//                if (text[j] == ']') {\n//                    break;\n//                }\n//            }\n//            toolTip += text.mid(i,j+1-i);\n//            i = j;\n//            continue;\n//        }\n        if (text[i] == '{') {\n            if ( (i+1) < text.size() && text[i+1] == '}' ) {\n                toolTip += \"{}\";\n                i++;\n            } else {\n                offset++;\n                toolTip += text[i];\n                toolTip += \"\\n\"+QString(\"\\t\").repeated(offset);\n            }\n        } else if (text[i] == '}') {\n            offset--;\n            toolTip += \"\\n\"+QString(\"\\t\").repeated(offset);\n            toolTip += text[i];\n        } else if (text[i] == ',') {\n            toolTip += text[i];\n            int pos = text.lastIndexOf(QRegExp(\"\\\\{|\\\\[|\\\\]|\\\\}\"),i-1);\n            if (pos != -1 && text[pos] == '[') {\n                continue;\n            }\n            toolTip += \"\\n\"+QString(\"\\t\").repeated(offset);\n        } else {\n            toolTip += text[i];\n        }\n    }\n    return toolTip;\n}\n\nvoid DlvRpcDebugger::readStdOutput()\n{\n    QByteArray data = m_process->readAllStandardOutput();\n    if (!m_dlvInit) {\n        m_dlvInit = true;\n        initDebug();\n    }\n    m_writeDataBusy = false;\n\n    if (m_dlvExit) {\n        return;\n    }\n\n    int newstart = 0;\n    int scan = m_inbuffer.size();\n    m_inbuffer.append(data);\n\n    //hack check (dlv)\n    static bool first_check = true;\n    static bool dlv_check = false;\n    if (first_check) {\n        first_check = false;\n        dlv_check = m_inbuffer.indexOf(\"(dlv)\") != -1;\n    }\n    if (dlv_check && !m_inbuffer.endsWith(\"(dlv) \")) {\n        return;\n    }\n\n    // This can trigger when a dialog starts a nested event loop.\n    if (m_readDataBusy)\n        return;\n    QStringList dataList;\n    while (newstart < m_inbuffer.size()) {\n        int start = newstart;\n        int end = m_inbuffer.indexOf('\\n', scan);\n        if (end < 0) {\n            //m_inbuffer.remove(0, start);\n            //return;\n            end = m_inbuffer.size()-1;\n        }\n        newstart = end + 1;\n        scan = newstart;\n        if (end == start)\n            continue;\n#ifdef Q_OS_WIN\n        if (m_inbuffer.at(end - 1) == '\\r') {\n            --end;\n            if (end == start)\n                continue;\n        }\n#endif\n        m_readDataBusy = true;\n        QByteArray data = QByteArray::fromRawData(m_inbuffer.constData() + start, end - start);\n        dataList.append(QString::fromUtf8(data));\n        handleResponse(data);\n        m_readDataBusy = false;\n    }\n\n//    if (m_checkFuncDecl) {\n//        if (m_lastFileName == m_funcDecl.fileName && m_lastFileLine >= m_funcDecl.start && m_lastFileLine <= m_funcDecl.end) {\n//            command(\"next\");\n//            m_inbuffer.clear();\n//            return;\n//        }\n//        m_checkFuncDecl = false;\n//        m_funcDecl.clear();\n//    }\n\n    bool emitLog = true;\n    if (!m_updateCmdHistroy.isEmpty()) {\n        QString cmdHistroy = m_updateCmdHistroy.takeFirst();\n        if (cmdHistroy == \"stack\") {\n//            0  0x000000000040135a in main.main\n//               at H:/goproj/src/hello/main.go:24\n//            1  0x000000000042c629 in runtime.main\n//               at c:/go/go1.6/src/runtime/proc.go:188\n//            2  0x0000000000456560 in runtime.goexit\n//               at c:/go/go1.6/src/runtime/asm_amd64.s:1998\n             m_framesModel->removeRows(0,m_framesModel->rowCount());\n             QString data = QString::fromUtf8(m_inbuffer);\n             QStringList dataList = data.split(\"\\n\",qtSkipEmptyParts);\n             bool head = true;\n             QList<QStandardItem*> items;\n             foreach (QString data, dataList) {\n                 if (head) {\n                    // data.\n                     items.clear();\n                     QStringList ar = data.split(\" \",qtSkipEmptyParts);\n                     if (ar.size() == 4) {\n                         items << new QStandardItem(ar[0]);\n                         items << new QStandardItem(ar[1]);\n                         items << new QStandardItem(ar[3]);\n                     }\n                 } else {\n                    data = data.trimmed();\n                    if (data.startsWith(\"at\")) {\n                        data = data.mid(2).trimmed();\n                        int n = data.lastIndexOf(\":\");\n                        if (n > 0) {\n                            QString fileName = data.left(n);\n                            QString fileLine = data.mid(n+1);\n                            if (fileName.startsWith(\"./\")) {\n                                fileName = QDir::cleanPath(m_process->workingDirectory()+\"/\"+fileName);\n                            }\n                            items << new QStandardItem(fileName);\n                            items << new QStandardItem(fileLine);\n                            m_framesModel->appendRow(items);\n                        }\n                    }\n                 }\n                 head = !head;\n             }\n        } else if (cmdHistroy == \"stack 0 -full\") {\n            // s = \" \\x04S\\x00\\x00\\x00\\x00\\x00\\x1d\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n            // v = []int len: 0, cap: 4257785, []\"\n            // args = []string len: 1, cap: 1, [\"H:\\\\goproj\\\\src\\\\hello\\\\debug\"]\n            m_varsModel->removeRows(0,m_varsModel->rowCount());\n            QString data = QString::fromUtf8(m_inbuffer);\n            QStringList dataList = data.split(\"\\n\",qtSkipEmptyParts);\n            QMap<QString,QString> nameMap;\n            foreach(QString text, dataList) {\n                int n = text.indexOf(\"=\");\n                if (n == -1) {\n                    continue;\n                }\n                QString name = text.left(n).trimmed();\n                QString value = text.mid(n+1).trimmed();\n                n = value.indexOf(\"(unreadable\");\n                if (n != -1) {\n                    value = value.left(n)+\"(unreadable ...\";\n                }\n                nameMap.insert(name,value);\n                QStandardItem *nameItem = new QStandardItem(name);\n                QStandardItem *valueItem = new QStandardItem(value);\n                valueItem->setToolTip(valueToolTip(value));\n                QMap<QString,QString>::iterator it = m_checkVarsMap.find(name);\n                if (it != m_checkVarsMap.end() && it.value() != value) {\n#if QT_VERSION >= 0x050000\n        valueItem->setData(QColor(Qt::red),Qt::TextColorRole);\n#else\n        valueItem->setData(Qt::red,Qt::TextColorRole);\n#endif\n                }\n                m_varsModel->appendRow(QList<QStandardItem*>() << nameItem << valueItem);\n            }\n            m_checkVarsMap = nameMap;\n        } else if (cmdHistroy.startsWith(\"vars \")) {\n            foreach (QString data, QString::fromUtf8(m_inbuffer).split(\"\\n\",qtSkipEmptyParts)) {\n                int n = data.indexOf(\"=\");\n                if (n >= 0) {\n                    QString name = data.left(n-1);\n                    QString value = data.mid(n+1).trimmed();\n                    if (name.isEmpty() || value.isEmpty() || name.contains(\" \")) {\n                        continue;\n                    }\n\n                    bool find = false;\n                    for (int i = 0; i < m_watchModel->rowCount(); i++) {\n                        QStandardItem *nameItem = m_watchModel->item(i,0);\n                        QStandardItem *valueItem = m_watchModel->item(i,1);\n                        if (nameItem->text() == name) {\n                            find = true;\n                            if (m_watchNameMap.value(name) == value) {\n#if QT_VERSION >= 0x050000\n                                valueItem->setData(QColor(Qt::black),Qt::TextColorRole);\n#else\n                                valueItem->setData(Qt::black,Qt::TextColorRole);\n#endif\n                            } else {\n#if QT_VERSION >= 0x050000\n                                valueItem->setData(QColor(Qt::red),Qt::TextColorRole);\n#else\n                                valueItem->setData(Qt::red,Qt::TextColorRole);\n#endif\n                                valueItem->setText(value);\n                            }\n                        }\n                    }\n                    if (!find) {\n                        QStandardItem *nameItem = new QStandardItem(name);\n                        nameItem->setData(name,VarNameRole);\n                        QStandardItem *valueItem = new QStandardItem(value);\n                        valueItem->setToolTip(valueToolTip(value));\n                        m_watchModel->appendRow(QList<QStandardItem*>() << nameItem << valueItem );\n\n                        emit watchCreated(name,name);\n                    }\n                    m_watchNameMap.insert(name,value);\n                }\n            }\n        }\n        emitLog = false;\n    }\n    if (emitLog) {\n         emit debugLog(LiteApi::DebugConsoleLog,QString::fromUtf8(m_inbuffer));\n    }\n    m_inbuffer.clear();\n\n    if (m_handleState.exited() && !m_dlvExit) {\n        m_dlvExit = true;\n        stop();\n    } else if (m_handleState.stopped()) {\n        DebuggerState state = m_dlvClient->GetState();\n        if (state.pCurrentThread) {\n            m_updateCmdList.clear();\n            //m_updateCmdList << \"stack\";// << \"stack 0 -full\";\n\n            int id = state.pCurrentThread->GoroutineID;\n            updateStackframe(id);\n            updateVariable(id);\n            updateWatch(id);\n            updateThreads(state.Threads);\n            updateGoroutines();\n            updateRegisters(state.pCurrentThread->ID,true);\n            updateAsm(id,state.pCurrentThread->PC);\n        }\n    }\n\n    m_handleState.clear();\n\n    if (!m_updateCmdList.isEmpty()) {\n        foreach(QString cmd, m_updateCmdList.takeFirst().split(\"|\")) {\n            m_updateCmdHistroy.push_back(cmd.trimmed());\n            command(cmd.trimmed().toUtf8());\n        }\n    }\n}\n\nvoid DlvRpcDebugger::updateWatch(int id)\n{\n    QList<Variable> watch;\n    QList<QString> errList;\n    foreach (QString s, m_watchList) {\n        if (s.isEmpty()) {\n            continue;\n        }\n        int gid = id;\n        if (s.contains(\".\")) {\n            gid = -1;\n        }\n        VariablePointer pt = m_dlvClient->EvalVariable(EvalScope(gid),s,LoadConfig::Long128(3));\n        if (pt) {\n            watch.push_back(*pt);\n        } else {\n            errList.push_back(s);\n        }\n    }\n    emit beginUpdateModel(LiteApi::WATCHES_MODEL);\n    m_watchModel->removeRows(0,m_watchModel->rowCount());\n    foreach (QString name, errList) {\n        QStandardItem *item = new QStandardItem(name);\n        item->setData(name,VarNameRole);\n        QStandardItem *type = new QStandardItem(\"not find\");\n#if QT_VERSION >= 0x050000\n            type->setData(QColor(Qt::red),Qt::TextColorRole);\n#else\n            type->setData(Qt::red,Qt::TextColorRole);\n#endif\n        m_watchModel->appendRow(QList<QStandardItem*>() << item << type);\n    }\n    QMap<QString,QString> saveMap;\n    updateVariableHelper(watch,m_watchModel,0,\"\",0,saveMap,m_checkWatchMap);\n    m_checkWatchMap = saveMap;\n    emit endUpdateModel(LiteApi::WATCHES_MODEL);\n}\n\nvoid DlvRpcDebugger::updateVariable(int id)\n{\n    QList<Variable> vars = m_dlvClient->ListLocalVariables(EvalScope(id),LoadConfig::Long128(3));\n    QList<Variable> args = m_dlvClient->ListFunctionArgs(EvalScope(id),LoadConfig::Long128(3));\n\n    QMap<QString,QString> saveMap;\n    emit beginUpdateModel(LiteApi::VARS_MODEL);\n    m_varsModel->removeRows(0,m_varsModel->rowCount());\n    updateVariableHelper(args,m_varsModel,0,\"\",0,saveMap,m_checkVarsMap);\n    updateVariableHelper(vars,m_varsModel,0,\"\",0,saveMap,m_checkVarsMap);\n    m_checkVarsMap = saveMap;\n    emit endUpdateModel(LiteApi::VARS_MODEL);\n}\n\nvoid DlvRpcDebugger::updateStackframe(int id)\n{\n    QList<Stackframe> frames = m_dlvClient->Stacktrace(id,128,LoadConfig::Long128(3));\n    emit beginUpdateModel(LiteApi::FRAMES_MODEL);\n    m_framesModel->removeRows(0,m_framesModel->rowCount());\n    int index = 0;\n    foreach(Stackframe f, frames) {\n        QList<QStandardItem*> items;\n        items << new QStandardItem(QString(\"%1\").arg(index));\n        items << new QStandardItem(QString(\"0x%1\").arg(f.PC,0,16));\n        if (f.pFunction) {\n            items << new QStandardItem(f.pFunction->Name);\n        } else {\n            items << new QStandardItem(\"\");\n        }\n        items << new QStandardItem(f.File);\n        items << new QStandardItem(QString(\"%1\").arg(f.Line));\n        m_framesModel->appendRow(items);\n        index++;\n    }\n    emit endUpdateModel(LiteApi::FRAMES_MODEL);\n}\n\nstatic bool threadIdThan(const Thread &s1, const Thread &s2)\n{\n    if (s1.GoroutineID != s2.GoroutineID) {\n        return s1.GoroutineID > s2.GoroutineID;\n    }\n    return s1.ID < s2.ID;\n}\n\nvoid DlvRpcDebugger::updateThreads(const QList<Thread> &threads)\n{\n    QList<Thread> ths = threads;\n    qSort(ths.begin(),ths.end(),threadIdThan);\n    emit beginUpdateModel(LiteApi::THREADS_MODEL);\n    m_threadsModel->removeRows(0,m_threadsModel->rowCount());\n    foreach (Thread t, ths) {\n        QStandardItem *item = new QStandardItem(QString(\"%1\").arg(t.ID));\n        QStandardItem *gitem = new QStandardItem(QString(\"%1\").arg(t.GoroutineID));\n        QStandardItem *file = new QStandardItem(t.File);\n        QStandardItem *line = new QStandardItem(QString(\"%1\").arg(t.Line));\n        QStandardItem *pc = new QStandardItem(QString(\"0x%1\").arg(t.PC,0,16));\n        QStandardItem *func = new QStandardItem;\n        if (t.pFunction) {\n            func->setText(t.pFunction->Name);\n        }\n        m_threadsModel->appendRow(QList<QStandardItem*>() << item << gitem << pc << func << file << line);\n    }\n    emit endUpdateModel(LiteApi::THREADS_MODEL);\n}\n\nstatic void appendLocationItem(QStandardItem *parent, const QString &name, const Location &loc)\n{\n    QStandardItem *item = new QStandardItem(name);\n    QStandardItem *file = new QStandardItem(loc.File);\n    QStandardItem *line = new QStandardItem(QString(\"%1\").arg(loc.Line));\n    QStandardItem *pc = new QStandardItem(QString(\"0x%1\").arg(loc.PC,0,16));\n    QStandardItem *func = new QStandardItem;\n    if (loc.pFunction) {\n        func->setText(loc.pFunction->Name);\n    }\n    parent->appendRow(QList<QStandardItem*>() << item << pc << func << file << line);\n}\n\nstatic void appendLocationRoot(QStandardItemModel *parent, QStandardItem *item, const Location &loc)\n{\n    QStandardItem *file = new QStandardItem(loc.File);\n    QStandardItem *line = new QStandardItem(QString(\"%1\").arg(loc.Line));\n    QStandardItem *pc = new QStandardItem(QString(\"0x%1\").arg(loc.PC,0,16));\n    QStandardItem *func = new QStandardItem;\n    if (loc.pFunction) {\n        func->setText(loc.pFunction->Name);\n    }\n    parent->appendRow(QList<QStandardItem*>() << item << pc << func << file << line);\n}\n\n/*\nconst (\n    Gidle           uint64 = iota // 0\n    Grunnable                     // 1 runnable and on a run queue\n    Grunning                      // 2\n    Gsyscall                      // 3\n    Gwaiting                      // 4\n    GmoribundUnused               // 5 currently unused, but hardcoded in gdb scripts\n    Gdead                         // 6\n    Genqueue                      // 7 Only the Gscanenqueue is used.\n    Gcopystack                    // 8 in this state when newstack is moving the stack\n)\n*/\n\nvoid DlvRpcDebugger::updateGoroutines()\n{\n    QList<Goroutine> lst = m_dlvClient->ListGoroutines();\n    emit beginUpdateModel(LiteApi::GOROUTINES_MODEL);\n    m_goroutinesModel->removeRows(0,m_goroutinesModel->rowCount());\n    foreach (Goroutine g, lst) {\n        QString value;\n        if (g.ThreadId != 0) {\n            value = QString(\"(thread %1)\").arg(g.ThreadId);\n        }\n        if ( (g.Status == 4 || g.Status == 3) && g.WaitReason != 0) {\n            if (!value.isEmpty()) {\n                value += \" \";\n            }\n            value += \"[\"+waitReason(int(g.WaitReason));\n            if (g.WaitSince > 0) {\n                value += QString(\" %1\").arg(g.WaitSince);\n            }\n            value += \"]\";\n        }\n\n        QStandardItem *item = new QStandardItem(QString(\"Goroutine %1 %2\").arg(g.ID).arg(value));\n\n        appendLocationItem(item,\"Runtime\",g.CurrentLoc);\n        appendLocationItem(item,\"Go\",g.GoStatementLoc);\n        appendLocationItem(item,\"Star\",g.StartLoc);\n        appendLocationRoot(m_goroutinesModel,item,g.UserCurrentLoc);\n    }\n    emit endUpdateModel(LiteApi::GOROUTINES_MODEL);\n}\n\nvoid DlvRpcDebugger::updateAsm(int id, quint64 pc)\n{\n    int flag = m_liteApp->settings()->value(DLVDEBUGGER_ASMSYNTAX,1).toInt();\n    QList<AsmInstruction> asms = m_dlvClient->DisassemblePC(EvalScope(id),pc,AssemblyFlavour(flag));\n    emit beginUpdateModel(LiteApi::ASM_MODEL);\n    m_asmModel->removeRows(0,m_asmModel->rowCount());\n    QModelIndex at;\n    foreach(AsmInstruction a, asms) {\n        QString head;\n        if (a.AtPC) {\n            head = \"=>\";\n        }\n        if (a.Breakpoint) {\n            head += \"*\";\n        }\n        QStandardItem *item = new QStandardItem(head);\n        QStandardItem *pc = new QStandardItem(QString(\"0x%1\").arg(a.Loc.PC,0,16));\n        QStandardItem *file = new QStandardItem(a.Loc.File);\n        QStandardItem *line = new QStandardItem(QString(\"%1\").arg(a.Loc.Line));\n        QStandardItem *inst = new QStandardItem(QString(a.Bytes.toHex()));\n        QStandardItem *text = new QStandardItem(a.Text);\n        m_asmModel->appendRow(QList<QStandardItem*>() << item << pc << inst << text << file << line);\n        if (a.AtPC) {\n            at = m_asmModel->indexFromItem(item);\n        }\n    }\n    emit endUpdateModel(LiteApi::ASM_MODEL);\n    if (at.isValid()) {\n        emit scrollTo(LiteApi::ASM_MODEL, at);\n    }\n}\n\nvoid DlvRpcDebugger::updateRegisters(int threadid, bool includeFp)\n{\n    QList<Register> regs = m_dlvClient->ListRegisters(threadid,includeFp);\n    emit beginUpdateModel(LiteApi::REGS_MODEL);\n    m_registersModel->removeRows(0,m_registersModel->rowCount());\n    QMap<QString,QString> saveMap;\n    foreach (Register r, regs) {\n        QStandardItem *name = new QStandardItem(r.Name);\n        QStandardItem *valueItem = new QStandardItem(r.Value);\n        QMap<QString,QString>::const_iterator it = m_checkRegsMap.find(r.Name);\n        if (it != m_checkRegsMap.end() && it.value() != r.Value) {\n#if QT_VERSION >= 0x050000\n            valueItem->setData(QColor(Qt::red),Qt::TextColorRole);\n#else\n            valueItem->setData(Qt::red,Qt::TextColorRole);\n#endif\n        }\n        saveMap.insert(r.Name,r.Value);\n        m_registersModel->appendRow(QList<QStandardItem*>() << name << valueItem);\n    }\n    m_checkRegsMap = saveMap;\n    emit endUpdateModel(LiteApi::REGS_MODEL);\n}\n\nstatic Variable parserRealVar(const Variable &var)\n{\n    if (var.Type.startsWith(\"*\")) {\n        if (var.Children.size() == 1) {\n            return parserRealVar(var.Children[0]);\n        }\n    }\n    return var;\n}\n\nvoid DlvRpcDebugger::updateVariableHelper(const QList<Variable> &vars, QStandardItemModel *model, QStandardItem *parent, const QString &parentName, int flag, QMap<QString,QString> &saveMap, const QMap<QString,QString> &checkMap)\n{\n    int index = -1;\n    foreach (Variable var, vars) {\n        index++;\n        QStandardItem *nameItem = new QStandardItem(var.Name);\n        nameItem->setData(var.Name,VarNameRole);\n        QStandardItem *typeItem = new QStandardItem(var.Type);\n        QStandardItem *valueItem = new QStandardItem(var.Value);\n        valueItem->setToolTip(var.Value);\n        QStandardItem *addrItem = new QStandardItem(QString(\"0x%1\").arg(var.Addr,0,16));\n        QString checkName = parentName+\".\"+var.Name;\n        // slice []\n        if (flag == 2) {\n            checkName = parentName+\".\"+QString(\"%1\").arg(index);\n            nameItem->setText(QString(\"[%1]\").arg(index));\n        }\n        QString rtype = var.Type;\n        int rlen = var.Len;\n        int rcap = var.Cap;\n        QList<Variable> children = var.Children;\n        if (var.Type.startsWith(\"*\")) {\n            Variable rv = parserRealVar(var);\n            rtype = rv.Type;\n            rlen = rv.Len;\n            rcap = rv.Cap;\n            children = rv.Children;\n            if (var.Addr != rv.Addr) {\n                addrItem->setText(QString(\"0x%1 => 0x%2\").arg(var.Addr,0,16).arg(rv.Addr,0,16));\n            }\n        }\n        //children flag\n        int cflag = 1;\n        if (rtype.startsWith(\"[]\")) {\n            cflag = 2;\n            typeItem->setText(QString(\"%1 <len:%2,cap:%3>\").arg(var.Type).arg(rlen).arg(rcap));\n            //valueItem->setText(QString(\"(len:%1,cap:%2)\").arg(var.Len).arg(var.Cap));\n        } else if (rtype.startsWith(\"map[\")) {\n            cflag = 3;\n            typeItem->setText(QString(\"%1 <len:%2>\").arg(var.Type).arg(rlen));\n        } else if (rtype == \"string\") {\n            cflag = 4;\n            typeItem->setText(QString(\"%1 <len:%2>\").arg(var.Type).arg(rlen));\n        } else if (!children.isEmpty()) {\n            cflag = 5;\n            if (rlen > 0) {\n                typeItem->setText(QString(\"%1 <size:%2>\").arg(var.Type).arg(rlen));\n            }\n        }\n\n        if (!children.isEmpty()) {\n            updateVariableHelper(children,model,nameItem,checkName,cflag,saveMap,checkMap);\n        }\n        QMap<QString,QString>::const_iterator it = checkMap.find(checkName);\n        if (it != checkMap.end() && it.value() != var.Value) {\n#if QT_VERSION >= 0x050000\n            valueItem->setData(QColor(Qt::red),Qt::TextColorRole);\n#else\n            valueItem->setData(Qt::red,Qt::TextColorRole);\n#endif\n        }\n        saveMap.insert(checkName,var.Value);\n        if (parent) {\n            parent->appendRow(QList<QStandardItem*>() << nameItem << typeItem << valueItem << addrItem);\n        } else {\n            model->appendRow(QList<QStandardItem*>() << nameItem << typeItem << valueItem << addrItem);\n        }\n    }\n}\n\nvoid DlvRpcDebugger::finished(int code)\n{\n    emit debugStoped();\n    emit debugLog(LiteApi::DebugRuntimeLog,QString(\"Dlv exited with code %1\").arg(code));\n    cleanup();\n}\n\nvoid DlvRpcDebugger::error(QProcess::ProcessError err)\n{\n    emit debugStoped();\n    emit debugLog(LiteApi::DebugRuntimeLog,QString(\"Dlv error! %1\").arg(ProcessEx::processErrorText(err)));\n    cleanup();\n}\n\nvoid DlvRpcDebugger::readTty(const QByteArray &data)\n{\n    emit debugLog(LiteApi::DebugApplationLog,QString::fromUtf8(data));\n}\n\nvoid DlvRpcDebugger::headlessReadStdError()\n{\n    QString data = QString::fromUtf8(m_headlessProcess->readAllStandardError());\n    //qDebug() << data;\n    emit debugLog(LiteApi::DebugErrorLog,data);\n}\n\n\nstatic void buildMap(QStandardItem *item, const QMap<QString, QVariant> &m)\n{\n    QMapIterator<QString,QVariant> i(m);\n    while (i.hasNext()) {\n        i.next();\n        QString key = i.key();\n        QVariant value = i.value();\n        if (!key.isEmpty() && value.isValid()) {\n            if (value.type() == QVariant::Map) {\n                QStandardItem *child = new QStandardItem(key);\n                buildMap(child,value.toMap());\n                item->appendRow(child);\n            } else if (value.type() == QVariant::List) {\n                QStandardItem *child = new QStandardItem(key);\n                item->appendRow(child);\n                int index = 0;\n                foreach (QVariant v, value.toList()) {\n                    QStandardItem *aitem = new QStandardItem(QString(\"[%1]\").arg(index++));\n                    child->appendRow(aitem);\n                    if (v.type() == QVariant::Map) {\n                        buildMap(aitem,v.toMap());\n                    } else {\n                        aitem->appendColumn(QList<QStandardItem*>() << new QStandardItem(v.toString()));\n                    }\n                }\n            } else {\n                item->appendRow(QList<QStandardItem*>() << new QStandardItem(key) << new QStandardItem(value.toString()));\n            }\n        }\n    }\n}\n\nstatic void buildMapId(QStandardItem *item, const QVariant &var, const QString &id)\n{\n    item->setText(id);\n    buildMap(item,var.toMap().value(id).toMap());\n}\n\nstatic void buildListId(QStandardItem *item, const QVariant &var, const QString &id)\n{\n    item->setText(id);\n    //buildMap(item,var.toMap().value(id).toList());\n    foreach (QVariant li, var.toMap().value(id).toList()) {\n        buildMap(item,li.toMap());\n    }\n}\n\nvoid DlvRpcDebugger::headlessReadStdOutput()\n{\n    QString data = QString::fromUtf8(m_headlessProcess->readAllStandardOutput());\n    //API server listening at: 127.0.0.1:54151\n    if (!m_headlessInitAddress) {\n        QString tmp = data.trimmed();\n        QString addr;\n        if (tmp.startsWith(\"API\")) {\n            int pos = tmp.lastIndexOf(\" \");\n            if (pos != -1) {\n                addr = tmp.mid(pos+1);\n                if (addr.indexOf(\":\") > 0) {\n                    m_headlessInitAddress = true;\n                }\n            }\n        }\n        if (m_headlessInitAddress) {\n             m_dlvClient->Connect(addr);\n//             b = m_dlvInfo->Connect(addr);\n//             if (b) {\n//                 QMapIterator<QString,int> i(m_initBks);\n\n//                 while (i.hasNext()) {\n//                     i.next();\n//                     QString fileName = i.key();\n//                     QList<int> lines = m_initBks.values(fileName);\n//                     foreach(int line, lines) {\n//                         //insertBreakPointHelper(fileName,line,true);\n//                         Breakpoint bp;\n//                         bp.File = fileName;\n//                         bp.Line = line;\n//                         BreakpointPointer p = m_dlvClient->CreateBreakpoint(bp);\n//                         qDebug() << p;\n//                     }\n//                 }\n//                 m_dlvClient->CreateBreakpointByFuncName(\"main.main\");\n//                 DebuggerState state = m_dlvClient->Continue();\n//                 updateState(state,m_dlvClient->LastJsonData());\n//                 //command_helper(\"break main.main\",true);\n//                 //command_helper(\"continue\",true);\n\n//                 emit debugLoaded();\n//                 return;\n//             }\n            QStringList argsList;\n            argsList << \"connect\" << addr;\n#ifdef Q_OS_WIN\n            m_process->setNativeArguments(argsList.join(\" \"));\n            m_process->start(\"\\\"\"+m_dlvFilePath+\"\\\"\");\n#else\n            m_process->start(m_dlvFilePath + \" \" + argsList.join(\" \"));\n#endif\n            QString log = QString(\"%1 %2 [%3]\").arg(m_dlvFilePath).arg(argsList.join(\" \")).arg(m_process->workingDirectory());\n            emit debugLog(LiteApi::DebugRuntimeLog,log);\n        }\n    }\n\n    emit debugLog(LiteApi::DebugApplationLog,data);\n}\n\nvoid DlvRpcDebugger::headlessFinished(int code)\n{\n    emit debugStoped();\n    emit debugLog(LiteApi::DebugRuntimeLog,QString(\"Dlv server exited with code %1\").arg(code));\n    cleanup();\n}\n\nvoid DlvRpcDebugger::headlessError(QProcess::ProcessError err)\n{\n    emit debugStoped();\n    emit debugLog(LiteApi::DebugRuntimeLog,QString(\"Dlv server error! %1\").arg(ProcessEx::processErrorText(err)));\n    cleanup();\n}\n\nvoid DlvRpcDebugger::clientCommandSuccess(const QString &/*method*/, const DebuggerState &/*state*/, const QVariant &/*jsonData*/)\n{\n\n}\n\nvoid DlvRpcDebugger::updateState(const DebuggerState &state, const QVariant &jsonData)\n{\n    if (state.Exited) {\n        stop();\n    }\n    if (state.NextInProgress) {\n        m_asyncItem->setText(\"Running\");\n    } else {\n        m_asyncItem->setText(\"Stopped\");\n    }\n    m_asyncItem->removeRows(0,m_asyncItem->rowCount());\n    if (state.pCurrentThread) {\n        QString fileName = state.pCurrentThread->File;\n        int line = state.pCurrentThread->Line;\n        if (!fileName.isEmpty() && line >= 0) {\n            emit setCurrentLine(fileName,line-1);\n        }\n        QList<QStandardItem*> items;\n        items << new QStandardItem(QString(\"goroutine(%1)\").arg(state.pCurrentThread->GoroutineID));\n        if (state.pCurrentThread->pFunction) {\n            items << new QStandardItem(QString(\"func=%1\").arg(state.pCurrentThread->pFunction->Name));\n        }\n        items << new QStandardItem(QString(\"file=%1\").arg(fileName));\n        items << new QStandardItem(QString(\"line=%1\").arg(line));\n        m_asyncItem->appendRows(items);\n    }\n//    m_asyncItem->removeRows(0,m_asyncItem->rowCount());\n//    buildMapId(m_asyncItem,jsonData,\"State\");\n//    if (!state.pCurrentThread.isNull()) {\n//        QString fileName = state.pCurrentThread->File;\n//        int line = state.pCurrentThread->Line;\n//        if (!fileName.isEmpty() && line >= 0) {\n//            emit setCurrentLine(fileName,line-1);\n//        }\n//    }\n    emit setExpand(LiteApi::ASYNC_MODEL,m_asyncModel->indexFromItem(m_asyncItem),true);\n}\n\nvoid DlvRpcDebugger::watchItemChanged(QStandardItem *item)\n{\n    if (!item || item->column() != 0) {\n        return;\n    }\n    QString oldName = item->data(VarNameRole).toString();\n    QString newName = item->text();\n    if (oldName == newName) {\n        return;\n    }\n    emit watchRemoved(oldName);\n    if (!m_watchList.contains(newName)) {\n        int i = m_watchList.indexOf(oldName);\n        if (i >= 0) {\n            m_watchList.replace(i,newName);\n        }\n        emit watchCreated(newName,newName);\n    } else {\n        m_watchList.removeAll(oldName);\n    }\n    DebuggerState state = m_dlvClient->GetState();\n    if (!state.pCurrentThread) {\n        return;\n    }\n    updateWatch(state.pCurrentThread->GoroutineID);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/dlvdebugger/dlvrpcdebugger.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2018 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: dlvrpcdebugger.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef DLVRPCDEBUGGER_H\n#define DLVRPCDEBUGGER_H\n\n#include \"litedebugapi/litedebugapi.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"litettyapi/litettyapi.h\"\n#include \"qtc_gdbmi/gdbmi.h\"\n#include \"dlvclient/dlvclient.h\"\n#include <QSet>\n\nclass QProcess;\nclass LiteProcess;\nclass Process;\nclass GdbHandleState\n{\npublic:\n    GdbHandleState() : m_exited(false),m_stopped(false) {}\n    void clear()\n    {\n        m_reason.clear();\n        m_exited = false;\n        m_stopped = false;\n    }\n    void setExited(bool b) {m_exited = b;}\n    void setStopped(bool b) {m_stopped = b;}\n    void setReason(const QByteArray &reason) { m_reason = reason; }\n    bool exited() const { return m_exited; }\n    bool stopped() const { return m_stopped; }\n    QByteArray reason() const { return m_reason; }\npublic:\n    bool       m_exited;\n    bool       m_stopped;\n    QByteArray m_reason;\n};\n\nclass QStandardItemModel;\nclass QStandardItem;\n\nstruct funcDecl {\n    funcDecl()\n    {\n        clear();\n    }\n    void clear()\n    {\n        fileName.clear();;\n        funcName.clear();\n        start = -1;\n        end = -1;\n    }\n    QString fileName;\n    QString funcName;\n    int     start;\n    int     end;\n};\n\nclass DlvRpcDebugger : public LiteApi::IDebugger\n{\n    Q_OBJECT\npublic:\n    DlvRpcDebugger(LiteApi::IApplication *app, QObject *parent = 0);\n    ~DlvRpcDebugger();\n    enum VarItemDataRole{\n        VarNameRole = Qt::UserRole + 1,\n        VarNumChildRole,\n        VarExpanded\n    };\npublic:\n    virtual QString mimeType() const;\n    virtual QAbstractItemModel *debugModel(LiteApi::DEBUG_MODEL_TYPE type);\n    virtual void setWorkingDirectory(const QString &dir);\n    virtual void setEnvironment (const QStringList &environment);\n    virtual bool start(const QString &cmd, const QString &arguments);\n    virtual void stop();\n    virtual bool isRunning();\n    virtual void stepOver();\n    virtual void stepInto();\n    virtual void stepOut();\n    virtual void continueRun();\n    virtual void runToLine(const QString &fileName, int line);\n    virtual void command(const QByteArray &cmd);\n    virtual void enterAppText(const QString &text);\n    virtual void enterDebugText(const QString &text);\n    virtual void expandItem(QModelIndex index, LiteApi::DEBUG_MODEL_TYPE type);\n    virtual void setInitBreakTable(const QMultiMap<QString,int> &bks);\n    virtual void setInitWatchList(const QStringList &names);\n    virtual void insertBreakPoint(const QString &fileName, int line);\n    virtual void removeBreakPoint(const QString &fileName, int line);\n    bool findBreakPoint(const QString &fileName,int line);\npublic:\n    virtual void createWatch(const QString &var);\n    virtual void removeWatch(const QString &value);\n    virtual void removeAllWatch();\n    virtual void dbclickItem(QModelIndex index, LiteApi::DEBUG_MODEL_TYPE type);\n    void gotoFileByIndex(const QStandardItemModel *model, QModelIndex index, int file, int line);\nprotected:\n    void insertBreakPointHelper(const QString &fileName, int line, bool force);\n    void removeBreakPointHelper(const QString &fileName, int line, bool force);\n    void command_helper(const QByteArray &cmd, bool force);\n    void updateWatch(int id);\n    void updateVariable(int id);\n    void updateStackframe(int id);\n    void updateThreads(const QList<Thread> &ths);\n    void updateGoroutines();\n    void updateAsm(int id, quint64 pc);\n    void updateRegisters(int threadid, bool includeFp);\n    void updateVariableHelper(const QList<Variable> &vars, QStandardItemModel *model, QStandardItem *parent, const QString &parentName, int flag, QMap<QString,QString> &saveMap, const QMap<QString,QString> &checkMap);\npublic slots:\n    void appLoaded();\n    void readStdError();\n    void readStdOutput();\n    void finished(int);\n    void error(QProcess::ProcessError);\n    void readTty(const QByteArray &data);\n    void headlessReadStdError();\n    void headlessReadStdOutput();\n    void headlessFinished(int);\n    void headlessError(QProcess::ProcessError err);\n    void clientCommandSuccess(const QString &method, const DebuggerState &state, const QVariant &jsonData);\n    void updateState(const DebuggerState &state, const QVariant &jsonData);\n    void watchItemChanged(QStandardItem* item);\nprotected:\n    void handleResponse(const QByteArray &buff);\nprotected:\n    void cleanup();\n    void clear();\n    void initDebug();\nprotected:\n    QString                 m_lastFileName;\n    int                     m_lastFileLine;\n    LiteApi::IApplication   *m_liteApp;\n    LiteApi::IEnvManager    *m_envManager;\n    QMap<QString,QString>   m_watchNameMap;\n    QStringList             m_updateCmdList;\n    QStringList             m_updateCmdHistroy;\n    QString                 m_lastCmd;\n    QString                 m_processId;\n    LiteProcess *m_process;\n    Process *m_headlessProcess;\n    DlvClient   *m_dlvClient;\n    QStandardItemModel *m_asyncModel;\n    QStandardItemModel *m_varsModel;\n    QStandardItemModel *m_watchModel;\n    QStandardItemModel *m_framesModel;\n    QStandardItemModel *m_threadsModel;\n    QStandardItemModel *m_goroutinesModel;\n    QStandardItemModel *m_registersModel;\n    QStandardItemModel *m_asmModel;\n    QStandardItem   *m_asyncItem;\n    QStandardItem   *m_varsItem;\n    QMap<QString,QString> m_checkVarsMap;\n    QMap<QString,QString> m_checkWatchMap;\n    QMap<QString,QString> m_checkRegsMap;\n    QList<QString> m_watchList;\n    QMap<QString,QStandardItem*> m_nameItemMap;\n    QSet<QStandardItem*> m_varChangedItemList;\n    QString m_dlvFilePath;\n    QString m_runtimeFilePath;\n    QByteArray m_inbuffer;\n    GdbHandleState m_handleState;\n    QMultiMap<QString,int>  m_initBks;\n    QMap<QString,QString> m_locationBkMap;\n    QList<QByteArray> m_cmdList;\n    QList<QByteArray> m_dlvRunningCmdList;\n    bool    m_readDataBusy;\n    bool    m_writeDataBusy;\n    bool    m_dlvInit;\n    bool    m_dlvExit;\n    bool    m_headlessInitAddress;\n};\n\n#endif // DLVRPCDEBUGGER_H\n"
  },
  {
    "path": "liteidex/src/plugins/fakevimedit/fakevimedit.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: fakevimedit.cpp\r\n// Creator: jsuppe <jon.suppe@gmail.com>\r\n\r\n#include \"fakevim/fakevim/fakevimhandler.h\"\r\n#include \"fakevim/fakevim/fakevimactions.h\"\r\n#include \"fakevimedit.h\"\r\n#include \"fakevimedit_global.h\"\r\n#include \"qtc_editutil/uncommentselection.h\"\r\n#include \"litebuildapi/litebuildapi.h\"\r\n#include \"fileutil/fileutil.h\"\r\n#include <QMenu>\r\n#include <QToolBar>\r\n#include <QAction>\r\n#include <QTextStream>\r\n#include <QApplication>\r\n#include <QToolTip>\r\n#include <QLabel>\r\n#include <QStatusBar>\r\n#include \"liteeditorapi/liteeditorapi.h\"\r\n#include \"../liteeditor/liteeditor_global.h\"\r\n\r\nusing namespace FakeVim::Internal;\r\n\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nFakeVimEdit::FakeVimEdit(LiteApi::IApplication *app, QObject *parent) :\r\n    QObject(parent),\r\n    m_liteApp(app),\r\n    m_enableUseFakeVim(false),\r\n    m_commandLabel(0)\r\n{\r\n    connect(m_liteApp->editorManager(),SIGNAL(editorCreated(LiteApi::IEditor*)),this,SLOT(editorCreated(LiteApi::IEditor*)));\r\n    connect(m_liteApp->editorManager(),SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(currentEditorChanged(LiteApi::IEditor*)));\r\n    connect(m_liteApp->optionManager(),SIGNAL(applyOption(QString)),this,SLOT(applyOption(QString)));\r\n\r\n    this->applyOption(OPTION_FAKEVIMEDIT);\r\n\r\n    m_enableUseFakeVim = m_liteApp->settings()->value(FAKEVIMEDIT_USEFAKEVIM,false).toBool();\r\n\r\n    m_enableUseFakeVimAct = new QAction(tr(\"Use FakeVim Editing\"),this);\r\n    m_enableUseFakeVimAct->setCheckable(true);\r\n    m_enableUseFakeVimAct->setChecked(m_enableUseFakeVim);\r\n\r\n    connect(m_enableUseFakeVimAct,SIGNAL(toggled(bool)),this,SLOT(toggledEnableUseFakeVim(bool)));\r\n\r\n    if (m_enableUseFakeVim) {\r\n        _enableFakeVim();\r\n    }\r\n}\r\n\r\nvoid FakeVimEdit::toggledEnableUseFakeVim(bool b)\r\n{\r\n    m_enableUseFakeVim = b;\r\n    m_liteApp->settings()->setValue(FAKEVIMEDIT_USEFAKEVIM,b);\r\n    if(m_enableUseFakeVim){\r\n        _enableFakeVim();\r\n    }else{\r\n        _disableFakeVim();\r\n    }\r\n}\r\n\r\nvoid FakeVimEdit::applyOption(const QString &option)\r\n{\r\n    if (option != OPTION_FAKEVIMEDIT) {\r\n        return;\r\n    }\r\n    m_initCommandList = m_liteApp->settings()->value(FAKEVIMEDIT_INITCOMMANDS,initCommandList()).toStringList();\r\n}\r\n\r\n\r\nvoid FakeVimEdit::_enableFakeVim(){\r\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\r\n    _addCommandLabel();\r\n    _addFakeVimToEditor(editor);\r\n}\r\n\r\nvoid FakeVimEdit::_disableFakeVim(){\r\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\r\n    _removeFakeVimFromEditor(editor);\r\n    _removeCommandLabel();\r\n}\r\n\r\nQFont FakeVimEdit::commandLabelFont(){\r\n    QFont font;\r\n    font.setStyleHint(QFont::Monospace);\r\n    font.setBold(true);\r\n    return font;\r\n}\r\n\r\nvoid FakeVimEdit::_addCommandLabel(){\r\n    QFont font = commandLabelFont();\r\n\r\n    _removeCommandLabel();\r\n    m_commandLabel = new QLabel(m_liteApp->mainWindow());\r\n    m_commandLabel->setFont(font);\r\n    m_liteApp->mainWindow()->statusBar()->addPermanentWidget(m_commandLabel);\r\n}\r\n\r\nvoid FakeVimEdit::_removeCommandLabel(){\r\n    if(!m_commandLabel){\r\n        return;\r\n    }\r\n    m_liteApp->mainWindow()->statusBar()->removeWidget(m_commandLabel);\r\n    delete m_commandLabel;\r\n    m_commandLabel = NULL;\r\n}\r\n\r\nvoid FakeVimEdit::_removeFakeVimFromEditor(LiteApi::IEditor *editor){\r\n    LiteApi::ILiteEditor  *ed = LiteApi::getLiteEditor(editor);\r\n\r\n    if (!ed) {\r\n        return;\r\n    }\r\n    QString mime = editor->mimeType();\r\n\r\n    bool tabToSpace = false;\r\n    int tabWidth = 4;\r\n    LiteApi::IMimeType *im = m_liteApp->mimeTypeManager()->findMimeType(mime);\r\n    if (im) {\r\n        tabToSpace = im->tabToSpace();\r\n        tabWidth = im->tabWidth();\r\n    }\r\n    tabWidth = m_liteApp->settings()->value(MIMETYPE_TABWIDTH+mime,tabWidth).toInt();\r\n    tabToSpace = m_liteApp->settings()->value(MIMETYPE_TABTOSPACE+mime,tabToSpace).toBool();\r\n    ed->setTabOption(tabWidth,tabToSpace);\r\n\r\n    QPlainTextEdit *ped = LiteApi::getPlainTextEdit(ed);\r\n\r\n    if(!ped){\r\n        return;\r\n    }\r\n\r\n    if(FakeVimHandler *fakeVimHandler = m_editorMap.value(ped)){\r\n        delete fakeVimHandler;\r\n        m_editorMap.remove(ped);\r\n    }\r\n}\r\n\r\nvoid FakeVimEdit::_addFakeVimToEditor(LiteApi::IEditor *editor){\r\n    LiteApi::ILiteEditor  *ed = LiteApi::getLiteEditor(editor);\r\n\r\n    if (!ed) {\r\n        return;\r\n    }\r\n\r\n    QPlainTextEdit *ped = LiteApi::getPlainTextEdit(ed);\r\n\r\n    if(!ped){\r\n        return;\r\n    }\r\n\r\n    if(m_editorMap.contains(ped)){\r\n        return;\r\n    }\r\n\r\n    FakeVimHandler *fakeVimHandler;\r\n\r\n    fakeVimHandler = new FakeVimHandler(ped,0);\r\n\r\n    connect(fakeVimHandler, SIGNAL(handleExCommandRequested(bool*,ExCommand)),\r\n            this, SLOT(handleExCommandRequested(bool*,ExCommand)));\r\n    connect(fakeVimHandler, SIGNAL(commandBufferChanged(QString,int,int,int,QObject*)),\r\n            this, SLOT(showMessage(QString,int)));\r\n    connect(fakeVimHandler, SIGNAL(moveToMatchingParenthesis(bool *, bool *, QTextCursor *)),\r\n            this, SLOT(moveToMatchingParenthesis(bool *, bool *,QTextCursor *)));\r\n\r\n    //init command list\r\n    {\r\n        fakeVimHandler->handleCommand(\"set shiftwidth=4\");\r\n        fakeVimHandler->handleCommand(\"set tabstop=4\");\r\n        foreach(QString cmd, m_initCommandList) {\r\n            if (cmd.startsWith(\"#\")) {\r\n                continue;\r\n            }\r\n            fakeVimHandler->handleCommand(cmd);\r\n        }\r\n        fakeVimHandler->handleInput(\"<esc>\");\r\n    }\r\n\r\n    fakeVimHandler->setCurrentFileName(ed->filePath());\r\n    fakeVimHandler->installEventFilter();\r\n    fakeVimHandler->setupWidget();\r\n\r\n    connect(ped, SIGNAL(destroyed(QObject*)), this, SLOT(plainTextEditDestroyed(QObject*)));\r\n\r\n    m_editorMap[ped] = fakeVimHandler;\r\n}\r\n\r\nvoid FakeVimEdit::plainTextEditDestroyed(QObject *obj)\r\n{\r\n    m_editorMap.remove(obj);\r\n}\r\n\r\nvoid FakeVimEdit::handleExCommandRequested(bool *b, ExCommand c)\r\n{\r\n    // Save\r\n    if(c.cmd == \"w\" ){\r\n        m_liteApp->editorManager()->saveEditor(m_editor);\r\n        *b = true;\r\n    }\r\n\r\n    // Save & Close\r\n    if(c.cmd == \"x\"){\r\n        m_liteApp->editorManager()->saveEditor(m_editor);\r\n        m_liteApp->editorManager()->closeEditor(m_editor);\r\n        *b = true;\r\n    }\r\n\r\n    // Close\r\n    if(c.cmd == \"q\"){\r\n        if(c.hasBang){\r\n            m_editor->reload();\r\n        }\r\n        m_liteApp->editorManager()->closeEditor(m_editor);\r\n        *b = true;\r\n    }\r\n}\r\n\r\nvoid FakeVimEdit::moveToMatchingParenthesis(bool *moved, bool *forward, QTextCursor *cursor)\r\n{\r\n    LiteApi::IEditor *editor = m_editor;\r\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(editor,\"Editor\");\r\n    LiteApi::ActionInfo *info = actionContext->actionInfo(\"GotoMatchBrace\");\r\n\r\n    info->action->trigger();\r\n\r\n    int oldPos = cursor->position();\r\n    int newPos = this->m_editor->textCursor().position();\r\n    cursor->setPosition(newPos);\r\n\r\n    if(oldPos <= newPos){\r\n        *forward = true;\r\n    }else{\r\n        *forward = false;\r\n    }\r\n    if(oldPos == newPos){\r\n        *moved = false;\r\n    }else{\r\n        *moved = true;\r\n    }\r\n}\r\n\r\n\r\nvoid FakeVimEdit::editorCreated(LiteApi::IEditor *editor)\r\n{\r\n    if (!editor) {\r\n        return;\r\n    }\r\n\r\n    QMenu *menu = LiteApi::getEditMenu(editor);\r\n    if (menu) {\r\n        menu->addSeparator();\r\n        menu->addAction(m_enableUseFakeVimAct);\r\n    }\r\n\r\n    if (!m_enableUseFakeVim){\r\n        return;\r\n    }\r\n\r\n    m_editor = LiteApi::getLiteEditor(editor);\r\n    if (m_editor) {\r\n        m_plainTextEdit = LiteApi::getPlainTextEdit(editor);\r\n    }else{\r\n        return;\r\n    }\r\n\r\n    if(!m_enableUseFakeVim)\r\n        return;\r\n\r\n    _addFakeVimToEditor(editor);\r\n}\r\n\r\nvoid FakeVimEdit::currentEditorChanged(LiteApi::IEditor *editor)\r\n{\r\n    if (!editor) {\r\n        return;\r\n    }\r\n    m_editor = LiteApi::getLiteEditor(editor);\r\n    QPlainTextEdit *ped = LiteApi::getPlainTextEdit(editor);\r\n\r\n    if (m_enableUseFakeVim){\r\n        if(!m_editorMap.contains(ped)) {\r\n            _addFakeVimToEditor(editor);\r\n        }\r\n    }else{\r\n        if (m_editorMap.contains(ped)) {\r\n            _removeFakeVimFromEditor(editor);\r\n        }\r\n    }\r\n}\r\n\r\nvoid FakeVimEdit::showMessage(QString contents, int cursorPos)\r\n{\r\n    if(!m_commandLabel){\r\n        return;\r\n    }\r\n    QString m_statusMessage = cursorPos == -1 ? contents\r\n        : contents.left(cursorPos) + QChar(10073) + contents.mid(cursorPos);\r\n\r\n    int slack = 14 - m_statusMessage.size();\r\n    QString msg = m_statusMessage + QString(slack, QLatin1Char(' '));\r\n\r\n    m_commandLabel->setText(msg);\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/fakevimedit/fakevimedit.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: fakevimedit.h\r\n// Creator: jsuppe <jon.suppe@gmail.com>\r\n\r\n#ifndef FAKEVIMEDIT_H\r\n#define FAKEVIMEDIT_H\r\n\r\n#include <liteapi/liteapi.h>\r\n#include <liteeditorapi/liteeditorapi.h>\r\n#include <liteenvapi/liteenvapi.h>\r\n#include \"processex/processex.h\"\r\n#include \"textoutput/textoutput.h\"\r\n\r\n#include \"fakevim/fakevim/fakevimhandler.h\"\r\n\r\nusing namespace FakeVim::Internal;\r\n\r\nclass QLabel;\r\nclass FakeVimEdit : public QObject\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    explicit FakeVimEdit(LiteApi::IApplication *app, QObject *parent = 0);\r\n    virtual ~FakeVimEdit(){}\r\n    static QFont commandLabelFont();\r\n\r\npublic slots:\r\n    void applyOption(const QString &option);\r\n    void editorCreated(LiteApi::IEditor*);\r\n    void currentEditorChanged(LiteApi::IEditor*);\r\n    void toggledEnableUseFakeVim(bool b);\r\n\r\nprotected slots:\r\n    void showMessage(QString contents, int);\r\n    void plainTextEditDestroyed(QObject *);\r\n\r\n    void handleExCommandRequested(bool*,ExCommand);\r\n\r\nprivate slots:\r\n    void moveToMatchingParenthesis(bool *moved, bool *forward, QTextCursor *cursor);\r\nprivate:\r\n    FakeVimEdit(const FakeVimEdit&);\r\n    FakeVimEdit& operator=(const FakeVimEdit&);\r\n    void _addFakeVimToEditor(LiteApi::IEditor *editor);\r\n    void _removeFakeVimFromEditor(LiteApi::IEditor *editor);\r\n    void _addCommandLabel();\r\n    void _removeCommandLabel();\r\n    void _enableFakeVim();\r\n    void _disableFakeVim();\r\n    LiteApi::IApplication *m_liteApp;\r\n    LiteApi::ILiteEditor  *m_editor;\r\n    QPlainTextEdit        *m_plainTextEdit;\r\n\r\n    bool m_enableUseFakeVim;\r\n    QLabel *m_commandLabel;\r\n\r\n    QMap<QObject *,FakeVimHandler *> m_editorMap;\r\n    QAction *m_enableUseFakeVimAct;\r\n    QStringList  m_initCommandList;\r\n};\r\n\r\n#endif // FAKEVIMEDIT_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/fakevimedit/fakevimedit.pro",
    "content": "TARGET = fakevimedit\r\nTEMPLATE = lib\r\n\r\ninclude (../../liteideplugin.pri)\r\ninclude (../../api/litefindapi/litefindapi.pri)\r\ninclude (../../api/liteeditorapi/liteeditorapi.pri)\r\ninclude (../../3rdparty/fakevim/fakevim/fakevim.pri)\r\n\r\nDEFINES += FAKEVIMEDIT_LIBRARY\r\n\r\nSOURCES += fakevimeditplugin.cpp \\\r\n    fakevimedit.cpp \\\r\n    fakevimeditoption.cpp \\\r\n    fakevimeditoptionfactory.cpp\r\n\r\nHEADERS += fakevimeditplugin.h\\\r\n        fakevimedit_global.h \\\r\n    fakevimedit.h \\\r\n    fakevimeditoption.h \\\r\n    fakevimeditoptionfactory.h\r\n\r\nFORMS += \\\r\n    fakevimeditoption.ui\r\n"
  },
  {
    "path": "liteidex/src/plugins/fakevimedit/fakevimedit_global.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: fakevimedit_global.h\r\n// Creator: jsuppe <jon.suppe@gmail.com>\r\n\r\n#ifndef FAKEVIMEDIT_GLOBAL_H\r\n#define FAKEVIMEDIT_GLOBAL_H\r\n\r\n#include <QtCore/qglobal.h>\r\n\r\n#if defined(FAKEVIMEDIT_LIBRARY)\r\n#  define FAKEVIMEDITSHARED_EXPORT Q_DECL_EXPORT\r\n#else\r\n#  define FAKEVIMEDITSHARED_EXPORT Q_DECL_IMPORT\r\n#endif\r\n\r\n#define OPTION_FAKEVIMEDIT   \"option/fakevimedit\"\r\n#define FAKEVIMEDIT_USEFAKEVIM \"fakevimedit/usefakevim\"\r\n#define FAKEVIMEDIT_INITCOMMANDS \"fakevimedit/initcommands\"\r\n\r\ninline QStringList make_init_list()\r\n{\r\n    QStringList list;\r\n    list << \"#this is fakevim init command list\";\r\n    list << \"set nopasskeys\";\r\n    list << \"set nopasscontrolkey\";\r\n    list << \"set shiftwidth=4\";\r\n    list << \"set tabstop=4\";\r\n    list << \"set autoindent\";\r\n    //list << \"#source fakevimrc\";\r\n    return list;\r\n}\r\n\r\ninline QStringList initCommandList()\r\n{\r\n    static QStringList list = make_init_list();\r\n    return list;\r\n}\r\n\r\n#endif // FAKEVIMEDIT_GLOBAL_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/fakevimedit/fakevimeditoption.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: fakevimeditoption.cpp\r\n// Creator: jsuppe <jon.suppe@gmail.com>\r\n\r\n#include \"fakevimeditoption.h\"\r\n#include \"ui_fakevimeditoption.h\"\r\n#include \"fakevimedit_global.h\"\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nFakeVimEditOption::FakeVimEditOption(LiteApi::IApplication *app,QObject *parent) :\r\n    LiteApi::IOption(parent),\r\n    m_liteApp(app),\r\n    m_widget(new QWidget),\r\n    ui(new Ui::FakeVimEditOption)\r\n{\r\n    ui->setupUi(m_widget);\r\n    connect(ui->resetCommandsButton,SIGNAL(clicked(bool)),this,SLOT(on_resetCommandsButton_clicked()));\r\n}\r\n\r\nFakeVimEditOption::~FakeVimEditOption()\r\n{\r\n    delete m_widget;\r\n    delete ui;\r\n}\r\n\r\nQWidget *FakeVimEditOption::widget()\r\n{\r\n    return m_widget;\r\n}\r\n\r\nQString FakeVimEditOption::name() const\r\n{\r\n    return \"FakeVimEdit\";\r\n}\r\n\r\nQString FakeVimEditOption::mimeType() const\r\n{\r\n    return OPTION_FAKEVIMEDIT;\r\n}\r\n\r\nvoid FakeVimEditOption::load()\r\n{\r\n    QStringList cmds = m_liteApp->settings()->value(FAKEVIMEDIT_INITCOMMANDS,initCommandList()).toStringList();\r\n    ui->textInitCommands->setPlainText(cmds.join(\"\\n\"));\r\n}\r\n\r\nvoid FakeVimEditOption::save()\r\n{\r\n    //bool useFakeVim = ui->enableUseFakeVimCheckBox->isChecked();\r\n    QStringList cmds = ui->textInitCommands->toPlainText().split(\"\\n\",qtSkipEmptyParts);\r\n    m_liteApp->settings()->setValue(FAKEVIMEDIT_INITCOMMANDS,cmds);\r\n}\r\n\r\nvoid FakeVimEditOption::on_resetCommandsButton_clicked()\r\n{\r\n    ui->textInitCommands->setPlainText(initCommandList().join(\"\\n\"));\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/fakevimedit/fakevimeditoption.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: fakevimeditoption.h\r\n// Creator: jsuppe <jon.suppe@gmail.com>\r\n\r\n#ifndef FAKEVIMEDITOPTION_H\r\n#define FAKEVIMEDITOPTION_H\r\n\r\n#include \"liteapi/liteapi.h\"\r\n\r\nnamespace Ui {\r\n    class FakeVimEditOption;\r\n}\r\n\r\nclass FakeVimEditOption : public LiteApi::IOption\r\n{\r\n    Q_OBJECT\r\n\r\npublic:\r\n    explicit FakeVimEditOption(LiteApi::IApplication *app, QObject *parent = 0);\r\n    ~FakeVimEditOption();\r\n    virtual QWidget *widget();\r\n    virtual QString name() const;\r\n    virtual QString mimeType() const;\r\n    virtual void load();\r\n    virtual void save();\r\nprivate slots:\r\n    void on_resetCommandsButton_clicked();\r\n\r\nprivate:\r\n    LiteApi::IApplication   *m_liteApp;\r\n    QWidget           *m_widget;\r\n    Ui::FakeVimEditOption *ui;\r\n};\r\n\r\n#endif // FAKEVIMEDITOPTION_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/fakevimedit/fakevimeditoption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>FakeVimEditOption</class>\r\n <widget class=\"QWidget\" name=\"FakeVimEditOption\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>395</width>\r\n    <height>242</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Form</string>\r\n  </property>\r\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\r\n   <item>\r\n    <widget class=\"QGroupBox\" name=\"groupBox\">\r\n     <property name=\"title\">\r\n      <string>FakeVim initialization command list (# start is comment):</string>\r\n     </property>\r\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\r\n      <item>\r\n       <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\r\n        <item>\r\n         <widget class=\"QPushButton\" name=\"resetCommandsButton\">\r\n          <property name=\"text\">\r\n           <string>Load default init command list</string>\r\n          </property>\r\n         </widget>\r\n        </item>\r\n        <item>\r\n         <spacer name=\"horizontalSpacer\">\r\n          <property name=\"orientation\">\r\n           <enum>Qt::Horizontal</enum>\r\n          </property>\r\n          <property name=\"sizeHint\" stdset=\"0\">\r\n           <size>\r\n            <width>40</width>\r\n            <height>20</height>\r\n           </size>\r\n          </property>\r\n         </spacer>\r\n        </item>\r\n       </layout>\r\n      </item>\r\n      <item>\r\n       <widget class=\"QPlainTextEdit\" name=\"textInitCommands\"/>\r\n      </item>\r\n     </layout>\r\n    </widget>\r\n   </item>\r\n   <item>\r\n    <spacer name=\"verticalSpacer\">\r\n     <property name=\"orientation\">\r\n      <enum>Qt::Vertical</enum>\r\n     </property>\r\n     <property name=\"sizeHint\" stdset=\"0\">\r\n      <size>\r\n       <width>20</width>\r\n       <height>40</height>\r\n      </size>\r\n     </property>\r\n    </spacer>\r\n   </item>\r\n  </layout>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "liteidex/src/plugins/fakevimedit/fakevimeditoptionfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: fakevimeditoptionfactory.cpp\n// Creator: jsuppe <jon.suppe@gmail.com>\n\n#include \"fakevimeditoption.h\"\n#include \"fakevimeditoptionfactory.h\"\n#include \"fakevimedit_global.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nFakeVimEditOptionFactory::FakeVimEditOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n}\n\nQStringList FakeVimEditOptionFactory::mimeTypes() const\n{\n    return QStringList() << OPTION_FAKEVIMEDIT;\n}\n\nLiteApi::IOption *FakeVimEditOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == OPTION_FAKEVIMEDIT) {\n        return new FakeVimEditOption(m_liteApp,this);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/fakevimedit/fakevimeditoptionfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: fakevimeditoptionfactory.h\n// Creator: jsuppe <jon.suppe@gmail.com>\n\n#ifndef FAKEVIMEDITOPTIONFACTORY_H\n#define FAKEVIMEDITOPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass FakeVimEditOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n    FakeVimEditOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // FAKEVIMEDITOPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/fakevimedit/fakevimeditplugin.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: fakevimeditplugin.cpp\r\n// Creator: jsuppe <jon.suppe@gmail.com>\r\n\r\n\r\n#include \"fakevimedit.h\"\r\n#include \"fakevimeditplugin.h\"\r\n#include \"fakevimeditoptionfactory.h\"\r\n#include \"liteeditorapi/liteeditorapi.h\"\r\n#include <QtPlugin>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nFakeVimEditPlugin::FakeVimEditPlugin()\r\n{\r\n}\r\n\r\nbool FakeVimEditPlugin::load(LiteApi::IApplication *app)\r\n{\r\n    app->optionManager()->addFactory(new FakeVimEditOptionFactory(app,this));\r\n    new FakeVimEdit(app,this);\r\n    return true;\r\n}\r\n\r\n#if QT_VERSION < 0x050000\r\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\r\n#endif\r\n"
  },
  {
    "path": "liteidex/src/plugins/fakevimedit/fakevimeditplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: fakevimeditplugin.h\n// Creator: jsuppe <jon.suppe@gmail.com>\n\n#ifndef FAKEVIMEDITPLUGIN_H\n#define FAKEVIMEDITPLUGIN_H\n\n#include \"liteapi/liteapi.h\"\n\nclass FakeVimEditPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    FakeVimEditPlugin();\n    virtual bool load(LiteApi::IApplication *app);\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<FakeVimEditPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.FakeVimEditPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/FakeVimEdit\");\n        m_info->setVer(\"X31\");\n        m_info->setName(\"FakeVimEdit\");\n        m_info->setAuthor(\"jsuppe\");\n        m_info->setInfo(\"Fake Vim Edit Support\");\n        m_info->appendDepend(\"plugin/liteeditor\");\n    }\n};\n\n\n#endif // FAKEVIMEDITPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/filebrowser/filebrowser.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filebrowser.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"filebrowser.h\"\n#include \"golangdocapi/golangdocapi.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"litebuildapi/litebuildapi.h\"\n#include \"litedebugapi/litedebugapi.h\"\n#include \"fileutil/fileutil.h\"\n#include \"filebrowser_global.h\"\n\n#include <QVBoxLayout>\n#include <QHBoxLayout>\n#include <QComboBox>\n#include <QTreeView>\n#include <QHeaderView>\n#include <QToolBar>\n#include <QAction>\n#include <QFileInfo>\n#include <QInputDialog>\n#include <QMessageBox>\n#include <QMenu>\n#include <QProcess>\n#include <QDesktopServices>\n#include <QUrl>\n#include <QDialogButtonBox>\n#include <QLineEdit>\n#include <QLabel>\n#include <QDebug>\n#ifdef Q_OS_WIN\n#include <windows.h>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n#endif\n\nFileBrowser::FileBrowser(LiteApi::IApplication *app, QObject *parent) :\n    QObject(parent),\n    m_liteApp(app)\n{\n    m_widget = new QWidget;\n    QVBoxLayout *mainLayout = new QVBoxLayout;\n    mainLayout->setMargin(0);\n    mainLayout->setSpacing(0);\n\n    QDir::Filters filters = QDir::AllDirs | QDir::Files | QDir::Drives\n                            | QDir::Readable| QDir::Writable\n                            | QDir::Executable /*| QDir::Hidden*/\n                            | QDir::NoDotAndDotDot;\n\n    bool bShowHiddenFiles = m_liteApp->settings()->value(FILEBROWSER_SHOWHIDDENFILES,false).toBool();\n    if (bShowHiddenFiles) {\n        filters |= QDir::Hidden;\n    }\n    bool bShowDetails = m_liteApp->settings()->value(FILEBROWSER_SHOWDETAILS,false).toBool();\n\n#ifdef Q_OS_WIN // Symlinked directories can cause file watcher warnings on Win32.\n    filters |= QDir::NoSymLinks;\n#endif\n    //create filter toolbar\n    //m_filterToolBar = new QToolBar(m_widget);\n    //m_filterToolBar->setIconSize(QSize(16,16));\n\n#ifdef Q_OS_MAC\n    m_folderView = new FolderView(true,m_liteApp);\n#else\n    m_folderView = new FolderView(false,m_liteApp);\n#endif\n    m_folderView->setRootIsDecorated(true);\n    m_folderView->setFilter(filters);\n\n    m_syncAct = new QAction(QIcon(\"icon:images/sync.png\"),tr(\"Synchronize with editor\"),this);\n    m_syncAct->setCheckable(true);\n\n    m_reloadAct = new QAction(QIcon(\"icon:filebrowser/images/reload.png\"),tr(\"Reload Folder\"),this);\n\n    m_showHideFilesAct = new QAction(tr(\"Show Hidden Files\"),this);\n    m_showHideFilesAct->setCheckable(true);\n    if (bShowHiddenFiles) {\n        m_showHideFilesAct->setChecked(true);\n    }\n    connect(m_showHideFilesAct,SIGNAL(triggered(bool)),this,SLOT(showHideFiles(bool)));\n\n    m_showDetailsAct = new QAction(tr(\"Show Details\"),this);\n    m_showDetailsAct->setCheckable(true);\n    if (bShowDetails) {\n        m_showDetailsAct->setChecked(true);\n    }\n    connect(m_showDetailsAct,SIGNAL(triggered(bool)),m_folderView,SLOT(setShowDetails(bool)));\n\n    m_folderView->setShowDetails(bShowDetails);\n\n    m_executeFileAct = new QAction(tr(\"Execute File\"),this);\n    connect(m_executeFileAct,SIGNAL(triggered()),this,SLOT(executeFile()));\n\n    m_debugFileAct = new QAction(tr(\"Debug File\"),this);\n    connect(m_debugFileAct,SIGNAL(triggered()),this,SLOT(debugFile()));\n\n//    m_filterCombo = new QComboBox;\n//    m_filterCombo->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);\n//    m_filterCombo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength);\n//    m_filterCombo->setEditable(true);\n//    m_filterCombo->addItem(\"*\");\n//    m_filterCombo->addItem(\"Makefile;*.go;*.cgo;*.s;*.goc;*.y;*.e64;*.pro\");\n//    m_filterCombo->addItem(\"*.sh;Makefile;*.go;*.cgo;*.s;*.goc;*.y;*.*.c;*.cpp;*.h;*.hpp;*.e64;*.pro\");\n\n    //m_filterToolBar->addAction(m_syncAct);\n    //m_filterToolBar->addSeparator();\n    //m_filterToolBar->addWidget(m_filterCombo);\n\n    //create root toolbar\n    m_rootToolBar = new QToolBar(m_widget);\n    m_rootToolBar->setIconSize(QSize(16,16));\n\n    m_cdupAct = new QAction(QIcon(\"icon:filebrowser/images/cdup.png\"),tr(\"Open Parent\"),this);\n\n    m_rootCombo = new QComboBox;\n    m_rootCombo->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);\n    m_rootCombo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength);\n    m_rootCombo->setEditable(false);\n\n    m_rootToolBar->addAction(m_cdupAct);\n    m_rootToolBar->addAction(m_reloadAct);\n    m_rootToolBar->addSeparator();\n    m_rootToolBar->addWidget(m_rootCombo);\n\n    //mainLayout->addWidget(m_filterToolBar);\n    mainLayout->addWidget(m_rootToolBar);\n    mainLayout->addWidget(m_folderView);\n\n    m_widget->setLayout(mainLayout);\n\n    m_setRootAct = new QAction(tr(\"Set As Root Folder\"),this);\n    m_openFolderInNewWindowAct = new QAction(tr(\"Open Folder in New Window\"),this);\n    m_addToFoldersAct = new QAction(tr(\"Add to Folders\"),this);\n\n    connect(m_setRootAct,SIGNAL(triggered()),this,SLOT(setFolderToRoot()));\n    connect(m_cdupAct,SIGNAL(triggered()),this,SLOT(cdUp()));\n    connect(m_openFolderInNewWindowAct,SIGNAL(triggered()),this,SLOT(openFolderInNewWindow()));\n    connect(m_addToFoldersAct,SIGNAL(triggered()),this,SLOT(addToFolders()));\n\n    QList<QAction*> actions;\n    m_filterMenu = new QMenu(tr(\"Filter\"));\n    m_filterMenu->setIcon(QIcon(\"icon:images/filter.png\"));\n    m_filterMenu->addAction(m_showHideFilesAct);\n    m_filterMenu->addAction(m_showDetailsAct);\n    actions << m_filterMenu->menuAction() << m_syncAct;\n\n    m_toolWindowAct = m_liteApp->toolWindowManager()->addToolWindow(Qt::LeftDockWidgetArea,m_widget,\"FileSystem\",tr(\"File System\"),true,actions);\n    connect(m_toolWindowAct,SIGNAL(toggled(bool)),this,SLOT(visibilityChanged(bool)));\n    //connect(m_filterCombo,SIGNAL(activated(QString)),this,SLOT(activatedFilter(QString)));\n    connect(m_rootCombo,SIGNAL(activated(QString)),this,SLOT(activatedRoot(QString)));\n    connect(m_syncAct,SIGNAL(triggered(bool)),this,SLOT(syncFileModel(bool)));\n    connect(m_reloadAct,SIGNAL(triggered()),this,SLOT(reloadFileModel()));\n    connect(m_liteApp->editorManager(),SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(currentEditorChanged(LiteApi::IEditor*)));\n    connect(m_folderView,SIGNAL(aboutToShowContextMenu(QMenu*,LiteApi::FILESYSTEM_CONTEXT_FLAG,QFileInfo)),this,SLOT(aboutToShowContextMenu(QMenu*,LiteApi::FILESYSTEM_CONTEXT_FLAG,QFileInfo)));\n    //connect(m_folderView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(openEditor(QModelIndex)));\n    connect(m_folderView,SIGNAL(enterKeyPressed(QModelIndex)),this,SLOT(enterKeyPressedFolderView(QModelIndex)));\n    connect(m_folderView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(doubleClickedFolderView(QModelIndex)));\n\n    QString root = m_liteApp->settings()->value(\"FileBrowser/root\",\"\").toString();\n    if (!root.isEmpty()) {\n        addFolderToRoot(root);\n    }\n    bool b = m_liteApp->settings()->value(\"FileBrowser/synceditor\",true).toBool();\n    if (b) {\n        m_syncAct->setChecked(true);\n    }\n}\n\nFileBrowser::~FileBrowser()\n{\n    QString root = m_rootCombo->currentText();\n    m_liteApp->settings()->setValue(\"FileBrowser/root\",root);\n    m_liteApp->settings()->setValue(\"FileBrowser/synceditor\",m_syncAct->isChecked());\n    m_liteApp->settings()->setValue(FILEBROWSER_SHOWHIDDENFILES,m_showHideFilesAct->isChecked());\n    m_liteApp->settings()->setValue(FILEBROWSER_SHOWDETAILS,m_showDetailsAct->isChecked());\n\n    delete m_filterMenu;\n    delete m_widget;\n}\n\nvoid FileBrowser::visibilityChanged(bool)\n{\n}\n\nvoid FileBrowser::currentEditorChanged(LiteApi::IEditor *editor)\n{\n    if (!m_syncAct->isChecked()) {\n        return;\n    }\n    if (!editor) {\n        return;\n    }\n    QString fileName = editor->filePath();\n    if (fileName.isEmpty()) {\n        return;\n    }\n    QFileInfo info(fileName);\n\n    addFolderToRoot(info.path());\n\n    QModelIndex index = m_folderView->indexForPath(fileName);\n    if (!index.isValid()) {\n        return;\n    }\n    m_folderView->scrollTo(index,QAbstractItemView::EnsureVisible);\n    m_folderView->clearSelection();\n    m_folderView->setCurrentIndex(index);\n}\n\nvoid FileBrowser::syncFileModel(bool b)\n{\n    if (b == false) {\n        return;\n    } else {\n        currentEditorChanged(m_liteApp->editorManager()->currentEditor());\n    }\n}\n\nvoid FileBrowser::reloadFileModel()\n{\n    m_folderView->reload();\n}\n\nvoid FileBrowser::aboutToShowContextMenu(QMenu *menu, LiteApi::FILESYSTEM_CONTEXT_FLAG flag, const QFileInfo &info)\n{\n    m_liteApp->fileManager()->emitAboutToShowFolderContextMenu(menu,flag,info,\"filebrowser\");\n    if (flag == LiteApi::FILESYSTEM_FILES) {\n        QString cmd = FileUtil::lookPathInDir(info.fileName(),info.path());\n        if (!cmd.isEmpty()) {\n            QAction *act = 0;\n            if (!menu->actions().isEmpty()) {\n                act = menu->actions().at(0);\n            }\n            menu->insertAction(act,m_executeFileAct);\n            bool hasGo = false;\n            foreach(QFileInfo info, QDir(info.path()).entryInfoList(QDir::Files)) {\n                if (info.suffix() == \"go\") {\n                    hasGo = true;\n                    break;\n                }\n            }\n            if (hasGo) {\n                menu->insertAction(act,m_debugFileAct);\n            }\n            menu->insertSeparator(act);\n        }\n    } else if (flag == LiteApi::FILESYSTEM_FOLDER || flag == LiteApi::FILESYSTEM_ROOTFOLDER) {\n        menu->addSeparator();\n        if (flag == LiteApi::FILESYSTEM_ROOTFOLDER) {\n            menu->addAction(m_cdupAct);\n        } else {\n            menu->addAction(m_setRootAct);\n        }\n        menu->addAction(m_addToFoldersAct);\n        menu->addAction(m_openFolderInNewWindowAct);\n    }\n}\n\nvoid FileBrowser::showHideFiles(bool b)\n{\n    if (isShowHideFiles() == b) {\n        return;\n    }\n    QDir::Filters filters = m_folderView->filter();\n    if (b) {\n        filters |= QDir::Hidden;\n    } else {\n        filters ^= QDir::Hidden;\n    }\n    m_folderView->setFilter(filters);\n}\n\nbool FileBrowser::isShowHideFiles() const\n{\n    return m_folderView->filter() & QDir::Hidden;\n}\n\nvoid FileBrowser::openFolderInNewWindow()\n{\n    QDir dir = m_folderView->contextDir();\n    m_liteApp->fileManager()->openFolderInNewWindow(dir.path());\n}\n\nvoid FileBrowser::addToFolders()\n{\n    QDir dir = m_folderView->contextDir();\n    m_liteApp->fileManager()->addFolderList(dir.path());\n}\n\nvoid FileBrowser::executeFile()\n{\n    LiteApi::ILiteBuild *build = LiteApi::getLiteBuild(m_liteApp);\n    if (build) {\n        QFileInfo info = m_folderView->contextFileInfo();\n        QString cmd = FileUtil::lookPathInDir(info.fileName(),info.path());\n        if (!cmd.isEmpty()) {\n            build->execCommand(cmd,QString(),info.path(),true,true,false);\n        }\n    }\n}\n\nvoid FileBrowser::debugFile()\n{\n    LiteApi::ILiteDebug *debug = LiteApi::getLiteDebug(m_liteApp);\n    if (debug) {\n        QFileInfo info = m_folderView->contextFileInfo();\n        debug->startDebug(info.fileName(),\"\",info.path());\n    }\n}\n\nvoid FileBrowser::enterKeyPressedFolderView(const QModelIndex &index)\n{\n    QFileInfo info = m_folderView->fileInfo(index);\n    if (info.isFile()) {\n        m_liteApp->fileManager()->openEditor(info.filePath());\n    } else if (info.isDir()) {\n        m_folderView->setExpanded(index,!m_folderView->isExpanded(index));\n    }\n}\n\nvoid FileBrowser::doubleClickedFolderView(const QModelIndex &index)\n{\n    QFileInfo info = m_folderView->fileInfo(index);\n    if (info.isFile()) {\n        m_liteApp->fileManager()->openEditor(info.filePath());\n    }\n}\n\nvoid FileBrowser::addFolderToRoot(const QString &path)\n{\n    int index = -1;\n    for (int i = 0; i < m_rootCombo->count(); i++) {\n        QString text = m_rootCombo->itemText(i);\n        if (text == path) {\n            index = i;\n            break;\n        }\n    }\n    if (index == -1) {\n        m_rootCombo->addItem(path);\n        index = m_rootCombo->count()-1;\n    }\n    m_rootCombo->setCurrentIndex(index);\n    activatedRoot(path);\n}\n\nvoid FileBrowser::setFolderToRoot()\n{\n    QDir dir = m_folderView->contextDir();\n    addFolderToRoot(dir.path());\n}\n\nvoid FileBrowser::activatedRoot(QString path)\n{\n    m_folderView->setRootPath(path);\n}\n\nvoid FileBrowser::cdUp()\n{\n    QString path = m_folderView->rootPath();\n    if (path.isEmpty()) {\n        return;\n    }\n    QDir dir(path);\n    if (!dir.path().isEmpty() && dir.cdUp()) {\n        addFolderToRoot(dir.path());\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/filebrowser/filebrowser.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filebrowser.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FILEBROWSER_H\n#define FILEBROWSER_H\n\n#include \"liteapi/liteapi.h\"\n#include \"folderview/folderview.h\"\n#include <QModelIndex>\n\nclass QComboBox;\nclass QLineEdit;\n\nclass FileBrowser : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit FileBrowser(LiteApi::IApplication *app,QObject *parent = 0);\n    virtual ~FileBrowser();\npublic slots:\n    void showHideFiles(bool b);\n    bool isShowHideFiles() const;\n    void visibilityChanged(bool);\n    void activatedRoot(QString);\n    void syncFileModel(bool);\n    void reloadFileModel();\n    void currentEditorChanged(LiteApi::IEditor*);\n    void aboutToShowContextMenu(QMenu* menu,LiteApi::FILESYSTEM_CONTEXT_FLAG flag,const QFileInfo &fileInfo);\nprotected slots:\n    void setFolderToRoot();\n    void cdUp();\n    void openFolderInNewWindow();\n    void addToFolders();\n    void executeFile();\n    void debugFile();\n    void enterKeyPressedFolderView(const QModelIndex &index);\n    void doubleClickedFolderView(const QModelIndex &index);\nprotected:\n    void addFolderToRoot(const QString &path);\nprotected:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget                 *m_widget;\n    FolderView        *m_folderView;\n    QComboBox   *m_rootCombo;\n    //QComboBox   *m_filterCombo;\n    //QToolBar    *m_filterToolBar;\n    QToolBar    *m_rootToolBar;\n    QAction *m_syncAct;\n    QAction *m_showHideFilesAct;\n    QAction *m_showDetailsAct;\n    QAction *m_reloadAct;\n    QMenu   *m_filterMenu;\nprotected:\n    QAction *m_toolWindowAct;\n    QAction *m_cdupAct;\n    QAction *m_setRootAct;\n    QAction *m_openExplorerAct;\n    QAction *m_openFolderInNewWindowAct;\n    QAction *m_addToFoldersAct;\n    QAction *m_executeFileAct;\n    QAction *m_debugFileAct;\n};\n\n#endif // FILEBROWSER_H\n"
  },
  {
    "path": "liteidex/src/plugins/filebrowser/filebrowser.pro",
    "content": "TARGET = filebrowser\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude(../../utils/fileutil/fileutil.pri)\ninclude(../../utils/folderview/folderview.pri)\ninclude(../../utils/symboltreeview/symboltreeview.pri)\ninclude(../../api/litebuildapi/litebuildapi.pri)\ninclude(../../api/golangdocapi/golangdocapi.pri)\n\nDEFINES += FILEBROWSER_LIBRARY\n\nSOURCES += filebrowserplugin.cpp \\\n    filebrowser.cpp \\\n    filebrowseroptionfactory.cpp \\\n    filebrowseroption.cpp \\\n\nHEADERS += filebrowserplugin.h\\\n        filebrowser_global.h \\\n    filebrowser.h \\\n    filebrowseroptionfactory.h \\\n    filebrowseroption.h\n\nRESOURCES += \\\n    filebrowser.qrc\n\nFORMS += \\\n    filebrowseroption.ui\n"
  },
  {
    "path": "liteidex/src/plugins/filebrowser/filebrowser.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/filebrowser\">\n        <file>images/sync.png</file>\n        <file>images/cdup.png</file>\n        <file>images/reload.png</file>\n    </qresource>\n</RCC>\n"
  },
  {
    "path": "liteidex/src/plugins/filebrowser/filebrowser_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filebrowser_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FILEBROWSER_GLOBAL_H\n#define FILEBROWSER_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(FILEBROWSER_LIBRARY)\n#  define FILEBROWSERSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define FILEBROWSERSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#define FILEBROWSER_SHOWHIDDENFILES \"FileBrowser/ShowHiddenFiles\"\n#define FILEBROWSER_SHOWDETAILS \"FileBrowser/ShowDetails\"\n\n#endif // FILEBROWSER_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/filebrowser/filebrowseroption.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filebrowseroption.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"filebrowseroption.h\"\n#include \"ui_filebrowseroption.h\"\n#include \"filebrowser.h\"\n#include <QDir>\n#include <QFileInfo>\n#include <QLocale>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nFileBrowserOption::FileBrowserOption(LiteApi::IApplication *app,QObject *parent) :\n    LiteApi::IOption(parent),\n    m_liteApp(app),\n    m_widget(new QWidget),\n    ui(new Ui::FileBrowserOption)\n{\n    ui->setupUi(m_widget);\n}\n\nFileBrowserOption::~FileBrowserOption()\n{\n    delete m_widget;\n    delete ui;\n}\n\nQWidget *FileBrowserOption::widget()\n{\n    return m_widget;\n}\n\nQString FileBrowserOption::name() const\n{\n    return \"FileBrowser\";\n}\n\nQString FileBrowserOption::mimeType() const\n{\n    return \"option/filebrowser\";\n}\n\nvoid FileBrowserOption::load()\n{\n\n}\n\nvoid FileBrowserOption::save()\n{\n    QString cmd = ui->cmdLineEdit->text().trimmed();\n    QString args = ui->argsLineEdit->text().trimmed();\n    m_liteApp->settings()->setValue(\"filebrowser/shell_cmd\",cmd);\n    m_liteApp->settings()->setValue(\"filebrowser/shell_args\",args.split(\" \",qtSkipEmptyParts));\n}\n"
  },
  {
    "path": "liteidex/src/plugins/filebrowser/filebrowseroption.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filebrowseroption.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FILEBROWSEROPTION_H\n#define FILEBROWSEROPTION_H\n\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class FileBrowserOption;\n}\n\nclass FileBrowserOption : public LiteApi::IOption\n{\n    Q_OBJECT\n\npublic:\n    explicit FileBrowserOption(LiteApi::IApplication *app, QObject *parent = 0);\n    ~FileBrowserOption();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void load();\n    virtual void save();\nprivate:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget           *m_widget;\n    Ui::FileBrowserOption *ui;\n};\n\n#endif // FILEBROWSEROPTION_H\n"
  },
  {
    "path": "liteidex/src/plugins/filebrowser/filebrowseroption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>FileBrowserOption</class>\n <widget class=\"QWidget\" name=\"FileBrowserOption\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>400</width>\n    <height>118</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox\">\n     <property name=\"title\">\n      <string>Terminal</string>\n     </property>\n     <layout class=\"QFormLayout\" name=\"formLayout\">\n      <item row=\"0\" column=\"0\">\n       <widget class=\"QLabel\" name=\"label\">\n        <property name=\"text\">\n         <string>Command:</string>\n        </property>\n       </widget>\n      </item>\n      <item row=\"0\" column=\"1\">\n       <widget class=\"QLineEdit\" name=\"cmdLineEdit\"/>\n      </item>\n      <item row=\"1\" column=\"0\">\n       <widget class=\"QLabel\" name=\"label_2\">\n        <property name=\"text\">\n         <string>Arguments:</string>\n        </property>\n       </widget>\n      </item>\n      <item row=\"1\" column=\"1\">\n       <widget class=\"QLineEdit\" name=\"argsLineEdit\"/>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <spacer name=\"verticalSpacer\">\n     <property name=\"orientation\">\n      <enum>Qt::Vertical</enum>\n     </property>\n     <property name=\"sizeHint\" stdset=\"0\">\n      <size>\n       <width>20</width>\n       <height>164</height>\n      </size>\n     </property>\n    </spacer>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/filebrowser/filebrowseroptionfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filebrowseroptionfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"filebrowseroption.h\"\n#include \"filebrowseroptionfactory.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nFileBrowserOptionFactory::FileBrowserOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n}\n\nQStringList FileBrowserOptionFactory::mimeTypes() const\n{\n    return QStringList() << \"option/filebrowser\";\n}\n\nLiteApi::IOption *FileBrowserOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == \"option/filebrowser\") {\n        return new FileBrowserOption(m_liteApp,this);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/filebrowser/filebrowseroptionfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filebrowseroptionfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FILEBROWSEROPTIONFACTORY_H\n#define FILEBROWSEROPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass FileBrowserOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n    FileBrowserOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // FILEBROWSEROPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/filebrowser/filebrowserplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filebrowserplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"filebrowserplugin.h\"\n#include \"filebrowser.h\"\n#include \"filebrowseroptionfactory.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nFileBrowserPlugin::FileBrowserPlugin() : m_browser(0)\n{\n}\n\nbool FileBrowserPlugin::load(LiteApi::IApplication *app)\n{\n    m_browser = new FileBrowser(app,this);\n    //app->optionManager()->addFactory(new FileBrowserOptionFactory(app,this));\n    return true;\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/filebrowser/filebrowserplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filebrowserplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FILEBROWSERPLUGIN_H\n#define FILEBROWSERPLUGIN_H\n\n#include \"filebrowser_global.h\"\n#include \"liteapi/liteapi.h\"\n#include <QtPlugin>\n\nclass FileBrowser;\nclass FileBrowserPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    FileBrowserPlugin();\n    virtual bool load(LiteApi::IApplication *app);\nprotected:\n    FileBrowser *m_browser;\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<FileBrowserPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.FileBrowserPlugin\")\n#endif\npublic:\n    PluginFactory()\n    {\n        m_info->setId(\"plugin/filebrowser\");\n        m_info->setName(\"FileBrowser\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setVer(\"X37.1\");\n        m_info->setInfo(\"File System Browser\");\n    }\n};\n\n#endif // FILEBROWSERPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/gdbdebugger/gdbdebugger.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gdbdebugger.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"gdbdebugger.h\"\n#include \"fileutil/fileutil.h\"\n#include \"processex/processex.h\"\n#include \"gdbdebuggeroption.h\"\n#include \"../litedebug/litedebug_global.h\"\n\n#include <QStandardItemModel>\n#include <QProcess>\n#include <QFile>\n#include <QDir>\n#include <QFileInfo>\n#include <QTextCodec>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nstatic void GdbMiValueToItem(QStandardItem *item, const GdbMiValue &value)\n{\n    switch (value.type()) {\n    case GdbMiValue::Invalid:\n        item->appendRow(new QStandardItem(\"Invalid\"));\n        break;\n    case GdbMiValue::Const:\n        if (value.name().isEmpty()) {\n            item->appendRow(new QStandardItem(QString(value.data())));\n        } else {\n            item->appendRow(new QStandardItem(QString(value.name()+\"=\"+value.data())));\n        }\n        break;\n    case GdbMiValue::List: {\n            QStandardItem *in = new QStandardItem(QString(value.name()));\n            item->appendRow(in);\n            for (int i = 0; i < value.childCount(); i++) {\n                QStandardItem *iv = new QStandardItem(QString(\"[%1]\").arg(i));\n                in->appendRow(iv);\n                GdbMiValueToItem(iv,value.childAt(i));\n            }\n            break;\n        }\n    case GdbMiValue::Tuple: {\n            QStandardItem *iv = item;\n            if (!value.name().isEmpty()) {\n                iv = new QStandardItem(QString(value.name()));\n                item->appendRow(iv);\n            }\n            foreach (const GdbMiValue &v, value.children()) {\n                GdbMiValueToItem(iv,v);\n            }\n            break;\n       }\n    }\n}\n\nGdbDebugger::GdbDebugger(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IDebugger(parent),\n    m_liteApp(app),\n    m_envManager(0),\n    m_tty(0)\n{\n    m_process = new QProcess(this);\n    m_asyncModel = new QStandardItemModel(this);\n    m_asyncItem = new QStandardItem;\n    m_asyncModel->appendRow(m_asyncItem);\n    /*\n    m_asyncModel->setHeaderData(0,Qt::Horizontal,\"Reason\");\n    m_asyncModel->setHeaderData(1,Qt::Horizontal,\"Address\");\n    m_asyncModel->setHeaderData(2,Qt::Horizontal,\"Function\");\n    m_asyncModel->setHeaderData(3,Qt::Horizontal,\"File\");\n    m_asyncModel->setHeaderData(4,Qt::Horizontal,\"Line\");\n    m_asyncModel->setHeaderData(5,Qt::Horizontal,\"Thread ID\");\n    m_asyncModel->setHeaderData(6,Qt::Horizontal,\"Stoped Threads\");\n    */\n    m_varsModel = new QStandardItemModel(0,3,this);\n    m_varsModel->setHeaderData(0,Qt::Horizontal,\"Name\");\n    m_varsModel->setHeaderData(1,Qt::Horizontal,\"Value\");\n    m_varsModel->setHeaderData(2,Qt::Horizontal,\"Type\");\n\n    m_watchModel = new QStandardItemModel(0,3,this);\n    m_watchModel->setHeaderData(0,Qt::Horizontal,\"Name\");\n    m_watchModel->setHeaderData(1,Qt::Horizontal,\"Value\");\n    m_watchModel->setHeaderData(2,Qt::Horizontal,\"Type\");\n\n    m_framesModel = new QStandardItemModel(0,5,this);\n    m_framesModel->setHeaderData(0,Qt::Horizontal,\"Level\");\n    m_framesModel->setHeaderData(1,Qt::Horizontal,\"Address\");\n    m_framesModel->setHeaderData(2,Qt::Horizontal,\"Function\");\n    m_framesModel->setHeaderData(3,Qt::Horizontal,\"File\");\n    m_framesModel->setHeaderData(4,Qt::Horizontal,\"Line\");\n\n    m_libraryModel = new QStandardItemModel(0,2,this);\n    m_libraryModel->setHeaderData(0,Qt::Horizontal,\"Id\");\n    m_libraryModel->setHeaderData(1,Qt::Horizontal,\"Thread Groups\");\n\n    m_gdbinit = false;    \n    m_gdbexit = false;\n\n    connect(app,SIGNAL(loaded()),this,SLOT(appLoaded()));\n    connect(m_process,SIGNAL(started()),this,SIGNAL(debugStarted()));\n    connect(m_process,SIGNAL(finished(int)),this,SLOT(finished(int)));\n    connect(m_process,SIGNAL(error(QProcess::ProcessError)),this,SLOT(error(QProcess::ProcessError)));\n    connect(m_process,SIGNAL(readyReadStandardError()),this,SLOT(readStdError()));\n    connect(m_process,SIGNAL(readyReadStandardOutput()),this,SLOT(readStdOutput()));\n}\n\nGdbDebugger::~GdbDebugger()\n{\n    if (m_process) {\n         delete m_process;\n    }\n}\n\nvoid GdbDebugger::appLoaded()\n{\n    m_envManager = LiteApi::findExtensionObject<LiteApi::IEnvManager*>(m_liteApp,\"LiteApi.IEnvManager\");\n}\n\nQString GdbDebugger::mimeType() const\n{\n    return QLatin1String(\"debugger/gdb\");\n}\n\nQAbstractItemModel *GdbDebugger::debugModel(LiteApi::DEBUG_MODEL_TYPE type)\n{\n    if (type == LiteApi::ASYNC_MODEL) {\n        return m_asyncModel;\n    } else if (type == LiteApi::VARS_MODEL) {\n        return m_varsModel;\n    } else if (type == LiteApi::WATCHES_MODEL) {\n        return m_watchModel;\n    }else if (type == LiteApi::FRAMES_MODEL) {\n        return m_framesModel;\n    } else if (type == LiteApi::LIBRARY_MODEL) {\n        return m_libraryModel;\n    }\n    return 0;\n}\n\nvoid GdbDebugger::setWorkingDirectory(const QString &dir)\n{\n    m_process->setWorkingDirectory(dir);\n}\n\nvoid GdbDebugger::setEnvironment (const QStringList &environment)\n{\n    m_process->setEnvironment(environment);\n}\n\nbool GdbDebugger::start(const QString &program, const QString &arguments)\n{\n    if (!m_envManager) {\n        return false;\n    }\n\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\n\n    QString goroot = env.value(\"GOROOT\");\n    if (!goroot.isEmpty()) {\n        m_runtimeFilePath = QFileInfo(QDir(goroot),\"src/pkg/runtime/\").path();\n    }\n\n    QStringList argsList;\n    if (isGdbDebuggerUseTty(m_liteApp)) {\n        if (!m_tty) {\n            m_tty = LiteApi::createTty(m_liteApp,this);\n            if (m_tty) {\n                connect(m_tty,SIGNAL(byteDelivery(QByteArray)),this,SLOT(readTty(QByteArray)));\n            }\n        }\n        if (m_tty && m_tty->listen()) {\n            argsList << \"--tty=\"+m_tty->serverName();\n        } else if (m_tty) {\n            qDebug() << \"error\" << m_tty->errorString() << m_tty->serverName();\n        }\n    }\n    QStringList argsListInfo;\n    argsList << \"--interpreter=mi\";\n\n    argsList << \"--args \" << program;\n    argsListInfo << \"--args \" << program;\n\n    if (!arguments.isEmpty()) {\n        argsList  << arguments;\n        argsListInfo << arguments;\n    }\n\n    QString gdb = env.value(\"LITEIDE_GDB\",\"\");\n    if (gdb.isEmpty()) {\n#ifdef Q_OS_WIN\n        if (env.value(\"GOARCH\") != \"386\") {\n            if (FileUtil::lookPath(\"gdb64\",env,true).isEmpty()) {\n                gdb = \"gdb\";\n            }\n        } else {\n            gdb = \"gdb\";\n        }\n#else\n        gdb = \"gdb\";\n#endif\n    }\n\n    m_gdbFilePath = FileUtil::lookPath(gdb,env,true);\n    if (m_gdbFilePath.isEmpty()) {\n        m_liteApp->appendLog(\"GdbDebugger\",gdb+\" was not found on system PATH (hint: is GDB installed?)\",true);\n        return false;\n    }\n\n    clear();\n#ifdef Q_OS_WIN\n    m_process->setNativeArguments(argsList.join(\" \"));\n    m_process->start(\"\\\"\"+m_gdbFilePath+\"\\\"\");\n#else\n    m_process->start(m_gdbFilePath + \" \" + argsList.join(\" \"));\n#endif\n\n    QString log = QString(\"%1 %2 [%3]\").arg(m_gdbFilePath).arg(argsList.join(\" \")).arg(m_process->workingDirectory());\n    emit debugLog(LiteApi::DebugRuntimeLog,log);\n\n    return true;\n}\n\nvoid GdbDebugger::stop()\n{\n    command(\"-gdb-exit\");\n    if (!m_process->waitForFinished(300)) {\n        m_process->kill();\n    }\n}\n\nbool GdbDebugger::isRunning()\n{\n    return m_process->state() != QProcess::NotRunning;\n}\n\nvoid GdbDebugger::continueRun()\n{\n    command(\"-exec-continue\");\n}\n\nvoid GdbDebugger::stepOver()\n{\n    command(\"-exec-next\");\n}\n\nvoid GdbDebugger::stepInto()\n{\n    command(\"-exec-step\");\n}\n\nvoid GdbDebugger::stepOut()\n{\n    command(\"-exec-finish\");\n}\n\nvoid GdbDebugger::runToLine(const QString &fileName, int line)\n{\n    line++;\n    GdbCmd cmd;\n    QStringList args;\n    args << \"-break-insert\";\n    args << \"-t\";\n    args << QString(\"%1:%2\").arg(fileName).arg(line);\n    cmd.setCmd(args);\n    command(cmd);\n    command(\"-exec-continue\");\n}\n\nvoid GdbDebugger::createWatch(const QString &var)\n{\n    QString value;\n    if (value.contains(\".\")) {\n        value = \"\\'\"+var+\"\\'\";\n    } else {\n        value = var;\n    }\n    createWatchHelp(var,false,true);\n}\n\nvoid GdbDebugger::removeWatch(const QString &name)\n{\n    removeWatchHelp(name,true,true);\n}\n\nvoid GdbDebugger::removeAllWatch()\n{\n    //removeWatchHelp\n    foreach (QString name, m_watchList) {\n        removeWatchHelp(name,true,true);\n    }\n}\n\nvoid GdbDebugger::createWatchHelp(const QString &var, bool floating, bool watchModel)\n{\n    GdbCmd cmd;\n    QStringList args;\n    args << \"-var-create\";\n    args << \"-\";\n    if (floating) {\n        args << \"@\";\n    } else {\n        args << \"*\";\n    }\n    args << var;\n    cmd.setCmd(args);\n    cmd.insert(\"var\",var);\n    if (watchModel) {\n        cmd.insert(\"watchModel\",true);\n    }\n    command(cmd);\n}\n\nvoid GdbDebugger::removeWatchHelp(const QString &value, bool byName, bool children)\n{\n    QString name;\n    QString var;\n    if (byName) {\n        name = value;\n        var = m_varNameMap.key(name);\n    } else {\n        var = value;\n        name = m_varNameMap.value(var);\n    }\n    QStringList args;\n    args << \"-var-delete\";\n    if (children) {\n        args << \"-c\";\n    }\n    args << name;\n    GdbCmd cmd;\n    cmd.setCmd(args);\n    cmd.insert(\"var\",var);\n    cmd.insert(\"name\",name);\n    cmd.insert(\"children\",children);\n    command(cmd);\n}\n\nvoid GdbDebugger::showFrame(QModelIndex index)\n{\n    QStandardItem* file = m_framesModel->item( index.row(), 3 );\n    QStandardItem* line = m_framesModel->item( index.row(), 4 );\n    if( !file || !line ) {\n        return;\n    }\n    QString filename = file->text();\n    int lineno = line->text().toInt();\n    if( lineno <= 0 ) {\n        return;\n    }\n    emit gotoLine(filename, lineno - 1 );\n}\n\nvoid GdbDebugger::dbclickItem(QModelIndex index, LiteApi::DEBUG_MODEL_TYPE type)\n{\n\n}\n\nvoid GdbDebugger::expandItem(QModelIndex index, LiteApi::DEBUG_MODEL_TYPE type)\n{\n    QStandardItem *parent = 0;\n    if (type == LiteApi::VARS_MODEL) {\n        parent = m_varsModel->itemFromIndex(index);\n    } else if (type == LiteApi::WATCHES_MODEL) {\n        parent = m_watchModel->itemFromIndex(index);\n    }\n    if (!parent) {\n        return;\n    }\n    if (parent->data(VarExpanded).toInt() == 1) {\n        return;\n    }\n    parent->setData(1,VarExpanded);\n    for (int i = 0; i < parent->rowCount(); i++) {\n        QStandardItem *item = parent->child(i);\n        QString name = item->data(VarNameRole).toString();\n        int num = item->data(VarNumChildRole).toInt();\n        if (num > 0) {\n            updateVarListChildren(name);\n        }\n    }\n}\n\nvoid GdbDebugger::setInitBreakTable(const QMultiMap<QString,int> &bks)\n{\n    m_initBks = bks;\n}\n\nvoid GdbDebugger::setInitWatchList(const QStringList &names)\n{\n    foreach (QString name, names) {\n        createWatch(name);\n    }\n}\n\nvoid GdbDebugger::insertBreakPoint(const QString &fileName, int line)\n{\n    line++;\n    QString location = QString(\"%1:%2\").arg(fileName).arg(line);\n    if (m_locationBkMap.contains(location)) {\n        return;\n    }\n    QStringList args;\n    args << \"-break-insert\";\n    args << QString(\"%1:%2\").arg(fileName).arg(line);\n    GdbCmd cmd;\n    cmd.setCmd(args);\n    cmd.insert(\"file\",fileName);\n    cmd.insert(\"line\",line);\n    command(cmd);\n}\n\nvoid GdbDebugger::removeBreakPoint(const QString &fileName, int line)\n{\n    line++;\n    QString location = QString(\"%1:%2\").arg(fileName).arg(line);\n    QString number = m_locationBkMap.key(location);\n    if (number.isEmpty()) {\n        return;\n    }\n    QStringList args;\n    args << \"-break-delete\";\n    args << number;\n    GdbCmd cmd;\n    cmd.setCmd(args);\n    command(cmd);\n}\n\nvoid GdbDebugger::command_helper(const GdbCmd &cmd, bool emitOut)\n{\n    m_token++;\n    QByteArray buf = cmd.makeCmd(m_token);\n    if (emitOut) {\n        emit debugLog(LiteApi::DebugConsoleLog,\">>> \"+QString::fromUtf8(buf));\n    }\n#ifdef Q_OS_WIN\n    buf.append(\"\\r\\n\");\n#else\n    buf.append(\"\\n\");\n#endif\n    m_tokenCookieMap.insert(m_token,cmd.cookie());\n    m_process->write(buf);\n}\n\nvoid GdbDebugger::command(const GdbCmd &cmd)\n{\n    command_helper(cmd,true);\n}\n\nvoid GdbDebugger::enterAppText(const QString &text)\n{\n    if (m_tty) {\n        m_tty->write(text.toUtf8());\n    } else {\n        m_process->write(text.toUtf8());\n    }\n}\n\nvoid GdbDebugger::enterDebugText(const QString &text)\n{\n    command(text);\n}\n\nvoid  GdbDebugger::command(const QByteArray &cmd)\n{\n    command_helper(GdbCmd(cmd),false);\n}\n\nvoid GdbDebugger::readStdError()\n{\n    emit debugLog(LiteApi::DebugErrorLog,QString::fromUtf8(m_process->readAllStandardError()));\n}\n\nstatic bool isNameChar(char c)\n{\n    // could be 'stopped' or 'shlibs-added'\n    return (c >= 'a' && c <= 'z') || c == '-';\n}\n\n/*\n27.4.2 gdb/mi Output Syntax\n\nThe output from gdb/mi consists of zero or more out-of-band records followed, optionally,\nby a single result record. This result record is for the most recent command. The sequence\nof output records is terminated by (gdb).\nIf an input command was prefixed with a token then the corresponding output for that\ncommand will also be prefixed by that same token.\n\nIf an input command was prefixed with a token then the corresponding output for that\ncommand will also be prefixed by that same token.\n\noutput -> ( out-of-band-record )* [ result-record ] \"(gdb)\" nl\nresult-record ->\n[ token ] \"^\" result-class ( \",\" result )* nl\nout-of-band-record ->\nasync-record | stream-record\nasync-record ->\nexec-async-output | status-async-output | notify-async-output\nexec-async-output ->\n[ token ] \"*\" async-output\nstatus-async-output ->\n[ token ] \"+\" async-output\nnotify-async-output ->\n[ token ] \"=\" async-output\nasync-output ->\nasync-class ( \",\" result )* nl\nresult-class ->\n\"done\" | \"running\" | \"connected\" | \"error\" | \"exit\"\nasync-class ->\n\"stopped\" | others (where others will be added depending on the needs¡ªthis\nis still in development).\nresult -> variable \"=\" value\nvariable ->\nstring\nvalue -> const | tuple | list\nconst -> c-string\ntuple -> \"{}\" | \"{\" result ( \",\" result )* \"}\"\nlist -> \"[]\" | \"[\" value ( \",\" value )* \"]\" | \"[\" result ( \",\" result )* \"]\"\nstream-record ->\nconsole-stream-output | target-stream-output | log-stream-output\nconsole-stream-output ->\n\"~\" c-string\ntarget-stream-output ->\n\"@\" c-string\nlog-stream-output ->\n\"&\" c-string\nnl -> CR | CR-LF\n*/\n\nvoid GdbDebugger::handleResponse(const QByteArray &buff)\n{\n    if (buff.isEmpty() || buff == \"(gdb) \")\n        return;\n\n    const char *from = buff.constData();\n    const char *to = from + buff.size();\n    const char *inner;\n\n    int token = -1;\n    // Token is a sequence of numbers.\n    for (inner = from; inner != to; ++inner)\n        if (*inner < '0' || *inner > '9')\n            break;\n    if (from != inner) {\n        token = QByteArray(from, inner - from).toInt();\n        from = inner;\n    }\n    // Next char decides kind of response.\n    const char c = *from++;\n    switch (c) {\n    case '*':\n    case '+':\n    case '=':\n    {\n        QByteArray asyncClass;\n        for (; from != to; ++from) {\n            const char c = *from;\n            if (!isNameChar(c))\n                break;\n            asyncClass += *from;\n        }\n        GdbMiValue result;\n        while (from != to) {\n            GdbMiValue data;\n            if (*from != ',') {\n                // happens on archer where we get\n                // 23^running <NL> *running,thread-id=\"all\" <NL> (gdb)\n                result.m_type = GdbMiValue::Tuple;\n                break;\n            }\n            ++from; // skip ','\n            data.parseResultOrValue(from, to);\n            if (data.isValid()) {\n                //qDebug() << \"parsed result:\" << data.toString();\n                result.m_children += data;\n                result.m_type = GdbMiValue::Tuple;\n            }\n        }\n        handleAsyncClass(asyncClass,result);\n        break;\n    }\n    case '~':\n        handleConsoleStream(GdbMiValue::parseCString(from, to));\n        break;\n    case '@':\n        handleTargetStream(GdbMiValue::parseCString(from, to));\n        break;\n    case '&':\n        handleLogStream(GdbMiValue::parseCString(from, to));\n        break;\n    case '^': {\n        GdbResponse response;\n\n        response.token = token;\n\n        for (inner = from; inner != to; ++inner)\n            if (*inner < 'a' || *inner > 'z')\n                break;\n\n        QByteArray resultClass = QByteArray::fromRawData(from, inner - from);\n        if (resultClass == \"done\") {\n            response.resultClass = GdbResultDone;\n        } else if (resultClass == \"running\") {\n            response.resultClass = GdbResultRunning;\n        } else if (resultClass == \"connected\") {\n            response.resultClass = GdbResultConnected;\n        } else if (resultClass == \"error\") {\n            response.resultClass = GdbResultError;\n        } else if (resultClass == \"exit\") {\n            response.resultClass = GdbResultExit;\n        } else {\n            response.resultClass = GdbResultUnknown;\n        }\n\n        from = inner;\n        if (from != to) {\n            if (*from == ',') {\n                ++from;\n                response.data.parseTuple_helper(from, to);\n                response.data.m_type = GdbMiValue::Tuple;\n                response.data.m_name = \"data\";\n            } else {\n                // Archer has this.\n                response.data.m_type = GdbMiValue::Tuple;\n                response.data.m_name = \"data\";\n            }\n        }\n        if (m_tokenCookieMap.contains(token)) {\n            response.cookie = m_tokenCookieMap.take(token);\n        }\n        handleResultRecord(response);\n        break;\n    }\n    default: {\n        from--;\n        QByteArray out(from,to-from);\n        out.append(\"\\n\");\n        emit debugLog(LiteApi::DebugApplationLog,QString::fromUtf8(out));\n        break;\n    }\n    }\n}\n\nvoid GdbDebugger::handleStopped(const GdbMiValue &result)\n{\n    QByteArray reason = result.findChild(\"reason\").data();\n    m_handleState.setReason(reason);\n    m_handleState.setStopped(true);\n    if (reason.startsWith(\"exited\")) {\n        m_handleState.setExited(true);\n        m_handleState.setReason(reason);\n        return;\n    }\n    GdbMiValue frame = result.findChild(\"frame\");\n    if (frame.isValid()) {\n        QString fullname = frame.findChild(\"fullname\").data();\n        QString file = frame.findChild(\"file\").data();\n        QString line = frame.findChild(\"line\").data();\n        if (!fullname.isEmpty()) {\n            emit setCurrentLine(fullname,line.toInt()-1);\n        } else if (!file.isEmpty()) {\n            //fix go build bug, not find fullname\n            //file=\"C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist308287094/go/src/pkg/fmt/print.go\"\n            int i = file.indexOf(\"/go/src/pkg\");\n            if (i > 0) {\n                QString fullname = LiteApi::getGOROOT(m_liteApp)+file.right(file.length()-i-3);\n                emit setCurrentLine(fullname,line.toInt()-1);\n            }\n        }\n    }\n}\n\nvoid GdbDebugger::handleLibrary(const GdbMiValue &result)\n{\n    QString id = result.findChild(\"id\").data();\n    QString thread_group = result.findChild(\"thread-group\").data();\n    m_libraryModel->appendRow(QList<QStandardItem*>()\n                              << new QStandardItem(id)\n                              << new QStandardItem(thread_group)\n                              );\n}\n\nvoid GdbDebugger::handleAsyncClass(const QByteArray &asyncClass, const GdbMiValue &result)\n{\n    m_asyncItem->removeRows(0,m_asyncItem->rowCount());\n    m_asyncItem->setText(asyncClass);\n    //QStandardItem *item = new QStandardItem(QString(asyncClass));\n    GdbMiValueToItem(m_asyncItem,result);\n    //m_asyncModel->clear();\n    //m_asyncModel->appendRow(item);\n    if (asyncClass == \"stopped\") {\n        handleStopped(result);        \n    } else if (asyncClass == \"library-loaded\") {\n        handleLibrary(result);\n    }\n    emit setExpand(LiteApi::ASYNC_MODEL,m_asyncModel->indexFromItem(m_asyncItem),true);\n}\n\nvoid GdbDebugger::handleConsoleStream(const QByteArray&)\n{\n\n}\n\nvoid GdbDebugger::handleTargetStream(const QByteArray&)\n{\n\n}\n\nvoid GdbDebugger::handleLogStream(const QByteArray&)\n{\n\n}\n\nvoid GdbDebugger::handleResultStackListFrame(const GdbResponse &response, QMap<QString,QVariant>&)\n{\n    //10000015^done,stack=[frame={level=\"0\",addr=\"0x0040113f\",func=\"main.main\",file=\"F:/hg/debug_test/hello/main.go\",fullname=\"F:/hg/debug_test/hello/main.go\",line=\"36\"},frame={level=\"1\",addr=\"0x00401f8a\",func=\"runtime.mainstart\",file=\"386/asm.s\",fullname=\"c:/go/src/pkg/runtime/386/asm.s\",line=\"96\"},frame={level=\"2\",addr=\"0x0040bcfe\",func=\"runtime.initdone\",file=\"/go/src/pkg/runtime/proc.c\",fullname=\"c:/go/src/pkg/runtime/proc.c\",line=\"242\"},frame={level=\"3\",addr=\"0x00000000\",func=\"??\"}]\n    m_framesModel->removeRows(0,m_framesModel->rowCount());\n    if (response.resultClass != GdbResultDone) {\n        return;\n    }\n    GdbMiValue stack = response.data.findChild(\"stack\");\n    if (stack.isList()) {\n        for (int i = 0; i < stack.childCount(); i++) {\n            GdbMiValue child = stack.childAt(i);\n            if (child.isValid() && child.name() == \"frame\") {\n                QString level = child.findChild(\"level\").data();\n                QString addr = child.findChild(\"addr\").data();\n                QString func = child.findChild(\"func\").data();\n                QString file = child.findChild(\"file\").data();\n                QString line = child.findChild(\"line\").data();\n                m_framesModel->appendRow(QList<QStandardItem*>()\n                                         << new QStandardItem(level)\n                                         << new QStandardItem(addr)\n                                         << new QStandardItem(func)\n                                         << new QStandardItem(file)\n                                         << new QStandardItem(line)\n                                         );\n            }\n        }\n    }\n}\n\nvoid GdbDebugger::handleResultStackListVariables(const GdbResponse &response, QMap<QString,QVariant>&)\n{\n    //10000014^done,variables=[{name=\"v\"},{name=\"x\"},{name=\"pt\"},{name=\"str\"},{name=\"sum1\"},{name=\"y\"}]\n    if (response.resultClass != GdbResultDone) {\n        return;\n    }\n    GdbMiValue vars = response.data.findChild(\"variables\");\n    if (vars.isList()) {\n        foreach (const GdbMiValue &child, vars.m_children) {\n            if (child.isValid()) {\n                QString var = child.findChild(\"name\").data();\n                if (!m_varNameMap.contains(var)) {\n                    createWatchHelp(var,true,false);\n                }\n            }\n        }\n    }\n}\n\nvoid GdbDebugger::handleResultVarCreate(const GdbResponse &response, QMap<QString,QVariant> &map)\n{\n    //10000018^done,name=\"var4\",numchild=\"0\",value=\"4265530\",type=\"int\",thread-id=\"1\",has_more=\"0\"\n    //10000019^done,name=\"var5\",numchild=\"2\",value=\"{...}\",type=\"struct string\",thread-id=\"1\",has_more=\"0\"\n    //10000020^done,name=\"var6\",numchild=\"3\",value=\"0x40bc38\",type=\"struct main.pt *\",thread-id=\"1\",has_more=\"0\"\n    if (response.resultClass != GdbResultDone) {\n        return;\n    }\n    QString name = response.data.findChild(\"name\").data();\n    QString numchild = response.data.findChild(\"numchild\").data();\n    QString value = response.data.findChild(\"value\").data();\n    QString type = response.data.findChild(\"type\").data();\n    QString var = map.value(\"var\").toString();\n    if (var.isEmpty()) {\n        var = map.value(\"cmdList\").toStringList().last();\n    }\n    if (m_varNameMap.contains(var)) {\n        var += QString(\"-%1\").arg(response.token);\n    }\n    m_varNameMap.insert(var,name);\n    QStandardItem *item = new QStandardItem(var);\n    item->setData(name,VarNameRole);\n    m_nameItemMap.insert(name,item);\n    if (map.value(\"watchModel\",false).toBool()) {\n        emit watchCreated(name,map.value(\"var\").toString());\n        m_watchList.append(name);\n        m_watchModel->appendRow(QList<QStandardItem*>()\n                               << item\n                               << new QStandardItem(value)\n                               << new QStandardItem(type)\n                               );\n    } else {\n        m_varsModel->appendRow(QList<QStandardItem*>()\n                               << item\n                               << new QStandardItem(value)\n                               << new QStandardItem(type)\n                               );\n    }\n    int num = numchild.toInt();\n    item->setData(num,VarNumChildRole);\n    if (num > 0 ){\n        updateVarListChildren(name);\n    }\n}\n\nvoid GdbDebugger::handleResultVarListChildren(const GdbResponse &response, QMap<QString,QVariant> &map)\n{\n    //10000022^done,numchild=\"2\",children=[child={name=\"var5.str\",exp=\"str\",numchild=\"1\",value=\"0x4115c6 \\\"\\\\203\\\\304\\\\b\\\\303d\\\\213\\\\r,\\\"\",type=\"uint8 *\",thread-id=\"1\"},child={name=\"var5.len\",exp=\"len\",numchild=\"0\",value=\"4242460\",type=\"int\",thread-id=\"1\"}],has_more=\"0\"\n    if (response.resultClass != GdbResultDone) {\n        return;\n    }\n    GdbMiValue children = response.data.findChild(\"children\");\n    if (children.isList()) {\n        QString name = map.value(\"name\").toString();\n        QStandardItem *parent = m_nameItemMap.value(name);\n        if (parent == 0) {\n            return;\n        }\n        int num = response.data.findChild(\"numchild\").data().toInt();\n        parent->setData(num,VarNumChildRole);\n        for (int i = 0; i < children.childCount(); i++) {\n            GdbMiValue child = children.childAt(i);\n            if (child.name() == \"child\" && child.isTuple()) {\n                QString name = child.findChild(\"name\").data();\n                QString exp = child.findChild(\"exp\").data();\n                QString numchild = response.data.findChild(\"numchild\").data();\n                QString value = child.findChild(\"value\").data();\n                QString type = child.findChild(\"type\").data();\n                QStandardItem *item = new QStandardItem(exp);\n                item->setData(name,VarNameRole);\n                m_nameItemMap.insert(name,item);\n                parent->appendRow(QList<QStandardItem*>()\n                                  << item\n                                  << new QStandardItem(value)\n                                  << new QStandardItem(type)\n                                  );\n                int num = numchild.toInt();\n                item->setData(num,VarNumChildRole);\n            }\n        }\n    }\n}\n\nvoid GdbDebugger::handleResultVarUpdate(const GdbResponse &response, QMap<QString,QVariant>&)\n{\n    //10000040^done,changelist=[{name=\"var2\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"}]\n    if (response.resultClass != GdbResultDone) {\n        return;\n    }\n    GdbMiValue list = response.data.findChild(\"changelist\");\n    if (list.isList()) {\n        for (int i = 0; i < list.childCount(); i++) {\n            GdbMiValue child = list.childAt(i);\n            if (child.isValid()) {\n                QString name = child.findChild(\"name\").data();\n                QString in_scope = child.findChild(\"in_scope\").data();\n                QString type_changed = child.findChild(\"type_changed\").data();\n                QString var = m_varNameMap.key(name);\n                if (in_scope == \"false\") {\n                    removeWatchHelp(var,false,false);\n                } else {\n                    if (type_changed == \"true\") {\n                        //remove watch children\n                        removeWatchHelp(var,false,true);\n                        //update type\n                        updateVarTypeInfo(name);\n                        //udpate children\n                        updateVarListChildren(name);\n                    }\n                    //update value\n                    updateVarValue(name);\n                }\n            }\n        }\n    }\n}\n\nvoid GdbDebugger::handleResultVarDelete(const GdbResponse &response, QMap<QString,QVariant> &map)\n{\n    //10000062^done,ndeleted=\"1\"\n    //10000063^done,ndeleted=\"0\"\n    if (response.resultClass != GdbResultDone) {\n        return;\n    }\n    bool ndeleted = true;\n    if (response.data.findChild(\"ndeleted\").data() == \"0\") {\n        ndeleted = false;\n    }\n    QString var = map.value(\"var\").toString();\n    QString name = map.value(\"name\").toString();\n    QMutableMapIterator<QString,QStandardItem*> i(m_nameItemMap);\n    QString cls = name+\".\";\n    while (i.hasNext()) {\n        i.next();\n        if (i.key().startsWith(cls)) {\n            i.remove();\n        }\n    }\n\n    QStandardItemModel *model = m_varsModel;\n    if (m_watchList.contains(name)) {\n        emit watchRemoved(name);\n        m_watchList.removeAll(name);\n        model = m_watchModel;\n        ndeleted = 1;\n    }\n    if (ndeleted) {\n        m_varNameMap.remove(var);\n        m_nameItemMap.remove(name);\n    }\n    for (int i = 0; i < model->rowCount(); i++) {\n        QStandardItem *item = model->item(i,0);\n        if (item->data() == name) {\n            if (ndeleted) {\n                model->removeRow(i);\n            } else {\n                item->removeRows(0,item->rowCount());\n                item->setData(0,VarExpanded);\n                emit setExpand(LiteApi::VARS_MODEL,model->indexFromItem(item),false);\n            }\n            break;\n        }\n    }\n}\n\nvoid GdbDebugger::handleResultVarUpdateValue(const GdbResponse &response, QMap<QString,QVariant> &map)\n{\n    //10000035^done,value=\"100\"\n    if (response.resultClass != GdbResultDone) {\n        return;\n    }\n    QString value = response.data.findChild(\"value\").data();\n    QString name = map.value(\"name\").toString();\n    QStandardItem *item = m_nameItemMap.value(name);\n    if (!item) {\n        return;\n    }\n    QStandardItem *parent = item->parent();\n    QStandardItem *v = 0;\n    if (parent) {\n        v = parent->child(item->row(),1);\n    } else {\n        v = item->model()->item(item->row(),1);\n    }\n    if (v) {\n        v->setData(value,Qt::DisplayRole);\n#if QT_VERSION >= 0x050000\n        v->setData(QColor(Qt::red),Qt::TextColorRole);\n#else\n        v->setData(Qt::red,Qt::TextColorRole);\n#endif\n        m_varChangedItemList.insert(v);\n    }\n}\n\nvoid GdbDebugger::handleResultVarUpdateType(const GdbResponse &response, QMap<QString,QVariant> &map)\n{\n    //10000060^done,type=\"struct string\"\n    if (response.resultClass != GdbResultDone) {\n        return;\n    }\n    QString type = response.data.findChild(\"type\").data();\n    QString name = map.value(\"name\").toString();\n    QStandardItem *item = m_nameItemMap.value(name);\n    if (!item) {\n        return;\n    }\n    QStandardItem *parent = item->parent();\n    QStandardItem *v = 0;\n    if (parent) {\n        v = parent->child(item->row(),2);\n    } else {\n        v = item->model()->item(item->row(),2);\n    }\n    if (v) {\n        v->setData(type,Qt::DisplayRole);\n#if QT_VERSION >= 0x050000\n        v->setData(QColor(Qt::red),Qt::TextColorRole);\n#else\n        v->setData(Qt::red,Qt::TextColorRole);\n#endif\n        m_varChangedItemList.insert(v);\n    }\n}\n\nvoid GdbDebugger::handleBreakInsert(const GdbResponse &response, QMap<QString,QVariant>&)\n{\n// >>> 10000029-break-insert F:/hg/debug_test/hello/main.go:31\n// 10000029^done,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x004010dd\",func=\"main.test\",file=\"F:/hg/debug_test/hello/main.go\",fullname=\"F:/hg/debug_test/hello/main.go\",line=\"31\",times=\"0\",original-location=\"F:/hg/debug_test/hello/main.go:31\"}\n\n// >>> 10000046-break-insert F:/hg/debug_test/hello/main.go:37\n// 10000046^done,bkpt={number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x0040118a\",func=\"main.main\",file=\"F:/hg/debug_test/hello/main.go\",fullname=\"F:/hg/debug_test/hello/main.go\",line=\"37\",times=\"0\",original-location=\"F:/hg/debug_test/hello/main.go:37\"}\n    if (response.resultClass != GdbResultDone) {\n        return;\n    }\n    GdbMiValue bkpt = response.data.findChild(\"bkpt\");\n    if (bkpt.isTuple()) {\n        QString number = bkpt.findChild(\"number\").data();\n        QString org_location= bkpt.findChild(\"original-location\").data();\n        m_locationBkMap.insert(number,org_location);\n    }\n}\n\nvoid GdbDebugger::handleBreakDelete(const GdbResponse &response, QMap<QString,QVariant> &map)\n{\n    if (response.resultClass != GdbResultDone) {\n        return;\n    }\n    QStringList cmdList = map.value(\"cmdList\").toStringList();\n    if (cmdList.size() != 2) {\n        return;\n    }\n    QString number = cmdList.at(1);\n    m_locationBkMap.remove(number);\n}\n\nvoid GdbDebugger::handleResultRecord(const GdbResponse &response)\n{\n    if (response.cookie.type() != QVariant::Map) {\n        return;\n    }\n    QMap<QString,QVariant> map = response.cookie.toMap();\n    QString cmd = map.value(\"cmd\").toString();\n    if (cmd.isEmpty()) {\n        return;\n    }\n    QStringList cmdList = map.value(\"cmdList\").toStringList();\n    if (cmdList.isEmpty()) {\n        return;\n    }\n    if (cmdList.at(0) == \"-stack-list-variables\") {\n        handleResultStackListVariables(response,map);\n    } else if (cmdList.at(0) == \"-stack-list-frames\") {\n        handleResultStackListFrame(response,map);\n    } else if (cmdList.at(0) == \"-var-create\") {\n        handleResultVarCreate(response,map);\n    }  else if (cmdList.at(0) == \"-var-list-children\") {\n        handleResultVarListChildren(response,map);\n    } else if (cmdList.at(0) == \"-var-update\") {\n        handleResultVarUpdate(response,map);\n    } else if (cmdList.at(0) == \"-var-delete\") {\n        handleResultVarDelete(response,map);\n    } else if (cmdList.at(0) == \"-var-evaluate-expression\") {\n        handleResultVarUpdateValue(response,map);\n    } else if (cmdList.at(0) == \"-var-info-type\") {\n        handleResultVarUpdateType(response,map);\n    } else if (cmdList.at(0) == \"-break-insert\") {\n        handleBreakInsert(response,map);\n    } else if (cmdList.at(0) == \"-break-delete\") {\n        handleBreakDelete(response,map);\n    }\n}\n\nvoid GdbDebugger::clear()\n{\n    m_gdbinit = false;\n    m_gdbexit = false;\n    m_busy = false;\n    m_token = 10000000;\n    m_handleState.clear();\n    m_varNameMap.clear();\n    m_watchList.clear();\n    m_nameItemMap.clear();\n    m_tokenCookieMap.clear();\n    m_varChangedItemList.clear();\n    m_inbuffer.clear();\n    m_locationBkMap.clear();\n    m_framesModel->removeRows(0,m_framesModel->rowCount());\n    m_libraryModel->removeRows(0,m_libraryModel->rowCount());\n    m_varsModel->removeRows(0,m_varsModel->rowCount());\n    m_watchModel->removeRows(0,m_watchModel->rowCount());\n}\n\nvoid GdbDebugger::initGdb()\n{\n    command(\"set unwindonsignal on\");\n    command(\"set overload-resolution off\");\n    command(\"handle SIGSEGV nopass stop print\");\n    command(\"set breakpoint pending on\");\n    command(\"set width 0\");\n    command(\"set height 0\");\n    command(\"set auto-solib-add on\");\n    if (!m_runtimeFilePath.isEmpty()) {\n#ifdef Q_OS_WIN\n        QStringList pathList = LiteApi::getGOPATH(m_liteApp,false);\n        QString paths;\n        foreach(QString path, pathList) {\n            paths += QDir::fromNativeSeparators(path)+\"/src\";\n            paths += \";\";\n        }\n\n        command(\"-environment-directory \"+m_runtimeFilePath.toLatin1());\n        //command(\"-environment-directory \"+m_runtimeFilePath.toLatin1()+\";\"+paths.toLatin1());\n        command(\"set substitute-path /go/src/pkg/runtime \"+m_runtimeFilePath.toLatin1());\n#else\n        command(\"-environment-directory \"+m_runtimeFilePath.toUtf8());\n        command(\"set substitute-path /go/src/pkg/runtime \"+m_runtimeFilePath.toUtf8());\n#endif\n    }\n    //command(\"set \");\n\n    QMapIterator<QString,int> i(m_initBks);\n    while (i.hasNext()) {\n        i.next();\n        QString fileName = i.key();\n        QList<int> lines = m_initBks.values(fileName);\n        foreach(int line, lines) {\n            insertBreakPoint(fileName,line);\n        }\n    }\n    if (m_liteApp->settings()->value(LITEDEBUG_AUTOBREAKMAIN,false).toBool()) {\n        command(\"-break-insert main.main\");\n    }\n\n    command(\"-exec-run\");\n    debugLoaded();\n}\n\nvoid GdbDebugger::updateWatch()\n{\n    foreach(QStandardItem *item, m_varChangedItemList) {\n#if QT_VERSION >= 0x050000\n        item->setData(QColor(Qt::black),Qt::TextColorRole);\n#else\n        item->setData(Qt::black,Qt::TextColorRole);\n#endif\n    }\n    m_varChangedItemList.clear();\n    command(\"-var-update *\");\n}\n\nvoid GdbDebugger::updateLocals()\n{\n    command(\"-stack-list-variables 0\");\n}\n\nvoid GdbDebugger::updateFrames()\n{\n    command(\"-stack-list-frames\");\n}\n\nvoid GdbDebugger::updateBreaks()\n{\n    command(\"-break-info\");\n}\n\nvoid GdbDebugger::updateVarTypeInfo(const QString &name)\n{\n    QStringList args;\n    args << \"-var-info-type\";\n    args << name;\n    GdbCmd cmd;\n    cmd.setCmd(args);\n    cmd.insert(\"name\",name);\n    command(cmd);\n}\n\nvoid GdbDebugger::updateVarListChildren(const QString &name)\n{\n    GdbCmd cmd;\n    QStringList args;\n    args << \"-var-list-children\";\n    args << \"1\";\n    args << name;\n    cmd.setCmd(args);\n    cmd.insert(\"name\",name);\n    command(cmd);\n}\n\nvoid GdbDebugger::updateVarValue(const QString &name)\n{\n    QStringList args;\n    args << \"-var-evaluate-expression\";\n    args << name;\n    GdbCmd cmd;\n    cmd.setCmd(args);\n    cmd.insert(\"name\",name);\n    command(cmd);\n}\n\nvoid GdbDebugger::readStdOutput()\n{\n    int newstart = 0;\n    int scan = m_inbuffer.size();\n    m_inbuffer.append(m_process->readAllStandardOutput());\n\n    // This can trigger when a dialog starts a nested event loop.\n    if (m_busy)\n        return;\n\n    while (newstart < m_inbuffer.size()) {\n        int start = newstart;\n        int end = m_inbuffer.indexOf('\\n', scan);\n        if (end < 0) {\n            m_inbuffer.remove(0, start);\n            return;\n        }\n        newstart = end + 1;\n        scan = newstart;\n        if (end == start)\n            continue;\n#ifdef Q_OS_WIN\n        if (m_inbuffer.at(end - 1) == '\\r') {\n            --end;\n            if (end == start)\n                continue;\n        }\n#endif\n        m_busy = true;\n        QByteArray data = QByteArray::fromRawData(m_inbuffer.constData() + start, end - start);\n        handleResponse(data);\n        m_busy = false;\n    }\n    emit debugLog(LiteApi::DebugConsoleLog,QString::fromUtf8(m_inbuffer));\n    m_inbuffer.clear();\n\n    if (!m_gdbinit) {\n        m_gdbinit = true;\n        initGdb();\n    }\n\n    if (m_handleState.exited() && !m_gdbexit) {\n        m_gdbexit = true;\n        stop();\n    } else if (m_handleState.stopped()) {\n        updateWatch();\n        updateLocals();\n        updateFrames();\n    }\n\n    m_handleState.clear();\n}\n\nvoid GdbDebugger::finished(int code)\n{\n    clear();\n    if (m_tty) {\n        m_tty->shutdown();\n    }\n    emit debugStoped();\n    emit debugLog(LiteApi::DebugRuntimeLog,QString(\"Program exited with code %1\").arg(code));\n}\n\nvoid GdbDebugger::error(QProcess::ProcessError err)\n{\n    clear();\n    if (m_tty) {\n        m_tty->shutdown();\n    }\n    emit debugStoped();\n    emit debugLog(LiteApi::DebugRuntimeLog,QString(\"Error! %1\").arg(ProcessEx::processErrorText(err)));\n}\n\nvoid GdbDebugger::readTty(const QByteArray &data)\n{\n    emit debugLog(LiteApi::DebugApplationLog,QString::fromUtf8(data));\n}\n"
  },
  {
    "path": "liteidex/src/plugins/gdbdebugger/gdbdebugger.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gdbdebugger.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GDBDEBUGGER_H\n#define GDBDEBUGGER_H\n\n#include \"litedebugapi/litedebugapi.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"litettyapi/litettyapi.h\"\n#include \"qtc_gdbmi/gdbmi.h\"\n\n#include <QSet>\n\nclass QProcess;\nclass GdbHandleState\n{\npublic:\n    GdbHandleState() : m_exited(false),m_stopped(false) {}\n    void clear()\n    {\n        m_reason.clear();\n        m_exited = false;\n        m_stopped = false;\n    }\n    void setExited(bool b) {m_exited = b;}\n    void setStopped(bool b) {m_stopped = b;}\n    void setReason(const QByteArray &reason) { m_reason = reason; }\n    bool exited() const { return m_exited; }\n    bool stopped() const { return m_stopped; }\n    QByteArray reason() const { return m_reason; }\npublic:\n    bool       m_exited;\n    bool       m_stopped;\n    QByteArray m_reason;\n};\n\nclass GdbCmd\n{\npublic:\n    GdbCmd()\n    {\n    }\n    GdbCmd(const QString &cmd)\n    {\n        setCmd(cmd);\n    }\n    GdbCmd(const QStringList &cmd)\n    {\n        setCmd(cmd);\n    }\n    void setCmd(const QString &cmd)\n    {\n        m_cmd = cmd;\n        m_cookie.insert(\"cmd\",m_cmd);\n        m_cookie.insert(\"cmdList\",cmd.split(\" \",qtSkipEmptyParts));\n    }\n    void setCmd(const QStringList &cmd)\n    {\n        m_cmd = cmd.join(\" \");\n        m_cookie.insert(\"cmd\",m_cmd);\n        m_cookie.insert(\"cmdList\",cmd);\n    }\n    void insert(const QString &key, const QVariant &value)\n    {\n        m_cookie.insert(key,value);\n    }\n    QByteArray makeCmd(int index) const\n    {\n#ifdef Q_OS_WIN\n        return QString(\"%1%2\").arg(index,8,10,QLatin1Char('0')).arg(m_cmd).toLatin1();\n#else\n        return QString(\"%1%2\").arg(index,8,10,QLatin1Char('0')).arg(m_cmd).toUtf8();\n#endif\n    }\n    QMap<QString,QVariant> cookie() const\n    {\n        return m_cookie;\n    }\nprotected:\n    QString m_cmd;\n    QMap<QString,QVariant> m_cookie;\n};\n\nclass QStandardItemModel;\nclass QStandardItem;\n\nclass GdbDebugger : public LiteApi::IDebugger\n{\n    Q_OBJECT\npublic:\n    GdbDebugger(LiteApi::IApplication *app, QObject *parent = 0);\n    ~GdbDebugger();\n    enum VarItemDataRole{\n        VarNameRole = Qt::UserRole + 1,\n        VarNumChildRole,\n        VarExpanded\n    };\npublic:\n    virtual QString mimeType() const;\n    virtual QAbstractItemModel *debugModel(LiteApi::DEBUG_MODEL_TYPE type);\n    virtual void setWorkingDirectory(const QString &dir);\n    virtual void setEnvironment (const QStringList &environment);\n    virtual bool start(const QString &program, const QString &arguments);\n    virtual void stop();\n    virtual bool isRunning();\n    virtual void stepOver();\n    virtual void stepInto();\n    virtual void stepOut();\n    virtual void continueRun();\n    virtual void runToLine(const QString &fileName, int line);\n    virtual void command(const QByteArray &cmd);\n    virtual void enterAppText(const QString &text);\n    virtual void enterDebugText(const QString &text);\n    virtual void expandItem(QModelIndex index, LiteApi::DEBUG_MODEL_TYPE type);\n    virtual void setInitBreakTable(const QMultiMap<QString,int> &bks);\n    virtual void setInitWatchList(const QStringList &names);\n    virtual void insertBreakPoint(const QString &fileName, int line);\n    virtual void removeBreakPoint(const QString &fileName, int line);\npublic:\n    virtual void command(const GdbCmd &cmd);\n    virtual void createWatch(const QString &var);\n    virtual void removeWatch(const QString &name);\n    virtual void removeAllWatch();\n    virtual void dbclickItem(QModelIndex index, LiteApi::DEBUG_MODEL_TYPE type);\n    void showFrame(QModelIndex index);\nprotected:\n    void createWatchHelp(const QString &var, bool floating, bool watchModel);\n    void removeWatchHelp(const QString &var, bool byName, bool children);\n    void removeWatchByNameHelp(const QString &name, bool children);\n    void command_helper(const GdbCmd &cmd, bool emitOut);\npublic slots:\n    void appLoaded();\n    void readStdError();\n    void readStdOutput();\n    void finished(int);\n    void error(QProcess::ProcessError);\n    void readTty(const QByteArray &data);\nprotected:\n    void handleResponse(const QByteArray &buff);\n    void handleStopped(const GdbMiValue &result);\n    void handleLibrary(const GdbMiValue &result);\n    void handleAsyncClass(const QByteArray &asyncClass, const GdbMiValue &result);\n    void handleConsoleStream(const QByteArray &data);\n    void handleTargetStream(const QByteArray &data);\n    void handleLogStream(const QByteArray &data);\n    void handleResultRecord(const GdbResponse &response);\n    void handleResultStackListFrame(const GdbResponse &response, QMap<QString,QVariant> &map);\n    void handleResultStackListVariables(const GdbResponse &response, QMap<QString,QVariant> &map);\n    void handleResultVarCreate(const GdbResponse &response, QMap<QString,QVariant> &map);\n    void handleResultVarListChildren(const GdbResponse &response, QMap<QString,QVariant> &map);\n    void handleResultVarUpdate(const GdbResponse &response, QMap<QString,QVariant> &map);\n    void handleResultVarDelete(const GdbResponse &response, QMap<QString,QVariant> &map);\n    void handleResultVarUpdateValue(const GdbResponse &response, QMap<QString,QVariant> &map);\n    void handleResultVarUpdateType(const GdbResponse &response, QMap<QString,QVariant> &map);\n    void handleBreakInsert(const GdbResponse &response, QMap<QString,QVariant> &map);\n    void handleBreakDelete(const GdbResponse &response, QMap<QString,QVariant> &map);\nprotected:\n    void clear();\n    void initGdb();\n    void updateWatch();\n    void updateLocals();\n    void updateFrames();\n    void updateBreaks();\n    void updateVarTypeInfo(const QString &name);\n    void updateVarListChildren(const QString &name);\n    void updateVarValue(const QString &name);\nprotected:\n    LiteApi::IApplication   *m_liteApp;\n    LiteApi::IEnvManager    *m_envManager;\n    LiteApi::ITty           *m_tty;\n    QProcess *m_process;\n    QStandardItemModel *m_asyncModel;\n    QStandardItemModel *m_varsModel;\n    QStandardItemModel *m_watchModel;\n    QStandardItemModel *m_framesModel;\n    QStandardItemModel *m_libraryModel;\n    QStandardItem   *m_asyncItem;\n    QMap<int,QVariant> m_tokenCookieMap;\n    QMap<QString,QString> m_varNameMap;\n    QList<QString> m_watchList;\n    QMap<QString,QStandardItem*> m_nameItemMap;\n    QSet<QStandardItem*> m_varChangedItemList;\n    QString m_gdbFilePath;\n    QString m_runtimeFilePath;\n    QByteArray m_inbuffer;\n    GdbHandleState m_handleState;\n    QMultiMap<QString,int>  m_initBks;\n    QMap<QString,QString> m_locationBkMap;\n    bool    m_busy;\n    bool    m_gdbinit;\n    bool    m_gdbexit;\n    int     m_token;\n};\n\n#endif // GDBDEBUGGER_H\n"
  },
  {
    "path": "liteidex/src/plugins/gdbdebugger/gdbdebugger.pro",
    "content": "TARGET = gdbdebugger\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude(../../api/litedebugapi/litedebugapi.pri)\ninclude(../../utils/fileutil/fileutil.pri)\ninclude(../../utils/processex/processex.pri)\ninclude(../../3rdparty/qtc_gdbmi/qtc_gdbmi.pri)\n\nDEFINES += GDBDEBUGER_LIBRARY\n\nSOURCES += gdbdebuggerplugin.cpp \\\n    gdbdebugger.cpp \\\n    gdbdebuggeroptionfactory.cpp \\\n    gdbdebuggeroption.cpp\n\nHEADERS += gdbdebuggerplugin.h\\\n        gdbdebugger_global.h \\\n    gdbdebugger.h \\\n    gdbdebuggeroptionfactory.h \\\n    gdbdebuggeroption.h\n\nFORMS += \\\n    gdbdebuggeroption.ui\n"
  },
  {
    "path": "liteidex/src/plugins/gdbdebugger/gdbdebugger_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gdbdebugger_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GDBDEBUGGER_GLOBAL_H\n#define GDBDEBUGGER_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(GDBDEBUGER_LIBRARY)\n#  define GDBDEBUGERSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define GDBDEBUGERSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#define OPTION_GDBDEBUGGER \"option/gdbdebugger\"\n#define GDBDEBUGGER_USETTY \"gdbdebugger/usetty\"\n\n#endif // GDBDEBUGGER_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/gdbdebugger/gdbdebuggeroption.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gdbdebuggeroption.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"gdbdebuggeroption.h\"\n#include \"ui_gdbdebuggeroption.h\"\n#include \"gdbdebugger_global.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGdbDebuggerOption::GdbDebuggerOption(LiteApi::IApplication *app,QObject *parent) :\n    LiteApi::IOption(parent),\n    m_liteApp(app),\n    m_widget(new QWidget),\n    ui(new Ui::GdbDebuggerOption)\n{\n    ui->setupUi(m_widget);\n}\n\nGdbDebuggerOption::~GdbDebuggerOption()\n{\n    delete m_widget;\n    delete ui;\n}\n\nQWidget *GdbDebuggerOption::widget()\n{\n    return m_widget;\n}\n\nQString GdbDebuggerOption::name() const\n{\n    return \"GdbDebugger\";\n}\n\nQString GdbDebuggerOption::mimeType() const\n{\n    return OPTION_GDBDEBUGGER;\n}\n\nvoid GdbDebuggerOption::load()\n{\n    ui->useTtyCheckBox->setChecked(isGdbDebuggerUseTty(m_liteApp));\n}\n\nvoid GdbDebuggerOption::save()\n{\n    m_liteApp->settings()->setValue(GDBDEBUGGER_USETTY,ui->useTtyCheckBox->isChecked());\n}\n\nbool isGdbDebuggerUseTty(LiteApi::IApplication *app)\n{\n#ifdef Q_OS_WIN\n    return app->settings()->value(GDBDEBUGGER_USETTY,true).toBool();\n#else\n    return app->settings()->value(GDBDEBUGGER_USETTY,false).toBool();\n#endif\n}\n"
  },
  {
    "path": "liteidex/src/plugins/gdbdebugger/gdbdebuggeroption.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gdbdebuggeroption.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GDBDEBUGGEROPTION_H\n#define GDBDEBUGGEROPTION_H\n\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class GdbDebuggerOption;\n}\n\nclass GdbDebuggerOption : public LiteApi::IOption\n{\n    Q_OBJECT\n\npublic:\n    explicit GdbDebuggerOption(LiteApi::IApplication *app, QObject *parent = 0);\n    ~GdbDebuggerOption();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void load();\n    virtual void save();\nprivate:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget           *m_widget;\n    Ui::GdbDebuggerOption *ui;\n};\n\nbool isGdbDebuggerUseTty(LiteApi::IApplication *app);\n\n#endif // GDBDEBUGGEROPTION_H\n"
  },
  {
    "path": "liteidex/src/plugins/gdbdebugger/gdbdebuggeroption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>GdbDebuggerOption</class>\n <widget class=\"QWidget\" name=\"GdbDebuggerOption\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>400</width>\n    <height>72</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n   <item>\n    <widget class=\"QCheckBox\" name=\"useTtyCheckBox\">\n     <property name=\"text\">\n      <string>Enable --tty for program being debugged.</string>\n     </property>\n    </widget>\n   </item>\n   <item>\n    <spacer name=\"verticalSpacer\">\n     <property name=\"orientation\">\n      <enum>Qt::Vertical</enum>\n     </property>\n     <property name=\"sizeHint\" stdset=\"0\">\n      <size>\n       <width>20</width>\n       <height>40</height>\n      </size>\n     </property>\n    </spacer>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/gdbdebugger/gdbdebuggeroptionfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gdbdebuggeroptionfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"gdbdebuggeroption.h\"\n#include \"gdbdebuggeroptionfactory.h\"\n#include \"gdbdebugger_global.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGdbDebuggerOptionFactory::GdbDebuggerOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n}\n\nQStringList GdbDebuggerOptionFactory::mimeTypes() const\n{\n    return QStringList() << OPTION_GDBDEBUGGER;\n}\n\nLiteApi::IOption *GdbDebuggerOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == OPTION_GDBDEBUGGER) {\n        return new GdbDebuggerOption(m_liteApp,this);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/gdbdebugger/gdbdebuggeroptionfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gdbdebuggeroptionfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GDBDEBUGGEROPTIONFACTORY_H\n#define GDBDEBUGGEROPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass GdbDebuggerOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n    GdbDebuggerOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // GDBDEBUGGEROPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/gdbdebugger/gdbdebuggerplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gdbdebuggerplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"gdbdebuggerplugin.h\"\n#include \"gdbdebugger.h\"\n#include \"gdbdebuggeroptionfactory.h\"\n#include \"litedebugapi/litedebugapi.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGdbDebuggerPlugin::GdbDebuggerPlugin()\n{\n}\n\nbool GdbDebuggerPlugin::load(LiteApi::IApplication *app)\n{\n    LiteApi::IDebuggerManager *manager = LiteApi::getDebugManager(app);\n    if (!manager) {\n        return false;\n    }\n    GdbDebugger *debug = new GdbDebugger(app);\n    manager->addDebugger(debug);\n    manager->setCurrentDebugger(debug);\n    app->optionManager()->addFactory(new GdbDebuggerOptionFactory(app,this));\n    return true;\n}\n\nQStringList GdbDebuggerPlugin::dependPluginList() const\n{\n    return QStringList() << \"plugin/litedebug\";\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/gdbdebugger/gdbdebuggerplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gdbdebuggerplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GDBDEBUGGERPLUGIN_H\n#define GDBDEBUGGERPLUGIN_H\n\n#include \"gdbdebugger_global.h\"\n#include \"liteapi/liteapi.h\"\n#include <QtPlugin>\n\nclass GdbDebuggerPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    GdbDebuggerPlugin();\n    virtual bool load(LiteApi::IApplication *app);\n    virtual QStringList dependPluginList() const;\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<GdbDebuggerPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.GdbDebuggerPlugin\")\n#endif\npublic:\n    PluginFactory()\n    {\n        m_info->setId(\"plugin/GdbDebugger\");\n        m_info->setName(\"GdbDebugger\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setVer(\"X32\");\n        m_info->setInfo(\"Core Gdb Debugger\");\n        m_info->setMustLoad(true);\n    }\n};\n\n#endif // GDBDEBUGGERPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/astwidget.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: astwidget.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"astwidget.h\"\n#include \"golangastitem.h\"\n#include \"golangasticon.h\"\n#include \"golangdocapi/golangdocapi.h\"\n#include \"liteenvapi/liteenvapi.h\"\n\n#include <QAction>\n#include <QMenu>\n#include <QStandardItemModel>\n#include <QSortFilterProxyModel>\n#include <QFont>\n#include <QVBoxLayout>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nAstWidget::AstWidget(bool outline, LiteApi::IApplication *app, QWidget *parent) :\n    QWidget(parent),\n    m_bOutline(outline),\n    m_liteApp(app)\n{\n    m_bFirst = true;\n    QVBoxLayout *layout = new QVBoxLayout;\n    layout->setMargin(0);\n    layout->setSpacing(0);\n\n    m_tree = new SymbolTreeView;\n    m_tree->setExpandsOnDoubleClick(false);\n    m_filterEdit = new Utils::FilterLineEdit(200);\n\n    m_model = new QStandardItemModel(this);\n    proxyModel = new QSortFilterProxyModel(this);\n    proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);\n    proxyModel->setDynamicSortFilter(true);\n    proxyModel->setSourceModel(m_model);\n\n    layout->addWidget(m_filterEdit);\n    layout->addWidget(m_tree);\n\n    this->setLayout(layout);\n\n    m_tree->setModel(proxyModel);\n    //m_tree->setExpandsOnDoubleClick(false);\n    m_tree->setContextMenuPolicy(Qt::CustomContextMenu);\n\n    m_gotoPosAct = new QAction(tr(\"Go To Definition\"),this);\n    m_importDocAct = new QAction(tr(\"View Import Document\"),this);\n    m_contextMenu = new QMenu(this);\n    m_contextMenu->addAction(m_gotoPosAct);\n    m_contextMenu->addAction(m_importDocAct);\n\n    m_contextItem = 0;\n    connect(m_tree,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(doubleClicked(QModelIndex)));\n    connect(m_tree,SIGNAL(enterKeyPressed(QModelIndex)),this,SLOT(enterKeyPressed(QModelIndex)));\n    connect(m_filterEdit,SIGNAL(filterChanged(QString)),this,SLOT(filterChanged(QString)));\n    connect(m_tree,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(treeContextMenuRequested(QPoint)));\n    connect(m_gotoPosAct,SIGNAL(triggered()),this,SLOT(gotoDefinition()));\n    connect(m_importDocAct,SIGNAL(triggered()),this,SLOT(viewImportDoc()));\n}\n\nvoid AstWidget::clear()\n{\n    m_model->clear();\n    m_filterEdit->clear();\n}\n\nstatic QModelIndexList filterModelList(QString filter, QAbstractItemModel *model, QModelIndex parent)\n{\n    QModelIndexList list;\n    for (int i = 0; i < model->rowCount(parent); i++) {\n        QModelIndex index = model->index(i,0,parent);\n        if (index.data().toString().indexOf(filter,0,Qt::CaseInsensitive) >= 0) {\n            list.append(index);\n        }\n        list.append(filterModelList(filter,model,index));\n    }\n    return list;\n}\n\nvoid  AstWidget::clearFilter(QModelIndex parent)\n{\n    for (int i = 0; i < m_model->rowCount(parent); i++) {\n        QModelIndex index = m_model->index(i,0,parent);\n        clearFilter(index);\n        GolangAstItem *item = (GolangAstItem*)m_model->itemFromIndex(index);\n        if (!item) {\n            continue;\n        }\n        if (item->m_tagName.indexOf(\"+\") >= 0) {\n            continue;\n        }\n        QFont font = item->font();\n        font.setBold(false);\n        item->setFont(font);\n    }\n}\n\nbool AstWidget::filterModel(QString filter, QModelIndex parent, QModelIndex &first)\n{\n    bool b = false;\n    for (int i = 0; i < proxyModel->rowCount(parent); i++) {\n        QModelIndex index = proxyModel->index(i,0,parent);\n        GolangAstItem *item = astItemFromIndex(index);\n        if (!item) {\n            continue;\n        }\n        if (item->m_tagName.indexOf(\"+\") < 0) {\n            QFont font = item->font();\n            if (index.data().toString().indexOf(filter,0,Qt::CaseInsensitive) >= 0) {\n                font.setBold(true);\n                if (!b) {\n                    b = true;\n                    if (!first.isValid()) {\n                        first = index;\n                    }\n                }\n            } else {\n                font.setBold(false);\n            }\n            item->setFont(font);\n        }\n        if (filterModel(filter,index,first)) {\n            m_tree->expand(index);\n            b = true;\n        } else {\n            //if (!m_bOutline) {\n            m_tree->collapse(index);\n            //}\n        }\n    }\n    return b;\n}\n\nvoid AstWidget::filterChanged(QString filter)\n{\n    if (filter.isEmpty()) {\n        clearFilter(m_tree->rootIndex());\n        m_tree->expandToDepth(0);\n        /*\n        for(int i = 0; i < proxyModel->rowCount(); i++) {\n            QModelIndex index = proxyModel->index(i,0);\n            m_tree->expand(index);\n            if (m_bOutline) {\n                for (int j = 0; j < proxyModel->rowCount(index);j++) {\n                    m_tree->expand(proxyModel->index(j,0,index));\n                }\n            }\n        }\n        */\n    } else {\n        QModelIndex first;\n        filterModel(filter,m_tree->rootIndex(),first);\n        if (first.isValid()) {\n            m_tree->scrollTo(first);\n        }\n    }\n}\n\nvoid AstWidget::treeContextMenuRequested(QPoint pt)\n{\n    QModelIndex index =  m_tree->indexAt(pt);\n    if (!index.isValid()) {\n        return;\n    }\n    GolangAstItem *item = astItemFromIndex(index);\n    if (item->isFolder() || item->m_tagFlag == LiteApi::TagPackage) {\n        return;\n    }\n    m_contextItem = item;\n    m_importDocAct->setVisible(item->m_tagFlag == LiteApi::TagImport);\n    m_contextMenu->popup(m_tree->mapToGlobal(pt));\n}\n\nvoid AstWidget::gotoDefinition()\n{\n    gotoItemDefinition(m_contextItem);\n}\n\nvoid AstWidget::viewImportDoc()\n{\n    QString pkg = m_contextItem->text();\n    QString orgPkg = pkg;\n    //check mod and vendor pkg\n    QString gotools = LiteApi::getGotools(m_liteApp);\n    if (!gotools.isEmpty()) {\n        QProcess process(this);\n        process.setEnvironment(LiteApi::getGoEnvironment(m_liteApp).toStringList());\n        process.setWorkingDirectory(m_workPath);\n        QStringList args;\n        args << \"pkgcheck\" << \"-pkg\" << pkg;\n        process.start(gotools,args);\n        if (!process.waitForFinished(3000)) {\n            process.kill();\n        }\n        QByteArray ar = process.readAllStandardOutput();\n        QString pkgs = QString::fromUtf8(ar).trimmed();\n        if (!pkgs.isEmpty()) {\n            QStringList pkgInfo = pkgs.split(\",\");\n            if (pkgInfo.size() == 2 && !pkgInfo[0].isEmpty()) {\n                pkg = pkgInfo[0];\n            }\n        }\n    }\n\n    LiteApi::IGolangDoc *doc = LiteApi::getGolangDoc(m_liteApp);\n    if (!doc) {\n        return;\n    }\n    QUrl url;\n    url.setScheme(\"pdoc\");\n    url.setPath(pkg);\n    QString addin;\n    if (pkg != orgPkg) {\n        addin = orgPkg;\n    }\n    doc->openUrl(url,addin);\n    doc->activeBrowser();\n\n}\n\nvoid AstWidget::doubleClicked(QModelIndex index)\n{\n    GolangAstItem *item = astItemFromIndex(index);\n    if (!item) {\n        return;\n    }\n    if (!item->isFolder()) {\n        gotoItemDefinition(item);\n    } else {\n        m_tree->setExpanded(index,!m_tree->isExpanded(index));\n    }\n}\n\nvoid AstWidget::enterKeyPressed(const QModelIndex &index)\n{\n    GolangAstItem *item = astItemFromIndex(index);\n    if (!item) {\n        return;\n    }\n    if (item->isFolder()) {\n        m_tree->setExpanded(index,!m_tree->isExpanded(index));\n    } else {\n        gotoItemDefinition(item);\n    }\n}\n\nvoid AstWidget::gotoItemDefinition(GolangAstItem *item)\n{\n    if (item->m_posList.isEmpty()) {\n         return;\n    }\n    AstItemPos pos = item->m_posList.at(0);\n    QFileInfo info(QDir(m_workPath),pos.fileName);\n    LiteApi::gotoLine(m_liteApp,info.filePath(),pos.line-1,pos.column-1,true,true);\n    return;\n//    LiteApi::IEditor *editor = m_liteApp->fileManager()->openEditor(info.filePath());\n//    if (!editor) {\n//        return;\n//    }\n//    editor->widget()->setFocus();\n//    LiteApi::ITextEditor *textEditor = LiteApi::findExtensionObject<LiteApi::ITextEditor*>(editor,\"LiteApi.ITextEditor\");\n//    if (!textEditor) {\n//        return;\n//    }\n//    textEditor->gotoLine(pos.line-1,pos.column,true);\n}\n\nGolangAstItem *AstWidget::astItemFromIndex(QModelIndex index)\n{\n    QModelIndex i = proxyModel->mapToSource(index);\n    if (!i.isValid()) {\n        return 0;\n    }\n    return (GolangAstItem*)m_model->itemFromIndex(i);\n}\n\n/*\ntools/goastview/packageview.go\nconst (\n    tag_package        = \"p\"\n    tag_imports_folder = \"+m\"\n    tag_import         = \"mm\"\n    tag_type           = \"t\"\n    tag_struct         = \"s\"\n    tag_interface      = \"i\"\n    tag_value          = \"v\"\n    tag_const          = \"c\"\n    tag_func           = \"f\"\n    tag_value_folder   = \"+v\"\n    tag_const_folder   = \"+c\"\n    tag_func_folder    = \"+f\"\n    tag_type_method    = \"tm\"\n    tag_type_factor    = \"tf\"\n    tag_type_value     = \"tv\"\n)\n*/\n\nstatic QString tagInfo(const QString &tag)\n{\n    if (tag == \"p\") {\n        return \"package\";\n    } else if (tag == \"+m\") {\n        return \"imports folder\";\n    } else if (tag == \"mm\") {\n        return \"import\";\n    } else if (tag == \"t\") {\n        return \"type\";\n    } else if (tag == \"s\") {\n        return \"struct\";\n    } else if (tag == \"i\") {\n        return \"interface\";\n    } else if (tag == \"v\") {\n        return \"value\";\n    } else if (tag == \"c\") {\n        return \"const\";\n    } else if (tag == \"f\") {\n        return \"func\";\n    } else if (tag == \"+v\") {\n        return \"values folder\";\n    } else if (tag == \"+c\") {\n        return \"const folder\";\n    } else if (tag == \"+f\") {\n        return \"funcs folder\";\n    } else if (tag == \"tm\") {\n        return \"method\";\n    } else if (tag == \"tf\") {\n        return \"factory\";\n    } else if (tag == \"tv\") {\n        return \"field\";\n    }\n    return QString();\n}\n\nstatic LiteApi::ASTTAG_ENUM toTagFlag(const QString &tag)\n{\n    if (tag == \"p\") {\n        return LiteApi::TagPackage;\n    } else if (tag == \"+m\") {\n        return LiteApi::TagImportFolder;\n    } else if (tag == \"mm\") {\n        return LiteApi::TagImport;\n    } else if (tag == \"t\") {\n        return LiteApi::TagType;\n    } else if (tag == \"s\") {\n        return LiteApi::TagStruct;\n    } else if (tag == \"i\") {\n        return LiteApi::TagInterface;\n    } else if (tag == \"v\") {\n        return LiteApi::TagValue;\n    } else if (tag == \"c\") {\n        return LiteApi::TagConst;\n    } else if (tag == \"f\") {\n        return LiteApi::TagFunc;\n    } else if (tag == \"+v\") {\n        return LiteApi::TagValueFolder;\n    } else if (tag == \"+c\") {\n        return LiteApi::TagConstFolder;\n    } else if (tag == \"+f\") {\n        return LiteApi::TagFuncFolder;\n    } else if (tag == \"tm\") {\n        return LiteApi::TagTypeMethod;\n    } else if (tag == \"tf\") {\n        return LiteApi::TagTypeFactor;\n    } else if (tag == \"tv\") {\n        return LiteApi::TagTypeValue;\n    } else if (tag == \"b\") {\n        return LiteApi::TagTodo;\n    } else if (tag == \"+b\") {\n        return LiteApi::TagTodoFolder;\n    }\n    return LiteApi::TagNone;\n}\n\nvoid AstWidget::parserModel(QStandardItemModel *model, const QByteArray &data, const QByteArray &sep, bool flatMode, bool skipimport)\n{\n    QList<QString> array = QString::fromUtf8(data).split('\\n');\n    QMap<int,QStandardItem*> items;\n    QStringList indexFiles;\n    bool ok = false;\n    bool bmain = false;\n    QMap<QString,GolangAstItem*> level1NameItemMap;\n    foreach (QString line, array) {\n        int pos = line.indexOf('@');\n        QString tip;\n        if (pos == 0) {\n            indexFiles.append(line.mid(1));\n            continue;\n        } else if (pos >= 1) {\n            tip = line.mid(pos+1);\n            line = line.left(pos);\n        }\n        line = line.trimmed();\n        QList<QString> info = line.split(sep);\n        if (info.size() < 3) {\n            continue;\n        }\n        int level = info[0].toInt(&ok);\n        if (!ok) {\n            continue;\n        }\n        QString tag = info[1];\n        QString name = info[2];\n        if (name.isEmpty() || tag.isEmpty()) {\n            continue;\n        }\n        if (flatMode && tag.startsWith(\"+\")) {\n            continue;\n        }\n        if (level == 0) {\n            level1NameItemMap.clear();\n        }\n        if (tag == \"p\") {\n            if (name == \"main\") {\n                bmain = true;\n            } else {\n                bmain = false;\n            }\n            if (name == \"documentation\") {\n                continue;\n            }\n            if (flatMode) {\n                continue;\n            }\n        }\n        if (skipimport && tag == \"mm\") {\n            continue;\n        }\n        GolangAstItem *item = 0;\n        if (level == 1) {\n            item = level1NameItemMap.value(name);\n            if (item != 0) {\n                items[level] = item;\n                continue;\n            }\n        }\n        item = new GolangAstItem;\n        if (level == 1) {\n            level1NameItemMap.insert(name,item);\n        }\n        item->m_tagName = tag;\n        item->m_tagFlag = toTagFlag(tag);\n        item->setText(name);\n        if (!bmain && (name.at(0).isLower() || name.at(0) == '_')) {\n            item->setIcon(GolangAstIcon::instance()->iconFromTag(tag,false));\n        } else {\n            item->setIcon(GolangAstIcon::instance()->iconFromTag(tag));\n        }\n        if (!tip.isEmpty()) {\n            item->setToolTip(tip);\n            // todo comment use tip\n            if (tag == \"b\") {\n                item->setText(tip);\n                item->setToolTip(name);\n            }\n        } else if (tag.at(0) == '+') {\n            item->setToolTip(QString(\"%1\").arg(tagInfo(tag)));\n        } else {\n            item->setToolTip(QString(\"%1 %2\").arg(tagInfo(tag)).arg(name));\n        }\n        if (info.size() >= 4) {\n            foreach (QString pos, info[3].split(';')) {\n                QList<QString> ar = pos.split(':');\n                if (ar.size() == 3) {\n                    bool ok = false;\n                    int index = ar[0].toInt(&ok);\n                    if (ok && index >= 0 && index < indexFiles.size()) {\n                        bool ok1,ok2;\n                        int line = ar[1].toInt(&ok1);\n                        int col = ar[2].toInt(&ok2);\n                        if (ok1 && ok2) {\n                            AstItemPos pos = {indexFiles[index],line,col,-1,-1};\n                            item->m_posList.append(pos);\n                        }\n                    }\n                } else if (ar.size() == 5) {\n                    bool ok = false;\n                    int index = ar[0].toInt(&ok);\n                    if (ok && index >= 0 && index < indexFiles.size()) {\n                        bool ok1,ok2,ok3,ok4;\n                        int line = ar[1].toInt(&ok1);\n                        int col = ar[2].toInt(&ok2);\n                        int endLine = ar[3].toInt(&ok3);\n                        int endCol = ar[4].toInt(&ok4);\n                        if (ok1 && ok2 && ok3 && ok4) {\n                            AstItemPos pos = {indexFiles[index],line,col,endLine,endCol};\n                            item->m_posList.append(pos);\n                        }\n                    }\n                }\n            }\n        }\n        QStandardItem *parent = items.value(level-1,0);\n        if (parent ) {\n            if (flatMode) {\n                if (tag == \"tv\") {\n                    item->setText(parent->text()+\".\"+item->text());\n                }\n                model->appendRow(item);\n            } else {\n                parent->appendRow(item);\n            }\n        } else {\n            model->appendRow(item);\n        }\n        items[level] = item;\n    }\n}\n\nbool AstWidget::trySyncIndex(const QString &filePath, int line, int column)\n{\n    QModelIndexList finds;\n    QFileInfo info(filePath);\n    findModelIndex(QModelIndex(),info.fileName(),line+1,column+1,finds);\n    if (finds.isEmpty()) {\n        return false;\n    }\n    m_tree->setCurrentIndex(finds.last());\n    m_tree->scrollTo(finds.last());\n    return true;\n}\n\nvoid AstWidget::findModelIndex(const QModelIndex &parent, const QString &fileName, int line, int column, QModelIndexList &finds)\n{\n    for (int i = 0; i < proxyModel->rowCount(parent); i++) {\n        QModelIndex index = proxyModel->index(i,0,parent);\n        GolangAstItem *item = astItemFromIndex(index);\n        if (!item) {\n            continue;\n        }\n        foreach (AstItemPos pos, item->m_posList) {\n            if (pos.fileName == fileName && line >= pos.line && column >= pos.column && line <= pos.endLine) {\n                if (line < pos.endLine || (line == pos.endLine && column <= pos.endColumn) ) {\n                    finds.push_back(index);\n                }\n            }\n        }\n        if (item->hasChildItem()) {\n            findModelIndex(index,fileName,line,column,finds);\n        }\n    }\n}\n\n// level,tag,name,pos,@info\nvoid AstWidget::updateModel(const QByteArray &data, const QByteArray &sep)\n{\n    //save state\n    SymbolTreeState state;\n    m_tree->saveState(&state);\n\n    m_model->clear();\n\n    parserModel(m_model,data,sep,false,false);\n\n    //load state\n    if (!m_tree->isExpanded(m_tree->rootIndex())) {\n        m_tree->expandToDepth(0);\n    }\n    m_tree->loadState(proxyModel,&state);\n    /*\n    if (m_bOutline && m_bFirst) {\n        //m_tree->expandToDepth(1);\n        for(int i = 0; i < proxyModel->rowCount(); i++) {\n            QModelIndex index = proxyModel->index(i,0);\n            m_tree->expand(index);\n            for (int j = 0; j < proxyModel->rowCount(index);j++) {\n                m_tree->expand(proxyModel->index(j,0,index));\n            }\n        }\n        m_bFirst = false;\n    }\n    */\n    QString text = m_filterEdit->text().trimmed();\n    if (!text.isEmpty()) {\n        this->filterChanged(text);\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/astwidget.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: astwidget.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef ASTWIDGET_H\n#define ASTWIDGET_H\n\n#include \"liteapi/liteapi.h\"\n#include \"symboltreeview/symboltreeview.h\"\n#include \"qtc_editutil/filterlineedit.h\"\n\nclass GolangAstItem;\nclass QStandardItemModel;\nclass QSortFilterProxyModel;\n\nclass AstWidget : public QWidget\n{\n    Q_OBJECT\npublic:\n    explicit AstWidget(bool outline, LiteApi::IApplication *app, QWidget *parent = 0);\npublic:\n    void clear();\n    void updateModel(const QByteArray &data, const QByteArray &sep);\n    void setWorkPath(const QString &path) {\n        m_workPath = path;\n    }\n    QString workPath() const {\n        return m_workPath;\n    }\n    GolangAstItem *astItemFromIndex(QModelIndex index);\n    SymbolTreeView *tree() { return m_tree; }\n    static void parserModel(QStandardItemModel *model, const QByteArray &data, const QByteArray &sep, bool flatMode, bool skipimport);\n    bool trySyncIndex(const QString &filePath, int line, int column);\n    void findModelIndex(const QModelIndex &parent, const QString &fileName, int line, int column, QModelIndexList &finds);\npublic slots:\n    bool filterModel(QString filter, QModelIndex parent, QModelIndex &first);\n    void clearFilter(QModelIndex parent);\n    void filterChanged(QString);\n    void treeContextMenuRequested(QPoint);\n    void gotoDefinition();\n    void viewImportDoc();\n    void doubleClicked(QModelIndex);\n    void enterKeyPressed(const QModelIndex &index);\nprotected:\n    void gotoItemDefinition(GolangAstItem *item);\n    bool                m_bOutline;\n    bool                m_bFirst;    \n    SymbolTreeView     *m_tree;\n    Utils::FilterLineEdit *m_filterEdit;\n    QStandardItemModel *m_model;\n    QSortFilterProxyModel *proxyModel;\n    LiteApi::IApplication *m_liteApp;\n    QAction             *m_gotoPosAct;\n    QAction             *m_importDocAct;\n    QMenu               *m_contextMenu;\n    GolangAstItem       *m_contextItem;\n    QString             m_workPath;\n};\n\n#endif // ASTWIDGET_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangast.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangast.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangast.h\"\n#include \"golangastitem.h\"\n#include \"golangasticon.h\"\n#include \"astwidget.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"golangast_global.h\"\n\n#include <QStackedWidget>\n#include <QDockWidget>\n#include <QVBoxLayout>\n#include <QFileInfo>\n#include <QStandardItem>\n#include <QStandardItemModel>\n#include <QSortFilterProxyModel>\n#include <QTimer>\n#include <QDir>\n#include <QAction>\n#include <QLabel>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangAst::GolangAst(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IGolangAst(parent),\n    m_liteApp(app)\n{\n    m_astviewSep = \",,,\";\n    m_currentEditor = 0;\n    m_currentPlainTextEditor = 0;\n    m_blankWidget = new QLabel(tr(\"No outline available\"));\n    m_blankWidget->setAlignment(Qt::AlignCenter);\n\n    m_stackedWidget = new QStackedWidget;\n    m_stackedWidget->addWidget(m_blankWidget);\n\n    m_projectAstWidget = new AstWidget(false,m_liteApp);\n\n    m_process = new QProcess(this);\n    m_timer = new QTimer(this);\n\n    m_processFile = new QProcess(this);\n    m_timerFile = new QTimer(this);\n\n    m_syncClassViewAct = new QAction(QIcon(\"icon:images/sync.png\"),tr(\"Synchronize with editor\"),this);\n    m_syncClassViewAct->setCheckable(true);\n\n    m_syncOutlineAct = new QAction(QIcon(\"icon:images/sync.png\"),tr(\"Synchronize with editor\"),this);\n    m_syncOutlineAct->setCheckable(true);\n\n    m_classViewToolAct = m_liteApp->toolWindowManager()->addToolWindow(Qt::LeftDockWidgetArea,m_projectAstWidget,\"GoClassView\",tr(\"Go Class View\"),false, QList<QAction*>() << m_syncClassViewAct);\n    m_outlineToolAct = m_liteApp->toolWindowManager()->addToolWindow(Qt::LeftDockWidgetArea,m_stackedWidget,\"GoOutline\",tr(\"Go Outline\"),false, QList<QAction*>() << m_syncOutlineAct);\n\n    connect(m_classViewToolAct,SIGNAL(toggled(bool)),this,SLOT(astProjectEnable(bool)));\n    connect(m_outlineToolAct,SIGNAL(toggled(bool)),this,SLOT(astFileEnable(bool)));\n\n    connect(m_liteApp->editorManager(),SIGNAL(editorCreated(LiteApi::IEditor*)),this,SLOT(editorCreated(LiteApi::IEditor*)));\n    connect(m_liteApp->editorManager(),SIGNAL(editorAboutToClose(LiteApi::IEditor*)),this,SLOT(editorAboutToClose(LiteApi::IEditor*)));\n    connect(m_liteApp->projectManager(),SIGNAL(currentProjectChanged(LiteApi::IProject*)),this,SLOT(projectChanged(LiteApi::IProject*)));\n    connect(m_liteApp->editorManager(),SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(editorChanged(LiteApi::IEditor*)));\n    connect(m_liteApp->editorManager(),SIGNAL(editorSaved(LiteApi::IEditor*)),this,SLOT(editorSaved(LiteApi::IEditor*)));\n    connect(m_process,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(finishedProcess(int,QProcess::ExitStatus)));\n    connect(m_timer,SIGNAL(timeout()),this,SLOT(updateAstNow()));\n    connect(m_processFile,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(finishedProcessFile(int,QProcess::ExitStatus)));\n    connect(m_timerFile,SIGNAL(timeout()),this,SLOT(updateAstNowFile()));\n    connect(m_syncClassViewAct,SIGNAL(triggered(bool)),this,SLOT(syncClassView(bool)));\n    connect(m_syncOutlineAct,SIGNAL(triggered(bool)),this,SLOT(syncOutline(bool)));\n\n    m_liteApp->extension()->addObject(\"LiteApi.IGolangAst\",this);\n\n    m_isSyncClassView = m_liteApp->settings()->value(GOLANGAST_CLASSVIEW_SYNCEDITOR,false).toBool();\n    m_syncClassViewAct->setChecked(m_isSyncClassView);\n\n    m_isSyncOutline = m_liteApp->settings()->value(GOLANGAST_OUTLINE_SYNCEDITOR,false).toBool();\n    m_syncOutlineAct->setChecked(m_isSyncOutline);\n}\n\nGolangAst::~GolangAst()\n{\n    if (m_timer->isActive()) {\n        m_timer->stop();\n    }\n    delete m_process;\n    if (m_timerFile->isActive()) {\n        m_timerFile->stop();\n    }\n    delete m_processFile;\n    m_liteApp->toolWindowManager()->removeToolWindow(m_projectAstWidget);\n    m_liteApp->toolWindowManager()->removeToolWindow(m_stackedWidget);\n    delete m_projectAstWidget;\n    delete m_stackedWidget;\n}\n\nQIcon GolangAst::iconFromTag(const QString &tag, bool pub) const\n{\n    return GolangAstIcon::instance()->iconFromTag(tag,pub);\n}\n\nQIcon GolangAst::iconFromTagEnum(LiteApi::ASTTAG_ENUM tag, bool pub) const\n{\n    return GolangAstIcon::instance()->iconFromTagEnum(tag,pub);\n}\n\nvoid GolangAst::astProjectEnable(bool b)\n{\n    if (b) {\n        //loadProject(m_liteApp->projectManager()->currentProject());\n        LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n        if (!editor) {\n            return;\n        }\n        QString fileName = editor->filePath();\n        if (!fileName.isEmpty()) {\n            QFileInfo info(fileName);\n            loadProjectPath(info.path());\n        }\n    }\n}\n\nvoid GolangAst::astFileEnable(bool b)\n{\n    if (b) {\n        editorChanged(m_liteApp->editorManager()->currentEditor());\n    }\n}\n\n\nvoid GolangAst::setEnable(bool b)\n{\n    if (b) {\n        m_stackedWidget->setVisible(true);\n        loadProject(m_liteApp->projectManager()->currentProject());\n        editorChanged(m_liteApp->editorManager()->currentEditor());\n        updateAst();\n    } else {\n        //m_stackedWidget->setVisible(false);\n    }\n}\n\nvoid GolangAst::projectChanged(LiteApi::IProject *project)\n{\n    return;\n    if (project) {\n        m_projectAstWidget->clear();\n    }\n    loadProject(project);\n    if (project) {\n        connect(project,SIGNAL(reloaded()),this,SLOT(projectReloaded()));\n    }\n}\n\nvoid GolangAst::projectReloaded()\n{\n    LiteApi::IProject *project = (LiteApi::IProject*)sender();\n    loadProject(project);\n}\n\nvoid GolangAst::loadProjectPath(const QString &path)\n{\n    if (m_projectAstWidget->isHidden()) {\n        return;\n    }\n\n    m_updateFileNames.clear();\n    m_updateFilePaths.clear();\n    QDir dir(path);\n    if (!dir.exists()) {\n        return;\n    }\n    foreach (QFileInfo info, dir.entryInfoList(QStringList()<<\"*.go\",QDir::Files)) {\n        m_updateFileNames.append(info.fileName());\n        m_updateFilePaths.append(info.filePath());\n    }\n\n    m_workPath = path;\n    m_process->setWorkingDirectory(m_workPath);\n    m_projectAstWidget->setWorkPath(m_workPath);\n    updateAst();\n    /*\n    if (project) {\n        foreach(QString file, project->fileNameList()) {\n            if (QFileInfo(file).suffix() == \"go\") {\n                m_updateFileNames.append(file);\n            }\n        }\n        foreach(QString file, project->filePathList()) {\n            QFileInfo info(file);\n            if (info.suffix() == \"go\") {\n                m_updateFilePaths.append(info.filePath());\n            }\n        }\n        QFileInfo info(project->filePath());\n        if (info.isDir()) {\n            m_workPath = info.filePath();\n        } else {\n            m_workPath = info.path();\n        }\n        m_process->setWorkingDirectory(m_workPath);\n        m_projectAstWidget->setWorkPath(m_workPath);\n        updateAst();\n    } else {\n        m_projectAstWidget->clear();\n    }\n    */\n}\n\nvoid GolangAst::loadProject(LiteApi::IProject *project)\n{\n    return;\n    m_updateFileNames.clear();\n    m_updateFilePaths.clear();\n    if (project) {\n        foreach(QString file, project->fileNameList()) {\n            if (QFileInfo(file).suffix() == \"go\") {\n                m_updateFileNames.append(file);\n            }\n        }\n        foreach(QString file, project->filePathList()) {\n            QFileInfo info(file);\n            if (info.suffix() == \"go\") {\n                m_updateFilePaths.append(info.filePath());\n            }\n        }\n        QFileInfo info(project->filePath());\n        if (info.isDir()) {\n            m_workPath = info.filePath();\n        } else {\n            m_workPath = info.path();\n        }\n        m_process->setWorkingDirectory(m_workPath);\n        m_projectAstWidget->setWorkPath(m_workPath);\n        updateAst();\n    } else {\n        m_projectAstWidget->clear();\n    }\n}\n\nvoid GolangAst::editorCreated(LiteApi::IEditor *editor)\n{\n    AstWidget *w = m_editorAstWidgetMap.value(editor);\n    if (w) {\n        return;\n    }\n    if (editor) {\n        QString fileName = editor->filePath();\n        if (!fileName.isEmpty()) {\n            QFileInfo info(fileName);\n            if (info.suffix() == \"go\") {\n                AstWidget *w = new AstWidget(true,m_liteApp);\n                w->setWorkPath(info.absolutePath());\n                m_stackedWidget->addWidget(w);\n                m_editorAstWidgetMap.insert(editor,w);\n            }\n        }\n    }\n}\n\nvoid GolangAst::editorAboutToClose(LiteApi::IEditor *editor)\n{\n    AstWidget *w = m_editorAstWidgetMap.value(editor);\n    if (w == 0) {\n        return;\n    }\n    m_stackedWidget->removeWidget(w);\n    m_editorAstWidgetMap.remove(editor);\n}\n\nvoid GolangAst::editorChanged(LiteApi::IEditor *editor)\n{\n    m_editorFileName.clear();\n    m_editorFilePath.clear();\n\n\n    if (m_currentPlainTextEditor) {\n        disconnect(m_currentPlainTextEditor,0,this,0);\n    }\n\n    m_currentEditor = editor;\n    m_currentPlainTextEditor = LiteApi::getPlainTextEdit(editor);\n    if (m_currentPlainTextEditor) {\n        connect(m_currentPlainTextEditor,SIGNAL(cursorPositionChanged()),this,SLOT(editorPositionChanged()));\n    }\n\n    AstWidget *w = m_editorAstWidgetMap.value(editor);\n    if (w) {\n        m_stackedWidget->setCurrentWidget(w);\n    } else {\n        m_stackedWidget->setCurrentWidget(m_blankWidget);\n    }\n    if (editor) {        \n        QString fileName = editor->filePath();\n        if (!fileName.isEmpty()) {\n            QFileInfo info(fileName);\n            m_workPath = info.absolutePath();\n            if (info.suffix() == \"go\") {\n                m_processFile->setWorkingDirectory(info.absolutePath());\n                m_editorFileName.append(info.fileName());\n                m_editorFilePath.append(info.filePath());\n                loadProjectPath(info.path());\n            }\n            updateAstFile();\n        }\n    }\n}\n\nvoid GolangAst::editorSaved(LiteApi::IEditor *editor)\n{\n    if (editor) {\n        QString fileName = editor->filePath();\n        QFileInfo info(fileName);\n        if (!fileName.isEmpty() && info.suffix() == \"go\") {\n            updateAstFile();\n            if (m_updateFilePaths.contains(info.filePath())) {\n                updateAst();\n            }\n        }\n    }\n}\n\nvoid GolangAst::updateAst()\n{\n    m_timer->start(1500);\n}\n\nvoid GolangAst::updateAstNow()\n{\n    if (m_timer->isActive()) {\n        m_timer->stop();\n    }\n    if (m_updateFileNames.isEmpty()) {\n        return;\n    }\n    QString cmd = LiteApi::getGotools(m_liteApp);\n    QStringList args;\n    args << \"astview\" << \"-end\";\n    args << \"-todo\";\n    args << \"-sep\" << m_astviewSep;\n    args << \"-tp\";\n    args << m_updateFileNames;\n    m_process->setEnvironment(LiteApi::getGoEnvironment(m_liteApp).toStringList());\n    m_process->start(cmd,args);\n}\n\nvoid GolangAst::updateAstFile()\n{\n    m_timerFile->start(1000);\n}\n\nvoid GolangAst::updateAstNowFile()\n{\n    if (m_timerFile->isActive()) {\n        m_timerFile->stop();\n    }\n    if (m_editorFileName.isEmpty()) {\n        return;\n    }\n    QString cmd = LiteApi::getGotools(m_liteApp);\n    QStringList args;\n    args << \"astview\" << \"-end\";\n    args << \"-todo\";\n    args << \"-outline\";\n    args << \"-sep\" << m_astviewSep;\n    args << \"-tp\";\n    args << m_editorFileName;\n    m_processFile->setEnvironment(LiteApi::getGoEnvironment(m_liteApp).toStringList());\n    m_processFile->start(cmd,args);\n}\n\nvoid GolangAst::syncClassView(bool b)\n{\n    m_isSyncClassView = b;\n    m_liteApp->settings()->setValue(GOLANGAST_CLASSVIEW_SYNCEDITOR,m_isSyncClassView);\n}\n\nvoid GolangAst::syncOutline(bool b)\n{\n    m_isSyncOutline = b;\n    m_liteApp->settings()->setValue(GOLANGAST_OUTLINE_SYNCEDITOR,m_isSyncOutline);\n}\n\nvoid GolangAst::editorPositionChanged()\n{\n    if (!m_currentEditor || !m_currentPlainTextEditor) {\n        return;\n    }\n    QTextCursor cursor = m_currentPlainTextEditor->textCursor();\n    if (m_isSyncClassView && m_classViewToolAct->isChecked()) {\n        m_projectAstWidget->trySyncIndex(m_currentEditor->filePath(),cursor.blockNumber(),cursor.positionInBlock());\n    }\n    if (m_isSyncOutline && m_outlineToolAct->isChecked()) {\n        AstWidget *w = m_editorAstWidgetMap.value(m_currentEditor);\n        if (w) {\n            w->trySyncIndex(m_currentEditor->filePath(),cursor.blockNumber(),cursor.positionInBlock());\n        }\n    }\n}\n\nvoid GolangAst::finishedProcess(int code,QProcess::ExitStatus status)\n{\n    if (code == 0 && status == QProcess::NormalExit) {\n       // if (m_liteApp->projectManager()->currentProject()) {\n        m_projectAstWidget->updateModel(m_process->readAllStandardOutput(),m_astviewSep);\n        if (m_isSyncClassView && m_currentPlainTextEditor) {\n            QTextCursor cursor = m_currentPlainTextEditor->textCursor();\n            m_projectAstWidget->trySyncIndex(m_currentEditor->filePath(),cursor.blockNumber(),cursor.positionInBlock());\n        }\n       // }\n    } else {\n        //qDebug() << m_process->readAllStandardError();\n    }\n}\n\nvoid GolangAst::finishedProcessFile(int code,QProcess::ExitStatus status)\n{\n    if (code == 0 && status == QProcess::NormalExit) {\n        if (m_currentEditor) {\n            AstWidget *w = m_editorAstWidgetMap.value(m_currentEditor);\n            if (w) {\n                w->updateModel(m_processFile->readAllStandardOutput(),m_astviewSep);\n                if (m_isSyncOutline && m_currentPlainTextEditor) {\n                    QTextCursor cursor = m_currentPlainTextEditor->textCursor();\n                    w->trySyncIndex(m_currentEditor->filePath(),cursor.blockNumber(),cursor.positionInBlock());\n                }\n            }\n        }\n    } else {\n        //qDebug() << m_process->readAllStandardError();\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangast.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangast.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGAST_H\n#define GOLANGAST_H\n\n#include \"liteapi/liteapi.h\"\n#include \"golangastapi/golangastapi.h\"\n#include \"symboltreeview/symboltreeview.h\"\n#include <QProcess>\n#include <QStandardItemModel>\n#include <QSortFilterProxyModel>\n\nclass QStackedWidget;\nclass AstWidget;\nclass QLabel;\n\nclass GolangAst : public LiteApi::IGolangAst\n{\n    Q_OBJECT\npublic:\n    explicit GolangAst(LiteApi::IApplication *app, QObject *parent = 0);\n    ~GolangAst();\n    virtual QIcon iconFromTag(const QString &tag, bool pub) const;\n    virtual QIcon iconFromTagEnum(LiteApi::ASTTAG_ENUM tag, bool pub) const;\npublic:\n    void setEnable(bool b);\n    void loadProject(LiteApi::IProject *project);\n    void loadProjectPath(const QString &path);\npublic slots:\n    void astProjectEnable(bool);\n    void astFileEnable(bool);\n    void projectReloaded();\n    void projectChanged(LiteApi::IProject*);\n    void editorCreated(LiteApi::IEditor*);\n    void editorAboutToClose(LiteApi::IEditor *editor);\n    void editorChanged(LiteApi::IEditor*);\n    void editorSaved(LiteApi::IEditor*);\n    void finishedProcess(int,QProcess::ExitStatus);\n    void finishedProcessFile(int,QProcess::ExitStatus);\n    void updateAst();\n    void updateAstNow();\n    void updateAstFile();\n    void updateAstNowFile();\n    void syncClassView(bool b);\n    void syncOutline(bool b);\n    void editorPositionChanged();\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QTimer  *m_timer;\n    QTimer  *m_timerFile;\n    QProcess *m_process;\n    QProcess *m_processFile;\n    QStringList m_updateFileNames;\n    QStringList m_updateFilePaths;\n    QString m_editorFileName;\n    QString m_editorFilePath;\n    QString m_workPath;\n    QStackedWidget *m_stackedWidget;\n    QLabel    *m_blankWidget;\n    AstWidget *m_projectAstWidget;\n    LiteApi::IEditor *m_currentEditor;\n    QPlainTextEdit   *m_currentPlainTextEditor;\n    QMap<LiteApi::IEditor*,AstWidget*> m_editorAstWidgetMap;\n    QAction *m_syncClassViewAct;\n    QAction *m_syncOutlineAct;\n    bool    m_isSyncClassView;\n    bool    m_isSyncOutline;\n    QByteArray m_astviewSep;\n    QAction *m_classViewToolAct;\n    QAction *m_outlineToolAct;\n};\n\n#endif // GOLANGAST_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangast.pro",
    "content": "TARGET = golangast\r\nTEMPLATE = lib\r\n\r\ninclude (../../liteideplugin.pri)\r\ninclude (../../api/golangastapi/golangastapi.pri)\r\ninclude (../../api/quickopenapi/quickopenapi.pri)\r\ninclude (../../api/liteenvapi/liteenvapi.pri)\r\ninclude (../../utils/symboltreeview/symboltreeview.pri)\r\ninclude (../../3rdparty/qtc_editutil/qtc_editutil.pri)\r\n\r\nDEFINES += GOLANGAST_LIBRARY\r\n\r\nSOURCES += golangastplugin.cpp \\\r\n    golangast.cpp \\\r\n    golangasticon.cpp \\\r\n    astwidget.cpp \\\r\n    golangsymbol.cpp \\\r\n    golangastoption.cpp \\\r\n    golangastoptionfactory.cpp\r\n\r\nHEADERS += golangastplugin.h\\\r\n        golangast_global.h \\\r\n    golangast.h \\\r\n    golangasticon.h \\\r\n    astwidget.h \\\r\n    golangastitem.h \\\r\n    golangsymbol.h \\\r\n    golangastoption.h \\\r\n    golangastoptionfactory.h\r\n\r\nRESOURCES += \\\r\n    golangast.qrc\r\n\r\nFORMS += \\\r\n    golangastoption.ui\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangast.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/golangast\">\n        <file>images/const.png</file>\n        <file>images/const_p.png</file>\n        <file>images/consts.png</file>\n        <file>images/file.png</file>\n        <file>images/func.png</file>\n        <file>images/func_p.png</file>\n        <file>images/funcs.png</file>\n        <file>images/gofile.png</file>\n        <file>images/interface.png</file>\n        <file>images/interface_p.png</file>\n        <file>images/makefile.png</file>\n        <file>images/package.png</file>\n        <file>images/project.png</file>\n        <file>images/struct.png</file>\n        <file>images/struct_p.png</file>\n        <file>images/type.png</file>\n        <file>images/type_p.png</file>\n        <file>images/var.png</file>\n        <file>images/var_p.png</file>\n        <file>images/vars.png</file>\n        <file>images/type_method.png</file>\n        <file>images/type_method_p.png</file>\n        <file>images/type_var_p.png</file>\n        <file>images/type_var.png</file>\n        <file>images/import.png</file>\n        <file>images/imports.png</file>\n        <file>images/type_factor.png</file>\n        <file>images/type_factor_p.png</file>\n        <file>images/todo.png</file>\n        <file>images/todos.png</file>\n    </qresource>\n</RCC>\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangast_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangast_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGAST_GLOBAL_H\n#define GOLANGAST_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(GOLANGAST_LIBRARY)\n#  define GOLANGASTSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define GOLANGASTSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#define OPTION_GOLANGAST \"option/golangast\"\n\n#define GOLANGAST_QUICKOPEN_SYMBOL_MATCHCASE \"golangast/quickopensymbolmatchcase\"\n#define GOLANGAST_QUICKOPNE_SYMBOL_IMPORTPATH \"golangast/quickopensymbolimportpath\"\n#define GOLANGAST_CLASSVIEW_SYNCEDITOR    \"golangast/classviewsynceditor\"\n#define GOLANGAST_OUTLINE_SYNCEDITOR       \"golangast/outlinesynceditor\"\n\n#endif // GOLANGAST_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangasticon.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangasticon.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangasticon.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\n/*\ntools/goastview/packageview.go\nconst (\n    tag_package      = \"p\"\n    tag_imports_folder\t = \"+m\"\n    tag_import\t\t = \"mm\"\n    tag_type         = \"t\"\n    tag_struct       = \"s\"\n    tag_interface    = \"i\"\n    tag_value        = \"v\"\n    tag_const        = \"c\"\n    tag_func         = \"f\"\n    tag_value_folder = \"+v\"\n    tag_const_folder = \"+c\"\n    tag_func_folder  = \"+f\"\n    tag_type_method  = \"tm\"\n    tag_type_factor  = \"tf\"\n    tag_type_value   = \"tv\"\n)\n*/\n\nGolangAstIconPublic::GolangAstIconPublic() :\n    iconPackage(QIcon(\"icon:golangast/images/package.png\")),\n    iconImport(QIcon(\"icon:golangast/images/import.png\")),\n    iconImports(QIcon(\"icon:golangast/images/imports.png\")),\n    iconType(QIcon(\"icon:golangast/images/type.png\")),\n    iconStruct(QIcon(\"icon:golangast/images/struct.png\")),\n    iconInterface(QIcon(\"icon:golangast/images/interface.png\")),\n    iconFunc(QIcon(\"icon:golangast/images/func.png\")),\n    iconFuncs(QIcon(\"icon:golangast/images/funcs.png\")),\n    iconVar(QIcon(\"icon:golangast/images/var.png\")),\n    iconVars(QIcon(\"icon:golangast/images/vars.png\")),\n    iconConst(QIcon(\"icon:golangast/images/const.png\")),\n    iconConsts(QIcon(\"icon:golangast/images/consts.png\")),\n    iconTypeMethod(QIcon(\"icon:golangast/images/type_method.png\")),\n    iconTypeFactor(QIcon(\"icon:golangast/images/type_factor.png\")),\n    iconTypeVar(QIcon(\"icon:golangast/images/type_var.png\")),\n    iconTodo(QIcon(\"icon:golangast/images/todo.png\")),\n    iconTodos(QIcon(\"icon:golangast/images/todos.png\")),\n    iconGofile(QIcon(\"icon:golangast/images/gofile.png\")),\n    iconMakefile(QIcon(\"icon:golangast/images/makefile.png\")),\n    iconProfile(QIcon(\"icon:golangast/images/project.png\"))\n{\n\n}\n\nQIcon GolangAstIconPublic::iconFromTag(const QString &tag) const\n{\n    if (tag == \"p\")\n        return iconPackage;\n    else if (tag == \"+m\")\n        return iconImports;\n    else if (tag == \"mm\")\n        return iconImport;\n    else if (tag == \"t\")\n        return iconType;\n    else if (tag == \"i\")\n        return iconInterface;\n    else if (tag == \"s\")\n        return iconStruct;\n    else if (tag == \"v\")\n        return iconVar;\n    else if (tag == \"c\")\n        return iconConst;\n    else if (tag == \"f\")\n        return iconFunc;\n    else if (tag == \"+v\")\n        return iconVars;\n    else if (tag == \"+c\")\n        return iconConsts;\n    else if (tag == \"+f\")\n        return iconFuncs;\n    else if (tag == \"tm\")\n        return iconTypeMethod;\n    else if (tag == \"tf\")\n        return iconTypeFactor;\n    else if (tag == \"tv\")\n        return iconTypeVar;\n    else if (tag == \"b\")\n        return iconTodo;\n    else if (tag == \"+b\")\n        return iconTodos;\n    return QIcon();\n}\n\nQIcon GolangAstIconPublic::iconFromTagEnum(LiteApi::ASTTAG_ENUM tag, bool) const\n{\n    if (tag == LiteApi::TagPackage)\n        return iconPackage;\n    else if (tag == LiteApi::TagImportFolder)\n        return iconImports;\n    else if (tag == LiteApi::TagImport)\n        return iconImport;\n    else if (tag == LiteApi::TagType)\n        return iconType;\n    else if (tag == LiteApi::TagInterface)\n        return iconInterface;\n    else if (tag == LiteApi::TagStruct)\n        return iconStruct;\n    else if (tag == LiteApi::TagValue)\n        return iconVar;\n    else if (tag == LiteApi::TagConst)\n        return iconConst;\n    else if (tag == LiteApi::TagFunc)\n        return iconFunc;\n    else if (tag == LiteApi::TagValueFolder)\n        return iconVars;\n    else if (tag == LiteApi::TagConstFolder)\n        return iconConsts;\n    else if (tag == LiteApi::TagFuncFolder)\n        return iconFuncs;\n    else if (tag == LiteApi::TagTypeMethod)\n        return iconTypeMethod;\n    else if (tag == LiteApi::TagTypeFactor)\n        return iconTypeFactor;\n    else if (tag == LiteApi::TagTypeValue)\n        return iconTypeVar;\n    else if (tag == LiteApi::TagTodo)\n        return iconTodo;\n    else if (tag == LiteApi::TagTodoFolder)\n        return iconTodos;\n    return QIcon();\n}\n\nGolangAstIconPrivate::GolangAstIconPrivate() :\n    iconPackage(QIcon(\"icon:golangast/images/package.png\")),\n    iconImport(QIcon(\"icon:golangast/images/import.png\")),\n    iconImports(QIcon(\"icon:golangast/images/imports.png\")),\n    iconType(QIcon(\"icon:golangast/images/type_p.png\")),\n    iconStruct(QIcon(\"icon:golangast/images/struct_p.png\")),\n    iconInterface(QIcon(\"icon:golangast/images/interface_p.png\")),\n    iconFunc(QIcon(\"icon:golangast/images/func_p.png\")),\n    iconFuncs(QIcon(\"icon:golangast/images/funcs.png\")),\n    iconVar(QIcon(\"icon:golangast/images/var_p.png\")),\n    iconVars(QIcon(\"icon:golangast/images/vars.png\")),\n    iconConst(QIcon(\"icon:golangast/images/const_p.png\")),\n    iconConsts(QIcon(\"icon:golangast/images/consts.png\")),\n    iconTypeMethod(QIcon(\"icon:golangast/images/type_method_p.png\")),\n    iconTypeFactor(QIcon(\"icon:golangast/images/type_factor_p.png\")),\n    iconTypeVar(QIcon(\"icon:golangast/images/type_var_p.png\")),\n    iconTodo(QIcon(\"icon:golangast/images/todo.png\")),\n    iconTodos(QIcon(\"icon:golangast/images/todos.png\"))\n{\n\n}\n\nQIcon GolangAstIconPrivate::iconFromTag(const QString &tag) const\n{\n    if (tag == \"p\")\n        return iconPackage;\n    else if (tag == \"+m\")\n        return iconImports;\n    else if (tag == \"mm\")\n        return iconImport;\n    else if (tag == \"t\")\n        return iconType;\n    else if (tag == \"i\")\n        return iconInterface;\n    else if (tag == \"s\")\n        return iconStruct;\n    else if (tag == \"v\")\n        return iconVar;\n    else if (tag == \"c\")\n        return iconConst;\n    else if (tag == \"f\")\n        return iconFunc;\n    else if (tag == \"+v\")\n        return iconVars;\n    else if (tag == \"+c\")\n        return iconConsts;\n    else if (tag == \"+f\")\n        return iconFuncs;\n    else if (tag == \"tm\")\n        return iconTypeMethod;\n    else if (tag == \"tf\")\n        return iconTypeFactor;\n    else if (tag == \"tv\")\n        return iconTypeVar;\n    else if (tag == \"b\")\n        return iconTodo;\n    else if (tag == \"+b\")\n        return iconTodos;\n    return QIcon();\n}\n\nQIcon GolangAstIconPrivate::iconFromTagEnum(LiteApi::ASTTAG_ENUM tag, bool) const\n{\n    if (tag == LiteApi::TagPackage)\n        return iconPackage;\n    else if (tag == LiteApi::TagImportFolder)\n        return iconImports;\n    else if (tag == LiteApi::TagImport)\n        return iconImport;\n    else if (tag == LiteApi::TagType)\n        return iconType;\n    else if (tag == LiteApi::TagInterface)\n        return iconInterface;\n    else if (tag == LiteApi::TagStruct)\n        return iconStruct;\n    else if (tag == LiteApi::TagValue)\n        return iconVar;\n    else if (tag == LiteApi::TagConst)\n        return iconConst;\n    else if (tag == LiteApi::TagFunc)\n        return iconFunc;\n    else if (tag == LiteApi::TagValueFolder)\n        return iconVars;\n    else if (tag == LiteApi::TagConstFolder)\n        return iconConsts;\n    else if (tag == LiteApi::TagFuncFolder)\n        return iconFuncs;\n    else if (tag == LiteApi::TagTypeMethod)\n        return iconTypeMethod;\n    else if (tag == LiteApi::TagTypeFactor)\n        return iconTypeFactor;\n    else if (tag == LiteApi::TagTypeValue)\n        return iconTypeVar;\n    else if (tag == LiteApi::TagTodo)\n        return iconTodo;\n    else if (tag == LiteApi::TagTodoFolder)\n        return iconTodos;\n    return QIcon();\n}\n\nGolangAstIcon::GolangAstIcon()\n{\n}\n\nGolangAstIcon *GolangAstIcon::instance()\n{\n    static GolangAstIcon icons;\n    return &icons;\n}\n\nQIcon GolangAstIcon::iconFromTag(const QString &tag, bool pub) const\n{\n    if (pub) {\n        return icons.iconFromTag(tag);\n    }\n    return icons_p.iconFromTag(tag);\n}\n\nQIcon GolangAstIcon::iconFromTagEnum(LiteApi::ASTTAG_ENUM tag, bool pub) const\n{\n    if (pub) {\n        return icons.iconFromTagEnum(tag);\n    }\n    return icons_p.iconFromTagEnum(tag);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangasticon.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangasticon.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGASTICON_H\n#define GOLANGASTICON_H\n\n#include <QIcon>\n#include \"golangastapi/golangastapi.h\"\n\nclass GolangAstIconPublic\n{\npublic:\n    GolangAstIconPublic();\n    QIcon iconFromTag(const QString &tag) const;\n    QIcon iconFromTagEnum(LiteApi::ASTTAG_ENUM tag, bool pub = true) const;\nprotected:\n    QIcon   iconPackage;\n    QIcon   iconImport;\n    QIcon   iconImports;\n    QIcon   iconType;\n    QIcon   iconStruct;\n    QIcon   iconInterface;\n    QIcon   iconFunc;\n    QIcon   iconFuncs;\n    QIcon   iconVar;\n    QIcon   iconVars;\n    QIcon   iconConst;\n    QIcon   iconConsts;\n    QIcon   iconTypeMethod;\n    QIcon   iconTypeFactor;\n    QIcon   iconTypeVar;\n    QIcon   iconTodo;\n    QIcon   iconTodos;\npublic:\n    QIcon   iconGofile;\n    QIcon   iconMakefile;\n    QIcon   iconProfile;\n};\n\nclass GolangAstIconPrivate\n{\npublic:\n    GolangAstIconPrivate();\n    QIcon iconFromTag(const QString &tag) const;\n    QIcon iconFromTagEnum(LiteApi::ASTTAG_ENUM tag, bool pub = true) const;\nprotected:\n    QIcon   iconPackage;\n    QIcon   iconImport;\n    QIcon   iconImports;\n    QIcon   iconType;\n    QIcon   iconStruct;\n    QIcon   iconInterface;\n    QIcon   iconFunc;\n    QIcon   iconFuncs;\n    QIcon   iconVar;\n    QIcon   iconVars;\n    QIcon   iconConst;\n    QIcon   iconConsts;\n    QIcon   iconTypeMethod;\n    QIcon   iconTypeFactor;\n    QIcon   iconTypeVar;\n    QIcon   iconTodo;\n    QIcon   iconTodos;\n};\n\nclass GolangAstIcon\n{\npublic:\n    static GolangAstIcon *instance();\n    QIcon iconFromTag(const QString &tag, bool pub = true) const;\n    QIcon iconFromTagEnum(LiteApi::ASTTAG_ENUM tag, bool pub = true) const;\nprotected:\n    GolangAstIcon();\n    GolangAstIconPrivate icons_p;\n    GolangAstIconPublic  icons;\n};\n\n#endif // GOLANGASTICON_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangastitem.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangastitem.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGASTITEM_H\n#define GOLANGASTITEM_H\n\n#include <QStandardItem>\n#include \"golangastapi/golangastapi.h\"\n\nstruct AstItemPos {\n    QString fileName;\n    int     line;\n    int     column;\n    int     endLine;\n    int     endColumn;\n};\n\nclass GolangAstItem : public QStandardItem\n{\npublic:\n    QList<AstItemPos>   m_posList;\n    QString             m_tagName;\n    QString             m_tipInfo;\n    LiteApi::ASTTAG_ENUM m_tagFlag;\npublic:\n    bool hasChildItem() const {\n        switch (m_tagFlag) {\n        case LiteApi::TagPackage:\n        case LiteApi::TagConstFolder:\n        case LiteApi::TagValueFolder:\n        case LiteApi::TagImportFolder:\n        case LiteApi::TagFuncFolder:\n        case LiteApi::TagTodoFolder:\n        case LiteApi::TagStruct:\n        case LiteApi::TagInterface:\n        case LiteApi::TagType:\n            return true;\n        default:\n            return false;\n        }\n        return false;\n    }\n    bool isFolder() const {\n        switch (m_tagFlag) {\n        case LiteApi::TagConstFolder:\n        case LiteApi::TagValueFolder:\n        case LiteApi::TagImportFolder:\n        case LiteApi::TagFuncFolder:\n        case LiteApi::TagTodoFolder:\n            return true;\n        default:\n            return false;\n        }\n        return false;\n    }\n};\n\n#endif // GOLANGASTITEM_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangastoption.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: golangastoption.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"golangastoption.h\"\r\n#include \"ui_golangastoption.h\"\r\n#include \"golangast_global.h\"\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nGolangAstOption::GolangAstOption(LiteApi::IApplication *app,QObject *parent) :\r\n    LiteApi::IOption(parent),\r\n    m_liteApp(app),\r\n    m_widget(new QWidget),\r\n    ui(new Ui::GolangAstOption)\r\n{\r\n    ui->setupUi(m_widget);\r\n}\r\n\r\nGolangAstOption::~GolangAstOption()\r\n{\r\n    delete m_widget;\r\n    delete ui;\r\n}\r\n\r\nQWidget *GolangAstOption::widget()\r\n{\r\n    return m_widget;\r\n}\r\n\r\nQString GolangAstOption::name() const\r\n{\r\n    return \"GolangAst\";\r\n}\r\n\r\nQString GolangAstOption::mimeType() const\r\n{\r\n    return OPTION_GOLANGAST;\r\n}\r\n\r\nvoid GolangAstOption::load()\r\n{\r\n    ui->checkQuickSymbolImportPath->setChecked(m_liteApp->settings()->value(GOLANGAST_QUICKOPNE_SYMBOL_IMPORTPATH,true).toBool());\r\n    ui->checkQuickSymbolMatchCase->setChecked(m_liteApp->settings()->value(GOLANGAST_QUICKOPEN_SYMBOL_MATCHCASE,false).toBool());\r\n}\r\n\r\nvoid GolangAstOption::save()\r\n{\r\n    m_liteApp->settings()->setValue(GOLANGAST_QUICKOPNE_SYMBOL_IMPORTPATH,ui->checkQuickSymbolImportPath->isChecked());\r\n    m_liteApp->settings()->setValue(GOLANGAST_QUICKOPEN_SYMBOL_MATCHCASE,ui->checkQuickSymbolMatchCase->isChecked());\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangastoption.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: golangastoption.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef GOLANGASTOPTION_H\r\n#define GOLANGASTOPTION_H\r\n\r\n#include \"liteapi/liteapi.h\"\r\n\r\nnamespace Ui {\r\n    class GolangAstOption;\r\n}\r\n\r\nclass GolangAstOption : public LiteApi::IOption\r\n{\r\n    Q_OBJECT\r\n\r\npublic:\r\n    explicit GolangAstOption(LiteApi::IApplication *app, QObject *parent = 0);\r\n    ~GolangAstOption();\r\n    virtual QWidget *widget();\r\n    virtual QString name() const;\r\n    virtual QString mimeType() const;\r\n    virtual void load();\r\n    virtual void save();\r\nprivate:\r\n    LiteApi::IApplication   *m_liteApp;\r\n    QWidget           *m_widget;\r\n    Ui::GolangAstOption *ui;\r\n};\r\n\r\n#endif // GOLANGASTOPTION_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangastoption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>GolangAstOption</class>\n <widget class=\"QWidget\" name=\"GolangAstOption\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>400</width>\n    <height>121</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox\">\n     <property name=\"title\">\n      <string>QuickOpenSymbol</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n      <item>\n       <widget class=\"QCheckBox\" name=\"checkQuickSymbolImportPath\">\n        <property name=\"text\">\n         <string>Show import path</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QCheckBox\" name=\"checkQuickSymbolMatchCase\">\n        <property name=\"text\">\n         <string>Match case sensitive</string>\n        </property>\n       </widget>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <spacer name=\"verticalSpacer\">\n     <property name=\"orientation\">\n      <enum>Qt::Vertical</enum>\n     </property>\n     <property name=\"sizeHint\" stdset=\"0\">\n      <size>\n       <width>20</width>\n       <height>24</height>\n      </size>\n     </property>\n    </spacer>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangastoptionfactory.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: golangastoptionfactory.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"golangastoption.h\"\r\n#include \"golangastoptionfactory.h\"\r\n#include \"golangast_global.h\"\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nGolangAstOptionFactory::GolangAstOptionFactory(LiteApi::IApplication *app, QObject *parent)\r\n    : LiteApi::IOptionFactory(parent),\r\n      m_liteApp(app)\r\n{\r\n}\r\n\r\nQStringList GolangAstOptionFactory::mimeTypes() const\r\n{\r\n    return QStringList() << OPTION_GOLANGAST;\r\n}\r\n\r\nLiteApi::IOption *GolangAstOptionFactory::create(const QString &mimeType)\r\n{\r\n    if (mimeType == OPTION_GOLANGAST) {\r\n        return new GolangAstOption(m_liteApp,this);\r\n    }\r\n    return 0;\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangastoptionfactory.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: golangastoptionfactory.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef GOLANGASTOPTIONFACTORY_H\r\n#define GOLANGASTOPTIONFACTORY_H\r\n\r\n#include \"liteapi/liteapi.h\"\r\n\r\nclass GolangAstOptionFactory : public LiteApi::IOptionFactory\r\n{\r\npublic:\r\n    GolangAstOptionFactory(LiteApi::IApplication *app, QObject *parent);\r\n    virtual QStringList mimeTypes() const;\r\n    virtual LiteApi::IOption *create(const QString &mimeType);\r\nprotected:\r\n    LiteApi::IApplication *m_liteApp;\r\n};\r\n\r\n#endif // GOLANGASTOPTIONFACTORY_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangastplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangastplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangastplugin.h\"\n#include \"golangsymbol.h\"\n#include \"golangastoptionfactory.h\"\n#include <QAction>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nGolangAstPlugin::GolangAstPlugin()\n{\n}\n\nbool GolangAstPlugin::load(LiteApi::IApplication *app)\n{\n    new GolangAst(app,this);\n    LiteApi::IQuickOpenManager *mgr = LiteApi::getQuickOpenManager(app);\n    if (mgr) {\n        LiteApi::IQuickOpenMimeType *symbol = mgr->registerQuickOpenMimeType(\"@\");\n        if (symbol) {\n            symbol->addAdapter(new GolangSymbolFactory(app,this));\n        }\n    }\n    app->optionManager()->addFactory(new GolangAstOptionFactory(app,this));\n    return true;\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangastplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangastplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGASTPLUGIN_H\n#define GOLANGASTPLUGIN_H\n\n#include \"golangast_global.h\"\n#include \"liteapi/liteapi.h\"\n#include \"golangast.h\"\n#include <QtPlugin>\n\nclass GolangAstPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    GolangAstPlugin();\n    virtual bool load(LiteApi::IApplication *app);\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<GolangAstPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.GolangAstPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/golangast\");\n        m_info->setName(\"GolangAst\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setVer(\"X35\");\n        m_info->setInfo(\"Golang Ast View\");\n        m_info->appendDepend(\"plugin/quickopen\");\n        m_info->appendDepend(\"plugin/liteenv\");\n    }\n};\n\n#endif // GOLANGASTPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangsymbol.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: golangsymbol.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"golangsymbol.h\"\r\n#include \"astwidget.h\"\r\n#include \"golangastitem.h\"\r\n#include \"golangast_global.h\"\r\n#include <liteenvapi/liteenvapi.h>\r\n#include <QStandardItemModel>\r\n#include <QSortFilterProxyModel>\r\n#include <QProcess>\r\n#include <QFileInfo>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nGolangSymbol::GolangSymbol(LiteApi::IApplication *app, QObject *parent)\r\n    : LiteApi::IQuickOpen(parent), m_liteApp(app)\r\n{\r\n    m_model = new QStandardItemModel(this);\r\n    m_proxy = new QSortFilterProxyModel(this);\r\n    m_proxy->setSourceModel(m_model);\r\n    m_process = new QProcess(this);\r\n    connect(m_process,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(finished(int,QProcess::ExitStatus)));\r\n    m_matchCase = Qt::CaseInsensitive;\r\n    m_importPath = true;\r\n    m_astviewSep = \",,,\";\r\n}\r\n\r\nQString GolangSymbol::id() const\r\n{\r\n    return \"quickopen/golangsymbol\";\r\n}\r\n\r\nQString GolangSymbol::info() const\r\n{\r\n    return tr(\"Quick Open Symbol by Name\");\r\n}\r\n\r\nQString GolangSymbol::placeholderText() const\r\n{\r\n    return QString();\r\n}\r\n\r\nvoid GolangSymbol::activate()\r\n{\r\n   // m_liteApp->editorManager()->addNavigationHistory();\r\n}\r\n\r\nQAbstractItemModel *GolangSymbol::model() const\r\n{\r\n    return m_proxy;\r\n}\r\n\r\nQModelIndex GolangSymbol::rootIndex() const\r\n{\r\n    return QModelIndex();\r\n}\r\n\r\nvoid GolangSymbol::updateModel()\r\n{\r\n    m_matchCase = m_liteApp->settings()->value(GOLANGAST_QUICKOPEN_SYMBOL_MATCHCASE,false).toBool()?Qt::CaseSensitive:Qt::CaseInsensitive;\r\n    m_importPath = m_liteApp->settings()->value(GOLANGAST_QUICKOPNE_SYMBOL_IMPORTPATH,true).toBool();\r\n\r\n    m_model->clear();\r\n    m_proxy->setFilterCaseSensitivity(m_matchCase);\r\n\r\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\r\n    if (!editor) {\r\n        return;\r\n    }\r\n    QString filePath = editor->filePath();\r\n    if (filePath.isEmpty()) {\r\n        return;\r\n    }\r\n    QFileInfo info(filePath);\r\n\r\n    QString cmd = LiteApi::getGotools(m_liteApp);\r\n    QStringList args;\r\n    args << \"astview\";\r\n    args << \"-outline\";\r\n    args << \"-sep\" << m_astviewSep;\r\n    args << \"-tp\";\r\n    args << info.fileName();\r\n    m_process->setWorkingDirectory(info.path());\r\n    m_process->setEnvironment(LiteApi::getGoEnvironment(m_liteApp).toStringList());\r\n    m_process->start(cmd,args);\r\n}\r\n\r\nQModelIndex GolangSymbol::filterChanged(const QString &text)\r\n{\r\n    m_proxy->setFilterFixedString(text);\r\n\r\n    for (int i = 0; i < m_proxy->rowCount(); i++) {\r\n        QModelIndex index = m_proxy->index(i,0);\r\n        if (index.data().toString().startsWith(text,m_matchCase)) {\r\n            gotoIndex(index,false);\r\n            return index;\r\n        }\r\n    }\r\n    return m_proxy->index(0,0);\r\n}\r\n\r\nbool GolangSymbol::gotoIndex(const QModelIndex &index,bool saveHistroy)\r\n{\r\n    QModelIndex i = m_proxy->mapToSource(index);\r\n    if (!i.isValid()) {\r\n        return false;\r\n    }\r\n    GolangAstItem* item = (GolangAstItem*)m_model->itemFromIndex(i);\r\n    if (item->m_posList.isEmpty()) {\r\n         return false;\r\n    }\r\n    AstItemPos pos = item->m_posList.at(0);\r\n    QFileInfo info(QDir(m_process->workingDirectory()),pos.fileName);\r\n    LiteApi::gotoLine(m_liteApp,info.filePath(),pos.line-1,pos.column-1,true,saveHistroy);\r\n    return true;\r\n}\r\n\r\nvoid GolangSymbol::indexChanged(const QModelIndex &index)\r\n{\r\n    gotoIndex(index,false);\r\n}\r\n\r\nbool GolangSymbol::selected(const QString &/*text*/, const QModelIndex &index)\r\n{\r\n    return gotoIndex(index,false);\r\n}\r\n\r\nvoid GolangSymbol::cancel()\r\n{\r\n\r\n}\r\n\r\nvoid GolangSymbol::finished(int code, QProcess::ExitStatus status)\r\n{\r\n    if (code == 0 && status == QProcess::NormalExit) {\r\n        QByteArray ar = m_process->readAll();\r\n        AstWidget::parserModel(m_model,ar,m_astviewSep,true,!m_importPath);\r\n        LiteApi::IQuickOpenManager *mgr = LiteApi::getQuickOpenManager(m_liteApp);\r\n        if (mgr) {\r\n            mgr->modelView()->expandAll();\r\n        }\r\n    }\r\n}\r\n\r\nGolangSymbolFactory::GolangSymbolFactory(LiteApi::IApplication *app, QObject *parent)\r\n    : LiteApi::IQuickOpenAdapter(parent), m_liteApp(app)\r\n{\r\n    m_symbol = new GolangSymbol(app,this);\r\n}\r\n\r\nQStringList GolangSymbolFactory::mimeTypes() const\r\n{\r\n    return QStringList() << \"text/x-gosrc\";\r\n}\r\n\r\nLiteApi::IQuickOpen *GolangSymbolFactory::load(const QString &mimeType)\r\n{\r\n    if (mimeType == \"text/x-gosrc\") {\r\n        return m_symbol;\r\n    }\r\n    return 0;\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangast/golangsymbol.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: golangsymbol.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef GOLANGSYMBOL_H\r\n#define GOLANGSYMBOL_H\r\n\r\n#include <quickopenapi/quickopenapi.h>\r\n#include <QProcess>\r\n\r\nclass QStandardItemModel;\r\nclass QSortFilterProxyModel;\r\nclass QProcess;\r\nclass GolangSymbol : public LiteApi::IQuickOpen\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    GolangSymbol(LiteApi::IApplication *app, QObject *parent = 0);\r\n    virtual QString id() const;\r\n    virtual QString info() const;\r\n    virtual QString placeholderText() const;\r\n    virtual void activate();\r\n    virtual QAbstractItemModel *model() const;\r\n    virtual QModelIndex rootIndex() const;\r\n    virtual void updateModel();\r\n    virtual QModelIndex filterChanged(const QString &text);\r\n    virtual void indexChanged(const QModelIndex &index);\r\n    virtual bool selected(const QString &text, const QModelIndex &index);\r\n    virtual void cancel();\r\n    bool gotoIndex(const QModelIndex &index, bool saveHistroy);\r\npublic slots:\r\n    void finished(int code,QProcess::ExitStatus status);\r\nprotected:\r\n    LiteApi::IApplication *m_liteApp;\r\n    QStandardItemModel    *m_model;\r\n    QSortFilterProxyModel *m_proxy;\r\n    QProcess              *m_process;\r\n    Qt::CaseSensitivity    m_matchCase;\r\n    QByteArray             m_astviewSep;\r\n    bool                   m_importPath;\r\n};\r\n\r\nclass GolangSymbolFactory : public LiteApi::IQuickOpenAdapter\r\n{\r\npublic:\r\n    GolangSymbolFactory(LiteApi::IApplication *app, QObject *parent = 0);\r\n    virtual QStringList mimeTypes() const;\r\n    virtual LiteApi::IQuickOpen *load(const QString &mimeType);\r\nprotected:\r\n    LiteApi::IApplication *m_liteApp;\r\n    GolangSymbol          *m_symbol;\r\n};\r\n\r\n#endif // GOLANGSYMBOL_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangcode/golangcode.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangcode.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangcode.h\"\n#include \"golangcode_global.h\"\n#include \"fileutil/fileutil.h\"\n#include \"processex/processex.h\"\n#include \"../liteeditor/faketooltip.h\"\n#include <QProcess>\n#include <QTextDocument>\n#include <QAbstractItemView>\n#include <QApplication>\n#include <QDesktopWidget>\n#include <QLabel>\n#include <QHBoxLayout>\n#include <QPlainTextEdit>\n#include <QTimer>\n#include <QScrollBar>\n#include <QDebug>\n\n//#define GOCODE_CHECKGOPATH\n\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nint GolangCode::g_gocodeInstCount = 0;\n\nGolangCode::GolangCode(LiteApi::IApplication *app, QObject *parent) :\n    QObject(parent),\n    m_liteApp(app),\n    m_editor(0),\n    m_completer(0),\n    m_closeOnExit(true),\n    m_allImportHint(true)\n{\n    g_gocodeInstCount++;\n    m_gocodeProcess = new Process(this);\n    m_gocodeSetProcess = new Process(this);\n    m_gocodeImportProcess = new Process(this);\n//    m_importProcess = new Process(this);\n    m_gocodeProcess->setWorkingDirectory(m_liteApp->applicationPath());\n    m_gocodeSetProcess->setWorkingDirectory(m_liteApp->applicationPath());\n    m_gocodeImportProcess->setWorkingDirectory(m_liteApp->applicationPath());\n    connect(m_gocodeProcess,SIGNAL(started()),this,SLOT(started()));\n    connect(m_gocodeProcess,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(finished(int,QProcess::ExitStatus)));\n    connect(m_gocodeImportProcess,SIGNAL(started()),this,SLOT(gocodeImportStarted()));\n    connect(m_gocodeImportProcess,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(gocodeImportFinished(int,QProcess::ExitStatus)));\n//    connect(m_importProcess,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(importFinished(int,QProcess::ExitStatus)));\n    m_envManager = LiteApi::getEnvManager(m_liteApp);\n    if (m_envManager) {\n        connect(m_envManager,SIGNAL(currentEnvChanged(LiteApi::IEnv*)),this,SLOT(currentEnvChanged(LiteApi::IEnv*)));\n    }\n    m_golangAst = LiteApi::findExtensionObject<LiteApi::IGolangAst*>(m_liteApp,\"LiteApi.IGolangAst\");\n    m_pkgImportTip = new ImportPkgTip(m_liteApp,this);\n    connect(m_pkgImportTip,SIGNAL(import(QString,int)),this,SLOT(import(QString,int)));\n    connect(m_liteApp->editorManager(),SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(currentEditorChanged(LiteApi::IEditor*)));\n    connect(m_liteApp->optionManager(),SIGNAL(applyOption(QString)),this,SLOT(applyOption(QString)));\n    connect(m_liteApp,SIGNAL(loaded()),this,SLOT(appLoaded()));\n    //applyOption(\"option/golangcode\");\n}\n\nvoid GolangCode::applyOption(QString /*id*/)\n{\n//    if (id != \"option/golangcode\") return;\n//    m_closeOnExit = m_liteApp->settings()->value(GOLANGCODE_EXITCLOSE,true).toBool();\n//    m_allImportHint = m_liteApp->settings()->value(GOLANGCODE_IMPORTHINT_GOPATH,true).toBool();\n}\n\nvoid GolangCode::appLoaded()\n{\n    loadPkgList();\n#ifdef GOCODE_CHECKGOPATH\n    LiteApi::IGoEnvManger *goEnv = LiteApi::getGoEnvManager(m_liteApp);\n    if (goEnv) {\n        connect(goEnv,SIGNAL(customGOPATHChanged(QString)),this,SLOT(customGOPATHChanged(QString)));\n        connect(goEnv,SIGNAL(globalGOPATHChanged()),this,SLOT(globalGOPATHChanged()));\n    }\n#endif\n}\n\nvoid GolangCode::import(const QString &import, int startPos)\n{\n    QPlainTextEdit *ed = LiteApi::getPlainTextEdit(m_editor);\n    if (!ed) {\n        return;\n    }\n    QTextBlock block = ed->document()->firstBlock();\n    int pos1 = -1;\n    int pos2 = -1;\n    int pos3 = -1;\n    int pos4 = -1;\n    int offset = 0;\n    while (block.isValid()) {\n        QString text = block.text();\n        if (text.startsWith(\"/*\")) {\n            block = block.next();\n            while(block.isValid()) {\n                if (block.text().endsWith(\"*/\")) {\n                    break;\n                }\n                block = block.next();\n            }\n            if (!block.isValid()) {\n                break;\n            }\n        } else if (text.startsWith(\"var\")) {\n            break;\n        } else if (text.startsWith(\"func\")) {\n            break;\n        } else if (text.startsWith(\"package \")) {\n            pos1 = block.position()+block.length();\n        } else if (pos1 != -1 && text.startsWith(\"import (\")) {\n            pos2 = block.position()+block.length();\n            break;\n        } else if (pos1 != -1 && text.startsWith(\"import \")) {\n            QString path = text.right(text.length()-7).trimmed();\n            if (!path.startsWith(\"\\\"C\\\"\")) {\n                pos3 = block.position()+ 7;\n                pos4 = block.position()+block.length();\n                break;\n            }\n        }\n        block = block.next();\n    }\n    if (pos1 < 0) {\n        return;\n    }\n    QString text = \"\\t\\\"\"+import+\"\\\"\\n\";\n    QTextCursor cur = ed->textCursor();\n    int orgPos = cur.position();\n    cur.beginEditBlock();\n    if (pos2 < 0) {\n        if (pos3 < 0) {\n            pos2 = pos1;\n            text = \"\\nimport (\\n\\t\\\"\"+import+\"\\\"\\n)\\n\";\n        } else {\n            cur.setPosition(pos3);\n            cur.insertText(\"(\\n\\t\");\n            pos2 = pos4+3;\n            offset += 3;\n            text = \"\\t\\\"\"+import+\"\\\"\\n)\\n\";\n        }\n    }\n    cur.setPosition(pos2);\n    cur.insertText(text);\n    cur.setPosition(orgPos+text.length()+offset);\n    cur.endEditBlock();\n    ed->setTextCursor(cur);\n    if (orgPos == startPos) {\n        prefixChanged(cur,m_lastPrefix,true);\n    }\n}\n\nbool check_import(const QString &path, const QString &id)\n{\n    int start = path.indexOf(\"\\\"\");\n    if (start >= 0) {\n        int end = path.indexOf(\"\\\"\",start+1);\n        if (end > 0) {\n            QString name = path.left(start).trimmed();\n            if (!name.isEmpty()) {\n                if (name == id) {\n                    return true;\n                }\n            } else {\n                QString tmp = path.mid(start+1,end-start-1);\n                if (tmp == id) {\n                    return true;\n                }\n                if (tmp.endsWith(\"/\"+id)) {\n                    return true;\n                }\n            }\n        }\n    }\n    return  false;\n}\n\nbool GolangCode::findImport(const QString &id)\n{\n    QPlainTextEdit *ed = LiteApi::getPlainTextEdit(m_editor);\n    if (!ed) {\n        return false;\n    }\n    QTextBlock block = ed->document()->firstBlock();\n    int pos1 = -1;\n    while (block.isValid()) {\n        QString text = block.text().trimmed();\n        if (text.startsWith(\"/*\")) {\n            block = block.next();\n            while(block.isValid()) {\n                if (block.text().endsWith(\"*/\")) {\n                    break;\n                }\n                block = block.next();\n            }\n            if (!block.isValid()) {\n                break;\n            }\n        } else if (text.startsWith(\"var\")) {\n            break;\n        } else if (text.startsWith(\"func\")) {\n            break;\n        } else if (text.startsWith(\"package \")) {\n            pos1 = block.position()+block.length();\n        } else if (pos1 != -1 && text.startsWith(\"import (\")) {\n            block = block.next();\n            while(block.isValid()) {\n                QString text = block.text().trimmed();\n                if (text.startsWith(\")\")) {\n                    break;\n                }\n                //skip\n                if (text.startsWith(\"/*\")) {\n                    block = block.next();\n                    while(block.isValid()) {\n                        if (block.text().endsWith(\"*/\")) {\n                            break;\n                        }\n                        block = block.next();\n                    }\n                    if (!block.isValid()) {\n                        break;\n                    }\n                }\n                if (text.startsWith(\"//\")) {\n                    block = block.next();\n                    continue;\n                }\n                if (check_import(text,id)) {\n                    return true;\n                }\n                block = block.next();\n            }\n        } else if (pos1 != -1 && text.startsWith(\"import \")) {\n            QString path = text.right(text.length()-7);\n            if (check_import(path,id)) {\n                return true;\n            }\n        }\n        block = block.next();\n    }\n    return false;\n}\n\nvoid GolangCode::updateEditorGOPATH()\n{\n    if (m_gocodeCmd.isEmpty()) {\n        return;\n    }\n #ifdef GOCODE_CHECKGOPATH\n    QProcessEnvironment env = LiteApi::getCustomGoEnvironment(m_liteApp,m_liteApp->editorManager()->currentEditor());\n    QString gopathenv = env.value(\"GOPATH\");\n    if (gopathenv != m_lastGopathEnv) {\n        m_lastGopathEnv = gopathenv;\n        gocodeUpdataLibpath(env);\n        loadImportsList(env);\n        m_liteApp->appendLog(\"GolangCode\",QString(\"gocode set lib-path \\\"%1\\\"\").arg(gopathenv),false);\n    }\n#else\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\n#endif\n    if (!m_gocodeImportProcess->isStop()) {\n        m_gocodeImportProcess->stop(10);\n    }\n    QStringList args;\n    args << \"-f\" << \"csv\" << \"autocomplete\" << \"main.go\" << \"21\";\n    m_gocodeImportProcess->setProcessEnvironment(env);\n    m_gocodeImportProcess->setWorkingDirectory(m_fileInfo.absolutePath());\n    m_gocodeImportProcess->startEx(m_gocodeCmd,args);\n}\n\nvoid GolangCode::customGOPATHChanged(const QString &/*buildPath*/)\n{\n    updateEditorGOPATH();\n}\n\nvoid GolangCode::globalGOPATHChanged()\n{\n    updateEditorGOPATH();\n}\n\nvoid GolangCode::broadcast(QString /*module*/,QString /*id*/,QString)\n{\n//    if (module == \"golangpackage\" && id == \"reloadgopath\") {\n//        resetGocode();\n//    }\n}\n\nGolangCode::~GolangCode()\n{\n    delete m_gocodeProcess;\n    delete m_gocodeSetProcess;\n//    delete m_importProcess;\n    delete m_gocodeImportProcess;\n    g_gocodeInstCount--;\n    if (g_gocodeInstCount == 0 && m_closeOnExit && !m_gocodeCmd.isEmpty()) {\n        ProcessEx::startDetachedExAndHide(m_gocodeCmd,QStringList() << \"close\");\n    }\n}\n\nvoid GolangCode::gocodeUpdataLibpath(const QProcessEnvironment &env)\n{\n    if (m_gocodeCmd.isEmpty()) {\n        return;\n    }\n    m_gocodeProcess->setProcessEnvironment(env);\n    m_gocodeSetProcess->setProcessEnvironment(env);\n    if (!m_gocodeSetProcess->isStop()) {\n        m_gocodeSetProcess->stopAndWait(100,1000);\n    }\n    m_gocodeSetProcess->startEx(m_gocodeCmd,QStringList() << \"set\" << \"lib-path\" << env.value(\"GOPATH\"));\n}\n\nvoid GolangCode::gocodeReset(const QProcessEnvironment &env)\n{\n    if (m_gocodeCmd.isEmpty()) {\n        return;\n    }\n    m_gocodeProcess->setProcessEnvironment(env);\n    m_gocodeSetProcess->setProcessEnvironment(env);\n    if (g_gocodeInstCount > 1) {\n        if (!m_gocodeSetProcess->isStop()) {\n            m_gocodeSetProcess->stopAndWait(100,1000);\n        }\n        m_gocodeSetProcess->startEx(m_gocodeCmd,QStringList() << \"close\");\n    }\n}\n\n\nvoid GolangCode::cgoComplete()\n{\n    QStandardItem *root= m_completer->findRoot(m_preWord);\n    QStringList types;\n    types << \"int\" << \"uint\"\n          << \"short\" << \"ushort\"\n          << \"char\" << \"schar\" << \"uchar\"\n          << \"long\" << \"ulong\"\n          << \"longlong\" << \"ulonglong\"\n          << \"float\" << \"double\"\n          << \"complexfloat\" << \"complexdouble\";\n    QIcon icon = m_golangAst->iconFromTagEnum(LiteApi::TagType,true);\n    foreach(QString item, types) {\n        m_completer->appendChildItem(root,item,\"type\",\"\",icon,true);\n    }\n    icon = m_golangAst->iconFromTagEnum(LiteApi::TagFunc,true);\n    m_completer->appendChildItem(root,\"CString\",\"func\",\"func(string) *C.char\",icon,true);\n    m_completer->appendChildItem(root,\"GoString\",\"func\",\"func(*C.char) string\",icon,true);\n    m_completer->appendChildItem(root,\"GoStringN\",\"func\",\"func(*C.char, C.int) string\",icon,true);\n    m_completer->appendChildItem(root,\"GoBytes\",\"func\",\"func(unsafe.Pointer, C.int) []byte\",icon,true);\n    m_completer->appendChildItem(root,\"CBytes\",\"func\",\"func([]byte) unsafe.Pointer\",icon,true);\n\n    QStringList all = parserCgoInEditor(1024);\n    icon = QIcon(\"icon:liteeditor/images/findword.png\");\n    foreach (QString s, all) {\n        m_completer->appendChildItem(root,s,\"\",\"\",icon,false);\n    }\n\n    m_completer->updateCompleterModel();\n    m_completer->showPopup();\n}\n\nQStringList GolangCode::parserCgoInEditor(int nmax)\n{\n    QTextCursor tc = m_editor->textCursor();\n    QTextDocument *doc = m_editor->document();\n    int maxNumber = tc.blockNumber();\n    int blockNumber = tc.blockNumber();\n    QTextBlock block = doc->firstBlock();\n\n    int first = maxNumber-nmax;\n    if (first > 0) {\n        block = doc->findBlockByNumber(first);\n    }\n    maxNumber += nmax;\n\n    QStringList all;\n    QRegExp rx(\"C\\\\.([\\\\w\\\\-\\\\_]+)\");\n    while (block.isValid()) {\n        if (block.blockNumber() >= maxNumber) {\n            break;\n        }\n        if (block.blockNumber() == blockNumber) {\n            block = block.next();\n            continue;\n        }\n        QString line = block.text().trimmed();\n        if (!line.isEmpty())  {\n             int pos = 0;\n             while ((pos = rx.indexIn(line, pos)) != -1) {\n                 QString cap = rx.cap(1);\n                 all.push_back(cap);\n                 pos += rx.matchedLength();\n             }\n        }\n        block = block.next();\n    }\n    all.removeDuplicates();\n    return all;\n}\n\nvoid GolangCode::loadPkgList()\n{\n    QString path = m_liteApp->resourcePath()+(\"/packages/go/pkglist\");\n    QFile file(path);\n    if (file.open(QFile::ReadOnly)) {\n        QByteArray data = file.readAll();\n        QString ar = QString::fromUtf8(data);\n        ar.replace(\"\\r\\n\",\"\\n\");\n        foreach(QString line, ar.split(\"\\n\")) {\n            line = line.trimmed();\n            if (line.isEmpty()) {\n                continue;\n            }\n            QStringList pathList = line.split(\"/\");\n            m_pkgListMap.insert(pathList.last(),line);\n            m_importList.append(line);\n        }\n    }\n    m_importList.removeDuplicates();\n    m_importList << \"github.com/\"\n                 << \"golang.org/x/\";\n    m_allImportList = m_importList;\n}\n\n//void GolangCode::loadImportsList(const QProcessEnvironment &env)\n//{\n//    if (!m_importProcess->isStop()) {\n//        m_importProcess->stopAndWait(100,1000);\n//    }\n\n//    QString cmd = LiteApi::getGotools(m_liteApp);\n//    if (cmd.isEmpty()) {\n//        return;\n//    }\n//    QStringList args;\n//    args << \"pkgs\" << \"-list\" << \"-pkg\" << \"-skip_goroot\";\n\n//    m_importProcess->setProcessEnvironment(env);\n\n//    m_importProcess->startEx(cmd,args);\n//}\n\nvoid GolangCode::currentEnvChanged(LiteApi::IEnv*)\n{    \n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\n//    if (!LiteApi::hasGoEnv(env)) {\n//        return;\n//    }\n    m_liteApp->appendLog(\"GolangCode\",\"go environment changed\");\n    m_gobinCmd = FileUtil::lookupGoBin(\"go\",m_liteApp,env,false);\n\n    m_gocodeCmd = FileUtil::lookupGoBin(\"gocode\",m_liteApp,env,true);\n    if (m_gocodeCmd.isEmpty()) {\n         m_liteApp->appendLog(\"GolangCode\",\"gocode was not found on system PATH (hint: is gocode installed? \\\"go install github.com/visualfc/gocode@latest\\\")\",true);\n    } else {\n         m_liteApp->appendLog(\"GolangCode\",QString(\"Found gocode at %1\").arg(m_gocodeCmd));\n    }\n    m_gocodeProcess->setProcessEnvironment(env);\n//    m_importProcess->setProcessEnvironment(env);\n    m_gocodeSetProcess->setProcessEnvironment(env);\n\n    gocodeReset(env);\n\n    currentEditorChanged(m_liteApp->editorManager()->currentEditor());\n}\n\nvoid GolangCode::currentEditorChanged(LiteApi::IEditor *editor)\n{\n    if (!editor) {\n        this->setCompleter(0);\n        return;\n    }\n\n    if (editor->mimeType() == \"text/x-gosrc\") {\n        LiteApi::ICompleter *completer = LiteApi::findExtensionObject<LiteApi::ICompleter*>(editor,\"LiteApi.ICompleter\");\n        this->setCompleter(completer);\n    } else if (editor->mimeType() == \"browser/goplay\") {\n        LiteApi::IEditor* pedit = LiteApi::findExtensionObject<LiteApi::IEditor*>(m_liteApp->extension(),\"LiteApi.Goplay.IEditor\");\n        if (pedit && pedit->mimeType() == \"text/x-gosrc\") {\n            editor = pedit;\n            LiteApi::ICompleter *completer = LiteApi::findExtensionObject<LiteApi::ICompleter*>(editor,\"LiteApi.ICompleter\");\n            this->setCompleter(completer);\n        }\n    } else {\n        this->setCompleter(0);\n        return;\n    }\n\n    m_editor = LiteApi::getTextEditor(editor);\n    if (!m_editor) {\n        return;\n    }\n    m_pkgImportTip->setWidget(editor->widget());\n    QString filePath = m_editor->filePath();\n    if (filePath.isEmpty()) {\n        return;\n    }\n    m_fileInfo.setFile(filePath);\n    m_gocodeProcess->setWorkingDirectory(m_fileInfo.absolutePath());\n\n    updateEditorGOPATH();\n}\n\nvoid GolangCode::setCompleter(LiteApi::ICompleter *completer)\n{\n    if (m_completer) {\n        disconnect(m_completer,0,this,0);\n    }\n    m_completer = completer;\n    if (m_completer) {\n        m_completer->setImportList(m_allImportList);\n        if (!m_gocodeCmd.isEmpty()) {\n            m_completer->setSearchSeparator(false);\n            m_completer->setExternalMode(true);\n            connect(m_completer,SIGNAL(prefixChanged(QTextCursor,QString,bool)),this,SLOT(prefixChanged(QTextCursor,QString,bool)));\n            connect(m_completer,SIGNAL(wordCompleted(QString,QString,QString)),this,SLOT(wordCompleted(QString,QString,QString)));\n        } else {\n            m_completer->setSearchSeparator(true);\n            m_completer->setExternalMode(false);\n        }\n    }\n}\n\nvoid GolangCode::prefixChanged(QTextCursor cur,QString pre,bool force)\n{\n    if (m_completer->completionContext() != LiteApi::CompleterCodeContext) {\n        return;\n    }\n\n    if (m_gocodeCmd.isEmpty()) {\n        return;\n    }\n//    if (m_completer->completer()->completionPrefix().startsWith(pre)) {\n//       // qDebug() << pre << m_completer->completer()->completionPrefix();\n//       // return;\n//    }\n    if (!m_gocodeProcess->isStop()) {\n        m_gocodeProcess->stopAndWait(30,100);\n    }\n    int offset = -1;\n    if (pre.endsWith('.')) {\n        m_preWord = pre;\n        offset = 0;\n    } else if (pre.length() == m_completer->prefixMin()) {\n        m_preWord.clear();\n    } else {\n        if (!force) {\n            return;\n        }\n        m_preWord.clear();\n        int index = pre.lastIndexOf(\".\");\n        if (index != -1) {\n            m_preWord = pre.left(index);\n        }\n    }\n\n    m_prefix = pre;\n    m_lastPrefix = m_prefix;\n\n    if (!m_preWord.isEmpty()) {\n        m_completer->clearItemChilds(m_preWord);\n    }\n\n    if (m_preWord == \"C.\") {\n        cgoComplete();\n        return;\n    }\n    if (m_preWord.endsWith(\".\")) {\n        bool testDigit = true;\n        for (int i = 0; i < m_preWord.size()-1; i++) {\n            if (!m_preWord.at(i).isDigit()) {\n                testDigit = false;\n                break;\n            }\n        }\n        if (testDigit) {\n            return;\n        }\n    }\n    if (m_prefix.lastIndexOf(\"..\") > 0) {\n        m_pkgImportTip->hide();\n        return;\n    }\n\n\n    QString src = cur.document()->toPlainText();\n    src = src.replace(\"\\r\\n\",\"\\n\");\n    m_writeData = src.left(cur.position()).toUtf8();\n    QStringList args;\n    args << \"-f\" << \"csv\" << \"autocomplete\" << m_fileInfo.fileName() << QString::number(m_writeData.length()+offset);\n    m_writeData = src.toUtf8();\n    m_gocodeProcess->setWorkingDirectory(m_fileInfo.absolutePath());\n    m_gocodeProcess->startEx(m_gocodeCmd,args);\n}\n\nvoid GolangCode::wordCompleted(QString,QString,QString)\n{\n    m_prefix.clear();\n}\n\nvoid GolangCode::started()\n{\n    if (m_writeData.isEmpty()) {\n        m_gocodeProcess->closeWriteChannel();\n        return;\n    }\n    m_gocodeProcess->write(m_writeData);\n    m_gocodeProcess->closeWriteChannel();\n    m_writeData.clear();\n}\n\nvoid GolangCode::finished(int code,QProcess::ExitStatus)\n{\n    if (code != 0) {\n        return;\n    }\n\n    if (m_prefix.isEmpty()) {\n        return;\n    }\n\n    if (m_prefix != m_lastPrefix) {\n        m_prefix.clear();\n        return;\n    }\n\n    QByteArray read = m_gocodeProcess->readAllStandardOutput();\n\n    QList<QByteArray> all = read.split('\\n');\n    //func,,Fprint,,func(w io.Writer, a ...interface{}) (n int, error os.Error)\n    //type,,Formatter,,interface\n    //const,,ModeExclusive,,\n    //var,,Args,,[]string\n    int n = 0;\n    QIcon icon;\n    QStandardItem *root= m_completer->findRoot(m_preWord);\n    foreach (QByteArray bs, all) {\n        QStringList word = QString::fromUtf8(bs,bs.size()).split(\",,\");\n        //nsf/gocode count=3\n        //mdempsky/gocode count = 4\n        // (\"var\", \"s4\", \"string\", \"\")\n        // (\"func\", \"Errorf\", \"func(format string, a ...interface{}) error\", \"fmt\")\n        if (word.count() < 3) {\n            continue;\n        }\n        if (word.at(0) == \"PANIC\") {\n            continue;\n        }\n        LiteApi::ASTTAG_ENUM tag = LiteApi::TagNone;\n        QString kind = word.at(0);\n        QString info = word.at(2);\n        if (kind == \"package\") {\n            tag = LiteApi::TagPackage;\n        } else if (kind == \"func\") {\n            tag = LiteApi::TagFunc;\n        } else if (kind == \"var\") {\n            tag = LiteApi::TagValue;\n        } else if (kind == \"const\") {\n            tag = LiteApi::TagConst;\n        } else if (kind == \"type\") {\n            if (info == \"interface\") {\n                tag = LiteApi::TagInterface;\n            } else if (info == \"struct\") {\n                tag = LiteApi::TagStruct;\n            } else {\n                tag = LiteApi::TagType;\n            }\n        }\n\n        if (m_golangAst) {\n            icon = m_golangAst->iconFromTagEnum(tag,true);\n        }\n        //m_completer->appendItemEx(m_preWord+word.at(1),kind,info,icon,true);\n        m_completer->appendChildItem(root,word.at(1),kind,info,icon,true);\n        n++;\n    }\n    m_lastPrefix = m_prefix;\n    m_prefix.clear();\n    if (n >= 1) {\n        m_completer->updateCompleterModel();\n        m_completer->showPopup();\n    }\n    if (n == 0 && m_lastPrefix.endsWith(\".\")) {\n        QString id = m_lastPrefix.left(m_lastPrefix.length()-1);\n        if (id.length() < 2) {\n            return;\n        }\n        QStringList pkgs = m_pkgListMap.values(id);\n        pkgs.sort();\n        if (m_allImportHint) {\n            QStringList extras = m_extraPkgListMap.values(id);\n            extras.sort();\n            pkgs << extras;\n        }\n        if (!pkgs.isEmpty() && !findImport(id)) {\n            QPlainTextEdit *ed = LiteApi::getPlainTextEdit(m_editor);\n            if (ed) {\n                int pos = ed->textCursor().position();\n                m_pkgImportTip->showPkgHint(pos,pkgs,ed);\n            }\n        }\n    }\n}\n\nvoid GolangCode::gocodeImportStarted()\n{\n    m_gocodeImportProcess->write(\"package main\\nimport \\\"\\\"\");\n    m_gocodeImportProcess->closeWriteChannel();\n}\n\nvoid GolangCode::gocodeImportFinished(int code, QProcess::ExitStatus)\n{\n    if (code != 0) {\n        return;\n    }\n    QByteArray data = m_gocodeImportProcess->readAllStandardOutput();\n    QList<QString> lines = QString::fromUtf8(data).split('\\n');\n\n    QStringList importList;\n    m_extraPkgListMap.clear();\n    foreach (QString line, lines) {\n        QStringList ar = line.split(\",,\");\n        if (ar.count() < 3) {\n            continue;\n        }\n        if (ar.at(0) == \"PANIC\") {\n            continue;\n        }\n        if (ar[0] != \"import\") {\n            continue;\n        }\n        if (m_importList.contains(ar[1])) {\n            continue;\n        }\n        QString pkg = ar[1];\n        importList.append(pkg);\n        QStringList pathList = pkg.split(\"/\");\n        m_extraPkgListMap.insert(pathList.last(),pkg);\n    }\n    if (m_completer) {\n        m_completer->setImportList(QStringList() << m_importList << importList);\n    }\n}\n\n//void GolangCode::importFinished(int code,QProcess::ExitStatus)\n//{\n//    if (code != 0) {\n//        return;\n//    }\n//    return;\n//    QByteArray read = m_importProcess->readAllStandardOutput();\n//    QString data = QString::fromUtf8(read);\n//    QStringList importList = data.split('\\n');\n//    importList.removeDuplicates();\n//    importList.sort();\n\n//    m_extraPkgListMap.clear();\n//    foreach (QString line, importList) {\n//        QStringList pathList = line.split(\"/\");\n//        m_extraPkgListMap.insert(pathList.last(),line);\n//    }\n\n//    m_allImportList = m_importList;\n//    m_allImportList.append(importList);\n//    m_allImportList.removeDuplicates();\n\n//    if (m_completer) {\n//        m_completer->setImportList(m_allImportList);\n//    }\n//}\n\nImportPkgTip::ImportPkgTip(LiteApi::IApplication *app, QObject *parent)\n    : QObject(parent), m_liteApp(app)\n{\n    m_editWidget = 0;\n    m_startPos = 0;\n    m_pkgIndex = 0;\n    m_escapePressed = false;\n    m_enterPressed = false;\n    m_popup = new FakeToolTip();\n    //m_popup->setFocusPolicy(Qt::NoFocus);\n    m_infoLabel = new QLabel;\n    m_pkgLabel = new QLabel;\n    QHBoxLayout *layout = new QHBoxLayout;\n    layout->setMargin(0);\n    layout->addWidget(m_infoLabel);\n    layout->addWidget(m_pkgLabel);\n    m_popup->setLayout(layout);\n\n    qApp->installEventFilter(this);\n}\n\nImportPkgTip::~ImportPkgTip()\n{\n    delete m_popup;\n}\n\nvoid ImportPkgTip::showPkgHint(int startpos, const QStringList &pkg, QPlainTextEdit *ed)\n{\n    const QDesktopWidget *desktop = QApplication::desktop();\n#ifdef Q_WS_MAC\n    const QRect screen = desktop->availableGeometry(desktop->screenNumber(ed));\n#else\n    const QRect screen = desktop->screenGeometry(desktop->screenNumber(ed));\n#endif\n    m_pkg = pkg;\n    m_startPos = startpos;\n    m_enterPressed = false;\n    m_escapePressed = false;\n    m_pkgIndex = 0;\n    const QSize sz = m_popup->minimumSizeHint();\n    QTextCursor cur = ed->textCursor();\n    cur.setPosition(startpos);\n    QPoint pos = ed->cursorRect(cur).topLeft();\n    pos.setY(pos.y() - sz.height() - 1);\n    pos = ed->mapToGlobal(pos);\n    if (pos.x() + sz.width() > screen.right())\n        pos.setX(screen.right() - sz.width());\n    m_infoLabel->setText(tr(\"warning, pkg not find, please enter to import :\"));\n    if (m_pkg.size() == 1) {\n        m_pkgLabel->setText(m_pkg[0]);\n    } else {\n        m_pkgLabel->setText(QString(\"[%1/%2] \\\"%3\\\"\").arg(m_pkgIndex+1).arg(m_pkg.size()).arg(m_pkg[m_pkgIndex]));\n    }\n    m_popup->move(pos);\n    if (!m_popup->isVisible()) {\n        m_popup->show();\n    }\n}\n\nvoid ImportPkgTip::hide()\n{\n    m_popup->hide();\n}\n\nvoid ImportPkgTip::setWidget(QWidget *widget)\n{\n    hide();\n    m_editWidget = widget;\n}\n\nbool ImportPkgTip::eventFilter(QObject *obj, QEvent *e)\n{\n    if (!m_popup->isVisible()) {\n        return QObject::eventFilter(obj,e);\n    }\n    switch (e->type()) {\n    case QEvent::ShortcutOverride:\n        if (m_popup->isVisible() && static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape) {\n            m_escapePressed = true;\n            e->accept();\n        } else if (static_cast<QKeyEvent*>(e)->modifiers() & Qt::ControlModifier) {\n            m_popup->hide();\n        }\n        break;\n    case QEvent::KeyPress: {\n            QKeyEvent *ke = static_cast<QKeyEvent*>(e);\n            if (ke->key() == Qt::Key_Escape) {\n                m_escapePressed = true;\n            } else if (ke->key() == Qt::Key_Return || ke->key() == Qt::Key_Enter) {\n                m_enterPressed = true;\n                e->accept();\n                return true;\n            } else if (ke->key() == Qt::Key_Up) {\n                if (m_pkg.size() > 1) {\n                    e->accept();\n                    m_pkgIndex--;\n                    if (m_pkgIndex < 0) {\n                        m_pkgIndex = m_pkg.size()-1;\n                    }\n                    m_pkgLabel->setText(QString(\"[%1/%2] \\\"%3\\\"\").arg(m_pkgIndex+1).arg(m_pkg.size()).arg(m_pkg[m_pkgIndex]));\n                }\n                return true;\n            } else if (ke->key() == Qt::Key_Down) {\n                if (m_pkg.size() > 1) {\n                    e->accept();\n                    m_pkgIndex++;\n                    if (m_pkgIndex >= m_pkg.size()) {\n                        m_pkgIndex = 0;\n                    }\n                    m_pkgLabel->setText(QString(\"[%1/%2] \\\"%3\\\"\").arg(m_pkgIndex+1).arg(m_pkg.size()).arg(m_pkg[m_pkgIndex]));\n                }\n                return true;\n            }\n        }\n        break;\n    case QEvent::KeyRelease: {\n            QKeyEvent *ke = static_cast<QKeyEvent*>(e);\n            if (ke->key() == Qt::Key_Escape && m_escapePressed) {\n                hide();\n            } else if ( (ke->key() == Qt::Key_Return || ke->key() == Qt::Key_Enter) &&\n                        m_enterPressed)            {\n                e->accept();\n                m_enterPressed = false;\n                hide();\n                emit import(m_pkg[m_pkgIndex],m_startPos);\n            } else if (ke->key() == Qt::Key_Up) {\n                return true;\n            } else if (ke->key() == Qt::Key_Down) {\n                return true;\n            } else if (ke->text() != \".\"){\n                hide();\n            }\n        }\n        break;\n    case QEvent::FocusOut:\n    case QEvent::WindowDeactivate:\n    case QEvent::Resize:\n        if (obj != m_editWidget)\n            break;\n        hide();\n        break;\n    case QEvent::Move:\n        if (obj != m_liteApp->mainWindow())\n            break;\n        hide();\n        break;\n    case QEvent::MouseButtonPress:\n    case QEvent::MouseButtonRelease:\n    case QEvent::MouseButtonDblClick:\n    case QEvent::Wheel: {\n            hide();\n        }\n        break;\n    default:\n        break;\n    }\n    return false;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangcode/golangcode.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangcode.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGCODE_H\n#define GOLANGCODE_H\n\n#include \"liteapi/liteapi.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"golangastapi/golangastapi.h\"\n#include \"processex/processex.h\"\n\nclass QProcess;\nclass QLabel;\nclass ImportPkgTip : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit ImportPkgTip(LiteApi::IApplication *app, QObject *parent = 0);\n    ~ImportPkgTip();\n    void showPkgHint(int startpos, const QStringList &pkg, QPlainTextEdit *ed);\n    void setWidget(QWidget *widget);\n    void hide();\nsignals:\n    void import(QString,int);\nprotected:\n    bool eventFilter(QObject *obj, QEvent *e);\n    LiteApi::IApplication *m_liteApp;\n    QWidget *m_editWidget;\n    QWidget *m_popup;\n    QLabel *m_infoLabel;\n    QLabel *m_pkgLabel;\n    QStringList m_pkg;\n    int     m_startPos;\n    int     m_pkgIndex;\n    bool m_escapePressed;\n    bool m_enterPressed;\n};\n\n\nclass GolangCode : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit GolangCode(LiteApi::IApplication *app, QObject *parent = 0);\n    ~GolangCode();\n    void setCompleter(LiteApi::ICompleter *completer);\n    void gocodeUpdataLibpath(const QProcessEnvironment &env);\n    void gocodeReset(const QProcessEnvironment &env);\n    void cgoComplete();\n    void loadPkgList();\n//    void loadImportsList(const QProcessEnvironment &env);\npublic slots:\n    void currentEditorChanged(LiteApi::IEditor*);\n    void currentEnvChanged(LiteApi::IEnv*);\n    void prefixChanged(QTextCursor,QString,bool froce);\n    void wordCompleted(QString,QString,QString);\n    void started();\n    void finished(int,QProcess::ExitStatus);\n    void gocodeImportStarted();\n    void gocodeImportFinished(int,QProcess::ExitStatus);\n//    void importFinished(int,QProcess::ExitStatus);\n    void broadcast(QString,QString,QString);\n    void applyOption(QString);\n    void appLoaded();\n    void import(const QString &import, int startPos);\n    bool findImport(const QString &id);\n    void customGOPATHChanged(const QString &buildPath);\n    void globalGOPATHChanged();\nprotected:\n    QStringList parserCgoInEditor(int nmax = 1024);\n    void updateEditorGOPATH();\n    static  int g_gocodeInstCount;\n    LiteApi::IApplication *m_liteApp;\n    LiteApi::ITextEditor  *m_editor;\n    LiteApi::ICompleter   *m_completer;\n    QWidget *m_pkgWidget;\n    ImportPkgTip    *m_pkgImportTip;\n    QMultiMap<QString,QString> m_pkgListMap;\n    QStringList m_importList;\n    QStringList m_allImportList;\n    QMultiMap<QString,QString> m_extraPkgListMap;\n    QString     m_gobinCmd;\n    QString     m_preWord;\n    QString     m_prefix;\n    QString     m_lastPrefix;\n    QFileInfo   m_fileInfo;\n    Process   *m_gocodeProcess;\n    Process   *m_gocodeSetProcess;\n    Process   *m_gocodeImportProcess;\n//    Process   *m_importProcess;\n    QByteArray  m_writeData;\n    LiteApi::IEnvManager *m_envManager;\n    LiteApi::IGolangAst *m_golangAst;\n    QString     m_gocodeCmd;\n    QString     m_lastGopathEnv;\n    bool        m_closeOnExit;\n    bool        m_allImportHint;\n};\n\n#endif // GOLANGCODE_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangcode/golangcode.pro",
    "content": "TARGET = golangcode\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude (../../api/liteenvapi/liteenvapi.pri)\ninclude(../../api/golangastapi/golangastapi.pri)\ninclude(../../utils/fileutil/fileutil.pri)\ninclude(../../utils/processex/processex.pri)\n\nDEFINES += GOLANGCODE_LIBRARY\n\nSOURCES += golangcodeplugin.cpp \\\n        golangcode.cpp \\\n        golangcodeoptionfactory.cpp \\\n        golangcodeoption.cpp \\\n    ../liteeditor/faketooltip.cpp\n\nHEADERS += golangcodeplugin.h\\\n        golangcode_global.h \\\n        golangcode.h \\\n        golangcodeoptionfactory.h \\\n        golangcodeoption.h \\\n    ../liteeditor/faketooltip.h\n\nFORMS += \\\n        golangcodeoption.ui\n"
  },
  {
    "path": "liteidex/src/plugins/golangcode/golangcode_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangcode_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGCODE_GLOBAL_H\n#define GOLANGCODE_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(GOLANGCODE_LIBRARY)\n#  define GOLANGCODESHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define GOLANGCODESHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#define GOLANGCODE_EXITCLOSE \"golangcode/exitclose\"\n#define GOLANGCODE_AUTOBUILD \"golangcode/gocodeautobuild\"\n#define GOLANGCODE_IMPORTHINT_GOPATH \"golangcode/importhintgopath\"\n\n#endif // GOLANGCODE_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangcode/golangcodeoption.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangcodeoption.cpp\n// Creator: Nik-U <niku@vaxxine.com>\n\n#include \"golangcodeoption.h\"\n#include \"golangcode_global.h\"\n#include \"ui_golangcodeoption.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangCodeOption::GolangCodeOption(LiteApi::IApplication *app,QObject *parent) :\n    LiteApi::IOption(parent),\n    m_liteApp(app),\n    m_widget(new QWidget),\n    ui(new Ui::GolangCodeOption)\n{\n    ui->setupUi(m_widget);\n}\n\nGolangCodeOption::~GolangCodeOption()\n{\n    delete m_widget;\n    delete ui;\n}\n\nQWidget *GolangCodeOption::widget()\n{\n    return m_widget;\n}\n\nQString GolangCodeOption::name() const\n{\n    return \"GolangCode\";\n}\n\nQString GolangCodeOption::mimeType() const\n{\n    return \"option/golangcode\";\n}\n\nvoid GolangCodeOption::load()\n{\n    bool close = m_liteApp->settings()->value(GOLANGCODE_EXITCLOSE,true).toBool();\n    bool allpkg = m_liteApp->settings()->value(GOLANGCODE_IMPORTHINT_GOPATH,true).toBool();\n    ui->exitCloseCheckBox->setChecked(close);\n    ui->pkgHintGopathRadioButton->setChecked(allpkg);\n    ui->pkgHintStdRadioButton->setChecked(!allpkg);\n}\n\nvoid GolangCodeOption::save()\n{\n    bool close = ui->exitCloseCheckBox->isChecked();\n    bool allpkg = ui->pkgHintGopathRadioButton->isChecked();\n    m_liteApp->settings()->setValue(GOLANGCODE_EXITCLOSE,close);\n    m_liteApp->settings()->setValue(GOLANGCODE_IMPORTHINT_GOPATH,allpkg);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangcode/golangcodeoption.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangcodeoption.h\n// Creator: Nik-U <niku@vaxxine.com>\n\n#ifndef GOLANGCODEOPTION_H\n#define GOLANGCODEOPTION_H\n\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class GolangCodeOption;\n}\n\nclass GolangCodeOption : public LiteApi::IOption\n{\n    Q_OBJECT\n\npublic:\n    explicit GolangCodeOption(LiteApi::IApplication *app, QObject *parent = 0);\n    ~GolangCodeOption();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void load();\n    virtual void save();\nprivate:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget           *m_widget;\n    Ui::GolangCodeOption *ui;\n};\n\n#endif // GOLANGCODEOPTION_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangcode/golangcodeoption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>GolangCodeOption</class>\n <widget class=\"QWidget\" name=\"GolangCodeOption\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>678</width>\n    <height>242</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox_2\">\n     <property name=\"title\">\n      <string>PKG automitic import prompt</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n      <item>\n       <widget class=\"QRadioButton\" name=\"pkgHintGopathRadioButton\">\n        <property name=\"text\">\n         <string>PKG automatic import hints for all packages (Module/GOPATH)</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QRadioButton\" name=\"pkgHintStdRadioButton\">\n        <property name=\"text\">\n         <string>PKG automatic import hints for standard package</string>\n        </property>\n       </widget>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox\">\n     <property name=\"title\">\n      <string>Gocode</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout_3\">\n      <item>\n       <widget class=\"QCheckBox\" name=\"exitCloseCheckBox\">\n        <property name=\"text\">\n         <string>Close gocode when exiting</string>\n        </property>\n       </widget>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <spacer name=\"verticalSpacer\">\n     <property name=\"orientation\">\n      <enum>Qt::Vertical</enum>\n     </property>\n     <property name=\"sizeHint\" stdset=\"0\">\n      <size>\n       <width>20</width>\n       <height>40</height>\n      </size>\n     </property>\n    </spacer>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/golangcode/golangcodeoptionfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangcodeoptionfactory.cpp\n// Creator: Nik-U <niku@vaxxine.com>\n\n#include \"golangcodeoption.h\"\n#include \"golangcodeoptionfactory.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangCodeOptionFactory::GolangCodeOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n}\n\nQStringList GolangCodeOptionFactory::mimeTypes() const\n{\n    return QStringList() << \"option/golangcode\";\n}\n\nLiteApi::IOption *GolangCodeOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == \"option/golangcode\") {\n        return new GolangCodeOption(m_liteApp,this);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangcode/golangcodeoptionfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangcodeoptionfactory.h\n// Creator: Nik-U <niku@vaxxine.com>\n\n#ifndef GOLANGCODEOPTIONFACTORY_H\n#define GOLANGCODEOPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass GolangCodeOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n    GolangCodeOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // GOLANGCODEOPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangcode/golangcodeplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangcodeplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangcodeplugin.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n#include \"qtc_editutil/uncommentselection.h\"\n#include \"golangcode.h\"\n#include \"golangcodeoptionfactory.h\"\n#include <QMenu>\n#include <QAction>\n#include <QPlainTextEdit>\n#include <QFileInfo>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangCodePlugin::GolangCodePlugin()\n{\n}\n\nbool GolangCodePlugin::load(LiteApi::IApplication *app)\n{\n    m_liteApp = app;\n    m_code = new GolangCode(app,this);\n\n    //app->optionManager()->addFactory(new GolangCodeOptionFactory(app,this));\n    connect(app->editorManager(),SIGNAL(editorCreated(LiteApi::IEditor*)),this,SLOT(editorCreated(LiteApi::IEditor*)));\n    //connect(app->editorManager(),SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(currentEditorChanged(LiteApi::IEditor*)));\n    connect(app,SIGNAL(loaded()),this,SLOT(appLoaded()));\n    return true;\n}\n\nQStringList GolangCodePlugin::dependPluginList() const\n{\n    return QStringList() << \"plugin/liteenv\" << \"plugin/golangast\";\n}\n\nvoid GolangCodePlugin::appLoaded()\n{\n}\n\nvoid GolangCodePlugin::editorCreated(LiteApi::IEditor *editor)\n{\n    if (!editor) {\n        return;\n    }\n    if (editor->mimeType() != \"text/x-gosrc\") {\n        return;\n    }\n    LiteApi::ILiteEditor *liteEdit = LiteApi::getLiteEditor(editor);\n    if (liteEdit) {\n        liteEdit->setSpellCheckZoneDontComplete(true);\n    }\n}\n\nvoid GolangCodePlugin::currentEditorChanged(LiteApi::IEditor *editor)\n{\n    if (editor) {\n        if (editor->mimeType() == \"text/x-gosrc\") {\n            LiteApi::ICompleter *completer = LiteApi::findExtensionObject<LiteApi::ICompleter*>(editor,\"LiteApi.ICompleter\");\n            m_code->setCompleter(completer);\n            return;\n        } else if (editor->mimeType() == \"browser/goplay\") {\n            LiteApi::IEditor* editor = LiteApi::findExtensionObject<LiteApi::IEditor*>(m_liteApp->extension(),\"LiteApi.Goplay.IEditor\");\n            if (editor && editor->mimeType() == \"text/x-gosrc\") {\n                LiteApi::ICompleter *completer = LiteApi::findExtensionObject<LiteApi::ICompleter*>(editor,\"LiteApi.ICompleter\");\n                m_code->setCompleter(completer);\n                return;\n            }\n        }\n    }\n    m_code->setCompleter(0);\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/golangcode/golangcodeplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangcodeplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGCODEPLUGIN_H\n#define GOLANGCODEPLUGIN_H\n\n#include \"golangcode_global.h\"\n#include \"liteapi/liteapi.h\"\n#include <QtPlugin>\n\nclass GolangCode;\nclass GolangCodePlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    GolangCodePlugin();\n    virtual bool load(LiteApi::IApplication *app);\n    virtual QStringList dependPluginList() const;\nprotected slots:\n    void appLoaded();\n    void editorCreated(LiteApi::IEditor*);\n    void currentEditorChanged(LiteApi::IEditor*);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    GolangCode *m_code;\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<GolangCodePlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.GolangCodePlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/golangcode\");\n        m_info->appendDepend(\"plugin/golangast\");\n        m_info->setName(\"GolangCode\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setVer(\"X38.1\");\n        m_info->setInfo(\"Golang Gocode Support\");\n        m_info->appendDepend(\"plugin/liteenv\");\n    }\n};\n\n#endif // GOLANGCODEPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangdoc/findapiwidget.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: findapiwidget.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"findapiwidget.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include <QVBoxLayout>\n#include <QHBoxLayout>\n#include <QLabel>\n#include <QToolButton>\n#include <QActionGroup>\n#include <QAction>\n#include <QPlainTextEdit>\n#include <QListView>\n#include <QStandardItemModel>\n#include <QStandardItem>\n#include <QTreeView>\n#include <QHeaderView>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nFindApiThread::FindApiThread(QObject *parent) : QThread(parent)\n{\n    m_bMatchCase = true;\n}\n\nFindApiThread::~FindApiThread()\n{\n    stopFind();\n}\n\nvoid FindApiThread::setRootPath(const QString &rootPath)\n{\n    m_rootPath = rootPath;\n}\n\nvoid FindApiThread::findApi(const QString &text)\n{\n    if (this->isRunning()) {\n        this->terminate();\n    }\n    m_text = text;\n    this->start();\n}\n\nvoid FindApiThread::stopFind()\n{\n    this->terminate();\n}\n\nvoid FindApiThread::setMatchCase(bool b)\n{\n    m_bMatchCase = b;\n}\n\nvoid FindApiThread::findInFile(const QString &filePath, const QString &baseName)\n{\n    QFile f(filePath);\n    if (!f.open(QFile::ReadOnly)) {\n        return;\n    }\n    QTextStream *stream = new QTextStream(&f);\n    QRegExp reg(\"^pkg\\\\s([\\\\w\\\\-\\\\.\\\\/]+)(\\\\s\\\\(([\\\\w\\\\-]+)\\\\))?,\\\\s(\\\\w+)\");\n    QRegExp regm(\"\\\\(\\\\*?([\\\\w\\\\-]+)\\\\)\\\\s*(\\\\w+)\");\n    while (!stream->atEnd()) {\n        QString line = stream->readLine();\n        int pos = reg.indexIn(line);\n        if (pos < 0) {\n            continue;\n        }\n        // 1 pkgname\n        // 2 ? (system)\n        // 3 ? system\n        // 4 const|func|method|var|type\n        QString pkgName = reg.cap(1);\n//        if (!reg.cap(3).isEmpty()) {\n//            pkg = reg.cap(2)+\".\"+pkg;\n//        }\n//        if (!lastPkg || lastPkg->name != pkgName) {\n//            lastPkg = m_pkgs.findPackage(pkgName);\n//            if (!lastPkg) {\n//                lastPkg = new Package(pkgName);\n//                m_pkgs.pkgList.append(lastPkg);\n//                lastType = 0;\n//            }\n//        }\n        QString right = line.mid(reg.cap().length()).trimmed();\n        QString findText;\n        QStringList findUrl;\n        QString flag = reg.cap(4);\n        if (flag == \"var\") {\n            ///pkg archive/tar, var ErrFieldTooLong error\n            int pos = right.indexOf(\" \");\n            QString name = right.left(pos);\n            if (pos != -1) {\n                findText = pkgName+\".\"+name+\" \"+right.mid(pos+1);\n                findUrl << pkgName+\"#variables\"<< name;\n            }\n            //if (pos != -1 && lastPkg->findValue(name) == 0) {\n            //    lastPkg->valueList.append(new Value(VarApi,name,right.mid(pos+1)));\n            //}\n        } else if (flag == \"const\") {\n            //pkg syscall (windows-amd64), const ECOMM Errno\n            int pos = right.indexOf(\" \");\n            QString name = right.left(pos);\n            if (pos != -1) {\n                QString exp = right.mid(pos+1);\n                findText = pkgName+\".\"+name+\" \"+exp;\n                //if (exp.startsWith(\"ideal-\") || exp == \"uint16\") {\n                findUrl << pkgName+\"#constants\" << name;\n//                } else {\n//                    findUrl << pkgName+\".\"+name;\n//                }\n            }\n//            if (pos != -1 && lastPkg->findValue(name) == 0) {\n//                lastPkg->valueList.append(new Value(ConstApi,name,right.mid(pos+1)));\n//            }\n        } else if (flag == \"func\") {\n            //pkg bytes, func FieldsFunc([]byte, func(rune) bool) [][]byte\n            int pos = right.indexOf(\"(\");\n            QString name = right.left(pos);\n            if (pos != -1) {\n                findText = pkgName+\".\"+name+\" \"+right.mid(pos);\n                findUrl << pkgName+\"#\"+name;\n            }\n//            if (pos != -1 && lastPkg->findValue(name) == 0) {\n//                lastPkg->valueList.append(new Value(FuncApi,name,right.mid(pos)));\n//            }\n        } else if (flag == \"method\") {\n            //pkg archive/tar, method (*Reader) Next() (*Header, error)\n            //pkg archive/zip, method (*File) Open() (io.ReadCloser, error)\n            //pkg bufio, method (ReadWriter) Available() int\n            int pos = regm.indexIn(right);\n            if (pos != -1) {\n                QString typeName = regm.cap(1);\n                QString name = regm.cap(2);\n                QString exp = right.mid(regm.cap().length()).trimmed();\n                findText = pkgName+\".\"+typeName+\".\"+name+\" \"+exp;\n                findUrl << pkgName+\"#\"+typeName+\".\"+name;\n//                if (lastType == 0 || lastType->name != typeName || lastType->typ == StructApi) {\n//                    lastType = lastPkg->findType(typeName);\n//                    if (!lastType) {\n//                        lastType = new Type(StructApi,typeName,\"struct\");\n//                        lastPkg->typeList.append(lastType);\n//                    }\n//                }\n//                if (lastType->findValue(name) == 0) {\n//                    lastType->valueList.append(new Value(TypeMethodApi,name,exp));\n//                }\n            }\n        } else if (flag == \"type\") {\n            //pkg go/ast, type ObjKind int\n            //pkg archive/tar, type Header struct\n            //pkg archive/tar, type Header struct, AccessTime time.Time\n            //pkg container/heap, type Interface interface { Len, Less, Pop, Push, Swap }\n            //pkg container/heap, type Interface interface, Len() int\n            int pos = right.indexOf(\" \");\n            if (pos != -1) {\n                QString typeName = right.left(pos);\n                QString exp = right.mid(pos+1);\n                if (exp == \"struct\") {\n                    findText = pkgName+\".\"+typeName+\" \"+exp;\n                    findUrl << pkgName+\"#\"+typeName;\n//                    lastType = lastPkg->findType(typeName);\n//                    if (!lastType) {\n//                        lastType = new Type(StructApi,typeName,exp);\n//                        lastPkg->typeList.append(lastType);\n//                    }\n                } else if (exp.startsWith(\"struct,\")) {\n                    QString last = exp.mid(7).trimmed();\n                    int pos2 = last.indexOf(\" \");\n                    if (pos2 != -1) {\n                        findText = pkgName+\".\"+typeName;\n//                        if (lastType == 0 || lastType->name != typeName || lastType->typ == StructApi) {\n//                            lastType = lastPkg->findType(typeName);\n//                            if (!lastType) {\n//                                lastType = new Type(StructApi,typeName,\"struct\");\n//                                lastPkg->typeList.append(lastType);\n//                            }\n//                        }\n                        QString name = last.left(pos2);\n                        if (name == \"embedded\") {\n                            QString emName = last.mid(pos2+1);\n                            findText = pkgName+\".\"+typeName+\".\"+emName;\n                            findUrl << pkgName+\"#\"+typeName << emName;\n//                            if (!lastType->embeddedList.contains(emName)) {\n//                                lastType->embeddedList.append(emName);\n//                            }\n                        } else {\n                            findText = pkgName+\".\"+typeName+\".\"+name+\" \"+last.mid(pos2+1);\n                            findUrl << pkgName+\"#\"+typeName << name;\n                        }\n                        /*else if (lastType->findValue(name) == 0){\n                            lastType->valueList.append(new Value(TypeVarApi,name,last.mid(pos2+1)));\n                        }*/\n                    }\n                } else if (exp.startsWith(\"interface {\")) {\n                    findText = pkgName+\".\"+typeName+\" \"+exp;\n                    findUrl << pkgName+\"#\"+typeName;\n//                    lastType = lastPkg->findType(typeName);\n//                    if (!lastType) {\n//                        lastType = new Type(InterfaceApi,typeName,exp);\n//                        lastPkg->typeList.append(lastType);\n//                    }\n                } else if (exp.startsWith(\"interface,\")) {\n                    QString last = exp.mid(10).trimmed();\n                    int pos2 = last.indexOf(\"(\");\n                    if (pos2 != -1) {\n\n//                        if (lastType == 0 || lastType->name != typeName || lastType->typ == StructApi) {\n//                            lastType = lastPkg->findType(typeName);\n//                            if (!lastType) {\n//                                lastType = new Type(InterfaceApi,typeName,\"struct\");\n//                                lastPkg->typeList.append(lastType);\n//                            }\n//                        }\n                        QString name = last.left(pos2);\n                        //if (lastType->findValue(name) == 0) {\n                             findText = pkgName+\".\"+typeName+\".\"+name+\" \"+last.mid(pos2);\n                             findUrl << pkgName+\"#\"+typeName+\".\"+name;\n                             //lastType->valueList.append(new Value(TypeMethodApi,name,last.mid(pos2)));\n                        //}\n                    }\n                } else {\n                    findText = pkgName+\".\"+typeName+\" \"+exp;\n                    findUrl << pkgName+\"#\"+typeName;\n//                    lastType = lastPkg->findType(typeName);\n//                    if (!lastType) {\n//                        lastType = new Type(TypeApi,typeName,exp);\n//                        lastPkg->typeList.append(lastType);\n//                    }\n                }\n            }\n        }\n        if (findText.indexOf(m_text,0,m_bMatchCase?Qt::CaseSensitive:Qt::CaseInsensitive) >= 0) {\n            emit findApiOut(line,baseName,line,findUrl);\n        }\n    }\n}\n\nvoid FindApiThread::run()\n{   \n    QDir dir(m_rootPath);\n    if (!dir.exists()) {\n        return;\n    }\n    QStringList names;\n    names << \"next.txt\" << \"except.txt\" << \"go*.txt\";\n    foreach(QFileInfo info,dir.entryInfoList(names)) {\n        findInFile(info.filePath(),info.completeBaseName());\n    }\n}\n\nFindApiWidget::FindApiWidget(LiteApi::IApplication *app, QWidget *parent) :\n    QWidget(parent), m_liteApp(app)\n{\n    m_findEdit = new FindApiEdit;\n    m_findEdit->setPlaceholderText(tr(\"Search\"));\n\n    m_chaseWidget = new ChaseWidget;\n    m_chaseWidget->setMinimumSize(QSize(16,16));\n    m_chaseWidget->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred);\n\n    m_apiView = new QTreeView;\n    m_model = new QStandardItemModel(this);\n    m_model->setColumnCount(2);\n    m_apiView->setModel(m_model);\n    m_apiView->setEditTriggers(QTreeView::NoEditTriggers);\n    m_apiView->setHeaderHidden(true);\n//#if QT_VERSION >= 0x050000\n//    m_apiView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);\n//#else\n//    m_apiView->header()->setResizeMode(QHeaderView::ResizeToContents);\n//#endif\n    m_apiView->header()->setStretchLastSection(true);\n\n    QToolButton *findBtn = new QToolButton;\n    findBtn->setPopupMode(QToolButton::MenuButtonPopup);\n    findBtn->setText(tr(\"Find\"));\n\n    QHBoxLayout *findLayout = new QHBoxLayout;\n    findLayout->setMargin(2);\n    findLayout->addWidget(m_findEdit);\n    findLayout->addWidget(findBtn);\n    findLayout->addWidget(m_chaseWidget);\n\n    QVBoxLayout *mainLayout = new QVBoxLayout;\n    mainLayout->setMargin(1);\n    mainLayout->setSpacing(1);\n    mainLayout->addLayout(findLayout);\n    mainLayout->addWidget(m_apiView);\n\n    this->setLayout(mainLayout);\n\n    m_findThread = new FindApiThread(this);\n    connect(m_findThread,SIGNAL(findApiOut(QString,QString,QString,QStringList)),this,SLOT(findApiOut(QString,QString,QString,QStringList)));\n    connect(m_findThread,SIGNAL(finished()),this,SLOT(findApiFinished()));\n    //connect(m_findThread,SIGNAL(terminated()),this,SLOT(findApiTerminated()));\n    //connect(findBtn,SIGNAL(clicked()),this,SLOT(findApi()));\n    connect(m_findEdit,SIGNAL(returnPressed()),this,SLOT(findApi()));\n    //connect(m_findEdit,SIGNAL(rightButtonClicked()),m_findThread,SLOT(terminate()));\n    connect(m_apiView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(doubleClickedApi(QModelIndex)));\n\n    //m_rebuildThread = new ProcessEx(this);\n\n    m_findAct = new QAction(\"Search\",this);\n    m_caseCheckAct = new QAction(\"Match case\",this);\n    m_caseCheckAct->setCheckable(true);\n    //m_rebuildAct = new QAction(tr(\"Rebuild database\"),this);\n\n    QMenu *menu = new QMenu(tr(\"Find\"),findBtn);\n    menu->addAction(m_caseCheckAct);\n    menu->addSeparator();\n    //menu->addAction(m_rebuildAct);\n    findBtn->setMenu(menu);\n    findBtn->setDefaultAction(m_findAct);\n\n    connect(m_findAct,SIGNAL(triggered()),this,SLOT(findApi()));\n    //connect(m_rebuildAct,SIGNAL(triggered()),this,SLOT(rebuildApiData()));\n\n    m_caseCheckAct->setChecked(m_liteApp->settings()->value(\"goapisearch/match_case\",true).toBool());\n}\n\nFindApiWidget::~FindApiWidget()\n{\n    m_liteApp->settings()->setValue(\"goapisearch/match_case\",m_caseCheckAct->isChecked());\n//    if (m_rebuildThread->isRunning()) {\n//        if (!m_rebuildThread->waitForFinished(10000)) {\n//            m_rebuildThread->terminate();\n//        }\n//    }\n}\n\nvoid FindApiWidget::findApi()\n{\n    QString text = m_findEdit->text().trimmed();\n    if (text.length() <= 1) {\n        return;\n    }\n    m_model->clear();\n    m_chaseWidget->setAnimated(true);\n    m_findEdit->showStopButton(true);\n    QString goroot = LiteApi::getGOROOT(m_liteApp);\n    m_findThread->setRootPath(QFileInfo(goroot,\"api\").filePath());\n    m_findThread->setMatchCase(m_caseCheckAct->isChecked());    \n    m_findThread->findApi(text);\n}\n\nvoid FindApiWidget::findApiOut(const QString &text, const QString &baseName, const QString &tipInfo, const QStringList &url)\n{\n    QStandardItem *fitem = new QStandardItem(baseName);\n    fitem->setData(url,Qt::UserRole+1);\n    QStandardItem *item = new QStandardItem(text);\n    item->setToolTip(tipInfo);\n    //item->setData(url,Qt::UserRole+1);\n    m_model->appendRow(QList<QStandardItem*>() << fitem << item);\n}\n\nvoid FindApiWidget::findApiFinished()\n{\n    m_chaseWidget->setAnimated(false);\n    m_findEdit->showStopButton(false);\n}\n\nvoid FindApiWidget::doubleClickedApi(QModelIndex index)\n{\n    if (!index.isValid()) {\n        return;\n    }\n\n    emit openApiUrl(index.sibling(index.row(),0).data(Qt::UserRole+1).toStringList());\n}\n\n//void FindApiWidget::rebuildApiData()\n//{\n//    if (m_rebuildThread->isRunning()) {\n//        return;\n//    }\n//    m_rebuildThread->setEnvironment(LiteApi::getGoEnvironment(m_liteApp).toStringList());\n//    QString cmd = LiteApi::getGotools(m_liteApp);\n//    m_rebuildThread->setWorkingDirectory(m_liteApp->storagePath());\n//    QStringList args;\n//    args << \"goapi\" << \"-o\" << \"golangapi.txt\" << \"all\";\n//    m_rebuildThread->start(cmd,args);\n//}\n\n//QString FindApiWidget::apiDataFile() const\n//{\n//    return m_liteApp->storagePath()+\"/golangapi.txt\";\n//}\n"
  },
  {
    "path": "liteidex/src/plugins/golangdoc/findapiwidget.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: findapiwidget.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef FINDAPIWIDGET_H\r\n#define FINDAPIWIDGET_H\r\n\r\n#include \"liteapi/liteapi.h\"\r\n#include \"qtc_editutil/fancylineedit.h\"\r\n#include \"qt_browser/chasewidget.h\"\r\n#include \"processex/processex.h\"\r\n#include <QWidget>\r\n#include <QThread>\r\n#include <QModelIndex>\r\n#include <QSet>\r\n\r\nclass QListView;\r\nclass QTreeView;\r\nclass QStandardItemModel;\r\nclass FindApiThread : public QThread\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    FindApiThread(QObject *parent);\r\n    ~FindApiThread();\r\nsignals:\r\n    void findApiOut(const QString &text, const QString &baseName, const QString &tipInfo, const QStringList &url);\r\npublic:\r\n    void setRootPath(const QString &rootPath);\r\n    void findApi(const QString &text);\r\n    void stopFind();\r\n    void setMatchCase(bool b);\r\n    void findInFile(const QString &filePath, const QString &baseName);\r\nprotected:\r\n    virtual void\trun ();\r\n    QString m_text;\r\n    QString m_rootPath;\r\n    bool    m_bMatchCase;\r\n};\r\n\r\nclass FindApiEdit : public Utils::FancyLineEdit\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    FindApiEdit(QWidget *parent = 0)\r\n        : Utils::FancyLineEdit(parent)\r\n    {\r\n        QIcon icon = QIcon::fromTheme(layoutDirection() == Qt::LeftToRight ?\r\n                         QLatin1String(\"edit-clear-locationbar-rtl\") :\r\n                         QLatin1String(\"edit-clear-locationbar-ltr\"),\r\n                         QIcon::fromTheme(QLatin1String(\"edit-clear\"), QIcon(QLatin1String(\"icon:images/editclear.png\"))));\r\n\r\n        setButtonPixmap(Right, icon.pixmap(16));\r\n        setPlaceholderText(tr(\"Search\"));\r\n        setButtonToolTip(Right, tr(\"Stop Search\"));\r\n    }\r\n    void showStopButton(bool b)\r\n    {\r\n        this->setButtonVisible(Right,b);\r\n    }\r\n};\r\n\r\nclass FindApiWidget : public QWidget\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    explicit FindApiWidget(LiteApi::IApplication *app,QWidget *parent = 0);\r\n    ~FindApiWidget();\r\nsignals:\r\n    void openApiUrl(QStringList);\r\npublic slots:\r\n    void findApi();\r\n    void findApiOut(const QString &text, const QString &baseName, const QString &tipInfo, const QStringList &url);\r\n    void findApiFinished();\r\n    void doubleClickedApi(QModelIndex);\r\n   // void rebuildApiData();\r\n    //QString apiDataFile() const;\r\nprotected:\r\n    FindApiThread *m_findThread;\r\n    LiteApi::IApplication *m_liteApp;\r\n    FindApiEdit           *m_findEdit;\r\n    ChaseWidget           *m_chaseWidget;\r\n    QTreeView             *m_apiView;\r\n    QStandardItemModel    *m_model;\r\n    //ProcessEx             *m_rebuildThread;\r\n    QAction               *m_findAct;\r\n    QAction               *m_caseCheckAct;\r\n    //QAction               *m_rebuildAct;\r\n};\r\n\r\n#endif // FINDAPIWIDGET_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangdoc/finddocwidget.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: finddocwidget.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"finddocwidget.h\"\r\n#include \"liteenvapi/liteenvapi.h\"\r\n#include \"golangdoc_global.h\"\r\n#include <QVBoxLayout>\r\n#include <QHBoxLayout>\r\n#include <QLabel>\r\n#include <QToolButton>\r\n#include <QActionGroup>\r\n#include <QAction>\r\n#include <QCoreApplication>\r\n#include <QPlainTextEdit>\r\n#include <QTextBrowser>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nstatic char help[] =\r\n\"<b>Search Format</b>\"\r\n\"<pre>\"\r\n\"fmt.\\n\"\r\n\"    Extracts all fmt pkg symbol document\\n\"\r\n\"fmt.Println or fmt Println\\n\"\r\n\"    Extracts fmt.Println document\\n\"\r\n\"fmt.Print or fmt Print\\n\"\r\n\"    Extracts fmt.Print fmt.Printf fmt.Println etc\\n\"\r\n\"Println\\n\"\r\n\"    Extracts fmt.Println log.Println log.Logger.Println etc\"\r\n\"</pre>\"\r\n\"<b>Search Option</b>\"\r\n\"<pre>\"\r\n\"Match Word.\\n\"\r\n\"    Match whole world only\\n\"\r\n\"Match Case\\n\"\r\n\"    Match case sensitive\\n\"\r\n\"Use Regexp\\n\"\r\n\"    Use regexp for search\\n\"\r\n\"    example fmt p.*\\n\"\r\n\"</pre>\"\r\n;\r\n\r\nclass SearchEdit : public Utils::FancyLineEdit\r\n{\r\n    Q_DECLARE_TR_FUNCTIONS(SearchEdit)\r\npublic:\r\n    SearchEdit(QWidget *parent = 0)\r\n        : Utils::FancyLineEdit(parent)\r\n    {\r\n        QIcon icon = QIcon::fromTheme(layoutDirection() == Qt::LeftToRight ?\r\n                         QLatin1String(\"edit-clear-locationbar-rtl\") :\r\n                         QLatin1String(\"edit-clear-locationbar-ltr\"),\r\n                         QIcon::fromTheme(QLatin1String(\"edit-clear\"), QIcon(QLatin1String(\"icon:images/editclear.png\"))));\r\n\r\n        setButtonPixmap(Right, icon.pixmap(16));\r\n        setPlaceholderText(tr(\"Search\"));\r\n        setButtonToolTip(Right, tr(\"Stop Search\"));\r\n    }\r\n    void showStopButton(bool b)\r\n    {\r\n        this->setButtonVisible(Right,b);\r\n    }\r\n};\r\n\r\nFindDocWidget::FindDocWidget(LiteApi::IApplication *app, QWidget *parent) :\r\n    QWidget(parent), m_liteApp(app)\r\n{\r\n    m_findEdit = new SearchEdit;\r\n    m_findEdit->setPlaceholderText(tr(\"Search\"));\r\n\r\n    m_chaseWidget = new ChaseWidget;\r\n    m_chaseWidget->setMinimumSize(QSize(16,16));\r\n    m_chaseWidget->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred);\r\n\r\n    QToolButton *findBtn = new QToolButton;\r\n    findBtn->setPopupMode(QToolButton::InstantPopup);\r\n    findBtn->setText(tr(\"Find\"));\r\n\r\n    QHBoxLayout *findLayout = new QHBoxLayout;\r\n    findLayout->setMargin(2);\r\n    findLayout->addWidget(m_findEdit);\r\n    findLayout->addWidget(findBtn);\r\n    findLayout->addWidget(m_chaseWidget);\r\n\r\n    m_browser = m_liteApp->htmlWidgetManager()->createByName(this,\"QTextBrowser\");\r\n    QStringList paths;\r\n    paths << m_liteApp->resourcePath()+\"/packages/go/godoc\";\r\n    m_browser->setSearchPaths(paths);\r\n\r\n    QVBoxLayout *mainLayout = new QVBoxLayout;\r\n    mainLayout->setMargin(1);\r\n    mainLayout->setSpacing(1);\r\n    mainLayout->addLayout(findLayout);\r\n    mainLayout->addWidget(m_browser->widget());\r\n\r\n    QAction *findAll = new QAction(tr(\"Find All\"),this);\r\n    QAction *findConst = new QAction(tr(\"Find const\"),this);\r\n    findConst->setData(\"const\");\r\n    QAction *findFunc = new QAction(tr(\"Find func\"),this);\r\n    findFunc->setData(\"func\");\r\n    QAction *findInterface = new QAction(tr(\"Find interface\"),this);\r\n    findInterface->setData(\"interface\");\r\n    QAction *findPkg = new QAction(tr(\"Find pkg\"),this);\r\n    findPkg->setData(\"pkg\");\r\n    QAction *findStruct = new QAction(tr(\"Find struct\"),this);\r\n    findStruct->setData(\"struct\");\r\n    QAction *findType = new QAction(tr(\"Find type\"),this);\r\n    findType->setData(\"type\");\r\n    QAction *findVar = new QAction(tr(\"Find var\"),this);\r\n    findVar->setData(\"var\");\r\n    m_useRegexpCheckAct = new QAction(tr(\"Use Regexp\"),this);\r\n    m_useRegexpCheckAct->setCheckable(true);\r\n    m_matchCaseCheckAct = new QAction(tr(\"Match Case\"),this);\r\n    m_matchCaseCheckAct->setCheckable(true);\r\n    m_matchWordCheckAct = new QAction(tr(\"Match Word\"),this);\r\n    m_matchWordCheckAct->setCheckable(true);\r\n\r\n    m_useRegexpCheckAct->setChecked(m_liteApp->settings()->value(GODOCFIND_USEREGEXP,false).toBool());\r\n    m_matchCaseCheckAct->setChecked(m_liteApp->settings()->value(GODOCFIND_MATCHCASE,true).toBool());\r\n    m_matchWordCheckAct->setChecked(m_liteApp->settings()->value(GODOCFIND_MATCHWORD,false).toBool());\r\n\r\n    QMenu *menu = new QMenu(findBtn);\r\n    menu->addActions(QList<QAction*>()\r\n                     << findAll\r\n                     //<< findPkg\r\n                     );\r\n    menu->addSeparator();\r\n    menu->addActions(QList<QAction*>()\r\n                     << findInterface\r\n                     << findStruct\r\n                     << findType\r\n                     << findFunc\r\n                     << findConst\r\n                     << findVar\r\n                     );\r\n    menu->addSeparator();\r\n    menu->addAction(m_matchWordCheckAct);\r\n    menu->addAction(m_matchCaseCheckAct);\r\n    menu->addAction(m_useRegexpCheckAct);\r\n    findBtn->setMenu(menu);\r\n\r\n    QAction *helpAct = new QAction(tr(\"Help\"),this);\r\n    menu->addSeparator();\r\n    menu->addAction(helpAct);\r\n    connect(helpAct,SIGNAL(triggered()),this,SLOT(showHelp()));\r\n\r\n    this->setLayout(mainLayout);    \r\n\r\n\r\n    connect(findAll,SIGNAL(triggered()),this,SLOT(findDoc()));\r\n    connect(findConst,SIGNAL(triggered()),this,SLOT(findDoc()));\r\n    connect(findFunc,SIGNAL(triggered()),this,SLOT(findDoc()));\r\n    connect(findInterface,SIGNAL(triggered()),this,SLOT(findDoc()));\r\n    connect(findPkg,SIGNAL(triggered()),this,SLOT(findDoc()));\r\n    connect(findStruct,SIGNAL(triggered()),this,SLOT(findDoc()));\r\n    connect(findType,SIGNAL(triggered()),this,SLOT(findDoc()));\r\n    connect(findVar,SIGNAL(triggered()),this,SLOT(findDoc()));\r\n\r\n    m_process = new ProcessEx(this);\r\n    connect(m_process,SIGNAL(stateChanged(QProcess::ProcessState)),this,SLOT(stateChanged(QProcess::ProcessState)));\r\n    connect(m_process,SIGNAL(extOutput(QByteArray,bool)),this,SLOT(extOutput(QByteArray,bool)));\r\n    connect(m_process,SIGNAL(extFinish(bool,int,QString)),this,SLOT(extFinish(bool,int,QString)));\r\n    connect(m_findEdit,SIGNAL(returnPressed()),findAll,SIGNAL(triggered()));\r\n    connect(m_findEdit,SIGNAL(rightButtonClicked()),this,SLOT(abortFind()));\r\n    connect(m_browser,SIGNAL(linkClicked(QUrl)),this,SLOT(openUrl(QUrl)));\r\n\r\n\r\n    QString path = m_liteApp->resourcePath()+\"/packages/go/godoc/finddoc.html\";\r\n    QFile file(path);\r\n    if (file.open(QIODevice::ReadOnly)) {\r\n        m_templateData = file.readAll();\r\n        file.close();\r\n    }\r\n\r\n    //QFont font = m_browser->widget()->font();\r\n    //font.setPointSize(12);\r\n    //m_browser->widget()->setFont(font);\r\n\r\n    showHelp();\r\n}\r\n\r\nFindDocWidget::~FindDocWidget()\r\n{\r\n    m_liteApp->settings()->setValue(GODOCFIND_MATCHCASE,m_matchCaseCheckAct->isChecked());\r\n    m_liteApp->settings()->setValue(GODOCFIND_MATCHWORD,m_matchWordCheckAct->isChecked());\r\n    m_liteApp->settings()->setValue(GODOCFIND_USEREGEXP,m_useRegexpCheckAct->isChecked());\r\n\r\n    abortFind();\r\n    delete m_process;\r\n}\r\n\r\nvoid FindDocWidget::findDoc()\r\n{\r\n    QAction *act = (QAction*)sender();\r\n\r\n    QString text = m_findEdit->text().trimmed();\r\n    if (text.isEmpty()) {\r\n        return;\r\n    }\r\n\r\n    QString findFlag = act->data().toString();\r\n\r\n    abortFind();\r\n\r\n    QStringList args;\r\n    args << \"finddoc\" << \"-urltag\" << \"<liteide_doc>\";\r\n    if (m_matchWordCheckAct->isChecked()) {\r\n       args << \"-word\";\r\n    }\r\n    if (m_matchCaseCheckAct->isChecked()) {\r\n        args << \"-case\";\r\n    }\r\n    if (m_useRegexpCheckAct->isChecked()) {\r\n        args << \"-r\";\r\n    }\r\n    if (!findFlag.isEmpty()) {\r\n        args << \"-\"+findFlag;\r\n    }\r\n    args << text.split(\" \");\r\n\r\n    m_browser->clear();\r\n    m_findFlag = findFlag;\r\n    m_htmlData.clear();\r\n    QString cmd = LiteApi::getGotools(m_liteApp);\r\n    m_process->setEnvironment(LiteApi::getGoEnvironment(m_liteApp).toStringList());\r\n    m_process->start(cmd,args);\r\n}\r\n\r\nstruct doc_comment {\r\n    QString     url;\r\n    QString     file;\r\n    QStringList comment;\r\n};\r\n\r\nvoid FindDocWidget::extOutput(QByteArray data, bool error)\r\n{\r\n    if (error) {\r\n        m_liteApp->appendLog(\"FindDoc\",QString::fromUtf8(data),false);\r\n        return;\r\n    }\r\n/*\r\nhttp://golang.org/pkg\\fmt\\#Println\r\nc:\\go\\src\\pkg\\log\\log.go:169:\r\n// Println calls l.Output to print to the logger.\r\n// Arguments are handled in the manner of fmt.Println.\r\nfunc (l *Logger) Println(v ...interface{})\r\n\r\nhttp://godoc.org\\code.google.com\\p\\go.tools\\cmd\\vet\\#Println\r\nF:\\vfc\\liteide-git\\liteidex\\src\\code.google.com\\p\\go.tools\\cmd\\vet\\main.go:375:\r\n// Println is fmt.Println guarded by -v.\r\nfunc Println(args ...interface{})\r\n*/\r\n    QList<doc_comment> dc_array;\r\n    doc_comment dc;\r\n    int flag = 0;\r\n    foreach (QString line, QString::fromUtf8(data).split(\"\\n\")) {\r\n        if (line.startsWith(\"<liteide_doc>\")) {\r\n            flag = 1;\r\n            if (!dc.url.isEmpty()) {\r\n                dc_array.push_back(dc);\r\n            }\r\n            dc.url = line.mid(13);\r\n            dc.file.clear();\r\n            dc.comment.clear();\r\n            continue;\r\n        }\r\n        if (flag == 1) {\r\n            dc.file = line;\r\n            flag = 2;\r\n            continue;\r\n        }\r\n        if (flag == 2) {\r\n            dc.comment.push_back(line);\r\n        }\r\n    }\r\n    if (!dc.url.isEmpty()) {\r\n        dc_array.push_back(dc);\r\n    }\r\n    QStringList array;\r\n    foreach (doc_comment dc, dc_array) {\r\n        array.append(docToHtml(dc.url,dc.file,dc.comment));\r\n    }\r\n //   qDebug() << array.join(\"\\n\");\r\n//    if (m_findFlag == \"pkg\") {\r\n//        array = parserPkgDoc(QString::fromUtf8(data));\r\n//    } else {\r\n//        array = parserDoc(QString::fromUtf8(data));\r\n//    }\r\n\r\n    m_htmlData.append(array.join(\"\\n\"));\r\n    QString html = m_templateData;\r\n    html.replace(\"{content}\",m_htmlData);\r\n    int pos = m_browser->scrollBarValue(Qt::Vertical);\r\n    m_browser->setHtml(html,QUrl());\r\n    m_browser->setScrollBarValue(Qt::Vertical,pos);\r\n}\r\n\r\nvoid FindDocWidget::extFinish(bool, int, QString)\r\n{\r\n    if (m_htmlData.isEmpty()) {\r\n        QString html = m_templateData;\r\n        html.replace(\"{content}\",\"<b>Not found!</b>\");\r\n        m_browser->setHtml(html,QUrl());\r\n    }\r\n    m_htmlData.clear();\r\n}\r\n\r\nvoid FindDocWidget::abortFind()\r\n{\r\n    m_process->stop(100);\r\n}\r\n\r\nvoid FindDocWidget::stateChanged(QProcess::ProcessState state)\r\n{\r\n    m_chaseWidget->setAnimated(state == QProcess::Running);\r\n    m_findEdit->showStopButton(state == QProcess::Running);\r\n}\r\n\r\nvoid FindDocWidget::openUrl(QUrl url)\r\n{\r\n    if (!url.isLocalFile()) {\r\n        return;\r\n    }\r\n    QString text = url.toLocalFile();\r\n    QRegExp rep(\"(\\\\w?\\\\:?[\\\\w\\\\d\\\\_\\\\-\\\\\\\\/\\\\.]+):(\\\\d+):\");\r\n    int index = rep.indexIn(text);\r\n    if (index < 0)\r\n        return;\r\n    QStringList capList = rep.capturedTexts();\r\n\r\n    if (capList.count() < 3)\r\n        return;\r\n    QString fileName = capList[1];\r\n    QString fileLine = capList[2];\r\n\r\n    bool ok = false;\r\n    int line = fileLine.toInt(&ok);\r\n    if (!ok)\r\n        return;\r\n\r\n    LiteApi::IEditor *editor = m_liteApp->fileManager()->openEditor(fileName,true);\r\n    if (editor) {\r\n        LiteApi::ITextEditor *textEditor =  LiteApi::getTextEditor(editor);\r\n        if (textEditor) {\r\n            textEditor->gotoLine(line-1,0,true);\r\n        }\r\n    }\r\n}\r\n\r\nvoid FindDocWidget::showHelp()\r\n{\r\n    QString data = m_templateData;\r\n    data.replace(\"{content}\",help);\r\n    m_browser->setHtml(data,QUrl());\r\n}\r\n\r\nstatic QString escape(const QString &text) {\r\n#if QT_VERSION >= 0x050000\r\n    return QString(text).toHtmlEscaped();\r\n#else\r\n    return Qt::escape(text);\r\n#endif\r\n}\r\n\r\nQStringList FindDocWidget::docToHtml(const QString &url, const QString &file, const QStringList &comment)\r\n{\r\n    QString sz;\r\n    QString pkgName;\r\n    QString findName;\r\n    if (url.startsWith(\"http://golang.org/pkg\")) {\r\n        sz = url.mid(21);\r\n    } else if (url.startsWith(\"http://golang.org/cmd\")) {\r\n        sz = url.mid(21);\r\n    } else if (url.startsWith(\"http://godoc.org\")) {\r\n        sz = url.mid(16);\r\n    }\r\n    //\\code.google.com\\p\\go.tools\\cmd\\vet\\#Println\r\n    int pos = sz.indexOf(\"#\");\r\n    if (pos != -1) {\r\n        pkgName = QDir::fromNativeSeparators(sz.left(pos));\r\n        if (pkgName.startsWith(\"/\")) {\r\n            pkgName = pkgName.mid(1);\r\n        }\r\n        if (pkgName.endsWith(\"/\")) {\r\n            pkgName = pkgName.left(pkgName.length()-1);\r\n        }\r\n        findName = sz.mid(pos+1);\r\n    }\r\n    QStringList array;\r\n    array.push_back(QString(\"<h4><b>%2</b>&nbsp;&nbsp;<a href=\\\"file:%1\\\">%3</a></h4>\")\r\n                    .arg(QDir::fromNativeSeparators(escape(file))).arg(pkgName).arg(findName));\r\n    if (!comment.isEmpty() &&\r\n            (  comment.first().startsWith(\"const (\") ||\r\n               comment.first().startsWith(\"var (\")) ) {\r\n        array.push_back(\"<pre>\");\r\n        QString head = \"const \";\r\n        if (comment.first().startsWith(\"var (\")) {\r\n            head = \"var \";\r\n        }\r\n        QStringList incmd;\r\n        foreach (QString sz, comment) {\r\n            if (sz.trimmed().startsWith(\"//\")) {\r\n                incmd.push_back(escape(sz.trimmed()));\r\n            } else if (sz.indexOf(findName) >= 0) {\r\n                array.append(incmd);\r\n                array.push_back(escape(head+sz.replace(\"\\t\",\" \").trimmed()));\r\n            } else {\r\n                incmd.clear();\r\n            }\r\n        }\r\n        array.push_back(\"</pre>\");\r\n        return array;\r\n    }\r\n\r\n    int flag = 0;\r\n    QString lastTag;\r\n    foreach (QString sz, comment) {\r\n        if (sz.startsWith(\"//\")) {\r\n            if (flag != 1) {\r\n                if (!lastTag.isEmpty()) array.push_back(lastTag);\r\n                array.push_back(\"<p>\");\r\n                lastTag = \"</p>\";\r\n            }\r\n            flag = 1;\r\n            if (sz.mid(2).trimmed().isEmpty()) {\r\n                array.push_back(\"</p><p>\");\r\n            } else {\r\n                array.push_back(escape(sz.mid(2)));\r\n            }\r\n        } else {\r\n            if (sz.trimmed().isEmpty()) {\r\n                continue;\r\n            }\r\n            if (flag != 3) {\r\n                if (!lastTag.isEmpty()) array.push_back(lastTag);\r\n                array.push_back(\"<pre>\");\r\n                lastTag = \"</pre>\";\r\n            }\r\n            flag = 3;\r\n            array.push_back(escape(sz.replace(\"\\t\",\"    \")));\r\n        }\r\n    }\r\n    if (!lastTag.isEmpty()) array.push_back(lastTag);\r\n    array.push_back(\"<p></p>\");\r\n    return array;\r\n}\r\n\r\nQStringList FindDocWidget::parserDoc(QString findText)\r\n{\r\n    QStringList array;\r\n    int lastFlag = 0;\r\n    QString findName;\r\n    QString findPos;\r\n    QString findComment;\r\n    foreach (QString sz, findText.split('\\n')) {\r\n        int flag = 0;\r\n        if (sz.startsWith(\"http://golang.org/pkg\")) {\r\n            flag = 1;\r\n            sz = sz.mid(21);\r\n        } else if (sz.startsWith(\"http://golang.org/cmd\")) {\r\n            flag = 1;\r\n            sz = sz.mid(21);\r\n        } else if (sz.startsWith(\"http://godoc.org\")) {\r\n            flag = 1;\r\n            sz = sz.mid(16);\r\n        } else if (sz.startsWith(\"//\")) {\r\n            flag = 2;\r\n            sz = sz.mid(2);\r\n        } else if (sz.isEmpty()) {\r\n            flag = 4;\r\n        } else {\r\n            flag = 3;\r\n        }\r\n\r\n        if (flag == 1) {\r\n            //\\code.google.com\\p\\go.tools\\cmd\\vet\\#Println\r\n            int pos = sz.indexOf(\"#\");\r\n            if (pos != -1) {\r\n                QString pkg = sz.left(pos);\r\n                pkg = QDir::fromNativeSeparators(pkg);\r\n                if (pkg.startsWith(\"/\")) {\r\n                    pkg = pkg.mid(1);\r\n                }\r\n                if (pkg.endsWith(\"/\")) {\r\n                    pkg = pkg.left(pkg.length()-1);\r\n                }\r\n                sz = pkg+sz.mid(pos);\r\n                findName = sz;\r\n            } else {\r\n                QString pkg = sz;\r\n                pkg = QDir::fromNativeSeparators(pkg);\r\n                if (pkg.startsWith(\"/\")) {\r\n                    pkg = pkg.mid(1);\r\n                }\r\n                if (pkg.endsWith(\"/\")) {\r\n                    pkg = pkg.left(pkg.length()-1);\r\n                }\r\n                findName = pkg;\r\n            }\r\n        } else if (flag == 3) {\r\n            if (lastFlag == 1) {\r\n                findPos = \"file:\"+sz;\r\n                array.push_back(QString(\"<h3><a href=\\\"%1\\\">%2</a></h3>\").arg(findPos).arg(findName));\r\n            }  else {\r\n                array.push_back(QString(\"<b>%1</b>\").arg(sz));\r\n                if (!findComment.isEmpty()) {\r\n                    array.push_back(QString(\"<p>%1</p>\").arg(findComment));\r\n                }\r\n                findComment.clear();\r\n            }\r\n        } else if (flag == 2) {\r\n            findComment += sz.trimmed();\r\n        } else if (flag == 4) {\r\n        }\r\n        lastFlag = flag;\r\n    }\r\n\r\n    return array;\r\n}\r\n\r\nQStringList FindDocWidget::parserPkgDoc(QString findText)\r\n{\r\n    QStringList array;\r\n    int lastFlag = 0;\r\n    QString findName;\r\n    QString findPos;\r\n    QString findComment;\r\n    bool bHead = false;\r\n    foreach (QString sz, findText.split('\\n')) {\r\n        int flag = 0;\r\n        if (sz.startsWith(\"http://golang.org/pkg\")) {\r\n            flag = 1;\r\n            sz = sz.mid(21);\r\n        } else if (sz.startsWith(\"http://golang.org/cmd\")) {\r\n            flag = 1;\r\n            sz = sz.mid(21);\r\n        } else if (sz.startsWith(\"http://godoc.org\")) {\r\n            flag = 1;\r\n            sz = sz.mid(16);\r\n        } else {\r\n            flag = 3;\r\n        }\r\n\r\n        if (flag == 1) {\r\n            bHead = false;\r\n        }\r\n\r\n        if (bHead) {\r\n//            findComment.append(sz+\"\\n\");\r\n            if (sz.startsWith(\"\\t\\t\")) {\r\n                flag = 5;\r\n            } else if (sz.trimmed().isEmpty()){\r\n                flag = 6;\r\n            } else {\r\n                flag = 7;\r\n            }\r\n            sz.replace(\"\\t\",\" \");\r\n            if (lastFlag != flag && !findComment.isEmpty()) {\r\n                if (lastFlag == 5) {\r\n                    array.push_back(QString(\"<pre>%1</pre>\").arg(findComment));\r\n                } else {\r\n                    array.push_back(QString(\"<p>%1</p>\").arg(findComment));\r\n                }\r\n                findComment.clear();\r\n            }\r\n            if (flag == 5) {\r\n                findComment += sz.trimmed()+\"\\n\";\r\n            } else {\r\n                findComment += sz.trimmed();\r\n            }\r\n            lastFlag = flag;\r\n            continue;\r\n        }\r\n\r\n        if (flag == 1) {\r\n            //\\code.google.com\\p\\go.tools\\cmd\\vet\\#Println\r\n            int pos = sz.indexOf(\"#\");\r\n            if (pos != -1) {\r\n                QString pkg = sz.left(pos);\r\n                pkg = QDir::fromNativeSeparators(pkg);\r\n                if (pkg.startsWith(\"/\")) {\r\n                    pkg = pkg.mid(1);\r\n                }\r\n                if (pkg.endsWith(\"/\")) {\r\n                    pkg = pkg.left(pkg.length()-1);\r\n                }\r\n                sz = pkg+sz.mid(pos);\r\n                findName = sz;\r\n            } else {\r\n                QString pkg = sz;\r\n                pkg = QDir::fromNativeSeparators(pkg);\r\n                if (pkg.startsWith(\"/\")) {\r\n                    pkg = pkg.mid(1);\r\n                }\r\n                if (pkg.endsWith(\"/\")) {\r\n                    pkg = pkg.left(pkg.length()-1);\r\n                }\r\n                findName = pkg;\r\n            }\r\n        } else if (flag == 3) {\r\n            if (lastFlag == 1) {\r\n                findPos = \"file:\"+sz;\r\n                array.push_back(QString(\"<h3><a href=\\\"%1\\\">%2</a></h3>\").arg(findPos).arg(findName));\r\n                bHead = true;\r\n            }\r\n        } else if (flag == 2) {\r\n            findComment += sz.trimmed();\r\n        }\r\n        lastFlag = flag;\r\n    }\r\n    if (!findComment.isEmpty()) {\r\n        if (lastFlag == 5) {\r\n            array.push_back(QString(\"<pre>%1</pre>\").arg(findComment));\r\n        } else {\r\n            array.push_back(QString(\"<p>%1</p>\").arg(findComment));\r\n        }\r\n    }\r\n    return array;\r\n}\r\n\r\n\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangdoc/finddocwidget.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: finddocwidget.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FINDDOCWIDGET_H\n#define FINDDOCWIDGET_H\n\n#include \"liteapi/liteapi.h\"\n#include \"qtc_editutil/filterlineedit.h\"\n#include \"qtc_editutil/fancylineedit.h\"\n#include \"qt_browser/chasewidget.h\"\n#include \"processex/processex.h\"\n\nclass SearchEdit;\nclass QTextBrowser;\n\nclass FindDocWidget : public QWidget\n{\n    Q_OBJECT\npublic:\n    explicit FindDocWidget(LiteApi::IApplication *app, QWidget *parent = 0);\n    ~FindDocWidget();    \nprotected slots:\n    void findDoc();\n    void extOutput(QByteArray,bool);    \n    void extFinish(bool,int,QString);\n    void abortFind();\n    void stateChanged(QProcess::ProcessState);\n    void openUrl(QUrl);\n    void showHelp();\nprotected:\n    QStringList docToHtml(const QString &url,const QString &file,const QStringList &comment);\n    QStringList parserDoc(QString findText);\n    QStringList parserPkgDoc(QString findText);\n    LiteApi::IApplication *m_liteApp;\n    SearchEdit            *m_findEdit;\n    ChaseWidget           *m_chaseWidget;\n    QAction* m_matchWordCheckAct;\n    QAction* m_matchCaseCheckAct;\n    QAction* m_useRegexpCheckAct;\n    ProcessEx *m_process;\n    LiteApi::IHtmlWidget *m_browser;\n    QString    m_findFlag;\n    QString    m_templateData;\n    QString    m_htmlData;\n};\n\n#endif // FINDDOCWIDGET_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangdoc/golangdoc.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangdoc.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangdoc.h\"\n#include \"litebuildapi/litebuildapi.h\"\n#include \"processex/processex.h\"\n#include \"fileutil/fileutil.h\"\n#include \"htmlutil/htmlutil.h\"\n#include \"golangapi/golangapi.h\"\n#include \"documentbrowser/documentbrowser.h\"\n#include \"qjson/include/QJson/Parser\"\n#include \"finddocwidget.h\"\n#include \"findapiwidget.h\"\n\n#include <QListView>\n#include <QStringListModel>\n#include <QSortFilterProxyModel>\n#include <QVBoxLayout>\n#include <QHBoxLayout>\n#include <QLabel>\n#include <QLineEdit>\n#include <QComboBox>\n#include <QToolBar>\n#include <QStatusBar>\n#include <QPushButton>\n#include <QMenu>\n#include <QAction>\n#include <QFile>\n#include <QDir>\n#include <QTextBrowser>\n#include <QUrl>\n#if QT_VERSION >= 0x050000\n#include <QUrlQuery>\n#endif\n#include <QPlainTextEdit>\n#include <QTextCursor>\n#include <QGroupBox>\n#include <QToolButton>\n#include <QTextCodec>\n#include <QTextCursor>\n#include <QDesktopServices>\n#include <QDomDocument>\n#include <QScrollBar>\n#include <QTextBlock>\n#include <QToolTip>\n#include <QTimer>\n#include <QDateTime>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nvoid ListViewEx::currentChanged(const QModelIndex &current, const QModelIndex&)\n{\n    emit currentIndexChanged(current);\n}\n\nGolangDoc::GolangDoc(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IGolangDoc(parent),\n    m_liteApp(app)\n{\n    m_findProcess = new ProcessEx(this);\n    m_godocProcess = new ProcessEx(this);\n\n    m_findDocWidget = new FindDocWidget(m_liteApp);\n    m_docSearchWindowAct = m_liteApp->toolWindowManager()->addToolWindow(Qt::BottomDockWidgetArea,m_findDocWidget,\"GoDocSearch\",tr(\"Go Doc Search\"),true);\n\n    m_findApiWidget = new FindApiWidget(m_liteApp);\n\n    m_apiSearchWindowAct = m_liteApp->toolWindowManager()->addToolWindow(Qt::BottomDockWidgetArea,m_findApiWidget,\"GoApiIndex\",tr(\"Go Api Index\"),true);\n    connect(m_findApiWidget,SIGNAL(openApiUrl(QStringList)),this,SLOT(openApiUrl(QStringList)));\n\n    m_docBrowser = new DocumentBrowser(m_liteApp,this);\n    m_docBrowser->setName(tr(\"Godoc Search\"));\n\n    QStringList paths;\n    paths << m_liteApp->resourcePath()+\"/packages/go/godoc\";\n    m_docBrowser->setSearchPaths(paths);\n\n    m_godocFindComboBox = new QComboBox;\n    m_godocFindComboBox->setMinimumWidth(100);\n    m_godocFindComboBox->setEditable(true);\n    //m_godocFindComboBox->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);\n    m_docBrowser->toolBar()->addSeparator();\n    m_docBrowser->toolBar()->addWidget(new QLabel(tr(\"Find Package:\")));\n    m_docBrowser->toolBar()->addWidget(m_godocFindComboBox);\n\n    m_browserAct = m_liteApp->editorManager()->registerBrowser(m_docBrowser);\n    m_liteApp->actionManager()->insertViewMenu(LiteApi::ViewMenuBrowserPos,m_browserAct);\n\n    connect(m_apiSearchWindowAct,SIGNAL(toggled(bool)),this,SLOT(toggledApiSearchWindow(bool)));\n    connect(m_docSearchWindowAct,SIGNAL(toggled(bool)),this,SLOT(toggledDocSearchWindow(bool)));\n\n    connect(m_docBrowser,SIGNAL(requestUrl(QUrl)),this,SLOT(openUrl(QUrl)));\n    connect(m_docBrowser,SIGNAL(linkHovered(QUrl)),this,SLOT(highlighted(QUrl)));\n    connect(m_docBrowser,SIGNAL(documentLoaded()),this,SLOT(documentLoaded()));\n    connect(m_docBrowser,SIGNAL(anchorChanged(QString)),this,SLOT(anchorChanged(QString)));\n    connect(m_godocFindComboBox,SIGNAL(activated(QString)),this,SLOT(godocFindPackage(QString)));\n    connect(m_godocProcess,SIGNAL(extOutput(QByteArray,bool)),this,SLOT(godocOutput(QByteArray,bool)));\n    connect(m_godocProcess,SIGNAL(extFinish(bool,int,QString)),this,SLOT(godocFinish(bool,int,QString)));\n    connect(m_findProcess,SIGNAL(extOutput(QByteArray,bool)),this,SLOT(findOutput(QByteArray,bool)));\n    connect(m_findProcess,SIGNAL(extFinish(bool,int,QString)),this,SLOT(findFinish(bool,int,QString)));\n    connect(m_liteApp,SIGNAL(loaded()),this,SLOT(appLoaded()));\n\n    m_envManager = LiteApi::findExtensionObject<LiteApi::IEnvManager*>(m_liteApp,\"LiteApi.IEnvManager\");\n    if (m_envManager) {\n        connect(m_envManager,SIGNAL(currentEnvChanged(LiteApi::IEnv*)),this,SLOT(currentEnvChanged(LiteApi::IEnv*)));\n    }\n\n    m_liteApp->extension()->addObject(\"LiteApi.IGolangDoc\",this);\n    //m_liteApp->extension()->addObject(\"LiteApi.IGolangApi\",m_golangApiThread);\n\n    QString path = m_liteApp->resourcePath()+\"/packages/go/godoc/godoc.html\";\n    QFile file(path);\n    if (file.open(QIODevice::ReadOnly)) {\n        m_templateData = file.readAll();\n        file.close();\n    }\n    QString about = m_liteApp->resourcePath()+\"/packages/go/godoc/about.html\";\n    QFileInfo info(about);\n    if(info.exists()) {\n        m_templateData.replace(\"{about}\",info.filePath());\n    }\n\n    QUrl url;\n    url.setScheme(\"file\");\n    url.setPath(info.filePath());\n    openUrl(url);    \n}\n\nGolangDoc::~GolangDoc()\n{\n    m_liteApp->settings()->setValue(\"golangdoc/goroot\",m_goroot);\n    if (m_docBrowser) {\n        delete m_docBrowser;\n    }\n    delete m_findDocWidget;\n    delete m_findApiWidget;\n}\n\n\nvoid GolangDoc::currentEnvChanged(LiteApi::IEnv*)\n{\n    loadEnv();\n//    if (!m_bApiLoaded) {\n//        return;\n//    }\n    //loadApi();\n}\n\nvoid GolangDoc::loadEnv()\n{    \n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);//m_envManager->currentEnvironment();\n//    if (!LiteApi::hasGoEnv(env)) {\n//        return;\n//    }\n//    m_godocCmd = FileUtil::lookupGoBin(\"godoc\",m_liteApp,env,false);\n\n//    m_findProcess->setEnvironment(env.toStringList());\n//    m_godocProcess->setEnvironment(env.toStringList());\n\n//    if (!m_godocCmd.isEmpty()) {\n//        m_liteApp->appendLog(\"GolangDoc\",QString(\"Found godoc at %1\").arg(m_godocCmd),false);\n//    } else {\n//        m_liteApp->appendLog(\"GolangDoc\",QString(\"Could not find godoc, (hint: is godoc installed?)\"),true);\n//    }\n\n    m_pathFileMap.clear();\n    loadGoroot();\n}\n\nvoid GolangDoc::loadGoroot()\n{\n    m_goroot = LiteApi::getGOROOT(m_liteApp);\n    if (m_goroot.isEmpty()) {\n        return;\n    }\n    QDir dir(m_goroot);\n    if (dir.exists() && dir.cd(\"doc\")) {\n        foreach(QFileInfo info, dir.entryInfoList(QStringList()<<\"*.html\",QDir::Files)) {\n            QFile f(info.filePath());\n            if (f.open(QFile::ReadOnly)) {\n                QByteArray line = f.read(1024);\n                int start = line.indexOf(\"<!--\");\n                if (start == 0 ) {\n                    int end = line.indexOf(\"-->\");\n                    if (end > start) {\n                        QByteArray jsonData = line.mid(start+4,end-start-4);\n                        QJson::Parser parser;\n                        bool ok = false;\n                        QVariant json = parser.parse(jsonData, &ok).toMap();\n                        if (ok) {\n                            QVariantMap jsonMap = json.toMap();\n                            if (jsonMap.contains(\"Path\")) {\n                                m_pathFileMap.insert(jsonMap.value(\"Path\").toString(),info.filePath());\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    }\n}\n\nvoid GolangDoc::activeBrowser()\n{\n    m_liteApp->editorManager()->activeBrowser(m_docBrowser);\n}\n\n//void GolangDoc::rebuildApiData()\n//{\n//    if (!m_liteApp->globalCookie().value(\"golangdoc.goapi.rebuild\").toBool()) {\n//        QFileInfo info(m_findApiWidget->apiDataFile());\n//        if (!info.exists()) {\n//            m_findApiWidget->rebuildApiData();\n//        }\n//        QDateTime dt = info.lastModified();\n//        if (dt.toLocalTime().date() < QDate::currentDate()) {\n//            m_findApiWidget->rebuildApiData();\n//        }\n//        m_liteApp->globalCookie().value(\"golangdoc.goapi.rebuild\",true);\n//    }\n//}\n\nvoid GolangDoc::listPkg()\n{\n    QString cmd = LiteApi::getGotools(m_liteApp);\n    QStringList args;\n    args << \"docview\" << \"-mode=lite\" << \"-list=pkg\";\n    m_findData.clear();\n    m_findProcess->start(cmd,args);\n}\n\nvoid GolangDoc::listCmd()\n{\n    QString cmd = LiteApi::getGotools(m_liteApp);\n    QStringList args;\n    args << \"docview\" << \"-mode\" << \"lite\" << \"-list\"<<\"cmd\";\n    m_findData.clear();\n    m_findProcess->start(cmd,args);\n}\n\nvoid GolangDoc::godocFindPackage(QString pkgname)\n{\n    if (pkgname.isEmpty()) {\n        pkgname = m_godocFindComboBox->currentText();\n    }\n    if (pkgname.isEmpty()) {\n        return;\n    }\n    QUrl url;\n    url.setScheme(\"find\");\n    url.setPath(pkgname);\n    openUrl(url);\n}\n\n//void GolangDoc::findPackage(QString pkgname)\n//{\n//    if (pkgname.isEmpty()) {\n//        pkgname = m_findDocEdit->text();\n//    }\n//    if (pkgname.isEmpty()) {\n//        return;\n//    }\n//    QString cmd = LiteApi::liteide_stub_cmd(m_liteApp);\n//    QStringList args;\n//    args << \"docview\" << \"-mode=lite\" << \"-find\" << pkgname;\n//    m_findData.clear();\n//    m_findProcess->start(cmd,args);\n//}\n\nvoid GolangDoc::findOutput(QByteArray data,bool bStderr)\n{\n    if (bStderr) {\n        return;\n    }\n    m_findData.append(data);\n}\n\nvoid GolangDoc::findFinish(bool error,int code,QString /*msg*/)\n{\n    if (!error && code == 0) {\n        QStringList array = QString(m_findData.trimmed()).split(',');\n        if (array.size() >= 2 && array.at(0) == \"$find\") {\n            array.removeFirst();\n            QString best = array.at(0);\n            if (best.isEmpty()) {\n                array.removeFirst();\n            } else {\n                activeBrowser();\n                QUrl url;\n                url.setScheme(\"pdoc\");\n                url.setPath(best);\n                openUrl(url);\n            }\n//            if (array.isEmpty()) {\n//                m_findResultModel->setStringList(QStringList() << \"<nofind>\");\n//            } else {\n//                m_findResultModel->setStringList(array);\n//            }\n        }/* else if (array.size() >= 1 && array.at(0) == \"$list\") {\n            //array.removeFirst();\n            m_findResultModel->setStringList(array);\n        }*/\n    } /*else {\n        m_findResultModel->setStringList(QStringList() << \"<error>\");\n    }*/\n}\n\nvoid GolangDoc::godocOutput(QByteArray data,bool bStderr)\n{\n    if (bStderr) {\n        QTextCodec *codec = QTextCodec::codecForName(\"utf8\");\n        m_liteApp->appendLog(\"GolangDoc\",codec->toUnicode(data),false);\n        return;\n    }\n    m_godocData.append(data);\n}\n\nvoid GolangDoc::godocFinish(bool error,int code,QString /*msg*/)\n{\n    if (!error && code == 0 && m_docBrowser != 0) {\n        bool nav = true;\n        QString header;\n        if (m_openUrl.scheme() == \"list\") {\n            nav = false;\n            header = \"Package List\";\n        } else if (m_openUrl.scheme() == \"find\") {\n            nav = false;\n            header = \"Find Package \"+m_openUrl.path();\n        } else if (m_openUrl.scheme() == \"pdoc\") {\n            nav = false;\n            header = \"Package \"+m_openUrl.path();\n        }\n        if (m_godocData.indexOf(\"<!--\") == 0) {\n            updateHtmlDoc(m_openUrl,m_godocData,header,nav);\n        } else {\n            updateTextDoc(m_openUrl,m_godocData,header);\n        }\n    }\n}\n\nvoid GolangDoc::updateTextDoc(const QUrl &url, const QByteArray &ba, const QString &header)\n{\n    m_lastUrl = url;\n    QTextCodec *codec = QTextCodec::codecForUtfText(ba,QTextCodec::codecForName(\"utf-8\"));\n#if QT_VERSION >= 0x050000\n    QString html = codec->toUnicode(ba).toHtmlEscaped();\n#else\n    QString html = Qt::escape(codec->toUnicode(ba));\n#endif\n    QString data = m_templateData;\n    data.replace(\"{header}\",header);\n    data.replace(\"{nav}\",\"\");\n    data.replace(\"{content}\",QString(\"<pre>%1</pre>\").arg(html));\n    m_docBrowser->setUrlHtml(url,data);\n\n}\n\nvoid GolangDoc::updateHtmlDoc(const QUrl &url, const QByteArray &ba, const QString &header, bool toNav)\n{\n    m_lastUrl = url;\n    if (m_lastUrl.scheme() == \"pdoc\") {\n        m_targetList.clear();\n        QString pkgname = m_lastUrl.path();\n        QString goroot = LiteApi::getGOROOT(m_liteApp);\n        QFileInfo i1(QFileInfo(goroot,\"src/cmd\").filePath(),pkgname);\n        if (i1.exists()) {\n            m_targetList.append(i1.filePath());\n        }\n        QFileInfo i2(QFileInfo(goroot,\"src/pkg\").filePath(),pkgname);\n        if (i2.exists()) {\n            m_targetList.append(i2.filePath());\n        } else {\n            QFileInfo i3(QFileInfo(goroot,\"src\").filePath(),pkgname);\n            m_targetList.append(i3.filePath());\n        }\n        foreach(QString path,LiteApi::getGOPATH(m_liteApp,false)) {\n            QFileInfo info(QFileInfo(path,\"src\").filePath(),pkgname);\n            if (info.exists()) {\n                m_targetList.append(info.filePath());\n            }\n        }\n    }\n\n    QTextCodec *codec = QTextCodec::codecForName(\"utf-8\");\n    QString genHeader;\n    QString nav;\n\n    if (ba.contains(\"{{if $.GoogleCN}}\")) {\n    }\n\n    QString content = HtmlUtil::docToNavdoc(codec->toUnicode(ba),genHeader,nav);\n    QString data = m_templateData;\n\n    if (genHeader.isEmpty()) {\n        data.replace(\"{header}\",header);\n    } else {\n        data.replace(\"{header}\",genHeader);\n    }\n    if (toNav) {\n        data.replace(\"{nav}\",nav);\n    } else {\n        data.replace(\"{nav}\",\"\");\n    }\n    data.replace(\"{content}\",content);\n    data.replace(\"#pkg-constants\",\"#constants\");\n    data.replace(\"#pkg-variables\",\"#variables\");\n    data.replace(\"id=\\\"pkg-constants\\\"\",\"id=\\\"constants\\\"\");\n    data.replace(\"id=\\\"pkg-variables\\\"\",\"id=\\\"variables\\\"\");\n\n    //hard code, clean go1.11 docs.html\n    if (data.contains(\"{{if $.GoogleCN}}\")) {\n        data.replace(\"{{if $.GoogleCN}}\",\"\");\n        int i = data.indexOf(\" A Tour of Go\");\n        if (i > 0) {\n            data.replace(i,13,\"\");\n        }\n        data.replace(\"{{if not $.GoogleCN}}\",\"\");\n        data.replace(\"{{else}}\",\"\");\n        data.replace(\"{{end}}\",\"\");\n    }\n\n    if (!m_openUrlAddin.isNull()) {\n        QString realPath = m_openUrlAddin.toString();\n        if (!realPath.isEmpty()) {\n            data.replace(QString(\"import \\\"%1\\\"\").arg(m_lastUrl.path()),QString(\"import \\\"%1\\\"\").arg(realPath));\n            if (data.contains(\"import \\\".\\\"\")) {\n                QDir dir(m_lastUrl.path());\n                if (dir.exists()) {\n                    data.replace(QString(\"import \\\".\\\"\"),QString(\"import \\\"%1\\\"\").arg(realPath));\n                }\n            }\n        }\n    }\n\n    m_docBrowser->setUrlHtml(url,data);\n}\n\nvoid GolangDoc::openUrlList(const QUrl &url)\n{\n    if (url.scheme() != \"list\") {\n        return;\n    }\n    QString cmd = LiteApi::getGotools(m_liteApp);\n    QStringList args;\n    args << \"docview\" << \"-mode=html\"<< QString(\"-list=%1\").arg(url.path());\n    m_godocData.clear();\n    m_godocProcess->start(cmd,args);\n}\n\nvoid GolangDoc::openUrlFind(const QUrl &url)\n{\n    if (url.scheme() != \"find\") {\n        return;\n    }\n    QString cmd = LiteApi::getGotools(m_liteApp);\n    QStringList args;\n    args << \"docview\" << \"-mode=html\" << \"-find\" << url.path();\n    m_godocData.clear();\n    m_godocProcess->start(cmd,args);\n    return;\n}\n\nvoid GolangDoc::openUrlPdoc(const QUrl &url)\n{\n    if (url.scheme() != \"pdoc\") {\n        return;\n    }\n//    if (m_godocCmd.isEmpty()) {\n//        QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\n//        m_godocCmd = FileUtil::lookupGoBin(\"godoc\",m_liteApp,env,false);\n//    }\n//    if (m_godocCmd.isEmpty()) {\n//        m_liteApp->appendLog(\"GolangDoc\",QString(\"not lookup godoc in PATH\"),true);\n//        return;\n//    }\n    m_godocProcess->stopAndWait(100,2000);\n    m_godocData.clear();\n\n    QString godocCmd = LiteApi::getGotools(m_liteApp);\n    QStringList args;\n    args << \"godoc\";\n\n    //check additional path\n    bool local = false;\n    QDir dir(url.path());\n    if (dir.exists()) {\n        QStringList nameFilter(\"*.go\");\n        if (!dir.entryList(nameFilter).isEmpty()) {\n            local = true;\n        }\n    }\n    if (local) {\n        QStringList gopathList = LiteApi::getGOPATH(m_liteApp,true);\n        QStringList pkgList;\n        foreach (QString gopath, gopathList) {\n            gopath = QDir::fromNativeSeparators(QDir::cleanPath(gopath));\n            QString urlpath = QDir::fromNativeSeparators(QDir::cleanPath(url.path()));\n            if (urlpath.startsWith(gopath+\"/src/\")) {\n                pkgList << urlpath.mid(gopath.length()+5);\n            }\n        }\n        if (pkgList.size() == 1) {\n            m_godocProcess->setWorkingDirectory(m_goroot);\n            m_openUrl.setPath(pkgList.at(0));\n            args /*<< \"-html=true\"*/ << pkgList.at(0);\n        } else {\n            m_godocProcess->setWorkingDirectory(url.path());\n            args /*<< \"-html=true\"*/ << \".\";\n        }\n    } else {\n        m_godocProcess->setWorkingDirectory(m_goroot);\n        args /*<< \"-html=true\"*/ << url.path();\n    }\n    m_godocProcess->setEnvironment(LiteApi::getGoEnvironment(m_liteApp).toStringList());\n    m_godocProcess->start(godocCmd,args);\n}\n\nvoid GolangDoc::openUrlFile(const QUrl &url)\n{\n    QFileInfo info(url.toLocalFile());\n    if (!info.exists()) {\n        info.setFile(url.path());\n    }\n    QString ext = info.suffix().toLower();\n    if (ext == \"html\") {\n        QFile file(info.filePath());\n        if (file.open(QIODevice::ReadOnly)) {\n            QByteArray ba = file.readAll();\n            file.close();\n            if (info.fileName().compare(\"docs.html\",Qt::CaseInsensitive) == 0) {\n                updateHtmlDoc(url,ba,info.fileName(),false);\n            } else {\n                updateHtmlDoc(url,ba,info.fileName(),true);\n            }\n        }\n    } else if (ext == \"go\") {\n        LiteApi::IEditor *editor = m_liteApp->editorManager()->findEditor(info.filePath(),true);\n        if (!editor) {\n            editor = m_liteApp->fileManager()->openEditor(info.filePath(),true);\n            editor->setReadOnly(true);\n        } else {\n            m_liteApp->editorManager()->setCurrentEditor(editor);\n        }\n        if (editor) {\n            QPlainTextEdit *ed = LiteApi::findExtensionObject<QPlainTextEdit*>(editor,\"LiteApi.QPlainTextEdit\");\n#if QT_VERSION >= 0x050000\n            if (ed && QUrlQuery(url).hasQueryItem(\"s\")) {\n                QStringList pos =  QUrlQuery(url).queryItemValue(\"s\").split(\":\");\n#else\n            if (ed && url.hasQueryItem(\"s\")) {\n                QStringList pos = url.queryItemValue(\"s\").split(\":\");\n#endif\n                if (pos.length() == 2) {\n                    bool ok = false;\n                    int begin = pos.at(0).toInt(&ok);\n                    if (ok) {\n                        QTextCursor cur = ed->textCursor();\n                        cur.setPosition(begin);\n                        ed->setTextCursor(cur);\n                        ed->centerCursor();\n                    }\n                }\n            }\n        }\n    } else if (ext == \"pdf\") {\n        QDesktopServices::openUrl(info.filePath());\n    } else {\n        QFile file(info.filePath());\n        if (file.open(QIODevice::ReadOnly)) {\n            QByteArray ba = file.readAll();\n            updateTextDoc(url,ba,info.fileName());\n        }\n    }\n}\n\nQUrl GolangDoc::parserUrl(const QUrl &_url)\n{\n    if (m_goroot.isEmpty()) {\n        loadGoroot();\n    }\n    QUrl url = _url;\n    if (url.path().isEmpty() && !url.fragment().isEmpty()) {\n        return url;\n    }\n#ifdef Q_OS_WIN\n    //fix windows \"f:/hg/zmq\" -> scheme=\"f\" path=\"/hg/zmq\"\n    if (url.scheme().length() == 1) {\n        QString path = QDir::fromNativeSeparators(url.toString());\n        QFileInfo info(path);\n        url.setScheme(\"\");\n        url.setPath(path);\n        if (info.exists()) {\n            if (info.isFile()) {\n                url.setScheme(\"file\");\n            } else if (info.isDir()) {\n                url.setScheme(\"pdoc\");\n            }\n        }\n        return url;\n    }\n#endif\n    if (!url.scheme().isEmpty()) {\n        return url;\n    }\n    if (url.isRelative() && !url.path().isEmpty()) {\n        if (m_pathFileMap.contains(url.path())) {\n            url.setScheme(\"file\");\n            url.setPath(m_pathFileMap.value(url.path()));\n        } else if (url.path().compare(\"/src/pkg/\") == 0 || url.path().compare(\"/pkg/\") == 0) {\n            url.setScheme(\"list\");\n            url.setPath(\"pkg\");\n        } else if (url.path().compare(\"/src/cmd/\") == 0  || url.path().compare(\"/cmd/\") == 0){\n            url.setScheme(\"list\");\n            url.setPath(\"cmd\");\n        } else if (url.path().indexOf(\"/pkg/\") == 0) {\n            url.setScheme(\"pdoc\");\n            if (url.path().at(url.path().length()-1) == '/') {\n                url.setPath(url.path().mid(5,url.path().length()-6));\n            } else {\n                url.setPath(url.path().right(url.path().length()-5));\n            }\n        } else if (url.path().indexOf(\"/cmd/\") == 0) {\n            url.setScheme(\"pdoc\");\n            if (url.path().at(url.path().length()-1) == '/') {\n                url.setPath(url.path().mid(5,url.path().length()-6));\n            } else {\n                url.setPath(url.path().right(url.path().length()-5));\n            }\n        } else if (url.path() == \"..\") {\n            // check \"..\" is root\n            if (m_lastUrl.scheme() == \"pdoc\") {\n                QString path = QDir::cleanPath(m_lastUrl.path()+\"/\"+url.path());\n                if (path != \"..\") {\n                    url.setScheme(\"pdoc\");\n                    url.setPath(path);\n                }\n            }\n        } else if (url.path().indexOf(\"/target/\") == 0 && m_lastUrl.scheme() == \"pdoc\") {\n            QString name = url.path().right(url.path().length()-8);\n            foreach (QString path, m_targetList) {\n                QFileInfo info(path,name);\n                if (info.exists()) {\n                    url.setScheme(\"file\");\n                    url.setPath(info.filePath());\n                    break;\n                }\n            }\n        } else if (url.path().indexOf(\"/src/pkg/target/\") == 0 && m_lastUrl.scheme() == \"pdoc\") {\n            QString name = url.path().right(url.path().length()-16);\n            foreach (QString path, m_targetList) {\n                QFileInfo info(path,name);\n                if (info.exists()) {\n                    url.setScheme(\"file\");\n                    url.setPath(info.filePath());\n                    break;\n                }\n            }\n        } else if (url.path().indexOf(\"/src/target/\") == 0 && m_lastUrl.scheme() == \"pdoc\") {\n            QString name = url.path().right(url.path().length()-12);\n            foreach (QString path, m_targetList) {\n                QFileInfo info(path,name);\n                if (info.exists()) {\n                    url.setScheme(\"file\");\n                    url.setPath(info.filePath());\n                    break;\n                }\n            }\n        } else {\n            QFileInfo info;\n            info.setFile(url.path());\n            if (!info.exists()) {\n                info.setFile(url.toLocalFile());\n            }\n            if (!info.exists()) {\n                QString path = url.path();\n                if (path.startsWith(\"/\")) {\n                    if (path.endsWith(\".go\")) {\n                        QStringList gopathList = LiteApi::getGOPATH(m_liteApp,true);\n                        foreach (QString gopath, gopathList) {\n                            QFileInfo _info(gopath+path);\n                            if (_info.exists()) {\n                                info.setFile(_info.filePath());\n                                break;\n                            }\n                        }\n                    } else {\n                        info.setFile(QDir(m_goroot),path.right(path.length()-1));\n                    }\n                } else if (m_lastUrl.scheme() == \"file\") {\n                    info.setFile(QFileInfo(m_lastUrl.toLocalFile()).absoluteDir(),path);\n                }\n                if (!info.exists()) {\n                    //fix godoc path=\"f:/hg/zmq/gozmq\" \"href=/gozmq/gozmq.go\"\n                    if (m_lastUrl.scheme() == \"pdoc\") {\n                        QDir dir(m_lastUrl.path());\n                        if (dir.exists()) {\n                            if (path.indexOf(dir.dirName()) == 1) {\n                                path.remove(0,dir.dirName().length()+2);\n                            }\n                            info.setFile(dir,path);\n                        }\n                    }\n                }\n            }\n            //check index.html\n            if (info.exists() && info.isDir()) {\n                QFileInfo test(info.dir(),\"index.html\");\n                if (test.exists()) {\n                    info = test;\n                }\n            }\n\n            if (info.exists() && info.isFile()) {\n                url.setScheme(\"file\");\n                url.setPath(QDir::cleanPath(info.filePath()));\n            } else {\n                url.setScheme(\"pdoc\");\n                if (info.exists()) {\n                    url.setPath(info.filePath());\n                } else {\n                    if (m_lastUrl.scheme() == \"pdoc\" && url.path().endsWith('/')) {\n                        url.setPath(QDir::cleanPath(m_lastUrl.path()+\"/\"+url.path()));\n                    } else {\n                        url.setPath(url.path());\n                    }\n                }\n            }\n        }\n    }\n    return url;\n}\n\nvoid GolangDoc::highlighted(const QUrl &_url)\n{\n    QUrl url = parserUrl(_url);\n    m_liteApp->mainWindow()->statusBar()->showMessage(url.toString());\n//    if (_url.isEmpty()) {\n//        m_docBrowser->statusBar()->showMessage(QString(\"GOROOT=%1\").arg(m_goroot));\n//    } else {\n//        QUrl url = parserUrl(_url);\n//        m_docBrowser->statusBar()->showMessage(QString(\"%1 [%2]\").arg(_url.toString()).arg(url.toString()));\n//    }\n}\n\nvoid GolangDoc::openUrl(const QUrl &_url, const QVariant &addin)\n{ \n    m_liteApp->mainWindow()->statusBar()->clearMessage();\n    QUrl url = parserUrl(_url);\n    /*\n    if (url.scheme() != \"file\") {\n        if (url.path().isEmpty() && !url.fragment().isEmpty()) {\n            m_docBrowser->scrollToAnchor(url.fragment());\n            return;\n        }\n        if ( (m_openUrl.scheme() == url.scheme()) &&\n             m_openUrl.path() == url.path()) {\n            m_docBrowser->scrollToAnchor(url.fragment());\n            m_openUrl = url;\n            return;\n        }\n    }\n    */\n    m_openUrl = url;\n    m_openUrlAddin = addin;\n    if (url.path().isEmpty() && !url.fragment().isEmpty()) {\n        m_docBrowser->scrollToAnchor(url.fragment());\n    } else if (url.scheme() == \"find\") {\n        openUrlFind(url);\n    } else if (url.scheme() == \"pdoc\") {\n        openUrlPdoc(url);\n    } else if (url.scheme() == \"list\") {\n        openUrlList(url);\n    } else if (url.scheme() == \"file\") {\n        openUrlFile(url);\n    } else {\n        QDesktopServices::openUrl(url);\n    }\n}\n\n\n//void GolangDoc::findTag(const QString &tag)\n//{\n//    if (!tag.isEmpty()){\n//        QStringList urlList = m_golangApiThread->api()->findDocUrl(tag);\n//        if (!urlList.isEmpty()) {\n//            if (urlList.size() >= 2) {\n//                m_docFind = urlList.at(1);\n//            } else {\n//                m_docFind.clear();\n//            }\n//            QString text = urlList.at(0);\n//            if (!text.isEmpty()) {\n//                activeBrowser();\n//                QUrl url(QString(\"pdoc:%1\").arg(text));\n//                openUrl(url);\n//            }\n//        }\n//    }\n//}\n\n//void GolangDoc::doubleClickListView(QModelIndex index)\n//{\n//    //TODO\n//    if (!index.isValid()) {\n//        return;\n//    }\n//    QModelIndex src =  m_findFilterModel->mapToSource(index);\n//    if (!src.isValid()) {\n//        return;\n//    }\n//    QString tag = m_findResultModel->data(src,Qt::DisplayRole).toString();\n//    if (!tag.isEmpty()){\n//        QStringList urlList;// = m_golangApiThread->api()->findDocUrl(tag);\n//        if (!urlList.isEmpty()) {\n//            if (urlList.size() >= 2) {\n//                m_docFind = urlList.at(1);\n//            } else {\n//                m_docFind.clear();\n//            }\n//            QString text = urlList.at(0);\n//            if (!text.isEmpty()) {\n//                activeBrowser();\n//                QUrl url(QString(\"pdoc:%1\").arg(text));\n//                openUrl(url);\n//            }\n//        }\n//    }\n//}\n\n//void GolangDoc::currentIndexChanged(QModelIndex index)\n//{\n//    if (!index.isValid()) {\n//        return;\n//    }\n//    QModelIndex src =  m_findFilterModel->mapToSource(index);\n//    if (!src.isValid()) {\n//        return;\n//    }\n//    QString tag = m_findResultModel->data(src,Qt::DisplayRole).toString();\n//    if (!tag.isEmpty()){\n//        //m_tagInfo->setText(m_golangApiThread->api()->findDocInfo(tag));\n//    }\n//}\n\nvoid GolangDoc::documentLoaded()\n{\n}\n\nvoid GolangDoc::anchorChanged(const QString &/*anchor*/)\n{\n    if (!m_docFind.isEmpty()) {\n        m_docBrowser->htmlWidget()->findText(m_docFind,QTextDocument::FindCaseSensitively|QTextDocument::FindWholeWords);\n        m_docFind.clear();\n    }\n}\n\nvoid GolangDoc::openApiUrl(QStringList urlList)\n{\n    if (urlList.isEmpty()) {\n        return;\n    }\n    if (urlList.size() >= 2) {\n        m_docFind = urlList.at(1);\n    } else {\n        m_docFind.clear();\n    }\n    QString text = urlList.at(0);\n    if (!text.isEmpty()) {\n        activeBrowser();\n        QUrl url(QString(\"pdoc:%1\").arg(text));\n        openUrl(url);\n    }\n}\n\nvoid GolangDoc::appLoaded()\n{\n}\n\nvoid GolangDoc::toggledApiSearchWindow(bool /*b*/)\n{\n//    if (b) {\n//        rebuildApiData();\n//    }\n}\n\nvoid GolangDoc::toggledDocSearchWindow(bool /*b*/)\n{\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangdoc/golangdoc.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangdoc.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGDOC_H\n#define GOLANGDOC_H\n\n#include \"liteapi/liteapi.h\"\n#include \"litebuildapi/litebuildapi.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n#include \"golangdocapi/golangdocapi.h\"\n#include \"qtc_editutil/fancylineedit.h\"\n\n#include <QUrl>\n#include <QModelIndex>\n#include <QListView>\n\nclass QLabel;\nclass QListView;\nclass QLineEdit;\nclass QStringListModel;\nclass QComboBox;\nclass QPushButton;\nclass ProcessEx;\nclass DocumentBrowser;\nclass QSortFilterProxyModel;\nclass GolangApi;\nclass FindDocWidget;\nclass FindApiWidget;\n\nclass ListViewEx : public QListView\n{\nQ_OBJECT\npublic:\n    void currentChanged(const QModelIndex &current, const QModelIndex &previous);\nsignals:\n    void currentIndexChanged(QModelIndex);\n};\n\nclass GolangDoc : public LiteApi::IGolangDoc\n{\n    Q_OBJECT\npublic:\n    explicit GolangDoc(LiteApi::IApplication *app, QObject *parent = 0);\n    ~GolangDoc();    \npublic slots:\n    virtual void openUrl(const QUrl &url, const QVariant &addin = QVariant());\n    virtual void activeBrowser();\npublic slots:\n    //void rebuildApiData();\n    void appLoaded();\n    void toggledApiSearchWindow(bool);\n    void toggledDocSearchWindow(bool);\n    void loadEnv();\n    void loadGoroot();\n    void currentEnvChanged(LiteApi::IEnv*);\n    void listCmd();\n    void listPkg();\n    void findOutput(QByteArray,bool);\n    void findFinish(bool,int,QString);\n    void godocFindPackage(QString name);\n    void godocOutput(QByteArray,bool);\n    void godocFinish(bool,int,QString);\n    void highlighted(const QUrl &url);\n    void documentLoaded();\n    void anchorChanged(const QString &anchor);\n    void openApiUrl(QStringList);\nprotected:\n    QUrl parserUrl(const QUrl &url);\n    void openUrlList(const QUrl &url);\n    void openUrlFind(const QUrl &url);\n    void openUrlPdoc(const QUrl &url);\n    void openUrlFile(const QUrl &url);\n    void updateTextDoc(const QUrl &url, const QByteArray &ba, const QString &header);\n    void updateHtmlDoc(const QUrl &url, const QByteArray &ba, const QString &header = QString(), bool toNav = true);\nprotected:\n    LiteApi::IApplication   *m_liteApp;\n    QUrl    m_openUrl;\n    QVariant m_openUrlAddin;\n    QUrl    m_lastUrl;\n    QString m_lastPath;\n    FindDocWidget *m_findDocWidget;\n    FindApiWidget *m_findApiWidget;\n    DocumentBrowser *m_docBrowser;\n    QComboBox *m_godocFindComboBox;\n    ProcessEx  *m_findProcess;\n    ProcessEx  *m_godocProcess;\n    QAction *m_browserAct;\n    QString m_goroot;\n    QByteArray  m_godocData;\n    QByteArray  m_findData;\n    QString  m_templateData;\n    LiteApi::IEnvManager *m_envManager;\n    //QString m_godocCmd;\n    QStringList m_targetList;\n    QMap<QString,QString> m_pathFileMap;\n    QAction *m_apiSearchWindowAct;\n    QAction *m_docSearchWindowAct;\n    QMenu   *m_configMenu;\n    QString m_docFind;\n};\n\n#endif // GOLANGDOC_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangdoc/golangdoc.pro",
    "content": "TARGET = golangdoc\nTEMPLATE = lib\nQT += xml\n\ninclude(../../liteideplugin.pri)\ninclude (../../api/liteenvapi/liteenvapi.pri)\ninclude(../../api/golangdocapi/golangdocapi.pri)\ninclude(../../api/liteeditorapi/liteeditorapi.pri)\ninclude(../../utils/documentbrowser/documentbrowser.pri)\ninclude(../../utils/fileutil/fileutil.pri)\ninclude(../../utils/processex/processex.pri)\ninclude(../../utils/htmlutil/htmlutil.pri)\ninclude(../../utils/golangapi/golangapi.pri)\ninclude(../../3rdparty/qtc_editutil/qtc_editutil.pri)\ninclude(../../3rdparty/qjson/qjson.pri)\ninclude(../../3rdparty/qt_browser/qt_browser.pri)\n\nDEFINES += GOLANGDOC_LIBRARY\n\nSOURCES += golangdocplugin.cpp \\\n    golangdoc.cpp \\\n    golangdocoptionfactory.cpp \\\n    golangdocoption.cpp \\\n    finddocwidget.cpp \\\n    findapiwidget.cpp\n\nHEADERS += golangdocplugin.h\\\n        golangdoc_global.h \\\n    golangdoc.h \\\n    golangdocoptionfactory.h \\\n    golangdocoption.h \\\n    finddocwidget.h \\\n    findapiwidget.h\n\nFORMS += \\\n    golangdocoption.ui\n"
  },
  {
    "path": "liteidex/src/plugins/golangdoc/golangdoc_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangdoc_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGDOC_GLOBAL_H\n#define GOLANGDOC_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(GOLANGDOC_LIBRARY)\n#  define GOLANGDOCSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define GOLANGDOCSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#define GODOCFIND_MATCHWORD \"godocfind/matchword\"\n#define GODOCFIND_MATCHCASE \"godocfind/matchcase\"\n#define GODOCFIND_USEREGEXP \"godocfind/useregexp\"\n\n#endif // GOLANGDOC_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangdoc/golangdocoption.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangdocoption.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangdocoption.h\"\n#include \"ui_golangdocoption.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangDocOption::GolangDocOption(LiteApi::IApplication *app,QObject *parent) :\n    LiteApi::IOption(parent),\n    m_liteApp(app),\n    m_widget(new QWidget),\n    ui(new Ui::GolangDocOption)\n{\n    ui->setupUi(m_widget);\n}\n\nGolangDocOption::~GolangDocOption()\n{\n    delete m_widget;\n    delete ui;\n}\n\nQWidget *GolangDocOption::widget()\n{\n    return m_widget;\n}\n\nQString GolangDocOption::name() const\n{\n    return \"GolangDoc\";\n}\n\nQString GolangDocOption::mimeType() const\n{\n    return \"option/golangdoc\";\n}\n\nvoid GolangDocOption::load()\n{\n    bool defctx = m_liteApp->settings()->value(\"golangapi/defctx\",true).toBool();\n    bool std = m_liteApp->settings()->value(\"golangapi/std\",false).toBool();\n    ui->defContextCheckBox->setChecked(defctx);\n    ui->onlyStdCheckBox->setChecked(std);\n}\n\nvoid GolangDocOption::save()\n{\n    bool defctx = ui->defContextCheckBox->isChecked();\n    bool std = ui->onlyStdCheckBox->isChecked();\n    m_liteApp->settings()->setValue(\"golangapi/defctx\",defctx);\n    m_liteApp->settings()->setValue(\"golangapi/std\",std);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangdoc/golangdocoption.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangdocoption.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGDOCOPTION_H\n#define GOLANGDOCOPTION_H\n\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class GolangDocOption;\n}\n\nclass GolangDocOption : public LiteApi::IOption\n{\n    Q_OBJECT\n\npublic:\n    explicit GolangDocOption(LiteApi::IApplication *app, QObject *parent = 0);\n    ~GolangDocOption();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void load();\n    virtual void save();\nprivate:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget           *m_widget;\n    Ui::GolangDocOption *ui;\n};\n\n#endif // GOLANGDOCOPTION_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangdoc/golangdocoption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>GolangDocOption</class>\n <widget class=\"QWidget\" name=\"GolangDocOption\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>370</width>\n    <height>123</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox\">\n     <property name=\"title\">\n      <string>Go API</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n      <item>\n       <widget class=\"QCheckBox\" name=\"defContextCheckBox\">\n        <property name=\"text\">\n         <string>Use default context (fast)</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QCheckBox\" name=\"onlyStdCheckBox\">\n        <property name=\"text\">\n         <string>Only load standard API documentation</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <spacer name=\"verticalSpacer\">\n        <property name=\"orientation\">\n         <enum>Qt::Vertical</enum>\n        </property>\n        <property name=\"sizeHint\" stdset=\"0\">\n         <size>\n          <width>20</width>\n          <height>40</height>\n         </size>\n        </property>\n       </spacer>\n      </item>\n     </layout>\n    </widget>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/golangdoc/golangdocoptionfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangdocoptionfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangdocoption.h\"\n#include \"golangdocoptionfactory.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangDocOptionFactory::GolangDocOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n}\n\nQStringList GolangDocOptionFactory::mimeTypes() const\n{\n    return QStringList() << \"option/golangdoc\";\n}\n\nLiteApi::IOption *GolangDocOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == \"option/golangdoc\") {\n        return new GolangDocOption(m_liteApp,this);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangdoc/golangdocoptionfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangdocoptionfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGDOCOPTIONFACTORY_H\n#define GOLANGDOCOPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass GolangDocOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n    GolangDocOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // GOLANGDOCOPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangdoc/golangdocplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangdocplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangdocplugin.h\"\n#include \"golangdoc.h\"\n#include \"golangdocoptionfactory.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangDocPlugin::GolangDocPlugin()\n    : m_golangDoc(0)\n{\n}\n\nGolangDocPlugin::~GolangDocPlugin()\n{\n    if (m_golangDoc) {\n        delete m_golangDoc;\n    }\n}\n\nbool GolangDocPlugin::load(LiteApi::IApplication *app)\n{\n    m_golangDoc = new GolangDoc(app,this);\n    //app->optionManager()->addFactory(new GolangDocOptionFactory(app,this));\n    return true;\n}\n\nvoid GolangDocPlugin::currentEditorChanged(LiteApi::IEditor*)\n{\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n\n"
  },
  {
    "path": "liteidex/src/plugins/golangdoc/golangdocplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangdocplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGDOCPLUGIN_H\n#define GOLANGDOCPLUGIN_H\n\n#include \"golangdoc_global.h\"\n#include \"liteapi/liteapi.h\"\n#include <QtPlugin>\n\nclass GolangDoc;\nclass GolangDocPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    GolangDocPlugin();\n    ~GolangDocPlugin();\n    virtual bool load(LiteApi::IApplication *app);\nprotected slots:\n    void currentEditorChanged(LiteApi::IEditor*);\nprotected:\n    GolangDoc *m_golangDoc;\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<GolangDocPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.GolangDocPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/golangdoc\");\n        m_info->setName(\"GolangDoc\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setVer(\"X36.1\");\n        m_info->setInfo(\"Golang Documents Browser\");\n        m_info->appendDepend(\"plugin/liteenv\");\n        m_info->appendDepend(\"plugin/liteeditor\");\n    }\n};\n\n#endif // GOLANGDOCPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/goaddtagsdialog.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: goaddtagsdialog.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"goaddtagsdialog.h\"\r\n#include \"ui_goaddtagsdialog.h\"\r\n#include \"liteapi/liteqt.h\"\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nGoAddTagsDialog::GoAddTagsDialog(QWidget *parent) :\r\n    QDialog(parent),\r\n    ui(new Ui::GoAddTagsDialog)\r\n{\r\n    ui->setupUi(this);\r\n\r\n    connect(ui->jsonCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));\r\n    connect(ui->jsonCheckBox,SIGNAL(toggled(bool)),ui->jsonGroupBox,SLOT(setEnabled(bool)));\r\n\r\n    connect(ui->jsonOptionsCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));\r\n    connect(ui->jsonOptionsLineEdit,SIGNAL(textChanged(QString)),this,SLOT(updateaAguments()));\r\n\r\n    connect(ui->xmlCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));\r\n    connect(ui->xmlCheckBox,SIGNAL(toggled(bool)),ui->xmlGroupBox,SLOT(setEnabled(bool)));\r\n\r\n    connect(ui->xmlOptionsCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));\r\n    connect(ui->xmlOptionsLineEdit,SIGNAL(textChanged(QString)),this,SLOT(updateaAguments()));\r\n\r\n    connect(ui->customCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));\r\n    connect(ui->customCheckBox,SIGNAL(toggled(bool)),ui->customGroupBox,SLOT(setEnabled(bool)));\r\n\r\n    connect(ui->customTagNameLineEdit1,SIGNAL(textChanged(QString)),this,SLOT(updateaAguments()));\r\n    connect(ui->customTagOptionLineEdit1,SIGNAL(textChanged(QString)),this,SLOT(updateaAguments()));\r\n    connect(ui->customTagNameLineEdit2,SIGNAL(textChanged(QString)),this,SLOT(updateaAguments()));\r\n    connect(ui->customTagOptionlineEdit2,SIGNAL(textChanged(QString)),this,SLOT(updateaAguments()));\r\n\r\n    connect(ui->snakeCaseRadioButton,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));\r\n    connect(ui->camelCaseRadioButton,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));\r\n    connect(ui->lispCaseRadioButton,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));\r\n\r\n    connect(ui->overrideCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));\r\n    connect(ui->sortCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));\r\n\r\n    ui->snakeCaseRadioButton->setChecked(true);\r\n\r\n    ui->jsonGroupBox->setEnabled(false);\r\n    ui->xmlGroupBox->setEnabled(false);\r\n    ui->customGroupBox->setEnabled(false);\r\n}\r\n\r\nGoAddTagsDialog::~GoAddTagsDialog()\r\n{\r\n    delete ui;\r\n}\r\n\r\nvoid GoAddTagsDialog::setInfo(const QString &info)\r\n{\r\n    ui->infoLabel->setText(info);\r\n}\r\n\r\nQString GoAddTagsDialog::arguments() const\r\n{\r\n    return ui->argumentsEdit->toPlainText().trimmed();\r\n}\r\n\r\nstatic QString parserTag(const QString &tag)\r\n{\r\n   int pos = tag.indexOf(\":\");\r\n   if (pos == -1) {\r\n       return tag;\r\n   }\r\n   return tag.left(pos);\r\n}\r\nvoid GoAddTagsDialog::updateaAguments()\r\n{\r\n    QStringList tagList;\r\n    QStringList optList;\r\n    QString tranform;\r\n    if (ui->jsonCheckBox->isChecked()) {\r\n        tagList << \"json\";\r\n        if (ui->jsonOptionsCheckBox->isChecked()) {\r\n            QStringList opt = ui->jsonOptionsLineEdit->text().trimmed().split(\",\",qtSkipEmptyParts);\r\n            foreach (QString o, opt) {\r\n                optList << \"json=\"+o;\r\n            }\r\n        }\r\n    }\r\n    if (ui->xmlCheckBox->isChecked()) {\r\n        tagList << \"xml\";\r\n        if (ui->xmlOptionsCheckBox->isChecked()) {\r\n            QStringList opt = ui->xmlOptionsLineEdit->text().trimmed().split(\",\",qtSkipEmptyParts);\r\n            foreach (QString o, opt) {\r\n                optList << \"xml=\"+o;\r\n            }\r\n        }\r\n    }\r\n    if (ui->customCheckBox->isChecked()) {\r\n        QString tag1 = ui->customTagNameLineEdit1->text().trimmed();\r\n        QStringList opt1 = ui->customTagOptionLineEdit1->text().trimmed().split(\",\",qtSkipEmptyParts);\r\n        QString tag2 = ui->customTagNameLineEdit2->text().trimmed();\r\n        QStringList opt2 = ui->customTagOptionlineEdit2->text().trimmed().split(\",\",qtSkipEmptyParts);\r\n        if (!tag1.isEmpty()) {\r\n            tagList << tag1;\r\n            foreach (QString o, opt1) {\r\n                optList << parserTag(tag1)+\"=\"+o;\r\n            }\r\n        }\r\n        if (!tag2.isEmpty()) {\r\n            tagList << tag2;\r\n            foreach (QString o, opt2) {\r\n                optList << parserTag(tag2)+\"=\"+o;\r\n            }\r\n        }\r\n    }\r\n    QString info;\r\n    if (ui->snakeCaseRadioButton->isChecked()) {\r\n        tranform = \"snakecase\";\r\n        info = \"BaseDomain -> base_domain\";\r\n    } else if (ui->camelCaseRadioButton->isChecked()) {\r\n        tranform = \"camelcase\";\r\n        info = \"BaseDomain -> baseDomain\";\r\n    } else if (ui->lispCaseRadioButton->isChecked()) {\r\n        tranform = \"lispcase\";\r\n        info = \"BaseDomain -> base-domain\";\r\n    }\r\n    if (ui->transformInfo->text() != info) {\r\n        ui->transformInfo->setText(info);\r\n    }\r\n\r\n    QString command;\r\n    if (!tagList.isEmpty()) {\r\n        command += \"-add-tags \"+tagList.join(\",\");\r\n        if (!optList.isEmpty()) {\r\n            command += \" -add-options \"+optList.join(\",\");\r\n        }\r\n        command += \" -transform \"+tranform;\r\n        if (ui->overrideCheckBox->isChecked()) {\r\n            command += \" -override\";\r\n        }\r\n        if (ui->sortCheckBox->isChecked()) {\r\n            command += \" -sort\";\r\n        }\r\n    }\r\n    ui->argumentsEdit->setPlainText(command);\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/goaddtagsdialog.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: goaddtagsdialog.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef GOADDTAGSDIALOG_H\r\n#define GOADDTAGSDIALOG_H\r\n\r\n#include <QDialog>\r\n\r\nnamespace Ui {\r\nclass GoAddTagsDialog;\r\n}\r\n\r\nclass GoAddTagsDialog : public QDialog\r\n{\r\n    Q_OBJECT\r\n\r\npublic:\r\n    explicit GoAddTagsDialog(QWidget *parent = 0);\r\n    ~GoAddTagsDialog();\r\n    void setInfo(const QString &info);\r\n    QString arguments() const;\r\npublic slots:\r\n    void updateaAguments();\r\nprivate:\r\n    Ui::GoAddTagsDialog *ui;\r\n};\r\n\r\n#endif // GOADDTAGSDIALOG_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/goaddtagsdialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>GoAddTagsDialog</class>\r\n <widget class=\"QDialog\" name=\"GoAddTagsDialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>550</width>\r\n    <height>441</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Add Tags To Struct Field</string>\r\n  </property>\r\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\r\n   <property name=\"spacing\">\r\n    <number>0</number>\r\n   </property>\r\n   <item>\r\n    <widget class=\"QCheckBox\" name=\"jsonCheckBox\">\r\n     <property name=\"text\">\r\n      <string>Add JSON Tag</string>\r\n     </property>\r\n    </widget>\r\n   </item>\r\n   <item>\r\n    <widget class=\"QGroupBox\" name=\"jsonGroupBox\">\r\n     <property name=\"title\">\r\n      <string/>\r\n     </property>\r\n     <property name=\"checkable\">\r\n      <bool>false</bool>\r\n     </property>\r\n     <property name=\"checked\">\r\n      <bool>false</bool>\r\n     </property>\r\n     <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\r\n      <property name=\"leftMargin\">\r\n       <number>12</number>\r\n      </property>\r\n      <property name=\"topMargin\">\r\n       <number>2</number>\r\n      </property>\r\n      <property name=\"rightMargin\">\r\n       <number>12</number>\r\n      </property>\r\n      <property name=\"bottomMargin\">\r\n       <number>2</number>\r\n      </property>\r\n      <item>\r\n       <widget class=\"QCheckBox\" name=\"jsonOptionsCheckBox\">\r\n        <property name=\"text\">\r\n         <string>Options</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item>\r\n       <widget class=\"QLineEdit\" name=\"jsonOptionsLineEdit\">\r\n        <property name=\"toolTip\">\r\n         <string>Multiple options separated by commas</string>\r\n        </property>\r\n        <property name=\"text\">\r\n         <string notr=\"true\">omitempty,</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n     </layout>\r\n    </widget>\r\n   </item>\r\n   <item>\r\n    <widget class=\"QCheckBox\" name=\"xmlCheckBox\">\r\n     <property name=\"text\">\r\n      <string>Add XML Tag</string>\r\n     </property>\r\n    </widget>\r\n   </item>\r\n   <item>\r\n    <widget class=\"QGroupBox\" name=\"xmlGroupBox\">\r\n     <property name=\"title\">\r\n      <string/>\r\n     </property>\r\n     <property name=\"checkable\">\r\n      <bool>false</bool>\r\n     </property>\r\n     <property name=\"checked\">\r\n      <bool>false</bool>\r\n     </property>\r\n     <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\">\r\n      <property name=\"leftMargin\">\r\n       <number>12</number>\r\n      </property>\r\n      <property name=\"topMargin\">\r\n       <number>2</number>\r\n      </property>\r\n      <property name=\"rightMargin\">\r\n       <number>12</number>\r\n      </property>\r\n      <property name=\"bottomMargin\">\r\n       <number>2</number>\r\n      </property>\r\n      <item>\r\n       <widget class=\"QCheckBox\" name=\"xmlOptionsCheckBox\">\r\n        <property name=\"text\">\r\n         <string>Options</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item>\r\n       <widget class=\"QLineEdit\" name=\"xmlOptionsLineEdit\">\r\n        <property name=\"toolTip\">\r\n         <string>Multiple options separated by commas</string>\r\n        </property>\r\n        <property name=\"text\">\r\n         <string notr=\"true\">omitempty,</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n     </layout>\r\n    </widget>\r\n   </item>\r\n   <item>\r\n    <widget class=\"QCheckBox\" name=\"customCheckBox\">\r\n     <property name=\"text\">\r\n      <string>Add Custom Tags</string>\r\n     </property>\r\n    </widget>\r\n   </item>\r\n   <item>\r\n    <widget class=\"QGroupBox\" name=\"customGroupBox\">\r\n     <property name=\"title\">\r\n      <string/>\r\n     </property>\r\n     <property name=\"checkable\">\r\n      <bool>false</bool>\r\n     </property>\r\n     <property name=\"checked\">\r\n      <bool>false</bool>\r\n     </property>\r\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\r\n      <property name=\"spacing\">\r\n       <number>2</number>\r\n      </property>\r\n      <property name=\"topMargin\">\r\n       <number>2</number>\r\n      </property>\r\n      <property name=\"bottomMargin\">\r\n       <number>2</number>\r\n      </property>\r\n      <item>\r\n       <layout class=\"QHBoxLayout\" name=\"horizontalLayout_3\">\r\n        <item>\r\n         <widget class=\"QLabel\" name=\"label\">\r\n          <property name=\"text\">\r\n           <string>Tag Name</string>\r\n          </property>\r\n         </widget>\r\n        </item>\r\n        <item>\r\n         <widget class=\"QLineEdit\" name=\"customTagNameLineEdit1\">\r\n          <property name=\"toolTip\">\r\n           <string>Setup custom tag name</string>\r\n          </property>\r\n         </widget>\r\n        </item>\r\n        <item>\r\n         <widget class=\"QLabel\" name=\"label_2\">\r\n          <property name=\"text\">\r\n           <string>Options</string>\r\n          </property>\r\n         </widget>\r\n        </item>\r\n        <item>\r\n         <widget class=\"QLineEdit\" name=\"customTagOptionLineEdit1\">\r\n          <property name=\"toolTip\">\r\n           <string>Multiple options separated by commas</string>\r\n          </property>\r\n         </widget>\r\n        </item>\r\n       </layout>\r\n      </item>\r\n      <item>\r\n       <layout class=\"QHBoxLayout\" name=\"horizontalLayout_4\">\r\n        <item>\r\n         <widget class=\"QLabel\" name=\"label_3\">\r\n          <property name=\"text\">\r\n           <string>Tag Name</string>\r\n          </property>\r\n         </widget>\r\n        </item>\r\n        <item>\r\n         <widget class=\"QLineEdit\" name=\"customTagNameLineEdit2\"/>\r\n        </item>\r\n        <item>\r\n         <widget class=\"QLabel\" name=\"label_4\">\r\n          <property name=\"text\">\r\n           <string>Options</string>\r\n          </property>\r\n         </widget>\r\n        </item>\r\n        <item>\r\n         <widget class=\"QLineEdit\" name=\"customTagOptionlineEdit2\">\r\n          <property name=\"toolTip\">\r\n           <string>Multiple options separated by commas</string>\r\n          </property>\r\n         </widget>\r\n        </item>\r\n       </layout>\r\n      </item>\r\n     </layout>\r\n    </widget>\r\n   </item>\r\n   <item>\r\n    <widget class=\"QGroupBox\" name=\"groupBox\">\r\n     <property name=\"title\">\r\n      <string notr=\"true\">Ttransform</string>\r\n     </property>\r\n     <layout class=\"QHBoxLayout\" name=\"horizontalLayout_5\">\r\n      <property name=\"leftMargin\">\r\n       <number>12</number>\r\n      </property>\r\n      <property name=\"topMargin\">\r\n       <number>2</number>\r\n      </property>\r\n      <property name=\"rightMargin\">\r\n       <number>12</number>\r\n      </property>\r\n      <property name=\"bottomMargin\">\r\n       <number>2</number>\r\n      </property>\r\n      <item>\r\n       <widget class=\"QRadioButton\" name=\"snakeCaseRadioButton\">\r\n        <property name=\"text\">\r\n         <string notr=\"true\">SnakeCase</string>\r\n        </property>\r\n        <property name=\"checked\">\r\n         <bool>true</bool>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item>\r\n       <widget class=\"QRadioButton\" name=\"camelCaseRadioButton\">\r\n        <property name=\"text\">\r\n         <string notr=\"true\">CamelCase</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item>\r\n       <widget class=\"QRadioButton\" name=\"lispCaseRadioButton\">\r\n        <property name=\"text\">\r\n         <string notr=\"true\">LispCase</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item>\r\n       <spacer name=\"horizontalSpacer\">\r\n        <property name=\"orientation\">\r\n         <enum>Qt::Horizontal</enum>\r\n        </property>\r\n        <property name=\"sizeHint\" stdset=\"0\">\r\n         <size>\r\n          <width>9</width>\r\n          <height>20</height>\r\n         </size>\r\n        </property>\r\n       </spacer>\r\n      </item>\r\n      <item>\r\n       <widget class=\"QLabel\" name=\"transformInfo\">\r\n        <property name=\"text\">\r\n         <string notr=\"true\">BaseDomain -&gt; base_domain</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n     </layout>\r\n    </widget>\r\n   </item>\r\n   <item>\r\n    <widget class=\"QGroupBox\" name=\"groupBox_2\">\r\n     <property name=\"title\">\r\n      <string>Options</string>\r\n     </property>\r\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout_3\">\r\n      <property name=\"leftMargin\">\r\n       <number>12</number>\r\n      </property>\r\n      <property name=\"topMargin\">\r\n       <number>2</number>\r\n      </property>\r\n      <property name=\"rightMargin\">\r\n       <number>12</number>\r\n      </property>\r\n      <property name=\"bottomMargin\">\r\n       <number>2</number>\r\n      </property>\r\n      <item>\r\n       <widget class=\"QCheckBox\" name=\"sortCheckBox\">\r\n        <property name=\"text\">\r\n         <string>Sort sorts the tags in increasing order according to the key name</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item>\r\n       <widget class=\"QCheckBox\" name=\"overrideCheckBox\">\r\n        <property name=\"text\">\r\n         <string>Override current tags when adding tags</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n     </layout>\r\n    </widget>\r\n   </item>\r\n   <item>\r\n    <widget class=\"QLabel\" name=\"infoLabel\">\r\n     <property name=\"text\">\r\n      <string>Info</string>\r\n     </property>\r\n    </widget>\r\n   </item>\r\n   <item>\r\n    <widget class=\"QPlainTextEdit\" name=\"argumentsEdit\"/>\r\n   </item>\r\n   <item>\r\n    <spacer name=\"verticalSpacer\">\r\n     <property name=\"orientation\">\r\n      <enum>Qt::Vertical</enum>\r\n     </property>\r\n     <property name=\"sizeHint\" stdset=\"0\">\r\n      <size>\r\n       <width>20</width>\r\n       <height>40</height>\r\n      </size>\r\n     </property>\r\n    </spacer>\r\n   </item>\r\n   <item>\r\n    <widget class=\"QDialogButtonBox\" name=\"buttonBox\">\r\n     <property name=\"orientation\">\r\n      <enum>Qt::Horizontal</enum>\r\n     </property>\r\n     <property name=\"standardButtons\">\r\n      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>\r\n     </property>\r\n    </widget>\r\n   </item>\r\n  </layout>\r\n </widget>\r\n <resources/>\r\n <connections>\r\n  <connection>\r\n   <sender>buttonBox</sender>\r\n   <signal>accepted()</signal>\r\n   <receiver>GoAddTagsDialog</receiver>\r\n   <slot>accept()</slot>\r\n   <hints>\r\n    <hint type=\"sourcelabel\">\r\n     <x>248</x>\r\n     <y>254</y>\r\n    </hint>\r\n    <hint type=\"destinationlabel\">\r\n     <x>157</x>\r\n     <y>274</y>\r\n    </hint>\r\n   </hints>\r\n  </connection>\r\n  <connection>\r\n   <sender>buttonBox</sender>\r\n   <signal>rejected()</signal>\r\n   <receiver>GoAddTagsDialog</receiver>\r\n   <slot>reject()</slot>\r\n   <hints>\r\n    <hint type=\"sourcelabel\">\r\n     <x>316</x>\r\n     <y>260</y>\r\n    </hint>\r\n    <hint type=\"destinationlabel\">\r\n     <x>286</x>\r\n     <y>274</y>\r\n    </hint>\r\n   </hints>\r\n  </connection>\r\n </connections>\r\n</ui>\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golangedit.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: golangedit.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"golangedit.h\"\r\n#include \"golangtextlexer.h\"\r\n#include \"golangedit_global.h\"\r\n#include \"qtc_editutil/uncommentselection.h\"\r\n#include \"litebuildapi/litebuildapi.h\"\r\n#include \"golangdocapi/golangdocapi.h\"\r\n#include \"fileutil/fileutil.h\"\r\n#include \"processex/processex.h\"\r\n#include \"goaddtagsdialog.h\"\r\n#include \"goremovetagsdialog.h\"\r\n#include \"quickopenapi/quickopenapi.h\"\r\n\r\n#include <QMenu>\r\n#include <QToolBar>\r\n#include <QAction>\r\n#include <QTextStream>\r\n#include <QApplication>\r\n#include <QToolTip>\r\n#include <QRegExp>\r\n#include <QToolButton>\r\n\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\n//type gotools.s struct{}\r\n//type command.Command struct{Run func(cmd *Command, args []string);Short string;Long string;Flag flag.FlagSet;CustomFlags bool}\r\nstatic QString formatInfo(const QString &info)\r\n{\r\n    if (!info.startsWith(\"type\")) {\r\n        return info;\r\n    }\r\n    QRegExp re(\"([\\\\w\\\\s\\\\.]+)\\\\{(.+)\\\\}\");\r\n    if (re.indexIn(info) == 0) {\r\n        if (re.matchedLength() == info.length()) {\r\n            QString str = re.cap(1)+\" {\\n\";\r\n            foreach (QString item, re.cap(2).split(\";\",qtSkipEmptyParts)) {\r\n                str += \"\\t\"+item.trimmed()+\"\\n\";\r\n            }\r\n            str += \"}\";\r\n            return str;\r\n        }\r\n    }\r\n    return info;\r\n}\r\n\r\nstatic QString getGocode(LiteApi::IApplication *app)\r\n{\r\n#ifdef Q_OS_WIN\r\n    return app->toolPath()+\"/gocode.exe\";\r\n#else\r\n    return app->toolPath()+\"/gocode\";\r\n#endif\r\n}\r\n\r\nGolangEdit::GolangEdit(LiteApi::IApplication *app, QObject *parent) :\r\n    QObject(parent), m_liteApp(app), m_gorootSourceReadOnly(false), m_useGoModule(false)\r\n{\r\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(this,\"GolangEdit\");\r\n\r\n    m_viewGodocAct = new QAction(tr(\"View import package use godoc\"),this);\r\n    actionContext->regAction(m_viewGodocAct,\"ViewGodoc\",\"\");\r\n\r\n    m_findInfoAct = new QAction(tr(\"View Expression Information\"),this);\r\n    actionContext->regAction(m_findInfoAct,\"ViewInfo\",\"CTRL+SHIFT+I;F1\");\r\n\r\n    m_jumpDeclAct = new QAction(tr(\"Jump to Declaration\"),this);\r\n    actionContext->regAction(m_jumpDeclAct,\"JumpToDeclaration\",\"CTRL+SHIFT+J;F2\");\r\n\r\n    m_findUseAct = new QAction(tr(\"Find Usages\"),this);\r\n    actionContext->regAction(m_findUseAct,\"FindUsages\",\"CTRL+SHIFT+U\");\r\n\r\n    m_renameSymbolAct = new QAction(tr(\"Rename Symbol Under Cursor\"),this);\r\n    actionContext->regAction(m_renameSymbolAct,\"RenameSymbol\",\"CTRL+SHIFT+R\");\r\n\r\n    m_findAllUseSkipGorootAct = new QAction(QString(\"%1 (Module/GOPATH)\").arg(tr(\"Find Usages\")),this);\r\n    actionContext->regAction(m_findAllUseSkipGorootAct,\"FindAllUsagesSkipGOROOT\",\"CTRL+ALT+U\");\r\n\r\n    m_findAllUseSkipTestsAct = new QAction(QString(\"%1 (Module/GOPATH) skip tests\").arg(tr(\"Find Usages\")),this);\r\n    actionContext->regAction(m_findAllUseSkipTestsAct,\"FindAllUsagesSkipTests\",\"\");\r\n\r\n    m_findAllUseWithGorootAct = new QAction(QString(tr(\"%1 (Module/GOPATH) with GOROOT\")).arg(tr(\"Find Usages\")),this);\r\n    actionContext->regAction(m_findAllUseWithGorootAct,\"FindAllUsagesWithGOROOT\",\"\");\r\n\r\n    m_renameAllSymbolWithGorootAct = new QAction(QString(tr(\"%1 (Module/GOPATH) with GOROOT\")).arg(tr(\"Rename Symbol Under Cursor\")),this);\r\n    actionContext->regAction(m_renameAllSymbolWithGorootAct,\"RenameAllSymbolWithGOROOT\",\"\");\r\n\r\n    m_renameAllSymbolSkipGorootAct = new QAction(QString(\"%1 (Module/GOPATH)\").arg(tr(\"Rename Symbol Under Cursor\")),this);\r\n    actionContext->regAction(m_renameAllSymbolSkipGorootAct,\"RenameAllSymbolSkipGOROOT\",\"\");\r\n\r\n\r\n    m_fileSearch = new GolangFileSearch(app,m_liteApp);\r\n    m_goplsSearch = new GoplsFileSearch(app,m_liteApp);\r\n\r\n    LiteApi::IFileSearchManager *manager = LiteApi::getFileSearchManager(app);\r\n    if (manager) {\r\n        manager->addFileSearch(m_fileSearch);\r\n        manager->addFileSearch(m_goplsSearch);\r\n    }\r\n    m_envManager = LiteApi::getEnvManager(m_liteApp);\r\n    if (m_envManager) {\r\n        connect(m_envManager,SIGNAL(currentEnvChanged(LiteApi::IEnv*)),this,SLOT(currentEnvChanged(LiteApi::IEnv*)));\r\n    }\r\n\r\n    m_findDefProcess = new Process(this);\r\n    m_findInfoProcess = new Process(this);\r\n    m_findLinkProcess = new Process(this);\r\n    m_sourceQueryProcess = new Process(this);\r\n    m_enableMouseUnderInfo = true;\r\n    m_enableMouseNavigation = true;\r\n    m_useGocodeInfo = true;\r\n\r\n\r\n    connect(m_liteApp->editorManager(),SIGNAL(editorCreated(LiteApi::IEditor*)),this,SLOT(editorCreated(LiteApi::IEditor*)));\r\n    connect(m_liteApp->editorManager(),SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(currentEditorChanged(LiteApi::IEditor*)));\r\n\r\n    connect(m_viewGodocAct,SIGNAL(triggered()),this,SLOT(editorViewGodoc()));\r\n    connect(m_findInfoAct,SIGNAL(triggered()),this,SLOT(editorFindInfo()));\r\n    connect(m_jumpDeclAct,SIGNAL(triggered()),this,SLOT(editorJumpToDecl()));\r\n    connect(m_findUseAct,SIGNAL(triggered()),this,SLOT(editorFindUsages()));\r\n    connect(m_renameSymbolAct,SIGNAL(triggered()),this,SLOT(editorRenameSymbol()));\r\n    connect(m_findAllUseWithGorootAct,SIGNAL(triggered()),this,SLOT(editorFindUsagesGlobal()));\r\n    connect(m_findAllUseSkipGorootAct,SIGNAL(triggered()),this,SLOT(editorFindUsagesSkipGoroot()));\r\n    connect(m_findAllUseSkipTestsAct,SIGNAL(triggered()),this,SLOT(editorFindUsagesSkipTests()));\r\n    connect(m_renameAllSymbolWithGorootAct,SIGNAL(triggered()),this,SLOT(editorRenameSymbolGlobal()));\r\n    connect(m_renameAllSymbolSkipGorootAct,SIGNAL(triggered()),this,SLOT(editorRenameSymbolSkipGoroot()));\r\n    connect(m_findDefProcess,SIGNAL(started()),this,SLOT(findDefStarted()));\r\n    //connect(m_findDefProcess,SIGNAL(extOutput(QByteArray,bool)),this,SLOT(findDefOutput(QByteArray,bool)));\r\n    connect(m_findDefProcess,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(findDefFinish(int,QProcess::ExitStatus)));\r\n    connect(m_findInfoProcess,SIGNAL(started()),this,SLOT(findInfoStarted()));\r\n    //connect(m_findInfoProcess,SIGNAL(extOutput(QByteArray,bool)),this,SLOT(findInfoOutput(QByteArray,bool)));\r\n    connect(m_findInfoProcess,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(findInfoFinish(int,QProcess::ExitStatus)));\r\n    connect(m_findLinkProcess,SIGNAL(started()),this,SLOT(findLinkStarted()));\r\n    connect(m_findLinkProcess,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(findLinkFinish(int,QProcess::ExitStatus)));\r\n\r\n    //connect(&m_findInfoGopher,SIGNAL(extOutput(QByteArray,bool)),this,SLOT(findInfoGopherOutput(QByteArray,bool)));\r\n\r\n    if (m_fileSearch) {\r\n        connect(m_fileSearch,SIGNAL(searchTextChanged(QString)),this,SLOT(searchTextChanged(QString)));\r\n    }\r\n\r\n    connect(m_sourceQueryProcess,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(sourceQueryFinished(int,QProcess::ExitStatus)));\r\n    connect(m_sourceQueryProcess,SIGNAL(error(QProcess::ProcessError)),this,SLOT(sourcequeryError(QProcess::ProcessError)));\r\n\r\n    connect(m_liteApp->optionManager(),SIGNAL(applyOption(QString)),this,SLOT(applyOption(QString)));\r\n\r\n    m_sourceQueryOutput = new TextOutput(m_liteApp,true);\r\n    m_sourceQueryOutput->setLineWrap(false);\r\n\r\n    m_stopSourceQueryAct = new QAction(tr(\"Stop\"),this);\r\n    m_stopSourceQueryAct->setIcon(QIcon(\"icon:litebuild/images/stopaction.png\"));\r\n\r\n    connect(m_sourceQueryOutput,SIGNAL(dbclickEvent(QTextCursor)),this,SLOT(dbclickSourceQueryOutput(QTextCursor)));\r\n\r\n    m_sourceQueryOutputAct = m_liteApp->toolWindowManager()->addToolWindow(Qt::BottomDockWidgetArea,m_sourceQueryOutput,\"GoSourceQuery\",tr(\"Go Source Query\"),true,\r\n                                                                           QList<QAction*>() << m_stopSourceQueryAct);\r\n    connect(m_sourceQueryProcess,SIGNAL(stateChanged(QProcess::ProcessState)),this,SLOT(sourceQueryStateChanged(QProcess::ProcessState)));\r\n    connect(m_stopSourceQueryAct,SIGNAL(triggered()),this,SLOT(stopSourceQueryProcess()));\r\n\r\n    m_sourceWhatAct = new QAction(tr(\"SourceQuery What\"),this);\r\n    actionContext->regAction(m_sourceWhatAct,\"SourceQueryWhat\",\"Ctrl+Shift+H\");\r\n    connect(m_sourceWhatAct,SIGNAL(triggered()),this,SLOT(sourceWhat()));\r\n\r\n    m_sourceCalleesAct = new QAction(tr(\"Callees\"),this);\r\n    actionContext->regAction(m_sourceCalleesAct,\"SourceQueryCallees\",\"\");\r\n    connect(m_sourceCalleesAct,SIGNAL(triggered()),this,SLOT(sourceCallees()));\r\n\r\n    m_sourceCallersAct = new QAction(tr(\"Callers\"),this);\r\n    actionContext->regAction(m_sourceCallersAct,\"SourceQueryCallers\",\"\");\r\n    connect(m_sourceCallersAct,SIGNAL(triggered()),this,SLOT(sourceCallers()));\r\n\r\n    m_sourceCallstackAct = new QAction(tr(\"Callstack\"),this);\r\n    actionContext->regAction(m_sourceCallstackAct,\"SourceQueryCallstack\",\"\");\r\n    connect(m_sourceCallstackAct,SIGNAL(triggered()),this,SLOT(sourceCallstack()));\r\n\r\n    m_sourceDefinitionAct = new QAction(tr(\"Definition\"),this);\r\n    actionContext->regAction(m_sourceDefinitionAct,\"SourceQueryDefinition\",\"\");\r\n    connect(m_sourceDefinitionAct,SIGNAL(triggered()),this,SLOT(sourceDefinition()));\r\n\r\n    m_sourceDescribeAct = new QAction(tr(\"Describe\"),this);\r\n    actionContext->regAction(m_sourceDescribeAct,\"SourceQueryDescribe\",\"\");\r\n    connect(m_sourceDescribeAct,SIGNAL(triggered()),this,SLOT(sourceDescribe()));\r\n\r\n    m_sourceFreevarsAct = new QAction(tr(\"Freevars\"),this);\r\n    actionContext->regAction(m_sourceFreevarsAct,\"SourceQueryFreevars\",\"\");\r\n    connect(m_sourceFreevarsAct,SIGNAL(triggered()),this,SLOT(sourceFreevars()));\r\n\r\n    m_sourceImplementsAct = new QAction(tr(\"Implements\"),this);\r\n    actionContext->regAction(m_sourceImplementsAct,\"SourceQueryImplements\",\"\");\r\n    connect(m_sourceImplementsAct,SIGNAL(triggered()),this,SLOT(sourceImplements()));\r\n\r\n    m_sourceImplementsGopathAct = new QAction(tr(\"Implements(GOPATH)\"),this);\r\n    actionContext->regAction(m_sourceImplementsGopathAct,\"SourceQueryImplementsGopath\",\"\");\r\n    connect(m_sourceImplementsGopathAct,SIGNAL(triggered()),this,SLOT(sourceImplementsGopath()));\r\n\r\n    m_sourcePeersAct = new QAction(tr(\"Peers\"),this);\r\n    actionContext->regAction(m_sourcePeersAct,\"SourceQueryPeers\",\"\");\r\n    connect(m_sourcePeersAct,SIGNAL(triggered()),this,SLOT(sourcePeers()));\r\n\r\n    m_sourceReferrersAct = new QAction(tr(\"Referrers\"),this);\r\n    actionContext->regAction(m_sourceReferrersAct,\"SourceQueryReferrers\",\"\");\r\n    connect(m_sourceReferrersAct,SIGNAL(triggered()),this,SLOT(sourceReferrers()));\r\n\r\n    m_sourcePointstoAct = new QAction(tr(\"Pointsto\"),this);\r\n    actionContext->regAction(m_sourcePointstoAct,\"SourceQueryPointsto\",\"\");\r\n    connect(m_sourcePointstoAct,SIGNAL(triggered()),this,SLOT(sourcePointsto()));\r\n\r\n    m_sourceWhicherrs = new QAction(tr(\"Whicherrs\"),this);\r\n    actionContext->regAction(m_sourceWhicherrs,\"SourceQueryWhicherrs\",\"\");\r\n    connect(m_sourceWhicherrs,SIGNAL(triggered()),this,SLOT(sourceWhicherrs()));\r\n\r\n    m_goAddTagsAct = new QAction(tr(\"Add Tags To Struct Field\"),this);\r\n    actionContext->regAction(m_goAddTagsAct,\"GoAddTags\",\"\");\r\n    connect(m_goAddTagsAct,SIGNAL(triggered()),this,SLOT(goAddTags()));\r\n\r\n    m_goRemoveTagAct = new QAction(tr(\"Remove Tags From Struct Field\"),this);\r\n    actionContext->regAction(m_goRemoveTagAct,\"GoRemoveTags\",\"\");\r\n    connect(m_goRemoveTagAct,SIGNAL(triggered()),this,SLOT(goRemoveTags()));\r\n\r\n    m_goplsAllReferencesAct = new QAction(tr(\"Find All References (gopls)\"),this);\r\n    actionContext->regAction(m_goplsAllReferencesAct,\"GoplsFindAllReferences\",\"\");\r\n    connect(m_goplsAllReferencesAct,SIGNAL(triggered()),this,SLOT(goplsFindAllReferences()));\r\n\r\n    m_goplsAllImplementationsAct = new QAction(tr(\"Find All Implementations (gopls)\"),this);\r\n    actionContext->regAction(m_goplsAllImplementationsAct,\"GoplsFindAllImplementations\",\"\");\r\n    connect(m_goplsAllImplementationsAct,SIGNAL(triggered()),this,SLOT(goplsFindAllImplementations()));\r\n\r\n    m_addTagsDlg = 0;\r\n    m_removeTagsDlg = 0;\r\n\r\n    this->applyOption(OPTION_GOLANGEDIT);\r\n\r\n    currentEnvChanged(NULL);\r\n}\r\n\r\nGolangEdit::~GolangEdit()\r\n{\r\n    if (m_sourceQueryOutput) {\r\n        delete m_sourceQueryOutput;\r\n    }\r\n}\r\n\r\n//bool GolangEdit::eventFilter(QObject *obj, QEvent *event)\r\n//{\r\n//    if (obj == m_plainTextEdit && event->type() == QEvent::ShortcutOverride) {\r\n//        QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);\r\n////        int key = keyEvent->key();\r\n////        Qt::KeyboardModifiers modifiers = keyEvent->modifiers();\r\n////        if (modifiers & Qt::ShiftModifier) {\r\n////            key += Qt::SHIFT;\r\n////        }\r\n////        if (modifiers & Qt::ControlModifier) {\r\n////            key += Qt::CTRL;\r\n////        }\r\n////        if (modifiers & Qt::AltModifier) {\r\n////            key += Qt::ALT;\r\n////        }\r\n////        QKeySequence ks(key);\r\n////        if (m_findInfoAct->shortcuts().contains(ks)) {\r\n////            event->accept();\r\n////        }\r\n//        if ((mouseEvent->modifiers() & Qt::ControlModifier)) {\r\n//            //findEditorCursorInfo(m_editor,this->textCursorForPos(QCursor::pos()));\r\n//            return true;\r\n//        }\r\n//    }\r\n//    return QObject::eventFilter(obj,event);\r\n//}\r\n\r\nQTextCursor GolangEdit::textCursorForPos(const QPoint &globalPos)\r\n{\r\n    QPoint pos = m_plainTextEdit->viewport()->mapFromGlobal(globalPos);\r\n    QTextCursor cur = m_plainTextEdit->textCursor();\r\n    QRect rc = m_plainTextEdit->cursorRect(cur);\r\n    if (rc.contains(pos)) {\r\n        return cur;\r\n    }\r\n    return m_plainTextEdit->cursorForPosition(pos);\r\n}\r\n\r\nvoid GolangEdit::currentEnvChanged(LiteApi::IEnv *)\r\n{\r\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\r\n    if (!env.contains(\"GO111MODULE\")) {\r\n        return;\r\n    }\r\n    QString value = env.value(\"GO111MODULE\");\r\n    bool b = value.toLower() != \"off\";\r\n    if (b == m_useGoModule) {\r\n        return;\r\n    }\r\n    m_useGoModule = b;\r\n    if (!m_useGoModule) {\r\n        m_findAllUseSkipGorootAct->setText(QString(\"%1 (Module/GOPATH)\").arg(tr(\"Find Usages\")));\r\n        m_findAllUseSkipTestsAct->setText(QString(\"%1 (Module/GOPATH) skip tests\").arg(tr(\"Find Usages\")));\r\n        m_findAllUseWithGorootAct->setText(QString(tr(\"%1 (Module/GOPATH) with GOROOT\")).arg(tr(\"Find Usages\")));\r\n        m_renameAllSymbolWithGorootAct->setText(QString(tr(\"%1 (Module/GOPATH) with GOROOT\")).arg(tr(\"Rename Symbol Under Cursor\")));\r\n        m_renameAllSymbolSkipGorootAct->setText(QString(\"%1 (Module/GOPATH)\").arg(tr(\"Rename Symbol Under Cursor\")));\r\n    } else {\r\n        m_findAllUseSkipGorootAct->setText(QString(\"%1 (Module)\").arg(tr(\"Find Usages\")));\r\n        m_findAllUseSkipTestsAct->setText(QString(\"%1 (Module) skip tests\").arg(tr(\"Find Usages\")));\r\n        m_findAllUseWithGorootAct->setText(QString(tr(\"%1 (Module) and GOROOT\")).arg(tr(\"Find Usages\")));\r\n        m_renameAllSymbolWithGorootAct->setText(QString(tr(\"%1 (Module) and GOROOT\")).arg(tr(\"Rename Symbol Under Cursor\")));\r\n        m_renameAllSymbolSkipGorootAct->setText(QString(\"%1 (Module)\").arg(tr(\"Rename Symbol Under Cursor\")));\r\n    }\r\n    m_renameAllSymbolWithGorootAct->setVisible(!m_useGoModule);\r\n}\r\n\r\nvoid GolangEdit::applyOption(const QString &option)\r\n{\r\n    if (option != OPTION_GOLANGEDIT) {\r\n        return;\r\n    }\r\n    m_enableMouseUnderInfo = m_liteApp->settings()->value(GOLANGEDIT_MOUSEINFO,true).toBool();\r\n    m_enableMouseNavigation = m_liteApp->settings()->value(GOLANGEDIT_MOUSENAVIGATIOIN,true).toBool();\r\n    bool gorootSourceReadOnly = m_liteApp->settings()->value(GOLANGEDIT_GOROOTSOURCEREADONLY,false).toBool();\r\n    if (gorootSourceReadOnly != m_gorootSourceReadOnly) {\r\n        m_gorootSourceReadOnly = gorootSourceReadOnly;\r\n        QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\r\n        QString goroot = env.value(\"GOROOT\");\r\n        if (!goroot.isEmpty()) {\r\n            foreach (LiteApi::IEditor *editor, m_liteApp->editorManager()->editorList()) {\r\n                if (!editor) {\r\n                    continue;\r\n                }\r\n                QString filePath = editor->filePath();\r\n                if (filePath.isEmpty()) {\r\n                    continue;\r\n                }\r\n                if (QDir::fromNativeSeparators(filePath).startsWith(QDir::fromNativeSeparators(goroot))) {\r\n                    editor->setReadOnly(m_gorootSourceReadOnly);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\nvoid GolangEdit::editorCreated(LiteApi::IEditor *editor)\r\n{\r\n    if (!editor) {\r\n        return;\r\n    }\r\n    if (m_gorootSourceReadOnly) {\r\n        QString path = editor->filePath();\r\n        if ( !path.isEmpty()) {\r\n            QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\r\n            QString goroot = env.value(\"GOROOT\");\r\n            if (!goroot.isEmpty()) {\r\n                if (QDir::fromNativeSeparators(path).startsWith(QDir::fromNativeSeparators(goroot))) {\r\n                    editor->setReadOnly(true);\r\n                }\r\n            }\r\n        }\r\n    }\r\n    if (editor->mimeType() != \"text/x-gosrc\") {\r\n        return;\r\n    }\r\n\r\n    //editor->widget()->addAction(m_commentAct);\r\n    QMenu *menu = LiteApi::getEditMenu(editor);\r\n    if (menu) {\r\n        menu->addSeparator();\r\n        menu->addAction(m_viewGodocAct);\r\n        menu->addSeparator();\r\n        menu->addAction(m_findInfoAct);\r\n        menu->addAction(m_jumpDeclAct);\r\n        menu->addAction(m_findUseAct);\r\n        menu->addAction(m_findAllUseSkipGorootAct);\r\n        menu->addAction(m_findAllUseSkipTestsAct);\r\n        menu->addAction(m_findAllUseWithGorootAct);\r\n        menu->addSeparator();\r\n        QMenu *sub = menu->addMenu(tr(\"Refactor\"));\r\n        sub->addAction(m_renameSymbolAct);\r\n        sub->addAction(m_renameAllSymbolSkipGorootAct);\r\n        sub->addAction(m_renameAllSymbolWithGorootAct);\r\n\r\n        menu->addSeparator();\r\n        menu->addAction(m_goplsAllReferencesAct);\r\n        menu->addAction(m_goplsAllImplementationsAct);\r\n        menu->addSeparator();\r\n        menu->addAction(m_sourceWhatAct);\r\n        sub = menu->addMenu(tr(\"SourceQuery\"));\r\n        sub->addAction(m_sourceCalleesAct);\r\n        sub->addAction(m_sourceCallersAct);\r\n        sub->addAction(m_sourceCallstackAct);\r\n        sub->addAction(m_sourceDefinitionAct);\r\n        sub->addAction(m_sourceDescribeAct);\r\n        sub->addAction(m_sourceFreevarsAct);\r\n        sub->addAction(m_sourceImplementsAct);\r\n        sub->addAction(m_sourceImplementsGopathAct);\r\n        sub->addAction(m_sourcePeersAct);\r\n        sub->addAction(m_sourcePointstoAct);\r\n        sub->addAction(m_sourceReferrersAct);\r\n        sub->addAction(m_sourceWhicherrs);\r\n\r\n        menu->addSeparator();\r\n        menu->addAction(m_goAddTagsAct);\r\n        menu->addAction(m_goRemoveTagAct);\r\n    }\r\n    menu = LiteApi::getContextMenu(editor);\r\n    if (menu) {\r\n        menu->addSeparator();\r\n        menu->addAction(m_viewGodocAct);\r\n        menu->addSeparator();\r\n        menu->addAction(m_findInfoAct);\r\n        menu->addAction(m_jumpDeclAct);\r\n        menu->addAction(m_findUseAct);\r\n        menu->addAction(m_findAllUseSkipGorootAct);\r\n        menu->addAction(m_findAllUseSkipTestsAct);\r\n        menu->addAction(m_findAllUseWithGorootAct);\r\n        menu->addSeparator();\r\n        QMenu *sub = menu->addMenu(tr(\"Refactor\"));\r\n        sub->addAction(m_renameSymbolAct);\r\n        sub->addAction(m_renameAllSymbolSkipGorootAct);\r\n        sub->addAction(m_renameAllSymbolWithGorootAct);\r\n        connect(menu,SIGNAL(aboutToShow()),this,SLOT(aboutToShowContextMenu()));\r\n\r\n        menu->addSeparator();\r\n        menu->addAction(m_goplsAllReferencesAct);\r\n        menu->addAction(m_goplsAllImplementationsAct);\r\n        menu->addSeparator();\r\n        menu->addAction(m_sourceWhatAct);\r\n        sub = menu->addMenu(tr(\"SourceQuery\"));\r\n        sub->addAction(m_sourceCalleesAct);\r\n        sub->addAction(m_sourceCallersAct);\r\n        sub->addAction(m_sourceCallstackAct);\r\n        sub->addAction(m_sourceDefinitionAct);\r\n        sub->addAction(m_sourceDescribeAct);\r\n        sub->addAction(m_sourceFreevarsAct);\r\n        sub->addAction(m_sourceImplementsAct);\r\n        sub->addAction(m_sourceImplementsGopathAct);\r\n        sub->addAction(m_sourcePeersAct);\r\n        sub->addAction(m_sourcePointstoAct);\r\n        sub->addAction(m_sourceReferrersAct);\r\n        sub->addAction(m_sourceWhicherrs);\r\n\r\n        menu->addSeparator();\r\n        menu->addAction(m_goAddTagsAct);\r\n        menu->addAction(m_goRemoveTagAct);\r\n    }\r\n    m_editor = LiteApi::getLiteEditor(editor);\r\n    if (m_editor) {\r\n        m_editor->setTextLexer(new GolangTextLexer());\r\n        connect(m_editor,SIGNAL(updateLink(QTextCursor,QPoint,bool)),this,SLOT(updateLink(QTextCursor,QPoint,bool)));\r\n        //new go src for unix line end\r\n        if (m_editor->document()->isEmpty()) {\r\n            m_editor->setLineEndUnix(true);\r\n        }\r\n    }\r\n    QToolBar *toolBar = LiteApi::getEditToolBar(editor);\r\n    if (toolBar) {\r\n        toolBar->addSeparator();\r\n        //toolBar->addAction(m_jumpDeclAct);\r\n        QToolButton *btn = new QToolButton(toolBar);\r\n        btn->setDefaultAction(m_jumpDeclAct);\r\n        btn->setIcon(QIcon(\"icon:liteeditor/images/goto.png\"));\r\n        toolBar->addWidget(btn);\r\n    }\r\n}\r\n\r\nvoid GolangEdit::currentEditorChanged(LiteApi::IEditor *editor)\r\n{\r\n    if (!editor || editor->mimeType() != \"text/x-gosrc\") {\r\n        return;\r\n    }\r\n    m_editor = LiteApi::getLiteEditor(editor);\r\n    m_plainTextEdit = LiteApi::getPlainTextEdit(editor);\r\n}\r\n\r\nQString parserImport(const QString &text,int &start, int &end)\r\n{\r\n    QString sep = \"\\\"\";\r\n    start = text.indexOf(sep);\r\n    end = -1;\r\n    if (start < 0) {\r\n        sep = \"`\";\r\n        start = text.indexOf(sep);\r\n    }\r\n    if (start >= 0) {\r\n        end = text.indexOf(sep,start+1);\r\n        if (end > 0) {\r\n            return text.mid(start+1,end-start-1);\r\n        }\r\n    }\r\n    return QString();\r\n}\r\n\r\nQString parser_import(const QString &text)\r\n{\r\n    int start = -1;\r\n    int end = -1;\r\n    return parserImport(text,start,end);\r\n}\r\n\r\n\r\nvoid GolangEdit::updateLink(const QTextCursor &cursor, const QPoint &pos, bool nav)\r\n{\r\n    if (nav) {\r\n        if (!m_enableMouseNavigation) {\r\n            return;\r\n        }\r\n    } else {\r\n        if (!m_enableMouseUnderInfo) {\r\n            return;\r\n        }\r\n    }\r\n\r\n    QString text = cursor.selectedText();\r\n    //hack\r\n    if (text == \"(\") {\r\n        text.clear();\r\n    }\r\n    if (text.isEmpty()) {\r\n        m_lastLink.clear();\r\n        m_editor->clearLink();\r\n        return;\r\n    }\r\n\r\n    int linkStart = cursor.selectionStart();\r\n    int linkEnd = cursor.selectionEnd();\r\n\r\n    LiteApi::ITextLexer *textLexer = LiteApi::getTextLexer(m_editor);\r\n    if (textLexer && textLexer->isInImport(cursor)) {\r\n        int start = -1;\r\n        int end = -1;\r\n        QTextBlock block = cursor.block();\r\n        QString pkg = parserImport(block.text(),start,end);\r\n        if (!pkg.isEmpty()) {\r\n            int pkgStart = block.position()+start;\r\n            int pkgEnd = block.position()+end;\r\n            if (pkgStart <= linkStart && pkgEnd >= end) {\r\n                linkStart = pkgStart;\r\n                linkEnd = pkgEnd;\r\n            }\r\n        }\r\n    }\r\n\r\n    if (m_lastLink.linkTextStart == linkStart &&\r\n            m_lastLink.linkTextEnd == linkEnd) {\r\n        if (m_lastLink.hasValidTarget() && m_lastLink.text == text) {           \r\n            m_lastLink.cursorPos = pos;\r\n            m_lastLink.showTip = true;\r\n            m_lastLink.showNav = nav;\r\n            m_editor->showLink(m_lastLink);\r\n            return;\r\n        }\r\n    }\r\n    if (!m_findLinkProcess->isStop()) {\r\n        m_findLinkProcess->stopAndWait(100,200);\r\n    }\r\n\r\n    m_lastLink.clear();\r\n    m_lastLink.showTip = true;\r\n    m_lastLink.showNav = nav;\r\n    m_lastLink.linkTextStart = linkStart;\r\n    m_lastLink.linkTextEnd = linkEnd;\r\n    m_lastLink.cursorPos = pos;\r\n    m_lastLink.text = text;\r\n\r\n    m_srcData = m_editor->utf8Data();\r\n    int offset = m_editor->utf8Position(false,cursor.selectionStart());\r\n    QFileInfo info(m_editor->filePath());\r\n\r\n    QString cmd;\r\n    QStringList args;\r\n    if (m_useGocodeInfo) {\r\n        cmd  = getGocode(m_liteApp);\r\n        args << \"liteide_typesinfo\" << info.fileName() << QString(\"%1\").arg(offset) << selectionUnderCursor(cursor);\r\n    } else {\r\n        cmd = LiteApi::getGotools(m_liteApp);\r\n        args << \"types\";\r\n        QString tags = LiteApi::getGoBuildFlagsArgument(m_liteApp,m_editor,\"-tags\");\r\n        if (!tags.isEmpty()) {\r\n            args << \"-tags\";\r\n            args << tags;\r\n        }\r\n        args << \"-b\";\r\n        args << \"-pos\";\r\n        args << QString(\"\\\"%1:%2\\\"\").arg(info.fileName()).arg(offset);\r\n        args << \"-stdin\";\r\n        args << \"-info\";\r\n        args << \"-def\";\r\n        args << \"-doc\";\r\n        args << \".\";\r\n    }\r\n    m_findLinkProcess->setEnvironment(LiteApi::getCustomGoEnvironment(m_liteApp,m_editor).toStringList());\r\n    m_findLinkProcess->setWorkingDirectory(info.path());\r\n    m_findLinkProcess->startEx(cmd,args);\r\n}\r\n\r\nvoid GolangEdit::aboutToShowContextMenu()\r\n{\r\n    LiteApi::ITextLexer *textLexer = LiteApi::getTextLexer(m_editor);\r\n    if (!textLexer) {\r\n        return;\r\n    }\r\n    QTextCursor cursor = m_editor->textCursor();\r\n    bool b = textLexer->isInImport(cursor);\r\n    m_viewGodocAct->setVisible(b);\r\n}\r\n\r\n\r\nvoid GolangEdit::editorViewGodoc()\r\n{\r\n    LiteApi::ITextLexer *textLexer = LiteApi::getTextLexer(m_editor);\r\n    if (!textLexer) {\r\n        return;\r\n    }\r\n    QTextCursor cursor = m_editor->textCursor();\r\n    bool b = textLexer->isInImport(cursor);\r\n    if (!b) {\r\n        return;\r\n    }\r\n    QString pkg = parser_import(cursor.block().text());\r\n    if (pkg.isEmpty()) {\r\n        return;\r\n    }\r\n    QString pkgPath = pkg;\r\n    QString addin;\r\n    //check mod and vendor pkg\r\n    QString gotools = LiteApi::getGotools(m_liteApp);\r\n    if (!gotools.isEmpty()) {\r\n        QProcess process(this);\r\n        QFileInfo info(m_editor->filePath());\r\n        process.setEnvironment(LiteApi::getCustomGoEnvironment(m_liteApp,m_editor).toStringList());\r\n        process.setWorkingDirectory(info.path());\r\n        QStringList args;\r\n        args << \"pkgcheck\" << \"-pkg\" << pkg;\r\n        process.start(gotools,args);\r\n        if (!process.waitForFinished(3000)) {\r\n            process.kill();\r\n        }\r\n        QByteArray ar = process.readAllStandardOutput();\r\n        QString pkgs = QString::fromUtf8(ar).trimmed();\r\n        if (!pkgs.isEmpty()) {\r\n            QStringList pkgInfo = pkgs.split(\",\");\r\n            //vendor_path,vendor\r\n            //mod_fullpath,mod\r\n            //pkg_path,pkg\r\n            if (pkgInfo.size() == 2 && !pkgInfo[0].isEmpty()) {\r\n                pkgPath = pkgInfo[0];\r\n            }\r\n            if (pkgInfo[1] == \"vendor\" || pkgInfo[1] == \"mod\")  {\r\n                addin = pkg;\r\n            }\r\n        }\r\n    }\r\n\r\n    LiteApi::IGolangDoc *doc = LiteApi::getGolangDoc(m_liteApp);\r\n    if (!doc) {\r\n        return;\r\n    }\r\n    QUrl url;\r\n    url.setScheme(\"pdoc\");\r\n    url.setPath(pkgPath);\r\n    doc->openUrl(url,addin);\r\n    doc->activeBrowser();\r\n}\r\n\r\nvoid GolangEdit::editorJumpToDecl()\r\n{\r\n    bool moveLeft = false;\r\n    int selectStart = 0;\r\n    QString text = LiteApi::wordUnderCursor(m_plainTextEdit->textCursor(),&moveLeft,&selectStart);\r\n    if (text.isEmpty() || text.contains(\" \")) {\r\n        return;\r\n    }\r\n\r\n    if (!m_findDefProcess->isStop()) {\r\n        m_findDefProcess->stopAndWait(100,200);\r\n    }\r\n\r\n    m_lastCursor = m_plainTextEdit->textCursor();\r\n    int offset = m_editor->utf8Position(false,selectStart);\r\n    m_srcData = m_editor->utf8Data();\r\n    QFileInfo info(m_editor->filePath());\r\n\r\n    QString cmd;\r\n    QStringList args;\r\n    if (m_useGocodeInfo) {\r\n        cmd  = getGocode(m_liteApp);\r\n        args << \"liteide_typesinfo\" << info.fileName() << QString(\"%1\").arg(offset) << selectionUnderCursor(m_lastCursor,moveLeft);\r\n    } else {\r\n        cmd = LiteApi::getGotools(m_liteApp);\r\n        args << \"types\";\r\n        QString tags = LiteApi::getGoBuildFlagsArgument(m_liteApp,m_editor,\"-tags\");\r\n        if (!tags.isEmpty()) {\r\n            args << \"-tags\";\r\n            args << tags;\r\n        }\r\n        args << \"-pos\";\r\n        args << QString(\"\\\"%1:%2\\\"\").arg(info.fileName()).arg(offset);\r\n        args << \"-stdin\";\r\n        args << \"-def\";\r\n        args << \".\";\r\n    }\r\n\r\n    m_findDefProcess->setEnvironment(LiteApi::getCustomGoEnvironment(m_liteApp,m_editor).toStringList());\r\n    m_findDefProcess->setWorkingDirectory(info.path());\r\n    m_findDefProcess->startEx(cmd,args);\r\n}\r\n\r\nvoid GolangEdit::editorFindUsages()\r\n{\r\n    QTextCursor cursor = m_plainTextEdit->textCursor();\r\n    m_fileSearch->findUsages(m_editor,cursor,false,false,false,false);\r\n}\r\n\r\nvoid GolangEdit::editorFindUsagesGlobal()\r\n{\r\n    QTextCursor cursor = m_plainTextEdit->textCursor();\r\n    m_fileSearch->findUsages(m_editor,cursor,true,false,false,false);\r\n}\r\n\r\nvoid GolangEdit::editorFindUsagesSkipGoroot()\r\n{\r\n    QTextCursor cursor = m_plainTextEdit->textCursor();\r\n    m_fileSearch->findUsages(m_editor,cursor,true,true,false,false);\r\n}\r\n\r\nvoid GolangEdit::editorFindUsagesSkipTests()\r\n{\r\n    QTextCursor cursor = m_plainTextEdit->textCursor();\r\n    m_fileSearch->findUsages(m_editor,cursor,true,true,true,false);\r\n}\r\n\r\nvoid GolangEdit::editorRenameSymbol()\r\n{\r\n    QTextCursor cursor = m_plainTextEdit->textCursor();\r\n    m_fileSearch->findUsages(m_editor,cursor,false,false,false,true);\r\n}\r\n\r\nvoid GolangEdit::editorRenameSymbolGlobal()\r\n{\r\n    QTextCursor cursor = m_plainTextEdit->textCursor();\r\n    m_fileSearch->findUsages(m_editor,cursor,true,false,false,true);\r\n}\r\n\r\nvoid GolangEdit::editorRenameSymbolSkipGoroot()\r\n{\r\n    QTextCursor cursor = m_plainTextEdit->textCursor();\r\n    m_fileSearch->findUsages(m_editor,cursor,true,true,false,true);\r\n}\r\n\r\nvoid GolangEdit::editorComment()\r\n{\r\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\r\n    if (!editor) {\r\n        return;\r\n    }\r\n    QPlainTextEdit *textEdit = LiteApi::findExtensionObject<QPlainTextEdit*>(editor,\"LiteApi.QPlainTextEdit\");\r\n    if (!textEdit) {\r\n        return;\r\n    }\r\n    Utils::CommentDefinition cd;\r\n    cd.setAfterWhiteSpaces(false);\r\n    Utils::unCommentSelection(textEdit,Utils::AutoComment,cd);\r\n}\r\n\r\nvoid GolangEdit::editorFindInfo()\r\n{\r\n    m_srcData = m_editor->utf8Data();\r\n    QFileInfo info(m_editor->filePath());\r\n    bool moveLeft = false;\r\n    int selectStart = 0;\r\n    QString text = LiteApi::wordUnderCursor(m_plainTextEdit->textCursor(),&moveLeft,&selectStart);\r\n    if (text.isEmpty() || text.contains(\" \")) {\r\n        return;\r\n    }\r\n\r\n    m_lastCursor = m_plainTextEdit->textCursor();\r\n    int offset = m_editor->utf8Position(false,selectStart);\r\n\r\n    QString cmd;\r\n    QStringList args;\r\n    if (m_useGocodeInfo) {\r\n        cmd  = getGocode(m_liteApp);\r\n        args << \"liteide_typesinfo\" << info.fileName() << QString(\"%1\").arg(offset) << selectionUnderCursor(m_lastCursor,moveLeft);\r\n    } else {\r\n        cmd = LiteApi::getGotools(m_liteApp);\r\n        args << \"types\";\r\n        QString tags = LiteApi::getGoBuildFlagsArgument(m_liteApp,m_editor,\"-tags\");\r\n        if (!tags.isEmpty()) {\r\n            args << \"-tags\";\r\n            args << tags;\r\n        }\r\n        args << \"-pos\";\r\n        args << QString(\"\\\"%1:%2\\\"\").arg(info.fileName()).arg(offset);\r\n        args << \"-stdin\";\r\n        args << \"-info\";\r\n        args << \"-def\";\r\n        args << \"-doc\";\r\n        args << \".\";\r\n    }\r\n\r\n    if (!m_findInfoProcess->isStop()) {\r\n        m_findInfoProcess->stopAndWait(100,200);\r\n    }\r\n    m_findInfoProcess->setEnvironment(LiteApi::getCustomGoEnvironment(m_liteApp,m_editor).toStringList());\r\n    m_findInfoProcess->setWorkingDirectory(info.path());\r\n    m_findInfoProcess->startEx(cmd,args);\r\n}\r\n\r\nvoid GolangEdit::findDefStarted()\r\n{\r\n    m_findDefProcess->write(m_srcData);\r\n    m_findDefProcess->closeWriteChannel();\r\n}\r\n\r\nvoid GolangEdit::findDefFinish(int code,QProcess::ExitStatus status)\r\n{\r\n    if (code != 0) {\r\n        QString err = ProcessEx::exitStatusText(code,status);\r\n        m_liteApp->appendLog(\"find def error\",err,true);\r\n        return;\r\n    }\r\n    QByteArray data = m_findDefProcess->readAllStandardOutput();\r\n    if (data.isEmpty()) {\r\n        QByteArray data = m_findDefProcess->readAllStandardError();\r\n        if (!data.isEmpty()) {\r\n            m_liteApp->appendLog(\"GolangEdit\",QString::fromUtf8(data),true);\r\n        }\r\n        return;\r\n    }\r\n\r\n    QStringList infos = QString::fromUtf8(data).trimmed().split(\"\\n\");\r\n    QString info = infos.at(0);\r\n    QRegExp reg(\":(\\\\d+):(\\\\d+)\");\r\n    int pos = reg.lastIndexIn(info);\r\n    if (pos >= 0) {\r\n        //:fname:fpath:dir\r\n        if(info.length() > (pos+reg.matchedLength()) ) {\r\n            QStringList extra = info.mid(pos+reg.matchedLength()).split(\"::\",qtSkipEmptyParts);\r\n            if (extra.size() == 3) {\r\n                QString targetOpenDir = extra[2];\r\n                QString targetOpenDirInfo = QString(tr(\"Below files in package %1\").arg(extra[1]));\r\n                if (!targetOpenDir.isEmpty()) {\r\n                    LiteApi::IQuickOpenManager *mgr = LiteApi::getQuickOpenManager(m_liteApp);\r\n                    if (mgr) {\r\n                        LiteApi::IQuickOpenFileSystem *fileSystem = LiteApi::getQuickOpenFileSystem(mgr);\r\n                        if (fileSystem) {\r\n                            fileSystem->setRootPath(targetOpenDir);\r\n                            fileSystem->setPlaceholderText(targetOpenDirInfo);\r\n                            mgr->setCurrentFilter(fileSystem);\r\n                            mgr->showPopup();\r\n                            return;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        QString fileName = info.left(pos);\r\n        int line = reg.cap(1).toInt();\r\n        int col = reg.cap(2).toInt();\r\n        col = byteOffsetToColumn(fileName,line,col);\r\n        LiteApi::gotoLine(m_liteApp,fileName,line-1,col-1,true,true);\r\n    }\r\n}\r\n\r\nvoid GolangEdit::findInfoStarted()\r\n{\r\n    m_findInfoProcess->write(m_srcData);\r\n    m_findInfoProcess->closeWriteChannel();\r\n}\r\n\r\nvoid GolangEdit::findInfoFinish(int code, QProcess::ExitStatus)\r\n{\r\n    if (code != 0) {\r\n        return;\r\n    }\r\n    QByteArray data = m_findInfoProcess->readAllStandardOutput();\r\n    if (data.isEmpty()) {\r\n        return;\r\n    }\r\n    if ( m_editor == m_liteApp->editorManager()->currentEditor()) {\r\n        if (m_plainTextEdit->textCursor() == m_lastCursor) {\r\n            QStringList lines = QString::fromUtf8(data).trimmed().split(\"\\n\");\r\n            QString info;\r\n            if (lines.size() >= 2) {\r\n                info = formatInfo(lines[1]);\r\n                if (lines.size() >= 3) {\r\n                    info += \"\\n\";\r\n                    for (int i = 2; i < lines.size(); i++) {\r\n                        info += \"\\n\"+lines.at(i);\r\n                    }\r\n                }\r\n            }\r\n            QRect rc = m_plainTextEdit->cursorRect(m_lastCursor);\r\n            QPoint pt = m_plainTextEdit->mapToGlobal(rc.topRight());\r\n            m_editor->showToolTipInfo(pt,info);\r\n        }\r\n    }\r\n}\r\n\r\nvoid GolangEdit::findInfoGopherOutput(const QByteArray &data, bool bError)\r\n{\r\n    qDebug() << bError << data;\r\n}\r\n\r\nvoid GolangEdit::findLinkStarted()\r\n{\r\n    m_findLinkProcess->write(m_srcData);\r\n    m_findLinkProcess->closeWriteChannel();\r\n}\r\n\r\nstatic QStringList FindSourceInfo(LiteApi::IApplication *app, const QString &fileName, int line, int maxLine) {\r\n    QStringList lines;\r\n    LiteApi::IEditor *edit = app->editorManager()->findEditor(fileName,true);\r\n    int digits = 2;\r\n    int max = line+maxLine;\r\n    while (max >= 100) {\r\n        max /= 10;\r\n        ++digits;\r\n    }\r\n    if (edit) {\r\n        QPlainTextEdit *ed = LiteApi::getPlainTextEdit(edit);\r\n        if (ed) {\r\n            QTextBlock block = ed->document()->findBlockByLineNumber(line);\r\n            int index = 0;\r\n            while (block.isValid() && index < maxLine) {\r\n                index++;\r\n                lines.append(QString(\"%1 %2\").arg(line+index,digits).arg(block.text()));\r\n                block = block.next();\r\n            }\r\n        }\r\n    } else {\r\n        QFile f(fileName);\r\n        if (f.open(QFile::ReadOnly)) {\r\n            QTextStream stream(&f);\r\n            stream.setCodec(\"utf-8\");\r\n            int curLine = 0;\r\n            QString text;\r\n            while(!stream.atEnd() && (curLine < (line+maxLine)) ) {\r\n                text = stream.readLine();\r\n                if (curLine >= line) {\r\n                    lines.append(QString(\"%1 %2\").arg(curLine,digits).arg(text));\r\n                }\r\n                curLine++;\r\n            }\r\n        }\r\n    }\r\n    return lines;\r\n}\r\n\r\nstatic QString FindSourceBlock(LiteApi::IApplication *app, const QString &fileName, int blockNumber) {\r\n    QString lines;\r\n    LiteApi::IEditor *edit = app->editorManager()->findEditor(fileName,true);\r\n    if (edit) {\r\n        QPlainTextEdit *ed = LiteApi::getPlainTextEdit(edit);\r\n        if (ed) {\r\n            QTextBlock block = ed->document()->findBlockByNumber(blockNumber);\r\n            if (block.isValid()) {\r\n                lines = block.text();\r\n            }\r\n        }\r\n    } else {\r\n        QFile f(fileName);\r\n        if (f.open(QFile::ReadOnly)) {\r\n            QTextStream stream(&f);\r\n            stream.setCodec(\"utf-8\");\r\n            int curLine = 0;\r\n            QString text;\r\n            while(!stream.atEnd()) {\r\n                text = stream.readLine();\r\n                if (curLine == blockNumber) {\r\n                    lines = text;\r\n                    break;\r\n                }\r\n                curLine++;\r\n            }\r\n        }\r\n    }\r\n    return lines;\r\n}\r\n\r\n\r\nint GolangEdit::byteOffsetToColumn(const QString &fileName, int line, int col)\r\n{\r\n    QString block = FindSourceBlock(m_liteApp,fileName,line-1);\r\n    if (!block.isEmpty()) {\r\n        QByteArray line = block.toUtf8();\r\n        if (col > 0) {\r\n            return QString::fromUtf8(line.left(col)).length();\r\n        }\r\n    }\r\n    return col;\r\n}\r\n\r\nvoid GolangEdit::findLinkFinish(int code,QProcess::ExitStatus)\r\n{\r\n    if (code != 0) {\r\n        return;\r\n    }\r\n    QByteArray data = m_findLinkProcess->readAllStandardOutput();\r\n    if ( m_editor == m_liteApp->editorManager()->currentEditor()) {\r\n        if (m_lastLink.hasValidLinkText()) {\r\n            QStringList info = QString::fromUtf8(data).trimmed().split(\"\\n\");\r\n            if (info.size() >= 2) {\r\n                if (info[0] != \"-\") {\r\n                    QString fileInfo = info[0];\r\n                    QRegExp reg(\":(\\\\d+):(\\\\d+)\");\r\n                    int pos = reg.lastIndexIn(fileInfo);\r\n                    if (pos >= 0) {\r\n                        QString fileName = fileInfo.left(pos);\r\n                        int line = reg.cap(1).toInt();\r\n                        int col = reg.cap(2).toInt();\r\n                        col = byteOffsetToColumn(fileName,line,col);\r\n\r\n                        bool importExtra = false;\r\n                        //parser import line extra info\r\n                        if(fileInfo.length() > (pos+reg.matchedLength()) ) {\r\n                            QStringList extra = fileInfo.mid(pos+reg.matchedLength()).split(\"::\",qtSkipEmptyParts);\r\n                            //:fname:fpath:dir\r\n                            if (extra.size() == 3) {\r\n                                importExtra = true;\r\n                                m_lastLink.targetOpenDir = extra[2];\r\n                                m_lastLink.targetOpenDirInfo = QString(tr(\"Below files in package %1\").arg(extra[1]));\r\n                                m_lastLink.targetInfo = formatInfo(info[1]);\r\n                                m_lastLink.sourceInfo = QString(\"%1\\n\\n> %2\").arg(formatInfo(info[1])).arg(extra[2]);\r\n                            }\r\n                        }\r\n                        m_lastLink.targetFileName = fileName;\r\n                        m_lastLink.targetLine = line-1;\r\n                        m_lastLink.targetColumn = col-1;\r\n                        if (!importExtra) {\r\n                            m_lastLink.targetInfo = formatInfo(info[1]);\r\n                            m_lastLink.sourceInfo = QString(\"%1\\n\\n> %2:%3\").arg(formatInfo(info[1])).arg(fileName).arg(line);\r\n                        }\r\n                        if (m_lastLink.showNav) {\r\n                            int n = 7;\r\n                            if (info.size() >= 3) {\r\n                                for (int i = 2; i < info.size(); i++) {\r\n                                    m_lastLink.sourceInfo += \"\\n// \"+info.at(i);\r\n                                    n--;\r\n                                    if (i >= 5) {\r\n                                        if (i+1 < info.size()) {\r\n                                            m_lastLink.sourceInfo += \"\\t...\";\r\n                                        }\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                            if (!importExtra) {\r\n                                m_lastLink.sourceInfo += \"\\n\\n\";\r\n                                m_lastLink.sourceInfo += FindSourceInfo(m_liteApp,fileName,line-1,n).join(\"\\n\").replace(\"\\t\",\"    \");\r\n                            }\r\n                        }\r\n                        // show doc\r\n                        if (m_lastLink.showTip && (info.size() >= 3) ) {\r\n                            m_lastLink.targetInfo += \"\\n\";\r\n                            for (int i = 2; i < info.size(); i++) {\r\n                                m_lastLink.targetInfo += \"\\n\"+info.at(i);\r\n                            }\r\n                        }\r\n                        m_editor->showLink(m_lastLink);\r\n                    }\r\n                } else if (info[0] == \"-\") {\r\n                    QString infos = info[1];\r\n                    if (infos == \"nil\") {\r\n                        infos = \"zero value nil\";\r\n                    }\r\n                    m_lastLink.targetInfo = infos;\r\n                    m_lastLink.sourceInfo = infos;\r\n                    m_editor->showLink(m_lastLink);\r\n                } else {\r\n                    m_editor->clearLink();\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\nvoid GolangEdit::searchTextChanged(const QString &/*word*/)\r\n{\r\n\r\n}\r\n\r\nvoid GolangEdit::sourceQueryFinished(int code, QProcess::ExitStatus /*status*/)\r\n{\r\n    m_sourceQueryOutputAct->setChecked(true);\r\n   // m_oracleOutput->clear();\r\n    m_sourceQueryOutput->updateExistsTextColor(true);\r\n    if (code != 0) {\r\n        QByteArray data = m_sourceQueryProcess->readAllStandardError();\r\n        m_sourceQueryOutput->append(data,Qt::red);\r\n        return;\r\n    }\r\n    QByteArray data = m_sourceQueryProcess->readAllStandardOutput();\r\n    if (data.isEmpty()) {\r\n        data = m_sourceQueryProcess->readAllStandardError();\r\n    }\r\n    if (data.isEmpty()) {\r\n        m_sourceQueryOutput->append(QString(\"oracle \\\"%1\\\" output is nothing.\").arg(m_sourceQueryInfo.action));\r\n        return;\r\n    }\r\n    m_sourceQueryInfo.output = QString::fromUtf8(data);\r\n    m_sourceQueryInfo.success = true;\r\n   // m_oracleOutput->append(m_oracleInfo.output);\r\n    //remove referrers action\r\n    foreach (QString line, QString::fromUtf8(data).split(\"\\n\")) {\r\n        //-: modes: [callees callers callstack definition describe implements pointsto referrers]\r\n        if (line.startsWith(\"-: modes:\")) {\r\n            QString mode = line.mid(9);\r\n           // mode.remove(QRegExp(\"\\\\s?\\\\breferrers\\\\b\"));\r\n            if (mode.contains(\"implements\")) {\r\n                mode.replace(\"implements\",\"implements implements_GOPATH\");\r\n            }\r\n            m_sourceQueryInfo.mode = mode;\r\n        }\r\n        m_sourceQueryOutput->append(line+\"\\n\");\r\n    }\r\n    if (!m_sourceQueryInfo.mode.isEmpty()) {\r\n        m_sourceQueryOutput->appendTag(m_sourceQueryInfo.mode+\"\\n\");\r\n    }\r\n}\r\n\r\nvoid GolangEdit::sourcequeryError(QProcess::ProcessError code)\r\n{\r\n    QString data = ProcessEx::processErrorText(code);\r\n    m_sourceQueryOutput->append(data,Qt::red);\r\n}\r\n\r\n//void GolangEdit::updateOracleInfo(const QString &action, const QString &text)\r\n//{\r\n//    //if (action == \"what\") {\r\n//        QRegExp reg(\"((?:[a-zA-Z]:)?[\\\\w\\\\d_\\\\-\\\\\\\\/\\\\.]+):(\\\\d+)[\\\\.:]?(\\\\d+)?\\\\-?(\\\\d+)?\\\\.?(\\\\d+)?\\\\b\");\r\n//        foreach (QString line, text.split(\"\\n\")) {\r\n//            if (reg.indexIn(line) >= 0) {\r\n//                //qDebug() << reg.capturedTexts();\r\n//                QString text = line.mid(reg.capturedTexts().at(0).length());\r\n//                QString html = QString(\"<a href=\\\"file://%1\\\">%2</a> %3\").arg(reg.capturedTexts().at(0)).arg(reg.capturedTexts().at(0)).arg(text);\r\n//                m_oracleOutput->appendHtml(html);\r\n//            }\r\n//        }\r\n//    //}\r\n//    m_oracleOutput->append(text);\r\n//}\r\n\r\nvoid GolangEdit::dbclickSourceQueryOutput(const QTextCursor &cursor)\r\n{\r\n    QTextCursor cur = cursor;\r\n    cur.select(QTextCursor::LineUnderCursor);\r\n    QString text = cur.selectedText();\r\n    if (text.isEmpty()) {\r\n        return;\r\n    }\r\n\r\n    bool hasGotoLine = false;\r\n    QRegExp reg(\"((?:[a-zA-Z]:)?[\\\\w\\\\d_@\\\\s\\\\-\\\\\\\\/\\\\.]+):(\\\\d+)[\\\\.:]?(\\\\d+)?\\\\-?(\\\\d+)?\\\\.?(\\\\d+)?\\\\b\");\r\n    if (reg.indexIn(text) >= 0) {\r\n        hasGotoLine = true;\r\n    }\r\n\r\n    if (!hasGotoLine) {\r\n        QTextCursor cur = cursor;\r\n        cur.select(QTextCursor::WordUnderCursor);\r\n        QString text = cur.selectedText();\r\n        QStringList actions;\r\n        actions << \"callees\" << \"callers\" << \"callstack\" << \"definition\" << \"describe\" << \"freevars\" << \"implements\" << \"implements_GOPATH\" << \"peers\" << \"referrers\" << \"pointsto\" << \"whicherrs\";\r\n        if (actions.contains(text)) {\r\n            if (text.endsWith(\"_GOPATH\")) {\r\n                runSourceQueryByInfo(text.replace(\"_GOPATH\",\"\"),\"...\");\r\n            } else {\r\n                runSourceQueryByInfo(text);\r\n            }\r\n        }\r\n        return;\r\n    }\r\n\r\n    QStringList capList = reg.capturedTexts();\r\n    if (capList.count() < 5) {\r\n        return;\r\n    }\r\n    QString fileName = capList[1];\r\n    QString fileLine = capList[2];\r\n    QString fileCol = capList[3];\r\n\r\n    bool ok = false;\r\n    int line = fileLine.toInt(&ok);\r\n    if (!ok)\r\n        return;\r\n    int col = fileCol.toInt(&ok);\r\n    if (!ok) {\r\n        col = 1;\r\n    }\r\n\r\n    QDir dir(m_sourceQueryInfo.workPath);\r\n    if (!QFileInfo(fileName).isAbsolute()) {\r\n        fileName = dir.filePath(fileName);\r\n    }\r\n\r\n    col = byteOffsetToColumn(fileName,line,col);\r\n    if (LiteApi::gotoLine(m_liteApp,fileName,line-1,col-1,true,true)) {\r\n        m_sourceQueryOutput->setTextCursor(cur);\r\n    }\r\n}\r\n\r\nvoid GolangEdit::runSourceQueryAction(const QString &action, const QString &scope)\r\n{\r\n    QTextCursor cursor = m_plainTextEdit->textCursor();\r\n    if (!m_sourceQueryProcess->isStop()) {\r\n        m_sourceQueryProcess->stopAndWait(100,200);\r\n    }\r\n    int offset = -1;\r\n    int offset2 = -1;\r\n    if (cursor.hasSelection()) {\r\n        offset = m_editor->utf8Position(true,cursor.selectionStart());\r\n        offset2 = m_editor->utf8Position(true,cursor.selectionEnd());\r\n    } else {\r\n        bool moveLeft = false;\r\n        int selectStart = 0;\r\n        QString text = LiteApi::wordUnderCursor(cursor,&moveLeft,&selectStart);\r\n        if (text.isEmpty() || text.contains(\" \")) {\r\n            return;\r\n        }\r\n        m_liteApp->editorManager()->saveAllEditors(false);\r\n        offset = m_editor->utf8Position(true,selectStart);\r\n    }\r\n\r\n    QString cmd;\r\n    QString cmdName;\r\n\r\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\r\n    QString guruFilePath = FileUtil::lookupGoBin(\"guru\",m_liteApp,env,true);\r\n\r\n    if (!guruFilePath.isEmpty()) {\r\n        cmd = guruFilePath;\r\n        cmdName = \"guru\";\r\n    } else {\r\n        m_liteApp->appendLog(\"GolangEdit\",\"guru was not found on system PATH (hint: is guru installed? \\\"go install golang.org/x/tools/cmd/guru@latest\\\")\",true);\r\n        return;\r\n    }\r\n\r\n    m_sourceQueryOutputAct->setChecked(true);\r\n\r\n    m_sourceQueryOutput->clear();\r\n    m_sourceQueryOutput->append(QString(\"\\nwait for source query, command \\\"%1\\\" action \\\"%2\\\" scope \\\"%3\\\"\\n\\n\").arg(cmdName).arg(action).arg(scope));\r\n\r\n    QFileInfo info(m_editor->filePath());\r\n\r\n    m_sourceQueryInfo.cmdName = cmdName;\r\n    m_sourceQueryInfo.action = action;\r\n    m_sourceQueryInfo.workPath = info.path();\r\n    m_sourceQueryInfo.filePath = info.filePath();\r\n    m_sourceQueryInfo.fileName = info.fileName();\r\n    m_sourceQueryInfo.output.clear();\r\n    m_sourceQueryInfo.success = false;\r\n    m_sourceQueryInfo.mode.clear();\r\n    m_sourceQueryInfo.offset = offset;\r\n    m_sourceQueryInfo.offset2 = offset2;\r\n\r\n\r\n    m_sourceQueryProcess->setEnvironment(LiteApi::getCustomGoEnvironment(m_liteApp,m_editor).toStringList());\r\n    m_sourceQueryProcess->setWorkingDirectory(info.path());\r\n\r\n    QString fileName = info.fileName();\r\n    QStringList args;\r\n    if (!guruFilePath.isEmpty()) {\r\n        args << \"-scope\" << scope;\r\n        args << action;\r\n        if (offset2 -= 1) {\r\n            args << QString(\"\\\"%1:#%2\\\"\").arg(fileName).arg(offset);\r\n        } else {\r\n            args << QString(\"\\\"%1:#%2,#%3\\\"\").arg(fileName).arg(offset).arg(offset2);\r\n        }\r\n    } else {\r\n        args << \"oracle\";\r\n        if (offset2 -= 1) {\r\n            args << QString(\"-pos \\\"%1:#%2\\\"\").arg(fileName).arg(offset);\r\n        } else {\r\n            args << QString(\"-pos \\\"%1:#%2,#%3\\\"\").arg(fileName).arg(offset).arg(offset2);\r\n        }\r\n        args << action;\r\n        args << scope;\r\n    }\r\n    m_sourceQueryProcess->startEx(cmd,args);\r\n}\r\n\r\nvoid GolangEdit::runSourceQueryByInfo(const QString &action, const QString &scope)\r\n{\r\n    if (!m_sourceQueryProcess->isStop()) {\r\n        m_sourceQueryProcess->stopAndWait(100,200);\r\n    }\r\n\r\n    QString cmd;\r\n    QString cmdName;\r\n\r\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\r\n    QString guruFilePath = FileUtil::lookupGoBin(\"guru\",m_liteApp,env,true);\r\n\r\n    if (!guruFilePath.isEmpty()) {\r\n        cmd = guruFilePath;\r\n        cmdName = \"guru\";\r\n    } else {\r\n        cmd = LiteApi::getGotools(m_liteApp);\r\n        cmdName = \"oracle\";\r\n    }\r\n\r\n    m_sourceQueryInfo.cmdName = cmdName;\r\n    int offset = m_sourceQueryInfo.offset;\r\n    int offset2 = m_sourceQueryInfo.offset2;\r\n\r\n    m_sourceQueryOutput->append(QString(\"\\nwait for source query, command \\\"%1\\\" action \\\"%2\\\" scope \\\"%3\\\" \\n\\n\").arg(cmdName).arg(action).arg(scope));\r\n\r\n    m_sourceQueryProcess->setEnvironment(LiteApi::getCustomGoEnvironment(m_liteApp,m_editor).toStringList());\r\n    m_sourceQueryProcess->setWorkingDirectory(m_sourceQueryInfo.workPath);\r\n\r\n    QString fileName = m_sourceQueryInfo.fileName;\r\n    QStringList args;\r\n    if (!guruFilePath.isEmpty()) {\r\n        args << \"-scope\" << scope;\r\n        args << action;\r\n        if (offset2 -= 1) {\r\n            args << QString(\"\\\"%1:#%2\\\"\").arg(fileName).arg(offset);\r\n        } else {\r\n            args << QString(\"\\\"%1:#%2,#%3\\\"\").arg(fileName).arg(offset).arg(offset2);\r\n        }\r\n    } else {\r\n        args << \"oracle\";\r\n        if (offset2 -= 1) {\r\n            args << QString(\"-pos \\\"%1:#%2\\\"\").arg(fileName).arg(offset);\r\n        } else {\r\n            args << QString(\"-pos \\\"%1:#%2,#%3\\\"\").arg(fileName).arg(offset).arg(offset2);\r\n        }\r\n        args << action;\r\n        args << scope;\r\n    }\r\n    m_sourceQueryProcess->startEx(cmd,args);\r\n}\r\n\r\nvoid GolangEdit::sourceWhat()\r\n{\r\n    runSourceQueryAction(\"what\");\r\n}\r\n\r\nvoid GolangEdit::sourceCallees()\r\n{\r\n    runSourceQueryAction(\"callees\");\r\n}\r\n\r\nvoid GolangEdit::sourceCallers()\r\n{\r\n    runSourceQueryAction(\"callers\");\r\n}\r\n\r\nvoid GolangEdit::sourceCallstack()\r\n{\r\n    runSourceQueryAction(\"callstack\");\r\n}\r\n\r\nvoid GolangEdit::sourceDefinition()\r\n{\r\n    runSourceQueryAction(\"definition\");\r\n}\r\n\r\nvoid GolangEdit::sourceDescribe()\r\n{\r\n    runSourceQueryAction(\"describe\");\r\n}\r\n\r\nvoid GolangEdit::sourceFreevars()\r\n{\r\n    runSourceQueryAction(\"freevars\");\r\n}\r\n\r\nvoid GolangEdit::sourceImplements()\r\n{\r\n    runSourceQueryAction(\"implements\");\r\n}\r\n\r\nvoid GolangEdit::sourceImplementsGopath()\r\n{\r\n    runSourceQueryAction(\"implements\",\"...\");\r\n}\r\n\r\nvoid GolangEdit::sourcePeers()\r\n{\r\n    runSourceQueryAction(\"peers\");\r\n}\r\n\r\nvoid GolangEdit::sourceReferrers()\r\n{\r\n    runSourceQueryAction(\"referrers\");\r\n}\r\n\r\nvoid GolangEdit::sourcePointsto()\r\n{\r\n    runSourceQueryAction(\"pointsto\");\r\n}\r\n\r\nvoid GolangEdit::sourceWhicherrs()\r\n{\r\n    runSourceQueryAction(\"whicherrs\");\r\n}\r\n\r\nvoid GolangEdit::sourceQueryStateChanged(QProcess::ProcessState state)\r\n{\r\n    m_stopSourceQueryAct->setEnabled(state == QProcess::Running);\r\n}\r\n\r\nvoid GolangEdit::stopSourceQueryProcess()\r\n{\r\n    if (m_sourceQueryProcess->isRunning()) {\r\n        m_sourceQueryProcess->stop(200);\r\n    }\r\n}\r\n\r\nvoid GolangEdit::goplsFindAllReferences()\r\n{\r\n    QTextCursor cursor = m_plainTextEdit->textCursor();\r\n    m_goplsSearch->setReadOnly(false);\r\n    m_goplsSearch->setDisplyName(tr(\"All References\"));\r\n    m_goplsSearch->findUsages(m_editor,cursor, GOPLS_references,QStringList() << \"-d\");\r\n}\r\n\r\nvoid GolangEdit::goplsFindAllImplementations()\r\n{\r\n    QTextCursor cursor = m_plainTextEdit->textCursor();\r\n    m_goplsSearch->setReadOnly(true);\r\n    m_goplsSearch->setDisplyName(tr(\"All Implementation\"));\r\n    m_goplsSearch->findUsages(m_editor,cursor, GOPLS_implementation);\r\n}\r\n\r\nQString GolangEdit::getGoModifyTagsInfo() const\r\n{\r\n    QString text;\r\n    QString fileName = QFileInfo(m_editor->filePath()).fileName();\r\n    QTextCursor cursor = m_plainTextEdit->textCursor();\r\n    if (cursor.hasSelection()) {\r\n        int start = cursor.selectionStart();\r\n        int end = cursor.selectionEnd();\r\n        int line1 = cursor.document()->findBlock(start).blockNumber()+1;\r\n        int line2 = cursor.document()->findBlock(end).blockNumber()+1;\r\n        if (line1 == line2) {\r\n            text = QString(\"gomodifytags -file %1 -line %2\").arg(fileName).arg(line1);\r\n        } else {\r\n            text = QString(\"gomodifytags -file %1 -line %2,%3\").arg(fileName).arg(line1).arg(line2);\r\n        }\r\n    } else {\r\n        text = QString(\"gomodifytags -file %1 -offset %2 (Inside a valid structure under the cursor)\").arg(fileName).arg(m_editor->utf8Position(true));\r\n    }\r\n    return text;\r\n}\r\n\r\nvoid GolangEdit::execGoModifyTags(const QString &args)\r\n{\r\n    if (args.isEmpty()) {\r\n        return;\r\n    }\r\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\r\n    QString cmd = FileUtil::lookupGoBin(\"gomodifytags\",m_liteApp,env,true);\r\n    if (cmd.isEmpty()) {\r\n         m_liteApp->appendLog(\"GolangEdit\",\"Could not find gomodifytags (hint: is gomodifytags installed?)\",true);\r\n         return;\r\n    }\r\n    QFileInfo info(m_editor->filePath());\r\n    Process process(this);\r\n    process.setEnvironment(env.toStringList());\r\n    process.setWorkingDirectory(info.path());\r\n    QString cmdArgs;\r\n    QTextCursor cursor = m_plainTextEdit->textCursor();\r\n    if (cursor.hasSelection()) {\r\n        int start = cursor.selectionStart();\r\n        int end = cursor.selectionEnd();\r\n        int line1 = cursor.document()->findBlock(start).blockNumber()+1;\r\n        int line2 = cursor.document()->findBlock(end).blockNumber()+1;\r\n        if (line1 == line2) {\r\n            cmdArgs = QString(\"-file %1 -line %2 %3\").arg(info.fileName()).arg(line1).arg(args);\r\n        } else {\r\n            cmdArgs = QString(\"-file %1 -line %2,%3 %4\").arg(info.fileName()).arg(line1).arg(line2).arg(args);\r\n        }\r\n    } else {\r\n        cmdArgs = QString(\"-file %1 -offset %2 %3\").arg(info.fileName()).arg(m_editor->utf8Position(true)).arg(args);\r\n    }\r\n    process.startEx(cmd,cmdArgs.split(\" \"));\r\n    if (!process.waitForStarted(30000)) {\r\n        m_liteApp->appendLog(\"GolangEdit\",\"wait for gomodifytags started timeout\",true);\r\n        return;\r\n    }\r\n    if (!process.waitForFinished(30000)) {\r\n        process.kill();\r\n        m_liteApp->appendLog(\"GolangEdit\",\"wait for gomodifytags finished timeout\",true);\r\n        return;\r\n    }\r\n    int code = process.exitCode();\r\n    if (code != 0) {\r\n        QByteArray error = process.readAllStandardError();\r\n        m_liteApp->appendLog(\"GolangEdit\",QString(\"gomodifytags exit code %1, %2\").arg(code).arg(QString::fromUtf8(error)),true);\r\n        return;\r\n    }\r\n    QByteArray data = process.readAllStandardOutput();\r\n    if (data.isEmpty()) {\r\n        return;\r\n    }\r\n    m_editor->loadTextUseDiff(QString::fromUtf8(data));\r\n}\r\n\r\nvoid GolangEdit::goAddTags()\r\n{\r\n    if (m_editor->isModified()) {\r\n        m_liteApp->editorManager()->saveEditor(m_editor);\r\n    }\r\n    if (!m_addTagsDlg) {\r\n        m_addTagsDlg = new GoAddTagsDialog(m_liteApp->mainWindow());\r\n    }\r\n    m_addTagsDlg->setInfo(getGoModifyTagsInfo());\r\n    if (m_addTagsDlg->exec() != QDialog::Accepted) {\r\n        return;\r\n    }\r\n    QString args = m_addTagsDlg->arguments();\r\n    if (args.isEmpty()) {\r\n        return;\r\n    }\r\n    execGoModifyTags(args);\r\n}\r\n\r\nvoid GolangEdit::goRemoveTags()\r\n{\r\n    if (m_editor->isModified()) {\r\n        m_liteApp->editorManager()->saveEditor(m_editor);\r\n    }\r\n    if (!m_removeTagsDlg) {\r\n        m_removeTagsDlg = new GoRemoveTagsDialog(m_liteApp->mainWindow());\r\n    }\r\n    m_removeTagsDlg->setInfo(getGoModifyTagsInfo());\r\n    if (m_removeTagsDlg->exec() != QDialog::Accepted) {\r\n        return;\r\n    }\r\n    QString args = m_removeTagsDlg->arguments();\r\n    if (args.isEmpty()) {\r\n        return;\r\n    }\r\n    execGoModifyTags(args);\r\n}\r\n\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golangedit.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: golangedit.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef GOLANGEDIT_H\r\n#define GOLANGEDIT_H\r\n\r\n#include <liteapi/liteapi.h>\r\n#include <liteeditorapi/liteeditorapi.h>\r\n#include <liteenvapi/liteenvapi.h>\r\n#include \"processex/processex.h\"\r\n#include \"textoutput/textoutput.h\"\r\n#include \"golangfilesearch.h\"\r\n#include \"goplsfilesearch.h\"\r\n/*\r\n    a tool for answering questions about Go source code.\r\n    callees\t  \tshow possible targets of selected function call\r\n    callers\t  \tshow possible callers of selected function\r\n    callstack \tshow path from callgraph root to selected function\r\n    definition\tshow declaration of selected identifier\r\n    describe  \tdescribe selected syntax: definition, methods, etc\r\n    freevars  \tshow free variables of selection\r\n    implements\tshow 'implements' relation for selected type or method\r\n    peers     \tshow send/receive corresponding to selected channel op\r\n    referrers \tshow all refs to entity denoted by selected identifier\r\n    what\t\tshow basic information about the selected syntax node\r\n    pointsto\r\n    whicherrs\r\n*/\r\n\r\nstruct SourceQuery\r\n{\r\n    QString cmdName;\r\n    QString workPath;\r\n    QString filePath;\r\n    QString fileName;\r\n    QString action;\r\n    QString output;\r\n    QString mode;\r\n    int     offset;\r\n    int     offset2;\r\n    bool    success;\r\n};\r\n\r\nclass GoAddTagsDialog;\r\nclass GoRemoveTagsDialog;\r\n\r\nclass GolangEdit : public QObject\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    explicit GolangEdit(LiteApi::IApplication *app, QObject *parent = 0);\r\n    virtual ~GolangEdit();\r\n    QTextCursor textCursorForPos(const QPoint &globalPos);\r\npublic slots:\r\n    void currentEnvChanged(LiteApi::IEnv*);\r\n    void applyOption(const QString &option);\r\n    void editorCreated(LiteApi::IEditor*);\r\n    void currentEditorChanged(LiteApi::IEditor*);\r\n    void updateLink(const QTextCursor &cursor, const QPoint &pos, bool nav);\r\n    void aboutToShowContextMenu();\r\n    void editorViewGodoc();\r\n    void editorFindInfo();\r\n    void editorJumpToDecl();\r\n    void editorFindUsages();\r\n    void editorFindUsagesGlobal();\r\n    void editorFindUsagesSkipGoroot();\r\n    void editorFindUsagesSkipTests();\r\n    void editorRenameSymbol();\r\n    void editorRenameSymbolGlobal();\r\n    void editorRenameSymbolSkipGoroot();\r\n    void editorComment();\r\n    void findDefStarted();\r\n    void findDefFinish(int code,QProcess::ExitStatus status);\r\n    void findInfoStarted();\r\n    void findInfoFinish(int, QProcess::ExitStatus);\r\n    void findInfoGopherOutput(const QByteArray &data,bool bError);\r\n    void findLinkStarted();\r\n    void findLinkFinish(int, QProcess::ExitStatus);\r\n    void searchTextChanged(const QString &word);\r\n    void sourceQueryFinished(int code, QProcess::ExitStatus status);\r\n    void sourcequeryError(QProcess::ProcessError code);\r\n    //void updateOracleInfo(const QString &action, const QString &text);\r\n    void dbclickSourceQueryOutput(const QTextCursor &cursor);\r\n    void runSourceQueryAction(const QString &action, const QString &scope = \".\");\r\n    void runSourceQueryByInfo(const QString &action, const QString &scope = \".\");\r\n    void sourceWhat();\r\n    void sourceCallees();\r\n    void sourceCallers();\r\n    void sourceCallstack();\r\n    void sourceDefinition();\r\n    void sourceDescribe();\r\n    void sourceFreevars();\r\n    void sourceImplements();\r\n    void sourceImplementsGopath();\r\n    void sourcePeers();\r\n    void sourceReferrers();\r\n    void sourcePointsto();\r\n    void sourceWhicherrs();\r\n    void sourceQueryStateChanged(QProcess::ProcessState state);\r\n    void stopSourceQueryProcess();\r\n    void goplsFindAllReferences();\r\n    void goplsFindAllImplementations();\r\n    void goAddTags();\r\n    void goRemoveTags();\r\n    void execGoModifyTags(const QString &args);\r\n    QString getGoModifyTagsInfo() const;\r\n    int byteOffsetToColumn(const QString &fileName, int line, int col);\r\nprotected:\r\n    LiteApi::IApplication *m_liteApp;\r\n    LiteApi::IEnvManager  *m_envManager;\r\n    LiteApi::ILiteEditor  *m_editor;\r\n    QPlainTextEdit        *m_plainTextEdit;\r\n    TextOutput            *m_sourceQueryOutput;\r\n    QAction               *m_sourceQueryOutputAct;\r\n    QAction               *m_stopSourceQueryAct;\r\n    bool m_enableMouseUnderInfo;\r\n    bool m_enableMouseNavigation;\r\n    bool m_gorootSourceReadOnly;\r\n    bool m_useGocodeInfo;\r\n    bool m_useGoModule;\r\n    QTextCursor m_linkCursor;\r\n    LiteApi::Link m_lastLink;\r\n    QAction *m_findInfoAct;\r\n    QAction *m_jumpDeclAct;\r\n    QAction *m_jumpDeclToolBarAct;\r\n    QAction *m_findUseAct;\r\n    QAction *m_findAllUseWithGorootAct;\r\n    QAction *m_findAllUseSkipGorootAct;\r\n\tQAction *m_findAllUseSkipTestsAct;\r\n    QAction *m_renameSymbolAct;\r\n    QAction *m_renameAllSymbolWithGorootAct;\r\n    QAction *m_renameAllSymbolSkipGorootAct;\r\n    QAction *m_viewGodocAct;\r\n    QAction *m_sourceWhatAct;\r\n    QAction *m_sourceCalleesAct;\r\n    QAction *m_sourceCallersAct;\r\n    QAction *m_sourceCallstackAct;\r\n    QAction *m_sourceDefinitionAct;\r\n    QAction *m_sourceDescribeAct;\r\n    QAction *m_sourceFreevarsAct;\r\n    QAction *m_sourceImplementsAct;\r\n    QAction *m_sourceImplementsGopathAct;\r\n    QAction *m_sourcePeersAct;\r\n    QAction *m_sourceReferrersAct;\r\n    QAction *m_sourcePointstoAct;\r\n    QAction *m_sourceWhicherrs;\r\n    QAction *m_goAddTagsAct;\r\n    QAction *m_goRemoveTagAct;\r\n    QAction *m_goplsAllReferencesAct;\r\n    QAction *m_goplsAllImplementationsAct;\r\n    Process  *m_findDefProcess;\r\n    Process  *m_findInfoProcess;\r\n    Process  *m_findLinkProcess;\r\n    Process  *m_sourceQueryProcess;\r\n    //GopherLib m_findInfoGopher;\r\n    SourceQuery m_sourceQueryInfo;\r\n    QByteArray  m_findDefData;\r\n    QByteArray  m_srcData;\r\n    QTextCursor m_lastCursor;\r\n    QTextCursor m_findLastCursor;\r\n    QByteArray  m_findInfoData;\r\n    GolangFileSearch *m_fileSearch;\r\n    GoplsFileSearch  *m_goplsSearch;\r\n    GoAddTagsDialog  *m_addTagsDlg;\r\n    GoRemoveTagsDialog *m_removeTagsDlg;\r\n};\r\n\r\n#endif // GOLANGEDIT_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golangedit.pro",
    "content": "TARGET = golangedit\r\nTEMPLATE = lib\r\n\r\ninclude (../../liteideplugin.pri)\r\ninclude (../../api/liteenvapi/liteenvapi.pri)\r\ninclude (../../api/litefindapi/litefindapi.pri)\r\ninclude (../../api/liteeditorapi/liteeditorapi.pri)\r\ninclude (../../api/litebuildapi/litebuildapi.pri)\r\ninclude (../../api/quickopenapi/quickopenapi.pri)\r\ninclude (../../utils/processex/processex.pri)\r\ninclude (../../utils/fileutil/fileutil.pri)\r\ninclude (../../utils/textoutput/textoutput.pri)\r\ninclude (../../utils/colorstyle/colorstyle.pri)\r\ninclude (../../3rdparty/qtc_texteditor/qtc_texteditor.pri)\r\ninclude (../../3rdparty/cplusplus/cplusplus.pri)\r\ninclude (../../3rdparty/qtc_editutil/qtc_editutil.pri)\r\n\r\n\r\nDEFINES += GOLANGEDIT_LIBRARY\r\n\r\nSOURCES += golangeditplugin.cpp \\\r\n    golangedit.cpp \\\r\n    golangfilesearch.cpp \\\r\n    golanghighlighter.cpp \\\r\n    golanghighlighterfactory.cpp \\\r\n    golangtextlexer.cpp \\\r\n    golangeditoption.cpp \\\r\n    golangeditoptionfactory.cpp \\\r\n    goaddtagsdialog.cpp \\\r\n    goplsfilesearch.cpp \\\r\n    goremovetagsdialog.cpp\r\n\r\nHEADERS += golangeditplugin.h\\\r\n        golangedit_global.h \\\r\n    golangedit.h \\\r\n    golangfilesearch.h \\\r\n    golanghighlighter.h \\\r\n    golanghighlighterfactory.h \\\r\n    golangtextlexer.h \\\r\n    golangeditoption.h \\\r\n    golangeditoptionfactory.h \\\r\n    goaddtagsdialog.h \\\r\n    goplsfilesearch.h \\\r\n    goremovetagsdialog.h\r\n\r\nFORMS += \\\r\n    golangeditoption.ui \\\r\n    goaddtagsdialog.ui \\\r\n    goremovetagsdialog.ui\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golangedit_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangedit_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGEDIT_GLOBAL_H\n#define GOLANGEDIT_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(GOLANGEDIT_LIBRARY)\n#  define GOLANGEDITSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define GOLANGEDITSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#define OPTION_GOLANGEDIT   \"option/golangedit\"\n#define GOLANGEDIT_MOUSEINFO \"golangedit/mouseinfo\"\n#define GOLANGEDIT_MOUSENAVIGATIOIN \"golangedit/mousenavigation\"\n#define GOLANGEDIT_GOROOTSOURCEREADONLY \"golangedit/gorootsourcereadonly\"\n\n#endif // GOLANGEDIT_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golangeditoption.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangeditoption.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangeditoption.h\"\n#include \"ui_golangeditoption.h\"\n#include \"golangedit_global.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangEditOption::GolangEditOption(LiteApi::IApplication *app,QObject *parent) :\n    LiteApi::IOption(parent),\n    m_liteApp(app),\n    m_widget(new QWidget),\n    ui(new Ui::GolangEditOption)\n{\n    ui->setupUi(m_widget);\n}\n\nGolangEditOption::~GolangEditOption()\n{\n    delete m_widget;\n    delete ui;\n}\n\nQWidget *GolangEditOption::widget()\n{\n    return m_widget;\n}\n\nQString GolangEditOption::name() const\n{\n    return \"GolangEdit\";\n}\n\nQString GolangEditOption::mimeType() const\n{\n    return OPTION_GOLANGEDIT;\n}\n\nvoid GolangEditOption::load()\n{\n    bool info = m_liteApp->settings()->value(GOLANGEDIT_MOUSEINFO,true).toBool();\n    bool nav = m_liteApp->settings()->value(GOLANGEDIT_MOUSENAVIGATIOIN,true).toBool();\n    bool gorootReadOnly = m_liteApp->settings()->value(GOLANGEDIT_GOROOTSOURCEREADONLY,false).toBool();\n    ui->enableMouseInfoCheckBox->setChecked(info);\n    ui->enableMouseNavigationCheckBox->setChecked(nav);\n    ui->gorootSourceReadOnlyCheckBox->setChecked(gorootReadOnly);\n}\n\nvoid GolangEditOption::save()\n{\n    bool info = ui->enableMouseInfoCheckBox->isChecked();\n    bool nav = ui->enableMouseNavigationCheckBox->isChecked();\n    bool gorootReadOnly = ui->gorootSourceReadOnlyCheckBox->isChecked();\n    m_liteApp->settings()->setValue(GOLANGEDIT_MOUSEINFO,info);\n    m_liteApp->settings()->setValue(GOLANGEDIT_MOUSENAVIGATIOIN,nav);\n    m_liteApp->settings()->setValue(GOLANGEDIT_GOROOTSOURCEREADONLY,gorootReadOnly);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golangeditoption.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangeditoption.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGEDITOPTION_H\n#define GOLANGEDITOPTION_H\n\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class GolangEditOption;\n}\n\nclass GolangEditOption : public LiteApi::IOption\n{\n    Q_OBJECT\n\npublic:\n    explicit GolangEditOption(LiteApi::IApplication *app, QObject *parent = 0);\n    ~GolangEditOption();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void load();\n    virtual void save();\nprivate:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget           *m_widget;\n    Ui::GolangEditOption *ui;\n};\n\n#endif // GOLANGEDITOPTION_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golangeditoption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>GolangEditOption</class>\n <widget class=\"QWidget\" name=\"GolangEditOption\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>400</width>\n    <height>123</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox\">\n     <property name=\"title\">\n      <string>Mouse</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n      <item>\n       <widget class=\"QCheckBox\" name=\"gorootSourceReadOnlyCheckBox\">\n        <property name=\"text\">\n         <string>Go root source file editor setup read only</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QCheckBox\" name=\"enableMouseInfoCheckBox\">\n        <property name=\"text\">\n         <string>Enable view expression infomation on mouse</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QCheckBox\" name=\"enableMouseNavigationCheckBox\">\n        <property name=\"text\">\n         <string>Enable mouse navigation</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <spacer name=\"verticalSpacer\">\n        <property name=\"orientation\">\n         <enum>Qt::Vertical</enum>\n        </property>\n        <property name=\"sizeHint\" stdset=\"0\">\n         <size>\n          <width>20</width>\n          <height>40</height>\n         </size>\n        </property>\n       </spacer>\n      </item>\n     </layout>\n    </widget>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golangeditoptionfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangeditoptionfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangeditoption.h\"\n#include \"golangeditoptionfactory.h\"\n#include \"golangedit_global.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangEditOptionFactory::GolangEditOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n}\n\nQStringList GolangEditOptionFactory::mimeTypes() const\n{\n    return QStringList() << OPTION_GOLANGEDIT;\n}\n\nLiteApi::IOption *GolangEditOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == OPTION_GOLANGEDIT) {\n        return new GolangEditOption(m_liteApp,this);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golangeditoptionfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangeditoptionfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGEDITOPTIONFACTORY_H\n#define GOLANGEDITOPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass GolangEditOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n    GolangEditOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // GOLANGEDITOPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golangeditplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangeditplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangeditplugin.h\"\n#include \"golangedit.h\"\n#include \"golanghighlighterfactory.h\"\n#include \"golangeditoptionfactory.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n#include <QtPlugin>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangEditPlugin::GolangEditPlugin()\n{\n}\n\nbool GolangEditPlugin::load(LiteApi::IApplication *app)\n{\n    LiteApi::IHighlighterManager *manager = LiteApi::getHighlighterManager(app);\n    if (manager) {\n        manager->addFactory(new GolangHighlighterFactory(this));\n    }\n    app->optionManager()->addFactory(new GolangEditOptionFactory(app,this));\n    new GolangEdit(app,this);\n    return true;\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golangeditplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangeditplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGEDITPLUGIN_H\n#define GOLANGEDITPLUGIN_H\n\n#include \"golangedit_global.h\"\n#include \"liteapi/liteapi.h\"\n\nclass GolangEditPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    GolangEditPlugin();\n    virtual bool load(LiteApi::IApplication *app);\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<GolangEditPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.GolangEditPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/GolangEdit\");\n        m_info->setVer(\"X38.2\");\n        m_info->setName(\"GolangEdit\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setInfo(\"Golang Edit Support\");\n        m_info->appendDepend(\"plugin/liteenv\");\n        m_info->appendDepend(\"plugin/liteeditor\");\n        m_info->appendDepend(\"plugin/litefind\");\n    }\n};\n\n\n#endif // GOLANGEDITPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golangfilesearch.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangfilesearch.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangfilesearch.h\"\n#include \"litebuildapi/litebuildapi.h\"\n#include <QTextBlock>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangFileSearch::GolangFileSearch(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IFileSearch(parent), m_liteApp(app)\n{\n    m_process = new ProcessEx(this);\n    m_replaceMode = false;\n    m_bParserHead = true;\n//    connect(m_process,SIGNAL(started()),this,SLOT(findUsagesStarted()));\n    connect(m_process,SIGNAL(extOutput(QByteArray,bool)),this,SLOT(findUsagesOutput(QByteArray,bool)));\n    connect(m_process,SIGNAL(extFinish(bool,int,QString)),this,SLOT(findUsagesFinish(bool,int,QString)));\n}\n\nGolangFileSearch::~GolangFileSearch()\n{\n}\n\nQString GolangFileSearch::mimeType() const\n{\n    return \"find/gofilesearch\";\n}\n\nQString GolangFileSearch::displayName() const\n{\n    return tr(\"Golang Find Usages\");\n}\n\nQWidget *GolangFileSearch::widget() const\n{\n    return 0;\n}\n\nvoid GolangFileSearch::start()\n{\n\n}\n\nvoid GolangFileSearch::cancel()\n{\n}\n\nvoid GolangFileSearch::activate()\n{\n\n}\n\nQString GolangFileSearch::searchText() const\n{\n    return m_searchText;\n}\n\nbool GolangFileSearch::replaceMode() const\n{\n    return m_replaceMode;\n}\n\nvoid GolangFileSearch::setSearchInfo(const QString &/*text*/, const QString &/*filter*/, const QString &/*path*/)\n{\n\n}\n\nvoid GolangFileSearch::findUsages(LiteApi::ITextEditor *editor, QTextCursor cursor, bool global, bool skip_goroot, bool skip_tests, bool replace)\n{\n    if (!m_process->isStop()) {\n        m_process->stopAndWait(100,2000);\n    }\n\n    bool moveLeft = false;\n    int selectStart = 0;\n    m_searchText = LiteApi::wordUnderCursor(cursor,&moveLeft,&selectStart);\n\n    if (m_searchText.isEmpty() || m_searchText.contains(\" \")) {\n        return;\n    }\n\n    m_liteApp->editorManager()->saveAllEditors(false);\n\n    //int offset = moveLeft ? editor->utf8Position(true)-1: editor->utf8Position(true);\n    int offset = editor->utf8Position(true,selectStart);\n\n    LiteApi::IFileSearchManager *manager = LiteApi::getFileSearchManager(m_liteApp);\n    if (!manager) {\n        return;\n    }\n    this->m_replaceMode = replace;\n    manager->setCurrentSearch(this);\n    m_lastLine = 0;\n    m_bParserHead = true;\n    m_file.close();\n    QString cmd = LiteApi::getGotools(m_liteApp);\n    QFileInfo info(editor->filePath());\n    m_process->setEnvironment(LiteApi::getCustomGoEnvironment(m_liteApp,editor).toStringList());\n    m_process->setWorkingDirectory(info.path());\n\n    QStringList args;\n    args << \"types\";\n    QString tags = LiteApi::getGoBuildFlagsArgument(m_liteApp,editor,\"-tags\");\n    if (!tags.isEmpty()) {\n        args << \"-tags\";\n        args << tags;\n    }\n    args << \"-pos\";\n    args << QString(\"\\\"%1:%2\\\"\").arg(info.fileName()).arg(offset);\n    args << \"-info\";\n    args << \"-use\";\n    QString text = selectionUnderCursor(cursor,moveLeft);\n    if (!text.isEmpty()) {\n        args << \"-text\" << text;\n    }\n    if (global) {\n        args << \"-all\";\n    }\n    if (skip_goroot) {\n        args << \"-skip_goroot\";\n    }\n    if (skip_tests) {\n\t\targs << \"-skip_tests\";\n\t}\n    args << \".\";\n\n    emit findStarted();\n    m_process->startEx(cmd,args);\n}\n\nvoid GolangFileSearch::findUsagesStarted()\n{\n}\n\nvoid GolangFileSearch::findUsagesOutput(QByteArray data, bool bStdErr)\n{\n    if (bStdErr) {\n        QString info = QString::fromUtf8(data).trimmed();\n        emit findError(info);\n        m_liteApp->appendLog(\"find usage error\",info,true);\n        return;\n    }\n    QRegExp reg(\":(\\\\d+):(\\\\d+)-?(\\\\d*)\");\n    foreach (QByteArray line, data.split('\\n')) {\n        QString info = QString::fromUtf8(line).trimmed();\n        if (m_bParserHead) {\n            m_bParserHead = false;\n            //package fmt\n            //package ast (\"go/ast\")\n            if (info.startsWith(\"package \") || info.startsWith(\"import \")) {\n                int n = info.indexOf(\"(\");\n                if (n != -1) {\n                    info = info.left(n);\n                }\n                //change searchText\n                //m_searchText = info.mid(7).trimmed();\n                QString pkgName = info.mid(7).trimmed();\n                if (pkgName != m_searchText) {\n                    m_searchText = pkgName;\n                    emit searchTextChanged(pkgName);\n                }\n            }\n            continue;\n        }\n        int pos = reg.lastIndexIn(info);\n        if (pos >= 0) {\n            QString fileName = info.left(pos);\n            int fileLine = reg.cap(1).toInt();\n            int fileCol = reg.cap(2).toInt();\n            bool hasCol2 = false;\n            int fileCol2 = reg.cap(3).toInt(&hasCol2);\n            if (m_file.fileName() != fileName) {\n                m_file.close();\n                m_file.setFileName(fileName);\n            }\n            if (!m_file.isOpen()) {\n                m_file.open(QFile::ReadOnly);\n                m_lastLine = 0;\n            }\n            if (m_file.isOpen()) {\n                if (fileLine != m_lastLine) {\n                    while(!m_file.atEnd()) {\n                        QByteArray line = m_file.readLine();\n                        m_lastLine++;\n                        if (fileLine == m_lastLine) {\n                            m_lastLineText = QString::fromUtf8(trimmedRight(line));\n                            if (fileCol > 0) {\n                               fileCol = QString::fromUtf8(line.left(fileCol)).length();\n                            }\n                            break;\n                        }\n                    }\n                } else {\n                    QByteArray line = m_lastLineText.toUtf8();\n                    if (fileCol > 0) {\n                       fileCol = QString::fromUtf8(line.left(fileCol)).length();\n                    }\n                }\n                int length = m_searchText.length();\n                if (hasCol2) {\n                    length = fileCol2-fileCol;\n                }\n                emit findResult(LiteApi::FileSearchResult(fileName,m_lastLineText,fileLine,fileCol-1,length));\n            }\n        }\n    }\n}\n\nvoid GolangFileSearch::findUsagesFinish(bool b, int, QString)\n{\n    m_file.close();\n    m_lastLine = 0;\n    emit findFinished(b);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golangfilesearch.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangfilesearch.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGFILESEARCH_H\n#define GOLANGFILESEARCH_H\n\n#include \"liteenvapi/liteenvapi.h\"\n#include \"litefindapi/litefindapi.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n#include \"processex/processex.h\"\n\ninline QByteArray trimmedRight(const QByteArray &d)\n{\n    if (d.size() == 0) {\n        return d;\n    }\n    const char *s = d.data();\n    int end = d.size() - 1;\n    while (end && isspace(uchar(s[end])))           // skip white space from end\n        end--;\n    return d.left(end+1);\n}\n\nstatic bool isLetterOrNumber(QChar ch)\n{\n    if (ch.isLetterOrNumber() || ch == '_') {\n        return true;\n    }\n    return false;\n}\n\ninline QString selectionUnderCursor(QTextCursor tc, bool moveLeft = false)\n{\n    QString text = tc.block().text();\n    if (tc.hasSelection()) {\n        moveLeft = false;\n    }\n    int pos = tc.selectionStart() - tc.block().position();\n    if (moveLeft) {\n        pos--;\n    }\n    int left = pos;\n    for (int i = pos; i >= 0; i--) {\n        if (!isLetterOrNumber(text[i]) && text[i] != '.') {\n            left = i;\n            break;\n        }\n    }\n    int right = text.length();\n    for (int i = pos; i < text.length(); i++) {\n        if (!isLetterOrNumber(text[i]))  {\n            right = i;\n            break;\n        }\n    }\n    return text.mid(left+1,right-left-1);\n}\n\nclass GolangFileSearch : public LiteApi::IFileSearch\n{\n    Q_OBJECT\npublic:\n    explicit GolangFileSearch(LiteApi::IApplication *app, QObject *parent = 0);\n    virtual ~GolangFileSearch();\n    virtual QString mimeType() const;\n    virtual QString displayName() const;\n    virtual QWidget* widget() const;\n    virtual void start();\n    virtual void cancel();\n    virtual void activate();\n    virtual QString searchText() const;\n    virtual bool replaceMode() const;\n    virtual bool readOnly() const { return false; }\n    virtual bool canCancel() const { return false; }\n    virtual void setSearchInfo(const QString &text, const QString &fitler, const QString &path);\n    void findUsages(LiteApi::ITextEditor *editor, QTextCursor cursor, bool global, bool skip_goroot, bool skip_tests, bool replace);\n public slots:\n    void findUsagesStarted();\n    void findUsagesOutput(QByteArray,bool);\n    void findUsagesFinish(bool,int,QString);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    ProcessEx *m_process;\n    QFile   m_file;\n    QString m_searchText;\n    QString m_lastLineText;\n    int     m_lastLine;\n    bool    m_bParserHead;\n    bool    m_replaceMode;\n};\n\n#endif // GOLANGFILESEARCH_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golanghighlighter.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golanghighlighter.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golanghighlighter.h\"\n\n#include \"qtc_texteditor/basetextdocumentlayout.h\"\n\n#include \"cplusplus/SimpleLexer.h\"\n#include \"cplusplus/Lexer.h\"\n\n#include <QTextDocument>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nusing namespace TextEditor;\nusing namespace CPlusPlus;\n\nnamespace\n{\n/** Enums used to record the state of recognizing function declaration. */\nenum FuncState {\n    FUNC_STATE_NORMAL = 0,\n    // For function declaration.\n    FUNC_STATE_FUNC,\n    FUNC_STATE_LPAREN,\n    FUNC_STATE_RPAREN,\n    FUNC_STATE_FUNC_DECL,\n};\n\n/** Checks the \"function()\" formats. */\nbool maybeIsFunctionCall(const QList<Token> &tks, int idx)\n{\n    const Token& tk = tks[idx];\n    if (!tk.isGoBuiltin() && !tk.is(T_IDENTIFIER)) {\n        return false;\n    }\n\n    int tkCnt = tks.size();\n    for (int i = idx + 1; i < tkCnt; ++i) {\n        if (tks[i].isComment()) {\n            continue;\n        }\n        return tks[i].is(T_LPAREN); // || tks[i].is(T_LBRACE);\n    }\n    return false;\n}\n\nFuncState updateFuncState(const Token &tk, FuncState funcState)\n{\n    if (tk.isComment()) {\n        return funcState;\n    }\n    switch(funcState) {\n    case FUNC_STATE_NORMAL: // fall through.\n    case FUNC_STATE_FUNC_DECL:\n        if (tk.is(T_GO_FUNC)) {\n            return FUNC_STATE_FUNC;\n        } else {\n            return FUNC_STATE_NORMAL;\n        }\n    case FUNC_STATE_FUNC:\n        if (tk.is(T_IDENTIFIER) || tk.isGoBuiltin()) {\n            return FUNC_STATE_FUNC_DECL;\n        } else if (tk.is(T_LPAREN)) {\n            return FUNC_STATE_LPAREN;\n        } else {\n            return FUNC_STATE_NORMAL;\n        }\n    case FUNC_STATE_LPAREN:\n        if (tk.is(T_RPAREN)) {\n            return FUNC_STATE_RPAREN;\n        } else {\n            return FUNC_STATE_LPAREN;\n        }\n    case FUNC_STATE_RPAREN:\n        if (tk.is(T_IDENTIFIER) || tk.isGoBuiltin()) {\n            return FUNC_STATE_FUNC_DECL;\n        } else {\n            return FUNC_STATE_NORMAL;\n        }\n    }\n    return funcState;\n}\n\n} //namespace\n\nGolangHighlighter::GolangHighlighter(LiteApi::ITextEditor *editor, QTextDocument *document) :\n    TextEditor::SyntaxHighlighter(document)\n{\n    m_todoList = QString(\"TODO,BUG,FIXME,NOTE,SECBUG\").split(\",\");\n    m_todoRegexp.setPattern(QString(\"^(%1)([\\\\s\\\\:\\\\(\\\\,]|$)\").arg(m_todoList.join(\"|\")));\n    m_gotagList = QString(\"+build\").split(\",\");\n    TextEditor::SyntaxComment comment;\n    comment.singleLineComment = \"//\";\n    comment.multiLineCommentStart = \"/*\";\n    comment.multiLineCommentEnd = \"*/\";\n    comment.isCommentAfterWhiteSpaces = true;\n    comment.isCommentAfterWhiteSpacesAddSpace = true;\n    setupComment(comment);\n}\n\nGolangHighlighter::~GolangHighlighter()\n{\n}\n\nvoid GolangHighlighter::highlightBlock(const QString &text)\n{\n    int blockNumber = this->currentBlock().blockNumber();\n    m_currentTodo.clear();\n    highlightBlockHelper(text);\n    QString old = m_todoInfoMap.value(blockNumber);\n    if (m_currentTodo != old) {\n        if (m_currentTodo.isEmpty()) {\n            m_todoInfoMap.remove(blockNumber);\n        } else {\n            m_todoInfoMap.insert(blockNumber,m_currentTodo);\n        }\n    }\n}\n\n\nvoid GolangHighlighter::highlightBlockHelper(const QString &text)\n{\n    const int previousBlockState_ = previousBlockState();\n    int lexerState = 0, initialBraceDepth = 0;\n    if (previousBlockState_ != -1) {\n        lexerState = previousBlockState_ & 0xff;\n        initialBraceDepth = previousBlockState_ >> 8;\n    }\n    //fix brace not matcher\n    if (initialBraceDepth < 0) {\n        initialBraceDepth = 0;\n    }\n\n    int braceDepth = initialBraceDepth;\n\n\n    LanguageFeatures features;\n    features.golangEnable = true;\n    SimpleLexer tokenize;\n    tokenize.setLanguageFeatures(features);\n\n    //hack token convert no ansi code\n    QString tk_text = text;\n    for (int i = 0; i < tk_text.length(); i++) {\n        if (tk_text[i].unicode() > 0x7f) {\n            tk_text[i] = '_';\n        }\n    }\n\n    int initialLexerState = lexerState;\n    QList<Token> tokens = tokenize(tk_text, initialLexerState);\n    lexerState = tokenize.state(); // refresh lexer state\n\n    initialLexerState &= ~0x80; // discard newline expected bit\n    int foldingIndent = initialBraceDepth;\n    if (TextBlockUserData *userData = BaseTextDocumentLayout::testUserData(currentBlock())) {\n        //userData->setFoldingIndent(0);\n        userData->setFoldingStartIncluded(false);\n        userData->setFoldingEndIncluded(false);\n    }\n\n    if (tokens.isEmpty()) {\n        setCurrentBlockState((braceDepth << 8) | lexerState);\n        BaseTextDocumentLayout::clearParentheses(currentBlock());\n        if (text.length())  {// the empty line can still contain whitespace\n            if (initialLexerState == T_COMMENT) {\n                highlightLine(text, 0, text.length(), m_creatorFormats[SyntaxHighlighter::Comment]);\n            }\n            else if (initialLexerState == T_DOXY_COMMENT) {\n                highlightLine(text, 0, text.length(), m_creatorFormats[SyntaxHighlighter::Comment]);\n            }\n            else if (initialLexerState == T_RAW_STRING_LITERAL) {\n                highlightLine(text, 0, text.length(), m_creatorFormats[SyntaxHighlighter::String]);\n            }\n            else\n                setFormat(0, text.length(), m_creatorFormats[SyntaxHighlighter::VisualWhitespace]);\n        }\n        //BaseTextDocumentLayout::setFoldingIndent(currentBlock(), foldingIndent);\n        setFoldingIndent(currentBlock(), foldingIndent);\n        return;\n    }\n\n    const unsigned firstNonSpace = tokens.first().begin();\n\n    Parentheses parentheses;\n    parentheses.reserve(20); // assume wizard level ;-)\n\n    //bool expectPreprocessorKeyword = false;\n    //bool onlyHighlightComments = false;\n    FuncState funcState = FUNC_STATE_NORMAL;\n    for (int i = 0; i < tokens.size(); ++i) {\n        Token &tk = tokens[i];\n\n        unsigned previousTokenEnd = 0;\n        if (i != 0) {\n            // mark the whitespaces\n            previousTokenEnd = tokens.at(i - 1).begin() +\n                               tokens.at(i - 1).length();\n        }\n\n        if (previousTokenEnd != tk.begin())\n            setFormat(previousTokenEnd, tk.begin() - previousTokenEnd, m_creatorFormats[SyntaxHighlighter::VisualWhitespace]);\n\n        if (tk.is(T_LPAREN) || tk.is(T_LBRACE) || tk.is(T_LBRACKET)) {\n            const QChar c = text.at(tk.begin());\n            parentheses.append(Parenthesis(Parenthesis::Opened, c, tk.begin()));\n            if (tk.is(T_LBRACE) || tk.is(T_LPAREN)) {\n                ++braceDepth;\n\n                // if a folding block opens at the beginning of a line, treat the entire line\n                // as if it were inside the folding block\n                if (tk.begin() == firstNonSpace) {\n                    ++foldingIndent;\n                    BaseTextDocumentLayout::userData(currentBlock())->setFoldingStartIncluded(true);\n                }\n            }\n        } else if (tk.is(T_RPAREN) || tk.is(T_RBRACE) || tk.is(T_RBRACKET)) {\n            const QChar c = text.at(tk.begin());\n            parentheses.append(Parenthesis(Parenthesis::Closed, c, tk.begin()));\n            if (tk.is(T_RBRACE) || tk.is(T_RPAREN)) {\n                --braceDepth;\n                if (braceDepth < foldingIndent) {\n                    // unless we are at the end of the block, we reduce the folding indent\n                    BaseTextDocumentLayout::userData(currentBlock())->setFoldingEndIncluded(true);\n                    //if (i == tokens.size()-1 || tokens.at(i+1).is(T_SEMICOLON))\n                    //else\n                    //    foldingIndent = qMin(braceDepth, foldingIndent);\n                }\n            }\n        } else if (tk.is(T_GO_ELSE)) {\n            --foldingIndent;\n        }\n        /*\n        bool highlightCurrentWordAsPreprocessor = expectPreprocessorKeyword;\n\n        if (expectPreprocessorKeyword)\n            expectPreprocessorKeyword = false;\n\n        if (onlyHighlightComments && !tk.isComment())\n            continue;\n\n        if (i == 0 && tk.is(T_POUND)) {\n            highlightLine(text, tk.begin(), tk.length(), m_creatorFormats[SyntaxHighlighter::PreprocessorFormat]);\n            expectPreprocessorKeyword = true;\n        } else if (highlightCurrentWordAsPreprocessor &&\n                   (tk.isKeyword() || tk.is(T_IDENTIFIER)) && isPPKeyword(text.midRef(tk.begin(), tk.length()))) {\n            setFormat(tk.begin(), tk.length(), m_creatorFormats[SyntaxHighlighter::PreprocessorFormat]);\n            const QStringRef ppKeyword = text.midRef(tk.begin(), tk.length());\n            if (ppKeyword == QLatin1String(\"error\")\n                    || ppKeyword == QLatin1String(\"warning\")\n                    || ppKeyword == QLatin1String(\"pragma\")) {\n                onlyHighlightComments = true;\n            }\n        } else */\n        if (tk.is(T_NUMERIC_LITERAL)) {\n            setFormat(tk.begin(), tk.length(), m_creatorFormats[SyntaxHighlighter::Decimal]);\n        } else if (tk.isOperator()) {\n            setFormat(tk.begin(), tk.length(), m_creatorFormats[SyntaxHighlighter::RegionMarker]);\n        } else if (tk.is(T_RAW_STRING_LITERAL)) {\n            const int startPosition = initialLexerState ? previousTokenEnd : tk.begin();\n            highlightLine(text, startPosition, tk.end() - startPosition, m_creatorFormats[SyntaxHighlighter::String]);\n            // we need to insert a close comment parenthesis, if\n            //  - the line starts in a C Comment (initalState != 0)\n            //  - the first token of the line is a T_COMMENT (i == 0 && tk.is(T_COMMENT))\n            //  - is not a continuation line (tokens.size() > 1 || !state)\n            if (initialLexerState && i == 0 && (tokens.size() > 1 || !lexerState)) {\n                --braceDepth;\n                // unless we are at the end of the block, we reduce the folding indent\n                if (i == tokens.size()-1)\n                    BaseTextDocumentLayout::userData(currentBlock())->setFoldingEndIncluded(true);\n                else\n                    foldingIndent = qMin(braceDepth, foldingIndent);\n                const int tokenEnd = tk.begin() + tk.length() - 1;\n                parentheses.append(Parenthesis(Parenthesis::Closed, QLatin1Char('-'), tokenEnd));\n                // clear the initial state.\n                initialLexerState = 0;\n            }\n        } else if (tk.isStringLiteral() || tk.isCharLiteral()) {\n            highlightLine(text, tk.begin(), tk.length(), m_creatorFormats[SyntaxHighlighter::String]);\n        } else if (tk.isComment()) {\n            const int startPosition = initialLexerState ? previousTokenEnd : tk.begin();\n            if (tk.is(T_CPP_COMMENT)) {\n                highlightCommentLine(text, startPosition, tk.end() - startPosition);\n            } else {\n                highlightLine(text, startPosition, tk.end() - startPosition, m_creatorFormats[SyntaxHighlighter::Comment]);\n            }\n            // we need to insert a close comment parenthesis, if\n            //  - the line starts in a C Comment (initalState != 0)\n            //  - the first token of the line is a T_COMMENT (i == 0 && tk.is(T_COMMENT))\n            //  - is not a continuation line (tokens.size() > 1 || !state)\n            if (initialLexerState && i == 0 && (tokens.size() > 1 || !lexerState)) {\n                --braceDepth;\n                // unless we are at the end of the block, we reduce the folding indent\n                if (i == tokens.size()-1)\n                    BaseTextDocumentLayout::userData(currentBlock())->setFoldingEndIncluded(true);\n                else\n                    foldingIndent = qMin(braceDepth, foldingIndent);\n                const int tokenEnd = tk.begin() + tk.length() - 1;\n                parentheses.append(Parenthesis(Parenthesis::Closed, QLatin1Char('-'), tokenEnd));\n\n                // clear the initial state.\n                initialLexerState = 0;\n            }\n\n        } else if (tk.isGoKeyword()) {\n            setFormat(tk.begin(), tk.length(), m_creatorFormats[SyntaxHighlighter::Keyword]);\n            if (tk.is(T_GO_PACKAGE)) {\n                int n = i+1;\n                if (n < tokens.size() && tokens[n].is(T_IDENTIFIER)) {\n                    setContextData(\"go.package\",text.mid(tokens[n].begin(),tokens[n].length()));\n                }\n            } else if (tk.is(T_GO_TYPE)) {\n                int size = tokens.size()-1;\n                int n = i+1;\n                if (n < size && tokens[n].is(T_IDENTIFIER)) {\n                    setFormat(tokens[n].begin(), tokens[n].length(), m_creatorFormats[SyntaxHighlighter::DataType]);\n                }\n            } else if (tk.is(T_GO_VAR)) {\n\n            }\n        } else if (tk.isGoTyped()) {\n            if ((i+1 == tokens.size()) || !tokens[i+1].is(T_DOT)) {\n                setFormat(tk.begin(), tk.length(), m_creatorFormats[SyntaxHighlighter::DataType]);\n            }\n        } else if (tk.isGoBuiltin()) {\n            setFormat(tk.begin(), tk.length(), m_creatorFormats[SyntaxHighlighter::BuiltinFunc]);\n        } else if (tk.isGoPredecl()) {\n            setFormat(tk.begin(), tk.length(), m_creatorFormats[SyntaxHighlighter::Predeclared]);\n        } else if (i == 0 && tokens.size() > 1 && tokens.at(0).begin() == 0 && tk.is(T_IDENTIFIER) && tokens.at(1).is(T_COLON)) {\n            setFormat(tk.begin(), tk.length(), m_creatorFormats[SyntaxHighlighter::DataType]);\n        } else if (maybeIsFunctionCall(tokens, i)) {\n            setFormat(tk.begin(), tk.length(), m_creatorFormats[SyntaxHighlighter::Function]);\n        } else if (tk.is(T_IDENTIFIER)) {\n           // highlightWord(text.midRef(tk.begin(), tk.length()), tk.begin(), tk.length());\n        }\n\n        funcState = updateFuncState(tk, funcState);\n        if (FUNC_STATE_FUNC_DECL == funcState) {\n            setFormat(tk.begin(), tk.length(), m_creatorFormats[SyntaxHighlighter::FuncDecl]);\n        }\n    }\n\n    // mark the trailing white spaces\n    const int lastTokenEnd = tokens.last().end();\n    if (text.length() > lastTokenEnd)\n        highlightLine(text, lastTokenEnd, text.length() - lastTokenEnd, m_creatorFormats[SyntaxHighlighter::VisualWhitespace]);\n\n    if (!initialLexerState && lexerState && !tokens.isEmpty()) {\n        const Token &lastToken = tokens.last();\n        if (lastToken.is(T_COMMENT) || lastToken.is(T_DOXY_COMMENT) || lastToken.is(T_RAW_STRING_LITERAL)) {\n            parentheses.append(Parenthesis(Parenthesis::Opened, QLatin1Char('+'),\n                                           lastToken.begin()));\n            ++braceDepth;\n        }\n    }\n\n    BaseTextDocumentLayout::setParentheses(currentBlock(), parentheses);\n\n    // if the block is ifdefed out, we only store the parentheses, but\n\n    // do not adjust the brace depth.\n    if (BaseTextDocumentLayout::ifdefedOut(currentBlock())) {\n        braceDepth = initialBraceDepth;\n        foldingIndent = initialBraceDepth;\n    }\n   // qDebug() << text << foldingIndent;\n    //BaseTextDocumentLayout::setFoldingIndent(currentBlock(), foldingIndent);\n    setFoldingIndent(currentBlock(), foldingIndent);\n\n    // optimization: if only the brace depth changes, we adjust subsequent blocks\n    // to have QSyntaxHighlighter stop the rehighlighting\n//    int currentState = currentBlockState();\n//    if (currentState != -1) {\n//        int oldState = currentState & 0xff;\n//        int oldBraceDepth = currentState >> 8;\n//        if (oldState == tokenize.state() && oldBraceDepth != braceDepth) {\n//            BaseTextDocumentLayout::FoldValidator foldValidor;\n//            foldValidor.setup(qobject_cast<BaseTextDocumentLayout *>(document()->documentLayout()));\n//            int delta = braceDepth - oldBraceDepth;\n//            QTextBlock block = currentBlock().next();\n//            while (block.isValid() && block.userState() != -1) {\n//                BaseTextDocumentLayout::changeBraceDepth(block, delta);\n//                BaseTextDocumentLayout::changeFoldingIndent(block, delta);\n//                foldValidor.process(block);\n//                block = block.next();\n//            }\n//            foldValidor.finalize();\n//        }\n//    }\n\n    setCurrentBlockState((braceDepth << 8) | tokenize.state());\n}\n\nvoid GolangHighlighter::setFoldingIndent(const QTextBlock &block, int indent)\n{\n    TextBlockUserData *userData = BaseTextDocumentLayout::userData(block);\n    if (userData->foldingIndent() != indent) {\n        emit foldIndentChanged(block);\n        userData->setFoldingIndent(qMax(0,indent));\n    }\n}\n\nbool GolangHighlighter::isPPKeyword(const QStringRef &text) const\n{\n    switch (text.length())\n    {\n    case 2:\n        if (text.at(0) == QLatin1Char('i') && text.at(1) == QLatin1Char('f'))\n            return true;\n        break;\n\n    case 4:\n        if (text.at(0) == QLatin1Char('e')\n            && (text == QLatin1String(\"elif\") || text == QLatin1String(\"else\")))\n            return true;\n        break;\n\n    case 5:\n        switch (text.at(0).toLatin1()) {\n        case 'i':\n            if (text == QLatin1String(\"ifdef\"))\n                return true;\n            break;\n          case 'u':\n            if (text == QLatin1String(\"undef\"))\n                return true;\n            break;\n        case 'e':\n            if (text == QLatin1String(\"endif\") || text == QLatin1String(\"error\"))\n                return true;\n            break;\n        }\n        break;\n\n    case 6:\n        switch (text.at(0).toLatin1()) {\n        case 'i':\n            if (text == QLatin1String(\"ifndef\") || text == QLatin1String(\"import\"))\n                return true;\n            break;\n        case 'd':\n            if (text == QLatin1String(\"define\"))\n                return true;\n            break;\n        case 'p':\n            if (text == QLatin1String(\"pragma\"))\n                return true;\n            break;\n        }\n        break;\n\n    case 7:\n        switch (text.at(0).toLatin1()) {\n        case 'i':\n            if (text == QLatin1String(\"include\"))\n                return true;\n            break;\n        case 'w':\n            if (text == QLatin1String(\"warning\"))\n                return true;\n            break;\n        }\n        break;\n\n    case 12:\n        if (text.at(0) == QLatin1Char('i') && text == QLatin1String(\"include_next\"))\n            return true;\n        break;\n\n    default:\n        break;\n    }\n\n    return false;\n}\n\nvoid GolangHighlighter::highlightLine(const QString &text, int position, int length,\n                                   const QTextCharFormat &format)\n{\n    QTextCharFormat visualSpaceFormat = m_creatorFormats[SyntaxHighlighter::VisualWhitespace];\n    visualSpaceFormat.setBackground(format.background());\n\n    const int end = position + length;\n    int index = position;\n\n    while (index != end) {\n        const bool isSpace = text.at(index).isSpace();\n        const int start = index;\n\n        do { ++index; }\n        while (index != end && text.at(index).isSpace() == isSpace);\n\n        const int tokenLength = index - start;\n        if (isSpace)\n            setFormat(start, tokenLength, visualSpaceFormat);\n        else if (format.isValid())\n            setFormat(start, tokenLength, format);\n    }\n}\n\nvoid GolangHighlighter::highlightCommentLine(const QString &text, int position, int length)\n{\n    QTextCharFormat format = m_creatorFormats[SyntaxHighlighter::Comment];\n    QTextCharFormat todoFormat = m_creatorFormats[SyntaxHighlighter::ToDo];\n    QTextCharFormat visualSpaceFormat = m_creatorFormats[SyntaxHighlighter::VisualWhitespace];\n    visualSpaceFormat.setBackground(format.background());\n\n    const int end = position + length;\n    int index = position;\n\n    if (text.mid(position).startsWith(\"//\")) {\n        setFormat(position, 2, format);\n        index += 2;\n    }\n\n    int first = true;\n    while (index != end) {\n        const bool isSpace = text.at(index).isSpace();\n        const int start = index;\n\n        do { ++index; }\n        while (index != end && text.at(index).isSpace() == isSpace);\n\n        const int tokenLength = index - start;\n        if (isSpace) {\n            setFormat(start, tokenLength, visualSpaceFormat);\n        } else if (format.isValid()) {\n            if (first) {\n                first = false;\n                int index = m_todoRegexp.indexIn(text.mid(start,tokenLength));\n                if (index == 0) {\n                    int todoLen = m_todoRegexp.cap(1).length();\n                    setFormat(start,todoLen,todoFormat);\n                    if (todoLen < length) {\n                        setFormat(start+todoLen,length-todoLen, format);\n                    }\n                    m_currentTodo = text.mid(start);\n                    break;\n                }\n                if (m_gotagList.contains(text.mid(start,tokenLength))) {\n                    setFormat(position,length,todoFormat);\n                    break;\n                }\n                if (text.mid(start).startsWith(\"import\") && text.startsWith(\"package\")) {\n                    setFormat(position,length,todoFormat);\n                    break;\n                }\n                if (text.mid(start).startsWith(\"go:\")) {\n                    setFormat(position,length,todoFormat);\n                    break;\n                }\n            }\n            setFormat(start, tokenLength, format);\n        }\n    }\n}\n\nvoid GolangHighlighter::highlightWord(QStringRef word, int position, int length)\n{\n    // try to highlight Qt 'identifiers' like QObject and Q_PROPERTY\n\n    if (word.length() > 2 && word.at(0) == QLatin1Char('Q')) {\n        if (word.at(1) == QLatin1Char('_') // Q_\n            || (word.at(1) == QLatin1Char('T') && word.at(2) == QLatin1Char('_'))) { // QT_\n            for (int i = 1; i < word.length(); ++i) {\n                const QChar &ch = word.at(i);\n                if (!(ch.isUpper() || ch == QLatin1Char('_')))\n                    return;\n            }\n\n            setFormat(position, length, m_creatorFormats[SyntaxHighlighter::DataType]);\n        }\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golanghighlighter.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golanghighlighter.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGHIGHLIGHTER_H\n#define GOLANGHIGHLIGHTER_H\n\n#include \"qtc_texteditor/syntaxhighlighter.h\"\n#include \"liteapi/liteapi.h\"\n\n#include <QTextCharFormat>\n#include <QRegExp>\n\nclass GolangHighlighter : public TextEditor::SyntaxHighlighter\n{\n    Q_OBJECT\n\npublic:\n    GolangHighlighter(LiteApi::ITextEditor *editor, QTextDocument *document = 0);\n    virtual ~GolangHighlighter();\n    virtual void highlightBlock(const QString &text);\nprivate:\n    void highlightBlockHelper(const QString &text);\n    void setFoldingIndent(const QTextBlock &block, int indent);\n    void highlightWord(QStringRef word, int position, int length);\n    void highlightLine(const QString &line, int position, int length,\n                       const QTextCharFormat &format);\n    void highlightCommentLine(const QString &line, int position, int length);\n\n    bool isPPKeyword(const QStringRef &text) const;\nprotected:\n    QStringList m_todoList;\n    QStringList m_gotagList;\n    QRegExp     m_todoRegexp;\n    QString     m_currentTodo;\n    QMap<int,QString> m_todoInfoMap;\n};\n\n#endif // GOLANGHIGHLIGHTER_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golanghighlighterfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golanghighlighterfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golanghighlighterfactory.h\"\n#include \"golanghighlighter.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangHighlighterFactory::GolangHighlighterFactory(QObject *parent) :\n    LiteApi::IHighlighterFactory(parent)\n{\n\n}\n\nQStringList GolangHighlighterFactory::mimeTypes() const\n{\n    return QStringList() << \"text/x-gosrc\";\n}\n\nTextEditor::SyntaxHighlighter *GolangHighlighterFactory::create(LiteApi::ITextEditor *editor, QTextDocument *doc, const QString &/*mimeType*/)\n{\n    return new GolangHighlighter(editor,doc);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golanghighlighterfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golanghighlighterfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGHIGHLIGHTERFACTORY_H\n#define GOLANGHIGHLIGHTERFACTORY_H\n\n#include \"liteeditorapi/liteeditorapi.h\"\n\nclass GolangHighlighterFactory : public LiteApi::IHighlighterFactory\n{\n    Q_OBJECT\npublic:\n    explicit GolangHighlighterFactory(QObject *parent = 0);\n    virtual QStringList mimeTypes() const;\n    virtual TextEditor::SyntaxHighlighter* create(LiteApi::ITextEditor *editor, QTextDocument *doc, const QString &mimeType);\n};\n\n#endif // GOLANGHIGHLIGHTERFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golangtextlexer.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangtextlexer.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangtextlexer.h\"\n#include \"cplusplus/BackwardsScanner.h\"\n#include \"cplusplus/SimpleLexer.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nusing namespace CPlusPlus;\n\nGolangTextLexer::GolangTextLexer(QObject *parent)\n    : LiteApi::ITextLexer(parent)\n{\n\n}\n\nbool GolangTextLexer::isInComment(const QTextCursor &cursor) const\n{\n    return isInCommentHelper(cursor);\n}\n\nbool GolangTextLexer::isInString(const QTextCursor &cursor) const\n{\n    Token token;\n    if (isInCommentHelper(cursor, &token))\n        return false;\n\n    if (token.isStringLiteral() || token.isCharLiteral()) {\n        const unsigned pos = cursor.selectionEnd() - cursor.block().position();\n        if (pos <= token.end())\n            return true;\n    }\n    return false;\n}\n\nbool GolangTextLexer::isInEmptyString(const QTextCursor &cursor) const\n{\n    Token token;\n    if (isInCommentHelper(cursor, &token))\n        return false;\n\n    if (token.isStringLiteral() || token.isCharLiteral()) {\n        const unsigned pos = cursor.selectionEnd() - cursor.block().position();\n        if (pos <= token.end()) {\n            return token.length() == 2;\n        }\n    }\n    return false;\n}\n\nbool GolangTextLexer::isEndOfString(const QTextCursor &cursor) const\n{\n    Token token;\n    if (isInCommentHelper(cursor, &token))\n        return false;\n\n    if (token.isStringLiteral() || token.isCharLiteral()) {\n        const unsigned pos = cursor.selectionEnd() - cursor.block().position();\n        return (token.end()-pos == 1);\n    }\n    return false;\n}\n\nbool GolangTextLexer::isInStringOrComment(const QTextCursor &cursor) const\n{\n    Token token;\n\n    if (isInCommentHelper(cursor, &token))\n        return true;\n\n    if (token.isStringLiteral() || token.isCharLiteral()) {\n        const unsigned pos = cursor.selectionEnd() - cursor.block().position();\n        if (pos <= token.end())\n            return true;\n    }\n    return false;\n}\n\nbool GolangTextLexer::isLangSupport() const\n{\n    return true;\n}\n\nbool GolangTextLexer::isInImportHelper(const QTextCursor &cursor) const\n{\n    const int blockNumber = cursor.block().blockNumber();\n    QTextBlock block = cursor.document()->firstBlock();\n    int pos1 = -1;\n    while (block.isValid()) {\n        QString text = block.text().trimmed();\n        if (text.startsWith(\"/*\")) {\n            block = block.next();\n            while(block.isValid()) {\n                if (block.text().endsWith(\"*/\")) {\n                    break;\n                }\n                block = block.next();\n            }\n            if (!block.isValid()) {\n                break;\n            }\n        } else if (text.startsWith(\"var\")) {\n            break;\n        } else if (text.startsWith(\"func\")) {\n            break;\n        } else if (text.startsWith(\"package \")) {\n            pos1 = block.position()+block.length();\n        } else if (pos1 != -1 && text.startsWith(\"import (\")) {\n            block = block.next();\n            while(block.isValid()) {\n                QString text = block.text().trimmed();\n                if (text.startsWith(\")\")) {\n                    break;\n                }\n                //skip\n                if (text.startsWith(\"/*\")) {\n                    block = block.next();\n                    while(block.isValid()) {\n                        if (block.text().endsWith(\"*/\")) {\n                            break;\n                        }\n                        block = block.next();\n                    }\n                    if (!block.isValid()) {\n                        break;\n                    }\n                }\n                if (text.startsWith(\"//\")) {\n                    block = block.next();\n                    continue;\n                }\n                if (block.blockNumber() == blockNumber) {\n                    return true;\n                }\n                block = block.next();\n            }\n        } else if (pos1 != -1 && text.startsWith(\"import \")) {\n            if (block.blockNumber() == blockNumber) {\n                return true;\n            }\n        }\n        block = block.next();\n    }\n    return false;\n}\n\nbool GolangTextLexer::isInImport(const QTextCursor &cursor) const\n{\n    Token token;\n    if (isInCommentHelper(cursor, &token))\n        return false;\n    if (token.isStringLiteral() || token.isCharLiteral()) {\n        const unsigned pos = cursor.selectionEnd() - cursor.block().position();\n        QString tk = cursor.block().text().mid(token.begin(),token.length());\n        if (tk.endsWith('\\\"') || tk.endsWith('`')) {\n            if (pos > token.begin() && pos < token.end()) {\n                return isInImportHelper(cursor);\n            }\n        } else {\n            if (pos > token.begin()) {\n                return isInImportHelper(cursor);\n            }\n        }\n    }\n    return false;\n}\n\nbool GolangTextLexer::isCanAutoCompleter(const QTextCursor &cursor) const\n{\n    return !isInStringOrComment(cursor);\n}\n\nint GolangTextLexer::startOfFunctionCall(const QTextCursor &cursor) const\n{\n    LanguageFeatures features;\n    features.golangEnable = true;\n\n    BackwardsScanner scanner(features,cursor);\n\n    int index = scanner.startToken();\n    forever {\n        const Token &tk = scanner[index - 1];\n        if (tk.is(T_EOF_SYMBOL)) {\n            break;\n        } else if (tk.is(T_LPAREN)) {\n            return scanner.startPosition() + tk.begin();\n        } else if (tk.is(T_RPAREN)) {\n            int matchingBrace = scanner.startOfMatchingBrace(index);\n\n            if (matchingBrace == index) // If no matching brace found\n                return -1;\n\n            index = matchingBrace;\n        } else {\n            --index;\n        }\n    }\n    return -1;\n}\n\nQString GolangTextLexer::fetchFunctionTip(const QString &func, const QString &kind, const QString &info)\n{\n    if (kind != \"func\" || info.startsWith(\"func()\")) {\n        return QString();\n    }\n    return func+\" \"+info;\n}\n\nbool GolangTextLexer::fetchFunctionArgs(const QString &str, int &argnr, int &parcount)\n{\n    LanguageFeatures features;\n    features.golangEnable = true;\n    argnr = 0;\n    parcount = 0;\n    SimpleLexer tokenize;\n    tokenize.setLanguageFeatures(features);\n    QList<Token> tokens = tokenize(str);\n    for (int i = 0; i < tokens.count(); ++i) {\n        const Token &tk = tokens.at(i);\n        if (tk.is(T_LPAREN))\n            ++parcount;\n        else if (tk.is(T_RPAREN))\n            --parcount;\n        else if (! parcount && tk.is(T_COMMA))\n            ++argnr;\n    }\n    return true;\n}\n\nQString GolangTextLexer::stringQuoteList() const\n{\n    return QString(\"\\\"\\'`\");\n}\n\nbool GolangTextLexer::hasStringBackslash() const\n{\n    return true;\n}\n\nbool GolangTextLexer::isInCommentHelper(const QTextCursor &cursor, Token *retToken) const\n{\n    LanguageFeatures features;\n    features.golangEnable = true;\n\n    SimpleLexer tokenize;\n    tokenize.setLanguageFeatures(features);\n\n    const int prevState = BackwardsScanner::previousBlockState(cursor.block()) & 0xFF;\n    const QList<Token> tokens = tokenize(cursor.block().text(), prevState);\n\n    const unsigned pos = cursor.selectionEnd() - cursor.block().position();\n\n    if (tokens.isEmpty() || pos < tokens.first().begin())\n        return prevState > 0;\n\n    if (pos >= tokens.last().end()) {\n        const Token tk = tokens.last();\n        if (tk.is(T_CPP_COMMENT) || tk.is(T_CPP_DOXY_COMMENT))\n            return true;\n        if (tk.is(T_RAW_STRING_LITERAL) && (cursor.block().userState() & 0xFF) ) {\n            if (retToken)\n                *retToken = tk;\n            return false;\n        }\n        if (tk.isStringLiteral() || tk.isCharLiteral()) {\n            if (retToken)\n                *retToken = tk;\n            return false;\n        }\n        return tk.isComment() && (cursor.block().userState() & 0xFF);\n    }\n\n    Token tk = tokenAtPosition(tokens, pos);\n\n    if (retToken)\n        *retToken = tk;\n\n    return tk.isComment();\n}\n\nconst Token GolangTextLexer::tokenAtPosition(const QList<Token> &tokens, const unsigned pos) const\n{\n    for (int i = tokens.size() - 1; i >= 0; --i) {\n        const Token tk = tokens.at(i);\n        if (pos >= tk.begin() && pos < tk.end())\n            return tk;\n    }\n    return Token();\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/golangtextlexer.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangtextlexer.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGTEXTLEXER_H\n#define GOLANGTEXTLEXER_H\n\n#include \"liteeditorapi/liteeditorapi.h\"\n#include \"cplusplus/Token.h\"\n\nclass GolangTextLexer : public LiteApi::ITextLexer\n{\npublic:\n    GolangTextLexer(QObject *parent = 0);\n    virtual bool isLangSupport() const;\n    virtual bool isInComment(const QTextCursor &cursor) const;\n    virtual bool isInString(const QTextCursor &cursor) const;\n    virtual bool isInEmptyString(const QTextCursor &cursor) const;\n    virtual bool isEndOfString(const QTextCursor &cursor) const;\n    virtual bool isInStringOrComment(const QTextCursor &cursor) const;\n    virtual bool isInImport(const QTextCursor &cursor) const;\n    virtual bool isCanAutoCompleter(const QTextCursor &cursor) const;\n    virtual int startOfFunctionCall(const QTextCursor &cursor) const;\n    virtual QString fetchFunctionTip(const QString &func, const QString &kind, const QString &info);\n    virtual bool fetchFunctionArgs(const QString &str, int &argnr, int &parcount);\n    virtual QString stringQuoteList() const;\n    virtual bool hasStringBackslash() const;\nprotected:\n    bool isInCommentHelper(const QTextCursor &cursor, CPlusPlus::Token *retToken = 0) const;\n    const CPlusPlus::Token tokenAtPosition(const QList<CPlusPlus::Token> &tokens, const unsigned pos) const;\n    bool isInImportHelper(const QTextCursor &cursor) const;\n};\n\n#endif // GOLANGTEXTLEXER_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/goplsfilesearch.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2024 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: goplsfilesearch.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"goplsfilesearch.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"fileutil/fileutil.h\"\n#include <QTextBlock>\n#include <qalgorithms.h>\n\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n#define _CRTDBG_MAP_ALLOC\n#include <stdlib.h>\n#include <crtdbg.h>\n#define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n#define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n#include <QDebug>\n\n\nstatic QByteArray trimmedRight(const QByteArray &d)\n{\n    if (d.size() == 0) {\n        return d;\n    }\n    const char *s = d.data();\n    int end = d.size() - 1;\n    while (end && isspace(uchar(s[end])))           // skip white space from end\n        end--;\n    return d.left(end+1);\n}\n\nGoplsFileSearch::GoplsFileSearch(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IFileSearch(parent), m_liteApp(app)\n{\n    m_process = new ProcessEx(this);\n    m_replaceMode = false;\n    m_readOnly = true;\n    m_bParserHead = true;\n    //    connect(m_process,SIGNAL(started()),this,SLOT(findUsagesStarted()));\n    connect(m_process,SIGNAL(extOutput(QByteArray,bool)),this,SLOT(findUsagesOutput(QByteArray,bool)));\n    connect(m_process,SIGNAL(extFinish(bool,int,QString)),this,SLOT(findUsagesFinish(bool,int,QString)));\n}\n\nGoplsFileSearch::~GoplsFileSearch()\n{\n}\n\nQString GoplsFileSearch::mimeType() const\n{\n    return \"find/goplsfileserch\";\n}\n\nQWidget *GoplsFileSearch::widget() const\n{\n    return 0;\n}\n\nvoid GoplsFileSearch::start()\n{\n\n}\n\nvoid GoplsFileSearch::cancel()\n{\n}\n\nvoid GoplsFileSearch::activate()\n{\n\n}\n\nQString GoplsFileSearch::searchText() const\n{\n    return m_searchText;\n}\n\nbool GoplsFileSearch::replaceMode() const\n{\n    return m_replaceMode;\n}\n\nvoid GoplsFileSearch::setSearchInfo(const QString &/*text*/, const QString &/*filter*/, const QString &/*path*/)\n{\n\n}\n\nvoid GoplsFileSearch::findUsages(LiteApi::ITextEditor *editor, QTextCursor cursor, const QString &command, const QStringList &opts, bool replace)\n{\n    if (!m_process->isStop()) {\n        m_process->stopAndWait(100,2000);\n    }\n\n    bool moveLeft = false;\n    int selectStart = 0;\n    m_searchText = LiteApi::wordUnderCursor(cursor,&moveLeft,&selectStart);\n\n    if (m_searchText.isEmpty() || m_searchText.contains(\" \")) {\n        return;\n    }\n\n    m_liteApp->editorManager()->saveAllEditors(false);\n\n    //int offset = moveLeft ? editor->utf8Position(true)-1: editor->utf8Position(true);\n    int offset = editor->utf8Position(true,selectStart);\n\n    LiteApi::IFileSearchManager *manager = LiteApi::getFileSearchManager(m_liteApp);\n    if (!manager) {\n        return;\n    }\n    this->m_replaceMode = replace;\n    manager->setCurrentSearch(this);\n    m_results.clear();\n\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\n    FileUtil::lookupGoBin(\"gopls\",m_liteApp,env,false);\n\n    QString gopls = FileUtil::lookupGoBin(\"gopls\",m_liteApp,env,true);\n    if (gopls.isEmpty()) {\n        gopls = FileUtil::lookPath(\"dlv\",env,false);\n    }\n\n    if (gopls.isEmpty()) {\n        m_liteApp->appendLog(\"GolangEdit\",\"gopls was not found on system PATH (hint: is gopls installed?)\",true);\n        return;\n    }\n    QFileInfo info(editor->filePath());\n    m_process->setEnvironment(LiteApi::getCustomGoEnvironment(m_liteApp,editor).toStringList());\n    m_process->setWorkingDirectory(info.path());\n\n    QStringList args;\n    args << command;\n    if (!opts.isEmpty()) {\n        args << opts;\n    }\n    args << QString(\"\\\"%1:#%2\\\"\").arg(info.fileName()).arg(offset);\n\n    emit findStarted();\n    m_process->startEx(gopls,args);\n}\n\nvoid GoplsFileSearch::findUsagesStarted()\n{\n}\n\nvoid GoplsFileSearch::findUsagesOutput(QByteArray data, bool bStdErr)\n{\n    if (bStdErr) {\n        QString info = QString::fromUtf8(data).trimmed();\n        emit findError(info);\n        m_liteApp->appendLog(\"find usage error\",info,true);\n        return;\n    }\n    QRegExp reg(\":(\\\\d+):(\\\\d+)-(\\\\d*)\");\n    foreach (QByteArray line, data.split('\\n')) {\n        QString info = QString::fromUtf8(line).trimmed();\n        int pos = reg.lastIndexIn(info);\n        if (pos >= 0) {\n            gopls_resinfo res;\n            res.fileName = info.left(pos);\n            res.line = reg.cap(1).toInt();\n            res.column = reg.cap(2).toInt();\n            res.columnEnd = reg.cap(3).toInt();\n            m_results.append(res);\n        }\n    }\n}\n\nstruct resultComp\n{\n    bool operator()(const gopls_resinfo &a,\n                    const gopls_resinfo &b) {\n        if (a.fileName == b.fileName) {\n            if (a.line == b.line) {\n                return a.column < b.column;\n            }\n            return a.line < b.line;\n        }\n        return a.fileName < b.fileName;\n    }\n};\n\nvoid GoplsFileSearch::findUsagesFinish(bool b, int, QString)\n{\n    if (!m_results.isEmpty()) {\n        qSort(m_results.begin(),m_results.end(),resultComp());\n    }\n    QFile file;\n    int lastLine = 0;\n    QString lastLineText;\n    foreach(gopls_resinfo info, m_results) {\n        QString fileName = info.fileName;\n        int fileLine = info.line;\n        int fileCol = info.column;\n        int fileCol2 = info.columnEnd;\n        if (file.fileName() != fileName) {\n            file.close();\n            file.setFileName(fileName);\n        }\n        if (!file.isOpen()) {\n            file.open(QFile::ReadOnly);\n            lastLine = 0;\n        }\n        if (file.isOpen()) {\n            if (fileLine != lastLine) {\n                while(!file.atEnd()) {\n                    QByteArray line = file.readLine();\n                    lastLine++;\n                    if (fileLine == lastLine) {\n                        lastLineText = QString::fromUtf8(trimmedRight(line));\n                        if (fileCol > 0) {\n                            fileCol = QString::fromUtf8(line.left(fileCol)).length();\n                        }\n                        break;\n                    }\n                }\n            } else {\n                QByteArray line = lastLineText.toUtf8();\n                if (fileCol > 0) {\n                    fileCol = QString::fromUtf8(line.left(fileCol)).length();\n                }\n            }\n            int length = m_searchText.length();\n            if (fileCol2 > fileCol) {\n                length = fileCol2-fileCol;\n            }\n            emit findResult(LiteApi::FileSearchResult(fileName,lastLineText,fileLine,fileCol-1,length));\n        }\n    }\n    m_results.clear();\n\n    emit findFinished(b);\n}\n\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/goplsfilesearch.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2024 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: goplsfilesearch.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOPLSFILESEARCH_H\n#define GOPLSFILESEARCH_H\n\n#include \"litefindapi/litefindapi.h\"\n#include \"processex/processex.h\"\n\n#define GOPLS_references \"references\"\n#define GOPLS_implementation \"implementation\"\n\nstruct gopls_resinfo {\n    QString fileName;\n    int     line;\n    int     column;\n    int     columnEnd;\n};\n\nclass GoplsFileSearch : public LiteApi::IFileSearch\n{\n    Q_OBJECT\npublic:\n    explicit GoplsFileSearch(LiteApi::IApplication *app, QObject *parent = 0);\n    virtual ~GoplsFileSearch();\n    virtual QString mimeType() const;\n    virtual QString displayName() const { return m_displayName; }\n    virtual QWidget* widget() const;\n    virtual void start();\n    virtual void cancel();\n    virtual void activate();\n    virtual QString searchText() const;\n    virtual bool replaceMode() const;\n    virtual bool readOnly() const { return m_readOnly; }\n    virtual bool canCancel() const { return false; }\n    virtual void setSearchInfo(const QString &text, const QString &fitler, const QString &path);\n    void setReadOnly(bool b) { m_readOnly = b; };\n    void setDisplyName(const QString &name) { m_displayName = name; }\n    void findUsages(LiteApi::ITextEditor *editor, QTextCursor cursor, const QString &command, const QStringList &opts = QStringList(), bool replace = false);\npublic slots:\n    void findUsagesStarted();\n    void findUsagesOutput(QByteArray,bool);\n    void findUsagesFinish(bool,int,QString);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QList<gopls_resinfo> m_results;\n    ProcessEx *m_process;\n    QString m_searchText;\n    QString m_displayName;\n    bool    m_bParserHead;\n    bool    m_replaceMode;\n    bool    m_readOnly;\n};\n\n#endif // GOPLSFILESEARCH_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/goremovetagsdialog.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: goremovetagsdialog.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"goremovetagsdialog.h\"\r\n#include \"ui_goremovetagsdialog.h\"\r\n#include \"liteapi/liteqt.h\"\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nGoRemoveTagsDialog::GoRemoveTagsDialog(QWidget *parent) :\r\n    QDialog(parent),\r\n    ui(new Ui::GoRemoveTagsDialog)\r\n{\r\n    ui->setupUi(this);\r\n    connect(ui->clearAllTagsRadioButton,SIGNAL(toggled(bool)),this,SLOT(updateArguments()));\r\n    connect(ui->clearAllOptionsRadioButton,SIGNAL(toggled(bool)),this,SLOT(updateArguments()));\r\n\r\n    connect(ui->removeJsonTagRadioButton,SIGNAL(toggled(bool)),this,SLOT(updateArguments()));\r\n    connect(ui->removeXmlOptionRadioButton,SIGNAL(toggled(bool)),this,SLOT(updateArguments()));\r\n    connect(ui->removeCustomTagRadioButton,SIGNAL(toggled(bool)),this,SLOT(updateArguments()));\r\n\r\n    connect(ui->removeJsonOptionRadioButton,SIGNAL(toggled(bool)),this,SLOT(updateArguments()));\r\n    connect(ui->removeXmlOptionRadioButton,SIGNAL(toggled(bool)),this,SLOT(updateArguments()));\r\n    connect(ui->removeCustomOptionRadioButton,SIGNAL(toggled(bool)),this,SLOT(updateArguments()));\r\n\r\n    connect(ui->customTaglineEdit,SIGNAL(textChanged(QString)),this,SLOT(updateArguments()));\r\n    connect(ui->jsonOptionLineEdit,SIGNAL(textChanged(QString)),this,SLOT(updateArguments()));\r\n    connect(ui->xmlOptionLineEdit,SIGNAL(textChanged(QString)),this,SLOT(updateArguments()));\r\n    connect(ui->customOptionLineEdit,SIGNAL(textChanged(QString)),this,SLOT(updateArguments()));\r\n}\r\n\r\nGoRemoveTagsDialog::~GoRemoveTagsDialog()\r\n{\r\n    delete ui;\r\n}\r\n\r\nvoid GoRemoveTagsDialog::setInfo(const QString &info)\r\n{\r\n    ui->infoLabel->setText(info);\r\n}\r\n\r\nQString GoRemoveTagsDialog::arguments() const\r\n{\r\n    return ui->argumentsEdit->toPlainText().trimmed();\r\n}\r\n\r\nstatic QString removeHead(const QString &text, const QString &head)\r\n{\r\n    if (text.startsWith(head)) {\r\n        return text.mid(head.length());\r\n    }\r\n    return text;\r\n}\r\n\r\nvoid GoRemoveTagsDialog::updateArguments()\r\n{\r\n    QString args;\r\n    if (ui->clearAllTagsRadioButton->isChecked()) {\r\n        args = \"-clear-tags\";\r\n    } else if (ui->clearAllOptionsRadioButton->isChecked()) {\r\n        args = \"-clear-options\";\r\n    } else if (ui->removeJsonTagRadioButton->isChecked()) {\r\n        args = \"-remove-tags json\";\r\n    } else if (ui->removeXmlTagRadioButton->isChecked()) {\r\n        args = \"-remove-tags xml\";\r\n    } else if (ui->removeCustomTagRadioButton->isChecked()) {\r\n        QString tag = ui->customTaglineEdit->text().trimmed();\r\n        if (!tag.isEmpty()) {\r\n            args = \"-remove-tags \"+tag;\r\n        }\r\n    } else if (ui->removeJsonOptionRadioButton->isChecked()) {\r\n        QStringList optList = ui->jsonOptionLineEdit->text().trimmed().split(\",\",qtSkipEmptyParts);\r\n        QStringList options;\r\n        foreach (QString opt, optList) {\r\n            options << \"json=\"+opt;\r\n        }\r\n        if (!options.isEmpty()) {\r\n            args = \"-remove-options \"+options.join(\",\");\r\n        }\r\n    } else if (ui->removeXmlOptionRadioButton->isChecked()) {\r\n        QStringList optList = ui->xmlOptionLineEdit->text().trimmed().split(\",\",qtSkipEmptyParts);\r\n        QStringList options;\r\n        foreach (QString opt, optList) {\r\n            options << \"xml=\"+opt;\r\n        }\r\n        if (!options.isEmpty()) {\r\n            args = \"-remove-options \"+options.join(\",\");\r\n        }\r\n    } else if(ui->removeCustomOptionRadioButton->isChecked()) {\r\n        QString opt = ui->customOptionLineEdit->text().trimmed();\r\n        if (opt == ui->customOptionLineEdit->placeholderText()) {\r\n            if (ui->customOptionLineEdit->cursorPosition() == 0) {\r\n                opt.clear();\r\n            }\r\n        }\r\n        if (opt.contains(\"=\")) {\r\n            args = \"-remove-options \"+opt;\r\n        }\r\n    }\r\n\r\n    ui->argumentsEdit->setPlainText(args);\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/goremovetagsdialog.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: goremovetagsdialog.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef GOREMOVETAGSDIALOG_H\r\n#define GOREMOVETAGSDIALOG_H\r\n\r\n#include <QDialog>\r\n\r\nnamespace Ui {\r\nclass GoRemoveTagsDialog;\r\n}\r\n\r\nclass GoRemoveTagsDialog : public QDialog\r\n{\r\n    Q_OBJECT\r\n\r\npublic:\r\n    explicit GoRemoveTagsDialog(QWidget *parent = 0);\r\n    ~GoRemoveTagsDialog();\r\n    void setInfo(const QString &info);\r\n    QString arguments() const;\r\npublic slots:\r\n    void updateArguments();\r\nprivate:\r\n    Ui::GoRemoveTagsDialog *ui;\r\n};\r\n\r\n#endif // GOREMOVETAGSDIALOG_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangedit/goremovetagsdialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>GoRemoveTagsDialog</class>\r\n <widget class=\"QDialog\" name=\"GoRemoveTagsDialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>550</width>\r\n    <height>395</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Remove Tags From Struct Field</string>\r\n  </property>\r\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\r\n   <property name=\"spacing\">\r\n    <number>2</number>\r\n   </property>\r\n   <item>\r\n    <widget class=\"QGroupBox\" name=\"groupBox\">\r\n     <property name=\"title\">\r\n      <string>Remove Tags And Options</string>\r\n     </property>\r\n     <layout class=\"QGridLayout\" name=\"gridLayout\">\r\n      <item row=\"0\" column=\"0\">\r\n       <widget class=\"QRadioButton\" name=\"clearAllTagsRadioButton\">\r\n        <property name=\"text\">\r\n         <string>Clear All Tags</string>\r\n        </property>\r\n        <property name=\"checked\">\r\n         <bool>false</bool>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item row=\"1\" column=\"0\">\r\n       <widget class=\"QRadioButton\" name=\"clearAllOptionsRadioButton\">\r\n        <property name=\"text\">\r\n         <string>Clear All Tags Options</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item row=\"2\" column=\"0\">\r\n       <widget class=\"QRadioButton\" name=\"removeJsonTagRadioButton\">\r\n        <property name=\"text\">\r\n         <string>Remove JSON Tag</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item row=\"3\" column=\"0\">\r\n       <widget class=\"QRadioButton\" name=\"removeXmlTagRadioButton\">\r\n        <property name=\"text\">\r\n         <string>Remove XML Tag</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item row=\"4\" column=\"0\">\r\n       <widget class=\"QRadioButton\" name=\"removeCustomTagRadioButton\">\r\n        <property name=\"text\">\r\n         <string>Remove Custom Tag</string>\r\n        </property>\r\n        <property name=\"checked\">\r\n         <bool>true</bool>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item row=\"4\" column=\"1\">\r\n       <widget class=\"QLineEdit\" name=\"customTaglineEdit\">\r\n        <property name=\"toolTip\">\r\n         <string>Multiple tags separated by commas</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item row=\"5\" column=\"0\">\r\n       <widget class=\"QRadioButton\" name=\"removeJsonOptionRadioButton\">\r\n        <property name=\"text\">\r\n         <string>Remove JSON Options</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item row=\"5\" column=\"1\">\r\n       <widget class=\"QLineEdit\" name=\"jsonOptionLineEdit\">\r\n        <property name=\"toolTip\">\r\n         <string>Multiple options separated by commas</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item row=\"6\" column=\"0\">\r\n       <widget class=\"QRadioButton\" name=\"removeXmlOptionRadioButton\">\r\n        <property name=\"text\">\r\n         <string>Remove XML Options</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item row=\"6\" column=\"1\">\r\n       <widget class=\"QLineEdit\" name=\"xmlOptionLineEdit\">\r\n        <property name=\"toolTip\">\r\n         <string>Multiple options separated by commas</string>\r\n        </property>\r\n        <property name=\"cursorPosition\">\r\n         <number>0</number>\r\n        </property>\r\n        <property name=\"placeholderText\">\r\n         <string/>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item row=\"7\" column=\"0\">\r\n       <widget class=\"QRadioButton\" name=\"removeCustomOptionRadioButton\">\r\n        <property name=\"text\">\r\n         <string>Remove Custom Tag Options</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item row=\"7\" column=\"1\">\r\n       <widget class=\"QLineEdit\" name=\"customOptionLineEdit\">\r\n        <property name=\"toolTip\">\r\n         <string>Setup remove custom tag and option, example tag=opt1,tag=opt2</string>\r\n        </property>\r\n        <property name=\"placeholderText\">\r\n         <string>tag=option</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n     </layout>\r\n    </widget>\r\n   </item>\r\n   <item>\r\n    <widget class=\"QLabel\" name=\"infoLabel\">\r\n     <property name=\"text\">\r\n      <string>Info</string>\r\n     </property>\r\n    </widget>\r\n   </item>\r\n   <item>\r\n    <widget class=\"QPlainTextEdit\" name=\"argumentsEdit\"/>\r\n   </item>\r\n   <item>\r\n    <spacer name=\"verticalSpacer\">\r\n     <property name=\"orientation\">\r\n      <enum>Qt::Vertical</enum>\r\n     </property>\r\n     <property name=\"sizeHint\" stdset=\"0\">\r\n      <size>\r\n       <width>20</width>\r\n       <height>40</height>\r\n      </size>\r\n     </property>\r\n    </spacer>\r\n   </item>\r\n   <item>\r\n    <widget class=\"QDialogButtonBox\" name=\"buttonBox\">\r\n     <property name=\"orientation\">\r\n      <enum>Qt::Horizontal</enum>\r\n     </property>\r\n     <property name=\"standardButtons\">\r\n      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>\r\n     </property>\r\n    </widget>\r\n   </item>\r\n  </layout>\r\n </widget>\r\n <resources/>\r\n <connections>\r\n  <connection>\r\n   <sender>buttonBox</sender>\r\n   <signal>accepted()</signal>\r\n   <receiver>GoRemoveTagsDialog</receiver>\r\n   <slot>accept()</slot>\r\n   <hints>\r\n    <hint type=\"sourcelabel\">\r\n     <x>248</x>\r\n     <y>254</y>\r\n    </hint>\r\n    <hint type=\"destinationlabel\">\r\n     <x>157</x>\r\n     <y>274</y>\r\n    </hint>\r\n   </hints>\r\n  </connection>\r\n  <connection>\r\n   <sender>buttonBox</sender>\r\n   <signal>rejected()</signal>\r\n   <receiver>GoRemoveTagsDialog</receiver>\r\n   <slot>reject()</slot>\r\n   <hints>\r\n    <hint type=\"sourcelabel\">\r\n     <x>316</x>\r\n     <y>260</y>\r\n    </hint>\r\n    <hint type=\"destinationlabel\">\r\n     <x>286</x>\r\n     <y>274</y>\r\n    </hint>\r\n   </hints>\r\n  </connection>\r\n </connections>\r\n</ui>\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangfmt/golangfmt.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangfmt.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangfmt.h\"\n#include \"golangfmt_global.h\"\n#include \"fileutil/fileutil.h\"\n#include \"processex/processex.h\"\n#include \"litebuildapi/litebuildapi.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n#include \"qtc_texteditor/basetextdocumentlayout.h\"\n\n#include <QDebug>\n#include <QProcess>\n#include <QFileInfo>\n#include <QPlainTextEdit>\n#include <QTextCodec>\n#include <QTextCursor>\n#include <QTextBlock>\n#include <QScrollBar>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangFmt::GolangFmt(LiteApi::IApplication *app,QObject *parent) :\n    QObject(parent),\n    m_liteApp(app),\n    m_diff(true),\n    m_fixImports(false),\n    m_autofmt(true),\n    m_syncfmt(false),\n    m_timeout(600)\n{\n    m_process = new ProcessEx(this);\n    connect(m_process,SIGNAL(extOutput(QByteArray,bool)),this,SLOT(fmtOutput(QByteArray,bool)));\n    connect(m_process,SIGNAL(started()),this,SLOT(fmtStarted()));\n    connect(m_process,SIGNAL(extFinish(bool,int,QString)),this,SLOT(fmtFinish(bool,int,QString)));\n\n    m_envManager = LiteApi::findExtensionObject<LiteApi::IEnvManager*>(m_liteApp,\"LiteApi.IEnvManager\");\n    if (m_envManager) {\n        connect(m_envManager,SIGNAL(currentEnvChanged(LiteApi::IEnv*)),this,SLOT(currentEnvChanged(LiteApi::IEnv*)));\n    }\n    connect(m_liteApp->editorManager(),SIGNAL(editorAboutToSave(LiteApi::IEditor*)),this,SLOT(editorAboutToSave(LiteApi::IEditor*)));\n    connect(m_liteApp->optionManager(),SIGNAL(applyOption(QString)),this,SLOT(applyOption(QString)));\n    applyOption(\"option/golangfmt\");\n}\n\nvoid GolangFmt::applyOption(QString id)\n{\n    if (id != \"option/golangfmt\") {\n        return;\n    }\n    m_fixImports = m_liteApp->settings()->value(GOLANGFMT_FIXIMPORTS,false).toBool();\n    m_autofmt = m_liteApp->settings()->value(GOLANGFMT_AUTOFMT,true).toBool();\n    m_syncfmt = m_liteApp->settings()->value(GOLANGFMT_USESYNCFMT,true).toBool();\n    m_timeout = m_liteApp->settings()->value(GOLANGFMT_SYNCTIMEOUT,500).toInt();\n}\n\nvoid GolangFmt::syncfmtEditor(LiteApi::IEditor *editor, bool save, bool check, int timeout, int fmtStyle)\n{\n    LiteApi::ITextEditor *textEditor = LiteApi::getTextEditor(editor);\n    if (!textEditor) {\n        return;\n    }\n    QString fileName = editor->filePath();\n    if (fileName.isEmpty() && check) {\n        return;\n    }\n\n    QFileInfo info(fileName);\n    if (info.suffix() != \"go\" && check) {\n        return;\n    }\n\n    QPlainTextEdit *ed = LiteApi::findExtensionObject<QPlainTextEdit*>(editor,\"LiteApi.QPlainTextEdit\");\n    if (!ed) {\n        return;\n    }\n\n    QString text = ed->toPlainText();\n    if (text.isEmpty()) {\n        return;\n    }\n\n    if (timeout < 0) {\n        timeout = m_timeout;\n    }\n\n    QStringList args;\n    args << \"gofmt\";\n    //format style 0: auto, 1: gofmt 2: fiximports\n    if (fmtStyle == 0) {\n        if (m_fixImports) {\n            args << \"-fiximports\";\n        }\n    } else if (fmtStyle == 1) {\n    } else if (fmtStyle == 2) {\n        args << \"-fiximports\";\n    }\n    if (m_diff) {\n        args << \"-d\";\n    }\n\n    bool bresult = false;\n    QString output,errmsg;\n//    if (isUseGopher(m_liteApp) && m_gopher.isValid()) {\n//        QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\n//        m_gopher.setEnvironment(env);\n//        bresult = m_gopher.invokeArgs(args,text,output,errmsg);\n//    } else {\n//\n    QString cmd = LiteApi::getGotools(m_liteApp);\n\n    QProcess process;\n    process.setProcessEnvironment(LiteApi::getGoEnvironment(m_liteApp));\n    process.start(cmd,args);\n\n    if (!process.waitForStarted(timeout)) {\n        m_liteApp->appendLog(\"gofmt\",QString(\"Timed out after %1ms when starting go code format\").arg(timeout),false);\n        return;\n    }\n    process.write(text.toUtf8());\n    process.closeWriteChannel();\n    if (!process.waitForFinished(timeout*4)) {\n        m_liteApp->appendLog(\"gofmt\",QString(\"Timed out after %1ms while running go code format\").arg(timeout*4),false);\n        return;\n    }\n    if (process.exitCode() != 0) {\n        errmsg = QString::fromUtf8(process.readAllStandardError());\n    } else {\n        bresult = true;\n        output = QString::fromUtf8(process.readAllStandardOutput());\n    }\n  //  }\n\n    LiteApi::ILiteEditor *liteEditor = LiteApi::getLiteEditor(editor);\n    liteEditor->clearAllNavigateMark(LiteApi::EditorNavigateBad, GOLANGFMT_TAG);\n    if (!bresult) {\n        if (!errmsg.isEmpty()) {\n            //<standard input>:23:1: expected declaration, found 'INT' 1\n             foreach(QString msg,errmsg.split(\"\\n\")) {\n                QRegExp re(\":(\\\\d+):\");\n                if (re.indexIn(msg,16) >= 0) {\n                    bool ok = false;\n                    int line = re.cap(1).toInt(&ok);\n                    if (ok) {\n                        liteEditor->insertNavigateMark(line-1,LiteApi::EditorNavigateError,msg.mid(16), GOLANGFMT_TAG);\n                    }\n                }\n            }\n        }\n        QString log = errmsg;\n        errmsg.replace(\"<standard input>\",\"\");\n        liteEditor->setNavigateHead(LiteApi::EditorNavigateError,\"go code format error\\n\"+errmsg);\n        log.replace(\"<standard input>\",info.filePath());\n        m_liteApp->appendLog(\"go code format error\",log,fmtStyle == 0 ? false: true);\n        return;\n    }\n    liteEditor->setNavigateHead(LiteApi::EditorNavigateNormal,\"go code format success\");\n\n    liteEditor->loadDiff(output);\n\n    if (save) {\n        m_liteApp->editorManager()->saveEditor(editor,false);\n    }\n}\n\nvoid GolangFmt::fmtEditor(LiteApi::IEditor *editor, bool save)\n{\n    if (!editor) {\n        return;\n    }\n    if (editor->filePath().isEmpty()) {\n        return;\n    }\n    QFileInfo info(editor->filePath());\n    if (info.suffix() != \"go\") {\n        return;\n    }\n    if (!m_process->isStop()) {\n        return;\n    }\n    QPlainTextEdit *edit = LiteApi::getPlainTextEdit(editor);\n    if (!edit) {\n        return;\n    }\n    m_data.clear();;\n    m_errData.clear();\n    m_process->setUserData(0,editor->filePath());\n    m_process->setUserData(1,edit->toPlainText());\n    m_process->setUserData(2,save);\n\n    QStringList args;\n    args << \"gofmt\";\n    if (m_fixImports) {\n        args << \"-fiximports\";\n    }\n    if (m_diff) {\n        args << \"-d\";\n    }\n    QString cmd = LiteApi::getGotools(m_liteApp);\n    m_process->start(cmd,args);\n}\n\nvoid GolangFmt::editorAboutToSave(LiteApi::IEditor* editor)\n{\n    if (!m_autofmt) {\n        return;\n    }\n    if (m_syncfmt) {\n        syncfmtEditor(editor,true);\n    } else {\n        fmtEditor(editor,true);\n    }\n}\n\nvoid GolangFmt::currentEnvChanged(LiteApi::IEnv*)\n{\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\n    m_process->setProcessEnvironment(env);\n\n//    if (!LiteApi::hasGoEnv(env)) {\n//        m_liteApp->appendLog(\"GolangFmt\",\"Could not find go env\", false);\n//        return;\n//    }\n//    m_liteApp->appendLog(\"GolangFmt\",\"go environment changed\");\n//    m_gofmtCmd = FileUtil::lookupGoBin(\"gofmt\",m_liteApp,false);\n//    if (m_gofmtCmd.isEmpty()) {\n//        m_liteApp->appendLog(\"GolangFmt\",QString(\"Could not find %1\").arg(m_gofmtCmd),false);\n//    }\n}\n\nvoid GolangFmt::gofmt()\n{\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n    if (!editor) {\n        return;\n    }\n    m_liteApp->editorManager()->saveEditor(editor,false);\n    syncfmtEditor(editor,false,true,30000,1);\n}\n\nvoid GolangFmt::goimports()\n{\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n    if (!editor) {\n        return;\n    }\n    m_liteApp->editorManager()->saveEditor(editor,false);\n    syncfmtEditor(editor,false,true,30000,2);\n}\n\nvoid GolangFmt::fmtStarted()\n{\n    QString text = m_process->userData(1).toString();\n    m_process->write(text.toUtf8());\n    m_process->closeWriteChannel();\n}\n\nvoid GolangFmt::fmtOutput(QByteArray data,bool stdErr)\n{\n    if (stdErr) {\n        m_errData.append(data);\n        return;\n    }\n    m_data.append(data);\n}\n\nvoid GolangFmt::fmtFinish(bool error,int code,QString)\n{\n    QString fileName = m_process->userData(0).toString();\n    if (fileName.isEmpty()) {\n        return;\n    }\n    bool save = m_process->userData(2).toBool();\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->findEditor(fileName,true);\n    if (!editor) {\n        return;\n    }\n    LiteApi::ILiteEditor *liteEditor = LiteApi::getLiteEditor(editor);\n    if (!liteEditor) {\n        return;\n    }\n    QPlainTextEdit *ed = LiteApi::getPlainTextEdit(editor);\n    if (!ed) {\n        return;\n    }\n    //qDebug() << ed->document()->isModified();\n    if (ed->document()->isModified()) {\n        return;\n    }\n    liteEditor->clearAllNavigateMark(LiteApi::EditorNavigateBad, GOLANGFMT_TAG);\n    QTextCodec *codec = QTextCodec::codecForName(\"utf-8\");\n    if (!error && code == 0) {\n        liteEditor->setNavigateHead(LiteApi::EditorNavigateNormal,\"go code format success\");\n\n        liteEditor->loadDiff(codec->toUnicode(m_data));\n\n        if (save) {\n            m_liteApp->editorManager()->saveEditor(editor,false);\n        }\n    } else if (!m_errData.isEmpty()) {\n        QString errmsg = codec->toUnicode(m_errData);\n        if (!errmsg.isEmpty()) {\n            //<standard input>:23:1: expected declaration, found 'INT' 1\n            foreach(QString msg,errmsg.split(\"\\n\")) {\n                QRegExp re(\":(\\\\d+):\");\n                if (re.indexIn(msg,16) >= 0) {\n                    bool ok = false;\n                    int line = re.cap(1).toInt(&ok);\n                    if (ok) {\n                        liteEditor->insertNavigateMark(line-1,LiteApi::EditorNavigateError,msg.mid(16), GOLANGFMT_TAG);\n                    }\n                }\n            }\n        }\n        QString log = errmsg;\n        errmsg.replace(\"<standard input>\",\"\");\n        liteEditor->setNavigateHead(LiteApi::EditorNavigateError,\"go code format error\\n\"+errmsg);\n        log.replace(\"<standard input>\",fileName);\n        m_liteApp->appendLog(\"go code format error\",log,false);\n    }\n    m_data.clear();\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangfmt/golangfmt.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangfmt.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGFMT_H\n#define GOLANGFMT_H\n\n#include <QObject>\n#include <QTextCursor>\n\n#include \"liteapi/liteapi.h\"\n#include \"liteenvapi/liteenvapi.h\"\n\nclass ProcessEx;\n\nclass GolangFmt : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit GolangFmt(LiteApi::IApplication *app,QObject *parent = 0);\npublic slots:\n    void fmtStarted();\n    void gofmt();\n    void goimports();\n    void currentEnvChanged(LiteApi::IEnv*);\n    void fmtOutput(QByteArray,bool);\n    void fmtFinish(bool,int,QString);\n    void editorAboutToSave(LiteApi::IEditor*);\n    void applyOption(QString);\n    void fmtEditor(LiteApi::IEditor*,bool);\n    void syncfmtEditor(LiteApi::IEditor *, bool save, bool check = true, int timeout = -1, int fmtStyle = 0);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    ProcessEx *m_process;\n    LiteApi::IEnvManager *m_envManager;\n    //QString m_gofmtCmd;\n    QByteArray m_data;\n    QByteArray m_errData;\n    //GopherLib m_gopher;\n    bool m_diff;\n    bool m_fixImports;\n    bool m_autofmt;\n    bool m_syncfmt;\n    int  m_timeout;\n};\n\n#endif // GOLANGFMT_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangfmt/golangfmt.pro",
    "content": "TARGET = golangfmt\nTEMPLATE = lib\n\ninclude (../../liteideplugin.pri)\ninclude (../../api/liteenvapi/liteenvapi.pri)\ninclude (../../utils/fileutil/fileutil.pri)\ninclude (../../utils/processex/processex.pri)\ninclude (../../3rdparty/diff_match_patch/diff_match_patch.pri)\n\nDEFINES += GOLANGFMT_LIBRARY\n\nSOURCES += golangfmtplugin.cpp \\\n    golangfmt.cpp \\\n    golangfmtoptionfactory.cpp \\\n    golangfmtoption.cpp\n\nHEADERS += golangfmtplugin.h\\\n        golangfmt_global.h \\\n    golangfmt.h \\\n    golangfmtoptionfactory.h \\\n    golangfmtoption.h\n\nRESOURCES += \\\n    golangfmt.qrc\n\nFORMS += \\\n    golangfmtoption.ui\n"
  },
  {
    "path": "liteidex/src/plugins/golangfmt/golangfmt.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/golangfmt\">\n        <file>images/gofmt.png</file>\n    </qresource>\n</RCC>\n"
  },
  {
    "path": "liteidex/src/plugins/golangfmt/golangfmt_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangfmt_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGFMT_GLOBAL_H\n#define GOLANGFMT_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(GOLANGFMT_LIBRARY)\n#  define GOLANGFMTSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define GOLANGFMTSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#define GOLANGFMT_FIXIMPORTS \"golangfmt/goimportsstyle\"\n#define GOLANGFMT_SORTIMPORTS \"golangfmt/sortimports\"\n#define GOLANGFMT_AUTOFMT \"golangfmt/autofmt\"\n#define GOLANGFMT_USESYNCFMT \"golangfmt/syncfmt\"\n#define GOLANGFMT_SYNCTIMEOUT \"golangfmt/synctimeout\"\n#define GOLANGFMT_TAG \"golangfmt/navtag\"\n\n#endif // GOLANGFMT_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangfmt/golangfmtoption.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangfmtoption.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangfmtoption.h\"\n#include \"golangfmt_global.h\"\n#include \"ui_golangfmtoption.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangFmtOption::GolangFmtOption(LiteApi::IApplication *app,QObject *parent) :\n    LiteApi::IOption(parent),\n    m_liteApp(app),\n    m_widget(new QWidget),\n    ui(new Ui::GolangFmtOption)\n{\n    ui->setupUi(m_widget);\n}\n\nGolangFmtOption::~GolangFmtOption()\n{\n    delete m_widget;\n    delete ui;\n}\n\nQWidget *GolangFmtOption::widget()\n{\n    return m_widget;\n}\n\nQString GolangFmtOption::name() const\n{\n    return \"GolangFmt\";\n}\n\nQString GolangFmtOption::mimeType() const\n{\n    return \"option/golangfmt\";\n}\n\nvoid GolangFmtOption::load()\n{\n\n    bool fixImports = m_liteApp->settings()->value(GOLANGFMT_FIXIMPORTS,false).toBool();\n    bool autofmt = m_liteApp->settings()->value(GOLANGFMT_AUTOFMT,true).toBool();\n    bool syncfmt = m_liteApp->settings()->value(GOLANGFMT_USESYNCFMT,true).toBool();\n    int timeout = m_liteApp->settings()->value(GOLANGFMT_SYNCTIMEOUT,500).toInt();\n    ui->checkBoxUseGoimports->setChecked(fixImports);\n    ui->checkBoxAutoFmt->setChecked(autofmt);\n    ui->enableSyncCheckBox->setChecked(syncfmt);\n    ui->syncTimeoutLineEdit->setText(QString(\"%1\").arg(timeout));\n}\n\nvoid GolangFmtOption::save()\n{\n    bool goimports = ui->checkBoxUseGoimports->isChecked();\n    bool autofmt = ui->checkBoxAutoFmt->isChecked();\n    bool syncfmt = ui->enableSyncCheckBox->isChecked();\n    m_liteApp->settings()->setValue(GOLANGFMT_FIXIMPORTS,goimports);\n    m_liteApp->settings()->setValue(GOLANGFMT_AUTOFMT,autofmt);\n    m_liteApp->settings()->setValue(GOLANGFMT_USESYNCFMT,syncfmt);\n    int timeout = ui->syncTimeoutLineEdit->text().toInt();\n    if (timeout < 500) {\n        timeout = 500;\n    }\n    ui->syncTimeoutLineEdit->setText(QString(\"%1\").arg(timeout));\n    m_liteApp->settings()->setValue(GOLANGFMT_SYNCTIMEOUT,timeout);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangfmt/golangfmtoption.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangfmtoption.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGFMTOPTION_H\n#define GOLANGFMTOPTION_H\n\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class GolangFmtOption;\n}\n\nclass GolangFmtOption : public LiteApi::IOption\n{\n    Q_OBJECT\n\npublic:\n    explicit GolangFmtOption(LiteApi::IApplication *app, QObject *parent = 0);\n    ~GolangFmtOption();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void load();\n    virtual void save();\nprivate:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget           *m_widget;\n    Ui::GolangFmtOption *ui;\n};\n\n#endif // GOLANGFMTOPTION_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangfmt/golangfmtoption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>GolangFmtOption</class>\r\n <widget class=\"QWidget\" name=\"GolangFmtOption\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>569</width>\r\n    <height>220</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Form</string>\r\n  </property>\r\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_3\">\r\n   <item>\r\n    <widget class=\"QGroupBox\" name=\"groupBox\">\r\n     <property name=\"title\">\r\n      <string>Format Options</string>\r\n     </property>\r\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\r\n      <item>\r\n       <widget class=\"QCheckBox\" name=\"checkBoxUseGoimports\">\r\n        <property name=\"toolTip\">\r\n         <string>Goimports updates your Go import lines, adding missing ones and removing unreferenced ones.</string>\r\n        </property>\r\n        <property name=\"text\">\r\n         <string>Enable update imports line, adding missing ones and removing unreferenced ones.</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item>\r\n       <widget class=\"QCheckBox\" name=\"checkBoxAutoFmt\">\r\n        <property name=\"text\">\r\n         <string>Automatically format code when saving</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n     </layout>\r\n    </widget>\r\n   </item>\r\n   <item>\r\n    <widget class=\"QGroupBox\" name=\"groupBox_2\">\r\n     <property name=\"title\">\r\n      <string>Synchronous</string>\r\n     </property>\r\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\r\n      <item>\r\n       <widget class=\"QCheckBox\" name=\"enableSyncCheckBox\">\r\n        <property name=\"text\">\r\n         <string>Synchronous code formatting</string>\r\n        </property>\r\n       </widget>\r\n      </item>\r\n      <item>\r\n       <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\r\n        <item>\r\n         <widget class=\"QLabel\" name=\"label\">\r\n          <property name=\"text\">\r\n           <string>Synchronous code formatting timeout in milliseconds (500ms or more):</string>\r\n          </property>\r\n         </widget>\r\n        </item>\r\n        <item>\r\n         <widget class=\"QLineEdit\" name=\"syncTimeoutLineEdit\">\r\n          <property name=\"sizePolicy\">\r\n           <sizepolicy hsizetype=\"Preferred\" vsizetype=\"Fixed\">\r\n            <horstretch>0</horstretch>\r\n            <verstretch>0</verstretch>\r\n           </sizepolicy>\r\n          </property>\r\n         </widget>\r\n        </item>\r\n       </layout>\r\n      </item>\r\n      <item>\r\n       <spacer name=\"verticalSpacer\">\r\n        <property name=\"orientation\">\r\n         <enum>Qt::Vertical</enum>\r\n        </property>\r\n        <property name=\"sizeHint\" stdset=\"0\">\r\n         <size>\r\n          <width>20</width>\r\n          <height>40</height>\r\n         </size>\r\n        </property>\r\n       </spacer>\r\n      </item>\r\n     </layout>\r\n    </widget>\r\n   </item>\r\n  </layout>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangfmt/golangfmtoptionfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangfmtoptionfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangfmtoption.h\"\n#include \"golangfmtoptionfactory.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangFmtOptionFactory::GolangFmtOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n}\n\nQStringList GolangFmtOptionFactory::mimeTypes() const\n{\n    return QStringList() << \"option/golangfmt\";\n}\n\nLiteApi::IOption *GolangFmtOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == \"option/golangfmt\") {\n        return new GolangFmtOption(m_liteApp,this);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangfmt/golangfmtoptionfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangfmtoptionfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGFMTOPTIONFACTORY_H\n#define GOLANGFMTOPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass GolangFmtOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n    GolangFmtOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // GOLANGFMTOPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangfmt/golangfmtplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangfmtplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangfmtplugin.h\"\n#include \"golangfmt.h\"\n#include \"golangfmtoptionfactory.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n#include \"fileutil/fileutil.h\"\n\n#include <QMenu>\n#include <QAction>\n#include <QToolButton>\n#include <QFileInfo>\n#include <QDir>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangFmtPlugin::GolangFmtPlugin()\n    : m_fmt(0)\n{\n}\n\nbool GolangFmtPlugin::load(LiteApi::IApplication *app)\n{\n    m_liteApp = app;\n\n    app->optionManager()->addFactory(new GolangFmtOptionFactory(app,this));\n\n    m_fmt = new GolangFmt(app,this);\n    m_gofmtAct = new QAction(QIcon(\"icon:golangfmt/images/gofmt.png\"),tr(\"Format Code\"),this);\n    m_goimportsAct = new QAction(QIcon(\"icon:golangfmt/images/gofmt.png\"),tr(\"Format Code (Adjusts Imports)\"),this);\n\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(this,\"GoFmt\");\n\n    actionContext->regAction(m_gofmtAct,\"Gofmt\",\"Ctrl+I\");\n    actionContext->regAction(m_goimportsAct,\"GoImports\",\"Ctrl+Alt+I\");\n\n    m_goplayAct = new QAction(QIcon(\"icon:golangfmt/images/gofmt.png\"),tr(\"Format Code\"),this);\n    actionContext->regAction(m_goplayAct,\"Goplayfmt\",\"Ctrl+I\");\n\n    connect(m_gofmtAct,SIGNAL(triggered()),m_fmt,SLOT(gofmt()));\n    connect(m_goimportsAct,SIGNAL(triggered()),m_fmt,SLOT(goimports()));\n    connect(m_goplayAct,SIGNAL(triggered()),this,SLOT(goplayFmt()));\n\n    connect(app->editorManager(),SIGNAL(editorCreated(LiteApi::IEditor*)),this,SLOT(editorCreated(LiteApi::IEditor*)));\n    connect(app,SIGNAL(loaded()),this,SLOT(appLoaded()));\n\n    return true;\n}\n\nQStringList GolangFmtPlugin::dependPluginList() const{\n    return QStringList() << \"plugin/liteenv\";\n}\n\nvoid GolangFmtPlugin::goplayFmt()\n{\n    m_fmt->syncfmtEditor(m_playEditor,false,false,2000);\n    /*\n    QPlainTextEdit* ed=LiteApi::getPlainTextEdit(m_playEditor);\n    ed->document()->setModified(false);\n    m_fmt->fmtEditor(m_playEditor,false);\n    */\n}\n\nvoid GolangFmtPlugin::appLoaded()\n{\n    m_playEditor = LiteApi::findExtensionObject<LiteApi::IEditor*>(m_liteApp->extension(),\"LiteApi.Goplay.IEditor\");\n    if (m_playEditor) {\n        if (m_playEditor->mimeType() != \"text/x-gosrc\") {\n            return;\n        }\n        m_playEditor->widget()->addAction(m_goplayAct);\n        QMenu *menu = LiteApi::getContextMenu(m_playEditor);\n        if (menu) {\n            menu->addSeparator();\n            menu->addAction(m_goplayAct);            \n        }\n        LiteApi::ILiteEditor *ed = LiteApi::getLiteEditor(m_playEditor);\n        if (ed) {\n            ed->setEnableAutoIndentAction(false);\n        }\n    }\n}\n\nvoid GolangFmtPlugin::editorCreated(LiteApi::IEditor *editor)\n{\n    if (!editor) {\n        return;\n    }\n    if (editor->mimeType() != \"text/x-gosrc\") {\n        return;\n    }\n    QMenu *menu = LiteApi::getEditMenu(editor);\n    if (menu) {\n        menu->addSeparator();\n        menu->addAction(m_gofmtAct);\n        menu->addAction(m_goimportsAct);\n    }\n    menu = LiteApi::getContextMenu(editor);\n    if (menu) {\n        menu->addSeparator();\n        menu->addAction(m_gofmtAct);\n        menu->addAction(m_goimportsAct);\n    }\n    LiteApi::ILiteEditor *ed = LiteApi::getLiteEditor(editor);\n    if (ed) {\n        ed->setEnableAutoIndentAction(false);\n    }\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/golangfmt/golangfmtplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangfmtplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGFMTPLUGIN_H\n#define GOLANGFMTPLUGIN_H\n\n#include \"golangfmt_global.h\"\n#include \"liteapi/liteapi.h\"\n#include <QtPlugin>\n\nclass GolangFmt;\nclass QToolButton;\nclass GolangFmtPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    GolangFmtPlugin();\n    virtual bool load(LiteApi::IApplication *app);\n    virtual QStringList dependPluginList() const;\nprotected slots:\n    void editorCreated(LiteApi::IEditor*);\n    void appLoaded();\n    void goplayFmt();\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QAction   *m_gofmtAct;\n    QAction   *m_goimportsAct;\n    QAction   *m_goplayAct;\n    LiteApi::IEditor *m_playEditor;\n    QToolButton *m_fmtBtn;\n    GolangFmt *m_fmt;\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<GolangFmtPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.GolangFmtPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/golangfmt\");\n        m_info->setName(\"GolangFmt\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setVer(\"X33.1\");\n        m_info->setInfo(\"Golang Format Support\");\n        m_info->appendDepend(\"plugin/liteenv\");\n    }\n};\n\n#endif // GOLANGFMTPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/golanglint/golanglint.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2014 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golanglint.cpp\n// Creator: Hai Thanh Nguyen <phaikawl@gmail.com>\n\n#include \"golanglint.h\"\n#include \"golanglint_global.h\"\n#include \"fileutil/fileutil.h\"\n#include \"processex/processex.h\"\n#include \"litebuildapi/litebuildapi.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n\n#include <QDebug>\n#include <QProcess>\n#include <QFileInfo>\n#include <QPlainTextEdit>\n#include <QTextCodec>\n#include <QTextCursor>\n#include <QTextBlock>\n#include <QScrollBar>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nGolangLint::GolangLint(LiteApi::IApplication *app,QObject *parent) :\n    QObject(parent),\n    m_liteApp(app),\n    m_autolint(false),\n    m_synclint(false),\n    m_timeout(600),\n    m_confidence(50)\n{\n    m_process = new ProcessEx(this);\n    connect(m_process,SIGNAL(extOutput(QByteArray,bool)),this,SLOT(lintOutput(QByteArray,bool)));\n    connect(m_process,SIGNAL(started()),this,SLOT(started()));\n    connect(m_process,SIGNAL(extFinish(bool,int,QString)),this,SLOT(lintFinish(bool,int,QString)));\n\n    m_envManager = LiteApi::findExtensionObject<LiteApi::IEnvManager*>(m_liteApp,\"LiteApi.IEnvManager\");\n\n    if (m_envManager) {\n        connect(m_envManager,SIGNAL(currentEnvChanged(LiteApi::IEnv*)),this,SLOT(currentEnvChanged(LiteApi::IEnv*)));\n        currentEnvChanged(m_envManager->currentEnv());\n    }\n    connect(m_liteApp->editorManager(),SIGNAL(editorAboutToSave(LiteApi::IEditor*)),this,SLOT(editorAboutToSave(LiteApi::IEditor*)));\n    connect(m_liteApp->optionManager(),SIGNAL(applyOption(QString)),this,SLOT(applyOption(QString)));\n    applyOption(\"option/golanglint\");\n}\n\nvoid GolangLint::applyOption(QString id)\n{\n    if (id != \"option/golanglint\") {\n        return;\n    }\n\n    m_autolint = m_liteApp->settings()->value(GOLANGLINT_AUTOLINT,false).toBool();\n    m_confidence = m_liteApp->settings()->value(GOLANGLINT_CONFIDENCE,0).toInt();\n    m_synclint = true;\n    m_timeout = m_liteApp->settings()->value(GOLANGLINT_SYNCTIMEOUT,500).toInt();\n}\n\nvoid GolangLint::syncLintEditor(LiteApi::IEditor *editor, bool save, bool check, int timeout)\n{\n    LiteApi::ITextEditor *textEditor = LiteApi::getTextEditor(editor);\n    if (!textEditor) {\n        return;\n    }\n    QString fileName = editor->filePath();\n    if (fileName.isEmpty() && check) {\n        return;\n    }\n\n    QFileInfo info(fileName);\n    if (info.suffix() != \"go\" && check) {\n        return;\n    }\n\n    QPlainTextEdit *ed = LiteApi::findExtensionObject<QPlainTextEdit*>(editor,\"LiteApi.QPlainTextEdit\");\n    if (!ed) {\n        return;\n    }\n\n    QString text = ed->toPlainText();\n    if (text.isEmpty()) {\n        return;\n    }\n\n    QStringList args;\n    args << QString(\"-min_confidence=%1\").arg(m_confidence/100);\n    args << editor->filePath();\n\n    if (timeout < 0) {\n        timeout = m_timeout;\n    }\n\n    if (save) {\n        m_liteApp->editorManager()->saveEditor(editor,false);\n    }\n\n    QProcess process;\n    process.setEnvironment(LiteApi::getCurrentEnvironment(m_liteApp).toStringList());\n    process.start(m_golintCmd,args);\n\n    if (!process.waitForStarted(timeout)) {\n        // m_liteApp->appendLog(\"golint\",QString(\"Timed out after %1ms when starting go code format\").arg(timeout),false);\n        return;\n    }\n    if (!process.waitForFinished(timeout)) {\n        // m_liteApp->appendLog(\"golint\",QString(\"Timed out after %1ms while running go code format\").arg(timeout),false);\n        return;\n    }\n    LiteApi::ILiteEditor *liteEditor = LiteApi::getLiteEditor(editor);\n    liteEditor->clearAllNavigateMark(LiteApi::EditorNavigateBad, GOLANGLINT_TAG);\n    QTextCodec *codec = QTextCodec::codecForName(\"utf-8\");\n    QByteArray error = process.readAllStandardOutput();\n    QString errmsg = codec->toUnicode(error);\n    if (!errmsg.isEmpty()) {\n        //<standard input>:23:1: expected declaration, found 'INT' 1\n        foreach(QString msg,errmsg.split(\"\\n\")) {\n            QRegExp re(\":(\\\\d+):\\\\d+:\");\n            int idx = re.indexIn(msg);\n            if (idx >= 0) {\n                bool ok = false;\n                int line = re.cap(1).toInt(&ok);\n                if (ok) {\n                    liteEditor->insertNavigateMark(line-1,LiteApi::EditorNavigateWarning,msg.mid(idx+re.matchedLength()), GOLANGLINT_TAG);\n                }\n            }\n        }\n\n        liteEditor->setNavigateHead(LiteApi::EditorNavigateNormal,\"go code lint output\\n\"+errmsg);\n        m_liteApp->appendLog(\"go lint suggestions: \",errmsg,false);\n        return;\n    }\n}\n\nvoid GolangLint::lintEditor(LiteApi::IEditor *editor, bool)\n{\n    if (!editor) {\n        return;\n    }\n    if (editor->filePath().isEmpty()) {\n        return;\n    }\n    QFileInfo info(editor->filePath());\n    if (info.suffix() != \"go\") {\n        return;\n    }\n    if (m_golintCmd.isEmpty()) {\n        return;\n    }\n    if (m_process->isRunning()) {\n        return;\n    }\n    QPlainTextEdit *edit = LiteApi::getPlainTextEdit(editor);\n    if (!edit) {\n        return;\n    }\n    QStringList args;\n    args << QString(\"-min_confidence=%1\").arg(m_confidence/100);\n    args << editor->filePath();\n    m_data.clear();;\n    m_errData.clear();\n    m_process->start(m_golintCmd,args);\n}\n\nvoid GolangLint::editorAboutToSave(LiteApi::IEditor* editor)\n{\n    if (!m_autolint) {\n        return;\n    }\n    if (m_synclint) {\n        syncLintEditor(editor,true);\n    } else {\n        lintEditor(editor,true);\n    }\n}\n\nvoid GolangLint::currentEnvChanged(LiteApi::IEnv*)\n{\n    QProcessEnvironment env = m_envManager->currentEnvironment();\n\n    m_golintCmd = FileUtil::lookupGoBin(\"golint\",m_liteApp,false);\n\n    if (m_golintCmd.isEmpty()) {\n        m_liteApp->appendLog(\"GolangLint\",QString(\"Could not find %1\").arg(m_golintCmd),false);\n    } else {\n        m_liteApp->appendLog(\"GolangLint\",QString(\"Found %1\").arg(m_golintCmd),false);\n    }\n    m_process->setProcessEnvironment(env);\n}\n\nvoid GolangLint::golint()\n{\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n    if (!editor) {\n        return;\n    }\n    m_liteApp->editorManager()->saveEditor(editor,false);\n    syncLintEditor(editor,false,true,-1);\n}\n\nvoid GolangLint::started()\n{\n    // QString text = m_process->userData(1).toString();\n    // m_process->write(text.toUtf8());\n    // m_process->closeWriteChannel();\n}\n\nvoid GolangLint::lintOutput(QByteArray data,bool)\n{\n    m_errData.append(data);\n    m_data.append(data);\n}\n\nvoid GolangLint::lintFinish(bool error,int code,QString)\n{\n    QString fileName = m_process->userData(0).toString();\n    if (fileName.isEmpty()) {\n        return;\n    }\n    bool save = m_process->userData(2).toBool();\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->findEditor(fileName,true);\n    if (!editor) {\n        return;\n    }\n    LiteApi::ILiteEditor *liteEditor = LiteApi::getLiteEditor(editor);\n    if (!liteEditor) {\n        return;\n    }\n    QPlainTextEdit *ed = LiteApi::getPlainTextEdit(editor);\n    if (!ed) {\n        return;\n    }\n\n    if (ed->document()->isModified()) {\n        return;\n    }\n\n    QTextCodec *codec = QTextCodec::codecForName(\"utf-8\");\n    if (!error && code == 0) {\n        liteEditor->setNavigateHead(LiteApi::EditorNavigateNormal,\"go code lint success\");\n\n        if (save) {\n            m_liteApp->editorManager()->saveEditor(editor,false);\n        }\n    } else if (!m_errData.isEmpty()) {\n        QString errmsg = codec->toUnicode(m_errData);\n\n        if (!errmsg.isEmpty()) {\n            //<standard input>:23:1: expected declaration, found 'INT' 1\n            foreach(QString msg,errmsg.split(\"\\n\")) {\n                QRegExp re(\":(\\\\d+):\");\n                if (re.indexIn(msg,16) >= 0) {\n                    bool ok = false;\n                    int line = re.cap(1).toInt(&ok);\n                    if (ok) {\n                        liteEditor->insertNavigateMark(line-1,LiteApi::EditorNavigateWarning,msg.mid(16),GOLANGLINT_TAG);\n                    }\n                }\n            }\n        }\n        QString log = errmsg;\n    }\n    m_data.clear();\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golanglint/golanglint.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2014 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golanglint.cpp\n// Creator: Hai Thanh Nguyen <phaikawl@gmail.com>\n\n#ifndef GOLANGLINT_H\n#define GOLANGLINT_H\n\n#include <QObject>\n#include <QTextCursor>\n\n#include \"liteapi/liteapi.h\"\n#include \"liteenvapi/liteenvapi.h\"\n\nclass ProcessEx;\nclass GolangLint : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit GolangLint(LiteApi::IApplication *app,QObject *parent = 0);\npublic slots:\n    void started();\n    void golint();\n    void currentEnvChanged(LiteApi::IEnv*);\n    void lintOutput(QByteArray,bool);\n    void lintFinish(bool,int,QString);\n    void editorAboutToSave(LiteApi::IEditor*);\n    void applyOption(QString);\n    void lintEditor(LiteApi::IEditor*,bool);\n    void syncLintEditor(LiteApi::IEditor *, bool save, bool check = true, int timeout = -1);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    ProcessEx *m_process;\n    LiteApi::IEnvManager *m_envManager;\n    QString m_golintCmd;\n    QByteArray m_data;\n    QByteArray m_errData;\n\n    bool m_autolint;\n    bool m_synclint;\n    int  m_timeout;\n    int  m_confidence;\n};\n\n#endif // GOLANGLINT_H\n"
  },
  {
    "path": "liteidex/src/plugins/golanglint/golanglint.pro",
    "content": "TARGET = golanglint\nTEMPLATE = lib\n\ninclude (../../liteideplugin.pri)\ninclude (../../api/liteenvapi/liteenvapi.pri)\ninclude (../../utils/fileutil/fileutil.pri)\ninclude (../../utils/processex/processex.pri)\n\nDEFINES += GOLANGFMT_LIBRARY\n\nSOURCES += golanglintplugin.cpp \\\n    golanglint.cpp \\\n    golanglintoptionfactory.cpp \\\n    golanglintoption.cpp\n\nHEADERS += golanglintplugin.h\\\n        golanglint_global.h \\\n    golanglint.h \\\n    golanglintoptionfactory.h \\\n    golanglintoption.h\n\nRESOURCES += \\\n    golanglint.qrc\n\nFORMS += \\\n    golanglintoption.ui\n"
  },
  {
    "path": "liteidex/src/plugins/golanglint/golanglint.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/golanglint\"/>\n</RCC>\n"
  },
  {
    "path": "liteidex/src/plugins/golanglint/golanglint_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2014 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golanglint.cpp\n// Creator: Hai Thanh Nguyen <phaikawl@gmail.com>\n\n#ifndef GOLANGLINT_GLOBAL_H\n#define GOLANGLINT_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(GOLANGLINT_LIBRARY)\n#  define GOLANGLINTSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define GOLANGLINTSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#define GOLANGLINT_CONFIDENCE \"golanglint/confidence\"\n#define GOLANGLINT_AUTOLINT \"golanglint/confidence\"\n#define GOLANGLINT_SYNCTIMEOUT \"golanglint/synctimeout\"\n#define GOLANGLINT_TAG \"golanglint/navigatetag\"\n\n#endif // GOLANGLINT_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/golanglint/golanglintoption.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2014 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golanglintoption.cpp\n// Creator: Hai Thanh Nguyen <phaikawl@gmail.com>\n\n#include \"golanglintoption.h\"\n#include \"golanglint_global.h\"\n#include \"ui_golanglintoption.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangLintOption::GolangLintOption(LiteApi::IApplication *app,QObject *parent) :\n    LiteApi::IOption(parent),\n    m_liteApp(app),\n    m_widget(new QWidget),\n    ui(new Ui::GolangLintOption)\n{\n    ui->setupUi(m_widget);\n\n    int confidence = m_liteApp->settings()->value(GOLANGLINT_CONFIDENCE,0).toInt();\n    int timeout = m_liteApp->settings()->value(GOLANGLINT_SYNCTIMEOUT,500).toInt();\n    bool autolint = m_liteApp->settings()->value(GOLANGLINT_AUTOLINT,false).toBool();\n\n    ui->checkBoxAutoLint->setChecked(autolint);\n    ui->syncTimeoutLineEdit->setText(QString(\"%1\").arg(timeout));\n    ui->lintConfidenceValLabel->setText(QString(\"%1\").arg((float)confidence/10));\n    ui->confidenceSlider->setValue(confidence);\n    connect(ui->confidenceSlider, SIGNAL(valueChanged(int)), this, SLOT(on_confidenceSlider_valueChanged(int)));\n}\n\nGolangLintOption::~GolangLintOption()\n{\n    delete m_widget;\n    delete ui;\n}\n\nQWidget *GolangLintOption::widget()\n{\n    return m_widget;\n}\n\nQString GolangLintOption::name() const\n{\n    return \"GolangLint\";\n}\n\nQString GolangLintOption::mimeType() const\n{\n    return \"option/golanglint\";\n}\n\nvoid GolangLintOption::apply()\n{\n    bool autolint = ui->checkBoxAutoLint->isChecked();\n    int confidence = ui->confidenceSlider->value();\n    m_liteApp->settings()->setValue(GOLANGLINT_AUTOLINT,autolint);\n    m_liteApp->settings()->setValue(GOLANGLINT_CONFIDENCE,confidence);\n    int timeout = ui->syncTimeoutLineEdit->text().toInt();\n    if (timeout < 500) {\n        timeout = 500;\n    }\n    ui->syncTimeoutLineEdit->setText(QString(\"%1\").arg(timeout));\n    m_liteApp->settings()->setValue(GOLANGLINT_SYNCTIMEOUT,timeout);\n}\n\nvoid GolangLintOption::on_confidenceSlider_valueChanged(int value)\n{\n    ui->lintConfidenceValLabel->setText(QString(\"%1\").arg((float)value/10));\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golanglint/golanglintoption.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2014 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golanglintoption.h\n// Creator: Hai Thanh Nguyen <phaikawl@gmail.com>\n\n#ifndef GOLANGLINTOPTION_H\n#define GOLANGLINTOPTION_H\n\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class GolangLintOption;\n}\n\nclass GolangLintOption : public LiteApi::IOption\n{\n    Q_OBJECT\n\npublic:\n    explicit GolangLintOption(LiteApi::IApplication *app, QObject *parent = 0);\n    ~GolangLintOption();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void apply();\nprivate slots:\n    void on_confidenceSlider_valueChanged(int value);\n\nprivate:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget           *m_widget;\n    Ui::GolangLintOption *ui;\n};\n\n#endif // GOLANGLINTOPTION_H\n"
  },
  {
    "path": "liteidex/src/plugins/golanglint/golanglintoption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>GolangLintOption</class>\n <widget class=\"QWidget\" name=\"GolangLintOption\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>503</width>\n    <height>176</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_3\">\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox\">\n     <property name=\"title\">\n      <string>Lint Options</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n      <item>\n       <widget class=\"QCheckBox\" name=\"checkBoxAutoLint\">\n        <property name=\"text\">\n         <string>Automatically lint code when saving</string>\n        </property>\n        <property name=\"checked\">\n         <bool>true</bool>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\">\n        <item>\n         <widget class=\"QLabel\" name=\"lintConfidenceLabel\">\n          <property name=\"text\">\n           <string>Minimum confidence</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <widget class=\"QSlider\" name=\"confidenceSlider\">\n          <property name=\"maximum\">\n           <number>10</number>\n          </property>\n          <property name=\"singleStep\">\n           <number>1</number>\n          </property>\n          <property name=\"pageStep\">\n           <number>2</number>\n          </property>\n          <property name=\"value\">\n           <number>8</number>\n          </property>\n          <property name=\"sliderPosition\">\n           <number>8</number>\n          </property>\n          <property name=\"tracking\">\n           <bool>true</bool>\n          </property>\n          <property name=\"orientation\">\n           <enum>Qt::Horizontal</enum>\n          </property>\n          <property name=\"invertedAppearance\">\n           <bool>false</bool>\n          </property>\n          <property name=\"invertedControls\">\n           <bool>false</bool>\n          </property>\n          <property name=\"tickPosition\">\n           <enum>QSlider::NoTicks</enum>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <spacer name=\"horizontalSpacer\">\n          <property name=\"orientation\">\n           <enum>Qt::Horizontal</enum>\n          </property>\n          <property name=\"sizeType\">\n           <enum>QSizePolicy::Preferred</enum>\n          </property>\n          <property name=\"sizeHint\" stdset=\"0\">\n           <size>\n            <width>10</width>\n            <height>20</height>\n           </size>\n          </property>\n         </spacer>\n        </item>\n        <item>\n         <widget class=\"QLabel\" name=\"lintConfidenceValLabel\">\n          <property name=\"text\">\n           <string>0.8</string>\n          </property>\n         </widget>\n        </item>\n       </layout>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox_2\">\n     <property name=\"title\">\n      <string>Synchronous</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n      <item>\n       <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n        <item>\n         <widget class=\"QLabel\" name=\"label\">\n          <property name=\"text\">\n           <string>Code linting timeout in milliseconds (500ms or more):</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <widget class=\"QLineEdit\" name=\"syncTimeoutLineEdit\">\n          <property name=\"sizePolicy\">\n           <sizepolicy hsizetype=\"Preferred\" vsizetype=\"Fixed\">\n            <horstretch>0</horstretch>\n            <verstretch>0</verstretch>\n           </sizepolicy>\n          </property>\n         </widget>\n        </item>\n       </layout>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <spacer name=\"verticalSpacer\">\n     <property name=\"orientation\">\n      <enum>Qt::Vertical</enum>\n     </property>\n     <property name=\"sizeHint\" stdset=\"0\">\n      <size>\n       <width>20</width>\n       <height>40</height>\n      </size>\n     </property>\n    </spacer>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/golanglint/golanglintoptionfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2014 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golanglintoptionfactory.cpp\n// Creator: Hai Thanh Nguyen <phaikawl@gmail.com>\n\n#include \"golanglintoption.h\"\n#include \"golanglintoptionfactory.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangLintOptionFactory::GolangLintOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n}\n\nQStringList GolangLintOptionFactory::mimeTypes() const\n{\n    return QStringList() << \"option/golanglint\";\n}\n\nLiteApi::IOption *GolangLintOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == \"option/golanglint\") {\n        return new GolangLintOption(m_liteApp,this);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golanglint/golanglintoptionfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2014 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golanglintoptionfactory.h\n// Creator: Hai Thanh Nguyen <phaikawl@gmail.com>\n\n#ifndef GOLANGLINTOPTIONFACTORY_H\n#define GOLANGLINTOPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass GolangLintOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n    GolangLintOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // GOLANGLINTOPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/golanglint/golanglintplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2014 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golanglint.cpp\n// Creator: Hai Thanh Nguyen <phaikawl@gmail.com>\n\n#include \"golanglintplugin.h\"\n#include \"golanglint.h\"\n#include \"fileutil/fileutil.h\"\n#include \"golanglintoptionfactory.h\"\n\n#include <QMenu>\n#include <QAction>\n#include <QToolButton>\n#include <QFileInfo>\n#include <QDir>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangLintPlugin::GolangLintPlugin()\n    : m_lint(0)\n{\n}\n\nbool GolangLintPlugin::load(LiteApi::IApplication *app)\n{\n    m_liteApp = app;\n\n    app->optionManager()->addFactory(new GolangLintOptionFactory(app,this));\n\n    m_lint = new GolangLint(app,this);\n    m_golintAct = new QAction(QIcon(\"icon:golanglint/images/golint.png\"),tr(\"Lint Code\"),this);\n\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(this,\"GoLint\");\n\n    actionContext->regAction(m_golintAct,\"GoLint\",\"Ctrl+Shift+F7\");\n\n    m_goplayAct = new QAction(QIcon(\"icon:golanglint/images/golint.png\"),tr(\"Lint Code\"),this);\n    actionContext->regAction(m_goplayAct,\"GoplayLint\",\"Ctrl+Shift+F7\");\n\n    connect(m_golintAct,SIGNAL(triggered()),m_lint,SLOT(golint()));\n    connect(m_goplayAct,SIGNAL(triggered()),this,SLOT(goplayLint()));\n\n    connect(app->editorManager(),SIGNAL(editorCreated(LiteApi::IEditor*)),this,SLOT(editorCreated(LiteApi::IEditor*)));\n    connect(app,SIGNAL(loaded()),this,SLOT(appLoaded()));\n\n    return true;\n}\n\nQStringList GolangLintPlugin::dependPluginList() const{\n    return QStringList() << \"plugin/liteenv\";\n}\n\nvoid GolangLintPlugin::goplayLint()\n{\n    m_lint->syncLintEditor(m_playEditor,false,false,2000);\n    /*\n    QPlainTextEdit* ed=LiteApi::getPlainTextEdit(m_playEditor);\n    ed->document()->setModified(false);\n    m_lint->lintEditor(m_playEditor,false);\n    */\n}\n\nvoid GolangLintPlugin::appLoaded()\n{\n    m_playEditor = LiteApi::findExtensionObject<LiteApi::IEditor*>(m_liteApp->extension(),\"LiteApi.Goplay.IEditor\");\n    if (m_playEditor) {\n        if (m_playEditor->mimeType() != \"text/x-gosrc\") {\n            return;\n        }\n        m_playEditor->widget()->addAction(m_goplayAct);\n        QMenu *menu = LiteApi::getContextMenu(m_playEditor);\n        if (menu) {\n            menu->addSeparator();\n            menu->addAction(m_goplayAct);            \n        }\n    }\n}\n\nvoid GolangLintPlugin::editorCreated(LiteApi::IEditor *editor)\n{\n    if (!editor) {\n        return;\n    }\n    if (editor->mimeType() != \"text/x-gosrc\") {\n        return;\n    }\n    QMenu *menu = LiteApi::getEditMenu(editor);\n    if (menu) {\n        menu->addSeparator();\n        menu->addAction(m_golintAct);\n    }\n    menu = LiteApi::getContextMenu(editor);\n    if (menu) {\n        menu->addSeparator();\n        menu->addAction(m_golintAct);\n    }\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/golanglint/golanglintplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2014 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golanglint.cpp\n// Creator: Hai Thanh Nguyen <phaikawl@gmail.com>\n\n#ifndef GOLANGLINTPLUGIN_H\n#define GOLANGLINTPLUGIN_H\n\n#include \"golanglint_global.h\"\n#include \"liteapi/liteapi.h\"\n#include <QtPlugin>\n\nclass GolangLint;\nclass QToolButton;\nclass GolangLintPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    GolangLintPlugin();\n    virtual bool load(LiteApi::IApplication *app);\n    virtual QStringList dependPluginList() const;\nprotected slots:\n    void editorCreated(LiteApi::IEditor*);\n    void appLoaded();\n    void goplayLint();\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QAction   *m_golintAct;\n    QAction   *m_goplayAct;\n    LiteApi::IEditor *m_playEditor;\n    QToolButton *m_lintBtn;\n    GolangLint *m_lint;\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<GolangLintPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.GolangLintPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/golanglint\");\n        m_info->setName(\"GolangLint\");\n        m_info->setAuthor(\"Hai Thanh Nguyen\");\n        m_info->setVer(\"0.1\");\n        m_info->setInfo(\"Golang Golint Util\");\n    }\n};\n\n\n#endif // GOLANGLINTPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/filepathmodel.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filepathmodel.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"filepathmodel.h\"\n#include \"liteapi/liteqt.h\"\n#include <QFileInfo>\n#include <QDir>\n#include <QIcon>\n#include <QFont>\n#include <QFileIconProvider>\n#include <QFileSystemWatcher>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nPathNode::PathNode(FilePathModel *model) :\n    m_model(model),\n    m_parent(0),\n    m_children(0)\n{\n\n}\n\nPathNode::PathNode(FilePathModel *model, const QString &path, PathNode *parent) :\n    m_model(model),\n    m_parent(parent),\n    m_children(0),\n    m_path(path)\n{\n    QFileInfo info(path);\n    if (parent && parent->parent() == 0) {\n        m_text = info.filePath();\n    } else {\n        m_text = info.fileName();\n    }\n    if (info.isDir() && !m_path.isEmpty()) {\n        m_model->fileWatcher()->addPath(m_path);\n    }\n}\n\nPathNode::~PathNode()\n{\n    if (this->isDir() && !m_path.isEmpty())  {\n        m_model->fileWatcher()->removePath(m_path);\n    }\n    if (m_children) {\n        qDeleteAll(m_children->begin(),m_children->end());\n        delete m_children;\n    }\n}\n\nQList<PathNode*>* PathNode::children()\n{\n    if (m_children == 0) {\n        m_children = new QList<PathNode*>();\n        if (!m_path.isEmpty()) {\n            QFileInfo info(m_path);\n            if (info.isDir()) {\n                QDir dir(m_path);\n                foreach(QFileInfo childInfo, dir.entryInfoList(this->m_model->filter(),this->m_model->sort())) {\n                    m_children->append(new PathNode(this->m_model,childInfo.filePath(),this));\n                }\n            }\n        }\n    }\n    return m_children;\n}\n\nPathNode* PathNode::parent()\n{\n    return m_parent;\n}\n\nPathNode* PathNode::child(int row)\n{\n    return children()->at(row);\n}\n\nint PathNode::childCount()\n{\n    return children()->count();\n}\n\nint PathNode::row() const\n{\n    if (m_parent) {\n        return m_parent->children()->indexOf(const_cast<PathNode*>(this));\n    }\n    return 0;\n}\n\nQString PathNode::path() const\n{\n    return m_path;\n}\n\nQString PathNode::text() const\n{\n    return m_text;\n}\n\nbool PathNode::isDir() const\n{\n    return QFileInfo(m_path).isDir();\n}\n\nbool PathNode::isFile() const\n{\n    return QFileInfo(m_path).isFile();\n}\n\nQFileInfo PathNode::fileInfo() const\n{\n    return QFileInfo(m_path);\n}\n\nvoid PathNode::clear()\n{\n    if (m_children) {\n        qDeleteAll(m_children->begin(),m_children->end());\n        m_children->clear();\n    }\n}\n\nvoid PathNode::reload()\n{\n    clear();\n    if (m_children == 0) {\n        m_children = new QList<PathNode*>();\n    }\n    if (!m_path.isEmpty()) {\n        QFileInfo info(m_path);\n        if (info.isDir()) {\n            QDir dir(m_path);\n            foreach(QFileInfo childInfo, dir.entryInfoList(this->m_model->filter(),this->m_model->sort())) {\n                m_children->append(new PathNode(this->m_model,childInfo.filePath(),this));\n            }\n        }\n    }\n}\n\nPathNode *PathNode::findPath(const QString &path)\n{\n    if (!path.startsWith(m_path)) {\n        return 0;\n    }\n    if (path == m_path) {\n        return this;\n    }\n    QStringList nameList = path.right(path.length()-m_path.length()).split(\"/\",qtSkipEmptyParts);\n    PathNode *parent = this;\n    bool find = false;\n    foreach (QString name,nameList) {\n        find = false;\n        QList<PathNode*>* chilren = parent->children();\n        for (int i = 0; i < chilren->count(); i++) {\n            PathNode *node = chilren->at(i);\n            if (!node->isDir()) {\n                continue;\n            }\n            if (node->m_text == name) {\n                parent = node;\n                find = true;\n                break;\n            }\n        }\n        if (!find) {\n            return 0;\n        }\n    }\n    return parent;\n}\n\n\nFilePathModel::FilePathModel(QObject *parent) :\n    QAbstractItemModel(parent),\n    m_rootNode(new PathNode(this)),\n    m_iconProvider(new QFileIconProvider),\n    m_fileWatcher(new QFileSystemWatcher(this))\n{\n    m_filters = QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot;\n    m_sorts = QDir::DirsFirst | QDir::Name | QDir::Type;\n    connect(m_fileWatcher,SIGNAL(directoryChanged(QString)),this,SLOT(directoryChanged(QString)));\n}\n\nFilePathModel::~FilePathModel()\n{\n    delete m_rootNode;\n    delete m_iconProvider;\n}\n\nvoid FilePathModel::directoryChanged(const QString &path)\n{\n    foreach(QModelIndex index,this->findPaths(path)) {\n        PathNode *node = nodeFromIndex(index);\n        this->beginRemoveRows(index,0,this->rowCount(index)-1);\n        node->reload();\n        this->endRemoveRows();\n    }\n}\n\nPathNode *FilePathModel::nodeFromIndex(const QModelIndex &index) const\n{\n    if (index.isValid()) {\n        return static_cast<PathNode*>(index.internalPointer());\n    }\n    return m_rootNode;\n}\n\nvoid FilePathModel::setStartIndex(const QModelIndex &index)\n{\n    m_startPath = filePath(index);\n}\n\nvoid FilePathModel::setStartPath(const QString &path)\n{\n    m_startPath = path;\n}\n\nQModelIndex FilePathModel::startIndex() const\n{\n    return findPath(m_startPath);\n}\n\nQString FilePathModel::startPath() const\n{\n    return m_startPath;\n}\n\nQString FilePathModel::filePath(const QModelIndex &index) const\n{\n    return nodeFromIndex(index)->path();\n}\n\nvoid FilePathModel::setFilter(QDir::Filters filters)\n{\n    if (m_filters != filters) {\n        m_filters = filters;\n        m_rootNode->reload();\n    }\n}\n\nvoid FilePathModel::setSort(QDir::SortFlags flags)\n{\n    if (m_sorts != flags) {\n        m_sorts = flags;\n        m_rootNode->reload();\n    }\n}\n\nQDir::Filters FilePathModel::filter() const\n{\n    return m_filters;\n}\n\nQDir::SortFlags FilePathModel::sort() const\n{\n    return m_sorts;\n}\n\nvoid FilePathModel::setRootPath(const QString &path)\n{\n    this->setRootPathList(QStringList() << path);\n    this->setStartPath(path);\n}\n\nvoid FilePathModel::setRootPathList(const QStringList &pathList)\n{\n    this->beginResetModel();\n    m_rootNode->clear();\n    m_pathList.clear();\n    foreach(QString path, pathList) {\n        QString spath = QDir::fromNativeSeparators(QDir::cleanPath(path));\n        m_pathList.append(spath);\n        m_rootNode->children()->append(new PathNode(this,spath,m_rootNode));\n    }\n\n    if (m_startPath.isEmpty() && !pathList.isEmpty()) {\n        m_startPath = pathList.first();\n    }\n\n    this->endResetModel();\n}\n\nQModelIndex FilePathModel::findPathHelper(const QString &path, const QModelIndex &parentIndex) const\n{\n    PathNode *node = nodeFromIndex(parentIndex);\n    if (!path.startsWith(node->path())) {\n        return QModelIndex();\n    }\n    if (path == node->path()) {\n        return parentIndex;\n    }\n    QStringList nameList = path.right(path.length()-node->path().length()).split(\"/\",qtSkipEmptyParts);\n    QModelIndex parent = parentIndex;\n    bool find = false;\n    int count = nameList.count();\n    for (int i = 0; i < count; i++) {\n        find = false;\n        for (int j = 0; j < this->rowCount(parent); j++) {\n            QModelIndex index = this->index(j,0,parent);\n            PathNode *node = nodeFromIndex(index);\n            if ( ( (i == count-1) || node->isDir()) && node->text() == nameList.at(i)) {\n                parent = index;\n                find = true;\n                break;\n            }\n        }\n        if (!find) {\n            return QModelIndex();\n        }\n    }\n    return parent;\n}\n\nQList<QModelIndex> FilePathModel::findPaths(const QString &path) const\n{\n    QList<QModelIndex> list;\n    QString cpath = QDir::fromNativeSeparators(QDir::cleanPath(path));\n    for (int i = 0; i < this->rowCount(); i++) {\n        QModelIndex find = findPathHelper(cpath,this->index(i,0));\n        if (find.isValid()) {\n            list.append(find);\n        }\n     }\n    return list;\n}\n\nQModelIndex FilePathModel::findPath(const QString &path) const\n{\n    QList<QModelIndex> list = this->findPaths(path);\n    if (!list.isEmpty()) {\n        return list.last();\n    }\n    return QModelIndex();\n}\n\nint FilePathModel::rowCount(const QModelIndex &parent) const\n{\n    PathNode *node = nodeFromIndex(parent);\n    return node->childCount();\n}\n\nint FilePathModel::columnCount(const QModelIndex&) const\n{\n    return 1;\n}\n\nQModelIndex FilePathModel::parent(const QModelIndex &child) const\n{\n    PathNode *node = nodeFromIndex(child);\n    PathNode *parent = node->parent();\n    if (parent == m_rootNode) {\n        return QModelIndex();\n    }\n    return createIndex(parent->row(),0,parent);\n}\n\nQModelIndex FilePathModel::index(int row, int column,const QModelIndex &parent) const\n{\n    if (!hasIndex(row,column,parent))\n        return QModelIndex();\n    PathNode *node = nodeFromIndex(parent);\n    return createIndex(row,column,node->child(row));\n}\n\nQVariant FilePathModel::data(const QModelIndex &index, int role) const\n{\n    PathNode *node = nodeFromIndex(index);\n    if (!node) {\n        return QVariant();\n    }\n    switch(role) {\n    case Qt::DisplayRole:\n        return node->text();\n    case Qt::DecorationRole:\n        return m_iconProvider->icon(node->fileInfo());\n    case Qt::FontRole: {\n        QFont font;\n        if (node->path() == m_startPath) {\n            font.setBold(true);\n        }\n        return font;\n    }\n    }\n    return QVariant();\n}\n\nQFileSystemWatcher* FilePathModel::fileWatcher() const\n{\n    return m_fileWatcher;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/filepathmodel.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filepathmodel.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FILEPATHMODEL_H\n#define FILEPATHMODEL_H\n\n#include <QAbstractItemModel>\n#include <QStringList>\n#include <QIcon>\n#include <QFileInfo>\n#include <QDir>\n\nclass FilePathModel;\nclass PathNode\n{\npublic:\n    PathNode(FilePathModel *model);\n    PathNode(FilePathModel *model,const QString &path, PathNode *parent);\n    ~PathNode();\n    PathNode* parent();\n    PathNode* child(int row);\n    int childCount();\n    int row() const;\n    QList<PathNode*>* children();\n    QString path() const;\n    QString text() const;\n    QFileInfo fileInfo() const;\n    bool isDir() const;\n    bool isFile() const;\n    void clear();\n    void reload();\n    PathNode *findPath(const QString &path);\nprotected:\n    FilePathModel *m_model;\n    PathNode *m_parent;\n    QList<PathNode*> *m_children;\n    QString m_path;\n    QString m_text;\n};\n\nclass QFileIconProvider;\nclass QFileSystemWatcher;\nclass QTreeView;\nclass FilePathModel : public QAbstractItemModel\n{\n    Q_OBJECT\npublic:\n    explicit FilePathModel(QObject *parent = 0);\n    ~FilePathModel();\n    void setFilter(QDir::Filters filters);\n    void setSort(QDir::SortFlags flags);\n    QDir::Filters filter() const;\n    QDir::SortFlags sort() const;\n    void setRootPathList(const QStringList &pathList);\n    void setRootPath(const QString &path);\n    QList<QModelIndex> findPaths(const QString &path) const;\n    QModelIndex findPath(const QString &path) const;\n    QString filePath(const QModelIndex &index) const;\n    PathNode *nodeFromIndex(const QModelIndex &index) const;\n    void setStartIndex(const QModelIndex &index);\n    void setStartPath(const QString &path);\n    QModelIndex startIndex() const;\n    QString startPath() const;\n    virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;\n    virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;\n    virtual QModelIndex parent(const QModelIndex &child) const;\n    virtual QModelIndex index(int row, int column,const QModelIndex &parent = QModelIndex()) const;\n    virtual QVariant data(const QModelIndex &index, int role) const;\n    QFileSystemWatcher* fileWatcher() const;\npublic slots:\n    void directoryChanged(const QString&);\nprotected:\n    QModelIndex findPathHelper(const QString &path, const QModelIndex &parentIndex) const;\n    QStringList m_pathList;\n    PathNode *m_rootNode;\n    QString   m_startPath;\n    QFileIconProvider *m_iconProvider;\n    QFileSystemWatcher *m_fileWatcher;\n    QTreeView *m_treeView;\n    QDir::Filters m_filters;\n    QDir::SortFlags m_sorts;\n};\n\n#endif // FILEPATHMODEL_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/golangpackage.pro",
    "content": "TARGET = golangpackage\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude (../../api/liteenvapi/liteenvapi.pri)\ninclude(../../api/golangdocapi/golangdocapi.pri)\ninclude (../../utils/fileutil/fileutil.pri)\ninclude (../../utils/processex/processex.pri)\ninclude (../../utils/symboltreeview/symboltreeview.pri)\ninclude (../../3rdparty/qjson/qjson.pri)\n\n\nDEFINES += GOLANGPACKAGE_LIBRARY\n\nSOURCES += golangpackageplugin.cpp \\\n    filepathmodel.cpp \\\n    golangpackageoption.cpp \\\n    golangpackageoptionfactory.cpp \\\n    packagebrowser.cpp \\\n    gotool.cpp \\\n    packageproject.cpp \\\n    packagetree.cpp \\\n    packageprojectfactory.cpp\n\nHEADERS += golangpackageplugin.h\\\n        golangpackage_global.h \\\n    filepathmodel.h \\\n    golangpackageoption.h \\\n    golangpackageoptionfactory.h \\\n    packagebrowser.h \\\n    gotool.h \\\n    packageproject.h \\\n    packagetree.h \\\n    packageprojectfactory.h\n\nFORMS += \\\n    golangpackageoption.ui\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/golangpackage_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangpackage_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGPACKAGE_GLOBAL_H\n#define GOLANGPACKAGE_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(GOLANGPACKAGE_LIBRARY)\n#  define GOLANGPACKAGESHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define GOLANGPACKAGESHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#define LITEIDE_USESYSGOPATH \"liteide/usesysgopath\"\n#define LITEIDE_USELITEIDEGOPATH \"liteide/uselitegopath\"\n#define LITEIDE_CUSTOMGO111MODULE \"liteide/use111gomodule\"\n#define LITEIDE_GO111MODULE \"liteide/go111module\"\n#define LITEIDE_USEGOPROXY \"liteide/usegoproxy\"\n#define LITEIDE_GOPROXY \"liteide/goproxy\"\n#define LITEIDE_USEGOPRIVATE \"liteide/usegoprivate\"\n#define LITEIDE_GOPRIVATE \"liteide/goprivate\"\n#define LITEIDE_USEGONOPROXY \"liteide/usegonoproxy\"\n#define LITEIDE_GONOPROXY \"liteide/gonoproxy\"\n#define LITEIDE_USEGONOSUMDB \"liteide/usegonosumdb\"\n#define LITEIDE_GONOSUMDB \"liteide/gonosumdb\"\n\n\n#endif // GOLANGPACKAGE_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/golangpackageoption.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangpackageoption.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangpackageoption.h\"\n#include \"ui_golangpackageoption.h\"\n#include \"golangpackage_global.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"gotool.h\"\n#include <QFileDialog>\n#include <QLineEdit>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nGolangPackageOption::GolangPackageOption(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IOption(parent),\n    m_liteApp(app),\n    ui(new Ui::GolangPackageOption),\n    m_widget(new QWidget)\n{\n    ui->setupUi(m_widget);\n    ui->cmbGoModule->addItems(QStringList() << \"auto\" << \"on\" << \"off\");\n    ui->cmbGoModule->setCurrentIndex(0);\n    ui->cmbGoModule->setEnabled(false);\n    ui->cmbGoProxy->setEnabled(false);\n    ui->editGoPrivate->setEnabled(false);\n    ui->editGoNoProxy->setEnabled(false);\n    ui->editGoNoSumdb->setEnabled(false);\n\n    ui->cmbGoProxy->addItems(QStringList()\n                            << \"https://proxy.golang.org,direct\"\n                            << \"https://goproxy.io\"\n                            << \"https://goproxy.io,direct\"\n                            << \"https://goproxy.cn\"\n                            << \"https://goproxy.cn,direct\");\n    connect(ui->browserButton,SIGNAL(clicked()),this,SLOT(browser()));\n    connect(ui->clearButton,SIGNAL(clicked()),ui->litePathTextEdit,SLOT(clear()));\n    connect(ui->chkUseSysGopath,SIGNAL(toggled(bool)),ui->sysPathTextEdit,SLOT(setEnabled(bool)));\n    connect(ui->chkUseLiteGopath,SIGNAL(toggled(bool)),ui->litePathTextEdit,SLOT(setEnabled(bool)));\n    connect(ui->chkUseGoModule,SIGNAL(toggled(bool)),ui->cmbGoModule,SLOT(setEnabled(bool)));\n    connect(ui->chkUseGoProxy,SIGNAL(toggled(bool)),ui->cmbGoProxy,SLOT(setEnabled(bool)));\n    connect(ui->chkUseGoPrivate,SIGNAL(toggled(bool)),ui->editGoPrivate,SLOT(setEnabled(bool)));\n    connect(ui->chkUseGoNoProxy,SIGNAL(toggled(bool)),ui->editGoNoProxy,SLOT(setEnabled(bool)));\n    connect(ui->chkUseGoNoSumdb,SIGNAL(toggled(bool)),ui->editGoNoSumdb,SLOT(setEnabled(bool)));\n}\n\nGolangPackageOption::~GolangPackageOption()\n{\n    delete ui;\n}\n\n\nvoid GolangPackageOption::setSysPathList(const QStringList &pathList)\n{\n    ui->sysPathTextEdit->clear();\n    foreach (QString path, pathList) {\n        ui->sysPathTextEdit->appendPlainText(path);\n    }\n}\n\nvoid GolangPackageOption::setLitePathList(const QStringList &pathList)\n{\n    ui->litePathTextEdit->clear();\n    foreach (QString path, pathList) {\n        ui->litePathTextEdit->appendPlainText(path);\n    }\n}\n\nvoid GolangPackageOption::setUseSysGopath(bool b)\n{\n    ui->chkUseSysGopath->setChecked(b);\n}\n\nbool GolangPackageOption::isUseSysGopath() const\n{\n    return ui->chkUseSysGopath->isChecked();\n}\n\nvoid GolangPackageOption::setUseLiteGopath(bool b)\n{\n    ui->chkUseLiteGopath->setChecked(b);\n}\n\nbool GolangPackageOption::isUseLiteGopath() const\n{\n    return ui->chkUseLiteGopath->isChecked();\n}\n\nvoid GolangPackageOption::setUseGoModule(bool b)\n{\n    ui->chkUseGoModule->setChecked(b);\n}\n\nbool GolangPackageOption::isUseGoModule() const\n{\n    return ui->chkUseGoModule->isChecked();\n}\n\nvoid GolangPackageOption::setSysGoModuleInfo(const QString &value)\n{\n    ui->sysGoModuleInfo->setText(value);\n}\n\nvoid GolangPackageOption::setGo111Module(const QString &value)\n{\n    for (int i = 0; i < ui->cmbGoModule->count(); i++) {\n        if (ui->cmbGoModule->itemText(i) == value) {\n            ui->cmbGoModule->setCurrentIndex(i);\n            break;\n        }\n    }\n}\n\nQString GolangPackageOption::go111Module() const\n{\n    return ui->cmbGoModule->currentText();\n}\n\nQStringList GolangPackageOption::litePathList() const\n{\n    return ui->litePathTextEdit->toPlainText().split(\"\\n\",qtSkipEmptyParts);\n}\n\nvoid GolangPackageOption::setUseGoProxy(bool b)\n{\n    ui->chkUseGoProxy->setChecked(b);\n}\n\nbool GolangPackageOption::isUseGoProxy() const\n{\n    return ui->chkUseGoProxy->isChecked();\n}\n\nvoid GolangPackageOption::setGoProxy(const QString &v)\n{\n    ui->cmbGoProxy->lineEdit()->setText(v);\n}\n\nQString GolangPackageOption::goProxy() const\n{\n    return ui->cmbGoProxy->currentText();\n}\n\nvoid GolangPackageOption::setUseGoPrivate(ENUM_GO_PRIVATE id, bool b)\n{\n    switch (id) {\n    case GO_PRIVATE:\n        ui->chkUseGoPrivate->setChecked(b);\n        break;\n    case GO_NOPROXY:\n        ui->chkUseGoNoProxy->setChecked(b);\n        break;\n    case GO_NOSUMDB:\n        ui->chkUseGoNoSumdb->setChecked(b);\n        break;\n    }\n}\n\nbool GolangPackageOption::isUseGoPrivate(ENUM_GO_PRIVATE id) const\n{\n    switch (id) {\n    case GO_PRIVATE:\n        return  ui->chkUseGoPrivate->isChecked();\n    case GO_NOPROXY:\n        return  ui->chkUseGoNoProxy->isChecked();\n    case GO_NOSUMDB:\n        return  ui->chkUseGoNoSumdb->isChecked();\n    }\n    return  false;\n}\n\nvoid GolangPackageOption::setGoPrivate(ENUM_GO_PRIVATE id, const QString &value)\n{\n    switch (id) {\n    case GO_PRIVATE:\n        ui->editGoPrivate->setText(value);\n        break;\n    case GO_NOPROXY:\n        ui->editGoNoProxy->setText(value);\n        break;\n    case GO_NOSUMDB:\n        ui->editGoNoSumdb->setText(value);\n        break;\n    }\n}\n\nQString GolangPackageOption::goPrivate(ENUM_GO_PRIVATE id) const\n{\n    switch (id) {\n    case GO_PRIVATE:\n        return  ui->editGoPrivate->text();\n    case GO_NOPROXY:\n        return  ui->editGoNoProxy->text();\n    case GO_NOSUMDB:\n        return  ui->editGoNoSumdb->text();\n    }\n    return  QString();\n}\n\nQString GolangPackageOption::name() const\n{\n    return \"GolangPackage\";\n}\n\nQString GolangPackageOption::mimeType() const\n{\n    return \"option/golangpackage\";\n}\n\nvoid GolangPackageOption::save()\n{\n    QStringList newLitePath = this->litePathList();\n    //m_liteApp->sendBroadcast(\"golangpackage\",\"reloadgopath\");\n    m_liteApp->settings()->setValue(LITEIDE_USESYSGOPATH,this->isUseSysGopath());\n    m_liteApp->settings()->setValue(LITEIDE_USELITEIDEGOPATH,this->isUseLiteGopath());\n    m_liteApp->settings()->setValue(LITEIDE_CUSTOMGO111MODULE,this->isUseGoModule());\n    m_liteApp->settings()->setValue(LITEIDE_GO111MODULE,this->go111Module());\n\n    m_liteApp->settings()->setValue(LITEIDE_USEGOPROXY,this->isUseGoProxy());\n    m_liteApp->settings()->setValue(LITEIDE_GOPROXY,this->goProxy());\n\n    m_liteApp->settings()->setValue(LITEIDE_USEGOPRIVATE,this->isUseGoPrivate(GO_PRIVATE));\n    m_liteApp->settings()->setValue(LITEIDE_GOPRIVATE,this->goPrivate(GO_PRIVATE));\n\n    m_liteApp->settings()->setValue(LITEIDE_USEGONOPROXY,this->isUseGoPrivate(GO_NOPROXY));\n    m_liteApp->settings()->setValue(LITEIDE_GONOPROXY,this->goPrivate(GO_NOPROXY));\n\n    m_liteApp->settings()->setValue(LITEIDE_USEGONOSUMDB,this->isUseGoPrivate(GO_NOSUMDB));\n    m_liteApp->settings()->setValue(LITEIDE_GONOSUMDB,this->goPrivate(GO_NOSUMDB));\n    //if (!hasSameList(orgLitePath,newLitePath)) {\n    setLiteGopath(m_liteApp,newLitePath);\n//    this->reloadAll();\n    LiteApi::IEnvManager *env = LiteApi::getEnvManager(m_liteApp);\n    if (env) {\n        env->reloadCurrentEnv();\n    }\n}\n\nvoid GolangPackageOption::load()\n{\n    this->setSysPathList(sysGopath(m_liteApp));\n    this->setLitePathList(liteGopath(m_liteApp));\n    this->setUseSysGopath(m_liteApp->settings()->value(LITEIDE_USESYSGOPATH,true).toBool());\n    this->setUseLiteGopath(m_liteApp->settings()->value(LITEIDE_USELITEIDEGOPATH,true).toBool());\n    this->setUseGoModule(m_liteApp->settings()->value(LITEIDE_CUSTOMGO111MODULE,false).toBool());\n    this->setGo111Module(m_liteApp->settings()->value(LITEIDE_GO111MODULE,\"auto\").toString());\n    this->setUseGoProxy(m_liteApp->settings()->value(LITEIDE_USEGOPROXY,false).toBool());\n    this->setGoProxy(m_liteApp->settings()->value(LITEIDE_GOPROXY,\"\").toString());\n\n    this->setUseGoPrivate(GO_PRIVATE,m_liteApp->settings()->value(LITEIDE_USEGOPRIVATE,false).toBool());\n    this->setGoPrivate(GO_PRIVATE,m_liteApp->settings()->value(LITEIDE_GOPRIVATE,\"\").toString());\n\n    this->setUseGoPrivate(GO_NOPROXY,m_liteApp->settings()->value(LITEIDE_USEGONOPROXY,false).toBool());\n    this->setGoPrivate(GO_NOPROXY,m_liteApp->settings()->value(LITEIDE_GONOPROXY,\"\").toString());\n\n    this->setUseGoPrivate(GO_NOSUMDB,m_liteApp->settings()->value(LITEIDE_USEGONOSUMDB,false).toBool());\n    this->setGoPrivate(GO_NOSUMDB,m_liteApp->settings()->value(LITEIDE_GONOSUMDB,\"\").toString());\n\n    QProcessEnvironment env = LiteApi::getCurrentEnvironment(m_liteApp);\n    QString info = env.value(\"GO111MODULE\");\n    if (!info.isEmpty()) {\n        this->setSysGoModuleInfo(QString(\"system GO111MODULE=%1\").arg(info));\n    } else {\n        this->setSysGoModuleInfo(\"system GO111MODULE unset\");\n    }\n\n}\n\nQWidget *GolangPackageOption::widget()\n{\n    return m_widget;\n}\n\nvoid GolangPackageOption::browser()\n{\n    static QString last = QDir::homePath();\n    QString dir = QFileDialog::getExistingDirectory(m_widget, tr(\"Choose directory to add to GOPATH:\"),\n                                                    last,\n                                                    QFileDialog::ShowDirsOnly\n                                                    | QFileDialog::DontResolveSymlinks);\n    if (!dir.isEmpty()) {\n        last = dir;\n        ui->litePathTextEdit->appendPlainText(dir);\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/golangpackageoption.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangpackageoption.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef SETUPGOPATHDIALOG_H\n#define SETUPGOPATHDIALOG_H\n\n#include <QDialog>\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\nclass GolangPackageOption;\n}\n\nenum ENUM_GO_PRIVATE{\n    GO_PRIVATE = 0,\n    GO_NOPROXY = 1,\n    GO_NOSUMDB = 2,\n};\n\nclass GolangPackageOption : public LiteApi::IOption\n{\n    Q_OBJECT    \npublic:\n    explicit GolangPackageOption(LiteApi::IApplication *app, QObject *parent = 0);\n    ~GolangPackageOption();\n    void setSysPathList(const QStringList &litePathList);\n    void setLitePathList(const QStringList &litePathList);\n    void setUseSysGopath(bool b);\n    bool isUseSysGopath() const;\n    void setUseLiteGopath(bool b);\n    bool isUseLiteGopath() const;\n    void setUseGoModule(bool b);\n    bool isUseGoModule() const;\n    void setSysGoModuleInfo(const QString &value);\n    void setGo111Module(const QString &value);\n    QString go111Module() const;\n    QStringList litePathList() const;\n    void setUseGoProxy(bool b);\n    bool isUseGoProxy() const;\n    void setGoProxy(const QString &v);\n    QString goProxy() const;\n    void setUseGoPrivate(ENUM_GO_PRIVATE id, bool b);\n    bool isUseGoPrivate(ENUM_GO_PRIVATE id) const;\n    void setGoPrivate(ENUM_GO_PRIVATE id, const QString &value);\n    QString goPrivate(ENUM_GO_PRIVATE id) const;\npublic:\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void save();\n    virtual void load();\n    virtual QWidget *widget();\nprotected slots:\n    void browser();\n\nprivate:\n    LiteApi::IApplication *m_liteApp;\n    Ui::GolangPackageOption *ui;\n    QWidget *m_widget;\n};\n\n#endif // SETUPGOPATHDIALOG_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/golangpackageoption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>GolangPackageOption</class>\n <widget class=\"QWidget\" name=\"GolangPackageOption\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>597</width>\n    <height>412</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Manage GOPATH / Modules</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_3\">\n   <property name=\"spacing\">\n    <number>2</number>\n   </property>\n   <property name=\"leftMargin\">\n    <number>4</number>\n   </property>\n   <property name=\"topMargin\">\n    <number>4</number>\n   </property>\n   <property name=\"rightMargin\">\n    <number>4</number>\n   </property>\n   <property name=\"bottomMargin\">\n    <number>4</number>\n   </property>\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox\">\n     <property name=\"title\">\n      <string>Go Modules</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n      <property name=\"leftMargin\">\n       <number>2</number>\n      </property>\n      <property name=\"topMargin\">\n       <number>2</number>\n      </property>\n      <property name=\"rightMargin\">\n       <number>2</number>\n      </property>\n      <property name=\"bottomMargin\">\n       <number>2</number>\n      </property>\n      <item>\n       <layout class=\"QGridLayout\" name=\"gridLayout\">\n        <property name=\"horizontalSpacing\">\n         <number>10</number>\n        </property>\n        <property name=\"verticalSpacing\">\n         <number>1</number>\n        </property>\n        <item row=\"2\" column=\"1\" colspan=\"2\">\n         <widget class=\"QLineEdit\" name=\"editGoPrivate\">\n          <property name=\"enabled\">\n           <bool>true</bool>\n          </property>\n         </widget>\n        </item>\n        <item row=\"4\" column=\"1\" colspan=\"2\">\n         <widget class=\"QLineEdit\" name=\"editGoNoSumdb\"/>\n        </item>\n        <item row=\"1\" column=\"1\" colspan=\"2\">\n         <widget class=\"QComboBox\" name=\"cmbGoProxy\">\n          <property name=\"editable\">\n           <bool>true</bool>\n          </property>\n         </widget>\n        </item>\n        <item row=\"3\" column=\"0\">\n         <widget class=\"QCheckBox\" name=\"chkUseGoNoProxy\">\n          <property name=\"text\">\n           <string>Custom GONOPROXY</string>\n          </property>\n         </widget>\n        </item>\n        <item row=\"3\" column=\"1\" colspan=\"2\">\n         <widget class=\"QLineEdit\" name=\"editGoNoProxy\"/>\n        </item>\n        <item row=\"1\" column=\"0\">\n         <widget class=\"QCheckBox\" name=\"chkUseGoProxy\">\n          <property name=\"text\">\n           <string>Custom GOPROXY</string>\n          </property>\n         </widget>\n        </item>\n        <item row=\"0\" column=\"0\">\n         <widget class=\"QCheckBox\" name=\"chkUseGoModule\">\n          <property name=\"text\">\n           <string>Custom GO111MODULE</string>\n          </property>\n         </widget>\n        </item>\n        <item row=\"4\" column=\"0\">\n         <widget class=\"QCheckBox\" name=\"chkUseGoNoSumdb\">\n          <property name=\"text\">\n           <string>Custom GONOSUMDB</string>\n          </property>\n         </widget>\n        </item>\n        <item row=\"2\" column=\"0\">\n         <widget class=\"QCheckBox\" name=\"chkUseGoPrivate\">\n          <property name=\"text\">\n           <string>Custom GOPRIVATE</string>\n          </property>\n         </widget>\n        </item>\n        <item row=\"0\" column=\"1\">\n         <widget class=\"QComboBox\" name=\"cmbGoModule\"/>\n        </item>\n        <item row=\"0\" column=\"2\">\n         <widget class=\"QLabel\" name=\"sysGoModuleInfo\">\n          <property name=\"sizePolicy\">\n           <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Preferred\">\n            <horstretch>0</horstretch>\n            <verstretch>0</verstretch>\n           </sizepolicy>\n          </property>\n          <property name=\"text\">\n           <string>TextLabel</string>\n          </property>\n         </widget>\n        </item>\n       </layout>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox_2\">\n     <property name=\"title\">\n      <string>GOPATH</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n      <property name=\"spacing\">\n       <number>2</number>\n      </property>\n      <property name=\"leftMargin\">\n       <number>2</number>\n      </property>\n      <property name=\"topMargin\">\n       <number>2</number>\n      </property>\n      <property name=\"rightMargin\">\n       <number>2</number>\n      </property>\n      <property name=\"bottomMargin\">\n       <number>2</number>\n      </property>\n      <item>\n       <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n        <property name=\"spacing\">\n         <number>-1</number>\n        </property>\n        <item>\n         <widget class=\"QCheckBox\" name=\"chkUseSysGopath\">\n          <property name=\"text\">\n           <string>Use System GOPATH</string>\n          </property>\n          <property name=\"checked\">\n           <bool>true</bool>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <spacer name=\"horizontalSpacer\">\n          <property name=\"orientation\">\n           <enum>Qt::Horizontal</enum>\n          </property>\n          <property name=\"sizeHint\" stdset=\"0\">\n           <size>\n            <width>40</width>\n            <height>20</height>\n           </size>\n          </property>\n         </spacer>\n        </item>\n        <item>\n         <widget class=\"QPushButton\" name=\"reloadButton\">\n          <property name=\"text\">\n           <string>Reload</string>\n          </property>\n         </widget>\n        </item>\n       </layout>\n      </item>\n      <item>\n       <widget class=\"QPlainTextEdit\" name=\"sysPathTextEdit\">\n        <property name=\"sizePolicy\">\n         <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Expanding\">\n          <horstretch>0</horstretch>\n          <verstretch>0</verstretch>\n         </sizepolicy>\n        </property>\n        <property name=\"readOnly\">\n         <bool>true</bool>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\">\n        <item>\n         <widget class=\"QCheckBox\" name=\"chkUseLiteGopath\">\n          <property name=\"text\">\n           <string>Use Custom GOPATH (one per line)</string>\n          </property>\n          <property name=\"checked\">\n           <bool>true</bool>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <spacer name=\"horizontalSpacer_2\">\n          <property name=\"orientation\">\n           <enum>Qt::Horizontal</enum>\n          </property>\n          <property name=\"sizeHint\" stdset=\"0\">\n           <size>\n            <width>40</width>\n            <height>20</height>\n           </size>\n          </property>\n         </spacer>\n        </item>\n        <item>\n         <widget class=\"QPushButton\" name=\"browserButton\">\n          <property name=\"text\">\n           <string>Add Directory...</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <widget class=\"QPushButton\" name=\"clearButton\">\n          <property name=\"text\">\n           <string>Clear</string>\n          </property>\n         </widget>\n        </item>\n       </layout>\n      </item>\n      <item>\n       <widget class=\"QPlainTextEdit\" name=\"litePathTextEdit\">\n        <property name=\"sizePolicy\">\n         <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Expanding\">\n          <horstretch>0</horstretch>\n          <verstretch>0</verstretch>\n         </sizepolicy>\n        </property>\n       </widget>\n      </item>\n     </layout>\n    </widget>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/golangpackageoptionfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangpackageoptionfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangpackageoptionfactory.h\"\n#include \"golangpackageoption.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangPackageOptionFactory::GolangPackageOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n\n}\n\nQStringList GolangPackageOptionFactory::mimeTypes() const\n{\n    return QStringList() << \"option/golangpackage\";\n}\n\nLiteApi::IOption *GolangPackageOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == \"option/golangpackage\") {\n        return new GolangPackageOption(m_liteApp,this);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/golangpackageoptionfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangpackageoptionfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGPACKAGEOPTIONFACTORY_H\n#define GOLANGPACKAGEOPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass GolangPackageOptionFactory : public  LiteApi::IOptionFactory\n{\npublic:\n    GolangPackageOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // GOLANGPACKAGEOPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/golangpackageplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangpackageplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangpackageplugin.h\"\n#include \"packagebrowser.h\"\n#include \"packageproject.h\"\n#include \"packageprojectfactory.h\"\n#include \"golangpackageoptionfactory.h\"\n#include <QAction>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangPackagePlugin::GolangPackagePlugin()\n{\n}\n\nbool GolangPackagePlugin::load(LiteApi::IApplication *app)\n{\n    new PackageBrowser(app,this);\n    //PackageProjectFactory *factory = new PackageProjectFactory(app,this);\n    //m_liteApp->projectManager()->addFactory(factory);\n    app->optionManager()->addFactory(new GolangPackageOptionFactory(app,this));\n\n    return true;\n}\n\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/golangpackageplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangpackageplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGPACKAGEPLUGIN_H\n#define GOLANGPACKAGEPLUGIN_H\n\n#include \"golangpackage_global.h\"\n#include \"liteapi/liteapi.h\"\n#include <QtPlugin>\n\nclass GolangPackagePlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    GolangPackagePlugin();\n    virtual bool load(LiteApi::IApplication *app);\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<GolangPackagePlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.GolangPackagePlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/GolangPackage\");\n        m_info->setName(\"GolangPackage\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setVer(\"X36.3\");\n        m_info->setMustLoad(true);\n        m_info->setInfo(\"Golang Packages Browser\");\n        m_info->appendDepend(\"plugin/liteenv\");\n    }\n};\n\n#endif // GOLANGPACKAGEPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/gotool.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gotool.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"gotool.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"fileutil/fileutil.h\"\n#include \"processex/processex.h\"\n#include <QProcess>\n#include <QDir>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGoTool::GoTool(LiteApi::IApplication *app, QObject *parent) :\n    QObject(parent),\n    m_liteApp(app)\n{\n    m_process = new Process(this);\n    connect(m_process,SIGNAL(readyReadStandardError()),this,SLOT(readError()));\n    connect(m_process,SIGNAL(readyReadStandardOutput()),this,SLOT(readOutput()));\n    connect(m_process,SIGNAL(error(QProcess::ProcessError)),this,SIGNAL(error(QProcess::ProcessError)));\n    connect(m_process,SIGNAL(finished(int,QProcess::ExitStatus)),this,SIGNAL(finished(int,QProcess::ExitStatus)));\n}\n\nGoTool::~GoTool()\n{    \n    kill();\n}\n\n\nvoid GoTool::kill()\n{\n    m_process->stopAndWait(100,200);\n}\n\nvoid  GoTool::setProcessEnvironment(const QProcessEnvironment &environment)\n{\n    m_process->setProcessEnvironment(environment);\n}\n\nvoid GoTool::setWorkDir(const QString &dir)\n{\n    m_process->setWorkingDirectory(dir);\n}\n\nQString GoTool::workDir() const\n{\n    return m_process->workingDirectory();\n}\n\nvoid GoTool::start_list_json()\n{\n    this->kill();\n\n    m_stdOutput.clear();\n    m_stdError.clear();\n\n    QString cmd = LiteApi::getGotools(m_liteApp);\n    QStringList args;\n    args << \"pkgs\" << \"-list\" << \"-json\";\n\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\n    m_process->setEnvironment(env.toStringList());\n    m_process->start(cmd,args);\n}\n\nvoid GoTool::readError()\n{\n    m_stdError.append(m_process->readAllStandardError());\n}\n\nvoid GoTool::readOutput()\n{\n    m_stdOutput.append(m_process->readAllStandardOutput());\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/gotool.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gotool.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOTOOL_H\n#define GOTOOL_H\n\n#include \"liteapi/liteapi.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include <QProcess>\n\ninline QStringList liteGopath(LiteApi::IApplication *app)\n{\n    QStringList pathList;\n    QStringList list =  app->settings()->value(\"liteide/gopath\").toStringList();\n    foreach(QString path, list) {\n        pathList.append(QDir::toNativeSeparators(path));\n    }\n    pathList.removeDuplicates();\n    return pathList;\n}\n\ninline void setLiteGopath(LiteApi::IApplication *app, const QStringList &pathList)\n{\n    app->settings()->setValue(\"liteide/gopath\",pathList);\n}\n\ninline QStringList sysGopath(LiteApi::IApplication *app)\n{\n    QProcessEnvironment env = LiteApi::getSysEnvironment(app);\n//    QString goroot = env.value(\"GOROOT\");\n    QStringList pathList;\n#ifdef Q_OS_WIN\n    QString sep = \";\";\n#else\n    QString sep = \":\";\n#endif\n    foreach (QString path, env.value(\"GOPATH\").split(sep,qtSkipEmptyParts)) {\n        pathList.append(QDir::toNativeSeparators(path));\n    }\n    pathList.removeDuplicates();\n    return pathList;\n}\n\n\nclass Process;\nclass GoTool : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit GoTool(LiteApi::IApplication *app,QObject *parent = 0);\n    virtual ~GoTool();\n    void setProcessEnvironment(const QProcessEnvironment &environment);\n    void setLiteGopath(const QStringList &pathList);\n    void kill();\n    void setWorkDir(const QString &dir);\n    QString workDir() const;\n    void start_list_json();\n    QByteArray stdOutputData() const { return m_stdOutput; }\n    QString stdOutputUtf8() const {\n        return QString::fromUtf8(m_stdOutput,m_stdOutput.size());\n    }\n    QByteArray stdError() const { return m_stdError; }\nsignals:\n    void error(QProcess::ProcessError);\n    void finished(int,QProcess::ExitStatus);\nprotected slots:\n    void readError();\n    void readOutput();\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    Process *m_process;\n    QByteArray m_stdOutput;\n    QByteArray m_stdError;\n};\n\n#endif // GOTOOL_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/packagebrowser.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: packagebrowser.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"packagebrowser.h\"\n#include \"golangpackageoption.h\"\n#include \"golangpackage_global.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"golangdocapi/golangdocapi.h\"\n#include \"qjson/include/QJson/Parser\"\n#include \"fileutil/fileutil.h\"\n#include \"packageproject.h\"\n#include \"liteapi/liteids.h\"\n#include <QTreeView>\n#include <QStandardItemModel>\n#include <QStandardItem>\n#include <QHeaderView>\n#include <QDir>\n#include <QVBoxLayout>\n#include <QHBoxLayout>\n#include <QMenu>\n#include <QToolBar>\n#include <QAction>\n#include <QUrl>\n#include <QClipboard>\n#include <QApplication>\n#include <QTimer>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nPackageBrowser::PackageBrowser(LiteApi::IApplication *app, QObject *parent) :\n    QObject(parent),\n    m_liteApp(app),\n    m_bLoaded(false)\n{\n    m_goTool = new GoTool(m_liteApp,this);\n    m_widget = new QWidget;\n    m_groupByPath = true;\n    m_hideStandard = false;\n\n    QVBoxLayout *layout = new QVBoxLayout;\n    layout->setMargin(0);\n\n    m_model = new QStandardItemModel(this);\n\n    m_treeView = new SymbolTreeView;    \n    m_treeView->setContextMenuPolicy(Qt::CustomContextMenu);\n    m_treeView->setModel(m_model);\n    m_treeView->setEditTriggers(QTreeView::NoEditTriggers);\n    m_treeView->setExpandsOnDoubleClick(false);\n\n    layout->addWidget(m_treeView);\n    m_widget->setLayout(layout);\n\n    m_rootMenu = new QMenu;\n    m_pkgMenu = new QMenu;\n    m_fileMenu = new QMenu;\n\n    m_reloadAct = new QAction(tr(\"Reload All\"),this);\n    m_setupGopathAct = new QAction(QIcon(\"icon:images/gopath.png\"),tr(\"Manage GOPATH/Modules ...\"),this);\n\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(this,\"GoPkg\");\n\n    actionContext->regAction(m_setupGopathAct,\"SetupGOPATH\",\"\");\n\n    m_godocAct = new QAction(tr(\"Use godoc View\"),this);\n    m_loadPackageInNewWindowAct = new QAction(tr(\"Load Package in New Window\"),this);\n    m_addToFoldersAct = new QAction(tr(\"Add Package to Folders\"),this);\n    m_openSrcAct = new QAction(tr(\"Open Source File\"),this);\n    m_copyNameAct = new QAction(tr(\"Copy Name to Clipboard\"),this);\n\n    m_liteApp->actionManager()->insertMenuActions(ID_MENU_TOOLS,\"sep/gopath\",true,QList<QAction*>() << m_setupGopathAct);\n\n    m_rootMenu->addAction(m_reloadAct);\n    m_rootMenu->addAction(m_setupGopathAct);\n\n    m_pkgMenu->addAction(m_loadPackageInNewWindowAct);\n    m_pkgMenu->addAction(m_addToFoldersAct);\n    m_pkgMenu->addSeparator();\n    m_pkgMenu->addAction(m_godocAct);\n    m_pkgMenu->addAction(m_copyNameAct);\n    m_pkgMenu->addSeparator();\n    m_pkgMenu->addAction(m_reloadAct);\n    m_pkgMenu->addAction(m_setupGopathAct);\n\n    m_fileMenu->addAction(m_openSrcAct);\n    m_fileMenu->addSeparator();\n    m_fileMenu->addAction(m_reloadAct);\n    m_fileMenu->addAction(m_setupGopathAct);\n\n\n    m_toolWindowAct = m_liteApp->toolWindowManager()->addToolWindow(Qt::LeftDockWidgetArea,m_widget,\"GoPackageBrowser\",tr(\"Go Package Browser\"),true);\n    connect(m_toolWindowAct,SIGNAL(triggered(bool)),this,SLOT(toggledToolWindow(bool)));\n    connect(m_goTool,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(finished(int,QProcess::ExitStatus)));\n    connect(m_goTool,SIGNAL(error(QProcess::ProcessError)),this,SLOT(error(QProcess::ProcessError)));\n    connect(m_treeView,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(customContextMenuRequested(QPoint)));\n    connect(m_treeView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(doubleClicked()));\n    connect(m_treeView,SIGNAL(enterKeyPressed(QModelIndex)),this,SLOT(enterKeyPressed(QModelIndex)));\n    connect(m_reloadAct,SIGNAL(triggered()),this,SLOT(reloadAll()));\n    connect(m_setupGopathAct,SIGNAL(triggered()),this,SLOT(setupGopath()));\n    connect(m_godocAct,SIGNAL(triggered()),this,SLOT(loadPackageDoc()));\n    connect(m_loadPackageInNewWindowAct,SIGNAL(triggered()),this,SLOT(loadPackageInNewWindow()));\n    connect(m_addToFoldersAct,SIGNAL(triggered()),this,SLOT(addPackageToFolders()));\n    connect(m_openSrcAct,SIGNAL(triggered()),this,SLOT(doubleClicked()));\n    connect(m_copyNameAct,SIGNAL(triggered()),this,SLOT(copyPackageName()));\n\n    //QAction *act = new QAction(QIcon(\"icon:images/gopath.png\"),tr(\"GOPATH Setup\"),this);\n    //connect(act,SIGNAL(triggered()),this,SLOT(setupGopath()));\n\n    QToolBar *toolBar = m_liteApp->actionManager()->loadToolBar(ID_TOOLBAR_STD);\n    if (toolBar) {\n        toolBar->addSeparator();\n        toolBar->addAction(m_setupGopathAct);\n    }\n\n    LiteApi::IEnvManager *env = LiteApi::getEnvManager(m_liteApp);\n    if (env) {\n        connect(env,SIGNAL(currentEnvChanged(LiteApi::IEnv*)),this,SLOT(currentEnvChanged(LiteApi::IEnv*)));\n    }\n    connect(m_liteApp->fileManager(),SIGNAL(fileWizardFinished(QString,QString,QString)),this,SLOT(fileWizardFinished(QString,QString,QString)));\n}\n\nPackageBrowser::~PackageBrowser()\n{\n    delete m_goTool;\n    delete m_rootMenu;\n    delete m_pkgMenu;\n    delete m_fileMenu;\n    if (m_widget) {\n        delete m_widget;\n    }\n}\n\nvoid PackageBrowser::toggledToolWindow(bool b)\n{\n    if (b && !m_bLoaded) {\n        this->reloadAll();\n    }\n}\n\nvoid PackageBrowser::fileWizardFinished(const QString&, const QString&, const QString&)\n{\n    /*if (scheme == \"gopkg\") {\n        reloadAll();\n    }*/\n}\n\nvoid PackageBrowser::currentEnvChanged(LiteApi::IEnv */*env*/)\n{\n    reloadAll();\n}\n\nvoid PackageBrowser::reloadAll()\n{\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\n    QString gocmd = FileUtil::lookupGoBin(\"go\",m_liteApp,env,false);\n    if (!gocmd.isEmpty()) {\n        m_liteApp->appendLog(\"GolangPackage\",\"Found go bin at \"+QDir::toNativeSeparators(gocmd));\n    } else {\n        m_liteApp->appendLog(\"GolangPackage\",\"Could not find go bin, (hint: is Go installed?)\",true);\n    }\n    QString goroot = env.value(\"GOROOT\");\n    m_liteApp->appendLog(\"GolangPackage\",\"GOROOT=\"+goroot);\n    QStringList gopathList = LiteApi::getGOPATH(m_liteApp,false);\n#ifdef Q_OS_WIN\n    m_liteApp->appendLog(\"GolangPackage\",\"GOPATH=\"+gopathList.join(\";\"));\n#else\n    m_liteApp->appendLog(\"GolangPackage\",\"GOPATH=\"+gopathList.join(\":\"));\n#endif\n\n    m_bLoaded = false;\n    if (!m_toolWindowAct->isChecked()) {\n        return;\n    }\n//    if (!LiteApi::hasGoEnv(env)) {\n//        return;\n//    }\n    m_liteApp->appendLog(\"GolangPackages\",\"reload all packages\");\n    m_bLoaded = true;\n    if (m_model->rowCount() == 0) {\n        m_model->appendRow(new QStandardItem(tr(\"Loading Go package list...\")));\n    }\n    QString root = LiteApi::getGOROOT(m_liteApp);\n    m_goTool->setProcessEnvironment(env);\n    m_goTool->setWorkDir(root);\n    //m_goTool->start(QStringList() << \"list\" << \"-e\" << \"-json\" << \"...\");\n    m_goTool->start_list_json();\n}\n\n//static bool hasSameList(const QStringList &list1, const QStringList &list2)\n//{\n//    if (list1.size() != list2.size()) {\n//        return false;\n//    }\n//    for (int i = 0; i < list1.size(); i++) {\n//        if (list1[i] != list2[i]) {\n//            return false;\n//        }\n//    }\n//    return true;\n//}\n\nvoid PackageBrowser::setupGopath()\n{\n    m_liteApp->optionManager()->exec(\"option/golangpackage\");\n//    SetupGopathDialog *dlg = new SetupGopathDialog(m_liteApp->mainWindow());\n//    dlg->setSysPathList(m_goTool->sysGopath());\n//    dlg->setLitePathList(m_goTool->liteGopath());\n//    dlg->setUseSysGopath(m_liteApp->settings()->value(LITEIDE_USESYSGOPATH,true).toBool());\n//    dlg->setUseLiteGopath(m_liteApp->settings()->value(LITEIDE_USELITEIDEGOPATH,true).toBool());\n//    dlg->setUseGoModule(m_liteApp->settings()->value(LITEIDE_CUSTOMGO111MODULE,false).toBool());\n//    dlg->setGo111Module(m_liteApp->settings()->value(LITEIDE_GO111MODULE,\"auto\").toString());\n//    dlg->setUseGoProxy(m_liteApp->settings()->value(LITEIDE_USEGOPROXY,false).toBool());\n//    dlg->setGoProxy(m_liteApp->settings()->value(LITEIDE_GOPROXY,\"\").toString());\n\n//    dlg->setUseGoPrivate(GO_PRIVATE,m_liteApp->settings()->value(LITEIDE_USEGOPRIVATE,false).toBool());\n//    dlg->setGoPrivate(GO_PRIVATE,m_liteApp->settings()->value(LITEIDE_GOPRIVATE,\"\").toString());\n\n//    dlg->setUseGoPrivate(GO_NOPROXY,m_liteApp->settings()->value(LITEIDE_USEGONOPROXY,false).toBool());\n//    dlg->setGoPrivate(GO_NOPROXY,m_liteApp->settings()->value(LITEIDE_GONOPROXY,\"\").toString());\n\n//    dlg->setUseGoPrivate(GO_NOSUMDB,m_liteApp->settings()->value(LITEIDE_USEGONOSUMDB,false).toBool());\n//    dlg->setGoPrivate(GO_NOSUMDB,m_liteApp->settings()->value(LITEIDE_GONOSUMDB,\"\").toString());\n\n//    QProcessEnvironment env = LiteApi::getCurrentEnvironment(m_liteApp);\n//    QString info = env.value(\"GO111MODULE\");\n//    if (!info.isEmpty()) {\n//        dlg->setSysGoModuleInfo(QString(\"system GO111MODULE=%1\").arg(info));\n//    } else {\n//        dlg->setSysGoModuleInfo(\"system GO111MODULE unset\");\n//    }\n//    bool useMod = dlg->isUseGoModule();\n//    QString goMod = dlg->go111Module();\n//    if (dlg->exec() == QDialog::Accepted) {\n//        //QStringList orgLitePath = m_goTool->liteGopath();\n//        QStringList newLitePath = dlg->litePathList();\n//        //m_liteApp->sendBroadcast(\"golangpackage\",\"reloadgopath\");\n//        m_liteApp->settings()->setValue(LITEIDE_USESYSGOPATH,dlg->isUseSysGopath());\n//        m_liteApp->settings()->setValue(LITEIDE_USELITEIDEGOPATH,dlg->isUseLiteGopath());\n//        m_liteApp->settings()->setValue(LITEIDE_CUSTOMGO111MODULE,dlg->isUseGoModule());\n//        m_liteApp->settings()->setValue(LITEIDE_GO111MODULE,dlg->go111Module());\n\n//        m_liteApp->settings()->setValue(LITEIDE_USEGOPROXY,dlg->isUseGoProxy());\n//        m_liteApp->settings()->setValue(LITEIDE_GOPROXY,dlg->goProxy());\n\n//        m_liteApp->settings()->setValue(LITEIDE_USEGOPRIVATE,dlg->isUseGoPrivate(GO_PRIVATE));\n//        m_liteApp->settings()->setValue(LITEIDE_GOPRIVATE,dlg->goPrivate(GO_PRIVATE));\n\n//        m_liteApp->settings()->setValue(LITEIDE_USEGONOPROXY,dlg->isUseGoPrivate(GO_NOPROXY));\n//        m_liteApp->settings()->setValue(LITEIDE_GONOPROXY,dlg->goPrivate(GO_NOPROXY));\n\n//        m_liteApp->settings()->setValue(LITEIDE_USEGONOSUMDB,dlg->isUseGoPrivate(GO_NOSUMDB));\n//        m_liteApp->settings()->setValue(LITEIDE_GONOSUMDB,dlg->goPrivate(GO_NOSUMDB));\n//        //if (!hasSameList(orgLitePath,newLitePath)) {\n//        m_goTool->setLiteGopath(newLitePath);\n//        this->reloadAll();\n//        if (useMod != dlg->isUseGoModule() || goMod != dlg->go111Module()) {\n//            LiteApi::IEnvManager *env = LiteApi::getEnvManager(m_liteApp);\n//            if (env) {\n//                env->reloadCurrentEnv();\n//            }\n//        } else {\n//            LiteApi::IGoEnvManger *env = LiteApi::getGoEnvManager(m_liteApp);\n//            if (env) {\n//                env->updateGoEnv();\n//            }\n//        }\n//    }\n}\n\nvoid PackageBrowser::loadPackageDoc()\n{\n    QModelIndex index = m_treeView->currentIndex();\n    if (!index.isValid()) {\n        return;\n    }\n    int type = index.data(PackageType::RoleItem).toInt();\n    if (type != PackageType::ITEM_PACKAGE &&\n            type != PackageType::ITEM_DEP &&\n            type != PackageType::ITEM_IMPORT) {\n        return;\n    }\n    QString pkgName = index.data(PackageType::RoleImportPath).toString();\n    if (pkgName.isEmpty()) {\n        pkgName = index.data(Qt::DisplayRole).toString();\n        QString modPkg = m_modPkgMap[pkgName];\n        if (!modPkg.isEmpty()) {\n            pkgName = modPkg;\n        }\n        qDebug() << pkgName << modPkg;\n    }\n    if (!pkgName.isEmpty()) {\n        LiteApi::IGolangDoc *doc = LiteApi::getGolangDoc(m_liteApp);\n        if (doc) {\n            doc->openUrl(QUrl(QString(\"pdoc:%1\").arg(pkgName)));\n            doc->activeBrowser();\n        }\n    }\n}\n\nvoid PackageBrowser::copyPackageName()\n{\n    QModelIndex index = m_treeView->currentIndex();\n    if (!index.isValid()) {\n        return;\n    }\n    QString name = index.data(Qt::DisplayRole).toString();\n    QApplication::clipboard()->setText(name);\n}\n\nvoid PackageBrowser::loadPackageInNewWindow()\n{\n    QModelIndex index = m_treeView->currentIndex();\n    if (!index.isValid()) {\n        return;\n    }\n    loadPackageFolderHelper(index,false);\n}\n\nvoid PackageBrowser::addPackageToFolders()\n{\n    QModelIndex index = m_treeView->currentIndex();\n    if (!index.isValid()) {\n        return;\n    }\n    loadPackageFolderHelper(index,true);\n}\n\nbool PackageBrowser::loadPackageFolderHelper(QModelIndex index, bool add)\n{\n    if (!index.isValid()) {\n        return false;\n    }\n    int type = index.data(PackageType::RoleItem).toInt();\n    if (type != PackageType::ITEM_PACKAGE &&\n            type != PackageType::ITEM_DEP &&\n            type != PackageType::ITEM_IMPORT) {\n        return false;\n    }\n\n    QString pkgName = index.data(Qt::DisplayRole).toString();\n    QVariant json = m_pkgJson.value(pkgName);\n    if (json.isNull()) {\n        return false;\n    }\n    QDir dir(json.toMap().value(\"Dir\").toString());\n    if (dir.exists()) {\n        if (add) {\n            m_liteApp->fileManager()->addFolderList(dir.path());\n        } else {\n            m_liteApp->fileManager()->openFolderInNewWindow(dir.path());\n        }\n        return true;\n    }\n    return false;\n}\n\nvoid PackageBrowser::doubleClicked()\n{\n    QModelIndex index = m_treeView->currentIndex();\n    if (!index.isValid()) {\n        return;\n    }\n\n    int type = index.data(PackageType::RoleItem).toInt();\n    if (type == PackageType::ITEM_SOURCE) {\n        QString path = index.data(PackageType::RoleDir).toString();\n        if (!path.isEmpty()) {\n            m_liteApp->fileManager()->openEditor(path);\n        }\n    } else if (type == PackageType::ITEM_PACKAGE) {\n        if (loadPackageFolderHelper(index,true)) {\n            return;\n        }\n    }\n    if (m_treeView->isExpanded(index)) {\n        m_treeView->collapse(index);\n    } else {\n        m_treeView->expand(index);\n    }\n}\n\nvoid PackageBrowser::enterKeyPressed(const QModelIndex &index)\n{\n    int type = index.data(PackageType::RoleItem).toInt();\n    if (type == PackageType::ITEM_SOURCE) {\n        QString path = index.data(PackageType::RoleDir).toString();\n        if (!path.isEmpty()) {\n            m_liteApp->fileManager()->openEditor(path);\n        }\n    }\n    if (m_treeView->isExpanded(index)) {\n        m_treeView->collapse(index);\n    } else {\n        m_treeView->expand(index);\n    }\n}\n\nvoid PackageBrowser::customContextMenuRequested(QPoint pos)\n{\n    QMenu *contextMenu = m_rootMenu;\n\n    QModelIndex index = m_treeView->currentIndex();\n    if (index.isValid()) {\n        int type = index.data(PackageType::RoleItem).toInt();\n        if (type == PackageType::ITEM_PACKAGE ||\n                type == PackageType::ITEM_IMPORT ||\n                type == PackageType::ITEM_DEP) {\n            contextMenu = m_pkgMenu;\n        } else if (type == PackageType::ITEM_SOURCE) {\n            contextMenu = m_fileMenu;\n        }\n    }\n    if (contextMenu && contextMenu->actions().count() > 0) {\n        contextMenu->popup(m_treeView->mapToGlobal(pos));\n    }\n}\n\nvoid PackageBrowser::error(QProcess::ProcessError code)\n{\n    m_model->clear();\n    QString goroot = LiteApi::getGOROOT(m_liteApp);\n    m_model->appendRow(new QStandardItem(QString(\"Load Package Error %1\\nGOROOT=%2\").arg(code).arg(goroot)));\n}\n\nvoid PackageBrowser::finished(int code,QProcess::ExitStatus)\n{\n    if (code == 0) {\n        QByteArray data = m_goTool->stdOutputData();\n        resetTree(data);\n    } else {\n        m_model->clear();\n        QString goroot = LiteApi::getGOROOT(m_liteApp);\n        m_model->appendRow(new QStandardItem(QString(\"Load Package Error %1\\nGOROOT=%2\").arg(code).arg(goroot)));\n    }\n}\n\n//github.com/gorilla/securecookie@v1.1.1/fuzz\nstatic QString cleanModPkgName(const QString &pkg)\n{\n    int pos = pkg.indexOf(\"@\");\n    if (pos > 0) {\n        int p2 = pkg.indexOf(\"/\",pos);\n        if (p2 > 0) {\n            return pkg.left(pos)+pkg.mid(p2);\n        } else {\n            return pkg.left(pos);\n        }\n    }\n    return pkg;\n}\n\nvoid PackageBrowser::resetTree(const QByteArray &data)\n{\n    //save state\n    SymbolTreeState state;\n    m_treeView->saveState(&state);\n    m_model->clear();\n    m_modPkgMap.clear();\n    //load tree\n    QStringList rootList = LiteApi::getGOPATH(m_liteApp,true);\n\n    foreach (QString root, rootList) {\n        QStandardItem *item = new QStandardItem(root);\n        QStandardItem *cmd = new QStandardItem(\"cmd\");\n        item->appendRow(cmd);\n        QStandardItem *pkg = new QStandardItem(\"pkg\");\n        item->appendRow(pkg);\n        m_model->appendRow(item);\n        m_treeView->expand(m_model->indexFromItem(item));\n    }\n    QByteArray jsonData;\n    foreach(QByteArray line, data.split('\\n')) {\n        jsonData.append(line);\n        if (line == \"}\") {\n            QJson::Parser parser;\n            bool ok = false;\n            QVariant json = parser.parse(jsonData, &ok).toMap();\n            jsonData.clear();\n            if (!ok) {\n                continue;\n            }\n            QVariantMap jsonMap = json.toMap();\n            QString root = QDir::toNativeSeparators(jsonMap.value(\"Root\").toString());\n            if (root.isEmpty()) {\n                continue;\n            }\n            QStandardItem *parent = 0;\n            for (int i = 0; i < m_model->rowCount(); i++) {\n                QModelIndex index = m_model->index(i,0);\n                if (index.data() == root) {\n                    parent = m_model->itemFromIndex(index);\n                    break;\n                }\n            }\n            if (parent == 0) {\n                continue;\n            }\n            QString pkgName = jsonMap.value(\"ImportPath\").toString();\n            if (pkgName.contains(\"@\") && pkgName.startsWith(\"mod/\")) {\n                //skip main\n                if (jsonMap.value(\"Name\").toString() == \"main\") {\n                    continue;\n                }\n                if (parent->rowCount() == 2) {\n                    parent->appendRow(new QStandardItem(\"pkg/mod\"));\n                }\n                parent = parent->child(2,0);\n            } else {\n                if (jsonMap.value(\"Name\").toString() == \"main\") {\n                    parent = parent->child(0,0);\n                } else {\n                    parent = parent->child(1,0);\n                }\n            }\n            //if (bRoot && pkgName.indexOf(\"_\") == 0) {\n            //    parent = 0;\n            //}\n            if (parent) {\n                QString pkgName = jsonMap.value(\"ImportPath\").toString();\n                QString importPath = pkgName;\n                if (pkgName.contains(\"@\") && pkgName.startsWith(\"mod/\")) {\n                    pkgName.remove(0,4);\n                    m_modPkgMap.insert(cleanModPkgName(pkgName),importPath);\n                }\n                QStandardItem *item = new QStandardItem(pkgName);\n                item->setToolTip(pkgName);\n                item->setData(PackageType::ITEM_PACKAGE,PackageType::RoleItem);\n                item->setData(importPath,PackageType::RoleImportPath);\n                m_pkgJson.insert(pkgName,json);\n                QStandardItem *base = new QStandardItem(\"BaseInfo\");\n                item->appendRow(base);\n                QDir dir(jsonMap.value(\"Dir\").toString());\n                foreach (QString key, jsonMap.keys()) {\n                    QVariant var = jsonMap.value(key);\n                    if (key == \"ImportPath\") {\n                        var = cleanModPkgName(pkgName);\n                    }\n                    if (key.indexOf(\"Error\") >= 0) {\n                        QString text = QString(\"%1 : true\").arg(key);\n                        QStandardItem *ic = new QStandardItem(text);\n                        ic->setToolTip(text);\n                        base->appendRow(ic);\n                        continue;\n                    }\n                    if (var.type() == QVariant::String ||\n                            var.type() == QVariant::Bool) {\n                        QString text = QString(\"%1 : %2\").arg(key).arg(var.toString());\n                        QStandardItem *ic = new QStandardItem(text);\n                        ic->setToolTip(text);\n                        base->appendRow(ic);\n                    } else if (var.type() == QVariant::List) {\n                        PackageType::ITEM_TYPE type = PackageType::ITEM_NONE;\n                        if (key.indexOf(\"Deps\") >= 0) {\n                            type = PackageType::ITEM_DEP;\n                        } else if (key.indexOf(\"Imports\") >= 0) {\n                            type = PackageType::ITEM_IMPORT;\n                        } else if (key.indexOf(\"Files\") >= 0) {\n                            type = PackageType::ITEM_SOURCE;\n                        }\n                        QStandardItem *ic = new QStandardItem(key);\n\n                        foreach(QVariant v, var.toList()) {\n                            if (v.type() == QVariant::String) {\n                                QStandardItem *iv = new QStandardItem(v.toString());\n                                iv->setData(type,PackageType::RoleItem);\n                                if (type == PackageType::ITEM_SOURCE) {\n                                    iv->setData(QFileInfo(dir,v.toString()).filePath(),PackageType::RoleDir);\n                                }\n                                ic->appendRow(iv);\n                            }\n                        }\n                        item->appendRow(ic);\n                    }\n                }\n                parent->appendRow(item);\n            }\n        }\n    }\n    //load state\n    m_treeView->loadState(m_model,&state);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/packagebrowser.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: packagebrowser.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef PACKAGEBROWSER_H\n#define PACKAGEBROWSER_H\n\n#include \"liteapi/liteapi.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"symboltreeview/symboltreeview.h\"\n#include \"gotool.h\"\n\nclass QTreeView;\n\nnamespace PackageType {\n    enum ITEM_TYPE{\n        ITEM_NONE = 0,\n        ITEM_PACKAGE,\n        ITEM_SOURCE,\n        ITEM_IMPORT,\n        ITEM_DEP\n    };\n    enum Role_Type{\n        RoleItem = Qt::UserRole+1,\n        RoleImportPath,\n        RoleDir\n    };\n}\n\nclass QStandardItemModel;\nclass PackageBrowser : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit PackageBrowser(LiteApi::IApplication *app, QObject *parent = 0);\n    ~PackageBrowser();\nsignals:\n\npublic slots:    \n    void toggledToolWindow(bool);\n    void currentEnvChanged(LiteApi::IEnv*);\n    void reloadAll();\n    void setupGopath();\n    void loadPackageDoc();\n    void loadPackageInNewWindow();\n    void addPackageToFolders();\n    void finished(int,QProcess::ExitStatus);\n    void error(QProcess::ProcessError);\n    void customContextMenuRequested(QPoint);\n    void doubleClicked();\n    void enterKeyPressed(const QModelIndex &index);\n    void resetTree(const QByteArray &jsonData);\n    void copyPackageName();\n    void fileWizardFinished(const QString &type, const QString &scheme, const QString &location);\nprotected:\n    bool loadPackageFolderHelper(QModelIndex index, bool add = false);\nprotected:\n    QMap<QString,QString> m_modPkgMap;\n    LiteApi::IApplication *m_liteApp;\n    QWidget      *m_widget;\n    SymbolTreeView    *m_treeView;\n    QStandardItemModel *m_model;\n    GoTool       *m_goTool;\n    bool         m_groupByPath;\n    bool         m_hideStandard;\n    QMenu       *m_rootMenu;\n    QMenu       *m_pkgMenu;\n    QMenu       *m_fileMenu;\n    QAction     *m_reloadAct;\n    QAction     *m_setupGopathAct;\n    QAction     *m_godocAct;\n    QAction     *m_loadPackageInNewWindowAct;\n    QAction     *m_addToFoldersAct;\n    QAction     *m_openSrcAct;\n    QAction     *m_copyNameAct;\n    QAction     *m_toolWindowAct;\n    QMap<QString,QVariant> m_pkgJson;\n    bool         m_bLoaded;\n};\n\n#endif // PACKAGEBROWSER_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/packageproject.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: packageproject.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"packageproject.h\"\n#include \"filepathmodel.h\"\n#include \"gotool.h\"\n#include \"qjson/include/QJson/Parser\"\n#include \"fileutil/fileutil.h\"\n#include \"golangdocapi/golangdocapi.h\"\n#include <QDir>\n#include <QFileInfo>\n#include <QTreeView>\n#include <QStandardItemModel>\n#include <QStandardItem>\n#include <QVBoxLayout>\n#include <QTimer>\n#include <QUrl>\n#include <QMenu>\n#include <QAction>\n#include <QInputDialog>\n#include <QMessageBox>\n#include <QFile>\n#include <QDesktopServices>\n\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nPackageProject::PackageProject(LiteApi::IApplication *app) :\n    m_liteApp(app)\n{\n    m_goTool = new GoTool(m_liteApp,this);\n\n    m_widget = new QWidget;   \n    m_reloadTimer = new QTimer(this);\n    m_reloadTimer->setSingleShot(true);\n\n    QVBoxLayout *layout = new QVBoxLayout;\n    layout->setMargin(0);\n    m_treeView = new PackageTree(m_widget);\n    m_treeView->setEditTriggers(QTreeView::NoEditTriggers);\n    m_treeView->setHeaderHidden(true);\n    m_treeView->setContextMenuPolicy(Qt::CustomContextMenu);\n    layout->addWidget(m_treeView);\n    m_widget->setLayout(layout);\n\n    m_contextMenu = new QMenu;\n\n    QAction *reloadAct = new QAction(tr(\"Reload Package\"),this);\n    QAction *explorerAct = new QAction(tr(\"Open Explorer Here\"),this);\n    QAction *addSource = new QAction(tr(\"Add Source File\"),this);\n    m_contextMenu->addAction(reloadAct);\n    m_contextMenu->addSeparator();\n    m_contextMenu->addAction(explorerAct);\n    m_contextMenu->addAction(addSource);\n\n    connect(m_treeView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(doubleClicked(QModelIndex)));\n    connect(m_goTool,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(finished(int,QProcess::ExitStatus)));\n    //connect(m_liteApp->editorManager(),SIGNAL(editorSaved(LiteApi::IEditor*)),this,SLOT(editorSaved(LiteApi::IEditor*)));\n    connect(m_reloadTimer,SIGNAL(timeout()),this,SLOT(reload()));\n    connect(addSource,SIGNAL(triggered()),this,SLOT(addSource()));\n    connect(reloadAct,SIGNAL(triggered()),this,SLOT(reload()));\n    connect(explorerAct,SIGNAL(triggered()),this,SLOT(openExplorer()));\n    connect(m_treeView,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(customContextMenuRequested(QPoint)));\n}\n\nPackageProject::~PackageProject()\n{\n    if (m_reloadTimer) {\n        m_reloadTimer->stop();\n        delete m_reloadTimer;\n    }\n    if (m_goTool) {\n         delete m_goTool;\n    }\n    if (m_contextMenu) {\n        delete m_contextMenu;\n    }\n    if (m_widget) {\n        delete m_widget;\n    }\n}\n\nvoid PackageProject::customContextMenuRequested(QPoint pos)\n{\n    QMenu *contextMenu = m_contextMenu;\n/*\n    if (node->isDir()) {\n        contextMenu = m_folderMenu;\n    } else {\n        contextMenu = m_fileMenu;\n    }\n*/\n    if (contextMenu && contextMenu->actions().count() > 0) {\n        contextMenu->popup(m_treeView->mapToGlobal(pos));\n    }\n}\n\nvoid PackageProject::loadProject(LiteApi::IApplication *app, const QString &path)\n{\n    PackageProject *project = new PackageProject(app);\n    project->setPath(path);\n    project->reload();\n    app->projectManager()->setCurrentProject(project);\n    QAction *act = app->toolWindowManager()->findToolWindow(app->projectManager()->widget());\n    if (act) {\n        act->setChecked(true);\n    }\n}\n\nvoid PackageProject::setPath(const QString &path)\n{\n    m_filePath = path;\n    m_goTool->setWorkDir(path);\n}\n\nvoid PackageProject::reload()\n{\n    if (m_reloadTimer->isActive()) {\n        m_reloadTimer->stop();\n    }\n    m_goTool->start_list_json();\n}\n\nvoid PackageProject::setJson(const QMap<QString,QVariant> &json)\n{\n    m_json = json;\n}\n\nQWidget *PackageProject::widget()\n{\n    return m_widget;\n}\n\nQString PackageProject::name() const\n{\n    return m_json.value(\"ImportPath\").toString();\n}\nQString PackageProject::filePath() const\n{\n    return m_filePath;\n}\nQString PackageProject::mimeType() const\n{\n    return \"text/x-gopackage\";\n}\n\nQStringList PackageProject::folderList() const\n{\n    return QStringList() << m_filePath;\n}\n\nQStringList PackageProject::fileNameList() const\n{\n    return m_treeView->nameList;\n}\nQStringList PackageProject::filePathList() const\n{\n    return m_treeView->fileList;\n}\nQString PackageProject::fileNameToFullPath(const QString &filePath)\n{\n    QDir dir(m_filePath);\n    return QFileInfo(dir,filePath).filePath();\n}\n\n/*\nvalueForKey\n\nEDITORPATH\nEDITORNAME\nEDITORDIR\n\nPROJECTPATH\nPROJECTNAME\nPROJECTDIR\n\nWORKDIR\n\nTARGETPATH\nTARGETNAME\nTARGETDIR\n*/\n\nQMap<QString,QString> PackageProject::targetInfo() const\n{\n    QMap<QString,QString> m;\n    QDir dir(m_filePath);\n    m.insert(\"WORKDIR\",dir.path());\n    QString name = m_json.value(\"ImportPath\").toString();\n    name = QFileInfo(name).fileName();\n    m.insert(\"TARGETPATH\",QFileInfo(dir,name).filePath());\n    m.insert(\"TARGETNAME\",name);\n    m.insert(\"TARGETDIR\",dir.path());\n    return m;\n}\n\nvoid PackageProject::load()\n{\n    m_treeView->loadJson(m_json);\n}\n\nvoid PackageProject::doubleClicked(QModelIndex index)\n{\n    if (!index.isValid()) {\n        return;\n    }\n    QStandardItem *item = m_treeView->model->itemFromIndex(index);\n    if (!item) {\n        return;\n    }\n    switch (item->data(PackageType::RoleItem).toInt()) {\n        case PackageType::ITEM_SOURCE: {\n            QString path = item->data(RolePath).toString();\n            m_liteApp->fileManager()->openEditor(path,true);\n        }\n        break;\n    case PackageType::ITEM_DEP:\n    case PackageType::ITEM_IMPORT: {\n        QString pkg = item->data(Qt::DisplayRole).toString();\n        LiteApi::IGolangDoc *doc = LiteApi::getGolangDoc(m_liteApp);\n        if (doc) {\n            doc->openUrl(QUrl(QString(\"pdoc:%1\").arg(pkg)));\n            doc->activeBrowser();\n        }\n        }\n        break;\n    }\n\n}\n\nvoid PackageProject::finished(int code, QProcess::ExitStatus)\n{\n    if (code != 0) {\n        return;\n    }\n    QJson::Parser parser;\n    bool ok = false;\n    QVariant json = parser.parse(m_goTool->stdOutputData(), &ok).toMap();\n    if (ok) {\n        m_json = json.toMap();\n        load();\n        emit reloaded();\n    }\n}\n\nvoid PackageProject::editorSaved(LiteApi::IEditor *editor)\n{\n    if (!editor) {\n        return;\n    }\n    QString filePath = editor->filePath();\n    bool find = false;\n    foreach(QString path, m_treeView->fileList) {\n        if (FileUtil::compareFile(filePath,path)) {\n            find = true;\n            break;\n        }\n    }\n    if (find) {\n        //m_reloadTimer->start(10000);\n    }\n}\n\nvoid PackageProject::openExplorer()\n{\n    QDesktopServices::openUrl(QUrl::fromLocalFile(this->filePath()));\n}\n\nvoid PackageProject::addSource()\n{\n    QString source = QInputDialog::getText(m_widget,tr(\"Add Source File\"),tr(\"File Name:\"));\n    if (source.isEmpty()) {\n        return;\n    }\n    QDir dir(m_filePath);\n    QFileInfo info(dir,source);\n    QString fileName = info.filePath();\n    if (info.suffix().isEmpty()) {\n        fileName += \".go\";\n    }\n    if (QFile::exists(fileName)) {\n        QMessageBox::information(m_widget,tr(\"Error\"),QString(tr(\"File %1 already exists.\")).arg(fileName));\n        return;\n    }\n    QFile file(fileName);\n    if (!file.open(QFile::WriteOnly)) {\n        QMessageBox::information(m_widget,tr(\"Error\"),QString(tr(\"Could not open %1 for writing.\")).arg(fileName));\n        return;\n    }\n    file.write(QString(\"package %1\\n\").arg(m_json.value(\"Name\").toString()).toLatin1());\n    file.close();\n    this->reload();\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/packageproject.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: packageproject.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef PACKAGEPROJECT_H\n#define PACKAGEPROJECT_H\n\n#include \"liteapi/liteapi.h\"\n#include \"packagetree.h\"\n#include \"packagebrowser.h\"\n\n#include <QModelIndex>\n#include <QProcess>\n\nclass QTreeView;\nclass FilePathModel;\nclass QStandardItemModel;\nclass QStandardItem;\nclass QDir;\nclass GoTool;\nclass PackageProject : public LiteApi::IProject\n{\n    Q_OBJECT\npublic:\n    enum {\n        ITEM_NONE = 0,\n        ITEM_SOURCE = 1\n    };\n    enum {\n        RoleItem = Qt::UserRole+1,\n        RolePath\n    };\npublic:\n    PackageProject(LiteApi::IApplication *app);\n    ~PackageProject();\n    static void loadProject(LiteApi::IApplication *app, const QString &path);\n    void setPath(const QString &path);\n    void setJson(const QMap<QString,QVariant> &json);\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString filePath() const;\n    virtual QString mimeType() const;\n    virtual QStringList folderList() const;\n    virtual QStringList fileNameList() const;\n    virtual QStringList filePathList() const;\n    virtual QString fileNameToFullPath(const QString &filePath);\n    virtual QMap<QString,QString> targetInfo() const;\n    virtual void load();\npublic slots:\n    void reload();\n    void finished(int,QProcess::ExitStatus);\n    void doubleClicked(QModelIndex);\n    void editorSaved(LiteApi::IEditor*);\n    void addSource();\n    void openExplorer();\n    void customContextMenuRequested(QPoint);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QWidget *m_widget;\n    QMenu   *m_contextMenu;\n    PackageTree *m_treeView;\n    QMap<QString,QVariant> m_json;\n    GoTool      *m_goTool;\n    QTimer      *m_reloadTimer;\n    QString      m_filePath;\n};\n\n#endif // PACKAGEPROJECT_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/packageprojectfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: packageprojectfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"packageprojectfactory.h\"\n#include \"packageproject.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nPackageProjectFactory::PackageProjectFactory(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IProjectFactory(parent),\n    m_liteApp(app)\n{\n    m_mimeTypes.append(\"text/x-gopackage\");\n    m_mimeTypes.append(\"text/x-gocommand\");\n}\n\nQStringList PackageProjectFactory::mimeTypes() const\n{\n    return m_mimeTypes;\n}\n\nLiteApi::IProject *PackageProjectFactory::open(const QString &fileName, const QString &mimeType)\n{\n    if (!m_mimeTypes.contains(mimeType)) {\n        return 0;\n    }\n    PackageProject *project = new PackageProject(m_liteApp);\n    project->setPath(fileName);\n    project->reload();\n\n    return project;\n}\n\nbool PackageProjectFactory::findTargetInfo(const QString&, const QString&, QMap<QString,QString>&) const\n{\n    return false;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/packageprojectfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: packageprojectfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef PACKAGEPROJECTFACTORY_H\n#define PACKAGEPROJECTFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n#include \"packagebrowser.h\"\n\nclass PackageProjectFactory : public LiteApi::IProjectFactory\n{\npublic:\n    PackageProjectFactory(LiteApi::IApplication *app, QObject *parnet);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IProject *open(const QString &fileName, const QString &mimeType);\n    virtual bool findTargetInfo(const QString &fileName, const QString &mimetype,  QMap<QString,QString>& targetInfo) const;\npublic:\n    LiteApi::IApplication *m_liteApp;\n    QStringList m_mimeTypes;\n};\n\n#endif // PACKAGEPROJECTFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/packagetree.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: packagetree.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"packagetree.h\"\n\n#include <QStandardItem>\n#include <QStandardItemModel>\n#include <QDir>\n#include <QFileInfo>\n#include \"packagebrowser.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nPackageTree::PackageTree(QWidget *parent) :\n    SymbolTreeView(parent),\n    root(0)\n{\n    model = new QStandardItemModel(this);\n    this->setModel(model);\n}\n\nvoid PackageTree::loadJson(const QMap<QString, QVariant> &jsonMap)\n{\n    SymbolTreeState state;\n    this->saveState(&state);\n    model->clear();\n    QStandardItem *item = new QStandardItem(jsonMap.value(\"ImportPath\").toString());\n\n    QStandardItem *base = new QStandardItem(\"BaseInfo\");\n    item->appendRow(base);\n    QDir dir(jsonMap.value(\"Dir\").toString());\n    foreach (QString key, jsonMap.keys()) {\n        QVariant var = jsonMap.value(key);\n        if (key.indexOf(\"Error\") >= 0) {\n            QString text = QString(\"%1 : true\").arg(key);\n            QStandardItem *ic = new QStandardItem(text);\n            ic->setToolTip(text);\n            base->appendRow(ic);\n            continue;\n        }\n        if (var.type() == QVariant::String ||\n            var.type() == QVariant::Bool) {\n            QString text = QString(\"%1 : %2\").arg(key).arg(var.toString());\n            QStandardItem *ic = new QStandardItem(text);\n            ic->setToolTip(text);\n            base->appendRow(ic);\n        } else if (var.type() == QVariant::List) {\n            PackageType::ITEM_TYPE type = PackageType::ITEM_NONE;\n            if (key.indexOf(\"Deps\") >= 0) {\n                type = PackageType::ITEM_DEP;\n            } else if (key.indexOf(\"Imports\") >= 0) {\n                type = PackageType::ITEM_IMPORT;\n            } else if (key.indexOf(\"Files\") >= 0) {\n                type = PackageType::ITEM_SOURCE;\n            }\n            QStandardItem *ic = new QStandardItem(key);\n\n            foreach(QVariant v, var.toList()) {\n                if (v.type() == QVariant::String) {\n                    QStandardItem *iv = new QStandardItem(v.toString());\n                    iv->setData(type,PackageType::RoleItem);\n                    if (type == PackageType::ITEM_SOURCE) {\n                        iv->setData(QFileInfo(dir,v.toString()).filePath(),PackageType::RoleDir);\n                    }\n                    ic->appendRow(iv);\n                }\n            }\n            item->appendRow(ic);\n        }\n    }\n\n    model->appendRow(item);\n\n    this->loadState(this->model,&state);\n\n    fileList.clear();\n    nameList.clear();\n\n    QStringList nameFilter;\n    nameFilter << \"*.go\" << \"*.h\" << \"*.c\" << \"*.cpp\" << \"*.s\";\n    foreach(QFileInfo info, dir.entryInfoList(nameFilter,QDir::Files,QDir::Type|QDir::Name)) {\n        fileList.append(info.filePath());\n        nameList.append(info.fileName());\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangpackage/packagetree.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: packagetree.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef PACKAGETREE_H\n#define PACKAGETREE_H\n\n#include \"symboltreeview/symboltreeview.h\"\n\nclass QStandardItemModel;\nclass QStandardItem;\nclass PackageTree : public SymbolTreeView\n{\n    Q_OBJECT\npublic:\n    explicit PackageTree(QWidget *parent = 0);\n    void loadJson(const QMap<QString,QVariant> &json);\npublic:\n    QStandardItem *root;\n    QStandardItem *src;\n    QStandardItem *imports;\n    QStandardItem *deps;\n    QStandardItemModel *model;\n    QStringList fileList;\n    QStringList nameList;\n};\n\n#endif // PACKAGETREE_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangplay/golangplay.pro",
    "content": "TARGET = golangplay\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude(../../utils/fileutil/fileutil.pri)\ninclude(../../utils/textoutput/textoutput.pri)\ninclude(../../utils/processex/processex.pri)\ninclude (../../utils/colorstyle/colorstyle.pri)\n\nDEFINES += GOLANGPLAY_LIBRARY\n\nSOURCES += golangplayplugin.cpp \\\n    goplaybrowser.cpp\n\nHEADERS += golangplayplugin.h\\\n        golangplay_global.h \\\n    goplaybrowser.h\n"
  },
  {
    "path": "liteidex/src/plugins/golangplay/golangplay_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangplay_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGPLAY_GLOBAL_H\n#define GOLANGPLAY_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(GOLANGPLAY_LIBRARY)\n#  define GOLANGPLAYSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define GOLANGPLAYSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#endif // GOLANGPLAY_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangplay/golangplayplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangplayplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangplayplugin.h\"\n#include \"goplaybrowser.h\"\n#include \"liteapi/liteobj.h\"\n#include <QAction>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangPlayPlugin::GolangPlayPlugin()\n{\n}\n\nbool GolangPlayPlugin::load(LiteApi::IApplication *app)\n{\n    GoplayBrowser *gopaly = new GoplayBrowser(app,this);\n    QAction *act = app->editorManager()->registerBrowser(gopaly);\n    act->setIcon(QIcon(\"icon:images/gopher.png\"));\n    app->actionManager()->insertViewMenu(LiteApi::ViewMenuBrowserPos,act);\n    return true;\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/golangplay/golangplayplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangplayplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGPLAYPLUGIN_H\n#define GOLANGPLAYPLUGIN_H\n\n#include \"golangplay_global.h\"\n#include \"liteapi/liteapi.h\"\n#include <QtPlugin>\n\nclass GolangPlayPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    GolangPlayPlugin();\n    virtual bool load(LiteApi::IApplication *app);\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<GolangPlayPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.GolangPlayPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/golangplay\");\n        m_info->setName(\"GolangPlay\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setVer(\"X38.1\");\n        m_info->setInfo(\"Golang Playground\");\n        m_info->appendDepend(\"plugin/liteeditor\");\n        m_info->appendDepend(\"plugin/golangedit\");\n    }\n};\n\n#endif // GOLANGPLAYPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangplay/goplaybrowser.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: goplaybrowser.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"goplaybrowser.h\"\r\n#include \"liteenvapi/liteenvapi.h\"\r\n#include \"fileutil/fileutil.h\"\r\n#include \"textoutput/textoutput.h\"\r\n#include \"processex/processex.h\"\r\n#include <QVBoxLayout>\r\n#include <QHBoxLayout>\r\n#include <QSplitter>\r\n#include <QToolBar>\r\n#include <QLabel>\r\n#include <QPushButton>\r\n#include <QPlainTextEdit>\r\n#include <QProcess>\r\n#include <QTextCodec>\r\n#include <QDesktopServices>\r\n#include <QFileInfo>\r\n#include <QDir>\r\n#include <QFile>\r\n#include <QInputDialog>\r\n#include <QMessageBox>\r\n#include <QUrl>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nQString data = \"package main\\n\\nimport (\\n\\t\\\"fmt\\\"\\n)\\n\\nfunc main() {\\n\\tfmt.Println(\\\"Hello World\\\")\\n}\";\r\nGoplayBrowser::GoplayBrowser(LiteApi::IApplication *app, QObject *parent)\r\n    : LiteApi::IBrowserEditor(parent),\r\n      m_liteApp(app)\r\n{\r\n    m_widget = new QWidget;\r\n    m_output = new TextOutput(m_liteApp);\r\n\r\n    m_editor = m_liteApp->fileManager()->createEditor(data,\"text/x-gosrc\");\r\n\r\n    QToolBar *toolBar = new QToolBar;\r\n\r\n    QVBoxLayout *layout = new QVBoxLayout;\r\n    QSplitter *spliter = new QSplitter(Qt::Vertical);\r\n\r\n    QLabel *label = new QLabel(QString(\"%1\").arg(tr(\"Go Playground\")));\r\n\r\n    QAction *run = new QAction(tr(\"Run\"),this);\r\n    QAction *stop = new QAction(tr(\"Stop\"),this);\r\n    QAction *_new = new QAction(tr(\"New\"),this);\r\n    QAction *load = new QAction(tr(\"Load...\"),this);\r\n    QAction *save = new QAction(tr(\"Save...\"),this);\r\n    QAction *shell = new QAction(tr(\"Explore Folder\"),this);\r\n    m_editLabel  = new QLabel;\r\n\r\n    toolBar->addWidget(label);\r\n    toolBar->addSeparator();\r\n    toolBar->addAction(run);\r\n    toolBar->addAction(stop);\r\n    toolBar->addAction(_new);\r\n    toolBar->addAction(load);\r\n    toolBar->addAction(save);\r\n    toolBar->addSeparator();\r\n    toolBar->addAction(shell);\r\n    toolBar->addSeparator();\r\n    toolBar->addWidget(m_editLabel);\r\n\r\n    layout->addWidget(toolBar);\r\n\r\n    spliter->addWidget(m_editor->widget());\r\n    spliter->addWidget(m_output);\r\n    spliter->setStretchFactor(0,2);\r\n    spliter->setStretchFactor(1,1);\r\n    layout->addWidget(spliter);\r\n\r\n    m_widget->setLayout(layout);\r\n\r\n    m_process = new ProcessEx(this);\r\n    m_codec = QTextCodec::codecForName(\"utf-8\");\r\n\r\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(m_liteApp,\"App\");\r\n    actionContext->regAction(run,\"GoplayRun\",\"Ctrl+R\");\r\n\r\n    connect(run,SIGNAL(triggered()),this,SLOT(run()));\r\n    connect(stop,SIGNAL(triggered()),this,SLOT(stop()));\r\n    connect(_new,SIGNAL(triggered()),this,SLOT(newPlay()));\r\n    connect(load,SIGNAL(triggered()),this,SLOT(loadPlay()));\r\n    connect(save,SIGNAL(triggered()),this,SLOT(savePlay()));\r\n    connect(shell,SIGNAL(triggered()),this,SLOT(shell()));\r\n    connect(m_process,SIGNAL(started()),this,SLOT(runStarted()));\r\n    connect(m_process,SIGNAL(extOutput(QByteArray,bool)),this,SLOT(runOutput(QByteArray,bool)));\r\n    connect(m_process,SIGNAL(extFinish(bool,int,QString)),this,SLOT(runFinish(bool,int,QString)));\r\n\r\n    m_liteApp->extension()->addObject(\"LiteApi.Goplay\",this);\r\n    m_liteApp->extension()->addObject(\"LiteApi.Goplay.IEditor\",m_editor);\r\n}\r\n\r\nGoplayBrowser::~GoplayBrowser()\r\n{\r\n    delete m_editor;\r\n    delete m_widget;\r\n}\r\n\r\nQWidget *GoplayBrowser::widget()\r\n{\r\n    return m_widget;\r\n}\r\n\r\nQString GoplayBrowser::name() const\r\n{\r\n    return tr(\"Go Playground\");\r\n}\r\n\r\nQString GoplayBrowser::mimeType() const\r\n{\r\n    return \"browser/goplay\";\r\n}\r\n\r\nvoid GoplayBrowser::onActive()\r\n{\r\n    static bool init = false;\r\n    if (!init) {\r\n        init = true;\r\n        QDir dir(m_liteApp->storagePath());\r\n        dir.mkpath(\"goplay\");\r\n        m_dataPath = dir.path()+\"/goplay\";\r\n        m_playFile = QFileInfo(dir,\"goplay.go\").filePath();\r\n        QFile file(m_playFile);\r\n        if (file.open(QFile::WriteOnly|QIODevice::Text)) {\r\n            file.write(data.toUtf8());\r\n            file.close();\r\n        }\r\n        m_process->setWorkingDirectory(dir.path());\r\n\r\n        m_editor->open(m_playFile,\"text/x-gosrc\");\r\n    }\r\n}\r\n\r\nvoid GoplayBrowser::run()\r\n{\r\n    m_editor->saveAs(m_playFile);\r\n    if (!m_editFile.isEmpty()) {\r\n        m_editor->saveAs(m_editFile);\r\n    }\r\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\r\n    QString go = FileUtil::lookPath(\"go\",env,false);\r\n    QStringList args;\r\n    args << \"run\";\r\n    args << \"goplay.go\";\r\n\r\n    m_process->stopAndWait(100,2000);\r\n\r\n    m_output->clear();\r\n    m_output->appendTag(tr(\"Running...\")+\"\\n\\n\");\r\n    m_process->setEnvironment(env.toStringList());\r\n\r\n    m_process->start(go,args);\r\n}\r\n\r\nvoid GoplayBrowser::stop()\r\n{\r\n    m_process->stop(100);\r\n}\r\n\r\nvoid GoplayBrowser::runOutput(const QByteArray &data,bool)\r\n{\r\n    m_output->append(m_codec->toUnicode(data));\r\n}\r\n\r\nvoid GoplayBrowser::runFinish(bool err,int code,const QString &msg)\r\n{\r\n    m_output->setReadOnly(true);\r\n    if (err || code != 0) {\r\n        m_output->appendTag(\"\\n\"+tr(\"Error: %1.\").arg(msg),true);\r\n    } else {\r\n        m_output->appendTag(\"\\n\"+tr(\"Success: %2.\").arg(msg));\r\n    }\r\n}\r\n\r\nvoid GoplayBrowser::runStarted()\r\n{\r\n    m_output->setReadOnly(false);\r\n}\r\n\r\nvoid GoplayBrowser::newPlay()\r\n{\r\n    /*\r\n    if (m_editor->isModified()) {\r\n        int r = QMessageBox::question(m_widget,tr(\"Goplay\"),tr(\"File is Modified, save or cancel?\"),QMessageBox::Save,QMessageBox::No,QMessageBox::Cancel);\r\n        if (r == QMessageBox::Cancel) {\r\n            return;\r\n        }\r\n        if (r == QMessageBox::Save) {\r\n            savePlay();\r\n        }\r\n    }\r\n    */\r\n    m_editFile.clear();\r\n    QPlainTextEdit *edit = LiteApi::findExtensionObject<QPlainTextEdit*>(m_editor,\"LiteApi.QPlainTextEdit\");\r\n    if (edit) {\r\n        edit->setPlainText(data);\r\n    }\r\n    m_editLabel->setText(\"\");\r\n}\r\n\r\nvoid GoplayBrowser::loadPlay()\r\n{\r\n    /*\r\n    if (m_editor->isModified()) {\r\n        int r = QMessageBox::question(m_widget,tr(\"Goplay\"),tr(\"File is Modified, save or cancel?\"),QMessageBox::Save,QMessageBox::No,QMessageBox::Cancel);\r\n        if (r == QMessageBox::Cancel) {\r\n            return;\r\n        }\r\n        if (r == QMessageBox::Save) {\r\n            savePlay();\r\n        }\r\n    }\r\n    */\r\n\r\n    QDir dir(m_dataPath);\r\n    QStringList items = dir.entryList(QStringList() << \"*.go\",QDir::Files);\r\n    if (items.isEmpty()) {\r\n        return;\r\n    }\r\n    bool ok = false;\r\n    QString name = QInputDialog::getItem(m_widget,tr(\"Load File\"),tr(\"Select a file to load:\"),items,0,false,&ok);\r\n    if (!ok) {\r\n        return;\r\n    }\r\n    if (name.isEmpty()) {\r\n        return;\r\n    }\r\n    m_editLabel->setText(name);\r\n    m_editFile = QFileInfo(QDir(m_dataPath),name).filePath();\r\n    m_editor->open(m_editFile,\"text/x-gosrc\");\r\n}\r\n\r\nvoid GoplayBrowser::savePlay()\r\n{\r\n    if (m_editFile.isEmpty()) {\r\n        bool ok = false;\r\n        QString name = QInputDialog::getText(m_widget,tr(\"Save File\"),tr(\"New File Name:\"),QLineEdit::Normal,\"\",&ok);\r\n        if (!ok) {\r\n            return;\r\n        }\r\n        if (name.isEmpty()) {\r\n            return;\r\n        }\r\n        if (name.right(3) != \".go\") {\r\n            name += \".go\";\r\n        }\r\n        m_editLabel->setText(name);\r\n        m_editFile = QFileInfo(QDir(m_dataPath),name).filePath();\r\n    }\r\n    m_editor->saveAs(m_editFile);\r\n}\r\n\r\nvoid GoplayBrowser::shell()\r\n{\r\n    QDesktopServices::openUrl(QUrl::fromLocalFile(m_dataPath));\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/golangplay/goplaybrowser.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: goplaybrowser.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOPLAYBROWSER_H\n#define GOPLAYBROWSER_H\n\n#include \"liteapi/liteapi.h\"\n\nclass QPlainTextEdit;\nclass ProcessEx;\nclass TextOutput;\nclass QTextCodec;\nclass QLabel;\nclass GoplayBrowser : public LiteApi::IBrowserEditor\n{\n    Q_OBJECT\npublic:\n    GoplayBrowser(LiteApi::IApplication *app, QObject *parent);\n    virtual ~GoplayBrowser();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void onActive();\npublic slots:\n    void run();\n    void stop();\n    void newPlay();\n    void loadPlay();\n    void savePlay();\n    void shell();\n    void runOutput(const QByteArray &data,bool);\n    void runFinish(bool,int,const QString &msg);\n    void runStarted();\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QWidget *m_widget;\n    LiteApi::IEditor *m_editor;\n    TextOutput       *m_output;\n    ProcessEx         *m_process;\n    QTextCodec       *m_codec;\n    QLabel           *m_editLabel;\n    QString           m_dataPath;\n    QString           m_playFile;\n    QString           m_editFile;\n};\n\n#endif // GOPLAYBROWSER_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangpresent/exportdialog.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: exportdialog.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"exportdialog.h\"\n#include \"ui_exportdialog.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nExportDialog::ExportDialog(QWidget *parent) :\n    QDialog(parent),\n    ui(new Ui::ExportDialog),\n    m_bView(false)\n{\n    ui->setupUi(this);\n}\n\nExportDialog::~ExportDialog()\n{\n    delete ui;\n}\n\nQString ExportDialog::fileName() const\n{\n    return ui->fileName->text();\n}\n\nvoid ExportDialog::setFileName(const QString &text)\n{\n    ui->fileName->setText(text);\n}\n\nvoid ExportDialog::on_exportButton_clicked()\n{\n    m_bView = false;\n    this->accept();\n}\n\nvoid ExportDialog::on_exportAndViewButton_clicked()\n{\n    m_bView = true;\n    this->accept();\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangpresent/exportdialog.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: exportdialog.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef EXPORTDIALOG_H\n#define EXPORTDIALOG_H\n\n#include <QDialog>\n\nnamespace Ui {\nclass ExportDialog;\n}\n\nclass ExportDialog : public QDialog\n{\n    Q_OBJECT\n    \npublic:\n    explicit ExportDialog(QWidget *parent = 0);\n    ~ExportDialog();\n    QString fileName() const;\n    void setFileName(const QString &text);\n    bool isExportAndView() const { return m_bView; }\nprivate slots:\n    void on_exportButton_clicked();\n    void on_exportAndViewButton_clicked();\nprivate:\n    Ui::ExportDialog *ui;\n    bool m_bView;\n};\n\n#endif // EXPORTDIALOG_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangpresent/exportdialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>ExportDialog</class>\n <widget class=\"QDialog\" name=\"ExportDialog\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>348</width>\n    <height>71</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Dialog</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n   <item>\n    <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\">\n     <item>\n      <widget class=\"QLabel\" name=\"label\">\n       <property name=\"text\">\n        <string>Name:</string>\n       </property>\n      </widget>\n     </item>\n     <item>\n      <widget class=\"QLineEdit\" name=\"fileName\"/>\n     </item>\n    </layout>\n   </item>\n   <item>\n    <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n     <item>\n      <spacer name=\"horizontalSpacer\">\n       <property name=\"orientation\">\n        <enum>Qt::Horizontal</enum>\n       </property>\n       <property name=\"sizeHint\" stdset=\"0\">\n        <size>\n         <width>40</width>\n         <height>20</height>\n        </size>\n       </property>\n      </spacer>\n     </item>\n     <item>\n      <widget class=\"QPushButton\" name=\"exportButton\">\n       <property name=\"text\">\n        <string>Export</string>\n       </property>\n      </widget>\n     </item>\n     <item>\n      <widget class=\"QPushButton\" name=\"exportAndViewButton\">\n       <property name=\"text\">\n        <string>ExportAndView</string>\n       </property>\n      </widget>\n     </item>\n    </layout>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/golangpresent/golangpresent.pro",
    "content": "TARGET = golangpresent\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude (../../utils/editorutil/editorutil.pri)\ninclude (../../utils/fileutil/fileutil.pri)\ninclude (../../utils/processex/processex.pri)\n\nDEFINES += GOLANGPRESENT_LIBRARY\n\nSOURCES += \\\n    golangpresentedit.cpp \\\n    golangpresentplugin.cpp \\\n    exportdialog.cpp\n\nHEADERS +=\\\n    golangpresent_global.h \\\n    golangpresentedit.h \\\n    golangpresentplugin.h \\\n    exportdialog.h\n\nRESOURCES += \\\n    golangpresent.qrc\n\nFORMS += \\\n    exportdialog.ui\n"
  },
  {
    "path": "liteidex/src/plugins/golangpresent/golangpresent.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/golangpresent\">\n        <file>images/bold.png</file>\n        <file>images/code.png</file>\n        <file>images/image.png</file>\n        <file>images/italic.png</file>\n        <file>images/link.png</file>\n        <file>images/quote.png</file>\n        <file>images/config.png</file>\n        <file>images/s1.png</file>\n        <file>images/s2.png</file>\n        <file>images/s3.png</file>\n        <file>images/bullets.png</file>\n        <file>images/exporthtml.png</file>\n        <file>images/exportpdf.png</file>\n        <file>images/verify.png</file>\n    </qresource>\n</RCC>\n"
  },
  {
    "path": "liteidex/src/plugins/golangpresent/golangpresent_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangpresent_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGPRESENT_GLOBAL_H\n#define GOLANGPRESENT_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(GOLANGPRESENT_LIBRARY)\n#  define GOLANGPRESENTSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define GOLANGPRESENTSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#endif // GOLANGPRESENT_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangpresent/golangpresentedit.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangpresentedit.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangpresentedit.h\"\n#include \"editorutil/editorutil.h\"\n#include \"fileutil/fileutil.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n#include \"exportdialog.h\"\n#include <QToolBar>\n#include <QMenu>\n#include <QAction>\n#include <QTextCursor>\n#include <QTextBlock>\n#include <QProcess>\n#include <QFileDialog>\n#include <QDesktopServices>\n#include <QRegExp>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangPresentEdit::GolangPresentEdit(LiteApi::IApplication *app, LiteApi::IEditor *editor, QObject *parent) :\n    QObject(parent), m_liteApp(app), m_htmldoc(0), m_process(0)\n{\n    m_editor = LiteApi::getLiteEditor(editor);\n    if (!m_editor) {\n        return;\n    }\n    m_ed = LiteApi::getPlainTextEdit(editor);\n    m_editor->setLineWrap(true);\n\n    connect(m_liteApp->editorManager(),SIGNAL(editorSaved(LiteApi::IEditor*)),this,SLOT(editorSaved(LiteApi::IEditor*)));\n\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(this,\"GoSlide\");\n\n    QAction *s1 = new QAction(QIcon(\"icon:golangpresent/images/s1.png\"),tr(\"Section (s1)\"),this);\n    actionContext->regAction(s1,\"Section\",\"Ctrl+1\");\n\n    QAction *s2 = new QAction(QIcon(\"icon:golangpresent/images/s2.png\"),tr(\"Subsection (s2)\"),this);\n    actionContext->regAction(s2,\"Subsection\",\"Ctrl+2\");\n\n    QAction *s3 = new QAction(QIcon(\"icon:golangpresent/images/s3.png\"),tr(\"Sub-subsection (s3)\"),this);\n    actionContext->regAction(s3,\"Sub-subsection\",\"Ctrl+3\");\n\n    QAction *bold = new QAction(QIcon(\"icon:golangpresent/images/bold.png\"),tr(\"Bold\"),this);\n    actionContext->regAction(bold,\"Bold\",QKeySequence::Bold);\n\n    QAction *italic = new QAction(QIcon(\"icon:golangpresent/images/italic.png\"),tr(\"Italic\"),this);\n    actionContext->regAction(italic,\"Italic\",QKeySequence::Italic);\n\n    QAction *code = new QAction(QIcon(\"icon:golangpresent/images/code.png\"),tr(\"Inline Code\"),this);\n    actionContext->regAction(code,\"InlineCode\",\"Ctrl+K\");\n\n    QAction *bullets = new QAction(QIcon(\"icon:golangpresent/images/bullets.png\"),tr(\"Switch Bullets\"),this);\n    actionContext->regAction(bullets,\"Switch Bullets\",\"Ctrl+Shift+U\");\n\n    QAction *comment = new QAction(tr(\"Comment/Uncomment Selection\"),this);\n    actionContext->regAction(comment,\"Comment\",\"Ctrl+/\");\n\n    QAction *exportHtml = new QAction(QIcon(\"icon:golangpresent/images/exporthtml.png\"),tr(\"Export HTML\"),this);\n    actionContext->regAction(exportHtml,\"Export HTML\",\"\");\n\n    QAction *verify = new QAction(QIcon(\"icon:golangpresent/images/verify.png\"),tr(\"Verify Present\"),this);\n    actionContext->regAction(verify,\"Verify Present\",\"\");\n\n    //QAction *exportPdf = new QAction(QIcon(\"icon:golangpresent/images/exportpdf.png\"),tr(\"Export PDF\"),this);\n    //actionContext->regAction(exportPdf,\"Export PDF\",\"\");\n\n    connect(m_editor,SIGNAL(destroyed()),this,SLOT(deleteLater()));\n    connect(s1,SIGNAL(triggered()),this,SLOT(s1()));\n    connect(s2,SIGNAL(triggered()),this,SLOT(s2()));\n    connect(s3,SIGNAL(triggered()),this,SLOT(s3()));\n    connect(bold,SIGNAL(triggered()),this,SLOT(bold()));\n    connect(italic,SIGNAL(triggered()),this,SLOT(italic()));\n    connect(code,SIGNAL(triggered()),this,SLOT(code()));\n    connect(bullets,SIGNAL(triggered()),this,SLOT(bullets()));\n    connect(comment,SIGNAL(triggered()),this,SLOT(comment()));\n    connect(exportHtml,SIGNAL(triggered()),this,SLOT(exportHtml()));\n    connect(verify,SIGNAL(triggered()),this,SLOT(verify()));\n    //connect(exportPdf,SIGNAL(triggered()),this,SLOT(exportPdf()));\n\n    QToolBar *toolBar = LiteApi::getEditToolBar(editor);\n    if (toolBar) {\n        toolBar->addSeparator();\n        toolBar->addAction(s1);\n        toolBar->addAction(s2);\n        toolBar->addAction(s3);\n        toolBar->addSeparator();\n        toolBar->addAction(bold);\n        toolBar->addAction(italic);\n        toolBar->addAction(code);\n        toolBar->addSeparator();\n        toolBar->addAction(bullets);\n        toolBar->addSeparator();\n        toolBar->addAction(verify);\n        toolBar->addSeparator();\n        toolBar->addAction(exportHtml);\n        //toolBar->addAction(exportPdf);\n    }\n\n    QMenu *menu = LiteApi::getEditMenu(editor);\n    if (menu) {\n        menu->addSeparator();\n        menu->addAction(s1);\n        menu->addAction(s2);\n        menu->addAction(s3);\n        menu->addSeparator();\n        menu->addAction(bold);\n        menu->addAction(italic);\n        menu->addAction(code);\n        menu->addSeparator();\n        menu->addAction(bullets);\n        menu->addSeparator();\n        menu->addAction(comment);\n        menu->addSeparator();\n        menu->addAction(verify);\n        menu->addSeparator();\n        menu->addAction(exportHtml);\n        //menu->addAction(exportPdf);\n    }\n\n    menu = LiteApi::getContextMenu(editor);\n    if (menu) {\n       menu->addSeparator();\n       menu->addAction(s1);\n       menu->addAction(s2);\n       menu->addAction(s3);\n       menu->addSeparator();\n       menu->addAction(bold);\n       menu->addAction(italic);\n       menu->addAction(code);\n       menu->addSeparator();\n       menu->addAction(bullets);\n       menu->addSeparator();\n       menu->addAction(comment);\n    }\n}\n\nvoid GolangPresentEdit::editorSaved(LiteApi::IEditor *editor)\n{\n    if (editor == m_editor) {\n        this->verify();\n    }\n}\n\nvoid GolangPresentEdit::s1()\n{\n    EditorUtil::InsertHead(m_ed,\"* \");\n}\n\nvoid GolangPresentEdit::s2()\n{\n    EditorUtil::InsertHead(m_ed,\"** \");\n}\n\nvoid GolangPresentEdit::s3()\n{\n    EditorUtil::InsertHead(m_ed,\"*** \");\n}\n\nvoid GolangPresentEdit::bold()\n{\n    EditorUtil::MarkSelection(m_ed,\"*\");\n}\n\nvoid GolangPresentEdit::italic()\n{\n    EditorUtil::MarkSelection(m_ed,\"_\");\n}\n\nvoid GolangPresentEdit::code()\n{\n    EditorUtil::MarkSelection(m_ed,\"`\");\n}\n\nvoid GolangPresentEdit::bullets()\n{\n    EditorUtil::SwitchHead(m_ed,\"- \",QStringList() << \"- \");\n}\n\nvoid GolangPresentEdit::comment()\n{\n    EditorUtil::SwitchHead(m_ed,\"# \",QStringList() << \"# \" << \"#\");\n}\n\nvoid GolangPresentEdit::verify()\n{\n    startExportHtmlDoc(EXPORT_TYPE_VERIFY);\n}\n\nvoid GolangPresentEdit::exportHtml()\n{\n    startExportHtmlDoc(EXPORT_TYPE_HTML);\n}\n\nvoid GolangPresentEdit::exportPdf()\n{\n    startExportHtmlDoc(EXPORT_TYPE_PDF);\n}\n\nvoid GolangPresentEdit::extOutput(const QByteArray &data, bool bError)\n{\n    if (!bError) {\n        m_exportData.append(data);\n    } else {\n        QString msg = QString::fromUtf8(data);\n        m_editor->setNavigateHead(LiteApi::EditorNavigateError,msg);\n        QRegExp re(\"(\\\\w?:?[\\\\w\\\\d_@\\\\-\\\\\\\\/\\\\.]+):(\\\\d+):\");\n        if ((re.indexIn(msg)>=0) && re.captureCount() >= 2) {\n            bool ok = false;\n            int line = re.cap(2).toInt(&ok);\n            if (ok) {\n                QString errmsg = re.cap(0)+\"\\n\"+msg.mid(re.cap(0).length()).trimmed();\n                m_editor->insertNavigateMark(line-1,LiteApi::EditorNavigateError,errmsg, GOPRESENT_TAG);\n                m_errorMsg.append(errmsg);\n            }\n        } else {\n            m_errorMsg.append(msg);\n        }\n    }\n}\n\nvoid GolangPresentEdit::extFinish(bool error, int code, QString /*msg*/)\n{\n    int exportType = m_process->userData(0).toInt();\n    if (exportType == EXPORT_TYPE_VERIFY) {\n        if (!error && code == 0) {\n            m_editor->setNavigateHead(LiteApi::EditorNavigateNormal,tr(\"Present verify success\"));\n        } else {\n            m_editor->setNavigateHead(LiteApi::EditorNavigateError,tr(\"Present verify false\")+\"\\n\"+m_errorMsg.join(\"\\n\"));\n        }\n    } else if (error || code != 0) {\n        m_liteApp->appendLog(\"GolangPresent\",m_errorMsg.join(\";\"),true);\n    }\n    if (!error && code == 0) {\n        if (exportType == EXPORT_TYPE_HTML) {\n            QFileInfo info(m_editor->filePath());\n            ExportDialog dlg(m_liteApp->mainWindow());\n            dlg.setWindowTitle(tr(\"Export HTML\"));\n            dlg.setFileName(info.completeBaseName()+\".html\");\n            if (!m_exportName.isEmpty()) {\n                dlg.setFileName(m_exportName);\n            }\n            if (dlg.exec() == QDialog::Rejected) {\n                return;\n            }\n            QString exportFile = dlg.fileName();\n            if (exportFile.isEmpty()) {\n                return;\n            }\n            m_exportName = exportFile;\n            QFileInfo exportInfo(exportFile);\n            QString ext = exportInfo.suffix().toLower();\n            if (ext != \"html\" && ext != \"htm\") {\n                exportInfo = QFileInfo(exportFile += \".html\");\n            }\n            if (!exportInfo.isAbsolute()) {\n                exportInfo = QFileInfo(info.absolutePath(),exportInfo.fileName());\n            }\n            QFile file(exportInfo.filePath());\n            if (!file.open(QFile::WriteOnly)) {\n                return;\n            }\n            file.write(m_exportData);\n            QDir dir(exportInfo.absolutePath());\n            dir.mkdir(\"static\");\n            dir.mkdir(\"js\");\n            FileUtil::CopyDirectory(m_liteApp->resourcePath()+\"/packages/gopresent/static\",dir.path()+\"/static\");\n            FileUtil::CopyDirectory(m_liteApp->resourcePath()+\"/packages/gopresent/js\",dir.path()+\"/js\");\n            m_liteApp->appendLog(\"GoPresent\",\"export \"+exportInfo.filePath(),false);\n            if (dlg.isExportAndView()) {\n                LiteApi::IWebKitBrowser *browser = LiteApi::getWebKitBrowser(m_liteApp);\n                if (browser) {\n                    m_liteApp->editorManager()->activeBrowser(browser);\n                    browser->openUrl(QUrl::fromLocalFile(exportInfo.filePath()));\n                } else {\n                    QDesktopServices::openUrl(QUrl::fromLocalFile(exportInfo.filePath()));\n                }\n            }\n        } else if (exportType == EXPORT_TYPE_PDF) {\n            QString init = QFileInfo(m_editor->filePath()).absolutePath()+\"/\"+QFileInfo(m_editor->filePath()).completeBaseName()+\".pdf\";\n            m_pdfFileName = QFileDialog::getSaveFileName(m_liteApp->mainWindow(),tr(\"Export PDF\"),init,\"*.pdf\");\n            if (m_pdfFileName.isEmpty()) {\n                return;\n            }\n            if (!m_htmldoc) {\n                m_htmldoc = m_liteApp->htmlWidgetManager()->createDocument(this);\n                connect(m_htmldoc,SIGNAL(loadFinished(bool)),this,SLOT(loadHtmlFinished(bool)));\n            }\n            QUrl url = QUrl::fromLocalFile(m_liteApp->resourcePath()+\"/packages/gopresent/export.html\");\n            m_htmldoc->setHtml(QString::fromUtf8(m_exportData),url);\n        }\n    }\n}\n\nvoid GolangPresentEdit::loadHtmlFinished(bool b)\n{\n    if (!b) {\n        m_liteApp->appendLog(\"GolangPresent\",\"Failed export PDF document!\");\n        return;\n    }\n#ifndef QT_NO_PRINTER\n        QPrinter printer(QPrinter::HighResolution);\n        printer.setOutputFormat(QPrinter::PdfFormat);\n        printer.setCreator(\"LiteIDE\");\n        printer.setOutputFileName(m_pdfFileName);\n        m_htmldoc->print(&printer);\n        QDesktopServices::openUrl(QUrl::fromLocalFile(QFileInfo(m_pdfFileName).path()));\n#endif\n}\n\nbool GolangPresentEdit::startExportHtmlDoc(EXPORT_TYPE type)\n{\n    m_liteApp->editorManager()->saveEditor(m_editor);\n    QString cmd = LiteApi::getGotools(m_liteApp);\n    QFileInfo info(m_editor->filePath());\n    if (!m_process) {\n        m_process = new ProcessEx(this);\n        m_process->setWorkingDirectory(info.absolutePath());\n        connect(m_process,SIGNAL(extOutput(QByteArray,bool)),this,SLOT(extOutput(QByteArray,bool)));\n        connect(m_process,SIGNAL(extFinish(bool,int,QString)),this,SLOT(extFinish(bool,int,QString)));\n    }\n    m_process->stopAndWait(100,2000);\n    m_exportData.clear();\n    m_errorMsg.clear();\n    m_process->setUserData(0,type);\n    m_editor->clearAllNavigateMark(LiteApi::EditorNavigateBad, GOPRESENT_TAG);\n    if (type == EXPORT_TYPE_VERIFY) {\n        m_process->startEx(cmd,QStringList() << \"gopresent\" << \"-v\" << \"-i\" << info.fileName().toUtf8());\n    } else {\n        m_process->startEx(cmd,QStringList() << \"gopresent\" << \"-stdout\" << \"-i \" << info.fileName().toUtf8());\n    }\n    return true;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangpresent/golangpresentedit.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangpresenteedit.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGPRESENTEDIT_H\n#define GOLANGPRESENTEDIT_H\n\n#include \"liteapi/liteapi.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n#include \"processex/processex.h\"\n\n#define GOPRESENT_TAG \"gopresent/navtag\"\n\nclass GolangPresentEdit : public QObject\n{\n    Q_OBJECT\npublic:\n    enum EXPORT_TYPE {\n        EXPORT_TYPE_VERIFY,\n        EXPORT_TYPE_HTML,\n        EXPORT_TYPE_PDF\n    };\n\npublic:\n    explicit GolangPresentEdit(LiteApi::IApplication *app, LiteApi::IEditor *editor, QObject *parent = 0);\npublic slots:\n    void editorSaved(LiteApi::IEditor*);\n    void s1();\n    void s2();\n    void s3();\n    void bold();\n    void italic();\n    void code();\n    void bullets();\n    void comment();\n    void verify();\n    void exportHtml();\n    void exportPdf();\n    void extOutput(const QByteArray &data,bool bError);\n    void extFinish(bool error,int code, QString msg);\n    void loadHtmlFinished(bool);\nprotected:\n    bool startExportHtmlDoc(EXPORT_TYPE type);\n    LiteApi::IApplication *m_liteApp;\n    LiteApi::ILiteEditor  *m_editor;\n    LiteApi::IHtmlDocument *m_htmldoc;\n    QPlainTextEdit        *m_ed;\n    ProcessEx             *m_process;\n    QByteArray             m_exportData;\n    QStringList            m_errorMsg;\n    QString                m_pdfFileName;\n    QString                m_exportName;\n};\n\n#endif // GOLANGPRESENTEDIT_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangpresent/golangpresentplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangpresentplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangpresentplugin.h\"\n#include \"golangpresentedit.h\"\n#include <QtPlugin>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangPresentPlugin::GolangPresentPlugin()\n{\n}\n\nbool GolangPresentPlugin::load(LiteApi::IApplication *app)\n{\n    m_liteApp = app;\n    connect(m_liteApp->editorManager(),SIGNAL(editorCreated(LiteApi::IEditor*)),this,SLOT(editorCreated(LiteApi::IEditor*)));\n    return true;\n}\n\nvoid GolangPresentPlugin::editorCreated(LiteApi::IEditor *editor)\n{\n    if (!editor || editor->mimeType() != \"text/x-goslide\") {\n        return;\n    }\n    new GolangPresentEdit(m_liteApp,editor,this);\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/golangpresent/golangpresentplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangpresentplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGPRESENTPLUGIN_H\n#define GOLANGPRESENTPLUGIN_H\n\n#include \"golangpresent_global.h\"\n#include \"liteapi/liteapi.h\"\n\nclass GolangPresentPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    GolangPresentPlugin();\n    virtual bool load(LiteApi::IApplication *app);\nprotected slots:\n    void editorCreated(LiteApi::IEditor*);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<GolangPresentPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.GoPresentPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/GoPresent\");\n        m_info->setVer(\"X23\");\n        m_info->setName(\"GolangPresent\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setInfo(\"Golang Present Edit Support\");\n        m_info->appendDepend(\"plugin/liteeditor\");\n    }\n};\n\n#endif // GOLANGPRESENTPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangtool/golangtool.pro",
    "content": "TARGET = golangtool\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\n\nDEFINES += GOLANGTOOL_LIBRARY\n\nSOURCES += golangtoolplugin.cpp \\\n    gopathbrowser.cpp \\\n    gopathmodel.cpp \\\n    gopathproject.cpp \\\n    gopathprojectfactor.cpp \\\n    importgopathdialog.cpp \\\n    ../filebrowser/createfiledialog.cpp \\\n    ../filebrowser/createdirdialog.cpp\n\nHEADERS += golangtoolplugin.h\\\n        golangtool_global.h \\\n    gopathbrowser.h \\\n    gopathmodel.h \\\n    gopathproject.h \\\n    gopathprojectfactor.h \\\n    importgopathdialog.h \\\n    ../filebrowser/createfiledialog.h \\\n    ../filebrowser/createdirdialog.h\n\nFORMS += \\\n    importgopathdialog.ui \\\n    ../filebrowser/createfiledialog.ui \\\n    ../filebrowser/createdirdialog.ui\n\nRESOURCES += \\\n    golangtool.qrc\n"
  },
  {
    "path": "liteidex/src/plugins/golangtool/golangtool.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/\">\n        <file>images/dir.png</file>\n        <file>images/diropen.png</file>\n        <file>images/gopath.png</file>\n        <file>images/synceditor.png</file>\n        <file>images/syncproject.png</file>\n    </qresource>\n</RCC>\n"
  },
  {
    "path": "liteidex/src/plugins/golangtool/golangtool_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangtool_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGTOOL_GLOBAL_H\n#define GOLANGTOOL_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(GOLANGTOOL_LIBRARY)\n#  define GOLANGTOOLSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define GOLANGTOOLSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#endif // GOLANGTOOL_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangtool/golangtoolplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangtoolplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangtoolplugin.h\"\n#include \"gopathprojectfactor.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangToolPlugin::GolangToolPlugin()\n{\n    m_info->setId(\"plugin/GolangTool\");\n    m_info->setName(\"GolangTool\");\n    m_info->setAuthor(\"visualfc\");\n    m_info->setInfo(\"Golang Tool Plugin\");\n}\n\nbool GolangToolPlugin::initWithApp(LiteApi::IApplication *app)\n{\n    if (!LiteApi::IPlugin::initWithApp(app)) {\n        return false;\n    }\n    app->projectManager()->addFactory(new GopathProjectFactor(app,this));\n    return true;\n}\n\nQStringList GolangToolPlugin::dependPluginList() const\n{\n    return QStringList() << \"plugin/liteenv\";\n}\n\n\nQ_EXPORT_PLUGIN(GolangToolPlugin)\n"
  },
  {
    "path": "liteidex/src/plugins/golangtool/golangtoolplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangtoolplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGTOOLPLUGIN_H\n#define GOLANGTOOLPLUGIN_H\n\n#include \"golangtool_global.h\"\n#include \"liteapi/liteapi.h\"\n#include <QtPlugin>\n\nclass GolangToolPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPlugin)\npublic:\n    GolangToolPlugin();\n    virtual bool initWithApp(LiteApi::IApplication *app);\n    virtual QStringList dependPluginList() const;\n};\n\n#endif // GOLANGTOOLPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangtool/gopathbrowser.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gopathbrowser.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"gopathbrowser.h\"\n#include \"gopathmodel.h\"\n#include \"liteapi/litefindobj.h\"\n#include \"../filebrowser/createdirdialog.h\"\n#include \"../filebrowser/createfiledialog.h\"\n#include <QTreeView>\n#include <QVBoxLayout>\n#include <QHBoxLayout>\n#include <QPushButton>\n#include <QMenu>\n#include <QAction>\n#include <QMessageBox>\n#include <QDesktopServices>\n#include <QProcess>\n#include <QInputDialog>\n#include <QLineEdit>\n#include <QUrl>\n#include <QToolBar>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGopathBrowser::GopathBrowser(LiteApi::IApplication *app, QObject *parent) :\n    QObject(parent),\n    m_liteApp(app)\n{\n    m_widget = new QWidget;\n\n    m_toolBar = new QToolBar;\n    m_toolBar->setIconSize(QSize(16,16));\n\n    m_syncEditor = new QAction(QIcon(\":/images/synceditor.png\"),tr(\"Synchronize Editor\"),this);\n    m_syncEditor->setCheckable(true);\n    m_syncProject = new QAction(QIcon(\":/images/syncproject.png\"),tr(\"Synchronize Project\"),this);\n    m_syncProject->setCheckable(true);\n\n    m_startPathLabel = new QLabel;\n\n    m_toolBar->addAction(m_syncEditor);\n    m_toolBar->addAction(m_syncProject);\n    m_toolBar->addSeparator();\n    m_toolBar->addWidget(m_startPathLabel);\n\n    m_pathTree = new QTreeView;\n    m_pathTree->setHeaderHidden(true);\n    m_model = new GopathModel(this);\n    m_pathTree->setContextMenuPolicy(Qt::CustomContextMenu);\n    m_pathTree->setModel(m_model);\n\n    QVBoxLayout *layout = new QVBoxLayout;\n    layout->setMargin(0);\n    layout->addWidget(m_toolBar);\n    layout->addWidget(m_pathTree);\n    m_widget->setLayout(layout);\n\n    m_pathList = m_liteApp->settings()->value(\"golangtool/gopath\").toStringList();\n\n    //connect(m_pathTree->selectionModel(),SIGNAL(currentChanged(QModelIndex,QModelIndex)),this,SLOT(pathIndexChanged(QModelIndex)));\n    connect(m_pathTree,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(openPathIndex(QModelIndex)));\n    LiteApi::IEnvManager* envManager = LiteApi::findExtensionObject<LiteApi::IEnvManager*>(m_liteApp,\"LiteApi.IEnvManager\");\n    connect(envManager,SIGNAL(currentEnvChanged(LiteApi::IEnv*)),this,SLOT(reloadEnv()));\n    connect(m_liteApp->editorManager(),SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(currentEditorChanged(LiteApi::IEditor*)));\n\n    m_fileMenu = new QMenu(m_widget);\n    m_folderMenu = new QMenu(m_widget);\n\n    m_setStartAct = new QAction(tr(\"Set Active Project\"),this);\n    m_openEditorAct = new QAction(tr(\"Open Editor\"),this);\n    m_newFileAct = new QAction(tr(\"New File...\"),this);\n    m_newFileWizardAct = new QAction(tr(\"New File Wizard...\"),this);\n    m_renameFileAct = new QAction(tr(\"Rename File...\"),this);\n    m_removeFileAct = new QAction(tr(\"Delete File\"),this);\n\n    m_newFolderAct = new QAction(tr(\"New Folder...\"),this);\n    m_renameFolderAct = new QAction(tr(\"Rename Folder...\"),this);\n    m_removeFolderAct = new QAction(tr(\"Delete Folder\"),this);\n\n    m_openShellAct = new QAction(tr(\"Open Terminal Here\"),this);\n    m_openExplorerAct = new QAction(tr(\"Open Explorer Here\"),this);\n\n    m_fileMenu->addAction(m_openEditorAct);\n    m_fileMenu->addSeparator();\n    m_fileMenu->addAction(m_newFileAct);\n    m_fileMenu->addAction(m_newFileWizardAct);\n    m_fileMenu->addAction(m_renameFileAct);\n    m_fileMenu->addAction(m_removeFileAct);\n    m_fileMenu->addSeparator();\n    m_fileMenu->addAction(m_openShellAct);\n    m_fileMenu->addAction(m_openExplorerAct);\n\n    m_folderMenu->addAction(m_setStartAct);\n    m_folderMenu->addSeparator();\n    m_folderMenu->addAction(m_newFileAct);\n    m_folderMenu->addAction(m_newFileWizardAct);\n    m_folderMenu->addAction(m_newFolderAct);\n    m_folderMenu->addAction(m_renameFolderAct);\n    m_folderMenu->addAction(m_removeFolderAct);\n    m_folderMenu->addSeparator();\n    m_folderMenu->addAction(m_openShellAct);\n    m_folderMenu->addAction(m_openExplorerAct);\n\n    connect(m_startPathLabel,SIGNAL(linkActivated(QString)),this,SLOT(expandStartPath(QString)));\n    connect(m_syncEditor,SIGNAL(triggered(bool)),this,SLOT(syncEditor(bool)));\n    connect(m_syncProject,SIGNAL(triggered(bool)),this,SLOT(syncProject(bool)));\n    connect(m_setStartAct,SIGNAL(triggered()),this,SLOT(setActivate()));\n    connect(m_openEditorAct,SIGNAL(triggered()),this,SLOT(openEditor()));\n    connect(m_newFileAct,SIGNAL(triggered()),this,SLOT(newFile()));\n    connect(m_newFileWizardAct,SIGNAL(triggered()),this,SLOT(newFileWizard()));\n    connect(m_renameFileAct,SIGNAL(triggered()),this,SLOT(renameFile()));\n    connect(m_removeFileAct,SIGNAL(triggered()),this,SLOT(removeFile()));\n    connect(m_newFolderAct,SIGNAL(triggered()),this,SLOT(newFolder()));\n    connect(m_renameFolderAct,SIGNAL(triggered()),this,SLOT(renameFolder()));\n    connect(m_removeFolderAct,SIGNAL(triggered()),this,SLOT(removeFolder()));\n    connect(m_openShellAct,SIGNAL(triggered()),this,SLOT(openShell()));\n    connect(m_openExplorerAct,SIGNAL(triggered()),this,SLOT(openExplorer()));\n\n    connect(m_pathTree,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(treeViewContextMenuRequested(QPoint)));\n\n    bool b = m_liteApp->settings()->value(\"GolangTool/synceditor\",true).toBool();\n    if (b) {\n        m_syncEditor->toggle();\n    }\n    b = m_liteApp->settings()->value(\"GolangTool/syncproject\",false).toBool();\n    if (b) {\n        m_syncProject->toggle();\n    }\n    m_startPathLabel->setText(\"null project\");\n}\n\nGopathBrowser::~GopathBrowser()\n{\n    m_liteApp->settings()->setValue(\"GolangTool/synceditor\",m_syncEditor->isChecked());\n    m_liteApp->settings()->setValue(\"GolangTool/syncproject\",m_syncProject->isChecked());\n    m_liteApp->settings()->setValue(\"golangtool/gopath\",m_pathList);\n    delete m_widget;\n}\n\nQDir GopathBrowser::contextDir() const\n{\n    if (m_contextInfo.isDir()) {\n        return m_contextInfo.filePath();\n    }\n    return m_contextInfo.dir();\n}\n\nQFileInfo GopathBrowser::contextFileInfo() const\n{\n    return m_contextInfo;\n}\n\nvoid GopathBrowser::setActivate()\n{\n    setStartIndex(m_contextIndex);\n}\n\nvoid GopathBrowser::openEditor()\n{\n    if (m_contextInfo.isFile()) {\n        m_liteApp->fileManager()->openEditor(m_contextInfo.filePath());\n    }\n}\n\nvoid GopathBrowser::newFile()\n{\n    QDir dir = contextDir();\n\n    CreateFileDialog dlg;\n    dlg.setDirectory(dir.path());\n    if (dlg.exec() == QDialog::Rejected) {\n        return;\n    }\n    QString fileName = dlg.getFileName();\n    if (!fileName.isEmpty()) {\n        QString filePath = QFileInfo(dir,fileName).filePath();\n        if (QFile::exists(filePath)) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Create File\"),\n                                     tr(\"A file with that name already exists!\"));\n        } else {\n            QFile file(filePath);\n            if (file.open(QIODevice::WriteOnly)) {\n                file.close();\n                if (dlg.isOpenEditor()) {\n                    m_liteApp->fileManager()->openEditor(filePath,true);\n                }\n            } else {\n                QMessageBox::information(m_liteApp->mainWindow(),tr(\"Create File\"),\n                                         tr(\"Failed to create the file!\"));\n            }\n        }\n    }\n}\n\nvoid GopathBrowser::newFileWizard()\n{\n    QString filePath;\n    QString projPath;\n    QFileInfo info = contextFileInfo();\n    QDir dir = contextDir();\n    if (!info.isFile()) {\n        filePath = dir.absolutePath();\n        projPath = dir.absolutePath();\n    } else {\n        filePath = dir.absolutePath();\n        dir.cdUp();\n        projPath = dir.absolutePath();\n    }\n    m_liteApp->fileManager()->execFileWizard(projPath,filePath);\n}\n\nvoid GopathBrowser::renameFile()\n{\n    QFileInfo info = contextFileInfo();\n    if (!info.isFile()) {\n        return;\n    }\n    QString fileName = QInputDialog::getText(m_liteApp->mainWindow(),\n                                             tr(\"Rename File\"),tr(\"New Name:\"),\n                                             QLineEdit::Normal,info.fileName());\n    if (!fileName.isEmpty() && fileName != info.fileName()) {\n        QDir dir = contextDir();\n        if (!QFile::rename(info.filePath(),QFileInfo(dir,fileName).filePath())) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Rename File\"),\n                                     tr(\"Failed to rename the file!\"));\n        }\n    }\n}\n\nvoid GopathBrowser::removeFile()\n{\n    QFileInfo info = contextFileInfo();\n    if (!info.isFile()) {\n        return;\n    }\n\t\n    int ret = QMessageBox::question(m_liteApp->mainWindow(),tr(\"Delete File\"),\n                          tr(\"Are you sure that you want to permanently delete this file?\"),\n                          QMessageBox::Yes | QMessageBox::No, QMessageBox::No);\n    if (ret == QMessageBox::Yes) {\n        if (!QFile::remove(info.filePath())) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Delete File\"),\n                                     tr(\"Failed to delete the file!\"));\n        }\n    }\n}\n\nvoid GopathBrowser::newFolder()\n{\n    QDir dir = contextDir();\n\n    CreateDirDialog dlg;\n    dlg.setDirectory(dir.path());\n    if (dlg.exec() == QDialog::Rejected) {\n        return;\n    }\n\n    QString folderName = dlg.getDirPath();\n    if (!folderName.isEmpty()) {\n        if (!dir.entryList(QStringList() << folderName,QDir::Dirs).isEmpty()) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Create Folder\"),\n                                     tr(\"A folder with that name already exists!\"));\n        } else if (!dir.mkpath(folderName)) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Create Folder\"),\n                                     tr(\"Failed to create the folder!\"));\n        }\n    }\n}\n\nvoid GopathBrowser::renameFolder()\n{\n    QFileInfo info = contextFileInfo();\n    if (!info.isDir()) {\n        return;\n    }\n\n    QString folderName = QInputDialog::getText(m_liteApp->mainWindow(),\n                                               tr(\"Rename Folder\"),tr(\"Folder Name\"),\n                                               QLineEdit::Normal,info.fileName());\n    if (!folderName.isEmpty() && folderName != info.fileName()) {\n        QDir dir = contextDir();\n        dir.cdUp();\n        if (!dir.rename(info.fileName(),folderName)) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Rename Folder\"),\n                                     tr(\"Failed to rename the folder!\"));\n        }\n    }\n}\n\nvoid GopathBrowser::removeFolder()\n{\n    QFileInfo info = contextFileInfo();\n    if (!info.isDir()) {\n        return;\n    }\n\t\n    int ret = QMessageBox::warning(m_liteApp->mainWindow(),tr(\"Delete Folder\"),\n                          tr(\"Are you sure that you want to permanently delete this folder and all of its contents?\"),\n                          QMessageBox::Yes | QMessageBox::No, QMessageBox::No);\n    if (ret == QMessageBox::Yes) {\n        QDir dir = info.dir();\n        if (!dir.rmdir(info.fileName())) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Delete Folder\"),\n                                     tr(\"Failed to delete the folder!\"));\n        }\n    }\n}\n\nvoid GopathBrowser::openExplorer()\n{\n    QDir dir = contextDir();\n    QDesktopServices::openUrl(QUrl::fromLocalFile(dir.path()));\n}\n\nvoid GopathBrowser::openShell()\n{\n    QDir dir = contextDir();\n    QProcessEnvironment env = LiteApi::getCurrentEnvironment(m_liteApp);\n    QString cmd = env.value(\"LITEIDE_TERM\");\n    QStringList args = env.value(\"LITEIDE_TERMARGS\").split(\" \");\n    QString path = dir.path();\n#ifdef Q_OS_WIN\n    if (path.length() == 2 && path.right(1) == \":\") {\n        path += \"/\";\n    }\n#endif\n    QProcess::startDetached(cmd,args,path);\n}\n\nQWidget *GopathBrowser::widget() const\n{\n    return m_widget;\n}\n\nvoid GopathBrowser::treeViewContextMenuRequested(const QPoint &pos)\n{\n    QModelIndex index = m_pathTree->indexAt(pos);\n    if (!index.isValid()) {\n        return;\n    }\n    PathNode *node = m_model->nodeFromIndex(index);\n    if (!node) {\n        return;\n    }\n    m_contextInfo = node->fileInfo();\n    m_contextIndex = index;\n    QMenu *contextMenu = 0;\n    if (node->isDir()) {\n        contextMenu = m_folderMenu;\n    } else {\n        contextMenu = m_fileMenu;\n    }\n\n    if (contextMenu && contextMenu->actions().count() > 0) {\n        contextMenu->popup(m_pathTree->mapToGlobal(pos));\n    }\n}\n\nvoid GopathBrowser::addPathList(const QString &path)\n{\n    QStringList pathList = m_pathList;\n    pathList.append(path);\n    this->setPathList(pathList);\n}\n\nvoid GopathBrowser::setPathList(const QStringList &pathList)\n{\n    m_pathList = pathList;\n    QStringList allPathList = systemGopathList()+m_pathList;\n    m_model->setPathList(allPathList);\n    m_pathTree->setCurrentIndex(m_model->startIndex());\n    m_pathTree->expand(m_model->startIndex());\n    LiteApi::IEnvManager* envManager = LiteApi::findExtensionObject<LiteApi::IEnvManager*>(m_liteApp,\"LiteApi.IEnvManager\");\n    LiteApi::IEnv *env = envManager->currentEnv();\n    if (env) {\n#ifdef Q_OS_WIN\n    env->environment().insert(\"LITEIDE_GOPATH\",allPathList.join(\";\"));\n#else\n    env->environment().insert(\"LITEIDE_GOPATH\",allPathList.join(\":\"));\n#endif\n    }\n    currentEditorChanged(m_liteApp->editorManager()->currentEditor());\n}\n\nQStringList GopathBrowser::pathList() const\n{\n    return m_pathList;\n}\n\nQStringList GopathBrowser::systemGopathList() const\n{\n    LiteApi::IEnvManager* envManager = LiteApi::findExtensionObject<LiteApi::IEnvManager*>(m_liteApp,\"LiteApi.IEnvManager\");\n    QString gopath= envManager->currentEnvironment().value(\"GOPATH\");\n    if (gopath.isEmpty()) {\n        gopath = envManager->currentEnvironment().value(\"GOROOT\");\n    }\n    QStringList list;\n #ifdef Q_OS_WIN\n     list = gopath.split(\";\",QString::SkipEmptyParts);\n #else\n     list = gopath.split(\":\",QString::SkipEmptyParts);\n #endif\n     return list;\n}\n\nvoid GopathBrowser::reloadEnv()\n{\n    this->setPathList(m_pathList);\n}\n\nvoid GopathBrowser::setStartIndex(const QModelIndex &index)\n{\n    QModelIndex oldIndex = m_model->startIndex();\n    if (oldIndex != index) {\n        m_model->setStartIndex(index);\n        m_pathTree->update(oldIndex);\n        m_pathTree->update(index);\n        emit startPathChanged(m_model->filePath(index));\n        PathNode *node = m_model->nodeFromIndex(index);\n        if (node) {\n            m_startPathLabel->setText(QString(\"<p><a href file://%1>%2</p>\").arg(node->path()).arg(node->text()));\n            m_startPathLabel->setToolTip(node->path());\n        }\n    }\n}\n\nQString GopathBrowser::startPath() const\n{\n    QModelIndex index = m_model->startIndex();\n    return m_model->filePath(index);\n}\n\nvoid GopathBrowser::pathIndexChanged(const QModelIndex & index)\n{\n    PathNode *node = m_model->nodeFromIndex(index);\n    if (node) {\n        QFileInfo info = node->fileInfo();\n        QModelIndex newIndex = index;\n        if (info.isDir()) {\n            newIndex = index;\n        } else {\n            newIndex = index.parent();\n        }\n        this->setStartIndex(newIndex);\n    }\n}\n\nvoid GopathBrowser::openPathIndex(const QModelIndex &index)\n{\n    PathNode *node = m_model->nodeFromIndex(index);\n    if (!node) {\n        return;\n    }\n    if (node->isDir()) {\n        this->setStartIndex(index);\n    } else if (node->isFile()) {\n        if (m_syncProject->isChecked()) {\n            this->setStartIndex(index.parent());\n        }\n        m_liteApp->fileManager()->openEditor(node->path(),true);\n    }\n}\n\nvoid GopathBrowser::currentEditorChanged(LiteApi::IEditor* editor)\n{\n    if (!m_syncEditor->isChecked()) {\n        return;\n    }\n    if (editor && !editor->filePath().isEmpty()) {\n        QModelIndex index = m_model->findPath(editor->filePath());\n        if (index.isValid()) {\n            m_pathTree->setCurrentIndex(index);\n            m_pathTree->scrollTo(index,QAbstractItemView::EnsureVisible);\n            if (m_syncProject->isChecked()) {\n                setStartIndex(index.parent());\n            }\n        }\n    }\n}\n\nvoid GopathBrowser::syncEditor(bool b)\n{\n    if (!b) {\n        m_syncProject->setChecked(false);\n    }\n}\n\nvoid GopathBrowser::syncProject(bool b)\n{\n    if (b) {\n        m_syncEditor->setChecked(true);\n    }\n}\n\nvoid GopathBrowser::expandStartPath(QString)\n{\n    m_pathTree->scrollTo(m_model->startIndex(),QAbstractItemView::EnsureVisible);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangtool/gopathbrowser.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gopathbrowser.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOPATHBROWSER_H\n#define GOPATHBROWSER_H\n\n#include <QWidget>\n#include \"liteapi/liteapi.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include <QModelIndex>\n#include <QFileInfo>\n#include <QDir>\n#include <QLabel>\n\nclass QTreeView;\nclass GopathModel;\nclass GopathBrowser : public QObject\n{\n    Q_OBJECT\n    \npublic:\n    explicit GopathBrowser(LiteApi::IApplication *app,QObject *parent = 0);\n    ~GopathBrowser();\n    QWidget *widget() const;\n    void setPathList(const QStringList &pathList);\n    void addPathList(const QString &path);\n    QStringList pathList() const;\n    QStringList systemGopathList() const;\n    void setStartIndex(const QModelIndex &index);\n    QString startPath() const;\npublic slots:\n    void pathIndexChanged(const QModelIndex & index);\n    void openPathIndex(const QModelIndex &index);\n    void reloadEnv();\n    void currentEditorChanged(LiteApi::IEditor*);\n    void treeViewContextMenuRequested(const QPoint &pos);\n    void setActivate();\n    void openEditor();\n    void newFile();\n    void newFileWizard();\n    void renameFile();\n    void removeFile();\n    void newFolder();\n    void renameFolder();\n    void removeFolder();\n    void openShell();\n    void openExplorer();\n    void syncEditor(bool);\n    void syncProject(bool);\n    void expandStartPath(QString);\nsignals:\n    void startPathChanged(const QString& path);\nprotected:\n    QFileInfo contextFileInfo() const;\n    QDir contextDir() const;\nprivate:\n    LiteApi::IApplication *m_liteApp;\n    QWidget *m_widget;\n    QTreeView *m_pathTree;\n    GopathModel *m_model;\n    QStringList m_pathList;\n    QFileInfo m_contextInfo;\n    QModelIndex m_contextIndex;\n    QMenu   *m_fileMenu;\n    QMenu   *m_folderMenu;\n    QAction *m_setStartAct;\n    QAction *m_openEditorAct;\n    QAction *m_newFileAct;\n    QAction *m_newFileWizardAct;\n    QAction *m_removeFileAct;\n    QAction *m_renameFileAct;\n    QAction *m_newFolderAct;\n    QAction *m_removeFolderAct;\n    QAction *m_renameFolderAct;\n    QAction *m_openShellAct;\n    QAction *m_openExplorerAct;\n    QToolBar *m_toolBar;\n    QAction *m_syncEditor;\n    QAction *m_syncProject;\n    QLabel  *m_startPathLabel;\n};\n\n#endif // GOPATHBROWSER_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangtool/gopathmodel.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gopathmodel.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"gopathmodel.h\"\n#include <QFileInfo>\n#include <QDir>\n#include <QIcon>\n#include <QFont>\n#include <QFileIconProvider>\n#include <QFileSystemWatcher>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nPathNode::PathNode(GopathModel *model) :\n    m_model(model),\n    m_parent(0),\n    m_children(0)\n{\n\n}\n\nPathNode::PathNode(GopathModel *model, const QString &path, PathNode *parent) :\n    m_model(model),\n    m_parent(parent),\n    m_children(0),\n    m_path(path)\n{\n    QFileInfo info(path);\n    if (parent && parent->parent() == 0) {\n        m_text = info.filePath();\n    } else {\n        m_text = info.fileName();\n    }\n    if (info.isDir() && !m_path.isEmpty()) {\n        m_model->fileWatcher()->addPath(m_path);\n    }\n}\n\nPathNode::~PathNode()\n{\n    if (this->isDir() && !m_path.isEmpty())  {\n        m_model->fileWatcher()->removePath(m_path);\n    }\n    if (m_children) {\n        qDeleteAll(m_children->begin(),m_children->end());\n        delete m_children;\n    }\n}\n\nQList<PathNode*>* PathNode::children()\n{\n    if (m_children == 0) {\n        m_children = new QList<PathNode*>();\n        if (!m_path.isEmpty()) {\n            QFileInfo info(m_path);\n            if (info.isDir()) {\n                QDir dir(m_path);\n                foreach(QFileInfo childInfo, dir.entryInfoList(QDir::Dirs|QDir::Files|QDir::NoDotAndDotDot,QDir::DirsFirst)) {\n                    m_children->append(new PathNode(this->m_model,childInfo.filePath(),this));\n                }\n            }\n        }\n    }\n    return m_children;\n}\n\nPathNode* PathNode::parent()\n{\n    return m_parent;\n}\n\nPathNode* PathNode::child(int row)\n{\n    return children()->at(row);\n}\n\nint PathNode::childCount()\n{\n    return children()->count();\n}\n\nint PathNode::row() const\n{\n    if (m_parent) {\n        return m_parent->children()->indexOf(const_cast<PathNode*>(this));\n    }\n    return 0;\n}\n\nQString PathNode::path() const\n{\n    return m_path;\n}\n\nQString PathNode::text() const\n{\n    return m_text;\n}\n\nbool PathNode::isDir() const\n{\n    return QFileInfo(m_path).isDir();\n}\n\nbool PathNode::isFile() const\n{\n    return QFileInfo(m_path).isFile();\n}\n\nQFileInfo PathNode::fileInfo() const\n{\n    return QFileInfo(m_path);\n}\n\nvoid PathNode::clear()\n{\n    if (m_children) {\n        qDeleteAll(m_children->begin(),m_children->end());\n        m_children->clear();\n    }\n}\n\nvoid PathNode::reload()\n{\n    clear();\n    if (m_children == 0) {\n        m_children = new QList<PathNode*>();\n    }\n    if (!m_path.isEmpty()) {\n        QFileInfo info(m_path);\n        if (info.isDir()) {\n            QDir dir(m_path);\n            foreach(QFileInfo childInfo, dir.entryInfoList(QDir::Dirs|QDir::Files|QDir::NoDotAndDotDot,QDir::DirsFirst)) {\n                m_children->append(new PathNode(this->m_model,childInfo.filePath(),this));\n            }\n        }\n    }\n}\n\nPathNode *PathNode::findPath(const QString &path)\n{\n    if (!path.startsWith(m_path)) {\n        return 0;\n    }\n    if (path == m_path) {\n        return this;\n    }\n    QStringList nameList = path.right(path.length()-m_path.length()).split(\"/\",QString::SkipEmptyParts);\n    PathNode *parent = this;\n    bool find = false;\n    foreach (QString name,nameList) {\n        find = false;\n        QList<PathNode*>* chilren = parent->children();\n        for (int i = 0; i < chilren->count(); i++) {\n            PathNode *node = chilren->at(i);\n            if (!node->isDir()) {\n                continue;\n            }\n            if (node->m_text == name) {\n                parent = node;\n                find = true;\n                break;\n            }\n        }\n        if (!find) {\n            return 0;\n        }\n    }\n    return parent;\n}\n\n\nGopathModel::GopathModel(QObject *parent) :\n    QAbstractItemModel(parent),\n    m_rootNode(new PathNode(this)),\n    m_iconProvider(new QFileIconProvider),\n    m_fileWatcher(new QFileSystemWatcher(this))\n{\n    connect(m_fileWatcher,SIGNAL(directoryChanged(QString)),this,SLOT(directoryChanged(QString)));\n}\n\nGopathModel::~GopathModel()\n{\n    delete m_rootNode;\n    delete m_iconProvider;\n}\n\nvoid GopathModel::directoryChanged(const QString &path)\n{\n    foreach(QModelIndex index,this->findPaths(path)) {\n        PathNode *node = nodeFromIndex(index);\n        this->beginRemoveRows(index,0,this->rowCount(index)-1);\n        node->reload();\n        this->endRemoveRows();\n    }\n}\n\nPathNode *GopathModel::nodeFromIndex(const QModelIndex &index) const\n{\n    if (index.isValid()) {\n        return static_cast<PathNode*>(index.internalPointer());\n    }\n    return m_rootNode;\n}\n\nvoid GopathModel::setStartIndex(const QModelIndex &index)\n{\n    m_startPath = filePath(index);\n}\n\nvoid GopathModel::setStartPath(const QString &path)\n{\n    m_startPath = path;\n}\n\nQModelIndex GopathModel::startIndex() const\n{\n    return findPath(m_startPath);\n}\n\nQString GopathModel::startPath() const\n{\n    return m_startPath;\n}\n\nQString GopathModel::filePath(const QModelIndex &index) const\n{\n    return nodeFromIndex(index)->path();\n}\n\nvoid GopathModel::setPathList(const QStringList &pathList)\n{\n    this->beginResetModel();\n    m_rootNode->clear();\n    m_pathList.clear();\n    foreach(QString path, pathList) {\n        QString spath = QDir::fromNativeSeparators(QDir::cleanPath(path));\n        m_pathList.append(spath);\n        m_rootNode->children()->append(new PathNode(this,spath,m_rootNode));\n    }\n    /*\n    if (m_startPath.isEmpty() && !pathList.isEmpty()) {\n        m_startPath = pathList.last();\n    }\n    */\n    this->endResetModel();\n}\n\nQModelIndex GopathModel::findPathHelper(const QString &path, const QModelIndex &parentIndex) const\n{\n    PathNode *node = nodeFromIndex(parentIndex);\n    if (!path.startsWith(node->path())) {\n        return QModelIndex();\n    }\n    if (path == node->path()) {\n        return parentIndex;\n    }\n    QStringList nameList = path.right(path.length()-node->path().length()).split(\"/\",QString::SkipEmptyParts);\n    QModelIndex parent = parentIndex;\n    bool find = false;\n    int count = nameList.count();\n    for (int i = 0; i < count; i++) {\n        find = false;\n        for (int j = 0; j < this->rowCount(parent); j++) {\n            QModelIndex index = this->index(j,0,parent);\n            PathNode *node = nodeFromIndex(index);\n            if ( ( (i == count-1) || node->isDir()) && node->text() == nameList.at(i)) {\n                parent = index;\n                find = true;\n                break;\n            }\n        }\n        if (!find) {\n            return QModelIndex();\n        }\n    }\n    return parent;\n}\n\nQList<QModelIndex> GopathModel::findPaths(const QString &path) const\n{\n    QList<QModelIndex> list;\n    QString cpath = QDir::fromNativeSeparators(QDir::cleanPath(path));\n    for (int i = 0; i < this->rowCount(); i++) {\n        QModelIndex find = findPathHelper(cpath,this->index(i,0));\n        if (find.isValid()) {\n            list.append(find);\n        }\n     }\n    return list;\n}\n\nQModelIndex GopathModel::findPath(const QString &path) const\n{\n    QList<QModelIndex> list = this->findPaths(path);\n    if (!list.isEmpty()) {\n        return list.last();\n    }\n    return QModelIndex();\n}\n\nint GopathModel::rowCount(const QModelIndex &parent) const\n{\n    PathNode *node = nodeFromIndex(parent);\n    return node->childCount();\n}\n\nint GopathModel::columnCount(const QModelIndex &parent) const\n{\n    return 1;\n}\n\nQModelIndex GopathModel::parent(const QModelIndex &child) const\n{\n    PathNode *node = nodeFromIndex(child);\n    PathNode *parent = node->parent();\n    if (parent == m_rootNode) {\n        return QModelIndex();\n    }\n    return createIndex(parent->row(),0,parent);\n}\n\nQModelIndex GopathModel::index(int row, int column,const QModelIndex &parent) const\n{\n    if (!hasIndex(row,column,parent))\n        return QModelIndex();\n    PathNode *node = nodeFromIndex(parent);\n    return createIndex(row,column,node->child(row));\n}\n\nQVariant GopathModel::data(const QModelIndex &index, int role) const\n{\n    PathNode *node = nodeFromIndex(index);\n    if (!node) {\n        return QVariant();\n    }\n    switch(role) {\n    case Qt::DisplayRole:\n        return node->text();\n    case Qt::DecorationRole:\n        return m_iconProvider->icon(node->fileInfo());\n    case Qt::FontRole: {\n        QFont font;\n        if (node->path() == m_startPath) {\n            font.setBold(true);\n        }\n        return font;\n    }\n    }\n    return QVariant();\n}\n\nQFileSystemWatcher* GopathModel::fileWatcher() const\n{\n    return m_fileWatcher;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangtool/gopathmodel.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gopathmodel.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOPATHMODEL_H\n#define GOPATHMODEL_H\n\n#include <QAbstractItemModel>\n#include <QStringList>\n#include <QIcon>\n#include <QFileInfo>\n\nclass GopathModel;\nclass PathNode\n{\npublic:\n    PathNode(GopathModel *model);\n    PathNode(GopathModel *model,const QString &path, PathNode *parent);\n    ~PathNode();\n    PathNode* parent();\n    PathNode* child(int row);\n    int childCount();\n    int row() const;\n    QList<PathNode*>* children();\n    QString path() const;\n    QString text() const;\n    QFileInfo fileInfo() const;\n    bool isDir() const;\n    bool isFile() const;\n    void clear();\n    void reload();\n    PathNode *findPath(const QString &path);\nprotected:\n    GopathModel *m_model;\n    PathNode *m_parent;\n    QList<PathNode*> *m_children;\n    QString m_path;\n    QString m_text;\n};\n\nclass QFileIconProvider;\nclass QFileSystemWatcher;\nclass QTreeView;\nclass GopathModel : public QAbstractItemModel\n{\n    Q_OBJECT\npublic:\n    explicit GopathModel(QObject *parent = 0);\n    ~GopathModel();\n    void setPathList(const QStringList &pathList);\n    QList<QModelIndex> findPaths(const QString &path) const;\n    QModelIndex findPath(const QString &path) const;\n    QString filePath(const QModelIndex &index) const;\n    PathNode *nodeFromIndex(const QModelIndex &index) const;    \n    void setStartIndex(const QModelIndex &index);\n    void setStartPath(const QString &path);\n    QModelIndex startIndex() const;\n    QString startPath() const;\n    virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;\n    virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;\n    virtual QModelIndex parent(const QModelIndex &child) const;\n    virtual QModelIndex index(int row, int column,const QModelIndex &parent = QModelIndex()) const;\n    virtual QVariant data(const QModelIndex &index, int role) const;    \n    QFileSystemWatcher* fileWatcher() const;\npublic slots:\n    void directoryChanged(const QString&);\nprotected:\n    QModelIndex findPathHelper(const QString &path, const QModelIndex &parentIndex) const;\n    QStringList m_pathList;\n    PathNode *m_rootNode;\n    QString   m_startPath;\n    QFileIconProvider *m_iconProvider;\n    QFileSystemWatcher *m_fileWatcher;\n    QTreeView *m_treeView;\n};\n\n#endif // GOPATHMODEL_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangtool/gopathproject.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gopathproject.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"gopathproject.h\"\n#include \"gopathmodel.h\"\n#include \"liteapi/litefindobj.h\"\n#include \"gopathbrowser.h\"\n#include <QVBoxLayout>\n#include <QHBoxLayout>\n#include <QTreeView>\n#include <QFileInfo>\n#include <QDir>\n#include <QStringList>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGopathProject::GopathProject(GopathBrowser *browser) : m_browser(browser)\n{\n    connect(m_browser,SIGNAL(startPathChanged(QString)),this,SLOT(startPathChanged(QString)));\n    m_path = m_browser->startPath();\n}\n\nGopathProject::~GopathProject()\n{\n    disconnect(m_browser);\n    m_browser->widget()->hide();\n}\n\nGopathBrowser *GopathProject::browser()\n{\n    return m_browser;\n}\n\nvoid GopathProject::startPathChanged(const QString &path)\n{\n    m_path = path;\n    emit reloaded();\n}\n\nQWidget *GopathProject::widget()\n{\n    return m_browser->widget();\n}\n\nQString GopathProject::name() const\n{\n    return m_path;\n}\n\n\nQString GopathProject::filePath() const\n{\n    return m_path;\n}\n\nQString GopathProject::mimeType() const\n{\n    return \"text/x-gopath\";\n}\n\nQStringList GopathProject::fileNameList() const\n{\n    QDir dir(m_path);\n    QStringList list;\n    foreach(QFileInfo info,dir.entryInfoList(QDir::Files)) {\n        list.append(info.fileName());\n    }\n    return list;\n}\n\nQStringList GopathProject::filePathList() const\n{\n    QDir dir(m_path);\n    QStringList list;\n    foreach(QFileInfo info, dir.entryInfoList(QStringList() <<\"*.go\",QDir::Files)) {\n        list.append(info.filePath());\n    }\n    return list;\n}\n\nQString GopathProject::fileNameToFullPath(const QString &filePath)\n{\n    return QFileInfo(m_path,filePath).filePath();\n}\n\nQMap<QString,QString> GopathProject::projectInfo() const\n{\n    QMap<QString,QString> m;\n    if (m_path.isEmpty()) {\n        return m;\n    }\n    QFileInfo info(m_path);\n    m.insert(\"PROJECTNAME\",info.fileName());\n    m.insert(\"PROJECTPATH\",info.filePath());\n    m.insert(\"PROJECTDIR\",info.filePath());\n    return m;\n}\n\nQMap<QString,QString> GopathProject::targetInfo() const\n{\n    QMap<QString,QString> m;\n    if (m_path.isEmpty()) {\n        return m;\n    }\n    QFileInfo info(m_path);\n    QString target = info.fileName();\n#ifdef Q_OS_WIN\n    target += \".exe\";\n#endif\n    m.insert(\"TARGETNAME\",target);\n    m.insert(\"TARGETPATH\",QFileInfo(QDir(m_path),target).filePath());\n    m.insert(\"TARGETDIR\",info.filePath());\n    m.insert(\"WORKDIR\",info.filePath());\n    return m;\n}\n\n\nvoid GopathProject::load()\n{\n    m_browser->widget()->show();\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangtool/gopathproject.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gopathproject.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOPATHPROJECT_H\n#define GOPATHPROJECT_H\n\n#include \"liteapi/liteapi.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include <QModelIndex>\n\nclass QTreeView;\nclass GopathModel;\nclass GopathBrowser;\nclass GopathProject : public LiteApi::IProject\n{\n    Q_OBJECT\npublic:\n    explicit GopathProject(GopathBrowser *browser);\n    ~GopathProject();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString filePath() const;\n    virtual QString mimeType() const;\n    virtual QStringList fileNameList() const;\n    virtual QStringList filePathList() const;\n    virtual QString fileNameToFullPath(const QString &filePath);\n    virtual QMap<QString,QString> projectInfo() const;\n    virtual QMap<QString,QString> targetInfo() const;\n    virtual void load();\n    GopathBrowser *browser();\npublic slots:\n    void startPathChanged(const QString &path);\nprotected:\n    GopathBrowser *m_browser;\n    QString m_path;\n};\n\n#endif // GOPATHPROJECT_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangtool/gopathprojectfactor.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gopathprojectfactor.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"gopathprojectfactor.h\"\n#include \"gopathproject.h\"\n#include \"gopathbrowser.h\"\n#include \"importgopathdialog.h\"\n#include <QAction>\n#include <QFileDialog>\n#include <QToolBar>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGopathProjectFactor::GopathProjectFactor(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IProjectFactory(parent),\n    m_liteApp(app)\n{\n    m_mimeTypes << \"text/x-gopath\";\n    m_browser = new GopathBrowser(app,this);\n\n    QAction *act = new QAction(QIcon(\":/images/gopath.png\"),tr(\"<GOPATH> Project\"),this);\n    connect(act,SIGNAL(triggered()),this,SLOT(importGopath()));\n    m_liteApp->projectManager()->addImportAction(act);\n\n    QToolBar *toolBar = m_liteApp->actionManager()->loadToolBar(\"toolbar/nav\");\n    if (toolBar) {\n        toolBar->addAction(act);\n    }\n\n    connect(m_liteApp,SIGNAL(loaded()),this,SLOT(loadApp()));\n}\n\nGopathProjectFactor::~GopathProjectFactor()\n{\n    if (m_browser) {\n        delete m_browser;\n    }\n}\n\nvoid GopathProjectFactor::loadApp()\n{\n    m_browser->reloadEnv();\n    GopathProject *project = new GopathProject(m_browser);\n    m_liteApp->projectManager()->setCurrentProject(project);\n}\n\nvoid GopathProjectFactor::importGopath()\n{\n    ImportGopathDialog *dlg = new ImportGopathDialog(m_liteApp->mainWindow());\n    dlg->setSysPathList(m_browser->systemGopathList());\n    dlg->setPathList(m_browser->pathList());\n    if (dlg->exec() == QDialog::Accepted) {\n         m_browser->setPathList(dlg->pathList());\n         GopathProject *project =  new GopathProject(m_browser);\n         m_liteApp->projectManager()->setCurrentProject(project);\n    }\n    delete dlg;\n}\n\nQStringList GopathProjectFactor::mimeTypes() const\n{\n    return m_mimeTypes;\n}\n\nLiteApi::IProject *GopathProjectFactor::open(const QString &fileName, const QString &mimeType)\n{\n    if (m_mimeTypes.contains(mimeType)) {        \n        GopathProject *project =  new GopathProject(m_browser);\n        project->browser()->addPathList(fileName);\n        return project;\n    }\n    return 0;\n}\n\nbool GopathProjectFactor::findProjectInfo(const QString &fileName, const QString &mimetype, QMap<QString,QString>& projectInfo, QMap<QString,QString>& findProjectInfo) const\n{\n    return false;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangtool/gopathprojectfactor.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: gopathprojectfactor.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOPATHPROJECTFACTOR_H\n#define GOPATHPROJECTFACTOR_H\n\n#include \"liteapi/liteapi.h\"\n\nclass GopathBrowser;\nclass GopathProjectFactor : public LiteApi::IProjectFactory\n{\n    Q_OBJECT\npublic:\n    explicit GopathProjectFactor(LiteApi::IApplication *app, QObject *parent = 0);\n    ~GopathProjectFactor();\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IProject *open(const QString &fileName, const QString &mimeType);\n    virtual bool findProjectInfo(const QString &fileName, const QString &mimetype, QMap<QString,QString>& projectInfo, QMap<QString,QString>& findProjectInfo) const;\npublic slots:\n    void importGopath();\n    void loadApp();\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    GopathBrowser *m_browser;\n    QStringList m_mimeTypes;\n};\n\n#endif // GOPATHPROJECTFACTOR_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangtool/importgopathdialog.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: importgopathdialog.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"importgopathdialog.h\"\n#include \"ui_importgopathdialog.h\"\n\n#include <QFileDialog>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nImportGopathDialog::ImportGopathDialog(QWidget *parent) :\n    QDialog(parent),\n    ui(new Ui::ImportGopathDialog)\n{\n    ui->setupUi(this);\n    connect(ui->browserButton,SIGNAL(clicked()),this,SLOT(browser()));\n    connect(ui->clearButton,SIGNAL(clicked()),ui->pathTextEdit,SLOT(clear()));\n}\n\nImportGopathDialog::~ImportGopathDialog()\n{\n    delete ui;\n}\n\nvoid ImportGopathDialog::setSysPathList(const QStringList &pathList)\n{\n    foreach (QString path, pathList) {\n        ui->sysPathTextEdit->appendPlainText(path);\n    }\n}\n\nvoid ImportGopathDialog::setPathList(const QStringList &pathList)\n{\n    foreach (QString path, pathList) {\n        ui->pathTextEdit->appendPlainText(path);\n    }\n}\n\nQStringList ImportGopathDialog::pathList() const\n{\n    return ui->pathTextEdit->toPlainText().split(\"\\n\",QString::SkipEmptyParts);\n}\n\nvoid ImportGopathDialog::browser()\n{\n    QString dir = QFileDialog::getExistingDirectory(this, tr(\"Load GOPATH Directory\"),\n                                                    \"/home\",\n                                                    QFileDialog::ShowDirsOnly\n                                                    | QFileDialog::DontResolveSymlinks);\n    if (!dir.isEmpty()) {\n        ui->pathTextEdit->appendPlainText(dir);\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/golangtool/importgopathdialog.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: importgopathdialog.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef IMPORTGOPATHDIALOG_H\n#define IMPORTGOPATHDIALOG_H\n\n#include <QDialog>\n\nnamespace Ui {\nclass ImportGopathDialog;\n}\n\nclass ImportGopathDialog : public QDialog\n{\n    Q_OBJECT\n    \npublic:\n    explicit ImportGopathDialog(QWidget *parent = 0);\n    ~ImportGopathDialog();\n    void setSysPathList(const QStringList &pathList);\n    void setPathList(const QStringList &pathList);\n    QStringList pathList() const;\npublic slots:\n    void browser();\nprivate:\n    Ui::ImportGopathDialog *ui;\n};\n\n#endif // IMPORTGOPATHDIALOG_H\n"
  },
  {
    "path": "liteidex/src/plugins/golangtool/importgopathdialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>ImportGopathDialog</class>\n <widget class=\"QDialog\" name=\"ImportGopathDialog\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>452</width>\n    <height>259</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Import GOPATH Project</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_3\">\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox\">\n     <property name=\"title\">\n      <string>System GOPATH</string>\n     </property>\n     <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\">\n      <item>\n       <widget class=\"QPlainTextEdit\" name=\"sysPathTextEdit\">\n        <property name=\"readOnly\">\n         <bool>true</bool>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n        <item>\n         <widget class=\"QPushButton\" name=\"reloadButton\">\n          <property name=\"text\">\n           <string>Reload</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <spacer name=\"verticalSpacer_2\">\n          <property name=\"orientation\">\n           <enum>Qt::Vertical</enum>\n          </property>\n          <property name=\"sizeHint\" stdset=\"0\">\n           <size>\n            <width>20</width>\n            <height>40</height>\n           </size>\n          </property>\n         </spacer>\n        </item>\n       </layout>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox_2\">\n     <property name=\"title\">\n      <string>Custome GOPATH</string>\n     </property>\n     <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n      <item>\n       <widget class=\"QPlainTextEdit\" name=\"pathTextEdit\"/>\n      </item>\n      <item>\n       <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n        <item>\n         <widget class=\"QPushButton\" name=\"browserButton\">\n          <property name=\"text\">\n           <string>Browser</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <widget class=\"QPushButton\" name=\"clearButton\">\n          <property name=\"text\">\n           <string>Clear</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <spacer name=\"verticalSpacer\">\n          <property name=\"orientation\">\n           <enum>Qt::Vertical</enum>\n          </property>\n          <property name=\"sizeHint\" stdset=\"0\">\n           <size>\n            <width>20</width>\n            <height>40</height>\n           </size>\n          </property>\n         </spacer>\n        </item>\n       </layout>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QDialogButtonBox\" name=\"buttonBox\">\n     <property name=\"orientation\">\n      <enum>Qt::Horizontal</enum>\n     </property>\n     <property name=\"standardButtons\">\n      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>\n     </property>\n    </widget>\n   </item>\n  </layout>\n </widget>\n <tabstops>\n  <tabstop>pathTextEdit</tabstop>\n  <tabstop>browserButton</tabstop>\n  <tabstop>clearButton</tabstop>\n  <tabstop>reloadButton</tabstop>\n  <tabstop>sysPathTextEdit</tabstop>\n  <tabstop>buttonBox</tabstop>\n </tabstops>\n <resources/>\n <connections>\n  <connection>\n   <sender>buttonBox</sender>\n   <signal>accepted()</signal>\n   <receiver>ImportGopathDialog</receiver>\n   <slot>accept()</slot>\n   <hints>\n    <hint type=\"sourcelabel\">\n     <x>248</x>\n     <y>254</y>\n    </hint>\n    <hint type=\"destinationlabel\">\n     <x>157</x>\n     <y>274</y>\n    </hint>\n   </hints>\n  </connection>\n  <connection>\n   <sender>buttonBox</sender>\n   <signal>rejected()</signal>\n   <receiver>ImportGopathDialog</receiver>\n   <slot>reject()</slot>\n   <hints>\n    <hint type=\"sourcelabel\">\n     <x>316</x>\n     <y>260</y>\n    </hint>\n    <hint type=\"destinationlabel\">\n     <x>286</x>\n     <y>274</y>\n    </hint>\n   </hints>\n  </connection>\n </connections>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/imageeditor/imageeditor.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: imageeditor.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"imageeditor.h\"\n#include \"imageeditorfile.h\"\n#include \"imageeditorwidget.h\"\n#include <QFileInfo>\n#include <QVBoxLayout>\n#include <QHBoxLayout>\n#include <QAction>\n#include <QLabel>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n#define EDITOR_TOOLBAR_VISIBLE \"editor/toolbar_visible\"\n#define EDITOR_NAVBAR_VISIBLE \"editor/navbar_visible\"\n\nImageEditor::ImageEditor(LiteApi::IApplication *app)\n    : m_liteApp(app)\n{\n    m_file = new ImageEditorFile(m_liteApp,this);\n    m_imageWidget = new ImageEditorWidget;\n    m_widget = new QWidget;\n    m_toolBar = new QToolBar;\n    m_mvToolBar = new QToolBar;\n    m_navBar = new NavigateBar(app,this);\n    m_navBar->createToolBar(\"editor.nav\",m_widget);\n    m_navBar->toolBar()->setVisible(m_liteApp->settings()->value(EDITOR_NAVBAR_VISIBLE,true).toBool());\n\n    m_toolBar->setIconSize(LiteApi::getToolBarIconSize(m_liteApp));\n    m_mvToolBar->setIconSize(LiteApi::getToolBarIconSize(m_liteApp));\n\n    QAction *zoomInAct = new QAction(tr(\"ZoomIn\"),this);\n    zoomInAct->setIcon(QIcon(\"icon:/imageeditor/images/zoomin.png\"));\n\n    QAction *zoomOutAct = new QAction(tr(\"ZoomOut\"),this);\n    zoomOutAct->setIcon(QIcon(\"icon:/imageeditor/images/zoomout.png\"));\n\n    QAction *resetSizeAct = new QAction(tr(\"Reset to original size\"),this);\n    resetSizeAct->setIcon(QIcon(\"icon:/imageeditor/images/resetsize.png\"));\n\n    QAction *fitViewAct = new QAction(tr(\"Fit to view\"),this);\n    fitViewAct->setIcon(QIcon(\"icon:/imageeditor/images/fitview.png\"));\n\n    QAction *playAct = new QAction(tr(\"Play movie\"),this);\n    playAct->setIcon(QIcon(\"icon:/imageeditor/images/play.png\"));\n    playAct->setCheckable(true);\n\n    QAction *prevFrameAct = new QAction(tr(\"Prev frame\"),this);\n    prevFrameAct->setIcon(QIcon(\"icon:/imageeditor/images/prevframe.png\"));\n    connect(prevFrameAct,SIGNAL(triggered()),m_file,SLOT(jumpToPrevFrame()));\n\n    QAction *nextFrameAct = new QAction(tr(\"Next frame\"),this);\n    nextFrameAct->setIcon(QIcon(\"icon:/imageeditor/images/nextframe.png\"));\n    connect(nextFrameAct,SIGNAL(triggered()),m_file,SLOT(jumpToNextFrame()));\n\n    m_playAct = playAct;\n\n    connect(zoomInAct,SIGNAL(triggered()),m_imageWidget,SLOT(zoomIn()));\n    connect(zoomOutAct,SIGNAL(triggered()),m_imageWidget,SLOT(zoomOut()));\n    connect(resetSizeAct,SIGNAL(triggered()),m_imageWidget,SLOT(resetSize()));\n    connect(fitViewAct,SIGNAL(triggered()),m_imageWidget,SLOT(fitToView()));\n    connect(playAct,SIGNAL(toggled(bool)),this,SLOT(toggledPlay(bool)));\n\n    connect(m_imageWidget,SIGNAL(scaleFactorChanged(qreal)),this,SLOT(scaleFactorChanged(qreal)));\n    connect(m_file,SIGNAL(frameChanged(int)),this,SLOT(frameChanged(int)));\n\n    m_imageInfo = new QLabel;\n    m_imageInfo->setText(\"32x32\");\n\n    m_scaleInfo = new QLabel;\n    m_scaleInfo->setText(\"100.00%\");\n\n    m_frameLabel = new QLabel;\n    m_frameLabel->setText(\"\");\n\n    m_toolBar->addAction(zoomInAct);\n    m_toolBar->addAction(zoomOutAct);\n    m_toolBar->addAction(resetSizeAct);\n    m_toolBar->addAction(fitViewAct);\n    m_toolBar->addSeparator();\n    m_toolBar->addWidget(m_imageInfo);\n    m_toolBar->addSeparator();\n    m_toolBar->addWidget(m_scaleInfo);\n    m_toolBar->addSeparator();\n\n    m_mvToolBar->addAction(playAct);\n    m_mvToolBar->addSeparator();\n    m_mvToolBar->addAction(prevFrameAct);\n    m_mvToolBar->addAction(nextFrameAct);\n    m_mvToolBar->addSeparator();\n    m_mvToolBar->addWidget(m_frameLabel);\n    m_mvToolBar->addSeparator();\n\n    QHBoxLayout *toolLayout = new QHBoxLayout;\n    toolLayout->setMargin(0);\n    toolLayout->setSpacing(0);\n    toolLayout->addWidget(m_toolBar);\n    toolLayout->addWidget(m_mvToolBar);\n    toolLayout->addWidget(m_navBar->toolBar());\n    toolLayout->addSpacing(0);\n\n    QVBoxLayout *layout = new QVBoxLayout;\n    layout->setMargin(0);\n    layout->setSpacing(0);\n    layout->addLayout(toolLayout);\n    layout->addWidget(m_imageWidget);\n    m_widget->setLayout(layout);\n\n    connect(m_liteApp,SIGNAL(broadcast(QString,QString,QVariant)),this,SLOT(broadcast(QString,QString,QVariant)));\n}\n\nImageEditor::~ImageEditor()\n{\n    delete m_widget;\n    delete m_file;\n}\n\nvoid ImageEditor::broadcast(const QString &module, const QString &id, const QVariant &param)\n{\n    if (module == \"liteeditor\" && id == \"font\" && param != this->filePath()) {\n    } else if (module == \"liteeditor\" && id == EDITOR_NAVBAR_VISIBLE) {\n        m_navBar->toolBar()->setVisible(param.toBool());\n    } else if (module == \"liteeditor\" && id == EDITOR_TOOLBAR_VISIBLE) {\n    }\n}\n\n\nQWidget *ImageEditor::widget()\n{\n    return  m_widget;\n}\n\nQString ImageEditor::name() const\n{\n    return  QFileInfo(m_file->filePath()).fileName();\n}\n\nbool ImageEditor::open(const QString &filePath, const QString &mimeType)\n{\n    bool b = m_file->open(filePath,mimeType);\n    m_imageWidget->setImageItem(m_file->graphicsItem());\n    QSize sz = m_file->imageSize();\n    m_imageInfo->setText(QString(\"%1x%2\").arg(sz.width()).arg(sz.height()));\n    m_mvToolBar->setVisible(m_file->isMovie());\n    m_navBar->LoadPath(filePath);\n    return  b;\n}\n\nbool ImageEditor::reload()\n{\n    if (!m_file->isValid()) {\n        return  false;\n    }\n    QString filePath = m_file->filePath();\n    QString mimeType = m_file->mimeType();\n    m_file->clear();\n    bool b = m_file->open(filePath,mimeType);\n    m_imageWidget->setImageItem(m_file->graphicsItem());\n    QSize sz = m_file->imageSize();\n    m_imageInfo->setText(QString(\"%1x%2\").arg(sz.width()).arg(sz.height()));\n    m_mvToolBar->setVisible(m_file->isMovie());\n    return b;\n}\n\nbool ImageEditor::save()\n{\n    return  false;\n}\n\nbool ImageEditor::saveAs(const QString &filePath)\n{\n    return  false;\n}\n\nvoid ImageEditor::setReadOnly(bool b)\n{\n\n}\n\nbool ImageEditor::isReadOnly() const\n{\n    return  true;\n}\n\nbool ImageEditor::isModified() const\n{\n    return  false;\n}\n\nQString ImageEditor::filePath() const\n{\n    return  m_file->filePath();\n}\n\nQString ImageEditor::mimeType() const\n{\n    return  m_file->mimeType();\n}\n\nQByteArray ImageEditor::saveState() const\n{\n    return  QByteArray();\n}\n\nbool ImageEditor::restoreState(const QByteArray &array)\n{\n    return false;\n}\n\nvoid ImageEditor::onActive()\n{\n\n}\n\nvoid ImageEditor::scaleFactorChanged(qreal factor)\n{\n    QString info = QString::number(factor * 100, 'f', 2) + QLatin1Char('%');\n    m_scaleInfo->setText(info);\n}\n\nvoid ImageEditor::toggledPlay(bool checked)\n{\n    if (checked) {\n        m_playAct->setText(tr(\"Pause movie\"));\n        m_playAct->setIcon(QIcon(\"icon:/imageeditor/images/pause.png\"));\n    } else {\n        m_playAct->setText(tr(\"Play movie\"));\n        m_playAct->setIcon(QIcon(\"icon:/imageeditor/images/play.png\"));\n    }\n    m_file->setPaused(!checked);\n}\n\nvoid ImageEditor::frameChanged(int frameNumber)\n{\n    m_frameLabel->setText(QString(\"%1/%2\").arg(frameNumber+1).arg(m_file->frameCount()));\n}\n"
  },
  {
    "path": "liteidex/src/plugins/imageeditor/imageeditor.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: imageeditor.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef IMAGEEDITOR_H\n#define IMAGEEDITOR_H\n\n#include \"liteapi/liteapi.h\"\n#include \"navigate/navigate.h\"\n\nclass ImageEditorFile;\nclass ImageEditorWidget;\nclass QLabel;\nclass QToolBar;\nclass ImageEditor : public LiteApi::IEditor\n{\n    Q_OBJECT\npublic:\n    ImageEditor(LiteApi::IApplication *app);\n    virtual ~ImageEditor();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual bool open(const QString &filePath,const QString &mimeType);\n    virtual bool reload();\n    virtual bool save();\n    virtual bool saveAs(const QString &filePath);\n    virtual void setReadOnly(bool b);\n    virtual bool isReadOnly() const;\n    virtual bool isModified() const;\n    virtual QString filePath() const;\n    virtual QString mimeType() const;\n    virtual QByteArray saveState() const;\n    virtual bool restoreState(const QByteArray &array);\n    virtual void onActive();\npublic slots:\n    void scaleFactorChanged(qreal factor);\n    void toggledPlay(bool checked);\n    void frameChanged(int frameNumber);\n    void broadcast(const QString &module, const QString &id, const QVariant &param);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    ImageEditorFile *m_file;\n    ImageEditorWidget *m_imageWidget;\n    QWidget *m_widget;\n    QToolBar *m_toolBar;\n    QToolBar *m_mvToolBar;\n    NavigateBar *m_navBar;\n    QLabel *m_imageInfo;\n    QLabel *m_scaleInfo;\n    QLabel *m_frameLabel;\n    QAction *m_playAct;\n};\n\n\n#endif // IMAGEEDITOR_H\n"
  },
  {
    "path": "liteidex/src/plugins/imageeditor/imageeditor.pro",
    "content": "TARGET = imageeditor\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude (../../utils/mimetype/mimetype.pri)\ninclude (../../utils/navigate/navigate.pri)\n\nDEFINES += IMAGEEDITOR_LIBRARY\n\nSOURCES += \\\n    imageeditor.cpp \\\n    imageeditorfactory.cpp \\\n    imageeditorfile.cpp \\\n    imageeditorplugin.cpp \\\n    imageeditorwidget.cpp\n\nHEADERS +=\\\n        imageeditor.h \\\n        imageeditor_global.h \\\n        imageeditorfactory.h \\\n        imageeditorfile.h \\\n        imageeditorplugin.h \\\n        imageeditorwidget.h\n\nRESOURCES += \\\n    imageeditor.qrc\n\n!isEmpty(QT.svg.name): QT += svg\nelse: DEFINES += QT_NO_SVG\n\n"
  },
  {
    "path": "liteidex/src/plugins/imageeditor/imageeditor.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/imageeditor\">\n        <file>images/fitview.png</file>\n        <file>images/resetsize.png</file>\n        <file>images/zoomin.png</file>\n        <file>images/zoomout.png</file>\n        <file>images/play.png</file>\n        <file>images/pause.png</file>\n        <file>images/prevframe.png</file>\n        <file>images/nextframe.png</file>\n    </qresource>\n</RCC>\n"
  },
  {
    "path": "liteidex/src/plugins/imageeditor/imageeditor_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: imageeditor_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef IMAGEEDITOR_GLOBAL_H\n#define IMAGEEDITOR_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(IMAGEEDITOR_LIBRARY)\n#  define IMAGEEDITORSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define IMAGEEDITORSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#endif // IMAGEEDITOR_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/imageeditor/imageeditorfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: imageeditorfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"imageeditorfactory.h\"\n#include \"mimetype/mimetype.h\"\n#include \"imageeditor.h\"\n#include <QImageReader>\n#if QT_VERSION >= 0x050000\n#include <QMimeDatabase>\n#include <QMimeType>\n#endif\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nImageEditorFactory::ImageEditorFactory(IApplication *app, QObject *parent)\n    : LiteApi::IEditorFactory(parent), m_liteApp(app)\n{\n#if QT_VERSION >= 0x050000\n    QList<QByteArray> supportFormats = QImageReader::supportedImageFormats();\n    QMimeDatabase db;\n    foreach (QByteArray _type, QImageReader::supportedMimeTypes()) {\n        QString type = QString::fromUtf8(_type);\n        QMimeType mt = db.mimeTypeForName(type);\n        if (!mt.isValid()) {\n            continue;\n        }\n        QStringList patterns;\n        foreach(QString fmt, mt.suffixes()) {\n            if (supportFormats.contains(fmt.toUtf8())) {\n                patterns << \"*.\"+fmt;\n            }\n        }\n        if (patterns.isEmpty()) {\n            continue;\n        }\n        MimeType *mimeType = new MimeType;\n        mimeType->setType(type);\n        mimeType->setComment(mt.comment());\n        foreach (QString p, patterns) {\n            mimeType->appendGlobPatterns(p);\n        }\n        m_liteApp->mimeTypeManager()->addMimeType(mimeType);\n        m_mimeTypes.append(type);\n    }\n#else\n    QString mimeTypeList = \"image/bmp:bmp;image/gif:gif;image/jpeg:jpg,jpeg;image/png:png;image/x-portable-bitmap:pbm;image/x-portable-graymap:pgm;image/x-portable-pixmap:ppm;image/x-xbitmap:xbm;image/x-xpixmap:xpm;image/svg+xml:svg;\";\n    QList<QByteArray> supportFormats = QImageReader::supportedImageFormats();\n    foreach (QString mtype, mimeTypeList.split(\";\",qtSkipEmptyParts)) {\n        QStringList ar = mtype.split(\":\",qtSkipEmptyParts);\n        if (ar.size() != 2) {\n            continue;\n        }\n        QString type = ar[0];\n        QStringList fmts = ar[1].split(\",\",qtSkipEmptyParts);\n        QStringList patterns;\n        foreach (QString fmt, fmts) {\n            if (supportFormats.contains(fmt.toUtf8())) {\n                patterns << \"*.\"+fmt;\n            }\n        }\n        if (patterns.isEmpty()) {\n            continue;\n        }\n        MimeType *mimeType = new MimeType;\n        mimeType->setType(type);\n        mimeType->setComment(QString(\"%1 Image\").arg(type));\n        foreach (QString p, patterns) {\n            mimeType->appendGlobPatterns(p);\n        }\n        m_liteApp->mimeTypeManager()->addMimeType(mimeType);\n        m_mimeTypes.append(type);\n    }\n#endif\n}\n\nQStringList ImageEditorFactory::mimeTypes() const\n{\n    return  m_mimeTypes;\n}\n\nIEditor *ImageEditorFactory::open(const QString &fileName, const QString &mimeType)\n{\n    ImageEditor *view = new ImageEditor(m_liteApp);\n    if (!view->open(fileName,mimeType)) {\n        delete  view;\n        return  0;\n    }\n    return  view;\n}\n\nIEditor *ImageEditorFactory::create(const QString &contents, const QString &mimeType)\n{\n    return  0;\n}\n\nQString ImageEditorFactory::id() const\n{\n    return \"ImageViewer\";\n}\n\nQString ImageEditorFactory::displayName() const\n{\n    return  tr(\"Image Viewer\");\n}\n\nbool ImageEditorFactory::testMimeType(const QString &mimeType)\n{\n    return m_mimeTypes.contains(mimeType);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/imageeditor/imageeditorfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: imageeditorfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef IMAGEEDITORFACTORY_H\n#define IMAGEEDITORFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nusing namespace LiteApi;\n\nclass ImageEditorFactory : public LiteApi::IEditorFactory\n{\n    Q_OBJECT\npublic:\n    ImageEditorFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual IEditor *open(const QString &fileName, const QString &mimeType);\n    virtual IEditor *create(const QString &contents, const QString &mimeType);\n    virtual QString id() const;\n    virtual QString displayName() const;\n    virtual bool testMimeType(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QStringList m_mimeTypes;\n};\n\n\n#endif // IMAGEEDITORFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/imageeditor/imageeditorfile.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: imageeditorfile.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"imageeditorfile.h\"\n#include <QGraphicsItem>\n#include <QImageReader>\n#include <QGraphicsPixmapItem>\n#include <QMovie>\n#include <QPainter>\n#include <QStyleOptionGraphicsItem>\n#include <QPixmap>\n\n#ifndef QT_NO_SVG\n#include <QGraphicsSvgItem>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n#endif\n\nImageEditorFile::ImageEditorFile(LiteApi::IApplication *app, QObject *parent)\n    : QObject(parent), m_liteApp(app)\n{\n    m_movie = 0;\n    m_item = 0;\n    m_type = Invalid;\n    m_isPaused = true;\n}\n\nImageEditorFile::~ImageEditorFile()\n{\n    clear();\n}\n\nbool ImageEditorFile::open(const QString &filePath, const QString &mimeType)\n{\n    QByteArray format = QImageReader::imageFormat(filePath);\n    if (format.isEmpty()) {\n        m_liteApp->appendLog(\"ImageViewer\", QString(\"Image format not supported. %1\").arg(filePath));\n        return  false;\n    }\n#ifndef QT_NO_SVG\n    else if (format.startsWith(\"svg\")) {\n        QGraphicsItem *item = new QGraphicsSvgItem(filePath);\n        if (item->boundingRect().isEmpty()) {\n            delete  item;\n            m_liteApp->appendLog(\"ImageViewer\", QString(\"SVG file invalid. %1\").arg(filePath));\n            return  false;\n        }\n        m_item = item;\n        m_type = Svg;\n    }\n#endif\n     else if (QMovie::supportedFormats().contains(format)) {\n        m_movie = new QMovie(filePath,QByteArray(),this);\n        if (!m_movie->isValid()) {\n            delete  m_movie;\n            m_liteApp->appendLog(\"ImageViewer\", QString(\"Movie file invalid. %1\").arg(filePath));\n            return  false;\n        }\n        m_movie->setCacheMode(QMovie::CacheAll);\n        m_item = new GraphicsMovieItem(m_movie);\n        m_type = Movie;\n        connect(m_movie,SIGNAL(finished()),m_movie,SLOT(start()));\n        connect(m_movie,SIGNAL(frameChanged(int)),this,SIGNAL(frameChanged(int)));\n        m_movie->start();\n        m_isPaused = false;\n        setPaused(true);\n    } else {\n        QPixmap pixmap(filePath);\n        if (pixmap.isNull()) {\n            m_liteApp->appendLog(\"ImageViewer\", QString(\"Pixmap file invalid. %1\").arg(filePath));\n            return  false;\n        }\n        m_type = Pixmap;\n        m_item = new QGraphicsPixmapItem(pixmap);\n        ((QGraphicsPixmapItem*)m_item)->setTransformationMode(Qt::SmoothTransformation);\n    }\n    m_mimeType = mimeType;\n    m_filePath = filePath;\n    return  true;\n}\n\nvoid ImageEditorFile::setPaused(bool paused)\n{\n    if (!m_movie || m_isPaused == paused)\n        return;\n    m_isPaused = paused;\n    m_movie->setPaused(paused);\n    emit isPausedChanged(m_isPaused);\n}\n\nQSize ImageEditorFile::imageSize() const\n{\n    if (m_item) {\n        QRectF sz = m_item->boundingRect();\n        return  QSize(sz.width(),sz.height());\n    }\n    return QSize();\n}\n\nint ImageEditorFile::frameCount() const\n{\n    if (m_type != Movie) {\n        return 1;\n    }\n    return  m_movie->frameCount();\n}\n\nint ImageEditorFile::currentFrame() const\n{\n    if (m_type != Movie) {\n        return  0;\n    }\n    return  m_movie->currentFrameNumber();\n}\n\nbool ImageEditorFile::jumpToNextFrame()\n{\n    if (m_type != Movie) {\n        return  false;\n    }\n    int cur = m_movie->currentFrameNumber();\n    cur++;\n    if (cur < m_movie->frameCount()) {\n        return  m_movie->jumpToFrame(cur);\n    }\n    return  false;\n}\n\nbool ImageEditorFile::jumpToPrevFrame()\n{\n    if (m_type != Movie) {\n        return  false;\n    }\n    int cur = m_movie->currentFrameNumber();\n    cur--;\n    if (cur >= 0) {\n        return m_movie->jumpToFrame(cur);\n    }\n    return  false;\n}\n\nvoid ImageEditorFile::clear()\n{\n    if (m_movie) {\n        delete  m_movie;\n    }\n    if (m_item) {\n        delete  m_item;\n    }\n    m_filePath.clear();\n    m_type = Invalid;\n}\n\nGraphicsMovieItem::GraphicsMovieItem(QMovie *movie)\n    : m_movie(movie)\n{\n    setPixmap(m_movie->currentPixmap());\n    connect(m_movie,SIGNAL(updated(QRect)),this,SLOT(movieUpdate(QRect)));\n}\n\nvoid GraphicsMovieItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)\n{\n    const bool smoothTransform = painter->worldTransform().m11() < 1;\n    painter->setRenderHint(QPainter::SmoothPixmapTransform, smoothTransform);\n    painter->drawPixmap(offset(), m_movie->currentPixmap());\n}\n\nQRectF GraphicsMovieItem::boundingRect() const {\n    QRect rc = m_movie->frameRect();\n    return  QRectF(rc);\n}\n\nvoid GraphicsMovieItem::movieUpdate(const QRect &rc)\n{\n    QGraphicsPixmapItem::update(rc);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/imageeditor/imageeditorfile.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: imageeditorfile.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef IMAGEEDITORFILE_H\n#define IMAGEEDITORFILE_H\n\n#include \"liteapi/liteapi.h\"\n#include <QGraphicsPixmapItem>\n\nclass QGraphicsItem;\nclass QPixmap;\nclass QMovie;\nclass ImageEditorFile : public QObject\n{\n    Q_OBJECT\npublic:\n    enum Type {\n        Invalid = 0,\n        Svg = 1,\n        Movie = 2,\n        Pixmap = 3,\n    };\npublic:\n    ImageEditorFile(LiteApi::IApplication *app, QObject *parent);\n    virtual ~ImageEditorFile();\n    bool open(const QString &filePath, const QString &mimeType);\n    bool isValid() const {\n        return  m_type != Invalid;\n    }\n    bool isMovie() const {\n        return m_type == Movie;\n    }\n    virtual QGraphicsItem *graphicsItem() const {\n        return  m_item;\n    }\n    virtual QString mimeType() const {\n        return  m_mimeType;\n    }\n    void setPaused(bool paused);\n    bool isPaused() const {\n        return  m_isPaused;\n    }\n    Type type() const {\n        return  m_type;\n    }\n    QString filePath() const {\n        return  m_filePath;\n    }\n    QSize imageSize() const;\n    void clear();\npublic:\n    int frameCount() const;\n    int currentFrame() const;\npublic slots:\n    bool jumpToNextFrame();\n    bool jumpToPrevFrame();\nsignals:\n    void isPausedChanged(bool);\n    void frameChanged(int frameNumber);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QString m_mimeType;\n    QGraphicsItem *m_item;\n    QPixmap *m_pixmap;\n    QMovie *m_movie;\n    Type    m_type;\n    QString m_filePath;\n    bool    m_isPaused;\n};\n\nclass GraphicsMovieItem : public QObject, public QGraphicsPixmapItem\n{\n    Q_OBJECT\npublic:\n    GraphicsMovieItem(QMovie *movie);\n    void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *);\n    QRectF boundingRect() const;\npublic slots:\n    void movieUpdate(const QRect &rc);\nprotected:\n    QMovie *m_movie;\n};\n\n#endif // IMAGEEDITORFILE_H\n"
  },
  {
    "path": "liteidex/src/plugins/imageeditor/imageeditorplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: imageeditorplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"imageeditorplugin.h\"\n#include \"imageeditorfactory.h\"\n#include <QtPlugin>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nImageEditorPlugin::ImageEditorPlugin()\n{\n}\n\nbool ImageEditorPlugin::load(LiteApi::IApplication *app)\n{\n    app->editorManager()->addFactory(new ImageEditorFactory(app,this));\n    return true;\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/imageeditor/imageeditorplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: imageeditorplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef IMAGEEDITORPLUGIN_H\n#define IMAGEEDITORPLUGIN_H\n\n#include \"imageeditor_global.h\"\n#include \"liteapi/liteapi.h\"\n\nclass ImageEditorPlugin : public LiteApi::IPlugin\n{\npublic:\n    ImageEditorPlugin();\n    virtual bool load(LiteApi::IApplication *app);\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<ImageEditorPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.ImageEditorPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/ImageViewer\");\n        m_info->setVer(\"X36.2\");\n        m_info->setName(\"ImageEditor\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setInfo(\"Image Viewer Editor\");\n        //m_info->appendDepend(\"plugin/liteenv\");\n    }\n};\n\n\n#endif // IMAGEEDITORPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/imageeditor/imageeditorwidget.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: imageeditorwidget.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"imageeditorwidget.h\"\n#include <QPainter>\n#include <QGraphicsItem>\n#include <QWheelEvent>\n#include <QGestureEvent>\n#include <QPinchGesture>\n#include <QPanGesture>\n#include <QScrollBar>\n#include <math.h>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nImageEditorWidget::ImageEditorWidget()\n{\n    setScene(new QGraphicsScene(this));\n    setTransformationAnchor(AnchorUnderMouse);\n    setDragMode(RubberBandDrag);\n    setViewportUpdateMode(FullViewportUpdate);\n    setFrameShape(QFrame::NoFrame);\n    setRenderHint(QPainter::SmoothPixmapTransform);\n\n    QPixmap tilePixmap(20, 20);\n    tilePixmap.fill(QColor(229,229,229));\n    QPainter tilePainter(&tilePixmap);\n    QColor color(177, 177, 177);\n    tilePainter.fillRect(0, 0, 10, 10, color);\n    tilePainter.fillRect(10, 10, 10, 10, color);\n    tilePainter.end();\n\n    setBackgroundBrush(tilePixmap);\n    m_scaleFactor = 1.2;\n    m_imageItem = 0;\n    grabGesture(Qt::PinchGesture);\n   // grabGesture(Qt::PanGesture);\n}\n\nImageEditorWidget::~ImageEditorWidget()\n{\n    if (m_imageItem) {\n        this->scene()->removeItem(m_imageItem);\n    }\n    ungrabGesture(Qt::PinchGesture);\n    //ungrabGesture(Qt::PanGesture);\n}\n\nvoid ImageEditorWidget::setImageItem(QGraphicsItem *item)\n{\n    QGraphicsScene *s = this->scene();\n    s->clear();\n    m_imageItem = item;\n    if (item) {\n        item->setZValue(0);\n        s->addItem(item);\n    }\n    this->resetSize();\n}\n\n\nvoid ImageEditorWidget::drawBackground(QPainter *p, const QRectF &)\n{\n    p->save();\n    p->resetTransform();\n    p->fillRect(viewport()->rect(),QColor(236,236,236));\n    if (m_imageItem) {\n        p->setClipRegion(this->mapFromScene(this->sceneRect()));\n    }\n    p->drawTiledPixmap(viewport()->rect(), backgroundBrush().texture());\n    p->restore();\n}\n\nvoid ImageEditorWidget::doScale(qreal factor)\n{\n    qreal currentScale = transform().m11();\n    qreal newScale = currentScale * factor;\n    qreal actualFactor = factor;\n    // cap to 0.001 - 1000\n    if (newScale > 1000)\n        actualFactor = 1000./currentScale;\n    else if (newScale < 0.001)\n        actualFactor = 0.001/currentScale;\n\n    scale(actualFactor, actualFactor);\n    emitScaleFactor();\n    QGraphicsPixmapItem *pix = dynamic_cast<QGraphicsPixmapItem*>(m_imageItem);\n    if (pix) {\n        pix->setTransformationMode(\n                    transform().m11() < 1 ? Qt::SmoothTransformation : Qt::FastTransformation);\n    }\n}\n\nvoid ImageEditorWidget::wheelEvent(QWheelEvent *event)\n{\n    if (event->modifiers() & Qt::ControlModifier) {\n        const int delta = event->delta();\n        if (delta < 0)\n            zoomOut();\n        else if (delta > 0)\n            zoomIn();\n        return;\n    }\n    if (event->delta() != 0) {\n        int delta = event->delta();\n#if QT_VERSION >= 0x050700\n        if (event->inverted()) {\n            delta = -event->delta();\n        }\n#endif\n        if (event->orientation() == Qt::Horizontal) {\n            this->horizontalScrollBar()->setValue(this->horizontalScrollBar()->value()-delta);\n        } else {\n            this->verticalScrollBar()->setValue(this->verticalScrollBar()->value()-delta);\n        }\n    }\n    event->accept();\n}\n\nbool ImageEditorWidget::gestureEvent(QGestureEvent *event)\n{\n    if (QGesture *pinch = event->gesture(Qt::PinchGesture))\n        pinchTriggered(static_cast<QPinchGesture *>(pinch));\n\n    return true;\n}\n\nvoid ImageEditorWidget::pinchTriggered(QPinchGesture *gesture)\n{\n    QPinchGesture::ChangeFlags changeFlags = gesture->changeFlags();\n    if (changeFlags & QPinchGesture::ScaleFactorChanged)\n    {\n        qreal value = gesture->property(\"scaleFactor\").toReal();\n        doScale(value);\n    }\n}\n\nbool ImageEditorWidget::event(QEvent *event)\n{\n    if (event->type() == QEvent::Gesture)\n    {\n        return gestureEvent(static_cast<QGestureEvent*>(event));\n    }\n    return QGraphicsView::event(event);\n}\n\nvoid ImageEditorWidget::zoomIn()\n{\n    doScale(m_scaleFactor);\n}\n\nvoid ImageEditorWidget::zoomOut()\n{\n    doScale(1.0 / m_scaleFactor);\n}\n\nvoid ImageEditorWidget::resetSize()\n{\n    resetTransform();\n    emitScaleFactor();\n}\n\nvoid ImageEditorWidget::fitToView()\n{\n    //fitInView(m_imageItem, Qt::KeepAspectRatio);\n    QRect viewRect = this->viewport()->rect();\n    QRect sceneRect = this->mapFromScene(this->sceneRect()).boundingRect();\n    qreal x = qreal(viewRect.width())/sceneRect.width();\n    qreal y = qreal(viewRect.height())/sceneRect.height();\n    //scale(x,y);\n    qreal v = qMin(x,y);\n    scale(v,v);\n    emitScaleFactor();\n}\n\nvoid ImageEditorWidget::emitScaleFactor()\n{\n    qreal factor = transform().m11();\n    emit scaleFactorChanged(factor);\n}\n\nqreal ImageEditorWidget::scaleFactor() const\n{\n    return transform().m11();\n}\n\n"
  },
  {
    "path": "liteidex/src/plugins/imageeditor/imageeditorwidget.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: imageeditorwidget.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef IMAGEEDITORWIDGET_H\n#define IMAGEEDITORWIDGET_H\n\n#include <QGraphicsView>\n\nclass QGestureEvent;\nclass QPinchGesture;\nclass QPanGesture;\nclass ImageEditorWidget : public QGraphicsView\n{\n    Q_OBJECT\npublic:\n    ImageEditorWidget();\n    virtual ~ImageEditorWidget();\n    void setImageItem(QGraphicsItem *item);\n    void doScale(qreal factor);\n    qreal scaleFactor() const;\npublic slots:\n    void zoomIn();\n    void zoomOut();\n    void resetSize();\n    void fitToView();\nsignals:\n    void scaleFactorChanged(qreal factory);\nprotected:\n    void drawBackground(QPainter *p, const QRectF &);\n    void wheelEvent(QWheelEvent *event);\n    bool event(QEvent *event);\n    bool gestureEvent(QGestureEvent *event);\n    void pinchTriggered(QPinchGesture *gesture);\n    void emitScaleFactor();\nprotected:\n    QGraphicsItem *m_imageItem;\n    double m_scaleFactor;\n};\n\n#endif // IMAGEEDITORWIDGET_H\n"
  },
  {
    "path": "liteidex/src/plugins/jsonedit/jsonedit.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: jsonedit.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"jsonedit.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"editorutil/editorutil.h\"\n#include <qjson/include/QJson/Parser>\n#include <qjson/include/QJson/Serializer>\n#include <QPlainTextEdit>\n#include <QProcess>\n#include <QToolBar>\n#include <QToolButton>\n#include <QTextCodec>\n#include <QMenu>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nJsonEdit::JsonEdit(LiteApi::IApplication *app, QObject *parent)\n    : QObject(parent), m_liteApp(app)\n{\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(this,\"JsonEdit\");\n\n    m_verifyAct = new QAction(tr(\"Verify\"),this);\n    actionContext->regAction(m_verifyAct,\"VerifyJson\",\"\");\n    m_formatAct = new QAction(tr(\"Format Json\"),this);\n    actionContext->regAction(m_formatAct,\"FormatJson\",\"Ctrl+I\");\n    m_compactAct = new QAction(tr(\"Compact Json\"),this);\n    actionContext->regAction(m_compactAct,\"CompactJson\",\"\");\n\n    connect(m_liteApp->editorManager(),SIGNAL(editorCreated(LiteApi::IEditor*)),this,SLOT(editorCreated(LiteApi::IEditor*)));\n    connect(m_liteApp->editorManager(),SIGNAL(editorSaved(LiteApi::IEditor*)),this,SLOT(editorSaved(LiteApi::IEditor*)));\n    connect(m_verifyAct,SIGNAL(triggered()),this,SLOT(verify()));\n    connect(m_formatAct,SIGNAL(triggered()),this,SLOT(format()));\n    connect(m_compactAct,SIGNAL(triggered()),this,SLOT(compact()));\n}\n\n//void JsonEdit::indentNone()\n//{\n//    format(QJson::IndentNone);\n//}\n\n//void JsonEdit::indentCompact()\n//{\n//    format(QJson::IndentCompact);\n//}\n\n//void JsonEdit::indentMinimum()\n//{\n//    format(QJson::IndentMinimum);\n//}\n\n//void JsonEdit::indentMedium()\n//{\n//    format(QJson::IndentMedium);\n//}\n//void JsonEdit::indentFull()\n//{\n//    format(QJson::IndentFull);\n//}\n\nbool JsonEdit::verifyJson(LiteApi::IEditor *editor)\n{\n    LiteApi::ILiteEditor *ed = LiteApi::getLiteEditor(editor);\n    if (!ed) {\n        return false;\n    }\n    QJson::Parser parser;\n    bool ok = true;\n    parser.parse(ed->utf8Data(),&ok);\n    if (!ok) {\n        ed->setNavigateHead(LiteApi::EditorNavigateError,\"json verify error\");\n        if (parser.errorLine() > 0) {\n            ed->insertNavigateMark(parser.errorLine()-1,LiteApi::EditorNavigateError,parser.errorString(),\"Json\");\n        }\n    } else {\n        ed->setNavigateHead(LiteApi::EditorNavigateNormal,\"json verify success\");\n        ed->clearAllNavigateMark(LiteApi::EditorNavigateError,\"Json\");\n    }\n    return ok;\n}\n\nvoid JsonEdit::verify()\n{\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n    if (!editor || editor->mimeType() != \"application/json\") {\n        return;\n    }\n    verifyJson(editor);\n}\n\nvoid JsonEdit::format()\n{\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n    if (!editor || editor->mimeType() != \"application/json\") {\n        return;\n    }\n    if (!verifyJson(editor)) {\n        return;\n    }\n    fmtEditor(editor,false,false,true,1000);\n}\n\nvoid JsonEdit::compact()\n{\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n    if (!editor || editor->mimeType() != \"application/json\") {\n        return;\n    }\n    if (!verifyJson(editor)) {\n        return;\n    }\n    fmtEditor(editor,true,false,true,1000);\n}\n\nvoid JsonEdit::fmtEditor(LiteApi::IEditor *editor, bool compact, bool tabs, bool diff,int timeout)\n{\n    LiteApi::ITextEditor *textEditor = LiteApi::getTextEditor(editor);\n    if (!textEditor) {\n        return;\n    }\n    bool save = !editor->isModified();\n\n    QPlainTextEdit *ed = LiteApi::findExtensionObject<QPlainTextEdit*>(editor,\"LiteApi.QPlainTextEdit\");\n    if (!ed) {\n        return;\n    }\n\n    QString text = ed->toPlainText();\n    if (text.isEmpty()) {\n        return;\n    }\n\n    QProcess process;\n    process.setEnvironment(LiteApi::getGoEnvironment(m_liteApp).toStringList());\n\n    QStringList args;\n\n    args << \"jsonfmt\";\n    if (compact) {\n        args << \"-c\";\n    }\n    if (tabs) {\n        args << \"-tabs\";\n    }\n    if (diff) {\n        args << \"-d\";\n    }\n    QString cmd = LiteApi::getGotools(m_liteApp);\n    process.start(cmd,args);\n    if (!process.waitForStarted(timeout)) {\n        m_liteApp->appendLog(\"jsonfmt\",QString(\"Timed out after %1ms when starting json format\").arg(timeout),false);\n        return;\n    }\n    process.write(text.toUtf8());\n    process.closeWriteChannel();\n    if (!process.waitForFinished(timeout*4)) {\n        m_liteApp->appendLog(\"jsonfmt\",QString(\"Timed out after %1ms while running json format\").arg(timeout*4),false);\n        return;\n    }\n    LiteApi::ILiteEditor *liteEditor = LiteApi::getLiteEditor(editor);\n    liteEditor->clearAllNavigateMark(LiteApi::EditorNavigateBad, \"Json\");\n    QTextCodec *codec = QTextCodec::codecForName(\"utf-8\");\n\n    if (process.exitCode() != 0) {\n        m_liteApp->appendLog(\"jsonfmt\",QString::fromUtf8(process.readAll()),true);\n        return;\n    }\n\n    QByteArray data = process.readAllStandardOutput();\n    /*\n    int vpos = -1;\n    QScrollBar *bar = ed->verticalScrollBar();\n    if (bar) {\n        vpos = bar->sliderPosition();\n    }\n    */\n    QByteArray state = editor->saveState();\n    QTextCursor cur = ed->textCursor();\n    //int pos = cur.position();\n    cur.beginEditBlock();\n    if (diff) {\n        EditorUtil::loadDiff(cur,codec->toUnicode(data));\n    } else {\n        cur.select(QTextCursor::Document);\n        cur.removeSelectedText();\n        cur.insertText(codec->toUnicode(data));\n    }\n    //cur.setPosition(pos);\n    cur.endEditBlock();\n    ed->setTextCursor(cur);\n    editor->restoreState(state);\n\n    //ed->setTextCursor(cur);\n    //if (vpos != -1) {\n    //    bar->setSliderPosition(vpos);\n    //}\n    if (save) {\n        m_liteApp->editorManager()->saveEditor(editor,false);\n    }\n}\n\nvoid JsonEdit::editorCreated(LiteApi::IEditor *editor)\n{\n    if (editor->mimeType() != \"application/json\") {\n        return;\n    }\n    LiteApi::ILiteEditor *ed = LiteApi::getLiteEditor(editor);\n    if (!ed) {\n        return;\n    }\n    ed->setLineWrap(true);\n    ed->setEnableAutoIndentAction(false);\n\n    QMenu *menu = LiteApi::getContextMenu(editor);\n    if (menu) {\n        menu->addSeparator();\n        menu->addAction(m_verifyAct);\n        menu->addAction(m_formatAct);\n        menu->addAction(m_compactAct);\n    }\n    menu = LiteApi::getEditMenu(editor);\n    if (menu) {\n        menu->addSeparator();\n        menu->addAction(m_verifyAct);\n        menu->addAction(m_formatAct);\n        menu->addAction(m_compactAct);\n    }\n}\n\nvoid JsonEdit::editorSaved(LiteApi::IEditor *editor)\n{\n    if (editor->mimeType() != \"application/json\") {\n        return;\n    }\n    verifyJson(editor);\n}\n\n//void JsonEdit::format(QJson::IndentMode mode)\n//{\n//    QJson::Parser parser;\n//    bool ok = true;\n//    QVariant json = parser.parse(m_editor->utf8Data(),&ok);\n//    if (!ok) {\n//        return;\n//    }\n//    QJson::Serializer stream;\n//    stream.setIndentMode(mode);\n//    QByteArray data = stream.serialize(json);\n//    QPlainTextEdit *ed = LiteApi::getPlainTextEdit(m_editor);\n//    if (ed) {\n//        QTextCursor cursor = ed->textCursor();\n//        cursor.beginEditBlock();\n//        cursor.select(QTextCursor::Document);\n//        cursor.removeSelectedText();\n//        cursor.insertText(QString::fromUtf8(data));\n//        cursor.endEditBlock();\n//        ed->setTextCursor(cursor);\n//    }\n//}\n"
  },
  {
    "path": "liteidex/src/plugins/jsonedit/jsonedit.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: jsonedit.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef JSONEDIT_H\n#define JSONEDIT_H\n\n#include <liteapi/liteapi.h>\n#include <liteeditorapi/liteeditorapi.h>\n#include <qjson/include/QJson/Parser>\n#include <qjson/include/QJson/Serializer>\n\nclass JsonEdit : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit JsonEdit(LiteApi::IApplication *app, QObject *parent = 0);\n\n    void fmtEditor(LiteApi::IEditor *editor, bool compact, bool tabs, bool diff, int timeout);\nsignals:\n\npublic slots:\n    void editorCreated(LiteApi::IEditor *editor);\n    void editorSaved(LiteApi::IEditor*);\n    void verify();\n    void format();\n    void compact();\nprotected:\n    bool verifyJson(LiteApi::IEditor *editor);\n    LiteApi::IApplication *m_liteApp;\n    QAction *m_verifyAct;\n    QAction *m_formatAct;\n    QAction *m_compactAct;\n};\n\n#endif // JSONEDIT_H\n"
  },
  {
    "path": "liteidex/src/plugins/jsonedit/jsonedit.pro",
    "content": "TARGET = jsonedit\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude(../../3rdparty/qjson/qjson.pri)\ninclude(../../utils/editorutil/editorutil.pri)\n\n\nDEFINES += JSONEDIT_LIBRARY\n\nSOURCES += jsoneditplugin.cpp \\\n    jsonedit.cpp\n\nHEADERS += jsoneditplugin.h\\\n        jsonedit_global.h \\\n    jsonedit.h\n"
  },
  {
    "path": "liteidex/src/plugins/jsonedit/jsonedit_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: jsonedit_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef JSONEDIT_GLOBAL_H\n#define JSONEDIT_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(JSONEDIT_LIBRARY)\n#  define JSONEDITSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define JSONEDITSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#define JSONFMT_TAG \"jsonfmt/navtag\"\n\n#endif // JSONEDIT_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/jsonedit/jsoneditplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: jsoneditplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"jsoneditplugin.h\"\n#include \"jsonedit.h\"\n\n#include <QtPlugin>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nJsonEditPlugin::JsonEditPlugin()\n{\n}\n\nbool JsonEditPlugin::load(LiteApi::IApplication *app)\n{\n    m_liteApp = app;\n    new JsonEdit(m_liteApp,this);\n    return true;\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/jsonedit/jsoneditplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: jsoneditplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef JSONEDITPLUGIN_H\n#define JSONEDITPLUGIN_H\n\n#include \"jsonedit_global.h\"\n#include \"liteapi/liteapi.h\"\n\nclass JsonEditPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    JsonEditPlugin();\n    virtual bool load(LiteApi::IApplication *app);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<JsonEditPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.JsonEditPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/JsonEdit\");\n        m_info->setVer(\"X27\");\n        m_info->setName(\"JsonEdit\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setInfo(\"Json Edit Support\");\n        m_info->appendDepend(\"plugin/liteeditor\");\n    }\n};\n\n\n#endif // JSONEDITPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/build.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: build.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"build.h\"\n#include \"fileutil/fileutil.h\"\n#include <QFile>\n#include <QXmlStreamReader>\n#include <QFileInfo>\n#include <QDir>\n#include <QMenu>\n#include <QAction>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nBuild::Build(QObject *parent)\n    : LiteApi::IBuild(parent)\n{\n}\n\nBuild::~Build()\n{\n    qDeleteAll(m_lookupList);\n    qDeleteAll(m_actionList);\n    qDeleteAll(m_configList);\n    qDeleteAll(m_customList);\n    qDeleteAll(m_targetList);\n    qDeleteAll(m_idMenuMap);\n}\n\nQString Build::mimeType() const\n{\n    return m_mimeType;\n}\n\nQString Build::id() const\n{\n    return m_id;\n}\n\nQString Build::work() const\n{\n    return m_work;\n}\n\nQString Build::lock() const\n{\n    return m_lock;\n}\n\nQList<BuildAction*> Build::actionList() const\n{\n    return m_actionList;\n}\n\nQList<BuildLookup*> Build::lookupList() const\n{\n    return m_lookupList;\n}\n\nQList<BuildConfig*> Build::configList() const\n{\n    return m_configList;\n}\n\nQList<BuildCustom*> Build::customList() const\n{\n    return m_customList;\n}\n\nQList<BuildTarget*>  Build::targetList() const\n{\n    return m_targetList;\n}\n\nBuildAction *Build::findAction(const QString &id)\n{\n    foreach(BuildAction *act, m_actionList) {\n        if (act->id() == id) {\n            return act;\n        }\n    }\n    return 0;\n}\n\nQList<QAction*> Build::actions()\n{\n    if (m_actions.isEmpty()) {\n        this->make();\n    }\n    return m_actions;\n}\n\nvoid Build::make()\n{\n    foreach(LiteApi::BuildAction *ba, m_actionList) {\n        QString id = ba->menu();\n        if (!id.isEmpty()) {\n            QMenu *menu = m_idMenuMap[id];\n            if (!menu) {\n                menu = new QMenu;\n                m_idMenuMap.insert(id,menu);\n            }\n        }\n    }\n\n    foreach(LiteApi::BuildAction *ba,m_actionList) {\n        if (ba->isHidden()) {\n            continue;\n        }\n        QAction *act = this->makeAction(ba);        \n        QString idMenu = ba->menu();\n        if (idMenu.isEmpty()) {\n            QMenu *menu = m_idMenuMap[ba->id()];\n            if (menu) {\n                QAction *menuAction = menu->menuAction();\n                menuAction->setObjectName(act->objectName());\n                menuAction->setText(act->text());\n                //menuAction->setToolTip(act->toolTip());\n                menuAction->setIcon(act->icon());\n                if (!ba->isFolder()) {\n                    connect(menuAction,SIGNAL(triggered()),this,SLOT(slotBuildAction()));\n                    menu->addAction(act);\n                }\n                m_actions.append(menuAction);\n            } else {\n                m_actions.append(act);\n            }\n        } else {\n            QMenu *menu = m_idMenuMap[idMenu];\n            if (menu) {\n                menu->addAction(act);\n            } else {\n                m_actions.append(act);\n            }\n        }\n   }\n}\n\nQAction *Build::makeAction(BuildAction *ba)\n{\n    QAction *act = new QAction(ba->id(),this);\n    act->setObjectName(ba->id());\n    if (ba->isSeparator()) {\n        act->setSeparator(true);\n    } else {\n        if (!ba->key().isEmpty()) {\n            QList<QKeySequence> list;\n            foreach(QString key, ba->key().split(\";\")) {\n                list.append(QKeySequence(key));\n            }\n            act->setShortcuts(list);\n            act->setToolTip(QString(\"%1 (%2)\").arg(ba->id()).arg(ba->key()));\n        }\n        if (!ba->img().isEmpty()) {\n            QIcon icon(ba->img());\n            if (!icon.isNull()) {\n                act->setIcon(icon);\n            }\n        }\n        if (!ba->isFolder()) {\n            connect(act,SIGNAL(triggered()),this,SLOT(slotBuildAction()));\n        }\n    }\n    return act;\n}\n\nvoid Build::slotBuildAction()\n{\n    QAction *act = (QAction*)sender();\n    if (act) {\n        BuildAction *ba = this->findAction(act->objectName());\n        if (ba) {\n            emit buildAction(this,ba);\n        }\n    }\n}\n\nvoid Build::setType(const QString &mimeType)\n{\n    m_mimeType = mimeType;\n}\n\nvoid Build::setId(const QString &id)\n{\n    m_id = id;\n}\n\nvoid Build::setWork(const QString &work)\n{\n    m_work = work;\n}\n\nvoid Build::setLock(const QString &lock)\n{\n    m_lock = lock;\n}\n\nstatic QString action_os_name()\n{\n#ifdef Q_OS_MAC\n    return \"macosx\";\n#endif\n#ifdef Q_OS_WIN\n    return \"windows\";\n#endif\n#ifdef Q_OS_LINUX\n    return \"linux\";\n#endif\n#ifdef Q_OS_FREEBSD\n    return \"freebsd\";\n#endif\n#ifdef Q_OS_OPENBD\n    return \"openbsd\";\n#endif\n    return \"unknown-os\";\n}\n\nvoid Build::appendAction(BuildAction *act)\n{\n    for (int i = 0; i < m_actionList.size(); i++) {\n        BuildAction *ba = m_actionList[i];\n        if (ba->id() == act->id()) {\n            if (act->os().contains(action_os_name(),Qt::CaseInsensitive)) {\n                m_actionList[i] = act;\n                delete ba;\n            } else {\n                delete act;\n            }\n            return;\n        }\n    }\n    m_actionList.append(act);\n}\n\nvoid Build::appendLookup(BuildLookup *lookup)\n{\n    m_lookupList.append(lookup);\n}\n\nvoid Build::appendConfig(BuildConfig *config)\n{\n    m_configList.append(config);\n}\n\nvoid Build::appendCustom(BuildCustom *custom)\n{\n    m_customList.append(custom);\n}\n\nvoid Build::appendDebug(BuildTarget *debug)\n{\n    m_targetList.append(debug);\n}\n\nbool Build::loadBuild(LiteApi::IBuildManager *manager, const QString &fileName)\n{\n    QFile file(fileName);\n    if (!file.open(QIODevice::ReadOnly|QIODevice::Text)) {\n        return false;\n    }\n    return Build::loadBuild(manager,&file,fileName);\n}\n\nstatic int build_ver = 2;\n\nbool Build::loadBuild(LiteApi::IBuildManager *manager, QIODevice *dev, const QString &fileName)\n{\n    QXmlStreamReader reader(dev);\n    QXmlStreamAttributes attrs;\n    QDir dir = QFileInfo(fileName).absoluteDir();\n    Build *build = 0;\n    BuildAction *act = 0;\n    BuildLookup *lookup = 0;\n    BuildConfig *config = 0;\n    BuildCustom *custom = 0;\n    BuildTarget  *target = 0;\n    while (!reader.atEnd()) {\n        switch (reader.readNext()) {\n        case QXmlStreamReader::StartElement:\n            attrs = reader.attributes();\n            if (reader.name() == \"mime-type\" && build == 0) {\n                int ver = attrs.value(\"ver\").toString().toInt();\n                if (ver >= build_ver) {\n                    build = new Build;\n                    build->setType(attrs.value(\"type\").toString());\n                    build->setId(attrs.value(\"id\").toString());\n                    build->setWork(attrs.value(\"work\").toString());\n                    build->setLock(attrs.value(\"lock\").toString());\n                }\n            } else if (reader.name() == \"lookup\" && lookup == 0 && build != 0) {\n                lookup = new BuildLookup;\n                lookup->setMimeType(attrs.value(\"mime-type\").toString());\n                lookup->setFile(attrs.value(\"file\").toString());\n                lookup->setTop(attrs.value(\"top\").toString());\n            } else if (reader.name() == \"action\" && act == 0 && build != 0) {\n                act = new BuildAction;\n                act->setId(attrs.value(\"id\").toString());\n                act->setOs(attrs.value(\"os\").toString());\n                act->setMenu(attrs.value(\"menu\").toString());\n                act->setKey(attrs.value(\"key\").toString());\n                act->setCmd(attrs.value(\"cmd\").toString());\n                act->setDebug(attrs.value(\"debug\").toString());\n                act->setFunc(attrs.value(\"func\").toString());\n                act->setArgs(attrs.value(\"args\").toString());\n                act->setSave(attrs.value(\"save\").toString());\n                act->setOutput(attrs.value(\"output\").toString());\n                act->setReadline(attrs.value(\"readline\").toString());\n                act->setCodec(attrs.value(\"codec\").toString());\n                act->setRegex(attrs.value(\"regex\").toString());\n                act->setWork(attrs.value(\"work\").toString());\n                act->setKillold(attrs.value(\"killold\").toString());\n                act->setSeparator(attrs.value(\"separator\").toString());\n                act->setNavigate(attrs.value(\"navigate\").toString());\n                act->setFolder(attrs.value(\"folder\").toString());\n                act->setTakeall(attrs.value(\"takeall\").toString());\n                QString img = attrs.value(\"img\").toString();\n                if (!img.isEmpty()) {\n                    if (!img.contains(\":\")) {\n                        img = \"icon:/litebuild/images/\"+img;//QFileInfo(dir,img).canonicalFilePath();\n                    }\n                    act->setImg(img);\n                }\n                QString task = attrs.value(\"task\").toString();\n                if (!task.isEmpty()) {\n                    act->setTask(task.split(\";\",qtSkipEmptyParts));\n                }\n            } else if (reader.name() == \"config\" && config == 0 && build != 0) {\n                config = new BuildConfig;\n                config->setId(attrs.value(\"id\").toString());\n                config->setName(attrs.value(\"name\").toString());\n                config->setValue(attrs.value(\"value\").toString());\n            } else if (reader.name() == \"custom\" && custom == 0 && build != 0) {\n                custom = new BuildCustom;\n                custom->setId(attrs.value(\"id\").toString());\n                custom->setName(attrs.value(\"name\").toString());\n                custom->setValue(attrs.value(\"value\").toString());\n                if (attrs.hasAttribute(\"shared-value\")) {\n                    custom->setSharedValue(attrs.value(\"shared-value\").toString());\n                }\n                if (attrs.hasAttribute(\"readonly\")) {\n                    custom->setReadOnly(attrs.value(\"readonly\").toString());\n                }\n                if (attrs.hasAttribute(\"escaped\")) {\n                    custom->setEscaped(attrs.value(\"escaped\").toString());\n                }\n            } else if (reader.name() == \"target\" && target == 0 && build != 0) {\n                target = new BuildTarget;\n                target->setId(attrs.value(\"id\").toString());\n                target->setCmd(attrs.value(\"cmd\").toString());\n                target->setDebug(attrs.value(\"debug\").toString());\n                target->setArgs(attrs.value(\"args\").toString());\n                target->setWork(attrs.value(\"work\").toString());\n                target->setBuildArgs(attrs.value(\"buildargs\").toString());\n            }\n            break;\n        case QXmlStreamReader::EndElement:\n            if (reader.name() == \"mime-type\") {\n                if (build) {\n                     manager->addBuild(build);\n                }\n                build = 0;\n            } else if (reader.name() == \"action\") {\n                if (build && act) {\n                    build->appendAction(act);\n                }\n                act = 0;\n            } else if (reader.name() == \"lookup\") {\n                if (build && lookup) {\n                    build->appendLookup(lookup);\n                }\n                lookup = 0;\n            } else if (reader.name() == \"config\") {\n                if (build && config) {\n                    build->appendConfig(config);\n                }\n                config = 0;\n            } else if (reader.name() == \"custom\") {\n                if (build && custom) {\n                    build->appendCustom(custom);\n                }\n                custom = 0;\n            } else if (reader.name() == \"target\") {\n                if (build && target) {\n                    build->appendDebug(target);\n                }\n                target = 0;\n            }\n            break;\n        default:\n            break;\n        }\n    }\n    return true;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/build.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: build.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef BUILD_H\n#define BUILD_H\n\n#include \"litebuildapi/litebuildapi.h\"\n#include <QProcessEnvironment>\n\nusing namespace LiteApi;\nclass Build : public LiteApi::IBuild\n{\n    Q_OBJECT\npublic:\n    Build(QObject *parent = 0);\n    virtual ~Build();\n    virtual QString mimeType() const;\n    virtual QString id() const;\n    virtual QString work() const;\n    virtual QString lock() const;\n    virtual QList<BuildAction*> actionList() const;\n    virtual QList<BuildLookup*> lookupList() const;\n    virtual QList<BuildConfig*> configList() const;\n    virtual QList<BuildCustom*> customList() const;\n    virtual QList<BuildTarget*>  targetList() const;\n    virtual BuildAction *findAction(const QString &id);\n    virtual QList<QAction*> actions();\nprotected:\n    void make();\n    QAction *makeAction(BuildAction *ba);\nprotected slots:\n    void slotBuildAction();\npublic:\n    void setType(const QString &mimeType);\n    void setId(const QString &id);\n    void setWork(const QString &work);\n    void setLock(const QString &lock);\n    void appendAction(BuildAction *act);\n    void appendLookup(BuildLookup *lookup);\n    void appendConfig(BuildConfig *config);\n    void appendCustom(BuildCustom *custom);\n    void appendDebug(BuildTarget *debug);\npublic:\n    static bool loadBuild(LiteApi::IBuildManager *manager, const QString &fileName);\n    static bool loadBuild(LiteApi::IBuildManager *manager, QIODevice *dev, const QString &fileName);\nprotected:\n    QString m_mimeType;\n    QString m_id;\n    QString m_lock;\n    QString m_work;\n    QMap<QString,QMenu*> m_idMenuMap;\n    QList<QAction*> m_actions;\n    QList<BuildAction*> m_actionList;\n    QList<BuildLookup*> m_lookupList;\n    QList<BuildConfig*> m_configList;\n    QList<BuildCustom*> m_customList;\n    QList<BuildTarget*> m_targetList;\n    QMap<BuildAction*,QString> m_actionCmdMap;\n    QMap<BuildAction*,QString> m_actionArgMap;\n};\n\n#endif // BUILD_H\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/buildconfigdialog.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: buildconfigdialog.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"buildconfigdialog.h\"\n#include \"ui_buildconfigdialog.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"liteapi/liteutil.h\"\n\n#include <QAbstractItemModel>\n#include <QStandardItemModel>\n#include <QStandardItem>\n#include <QDebug>\n#include <QFileDialog>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nint BuildConfigDialog::s_lastViewIndex = 4;\n\nBuildConfigDialog::BuildConfigDialog(LiteApi::IApplication *app, QWidget *parent) :\n    QDialog(parent),\n    m_liteApp(app),\n    ui(new Ui::BuildConfigDialog)\n{\n    ui->setupUi(this);\n    ui->liteideTableView->setEditTriggers(QAbstractItemView::NoEditTriggers);\n    ui->liteideTableView->resizeColumnsToContents();\n    ui->liteideTableView->verticalHeader()->hide();\n\n    ui->configTableView->setEditTriggers(QAbstractItemView::NoEditTriggers);\n    ui->configTableView->resizeColumnsToContents();\n    ui->configTableView->verticalHeader()->hide();\n\n    ui->customTableView->setEditTriggers(QAbstractItemView::NoEditTriggers);\n    ui->customTableView->resizeColumnsToContents();\n    ui->customTableView->verticalHeader()->hide();\n\n    ui->actionTableView->setEditTriggers(QAbstractItemView::NoEditTriggers);\n    ui->actionTableView->resizeColumnsToContents();\n    ui->actionTableView->verticalHeader()->hide();\n\n    m_liteideModel = new QStandardItemModel(0,2,this);\n    m_liteideModel->setHeaderData(0,Qt::Horizontal,tr(\"Name\"));\n    m_liteideModel->setHeaderData(1,Qt::Horizontal,tr(\"Value\"));\n\n    m_configModel = new QStandardItemModel(0,2,this);\n    m_configModel->setHeaderData(0,Qt::Horizontal,tr(\"Name\"));\n    m_configModel->setHeaderData(1,Qt::Horizontal,tr(\"Value\"));\n\n    m_customModel = new QStandardItemModel(0,3,this);\n    m_customModel->setHeaderData(0,Qt::Horizontal,tr(\"Name\"));\n    m_customModel->setHeaderData(1,Qt::Horizontal,tr(\"Value\"));\n    m_customModel->setHeaderData(2,Qt::Horizontal,tr(\"SharedValue\"));\n\n    m_actionModel = new QStandardItemModel(0,2,this);\n    m_actionModel->setHeaderData(0,Qt::Horizontal,tr(\"Id\"));\n    m_actionModel->setHeaderData(1,Qt::Horizontal,tr(\"Cmd\"));\n\n    ui->liteideTableView->setModel(m_liteideModel);\n    ui->configTableView->setModel(m_configModel);\n    ui->customTableView->setModel(m_customModel);\n    ui->actionTableView->setModel(m_actionModel);\n    ui->actionTableView->setTextElideMode(Qt::ElideNone);\n\n    connect(ui->customTableView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(editCustomeTabView(QModelIndex)));\n\n    ui->tabWidget->setFocus();\n    ui->tabWidget->setCurrentIndex(s_lastViewIndex);\n    ui->customTableView->setFocus();\n\n    connect(ui->buttonBox,SIGNAL(clicked(QAbstractButton*)),this,SLOT(buttonBoxClicked(QAbstractButton*)));\n}\n\nBuildConfigDialog::~BuildConfigDialog()\n{\n    s_lastViewIndex = ui->tabWidget->currentIndex();\n    delete ui;\n}\n\nvoid BuildConfigDialog::editCustomeTabView(QModelIndex index)\n{\n    if (!index.isValid()) {\n        return;\n    }\n    if (index.column() == 1) {\n        ui->customTableView->edit(index);\n    }\n}\n\nvoid BuildConfigDialog::buttonBoxClicked(QAbstractButton *button)\n{\n    QDialogButtonBox::ButtonRole role = ui->buttonBox->buttonRole(button);\n    if (role == QDialogButtonBox::AcceptRole) {\n        this->saveBuild();\n    } else if (role == QDialogButtonBox::RejectRole) {\n        this->reject();\n    } else if (role == QDialogButtonBox::ApplyRole) {\n        this->saveBuild();\n        this->updat_gopath_info();\n    }\n}\n\nvoid BuildConfigDialog::resizeTableView(QTableView *tableView)\n{\n    QAbstractItemModel *model = tableView->model();\n    if (model && model->columnCount() >= 2) {\n        tableView->resizeColumnToContents(0);\n#if QT_VERSION >= 0x050000\n        tableView->horizontalHeader()->setSectionResizeMode(0,QHeaderView::Interactive);\n        for (int i = 1; i < model->columnCount(); i++) {\n             tableView->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch);\n        }\n#else\n        tableView->horizontalHeader()->setResizeMode(0,QHeaderView::Interactive);\n        for (int i = 1; i < model->columnCount(); i++) {\n            tableView->horizontalHeader()->setResizeMode(i,QHeaderView::Stretch);\n        }\n#endif\n    }\n}\n\nvoid BuildConfigDialog::setBuild(LiteApi::IBuild *build, const QString &buildPath, const QMap<QString, QString> &liteEnvMap)\n{    \n    m_buildPath = buildPath;\n\n    updateBuildConfigHelp(build,buildPath,liteEnvMap,m_liteideModel,m_configModel,m_customModel,m_actionModel);\n\n    resizeTableView(ui->liteideTableView);\n    resizeTableView(ui->configTableView);\n    resizeTableView(ui->actionTableView);\n    resizeTableView(ui->customTableView);\n\n#if QT_VERSION >= 0x050000\n    ui->customTableView->horizontalHeader()->setSectionResizeMode(2,QHeaderView::ResizeToContents);\n#else\n    ui->customTableView->horizontalHeader()->setResizeMode(2,QHeaderView::ResizeToContents);\n#endif\n\n    ui->buildIdLabel->setText(build->id());\n    ui->buildFileLabel->setText(buildPath);\n\n    QString customKey = \"litebuild-custom/\"+buildPath;\n\n    bool use_custom_gopath = m_liteApp->settings()->value(customKey+\"#use_custom_gopath\",false).toBool();\n    ui->useCustomGopathGroupBox->setChecked(use_custom_gopath);\n\n    bool inherit_sys_gopath = m_liteApp->settings()->value(customKey+\"#inherit_sys_gopath\",true).toBool();\n    bool inherit_lite_gopath = m_liteApp->settings()->value(customKey+\"#inherit_lite_gopath\",true).toBool();\n    bool custom_gopath = m_liteApp->settings()->value(customKey+\"#custom_gopath\",false).toBool();\n\n    ui->inheritSysGopathCheckBox->setChecked(inherit_sys_gopath);\n    ui->inheritLiteGopathCheckBox->setChecked(inherit_lite_gopath);\n    ui->customGopathCheckBox->setChecked(custom_gopath);\n\n    QProcessEnvironment env = LiteApi::getSysEnvironment(m_liteApp);\n#ifdef Q_OS_WIN\n    QString sep = \";\";\n#else\n    QString sep = \":\";\n#endif\n\n    QStringList pathList;\n    foreach (QString path, env.value(\"GOPATH\").split(sep,qtSkipEmptyParts)) {\n        pathList.append(QDir::toNativeSeparators(path));\n    }\n    pathList.removeDuplicates();\n    ui->sysGopathLabel->setText(pathList.join(\"\\n\"));\n\n    pathList.clear();\n    foreach (QString path, m_liteApp->settings()->value(\"liteide/gopath\").toStringList()) {\n          pathList.append(QDir::toNativeSeparators(path));\n    }\n    pathList.removeDuplicates();\n    ui->liteGopathLabel->setText(pathList.join(\"\\n\"));\n\n    pathList.clear();\n    foreach (QString path, m_liteApp->settings()->value(customKey+\"#gopath\").toStringList()) {\n          pathList.append(QDir::toNativeSeparators(path));\n    }\n    pathList.removeDuplicates();\n    ui->customGopathEdit->setPlainText(pathList.join(\"\\n\"));\n\n//    QStringList saveAutoRun = m_liteApp->settings()->value(customKey+\"#saveautorun\").toStringList();\n//    ui->saveAutoRunEdit->setText(saveAutoRun.join(\";\"));\n\n    updat_gopath_info();\n}\n\nvoid BuildConfigDialog::saveBuild()\n{\n    saveGopath();\n    saveCustom();\n    saveAction();\n}\n\nvoid BuildConfigDialog::saveGopath()\n{\n    if (m_buildPath.isEmpty()) {\n        return;\n    }\n\n    QString customKey = \"litebuild-custom/\"+m_buildPath;\n\n    bool use_custom_gopath = ui->useCustomGopathGroupBox->isChecked();\n    bool inherit_sys_gopath = ui->inheritSysGopathCheckBox->isChecked();\n    bool inherit_lite_gopath = ui->inheritLiteGopathCheckBox->isChecked();\n    bool custom_gopath = ui->customGopathCheckBox->isChecked();\n\n//    m_liteApp->settings()->setValue(customKey+\"#use_custom_gopath\",use_custom_gopath);\n//    m_liteApp->settings()->setValue(customKey+\"#inherit_sys_gopath\",inherit_sys_gopath);\n//    m_liteApp->settings()->setValue(customKey+\"#inherit_lite_gopath\",inherit_lite_gopath);\n//    m_liteApp->settings()->setValue(customKey+\"#custom_gopath\",custom_gopath);\n//    m_liteApp->settings()->setValue(customKey+\"#gopath\",ui->customGopathEdit->toPlainText().split(\"\\n\"));\n    LiteApi::updateAppSetting(m_liteApp,customKey+\"#use_custom_gopath\",use_custom_gopath,false);\n    LiteApi::updateAppSetting(m_liteApp,customKey+\"#inherit_sys_gopath\",inherit_sys_gopath,true);\n    LiteApi::updateAppSetting(m_liteApp,customKey+\"#inherit_lite_gopath\",inherit_lite_gopath,true);\n    LiteApi::updateAppSetting(m_liteApp,customKey+\"#custom_gopath\",custom_gopath,false);\n    LiteApi::updateAppSetting(m_liteApp,customKey+\"#gopath\",ui->customGopathEdit->toPlainText().split(\"\\n\"),\"\");\n\n    LiteApi::IGoEnvManger *goEnv = LiteApi::getGoEnvManager(m_liteApp);\n    if (goEnv) {\n        goEnv->updateCustomGOPATH(m_buildPath);\n    }\n}\n\nvoid BuildConfigDialog::saveCustom()\n{\n    if (m_buildPath.isEmpty()) {\n        return;\n    }\n    QString key;\n    key = \"litebuild-custom/\"+m_buildPath;\n\n    for (int i = 0; i < m_customModel->rowCount(); i++) {\n        QStandardItem *name = m_customModel->item(i,0);\n        QStandardItem *value = m_customModel->item(i,1);\n        QStandardItem *sharedValue = m_customModel->item(i,2);\n        QString id = name->data().toString();\n        if (!key.isEmpty()) {\n            QString defValue = value->data().toString();\n            bool defShared = sharedValue->data().toBool();\n            LiteApi::updateAppSetting(m_liteApp,key+\"#\"+id,value->text(),defValue);\n            LiteApi::updateAppSetting(m_liteApp,key+\"#\"+id+\"#shared\",sharedValue->checkState() == Qt::Checked ? true:false,defShared);\n        }\n    }\n}\n\nvoid BuildConfigDialog::saveAction()\n{\n//    if (m_buildPath.isEmpty()) {\n//        return;\n//    }\n//    QString key;\n//    key = \"litebuild-custom/\"+m_buildPath;\n//    QStringList task;\n//    foreach (QString id, ui->saveAutoRunEdit->text().split(\";\")) {\n//        id = id.trimmed();\n//        if (!id.isEmpty()) {\n//            task.push_back(id);\n//        }\n//    }\n//    LiteApi::updateAppSetting(m_liteApp,key+\"#saveautorun\",task,QStringList());\n}\n\nvoid BuildConfigDialog::on_customGopathBrowserButton_clicked()\n{\n    static QString last = QDir::homePath();\n    QString dir = QFileDialog::getExistingDirectory(this, tr(\"Choose directory to add to GOPATH:\"),\n                                                    last,\n                                                    QFileDialog::ShowDirsOnly\n                                                    | QFileDialog::DontResolveSymlinks);\n    if (!dir.isEmpty()) {\n        last = dir;\n        ui->customGopathEdit->appendPlainText(dir);\n    }\n}\n\nvoid BuildConfigDialog::on_customGopathClear_clicked()\n{\n    ui->customGopathEdit->clear();\n}\n\nvoid BuildConfigDialog::on_customResetAllButton_clicked()\n{\n    QStandardItemModel *model = (QStandardItemModel*)(ui->customTableView->model());\n    for (int i = 0; i < model->rowCount(); i++) {\n       // QStandardItem *name = model->item(i,0);\n        QStandardItem *value = model->item(i,1);\n        QStandardItem *sharedValue = model->item(i,2);\n        value->setText(value->data().toString());\n        if (sharedValue->data().toBool()) {\n            sharedValue->setCheckState(Qt::Checked);\n        }\n    }\n}\n\nvoid BuildConfigDialog::updat_gopath_info()\n{\n#ifdef Q_OS_WIN\n    QString sep = \";\";\n#else\n    QString sep = \":\";\n#endif\n    QString customPath;\n    QProcessEnvironment env = LiteApi::getCustomGoEnvironment(m_liteApp,m_buildPath,&customPath);\n\n    QString infoHead;\n    if (!customPath.isEmpty()) {\n        infoHead = QString(\"Use custom GOPATH for build path <b>%1</b>\").arg(QDir::toNativeSeparators(customPath));\n    } else {\n        infoHead = \"Use LiteIDE Global GOPATH\";\n    }\n    QStringList gopathList = env.value(\"GOPATH\").split(sep);\n\n    ui->gopathInfoHeadLabel->setText(infoHead);\n    ui->gopathInfoLabel->setText(gopathList.join(\"\\n\"));\n}\n\nvoid BuildConfigDialog::updateBuildConfigHelp(LiteApi::IBuild *build, const QString &buildRootPath, const QMap<QString,QString> &liteEnvMap, QStandardItemModel *liteideModel, QStandardItemModel *configModel, QStandardItemModel *customModel, QStandardItemModel *actionModel)\n{\n    liteideModel->removeRows(0,liteideModel->rowCount());\n    QMapIterator<QString,QString> i(liteEnvMap);\n    while (i.hasNext()) {\n        i.next();\n        liteideModel->appendRow(QList<QStandardItem*>()\n                                 << new QStandardItem(i.key())\n                                 << new QStandardItem(i.value()));\n    }\n    if (build) {\n        configModel->removeRows(0,configModel->rowCount());\n        customModel->removeRows(0,customModel->rowCount());\n        actionModel->removeRows(0,actionModel->rowCount());\n        QString customkey;\n        if (!buildRootPath.isEmpty()) {\n            customkey = \"litebuild-custom/\"+buildRootPath;\n        }\n        QString configkey = \"litebuild-config/\"+build->id();\n        foreach(LiteApi::BuildCustom *cf, build->customList()) {\n            QString name = cf->name();\n            QString value = cf->value();\n            QString sharedValue = cf->sharedValue();\n            bool sharedChecked = cf->hasShared();\n            if (!customkey.isEmpty()) {\n                value = m_liteApp->settings()->value(customkey+\"#\"+cf->id(),value).toString();\n                sharedChecked = m_liteApp->settings()->value(customkey+\"#\"+cf->id()+\"#shared\",true).toBool();\n            }\n            QStandardItem *nameItem = new QStandardItem(name);\n            QStandardItem *valueItem = new QStandardItem(value);\n            if (cf->isReadOnly()) {\n                valueItem->setEnabled(false);\n            }\n            QStandardItem *sharedItem = new QStandardItem(sharedValue);\n            sharedItem->setEnabled(cf->hasShared());\n            if (cf->hasShared()) {\n                sharedItem->setCheckable(true);\n                sharedItem->setCheckState(sharedChecked ? Qt::Checked : Qt::Unchecked);\n            }\n            nameItem->setData(cf->id());\n            valueItem->setData(cf->value());\n            sharedItem->setData(cf->hasShared());\n            customModel->appendRow(QList<QStandardItem*>()\n                                     << nameItem\n                                     << valueItem\n                                     << sharedItem );\n\n        }\n        foreach(LiteApi::BuildConfig *cf, build->configList()) {\n            QString name = cf->name();\n            QString value = cf->value();\n            if (!configkey.isEmpty()) {\n                value = m_liteApp->settings()->value(configkey+\"#\"+cf->id(),value).toString();\n            }\n            QStandardItem *item = new QStandardItem(name);\n            item->setData(cf->id());\n            configModel->appendRow(QList<QStandardItem*>()\n                                     << item\n                                     << new QStandardItem(value));\n        }\n        foreach (LiteApi::BuildAction *ba, build->actionList()) {\n            QString id = ba->id();\n            QString cmd = ba->cmd();\n            QString args = ba->args();\n            QStringList task = ba->task();\n            if (task.isEmpty() && cmd.isEmpty()) {\n                continue;\n            }\n            QStandardItem *item = new QStandardItem(id);\n            QString value;\n            if (!task.isEmpty()) {\n                value = task.join(\";\");\n            } else {\n                value = cmd+\" \"+args;\n            }\n            actionModel->appendRow(QList<QStandardItem*>()\n                                   << item\n                                   << new QStandardItem(value) );\n        }\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/buildconfigdialog.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: buildconfigdialog.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef BUILDCONFIGDIALOG_H\n#define BUILDCONFIGDIALOG_H\n\n#include <QDialog>\n#include <QModelIndex>\n#include \"liteapi/liteapi.h\"\n#include \"litebuildapi/litebuildapi.h\"\n\nnamespace Ui {\n    class BuildConfigDialog;\n}\n\nclass QAbstractItemModel;\nclass QTableView;\nclass QStandardItemModel;\nclass QAbstractButton;\nclass BuildConfigDialog : public QDialog\n{\n    Q_OBJECT\n\npublic:\n    explicit BuildConfigDialog(LiteApi::IApplication *app, QWidget *parent = 0);\n    virtual ~BuildConfigDialog();\n    void setBuild(LiteApi::IBuild *build, const QString &buildPath, const QMap<QString,QString> &liteEnvMap);\n    void saveBuild();\nprotected:\n    void saveGopath();\n    void saveCustom();\n    void saveAction();\n    void updateBuildConfigHelp(LiteApi::IBuild *build, const QString &buildRootPath, const QMap<QString,QString> &liteEnvMap, QStandardItemModel *liteideModel, QStandardItemModel *configModel, QStandardItemModel *customModel, QStandardItemModel *actionModel);\npublic slots:\n    void editCustomeTabView(QModelIndex);\n    void buttonBoxClicked(QAbstractButton *button);\nprotected:\n    void resizeTableView(QTableView *tableView);\nprivate slots:\n    void on_customGopathBrowserButton_clicked();\n    void on_customGopathClear_clicked();\n    void on_customResetAllButton_clicked();\n    void updat_gopath_info();\nprivate:\n    LiteApi::IApplication *m_liteApp;\n    Ui::BuildConfigDialog *ui;\n    QString                m_buildPath;\n    QStandardItemModel *m_liteideModel;\n    QStandardItemModel *m_configModel;\n    QStandardItemModel *m_customModel;\n    QStandardItemModel *m_actionModel;\n    static int s_lastViewIndex;\n};\n\n#endif // BUILDCONFIGDIALOG_H\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/buildconfigdialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>BuildConfigDialog</class>\n <widget class=\"QDialog\" name=\"BuildConfigDialog\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>790</width>\n    <height>604</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Build Configuration</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_4\">\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox\">\n     <property name=\"title\">\n      <string/>\n     </property>\n     <layout class=\"QGridLayout\" name=\"gridLayout\">\n      <item row=\"1\" column=\"1\">\n       <widget class=\"QLabel\" name=\"buildFileLabel\">\n        <property name=\"sizePolicy\">\n         <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Preferred\">\n          <horstretch>0</horstretch>\n          <verstretch>0</verstretch>\n         </sizepolicy>\n        </property>\n        <property name=\"frameShape\">\n         <enum>QFrame::Panel</enum>\n        </property>\n        <property name=\"frameShadow\">\n         <enum>QFrame::Sunken</enum>\n        </property>\n        <property name=\"text\">\n         <string/>\n        </property>\n       </widget>\n      </item>\n      <item row=\"1\" column=\"0\">\n       <widget class=\"QLabel\" name=\"label_3\">\n        <property name=\"text\">\n         <string>Build Path</string>\n        </property>\n       </widget>\n      </item>\n      <item row=\"0\" column=\"1\">\n       <widget class=\"QLabel\" name=\"buildIdLabel\">\n        <property name=\"sizePolicy\">\n         <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Preferred\">\n          <horstretch>0</horstretch>\n          <verstretch>0</verstretch>\n         </sizepolicy>\n        </property>\n        <property name=\"frameShape\">\n         <enum>QFrame::Panel</enum>\n        </property>\n        <property name=\"frameShadow\">\n         <enum>QFrame::Sunken</enum>\n        </property>\n        <property name=\"text\">\n         <string/>\n        </property>\n       </widget>\n      </item>\n      <item row=\"0\" column=\"0\">\n       <widget class=\"QLabel\" name=\"label\">\n        <property name=\"text\">\n         <string>Build ID</string>\n        </property>\n       </widget>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QTabWidget\" name=\"tabWidget\">\n     <property name=\"currentIndex\">\n      <number>0</number>\n     </property>\n     <widget class=\"QWidget\" name=\"tab_gopath\">\n      <attribute name=\"title\">\n       <string>GOPATH</string>\n      </attribute>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_6\">\n       <property name=\"leftMargin\">\n        <number>2</number>\n       </property>\n       <property name=\"topMargin\">\n        <number>2</number>\n       </property>\n       <property name=\"rightMargin\">\n        <number>2</number>\n       </property>\n       <property name=\"bottomMargin\">\n        <number>2</number>\n       </property>\n       <item>\n        <widget class=\"QGroupBox\" name=\"gopathInfoGroupBox\">\n         <property name=\"title\">\n          <string>GOPATH information</string>\n         </property>\n         <layout class=\"QVBoxLayout\" name=\"verticalLayout_8\">\n          <item>\n           <widget class=\"QLabel\" name=\"gopathInfoHeadLabel\">\n            <property name=\"frameShape\">\n             <enum>QFrame::Panel</enum>\n            </property>\n            <property name=\"frameShadow\">\n             <enum>QFrame::Sunken</enum>\n            </property>\n            <property name=\"text\">\n             <string/>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QLabel\" name=\"gopathInfoLabel\">\n            <property name=\"minimumSize\">\n             <size>\n              <width>0</width>\n              <height>60</height>\n             </size>\n            </property>\n            <property name=\"frameShape\">\n             <enum>QFrame::Panel</enum>\n            </property>\n            <property name=\"frameShadow\">\n             <enum>QFrame::Sunken</enum>\n            </property>\n            <property name=\"text\">\n             <string/>\n            </property>\n            <property name=\"alignment\">\n             <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>\n            </property>\n           </widget>\n          </item>\n         </layout>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QGroupBox\" name=\"useCustomGopathGroupBox\">\n         <property name=\"title\">\n          <string>Use Custom GOPATH for Build Path</string>\n         </property>\n         <property name=\"checkable\">\n          <bool>true</bool>\n         </property>\n         <property name=\"checked\">\n          <bool>false</bool>\n         </property>\n         <layout class=\"QVBoxLayout\" name=\"verticalLayout_5\">\n          <item>\n           <widget class=\"QCheckBox\" name=\"inheritSysGopathCheckBox\">\n            <property name=\"text\">\n             <string>Inherit System GOPATH</string>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QLabel\" name=\"sysGopathLabel\">\n            <property name=\"frameShape\">\n             <enum>QFrame::Panel</enum>\n            </property>\n            <property name=\"frameShadow\">\n             <enum>QFrame::Sunken</enum>\n            </property>\n            <property name=\"text\">\n             <string/>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QCheckBox\" name=\"inheritLiteGopathCheckBox\">\n            <property name=\"text\">\n             <string>Inherit LiteIDE GOPATH</string>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <widget class=\"QLabel\" name=\"liteGopathLabel\">\n            <property name=\"frameShape\">\n             <enum>QFrame::Panel</enum>\n            </property>\n            <property name=\"frameShadow\">\n             <enum>QFrame::Sunken</enum>\n            </property>\n            <property name=\"text\">\n             <string/>\n            </property>\n           </widget>\n          </item>\n          <item>\n           <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n            <item>\n             <widget class=\"QCheckBox\" name=\"customGopathCheckBox\">\n              <property name=\"text\">\n               <string>Custom GOPATH (one per line)</string>\n              </property>\n             </widget>\n            </item>\n            <item>\n             <spacer name=\"horizontalSpacer\">\n              <property name=\"orientation\">\n               <enum>Qt::Horizontal</enum>\n              </property>\n              <property name=\"sizeHint\" stdset=\"0\">\n               <size>\n                <width>40</width>\n                <height>20</height>\n               </size>\n              </property>\n             </spacer>\n            </item>\n            <item>\n             <widget class=\"QPushButton\" name=\"customGopathBrowserButton\">\n              <property name=\"text\">\n               <string>Add Directory...</string>\n              </property>\n             </widget>\n            </item>\n            <item>\n             <widget class=\"QPushButton\" name=\"customGopathClear\">\n              <property name=\"text\">\n               <string>Clear</string>\n              </property>\n             </widget>\n            </item>\n           </layout>\n          </item>\n          <item>\n           <widget class=\"QPlainTextEdit\" name=\"customGopathEdit\"/>\n          </item>\n         </layout>\n        </widget>\n       </item>\n      </layout>\n     </widget>\n     <widget class=\"QWidget\" name=\"tab_liteide\">\n      <attribute name=\"title\">\n       <string>LiteIDE</string>\n      </attribute>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_3\">\n       <property name=\"leftMargin\">\n        <number>2</number>\n       </property>\n       <property name=\"topMargin\">\n        <number>2</number>\n       </property>\n       <property name=\"rightMargin\">\n        <number>2</number>\n       </property>\n       <property name=\"bottomMargin\">\n        <number>2</number>\n       </property>\n       <item>\n        <widget class=\"QTableView\" name=\"liteideTableView\"/>\n       </item>\n      </layout>\n     </widget>\n     <widget class=\"QWidget\" name=\"tab_config\">\n      <attribute name=\"title\">\n       <string>Config</string>\n      </attribute>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n       <property name=\"leftMargin\">\n        <number>2</number>\n       </property>\n       <property name=\"topMargin\">\n        <number>2</number>\n       </property>\n       <property name=\"rightMargin\">\n        <number>2</number>\n       </property>\n       <property name=\"bottomMargin\">\n        <number>2</number>\n       </property>\n       <item>\n        <widget class=\"QTableView\" name=\"configTableView\"/>\n       </item>\n      </layout>\n     </widget>\n     <widget class=\"QWidget\" name=\"tab_action\">\n      <attribute name=\"title\">\n       <string>Action</string>\n      </attribute>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_7\">\n       <property name=\"leftMargin\">\n        <number>2</number>\n       </property>\n       <property name=\"topMargin\">\n        <number>2</number>\n       </property>\n       <property name=\"rightMargin\">\n        <number>2</number>\n       </property>\n       <property name=\"bottomMargin\">\n        <number>2</number>\n       </property>\n       <item>\n        <widget class=\"QTableView\" name=\"actionTableView\"/>\n       </item>\n      </layout>\n     </widget>\n     <widget class=\"QWidget\" name=\"tab_custom\">\n      <attribute name=\"title\">\n       <string>Custom</string>\n      </attribute>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n       <property name=\"leftMargin\">\n        <number>2</number>\n       </property>\n       <property name=\"topMargin\">\n        <number>2</number>\n       </property>\n       <property name=\"rightMargin\">\n        <number>2</number>\n       </property>\n       <property name=\"bottomMargin\">\n        <number>2</number>\n       </property>\n       <item>\n        <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\">\n         <item>\n          <spacer name=\"horizontalSpacer_2\">\n           <property name=\"orientation\">\n            <enum>Qt::Horizontal</enum>\n           </property>\n           <property name=\"sizeHint\" stdset=\"0\">\n            <size>\n             <width>40</width>\n             <height>20</height>\n            </size>\n           </property>\n          </spacer>\n         </item>\n         <item>\n          <widget class=\"QPushButton\" name=\"customResetAllButton\">\n           <property name=\"text\">\n            <string>Reset all to initial value</string>\n           </property>\n          </widget>\n         </item>\n        </layout>\n       </item>\n       <item>\n        <widget class=\"QTableView\" name=\"customTableView\"/>\n       </item>\n      </layout>\n     </widget>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QDialogButtonBox\" name=\"buttonBox\">\n     <property name=\"orientation\">\n      <enum>Qt::Horizontal</enum>\n     </property>\n     <property name=\"standardButtons\">\n      <set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>\n     </property>\n    </widget>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections>\n  <connection>\n   <sender>buttonBox</sender>\n   <signal>accepted()</signal>\n   <receiver>BuildConfigDialog</receiver>\n   <slot>accept()</slot>\n   <hints>\n    <hint type=\"sourcelabel\">\n     <x>248</x>\n     <y>254</y>\n    </hint>\n    <hint type=\"destinationlabel\">\n     <x>157</x>\n     <y>274</y>\n    </hint>\n   </hints>\n  </connection>\n  <connection>\n   <sender>buttonBox</sender>\n   <signal>rejected()</signal>\n   <receiver>BuildConfigDialog</receiver>\n   <slot>reject()</slot>\n   <hints>\n    <hint type=\"sourcelabel\">\n     <x>316</x>\n     <y>260</y>\n    </hint>\n    <hint type=\"destinationlabel\">\n     <x>286</x>\n     <y>274</y>\n    </hint>\n   </hints>\n  </connection>\n </connections>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/buildmanager.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: buildmanager.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"buildmanager.h\"\n#include \"build.h\"\n#include <QDir>\n#include <QFileInfo>\n#include <QFile>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nBuildManager::BuildManager(QObject *parent)\n    : LiteApi::IBuildManager(parent)\n{\n    m_build = 0;\n}\n\nBuildManager::~BuildManager()\n{\n    qDeleteAll(m_buildList);\n}\n\nvoid BuildManager::addBuild(IBuild *build)\n{\n    m_buildList.append(build);\n}\n\nvoid BuildManager::removeBuild(IBuild *build)\n{\n    m_buildList.removeAll(build);\n}\n\nIBuild *BuildManager::findBuild(const QString &mimeType)\n{\n    foreach(IBuild *build, m_buildList) {\n        if (build->mimeType() == mimeType) {\n            return build;\n        }\n    }\n    return 0;\n}\n\nQList<IBuild*> BuildManager::buildList() const\n{\n    return m_buildList;\n}\n\nvoid BuildManager::setCurrentBuild(LiteApi::IBuild *build)\n{\n    if (m_build == build) {\n        return;\n    }\n    m_build = build;\n    emit buildChanged(m_build);\n}\n\nIBuild *BuildManager::currentBuild() const\n{\n    return m_build;\n}\n\nvoid BuildManager::load(const QString &path)\n{\n    QDir dir = path;\n    m_liteApp->appendLog(\"BuildManager\",\"Loading \"+path);\n    dir.setFilter(QDir::Files | QDir::NoSymLinks);\n    dir.setNameFilters(QStringList(\"*.xml\"));\n    foreach (QString fileName, dir.entryList()) {\n        Build::loadBuild(this,QFileInfo(dir,fileName).absoluteFilePath());\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/buildmanager.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: buildmanager.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef BUILDMANAGER_H\n#define BUILDMANAGER_H\n\n#include \"litebuildapi/litebuildapi.h\"\n\nusing namespace LiteApi;\nclass BuildManager : public LiteApi::IBuildManager\n{\n    Q_OBJECT\npublic:\n    BuildManager(QObject *parent);\n    ~BuildManager();\n    virtual void addBuild(IBuild *build);\n    virtual void removeBuild(IBuild *build);\n    virtual IBuild *findBuild(const QString &mimeType);\n    virtual QList<IBuild*> buildList() const;\n    virtual void setCurrentBuild(LiteApi::IBuild *build);\n    virtual IBuild *currentBuild() const;\npublic:\n    void load(const QString &path);\nprotected:\n    QList<IBuild*>  m_buildList;\n    LiteApi::IBuild *m_build;\n};\n\n#endif // BUILDMANAGER_H\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/litebuild.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: litebuild.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"litebuild.h\"\r\n#include \"litebuild_global.h\"\r\n#include \"buildmanager.h\"\r\n#include \"liteapi/liteapi.h\"\r\n#include \"liteapi/liteutil.h\"\r\n#include \"liteapi/liteids.h\"\r\n#include \"golangdocapi/golangdocapi.h\"\r\n#include \"fileutil/fileutil.h\"\r\n#include \"processex/processex.h\"\r\n#include \"textoutput/textoutput.h\"\r\n#include \"buildconfigdialog.h\"\r\n#include \"litedebugapi/litedebugapi.h\"\r\n#include \"liteeditorapi/liteeditorapi.h\"\r\n#include \"qtc_texteditor/basetextdocumentlayout.h\"\r\n#include \"../liteeditor/liteeditor_global.h\"\r\n#include <QToolBar>\r\n#include <QComboBox>\r\n#include <QAction>\r\n#include <QMenu>\r\n#include <QDir>\r\n#include <QFileInfo>\r\n#include <QTextBlock>\r\n#include <QTextCodec>\r\n#include <QProcessEnvironment>\r\n#include <QStandardItemModel>\r\n#include <QStandardItem>\r\n#include <QLabel>\r\n#include <QCheckBox>\r\n#include <QToolButton>\r\n#include <QTime>\r\n#include <QDebug>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n/*\r\n### liteide app info\r\n\r\n    LITEIDE_BIN_DIR\r\n    LITEIDE_RES_DIR\r\n\r\n### build dir info\r\n\r\n    BUILD_DIR_PATH\r\n    BUILD_DIR_NAME\r\n    BUILD_DIR_BASENAME\r\n\r\n### editor file info\r\n\r\n    EDITOR_FILE_PATH\r\n    EDITOR_FILE_NAME\r\n    EDITOR_FILE_BASENAME\r\n    EDITOR_FILE_SUFFIX\r\n\r\n### editor dir info\r\n\r\n    EDITOR_DIR_PATH\r\n    EDITOR_DIR_NAME\r\n    EDITOR_DIR_BASENAME\r\n*/\r\n\r\nenum {\r\n    INPUT_ACTION = 0,\r\n    INPUT_COMMAND = 1\r\n};\r\n\r\nenum {\r\n    ID_CMD = 0,\r\n    ID_ARGS = 1,\r\n    ID_CODEC = 2,\r\n    ID_MIMETYPE = 3,\r\n    ID_TASKLIST = 4,\r\n    ID_EDITOR = 5,\r\n    ID_INPUTTYPE = 6, //action - 0, command - 1\r\n    ID_NAVIGATE = 7,\r\n    ID_REGEXP = 8,\r\n    ID_ACTIONID = 9,\r\n    ID_TAKEALL = 10,\r\n    ID_ACTIVATEOUTPUT_CHECK = 11\r\n};\r\n\r\nstruct BuildBarInfo {\r\n    BuildBarInfo() : build(0), buildMenu(0)\r\n    {\r\n    }\r\n    ~BuildBarInfo()\r\n    {\r\n        if (buildMenu) {\r\n            buildMenu->deleteLater();\r\n        }\r\n    }\r\n    LiteApi::IBuild *build;\r\n    QMenu           *buildMenu;\r\n    QList<QAction*>  toolbarActions;\r\n};\r\n\r\nLiteBuild::LiteBuild(LiteApi::IApplication *app, QObject *parent) :\r\n    LiteApi::ILiteBuild(parent),\r\n    m_liteApp(app),\r\n    m_buildManager(new BuildManager(this)),\r\n    m_build(0),\r\n    m_envManager(0)\r\n{\r\n    m_bDynamicBuild = true;\r\n    m_bLockBuildRoot = false;\r\n    m_bFirstRunOutput = false;\r\n    m_nullMenu = new QMenu;\r\n    if (m_buildManager->initWithApp(m_liteApp)) {\r\n        m_buildManager->load(m_liteApp->resourcePath()+\"/litebuild\");\r\n        m_liteApp->extension()->addObject(\"LiteApi.IBuildManager\",m_buildManager);\r\n    }    \r\n    m_bProjectBuild = false;\r\n\r\n    m_buildToolBar = m_liteApp->actionManager()->insertToolBar(ID_TOOLBAR_BUILD,tr(\"Build Toolbar\"));\r\n    m_liteApp->actionManager()->insertViewMenu(LiteApi::ViewMenuToolBarPos,m_buildToolBar->toggleViewAction());\r\n\r\n    m_buildMenu = m_liteApp->actionManager()->loadMenu(ID_MENU_BUILD);\r\n    //m_liteApp->actionManager()->insertViewMenu(LiteApi::ViewMenuToolBarPos,m_toolBar->toggleViewAction());\r\n\r\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(this,\"Build\");\r\n\r\n    m_configAct = new QAction(QIcon(\"icon:litebuild/images/config.png\"),tr(\"Build Configuration...\"),this);\r\n    actionContext->regAction(m_configAct,\"Config\",\"\");\r\n\r\n    m_buildToolBar->addAction(m_configAct);\r\n    m_buildToolBar->addSeparator();\r\n\r\n    m_checkBoxLockBuild = new QCheckBox;\r\n\r\n    m_buildToolBar->addWidget(m_checkBoxLockBuild);\r\n    m_buildToolBar->addSeparator();\r\n\r\n    m_process = new ProcessEx(this);\r\n    m_debugEnvProcess = new ProcessEx(this);\r\n\r\n    m_output = new TextOutput(m_liteApp);\r\n    m_output->setFilterTermColor(true);\r\n    m_output->setTerminalInput(true);\r\n\r\n    m_stopAct = new QAction(tr(\"Stop Action\"),this);\r\n    m_stopAct->setIcon(QIcon(\"icon:litebuild/images/stopaction.png\"));\r\n    actionContext->regAction(m_stopAct,\"Stop\",\"\");\r\n\r\n    m_clearAct = new QAction(tr(\"Clear Output\"),this);\r\n    m_clearAct->setIcon(QIcon(\"icon:images/cleanoutput.png\"));\r\n    actionContext->regAction(m_clearAct,\"ClearOutput\",\"\");\r\n\r\n    m_fmctxExecuteFileAct = new QAction(tr(\"Execute File\"),this);\r\n    connect(m_fmctxExecuteFileAct,SIGNAL(triggered()),this,SLOT(fmctxExecuteFile()));\r\n\r\n    m_fmctxDebugFileAct = new QAction(tr(\"Debug File\"),this);\r\n    connect(m_fmctxDebugFileAct,SIGNAL(triggered()),this,SLOT(fmctxDebugFile()));\r\n\r\n    m_fmctxGoLockBuildAct = new QAction(tr(\"Lock Build Path\"),this);\r\n\r\n    m_fmctxGoBuildConfigAct = new QAction(tr(\"Build Path Configuration\"),this);\r\n\r\n    m_fmctxGoToolMenu = new QMenu(\"Go Tool\");\r\n    m_fmctxNoGoToolMenu = new QMenu(\"Go Tool\");\r\n\r\n    m_fmctxGoBuildAct = new QAction(\"Go Build\",this);\r\n    m_fmctxGoBuildAct->setData(\"build $(BUILDARGS)\");\r\n\r\n    m_fmctxGoBuildAllAct = new QAction(\"Go Build All\",this);\r\n    m_fmctxGoBuildAllAct->setData(\"build $(BUILDARGS) ./...\");\r\n\r\n    m_fmctxGoInstallAct = new QAction(\"Go Install\",this);\r\n    m_fmctxGoInstallAct->setData(\"install $(INSTALLARGS)\");\r\n\r\n    m_fmctxGoInstallAllAct = new QAction(\"Go Install All\",this);\r\n    m_fmctxGoInstallAllAct->setData(\"install $(INSTALLARGS) ./...\");\r\n\r\n    m_fmctxGoTestAct = new QAction(\"Go Test\",this);\r\n    m_fmctxGoTestAct->setData(\"test $(TESTARGS)\");\r\n\r\n    m_fmctxGoTestAllAct = new QAction(\"Go Test All\",this);\r\n    m_fmctxGoTestAllAct->setData(\"test $(TESTARGS) ./...\");\r\n\r\n    m_fmctxGoCleanAct = new QAction(\"Go Clean\",this);\r\n    m_fmctxGoCleanAct->setData(\"clean -i -x\");\r\n\r\n    m_fmctxGoCleanAllAct = new QAction(\"Go Clean All\",this);\r\n    m_fmctxGoCleanAllAct->setData(\"clean -i -x ./...\");\r\n\r\n    m_fmctxGoGetAct = new QAction(\"Go Get\",this);\r\n    m_fmctxGoGetAct->setData(\"get $(GETARGS)\");\r\n\r\n    m_fmctxGoGetUpdateAct = new QAction(\"Go Get Update\",this);\r\n    m_fmctxGoGetUpdateAct->setData(\"get $(UPDATEGETARGS)\");\r\n\r\n    m_fmctxGoGetForceAct = new QAction(\"Go Get Force\",this);\r\n    m_fmctxGoGetForceAct->setData(\"get $(GORCEGETARGS)\");\r\n\r\n    m_fmctxGoVetAct = new QAction(\"Go Vet\",this);\r\n    m_fmctxGoVetAct->setData(\"vet $(VETARGS)\");\r\n\r\n    m_fmctxGoVetAllCheckAct = new QAction(\"Go Vet (enable all checks)\",this);\r\n    m_fmctxGoVetAllCheckAct->setData(\"tool vet $(TOOLVETARGS) .\");\r\n\r\n    m_fmctxGoFmtAct = new QAction(\"GoFmt\",this);\r\n\r\n    m_fmctxGodocAct = new QAction(tr(\"Use godoc View\"),this);\r\n\r\n    m_fmctxGoToolMenu->addAction(m_fmctxGoBuildAct);\r\n    m_fmctxGoToolMenu->addAction(m_fmctxGoBuildAllAct);\r\n    m_fmctxGoToolMenu->addSeparator();\r\n    m_fmctxGoToolMenu->addAction(m_fmctxGoInstallAct);\r\n    m_fmctxGoToolMenu->addAction(m_fmctxGoInstallAllAct);\r\n    m_fmctxGoToolMenu->addSeparator();\r\n    m_fmctxGoToolMenu->addAction(m_fmctxGoGetAct);\r\n    m_fmctxGoToolMenu->addAction(m_fmctxGoGetUpdateAct);\r\n    m_fmctxGoToolMenu->addAction(m_fmctxGoGetForceAct);\r\n    m_fmctxGoToolMenu->addSeparator();\r\n    m_fmctxGoToolMenu->addAction(m_fmctxGoTestAct);\r\n    m_fmctxGoToolMenu->addAction(m_fmctxGoTestAllAct);\r\n    m_fmctxGoToolMenu->addSeparator();\r\n    m_fmctxGoToolMenu->addAction(m_fmctxGoCleanAct);\r\n    m_fmctxGoToolMenu->addAction(m_fmctxGoCleanAllAct);\r\n    m_fmctxGoToolMenu->addSeparator();\r\n    m_fmctxGoToolMenu->addAction(m_fmctxGoVetAct);\r\n    m_fmctxGoToolMenu->addAction(m_fmctxGoVetAllCheckAct);\r\n    m_fmctxGoToolMenu->addSeparator();\r\n    m_fmctxGoToolMenu->addAction(m_fmctxGoFmtAct);\r\n\r\n//    m_fmctxNoGoToolMenu->addAction(m_fmctxGoBuildAllAct);\r\n    m_fmctxNoGoToolMenu->addAction(m_fmctxGoInstallAllAct);\r\n    m_fmctxNoGoToolMenu->addAction(m_fmctxGoTestAllAct);\r\n    m_fmctxNoGoToolMenu->addAction(m_fmctxGoCleanAllAct);\r\n\r\n    connect(m_fmctxGoLockBuildAct,SIGNAL(triggered()),this,SLOT(fmctxGoLockBuild()));\r\n    connect(m_fmctxGoBuildConfigAct,SIGNAL(triggered()),this,SLOT(fmctxGoBuildConfigure()));\r\n    connect(m_fmctxGoBuildAct,SIGNAL(triggered()),this,SLOT(fmctxGoTool()));\r\n    connect(m_fmctxGoBuildAllAct,SIGNAL(triggered()),this,SLOT(fmctxGoTool()));\r\n    connect(m_fmctxGoInstallAct,SIGNAL(triggered()),this,SLOT(fmctxGoTool()));\r\n    connect(m_fmctxGoInstallAllAct,SIGNAL(triggered()),this,SLOT(fmctxGoTool()));\r\n    connect(m_fmctxGoTestAct,SIGNAL(triggered()),this,SLOT(fmctxGoTool()));\r\n    connect(m_fmctxGoTestAllAct,SIGNAL(triggered()),this,SLOT(fmctxGoTool()));\r\n    connect(m_fmctxGoCleanAct,SIGNAL(triggered()),this,SLOT(fmctxGoTool()));\r\n    connect(m_fmctxGoCleanAllAct,SIGNAL(triggered()),this,SLOT(fmctxGoTool()));\r\n    connect(m_fmctxGoGetAct,SIGNAL(triggered()),this,SLOT(fmctxGoTool()));\r\n    connect(m_fmctxGoGetUpdateAct,SIGNAL(triggered()),this,SLOT(fmctxGoTool()));\r\n    connect(m_fmctxGoGetForceAct,SIGNAL(triggered()),this,SLOT(fmctxGoTool()));\r\n    connect(m_fmctxGoVetAct,SIGNAL(triggered()),this,SLOT(fmctxGoTool()));\r\n    connect(m_fmctxGoVetAllCheckAct,SIGNAL(triggered()),this,SLOT(fmctxGoTool()));\r\n\r\n    connect(m_fmctxGoFmtAct,SIGNAL(triggered()),this,SLOT(fmctxGofmt()));\r\n    connect(m_fmctxGodocAct,SIGNAL(triggered(bool)),this,SLOT(fmctxGodoc()));\r\n\r\n    connect(m_stopAct,SIGNAL(triggered()),this,SLOT(stopAction()));\r\n    connect(m_clearAct,SIGNAL(triggered()),m_output,SLOT(clear()));\r\n\r\n    m_buildMenu->addAction(m_configAct);\r\n    m_buildMenu->addSeparator();\r\n    m_buildMenu->addAction(m_stopAct);\r\n    m_buildMenu->addAction(m_clearAct);\r\n    m_buildMenu->addSeparator();\r\n\r\n    //m_liteApp->outputManager()->addOutuput(m_output,tr(\"Build Output\"));\r\n    m_outputLineWrapAct = new QAction(tr(\"Line Wrap\"),this);\r\n    m_outputLineWrapAct->setCheckable(true);\r\n    connect(m_outputLineWrapAct,SIGNAL(toggled(bool)),this,SLOT(setOutputLineWrap(bool)));\r\n\r\n    m_outputAutoClearAct = new QAction(tr(\"Auto Clear\"),this);\r\n    m_outputAutoClearAct->setCheckable(true);\r\n    connect(m_outputAutoClearAct,SIGNAL(triggered(bool)),this,SLOT(setOutputAutoClear(bool)));\r\n\r\n    m_outputAutoPosCursorAct = new QAction(tr(\"Automatic positioning cursor\"),this);\r\n    m_outputAutoPosCursorAct->setCheckable(true);\r\n    connect(m_outputAutoPosCursorAct,SIGNAL(triggered(bool)),this,SLOT(setOutputAutoPosCursor(bool)));\r\n\r\n    bool bLineWrap = m_liteApp->settings()->value(LITEBUILD_OUTPUTLINEWRAP,false).toBool();\r\n    m_bOutputAutoClear = m_liteApp->settings()->value(LITEBUILD_OUTPUTAUTOCLEAR,true).toBool();\r\n\r\n    bool bAutoPosCursor = m_liteApp->settings()->value(LITEBUILD_OUTPUTAUTOPOSCURSOR,true).toBool();\r\n\r\n    m_output->setLineWrap(bLineWrap);\r\n    m_outputLineWrapAct->setChecked(bLineWrap);\r\n    m_outputAutoClearAct->setChecked(m_bOutputAutoClear);\r\n    m_outputAutoPosCursorAct->setChecked(bAutoPosCursor);\r\n    m_output->setAutoPosCursor(bAutoPosCursor);\r\n\r\n    m_outputMenu = new QMenu(tr(\"Setup\"));\r\n    m_outputMenu->setIcon(QIcon(\":/images/setup.png\"));\r\n    m_outputMenu->addAction(m_outputAutoClearAct);\r\n    m_outputMenu->addAction(m_outputLineWrapAct);\r\n    m_outputMenu->addAction(m_outputAutoPosCursorAct);\r\n\r\n    m_outputAct = m_liteApp->toolWindowManager()->addToolWindow(Qt::BottomDockWidgetArea,\r\n                                                                m_output,\"BuildOutput\",\r\n                                                                tr(\"Build Output\"),\r\n                                                                false,\r\n                                                                QList<QAction*>() << m_stopAct << m_clearAct << m_outputMenu->menuAction());\r\n\r\n    connect(m_liteApp,SIGNAL(loaded()),this,SLOT(appLoaded()));\r\n    connect(m_liteApp->optionManager(),SIGNAL(applyOption(QString)),this,SLOT(applyOption(QString)));\r\n    //connect(m_liteApp->projectManager(),SIGNAL(currentProjectChanged(LiteApi::IProject*)),this,SLOT(currentProjectChanged(LiteApi::IProject*)));\r\n    connect(m_liteApp->editorManager(),SIGNAL(editorCreated(LiteApi::IEditor*)),this,SLOT(editorCreated(LiteApi::IEditor*)));\r\n    connect(m_liteApp->editorManager(),SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(currentEditorChanged(LiteApi::IEditor*)));\r\n    connect(m_process,SIGNAL(extOutput(QByteArray,bool)),this,SLOT(extOutput(QByteArray,bool)));\r\n    connect(m_process,SIGNAL(extFinish(bool,int,QString)),this,SLOT(extFinish(bool,int,QString)));\r\n    connect(m_debugEnvProcess,SIGNAL(extOutput(QByteArray,bool)),this,SLOT(debugEnvOutput(QByteArray,bool)));\r\n    connect(m_output,SIGNAL(dbclickEvent(QTextCursor)),this,SLOT(dbclickBuildOutput(QTextCursor)));\r\n    connect(m_output,SIGNAL(enterText(QString)),this,SLOT(enterTextBuildOutput(QString)));\r\n    connect(m_output,SIGNAL(tabText(QString)),this,SLOT(enterTextBuildOutput(QString)));\r\n    connect(m_output,SIGNAL(keyUpdown(int)),this,SLOT(keyUpdownBuildOutput(int)));\r\n    connect(m_configAct,SIGNAL(triggered()),this,SLOT(config()));\r\n    connect(m_liteApp->fileManager(),SIGNAL(aboutToShowFolderContextMenu(QMenu*,LiteApi::FILESYSTEM_CONTEXT_FLAG,QFileInfo,QString)),this,SLOT(aboutToShowFolderContextMenu(QMenu*,LiteApi::FILESYSTEM_CONTEXT_FLAG,QFileInfo,QString)));\r\n    connect(m_checkBoxLockBuild,SIGNAL(toggled(bool)),this,SLOT(lockBuildRoot(bool)));\r\n\r\n    m_liteAppInfo.insert(\"LITEIDE_ROOT_PATH\",m_liteApp->rootPath());\r\n    m_liteAppInfo.insert(\"LITEIDE_APP_PATH\",m_liteApp->applicationPath());\r\n    m_liteAppInfo.insert(\"LITEIDE_RES_PATH\",m_liteApp->resourcePath());\r\n    m_liteAppInfo.insert(\"LITEIDE_PLUGIN_PATH\",m_liteApp->pluginPath());\r\n    m_liteAppInfo.insert(\"LITEIDE_TOOL_PATH\",m_liteApp->toolPath());\r\n    m_liteAppInfo.insert(\"LITEIDE_DEBUG_GCFLAGS\",\"-gcflags=\\\"-N -l\\\"\");\r\n\r\n    m_liteApp->extension()->addObject(\"LiteApi.ILiteBuild\",this);\r\n\r\n    foreach(LiteApi::IBuild *build, m_buildManager->buildList()) {\r\n        connect(build,SIGNAL(buildAction(LiteApi::IBuild*,LiteApi::BuildAction*)),this,SLOT(execBuildAction(LiteApi::IBuild*,LiteApi::BuildAction*)));\r\n        QList<QAction*> actionList;\r\n        foreach(QAction *act, build->actions()) {\r\n            QMenu *subMenu = act->menu();\r\n            if (subMenu) {\r\n                actionList.append(subMenu->actions());\r\n            } else {\r\n                actionList.append(act);\r\n            }\r\n        }\r\n        foreach(QAction *act, actionList) {\r\n            QStringList shortcuts;\r\n            foreach(QKeySequence key, act->shortcuts()) {\r\n                shortcuts.append(key.toString());\r\n            }\r\n            actionContext->regAction(act,act->objectName(),shortcuts.join(\";\"));\r\n        }\r\n    }    \r\n\r\n    m_envManager = LiteApi::getEnvManager(m_liteApp);\r\n    if (m_envManager) {\r\n        connect(m_envManager,SIGNAL(currentEnvChanged(LiteApi::IEnv*)),this,SLOT(currentEnvChanged(LiteApi::IEnv*)));\r\n    }\r\n    applyOption(OPTION_LITEEDITOR);\r\n}\r\n\r\nLiteBuild::~LiteBuild()\r\n{\r\n    qDeleteAll(m_buildBarInfoMap);\r\n    stopAction();\r\n    delete m_output;\r\n    delete m_outputMenu;\r\n    if (!m_nullMenu->parent()) {\r\n        delete m_nullMenu;\r\n    }\r\n    delete m_fmctxGoToolMenu;\r\n    delete m_fmctxNoGoToolMenu;\r\n}\r\n\r\nbool LiteBuild::execGoCommand(const QStringList &args, const QString &workDir, bool waitFinish)\r\n{\r\n    m_process->stopAndWait(100,2000);\r\n    m_process->setWorkingDirectory(workDir);\r\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\r\n    QString gocmd = FileUtil::lookupGoBin(\"go\",m_liteApp,env,false);\r\n    if (gocmd.isEmpty()) {\r\n        return false;\r\n    }\r\n    this->execCommand(gocmd,args.join(\" \"),workDir);\r\n    if (!waitFinish) {\r\n        return true;\r\n    }\r\n    if (!m_process->waitForFinished(30000)) {\r\n        m_process->kill();\r\n        return false;\r\n    }\r\n    return m_process->exitCode() == 0;\r\n}\r\n\r\n\r\nQString LiteBuild::envValue(LiteApi::IBuild *build, const QString &value)\r\n{\r\n    QString buildFilePath;\r\n    if (m_buildRootPath.isEmpty()) {\r\n        LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\r\n        if (editor) {\r\n            QString filePath = editor->filePath();\r\n            if (!filePath.isEmpty()) {\r\n                buildFilePath = QFileInfo(filePath).path();\r\n            }\r\n        }\r\n    } else {\r\n        buildFilePath = m_buildRootPath;\r\n    }\r\n\r\n    QMap<QString,QString> env = buildEnvMap(build,buildFilePath);\r\n    QProcessEnvironment sysenv = LiteApi::getGoEnvironment(m_liteApp);\r\n    return this->envToValue(value,env,sysenv);\r\n}\r\n\r\nQString LiteBuild::buildPathEnvValue(IBuild *build, const QString &buildFilePath, const QString &value)\r\n{\r\n    if (!build) {\r\n        return value;\r\n    }\r\n\r\n    QMap<QString,QString> env = buildEnvMap(build,buildFilePath);\r\n    QProcessEnvironment sysenv = LiteApi::getGoEnvironment(m_liteApp);\r\n    return this->envToValue(value,env,sysenv);\r\n\r\n}\r\n\r\nQString LiteBuild::envToValue(const QString &value,QMap<QString,QString> &liteEnv,const QProcessEnvironment &env)\r\n{\r\n    QString v = value;\r\n    QMapIterator<QString,QString> i(liteEnv);\r\n    while(i.hasNext()) {\r\n        i.next();\r\n        v.replace(\"$(\"+i.key()+\")\",i.value());\r\n    }\r\n    QRegExp rx(\"\\\\$\\\\((\\\\w+)\\\\)\");\r\n    int pos = 0;\r\n    QStringList list;\r\n    while ((pos = rx.indexIn(v, pos)) != -1) {\r\n         list << rx.cap(1);\r\n         pos += rx.matchedLength();\r\n    }\r\n\r\n    foreach (QString str, list) {\r\n         if (env.contains(str)) {\r\n            v.replace(\"$(\"+str+\")\",env.value(str));\r\n        }\r\n    }\r\n    return v;\r\n}\r\n\r\nQString LiteBuild::buildTag() const\r\n{\r\n    return m_buildRootPath;\r\n}\r\n\r\nLiteApi::IBuildManager *LiteBuild::buildManager() const\r\n{\r\n    return m_buildManager;\r\n}\r\n\r\nvoid LiteBuild::appendOutput(const QString &str, const QBrush &brush, bool active, bool updateExistsTextColor)\r\n{\r\n    if (updateExistsTextColor) {\r\n        m_output->updateExistsTextColor();\r\n    }\r\n    if (active) {\r\n        m_outputAct->setChecked(true);\r\n    }\r\n    m_output->append(str,brush);\r\n}\r\n\r\nvoid LiteBuild::appLoaded()\r\n{\r\n}\r\n\r\nvoid LiteBuild::debugBefore()\r\n{\r\n}\r\n\r\nvoid LiteBuild::config()\r\n{\r\n    if (!m_build) {\r\n        return;\r\n    }\r\n\r\n    BuildConfigDialog dlg(m_liteApp);\r\n    dlg.setBuild(m_build,m_buildRootPath, this->liteideEnvMap());\r\n\r\n    if (dlg.exec() == QDialog::Accepted) {\r\n        updateBuildConfig(m_build);\r\n    }\r\n}\r\n\r\nvoid LiteBuild::aboutToShowFolderContextMenu(QMenu *menu, LiteApi::FILESYSTEM_CONTEXT_FLAG flag, const QFileInfo &info,const QString &context)\r\n{\r\n    m_fmctxInfo = info;\r\n    if (flag == LiteApi::FILESYSTEM_FILES) {\r\n        QString cmd = FileUtil::lookPathInDir(info.fileName(),info.path());\r\n        if (!cmd.isEmpty()) {\r\n            QAction *act = 0;\r\n            if (!menu->actions().isEmpty()) {\r\n                act = menu->actions().at(0);\r\n            }\r\n            menu->insertAction(act,m_fmctxExecuteFileAct);\r\n            bool hasGo = false;\r\n            foreach(QFileInfo info, QDir(info.path()).entryInfoList(QDir::Files)) {\r\n                if (info.suffix() == \"go\") {\r\n                    hasGo = true;\r\n                    break;\r\n                }\r\n            }\r\n            if (hasGo) {\r\n                menu->insertAction(act,m_fmctxDebugFileAct);\r\n            }\r\n            menu->insertSeparator(act);\r\n        }\r\n    } else if (flag == LiteApi::FILESYSTEM_FOLDER || flag == LiteApi::FILESYSTEM_ROOTFOLDER) {\r\n#ifdef Q_OS_MAC\r\n        if (m_fmctxInfo.isBundle()) {\r\n            return;\r\n        }\r\n#endif\r\n        bool hasGo = false;\r\n        bool hasTest = false;\r\n        foreach(QFileInfo info, QDir(info.filePath()).entryInfoList(QDir::Files)) {\r\n            if (info.fileName().endsWith(\"_test.go\")) {\r\n                hasGo = true;\r\n                hasTest = true;\r\n                break;\r\n            }\r\n            if (info.suffix() == \"go\") {\r\n                hasGo = true;\r\n            }\r\n        }\r\n        if (hasGo) {\r\n            QAction *act = 0;\r\n            if (!menu->actions().isEmpty()) {\r\n                act = menu->actions().at(0);\r\n            }\r\n            menu->insertAction(act,m_fmctxGoLockBuildAct);\r\n            menu->insertAction(act,m_fmctxGoBuildConfigAct);\r\n            menu->insertSeparator(act);            \r\n            //m_fmctxGoTestAct->setEnabled(hasTest);\r\n            menu->insertMenu(act,m_fmctxGoToolMenu);\r\n\r\n            LiteApi::IGolangDoc *doc = LiteApi::findExtensionObject<LiteApi::IGolangDoc*>(m_liteApp,\"LiteApi.IGolangDoc\");\r\n            if (doc) {\r\n                menu->insertSeparator(act);\r\n                menu->insertAction(act,m_fmctxGodocAct);\r\n            }\r\n            menu->insertSeparator(act);\r\n        } else {\r\n            QAction *act = 0;\r\n            if (!menu->actions().isEmpty()) {\r\n                act = menu->actions().at(0);\r\n            }\r\n            menu->insertSeparator(act);\r\n            menu->insertMenu(act,m_fmctxNoGoToolMenu);\r\n        }\r\n    }\r\n}\r\n\r\nvoid LiteBuild::fmctxExecuteFile()\r\n{\r\n    QString cmd = FileUtil::lookPathInDir(m_fmctxInfo.fileName(),m_fmctxInfo.path());\r\n    if (!cmd.isEmpty()) {\r\n        this->stopAction();\r\n        this->execCommand(cmd,QString(),m_fmctxInfo.path(),true,true,false);\r\n    }\r\n}\r\n\r\nvoid LiteBuild::fmctxDebugFile()\r\n{\r\n    QString cmd = FileUtil::lookPathInDir(m_fmctxInfo.fileName(),m_fmctxInfo.path());\r\n    if (!cmd.isEmpty()) {\r\n        LiteApi::ILiteDebug *debug = LiteApi::getLiteDebug(m_liteApp);\r\n        if (debug) {\r\n            debug->startDebug(m_fmctxInfo.fileName(),\"\",m_fmctxInfo.path());\r\n        }\r\n    }\r\n}\r\n\r\nvoid LiteBuild::fmctxGoLockBuild()\r\n{\r\n    QString buildPath = m_fmctxInfo.filePath();\r\n    this->lockBuildRootByMimeType(buildPath,\"text/x-gosrc\");\r\n}\r\n\r\nvoid LiteBuild::fmctxGoBuildConfigure()\r\n{\r\n    QString buildPath = m_fmctxInfo.filePath();\r\n    //this->lockBuildRootByMimeType(buildPath,\"text/x-gosrc\");\r\n\r\n    LiteApi::IBuild *build = m_buildManager->findBuild(\"text/x-gosrc\");\r\n    if (!build) {\r\n        m_liteApp->appendLog(\"LiteBuild\",\"not found LiteApi::IBuild interface by mime type text/x-gosrc\");\r\n        return;\r\n    }\r\n\r\n    BuildConfigDialog dlg(m_liteApp);\r\n    dlg.setBuild(build,buildPath, this->liteideEnvMap());\r\n\r\n    dlg.exec();\r\n}\r\n\r\nvoid LiteBuild::fmctxGoTool()\r\n{\r\n    QAction *act = (QAction*)sender();\r\n    if (!act) {\r\n        return;\r\n    }\r\n    LiteApi::IBuild *build = m_buildManager->findBuild(\"text/x-gosrc\");\r\n    if (!build) {\r\n        m_liteApp->appendLog(\"litebuild\",\"not found LiteApi::IBuild interface by mime type text/x-gosrc\",true);\r\n        return;\r\n    }\r\n\r\n\r\n    QString args = act->data().toString();\r\n    QMap<QString,QString> env = buildEnvMap(build,m_fmctxInfo.filePath());\r\n    QProcessEnvironment sysenv = LiteApi::getGoEnvironment(m_liteApp);\r\n    QString cmd = FileUtil::lookupGoBin(\"go\",m_liteApp,sysenv,false);\r\n    args = this->envToValue(args,env,sysenv);\r\n\r\n    m_outputRegex = \"(\\\\w?:?[\\\\w\\\\d_@\\\\-\\\\\\\\/\\\\.]+):(\\\\d+):\";\r\n    m_process->setUserData(ID_REGEXP,m_outputRegex);\r\n    if (!cmd.isEmpty()) {\r\n        m_liteApp->editorManager()->saveAllEditors();\r\n        this->stopAction();\r\n        this->execCommand(cmd,args,m_fmctxInfo.filePath(),true,true,true,false);\r\n    }\r\n}\r\n\r\nvoid LiteBuild::fmctxGofmt()\r\n{\r\n    QString args = \"gofmt -l -w .\";\r\n    QString cmd = LiteApi::getGotools(m_liteApp);\r\n    m_outputRegex = \"(\\\\w?:?[\\\\w\\\\d_@\\\\-\\\\\\\\/\\\\.]+):(\\\\d+):\";\r\n    m_process->setUserData(ID_REGEXP,m_outputRegex);\r\n    if (!cmd.isEmpty()) {\r\n        m_liteApp->editorManager()->saveAllEditors();\r\n        this->stopAction();\r\n        this->execCommand(cmd,args,m_fmctxInfo.filePath(),true,true,true,false);\r\n    }\r\n}\r\n\r\nvoid LiteBuild::fmctxGodoc()\r\n{\r\n    QString path = m_fmctxInfo.filePath();\r\n    LiteApi::IGolangDoc *doc = LiteApi::findExtensionObject<LiteApi::IGolangDoc*>(m_liteApp,\"LiteApi.IGolangDoc\");\r\n    if (doc) {\r\n        QUrl url;\r\n        url.setScheme(\"pdoc\");\r\n        url.setPath(path);\r\n        doc->openUrl(url);\r\n        doc->activeBrowser();\r\n    }\r\n}\r\n\r\nvoid LiteBuild::applyOption(QString /*opt*/)\r\n{\r\n//    if (opt == OPTION_LITEEDITOR) {\r\n//        QFont font = m_output->font();\r\n//        font.setFamily(m_liteApp->settings()->value(EDITOR_FAMILY,font.family()).toString());\r\n//        m_output->setFont(font);\r\n//    }\r\n}\r\n\r\nvoid LiteBuild::lockBuildRoot(bool b)\r\n{\r\n    m_bLockBuildRoot = b;\r\n    if (!b) {\r\n        this->currentEditorChanged(m_liteApp->editorManager()->currentEditor());\r\n    }\r\n}\r\n\r\nvoid LiteBuild::setOutputLineWrap(bool b)\r\n{\r\n    m_output->setLineWrap(b);\r\n    m_liteApp->settings()->setValue(LITEBUILD_OUTPUTLINEWRAP,b);\r\n}\r\n\r\nvoid LiteBuild::setOutputAutoClear(bool b)\r\n{\r\n    m_bOutputAutoClear = b;\r\n    m_liteApp->settings()->setValue(LITEBUILD_OUTPUTAUTOCLEAR,b);\r\n}\r\n\r\nvoid LiteBuild::setOutputAutoPosCursor(bool b)\r\n{\r\n    m_liteApp->settings()->setValue(LITEBUILD_OUTPUTAUTOPOSCURSOR,b);\r\n    m_output->setAutoPosCursor(b);\r\n}\r\n\r\nbool LiteBuild::isLockBuildRoot() const\r\n{\r\n    return m_bLockBuildRoot;\r\n}\r\n\r\nQString LiteBuild::currentBuildPath() const\r\n{\r\n    return m_buildRootPath;\r\n}\r\n\r\nvoid LiteBuild::currentEnvChanged(LiteApi::IEnv*)\r\n{\r\n    LiteApi::IEnv *ienv = m_envManager->currentEnv();\r\n    if (!ienv) {\r\n        return;\r\n    }\r\n    QProcessEnvironment env =  LiteApi::getGoEnvironment(m_liteApp);\r\n//    if (!LiteApi::hasGoEnv(env)) {\r\n//        return;\r\n//    }\r\n    m_liteApp->appendLog(\"LiteBuild\",\"go environment changed\");\r\n    m_process->setEnvironment(env.toStringList());\r\n\r\n    m_output->updateExistsTextColor();\r\n    m_output->appendTag(tr(\"Current environment change id \\\"%1\\\"\").arg(ienv->id())+\"\\n\");\r\n\r\n    m_debugEnvProcess->setEnvironment(env.toStringList());\r\n    if (!m_debugEnvProcess->isStop()) {\r\n        m_debugEnvProcess->stop(100);\r\n    }\r\n    QString gotools = LiteApi::getGotools(m_liteApp);\r\n    if (!gotools.isEmpty()) {\r\n        m_debugEnvProcess->start(gotools,QStringList() << \"debugflags\");\r\n    }\r\n\r\n    bool b = m_liteApp->settings()->value(LITEBUILD_ENVCHECK,true).toBool();\r\n    if (!b) {\r\n        return;\r\n    }\r\n\r\n    QString go = FileUtil::lookupGoBin(\"go\",m_liteApp,env,false);\r\n    QString goroot = env.value(\"GOROOT\");\r\n    QString goarch = env.value(\"GOARCH\");\r\n    QString goos = env.value(\"GOOS\");\r\n    if (!go.isEmpty()) {\r\n        m_output->append(\"Found go bin at \"+QDir::toNativeSeparators(go));\r\n    } else {\r\n        m_output->append(\"Could not find go bin, (hint: is Go installed?)\",Qt::red);\r\n    }\r\n    m_output->append(\"\\nGOROOT=\"+goroot);\r\n    m_output->append(\"\\nGOARCH=\"+goarch);\r\n    m_output->append(\"\\nGOOS=\"+goos);\r\n    m_output->append(\"\\n\");\r\n//    QString gobin = FileUtil::lookupGoBin(\"go\",m_liteApp,true);\r\n//    if (gobin.isEmpty()) {\r\n//        m_output->updateExistsTextColor();\r\n//        m_output->appendTag(tr(\"Current environment change id \\\"%1\\\"\").arg(ienv->id())+\"\\n\");\r\n//        m_output->append(\"go bin not found!\",Qt::red);\r\n//        return;\r\n//    }\r\n//    if (m_process->isStop()) {\r\n//        m_output->updateExistsTextColor();\r\n//        m_output->appendTag(tr(\"Current environment change id \\\"%1\\\"\").arg(ienv->id())+\"\\n\");\r\n//        this->execCommand(gobin,\"env\",LiteApi::getGOROOT(m_liteApp),false,false);\r\n//    }\r\n}\r\n\r\nvoid LiteBuild::loadProjectInfo(const QString &filePath)\r\n{    \r\n    m_projectInfo.clear();\r\n    if (filePath.isEmpty()) {\r\n        return;\r\n    }\r\n    QFileInfo info(filePath);\r\n    /*\r\nPROJECT_NAME\r\nPROJECT_PATH\r\nPROJECT_DIR\r\nPROJECT_DIRNAME\r\nPROJECT_TARGETNAME\r\nPROJECT_TARGETATH\r\n    */\r\n    if (info.isDir()) {\r\n        m_projectInfo.insert(\"PROJECT_NAME\",info.fileName());\r\n        m_projectInfo.insert(\"PROJECT_PATH\",info.filePath());\r\n        m_projectInfo.insert(\"PROJECT_DIR\",info.filePath());\r\n        m_projectInfo.insert(\"PROJECT_DIRNAME\",info.fileName());\r\n    } else {\r\n        m_projectInfo.insert(\"PROJECT_NAME\",info.fileName());\r\n        m_projectInfo.insert(\"PROJECT_PATH\",info.filePath());\r\n        m_projectInfo.insert(\"PROJECT_DIR\",info.path());\r\n        m_projectInfo.insert(\"PROJECT_DIRNAME\",QFileInfo(info.path()).fileName());\r\n    }\r\n}\r\n\r\nLiteApi::IBuild *LiteBuild::findProjectBuild(LiteApi::IProject *project)\r\n{\r\n    if (!project) {\r\n        return 0;\r\n    }\r\n    LiteApi::IBuild *build = m_buildManager->findBuild(project->mimeType());\r\n    return build;\r\n}\r\n\r\nvoid LiteBuild::reloadProject()\r\n{\r\n    LiteApi::IProject *project = (LiteApi::IProject*)sender();\r\n    if (project) {\r\n        loadProjectInfo(project->filePath());\r\n        m_targetInfo = project->targetInfo();\r\n    }\r\n}\r\n\r\nvoid LiteBuild::currentProjectChanged(LiteApi::IProject */*project*/)\r\n{\r\n    return;\r\n//    m_buildRootPath.clear();\r\n//    m_projectInfo.clear();\r\n//    m_targetInfo.clear();\r\n//    m_bProjectBuild = false;\r\n//    if (project) {\r\n//        connect(project,SIGNAL(reloaded()),this,SLOT(reloadProject()));\r\n//        loadProjectInfo(project->filePath());\r\n//        m_targetInfo = project->targetInfo();\r\n//        m_buildRootPath = project->filePath();\r\n//        LiteApi::IBuild *build = findProjectBuild(project);\r\n//        if (build) {\r\n//            m_bProjectBuild = true;\r\n//            setCurrentBuild(build);\r\n//        } else {\r\n//            currentEditorChanged(m_liteApp->editorManager()->currentEditor());\r\n//        }\r\n//    } else {\r\n//        LiteApi::IBuild *build = findProjectBuildByEditor(m_liteApp->editorManager()->currentEditor());\r\n//        if (build) {\r\n//            m_bProjectBuild = true;\r\n//        }\r\n//        setCurrentBuild(build);\r\n//    }\r\n}\r\n\r\nQMap<QString,QString> LiteBuild::liteideEnvMap() const\r\n{\r\n    QMap<QString,QString> env = m_liteAppInfo;\r\n    QMapIterator<QString,QString> p(m_projectInfo);\r\n    while(p.hasNext()) {\r\n        p.next();\r\n        env.insert(p.key(),p.value());\r\n    }\r\n    QMapIterator<QString,QString> b(m_buildInfo);\r\n    while(b.hasNext()) {\r\n        b.next();\r\n        env.insert(b.key(),b.value());\r\n    }\r\n    QMapIterator<QString,QString> e(m_editorInfo);\r\n    while(e.hasNext()) {\r\n        e.next();\r\n        env.insert(e.key(),e.value());\r\n    }\r\n    QMapIterator<QString,QString> t(m_targetInfo);\r\n    while(t.hasNext()) {\r\n        t.next();\r\n        env.insert(t.key(),t.value());\r\n    }\r\n    return env;\r\n}\r\n\r\nLiteApi::TargetInfo LiteBuild::getTargetInfo()\r\n{\r\n    LiteApi::TargetInfo info;\r\n    if (!m_build) {\r\n        return info;\r\n    }\r\n    QList<BuildTarget*> lists = m_build->targetList();\r\n    if (!lists.isEmpty()) {\r\n        BuildTarget *target = lists.first();\r\n\r\n        QMap<QString,QString> env = buildEnvMap(m_build,m_buildRootPath);\r\n        QProcessEnvironment sysenv = LiteApi::getGoEnvironment(m_liteApp);\r\n        info.buildRootPath = m_buildRootPath;\r\n        info.targetName = this->envToValue(target->cmd(),env,sysenv);\r\n        info.debugName = this->envToValue(target->debug(),env,sysenv);\r\n        info.buildArgs = this->envToValue(target->buildArgs(),env,sysenv);\r\n        info.targetArgs = this->envToValue(target->args(),env,sysenv);\r\n        info.targetWorkDir = this->envToValue(target->work(),env,sysenv);\r\n    }\r\n    return info;\r\n}\r\n\r\nQMap<QString,QString> LiteBuild::buildEnvMap(LiteApi::IBuild *build, const QString &buildFilePath) const\r\n{\r\n    QMap<QString,QString> env = liteideEnvMap();\r\n    if (!build) {\r\n        return env;\r\n    }\r\n    QString customkey;\r\n    if (!buildFilePath.isEmpty()) {\r\n        customkey = \"litebuild-custom/\"+buildFilePath;\r\n    }\r\n    QString configkey = \"litebuild-config/\"+build->id();\r\n    foreach(LiteApi::BuildConfig *cf, build->configList()) {\r\n        QString name = cf->name();\r\n        QString value = cf->value();\r\n        if (!configkey.isEmpty()) {\r\n            value = m_liteApp->settings()->value(configkey+\"#\"+cf->id(),value).toString();\r\n        }\r\n        QMapIterator<QString,QString> m(env);\r\n        while(m.hasNext()) {\r\n            m.next();\r\n            value.replace(\"$(\"+m.key()+\")\",m.value());\r\n        }\r\n        env.insert(name,value);\r\n    }\r\n    foreach(LiteApi::BuildCustom *cf, build->customList()) {\r\n        QString name = cf->name();\r\n        QString value = cf->value();\r\n        QString sharedValue = cf->sharedValue();\r\n        bool hasShared = cf->hasShared();\r\n        if (!customkey.isEmpty()) {\r\n            value = m_liteApp->settings()->value(customkey+\"#\"+cf->id(),value).toString();\r\n            hasShared = m_liteApp->settings()->value(customkey+\"#\"+cf->id()+\"#shared\",hasShared).toBool();\r\n        }\r\n        QMapIterator<QString,QString> m(env);\r\n        while(m.hasNext()) {\r\n            m.next();\r\n            value.replace(\"$(\"+m.key()+\")\",m.value());\r\n            if (hasShared) {\r\n                sharedValue.replace(\"$(\"+m.key()+\")\",m.value());\r\n            }\r\n        }\r\n        if (cf->isEscaped()) {\r\n            if (value.contains(\" \")) {\r\n                value = \"\\\"\"+value+\"\\\"\";\r\n            }\r\n        }\r\n        if (hasShared && !sharedValue.isEmpty()) {\r\n            value += \" \"+sharedValue;\r\n        }\r\n        env.insert(name,value);\r\n    }\r\n    return env;\r\n}\r\n\r\nQMap<QString,QString> LiteBuild::buildEnvMap() const\r\n{\r\n    return buildEnvMap(m_build,m_buildRootPath);\r\n    /*\r\n    LiteApi::IBuild *build = m_build;\r\n    QString buildFilePath = m_buildFilePath;\r\n    if (!build) {\r\n        LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\r\n        if (editor && !editor->filePath().isEmpty()) {\r\n            build = m_manager->findBuild(editor->mimeType());\r\n            buildFilePath = QFileInfo(editor->filePath()).path();\r\n        }\r\n    }\r\n    return buildEnvMap(build,buildFilePath);\r\n    */\r\n    /*\r\n    QMap<QString,QString> env = liteideEnvMap();\r\n    QMapIterator<QString,QString> i(m_configMap);\r\n    while(i.hasNext()) {\r\n        i.next();\r\n        QString k = i.key();\r\n        QString v = i.value();\r\n        QMapIterator<QString,QString> m(env);\r\n        while(m.hasNext()) {\r\n            m.next();\r\n            v.replace(\"$(\"+m.key()+\")\",m.value());\r\n        }\r\n        env.insert(k,v);\r\n    }\r\n    QMapIterator<QString,QString> c(m_customMap);\r\n    while(c.hasNext()) {\r\n        c.next();\r\n        QString k = c.key();\r\n        QString v = c.value();\r\n        QMapIterator<QString,QString> m(env);\r\n        while(m.hasNext()) {\r\n            m.next();\r\n            v.replace(\"$(\"+m.key()+\")\",m.value());\r\n        }\r\n        env.insert(k,v);\r\n    }    \r\n    QMapIterator<QString,QString> p(m_projectInfo);\r\n    while(p.hasNext()) {\r\n        p.next();\r\n        env.insert(p.key(),p.value());\r\n    }\r\n    QMapIterator<QString,QString> e(m_editorInfo);\r\n    while(e.hasNext()) {\r\n        e.next();\r\n        env.insert(e.key(),e.value());\r\n    }\r\n    QMapIterator<QString,QString> t(m_targetInfo);\r\n    while(t.hasNext()) {\r\n        t.next();\r\n        env.insert(t.key(),t.value());\r\n    }\r\n    return env;\r\n    */\r\n}\r\n\r\nvoid LiteBuild::updateBuildConfigHelp(LiteApi::IBuild *build, const QString &buildRootPath, QStandardItemModel *liteideModel, QStandardItemModel *configModel, QStandardItemModel *customModel, QStandardItemModel *actionModel)\r\n{\r\n    liteideModel->removeRows(0,liteideModel->rowCount());\r\n    QMapIterator<QString,QString> i(this->liteideEnvMap());\r\n    while (i.hasNext()) {\r\n        i.next();\r\n        liteideModel->appendRow(QList<QStandardItem*>()\r\n                                 << new QStandardItem(i.key())\r\n                                 << new QStandardItem(i.value()));\r\n    }\r\n    if (build) {\r\n        configModel->removeRows(0,configModel->rowCount());\r\n        customModel->removeRows(0,customModel->rowCount());\r\n        actionModel->removeRows(0,actionModel->rowCount());\r\n        QString customkey;\r\n        if (!buildRootPath.isEmpty()) {\r\n            customkey = \"litebuild-custom/\"+buildRootPath;\r\n        }\r\n        QString configkey = \"litebuild-config/\"+build->id();\r\n        foreach(LiteApi::BuildCustom *cf, build->customList()) {\r\n            QString name = cf->name();\r\n            QString value = cf->value();\r\n            QString sharedValue = cf->sharedValue();\r\n            bool sharedChecked = cf->hasShared();\r\n            if (!customkey.isEmpty()) {\r\n                value = m_liteApp->settings()->value(customkey+\"#\"+cf->id(),value).toString();\r\n                sharedChecked = m_liteApp->settings()->value(customkey+\"#\"+cf->id()+\"#shared\",true).toBool();\r\n            }\r\n            QStandardItem *nameItem = new QStandardItem(name);\r\n            QStandardItem *valueItem = new QStandardItem(value);\r\n            if (cf->isReadOnly()) {\r\n                valueItem->setEnabled(false);\r\n            }\r\n            QStandardItem *sharedItem = new QStandardItem(sharedValue);\r\n            sharedItem->setEnabled(cf->hasShared());\r\n            if (cf->hasShared()) {\r\n                sharedItem->setCheckable(true);\r\n                sharedItem->setCheckState(sharedChecked ? Qt::Checked : Qt::Unchecked);\r\n            }\r\n            nameItem->setData(cf->id());\r\n            valueItem->setData(cf->value());\r\n            sharedItem->setData(cf->hasShared());\r\n            customModel->appendRow(QList<QStandardItem*>()\r\n                                     << nameItem\r\n                                     << valueItem\r\n                                     << sharedItem );\r\n\r\n        }\r\n        foreach(LiteApi::BuildConfig *cf, build->configList()) {\r\n            QString name = cf->name();\r\n            QString value = cf->value();\r\n            if (!configkey.isEmpty()) {\r\n                value = m_liteApp->settings()->value(configkey+\"#\"+cf->id(),value).toString();\r\n            }\r\n            QStandardItem *item = new QStandardItem(name);\r\n            item->setData(cf->id());\r\n            configModel->appendRow(QList<QStandardItem*>()\r\n                                     << item\r\n                                     << new QStandardItem(value));\r\n        }\r\n        foreach (LiteApi::BuildAction *ba, build->actionList()) {\r\n            QString id = ba->id();\r\n            QString cmd = ba->cmd();\r\n            QString args = ba->args();\r\n            QStandardItem *item = new QStandardItem(id);\r\n            actionModel->appendRow(QList<QStandardItem*>()\r\n                                   << item\r\n                                   << new QStandardItem(cmd)\r\n                                   << new QStandardItem(args));\r\n        }\r\n    }\r\n}\r\n\r\nvoid LiteBuild::updateBuildConfig(IBuild */*build*/)\r\n{\r\n}\r\n\r\nvoid LiteBuild::setCurrentBuild(LiteApi::IBuild *build)\r\n{\r\n    //update buildconfig\r\n    if (build) {\r\n        updateBuildConfig(build);\r\n    }\r\n\r\n    if (m_build == build) {\r\n         return;\r\n    }\r\n\r\n    m_build = build;\r\n    m_buildManager->setCurrentBuild(build);\r\n\r\n    m_outputRegex.clear();\r\n}\r\n/*\r\nBUILD_DIR_PATH\r\nBUILD_DIR_NAME\r\nBUILD_DIR_BASENAME\r\n\r\nEDITOR_FILE_PATH\r\nEDITOR_FILE_NAME\r\nEDITOR_FILE_BASENAME\r\nEDITOR_FILE_SUFFIX\r\n\r\nEDITOR_DIR_PATH\r\nEDITOR_DIR_NAME\r\nEDITOR_DIR_BASENAME\r\n*/\r\nvoid LiteBuild::loadEditorInfo(const QString &filePath)\r\n{\r\n    m_editorInfo.clear();\r\n    if (filePath.isEmpty()) {\r\n        return;\r\n    }\r\n    QFileInfo info(filePath);\r\n    m_editorInfo.insert(\"EDITOR_FILE_PATH\",info.filePath());\r\n    m_editorInfo.insert(\"EDITOR_FILE_NAME\",info.fileName());\r\n    m_editorInfo.insert(\"EDITOR_FILE_BASENAME\",info.baseName());\r\n    m_editorInfo.insert(\"EDITOR_FILE_SUFFIX\",info.suffix());\r\n    m_editorInfo.insert(\"EDITOR_DIR_PATH\",info.path());\r\n    m_editorInfo.insert(\"EDITOR_DIR_NAME\",QFileInfo(info.path()).fileName());\r\n    m_editorInfo.insert(\"EDITOR_DIR_BASENAME\",QFileInfo(info.path()).baseName());\r\n}\r\n\r\nvoid LiteBuild::loadBuildPath(const QString &buildPath, const QString &buildName, const QString &buildInfo)\r\n{\r\n    m_buildInfo.clear();\r\n    m_buildRootPath = buildPath;\r\n    m_buildRootName = buildName;\r\n    if (buildName.isEmpty()) {\r\n        m_checkBoxLockBuild->setEnabled(false);\r\n        m_checkBoxLockBuild->setText(\"\");\r\n        m_checkBoxLockBuild->setToolTip(\"\");\r\n    } else {\r\n        m_checkBoxLockBuild->setEnabled(true);\r\n        m_checkBoxLockBuild->setText(buildName);\r\n        m_checkBoxLockBuild->setToolTip(QString(\"%1 : %2\").arg(tr(\"Lock Build\")).arg(buildInfo));\r\n    }\r\n    emit buildPathChanged(buildPath);\r\n    if (buildPath.isEmpty()) {\r\n        return;\r\n    }\r\n    QFileInfo info(buildPath);\r\n    m_buildInfo.insert(\"BUILD_DIR_PATH\",info.filePath());\r\n    m_buildInfo.insert(\"BUILD_DIR_NAME\",info.fileName());\r\n    m_buildInfo.insert(\"BUILD_DIR_BASENAME\",info.baseName());\r\n}\r\n\r\nvoid LiteBuild::loadTargetInfo(LiteApi::IBuild *build)\r\n{\r\n    m_targetInfo.clear();\r\n    if (!build) {\r\n        return;\r\n    }\r\n    QList<BuildTarget*> lists = build->targetList();\r\n    if (!lists.isEmpty()) {\r\n        BuildTarget *target = lists.first();\r\n        QString cmd = this->envValue(build,target->cmd());\r\n        QString args = this->envValue(build,target->args());\r\n        QString work = this->envValue(build,target->work());\r\n        m_targetInfo.insert(\"TARGET_CMD\",cmd);\r\n        m_targetInfo.insert(\"TARGET_ARGS\",args);\r\n        m_targetInfo.insert(\"TARGET_WORK\",work);\r\n    }\r\n}\r\n\r\nLiteApi::IBuild *LiteBuild::findProjectBuildByEditor(IEditor *editor)\r\n{\r\n    m_buildRootPath.clear();\r\n    m_projectInfo.clear();\r\n    m_targetInfo.clear();\r\n\r\n    if (!editor) {\r\n        return 0;\r\n    }\r\n    QString filePath = editor->filePath();\r\n    if (filePath.isEmpty()) {\r\n        return 0;\r\n    }\r\n    QString workDir = QFileInfo(filePath).path();\r\n    LiteApi::IBuild *build = m_buildManager->findBuild(editor->mimeType());\r\n    LiteApi::IBuild *projectBuild = 0;\r\n    QString projectPath;\r\n    if (build != 0) {\r\n        foreach (LiteApi::BuildLookup *lookup,build->lookupList()) {\r\n            QDir dir(workDir);\r\n            for (int i = 0; i <= lookup->top(); i++) {\r\n                QFileInfoList infos = dir.entryInfoList(QStringList() << lookup->file(),QDir::Files);\r\n                if (infos.size() >= 1) {\r\n                    projectBuild = m_buildManager->findBuild(lookup->mimeType());\r\n                    if (projectBuild != 0) {\r\n                        projectPath = infos.at(0).filePath();\r\n                        m_buildRootPath = projectPath;\r\n                        break;\r\n                    }\r\n                }\r\n                dir.cdUp();\r\n            }\r\n        }\r\n    }\r\n    if (!projectBuild) {\r\n        return 0;\r\n    }\r\n    loadProjectInfo(projectPath);\r\n    QMap<QString,QString> targetInfo;\r\n    if (m_liteApp->fileManager()->findProjectTargetInfo(projectPath,targetInfo)) {\r\n        m_targetInfo = targetInfo;\r\n    }\r\n    return projectBuild;\r\n}\r\n\r\nvoid LiteBuild::setDynamicBuild()\r\n{\r\n    m_bDynamicBuild = true;\r\n}\r\n\r\nvoid LiteBuild::loadBuildType(const QString &mimeType)\r\n{\r\n    LiteApi::IBuild *build = m_buildManager->findBuild(mimeType);\r\n    updateBuildConfig(build);\r\n    if (build == m_build) {\r\n        return;\r\n    }\r\n    m_build = build;\r\n    m_buildMimeType = mimeType;\r\n\r\n    m_buildManager->setCurrentBuild(m_build);\r\n    m_outputRegex.clear();\r\n\r\n    QMenu *menu = 0;\r\n    BuildBarInfo *info = m_buildBarInfoMap.value(mimeType);\r\n    if (info) {\r\n        menu = info->buildMenu;\r\n    }\r\n    if (menu) {\r\n#if defined(Q_OS_OSX)\r\n        // dirty trick to show the correct build menu at the first time on Mac OS X\r\n        m_buildMenu->setEnabled(false);\r\n#endif\r\n        m_buildMenu->menuAction()->setMenu(menu);\r\n    } else {\r\n        m_buildMenu->menuAction()->setMenu(m_nullMenu);\r\n    }\r\n    m_buildMenu->setEnabled(menu != 0);\r\n    m_checkBoxLockBuild->setEnabled(m_build != 0);\r\n\r\n    QMapIterator<QString,BuildBarInfo*> i(m_buildBarInfoMap);\r\n    while(i.hasNext()) {\r\n        i.next();\r\n        bool visible = (i.key() == mimeType);\r\n        foreach (QAction *act, i.value()->toolbarActions) {\r\n            act->setVisible(visible);\r\n        }\r\n    }\r\n}\r\n\r\nvoid LiteBuild::editorCreated(LiteApi::IEditor *editor)\r\n{\r\n    if (!editor) {\r\n        return;\r\n    }\r\n    IBuild *build = m_buildManager->findBuild(editor->mimeType());\r\n    if (!build) {\r\n        return;\r\n    }\r\n    if (!m_buildBarInfoMap.contains(build->mimeType())) {\r\n        BuildBarInfo *info = new BuildBarInfo;\r\n        QList<QAction*> actions = build->actions();\r\n        QList<QAction*> acts;\r\n        foreach (QAction *act, actions) {\r\n            QMenu *subMenu = act->menu();\r\n            if (subMenu) {\r\n                BuildAction *ba = build->findAction(subMenu->menuAction()->objectName());\r\n                if (ba) {\r\n                    QToolButton *btn = new QToolButton(m_buildToolBar);\r\n                    btn->setIcon(subMenu->menuAction()->icon());\r\n                    btn->setText(subMenu->title());\r\n                    btn->setMenu(subMenu);\r\n                    if (ba->isFolder()) {\r\n                        btn->setPopupMode(QToolButton::InstantPopup);\r\n                    } else {\r\n                        btn->setPopupMode(QToolButton::MenuButtonPopup);\r\n                        btn->setDefaultAction(subMenu->menuAction());\r\n                    }\r\n                    QAction *cb = m_buildToolBar->addWidget(btn);\r\n                    acts.push_back(cb);\r\n                }\r\n            } else {\r\n                QToolButton *btn = new QToolButton(m_buildToolBar);\r\n                btn->setDefaultAction(act);\r\n                QAction *cb = m_buildToolBar->addWidget(btn);\r\n                acts.push_back(cb);\r\n            }\r\n        }\r\n        QMenu *menu = new QMenu;\r\n        menu->addAction(m_configAct);\r\n        menu->addSeparator();\r\n        menu->addAction(m_stopAct);\r\n        menu->addAction(m_clearAct);\r\n        menu->addSeparator();\r\n\r\n        foreach (QAction *act, actions) {\r\n            QMenu *subMenu = act->menu();\r\n            if (subMenu) {\r\n                if (!menu->isEmpty())\r\n                    menu->addSeparator();\r\n                menu->addActions(subMenu->actions());\r\n            } else {\r\n                menu->addAction(act);\r\n            }\r\n        }\r\n        info->build = build;\r\n        info->toolbarActions = acts;\r\n        info->buildMenu = menu;\r\n        foreach (QAction *act, acts) {\r\n            act->setVisible(false);\r\n        }\r\n        m_buildBarInfoMap.insert(build->mimeType(),info);\r\n    }\r\n}\r\n\r\nvoid LiteBuild::lockBuildRootByMimeType(const QString &path, const QString &mimeType)\r\n{\r\n    LiteApi::IBuild *build = m_buildManager->findBuild(mimeType);\r\n    if (!build) {\r\n        return;\r\n    }\r\n    if (build->lock() != \"dir\") {\r\n        return;\r\n    }\r\n    m_bLockBuildRoot = true;\r\n    m_checkBoxLockBuild->setChecked(true);\r\n    QString buildPath;\r\n    QString buildName;\r\n    QString buildInfo;\r\n    QFileInfo info(path);\r\n    buildPath = info.filePath();\r\n    buildName = info.fileName();\r\n    buildInfo = QDir::toNativeSeparators(buildPath);\r\n    loadBuildPath(buildPath,buildName,buildInfo);\r\n    loadBuildType(mimeType);\r\n}\r\n\r\nvoid LiteBuild::currentEditorChanged(LiteApi::IEditor *editor)\r\n{\r\n    //check lock build file\r\n    if (m_bLockBuildRoot) {\r\n        if (m_build && m_build->lock() == \"file\") {\r\n            return;\r\n        }\r\n    }\r\n    if (editor) {\r\n        loadEditorInfo(editor->filePath());\r\n    } else {\r\n        loadEditorInfo(\"\");\r\n    }\r\n    //check lock build dir\r\n    if (m_bLockBuildRoot) {\r\n        if (m_build && m_build->lock() == \"dir\") {\r\n            return;\r\n        }\r\n    }\r\n    QString mimeType;\r\n    if (editor) {\r\n        mimeType = editor->mimeType();\r\n    }\r\n    QString buildPath;\r\n    QString buildName;\r\n    QString buildInfo;\r\n    if (editor && !editor->filePath().isEmpty()) {\r\n        LiteApi::IBuild *build = m_buildManager->findBuild(mimeType);\r\n        if (build) {\r\n            QFileInfo info(editor->filePath());\r\n            if (build->lock() == \"dir\") {\r\n                buildPath = info.path();\r\n                buildName = QFileInfo(info.path()).fileName();\r\n                buildInfo = QDir::toNativeSeparators(buildPath);\r\n            } else if (build->lock() == \"file\") {\r\n                buildName = info.fileName();\r\n                buildPath = info.path();\r\n                buildInfo = QDir::toNativeSeparators(info.filePath());\r\n            }\r\n        } else {\r\n            QFileInfo info(editor->filePath());\r\n            buildPath = info.path();\r\n        }\r\n    }\r\n    loadBuildPath(buildPath,buildName,buildInfo);\r\n    loadBuildType(mimeType);\r\n}\r\n\r\nvoid LiteBuild::extOutput(const QByteArray &data, bool bError)\r\n{\r\n    if (data.isEmpty()) {\r\n        return;\r\n    }\r\n    //m_liteApp->outputManager()->setCurrentOutput(m_output);\r\n    if (m_bFirstRunOutput && m_process->userData(ID_ACTIVATEOUTPUT_CHECK).toBool()) {\r\n        m_outputAct->setChecked(true);\r\n    }\r\n    m_bFirstRunOutput = false;\r\n\r\n    QString codecName = m_process->userData(2).toString();\r\n    QTextCodec *codec = QTextCodec::codecForLocale();\r\n    if (!codecName.isEmpty()) {\r\n        codec = QTextCodec::codecForName(codecName.toLatin1());\r\n    }\r\n    QString msg = codec->toUnicode(data);\r\n    m_output->append(msg);\r\n\r\n    if (!m_process->userData(ID_NAVIGATE).toBool()) {\r\n        return;\r\n    }\r\n    if (bError || m_process->userData(ID_TAKEALL).toBool() ) {\r\n        QString regexp = m_process->userData(ID_REGEXP).toString();\r\n        if (regexp.isEmpty()) {\r\n            return;\r\n        }\r\n        QRegExp re(regexp);\r\n        foreach (QString info, msg.split(\"\\n\",qtSkipEmptyParts)) {\r\n            if (re.indexIn(info) >= 0 && re.captureCount() >= 2) {\r\n                QString fileName = re.cap(1);\r\n                QString fileLine = re.cap(2);\r\n\r\n                bool ok = false;\r\n                int line = fileLine.toInt(&ok);\r\n                if (ok) {\r\n                    QDir dir(m_workDir);\r\n                    QString filePath = dir.filePath(fileName);\r\n                    if (QFile::exists(filePath)) {\r\n                        fileName = filePath;\r\n                    } else {\r\n                        foreach(QFileInfo info,dir.entryInfoList(QDir::AllDirs | QDir::NoDotAndDotDot)) {\r\n                            QString filePath = info.absoluteDir().filePath(fileName);\r\n                            if (QFile::exists(filePath)) {\r\n                                fileName = filePath;\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    LiteApi::IEditor *editor = m_liteApp->editorManager()->findEditor(fileName,true);\r\n                    if (editor) {\r\n                        LiteApi::ILiteEditor *liteEditor = LiteApi::getLiteEditor(editor);\r\n                        if (liteEditor) {\r\n                            QString str = m_process->userData(ID_ACTIONID).toString();\r\n                            if (bError) {\r\n                                str += \" Error\";\r\n                                liteEditor->setNavigateHead(LiteApi::EditorNavigateError,str);\r\n                                liteEditor->insertNavigateMark(line-1,LiteApi::EditorNavigateError,info, LITEBUILD_TAG);\r\n                            } else {\r\n                                str += \" Export\";\r\n                                liteEditor->setNavigateHead(LiteApi::EditorNavigateWarning,str);\r\n                                liteEditor->insertNavigateMark(line-1,LiteApi::EditorNavigateWarning,info, LITEBUILD_TAG);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n    }\r\n}\r\n\r\nvoid LiteBuild::extFinish(bool error,int exitCode, QString msg)\r\n{\r\n    m_output->setReadOnly(true);\r\n\r\n    if (m_process->userData(ID_ACTIVATEOUTPUT_CHECK).toBool()) {\r\n        m_outputAct->setChecked(true);\r\n    }\r\n\r\n\r\n    bool isCommand = m_process->userData(ID_INPUTTYPE).toInt() == INPUT_COMMAND;\r\n\r\n    if (!isCommand && exitCode != 0) {\r\n        error = true;\r\n    }\r\n\r\n    if (error) {\r\n        m_output->appendTag(tr(\"Error: %1.\").arg(msg)+\"\\n\",true);\r\n    } else {\r\n        if (isCommand) {\r\n            m_output->appendTag(tr(\"Command exited with code %1.\").arg(exitCode)+\"\\n\");\r\n        } else {\r\n            m_output->appendTag(tr(\"Success: %1.\").arg(msg)+\"\\n\");\r\n        }\r\n    }\r\n\r\n    if (!error) {\r\n        QStringList task = m_process->userData(ID_TASKLIST).toStringList();\r\n        if (!task.isEmpty()) {\r\n            QString id = task.takeFirst();\r\n            QString mime = m_process->userData(ID_MIMETYPE).toString();\r\n            m_process->setUserData(ID_TASKLIST,task);\r\n            execAction(mime,id);\r\n        }\r\n    } else {\r\n        m_process->setUserData(ID_TASKLIST,QStringList());\r\n    }\r\n}\r\n\r\nvoid LiteBuild::debugEnvOutput(const QByteArray &output, bool bError)\r\n{\r\n    if (bError) {\r\n        return;\r\n    }\r\n    QString flags = QString::fromUtf8(output).trimmed();\r\n    m_liteAppInfo.insert(\"LITEIDE_DEBUG_GCFLAGS\",flags);\r\n}\r\n\r\nvoid LiteBuild::stopAction()\r\n{\r\n    if (!m_process->isStop()) {\r\n#ifdef Q_OS_WIN\r\n        m_process->stop(100);\r\n#else\r\n        SendProcessCtrlC(m_process);\r\n        if (!m_process->waitForFinished(200)) {\r\n            m_process->stop(100);\r\n        }\r\n#endif\r\n    }\r\n}\r\n\r\nvoid LiteBuild::execCommand(const QString &cmd1, const QString &args, const QString &workDir, bool updateExistsTextColor, bool activateOutputCheck, bool navigate, bool command)\r\n{\r\n    if (updateExistsTextColor) {\r\n        m_output->updateExistsTextColor();\r\n    }\r\n    if (activateOutputCheck) {\r\n        m_outputAct->setChecked(activateOutputCheck);\r\n    }\r\n    if (!m_process->isStop()) {\r\n        m_output->append(tr(\"A process is currently running.  Stop the current action first.\")+\"\\n\",Qt::red);\r\n        return;\r\n    }\r\n    //QProcessEnvironment sysenv = LiteApi::getGoEnvironment(m_liteApp);\r\n    QProcessEnvironment sysenv = LiteApi::getCustomGoEnvironment(m_liteApp,workDir);\r\n    QString cmd = cmd1.trimmed();\r\n    m_output->setReadOnly(false);\r\n    m_process->setEnvironment(sysenv.toStringList());\r\n    m_process->setUserData(ID_CMD,cmd);\r\n    m_process->setUserData(ID_ARGS,args);\r\n    m_process->setUserData(ID_CODEC,\"utf-8\");\r\n    m_process->setUserData(ID_INPUTTYPE,command ? INPUT_COMMAND: INPUT_ACTION);\r\n    m_process->setUserData(ID_NAVIGATE,navigate);\r\n    m_process->setUserData(ID_ACTIVATEOUTPUT_CHECK,activateOutputCheck);\r\n    QString shell = FileUtil::lookPathInDir(cmd,workDir);\r\n    if (shell.isEmpty()) {\r\n        shell = FileUtil::lookPath(cmd,sysenv,false);\r\n    }\r\n    if (!shell.isEmpty()) {\r\n        cmd = shell;\r\n    }\r\n    m_workDir = workDir;\r\n    m_process->setWorkingDirectory(workDir);\r\n    m_output->appendTag(QString(\"%1 %2 [%3]\\n\")\r\n                         .arg(cmd).arg(args).arg(workDir));\r\n    m_bFirstRunOutput = true;\r\n    m_process->startEx(cmd,args);\r\n}\r\n\r\nvoid LiteBuild::execBuildAction(LiteApi::IBuild* build,LiteApi::BuildAction* ba)\r\n{  \r\n    if (m_bOutputAutoClear) {\r\n        m_output->clear();\r\n    } else {\r\n        m_output->updateExistsTextColor(true);\r\n    }\r\n    m_outputAct->setChecked(true);\r\n    if (!m_process->isStop()) {\r\n        if (ba->isKillOld()) {\r\n            m_output->append(tr(\"Killing current process...\")+\"\\n\");\r\n#ifdef Q_OS_WIN\r\n            m_process->stop(100);\r\n#else\r\n            SendProcessCtrlC(m_process);\r\n            if (!m_process->waitForFinished(200)) {\r\n                m_process->stop(100);\r\n            }\r\n#endif\r\n            if (!m_process->isStop()  && !m_process->waitForFinished(2000)) {\r\n                m_output->append(tr(\"Failed to terminate the existing process!\")+\"\\n\",Qt::red);\r\n                return;\r\n            }\r\n        } else {\r\n            m_output->append(tr(\"A process is currently running.  Stop the current action first.\")+\"\\n\",Qt::red);\r\n            return;\r\n        }\r\n    }\r\n\r\n    QString mime = build->mimeType();\r\n    QString id = ba->id();\r\n    QString editor;\r\n    LiteApi::IEditor *ed = m_liteApp->editorManager()->currentEditor();\r\n    if (ed) {\r\n        editor = ed->filePath();\r\n    }\r\n\r\n    m_output->updateExistsTextColor();\r\n    m_process->setUserData(ID_MIMETYPE,mime);\r\n    m_process->setUserData(ID_EDITOR,editor);\r\n    m_process->setUserData(ID_ACTIVATEOUTPUT_CHECK,true);\r\n    if (ba->task().isEmpty()) {\r\n        execAction(mime,id);\r\n    } else {\r\n        QStringList task = ba->task();\r\n        QString id = task.takeFirst();\r\n        m_process->setUserData(ID_TASKLIST,task);\r\n        execAction(mime,id);\r\n    }\r\n}\r\n\r\nvoid LiteBuild::buildTask(IBuild *build, bool killOld, const QStringList &taskList)\r\n{\r\n    if (m_bOutputAutoClear) {\r\n        m_output->clear();\r\n    } else {\r\n        m_output->updateExistsTextColor(true);\r\n    }\r\n    m_outputAct->setChecked(true);\r\n\r\n    if (!m_process->isStop()) {\r\n        if (!killOld) {\r\n            return;\r\n        }\r\n        m_process->stopAndWait(100,2000);\r\n    }\r\n\r\n    QString mime = build->mimeType();\r\n    QString editor;\r\n    LiteApi::IEditor *ed = m_liteApp->editorManager()->currentEditor();\r\n    if (ed) {\r\n        editor = ed->filePath();\r\n    }\r\n\r\n    m_output->updateExistsTextColor();\r\n    m_process->setUserData(ID_MIMETYPE,mime);\r\n    m_process->setUserData(ID_EDITOR,editor);\r\n    m_process->setUserData(ID_ACTIVATEOUTPUT_CHECK,true);\r\n\r\n    QStringList task;\r\n    foreach (QString id, taskList) {\r\n        LiteApi::BuildAction *ba = build->findAction(id);\r\n        if (!ba) {\r\n            continue;\r\n        }\r\n        if (!ba->task().isEmpty()) {\r\n            task.append(ba->task());\r\n        } else if (!ba->cmd().isEmpty()) {\r\n            task.push_back(ba->id());\r\n        }\r\n    }\r\n    QString id = task.takeFirst();\r\n    m_process->setUserData(ID_TASKLIST,task);\r\n    execAction(mime,id);\r\n}\r\n\r\nvoid LiteBuild::execAction(const QString &mime, const QString &id)\r\n{\r\n    if (!m_process->isStop()) {\r\n        return;\r\n    }\r\n\r\n    LiteApi::IBuild *build = m_buildManager->findBuild(mime);\r\n    if (!build) {\r\n        return;\r\n    }\r\n\r\n    LiteApi::BuildAction *ba = build->findAction(id);\r\n    if (!ba) {\r\n        return;\r\n    }\r\n\r\n    QString codec = ba->codec();\r\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\r\n    if (ba->save() == \"project\") {\r\n        if (editor && editor->isModified()) {\r\n            m_liteApp->editorManager()->saveEditor();\r\n        }\r\n        m_liteApp->projectManager()->saveProject();\r\n    } else if(ba->save() == \"editor\") {\r\n        if (editor && editor->isModified()) {\r\n            m_liteApp->editorManager()->saveEditor();\r\n        }\r\n    } else if (ba->save() == \"all\") {\r\n        m_liteApp->editorManager()->saveAllEditors();\r\n    }\r\n\r\n    QString editorPath = m_process->userData(ID_EDITOR).toString();\r\n    QString buildFilePath;\r\n    if (!editorPath.isEmpty() && !m_bLockBuildRoot) {\r\n        buildFilePath = QFileInfo(editorPath).path();\r\n    } else {\r\n        buildFilePath = m_buildRootPath;\r\n    }\r\n\r\n    QMap<QString,QString> env = buildEnvMap(build,buildFilePath);\r\n\r\n    //QProcessEnvironment sysenv = LiteApi::getGoEnvironment(m_liteApp);\r\n    QProcessEnvironment sysenv = LiteApi::getCustomGoEnvironment(m_liteApp,buildFilePath);\r\n\r\n    QString cmd = this->envToValue(ba->cmd(),env,sysenv);\r\n    QString args = this->envToValue(ba->args(),env,sysenv);\r\n\r\n    m_workDir = this->envToValue(build->work(),env,sysenv);\r\n    QString work = ba->work();\r\n    if (!work.isEmpty()) {\r\n        m_workDir = this->envToValue(work,env,sysenv);\r\n    }\r\n\r\n//    if (!QFileInfo(cmd).exists()) {\r\n//        QString findCmd = FileUtil::lookPathInDir(cmd,m_workDir);\r\n//        if (!findCmd.isEmpty()) {\r\n//            cmd = findCmd;\r\n//        }\r\n//    }\r\n    QString shell;\r\n    if (ba->cmd() == \"$(GO)\") {\r\n        shell = FileUtil::lookupGoBin(cmd,m_liteApp,sysenv,false);\r\n    } else {\r\n        if (cmd.startsWith(\"\\\"\") && cmd.endsWith(\"\\\"\")) {\r\n            cmd = cmd.mid(1,cmd.length()-2).trimmed();\r\n        }\r\n        shell = FileUtil::lookPathInDir(cmd,m_workDir);\r\n    }\r\n    if (shell.isEmpty()) {\r\n        shell = FileUtil::lookPath(cmd,sysenv,false);\r\n    }\r\n    if (!shell.isEmpty()) {\r\n        cmd = shell;\r\n    }\r\n\r\n//    if (cmd.indexOf(\"$(\") >= 0 || args.indexOf(\"$(\") >= 0 || m_workDir.isEmpty()) {\r\n//        m_output->appendTag(tr(\"> Could not parse action '%1'\").arg(ba->id())+\"\\n\");\r\n//        m_process->setUserData(ID_TASKLIST,QStringList());\r\n//        return;\r\n//    }\r\n\r\n\r\n    if (!ba->regex().isEmpty()) {\r\n        m_outputRegex = this->envToValue(ba->regex(),env,sysenv);\r\n        m_process->setUserData(ID_REGEXP,m_outputRegex);\r\n    } else {\r\n        m_process->setUserData(ID_REGEXP,\"\");\r\n    }\r\n\r\n    if (ba->isOutput() && ba->isReadline()) {\r\n        m_output->setReadOnly(false);\r\n    } else {\r\n        m_output->setReadOnly(true);\r\n    }\r\n\r\n//    if (ba->func() == \"debug\") {\r\n//        LiteApi::ILiteDebug *debug = LiteApi::getLiteDebug(m_liteApp);\r\n//        if (debug) {\r\n//            debug->startDebug(cmd,args,work);\r\n//        }\r\n//        return;\r\n//    }\r\n\r\n    m_process->setEnvironment(sysenv.toStringList());\r\n    m_process->setUserData(ID_NAVIGATE,ba->isNavigate());\r\n    m_process->setUserData(ID_ACTIONID,ba->id());\r\n    m_process->setUserData(ID_TAKEALL,ba->isTakeall());\r\n\r\n    if (ba->isNavigate()) {\r\n        foreach(LiteApi::IEditor *editor, m_liteApp->editorManager()->editorList()) {\r\n            LiteApi::ILiteEditor *liteEditor = LiteApi::getLiteEditor(editor);\r\n            if (liteEditor) {\r\n                liteEditor->clearAllNavigateMark(LiteApi::EditorNavigateBad);\r\n                liteEditor->setNavigateHead(LiteApi::EditorNavigateNormal,\"Normal\");\r\n            }\r\n        }\r\n    }\r\n\r\n    args = args.trimmed();\r\n\r\n    //run debug cmd\r\n    if (ba->isDebug()) {\r\n        LiteApi::ILiteDebug *debug = LiteApi::getLiteDebug(m_liteApp);\r\n        if (debug) {\r\n            debug->startDebug(cmd,args,m_workDir);\r\n        }\r\n        return;\r\n    }\r\n\r\n\r\n    if (!ba->isOutput()) {\r\n        bool b = QProcess::startDetached(cmd,args.split(\" \"),m_workDir);\r\n        m_output->appendTag(QString(\"%1 %2 [%3]\\n\")\r\n                             .arg(QDir::cleanPath(cmd)).arg(args).arg(m_workDir));\r\n        m_output->appendTag(b?tr(\"Started process successfully\"):tr(\"Failed to start process\")+\"\\n\");\r\n    } else {\r\n        m_process->setUserData(ID_CMD,cmd);\r\n        m_process->setUserData(ID_ARGS,args);\r\n        m_process->setUserData(ID_CODEC,codec);\r\n        m_process->setUserData(ID_INPUTTYPE,INPUT_ACTION);\r\n\r\n        m_process->setWorkingDirectory(m_workDir);        \r\n        m_output->appendTag(QString(\"%1 %2 [%3]\\n\")\r\n                            .arg(QDir::cleanPath(cmd))\r\n                            .arg(args)\r\n                            .arg(m_workDir));\r\n        m_bFirstRunOutput = true;\r\n        m_process->startEx(cmd,args);\r\n    }\r\n}\r\n\r\nvoid LiteBuild::enterTextBuildOutput(QString text)\r\n{\r\n    if (m_process->isStop()) {\r\n        return;\r\n    }\r\n    QTextCodec *codec = QTextCodec::codecForLocale();\r\n    QString codecName = m_process->userData(2).toString();\r\n    if (!codecName.isEmpty()) {\r\n        codec = QTextCodec::codecForName(codecName.toLatin1());\r\n    }\r\n    if (codec) {\r\n        m_process->write(codec->fromUnicode(text));\r\n    } else {\r\n        m_process->write(text.toLatin1());\r\n    }\r\n}\r\n\r\nvoid LiteBuild::keyUpdownBuildOutput(int key)\r\n{\r\n    if (m_process->isStop()) {\r\n        return;\r\n    }\r\n    if (key == Qt::Key_Up) {\r\n        char buf[] = {0x1b,0x5b,0x41};\r\n        m_process->write(buf,3);\r\n    } else if (key == Qt::Key_Down) {\r\n        char buf[] = {0x1b,0x5b,0x42};\r\n        m_process->write(buf,3);\r\n    }\r\n}\r\n\r\n\r\nvoid LiteBuild::dbclickBuildOutput(const QTextCursor &cur)\r\n{\r\n    if (m_outputRegex.isEmpty()) {\r\n        //m_outputRegex = \"([\\\\w\\\\d_\\\\\\\\/\\\\.]+):(\\\\d+):\";\r\n        m_outputRegex = \"(\\\\w?:?[\\\\w\\\\d_@\\\\-\\\\\\\\/\\\\.]+):(\\\\d+):\";\r\n    }\r\n    QRegExp rep(m_outputRegex);//\"([\\\\w\\\\d:_\\\\\\\\/\\\\.]+):(\\\\d+)\");\r\n\r\n    int index = rep.indexIn(cur.block().text());\r\n    if (index < 0)\r\n        return;\r\n    QStringList capList = rep.capturedTexts();\r\n\r\n    if (capList.count() < 3)\r\n        return;\r\n    QString fileName = capList[1];\r\n    QString fileLine = capList[2];\r\n\r\n    bool ok = false;\r\n    int line = fileLine.toInt(&ok);\r\n    if (!ok)\r\n        return;\r\n\r\n    QDir dir(m_workDir);\r\n    QString filePath = dir.filePath(fileName);\r\n    if (QFile::exists(filePath)) {\r\n        fileName = filePath;\r\n    } else {\r\n        foreach(QFileInfo info,dir.entryInfoList(QDir::AllDirs | QDir::NoDotAndDotDot)) {\r\n            QString filePath = info.absoluteDir().filePath(fileName);\r\n            if (QFile::exists(filePath)) {\r\n                fileName = filePath;\r\n                break;\r\n            }\r\n        }\r\n    }\r\n\r\n    if (LiteApi::gotoLine(m_liteApp,fileName,line-1,0,true,true)) {\r\n        QTextCursor lineCur = cur;\r\n        lineCur.select(QTextCursor::LineUnderCursor);\r\n        m_output->setTextCursor(lineCur);\r\n    }\r\n//    return;\r\n//    LiteApi::IEditor *editor = m_liteApp->fileManager()->openEditor(fileName);\r\n//    if (editor) {\r\n//        QTextCursor lineCur = cur;\r\n//        lineCur.select(QTextCursor::LineUnderCursor);\r\n//        m_output->setTextCursor(lineCur);\r\n//        editor->widget()->setFocus();\r\n//        LiteApi::ITextEditor *textEditor = LiteApi::findExtensionObject<LiteApi::ITextEditor*>(editor,\"LiteApi.ITextEditor\");\r\n//        if (textEditor) {\r\n//            textEditor->gotoLine(line-1,0,true);\r\n//        }\r\n//    }\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/litebuild.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: litebuild.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef LITEBUILD_H\r\n#define LITEBUILD_H\r\n\r\n#include \"liteapi/liteapi.h\"\r\n#include \"liteenvapi/liteenvapi.h\"\r\n#include \"litebuildapi/litebuildapi.h\"\r\n#include <QTextCursor>\r\n\r\n#define LITEBUILD_TAG \"lightbuild/navtag\"\r\n\r\nclass BuildManager;\r\nclass QComboBox;\r\nclass ProcessEx;\r\nclass TextOutput;\r\nclass QLabel;\r\nclass QCheckBox;\r\nclass QStandardItemModel;\r\n\r\nstruct BuildBarInfo;\r\nclass LiteBuild : public LiteApi::ILiteBuild\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    explicit LiteBuild(LiteApi::IApplication *app, QObject *parent = 0);\r\n    virtual ~LiteBuild();\r\npublic:\r\n    virtual QString buildTag() const;\r\n    virtual QMap<QString,QString> buildEnvMap() const;\r\n    virtual QMap<QString,QString> liteideEnvMap() const;\r\n    virtual LiteApi::TargetInfo getTargetInfo();\r\n    virtual QString envValue(LiteApi::IBuild *build, const QString &value);\r\n    virtual QString buildPathEnvValue(LiteApi::IBuild *build, const QString &buildFilePath, const QString &value);\r\n    virtual LiteApi::IBuildManager *buildManager() const;\r\n    virtual void appendOutput(const QString &str, const QBrush &brush, bool active, bool updateExistsTextColor = true);\r\n    virtual void execCommand(const QString &cmd, const QString &args, const QString &workDir,bool updateExistsTextColor = true, bool activateOutputCheck = true, bool navigate = true, bool command = true);\r\n    virtual bool execGoCommand(const QStringList &args, const QString &workDir, bool waitFinish);\r\n    QMap<QString,QString> buildEnvMap(LiteApi::IBuild *build, const QString &buildTag) const;\r\npublic:\r\n    QString envToValue(const QString &value,QMap<QString,QString> &liteEnv,const QProcessEnvironment &env);\r\n    void setCurrentBuild(LiteApi::IBuild *build);\r\n    void updateBuildConfig(LiteApi::IBuild *);\r\n    void updateBuildConfigHelp(LiteApi::IBuild *build, const QString &buildRootPath, QStandardItemModel *liteideModel, QStandardItemModel *configModel, QStandardItemModel *customModel, QStandardItemModel *actionModel);\r\n    void loadProjectInfo(const QString &filePath);\r\n    void loadEditorInfo(const QString &filePath);\r\n    void loadTargetInfo(LiteApi::IBuild *build);\r\n    LiteApi::IBuild *findProjectBuildByEditor(LiteApi::IEditor *editor);\r\n    LiteApi::IBuild *findProjectBuild(LiteApi::IProject *project);\r\n    void setDynamicBuild();\r\n    void loadBuildPath(const QString &buildPath, const QString &buildName, const QString &buildInfo);\r\n    void loadBuildType(const QString &mimeType);\r\n    bool isLockBuildRoot() const;\r\n    QString currentBuildPath() const;\r\n    void lockBuildRootByMimeType(const QString &path, const QString &mimeType);\r\nsignals:\r\n    void buildPathChanged(const QString &buildPath);\r\npublic slots:\r\n    void appLoaded();\r\n    void debugBefore();\r\n    void currentEnvChanged(LiteApi::IEnv*);\r\n    void currentProjectChanged(LiteApi::IProject*);\r\n    void reloadProject();\r\n    void editorCreated(LiteApi::IEditor *editor);\r\n    void currentEditorChanged(LiteApi::IEditor*);\r\n    void execBuildAction(LiteApi::IBuild*,LiteApi::BuildAction*);\r\n    void buildTask(LiteApi::IBuild *build, bool killOld, const QStringList &taskList);\r\n    void execAction(const QString &mime,const QString &id);\r\n    void extOutput(const QByteArray &output,bool bError);\r\n    void extFinish(bool error,int exitCode, QString msg);\r\n    void debugEnvOutput(const QByteArray &output,bool bError);\r\n    void stopAction();\r\n    void dbclickBuildOutput(const QTextCursor &cur);\r\n    void enterTextBuildOutput(QString);\r\n    void keyUpdownBuildOutput(int key);\r\n    void config();\r\n    void aboutToShowFolderContextMenu(QMenu *menu, LiteApi::FILESYSTEM_CONTEXT_FLAG flag, const QFileInfo &info, const QString &context);\r\n    void fmctxExecuteFile();\r\n    void fmctxDebugFile();\r\n    void fmctxGoLockBuild();\r\n    void fmctxGoBuildConfigure();\r\n    void fmctxGoTool();\r\n    void fmctxGofmt();\r\n    void fmctxGodoc();\r\n    void applyOption(QString);\r\n    void lockBuildRoot(bool b);\r\n    void setOutputLineWrap(bool b);\r\n    void setOutputAutoClear(bool b);\r\n    void setOutputAutoPosCursor(bool b);\r\nprotected:\r\n    QMenu *m_nullMenu;\r\n    LiteApi::IApplication   *m_liteApp;\r\n    BuildManager    *m_buildManager;\r\n    LiteApi::IBuild *m_build;\r\n    LiteApi::IEnvManager *m_envManager;\r\n    QToolBar    *m_buildToolBar;\r\n    QMenu       *m_buildMenu;\r\n    QMap<QString,BuildBarInfo*> m_buildBarInfoMap;\r\n    QString m_workDir;\r\n    ProcessEx *m_process;\r\n    ProcessEx *m_debugEnvProcess;\r\n    TextOutput *m_output;\r\n    QMenu      *m_outputMenu;\r\n    QAction    *m_outputLineWrapAct;\r\n    QAction    *m_outputAutoClearAct;\r\n    QAction    *m_outputAutoPosCursorAct;\r\n    QAction     *m_configAct;\r\n    QAction     *m_stopAct;\r\n    QAction     *m_clearAct;\r\n    QAction     *m_outputAct;\r\n    QMenu       *m_fmctxGoToolMenu;\r\n    QMenu       *m_fmctxNoGoToolMenu;\r\n    QAction     *m_fmctxExecuteFileAct;\r\n    QAction     *m_fmctxDebugFileAct;\r\n    QAction     *m_fmctxGoLockBuildAct;\r\n    QAction     *m_fmctxGoBuildConfigAct;\r\n    QAction     *m_fmctxGoBuildAct;\r\n    QAction     *m_fmctxGoBuildAllAct;\r\n    QAction     *m_fmctxGoInstallAct;\r\n    QAction     *m_fmctxGoInstallAllAct;\r\n    QAction     *m_fmctxGoTestAct;\r\n    QAction     *m_fmctxGoTestAllAct;\r\n    QAction     *m_fmctxGoCleanAct;\r\n    QAction     *m_fmctxGoCleanAllAct;\r\n    QAction     *m_fmctxGoGetAct;\r\n    QAction     *m_fmctxGoGetUpdateAct;\r\n    QAction     *m_fmctxGoGetForceAct;\r\n    QAction     *m_fmctxGoFmtAct;\r\n    QAction     *m_fmctxGoVetAct;\r\n    QAction     *m_fmctxGoVetAllCheckAct;\r\n    QAction     *m_fmctxGodocAct;\r\n    QCheckBox   *m_checkBoxLockBuild;\r\n    QFileInfo   m_fmctxInfo;\r\n    QString     m_outputRegex;\r\n    QString     m_buildMimeType;\r\n    QString     m_buildRootPath;\r\n    QString     m_buildRootName;\r\n    bool        m_bOutputAutoClear;\r\n    bool        m_bLockBuildRoot;\r\n    bool        m_bDynamicBuild;\r\n    bool        m_bProjectBuild;\r\n    bool        m_bFirstRunOutput;\r\n    QMap<QString,QString> m_liteAppInfo;\r\n    QMap<QString,QString> m_editorInfo;\r\n    QMap<QString,QString> m_buildInfo;\r\n    QMap<QString,QString> m_projectInfo;\r\n    QMap<QString,QString> m_targetInfo;\r\n};\r\n\r\n#endif // LITEBUILD_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/litebuild.pro",
    "content": "TARGET = litebuild\nTEMPLATE = lib\n\ninclude (../../liteideplugin.pri)\ninclude (../../api/liteenvapi/liteenvapi.pri)\ninclude (../../api/litebuildapi/litebuildapi.pri)\ninclude (../../api/golangdocapi/golangdocapi.pri)\ninclude (../../3rdparty/elidedlabel/elidedlabel.pri)\ninclude (../../utils/fileutil/fileutil.pri)\ninclude (../../utils/processex/processex.pri)\ninclude (../../utils/textoutput/textoutput.pri)\ninclude (../../utils/colorstyle/colorstyle.pri)\n\nDEFINES += LITEBUILD_LIBRARY\n\nSOURCES += litebuildplugin.cpp \\\n    litebuild.cpp \\\n    build.cpp \\\n    buildmanager.cpp \\\n    litebuildoptionfactory.cpp \\\n    litebuildoption.cpp \\\n    buildconfigdialog.cpp\n\nHEADERS += litebuildplugin.h\\\n        litebuild_global.h \\\n    litebuild.h \\\n    build.h \\\n    buildmanager.h \\\n    litebuildoptionfactory.h \\\n    litebuildoption.h \\\n    buildconfigdialog.h\n\nRESOURCES += \\\n    litebuild.qrc\n\nFORMS += \\\n    litebuildoption.ui \\\n    buildconfigdialog.ui\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/litebuild.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/litebuild\">\n        <file>images/stopaction.png</file>\n        <file>images/config.png</file>\n        <file>images/bk.png</file>\n        <file>images/build.png</file>\n        <file>images/builddebug.png</file>\n        <file>images/buildrun.png</file>\n        <file>images/buildtest.png</file>\n        <file>images/clean.png</file>\n        <file>images/cleanall.png</file>\n        <file>images/cover.png</file>\n        <file>images/debug.png</file>\n        <file>images/doc.png</file>\n        <file>images/filebuild.png</file>\n        <file>images/filerun.png</file>\n        <file>images/filetest.png</file>\n        <file>images/fmt.png</file>\n        <file>images/get.png</file>\n        <file>images/gopm.png</file>\n        <file>images/install.png</file>\n        <file>images/lint.png</file>\n        <file>images/rebuild.png</file>\n        <file>images/reget.png</file>\n        <file>images/run.png</file>\n        <file>images/runterm.png</file>\n        <file>images/test.png</file>\n        <file>images/testbench.png</file>\n        <file>images/testcover.png</file>\n        <file>images/update.png</file>\n        <file>images/utils.png</file>\n        <file>images/vet.png</file>\n        <file>images/download.png</file>\n        <file>images/module.png</file>\n        <file>images/tidy.png</file>\n        <file>images/ver.png</file>\n        <file>images/buildall.png</file>\n        <file>images/graph.png</file>\n    </qresource>\n</RCC>\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/litebuild_global.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: litebuild_global.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef LITEBUILD_GLOBAL_H\r\n#define LITEBUILD_GLOBAL_H\r\n\r\n#include <QtCore/qglobal.h>\r\n\r\n#if defined(LITEBUILD_LIBRARY)\r\n#  define LITEBUILDSHARED_EXPORT Q_DECL_EXPORT\r\n#else\r\n#  define LITEBUILDSHARED_EXPORT Q_DECL_IMPORT\r\n#endif\r\n\r\n#define LITEBUILD_OPTION   \"option/litebuild\"\r\n#define LITEBUILD_ENVCHECK \"litebuild/envcheck\"\r\n#define LITEBUILD_OUTPUTLINEWRAP \"litebuild/outputlinewrap\"\r\n#define LITEBUILD_OUTPUTAUTOCLEAR \"litebuild/outputautoclear\"\r\n#define LITEBUILD_OUTPUTAUTOPOSCURSOR \"litebuild/outputautoposcursor\"\r\n\r\n#endif // LITEBUILD_GLOBAL_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/litebuildoption.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litebuildoption.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"litebuildoption.h\"\n#include \"litebuild_global.h\"\n#include \"ui_litebuildoption.h\"\n#include <QFileSystemModel>\n#include <QFileInfo>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nLiteBuildOption::LiteBuildOption(LiteApi::IApplication *app,QObject *parent) :\n    LiteApi::IOption(parent),\n    m_liteApp(app),\n    m_widget(new QWidget),\n    ui(new Ui::LiteBuildOption)\n{\n    ui->setupUi(m_widget);\n    m_fileModel = new QFileSystemModel(this);\n    QString path = m_liteApp->resourcePath()+\"/litebuild\";\n    QModelIndex root = m_fileModel->setRootPath(path);\n    ui->fileTreeView->setEditTriggers(0);\n    ui->fileTreeView->setModel(m_fileModel);\n    ui->fileTreeView->setRootIndex(root);\n#if QT_VERSION >= 0x050000\n    ui->fileTreeView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);\n#else\n    ui->fileTreeView->header()->setResizeMode(QHeaderView::ResizeToContents);\n#endif\n    connect(ui->fileTreeView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(doubleClickedFile(QModelIndex)));\n}\n\nLiteBuildOption::~LiteBuildOption()\n{\n    delete ui;\n    delete m_widget;\n}\n\nQWidget *LiteBuildOption::widget()\n{\n    return m_widget;\n}\n\nQString LiteBuildOption::name() const\n{\n    return \"LiteBuild\";\n}\n\nQString LiteBuildOption::mimeType() const\n{\n    return \"option/litebuild\";\n}\n\nvoid LiteBuildOption::load()\n{\n    bool b = m_liteApp->settings()->value(LITEBUILD_ENVCHECK,true).toBool();\n    ui->goenvCheckBox->setChecked(b);\n}\n\nvoid LiteBuildOption::save()\n{\n    bool b = ui->goenvCheckBox->isChecked();\n    m_liteApp->settings()->setValue(LITEBUILD_ENVCHECK,b);\n}\n\nvoid LiteBuildOption::doubleClickedFile(QModelIndex index)\n{\n    if (!index.isValid()) {\n        return;\n    }\n    QFileInfo info = m_fileModel->fileInfo(index);\n    if (!info.isFile()) {\n        return;\n    }\n    if (info.suffix() == \"png\") {\n        return;\n    }\n    m_liteApp->fileManager()->openEditor(info.filePath());\n}\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/litebuildoption.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litebuildoption.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEBUILDOPTION_H\n#define LITEBUILDOPTION_H\n\n#include \"liteapi/liteapi.h\"\n#include <QModelIndex>\n\nnamespace Ui {\n    class LiteBuildOption;\n}\n\nclass QFileSystemModel;\nclass LiteBuildOption : public LiteApi::IOption\n{\n    Q_OBJECT\n\npublic:\n    explicit LiteBuildOption(LiteApi::IApplication *app,QObject *parent = 0);\n    ~LiteBuildOption();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void load();\n    virtual void save();\npublic slots:\n    void doubleClickedFile(QModelIndex);\nprivate:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget *m_widget;\n    Ui::LiteBuildOption *ui;\n    QFileSystemModel *m_fileModel;\n};\n\n#endif // LITEBUILDOPTION_H\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/litebuildoption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>LiteBuildOption</class>\n <widget class=\"QWidget\" name=\"LiteBuildOption\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>383</width>\n    <height>255</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n   <item>\n    <widget class=\"QCheckBox\" name=\"goenvCheckBox\">\n     <property name=\"text\">\n      <string>Recheck Go installation when changing environments</string>\n     </property>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox\">\n     <property name=\"title\">\n      <string>Build command configuration files [*]</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n      <item>\n       <widget class=\"QTreeView\" name=\"fileTreeView\"/>\n      </item>\n     </layout>\n    </widget>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/litebuildoptionfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litebuildoptionfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"litebuildoptionfactory.h\"\n#include \"litebuildoption.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nLiteBuildOptionFactory::LiteBuildOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n}\n\nQStringList LiteBuildOptionFactory::mimeTypes() const\n{\n    return QStringList() << \"option/litebuild\";\n}\n\nLiteApi::IOption *LiteBuildOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == \"option/litebuild\") {\n        return new LiteBuildOption(m_liteApp,this);\n    }\n    return 0;\n}\n\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/litebuildoptionfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litebuildoptionfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEBUILDOPTIONFACTORY_H\n#define LITEBUILDOPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass LiteBuildOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n    LiteBuildOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n\n};\n\n#endif // LITEBUILDOPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/litebuildplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litebuildplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"litebuildplugin.h\"\n#include \"litebuild.h\"\n#include \"litebuildoptionfactory.h\"\n#include \"liteapi/liteids.h\"\n#include <QHBoxLayout>\n#include <QLineEdit>\n#include <QComboBox>\n#include <QCompleter>\n#include <QLabel>\n#include <QPushButton>\n#include <QFileInfo>\n#include <QDir>\n#include <QTextStream>\n#include <QApplication>\n\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nLiteBuildPlugin::LiteBuildPlugin()\n{\n}\n\nvoid LiteBuildPlugin::load_execute(const QString& path, QComboBox *combo)\n{\n    QDir dir = path;\n    m_liteApp->appendLog(\"Execute commands\",\"Loading \"+path);\n    dir.setFilter(QDir::Files | QDir::NoSymLinks);\n    dir.setNameFilters(QStringList(\"*.api\"));\n    foreach (QFileInfo info, dir.entryInfoList()) {\n        QFile f(info.filePath());\n        if (f.open(QFile::ReadOnly)) {\n            foreach (QByteArray line, f.readAll().split('\\n')) {\n                combo->addItem(QString(line.trimmed()));\n            }\n        }\n    }\n}\n\nbool LiteBuildPlugin::load(LiteApi::IApplication *app)\n{\n    m_liteApp = app;\n    m_build = new LiteBuild(app,this);\n    app->optionManager()->addFactory(new LiteBuildOptionFactory(app,this));\n    connect(m_build,SIGNAL(buildPathChanged(QString)),this,SLOT(buildPathChanged(QString)));\n\n    //execute editor\n    QLayout *layout=app->editorManager()->widget()->layout();\n    m_executeWidget = new QWidget;\n    m_executeWidget->hide();\n    QHBoxLayout *hbox = new QHBoxLayout;\n    hbox->setMargin(1);\n    m_executeWidget->setLayout(hbox);\n    m_commandCombo = new QComboBox;\n    m_commandCombo->setEditable(true);\n    m_commandCombo->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);\n    QCompleter *c = m_commandCombo->completer();\n    if (c != 0) {\n        c->setCaseSensitivity(Qt::CaseSensitive);\n    }\n    load_execute(m_liteApp->resourcePath()+\"/litebuild/command\",m_commandCombo);\n    m_commandCombo->installEventFilter(this);\n\n    m_workLabel = new ElidedLabel(\"\");\n    m_workLabel->setElideMode(Qt::ElideMiddle);\n\n\n    QPushButton *close = new QPushButton();\n    close->setIcon(QIcon(\"icon:images/close.png\"));\n    close->setIconSize(QSize(16,16));\n    close->setFlat(true);\n    close->setToolTip(tr(\"Close\"));\n\n    connect(close,SIGNAL(clicked()),m_executeWidget,SLOT(hide()));\n    hbox->addWidget(new QLabel(tr(\"Execute:\")));\n    hbox->addWidget(m_commandCombo,1);\n    hbox->addWidget(m_workLabel,1);\n    hbox->addWidget(close);\n    layout->addWidget(m_executeWidget);\n\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(m_build,\"Build\");\n    QAction *execAct = new QAction(tr(\"Execute File\"),this);\n    actionContext->regAction(execAct,\"ExecuteFile\",\"Ctrl+`\");\n    m_liteApp->actionManager()->insertMenuActions(ID_MENU_TOOLS,\"sep/exec\",true,QList<QAction*>() << execAct);\n\n    connect(execAct,SIGNAL(triggered()),this,SLOT(showExecute()));\n    connect(m_commandCombo->lineEdit(),SIGNAL(returnPressed()),this,SLOT(execute()));\n    connect(m_liteApp,SIGNAL(key_escape()),this,SLOT(closeRequest()));\n    return true;\n}\n\nvoid LiteBuildPlugin::showExecute()\n{\n    m_executeWidget->show();\n    m_commandCombo->lineEdit()->selectAll();\n    m_commandCombo->lineEdit()->setFocus();\n//    QString work = m_liteApp->applicationPath();\n//    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n//    LiteApi::ITextEditor *textEditor = LiteApi::getTextEditor(editor);\n//    if (textEditor) {\n//        work = QFileInfo(textEditor->filePath()).path();\n//    }\n//    m_workLabel->setText(work);\n}\n\nvoid LiteBuildPlugin::execute()\n{\n    QString text = m_commandCombo->lineEdit()->text().trimmed();\n    if (text.isEmpty()) {\n        return;\n    }\n    m_commandCombo->lineEdit()->selectAll();\n    QString cmd = text;\n    QString args;\n    int find = text.indexOf(\" \");\n    if (find != -1) {\n        cmd = text.left(find);\n        args = text.right(text.length()-find-1);\n    }\n    QString work = m_build->currentBuildPath();\n    if (work.isEmpty()) {\n        work = m_liteApp->applicationPath();\n    }\n//            m_liteApp->applicationPath();\n//    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n//    LiteApi::ITextEditor *textEditor = LiteApi::getTextEditor(editor);\n//    if (textEditor) {\n//        work = QFileInfo(textEditor->filePath()).path();\n//    }\n    m_build->execCommand(cmd.trimmed(),args.trimmed(),work);\n}\n\nvoid LiteBuildPlugin::buildPathChanged(const QString &buildPath)\n{\n    m_workLabel->setText(buildPath);\n    m_workLabel->setToolTip(buildPath);\n}\n\nvoid LiteBuildPlugin::closeRequest()\n{\n    m_executeWidget->hide();\n}\n\nbool LiteBuildPlugin::eventFilter(QObject *obj, QEvent *event)\n{\n    if (obj == m_commandCombo) {\n        if (event->type() == QEvent::KeyPress) {\n            QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);\n            if (keyEvent->key() == Qt::Key_Tab) {\n                QLineEdit *edit = m_commandCombo->lineEdit();\n                if (edit->completer()->widget()->isVisible()) {\n                    edit->setText(edit->completer()->currentCompletion());\n                }\n                return true;\n            }\n        }\n    }\n    return LiteApi::IPlugin::eventFilter(obj,event);\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/litebuild/litebuildplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litebuildplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEBUILDPLUGIN_H\n#define LITEBUILDPLUGIN_H\n\n#include \"litebuild_global.h\"\n#include \"liteapi/liteapi.h\"\n#include \"elidedlabel/elidedlabel.h\"\n#include <QtPlugin>\n#include <QStyleOption>\n\nclass LiteBuild;\nclass QComboBox;\nclass LiteBuildPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    LiteBuildPlugin();\n    virtual bool load(LiteApi::IApplication *app);\n    void load_execute(const QString& path, QComboBox *combo);\nprotected slots:\n    void showExecute();\n    void execute();\n    void buildPathChanged(const QString &buildPath);\n    void closeRequest();\nprotected:\n    virtual bool eventFilter(QObject *, QEvent *);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    LiteBuild *m_build;\n    QWidget   *m_executeWidget;\n    QComboBox *m_commandCombo;\n    ElidedLabel *m_workLabel;\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<LiteBuildPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.LiteBuildPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/litebuild\");\n        m_info->setName(\"LiteBuilder\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setVer(\"X38.2\");\n        m_info->setInfo(\"Core Build\");\n        m_info->appendDepend(\"plugin/liteenv\");\n        m_info->setMustLoad(true);\n    }\n};\n\n#endif // LITEBUILDPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/debugmanager.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: debugmanager.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"debugmanager.h\"\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nDebugManager::DebugManager(QObject *parent) :\n    IDebuggerManager(parent),\n    m_currentDebug(0)\n{\n}\n\nDebugManager::~DebugManager()\n{\n    qDeleteAll(m_debugList);\n}\n\nvoid DebugManager::addDebugger(IDebugger *debug)\n{\n    m_debugList.append(debug);\n}\n\nvoid DebugManager::removeDebugger(IDebugger *debug)\n{\n    m_debugList.removeOne(debug);\n}\n\nIDebugger *DebugManager::findDebugger(const QString &mimeType)\n{\n    foreach(IDebugger *debug, m_debugList) {\n        if (debug->mimeType() == mimeType) {\n            return debug;\n        }\n    }\n    return 0;\n}\n\nQList<IDebugger*> DebugManager::debuggerList() const\n{\n    return m_debugList;\n}\n\nvoid DebugManager::setCurrentDebugger(IDebugger *debug)\n{\n    m_currentDebug = debug;\n    emit currentDebuggerChanged(m_currentDebug);\n}\n\nIDebugger *DebugManager::currentDebugger()\n{\n    return m_currentDebug;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/debugmanager.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: debugmanager.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef DEBUGMANAGER_H\n#define DEBUGMANAGER_H\n\n#include \"litedebugapi/litedebugapi.h\"\n\nusing namespace LiteApi;\n\nclass DebugManager : public LiteApi::IDebuggerManager\n{\n    Q_OBJECT\npublic:\n    DebugManager(QObject *parent);\n    virtual ~DebugManager();\n    virtual void addDebugger(IDebugger *debug);\n    virtual void removeDebugger(IDebugger *debug);\n    virtual IDebugger *findDebugger(const QString &mimeType);\n    virtual QList<IDebugger*> debuggerList() const;\n    virtual void setCurrentDebugger(IDebugger *debug);\n    virtual IDebugger *currentDebugger();       \nprotected:\n    QList<IDebugger*>  m_debugList;\n    IDebugger *m_currentDebug;\n};\n\n#endif // DEBUGMANAGER_H\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/debugwidget.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: debugwidget.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"debugwidget.h\"\r\n#include <QTreeView>\r\n#include <QTabWidget>\r\n#include <QVBoxLayout>\r\n#include <QHBoxLayout>\r\n#include <QLineEdit>\r\n#include <QPushButton>\r\n#include <QHeaderView>\r\n#include <QPlainTextEdit>\r\n#include <QVariant>\r\n#include <QDebug>\r\n#include <QFile>\r\n#include <QMenu>\r\n#include <QAction>\r\n#include <QInputDialog>\r\n#include <QItemDelegate>\r\n#include <QDebug>\r\n\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nclass WatchDelegate : public QItemDelegate\r\n{\r\npublic:\r\n    WatchDelegate(QObject *parent) : QItemDelegate(parent)\r\n    {\r\n    }\r\n    QWidget *createEditor(QWidget *parent,\r\n                          const QStyleOptionViewItem &option,\r\n                          const QModelIndex &index) const\r\n    {\r\n        if (index.column() == 0) {\r\n            return QItemDelegate::createEditor(parent,option,index);\r\n        }\r\n        return 0;\r\n    }\r\n};\r\n\r\n\r\nDebugWidget::DebugWidget(LiteApi::IApplication *app, QObject *parent) :\r\n    QObject(parent),\r\n    m_liteApp(app),\r\n    m_widget(new QWidget),\r\n    m_debugger(0)\r\n{\r\n    m_tabWidget = new QTabWidget;\r\n\r\n    m_asyncView = new QTreeView;\r\n    m_varsView = new SymbolTreeView(false);\r\n    m_watchView = new SymbolTreeView(false);\r\n    m_framesView = new QTreeView;\r\n    m_libraryView = new QTreeView;\r\n    m_goroutinesView = new SymbolTreeView(false);\r\n    m_threadsView = new QTreeView;\r\n    m_regsView = new QTreeView;\r\n    m_asmView = new QTreeView;\r\n\r\n    m_asyncView->setEditTriggers(0);\r\n    m_varsView->setEditTriggers(0);\r\n    m_varsView->setContextMenuPolicy(Qt::CustomContextMenu);\r\n\r\n    m_watchView->setEditTriggers(0);\r\n    m_watchView->setContextMenuPolicy(Qt::CustomContextMenu);\r\n\r\n    m_framesView->setEditTriggers(0);\r\n#if QT_VERSION >= 0x050000\r\n    m_framesView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);\r\n    m_threadsView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);\r\n    m_goroutinesView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);\r\n    m_asmView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);\r\n#else\r\n    m_framesView->header()->setResizeMode(QHeaderView::ResizeToContents);\r\n    m_threadsView->header()->setResizeMode(QHeaderView::ResizeToContents);\r\n    m_goroutinesView->header()->setResizeMode(QHeaderView::ResizeToContents);\r\n    m_asmView->header()->setResizeMode(QHeaderView::ResizeToContents);\r\n#endif\r\n\r\n    m_libraryView->setEditTriggers(0);\r\n    m_threadsView->setEditTriggers(0);\r\n    m_goroutinesView->setEditTriggers(0);\r\n    m_regsView->setEditTriggers(0);\r\n    m_asmView->setEditTriggers(0);\r\n\r\n    m_watchView->setEditTriggers(QAbstractItemView::DoubleClicked);\r\n    m_watchView->setItemDelegate(new WatchDelegate(this));\r\n\r\n    m_debugLogEdit = new TextOutput(m_liteApp);\r\n    m_debugLogEdit->setReadOnly(false);\r\n    m_debugLogEdit->setFilterTermColor(true);\r\n    m_debugLogEdit->setMaximumBlockCount(10000);\r\n    m_debugLogEdit->setLineWrapMode(QPlainTextEdit::NoWrap);\r\n\r\n\r\n    QVBoxLayout *layout = new QVBoxLayout;\r\n    layout->setMargin(0);\r\n    layout->addWidget(m_tabWidget);\r\n\r\n    m_widget->setLayout(layout);\r\n\r\n    m_watchMenu = new QMenu(m_widget);\r\n    m_addWatchAct = new QAction(tr(\"Add Watch\"),this);\r\n    //m_addLocalWatchAct = new QAction(tr(\"Add Local Watch\"),this);\r\n    m_removeWatchAct = new QAction(tr(\"Remove Watch\"),this);\r\n    m_removeAllWatchAct = new QAction(tr(\"Remove All Watches\"),this);\r\n    m_watchMenu->addAction(m_addWatchAct);\r\n    //m_watchMenu->addAction(m_addLocalWatchAct);\r\n    m_watchMenu->addSeparator();\r\n    m_watchMenu->addAction(m_removeWatchAct);\r\n    m_watchMenu->addAction(m_removeAllWatchAct);\r\n\r\n    connect(m_debugLogEdit,SIGNAL(enterText(QString)),this,SLOT(enterText(QString)));\r\n    connect(m_varsView,SIGNAL(expanded(QModelIndex)),this,SLOT(expandedVarsView(QModelIndex)));\r\n    connect(m_watchView,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(watchViewContextMenu(QPoint)));\r\n    connect(m_addWatchAct,SIGNAL(triggered()),this,SLOT(addWatch()));\r\n    //connect(m_addLocalWatchAct,SIGNAL(triggered()),this,SLOT(addLocalWatch()));\r\n    connect(m_removeWatchAct,SIGNAL(triggered()),this,SLOT(removeWatch()));\r\n    connect(m_removeAllWatchAct,SIGNAL(triggered()),this,SLOT(removeAllWatchAct()));\r\n    connect(m_asyncView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(dbclickView(QModelIndex)));\r\n    connect(m_watchView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(dbclickView(QModelIndex)));\r\n    connect(m_varsView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(dbclickView(QModelIndex)));\r\n    connect(m_framesView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(dbclickView(QModelIndex)));\r\n    connect(m_threadsView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(dbclickView(QModelIndex)));\r\n    connect(m_goroutinesView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(dbclickView(QModelIndex)));\r\n    connect(m_regsView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(dbclickView(QModelIndex)));\r\n    connect(m_libraryView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(dbclickView(QModelIndex)));\r\n    connect(m_asmView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(dbclickView(QModelIndex)));\r\n}\r\n\r\nDebugWidget::~DebugWidget()\r\n{\r\n    delete m_asyncView;\r\n    delete m_varsView;\r\n    delete m_watchView;\r\n    delete m_framesView;\r\n    delete m_threadsView;\r\n    delete m_goroutinesView;\r\n    delete m_regsView;\r\n    delete m_libraryView;\r\n    delete m_asmView;\r\n\r\n    if (m_widget) {\r\n        delete m_widget;\r\n    }\r\n}\r\n\r\nQWidget *DebugWidget::widget()\r\n{\r\n    return m_widget;\r\n}\r\n\r\nvoid DebugWidget::enterText(const QString &text)\r\n{\r\n    QString cmd = text.simplified();\r\n    if (!cmd.isEmpty() && m_debugger && m_debugger->isRunning()) {\r\n        emit debugCmdInput();\r\n        m_debugger->enterDebugText(cmd);\r\n    }\r\n}\r\n\r\nvoid DebugWidget::clearLog()\r\n{\r\n    m_debugLogEdit->clear();\r\n}\r\n\r\nvoid DebugWidget::appendLog(const QString &log)\r\n{\r\n    m_debugLogEdit->append(log);\r\n}\r\n\r\nstatic void setResizeView(QTreeView *view)\r\n{\r\n    QAbstractItemModel *model = view->model();\r\n    if (!model) {\r\n        return;\r\n    }\r\n    if (model->columnCount() <= 1) {\r\n        view->setHeaderHidden(true);\r\n        return;\r\n    } else {\r\n        view->setHeaderHidden(false);\r\n    }\r\n#if QT_VERSION >= 0x050000\r\n    view->header()->setSectionResizeMode(0,QHeaderView::ResizeToContents);\r\n#else\r\n    view->header()->setResizeMode(0,QHeaderView::ResizeToContents);\r\n#endif\r\n}\r\n\r\nvoid DebugWidget::updateView(QTreeView *view, LiteApi::IDebugger *debug, LiteApi::DEBUG_MODEL_TYPE type, const QString &title)\r\n{\r\n    QAbstractItemModel *model = debug->debugModel(type);\r\n    view->setModel(model);\r\n    setResizeView(view);\r\n    if (model != 0) {\r\n        m_tabWidget->addTab(view,title);\r\n    }\r\n}\r\n\r\nvoid DebugWidget::setDebugger(LiteApi::IDebugger *debug)\r\n{\r\n    if (m_debugger == debug) {\r\n        return;\r\n    }\r\n    m_debugger = debug;\r\n    if (!m_debugger) {\r\n        return;\r\n    }\r\n    m_tabWidget->clear();\r\n    updateView(m_asyncView,debug,LiteApi::ASYNC_MODEL,tr(\"Async Record\"));\r\n    updateView(m_varsView,debug,LiteApi::VARS_MODEL,tr(\"Variables\"));\r\n    updateView(m_watchView,debug,LiteApi::WATCHES_MODEL,tr(\"Watch\"));\r\n    updateView(m_framesView,debug,LiteApi::FRAMES_MODEL,tr(\"Call Stack\"));\r\n    updateView(m_threadsView,debug,LiteApi::THREADS_MODEL,tr(\"Threads\"));\r\n    updateView(m_goroutinesView,debug,LiteApi::GOROUTINES_MODEL,tr(\"Goroutines\"));\r\n    updateView(m_regsView,debug,LiteApi::REGS_MODEL,tr(\"Registers\"));\r\n    updateView(m_libraryView,debug,LiteApi::LIBRARY_MODEL,tr(\"Libraries\"));\r\n    updateView(m_asmView,debug,LiteApi::ASM_MODEL,tr(\"Disassemble\"));\r\n    m_tabWidget->addTab(m_debugLogEdit,tr(\"Console\"));\r\n\r\n    connect(m_debugger,SIGNAL(setExpand(LiteApi::DEBUG_MODEL_TYPE,QModelIndex,bool)),this,SLOT(setExpand(LiteApi::DEBUG_MODEL_TYPE,QModelIndex,bool)));\r\n    connect(m_debugger,SIGNAL(watchCreated(QString,QString)),this,SLOT(watchCreated(QString,QString)));\r\n    connect(m_debugger,SIGNAL(watchRemoved(QString)),this,SLOT(watchRemoved(QString)));\r\n    connect(m_debugger,SIGNAL(beginUpdateModel(LiteApi::DEBUG_MODEL_TYPE)),this,SLOT(beginUpdateModel(LiteApi::DEBUG_MODEL_TYPE)));\r\n    connect(m_debugger,SIGNAL(endUpdateModel(LiteApi::DEBUG_MODEL_TYPE)),this,SLOT(endUpdateModel(LiteApi::DEBUG_MODEL_TYPE)));\r\n    connect(m_debugger,SIGNAL(scrollTo(LiteApi::DEBUG_MODEL_TYPE,QModelIndex)),this,SLOT(scrollTo(LiteApi::DEBUG_MODEL_TYPE,QModelIndex)));\r\n}\r\n\r\nvoid DebugWidget::expandedVarsView(QModelIndex index)\r\n{\r\n    if (!index.isValid()) {\r\n        return;\r\n    }\r\n    if (!m_debugger) {\r\n        return;\r\n    }\r\n    m_debugger->expandItem(index,LiteApi::VARS_MODEL);\r\n}\r\n\r\nQTreeView* DebugWidget::viewForType(LiteApi::DEBUG_MODEL_TYPE type)\r\n{\r\n    QTreeView *view = 0;\r\n    switch (type) {\r\n    case LiteApi::VARS_MODEL:\r\n        view = m_varsView;\r\n        break;\r\n    case LiteApi::WATCHES_MODEL:\r\n        view = m_watchView;\r\n        break;\r\n    case LiteApi::ASYNC_MODEL:\r\n        view = m_asyncView;\r\n        break;\r\n    case LiteApi::FRAMES_MODEL:\r\n        view = m_framesView;\r\n        break;\r\n    case LiteApi::THREADS_MODEL:\r\n        view = m_threadsView;\r\n        break;\r\n    case LiteApi::GOROUTINES_MODEL:\r\n        view = m_goroutinesView;\r\n        break;\r\n    case LiteApi::REGS_MODEL:\r\n        view = m_regsView;\r\n        break;\r\n    case LiteApi::LIBRARY_MODEL:\r\n        view = m_libraryView;\r\n        break;\r\n    case LiteApi::ASM_MODEL:\r\n        view = m_asmView;\r\n        break;\r\n    }\r\n    return view;\r\n}\r\n\r\nvoid DebugWidget::setExpand(LiteApi::DEBUG_MODEL_TYPE type, const QModelIndex &index, bool expanded)\r\n{\r\n    if (!index.isValid()) {\r\n        return;\r\n    }\r\n    if (!m_debugger) {\r\n        return;\r\n    }\r\n    QTreeView *view = viewForType(type);\r\n    if (view) {\r\n        view->setExpanded(index,expanded);\r\n    }\r\n}\r\n\r\nvoid DebugWidget::watchViewContextMenu(QPoint pos)\r\n{\r\n    QMenu *contextMenu = m_watchMenu;\r\n\r\n    if (contextMenu && contextMenu->actions().count() > 0) {\r\n        contextMenu->popup(m_watchView->mapToGlobal(pos));\r\n    }\r\n}\r\n\r\nvoid DebugWidget::loadDebugInfo(const QString &id)\r\n{\r\n    m_watchMap.clear();\r\n    QString key = QString(\"litedebug_watch/%1\").arg(id);\r\n    QStringList all = m_liteApp->settings()->value(key).toStringList();\r\n    m_debugger->setInitWatchList(all);\r\n}\r\n\r\nvoid DebugWidget::saveDebugInfo(const QString &id)\r\n{\r\n    QStringList vars;\r\n    foreach(QString var, m_watchMap.values()) {\r\n        vars.append(var);\r\n    }\r\n    QString key = QString(\"litedebug_watch/%1\").arg(id);\r\n    if (vars.isEmpty()) {\r\n        m_liteApp->settings()->remove(key);\r\n    } else {\r\n        m_liteApp->settings()->setValue(key,vars);\r\n    }\r\n}\r\n\r\nvoid DebugWidget::addWatch()\r\n{\r\n    QString text = QInputDialog::getText(this->m_widget,tr(\"Add Watch\"),tr(\"Watch expression (e.g. buf main.var os.Stdout):\"));\r\n    if (text.isEmpty()) {\r\n        return;\r\n    }\r\n    m_debugger->createWatch(text);\r\n}\r\n\r\nvoid DebugWidget::removeWatch()\r\n{\r\n    QModelIndex index = m_watchView->currentIndex();\r\n    if (!index.isValid()) {\r\n        return;\r\n    }\r\n    QModelIndex head = m_watchView->model()->index(index.row(),0);\r\n    if (!head.isValid()) {\r\n        return;\r\n    }\r\n    QString name = head.data(Qt::UserRole + 1).toString();\r\n    m_debugger->removeWatch(name);\r\n}\r\n\r\nvoid DebugWidget::removeAllWatchAct()\r\n{\r\n    m_debugger->removeAllWatch();\r\n    m_watchMap.clear();\r\n}\r\n\r\nvoid DebugWidget::watchCreated(QString var,QString name)\r\n{\r\n    if (!m_watchMap.keys().contains(var)) {\r\n        m_watchMap.insert(var,name);\r\n    }\r\n}\r\n\r\nvoid DebugWidget::watchRemoved(QString var)\r\n{\r\n    m_watchMap.remove(var);\r\n}\r\n\r\nvoid DebugWidget::setInputFocus()\r\n{\r\n    m_debugLogEdit->setFocus();\r\n}\r\n\r\nvoid DebugWidget::dbclickView(QModelIndex index)\r\n{\r\n    if (!index.isValid()) {\r\n        return;\r\n    }\r\n    if (!m_debugger) {\r\n        return;\r\n    }\r\n    QTreeView *view = (QTreeView*)sender();\r\n    if (view == m_asyncView) {\r\n        m_debugger->dbclickItem(index,LiteApi::ASYNC_MODEL);\r\n    } else if (view == m_varsView) {\r\n        m_debugger->dbclickItem(index,LiteApi::VARS_MODEL);\r\n    } else if (view == m_watchView) {\r\n        m_debugger->dbclickItem(index,LiteApi::WATCHES_MODEL);\r\n    } else if (view == m_framesView) {\r\n        m_debugger->dbclickItem(index,LiteApi::FRAMES_MODEL);\r\n    } else if (view == m_threadsView) {\r\n        m_debugger->dbclickItem(index,LiteApi::THREADS_MODEL);\r\n    } else if (view == m_libraryView) {\r\n        m_debugger->dbclickItem(index,LiteApi::LIBRARY_MODEL);\r\n    } else if (view == m_regsView) {\r\n        m_debugger->dbclickItem(index,LiteApi::REGS_MODEL);\r\n    } else if (view == m_goroutinesView) {\r\n        m_debugger->dbclickItem(index,LiteApi::GOROUTINES_MODEL);\r\n    } else if (view == m_asmView) {\r\n        m_debugger->dbclickItem(index,LiteApi::ASM_MODEL);\r\n    }\r\n}\r\n\r\nvoid DebugWidget::beginUpdateModel(LiteApi::DEBUG_MODEL_TYPE type)\r\n{\r\n    if (type == LiteApi::VARS_MODEL) {\r\n        m_varsView->saveState(&m_varsState);\r\n    } else if (type == LiteApi::WATCHES_MODEL) {\r\n        m_watchView->saveState(&m_watchState);\r\n    } else if (type == LiteApi::GOROUTINES_MODEL) {\r\n        m_goroutinesView->saveState(&m_goroutinesState);\r\n    }\r\n}\r\n\r\nvoid DebugWidget::endUpdateModel(LiteApi::DEBUG_MODEL_TYPE type)\r\n{\r\n    if (type == LiteApi::VARS_MODEL) {\r\n        m_varsView->loadState(m_varsView->model(),&m_varsState);\r\n    } else if (type == LiteApi::WATCHES_MODEL) {\r\n        m_watchView->loadState(m_watchView->model(),&m_watchState);\r\n    } else if (type == LiteApi::GOROUTINES_MODEL) {\r\n        m_goroutinesView->loadState(m_goroutinesView->model(),&m_goroutinesState);\r\n    }\r\n}\r\n\r\nvoid DebugWidget::scrollTo(LiteApi::DEBUG_MODEL_TYPE type, const QModelIndex &index)\r\n{\r\n    QTreeView *view = viewForType(type);\r\n    if (view) {\r\n        view->scrollTo(index,QAbstractItemView::EnsureVisible);\r\n    }\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/debugwidget.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: debugwidget.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef DEBUGWIDGET_H\n#define DEBUGWIDGET_H\n\n#include \"liteapi/liteapi.h\"\n#include \"litedebugapi/litedebugapi.h\"\n#include \"textoutput/textoutput.h\"\n#include \"symboltreeview/symboltreeview.h\"\n\nclass QTabWidget;\nclass QTreeView;\nclass QLineEdit;\nclass QPlainTextEdit;\n\nclass DebugWidget : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit DebugWidget(LiteApi::IApplication *app,QObject *parent = 0);\n    virtual ~DebugWidget();\n    virtual QWidget *widget();\n    void updateView(QTreeView *view, LiteApi::IDebugger *debug, LiteApi::DEBUG_MODEL_TYPE type, const QString &title);\n    QTreeView *viewForType(LiteApi::DEBUG_MODEL_TYPE type);\nsignals:\n    void debugCmdInput();\npublic slots:\n    void setInputFocus();\n    void loadDebugInfo(const QString &id);\n    void saveDebugInfo(const QString &id);\n    void addWatch();\n    void removeWatch();\n    void removeAllWatchAct();\n    void watchViewContextMenu(QPoint);\n    void setDebugger(LiteApi::IDebugger *debug);\n    void enterText(const QString &cmd);\n    void appendLog(const QString &log);\n    void clearLog();\n    void expandedVarsView(QModelIndex);\n    void setExpand(LiteApi::DEBUG_MODEL_TYPE type, const QModelIndex &index, bool expanded);\n    void watchCreated(QString,QString);\n    void watchRemoved(QString);\n    void dbclickView(QModelIndex);\n    void beginUpdateModel(LiteApi::DEBUG_MODEL_TYPE type);\n    void endUpdateModel(LiteApi::DEBUG_MODEL_TYPE type);\n    void scrollTo(LiteApi::DEBUG_MODEL_TYPE type, const QModelIndex &index);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QWidget *m_widget;\n    LiteApi::IDebugger *m_debugger;\n    QTabWidget *m_tabWidget;\n    QTreeView *m_asyncView;\n    SymbolTreeView *m_varsView;\n    SymbolTreeView *m_watchView;\n    QTreeView *m_framesView;\n    QTreeView *m_libraryView;\n    QTreeView *m_threadsView;\n    QTreeView *m_regsView;\n    QTreeView *m_asmView;\n    SymbolTreeView *m_goroutinesView;\n    SymbolTreeState m_varsState;\n    SymbolTreeState m_watchState;\n    SymbolTreeState m_goroutinesState;\n    TextOutput *m_debugLogEdit;\n    QMenu      *m_watchMenu;\n    QAction    *m_addWatchAct;\n    //QAction    *m_addLocalWatchAct;\n    QAction    *m_removeWatchAct;\n    QAction     *m_removeAllWatchAct;\n    QMap<QString,QString> m_watchMap;\n};\n\n#endif // DEBUGWIDGET_H\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/litedebug.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: litedebug.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"litedebug.h\"\r\n#include \"debugmanager.h\"\r\n#include \"debugwidget.h\"\r\n#include \"fileutil/fileutil.h\"\r\n#include \"liteapi/liteids.h\"\r\n#include \"litedebug_global.h\"\r\n#include \"selectexternaldialog.h\"\r\n\r\n#include <QDir>\r\n#include <QFileInfo>\r\n#include <QLayout>\r\n#include <QMenu>\r\n#include <QToolBar>\r\n#include <QAction>\r\n#include <QVBoxLayout>\r\n#include <QFileInfo>\r\n#include <QPushButton>\r\n#include <QLabel>\r\n#include <QDebug>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\n\r\nLiteDebug::LiteDebug(LiteApi::IApplication *app, QObject *parent) :\r\n    LiteApi::ILiteDebug(parent),\r\n    m_liteApp(app),\r\n    m_envManager(0),\r\n    m_liteBuild(0),\r\n    m_debugger(0),\r\n    m_manager(new DebugManager(this)),\r\n    m_widget(new QWidget),\r\n    m_dbgWidget(new DebugWidget(app,this))\r\n{\r\n    m_manager->initWithApp(app);\r\n\r\n    m_liteApp->extension()->addObject(\"LiteApi.ILiteDebug\",this);\r\n    m_liteApp->extension()->addObject(\"LiteApi.IDebuggerManager\",m_manager);\r\n\r\n    m_debugMimeTypes << \"text/x-gosrc\" << \"text/x-csrc\" << \"text/x-chdr\" << \"text/x-c++src\";\r\n\r\n    m_output = new TextOutput(m_liteApp);\r\n    m_output->setReadOnly(true);\r\n    m_output->setFilterTermColor(true);\r\n\r\n    QAction *clearAct = new QAction(tr(\"Clear\"),this);\r\n    clearAct->setIcon(QIcon(\"icon:images/cleanoutput.png\"));\r\n    connect(clearAct,SIGNAL(triggered()),m_output,SLOT(clear()));\r\n\r\n    QVBoxLayout *layout = new QVBoxLayout;    \r\n    QToolBar *widgetToolBar = new QToolBar;\r\n    widgetToolBar->setIconSize(LiteApi::getToolBarIconSize(m_liteApp));\r\n    layout->setMargin(0);\r\n    layout->setSpacing(0);\r\n\r\n    QHBoxLayout *hbox = new QHBoxLayout;\r\n    hbox->setMargin(0);\r\n    hbox->setSpacing(0);\r\n    hbox->addWidget(widgetToolBar);\r\n    QPushButton *close = new QPushButton();\r\n    close->setIcon(QIcon(\"icon:images/close.png\"));\r\n    close->setIconSize(QSize(16,16));\r\n    close->setFlat(true);\r\n    close->setToolTip(tr(\"Close\"));\r\n\r\n    connect(close,SIGNAL(clicked()),this,SLOT(hideDebug()));\r\n    hbox->addStretch(1);\r\n    hbox->addWidget(close);\r\n\r\n    layout->addLayout(hbox);\r\n    layout->addWidget(m_dbgWidget->widget());\r\n    m_widget->setLayout(layout);\r\n\r\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(this,\"Debug\");\r\n\r\n    m_startDebugExternal = new QAction(tr(\"Start Debugging External Application...\"),this);\r\n    actionContext->regAction(m_startDebugExternal,\"StartDebugExternal\",\"\");\r\n\r\n    m_startDebugAct = new QAction(QIcon(\"icon:litedebug/images/startdebug.png\"),tr(\"Start Debugging\"),this);\r\n    actionContext->regAction(m_startDebugAct,\"StartDebug\",\"F5\");\r\n\r\n    m_continueAct = new QAction(QIcon(\"icon:litedebug/images/continue.png\"),tr(\"Continue\"),this);\r\n    actionContext->regAction(m_continueAct,\"Continue\",\"F5\");\r\n\r\n    m_stopDebugAct = new QAction(QIcon(\"icon:litedebug/images/stopdebug.png\"),tr(\"Stop\"),this);\r\n    actionContext->regAction(m_stopDebugAct,\"StopDebug\",\"Shift+F5\");\r\n\r\n    m_showLineAct = new QAction(QIcon(\"icon:litedebug/images/showline.png\"),tr(\"Show Current Line\"),this);\r\n    actionContext->regAction(m_showLineAct,\"ShowLine\",\"\");\r\n\r\n    m_stepIntoAct = new QAction(QIcon(\"icon:litedebug/images/stepinto.png\"),tr(\"Step Into\"),this);\r\n    actionContext->regAction(m_stepIntoAct,\"StepInfo\",\"F11\");\r\n\r\n    m_stepOverAct = new QAction(QIcon(\"icon:litedebug/images/stepover.png\"),tr(\"Step Over\"),this);\r\n    actionContext->regAction(m_stepOverAct,\"LiteDebug.StepOver\",\"F10\");\r\n\r\n    m_stepOutAct = new QAction(QIcon(\"icon:litedebug/images/stepout.png\"),tr(\"Step Out\"),this);\r\n    actionContext->regAction(m_stepOutAct,\"StepOut\",\"Shift+F11\");\r\n\r\n    m_runToLineAct = new QAction(QIcon(\"icon:litedebug/images/runtoline.png\"),tr(\"Run to Line\"),this);\r\n    actionContext->regAction(m_runToLineAct,\"RunToLine\",\"Ctrl+F10\");\r\n\r\n    m_switchBreakAct = new QAction(QIcon(\"icon:litedebug/images/insertbreak.png\"),tr(\"Insert/Remove Breakpoint\"),this);\r\n    actionContext->regAction(m_switchBreakAct,\"Breakpoint\",\"F9\");\r\n\r\n    m_removeAllBreakAct = new QAction(tr(\"Remove All Breakpoints\"),this);\r\n    actionContext->regAction(m_removeAllBreakAct,\"RemoveAllBreakPoints\",\"\");\r\n\r\n//    m_toolBar->addSeparator();\r\n//    m_toolBar->addAction(m_startDebugAct);\r\n//    m_toolBar->addAction(m_insertBreakAct);\r\n\r\n    m_bLastDebugCmdInput = false;\r\n\r\n    widgetToolBar->addAction(m_continueAct);\r\n    widgetToolBar->addAction(m_stopDebugAct);\r\n    widgetToolBar->addSeparator();\r\n    widgetToolBar->addAction(m_switchBreakAct);\r\n    widgetToolBar->addAction(m_showLineAct);\r\n    widgetToolBar->addAction(m_stepIntoAct);\r\n    widgetToolBar->addAction(m_stepOverAct);\r\n    widgetToolBar->addAction(m_stepOutAct);\r\n    widgetToolBar->addAction(m_runToLineAct);\r\n\r\n    m_debugMenu = m_liteApp->actionManager()->loadMenu(ID_MENU_DEBUG);\r\n\r\n    m_debugMenu->addAction(m_startDebugExternal);\r\n    m_debugMenu->addSeparator();\r\n    m_debugMenu->addAction(m_startDebugAct);\r\n    m_debugMenu->addAction(m_continueAct);\r\n    m_debugMenu->addAction(m_stopDebugAct);\r\n    m_debugMenu->addSeparator();\r\n    m_debugMenu->addAction(m_showLineAct);\r\n    m_debugMenu->addAction(m_stepIntoAct);\r\n    m_debugMenu->addAction(m_stepOverAct);\r\n    m_debugMenu->addAction(m_stepOutAct);\r\n    m_debugMenu->addAction(m_runToLineAct);\r\n\r\n    connect(m_manager,SIGNAL(currentDebuggerChanged(LiteApi::IDebugger*)),this,SLOT(setDebugger(LiteApi::IDebugger*)));\r\n    connect(m_liteApp,SIGNAL(loaded()),this,SLOT(appLoaded()));\r\n\r\n    connect(m_startDebugExternal,SIGNAL(triggered()),this,SLOT(startDebugExternal()));\r\n    connect(m_startDebugAct,SIGNAL(triggered()),this,SLOT(startDebug()));\r\n    connect(m_continueAct,SIGNAL(triggered()),this,SLOT(continueRun()));\r\n    connect(m_runToLineAct,SIGNAL(triggered()),this,SLOT(runToLine()));\r\n    connect(m_stopDebugAct,SIGNAL(triggered()),this,SLOT(stopDebug()));\r\n    connect(m_stepOverAct,SIGNAL(triggered()),this,SLOT(stepOver()));\r\n    connect(m_stepIntoAct,SIGNAL(triggered()),this,SLOT(stepInto()));\r\n    connect(m_stepOutAct,SIGNAL(triggered()),this,SLOT(stepOut()));\r\n    connect(m_switchBreakAct,SIGNAL(triggered()),this,SLOT(toggleBreakPoint()));\r\n    connect(m_removeAllBreakAct,SIGNAL(triggered()),this,SLOT(removeAllBreakPoints()));\r\n    connect(m_showLineAct,SIGNAL(triggered()),this,SLOT(showLine()));\r\n    connect(m_liteApp->editorManager(),SIGNAL(editorCreated(LiteApi::IEditor*)),this,SLOT(editorCreated(LiteApi::IEditor*)));\r\n    connect(m_liteApp->editorManager(),SIGNAL(editorAboutToClose(LiteApi::IEditor*)),this,SLOT(editorAboutToClose(LiteApi::IEditor*)));\r\n    connect(m_liteApp->editorManager(),SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(currentEditorChanged(LiteApi::IEditor*)));\r\n    connect(m_output,SIGNAL(enterText(QString)),this,SLOT(enterAppInputText(QString)));\r\n    connect(m_dbgWidget,SIGNAL(debugCmdInput()),this,SLOT(debugCmdInput()));\r\n\r\n    m_outputAct = m_liteApp->toolWindowManager()->addToolWindow(\r\n                Qt::BottomDockWidgetArea,m_output,\"DebugOutput\",tr(\"Debug Output\"),false,\r\n                QList<QAction*>() << clearAct);\r\n\r\n    m_continueAct->setEnabled(false);\r\n    m_stopDebugAct->setEnabled(false);\r\n    m_stepOverAct->setEnabled(false);\r\n    m_showLineAct->setEnabled(false);\r\n    m_stepIntoAct->setEnabled(false);\r\n    m_stepOutAct->setEnabled(false);\r\n    m_runToLineAct->setEnabled(false);\r\n}\r\n\r\nLiteDebug::~LiteDebug()\r\n{\r\n    if (m_output) {\r\n        delete m_output;\r\n    }\r\n}\r\n\r\nvoid LiteDebug::appLoaded()\r\n{\r\n    m_liteBuild = LiteApi::findExtensionObject<LiteApi::ILiteBuild*>(m_liteApp,\"LiteApi.ILiteBuild\");\r\n    m_envManager = LiteApi::findExtensionObject<LiteApi::IEnvManager*>(m_liteApp,\"LiteApi.IEnvManager\");\r\n\r\n    LiteApi::IEditorMarkManager *markManager = LiteApi::getEditorMarkManager(m_liteApp);\r\n    if (markManager) {\r\n        markManager->registerMark(BreakPointMarkType,QIcon(\"icon:litedebug/images/breakmark.png\"));\r\n        markManager->registerMark(CurrentLineMarkType,QIcon(\"icon:litedebug/images/linemark.png\"));\r\n    }\r\n    //QMenu *menu = new QMenu(tr(\"Select Debug\"));\r\n    QActionGroup *group = new QActionGroup(this);\r\n    QString mimeType = m_liteApp->settings()->value(LITEDEBUG_CURDEBUGGER,\"debugger/delve\").toString();\r\n    foreach (LiteApi::IDebugger *debug, m_manager->debuggerList()) {\r\n        QAction *act = new QAction(debug->mimeType(),this);\r\n        act->setObjectName(debug->mimeType());\r\n        act->setCheckable(true);\r\n        group->addAction(act);\r\n        if (mimeType == debug->mimeType()) {\r\n            act->setChecked(true);\r\n            m_manager->setCurrentDebugger(debug);\r\n        }\r\n    }\r\n   // menu->addActions(group->actions());\r\n    connect(group,SIGNAL(triggered(QAction*)),this,SLOT(selectedDebug(QAction*)));\r\n    QAction *first = m_debugMenu->actions().at(0);\r\n    //m_debugMenu->insertMenu(first,menu);\r\n    m_debugMenu->insertActions(first,group->actions());\r\n    m_debugMenu->insertSeparator(first);\r\n}\r\n\r\nvoid LiteDebug::selectedDebug(QAction *act)\r\n{\r\n    stopDebug();\r\n\r\n    QString mimeType = act->objectName();\r\n    LiteApi::IDebugger *debug = m_manager->findDebugger(mimeType);\r\n    if (debug) {\r\n        m_manager->setCurrentDebugger(debug);\r\n        m_liteApp->settings()->setValue(LITEDEBUG_CURDEBUGGER,mimeType);\r\n    }\r\n}\r\n\r\nvoid LiteDebug::editorCreated(LiteApi::IEditor *editor)\r\n{\r\n    if (!canDebug(editor)) {\r\n        return;\r\n    }\r\n\r\n    LiteApi::IEditorMark *editorMark = LiteApi::findExtensionObject<LiteApi::IEditorMark*>(editor,\"LiteApi.IEditorMark\");\r\n    if (!editorMark) {\r\n        return;\r\n    }\r\n\r\n    QMenu *menu = LiteApi::getEditMenu(editor);\r\n    if (menu) {\r\n        menu->addSeparator();\r\n        menu->addAction(m_switchBreakAct);\r\n        menu->addAction(m_removeAllBreakAct);\r\n    }\r\n    menu = LiteApi::getContextMenu(editor);\r\n    if (menu) {\r\n        menu->addSeparator();\r\n        menu->addAction(m_switchBreakAct);\r\n    }\r\n\r\n    QString filePath = editor->filePath();\r\n    bool ok;\r\n    m_fileBpMap.remove(filePath);\r\n\r\n    QString key = QString(\"litedebug_bp/%1\").arg(editor->filePath());\r\n    QList<int> bpList;\r\n    foreach(QString bp, m_liteApp->settings()->value(key).toStringList()) {\r\n        int i = bp.toInt(&ok);\r\n        if (ok) {\r\n            bpList << i;\r\n            m_fileBpMap.insert(filePath,i);\r\n        }\r\n    }\r\n    editorMark->addMarkList(bpList,LiteApi::BreakPointMarkType);\r\n//    foreach(QString bp, m_liteApp->globalCookie().value(key).toStringList()) {\r\n//        int i = bp.toInt(&ok);\r\n//        if (ok) {\r\n//            editorMark->addMark(i,LiteApi::BreakPointMark);\r\n//            m_fileBpMap.insert(filePath,i);\r\n//        }\r\n//    }\r\n    if (m_lastLine.fileName == filePath) {\r\n        editorMark->addMark(m_lastLine.line,LiteApi::CurrentLineMarkType);\r\n    }\r\n\r\n    QToolBar *toolBar = LiteApi::getEditToolBar(editor);\r\n    if (toolBar) {\r\n        toolBar->addSeparator();\r\n        toolBar->addAction(m_switchBreakAct);\r\n        toolBar->addAction(m_startDebugAct);\r\n    }\r\n}\r\n\r\nvoid LiteDebug::editorAboutToClose(LiteApi::IEditor *editor)\r\n{\r\n    if (!canDebug(editor)) {\r\n        return;\r\n    }\r\n\r\n    LiteApi::IEditorMark *editorMark = LiteApi::findExtensionObject<LiteApi::IEditorMark*>(editor,\"LiteApi.IEditorMark\");\r\n    if (!editorMark) {\r\n        return;\r\n    }\r\n    QList<int> bpList = editorMark->markLinesByType(LiteApi::BreakPointMarkType);\r\n    QStringList save;\r\n    foreach(int bp, bpList) {\r\n        save.append(QString(\"%1\").arg(bp));\r\n    }\r\n    QString key = QString(\"litedebug_bp/%1\").arg(editor->filePath());\r\n    //m_liteApp->globalCookie().insert(key,save);\r\n    if (save.isEmpty()) {\r\n        m_liteApp->settings()->remove(key);\r\n    } else {\r\n        m_liteApp->settings()->setValue(key,save);\r\n    }\r\n    editorMark->removeMarkList(bpList,LiteApi::BreakPointMarkType);\r\n}\r\n\r\nvoid LiteDebug::currentEditorChanged(IEditor *editor)\r\n{\r\n    if (canDebug(editor)) {\r\n        m_startDebugAct->setEnabled(true);\r\n    } else {\r\n        m_startDebugAct->setEnabled(false);\r\n    }\r\n}\r\n\r\nvoid LiteDebug::startDebugExternal()\r\n{\r\n    SelectExternalDialog dlg(m_liteApp);\r\n    dlg.loadSetting();\r\n    if (dlg.exec() == QDialog::Accepted) {\r\n        QString cmd = dlg.getCmd();\r\n        QString args = dlg.getArgs();\r\n        QString work = dlg.getWork();\r\n        dlg.saveSetting();\r\n        this->startDebug(cmd,args,work);\r\n    }\r\n}\r\n\r\nvoid LiteDebug::startDebug(const QString &cmd, const QString &args, const QString &work)\r\n{\r\n    if (!m_debugger) {\r\n        return;\r\n    }\r\n    if (m_debugger->isRunning()) {\r\n        this->continueRun();\r\n        return;\r\n    }\r\n\r\n    if (!m_envManager) {\r\n        return;\r\n    }\r\n\r\n    emit debugBefore();\r\n\r\n    m_dbgWidget->clearLog();\r\n\r\n    if (cmd.isEmpty()) {\r\n        m_liteApp->appendLog(\"LiteDebug\",\"No debugger command specified\",true);\r\n        return;\r\n    }\r\n    if (QFileInfo(cmd).isAbsolute()) {\r\n        m_debugInfoId = \"litedebug/\"+cmd;\r\n    } else {\r\n        m_debugInfoId = \"litedebug/\"+work+\"/\"+cmd;\r\n    }\r\n\r\n    QDir dir(work);\r\n    foreach (QFileInfo info, dir.entryInfoList(QStringList() << \"*.go\",QDir::Files)) {\r\n        QString filePath = info.filePath();\r\n        bool ok = false;\r\n        if (m_liteApp->editorManager()->findEditor(filePath,true)) {\r\n            continue;\r\n        }\r\n        m_fileBpMap.remove(filePath);\r\n        foreach(QString bp,m_liteApp->globalCookie().value(QString(\"bp_%1\").arg(filePath)).toStringList()) {\r\n            int i = bp.toInt(&ok);\r\n            if (ok && i >= 0) {\r\n                m_fileBpMap.insert(filePath,i);\r\n            }\r\n        }\r\n    }\r\n\r\n    foreach(LiteApi::IEditor *editor, m_liteApp->editorManager()->editorList()) {\r\n        LiteApi::IEditorMark *editorMark = LiteApi::findExtensionObject<LiteApi::IEditorMark*>(editor,\"LiteApi.IEditorMark\");\r\n        if (!editorMark) {\r\n            continue;\r\n        }\r\n        QString path = editor->filePath();\r\n        m_fileBpMap.remove(path);\r\n        foreach(int i,editorMark->markLinesByType(LiteApi::BreakPointMarkType)) {\r\n            m_fileBpMap.insert(path,i);\r\n        }\r\n    }\r\n\r\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\r\n    if (editor) {\r\n        m_startDebugFile = editor->filePath();\r\n    }\r\n\r\n    m_debugger->setInitBreakTable(m_fileBpMap);\r\n    m_debugger->setEnvironment(LiteApi::getGoEnvironment(m_liteApp).toStringList());\r\n    m_debugger->setWorkingDirectory(work);\r\n\r\n    QString icmd = cmd;\r\n    if (icmd.contains(\" \")) {\r\n        icmd = \"\\\"\"+icmd+\"\\\"\";\r\n    }\r\n\r\n    if (!m_debugger->start(icmd,args)) {\r\n        m_liteApp->appendLog(\"LiteDebug\",\"Failed to start debugger\",true);\r\n    }\r\n}\r\n\r\nQWidget *LiteDebug::widget()\r\n{\r\n    return m_widget;\r\n}\r\n\r\nbool LiteDebug::canDebug(IEditor *editor) const\r\n{\r\n    if (editor && m_debugMimeTypes.contains(editor->mimeType())) {\r\n        return true;\r\n    }\r\n    return false;\r\n}\r\n\r\nLiteApi::IDebuggerManager *LiteDebug::debugManager() const\r\n{\r\n    return m_manager;\r\n}\r\n\r\nbool LiteDebug::isRunning() const\r\n{\r\n    return m_debugger && m_debugger->isRunning();\r\n}\r\n\r\nvoid LiteDebug::setDebugger(LiteApi::IDebugger *debug)\r\n{\r\n    if (m_debugger) {\r\n        disconnect(m_debugger,0,this,0);\r\n    }\r\n    m_debugger = debug;\r\n    if (m_debugger) {\r\n        connect(m_debugger,SIGNAL(debugStarted()),this,SLOT(debugStarted()));\r\n        connect(m_debugger,SIGNAL(debugStoped()),this,SLOT(debugStoped()));\r\n        connect(m_debugger,SIGNAL(debugLog(LiteApi::DEBUG_LOG_TYPE,QString)),this,SLOT(debugLog(LiteApi::DEBUG_LOG_TYPE,QString)));\r\n        connect(m_debugger,SIGNAL(setCurrentLine(QString,int)),this,SLOT(setCurrentLine(QString,int)));\r\n        connect(m_debugger,SIGNAL(gotoLine(QString,int)),this,SLOT(gotoLine(QString,int)));\r\n        connect(m_debugger,SIGNAL(debugLoaded()),this,SLOT(debugLoaded()));\r\n    }\r\n    m_dbgWidget->setDebugger(m_debugger);\r\n}\r\n\r\nvoid LiteDebug::debugLog(LiteApi::DEBUG_LOG_TYPE type, const QString &log)\r\n{    \r\n    switch(type) {\r\n    case LiteApi::DebugConsoleLog:\r\n        m_dbgWidget->appendLog(log);\r\n        break;\r\n    case LiteApi::DebugRuntimeLog:\r\n        m_output->appendTag(QString(\"%1\\n\").arg(log));\r\n        break;\r\n    case LiteApi::DebugErrorLog:\r\n        m_output->append(QString(\"%1\\n\").arg(log));\r\n        break;\r\n    case LiteApi::DebugApplationLog:\r\n        m_output->append(log);\r\n        break;\r\n    }\r\n}\r\n\r\nvoid LiteDebug::startDebug()\r\n{\r\n    if (!m_debugger) {\r\n        return;\r\n    }\r\n    if (m_debugger->isRunning()) {\r\n        m_debugger->continueRun();\r\n        return;\r\n    }\r\n    if (!m_liteBuild) {\r\n        return;\r\n    }\r\n    LiteApi::IBuild *build = m_liteBuild->buildManager()->currentBuild();\r\n    if (!build) {\r\n        return;\r\n    }\r\n    foreach (LiteApi::BuildAction *act, build->actionList()) {\r\n        if (act && act->isDebug() && act->id().toLower() == \"debug\") {\r\n            m_liteBuild->execBuildAction(build,act);\r\n            return;\r\n        }\r\n    }\r\n}\r\n\r\nvoid LiteDebug::continueRun()\r\n{\r\n    if (!m_debugger || !m_debugger->isRunning()) {\r\n        return;\r\n    }\r\n    m_debugger->continueRun();\r\n}\r\n\r\nvoid LiteDebug::runToLine()\r\n{\r\n    if (!m_debugger || !m_debugger->isRunning()) {\r\n        return;\r\n    }\r\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\r\n    if (!editor) {\r\n        return;\r\n    }\r\n    LiteApi::ITextEditor *textEditor = LiteApi::findExtensionObject<LiteApi::ITextEditor*>(editor,\"LiteApi.ITextEditor\");\r\n    if (!textEditor) {\r\n        return;\r\n    }\r\n    QString filePath = textEditor->filePath();\r\n    if (filePath.isEmpty()) {\r\n        return;\r\n    }\r\n    //QString fileName = QFileInfo(filePath).fileName();\r\n    m_debugger->runToLine(filePath,textEditor->line());\r\n}\r\n\r\nvoid LiteDebug::stopDebug()\r\n{\r\n    if (!m_debugger || !m_debugger->isRunning()) {\r\n        return;\r\n    }\r\n    m_debugger->stop();\r\n}\r\n\r\nvoid LiteDebug::stepOver()\r\n{\r\n    if (!m_debugger || !m_debugger->isRunning()) {\r\n        return;\r\n    }\r\n    m_debugger->stepOver();\r\n}\r\n\r\nvoid LiteDebug::stepInto()\r\n{\r\n    if (!m_debugger || !m_debugger->isRunning()) {\r\n        return;\r\n    }\r\n    m_debugger->stepInto();\r\n}\r\n\r\nvoid LiteDebug::stepOut()\r\n{\r\n    if (!m_debugger || !m_debugger->isRunning()) {\r\n        return;\r\n    }\r\n    m_debugger->stepOut();\r\n}\r\n\r\nvoid LiteDebug::showLine()\r\n{\r\n    if (m_lastLine.fileName.isEmpty()) {\r\n        return;\r\n    }\r\n    LiteApi::gotoLine(m_liteApp,m_lastLine.fileName,m_lastLine.line,0,true,true);\r\n}\r\n\r\nvoid LiteDebug::removeAllBreakPoints()\r\n{\r\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\r\n    if (!editor) {\r\n        return;\r\n    }\r\n    LiteApi::IEditorMark *editorMark = LiteApi::findExtensionObject<LiteApi::IEditorMark*>(editor,\"LiteApi.IEditorMark\");\r\n    if (!editorMark) {\r\n        return;\r\n    }\r\n    LiteApi::ITextEditor *textEditor = LiteApi::findExtensionObject<LiteApi::ITextEditor*>(editor,\"LiteApi.ITextEditor\");\r\n    if (!textEditor) {\r\n        return;\r\n    }\r\n    QString filePath = textEditor->filePath();\r\n    QList<int> bpList = editorMark->markLinesByType(LiteApi::BreakPointMarkType);\r\n    foreach(int line, bpList) {\r\n        m_fileBpMap.remove(filePath,line);\r\n        if (m_debugger && m_debugger->isRunning()) {\r\n            m_debugger->removeBreakPoint(filePath,line);\r\n        }\r\n    }\r\n    editorMark->removeMarkList(bpList,LiteApi::BreakPointMarkType);\r\n}\r\n\r\nvoid LiteDebug::toggleBreakPoint()\r\n{\r\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\r\n    if (!editor) {\r\n        return;\r\n    }\r\n    LiteApi::IEditorMark *editorMark = LiteApi::findExtensionObject<LiteApi::IEditorMark*>(editor,\"LiteApi.IEditorMark\");\r\n    if (!editorMark) {\r\n        return;\r\n    }\r\n    LiteApi::ITextEditor *textEditor = LiteApi::findExtensionObject<LiteApi::ITextEditor*>(editor,\"LiteApi.ITextEditor\");\r\n    if (!textEditor) {\r\n        return;\r\n    }\r\n    int line = textEditor->line();\r\n    QString fileName = editor->filePath();\r\n    if (fileName.isEmpty()) {\r\n        return;\r\n    }\r\n    QList<int> marks = editorMark->markTypesByLine(line);\r\n    if (marks.contains(LiteApi::BreakPointMarkType)) {\r\n        editorMark->removeMark(line,LiteApi::BreakPointMarkType);\r\n        m_fileBpMap.remove(fileName,line);\r\n        if (m_debugger && m_debugger->isRunning()) {\r\n            m_debugger->removeBreakPoint(fileName,line);\r\n        }\r\n    } else {\r\n        editorMark->addMark(line,LiteApi::BreakPointMarkType);\r\n        m_fileBpMap.insert(fileName,line);\r\n        if (m_debugger && m_debugger->isRunning()) {\r\n            m_debugger->insertBreakPoint(fileName,line);\r\n        }\r\n    }\r\n}\r\n\r\nvoid LiteDebug::clearLastLine()\r\n{\r\n    if (!m_lastLine.fileName.isEmpty()) {\r\n        LiteApi::IEditor *lastEditor = m_liteApp->editorManager()->findEditor(m_lastLine.fileName,true);\r\n        if (lastEditor) {\r\n            LiteApi::IEditorMark *lastMark = LiteApi::findExtensionObject<LiteApi::IEditorMark*>(lastEditor,\"LiteApi.IEditorMark\");\r\n            if (lastMark) {\r\n                lastMark->removeMark(m_lastLine.line,LiteApi::CurrentLineMarkType);\r\n            }\r\n        }\r\n    }\r\n    m_lastLine.fileName.clear();\r\n}\r\n\r\nvoid LiteDebug::debugLoaded()\r\n{\r\n    if (!m_debugInfoId.isEmpty()) {\r\n        m_dbgWidget->loadDebugInfo(m_debugInfoId);\r\n    }\r\n}\r\n\r\nvoid LiteDebug::debugStarted()\r\n{\r\n    m_startDebugAct->setEnabled(false);\r\n    m_continueAct->setEnabled(true);\r\n    m_stopDebugAct->setEnabled(true);\r\n    m_showLineAct->setEnabled(true);\r\n    m_stepOverAct->setEnabled(true);\r\n    m_stepIntoAct->setEnabled(true);\r\n    m_stepOutAct->setEnabled(true);\r\n    m_runToLineAct->setEnabled(true);\r\n    m_output->setReadOnly(false);\r\n    //m_liteApp->outputManager()->setCurrentOutput(m_output);\r\n    m_outputAct->setChecked(true);\r\n    m_widget->show();    \r\n    emit debugVisible(true);\r\n}\r\n\r\nvoid LiteDebug::debugStoped()\r\n{\r\n    m_startDebugAct->setEnabled(true);\r\n    m_continueAct->setEnabled(false);\r\n    m_stopDebugAct->setEnabled(false);\r\n    m_stepOverAct->setEnabled(false);\r\n    m_showLineAct->setEnabled(false);\r\n    m_stepIntoAct->setEnabled(false);\r\n    m_stepOutAct->setEnabled(false);\r\n    m_runToLineAct->setEnabled(false);\r\n    clearLastLine();\r\n    m_output->setReadOnly(true);\r\n    //m_liteApp->outputManager()->setCurrentOutput(m_output);\r\n    if (!m_debugInfoId.isEmpty())\r\n        m_dbgWidget->saveDebugInfo(m_debugInfoId);\r\n    m_widget->hide();\r\n\r\n    if (!m_startDebugFile.isEmpty()) {\r\n        m_liteApp->fileManager()->openEditor(m_startDebugFile,true);\r\n    }\r\n\r\n    if (!m_removeDebugFilePath.isEmpty()) {\r\n        QFile::remove(m_removeDebugFilePath);\r\n    }\r\n    m_removeDebugFilePath.clear();\r\n\r\n    emit debugVisible(false);\r\n\r\n    emit debugEnd();\r\n}\r\n\r\nvoid LiteDebug::setCurrentLine(const QString &fileName, int line)\r\n{ \r\n    bool center = true;\r\n    if (m_lastLine.fileName == fileName) {\r\n        center = false;\r\n    }\r\n    clearLastLine();\r\n    if (QFile::exists(fileName)) {\r\n        LiteApi::IEditor *editor = m_liteApp->fileManager()->openEditor(fileName,true);\r\n        if (editor) {\r\n            m_lastLine.fileName = fileName;\r\n            m_lastLine.line = line;\r\n            LiteApi::ITextEditor *textEditor = LiteApi::findExtensionObject<LiteApi::ITextEditor*>(editor,\"LiteApi.ITextEditor\");\r\n            if (textEditor) {\r\n                textEditor->gotoLine(line,0,center);\r\n            }\r\n            LiteApi::IEditorMark *editMark = LiteApi::findExtensionObject<LiteApi::IEditorMark*>(editor,\"LiteApi.IEditorMark\");\r\n            if (editMark) {\r\n                editMark->addMark(line,LiteApi::CurrentLineMarkType);\r\n            }\r\n        }\r\n    }\r\n    if (m_bLastDebugCmdInput) {\r\n        m_bLastDebugCmdInput = false;\r\n        m_dbgWidget->setInputFocus();\r\n    }\r\n}\r\n\r\nvoid LiteDebug::gotoLine(const QString &fileName, int line)\r\n{\r\n    if (QFile::exists(fileName)) {\r\n        LiteApi::IEditor *editor = m_liteApp->fileManager()->openEditor(fileName,true);\r\n        if (editor) {\r\n            LiteApi::ITextEditor *textEditor = LiteApi::findExtensionObject<LiteApi::ITextEditor*>(editor,\"LiteApi.ITextEditor\");\r\n            if (textEditor) {\r\n                textEditor->gotoLine(line,0,true);\r\n            }\r\n//            LiteApi::IEditorMark *editMark = LiteApi::findExtensionObject<LiteApi::IEditorMark*>(editor,\"LiteApi.IEditorMark\");\r\n//            if (editMark) {\r\n//                editMark->addMark(line,LiteApi::CurrentLineMarkType);\r\n//            }\r\n        }\r\n    }\r\n}\r\n\r\nvoid LiteDebug::debugCmdInput()\r\n{\r\n    m_bLastDebugCmdInput = true;\r\n}\r\n\r\nbool LiteDebug::execGocommand(const QStringList &args, const QString &work, bool showLog)\r\n{\r\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\r\n    QString gocmd = FileUtil::lookupGoBin(\"go\",m_liteApp,env,false);\r\n    if (gocmd.isEmpty()) {\r\n        debugLog(LiteApi::DebugRuntimeLog,QString(\"go command not find!\").arg(args.join(\" \"),work));\r\n        return false;\r\n    }\r\n    debugLog(LiteApi::DebugRuntimeLog,QString(\"%1 %2 [%3]\").arg(gocmd).arg(args.join(\" \"),work));\r\n    QProcess process;\r\n    process.setWorkingDirectory(work);\r\n    process.setEnvironment(LiteApi::getGoEnvironment(m_liteApp).toStringList());\r\n    process.start(gocmd,args);\r\n    if (!process.waitForFinished()) {\r\n        return false;\r\n    }\r\n    int code = process.exitCode();\r\n    if (code == 0) {\r\n        return true;\r\n    }\r\n    if (showLog) {\r\n        QByteArray data = process.readAllStandardError();\r\n        debugLog(LiteApi::DebugErrorLog,QString::fromUtf8(data));\r\n    }\r\n    return false;\r\n}\r\n\r\nvoid LiteDebug::enterAppInputText(QString text)\r\n{\r\n    if (m_debugger && m_debugger->isRunning()) {\r\n        m_debugger->enterAppText(text);\r\n    }\r\n}\r\n\r\n\r\nvoid LiteDebug::hideDebug()\r\n{\r\n    m_widget->hide();\r\n    emit debugVisible(false);\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/litedebug.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litedebug.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEDEBUG_H\n#define LITEDEBUG_H\n\n#include \"liteapi/liteapi.h\"\n#include \"litedebugapi/litedebugapi.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"litebuildapi/litebuildapi.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n#include \"textoutput/textoutput.h\"\n#include \"processex/processex.h\"\n\nclass DebugManager;\nclass DebugWidget;\nclass QLabel;\n\nstruct CurrentLine\n{\n    CurrentLine() : line(0)\n    {\n    }\n    QString  fileName;\n    int      line;\n};\n\nclass LiteDebug : public LiteApi::ILiteDebug\n{\n    Q_OBJECT\npublic:\n    explicit LiteDebug(LiteApi::IApplication *app, QObject *parent = 0);\n    virtual ~LiteDebug();\n    QWidget *widget();\n    bool canDebug(LiteApi::IEditor *editor) const;\n    virtual LiteApi::IDebuggerManager *debugManager() const;\n    virtual void startDebug(const QString &cmd, const QString &args, const QString &work);\n    virtual bool isRunning() const;\nsignals:\n    void debugVisible(bool);\npublic slots:\n    void hideDebug();\n    void appLoaded();\n    void selectedDebug(QAction *act);\n    void editorCreated(LiteApi::IEditor*);\n    void editorAboutToClose(LiteApi::IEditor*);\n    void currentEditorChanged(LiteApi::IEditor*);\n    void startDebugExternal();\n    virtual void startDebug();\n    virtual void continueRun();\n    virtual void runToLine();\n    virtual void stopDebug();\n    virtual void stepOver();\n    virtual void stepInto();\n    virtual void stepOut();\n    virtual void showLine();\n    virtual void toggleBreakPoint();\n    virtual void removeAllBreakPoints();\n    virtual void enterAppInputText(QString);\nprotected slots:\n    void setDebugger(LiteApi::IDebugger*);\n    void debugLoaded();\n    void debugLog(LiteApi::DEBUG_LOG_TYPE type, const QString &log);\n    void debugStarted();\n    void debugStoped();\n    void setCurrentLine(const QString &fileName, int line);\n    void gotoLine(const QString &fileName, int line);\n    void debugCmdInput();\nprotected:\n    bool execGocommand(const QStringList &args, const QString &work, bool showLog);\n    void clearLastLine();\n    bool m_bLastDebugCmdInput;\n    LiteApi::IApplication *m_liteApp;\n    LiteApi::IEnvManager *m_envManager;\n    LiteApi::ILiteBuild *m_liteBuild;    \n    LiteApi::IDebugger *m_debugger;\n    DebugManager *m_manager;\n    QWidget      *m_widget;\n    DebugWidget  *m_dbgWidget;\n    QMenu        *m_debugMenu;\n    TextOutput   *m_output;\n    QAction      *m_outputAct;\n    QAction *m_startDebugExternal;\n    QAction *m_startDebugAct;\n    QAction *m_stopDebugAct;\n    QAction *m_showLineAct;\n    QAction *m_stepIntoAct;\n    QAction *m_stepOverAct;\n    QAction *m_stepOutAct;\n    QAction *m_continueAct;\n    QAction *m_runToLineAct;\n    QAction *m_switchBreakAct;\n    QAction *m_removeAllBreakAct;\n    QStringList m_debugMimeTypes;\n    QString  m_debugInfoId;\n    QString  m_startDebugFile;\n    CurrentLine m_lastLine;\n    QMultiMap<QString,int> m_fileBpMap;\n    QString  m_removeDebugFilePath;\n};\n\n#endif // LITEDEBUG_H\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/litedebug.pro",
    "content": "TARGET = litedebug\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude(../../api/litedebugapi/litedebugapi.pri)\ninclude(../../api/litebuildapi/litebuildapi.pri)\ninclude(../../utils/fileutil/fileutil.pri)\ninclude(../../utils/textoutput/textoutput.pri)\ninclude(../../utils/colorstyle/colorstyle.pri)\ninclude(../../utils/symboltreeview/symboltreeview.pri)\n\n\nDEFINES += LITEDEBUG_LIBRARY\n\nSOURCES += litedebugplugin.cpp \\\n    debugmanager.cpp \\\n    debugwidget.cpp \\\n    litedebug.cpp \\\n    litedebugoptionfactory.cpp \\\n    litedebugoption.cpp \\\n    selectexternaldialog.cpp\n\nHEADERS += litedebugplugin.h\\\n        litedebug_global.h \\\n    debugmanager.h \\\n    debugwidget.h \\\n    litedebug.h \\\n    litedebugoptionfactory.h \\\n    litedebugoption.h \\\n    selectexternaldialog.h\n\nRESOURCES += \\\n    litedebug.qrc\n\nFORMS += \\\n    litedebugoption.ui \\\n    selectexternaldialog.ui\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/litedebug.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/litedebug\">\n        <file>images/breakmark.png</file>\n        <file>images/insertbreak.png</file>\n        <file>images/linemark.png</file>\n        <file>images/runtoline.png</file>\n        <file>images/stepinto.png</file>\n        <file>images/stepout.png</file>\n        <file>images/stepover.png</file>\n        <file>images/stopdebug.png</file>\n        <file>images/startdebug.png</file>\n        <file>images/showline.png</file>\n        <file>images/continue.png</file>\n    </qresource>\n</RCC>\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/litedebug_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litedebug_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEDEBUG_GLOBAL_H\n#define LITEDEBUG_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(LITEDEBUG_LIBRARY)\n#  define LITEDEBUGSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define LITEDEBUGSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#define OPTION_LITEDEBUG \"option/litedebug\"\n#define LITEDEBUG_REBUILD   \"litedebug/rebuild\"\n#define LITEDEBUG_CURDEBUGGER  \"litedebug/curdebugger\"\n#define LITEDEBUG_AUTOBREAKMAIN \"litedebug/autobreakmain\"\n\n#endif // LITEDEBUG_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/litedebugoption.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litedebugoption.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"litedebugoption.h\"\n#include \"ui_litedebugoption.h\"\n#include \"litedebug_global.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nLiteDebugOption::LiteDebugOption(LiteApi::IApplication *app,QObject *parent) :\n    LiteApi::IOption(parent),\n    m_liteApp(app),\n    m_widget(new QWidget),\n    ui(new Ui::LiteDebugOption)\n{\n    ui->setupUi(m_widget);\n}\n\nLiteDebugOption::~LiteDebugOption()\n{\n    delete m_widget;\n    delete ui;\n}\n\nQWidget *LiteDebugOption::widget()\n{\n    return m_widget;\n}\n\nQString LiteDebugOption::name() const\n{\n    return \"LiteDebug\";\n}\n\nQString LiteDebugOption::mimeType() const\n{\n    return OPTION_LITEDEBUG;\n}\n\nvoid LiteDebugOption::load()\n{\n    bool b = m_liteApp->settings()->value(LITEDEBUG_AUTOBREAKMAIN,false).toBool();\n    ui->autoBreakMainCheckBox->setChecked(b);\n}\n\nvoid LiteDebugOption::save()\n{\n    bool b = ui->autoBreakMainCheckBox->isChecked();\n    m_liteApp->settings()->setValue(LITEDEBUG_AUTOBREAKMAIN,b);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/litedebugoption.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litedebugoption.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEDEBUGOPTION_H\n#define LITEDEBUGOPTION_H\n\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class LiteDebugOption;\n}\n\nclass LiteDebugOption : public LiteApi::IOption\n{\n    Q_OBJECT\n\npublic:\n    explicit LiteDebugOption(LiteApi::IApplication *app, QObject *parent = 0);\n    ~LiteDebugOption();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void load();\n    virtual void save();\nprivate:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget           *m_widget;\n    Ui::LiteDebugOption *ui;\n};\n\n#endif // LITEDEBUGOPTION_H\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/litedebugoption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>LiteDebugOption</class>\n <widget class=\"QWidget\" name=\"LiteDebugOption\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>435</width>\n    <height>113</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox\">\n     <property name=\"title\">\n      <string>Debug</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n      <item>\n       <widget class=\"QCheckBox\" name=\"autoBreakMainCheckBox\">\n        <property name=\"text\">\n         <string>Automatically insert breakpoint main.main when debugging</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <spacer name=\"verticalSpacer\">\n        <property name=\"orientation\">\n         <enum>Qt::Vertical</enum>\n        </property>\n        <property name=\"sizeHint\" stdset=\"0\">\n         <size>\n          <width>20</width>\n          <height>40</height>\n         </size>\n        </property>\n       </spacer>\n      </item>\n     </layout>\n    </widget>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/litedebugoptionfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litedebugoptionfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"litedebugoption.h\"\n#include \"litedebugoptionfactory.h\"\n#include \"litedebug_global.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nLiteDebugOptionFactory::LiteDebugOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n}\n\nQStringList LiteDebugOptionFactory::mimeTypes() const\n{\n    return QStringList() << OPTION_LITEDEBUG;\n}\n\nLiteApi::IOption *LiteDebugOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == OPTION_LITEDEBUG) {\n        return new LiteDebugOption(m_liteApp,this);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/litedebugoptionfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litedebugoptionfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEDEBUGOPTIONFACTORY_H\n#define LITEDEBUGOPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass LiteDebugOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n    LiteDebugOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // LITEDEBUGOPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/litedebugplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litedebugplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"litedebugplugin.h\"\n#include \"litedebug.h\"\n#include \"litedebugoptionfactory.h\"\n#include <QMenu>\n#include <QLayout>\n#include <QAction>\n#include <QSplitter>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nLiteDebugPlugin::LiteDebugPlugin()\n{\n}\n\nbool LiteDebugPlugin::load(LiteApi::IApplication *app)\n{\n    app->optionManager()->addFactory(new LiteDebugOptionFactory(app,this));\n\n    QSplitter *splitter = LiteApi::findExtensionObject<QSplitter*>(app,\"LiteApi.QMainWindow.QSplitter\");\n    if (!splitter) {\n        return false;\n    }\n\n    m_liteDebug = new LiteDebug(app,this);\n    m_liteDebug->widget()->hide();\n    splitter->addWidget(m_liteDebug->widget());\n\n    m_viewDebug = new QAction(tr(\"Debug Window\"),this);\n    m_viewDebug->setCheckable(true);\n    connect(m_viewDebug,SIGNAL(triggered(bool)),m_liteDebug->widget(),SLOT(setVisible(bool)));\n    connect(m_liteDebug,SIGNAL(debugVisible(bool)),m_viewDebug,SLOT(setChecked(bool)));\n\n    app->actionManager()->insertViewMenu(LiteApi::ViewMenuBrowserPos,m_viewDebug);\n\n    return true;\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/litedebugplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litedebugplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEDEBUGPLUGIN_H\n#define LITEDEBUGPLUGIN_H\n\n#include \"litedebug_global.h\"\n#include \"liteapi/liteapi.h\"\n#include <QtPlugin>\n\nclass LiteDebug;\nclass LiteDebugPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    LiteDebugPlugin();\n    virtual bool load(LiteApi::IApplication *app);\nprotected:\n    LiteDebug *m_liteDebug;\n    QAction   *m_viewDebug;\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<LiteDebugPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.LiteDebugPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/LiteDebug\");\n        m_info->setName(\"LiteDebug\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setVer(\"X38.2\");\n        m_info->setInfo(\"Core Debug Manager\");\n        m_info->appendDepend(\"plugin/litebuild\");\n        m_info->appendDepend(\"plugin/litefind\");\n        m_info->setMustLoad(true);\n    }\n};\n\n#endif // LITEDEBUGPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/selectexternaldialog.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: selectexternaldialog.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"selectexternaldialog.h\"\n#include \"ui_selectexternaldialog.h\"\n#include <QFileDialog>\n#include <QFileInfo>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nSelectExternalDialog::SelectExternalDialog(LiteApi::IApplication *app, QWidget *parent) :\n    QDialog(parent),\n    m_liteApp(app),ui(new Ui::SelectExternalDialog)\n{\n    ui->setupUi(this);\n}\n\nSelectExternalDialog::~SelectExternalDialog()\n{\n\n    delete ui;\n}\n\nQString SelectExternalDialog::getCmd() const\n{\n    return ui->cmdLineEdit->text();\n}\n\nQString SelectExternalDialog::getArgs() const\n{\n    return ui->argsLineEdit->text();\n}\n\nQString SelectExternalDialog::getWork() const\n{\n    return ui->workLineEdit->text();\n}\n\nvoid SelectExternalDialog::loadSetting()\n{\n    ui->cmdLineEdit->setText(m_liteApp->settings()->value(\"litedebug/external/cmd\").toString());\n    ui->argsLineEdit->setText(m_liteApp->settings()->value(\"litedebug/external/args\").toString());\n    ui->workLineEdit->setText(m_liteApp->settings()->value(\"litedebug/external/work\").toString());\n}\n\nvoid SelectExternalDialog::saveSetting()\n{\n    m_liteApp->settings()->setValue(\"litedebug/external/cmd\",getCmd());\n    m_liteApp->settings()->setValue(\"litedebug/external/args\",getArgs());\n    m_liteApp->settings()->setValue(\"litedebug/external/work\",getWork());\n}\n\nvoid SelectExternalDialog::on_cmbPushButton_clicked()\n{\n    QString filePath = QFileDialog::getOpenFileName(this,tr(\"Select Executable\"));\n    if (!filePath.isEmpty()) {\n        ui->cmdLineEdit->setText(filePath);\n        QFileInfo info(filePath);\n        ui->workLineEdit->setText(info.path());\n    }\n}\n\nvoid SelectExternalDialog::on_workPushButton_clicked()\n{\n    QString path = QFileDialog::getExistingDirectory(this,tr(\"Select the working directory:\"));\n    if (!path.isEmpty()) {\n        ui->workLineEdit->setText(path);\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/selectexternaldialog.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: selectexternaldialog.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef SELECTEXTERNALDIALOG_H\n#define SELECTEXTERNALDIALOG_H\n\n#include <QDialog>\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\nclass SelectExternalDialog;\n}\n\nclass SelectExternalDialog : public QDialog\n{\n    Q_OBJECT\n    \npublic:\n    explicit SelectExternalDialog(LiteApi::IApplication *app, QWidget *parent = 0);\n    ~SelectExternalDialog();\n    QString getCmd() const;\n    QString getArgs() const;\n    QString getWork() const;\n    void loadSetting();\n    void saveSetting();\nprivate slots:\n    void on_cmbPushButton_clicked();\n    void on_workPushButton_clicked();\nprivate:\n    LiteApi::IApplication *m_liteApp;\n    Ui::SelectExternalDialog *ui;\n};\n\n#endif // SELECTEXTERNALDIALOG_H\n"
  },
  {
    "path": "liteidex/src/plugins/litedebug/selectexternaldialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>SelectExternalDialog</class>\n <widget class=\"QDialog\" name=\"SelectExternalDialog\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>398</width>\n    <height>127</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Debug External Application</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n   <item>\n    <layout class=\"QGridLayout\" name=\"gridLayout\">\n     <item row=\"0\" column=\"0\">\n      <widget class=\"QLabel\" name=\"label\">\n       <property name=\"text\">\n        <string>Application:</string>\n       </property>\n      </widget>\n     </item>\n     <item row=\"0\" column=\"2\">\n      <widget class=\"QPushButton\" name=\"cmbPushButton\">\n       <property name=\"text\">\n        <string>Browse...</string>\n       </property>\n      </widget>\n     </item>\n     <item row=\"1\" column=\"0\">\n      <widget class=\"QLabel\" name=\"label_2\">\n       <property name=\"text\">\n        <string>Arguments:</string>\n       </property>\n      </widget>\n     </item>\n     <item row=\"1\" column=\"1\">\n      <widget class=\"QLineEdit\" name=\"argsLineEdit\"/>\n     </item>\n     <item row=\"2\" column=\"0\">\n      <widget class=\"QLabel\" name=\"label_3\">\n       <property name=\"text\">\n        <string>Working directory:</string>\n       </property>\n      </widget>\n     </item>\n     <item row=\"2\" column=\"1\">\n      <widget class=\"QLineEdit\" name=\"workLineEdit\"/>\n     </item>\n     <item row=\"2\" column=\"2\">\n      <widget class=\"QPushButton\" name=\"workPushButton\">\n       <property name=\"text\">\n        <string>Browse...</string>\n       </property>\n      </widget>\n     </item>\n     <item row=\"0\" column=\"1\">\n      <widget class=\"QLineEdit\" name=\"cmdLineEdit\"/>\n     </item>\n    </layout>\n   </item>\n   <item>\n    <widget class=\"QDialogButtonBox\" name=\"buttonBox\">\n     <property name=\"orientation\">\n      <enum>Qt::Horizontal</enum>\n     </property>\n     <property name=\"standardButtons\">\n      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>\n     </property>\n    </widget>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections>\n  <connection>\n   <sender>buttonBox</sender>\n   <signal>accepted()</signal>\n   <receiver>SelectExternalDialog</receiver>\n   <slot>accept()</slot>\n   <hints>\n    <hint type=\"sourcelabel\">\n     <x>248</x>\n     <y>254</y>\n    </hint>\n    <hint type=\"destinationlabel\">\n     <x>157</x>\n     <y>274</y>\n    </hint>\n   </hints>\n  </connection>\n  <connection>\n   <sender>buttonBox</sender>\n   <signal>rejected()</signal>\n   <receiver>SelectExternalDialog</receiver>\n   <slot>reject()</slot>\n   <hints>\n    <hint type=\"sourcelabel\">\n     <x>316</x>\n     <y>260</y>\n    </hint>\n    <hint type=\"destinationlabel\">\n     <x>286</x>\n     <y>274</y>\n    </hint>\n   </hints>\n  </connection>\n </connections>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/codecompleter.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: codecompleter.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"codecompleter.h\"\r\n#include \"faketooltip.h\"\r\n#include <QApplication>\r\n#include <QListView>\r\n#include <QStandardItemModel>\r\n#include <QKeyEvent>\r\n#include <QVBoxLayout>\r\n#include <QScrollBar>\r\n#include <QSortFilterProxyModel>\r\n#include <QItemSelectionModel>\r\n#include <QDesktopWidget>\r\n#include <QItemDelegate>\r\n#include <QLabel>\r\n#include <QDebug>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nCodeCompleter::CodeCompleter(QObject *parent) :\r\n    QCompleter(parent)\r\n{\r\n    this->setCompletionMode(QCompleter::UnfilteredPopupCompletion);\r\n    this->setWrapAround(true);\r\n    m_popup = new QListView;\r\n    m_popup->setEditTriggers(QAbstractItemView::NoEditTriggers);\r\n    m_popup->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);\r\n    m_popup->setSelectionBehavior(QAbstractItemView::SelectRows);\r\n    m_popup->setSelectionMode(QAbstractItemView::SingleSelection);\r\n    m_popup->setModelColumn(0);\r\n    this->setPopup(m_popup);\r\n    m_proxy = new QSortFilterProxyModel(this);\r\n}\r\n\r\nCodeCompleter::~CodeCompleter()\r\n{\r\n}\r\n\r\nvoid CodeCompleter::setModel(QAbstractItemModel *c)\r\n{\r\n    m_proxy->setSourceModel(c);\r\n    QCompleter::setModel(m_proxy);\r\n}\r\n\r\nvoid CodeCompleter::setSeparator(const QString &separator)\r\n{\r\n    m_seperator = separator;\r\n}\r\n\r\nvoid CodeCompleter::setCompletionPrefix(const QString &prefix)\r\n{\r\n    QCompleter::setCompletionPrefix(prefix);\r\n}\r\n\r\nQString CodeCompleter::completionPrefix() const\r\n{\r\n    return QCompleter::completionPrefix();\r\n}\r\n\r\nvoid CodeCompleter::updateFilter()\r\n{\r\n\r\n}\r\n\r\nbool CodeCompleter::eventFilter(QObject *o, QEvent *e)\r\n{\r\n    switch (e->type()) {\r\n    case QEvent::KeyPress: {\r\n        QKeyEvent *ke = static_cast<QKeyEvent *>(e);\r\n        switch (ke->key()) {\r\n        case Qt::Key_Up:\r\n            if ( this->popup() && this->popup()->isVisible()) {\r\n                QModelIndex index = this->popup()->currentIndex();\r\n                if (index.isValid() && (index.row() == 0)) {\r\n                    this->popup()->setCurrentIndex(this->popup()->model()->index(this->popup()->model()->rowCount()-1,0));\r\n                    return true;\r\n                }\r\n            }\r\n            break;\r\n        case Qt::Key_Down:\r\n            if (this->popup() && this->popup()->isVisible()) {\r\n                QModelIndex index = this->popup()->currentIndex();\r\n                if (index.isValid() && (index.row() == this->popup()->model()->rowCount()-1)) {\r\n                    this->popup()->setCurrentIndex(this->popup()->model()->index(0,0));\r\n                    return true;\r\n                }\r\n            }\r\n            break;\r\n        default:\r\n            break;\r\n        }\r\n        break;\r\n    }\r\n    default:\r\n        break;\r\n    }\r\n    return QCompleter::eventFilter(o,e);\r\n}\r\n\r\nQString CodeCompleter::separator() const\r\n{\r\n    return m_seperator;\r\n}\r\n\r\nQStringList CodeCompleter::splitPath(const QString &path) const\r\n{\r\n    if (m_seperator.isNull()) {\r\n        return QCompleter::splitPath(path);\r\n    }\r\n    return path.split(m_seperator);\r\n}\r\n\r\nQString CodeCompleter::pathFromIndex(const QModelIndex &index) const\r\n{\r\n    if (m_seperator.isNull()) {\r\n        return QCompleter::pathFromIndex(index);\r\n    }\r\n\r\n    // navigate up and accumulate data\r\n    QStringList dataList;\r\n    for (QModelIndex i = index; i.isValid(); i = i.parent()) {\r\n        dataList.prepend(model()->data(i, completionRole()).toString());\r\n    }\r\n    return dataList.join(m_seperator);\r\n}\r\n\r\nclass CodeCompleterInfo : public FakeToolTip\r\n{\r\npublic:\r\n    CodeCompleterInfo(QWidget *parent = 0)\r\n        : FakeToolTip(parent), m_label(new QLabel(this))\r\n    {\r\n        QVBoxLayout *layout = new QVBoxLayout(this);\r\n        layout->setMargin(0);\r\n        layout->setSpacing(0);\r\n        layout->addWidget(m_label);\r\n\r\n        // Limit horizontal width\r\n        m_label->setSizePolicy(QSizePolicy::Fixed, m_label->sizePolicy().verticalPolicy());\r\n\r\n        m_label->setForegroundRole(QPalette::ToolTipText);\r\n        m_label->setBackgroundRole(QPalette::ToolTipBase);\r\n    }\r\n\r\n    void setText(const QString &text)\r\n    {\r\n        m_label->setText(text);\r\n    }\r\n\r\n    // Workaround QTCREATORBUG-11653\r\n    void calculateMaximumWidth()\r\n    {\r\n        const QDesktopWidget *desktopWidget = QApplication::desktop();\r\n        const int desktopWidth = desktopWidget->isVirtualDesktop()\r\n                ? desktopWidget->width()\r\n                : desktopWidget->availableGeometry(desktopWidget->primaryScreen()).width();\r\n        const QMargins widgetMargins = contentsMargins();\r\n        const QMargins layoutMargins = layout()->contentsMargins();\r\n        const int margins = widgetMargins.left() + widgetMargins.right()\r\n                + layoutMargins.left() + layoutMargins.right();\r\n        m_label->setMaximumWidth(desktopWidth - this->pos().x() - margins);\r\n    }\r\n\r\nprivate:\r\n    QLabel *m_label;\r\n};\r\n\r\nCodeCompleterListView::CodeCompleterListView(QWidget *parent)\r\n    : QListView(parent)\r\n{\r\n    setVerticalScrollMode(QAbstractItemView::ScrollPerItem);\r\n    m_infoFrame = new CodeCompleterInfo(this);\r\n    m_infoTimer.setInterval(100);\r\n    m_infoTimer.setSingleShot(true);\r\n    connect(&m_infoTimer, SIGNAL(timeout()), SLOT(maybeShowInfoTip()));\r\n}\r\n\r\nvoid CodeCompleterListView::setModel(QAbstractItemModel *model)\r\n{\r\n    QListView::setModel(model);\r\n    connect(this->selectionModel(),SIGNAL(currentChanged(QModelIndex,QModelIndex)),&m_infoTimer,SLOT(start()));\r\n}\r\n\r\nQSize CodeCompleterListView::calculateSize() const\r\n{\r\n    static const int maxVisibleItems = 10;\r\n\r\n    // Determine size by calculating the space of the visible items\r\n    const int visibleItems = qMin(model()->rowCount(), maxVisibleItems);\r\n    const int firstVisibleRow = verticalScrollBar()->value();\r\n\r\n    const QStyleOptionViewItem &option = viewOptions();\r\n    QSize shint;\r\n    for (int i = 0; i < visibleItems; ++i) {\r\n        QSize tmp = itemDelegate()->sizeHint(option, model()->index(i + firstVisibleRow, 0));\r\n        if (shint.width() < tmp.width())\r\n            shint = tmp;\r\n    }\r\n    shint.rheight() *= visibleItems;\r\n    return shint;\r\n}\r\n\r\nQPoint CodeCompleterListView::infoFramePos() const\r\n{\r\n    const QRect &r = rectForIndex(currentIndex());\r\n    int xoffset = this->frameWidth()+3;\r\n    int yoffset = this->frameWidth()-verticalOffset();\r\n    QScrollBar *vsb = this->verticalScrollBar();\r\n    if (vsb && vsb->isVisible())\r\n        xoffset += this->horizontalScrollBar()->sizeHint().height();\r\n    QPoint pt = this->mapToGlobal(r.topRight());\r\n    pt.rx() += xoffset;\r\n    pt.ry() += yoffset;\r\n    return pt;\r\n}\r\n\r\nvoid CodeCompleterListView::maybeShowInfoTip()\r\n{\r\n    const QModelIndex &current = this->currentIndex();\r\n    if (!current.isValid())\r\n        return;\r\n\r\n    if (!this->isVisible()) {\r\n        if (m_infoFrame->isVisible()) {\r\n            m_infoFrame->hide();\r\n        }\r\n        m_infoTimer.setInterval(100);\r\n        return;\r\n    }\r\n\r\n    const QString &infoTip = current.data(Qt::ToolTipRole).toString();\r\n    if (infoTip.isEmpty()) {\r\n        m_infoFrame->hide();\r\n        return;\r\n    }\r\n    m_infoFrame->move(this->infoFramePos());\r\n    m_infoFrame->setText(infoTip);\r\n    m_infoFrame->calculateMaximumWidth();\r\n    m_infoFrame->adjustSize();\r\n    m_infoFrame->show();\r\n    m_infoFrame->raise();\r\n    m_infoTimer.setInterval(0);\r\n}\r\n\r\nvoid CodeCompleterListView::hideEvent(QHideEvent *e)\r\n{\r\n    m_infoFrame->hide();\r\n    QListView::hideEvent(e);\r\n}\r\n\r\nclass CodeCompleterItemDelegate : public QItemDelegate\r\n{\r\npublic:\r\n    CodeCompleterItemDelegate(QAbstractItemView *view)\r\n        : QItemDelegate(view), view(view) { }\r\n    void paint(QPainter *p, const QStyleOptionViewItem& opt, const QModelIndex& idx) const {\r\n        QStyleOptionViewItem optCopy = opt;\r\n        optCopy.showDecorationSelected = true;\r\n        if (view->currentIndex() == idx)\r\n            optCopy.state |= QStyle::State_HasFocus;\r\n        QItemDelegate::paint(p, optCopy, idx);\r\n    }\r\n\r\nprivate:\r\n    QAbstractItemView *view;\r\n};\r\n\r\nCodeCompleterProxyModel::CodeCompleterProxyModel(QObject *parent)\r\n    : QAbstractListModel(parent),m_model(0)\r\n{\r\n    m_seperator = \"::\";\r\n    m_fuzzy = false;\r\n}\r\n\r\nCodeCompleterProxyModel::~CodeCompleterProxyModel()\r\n{\r\n    clearItems();\r\n}\r\n\r\nint CodeCompleterProxyModel::rowCount(const QModelIndex &) const\r\n{\r\n    return m_items.size();\r\n}\r\n\r\nQVariant CodeCompleterProxyModel::data(const QModelIndex &index, int role) const\r\n{\r\n    if (index.row() >= m_items.size())\r\n        return QVariant();\r\n    QStandardItem *item = m_items[index.row()];\r\n    if (role == Qt::DisplayRole) {\r\n        return item->text();\r\n    }\r\n    return item->data(role);\r\n}\r\n\r\nvoid CodeCompleterProxyModel::setSourceModel(QStandardItemModel *model)\r\n{\r\n    m_model = model;\r\n}\r\n\r\nvoid CodeCompleterProxyModel::setImportList(const QStringList &importList)\r\n{\r\n    m_importList = importList;\r\n}\r\n\r\nQStandardItemModel *CodeCompleterProxyModel::sourceModel() const\r\n{\r\n    return m_model;\r\n}\r\n\r\nQStandardItem *CodeCompleterProxyModel::item(const QModelIndex &index) const\r\n{\r\n    if (index.row() >= m_items.size())\r\n        return 0;\r\n    return m_items[index.row()];\r\n}\r\n\r\nbool CodeCompleterProxyModel::splitFilter(const QString &filter, QModelIndex &parent, QString &prefix, const QString &sep)\r\n{\r\n    if (filter.isEmpty()) {\r\n        parent = QModelIndex();\r\n        prefix = filter;\r\n        return true;\r\n    }\r\n    QStringList filterList = filter.split(sep);\r\n    if (filterList.size() == 1) {\r\n        parent = QModelIndex();\r\n        prefix = filter;\r\n        return true;\r\n    }\r\n    prefix = filterList.last();\r\n    filterList.removeLast();\r\n    QStandardItem *root = 0;\r\n    QStandardItem *item = 0;\r\n    foreach (QString word, filterList) {\r\n        item = 0;\r\n        QModelIndex parent = m_model->indexFromItem(root);\r\n        for (int i = 0; i < m_model->rowCount(parent); i++) {\r\n            QModelIndex index = m_model->index(i,0,parent);\r\n            QStandardItem *tmp = m_model->itemFromIndex(index);\r\n            if (tmp->text() == word) {\r\n                item = tmp;\r\n                break;\r\n            }\r\n        }\r\n        if (item == 0) {\r\n            break;\r\n        }\r\n        root = item;\r\n    }\r\n    if (!item) {\r\n        return false;\r\n    }\r\n    parent = m_model->indexFromItem(item);\r\n    return true;\r\n}\r\n\r\nvoid CodeCompleterProxyModel::clearItems()\r\n{\r\n    for (int i = 0; i < m_items.size(); i++) {\r\n        delete m_items[i];\r\n    }\r\n    m_items.clear();\r\n}\r\n\r\n//copy ContentLessThan from QtCreator source\r\nstruct ContentLessThan\r\n{\r\n    ContentLessThan(const QString &prefix)\r\n        : m_prefix(prefix)\r\n    {}\r\n\r\n    bool operator()(const QStandardItem *a, const QStandardItem *b)\r\n    {\r\n        // The order is case-insensitive in principle, but case-sensitive when this\r\n        // would otherwise mean equality\r\n        const QString &lowera = a->text().toLower();\r\n        const QString &lowerb = b->text().toLower();\r\n\r\n        if (!m_prefix.isEmpty()) {\r\n            const QString &lowerprefix = m_prefix.toLower();\r\n\r\n            // All continuations should go before all fuzzy matches\r\n            if (int diff = lowera.startsWith(lowerprefix) - lowerb.startsWith(lowerprefix))\r\n                return diff > 0;\r\n            if (int diff = a->text().startsWith(m_prefix) - b->text().startsWith(m_prefix))\r\n                return diff > 0;\r\n        }\r\n        if (lowera == lowerb)\r\n            return lessThan(a->text(), b->text());\r\n        else\r\n            return lessThan(lowera, lowerb);\r\n    }\r\n\r\n    bool lessThan(const QString &a, const QString &b)\r\n    {\r\n        QString::const_iterator pa = a.begin();\r\n        QString::const_iterator pb = b.begin();\r\n\r\n        CharLessThan charLessThan;\r\n        enum { Letter, SmallerNumber, BiggerNumber } state = Letter;\r\n        for (; pa != a.end() && pb != b.end(); ++pa, ++pb) {\r\n            if (*pa == *pb)\r\n                continue;\r\n            if (state != Letter) {\r\n                if (!pa->isDigit() || !pb->isDigit())\r\n                    break;\r\n            } else if (pa->isDigit() && pb->isDigit()) {\r\n                if (charLessThan(*pa, *pb))\r\n                    state = SmallerNumber;\r\n                else\r\n                    state = BiggerNumber;\r\n            } else {\r\n                return charLessThan(*pa, *pb);\r\n            }\r\n        }\r\n\r\n        if (state == Letter)\r\n            return pa == a.end() && pb != b.end();\r\n        if (pa != a.end() && pa->isDigit())\r\n            return false;                   //more digits\r\n        if (pb != b.end() && pb->isDigit())\r\n            return true;                    //fewer digits\r\n        return state == SmallerNumber;      //same length, compare first different digit in the sequence\r\n    }\r\n\r\n    struct CharLessThan\r\n    {\r\n        bool operator()(const QChar &a, const QChar &b)\r\n        {\r\n            if (a == QLatin1Char('_'))\r\n                return false;\r\n            else if (b == QLatin1Char('_'))\r\n                return true;\r\n            else\r\n                return a < b;\r\n        }\r\n    };\r\n\r\nprivate:\r\n    QString m_prefix;\r\n};\r\n\r\nint CodeCompleterProxyModel::filter(const QString &filter, int cs, LiteApi::CompletionContext ctx)\r\n{\r\n    if (!m_model) {\r\n        return 0;\r\n    }\r\n\r\n    clearItems();\r\n    if (ctx == LiteApi::CompleterImportContext) {\r\n        QIcon icon(\"icon:liteeditor/images/keyword.png\");\r\n        if (filter.isEmpty()) {\r\n            foreach (QString import, m_importList) {\r\n                m_items.append(new QStandardItem(icon,import));\r\n            }\r\n            return m_items.size();\r\n        }\r\n        QList<QStandardItem*> best;\r\n        QList<QStandardItem*> second;\r\n        QList<QStandardItem*> other;\r\n        int sep = filter.lastIndexOf(\"/\");\r\n        QString root = filter.left(sep+1);\r\n        QString check = filter.mid(sep+1);\r\n        foreach (QString import, m_importList) {\r\n            if (import.startsWith(root)) {\r\n                QString text = import.mid(sep+1);\r\n                if (text.contains(\"/\")) {\r\n                    foreach (QString path, text.split(\"/\")) {\r\n                        int n = path.indexOf(check);\r\n                        if (n == 0) {\r\n                            if (check == path) {\r\n                                best.append(new QStandardItem(icon,import));\r\n                            } else {\r\n                                second.append(new QStandardItem(icon,import));\r\n                            }\r\n                            break;\r\n                        } else if (n > 0) {\r\n                            other.append(new QStandardItem(icon,import));\r\n                            break;\r\n                        }\r\n                    }\r\n                } else {\r\n                    int n = text.indexOf(check);\r\n                    if (n == 0) {\r\n                        if (check == text) {\r\n                            best.append(new QStandardItem(icon,import));\r\n                        } else {\r\n                            second.append(new QStandardItem(icon,import));\r\n                        }\r\n                    } else if (n > 0) {\r\n                        other.append(new QStandardItem(icon,import));\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        qStableSort(best.begin(), best.end(), ContentLessThan(filter));\r\n        qStableSort(second.begin(), second.end(), ContentLessThan(filter));\r\n        qStableSort(other.begin(), other.end(), ContentLessThan(filter));\r\n        m_items.append(best);\r\n        m_items.append(second);\r\n        m_items.append(other);\r\n        return m_items.size();\r\n    }\r\n    QModelIndex parentIndex;\r\n    QString prefix;\r\n    if (!splitFilter(filter,parentIndex,prefix,m_seperator)) {\r\n        return 0;\r\n    }\r\n    m_prefix = prefix;\r\n    if (prefix.isEmpty()) {\r\n        int count = m_model->rowCount(parentIndex);\r\n        for (int i = 0; i < count; i++) {\r\n            QModelIndex index = m_model->index(i,0,parentIndex);\r\n            QStandardItem *item = m_model->itemFromIndex(index);\r\n            m_items.append(item->clone());\r\n        }\r\n        qStableSort(m_items.begin(), m_items.end(), ContentLessThan(prefix));\r\n        return m_items.size();\r\n    }\r\n\r\n    //fuzzy completer\r\n    if (m_fuzzy) {\r\n        if (!prefix.isEmpty() && !( prefix[0].isLetter() || prefix[0] == '_') ) {\r\n            return 0;\r\n        }\r\n        QString keyRegExp;\r\n        if (!parentIndex.isValid()) {\r\n            keyRegExp = \"^\";\r\n        }\r\n        foreach (const QChar &c, prefix) {\r\n            keyRegExp += c;\r\n            keyRegExp += \"[0-9a-z_]*\";\r\n        }\r\n\r\n        QRegExp regExp(keyRegExp);\r\n        regExp.setCaseSensitivity(Qt::CaseInsensitive);\r\n\r\n        int count = m_model->rowCount(parentIndex);\r\n        QList<QStandardItem*> otherItems;\r\n        for (int i = 0; i < count; i++) {\r\n            QModelIndex index = m_model->index(i,0,parentIndex);\r\n            QStandardItem *item = m_model->itemFromIndex(index);\r\n            int n = regExp.indexIn(item->text());\r\n            if (n == 0) {\r\n                m_items.append(item->clone());\r\n            } else if (n > 0) {\r\n                otherItems.append(item->clone());\r\n            }\r\n        }\r\n        qStableSort(m_items.begin(), m_items.end(), ContentLessThan(prefix));\r\n        qStableSort(otherItems.begin(), otherItems.end(), ContentLessThan(prefix));\r\n        m_items.append(otherItems);\r\n        return m_items.size();\r\n    }\r\n\r\n    QString keyRegExp;\r\n    keyRegExp += QLatin1Char('^');\r\n    bool first = true;\r\n    const QLatin1String uppercaseWordContinuation(\"[a-z0-9_]*\");\r\n    const QLatin1String lowercaseWordContinuation(\"(?:[a-zA-Z0-9]*_)?\");\r\n    foreach (const QChar &c, prefix) {\r\n        if (cs == LiteApi::CaseInsensitive ||\r\n                (cs == LiteApi::FirstLetterCaseSensitive && !first)) {\r\n\r\n            keyRegExp += QLatin1String(\"(?:\");\r\n            if (!first)\r\n                keyRegExp += uppercaseWordContinuation;\r\n            keyRegExp += QRegExp::escape(c.toUpper());\r\n            keyRegExp += QLatin1Char('|');\r\n            if (!first)\r\n                keyRegExp += lowercaseWordContinuation;\r\n            keyRegExp += QRegExp::escape(c.toLower());\r\n            keyRegExp += QLatin1Char(')');\r\n        } else {\r\n            if (!first) {\r\n                if (c.isUpper())\r\n                    keyRegExp += uppercaseWordContinuation;\r\n                else\r\n                    keyRegExp += lowercaseWordContinuation;\r\n            }\r\n            keyRegExp += QRegExp::escape(c);\r\n        }\r\n\r\n        first = false;\r\n    }\r\n\r\n    QRegExp regExp(keyRegExp);\r\n\r\n    int count = m_model->rowCount(parentIndex);\r\n    for (int i = 0; i < count; i++) {\r\n        QModelIndex index = m_model->index(i,0,parentIndex);\r\n        QStandardItem *item = m_model->itemFromIndex(index);\r\n        if (regExp.indexIn(item->text()) == 0) {\r\n            m_items.append(item->clone());\r\n        }\r\n    }\r\n    qStableSort(m_items.begin(), m_items.end(), ContentLessThan(prefix));\r\n\r\n    return m_items.size();\r\n}\r\n\r\nvoid CodeCompleterProxyModel::setSeparator(const QString &separator)\r\n{\r\n    m_seperator = separator;\r\n}\r\n\r\nQString CodeCompleterProxyModel::separator() const\r\n{\r\n    return m_seperator;\r\n}\r\n\r\nvoid CodeCompleterProxyModel::setFuzzy(bool b)\r\n{\r\n    m_fuzzy = b;\r\n}\r\n\r\nbool CodeCompleterProxyModel::isFuzzy() const\r\n{\r\n    return m_fuzzy;\r\n}\r\n\r\nQString CodeCompleterProxyModel::lastPrefix() const\r\n{\r\n    return m_prefix;\r\n}\r\n\r\nCodeCompleterEx::CodeCompleterEx(QObject *parent)\r\n    : QObject(parent), m_widget(0)\r\n{\r\n    maxVisibleItems = 10;\r\n    m_eatFocusOut = true;\r\n    m_hiddenBecauseNoMatch = false;\r\n    m_cs = Qt::CaseInsensitive;\r\n    m_ctx = LiteApi::CompleterCodeContext;\r\n    m_wrap = true;\r\n    m_popup = new CodeCompleterListView;\r\n    m_popup->setUniformItemSizes(true);\r\n    m_popup->setEditTriggers(QAbstractItemView::NoEditTriggers);\r\n    m_popup->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);\r\n    m_popup->setSelectionBehavior(QAbstractItemView::SelectRows);\r\n    m_popup->setSelectionMode(QAbstractItemView::SingleSelection);\r\n    m_popup->setItemDelegate(new CodeCompleterItemDelegate(m_popup));\r\n    m_popup->setModelColumn(0);\r\n\r\n    m_popup->setParent(0, Qt::Popup);\r\n    m_popup->setFocusPolicy(Qt::NoFocus);\r\n\r\n    m_popup->installEventFilter(this);\r\n\r\n    m_proxy = new CodeCompleterProxyModel(this);\r\n    m_popup->setModel(m_proxy);\r\n\r\n    QObject::connect(m_popup, SIGNAL(clicked(QModelIndex)),\r\n                     this, SLOT(completerActivated(QModelIndex)));\r\n    QObject::connect(m_popup, SIGNAL(activated(QModelIndex)),\r\n                     m_popup, SLOT(hide()));\r\n\r\n}\r\n\r\nCodeCompleterEx::~CodeCompleterEx()\r\n{\r\n    if (m_popup) {\r\n        delete m_popup;\r\n    }\r\n}\r\n\r\nvoid CodeCompleterEx::setModel(QStandardItemModel *c)\r\n{\r\n    m_proxy->setSourceModel(c);\r\n}\r\n\r\nQAbstractItemModel *CodeCompleterEx::model() const\r\n{\r\n    return m_proxy->sourceModel();\r\n}\r\n\r\nvoid CodeCompleterEx::setImportList(const QStringList &importList)\r\n{\r\n    m_proxy->setImportList(importList);\r\n}\r\n\r\nvoid CodeCompleterEx::setSeparator(const QString &separator)\r\n{\r\n    m_proxy->setSeparator(separator);\r\n}\r\n\r\nQString CodeCompleterEx::separator() const\r\n{\r\n    return m_proxy->separator();\r\n}\r\n\r\nvoid CodeCompleterEx::setCompletionPrefix(const QString &prefix)\r\n{\r\n    m_prefix = prefix;\r\n    if (m_proxy->filter(prefix,m_cs,m_ctx) <= 0) {\r\n        if (m_popup->isVisible()) {\r\n            m_popup->close();\r\n        }\r\n        return;\r\n    }\r\n    m_popup->reset();\r\n}\r\n\r\nQString CodeCompleterEx::completionPrefix() const\r\n{\r\n    return m_prefix;\r\n}\r\n\r\nQString CodeCompleterEx::lastPrefix() const\r\n{\r\n    return m_proxy->lastPrefix();\r\n}\r\n\r\nvoid CodeCompleterEx::setCompletionContext(LiteApi::CompletionContext ctx)\r\n{\r\n    m_ctx = ctx;\r\n}\r\n\r\nLiteApi::CompletionContext CodeCompleterEx::completionContext() const\r\n{\r\n    return m_ctx;\r\n}\r\n\r\nvoid CodeCompleterEx::updateFilter()\r\n{\r\n    if (m_proxy->filter(m_prefix,m_cs) <= 0) {\r\n        if (m_popup->isVisible()) {\r\n            m_popup->close();\r\n        }\r\n        return;\r\n    }\r\n    m_popup->reset();\r\n}\r\n\r\nvoid CodeCompleterEx::complete(const QRect &rect)\r\n{\r\n    if (m_proxy->rowCount() == 0) {\r\n        return;\r\n    }\r\n\r\n    const QRect screen = QApplication::desktop()->availableGeometry(m_widget);\r\n    Qt::LayoutDirection dir = m_widget->layoutDirection();\r\n    QPoint pos;\r\n    int rh, w;\r\n    int h = (m_popup->sizeHintForRow(0) * qMin(maxVisibleItems, m_popup->model()->rowCount()) + 3)+3;\r\n    QScrollBar *hsb = m_popup->horizontalScrollBar();\r\n    if (hsb && hsb->isVisible())\r\n        h += m_popup->horizontalScrollBar()->sizeHint().height();\r\n\r\n    if (rect.isValid()) {\r\n        rh = rect.height();\r\n        w = rect.width();\r\n        pos = m_widget->mapToGlobal(dir == Qt::RightToLeft ? rect.bottomRight() : rect.bottomLeft());\r\n    } else {\r\n        rh = m_widget->height();\r\n        pos = m_widget->mapToGlobal(QPoint(0, m_widget->height() - 2));\r\n        w = m_widget->width();\r\n    }\r\n\r\n    if (w > screen.width())\r\n        w = screen.width();\r\n    if ((pos.x() + w) > (screen.x() + screen.width()))\r\n        pos.setX(screen.x() + screen.width() - w);\r\n    if (pos.x() < screen.x())\r\n        pos.setX(screen.x());\r\n\r\n    int top = pos.y() - rh - screen.top() + 2;\r\n    int bottom = screen.bottom() - pos.y();\r\n    h = qMax(h, m_popup->minimumHeight());\r\n    if (h > bottom) {\r\n        h = qMin(qMax(top, bottom), h);\r\n\r\n        if (top > bottom)\r\n            pos.setY(pos.y() - h - rh + 2);\r\n    }\r\n    w = qMax(w,200);\r\n    m_popup->setGeometry(pos.x(), pos.y(), w, h);\r\n\r\n    if (!m_popup->isVisible())\r\n        m_popup->show();\r\n}\r\n\r\nQWidget *CodeCompleterEx::widget() const\r\n{\r\n    return m_widget;\r\n}\r\n\r\nvoid CodeCompleterEx::setWidget(QWidget *widget)\r\n{\r\n    if (m_widget == widget) {\r\n        return;\r\n    }\r\n    if (m_widget) {\r\n        m_widget->removeEventFilter(this);\r\n    }\r\n    m_widget = widget;\r\n//    Qt::FocusPolicy origPolicy = Qt::NoFocus;\r\n//    if (widget)\r\n//        origPolicy = widget->focusPolicy();\r\n//    m_popup->setParent(0, Qt::Popup);\r\n//    m_popup->setFocusPolicy(Qt::NoFocus);\r\n//    if (widget)\r\n//        widget->setFocusPolicy(origPolicy);\r\n    if (m_widget) {\r\n        m_widget->installEventFilter(this);\r\n        m_popup->setFocusProxy(m_widget);\r\n    }\r\n}\r\n\r\nQModelIndex CodeCompleterEx::currentIndex() const\r\n{\r\n    return m_popup->currentIndex();\r\n}\r\n\r\nQString CodeCompleterEx::currentCompletion() const\r\n{\r\n    QModelIndex index = m_popup->currentIndex();\r\n    if (index.isValid()) {\r\n        QStandardItem *item = m_proxy->item(index);\r\n        if (item) {\r\n            return item->text();\r\n        }\r\n    }\r\n    return QString();\r\n}\r\n\r\nvoid CodeCompleterEx::setCaseSensitivity(Qt::CaseSensitivity cs)\r\n{\r\n    m_cs = cs;\r\n}\r\n\r\nQt::CaseSensitivity CodeCompleterEx::caseSensitivity() const\r\n{\r\n    return m_cs;\r\n}\r\n\r\nQAbstractItemView *CodeCompleterEx::popup() const\r\n{\r\n    return m_popup;\r\n}\r\n\r\nQAbstractItemModel *CodeCompleterEx::completionModel() const\r\n{\r\n    return m_proxy;\r\n}\r\n\r\nvoid CodeCompleterEx::setWrapAround(bool wrap)\r\n{\r\n    m_wrap = wrap;\r\n}\r\n\r\nbool CodeCompleterEx::wrapAround() const\r\n{\r\n    return m_wrap;\r\n}\r\n\r\nvoid CodeCompleterEx::setFuzzy(bool b)\r\n{\r\n    m_proxy->setFuzzy(b);\r\n}\r\n\r\nbool CodeCompleterEx::isFuzzy() const\r\n{\r\n    return m_proxy->isFuzzy();\r\n}\r\n\r\nvoid CodeCompleterEx::completerActivated(QModelIndex index)\r\n{\r\n    if (m_popup->isVisible()) {\r\n        m_popup->close();\r\n    }\r\n    emit activated(index);\r\n}\r\n\r\nbool CodeCompleterEx::eventFilter(QObject *o, QEvent *e)\r\n{\r\n    if (m_eatFocusOut && o == m_widget && e->type() == QEvent::FocusOut) {\r\n        m_hiddenBecauseNoMatch = false;\r\n        if (m_popup && m_popup->isVisible())\r\n            return true;\r\n    }\r\n\r\n    if (o != m_popup)\r\n        return QObject::eventFilter(o, e);\r\n\r\n    switch (e->type()) {\r\n    case QEvent::KeyPress: {\r\n        QKeyEvent *ke = static_cast<QKeyEvent *>(e);\r\n\r\n        QModelIndex curIndex = m_popup->currentIndex();\r\n        //QModelIndexList selList = m_popup->selectionModel()->selectedIndexes();\r\n\r\n        const int key = ke->key();\r\n        // In UnFilteredPopup mode, select the current item\r\n//        if ((key == Qt::Key_Up || key == Qt::Key_Down) && selList.isEmpty() && curIndex.isValid()\r\n//            && m_mode == QCompleter::UnfilteredPopupCompletion) {\r\n//            m_popup->setCurrentIndex(curIndex);\r\n//              return true;\r\n//        }\r\n\r\n        // Handle popup navigation keys. These are hardcoded because up/down might make the\r\n        // widget do something else (lineedit cursor moves to home/end on mac, for instance)\r\n        switch (key) {\r\n        case Qt::Key_End:\r\n        case Qt::Key_Home:\r\n            if (ke->modifiers() & Qt::ControlModifier)\r\n                return false;\r\n            break;\r\n        case Qt::Key_N:\r\n        case Qt::Key_P:\r\n            // select next/previous completion\r\n            if (ke->modifiers() == Qt::ControlModifier) {\r\n                int change = (ke->key() == Qt::Key_N) ? 1 : -1;\r\n                int nrows = m_proxy->rowCount();\r\n                int row = m_popup->currentIndex().row();\r\n                int newRow = (row + change + nrows) % nrows;\r\n                if (newRow == row + change || !ke->isAutoRepeat()) {\r\n                    QModelIndex index = m_proxy->index(newRow, 0);\r\n                    m_popup->setCurrentIndex(index);\r\n                }\r\n                return true;\r\n            }\r\n            break;\r\n\r\n        case Qt::Key_Up:\r\n            if (curIndex.row() == 0) {\r\n                if (m_wrap) {\r\n                    int rowCount = m_proxy->rowCount();\r\n                    QModelIndex lastIndex = m_proxy->index(rowCount - 1, 0);\r\n                    m_popup->setCurrentIndex(lastIndex);\r\n                }\r\n                return true;\r\n            }\r\n            return false;\r\n\r\n        case Qt::Key_Down:\r\n            if (curIndex.row() == m_proxy->rowCount() - 1) {\r\n                if (m_wrap) {\r\n                    QModelIndex firstIndex = m_proxy->index(0, 0);\r\n                    m_popup->setCurrentIndex(firstIndex);\r\n                }\r\n                return true;\r\n            }\r\n            return false;\r\n\r\n        case Qt::Key_PageUp:\r\n        case Qt::Key_PageDown:\r\n            return false;\r\n        }\r\n\r\n        // Send the event to the widget. If the widget accepted the event, do nothing\r\n        // If the widget did not accept the event, provide a default implementation\r\n        m_eatFocusOut = false;\r\n        (static_cast<QObject *>(m_widget))->event(ke);\r\n        m_eatFocusOut = true;\r\n        if (!m_widget || e->isAccepted() || !m_popup->isVisible()) {\r\n            // widget lost focus, hide the popup\r\n            if (m_widget && (!m_widget->hasFocus()\r\n#ifdef QT_KEYPAD_NAVIGATION\r\n                || (QApplication::keypadNavigationEnabled() && !m_widget->hasEditFocus())\r\n#endif\r\n                ))\r\n                m_popup->hide();\r\n            if (e->isAccepted())\r\n                return true;\r\n        }\r\n\r\n        // default implementation for keys not handled by the widget when popup is open\r\n        switch (key) {\r\n#ifdef QT_KEYPAD_NAVIGATION\r\n        case Qt::Key_Select:\r\n            if (!QApplication::keypadNavigationEnabled())\r\n                break;\r\n#endif\r\n        case Qt::Key_Return:\r\n        case Qt::Key_Enter:\r\n        case Qt::Key_Tab:\r\n            m_popup->hide();\r\n            if (curIndex.isValid())\r\n                //m__q_complete(curIndex);\r\n                this->completerActivated(curIndex);\r\n            break;\r\n\r\n        case Qt::Key_F4:\r\n            if (ke->modifiers() & Qt::AltModifier)\r\n                m_popup->hide();\r\n            break;\r\n\r\n        case Qt::Key_Backtab:\r\n        case Qt::Key_Escape:\r\n            m_popup->hide();\r\n            break;\r\n\r\n        default:\r\n            break;\r\n        }\r\n\r\n        return true;\r\n    }\r\n\r\n#ifdef QT_KEYPAD_NAVIGATION\r\n    case QEvent::KeyRelease: {\r\n        QKeyEvent *ke = static_cast<QKeyEvent *>(e);\r\n        if (QApplication::keypadNavigationEnabled() && ke->key() == Qt::Key_Back) {\r\n            // Send the event to the 'widget'. This is what we did for KeyPress, so we need\r\n            // to do the same for KeyRelease, in case the widget's KeyPress event set\r\n            // up something (such as a timer) that is relying on also receiving the\r\n            // key release. I see this as a bug in Qt, and should really set it up for all\r\n            // the affected keys. However, it is difficult to tell how this will affect\r\n            // existing code, and I can't test for every combination!\r\n            m_eatFocusOut = false;\r\n            static_cast<QObject *>(m_widget)->event(ke);\r\n            m_eatFocusOut = true;\r\n        }\r\n        break;\r\n    }\r\n#endif\r\n    case QEvent::MouseButtonPress: {\r\n#ifdef QT_KEYPAD_NAVIGATION\r\n        if (QApplication::keypadNavigationEnabled()) {\r\n            // if we've clicked in the widget (or its descendant), let it handle the click\r\n            QWidget *source = qobject_cast<QWidget *>(o);\r\n            if (source) {\r\n                QPoint pos = source->mapToGlobal((static_cast<QMouseEvent *>(e))->pos());\r\n                QWidget *target = QApplication::widgetAt(pos);\r\n                if (target && (m_widget->isAncestorOf(target) ||\r\n                    target == m_widget)) {\r\n                    m_eatFocusOut = false;\r\n                    static_cast<QObject *>(target)->event(e);\r\n                    m_eatFocusOut = true;\r\n                    return true;\r\n                }\r\n            }\r\n        }\r\n#endif\r\n        if (!m_popup->underMouse()) {\r\n            m_popup->hide();\r\n            return true;\r\n        }\r\n        }\r\n        return false;\r\n\r\n    case QEvent::InputMethod:\r\n        QApplication::sendEvent(m_widget, e);\r\n        break;\r\n    case QEvent::ShortcutOverride:    {\r\n        QKeyEvent *ke = static_cast<QKeyEvent *>(e);\r\n        switch (ke->key()) {\r\n        case Qt::Key_Escape:\r\n            e->accept();\r\n            return  true;\r\n        case Qt::Key_N:\r\n        case Qt::Key_P:\r\n            if (ke->modifiers() == Qt::ControlModifier) {\r\n                e->accept();\r\n                return true;\r\n            }\r\n        }\r\n        QApplication::sendEvent(m_widget, e);\r\n        break;\r\n        }\r\n    default:\r\n        return false;\r\n    }\r\n    return false;\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/codecompleter.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: codecompleter.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef CODECOMPLETER_H\r\n#define CODECOMPLETER_H\r\n\r\n#include <QCompleter>\r\n#include <QTimer>\r\n#include <QListView>\r\n#include \"liteapi/liteapi.h\"\r\n#include \"liteeditorapi/liteeditorapi.h\"\r\n\r\nclass QListView;\r\nclass QKeyEvent;\r\nclass QStandardItemModel;\r\nclass QStandardItem;\r\nclass QSortFilterProxyModel;\r\nclass CodeCompleter : public QCompleter\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    explicit CodeCompleter(QObject *parent = 0);\r\n    virtual ~CodeCompleter();\r\n    void setModel(QAbstractItemModel *c);\r\n    QString separator() const;\r\n    void setSeparator(const QString &separator);\r\n    void setCompletionPrefix(const QString &prefix);\r\n    QString completionPrefix() const;\r\n    void updateFilter();\r\nprotected:\r\n    virtual bool eventFilter(QObject *o, QEvent *e);\r\n    virtual QStringList splitPath(const QString &path) const;\r\n    virtual QString pathFromIndex(const QModelIndex &index) const;\r\nprivate:\r\n    QSortFilterProxyModel *m_proxy;\r\n    QListView *m_popup;\r\n    QString m_seperator;\r\n    QString m_prefix;\r\n};\r\n\r\nnamespace LiteApi {\r\n    enum CaseSensitivity {\r\n        CaseInsensitive,\r\n        CaseSensitive,\r\n        FirstLetterCaseSensitive\r\n    };\r\n}\r\n\r\nclass CodeCompleterInfo;\r\nclass CodeCompleterListView : public QListView\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    CodeCompleterListView(QWidget *parent = 0);\r\n    virtual void setModel(QAbstractItemModel *model);\r\n    QSize calculateSize() const;\r\n    QPoint infoFramePos() const;\r\npublic slots:\r\n    void maybeShowInfoTip();\r\nprotected:\r\n    virtual void hideEvent(QHideEvent *);\r\n    CodeCompleterInfo  *m_infoFrame;\r\n    QTimer              m_infoTimer;\r\n};\r\n\r\nclass CodeCompleterProxyModel : public QAbstractListModel\r\n{\r\npublic:\r\n    CodeCompleterProxyModel(QObject *parent = 0);\r\n    virtual ~CodeCompleterProxyModel();\r\n    virtual int rowCount(const QModelIndex & index = QModelIndex()) const;\r\n    virtual QVariant data(const QModelIndex &index, int role) const;\r\n    void setSourceModel(QStandardItemModel *sourceModel);\r\n    void setImportList(const QStringList &importList);\r\n    QStandardItemModel *sourceModel() const;\r\n    QStandardItem* item(const QModelIndex &index) const;\r\n    int filter(const QString &filter, int cs = LiteApi::CaseInsensitive, LiteApi::CompletionContext ctx = LiteApi::CompleterCodeContext);\r\n    void setSeparator(const QString &separator);\r\n    QString separator() const;\r\n    void setFuzzy(bool b);\r\n    bool isFuzzy() const;\r\n    QString lastPrefix() const;\r\nprotected:\r\n    bool splitFilter(const QString &filter, QModelIndex &parent, QString &lastPrefix, const QString &sep = \".\");\r\n    void clearItems();\r\n    QList<QStandardItem*> m_items;\r\n    QStringList         m_importList;\r\n    QStandardItemModel *m_model;\r\n    QString             m_seperator;\r\n    QString             m_prefix;\r\n    bool                m_fuzzy;\r\n};\r\n\r\nclass CodeCompleterEx : public QObject\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    CodeCompleterEx(QObject *parent = 0);\r\n    virtual ~CodeCompleterEx();\r\n    void setModel(QStandardItemModel *c);\r\n    QAbstractItemModel *model() const;\r\n    void setImportList(const QStringList &importList);\r\n    void setSeparator(const QString &separator);\r\n    QString separator() const;\r\n    void setCompletionPrefix(const QString &prefix);\r\n    QString completionPrefix() const;\r\n    QString lastPrefix() const;\r\n    void setCompletionContext(LiteApi::CompletionContext ctx);\r\n    LiteApi::CompletionContext completionContext() const;\r\n    void updateFilter();\r\n    void complete(const QRect& rect = QRect());\r\n    QWidget *widget() const;\r\n    void setWidget(QWidget *widget);\r\n    QModelIndex currentIndex() const;\r\n    QString currentCompletion() const;\r\n    void setCaseSensitivity(Qt::CaseSensitivity cs);\r\n    Qt::CaseSensitivity caseSensitivity() const;\r\n    QAbstractItemView *popup() const;\r\n    QAbstractItemModel *completionModel() const;\r\n    void setWrapAround(bool wrap);\r\n    bool wrapAround() const;\r\n    void setFuzzy(bool b);\r\n    bool isFuzzy() const;\r\nsignals:\r\n    void activated(QModelIndex);\r\npublic slots:\r\n    void completerActivated(QModelIndex);\r\nprotected:\r\n    virtual bool eventFilter(QObject *o, QEvent *e);\r\n    QWidget              *m_widget;\r\n    CodeCompleterListView     *m_popup;\r\n    CodeCompleterProxyModel   *m_proxy;\r\n    Qt::CaseSensitivity m_cs;\r\n    LiteApi::CompletionContext m_ctx;\r\n    QString             m_prefix;\r\n    int                 maxVisibleItems;\r\n    bool                m_eatFocusOut;\r\n    bool                m_hiddenBecauseNoMatch;\r\n    bool                m_wrap;\r\n};\r\n\r\n#endif // CODECOMPLETER_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/editorapimanager.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: editorapimanager.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"editorapimanager.h\"\n#include \"wordapi.h\"\n#include \"snippetapi.h\"\n\n#include <QDir>\n#include <QFileInfo>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nEditorApiManager::EditorApiManager(QObject *parent)\n    : IEditorApiManager(parent)\n{\n}\n\nEditorApiManager::~EditorApiManager()\n{\n    qDeleteAll(m_wordApiList);\n    qDeleteAll(m_snippetApiList);\n}\n\nvoid EditorApiManager::addWordApi(IWordApi *api)\n{\n    m_wordApiList.append(api);\n}\n\nvoid EditorApiManager::removeWordApi(IWordApi *api)\n{\n    m_wordApiList.removeAll(api);\n}\n\nIWordApi *EditorApiManager::findWordApi(const QString &mimeType)\n{\n    QString package = LiteApi::findPackageByMimeType(m_liteApp,mimeType);\n    if (package.isEmpty()) {\n        return 0;\n    }\n    foreach (IWordApi *wordApi, m_wordApiList) {\n        if (wordApi->package() == package) {\n            return wordApi;\n        }\n    }\n    return 0;\n}\n\nQList<IWordApi*> EditorApiManager::wordApiList() const\n{\n    return m_wordApiList;\n}\n\nvoid EditorApiManager::addSnippetApi(ISnippetApi *api)\n{\n    m_snippetApiList.append(api);\n}\n\nvoid EditorApiManager::removeSnippetApi(ISnippetApi *api)\n{\n    m_snippetApiList.removeAll(api);\n}\n\nISnippetApi *EditorApiManager::findSnippetApi(const QString &mimeType)\n{\n    QString package = LiteApi::findPackageByMimeType(m_liteApp,mimeType);\n    if (package.isEmpty()) {\n        return 0;\n    }\n    foreach (ISnippetApi *api, m_snippetApiList) {\n        if (api->package() == package) {\n            return api;\n        }\n    }\n    return 0;\n\n}\n\nQList<ISnippetApi *> EditorApiManager::snippetApiList() const\n{\n    return m_snippetApiList;\n}\n\nvoid EditorApiManager::load(const QString &path)\n{\n    QDir dir = path;\n    m_liteApp->appendLog(\"WordApiManager\",\"Loading \"+path);\n    QStringList nameFilter;\n    nameFilter << \"*.api\" << \"*.snippet.json\";\n    foreach(QFileInfo info, dir.entryInfoList(QDir::Dirs|QDir::NoDotAndDotDot)) {\n        QStringList wordFiles;\n        QStringList snippetFiles;\n        if (info.isDir()) {\n            foreach (QFileInfo i, QDir(info.absoluteFilePath()).entryInfoList(nameFilter)) {\n                if (i.fileName().endsWith(\".api\")) {\n                    wordFiles.append(i.filePath());\n                } else if (i.fileName().endsWith(\".snippet.json\")) {\n                    snippetFiles.append(i.filePath());\n                }\n            }\n        }\n        if (!wordFiles.isEmpty()) {\n            WordApi *api = new WordApi(info.fileName());\n            api->setApiFiles(wordFiles);\n            this->addWordApi(api);\n            m_liteApp->appendLog(\"load word api\",wordFiles.join(\",\"));\n        }\n        if (!snippetFiles.isEmpty()) {\n            SnippetApi *api = new SnippetApi(info.fileName());\n            api->setApiFiles(snippetFiles);\n            this->addSnippetApi(api);\n            m_liteApp->appendLog(\"load snippet api\",snippetFiles.join(\",\"));\n        }        \n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/editorapimanager.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: editorapimanager.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef EDITORAPIMANAGER_H\n#define EDITORAPIMANAGER_H\n\n#include \"liteeditorapi/liteeditorapi.h\"\n\nusing namespace LiteApi;\n\nclass EditorApiManager : public IEditorApiManager\n{\npublic:\n    EditorApiManager(QObject *parent = 0);\n    ~EditorApiManager();\n    virtual void addWordApi(IWordApi *api);\n    virtual void removeWordApi(IWordApi *api);\n    virtual IWordApi *findWordApi(const QString &mimeType);\n    virtual QList<IWordApi*> wordApiList() const;\n    virtual void addSnippetApi(ISnippetApi *api);\n    virtual void removeSnippetApi(ISnippetApi *api);\n    virtual ISnippetApi *findSnippetApi(const QString &mimeType);\n    virtual QList<ISnippetApi*> snippetApiList() const;\npublic:\n    void load(const QString &path);\nprotected:\n    QList<IWordApi*>    m_wordApiList;\n    QList<ISnippetApi*> m_snippetApiList;\n};\n\n#endif // EDITORAPIMANAGER_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/faketooltip.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: faketooltip.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"faketooltip.h\"\n#include <QStylePainter>\n#include <QStyleOptionFrame>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nFakeToolTip::FakeToolTip(QWidget *parent) :\n    QWidget(parent, Qt::ToolTip | Qt::WindowStaysOnTopHint)\n{\n    setFocusPolicy(Qt::NoFocus);\n    //setAttribute(Qt::WA_DeleteOnClose);\n\n    QPalette p = palette();\n    const QColor toolTipTextColor = p.color(QPalette::Inactive, QPalette::ToolTipText);\n    p.setColor(QPalette::Inactive, QPalette::WindowText, toolTipTextColor);\n    p.setColor(QPalette::Inactive, QPalette::ButtonText, toolTipTextColor);\n    setPalette(p);\n\n    this->setForegroundRole(QPalette::ToolTipText);\n    this->setBackgroundRole(QPalette::ToolTipBase);\n\n    const int margin = 1 + style()->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, 0, this);\n    setContentsMargins(margin + 1, margin, margin, margin);\n    setWindowOpacity(style()->styleHint(QStyle::SH_ToolTipLabel_Opacity, 0, this) / 255.0);\n}\n\nvoid FakeToolTip::paintEvent(QPaintEvent *)\n{\n    QStylePainter p(this);\n    QStyleOptionFrame opt;\n    opt.init(this);\n    p.drawPrimitive(QStyle::PE_PanelTipLabel, opt);\n    p.end();\n}\n\nvoid FakeToolTip::resizeEvent(QResizeEvent *)\n{\n    QStyleHintReturnMask frameMask;\n    QStyleOption option;\n    option.init(this);\n    if (style()->styleHint(QStyle::SH_ToolTip_Mask, &option, this, &frameMask))\n        setMask(frameMask.region);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/faketooltip.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: faketooltip.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FAKETOOLTIP_H\n#define FAKETOOLTIP_H\n\n#include <QWidget>\n\nclass FakeToolTip : public QWidget\n{\n    Q_OBJECT\npublic:\n    explicit FakeToolTip(QWidget *parent = 0);\nprotected:\n    void paintEvent(QPaintEvent *e);\n    void resizeEvent(QResizeEvent *e);\n};\n\n#endif // FAKETOOLTIP_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/functiontooltip.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: functiontooltip.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"functiontooltip.h\"\n#include \"faketooltip.h\"\n\n#include <QDesktopWidget>\n#include <QApplication>\n#include <QStylePainter>\n#include <QStyleOptionFrame>\n#include <QToolButton>\n#include <QHBoxLayout>\n#include <QToolTip>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nFunctionTooltip::FunctionTooltip(LiteApi::IApplication *app, LiteApi::ITextEditor *editor, LiteApi::ITextLexer *lexer, int maxTipCount, QObject *parent)\n    : QObject(parent), m_liteApp(app), m_editor(editor), m_lexer(lexer), m_maxTipCount(maxTipCount)\n{\n    m_editWidget = LiteApi::getPlainTextEdit(editor);\n    m_popup = new FakeToolTip(m_editWidget);\n    QHBoxLayout *hbox = new QHBoxLayout;\n    hbox->setMargin(0);\n    hbox->setSpacing(0);\n    m_label = new QLabel;\n    hbox->addWidget(m_label);\n    m_popup->setLayout(hbox);\n\n    qApp->installEventFilter(this);\n}\n\nFunctionTooltip::~FunctionTooltip()\n{\n    delete m_popup;\n}\n\nvoid FunctionTooltip::showFunctionHint(int startPosition, const QString &tip)\n{\n    m_currentarg = -1;\n\n    m_tip = tip;\n    m_escapePressed = false;\n    m_startpos = startPosition;\n\n    saveTip(startPosition,tip);\n\n    updateArgumentHighlight();\n\n    showPopup(m_startpos);\n}\n\nbool FunctionTooltip::eventFilter(QObject *obj, QEvent *e)\n{\n    switch (e->type()) {\n    case QEvent::ShortcutOverride:\n        if (m_popup->isVisible() && static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape) {\n            m_escapePressed = true;\n            e->accept();\n        } else if (static_cast<QKeyEvent*>(e)->modifiers() & Qt::ControlModifier) {\n            hide();\n        }\n        break;\n    case QEvent::KeyPress:\n        if (static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape) {\n            m_escapePressed = true;\n        }\n        break;\n    case QEvent::KeyRelease: {\n            QKeyEvent *ke = static_cast<QKeyEvent*>(e);\n            if (ke->key() == Qt::Key_Escape && m_escapePressed) {\n                hide();\n            } else if (ke->key() == Qt::Key_Comma ||\n                    ke->text() == \"(\") {\n                if (m_lexer->isInStringOrComment(m_editor->textCursor())) {\n                    return false;\n                }\n                int pos = m_lexer->startOfFunctionCall(m_editor->textCursor());\n                if (pos != -1 && pos+1 != m_startpos) {\n                    m_startpos = pos+1;\n                    if (restoreTip(m_startpos)) {\n                        updateArgumentHighlight();\n                        showPopup(m_startpos);\n                    } else {\n                        hide();\n                    }\n                    return false;\n                }\n            } else if (m_popup->isVisible()) {\n                updateArgumentHighlight();\n            }\n        }\n        break;\n    case QEvent::FocusOut:\n    case QEvent::WindowDeactivate:\n    case QEvent::Resize:\n        if (obj != m_editWidget)\n            break;\n        hide();\n        break;\n    case QEvent::Move:\n        if (obj != m_liteApp->mainWindow())\n            break;\n        hide();\n        break;\n    case QEvent::MouseButtonPress:\n    case QEvent::MouseButtonRelease:\n    case QEvent::MouseButtonDblClick:\n    case QEvent::Wheel: {\n            QWidget *widget = qobject_cast<QWidget *>(obj);\n            if (! (widget == m_label || m_popup->isAncestorOf(widget))) {\n                hide();\n            }\n        }\n        break;\n    default:\n        break;\n    }\n    return false;\n}\n\nvoid FunctionTooltip::updateArgumentHighlight()\n{\n    int curpos = m_editor->position();\n    if (curpos < m_startpos) {\n        hide();\n        return;\n    }\n\n    QString str = m_editor->textAt(m_startpos, curpos - m_startpos);\n    int argnr = 0;\n    int parcount = 0;\n\n    m_lexer->fetchFunctionArgs(str,argnr,parcount);\n\n    if (m_currentarg != argnr) {\n        m_currentarg = argnr;\n        updateHintText();\n    }\n\n    if (parcount < 0)\n        hide();\n}\n\nvoid FunctionTooltip::updateHintText()\n{\n    QString hintText;\n    hintText = m_tip;\n    /*\n    for (int i = 0; i < m_args.size(); i++) {\n        if (i != 0) {\n            hintText += \",\";\n        }\n        if (i == m_currentarg) {\n            hintText += \"<b>\"+Qt::escape(m_args[i])+\"</b>\";\n        } else {\n            hintText += Qt::escape(m_args[i]);\n        }\n    }\n    */\n    m_label->setText(hintText);\n}\n\nvoid FunctionTooltip::showPopup(int startpos)\n{\n    QToolTip::hideText();\n    m_popup->setFixedWidth(m_popup->minimumSizeHint().width());\n\n    const QDesktopWidget *desktop = QApplication::desktop();\n#ifdef Q_WS_MAC\n    const QRect screen = desktop->availableGeometry(desktop->screenNumber(m_editor->widget()));\n#else\n    const QRect screen = desktop->screenGeometry(desktop->screenNumber(m_editor->widget()));\n#endif\n\n    const QSize sz = m_popup->sizeHint();\n    QPoint pos = m_editor->cursorRect(startpos).topLeft();\n    pos.setY(pos.y() - sz.height() - 1);\n\n    if (pos.x() + sz.width() > screen.right())\n        pos.setX(screen.right() - sz.width());\n\n    m_popup->move(pos);\n    if (!m_popup->isVisible()) {\n        m_popup->show();\n    }\n}\n\nvoid FunctionTooltip::hide()\n{\n    if (!m_popup->isVisible()) {\n        return;\n    }\n    m_popup->hide();\n    m_startpos = -1;\n}\n\nvoid FunctionTooltip::saveTip(int startPos, const QString &text)\n{\n    QMutableListIterator<TipInfo> it(m_infoList);\n    while(it.hasNext()) {\n        TipInfo &info = it.next();\n        if (info.startPos == startPos) {\n            info.tip = text;\n            return;\n        }\n    }\n    m_infoList.append(TipInfo(startPos,text));\n    if (m_infoList.size() >= m_maxTipCount) {\n        m_infoList.removeFirst();\n    }\n}\n\nbool FunctionTooltip::restoreTip(int startpos)\n{\n    foreach(TipInfo info, m_infoList) {\n        if (info.startPos == startpos) {\n            m_tip = info.tip;\n            return true;\n        }\n    }\n    return false;\n}\n\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/functiontooltip.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: functiontooltip.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FUNCTIONTOOLTIP_H\n#define FUNCTIONTOOLTIP_H\n\n#include \"liteapi/liteapi.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n#include <QWidget>\n#include <QLabel>\n\nstruct TipInfo\n{\n    TipInfo(int _pos, const QString &_tip) :\n        startPos(_pos),tip(_tip)\n    {}\n    int     startPos;\n    QString tip;\n};\n\nclass FunctionTooltip : public QObject\n{\n    Q_OBJECT\npublic:\n    FunctionTooltip(LiteApi::IApplication *app, LiteApi::ITextEditor *editor, LiteApi::ITextLexer *lexer, int maxTipCount = 20, QObject *parent = 0);\n    ~FunctionTooltip();\n    void showFunctionHint(int startPosition, const QString &tip);\nprotected:\n    bool eventFilter(QObject *obj, QEvent *e);\n    void updateArgumentHighlight();\n    void updateHintText();\n    void showPopup(int startpos);\n    void hide();\n    void saveTip(int startPos, const QString &text);\n    bool restoreTip(int startpos);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    LiteApi::ITextEditor *m_editor;\n    LiteApi::ITextLexer *m_lexer;\n    QWidget              *m_popup;\n    QLabel               *m_label;\n    QWidget              *m_editWidget;\n    QList<TipInfo>       m_infoList;\n    QString              m_tip;\n    int                  m_currentarg;\n    int                  m_startpos;\n    int                  m_startFuncitonPos;\n    int                  m_maxTipCount;\n    bool                 m_escapePressed;    \n};\n\n\n#endif // FUNCTIONTOOLTIP_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/highlightermanager.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: highlightermanager.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"highlightermanager.h\"\n#include \"colorstyle/colorstyle.h\"\n#include \"qtc_texteditor/syntaxhighlighter.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nusing namespace TextEditor;\n\nHighlighterManager::HighlighterManager(QObject *parent) :\n    LiteApi::IHighlighterManager(parent)\n{\n\n}\n\nvoid HighlighterManager::addFactory(LiteApi::IHighlighterFactory *factory)\n{\n    m_factoryList.push_front(factory);\n}\n\nvoid HighlighterManager::removeFactory(LiteApi::IHighlighterFactory *factory)\n{\n    m_factoryList.removeOne(factory);\n}\n\nQList<LiteApi::IHighlighterFactory *> HighlighterManager::factoryList() const\n{\n    return m_factoryList;\n}\n\nQStringList HighlighterManager::mimeTypeList() const\n{\n    QStringList mimeTypes;\n    foreach(LiteApi::IHighlighterFactory *factory, m_factoryList) {\n        mimeTypes.append(factory->mimeTypes());\n    }\n    mimeTypes.removeDuplicates();\n    return mimeTypes;\n}\n\nLiteApi::IHighlighterFactory *HighlighterManager::findFactory(const QString &mimeType) const\n{\n    foreach(LiteApi::IHighlighterFactory *factory, m_factoryList) {\n        if (factory->mimeTypes().contains(mimeType)) {\n            return factory;\n        }\n    }\n    return 0;\n}\n\nstatic bool setTextCharStyle(QTextCharFormat &fmt, const QString &name, const ColorStyleScheme *scheme)\n{\n    const ColorStyle *style = scheme->findStyle(name);\n    if (!style) {\n        return false;\n    }\n    QColor fore = style->foregound();\n    if (fore.isValid()) {\n        fmt.setForeground(fore);\n    }\n    QColor back = style->background();\n    if (back.isValid()) {\n        fmt.setBackground(back);\n    }\n    fmt.setFontItalic(style->italic());\n    if (style->bold()) {\n        fmt.setFontWeight(QFont::Bold);\n    } else {\n        fmt.setFontWeight(QFont::Normal);\n    }\n    return true;\n}\n\n\nvoid HighlighterManager::setColorStyle(TextEditor::SyntaxHighlighter *highlighter, const ColorStyleScheme *scheme)\n{\n    QTextCharFormat fmt_nm;\n    highlighter->configureFormat(SyntaxHighlighter::Normal, fmt_nm);\n\n    QTextCharFormat fmt_vw;\n    if (!setTextCharStyle(fmt_vw,\"VisualWhitespace\",scheme)) {\n        fmt_vw.setForeground(Qt::lightGray);\n    }\n    highlighter->configureFormat(SyntaxHighlighter::VisualWhitespace, fmt_vw);\n\n    QTextCharFormat fmt_kw;\n    if (!setTextCharStyle(fmt_kw,\"Keyword\",scheme)) {\n        fmt_kw.setForeground(Qt::darkBlue);\n        fmt_kw.setFontWeight(QFont::Bold);\n    }\n    highlighter->configureFormat(SyntaxHighlighter::Keyword, fmt_kw);\n\n    QTextCharFormat fmt_dt;\n    if (!setTextCharStyle(fmt_dt,\"DataType\",scheme)) {\n        fmt_dt.setForeground(Qt::darkBlue);//Qt::darkMagenta);\n    }\n    highlighter->configureFormat(SyntaxHighlighter::DataType, fmt_dt);\n\n    QTextCharFormat fmt_fn;\n    if (!setTextCharStyle(fmt_fn,\"Function\",scheme)) {\n        fmt_fn.setForeground(Qt::blue);\n    }\n    highlighter->configureFormat(SyntaxHighlighter::Function,fmt_fn);\n\n    QTextCharFormat fmt_cmn;\n    if (!setTextCharStyle(fmt_cmn,\"Comment\",scheme)) {\n        fmt_cmn.setForeground(Qt::darkGreen);\n    }\n    highlighter->configureFormat(SyntaxHighlighter::Comment, fmt_cmn);\n\n    QTextCharFormat fmt_dd;\n    if (!setTextCharStyle(fmt_dd,\"Decimal\",scheme)) {\n        fmt_dd.setForeground(Qt::darkMagenta);\n    }\n    // Using C_NUMBER for all kinds of numbers.\n    highlighter->configureFormat(SyntaxHighlighter::Decimal, fmt_dd);\n\n    QTextCharFormat fmt_db;\n    if (!setTextCharStyle(fmt_db,\"BaseN\",scheme)) {\n        fmt_db.setForeground(Qt::darkMagenta);\n    }\n    highlighter->configureFormat(SyntaxHighlighter::BaseN, fmt_db);\n\n    QTextCharFormat fmt_df;\n    if (!setTextCharStyle(fmt_df,\"Float\",scheme)) {\n        fmt_df.setForeground(Qt::darkMagenta);\n    }\n    highlighter->configureFormat(SyntaxHighlighter::Float, fmt_df);\n\n\n    QTextCharFormat fmt_ch;\n    if (!setTextCharStyle(fmt_ch,\"Char\",scheme)) {\n        fmt_ch.setForeground(Qt::darkGreen);\n    }\n    // Using C_STRING for strings and chars.\n    highlighter->configureFormat(SyntaxHighlighter::Char, fmt_ch);\n\n    QTextCharFormat fmt_cs;\n    if (!setTextCharStyle(fmt_cs,\"String\",scheme)) {\n        fmt_cs.setForeground(Qt::darkGreen);\n    }\n    highlighter->configureFormat(SyntaxHighlighter::String, fmt_cs);\n\n    QTextCharFormat fmt_rm;\n    if (!setTextCharStyle(fmt_rm,\"RegionMarker\",scheme)) {\n        fmt_rm.setForeground(Qt::yellow);\n    }\n    highlighter->configureFormat(SyntaxHighlighter::RegionMarker,fmt_rm);\n\n    QTextCharFormat fmt_alert;\n    if (!setTextCharStyle(fmt_alert,\"Alert\",scheme)) {\n        fmt_alert.setForeground(Qt::red);\n    }\n    highlighter->configureFormat(SyntaxHighlighter::Alert,fmt_alert);\n\n    QTextCharFormat fmt_err;\n    if (!setTextCharStyle(fmt_err,\"Error\",scheme)) {\n        fmt_err.setForeground(Qt::red);\n    }\n    highlighter->configureFormat(SyntaxHighlighter::Error,fmt_err);\n\n    QTextCharFormat fmt_sym;\n    if (!setTextCharStyle(fmt_sym,\"Symbol\",scheme)) {\n        fmt_sym.setForeground(Qt::red);\n    }\n    highlighter->configureFormat(SyntaxHighlighter::Symbol,fmt_sym);\n\n    QTextCharFormat fmt_bf;\n    if (!setTextCharStyle(fmt_bf,\"BuiltinFunc\",scheme)) {\n        fmt_bf.setForeground(Qt::blue);\n    }\n    highlighter->configureFormat(SyntaxHighlighter::BuiltinFunc,fmt_bf);\n\n    QTextCharFormat fmt_pre;\n    if (!setTextCharStyle(fmt_pre,\"Predeclared\",scheme)) {\n        fmt_pre.setForeground(Qt::blue);\n    }\n    highlighter->configureFormat(SyntaxHighlighter::Predeclared,fmt_pre);\n\n    QTextCharFormat fmt_fc;\n    if (!setTextCharStyle(fmt_fc,\"FuncDecl\",scheme)) {\n        fmt_fc.setForeground(Qt::blue);\n    }\n    highlighter->configureFormat(SyntaxHighlighter::FuncDecl,fmt_fc);\n\n    QTextCharFormat fmt_plc;\n    if (!setTextCharStyle(fmt_plc,\"Placeholder\",scheme)) {\n        fmt_plc.setForeground(fmt_cs.foreground());\n    }\n    highlighter->configureFormat(SyntaxHighlighter::Placeholder,fmt_plc);\n\n    QTextCharFormat fmt_todo;\n    if (!setTextCharStyle(fmt_todo,\"ToDo\",scheme)) {\n        fmt_todo.setForeground(fmt_cmn.foreground());\n    }\n    highlighter->configureFormat(SyntaxHighlighter::ToDo,fmt_todo);\n\n    QTextCharFormat fmt_processer;\n    if (!setTextCharStyle(fmt_processer,\"PreprocessorFormat\",scheme)) {\n        fmt_processer.setForeground(fmt_cmn.foreground());\n    }\n    highlighter->configureFormat(SyntaxHighlighter::PreprocessorFormat,fmt_processer);\n\n\n    highlighter->rehighlight();\n}\n\nvoid HighlighterManager::setTabSize(TextEditor::SyntaxHighlighter *highlighter, int tabSize)\n{\n    if (!highlighter) {\n        return;\n    }\n    highlighter->setTabSize(tabSize);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/highlightermanager.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: highlightermanager.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef HIGHLIGHTERMANAGER_H\n#define HIGHLIGHTERMANAGER_H\n\n#include \"liteeditorapi/liteeditorapi.h\"\n\nclass HighlighterManager : public LiteApi::IHighlighterManager\n{\npublic:\n    HighlighterManager(QObject *parent);\n    virtual void addFactory(LiteApi::IHighlighterFactory *factory);\n    virtual void removeFactory(LiteApi::IHighlighterFactory *factory);\n    virtual QList<LiteApi::IHighlighterFactory*> factoryList() const;\n    virtual QStringList mimeTypeList() const;\n    virtual LiteApi::IHighlighterFactory *findFactory(const QString &mimeType) const;\npublic:\n    void setColorStyle(TextEditor::SyntaxHighlighter *highlighter,const ColorStyleScheme *scheme);\n    void setTabSize(TextEditor::SyntaxHighlighter *highlighter, int tabSize);\nprotected:\n    QList<LiteApi::IHighlighterFactory*> m_factoryList;\n};\n\n#endif // HIGHLIGHTERMANAGER_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/katehighlighterfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: katehighlighterfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"katehighlighterfactory.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nKateHighlighterFactory::KateHighlighterFactory(QObject *parent) :\n    LiteApi::IHighlighterFactory(parent)\n{\n    m_kate = new KateHighlighter(this);\n}\n\nQStringList KateHighlighterFactory::mimeTypes() const\n{\n    return m_kate->mimeTypes();\n}\n\nTextEditor::SyntaxHighlighter *KateHighlighterFactory::create(LiteApi::ITextEditor */*editor*/, QTextDocument *doc, const QString &mimeType)\n{\n    return m_kate->create(doc,mimeType);\n}\n\nvoid KateHighlighterFactory::loadPath(const QString &dir)\n{\n    m_kate->loadPath(dir);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/katehighlighterfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: katehighlighterfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef KATEHIGHLIGHTERFACTORY_H\n#define KATEHIGHLIGHTERFACTORY_H\n\n#include \"liteeditorapi/liteeditorapi.h\"\n#include \"qtc_texteditor/katehighlighter.h\"\n\nclass KateHighlighterFactory : public LiteApi::IHighlighterFactory\n{\n    Q_OBJECT\npublic:\n    KateHighlighterFactory(QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual TextEditor::SyntaxHighlighter* create(LiteApi::ITextEditor *editor, QTextDocument *doc, const QString &mimeType);\n    void loadPath(const QString &dir);\n    KateHighlighter *kate() const { return m_kate; }\nprotected:\n    KateHighlighter *m_kate;\n};\n\n#endif // KATEHIGHLIGHTERFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/katetextlexer.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: katetextlexer.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"katetextlexer.h\"\n#include \"qtc_texteditor/basetextdocumentlayout.h\"\n#include \"qtc_texteditor/syntaxhighlighter.h\"\n\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nKateTextLexer::KateTextLexer(QObject *parent)\n    : LiteApi::ITextLexer(parent)\n{\n}\n\nbool KateTextLexer::isLangSupport() const\n{\n    return true;\n}\n\nbool KateTextLexer::isInComment(const QTextCursor &cursor) const\n{\n    int pos = cursor.positionInBlock();    \n    TextEditor::TextBlockUserData *data = TextEditor::BaseTextDocumentLayout::userData(cursor.block());\n    int state = data->lexerState();\n    if (state != 0 && data->tokens().isEmpty()) {\n        QTextBlock block = cursor.block().previous();\n        while(block.isValid()) {\n            TextEditor::TextBlockUserData *data = TextEditor::BaseTextDocumentLayout::userData(block);\n            if (data && !data->tokens().isEmpty()) {\n                return data->tokens().last().id == TextEditor::SyntaxHighlighter::Comment;\n            }\n            block = block.previous();\n        }\n        return false;\n    }\n    int offset = 0;\n    if (cursor.positionInBlock() == cursor.block().length()-1) {\n        offset = 1;\n    }\n    foreach(TextEditor::SyntaxToken token, data->tokens()) {\n        if ((token.id == TextEditor::SyntaxHighlighter::Comment) &&\n                (pos >= token.offset) && (pos < (token.offset+token.count+offset))) {\n            return true;\n        }\n    }\n    return false;\n}\n\nbool KateTextLexer::isInString(const QTextCursor &cursor) const\n{\n    int pos = cursor.positionInBlock();\n    TextEditor::TextBlockUserData *data = TextEditor::BaseTextDocumentLayout::userData(cursor.block());\n    foreach(TextEditor::SyntaxToken token, data->tokens()) {\n        if ((token.id == TextEditor::SyntaxHighlighter::String) &&\n                (pos >= token.offset) && (pos < token.offset+token.count)) {\n            return true;\n        }\n    }\n    return false;\n}\n\nbool KateTextLexer::isInEmptyString(const QTextCursor &cursor) const\n{\n    int pos = cursor.positionInBlock();\n    TextEditor::TextBlockUserData *data = TextEditor::BaseTextDocumentLayout::userData(cursor.block());\n    foreach(TextEditor::SyntaxToken token, data->tokens()) {\n        if ((token.id == TextEditor::SyntaxHighlighter::String) &&\n                (pos >= token.offset) && (pos < token.offset+token.count) &&\n                (token.count == 2)) {\n            return true;\n        }\n    }\n    return false;\n}\n\nbool KateTextLexer::isEndOfString(const QTextCursor &cursor) const\n{\n    int pos = cursor.positionInBlock();\n    TextEditor::TextBlockUserData *data = TextEditor::BaseTextDocumentLayout::userData(cursor.block());\n    foreach(TextEditor::SyntaxToken token, data->tokens()) {\n        if ((token.id == TextEditor::SyntaxHighlighter::String) &&\n                (pos == (token.offset+token.count-1)) ) {\n            return true;\n        }\n    }\n    return false;\n}\n\nbool KateTextLexer::isInStringOrComment(const QTextCursor &cursor) const\n{\n    return isInString(cursor) || isInComment(cursor);\n}\n\nbool KateTextLexer::isCanAutoCompleter(const QTextCursor &cursor) const\n{\n    return !isInStringOrComment(cursor);\n}\n\nbool KateTextLexer::isInImport(const QTextCursor &/*cursor*/) const\n{\n    return false;\n}\n\nint KateTextLexer::startOfFunctionCall(const QTextCursor &/*cursor*/) const\n{\n    return -1;\n}\n\nQString KateTextLexer::fetchFunctionTip(const QString &/*func*/, const QString &/*kind*/, const QString &/*info*/)\n{\n    return QString();\n}\n\nbool KateTextLexer::fetchFunctionArgs(const QString &/*str*/, int &/*argnr*/, int &/*parcount*/)\n{\n    return false;\n}\n\nQString KateTextLexer::stringQuoteList() const\n{\n    return QString(\"\\\"\\'\");\n}\n\nbool KateTextLexer::hasStringBackslash() const\n{\n    return true;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/katetextlexer.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: katetextlexer.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef KATETEXTLEXER_H\n#define KATETEXTLEXER_H\n\n#include \"liteeditorapi/liteeditorapi.h\"\n\nclass KateTextLexer : public LiteApi::ITextLexer\n{\npublic:\n    KateTextLexer(QObject *parent);\n    virtual bool isLangSupport() const;\n    virtual bool isInComment(const QTextCursor &cursor) const;\n    virtual bool isInString(const QTextCursor &cursor) const;\n    virtual bool isInEmptyString(const QTextCursor &cursor) const;\n    virtual bool isEndOfString(const QTextCursor &cursor) const;\n    virtual bool isInStringOrComment(const QTextCursor &cursor) const;\n    virtual bool isCanAutoCompleter(const QTextCursor &cursor) const;\n    virtual bool isInImport(const QTextCursor &cursor) const;\n    virtual int startOfFunctionCall(const QTextCursor &cursor) const;\n    virtual QString fetchFunctionTip(const QString &func, const QString &kind, const QString &info);\n    virtual bool fetchFunctionArgs(const QString &str, int &argnr, int &parcount);\n    virtual QString stringQuoteList() const;\n    virtual bool hasStringBackslash() const;\n};\n\n#endif // KATETEXTLEXER_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/litecompleter.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: litecompleter.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"litecompleter.h\"\r\n#include \"codecompleter.h\"\r\n\r\n#include <QCompleter>\r\n#include <QPlainTextEdit>\r\n#include <QTextCursor>\r\n#include <QStandardItem>\r\n#include <QStandardItemModel>\r\n#include <QAbstractItemView>\r\n#include <QScrollBar>\r\n#include <QTextBlock>\r\n#include <QTimer>\r\n#include <QDebug>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\n\r\nclass WordItem : public QStandardItem\r\n{\r\npublic:\r\n    WordItem(const QString &text) : QStandardItem(text)\r\n    {\r\n    }\r\n    enum {\r\n        KindRole = Qt::UserRole+2,\r\n        TempRole,\r\n        SnippetRole,\r\n    };\r\n    void setKind(const QString &kind)\r\n    {\r\n        this->setData(kind,KindRole);\r\n    }\r\n    QString kind() const\r\n    {\r\n        return QStandardItem::data(KindRole).toString();\r\n    }\r\n    void setTemp(bool temp)\r\n    {\r\n        this->setData(temp,TempRole);\r\n    }\r\n    bool isTemp() const\r\n    {\r\n        return QStandardItem::data(TempRole).toBool();\r\n    }\r\n};\r\n\r\nLiteCompleter::LiteCompleter(QObject *parent) :\r\n    LiteApi::ICompleter(parent),\r\n    m_completer( new CodeCompleterEx(this)),\r\n    m_model(new QStandardItemModel(this)),\r\n    m_bSearchSeparator(true),\r\n    m_bExternalMode(false)\r\n{\r\n    m_completer->setModel(m_model);\r\n    m_completer->setCaseSensitivity(Qt::CaseSensitive);\r\n    m_completer->setSeparator(\".\");\r\n    m_stop = '(';\r\n    m_prefixMin = 1;\r\n    QObject::connect(m_completer, SIGNAL(activated(QModelIndex)),\r\n                     this, SLOT(insertCompletion(QModelIndex)));\r\n}\r\n\r\nLiteCompleter::~LiteCompleter()\r\n{\r\n    delete m_completer;\r\n    delete m_model;\r\n}\r\n\r\nvoid LiteCompleter::setEditor(QPlainTextEdit *editor)\r\n{\r\n    m_editor = editor;\r\n    m_completer->setWidget(m_editor);\r\n}\r\n\r\nQStandardItem *LiteCompleter::findRoot(const QString &name)\r\n{\r\n    QStringList words = name.split(m_completer->separator(),qtSkipEmptyParts);\r\n    WordItem *root = 0;\r\n    WordItem *item = 0;\r\n    foreach (QString word, words) {\r\n        item = 0;\r\n        QModelIndex parent = m_model->indexFromItem(root);\r\n        for (int i = 0; i < m_model->rowCount(parent); i++) {\r\n            QModelIndex index = m_model->index(i,0,parent);\r\n            if (index.data().toString() == word) {\r\n                item = static_cast<WordItem*>(m_model->itemFromIndex(index));\r\n                break;\r\n            }\r\n        }\r\n        if (item == 0) {\r\n            item = new WordItem(word);\r\n            if (root == 0) {\r\n                m_model->appendRow(item);\r\n            } else {\r\n                root->appendRow(item);\r\n            }\r\n        }\r\n        root = item;\r\n    }\r\n    return root;\r\n}\r\n\r\nvoid LiteCompleter::clearChildItem(QStandardItem *root)\r\n{\r\n    if (root) {\r\n        QModelIndex index = m_model->indexFromItem(root);\r\n        m_model->removeRows(0,m_model->rowCount(index),index);\r\n    }\r\n}\r\n\r\nvoid LiteCompleter::appendChildItem(QStandardItem *root, QString name, const QString &kind, const QString &info, const QIcon &icon, bool temp)\r\n{\r\n    if (root == 0) {\r\n        WordItem *item = 0;\r\n        QModelIndex parent = m_model->indexFromItem(root);\r\n        int count = m_model->rowCount(parent);\r\n        while(count--) {\r\n            QModelIndex index = m_model->index(count,0,parent);\r\n            if (index.data().toString() == name) {\r\n                item = static_cast<WordItem*>(m_model->itemFromIndex(index));\r\n                break;\r\n            }\r\n        }\r\n        if (item == 0) {\r\n            item = new WordItem(name);\r\n            if (root == 0) {\r\n                m_model->appendRow(item);\r\n            } else {\r\n                root->appendRow(item);\r\n            }\r\n        }\r\n        if (item) {\r\n            item->setKind(kind);\r\n            item->setToolTip(info);\r\n            item->setTemp(temp);\r\n            item->setIcon(icon);\r\n        }\r\n   } else {\r\n        WordItem *item = new WordItem(name);\r\n        root->appendRow(item);\r\n        item->setKind(kind);\r\n        item->setToolTip(info);\r\n        item->setTemp(temp);\r\n        item->setIcon(icon);\r\n    }\r\n}\r\n\r\nvoid LiteCompleter::clear()\r\n{\r\n    m_model->clear();\r\n}\r\n\r\nstatic void clearTempIndex(QStandardItemModel *model, QModelIndex parent, const QString &prefix) {\r\n    int i = model->rowCount(parent);\r\n    while (i--) {\r\n        QModelIndex index = model->index(i,0,parent);\r\n        if (prefix.startsWith(index.data().toString())) {\r\n            return;\r\n        }\r\n        if (index.data(WordItem::TempRole).toBool() == true || index.data(WordItem::KindRole).toString().isEmpty()) {\r\n            model->removeRow(i,parent);\r\n        } else {\r\n            clearTempIndex(model,index, prefix);\r\n        }\r\n    }\r\n}\r\n\r\nvoid LiteCompleter::clearTemp()\r\n{\r\n    clearTempIndex(m_model,QModelIndex(), this->completionPrefix());\r\n}\r\n\r\nvoid LiteCompleter::showPopup()\r\n{\r\n    if (!m_editor) {\r\n        return;\r\n    }\r\n    //m_completer->model()->sort(0);\r\n    m_completer->popup()->setCurrentIndex(m_completer->completionModel()->index(0, 0));\r\n    QString prefix = m_completer->lastPrefix();\r\n\r\n    if (!prefix.isEmpty()) {\r\n        bool found = false;\r\n        for (int i = 0; i < m_completer->completionModel()->rowCount(); i++) {\r\n            QModelIndex index =  m_completer->completionModel()->index(i,0);\r\n            QString text = index.data().toString();\r\n            if (text.startsWith(prefix,Qt::CaseInsensitive)) {\r\n                if (text.compare(prefix,Qt::CaseInsensitive) == 0) {\r\n                    m_completer->popup()->setCurrentIndex(index);\r\n                    break;\r\n                }\r\n                if (!found) {\r\n                    m_completer->popup()->setCurrentIndex(index);\r\n                }\r\n                found = true;\r\n            } else if (found) {\r\n                break;\r\n            }\r\n        }\r\n    }\r\n    QTextCursor cursor = m_editor->textCursor();\r\n    int offset = m_completer->completionPrefix().length();\r\n    if (m_completer->completionContext() !=  LiteApi::CompleterImportContext) {\r\n        int pos = m_completer->completionPrefix().indexOf(m_completer->separator());\r\n        if (pos != -1) {\r\n            offset -= pos+1;\r\n        }\r\n    }\r\n    cursor.movePosition(QTextCursor::Left,QTextCursor::MoveAnchor,offset);\r\n    QRect cr = m_editor->cursorRect(cursor);\r\n    cr.setLeft(cr.left()+m_editor->viewport()->x()-24);\r\n    cr.setWidth(m_completer->popup()->sizeHintForColumn(0)\r\n                + m_completer->popup()->verticalScrollBar()->sizeHint().width());\r\n    m_completer->complete(cr); // popup it up!\r\n}\r\n\r\nvoid LiteCompleter::hidePopup()\r\n{\r\n    if (m_completer->popup()->isVisible()) {\r\n        m_completer->popup()->hide();\r\n    }\r\n}\r\n\r\nbool LiteCompleter::isShowPopup()\r\n{\r\n    return m_completer->popup()->isVisible();\r\n}\r\n\r\nvoid LiteCompleter::setCaseSensitivity(Qt::CaseSensitivity caseSensitivity)\r\n{\r\n    m_completer->setCaseSensitivity(caseSensitivity);\r\n}\r\n\r\nvoid LiteCompleter::setFuzzy(bool fuzzy)\r\n{\r\n    m_completer->setFuzzy(fuzzy);\r\n}\r\n\r\nvoid LiteCompleter::setCompletionPrefix(const QString &prefix)\r\n{\r\n    m_completer->setCompletionPrefix(prefix);\r\n}\r\n\r\nQString LiteCompleter::completionPrefix() const\r\n{\r\n    return m_completer->completionPrefix();\r\n}\r\n\r\nvoid LiteCompleter::setCompletionContext(LiteApi::CompletionContext ctx)\r\n{\r\n    m_completer->setCompletionContext(ctx);\r\n}\r\n\r\nLiteApi::CompletionContext LiteCompleter::completionContext() const\r\n{\r\n    return m_completer->completionContext();\r\n}\r\n\r\nvoid LiteCompleter::setSeparator(const QString &sep)\r\n{\r\n    m_completer->setSeparator(sep);\r\n}\r\n\r\nQString LiteCompleter::separator() const\r\n{\r\n    return m_completer->separator();\r\n}\r\n\r\nQAbstractItemView *LiteCompleter::popup() const\r\n{\r\n    return m_completer->popup();\r\n}\r\n\r\nQModelIndex LiteCompleter::currentIndex() const\r\n{\r\n    return m_completer->currentIndex();\r\n}\r\n\r\nQString LiteCompleter::currentCompletion() const\r\n{\r\n    return m_completer->currentCompletion();\r\n}\r\n\r\nQAbstractItemModel *LiteCompleter::model() const\r\n{\r\n    return m_model;\r\n}\r\n\r\nQAbstractItemModel *LiteCompleter::completionModel() const\r\n{\r\n    return m_completer->completionModel();\r\n}\r\n\r\nbool LiteCompleter::startCompleter(const QString &completionPrefix)\r\n{\r\n    if (completionPrefix != this->completionPrefix()) {\r\n        this->setCompletionPrefix(completionPrefix);\r\n        this->popup()->setCurrentIndex(this->completionModel()->index(0, 0));\r\n    }\r\n    if (this->completionContext() == LiteApi::CompleterImportContext && completionPrefix.endsWith(\"/\")) {\r\n        goto end;\r\n    }\r\n    if (!completionPrefix.isEmpty() && this->currentCompletion() == completionPrefix) {\r\n        this->popup()->hide();\r\n        return false;\r\n    }\r\nend:\r\n    this->showPopup();\r\n    return true;\r\n}\r\n\r\nvoid LiteCompleter::updateCompleterModel()\r\n{\r\n    this->m_completer->updateFilter();\r\n}\r\n\r\nvoid LiteCompleter::setImportList(const QStringList &importList)\r\n{\r\n    this->m_completer->setImportList(importList);\r\n}\r\n\r\nvoid LiteCompleter::setPrefixMin(int min)\r\n{\r\n    m_prefixMin = min;\r\n}\r\n\r\nint LiteCompleter::prefixMin() const\r\n{\r\n    return m_prefixMin;\r\n}\r\n\r\nvoid LiteCompleter::setSearchSeparator(bool b)\r\n{\r\n    m_bSearchSeparator = b;\r\n}\r\n\r\nbool LiteCompleter::searchSeparator() const\r\n{\r\n    return m_bSearchSeparator;\r\n}\r\n\r\nbool LiteCompleter::externalMode() const\r\n{\r\n    return m_bExternalMode;\r\n}\r\n\r\nvoid LiteCompleter::setExternalMode(bool b)\r\n{\r\n    m_bExternalMode = b;\r\n}\r\n\r\nvoid LiteCompleter::appendItems(QStringList items,const QString &kind, const QString &info,const QIcon &icon, bool temp)\r\n{\r\n    foreach(QString item,items) {\r\n        appendItemEx(item,kind,info,icon,temp);\r\n    }\r\n}\r\n\r\nvoid LiteCompleter::appendSnippetItem(const QString &name, const QString &info, const QString &content)\r\n{   \r\n    WordItem *item = new WordItem(name);\r\n    item->setKind(\"snippet\");\r\n    item->setToolTip(info);\r\n    item->setIcon(QIcon(\":liteeditor/images/snippet.png\"));\r\n    item->setData(content,WordItem::SnippetRole);\r\n    m_model->appendRow(item);\r\n}\r\n\r\n\r\nbool LiteCompleter::appendItem(const QString &name, const QIcon &icon, bool temp)\r\n{\r\n    QString func;\r\n    int pos = name.indexOf(m_stop);\r\n    if (pos == -1) {\r\n        func = name.trimmed();\r\n    } else {\r\n        func = name.left(pos).trimmed();\r\n        //arg = text.right(text.length()-pos).trimmed();\r\n    }\r\n    return this->appendItemEx(func,\"\",\"\",icon,temp);\r\n}\r\n\r\nvoid LiteCompleter::clearItemChilds(const QString &name)\r\n{\r\n    QStringList words = name.split(m_completer->separator(),qtSkipEmptyParts);\r\n    WordItem *root = 0;\r\n    WordItem *item = 0;\r\n    foreach (QString word, words) {\r\n        item = 0;\r\n        QModelIndex parent = m_model->indexFromItem(root);\r\n        int count = m_model->rowCount(parent);\r\n        while(count--) {\r\n            QModelIndex index = m_model->index(count,0,parent);\r\n            if (index.data().toString() == word) {\r\n                item = static_cast<WordItem*>(m_model->itemFromIndex(index));\r\n                break;\r\n            }\r\n        }\r\n        root = item;\r\n    }\r\n    if (item) {\r\n        QModelIndex index = m_model->indexFromItem(item);\r\n        m_model->removeRows(0,m_model->rowCount(index),index);        \r\n    }\r\n}\r\n\r\nbool LiteCompleter::appendItemEx(const QString &name,const QString &kind, const QString &info, const QIcon &icon, bool temp)\r\n{\r\n    QStringList words = name.split(m_completer->separator(),qtSkipEmptyParts);\r\n\r\n    WordItem *root = 0;\r\n    WordItem *item = 0;\r\n    bool bnew = false;    \r\n    foreach (QString word, words) {\r\n        item = 0;\r\n        QModelIndex parent = m_model->indexFromItem(root);\r\n        for (int i = 0; i < m_model->rowCount(parent); i++) {\r\n            QModelIndex index = m_model->index(i,0,parent);\r\n            if (index.data().toString() == word) {\r\n                item = static_cast<WordItem*>(m_model->itemFromIndex(index));\r\n                break;\r\n            }\r\n        }\r\n        if (item == 0) {\r\n            item = new WordItem(word);\r\n            item->setIcon(icon);\r\n            if (root == 0) {\r\n                m_model->appendRow(item);\r\n            } else {\r\n                root->appendRow(item);\r\n            }\r\n            bnew = true;\r\n        }\r\n        root = item;\r\n    }\r\n    if (item && item->kind().isEmpty()) {\r\n        item->setKind(kind);\r\n        item->setToolTip(info);\r\n        item->setTemp(temp);\r\n        item->setIcon(icon);\r\n    }\r\n    return bnew;\r\n}\r\n\r\nvoid LiteCompleter::completionPrefixChanged(QString prefix, bool force)\r\n{\r\n    if (!m_editor) {\r\n        return;\r\n    }\r\n    if (m_completer->widget() != m_editor) {\r\n        return;\r\n    }\r\n    emit prefixChanged(m_editor->textCursor(),prefix, force);\r\n}\r\n\r\nvoid LiteCompleter::insertCompletion(QModelIndex index)\r\n{   \r\n    if (!m_editor) {\r\n        return;\r\n    }\r\n    if (m_completer->widget() != m_editor)\r\n        return;\r\n    if (!index.isValid()) {\r\n        return;\r\n    }\r\n\r\n    QString text = index.data().toString();\r\n    QString kind = index.data(WordItem::KindRole).toString();\r\n    QString info = index.data(Qt::ToolTipRole).toString();\r\n    QString prefix = m_completer->completionPrefix();\r\n    //IsAbs r.URL.\r\n    int length = prefix.length();\r\n    if (m_completer->completionContext() == LiteApi::CompleterCodeContext) {\r\n        int pos = prefix.lastIndexOf(m_completer->separator());\r\n        if (pos != -1) {\r\n            length = prefix.length()-pos-m_completer->separator().length();\r\n        }\r\n    }\r\n    QString extra = text;\r\n    QString wordText = text;\r\n    QTextCursor tc = m_editor->textCursor();\r\n    tc.beginEditBlock();\r\n    while (length--) {\r\n         tc.deletePreviousChar();\r\n    }\r\n    extra = text;\r\n    wordText = text;\r\n\r\n    if (kind == \"func\") {\r\n        //qDebug() << \"->\" << tc.positionInBlock() << tc.block().text() << tc.block().text().size();\r\n        int pos = tc.positionInBlock();\r\n        if (pos == tc.block().text().size() || tc.block().text().at(tc.positionInBlock()) != '(') {\r\n            extra += \"()\";\r\n            tc.insertText(extra);\r\n            if (!info.startsWith(\"func()\")) {\r\n                tc.movePosition(QTextCursor::Left,QTextCursor::MoveAnchor,1);\r\n            }\r\n        } else {\r\n            tc.insertText(extra);\r\n            kind.clear();\r\n        }\r\n    } else if (kind == \"snippet\") {\r\n        QString content = index.data(WordItem::SnippetRole).toString();\r\n        QString text = m_editor->textCursor().block().text();\r\n        int space = 0;\r\n        for (int i = 0; i < text.size(); i++) {\r\n            if (text.at(i).isSpace()) {\r\n                space++;\r\n            } else {\r\n                break;\r\n            }\r\n        }\r\n        QString head = text.left(space);\r\n        QStringList srcList = content.split(\"\\n\");\r\n        QStringList targetList;\r\n        for (int i = 0; i < srcList.size(); i++) {\r\n            if (i == 0) {\r\n                targetList.append(srcList[i]);\r\n            } else {\r\n                targetList.append(head+srcList[i]);\r\n            }\r\n        }\r\n        QString target = targetList.join(\"\\n\");\r\n        int startpos = tc.position();\r\n        int pos1 = target.indexOf(\"$\");\r\n        int pos2 = -1;\r\n        if (pos1 > 0) {\r\n            pos2 = target.indexOf(\"$\",pos1+1);\r\n        }\r\n        target.replace(\"$\",\"\");\r\n        extra = target;\r\n        tc.insertText(extra);\r\n        if (pos1 >= 0) {\r\n            tc.setPosition(startpos+pos1);\r\n            if (pos2 > 0) {\r\n                tc.movePosition(QTextCursor::Right,QTextCursor::KeepAnchor,pos2-pos1-1);\r\n            }\r\n        }\r\n    } else {\r\n        tc.insertText(extra);\r\n    }\r\n    tc.endEditBlock();\r\n    m_editor->setTextCursor(tc);\r\n    emit wordCompleted(wordText,kind,info);\r\n}\r\n\r\nvoid LiteCompleter::updateCompleteInfo(QModelIndex index)\r\n{\r\n    if (!m_editor) {\r\n        return;\r\n    }\r\n    if (m_completer->widget() != m_editor)\r\n        return;\r\n    if (!index.isValid()) {\r\n        return;\r\n    }\r\n\r\n    QString text = index.data().toString();\r\n    QString kind = index.data(WordItem::KindRole).toString();\r\n    QString info = index.data(Qt::ToolTipRole).toString();\r\n    emit wordCompleted(text,kind,info);\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/litecompleter.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: litecompleter.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef LITECOMPLETER_H\r\n#define LITECOMPLETER_H\r\n\r\n#include <QObject>\r\n#include <QModelIndex>\r\n#include \"liteeditorapi/liteeditorapi.h\"\r\n\r\nclass CodeCompleter;\r\nclass CodeCompleterEx;\r\nclass QPlainTextEdit;\r\nclass QStandardItemModel;\r\n\r\nclass LiteCompleter : public LiteApi::ICompleter\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    explicit LiteCompleter(QObject *parent = 0);\r\n    virtual ~LiteCompleter();\r\n    virtual void setEditor(QPlainTextEdit *editor);\r\n    virtual QStandardItem *findRoot(const QString &name);\r\n    virtual void clearChildItem(QStandardItem *root);\r\n    virtual void appendChildItem(QStandardItem *root,QString name,const QString &kind, const QString &info,const QIcon &icon, bool temp);\r\n    virtual bool appendItem(const QString &name,const QIcon &icon, bool temp);\r\n    virtual bool appendItemEx(const QString &name,const QString &kind, const QString &info,const QIcon &icon, bool temp);\r\n    virtual void appendItems(QStringList nameList,const QString &kind, const QString &info,const QIcon &icon, bool temp);\r\n    virtual void appendSnippetItem(const QString &name, const QString &info, const QString &content);\r\n    virtual void clearItemChilds(const QString &name);\r\n    virtual void clear();\r\n    virtual void clearTemp();\r\n    virtual void setSearchSeparator(bool b);\r\n    virtual bool searchSeparator() const;\r\n    virtual void setExternalMode(bool b);\r\n    virtual bool externalMode() const;\r\n    virtual void showPopup();\r\n    virtual void hidePopup();\r\n    virtual bool isShowPopup();\r\n    virtual void setCaseSensitivity(Qt::CaseSensitivity caseSensitivity);\r\n    virtual void setFuzzy(bool fuzzy);\r\n    virtual void setCompletionPrefix(const QString &prefix);\r\n    virtual QString completionPrefix() const;\r\n    virtual void setCompletionContext(LiteApi::CompletionContext ctx);\r\n    virtual LiteApi::CompletionContext completionContext() const;\r\n    virtual void setSeparator(const QString &sep);\r\n    virtual QString separator() const;\r\n    virtual QAbstractItemView *popup() const;\r\n    virtual QModelIndex currentIndex() const;\r\n    virtual QString currentCompletion() const;\r\n    virtual QAbstractItemModel *model() const;\r\n    virtual QAbstractItemModel *completionModel() const;\r\n    virtual bool startCompleter(const QString &completionPrefix);\r\n    virtual void updateCompleterModel();\r\n    virtual void setImportList(const QStringList &importList);\r\n    virtual void setPrefixMin(int min);\r\n    virtual int prefixMin() const;\r\npublic slots:\r\n    virtual void completionPrefixChanged(QString,bool force);\r\n    virtual void insertCompletion(QModelIndex);\r\n    virtual void updateCompleteInfo(QModelIndex index);\r\nprotected:\r\n    CodeCompleterEx    *m_completer;\r\n    QStandardItemModel *m_model;\r\n    QPlainTextEdit *m_editor;\r\n    QTimer         *m_timer;\r\n    QTextCursor     m_lastTextCursor;\r\n    QString         m_lastPrefix;\r\n    QChar           m_stop;\r\n    bool            m_bSearchSeparator;\r\n    bool            m_bExternalMode;\r\n    int             m_prefixMin;\r\n};\r\n\r\n#endif // LITECOMPLETER_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditor.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: liteeditor.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"liteeditor.h\"\r\n#include \"liteeditorwidget.h\"\r\n#include \"liteeditorfile.h\"\r\n#include \"litecompleter.h\"\r\n#include \"litewordcompleter.h\"\r\n#include \"liteeditor_global.h\"\r\n#include \"colorstyle/colorstyle.h\"\r\n#include \"qtc_texteditor/generichighlighter/highlighter.h\"\r\n#include \"qtc_editutil/uncommentselection.h\"\r\n#include \"functiontooltip.h\"\r\n#include \"quickopenapi/quickopenapi.h\"\r\n#include \"diff_match_patch/diff_match_patch.h\"\r\n#include \"editorutil/editorutil.h\"\r\n\r\n#include <QFileInfo>\r\n#include <QVBoxLayout>\r\n#include <QToolBar>\r\n#include <QAction>\r\n#include <QApplication>\r\n#include <QClipboard>\r\n#include <QMimeData>\r\n#include <QComboBox>\r\n#include <QLabel>\r\n#include <QLineEdit>\r\n#include <QTextDocument>\r\n#include <QStringListModel>\r\n#include <QStandardItemModel>\r\n#include <QStandardItem>\r\n#include <QTextCursor>\r\n#include <QToolTip>\r\n#include <QFileDialog>\r\n#include <QPrinter>\r\n#include <QTextDocumentWriter>\r\n#include <QPrintDialog>\r\n#include <QPrintPreviewDialog>\r\n#include <QPageSetupDialog>\r\n#include <QTextCodec>\r\n#include <QDebug>\r\n#include <QPalette>\r\n#include <QTimer>\r\n#include <QMessageBox>\r\n#include <QTextBlock>\r\n#include <QMenu>\r\n#include <QInputDialog>\r\n#include <QToolButton>\r\n#include <QFileSystemModel>\r\n\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\n\r\nLiteEditor::LiteEditor(LiteApi::IApplication *app)\r\n    : m_liteApp(app),\r\n      m_extension(new Extension),\r\n      m_completer(0),\r\n      m_funcTip(0),\r\n      m_bReadOnly(false)\r\n{\r\n    m_cleanCompleterCache = false;\r\n    m_cleanWhiteSpace = false;\r\n    m_offsetVisible = false;\r\n    m_syntax = 0;\r\n    m_widget = new QWidget;\r\n    m_editorWidget = new LiteEditorWidget(app,m_widget);\r\n    m_document = m_editorWidget->document();\r\n    m_editorWidget->setCursorWidth(2);\r\n    //m_editorWidget->setAcceptDrops(false);\r\n    m_defEditorPalette = m_editorWidget->palette();\r\n\r\n    createActions();\r\n    createToolBars();\r\n    createMenu();\r\n\r\n    m_editorWidget->setContextMenu(m_contextMenu);\r\n\r\n    QVBoxLayout *layout = new QVBoxLayout;\r\n    layout->setMargin(0);\r\n    layout->setSpacing(0);\r\n/*\r\n    m_toolBar->setStyleSheet(\"QToolBar {border: 1px ; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #eeeeee, stop: 1 #ababab); }\"\\\r\n                             \"QToolBar QToolButton { border:1px ; border-radius: 1px; }\"\\\r\n                             \"QToolBar QToolButton::hover { background-color: #ababab;}\"\\\r\n                             \"QToolBar::separator {width:2px; margin-left:2px; margin-right:2px; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #dedede, stop: 1 #a0a0a0);}\");\r\n*/\r\n    QHBoxLayout *toolLayout = new QHBoxLayout;\r\n    toolLayout->setMargin(0);\r\n    toolLayout->setSpacing(0);\r\n    toolLayout->addWidget(m_editToolBar);\r\n    //toolLayout->addWidget(m_editNavBar);\r\n    toolLayout->addWidget(m_navBar->toolBar());\r\n    toolLayout->addSpacing(0);\r\n//    //toolLayout->addWidget(m_infoToolBar);\r\n    layout->addLayout(toolLayout);\r\n//    QHBoxLayout *hlayout = new QHBoxLayout;\r\n//    hlayout->addWidget(m_editorWidget);\r\n//    hlayout->addWidget(m_editorWidget->navigateArea());\r\n    layout->addWidget(m_editorWidget);\r\n    m_widget->setLayout(layout);\r\n    m_file = new LiteEditorFile(m_liteApp,this);\r\n//    QTextOption option =  m_editorWidget->document()->defaultTextOption();\r\n//    option.setFlags(option.flags() | QTextOption::ShowTabsAndSpaces);\r\n//    option.setFlags(option.flags() | QTextOption::AddSpaceForLineAndParagraphSeparators);\r\n//    option.setTabs(tabs);\r\n\r\n//    m_editorWidget->document()->setDefaultTextOption(option);\r\n\r\n    connect(m_editorWidget->document(),SIGNAL(modificationChanged(bool)),this,SIGNAL(modificationChanged(bool)));\r\n    connect(m_editorWidget->document(),SIGNAL(contentsChanged()),this,SIGNAL(contentsChanged()));\r\n    connect(m_liteApp->optionManager(),SIGNAL(applyOption(QString)),this,SLOT(applyOption(QString)));\r\n    connect(m_liteApp->editorManager(),SIGNAL(colorStyleSchemeChanged()),this,SLOT(loadColorStyleScheme()));\r\n\r\n    //applyOption(\"option/liteeditor\");\r\n\r\n    LiteApi::IEditContext *editContext = new EditContext(this,this);\r\n\r\n    m_extension->addObject(\"LiteApi.ITextEditor\",this);\r\n    m_extension->addObject(\"LiteApi.ILiteEditor\",this);\r\n    m_extension->addObject(\"LiteApi.QToolBar.Edit\",m_editToolBar);\r\n    m_extension->addObject(\"LiteApi.QToolBar.Edit.Nav\",m_navBar->toolBar());\r\n    m_extension->addObject(\"LiteApi.QPlainTextEdit\",m_editorWidget);\r\n    m_extension->addObject(\"LiteApi.ContextMenu\",m_contextMenu);\r\n    m_extension->addObject(\"LiteApi.Menu.Edit\",m_editMenu);\r\n    m_extension->addObject(\"LiteApi.IEditContext\",editContext);\r\n\r\n    m_editorWidget->installEventFilter(m_liteApp->editorManager());\r\n    connect(m_editorWidget,SIGNAL(cursorPositionChanged()),this,SLOT(editPositionChanged()));\r\n    connect(m_editorWidget,SIGNAL(navigationStateChanged(QByteArray)),this,SLOT(navigationStateChanged(QByteArray)));\r\n    connect(m_editorWidget,SIGNAL(overwriteModeChanged(bool)),m_overInfoAct,SLOT(setVisible(bool)));\r\n    connect(m_editorWidget,SIGNAL(requestFontZoom(int)),this,SLOT(requestFontZoom(int)));\r\n    connect(m_editorWidget,SIGNAL(updateLink(QTextCursor,QPoint,bool)),this,SIGNAL(updateLink(QTextCursor,QPoint,bool)));\r\n    //connect(m_lineInfo,SIGNAL(doubleClickEvent()),this,SLOT(gotoLine()));\r\n    //connect(m_closeEditorAct,SIGNAL(triggered()),m_liteApp->editorManager(),SLOT(closeEditor()));\r\n\r\n    connect(m_liteApp,SIGNAL(broadcast(QString,QString,QVariant)),this,SLOT(broadcast(QString,QString,QVariant)));\r\n}\r\n\r\nLiteEditor::~LiteEditor()\r\n{\r\n    if (m_completer) {\r\n        delete m_completer;\r\n    }\r\n    if (m_funcTip) {\r\n        delete m_funcTip;\r\n    }\r\n    delete m_contextMenu;\r\n    delete m_editMenu;\r\n    delete m_extension;\r\n    delete m_editorWidget;\r\n    delete m_widget;\r\n    delete m_file;\r\n}\r\n\r\nQTextDocument *LiteEditor::document() const\r\n{\r\n    return m_document;\r\n}\r\n\r\nvoid LiteEditor::setEditorMark(LiteApi::IEditorMark *mark)\r\n{\r\n    m_editorWidget->setEditorMark(mark);\r\n    m_extension->addObject(\"LiteApi.IEditorMark\",mark);\r\n}\r\n\r\nvoid LiteEditor::setTextLexer(LiteApi::ITextLexer *lexer)\r\n{\r\n    m_extension->addObject(\"LiteApi.ITextLexer\",lexer);\r\n    m_editorWidget->setTextLexer(lexer);\r\n}\r\n\r\nvoid LiteEditor::setSyntaxHighlighter(TextEditor::SyntaxHighlighter *syntax)\r\n{\r\n    m_syntax = syntax;\r\n    m_extension->addObject(\"TextEditor::SyntaxHighlighter\",syntax);\r\n    m_commentAct->setVisible(m_syntax && !m_syntax->comment().isEmpty());\r\n}\r\n\r\nTextEditor::SyntaxHighlighter *LiteEditor::syntaxHighlighter() const\r\n{\r\n    return m_syntax;\r\n}\r\n\r\nvoid LiteEditor::setCompleter(LiteApi::ICompleter *complter)\r\n{\r\n    if (m_completer) {\r\n        QObject::disconnect(m_completer, 0, m_editorWidget, 0);\r\n        delete m_completer;\r\n        m_completer = 0;\r\n    }\r\n    m_completer = complter;\r\n    if (!m_completer) {\r\n        return;\r\n    }\r\n    m_completer->setEditor(m_editorWidget);\r\n    m_editorWidget->setCompleter(m_completer);\r\n\r\n    m_extension->addObject(\"LiteApi.ICompleter\",m_completer);\r\n\r\n    connect(m_editorWidget,SIGNAL(completionPrefixChanged(QString,bool)),m_completer,SLOT(completionPrefixChanged(QString,bool)));\r\n    connect(m_completer,SIGNAL(wordCompleted(QString,QString,QString)),this,SLOT(updateTip(QString,QString,QString)));\r\n}\r\n\r\nvoid LiteEditor::clipbordDataChanged()\r\n{\r\n    QClipboard *clipboard = QApplication::clipboard();\r\n    if (clipboard->mimeData()->hasText() ||\r\n            clipboard->mimeData()->hasHtml()) {\r\n        m_pasteAct->setEnabled(true);\r\n    } else {\r\n        m_pasteAct->setEnabled(false);\r\n    }\r\n}\r\n\r\nstatic void setActionsShortcutContext(const QList<QAction*> &actionList, Qt::ShortcutContext context)\r\n{\r\n    foreach (QAction *act, actionList) {\r\n        act->setShortcutContext(context);\r\n    }\r\n}\r\n\r\nvoid LiteEditor::createActions()\r\n{\r\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(this,\"Editor\");\r\n\r\n    m_undoAct = new QAction(QIcon(\"icon:liteeditor/images/undo.png\"),tr(\"Undo\"),this);\r\n    m_undoAct->setEnabled(false);\r\n\r\n    m_redoAct = new QAction(QIcon(\"icon:liteeditor/images/redo.png\"),tr(\"Redo\"),this);\r\n    m_redoAct->setEnabled(false);\r\n    \r\n    m_cutAct = new QAction(QIcon(\"icon:liteeditor/images/cut.png\"),tr(\"Cut\"),this);\r\n    m_cutAct->setEnabled(false);\r\n\r\n    m_copyAct = new QAction(QIcon(\"icon:liteeditor/images/copy.png\"),tr(\"Copy\"),this);\r\n    m_copyAct->setEnabled(false);\r\n\r\n    m_pasteAct = new QAction(QIcon(\"icon:liteeditor/images/paste.png\"),tr(\"Paste\"),this);\r\n\r\n    m_selectAllAct = new QAction(tr(\"Select All\"),this);\r\n\r\n#ifndef Q_OS_MAC\r\n    actionContext->regAction(m_copyAct,\"Copy\",QKeySequence::Copy);\r\n    actionContext->regAction(m_pasteAct,\"Paste\",QKeySequence::Paste);\r\n    actionContext->regAction(m_cutAct,\"Cut\",QKeySequence::Cut);\r\n    actionContext->regAction(m_selectAllAct,\"SelectAll\",QKeySequence::SelectAll);\r\n    actionContext->regAction(m_undoAct,\"Undo\",QKeySequence::Undo);\r\n    actionContext->regAction(m_redoAct,\"Redo\",QKeySequence::Redo);\r\n    setActionsShortcutContext(QList<QAction*>() << m_undoAct << m_redoAct << m_copyAct << m_cutAct\r\n                          << m_pasteAct << m_selectAllAct, Qt::WidgetShortcut);\r\n#endif\r\n\r\n\r\n    m_exportHtmlAct = new QAction(QIcon(\"icon:liteeditor/images/exporthtml.png\"),tr(\"Export HTML...\"),this);\r\n#ifndef QT_NO_PRINTER\r\n    m_exportPdfAct = new QAction(QIcon(\"icon:liteeditor/images/exportpdf.png\"),tr(\"Export PDF...\"),this);\r\n    m_filePrintAct = new QAction(QIcon(\"icon:liteeditor/images/fileprint.png\"),tr(\"Print...\"),this);\r\n    m_filePrintPreviewAct = new QAction(QIcon(\"icon:liteeditor/images/fileprintpreview.png\"),tr(\"Print Preview...\"),this);\r\n#endif\r\n    m_gotoPrevBlockAct = new QAction(tr(\"Go to Previous Block\"),this);\r\n    actionContext->regAction(m_gotoPrevBlockAct,\"GotoPreviousBlock\",\"Ctrl+[\");\r\n\r\n    m_gotoNextBlockAct = new QAction(tr(\"Go to Next Block\"),this);\r\n    actionContext->regAction(m_gotoNextBlockAct,\"GotoNextBlock\",\"Ctrl+]\");\r\n\r\n\r\n    m_selectBlockAct = new QAction(tr(\"Select Block\"),this);\r\n    actionContext->regAction(m_selectBlockAct,\"SelectBlock\",\"Ctrl+U\");\r\n\r\n    m_gotoMatchBraceAct = new QAction(tr(\"Go to Matching Brace\"),this);\r\n    actionContext->regAction(m_gotoMatchBraceAct,\"GotoMatchBrace\",\"Ctrl+E\");\r\n\r\n    m_gotoDocStartAct = new QAction(tr(\"Go to Doc Start\"),this);\r\n    actionContext->regAction(m_gotoDocStartAct,\"GotoDocStart\",\"\");\r\n    connect(m_gotoDocStartAct,SIGNAL(triggered()),m_editorWidget,SLOT(gotoDocStart()));\r\n\r\n    m_gotoDocEndAct = new QAction(tr(\"Go to Doc End\"),this);\r\n    actionContext->regAction(m_gotoDocEndAct,\"GotoDocEnd\",\"\");\r\n    connect(m_gotoDocEndAct,SIGNAL(triggered()),m_editorWidget,SLOT(gotoDocEnd()));\r\n\r\n    m_gotoLineStartAct = new QAction(tr(\"Go to Line Start\"),this);\r\n    actionContext->regAction(m_gotoLineStartAct,\"GotoLineStart\",\"\");\r\n    connect(m_gotoLineStartAct,SIGNAL(triggered()),m_editorWidget,SLOT(gotoLineStart()));\r\n\r\n    m_gotoLineEndAct = new QAction(tr(\"Go to Line End\"),this);\r\n    actionContext->regAction(m_gotoLineEndAct,\"GotoLineEnd\",\"\");\r\n    connect(m_gotoLineEndAct,SIGNAL(triggered()),m_editorWidget,SLOT(gotoLineEnd()));\r\n\r\n    m_gotoPrevLineAct = new QAction(tr(\"Go to Previous Line\"),this);\r\n    actionContext->regAction(m_gotoPrevLineAct,\"GotoPreviousLine\",\"\");\r\n    connect(m_gotoPrevLineAct,SIGNAL(triggered()),m_editorWidget,SLOT(gotoPreviousLine()));\r\n\r\n    m_gotoNextLineAct = new QAction(tr(\"Go to Next Line\"),this);\r\n    actionContext->regAction(m_gotoNextLineAct,\"GotoNextLine\",\"\");\r\n    connect(m_gotoNextLineAct,SIGNAL(triggered()),m_editorWidget,SLOT(gotoNextLine()));\r\n\r\n    m_gotoPrevCharacterAct = new QAction(tr(\"Go to Previous Character\"),this);\r\n    actionContext->regAction(m_gotoPrevCharacterAct,\"GotoPreviousCharacter\",\"\");\r\n    connect(m_gotoPrevCharacterAct,SIGNAL(triggered()),m_editorWidget,SLOT(gotoPreviousCharacter()));\r\n\r\n    m_gotoNextCharacterAct = new QAction(tr(\"Go to Next Charater\"),this);\r\n    actionContext->regAction(m_gotoNextCharacterAct,\"GotoNextCharater\",\"\");\r\n    connect(m_gotoNextCharacterAct,SIGNAL(triggered()),m_editorWidget,SLOT(gotoNextCharacter()));\r\n\r\n    m_gotoPrevWordAct = new QAction(tr(\"Go to Previous Word\"),this);\r\n    actionContext->regAction(m_gotoPrevWordAct,\"GotoPreviousWord\",\"\");\r\n    connect(m_gotoPrevWordAct,SIGNAL(triggered()),m_editorWidget,SLOT(gotoPreviousWord()));\r\n\r\n    m_gotoNextWordAct = new QAction(tr(\"Go to Next Word\"),this);\r\n    actionContext->regAction(m_gotoNextWordAct,\"GotoNextWord\",\"\");\r\n    connect(m_gotoNextWordAct,SIGNAL(triggered()),m_editorWidget,SLOT(gotoNextWord()));\r\n\r\n    m_foldAct = new QAction(tr(\"Fold\"),this);   \r\n    actionContext->regAction(m_foldAct,\"Fold\",\"Ctrl+<\");\r\n\r\n    m_unfoldAct = new QAction(tr(\"Unfold\"),this);\r\n    actionContext->regAction(m_unfoldAct,\"Unfold\",\"Ctrl+>\");\r\n\r\n    m_foldAllAct = new QAction(tr(\"Fold All\"),this);\r\n    actionContext->regAction(m_foldAllAct,\"FoldAll\",\"\");\r\n\r\n    m_unfoldAllAct = new QAction(tr(\"Unfold All\"),this);\r\n    actionContext->regAction(m_unfoldAllAct,\"UnfoldAll\",\"\");\r\n\r\n    connect(m_foldAct,SIGNAL(triggered()),m_editorWidget,SLOT(fold()));\r\n    connect(m_unfoldAct,SIGNAL(triggered()),m_editorWidget,SLOT(unfold()));\r\n    connect(m_foldAllAct,SIGNAL(triggered()),m_editorWidget,SLOT(foldAll()));\r\n    connect(m_unfoldAllAct,SIGNAL(triggered()),m_editorWidget,SLOT(unfoldAll()));\r\n\r\n    m_gotoLineAct = new QAction(tr(\"Go to Line\"),this);\r\n    actionContext->regAction(m_gotoLineAct,\"GotoLine\",\"Ctrl+L\");\r\n\r\n    m_lockAct = new QAction(QIcon(\"icon:liteeditor/images/lock.png\"),tr(\"File is readonly\"),this);\r\n    m_lockAct->setEnabled(false);\r\n\r\n    m_unlockAct = new QAction(QIcon(\"icon:liteeditor/images/unlock.png\"),tr(\"File is writable\"),this);\r\n    m_unlockAct->setEnabled(false);\r\n\r\n\r\n    m_duplicateAct = new QAction(tr(\"Duplicate\"),this);\r\n    actionContext->regAction(m_duplicateAct,\"Duplicate\",\"Ctrl+Shift+D\");\r\n    connect(m_duplicateAct,SIGNAL(triggered()),m_editorWidget,SLOT(duplicate()));\r\n\r\n    m_deleteLineAct = new QAction(tr(\"Delete Line\"),this);\r\n    actionContext->regAction(m_deleteLineAct,\"DeleteLine\",\"Ctrl+Shift+K\");\r\n    connect(m_deleteLineAct,SIGNAL(triggered()),m_editorWidget,SLOT(deleteLine()));\r\n\r\n    m_copyLineAct = new QAction(tr(\"Copy Line\"),this);\r\n    actionContext->regAction(m_copyLineAct,\"CopyLine\",\"Ctrl+Ins\");\r\n    connect(m_copyLineAct,SIGNAL(triggered()),m_editorWidget,SLOT(copyLine()));\r\n\r\n    m_cutLineAct = new QAction(tr(\"Cut Line\"),this);\r\n    actionContext->regAction(m_cutLineAct,\"CutLine\",\"Shift+Del\");\r\n    connect(m_cutLineAct,SIGNAL(triggered()),m_editorWidget,SLOT(cutLine()));\r\n\r\n    m_insertLineBeforeAct = new QAction(tr(\"Insert Line Before\"),this);\r\n    actionContext->regAction(m_insertLineBeforeAct,\"InsertLineBefore\",\"Ctrl+Shift+Return\");\r\n    connect(m_insertLineBeforeAct,SIGNAL(triggered()),m_editorWidget,SLOT(insertLineBefore()));\r\n\r\n    m_insertLineAfterAct = new QAction(tr(\"Insert Line After\"),this);\r\n    actionContext->regAction(m_insertLineAfterAct,\"InsertLineAfter\",\"Ctrl+Return\");\r\n    connect(m_insertLineAfterAct,SIGNAL(triggered()),m_editorWidget,SLOT(insertLineAfter()));\r\n\r\n    m_increaseFontSizeAct = new QAction(tr(\"Increase Font Size\"),this);\r\n    actionContext->regAction(m_increaseFontSizeAct,\"IncreaseFontSize\",\"Ctrl++\");\r\n\r\n    m_decreaseFontSizeAct = new QAction(tr(\"Decrease Font Size\"),this);\r\n    actionContext->regAction(m_decreaseFontSizeAct,\"DecreaseFontSize\",\"Ctrl+-\");\r\n\r\n    m_resetFontSizeAct = new QAction(tr(\"Reset Font Size\"),this);\r\n    actionContext->regAction(m_resetFontSizeAct,\"ResetFontSize\",\"Ctrl+0\");\r\n\r\n    m_cleanWhitespaceAct = new QAction(tr(\"Clean Whitespace\"),this);\r\n    actionContext->regAction(m_cleanWhitespaceAct,\"CleanWhitespace\",\"\");\r\n\r\n    m_mimeLineWrapAct = new QAction(tr(\"Line Wrap (MimeType)\"),this);\r\n    m_mimeLineWrapAct->setCheckable(true);\r\n    actionContext->regAction(m_mimeLineWrapAct,\"LineWrap\",\"\");\r\n\r\n    m_codeCompleteAct = new QAction(tr(\"Code Complete\"),this);\r\n#ifdef Q_OS_MAC\r\n    actionContext->regAction(m_codeCompleteAct,\"CodeComplete\",\"Meta+Space\");\r\n#else\r\n    actionContext->regAction(m_codeCompleteAct,\"CodeComplete\",\"Ctrl+Space\");\r\n#endif\r\n\r\n    m_commentAct = new QAction(tr(\"Toggle Comment\"),this);\r\n    actionContext->regAction(m_commentAct,\"Comment\",\"Ctrl+/\");\r\n\r\n    m_blockCommentAct = new QAction(tr(\"Toggle Block Commnet\"),this);\r\n    actionContext->regAction(m_blockCommentAct,\"BlockComment\",\"Ctrl+Shift+/\");\r\n\r\n    m_autoIndentAct = new QAction(tr(\"Auto-indent Selection\"),this);\r\n    actionContext->regAction(m_autoIndentAct,\"AutoIndent\",\"Ctrl+I\");\r\n    m_autoIndentAct->setVisible(false);\r\n\r\n    m_mimeTabToSpacesAct = new QAction(tr(\"Tab To Spaces (MimeType)\"),this);\r\n    actionContext->regAction(m_mimeTabToSpacesAct,\"TabToSpaces\",\"\");\r\n    m_mimeTabToSpacesAct->setCheckable(true);\r\n\r\n    m_lineEndingWindowAct = new QAction(tr(\"Line End Windows (\\\\r\\\\n)\"),this);\r\n    actionContext->regAction(m_lineEndingWindowAct,\"LineEndingWindow\",\"\");\r\n    m_lineEndingWindowAct->setCheckable(true);\r\n\r\n    m_lineEndingUnixAct = new QAction(tr(\"Line End Unix (\\\\n)\"),this);\r\n    actionContext->regAction(m_lineEndingUnixAct,\"LineEndingUnix\",\"\");\r\n    m_lineEndingUnixAct->setCheckable(true);\r\n\r\n    m_visualizeWhitespaceAct = new QAction(tr(\"Visualize Whitespace (Global)\"),this);\r\n    actionContext->regAction(m_visualizeWhitespaceAct,\"VisualizeWhitespace\",\"\");\r\n    m_visualizeWhitespaceAct->setCheckable(true);\r\n\r\n    m_commentAct->setVisible(false);\r\n    m_blockCommentAct->setVisible(false);\r\n\r\n    m_moveLineUpAction = new QAction(tr(\"Move Line Up\"),this);\r\n    actionContext->regAction(m_moveLineUpAction,\"MoveLineUp\",\"Ctrl+Shift+Up\");\r\n\r\n    m_moveLineDownAction = new QAction(tr(\"Move Line Down\"),this);\r\n    actionContext->regAction(m_moveLineDownAction,\"MoveLineDown\",\"Ctrl+Shift+Down\");\r\n\r\n    m_copyLineUpAction = new QAction(tr(\"Copy Line Up\"),this);\r\n    actionContext->regAction(m_copyLineUpAction,\"CopyLineUp\",\"Ctrl+Alt+Up\");\r\n\r\n    m_copyLineDownAction = new QAction(tr(\"Copy Line Down\"),this);\r\n    actionContext->regAction(m_copyLineDownAction,\"CopyLineDown\",\"Ctrl+Alt+Down\");\r\n\r\n    m_joinLinesAction = new QAction(tr(\"Join Lines\"),this);\r\n    actionContext->regAction(m_joinLinesAction,\"JoinLines\",\"Ctrl+J\");\r\n\r\n    m_convertCaseTitleAct = new QAction(tr(\"Title Case\"),this);\r\n    actionContext->regAction(m_convertCaseTitleAct,\"TitleCase\",\"\");\r\n    connect(m_convertCaseTitleAct,SIGNAL(triggered()),m_editorWidget,SLOT(convertCaseTitle()));\r\n\r\n    m_convertCaseUpperAct = new QAction(tr(\"Upper Case\"),this);\r\n    actionContext->regAction(m_convertCaseUpperAct,\"UpperCase\",\"\");\r\n    connect(m_convertCaseUpperAct,SIGNAL(triggered()),m_editorWidget,SLOT(convertCaseUpper()));\r\n\r\n    m_convertCaseLowerAct = new QAction(tr(\"Lower Case\"),this);\r\n    actionContext->regAction(m_convertCaseLowerAct,\"LowerCase\",\"\");\r\n    connect(m_convertCaseLowerAct,SIGNAL(triggered()),m_editorWidget,SLOT(convertCaseLower()));\r\n\r\n    m_convertCaseSwapAct = new QAction(tr(\"Swap Case\"),this);\r\n    actionContext->regAction(m_convertCaseSwapAct,\"SwapCase\",\"\");\r\n    connect(m_convertCaseSwapAct,SIGNAL(triggered()),m_editorWidget,SLOT(convertCaseSwap()));\r\n\r\n    m_convertTabToSpaces = new QAction(tr(\"Tab To Spaces\"),this);\r\n    actionContext->regAction(m_convertTabToSpaces,\"TabToSpaces\",\"\");\r\n    connect(m_convertTabToSpaces,SIGNAL(triggered()),m_editorWidget,SLOT(convertTabToSpaces()));\r\n\r\n    m_convertSpacesToTab = new QAction(tr(\"Spaces To Tab\"),this);\r\n    actionContext->regAction(m_convertSpacesToTab,\"SpacesToTab\",\"\");\r\n    connect(m_convertSpacesToTab,SIGNAL(triggered()),m_editorWidget,SLOT(convertSpacesToTab()));\r\n\r\n    connect(m_codeCompleteAct,SIGNAL(triggered()),m_editorWidget,SLOT(codeCompleter()));\r\n//    m_widget->addAction(m_foldAct);\r\n//    m_widget->addAction(m_unfoldAct);\r\n//    m_widget->addAction(m_gotoLineAct);\r\n\r\n//    m_widget->addAction(m_gotoPrevBlockAct);\r\n//    m_widget->addAction(m_gotoNextBlockAct);\r\n//    m_widget->addAction(m_selectBlockAct);\r\n//    m_widget->addAction(m_gotoMatchBraceAct);\r\n\r\n    connect(m_editorWidget,SIGNAL(undoAvailable(bool)),m_undoAct,SLOT(setEnabled(bool)));\r\n    connect(m_editorWidget,SIGNAL(redoAvailable(bool)),m_redoAct,SLOT(setEnabled(bool)));\r\n    connect(m_editorWidget,SIGNAL(copyAvailable(bool)),m_cutAct,SLOT(setEnabled(bool)));\r\n    connect(m_editorWidget,SIGNAL(copyAvailable(bool)),m_copyAct,SLOT(setEnabled(bool)));\r\n\r\n    connect(m_undoAct,SIGNAL(triggered()),m_editorWidget,SLOT(undo()));\r\n    connect(m_redoAct,SIGNAL(triggered()),m_editorWidget,SLOT(redo()));\r\n    connect(m_cutAct,SIGNAL(triggered()),m_editorWidget,SLOT(cut()));\r\n    connect(m_copyAct,SIGNAL(triggered()),m_editorWidget,SLOT(copy()));\r\n    connect(m_pasteAct,SIGNAL(triggered()),m_editorWidget,SLOT(paste()));\r\n    connect(m_selectAllAct,SIGNAL(triggered()),m_editorWidget,SLOT(selectAll()));\r\n    connect(m_selectBlockAct,SIGNAL(triggered()),m_editorWidget,SLOT(selectBlock()));\r\n\r\n    connect(m_exportHtmlAct,SIGNAL(triggered()),this,SLOT(exportHtml()));\r\n#ifndef QT_NO_PRINTER\r\n    connect(m_exportPdfAct,SIGNAL(triggered()),this,SLOT(exportPdf()));\r\n    connect(m_filePrintAct,SIGNAL(triggered()),this,SLOT(filePrint()));\r\n    connect(m_filePrintPreviewAct,SIGNAL(triggered()),this,SLOT(filePrintPreview()));\r\n#endif\r\n    connect(m_gotoPrevBlockAct,SIGNAL(triggered()),m_editorWidget,SLOT(gotoPrevBlock()));\r\n    connect(m_gotoNextBlockAct,SIGNAL(triggered()),m_editorWidget,SLOT(gotoNextBlock()));\r\n    connect(m_gotoMatchBraceAct,SIGNAL(triggered()),m_editorWidget,SLOT(gotoMatchBrace()));\r\n    connect(m_gotoLineAct,SIGNAL(triggered()),this,SLOT(gotoLine()));\r\n    connect(m_increaseFontSizeAct,SIGNAL(triggered()),this,SLOT(increaseFontSize()));\r\n    connect(m_decreaseFontSizeAct,SIGNAL(triggered()),this,SLOT(decreaseFontSize()));\r\n    connect(m_resetFontSizeAct,SIGNAL(triggered()),this,SLOT(resetFontSize()));\r\n    connect(m_cleanWhitespaceAct,SIGNAL(triggered()),m_editorWidget,SLOT(cleanWhitespace()));\r\n    connect(m_commentAct,SIGNAL(triggered()),this,SLOT(comment()));\r\n    connect(m_blockCommentAct,SIGNAL(triggered()),this,SLOT(blockComment()));\r\n    connect(m_autoIndentAct,SIGNAL(triggered()),this,SLOT(autoIndent()));\r\n\r\n    connect(m_mimeLineWrapAct,SIGNAL(triggered(bool)),this,SLOT(toggledLineWrapMode(bool)));\r\n    connect(m_mimeTabToSpacesAct,SIGNAL(toggled(bool)),this,SLOT(toggledTabToSpaces(bool)));\r\n    connect(m_visualizeWhitespaceAct,SIGNAL(toggled(bool)),this,SLOT(toggledVisualizeWhitespace(bool)));\r\n\r\n    connect(m_moveLineUpAction,SIGNAL(triggered()),m_editorWidget,SLOT(moveLineUp()));\r\n    connect(m_moveLineDownAction,SIGNAL(triggered()),m_editorWidget,SLOT(moveLineDown()));\r\n    connect(m_copyLineUpAction,SIGNAL(triggered()),m_editorWidget,SLOT(copyLineUp()));\r\n    connect(m_copyLineDownAction,SIGNAL(triggered()),m_editorWidget,SLOT(copyLineDown()));\r\n    connect(m_joinLinesAction,SIGNAL(triggered()),m_editorWidget,SLOT(joinLines()));\r\n    //connect(m_lineEndingWindowAct,SIGNAL(triggered()),this,SLOT(lineEndingWindow()));\r\n    //connect(m_lineEndingUnixAct,SIGNAL(triggered()),this,SLOT(lineEndingUnixAct()));\r\n    QActionGroup *group = new QActionGroup(this);\r\n    group->addAction(m_lineEndingWindowAct);\r\n    group->addAction(m_lineEndingUnixAct);\r\n    connect(group,SIGNAL(triggered(QAction*)),this,SLOT(triggeredLineEnding(QAction*)));\r\n\r\n#ifdef Q_OS_WIN\r\n    QClipboard *clipboard = QApplication::clipboard();\r\n    connect(clipboard,SIGNAL(dataChanged()),this,SLOT(clipbordDataChanged()));\r\n    clipbordDataChanged();\r\n#endif\r\n}\r\n\r\nvoid LiteEditor::findCodecs()\r\n {\r\n     QMap<QString, QTextCodec *> codecMap;\r\n     QRegExp iso8859RegExp(\"ISO[- ]8859-([0-9]+).*\");\r\n\r\n     foreach (int mib, QTextCodec::availableMibs()) {\r\n         QTextCodec *codec = QTextCodec::codecForMib(mib);\r\n\r\n         QString sortKey = codec->name().toUpper();\r\n         int rank;\r\n\r\n         if (sortKey.startsWith(\"UTF-8\")) {\r\n             rank = 1;\r\n         } else if (sortKey.startsWith(\"UTF-16\")) {\r\n             rank = 2;\r\n         } else if (iso8859RegExp.exactMatch(sortKey)) {\r\n             if (iso8859RegExp.cap(1).size() == 1)\r\n                 rank = 3;\r\n             else\r\n                 rank = 4;\r\n         } else {\r\n             rank = 5;\r\n         }\r\n         sortKey.prepend(QChar('0' + rank));\r\n\r\n         codecMap.insert(sortKey, codec);\r\n     }\r\n     m_codecs = codecMap.values();\r\n}\r\n\r\nvoid LiteEditor::createToolBars()\r\n{\r\n    m_editToolBar = new QToolBar(\"editor\",m_widget);\r\n    m_editToolBar->setIconSize(LiteApi::getToolBarIconSize(m_liteApp));\r\n    m_editToolBar->setVisible(m_liteApp->settings()->value(EDITOR_TOOLBAR_VISIBLE,true).toBool());\r\n\r\n//    m_editNavBar = new QToolBar(\"editor.nav\",m_widget);\r\n//    m_editNavBar->setIconSize(LiteApi::getToolBarIconSize(m_liteApp));\r\n    m_navBar = new NavigateBar(m_liteApp,this);\r\n    m_navBar->createToolBar(\"editor.nav\",m_widget);\r\n    m_navBar->toolBar()->setVisible(m_liteApp->settings()->value(EDITOR_NAVBAR_VISIBLE,true).toBool());\r\n\r\n    //editor toolbar\r\n   // m_editToolBar->addSeparator();\r\n    m_editToolBar->addAction(m_undoAct);\r\n    m_editToolBar->addAction(m_redoAct);\r\n    m_editToolBar->addSeparator();\r\n    m_editToolBar->addAction(m_cutAct);\r\n    m_editToolBar->addAction(m_copyAct);\r\n    m_editToolBar->addAction(m_pasteAct);\r\n#ifdef LITEEDITOR_FIND\r\n    m_findComboBox = new QComboBox(m_widget);\r\n    m_findComboBox->setEditable(true);\r\n    m_findComboBox->setMinimumWidth(120);\r\n    m_findComboBox->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred);\r\n    m_toolBar->addWidget(m_findComboBox);\r\n    m_toolBar->addSeparator();\r\n    connect(m_findComboBox->lineEdit(),SIGNAL(returnPressed()),this,SLOT(findNextText()));\r\n#endif\r\n\r\n    //info toolbar\r\n\r\n    m_editToolBar->addSeparator();\r\n    //add lock info\r\n    m_editToolBar->addAction(m_lockAct);\r\n    m_editToolBar->addAction(m_unlockAct);\r\n\r\n\r\n    //add over info\r\n    QLabel *overInfo = new QLabel(\"[Over]\");\r\n    m_overInfoAct = m_editToolBar->addWidget(overInfo);\r\n    m_overInfoAct->setVisible(false);\r\n\r\n    //add line info\r\n//    m_lineInfo = new QLabelEx(\"000:000\");\r\n//    m_editToolBar->addWidget(m_lineInfo);\r\n\r\n    //add close\r\n    //m_closeEditorAct = new QAction(QIcon(\"icon:images/close.png\"),tr(\"Close Document\"),this);\r\n    //m_infoToolBar->addAction(m_closeEditorAct);\r\n}\r\n\r\nvoid LiteEditor::createMenu()\r\n{\r\n    m_editMenu = new QMenu(m_editorWidget);\r\n    m_contextMenu = new QMenu(m_editorWidget);\r\n\r\n    //editor menu\r\n    m_editMenu->addAction(m_undoAct);\r\n    m_editMenu->addAction(m_redoAct);\r\n    m_editMenu->addSeparator();\r\n    m_editMenu->addAction(m_cutAct);\r\n    m_editMenu->addAction(m_copyAct);\r\n    m_editMenu->addAction(m_pasteAct);\r\n    m_editMenu->addSeparator();\r\n    m_editMenu->addAction(m_selectAllAct);\r\n    m_editMenu->addSeparator();\r\n\r\n    QMenu *subMenu = m_editMenu->addMenu(tr(\"Advanced\"));\r\n    subMenu->addAction(m_duplicateAct);\r\n    subMenu->addAction(m_copyLineAct);\r\n    subMenu->addAction(m_deleteLineAct);\r\n    subMenu->addAction(m_cutLineAct);\r\n    subMenu->addAction(m_moveLineUpAction);\r\n    subMenu->addAction(m_moveLineDownAction);\r\n    subMenu->addAction(m_copyLineUpAction);\r\n    subMenu->addAction(m_copyLineDownAction);\r\n    subMenu->addAction(m_joinLinesAction);\r\n    subMenu->addAction(m_insertLineBeforeAct);\r\n    subMenu->addAction(m_insertLineAfterAct);\r\n    subMenu->addSeparator();\r\n    subMenu->addAction(m_cleanWhitespaceAct);\r\n    subMenu->addSeparator();\r\n    subMenu->addAction(m_selectBlockAct);\r\n    subMenu->addAction(m_selectAllAct);\r\n\r\n#ifndef QT_NO_PRINTER\r\n    subMenu->addSeparator();\r\n    subMenu->addAction(m_exportPdfAct);\r\n    subMenu->addSeparator();\r\n    subMenu->addAction(m_filePrintPreviewAct);\r\n    subMenu->addAction(m_filePrintAct);\r\n#endif\r\n\r\n    subMenu = m_editMenu->addMenu(tr(\"Goto\"));\r\n\r\n    subMenu->addAction(m_gotoLineAct);\r\n    subMenu->addAction(m_gotoMatchBraceAct);\r\n    subMenu->addSeparator();\r\n    subMenu->addAction(m_gotoPrevBlockAct);\r\n    subMenu->addAction(m_gotoNextBlockAct);\r\n    subMenu->addAction(m_gotoLineStartAct);\r\n    subMenu->addAction(m_gotoLineEndAct);\r\n    subMenu->addAction(m_gotoPrevLineAct);\r\n    subMenu->addAction(m_gotoNextLineAct);\r\n    subMenu->addAction(m_gotoPrevCharacterAct);\r\n    subMenu->addAction(m_gotoNextCharacterAct);\r\n    subMenu->addAction(m_gotoPrevWordAct);\r\n    subMenu->addAction(m_gotoNextWordAct);\r\n    subMenu->addAction(m_gotoDocStartAct);\r\n    subMenu->addAction(m_gotoDocEndAct);\r\n\r\n\r\n    subMenu = m_editMenu->addMenu(tr(\"Convert Case\"));\r\n    subMenu->addAction(m_convertCaseTitleAct);\r\n    subMenu->addAction(m_convertCaseUpperAct);\r\n    subMenu->addAction(m_convertCaseLowerAct);\r\n    subMenu->addAction(m_convertCaseSwapAct);\r\n\r\n    subMenu = m_editMenu->addMenu(tr(\"Convert Tab\"));\r\n    subMenu->addAction(m_convertTabToSpaces);\r\n    subMenu->addAction(m_convertSpacesToTab);\r\n\r\n    subMenu = m_editMenu->addMenu(tr(\"Code Folding\"));\r\n    subMenu->addAction(m_foldAct);\r\n    subMenu->addAction(m_unfoldAct);\r\n    subMenu->addAction(m_foldAllAct);\r\n    subMenu->addAction(m_unfoldAllAct);\r\n\r\n    subMenu = m_editMenu->addMenu(tr(\"Settings\"));\r\n    subMenu->menuAction()->setMenuRole(QAction::NoRole);\r\n    subMenu->addAction(m_visualizeWhitespaceAct);\r\n    subMenu->addSeparator();\r\n    subMenu->addAction(m_mimeLineWrapAct);\r\n    subMenu->addAction(m_mimeTabToSpacesAct);\r\n    subMenu->addSeparator();\r\n    subMenu->addAction(m_increaseFontSizeAct);\r\n    subMenu->addAction(m_decreaseFontSizeAct);\r\n    subMenu->addAction(m_resetFontSizeAct);\r\n    subMenu->addSeparator();\r\n    subMenu->addAction(m_lineEndingWindowAct);\r\n    subMenu->addAction(m_lineEndingUnixAct);\r\n\r\n    m_editMenu->addSeparator();\r\n    m_editMenu->addAction(m_codeCompleteAct);\r\n    m_editMenu->addSeparator();\r\n    m_editMenu->addAction(m_commentAct);\r\n    m_editMenu->addAction(m_blockCommentAct);\r\n    m_editMenu->addAction(m_autoIndentAct);\r\n\r\n    //context menu\r\n    m_contextMenu->addAction(m_cutAct);\r\n    m_contextMenu->addAction(m_copyAct);\r\n    m_contextMenu->addAction(m_pasteAct);\r\n    m_contextMenu->addSeparator();\r\n\r\n    subMenu = m_contextMenu->addMenu(tr(\"Advanced\"));\r\n    subMenu->addAction(m_duplicateAct);\r\n    subMenu->addAction(m_copyLineAct);\r\n    subMenu->addAction(m_deleteLineAct);\r\n    subMenu->addAction(m_cutLineAct);\r\n    subMenu->addAction(m_moveLineUpAction);\r\n    subMenu->addAction(m_moveLineDownAction);\r\n    subMenu->addAction(m_copyLineUpAction);\r\n    subMenu->addAction(m_copyLineDownAction);\r\n    subMenu->addAction(m_joinLinesAction);\r\n    subMenu->addAction(m_insertLineBeforeAct);\r\n    subMenu->addAction(m_insertLineAfterAct);\r\n    subMenu->addSeparator();\r\n    subMenu->addAction(m_cleanWhitespaceAct);\r\n    subMenu->addSeparator();\r\n    subMenu->addAction(m_selectBlockAct);\r\n    subMenu->addAction(m_selectAllAct);\r\n\r\n    subMenu = m_contextMenu->addMenu(tr(\"Goto\"));\r\n    subMenu->addAction(m_gotoLineAct);\r\n    subMenu->addAction(m_gotoMatchBraceAct);\r\n    subMenu->addSeparator();\r\n    subMenu->addAction(m_gotoPrevBlockAct);\r\n    subMenu->addAction(m_gotoNextBlockAct);\r\n    subMenu->addAction(m_gotoLineStartAct);\r\n    subMenu->addAction(m_gotoLineEndAct);\r\n    subMenu->addAction(m_gotoPrevLineAct);\r\n    subMenu->addAction(m_gotoNextLineAct);\r\n    subMenu->addAction(m_gotoPrevCharacterAct);\r\n    subMenu->addAction(m_gotoNextCharacterAct);\r\n    subMenu->addAction(m_gotoPrevWordAct);\r\n    subMenu->addAction(m_gotoNextWordAct);\r\n    subMenu->addAction(m_gotoDocStartAct);\r\n    subMenu->addAction(m_gotoDocEndAct);\r\n\r\n    subMenu = m_contextMenu->addMenu(tr(\"Convert Case\"));\r\n    subMenu->addAction(m_convertCaseTitleAct);\r\n    subMenu->addAction(m_convertCaseUpperAct);\r\n    subMenu->addAction(m_convertCaseLowerAct);\r\n    subMenu->addAction(m_convertCaseSwapAct);\r\n\r\n    subMenu = m_contextMenu->addMenu(tr(\"Convert Tab\"));\r\n    subMenu->addAction(m_convertTabToSpaces);\r\n    subMenu->addAction(m_convertSpacesToTab);\r\n\r\n    subMenu = m_contextMenu->addMenu(tr(\"Code Folding\"));\r\n    subMenu->addAction(m_foldAct);\r\n    subMenu->addAction(m_unfoldAct);\r\n    subMenu->addAction(m_foldAllAct);\r\n    subMenu->addAction(m_unfoldAllAct);\r\n\r\n    subMenu = m_contextMenu->addMenu(tr(\"Settings\"));\r\n    subMenu->menuAction()->setMenuRole(QAction::NoRole);\r\n    subMenu->addAction(m_visualizeWhitespaceAct);\r\n    subMenu->addSeparator();\r\n    subMenu->addAction(m_mimeLineWrapAct);\r\n    subMenu->addAction(m_mimeTabToSpacesAct);\r\n    subMenu->addSeparator();\r\n    subMenu->addAction(m_increaseFontSizeAct);\r\n    subMenu->addAction(m_decreaseFontSizeAct);\r\n    subMenu->addAction(m_resetFontSizeAct);\r\n    subMenu->addSeparator();\r\n    subMenu->addAction(m_lineEndingWindowAct);\r\n    subMenu->addAction(m_lineEndingUnixAct);\r\n\r\n    m_contextMenu->addSeparator();\r\n    m_contextMenu->addAction(m_commentAct);\r\n    m_contextMenu->addAction(m_blockCommentAct);\r\n    m_contextMenu->addAction(m_autoIndentAct);\r\n}\r\n\r\n#ifdef LITEEDITOR_FIND\r\nvoid LiteEditor::findNextText()\r\n{\r\n    QString text = m_findComboBox->lineEdit()->text();\r\n    if (text.isEmpty()) {\r\n        return;\r\n    }\r\n    m_editorWidget->find(text);\r\n}\r\n#endif\r\n\r\nLiteApi::IExtension *LiteEditor::extension()\r\n{\r\n    return m_extension;\r\n}\r\n\r\nQWidget *LiteEditor::widget()\r\n{\r\n    return m_widget;\r\n}\r\n\r\nQString LiteEditor::name() const\r\n{\r\n    return QFileInfo(m_file->filePath()).fileName();\r\n}\r\n\r\nQIcon LiteEditor::icon() const\r\n{\r\n    return QIcon();\r\n}\r\n\r\nstatic QString escaped(const QString &text)\r\n{\r\n#if QT_VERSION >= 0x050000\r\n    return text.toHtmlEscaped();\r\n#else\r\n    return Qt::escape(text);\r\n#endif\r\n}\r\n\r\n\r\nvoid LiteEditor::initLoad()\r\n{\r\n    m_editorWidget->initLoadDocument();\r\n    updateEditorInfo();\r\n    if (m_file->filePath().isEmpty()) {\r\n        return;\r\n    }\r\n    m_navBar->LoadPath(m_file->filePath());\r\n}\r\n\r\nvoid LiteEditor::updateEditorInfo()\r\n{\r\n    setReadOnly(m_file->isReadOnly());\r\n    m_lineEndingUnixAct->setChecked(m_file->isLineEndUnix());\r\n    m_lineEndingWindowAct->setChecked(!m_file->isLineEndUnix());\r\n\r\n    editPositionChanged();\r\n}\r\n\r\nbool LiteEditor::createNew(const QString &contents, const QString &mimeType)\r\n{\r\n    m_editorWidget->setPlainText(contents);\r\n    m_file->setMimeType(mimeType);\r\n    m_file->setLineEndUnix(true);\r\n    initLoad();\r\n    return true;\r\n}\r\n\r\nbool LiteEditor::open(const QString &fileName,const QString &mimeType)\r\n{\r\n    QString outText;\r\n    bool success = m_file->loadText(fileName,mimeType,outText);\r\n    if (success) {\r\n        m_document->setPlainText(outText);\r\n        initLoad();\r\n    }\r\n    return success;\r\n}\r\n\r\nbool LiteEditor::reload()\r\n{\r\n//    QByteArray state = this->saveState();\r\n    QString outText;\r\n    bool success = m_file->loadText(filePath(),mimeType(),outText);\r\n    if (success) {\r\n        loadTextUseDiff(outText);\r\n        m_document->setModified(false);\r\n        this->setNavigateHead(LiteApi::EditorNavigateReload,tr(\"Reload File\"));\r\n        updateEditorInfo();\r\n        emit reloaded();\r\n    }\r\n    return success;\r\n}\r\n\r\nbool LiteEditor::save()\r\n{\r\n    if (m_bReadOnly) {\r\n        return false;\r\n    }\r\n\r\n    return saveAs(m_file->filePath());\r\n}\r\n\r\nbool LiteEditor::saveAs(const QString &fileName)\r\n{\r\n    if (m_cleanWhiteSpace) {\r\n        m_editorWidget->cleanWhitespace(true);\r\n    }\r\n    if (m_cleanCompleterCache) {\r\n        m_completer->clearTemp();\r\n    }\r\n    bool b = m_file->saveText(fileName, m_document->toPlainText());\r\n    if (b) {\r\n        m_editorWidget->document()->setModified(false);\r\n    }\r\n    return b;\r\n}\r\n\r\nvoid LiteEditor::setReadOnly(bool b)\r\n{\r\n    m_lockAct->setVisible(b);\r\n    m_unlockAct->setVisible(!b);\r\n    m_bReadOnly = b;\r\n    m_editorWidget->setReadOnly(m_file->isBinary());\r\n   // m_editorWidget->setReadOnly(b);\r\n}\r\n\r\nbool LiteEditor::isReadOnly() const\r\n{\r\n    return m_bReadOnly;\r\n}\r\n\r\nbool LiteEditor::isModified() const\r\n{\r\n    if (!m_file) {\r\n        return false;\r\n    }\r\n    return m_editorWidget->document()->isModified();\r\n}\r\n\r\nQString LiteEditor::filePath() const\r\n{\r\n    if (!m_file) {\r\n        return QString();\r\n    }\r\n    return m_file->filePath();\r\n}\r\n\r\nQString LiteEditor::mimeType() const\r\n{\r\n    if (!m_file) {\r\n        return QString();\r\n    }\r\n    return m_file->mimeType();\r\n}\r\n\r\nLiteApi::IFile *LiteEditor::file()\r\n{\r\n    return m_file;\r\n}\r\n\r\nint LiteEditor::line() const\r\n{\r\n    return m_editorWidget->textCursor().blockNumber();\r\n}\r\n\r\nint LiteEditor::column() const\r\n{\r\n    return m_editorWidget->textCursor().columnNumber();\r\n}\r\n\r\nint LiteEditor::utf8Position(bool realFile, int pos) const\r\n{\r\n    QTextCursor cur = m_editorWidget->textCursor();\r\n    QString src = cur.document()->toPlainText().left(pos >= 0 ? pos : cur.position());\r\n    int offset = 0;\r\n    if (realFile && m_file->isLineEndWindow()) {\r\n       offset = cur.blockNumber();\r\n    }\r\n    return src.toUtf8().length()+offset+1;\r\n}\r\n\r\nQByteArray LiteEditor::utf8Data() const {\r\n    QString src = m_editorWidget->document()->toPlainText();\r\n//    if (m_file->m_lineTerminatorMode == LiteEditorFile::CRLFLineTerminator) {\r\n//        src = src.replace(\"\\n\",\"\\r\\n\");\r\n//    }\r\n    return src.toUtf8();\r\n}\r\n\r\nvoid LiteEditor::setLineWrap(bool wrap)\r\n{\r\n    m_editorWidget->setLineWrap(wrap);\r\n    m_mimeLineWrapAct->setChecked(wrap);\r\n}\r\n\r\nbool LiteEditor::isLineWrap() const\r\n{\r\n    return m_editorWidget->isLineWrap();\r\n}\r\n\r\nvoid LiteEditor::gotoLine(int blockNumber, int column, bool center, int selection)\r\n{\r\n    m_editorWidget->setFocus();\r\n    m_editorWidget->gotoLine(blockNumber,column,center,selection);\r\n}\r\n\r\nint LiteEditor::position(LiteApi::ITextEditor::PositionOperation posOp, int at) const\r\n{\r\n    QTextCursor tc = m_editorWidget->textCursor();\r\n\r\n    if (at != -1)\r\n        tc.setPosition(at);\r\n\r\n    if (posOp == ITextEditor::Current)\r\n        return tc.position();\r\n\r\n    switch (posOp) {\r\n    case ITextEditor::EndOfLine:\r\n        tc.movePosition(QTextCursor::EndOfLine);\r\n        return tc.position();\r\n    case ITextEditor::StartOfLine:\r\n        tc.movePosition(QTextCursor::StartOfLine);\r\n        return tc.position();\r\n    case ITextEditor::Anchor:\r\n        if (tc.hasSelection())\r\n            return tc.anchor();\r\n        break;\r\n    case ITextEditor::EndOfDoc:\r\n        tc.movePosition(QTextCursor::End);\r\n        return tc.position();\r\n    default:\r\n        break;\r\n    }\r\n\r\n    return -1;\r\n}\r\n\r\nQString LiteEditor::textAt(int pos, int length) const\r\n{\r\n    QTextCursor c = m_editorWidget->textCursor();\r\n\r\n    if (pos < 0)\r\n        pos = 0;\r\n    c.movePosition(QTextCursor::End);\r\n    if (pos + length > c.position())\r\n        length = c.position() - pos;\r\n\r\n    c.setPosition(pos);\r\n    c.setPosition(pos + length, QTextCursor::KeepAnchor);\r\n\r\n    return c.selectedText();\r\n}\r\n\r\nQRect LiteEditor::cursorRect(int pos) const\r\n{\r\n    QTextCursor tc = m_editorWidget->textCursor();\r\n    if (pos >= 0)\r\n        tc.setPosition(pos);\r\n    QRect result = m_editorWidget->cursorRect(tc);\r\n    result.moveTo(m_editorWidget->viewport()->mapToGlobal(result.topLeft()));\r\n    return result;\r\n}\r\n\r\n\r\n\r\nLiteEditorWidget *LiteEditor::editorWidget() const\r\n{\r\n    return m_editorWidget;\r\n}\r\n\r\nQTextCursor LiteEditor::textCursor() const\r\n{\r\n    return m_editorWidget->textCursor();\r\n}\r\n\r\nvoid LiteEditor::applyOption(QString id)\r\n{\r\n    if (id != OPTION_LITEEDITOR) {\r\n        return;\r\n    }\r\n\r\n    bool autoIndent = m_liteApp->settings()->value(EDITOR_AUTOINDENT,true).toBool();\r\n    bool autoBraces0 = m_liteApp->settings()->value(EDITOR_AUTOBRACE0,true).toBool();\r\n    bool autoBraces1 = m_liteApp->settings()->value(EDITOR_AUTOBRACE1,true).toBool();\r\n    bool autoBraces2 = m_liteApp->settings()->value(EDITOR_AUTOBRACE2,true).toBool();\r\n    bool autoBraces3 = m_liteApp->settings()->value(EDITOR_AUTOBRACE3,true).toBool();\r\n    bool autoBraces4 = m_liteApp->settings()->value(EDITOR_AUTOBRACE4,true).toBool();\r\n    bool autoBraces5 = m_liteApp->settings()->value(EDITOR_AUTOBRACE5,true).toBool();\r\n    bool caseSensitive = m_liteApp->settings()->value(EDITOR_COMPLETER_CASESENSITIVE,false).toBool();\r\n    bool fuzzyCompleter = m_liteApp->settings()->value(EDITOR_COMPLETER_FUZZY,true).toBool();\r\n    bool lineNumberVisible = m_liteApp->settings()->value(EDITOR_LINENUMBERVISIBLE,true).toBool();\r\n    bool codeFoldVisible = m_liteApp->settings()->value(EDITOR_CODEFOLDVISIBLE,true).toBool();\r\n    bool rightLineVisible = m_liteApp->settings()->value(EDITOR_RIGHTLINEVISIBLE,true).toBool();\r\n    bool eofVisible = m_liteApp->settings()->value(EDITOR_EOFVISIBLE,false).toBool();\r\n    bool defaultWordWrap = m_liteApp->settings()->value(EDITOR_DEFAULTWORDWRAP,false).toBool();\r\n    bool indentLineVisible = m_liteApp->settings()->value(EDITOR_INDENTLINEVISIBLE,true).toBool();\r\n    bool wheelZooming = m_liteApp->settings()->value(EDITOR_WHEEL_SCROLL,true).toBool();\r\n    bool visualizeWhitespace = m_liteApp->settings()->value(EDITOR_VISUALIZEWHITESPACE,false).toBool();\r\n    int rightLineWidth = m_liteApp->settings()->value(EDITOR_RIGHTLINEWIDTH,80).toInt();\r\n    int min = m_liteApp->settings()->value(EDITOR_PREFIXLENGTH,1).toInt();\r\n    bool copyToHtml = m_liteApp->settings()->value(EDITOR_ENABLE_COPYTOHTML,true).toBool();\r\n    bool allowVscrollLastLine = m_liteApp->settings()->value(EDITOR_ALLOW_VSCROLL_LASTLINE,true).toBool();\r\n\r\n    m_cleanCompleterCache = m_liteApp->settings()->value(EDITOR_CLEAN_COMPLETERCACHE_SAVE,false).toBool();\r\n    m_cleanWhiteSpace = m_liteApp->settings()->value(EDITOR_CLEANWHITESPACEONSAVE,false).toBool();\r\n    m_offsetVisible = m_liteApp->settings()->value(EDITOR_OFFSETVISIBLE,false).toBool();\r\n\r\n    m_editorWidget->setAutoIndent(autoIndent);\r\n    m_editorWidget->setAutoBraces0(autoBraces0);\r\n    m_editorWidget->setAutoBraces1(autoBraces1);\r\n    m_editorWidget->setAutoBraces2(autoBraces2);\r\n    m_editorWidget->setAutoBraces3(autoBraces3);\r\n    m_editorWidget->setAutoBraces4(autoBraces4);\r\n    m_editorWidget->setAutoBraces5(autoBraces5);\r\n    m_editorWidget->setLineNumberVisible(lineNumberVisible);\r\n    m_editorWidget->setCodeFoldVisible(codeFoldVisible);\r\n    m_editorWidget->setEofVisible(eofVisible);\r\n    m_editorWidget->setIndentLineVisible(indentLineVisible);\r\n    m_editorWidget->setRightLineVisible(rightLineVisible);\r\n    m_editorWidget->setRightLineWidth(rightLineWidth);\r\n    m_editorWidget->setScrollWheelZooming(wheelZooming);\r\n    m_editorWidget->setVisualizeWhitespace(visualizeWhitespace);\r\n    m_editorWidget->setCopyToHtml(copyToHtml);\r\n    m_editorWidget->setAllowVscrollLastLine(allowVscrollLastLine);\r\n\r\n    if (m_completer) {\r\n        m_completer->setCaseSensitivity(caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive);\r\n        m_completer->setFuzzy(fuzzyCompleter);\r\n        m_completer->setPrefixMin(min);\r\n    }\r\n\r\n    updateFont();\r\n\r\n    QString mime = this->m_file->mimeType();\r\n    m_editorWidget->setMimeType(mime);\r\n\r\n    bool tabToSpace = false;\r\n    int tabWidth = 4;\r\n    LiteApi::IMimeType *im = m_liteApp->mimeTypeManager()->findMimeType(mime);\r\n    if (im) {\r\n        tabToSpace = im->tabToSpace();\r\n        tabWidth = im->tabWidth();\r\n    }\r\n    bool linewrap = m_liteApp->settings()->value(MIMETYPE_LINEWRAP+mime,defaultWordWrap).toBool();\r\n    tabToSpace = m_liteApp->settings()->value(MIMETYPE_TABTOSPACE+mime,tabToSpace).toBool();\r\n    tabWidth = m_liteApp->settings()->value(MIMETYPE_TABWIDTH+mime,tabWidth).toInt();\r\n\r\n    this->setTabOption(tabWidth,tabToSpace);\r\n    this->setLineWrap(linewrap);\r\n    m_visualizeWhitespaceAct->setChecked(visualizeWhitespace);\r\n}\r\n\r\nvoid LiteEditor::updateTip(const QString &func,const QString &kind,const QString &info)\r\n{\r\n    QString tip = m_editorWidget->textLexer()->fetchFunctionTip(func,kind,info);\r\n    if (tip.isEmpty()) {\r\n        return;\r\n    }\r\n    if (!m_funcTip) {\r\n        m_funcTip = new FunctionTooltip(m_liteApp,this,m_editorWidget->textLexer(),20);\r\n    }\r\n    m_funcTip->showFunctionHint(this->position(),tip);\r\n}\r\n\r\nvoid LiteEditor::filePrintPreview()\r\n{\r\n#ifndef QT_NO_PRINTER\r\n    QPrinter printer(QPrinter::HighResolution);\r\n    QPrintPreviewDialog preview(&printer, m_widget);\r\n    preview.resize(this->m_editorWidget->size());\r\n    connect(&preview, SIGNAL(paintRequested(QPrinter*)), SLOT(printPreview(QPrinter*)));\r\n    preview.exec();\r\n#endif\r\n}\r\n\r\nvoid LiteEditor::printPreview(QPrinter *printer)\r\n{\r\n#ifdef QT_NO_PRINTER\r\n    Q_UNUSED(printer);\r\n#else\r\n    QPlainTextEdit::LineWrapMode mode = m_editorWidget->lineWrapMode();\r\n    m_editorWidget->setLineWrapMode(QPlainTextEdit::WidgetWidth);\r\n    m_editorWidget->print(printer);\r\n    m_editorWidget->setLineWrapMode(mode);\r\n#endif\r\n}\r\n\r\nvoid LiteEditor::exportHtml()\r\n{\r\n    QString title;\r\n    if (m_file) {\r\n        title = QFileInfo(m_file->filePath()).completeBaseName();\r\n    }\r\n    QString fileName = QFileDialog::getSaveFileName(m_widget, tr(\"Export HTML\"),\r\n                                                    title, \"*.html\");\r\n    if (!fileName.isEmpty()) {\r\n        if (QFileInfo(fileName).suffix().isEmpty())\r\n            fileName.append(\".html\");\r\n        QFile file(fileName);\r\n        if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {\r\n            QMessageBox::critical(m_widget,\r\n                                  tr(\"Export Failed\"),\r\n                                  QString(tr(\"Could not open %1 for writing.\")).arg(fileName)\r\n                                  );\r\n            return;\r\n        }\r\n        QTextCursor cur = m_editorWidget->textCursor();\r\n        cur.select(QTextCursor::Document);\r\n        file.write(m_editorWidget->cursorToHtml(cur).toUtf8());\r\n        file.close();\r\n    }\r\n}\r\n\r\nvoid LiteEditor::exportPdf()\r\n{\r\n#ifndef QT_NO_PRINTER\r\n//! [0]\r\n    QString title;\r\n    if (m_file) {\r\n        title = QFileInfo(m_file->filePath()).completeBaseName();\r\n    }\r\n    QString fileName = QFileDialog::getSaveFileName(m_widget, tr(\"Export PDF\"),\r\n                                                    title, \"*.pdf\");\r\n    if (!fileName.isEmpty()) {\r\n        if (QFileInfo(fileName).suffix().isEmpty()) {\r\n            fileName.append(\".pdf\");\r\n        }\r\n        QPrinter printer(QPrinter::HighResolution);\r\n        printer.setOutputFormat(QPrinter::PdfFormat);\r\n        printer.setOutputFileName(fileName);\r\n        QPlainTextEdit::LineWrapMode mode = m_editorWidget->lineWrapMode();\r\n        m_editorWidget->setLineWrapMode(QPlainTextEdit::WidgetWidth);\r\n        m_editorWidget->print(&printer);\r\n        m_editorWidget->setLineWrapMode(mode);\r\n    }\r\n//! [0]\r\n#endif\r\n}\r\n\r\nvoid LiteEditor::filePrint()\r\n{\r\n#ifndef QT_NO_PRINTER\r\n    QPrinter printer(QPrinter::HighResolution);\r\n    QPrintDialog *dlg = new QPrintDialog(&printer, m_widget);\r\n    if (m_editorWidget->textCursor().hasSelection())\r\n        dlg->addEnabledOption(QAbstractPrintDialog::PrintSelection);\r\n    dlg->setWindowTitle(tr(\"Print Document\"));\r\n    if (dlg->exec() == QDialog::Accepted) {\r\n        QPlainTextEdit::LineWrapMode mode = m_editorWidget->lineWrapMode();\r\n        m_editorWidget->setLineWrapMode(QPlainTextEdit::WidgetWidth);\r\n        m_editorWidget->print(&printer);\r\n        m_editorWidget->setLineWrapMode(mode);\r\n    }\r\n    delete dlg;\r\n#endif\r\n}\r\n\r\nvoid LiteEditor::codecComboBoxChanged(QString codec)\r\n{\r\n    if (!m_file) {\r\n        return;\r\n    }\r\n    if (m_editorWidget->document()->isModified()) {\r\n        QString text = QString(tr(\"Do you want to permanently discard unsaved modifications and reload %1?\")).arg(m_file->filePath());\r\n        int ret = QMessageBox::question(m_liteApp->mainWindow(),\"Unsaved Modifications\",text,QMessageBox::Yes|QMessageBox::No);\r\n        if (ret != QMessageBox::Yes) {\r\n            return;\r\n        }\r\n    }\r\n    QString outText;\r\n    bool success = m_file->reloadTextByCodec(codec,outText);\r\n    if (success) {\r\n        this->loadTextUseDiff(outText);\r\n        m_document->setModified(false);\r\n        updateEditorInfo();\r\n        emit reloaded();\r\n    }\r\n    return;\r\n}\r\n\r\nvoid LiteEditor::editPositionChanged()\r\n{\r\n     QTextCursor cur = m_editorWidget->textCursor();\r\n     //QString src = cur.document()->toPlainText().left(cur.position());\r\n//     int offset = 0;\r\n//     if (m_file->isLineEndWindow()) {\r\n//        offset = cur.blockNumber();\r\n//     }\r\n     QStringList infos;\r\n     infos << QString(\"%1,%2\").arg(cur.blockNumber()+1,3).arg(cur.columnNumber()+1,3);\r\n\r\n     if (m_offsetVisible) {\r\n         infos << QString(\"%1\").arg(this->utf8Position(true),3);\r\n     }\r\n     if (m_bReadOnly) {\r\n         infos << QString(tr(\"ReadOnly\"));\r\n     }\r\n     infos << m_file->textCodec();\r\n     if (m_file->isLineEndUnix()) {\r\n         infos << \"LF\";\r\n     } else {\r\n         infos << \"CRLF\";\r\n     }\r\n     m_liteApp->editorManager()->updateEditInfo(infos.join(\" | \"));\r\n}\r\n\r\nvoid LiteEditor::gotoLine()\r\n{\r\n    LiteApi::IQuickOpenManager *mgr = LiteApi::getQuickOpenManager(m_liteApp);\r\n    if (mgr) {\r\n        LiteApi::IQuickOpen *p = mgr->findById(\"quickopen/lines\");\r\n        if (p) {\r\n            mgr->setCurrentFilter(p);\r\n            mgr->showPopup();\r\n            return;\r\n        }\r\n    }\r\n    int min = 1;\r\n    int max = m_editorWidget->document()->blockCount();\r\n    int old = m_editorWidget->textCursor().blockNumber()+1;\r\n    bool ok = false;\r\n    int v = QInputDialog::getInt(this->m_widget,tr(\"Go To Line\"),tr(\"Line: \")+QString(\"%1-%2\").arg(min).arg(max),old,min,max,1,&ok);\r\n    if (!ok) {\r\n        return;\r\n    }\r\n    if (v == old) {\r\n        return;\r\n    }\r\n    m_liteApp->editorManager()->addNavigationHistory();\r\n    this->gotoLine(v-1,0,true);\r\n}\r\n\r\nQString LiteEditor::textCodec() const\r\n{\r\n    return m_file->textCodec();\r\n}\r\n\r\nvoid LiteEditor::setTextCodec(const QString &codec)\r\n{\r\n    QString outText;\r\n    bool success = m_file->reloadTextByCodec(codec,outText);\r\n    if (success) {\r\n        this->loadTextUseDiff(outText);\r\n        m_document->setModified(false);\r\n        updateEditorInfo();\r\n        emit reloaded();\r\n    }\r\n}\r\n\r\nQByteArray LiteEditor::saveState() const\r\n{\r\n    return m_editorWidget->saveState();\r\n}\r\n\r\nbool LiteEditor::restoreState(const QByteArray &array)\r\n{\r\n    return m_editorWidget->restoreState(array);\r\n}\r\n\r\nvoid LiteEditor::navigationStateChanged(const QByteArray &state)\r\n{\r\n    m_liteApp->editorManager()->addNavigationHistory(this,state);\r\n}\r\n\r\nvoid LiteEditor::onActive()\r\n{\r\n    m_editorWidget->setFocus();\r\n    //clipbordDataChanged();\r\n    editPositionChanged();\r\n    //m_editorWidget->saveCurrentCursorPositionForNavigation();\r\n}\r\n\r\nvoid LiteEditor::setFindOption(LiteApi::FindOption *opt)\r\n{\r\n    m_editorWidget->setFindOption(opt);\r\n}\r\n\r\nvoid LiteEditor::setSpellCheckZoneDontComplete(bool b)\r\n{\r\n    m_editorWidget->setSpellCheckZoneDontComplete(b);\r\n}\r\n\r\nvoid LiteEditor::setNavigateHead(LiteApi::EditorNaviagteType type, const QString &msg)\r\n{\r\n    m_editorWidget->setNavigateHead(type,msg);\r\n}\r\n\r\nvoid LiteEditor::insertNavigateMark(int line, LiteApi::EditorNaviagteType type, const QString &msg, const QString &tag, int offset, int selection)\r\n{\r\n    m_editorWidget->insertNavigateMark(line,type,msg, tag,offset, selection);\r\n}\r\n\r\nvoid LiteEditor::clearNavigateMarak(int /*line*/)\r\n{\r\n}\r\n\r\nvoid LiteEditor::clearAllNavigateMarks()\r\n{\r\n    m_editorWidget->clearAllNavigateMarks();\r\n}\r\n\r\nvoid LiteEditor::clearAllNavigateMark(LiteApi::EditorNaviagteType types, const QString &tag)\r\n{\r\n    m_editorWidget->clearAllNavigateMark(types, tag);\r\n}\r\n\r\nvoid LiteEditor::showLink(const LiteApi::Link &link)\r\n{\r\n    m_editorWidget->showLink(link);\r\n}\r\n\r\nvoid LiteEditor::clearLink()\r\n{\r\n    m_editorWidget->clearLink();\r\n}\r\n\r\n\r\nvoid LiteEditor::setTabOption(int tabSize, bool tabToSpace)\r\n{\r\n    m_editorWidget->setTabSize(tabSize);\r\n    m_editorWidget->setTabToSpaces(tabToSpace);\r\n    if (m_syntax) {\r\n        m_syntax->setTabSize(tabSize);\r\n    }\r\n    m_mimeTabToSpacesAct->setChecked(tabToSpace);\r\n}\r\n\r\nvoid LiteEditor::setEnableAutoIndentAction(bool b)\r\n{\r\n    m_autoIndentAct->setVisible(b);\r\n}\r\n\r\nbool LiteEditor::isLineEndUnix() const\r\n{\r\n    return m_file->isLineEndUnix();\r\n}\r\n\r\nvoid LiteEditor::setLineEndUnix(bool b)\r\n{\r\n    if (m_file->setLineEndUnix(b)) {\r\n        m_editorWidget->document()->setModified(true);\r\n        m_liteApp->editorManager()->saveEditor(this,false);\r\n        this->updateEditorInfo();\r\n    }\r\n}\r\n\r\nvoid LiteEditor::showToolTipInfo(const QPoint &pos, const QString &text)\r\n{\r\n    m_editorWidget->showToolTipInfo(pos,text);\r\n}\r\n\r\nvoid LiteEditor::loadDiff(const QString &diff)\r\n{\r\n    if (diff.isEmpty()) {\r\n        return;\r\n    }\r\n    QByteArray state = saveState();\r\n    QTextCursor cur = m_editorWidget->textCursor();\r\n    cur.beginEditBlock();\r\n    EditorUtil::loadDiff(cur,diff);\r\n    cur.endEditBlock();\r\n    m_editorWidget->setTextCursor(cur);\r\n    restoreState(state);\r\n}\r\n\r\nvoid LiteEditor::loadTextUseDiff(const QString &text)\r\n{\r\n    QString diff = EditorUtil::unifiedDiffText(m_document->toPlainText(),text);\r\n    loadDiff(diff);\r\n}\r\n\r\nQMenu *LiteEditor::editorMenu() const\r\n{\r\n    return m_editMenu;\r\n}\r\n\r\nbool LiteEditor::enableSyntax() const\r\n{\r\n    QSizeF sz = m_editorWidget->document()->size();\r\n    if (sz.width() > 4096) {\r\n        m_liteApp->appendLog(\"LiteEditor\",QString(\"document line too long %1(max line length %2), disable syntax!\").arg(this->filePath()).arg(sz.width()),true);\r\n        return false;\r\n    }\r\n\r\n    return true;\r\n}\r\n\r\nvoid LiteEditor::selectNextParam()\r\n{\r\n    QTextCursor cur = m_editorWidget->textCursor();\r\n    int pos = cur.position();\r\n    if (cur.hasSelection()) {\r\n        pos = cur.selectionEnd();\r\n    }\r\n    QTextBlock block = cur.block();\r\n    int offset = pos-block.position();\r\n    QRegExp reg(\"[\\\\,\\\\(\\\\)\\\\.\\\\s](\\\\s*)([\\\"\\'\\\\w]+)\");\r\n    int index = reg.indexIn(block.text().mid(offset));\r\n    if (index >= 0) {\r\n        //qDebug() << reg.capturedTexts();\r\n        int start = block.position()+offset+index+1+reg.cap(1).length();\r\n        cur.setPosition(start);\r\n        cur.movePosition(QTextCursor::Right,QTextCursor::KeepAnchor,reg.cap(2).length());\r\n        m_editorWidget->setTextCursor(cur);\r\n    }\r\n}\r\n\r\nvoid LiteEditor::increaseFontSize()\r\n{\r\n    this->requestFontZoom(10);\r\n}\r\n\r\nvoid LiteEditor::decreaseFontSize()\r\n{\r\n    this->requestFontZoom(-10);\r\n}\r\n\r\nvoid LiteEditor::resetFontSize()\r\n{\r\n    int fontSize = m_liteApp->settings()->value(EDITOR_FONTSIZE,12).toInt();\r\n    m_liteApp->settings()->setValue(EDITOR_FONTZOOM,100);\r\n    QFont font = m_editorWidget->font();\r\n    font.setPointSize(fontSize);\r\n    m_editorWidget->updateFont(font);\r\n    this->sendUpdateFont();\r\n}\r\n\r\nvoid LiteEditor::comment()\r\n{\r\n    if (!m_syntax) {\r\n        return;\r\n    }\r\n    TextEditor::SyntaxComment comment = m_syntax->comment();\r\n    Utils::CommentDefinition cd;\r\n    cd.setAfterWhiteSpaces(comment.isCommentAfterWhiteSpaces);\r\n    cd.setAfterWhiteSpacesAddSpace(comment.isCommentAfterWhiteSpacesAddSpace);\r\n    cd.setSingleLine(comment.singleLineComment);\r\n    cd.setMultiLineStart(comment.multiLineCommentStart);\r\n    cd.setMultiLineEnd(comment.multiLineCommentEnd);\r\n    Utils::unCommentSelection(m_editorWidget,Utils::AutoComment,cd);\r\n}\r\n\r\nvoid LiteEditor::blockComment()\r\n{\r\n}\r\n\r\nvoid LiteEditor::autoIndent()\r\n{\r\n    m_editorWidget->autoIndent();\r\n}\r\n\r\nvoid LiteEditor::toggledTabToSpaces(bool b)\r\n{\r\n    m_liteApp->settings()->setValue(MIMETYPE_TABTOSPACE+this->mimeType(),b);\r\n    m_liteApp->optionManager()->emitApplyOption(OPTION_LITEEDITOR);\r\n    //m_editorWidget->setTabToSpaces(b);\r\n}\r\n\r\nvoid LiteEditor::toggledVisualizeWhitespace(bool b)\r\n{\r\n    m_liteApp->settings()->setValue(EDITOR_VISUALIZEWHITESPACE,b);\r\n    m_liteApp->optionManager()->emitApplyOption(OPTION_LITEEDITOR);\r\n    //m_editorWidget->setVisualizeWhitespace(b);\r\n}\r\n\r\nvoid LiteEditor::toggledLineWrapMode(bool b)\r\n{\r\n    m_liteApp->settings()->setValue(MIMETYPE_LINEWRAP+this->mimeType(),b);\r\n    m_liteApp->optionManager()->emitApplyOption(OPTION_LITEEDITOR);\r\n}\r\n\r\nvoid LiteEditor::triggeredLineEnding(QAction *action)\r\n{\r\n    this->setLineEndUnix(action == m_lineEndingUnixAct);\r\n}\r\n\r\nvoid LiteEditor::broadcast(const QString &module, const QString &id, const QVariant &param)\r\n{\r\n    if (module == \"liteeditor\" && id == \"font\" && param != this->filePath()) {\r\n        this->updateFont();\r\n    } else if (module == \"liteeditor\" && id == EDITOR_NAVBAR_VISIBLE) {\r\n        m_navBar->toolBar()->setVisible(param.toBool());\r\n    } else if (module == \"liteeditor\" && id == EDITOR_TOOLBAR_VISIBLE) {\r\n        m_editToolBar->setVisible(param.toBool());\r\n    }\r\n}\r\n\r\nvoid LiteEditor::updateFont()\r\n{\r\n#if defined(Q_OS_WIN)\r\n    QString fontFamily = m_liteApp->settings()->value(EDITOR_FAMILY,\"Courier\").toString();\r\n#elif defined(Q_OS_LINUX)\r\n    QString fontFamily = m_liteApp->settings()->value(EDITOR_FAMILY,\"Monospace\").toString();\r\n#elif defined(Q_OS_MAC)\r\n    QString fontFamily = m_liteApp->settings()->value(EDITOR_FAMILY,\"Menlo\").toString();\r\n#else\r\n    QString fontFamily = m_liteApp->settings()->value(EDITOR_FAMILY,\"Monospace\").toString();\r\n#endif\r\n    int fontSize = m_liteApp->settings()->value(EDITOR_FONTSIZE,12).toInt();\r\n    int fontZoom = m_liteApp->settings()->value(EDITOR_FONTZOOM,100).toInt();\r\n    bool antialias = m_liteApp->settings()->value(EDITOR_ANTIALIAS,true).toBool();\r\n    QFont font = m_editorWidget->font();\r\n    font.setFamily(fontFamily);\r\n    font.setPointSize(fontSize*fontZoom/100.0);\r\n    if (antialias) {\r\n        font.setStyleStrategy(QFont::PreferAntialias);\r\n    } else {\r\n        font.setStyleStrategy(QFont::NoAntialias);\r\n    }\r\n    m_editorWidget->updateFont(font);\r\n}\r\n\r\nvoid LiteEditor::sendUpdateFont()\r\n{\r\n    m_liteApp->sendBroadcast(\"liteeditor\",\"font\",this->filePath());\r\n}\r\n\r\nQLabelEx::QLabelEx(const QString &text, QWidget *parent) :\r\n    QLabel(text,parent)\r\n{\r\n}\r\n\r\nvoid QLabelEx::mouseDoubleClickEvent(QMouseEvent *event)\r\n{\r\n    if (event->button() == Qt::LeftButton) {\r\n        emit doubleClickEvent();\r\n    }\r\n}\r\n\r\nvoid LiteEditor::requestFontZoom(int zoom)\r\n{\r\n    int fontSize = m_liteApp->settings()->value(EDITOR_FONTSIZE,12).toInt();\r\n    int fontZoom = m_liteApp->settings()->value(EDITOR_FONTZOOM,100).toInt();\r\n    fontZoom += zoom;\r\n    if (fontZoom <= 10) {\r\n        return;\r\n    }\r\n    m_liteApp->settings()->setValue(EDITOR_FONTZOOM,fontZoom);\r\n\r\n    QFont font = m_editorWidget->font();\r\n    font.setPointSize(fontSize*fontZoom/100.0);\r\n    m_editorWidget->updateFont(font);\r\n\r\n    this->sendUpdateFont();\r\n}\r\n\r\nvoid LiteEditor::loadColorStyleScheme()\r\n{\r\n    const ColorStyleScheme *colorScheme = m_liteApp->editorManager()->colorStyleScheme();\r\n    const ColorStyle *extra = colorScheme->findStyle(\"Extra\");\r\n    const ColorStyle *indentLine = colorScheme->findStyle(\"IndentLine\");\r\n    const ColorStyle *text = colorScheme->findStyle(\"Text\");\r\n    const ColorStyle *selection = colorScheme->findStyle(\"Selection\");\r\n    const ColorStyle *currentLine = colorScheme->findStyle(\"CurrentLine\");\r\n    const ColorStyle *matchBrackets = colorScheme->findStyle(\"MatchBrackets\");\r\n    const ColorStyle *visualWhitespace = colorScheme->findStyle(\"VisualWhitespace\");\r\n    if (extra) {\r\n        m_editorWidget->setExtraColor(extra->foregound(),extra->background());\r\n    }\r\n    if (indentLine) {\r\n        m_editorWidget->setIndentLineColor(indentLine->foregound());\r\n    }\r\n    if (currentLine) {\r\n        m_editorWidget->setCurrentLineColor(currentLine->background());\r\n    }\r\n    if (matchBrackets) {\r\n        m_editorWidget->setMatchBracketsColor(matchBrackets->background());\r\n    }\r\n    if (visualWhitespace) {\r\n        m_editorWidget->setVisualizeWhitespaceColor(visualWhitespace->foregound());\r\n    }\r\n    QPalette p = m_defEditorPalette;\r\n    if (text) {\r\n        if (text->foregound().isValid()) {\r\n            p.setColor(QPalette::Text,text->foregound());\r\n            p.setColor(QPalette::Foreground, text->foregound());\r\n        }\r\n        if (text->background().isValid()) {\r\n            p.setColor(QPalette::Base, text->background());\r\n        }\r\n    }\r\n    if (selection) {\r\n        if (selection->foregound().isValid()) {\r\n            p.setColor(QPalette::HighlightedText, selection->foregound());\r\n        }\r\n        if (selection->background().isValid()) {\r\n            p.setColor(QPalette::Highlight, selection->background());\r\n        }\r\n        p.setBrush(QPalette::Inactive, QPalette::Highlight, p.highlight());\r\n        p.setBrush(QPalette::Inactive, QPalette::HighlightedText, p.highlightedText());\r\n    }\r\n\r\n    QString sheet = QString(\"QPlainTextEdit{color:%1;background-color:%2;selection-color:%3;selection-background-color:%4;}\")\r\n                .arg(p.text().color().name())\r\n                .arg(p.base().color().name())\r\n                .arg(p.highlightedText().color().name())\r\n                .arg(p.highlight().color().name());\r\n    m_editorWidget->setPalette(p);\r\n//#ifdef Q_OS_MAC\r\n//    #if QT_VERSION >= 0x050000\r\n//        m_editorWidget->setStyleSheet(sheet);\r\n//    #else\r\n//        if (QSysInfo::MacintoshVersion <= QSysInfo::MV_10_8) {\r\n//            m_editorWidget->setStyleSheet(sheet);\r\n//        }\r\n//    #endif\r\n//#else\r\n    m_editorWidget->setStyleSheet(sheet);\r\n//#endif\r\n    emit colorStyleChanged();\r\n}\r\n\r\n\r\nEditContext::EditContext(LiteEditor *editor, QObject *parent)\r\n    : LiteApi::IEditContext(parent), m_editor(editor)\r\n{\r\n\r\n}\r\n\r\nQWidget *EditContext::focusWidget() const\r\n{\r\n    return m_editor->editorWidget();\r\n}\r\n\r\nQMenu *EditContext::focusMenu() const\r\n{\r\n    return m_editor->editorMenu();\r\n}\r\n\r\nQToolBar *EditContext::focusToolBar() const\r\n{\r\n    return 0;//m_editor->m_editToolBar;\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditor.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteeditor.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEEDITOR_H\n#define LITEEDITOR_H\n\n#include \"liteapi/liteapi.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n#include \"extension/extension.h\"\n#include \"elidedlabel/elidedlabel.h\"\n#include \"folderview/folderview.h\"\n#include \"navigate/navigate.h\"\n#include <QSet>\n#include <QHash>\n#include <QStack>\n#include <QTextBlock>\n#include <QLabel>\n\n//#define LITEEDITOR_FIND\n\nclass TreeModelCompleter;\nclass QAbstractItemModel;\nclass QStandardItemModel;\nclass QStandardItem;\nclass LiteEditorWidget;\nclass LiteEditorFile;\nclass QComboBox;\nclass QLabel;\nclass QToolButton;\nclass LiteCompleter;\nclass ColorStyleScheme;\nclass FunctionTooltip;\n\nclass QLabelEx : public QLabel\n{\n    Q_OBJECT\npublic:\n    QLabelEx(const QString &text, QWidget *parent = 0);\nsignals:\n    void doubleClickEvent();\nprotected:\n    virtual void mouseDoubleClickEvent(QMouseEvent *event);\n};\n\nclass LiteEditor : public LiteApi::ILiteEditor\n{\n    Q_OBJECT\npublic:\n    LiteEditor(LiteApi::IApplication *app);\n    virtual ~LiteEditor();\n    virtual QTextDocument* document() const;\n    virtual void setCompleter(LiteApi::ICompleter *complter);\n    virtual void setEditorMark(LiteApi::IEditorMark *mark);\n    virtual void setTextLexer(LiteApi::ITextLexer *lexer);\n    void setSyntaxHighlighter(TextEditor::SyntaxHighlighter *syntax);\n    TextEditor::SyntaxHighlighter *syntaxHighlighter() const;\n    void createActions();\n    void createToolBars();\n    void createMenu();\n    virtual LiteApi::IExtension *extension();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QIcon icon() const;\n    virtual bool createNew(const QString &contents, const QString &mimeType);\n    virtual bool open(const QString &filePath, const QString &mimeType);\n    virtual bool reload();\n    virtual bool save();\n    virtual bool saveAs(const QString &filePath);\n    virtual void setReadOnly(bool b);\n    virtual bool isReadOnly() const;\n    virtual bool isModified() const;\n    virtual QString filePath() const;\n    virtual QString mimeType() const;\n    virtual LiteApi::IFile *file();\n    virtual int line() const;\n    virtual int column() const;\n    virtual int utf8Position(bool realFile, int pos = -1) const;\n    virtual QByteArray utf8Data() const;\n    virtual void setLineWrap(bool wrap);\n    virtual bool isLineWrap() const;\n    virtual void gotoLine(int blockNumber, int column, bool center, int selection = 0);\n    virtual int position(PositionOperation posOp = Current, int at = -1) const;\n    virtual QString textAt(int pos, int length) const;\n    virtual QRect cursorRect(int pos = -1) const;\n    virtual QTextCursor textCursor() const;\n    virtual LiteEditorWidget *editorWidget() const;\n    virtual QString textCodec() const;\n    virtual void setTextCodec(const QString &codec);\n    virtual QByteArray saveState() const;\n    virtual bool restoreState(const QByteArray &state);\n    virtual void onActive();\n    virtual void setFindOption(LiteApi::FindOption *opt);\n    virtual void setSpellCheckZoneDontComplete(bool b);\n    virtual void setNavigateHead(LiteApi::EditorNaviagteType type, const QString &msg);\n    virtual void insertNavigateMark(int line, LiteApi::EditorNaviagteType type, const QString &msg, const QString &tag = \"\", int offset = 0, int selection = 0);\n    virtual void clearNavigateMarak(int line);\n    virtual void clearAllNavigateMarks();\n    virtual void clearAllNavigateMark(LiteApi::EditorNaviagteType types, const QString &tag = \"\");\n    virtual void showLink(const LiteApi::Link &link);\n    virtual void clearLink();\n    virtual void setTabOption(int tabSize, bool tabToSpace);\n    virtual void setEnableAutoIndentAction(bool b);\n    virtual bool isLineEndUnix() const;\n    virtual void setLineEndUnix(bool b);\n    virtual void showToolTipInfo(const QPoint & pos, const QString & text);\n    virtual void loadDiff(const QString &diff);\n    virtual void loadTextUseDiff(const QString &text);\n    virtual QMenu *editorMenu() const;\n    virtual bool enableSyntax() const;\nsignals:\n    void colorStyleChanged();\n    void tabSettingChanged(int);\npublic slots:\n    void requestFontZoom(int zoom);\n    void loadColorStyleScheme();\n    void applyOption(QString);\n    void clipbordDataChanged();\n#ifdef LITEEDITOR_FIND\n    void findNextText();\n#endif\n    void updateTip(const QString &func,const QString &kind,const QString &info);\n    void exportPdf();\n    void exportHtml();\n    void filePrint();\n    void filePrintPreview();\n    void printPreview(QPrinter *printer);\n    void codecComboBoxChanged(QString);\n    void editPositionChanged();\n    void navigationStateChanged(const QByteArray &state);\n    void gotoLine();\n    void selectNextParam();\n    void increaseFontSize();\n    void decreaseFontSize();\n    void resetFontSize();\n    void comment();\n    void blockComment();\n    void autoIndent();\n    void toggledTabToSpaces(bool b);\n    void toggledVisualizeWhitespace(bool b);\n    void toggledLineWrapMode(bool b);\n    void triggeredLineEnding(QAction *action);\n    void broadcast(const QString &module, const QString &id, const QVariant &param);\npublic:\n    void updateFont();\n    void sendUpdateFont();\n    void initLoad();\n    void updateEditorInfo();\n    void findCodecs();\nprotected:\n    QList<QTextCodec *> m_codecs;\n    LiteApi::IApplication *m_liteApp;\n    Extension   *m_extension;\n    QWidget *m_widget;\n    QToolBar *m_editToolBar;\n    NavigateBar *m_navBar;\n    LiteEditorWidget    *m_editorWidget;\n    QTextDocument       *m_document;\n    LiteApi::ICompleter *m_completer;\n    TextEditor::SyntaxHighlighter *m_syntax;\n    FunctionTooltip     *m_funcTip;\n    QAction *m_undoAct;\n    QAction *m_redoAct;\n    QAction *m_cutAct;\n    QAction *m_copyAct;\n    QAction *m_pasteAct;\n    QAction *m_selectAllAct;\n    QAction *m_exportHtmlAct;\n    QAction *m_exportPdfAct;\n    QAction *m_filePrintAct;\n    QAction *m_filePrintPreviewAct;\n#ifdef LITEEDITOR_FIND\n    QComboBox *m_findComboBox;\n#endif\n    QAction *m_selectBlockAct;\n    QAction *m_cutLineAct;\n    QAction *m_copyLineAct;\n    QAction *m_duplicateAct;\n    QAction *m_deleteLineAct;\n    QAction *m_insertLineBeforeAct;\n    QAction *m_insertLineAfterAct;\n    QAction *m_increaseFontSizeAct;\n    QAction *m_decreaseFontSizeAct;\n    QAction *m_resetFontSizeAct;\n    QAction *m_foldAct;\n    QAction *m_unfoldAct;\n    QAction *m_foldAllAct;\n    QAction *m_unfoldAllAct;\n    QAction *m_lockAct;\n    QAction *m_unlockAct;\n    QAction *m_cleanWhitespaceAct;\n    QAction *m_codeCompleteAct;\n    LiteEditorFile *m_file;\n    QMenu   *m_editMenu;\n    QMenu   *m_contextMenu;\n    QString  m_colorStyle;\n    QPalette m_defEditorPalette;\n    bool       m_bReadOnly;\n    bool     m_offsetVisible;\n    bool     m_cleanCompleterCache;\n    bool     m_cleanWhiteSpace;\n    //QLabelEx  *m_lineInfo;\n    QAction *m_overInfoAct;\n    //QAction *m_closeEditorAct;\n    QAction *m_commentAct;\n    QAction *m_blockCommentAct;\n    QAction *m_autoIndentAct;\n    QAction *m_mimeLineWrapAct;\n    QAction *m_mimeTabToSpacesAct;\n    QAction *m_lineEndingWindowAct;\n    QAction *m_lineEndingUnixAct;\n    QAction *m_visualizeWhitespaceAct;\n    QAction *m_moveLineUpAction;\n    QAction *m_moveLineDownAction;\n    QAction *m_copyLineUpAction;\n    QAction *m_copyLineDownAction;\n    QAction *m_joinLinesAction;\n\n    QAction *m_gotoLineAct;\n    QAction *m_gotoMatchBraceAct;\n    QAction *m_gotoDocStartAct;\n    QAction *m_gotoDocEndAct;\n    QAction *m_gotoPrevBlockAct;\n    QAction *m_gotoNextBlockAct;\n    QAction *m_gotoLineStartAct;\n    QAction *m_gotoLineEndAct;\n    QAction *m_gotoNextLineAct;\n    QAction *m_gotoPrevLineAct;\n    QAction *m_gotoNextCharacterAct;\n    QAction *m_gotoPrevCharacterAct;\n    QAction *m_gotoPrevWordAct;\n    QAction *m_gotoNextWordAct;\n\n    QAction *m_convertCaseTitleAct;\n    QAction *m_convertCaseUpperAct;\n    QAction *m_convertCaseLowerAct;\n    QAction *m_convertCaseSwapAct;\n\n    QAction *m_convertTabToSpaces;\n    QAction *m_convertSpacesToTab;\n};\n\nclass EditContext : public LiteApi::IEditContext\n{\n    Q_OBJECT\npublic:\n    EditContext(LiteEditor *editor, QObject *parent);\n    virtual QWidget *focusWidget() const;\n    virtual QMenu   *focusMenu() const;\n    virtual QToolBar *focusToolBar() const;\nprotected:\n    LiteEditor  *m_editor;\n};\n\n#endif //LITEEDITOR_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditor.pro",
    "content": "TARGET = liteeditor\nTEMPLATE = lib\n\nQT += xml\n\ninclude (../../liteideplugin.pri)\ninclude (../../api/liteeditorapi/liteeditorapi.pri)\ninclude (../../api/quickopenapi/quickopenapi.pri)\ninclude (../../utils/extension/extension.pri)\ninclude (../../utils/mimetype/mimetype.pri)\ninclude (../../utils/colorstyle/colorstyle.pri)\ninclude (../../utils/editorutil/editorutil.pri)\ninclude (../../utils/folderview/folderview.pri)\ninclude (../../utils/navigate/navigate.pri)\ninclude (../../3rdparty/qtc_texteditor/qtc_texteditor.pri)\ninclude (../../3rdparty/qtc_editutil/qtc_editutil.pri)\ninclude (../../3rdparty/treemodelcompleter/treemodelcompleter.pri)\ninclude (../../3rdparty/elidedlabel/elidedlabel.pri)\ninclude (../../3rdparty/qjson/qjson.pri)\n\nDEFINES += LITEEDITOR_LIBRARY\n\nSOURCES += liteeditorplugin.cpp \\\n    liteeditor.cpp \\\n    liteeditorfile.cpp \\\n    liteeditorfilefactory.cpp \\\n    liteeditoroption.cpp \\\n    liteeditoroptionfactory.cpp \\\n    liteeditorwidgetbase.cpp \\\n    liteeditorwidget.cpp \\\n    litecompleter.cpp \\\n    litewordcompleter.cpp \\\n    liteeditormark.cpp \\\n    highlightermanager.cpp \\\n    katehighlighterfactory.cpp \\\n    codecompleter.cpp \\\n    functiontooltip.cpp \\\n    faketooltip.cpp \\\n    snippetapi.cpp \\\n    wordapi.cpp \\\n    editorapimanager.cpp \\\n    katetextlexer.cpp\n\nHEADERS += liteeditorplugin.h\\\n        liteeditor_global.h \\\n    liteeditor.h \\\n    liteeditorfile.h \\\n    liteeditorfilefactory.h \\\n    liteeditoroption.h \\\n    liteeditoroptionfactory.h \\\n    liteeditorwidgetbase.h \\\n    liteeditorwidget.h \\\n    litecompleter.h \\\n    litewordcompleter.h \\\n    liteeditormark.h \\\n    highlightermanager.h \\\n    katehighlighterfactory.h \\\n    codecompleter.h \\\n    functiontooltip.h \\\n    faketooltip.h \\\n    snippetapi.h \\\n    wordapi.h \\\n    editorapimanager.h \\\n    katetextlexer.h\n\nFORMS += \\\n    liteeditoroption.ui\n\nRESOURCES += \\\n    liteeditor.qrc\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditor.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/liteeditor\">\n        <file>images/redo.png</file>\n        <file>images/undo.png</file>\n        <file>images/copy.png</file>\n        <file>images/cut.png</file>\n        <file>images/paste.png</file>\n        <file>images/exportpdf.png</file>\n        <file>images/fileprint.png</file>\n        <file>images/fileprintpreview.png</file>\n        <file>images/lock.png</file>\n        <file>images/unlock.png</file>\n        <file>images/exporthtml.png</file>\n        <file>images/findword.png</file>\n        <file>images/keyword.png</file>\n        <file>images/func.png</file>\n        <file>images/snippet.png</file>\n        <file>images/goto.png</file>\n    </qresource>\n</RCC>\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditor.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n  <mime-type type=\"text/x-gosrc\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Golang Source File</comment>\n    <glob pattern=\"*.go\"/>\n  </mime-type>\n  <mime-type type=\"text/x-profile\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Project File</comment>\n    <glob pattern=\"*.pro\"/>\n  </mime-type>\n  <mime-type type=\"text/x-gopro\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Golang Project File</comment>\n    <glob pattern=\"*.gopro\"/>\n  </mime-type>\n  <mime-type type=\"text/x-lua\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Lua Source File</comment>\n    <glob pattern=\"*.lua\"/>\n    <glob pattern=\"*.wlua\"/>\n  </mime-type>  \n</mime-info>\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditor_global.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: liteeditor_global.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef LITEEDITOR_GLOBAL_H\r\n#define LITEEDITOR_GLOBAL_H\r\n\r\n#include <QtCore/qglobal.h>\r\n\r\n#if defined(LITEEDITOR_LIBRARY)\r\n#  define LITEEDITORSHARED_EXPORT Q_DECL_EXPORT\r\n#else\r\n#  define LITEEDITORSHARED_EXPORT Q_DECL_IMPORT\r\n#endif\r\n\r\n#define EDITOR_TOOLBAR_VISIBLE \"editor/toolbar_visible\"\r\n#define EDITOR_NAVBAR_VISIBLE \"editor/navbar_visible\"\r\n\r\n#define MIMETYPE_TABWIDTH \"mimetype/tabwidth/\"\r\n#define MIMETYPE_TABTOSPACE \"mimetype/tabtospace/\"\r\n#define MIMETYPE_LINEWRAP \"mimetype/linewrap/\"\r\n\r\n#define OPTION_LITEEDITOR \"option/liteeditor\"\r\n#define EDITOR_STYLE \"editor/style\"\r\n#define EDITOR_FAMILY \"editor/family\"\r\n#define EDITOR_FONTSIZE \"editor/fontsize\"\r\n#define EDITOR_FONTZOOM \"editor/fontzoom\"\r\n#define EDITOR_ANTIALIAS \"editor/antialias\"\r\n#define EDITOR_CUSTOMEXTENSION \"editor/customextension/\"\r\n#define EDITOR_NOPRINTCHECK \"editor/noprintcheck\"\r\n#define EDITOR_AUTOINDENT \"editor/autoindent\"\r\n#define EDITOR_AUTOBRACE0 \"editor/autobraces0\"\r\n#define EDITOR_AUTOBRACE1 \"editor/autobraces1\"\r\n#define EDITOR_AUTOBRACE2 \"editor/autobraces2\"\r\n#define EDITOR_AUTOBRACE3 \"editor/autobraces3\"\r\n#define EDITOR_AUTOBRACE4 \"editor/autobraces4\"\r\n#define EDITOR_AUTOBRACE5 \"editor/autobraces5\"\r\n#define EDITOR_AUTOBRACE6 \"editor/autobraces6\"\r\n#define EDITOR_COMPLETER_CASESENSITIVE \"editor/completercasesensitive\"\r\n#define EDITOR_COMPLETER_FUZZY \"editor/completerfuzzy\"\r\n#define EDITOR_CLEAN_COMPLETERCACHE_SAVE \"editor/cleancompletercachesave\"\r\n#define EDITOR_LINENUMBERVISIBLE \"editor/linenumbervisible\"\r\n#define EDITOR_VISUALIZEWHITESPACE \"editor/visualizeWhitespace\"\r\n#define EDITOR_PREFIXLENGTH \"editor/prefixlength\"\r\n#define EDITOR_CLEANWHITESPACEONSAVE \"editor/cleanwhitespaceonsave\"\r\n#define EDITOR_RIGHTLINEVISIBLE \"editor/rightlinevisible\"\r\n#define EDITOR_RIGHTLINEWIDTH \"editor/rightlinewidth\"\r\n#define EDITOR_EOFVISIBLE \"editor/eofvisible\"\r\n#define EDITOR_CODEFOLDVISIBLE \"editor/codefoldvisible\"\r\n#define EDITOR_OFFSETVISIBLE \"editor/offsetvisible\"\r\n#define EDITOR_DEFAULTWORDWRAP \"editor/defaultwordwrap\"\r\n#define EDITOR_INDENTLINEVISIBLE \"editor/indentlinevisible\"\r\n#define EDITOR_WHEEL_SCROLL \"editor/whellscroll\"\r\n#define EDITOR_ENABLE_COPYTOHTML \"editor/enablecopytohtml\"\r\n#define EDITOR_ALLOW_VSCROLL_LASTLINE \"editor/allowvscrolllastline\"\r\n\r\n#endif // LITEEDITOR_GLOBAL_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditorfile.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteeditorfile.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"liteeditorfile.h\"\n#include \"liteeditor_global.h\"\n#include \"editorutil/checkdata.h\"\n#include <QFile>\n#include <QTextDocument>\n#include <QTextCodec>\n#include <QTextStream>\n#include <QMessageBox>\n#include <QDir>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nLiteEditorFile::LiteEditorFile(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IFile(parent),\n      m_liteApp(app)\n{\n    //m_codec = QTextCodec::codecForLocale();\n    m_codec = QTextCodec::codecForName(\"utf-8\");\n    m_hasDecodingError = false;\n    m_bReadOnly = false;\n    m_bBinary = false;\n    m_hasUtf8Bom = false;\n    m_lineTerminatorMode = NativeLineTerminator;\n}\n\nQString LiteEditorFile::filePath() const\n{\n    return m_fileName;\n}\n\nbool LiteEditorFile::isReadOnly() const\n{\n    if (m_hasDecodingError) {\n        return true;\n    }\n    return m_bReadOnly;\n}\n\nbool LiteEditorFile::isBinary() const\n{\n    return m_bBinary;\n}\n\nbool LiteEditorFile::saveText(const QString &fileName, const QString &text)\n{\n    QFile file(fileName);\n    if (!file.open(QFile::WriteOnly | QIODevice::Truncate)) {\n        return false;\n    }\n    m_fileName = fileName;\n\n    QString saveText = text;\n    if (m_lineTerminatorMode == CRLFLineTerminator) {\n        saveText.replace(QLatin1Char('\\n'), QLatin1String(\"\\r\\n\"));\n    }\n\n    QByteArray data;\n    if (m_codec) {\n        if (m_hasUtf8Bom && m_codec->name() == \"UTF-8\") {\n            if (file.write(\"\\xef\\xbb\\xbf\", 3) !=3 ) {\n                m_liteApp->appendLog(\"LiteEditor\",QString(\"write file %1 false, %2\").arg(fileName).arg(file.errorString()),true);\n                return false;\n            }\n        }\n        data = m_codec->fromUnicode(saveText);\n    } else {\n        data = saveText.toLocal8Bit();\n    }\n    int size = file.write(data);\n    if (size != data.size()) {\n        m_liteApp->appendLog(\"LiteEditor\",QString(\"write file %1 false, %2\").arg(fileName).arg(file.errorString()),true);\n        return false;\n    }\n    return true;\n}\n\nbool LiteEditorFile::reloadTextByCodec(const QString &codecName, QString &outText)\n{\n    setTextCodec(codecName);\n    return loadFileHelper(m_fileName,m_mimeType,false,outText);\n}\n\nbool LiteEditorFile::reloadText(QString &outText)\n{\n    return loadText(m_fileName,m_mimeType,outText);\n}\n\nQString LiteEditorFile::mimeType() const\n{\n    return m_mimeType;\n}\n\nvoid LiteEditorFile::setTextCodec(const QString &name)\n{\n    QTextCodec *codec = QTextCodec::codecForName(name.toLatin1());\n    if (codec) {\n        m_codec = codec;\n    }\n}\n\nQString LiteEditorFile::textCodec() const\n{\n    return m_codec->name();\n}\n\nbool LiteEditorFile::loadFileHelper(const QString &fileName, const QString &mimeType, bool bCheckCodec, QString &outText)\n{\n    QFile file(fileName);\n    if (!file.open(QFile::ReadOnly)) {\n        return false;\n    }\n    const QFileInfo fi(fileName);\n    m_bReadOnly = !fi.isWritable();\n\n    m_mimeType = mimeType;\n    m_fileName = fileName;\n\n    if (file.size() > (3 << 24)) {\n        m_liteApp->appendLog(\"LiteEditor\",\"Large file not open in the text editor! \"+fileName,true);\n        m_hasDecodingError = true;\n        return false;\n    }\n\n    QByteArray buf = file.readAll();\n    m_hasDecodingError = false;\n    m_bBinary = false;\n\n    if (HasBinaryData(buf,32)) {\n        m_liteApp->appendLog(\"LiteEditor\",\"Open binary file in the text editor! \"+fileName,true);\n        m_bBinary = true;\n        QByteArray testName = m_libucd.parse(buf);\n        if (!testName.isEmpty()) {\n            QTextCodec *c = QTextCodec::codecForName(testName);\n            if (c && (c->mibEnum() != m_codec->mibEnum()) ) {\n                m_codec = c;\n            }\n        }\n        QTextCodec::ConverterState state;\n        outText = m_codec->toUnicode(buf,buf.size(),&state);\n        if (state.invalidChars > 0 || state.remainingChars > 0) {\n            m_hasDecodingError = true;\n        }\n    } else {\n        if (bCheckCodec) {\n            m_codec = QTextCodec::codecForName(\"UTF-8\");\n            m_hasUtf8Bom = false;\n\n            if (mimeType == \"text/html\" || mimeType == \"text/xml\") {\n                m_codec = QTextCodec::codecForHtml(buf,QTextCodec::codecForName(\"utf-8\"));\n            } else {\n                LiteApi::IMimeType *im = m_liteApp->mimeTypeManager()->findMimeType(mimeType);\n                if (im) {\n                    QString codecName = im->codec();\n                    if (!codecName.isEmpty()) {\n                        m_codec = QTextCodec::codecForName(codecName.toLatin1());\n                    }\n                }\n                int bytesRead = buf.size();\n                QTextCodec *codec = m_codec;\n                // code taken from qtextstream\n                if (bytesRead >= 4 && ((uchar(buf[0]) == 0xff && uchar(buf[1]) == 0xfe && uchar(buf[2]) == 0 && uchar(buf[3]) == 0)\n                                       || (uchar(buf[0]) == 0 && uchar(buf[1]) == 0 && uchar(buf[2]) == 0xfe && uchar(buf[3]) == 0xff))) {\n                    codec = QTextCodec::codecForName(\"UTF-32\");\n                } else if (bytesRead >= 2 && ((uchar(buf[0]) == 0xff && uchar(buf[1]) == 0xfe)\n                                              || (uchar(buf[0]) == 0xfe && uchar(buf[1]) == 0xff))) {\n                    codec = QTextCodec::codecForName(\"UTF-16\");\n                } else if (bytesRead >= 3 && uchar(buf[0]) == 0xef && uchar(buf[1]) == 0xbb && uchar(buf[2])== 0xbf) {\n                    codec = QTextCodec::codecForName(\"UTF-8\");\n                    buf.remove(0,3);\n                    m_hasUtf8Bom = true;\n                } else if (!codec){\n                    codec = QTextCodec::codecForLocale();\n                }\n                // end code taken from qtextstream\n                m_codec = codec;\n            }\n        }\n\n        QTextCodec::ConverterState state;\n        outText = m_codec->toUnicode(buf,buf.size(),&state);\n        if (state.invalidChars > 0 || state.remainingChars > 0) {\n            m_hasDecodingError = true;\n        }\n\n        if (m_hasDecodingError && bCheckCodec) {\n            QByteArray testName = m_libucd.parse(buf);\n            if (!testName.isEmpty()) {\n                QTextCodec *c = QTextCodec::codecForName(testName);\n                if (c && (c->mibEnum() != m_codec->mibEnum()) ) {\n                    QTextCodec::ConverterState testState;\n                    QString testText = c->toUnicode(buf,buf.size(),&testState);\n                    if (testState.invalidChars == 0 && testState.remainingChars == 0) {\n                        m_hasDecodingError = false;\n                        m_codec = c;\n                        outText = testText;\n                    }\n                }\n            }\n        }\n    }\n\n    int lf = outText.indexOf('\\n');\n    if (lf < 0) {\n        m_lineTerminatorMode = NativeLineTerminator;\n    } else if (lf == 0) {\n        m_lineTerminatorMode = LFLineTerminator;\n    } else {\n        lf = outText.indexOf(QRegExp(\"[^\\r]\\n\"),lf-1);\n        if (lf >= 0) {\n            m_lineTerminatorMode = LFLineTerminator;\n        } else {\n            m_lineTerminatorMode = CRLFLineTerminator;\n        }\n    }\n\n    if (m_lineTerminatorMode == CRLFLineTerminator) {\n        outText.replace(\"\\r\\n\",\"\\n\");\n    }\n\n    bool noprintCheck = m_liteApp->settings()->value(EDITOR_NOPRINTCHECK,true).toBool();\n    if (noprintCheck && !LiteApi::mimeIsText(mimeType)) {\n        for (int i = 0; i < outText.length(); i++) {\n//            if (!outText[i].isPrint() && !outText[i].isSpace() && outText[i] != '\\r' && outText[i] != '\\n') {\n//                outText[i] = '.';\n//                m_hasDecodingError = true;\n//            }\n            if (IsBinaryCode(outText[i].unicode())) {\n                outText[i] = '.';\n                m_hasDecodingError = true;\n            }\n        }\n    }\n\n    if (m_hasDecodingError) {\n        m_liteApp->appendLog(\"LiteEditor\",QString(\"Decode file error! file:\\\"%1\\\" codec:%2\").arg(fileName).arg(textCodec()),true);\n    }\n\n    return true;\n}\n\nbool LiteEditorFile::setLineEndUnix(bool b)\n{\n    if (this->isLineEndUnix() == b) {\n        return false;\n    }\n    if (b) {\n        m_lineTerminatorMode = LFLineTerminator;\n    } else {\n        m_lineTerminatorMode = CRLFLineTerminator;\n    }\n    return true;\n}\n\nbool LiteEditorFile::hasDecodingError() const\n{\n    return m_hasDecodingError;\n}\n\nbool LiteEditorFile::isLineEndUnix() const\n{\n    return m_lineTerminatorMode == LFLineTerminator;\n}\n\nbool LiteEditorFile::isLineEndWindow() const\n{\n    return m_lineTerminatorMode == CRLFLineTerminator;\n}\n\nvoid LiteEditorFile::setMimeType(const QString &mimeType)\n{\n    m_mimeType = mimeType;\n}\n\nbool LiteEditorFile::loadText(const QString &fileName, const QString &mimeType, QString &outText)\n{    \n    return loadFileHelper(fileName,mimeType,true,outText);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditorfile.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteeditorfile.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEEDITORFILE_H\n#define LITEEDITORFILE_H\n\n#include \"liteapi/liteapi.h\"\n#include \"editorutil/libucd.h\"\n\nclass QTextDocument;\nclass LiteEditorFile : public LiteApi::IFile\n{\n    Q_OBJECT\npublic:\n    LiteEditorFile(LiteApi::IApplication *app, QObject *parent = 0);\n    virtual bool loadText(const QString &filePath, const QString &mimeType, QString &outText);\n    virtual bool reloadText(QString &outText);\n    virtual bool reloadTextByCodec(const QString &codecName, QString &outText);\n    virtual bool saveText(const QString &filePath, const QString &text);\n    virtual bool isReadOnly() const;\n    virtual bool isBinary() const;\n    virtual QString filePath() const;\n    virtual void setMimeType(const QString &mimeType);\n    virtual QString mimeType() const;\npublic:\n    void setTextCodec(const QString &name);\n    QString textCodec() const;\n    bool loadFileHelper(const QString &filePath, const QString &mimeType, bool bCheckCodec, QString &outText);\n    bool isLineEndUnix() const;\n    bool isLineEndWindow() const;\n    bool setLineEndUnix(bool b);\n    bool hasDecodingError() const;\nprotected:\n    enum LineTerminatorMode {\n        LFLineTerminator = 0,\n        CRLFLineTerminator,\n        NativeLineTerminator =\n#if defined (Q_OS_WIN)\n        CRLFLineTerminator\n#else\n        LFLineTerminator\n#endif\n    };\n    LineTerminatorMode m_lineTerminatorMode;\nprotected:\n    bool m_hasDecodingError;\n    bool m_bReadOnly;\n    bool m_bBinary;\n    LiteApi::IApplication *m_liteApp;\n    QString        m_fileName;\n    QString        m_mimeType;\n    QTextCodec    *m_codec;\n    bool           m_hasUtf8Bom;\n    LibUcd         m_libucd;\n};\n\n#endif //LITEEDITORFILE_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditorfilefactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteeditorfilefactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"liteeditorfilefactory.h\"\n#include \"liteeditor.h\"\n#include \"liteeditorwidget.h\"\n#include \"litewordcompleter.h\"\n#include \"editorapimanager.h\"\n#include \"liteeditormark.h\"\n#include \"liteeditor_global.h\"\n#include \"katehighlighterfactory.h\"\n#include \"katetextlexer.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n#include <QDir>\n#include <QFileInfo>\n#include \"mimetype/mimetype.h\"\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nLiteEditorFileFactory::LiteEditorFileFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IEditorFactory(parent),\n      m_liteApp(app)\n{\n    m_mimeTypes.append(\"text/x-gosrc\");\n    m_mimeTypes.append(\"text/x-lua\");\n    m_mimeTypes.append(\"liteide/default.editor\");\n\n    m_highlighterManager = new HighlighterManager(this);\n    if (m_highlighterManager->initWithApp(app)) {\n        m_liteApp->extension()->addObject(\"LiteApi.IHighlighterManager\",m_highlighterManager);\n        QDir dir(m_liteApp->resourcePath()+\"/liteeditor/kate\");\n        if (dir.exists()) {\n            KateHighlighterFactory *factory = new KateHighlighterFactory(this);\n            factory->loadPath(dir.absolutePath());\n            m_highlighterManager->addFactory(factory);\n\n            KateHighlighter *kate = factory->kate();\n            foreach (QString type, kate->mimeTypes()) {\n                if (!m_liteApp->mimeTypeManager()->findMimeType(type)) {\n                    MimeType *mimeType = new MimeType;\n                    mimeType->setType(type);\n                    foreach(QString pattern, kate->mimeTypePatterns(type)) {\n                        mimeType->appendGlobPatterns(pattern);\n                    }\n                    mimeType->setComment(kate->mimeTypeName(type));\n                    m_liteApp->mimeTypeManager()->addMimeType(mimeType);\n                }\n                m_mimeTypes.append(type);\n            }\n        }\n    }\n\n    m_mimeTypes.removeDuplicates();\n\n    m_wordApiManager = new EditorApiManager(this);\n    if (m_wordApiManager->initWithApp(app)) {\n        m_liteApp->extension()->addObject(\"LiteApi.IWordApiManager\",m_wordApiManager);\n        m_wordApiManager->load(m_liteApp->resourcePath()+\"/packages\");\n    }\n    m_markManager = new LiteEditorMarkManager(this);\n    if (m_markManager->initWithApp(app)) {\n        m_liteApp->extension()->addObject(\"LiteApi.IEditorMarkManager\",m_markManager);\n    }\n}\n\nQStringList LiteEditorFileFactory::mimeTypes() const\n{\n    return m_mimeTypes;\n}\n\nvoid LiteEditorFileFactory::colorStyleChanged()\n{\n    LiteEditor *editor = static_cast<LiteEditor *>(sender());\n    if (!editor) {\n        return;\n    }\n    TextEditor::SyntaxHighlighter *h = editor->syntaxHighlighter();\n    if (h) {\n        m_highlighterManager->setColorStyle(h,m_liteApp->editorManager()->colorStyleScheme());\n    }\n}\n\nvoid LiteEditorFileFactory::tabSettingChanged(int tabSize)\n{\n    LiteEditor *editor = static_cast<LiteEditor *>(sender());\n    if (!editor) {\n        return;\n    }\n    TextEditor::SyntaxHighlighter *h = editor->syntaxHighlighter();\n    if (h) {\n        m_highlighterManager->setTabSize(h,tabSize);\n    }\n}\n\nLiteApi::IEditor *LiteEditorFileFactory::open(const QString &fileName, const QString &mimeType)\n{\n   // m_liteApp->editorManager()->cutForwardNavigationHistory();\n    //m_liteApp->editorManager()->addNavigationHistory();\n    LiteEditor *editor = new LiteEditor(m_liteApp);\n    editor->setEditorMark(new LiteEditorMark(m_markManager,editor));\n    if (!editor->open(fileName,mimeType)) {\n        delete editor;\n        return 0;\n    }\n    return setupEditor(editor,mimeType);\n}\n\nLiteApi::IEditor *LiteEditorFileFactory::create(const QString &contents, const QString &mimeType)\n{\n    LiteEditor *editor = new LiteEditor(m_liteApp);\n    editor->setEditorMark(new LiteEditorMark(m_markManager,editor));\n    if (!editor->createNew(contents,mimeType)) {\n        delete editor;\n        return 0;\n    }\n\n    return setupEditor(editor,mimeType);\n}\n\nLiteApi::IEditor *LiteEditorFileFactory::setupEditor(LiteEditor *editor, const QString &mimeType)\n{\n    QTextDocument *doc = editor->document();\n    LiteApi::IHighlighterFactory *factory = m_highlighterManager->findFactory(mimeType);\n    if (factory && editor->enableSyntax()) {\n        TextEditor::SyntaxHighlighter *h = factory->create(editor,doc,mimeType);\n        if (h) {\n            editor->setSyntaxHighlighter(h);\n            editor->setTextLexer(new KateTextLexer(editor));\n            connect(editor,SIGNAL(colorStyleChanged()),this,SLOT(colorStyleChanged()));\n            //connect(editor,SIGNAL(tabSettingChanged(int)),this,SLOT(tabSettingChanged(int)));\n            connect(h,SIGNAL(foldIndentChanged(QTextBlock)),editor->editorWidget(),SLOT(foldIndentChanged(QTextBlock)));\n        }\n    }\n\n    LiteWordCompleter *wordCompleter = new LiteWordCompleter(editor);\n    editor->setCompleter(wordCompleter);\n    if (wordCompleter) {\n        LiteApi::IWordApi *wordApi = m_wordApiManager->findWordApi(mimeType);\n        if (wordApi && wordApi->loadApi()) {\n            QIcon icon(\"icon:liteeditor/images/keyword.png\");\n            QIcon exp(\"icon:liteeditor/images/findword.png\");\n            QIcon func(\"icon:liteeditor/images/func.png\");\n            foreach(QString item, wordApi->wordList()) {\n                int pos = item.indexOf(\"(\");\n                if (pos != -1) {\n                    wordCompleter->appendItemEx(item.left(pos).trimmed(),\"func\",\"func\"+item.right(item.length()-pos),func,false);\n                } else {\n                    wordCompleter->appendItemEx(item,\"keyword\",QString(\"\"),icon,false);\n                }\n            }\n            wordCompleter->appendItems(wordApi->expList(),\"\",\"\",exp,false);\n            wordCompleter->model()->sort(0);\n        }\n\n    }\n    LiteApi::ISnippetApi *snippetApi = m_wordApiManager->findSnippetApi(mimeType);\n    if (snippetApi && snippetApi->loadApi()) {\n        foreach (LiteApi::Snippet *snippet, snippetApi->snippetList()) {\n            wordCompleter->appendSnippetItem(snippet->Name,snippet->Info,snippet->Text);\n        }\n    }\n    editor->applyOption(OPTION_LITEEDITOR);\n    editor->loadColorStyleScheme();\n    return editor;\n}\n\nQString LiteEditorFileFactory::id() const\n{\n    return  \"TextEditor\";\n}\n\nQString LiteEditorFileFactory::displayName() const\n{\n    return  tr(\"Text Editor\");\n}\n\nbool LiteEditorFileFactory::testMimeType(const QString &mimeType)\n{\n    return  true;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditorfilefactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteeditorfilefactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEEDITORFILEFACTORY_H\n#define LITEEDITORFILEFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n#include \"highlightermanager.h\"\n\nclass EditorApiManager;\nclass LiteEditorMarkManager;\nclass LiteEditor;\n\nclass LiteEditorFileFactory : public LiteApi::IEditorFactory\n{\n    Q_OBJECT\npublic:\n    LiteEditorFileFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IEditor *open(const QString &fileName, const QString &mimeType);\n    virtual LiteApi::IEditor *create(const QString &contents,const QString &mimeType);\n    LiteApi::IEditor *setupEditor(LiteEditor *editor,const QString &mimeType);\n    virtual QString id() const;\n    virtual QString displayName() const;\n    virtual bool testMimeType(const QString &mimeType);\npublic slots:\n    void colorStyleChanged();\n    void tabSettingChanged(int);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    EditorApiManager *m_wordApiManager;\n    LiteEditorMarkManager *m_markManager;\n    HighlighterManager *m_highlighterManager;\n    QStringList m_mimeTypes;\n};\n\n#endif // LITEEDITORFILEFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditormark.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteeditormark.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"liteeditormark.h\"\n#include \"qtc_texteditor/basetextdocumentlayout.h\"\n#include \"liteeditorwidget.h\"\n#include <QTextDocument>\n#include <QTextBlock>\n#include <QFileInfo>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nLiteEditorMarkNode::LiteEditorMarkNode(LiteEditorMark *editorMark, int type, int indexOfType, int lineNumber, const QTextBlock &block, QObject *parent)\n    : TextEditor::ITextMark(parent),\n      m_editorMark(editorMark)\n{\n    m_blockNumber = lineNumber;\n    m_type = type;\n    m_indexOfType = indexOfType;\n    m_block = block;\n}\n\nLiteEditorMarkNode::~LiteEditorMarkNode()\n{\n  //  qDebug() << \"~LiteTextMark\" << m_type << this->lineNumber();\n}\n\nvoid LiteEditorMarkNode::removedFromEditor()\n{\n    m_editorMark->removedFromEditor(this);\n}\n\nvoid LiteEditorMarkNode::updateBlockNumber(int lineNumber)\n{\n    if (m_blockNumber == lineNumber) {\n        return;\n    }\n    int old = m_blockNumber;\n    m_blockNumber = lineNumber;\n    m_editorMark->updateBlockNumber(this, m_blockNumber, old);\n}\n\nvoid LiteEditorMarkNode::updateBlock(const QTextBlock &block)\n{\n    m_block = block;\n    m_editorMark->updateLineBlock(this);\n }\n\nQTextBlock LiteEditorMarkNode::block() const\n{\n    return m_block;\n}\n\nLiteEditorMarkManager::LiteEditorMarkManager(QObject *parent) :\n    LiteApi::IEditorMarkManager(parent)\n{\n}\n\nLiteEditorMarkManager::~LiteEditorMarkManager()\n{\n\n}\n\nvoid LiteEditorMarkManager::registerMark(int type, const QIcon &icon)\n{\n    if (m_typeIconMap.contains(type)) {\n        qDebug() << \"warning!!!\" << \"LiteEditorMarkTypeManager register mark type\" << type << \"exist!\";\n    }\n    m_typeIconMap.insert(type,icon);\n}\n\nQList<int> LiteEditorMarkManager::markTypeList() const\n{\n    return m_typeIconMap.keys();\n}\n\nQIcon LiteEditorMarkManager::iconForType(int type) const\n{\n    return m_typeIconMap.value(type);\n}\n\nint LiteEditorMarkManager::indexOfType(int type) const\n{\n    return m_typeIconMap.keys().indexOf(type);\n}\n\nQList<LiteApi::IEditorMark *> LiteEditorMarkManager::editorMarkList() const\n{\n    return m_markList;\n}\n\nvoid LiteEditorMarkManager::addMark(LiteApi::IEditorMark *mark)\n{\n    m_markList.append(mark);\n    emit editorMarkCreated(mark);\n    connect(mark,SIGNAL(markListChanged(int)),this,SLOT(markListChanged(int)));\n}\n\nvoid LiteEditorMarkManager::removeMark(LiteApi::IEditorMark *mark)\n{\n    m_markList.removeAll(mark);\n    emit editorMarkRemoved(mark);\n}\n\nvoid LiteEditorMarkManager::addMarkNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node)\n{\n    emit editorMarkNodeCreated(mark,node);\n}\n\nvoid LiteEditorMarkManager::removeMarkNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node)\n{\n    emit editorMarkNodeRemoved(mark,node);\n}\n\nvoid LiteEditorMarkManager::updateMarkNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node)\n{\n    emit editorMarkNodeChanged(mark,node);\n}\n\nvoid LiteEditorMarkManager::markListChanged(int type)\n{\n    emit editorMarkListChanged((LiteApi::IEditorMark*)sender(),type);\n}\n\nLiteEditorMark::LiteEditorMark(LiteEditorMarkManager *manager, LiteEditor *editor) :\n    LiteApi::IEditorMark(editor),\n    m_manager(manager),\n    m_editor(editor),\n    m_document(editor->document())\n{\n    m_manager->addMark(this);\n}\n\nLiteEditorMark::~LiteEditorMark()\n{\n    m_manager->removeMark(this);\n}\n\nstatic TextEditor::ITextMark *findMarkByType(TextEditor::TextBlockUserData *data, int type)\n{\n    foreach(TextEditor::ITextMark *mark, data->marks()) {\n        if ( mark->type() == type ) {\n            return mark;\n        }\n    }\n    return 0;\n}\n\nLiteEditorMarkNode *LiteEditorMark::createMarkByType(int type, int line, const QTextBlock &block)\n{\n    int index = m_manager->indexOfType(type);\n    if (index < 0) {\n        return 0;\n    }\n    QIcon icon = m_manager->iconForType(type);\n    LiteEditorMarkNode *mark = new LiteEditorMarkNode(this,type,index,line,block,this);\n    mark->setIcon(icon);\n    return mark;\n}\n\nvoid LiteEditorMark::removedFromEditor(LiteEditorMarkNode *mark)\n{\n    int type = mark->type();\n    m_typeLineMarkMap[type].remove(mark->blockNumber());\n\n    m_manager->removeMarkNode(this,mark);\n\n    emit markListChanged(type);\n\n    delete mark;\n}\n\nvoid LiteEditorMark::updateBlockNumber(LiteEditorMarkNode *mark, int newLine, int oldLine)\n{\n    int type = mark->type();\n\n    m_typeLineMarkMap[type].remove(oldLine);\n    m_typeLineMarkMap[type].insert(newLine,mark);\n\n    m_manager->updateMarkNode(this,mark);\n\n    emit markListChanged(type);\n}\n\nvoid LiteEditorMark::updateLineBlock(LiteEditorMarkNode *mark)\n{\n    m_manager->updateMarkNode(this,mark);\n}\n\nQMap<int, QList<int> > LiteEditorMark::saveTypeLinesMap(bool clearAll)\n{\n    QMap<int, QList<int> > maps;\n    QTextBlock block = m_document->firstBlock();\n    while(block.isValid()) {\n        TextEditor::TextBlockUserData *data = TextEditor::BaseTextDocumentLayout::testUserData(block);\n        if (data) {\n            foreach (LiteApi::IEditorMarkNode *mark, data->marks()) {\n                maps[mark->type()].push_back(mark->blockNumber());\n            }\n            if (clearAll) {\n                qDeleteAll(data->marks());\n                data->clearMarks();\n            }\n        }\n        block = block.next();\n    }\n    if (clearAll) {\n        m_typeLineMarkMap.clear();\n    }\n    return maps;\n}\n\nvoid LiteEditorMark::restoreTypeLinesMap(const QMap<int, QList<int> > &maps)\n{\n    QMapIterator<int, QList<int> > i(maps);\n    while (i.hasNext()) {\n        i.next();\n        this->addMarkList(i.value(),i.key());\n    }\n}\n\nvoid LiteEditorMark::addMark(int line, int type)\n{\n    addMarkList(QList<int>() << line, type);\n}\n\nvoid LiteEditorMark::addMarkList(const QList<int> &lines, int type)\n{\n    bool changed = false;\n    foreach (int line, lines) {\n        const QTextBlock &block = m_document->findBlockByNumber(line);\n        if (!block.isValid()) {\n            continue;\n        }\n        TextEditor::TextBlockUserData *data = TextEditor::BaseTextDocumentLayout::userData(block);\n        if (!data) {\n            continue;\n        }\n        TextEditor::ITextMark *findMark = findMarkByType(data,type);\n        if (findMark) {\n            continue;\n        }\n        LiteEditorMarkNode *mark = createMarkByType(type, line, block);\n        data->addMark(mark);\n\n        m_typeLineMarkMap[type].insert(line,mark);\n        m_manager->addMarkNode(this,mark);\n        changed = true;\n    }\n\n    if (changed) {\n        emit markListChanged(type);\n    }\n}\n\n\nvoid LiteEditorMark::removeMark(int line, int type)\n{\n    removeMarkList(QList<int>() << line, type);\n}\n\nvoid LiteEditorMark::removeMarkList(const QList<int> &lines, int type)\n{\n    bool changed = false;\n    foreach (int line, lines) {\n        const QTextBlock &block = m_document->findBlockByNumber(line);\n        if (!block.isValid()) {\n            continue;\n        }\n        TextEditor::TextBlockUserData *data = TextEditor::BaseTextDocumentLayout::testUserData(block);\n        if (!data) {\n            continue;\n        }\n        TextEditor::ITextMark *mark = findMarkByType(data,type);\n        if (!mark) {\n            continue;\n        }\n        data->removeMark(mark);\n\n        m_typeLineMarkMap[type].remove(line);\n        m_manager->removeMarkNode(this,mark);\n        delete mark;\n        changed = true;\n    }\n    if (changed) {\n        emit markListChanged(type);\n    }\n}\n\nQList<int> LiteEditorMark::markLinesByType(int type) const\n{\n //   qDebug\n    return m_typeLineMarkMap[type].keys();\n//    QList<int> lineList;\n//    QTextBlock block = m_document->firstBlock();\n//    while (block.isValid()) {\n//        TextEditor::TextBlockUserData *data = TextEditor::BaseTextDocumentLayout::testUserData(block);\n//        if (data) {\n//            foreach(TextEditor::ITextMark *mark, data->marks() ) {\n//                if ( ((LiteTextMark*)mark)->type() == type ) {\n//                    lineList.append(block.blockNumber());\n//                    break;\n//                }\n//            }\n//        }\n//        block = block.next();\n//    }\n    //    return lineList;\n}\n\nQList<QTextBlock> LiteEditorMark::markBlocksByType(int type) const\n{\n    QList<QTextBlock> blocks;\n    foreach (TextEditor::ITextMark *mark, m_typeLineMarkMap[type].values()) {\n        blocks.push_back(((LiteEditorMarkNode*)mark)->block());\n    }\n    return blocks;\n}\n\nQList<int> LiteEditorMark::markTypesByLine(int line) const\n{\n    QList<int> typeList;\n    TypeLineMarkMapIterator i(m_typeLineMarkMap);\n    while (i.hasNext()) {\n        i.next();\n        if (i.value().contains(line)) {\n            typeList.push_back(i.key());\n        }\n    }\n    return typeList;\n//    QList<int> typeList;\n//    const QTextBlock &block = m_document->findBlockByNumber(line);\n//    if (!block.isValid()) {\n//        return typeList;\n//    }\n//    TextEditor::TextBlockUserData *data = TextEditor::BaseTextDocumentLayout::testUserData(block);\n//    if (data) {\n//        foreach(TextEditor::ITextMark *mark, data->marks()) {\n//            typeList.append(((LiteTextMark*)mark)->type());\n//        }\n//    }\n//    return typeList;\n}\n\nLiteEditor *LiteEditorMark::editor() const\n{\n    return m_editor;\n}\n\nQString LiteEditorMark::filePath() const\n{\n    return m_editor->filePath();\n}\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditormark.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteeditormark.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEEDITORMARK_H\n#define LITEEDITORMARK_H\n\n#include \"liteapi/liteapi.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n#include \"qtc_texteditor/basetextdocumentlayout.h\"\n#include \"liteeditor.h\"\n\nclass LiteEditorMarkNode;\nclass LiteEditorMarkManager : public LiteApi::IEditorMarkManager\n{\n    Q_OBJECT\npublic:\n    LiteEditorMarkManager(QObject *parent = 0);\n    virtual ~LiteEditorMarkManager();\n    virtual void registerMark(int type, const QIcon &icon);\n    virtual QList<int> markTypeList() const;\n    virtual QIcon iconForType(int type) const;\n    virtual int indexOfType(int type) const;\n    virtual QList<LiteApi::IEditorMark*> editorMarkList() const;\n    void addMark(LiteApi::IEditorMark *mark);\n    void removeMark(LiteApi::IEditorMark *mark);\n    void addMarkNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node);\n    void removeMarkNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node);\n    void updateMarkNode(LiteApi::IEditorMark *mark, LiteApi::IEditorMarkNode *node);\npublic slots:\n    void markListChanged(int type);\nprotected:\n    QMap<int,QIcon> m_typeIconMap;\n    QList<LiteApi::IEditorMark*> m_markList;\n};\n\ntypedef QMap<int,QMap<int,TextEditor::ITextMark*> > TypeLineMarkMap;\ntypedef QMapIterator<int,QMap<int,TextEditor::ITextMark*> > TypeLineMarkMapIterator;\n\n\nclass LiteEditorMark : public LiteApi::IEditorMark\n{\n    Q_OBJECT\npublic:\n    explicit LiteEditorMark(LiteEditorMarkManager *manager, LiteEditor *editor);\n    virtual ~LiteEditorMark();\n    virtual void addMark(int line, int type);\n    virtual void addMarkList(const QList<int> &lines, int type);\n    virtual void removeMark(int line, int type);\n    virtual void removeMarkList(const QList<int> &lines, int type);\n    virtual QList<int> markLinesByType(int type) const;\n    virtual QList<QTextBlock> markBlocksByType(int type) const;\n    virtual QList<int> markTypesByLine(int line) const;\n    virtual LiteEditor *editor() const;\n    virtual QString filePath() const;\n    LiteEditorMarkNode *createMarkByType(int type, int line, const QTextBlock &block);\n    void removedFromEditor(LiteEditorMarkNode *mark);\n    void updateBlockNumber(LiteEditorMarkNode *mark, int newLine, int oldLine);\n    void updateLineBlock(LiteEditorMarkNode *mark);\npublic:\n    QMap<int, QList<int> > saveTypeLinesMap(bool clearAll);\n    void restoreTypeLinesMap(const QMap<int, QList<int> > &maps);\nprotected:\n    LiteEditorMarkManager *m_manager;\n    LiteEditor * m_editor;\n    QTextDocument *m_document;\n    TypeLineMarkMap m_typeLineMarkMap;\n};\n\nclass LiteEditorMarkNode : public TextEditor::ITextMark\n{\n    Q_OBJECT\npublic:\n    LiteEditorMarkNode(LiteEditorMark *editorMark, int type, int indexOfType, int blockNumber, const QTextBlock &block, QObject *parent = 0);\n    virtual ~LiteEditorMarkNode();\n    virtual void removedFromEditor();\n    virtual void updateBlockNumber(int blockNumber);\n    virtual void updateBlock(const QTextBlock &block);\n    QTextBlock block() const;\nprotected:\n    LiteEditorMark *m_editorMark;\n    QTextBlock m_block;\n};\n\n#endif // LITEEDITORMARK_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditoroption.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: liteeditoroption.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"liteeditoroption.h\"\r\n#include \"ui_liteeditoroption.h\"\r\n#include \"liteeditor_global.h\"\r\n#include \"liteapi/liteutil.h\"\r\n#include <QFontDatabase>\r\n#include <QDir>\r\n#include <QFileInfo>\r\n#include <QStandardItemModel>\r\n#include <QStandardItem>\r\n\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nstatic QString defaultFontFamily()\r\n{\r\n#if defined(Q_OS_WIN)\r\n    return \"Courier\";\r\n#elif defined(Q_OS_LINUX)\r\n    return \"Monospace\";\r\n#elif defined(Q_OS_MAC)\r\n    return \"Menlo\";\r\n#else\r\n    return \"Monospace\";\r\n#endif\r\n}\r\n\r\nLiteEditorOption::LiteEditorOption(LiteApi::IApplication *app,QObject *parent) :\r\n    LiteApi::IOption(parent),\r\n    m_liteApp(app),\r\n    m_widget(new QWidget),\r\n    ui(new Ui::LiteEditorOption)\r\n{\r\n    ui->setupUi(m_widget);\r\n\r\n//    QFontDatabase db;\r\n//    const QStringList families = db.families();\r\n\r\n    connect(ui->editPushButton,SIGNAL(clicked()),this,SLOT(editStyleFile()));\r\n    connect(ui->rightLineVisibleCheckBox,SIGNAL(toggled(bool)),ui->rightLineWidthSpinBox,SLOT(setEnabled(bool)));\r\n    connect(ui->restoreDefaultFontButton,SIGNAL(clicked()),this,SLOT(restoreDefaultFont()));\r\n    connect(ui->monospaceFontCheckBox,SIGNAL(toggled(bool)),this,SLOT(filterMonospaceFont(bool)));\r\n\r\n    m_mimeModel = new QStandardItemModel(0,5,this);\r\n    m_mimeModel->setHeaderData(0,Qt::Horizontal,tr(\"MIME Type\"));\r\n    m_mimeModel->setHeaderData(1,Qt::Horizontal,tr(\"Tab Width\"));\r\n    m_mimeModel->setHeaderData(2,Qt::Horizontal,tr(\"Tab To Spaces\"));\r\n    m_mimeModel->setHeaderData(3,Qt::Horizontal,tr(\"Custom Extensions\"));\r\n    m_mimeModel->setHeaderData(4,Qt::Horizontal,tr(\"File Extensions\"));\r\n    connect(m_mimeModel,SIGNAL(itemChanged(QStandardItem*)),this,SLOT(mimeItemChanged(QStandardItem*)));\r\n\r\n    ui->mimeTreeView->setModel(m_mimeModel);\r\n    ui->mimeTreeView->setRootIsDecorated(false);\r\n\r\n#if QT_VERSION >= 0x050000\r\n    ui->mimeTreeView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);\r\n#else\r\n    ui->mimeTreeView->header()->setResizeMode(QHeaderView::ResizeToContents);\r\n#endif\r\n\r\n}\r\n\r\nQWidget *LiteEditorOption::widget()\r\n{\r\n    return m_widget;\r\n}\r\n\r\nQString LiteEditorOption::name() const\r\n{\r\n    return \"LiteEditor\";\r\n}\r\n\r\nQString LiteEditorOption::mimeType() const\r\n{\r\n    return OPTION_LITEEDITOR;\r\n}\r\n\r\nvoid LiteEditorOption::save()\r\n{\r\n    m_fontFamily = ui->fontComboBox->currentFont().family();\r\n    if (ui->sizeComboBox->count()) {\r\n        const QString curSize = ui->sizeComboBox->currentText();\r\n        bool ok = true;\r\n        int size = curSize.toInt(&ok);\r\n        if (ok) {\r\n            m_fontSize = size;\r\n        }\r\n    }\r\n\r\n    int fontZoom = ui->fontZoomSpinBox->value();\r\n    if (fontZoom <= 10) {\r\n        fontZoom = 10;\r\n    }\r\n    m_liteApp->settings()->setValue(EDITOR_FONTZOOM,fontZoom);\r\n\r\n    QString style = ui->styleComboBox->currentText();\r\n    if (style != m_liteApp->settings()->value(EDITOR_STYLE,\"default.xml\").toString()) {\r\n        m_liteApp->settings()->setValue(EDITOR_STYLE,style);\r\n        QString styleFile = m_liteApp->resourcePath()+\"/liteeditor/color/\"+style;\r\n        m_liteApp->editorManager()->loadColorStyleScheme(styleFile);\r\n    }\r\n\r\n    bool noprintCheck = ui->noprintCheckBox->isChecked();\r\n    bool autoIndent = ui->autoIndentCheckBox->isChecked();\r\n    bool autoBraces0 = ui->autoBraces0CheckBox->isChecked();\r\n    bool autoBraces1 = ui->autoBraces1CheckBox->isChecked();\r\n    bool autoBraces2 = ui->autoBraces2CheckBox->isChecked();\r\n    bool autoBraces3 = ui->autoBraces3CheckBox->isChecked();\r\n    bool autoBraces4 = ui->autoBraces4CheckBox->isChecked();\r\n    bool autoBraces5 = ui->autoBraces5CheckBox->isChecked();\r\n    bool lineNumberVisible = ui->lineNumberVisibleCheckBox->isChecked();\r\n    bool codeFoldVisible = ui->codeFoldVisibleCheckBox->isChecked();\r\n    bool caseSensitive = ui->completerCaseSensitiveCheckBox->isChecked();\r\n    bool fuzzyCompleter = ui->completerFuzzyCheckBox->isChecked();\r\n    bool cleanWhitespaceOnSave = ui->cleanWhitespaceOnSaveCheckBox->isChecked();\r\n    bool antialias = ui->antialiasCheckBox->isChecked();\r\n    bool rightLineVisible = ui->rightLineVisibleCheckBox->isChecked();\r\n    bool eofVisible = ui->eofVisibleCheckBox->isChecked();\r\n    bool defaultWordWrap = ui->defaultWordWrapCheckBox->isChecked();\r\n    bool indentLineVisible = ui->indentLineCheckBox->isChecked();\r\n    bool wheelZoom = ui->wheelZoomingCheckBox->isChecked();\r\n    bool visualizeWhitespace = ui->visualizeWhitespaceCheckBox->isChecked();\r\n    int rightLineWidth = ui->rightLineWidthSpinBox->value();\r\n    bool cleanCompleterCache = ui->cleanCompleterCacheCheckBox->isChecked();\r\n    bool copyToHtml = ui->enableCopyToHtmlCheckBox->isChecked();\r\n    int min = ui->preMinLineEdit->text().toInt();\r\n    if (min < 0 || min > 10) {\r\n        min = 1;\r\n    }\r\n    bool offsetVisible = ui->offsetCheckBox->isChecked();\r\n    bool allowVscrollLastLine = ui->allowVscrollLastLineCheckBox->isChecked();\r\n\r\n    m_liteApp->settings()->setValue(EDITOR_NOPRINTCHECK,noprintCheck);\r\n    m_liteApp->settings()->setValue(EDITOR_FAMILY,m_fontFamily);\r\n    m_liteApp->settings()->setValue(EDITOR_FONTSIZE,m_fontSize);\r\n    m_liteApp->settings()->setValue(EDITOR_ANTIALIAS,antialias);\r\n    m_liteApp->settings()->setValue(EDITOR_AUTOINDENT,autoIndent);\r\n    m_liteApp->settings()->setValue(EDITOR_AUTOBRACE0,autoBraces0);\r\n    m_liteApp->settings()->setValue(EDITOR_AUTOBRACE1,autoBraces1);\r\n    m_liteApp->settings()->setValue(EDITOR_AUTOBRACE2,autoBraces2);\r\n    m_liteApp->settings()->setValue(EDITOR_AUTOBRACE3,autoBraces3);\r\n    m_liteApp->settings()->setValue(EDITOR_AUTOBRACE4,autoBraces4);\r\n    m_liteApp->settings()->setValue(EDITOR_AUTOBRACE5,autoBraces5);\r\n    m_liteApp->settings()->setValue(EDITOR_LINENUMBERVISIBLE,lineNumberVisible);\r\n    m_liteApp->settings()->setValue(EDITOR_CODEFOLDVISIBLE,codeFoldVisible);\r\n    m_liteApp->settings()->setValue(EDITOR_EOFVISIBLE,eofVisible);\r\n    m_liteApp->settings()->setValue(EDITOR_DEFAULTWORDWRAP,defaultWordWrap);\r\n    m_liteApp->settings()->setValue(EDITOR_INDENTLINEVISIBLE,indentLineVisible);\r\n    m_liteApp->settings()->setValue(EDITOR_COMPLETER_CASESENSITIVE,caseSensitive);\r\n    m_liteApp->settings()->setValue(EDITOR_COMPLETER_FUZZY,fuzzyCompleter);\r\n    m_liteApp->settings()->setValue(EDITOR_PREFIXLENGTH,min);\r\n    m_liteApp->settings()->setValue(EDITOR_CLEANWHITESPACEONSAVE,cleanWhitespaceOnSave);\r\n    m_liteApp->settings()->setValue(EDITOR_RIGHTLINEVISIBLE,rightLineVisible);\r\n    m_liteApp->settings()->setValue(EDITOR_WHEEL_SCROLL,wheelZoom);\r\n    m_liteApp->settings()->setValue(EDITOR_OFFSETVISIBLE,offsetVisible);\r\n    m_liteApp->settings()->setValue(EDITOR_VISUALIZEWHITESPACE,visualizeWhitespace);\r\n    m_liteApp->settings()->setValue(EDITOR_CLEAN_COMPLETERCACHE_SAVE,cleanCompleterCache);\r\n    m_liteApp->settings()->setValue(EDITOR_ENABLE_COPYTOHTML,copyToHtml);\r\n    m_liteApp->settings()->setValue(EDITOR_ALLOW_VSCROLL_LASTLINE,allowVscrollLastLine);\r\n    if (rightLineVisible) {\r\n        m_liteApp->settings()->setValue(EDITOR_RIGHTLINEWIDTH,rightLineWidth);\r\n    }\r\n    for (int i = 0; i < m_mimeModel->rowCount(); i++) {\r\n        QString mime = m_mimeModel->item(i,0)->text();\r\n        QString tab = m_mimeModel->item(i,1)->text();\r\n        QString custom = m_mimeModel->item(i,3)->text();\r\n        bool ok;\r\n        int n = tab.toInt(&ok);\r\n        if (ok && n > 0 && n < 20) {\r\n            //m_liteApp->settings()->setValue(MIMETYPE_TABWIDTH+mime,n);\r\n            LiteApi::updateAppSetting(m_liteApp,MIMETYPE_TABWIDTH+mime,n,4);\r\n        }\r\n        bool b = m_mimeModel->item(i,2)->checkState() == Qt::Checked;        \r\n        //m_liteApp->settings()->setValue(MIMETYPE_TABTOSPACE+mime,b);\r\n        LiteApi::updateAppSetting(m_liteApp,MIMETYPE_TABTOSPACE+mime,b,false);\r\n        //m_liteApp->settings()->setValue(EDITOR_CUSTOMEXTENSION+mime,custom);\r\n        LiteApi::updateAppSetting(m_liteApp,EDITOR_CUSTOMEXTENSION+mime,custom,\"\");\r\n        LiteApi::IMimeType *imt = m_liteApp->mimeTypeManager()->findMimeType(mime);\r\n        if (imt) {\r\n            imt->setCustomPatterns(custom.split(\";\"));\r\n        }\r\n    }\r\n}\r\n\r\nvoid LiteEditorOption::load()\r\n{\r\n    m_fontFamily = m_liteApp->settings()->value(EDITOR_FAMILY,defaultFontFamily()).toString();\r\n\r\n    ui->fontComboBox->setCurrentFont(QFont(m_fontFamily));\r\n\r\n    m_fontSize = m_liteApp->settings()->value(EDITOR_FONTSIZE,12).toInt();\r\n\r\n    int fontZoom = m_liteApp->settings()->value(EDITOR_FONTZOOM,100).toInt();\r\n    ui->fontZoomSpinBox->setValue(fontZoom);\r\n\r\n    bool antialias = m_liteApp->settings()->value(EDITOR_ANTIALIAS,true).toBool();\r\n    ui->antialiasCheckBox->setChecked(antialias);\r\n\r\n    updatePointSizes();\r\n\r\n    ui->fontZoomSpinBox->setValue(fontZoom);\r\n\r\n    QString styleName = m_liteApp->settings()->value(EDITOR_STYLE,\"default.xml\").toString();\r\n    QString stylePath = m_liteApp->resourcePath()+\"/liteeditor/color\";\r\n    QDir dir(stylePath);\r\n    int index = -1;\r\n    if (!QFileInfo(stylePath,styleName).exists()) {\r\n        styleName = \"default.xml\";\r\n    }\r\n    ui->styleComboBox->clear();\r\n    foreach(QFileInfo info, dir.entryInfoList(QStringList() << \"*.xml\")) {\r\n        ui->styleComboBox->addItem(info.fileName());\r\n        if (info.fileName() == styleName) {\r\n            index = ui->styleComboBox->count()-1;\r\n        }\r\n    }\r\n    if (index >= 0 && index < ui->styleComboBox->count()) {\r\n        ui->styleComboBox->setCurrentIndex(index);\r\n    }\r\n    bool noprintCheck = m_liteApp->settings()->value(EDITOR_NOPRINTCHECK,true).toBool();\r\n    bool autoIndent = m_liteApp->settings()->value(EDITOR_AUTOINDENT,true).toBool();\r\n    bool autoBraces0 = m_liteApp->settings()->value(EDITOR_AUTOBRACE0,true).toBool();\r\n    bool autoBraces1 = m_liteApp->settings()->value(EDITOR_AUTOBRACE1,true).toBool();\r\n    bool autoBraces2 = m_liteApp->settings()->value(EDITOR_AUTOBRACE2,true).toBool();\r\n    bool autoBraces3 = m_liteApp->settings()->value(EDITOR_AUTOBRACE3,true).toBool();\r\n    bool autoBraces4 = m_liteApp->settings()->value(EDITOR_AUTOBRACE4,true).toBool();\r\n    bool autoBraces5 = m_liteApp->settings()->value(EDITOR_AUTOBRACE5,true).toBool();\r\n    bool caseSensitive = m_liteApp->settings()->value(EDITOR_COMPLETER_CASESENSITIVE,false).toBool();\r\n    bool fuzzyCompleter = m_liteApp->settings()->value(EDITOR_COMPLETER_FUZZY,true).toBool();\r\n    bool cleanWhitespaceOnSave = m_liteApp->settings()->value(EDITOR_CLEANWHITESPACEONSAVE,false).toBool();\r\n    bool lineNumberVisible = m_liteApp->settings()->value(EDITOR_LINENUMBERVISIBLE,true).toBool();\r\n    bool codeFoldVisible = m_liteApp->settings()->value(EDITOR_CODEFOLDVISIBLE,true).toBool();\r\n    bool rightLineVisible = m_liteApp->settings()->value(EDITOR_RIGHTLINEVISIBLE,true).toBool();\r\n    bool eofVisible = m_liteApp->settings()->value(EDITOR_EOFVISIBLE,false).toBool();\r\n    bool defaultWordWrap = m_liteApp->settings()->value(EDITOR_DEFAULTWORDWRAP,false).toBool();\r\n    bool indentLineVisible = m_liteApp->settings()->value(EDITOR_INDENTLINEVISIBLE,true).toBool();\r\n    bool wheelZoom = m_liteApp->settings()->value(EDITOR_WHEEL_SCROLL,true).toBool();\r\n    bool offsetVisible = m_liteApp->settings()->value(EDITOR_OFFSETVISIBLE,false).toBool();\r\n    bool visualizeWhitespace = m_liteApp->settings()->value(EDITOR_VISUALIZEWHITESPACE,false).toBool();\r\n    int rightLineWidth = m_liteApp->settings()->value(EDITOR_RIGHTLINEWIDTH,80).toInt();\r\n    bool cleanComplerCache = m_liteApp->settings()->value(EDITOR_CLEAN_COMPLETERCACHE_SAVE,false).toBool();\r\n    bool copyToHtml = m_liteApp->settings()->value(EDITOR_ENABLE_COPYTOHTML,true).toBool();\r\n    bool allowVscrollLastLine = m_liteApp->settings()->value(EDITOR_ALLOW_VSCROLL_LASTLINE,true).toBool();\r\n\r\n    int min = m_liteApp->settings()->value(EDITOR_PREFIXLENGTH,1).toInt();\r\n\r\n    ui->noprintCheckBox->setChecked(noprintCheck);;\r\n    ui->autoIndentCheckBox->setChecked(autoIndent);\r\n    ui->autoBraces0CheckBox->setChecked(autoBraces0);\r\n    ui->autoBraces1CheckBox->setChecked(autoBraces1);\r\n    ui->autoBraces2CheckBox->setChecked(autoBraces2);\r\n    ui->autoBraces3CheckBox->setChecked(autoBraces3);\r\n    ui->autoBraces4CheckBox->setChecked(autoBraces4);\r\n    ui->autoBraces5CheckBox->setChecked(autoBraces5);\r\n    ui->lineNumberVisibleCheckBox->setChecked(lineNumberVisible);\r\n    ui->visualizeWhitespaceCheckBox->setChecked(visualizeWhitespace);\r\n    ui->codeFoldVisibleCheckBox->setChecked(codeFoldVisible);\r\n    ui->completerCaseSensitiveCheckBox->setChecked(caseSensitive);\r\n    ui->completerFuzzyCheckBox->setChecked(fuzzyCompleter);\r\n    ui->preMinLineEdit->setText(QString(\"%1\").arg(min));\r\n    ui->cleanWhitespaceOnSaveCheckBox->setChecked(cleanWhitespaceOnSave);\r\n    ui->rightLineVisibleCheckBox->setChecked(rightLineVisible);\r\n    ui->rightLineWidthSpinBox->setValue(rightLineWidth);\r\n    ui->eofVisibleCheckBox->setChecked(eofVisible);\r\n    ui->defaultWordWrapCheckBox->setChecked(defaultWordWrap);\r\n    ui->indentLineCheckBox->setChecked(indentLineVisible);\r\n    ui->wheelZoomingCheckBox->setChecked(wheelZoom);\r\n    ui->offsetCheckBox->setChecked(offsetVisible);\r\n    ui->cleanCompleterCacheCheckBox->setChecked(cleanComplerCache);\r\n    ui->enableCopyToHtmlCheckBox->setChecked(copyToHtml);\r\n    ui->allowVscrollLastLineCheckBox->setChecked(allowVscrollLastLine);\r\n\r\n    QStringList mimeTypes = m_liteApp->editorManager()->mimeTypeList();\r\n    qStableSort(mimeTypes);\r\n    m_mimeModel->removeRows(0,m_mimeModel->rowCount());\r\n    foreach(QString mime, mimeTypes) {\r\n        if (mime.startsWith(\"text/\") || mime.startsWith(\"application/\")) {\r\n            QStandardItem *item = new QStandardItem(mime);\r\n            item->setEditable(false);\r\n\r\n            bool tabToSpace = false;\r\n            int tabWidth = 4;\r\n            LiteApi::IMimeType *im = m_liteApp->mimeTypeManager()->findMimeType(mime);\r\n            if (im) {\r\n                tabToSpace = im->tabToSpace();\r\n                tabWidth = im->tabWidth();\r\n            }\r\n\r\n            tabToSpace = m_liteApp->settings()->value(MIMETYPE_TABTOSPACE+mime,tabToSpace).toBool();\r\n            tabWidth = m_liteApp->settings()->value(MIMETYPE_TABWIDTH+mime,tabWidth).toInt();\r\n\r\n            QStandardItem *tab = new QStandardItem(QString(\"%1\").arg(tabWidth));\r\n            QStandardItem *useSpace = new QStandardItem();\r\n            useSpace->setCheckable(true);\r\n            useSpace->setCheckState(tabToSpace?Qt::Checked:Qt::Unchecked);\r\n            useSpace->setEditable(false);\r\n            QStandardItem *ext = new QStandardItem;\r\n            ext->setEditable(false);\r\n            if (im) {\r\n                ext->setText(im->globPatterns().join(\";\"));\r\n            }\r\n            QString custom = m_liteApp->settings()->value(EDITOR_CUSTOMEXTENSION+mime,\"\").toString();\r\n            QStandardItem *cus = new QStandardItem(custom);\r\n            m_mimeModel->appendRow(QList<QStandardItem*>()\r\n                                  << item\r\n                                  << tab\r\n                                  << useSpace\r\n                                  << cus\r\n                                  << ext);\r\n        }\r\n    }\r\n}\r\n\r\nLiteEditorOption::~LiteEditorOption()\r\n{\r\n    delete m_widget;\r\n    delete ui;\r\n}\r\n\r\nvoid LiteEditorOption::updatePointSizes()\r\n{\r\n    // Update point sizes\r\n    const int oldSize = m_fontSize;\r\n    if (ui->sizeComboBox->count()) {\r\n        //const QString curSize = ui->sizeComboBox->currentText();\r\n        ui->sizeComboBox->clear();\r\n    }\r\n    const QList<int> sizeLst = pointSizesForSelectedFont();\r\n    int idx = 0;\r\n    int i = 0;\r\n    for (; i < sizeLst.count(); ++i) {\r\n        if (idx == 0 && sizeLst.at(i) >= oldSize)\r\n            idx = i;\r\n        ui->sizeComboBox->addItem(QString::number(sizeLst.at(i)));\r\n    }\r\n    if (ui->sizeComboBox->count())\r\n        ui->sizeComboBox->setCurrentIndex(idx);\r\n}\r\n\r\nQList<int> LiteEditorOption::pointSizesForSelectedFont() const\r\n{\r\n    static QFontDatabase db;\r\n    const QString familyName = ui->fontComboBox->currentFont().family();\r\n    QList<int> sizeLst = db.pointSizes(familyName);\r\n    if (!sizeLst.isEmpty())\r\n        return sizeLst;\r\n\r\n    QStringList styles = db.styles(familyName);\r\n    if (!styles.isEmpty())\r\n        sizeLst = db.pointSizes(familyName, styles.first());\r\n    if (sizeLst.isEmpty())\r\n        sizeLst = QFontDatabase::standardSizes();\r\n\r\n    return sizeLst;\r\n}\r\n\r\nvoid LiteEditorOption::editStyleFile()\r\n{\r\n    QString fileName = ui->styleComboBox->currentText();\r\n    if (fileName.isEmpty()) {\r\n        return;\r\n    }\r\n    QString filePath = m_liteApp->resourcePath()+\"/liteeditor/color/\"+fileName;\r\n    m_liteApp->fileManager()->openEditor(filePath);\r\n}\r\n\r\nvoid LiteEditorOption::mimeItemChanged(QStandardItem *item)\r\n{\r\n    if (item->column() == 1) {\r\n        bool ok;\r\n        int n = item->text().toInt(&ok);\r\n        if (!ok || n <= 0 || n >= 20) {\r\n            item->setText(\"4\");\r\n        }\r\n    }\r\n}\r\n\r\n\r\nvoid LiteEditorOption::restoreDefaultFont()\r\n{\r\n    m_fontFamily = defaultFontFamily();\r\n    ui->fontComboBox->setCurrentFont(QFont(m_fontFamily));\r\n\r\n    m_fontSize = 12;\r\n\r\n    ui->fontZoomSpinBox->setValue(100);\r\n    ui->antialiasCheckBox->setChecked(true);\r\n\r\n    updatePointSizes();\r\n}\r\n\r\nvoid LiteEditorOption::filterMonospaceFont(bool b)\r\n{\r\n    ui->fontComboBox->setFontFilters(b ?QFontComboBox::MonospacedFonts :  QFontComboBox::AllFonts);\r\n    ui->fontComboBox->updateGeometry();\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditoroption.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteeditoroption.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEEDITOROPTION_H\n#define LITEEDITOROPTION_H\n\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class LiteEditorOption;\n}\n\nclass QStandardItemModel;\nclass QStandardItem;\n\nclass LiteEditorOption : public LiteApi::IOption\n{\n    Q_OBJECT\npublic:\n    explicit LiteEditorOption(LiteApi::IApplication *app,QObject *parent = 0);\n    ~LiteEditorOption();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void save();\n    virtual void load();\n    void updatePointSizes();\n    QList<int> pointSizesForSelectedFont() const;\npublic slots:\n    void editStyleFile();\n    void mimeItemChanged(QStandardItem*);\npublic:\n    int m_fontSize;\n    QString m_fontFamily;\nprivate slots:\n    void restoreDefaultFont();\n    void filterMonospaceFont(bool b);\n\nprivate:\n    LiteApi::IApplication *m_liteApp;\n    QWidget *m_widget;\n    Ui::LiteEditorOption *ui;\n    QStandardItemModel *m_mimeModel;\n};\n\n#endif // LITEEDITOROPTION_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditoroption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>LiteEditorOption</class>\r\n <widget class=\"QWidget\" name=\"LiteEditorOption\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>630</width>\r\n    <height>390</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Form</string>\r\n  </property>\r\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_6\">\r\n   <item>\r\n    <widget class=\"QTabWidget\" name=\"tabWidget\">\r\n     <property name=\"currentIndex\">\r\n      <number>0</number>\r\n     </property>\r\n     <widget class=\"QWidget\" name=\"tab\">\r\n      <attribute name=\"title\">\r\n       <string>Font &amp;&amp; Colors</string>\r\n      </attribute>\r\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_3\">\r\n       <item>\r\n        <widget class=\"QGroupBox\" name=\"groupBox\">\r\n         <property name=\"title\">\r\n          <string>Font</string>\r\n         </property>\r\n         <layout class=\"QVBoxLayout\" name=\"verticalLayout_10\">\r\n          <item>\r\n           <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\r\n            <item>\r\n             <widget class=\"QLabel\" name=\"label_2\">\r\n              <property name=\"text\">\r\n               <string>Family:</string>\r\n              </property>\r\n             </widget>\r\n            </item>\r\n            <item>\r\n             <widget class=\"QFontComboBox\" name=\"fontComboBox\"/>\r\n            </item>\r\n            <item>\r\n             <widget class=\"QCheckBox\" name=\"monospaceFontCheckBox\">\r\n              <property name=\"text\">\r\n               <string>Show Monospace Font</string>\r\n              </property>\r\n             </widget>\r\n            </item>\r\n            <item>\r\n             <spacer name=\"horizontalSpacer_7\">\r\n              <property name=\"orientation\">\r\n               <enum>Qt::Horizontal</enum>\r\n              </property>\r\n              <property name=\"sizeHint\" stdset=\"0\">\r\n               <size>\r\n                <width>40</width>\r\n                <height>20</height>\r\n               </size>\r\n              </property>\r\n             </spacer>\r\n            </item>\r\n           </layout>\r\n          </item>\r\n          <item>\r\n           <layout class=\"QHBoxLayout\" name=\"horizontalLayout_7\">\r\n            <item>\r\n             <widget class=\"QLabel\" name=\"label\">\r\n              <property name=\"text\">\r\n               <string>Size:</string>\r\n              </property>\r\n             </widget>\r\n            </item>\r\n            <item>\r\n             <widget class=\"QComboBox\" name=\"sizeComboBox\">\r\n              <property name=\"sizePolicy\">\r\n               <sizepolicy hsizetype=\"Preferred\" vsizetype=\"Fixed\">\r\n                <horstretch>0</horstretch>\r\n                <verstretch>0</verstretch>\r\n               </sizepolicy>\r\n              </property>\r\n              <property name=\"editable\">\r\n               <bool>false</bool>\r\n              </property>\r\n             </widget>\r\n            </item>\r\n            <item>\r\n             <widget class=\"QLabel\" name=\"label_6\">\r\n              <property name=\"text\">\r\n               <string>Zoom:</string>\r\n              </property>\r\n             </widget>\r\n            </item>\r\n            <item>\r\n             <widget class=\"QSpinBox\" name=\"fontZoomSpinBox\">\r\n              <property name=\"suffix\">\r\n               <string>%</string>\r\n              </property>\r\n              <property name=\"minimum\">\r\n               <number>10</number>\r\n              </property>\r\n              <property name=\"maximum\">\r\n               <number>1000</number>\r\n              </property>\r\n              <property name=\"singleStep\">\r\n               <number>10</number>\r\n              </property>\r\n              <property name=\"value\">\r\n               <number>100</number>\r\n              </property>\r\n             </widget>\r\n            </item>\r\n            <item>\r\n             <widget class=\"QCheckBox\" name=\"antialiasCheckBox\">\r\n              <property name=\"text\">\r\n               <string>Antialias</string>\r\n              </property>\r\n             </widget>\r\n            </item>\r\n            <item>\r\n             <spacer name=\"horizontalSpacer_6\">\r\n              <property name=\"orientation\">\r\n               <enum>Qt::Horizontal</enum>\r\n              </property>\r\n              <property name=\"sizeHint\" stdset=\"0\">\r\n               <size>\r\n                <width>40</width>\r\n                <height>20</height>\r\n               </size>\r\n              </property>\r\n             </spacer>\r\n            </item>\r\n            <item>\r\n             <widget class=\"QPushButton\" name=\"restoreDefaultFontButton\">\r\n              <property name=\"text\">\r\n               <string>Restore Default Font</string>\r\n              </property>\r\n             </widget>\r\n            </item>\r\n           </layout>\r\n          </item>\r\n         </layout>\r\n        </widget>\r\n       </item>\r\n       <item>\r\n        <widget class=\"QGroupBox\" name=\"groupBox_2\">\r\n         <property name=\"title\">\r\n          <string>Editor Color Scheme</string>\r\n         </property>\r\n         <layout class=\"QVBoxLayout\" name=\"verticalLayout_9\">\r\n          <item>\r\n           <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\">\r\n            <item>\r\n             <widget class=\"QLabel\" name=\"label_3\">\r\n              <property name=\"text\">\r\n               <string>File:</string>\r\n              </property>\r\n             </widget>\r\n            </item>\r\n            <item>\r\n             <widget class=\"QComboBox\" name=\"styleComboBox\">\r\n              <property name=\"sizePolicy\">\r\n               <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Fixed\">\r\n                <horstretch>0</horstretch>\r\n                <verstretch>0</verstretch>\r\n               </sizepolicy>\r\n              </property>\r\n             </widget>\r\n            </item>\r\n            <item>\r\n             <widget class=\"QPushButton\" name=\"editPushButton\">\r\n              <property name=\"text\">\r\n               <string>Edit</string>\r\n              </property>\r\n             </widget>\r\n            </item>\r\n            <item>\r\n             <spacer name=\"horizontalSpacer_2\">\r\n              <property name=\"orientation\">\r\n               <enum>Qt::Horizontal</enum>\r\n              </property>\r\n              <property name=\"sizeHint\" stdset=\"0\">\r\n               <size>\r\n                <width>37</width>\r\n                <height>17</height>\r\n               </size>\r\n              </property>\r\n             </spacer>\r\n            </item>\r\n           </layout>\r\n          </item>\r\n         </layout>\r\n        </widget>\r\n       </item>\r\n       <item>\r\n        <spacer name=\"verticalSpacer\">\r\n         <property name=\"orientation\">\r\n          <enum>Qt::Vertical</enum>\r\n         </property>\r\n         <property name=\"sizeHint\" stdset=\"0\">\r\n          <size>\r\n           <width>20</width>\r\n           <height>40</height>\r\n          </size>\r\n         </property>\r\n        </spacer>\r\n       </item>\r\n      </layout>\r\n     </widget>\r\n     <widget class=\"QWidget\" name=\"tab_4\">\r\n      <attribute name=\"title\">\r\n       <string>Behavior</string>\r\n      </attribute>\r\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_4\">\r\n       <item>\r\n        <widget class=\"QGroupBox\" name=\"groupBox_6\">\r\n         <property name=\"title\">\r\n          <string>Syntax Auto-completion</string>\r\n         </property>\r\n         <layout class=\"QHBoxLayout\" name=\"horizontalLayout_5\">\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"autoBraces0CheckBox\">\r\n            <property name=\"toolTip\">\r\n             <string notr=\"true\"/>\r\n            </property>\r\n            <property name=\"text\">\r\n             <string notr=\"true\">{}</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"autoBraces1CheckBox\">\r\n            <property name=\"toolTip\">\r\n             <string notr=\"true\"/>\r\n            </property>\r\n            <property name=\"text\">\r\n             <string notr=\"true\"> ()</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"autoBraces2CheckBox\">\r\n            <property name=\"toolTip\">\r\n             <string notr=\"true\"/>\r\n            </property>\r\n            <property name=\"text\">\r\n             <string notr=\"true\">[]</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"autoBraces3CheckBox\">\r\n            <property name=\"toolTip\">\r\n             <string notr=\"true\"/>\r\n            </property>\r\n            <property name=\"text\">\r\n             <string notr=\"true\">''</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"autoBraces4CheckBox\">\r\n            <property name=\"toolTip\">\r\n             <string notr=\"true\"/>\r\n            </property>\r\n            <property name=\"text\">\r\n             <string notr=\"true\">&quot;&quot;</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"autoBraces5CheckBox\">\r\n            <property name=\"toolTip\">\r\n             <string/>\r\n            </property>\r\n            <property name=\"text\">\r\n             <string notr=\"true\">``</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n         </layout>\r\n        </widget>\r\n       </item>\r\n       <item>\r\n        <widget class=\"QGroupBox\" name=\"groupBox_3\">\r\n         <property name=\"title\">\r\n          <string>Behavior</string>\r\n         </property>\r\n         <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"autoIndentCheckBox\">\r\n            <property name=\"text\">\r\n             <string>Automatic indentation</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"completerFuzzyCheckBox\">\r\n            <property name=\"text\">\r\n             <string>Fuzzy code completion</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"completerCaseSensitiveCheckBox\">\r\n            <property name=\"text\">\r\n             <string>Case sensitive code completion</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <layout class=\"QHBoxLayout\" name=\"horizontalLayout_3\" stretch=\"1,1,6\">\r\n            <item>\r\n             <widget class=\"QLabel\" name=\"label_4\">\r\n              <property name=\"text\">\r\n               <string>Code completion prefix length:</string>\r\n              </property>\r\n             </widget>\r\n            </item>\r\n            <item>\r\n             <widget class=\"QLineEdit\" name=\"preMinLineEdit\">\r\n              <property name=\"sizePolicy\">\r\n               <sizepolicy hsizetype=\"Preferred\" vsizetype=\"Fixed\">\r\n                <horstretch>0</horstretch>\r\n                <verstretch>0</verstretch>\r\n               </sizepolicy>\r\n              </property>\r\n             </widget>\r\n            </item>\r\n            <item>\r\n             <spacer name=\"horizontalSpacer_3\">\r\n              <property name=\"orientation\">\r\n               <enum>Qt::Horizontal</enum>\r\n              </property>\r\n              <property name=\"sizeHint\" stdset=\"0\">\r\n               <size>\r\n                <width>40</width>\r\n                <height>20</height>\r\n               </size>\r\n              </property>\r\n             </spacer>\r\n            </item>\r\n           </layout>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"cleanCompleterCacheCheckBox\">\r\n            <property name=\"text\">\r\n             <string>Clean completion cache when saving files</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"cleanWhitespaceOnSaveCheckBox\">\r\n            <property name=\"text\">\r\n             <string>Clean whitespace when saving files</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"wheelZoomingCheckBox\">\r\n            <property name=\"text\">\r\n             <string>Enable scroll wheel zooming</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"enableCopyToHtmlCheckBox\">\r\n            <property name=\"text\">\r\n             <string>Add copied text into the clipboard as HTML</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"allowVscrollLastLineCheckBox\">\r\n            <property name=\"text\">\r\n             <string>Allow vertical scrolling to the last line [*]</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n         </layout>\r\n        </widget>\r\n       </item>\r\n       <item>\r\n        <spacer name=\"verticalSpacer_2\">\r\n         <property name=\"orientation\">\r\n          <enum>Qt::Vertical</enum>\r\n         </property>\r\n         <property name=\"sizeHint\" stdset=\"0\">\r\n          <size>\r\n           <width>20</width>\r\n           <height>40</height>\r\n          </size>\r\n         </property>\r\n        </spacer>\r\n       </item>\r\n      </layout>\r\n     </widget>\r\n     <widget class=\"QWidget\" name=\"tab_3\">\r\n      <attribute name=\"title\">\r\n       <string>Display</string>\r\n      </attribute>\r\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_7\">\r\n       <item>\r\n        <widget class=\"QGroupBox\" name=\"groupBox_5\">\r\n         <property name=\"title\">\r\n          <string>Load File</string>\r\n         </property>\r\n         <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"noprintCheckBox\">\r\n            <property name=\"text\">\r\n             <string>Check and convert no printable char to '.'</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n         </layout>\r\n        </widget>\r\n       </item>\r\n       <item>\r\n        <widget class=\"QGroupBox\" name=\"groupBox_4\">\r\n         <property name=\"title\">\r\n          <string>Display</string>\r\n         </property>\r\n         <layout class=\"QVBoxLayout\" name=\"verticalLayout_8\">\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"codeFoldVisibleCheckBox\">\r\n            <property name=\"text\">\r\n             <string>Display code fold</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"visualizeWhitespaceCheckBox\">\r\n            <property name=\"text\">\r\n             <string>Display VisualizeWhitespace</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"eofVisibleCheckBox\">\r\n            <property name=\"text\">\r\n             <string>Display EOF</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"defaultWordWrapCheckBox\">\r\n            <property name=\"text\">\r\n             <string>Word wrap by default</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"lineNumberVisibleCheckBox\">\r\n            <property name=\"text\">\r\n             <string>Display line numbers</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"indentLineCheckBox\">\r\n            <property name=\"text\">\r\n             <string>Display indent guide</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n          <item>\r\n           <layout class=\"QHBoxLayout\" name=\"horizontalLayout_4\">\r\n            <item>\r\n             <widget class=\"QCheckBox\" name=\"rightLineVisibleCheckBox\">\r\n              <property name=\"text\">\r\n               <string>Display right margin at column</string>\r\n              </property>\r\n             </widget>\r\n            </item>\r\n            <item>\r\n             <widget class=\"QSpinBox\" name=\"rightLineWidthSpinBox\">\r\n              <property name=\"minimum\">\r\n               <number>1</number>\r\n              </property>\r\n              <property name=\"maximum\">\r\n               <number>1024</number>\r\n              </property>\r\n              <property name=\"value\">\r\n               <number>80</number>\r\n              </property>\r\n             </widget>\r\n            </item>\r\n            <item>\r\n             <spacer name=\"horizontalSpacer_4\">\r\n              <property name=\"orientation\">\r\n               <enum>Qt::Horizontal</enum>\r\n              </property>\r\n              <property name=\"sizeHint\" stdset=\"0\">\r\n               <size>\r\n                <width>40</width>\r\n                <height>20</height>\r\n               </size>\r\n              </property>\r\n             </spacer>\r\n            </item>\r\n           </layout>\r\n          </item>\r\n          <item>\r\n           <widget class=\"QCheckBox\" name=\"offsetCheckBox\">\r\n            <property name=\"text\">\r\n             <string>Display offset position</string>\r\n            </property>\r\n           </widget>\r\n          </item>\r\n         </layout>\r\n        </widget>\r\n       </item>\r\n       <item>\r\n        <spacer name=\"verticalSpacer_3\">\r\n         <property name=\"orientation\">\r\n          <enum>Qt::Vertical</enum>\r\n         </property>\r\n         <property name=\"sizeHint\" stdset=\"0\">\r\n          <size>\r\n           <width>20</width>\r\n           <height>40</height>\r\n          </size>\r\n         </property>\r\n        </spacer>\r\n       </item>\r\n      </layout>\r\n     </widget>\r\n     <widget class=\"QWidget\" name=\"tab_2\">\r\n      <attribute name=\"title\">\r\n       <string>File Types</string>\r\n      </attribute>\r\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_5\">\r\n       <item>\r\n        <widget class=\"QTreeView\" name=\"mimeTreeView\"/>\r\n       </item>\r\n      </layout>\r\n     </widget>\r\n    </widget>\r\n   </item>\r\n  </layout>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditoroptionfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteeditoroptionfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"liteeditoroptionfactory.h\"\n#include \"liteeditoroption.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nLiteEditorOptionFactory::LiteEditorOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n}\n\nQStringList LiteEditorOptionFactory::mimeTypes() const\n{\n    return QStringList() << \"option/liteeditor\";\n}\n\nLiteApi::IOption *LiteEditorOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == \"option/liteeditor\") {\n        return new LiteEditorOption(m_liteApp,this);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditoroptionfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteeditoroptionfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEEDITOROPTIONFACTORY_H\n#define LITEEDITOROPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass LiteEditorOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n    LiteEditorOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // LITEEDITOROPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditorplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteeditorplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"liteeditorplugin.h\"\n#include \"liteeditorfilefactory.h\"\n#include \"liteeditoroptionfactory.h\"\n#include \"liteeditor_global.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nLiteEditorPlugin::LiteEditorPlugin()\n{\n}\n\nbool LiteEditorPlugin::load(LiteApi::IApplication *app)\n{\n    m_liteApp = app;\n    QString style = app->settings()->value(EDITOR_STYLE,\"default.xml\").toString();\n    if (!style.isEmpty()) {\n        QString styleFileName = app->resourcePath()+\"/liteeditor/color/\"+style;\n        if (!QFileInfo(styleFileName).exists()) {\n             styleFileName = app->resourcePath()+\"/liteeditor/color/default.xml\";\n        }\n        app->editorManager()->loadColorStyleScheme(styleFileName);\n    }\n    LiteEditorFileFactory *factory = new LiteEditorFileFactory(app,this);\n    app->editorManager()->addFactory(factory);\n\n    foreach(QString mime, app->editorManager()->mimeTypeList()) {\n        if (mime.startsWith(\"text/\") || mime.startsWith(\"application/\")) {\n            LiteApi::IMimeType *imt = app->mimeTypeManager()->findMimeType(mime);\n            if (imt) {\n                QString custom = app->settings()->value(EDITOR_CUSTOMEXTENSION+mime,\"\").toString();\n                if (!custom.isEmpty()) {\n                    imt->setCustomPatterns(custom.split(\";\"));\n                }\n            }\n        }\n    }\n\n    app->optionManager()->addFactory(new LiteEditorOptionFactory(app,this));\n\n    m_toolBarAct = new QAction(tr(\"Edit ToolBar\"),this);\n    m_toolBarAct->setCheckable(true);\n    m_toolBarAct->setChecked(m_liteApp->settings()->value(EDITOR_TOOLBAR_VISIBLE,true).toBool());\n    app->actionManager()->insertViewMenu(LiteApi::ViewMenuToolBarPos,m_toolBarAct);\n    connect(m_toolBarAct,SIGNAL(triggered(bool)),this,SLOT(editorToolBarVisibleChanged(bool)));\n\n    m_navBarAct = new QAction(tr(\"Edit Navigation Bar\"),this);\n    m_navBarAct->setCheckable(true);\n    m_navBarAct->setChecked(m_liteApp->settings()->value(EDITOR_NAVBAR_VISIBLE,true).toBool());\n    app->actionManager()->insertViewMenu(LiteApi::ViewMenuToolBarPos,m_navBarAct);\n    connect(m_navBarAct,SIGNAL(triggered(bool)),this,SLOT(editorNavigateVisibleChanged(bool)));\n\n    return true;\n}\n\nvoid LiteEditorPlugin::editorToolBarVisibleChanged(bool b)\n{\n    m_liteApp->settings()->setValue(EDITOR_TOOLBAR_VISIBLE,b);\n    m_liteApp->sendBroadcast(\"liteeditor\",EDITOR_TOOLBAR_VISIBLE,b);\n}\n\nvoid LiteEditorPlugin::editorNavigateVisibleChanged(bool b)\n{\n    m_liteApp->settings()->setValue(EDITOR_NAVBAR_VISIBLE,b);\n    m_liteApp->sendBroadcast(\"liteeditor\",EDITOR_NAVBAR_VISIBLE,b);\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditorplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteeditorplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEEDITORPLUGIN_H\n#define LITEEDITORPLUGIN_H\n\n#include \"liteeditor_global.h\"\n#include \"liteapi/liteapi.h\"\n#include <QtPlugin>\n\nclass LiteEditorPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    LiteEditorPlugin();\n    virtual bool load(LiteApi::IApplication *app);\npublic slots:\n    void editorToolBarVisibleChanged(bool b);\n    void editorNavigateVisibleChanged(bool b);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QAction *m_toolBarAct;\n    QAction *m_navBarAct;\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<LiteEditorPlugin>\n{\n    Q_OBJECT    \n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.LiteEditorPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/liteeditor\");\n        m_info->setName(\"LiteEditor\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setVer(\"X38.1\");\n        m_info->setInfo(\"Core Editor\");\n        m_info->setMustLoad(true);\n    }\n};\n\n#endif // LITEEDITORPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditorwidget.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: liteeditorwidget.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"liteeditorwidget.h\"\r\n#include <QCompleter>\r\n#include <QKeyEvent>\r\n#include <QAbstractItemView>\r\n#include <QApplication>\r\n#include <QModelIndex>\r\n#include <QAbstractItemModel>\r\n#include <QScrollBar>\r\n#include <QTextDocument>\r\n#include <QTextCursor>\r\n#include <QTextBlock>\r\n#include <QTextBlockFormat>\r\n#include <QTextDocumentFragment>\r\n#include <QMimeData>\r\n#include <QMenu>\r\n#include <QDebug>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\n\r\nLiteEditorWidget::LiteEditorWidget(LiteApi::IApplication *app, QWidget *parent) :\r\n    LiteEditorWidgetBase(app,parent),\r\n    m_completer(0),\r\n    m_contextMenu(0),\r\n    m_scrollWheelZooming(true),\r\n    m_bSpellCheckZoneDontComplete(false),\r\n    m_bCopyToHtml(true)\r\n{\r\n    this->m_averageCharWidth = QFontMetrics(this->font()).averageCharWidth();\r\n}\r\n\r\nvoid LiteEditorWidget::setContextMenu(QMenu *contextMenu)\r\n{\r\n    m_contextMenu = contextMenu;\r\n}\r\n\r\nvoid LiteEditorWidget::setCompleter(LiteApi::ICompleter *completer)\r\n{\r\n    m_completer = completer;\r\n}\r\n\r\nvoid LiteEditorWidget::codeCompleter()\r\n{\r\n    QTextCursor cursor = this->textCursor();\r\n    bool isInImport = false;\r\n    if (m_textLexer->isInStringOrComment(cursor)) {\r\n        isInImport = m_textLexer->isInImport(cursor);\r\n        if (!isInImport) {\r\n            return;\r\n        }\r\n    }\r\n    if (isInImport) {\r\n        QString completionPrefix = importUnderCursor(textCursor());\r\n        m_completer->setCompletionContext(LiteApi::CompleterImportContext);\r\n        m_completer->setCompletionPrefix(\"\");\r\n        m_completer->startCompleter(completionPrefix);\r\n    } else {\r\n        QString completionPrefix = textUnderCursor(textCursor());\r\n        if (completionPrefix.startsWith(\".\")) {\r\n            completionPrefix.insert(0,'@');\r\n        }\r\n        m_completer->setCompletionContext(LiteApi::CompleterCodeContext);\r\n        m_completer->setCompletionPrefix(\"\");\r\n        emit completionPrefixChanged(completionPrefix,true);\r\n        m_completer->startCompleter(completionPrefix);\r\n    }\r\n}\r\n\r\nQString LiteEditorWidget::wordUnderCursor() const\r\n{\r\n    QTextCursor tc = textCursor();\r\n    tc.select(QTextCursor::WordUnderCursor);\r\n    return tc.selectedText();\r\n}\r\n\r\nQString LiteEditorWidget::importUnderCursor(QTextCursor tc) const\r\n{\r\n    QString text = tc.block().text().left(tc.positionInBlock());\r\n    if (text.isEmpty()) {\r\n        return QString();\r\n    }\r\n    static QRegExp reg(\"[\\\"`][a-zA-Z0-9_\\\\-\\\\.\\\\/]*$\");\r\n    int index = reg.indexIn(text);\r\n    if (index < 0) {\r\n        return QString();\r\n    }\r\n    return text.right(reg.matchedLength()-1);\r\n}\r\n\r\nQString LiteEditorWidget::textUnderCursor(QTextCursor tc) const\r\n{\r\n    QString text = tc.block().text().left(tc.positionInBlock());\r\n    if (text.isEmpty()) {\r\n        return QString();\r\n    }\r\n    //int index = text.lastIndexOf(QRegExp(\"\\\\b[a-zA-Z_][a-zA-Z0-9_\\.]+\"));\r\n    static QRegExp reg(\"[a-zA-Z0-9_\\\\.]+[a-zA-Z0-9_\\\\.\\\\:]*$\");\r\n    int index = reg.indexIn(text);\r\n    if (index < 0) {\r\n        return QString();\r\n    }\r\n    return text.right(reg.matchedLength());\r\n    //int index = text.lastIndexOf(QRegExp(\"[\\w]+$\"));\r\n    //     qDebug() << \">\" << text << index;\r\n    //     int left = text.lastIndexOf(QRegExp(\"[ |\\t|\\\"|\\(|\\)|\\'|<|>]\"));\r\n    //     text = text.right(text.length()-left+1);\r\n    //return \"\";\r\n}\r\n\r\nvoid LiteEditorWidget::focusInEvent(QFocusEvent *e)\r\n{\r\n    LiteEditorWidgetBase::focusInEvent(e);\r\n}\r\n\r\nvoid LiteEditorWidget::wheelEvent(QWheelEvent *e)\r\n{\r\n    if (m_scrollWheelZooming && e->modifiers() & Qt::ControlModifier) {\r\n        const int delta = e->delta();\r\n        if (delta < 0)\r\n            zoomOut();\r\n        else if (delta > 0)\r\n            zoomIn();\r\n        return;\r\n    }\r\n    LiteEditorWidgetBase::wheelEvent(e);\r\n}\r\n\r\nvoid LiteEditorWidget::contextMenuEvent(QContextMenuEvent *e)\r\n{\r\n    QTextCursor cur = this->textCursor();\r\n    if (!cur.hasSelection()) {\r\n        cur = this->cursorForPosition(e->pos());\r\n        this->setTextCursor(cur);\r\n    }\r\n    if (m_contextMenu) {\r\n        m_contextMenu->exec(e->globalPos());\r\n    }\r\n}\r\n\r\nvoid LiteEditorWidget::keyPressEvent(QKeyEvent *e)\r\n{\r\n    if (!m_completer) {\r\n        LiteEditorWidgetBase::keyPressEvent(e);\r\n        return;\r\n    }\r\n    if (m_inputCursorOffset > 0) {\r\n        m_completer->hidePopup();\r\n        LiteEditorWidgetBase::keyPressEvent(e);\r\n        return;\r\n    }\r\n\r\n    if (m_completer->popup()->isVisible()) {\r\n        // The following keys are forwarded by the completer to the widget\r\n        switch (e->key()) {\r\n        case Qt::Key_Enter:\r\n        case Qt::Key_Return:\r\n        case Qt::Key_Escape:\r\n        case Qt::Key_Tab:\r\n        case Qt::Key_Backtab:\r\n        case Qt::Key_Shift:\r\n            e->ignore();\r\n            return; // let the completer do default behavior\r\n        case Qt::Key_N:\r\n        case Qt::Key_P:\r\n            if (e->modifiers() == Qt::ControlModifier) {\r\n                e->ignore();\r\n                return;\r\n            }\r\n        default:\r\n            break;\r\n        }\r\n    }\r\n\r\n    LiteEditorWidgetBase::keyPressEvent(e);\r\n\r\n    bool isInImport = false;\r\n    if (m_textLexer->isInStringOrComment(this->textCursor())) {\r\n        isInImport = m_textLexer->isInImport(this->textCursor());\r\n        if (!isInImport) {\r\n            m_completer->hidePopup();\r\n            return;\r\n        }\r\n    }\r\n\r\n    const bool ctrlOrShift = e->modifiers() & (Qt::ControlModifier | Qt::ShiftModifier);\r\n\r\n    //always break if ctrl is pressed and there's a key\r\n//    if (((e->modifiers() & Qt::ControlModifier) && !e->text().isEmpty())) {\r\n//        return;\r\n//    }\r\n    if (e->modifiers() & Qt::ControlModifier) {\r\n        if (!e->text().isEmpty()) {\r\n            m_completer->hidePopup();\r\n        }\r\n        return;\r\n    }\r\n\r\n    if (e->key() == Qt::Key_Tab || e->key() == Qt::Key_Backtab) {\r\n        return;\r\n    }\r\n\r\n    if (e->text().isEmpty()) {\r\n        if (e->key() != Qt::Key_Backspace) {\r\n            m_completer->hidePopup();\r\n            return;\r\n        }\r\n    }\r\n    //import line\r\n    if (isInImport) {\r\n        QString completionPrefix = importUnderCursor(textCursor());\r\n        m_completer->setCompletionContext(LiteApi::CompleterImportContext);\r\n        m_completer->setCompletionPrefix(\"\");\r\n        m_completer->startCompleter(completionPrefix);\r\n        return;\r\n    }\r\n\r\n    //static QString eow(\"~!@#$%^&*()+{}|:\\\"<>?,/;'[]\\\\-=\"); // end of word\r\n    static QString eow(\"~!@#$%^&*()+{}|\\\"<>?,/;'[]\\\\-=\"); // end of word\r\n    QString completionPrefix = textUnderCursor(textCursor());\r\n    bool hasModifier = ((e->modifiers() != Qt::NoModifier) && !ctrlOrShift) && completionPrefix.right(1) != \".\";\r\n    if (completionPrefix.startsWith(\"...\")) {\r\n        completionPrefix = completionPrefix.mid(3);\r\n    } else if (completionPrefix.startsWith(\".\")) {\r\n        completionPrefix.insert(0,'@');\r\n    }\r\n\r\n    if (hasModifier ||\r\n            e->text().isEmpty() ||\r\n            ( (completionPrefix.length() < m_completer->prefixMin()) && (completionPrefix.right(1) != \".\") ) ||\r\n            eow.contains(e->text().right(1))) {\r\n        if (m_completer->popup()->isVisible()) {\r\n            m_completer->popup()->hide();\r\n            //fmt.Print( -> Print\r\n            if (e->text() == \"(\") {\r\n                QTextCursor cur = textCursor();\r\n                cur.movePosition(QTextCursor::Left);\r\n                QString lastPrefix = textUnderCursor(cur);\r\n                if (lastPrefix.startsWith(\".\")) {\r\n                    lastPrefix.insert(0,\"@\");\r\n                }\r\n                if (!lastPrefix.isEmpty() &&\r\n                        lastPrefix == m_completer->completionPrefix() ) {\r\n                    if (lastPrefix == m_completer->currentCompletion() ||\r\n                            lastPrefix.endsWith(\".\"+m_completer->currentCompletion())) {\r\n                        m_completer->updateCompleteInfo(m_completer->currentIndex());\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        if (e->key() == Qt::Key_Backspace && completionPrefix.isEmpty()) {\r\n            m_completer->setCompletionPrefix(\"$\");\r\n        }\r\n        return;\r\n    }\r\n    m_completer->setCompletionContext(LiteApi::CompleterCodeContext);\r\n    emit completionPrefixChanged(completionPrefix,false);\r\n    m_completer->startCompleter(completionPrefix);\r\n}\r\n\r\nvoid LiteEditorWidget::inputMethodEvent(QInputMethodEvent *e)\r\n{\r\n    if (!e->preeditString().isEmpty()) {\r\n        m_completer->hidePopup();\r\n    }\r\n    LiteEditorWidgetBase::inputMethodEvent(e);\r\n}\r\n\r\nstatic void convertToPlainText(QString &txt)\r\n{\r\n    QChar *uc = txt.data();\r\n    QChar *e = uc + txt.size();\r\n\r\n    for (; uc != e; ++uc) {\r\n        switch (uc->unicode()) {\r\n        case 0xfdd0: // QTextBeginningOfFrame\r\n        case 0xfdd1: // QTextEndOfFrame\r\n        case QChar::ParagraphSeparator:\r\n        case QChar::LineSeparator:\r\n            *uc = QLatin1Char('\\n');\r\n            break;\r\n        case QChar::Nbsp:\r\n            *uc = QLatin1Char(' ');\r\n            break;\r\n        default:\r\n            ;\r\n        }\r\n    }\r\n}\r\n\r\nQString LiteEditorWidget::cursorToHtml(QTextCursor cursor) const\r\n{\r\n    QTextDocument *tempDocument = new QTextDocument;\r\n    QTextCursor tempCursor(tempDocument);\r\n    tempCursor.insertFragment(cursor.selection());\r\n\r\n    // Apply the additional formats set by the syntax highlighter\r\n    QTextBlock start = document()->findBlock(cursor.selectionStart());\r\n    QTextBlock end = document()->findBlock(cursor.selectionEnd());\r\n    end = end.next();\r\n\r\n    const int selectionStart = cursor.selectionStart();\r\n    const int endOfDocument = tempDocument->characterCount() - 1;\r\n    for (QTextBlock current = start; current.isValid() && current != end; current = current.next()) {\r\n        const QTextLayout *layout = current.layout();\r\n        foreach (const QTextLayout::FormatRange &range, layout->additionalFormats()) {\r\n            const int start = current.position() + range.start - selectionStart;\r\n            const int end = start + range.length;\r\n            if (end <= 0 || start >= endOfDocument)\r\n                continue;\r\n            tempCursor.setPosition(qMax(start, 0));\r\n            tempCursor.setPosition(qMin(end, endOfDocument), QTextCursor::KeepAnchor);\r\n            tempCursor.setCharFormat(range.format);\r\n        }\r\n    }\r\n\r\n    // Reset the user states since they are not interesting\r\n    for (QTextBlock block = tempDocument->begin(); block.isValid(); block = block.next())\r\n        block.setUserState(-1);\r\n\r\n    // Make sure the text appears pre-formatted\r\n    tempCursor.setPosition(0);\r\n    tempCursor.movePosition(QTextCursor::End, QTextCursor::KeepAnchor);\r\n    QTextBlockFormat blockFormat = tempCursor.blockFormat();\r\n    blockFormat.setNonBreakableLines(true);\r\n    tempCursor.setBlockFormat(blockFormat);\r\n    QString html = tempCursor.selection().toHtml();//(\"utf-8\");\r\n    //html.replace(\"\\t\",\"&nbsp&nbsp&nbsp&nbsp\");\r\n    delete tempDocument;\r\n    return html;\r\n}\r\n\r\nstatic const char kVerticalTextBlockMimeType[] = \"application/vnd.liteide.vblocktext\";\r\n\r\nQMimeData *LiteEditorWidget::createMimeDataFromSelection() const\r\n{\r\n    QTextCursor cursor = textCursor();\r\n    if (m_inBlockSelectionMode) {\r\n        QMimeData *mimeData = new QMimeData;\r\n        QString text = this->copyBlockSelection();\r\n        mimeData->setData(QLatin1String(kVerticalTextBlockMimeType), text.toUtf8());\r\n        mimeData->setText(text); // for exchangeability\r\n        return mimeData;\r\n    } else if (cursor.hasSelection()) {\r\n        QMimeData *mimeData = new QMimeData;\r\n        QString text = cursor.selectedText();\r\n        convertToPlainText(text);\r\n        mimeData->setText(text);\r\n        // Copy the selected text as HTML\r\n        if (m_bCopyToHtml) {\r\n            mimeData->setHtml(cursorToHtml(cursor));\r\n        }\r\n        return mimeData;\r\n    }\r\n    return 0;\r\n}\r\n\r\nbool LiteEditorWidget::canInsertFromMimeData(const QMimeData *source) const\r\n{\r\n    return QPlainTextEdit::canInsertFromMimeData(source);\r\n}\r\n\r\nvoid LiteEditorWidget::insertFromMimeData(const QMimeData *source)\r\n{\r\n    if (isReadOnly())\r\n        return;\r\n\r\n    if (source->hasFormat(QLatin1String(kVerticalTextBlockMimeType))) {\r\n        QString text = QString::fromUtf8(source->data(QLatin1String(kVerticalTextBlockMimeType)));\r\n        if (text.isEmpty())\r\n            return;\r\n\r\n        QStringList lines = text.split(QLatin1Char('\\n'));\r\n        QTextCursor cursor = textCursor();\r\n        cursor.beginEditBlock();\r\n        const TextEditor::TabSettings &ts = this->tabSettings();\r\n        int initialCursorPosition = cursor.position();\r\n        int column = ts.columnAt(cursor.block().text(), cursor.positionInBlock());\r\n        cursor.insertText(lines.first());\r\n        for (int i = 1; i < lines.count(); ++i) {\r\n            QTextBlock next = cursor.block().next();\r\n            if (next.isValid()) {\r\n                cursor.setPosition(next.position());\r\n            } else {\r\n                cursor.movePosition(QTextCursor::EndOfBlock);\r\n                cursor.insertBlock();\r\n            }\r\n            int offset = 0;\r\n            int position = ts.positionAtColumn(cursor.block().text(), column, &offset);\r\n            cursor.setPosition(cursor.block().position() + position);\r\n            if (offset < 0) {\r\n                cursor.deleteChar();\r\n                cursor.insertText(QString(-offset, QLatin1Char(' ')));\r\n            } else {\r\n                cursor.insertText(QString(offset, QLatin1Char(' ')));\r\n            }\r\n            cursor.insertText(lines.at(i));\r\n        }\r\n        cursor.setPosition(initialCursorPosition);\r\n        cursor.endEditBlock();\r\n        setTextCursor(cursor);\r\n        ensureCursorVisible();\r\n        return;\r\n    }\r\n\r\n    QPlainTextEdit::insertFromMimeData(source);\r\n}\r\n\r\nvoid LiteEditorWidget::zoomIn(int range)\r\n{\r\n    emit requestFontZoom(range*10);\r\n}\r\n\r\nvoid LiteEditorWidget::zoomOut(int range)\r\n{\r\n    emit requestFontZoom(-range*10);\r\n}\r\n\r\nvoid LiteEditorWidget::updateFont(const QFont &font)\r\n{\r\n    this->setFont(font);\r\n    this->extraArea()->setFont(font);\r\n    this->m_averageCharWidth = QFontMetrics(font).averageCharWidth();\r\n    this->updateTabWidth();\r\n    this->slotUpdateExtraAreaWidth();\r\n    if (this->m_completer) {\r\n        this->m_completer->popup()->setFont(font);\r\n    }\r\n}\r\n\r\nvoid LiteEditorWidget::dropEvent(QDropEvent *event)\r\n{\r\n    QList<QUrl> urls = event->mimeData()->urls();\r\n    if (urls.isEmpty()) {\r\n        LiteEditorWidgetBase::dropEvent(event);\r\n        return;\r\n    }\r\n    bool hasFile = false;\r\n    foreach (QUrl url, urls) {\r\n        QString fileName = url.toLocalFile();\r\n        if (!fileName.isEmpty()) {\r\n            QFileInfo info(fileName);\r\n            if (info.isFile()) {\r\n                m_liteApp->fileManager()->openEditor(fileName,true);\r\n            } else if(info.isDir()) {\r\n                m_liteApp->fileManager()->addFolderList(fileName);\r\n            }\r\n            hasFile = true;\r\n        }\r\n    }\r\n    if (hasFile) {\r\n        event->accept();\r\n        return;\r\n    }\r\n    LiteEditorWidgetBase::dropEvent(event);\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditorwidget.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: liteeditorwidget.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef LITEEDITORWIDGET_H\r\n#define LITEEDITORWIDGET_H\r\n\r\n#include \"liteeditorwidgetbase.h\"\r\n\r\nclass LiteEditorWidget : public LiteEditorWidgetBase\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    explicit LiteEditorWidget(LiteApi::IApplication *app, QWidget *parent = 0);\r\n    void setContextMenu(QMenu *contextMenu);\r\n    void setCompleter(LiteApi::ICompleter *completer);\r\n    void setSpellCheckZoneDontComplete(bool b) {m_bSpellCheckZoneDontComplete = b; }\r\n    void setScrollWheelZooming(bool b) {\r\n        m_scrollWheelZooming = b;\r\n    }\r\n    void setCopyToHtml(bool b) {\r\n        m_bCopyToHtml = b;\r\n    }\r\n\r\nprotected:\r\n    void contextMenuEvent(QContextMenuEvent *);\r\n    void keyPressEvent(QKeyEvent *e);\r\n    void inputMethodEvent(QInputMethodEvent * e);\r\n    void focusInEvent(QFocusEvent *e);\r\n    void wheelEvent(QWheelEvent *e);\r\n    virtual QMimeData *createMimeDataFromSelection() const;\r\n    virtual bool canInsertFromMimeData(const QMimeData *source) const;\r\n    virtual void insertFromMimeData(const QMimeData *source);\r\npublic slots:\r\n    void codeCompleter();\r\n    void zoomIn(int range = 1);\r\n    void zoomOut(int range = 1);\r\nsignals:\r\n    void requestFontZoom(int);\r\npublic:\r\n    void updateFont(const QFont &font);\r\n    QString cursorToHtml(QTextCursor cursor) const;\r\nsignals:\r\n    void completionPrefixChanged(QString,bool);\r\npublic:\r\n    QString wordUnderCursor() const;\r\n    QString textUnderCursor(QTextCursor tc) const;\r\n    QString importUnderCursor(QTextCursor tc) const;\r\n    virtual void dropEvent(QDropEvent *event);\r\nprotected:\r\n    LiteApi::ICompleter *m_completer;\r\n    QMenu      *m_contextMenu;\r\n    bool m_scrollWheelZooming;\r\n    bool m_bSpellCheckZoneDontComplete;\r\n    bool m_bCopyToHtml;\r\n};\r\n\r\n#endif // LITEEDITORWIDGET_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditorwidgetbase.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteeditorwidgetbase.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"liteeditorwidgetbase.h\"\n#include \"qtc_texteditor/basetextdocumentlayout.h\"\n#include \"quickopenapi/quickopenapi.h\"\n#include <QCoreApplication>\n#include <QApplication>\n#include <QTextBlock>\n#include <QPainter>\n#include <QPainterPath>\n#include <QStyle>\n#include <QDebug>\n#include <QMessageBox>\n#include <QToolTip>\n#include <QTextCursor>\n#include <QTextDocumentFragment>\n#include <QScrollBar>\n#include <QInputMethodEvent>\n#include <QTimer>\n#include <cmath>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nconst int PRIORITYLIST_LENGTH = 7;\nconst LiteApi::EditorNaviagteType MARKTYPE_PRIORITYLIST[PRIORITYLIST_LENGTH] = {\n        LiteApi::EditorNavigateError, LiteApi::EditorNavigateBad, LiteApi::EditorNavigateWarning, LiteApi::EditorNavigateReload, LiteApi::EditorNavigateFind, LiteApi::EditorNavigateSelection, LiteApi::EditorNavigateNormal\n    };\n\ninline QColor markTypeColor(LiteApi::EditorNaviagteType type) {\n    switch(type) {\n    case LiteApi::EditorNavigateBad:\n    case LiteApi::EditorNavigateError:\n        return Qt::darkRed;\n    case LiteApi::EditorNavigateWarning:\n        //Returns orange color\n        return QColor::fromRgb(255, 125, 0);\n    case LiteApi::EditorNavigateNormal:\n        return Qt::darkGreen;\n    case LiteApi::EditorNavigateReload:\n        return Qt::darkBlue;\n    case LiteApi::EditorNavigateFind:\n        return Qt::darkYellow;\n    case LiteApi::EditorNavigateSelection:\n        return Qt::darkBlue;\n    }\n    return Qt::darkGreen;\n}\n\nstruct NavigateMark\n{\n    NavigateMark() {}\n    ~NavigateMark()\n    {\n        foreach (Node *node, m_nodeList) {\n            delete node;\n        }\n        m_nodeList.clear();\n    }    \n\n    struct Node {\n        LiteApi::EditorNaviagteType type;\n        QString msg;\n        QString tag;\n        int offset;\n        int selection;\n\n        QColor markColor() {\n            return markTypeColor(type);\n        }\n    };\n    void addNode(LiteApi::EditorNaviagteType type, const QString & msg, const QString &tag = \"\", int offset = 0, int selection = 0)\n    {\n        Node *node = new Node;\n        node->type = type;\n        node->msg = msg;\n        node->offset = offset;\n        node->selection = selection;\n        node->tag = QString(tag);\n        m_nodeList.append(node);\n    }\n    Node* findNode(LiteApi::EditorNaviagteType type)\n    {\n        foreach (Node *node, m_nodeList) {\n            if (node->type == type) {\n                return node;\n            }\n        }\n        return 0;\n    }\n    void removeNode(LiteApi::EditorNaviagteType types, const QString &tag = \"\")\n    {\n        QMutableListIterator<Node*> i(m_nodeList);\n        while (i.hasNext()) {\n            Node *node = i.next();\n            if ((node->type&types) && (tag.isEmpty() || tag == node->tag)) {\n                i.remove();\n                delete node;\n            }\n        }\n    }\n    bool isEmpty() const {\n        return m_nodeList.isEmpty();\n    }\n\n    QList<Node*> m_nodeList;\n};\n\ntypedef QMap<int,NavigateMark*> NavigateMarkMap;\n\nclass NavigateManager : public QObject\n{\npublic:\n    NavigateManager(QObject *parent) : QObject(parent)\n    {\n        m_type = LiteApi::EditorNavigateNormal;\n    }\n    ~NavigateManager()\n    {\n        clearAll();\n    }\n    void insertMark(int blockNumber, const QString &msg, LiteApi::EditorNaviagteType type, const QString &tag = \"\", int offset = 0, int selection = 0)\n    {\n         NavigateMarkMap::iterator it = markMap.find(blockNumber);\n         if (it == markMap.end()) {\n             NavigateMark *mark = new NavigateMark;\n             mark->addNode(type, msg, tag, offset, selection);\n             markMap.insert(blockNumber,mark);\n         } else {\n             NavigateMark *mark = it.value();\n             NavigateMark::Node *node = mark->findNode(type);\n             if (node) {\n                 node->msg = msg;\n                 node->tag = tag;\n                 node->offset = offset;\n                 node->selection = selection;\n             } else {\n                 mark->addNode(type,msg,tag,offset,selection);\n             }\n         }\n    }\n    void clearAllNavigateMark(LiteApi::EditorNaviagteType types, const QString &tag = \"\")\n    {\n        QMutableMapIterator<int,NavigateMark*> i(markMap);\n        while (i.hasNext()) {\n            i.next();\n            NavigateMark *mark = i.value();\n            mark->removeNode(types, tag);\n            if (mark->isEmpty()) {\n                delete mark;\n                i.remove();\n            }\n        }\n    }\n    void clearAll()\n    {\n        foreach(NavigateMark *mark,markMap.values()) {\n            delete mark;\n        }\n        markMap.clear();\n    }\n    void setType(LiteApi::EditorNaviagteType type, const QString &msg)\n    {\n        m_type = type;\n        m_msg = msg;\n    }\n    QColor headMarkColor()\n    {\n        return markTypeColor(m_type);\n    }\npublic:\n    NavigateMarkMap markMap;\n    LiteApi::EditorNaviagteType m_type;\n    QString m_msg;\n};\n\nclass TextEditExtraArea : public QWidget {\npublic:\n    TextEditExtraArea(LiteEditorWidgetBase *edit):QWidget(edit) {\n        textEdit = edit;\n        setAutoFillBackground(true);\n    }\npublic:\n\n    QSize sizeHint() const {\n        return QSize(textEdit->extraAreaWidth(), 0);\n    }\nprotected:\n    void paintEvent(QPaintEvent *event){\n        textEdit->extraAreaPaintEvent(event);\n    }\n    void mousePressEvent(QMouseEvent *event){\n        textEdit->extraAreaMouseEvent(event);\n    }\n    void mouseMoveEvent(QMouseEvent *event){\n        textEdit->extraAreaMouseEvent(event);\n    }\n    void mouseReleaseEvent(QMouseEvent *event){\n        textEdit->extraAreaMouseEvent(event);\n    }\n    void leaveEvent(QEvent *event){\n        textEdit->extraAreaLeaveEvent(event);\n    }\n\n    void wheelEvent(QWheelEvent *event) {\n        QCoreApplication::sendEvent(textEdit->viewport(), event);\n    }\nprotected:\n    LiteEditorWidgetBase *textEdit;\n};\n\nclass TextEditNavigateArea : public QWidget {\npublic:\n    TextEditNavigateArea(LiteEditorWidgetBase *edit):QWidget(edit) {\n        textEdit = edit;\n        setAutoFillBackground(true);\n    }\npublic:\n\n    QSize sizeHint() const {\n        return QSize(textEdit->navigateAreaWidth(), 0);\n    }\nprotected:\n    void paintEvent(QPaintEvent *event){\n        textEdit->navigateAreaPaintEvent(event);\n    }\n    void mousePressEvent(QMouseEvent *event){\n        textEdit->navigateAreaMouseEvent(event);\n    }\n    void mouseMoveEvent(QMouseEvent *event){\n        textEdit->navigateAreaMouseEvent(event);\n    }\n    void mouseReleaseEvent(QMouseEvent *event){\n        textEdit->navigateAreaMouseEvent(event);\n    }\n    void enterEvent(QEvent * event) {\n        this->setMouseTracking(true);\n        textEdit->navigateAreaEnterEvent(event);\n    }\n    void leaveEvent(QEvent *event){\n        this->setMouseTracking(false);\n        textEdit->navigateAreaLeaveEvent(event);\n    }\nprotected:\n    LiteEditorWidgetBase *textEdit;\n};\n\nclass BaseTextLexer : public LiteApi::ITextLexer\n{\npublic:\n    BaseTextLexer(QObject *parent = 0) : LiteApi::ITextLexer(parent),\n        m_bAC(true), m_bCC(true)\n    {\n    }\n    virtual bool isLangSupport() const {\n        return false;\n    }\n    virtual bool isInComment(const QTextCursor &/*cursor*/) const {\n        return false;\n    }\n    virtual bool isInString(const QTextCursor &cursor) const {\n        int pos = cursor.positionInBlock();\n        if (pos == 0) {\n            return false;\n        }\n        QString text = cursor.block().text();\n        if (text.mid(pos).indexOf(\"\\\"\") < 0) {\n            return false;\n        }\n        if (text.left(pos).indexOf(\"\\\"\") < 0) {\n            return false;\n        }\n        return true;\n    }\n    virtual bool isInEmptyString(const QTextCursor &cursor) const {\n        int pos = cursor.positionInBlock();\n        if (pos > 0) {\n            QString text = cursor.block().text();\n            return text.at(pos-1) == '\\\"' && text.at(pos) == '\\\"';\n        }\n        return false;\n    }\n    virtual bool isEndOfString(const QTextCursor &cursor) const {\n        int pos = cursor.positionInBlock();\n        return cursor.block().text().at(pos) == '\\\"';\n    }\n    virtual bool isInStringOrComment(const QTextCursor &cursor) const {\n        if (isInString(cursor)) {\n            return true;\n        }\n        return false;\n    }\n    virtual bool isInImport(const QTextCursor &/*cursor*/) const {\n        return false;\n    }\n    virtual bool isCanAutoCompleter(const QTextCursor &/*cursor*/) const {\n        return m_bAC;\n    }\n    virtual void setCanCodeCompleter(bool b) {\n        m_bCC = b;\n    }\n    virtual void setCanAutoCompleter(bool b) {\n        m_bAC = b;\n    }\n    virtual int startOfFunctionCall(const QTextCursor &/*cursor*/) const {\n        return -1;\n    }\n    virtual QString fetchFunctionTip(const QString &/*func*/, const QString &/*kind*/, const QString &/*info*/)\n    {\n        return QString();\n    }\n    virtual bool fetchFunctionArgs(const QString &/*str*/, int &/*argnr*/, int &/*parcount*/)\n    {\n        return false;\n    }\n    virtual QString stringQuoteList() const\n    {\n        return QString(\"\\\"\");\n    }\n    virtual bool hasStringBackslash() const\n    {\n        return false;\n    }\nprotected:\n    bool m_bAC;\n    bool m_bCC;\n};\n\nLiteEditorWidgetBase::LiteEditorWidgetBase(LiteApi::IApplication *app, QWidget *parent)\n    : QPlainTextEdit(parent),\n      m_liteApp(app),\n      m_editorMark(0),\n      m_textLexer(new BaseTextLexer()),\n      m_contentsChanged(false),\n      m_lastCursorChangeWasInteresting(false)\n{\n    m_inputCursorOffset = 0;\n    m_upToolTipTime = 200;\n    m_linkPressed = false;\n    m_moveLineUndoHack = false;\n    setLineWrapMode(QPlainTextEdit::NoWrap);\n    m_extraArea = new TextEditExtraArea(this);\n    m_navigateArea = new TextEditNavigateArea(this);\n    m_navigateManager = new NavigateManager(this);\n\n    m_indentLineForeground = QColor(Qt::darkCyan);\n    m_visualizeWhitespaceForeground = QColor(Qt::darkGray);\n    m_extraForeground = QColor(Qt::darkCyan);\n    m_extraBackground = m_extraArea->palette().color(QPalette::Background);\n    m_currentLineBackground = QColor(180,200,200,128);\n    m_matchBracketsBackground = QColor(Qt::gray);\n    m_matchBracketsBackground.setAlpha(128);\n\n    setLayoutDirection(Qt::LeftToRight);\n    viewport()->setMouseTracking(true);\n\n    m_allowVscrollLastLine = true;\n    m_lineNumbersVisible = true;\n    m_navigateWidgetVisible = true;\n    m_marksVisible = true;\n    m_codeFoldingVisible = true;\n    m_rightLineVisible = true;\n    m_eofVisible = false;\n    m_indentLineVisible = true;\n    m_rightLineWidth = 80;\n    m_lastSaveRevision = 0;\n    m_extraAreaSelectionNumber = -1;\n    m_autoIndent = true;\n    m_bLastBraces = false;\n    m_bTabUseSpace = false;\n    m_nTabSize = 4;\n    m_mouseOnFoldedMarker = false;\n    m_uplinkSkip = false;\n    m_mouseNavigation = true;\n    m_showLinkNavigation = false;\n    m_showLinkInfomation = false;\n    m_visualizeWhitespace = false;\n    m_lastLine = -1;\n    m_inBlockSelectionMode = false;\n    m_maxTipInfoLines = 10;\n\n    m_upToolTipDeployTimer = new QTimer(this);\n    m_upToolTipDeployTimer->setSingleShot(true);\n    connect(m_upToolTipDeployTimer,SIGNAL(timeout()),this,SLOT(uplinkDeployTimeout()));\n    m_upToolTipTimer = new QTimer(this);\n    m_upToolTipTimer->setSingleShot(true);\n    connect(m_upToolTipTimer,SIGNAL(timeout()),this,SLOT(uplinkInfoTimeout()));\n\n    m_selectionExpression.setCaseSensitivity(Qt::CaseSensitive);\n    m_selectionExpression.setPatternSyntax(QRegExp::FixedString);\n\n    connect(this, SIGNAL(blockCountChanged(int)), this, SLOT(slotUpdateExtraAreaWidth()));\n    connect(this, SIGNAL(modificationChanged(bool)), this, SLOT(slotModificationChanged(bool)));\n    connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(slotCursorPositionChanged()));\n    //connect(this, SIGNAL(selectionChanged()),this,SLOT(updateSelection()));\n    connect(this, SIGNAL(updateRequest(QRect, int)), this, SLOT(slotUpdateRequest(QRect, int)));\n    connect(this->document(),SIGNAL(contentsChange(int,int,int)),this,SLOT(editContentsChanged(int,int,int)));\n    connect(this,SIGNAL(selectionChanged()),this,SLOT(slotSelectionChanged()));\n    connect(this->verticalScrollBar(),SIGNAL(rangeChanged(int,int)),this,SLOT(verticalScrollBarRangeChanged(int,int)));\n\n    QTextDocument *doc = this->document();\n    if (doc) {\n        TextEditor::BaseTextDocumentLayout *layout = new TextEditor::BaseTextDocumentLayout(doc);\n        layout->m_tabSettings.m_autoIndent = true;\n        layout->m_tabSettings.m_autoSpacesForTabs = m_bTabUseSpace;\n        layout->m_tabSettings.m_tabSize = m_nTabSize;\n        doc->setDocumentLayout(layout);\n        connect(layout,SIGNAL(updateBlock(QTextBlock)),this,SLOT(updateBlock(QTextBlock)));\n        connect(layout,SIGNAL(documentSizeChanged(QSizeF)),this,SLOT(documentSizeChanged(QSizeF)));\n    }\n    updateTabWidth();\n}\n\nLiteEditorWidgetBase::~LiteEditorWidgetBase()\n{\n}\n\nstatic void indentBlock(QTextDocument *doc,\n                                 const QTextBlock &block,\n                                 const QChar &typedChar,\n                                 const TextEditor::TabSettings &tabSettings)\n{\n    Q_UNUSED(typedChar)\n\n    // At beginning: Leave as is.\n    if (block == doc->begin())\n        return;\n\n    if (block.text().isEmpty()) {\n        return;\n    }\n\n    QString previousText;\n    QTextBlock previous = block.previous();\n    while (previous.isValid()) {\n        previousText = previous.text();\n        if (!previousText.isEmpty() && !previousText.trimmed().isEmpty()) {\n            break;\n        }\n        previous = previous.previous();\n    }\n    // Empty line indicates a start of a new paragraph. Leave as is.\n    if (previousText.isEmpty() || previousText.trimmed().isEmpty())\n        return;\n\n    int offset = 0;\n    QString text = previousText.trimmed();\n    if (text.endsWith(\"{\") || text.endsWith(\"(\")) {\n        offset += tabSettings.m_tabSize;\n    }\n    text = block.text().trimmed();\n    if (text.startsWith(\"}\") || text.startsWith(\")\")) {\n        offset -= tabSettings.m_tabSize;\n    }\n    int i = 0;\n    while (i < previousText.size()) {\n        if (!previousText.at(i).isSpace()) {\n            tabSettings.indentLine(block, tabSettings.columnAt(previousText, i+offset));\n            break;\n        }\n        ++i;\n    }\n}\n\nstatic void autoIndent(QTextDocument *doc, const QTextCursor &cursor, const TextEditor::TabSettings &tabSettings)\n{\n    if (cursor.hasSelection()) {\n        QTextBlock block = doc->findBlock(cursor.selectionStart());\n        const QTextBlock end = doc->findBlock(cursor.selectionEnd()).next();\n\n        // skip empty blocks\n        while (block.isValid() && block != end) {\n//            QString bt = block.text();\n//            if (tabSettings.firstNonSpace(bt) < bt.size())\n//                break;\n            indentBlock(doc, block, QChar::Null, tabSettings);\n            block = block.next();\n        }\n//        int previousIndentation = tabSettings.indentationColumn(block.text());\n//        indentBlock(doc, block, QChar::Null, tabSettings);\n//        int currentIndentation = tabSettings.indentationColumn(block.text());\n//        int delta = currentIndentation - previousIndentation;\n\n//        block = block.next();\n//        while (block.isValid() && block != end) {\n//            tabSettings.reindentLine(block, delta);\n//            block = block.next();\n//        }\n    } else {\n        indentBlock(doc, cursor.block(), QChar::Null, tabSettings);\n    }\n}\n\nvoid LiteEditorWidgetBase::setEditorMark(LiteApi::IEditorMark *mark)\n{\n    m_editorMark = mark;\n    if (m_editorMark) {\n        connect(m_editorMark,SIGNAL(markListChanged(int)),m_extraArea,SLOT(update()));\n    }\n}\n\nvoid LiteEditorWidgetBase::setTextLexer(LiteApi::ITextLexer *lexer)\n{\n    m_textLexer.reset(lexer);\n}\n\nvoid LiteEditorWidgetBase::setTabSize(int n)\n{\n    m_nTabSize = n;\n    updateTabWidth();\n    TextEditor::BaseTextDocumentLayout *layout = (TextEditor::BaseTextDocumentLayout*)document()->documentLayout();\n    if (layout) {\n        layout->m_tabSettings.m_tabSize = m_nTabSize;\n    }\n}\n\nint LiteEditorWidgetBase::tabSize() const\n{\n    return m_nTabSize;\n}\n\nvoid LiteEditorWidgetBase::updateTabWidth()\n{\n    setTabStopWidth(QFontMetrics(font()).averageCharWidth() * m_nTabSize);\n}\n\nvoid LiteEditorWidgetBase::setTabToSpaces(bool b)\n{\n    m_bTabUseSpace = b;\n    TextEditor::BaseTextDocumentLayout *layout = (TextEditor::BaseTextDocumentLayout*)document()->documentLayout();\n    if (layout) {\n        layout->m_tabSettings.m_autoSpacesForTabs = m_bTabUseSpace;\n    }\n}\n\nvoid LiteEditorWidgetBase::initLoadDocument()\n{\n    m_lastSaveRevision = document()->revision();\n    document()->setModified(false);\n    this->moveCursor(QTextCursor::Start);\n}\n\n\nvoid LiteEditorWidgetBase::editContentsChanged(int position, int charsRemoved, int charsAdded)\n{\n    m_contentsChanged = true;\n    QTextDocument *doc = this->document();\n    TextEditor::BaseTextDocumentLayout *documentLayout = static_cast<TextEditor::BaseTextDocumentLayout*>(doc->documentLayout());\n    const QTextBlock posBlock = doc->findBlock(position);\n\n    // Keep the line numbers and the block information for the text marks updated\n    if (charsRemoved != 0) {\n        documentLayout->updateMarksLineNumber();\n        documentLayout->updateMarksBlock(posBlock);\n    } else {\n        const QTextBlock nextBlock = doc->findBlock(position + charsAdded);\n        if (posBlock != nextBlock) {\n            documentLayout->updateMarksLineNumber();\n            documentLayout->updateMarksBlock(posBlock);\n            documentLayout->updateMarksBlock(nextBlock);\n        } else {\n            documentLayout->updateMarksBlock(posBlock);\n        }\n    }\n    if (!m_findExpression.isEmpty()) {\n        this->updateFindOrSelectionMark(LiteApi::EditorNavigateFind);\n    }\n}\n\nstruct MatchBracePos {\n    int startPos;\n    int matchPos;\n    bool startIsLeft;\n    bool startIsOpen;\n    TextEditor::TextBlockUserData::MatchType matchType;\n};\n\nstatic bool findMatchBrace(QTextCursor &cur, MatchBracePos &mb)\n{\n    QTextBlock block = cur.block();\n    int pos = cur.positionInBlock();\n    mb.startPos = -1;\n    mb.matchPos = -1;\n    if (block.isValid()) {\n        TextEditor::TextBlockUserData *data = static_cast<TextEditor::TextBlockUserData*>(block.userData());\n        if (data) {\n            TextEditor::Parentheses ses = data->parentheses();\n            QChar chr;\n            int i = ses.size();\n            while(i--) {\n                TextEditor::Parenthesis s = ses.at(i);\n                if (s.pos == pos || s.pos+1 == pos) {\n                    mb.startPos = cur.block().position()+s.pos;\n                    mb.startIsLeft = (s.pos == pos);\n                    mb.startIsOpen = (s.type == TextEditor::Parenthesis::Opened);\n                    chr = s.chr;\n                    break;\n                }\n            }\n            if (mb.startPos != -1) {\n                if (mb.startIsOpen) {\n                    cur.setPosition(mb.startPos);\n                    mb.matchType = TextEditor::TextBlockUserData::checkOpenParenthesis(&cur,chr);\n                    mb.matchPos = cur.position()-1;\n                } else {\n                    cur.setPosition(mb.startPos+1);\n                    mb.matchType = TextEditor::TextBlockUserData::checkClosedParenthesis(&cur,chr);\n                    mb.matchPos = cur.position();\n                }\n                return true;\n            }\n        }\n    }\n    return false;\n}\n\nvoid LiteEditorWidgetBase::gotoMatchBrace()\n{\n    QTextCursor cur = this->textCursor();\n    MatchBracePos mb;\n    if (findMatchBrace(cur,mb) && mb.matchType == TextEditor::TextBlockUserData::Match) {\n        if (mb.startIsLeft) {\n            cur.setPosition(mb.matchPos+1);\n        } else {\n            cur.setPosition(mb.matchPos);\n        }\n        this->setTextCursor(cur);\n        if (!cur.block().isVisible()) {\n            unfold();\n        }\n        ensureCursorVisible();\n    }\n}\n\nvoid LiteEditorWidgetBase::highlightCurrentLine()\n{    \n    QTextCursor cur = textCursor();\n    if (!cur.block().isVisible()) {\n        unfold();\n    }\n\n//    if (!isReadOnly()) {\n//        QTextEdit::ExtraSelection full;\n//        full.format.setBackground(m_currentLineBackground);\n//        full.format.setProperty(QTextFormat::FullWidthSelection, true);\n//        full.cursor = this->textCursor();\n//        //full.cursor.select(QTextCursor::LineUnderCursor);\n//        setExtraSelections(LiteApi::CurrentLineSelection,QList<QTextEdit::ExtraSelection>() << full );\n//    }\n\n    QList<QTextEdit::ExtraSelection> extraSelections;\n    MatchBracePos mb;\n    if (findMatchBrace(cur,mb)) {\n        if (mb.matchType == TextEditor::TextBlockUserData::Match) {\n            QTextEdit::ExtraSelection selection;\n            cur.setPosition(mb.startPos);\n            cur.movePosition(QTextCursor::Right,QTextCursor::KeepAnchor,1);\n            selection.cursor = cur;\n            selection.format.setFontUnderline(true);\n            selection.format.setBackground(m_matchBracketsBackground);\n            selection.format.setProperty(LiteEditorWidgetBase::MatchBrace,true);\n            extraSelections.append(selection);\n\n            cur.setPosition(mb.matchPos);\n            cur.movePosition(QTextCursor::Right,QTextCursor::KeepAnchor,1);\n            selection.cursor = cur;\n            selection.format.setFontUnderline(true);\n            selection.format.setProperty(LiteEditorWidgetBase::MatchBrace,true);\n            extraSelections.append(selection);\n        } else if (mb.matchType == TextEditor::TextBlockUserData::Mismatch) {\n            QTextEdit::ExtraSelection selection;\n            cur.setPosition(mb.startPos);\n            cur.movePosition(QTextCursor::Right,QTextCursor::KeepAnchor,1);\n            selection.cursor = cur;\n            selection.format.setFontUnderline(true);\n            selection.format.setUnderlineStyle(QTextCharFormat::SpellCheckUnderline);\n            selection.format.setProperty(LiteEditorWidgetBase::MatchBrace,true);\n            selection.format.setForeground(Qt::red);\n            extraSelections.append(selection);\n        }\n    }\n    setExtraSelections(LiteApi::ParenthesesMatchingSelection,extraSelections);\n    viewport()->update();\n}\n\nstatic int foldBoxWidth(const QFontMetrics &fm)\n{\n    const int lineSpacing = fm.lineSpacing();\n    return lineSpacing/2+lineSpacing%2+1;\n}\n\nQWidget* LiteEditorWidgetBase::extraArea()\n{\n    return m_extraArea;\n}\n\nQWidget *LiteEditorWidgetBase::navigateArea()\n{\n    return m_navigateArea;\n}\n\nvoid LiteEditorWidgetBase::setCurrentLineColor(const QColor &background)\n{\n    if (background.isValid()) {\n        m_currentLineBackground = background;\n    } else {\n        m_currentLineBackground = QColor(180,200,200,128);\n    }\n    m_currentLineBackground.setAlpha(128);\n}\n\nvoid LiteEditorWidgetBase::setMatchBracketsColor(const QColor &background)\n{\n    if (background.isValid()) {\n        m_matchBracketsBackground = background;\n    } else {\n        m_matchBracketsBackground = Qt::gray;\n    }\n    m_matchBracketsBackground.setAlpha(128);\n}\n\nvoid LiteEditorWidgetBase::setIndentLineColor(const QColor &foreground)\n{\n    if (foreground.isValid()) {\n        m_indentLineForeground = foreground;\n    } else {\n        m_indentLineForeground = QColor(Qt::darkCyan);\n    }\n    m_indentLineForeground.setAlpha(128);\n}\n\nvoid LiteEditorWidgetBase::setVisualizeWhitespaceColor(const QColor &foreground)\n{\n    if (foreground.isValid()) {\n        m_visualizeWhitespaceForeground = foreground;\n    } else {\n        m_visualizeWhitespaceForeground = QColor(Qt::darkGray);\n    }\n    m_visualizeWhitespaceForeground.setAlpha(200);\n}\n\nvoid LiteEditorWidgetBase::setExtraColor(const QColor &foreground,const QColor &background)\n{\n    if (foreground.isValid()) {\n        m_extraForeground = foreground;\n    } else {\n        m_extraForeground = QColor(Qt::darkCyan);\n    }\n    if (background.isValid()) {\n        m_extraBackground = background;\n    } else {\n        m_extraBackground = m_extraArea->palette().color(QPalette::Background);\n    }\n}\n\nint LiteEditorWidgetBase::extraAreaWidth()\n{\n    int space = 0;\n    const QFontMetrics fm(m_extraArea->fontMetrics());\n    if (m_lineNumbersVisible) {\n        QFont fnt = m_extraArea->font();\n        fnt.setBold(true);\n        const QFontMetrics linefm(fnt);\n        int digits = 2;\n        int max = qMax(1, blockCount());\n        while (max >= 100) {\n            max /= 10;\n            ++digits;\n        }\n        space += linefm.width(QLatin1Char('9')) * digits;\n    }\n    if (m_marksVisible) {\n        int markWidth = fm.lineSpacing();\n        space += markWidth;\n    } else {\n        space += 3;\n    }\n    if (m_codeFoldingVisible) {\n        space += foldBoxWidth(fm);\n    }\n    space += 4;\n\n    return space;\n}\n\nvoid LiteEditorWidgetBase::drawFoldingMarker(QPainter *painter, const QPalette&,\n                                       const QRect &rect,\n                                       bool expanded) const\n{\n    painter->save();\n    painter->setPen(Qt::NoPen);\n    int size = rect.size().width();\n    int sqsize = 2*(size/2);\n\n    QColor textColor = m_extraForeground;\n    QColor brushColor = m_extraBackground;\n\n    textColor.setAlpha(128);\n    brushColor.setAlpha(128);\n    QPolygon a;\n    if (expanded) {\n        // down arrow\n        //a.setPoints(3, 0, sqsize/3,  sqsize/2, sqsize  - sqsize/3,  sqsize, sqsize/3);\n        a.setPoints(3, 1, sqsize/2+sqsize/3,  sqsize/2+sqsize/3, sqsize/2+sqsize/3,sqsize/2+sqsize/3,1);\n    } else {\n        // right arrow\n        a.setPoints(3, sqsize - sqsize/3, sqsize/2,  sqsize/2 - sqsize/3, 0,  sqsize/2 - sqsize/3, sqsize);\n    }\n    painter->translate(0.5, 0.5);\n    painter->setRenderHint(QPainter::Antialiasing);\n    painter->translate(rect.topLeft());\n    painter->setPen(textColor);\n    if (expanded) {\n        painter->setBrush(textColor);\n    } else {\n        painter->setBrush(brushColor);\n    }\n    painter->drawPolygon(a);\n    painter->restore();\n\n}\n\nvoid LiteEditorWidgetBase::extraAreaPaintEvent(QPaintEvent *e)\n{\n    QTextDocument *doc = document();\n\n    int selStart = textCursor().selectionStart();\n    int selEnd = textCursor().selectionEnd();\n\n    QPalette pal = m_extraArea->palette();\n    pal.setCurrentColorGroup(QPalette::Active);\n    QPainter painter(m_extraArea);\n    const QFontMetrics fm(m_extraArea->font());\n\n    int fmLineSpacing = fm.lineSpacing();\n    int markWidth = 0;\n    if (m_marksVisible)\n        markWidth += fm.lineSpacing();\n\n    const int collapseColumnWidth = m_codeFoldingVisible ? foldBoxWidth(fm): 0;\n    const int extraAreaWidth = m_extraArea->width() - collapseColumnWidth;\n\n//    painter.fillRect(e->rect(), pal.color(QPalette::Base));\n//    painter.fillRect(e->rect().intersected(QRect(0, 0, m_extraArea->width(), INT_MAX)),\n//                     m_extraBackground);\n    painter.fillRect(e->rect(),m_extraBackground);\n    //painter.setPen(QPen(m_extraForeground,1,Qt::DotLine));\n   // painter.drawLine(extraAreaWidth - 3, e->rect().top(), extraAreaWidth - 3, e->rect().bottom());\n    //painter.drawLine(e->rect().width()-1, e->rect().top(), e->rect().width()-1, e->rect().bottom());\n\n    QTextBlock block = firstVisibleBlock();\n    int blockNumber = block.blockNumber();\n    qreal top = blockBoundingGeometry(block).translated(contentOffset()).top();\n    qreal bottom = top;\n\n    painter.setPen(QPen(m_extraForeground,1));\n    while (block.isValid() && top <= e->rect().bottom()) {\n\n        top = bottom;\n        const qreal height = blockBoundingRect(block).height();\n        bottom = top + height;\n        QTextBlock nextBlock = block.next();\n\n        QTextBlock nextVisibleBlock = nextBlock;\n        int nextVisibleBlockNumber = blockNumber + 1;\n\n        if (!nextVisibleBlock.isVisible()) {\n            // invisible blocks do have zero line count\n            nextVisibleBlock = doc->findBlockByLineNumber(nextVisibleBlock.firstLineNumber());\n            nextVisibleBlockNumber = nextVisibleBlock.blockNumber();\n        }\n\n        if (bottom < e->rect().top()) {\n            block = nextVisibleBlock;\n            blockNumber = nextVisibleBlockNumber;\n            continue;\n        }\n\n        if (m_codeFoldingVisible || m_marksVisible) {\n            painter.save();\n            painter.setRenderHint(QPainter::Antialiasing, false);\n\n            int previousBraceDepth = block.previous().userState();\n            if (previousBraceDepth >= 0)\n                previousBraceDepth >>= 8;\n            else\n                previousBraceDepth = 0;\n\n            int braceDepth = block.userState();\n            if (!nextBlock.isVisible()) {\n                QTextBlock lastInvisibleBlock = nextVisibleBlock.previous();\n                if (!lastInvisibleBlock.isValid())\n                    lastInvisibleBlock = doc->lastBlock();\n                braceDepth = lastInvisibleBlock.userState();\n            }\n            if (braceDepth >= 0)\n                braceDepth >>= 8;\n            else\n                braceDepth = 0;\n\n            if (TextEditor::TextBlockUserData *userData = static_cast<TextEditor::TextBlockUserData*>(block.userData())) {\n                if (m_marksVisible) {\n                    int xoffset = 2;\n                    foreach (TextEditor::ITextMark *mrk, userData->marks()) {\n                        int radius = fmLineSpacing - 1;\n                        QRect r(xoffset*mrk->indexOfType(), top, radius, radius);\n                        mrk->paint(&painter, r);\n                    }\n                }\n            }\n\n            if (m_codeFoldingVisible) {\n                TextEditor::TextBlockUserData *nextBlockUserData = TextEditor::BaseTextDocumentLayout::testUserData(nextBlock);\n\n                bool drawBox = nextBlockUserData\n                               && TextEditor::BaseTextDocumentLayout::foldingIndent(block) < nextBlockUserData->foldingIndent();\n\n                int boxWidth = foldBoxWidth(fm)+1;\n                if (drawBox) {\n                    bool expanded = nextBlock.isVisible();\n                    QRect box(extraAreaWidth-2, top + (fm.lineSpacing()-boxWidth)/2,\n                              boxWidth-1,boxWidth-1);\n                    drawFoldingMarker(&painter, pal, box, expanded);\n                }\n            }\n\n            painter.restore();\n        }\n\n        if (block.revision() != m_lastSaveRevision) {\n            painter.save();\n            painter.setRenderHint(QPainter::Antialiasing, false);\n            if (block.revision() < 0)\n                painter.setPen(QPen(Qt::darkGreen, 2));\n            else\n                painter.setPen(QPen(Qt::red, 2));\n            painter.drawLine(extraAreaWidth - 1, top, extraAreaWidth - 1, bottom - 1);\n            painter.restore();\n        }\n\n\n//        if (/*m_marksVisible &&*/ m_editorMark) {\n//            m_editorMark->paint(&painter,blockNumber,0,top,fmLineSpacing-0.5,fmLineSpacing-1);\n//        }\n        if (m_lineNumbersVisible) {\n\n            painter.setPen(QPen(m_extraForeground,2));//pal.color(QPalette::BrightText));\n            //int indent = TextEditor::BaseTextDocumentLayout::foldingIndent(block);\n            const QString &number = QString::number(blockNumber + 1);\n            //const QString &number2 = QString::number(indent);\n            bool selected = (\n                    (selStart < block.position() + block.length()\n                    && selEnd > block.position())\n                    || (selStart == selEnd && selStart == block.position())\n                    );            \n            if (selected) {\n                painter.save();\n                QFont f = painter.font();\n                f.setBold(true);\n                painter.setFont(f);\n                //painter.setPen(QPen(Qt::black,2));\n            }\n            painter.drawText(QRectF(markWidth, top, extraAreaWidth - markWidth - 4, height), Qt::AlignRight, number);\n            if (selected)\n                painter.restore();\n            painter.setPen(QPen(m_extraForeground,1));//pal.color(QPalette::BrightText));\n        }\n        block = nextVisibleBlock;\n        blockNumber = nextVisibleBlockNumber;\n    }\n\n}\n\nvoid LiteEditorWidgetBase::extraAreaMouseEvent(QMouseEvent *e)\n{\n    QTextCursor cursor = cursorForPosition(QPoint(0, e->pos().y()));\n    if (e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) {\n        if (e->button() == Qt::LeftButton) {\n            int boxWidth = foldBoxWidth(fontMetrics());\n            QTextBlock block = cursor.block();\n            bool canFold = TextEditor::BaseTextDocumentLayout::canFold(block);\n            if (m_codeFoldingVisible && canFold && e->pos().x() >= extraAreaWidth() - boxWidth-4) {\n                if (!cursor.block().next().isVisible()) {\n                    toggleBlockVisible(cursor.block());\n                    //moveCursorVisible(false);\n                } else {\n                    QTextBlock c = cursor.block();\n                    toggleBlockVisible(c);\n                    moveCursorVisible(false);\n                }\n            } else {\n                QTextCursor selection = cursor;\n                selection.setVisualNavigation(true);\n                m_extraAreaSelectionNumber = selection.blockNumber();\n                selection.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);\n                selection.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor);\n                setTextCursor(selection);\n            }\n        }\n    } else if (m_extraAreaSelectionNumber >= 0) {\n        QTextCursor selection = cursor;\n        selection.setVisualNavigation(true);\n        if (e->type() == QEvent::MouseMove) {\n            QTextBlock anchorBlock = document()->findBlockByNumber(m_extraAreaSelectionNumber);\n            selection.setPosition(anchorBlock.position());\n            if (cursor.blockNumber() < m_extraAreaSelectionNumber) {\n                selection.movePosition(QTextCursor::EndOfBlock);\n                selection.movePosition(QTextCursor::Right);\n            }\n            selection.setPosition(cursor.block().position(), QTextCursor::KeepAnchor);\n            if (cursor.blockNumber() >= m_extraAreaSelectionNumber) {\n                selection.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);\n                selection.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor);\n            }\n        } else {\n            m_extraAreaSelectionNumber = -1;\n            return;\n        }\n        setTextCursor(selection);\n    }\n}\n\nvoid LiteEditorWidgetBase::extraAreaLeaveEvent(QEvent *)\n{\n\n}\n\nint LiteEditorWidgetBase::navigateAreaWidth()\n{\n    return 16;\n#ifdef Q_OS_MAC\n    return qApp->style()->pixelMetric(QStyle::PM_ScrollBarExtent);\n#else\n    return 16;\n#endif\n}\n\nvoid LiteEditorWidgetBase::navigateAreaPaintEvent(QPaintEvent *e)\n{\n    QPalette pal = m_navigateArea->palette();\n    pal.setCurrentColorGroup(QPalette::Active);\n    QPainter painter(m_navigateArea);\n\n    //painter.fillRect(e->rect(), pal.color(QPalette::Base));\n    //painter.fillRect(e->rect().intersected(QRect(0, 0, m_navigateArea->width(), m_navigateArea->height())),\n    //                 m_extraBackground);\n    painter.fillRect(e->rect(),m_extraBackground);\n\n    int width = this->navigateAreaWidth();\n    painter.fillRect(2,2,width-4,width-4,m_navigateManager->headMarkColor());\n    int count = this->blockCount();\n    int height = this->viewport()->rect().height()-2*m_navigateArea->width();\n    QMapIterator<int,NavigateMark*> i(m_navigateManager->markMap);\n    while(i.hasNext()) {\n        i.next();\n        if (!i.value()->isEmpty()) {\n            int pos = i.key()*height*1.0/count;\n            //QColor markColor;\n            NavigateMark::Node *node;\n            const LiteApi::EditorNaviagteType * pList = MARKTYPE_PRIORITYLIST;\n            for (int j=0; j<PRIORITYLIST_LENGTH; j++) {\n                node = i.value()->findNode(pList[j]);\n                if (node) {\n                    painter.fillRect(2,width+pos,width-4,4,node->markColor());\n                    break;\n                }\n            }\n        }\n    }\n}\n\nNavigateMark* LiteEditorWidgetBase::findNavigateMarkByPos(const QPoint &pos, int *poffset, int *pLine)\n{\n    int count = this->blockCount();\n    int height = this->viewport()->rect().height()-2*m_navigateArea->width();\n    int width = m_navigateArea->width();\n    QMapIterator<int,NavigateMark*> i(m_navigateManager->markMap);\n    while(i.hasNext()) {\n        i.next();\n        if (!i.value()->isEmpty()) {\n            int offset = i.key()*height*1.0/count;\n            QRect rect(0,width+offset-1,width,4+1);\n            if (rect.contains(pos)) {\n                if (poffset) {\n                    *poffset = offset+width;\n                }\n                if (pLine) {\n                    *pLine = i.key();\n                }\n                return i.value();\n            }\n        }\n    }\n    return 0;\n}\n\n\nint LiteEditorWidgetBase::isInNavigateMark(const QPoint &pos, int *poffset)\n{\n    int count = this->blockCount();\n    int height = this->viewport()->rect().height()-2*m_navigateArea->width();\n    int width = m_navigateArea->width();\n    QMapIterator<int,NavigateMark*> i(m_navigateManager->markMap);\n    while(i.hasNext()) {\n        i.next();\n        if (!i.value()->isEmpty()) {\n            int offset = i.key()*height*1.0/count;\n            QRect rect(0,width+offset-1,width,4+1);\n            if (rect.contains(pos)) {\n                if (poffset) {\n                    *poffset = offset+width;\n                }\n                return i.key();\n            }\n        }\n    }\n    return -1;\n}\n\nbool LiteEditorWidgetBase::isInNavigateHead(const QPoint &pos)\n{\n    int width = m_navigateArea->width();\n    QRect rect(0,0,width,width);\n    if (rect.contains(pos)) {\n        return true;\n    }\n    return false;\n}\n\nstatic NavigateMark::Node *findMarkPriorityNode(NavigateMark *mark)\n{\n    const LiteApi::EditorNaviagteType * pList = MARKTYPE_PRIORITYLIST;\n    for (int j=0; j<PRIORITYLIST_LENGTH; j++) {\n        NavigateMark::Node *node = mark->findNode(pList[j]);\n        if (node) {\n            return node;\n        }\n    }\n    return 0;\n}\n\nvoid LiteEditorWidgetBase::navigateAreaMouseEvent(QMouseEvent *e)\n{\n    if (e->button() == Qt::LeftButton &&\n        (e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick)) {\n        int line = -1;\n        NavigateMark *mark = findNavigateMarkByPos(e->pos(),0,&line);\n        if (mark) {\n            NavigateMark::Node *node = findMarkPriorityNode(mark);\n            if (node) {\n                this->gotoLine(line,node->offset,true,node->selection);\n            }\n        }\n    } else if (e->type() == QEvent::MouseMove) {\n        bool tooltip = false;\n        if (isInNavigateHead(e->pos())) {\n            tooltip = true;\n            QPoint pos(1,1);\n            showTipText(m_navigateArea->mapToGlobal(pos),this->m_navigateManager->m_msg,this->m_navigateArea);\n        } else {\n            int offset = 0;\n            NavigateMark *mark = findNavigateMarkByPos(e->pos(),&offset,0);\n            if (mark) {\n                NavigateMark::Node *node = findMarkPriorityNode(mark);\n                if (node) {\n                    tooltip = true;\n                    QPoint pos(1,offset);\n                    showTipText(m_navigateArea->mapToGlobal(pos),node->msg,this->m_navigateArea);\n                }\n            }\n        }\n        if (!tooltip) {\n            hideTipText();\n        }\n    }\n}\n\nvoid LiteEditorWidgetBase::navigateAreaLeaveEvent(QEvent */*e*/)\n{\n}\n\nvoid LiteEditorWidgetBase::navigateAreaEnterEvent(QEvent */*e*/)\n{\n}\n\nvoid LiteEditorWidgetBase::resizeEvent(QResizeEvent *e)\n{\n    QPlainTextEdit::resizeEvent(e);\n    QRect cr = contentsRect();\n    m_extraArea->setGeometry(\n                QStyle::visualRect(layoutDirection(), cr,\n                                   QRect(cr.left(), cr.top(), extraAreaWidth(), cr.height())));\n    m_navigateArea->setGeometry(\n                QStyle::visualRect(layoutDirection(), cr,\n                                   QRect(cr.left()+extraAreaWidth()+viewport()->rect().width(), cr.top(), navigateAreaWidth(), cr.height())));\n    m_navigateArea->update();\n}\n\n\nvoid LiteEditorWidgetBase::slotUpdateExtraAreaWidth()\n{\n    if (isLeftToRight())\n        setViewportMargins(extraAreaWidth(), 0, navigateAreaWidth(), 0);\n    else\n        setViewportMargins(navigateAreaWidth(), 0, extraAreaWidth(), 0);\n}\n\nvoid LiteEditorWidgetBase::slotModificationChanged(bool m)\n{\n    if (m)\n        return;\n\n    int oldLastSaveRevision = m_lastSaveRevision;\n    m_lastSaveRevision = document()->revision();\n\n    if (oldLastSaveRevision != m_lastSaveRevision) {\n        QTextBlock block = document()->begin();\n        while (block.isValid()) {\n            if (block.revision() < 0 || block.revision() != oldLastSaveRevision) {\n                block.setRevision(-m_lastSaveRevision - 1);\n            } else {\n                block.setRevision(m_lastSaveRevision);\n            }\n            block = block.next();\n        }\n    }\n    m_extraArea->update();\n}\n\nvoid LiteEditorWidgetBase::slotUpdateRequest(const QRect &r, int dy)\n{\n    if (dy)\n        m_extraArea->scroll(0, dy);\n    else if (r.width() > 4) { // wider than cursor width, not just cursor blinking\n        m_extraArea->update(0, r.y(), m_extraArea->width(), r.height());\n        //if (!d->m_searchExpr.isEmpty()) {\n        //    const int m = d->m_searchResultOverlay->dropShadowWidth();\n        //    viewport()->update(r.adjusted(-m, -m, m, m));\n        //}\n    }\n    if (r.contains(viewport()->rect()))\n        slotUpdateExtraAreaWidth();\n}\n\nstatic bool convertPosition(const QTextDocument *document, int pos, int *line, int *column)\n{\n    QTextBlock block = document->findBlock(pos);\n    if (!block.isValid()) {\n        (*line) = -1;\n        (*column) = -1;\n        return false;\n    } else {\n        (*line) = block.blockNumber() + 1;\n        (*column) = pos - block.position();\n        return true;\n    }\n}\n\nQByteArray LiteEditorWidgetBase::saveState() const\n{\n    QByteArray state;\n    QDataStream stream(&state, QIODevice::WriteOnly);\n    stream << 2; // version number\n    stream << verticalScrollBar()->value();\n    stream << horizontalScrollBar()->value();\n    int line, column;\n    convertPosition(document(),textCursor().position(), &line, &column);\n    stream << line-1;\n    stream << column;\n\n    // store code folding state\n    QList<int> foldedBlocks;\n    QTextBlock block = document()->firstBlock();\n    while (block.isValid()) {\n        if (block.userData() && static_cast<TextEditor::TextBlockUserData*>(block.userData())->folded()) {\n            int number = block.blockNumber();\n            foldedBlocks += number;\n        }\n        block = block.next();\n    }\n    stream << foldedBlocks;\n\n    return state;\n}\n\nvoid LiteEditorWidgetBase::verticalScrollBarRangeChanged(int minnum, int /*maxnum*/)\n{\n    if (!m_allowVscrollLastLine) {\n        return;\n    }\n    QScrollBar *bar = this->verticalScrollBar();\n    bar->blockSignals(true);\n    int h = this->document()->size().height();\n    if (h > 1) {\n        h--;\n    }\n    bar->setMaximum(minnum+h);\n    bar->blockSignals(false);\n}\n\n\nvoid LiteEditorWidgetBase::setAllowVscrollLastLine(bool b) {\n    m_allowVscrollLastLine = b;\n}\n\nbool LiteEditorWidgetBase::restoreState(const QByteArray &state)\n{\n    if (state.isEmpty()) {\n        return false;\n    }\n    int version;\n    int vval;\n    int hval;\n    int lval;\n    int cval;\n    QDataStream stream(state);\n    stream >> version;\n    stream >> vval;\n    stream >> hval;\n    stream >> lval;\n    stream >> cval;\n\n    if (version >= 1) {\n        QList<int> collapsedBlocks;\n        stream >> collapsedBlocks;\n        QTextDocument *doc = document();\n        foreach(int blockNumber, collapsedBlocks) {\n            QTextBlock block = doc->findBlockByNumber(qMax(0, blockNumber));\n            if (block.isValid())\n                TextEditor::BaseTextDocumentLayout::doFoldOrUnfold(block, false);\n        }\n        if (!collapsedBlocks.empty()) {\n            this->update();\n        }\n    }\n\n    m_lastCursorChangeWasInteresting = false; // avoid adding last position to history\n\n    gotoLine(lval, cval,false);\n    verticalScrollBar()->setValue(vval);\n    horizontalScrollBar()->setValue(hval);\n    saveCurrentCursorPositionForNavigation();\n\n    return true;\n}\n\nvoid LiteEditorWidgetBase::saveCurrentCursorPositionForNavigation()\n{\n    m_lastCursorChangeWasInteresting = true;\n    m_tempNavigationState = saveState();\n}\n\nvoid LiteEditorWidgetBase::slotCursorPositionChanged()\n{\n    if (m_lastCursorChangeWasInteresting) {\n        //navigate change\n        int lastLine = this->textCursor().blockNumber();\n        if (lastLine != m_lastLine) {\n            m_lastLine = lastLine;\n            emit navigationStateChanged(m_tempNavigationState);\n            m_lastCursorChangeWasInteresting = false;\n        }\n    } else {\n        this->saveCurrentCursorPositionForNavigation();\n    }\n    //emit navigationStateChanged(saveState());\n    /*\n    if (!m_contentsChanged && m_lastCursorChangeWasInteresting) {\n        //navigate change\n        emit navigationStateChanged(m_tempNavigationState);\n        m_lastCursorChangeWasInteresting = false;\n    } else if (m_contentsChanged) {\n        this->saveCurrentCursorPositionForNavigation();\n    }\n    */\n    highlightCurrentLine();\n}\n\nvoid LiteEditorWidgetBase::slotSelectionChanged()\n{\n    QString pattern;\n    QTextCursor cur = this->textCursor();\n\n    if (cur.hasSelection()) {\n        m_lastCursorChangeWasInteresting = false;\n        QString text = cur.selectedText();\n        cur.setPosition(cur.selectionStart());\n        cur.select(QTextCursor::WordUnderCursor);\n        if (text == cur.selectedText() && isIdentifierChar(*text.begin())) {\n            pattern = text;\n        }\n    }\n\n    if (m_selectionExpression.pattern() != pattern) {\n        m_selectionExpression.setPattern(pattern);\n        updateFindOrSelectionMark(LiteApi::EditorNavigateSelection);\n        viewport()->update();\n    }\n\n    if (m_inBlockSelectionMode && !textCursor().hasSelection()) {\n        m_inBlockSelectionMode = false;\n        m_blockSelection.clear();\n        viewport()->update();\n    }\n    //clearLink();\n}\n\nvoid LiteEditorWidgetBase::slotUpdateBlockNotify(const QTextBlock &)\n{\n\n}\n\nvoid LiteEditorWidgetBase::maybeSelectLine()\n{\n    QTextCursor cursor = textCursor();\n    if (!cursor.hasSelection()) {\n        const QTextBlock &block = cursor.block();\n        if (block.next().isValid()) {\n            cursor.setPosition(block.position());\n            cursor.setPosition(block.next().position(), QTextCursor::KeepAnchor);\n        } else {\n            cursor.movePosition(QTextCursor::EndOfBlock);\n            cursor.movePosition(QTextCursor::StartOfBlock, QTextCursor::KeepAnchor);\n            cursor.movePosition(QTextCursor::PreviousCharacter, QTextCursor::KeepAnchor);\n        }\n        setTextCursor(cursor);\n    }\n}\n\nvoid LiteEditorWidgetBase::gotoLine(int blockNumber, int column, bool center, int selection)\n{\n    m_lastCursorChangeWasInteresting = false;\n    const QTextBlock &block = document()->findBlockByNumber(blockNumber);\n    if (block.isValid()) {\n        QTextCursor cursor(block);\n        int length = block.text().length();\n        if (column <= length) {\n            cursor.movePosition(QTextCursor::Right,QTextCursor::MoveAnchor,column);\n            if ( (selection > 0) && ( (column+selection) <= length) ) {\n                cursor.movePosition(QTextCursor::Right,QTextCursor::KeepAnchor,selection);\n            }\n        }\n//        if (column) {\n//            if (column <= length) {\n//                cursor.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, column > length ? length : column);\n//                if (selection && ( (column+selection) <= length ) ) {\n//                    cursor.movePosition(QTextCursor::Right,QTextCursor::KeepAnchor, selection);\n//                }\n//            } else {\n//                cursor.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, length);\n//            }\n//        } else {\n//            int pos = cursor.position();\n//            while (document()->characterAt(pos).category() == QChar::Separator_Space) {\n//                ++pos;\n//            }\n//            cursor.setPosition(pos);\n//        }\n        setTextCursor(cursor);\n        if (center) {\n            centerCursor();\n        } else {\n            ensureCursorVisible();\n        }\n    }\n}\n\nQChar LiteEditorWidgetBase::characterAt(int pos) const\n{\n    return document()->characterAt(pos);\n}\nvoid LiteEditorWidgetBase::handleHomeKey(bool anchor)\n{\n    QTextCursor cursor = textCursor();\n    QTextCursor::MoveMode mode = QTextCursor::MoveAnchor;\n\n    if (anchor)\n        mode = QTextCursor::KeepAnchor;\n\n    const int initpos = cursor.position();\n    int pos = cursor.block().position();\n    QChar character = characterAt(pos);\n    const QLatin1Char tab = QLatin1Char('\\t');\n\n    while (character == tab || character.category() == QChar::Separator_Space) {\n        ++pos;\n        if (pos == initpos)\n            break;\n        character = characterAt(pos);\n    }\n\n    // Go to the start of the block when we're already at the start of the text\n    if (pos == initpos)\n        pos = cursor.block().position();\n\n    cursor.setPosition(pos, mode);\n    setTextCursor(cursor);\n}\n\nvoid LiteEditorWidgetBase::setFindOption(LiteApi::FindOption *opt)\n{\n    if (!opt) {\n        m_findExpression.setPattern(\"\");\n    } else {\n        m_findExpression.setPattern(opt->findText);\n        if (opt->useRegexp) {\n            m_findExpression.setPatternSyntax(QRegExp::RegExp);\n        } else {\n            m_findExpression.setPatternSyntax(QRegExp::FixedString);\n        }\n        m_findFlags = 0;\n        if (opt->backWard) {\n            m_findFlags |= QTextDocument::FindBackward;\n        }\n\n        if (opt->matchCase) {\n            m_findFlags |= QTextDocument::FindCaseSensitively;\n            m_findExpression.setCaseSensitivity(Qt::CaseSensitive);\n        } else {\n            m_findExpression.setCaseSensitivity(Qt::CaseInsensitive);\n        }\n        if (opt->matchWord) {\n            m_findFlags |= QTextDocument::FindWholeWords;\n        }\n        if (!m_findExpression.isValid()) {\n            m_findExpression.setPattern(\"\");\n        }\n    }\n    updateFindOrSelectionMark(LiteApi::EditorNavigateFind);\n    if (!m_selectionExpression.isEmpty()) {\n        updateFindOrSelectionMark(LiteApi::EditorNavigateSelection);\n    }\n    viewport()->update();\n}\n\nvoid LiteEditorWidgetBase::setLineWrap(bool wrap)\n{\n    setLineWrapMode(wrap ? QPlainTextEdit::WidgetWidth : QPlainTextEdit::NoWrap);\n}\n\nbool LiteEditorWidgetBase::isLineWrap() const\n{\n    return this->lineWrapMode() != QPlainTextEdit::NoWrap;\n}\n\nvoid LiteEditorWidgetBase::gotoLineStart()\n{\n    handleHomeKey(false);\n}\n\nvoid LiteEditorWidgetBase::gotoLineStartWithSelection()\n{\n    handleHomeKey(true);\n}\n\nvoid LiteEditorWidgetBase::gotoLineEnd()\n{\n    moveCursor(QTextCursor::EndOfLine);\n}\n\nvoid LiteEditorWidgetBase::gotoLineEndWithSelection()\n{\n    moveCursor(QTextCursor::EndOfLine, QTextCursor::KeepAnchor);\n}\n\nvoid LiteEditorWidgetBase::gotoNextLine()\n{\n    moveCursor(QTextCursor::Down);\n}\n\nvoid LiteEditorWidgetBase::gotoNextLineWithSelection()\n{\n    moveCursor(QTextCursor::Down, QTextCursor::KeepAnchor);\n}\n\nvoid LiteEditorWidgetBase::gotoPreviousLine()\n{\n    moveCursor(QTextCursor::Up);\n}\n\nvoid LiteEditorWidgetBase::gotoPreviousLineWithSelection()\n{\n    moveCursor(QTextCursor::Up, QTextCursor::KeepAnchor);\n}\n\nvoid LiteEditorWidgetBase::gotoPreviousCharacter()\n{\n    moveCursor(QTextCursor::PreviousCharacter);\n}\n\nvoid LiteEditorWidgetBase::gotoPreviousCharacterWithSelection()\n{\n    moveCursor(QTextCursor::PreviousCharacter, QTextCursor::KeepAnchor);\n}\n\nvoid LiteEditorWidgetBase::gotoNextCharacter()\n{\n    moveCursor(QTextCursor::NextCharacter);\n}\n\nvoid LiteEditorWidgetBase::gotoNextCharacterWithSelection()\n{\n    moveCursor(QTextCursor::NextCharacter, QTextCursor::KeepAnchor);\n}\n\nvoid LiteEditorWidgetBase::gotoPreviousWord()\n{\n    moveCursor(QTextCursor::PreviousWord);\n    setTextCursor(textCursor());\n}\n\nvoid LiteEditorWidgetBase::gotoPreviousWordWithSelection()\n{\n    moveCursor(QTextCursor::PreviousWord, QTextCursor::KeepAnchor);\n    setTextCursor(textCursor());\n}\n\nvoid LiteEditorWidgetBase::gotoNextWord()\n{\n    moveCursor(QTextCursor::NextWord);\n    setTextCursor(textCursor());\n}\n\nvoid LiteEditorWidgetBase::gotoNextWordWithSelection()\n{\n    moveCursor(QTextCursor::NextWord, QTextCursor::KeepAnchor);\n    setTextCursor(textCursor());\n}\n\nvoid LiteEditorWidgetBase::gotoDocStart()\n{\n    moveCursor(QTextCursor::Start);\n}\n\nvoid LiteEditorWidgetBase::gotoDocEnd()\n{\n    moveCursor(QTextCursor::End);\n}\n\nvoid LiteEditorWidgetBase::duplicate()\n{\n    QTextCursor cursor = textCursor();\n    cursor.beginEditBlock();\n    if (cursor.hasSelection()) {\n        QString text = cursor.selectedText();\n        int start = cursor.selectionStart();\n        int end = cursor.selectionEnd();\n        cursor.setPosition(end);\n        cursor.insertText(text);\n        cursor.setPosition(start,QTextCursor::MoveAnchor);\n        cursor.setPosition(end,QTextCursor::KeepAnchor);\n    } else {\n        int pos = cursor.positionInBlock();\n        cursor.movePosition(QTextCursor::StartOfBlock);\n        cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);\n        QString text = cursor.selectedText();\n        cursor.movePosition(QTextCursor::EndOfBlock);\n        cursor.insertBlock();\n        int start = cursor.position();\n        cursor.insertText(text);\n        cursor.setPosition(start);\n        cursor.movePosition(QTextCursor::Right,QTextCursor::MoveAnchor,pos);\n    }\n    cursor.endEditBlock();\n    setTextCursor(cursor);\n}\n\n// shift+del\nvoid LiteEditorWidgetBase::cutLine()\n{\n    maybeSelectLine();\n    QPlainTextEdit::cut();\n}\n\n// ctrl+ins\nvoid LiteEditorWidgetBase::copyLine()\n{\n    QTextCursor prevCursor = textCursor();\n    maybeSelectLine();\n    copy();\n    setTextCursor(prevCursor);\n}\n\nvoid LiteEditorWidgetBase::deleteLine()\n{\n    maybeSelectLine();\n    textCursor().removeSelectedText();\n}\n\nvoid LiteEditorWidgetBase::deleteEndOfWord()\n{\n    moveCursor(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);\n    textCursor().removeSelectedText();\n    setTextCursor(textCursor());\n}\n\nvoid LiteEditorWidgetBase::moveLineUpDown(bool up)\n{\n    QTextCursor cursor = textCursor();\n    QTextCursor move = cursor;\n\n    move.setVisualNavigation(false); // this opens folded items instead of destroying them\n\n    if (m_moveLineUndoHack)\n        move.joinPreviousEditBlock();\n    else\n        move.beginEditBlock();\n\n    bool hasSelection = cursor.hasSelection();\n\n    if (hasSelection) {\n        move.setPosition(cursor.selectionStart());\n        move.movePosition(QTextCursor::StartOfBlock);\n        move.setPosition(cursor.selectionEnd(), QTextCursor::KeepAnchor);\n        move.movePosition(move.atBlockStart() ? QTextCursor::Left: QTextCursor::EndOfBlock,\n                          QTextCursor::KeepAnchor);\n    } else {\n        move.movePosition(QTextCursor::StartOfBlock);\n        move.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);\n    }\n    QString text = move.selectedText();\n\n    move.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor);\n    move.removeSelectedText();\n\n    if (up) {\n        move.movePosition(QTextCursor::PreviousBlock);\n        move.insertBlock();\n        move.movePosition(QTextCursor::Left);\n    } else {\n        move.movePosition(QTextCursor::EndOfBlock);\n        if (move.atBlockStart()) { // empty block\n            move.movePosition(QTextCursor::NextBlock);\n            move.insertBlock();\n            move.movePosition(QTextCursor::Left);\n        } else {\n            move.insertBlock();\n        }\n    }\n\n    int start = move.position();\n    move.clearSelection();\n    move.insertText(text);\n    int end = move.position();\n\n    if (hasSelection) {\n        move.setPosition(end);\n        move.setPosition(start, QTextCursor::KeepAnchor);\n    } else {\n        move.setPosition(start);\n    }\n\n    move.endEditBlock();\n\n    setTextCursor(move);\n    m_moveLineUndoHack = true;\n}\n\nvoid LiteEditorWidgetBase::copyLineUpDown(bool up)\n{\n    QTextCursor cursor = textCursor();\n    QTextCursor move = cursor;\n    move.beginEditBlock();\n\n    bool hasSelection = cursor.hasSelection();\n\n    if (hasSelection) {\n        move.setPosition(cursor.selectionStart());\n        move.movePosition(QTextCursor::StartOfBlock);\n        move.setPosition(cursor.selectionEnd(), QTextCursor::KeepAnchor);\n        move.movePosition(move.atBlockStart() ? QTextCursor::Left: QTextCursor::EndOfBlock,\n                          QTextCursor::KeepAnchor);\n    } else {\n        move.movePosition(QTextCursor::StartOfBlock);\n        move.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);\n    }\n\n    QString text = move.selectedText();\n\n    if (up) {\n        move.setPosition(cursor.selectionStart());\n        move.movePosition(QTextCursor::StartOfBlock);\n        move.insertBlock();\n        move.movePosition(QTextCursor::Left);\n    } else {\n        move.movePosition(QTextCursor::EndOfBlock);\n        if (move.atBlockStart()) {\n            move.movePosition(QTextCursor::NextBlock);\n            move.insertBlock();\n            move.movePosition(QTextCursor::Left);\n        } else {\n            move.insertBlock();\n        }\n    }\n\n    int start = move.position();\n    move.clearSelection();\n    move.insertText(text);\n    int end = move.position();\n\n    move.setPosition(start);\n    move.setPosition(end, QTextCursor::KeepAnchor);\n\n    move.endEditBlock();\n\n    setTextCursor(move);\n}\n\nvoid LiteEditorWidgetBase::joinLines()\n{\n    QTextCursor cursor = textCursor();\n    QTextCursor start = cursor;\n    QTextCursor end = cursor;\n\n    start.setPosition(cursor.selectionStart());\n    end.setPosition(cursor.selectionEnd() - 1);\n\n    int lineCount = qMax(1, end.blockNumber() - start.blockNumber());\n\n    cursor.beginEditBlock();\n    cursor.setPosition(cursor.selectionStart());\n    while (lineCount--) {\n        cursor.movePosition(QTextCursor::NextBlock);\n        cursor.movePosition(QTextCursor::StartOfBlock);\n        cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);\n        QString cutLine = cursor.selectedText();\n\n        // Collapse leading whitespaces to one or insert whitespace\n        cutLine.replace(QRegExp(QLatin1String(\"^\\\\s*\")), QLatin1String(\" \"));\n        cursor.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor);\n        cursor.removeSelectedText();\n\n        cursor.movePosition(QTextCursor::PreviousBlock);\n        cursor.movePosition(QTextCursor::EndOfBlock);\n\n        cursor.insertText(cutLine);\n    }\n    cursor.endEditBlock();\n\n    setTextCursor(cursor);\n}\n\nvoid LiteEditorWidgetBase::deleteStartOfWord()\n{\n    moveCursor(QTextCursor::StartOfWord, QTextCursor::KeepAnchor);\n    textCursor().removeSelectedText();\n    setTextCursor(textCursor());\n}\n\nvoid LiteEditorWidgetBase::moveLineUp()\n{\n    moveLineUpDown(true);\n}\n\nvoid LiteEditorWidgetBase::moveLineDown()\n{\n    moveLineUpDown(false);\n}\n\nvoid LiteEditorWidgetBase::copyLineUp()\n{\n    copyLineUpDown(true);\n}\n\nvoid LiteEditorWidgetBase::copyLineDown()\n{\n    copyLineUpDown(false);\n}\n\nvoid LiteEditorWidgetBase::insertLineBefore()\n{\n    QTextCursor cur = this->textCursor();\n    cur.movePosition(QTextCursor::PreviousBlock);\n    cur.movePosition(QTextCursor::EndOfLine);\n\n    if (m_autoIndent) {\n        indentEnter(cur);\n    } else {\n        cur.insertText(\"\\n\");\n    }\n\n    this->setTextCursor(cur);\n}\n\nvoid LiteEditorWidgetBase::insertLineAfter()\n{\n    QTextCursor cur = this->textCursor();\n    cur.movePosition(QTextCursor::EndOfLine);\n    if (m_autoIndent) {\n        indentEnter(cur);\n    } else {\n        cur.insertText(\"\\n\");\n    }\n    this->setTextCursor(cur);\n}\n\nbool LiteEditorWidgetBase::findPrevBlock(QTextCursor &cursor, int indent, const QString &skip) const\n{\n    QTextBlock block = cursor.block().previous();\n    while(block.isValid()) {\n        TextEditor::TextBlockUserData *data = TextEditor::BaseTextDocumentLayout::testUserData(block);\n        if (data && data->foldingIndent() == indent) {\n            QString text = block.text().trimmed();\n            if (text.isEmpty() || text.startsWith(skip)) {\n                block = block.previous();\n                continue;\n            }\n            cursor.setPosition(block.position());\n            return true;\n        }\n        block = block.previous();\n    }\n    return false;\n}\n\nbool LiteEditorWidgetBase::findStartBlock(QTextCursor &cursor, int indent) const\n{\n    QTextBlock block = cursor.block();\n    while(block.isValid()) {\n        TextEditor::TextBlockUserData *data = TextEditor::BaseTextDocumentLayout::testUserData(block);\n        if (data && data->foldingIndent() == indent) {\n            cursor.setPosition(block.position());\n            return true;\n        }\n        block = block.previous();\n    }\n    return false;\n}\n\n\nbool LiteEditorWidgetBase::findEndBlock(QTextCursor &cursor, int indent) const\n{\n    QTextBlock block = cursor.block().next();\n    while(block.isValid()) {\n        TextEditor::TextBlockUserData *data = TextEditor::BaseTextDocumentLayout::testUserData(block);\n        if (data && data->foldingIndent() == indent) {\n            cursor.setPosition(block.previous().position());\n            return true;\n        }\n        block = block.next();\n    }\n    return false;\n}\n\nbool LiteEditorWidgetBase::findNextBlock(QTextCursor &cursor, int indent, const QString &skip) const\n{\n    QTextBlock block = cursor.block().next();\n    while(block.isValid()) {\n        TextEditor::TextBlockUserData *data = TextEditor::BaseTextDocumentLayout::testUserData(block);\n        if (data && data->foldingIndent() == indent) {\n            QString text = block.text().trimmed();\n            if (text.isEmpty() || text.startsWith(skip)) {\n                block = block.next();\n                continue;\n            }\n            cursor.setPosition(block.position());\n            return true;\n        }\n        block = block.next();\n    }\n    return false;\n}\n\n\nvoid LiteEditorWidgetBase::gotoPrevBlock()\n{\n    QTextCursor cursor = this->textCursor();\n    if (!findPrevBlock(cursor,0)) {\n        cursor.movePosition(QTextCursor::Start);\n    }\n    this->setTextCursor(cursor);\n}\n\nvoid LiteEditorWidgetBase::gotoNextBlock()\n{\n    QTextCursor cursor = this->textCursor();\n    if (!findNextBlock(cursor,0)) {\n        cursor.movePosition(QTextCursor::End);\n    }\n    this->setTextCursor(cursor);\n}\n\nvoid LiteEditorWidgetBase::selectBlock()\n{\n    QTextCursor cursor = this->textCursor();\n    if (!findStartBlock(cursor,0)) {\n        return;\n    }\n    QTextCursor end = this->textCursor();\n    if (!findEndBlock(end,0)) {\n        return;\n    }\n    cursor.setPosition(end.position()+end.block().length()-1,QTextCursor::KeepAnchor);\n    this->setTextCursor(cursor);\n}\n\nbool LiteEditorWidgetBase::event(QEvent *e)\n{\n    m_contentsChanged = false;\n    return QPlainTextEdit::event(e);\n}\n\nQString LiteEditorWidgetBase::autoCompleteSurroundText(QTextCursor &cursor, const QString &textToInsert) const\n{\n    if (textToInsert == QLatin1String(\"(\"))\n        return cursor.selectedText() + QLatin1Char(')');\n    if (textToInsert == QLatin1String(\"{\")) {\n        //If the text span multiple lines, insert on different lines\n        QString str = cursor.selectedText();\n        if (str.contains(QChar::ParagraphSeparator)) {\n            //Also, try to simulate auto-indent\n            str = (str.startsWith(QChar::ParagraphSeparator) ? QString() : QString(QChar::ParagraphSeparator)) +\n                  str;\n            if (str.endsWith(QChar::ParagraphSeparator))\n                str += QLatin1Char('}') + QString(QChar::ParagraphSeparator);\n            else\n                str += QString(QChar::ParagraphSeparator) + QLatin1Char('}');\n        } else {\n            str += QLatin1Char('}');\n        }\n        return str;\n    }\n    if (textToInsert == QLatin1String(\"[\"))\n        return cursor.selectedText() + QLatin1Char(']');\n    if (textToInsert == QLatin1String(\"\\\"\"))\n        return cursor.selectedText() + QLatin1Char('\"');\n    if (textToInsert == QLatin1String(\"'\"))\n        return cursor.selectedText() + QLatin1Char('\\'');\n    return \"\";\n}\n\nstatic void countBracket(QChar open, QChar close, QChar c, int *errors, int *stillopen)\n{\n    if (c == open)\n        ++*stillopen;\n    else if (c == close)\n        --*stillopen;\n\n    if (*stillopen < 0) {\n        *errors += -1 * (*stillopen);\n        *stillopen = 0;\n    }\n}\n\nstatic void countBrackets(QTextCursor cursor,\n                          int from,\n                          int end,\n                          QChar open,\n                          QChar close,\n                          int *errors,\n                          int *stillopen)\n{\n    cursor.setPosition(from);\n    QTextBlock block = cursor.block();\n    while (block.isValid() && block.position() < end) {\n        TextEditor::Parentheses parenList = TextEditor::BaseTextDocumentLayout::parentheses(block);\n        if (!parenList.isEmpty() && !TextEditor::BaseTextDocumentLayout::ifdefedOut(block)) {\n            for (int i = 0; i < parenList.count(); ++i) {\n                TextEditor::Parenthesis paren = parenList.at(i);\n                int position = block.position() + paren.pos;\n                if (position < from || position >= end)\n                    continue;\n                countBracket(open, close, paren.chr, errors, stillopen);\n            }\n        }\n        block = block.next();\n    }\n}\n\n\nbool LiteEditorWidgetBase::checkIsMatchBraces(QTextCursor &cursor, const QString &textToInsert) const\n{\n    const QChar character = textToInsert.at(0);\n    const QString parentheses1 = QLatin1String(\"()\");\n    const QString parentheses2 = QLatin1String(\"[]\");\n    const QString parentheses3 = QLatin1String(\"{}\");\n    if (parentheses1.contains(character) ||\n            parentheses2.contains(character) ||\n            parentheses3.contains(character) ) {\n        QTextCursor tmp= cursor;\n        bool foundBlockStart = TextEditor::TextBlockUserData::findPreviousBlockOpenParenthesis(&tmp);\n        int blockStart = foundBlockStart ? tmp.position() : 0;\n        tmp = cursor;\n        bool foundBlockEnd = TextEditor::TextBlockUserData::findNextBlockClosingParenthesis(&tmp);\n        int blockEnd = foundBlockEnd ? tmp.position() : (cursor.document()->characterCount() - 1);\n        QChar openChar;\n        QChar closeChar;\n        if (parentheses1.contains(character)) {\n            openChar = QLatin1Char('(');\n            closeChar = QLatin1Char(')');\n        } else {\n            if (parentheses2.contains(character)) {\n                openChar = QLatin1Char('[');\n                closeChar = QLatin1Char(']');\n            } else if (parentheses3.contains(character)) {\n                openChar = QLatin1Char('{');\n                closeChar = QLatin1Char('}');\n            }\n            if (cursor.document()->blockCount() < 5000) {\n                blockStart = 0;\n                blockEnd = cursor.document()->characterCount()-1;\n            } else {\n                blockStart = cursor.block().position();\n                blockEnd = cursor.block().position()+cursor.block().length();\n            }\n        }\n        int errors = 0;\n        int stillopen = 0;\n        countBrackets(cursor, blockStart, blockEnd, openChar, closeChar, &errors, &stillopen);\n        int errorsBeforeInsertion = errors + stillopen;\n        errors = 0;\n        stillopen = 0;\n        countBrackets(cursor, blockStart, cursor.position(), openChar, closeChar, &errors, &stillopen);\n        countBracket(openChar, closeChar, character, &errors, &stillopen);\n        countBrackets(cursor, cursor.position(), blockEnd, openChar, closeChar, &errors, &stillopen);\n        int errorsAfterInsertion = errors + stillopen;\n        if (errorsAfterInsertion < errorsBeforeInsertion)\n            return false; // insertion fixes parentheses or bracket errors, do not auto complete\n    }\n    return true;\n}\n\nbool LiteEditorWidgetBase::autoBackspace(QTextCursor &cursor)\n{\n    int pos = cursor.position();\n    if (pos == 0)\n        return false;\n\n    if (this->m_textLexer->isInComment(cursor)) {\n        return false;\n    }\n\n//    QTextCursor c = cursor;\n//    c.setPosition(pos - 1);\n\n    QTextDocument *doc = cursor.document();\n    const QChar lookAhead = doc->characterAt(pos);\n    const QChar lookBehind = doc->characterAt(pos - 1);\n\n\n//    const QChar lookFurtherBehind = doc->characterAt(pos - 2);\n\n    if ( (lookBehind == QLatin1Char('(') && lookAhead == QLatin1Char(')')) ||\n         (lookBehind == QLatin1Char('[') && lookAhead == QLatin1Char(']')) ||\n         (lookBehind == QLatin1Char('{') && lookAhead == QLatin1Char('}')) ) {\n        if (m_textLexer->isInString(cursor)) {\n            return false;\n        }\n    } else if ( (lookBehind == QLatin1Char('\\\"') && lookAhead == QLatin1Char('\\\"')) ||\n               (lookBehind == QLatin1Char('\\'') && lookAhead == QLatin1Char('\\'')) ||\n                (lookBehind == QLatin1Char('`') && lookAhead == QLatin1Char('`'))) {\n\n        if (!this->m_bLastBraces) {\n            int bpos = cursor.positionInBlock();\n            if (bpos > 1) {\n                if (bpos >= 2) {\n                    QChar ch = doc->characterAt(pos-2);\n                    if (ch.isLetterOrNumber()) {\n                        return false;\n                    }\n                }\n            }\n        }\n        if (!this->m_textLexer->isLangSupport()) {\n            return false;\n        }\n        if (!this->m_textLexer->stringQuoteList().contains(lookAhead)) {\n            return false;\n        }\n        if(!m_textLexer->isInEmptyString(cursor)) {\n             return false;\n        }\n    } else {\n        return false;\n    }\n\n    const QChar character = lookBehind;\n    if (character == QLatin1Char('(') ||\n            character == QLatin1Char('[') ||\n            character == QLatin1Char('{') ) {\n\n        QTextCursor tmp = cursor;\n        TextEditor::TextBlockUserData::findPreviousBlockOpenParenthesis(&tmp);\n        int blockStart = tmp.isNull() ? 0 : tmp.position();\n        tmp = cursor;\n        TextEditor::TextBlockUserData::findNextBlockClosingParenthesis(&tmp);\n        int blockEnd = tmp.isNull() ? (cursor.document()->characterCount()-1) : tmp.position();\n        QChar openChar = character;\n        QChar closeChar;\n        if (openChar == QLatin1Char('(')) {\n            closeChar = ')';\n        } else  {\n            if (openChar == QLatin1Char('[')) {\n                closeChar = ']';\n            } else {\n                closeChar = '}';\n            }\n            if (cursor.document()->blockCount() < 5000) {\n                blockStart = 0;\n                blockEnd = cursor.document()->characterCount()-1;\n            } else {\n                blockStart = cursor.block().position();\n                blockEnd = cursor.block().position()+cursor.block().length();\n            }\n        }\n\n        int errors = 0;\n        int stillopen = 0;\n        countBrackets(cursor, blockStart, blockEnd, openChar, closeChar, &errors, &stillopen);\n        int errorsBeforeDeletion = errors + stillopen;\n        errors = 0;\n        stillopen = 0;\n        countBrackets(cursor, blockStart, pos - 1, openChar, closeChar, &errors, &stillopen);\n        countBrackets(cursor, pos, blockEnd, openChar, closeChar, &errors, &stillopen);\n        int errorsAfterDeletion = errors + stillopen;\n        if (errorsAfterDeletion < errorsBeforeDeletion)\n            return false; // insertion fixes parentheses or bracket errors, do not auto complete\n    }\n\n\n//    if    ((lookBehind == QLatin1Char('(') && lookAhead == QLatin1Char(')'))\n//        || (lookBehind == QLatin1Char('[') && lookAhead == QLatin1Char(']'))\n//        || (lookBehind == QLatin1Char('`') && lookAhead == QLatin1Char('`'))\n//        || (lookBehind == QLatin1Char('\"') && lookAhead == QLatin1Char('\"')\n//            && lookFurtherBehind != QLatin1Char('\\\\'))\n//        || (lookBehind == QLatin1Char('\\'') && lookAhead == QLatin1Char('\\'')\n//            && lookFurtherBehind != QLatin1Char('\\\\'))) {\n         cursor.beginEditBlock();\n         cursor.deleteChar();\n         cursor.deletePreviousChar();\n         cursor.endEditBlock();\n         return true;\n//    }\n//    return false;\n}\n\nvoid LiteEditorWidgetBase::handleBackspaceKey()\n{\n}\n\nvoid LiteEditorWidgetBase::setVisualizeWhitespace(bool b)\n{\n    m_visualizeWhitespace = b;\n}\n\nvoid LiteEditorWidgetBase::autoIndent()\n{\n    QTextCursor cursor = textCursor();\n    cursor.beginEditBlock();\n    ::autoIndent(this->document(),cursor,this->tabSettings());\n    cursor.endEditBlock();\n}\n\nstatic QString QString_toTitle(const QString &str)\n{\n    QString r = str;\n    for (int i = 0; i < r.length(); i++) {\n        if (i == 0) {\n            r[i] = r[i].toTitleCase();\n        } else {\n            r[i] = r[i].toLower();\n        }\n    }\n    return r;\n}\n\nstatic QString QString_toUpper(const QString &str)\n{\n    return str.toUpper();\n}\n\nstatic QString QString_toLower(const QString &str)\n{\n    return str.toLower();\n}\n\nstatic QString QString_toSwapCase(const QString &str)\n{\n    QString r = str;\n    for (int i = 0; i < r.length(); i++) {\n        if (r[i].isUpper()) {\n            r[i] = r[i].toLower();\n        } else if (r[i].isLower()) {\n            r[i] = r[i].toUpper();\n        }\n    }\n    return r;\n}\n\nvoid LiteEditorWidgetBase::convertCaseTitle()\n{\n    this->transformSelection(QString_toTitle);\n}\n\nvoid LiteEditorWidgetBase::convertCaseUpper()\n{\n    this->transformSelection(QString_toUpper);\n}\n\nvoid LiteEditorWidgetBase::convertCaseLower()\n{\n    this->transformSelection(QString_toLower);\n}\n\nvoid LiteEditorWidgetBase::convertCaseSwap()\n{\n    this->transformSelection(QString_toSwapCase);\n}\n\nvoid LiteEditorWidgetBase::convertTabToSpaces()\n{\n    switchTabToSpace(true);\n}\n\nvoid LiteEditorWidgetBase::convertSpacesToTab()\n{\n    switchTabToSpace(false);\n}\n\nvoid LiteEditorWidgetBase::switchTabToSpace(bool tabtospace)\n{\n    if (hasBlockSelection()) {\n         return;\n    }\n    QTextCursor cursor = this->textCursor();\n\n    if (!cursor.hasSelection()) {\n        //TODO select tab or spaces\n        return;\n    }\n    int pos = cursor.selectionStart();\n\n    QString text = cursor.selectedText();\n    QString transformedText = text;\n    if (tabtospace) {\n        transformedText.replace(\"\\t\",QString(m_nTabSize,' '));\n    } else {\n        transformedText.replace(QString(m_nTabSize,' '),\"\\t\");\n    }\n\n    if (transformedText == text) {\n        return;\n    }\n\n    cursor.insertText(transformedText);\n\n    cursor.setPosition(pos);\n    cursor.setPosition(pos+transformedText.length(), QTextCursor::KeepAnchor);\n    this->setTextCursor(cursor);\n}\n\n\nstatic int trailingWhitespaces(const QString &text)\n{\n    int i = 0;\n    while (i < text.size()) {\n        if (!text.at(text.size()-1-i).isSpace())\n            return i;\n        ++i;\n    }\n    return i;\n}\n\nvoid LiteEditorWidgetBase::keyPressEvent(QKeyEvent *e)\n{\n    if ((e->modifiers() & Qt::ControlModifier) && e->key() == Qt::Key_S) {\n        return;\n    }\n#ifdef Q_OS_MAC\n    if ((e->modifiers() & Qt::ControlModifier) && e->key() == ',') {\n        return;\n    }\n#endif\n    if (e->key() == Qt::Key_Insert ) {\n        if (e->modifiers() == Qt::NoModifier) {\n            this->setOverwriteMode(!this->overwriteMode());\n            emit overwriteModeChanged(this->overwriteMode());\n            return;\n        } else if (e->modifiers() == Qt::ControlModifier) {\n            this->copyLine();\n            return;\n        }\n        QPlainTextEdit::keyPressEvent(e);\n        return;\n    }\n    hideTipText();\n    this->m_moveLineUndoHack = false;\n    bool ro = isReadOnly();\n\n    if (e == QKeySequence::Cut) {\n        if (!ro) {\n            cut();\n            e->accept();\n            return;\n        }\n    } else if (e == QKeySequence::Delete || e->key() == Qt::Key_Backspace) {\n        if (!ro) {\n            if (m_inBlockSelectionMode) {\n                removeBlockSelection();\n                e->accept();\n                return;\n            }\n        }\n    } else if (e == QKeySequence::Paste) {\n        if (!ro) {\n            paste();\n            e->accept();\n            return;\n        }\n    } else if (e == QKeySequence::SelectAll) {\n        selectAll();\n        e->accept();\n        return;\n    }\n\n    if ( e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return ) {\n        if (e->modifiers() == Qt::NoModifier) {\n            if (m_autoIndent) {\n                indentEnter(textCursor());\n                return;\n            }\n        } else if (e->modifiers() & Qt::ControlModifier) {\n            if (e->modifiers() & Qt::ShiftModifier) {\n                insertLineBefore();\n            } else {\n                insertLineAfter();\n            }\n            return;\n        } else if (e->modifiers() & Qt::ShiftModifier) {\n            QTextCursor cur = this->textCursor();\n            if (m_autoIndent) {\n                indentEnter(cur);\n            } else {\n                cur.insertText(\"\\n\");\n            }\n            this->setTextCursor(cur);\n            return;\n        }\n    }\n    if (e == QKeySequence::MoveToStartOfBlock\n            || e == QKeySequence::SelectStartOfBlock){\n        if ((e->modifiers() & (Qt::AltModifier | Qt::ShiftModifier)) == (Qt::AltModifier | Qt::ShiftModifier)) {\n            e->accept();\n            return;\n        }\n        handleHomeKey(e == QKeySequence::SelectStartOfBlock);\n        e->accept();\n    } else if (e == QKeySequence::MoveToStartOfLine\n               || e == QKeySequence::SelectStartOfLine){\n        if ((e->modifiers() & (Qt::AltModifier | Qt::ShiftModifier)) == (Qt::AltModifier | Qt::ShiftModifier)) {\n            e->accept();\n            return;\n        }\n        QTextCursor cursor = textCursor();\n        if (QTextLayout *layout = cursor.block().layout()) {\n            if (layout->lineForTextPosition(cursor.position() - cursor.block().position()).lineNumber() == 0) {\n                handleHomeKey(e == QKeySequence::SelectStartOfLine);\n                e->accept();\n                return;\n            }\n        }\n    } else if (!ro && e == QKeySequence::DeleteStartOfWord && !textCursor().hasSelection()) {\n        e->accept();\n        QTextCursor c = textCursor();\n        c.movePosition(QTextCursor::PreviousWord, QTextCursor::KeepAnchor);\n        QString text = c.selectedText();\n        int trail = trailingWhitespaces(text);\n        if ( trail >= 1 ) {\n            c = textCursor();\n            c.movePosition(QTextCursor::PreviousCharacter,QTextCursor::KeepAnchor,trail);\n        }\n        c.removeSelectedText();\n        return;\n    } else if (!ro && e == QKeySequence::DeleteEndOfWord && !textCursor().hasSelection()) {\n        e->accept();\n        QTextCursor c = textCursor();\n        c.movePosition(QTextCursor::NextWord, QTextCursor::KeepAnchor);\n        c.removeSelectedText();\n        return;\n    } else {\n        switch (e->key()) {\n        case Qt::Key_Tab:\n        case Qt::Key_Backtab: {\n            if (ro) break;\n            QTextCursor cursor = textCursor();\n            indentText(cursor, e->key() == Qt::Key_Tab);\n            e->accept();\n            return;\n        }\n        case Qt::Key_Backspace: {\n            QTextCursor cursor = this->textCursor();\n            if ((e->modifiers() & (Qt::ControlModifier\n                                   | Qt::ShiftModifier\n                                   | Qt::AltModifier\n                                   | Qt::MetaModifier)) == Qt::NoModifier\n                && !cursor.hasSelection()) {\n\n                int pos = cursor.position();\n                if (pos >= 1) {\n                    QTextDocument *doc = cursor.document();\n                    const QChar lookAhead = doc->characterAt(pos-1);\n                    if (lookAhead == ' ') {\n                        this->indentText(cursor,false);\n                        e->accept();\n                        return;\n                    }\n                }\n                if (this->autoBackspace(cursor)) {\n                    this->setTextCursor(cursor);\n                    e->accept();\n                    return;\n                }\n            }\n            break;\n        }\n        case Qt::Key_Up:\n        case Qt::Key_Down:\n            if ((e->modifiers() & Qt::ControlModifier) && (e->modifiers()&Qt::ShiftModifier)) {\n                this->moveLineUpDown(e->key() == Qt::Key_Up);\n                return;\n            }\n            if (e->modifiers() & Qt::ControlModifier) {\n                verticalScrollBar()->triggerAction(\n                        e->key() == Qt::Key_Up ? QAbstractSlider::SliderSingleStepSub :\n                                                 QAbstractSlider::SliderSingleStepAdd);\n                e->accept();\n                return;\n            }\n        case Qt::Key_Right:\n        case Qt::Key_Left:\n#ifdef Q_OS_MAC\n            break;\n#endif\n            if ((e->modifiers()\n                 & (Qt::AltModifier | Qt::ShiftModifier)) == (Qt::AltModifier | Qt::ShiftModifier)) {\n                int diff_row = 0;\n                int diff_col = 0;\n                if (e->key() == Qt::Key_Up)\n                    diff_row = -1;\n                else if (e->key() == Qt::Key_Down)\n                    diff_row = 1;\n                else if (e->key() == Qt::Key_Left)\n                    diff_col = -1;\n                else if (e->key() == Qt::Key_Right)\n                    diff_col = 1;\n                handleBlockSelection(diff_row, diff_col);\n                e->accept();\n                return;\n            } else {\n                // leave block selection mode\n                if (m_inBlockSelectionMode) {\n                    m_inBlockSelectionMode = false;\n                    m_blockSelection.clear();\n                    viewport()->update();\n                }\n            }\n            break;\n        case Qt::Key_PageUp:\n        case Qt::Key_PageDown:\n            if (e->modifiers() == Qt::ControlModifier) {\n                verticalScrollBar()->triggerAction(\n                        e->key() == Qt::Key_PageUp ? QAbstractSlider::SliderPageStepSub :\n                                                     QAbstractSlider::SliderPageStepAdd);\n                e->accept();\n                return;\n            }\n            break;\n        default:\n            break;\n        }\n    }\n\n    if (!ro && m_inBlockSelectionMode) {\n        QString text = e->text();\n        if (!text.isEmpty() && (text.at(0).isPrint() || text.at(0) == QLatin1Char('\\t'))) {\n            removeBlockSelection();\n        }\n    }\n\n    if (((e->modifiers() & (Qt::ControlModifier|Qt::AltModifier)) != Qt::ControlModifier) &&\n            m_textLexer->isLangSupport() && m_textLexer->isEndOfString(this->textCursor())) {\n        QString keyText = e->text();\n        // keyText == \"\\\"\" || keyText == \"\\'\" || keyText == \"`\")\n        if (m_textLexer->stringQuoteList().contains(keyText)) {\n            QTextCursor cursor = textCursor();\n            if (m_textLexer->hasStringBackslash()) {\n                int pos = cursor.position();\n                if (pos > 0) {\n                    QChar ch = document()->characterAt(pos-1);\n                    if (ch == '\\\\') {\n                        QPlainTextEdit::keyPressEvent(e);\n                        return;\n                    }\n                }\n            }\n            if (!cursor.atBlockEnd()) {\n                QString text = cursor.block().text();\n                if (text.mid(cursor.positionInBlock(),1) == keyText) {\n                    if (this->checkIsMatchBraces(cursor,keyText)) {\n                        cursor.movePosition(QTextCursor::Right);\n                        setTextCursor(cursor);\n                        return;\n                    }\n                }\n            }\n        }\n    }\n\n\n    if (((e->modifiers() & (Qt::ControlModifier|Qt::AltModifier)) != Qt::ControlModifier) &&\n            (m_bLastBraces ||m_textLexer->isCanAutoCompleter(this->textCursor())) ) {        \n\n        if (m_bLastBraces) {\n            if (e->text() == m_lastBraceText) {\n                QTextCursor cursor = textCursor();\n                cursor.movePosition(QTextCursor::Right,QTextCursor::MoveAnchor);\n                setTextCursor(cursor);\n                m_bLastBraces = false;\n                return;\n            }\n        }\n\n        if (textCursor().hasSelection()) {\n            QPlainTextEdit::keyPressEvent(e);\n            return;\n        }\n\n        m_bLastBraces = false;\n        QString keyText = e->text();\n        QString mr;\n        if (m_autoBraces0 && keyText == \"{\") {\n            mr = \"}\";\n        } else if (m_autoBraces1 && keyText == \"(\") {\n            mr = \")\";\n        } else if (m_autoBraces2 && keyText == \"[\") {\n            mr = \"]\";\n        } else if (m_autoBraces3 && keyText == \"\\'\") {\n            mr = \"\\'\";\n        } else if (m_autoBraces4 && keyText == \"\\\"\") {\n            mr = \"\\\"\";\n        } else if (m_autoBraces5 && keyText == \"`\") {\n            if (m_mimeType == \"text/x-gosrc\") {\n                mr = \"`\";\n            }\n        }\n\n        if (m_textLexer->isInStringOrComment(this->textCursor())) {\n            QPlainTextEdit::keyPressEvent(e);\n            return;\n        }\n\n        if (m_textLexer->stringQuoteList().contains(mr) && m_textLexer->hasStringBackslash()) {\n            QTextCursor cursor = textCursor();\n            int pos = cursor.position();\n            if (pos > 0) {\n                QChar ch = document()->characterAt(pos-1);\n                if (ch == '\\\\') {\n                    QPlainTextEdit::keyPressEvent(e);\n                    return;\n                }\n            }\n        }\n\n        if (keyText == \")\" || keyText == \"]\" || keyText == \"}\") {\n            QTextCursor cursor = textCursor();\n            if (!cursor.atBlockEnd()) {\n                QString text = cursor.block().text();\n                if (text.mid(cursor.positionInBlock(),1) == keyText) {\n                    if (this->checkIsMatchBraces(cursor,keyText)) {\n                        cursor.movePosition(QTextCursor::Right);\n                        setTextCursor(cursor);\n                        return;\n                    }\n                }\n            }\n        } else if (keyText == \"(\" || keyText == \"[\" || keyText == \"{\") {\n            QTextCursor cursor = textCursor();\n            if (!cursor.atBlockEnd()) {\n                QString text = cursor.block().text();\n                if (text.mid(cursor.positionInBlock(),1) == keyText) {\n                    if (this->checkIsMatchBraces(cursor,keyText)) {\n                        cursor.movePosition(QTextCursor::Right);\n                        setTextCursor(cursor);\n                        return;\n                    }\n                } else if (text.at(cursor.positionInBlock()).isLetterOrNumber()) {\n                     QPlainTextEdit::keyPressEvent(e);\n                     return;\n                }\n            }\n        } else if (keyText == \"\\\"\" || keyText == \"\\'\" || keyText == \"`\") {\n            QTextCursor cursor = textCursor();\n            if (!cursor.atBlockEnd()) {\n                QString text = cursor.block().text();\n                if (text.mid(cursor.positionInBlock(),1) == keyText) {\n                    if (this->checkIsMatchBraces(cursor,keyText)) {\n                        cursor.movePosition(QTextCursor::Right);\n                        setTextCursor(cursor);\n                        return;\n                    }\n                } else {\n                    int pos = cursor.positionInBlock();\n                    if (text.at(pos).isLetterOrNumber()) {\n                        QPlainTextEdit::keyPressEvent(e);\n                        return;\n                    }\n                    if (pos > 0) {\n                        if (text.at(pos-1).isLetterOrNumber()) {\n                            QPlainTextEdit::keyPressEvent(e);\n                            return;\n                        }\n                    }\n                }\n            }\n        }\n        if (!mr.isNull()) {\n            QTextCursor cursor = textCursor();\n            if (this->checkIsMatchBraces(cursor,keyText)) {\n                cursor.beginEditBlock();\n                int pos = cursor.position();\n                if (cursor.hasSelection()) {\n                    pos = cursor.selectionStart();\n                }\n                cursor.insertText(keyText+mr);\n                cursor.setPosition(pos+1);\n                cursor.endEditBlock();\n                setTextCursor(cursor);\n                m_bLastBraces = true;\n                m_lastBraceText = mr;\n                return;\n            }\n        }\n    }\n\n    QPlainTextEdit::keyPressEvent(e);\n}\n\nvoid LiteEditorWidgetBase::keyReleaseEvent(QKeyEvent *e)\n{\n    if (e->key() == Qt::Key_Control) {\n        clearLink();\n    }\n    QPlainTextEdit::keyReleaseEvent(e);\n}\n\nvoid LiteEditorWidgetBase::leaveEvent(QEvent *e)\n{\n    clearLink();\n    QPlainTextEdit::leaveEvent(e);\n}\n\nvoid LiteEditorWidgetBase::indentBlock(QTextBlock block, bool bIndent)\n{\n    QTextCursor cursor(block);\n    cursor.beginEditBlock();\n    cursor.movePosition(QTextCursor::StartOfBlock);\n    cursor.removeSelectedText();\n    if (bIndent) {\n        cursor.insertText(this->tabText());\n    } else {\n        QString text = block.text();\n        if (!text.isEmpty()) {\n            if (text.at(0) == '\\t') {\n                cursor.deleteChar();\n            } else if (m_bTabUseSpace && text.startsWith(QString(m_nTabSize,' '))) {\n                int count = m_nTabSize;\n                while (count--) {\n                    cursor.deleteChar();\n                }\n            } else if (text.at(0) == ' ') {\n                cursor.deleteChar();\n            }\n        }\n    }\n    cursor.endEditBlock();\n}\n\nvoid LiteEditorWidgetBase::indentCursor(QTextCursor cur, bool bIndent)\n{\n   cur.beginEditBlock();\n    if (bIndent) {\n        cur.insertText(this->tabText());\n    } else {         \n        QString text = cur.block().text();\n        int pos = cur.positionInBlock()-1;\n        if (pos >= 0) {\n            if (text.at(pos) == '\\t') {\n                cur.deletePreviousChar();\n            } else if (m_bTabUseSpace &&\n                       (pos-m_nTabSize+1 >= 0) &&\n                       (text.mid(pos-m_nTabSize+1,m_nTabSize) == QString(m_nTabSize,' '))) {\n                int count = m_nTabSize;\n                while (count--) {\n                    cur.deletePreviousChar();\n                }\n            } else if (text.at(pos) == ' ') {\n                cur.deletePreviousChar();\n            }\n       }\n    }\n    cur.endEditBlock();\n}\n\nvoid LiteEditorWidgetBase::indentText(QTextCursor cur,bool bIndent)\n{\n    QTextDocument *doc = document();\n    cur.beginEditBlock();\n    if (!cur.hasSelection()) {\n        indentCursor(cur,bIndent);\n    } else {\n        QTextBlock block = doc->findBlock(cur.selectionStart());\n        QTextBlock end = doc->findBlock(cur.selectionEnd());\n        if (end.position() == cur.selectionEnd()) {\n            end = end.previous();\n        }\n        if (block == end && cur.selectionStart() != block.position() ) {\n            cur.removeSelectedText();\n            //indentCursor(cur,bIndent);\n            if (bIndent) {\n                cur.insertText(this->tabText());\n            }\n            goto end;\n        }\n        bool bResetPos = bIndent && cur.selectionStart() == block.position();\n        bool bStart = cur.position() == cur.selectionStart();\n        int startPos = cur.selectionStart();\n\n        do {\n            indentBlock(block,bIndent);\n            block = block.next();\n        } while (block.isValid() && block.position() <= end.position());\n        int endPos = cur.selectionEnd();\n        if (bResetPos) {\n            if (bStart) {\n                cur.setPosition(endPos);\n                cur.movePosition(QTextCursor::Left,QTextCursor::KeepAnchor,endPos-startPos);\n            } else {\n                cur.setPosition(startPos);\n                cur.movePosition(QTextCursor::Right,QTextCursor::KeepAnchor,endPos-startPos);\n            }\n        }\n    }\nend:\n    cur.endEditBlock();\n    setTextCursor(cur);\n}\n\nQString LiteEditorWidgetBase::tabText(int n) const\n{\n    if (m_bTabUseSpace) {\n        return QString(m_nTabSize*n,' ');\n    }\n    return QString(n,'\\t');\n}\n\nvoid LiteEditorWidgetBase::indentEnter(QTextCursor cur)\n{\n    QTextBlock block = cur.block();\n    if (block.isValid() && block.next().isValid() && !block.next().isVisible()) {\n        unfold();\n    }\n    int pos = cur.position()-cur.block().position();\n    QString text = cur.block().text();\n    int i = 0;\n    int tab = 0;\n    int space = 0;\n    QString inText = \"\\n\";\n    while (i < pos) {\n        if (!text.at(i).isSpace())\n            break;\n        if (text.at(i) == ' ') {\n            space++;\n        } else if (text.at(i) == '\\t') {\n            tab++;\n        }\n        i++;\n    }\n    if (tab == 0) {\n        tab += space/m_nTabSize;\n        inText += QString(m_nTabSize*tab,' ');\n    } else {\n        tab += space/m_nTabSize;\n        inText += this->tabText(tab);\n    }\n    if (!text.isEmpty()) {\n        if (pos >= text.size()) {\n            const QChar ch = text.at(text.size()-1);\n            if (ch == '{' || ch == '(') {\n                inText += this->tabText();\n            }\n        } else if (pos >= 1 && pos < text.size()) {\n            const QChar l = text.at(pos-1);\n            const QChar r = text.at(pos);\n            if ( (l == '{' && r == '}') ||\n                 (l == '(' && r== ')') ) {\n                cur.beginEditBlock();\n                cur.insertText(inText);\n                int pos = cur.position();\n                cur.insertText(inText);\n                cur.setPosition(pos);\n                this->setTextCursor(cur);\n                cur.insertText(this->tabText());\n                cur.endEditBlock();\n                return;\n            }\n        }\n    }\n    cur.beginEditBlock();\n    cur.insertText(inText);\n    cur.endEditBlock();\n    ensureCursorVisible();\n}\n\nstatic QString simpleInfo(const QString &info, int maxLine)\n{\n    QStringList lines = info.split(\"\\n\");\n    if (lines.size() <= maxLine) {\n        return info;\n    }\n    QStringList out;\n    for (int i = 0; i < maxLine; i++) {\n        out += lines[i];\n    }\n    return out.join(\"\\n\")+\"\\n...\";\n}\n\nvoid LiteEditorWidgetBase::showToolTipInfo(const QPoint &pos, const QString &text)\n{\n    showTipText(pos,simpleInfo(text,m_maxTipInfoLines),this);\n}\n\nvoid LiteEditorWidgetBase::showTipText(const QPoint &pos, const QString &text, QWidget *widget)\n{\n    static QString last;\n    static QPoint lastPos;\n    if (last == text && lastPos == pos) {\n        return;\n    }\n    last = text;\n    lastPos = pos;\n    QToolTip::showText(pos,text,widget);\n}\n\nvoid LiteEditorWidgetBase::hideTipText()\n{\n    QToolTip::hideText();\n}\n\n\nvoid LiteEditorWidgetBase::cleanWhitespace(bool wholeDocument)\n{\n    QTextCursor cursor = this->textCursor();\n    bool hasSelection = cursor.hasSelection();\n    QTextCursor copyCursor = cursor;\n    copyCursor.setVisualNavigation(false);\n    if (wholeDocument) {\n        copyCursor.select(QTextCursor::Document);\n    }\n    copyCursor.beginEditBlock();\n    cleanWhitespace(copyCursor, true);\n    if (!hasSelection)\n        ensureFinalNewLine(copyCursor);\n    copyCursor.endEditBlock();\n}\n\n\nvoid LiteEditorWidgetBase::cleanWhitespace(QTextCursor &cursor, bool inEntireDocument)\n{\n    QTextDocument *document = this->document();\n    TextEditor::BaseTextDocumentLayout *documentLayout = qobject_cast<TextEditor::BaseTextDocumentLayout*>(document->documentLayout());\n    Q_ASSERT(cursor.visualNavigation() == false);\n\n    QTextBlock block = document->findBlock(cursor.selectionStart());\n    QTextBlock end;\n    if (cursor.hasSelection())\n        end = document->findBlock(cursor.selectionEnd()-1).next();\n\n    while (block.isValid() && block != end) {\n        if (inEntireDocument || block.revision() != documentLayout->lastSaveRevision) {\n            QString blockText = block.text();\n            if (int trailing = trailingWhitespaces(blockText)) {\n                cursor.setPosition(block.position() + block.length() - 1);\n                cursor.movePosition(QTextCursor::PreviousCharacter, QTextCursor::KeepAnchor, trailing);\n                cursor.removeSelectedText();\n            }\n        }\n\n        block = block.next();\n    }\n}\n\nvoid LiteEditorWidgetBase::ensureFinalNewLine(QTextCursor &cursor)\n{\n    cursor.movePosition(QTextCursor::End, QTextCursor::MoveAnchor);\n    bool emptyFile = !cursor.movePosition(QTextCursor::PreviousCharacter, QTextCursor::KeepAnchor);\n\n    if (!emptyFile && cursor.selectedText().at(0) != QChar::ParagraphSeparator)\n    {\n        cursor.movePosition(QTextCursor::End, QTextCursor::MoveAnchor);\n        cursor.insertText(QLatin1String(\"\\n\"));\n    }\n}\n\nvoid LiteEditorWidgetBase::setNavigateHead(LiteApi::EditorNaviagteType type, const QString &msg)\n{\n    m_navigateManager->setType(type,msg);\n    m_navigateArea->update();\n}\n\nvoid LiteEditorWidgetBase::insertNavigateMark(int blockNumber, LiteApi::EditorNaviagteType type, const QString &msg, const QString &tag, int offset, int selection)\n{\n    m_navigateManager->insertMark(blockNumber,msg,type,tag,offset,selection);\n    m_navigateArea->update();\n}\n\nvoid LiteEditorWidgetBase::clearAllNavigateMark(LiteApi::EditorNaviagteType types, const QString &tag)\n{\n    m_navigateManager->clearAllNavigateMark(types, tag);\n    m_navigateArea->update();\n}\n\nvoid LiteEditorWidgetBase::clearAllNavigateMarks()\n{\n    m_navigateManager->clearAll();\n    m_navigateArea->update();\n}\n\nvoid LiteEditorWidgetBase::moveCursorVisible(bool ensureVisible)\n{\n    QTextCursor cursor = this->textCursor();\n    if (!cursor.block().isVisible()) {\n        cursor.setVisualNavigation(true);\n        cursor.movePosition(QTextCursor::Up);\n        this->setTextCursor(cursor);\n    }\n    if (ensureVisible)\n        this->ensureCursorVisible();\n}\n\nvoid LiteEditorWidgetBase::toggleBlockVisible(const QTextBlock &block)\n{\n    TextEditor::BaseTextDocumentLayout *documentLayout = qobject_cast<TextEditor::BaseTextDocumentLayout*>(document()->documentLayout());\n\n    bool visible = block.next().isVisible();\n    TextEditor::BaseTextDocumentLayout::doFoldOrUnfold(block, !visible);\n    documentLayout->requestUpdate();\n    documentLayout->emitDocumentSizeChanged();\n}\n\nvoid LiteEditorWidgetBase::foldIndentChanged(QTextBlock block)\n{\n    if (!block.isVisible()) {\n        QTextDocument *doc = document();\n        TextEditor::BaseTextDocumentLayout *documentLayout = qobject_cast<TextEditor::BaseTextDocumentLayout*>(doc->documentLayout());\n        block.setVisible(true);\n        documentLayout->requestUpdate();\n    }\n}\n\nvoid LiteEditorWidgetBase::updateBlock(const QTextBlock &/*block*/)\n{\n\n}\n\nvoid LiteEditorWidgetBase::documentSizeChanged(QSizeF)\n{\n\n}\n\nvoid LiteEditorWidgetBase::fold()\n{\n    QTextDocument *doc = document();\n    TextEditor::BaseTextDocumentLayout *documentLayout = qobject_cast<TextEditor::BaseTextDocumentLayout*>(doc->documentLayout());\n    QTextBlock block = textCursor().block();\n    if (!(TextEditor::BaseTextDocumentLayout::canFold(block) && block.next().isVisible())) {\n        // find the closest previous block which can fold\n        int indent = TextEditor::BaseTextDocumentLayout::foldingIndent(block);\n        while (block.isValid() && (TextEditor::BaseTextDocumentLayout::foldingIndent(block) >= indent || !block.isVisible()))\n            block = block.previous();\n    }\n    if (block.isValid()) {\n        TextEditor::BaseTextDocumentLayout::doFoldOrUnfold(block, false);\n        this->moveCursorVisible(true);\n        documentLayout->requestUpdate();\n        documentLayout->emitDocumentSizeChanged();\n    }\n}\n\nvoid LiteEditorWidgetBase::unfold()\n{\n    QTextDocument *doc = document();\n    TextEditor::BaseTextDocumentLayout *documentLayout = qobject_cast<TextEditor::BaseTextDocumentLayout*>(doc->documentLayout());\n\n    QTextBlock block = textCursor().block();\n    while (block.isValid() && !block.isVisible())\n        block = block.previous();\n    TextEditor::BaseTextDocumentLayout::doFoldOrUnfold(block, true);\n    this->moveCursorVisible(true);\n    documentLayout->requestUpdate();\n    documentLayout->emitDocumentSizeChanged();\n}\n\nvoid LiteEditorWidgetBase::foldAll()\n{\n    QTextDocument *doc = document();\n    TextEditor::BaseTextDocumentLayout *documentLayout = qobject_cast<TextEditor::BaseTextDocumentLayout*>(doc->documentLayout());\n\n    QTextBlock block = doc->firstBlock();\n\n    while (block.isValid()) {\n        if (TextEditor::BaseTextDocumentLayout::canFold(block))\n            TextEditor::BaseTextDocumentLayout::doFoldOrUnfold(block, false);\n        block = block.next();\n    }\n\n    moveCursorVisible(true);\n    documentLayout->requestUpdate();\n    documentLayout->emitDocumentSizeChanged();\n    centerCursor();\n}\n\n\nvoid LiteEditorWidgetBase::unfoldAll()\n{\n    QTextDocument *doc = document();\n    TextEditor::BaseTextDocumentLayout *documentLayout = qobject_cast<TextEditor::BaseTextDocumentLayout*>(doc->documentLayout());\n\n    QTextBlock block = doc->firstBlock();\n    while (block.isValid()) {\n        if (TextEditor::BaseTextDocumentLayout::canFold(block))\n            TextEditor::BaseTextDocumentLayout::doFoldOrUnfold(block, true);\n        block = block.next();\n    }\n\n    moveCursorVisible(true);\n    documentLayout->requestUpdate();\n    documentLayout->emitDocumentSizeChanged();\n    centerCursor();\n}\n\nQTextBlock LiteEditorWidgetBase::foldedBlockAt(const QPoint &pos, QRect *box) const\n{\n    QPointF offset(contentOffset());\n    QTextBlock block = firstVisibleBlock();\n    qreal top = blockBoundingGeometry(block).translated(offset).top();\n    qreal bottom = top + blockBoundingRect(block).height();\n\n    int viewportHeight = viewport()->height();\n\n    while (block.isValid() && top <= viewportHeight) {\n        QTextBlock nextBlock = block.next();\n        if (block.isVisible() && bottom >= 0) {\n            if (nextBlock.isValid() && !nextBlock.isVisible()) {\n                QTextLayout *layout = block.layout();\n                QTextLine line = layout->lineAt(layout->lineCount()-1);\n                QRectF lineRect = line.naturalTextRect().translated(offset.x(), top);\n                lineRect.adjust(0, 0, -1, -1);\n\n                QRectF collapseRect(lineRect.right() + 12,\n                                    lineRect.top(),\n                                    fontMetrics().width(QLatin1String(\" {...}; \")),\n                                    lineRect.height());\n                if (collapseRect.contains(pos)) {\n                    QTextBlock result = block;\n                    if (box)\n                        *box = collapseRect.toAlignedRect();\n                    return result;\n                } else {\n                    block = nextBlock;\n                    while (nextBlock.isValid() && !nextBlock.isVisible()) {\n                        block = nextBlock;\n                        nextBlock = block.next();\n                    }\n                }\n            }\n        }\n\n        block = nextBlock;\n        top = bottom;\n        bottom = top + blockBoundingRect(block).height();\n    }\n    return QTextBlock();\n}\n\nvoid LiteEditorWidgetBase::uplinkDeployTimeout()\n{\n    m_lastUpToolTipPos = m_upToolTipPos;\n    m_upToolTipTimer->start(m_upToolTipTime+100);\n}\n\nvoid LiteEditorWidgetBase::uplinkInfoTimeout()\n{\n    if (m_lastUpToolTipPos != m_upToolTipPos) {\n        hideTipText();\n        return;\n    }\n    QTextCursor cursor = cursorForPosition(m_upToolTipPos);\n    bool findLink = false;\n    if (!cursor.isNull()) {\n        int pos = cursor.position();\n        QRect rc = this->cursorRect(cursor);\n        LiteApi::selectWordUnderCursor(cursor);\n        if (cursor.hasSelection()) {\n            rc.setLeft(rc.left()-(pos-cursor.selectionStart())*m_averageCharWidth);\n            rc.setRight(rc.right()+(cursor.selectionEnd()-pos)*m_averageCharWidth);\n            if (rc.contains(m_upToolTipPos)) {\n                findLink = true;\n                m_showLinkInfomation = true;\n                hideTipText();\n                emit updateLink(cursor,m_upToolTipPos,false);\n            }\n        }\n    }\n    if (!findLink) {\n        hideTipText();\n    }\n}\n\nvoid LiteEditorWidgetBase::stopUplinkTimer()\n{\n    m_showLinkInfomation = false;\n    hideTipText();\n    m_upToolTipTimer->stop();\n    m_upToolTipDeployTimer->stop();\n}\n\nbool LiteEditorWidgetBase::isSpellCheckingAt(QTextCursor cur) const\n{\n    QTextBlock block = cur.block();\n    if (!block.userData()) {\n        return false;\n    }\n    TextEditor::TextBlockUserData *data = static_cast<TextEditor::TextBlockUserData*>(block.userData());\n    return data->shouldSpellCheck(cur.positionInBlock());\n}\n\n\nvoid LiteEditorWidgetBase::showLink(const LiteApi::Link &link)\n{\n    if (link.showNav && !link.sourceInfo.isEmpty()) {\n        QPoint pt = this->mapToGlobal(link.cursorPos);\n        this->showToolTipInfo(pt,link.sourceInfo);\n\n    } else if (link.showTip && !link.targetInfo.isEmpty()) {\n        QPoint pt = this->mapToGlobal(link.cursorPos);\n        this->showToolTipInfo(pt,link.targetInfo);\n    }\n\n    if (!link.showNav) {\n        return;\n    }\n\n    if (!m_showLinkNavigation) {\n        return;\n    }\n\n    if (m_currentLink == link) {\n        return;\n    }\n\n    if (link.targetFileName.isEmpty()) {\n        clearLink();\n        return;\n    }\n\n    QTextEdit::ExtraSelection sel;\n    sel.cursor = textCursor();\n    sel.cursor.setPosition(link.linkTextStart);\n    sel.cursor.setPosition(link.linkTextEnd, QTextCursor::KeepAnchor);\n    sel.format.setForeground(Qt::blue);\n    sel.format.setFontUnderline(true);\n    setExtraSelections(LiteApi::LinkSelection,QList<QTextEdit::ExtraSelection>() << sel);\n    viewport()->setCursor(Qt::PointingHandCursor);\n\n    m_currentLink = link;\n    m_linkPressed = false;\n}\n\nvoid LiteEditorWidgetBase::clearLink()\n{\n    m_showLinkNavigation = false;\n    m_linkPressed = false;\n    if (!m_currentLink.hasValidLinkText())\n        return;\n\n    setExtraSelections(LiteApi::LinkSelection, QList<QTextEdit::ExtraSelection>());\n    viewport()->setCursor(Qt::IBeamCursor);\n    m_currentLink = LiteApi::Link();\n    hideTipText();\n}\n\nbool LiteEditorWidgetBase::openLink(const LiteApi::Link &link)\n{\n    if (!link.hasValidTarget()) {\n        return false;\n    }\n    if (!link.targetOpenDir.isEmpty()) {\n        LiteApi::IQuickOpenManager *mgr = LiteApi::getQuickOpenManager(m_liteApp);\n        if (mgr) {\n            LiteApi::IQuickOpenFileSystem *fileSystem = LiteApi::getQuickOpenFileSystem(mgr);\n            if (fileSystem) {\n                fileSystem->setRootPath(link.targetOpenDir);\n                fileSystem->setPlaceholderText(link.targetOpenDirInfo);\n                mgr->setCurrentFilter(fileSystem);\n                QPoint pt = this->mapToGlobal(link.cursorPos);\n                mgr->showPopup(&pt);\n                return true;\n            }\n        }\n    }\n    LiteApi::gotoLine(m_liteApp,link.targetFileName,link.targetLine,link.targetColumn,true,true);\n    return true;\n}\n\nvoid LiteEditorWidgetBase::setExtraSelections(LiteApi::ExtraSelectionKind kind, const QList<QTextEdit::ExtraSelection> &selections)\n{\n    m_extralSelectionMap[kind] = selections;\n    QList<QTextEdit::ExtraSelection> all;\n    QMapIterator<LiteApi::ExtraSelectionKind,QList<QTextEdit::ExtraSelection> > i(m_extralSelectionMap);\n    while(i.hasNext()) {\n        i.next();\n        all += i.value();\n    }\n    QPlainTextEdit::setExtraSelections(all);\n}\n\nQRectF LiteEditorWidgetBase::selectionRect(const QTextCursor &cursor)\n{\n    QRectF r;\n    if (!cursor.hasSelection()) {\n        r = this->cursorRect(cursor);\n    } else {\n        QTextDocument *doc = this->document();\n        const int position = cursor.selectionStart();\n        const int anchor = cursor.selectionEnd();\n        const QTextBlock posBlock = doc->findBlock(position);\n        const QTextBlock anchorBlock = doc->findBlock(anchor);\n        if (posBlock == anchorBlock && posBlock.isValid() && posBlock.layout()->lineCount()) {\n            const QTextLine posLine = posBlock.layout()->lineForTextPosition(position - posBlock.position());\n            const QTextLine anchorLine = anchorBlock.layout()->lineForTextPosition(anchor - anchorBlock.position());\n\n            const int firstLine = qMin(posLine.lineNumber(), anchorLine.lineNumber());\n            const int lastLine = qMax(posLine.lineNumber(), anchorLine.lineNumber());\n            const QTextLayout *layout = posBlock.layout();\n            r = QRectF();\n            for (int i = firstLine; i <= lastLine; ++i) {\n                r |= layout->lineAt(i).rect();\n                r |= layout->lineAt(i).naturalTextRect(); // might be bigger in the case of wrap not enabled\n            }\n            r.translate(blockBoundingRect(posBlock).topLeft());\n        } else {\n            qDebug() << \"error\";\n//            QRectF anchorRect = rectForPosition(cursor.selectionEnd());\n//            r |= anchorRect;\n//            r |= boundingRectOfFloatsInSelection(cursor);\n//            QRectF frameRect(doc->documentLayout()->frameBoundingRect(cursor.currentFrame()));\n//            r.setLeft(frameRect.left());\n//            r.setRight(frameRect.right());\n        }\n        if (r.isValid())\n            r.adjust(-1, -1, 1, 1);\n    }\n    return r;\n}\n\nvoid LiteEditorWidgetBase::testUpdateLink(QMouseEvent *e)\n{\n    if (!m_mouseNavigation) {\n        return;\n    }\n    bool findLink = false;\n    if (e->modifiers() & Qt::ControlModifier) {\n        // Link emulation behaviour for 'go to definition'\n        QTextCursor cursor = cursorForPosition(e->pos());\n        if (!cursor.isNull()) {\n            int pos = cursor.position();\n            QRect rc = this->cursorRect(cursor);\n            LiteApi::selectWordUnderCursor(cursor);\n            if (cursor.hasSelection()) {\n                rc.setLeft(rc.left()-(pos-cursor.selectionStart())*m_averageCharWidth);\n                rc.setRight(rc.right()+(cursor.selectionEnd()-pos)*m_averageCharWidth);\n                if (rc.contains(e->pos())) {\n                    findLink = true;\n                    m_showLinkNavigation = true;\n                    emit updateLink(cursor,e->pos(),true);\n                }\n            }\n        }\n    }\n    if (!findLink) {\n        clearLink();\n    }\n}\n\nvoid LiteEditorWidgetBase::mousePressEvent(QMouseEvent *e)\n{\n    if (e->button() == Qt::LeftButton) {\n        this->clearBlockSelection();\n\n        QTextBlock foldedBlock = foldedBlockAt(e->pos());\n        if (foldedBlock.isValid()) {\n            toggleBlockVisible(foldedBlock);\n            viewport()->setCursor(Qt::IBeamCursor);\n        }\n        if (m_mouseNavigation) {\n            if (this->m_currentLink.hasValidTarget()) {\n                this->m_linkPressed = true;\n            }\n            m_uplinkSkip = true;\n            this->stopUplinkTimer();\n        }\n    } else if (e->button() == Qt::RightButton) {\n        int eventCursorPosition = cursorForPosition(e->pos()).position();\n        if (eventCursorPosition < textCursor().selectionStart()\n                || eventCursorPosition > textCursor().selectionEnd()) {\n            setTextCursor(cursorForPosition(e->pos()));\n        }\n    }\n    QPlainTextEdit::mousePressEvent(e);\n}\n\nvoid LiteEditorWidgetBase::mouseReleaseEvent(QMouseEvent *e)\n{\n    if (m_mouseNavigation && m_linkPressed\n        && (e->modifiers() & Qt::ControlModifier)\n        && !(e->modifiers() & Qt::ShiftModifier)\n        && e->button() == Qt::LeftButton) {\n        if (openLink(m_currentLink)) {\n            clearLink();\n            return;\n        }\n    }\n    QPlainTextEdit::mouseReleaseEvent(e);\n}\n\nconst TextEditor::TabSettings &LiteEditorWidgetBase::tabSettings() const\n{\n    TextEditor::BaseTextDocumentLayout *layout = (TextEditor::BaseTextDocumentLayout*)this->document()->documentLayout();\n    return layout->m_tabSettings;\n}\n\nvoid LiteEditorWidgetBase::clearBlockSelection()\n{\n    if (m_inBlockSelectionMode) {\n        m_inBlockSelectionMode = false;\n        m_blockSelection.clear();\n        QTextCursor cursor = this->textCursor();\n        cursor.clearSelection();\n        setTextCursor(cursor);\n    }\n}\n\nQString LiteEditorWidgetBase::copyBlockSelection() const\n{\n    QString selection;\n    QTextCursor cursor = this->textCursor();\n    if (!m_inBlockSelectionMode)\n        return selection;\n    const TextEditor::TabSettings &ts = this->tabSettings();\n    QTextBlock block = m_blockSelection.firstBlock.block();\n    QTextBlock lastBlock = m_blockSelection.lastBlock.block();\n    bool textInserted = false;\n    for (;;) {\n        if (this->selectionVisible(block.blockNumber())) {\n            if (textInserted)\n                selection += QLatin1Char('\\n');\n            textInserted = true;\n\n            QString text = block.text();\n            int startOffset = 0;\n            int startPos = ts.positionAtColumn(text, m_blockSelection.firstVisualColumn, &startOffset);\n            int endOffset = 0;\n            int endPos = ts.positionAtColumn(text, m_blockSelection.lastVisualColumn, &endOffset);\n\n            if (startPos == endPos) {\n                selection += QString(endOffset - startOffset, QLatin1Char(' '));\n            } else {\n                if (startOffset < 0)\n                    selection += QString(-startOffset, QLatin1Char(' '));\n                if (endOffset < 0)\n                    --endPos;\n                selection += text.mid(startPos, endPos - startPos);\n                if (endOffset < 0)\n                    selection += QString(ts.m_tabSize + endOffset, QLatin1Char(' '));\n                else if (endOffset > 0)\n                    selection += QString(endOffset, QLatin1Char(' '));\n            }\n        }\n        if (block == lastBlock)\n            break;\n\n        block = block.next();\n    }\n    return selection;\n}\n\nvoid LiteEditorWidgetBase::removeBlockSelection(const QString &text)\n{\n    QTextCursor cursor = this->textCursor();\n    if (!cursor.hasSelection() || !m_inBlockSelectionMode)\n        return;\n\n    int cursorPosition = cursor.selectionStart();\n    cursor.clearSelection();\n    cursor.beginEditBlock();\n\n    const TextEditor::TabSettings &ts = this->tabSettings();\n    QTextBlock block = m_blockSelection.firstBlock.block();\n    QTextBlock lastBlock = m_blockSelection.lastBlock.block();\n    for (;;) {\n        QString text = block.text();\n        int startOffset = 0;\n        int startPos = ts.positionAtColumn(text, m_blockSelection.firstVisualColumn, &startOffset);\n        int endOffset = 0;\n        int endPos = ts.positionAtColumn(text, m_blockSelection.lastVisualColumn, &endOffset);\n\n        cursor.setPosition(block.position() + startPos);\n        cursor.setPosition(block.position() + endPos, QTextCursor::KeepAnchor);\n        cursor.removeSelectedText();\n\n        if (startOffset < 0)\n            cursor.insertText(QString(ts.m_tabSize + startOffset, QLatin1Char(' ')));\n        if (endOffset < 0)\n            cursor.insertText(QString(-endOffset, QLatin1Char(' ')));\n\n        if (block == lastBlock)\n            break;\n        block = block.next();\n    }\n\n    cursor.setPosition(cursorPosition);\n    if (!text.isEmpty())\n        cursor.insertText(text);\n    cursor.endEditBlock();\n    this->setTextCursor(cursor);\n}\n\nbool LiteEditorWidgetBase::selectionVisible(int blockNumber) const\n{\n    Q_UNUSED(blockNumber);\n    return true;\n}\n\nvoid LiteEditorWidgetBase::handleBlockSelection(int diff_row, int diff_col)\n{\n    if (!m_inBlockSelectionMode) {\n        m_blockSelection.fromSelection(this->tabSettings(), textCursor());\n        m_inBlockSelectionMode = true;\n    }\n\n    m_blockSelection.moveAnchor(m_blockSelection.anchorBlockNumber() + diff_row,\n                                   m_blockSelection.anchorColumnNumber() + diff_col);\n    setTextCursor(m_blockSelection.selection(this->tabSettings()));\n\n    viewport()->update();\n}\n\nvoid LiteEditorWidgetBase::copy()\n{\n    if (!textCursor().hasSelection())\n        return;\n\n    QPlainTextEdit::copy();\n}\n\nvoid LiteEditorWidgetBase::paste()\n{\n    if (m_inBlockSelectionMode)\n        removeBlockSelection();\n    QPlainTextEdit::paste();\n}\n\nvoid LiteEditorWidgetBase::cut()\n{\n    if (m_inBlockSelectionMode) {\n        copy();\n        removeBlockSelection();\n        return;\n    }\n    QTextCursor cur = this->textCursor();\n    if (!cur.hasSelection()) {\n        maybeSelectLine();\n    }\n    QPlainTextEdit::cut();\n}\n\nvoid LiteEditorWidgetBase::selectAll()\n{\n    this->clearBlockSelection();\n    QPlainTextEdit::selectAll();\n}\n\nvoid LiteEditorWidgetBase::mouseMoveEvent(QMouseEvent *e)\n{\n    testUpdateLink(e);\n\n    if (e->buttons() == Qt::NoButton) {\n        const QTextBlock collapsedBlock = foldedBlockAt(e->pos());\n        if (collapsedBlock.isValid() && !m_mouseOnFoldedMarker) {\n            m_mouseOnFoldedMarker = true;\n            viewport()->setCursor(Qt::PointingHandCursor);\n        } else if (!collapsedBlock.isValid() && m_mouseOnFoldedMarker) {\n            m_mouseOnFoldedMarker = false;\n            viewport()->setCursor(Qt::IBeamCursor);\n        }\n    } else {\n        QPlainTextEdit::mouseMoveEvent(e);\n        if (e->modifiers() & Qt::AltModifier) {\n            if (!m_inBlockSelectionMode) {\n                m_blockSelection.fromSelection(this->tabSettings(), textCursor());\n                m_inBlockSelectionMode = true;\n            } else {\n                QTextCursor cursor = textCursor();\n\n                // get visual column\n                int column = this->tabSettings().columnAt(\n                            cursor.block().text(), cursor.positionInBlock());\n                if (cursor.positionInBlock() == cursor.block().length()-1)\n                    column += (e->pos().x() - cursorRect().center().x())/QFontMetricsF(font()).width(QLatin1Char(' '));\n                m_blockSelection.moveAnchor(cursor.blockNumber(), column);\n                setTextCursor(m_blockSelection.selection(this->tabSettings()));\n                viewport()->update();\n            }\n        }\n    }\n    if (viewport()->cursor().shape() == Qt::BlankCursor)\n        viewport()->setCursor(Qt::IBeamCursor);\n}\n\nbool LiteEditorWidgetBase::viewportEvent(QEvent *e)\n{\n    if (e->type() == QEvent::ToolTip) {\n        if (QApplication::keyboardModifiers() & Qt::ControlModifier) {\n            return true;\n        }\n        const QHelpEvent *he = static_cast<QHelpEvent*>(e);\n        m_upToolTipPos = he->pos();\n        m_upToolTipDeployTimer->start(m_upToolTipTime);\n        return true;\n    }\n    return QPlainTextEdit::viewportEvent(e);\n}\n\nvoid LiteEditorWidgetBase::inputMethodEvent(QInputMethodEvent *e)\n{\n    m_inputCursorOffset = e->preeditString().length();\n    QPlainTextEdit::inputMethodEvent(e);\n}\n\nstatic void fillBackground(QPainter *p, const QRectF &rect, QBrush brush, QRectF gradientRect = QRectF())\n{\n    p->save();\n    if (brush.style() >= Qt::LinearGradientPattern && brush.style() <= Qt::ConicalGradientPattern) {\n        if (!gradientRect.isNull()) {\n            QTransform m = QTransform::fromTranslate(gradientRect.left(), gradientRect.top());\n            m.scale(gradientRect.width(), gradientRect.height());\n            brush.setTransform(m);\n            const_cast<QGradient *>(brush.gradient())->setCoordinateMode(QGradient::LogicalMode);\n        }\n    } else {\n        p->setBrushOrigin(rect.topLeft());\n    }\n    p->fillRect(rect, brush);\n    p->restore();\n}\n\n//copy of QTextDocument\nstatic bool findInBlock(const QTextBlock &block, const QRegExp &expression, int offset,\n                        QTextDocument::FindFlags options, QTextCursor &cursor)\n{\n    const QRegExp expr(expression);\n    QString text = block.text();\n    text.replace(QChar::Nbsp, QLatin1Char(' '));\n\n    int idx = -1;\n    while (offset >=0 && offset <= text.length()) {\n        idx = (options & QTextDocument::FindBackward) ?\n               expr.lastIndexIn(text, offset) : expr.indexIn(text, offset);\n\n        if (idx == -1 || expr.matchedLength() == 0)\n            return false;\n\n        if (options & QTextDocument::FindWholeWords) {\n            const int start = idx;\n            const int end = start + expr.matchedLength();\n            if ((start != 0 && isIdentifierChar(text.at(start - 1)))\n                || (end != text.length() && isIdentifierChar(text.at(end)))) {\n                //if this is not a whole word, continue the search in the string\n                offset = (options & QTextDocument::FindBackward) ? idx-1 : end+1;\n                idx = -1;\n                continue;\n            }\n        }\n        //we have a hit, return the cursor for that.\n        break;\n    }\n    if (idx == -1)\n        return false;\n    cursor = QTextCursor(block.docHandle(), block.position() + idx);\n    cursor.setPosition(cursor.position() + expr.matchedLength(), QTextCursor::KeepAnchor);\n    return true;\n}\n\nvoid LiteEditorWidgetBase::paintEvent(QPaintEvent *e)\n{  \n    QPainter painter(viewport());\n    QTextDocument *doc = this->document();\n    QTextCursor cursor = textCursor();\n\n    const QFontMetricsF fm(this->font());\n    qreal averageCharWidth = fm.averageCharWidth();\n    int charOffsetX = this->document()->documentMargin()- this->horizontalScrollBar()->value();\n\n    bool hasSelection = cursor.hasSelection();\n    int selectionStart = cursor.selectionStart();\n    int selectionEnd = cursor.selectionEnd();\n\n    QTextBlock block = firstVisibleBlock();\n    QPointF offset = contentOffset();\n    qreal offsetX = offset.x();\n\n    //QPlainTextEdit::paintEvent\n    QRect er = e->rect();\n    QRect viewportRect = viewport()->rect();\n    qreal viewportOffsetLeft = viewportRect.left()-offsetX;\n    qreal viewportOffsetRight = viewportRect.right()-offsetX;\n\n    painter.setPen(this->palette().color(QPalette::Text));\n    painter.fillRect(er,this->palette().brush(QPalette::Base));\n\n    bool editable = !isReadOnly();\n\n    qreal maximumWidth = document()->documentLayout()->documentSize().width();\n\n    // Set a brush origin so that the WaveUnderline knows where the wave started\n    painter.setBrushOrigin(offset);\n\n    // keep right margin clean from full-width selection\n    int maxX = offset.x() + qMax((qreal)viewportRect.width(), maximumWidth)\n               - document()->documentMargin();\n    er.setRight(qMin(er.right(), maxX));\n    painter.setClipRect(er);\n\n\n    QAbstractTextDocumentLayout::PaintContext context = getPaintContext();\n\n    static bool bc = true;\n    bc = !bc;\n    context.cursorPosition = bc ? -1 : cursor.position();\n    if (!hasFocus()) {\n        context.cursorPosition = -1;\n    }\n\n    int blockSelectionIndex = -1;\n    if (m_inBlockSelectionMode\n        && context.selections.count() && context.selections.last().cursor == textCursor()) {\n        blockSelectionIndex = context.selections.size()-1;\n        context.selections[blockSelectionIndex].format.clearBackground();\n    }\n\n    while (block.isValid()) {\n        QRectF r = blockBoundingRect(block).translated(offset);\n\n        if (!block.isVisible()) {\n            offset.ry() += r.height();\n            block = block.next();\n            continue;\n        }\n\n        QTextLayout *layout = block.layout();\n        if (!layout->cacheEnabled()) {\n            layout->setCacheEnabled(true);\n        }\n\n        if (r.bottom() >= er.top() && r.top() <= er.bottom()) {\n            QTextBlockFormat blockFormat = block.blockFormat();\n\n            QBrush bg = blockFormat.background();\n            if (bg != Qt::NoBrush) {\n                QRectF contentsRect = r;\n                contentsRect.setWidth(qMax(r.width(), maximumWidth));\n                fillBackground(&painter, contentsRect, bg);\n            }\n\n            QVector<QTextLayout::FormatRange> selections;\n            QVector<QTextLayout::FormatRange> prioritySelections;\n\n            int blpos = block.position();\n            int bllen = block.length();\n\n            for (int i = 0; i < context.selections.size(); ++i) {\n                const QAbstractTextDocumentLayout::Selection &range = context.selections.at(i);\n                const int selStart = range.cursor.selectionStart() - blpos;\n                const int selEnd = range.cursor.selectionEnd() - blpos;\n                if (selStart < bllen && selEnd >= 0\n                    && selEnd >= selStart) {\n                    QTextLayout::FormatRange o;\n                    o.start = selStart;\n                    o.length = selEnd - selStart;\n                    o.format = range.format;\n                    if (i == blockSelectionIndex) {\n                        QString text = block.text();\n                        const TextEditor::TabSettings &ts = this->tabSettings();\n                        o.start = ts.positionAtColumn(text, m_blockSelection.firstVisualColumn);\n                        o.length = ts.positionAtColumn(text,m_blockSelection.lastVisualColumn) - o.start;\n                    }\n//                    if ((hasSelection && i == context.selections.size()-1)\n//                        || (o.format.foreground().style() == Qt::NoBrush\n//                        && o.format.underlineStyle() != QTextCharFormat::NoUnderline\n//                        && o.format.background() == Qt::NoBrush)) {\n//                        prioritySelections.append(o);\n//                    } else {\n                        selections.append(o);\n                   // }\n                } else if (!range.cursor.hasSelection() && range.format.hasProperty(QTextFormat::FullWidthSelection)\n                           && block.contains(range.cursor.position())) {\n                    // for full width selections we don't require an actual selection, just\n                    // a position to specify the line. that's more convenience in usage.\n                    QTextLayout::FormatRange o;\n                    QTextLine l = layout->lineForTextPosition(range.cursor.position() - blpos);\n                    o.start = l.textStart();\n                    o.length = l.textLength();\n                    if (o.start + o.length == bllen - 1)\n                        ++o.length; // include newline\n                    o.format = range.format;\n                    selections.append(o);\n                }\n            }\n            selections += prioritySelections;\n//            for (int i = 0; i < context.selections.size(); ++i) {\n//                const QAbstractTextDocumentLayout::Selection &range = context.selections.at(i);\n//                const int selStart = range.cursor.selectionStart() - blpos;\n//                const int selEnd = range.cursor.selectionEnd() - blpos;\n//                if (!hasSelection && range.cursor.selectionEnd() == selectionEnd) {\n//                    continue;\n//                }\n//                if (selStart < bllen && selEnd > 0\n//                    && selEnd > selStart) {\n//                    QTextLayout::FormatRange o;\n//                    o.start = selStart;\n//                    o.length = selEnd - selStart;\n//                    QTextCharFormat formatCopy(range.format);\n//                    formatCopy.clearForeground();\n//                    o.format = formatCopy;\n//                    if (!o.format.hasProperty(LiteEditorWidgetBase::MatchBrace)) {\n//                        //o.format.setForeground(palette().highlightedText());\n//                        o.format.setBackground(palette().highlight());\n//                    }\n//                    selections.append(o);\n//                } else if (!range.cursor.hasSelection() && range.format.hasProperty(QTextFormat::FullWidthSelection)\n//                           && block.contains(range.cursor.position())) {\n//                    // for full width selections we don't require an actual selection, just\n//                    // a position to specify the line. that's more convenience in usage.\n//                    QTextLayout::FormatRange o;\n//                    QTextLine l = layout->lineForTextPosition(range.cursor.position() - blpos);\n//                    o.start = l.textStart();\n//                    o.length = l.textLength();\n//                    if (o.start + o.length == bllen - 1)\n//                        ++o.length; // include newline\n//                    o.format = range.format;\n//                    selections.append(o);\n//                }\n//            }\n            if (block == textCursor().block()) {\n                QTextLine l = layout->lineForTextPosition(textCursor().positionInBlock());\n                QRectF rr = l.rect();\n                rr.moveTop(rr.top() + r.top());\n                rr.setLeft(offset.x());\n                rr.setRight(viewportRect.width() - offset.x());\n                painter.fillRect(rr, m_currentLineBackground);\n            }\n            bool findSelectionMark = false;\n            if (!m_findExpression.isEmpty()) {\n                painter.save();\n                QColor color(this->palette().color(QPalette::Text));\n                color.setAlpha(128);\n                painter.setPen(color);\n                int pos = 0;\n                while (true) {\n                    QTextCursor cur;\n                    if (!findInBlock(block,m_findExpression,pos,m_findFlags,cur)) {\n                        break;\n                    }\n                    findSelectionMark = true;\n                    pos = cur.selectionEnd()-block.position();\n                    QTextLine l = layout->lineForTextPosition(cur.selectionStart()-blpos);\n                    qreal left = l.cursorToX(cur.selectionStart()-blpos);\n                    qreal right = l.cursorToX(cur.selectionEnd()-blpos);\n                    if (right >= viewportOffsetLeft && left <= viewportOffsetRight) {\n                        painter.drawRoundedRect(offsetX+left,r.top()+l.y(),right-left,l.height(),3,3);\n                    }\n                }\n                painter.restore();\n            } else if (!m_selectionExpression.isEmpty()) {\n                painter.save();\n                QColor color(this->palette().color(QPalette::Text));\n                color.setAlpha(128);\n                painter.setPen(color);\n                int pos = 0;\n                while (true) {\n                    QTextCursor cur;\n                    if (!findInBlock(block,m_selectionExpression,pos,QTextDocument::FindWholeWords,cur)) {\n                        break;\n                    }\n                    findSelectionMark = true;\n                    pos = cur.selectionEnd()-block.position();\n                    if (selectionStart == cur.selectionStart() &&\n                            selectionEnd == cur.selectionEnd()) {\n                        continue;\n                    }\n                    QTextLine l = layout->lineForTextPosition(cur.selectionStart()-blpos);\n                    qreal left = l.cursorToX(cur.selectionStart()-blpos);\n                    qreal right = l.cursorToX(cur.selectionEnd()-blpos);\n                    if (right >= viewportOffsetLeft && left <= viewportOffsetRight) {\n                         painter.drawRoundedRect(offsetX+left,r.top()+l.y(),right-left,l.height(),3,3);\n                    }\n                }\n                painter.restore();\n            }\n            TextEditor::BaseTextDocumentLayout::userData(block)->setFindExpressionMark(findSelectionMark);\n\n            QRectF blockSelectionCursorRect;\n            if (m_inBlockSelectionMode\n                    && block.position() >= m_blockSelection.firstBlock.block().position()\n                    && block.position() <= m_blockSelection.lastBlock.block().position()) {\n                QString text = block.text();\n                const TextEditor::TabSettings &ts = this->tabSettings();\n                qreal spacew = QFontMetricsF(font()).width(QLatin1Char(' '));\n\n                int offset = 0;\n                int relativePos  =  ts.positionAtColumn(text, m_blockSelection.firstVisualColumn, &offset);\n                QTextLine line = layout->lineForTextPosition(relativePos);\n                qreal x = line.cursorToX(relativePos) + offset * spacew;\n\n                int eoffset = 0;\n                int erelativePos  =  ts.positionAtColumn(text, m_blockSelection.lastVisualColumn, &eoffset);\n                QTextLine eline = layout->lineForTextPosition(erelativePos);\n                qreal ex = eline.cursorToX(erelativePos) + eoffset * spacew;\n\n                QRectF rr = line.naturalTextRect();\n                rr.moveTop(rr.top() + r.top());\n                rr.setLeft(r.left() + x);\n                if (line.lineNumber() == eline.lineNumber())\n                    rr.setRight(r.left() + ex);\n                painter.fillRect(rr, palette().highlight());\n                if ((m_blockSelection.anchor == TextEditor::BaseTextBlockSelection::TopLeft\n                        && block == m_blockSelection.firstBlock.block())\n                        || (m_blockSelection.anchor == TextEditor::BaseTextBlockSelection::BottomLeft\n                            && block == m_blockSelection.lastBlock.block())\n                        ) {\n                    rr.setRight(rr.left()+2);\n                    blockSelectionCursorRect = rr;\n                }\n                for (int i = line.lineNumber() + 1; i < eline.lineNumber(); ++i) {\n                    rr = layout->lineAt(i).naturalTextRect();\n                    rr.moveTop(rr.top() + r.top());\n                    rr.setLeft(r.left() + x);\n                    painter.fillRect(rr, palette().highlight());\n                }\n\n                rr = eline.naturalTextRect();\n                rr.moveTop(rr.top() + r.top());\n                rr.setRight(r.left() + ex);\n                if (line.lineNumber() != eline.lineNumber())\n                    painter.fillRect(rr, palette().highlight());\n                if ((m_blockSelection.anchor == TextEditor::BaseTextBlockSelection::TopRight\n                     && block == m_blockSelection.firstBlock.block())\n                        || (m_blockSelection.anchor == TextEditor::BaseTextBlockSelection::BottomRight\n                            && block == m_blockSelection.lastBlock.block())) {\n                    rr.setLeft(rr.right()-2);\n                    blockSelectionCursorRect = rr;\n                }\n            }\n\n            bool drawCursor = ( editable\n                               && context.cursorPosition >= blpos\n                               && context.cursorPosition < blpos + bllen);\n\n            bool drawCursorAsBlock = drawCursor && overwriteMode() ;\n\n            if (drawCursorAsBlock) {\n                if (context.cursorPosition == blpos + bllen - 1) {\n                    drawCursorAsBlock = false;\n                } else {\n                    QTextLayout::FormatRange o;\n                    o.start = context.cursorPosition - blpos;\n                    o.length = 1;\n                    o.format.setForeground(palette().base());\n                    o.format.setBackground(palette().text());                    \n                    selections.append(o);\n                }\n            }\n\n            QRect clip = er;\n            clip.setTop(r.top());\n            clip.setBottom(r.bottom());\n            layout->draw(&painter, offset, selections, clip);\n\n            if (!m_inBlockSelectionMode) {\n                if ((drawCursor && !drawCursorAsBlock)\n                    || (editable && context.cursorPosition < -1\n                        && !layout->preeditAreaText().isEmpty())) {\n                    int cpos = context.cursorPosition+m_inputCursorOffset;\n                    if (cpos < -1)\n                        cpos = layout->preeditAreaPosition() - (cpos + 2);\n                    else\n                        cpos -= blpos;\n                    layout->drawCursor(&painter, offset, cpos, cursorWidth());\n                }\n            }\n\n#ifndef Q_OS_MAC\n            if (blockSelectionCursorRect.isValid())\n                painter.fillRect(blockSelectionCursorRect, palette().text());\n#endif\n        }\n\n        //draw indent line\n        if (m_indentLineVisible) {\n            QString text = block.text();\n            int pos = text.length();\n            for (int i = 0; i < pos; i++) {\n                if (!text.at(i).isSpace()) {\n                    pos = i;\n                    break;\n                }\n            }\n\n            QTextLine line = layout->lineForTextPosition(pos);\n            int kt = r.top()+1;\n            int kb = r.top()+line.height()-1;\n            int k = line.cursorToX(pos)/averageCharWidth;\n\n            painter.save();\n            painter.setPen(QPen(m_indentLineForeground,1,Qt::DotLine));\n            for (int i = 0; i < k; i+=m_nTabSize) {\n                int xoff = charOffsetX+averageCharWidth*i;\n                painter.drawLine(xoff,kt,xoff,kb);\n            }\n            painter.restore();\n        }\n        if (m_visualizeWhitespace) {\n            QString text = block.text();\n            painter.save();\n            for (int i = 0; i < text.length(); i++) {\n                QTextLine line = layout->lineForTextPosition(i);\n                if (line.cursorToX(i) > er.right()) {\n                    break;\n                }\n                if (text.at(i) == '\\t') {\n                     painter.setPen(QPen(m_visualizeWhitespaceForeground,1));\n                     QTextLine line = layout->lineForTextPosition(i);\n                     QRectF lineRect = line.naturalTextRect().translated(offset.x(), r.top());\n                     qreal left = line.cursorToX(i)+offset.x()+2;\n                     qreal right = line.cursorToX(i+1)+offset.x()-4;\n                     qreal y = lineRect.top()+line.height()/2;\n                     painter.drawLine(left,y,right,y);\n                     painter.drawLine(right-4,y-4,right,y);\n                     painter.drawLine(right-4,y+4,right,y);\n                } else if (text.at(i).isSpace()) {\n                    painter.setPen(QPen(m_visualizeWhitespaceForeground,2));\n                    QTextLine line = layout->lineForTextPosition(i);\n                    QRectF lineRect = line.naturalTextRect().translated(offset.x(), r.top());\n                    qreal left = line.cursorToX(i)+offset.x();\n                    qreal right = line.cursorToX(i+1)+offset.x();\n                    qreal y = lineRect.top()+line.height()/2;\n                    painter.drawPoint(left+(right-left)/2,y);\n                }\n            }\n            painter.restore();\n        }\n        QTextBlock nextBlock = block.next();\n        //draw wrap\n        int lineCount = layout->lineCount();\n        if (lineCount >= 2 || !nextBlock.isValid()) {\n            painter.save();\n            painter.setPen(Qt::lightGray);\n            for (int i = 0; i < lineCount-1; ++i) { // paint line wrap indicator\n                QTextLine line = layout->lineAt(i);\n                QRectF lineRect = line.naturalTextRect().translated(offset.x(), r.top());\n                QChar visualArrow((ushort)0x21b5);\n                painter.drawText(QPointF(lineRect.right(),\n                                         lineRect.top() + line.ascent()),\n                                 visualArrow);\n            }\n            if (m_eofVisible && !nextBlock.isValid()) { // paint EOF symbol\n                QTextLine line = layout->lineAt(lineCount-1);\n                QRectF lineRect = line.naturalTextRect().translated(offset.x(), r.top());\n                int h = 4;\n                lineRect.adjust(0, 0, -1, -1);\n                QPainterPath path;\n                QPointF pos(lineRect.topRight() + QPointF(h+4, line.ascent()));\n                path.moveTo(pos);\n                path.lineTo(pos + QPointF(-h, -h));\n                path.lineTo(pos + QPointF(0, -2*h));\n                path.lineTo(pos + QPointF(h, -h));\n                path.closeSubpath();\n                painter.setBrush(painter.pen().color());\n                painter.drawPath(path);\n            }\n            painter.restore();\n        }\n\n        //draw fold text ...\n        QTextBlock nextVisibleBlock = nextBlock;\n\n        if (!nextVisibleBlock.isVisible()) {\n            // invisible blocks do have zero line count\n            nextVisibleBlock = doc->findBlockByLineNumber(nextVisibleBlock.firstLineNumber());\n            // paranoia in case our code somewhere did not set the line count\n            // of the invisible block to 0\n            while (nextVisibleBlock.isValid() && !nextVisibleBlock.isVisible())\n                nextVisibleBlock = nextVisibleBlock.next();\n        }\n\n        if (nextBlock.isValid() && !nextBlock.isVisible()) {\n\n            bool selectThis = (hasSelection\n                               && nextBlock.position() >= selectionStart\n                               && nextBlock.position() < selectionEnd);\n            if (selectThis) {\n                painter.save();\n                painter.setBrush(palette().highlight());\n            }\n\n            QTextLayout *layout = block.layout();\n            QTextLine line = layout->lineAt(layout->lineCount()-1);\n            QRectF lineRect = line.naturalTextRect().translated(offset.x(), r.top());\n            lineRect.adjust(0, 0, -1, -1);\n\n            QRectF collapseRect(lineRect.right() + 12,\n                                lineRect.top(),\n                                fontMetrics().width(QLatin1String(\" {...}; \")),\n                                lineRect.height());\n            painter.setRenderHint(QPainter::Antialiasing, true);\n            painter.translate(.5, .5);\n            painter.drawRoundedRect(collapseRect.adjusted(0, 0, 0, -1), 3, 3);\n            painter.setRenderHint(QPainter::Antialiasing, false);\n            painter.translate(-.5, -.5);\n\n            QString replacement = QLatin1String(\"...\");\n\n            if (TextEditor::TextBlockUserData *nextBlockUserData = TextEditor::BaseTextDocumentLayout::testUserData(nextBlock)) {\n                if (nextBlockUserData->foldingStartIncluded())\n                    replacement.prepend(nextBlock.text().trimmed().left(1));\n            }\n\n            block = nextVisibleBlock.previous();\n            if (!block.isValid())\n                block = doc->lastBlock();\n\n            if (TextEditor::TextBlockUserData *blockUserData = TextEditor::BaseTextDocumentLayout::testUserData(block)) {\n                if (blockUserData->foldingEndIncluded()) {\n                    QString right = block.text().trimmed();\n                    if (right.endsWith(QLatin1Char(';'))) {\n                        right.chop(1);\n                        right = right.trimmed();\n                        replacement.append(right.right(right.endsWith(QLatin1Char('/')) ? 2 : 1));\n                        replacement.append(QLatin1Char(';'));\n                    } else {\n                        replacement.append(right.right(right.endsWith(QLatin1Char('/')) ? 2 : 1));\n                    }\n                }\n            }\n\n            if (selectThis)\n                painter.setPen(palette().highlightedText().color());\n            painter.drawText(collapseRect, Qt::AlignCenter, replacement);\n            if (selectThis)\n                painter.restore();\n        }\n\n        offset.ry() += r.height();\n\n        if (offset.y() > viewportRect.height())\n            break;\n        block = block.next();\n    }\n\n    if (backgroundVisible() && !block.isValid() && offset.y() <= er.bottom()\n        && (centerOnScroll() || verticalScrollBar()->maximum() == verticalScrollBar()->minimum())) {\n        painter.fillRect(QRect(QPoint((int)er.left(), (int)offset.y()), er.bottomRight()), palette().background());\n    }\n\n    if (m_rightLineVisible) {\n        int xoff = charOffsetX+averageCharWidth*m_rightLineWidth;\n        painter.save();\n        painter.setPen(QPen(m_indentLineForeground,1,Qt::DotLine));\n        painter.drawLine(xoff,0,xoff,rect().height());\n        painter.restore();\n    }\n}\n\nbool LiteEditorWidgetBase::hasBlockSelection() const\n{\n    return m_inBlockSelectionMode;\n}\n\nvoid LiteEditorWidgetBase::transformSelection(TransformationMethod method)\n{\n    if (hasBlockSelection()) {\n         transformBlockSelection(method);\n         return;\n    }\n    QTextCursor cursor = this->textCursor();\n    int pos    = cursor.position();\n    int anchor = cursor.anchor();\n\n    if (!cursor.hasSelection()) {\n        // if nothing is selected, select the word over the cursor\n        cursor.select(QTextCursor::WordUnderCursor);\n    }\n\n    QString text = cursor.selectedText();\n    QString transformedText = method(text);\n\n    if (transformedText == text) {\n        // if the transformation does not do anything to the selection, do no create an undo step\n        return;\n    }\n\n    cursor.insertText(transformedText);\n\n    // (re)select the changed text\n    // Note: this assumes the transformation did not change the length,\n    cursor.setPosition(anchor);\n    cursor.setPosition(pos, QTextCursor::KeepAnchor);\n    this->setTextCursor(cursor);\n}\n\nint LiteEditorWidgetBase::verticalBlockSelectionFirstColumn() const\n{\n    if (m_inBlockSelectionMode)\n        return m_blockSelection.firstVisualColumn;\n    return -1;\n}\n\nint LiteEditorWidgetBase::verticalBlockSelectionLastColumn() const\n{\n    if (m_inBlockSelectionMode)\n        return m_blockSelection.lastVisualColumn;\n    return -1;\n}\n\nvoid LiteEditorWidgetBase::transformBlockSelection(TransformationMethod method)\n{\n    QTextCursor cursor = textCursor();\n    int minPos = cursor.anchor();\n    int maxPos = cursor.position();\n    if (minPos > maxPos)\n        qSwap(minPos, maxPos);\n    int leftBound = verticalBlockSelectionFirstColumn();\n    int rightBound = verticalBlockSelectionLastColumn();\n    TextEditor::BaseTextBlockSelection::Anchor anchorPosition = m_blockSelection.anchor;\n    QString text = cursor.selectedText();\n    QString transformedText = text;\n    QTextBlock currentLine = document()->findBlock(minPos);\n    int lineStart = currentLine.position();\n    do {\n        if (currentLine.contains(lineStart + leftBound)) {\n            int currentBlockWidth = qBound(0, currentLine.text().length() - leftBound,\n                                           rightBound - leftBound);\n            cursor.setPosition(lineStart + leftBound);\n            cursor.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor, currentBlockWidth);\n            transformedText.replace(lineStart + leftBound - minPos, currentBlockWidth,\n                                                method(cursor.selectedText()));\n        }\n        currentLine = currentLine.next();\n        if (!currentLine.isValid())\n            break;\n        lineStart = currentLine.position();\n    } while (lineStart < maxPos);\n\n    if (transformedText == text) {\n        // if the transformation does not do anything to the selection, do no create an undo step\n        return;\n    }\n\n    cursor.setPosition(minPos);\n    cursor.setPosition(maxPos, QTextCursor::KeepAnchor);\n    cursor.insertText(transformedText);\n    // restore former block selection\n    if (anchorPosition <= TextEditor::BaseTextBlockSelection::TopRight)\n        qSwap(minPos, maxPos);\n    cursor.setPosition(minPos);\n    cursor.setPosition(maxPos, QTextCursor::KeepAnchor);\n    m_blockSelection.fromSelection(tabSettings(), cursor);\n    m_blockSelection.anchor = anchorPosition;\n    m_inBlockSelectionMode = true;\n    m_blockSelection.firstVisualColumn = leftBound;\n    m_blockSelection.lastVisualColumn = rightBound;\n    setTextCursor(m_blockSelection.selection(tabSettings()));\n    viewport()->update();\n}\n\n// Update selections or find marks.\nvoid LiteEditorWidgetBase::updateFindOrSelectionMark(LiteApi::EditorNaviagteType type)\n{\n    clearAllNavigateMark(type, \"\");\n\n    if (!checkFindOrSelectionMark(type))\n        return;\n\n    QTextDocument *doc = this->document();\n    QTextCursor cur;\n    for (QTextBlock it = doc->begin(); it != doc->end(); it = it.next())\n    {\n        if (!checkFindOrSelectionMarkBlock(it, type,cur))\n            continue;\n        int blockNumber = it.blockNumber();\n        int offset = cur.selectionStart()-it.position();\n        int selection = cur.selectionEnd()-cur.selectionStart();\n        insertNavigateMark(blockNumber, type, QString(\"%1: %2\").arg(blockNumber+1).arg(it.text()), \"\",offset,selection);\n    }\n}\n\nbool LiteEditorWidgetBase::checkFindOrSelectionMark(LiteApi::EditorNaviagteType type) const\n{\n    if (LiteApi::EditorNavigateFind == type) {\n        return !m_findExpression.isEmpty();\n    }\n    if (LiteApi::EditorNavigateSelection == type) {\n        return !m_selectionExpression.isEmpty() && m_findExpression.isEmpty();\n    }\n    return false;\n}\n\nbool LiteEditorWidgetBase::checkFindOrSelectionMarkBlock(\n    const QTextBlock &block, LiteApi::EditorNaviagteType type, QTextCursor &cur) const\n{\n    int pos = 0;\n    if (LiteApi::EditorNavigateFind == type)\n        return findInBlock(block, m_findExpression, pos, m_findFlags, cur);\n    if (LiteApi::EditorNavigateSelection == type)\n        return findInBlock(block, m_selectionExpression, pos,\n                           QTextDocument::FindWholeWords, cur);\n    return false;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/liteeditorwidgetbase.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteeditorwidgetbase.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEEDITORWIDGETBASE_H\n#define LITEEDITORWIDGETBASE_H\n\n#include <QPlainTextEdit>\n#include <QTextBlock>\n#include \"liteeditorapi/liteeditorapi.h\"\n#include \"qtc_texteditor/autocompleter.h\"\n#include \"qtc_texteditor/basetextblockselection.h\"\n\nclass NavigateManager;\nstruct NavigateMark;\n\ntypedef QString (TransformationMethod)(const QString &);\n\nclass LiteEditorWidgetBase : public QPlainTextEdit\n{\n    Q_OBJECT\npublic:\n    enum TextFormatProperty {\n        MatchBrace = QTextFormat::UserProperty+1,\n        CurrentLine\n    };\n\n    LiteEditorWidgetBase(LiteApi::IApplication *app, QWidget *parent = 0);\n    virtual ~LiteEditorWidgetBase();\n    void initLoadDocument();\n    void setTabSize(int n);\n    int tabSize() const;\n    void updateTabWidth();\n    void setTabToSpaces(bool b);\n    void setEditorMark(LiteApi::IEditorMark *mark);\n    void setTextLexer(LiteApi::ITextLexer *lexer);\npublic:\n    QWidget* extraArea();\n    QWidget* navigateArea();\n    void setExtraColor(const QColor &foreground,const QColor &background);\n    void setCurrentLineColor(const QColor &background);\n    void setMatchBracketsColor(const QColor &background);\n    void setIndentLineColor(const QColor &foreground);\n    void setVisualizeWhitespaceColor(const QColor &foreground);\n    int extraAreaWidth();\n    void extraAreaPaintEvent(QPaintEvent *e);\n    void extraAreaMouseEvent(QMouseEvent *e);\n    void extraAreaLeaveEvent(QEvent *e);\n    int navigateAreaWidth();\n    int isInNavigateMark(const QPoint &pos, int *poffset);\n    NavigateMark* findNavigateMarkByPos(const QPoint &pos, int *poffset, int *pLine);\n    bool isInNavigateHead(const QPoint &pos);\n    void navigateAreaPaintEvent(QPaintEvent *e);\n    void navigateAreaMouseEvent(QMouseEvent *e);\n    void navigateAreaLeaveEvent(QEvent *e);\n    void navigateAreaEnterEvent(QEvent *e);\n    void resizeEvent(QResizeEvent *e);\n    void showToolTipInfo(const QPoint & pos, const QString & text);\n    void cleanWhitespace(QTextCursor &cursor, bool inEntireDocument);\n    void ensureFinalNewLine(QTextCursor& cursor);\n    void setNavigateHead(LiteApi::EditorNaviagteType type, const QString &msg);\n    void insertNavigateMark(int blockNumber, LiteApi::EditorNaviagteType type, const QString &msg, const QString &tag, int offset = 0, int selection = 0);\n    void clearAllNavigateMark(LiteApi::EditorNaviagteType types, const QString &tag = 0);\n    void clearAllNavigateMarks();\nsignals:\n    void navigationStateChanged(const QByteArray &array);\n    void overwriteModeChanged(bool);\n    void updateLink(const QTextCursor &curosr, const QPoint &pos, bool nav);\npublic:\n    void saveCurrentCursorPositionForNavigation();\n    bool restoreState(const QByteArray &state);\n    QByteArray saveState() const;\nprotected:\n    QByteArray m_tempNavigationState;\npublic slots:\n    void verticalScrollBarRangeChanged(int minnum,int maxnum);\n    void cleanWhitespace(bool wholeDocument = false);\n    void editContentsChanged(int position, int charsRemoved, int charsAdded);\n    virtual void highlightCurrentLine();\n    virtual void slotUpdateExtraAreaWidth();\n    virtual void slotModificationChanged(bool);\n    virtual void slotUpdateRequest(const QRect &r, int dy);\n    virtual void slotCursorPositionChanged();\n    virtual void slotSelectionChanged();\n    virtual void slotUpdateBlockNotify(const QTextBlock &);\n    QChar characterAt(int pos) const;\n    void handleHomeKey(bool anchor);    \n    void setFindOption(LiteApi::FindOption *opt);\npublic slots:\n    void gotoMatchBrace();\n    void gotoLine(int blockNumber, int column, bool center, int selection = 0) ;\n\n    void gotoLineStart();\n    void gotoLineStartWithSelection();\n    void gotoLineEnd();\n    void gotoLineEndWithSelection();\n    void gotoNextLine();\n    void gotoNextLineWithSelection();\n    void gotoPreviousLine();\n    void gotoPreviousLineWithSelection();\n    void gotoPreviousCharacter();\n    void gotoPreviousCharacterWithSelection();\n    void gotoNextCharacter();\n    void gotoNextCharacterWithSelection();\n    void gotoPreviousWord();\n    void gotoPreviousWordWithSelection();\n    void gotoNextWord();\n    void gotoNextWordWithSelection();\n    void gotoDocStart();\n    void gotoDocEnd();\n\n    void duplicate();\n\n    void cutLine();\n    void copyLine();\n    void deleteLine();\n\n    void deleteEndOfWord();\n    void deleteStartOfWord();\n\n    void moveLineUp();\n    void moveLineDown();\n\n    void copyLineUp();\n    void copyLineDown();\n\n    void joinLines();\n\n    void insertLineBefore();\n    void insertLineAfter();\n\n    void gotoPrevBlock();\n    void gotoNextBlock();\n    void selectBlock();\n    bool findPrevBlock(QTextCursor &cursor, int indent, const QString &skip = \"//\") const;\n    bool findNextBlock(QTextCursor &cursor, int indent, const QString &skip = \"//\") const;\n    bool findStartBlock(QTextCursor &cursor, int indent) const;\n    bool findEndBlock(QTextCursor &cursor, int indent) const;\n    void fold();\n    void unfold();\n    void foldAll();\n    void unfoldAll();\n    void updateBlock(const QTextBlock &);\n    void documentSizeChanged(QSizeF);\n    void moveCursorVisible(bool ensureVisible);\n    void toggleBlockVisible(const QTextBlock &block);\n    void foldIndentChanged(QTextBlock block);\n    void autoIndent();\n\n    void convertCaseTitle();\n    void convertCaseUpper();\n    void convertCaseLower();\n    void convertCaseSwap();\n\n    void convertTabToSpaces();\n    void convertSpacesToTab();\n    void switchTabToSpace(bool tabtospace);\npublic:\n    void setMaxTipInfoLines(int maxLines) {\n        m_maxTipInfoLines = maxLines;\n    }\n\n    void setMimeType(const QString &mime) {\n        m_mimeType = mime;\n    }\n\n    void setAutoIndent(bool b){\n        m_autoIndent = b;\n    }\n    void setAutoBraces0(bool b) {\n        m_autoBraces0 = b;\n    }\n    void setAutoBraces1(bool b) {\n        m_autoBraces1 = b;\n    }\n    void setAutoBraces2(bool b) {\n        m_autoBraces2 = b;\n    }\n    void setAutoBraces3(bool b) {\n        m_autoBraces3 = b;\n    }\n    void setAutoBraces4(bool b) {\n        m_autoBraces4 = b;\n    }\n    void setAutoBraces5(bool b) {\n        m_autoBraces5 = b;\n    }\n    void setLineNumberVisible(bool b) {\n        m_lineNumbersVisible = b;\n        slotUpdateExtraAreaWidth();\n    }\n    void setNatigateWidgetVisible(bool b) {\n        m_navigateWidgetVisible = b;\n        slotUpdateExtraAreaWidth();\n    }\n    void setMarksVisible(bool b) {\n        m_marksVisible = b;\n        slotUpdateExtraAreaWidth();\n    }\n    bool lineNumberVisible() const {\n        return m_lineNumbersVisible;\n    }\n    bool marksVisiable() const {\n        return m_marksVisible;\n    }\n    void setRightLineVisible(bool b) {\n        m_rightLineVisible = b;\n    }\n    bool rightLineVisible() const {\n        return m_rightLineVisible;\n    }\n    void setRightLineWidth(int w) {\n        m_rightLineWidth = w;\n    }\n    int rightLineWidth() const {\n        return m_rightLineWidth;\n    }\n    void setEofVisible(bool b) {\n        m_eofVisible = b;\n    }\n    void setCodeFoldVisible(bool b) {\n        m_codeFoldingVisible = b;\n    }\n    bool codeFoldVisible() const {\n        return m_codeFoldingVisible;\n    }\n    void setIndentLineVisible(bool b) {\n        m_indentLineVisible = b;\n    }\n    bool indentLineVisible() const {\n        return m_indentLineVisible;\n    }\n    void setAllowVscrollLastLine(bool b);\n    bool allowVscrollLastLine() const {\n        return m_allowVscrollLastLine;\n    }\n    bool isLineWrap() const;\n    void setLineWrap(bool wrap);\n    void maybeSelectLine();\n    bool isSpellCheckingAt(QTextCursor cur) const;\n    void showLink(const LiteApi::Link &link);\n    void clearLink();\n    bool openLink(const LiteApi::Link &link);\n    void testUpdateLink(QMouseEvent *e);\n    void setExtraSelections(LiteApi::ExtraSelectionKind kind, const QList<QTextEdit::ExtraSelection> &selections);\n    LiteApi::ITextLexer * textLexer() const {\n        return m_textLexer.data();\n    }\n    QString autoCompleteSurroundText(QTextCursor &cursor, const QString &textToInsert) const;\n    bool checkIsMatchBraces(QTextCursor &cursor, const QString &textToInsert) const;\n    bool autoBackspace(QTextCursor &cursor);\n    void handleBackspaceKey();\n    void setVisualizeWhitespace(bool b);\n    QRectF selectionRect(const QTextCursor &cursor);\n    bool hasBlockSelection() const;\n    void transformSelection(TransformationMethod method);\n    void transformBlockSelection(TransformationMethod method);\n    int verticalBlockSelectionFirstColumn() const;\n    int verticalBlockSelectionLastColumn() const;\nprotected:\n    void drawFoldingMarker(QPainter *painter, const QPalette &pal,\n                           const QRect &rect,\n                           bool expanded) const;\n    bool event(QEvent *e);\n    void keyPressEvent(QKeyEvent *e);\n    void keyReleaseEvent(QKeyEvent *e);\n    void leaveEvent(QEvent *e);\n    void paintEvent(QPaintEvent *);\n    void mousePressEvent(QMouseEvent *e);\n    void mouseReleaseEvent(QMouseEvent *e);\n    void mouseMoveEvent(QMouseEvent *e);\n    bool viewportEvent(QEvent *);\n    void inputMethodEvent(QInputMethodEvent *e);\n    void indentBlock(QTextBlock block, bool bIndent);\n    void indentCursor(QTextCursor cur, bool bIndent);\n    void indentText(QTextCursor cur, bool bIndent);\n    void indentEnter(QTextCursor cur);\n    QString tabText(int n = 1) const;\n    QTextBlock foldedBlockAt(const QPoint &pos, QRect *box = 0) const;\n    void moveLineUpDown(bool up);\n    void copyLineUpDown(bool up);\n    const TextEditor::TabSettings &tabSettings() const;\n    void clearBlockSelection();\n    QString copyBlockSelection() const;\n    void removeBlockSelection(const QString &text = QString());\n    bool selectionVisible(int blockNumber) const;\n    void handleBlockSelection(int diff_row, int diff_col);\npublic slots:\n    virtual void copy();\n    virtual void paste();\n    virtual void cut();\n    virtual void selectAll();\nprotected slots:\n    void uplinkDeployTimeout();\n    void uplinkInfoTimeout();\n    void stopUplinkTimer();\nprivate:\n    // Update selections or find marks.\n    void updateFindOrSelectionMark(LiteApi::EditorNaviagteType type);\n    bool checkFindOrSelectionMark(LiteApi::EditorNaviagteType type) const;\n    bool checkFindOrSelectionMarkBlock(const QTextBlock &block,\n                         LiteApi::EditorNaviagteType type, QTextCursor &cur) const;\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QWidget *m_extraArea;\n    QWidget *m_navigateArea;\n    LiteApi::IEditorMark *m_editorMark;\n    QScopedPointer<LiteApi::ITextLexer> m_textLexer;\n    QMap<LiteApi::ExtraSelectionKind,QList<QTextEdit::ExtraSelection> > m_extralSelectionMap;\n    QTextCursor m_lastSelection;\n    QColor  m_extraForeground;\n    QColor  m_extraBackground;\n    QColor  m_indentLineForeground;\n    QColor  m_currentLineBackground;\n    QColor  m_matchBracketsBackground;\n    QColor  m_visualizeWhitespaceForeground;\n    QRegExp m_selectionExpression;\n    QRegExp m_findExpression;\n    QTextDocument::FindFlags m_findFlags;\n    LiteApi::Link       m_currentLink;\n    QString m_mimeType;\n    bool m_moveLineUndoHack;\n    bool m_lineNumbersVisible;\n    bool m_navigateWidgetVisible;\n    bool m_marksVisible;    \n    bool m_codeFoldingVisible;\n    bool m_rightLineVisible;\n    bool m_eofVisible;\n    bool m_allowVscrollLastLine;\n    int  m_rightLineWidth;\n    int  m_maxTipInfoLines;\n    int  m_inputCursorOffset;\n    bool m_indentLineVisible;\n    bool m_autoIndent;\n    bool m_autoBraces0; //{\n    bool m_autoBraces1; //(\n    bool m_autoBraces2; //[\n    bool m_autoBraces3; //'\n    bool m_autoBraces4; //\"\n    bool m_autoBraces5; //`\n    bool m_bLastBraces;\n    bool m_bTabUseSpace;\n    bool m_mouseNavigation;\n    bool m_showLinkNavigation;\n    bool m_showLinkInfomation;\n    QString m_lastBraceText;\n    int  m_nTabSize;\n    int m_lastSaveRevision;\n    int m_extraAreaSelectionNumber;\n    int m_averageCharWidth;\n    int m_lastLine;\n    int m_upToolTipTime;\n    QTimer *m_upToolTipDeployTimer;\n    QTimer *m_upToolTipTimer;\n    QPoint m_upToolTipPos;\n    QPoint m_lastUpToolTipPos;\n    bool m_linkPressed;\n    bool m_uplinkSkip;\n    bool m_mouseOnFoldedMarker;\n    bool m_contentsChanged;\n    bool m_lastCursorChangeWasInteresting;\n    bool m_visualizeWhitespace;\n    NavigateManager *m_navigateManager;\n    bool m_inBlockSelectionMode;\n    TextEditor::BaseTextBlockSelection m_blockSelection;\n    void showTipText(const QPoint &pos, const QString &text, QWidget *widget);\n    void hideTipText();\n};\n\ninline bool isIdentifierChar(const QChar &ch)\n{\n    return ch.isLetterOrNumber() || ch == QChar('_');\n}\n\n\n#endif // LITEEDITORWIDGETBASE_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/litewordcompleter.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litewordcompleter.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"litewordcompleter.h\"\n#include \"codecompleter.h\"\n#include <QPlainTextEdit>\n#include <QStandardItem>\n#include <QStandardItemModel>\n#include <QTextCursor>\n#include <QTextBlock>\n#include <QTextDocument>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nLiteWordCompleter::LiteWordCompleter(QObject *parent) :\n    LiteCompleter(parent),\n    m_icon(QIcon(\"icon:liteeditor/images/findword.png\"))\n{\n\n}\n\nQString LiteWordCompleter::textUnderCursor(QTextCursor tc) const\n{\n    QString text = tc.block().text().left(tc.positionInBlock());\n    if (text.isEmpty()) {\n        return QString();\n    }\n    static QRegExp reg(\"[a-zA-Z_]+[a-zA-Z0-9_\\\\.@]*$\");\n    int index = reg.indexIn(text);\n    if (index < 0) {\n        return QString();\n    }\n    return text.right(reg.matchedLength());\n}\n\nvoid LiteWordCompleter::completionPrefixChanged(QString prefix,bool force)\n{\n    LiteCompleter::completionPrefixChanged(prefix,force);\n\n    if (m_bExternalMode) {\n        return;\n    }\n\n    if (!m_editor) {\n        return;\n    }\n    if (!m_bSearchSeparator) {\n        if (prefix.indexOf(this->separator()) >= 0) {\n            return;\n        }\n    }\n\n    bool isSep = false;\n    if (prefix.startsWith(\"@.\")) {\n        isSep = true;\n        prefix = prefix.mid(1);\n    }\n\n    QTextCursor tc = m_editor->textCursor();\n    QTextDocument *doc = m_editor->document();\n    int maxNumber = tc.blockNumber();\n    int blockNumber = tc.blockNumber();\n    QTextBlock block = doc->firstBlock();\n    if (maxNumber < 500) {\n        maxNumber = 500;\n    } else {\n        int firstNumber = maxNumber-500;\n        if (firstNumber > 0) {\n            block = doc->findBlockByNumber(firstNumber);\n        }\n    }\n    QRegExp rx(\"([\\\\w\\\\-\\\\_\\\\.]+)\");\n    Qt::CaseSensitivity cs = m_completer->caseSensitivity();\n    int count = 0;\n    while (block.isValid()) {\n        if (block.blockNumber() >= maxNumber) {\n            break;\n        }\n        if (block.blockNumber() == blockNumber) {\n            block = block.next();\n            continue;\n        }\n        QString line = block.text().trimmed();\n        if (!line.isEmpty())  {\n             int pos = 0;\n             while ((pos = rx.indexIn(line, pos)) != -1) {\n                 QString cap = rx.cap(1);\n                 if (cap.length() < 20 && cap.startsWith(prefix,cs)) {\n                     if (isSep) {\n                         cap = \"@\"+cap;\n                     }\n                     count++;\n                     appendItem(cap,m_icon,true);\n                 }\n                 pos += rx.matchedLength();\n             }\n        }\n        block = block.next();\n    }\n    if (count > 0) {\n        this->updateCompleterModel();\n        this->showPopup();\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/litewordcompleter.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litewordcompleter.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEWORDCOMPLETER_H\n#define LITEWORDCOMPLETER_H\n\n#include \"litecompleter.h\"\n#include <QHash>\n#include <QSet>\n#include <QRegExp>\n\nclass QStandardItemModel;\nclass QStandardItem;\nclass QTextCursor;\nclass LiteWordCompleter : public LiteCompleter\n{\n    Q_OBJECT\npublic:\n    explicit LiteWordCompleter(QObject *parent = 0);\npublic slots:\n    virtual void completionPrefixChanged(QString,bool force);\nprotected:\n    virtual QString textUnderCursor(QTextCursor tc) const;\n    QSet<QString>   m_wordSet;\n    QIcon           m_icon;\n};\n\n#endif // LITEWORDCOMPLETER_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/snippetapi.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: snippet.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"snippetapi.h\"\n#include \"qjson/include/QJson/Parser\"\n#include <QFile>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nSnippetApi::SnippetApi(const QString &package)\n    : m_package(package), m_bLoad(false)\n{\n\n}\n\nSnippetApi::~SnippetApi()\n{\n    foreach (LiteApi::Snippet *s, m_snippetList) {\n        delete s;\n    }\n    m_snippetList.clear();\n}\n\nQString SnippetApi::package() const\n{\n    return m_package;\n}\n\nQStringList SnippetApi::apiFiles() const\n{\n    return m_apiFiles;\n}\n\nQList<LiteApi::Snippet*> SnippetApi::snippetList() const\n{\n    return m_snippetList;\n}\n\nbool SnippetApi::loadApi()\n{\n    if (m_bLoad) {\n        return true;\n    }\n    m_bLoad = true;\n    QJson::Parser parser;\n    QString name;\n    QString info;\n    QString text;\n    foreach (QString file, m_apiFiles) {\n        QFile f(file);\n        if (!f.open(QIODevice::ReadOnly)) {\n            continue;\n        }\n        QByteArray data = f.readAll();\n        bool ok;\n        QVariant json = parser.parse(data, &ok);\n        if (ok) {\n            foreach (QVariant v, json.toList()) {\n                QMap<QString,QVariant> m = v.toMap();\n                name = m.value(\"name\").toString();\n                info = m.value(\"info\").toString();\n                text = m.value(\"text\").toString();\n                if (!name.isEmpty() && !info.isEmpty() && !text.isEmpty()) {\n                    LiteApi::Snippet *snippet = new LiteApi::Snippet;\n                    snippet->Name = name;\n                    snippet->Info = info;\n                    snippet->Text = text;\n                    m_snippetList.append(snippet);\n                }\n            }\n        }\n    }\n    return !m_snippetList.isEmpty();\n}\n\nvoid SnippetApi::appendApiFile(const QString &file)\n{\n    m_apiFiles.append(file);\n}\n\nvoid SnippetApi::setApiFiles(const QStringList &files)\n{\n    m_apiFiles = files;\n}\n\nbool SnippetApi::isEmpty() const\n{\n    return m_apiFiles.isEmpty();\n}\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/snippetapi.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: snippetapi.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITESNIPPETAPI_H\n#define LITESNIPPETAPI_H\n\n#include \"liteeditorapi/liteeditorapi.h\"\n\nclass SnippetApi : public LiteApi::ISnippetApi\n{\npublic:\n    SnippetApi(const QString &package);\n    virtual ~SnippetApi();\n    virtual QString package() const;\n    virtual QStringList apiFiles() const;\n    virtual bool loadApi();\n    virtual QList<LiteApi::Snippet*> snippetList() const;\n\n    void appendApiFile(const QString &file);\n    void setApiFiles(const QStringList &files);\n    bool isEmpty() const;\nprotected:\n    QString m_package;\n    QStringList m_apiFiles;\n    QList<LiteApi::Snippet*> m_snippetList;\n    bool m_bLoad;\n};\n#endif // LITESNIPPETAPI_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/wordapi.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: wordapi.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"wordapi.h\"\n\n#include <QFile>\n#include <QXmlStreamReader>\n#include <QCoreApplication>\n#include <QFile>\n#include <QDir>\n#include <QFileInfo>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nWordApi::WordApi(const QString &package)\n    : m_package(package), m_bLoad(false)\n{\n\n}\n\nQString WordApi::package() const\n{\n    return m_package;\n}\n\nQStringList WordApi::apiFiles() const\n{\n    return m_apiFiles;\n}\n\nQStringList WordApi::wordList() const\n{\n    return m_wordList;\n}\n\nQStringList WordApi::expList() const\n{\n    return m_expList;\n}\n\nvoid WordApi::appendExp(const QStringList &list)\n{\n    m_expList.append(list);\n}\n\nbool WordApi::loadApi()\n{\n    if (m_bLoad) {\n        return true;\n    }\n    m_bLoad = true;\n    m_wordList.clear();\n    foreach (QString file, m_apiFiles) {\n        QFile f(file);\n        if (!f.open(QIODevice::ReadOnly)) {\n            continue;\n        }\n        while (!f.atEnd()) {\n            QString line = f.readLine().trimmed();\n            if (!line.isEmpty()) {\n                m_wordList.append(line);\n            }\n        }\n    }\n    return !m_wordList.isEmpty();\n}\n\nvoid WordApi::appendApiFile(const QString &file)\n{\n    m_apiFiles.append(file);\n}\n\nvoid WordApi::setApiFiles(const QStringList &files)\n{\n    m_apiFiles = files;\n}\n\nbool WordApi::isEmpty() const\n{\n    return m_apiFiles.isEmpty();\n}\n"
  },
  {
    "path": "liteidex/src/plugins/liteeditor/wordapi.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: wordapi.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEWORDAPI_H\n#define LITEWORDAPI_H\n\n#include \"liteeditorapi/liteeditorapi.h\"\n\nclass WordApi : public LiteApi::IWordApi\n{\npublic:\n    WordApi(const QString &package);\n    virtual QString package() const;\n    virtual QStringList apiFiles() const;\n    virtual bool loadApi();\n    virtual QStringList wordList() const;\n    virtual QStringList expList() const;\n    virtual void appendExp(const QStringList &list);\n\n    void appendApiFile(const QString &file);\n    void setApiFiles(const QStringList &files);\n    bool isEmpty() const;\nprotected:\n    QString m_package;\n    QStringList m_apiFiles;\n    QStringList m_wordList;\n    QStringList m_expList;\n    bool m_bLoad;\n};\n#endif // LITEWORDAPI_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteenv/envmanager.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: envmanager.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"envmanager.h\"\n#include \"goenvmanager.h\"\n#include \"liteenv_global.h\"\n#include \"fileutil/fileutil.h\"\n#include \"processex/processex.h\"\n#include \"liteapi/liteids.h\"\n#include <QDir>\n#include <QFile>\n#include <QFileInfo>\n#include <QRegExp>\n#include <QToolBar>\n#include <QMenu>\n#include <QComboBox>\n#include <QLabel>\n#include <QAction>\n#include <QActionGroup>\n#include <QSysInfo>\n#include <QProcess>\n#include <QStringList>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nstatic QString updateValue(const QString &value,const QProcessEnvironment &env)\n{\n    QString v = value;\n    QRegExp rx(\"\\\\$\\\\((\\\\w+)\\\\)\");\n    int pos = 0;\n    QStringList list;\n    while ((pos = rx.indexIn(v, pos)) != -1) {\n         list << rx.cap(1);\n         pos += rx.matchedLength();\n    }\n    foreach (QString str, list) {\n         if (env.contains(str)) {\n            v.replace(\"$(\"+str+\")\",env.value(str));\n        }\n    }\n    return v;\n}\n\nEnv::Env(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IEnv(parent), m_liteApp(app)\n{\n    m_ideEnvMap.insert(\"LITEIDE_ROOT_PATH\",app->rootPath());\n    m_ideEnvMap.insert(\"LITEIDE_APP_PATH\",app->applicationPath());\n    m_ideEnvMap.insert(\"LITEIDE_TOOL_PATH\",app->toolPath());\n    m_ideEnvMap.insert(\"LITEIDE_RES_PATH\",app->resourcePath());\n    m_ideEnvMap.insert(\"LITEIDE_PLUGIN_PATH\",app->pluginPath());\n\n    m_env = QProcessEnvironment::systemEnvironment();\n    updateIdeEnv(m_env);\n\n    m_process = 0;\n}\n\nQString Env::id() const\n{\n    return m_id;\n}\n\nQString Env::filePath() const\n{\n    return m_filePath;\n}\n\nQProcessEnvironment& Env::environment()\n{\n    return m_env;\n}\n\nQStringList Env::orgEnvLines() const\n{\n    return m_orgEnvLines;\n}\n\nQMap<QString, QString> Env::goEnvMap() const\n{\n    return m_goEnvMap;\n}\n\nvoid Env::reload()\n{\n    if (!m_filePath.isEmpty()) {\n        QFile f(m_filePath);\n        if (f.open(QIODevice::ReadOnly)) {\n            loadEnvFile(&f);\n            f.close();\n            loadGoEnv();\n        }\n    } else {\n        emit goenvChanged(m_id);\n    }\n}\n\nvoid Env::loadGoEnv()\n{\n    if (!m_process) {\n        m_process = new Process(this);\n        connect(m_process,SIGNAL(readyReadStandardOutput()),this,SLOT(readStdout()));\n        connect(m_process,SIGNAL(readyReadStandardError()),this,SLOT(readStderr()));\n        connect(m_process,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(finished(int,QProcess::ExitStatus)));\n        connect(m_process,SIGNAL(error(QProcess::ProcessError)),this,SLOT(error(QProcess::ProcessError)));\n    }\n    m_process->stopAndWait(100,200);\n    m_goEnvMap.clear();\n    QString gocmd = FileUtil::lookPath(\"go\",m_env,false);\n    if (gocmd.isEmpty()) {\n        QString goroot = m_env.value(\"GOROOT\");\n        if (goroot.isEmpty()) {\n            goroot = LiteApi::getDefaultGOROOT();\n        }\n        gocmd = FileUtil::lookPathInDir(\"go\",goroot+\"/bin\");\n        if (gocmd.isEmpty()) {\n            emit goenvError(m_id,\"cannot find go in PATH\");\n            return;\n        }\n    }\n    m_process->setProcessEnvironment(m_env);\n    m_process->start(gocmd,QStringList() << \"env\");\n}\n\nvoid Env::loadEnvFile(QIODevice *dev)\n{\n    QProcessEnvironment env = QProcessEnvironment::systemEnvironment();\n    updateIdeEnv(env);\n\n    m_orgEnvLines.clear();\n#ifdef Q_OS_WIN\n    QRegExp rx(\"\\\\%([\\\\w]+)\\\\%\");\n#else\n    QRegExp rx(\"\\\\$([\\\\w]+)\");\n#endif\n    while (!dev->atEnd()) {\n        QString line = QString::fromUtf8(dev->readLine().trimmed());\n        if (line.indexOf(\"#\") == 0) {\n            continue;\n        }\n        int pos = line.indexOf(\"=\");\n        if (pos == -1) {\n            continue;\n        }\n        m_orgEnvLines.append(line);\n        QString key = line.left(pos).trimmed();\n        QString value = line.right(line.length()-pos-1).trimmed();\n        QStringList cap0;\n        QStringList cap1;\n        pos = 0;\n        while ((pos = rx.indexIn(value, pos)) != -1) {\n             cap0 << rx.cap(0);\n             cap1 << rx.cap(1);\n             pos += rx.matchedLength();\n        }\n        for (int i = 0; i < cap0.size(); i++) {\n            if (env.contains(cap1.at(i))) {\n                value.replace(cap0.at(i),env.value(cap1.at(i)));\n            }\n        }\n        if (value.contains(\"$\")) {\n            value = updateValue(value,env);\n        }\n        env.insert(key,value);\n    }\n    m_env = env;\n}\n\nvoid Env::loadEnv(EnvManager *manager, const QString &filePath)\n{\n    QFile f(filePath);\n    if (!f.open(QIODevice::ReadOnly)) {\n        return;\n    }\n\n    Env *env = new Env(manager->application(),manager);\n    env->m_filePath = filePath;\n    env->m_id = QFileInfo(filePath).baseName();\n    env->loadEnvFile(&f);\n    f.close();\n    manager->addEnv(env);\n}\n\nstatic QStringList envFilter = QString(\"GOROOT;GOPATH;GOEXE;GOOS;GOARCH;GOBIN;GOVERSION;GO111MODULE\").split(\";\");\n\nvoid Env::readStdout()\n{\n    QByteArray data = m_process->readAllStandardOutput();\n// set GOARCH=amd64\n// GOARCH=\"amd64\"\n    m_liteApp->appendLog(\"LiteEnv\",\"go env\\n\"+QString::fromUtf8(data).trimmed(),false);\n    foreach (QByteArray line, data.split('\\n')) {\n        QString info = QString::fromUtf8(line).trimmed();\n        if (info.startsWith(\"set \")) {\n            info = info.mid(4);\n        }\n        int index = info.indexOf(\"=\");\n        if (index > 0) {\n            QString key = info.left(index);\n            if (!envFilter.contains(key)) {\n                continue;\n            }\n            QString value = info.right(info.length()-index-1);\n            if (value.startsWith(\"\\\"\") && value.endsWith(\"\\\"\")) {\n                value = value.mid(1,value.length()-2);\n            } else if (value.startsWith(\"\\'\") && value.endsWith(\"\\'\")) {\n                value = value.mid(1,value.length()-2);\n            }\n            m_goEnvMap[key] = value;\n        }\n    }\n//    emit goenvChanged(m_id);\n}\n\nvoid Env::readStderr()\n{\n    QByteArray data = m_process->readAllStandardError();\n    m_liteApp->appendLog(\"LiteEnv\",\"go env\\n\"+QString::fromUtf8(data).trimmed(),true);\n//    emit goenvError(m_id,QString::fromUtf8(data));\n}\n\nvoid Env::finished(int code, QProcess::ExitStatus /*status*/)\n{\n    if (code == 0) {\n        emit goenvChanged(m_id);\n    } else {\n        emit goenvError(m_id,QString(\"go env exit code %1\").arg(code));\n    }\n}\n\nvoid Env::error(QProcess::ProcessError error)\n{\n    emit goenvError(m_id, ProcessEx::processErrorText(error));\n}\n\nvoid Env::updateIdeEnv(QProcessEnvironment &env)\n{\n    QMapIterator<QString,QString> i(m_ideEnvMap);\n    while(i.hasNext()) {\n        i.next();\n        env.insert(i.key(),i.value());\n    }\n}\n\nEnvManager::EnvManager(QObject *parent)\n    : LiteApi::IEnvManager(parent),\n      m_curEnv(0),m_toolBar(0), m_envCmb(0),\n      m_appLoaded(false)\n{\n    m_goEnvManager = new GoEnvManager(this);\n}\n\nEnvManager::~EnvManager()\n{\n    if (m_toolBar) {\n        m_liteApp->actionManager()->removeToolBar(m_toolBar);\n    }\n    if (m_curEnv) {\n        m_liteApp->settings()->setValue(LITEENV_CURRENTENV,m_curEnv->id());\n    }\n    delete m_selectMenu;\n}\n\nvoid EnvManager::addEnv(LiteApi::IEnv *env)\n{\n    m_envList.append(env);\n    connect(env,SIGNAL(goenvError(QString,QString)),this,SLOT(goenvError(QString,QString)));\n    connect(env,SIGNAL(goenvChanged(QString)),this,SLOT(goenvChanged(QString)));\n}\n\nvoid EnvManager::removeEnv(LiteApi::IEnv *env)\n{\n    if (env) {\n        disconnect(env,0);\n    }\n    m_envList.removeAll(env);\n}\n\nLiteApi::IEnv *EnvManager::findEnv(const QString &id, const QString &backup) const\n{\n    foreach (LiteApi::IEnv *env, m_envList) {\n        if (env->id() == id) {\n            return env;\n        }\n    }\n    if (!backup.isEmpty()) {\n        foreach (LiteApi::IEnv *env, m_envList) {\n            if (env->id() == backup) {\n                return env;\n            }\n        }\n    }\n    return NULL;\n}\n\nQList<LiteApi::IEnv*> EnvManager::envList() const\n{\n    return m_envList;\n}\n\nvoid EnvManager::setCurrentEnv(LiteApi::IEnv *env)\n{\n    if (m_curEnv == env) {\n        return;\n    }\n    m_curEnv = env;\n    if (m_curEnv) {\n        m_curEnv->reload();\n        m_liteApp->settings()->setValue(LITEENV_CURRENTENV,m_curEnv->id());\n        m_liteApp->appendLog(\"LiteEnv\",QString(\"load environment %1\").arg(m_curEnv->id()),false);\n    }\n}\n\nLiteApi::IEnv *EnvManager::currentEnv() const\n{\n    return m_curEnv;\n}\n\nQProcessEnvironment EnvManager::currentEnvironment() const\n{\n    if (m_curEnv) {\n        return m_curEnv->environment();\n    }\n    return QProcessEnvironment::systemEnvironment();\n}\n\nvoid EnvManager::appLoaded()\n{\n    m_appLoaded = true;\n    m_liteApp->appendLog(\"EnvManager\",\"init load environment\");\n    //emitEnvChanged();\n    QString id = m_liteApp->settings()->value(LITEENV_CURRENTENV,\"system\").toString();\n\n    //commandline\n    //liteide --select-env system\n    QString flagSelectEnv = \"--select-env\";\n    QString selectEnv = m_liteApp->globalCookie().value(flagSelectEnv).toString();\n\n    if (!selectEnv.isEmpty()) {\n        id = selectEnv;\n        m_liteApp->globalCookie().remove(flagSelectEnv);\n    }\n    if (id.isEmpty()) {\n        id = \"system\";\n    }\n\n    this->setCurrentEnvId(id);\n}\n\nvoid EnvManager::loadEnvFiles(const QString &path)\n{\n    QDir dir = path;\n    m_liteApp->appendLog(\"LiteEnv\",\"Loaded environment files from \"+path);\n    dir.setFilter(QDir::Files | QDir::NoSymLinks);\n    dir.setNameFilters(QStringList(\"*.env\"));\n    foreach (QString fileName, dir.entryList()) {\n        Env::loadEnv(this,QFileInfo(dir,fileName).absoluteFilePath());\n    }\n}\n\nvoid EnvManager::emitEnvChanged()\n{\n    if (!m_appLoaded) {\n        return;\n    }    \n\n    m_goEnvManager->updateGoEnv();\n    emit currentEnvChanged(m_curEnv);\n}\n\n//static QString defaultEnvid()\n//{\n//#ifdef Q_OS_WIN\n//    if (QSysInfo::WordSize == 32) {\n//        return \"win32\";\n//    } else {\n//        return \"win64\";\n//    }\n//#endif\n//#ifdef Q_OS_LINUX\n//    if (QSysInfo::WordSize == 32) {\n//        return \"linux32\";\n//    } else {\n//        return \"linux64\";\n//    }\n//#endif\n//#ifdef Q_OS_DARWIN\n//    if (QSysInfo::WordSize == 32) {\n//        return \"darwin32\";\n//    } else {\n//        return \"darwin64\";\n//    }\n//#endif\n//#ifdef Q_OS_FREEBSD\n//    if (QSysInfo::WordSize == 32) {\n//        return \"freebsd32\";\n//    } else {\n//        return \"freebsd64\";\n//    }\n//#endif\n//#ifdef Q_OS_OPENBSD\n//    if (QSysInfo::WordSize == 32) {\n//        return \"openbsd32\";\n//    } else {\n//        return \"openbsd64\";\n//    }\n//#endif\n//}\n\nbool EnvManager::initWithApp(LiteApi::IApplication *app)\n{\n    if (!LiteApi::IEnvManager::initWithApp(app)) {\n        return false;\n    }\n    loadEnvFiles(m_liteApp->resourcePath()+\"/liteenv\");\n\n    m_toolBar = m_liteApp->actionManager()->insertToolBar(ID_TOOLBAR_ENV,tr(\"Environment Toolbar\"));\n    m_liteApp->actionManager()->insertViewMenu(LiteApi::ViewMenuToolBarPos,m_toolBar->toggleViewAction());\n\n    m_envCmb = new QComboBox;\n    m_envCmb->setSizeAdjustPolicy(QComboBox::AdjustToContents);\n    m_envCmb->setMinimumContentsLength(6);\n    m_envCmb->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Preferred);\n    m_envCmb->setToolTip(tr(\"Switching current environment\"));\n\n    m_toolBar->addWidget(m_envCmb);\n    QAction *editAct = new QAction(QIcon(\"icon:liteenv/images/setenv.png\"),tr(\"Edit current environment\"),this);\n    QAction *reloadAct = new QAction(QIcon(\"icon:liteenv/images/reload.png\"),tr(\"Reload current environment\"),this);\n    m_toolBar->addAction(reloadAct);\n    m_toolBar->addAction(editAct);\n\n    m_selectMenu = new QMenu(tr(\"Select Environment\"));\n\n    m_liteApp->actionManager()->insertMenuActions(ID_MENU_TOOLS,\"sep/env\",true,\n                                                  QList<QAction*>() << reloadAct << editAct << m_selectMenu->menuAction());\n\n    m_selectActionGroup = new QActionGroup(this);\n\n    foreach (LiteApi::IEnv *env, m_envList) {\n        m_envCmb->addItem(env->id());\n        QAction *act = new QAction(env->id(),this);\n        act->setCheckable(true);\n        m_selectActionGroup->addAction(act);\n    }\n    m_selectMenu->addActions(m_selectActionGroup->actions());\n\n    m_liteApp->extension()->addObject(\"LiteApi.IEnvManager\",this);\n\n    connect(m_envCmb,SIGNAL(activated(QString)),this,SLOT(envActivated(QString)));\n    connect(m_selectActionGroup,SIGNAL(triggered(QAction*)),this,SLOT(selectEnvAction(QAction*)));\n    connect(editAct,SIGNAL(triggered()),this,SLOT(editCurrentEnv()));\n    connect(reloadAct,SIGNAL(triggered()),this,SLOT(reloadCurrentEnv()));\n    connect(m_liteApp->editorManager(),SIGNAL(editorSaved(LiteApi::IEditor*)),this,SLOT(editorSaved(LiteApi::IEditor*)));\n    connect(m_liteApp,SIGNAL(broadcast(QString,QString,QVariant)),this,SLOT(broadcast(QString,QString,QVariant)));\n    connect(m_liteApp,SIGNAL(loaded()),this,SLOT(appLoaded()));\n\n    m_goEnvManager->initWithApp(app);\n\n    return true;\n}\n\nvoid EnvManager::setCurrentEnvId(const QString &id)\n{\n    LiteApi::IEnv *env = findEnv(id);\n    if (!env) {\n        return;\n    }\n    for (int i = 0; i < m_envCmb->count(); i++) {\n        if (m_envCmb->itemText(i) == env->id()) {\n            m_envCmb->setCurrentIndex(i);\n            QAction *act = m_selectActionGroup->actions().at(i);\n            if (act) {\n                act->setChecked(true);\n            }\n            break;\n        }\n    }\n    setCurrentEnv(env);\n}\n\nvoid EnvManager::envActivated(QString id)\n{\n    setCurrentEnvId(id);\n}\n\nvoid EnvManager::editCurrentEnv()\n{\n    if (!m_curEnv) {\n        return;\n    }\n    m_liteApp->fileManager()->openEditor(m_curEnv->filePath(),true);\n}\n\nvoid EnvManager::reloadCurrentEnv()\n{\n    if (!m_curEnv) {\n        return;\n    }\n    m_curEnv->reload();\n    m_liteApp->appendLog(\"LiteEnv\",QString(\"reload environment %1\").arg(m_curEnv->id()),false);\n    //emitEnvChanged();\n}\n\nvoid EnvManager::broadcast(QString /*module*/,QString /*id*/,QVariant)\n{\n//    if (module == \"golangpackage\" && id == \"reloadgopath\") {\n//        reloadCurrentEnv();\n//    }\n}\n\nvoid EnvManager::editorSaved(LiteApi::IEditor *editor)\n{\n    LiteApi::ITextEditor *ed = LiteApi::getTextEditor(editor);\n    if (!ed) {\n        return;\n    }\n    if (m_curEnv && m_curEnv->filePath() == ed->filePath()) {\n        m_curEnv->reload();\n    }\n}\n\nvoid EnvManager::goenvError(const QString &id, const QString &msg)\n{\n    m_liteApp->appendLog(QString(\"%1: go env error\").arg(id),msg,true);\n    emitEnvChanged();\n}\n\nvoid EnvManager::goenvChanged(const QString &id)\n{\n    if (id == m_curEnv->id()) {\n        m_liteApp->appendLog(\"LiteEnv\",QString(\"reset %1 environment for \\\"go env\\\"\").arg(id),false);\n        emitEnvChanged();\n    }\n}\n\nvoid EnvManager::selectEnvAction(QAction *act)\n{\n    QString id = act->text();\n    setCurrentEnvId(id);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/liteenv/envmanager.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: envmanager.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef ENVMANAGER_H\n#define ENVMANAGER_H\n\n#include \"liteenvapi/liteenvapi.h\"\n\nclass QComboBox;\n\nclass EnvManager;\nclass GoEnvManager;\nclass Process;\nclass Env : public LiteApi::IEnv\n{\n    Q_OBJECT\npublic:\n    Env(LiteApi::IApplication *app, QObject *parent = 0);\npublic:\n    virtual QString id() const;\n    virtual QString filePath() const;\n    virtual QProcessEnvironment& environment();\n    virtual QStringList orgEnvLines() const;\n    virtual QMap<QString,QString> goEnvMap() const;\n    virtual void reload();\n    void loadGoEnv();\npublic:\n    void loadEnvFile(QIODevice *dev);\n    static void loadEnv(EnvManager *manager, const QString &filePath);\nprotected slots:\n    void readStdout();\n    void readStderr();\n    void finished(int code, QProcess::ExitStatus);\n    void error(QProcess::ProcessError error);\nprotected:\n    void updateIdeEnv(QProcessEnvironment &env);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QString m_filePath;\n    QStringList m_orgEnvLines;\n    QString m_id;\n    QProcessEnvironment m_env;\n    QMap<QString,QString> m_ideEnvMap;\n    QMap<QString,QString> m_goEnvMap;\n    Process *m_process;\n};\n\nclass EnvManager : public LiteApi::IEnvManager\n{\n    Q_OBJECT\npublic:\n    EnvManager(QObject *parent = 0);   \n    ~EnvManager();\npublic:\n    virtual bool initWithApp(LiteApi::IApplication *app);\n    virtual QList<LiteApi::IEnv*> envList() const;\n    virtual LiteApi::IEnv *findEnv(const QString &id, const QString &backup = \"system\") const;\n    virtual void setCurrentEnvId(const QString &id);\n    virtual LiteApi::IEnv *currentEnv() const;\n    virtual QProcessEnvironment currentEnvironment() const;\nprotected slots:\n    virtual void reloadCurrentEnv();\n    void appLoaded();\n    void envActivated(QString);\n    void editCurrentEnv();\n    void editorSaved(LiteApi::IEditor*);\n    void goenvError(const QString &id, const QString &msg);\n    void goenvChanged(const QString &id);    \n    void selectEnvAction(QAction* act);\npublic:    \n    void setCurrentEnv(LiteApi::IEnv *env);\n    void addEnv(LiteApi::IEnv *build);\n    void removeEnv(LiteApi::IEnv *build);\n    void loadEnvFiles(const QString &path);\n    void emitEnvChanged();\npublic slots:\n    void broadcast(QString module, QString id, QVariant);\nprotected:\n    QList<LiteApi::IEnv*>    m_envList;\n    LiteApi::IEnv           *m_curEnv;\n    QToolBar        *m_toolBar;\n    QComboBox       *m_envCmb;\n    bool             m_appLoaded;\n    GoEnvManager     *m_goEnvManager;\n    QActionGroup     *m_selectActionGroup;\n    QMenu            *m_selectMenu;\n};\n\n#endif // ENVMANAGER_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteenv/goenvmanager.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: goenvmanager.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"goenvmanager.h\"\r\n#include \"fileutil/fileutil.h\"\r\n#include <QDir>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nusing namespace LiteApi;\r\n\r\nGoEnvManager::GoEnvManager(QObject *parent)\r\n    : IGoEnvManger(parent)\r\n{\r\n\r\n}\r\n\r\nbool GoEnvManager::initWithApp(IApplication *app)\r\n{\r\n    if (!IGoEnvManger::initWithApp(app)) {\r\n        return false;\r\n    }\r\n    m_liteApp->extension()->addObject(\"LiteApi.IGoEnvManger\",this);\r\n    m_envManager = LiteApi::getEnvManager(app);\r\n    return true;\r\n}\r\n\r\nQString GoEnvManager::gocmd() const\r\n{\r\n    return m_gocmd;\r\n}\r\n\r\nQString GoEnvManager::gotools() const\r\n{\r\n    return m_gotools;\r\n}\r\n\r\nQString GoEnvManager::GOROOT() const\r\n{\r\n    return m_goroot;\r\n}\r\n\r\nQStringList GoEnvManager::GOPATH() const\r\n{\r\n    return m_gopathList;\r\n}\r\n\r\nQProcessEnvironment GoEnvManager::environment() const\r\n{\r\n    return LiteApi::getGoEnvironment(m_liteApp);\r\n}\r\n\r\nQProcessEnvironment GoEnvManager::customEnvironment(const QString &buildFilePath, QString *pCustomBuildPath) const\r\n{\r\n    return LiteApi::getCustomGoEnvironment(m_liteApp,buildFilePath,pCustomBuildPath);\r\n}\r\n\r\nQStringList GoEnvManager::customGOPATH(const QString &buildPath, QString *pCustomBuildPath) const\r\n{\r\n#ifdef Q_OS_WIN\r\n    QString sep = \";\";\r\n#else\r\n    QString sep = \":\";\r\n#endif\r\n    QProcessEnvironment env = this->customEnvironment(buildPath,pCustomBuildPath);\r\n    return env.value(\"GOPATH\").split(sep);\r\n}\r\n\r\nQString GoEnvManager::findRealCustomBuildPath(const QString &buildPath) const\r\n{\r\n    if (buildPath.isEmpty()) {\r\n        return QString();\r\n    }\r\n    QString customKey = \"litebuild-custom/\"+buildPath;\r\n    QString customBuildPath = buildPath;\r\n    bool use_custom_gopath = m_liteApp->settings()->value(customKey+\"#use_custom_gopath\",false).toBool();\r\n    if (!use_custom_gopath) {\r\n        QString srcRoot = LiteApi::lookupSrcRoot(buildPath);\r\n        if (!srcRoot.isEmpty()) {\r\n            customKey = LiteApi::lookupParentHasCustom(m_liteApp,buildPath,srcRoot, &customBuildPath);\r\n            if (!customKey.isEmpty()) {\r\n                use_custom_gopath = true;\r\n                return customBuildPath;\r\n            }\r\n        }\r\n    }\r\n    return QString();\r\n}\r\n\r\nbool GoEnvManager::hasCustomGOPATH(const QString &buildPath) const\r\n{\r\n    return !findRealCustomBuildPath(buildPath).isEmpty();\r\n}\r\n\r\nvoid GoEnvManager::updateGoEnv()\r\n{\r\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\r\n    m_gotools = LiteApi::getGotools(m_liteApp);\r\n    m_gocmd = FileUtil::lookupGoBin(\"go\",m_liteApp,env,false);\r\n    m_goroot = env.value(\"GOROOT\");\r\n#ifdef Q_OS_WIN\r\n    QString sep = \";\";\r\n#else\r\n    QString sep = \":\";\r\n#endif\r\n    QStringList pathList;\r\n    QString goroot = QDir::toNativeSeparators(env.value(\"GOROOT\"));\r\n    foreach (QString path, env.value(\"GOPATH\").split(sep,qtSkipEmptyParts)) {\r\n        pathList.append(QDir::toNativeSeparators(path));\r\n    }\r\n    pathList.removeAll(goroot);\r\n    pathList.removeDuplicates();\r\n\r\n    if (m_gopathList != pathList) {\r\n        m_gopathList = pathList;\r\n        emit globalGOPATHChanged();\r\n    }\r\n}\r\n\r\nvoid GoEnvManager::updateCustomGOPATH(const QString &buildPath)\r\n{\r\n    emit customGOPATHChanged(buildPath);\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/liteenv/goenvmanager.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: goenvmanager.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef GOENVMANAGER_H\r\n#define GOENVMANAGER_H\r\n\r\n#include \"liteenvapi/liteenvapi.h\"\r\n\r\nclass GoEnvManager : public LiteApi::IGoEnvManger\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    GoEnvManager(QObject *parent);\r\n    virtual bool initWithApp(LiteApi::IApplication *app);\r\n    virtual QString gocmd() const;\r\n    virtual QString gotools() const;\r\n    virtual QString GOROOT() const;\r\n    virtual QStringList GOPATH() const;\r\n    virtual QProcessEnvironment environment() const;\r\n    virtual QProcessEnvironment customEnvironment(const QString &buildFilePath, QString *pCustomBuildPath) const;\r\n    virtual QStringList customGOPATH(const QString &buildPath, QString *pCustomBuildPath) const;\r\n    virtual QString findRealCustomBuildPath(const QString &buildPath) const;\r\n    virtual bool hasCustomGOPATH(const QString &buildPath) const;\r\n    virtual void updateGoEnv();\r\n    virtual void updateCustomGOPATH(const QString &buildPath);\r\nprotected:\r\n    QString m_gocmd;\r\n    QString m_gotools;\r\n    QString m_goroot;\r\n    QStringList m_gopathList;\r\n    LiteApi::IEnvManager *m_envManager;\r\n};\r\n\r\n#endif // GOENVMANAGER_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/liteenv/liteenv.pro",
    "content": "TARGET = liteenv\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude(../../api/liteenvapi/liteenvapi.pri)\ninclude(../../utils/fileutil/fileutil.pri)\ninclude(../../utils/processex/processex.pri)\n\nDEFINES += LITEENV_LIBRARY\n\nSOURCES += liteenvplugin.cpp \\\n    envmanager.cpp \\\n    liteenvoptionfactory.cpp \\\n    liteenvoption.cpp \\\n    goenvmanager.cpp\n\nHEADERS += liteenvplugin.h\\\n        liteenv_global.h \\\n    envmanager.h \\\n    liteenvoptionfactory.h \\\n    liteenvoption.h \\\n    goenvmanager.h\n\nFORMS += \\\n    liteenvoption.ui\n\nRESOURCES += \\\n    liteenv.qrc\n"
  },
  {
    "path": "liteidex/src/plugins/liteenv/liteenv.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/liteenv\">\n        <file>images/setenv.png</file>\n        <file>images/reload.png</file>\n    </qresource>\n</RCC>\n"
  },
  {
    "path": "liteidex/src/plugins/liteenv/liteenv_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteenv_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEENV_GLOBAL_H\n#define LITEENV_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(LITEENV_LIBRARY)\n#  define LITEENVSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define LITEENVSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#define LITEENV_CURRENTENV \"liteenv/currentenvid\"\n\n#endif // LITEENV_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteenv/liteenvoption.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteenvoption.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"liteenvoption.h\"\n#include \"ui_liteenvoption.h\"\n#include <QDir>\n#include <QFileInfo>\n#include <QFileSystemModel>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nLiteEnvOption::LiteEnvOption(LiteApi::IApplication *app,QObject *parent) :\n    LiteApi::IOption(parent),\n    m_liteApp(app),\n    m_widget(new QWidget),\n    ui(new Ui::LiteEnvOption)\n{\n    ui->setupUi(m_widget);\n\n    m_fileModel = new QFileSystemModel(this);\n    QString path = m_liteApp->resourcePath()+\"/liteenv\";\n    QModelIndex root = m_fileModel->setRootPath(path);\n    ui->fileTreeView->setEditTriggers(0);\n    ui->fileTreeView->setModel(m_fileModel);\n    ui->fileTreeView->setRootIndex(root);\n#if QT_VERSION >= 0x050000\n    ui->fileTreeView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);\n#else\n    ui->fileTreeView->header()->setResizeMode(QHeaderView::ResizeToContents);\n#endif\n    connect(ui->fileTreeView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(doubleClickedFile(QModelIndex)));\n}\n\nLiteEnvOption::~LiteEnvOption()\n{\n    delete m_widget;\n    delete ui;\n}\n\nQWidget *LiteEnvOption::widget()\n{\n    return m_widget;\n}\n\nQString LiteEnvOption::name() const\n{\n    return \"LiteEnv\";\n}\n\nQString LiteEnvOption::mimeType() const\n{\n    return \"option/liteenv\";\n}\n\nvoid LiteEnvOption::load()\n{\n\n}\n\nvoid LiteEnvOption::save()\n{\n}\n\nvoid LiteEnvOption::doubleClickedFile(QModelIndex index)\n{\n    if (!index.isValid()) {\n        return;\n    }\n    QFileInfo info = m_fileModel->fileInfo(index);\n    if (!info.isFile()) {\n        return;\n    }\n    if (info.suffix() == QLatin1String(\"env\")) {\n        m_liteApp->fileManager()->openEditor(info.filePath());\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/liteenv/liteenvoption.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteenvoption.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEENVOPTION_H\n#define LITEENVOPTION_H\n\n#include \"liteapi/liteapi.h\"\n#include <QModelIndex>\n\nnamespace Ui {\n    class LiteEnvOption;\n}\n\nclass QFileSystemModel;\nclass LiteEnvOption : public LiteApi::IOption\n{\n    Q_OBJECT\n\npublic:\n    explicit LiteEnvOption(LiteApi::IApplication *app, QObject *parent = 0);\n    ~LiteEnvOption();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void load();\n    virtual void save();\npublic slots:\n    void doubleClickedFile(QModelIndex);\nprivate:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget           *m_widget;\n    Ui::LiteEnvOption *ui;\n    QFileSystemModel *m_fileModel;\n};\n\n#endif // LITEENVOPTION_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteenv/liteenvoption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>LiteEnvOption</class>\n <widget class=\"QWidget\" name=\"LiteEnvOption\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>415</width>\n    <height>260</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n   <item>\n    <widget class=\"QLabel\" name=\"treeLabel\">\n     <property name=\"text\">\n      <string>Environment definition files:</string>\n     </property>\n     <property name=\"wordWrap\">\n      <bool>true</bool>\n     </property>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QTreeView\" name=\"fileTreeView\"/>\n   </item>\n   <item>\n    <widget class=\"QLabel\" name=\"label\">\n     <property name=\"text\">\n      <string>Environment changes will take effect after switching environments.</string>\n     </property>\n     <property name=\"wordWrap\">\n      <bool>true</bool>\n     </property>\n    </widget>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/liteenv/liteenvoptionfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteenvoptionfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"liteenvoption.h\"\n#include \"liteenvoptionfactory.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nLiteEnvOptionFactory::LiteEnvOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n}\n\nQStringList LiteEnvOptionFactory::mimeTypes() const\n{\n    return QStringList() << \"option/liteenv\";\n}\n\nLiteApi::IOption *LiteEnvOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == \"option/liteenv\") {\n        return new LiteEnvOption(m_liteApp,this);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/liteenv/liteenvoptionfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteenvoptionfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEENVOPTIONFACTORY_H\n#define LITEENVOPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass LiteEnvOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n    LiteEnvOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // LITEENVOPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteenv/liteenvplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteenvplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"liteenvplugin.h\"\n#include \"envmanager.h\"\n#include \"liteenvoptionfactory.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nLiteEnvPlugin::LiteEnvPlugin()\n{\n}\n\nbool LiteEnvPlugin::load(LiteApi::IApplication *app)\n{\n    m_envManager = new EnvManager(this);\n    if (!m_envManager->initWithApp(app)) {\n        return false;\n    }\n    app->optionManager()->addFactory(new LiteEnvOptionFactory(app,this));\n\n    return true;\n}\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/liteenv/liteenvplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteenvplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEENVPLUGIN_H\n#define LITEENVPLUGIN_H\n\n#include \"liteenv_global.h\"\n#include \"liteapi/liteapi.h\"\n#include <QtPlugin>\n\nclass EnvManager;\nclass LiteEnvPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    LiteEnvPlugin();\n    virtual bool load(LiteApi::IApplication *app);\nprotected:\n    EnvManager *m_envManager;    \n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<LiteEnvPlugin>\n{\n    Q_OBJECT\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.LiteEnvPlugin\")\n#endif\n    Q_INTERFACES(LiteApi::IPluginFactory)\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/LiteEnv\");\n        m_info->setName(\"LiteEnv\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setVer(\"X38.3\");\n        m_info->setInfo(\"Environment Manager\");\n        m_info->setMustLoad(true);\n    }\n};\n\n#endif // LITEENVPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/litefind/filesearch.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filesearch.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"filesearch.h\"\n#include \"litefind_global.h\"\n#include <QFile>\n#include <QTableWidget>\n#include <QTextStream>\n#include <QTextDocument>\n#include <QRegExp>\n#include <QVBoxLayout>\n#include <QHBoxLayout>\n#include <QComboBox>\n#include <QCheckBox>\n#include <QLabel>\n#include <QLineEdit>\n#include <QPushButton>\n#include <QDir>\n#include <QTextBlock>\n#include <QTextCursor>\n#include <QPlainTextEdit>\n#include <QTextBrowser>\n#include <QFileDialog>\n#include <QAction>\n#include <QCompleter>\n#include <QDebug>\n#include \"editorutil/checkdata.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nFindThread::FindThread(QObject *parent) :\n    QThread(parent),\n    useRegExp(true),\n    matchWord(true),\n    matchCase(true),\n    findSub(true)\n{\n    qRegisterMetaType<LiteApi::FileSearchResult>(\"LiteApi::FileSearchResult\");\n}\n\nvoid FindThread::findDir(const QRegExp &reg, const QString &path)\n{\n    QDir dir(path);\n    if (!dir.exists()) {\n        return;\n    }\n\n    foreach(QFileInfo info, dir.entryInfoList(nameFilter,QDir::Files|QDir::NoSymLinks)) {\n        findFile(reg,info.filePath());\n        if (!finding) {\n            return;\n        }\n    }\n    if (findSub) {\n        foreach(QFileInfo info, dir.entryInfoList(QDir::Dirs|QDir::NoDotAndDotDot)) {\n            findDir(reg,info.filePath());\n            if(!finding) {\n                return;\n            }\n        }\n    }\n}\n\nvoid FindThread::findFile(const QRegExp &reg, const QString &fileName)\n{\n    QFile file(fileName);\n    if (!file.open(QIODevice::ReadOnly)) {\n        return;\n    }\n    //skip binary data\n    QByteArray head = file.read(32);\n    if (HasBinaryData(head,32)) {\n        return;\n    }\n    file.seek(0);\n\n    QTextStream stream(&file);\n    stream.setCodec(\"utf-8\");\n    QString line;\n    int lineNr = 1;\n    while (!stream.atEnd()) {\n        line = stream.readLine();\n        int pos = 0;\n        while ((pos = reg.indexIn(line, pos)) != -1) {\n            if (!useRegExp && matchWord) {\n                const int start = pos;\n                const int end = start + reg.matchedLength();\n                if ((start != 0 && line.at(start - 1).isLetterOrNumber())\n                        || (end != line.length() && line.at(end).isLetterOrNumber())) {\n                    //if this is not a whole word, continue the search in the string\n                    pos = end+1;\n                    continue;\n                }\n            }\n            emit findResult(LiteApi::FileSearchResult(fileName, line,lineNr,pos, reg.matchedLength()));\n            pos += reg.matchedLength();\n        }\n        lineNr++;\n        if (!finding) {\n            break;\n        }\n    }\n}\n\n\nvoid FindThread::stop()\n{\n    finding = false;\n    if (this->isRunning()) {\n        if (!this->wait(200))\n            this->terminate();\n    }\n}\n\nvoid FindThread::run()\n{\n    finding = true;\n    QRegExp reg;\n    reg.setCaseSensitivity(matchCase ? Qt::CaseSensitive : Qt::CaseInsensitive);\n\n    if (useRegExp) {\n        if (matchWord) {\n            reg.setPattern(QString::fromLatin1(\"\\\\b%1\\\\b\").arg(findText));\n        } else {\n            reg.setPattern(findText);\n        }\n    } else {\n       reg.setPattern(findText);\n       reg.setPatternSyntax(QRegExp::FixedString);\n    }\n    findDir(reg,findPath);\n    finding = false;\n}\n\nResultTextEdit::ResultTextEdit(QWidget *parent) :\n    QPlainTextEdit(parent)\n{\n    this->setWordWrapMode(QTextOption::NoWrap);\n\n    connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(slotCursorPositionChanged()));\n}\n\nvoid ResultTextEdit::slotCursorPositionChanged()\n{\n    QList<QTextEdit::ExtraSelection> extraSelections;\n\n    QTextEdit::ExtraSelection selection;\n\n    QColor lineColor = QColor(180,200,200,128);\n\n    selection.format.setBackground(lineColor);\n    selection.format.setProperty(QTextFormat::FullWidthSelection, true);\n    selection.cursor = textCursor();\n    selection.cursor.clearSelection();\n    extraSelections.append(selection);\n\n    setExtraSelections(extraSelections);\n}\n\nvoid ResultTextEdit::mouseDoubleClickEvent(QMouseEvent *e)\n{\n    QTextCursor cur = cursorForPosition(e->pos());\n    cur.select(QTextCursor::LineUnderCursor);\n\n    emit dbclickEvent(cur);\n}\n\nFileSearch::FileSearch(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IFileSearch(parent),\n    m_liteApp(app)\n{\n    m_thread = new FindThread;\n\n    m_findWidget = new QWidget;\n\n    QGridLayout *topLayout = new QGridLayout;\n    topLayout->setSpacing(1);\n\n    m_findCombo = new QComboBox;\n    m_findCombo->setEditable(true);\n    m_findCombo->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);\n    QCompleter *c = m_findCombo->completer();\n    if (c) {\n        c->setCaseSensitivity(Qt::CaseSensitive);\n    }\n\n    QHBoxLayout *optLayout = new QHBoxLayout;\n    optLayout->setSpacing(6);\n    m_matchWordCheckBox = new QCheckBox(tr(\"Match whole word\"));\n    m_matchCaseCheckBox = new QCheckBox(tr(\"Match case\"));\n    m_useRegexCheckBox = new QCheckBox(tr(\"Regular expression\"));\n    m_findSubCheckBox = new QCheckBox(tr(\"Scan subdirectories\"));\n    optLayout->addWidget(m_matchWordCheckBox);\n    optLayout->addWidget(m_matchCaseCheckBox);\n    optLayout->addWidget(m_useRegexCheckBox);\n    optLayout->addWidget(m_findSubCheckBox);\n    optLayout->addStretch();\n\n    QHBoxLayout *findLayout = new QHBoxLayout;\n    findLayout->setSpacing(6);\n    //findLayout->setMargin(0);\n    m_findButton = new QPushButton(tr(\"Search\"));\n    m_stopButton = new QPushButton(tr(\"Cancel\"));\n    m_stopButton->setEnabled(false);\n    //findLayout->addWidget();\n    findLayout->addWidget(m_findCombo);\n    findLayout->addWidget(m_findButton);\n    findLayout->addWidget(m_stopButton);\n    //findLayout->addStretch(0);\n    //topLayout->addLayout(findLayout,4,1);\n\n\n    topLayout->addWidget(new QLabel(tr(\"Search for:\")),0,0);\n    topLayout->addLayout(findLayout,0,1);\n    topLayout->addWidget(new QLabel(tr(\"Options:\")),1,0);\n    topLayout->addLayout(optLayout,1,1);\n\n    QHBoxLayout *dirLayout = new QHBoxLayout;\n    dirLayout->setSpacing(6);\n    m_findPathCombo = new QComboBox;\n    m_findPathCombo->setEditable(true);\n    QPushButton *browserBtn = new QPushButton(tr(\"Browse...\"));\n    QPushButton *currentBtn = new QPushButton(tr(\"Current Folder\"));\n\n    m_autoSwitchPathCheckBox = new QCheckBox;\n    m_autoSwitchPathCheckBox->setText(tr(\"Auto Switch\"));\n\n    dirLayout->addWidget(m_findPathCombo,1);\n    dirLayout->addWidget(m_autoSwitchPathCheckBox);\n    dirLayout->addWidget(currentBtn);\n    dirLayout->addWidget(browserBtn);\n\n    topLayout->addWidget(new QLabel(\"Directory:\"),2,0);\n    topLayout->addLayout(dirLayout,2,1);\n\n    m_filterCombo = new QComboBox;\n    m_filterCombo->setEditable(true);\n\n    m_filterCombo->addItem(\"*.go\");\n    m_filterCombo->addItem(\"*.lua;*.wlua\");\n    m_filterCombo->addItem(\"*.c;*.cpp;*.cxx;*.cc;*.c++;*.h;*.hpp;*.hh;*.hxx;*.h++;*.hcc;*.moc\");\n    m_filterCombo->addItem(\"*.htm;*.html;*.shtml;*.shtm\");\n    m_filterCombo->addItem(\"*\");\n\n    topLayout->addWidget(new QLabel(tr(\"Filter:\")),3,0);\n    topLayout->addWidget(m_filterCombo,3,1);\n\n    m_findWidget->setLayout(topLayout);\n\n    QAction *clearAct = new QAction(tr(\"Clear\"),this);\n    clearAct->setIcon(QIcon(\"icon:images/cleanoutput.png\"));\n\n    m_findPathCombo->setEditText(QDir::homePath());\n    m_liteApp->settings()->beginGroup(\"findfiles\");\n    m_matchWordCheckBox->setChecked(m_liteApp->settings()->value(\"matchWord\",false).toBool());\n    m_matchCaseCheckBox->setChecked(m_liteApp->settings()->value(\"matchCase\",false).toBool());\n    m_useRegexCheckBox->setChecked(m_liteApp->settings()->value(\"useRegexp\",false).toBool());\n    m_findSubCheckBox->setChecked(m_liteApp->settings()->value(\"findSub\",true).toBool());\n    m_liteApp->settings()->endGroup();\n\n    connect(browserBtn,SIGNAL(clicked()),this,SLOT(browser()));\n    connect(currentBtn,SIGNAL(clicked()),this,SLOT(currentDir()));\n    connect(m_findButton,SIGNAL(clicked()),this,SLOT(findInFiles()));\n    connect(m_stopButton,SIGNAL(clicked()),m_thread,SLOT(stop()));\n    connect(m_thread,SIGNAL(started()),this,SIGNAL(findStarted()));\n    connect(m_thread,SIGNAL(finished()),this,SIGNAL(findFinished()));\n    connect(m_thread,SIGNAL(findResult(LiteApi::FileSearchResult)),this,SIGNAL(findResult(LiteApi::FileSearchResult)));\n    connect(m_findCombo->lineEdit(),SIGNAL(returnPressed()),this,SLOT(findInFiles()));\n    connect(m_findPathCombo->lineEdit(),SIGNAL(returnPressed()),this,SLOT(findInFiles()));\n\n    bool b = m_liteApp->settings()->value(FILESEARCH_AUTOSWITCHDIR,true).toBool();\n    m_autoSwitchPathCheckBox->setChecked(b);\n}\n\nFileSearch::~FileSearch()\n{\n    m_liteApp->settings()->beginGroup(\"findfiles\");\n    m_liteApp->settings()->setValue(\"matchWord\",m_matchWordCheckBox->isChecked());\n    m_liteApp->settings()->setValue(\"matchCase\",m_matchCaseCheckBox->isChecked());\n    m_liteApp->settings()->setValue(\"useRegexp\",m_useRegexCheckBox->isChecked());\n    m_liteApp->settings()->setValue(\"findSub\",m_findSubCheckBox->isChecked());\n    m_liteApp->settings()->endGroup();\n\n    m_liteApp->settings()->setValue(FILESEARCH_AUTOSWITCHDIR,m_autoSwitchPathCheckBox->isChecked());\n\n    if (m_thread) {\n        m_thread->stop();\n        delete m_thread;\n    }\n    if (m_findWidget) {\n        delete m_findWidget;\n    }\n}\n\nvoid FileSearch::setVisible(bool b)\n{\n    if (b) {\n        LiteApi::IProject *proj = m_liteApp->projectManager()->currentProject();\n        if (proj && !LiteApi::mimeIsFolder(proj->mimeType())) {\n            QFileInfo info(proj->filePath());\n            if (info.isDir())\n                m_findPathCombo->setEditText(info.filePath());\n            else\n                m_findPathCombo->setEditText(info.path());\n        }\n        m_findCombo->setFocus();\n        m_findCombo->lineEdit()->selectAll();\n        LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n        if (editor) {\n            QString text;\n            QPlainTextEdit *ed = LiteApi::findExtensionObject<QPlainTextEdit*>(editor,\"LiteApi.QPlainTextEdit\");\n            if (ed) {\n                text = ed->textCursor().selectedText();\n            } else {\n                QTextBrowser *ed = LiteApi::findExtensionObject<QTextBrowser*>(editor,\"LiteApi.QTextBrowser\");\n                if (ed) {\n                    text = ed->textCursor().selectedText();\n                }\n            }\n            if (!text.isEmpty()) {\n                this->m_findCombo->setEditText(text);\n            }\n            if (editor && !editor->filePath().isEmpty() && m_autoSwitchPathCheckBox->isChecked()) {\n                QFileInfo info(editor->filePath());\n                m_findPathCombo->setEditText(info.path());\n            }\n        }\n    }\n}\n\nQString FileSearch::mimeType() const\n{\n    return \"search/filesystem\";\n}\n\nQString FileSearch::displayName() const\n{\n    return tr(\"Files on File System\");\n}\n\nQWidget *FileSearch::widget() const\n{\n    return m_findWidget;\n}\n\nvoid FileSearch::start()\n{\n    this->findInFiles();\n}\n\nvoid FileSearch::cancel()\n{\n    m_thread->stop();\n}\n\nvoid FileSearch::activate()\n{\n    LiteApi::IProject *proj = m_liteApp->projectManager()->currentProject();\n    if (proj && !LiteApi::mimeIsFolder(proj->mimeType())) {\n        QFileInfo info(proj->filePath());\n        if (info.isDir())\n            m_findPathCombo->setEditText(info.filePath());\n        else\n            m_findPathCombo->setEditText(info.path());\n    }\n    m_findCombo->setFocus();\n    m_findCombo->lineEdit()->selectAll();\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n    if (editor) {\n        QString text;\n        QPlainTextEdit *ed = LiteApi::findExtensionObject<QPlainTextEdit*>(editor,\"LiteApi.QPlainTextEdit\");\n        if (ed) {\n            text = ed->textCursor().selectedText();\n        } else {\n            QTextBrowser *ed = LiteApi::findExtensionObject<QTextBrowser*>(editor,\"LiteApi.QTextBrowser\");\n            if (ed) {\n                text = ed->textCursor().selectedText();\n            }\n        }\n        if (!text.isEmpty()) {\n            this->m_findCombo->setEditText(text);\n        }\n        if (editor && !editor->filePath().isEmpty() && m_autoSwitchPathCheckBox->isChecked()) {\n            QFileInfo info(editor->filePath());\n            m_findPathCombo->setEditText(info.path());\n        }\n    }\n}\n\nQString FileSearch::searchText() const\n{\n    return m_thread->findText;\n}\n\nvoid FileSearch::setSearchInfo(const QString &text, const QString &filter, const QString &path)\n{\n    m_findCombo->setEditText(text);\n    m_filterCombo->setEditText(filter);\n    m_findPathCombo->setEditText(path);\n}\n\nvoid FileSearch::findInFiles()\n{\n    if (m_thread->isRunning()) {\n        m_thread->stop();\n    }\n    QString text = m_findCombo->currentText();\n    QString path = m_findPathCombo->currentText();\n    if (text.isEmpty() || path.isEmpty()) {\n        return;\n    }\n\n    m_liteApp->editorManager()->saveAllEditors(false);\n\n    m_thread->findPath = path;\n    m_thread->findText = text;\n    m_thread->useRegExp = m_useRegexCheckBox->isChecked();\n    m_thread->matchCase = m_matchCaseCheckBox->isChecked();\n    m_thread->matchWord = m_matchWordCheckBox->isChecked();\n    m_thread->findSub = m_findSubCheckBox->isChecked();\n    m_thread->nameFilter = m_filterCombo->currentText().split(\";\");\n    m_thread->start(QThread::LowPriority);\n    if (m_findCombo->findText(text) < 0) {\n        m_findCombo->addItem(text);\n    }\n    if (m_findPathCombo->findText(path) < 0) {\n        m_findPathCombo->addItem(path);\n    }\n}\n\nvoid FileSearch::currentDir()\n{\n    LiteApi::IProject *proj = m_liteApp->projectManager()->currentProject();\n    if (proj && !LiteApi::mimeIsFolder(proj->mimeType())) {\n        QFileInfo info(proj->filePath());\n        if (info.isDir()) {\n            m_findPathCombo->setEditText(info.filePath());\n        } else {\n            m_findPathCombo->setEditText(info.path());\n        }\n    } else {\n        LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n        if (editor && !editor->filePath().isEmpty()) {\n            QFileInfo info(editor->filePath());\n            m_findPathCombo->setEditText(info.path());\n        }\n    }\n    m_findPathCombo->setFocus();\n}\n\nvoid FileSearch::browser()\n{\n    QString dir = QFileDialog::getExistingDirectory(m_liteApp->mainWindow(), tr(\"Open Directory\"),\n                                                    m_findPathCombo->currentText(),\n                                                     QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);\n    if (!dir.isEmpty()) {\n        m_findPathCombo->setEditText(dir);\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/litefind/filesearch.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filesearch.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FILESEARCH_H\n#define FILESEARCH_H\n\n#include \"liteapi/liteapi.h\"\n#include \"litefindapi/litefindapi.h\"\n#include \"textoutput/terminaledit.h\"\n#include \"textoutput/textoutput.h\"\n#include <QStringList>\n#include <QThread>\n\nclass FindThread : public QThread\n{\nQ_OBJECT\npublic:\n    FindThread(QObject *parent = 0);\n    virtual void run();\npublic slots:\n    void stop();\nprotected:\n    void findDir(const QRegExp &reg, const QString &path);\n    void findFile(const QRegExp &reg, const QString &fileName);\nsignals:\n    void findResult(const LiteApi::FileSearchResult &result);\npublic:\n    bool useRegExp;\n    bool matchWord;\n    bool matchCase;\n    bool findSub;\n    QString findText;\n    QString findPath;\n    QStringList nameFilter;\n    volatile bool finding;\n};\n\nclass QTabWidget;\nclass QLineEdit;\nclass QComboBox;\nclass QCheckBox;\nclass QPushButton;\nclass QPlainTextEdit;\n\nclass ResultTextEdit : public QPlainTextEdit\n{\n    Q_OBJECT\npublic:\n    ResultTextEdit(QWidget *parent = 0);\nsignals:\n    void dbclickEvent(const QTextCursor &cur);\npublic slots:\n    void slotCursorPositionChanged();\nprotected:\n    virtual void mouseDoubleClickEvent(QMouseEvent *e);\n};\n\nclass FileSearch : public LiteApi::IFileSearch\n{\n    Q_OBJECT\npublic:\n    FileSearch(LiteApi::IApplication *app, QObject *parent = 0);\n    ~FileSearch();\n    void setVisible(bool b);\n    virtual QString mimeType() const;\n    virtual QString displayName() const;\n    virtual QWidget* widget() const;\n    virtual void start();\n    virtual void cancel();\n    virtual void activate();\n    virtual QString searchText() const;\n    virtual bool replaceMode() const { return false; }\n    virtual bool readOnly() const { return false; }\n    virtual bool canCancel() const { return true; }\n    virtual void setSearchInfo(const QString &text, const QString &filter, const QString &path);\npublic slots:\n    void findInFiles();\n    void browser();\n    void currentDir();\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    FindThread *m_thread;\n    QWidget     *m_findWidget;\n    QComboBox   *m_findCombo;\n    QComboBox   *m_findPathCombo;\n    QComboBox   *m_filterCombo;\n    QCheckBox   *m_findSubCheckBox;\n    QCheckBox   *m_matchWordCheckBox;\n    QCheckBox   *m_matchCaseCheckBox;\n    QCheckBox   *m_useRegexCheckBox;\n    QCheckBox   *m_autoSwitchPathCheckBox;\n    QPushButton *m_findButton;\n    QPushButton *m_stopButton;\n};\n\n//static QList<FileSearchResult> findInFile(const QString &text, bool useRegExp, bool matchWord, bool matchCase, const QString &fileName);\n\n#endif // FILESEARCH_H\n"
  },
  {
    "path": "liteidex/src/plugins/litefind/filesearchmanager.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filesearchmanager.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"filesearchmanager.h\"\n#include \"qtc_searchresult/searchresultcolor.h\"\n#include \"replacedocument.h\"\n#include <QStackedWidget>\n#include <QVBoxLayout>\n#include <QHBoxLayout>\n#include <QLabel>\n#include <QComboBox>\n#include <QMessageBox>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nFileSearchManager::FileSearchManager(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IFileSearchManager(parent), m_liteApp(app)\n{\n    m_currentSearch = 0;\n    m_widget = new QStackedWidget;\n\n    QHBoxLayout *hbox = new QHBoxLayout;\n    QLabel *label = new QLabel(tr(\"Search Item:\"));\n    m_searchItemCombox = new QComboBox;\n    hbox->addWidget(label);\n    hbox->addWidget(m_searchItemCombox);\n    hbox->addStretch();\n\n    QVBoxLayout *vbox = new QVBoxLayout;\n    m_searchItemStackedWidget = new QStackedWidget;\n    vbox->addLayout(hbox);\n    vbox->addWidget(m_searchItemStackedWidget);\n    vbox->addStretch();\n\n    m_searchWidget = new QWidget;\n    m_searchWidget->setLayout(vbox);;\n\n    m_searchResultWidget = new Find::Internal::SearchResultWidget(m_widget);\n    m_searchResultWidget->setPreserveCaseSupported(false);\n    m_searchResultWidget->setSearchAgainSupported(false);\n    m_searchResultWidget->setAutoExpandResults(true);\n    m_searchResultWidget->setInfoWidgetLabel(tr(\"Only golang file changes can be revert!\"));\n\n    QPalette pal = m_searchWidget->palette();\n    Find::Internal::SearchResultColor color;\n    color.textForeground = pal.color(QPalette::Text);\n    color.textBackground = pal.color(QPalette::Base);\n    color.highlightForeground = pal.color(QPalette::Text);\n    color.highlightBackground = QColor(56,169,235);//pal.color(QPalette::ToolTipBase);\n    QFont font = m_searchWidget->font();\n    m_searchResultWidget->setTextEditorFont(font,color);\n\n    m_widget->addWidget(m_searchWidget);\n    m_widget->addWidget(m_searchResultWidget);\n\n    QAction *newSearch = new QAction(tr(\"New Search\"),this);\n\n    m_fmctxFileSearchAction = new QAction(tr(\"File Search\"),this);\n    connect(m_fmctxFileSearchAction,SIGNAL(triggered(bool)),this,SLOT(fmctxFileSearch()));\n\n    m_toolAct = m_liteApp->toolWindowManager()->addToolWindow(Qt::BottomDockWidgetArea,\n                                                  m_widget,\"SearchResult\",tr(\"Search Result\"),true,\n                                                  QList<QAction*>() << newSearch);\n    m_liteApp->extension()->addObject(\"LiteApi.IFileSearchManager\",this);\n\n    connect(newSearch,SIGNAL(triggered()),this,SLOT(newSearch()));\n    connect(m_searchItemCombox,SIGNAL(currentIndexChanged(int)),this,SLOT(currentSearchItemChanged(int)));\n    connect(m_searchResultWidget,SIGNAL(activated(Find::SearchResultItem)),this,SLOT(activated(Find::SearchResultItem)));\n    connect(m_searchResultWidget,SIGNAL(replaceButtonClicked(QString,QList<Find::SearchResultItem>,bool)),this,SLOT(doReplace(QString,QList<Find::SearchResultItem>,bool)));\n    connect(m_liteApp->fileManager(),SIGNAL(aboutToShowFolderContextMenu(QMenu*,LiteApi::FILESYSTEM_CONTEXT_FLAG,QFileInfo,QString)),this,SLOT(aboutToShowFolderContextMenu(QMenu*,LiteApi::FILESYSTEM_CONTEXT_FLAG,QFileInfo,QString)));\n}\n\nFileSearchManager::~FileSearchManager()\n{\n    foreach (LiteApi::IFileSearch *search, m_fileSearchList) {\n        delete search;\n    }\n    m_fileSearchList.clear();\n    delete m_widget;\n}\n\nvoid FileSearchManager::addFileSearch(LiteApi::IFileSearch *search)\n{\n    m_fileSearchList.push_back(search);\n    if (search->widget()) {\n        m_searchItemStackedWidget->addWidget(search->widget());\n        m_searchItemCombox->addItem(search->displayName(),search->mimeType());\n    }\n    connect(search,SIGNAL(findStarted()),this,SLOT(findStarted()));\n    connect(search,SIGNAL(findFinished(bool)),this,SLOT(findFinished(bool)));\n    connect(search,SIGNAL(findResult(LiteApi::FileSearchResult)),this,SLOT(findResult(LiteApi::FileSearchResult)));\n    connect(search,SIGNAL(searchTextChanged(QString)),this,SLOT(searchTextChanged(QString)));\n    connect(search,SIGNAL(findError(QString)),this,SLOT(findError(QString)));\n}\n\nLiteApi::IFileSearch *FileSearchManager::findFileSearch(const QString &mime)\n{\n    foreach (LiteApi::IFileSearch *i, m_fileSearchList) {\n        if (i->mimeType() == mime) {\n            return i;\n        }\n    }\n    return 0;\n}\n\nQList<LiteApi::IFileSearch *> FileSearchManager::fileSearchList() const\n{\n    return m_fileSearchList;\n}\n\nvoid FileSearchManager::setCurrentSearch(LiteApi::IFileSearch *search)\n{\n    m_currentSearch = search;\n    if (m_currentSearch->widget()) {\n        m_searchItemStackedWidget->setCurrentWidget(search->widget());\n    }\n    m_searchResultWidget->setShowReplaceUI(m_currentSearch->replaceMode());\n    m_searchResultWidget->setCancelSupported(m_currentSearch->canCancel());\n    m_searchResultWidget->setReadOnly(m_currentSearch->readOnly());\n    m_currentSearch->activate();\n}\n\nvoid FileSearchManager::showFileSearch(const QString &text, const QString &filter, const QString &path)\n{\n    LiteApi::IFileSearch *search = this->findFileSearch(\"search/filesystem\");\n    if (!search) {\n        return;\n    }\n    m_toolAct->setChecked(true);\n    m_widget->setCurrentWidget(m_searchWidget);\n    setCurrentSearch(search);\n    search->setSearchInfo(text,filter,path);\n}\n\nvoid FileSearchManager::aboutToShowFolderContextMenu(QMenu *menu, LiteApi::FILESYSTEM_CONTEXT_FLAG /*flag*/, const QFileInfo &info, const QString &context)\n{\n    if (!info.isDir()) {\n        return;\n    }\n    menu->addSeparator();\n    menu->addAction(m_fmctxFileSearchAction);\n    m_fmctxFileInfo = info;\n}\n\nvoid FileSearchManager::fmctxFileSearch()\n{\n    bool hasGo = false;\n    foreach(QFileInfo info, QDir(m_fmctxFileInfo.filePath()).entryInfoList(QDir::Files)) {\n        if (info.suffix() == \"go\") {\n            hasGo = true;\n            break;\n        }\n    }\n    showFileSearch(\"\",hasGo ? \"*.go\": \"*\",m_fmctxFileInfo.filePath());\n}\n\nvoid FileSearchManager::activated(const Find::SearchResultItem &item)\n{\n    if (item.path.isEmpty()) {\n        return;\n    }\n    //QString fileName = item.path.at(0);\n    LiteApi::gotoLine(m_liteApp,item.path.at(0),item.lineNumber-1,item.textMarkPos,true,true);\n//    LiteApi::IEditor *editor = m_liteApp->fileManager()->openEditor(fileName,true);\n//    if (!editor) {\n//        return;\n//    }\n//    LiteApi::ITextEditor *textEditor = LiteApi::getTextEditor(editor);\n//    if (!textEditor) {\n//        return;\n//    }\n//    textEditor->gotoLine(item.lineNumber-1,item.textMarkPos,false);\n}\n\nvoid FileSearchManager::newSearch()\n{\n    m_toolAct->setChecked(true);\n    m_widget->setCurrentWidget(m_searchWidget);\n    currentSearchItemChanged(0);\n}\n\nvoid FileSearchManager::currentSearchItemChanged(int item)\n{\n    QString mimeType = m_searchItemCombox->itemData(item,Qt::UserRole).toString();\n    LiteApi::IFileSearch *search = this->findFileSearch(mimeType);\n    if (search) {\n        setCurrentSearch(search);\n    }\n}\n\nvoid FileSearchManager::findStarted()\n{\n    m_toolAct->setChecked(true);\n    m_widget->setCurrentWidget(m_searchResultWidget);\n    m_searchResultWidget->restart();\n    m_searchResultWidget->setInfo(m_currentSearch->displayName()+\":\",QString(),m_currentSearch->searchText());\n    m_searchResultWidget->setTextToReplace(m_currentSearch->searchText());\n}\n\nvoid FileSearchManager::findFinished(bool)\n{\n    m_searchResultWidget->finishSearch(false);\n}\n\nvoid FileSearchManager::findError(const QString &error)\n{\n    m_searchResultWidget->setInfo(m_currentSearch->displayName()+\" Error:\",error,error);\n}\n\nvoid FileSearchManager::findResult(const LiteApi::FileSearchResult &result)\n{\n    m_searchResultWidget->addResult(result.path,\n                                    result.line,\n                                    result.lineText,\n                                    result.col,\n                                    result.len);\n}\n\nvoid FileSearchManager::doReplace(const QString &text, const QList<Find::SearchResultItem> &items, bool /*preserveCase*/)\n{\n    if (text.isEmpty()) {\n        int ret = QMessageBox::warning(m_liteApp->mainWindow(),tr(\"LiteIDE X\"),tr(\"Warning! Replace text is empty.\\nWant to remove all the search items?\"), QMessageBox::Cancel|QMessageBox::Yes|QMessageBox::No);\n        if (ret != QMessageBox::Yes) {\n            return;\n        }\n    } else if (text.trimmed().isEmpty()) {\n        int ret = QMessageBox::warning(m_liteApp->mainWindow(),tr(\"LiteIDE X\"),tr(\"Warning! Replace text is whitespace.\\nWant to replace to all the search items to whitespace?\"), QMessageBox::Cancel|QMessageBox::Yes|QMessageBox::No);\n        if (ret != QMessageBox::Yes) {\n            return;\n        }\n    }\n\n    if (text == m_searchResultWidget->searchText()) {\n        return;\n    }\n    if (items.isEmpty()) {\n        return;\n    }\n    QHash<QString, QList<Find::SearchResultItem> > changes;\n    foreach (const Find::SearchResultItem &item, items)\n        changes[QDir::fromNativeSeparators(item.path.first())].append(item);\n\n    // Checking for files without write permissions\n    QHashIterator<QString, QList<Find::SearchResultItem> > it(changes);\n    QStringList roFiles;\n    while (it.hasNext()) {\n        it.next();\n        const QFileInfo fileInfo(it.key());\n        if (!fileInfo.isWritable()) {\n            roFiles.append(it.key());\n        }\n    }\n    if (!roFiles.isEmpty()) {\n        QString text = tr(\"The following files have no write permissions. Do you want to change the permissions?\");\n        text += \"\\n\";\n        text += roFiles.join(\"\\n\");\n        int ret = QMessageBox::warning(m_liteApp->mainWindow(),tr(\"File is readonly\"),text,QMessageBox::Yes|QMessageBox::Cancel,QMessageBox::Cancel);\n        if (ret != QMessageBox::Yes) {\n            return;\n        }\n        foreach(QString fileName, roFiles) {\n            QFile::setPermissions(fileName, QFile::permissions(fileName) | QFile::WriteUser);\n        }\n    }\n\n    //revert mode\n    m_searchResultWidget->clear();\n    it.toFront();\n    while(it.hasNext()) {\n        it.next();\n        ReplaceDocument doc(m_liteApp);\n        QList<Find::SearchResultItem> items = doc.replace(it.key(),text,it.value());\n        m_searchResultWidget->addResults(items,Find::AddOrdered,true);\n    }\n    m_liteApp->editorManager()->saveAllEditors(false);\n    LiteApi::IEditor *edit = m_liteApp->editorManager()->currentEditor();\n    if (edit) {\n        QPlainTextEdit *ed = LiteApi::getPlainTextEdit(edit);\n        if (ed) {\n            ed->repaint();\n        }\n    }\n    m_searchResultWidget->setRevertMode(text,m_currentSearch->searchText());\n    m_searchResultWidget->repaint();\n}\n\nvoid FileSearchManager::searchTextChanged(const QString &text)\n{\n    m_searchResultWidget->setInfo(m_currentSearch->displayName()+\":\",QString(),text);\n    m_searchResultWidget->setTextToReplace(text);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/litefind/filesearchmanager.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filesearchmanager.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FILESEARCHMANAGER_H\n#define FILESEARCHMANAGER_H\n\n#include \"liteapi/liteapi.h\"\n#include \"litefindapi/litefindapi.h\"\n#include \"filesearch.h\"\n#include \"qtc_searchresult/searchresultwidget.h\"\n\nclass QStackedWidget;\nclass FileSearchManager : public LiteApi::IFileSearchManager\n{\n    Q_OBJECT\npublic:\n    explicit FileSearchManager(LiteApi::IApplication *app, QObject *parent = 0);\n    virtual ~FileSearchManager();\n    virtual void addFileSearch(LiteApi::IFileSearch* search);\n    virtual LiteApi::IFileSearch* findFileSearch(const QString &mime);\n    virtual QList<LiteApi::IFileSearch*> fileSearchList() const;\n    virtual void setCurrentSearch(LiteApi::IFileSearch *search);\n    virtual void showFileSearch(const QString &text, const QString &filter, const QString &path);\npublic slots:\n    void aboutToShowFolderContextMenu(QMenu *menu,LiteApi::FILESYSTEM_CONTEXT_FLAG flag, const QFileInfo &info,const QString &context);\n    void fmctxFileSearch();\n    virtual void newSearch();\n    void activated(const Find::SearchResultItem &item);\n    void currentSearchItemChanged(int);\n    void findStarted();\n    void findFinished(bool);\n    void findError(const QString &error);\n    void findResult(const LiteApi::FileSearchResult &result);\n    void doReplace(const QString &text, const QList<Find::SearchResultItem> &items, bool preserveCase);\n    void searchTextChanged(const QString &text);\nprotected:\n    LiteApi::IApplication   *m_liteApp;\n    QStackedWidget *m_widget;\n    QAction        *m_toolAct;\n    QWidget        *m_searchWidget;\n    QComboBox      *m_searchItemCombox;\n    QStackedWidget *m_searchItemStackedWidget;\n    Find::Internal::SearchResultWidget *m_searchResultWidget;\n    QList<LiteApi::IFileSearch*> m_fileSearchList;\n    LiteApi::IFileSearch    *m_currentSearch;\n    QAction        *m_fmctxFileSearchAction;\n    QFileInfo       m_fmctxFileInfo;\n};\n\n#endif // FILESEARCHMANAGER_H\n"
  },
  {
    "path": "liteidex/src/plugins/litefind/findeditor.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: findeditor.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"findeditor.h\"\n#include \"litefind_global.h\"\n#include <QGridLayout>\n#include <QLineEdit>\n#include <QPlainTextEdit>\n#include <QTextEdit>\n#include <QLabel>\n#include <QPushButton>\n#include <QCheckBox>\n#include <QTextBlock>\n#include <QTextBrowser>\n#include <QStatusBar>\n#include <QRegExp>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nFindEditor::FindEditor(LiteApi::IApplication *app, QObject *parent) :\n    QObject(parent),\n    m_liteApp(app),\n    m_widget(new QWidget)\n{\n    m_findEdit = new QLineEdit;\n    m_replaceEdit = new QLineEdit;\n\n    m_findNext = new QPushButton(tr(\"Find Next\"));\n    m_findPrev = new QPushButton(tr(\"Find Previous\"));\n    m_replaceLabel = new QLabel(tr(\"Replace With:\"));\n    m_replace = new QPushButton(tr(\"Replace\"));\n    m_replaceAll = new QPushButton(tr(\"Replace All\"));\n\n    m_matchWordCheckBox = new QCheckBox(tr(\"Match whole word only\"));\n    m_matchCaseCheckBox = new QCheckBox(tr(\"Match case\"));\n    m_useRegexCheckBox = new QCheckBox(tr(\"Regular expression\"));\n    m_wrapAroundCheckBox = new QCheckBox(tr(\"Wrap around\"));\n\n    m_matchWordCheckBox->setChecked(m_liteApp->settings()->value(FIND_MATCHWORD,true).toBool());\n    m_matchCaseCheckBox->setChecked(m_liteApp->settings()->value(FIND_MATCHCASE,true).toBool());\n    m_useRegexCheckBox->setChecked(m_liteApp->settings()->value(FIND_USEREGEXP,false).toBool());\n    m_wrapAroundCheckBox->setChecked(m_liteApp->settings()->value(FIND_WRAPAROUND,true).toBool());\n\n    m_status = new QLabel(tr(\"Ready\"));\n    m_status->setFrameStyle(QFrame::Panel | QFrame::Sunken);\n    m_status->setAlignment(Qt::AlignRight);\n    m_status->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);\n\n    QPushButton *close = new QPushButton();\n    close->setIcon(QIcon(\"icon:images/close.png\"));\n    close->setIconSize(QSize(16,16));\n    close->setFlat(true);\n    close->setToolTip(tr(\"Close\"));\n\n    m_showReplaceCheckBox = new QCheckBox;\n    m_showReplaceCheckBox->setText(tr(\"Show Replace\"));\n    connect(m_showReplaceCheckBox,SIGNAL(toggled(bool)),this,SLOT(setReplaceMode(bool)));\n\n    connect(close,SIGNAL(clicked()),this,SLOT(hideFind()));\n\n    QGridLayout *layout = new QGridLayout;\n    layout->setMargin(0);\n    layout->setVerticalSpacing(1);\n\n    QHBoxLayout *optLayout = new QHBoxLayout;\n    optLayout->setMargin(0);    \n\n    optLayout->addWidget(m_matchWordCheckBox);\n    optLayout->addWidget(m_matchCaseCheckBox);\n    optLayout->addWidget(m_useRegexCheckBox);\n    optLayout->addWidget(m_wrapAroundCheckBox);\n    optLayout->addStretch();\n    optLayout->addWidget(m_status);\n\n    layout->addWidget(new QLabel(tr(\"Find What:\")),0,0);\n    layout->addWidget(m_findEdit,0,1);\n    layout->addWidget(m_findNext,0,2);\n    layout->addWidget(m_findPrev,0,3);\n    layout->addWidget(m_showReplaceCheckBox,0,4);\n    layout->addWidget(close,0,5);\n\n    layout->addWidget(m_replaceLabel,1,0);\n    layout->addWidget(m_replaceEdit,1,1);\n    layout->addWidget(m_replace,1,2);\n    layout->addWidget(m_replaceAll,1,3);\n\n    layout->addWidget(new QLabel(tr(\"Options:\")),3,0);\n    layout->addLayout(optLayout,3,1,1,4);\n\n    m_widget->setLayout(layout);\n\n    QWidget::setTabOrder(m_findEdit,m_replaceEdit);\n\n    connect(m_findEdit,SIGNAL(returnPressed()),this,SLOT(findNext()));\n    connect(m_findNext,SIGNAL(clicked()),this,SLOT(findNext()));\n    connect(m_findPrev,SIGNAL(clicked()),this,SLOT(findPrev()));\n    connect(m_replaceEdit,SIGNAL(returnPressed()),this,SLOT(replace()));\n    connect(m_replace,SIGNAL(clicked()),this,SLOT(replace()));\n    connect(m_replaceAll,SIGNAL(clicked()),this,SLOT(replaceAll()));\n    connect(m_matchCaseCheckBox,SIGNAL(toggled(bool)),this,SLOT(findOptionChanged()));\n    connect(m_matchWordCheckBox,SIGNAL(toggled(bool)),this,SLOT(findOptionChanged()));\n    connect(m_useRegexCheckBox,SIGNAL(toggled(bool)),this,SLOT(findOptionChanged()));\n    connect(m_wrapAroundCheckBox,SIGNAL(toggled(bool)),this,SLOT(findOptionChanged()));\n    connect(m_findEdit,SIGNAL(textChanged(QString)),this,SLOT(findOptionChanged()));\n    connect(m_replaceEdit,SIGNAL(textChanged(QString)),this,SLOT(replaceChanged()));\n    connect(m_liteApp->editorManager(),SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(updateCurrentEditor(LiteApi::IEditor*)));\n}\n\nFindEditor::~FindEditor()\n{\n    m_liteApp->settings()->setValue(FIND_MATCHWORD,m_matchWordCheckBox->isChecked());\n    m_liteApp->settings()->setValue(FIND_MATCHCASE,m_matchCaseCheckBox->isChecked());\n    m_liteApp->settings()->setValue(FIND_USEREGEXP,m_useRegexCheckBox->isChecked());\n    m_liteApp->settings()->setValue(FIND_WRAPAROUND,m_wrapAroundCheckBox->isChecked());\n\n    if (m_widget) {\n        delete m_widget;\n    }\n}\n\nQWidget *FindEditor::widget()\n{\n    return m_widget;\n}\n\nvoid FindEditor::setVisible(bool b)\n{\n    this->m_widget->setVisible(b);\n    if (b) {\n        LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n        if (editor) {\n            QString text;\n            QPlainTextEdit *ed = LiteApi::findExtensionObject<QPlainTextEdit*>(editor,\"LiteApi.QPlainTextEdit\");\n            if (ed) {\n                QTextCursor cur = ed->textCursor();\n                if (!cur.hasSelection()) {\n                    cur.select(QTextCursor::WordUnderCursor);\n                }\n                text = cur.selectedText();\n            }\n            if (!text.isEmpty()) {\n                this->m_findEdit->setText(text);\n            }\n            this->m_findEdit->setFocus();\n            this->m_findEdit->selectAll();\n        }\n    }\n    updateCurrentEditor(m_liteApp->editorManager()->currentEditor());\n}\n\nbool FindEditor::isVisible() const\n{\n    return m_widget->isVisible();\n}\n\nvoid FindEditor::setReplaceMode(bool b)\n{\n    m_replaceLabel->setVisible(b);\n    m_replaceEdit->setVisible(b);\n    m_replace->setVisible(b);\n    m_replaceAll->setVisible(b);\n    m_showReplaceCheckBox->setChecked(b);\n}\n\nvoid FindEditor::findHelper(FindOption *opt)\n{\n    bool bFocus = m_findEdit->hasFocus();\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n    if (!editor) {\n        return;\n    }\n    LiteApi::ITextEditor *textEditor = LiteApi::getTextEditor(editor);\n    QTextCursor find;\n    if (textEditor) {\n        QPlainTextEdit *ed = LiteApi::getPlainTextEdit(editor);\n        if (ed) {\n            find = findEditor(ed->document(),ed->textCursor(),opt);\n            if (!find.isNull()) {\n                ed->setTextCursor(find);\n                ed->repaint();\n            }\n        }\n    } else {\n        QTextBrowser *ed = LiteApi::findExtensionObject<QTextBrowser*>(editor,\"LiteApi.QTextBrowser\");\n        if (ed) {\n            find = findEditor(ed->document(),ed->textCursor(),opt);\n            if (!find.isNull()) {\n                ed->setTextCursor(find);\n            }\n        }\n    }\n    if (find.isNull()) {\n        m_status->setText(tr(\"Not found\"));\n    } else {\n        m_status->setText(QString(\"Ln:%1 Col:%2\").\n                              arg(find.blockNumber()+1).\n                              arg(find.columnNumber()+1));\n    }\n    if (bFocus) {\n        m_findEdit->setFocus();\n    } else if (textEditor) {\n        textEditor->onActive();\n    }\n}\n\nvoid FindEditor::hideFind()\n{\n    this->setVisible(false);\n}\n\nvoid FindEditor::setReady(const QString &findText)\n{\n    m_widget->setFocus();\n    if (!findText.isEmpty()) {\n        m_findEdit->setText(findText);\n    }\n    if (m_findEdit->text().isEmpty()) {\n        m_findEdit->setFocus();\n    } else {\n        m_replaceEdit->setFocus();\n    }\n    m_status->setText(tr(\"Ready\"));\n}\n\nvoid FindEditor::getFindOption(FindOption *opt, bool backWard)\n{\n    opt->findText = m_findEdit->text();\n    opt->replaceText = m_replaceEdit->text();\n    opt->matchWord = m_matchWordCheckBox->isChecked();\n    opt->matchCase = m_matchCaseCheckBox->isChecked();\n    opt->useRegexp = m_useRegexCheckBox->isChecked();\n    opt->wrapAround = m_wrapAroundCheckBox->isChecked();\n    opt->backWard = backWard;\n}\n\nQTextCursor FindEditor::findEditor(QTextDocument *doc, const QTextCursor &cursor, FindOption *opt, bool wrap)\n{\n    int from = cursor.position();\n    if (cursor.hasSelection()) {\n        if (opt->backWard) {\n            from = cursor.selectionStart();\n        } else {\n            from = cursor.selectionEnd();\n        }\n    }\n    return findEditorHelper(doc,from,opt,wrap);\n}\n\nQTextCursor FindEditor::findEditorHelper(QTextDocument *doc, int from, FindOption *opt, bool wrap)\n{\n    QTextDocument::FindFlags flags = 0;\n    if (opt->backWard) {\n        flags |= QTextDocument::FindBackward;\n    }\n    if (opt->matchCase) {\n        flags |= QTextDocument::FindCaseSensitively;\n    }\n    if (opt->matchWord) {\n        flags |= QTextDocument::FindWholeWords;\n    }\n    Qt::CaseSensitivity cs = Qt::CaseInsensitive;\n    if (opt->matchCase) {\n        cs = Qt::CaseSensitive;\n    }\n\n    QTextCursor find;\n    if (opt->useRegexp) {\n        find = doc->find(QRegExp(opt->findText,cs),from,flags);\n    } else {\n        find = doc->find(opt->findText,from,flags);\n    }\n\n    if (find.isNull() && opt->wrapAround && wrap) {\n        if (opt->backWard) {\n            from = doc->lastBlock().position()+doc->lastBlock().length();\n        } else {\n            from = 0;\n        }\n        if (opt->useRegexp) {\n            find = doc->find(QRegExp(opt->findText,cs),from,flags);\n        } else {\n            find = doc->find(opt->findText,from,flags);\n        }\n    }\n    return find;\n}\n\nvoid FindEditor::replaceHelper(LiteApi::ITextEditor *editor, FindOption *opt, int replaceCount)\n{\n    bool bFocus = m_replaceEdit->hasFocus();\n\n    QPlainTextEdit *ed = LiteApi::getPlainTextEdit(editor);\n    if (!ed) {\n        return;\n    }\n\n    QTextCursor find;\n    QTextCursor cursor = ed->textCursor();\n    int startLine = cursor.blockNumber();\n    int startColumn = cursor.columnNumber();\n    Qt::CaseSensitivity cs = Qt::CaseInsensitive;\n    if (opt->matchCase) {\n        cs = Qt::CaseSensitive;\n    }\n    int from = cursor.position();\n    if ( cursor.hasSelection() ) {\n//        QString text = cursor.selectedText();\n//        if (opt->useRegexp) {\n//            if (text.indexOf(QRegExp(opt->findText,cs),0) != -1) {\n//                find = cursor;\n//            }\n//        } else {\n//            if (text.indexOf(opt->findText,0,cs) != -1) {\n//                find = cursor;\n//            }\n//        }\n        from = cursor.selectionStart();\n        startColumn -= cursor.selectedText().length();\n    }\n    int number = 0;\n    bool wrap = opt->wrapAround;\n    ed->textCursor().beginEditBlock();\n    do {\n        if (!find.isNull()) {\n            number++;\n            //find.beginEditBlock();\n            QString text = find.selectedText();\n            bool changed = find.blockNumber() == startLine && find.columnNumber() < startColumn;\n            if (changed) {\n                startColumn -= text.length();\n            }\n            if (opt->useRegexp) {\n                text.replace(QRegExp(opt->findText,cs),opt->replaceText);\n            } else {\n                text.replace(QRegExp(opt->findText,cs,QRegExp::FixedString),opt->replaceText);\n            }\n            find.removeSelectedText();\n            from = find.position()+ text.length();\n            find.insertText(text);\n            //find.endEditBlock();\n            //ed->setTextCursor(find);\n            if (changed) {\n                startColumn += text.length();\n            }\n        }\n        //cursor = ed->textCursor();\n        find = findEditorHelper(ed->document(),from,opt,false);\n        if (find.isNull() && wrap) {\n            wrap = false;\n            find = findEditorHelper(ed->document(),0,opt,true);\n        }\n        if (!find.isNull() && opt->wrapAround && !wrap) {\n             if (find.blockNumber() > startLine ||\n                    (find.blockNumber() == startLine && (find.columnNumber()-find.selectedText().length()) >= startColumn) )  {\n                break;\n            }\n        }\n        if (replaceCount != -1 && number >= replaceCount) {\n            if (!find.isNull()) {\n                ed->setTextCursor(find);\n                m_status->setText(QString(\"Ln:%1 Col:%2\").\n                                      arg(find.blockNumber()+1).\n                                      arg(find.columnNumber()+1));\n            } else {\n                m_status->setText(tr(\"Not found\"));\n            }\n            break;\n        }\n    } while(!find.isNull());\n    ed->textCursor().endEditBlock();\n    ed->repaint();\n    if (replaceCount == -1) {\n        m_status->setText(QString(\"Replace:%1\").arg(number));\n    }\n\n    if (bFocus) {\n        m_replaceEdit->setFocus();\n    } else if (editor) {\n        editor->onActive();\n    }\n}\n\n\nvoid FindEditor::findNext()\n{\n    if (!m_option.isValid()) {\n        return;\n    }\n    m_option.backWard = false;\n    findHelper(&m_option);\n}\n\nvoid FindEditor::findPrev()\n{\n    if (!m_option.isValid()) {\n        return;\n    }\n    m_option.backWard = true;\n    findHelper(&m_option);\n}\n\nvoid FindEditor::replace()\n{\n    if (!m_option.isValid()) {\n        return;\n    }\n\n    m_option.backWard = false;\n\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n    if (!editor) {\n        return;\n    }\n    LiteApi::ITextEditor *textEditor = LiteApi::getTextEditor(editor);\n    if (!textEditor) {\n        return;\n    }\n    replaceHelper(textEditor,&m_option,1);\n}\n\nvoid FindEditor::replaceAll()\n{\n    if (!m_option.isValid()) {\n        return;\n    }\n\n    m_option.backWard = false;\n\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n    if (!editor) {\n        return;\n    }\n    LiteApi::ITextEditor *textEditor = LiteApi::getTextEditor(editor);\n    if (!textEditor) {\n        return;\n    }\n    replaceHelper(textEditor,&m_option,-1);\n}\n\n\nvoid FindEditor::findOptionChanged()\n{\n    getFindOption(&m_option,false);\n    m_status->setText(tr(\"Ready\"));\n    if (m_option.useRegexp) {\n        QRegExp reg(m_option.findText);\n        if (!reg.isValid()) {\n            m_status->setText(reg.errorString());\n        }\n    }\n    updateCurrentEditor(m_liteApp->editorManager()->currentEditor());\n}\n\nvoid FindEditor::replaceChanged()\n{\n    m_option.replaceText = m_replaceEdit->text();\n}\n\n\nvoid FindEditor::updateCurrentEditor(LiteApi::IEditor *editor)\n{\n    if (!editor) {\n        return;\n    }\n    LiteApi::ITextEditor *textEditor = LiteApi::getTextEditor(editor);\n    if (!textEditor) {\n        return;\n    }\n    if (m_widget->isVisible()) {\n        textEditor->setFindOption(&m_option);\n    } else {\n        textEditor->setFindOption(0);\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/litefind/findeditor.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: findeditor.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef REPLACEEDITOR_H\n#define REPLACEEDITOR_H\n\n#include \"liteapi/liteapi.h\"\n#include <QTextCursor>\n#include <QLabel>\n\nclass QLineEdit;\nclass QCheckBox;\nclass QPushButton;\nclass QLabel;\nstruct FindOption : public LiteApi::FindOption\n{\n    QString replaceText;\n    bool isValid() {\n        return !findText.isEmpty();\n    }\n};\n\nclass FindEditor : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit FindEditor(LiteApi::IApplication *app, QObject *parent = 0);\n    virtual ~FindEditor();\n    virtual QWidget *widget();\n    virtual void setReady(const QString &findText = QString());\n    void getFindOption(FindOption *state, bool backWard);\n    void setVisible(bool b);\n    bool isVisible() const;\n    void findHelper(FindOption *opt);\npublic slots:\n    void setReplaceMode(bool b);\n    void hideFind();\n    void updateCurrentEditor(LiteApi::IEditor*);\n    void findOptionChanged();\n    void replaceChanged();\n    void findNext();\n    void findPrev();\n    void replace();\n    void replaceAll();\npublic:\n    QTextCursor findEditor(QTextDocument *ed, const QTextCursor &cursor, FindOption *opt, bool wrap = true);\n    void replaceHelper(LiteApi::ITextEditor *editor, FindOption *opt,int replaceCount = -1);\n    QTextCursor findEditorHelper(QTextDocument *doc, int from, FindOption *opt, bool wrap);\nprotected:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget *m_widget;\n    QLineEdit *m_findEdit;\n    QPushButton *m_findNext;\n    QPushButton *m_findPrev;\n    QLineEdit *m_replaceEdit;\n    QLabel    *m_replaceLabel;\n    QPushButton *m_replace;\n    QPushButton *m_replaceAll;\n    QCheckBox   *m_showReplaceCheckBox;\n    QCheckBox   *m_matchWordCheckBox;\n    QCheckBox   *m_matchCaseCheckBox;\n    QCheckBox   *m_useRegexCheckBox;\n    QCheckBox   *m_wrapAroundCheckBox;\n    QLabel      *m_status;\n    FindOption   m_option;\n};\n\n#endif // REPLACEEDITOR_H\n"
  },
  {
    "path": "liteidex/src/plugins/litefind/litefind.pro",
    "content": "TARGET = litefind\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude (../../api/litefindapi/litefindapi.pri)\ninclude (../../utils/textoutput/textoutput.pri)\ninclude (../../3rdparty/qtc_searchresult/qtc_searchresult.pri)\n\nDEFINES += LITEFIND_LIBRARY\n\nSOURCES += litefindplugin.cpp \\\n    filesearch.cpp \\\n    findeditor.cpp \\\n    filesearchmanager.cpp \\\n    replacedocument.cpp\n\nHEADERS += litefindplugin.h\\\n        litefind_global.h \\\n    filesearch.h \\\n    findeditor.h \\\n    filesearchmanager.h \\\n    replacedocument.h\n"
  },
  {
    "path": "liteidex/src/plugins/litefind/litefind_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litefind_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEFIND_GLOBAL_H\n#define LITEFIND_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(LITEFIND_LIBRARY)\n#  define LITEFINDSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define LITEFINDSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#define FIND_MATCHWORD \"find/matchWord\"\n#define FIND_MATCHCASE \"find/matchCase\"\n#define FIND_USEREGEXP \"find/useRegexp\"\n#define FIND_WRAPAROUND \"find/wrapAround\"\n#define FILESEARCH_AUTOSWITCHDIR \"findfiles/autoswitchdir\"\n\n#endif // LITEFIND_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/litefind/litefindplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litefindplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"litefindplugin.h\"\n#include \"findeditor.h\"\n#include \"filesearch.h\"\n#include \"filesearchmanager.h\"\n#include \"liteapi/liteids.h\"\n#include <QMenu>\n#include <QAction>\n#include <QLayout>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nLiteFindPlugin::LiteFindPlugin()\n    : m_findEditor(0)\n{\n}\n\nLiteFindPlugin::~LiteFindPlugin()\n{\n}\n\nbool LiteFindPlugin::load(LiteApi::IApplication *app)\n{\n    m_liteApp = app;\n\n    QLayout *layout = m_liteApp->editorManager()->widget()->layout();\n    if (!layout) {\n        return false;\n    }\n\n    QMenu *menu = m_liteApp->actionManager()->loadMenu(ID_MENU_FIND);\n    if (!menu) {\n        return false;\n    }\n\n    m_findEditor = new FindEditor(m_liteApp,this);\n    m_findEditor->widget()->hide();\n\n    layout->addWidget(m_findEditor->widget());\n\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(this,\"Find\");\n\n    m_findAct = new QAction(tr(\"Find\"),this);\n    actionContext->regAction(m_findAct,\"Find\",QKeySequence::Find);\n\n    m_findNextAct = new QAction(tr(\"Find Next\"),this);\n    actionContext->regAction(m_findNextAct,\"FindNext\",QKeySequence::FindNext);\n\n    m_findPrevAct = new QAction(tr(\"Find Previous\"),this);\n    actionContext->regAction(m_findPrevAct,\"FindPrevious\",QKeySequence::FindPrevious);\n\n    m_replaceAct = new QAction(tr(\"Replace\"),this);\n#ifdef Q_OS_MAC\n    actionContext->regAction(m_replaceAct,\"Replace\",\"ALT+CTRL+F\");\n#else\n    actionContext->regAction(m_replaceAct,\"Replace\",QKeySequence::Replace);\n#endif\n    m_fileSearchAct = new QAction(tr(\"File Search\"),this);\n#ifdef Q_OS_WIN\n    actionContext->regAction(m_fileSearchAct,\"FileSearch\",\"Ctrl+Shift+F;Ctrl+Alt+F\");\n#else\n    actionContext->regAction(m_fileSearchAct,\"FileSearch\",\"Ctrl+Shift+F\");\n#endif\n    menu->addAction(m_findAct);\n    menu->addAction(m_findNextAct);\n    menu->addAction(m_findPrevAct);\n    menu->addSeparator();\n    menu->addAction(m_replaceAct);\n    menu->addSeparator();\n    menu->addAction(m_fileSearchAct);\n\n    connect(m_findAct,SIGNAL(triggered()),this,SLOT(find()));\n    connect(m_findNextAct,SIGNAL(triggered()),m_findEditor,SLOT(findNext()));\n    connect(m_findPrevAct,SIGNAL(triggered()),m_findEditor,SLOT(findPrev()));\n    connect(m_replaceAct,SIGNAL(triggered()),this,SLOT(replace()));\n\n    connect(m_liteApp,SIGNAL(key_escape()),this,SLOT(hideFind()));\n\n    FileSearchManager *manager = new FileSearchManager(m_liteApp,this);\n    FileSearch *fileSearch = new FileSearch(m_liteApp,manager);\n    manager->addFileSearch(fileSearch);\n    connect(m_fileSearchAct,SIGNAL(triggered()),manager,SLOT(newSearch()));\n    return true;\n}\n\nvoid LiteFindPlugin::hideFind()\n{\n    m_findEditor->setVisible(false);\n}\n\nvoid LiteFindPlugin::find()\n{\n    if (!m_findEditor->isVisible()) {\n        m_findEditor->setReplaceMode(false);\n    }\n    m_findEditor->setVisible(true);\n}\n\nvoid LiteFindPlugin::replace()\n{\n    m_findEditor->setReplaceMode(true);\n    m_findEditor->setVisible(true);\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/litefind/litefindplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litefindplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEFINDPLUGIN_H\n#define LITEFINDPLUGIN_H\n\n#include \"litefind_global.h\"\n#include \"liteapi/liteapi.h\"\n#include <QtPlugin>\n\nclass FindEditor;\nclass FindEditor;\nclass FileSearch;\nclass LiteFindPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    LiteFindPlugin();\n    virtual ~LiteFindPlugin();\n    virtual bool load(LiteApi::IApplication *app);\npublic slots:\n    void find();\n    void replace();\n    void hideFind();\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    FindEditor *m_findEditor;\n    QAction *m_findAct;\n    QAction *m_findNextAct;\n    QAction *m_findPrevAct;\n    QAction *m_replaceAct;\n    QAction *m_fileSearchAct;\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<LiteFindPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.LiteFindPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/LiteFind\");\n        m_info->setName(\"LiteFind\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setVer(\"X38.3\");\n        m_info->setInfo(\"Core Find/Replace\");\n        m_info->setMustLoad(true);\n    }\n};\n\n#endif // LITEFINDPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/litefind/replacedocument.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: replacedocument.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"replacedocument.h\"\n#include <QTextBlock>\n#include <QTextCursor>\n#include <QTextDocument>\n#include <QMutableListIterator>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nReplaceDocument::ReplaceDocument(LiteApi::IApplication *app, QObject *parent) :\n    QObject(parent), m_liteApp(app), m_document(0)\n{\n}\n\nReplaceDocument::~ReplaceDocument()\n{\n    if (m_document) {\n        delete m_document;\n    }\n}\n\nQList<Find::SearchResultItem> ReplaceDocument::replace(const QString &fileName, const QString &text, const QList<Find::SearchResultItem> &items)\n{\n    QTextCursor cursor;\n    bool crlf = false;\n    QTextDocument *doc = fileDocument(fileName,cursor,crlf);\n    if (!doc) {\n        return QList<Find::SearchResultItem>();\n    }\n    cursor.movePosition(QTextCursor::Start);\n    cursor.beginEditBlock();\n    QList<Find::SearchResultItem> update_items;\n    QTextBlock block = cursor.block();\n    int offset = 0;\n    foreach(Find::SearchResultItem item, items) {\n        if (!block.isValid()) {\n            break;\n        }\n        while (block.blockNumber() < item.lineNumber-1 ) {\n            block = block.next();\n            offset = 0;\n            if (!block.isValid()) {\n                break;\n            }\n        }\n        cursor.setPosition(block.position());\n        cursor.movePosition(QTextCursor::Right,QTextCursor::MoveAnchor,offset+item.textMarkPos);\n        cursor.movePosition(QTextCursor::Right,QTextCursor::KeepAnchor,item.textMarkLength);\n        cursor.removeSelectedText();\n        cursor.insertText(text);\n        int newoffset = text.length()-item.textMarkLength;\n        item.textMarkPos = offset+item.textMarkPos;\n        item.textMarkLength = text.length();\n        //item.text = block.text();\n        offset += newoffset;\n        update_items.push_back(item);\n\n        //update update_items same line number text\n        int lineNumber = block.blockNumber()+1;\n        QMutableListIterator<Find::SearchResultItem> i(update_items);\n        i.toBack();\n        while (i.hasPrevious()) {\n            Find::SearchResultItem &item = i.previous();\n            if (item.lineNumber == lineNumber) {\n                item.text = block.text();\n            } else if (item.lineNumber < lineNumber) {\n                break;\n            }\n        }\n    }\n    cursor.endEditBlock();\n    if (m_document) {\n        QFile f(fileName);\n        if (!f.open(QFile::WriteOnly)) {\n            return QList<Find::SearchResultItem>();\n        }\n        QString text = m_document->toPlainText();\n        if (crlf) {\n            text.replace(QLatin1Char('\\n'), QLatin1String(\"\\r\\n\"));\n        }\n        f.write(text.toUtf8());\n    }\n    return update_items;\n}\n\nQTextDocument *ReplaceDocument::fileDocument(const QString &fileName, QTextCursor &cursor, bool &crlf)\n{\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->findEditor(fileName,true);\n    if (editor) {\n        QPlainTextEdit *ed = LiteApi::getPlainTextEdit(editor);\n        if (ed) {\n            cursor = ed->textCursor();\n            return ed->document();\n        }\n    }\n    QFile file(fileName);\n    if (file.open(QFile::ReadOnly)) {\n        QByteArray data = file.readAll();\n        QString text = QString::fromUtf8(data);\n        int lf = text.indexOf('\\n');\n        if (lf <= 0) {\n            crlf = false;\n        } else {\n            lf = text.indexOf(QRegExp(\"[^\\r]\\n\"),lf-1);\n            if (lf >= 0) {\n                crlf = false;\n            } else {\n                crlf = true;\n            }\n        }\n        m_document = new QTextDocument(text);\n        cursor = QTextCursor(m_document);\n        return m_document;\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/litefind/replacedocument.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: replacedocument.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef REPLACEDOCUMENT_H\n#define REPLACEDOCUMENT_H\n\n#include <liteapi/liteapi.h>\n#include \"qtc_searchresult/searchresultwidget.h\"\n\nclass ReplaceDocument : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit ReplaceDocument(LiteApi::IApplication *app, QObject *parent = 0);\n    ~ReplaceDocument();\n    QList<Find::SearchResultItem> replace(const QString &fileName, const QString &text, const QList<Find::SearchResultItem> &items);\nprotected:\n    QTextDocument* fileDocument(const QString &fileName, QTextCursor &cursor, bool &crlf);\n    LiteApi::IApplication *m_liteApp;\n    QTextDocument *m_document;\n    QTextCursor    cursor;\n};\n\n#endif // REPLACEDOCUMENT_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteshell/liteshell.pro",
    "content": "TARGET = liteshell\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\n\nDEFINES += LITESHELL_LIBRARY\n\nSOURCES += liteshellplugin.cpp\n\nHEADERS += liteshellplugin.h\\\n        liteshell_global.h\n"
  },
  {
    "path": "liteidex/src/plugins/liteshell/liteshell_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteshell_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITESHELL_GLOBAL_H\n#define LITESHELL_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(LITESHELL_LIBRARY)\n#  define LITESHELLSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define LITESHELLSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#endif // LITESHELL_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/liteshell/liteshellplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteshellplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"liteshellplugin.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nLiteShellPlugin::LiteShellPlugin()\n{\n    m_info->setId(\"plugin/LiteShell\");\n    m_info->setName(\"LiteShell\");\n    m_info->setAuthor(\"visualfc\");\n    m_info->setInfo(\"LiteShell Plugin\");\n}\n\nbool LiteShellPlugin::initWithApp(LiteApi::IApplication *app)\n{\n    if (!LiteApi::IPlugin::initWithApp(app)) {\n        return false;\n    }\n    return true;\n}\n\nQ_EXPORT_PLUGIN(LiteShellPlugin)\n"
  },
  {
    "path": "liteidex/src/plugins/liteshell/liteshellplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: liteshellplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITESHELLPLUGIN_H\n#define LITESHELLPLUGIN_H\n\n#include \"liteshell_global.h\"\n#include \"liteapi.h\"\n#include <QtPlugin>\n\nclass LiteShellPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPlugin)\npublic:\n    LiteShellPlugin();\n    virtual bool initWithApp(LiteApi::IApplication *app);\n};\n\n#endif // LITESHELLPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/litetty/fifotty.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: fifotty.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"fifotty.h\"\n\n#include <QFile>\n#include <QSocketNotifier>\n#include <QTemporaryFile>\n#include <QVarLengthArray>\n#include <QDebug>\n\n#include <sys/ioctl.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#ifdef Q_OS_SOLARIS\n# include <sys/filio.h> // FIONREAD\n#endif\n#include <errno.h>\n#include <fcntl.h>\n#include <string.h>\n#include <unistd.h>\n\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nFiFoTty::FiFoTty(QObject *parent) :\n    LiteApi::ITty(parent)\n{\n}\n\nFiFoTty::~FiFoTty()\n{\n    shutdown();\n}\n\n\nQString FiFoTty::serverName() const\n{\n    return m_serverPath;\n}\n\nQString FiFoTty::errorString() const\n{\n    return m_errorString;\n}\n\nbool FiFoTty::listen()\n{\n    if (!m_serverPath.isEmpty())\n        return true;\n    if (!m_serverPath.isEmpty())\n        return true;\n    QByteArray codedServerPath;\n    forever {\n        {\n            QTemporaryFile tf;\n            if (!tf.open()) {\n                m_errorString = tr(\"Cannot create temporary file: %1\").arg(tf.errorString());\n                m_serverPath.clear();\n                return false;\n            }\n            m_serverPath = tf.fileName();\n        }\n        // By now the temp file was deleted again\n        codedServerPath = QFile::encodeName(m_serverPath);\n        if (!::mkfifo(codedServerPath.constData(), 0600))\n            break;\n        if (errno != EEXIST) {\n            m_errorString = tr(\"Cannot create FiFo %1: %2\").\n                            arg(m_serverPath, QString::fromLocal8Bit(strerror(errno)));\n            m_serverPath.clear();\n            return false;\n        }\n    }\n    if ((m_serverFd = ::open(codedServerPath.constData(), O_RDWR|O_NONBLOCK)) < 0) {\n        m_errorString = tr(\"Cannot open FiFo %1: %2\").\n                        arg(m_serverPath, QString::fromLocal8Bit(strerror(errno)));\n        m_serverPath.clear();\n        return false;\n    }\n    m_serverNotifier = new QSocketNotifier(m_serverFd, QSocketNotifier::Read, this);\n    connect(m_serverNotifier, SIGNAL(activated(int)), SLOT(bytesAvailable()));\n    return true;\n}\n\nvoid FiFoTty::shutdown()\n{\n    if (!m_serverPath.isEmpty()) {\n        ::close(m_serverFd);\n        ::unlink(QFile::encodeName(m_serverPath).constData());\n        delete m_serverNotifier;\n        m_serverPath.clear();\n    }\n}\n\nvoid FiFoTty::write(const QByteArray &data)\n{\n    ::write(m_serverFd,data.data(),data.length());\n}\n\nvoid FiFoTty::bytesAvailable()\n{  \n    size_t nbytes = 0;\n    if (::ioctl(m_serverFd, FIONREAD, (char *) &nbytes) < 0)\n        return;\n\n    QByteArray buff(nbytes,0);\n    if (::read(m_serverFd, buff.data(), nbytes) != (int)nbytes)\n        return;\n\n    if (nbytes) // Skip EOF notifications\n        emit byteDelivery(buff);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/litetty/fifotty.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: fifotty.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FIFOTTY_H\n#define FIFOTTY_H\n\n#include \"litettyapi/litettyapi.h\"\n\nclass QSocketNotifier;\nclass FiFoTty : public LiteApi::ITty\n{\n    Q_OBJECT\npublic:\n    FiFoTty(QObject *parent);\n    virtual ~FiFoTty();\n    virtual QString serverName() const;\n    virtual QString errorString() const;\n    virtual bool listen();\n    virtual void shutdown();\n    virtual void write(const QByteArray &data);\npublic slots:\n    void bytesAvailable();\nprotected:\n    QString m_serverPath;\n    int m_serverFd;\n    QSocketNotifier *m_serverNotifier;\n    QString m_errorString;\n};\n\n#endif // FIFOTTY_H\n"
  },
  {
    "path": "liteidex/src/plugins/litetty/litetty.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litetty.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"litetty.h\"\n#ifdef Q_OS_WIN\n#include \"sockettty.h\"\n#else\n#include \"sockettty.h\"\n#include \"fifotty.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n#endif\n\nLiteTty::LiteTty(QObject *parent) :\n    LiteApi::ILiteTty(parent)\n{\n}\n\nLiteApi::ITty *LiteTty::createTty(QObject *parent) const\n{\n#ifdef Q_OS_WIN\n    return new SocketTty(parent);\n#else\n    return new FiFoTty(parent);\n#endif\n}\n"
  },
  {
    "path": "liteidex/src/plugins/litetty/litetty.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litetty.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITETTY_H\n#define LITETTY_H\n#include <litettyapi/litettyapi.h>\n\nclass LiteTty : public LiteApi::ILiteTty\n{\n    Q_OBJECT\npublic:\n    explicit LiteTty(QObject *parent = 0);\n    virtual LiteApi::ITty* createTty(QObject *parent) const;\n};\n\n#endif // LITETTY_H\n"
  },
  {
    "path": "liteidex/src/plugins/litetty/litetty.pro",
    "content": "TARGET = litetty\nTEMPLATE = lib\n\n\n    QT += network\n\n\ninclude(../../liteideplugin.pri)\ninclude(../../api/litettyapi/litettyapi.pri)\n\nDEFINES += LITETTY_LIBRARY\n\nSOURCES += litettyplugin.cpp \\\n    litetty.cpp\n\nHEADERS += litettyplugin.h\\\n        litetty_global.h \\\n    litetty.h\n\nwin32 {\n    SOURCES += sockettty.cpp\n    HEADERS += sockettty.h\n} else {\n    SOURCES += sockettty.cpp\n    HEADERS += sockettty.h\n    SOURCES += fifotty.cpp\n    HEADERS += fifotty.h\n}\n"
  },
  {
    "path": "liteidex/src/plugins/litetty/litetty_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litetty_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITETTY_GLOBAL_H\n#define LITETTY_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(LITETTY_LIBRARY)\n#  define LITETTYSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define LITETTYSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#endif // LITETTY_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/litetty/litettyplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litettyplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"litettyplugin.h\"\n#include \"litetty.h\"\n#include <QtPlugin>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nLiteTtyPlugin::LiteTtyPlugin()\n{\n}\n\nbool LiteTtyPlugin::load(LiteApi::IApplication *app)\n{\n    app->extension()->addObject(\"LiteApi.ILiteTty\",new LiteTty(this));\n    return true;\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/litetty/litettyplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litettyplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITETTYPLUGIN_H\n#define LITETTYPLUGIN_H\n\n#include \"litetty_global.h\"\n#include \"liteapi/liteapi.h\"\n\nclass LiteTtyPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    LiteTtyPlugin();\n    virtual bool load(LiteApi::IApplication *app);\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<LiteTtyPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.LiteTtyPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/LiteTty\");\n        m_info->setVer(\"X19\");\n        m_info->setName(\"LiteTty\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setInfo(\"LiteIDE tty Util\");\n        //m_info->appendDepend(\"plugin/liteenv\");\n    }\n};\n\n\n#endif // LITETTYPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/litetty/sockettty.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: sockettty.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"sockettty.h\"\n#include <QLocalServer>\n#include <QLocalSocket>\n#include <QCoreApplication>\n#include <stdlib.h>\n#include <time.h>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nSocketTty::SocketTty(QObject *parent) :\n    LiteApi::ITty(parent), m_server(0),m_socket(0)\n{\n}\n\nSocketTty::~SocketTty()\n{\n    shutdown();\n}\n\nQString SocketTty::serverName() const\n{\n    return m_server->fullServerName();\n}\n\nQString SocketTty::errorString() const\n{\n    return m_server->errorString();\n}\n\nbool SocketTty::listen()\n{\n    if (m_server) {\n        return m_server->isListening();\n    }\n    m_server = new QLocalServer(this);\n    srand(time(0));\n    connect(m_server, SIGNAL(newConnection()), SLOT(newConnectionAvailable()));\n    return m_server->listen(QString::fromLatin1(\"liteide-%1-%2\")\n                            .arg(QCoreApplication::applicationPid())\n                            .arg(rand()));\n}\n\nvoid SocketTty::shutdown()\n{\n    if (m_server) {\n        delete m_server;\n        m_server = 0;\n        m_socket = 0;\n    }\n}\n\nvoid SocketTty::write(const QByteArray &data)\n{\n    m_socket->write(data);\n}\n\nvoid SocketTty::newConnectionAvailable()\n{\n    if (m_socket)\n        return;\n    m_socket = m_server->nextPendingConnection();\n    connect(m_socket, SIGNAL(readyRead()), SLOT(bytesAvailable()));\n}\n\nvoid SocketTty::bytesAvailable()\n{\n    emit byteDelivery(m_socket->readAll());\n}\n"
  },
  {
    "path": "liteidex/src/plugins/litetty/sockettty.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: sockettty.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef SOCKETTTY_H\n#define SOCKETTTY_H\n\n#include \"litettyapi/litettyapi.h\"\n\nclass QLocalServer;\nclass QLocalSocket;\nclass SocketTty : public LiteApi::ITty\n{\n    Q_OBJECT\npublic:\n    explicit SocketTty(QObject *parent = 0);\n    virtual ~SocketTty();\n    virtual QString serverName() const;\n    virtual QString errorString() const;\n    virtual bool listen();\n    virtual void shutdown();\n    virtual void write(const QByteArray &data);\npublic slots:\n    void newConnectionAvailable();\n    void bytesAvailable();\nprotected:\n    QLocalServer *m_server;\n    QLocalSocket *m_socket;\n};\n\n#endif // SOCKETTTY_H\n"
  },
  {
    "path": "liteidex/src/plugins/makefileproject/makefilefile.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: makefilefile.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"makefilefile.h\"\n#include <QStandardItem>\n#include <QFileInfo>\n#include <QFile>\n#include <QDir>\n#include \"fileutil/fileutil.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nMakefileFile::MakefileFile(LiteApi::IApplication *app,QObject *parent)\n    : ModelFileImpl(app,parent)\n{\n}\n\nbool MakefileFile::loadFile(const QString &fileName)\n{\n    QFile file(fileName);\n    if (!file.open(QIODevice::ReadOnly|QIODevice::Text)) {\n        return false;\n    }\n    QMap<QString,QStringList> context = FileUtil::readFileContext(&file);\n    file.close();\n    if (context.isEmpty()) {\n        //return false;\n    }\n    m_context = context;\n    if (m_context.contains(\"GOFILES\") ||\n            m_context.contains(\"CGOFILES\")) {\n        m_mimeType = \"text/x-gomake\";\n    }\n    return true;\n}\n\nvoid MakefileFile::updateModel()\n{\n    m_model->clear();\n    m_fileNameList.clear();\n    m_filePathList.clear();\n\n    QStandardItem *item = new QStandardItem(QFileInfo(m_fileName).fileName());\n    item->setData(ItemProFile);\n    item->setIcon(QIcon(\"icon:images/projectitem.png\"));\n    m_model->appendRow(item);\n    m_filePathList.append(m_fileName);\n\n    QMap<QString,QString> fileMap;\n    fileMap.insert(\"GOFILES\",tr(\"GOFILES\"));\n    fileMap.insert(\"CGOFILES\",tr(\"CGOFILES\"));\n    fileMap.insert(\"HEADERS\",tr(\"Headers\"));\n    fileMap.insert(\"SOURCES\",tr(\"Sources\"));\n\n    QMapIterator<QString,QString> i(fileMap);\n    while(i.hasNext()) {\n        i.next();\n        QStringList files = this->values(i.key());\n        if (!files.isEmpty()) {\n            QStandardItem *folder = new QStandardItem(i.value());\n            folder->setData(ItemFolder);\n            folder->setIcon(QIcon(\"icon:images/folderitem.png\"));\n            m_model->appendRow(folder);\n            foreach(QString file, files) {\n                QStandardItem *fileItem = new QStandardItem(file);\n                fileItem->setData(ItemFile);\n                fileItem->setIcon(QIcon(\"icon:images/fileitem.png\"));\n                folder->appendRow(fileItem);\n                m_fileNameList.append(file);\n                m_filePathList.append(fileNameToFullPath(file));\n            }\n        }\n    }\n}\n\nQString MakefileFile::target() const\n{\n    QString target = QFileInfo(m_fileName).fileName();\n    QString val = value(\"TARG\");\n    if (!val.isEmpty()) {\n        target = val;\n    }\n    return target;\n}\n\nQMap<QString,QString> MakefileFile::targetInfo() const\n{\n    QMap<QString,QString> m;\n    if (m_fileName.isEmpty()) {\n        return m;\n    }\n    QFileInfo info(m_fileName);\n    QString target = info.fileName();\n    QString val = this->value(\"TARG\");\n    if (!val.isEmpty()) {\n        target = val;\n    }\n    m.insert(\"TARGETNAME\",target);\n    m.insert(\"TARGETPATH\",QFileInfo(QDir(info.path()),target).filePath());\n    m.insert(\"TARGETDIR\",info.path());\n    m.insert(\"WORKDIR\",info.path());\n    return m;\n}\n\n\nQString MakefileFile::targetPath() const\n{\n    QString target = QFileInfo(m_fileName).fileName();\n    QString val = value(\"TARG\");\n    if (!val.isEmpty()) {\n        target = val;\n    }\n    QString workPath = QFileInfo(m_fileName).absolutePath();\n    if (!workPath.isEmpty()) {\n        target = QFileInfo(QDir(workPath),target).absoluteFilePath();\n    }\n    return target;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/makefileproject/makefilefile.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: makefilefile.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MAKEFILEFILE_H\n#define MAKEFILEFILE_H\n\n#include \"modelproject/modelfileimpl.h\"\n\nclass MakefileFile : public ModelFileImpl\n{\npublic:\n    MakefileFile(LiteApi::IApplication *app, QObject *parent);\nprotected:\n    virtual bool loadFile(const QString &filePath);\n    virtual void updateModel();\npublic:\n    virtual QString target() const;\n    virtual QString targetPath() const;\n    virtual QMap<QString,QString> targetInfo() const;\n};\n\n#endif // MAKEFILEFILE_H\n"
  },
  {
    "path": "liteidex/src/plugins/makefileproject/makefilefilefactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: makefilefilefactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"makefilefilefactory.h\"\n#include \"makefileproject.h\"\n#include \"makefilefile.h\"\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nMakefileFileFactory::MakefileFileFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IProjectFactory(parent),\n      m_liteApp(app)\n{\n    m_mimeTypes.append(\"text/x-makefile\");\n    m_mimeTypes.append(\"text/x-gomake\");\n}\n\nQStringList MakefileFileFactory::mimeTypes() const\n{\n    return m_mimeTypes;\n}\n\nLiteApi::IProject *MakefileFileFactory::open(const QString &fileName, const QString &mimeType)\n{\n    if (!m_mimeTypes.contains(mimeType)) {\n        return 0;\n    }\n    MakefileProject *project = new MakefileProject(m_liteApp);\n    project->setModelFile(new MakefileFile(m_liteApp,project));\n    if (!project->open(fileName,mimeType)) {\n        delete project;\n        return 0;\n    }\n    return project;\n}\n\nbool MakefileFileFactory::findTargetInfo(const QString &fileName, const QString &mimeType, QMap<QString,QString>& targetInfo) const\n{\n    if (!m_mimeTypes.contains(mimeType)) {\n        return false;\n    }\n    MakefileFile *file = new MakefileFile(m_liteApp,0);\n    bool b = file->open(fileName,mimeType);\n    if (b) {\n        targetInfo = file->targetInfo();\n    }\n    delete file;\n    return b;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/makefileproject/makefilefilefactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: makefilefilefactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MAKEFILEFILEFACTORY_H\n#define MAKEFILEFILEFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass MakefileFileFactory : public LiteApi::IProjectFactory\n{\npublic:\n    MakefileFileFactory(LiteApi::IApplication *app, QObject *parent = 0);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IProject *open(const QString &fileName, const QString &mimeType);\n    virtual bool findTargetInfo(const QString &fileName, const QString &mimetype, QMap<QString,QString>& findTargetInfo) const;\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QStringList m_mimeTypes;\n};\n\n#endif // MAKEFILEFILEFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/makefileproject/makefileproject.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: makefileproject.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"makefileproject.h\"\n#include \"makefilefile.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nMakefileProject::MakefileProject(LiteApi::IApplication *app)\n    : ModelProjectImpl(app)\n{\n}\n"
  },
  {
    "path": "liteidex/src/plugins/makefileproject/makefileproject.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: makefileproject.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MAKEFILEPROJECT_H\n#define MAKEFILEPROJECT_H\n\n#include \"modelproject/modelprojectimpl.h\"\n\nclass MakefileProject : public ModelProjectImpl\n{\npublic:\n    MakefileProject(LiteApi::IApplication *app);\n};\n\n#endif // MAKEFILEPROJECT_H\n"
  },
  {
    "path": "liteidex/src/plugins/makefileproject/makefileproject.pro",
    "content": "TARGET = makefileproject\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude(../../utils/fileutil/fileutil.pri)\ninclude(../../utils/modelproject/modelproject.pri)\n\nDEFINES += MAKEFILEPROJECT_LIBRARY\n\nSOURCES += makefileprojectplugin.cpp \\\n    makefilefilefactory.cpp \\\n    makefileproject.cpp \\\n    makefilefile.cpp\n\nHEADERS += makefileprojectplugin.h\\\n        makefileproject_global.h \\\n    makefilefilefactory.h \\\n    makefileproject.h \\\n    makefilefile.h\n"
  },
  {
    "path": "liteidex/src/plugins/makefileproject/makefileproject.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n  <mime-type type=\"text/x-makefile\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>GNU Makefile</comment>\n    <glob pattern=\"Makefile\"/>\n  </mime-type>\n</mime-info>\n"
  },
  {
    "path": "liteidex/src/plugins/makefileproject/makefileproject_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: makefileproject_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MAKEFILEPROJECT_GLOBAL_H\n#define MAKEFILEPROJECT_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(MAKEFILEPROJECT_LIBRARY)\n#  define MAKEFILEPROJECTSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define MAKEFILEPROJECTSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#endif // MAKEFILEPROJECT_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/makefileproject/makefileprojectplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: makefileprojectplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"makefileprojectplugin.h\"\n#include \"makefilefilefactory.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nMakefileProjectPlugin::MakefileProjectPlugin()\n{\n    m_info->setId(\"plugin/makefileproject\");\n    m_info->setName(\"MakefileProject\");\n    m_info->setAuthor(\"visualfc\");\n    m_info->setVer(\"x2\");\n    m_info->setInfo(\"Project Makefile Plugin\");\n}\n\n\nbool MakefileProjectPlugin::initWithApp(LiteApi::IApplication *app)\n{\n    if (!LiteApi::IPlugin::initWithApp(app)) {\n        return false;\n    }\n\n    MakefileFileFactory *factory = new MakefileFileFactory(app,this);\n    app->projectManager()->addFactory(factory);\n    return true;\n}\n\nQ_EXPORT_PLUGIN(MakefileProjectPlugin)\n"
  },
  {
    "path": "liteidex/src/plugins/makefileproject/makefileprojectplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: makefileprojectplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MAKEFILEPROJECTPLUGIN_H\n#define MAKEFILEPROJECTPLUGIN_H\n\n#include \"makefileproject_global.h\"\n#include \"liteapi/liteapi.h\"\n#include <QtPlugin>\n\nclass MakefileProjectPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPlugin)\npublic:\n    MakefileProjectPlugin();\n    virtual bool initWithApp(LiteApi::IApplication *app);\n};\n\n#endif // MAKEFILEPROJECTPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/markdown/css/textbrowser.css",
    "content": "body {\n\tmargin: 0;\n\tfont-family: Helvetica, Arial, sans-serif;\n\tfont-size: 16px;\n}\n\npre, code {\n\tfont-family: Menlo, monospace;\n\tfont-size: 14px;\n\tword-wrap: break-word;\n}\n\nbody {\n\tcolor: #222;\n}\na {\n\tcolor: #375EAB;\n\ttext-decoration: none;\n}\n\npre {\n\tbackground: #e9e9e9;\n\tpadding: 10px;\n\tmargin: 24px;\n\t-webkit-border-radius: 5px;\n\t-moz-border-radius: 5px;\n\tborder-radius: 5px;\n}\n\nh1, h2, h3, h4 {\n\tmargin-left: 0;\n\tmargin-top: 20px;\n\tmargin-bottom: 20px;\n\tmargin-right: 0;\n\tpadding: 0;\n\tcolor: #375EAB;\n\tfont-weight: bold;\n}\nh1 {\n\tfont-size: 24px;\n}\nh2 {\n\tfont-size: 20px;\n\tpadding: 2px 5px;\n}\nh3 {\n\tfont-size: 18px;\n}\nh4 {\n\tfont-size: 16px;\n}\n\nh1 a, h2 a, h3 a, h4 a {\n\ttext-decoration: underline;\n}\n\ndl {\n\tmargin: 20px;\n}\ndd {\n\tmargin: 2px 10px;\n}\ndl, dd {\n\tfont-size: 14px;\n}\n\nhr { border-style: none; border-top: 1px solid black; }\n"
  },
  {
    "path": "liteidex/src/plugins/markdown/htmlpreview.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: htmlpreview.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"markdown_global.h\"\n#include \"htmlpreview.h\"\n#include \"cmark/libcmark.h\"\n#include <QScrollBar>\n#include <QMenu>\n#include <QAction>\n#include <QActionGroup>\n#include <QFileInfo>\n#include <QTextCodec>\n#include <QFile>\n#include <QDir>\n#include <QUrl>\n#include <QVBoxLayout>\n#include <QMessageBox>\n#include <QFileDialog>\n#include <QStatusBar>\n#include <QToolTip>\n#include <QTimer>\n#ifndef QT_NO_PRINTER\n#include <QPrinter>\n#include <QPrintPreviewDialog>\n#endif\n\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nHtmlPreview::HtmlPreview(LiteApi::IApplication *app,QObject *parent) :\n    QObject(parent),\n    m_liteApp(app)\n{\n    m_curEditor = 0;\n    m_curTextEditor = 0;\n    m_widget = new QWidget;\n    m_htmlWidget = 0;\n    m_bWebkit = false;\n\n    m_htmlUpdateTimer = new QTimer(this);\n    m_htmlUpdateTimer->setSingleShot(true);\n    m_htmlUpdateTimer->setInterval(500);\n\n    m_cssMenu = new QMenu(tr(\"Page Style\"));\n    m_cssMenu->setIcon(QIcon(\"icon:/markdown/images/css.png\"));\n\n    m_cssActGroup = new QActionGroup(this);\n\n    m_reloadAct = new QAction(QIcon(\"icon:images/reload.png\"),tr(\"Reload\"),this);\n    m_exportHtmlAct = new QAction(QIcon(\"icon:liteeditor/images/exporthtml.png\"),tr(\"Export Html\"),this);\n    m_exportPdfAct = new QAction(QIcon(\"icon:liteeditor/images/exportpdf.png\"),tr(\"Export PDF\"),this);\n    m_printPreviewAct = new QAction(QIcon(\"icon:liteeditor/images/fileprintpreview.png\"),tr(\"Print Preview\"),this);\n    m_printPreviewAct->setVisible(false);\n\n    m_syncScrollAct = new QAction(tr(\"Synchronize preview and code scrollbars\"),this);\n    m_syncScrollAct->setCheckable(true);\n\n    m_syncSwitchAct = new QAction(tr(\"Automatically display preview\"),this);\n    m_syncSwitchAct->setCheckable(true);\n\n    m_configMenu = new QMenu(tr(\"Config\"),m_widget);\n    m_configMenu->setIcon(QIcon(\"icon:markdown/images/config.png\"));\n    m_configMenu->addAction(m_syncSwitchAct);\n    m_configMenu->addAction(m_syncScrollAct);\n\n    QList<QAction*> actions;\n    actions << m_configMenu->menuAction() << m_reloadAct << m_exportHtmlAct << m_exportPdfAct << m_printPreviewAct << m_cssMenu->menuAction();\n\n    m_toolAct = m_liteApp->toolWindowManager()->addToolWindow(Qt::BottomDockWidgetArea,\n                                                  m_widget,\n                                                  QString(\"HtmlPreview\"),\n                                                  QString(tr(\"HTML Preview\")),\n                                                  false,\n                                                  actions);\n\n\n    connect(m_liteApp,SIGNAL(loaded()),this,SLOT(appLoaded()));\n    connect(m_liteApp->editorManager(),SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(currentEditorChanged(LiteApi::IEditor*)));\n    connect(m_toolAct,SIGNAL(toggled(bool)),this,SLOT(triggeredTool(bool)));\n    connect(m_exportHtmlAct,SIGNAL(triggered()),this,SLOT(exportHtml()));\n    connect(m_exportPdfAct,SIGNAL(triggered()),this,SLOT(exportPdf()));\n    connect(m_printPreviewAct,SIGNAL(triggered()),this,SLOT(printPreview()));\n    connect(m_cssActGroup,SIGNAL(triggered(QAction*)),this,SLOT(cssTtriggered(QAction*)));\n    connect(m_syncSwitchAct,SIGNAL(toggled(bool)),this,SLOT(toggledSyncSwitch(bool)));\n    connect(m_syncScrollAct,SIGNAL(toggled(bool)),this,SLOT(toggledSyncScroll(bool)));\n    connect(m_reloadAct,SIGNAL(triggered()),this,SLOT(reload()));\n    connect(m_htmlUpdateTimer,SIGNAL(timeout()),this,SLOT(htmlUpdate()));\n\n    m_syncScrollAct->setChecked(m_liteApp->settings()->value(MARKDOWN_SYNCSCROLLHTML,true).toBool());\n    m_syncSwitchAct->setChecked(m_liteApp->settings()->value(MARKDOWN_SYNCVIEWHTML,false).toBool());\n}\n\nHtmlPreview::~HtmlPreview()\n{\n    delete m_htmlUpdateTimer;\n    QAction *act = m_cssActGroup->checkedAction();\n    if (act != 0) {\n        m_liteApp->settings()->setValue(\"markdown/css\",act->text());\n    }\n    m_liteApp->settings()->setValue(MARKDOWN_SYNCSCROLLHTML,m_syncScrollAct->isChecked());\n    m_liteApp->settings()->setValue(MARKDOWN_SYNCVIEWHTML,m_syncSwitchAct->isChecked());\n    delete m_configMenu;\n    delete m_cssMenu;\n    if (m_widget) {\n        delete m_widget;\n    }\n}\n\nstatic QByteArray defcss_data =\n\"@media print {pre,code {word-wrap: break-word;}\";\n\nstatic QByteArray export_data =\n\"<html>\"\n\"<head>\"\n\"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\"/>\"\n\"<style type=\\\"text/css\\\">\"\n\"__MARKDOWN_CSS__\"\n\"</style>\"\n\"<title>__MARKDOWN_TITLE__</title>\"\n\"</head>\"\n\"<body>\"\n\"__MARKDOWN_CONTENT__\"\n\"</body>\"\n\"</html>\";\n\n\nvoid HtmlPreview::appLoaded()\n{\n    m_htmlWidget = m_liteApp->htmlWidgetManager()->create(this);\n    if (m_htmlWidget->className() == \"QWebView\") {\n        m_bWebkit = true;\n    } else {\n        m_bWebkit = false;\n    }\n\n    //connect(m_htmlWidget,SIGNAL(loadFinished(bool)),this,SLOT(loadFinished(bool)));\n    connect(m_htmlWidget,SIGNAL(contentsSizeChanged()),this,SLOT(htmlContentsSizeChanged()));\n    connect(m_htmlWidget,SIGNAL(linkClicked(QUrl)),this,SLOT(linkClicked(QUrl)));\n    connect(m_htmlWidget,SIGNAL(linkHovered(QUrl)),this,SLOT(linkHovered(QUrl)));\n\n    QAction *nocssAct = new QAction(tr(\"Plain HTML\"),this);\n    nocssAct->setCheckable(true);\n    nocssAct->setObjectName(\"nocss\");\n    m_cssActGroup->addAction(nocssAct);\n    QAction *sep = new QAction(this);\n    sep->setSeparator(true);\n    m_cssActGroup->addAction(sep);\n\n    QFile file(m_liteApp->resourcePath()+\"/packages/markdown/export.html\");\n    if (file.open(QFile::ReadOnly)) {\n        m_exportOrgTemple = file.readAll();\n    } else {\n        m_exportOrgTemple = export_data;\n    }\n\n    m_exportTemple = m_exportOrgTemple;\n    m_exportTemple.replace(\"__MARKDOWN_CSS__\",defcss_data);\n\n    QString defcss;\n\n    if (m_bWebkit) {\n        QDir dir(m_liteApp->resourcePath()+\"/packages/markdown/css\");\n        foreach (QFileInfo info, dir.entryInfoList(QStringList()<<\"*.css\",QDir::Files)) {\n            QAction *act = new QAction(info.fileName(),this);\n            act->setCheckable(true);\n            m_cssActGroup->addAction(act);\n        }\n        defcss = \"github.css\";\n    } else {\n        QAction *act = new QAction(\"textbrowser.css\",this);\n        act->setCheckable(true);\n        m_cssActGroup->addAction(act);\n        //fix_qt_textbrowser(true);\n        defcss = \"textbrowser.css\";\n    }\n\n    m_cssMenu->addActions(m_cssActGroup->actions());\n\n    QVBoxLayout *layout = new QVBoxLayout;\n    layout->setMargin(0);\n    layout->setSpacing(0);\n    layout->addWidget(m_htmlWidget->widget(),1);\n    m_widget->setLayout(layout);\n\n    QString css = m_liteApp->settings()->value(\"markdown/css\",defcss).toString();\n    foreach (QAction *act, m_cssActGroup->actions()) {\n        if (act->text() == css) {\n            act->trigger();\n            break;\n        }\n    }\n}\n\nQByteArray HtmlPreview::loadCssData(const QString &fileName)\n{\n    QFile f(fileName);\n    if (f.open(QFile::ReadOnly)) {\n        return f.readAll();\n    }\n    return QByteArray();\n}\n\nvoid HtmlPreview::currentEditorChanged(LiteApi::IEditor *editor)\n{       \n    if (m_curEditor != 0) {\n        m_curEditor->disconnect(this);\n    }    \n    if (m_curTextEditor != 0) {\n        m_curTextEditor->verticalScrollBar()->disconnect(this);\n    }\n\n    if (editor &&\n        ( (editor->mimeType() == \"text/x-markdown\") ||\n            (editor->mimeType() == \"text/html\")) )  {\n        if (m_syncSwitchAct->isChecked()) {\n            m_toolAct->setChecked(true);\n        }\n        QPlainTextEdit *textEdit = LiteApi::findExtensionObject<QPlainTextEdit*>(editor,\"LiteApi.QPlainTextEdit\");\n        if (textEdit) {\n            m_curTextEditor = textEdit;\n            connect(m_curTextEditor->verticalScrollBar(),SIGNAL(valueChanged(int)),this,SLOT(scrollValueChanged()));\n        }\n        LiteApi::ITextEditor *ed = LiteApi::getTextEditor(editor);\n        if (ed) {\n            m_curEditor = ed;\n            connect(m_curEditor,SIGNAL(contentsChanged()),this,SLOT(contentsChanged()));\n        }\n        m_bFileChanged = true;\n        editorHtmlPrivew(true);\n    } else {\n        if (m_syncSwitchAct->isChecked()) {\n            m_toolAct->setChecked(false);\n        }\n        m_curEditor = 0;\n        m_curTextEditor = 0;\n        if (m_htmlWidget && !m_lastData.isEmpty()) {\n            m_htmlWidget->clear();\n        }\n        m_lastData.clear();\n    }\n}\n\nvoid HtmlPreview::contentsChanged()\n{\n    m_htmlUpdateTimer->start();\n}\n\nvoid HtmlPreview::htmlUpdate()\n{\n    editorHtmlPrivew();\n}\n\nvoid HtmlPreview::scrollValueChanged()\n{\n    if (m_syncScrollAct->isChecked()) {\n        syncScrollValue();\n    }\n}\n\nvoid HtmlPreview::syncScrollValue()\n{\n    if (!m_curTextEditor || !m_htmlWidget || !m_toolAct->isChecked()) {\n        return;\n    }\n\n    int max0 = m_curTextEditor->verticalScrollBar()->maximum();\n    int min0 = m_curTextEditor->verticalScrollBar()->minimum();\n    int value0 = m_curTextEditor->verticalScrollBar()->value();\n    if ((max0-min0) == 0) {\n        return;\n    }\n    int max1 = m_htmlWidget->scrollBarMaximum(Qt::Vertical);\n    int min1 = m_htmlWidget->scrollBarMinimum(Qt::Vertical);\n    int value1 = 1.0*value0*(max1-min1)/(max0-min0);\n    m_htmlWidget->setScrollBarValue(Qt::Vertical,value1);\n}\n\nvoid HtmlPreview::toggledSyncSwitch(bool b)\n{\n    if (b) {\n        //this->editorHtmlPrivew(true);\n    }\n}\n\nvoid HtmlPreview::toggledSyncScroll(bool b)\n{\n    if (b) {\n        this->syncScrollValue();\n    }\n}\n\nvoid HtmlPreview::editorHtmlPrivew(bool force)\n{\n    if (!m_curEditor || !m_htmlWidget || !m_toolAct->isChecked()) {\n        return;\n    }\n\n    QByteArray data = m_curEditor->utf8Data();\n    if (!force && (m_lastData == data)) {\n        return;\n    }    \n    loadHtmlData(data,QFileInfo(m_curEditor->filePath()).fileName().toUtf8(),m_curEditor->mimeType(),QUrl::fromLocalFile(m_curEditor->filePath()));\n}\n\nvoid HtmlPreview::loadHtmlData(const QByteArray &data, const QByteArray &title, const QString &mime, const QUrl &url)\n{\n    m_lastData = data;\n\n//    int h = m_htmlWidget->scrollBarValue(Qt::Horizontal);\n//    int v = m_htmlWidget->scrollBarValue(Qt::Vertical);\n//    m_prevPos = QPoint(h,v);\n    if (mime == \"text/html\") {\n        QTextCodec *codec = QTextCodec::codecForHtml(data,QTextCodec::codecForName(\"utf-8\"));\n        m_htmlWidget->setHtml(codec->toUnicode(data),QUrl::fromLocalFile(m_curEditor->filePath()));\n    } else if (mime == \"text/x-markdown\") {\n        m_exportHtml = m_exportTemple;\n        m_exportHtml.replace(\"__MARKDOWN_TITLE__\",title);\n        m_exportHtml.replace(\"__MARKDOWN_CONTENT__\",md2html(data));\n        m_htmlWidget->setHtml(QString::fromUtf8(m_exportHtml),url);\n    } else {\n        m_exportHtml = m_exportTemple;\n        QTextCodec *codec = QTextCodec::codecForName(\"utf-8\");\n        m_exportHtml.replace(\"__MARKDOWN_TITLE__\",title);\n#if QT_VERSION >= 0x050000\n        m_exportHtml.replace(\"__MARKDOWN_CONTENT__\",\"<pre>\"+codec->toUnicode(data).toHtmlEscaped().toUtf8()+\"</pre>\");\n#else\n        m_exportHtml.replace(\"__MARKDOWN_CONTENT__\",\"<pre>\"+Qt::escape(codec->toUnicode(data)).toUtf8()+\"</pre>\");\n#endif\n        m_htmlWidget->setHtml(QString::fromUtf8(m_exportHtml),url);\n    }\n}\n\nvoid HtmlPreview::triggeredTool(bool b)\n{\n    if (b) {\n        currentEditorChanged(m_liteApp->editorManager()->currentEditor());\n    }\n}\n\nvoid HtmlPreview::reload()\n{\n    this->editorHtmlPrivew(true);\n    this->syncScrollValue();\n}\n\nvoid HtmlPreview::exportHtml()\n{\n    if (m_curEditor == 0) {\n        return;\n    }\n    QFileInfo info(m_curEditor->filePath());\n    QString path = info.path()+\"//\"+info.completeBaseName();\n\n    QString fileName = QFileDialog::getSaveFileName(m_widget, tr(\"Export Html\"),\n                                                    path, \"*.html\");\n    if (!fileName.isEmpty()) {\n        if (QFileInfo(fileName).suffix().isEmpty())\n            fileName.append(\".html\");\n        QFile file(fileName);\n        if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {\n            QMessageBox::critical(m_widget,\n                                  tr(\"Export Failed\"),\n                                  QString(tr(\"Could not open %1 for writing!\")).arg(fileName)\n                                  );\n            return;\n        }\n        if (m_curEditor->mimeType() == \"text/html\") {\n            file.write(m_lastData);\n        } else {\n            file.write(m_exportHtml);\n        }\n        file.close();\n        QDesktopServices::openUrl(QUrl::fromLocalFile(QFileInfo(fileName).path()));\n    }\n}\n\nvoid HtmlPreview::exportPdf()\n{\n    if (m_curEditor == 0) {\n        return;\n    }\n#ifndef QT_NO_PRINTER\n    QFileInfo info(m_curEditor->filePath());\n    QString path = info.path()+\"//\"+info.completeBaseName();\n\n    QString fileName = QFileDialog::getSaveFileName(m_widget, tr(\"Export PDF\"),\n                                                    path, \"*.pdf\");\n    if (!fileName.isEmpty()) {\n        if (QFileInfo(fileName).suffix().isEmpty())\n            fileName.append(\".pdf\");\n        QPrinter printer(QPrinter::HighResolution);\n        printer.setOutputFormat(QPrinter::PdfFormat);\n        printer.setCreator(\"LiteIDE\");\n        printer.setOutputFileName(fileName);\n        m_htmlWidget->print(&printer);\n        QDesktopServices::openUrl(QUrl::fromLocalFile(QFileInfo(fileName).path()));\n    }\n#endif\n}\n\nvoid HtmlPreview::printPreview()\n{\n    if (m_curEditor == 0) {\n        return;\n    }\n#ifndef QT_NO_PRINTER\n    QPrinter printer(QPrinter::HighResolution);\n    printer.setPageMargins(10,10,10,10,QPrinter::Millimeter);\n    printer.setPageSize(QPrinter::A4);\n    QPrintPreviewDialog dlg(&printer,m_widget);\n    connect(&dlg,SIGNAL(paintRequested(QPrinter*)),m_htmlWidget,SLOT(print(QPrinter*)));\n    dlg.exec();\n#endif\n}\n\nvoid HtmlPreview::cssTtriggered(QAction *act)\n{\n    if (!act) {\n        return;\n    }\n    QByteArray cssData;\n    if (act->objectName() != \"nocss\") {\n        QString fileName;\n        if (!m_bWebkit) {\n            fileName = \":/markdown/css/\"+act->text();\n        } else {\n            fileName = m_liteApp->resourcePath()+\"/packages/markdown/css/\"+act->text();\n        }\n        cssData = this->loadCssData(fileName);\n    }\n    if (cssData.isEmpty()) {\n        cssData = \"@media print {pre,code {word-wrap: break-word;}\";\n    }\n    m_exportTemple = m_exportOrgTemple;\n    m_exportTemple.replace(\"__MARKDOWN_CSS__\",cssData);\n\n    this->editorHtmlPrivew(true);\n}\n\nvoid HtmlPreview::linkClicked(const QUrl &url)\n{\n    m_liteApp->mainWindow()->statusBar()->clearMessage();\n\n    if (url.scheme() == \"file\") {\n        QFileInfo info(url.toLocalFile());\n        QFile f(info.filePath());\n        if (!f.open(QFile::ReadOnly)) {\n            return;\n        }\n        QByteArray data = f.readAll();\n        QString mime = m_liteApp->mimeTypeManager()->findMimeTypeByFile(info.filePath());\n        loadHtmlData(data,info.fileName().toUtf8(),mime,url);\n    } else {\n        QDesktopServices::openUrl(url);\n    }\n}\n\nvoid HtmlPreview::linkHovered(const QUrl &url)\n{\n    m_liteApp->mainWindow()->statusBar()->showMessage(url.toString());\n}\n\nvoid HtmlPreview::loadFinished(bool b)\n{\n    if (!b) {\n        return;\n    }\n    if (m_bFileChanged) {\n        this->syncScrollValue();\n        this->m_bFileChanged = false;\n    } else {\n        m_htmlWidget->setScrollBarValue(Qt::Horizontal,m_prevPos.x());\n        m_htmlWidget->setScrollBarValue(Qt::Vertical,m_prevPos.y());\n    }\n}\n\nvoid HtmlPreview::htmlContentsSizeChanged()\n{\n    this->syncScrollValue();\n}\n"
  },
  {
    "path": "liteidex/src/plugins/markdown/htmlpreview.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: htmlpreview.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef HTMLPREVIEW_H\n#define HTMLPREVIEW_H\n\n#include <liteapi/liteapi.h>\n\n#include <QPointer>\n\nclass QActionGroup;\nclass HtmlPreview : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit HtmlPreview(LiteApi::IApplication *app,QObject *parent = 0);\n    virtual ~HtmlPreview();\n    void loadHtmlData(const QByteArray &data, const QByteArray &title, const QString &mime,const QUrl &url);\npublic slots:\n    void appLoaded();\n    QByteArray loadCssData(const QString &fileName);\n    void currentEditorChanged(LiteApi::IEditor*);\n    void contentsChanged();\n    void htmlUpdate();\n    void scrollValueChanged();\n    void syncScrollValue();\n    void toggledSyncSwitch(bool);\n    void toggledSyncScroll(bool);\n    void editorHtmlPrivew(bool force = false);\n    void triggeredTool(bool);\n    void reload();\n    void exportHtml();\n    void exportPdf();\n    void printPreview();\n    void cssTtriggered(QAction*);\n    void linkClicked(const QUrl &);\n    void linkHovered(const QUrl &);\n    void loadFinished(bool);\n    void htmlContentsSizeChanged();\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QWidget               *m_widget;\n    LiteApi::IHtmlWidget  *m_htmlWidget;\n    QAction     *m_reloadAct;\n    QAction     *m_exportHtmlAct;\n    QAction     *m_exportPdfAct;\n    QAction     *m_printPreviewAct;\n    QAction     *m_syncScrollAct;\n    QAction     *m_syncSwitchAct;\n    QMenu       *m_cssMenu;\n    QMenu       *m_configMenu;\n    QActionGroup *m_cssActGroup;\n    QAction     *m_toolAct;\n    QPointer<LiteApi::ITextEditor> m_curEditor;\n    QPointer<QPlainTextEdit> m_curTextEditor;\n    bool        m_bWebkit;\n    bool        m_bFileChanged;\n    QByteArray  m_exportOrgTemple;\n    QByteArray  m_exportTemple;\n    QByteArray  m_exportHtml;\n    QByteArray  m_lastData;\n    QByteArray  m_head;\n    QPoint      m_prevPos;\n    QTimer      *m_htmlUpdateTimer;\n};\n\n#endif // HTMLPREVIEW_H\n"
  },
  {
    "path": "liteidex/src/plugins/markdown/markdown.pro",
    "content": "TARGET = markdown\nTEMPLATE = lib\n\ninclude (../../liteideplugin.pri)\ninclude (../../3rdparty/cmark/cmark.pri)\n\nDEFINES += MARKDOWN_LIBRARY\n\nSOURCES += markdownplugin.cpp \\\n    htmlpreview.cpp \\\n    markdownedit.cpp \\\n    markdownbatchbrowser.cpp\n\nHEADERS += markdownplugin.h\\\n        markdown_global.h \\\n    htmlpreview.h \\\n    markdownedit.h \\\n    markdownbatchbrowser.h\n\nRESOURCES += \\\n    markdown.qrc\n\nOTHER_FILES +=\n\nFORMS += \\\n    markdownbatchwidget.ui\n"
  },
  {
    "path": "liteidex/src/plugins/markdown/markdown.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/markdown\">\n        <file>images/bold.png</file>\n        <file>images/code.png</file>\n        <file>images/h1.png</file>\n        <file>images/h2.png</file>\n        <file>images/h3.png</file>\n        <file>images/hr.png</file>\n        <file>images/image.png</file>\n        <file>images/italic.png</file>\n        <file>images/link.png</file>\n        <file>images/quote.png</file>\n        <file>images/css.png</file>\n        <file>images/syncscroll.png</file>\n        <file>images/syncview.png</file>\n        <file>images/config.png</file>\n        <file>css/textbrowser.css</file>\n        <file>images/h4.png</file>\n        <file>images/h5.png</file>\n        <file>images/h6.png</file>\n        <file>images/ol.png</file>\n        <file>images/ul.png</file>\n    </qresource>\n</RCC>\n"
  },
  {
    "path": "liteidex/src/plugins/markdown/markdown_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: markdown_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MARKDOWN_GLOBAL_H\n#define MARKDOWN_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(MARKDOWN_LIBRARY)\n#  define MARKDOWNSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define MARKDOWNSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#define  MARKDOWN_SYNCVIEWHTML \"markdown/syncviewhtml\"\n#define  MARKDOWN_SYNCSCROLLHTML \"markdown/syncsscrollhtml\"\n\n#endif // MARKDOWN_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/markdown/markdownbatchbrowser.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: markdownbatchbrowser.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"markdownbatchbrowser.h\"\n#include \"ui_markdownbatchwidget.h\"\n#include \"cmark/libcmark.h\"\n#include <QFileDialog>\n#include <QStandardItemModel>\n#include <QStandardItem>\n#include <QStringListModel>\n#include <QFileInfo>\n#include <QTextCodec>\n#include <QUrl>\n#ifndef QT_NO_PRINTER\n#include <QPrinter>\n#include <QPrintPreviewDialog>\n#endif\n\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nstatic QByteArray defcss_data =\n\"@media print {pre,code {word-wrap: break-word;}\";\n\nstatic QByteArray export_data =\n\"<html>\"\n\"<head>\"\n\"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\"/>\"\n\"<style type=\\\"text/css\\\">\"\n\"__MARKDOWN_CSS__\"\n\"</style>\"\n\"<title>__MARKDOWN_TITLE__</title>\"\n\"</head>\"\n\"<body>\"\n\"__MARKDOWN_CONTENT__\"\n\"</body>\"\n\"</html>\";\n\nMarkdownBatchBrowser::MarkdownBatchBrowser(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IBrowserEditor(parent),\n    m_liteApp(app),\n    ui(new Ui::MarkdownBatchWidget)\n{\n    m_widget = new QWidget;\n    m_doc = 0;\n    m_mode = 0;\n    m_model = new QStandardItemModel(this);\n    m_model->setHorizontalHeaderLabels(QStringList()<< \"FilePath\");\n    ui->setupUi(m_widget);\n    ui->filesTreeView->setModel(m_model);\n    ui->filesTreeView->setEditTriggers(0);\n    ui->filesTreeView->setDragDropMode(QAbstractItemView::NoDragDrop);\n    connect(ui->importFolderPushButton,SIGNAL(clicked()),this,SLOT(browserImportFolder()));\n    connect(ui->addFilesPushButton,SIGNAL(clicked()),this,SLOT(addFiles()));\n    connect(ui->removePushButton,SIGNAL(clicked()),this,SLOT(remove()));\n    connect(ui->removeAllPushButton,SIGNAL(clicked()),this,SLOT(removeAll()));\n    connect(ui->moveDownPushButton,SIGNAL(clicked()),this,SLOT(moveDown()));\n    connect(ui->moveUpPushButton,SIGNAL(clicked()),this,SLOT(moveUp()));\n    connect(ui->useCssCheckBox,SIGNAL(toggled(bool)),ui->cssComboBox,SLOT(setEnabled(bool)));\n    connect(ui->browserExportFolderPushButton,SIGNAL(clicked()),this,SLOT(browserExportFolder()));\n    connect(ui->splitHtmlPushButton,SIGNAL(clicked()),this,SLOT(splitHtml()));\n    connect(ui->mergetHtmlPushButton,SIGNAL(clicked()),this,SLOT(mergeHtml()));\n    connect(ui->splitPdfPushButton,SIGNAL(clicked()),this,SLOT(splitPdf()));\n    connect(ui->mergePdfPushButton,SIGNAL(clicked()),this,SLOT(mergePdf()));\n    connect(ui->mergetPrintPushButton,SIGNAL(clicked()),this,SLOT(mergePrint()));\n    connect(ui->mergePrintPreviwPushButton,SIGNAL(clicked()),this,SLOT(mergePrintPreview()));\n\n    QDir dir(m_liteApp->resourcePath()+\"/packages/markdown/css\");\n    QStringList csss;\n    foreach (QFileInfo info, dir.entryInfoList(QStringList()<<\"*.css\",QDir::Files)) {\n        csss.append(info.fileName());\n    }\n    if (!csss.isEmpty()) {\n        ui->cssComboBox->addItems(csss);\n        int index = m_liteApp->settings()->value(\"markdown/batch_css\",0).toInt();\n        if (index >= 0 && index <= csss.size()-1) {\n            ui->cssComboBox->setCurrentIndex(index);\n        } else {\n            ui->cssComboBox->setCurrentIndex(0);\n        }\n        bool useCss = m_liteApp->settings()->value(\"markdown/batch_usecss\",true).toBool();\n        ui->useCssCheckBox->setChecked(useCss);\n    } else {\n        ui->useCssCheckBox->setChecked(false);\n        ui->useCssCheckBox->setEnabled(false);\n    }\n    ui->cssComboBox->setEnabled(ui->useCssCheckBox->isChecked());\n    ui->exportFolderLineEdit->setText(m_liteApp->settings()->value(\"markdown/batch_oupath\").toString());\n    ui->mergeHrCheckBox->setChecked(m_liteApp->settings()->value(\"markdown/batch_hr\",false).toBool());\n    ui->mergePageBreakCheckBox->setChecked(m_liteApp->settings()->value(\"markdown/batch_page-break\",true).toBool());\n\n    ui->mergePrintPreviwPushButton->setVisible(false);\n    ui->mergetPrintPushButton->setVisible(false);\n}\n\nMarkdownBatchBrowser::~MarkdownBatchBrowser()\n{\n    m_liteApp->settings()->setValue(\"markdown/batch_usecss\",ui->useCssCheckBox->isChecked());\n    m_liteApp->settings()->setValue(\"markdown/batch_css\",ui->cssComboBox->currentIndex());\n    m_liteApp->settings()->setValue(\"markdown/batch_oupath\",ui->exportFolderLineEdit->text());\n    m_liteApp->settings()->setValue(\"markdown/batch_hr\",ui->mergeHrCheckBox->isChecked());\n    m_liteApp->settings()->setValue(\"markdown/batch_page-break\",ui->mergePageBreakCheckBox->isChecked());\n\n    delete ui;\n    delete m_widget;\n}\n\nQWidget *MarkdownBatchBrowser::widget()\n{\n    return m_widget;\n}\n\nQString MarkdownBatchBrowser::name() const\n{\n    return tr(\"Markdown Exporter\");\n}\n\nQString MarkdownBatchBrowser::mimeType() const\n{\n    return \"browser/markdown\";\n}\n\nQString MarkdownBatchBrowser::markdownOpenFilter() const\n{\n    QStringList types;\n    QStringList filter;\n    LiteApi::IMimeType *mimeType = m_liteApp->mimeTypeManager()->findMimeType(\"text/x-markdown\");\n    if (mimeType) {\n        QStringList patterns = mimeType->allPatterns();\n        types.append(patterns);\n        filter.append(QString(\"%1 (%2)\").arg(mimeType->comment()).arg(patterns.join(\" \")));\n        types.removeDuplicates();\n        filter.removeDuplicates();\n    }\n    filter.append(tr(\"All Files (*)\"));\n    return filter.join(\";;\");\n}\n\nQStringList MarkdownBatchBrowser::markdonwFilter() const\n{\n    LiteApi::IMimeType *mimeType = m_liteApp->mimeTypeManager()->findMimeType(\"text/x-markdown\");\n    if (mimeType) {\n        return mimeType->globPatterns();\n    }\n    return QStringList() << \"*.md\";\n}\n\nvoid MarkdownBatchBrowser::addFile(const QString &file)\n{\n    m_model->appendRow(new QStandardItem(file));\n}\n\nstatic QByteArray head =\n\"<html>\"\n\"<head>\"\n\"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\"/>\"\n\"</head>\"\n\"<body>\";\n\nstatic QByteArray end =\n\"</body>\"\n\"</html>\";\n\nvoid MarkdownBatchBrowser::appendLog(const QString &log)\n{\n    ui->logPlainTextEdit->appendPlainText(log);\n}\n\nvoid MarkdownBatchBrowser::loadFinished(bool b)\n{\n    if (!b) {\n        this->appendLog(\"Failed loading the HTML document!\");\n        return;\n    }\n#ifndef QT_NO_PRINTER\n    if (m_mode == MODE_MERGE_PDF || m_mode == MODE_SPLIT_PDF) {\n        QPrinter printer(QPrinter::HighResolution);\n        printer.setOutputFormat(QPrinter::PdfFormat);\n        printer.setCreator(\"LiteIDE\");\n        printer.setOutputFileName(m_pdfFileName);\n        m_doc->print(&printer);\n        this->appendLog(\"Printing PDF \"+m_pdfFileName);\n        if (m_mode == MODE_SPLIT_PDF) {\n            this->processPdfList();\n        } else {\n            QDesktopServices::openUrl(QUrl::fromLocalFile(QFileInfo(m_pdfFileName).path()));\n        }\n    } else if (m_mode == MODE_MERGE_PRINT) {\n        QPrinter printer(QPrinter::HighResolution);\n        printer.setPageMargins(10,10,10,10,QPrinter::Millimeter);\n        m_doc->print(&printer);\n    } else if (m_mode == MODE_MERGE_PRINTPREVIEW) {\n        QPrinter printer(QPrinter::HighResolution);\n        printer.setPageMargins(10,10,10,10,QPrinter::Millimeter);\n        QPrintPreviewDialog dlg(&printer);\n        connect(&dlg,SIGNAL(paintRequested(QPrinter*)),m_doc,SLOT(print(QPrinter*)));\n        dlg.exec();\n    }\n#endif\n}\n\nvoid MarkdownBatchBrowser::browserImportFolder()\n{\n    QString folder = QFileDialog::getExistingDirectory(m_widget,tr(\"Select the folder containing your markdown files:\"));\n    if (!folder.isEmpty()) {\n        QDir dir(folder);\n        foreach(QFileInfo info, dir.entryInfoList(markdonwFilter(),QDir::Files,QDir::Name)) {\n            addFile(info.filePath());\n        }\n    }\n}\n\nvoid MarkdownBatchBrowser::addFiles()\n{\n    QStringList files = QFileDialog::getOpenFileNames(m_widget,tr(\"Select Markdown Files\"),QString(),this->markdownOpenFilter());\n    foreach(QString file, files) {\n        this->addFile(file);\n    }\n}\n\nvoid MarkdownBatchBrowser::remove()\n{\n    QModelIndex index = ui->filesTreeView->currentIndex();\n    if (!index.isValid()) {\n        return;\n    }\n    m_model->removeRow(index.row());\n}\n\nvoid MarkdownBatchBrowser::removeAll()\n{\n    int size = m_model->rowCount();\n    if (size == 0) {\n        return;\n    }\n    m_model->removeRows(0,size);\n}\n\nvoid MarkdownBatchBrowser::moveUp()\n{\n    QModelIndex index = ui->filesTreeView->currentIndex();\n    if (!index.isValid() || index.row() == 0) {\n        return;\n    }\n    int row = index.row();\n    m_model->insertRow(row-1,m_model->takeRow(row));\n    ui->filesTreeView->setCurrentIndex(m_model->index(row-1,0));\n}\n\nvoid MarkdownBatchBrowser::moveDown()\n{\n    QModelIndex index = ui->filesTreeView->currentIndex();\n    if (!index.isValid() || index.row() >= m_model->rowCount()-1) {\n        return;\n    }\n    int row = index.row();\n    m_model->insertRow(row+1,m_model->takeRow(row));\n    ui->filesTreeView->setCurrentIndex(m_model->index(row+1,0));\n}\n\nvoid MarkdownBatchBrowser::browserExportFolder()\n{\n    QString folder = QFileDialog::getExistingDirectory(m_widget,tr(\"Select the folder to contain separated markdown exports:\"));\n    if (!folder.isEmpty()) {\n        ui->exportFolderLineEdit->setText(folder);\n    }\n}\n\nvoid MarkdownBatchBrowser::mergeHtml()\n{\n    this->init();\n    if (m_fileList.isEmpty()) {\n        return;\n    }\n\n    QString fileName = QFileDialog::getSaveFileName(m_widget, tr(\"Export Merged HTML\"),\n                                                    \"merge\", \"*.html\");\n    if (fileName.isEmpty()) {\n        return;\n    }\n    QFileInfo info(fileName);\n    if (info.suffix().isEmpty()) {\n        fileName.append(\".html\");\n    }\n\n    this->appendLog(\"\\nExporting merged HTML to \"+fileName+\"\\n\");\n\n    QFile f(fileName);\n    if (f.open(QFile::WriteOnly|QFile::Truncate)) {\n        QByteArray datas;\n        foreach (QString file, m_fileList) {\n            if (!datas.isEmpty()) {\n                if (ui->mergeHrCheckBox->isChecked()) {\n                    datas.append(\"\\n<hr>\\n\");\n                }\n                if (ui->mergePageBreakCheckBox->isChecked()) {\n                    datas.append(\"\\n<div STYLE=\\\"page-break-after: always;\\\"></div>\\n\");\n                }\n            }\n            datas.append(m_fileHtmlMap.value(file));\n        }\n        QByteArray exportData = m_exportTemple;\n        exportData.replace(\"__MARKDOWN_TITLE__\",fileName.toUtf8());\n        exportData.replace(\"__MARKDOWN_CONTENT__\",datas);\n        f.write(exportData);\n        QDesktopServices::openUrl(QUrl::fromLocalFile(info.path()));\n    }\n}\n\nvoid MarkdownBatchBrowser::splitPdf()\n{\n    this->init();\n    if (m_fileList.isEmpty()) {\n        return;\n    }\n    this->appendLog(\"\\nExporting split PDF\\n\");\n    if (m_exportPath.isEmpty()) {\n        this->appendLog(\"The output path is empty!\");\n        return;\n    }\n    m_mode = MODE_SPLIT_PDF;\n\n    this->processPdfList();\n}\n\nvoid MarkdownBatchBrowser::processPdfList()\n{\n    if (m_fileList.isEmpty()) {\n        QDesktopServices::openUrl(QUrl::fromLocalFile(m_exportPath));\n        return;\n    }\n    QString file = m_fileList.takeFirst();\n    QFileInfo info(file);\n    QByteArray exportData = m_exportTemple;\n    exportData.replace(\"__MARKDOWN_TITLE__\",info.fileName().toUtf8());\n    exportData.replace(\"__MARKDOWN_CONTENT__\",m_fileHtmlMap.value(file));\n\n    m_pdfFileName = m_exportPath+\"/\"+info.completeBaseName()+\".pdf\";\n\n    QTextCodec *codec = QTextCodec::codecForName(\"utf-8\");\n    m_doc->setHtml(codec->toUnicode(exportData),QUrl::fromLocalFile(file));\n}\n\nvoid MarkdownBatchBrowser::mergePdf()\n{\n    this->init();\n    if (m_fileList.isEmpty()) {\n        return;\n    }\n\n    QString fileName = QFileDialog::getSaveFileName(m_widget, tr(\"Export Merged PDF\"),\n                                                    \"merge\", \"*.pdf\");\n    if (fileName.isEmpty()) {\n        return;\n    }\n    QFileInfo info(fileName);\n    if (info.suffix().isEmpty()) {\n        fileName.append(\".pdf\");\n    }\n\n    m_pdfFileName = fileName;\n    this->m_mode = MODE_MERGE_PDF;\n\n    this->appendLog(\"\\nExporting merged PDF\"+fileName+\"\\n\");\n\n    QByteArray datas;\n    foreach (QString file, m_fileList) {\n        if (!datas.isEmpty()) {\n            if (ui->mergeHrCheckBox->isChecked()) {\n                datas.append(\"\\n<hr>\\n\");\n            }\n            if (ui->mergePageBreakCheckBox->isChecked()) {\n                datas.append(\"\\n<div STYLE=\\\"page-break-after: always;\\\"></div>\\n\");\n            }\n        }\n        datas.append(m_fileHtmlMap.value(file));\n    }\n    QByteArray exportData = m_exportTemple;\n    exportData.replace(\"__MARKDOWN_TITLE__\",fileName.toUtf8());\n    exportData.replace(\"__MARKDOWN_CONTENT__\",datas);\n\n    QTextCodec *codec = QTextCodec::codecForName(\"utf-8\");\n\n    m_doc->setHtml(codec->toUnicode(exportData),QUrl::fromLocalFile(m_fileList.first()));\n}\n\nvoid MarkdownBatchBrowser::mergePrint()\n{\n    this->init();\n    if (m_fileList.isEmpty()) {\n        return;\n    }\n\n    this->m_mode = MODE_MERGE_PRINT;\n\n    this->appendLog(\"\\nPrinting merged document\\n\");\n\n    QByteArray datas;\n    foreach (QString file, m_fileList) {\n        if (!datas.isEmpty()) {\n            if (ui->mergeHrCheckBox->isChecked()) {\n                datas.append(\"\\n<hr>\\n\");\n            }\n            if (ui->mergePageBreakCheckBox->isChecked()) {\n                datas.append(\"\\n<div STYLE=\\\"page-break-after: always;\\\"></div>\\n\");\n            }\n        }\n        datas.append(m_fileHtmlMap.value(file));\n    }\n    QByteArray exportData = m_exportTemple;\n    exportData.replace(\"__MARKDOWN_TITLE__\",\"doc\");\n    exportData.replace(\"__MARKDOWN_CONTENT__\",datas);\n\n    QTextCodec *codec = QTextCodec::codecForName(\"utf-8\");\n\n    m_doc->setHtml(codec->toUnicode(exportData),QUrl::fromLocalFile(m_fileList.first()));\n}\n\nvoid MarkdownBatchBrowser::mergePrintPreview()\n{\n    this->init();\n    if (m_fileList.isEmpty()) {\n        return;\n    }\n\n    this->m_mode = MODE_MERGE_PRINTPREVIEW;\n\n    this->appendLog(\"\\nPreviewing merged document\\n\");\n\n    QByteArray datas;\n    foreach (QString file, m_fileList) {\n        if (!datas.isEmpty()) {\n            if (ui->mergeHrCheckBox->isChecked()) {\n                datas.append(\"\\n<hr>\\n\");\n            }\n            if (ui->mergePageBreakCheckBox->isChecked()) {\n                datas.append(\"\\n<div STYLE=\\\"page-break-after: always;\\\"></div>\\n\");\n            }\n        }\n        datas.append(m_fileHtmlMap.value(file));\n    }\n    QByteArray exportData = m_exportTemple;\n    exportData.replace(\"__MARKDOWN_TITLE__\",\"doc\");\n    exportData.replace(\"__MARKDOWN_CONTENT__\",datas);\n\n    QTextCodec *codec = QTextCodec::codecForName(\"utf-8\");\n\n    m_doc->setHtml(codec->toUnicode(exportData),QUrl::fromLocalFile(m_fileList.first()));\n}\n\nvoid MarkdownBatchBrowser::splitHtml()\n{\n    this->init();\n    if (m_fileList.isEmpty()) {\n        return;\n    }\n    this->appendLog(\"\\nExporting split HTML\\n\");\n    if (m_exportPath.isEmpty()) {\n        this->appendLog(\"The output path is empty!\");\n        return;\n    }\n    foreach (QString file, m_fileList) {\n        QFileInfo info(file);\n        QString out = m_exportPath+\"/\"+info.completeBaseName()+\".html\";\n        QFile f(out);\n        if (f.open(QFile::WriteOnly|QFile::Truncate)) {\n            this->appendLog(file+\" => \"+out);\n            QByteArray exportData = m_exportTemple;\n            exportData.replace(\"__MARKDOWN_TITLE__\",info.fileName().toUtf8());\n            exportData.replace(\"__MARKDOWN_CONTENT__\",m_fileHtmlMap.value(file));\n            f.write(exportData);\n        }\n    }\n    QDesktopServices::openUrl(QUrl::fromLocalFile(m_exportPath));\n}\n\nvoid MarkdownBatchBrowser::init()\n{\n    if (m_doc == 0) {\n        m_doc = m_liteApp->htmlWidgetManager()->createDocument(this);\n        connect(m_doc,SIGNAL(loadFinished(bool)),this,SLOT(loadFinished(bool)));\n        QFile file(m_liteApp->resourcePath()+\"/packages/markdown/export.html\");\n        if (file.open(QFile::ReadOnly)) {\n            m_exportOrgTemple = file.readAll();\n        } else {\n            m_exportOrgTemple = export_data;\n        }\n    }\n    m_exportTemple = m_exportOrgTemple;\n    QByteArray css;\n    if (ui->useCssCheckBox->isChecked()) {\n        QString fileName = ui->cssComboBox->currentText();\n        QFile f(m_liteApp->resourcePath()+\"/packages/markdown/css/\"+fileName);\n        if (f.open(QFile::ReadOnly)) {\n            css = f.readAll();\n        }\n    }\n    if (css.isEmpty()) {\n        css = defcss_data;\n    }\n    m_exportTemple.replace(\"__MARKDOWN_CSS__\",css);\n\n    m_fileList = getFiles();\n    m_fileHtmlMap = getFileHtmlDataMap(m_fileList);\n\n    m_exportPath.clear();\n\n    QString path = ui->exportFolderLineEdit->text();\n    if (!path.isEmpty()) {\n        QDir dir(path);\n        if (!dir.exists()) {\n            dir.mkpath(path);\n        }\n        if (dir.exists()) {\n            m_exportPath = dir.path();\n        }\n    }\n}\n\nQStringList MarkdownBatchBrowser::getFiles() const\n{\n    QStringList files;\n    for(int i = 0; i < m_model->rowCount(); i++) {\n        QModelIndex index = m_model->index(i,0);\n        if (index.isValid()) {\n            files.append(index.data().toString());\n        }\n    }\n    return files;\n}\n\nQMap<QString, QByteArray> MarkdownBatchBrowser::getFileHtmlDataMap(const QStringList &files) const\n{\n    QMap<QString, QByteArray> map;\n    foreach(QString file, files) {\n        QFile f(file);\n        if (f.open(QFile::ReadOnly)) {\n            map.insert(file,md2html(f.readAll()));\n        }\n    }\n    return map;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/markdown/markdownbatchbrowser.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: markdownbatchbrowser.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MARKDOWNBATCHBROWSER_H\n#define MARKDOWNBATCHBROWSER_H\n\n#include \"liteapi/liteapi.h\"\n#include <QFileDialog>\n\nnamespace Ui {\n    class MarkdownBatchWidget;\n}\n\nclass QStandardItemModel;\n\nclass MarkdownBatchBrowser : public LiteApi::IBrowserEditor\n{\n    Q_OBJECT\npublic:\n    MarkdownBatchBrowser(LiteApi::IApplication *app, QObject *parent);\n    virtual ~MarkdownBatchBrowser();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    QString markdownOpenFilter() const;\n    QStringList markdonwFilter() const;\n    void addFile(const QString &file);\n    void appendLog(const QString &log);\npublic:\n    enum {\n        MODE_NONE = 0,\n        MODE_SPLIT_PDF,\n        MODE_MERGE_PDF,\n        MODE_MERGE_PRINT,\n        MODE_MERGE_PRINTPREVIEW\n    };\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QWidget *m_widget;\n    Ui::MarkdownBatchWidget *ui;\n    LiteApi::IHtmlDocument *m_doc;\n    QStandardItemModel     *m_model;\n    int     m_mode;\n    QString m_exportPath;\n    QString m_pdfFileName;\n    QStringList m_fileList;\n    QByteArray  m_exportOrgTemple;\n    QByteArray  m_exportTemple;\n    QMap<QString,QByteArray> m_fileHtmlMap;\nprivate slots:\n    void loadFinished(bool);\n    void browserImportFolder();\n    void addFiles();\n    void remove();\n    void removeAll();\n    void moveUp();\n    void moveDown();\n    void browserExportFolder();\n    void splitHtml();\n    void mergeHtml();\n    void splitPdf();\n    void mergePdf();\n    void mergePrint();\n    void mergePrintPreview();\nprotected:\n    void init();\n    void processPdfList();\n    QStringList getFiles() const;\n    QMap<QString,QByteArray> getFileHtmlDataMap(const QStringList &files) const;\n};\n\n#endif // MARKDOWNBATCHBROWSER_H\n"
  },
  {
    "path": "liteidex/src/plugins/markdown/markdownbatchwidget.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>MarkdownBatchWidget</class>\n <widget class=\"QWidget\" name=\"MarkdownBatchWidget\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>601</width>\n    <height>487</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_3\" stretch=\"0,0,0,1\">\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox_4\">\n     <property name=\"title\">\n      <string>Markdown Source Files</string>\n     </property>\n     <layout class=\"QHBoxLayout\" name=\"horizontalLayout_4\">\n      <item>\n       <widget class=\"QTreeView\" name=\"filesTreeView\">\n        <property name=\"sizePolicy\">\n         <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Expanding\">\n          <horstretch>0</horstretch>\n          <verstretch>0</verstretch>\n         </sizepolicy>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n        <item>\n         <widget class=\"QPushButton\" name=\"importFolderPushButton\">\n          <property name=\"text\">\n           <string>Import Folder...</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <widget class=\"QPushButton\" name=\"addFilesPushButton\">\n          <property name=\"text\">\n           <string>Add Files...</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <widget class=\"QPushButton\" name=\"moveUpPushButton\">\n          <property name=\"text\">\n           <string>Move Up</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <widget class=\"QPushButton\" name=\"moveDownPushButton\">\n          <property name=\"text\">\n           <string>Move Down</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <widget class=\"QPushButton\" name=\"removePushButton\">\n          <property name=\"text\">\n           <string>Remove</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <widget class=\"QPushButton\" name=\"removeAllPushButton\">\n          <property name=\"text\">\n           <string>Remove All</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <spacer name=\"verticalSpacer\">\n          <property name=\"orientation\">\n           <enum>Qt::Vertical</enum>\n          </property>\n          <property name=\"sizeHint\" stdset=\"0\">\n           <size>\n            <width>20</width>\n            <height>40</height>\n           </size>\n          </property>\n         </spacer>\n        </item>\n       </layout>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox_2\">\n     <property name=\"title\">\n      <string>Options</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout_4\">\n      <item>\n       <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n        <item>\n         <widget class=\"QLabel\" name=\"label\">\n          <property name=\"text\">\n           <string>Export Folder:</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <widget class=\"QLineEdit\" name=\"exportFolderLineEdit\"/>\n        </item>\n        <item>\n         <widget class=\"QPushButton\" name=\"browserExportFolderPushButton\">\n          <property name=\"text\">\n           <string>Browse...</string>\n          </property>\n         </widget>\n        </item>\n       </layout>\n      </item>\n      <item>\n       <layout class=\"QHBoxLayout\" name=\"horizontalLayout_3\">\n        <item>\n         <widget class=\"QCheckBox\" name=\"useCssCheckBox\">\n          <property name=\"text\">\n           <string>Use CSS</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <widget class=\"QComboBox\" name=\"cssComboBox\"/>\n        </item>\n        <item>\n         <widget class=\"QCheckBox\" name=\"mergeHrCheckBox\">\n          <property name=\"text\">\n           <string>Insert horizontal line between merged files</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <widget class=\"QCheckBox\" name=\"mergePageBreakCheckBox\">\n          <property name=\"text\">\n           <string>Insert page break between merged files</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <spacer name=\"horizontalSpacer\">\n          <property name=\"orientation\">\n           <enum>Qt::Horizontal</enum>\n          </property>\n          <property name=\"sizeHint\" stdset=\"0\">\n           <size>\n            <width>37</width>\n            <height>17</height>\n           </size>\n          </property>\n         </spacer>\n        </item>\n       </layout>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox\">\n     <property name=\"title\">\n      <string>Export</string>\n     </property>\n     <layout class=\"QHBoxLayout\" name=\"horizontalLayout_2\">\n      <item>\n       <widget class=\"QPushButton\" name=\"splitHtmlPushButton\">\n        <property name=\"text\">\n         <string>Export Separated HTML</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QPushButton\" name=\"splitPdfPushButton\">\n        <property name=\"text\">\n         <string>Export Separated PDF</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QPushButton\" name=\"mergetHtmlPushButton\">\n        <property name=\"text\">\n         <string>Export Merged HTML...</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QPushButton\" name=\"mergePdfPushButton\">\n        <property name=\"text\">\n         <string>Export Merged PDF...</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QPushButton\" name=\"mergePrintPreviwPushButton\">\n        <property name=\"text\">\n         <string>Print Preview Merged...</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QPushButton\" name=\"mergetPrintPushButton\">\n        <property name=\"text\">\n         <string>Print Merged</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <spacer name=\"horizontalSpacer_2\">\n        <property name=\"orientation\">\n         <enum>Qt::Horizontal</enum>\n        </property>\n        <property name=\"sizeHint\" stdset=\"0\">\n         <size>\n          <width>40</width>\n          <height>20</height>\n         </size>\n        </property>\n       </spacer>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox_3\">\n     <property name=\"title\">\n      <string>Log</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n      <item>\n       <widget class=\"QPlainTextEdit\" name=\"logPlainTextEdit\">\n        <property name=\"sizePolicy\">\n         <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Preferred\">\n          <horstretch>0</horstretch>\n          <verstretch>0</verstretch>\n         </sizepolicy>\n        </property>\n        <property name=\"baseSize\">\n         <size>\n          <width>0</width>\n          <height>0</height>\n         </size>\n        </property>\n       </widget>\n      </item>\n     </layout>\n    </widget>\n   </item>\n  </layout>\n  <zorder>groupBox</zorder>\n  <zorder>groupBox_2</zorder>\n  <zorder>groupBox_3</zorder>\n  <zorder>groupBox_4</zorder>\n </widget>\n <tabstops>\n  <tabstop>filesTreeView</tabstop>\n  <tabstop>importFolderPushButton</tabstop>\n  <tabstop>addFilesPushButton</tabstop>\n  <tabstop>removeAllPushButton</tabstop>\n  <tabstop>useCssCheckBox</tabstop>\n  <tabstop>cssComboBox</tabstop>\n  <tabstop>exportFolderLineEdit</tabstop>\n  <tabstop>browserExportFolderPushButton</tabstop>\n  <tabstop>splitHtmlPushButton</tabstop>\n  <tabstop>splitPdfPushButton</tabstop>\n  <tabstop>mergetHtmlPushButton</tabstop>\n  <tabstop>mergePdfPushButton</tabstop>\n  <tabstop>mergePrintPreviwPushButton</tabstop>\n  <tabstop>mergetPrintPushButton</tabstop>\n  <tabstop>logPlainTextEdit</tabstop>\n </tabstops>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/markdown/markdownedit.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: markdownedit.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"markdownedit.h\"\n#include \"liteeditorapi/liteeditorapi.h\"\n#include <QMenu>\n#include <QAction>\n#include <QToolBar>\n#include <QTextCursor>\n#include <QTextBlock>\n#include <QPlainTextEdit>\n#include <QTextDocument>\n#include <QRegExp>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n//class Separator : public QAction\n//{\n//public:\n//    Separator(QObject *parent) :\n//        QAction(parent)\n//    {\n//        setSeparator(true);\n//    }\n//};\n\n//static void updateToolTip(QToolBar *toolBar)\n//{\n//    foreach(QAction *act, toolBar->actions()) {\n//        if (act->isSeparator()) {\n//            continue;\n//        }\n//        if (act->toolTip() == act->text() && !act->shortcut().isEmpty()) {\n//            act->setToolTip(QString(\"%1 (%2)\").arg(act->text()).arg(act->shortcut().toString()));\n//        }\n//    }\n//}\n\nMarkdownEdit::MarkdownEdit(LiteApi::IApplication *app, LiteApi::IEditor *editor, QObject *parent) :\n    QObject(parent), m_liteApp(app)\n{\n    m_editor = LiteApi::getTextEditor(editor);\n    if (!m_editor) {\n        return;\n    }\n    m_ed = LiteApi::getPlainTextEdit(editor);\n    if (!m_ed) {\n        return;\n    }\n\n    m_editor->setLineWrap(true);\n\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(this,\"Markdown\");\n\n    QAction *h1 = new QAction(QIcon(\"icon:markdown/images/h1.png\"),tr(\"Header (h1)\"),this);\n    actionContext->regAction(h1,\"Header1\",\"Ctrl+1\");\n\n    QAction *h2 = new QAction(QIcon(\"icon:markdown/images/h2.png\"),tr(\"Header (h2)\"),this);\n    actionContext->regAction(h2,\"Header2\",\"Ctrl+2\");\n\n    QAction *h3 = new QAction(QIcon(\"icon:markdown/images/h3.png\"),tr(\"Header (h3)\"),this);\n    actionContext->regAction(h3,\"Header3\",\"Ctrl+3\");\n\n    QAction *h4 = new QAction(QIcon(\"icon:markdown/images/h4.png\"),tr(\"Header (h4)\"),this);\n    actionContext->regAction(h4,\"Header4\",\"Ctrl+4\");\n\n    QAction *h5 = new QAction(QIcon(\"icon:markdown/images/h5.png\"),tr(\"Header (h5)\"),this);\n    actionContext->regAction(h5,\"Header5\",\"Ctrl+5\");\n\n    QAction *h6 = new QAction(QIcon(\"icon:markdown/images/h6.png\"),tr(\"Header (h6)\"),this);\n    actionContext->regAction(h6,\"Header6\",\"Ctrl+6\");\n\n    QAction *bold = new QAction(QIcon(\"icon:markdown/images/bold.png\"),tr(\"Bold\"),this);\n    actionContext->regAction(bold,\"Bold\",QKeySequence::Bold);\n\n    QAction *italic = new QAction(QIcon(\"icon:markdown/images/italic.png\"),tr(\"Italic\"),this);\n    actionContext->regAction(italic,\"Italic\",QKeySequence::Italic);\n\n    QAction *code = new QAction(QIcon(\"icon:markdown/images/code.png\"),tr(\"Inline Code\"),this);\n    actionContext->regAction(code,\"InlineCode\",\"Ctrl+K\");\n\n    QAction *link = new QAction(QIcon(\"icon:markdown/images/link.png\"),tr(\"Link\"),this);\n    actionContext->regAction(link,\"Link\",\"Ctrl+Shift+L\");\n\n    QAction *image = new QAction(QIcon(\"icon:markdown/images/image.png\"),tr(\"Image\"),this);\n    actionContext->regAction(image,\"Image\",\"Ctrl+Shift+I\");\n\n    QAction *ul = new QAction(QIcon(\"icon:markdown/images/ul.png\"),tr(\"Unordered List\"),this);\n    actionContext->regAction(ul,\"UnorderedList\",\"Ctrl+Shift+U\");\n\n    QAction *ol = new QAction(QIcon(\"icon:markdown/images/ol.png\"),tr(\"Ordered List\"),this);\n    actionContext->regAction(ol,\"OrderedList\",\"Ctrl+Shift+O\");\n\n    QAction *bq = new QAction(QIcon(\"icon:markdown/images/quote.png\"),tr(\"Blockquote\"),this);\n    actionContext->regAction(bq,\"Blockquote\",\"Ctrl+Shift+Q\");\n\n    QAction *hr = new QAction(QIcon(\"icon:markdown/images/hr.png\"),tr(\"Horizontal Rule\"),this);\n    actionContext->regAction(hr,\"HorizontalRule\",\"Ctrl+Shift+H\");\n\n    QMenu *menu = LiteApi::getEditMenu(editor);\n    if (menu) {\n        menu->addSeparator();\n        QMenu *h = menu->addMenu(tr(\"Heading\"));\n        h->addAction(h1);\n        h->addAction(h2);\n        h->addAction(h3);\n        h->addAction(h4);\n        h->addAction(h5);\n        h->addAction(h6);\n        menu->addSeparator();\n        menu->addAction(link);\n        menu->addAction(image);\n        menu->addSeparator();\n        menu->addAction(bold);\n        menu->addAction(italic);\n        menu->addAction(code);\n        menu->addSeparator();\n        menu->addAction(ul);\n        menu->addAction(ol);\n        menu->addSeparator();\n        menu->addAction(bq);\n        menu->addAction(hr);\n    }\n    menu = LiteApi::getContextMenu(editor);\n    if (menu) {\n        QMenu *h = menu->addMenu(tr(\"Heading\"));\n        h->addAction(h1);\n        h->addAction(h2);\n        h->addAction(h3);\n        h->addAction(h4);\n        h->addAction(h5);\n        h->addAction(h6);\n        menu->addSeparator();\n        menu->addAction(link);\n        menu->addAction(image);\n        menu->addSeparator();\n        menu->addAction(bold);\n        menu->addAction(italic);\n        menu->addAction(code);\n        menu->addSeparator();\n        menu->addAction(ul);\n        menu->addAction(ol);\n        menu->addSeparator();\n        menu->addAction(bq);\n        menu->addAction(hr);\n    }\n\n    QToolBar *toolBar = LiteApi::getEditToolBar(editor);\n    if (toolBar) {\n        toolBar->addSeparator();\n        toolBar->addAction(h1);\n        toolBar->addAction(h2);\n        toolBar->addAction(h3);\n        toolBar->addSeparator();\n        toolBar->addAction(link);\n        toolBar->addAction(image);\n        toolBar->addSeparator();\n        toolBar->addAction(bold);\n        toolBar->addAction(italic);\n        toolBar->addAction(code);\n        toolBar->addSeparator();\n        toolBar->addAction(ul);\n        toolBar->addAction(ol);\n        toolBar->addSeparator();\n        toolBar->addAction(bq);\n        toolBar->addAction(hr);\n        //updateToolTip(toolBar);\n    }\n\n    connect(editor,SIGNAL(destroyed()),this,SLOT(deleteLater()));\n    connect(h1,SIGNAL(triggered()),this,SLOT(h1()));\n    connect(h2,SIGNAL(triggered()),this,SLOT(h2()));\n    connect(h3,SIGNAL(triggered()),this,SLOT(h3()));\n    connect(h4,SIGNAL(triggered()),this,SLOT(h4()));\n    connect(h5,SIGNAL(triggered()),this,SLOT(h5()));\n    connect(h6,SIGNAL(triggered()),this,SLOT(h6()));\n    connect(bold,SIGNAL(triggered()),this,SLOT(bold()));\n    connect(italic,SIGNAL(triggered()),this,SLOT(italic()));\n    connect(code,SIGNAL(triggered()),this,SLOT(code()));\n    connect(link,SIGNAL(triggered()),this,SLOT(link()));\n    connect(image,SIGNAL(triggered()),this,SLOT(image()));\n    connect(ul,SIGNAL(triggered()),this,SLOT(ul()));\n    connect(ol,SIGNAL(triggered()),this,SLOT(ol()));\n    connect(bq,SIGNAL(triggered()),this,SLOT(bq()));\n    connect(hr,SIGNAL(triggered()),this,SLOT(hr()));\n\n    //m_ed->installEventFilter(this);\n}\n\nMarkdownEdit::~MarkdownEdit()\n{\n}\n\n\n\nvoid MarkdownEdit::insert_head(const QString &tag, bool blockStart)\n{\n    QTextCursor cur = m_ed->textCursor();\n    cur.beginEditBlock();\n    if (cur.hasSelection()) {\n        QTextBlock begin = m_ed->document()->findBlock(cur.selectionStart());\n        QTextBlock end = m_ed->document()->findBlock(cur.selectionEnd());\n        if (end.position() == cur.selectionEnd()) {\n            end = end.previous();\n        }\n        QTextBlock block = begin;\n        do {\n            if (block.text().length() > 0) {\n                if (blockStart) {\n                    cur.setPosition(block.position());\n                } else {\n                    QString text = block.text();\n                    foreach(QChar c, text) {\n                        if (!c.isSpace()) {\n                            cur.setPosition(block.position()+text.indexOf(c));\n                            break;\n                        }\n                    }\n                }\n                cur.insertText(tag);\n            }\n            block = block.next();\n        } while(block.isValid() && block.position() <= end.position());\n    } else {\n        if (blockStart) {\n            cur.setPosition(cur.block().position());\n        } else {\n            QTextBlock block = cur.block();\n            QString text = block.text();\n            foreach(QChar c, text) {\n                if (!c.isSpace()) {\n                    cur.setPosition(block.position()+text.indexOf(c));\n                    break;\n                }\n            }\n        }\n        cur.insertText(tag);\n    }\n    cur.endEditBlock();\n    m_ed->setTextCursor(cur);\n}\n\nvoid MarkdownEdit::mark_selection(const QString &mark)\n{\n    mark_selection(mark,mark);\n}\n\nvoid MarkdownEdit::mark_selection(const QString &mark1, const QString &mark2)\n{\n    QTextCursor cur = m_ed->textCursor();\n    cur.beginEditBlock();\n    if (cur.hasSelection()) {\n        QTextBlock begin = m_ed->document()->findBlock(cur.selectionStart());\n        QTextBlock end = m_ed->document()->findBlock(cur.selectionEnd());\n        if (end.position() == cur.selectionEnd()) {\n            end = end.previous();\n        }\n        int n1 = cur.selectionStart();\n        int n2 = cur.selectionEnd();\n        QTextBlock block = begin;\n        do {\n            int c1 = block.position();\n            int c2 = c1+block.text().length();\n            if (block.position() == begin.position() && c1 < n1) {\n                c1 = n1;\n            }\n            if (c2 > n2) {\n                c2 = n2;\n            }\n            if (c2 > c1) {\n                if (!mark1.isEmpty()) {\n                    cur.setPosition(c1);\n                    cur.insertText(mark1);\n                    n2 += mark1.length();\n                }\n                if (!mark2.isEmpty()) {\n                    cur.setPosition(c2+mark1.length());\n                    cur.insertText(mark2);\n                    n2 += mark2.length();\n                }\n            }\n            block = block.next();\n        } while(block.isValid() && block.position() <= end.position());\n    } else {\n        int pos = cur.position();\n        cur.insertText(mark1+mark2);\n        cur.setPosition(pos+mark1.length());\n    }\n    cur.endEditBlock();\n    m_ed->setTextCursor(cur);\n}\n\nvoid MarkdownEdit::h1()\n{\n    insert_head(\"# \");\n}\n\nvoid MarkdownEdit::h2()\n{\n    insert_head(\"## \");\n}\n\nvoid MarkdownEdit::h3()\n{\n    insert_head(\"### \");\n}\n\nvoid MarkdownEdit::h4()\n{\n    insert_head(\"#### \");\n}\n\nvoid MarkdownEdit::h5()\n{\n    insert_head(\"#####\");\n}\n\nvoid MarkdownEdit::h6()\n{\n    insert_head(\"###### \");\n}\n\nvoid MarkdownEdit::bold()\n{\n    mark_selection(\"**\");\n}\n\nvoid MarkdownEdit::italic()\n{\n    mark_selection(\"_\");\n}\n\nvoid MarkdownEdit::code()\n{\n    mark_selection(\"`\");\n}\n\nvoid MarkdownEdit::link()\n{\n    QTextCursor cursor = m_ed->textCursor();\n    cursor.beginEditBlock();\n    if (cursor.hasSelection()) {\n        int n1 = cursor.selectionStart();\n        int n2 = cursor.selectionEnd();\n        cursor.setPosition(n1);\n        cursor.insertText(\"[\");\n        cursor.setPosition(n2+1);\n        cursor.insertText(\"]()\");\n        cursor.setPosition(n2+3);\n    } else {\n        int n = cursor.position();\n        cursor.insertText(\"[]()\");\n        cursor.setPosition(n+1);\n    }\n    cursor.endEditBlock();\n    m_ed->setTextCursor(cursor);\n}\n\nvoid MarkdownEdit::image()\n{\n    QTextCursor cursor = m_ed->textCursor();\n    cursor.beginEditBlock();\n    if (cursor.hasSelection()) {\n        int n1 = cursor.selectionStart();\n        int n2 = cursor.selectionEnd();\n        cursor.setPosition(n1);\n        cursor.insertText(\"![\");\n        cursor.setPosition(n2+2);\n        cursor.insertText(\"]()\");\n        cursor.setPosition(n2+4);\n    } else {\n        int n = cursor.position();\n        cursor.insertText(\"![]()\");\n        cursor.setPosition(n+2);\n    }\n    cursor.endEditBlock();\n    m_ed->setTextCursor(cursor);\n}\n\nvoid MarkdownEdit::ul()\n{\n    insert_head(\"* \",false);\n}\n\nvoid MarkdownEdit::ol()\n{\n    insert_head(\"1. \",false);\n}\n\nvoid MarkdownEdit::bq()\n{\n    insert_head(\"> \");\n}\n\nvoid MarkdownEdit::hr()\n{\n    QTextCursor cursor = m_ed->textCursor();\n    if (cursor.hasSelection()) {\n        cursor.setPosition(cursor.selectionEnd());\n    }\n    cursor.insertText(\"\\n***\\n\");\n    m_ed->setTextCursor(cursor);\n}\n\nvoid MarkdownEdit::gotoLine(int line, int column)\n{\n    const int blockNumber = line;\n    const QTextBlock &block = m_ed->document()->findBlockByLineNumber(blockNumber);\n    if (block.isValid()) {\n        QTextCursor cursor(block);\n        if (column > 0) {\n            cursor.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, column);\n        } else {\n            int pos = cursor.position();\n            while (m_ed->document()->characterAt(pos).category() == QChar::Separator_Space) {\n                ++pos;\n            }\n            cursor.setPosition(pos);\n        }\n        m_ed->setTextCursor(cursor);\n        m_ed->ensureCursorVisible();\n    }\n}\n\nbool MarkdownEdit::eventFilter(QObject *obj, QEvent *event)\n{\n    if (obj == m_ed && event->type() == QEvent::KeyPress) {\n        QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);\n        if (keyEvent->key() == Qt::Key_Enter || keyEvent->key() == Qt::Key_Return) {\n//            QObject::eventFilter(obj, event);\n//            QTextCursor cur = m_ed->textCursor();\n//            QTextBlock prev = cur.block().previous();\n//            if (prev.isValid()) {\n//                QString text = prev.text();\n//                qDebug() << text;\n//                if (text.length() > 2 && text.at(1) == ' ' && QString(\"*+-\").contains(text.at(0))) {\n//                    cur.insertText(text.left(2));\n//                }\n//            }\n//            m_ed->setTextCursor(cur);\n            return false;\n        }\n    }\n    return QObject::eventFilter(obj, event);\n}\n\n"
  },
  {
    "path": "liteidex/src/plugins/markdown/markdownedit.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: markdownedit.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MARKDOWNEDIT_H\n#define MARKDOWNEDIT_H\n\n#include \"liteapi/liteapi.h\"\n\nclass MarkdownEdit : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit MarkdownEdit(LiteApi::IApplication *app, LiteApi::IEditor *editor, QObject *parent = 0);\n    virtual ~MarkdownEdit();\nsignals:\n    \npublic slots:\n    void insert_head(const QString &tag, bool blockStart = true);\n    void mark_selection(const QString &mark);\n    void mark_selection(const QString &mark1, const QString &mark2);\n    void h1();\n    void h2();\n    void h3();\n    void h4();\n    void h5();\n    void h6();\n    void bold();\n    void italic();\n    void code();\n    void link();\n    void image();\n    void ul();\n    void ol();\n    void bq();\n    void hr();\n    void gotoLine(int line, int col);\nprotected:\n    bool eventFilter(QObject *obj, QEvent *event);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    LiteApi::ITextEditor  *m_editor;\n    QPlainTextEdit        *m_ed;\n};\n\n#endif // MARKDOWNEDIT_H\n"
  },
  {
    "path": "liteidex/src/plugins/markdown/markdownplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: markdownplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"markdownplugin.h\"\n#include \"htmlpreview.h\"\n#include \"markdownedit.h\"\n#include \"markdownbatchbrowser.h\"\n#include <QtPlugin>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nMarkdownPlugin::MarkdownPlugin()\n{\n}\n\nbool MarkdownPlugin::load(LiteApi::IApplication *app)\n{\n    m_liteApp = app;\n\n    QAction *act = m_liteApp->editorManager()->registerBrowser(new MarkdownBatchBrowser(m_liteApp,this));\n    m_liteApp->actionManager()->insertViewMenu(LiteApi::ViewMenuBrowserPos,act);\n\n    connect(m_liteApp->editorManager(),SIGNAL(editorCreated(LiteApi::IEditor*)),this,SLOT(editorCreated(LiteApi::IEditor*)));\n\n    new HtmlPreview(m_liteApp,this);\n\n    return true;\n}\n\nvoid MarkdownPlugin::editorCreated(LiteApi::IEditor *editor)\n{\n    if (!editor || editor->mimeType() != \"text/x-markdown\") {\n        return;\n    }\n    new MarkdownEdit(m_liteApp,editor,this);\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/markdown/markdownplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: markdownplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MARKDOWNPLUGIN_H\n#define MARKDOWNPLUGIN_H\n\n#include \"markdown_global.h\"\n#include \"liteapi/liteapi.h\"\n\nclass MarkdownPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    MarkdownPlugin();\n    virtual bool load(LiteApi::IApplication *app);\nprotected slots:\n    void editorCreated(LiteApi::IEditor*);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<MarkdownPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.MarkdownPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/Markdown\");\n        m_info->setVer(\"X36.3\");\n        m_info->setName(\"Markdown\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setInfo(\"Markdown Editor Support\");\n        m_info->appendDepend(\"plugin/liteeditor\");\n    }\n};\n\n\n#endif // MARKDOWNPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/plugins.pro",
    "content": "# USE .subdir AND .depends !\r\n# OTHERWISE PLUGINS WILL BUILD IN WRONG ORDER (DIRECTORIES ARE COMPILED IN PARALLEL)\r\ninclude (../../liteidex.pri)\r\n\r\nTEMPLATE  = subdirs\r\n\r\nSUBDIRS = \\\r\n    welcome \\\r\n    liteenv \\\r\n    litebuild \\\r\n    liteeditor \\\r\n    litefind    \\\r\n    litedebug   \\\r\n    litetty \\\r\n    quickopen \\\r\n    filebrowser \\\r\n    golangast \\\r\n    golangedit \\\r\n    golangfmt \\\r\n    golangcode \\\r\n    golangdoc \\\r\n    golangplay \\\r\n    golangpackage \\\r\n    golangpresent \\\r\n    markdown \\\r\n    jsonedit \\\r\n    rustedit \\\r\n    dlvdebugger \\\r\n    fakevimedit \\\r\n    bookmarks \\\r\n    imageeditor \\\r\n    terminal\r\n\r\ncontains(DEFINES, LITEIDE_QTWEBKIT) {\r\n    SUBDIRS += webkithtmlwidget\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/profileproject/profilefile.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: profilefile.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"profilefile.h\"\n#include <QStandardItem>\n#include <QFileInfo>\n#include <QFile>\n#include <QDir>\n#include <QDebug>\n#include \"fileutil/fileutil.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nProfileFile::ProfileFile(LiteApi::IApplication *app, QObject *parent)\n    : ModelFileImpl(app,parent)\n{\n}\n\nbool ProfileFile::loadFile(const QString &fileName)\n{\n    QFile file(fileName);\n    if (!file.open(QIODevice::ReadOnly|QIODevice::Text)) {\n        return false;\n    }\n    QMap<QString,QStringList> context = FileUtil::readFileContext(&file);\n    file.close();\n    if (context.isEmpty()) {\n        return false;\n    }\n    m_context = context;\n    if (m_context.contains(\"GOFILES\") ||\n            m_context.contains(\"CGOFILES\")) {\n        m_mimeType = \"text/x-gopro\";\n    }\n    return true;\n}\n\nvoid ProfileFile::updateModel()\n{\n    m_model->clear();\n    m_fileNameList.clear();\n    m_filePathList.clear();\n\n    QStandardItem *item = new QStandardItem(QFileInfo(m_fileName).fileName());\n    item->setData(ItemProFile);\n    item->setIcon(QIcon(\"icon:images/projectitem.png\"));\n    m_model->appendRow(item);\n    m_filePathList.append(m_fileName);\n\n    QMap<QString,QString> fileMap;\n    fileMap.insert(\"GOFILES\",tr(\"GOFILES\"));\n    fileMap.insert(\"CGOFILES\",tr(\"CGOFILES\"));\n    fileMap.insert(\"HEADERS\",tr(\"Headers\"));\n    fileMap.insert(\"SOURCES\",tr(\"Sources\"));\n\n    QMapIterator<QString,QString> i(fileMap);\n    while(i.hasNext()) {\n        i.next();\n        QStringList files = this->values(i.key());\n        if (!files.isEmpty()) {\n            QStandardItem *folder = new QStandardItem(i.value());\n            folder->setData(ItemFolder);\n            folder->setIcon(QIcon(\"icon:images/folderitem.png\"));\n            m_model->appendRow(folder);\n            foreach(QString file, files) {\n                QStandardItem *fileItem = new QStandardItem(file);\n                fileItem->setData(ItemFile);\n                fileItem->setIcon(QIcon(\"icon:images/fileitem.png\"));\n                folder->appendRow(fileItem);\n                m_fileNameList.append(file);\n                m_filePathList.append(fileNameToFullPath(file));\n            }\n        }\n    }\n}\n\nQString ProfileFile::target() const\n{\n    QString target = QFileInfo(m_fileName).fileName();\n    QString val = value(\"TARG\");\n    if (!val.isEmpty()) {\n        target = val;\n    }\n    val = value(\"TARGET\");\n    if (!val.isEmpty()) {\n        target = val;\n    }\n    QString dest = value(\"DESTDIR\");\n    if (!dest.isEmpty()) {\n        target = QFileInfo(QDir(dest),target).filePath();\n    }\n    return target;\n}\n\nQString ProfileFile::targetPath() const\n{\n    QString target = QFileInfo(m_fileName).fileName();\n    QString val = value(\"TARG\");\n    if (!val.isEmpty()) {\n        target = val;\n    }\n    val = value(\"TARGET\");\n    if (!val.isEmpty()) {\n        target = val;\n    }\n    QString dest = value(\"DESTDIR\");\n    if (!dest.isEmpty()) {\n        target = QFileInfo(QDir(dest),target).filePath();\n    }\n    QString workPath = QFileInfo(m_fileName).absolutePath();\n    if (!workPath.isEmpty()) {\n        target = QFileInfo(QDir(workPath),target).filePath();\n    }\n    return target;\n}\n\nQMap<QString,QString> ProfileFile::targetInfo() const\n{\n    QMap<QString,QString> m;\n    if (m_fileName.isEmpty()) {\n        return m;\n    }\n    QFileInfo info(m_fileName);\n    QString target = info.fileName();\n    QString val = value(\"TARG\");\n    if (!val.isEmpty()) {\n        target = val;\n    }\n    val = value(\"TARGET\");\n    if (!val.isEmpty()) {\n        target = val;\n    }\n    QString dest = value(\"DESTDIR\");\n    if (!dest.isEmpty()) {\n        target = QFileInfo(QDir(dest),target).filePath();\n    }\n    m.insert(\"TARGETNAME\",target);\n    m.insert(\"TARGETPATH\",QFileInfo(QDir(info.path()),target).filePath());\n    m.insert(\"TARGETDIR\",info.path());\n    m.insert(\"WORKDIR\",info.path());\n    return m;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/profileproject/profilefile.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: profilefile.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef PROFILEFILE_H\n#define PROFILEFILE_H\n\n#include \"modelproject/modelfileimpl.h\"\n\nclass ProfileFile : public ModelFileImpl\n{\npublic:\n    ProfileFile(LiteApi::IApplication *app, QObject *parent);\nprotected:\n    virtual bool loadFile(const QString &filePath);\n    virtual void updateModel();\npublic:\n    virtual QString target() const;\n    virtual QString targetPath() const;\n    virtual QMap<QString,QString> targetInfo() const;\n};\n\n#endif // PROFILEFILE_H\n"
  },
  {
    "path": "liteidex/src/plugins/profileproject/profilefilefactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: profilefilefactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"profilefilefactory.h\"\n#include \"profilefile.h\"\n#include \"profileproject.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nProfileFileFactory::ProfileFileFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IProjectFactory(parent),\n      m_liteApp(app)\n{\n    m_mimeTypes.append(\"text/x-profile\");\n    m_mimeTypes.append(\"text/x-gopro\");\n}\n\nQStringList ProfileFileFactory::mimeTypes() const\n{\n    return m_mimeTypes;\n}\n\nLiteApi::IProject *ProfileFileFactory::open(const QString &fileName, const QString &mimeType)\n{\n    if (!m_mimeTypes.contains(mimeType)) {\n        return 0;\n    }\n    ProfileProject *project = new ProfileProject(m_liteApp);\n    project->setModelFile(new ProfileFile(m_liteApp,project));\n    if (!project->open(fileName,mimeType)) {\n        delete project;\n        return 0;\n    }\n    return project;\n}\n\nbool ProfileFileFactory::findTargetInfo(const QString &fileName, const QString &mimeType, QMap<QString,QString>& targetInfo) const\n{\n    if (!m_mimeTypes.contains(mimeType)) {\n        return false;\n    }\n    ProfileFile *file = new ProfileFile(m_liteApp,0);\n    bool b = file->open(fileName,mimeType);\n    if (b) {\n        targetInfo = file->targetInfo();\n    }\n    delete file;\n    return b;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/profileproject/profilefilefactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: profilefilefactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef PROFILEFILEFACTORY_H\n#define PROFILEFILEFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass ProfileFileFactory : public LiteApi::IProjectFactory\n{\npublic:\n    ProfileFileFactory(LiteApi::IApplication *app, QObject *parent);\npublic:\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IProject *open(const QString &fileName, const QString &mimeType);\n    virtual bool findTargetInfo(const QString &fileName, const QString &mimetype,  QMap<QString,QString>& findTargetInfo) const;\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QStringList m_mimeTypes;\n};\n\n#endif // PROFILEFILEFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/profileproject/profileproject.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: profileproject.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"profileproject.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nProfileProject::ProfileProject(LiteApi::IApplication *app)\n    : ModelProjectImpl(app)\n{\n}\n"
  },
  {
    "path": "liteidex/src/plugins/profileproject/profileproject.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: profileproject.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef PROFILEPROJECT_H\n#define PROFILEPROJECT_H\n\n#include \"modelproject/modelprojectimpl.h\"\n\nclass ProfileProject : public ModelProjectImpl\n{\npublic:\n    ProfileProject(LiteApi::IApplication *app);\n};\n\n#endif // PROFILEPROJECT_H\n"
  },
  {
    "path": "liteidex/src/plugins/profileproject/profileproject.pro",
    "content": "TARGET = profileproject\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude(../../utils/fileutil/fileutil.pri)\ninclude(../../utils/modelproject/modelproject.pri)\n\nDEFINES += PROFILEPROJECT_LIBRARY\n\nSOURCES += profileprojectplugin.cpp \\\n    profilefile.cpp \\\n    profileproject.cpp \\\n    profilefilefactory.cpp\n\nHEADERS += profileprojectplugin.h\\\n        profileproject_global.h \\\n    profilefile.h \\\n    profileproject.h \\\n    profilefilefactory.h\n"
  },
  {
    "path": "liteidex/src/plugins/profileproject/profileproject.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n  <mime-type type=\"text/x-profile\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Project File</comment>\n    <glob pattern=\"*.pro\"/>\n  </mime-type>\n  <mime-type type=\"text/x-gopro\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Golang Project File</comment>\n    <glob pattern=\"*.gopro\"/>\n  </mime-type>  \n</mime-info>  \n"
  },
  {
    "path": "liteidex/src/plugins/profileproject/profileproject_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: profileproject_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef PROFILEPROJECT_GLOBAL_H\n#define PROFILEPROJECT_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(PROFILEPROJECT_LIBRARY)\n#  define PROFILEPROJECTSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define PROFILEPROJECTSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#endif // PROFILEPROJECT_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/profileproject/profileprojectplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: profileprojectplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"profileprojectplugin.h\"\n#include \"profilefilefactory.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nProfileProjectPlugin::ProfileProjectPlugin()\n{\n    m_info->setId(\"plugin/profileproject\");\n    m_info->setName(\"ProfileProject\");\n    m_info->setAuthor(\"visualfc\");\n    m_info->setVer(\"x2\");\n    m_info->setInfo(\"Project Profile Plugin\");\n}\n\nbool ProfileProjectPlugin::initWithApp(LiteApi::IApplication *app)\n{\n    if (!LiteApi::IPlugin::initWithApp(app)) {\n        return false;\n    }\n\n    ProfileFileFactory *factory = new ProfileFileFactory(app,this);\n    app->projectManager()->addFactory(factory);\n    return true;\n}\n\nQ_EXPORT_PLUGIN(ProfileProjectPlugin)\n"
  },
  {
    "path": "liteidex/src/plugins/profileproject/profileprojectplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: profileprojectplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef PROFILEPROJECTPLUGIN_H\n#define PROFILEPROJECTPLUGIN_H\n\n#include \"profileproject_global.h\"\n#include \"liteapi/liteapi.h\"\n#include <QtPlugin>\n\nclass ProfileProjectPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPlugin)\npublic:\n    ProfileProjectPlugin();\n    virtual bool initWithApp(LiteApi::IApplication *app);\n};\n\n#endif // PROFILEPROJECTPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/qsqldbfile.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: qsqldbfile.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"qsqldbfile.h\"\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nQSqlDbFile::QSqlDbFile(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IFile(parent),\n    m_liteApp(app)\n{\n}\n\nQSqlDbFile::~QSqlDbFile()\n{\n    if (m_db.isOpen()) {\n        m_db.close();\n    }\n}\n\nbool QSqlDbFile::open(const QString &/*fileName*/, const QString &/*mimeType*/)\n{\n    return false;\n}\n\nbool QSqlDbFile::reload()\n{\n    return false;\n}\n\nbool QSqlDbFile::save(const QString &/*fileName*/)\n{\n    return false;\n}\n\nbool QSqlDbFile::isReadOnly() const\n{\n    return false;\n}\n\nQString QSqlDbFile::fileName() const\n{\n    return m_db.databaseName();\n}\n\nQString QSqlDbFile::mimeType() const\n{\n    return \"database/sql\";\n}\n\nQSqlDatabase &QSqlDbFile::db()\n{\n    return m_db;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/qsqldbfile.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: qsqldbfile.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef QSQLDBFILE_H\n#define QSQLDBFILE_H\n\n#include \"liteapi.h\"\n#include <QSqlDatabase>\n\nclass QSqlDbFile : public LiteApi::IFile\n{\npublic:\n    QSqlDbFile(LiteApi::IApplication *app, QObject *parent);\n    ~QSqlDbFile();\npublic:\n    virtual bool open(const QString &fileName, const QString &mimeType);\n    virtual bool reload();\n    virtual bool save(const QString &fileName);\n    virtual bool isReadOnly() const;\n    virtual QString fileName() const;\n    virtual QString mimeType() const;\npublic:\n    QSqlDatabase & db();\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QSqlDatabase    m_db;\n};\n\n#endif // QSQLDBFILE_H\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/qsqleditor.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: qsqleditor.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"qsqleditor.h\"\n#include \"ui_qsqleditor.h\"\n\n#include <QStandardItemModel>\n#include <QStandardItem>\n#include <QMenu>\n#include <QAction>\n#include <tableviewwidget.h>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nQSqlEditor::QSqlEditor(LiteApi::IApplication *app) :\n    m_liteApp(app),\n    m_file(0),\n    m_widget(new QWidget),\n    ui(new Ui::QSqlEditor),\n    m_bReadOnly(false)\n{\n    ui->setupUi(m_widget);\n    m_dbModel = new QStandardItemModel(this);\n    ui->dbTreeView->setEditTriggers(0);\n    ui->dbTreeView->setModel(m_dbModel);\n    ui->dbTreeView->setHeaderHidden(true);\n    ui->dbTreeView->setContextMenuPolicy(Qt::CustomContextMenu);\n\n    ui->tabWidget->setTabsClosable(true);\n\n    m_infoAct = new QAction(tr(\"Infomation\"),this);\n    m_editorAct = new QAction(tr(\"Edit Table\"),this);\n\n    m_tableMenu = new QMenu;\n    m_tableMenu->addAction(m_infoAct);\n    m_tableMenu->addAction(m_editorAct);\n\n    connect(ui->dbTreeView,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(dbTreeContextMenuRequested(QPoint)));\n    connect(m_editorAct,SIGNAL(triggered()),this,SLOT(editorTable()));\n    //connect(ui->tabWidget,SIGNAL(tabCloseRequested(int)),this,SLOT())\n}\n\nQSqlEditor::~QSqlEditor()\n{\n    ui->tabWidget->clear();\n    if (m_file) {\n        delete m_file;\n    }\n    delete m_tableMenu;\n    delete ui;\n    delete m_widget;\n}\n\nQWidget *QSqlEditor::widget()\n{\n    return m_widget;\n}\n\nQString QSqlEditor::name() const\n{\n    if (m_file) {\n        return m_file->fileName();\n    }\n    return QString(\"\");\n}\n\nbool QSqlEditor::open(const QString &/*fileName*/,const QString &/*mimeType*/)\n{\n    return false;\n}\n\nbool QSqlEditor::reload()\n{\n    return false;\n}\n\nbool QSqlEditor::save()\n{\n    return false;\n}\n\nbool QSqlEditor::saveAs(const QString &/*fileName*/)\n{\n    return false;\n}\n\nvoid QSqlEditor::setReadOnly(bool b)\n{\n    m_bReadOnly = b;\n}\n\nbool QSqlEditor::isReadOnly() const\n{\n    return m_bReadOnly;\n}\n\nbool QSqlEditor::isModified() const\n{\n    return false;\n}\n\nQString QSqlEditor::fileName() const\n{\n    if (!m_file) {\n        return QString();\n    }\n    return m_file->fileName();\n}\n\nQString QSqlEditor::mimeType() const\n{\n    if (!m_file) {\n        return QString();\n    }\n    return m_file->mimeType();\n}\n\nLiteApi::IFile *QSqlEditor::file()\n{\n    return m_file;\n}\n\nvoid QSqlEditor::setFile(QSqlDbFile *file)\n{\n    m_file = file;\n    if (m_file && m_file->db().isOpen()) {\n        loadDatabase();\n    }\n}\n\nQString QSqlEditor::tableTypeNames(int type) const{\n    if (type == QSql::Tables) {\n        return tr(\"Tables\");\n    } else if (type == QSql::Views) {\n        return tr(\"Views\");\n    } else if (type == QSql::SystemTables) {\n        return tr(\"SystemTables\");\n    } else if (type == QSql::AllTables) {\n        return tr(\"AllTables\");\n    }\n    return tr(\"Unknow\");\n}\n\nQString QSqlEditor::tableTypeName(int type) const{\n    if (type == QSql::Tables) {\n        return tr(\"Table\");\n    } else if (type == QSql::Views) {\n        return tr(\"View\");\n    } else if (type == QSql::SystemTables) {\n        return tr(\"SystemTable\");\n    } else if (type == QSql::AllTables) {\n        return tr(\"AllTable\");\n    }\n    return tr(\"Unknow\");\n}\n\nvoid QSqlEditor::loadDatabase()\n{\n    m_dbModel->clear();\n    appendTableItems(QSql::Tables);\n    appendTableItems(QSql::Views);\n    appendTableItems(QSql::SystemTables);\n    ui->dbTreeView->expandAll();\n}\n\nvoid QSqlEditor::appendTableItems(QSql::TableType type)\n{\n    QString typeName = tableTypeNames(type);\n    QStringList tables = m_file->db().tables(type);\n    QStandardItem *root = new QStandardItem(typeName);\n    foreach (QString table, tables) {\n        QStandardItem *item = new QStandardItem(table);\n        item->setData(type);\n        root->appendRow(item);\n    }\n    m_dbModel->appendRow(root);\n}\n\nvoid QSqlEditor::dbTreeContextMenuRequested(const QPoint &pt)\n{\n    QModelIndex index = ui->dbTreeView->indexAt(pt);\n    m_contextIndex = index;\n    if (!index.isValid()) {\n        return;\n    }\n    bool bok;\n    int type = index.data(Qt::UserRole+1).toInt(&bok);\n    QMenu *contextMenu = 0;\n    if (type == QSql::Tables ||\n            type == QSql::Views ||\n            type == QSql::SystemTables) {\n        contextMenu = m_tableMenu;\n    }\n    if (contextMenu) {\n        contextMenu->popup(ui->dbTreeView->mapToGlobal(pt));\n    }\n}\n\nvoid QSqlEditor::editorTable()\n{\n    int type = m_contextIndex.data(Qt::UserRole+1).toInt();\n    if (type == QSql::Tables ||\n            type == QSql::Views ||\n            type == QSql::SystemTables) {\n        QString typeName = tableTypeName(type);\n        QString table = m_contextIndex.data().toString();\n        TableViewWidget *w = new TableViewWidget(m_file->db());\n        w->setTable(table);\n        ui->tabWidget->addTab(w,QString(tr(\"%1:%2\")).arg(typeName).arg(table));\n        ui->tabWidget->setCurrentWidget(w);\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/qsqleditor.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: qsqleditor.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef QSQLEDITOR_H\n#define QSQLEDITOR_H\n\n#include \"liteapi.h\"\n#include \"qsqldbfile.h\"\n#include <QModelIndex>\n#include <QtSql/qsql.h>\n\nnamespace Ui {\n    class QSqlEditor;\n}\n\nclass QStandardItemModel;\n\nclass QSqlEditor : public LiteApi::IEditor\n{\n    Q_OBJECT\npublic:\n    explicit QSqlEditor(LiteApi::IApplication *app);\n    ~QSqlEditor();\npublic:\n    virtual QWidget *widget();\n    virtual QString name() const;\npublic:\n    virtual bool open(const QString &fileName,const QString &mimeType);\n    virtual bool reload();\n    virtual bool save();\n    virtual bool saveAs(const QString &fileName);\n    virtual void setReadOnly(bool b);\n    virtual bool isReadOnly() const;\n    virtual bool isModified() const;\n    virtual QString fileName() const;\n    virtual QString mimeType() const;\n    virtual LiteApi::IFile *file();\npublic:\n    void setFile(QSqlDbFile *file);\n    void loadDatabase();\nprotected slots:\n    void dbTreeContextMenuRequested(const QPoint& pt);\n    void editorTable();\nprotected:\n    void appendTableItems(QSql::TableType type);\n    QString tableTypeNames(int type) const;\n    QString tableTypeName(int type) const;\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QSqlDbFile  *m_file;\n    QWidget     *m_widget;\n    Ui::QSqlEditor  *ui;\n    bool    m_bReadOnly;\n    QStandardItemModel *m_dbModel;\n    QMenu   *m_tableMenu;\n    QAction *m_infoAct;\n    QAction *m_editorAct;\n    QModelIndex m_contextIndex;\n};\n\n#endif // QSQLEDITOR_H\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/qsqleditor.pro",
    "content": "TARGET = qsqleditor\nTEMPLATE = lib\nQT += sql\n\ninclude(../../liteideplugin.pri)\n\nDEFINES += QSQLEDITOR_LIBRARY\n\nSOURCES += qsqleditorplugin.cpp \\\n    qsqleditor.cpp \\\n    sqliterfile.cpp \\\n    qsqlfilefactory.cpp \\\n    qsqldbfile.cpp \\\n    tableviewwidget.cpp \\\n    sqltablemodel.cpp \\\n    sqlitemdelegate.cpp\n\nHEADERS += qsqleditorplugin.h\\\n        qsqleditor_global.h \\\n    qsqleditor.h \\\n    sqlitefile.h \\\n    qsqlfilefactory.h \\\n    qsqldbfile.h \\\n    tableviewwidget.h \\\n    sqltablemodel.h \\\n    sqlitemdelegate.h\n\nFORMS += \\\n    qsqleditor.ui \\\n    tableviewwidget.ui\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/qsqleditor.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>QSqlEditor</class>\n <widget class=\"QWidget\" name=\"QSqlEditor\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>585</width>\n    <height>354</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QHBoxLayout\" name=\"horizontalLayout\" stretch=\"0,0\">\n   <item>\n    <widget class=\"QTreeView\" name=\"dbTreeView\">\n     <property name=\"sizePolicy\">\n      <sizepolicy hsizetype=\"Preferred\" vsizetype=\"Expanding\">\n       <horstretch>0</horstretch>\n       <verstretch>0</verstretch>\n      </sizepolicy>\n     </property>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QTabWidget\" name=\"tabWidget\">\n     <property name=\"currentIndex\">\n      <number>0</number>\n     </property>\n     <widget class=\"QWidget\" name=\"tab_2\">\n      <attribute name=\"title\">\n       <string>SQL </string>\n      </attribute>\n      <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n       <item>\n        <widget class=\"QPlainTextEdit\" name=\"sqlTextEdit\">\n         <property name=\"sizePolicy\">\n          <sizepolicy hsizetype=\"Expanding\" vsizetype=\"Preferred\">\n           <horstretch>0</horstretch>\n           <verstretch>0</verstretch>\n          </sizepolicy>\n         </property>\n        </widget>\n       </item>\n       <item>\n        <widget class=\"QTableView\" name=\"sqlTableView\"/>\n       </item>\n      </layout>\n     </widget>\n    </widget>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/qsqleditor_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: qsqleditor_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef QSQLEDITOR_GLOBAL_H\n#define QSQLEDITOR_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(QSQLEDITOR_LIBRARY)\n#  define QSQLEDITORSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define QSQLEDITORSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#endif // QSQLEDITOR_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/qsqleditorplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: qsqleditorplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"qsqleditorplugin.h\"\n#include \"qsqlfilefactory.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nQSqlEditorPlugin::QSqlEditorPlugin()\n{\n    m_info->setId(\"plugin/QSqlEditor\");\n    m_info->setName(\"QSqlEditor\");\n    m_info->setAuthor(\"visualfc\");\n    m_info->setInfo(\"QtSql Editor Plugin\");\n}\n\nbool QSqlEditorPlugin::initWithApp(LiteApi::IApplication *app)\n{\n    if (!LiteApi::IPlugin::initWithApp(app)) {\n        return false;\n    }\n\n    QSqlFileFactory *factory = new QSqlFileFactory(app,this);\n    if (factory) {\n        m_liteApp->editorManager()->addFactory(factory);\n    }\n\n    return true;\n}\n\nQ_EXPORT_PLUGIN(QSqlEditorPlugin)\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/qsqleditorplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: qsqleditorplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef QSQLEDITORPLUGIN_H\n#define QSQLEDITORPLUGIN_H\n\n#include \"qsqleditor_global.h\"\n#include \"liteapi.h\"\n#include <QtPlugin>\n\nclass QSqlEditorPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPlugin)\npublic:\n    QSqlEditorPlugin();\n    virtual bool initWithApp(LiteApi::IApplication *app);\n};\n\n#endif // QSQLEDITORPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/qsqlfilefactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: qsqlfilefactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"qsqlfilefactory.h\"\n#include \"sqlitefile.h\"\n#include \"qsqleditor.h\"\n\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nQSqlFileFactory::QSqlFileFactory(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IEditorFactory(parent),\n    m_liteApp(app)\n{\n}\n\nQStringList QSqlFileFactory::mimeTypes() const\n{\n    return QStringList() << \"database/sqlite\";\n}\n\nLiteApi::IEditor *QSqlFileFactory::open(const QString &fileName, const QString &mimeType)\n{\n    QSqlDbFile *file = 0;\n    if (mimeType == \"database/sqlite\") {\n        file = new SQLiteFile(m_liteApp);\n        if (!file->open(fileName,mimeType)) {\n            delete file;\n            return 0;\n        }\n    }\n    if (!file) {\n        return 0;\n    }\n    QSqlEditor *editor = new QSqlEditor(m_liteApp);\n    editor->setFile(file);\n    return editor;\n}\n\nbool QSqlFileFactory::targetInfo(const QString &/*fileName*/, const QString &/*mimetype*/, QString &/*target*/, QString &/*targetPath*/, QString &/*workPath*/) const\n{\n    return false;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/qsqlfilefactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: qsqlfilefactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef QSQLFILEFACTORY_H\n#define QSQLFILEFACTORY_H\n\n#include \"liteapi.h\"\n\nclass QSqlFileFactory : public LiteApi::IEditorFactory\n{\npublic:\n    QSqlFileFactory(LiteApi::IApplication *app, QObject *parent);\n\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IEditor *open(const QString &fileName, const QString &mimeType);\n    virtual bool targetInfo(const QString &fileName, const QString &mimetype, QString &target, QString &targetPath, QString &workPath) const;\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // QSQLFILEFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/sqlitefile.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: sqlitefile.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef SQLITEFILE\n#define SQLITEFILE\n\n#include \"qsqldbfile.h\"\n\nclass SQLiteFile : public QSqlDbFile\n{\n    Q_OBJECT\npublic:\n    SQLiteFile(LiteApi::IApplication *app, QObject *parent = 0);\npublic:\n    virtual bool open(const QString &fileName, const QString &mimeType);\n    virtual QString mimeType() const;\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // SQLITEFILE\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/sqlitemdelegate.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: sqlitemdelegate.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"sqlitemdelegate.h\"\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nSqlItemDelegate::SqlItemDelegate(QObject *parent) :\n    QItemDelegate(parent)\n{\n}\n\nQWidget *SqlItemDelegate::createEditor(QWidget *parent,\n                      const QStyleOptionViewItem &option,\n                      const QModelIndex &index) const\n{\n    QVariant var = index.data(Qt::EditRole);\n    if (var.type() == QVariant::ByteArray) {\n        return 0;\n    }\n    return QItemDelegate::createEditor(parent,option,index);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/sqlitemdelegate.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: sqlitemdelegate.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef SQLITEMDELEGATE_H\n#define SQLITEMDELEGATE_H\n\n#include <QItemDelegate>\n\nclass SqlItemDelegate : public QItemDelegate\n{\n    Q_OBJECT\npublic:\n    explicit SqlItemDelegate(QObject *parent = 0);\n    QWidget *createEditor(QWidget *parent,\n                          const QStyleOptionViewItem &option,\n                          const QModelIndex &index) const;\n\n};\n\n#endif // SQLITEMDELEGATE_H\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/sqliterfile.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: sqliterfile.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"sqlitefile.h\"\n#include <QDebug>\n#include <QSqlError>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nSQLiteFile::SQLiteFile(LiteApi::IApplication *app, QObject *parent) :\n    QSqlDbFile(app,parent)\n{\n}\n\nbool SQLiteFile::open(const QString &fileName, const QString &/*mimeType*/)\n{\n    m_db = QSqlDatabase::addDatabase(\"QSQLITE\",fileName);\n    m_db.setDatabaseName(fileName);\n    return m_db.open();\n}\n\nQString SQLiteFile::mimeType() const\n{\n    return \"database/sqlite\";\n}\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/sqltablemodel.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: sqltablemodel.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"sqltablemodel.h\"\n#include <QColor>\n#include <QDebug>\n#include <QSqlRecord>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nSqlTableModel::SqlTableModel(QObject *parent, QSqlDatabase db) :\n    QSqlTableModel(parent,db)\n{\n    m_blobColor = QColor(Qt::darkYellow);\n}\n\nQVariant SqlTableModel::data(const QModelIndex &idx, int role) const\n{\n    QVariant var = QSqlTableModel::data(idx,Qt::DisplayRole);\n    if (var.isNull()) {\n        if (role == Qt::BackgroundColorRole)\n            return QVariant(m_blobColor);\n        if (role == Qt::ToolTipRole)\n            return QVariant(tr(\"NULL value\"));\n        if (role == Qt::DisplayRole)\n            return QVariant(tr(\"{null}\"));\n        if (role == Qt::EditRole)\n            return QSqlTableModel::data(idx, Qt::DisplayRole);\n        if (role == Qt::UserRole+1)\n            return QVariant(\"{blob}\");\n\n    } else if (var.type() == QVariant::ByteArray) {\n        if (role == Qt::BackgroundColorRole)\n            return QVariant(m_blobColor);\n        if (role == Qt::ToolTipRole)\n            return QVariant(tr(\"BLOB value\"));\n        if (role == Qt::DisplayRole)\n            return QVariant(tr(\"{blob}\"));\n        if (role == Qt::EditRole)\n            return QSqlTableModel::data(idx, Qt::DisplayRole);\n        if (role == Qt::UserRole+1)\n            return QVariant(\"{blob}\");\n\n    }\n\n    return QSqlTableModel::data(idx,role);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/sqltablemodel.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: sqltablemodel.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef SQLTABLEMODEL_H\n#define SQLTABLEMODEL_H\n\n#include <QSqlTableModel>\n#include <QColor>\n\nclass SqlTableModel : public QSqlTableModel\n{\n    Q_OBJECT\npublic:\n    explicit SqlTableModel(QObject *parent = 0,QSqlDatabase db = QSqlDatabase());\n    QVariant data(const QModelIndex &idx, int role = Qt::DisplayRole) const;\nsignals:\n\npublic slots:\nprotected:\n    QColor m_blobColor;\n};\n\n#endif // SQLTABLEMODEL_H\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/tableviewwidget.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: tableviewwidget.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"tableviewwidget.h\"\n#include \"ui_tableviewwidget.h\"\n\n#include \"sqltablemodel.h\"\n#include \"sqlitemdelegate.h\"\n#include <QTableWidgetItem>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nTableViewWidget::TableViewWidget(QSqlDatabase &db, QWidget *parent) :\n    QWidget(parent),\n    ui(new Ui::TableViewWidget)\n{\n    ui->setupUi(this);\n    m_model = new SqlTableModel(this,db);\n    m_delegate = new SqlItemDelegate(this);\n\n    ui->tableView->setModel(m_model);\n    ui->tableView->resizeColumnsToContents();\n    ui->tableView->setItemDelegate(m_delegate);\n}\n\nTableViewWidget::~TableViewWidget()\n{\n    delete ui;\n}\n\nvoid TableViewWidget::setTable(const QString &table)\n{\n    m_model->setTable(table);\n    m_model->select();\n\n    if (m_model->columnCount() <= 0)\n            return;\n\n    ui->tableView->resizeColumnsToContents();\n    ui->tableView->resizeRowsToContents();\n\n    int total = 0;\n    for (int i = 0; i < m_model->columnCount(); ++i)\n        total += ui->tableView->columnWidth(i);\n\n    if (total < ui->tableView->viewport()->width())\n    {\n        int extra = (ui->tableView->viewport()->width() - total)\n                / m_model->columnCount();\n        for (int i = 0; i < m_model->columnCount(); ++i)\n            ui->tableView->setColumnWidth(i, ui->tableView->columnWidth(i) + extra);\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/tableviewwidget.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: tableviewwidget.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef TABLEVIEWWIDGET_H\n#define TABLEVIEWWIDGET_H\n\n#include <QWidget>\n#include <QSqlDatabase>\n\nnamespace Ui {\n    class TableViewWidget;\n}\n\nclass SqlTableModel;\nclass SqlItemDelegate;\nclass TableViewWidget : public QWidget\n{\n    Q_OBJECT\n\npublic:\n    explicit TableViewWidget(QSqlDatabase &db, QWidget *parent = 0);\n    ~TableViewWidget();\n    void setTable(const QString &table);\nprivate:\n    Ui::TableViewWidget *ui;\n    SqlTableModel      *m_model;\n    SqlItemDelegate    *m_delegate;\n};\n\n#endif // TABLEVIEWWIDGET_H\n"
  },
  {
    "path": "liteidex/src/plugins/qsqleditor/tableviewwidget.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>TableViewWidget</class>\n <widget class=\"QWidget\" name=\"TableViewWidget\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>400</width>\n    <height>300</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n   <item>\n    <widget class=\"QTableView\" name=\"tableView\">\n     <property name=\"alternatingRowColors\">\n      <bool>true</bool>\n     </property>\n     <property name=\"selectionMode\">\n      <enum>QAbstractItemView::ContiguousSelection</enum>\n     </property>\n     <property name=\"verticalScrollMode\">\n      <enum>QAbstractItemView::ScrollPerPixel</enum>\n     </property>\n     <property name=\"horizontalScrollMode\">\n      <enum>QAbstractItemView::ScrollPerPixel</enum>\n     </property>\n    </widget>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopen.pro",
    "content": "TARGET = quickopen\nTEMPLATE = lib\n\ninclude (../../liteideplugin.pri)\ninclude (../../api/quickopenapi/quickopenapi.pri)\ninclude (../../utils/fileutil/fileutil.pri)\ninclude (../../utils/folderview/folderview.pri)\ninclude (../../3rdparty/qtc_editutil/qtc_editutil.pri)\n\nDEFINES += QUICKOPEN_LIBRARY\n\nSOURCES += quickopenplugin.cpp \\\n    quickopenwidget.cpp \\\n    quickopenmanager.cpp \\\n    quickopenfiles.cpp \\\n    quickopenlines.cpp \\\n    quickopenhelp.cpp \\\n    quickopeneditor.cpp \\\n    quickopenmimetype.cpp \\\n    quickopenoption.cpp \\\n    quickopenoptionfactory.cpp \\\n    quickopenaction.cpp \\\n    quickopenfolder.cpp \\\n    quickopenfilesystem.cpp\n\nHEADERS += quickopenplugin.h\\\n        quickopen_global.h \\\n    quickopenwidget.h \\\n    quickopenmanager.h \\\n    quickopenfiles.h \\\n    quickopenlines.h \\\n    quickopenhelp.h \\\n    quickopeneditor.h \\\n    quickopenmimetype.h \\\n    quickopenoption.h \\\n    quickopenoptionfactory.h \\\n    quickopenaction.h \\\n    quickopenfolder.h \\\n    quickopenfilesystem.h\n\nFORMS += \\\n    quickopenoption.ui\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopen_global.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopen_global.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef QUICKOPEN_GLOBAL_H\r\n#define QUICKOPEN_GLOBAL_H\r\n\r\n#include <QtCore/qglobal.h>\r\n\r\n#if defined(QUICKOPEN_LIBRARY)\r\n#  define QUICKOPENSHARED_EXPORT Q_DECL_EXPORT\r\n#else\r\n#  define QUICKOPENSHARED_EXPORT Q_DECL_IMPORT\r\n#endif\r\n\r\n#define OPTION_QUICKOPEN \"option/quickopen\"\r\n#define QUICKOPEN_FILES_MAXCOUNT \"quickopen/filesmaxcount\"\r\n#define QUICKOPNE_FILES_MATCHCASE \"quickopen/filesmatchscase\"\r\n#define QUICKOPEN_FOLDER_MAXCOUNT \"quickopen/foldermaxcount\"\r\n#define QUICKOPNE_FOLDER_MATCHCASE \"quickopen/foldermatchscase\"\r\n#define QUICKOPNE_EDITOR_MATCHCASE \"quickopen/editormatchcase\"\r\n\r\n#endif // QUICKOPEN_GLOBAL_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenaction.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenaction.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"quickopenaction.h\"\r\n#include <QStandardItem>\r\n#include <QStandardItemModel>\r\n#include <QModelIndex>\r\n#include <QSortFilterProxyModel>\r\n#include <QMenu>\r\n#include <QAction>\r\n#include <QTimer>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nQuickOpenAction::QuickOpenAction(LiteApi::IApplication *app, QObject *parent)\r\n    : LiteApi::IQuickOpen(parent), m_liteApp(app)\r\n{\r\n    m_model = new QStandardItemModel(this);\r\n    m_proxyModel = new QSortFilterProxyModel(this);\r\n    m_proxyModel->setSourceModel(m_model);\r\n    m_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);\r\n    m_proxyModel->setFilterKeyColumn(0);\r\n}\r\n\r\nQString QuickOpenAction::id() const\r\n{\r\n    return \"quickopen/command\";\r\n}\r\n\r\nQString QuickOpenAction::info() const\r\n{\r\n    return tr(\"Show and Run Commands\");\r\n}\r\n\r\nQString QuickOpenAction::placeholderText() const\r\n{\r\n    return QString();\r\n}\r\n\r\nvoid QuickOpenAction::activate()\r\n{\r\n\r\n}\r\n\r\nQAbstractItemModel *QuickOpenAction::model() const\r\n{\r\n    return m_proxyModel;\r\n}\r\n\r\nQModelIndex QuickOpenAction::rootIndex() const\r\n{\r\n    return QModelIndex();\r\n}\r\n\r\nstatic QString makeTitle(const QString &id)\r\n{\r\n    return id[0].toUpper()+id.mid(1);\r\n}\r\n\r\nstatic QString makeMenuName(const QString &idMenu)\r\n{\r\n    if (idMenu.startsWith(\"menu/\")) {\r\n        return makeTitle(idMenu.mid(5));\r\n    }\r\n    return makeTitle(idMenu);\r\n}\r\n\r\nvoid QuickOpenAction::updateModel()\r\n{\r\n    m_model->clear();\r\n    m_itemActionMap.clear();\r\n    m_proxyModel->setFilterFixedString(\"\");\r\n\r\n    LiteApi::IActionManager *manager = m_liteApp->actionManager();\r\n    // (\"menu/build\", \"menu/debug\", \"menu/edit\", \"menu/file\", \"menu/find\", \"menu/help\", \"menu/recent\", \"menu/view\")\r\n    // (\"App\", \"Build\", \"Find\", \"Editor\", \"Document\", \"Debug\", \"JsonEdit\", \"GoPkg\", \"GolangEdit\", \"GoFmt\", \"Bookmarks\")\r\n    foreach (QString idMenu, manager->menuList()) {\r\n        if (idMenu == \"menu/recent\") {\r\n            continue;\r\n        }\r\n        QMenu *menu = manager->loadMenu(idMenu);\r\n        if (!menu) {\r\n            continue;\r\n        }\r\n        QAction *menuAct = menu->menuAction();\r\n        if (!menuAct) {\r\n            continue;\r\n        }\r\n        QMenu *realMenu = menuAct->menu();\r\n        if (!realMenu) {\r\n            continue;\r\n        }\r\n        QList<QAction*> actionList;\r\n        QString menuName = makeMenuName(idMenu);\r\n        foreach (QAction *act, realMenu->actions()) {\r\n            if (act->isSeparator()) {\r\n                continue;\r\n            }\r\n            QMenu *childMenu = act->menu();\r\n            if (childMenu) {\r\n                foreach (QAction *act, childMenu->actions()) {\r\n                    if (act->isSeparator()) {\r\n                        continue;\r\n                    }\r\n                    if (act->menu() != 0) {\r\n                        continue;\r\n                    }\r\n                    actionList << act;\r\n                }\r\n            } else {\r\n                actionList << act;\r\n            }\r\n        }\r\n        foreach (QAction *act, actionList) {\r\n            if (!act->isEnabled()) {\r\n                continue;\r\n            }\r\n            if (act->data().isNull()) {\r\n                continue;\r\n            }\r\n            QString text = act->data().toString();\r\n            if (text.isEmpty()) {\r\n                continue;\r\n            }\r\n            QStandardItem *item = new QStandardItem(menuName+\".\"+text);\r\n            QStandardItem *info = new QStandardItem();\r\n            if (text != act->text()) {\r\n                info->setText(act->text());\r\n            }\r\n            QStandardItem *shortcut = new QStandardItem(act->shortcut().toString(QKeySequence::NativeText));\r\n            m_model->appendRow(QList<QStandardItem*>() << item << info << shortcut);\r\n            m_itemActionMap.insert(item,act);\r\n        }\r\n    }\r\n}\r\n\r\nQModelIndex QuickOpenAction::filterChanged(const QString &text)\r\n{\r\n    m_proxyModel->setFilterFixedString(text);\r\n\r\n    for(int i = 0; i < m_proxyModel->rowCount(); i++) {\r\n        QModelIndex index = m_proxyModel->index(i,0);\r\n        QString name = index.data().toString();\r\n        if (name.startsWith(text,Qt::CaseInsensitive)) {\r\n            return index;\r\n        }\r\n    }\r\n    if (m_proxyModel->rowCount() > 0)\r\n        return m_proxyModel->index(0,0);\r\n    return QModelIndex();\r\n}\r\n\r\nvoid QuickOpenAction::indexChanged(const QModelIndex &/*index*/)\r\n{\r\n\r\n}\r\n\r\nbool QuickOpenAction::selected(const QString &/*text*/, const QModelIndex &index)\r\n{\r\n    if (!index.isValid()) {\r\n        return false;\r\n    }\r\n    QModelIndex sourceIndex = m_proxyModel->mapToSource(index);\r\n    QStandardItem *item = m_model->item(sourceIndex.row(),0);\r\n    if (item) {\r\n        QAction *act = m_itemActionMap.value(item);\r\n        if (act) {\r\n            QTimer::singleShot(1,act,SLOT(trigger()));\r\n            return true;\r\n        }\r\n    }\r\n    return false;\r\n}\r\n\r\nvoid QuickOpenAction::cancel()\r\n{\r\n\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenaction.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenaction.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef QUICKOPENACTION_H\r\n#define QUICKOPENACTION_H\r\n\r\n#include \"quickopenapi/quickopenapi.h\"\r\n\r\nclass QStandardItem;\r\nclass QStandardItemModel;\r\nclass QSortFilterProxyModel;\r\nclass QuickOpenAction : public LiteApi::IQuickOpen\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    QuickOpenAction(LiteApi::IApplication *app, QObject *parent = 0);\r\n    virtual QString id() const;\r\n    virtual QString info() const;\r\n    virtual QString placeholderText() const;\r\n    virtual void activate();\r\n    virtual QAbstractItemModel *model() const;\r\n    virtual QModelIndex rootIndex() const;\r\n    virtual void updateModel();\r\n    virtual QModelIndex filterChanged(const QString &text);\r\n    virtual void indexChanged(const QModelIndex &index);\r\n    virtual bool selected(const QString &text, const QModelIndex &index);\r\n    virtual void cancel();\r\nprotected:\r\n    LiteApi::IApplication *m_liteApp;\r\n    QStandardItemModel    *m_model;\r\n    QSortFilterProxyModel *m_proxyModel;\r\n    QMap<QStandardItem*,QAction*> m_itemActionMap;\r\n};\r\n\r\n#endif // QUICKOPENACTION_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopeneditor.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopeneditor.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"quickopeneditor.h\"\r\n#include \"quickopen_global.h\"\r\n#include <QStandardItemModel>\r\n#include <QSortFilterProxyModel>\r\n#include <QStandardItem>\r\n#include <QDebug>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nQuickOpenEditor::QuickOpenEditor(LiteApi::IApplication *app, QObject *parent)\r\n    : LiteApi::IQuickOpen(parent), m_liteApp(app)\r\n{\r\n    m_model = new QStandardItemModel(this);\r\n    m_proxyModel = new QSortFilterProxyModel(this);\r\n    m_proxyModel->setSourceModel(m_model);\r\n    m_matchCase = Qt::CaseInsensitive;\r\n}\r\n\r\nQString QuickOpenEditor::id() const\r\n{\r\n    return \"quickopen/editor\";\r\n}\r\n\r\nQString QuickOpenEditor::info() const\r\n{\r\n    return tr(\"Show All Opened Editors\");\r\n}\r\n\r\nQString QuickOpenEditor::placeholderText() const\r\n{\r\n    return QString();\r\n}\r\n\r\nvoid QuickOpenEditor::activate()\r\n{\r\n\r\n}\r\n\r\nQAbstractItemModel *QuickOpenEditor::model() const\r\n{\r\n    return m_proxyModel;\r\n}\r\n\r\nQModelIndex QuickOpenEditor::rootIndex() const\r\n{\r\n    return QModelIndex();\r\n}\r\n\r\nvoid QuickOpenEditor::updateModel()\r\n{\r\n    m_matchCase = m_liteApp->settings()->value(QUICKOPNE_EDITOR_MATCHCASE,false).toBool() ? Qt::CaseSensitive : Qt::CaseInsensitive;\r\n\r\n    m_model->clear();\r\n    m_proxyModel->setFilterFixedString(\"\");\r\n    m_proxyModel->setFilterCaseSensitivity(m_matchCase);\r\n    m_proxyModel->setFilterKeyColumn(2);\r\n\r\n    foreach(LiteApi::IEditor *editor, m_liteApp->editorManager()->editorList()) {\r\n        if (editor->filePath().isEmpty()) {\r\n            continue;\r\n        }\r\n        m_model->appendRow(QList<QStandardItem*>() << new QStandardItem(editor->name()) << new QStandardItem(editor->filePath()) );\r\n    }\r\n    m_proxyModel->sort(0);\r\n}\r\n\r\nQModelIndex QuickOpenEditor::filterChanged(const QString &text)\r\n{\r\n    m_proxyModel->setFilterFixedString(text);\r\n\r\n    for(int i = 0; i < m_proxyModel->rowCount(); i++) {\r\n        QModelIndex index = m_proxyModel->index(i,0);\r\n        QString name = index.data().toString();\r\n        if (name.startsWith(text,m_matchCase)) {\r\n            return index;\r\n        }\r\n    }\r\n    if (m_proxyModel->rowCount() > 0)\r\n        return m_proxyModel->index(0,0);\r\n    return QModelIndex();\r\n}\r\n\r\nvoid QuickOpenEditor::indexChanged(const QModelIndex &/*index*/)\r\n{\r\n\r\n}\r\n\r\nbool QuickOpenEditor::selected(const QString &text, const QModelIndex &index)\r\n{\r\n    if (!index.isValid()) {\r\n        return false;\r\n    }\r\n    QString filePath = m_proxyModel->index(index.row(),1).data().toString();\r\n    if (!m_liteApp->fileManager()->openFile(filePath)) {\r\n        return false;\r\n    }\r\n    return true;\r\n}\r\n\r\nvoid QuickOpenEditor::cancel()\r\n{\r\n\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopeneditor.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopeneditor.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef QUICKOPENEDITOR_H\r\n#define QUICKOPENEDITOR_H\r\n\r\n#include \"quickopenapi/quickopenapi.h\"\r\n\r\nclass QStandardItemModel;\r\nclass QSortFilterProxyModel;\r\nclass QuickOpenEditor : public LiteApi::IQuickOpen\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    QuickOpenEditor(LiteApi::IApplication *app, QObject *parent = 0);\r\n    virtual QString id() const;\r\n    virtual QString info() const;\r\n    virtual QString placeholderText() const;\r\n    virtual void activate();\r\n    virtual QAbstractItemModel *model() const;\r\n    virtual QModelIndex rootIndex() const;\r\n    virtual void updateModel();\r\n    virtual QModelIndex filterChanged(const QString &text);\r\n    virtual void indexChanged(const QModelIndex &index);\r\n    virtual bool selected(const QString &text, const QModelIndex &index);\r\n    virtual void cancel();\r\nprotected:\r\n    LiteApi::IApplication *m_liteApp;\r\n    QStandardItemModel *m_model;\r\n    QSortFilterProxyModel *m_proxyModel;\r\n    Qt::CaseSensitivity m_matchCase;\r\n};\r\n\r\n#endif // QUICKOPENEDITOR_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenfiles.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenfiles.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"quickopenfiles.h\"\r\n#include \"quickopen_global.h\"\r\n#include <QStandardItemModel>\r\n#include <QStandardItem>\r\n#include <QSortFilterProxyModel>\r\n#include <QDir>\r\n#include <QFileInfo>\r\n#include <QTimer>\r\n#include <QApplication>\r\n#include <QDebug>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nQuickOpenFiles::QuickOpenFiles(LiteApi::IApplication *app, QObject *parent)\r\n    : LiteApi::IQuickOpen(parent), m_liteApp(app)\r\n{\r\n    m_model = new QStandardItemModel(this);\r\n    m_filesModel = new QStandardItemModel(this);\r\n    m_proxyModel = new QSortFilterProxyModel(this);\r\n    m_proxyModel->setSourceModel(m_model);\r\n    m_matchCase = Qt::CaseInsensitive;\r\n    m_maxCount = 10000;\r\n    m_thread = new FindFilesThread(this);\r\n    connect(m_thread,SIGNAL(findResult(QStringList)),this,SLOT(findResult(QStringList)));\r\n}\r\n\r\nQuickOpenFiles::~QuickOpenFiles()\r\n{\r\n    if (m_thread) {\r\n        m_thread->stop();\r\n        delete m_thread;\r\n    }\r\n}\r\n\r\nQString QuickOpenFiles::id() const\r\n{\r\n    return \"quickopen/files\";\r\n}\r\n\r\nQString QuickOpenFiles::info() const\r\n{\r\n    return tr(\"Go to File\");\r\n}\r\n\r\nQString QuickOpenFiles::placeholderText() const\r\n{\r\n    return tr(\"Type '?' to get help on the actions you can take from here\");\r\n}\r\n\r\nvoid QuickOpenFiles::activate()\r\n{\r\n}\r\n\r\nQAbstractItemModel *QuickOpenFiles::model() const\r\n{\r\n    return m_proxyModel;\r\n}\r\n\r\nQModelIndex QuickOpenFiles::rootIndex() const\r\n{\r\n    return QModelIndex();\r\n}\r\n\r\nvoid QuickOpenFiles::updateModel()\r\n{\r\n    cancel();\r\n\r\n    m_maxCount = m_liteApp->settings()->value(QUICKOPEN_FILES_MAXCOUNT,10000).toInt();\r\n    m_matchCase = m_liteApp->settings()->value(QUICKOPNE_FILES_MATCHCASE,false).toBool() ? Qt::CaseSensitive : Qt::CaseInsensitive;\r\n\r\n    m_model->clear();\r\n    m_filesModel->clear();\r\n    m_proxyModel->setSourceModel(m_model);\r\n    m_proxyModel->setFilterFixedString(\"\");\r\n    m_proxyModel->setFilterKeyColumn(2);\r\n    m_proxyModel->setFilterCaseSensitivity(m_matchCase);\r\n\r\n    m_editors.clear();\r\n    QStringList names;\r\n    foreach(LiteApi::IEditor *editor, m_liteApp->editorManager()->editorList()) {\r\n        if (editor->filePath().isEmpty()) {\r\n            continue;\r\n        }\r\n        names.push_back(editor->name()+\";\"+editor->filePath());\r\n        m_editors.push_back(editor->filePath());\r\n    }\r\n    qSort(names);\r\n    foreach (QString text, names) {\r\n        QStringList ar = text.split(\";\");\r\n        m_model->appendRow(QList<QStandardItem*>() << new QStandardItem(\"*\") << new QStandardItem(ar[0]) << new QStandardItem(ar[1]));\r\n        m_filesModel->appendRow(QList<QStandardItem*>() << new QStandardItem(\"*\") << new QStandardItem(ar[0]) << new QStandardItem(ar[1]));\r\n    }\r\n\r\n    startFindThread();\r\n}\r\n\r\nvoid QuickOpenFiles::startFindThread()\r\n{\r\n    QSet<QString> extSet;\r\n    foreach(LiteApi::IMimeType* type, m_liteApp->mimeTypeManager()->mimeTypeList()) {\r\n        foreach (QString ext, type->allPatterns()) {\r\n            if (ext.startsWith(\".\")) {\r\n                extSet << ext.mid(1);\r\n            } else if (ext.startsWith(\"*.\")) {\r\n                extSet << ext.mid(2);\r\n            }\r\n        }\r\n    }\r\n\r\n    int count = m_model->rowCount();\r\n    int maxcount = count+m_liteApp->settings()->value(QUICKOPEN_FILES_MAXCOUNT,100000).toInt();\r\n    QSet<QString> editorSet = m_editors.toSet();\r\n\r\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\r\n    QStringList folderList;\r\n    if (editor && !editor->filePath().isEmpty()) {\r\n        folderList << QFileInfo(editor->filePath()).path();\r\n    }\r\n    folderList << m_liteApp->fileManager()->folderList();\r\n\r\n    m_thread->setFolderList(folderList,extSet,editorSet,maxcount);\r\n\r\n    m_thread->start();\r\n}\r\n\r\nvoid QuickOpenFiles::findResult(const QStringList &fileList)\r\n{\r\n    foreach (QString filePath, fileList) {\r\n        m_filesModel->appendRow(QList<QStandardItem*>() << new QStandardItem(\"f\") << new QStandardItem(QFileInfo(filePath).fileName()) << new QStandardItem(filePath));\r\n    }\r\n}\r\n\r\nQModelIndex QuickOpenFiles::filterChanged(const QString &text)\r\n{\r\n    m_proxyModel->setFilterFixedString(text);\r\n    //check text size >= 3 for files or editor\r\n    if (text.size() >= 3) {\r\n        m_proxyModel->setSourceModel(m_filesModel);\r\n    } else {\r\n        m_proxyModel->setSourceModel(m_model);\r\n    }\r\n\r\n    for(int i = 0; i < m_proxyModel->rowCount(); i++) {\r\n        QModelIndex index = m_proxyModel->index(i,1);\r\n        QString name = index.data().toString();\r\n        if (name.startsWith(text,m_matchCase)) {\r\n            return index;\r\n        }\r\n    }\r\n    if (m_proxyModel->rowCount() > 0)\r\n        return m_proxyModel->index(0,0);\r\n    QFileInfo file(text);\r\n    if (file.exists() && file.isFile()) {\r\n        m_filesModel->appendRow(QList<QStandardItem*>() << new QStandardItem(\"f\") << new QStandardItem(file.fileName()) << new QStandardItem(file.filePath()));\r\n        return m_model->index(0,0);\r\n    }\r\n    return QModelIndex();\r\n}\r\n\r\nvoid QuickOpenFiles::indexChanged(const QModelIndex &/*index*/)\r\n{\r\n}\r\n\r\nbool QuickOpenFiles::selected(const QString &/*text*/, const QModelIndex &index)\r\n{\r\n    if (!index.isValid()) {\r\n        return false;\r\n    }\r\n    QString filePath = m_proxyModel->index(index.row(),2).data().toString();\r\n    if (!m_liteApp->fileManager()->openFile(filePath)) {\r\n        return false;\r\n    }\r\n    return true;\r\n}\r\n\r\nvoid QuickOpenFiles::cancel()\r\n{\r\n    m_thread->stop();\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenfiles.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenfiles.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef QUICKOPENFILES_H\r\n#define QUICKOPENFILES_H\r\n\r\n#include \"quickopenapi/quickopenapi.h\"\r\n#include  \"fileutil/findfilesthread.h\"\r\n\r\nclass QStandardItemModel;\r\nclass QSortFilterProxyModel;\r\n\r\nclass QuickOpenFiles : public LiteApi::IQuickOpen\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    QuickOpenFiles(LiteApi::IApplication *app, QObject *parent = 0);\r\n    virtual ~QuickOpenFiles();\r\n    virtual QString id() const;\r\n    virtual QString info() const;\r\n    virtual QString placeholderText() const;\r\n    virtual void activate();\r\n    virtual QAbstractItemModel *model() const;\r\n    virtual QModelIndex rootIndex() const;\r\n    virtual void updateModel();\r\n    virtual QModelIndex filterChanged(const QString &text);\r\n    virtual void indexChanged(const QModelIndex &index);\r\n    virtual bool selected(const QString &text, const QModelIndex &index);\r\n    virtual void cancel();\r\n    void startFindThread();\r\npublic slots:\r\n    void findResult(const QStringList &fileList);\r\nprotected:\r\n    LiteApi::IApplication *m_liteApp;\r\n    FindFilesThread *m_thread;\r\n    QStandardItemModel *m_model;\r\n    QStandardItemModel *m_filesModel;\r\n    QSortFilterProxyModel *m_proxyModel;\r\n    QStringList        m_editors;\r\n    Qt::CaseSensitivity m_matchCase;\r\n    int                 m_maxCount;\r\n};\r\n\r\n#endif // QUICKOPENFILES_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenfilesystem.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: quickopenfilesystem.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"quickopenfilesystem.h\"\n#include \"folderview/filesystemmodelex.h\"\n#include \"folderview/dirsortfilterproxymodel.h\"\n#include <QFileSystemModel>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nQuickOpenFileSystem::QuickOpenFileSystem(LiteApi::IApplication *app, QObject *parent) : LiteApi::IQuickOpenFileSystem(parent)\n{\n    m_liteApp = app;\n    m_model = new FileSystemModelEx(this);\n    bool proxyMode = false;\n#ifdef Q_OS_MAC\n    proxyMode = true;\n#endif\n    if (proxyMode) {\n        m_proxy = new FileSystemProxyModel(this);\n        m_proxy->setSourceModel(m_model);\n        m_proxy->sort(0);\n    } else {\n        m_proxy = 0;\n    }\n}\n\nQString QuickOpenFileSystem::id() const\n{\n    return \"quickopen/filesystem\";\n}\n\nQString QuickOpenFileSystem::placeholderText() const\n{\n    return m_placehoderText;\n}\n\nvoid QuickOpenFileSystem::activate()\n{\n\n}\n\nQAbstractItemModel *QuickOpenFileSystem::model() const\n{\n    if (m_proxy) {\n        return m_proxy;\n    }\n    return m_model;\n}\n\nQModelIndex QuickOpenFileSystem::rootIndex() const\n{\n    if (m_proxy) {\n        return m_proxy->mapFromSource(m_rootIndex);\n    }\n    return m_rootIndex;\n}\n\nvoid QuickOpenFileSystem::updateModel()\n{\n\n}\n\nQModelIndex QuickOpenFileSystem::filterChanged(const QString &text)\n{\n    int count = m_model->rowCount(m_rootIndex);\n    for (int i = 0; i < count; i++) {\n        QModelIndex index = m_model->index(i,0,m_rootIndex);\n        if (m_model->fileName(index).startsWith(text,Qt::CaseInsensitive)) {\n            if (m_proxy) {\n                return m_proxy->mapFromSource(index);\n            }\n            return index;\n        }\n    }\n    return QModelIndex();\n}\n\nvoid QuickOpenFileSystem::cancel()\n{\n\n}\n\nvoid QuickOpenFileSystem::setRootPath(const QString &path)\n{\n    m_rootIndex = m_model->setRootPath(path);\n}\n\nvoid QuickOpenFileSystem::setPlaceholderText(const QString &text)\n{\n    m_placehoderText = text;\n}\n\nQModelIndex QuickOpenFileSystem::indexForPath(const QString &filePath) const\n{\n    QModelIndex index = m_model->index(filePath,0);\n    if (m_proxy) {\n        index = m_proxy->mapFromSource(index);\n    }\n    return index;\n}\n\nQString QuickOpenFileSystem::pathForIndex(const QModelIndex &index) const\n{\n    QModelIndex i = index;\n    if (m_proxy) {\n        i = m_proxy->mapToSource(index);\n    }\n    return m_model->filePath(index);\n}\n\nbool QuickOpenFileSystem::selected(const QString &/*text*/, const QModelIndex &index)\n{\n    if (!index.isValid()) {\n        return false;\n    }\n    QModelIndex fileIndex = index;\n    if (m_proxy) {\n        fileIndex = m_proxy->mapToSource(index);\n    }\n    if (m_model->isDir(fileIndex)) {\n        return false;\n    }\n    QString filePath = m_model->filePath(fileIndex);\n    if (!m_liteApp->fileManager()->openFile(filePath)) {\n        return false;\n    }\n    return true;\n}\n\nvoid QuickOpenFileSystem::indexChanged(const QModelIndex &index)\n{\n\n}\n\nQString QuickOpenFileSystem::info() const\n{\n    return tr(\"File System\");\n}\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenfilesystem.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: quickopenfilesystem.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef QUICKOPENFILESYSTEM_H\n#define QUICKOPENFILESYSTEM_H\n\n#include \"quickopenapi/quickopenapi.h\"\n\nclass QFileSystemModel;\nclass QSortFilterProxyModel;\nclass FileSystemModelEx;\nclass QuickOpenFileSystem : public LiteApi::IQuickOpenFileSystem\n{\n    Q_OBJECT\npublic:\n    QuickOpenFileSystem(LiteApi::IApplication *app, QObject *parent);\n    virtual QString id() const;\n    virtual QString info() const;\n    virtual QString placeholderText() const;\n    virtual void activate();\n    virtual QAbstractItemModel *model() const;\n    virtual QModelIndex rootIndex() const;\n    virtual void updateModel();\n    virtual QModelIndex filterChanged(const QString &text);\n    virtual void indexChanged(const QModelIndex &index);\n    virtual bool selected(const QString &text, const QModelIndex &index);\n    virtual void cancel();\n    virtual void setRootPath(const QString &path);\n    virtual void setPlaceholderText(const QString &text);\n    virtual QModelIndex indexForPath(const QString &indexForPath) const;\n    virtual QString pathForIndex(const QModelIndex &index) const;\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    FileSystemModelEx *m_model;\n    QSortFilterProxyModel *m_proxy;\n    QModelIndex m_rootIndex;\n    QString m_placehoderText;\n};\n\n#endif // QUICKOPENFILESYSTEM_H\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenfolder.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2018 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenfolder.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"quickopenfolder.h\"\r\n#include \"quickopen_global.h\"\r\n#include <QStandardItemModel>\r\n#include <QStandardItem>\r\n#include <QSortFilterProxyModel>\r\n#include <QDir>\r\n#include <QFileInfo>\r\n#include <QTimer>\r\n#include <QApplication>\r\n#include <QDebug>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nQuickOpenFolder::QuickOpenFolder(LiteApi::IApplication *app, QObject *parent)\r\n    : LiteApi::IQuickOpenFolder(parent), m_liteApp(app)\r\n{\r\n    m_model = new QStandardItemModel(this);\r\n    m_proxyModel = new QSortFilterProxyModel(this);\r\n    m_proxyModel->setSourceModel(m_model);\r\n    m_matchCase = Qt::CaseInsensitive;\r\n    m_maxCount = 100000;\r\n    m_thread = new FindFilesThread(this);\r\n    connect(m_thread,SIGNAL(findResult(QStringList)),this,SLOT(findResult(QStringList)));\r\n}\r\n\r\nQuickOpenFolder::~QuickOpenFolder()\r\n{\r\n    if (m_thread) {\r\n        m_thread->stop();\r\n        delete m_thread;\r\n    }\r\n}\r\n\r\nQString QuickOpenFolder::id() const\r\n{\r\n    return \"quickopen/folder\";\r\n}\r\n\r\nQString QuickOpenFolder::info() const\r\n{\r\n    return tr(\"Browser Folder\");\r\n}\r\n\r\nQString QuickOpenFolder::placeholderText() const\r\n{\r\n    return m_placeholderText;\r\n}\r\n\r\nvoid QuickOpenFolder::activate()\r\n{\r\n}\r\n\r\nQAbstractItemModel *QuickOpenFolder::model() const\r\n{\r\n    return m_proxyModel;\r\n}\r\n\r\nQModelIndex QuickOpenFolder::rootIndex() const\r\n{\r\n    return QModelIndex();\r\n}\r\n\r\nvoid QuickOpenFolder::updateModel()\r\n{\r\n    m_maxCount = m_liteApp->settings()->value(QUICKOPEN_FOLDER_MAXCOUNT,100000).toInt();\r\n    m_matchCase = m_liteApp->settings()->value(QUICKOPNE_FOLDER_MATCHCASE,false).toBool() ? Qt::CaseSensitive : Qt::CaseInsensitive;\r\n\r\n    m_model->clear();\r\n    m_proxyModel->setFilterFixedString(\"\");\r\n    m_proxyModel->setFilterKeyColumn(2);\r\n    m_proxyModel->setFilterCaseSensitivity(m_matchCase);\r\n\r\n    startFindThread();\r\n}\r\n\r\nvoid QuickOpenFolder::startFindThread()\r\n{\r\n    QSet<QString> extSet;\r\n    foreach(LiteApi::IMimeType* type, m_liteApp->mimeTypeManager()->mimeTypeList()) {\r\n        foreach (QString ext, type->allPatterns()) {\r\n            if (ext.startsWith(\".\")) {\r\n                extSet << ext.mid(1);\r\n            } else if (ext.startsWith(\"*.\")) {\r\n                extSet << ext.mid(2);\r\n            }\r\n        }\r\n    }\r\n\r\n    int count = m_model->rowCount();\r\n    int maxcount = count+m_liteApp->settings()->value(QUICKOPEN_FOLDER_MAXCOUNT,100000).toInt();\r\n    QSet<QString> editorSet;\r\n\r\n    QStringList folderList;\r\n    folderList << m_folder;\r\n    m_thread->setFolderList(folderList,extSet,editorSet,maxcount);\r\n\r\n    m_thread->stop();\r\n    m_thread->start();\r\n}\r\n\r\nvoid QuickOpenFolder::findResult(const QStringList &fileList)\r\n{\r\n    foreach (QString filePath, fileList) {\r\n        m_model->appendRow(QList<QStandardItem*>() << new QStandardItem(QFileInfo(filePath).fileName()) << new QStandardItem(filePath));\r\n    }\r\n}\r\n\r\nQModelIndex QuickOpenFolder::filterChanged(const QString &text)\r\n{\r\n    m_proxyModel->setFilterFixedString(text);\r\n\r\n    for(int i = 0; i < m_proxyModel->rowCount(); i++) {\r\n        QModelIndex index = m_proxyModel->index(i,0);\r\n        QString name = index.data().toString();\r\n        if (name.startsWith(text,m_matchCase)) {\r\n            return index;\r\n        }\r\n    }\r\n    if (m_proxyModel->rowCount() > 0)\r\n        return m_proxyModel->index(0,0);\r\n    return QModelIndex();\r\n}\r\n\r\nvoid QuickOpenFolder::indexChanged(const QModelIndex &/*index*/)\r\n{\r\n}\r\n\r\nbool QuickOpenFolder::selected(const QString &/*text*/, const QModelIndex &index)\r\n{\r\n    if (!index.isValid()) {\r\n        return false;\r\n    }\r\n    QString filePath = m_proxyModel->index(index.row(),1).data().toString();\r\n    if (!m_liteApp->fileManager()->openFile(filePath)) {\r\n        return false;\r\n    }\r\n    return true;\r\n}\r\n\r\nvoid QuickOpenFolder::cancel()\r\n{\r\n    m_thread->stop();\r\n}\r\n\r\nvoid QuickOpenFolder::setFolder(const QString &folder)\r\n{\r\n    m_folder = folder;\r\n}\r\n\r\nvoid QuickOpenFolder::setPlaceholderText(const QString &text)\r\n{\r\n    m_placeholderText = text;\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenfolder.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2018 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenfolder.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef QUICKOPENFOLDER_H\r\n#define QUICKOPENFOLDER_H\r\n\r\n#include \"quickopenapi/quickopenapi.h\"\r\n#include \"fileutil/findfilesthread.h\"\r\n\r\nclass QStandardItemModel;\r\nclass QSortFilterProxyModel;\r\n\r\nclass QuickOpenFolder : public LiteApi::IQuickOpenFolder\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    QuickOpenFolder(LiteApi::IApplication *app, QObject *parent = 0);\r\n    virtual ~QuickOpenFolder();\r\n    virtual QString id() const;\r\n    virtual QString info() const;\r\n    virtual QString placeholderText() const;\r\n    virtual void activate();\r\n    virtual QAbstractItemModel *model() const;\r\n    virtual QModelIndex rootIndex() const;\r\n    virtual void updateModel();\r\n    virtual QModelIndex filterChanged(const QString &text);\r\n    virtual void indexChanged(const QModelIndex &index);\r\n    virtual bool selected(const QString &text, const QModelIndex &index);\r\n    virtual void cancel();\r\n    virtual void setFolder(const QString &folder);\r\n    virtual void setPlaceholderText(const QString &text);\r\npublic slots:\r\n    void findResult(const QStringList &fileList);\r\nprotected:\r\n    void startFindThread();\r\n    LiteApi::IApplication *m_liteApp;\r\n    FindFilesThread *m_thread;\r\n    QStandardItemModel *m_model;\r\n    QSortFilterProxyModel *m_proxyModel;\r\n    Qt::CaseSensitivity m_matchCase;\r\n    int                 m_maxCount;\r\n    QString             m_folder;\r\n    QString             m_placeholderText;\r\n};\r\n\r\n#endif // QUICKOPENFOLDER_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenhelp.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenhelp.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"quickopenhelp.h\"\r\n#include <QStandardItemModel>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nQuickOpenHelp::QuickOpenHelp(LiteApi::IApplication *app, QObject *parent)\r\n    : LiteApi::IQuickOpen(parent), m_liteApp(app)\r\n{\r\n    m_model = new QStandardItemModel(this);\r\n}\r\n\r\nQString QuickOpenHelp::id() const\r\n{\r\n    return \"quickopen/help\";\r\n}\r\n\r\nQString QuickOpenHelp::info() const\r\n{\r\n    return tr(\"Show All Quick Open Actions\");\r\n}\r\n\r\nQString QuickOpenHelp::placeholderText() const\r\n{\r\n    return QString();\r\n}\r\n\r\nvoid QuickOpenHelp::activate()\r\n{\r\n\r\n}\r\n\r\nQAbstractItemModel *QuickOpenHelp::model() const\r\n{\r\n    return m_model;\r\n}\r\n\r\nQModelIndex QuickOpenHelp::rootIndex() const\r\n{\r\n    return QModelIndex();\r\n}\r\n\r\nvoid QuickOpenHelp::updateModel()\r\n{\r\n    LiteApi::IQuickOpenManager *mgr = LiteApi::getQuickOpenManager(m_liteApp);\r\n    m_model->clear();\r\n    QMapIterator<QString,LiteApi::IQuickOpen*> i(mgr->symFilterMap());\r\n    while(i.hasNext()) {\r\n        i.next();\r\n        if (i.value() == this) {\r\n            continue;\r\n        }\r\n        m_model->appendRow(QList<QStandardItem*>() << new QStandardItem(i.key()) << new QStandardItem(i.value()->info()));\r\n    }\r\n}\r\n\r\nQModelIndex QuickOpenHelp::filterChanged(const QString &text)\r\n{\r\n    if (!text.isEmpty()) {\r\n        LiteApi::IQuickOpenManager *mgr = LiteApi::getQuickOpenManager(m_liteApp);\r\n        LiteApi::IQuickOpen *p = mgr->findBySymbol(text);\r\n        if (p) {\r\n            mgr->showBySymbol(text);\r\n        }\r\n    }\r\n    return m_model->index(0,0);\r\n}\r\n\r\nvoid QuickOpenHelp::indexChanged(const QModelIndex &/*index*/)\r\n{\r\n}\r\n\r\nbool QuickOpenHelp::selected(const QString &/*text*/, const QModelIndex &index)\r\n{\r\n    if (!index.isValid()) {\r\n        return false;\r\n    }\r\n    QString key = index.data(0).toString();\r\n    LiteApi::IQuickOpenManager *mgr = LiteApi::getQuickOpenManager(m_liteApp);\r\n    mgr->showBySymbol(key);\r\n    return false;\r\n}\r\n\r\nvoid QuickOpenHelp::cancel()\r\n{\r\n\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenhelp.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenhelp.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef QUICKOPENHELP_H\r\n#define QUICKOPENHELP_H\r\n\r\n#include \"quickopenapi/quickopenapi.h\"\r\n\r\nclass QStandardItemModel;\r\nclass QuickOpenHelp : public LiteApi::IQuickOpen\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    QuickOpenHelp(LiteApi::IApplication *app, QObject *parent);\r\n    virtual QString id() const;\r\n    virtual QString info() const;\r\n    virtual QString placeholderText() const;\r\n    virtual void activate();\r\n    virtual QAbstractItemModel *model() const;\r\n    virtual QModelIndex rootIndex() const;\r\n    virtual void updateModel();\r\n    virtual QModelIndex filterChanged(const QString &text);\r\n    virtual void indexChanged(const QModelIndex &index);\r\n    virtual bool selected(const QString &text, const QModelIndex &index);\r\n    virtual void cancel();\r\nprotected:\r\n    LiteApi::IApplication *m_liteApp;\r\n    QStandardItemModel    *m_model;\r\n    bool update(const QString &text);\r\n};\r\n\r\n#endif // QUICKOPENHELP_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenlines.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenlines.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"quickopenlines.h\"\r\n#include <QStandardItemModel>\r\n#include <QTextDocument>\r\n#include <QDebug>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nQuickOpenLines::QuickOpenLines(LiteApi::IApplication *app, QObject *parent)\r\n    : LiteApi::IQuickOpen(parent), m_liteApp(app)\r\n{\r\n    m_model = new QStandardItemModel(this);\r\n}\r\n\r\nQString QuickOpenLines::id() const\r\n{\r\n    return \"quickopen/lines\";\r\n}\r\n\r\nQString QuickOpenLines::info() const\r\n{\r\n    return tr(\"Go to Line\");\r\n}\r\n\r\nQString QuickOpenLines::placeholderText() const\r\n{\r\n    return QString();\r\n}\r\n\r\nvoid QuickOpenLines::activate()\r\n{\r\n\r\n}\r\n\r\nQAbstractItemModel *QuickOpenLines::model() const\r\n{\r\n    return m_model;\r\n}\r\n\r\nQModelIndex QuickOpenLines::rootIndex() const\r\n{\r\n    return QModelIndex();\r\n}\r\n\r\nbool QuickOpenLines::update(const QString &text)\r\n{\r\n    m_model->clear();\r\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\r\n    if (!editor) {\r\n        m_model->appendRow(new QStandardItem(tr(\"Open a text file first to go to a line\")));\r\n        return false;\r\n    }\r\n    LiteApi::ITextEditor *textEditor = LiteApi::getTextEditor(editor);\r\n    if (!textEditor) {\r\n        m_model->appendRow(new QStandardItem(tr(\"Open a text file first to go to a line\")));\r\n        return false;\r\n    }\r\n    int maxcount = textEditor->document()->blockCount();\r\n    bool ok = false;\r\n    int line = 0;\r\n    if (!text.isEmpty()) {\r\n        line = text.toInt(&ok);\r\n    }\r\n    if (line <= 0 || line > maxcount) {\r\n        ok = false;\r\n    }\r\n    if (!ok) {\r\n        m_model->appendRow(new QStandardItem(QString(tr(\"Type a line number between %1 and %2 to navigate to\")).arg(1).arg(maxcount)));\r\n        return false;\r\n    }\r\n    m_model->appendRow(new QStandardItem(QString(tr(\"Go to Line %1\")).arg(line)));\r\n    return true;\r\n}\r\n\r\nvoid QuickOpenLines::updateModel()\r\n{\r\n    update(\"\");\r\n}\r\n\r\nQModelIndex QuickOpenLines::filterChanged(const QString &text)\r\n{\r\n    update(text);\r\n    return m_model->index(0,0);\r\n}\r\n\r\nvoid QuickOpenLines::indexChanged(const QModelIndex &/*index*/)\r\n{\r\n\r\n}\r\n\r\nbool QuickOpenLines::selected(const QString &text, const QModelIndex &/*index*/)\r\n{\r\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\r\n    if (!editor) {\r\n        return false;\r\n    }\r\n    LiteApi::ITextEditor *textEditor = LiteApi::getTextEditor(editor);\r\n    if (!textEditor) {\r\n        return false;\r\n    }\r\n    int maxcount = textEditor->document()->blockCount();\r\n    bool ok = false;\r\n    int line = 0;\r\n    if (!text.isEmpty()) {\r\n        line = text.toInt(&ok);\r\n    }\r\n    if (!ok) {\r\n        return false;\r\n    }\r\n    if (line <= 0 || line > maxcount) {\r\n        return false;\r\n    }\r\n    if (line-1 != textEditor->line()) {\r\n        m_liteApp->editorManager()->addNavigationHistory();\r\n    }\r\n    textEditor->gotoLine(line-1,0,true);\r\n    return true;\r\n}\r\n\r\nvoid QuickOpenLines::cancel()\r\n{\r\n\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenlines.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenlines.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef QUICKOPENLINES_H\r\n#define QUICKOPENLINES_H\r\n\r\n#include \"quickopenapi/quickopenapi.h\"\r\n\r\nclass QStandardItemModel;\r\nclass QuickOpenLines : public LiteApi::IQuickOpen\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    QuickOpenLines(LiteApi::IApplication *app, QObject *parent);\r\n    virtual QString id() const;\r\n    virtual QString info() const;\r\n    virtual QString placeholderText() const;\r\n    virtual void activate();\r\n    virtual QAbstractItemModel *model() const;\r\n    virtual QModelIndex rootIndex() const;\r\n    virtual void updateModel();\r\n    virtual QModelIndex filterChanged(const QString &text);\r\n    virtual void indexChanged(const QModelIndex &index);\r\n    virtual bool selected(const QString &text, const QModelIndex &index);\r\n    virtual void cancel();\r\nprotected:\r\n    LiteApi::IApplication *m_liteApp;\r\n    QStandardItemModel    *m_model;\r\n    bool update(const QString &text);\r\n};\r\n\r\n#endif // QUICKOPENLINES_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenmanager.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenmanager.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"quickopenmanager.h\"\r\n#include \"quickopen_global.h\"\r\n#include \"quickopenfiles.h\"\r\n#include \"quickopenfolder.h\"\r\n#include \"quickopeneditor.h\"\r\n#include \"quickopenmimetype.h\"\r\n#include \"quickopenaction.h\"\r\n#include \"quickopenhelp.h\"\r\n#include \"quickopenfilesystem.h\"\r\n#include \"liteapi/liteids.h\"\r\n#include <QTreeView>\r\n#include <QDebug>\r\n\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nQuickOpenManager::QuickOpenManager(QObject *parent) : LiteApi::IQuickOpenManager(parent)\r\n{\r\n\r\n}\r\n\r\nbool QuickOpenManager::initWithApp(IApplication *app)\r\n{\r\n    if (!IQuickOpenManager::initWithApp(app)) {\r\n        return false;\r\n    }\r\n\r\n    m_liteApp->extension()->addObject(\"LiteApi.IQuickOpenManager\",this);\r\n\r\n    m_widget = new QuickOpenWidget(m_liteApp,m_liteApp->mainWindow());\r\n\r\n    connect(m_widget,SIGNAL(filterChanged(QString)),this,SLOT(filterChanged(QString)));\r\n    connect(m_widget->editor(),SIGNAL(returnPressed()),this,SLOT(selected()));\r\n    connect(m_widget->view(),SIGNAL(clicked(QModelIndex)),this,SLOT(selected()));\r\n    connect(m_widget->view(),SIGNAL(activated(QModelIndex)),this,SLOT(selected()));\r\n    connect(m_widget,SIGNAL(hideWidget()),this,SLOT(hideWidget()));\r\n    connect(m_widget,SIGNAL(indexChanage(QModelIndex)),this,SLOT(indexChanage(QModelIndex)));\r\n\r\n    m_quickOpenFiles = new QuickOpenFiles(app,this);\r\n    m_quickOpenFolder = new QuickOpenFolder(app,this);\r\n    m_quickOpenFileSystem = new QuickOpenFileSystem(app,this);\r\n\r\n    this->addFilter(\"\",m_quickOpenFiles);\r\n    this->addFilter(\"\",m_quickOpenFolder);\r\n    this->addFilter(\"\",m_quickOpenFileSystem);\r\n    this->addFilter(\"~\",new QuickOpenEditor(m_liteApp,this));\r\n    this->addFilter(\">\",new QuickOpenAction(m_liteApp,this));\r\n    this->addFilter(\"?\",new QuickOpenHelp(m_liteApp,this));\r\n\r\n    this->registerQuickOpenMimeType(\"@\");\r\n\r\n    m_quickOpenAct = new QAction(tr(\"Quick Open File\"),this);\r\n    m_quickOpenEditAct = new QAction(tr(\"Quick Open Editor\"),this);\r\n    m_quickOpenSymbolAct = new QAction(tr(\"Quick Open Symbol\"),this);\r\n    m_quickOpenActionAct = new QAction(tr(\"Quick Open Command\"),this);\r\n    m_quickOpenHelpAct = new QAction(tr(\"Show All Quick Open Actions\"),this);\r\n\r\n    m_liteApp->actionManager()->setViewMenuSeparator(\"sep/quickopen\",true);\r\n\r\n    LiteApi::IActionContext *context = m_liteApp->actionManager()->getActionContext(m_liteApp,\"App\");\r\n    context->regAction(m_quickOpenAct,\"QuickOpen\",\"CTRL+P\");\r\n    context->regAction(m_quickOpenEditAct,\"QuickOpenEditor\",\"CTRL+ALT+P\");\r\n    context->regAction(m_quickOpenActionAct,\"QuickOpenCommand\",\"CTRL+SHIFT+P\");\r\n    context->regAction(m_quickOpenSymbolAct,\"QuickOpenSymbol\",\"CTRL+SHIFT+O\");\r\n    context->regAction(m_quickOpenHelpAct,\"QuickOpenHelp\",\"\");\r\n\r\n    m_liteApp->actionManager()->insertMenuActions(ID_MENU_TOOLS,\"sep/quickopen\",true, QList<QAction*>()\r\n                                                  << m_quickOpenAct\r\n                                                  << m_quickOpenActionAct\r\n                                                  << m_quickOpenEditAct\r\n                                                  << m_quickOpenSymbolAct\r\n                                                  << m_quickOpenHelpAct );\r\n\r\n    connect(m_quickOpenAct,SIGNAL(triggered(bool)),this,SLOT(quickOpen()));\r\n    connect(m_quickOpenEditAct,SIGNAL(triggered(bool)),this,SLOT(quickOpenEditor()));\r\n    connect(m_quickOpenSymbolAct,SIGNAL(triggered(bool)),this,SLOT(quickOpenSymbol()));\r\n    connect(m_quickOpenActionAct,SIGNAL(triggered(bool)),this,SLOT(quickOpenCommand()));\r\n    connect(m_quickOpenHelpAct,SIGNAL(triggered(bool)),this,SLOT(quickOpenHelp()));\r\n\r\n    connect(m_liteApp,SIGNAL(aboutToQuit()),this,SLOT(appAboutToQuit()));\r\n\r\n    return true;\r\n}\r\n\r\nvoid QuickOpenManager::addFilter(const QString &sym, IQuickOpen *filter)\r\n{\r\n    if (filter == 0) {\r\n        return;\r\n    }\r\n    if (m_filterList.contains(filter)) {\r\n        return;\r\n    }\r\n    m_filterList.push_back(filter);\r\n    if (!sym.isEmpty()) {\r\n        m_symFilterMap.insert(sym,filter);\r\n    }\r\n}\r\n\r\nvoid QuickOpenManager::removeFilter(IQuickOpen *filter)\r\n{\r\n    m_filterList.removeAll(filter);\r\n    QMutableMapIterator<QString,IQuickOpen*> i(m_symFilterMap);\r\n    while (i.hasNext()) {\r\n        i.next();\r\n        if (i.value() == filter) {\r\n            m_symFilterMap.remove(i.key());\r\n            break;\r\n        }\r\n    }\r\n}\r\n\r\nQList<IQuickOpen *> QuickOpenManager::filterList() const\r\n{\r\n    return m_filterList;\r\n}\r\n\r\nQMap<QString, IQuickOpen *> QuickOpenManager::symFilterMap() const\r\n{\r\n    return m_symFilterMap;\r\n}\r\n\r\nvoid QuickOpenManager::setCurrentFilter(IQuickOpen *filter)\r\n{\r\n    if (filter) {\r\n        filter->activate();\r\n        m_widget->editor()->setPlaceholderText(filter->placeholderText());\r\n    }\r\n    if (m_currentFilter == filter) {\r\n        return;\r\n    }\r\n    m_currentFilter = filter;\r\n    if (m_currentFilter) {\r\n        m_sym = m_symFilterMap.key(filter);\r\n        m_widget->setModel(m_currentFilter->model(),m_currentFilter->rootIndex());\r\n    }\r\n}\r\n\r\nIQuickOpen *QuickOpenManager::currentFilter() const\r\n{\r\n    return m_currentFilter;\r\n}\r\n\r\nQModelIndex QuickOpenManager::currentIndex() const\r\n{\r\n    return m_widget->view()->currentIndex();\r\n}\r\n\r\nvoid QuickOpenManager::showById(const QString &id)\r\n{\r\n    IQuickOpen *i = findById(id);\r\n    if (i) {\r\n        setCurrentFilter(i);\r\n        showPopup();\r\n    }\r\n}\r\n\r\nvoid QuickOpenManager::showBySymbol(const QString &sym)\r\n{\r\n    IQuickOpen *i = findBySymbol(sym);\r\n    if (i == 0) {\r\n        i = m_quickOpenFiles;\r\n    }\r\n    if (i) {\r\n        setCurrentFilter(i);\r\n        showPopup();\r\n    }\r\n}\r\n\r\nIQuickOpen *QuickOpenManager::findById(const QString &id)\r\n{\r\n    foreach (LiteApi::IQuickOpen *filter, m_filterList) {\r\n        if (filter->id() == id) {\r\n            return filter;\r\n        }\r\n    }\r\n    return 0;\r\n}\r\n\r\nIQuickOpen *QuickOpenManager::findBySymbol(const QString &sym)\r\n{\r\n    QMutableMapIterator<QString,IQuickOpen*> i(m_symFilterMap);\r\n    while (i.hasNext()) {\r\n        i.next();\r\n        if (i.key() == sym) {\r\n            return i.value();\r\n        }\r\n    }\r\n    return 0;\r\n}\r\n\r\nQWidget *QuickOpenManager::widget() const\r\n{\r\n    return m_widget;\r\n}\r\n\r\nQTreeView *QuickOpenManager::modelView() const\r\n{\r\n    return m_widget->view();\r\n}\r\n\r\nQLineEdit *QuickOpenManager::lineEdit() const\r\n{\r\n    return m_widget->editor();\r\n}\r\n\r\nvoid QuickOpenManager::setTempToolBar(QToolBar *toolBar)\r\n{\r\n    m_widget->setTempToolBar(toolBar);\r\n}\r\n\r\nbool QuickOpenManager::showOpenFolder(const QString &folder, QPoint *pos)\r\n{\r\n    m_quickOpenFolder->setFolder(folder);\r\n\r\n    this->setCurrentFilter(m_quickOpenFolder);\r\n\r\n    this->showPopup(pos);\r\n\r\n    return true;\r\n}\r\n\r\nIQuickOpenMimeType *QuickOpenManager::registerQuickOpenMimeType(const QString &sym)\r\n{\r\n    IQuickOpenMimeType *symbol = m_quickOpenSymbolMap[sym];\r\n    if (!symbol) {\r\n        symbol = new QuickOpenMimeType(m_liteApp,this);\r\n        this->addFilter(sym,symbol);\r\n        m_quickOpenSymbolMap[sym] = symbol;\r\n    }\r\n    return symbol;\r\n}\r\n\r\nvoid QuickOpenManager::quickOpen()\r\n{\r\n    m_updateMap.clear();\r\n    QString sym;\r\n    QAction *act = (QAction*)sender();\r\n    if (act) {\r\n        sym = act->data().toString();\r\n    }\r\n    showBySymbol(sym);\r\n}\r\n\r\nvoid QuickOpenManager::quickOpenEditor()\r\n{\r\n    showById(\"quickopen/editor\");\r\n}\r\n\r\nvoid QuickOpenManager::quickOpenSymbol()\r\n{\r\n    showById(\"quickopen/symbol\");\r\n}\r\n\r\nvoid QuickOpenManager::quickOpenCommand()\r\n{\r\n    showById(\"quickopen/command\");\r\n}\r\n\r\nvoid QuickOpenManager::quickOpenHelp()\r\n{\r\n    showById(\"quickopen/help\");\r\n}\r\n\r\nvoid QuickOpenManager::updateModel()\r\n{\r\n    if (!m_currentFilter) {\r\n        return;\r\n    }\r\n    if (m_updateMap.value(m_currentFilter)) {\r\n        return;\r\n    }\r\n    m_updateMap.insert(m_currentFilter,true);\r\n    m_currentFilter->updateModel();\r\n    m_widget->view()->resizeColumnToContents(0);\r\n}\r\n\r\nvoid QuickOpenManager::showPopup(QPoint *pos)\r\n{\r\n    updateModel();\r\n    m_widget->editor()->setText(m_sym);\r\n    m_widget->showView(pos);\r\n}\r\n\r\nvoid QuickOpenManager::hideWidget()\r\n{\r\n    if (m_currentFilter) {\r\n        m_currentFilter->cancel();\r\n    }\r\n    m_currentFilter = 0;\r\n    m_updateMap.clear();\r\n    m_sym.clear();\r\n}\r\n\r\nvoid QuickOpenManager::hidePopup()\r\n{\r\n    m_widget->closeWidget();\r\n}\r\n\r\nvoid QuickOpenManager::filterChanged(const QString &text)\r\n{\r\n    bool checkSym = false;\r\n    if (m_currentFilter == m_quickOpenFiles) {\r\n        checkSym = true;\r\n    } else if (!m_sym.isEmpty()) {\r\n        checkSym = true;\r\n    }\r\n    // check register symbol qucik open\r\n    if (checkSym) {\r\n        IQuickOpen *quick = 0;\r\n        if (!text.isEmpty()) {\r\n            QMapIterator<QString,IQuickOpen*> i(m_symFilterMap);\r\n            while (i.hasNext()) {\r\n                i.next();\r\n                if (i.key().isEmpty()) {\r\n                    continue;\r\n                }\r\n                if (text.startsWith(i.key())) {\r\n                    quick = i.value();\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n        if (quick == 0)  {\r\n            quick = m_quickOpenFiles;\r\n        }\r\n        if (quick != m_currentFilter) {\r\n            this->setCurrentFilter(quick);\r\n            updateModel();\r\n        }\r\n    }\r\n    if (m_currentFilter) {\r\n        QModelIndex index = m_currentFilter->filterChanged(text.mid(m_sym.size()));\r\n        m_widget->view()->setCurrentIndex(index);\r\n        m_widget->view()->scrollTo(index);\r\n    }\r\n}\r\n\r\nvoid QuickOpenManager::indexChanage(const QModelIndex &index)\r\n{\r\n    if (m_currentFilter) {\r\n        m_currentFilter->indexChanged(index);\r\n    }\r\n}\r\n\r\nvoid QuickOpenManager::selected()\r\n{\r\n    if (!m_currentFilter) {\r\n        return;\r\n    }\r\n    QString text = m_widget->editor()->text();\r\n    QModelIndex index = m_widget->view()->currentIndex();\r\n    if (index.isValid() && m_widget->view()->model()->hasChildren(index)) {\r\n        bool expand = m_widget->view()->isExpanded(index);\r\n        m_widget->view()->setExpanded(index,!expand);\r\n        return;\r\n    }\r\n\r\n    if (!m_currentFilter->selected(text.mid(m_sym.size()),index)) {\r\n        return;\r\n    }\r\n    hidePopup();\r\n}\r\n\r\nvoid QuickOpenManager::appAboutToQuit()\r\n{\r\n    hidePopup();\r\n}\r\n\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenmanager.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenmanager.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef QUICKOPENMANAGER_H\r\n#define QUICKOPENMANAGER_H\r\n\r\n#include \"liteapi/liteapi.h\"\r\n#include \"quickopenapi/quickopenapi.h\"\r\n#include \"quickopenwidget.h\"\r\n\r\n#include <QPointer>\r\n\r\nusing namespace LiteApi;\r\n\r\nclass QuickOpenFiles;\r\nclass QuickOpenFolder;\r\nclass QuickOpenFileSystem;\r\nclass QuickOpenManager : public IQuickOpenManager\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    QuickOpenManager(QObject *parent = 0);\r\n    virtual bool initWithApp(IApplication *app);\r\npublic:\r\n    virtual void addFilter(const QString &sym, IQuickOpen *filter);\r\n    virtual void removeFilter(IQuickOpen *filter);\r\n    virtual QList<IQuickOpen*> filterList() const;\r\n    virtual QMap<QString, IQuickOpen *> symFilterMap() const;\r\n    virtual void setCurrentFilter(IQuickOpen *filter);\r\n    virtual IQuickOpen *currentFilter() const;\r\n    virtual QModelIndex currentIndex() const;\r\n    virtual void showById(const QString &id);\r\n    virtual void showBySymbol(const QString &sym);\r\n    virtual IQuickOpen *findById(const QString &id);\r\n    virtual IQuickOpen *findBySymbol(const QString &sym);\r\n    virtual QWidget *widget() const;\r\n    virtual QTreeView *modelView() const;\r\n    virtual QLineEdit *lineEdit() const;\r\n    virtual void setTempToolBar(QToolBar *toolBar);\r\n    virtual bool showOpenFolder(const QString &folder, QPoint *pos);\r\npublic:\r\n    virtual IQuickOpenMimeType *registerQuickOpenMimeType(const QString &sym);\r\n    virtual void showPopup(QPoint *pos = 0);\r\n    virtual void hidePopup();\r\npublic slots:\r\n    void quickOpen();\r\n    void quickOpenEditor();\r\n    void quickOpenSymbol();\r\n    void quickOpenCommand();\r\n    void quickOpenHelp();\r\n    void filterChanged(const QString &text);\r\n    void indexChanage(const QModelIndex &index);\r\n    void selected();\r\n    void appAboutToQuit();\r\nprotected slots:\r\n    void hideWidget();\r\nprotected:\r\n    QuickOpenWidget *m_widget;\r\n    QAction     *m_quickOpenAct;\r\n    QAction     *m_quickOpenEditAct;\r\n    QAction     *m_quickOpenSymbolAct;\r\n    QAction     *m_quickOpenActionAct;\r\n    QAction     *m_quickOpenHelpAct;\r\n    QList<IQuickOpen*> m_filterList;\r\n    QMap<QString,IQuickOpen*> m_symFilterMap;\r\n    QMap<IQuickOpen*,bool> m_updateMap;\r\n    QMap<QString,IQuickOpenMimeType*> m_quickOpenSymbolMap;\r\n    QString m_sym;\r\n    QPointer<IQuickOpen> m_currentFilter;\r\n    QuickOpenFiles *m_quickOpenFiles;\r\n    QuickOpenFolder *m_quickOpenFolder;\r\n    QuickOpenFileSystem *m_quickOpenFileSystem;\r\nprotected:\r\n    void updateModel();\r\n};\r\n\r\n#endif // QUICKOPENMANAGER_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenmimetype.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenmimetype.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"quickopenmimetype.h\"\r\n#include <QStandardItemModel>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nQuickOpenMimeType::QuickOpenMimeType(LiteApi::IApplication *app, QObject *parent)\r\n    : LiteApi::IQuickOpenMimeType(parent), m_liteApp(app)\r\n{\r\n    m_model = new QStandardItemModel(this);\r\n    m_id = \"quickopen/symbol\";\r\n    m_info = tr(\"Go to Symbol in File\");\r\n    m_message = tr(\"not found symbol\");\r\n}\r\n\r\nQString QuickOpenMimeType::id() const\r\n{\r\n    return m_id;\r\n}\r\n\r\nQString QuickOpenMimeType::info() const\r\n{\r\n    return m_info;\r\n}\r\n\r\nQString QuickOpenMimeType::placeholderText() const\r\n{\r\n    return QString();\r\n}\r\n\r\nvoid QuickOpenMimeType::activate()\r\n{\r\n    QString mimeType;\r\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\r\n    if (editor) {\r\n        mimeType = editor->mimeType();\r\n    }\r\n    foreach (LiteApi::IQuickOpenAdapter *factory, m_adapterList) {\r\n        LiteApi::IQuickOpen *symbol = factory->load(mimeType);\r\n        if (symbol) {\r\n            m_symbol = symbol;\r\n            m_symbol->activate();\r\n            break;\r\n        }\r\n    }\r\n}\r\n\r\nQAbstractItemModel *QuickOpenMimeType::model() const\r\n{\r\n    if (m_symbol) {\r\n        return m_symbol->model();\r\n    }\r\n    return m_model;\r\n}\r\n\r\nQModelIndex QuickOpenMimeType::rootIndex() const\r\n{\r\n    if (m_symbol) {\r\n        return m_symbol->rootIndex();\r\n    }\r\n    return QModelIndex();\r\n}\r\n\r\nvoid QuickOpenMimeType::updateModel()\r\n{\r\n    if (m_symbol) {\r\n        m_symbol->updateModel();\r\n    } else {\r\n        m_model->clear();\r\n        m_model->appendRow(new QStandardItem(m_message));\r\n    }\r\n}\r\n\r\nQModelIndex QuickOpenMimeType::filterChanged(const QString &text)\r\n{\r\n    if (m_symbol) {\r\n        return m_symbol->filterChanged(text);\r\n    }\r\n    return QModelIndex();\r\n}\r\n\r\nvoid QuickOpenMimeType::indexChanged(const QModelIndex &index)\r\n{\r\n    if (m_symbol) {\r\n        m_symbol->indexChanged(index);\r\n    }\r\n}\r\n\r\nbool QuickOpenMimeType::selected(const QString &text, const QModelIndex &index)\r\n{\r\n    if (m_symbol) {\r\n        return m_symbol->selected(text,index);\r\n    }\r\n    return false;\r\n}\r\n\r\nvoid QuickOpenMimeType::addAdapter(LiteApi::IQuickOpenAdapter *factory)\r\n{\r\n    m_adapterList.push_back(factory);\r\n}\r\n\r\nvoid QuickOpenMimeType::setId(const QString &id)\r\n{\r\n    m_id = id;\r\n}\r\n\r\nvoid QuickOpenMimeType::setInfo(const QString &info)\r\n{\r\n    m_info = info;\r\n}\r\n\r\nvoid QuickOpenMimeType::setNoFoundMessage(const QString &message)\r\n{\r\n    m_message = message;\r\n}\r\n\r\nvoid QuickOpenMimeType::cancel()\r\n{\r\n    if (m_symbol) {\r\n        m_symbol->cancel();\r\n    }\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenmimetype.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenmimetype.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef QUICKOPENMIMETYPE_H\r\n#define QUICKOPENMIMETYPE_H\r\n\r\n#include \"quickopenapi/quickopenapi.h\"\r\n#include <QPointer>\r\n\r\nclass QStandardItemModel;\r\nclass QuickOpenMimeType : public LiteApi::IQuickOpenMimeType\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    QuickOpenMimeType(LiteApi::IApplication *app, QObject *parent);\r\n    virtual QString id() const;\r\n    virtual QString info() const;\r\n    virtual QString placeholderText() const;\r\n    virtual void activate();\r\n    virtual QAbstractItemModel *model() const;\r\n    virtual QModelIndex rootIndex() const;\r\n    virtual void updateModel();\r\n    virtual QModelIndex filterChanged(const QString &text);\r\n    virtual void indexChanged(const QModelIndex &index);\r\n    virtual bool selected(const QString &text, const QModelIndex &index);\r\n    virtual void addAdapter(LiteApi::IQuickOpenAdapter *factory);\r\n    virtual void setId(const QString &id);\r\n    virtual void setInfo(const QString &info);\r\n    virtual void setNoFoundMessage(const QString &message);\r\n    virtual void cancel();\r\nprotected:\r\n    LiteApi::IApplication   *m_liteApp;\r\n    QPointer<LiteApi::IQuickOpen> m_symbol;\r\n    QList<LiteApi::IQuickOpenAdapter*> m_adapterList;\r\n    QStandardItemModel *m_model;\r\n    QString m_id;\r\n    QString m_info;\r\n    QString m_message;\r\n};\r\n\r\n#endif // QUICKOPENMIMETYPE_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenoption.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenoption.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"quickopenoption.h\"\r\n#include \"ui_quickopenoption.h\"\r\n#include \"quickopen_global.h\"\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nQuickOpenOption::QuickOpenOption(LiteApi::IApplication *app,QObject *parent) :\r\n    LiteApi::IOption(parent),\r\n    m_liteApp(app),\r\n    m_widget(new QWidget),\r\n    ui(new Ui::QuickOpenOption)\r\n{\r\n    ui->setupUi(m_widget);\r\n}\r\n\r\nQuickOpenOption::~QuickOpenOption()\r\n{\r\n    delete m_widget;\r\n    delete ui;\r\n}\r\n\r\nQWidget *QuickOpenOption::widget()\r\n{\r\n    return m_widget;\r\n}\r\n\r\nQString QuickOpenOption::name() const\r\n{\r\n    return \"QuickOpen\";\r\n}\r\n\r\nQString QuickOpenOption::mimeType() const\r\n{\r\n    return OPTION_QUICKOPEN;\r\n}\r\n\r\nvoid QuickOpenOption::load()\r\n{\r\n    ui->checkFilesMatchCase->setChecked(m_liteApp->settings()->value(QUICKOPNE_FILES_MATCHCASE,false).toBool());\r\n    ui->checkEditorMatchCase->setChecked(m_liteApp->settings()->value(QUICKOPNE_EDITOR_MATCHCASE,false).toBool());\r\n    ui->spinBoxFilesMaxCount->setValue(m_liteApp->settings()->value(QUICKOPEN_FILES_MAXCOUNT,100000).toInt());\r\n}\r\n\r\nvoid QuickOpenOption::save()\r\n{\r\n    m_liteApp->settings()->setValue(QUICKOPNE_FILES_MATCHCASE,ui->checkFilesMatchCase->isChecked());\r\n    m_liteApp->settings()->setValue(QUICKOPNE_EDITOR_MATCHCASE,ui->checkEditorMatchCase->isChecked());\r\n    m_liteApp->settings()->setValue(QUICKOPEN_FILES_MAXCOUNT,ui->spinBoxFilesMaxCount->value());\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenoption.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenoption.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef QUICKOPENOPTION_H\r\n#define QUICKOPENOPTION_H\r\n\r\n#include \"liteapi/liteapi.h\"\r\n\r\nnamespace Ui {\r\n    class QuickOpenOption;\r\n}\r\n\r\nclass QuickOpenOption : public LiteApi::IOption\r\n{\r\n    Q_OBJECT\r\n\r\npublic:\r\n    explicit QuickOpenOption(LiteApi::IApplication *app, QObject *parent = 0);\r\n    ~QuickOpenOption();\r\n    virtual QWidget *widget();\r\n    virtual QString name() const;\r\n    virtual QString mimeType() const;\r\n    virtual void load();\r\n    virtual void save();\r\nprivate:\r\n    LiteApi::IApplication   *m_liteApp;\r\n    QWidget           *m_widget;\r\n    Ui::QuickOpenOption *ui;\r\n};\r\n\r\n#endif // QUICKOPENOPTION_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenoption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>QuickOpenOption</class>\n <widget class=\"QWidget\" name=\"QuickOpenOption\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>374</width>\n    <height>163</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout_3\">\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox\">\n     <property name=\"title\">\n      <string>QuickOpenFiles</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n      <item>\n       <widget class=\"QCheckBox\" name=\"checkFilesMatchCase\">\n        <property name=\"text\">\n         <string>Match case sensitive</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n        <item>\n         <widget class=\"QLabel\" name=\"label\">\n          <property name=\"text\">\n           <string>Max files count:</string>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <widget class=\"QSpinBox\" name=\"spinBoxFilesMaxCount\">\n          <property name=\"maximum\">\n           <number>10000000</number>\n          </property>\n          <property name=\"singleStep\">\n           <number>1000</number>\n          </property>\n          <property name=\"value\">\n           <number>100000</number>\n          </property>\n         </widget>\n        </item>\n        <item>\n         <spacer name=\"horizontalSpacer\">\n          <property name=\"orientation\">\n           <enum>Qt::Horizontal</enum>\n          </property>\n          <property name=\"sizeHint\" stdset=\"0\">\n           <size>\n            <width>40</width>\n            <height>20</height>\n           </size>\n          </property>\n         </spacer>\n        </item>\n       </layout>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox_2\">\n     <property name=\"title\">\n      <string>QuickOpenEditor</string>\n     </property>\n     <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\n      <item>\n       <widget class=\"QCheckBox\" name=\"checkEditorMatchCase\">\n        <property name=\"text\">\n         <string>Match case sensitive</string>\n        </property>\n       </widget>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <spacer name=\"verticalSpacer\">\n     <property name=\"orientation\">\n      <enum>Qt::Vertical</enum>\n     </property>\n     <property name=\"sizeHint\" stdset=\"0\">\n      <size>\n       <width>20</width>\n       <height>40</height>\n      </size>\n     </property>\n    </spacer>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenoptionfactory.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenoptionfactory.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"quickopenoption.h\"\r\n#include \"quickopenoptionfactory.h\"\r\n#include \"quickopen_global.h\"\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nQuickOpenOptionFactory::QuickOpenOptionFactory(LiteApi::IApplication *app, QObject *parent)\r\n    : LiteApi::IOptionFactory(parent),\r\n      m_liteApp(app)\r\n{\r\n}\r\n\r\nQStringList QuickOpenOptionFactory::mimeTypes() const\r\n{\r\n    return QStringList() << OPTION_QUICKOPEN;\r\n}\r\n\r\nLiteApi::IOption *QuickOpenOptionFactory::create(const QString &mimeType)\r\n{\r\n    if (mimeType == OPTION_QUICKOPEN) {\r\n        return new QuickOpenOption(m_liteApp,this);\r\n    }\r\n    return 0;\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenoptionfactory.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenoptionfactory.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef QUICKOPENOPTIONFACTORY_H\r\n#define QUICKOPENOPTIONFACTORY_H\r\n\r\n#include \"liteapi/liteapi.h\"\r\n\r\nclass QuickOpenOptionFactory : public LiteApi::IOptionFactory\r\n{\r\npublic:\r\n    QuickOpenOptionFactory(LiteApi::IApplication *app, QObject *parent);\r\n    virtual QStringList mimeTypes() const;\r\n    virtual LiteApi::IOption *create(const QString &mimeType);\r\nprotected:\r\n    LiteApi::IApplication *m_liteApp;\r\n};\r\n\r\n#endif // QUICKOPENOPTIONFACTORY_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenplugin.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenplugin.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"quickopenplugin.h\"\r\n#include \"quickopenmanager.h\"\r\n#include \"quickopenlines.h\"\r\n#include \"quickopenmimetype.h\"\r\n#include \"quickopenoptionfactory.h\"\r\n#include <QtPlugin>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nQuickOpenPlugin::QuickOpenPlugin()\r\n{\r\n}\r\n\r\nbool QuickOpenPlugin::load(LiteApi::IApplication *app)\r\n{\r\n    QuickOpenManager *manager = new QuickOpenManager(app);\r\n    if (!manager->initWithApp(app)) {\r\n        return false;\r\n    }\r\n    manager->addFilter(\":\",new QuickOpenLines(app,this));\r\n    app->optionManager()->addFactory(new QuickOpenOptionFactory(app,this));\r\n    return true;\r\n}\r\n\r\n#if QT_VERSION < 0x050000\r\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\r\n#endif\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenplugin.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenplugin.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef QUICKOPENPLUGIN_H\r\n#define QUICKOPENPLUGIN_H\r\n\r\n#include \"quickopen_global.h\"\r\n#include \"liteapi/liteapi.h\"\r\n\r\nclass QuickOpenPlugin : public LiteApi::IPlugin\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    QuickOpenPlugin();\r\n    virtual bool load(LiteApi::IApplication *app);\r\n};\r\n\r\nclass PluginFactory : public LiteApi::PluginFactoryT<QuickOpenPlugin>\r\n{\r\n    Q_OBJECT\r\n    Q_INTERFACES(LiteApi::IPluginFactory)\r\n#if QT_VERSION >= 0x050000\r\n    Q_PLUGIN_METADATA(IID \"liteidex.QuickOpenPlugin\")\r\n#endif\r\npublic:\r\n    PluginFactory() {\r\n        m_info->setId(\"plugin/QuickOpen\");\r\n        m_info->setVer(\"X36\");\r\n        m_info->setName(\"QuickOpen\");\r\n        m_info->setAuthor(\"visualfc\");\r\n        m_info->setInfo(\"QuickOpen\");\r\n        m_info->setMustLoad(true);\r\n        //m_info->appendDepend(\"plugin/liteenv\");\r\n    }\r\n};\r\n\r\n\r\n#endif // QUICKOPENPLUGIN_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenwidget.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenwidget.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"quickopenwidget.h\"\r\n#include \"liteapi/liteids.h\"\r\n#include <QVBoxLayout>\r\n#include <QComboBox>\r\n#include <QTreeView>\r\n#include <QFocusEvent>\r\n#include <QHeaderView>\r\n#include <QDebug>\r\n#include <QApplication>\r\n#include <QToolBar>\r\n\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nQuickOpenWidget::QuickOpenWidget(LiteApi::IApplication *app, QWidget *parent) :\r\n    QWidget(parent, Qt::Popup),// Qt::ToolTip | Qt::WindowStaysOnTopHint),\r\n    m_liteApp(app)\r\n{\r\n    //this->setFocusPolicy(Qt::NoFocus);\r\n    m_edit = new Utils::FilterLineEdit(300);\r\n    m_view = new QTreeView;\r\n    m_view->setHeaderHidden(true);\r\n    m_view->setTextElideMode(Qt::ElideLeft);\r\n#if QT_VERSION >= 0x050000\r\n    m_view->header()->setSectionResizeMode(QHeaderView::ResizeToContents);\r\n#else\r\n    m_view->header()->setResizeMode(QHeaderView::ResizeToContents);\r\n#endif\r\n    m_view->setEditTriggers(QAbstractItemView::NoEditTriggers);\r\n\r\n    m_wrap = true;\r\n\r\n    m_layout = new QVBoxLayout;\r\n    m_layout->setMargin(0);\r\n    m_layout->setSpacing(0);\r\n    m_layout->addWidget(m_edit);\r\n    m_layout->addWidget(m_view);\r\n\r\n    this->setMinimumWidth(600);\r\n    this->setMinimumHeight(300);\r\n\r\n    this->setLayout(m_layout);\r\n\r\n    connect(m_edit,SIGNAL(filterChanged(QString)),this,SIGNAL(filterChanged(QString)));\r\n\r\n    m_edit->installEventFilter(this);\r\n}\r\n\r\nvoid QuickOpenWidget::setModel(QAbstractItemModel *model,const QModelIndex &rootIndex)\r\n{\r\n    m_view->setModel(model);\r\n    m_view->setRootIndex(rootIndex);\r\n    setTempToolBar(0);\r\n}\r\n\r\nQLineEdit *QuickOpenWidget::editor()\r\n{\r\n    return m_edit;\r\n}\r\n\r\nQTreeView *QuickOpenWidget::view()\r\n{\r\n    return m_view;\r\n}\r\n\r\nvoid QuickOpenWidget::setTempToolBar(QToolBar *toolBar)\r\n{\r\n    if (!m_tmpToolBar.isNull()) {\r\n        m_layout->removeWidget(m_tmpToolBar.data());\r\n        m_tmpToolBar->clear();\r\n    }\r\n    m_tmpToolBar.reset(toolBar);\r\n    if (!toolBar) {\r\n        return;\r\n    }\r\n    m_tmpToolBar->show();\r\n    m_layout->insertWidget(0,toolBar);\r\n}\r\n\r\nvoid QuickOpenWidget::hideEvent(QHideEvent *e)\r\n{\r\n    emit hideWidget();\r\n    QWidget::hideEvent(e);\r\n}\r\n\r\nvoid QuickOpenWidget::closeWidget()\r\n{\r\n    QWidget::close();\r\n}\r\n\r\nvoid QuickOpenWidget::showView(QPoint *pos)\r\n{\r\n    if (pos == 0) {\r\n        QPoint pt(0,0);\r\n        this->move(m_liteApp->editorManager()->widget()->mapToGlobal(pt));\r\n    } else {\r\n        this->move(pos->x(),pos->y());\r\n    }\r\n    m_edit->setFocus();\r\n    this->show();\r\n}\r\n\r\nbool QuickOpenWidget::eventFilter(QObject *o, QEvent *e)\r\n{\r\n    if (e->type() == QEvent::KeyPress) {\r\n        QKeyEvent *ke = static_cast<QKeyEvent *>(e);\r\n        QAbstractItemModel *model = m_view->model();\r\n        if (!model) {\r\n            return false;\r\n        }\r\n\r\n        const int key = ke->key();\r\n        switch (key) {\r\n        case Qt::Key_Up: {\r\n            QModelIndex index = m_view->indexAbove(m_view->currentIndex());\r\n            if (!index.isValid()) {\r\n                index = model->index(model->rowCount(m_view->rootIndex())-1,0,m_view->rootIndex());\r\n            }\r\n\r\n            m_view->setCurrentIndex(index);\r\n            emit indexChanage(index);\r\n            return true;\r\n        }\r\n        case Qt::Key_Down: {\r\n            QModelIndex index = m_view->indexBelow(m_view->currentIndex());\r\n            if (!index.isValid()) {\r\n                index = model->index(0,0,m_view->rootIndex());\r\n            }\r\n            m_view->setCurrentIndex(index);\r\n            emit indexChanage(index);\r\n            return true;\r\n        }\r\n//        case Qt::Key_Return: {\r\n//            QModelIndex index = m_view->currentIndex();\r\n//            if (model->hasChildren(index)) {\r\n//                m_view->setExpanded(index,!m_view->isExpanded(index));\r\n//            } else {\r\n//                emit indexEnter(index);\r\n//            }\r\n//            return true;\r\n//        }\r\n        }\r\n    } else if (e->type() == QEvent::FocusOut) {\r\n        if (QWidget::focusWidget() == m_view ) {\r\n            m_edit->setFocus();\r\n        }\r\n        return true;\r\n    }\r\n    return QWidget::eventFilter(o,e);\r\n}\r\n"
  },
  {
    "path": "liteidex/src/plugins/quickopen/quickopenwidget.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: quickopenwidget.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef QUICKOPENWIDGET_H\r\n#define QUICKOPENWIDGET_H\r\n\r\n#include \"liteapi/liteapi.h\"\r\n#include \"../3rdparty/qtc_editutil/filterlineedit.h\"\r\n#include <QAbstractItemModel>\r\n#include <QScopedPointer>\r\n\r\nclass QTreeView;\r\nclass QVBoxLayout;\r\nclass QuickOpenWidget : public QWidget\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    explicit QuickOpenWidget(LiteApi::IApplication *app, QWidget *parent = 0);\r\n    void setModel(QAbstractItemModel *model, const QModelIndex &rootIndex);\r\n    QLineEdit *editor();\r\n    QTreeView *view();\r\n    void setTempToolBar(QToolBar *toolBar);\r\n    virtual void hideEvent(QHideEvent *e);\r\n    void closeWidget();\r\nsignals:\r\n    void hideWidget();\r\n    void indexChanage(const QModelIndex &index);\r\n    void indexEnter(const QModelIndex &index);\r\n    void filterChanged(const QString &filter);\r\npublic:\r\n    void showView(QPoint *pos = 0);\r\nprotected:\r\n    virtual bool eventFilter(QObject *o, QEvent *e);\r\nprotected:\r\n    LiteApi::IApplication *m_liteApp;\r\n    Utils::FilterLineEdit *m_edit;\r\n    QTreeView   *m_view;\r\n    QVBoxLayout *m_layout;\r\n    QScopedPointer<QToolBar>  m_tmpToolBar;\r\n    bool         m_wrap;\r\n};\r\n\r\n#endif // QUICKOPENWIDGET_H\r\n"
  },
  {
    "path": "liteidex/src/plugins/rustedit/rustedit.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: rustedit.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"rustedit.h\"\n#include \"fileutil/fileutil.h\"\n#include <QProcess>\n#include <QTemporaryFile>\n#include <QFileInfo>\n#include <QDir>\n#include <QFile>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nRustEdit::RustEdit(LiteApi::IApplication *app, QObject *parent)\n    : QObject(parent), m_liteApp(app)\n{\n    m_completer = 0;\n    m_editor = 0;\n    m_racerCmd = \"racer\";\n    m_process = new QProcess(this);\n    connect(m_liteApp->editorManager(),SIGNAL(editorCreated(LiteApi::IEditor*)),this,SLOT(editorCreated(LiteApi::IEditor*)));\n    connect(m_liteApp->editorManager(),SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(currentEditorChanged(LiteApi::IEditor*)));\n    connect(m_process,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(finished(int,QProcess::ExitStatus)));\n    LiteApi::IEnvManager *env = LiteApi::getEnvManager(m_liteApp);\n    if (env) {\n        connect(env,SIGNAL(currentEnvChanged(LiteApi::IEnv*)),this,SLOT(currentEnvChanged(LiteApi::IEnv*)));\n    }\n}\n\nvoid RustEdit::editorCreated(LiteApi::IEditor *editor)\n{\n    if (editor->mimeType() != \"text/x-rust\") {\n        return;\n    }\n    LiteApi::ILiteEditor *ed = LiteApi::getLiteEditor(editor);\n    if (ed) {\n        ed->setTabOption(4,true);\n        ed->setEnableAutoIndentAction(true);\n    }\n}\n\nvoid RustEdit::currentEditorChanged(LiteApi::IEditor *editor)\n{\n    if (!editor) {\n        return;\n    }\n    if (editor->mimeType() != \"text/x-rust\") {\n        return;\n    }\n    LiteApi::ICompleter *completer = LiteApi::findExtensionObject<LiteApi::ICompleter*>(editor,\"LiteApi.ICompleter\");\n    if (completer) {\n        setCompleter(completer);\n    }\n    m_editor = LiteApi::getLiteEditor(editor);\n}\n\nvoid RustEdit::prefixChanged(const QTextCursor &/*cur*/, const QString &pre, bool /*force*/)\n{\n    if (pre.endsWith(\"::\")) {\n        m_completer->setSeparator(\"::\");\n    } else if (pre.endsWith(\".\")) {\n        m_completer->setSeparator(\".\");\n    }\n    if (m_completer->completionContext() != LiteApi::CompleterCodeContext) {\n        return;\n    }\n\n    if (m_racerCmd.isEmpty()) {\n        return;\n    }\n\n    if (m_process->state() != QProcess::NotRunning) {\n        return;\n    }\n    /*\n    int offset = -1;\n    if (pre.endsWith('.')) {\n        m_preWord = pre;\n        offset = 0;\n    } else if (pre.length() == 1) {\n        m_preWord.clear();\n    } else {\n        if (!force) {\n            return;\n        }\n        m_preWord.clear();\n        int index = pre.lastIndexOf(\".\");\n        if (index != -1) {\n            m_preWord = pre.left(index);\n        }\n    }*/\n    if (!(pre.endsWith(\"::\") || pre.endsWith(\".\"))) {\n        return;\n    }\n\n    m_prefix = pre;\n    m_lastPrefix = m_prefix;\n\n    QStringList args;\n    args << \"complete\";\n    args << QString(\"%1\").arg(m_editor->line()+1);\n    args << QString(\"%1\").arg(m_editor->column());\n    args << \"racer_temp.rs\";\n    QString path = QDir::tempPath();\n    QFile file(path+\"//racer_temp.rs\");\n    if (file.open(QFile::WriteOnly|QFile::Truncate)) {\n        file.write(m_editor->utf8Data());\n        file.close();\n    }\n    m_process->setWorkingDirectory(path);\n    m_process->start(m_racerCmd,args);\n}\n\nvoid RustEdit::wordCompleted(QString, QString, QString)\n{   \n\n}\n//            PREFIX 21,21,\n//            MATCH Arc,115,11,C:\\Rust\\rust-nightly\\src\\liballoc\\arc.rs,Struct,pub struct Arc<T> {\n//            MATCH Weak,131,11,C:\\Rust\\rust-nightly\\src\\liballoc\\arc.rs,Struct,pub struct Weak<T> {\n//            MATCH weak_count,205,7,C:\\Rust\\rust-nightly\\src\\liballoc\\arc.rs,Function,pub fn weak_count<T>(this: &Arc<T>) -> uint { this.inner().weak.load(SeqCst) - 1 }\n//            MATCH strong_count,210,7,C:\\Rust\\rust-nightly\\src\\liballoc\\arc.rs,Function,pub fn strong_count<T>(this: &Arc<T>) -> uint { this.inner().strong.load(SeqCst) }\n//            PREFIX 16,16,\n//            MATCH core,1,0,C:\\Rust\\rust-nightly\\src\\libcore\\lib.rs,Module,C:\\Rust\\rust-nightly\\src\\libcore\\lib.rs\n//            MATCH libc,1,0,C:\\Rust\\rust-nightly\\src\\liblibc\\lib.rs,Module,C:\\Rust\\rust-nightly\\src\\liblibc\\lib.rs\n//            MATCH std,1,0,C:\\Rust\\rust-nightly\\src\\libstd\\lib.rs,Module,C:\\Rust\\rust-nightly\\src\\libstd\\lib.rs\n//            MATCH log,1,0,C:\\Rust\\rust-nightly\\src\\liblog\\lib.rs,Module,C:\\Rust\\rust-nightly\\src\\liblog\\lib.rs\n//            MATCH boxed,1,0,C:\\Rust\\rust-nightly\\src\\liballoc\\boxed.rs,Module,C:\\Rust\\rust-nightly\\src\\liballoc\\boxed.rs\n//            MATCH heap,1,0,C:\\Rust\\rust-nightly\\src\\liballoc\\heap.rs,Module,C:\\Rust\\rust-nightly\\src\\liballoc\\heap.rs\n//            MATCH boxed,1,0,C:\\Rust\\rust-nightly\\src\\liballoc\\boxed.rs,Module,C:\\Rust\\rust-nightly\\src\\liballoc\\boxed.rs\n//            MATCH arc,1,0,C:\\Rust\\rust-nightly\\src\\liballoc\\arc.rs,Module,C:\\Rust\\rust-nightly\\src\\liballoc\\arc.rs\n//            MATCH rc,1,0,C:\\Rust\\rust-nightly\\src\\liballoc\\rc.rs,Module,C:\\Rust\\rust-nightly\\src\\liballoc\\rc.rs\n//            MATCH oom,100,7,C:\\Rust\\rust-nightly\\src\\liballoc\\lib.rs,Function,pub fn oom() -> ! {\n//            MATCH fixme_14344_be_sure_to_link_to_collections,120,7,C:\\Rust\\rust-nightly\\src\\liballoc\\lib.rs,Function,pub fn fixme_14344_be_sure_to_link_to_collections() {}\n//            PREFIX 6,6,\n//            MATCH value,10,4,main.rs,StructField,value\n//            PREFIX 26,29,new\n//            MATCH new,161,11,C:\\Rust\\rust-nightly\\src\\liballoc\\arc.rs,Function,pub fn new(data: T) -> Arc<T> {\nvoid RustEdit::finished(int code, QProcess::ExitStatus)\n{\n    if (code != 0) {\n        m_liteApp->appendLog(\"racer\",QString::fromUtf8(m_process->readAll()),false);\n        return;\n    }\n    QByteArray data = m_process->readAllStandardOutput();\n    int count = 0;\n    foreach (QString line, QString::fromUtf8(data).split(\"\\n\")) {\n        if (line.startsWith(\"MATCH\")) {\n            QStringList array = line.mid(5).split(\",\",qtSkipEmptyParts);\n            if (array.size() > 0) {\n                count++;\n                m_completer->appendItem(m_prefix+array[0].trimmed(),QIcon(),true);\n            }\n        }\n    }\n    if (count > 0) {\n        m_completer->updateCompleterModel();\n        m_completer->showPopup();\n    }\n}\n\nvoid RustEdit::setCompleter(LiteApi::ICompleter *completer)\n{\n    if (m_completer) {\n        disconnect(m_completer,0,this,0);\n    }\n    m_completer = completer;\n    if (m_completer) {\n        if (!m_racerCmd.isEmpty()) {\n            m_completer->setSearchSeparator(false);\n            m_completer->setExternalMode(false);\n            m_completer->setSeparator(\".\");\n            connect(m_completer,SIGNAL(prefixChanged(QTextCursor,QString,bool)),this,SLOT(prefixChanged(QTextCursor,QString,bool)));\n            connect(m_completer,SIGNAL(wordCompleted(QString,QString,QString)),this,SLOT(wordCompleted(QString,QString,QString)));\n        } else {\n            m_completer->setSearchSeparator(true);\n            m_completer->setExternalMode(false);\n        }\n    }\n}\n\nvoid RustEdit::currentEnvChanged(LiteApi::IEnv*)\n{\n    QProcessEnvironment env = LiteApi::getCurrentEnvironment(m_liteApp);\n    m_racerCmd = FileUtil::lookPath(\"racer\",env,false);\n    if (m_racerCmd.isEmpty()) {\n#ifdef Q_OS_WIN\n        m_racerCmd = \"c:\\\\rust\\\\bin\\\\racer.exe\";\n#endif\n    }\n    m_process->setProcessEnvironment(env);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/rustedit/rustedit.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: rustedit.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef RUSTEDIT_H\n#define RUSTEDIT_H\n\n#include <liteapi/liteapi.h>\n#include <liteeditorapi/liteeditorapi.h>\n#include <liteenvapi/liteenvapi.h>\n\nclass RustEdit : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit RustEdit(LiteApi::IApplication *app, QObject *parent = 0);\npublic slots:\n    void currentEnvChanged(LiteApi::IEnv *env);\n    void editorCreated(LiteApi::IEditor *editor);\n    void currentEditorChanged(LiteApi::IEditor *editor);\n    void prefixChanged(const QTextCursor &cur,const QString &pre,bool force);\n    void wordCompleted(QString,QString,QString);\n    void finished(int code,QProcess::ExitStatus);\nprotected:\n    void setCompleter(LiteApi::ICompleter *completer);\n    LiteApi::IApplication *m_liteApp;\n    LiteApi::ICompleter   *m_completer;\n    LiteApi::ILiteEditor  *m_editor;\n    QProcess    *m_process;\n    QString     m_racerCmd;\n    QString     m_preWord;\n    QString     m_prefix;\n    QString     m_lastPrefix;\n};\n\n#endif // RUSTEDIT_H\n"
  },
  {
    "path": "liteidex/src/plugins/rustedit/rustedit.pro",
    "content": "TARGET = rustedit\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude(../../utils/fileutil/fileutil.pri)\ninclude (../../api/liteenvapi/liteenvapi.pri)\n\nDEFINES += RUSTEDIT_LIBRARY\n\nSOURCES += rusteditplugin.cpp \\\n    rustedit.cpp\n\nHEADERS += rusteditplugin.h\\\n        rustedit_global.h \\\n    rustedit.h\n"
  },
  {
    "path": "liteidex/src/plugins/rustedit/rustedit_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: rustedit_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef RUSTEDIT_GLOBAL_H\n#define RUSTEDIT_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(RUSTEDIT_LIBRARY)\n#  define RUSTEDITSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define RUSTEDITSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#endif // RUSTEDIT_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/rustedit/rusteditplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: rusteditplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"rusteditplugin.h\"\n#include \"rustedit.h\"\n#include <QtPlugin>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nRustEditPlugin::RustEditPlugin()\n{\n}\n\nbool RustEditPlugin::load(LiteApi::IApplication *app)\n{\n    new RustEdit(app,this);\n    return true;\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/rustedit/rusteditplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: rusteditplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef RUSTEDITPLUGIN_H\n#define RUSTEDITPLUGIN_H\n\n#include \"rustedit_global.h\"\n#include \"liteapi/liteapi.h\"\n\nclass RustEditPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    RustEditPlugin();\n    virtual bool load(LiteApi::IApplication *app);\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<RustEditPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.RustEditPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/RustEdit\");\n        m_info->setVer(\"x27\");\n        m_info->setName(\"RustEdit\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setInfo(\"RustEdit\");\n        m_info->appendDepend(\"plugin/liteeditor\");\n    }\n};\n\n\n#endif // RUSTEDITPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/golangcompleter.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangcompleter.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangcompleter.h\"\n\n#include <QTextBlock>\n#include <QStringListModel>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nGolangCompleter::GolangCompleter(QObject *parent) : SyntaxCompleter(parent)\n{\n    model = new QStringListModel;\n    setModel(model);\n    setCaseSensitivity(Qt::CaseSensitive);\n    setWrapAround(false);\n    setCompletionMode(PopupCompletion);\n}\n\nbool GolangCompleter::underCursor(const QTextCursor &cur, const QString &text)\n{\n    //qDebug() << this->fileName << cur.position() << cur.block().blockNumber();\n    return true;\n}\n\nvoid GolangCompleter::updateEditor()\n{\n    model->setStringList(this->allWords->toList());\n}\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/golangcompleter.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangcompleter.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGCOMPLETER_H\n#define GOLANGCOMPLETER_H\n\n#include \"syntaxcompleter.h\"\n\nclass QStringListModel;\nclass GolangCompleter : public SyntaxCompleter\n{\n    Q_OBJECT\npublic:\n    virtual bool underCursor(const QTextCursor &cur, const QString &text);\n    GolangCompleter(QObject *parent);\n    QStringListModel *model;\n    QSharedPointer< QSet<QString> >   allWords;\npublic slots:\n    void updateEditor();\n};\n\n#endif // GOLANGCOMPLETER_H\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/golanghighlighter.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golanghighlighter.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golanghighlighter.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nGolangHighlighter::GolangHighlighter(QTextDocument* document):\n    QSyntaxHighlighter(document), allWords(new QSet<QString>)\n{\n    keywordFormat.setForeground(Qt::darkBlue);\n    keywordFormat.setFontWeight(QFont::Bold);\n\n    identFormat.setForeground(Qt::darkBlue);\n\n    functionFormat.setForeground(Qt::blue);\n\n    numberFormat.setForeground(Qt::darkMagenta);\n\n    quotesFormat.setForeground(Qt::darkGreen);\n\n    singleLineCommentFormat.setForeground(Qt::darkCyan);\n    multiLineCommentFormat.setForeground(Qt::darkCyan);\n\n    QString word;\n    HighlightingRule rule;\n    //number\n    rule.pattern = QRegExp(\"(\\\\b|\\\\.)([0-9]+|0[xX][0-9a-fA-F]+|0[0-7]+)(\\\\.[0-9]+)?([eE][+-]?[0-9]+i?)?\\\\b\");\n    rule.format = numberFormat;\n\n    highlightingRules.push_back(rule);\n\n    //function\n    rule.pattern = QRegExp(\"\\\\b[a-zA-Z_][a-zA-Z0-9_]+\\\\s*(?=\\\\()\");\n    rule.format = functionFormat;\n\n    highlightingRules.push_back(rule);\n\n    //indent\n    rule.pattern = QRegExp(\"\\\\b\"\n                           \"(bool|byte|complex64|complex128|float32|float64|\"\n                           \"int8|int16|int32|int64|string|uint8|uint16|uint32|uint64|\"\n                           \"int|uint|uintptr|\"\n                           \"true|false|iota|\"\n                           \"nil|\"\n                           \"append|cap|close|closed|complex|copy|imag|len|\"\n                           \"make|new|panic|print|println|real|recover)\"\n                           \"\\\\b\");\n    rule.format = identFormat;\n    highlightingRules.append(rule);\n    //\n    word = rule.pattern.pattern();\n    word.remove(\"\\\\b\");\n    word.remove(\"(\");\n    word.remove(\")\");\n    foreach(QString v, word.split(\"|\")) {\n        allWords->insert(v);\n    }\n\n    //keyword\n    rule.pattern = QRegExp(\"\\\\b\"\n                           \"(break|default|func|interface|select|\"\n                           \"case|defer|go|map|struct|\"\n                           \"chan|else|goto|package|switch|\"\n                           \"const|fallthrough|if|range|type|\"\n                           \"continue|for|import|return|var)\"\n                           \"\\\\b\");\n    rule.format = keywordFormat;\n    highlightingRules.append(rule);\n\n    word = rule.pattern.pattern();\n    word.remove(\"\\\\b\");\n    word.remove(\"(\");\n    word.remove(\")\");\n    foreach(QString v, word.split(\"|\")) {\n        allWords->insert(v);\n    }\n\n    //quotes and comment\n    regexpQuotesAndComment = QRegExp(\"//|\\\\\\\"|'|`|/\\\\*\");\n}\n\n\nbool GolangHighlighter::highlightPreBlock(QString const& text, int& startPos, int& endPos)\n{\n    int state = previousBlockState();\n\n    if (state == -1)\n        state = 0;\n\n    if (state & STATE_BACKQUOTES) {\n        endPos = findQuotesEndPos(text, startPos, '`');\n        if (endPos == -1) {\n            setFormat(0, text.length(), quotesFormat);\n            setCurrentBlockState(STATE_BACKQUOTES);\n            return true;\n        } else {\n            endPos += 1;\n            setFormat(0, endPos - startPos, quotesFormat);\n            startPos = endPos;\n        }\n    } else if (state & STATE_MULTILINE_COMMENT) {\n        endPos = text.indexOf(\"*/\", startPos);\n        if (endPos == -1) {\n            setFormat(0, text.length(), multiLineCommentFormat);\n            setCurrentBlockState(previousBlockState());\n            return true;\n        } else {\n            endPos += 2;\n            setFormat(0, endPos - startPos, multiLineCommentFormat);\n            startPos = endPos;\n        }\n    } else if (state & STATE_SINGLELINE_COMMENT) {\n        setFormat(0, text.length(), singleLineCommentFormat);\n        if (text.endsWith(\"\\\\\")) {\n            setCurrentBlockState(STATE_SINGLELINE_COMMENT);\n        }\n        return true;\n    }\n    return false;\n}\n\nvoid GolangHighlighter::highlightBlock(const QString &text)\n{\n    int startPos = 0;\n    int endPos = text.length();\n\n    setCurrentBlockState(0);\n\n    if (highlightPreBlock(text, startPos, endPos)) {\n        return;\n    }\n\n    //keyword and func\n    foreach (const HighlightingRule &rule, highlightingRules) {\n        QRegExp expression(rule.pattern);\n        int index = expression.indexIn(text,startPos);\n        while (index >= 0) {            \n            int length = expression.matchedLength();\n            setFormat(index, length, rule.format);\n            allWords->insert(text.mid(index,length));\n            index = expression.indexIn(text, startPos+index + length);            \n        }\n    }\n\n    //quote and comment\n    while (true)\n    {\n        startPos = text.indexOf(regexpQuotesAndComment, startPos);\n        if (startPos == -1)\n            break;\n\n        QString cap = regexpQuotesAndComment.cap();\n        if ((cap == \"\\\"\") || (cap == \"'\") || (cap == \"`\"))\n        {\n            endPos = findQuotesEndPos(text, startPos + 1, cap.at(0));\n            if (endPos == -1)\n            {\n                //multiline\n                setFormat(startPos, text.length() - startPos, quotesFormat);\n                if (cap == \"`\") {\n                    setCurrentBlockState(STATE_BACKQUOTES);\n                }\n                return;\n            }\n            else\n            {\n                endPos += 1;\n                setFormat(startPos, endPos - startPos, quotesFormat);\n                startPos = endPos;\n            }\n        }\n        else if (cap == \"//\")\n        {\n            setFormat(startPos, text.length() - startPos, singleLineCommentFormat);\n            if (text.endsWith(\"\\\\\"))\n                setCurrentBlockState(STATE_SINGLELINE_COMMENT);\n            return;\n        }\n        else if (cap == \"/*\")\n        {\n            endPos = text.indexOf(\"*/\", startPos+2);\n            if (endPos == -1)\n            {\n                //miltiline\n                setFormat(startPos, text.length() - startPos, multiLineCommentFormat);\n                setCurrentBlockState(STATE_MULTILINE_COMMENT);\n                return;\n            }\n            else\n            {\n                endPos += 2;\n                setFormat(startPos, endPos - startPos, multiLineCommentFormat);\n                startPos = endPos;\n            }\n        }\n    }\n}\n\nint GolangHighlighter::findQuotesEndPos(const QString &text, int startPos, const QChar &endChar)\n{\n    for (int pos = startPos; pos < text.length(); pos++)\n    {        \n        if (text.at(pos) == endChar) {\n            return pos;\n        } else if (text.at(pos) == QChar('\\\\') && endChar != QChar('`')) {\n            ++pos;\n        }\n    }\n    return -1;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/golanghighlighter.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golanghighlighter.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGHIGHLIGHTER_H\n#define GOLANGHIGHLIGHTER_H\n\n#include <QSyntaxHighlighter>\n#include <QVector>\n#include <QTextCharFormat>\n#include <QSet>\n#include <QSharedPointer>\n\nclass QTextDocument;\n\nclass GolangHighlighter: public QSyntaxHighlighter\n{\n    Q_OBJECT\npublic:\n    GolangHighlighter(QTextDocument* document);\nprotected:\n    enum\n    {\n        STATE_BACKQUOTES = 0x04,\n        STATE_SINGLELINE_COMMENT = 0x08,\n        STATE_MULTILINE_COMMENT = 0x10\n    };\n    virtual void highlightBlock(const QString &text);\n    bool highlightPreBlock(const QString &text, int &startPos, int &endPos);\n    int findQuotesEndPos(const QString &text, int startPos, const QChar &endChar);\npublic:\n    QSharedPointer< QSet<QString> >   allWords;\nprivate:\n    struct HighlightingRule\n    {\n        QRegExp pattern;\n        QTextCharFormat format;\n    };\n    QVector<HighlightingRule> highlightingRules;\n    QRegExp         regexpQuotesAndComment;\n    QTextCharFormat functionFormat;\n    QTextCharFormat singleLineCommentFormat;\n    QTextCharFormat multiLineCommentFormat;\n    QTextCharFormat identFormat;\n    QTextCharFormat keywordFormat;\n    QTextCharFormat numberFormat;\n    QTextCharFormat quotesFormat;\n};\n\n\n#endif // GOLANGHIGHLIGHTER_H\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/projecthighlighter.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: projecthighlighter.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"projecthighlighter.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nProjectHighlighter::ProjectHighlighter(QTextDocument *document) :\n    QSyntaxHighlighter(document)\n{\n    keywordFormat.setForeground(Qt::darkBlue);\n    commentFormat.setForeground(Qt::darkCyan);\n\n    HighlightingRule rule;\n    //keyword\n    rule.pattern = QRegExp(\"\\\\b\"\n                           \"(TARGET|DESTDIR|GOFILES|CGOFILES|GCOPT|GLOPT)\"\n                           \"\\\\b\");\n    rule.format = keywordFormat;\n    highlightingRules.append(rule);\n\n    rule.pattern = QRegExp(\"^\\\\s*#.*\");\n    rule.format = commentFormat;\n    highlightingRules.append(rule);\n}\n\nvoid ProjectHighlighter::highlightBlock(const QString &text)\n{\n    int startPos = 0;\n    //int endPos = text.length();\n    foreach (const HighlightingRule &rule, highlightingRules) {\n        QRegExp expression(rule.pattern);\n        int index = expression.indexIn(text,startPos);\n        while (index >= 0) {\n            int length = expression.matchedLength();\n            setFormat(index, length, rule.format);\n            index = expression.indexIn(text, startPos+index + length);\n        }\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/projecthighlighter.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: projecthighlighter.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef PROJECTHIGHLIGHTER_H\n#define PROJECTHIGHLIGHTER_H\n\n#include <QSyntaxHighlighter>\n#include <QTextCharFormat>\n#include <QVector>\n\nclass QTextDocument;\n\nclass ProjectHighlighter : public QSyntaxHighlighter\n{\n    Q_OBJECT\npublic:\n    explicit ProjectHighlighter(QTextDocument *document);\nprivate:\n    virtual void highlightBlock(const QString &text);\n    struct HighlightingRule\n    {\n        QRegExp pattern;\n        QTextCharFormat format;\n    };\n    QVector<HighlightingRule> highlightingRules;\n    QTextCharFormat keywordFormat;\n    QTextCharFormat commentFormat;\n};\n\n#endif // PROJECTHIGHLIGHTER_H\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/syntaxcompleter.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: syntaxcompleter.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef SYNTAXCOMPLETER_H\n#define SYNTAXCOMPLETER_H\n\n#include <QCompleter>\n#include <QPlainTextEdit>\n#include <QTextCursor>\n#include <QAbstractItemView>\n\nclass SyntaxCompleter : public QCompleter\n{\npublic:\n    SyntaxCompleter(QObject *parent = 0) : QCompleter(parent)\n    {\n    }\n    virtual bool underCursor(int key, QTextCursor cur, const QString &text, const QString &word)\n    {\n        return false;\n    }\n    virtual void setFileName(const QString &path)\n    {\n        fileName = path;\n    }\n    virtual void showPopup(const QString &completionPrefix)\n    {\n    }\n\n    virtual void hidePopup()\n    {\n    }\n    virtual void endCompletion()\n    {\n\n    }\n\npublic:\n    QString fileName;\n};\n\n\n#endif // SYNTAXCOMPLETER_H\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/syntaxeditor.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: syntaxeditor.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"syntaxeditor.h\"\n#include \"syntaxtexteditor.h\"\n#include <QTextDocument>\n#include <QFile>\n#include <QFileInfo>\n#include <QMessageBox>\n#include <QToolBar>\n#include <QAction>\n#include <QTextCodec>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nTextFile::TextFile(QObject *parent)\n    : LiteApi::IFile(parent)\n{\n    m_codec = QTextCodec::codecForName(\"UTF-8\");\n}\n\nQString TextFile::fileName() const\n{\n    return m_fileName;\n}\n\nbool TextFile::save(const QString &fileName)\n{\n    QFile file(fileName);\n    if (!file.open(QFile::WriteOnly | QFile::Text)) {\n        return false;\n    }\n    QString text = m_document->toPlainText();\n    if (m_codec) {\n        file.write(m_codec->fromUnicode(text));\n    } else {\n        file.write(text.toLocal8Bit());\n    }\n    m_document->setModified(false);\n    return true;\n}\n\nbool TextFile::reload()\n{\n    if (m_document->isModified()) {\n        QString text = QString(tr(\"Cancel file %1 modify and reload ?\")).arg(m_fileName);\n        int ret = QMessageBox::question(0,\"Question\",text,QMessageBox::Yes|QMessageBox::No);\n        if (ret != QMessageBox::Ok) {\n            return false;\n        }\n    }\n    bool ret = open(m_fileName,m_mimeType);\n    if (ret) {\n        emit reloaded();\n    }\n    return ret;\n}\n\nQString TextFile::mimeType() const\n{\n    return m_mimeType;\n}\n\nQString TextFile::subType() const\n{\n    return QString();\n}\n\nvoid TextFile::setDocument(QTextDocument *document)\n{\n    m_document = document;\n}\n\nQTextDocument  *TextFile::document()\n{\n    return m_document;\n}\n\nbool TextFile::open(const QString &fileName, const QString &mimeType)\n{\n\n    QFile file(fileName);\n    if (!file.open(QFile::ReadOnly | QFile::Text)) {\n        return false;\n    }\n    m_mimeType = mimeType;\n    m_fileName = fileName;\n    QByteArray text = file.readAll();\n    if (m_codec) {\n        m_document->setPlainText(m_codec->toUnicode(text));\n    } else {\n        m_document->setPlainText(text);\n    }\n    m_document->setModified(false);\n\n    return true;\n}\n\n\nSyntaxEditor::SyntaxEditor(QObject *parent)\n    : LiteApi::IEditor(parent)\n{\n    m_editor = new SyntaxTextEditor(0);\n    m_file = new TextFile(this);\n    m_file->setDocument(m_editor->document());\n\n    m_toolBar = new QToolBar(tr(\"SyntaxEditor ToolBar\"));\n    m_undoAct = new QAction(QIcon(\":/images/undo.png\"),tr(\"Undo\"),m_toolBar);\n    m_redoAct = new QAction(QIcon(\":/images/redo.png\"),tr(\"Redo\"),m_toolBar);\n    m_toolBar->addAction(m_undoAct);\n    m_toolBar->addAction(m_redoAct);\n\n    m_undoAct->setEnabled(false);\n    m_redoAct->setEnabled(false);\n\n    connect(m_editor,SIGNAL(textChanged()),this,SIGNAL(contentsChanged()));\n    connect(m_editor,SIGNAL(modificationChanged(bool)),this,SIGNAL(modificationChanged(bool)));\n    connect(m_undoAct,SIGNAL(triggered()),m_editor,SLOT(undo()));\n    connect(m_redoAct,SIGNAL(triggered()),m_editor,SLOT(redo()));\n    connect(m_editor,SIGNAL(undoAvailable(bool)),m_undoAct,SLOT(setEnabled(bool)));\n    connect(m_editor,SIGNAL(redoAvailable(bool)),m_redoAct,SLOT(setEnabled(bool)));\n}\n\nbool SyntaxEditor::autoDelete() const\n{\n    return true;\n}\n\nQWidget *SyntaxEditor::widget()\n{\n    return m_editor;\n}\n\nQToolBar* SyntaxEditor::toolBar() const\n{\n    return m_toolBar;\n}\n\nQString SyntaxEditor::displayName() const\n{\n    QFileInfo info(m_file->fileName());\n    return info.fileName();\n}\n\nQIcon SyntaxEditor::icon() const\n{\n    return QIcon();\n}\n\n\nvoid SyntaxEditor::setDisplayName(const QString &title)\n{\n\n}\n\nbool SyntaxEditor::createNew(const QString &contents)\n{\n    return true;\n}\n\nbool SyntaxEditor::open(const QString &fileName,const QString &mimeType)\n{\n    if (!m_file->open(fileName,mimeType)) {\n        return false;\n    }\n    m_editor->moveCursor(QTextCursor::Start);\n    return true;\n}\n\nbool SyntaxEditor::save()\n{\n    bool ret = m_file->save(m_file->fileName());\n    if (ret) {\n        m_editor->document()->setModified(false);\n    }\n    return ret;\n}\n\nbool SyntaxEditor::isModified()\n{\n    return m_editor->document()->isModified();\n}\n\nLiteApi::IFile *SyntaxEditor::file()\n{\n    return m_file;\n}\n\nint SyntaxEditor::line() const\n{\n    return 0;\n}\nint SyntaxEditor::column() const\n{\n    return 0;\n}\nvoid SyntaxEditor::gotoLine(int line, int column)\n{\n    m_editor->gotoLine(line,column);\n}\n\nSyntaxTextEditor *SyntaxEditor::editor()\n{\n    return m_editor;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/syntaxeditor.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: syntaxeditor.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef SYNTAXEDITOR_H\n#define SYNTAXEDITOR_H\n\n#include \"../../liteapi/liteapi.h\"\n\n#include <QPointer>\n\nclass SyntaxTextEditor;\nclass QTextDocument;\n\nclass TextFile : public LiteApi::IFile\n{\n    Q_OBJECT\npublic:\n    TextFile(QObject *parent);\n\n    virtual bool open(const QString &fileName, const QString &mimeType);\n    virtual bool reload();\n    virtual bool save(const QString &fileName);\n    virtual QString fileName() const;\n    virtual QString mimeType() const;\n    virtual QString subType() const;\npublic:\n    void setDocument(QTextDocument *document);\n    QTextDocument  *document();\nprotected:\n    QString        m_fileName;\n    QString        m_mimeType;\n    QTextDocument *m_document;\n    QTextCodec    *m_codec;\n};\n\nclass SyntaxEditor : public LiteApi::IEditor\n{\n    Q_OBJECT\npublic:\n    SyntaxEditor(QObject *parent);\n\n    virtual bool autoDelete() const;\n\n    virtual QWidget *widget();\n    virtual QToolBar* toolBar() const;\n    virtual QString displayName() const;\n    virtual QIcon icon() const;\n\n    virtual void setDisplayName(const QString &title);\n    virtual bool createNew(const QString &contents);\n    virtual bool open(const QString &fileName, const QString &mimeType);\n    virtual bool save();\n    virtual bool isModified();\n    virtual LiteApi::IFile *file();\n\n    virtual int line() const;\n    virtual int column() const;\n    virtual void gotoLine(int line, int column);\npublic:\n    SyntaxTextEditor *editor();\nprotected:\n    SyntaxTextEditor *m_editor;\n    QToolBar         *m_toolBar;\n    TextFile         *m_file;\n    QAction          *m_undoAct;\n    QAction          *m_redoAct;\n};\n\n#endif // SYNTAXEDITOR_H\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/syntaxeditor.pro",
    "content": "#-------------------------------------------------\n#\n# Project created by QtCreator 2011-03-28T17:00:01\n#\n#-------------------------------------------------\nTARGET = syntaxeditor\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude(../../utils/mimetype.pri)\n\nDEFINES += SYNTAXEDITOR_LIBRARY\n\nSOURCES += syntaxeditorplugin.cpp \\\n    syntaxtexteditor.cpp \\\n    syntaxeditor.cpp \\\n    golanghighlighter.cpp \\\n    syntaxfilefactory.cpp \\\n    projecthighlighter.cpp\n\nHEADERS += syntaxeditorplugin.h\\\n        syntaxeditor_global.h \\\n    syntaxcompleter.h \\\n    syntaxtexteditor.h \\\n    syntaxeditor.h \\\n    golanghighlighter.h \\\n    syntaxfilefactory.h \\\n    projecthighlighter.h\n\nOTHER_FILES += \\\n    syntaxeditor.xml\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/syntaxeditor.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n  <mime-type type=\"text/x-gosrc\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Golang Source File</comment>\n    <glob pattern=\"*.go\"/>\n  </mime-type>\n  <mime-type type=\"text/x-profile\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Project File</comment>\n    <glob pattern=\"*.pro\"/>\n  </mime-type>\n  <mime-type type=\"text/x-gopro\">\n    <sub-class-of type=\"text/plain\"/>\n    <comment>Golang Project File</comment>\n    <glob pattern=\"*.gopro\"/>\n  </mime-type>\n</mime-info>\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/syntaxeditor_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: syntaxeditor_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef SYNTAXEDITOR_GLOBAL_H\n#define SYNTAXEDITOR_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(SYNTAXEDITOR_LIBRARY)\n#  define SYNTAXEDITORSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define SYNTAXEDITORSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#endif // SYNTAXEDITOR_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/syntaxeditorplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: syntaxeditorplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"syntaxeditorplugin.h\"\n#include \"syntaxfilefactory.h\"\n\n#include <QFile>\n#include \"utils/mimetype.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nSyntaxEditorPlugin::SyntaxEditorPlugin()\n{\n}\nvoid SyntaxEditorPlugin::install(LiteApi::IApplication *app)\n{\n    SyntaxFileFactory *factory = new SyntaxFileFactory(app,this);\n    app->editorManager()->addFactory(factory);\n\n    QString fileName = app->pluginPath()+\"/syntaxeditor.xml\";\n    MimeType::loadMimeTypes(app->mimeTypeManager(),fileName);\n}\n\nconst LiteApi::PluginInfo & SyntaxEditorPlugin::info() const\n{\n    static LiteApi::PluginInfo s_info;\n    s_info.anchor = \"visualfc\";\n    s_info.name = \"SyntaxEditor\";\n    s_info.ver = \"1.0\";\n    s_info.info = \"info\";\n    return s_info;\n}\n\nQ_EXPORT_PLUGIN(SyntaxEditorPlugin)\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/syntaxeditorplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: syntaxeditorplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef SYNTAXEDITORPLUGIN_H\n#define SYNTAXEDITORPLUGIN_H\n\n#include \"syntaxeditor_global.h\"\n#include \"../../liteapi/liteapi.h\"\n\n#include <QtPlugin>\n\nclass SyntaxEditorPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPlugin)\npublic:\n    SyntaxEditorPlugin();\n    virtual void install(LiteApi::IApplication *app);\n    virtual const LiteApi::PluginInfo & info() const;\n};\n\n#endif // SYNTAXEDITORPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/syntaxfilefactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: syntaxfilefactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"syntaxfilefactory.h\"\n#include \"syntaxtexteditor.h\"\n#include \"syntaxeditor.h\"\n#include \"golanghighlighter.h\"\n#include \"projecthighlighter.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nSyntaxFileFactory::SyntaxFileFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IFileFactory(parent),\n      m_liteApp(app)\n{\n    m_mimeTypes.append(\"text/x-gosrc\");\n    m_mimeTypes.append(\"text/x-gopro\");\n    m_mimeTypes.append(\"text/x-profile\");\n    m_mimeTypes.append(\"text/liteide.default.editor\");\n}\n\nQStringList SyntaxFileFactory::mimeTypes() const\n{\n    return m_mimeTypes;\n}\n\nLiteApi::IFile *SyntaxFileFactory::open(const QString &fileName, const QString &mimeType)\n{\n    SyntaxEditor *edit = new SyntaxEditor(this);\n    if (!edit->open(fileName,mimeType)) {\n        delete edit;\n        return 0;\n    }\n\n    if (mimeType == \"text/x-gosrc\") {\n        new GolangHighlighter(edit->editor()->document());\n    } else if (mimeType == \"text/x-gopro\") {\n        new ProjectHighlighter(edit->editor()->document());\n    }\n    edit->editor()->loadConfig(m_liteApp->settings(),mimeType);\n    m_liteApp->editorManager()->openEditor(edit);\n    return edit->file();\n}\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/syntaxfilefactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: syntaxfilefactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGFILEFACTORY_H\n#define GOLANGFILEFACTORY_H\n\n#include \"../../liteapi/liteapi.h\"\n\nclass SyntaxFileFactory : public LiteApi::IFileFactory\n{\npublic:\n    SyntaxFileFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IFile *open(const QString &fileName, const QString &mimeType);\nprotected:\n    LiteApi::IApplication   *m_liteApp;\n    QStringList              m_mimeTypes;\n};\n\n#endif // GOLANGFILEFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/syntaxtexteditor.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: syntaxtexteditor.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include <QtGui>\n\n#include \"syntaxtexteditor.h\"\n#include \"golanghighlighter.h\"\n#include \"QCompleter\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nSyntaxTextEditor::SyntaxTextEditor(QWidget *parent) :\n        QPlainTextEdit(parent),editCompleter(0)\n{\n    setAttribute(Qt::WA_DeleteOnClose);\n    setLineWrapMode(QPlainTextEdit::NoWrap);\n\n    isUntitled = true;\n    editorArea = new SyntaxTextEditorArea(this);\n    connect(this, SIGNAL(blockCountChanged(int)), this, SLOT(updateAreaWidth(int)));\n    connect(this, SIGNAL(updateRequest(QRect,int)), this, SLOT(updateEditorArea(QRect,int)));\n    connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(highlightCurrentLine()));\n\n    setCursorWidth(2);\n\n    updateAreaWidth(0);\n    highlightCurrentLine();\n    this->autoBlock = true;\n    this->autoIndent = true;\n    this->autoWord = false;\n}\n\nvoid SyntaxTextEditor::reload()\n{\n    QFile file(curFile);\n    if (!file.open(QFile::ReadOnly | QFile::Text)) {\n        QMessageBox::warning(this, tr(\"LiteIDE\"),\n                             tr(\"Cannot read file %1:\\n%2.\")\n                             .arg(curFile)\n                             .arg(file.errorString()));\n        return;\n    }\n\n    QApplication::setOverrideCursor(Qt::WaitCursor);\n    QTextCodec *codec = QTextCodec::codecForName(\"UTF-8\");\n    setPlainText(codec->toUnicode(file.readAll()));\n    /*\n    QTextCursor cursor(document());\n    cursor.beginEditBlock();\n    cursor.select(QTextCursor::Document);\n    cursor.insertText(codec->toUnicode(file.readAll()));\n    cursor.endEditBlock();\n    */\n    QApplication::restoreOverrideCursor();\n}\n\nvoid SyntaxTextEditor::newFile()\n{\n    static int sequenceNumber = 1;\n\n    isUntitled = true;\n    curFile = tr(\"document%1.go\").arg(sequenceNumber++);\n    curText = curFile + \"[*]\";\n    setWindowTitle(curText);\n}\n\nbool SyntaxTextEditor::loadFile(const QString &fileName)\n{\n    QFile file(fileName);\n    if (!file.open(QFile::ReadOnly | QFile::Text)) {\n        QMessageBox::warning(this, tr(\"LiteIDE\"),\n                             tr(\"Cannot read file %1:\\n%2.\")\n                             .arg(fileName)\n                             .arg(file.errorString()));\n        return false;\n    }\n\n    QApplication::setOverrideCursor(Qt::WaitCursor);\n    QTextCodec *codec = QTextCodec::codecForName(\"UTF-8\");\n    setPlainText(codec->toUnicode(file.readAll()));\n    QApplication::restoreOverrideCursor();\n\n    setCurrentFile(fileName);\n\n    return true;\n}\n\nbool SyntaxTextEditor::save()\n{\n    if (isUntitled) {\n        return saveAs();\n    } else {\n        return saveFile(curFile);\n    }\n}\n\nbool SyntaxTextEditor::saveAs()\n{\n    QString fileName = QFileDialog::getSaveFileName(this, tr(\"Save As\"),\n                                                    curFile);\n    if (fileName.isEmpty())\n        return false;\n\n    return saveFile(fileName);\n}\n\nQByteArray SyntaxTextEditor::data() const\n{\n    QTextCodec *codec = QTextCodec::codecForName(\"UTF-8\");\n    return codec->fromUnicode(toPlainText());\n}\n\nbool SyntaxTextEditor::saveFile(const QString &fileName)\n{\n    if (!this->document()->isModified())\n        return true;\n\n    QFile file(fileName);\n    if (!file.open(QFile::WriteOnly | QFile::Text)) {\n        QMessageBox::warning(this, tr(\"LiteIDE\"),\n                             tr(\"Cannot write file %1:\\n%2.\")\n                             .arg(fileName)\n                             .arg(file.errorString()));\n        return false;\n    }\n\n    QApplication::setOverrideCursor(Qt::WaitCursor);\n    QTextCodec *codec = QTextCodec::codecForName(\"UTF-8\");\n    file.write(codec->fromUnicode(toPlainText()));\n    QApplication::restoreOverrideCursor();\n    setCurrentFile(fileName);\n    return true;\n}\n\nQString SyntaxTextEditor::userFriendlyCurrentFile()\n{\n    return strippedName(curFile);\n}\n\nvoid SyntaxTextEditor::closeEvent(QCloseEvent *event)\n{\n    if (maybeSave()) {\n        event->accept();\n    } else {\n        event->ignore();\n    }\n}\n\nbool SyntaxTextEditor::maybeSave()\n{\n    if (document()->isModified()) {\n        QMessageBox::StandardButton ret;\n        ret = QMessageBox::warning(this, tr(\"LiteIDE\"),\n                     tr(\"'%1' has been modified.\\n\"\n                        \"Do you want to save your changes?\")\n                     .arg(userFriendlyCurrentFile()),\n                     QMessageBox::Save | QMessageBox::Discard\n                     | QMessageBox::Cancel);\n        if (ret == QMessageBox::Save)\n            return save();\n        else if (ret == QMessageBox::Cancel)\n            return false;\n    }\n    return true;\n}\n\nvoid SyntaxTextEditor::setCurrentFile(const QString &fileName)\n{\n    curFile = QFileInfo(fileName).canonicalFilePath();\n    isUntitled = false;\n    document()->setModified(false);\n    setWindowModified(false);\n    curText = userFriendlyCurrentFile();\n}\n\nQString SyntaxTextEditor::strippedName(const QString &fullFileName)\n{\n    return QFileInfo(fullFileName).fileName();\n}\n\nint SyntaxTextEditor::editorAreaWidth()\n{\n    int digits = 1;\n    int max = qMax(1, blockCount());\n    while (max >= 10) {\n        max /= 10;\n        ++digits;\n    }\n\n    int space = 6 + fontMetrics().width(QLatin1Char('9')) * digits;\n\n    return space;\n}\n\nvoid SyntaxTextEditor::areaPaintEvent(QPaintEvent *event)\n{\n    QPainter painter(editorArea);\n\n    painter.fillRect(event->rect(), Qt::lightGray);//lightGray);\n\n//![extraAreaPaintEvent_0]\n\n//![extraAreaPaintEvent_1]\n    QTextBlock block = firstVisibleBlock();\n    int blockNumber = block.blockNumber();\n    int top = (int) blockBoundingGeometry(block).translated(contentOffset()).top();\n    int bottom = top + (int) blockBoundingRect(block).height();\n//![extraAreaPaintEvent_1]\n\n//![extraAreaPaintEvent_2]\n    while (block.isValid() && top <= event->rect().bottom()) {\n        if (block.isVisible() && bottom >= event->rect().top()) {\n            QString number = QString::number(blockNumber + 1);\n            painter.setPen(Qt::black);\n            painter.drawText(0, top, editorArea->width()-3, fontMetrics().height(),\n                             Qt::AlignRight, number);\n        }\n\n        block = block.next();\n        top = bottom;\n        bottom = top + (int) blockBoundingRect(block).height();\n        ++blockNumber;\n    }\n}\n\nvoid SyntaxTextEditor::resizeEvent(QResizeEvent *e)\n{\n    QPlainTextEdit::resizeEvent(e);\n\n    QRect cr = contentsRect();\n    editorArea->setGeometry(QRect(cr.left(), cr.top(), editorAreaWidth(), cr.height()));\n}\n\nvoid SyntaxTextEditor::updateAreaWidth(int /* newBlockCount */)\n{\n    setViewportMargins(editorAreaWidth(), 0, 0, 0);\n}\n\nvoid SyntaxTextEditor::updateEditorArea(const QRect &rect, int dy)\n{\n    if (dy)\n        editorArea->scroll(0, dy);\n    else\n        editorArea->update(0, rect.y(), editorArea->width(), rect.height());\n\n    if (rect.contains(viewport()->rect())) {\n        updateAreaWidth(0);\n    }\n}\n\nvoid SyntaxTextEditor::setCompleter(SyntaxCompleter *completer)\n{\n    if (editCompleter)\n        QObject::disconnect(editCompleter, 0, this, 0);\n\n    editCompleter = completer;\n\n    if (!editCompleter)\n        return;\n\n    editCompleter->setFileName(this->curFile);\n    editCompleter->setWidget(this);\n    QObject::connect(editCompleter, SIGNAL(activated(QString)),\n                     this, SLOT(insertCompletion(QString)));\n}\n\nSyntaxCompleter *SyntaxTextEditor::completer() const\n{\n    return this->editCompleter;\n}\n\n\nQString SyntaxTextEditor::wordUnderCursor() const\n{\n    QTextCursor tc = textCursor();\n    tc.select(QTextCursor::WordUnderCursor);\n    return tc.selectedText();\n}\n\nQString SyntaxTextEditor::textUnderCursor() const\n{\n    QTextCursor tc = textCursor();\n    tc.select(QTextCursor::BlockUnderCursor);\n    QString block = tc.selectedText();\n    QStringList all = block.split(QRegExp(\"[\\t| |(|)]\"));\n    if (all.isEmpty())\n        return \"\";\n\n    return all.last();\n}\n\nvoid SyntaxTextEditor::focusInEvent(QFocusEvent *e)\n{\n    if (editCompleter)\n         editCompleter->setWidget(this);\n     QPlainTextEdit::focusInEvent(e);\n}\n\nvoid SyntaxTextEditor::keyPressEvent(QKeyEvent *e)\n{\n    if (editCompleter && editCompleter->popup()->isVisible()) {\n        // The following keys are forwarded by the completer to the widget\n        switch (e->key()) {\n        case Qt::Key_Enter:\n        case Qt::Key_Return:\n        case Qt::Key_Escape:\n        case Qt::Key_Tab:\n        case Qt::Key_Backtab:            \n            e->ignore();\n            return; // let the completer do default behavior\n        default:\n            break;\n        }\n    }\n    if (e->key() == Qt::Key_Tab) {\n        indentText(document(), textCursor(),true);\n        e->accept();\n        return;\n    } else if (e->key() == Qt::Key_Backtab) {\n        indentText(document(),textCursor(),false);\n        e->accept();\n        return;\n    }\n\n    if ( e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return ) {\n        if (this->autoIndent) {\n            indentEnter(textCursor());\n        } else {\n            e->accept();\n        }\n        emit update();\n        return;\n    }\n\n    if (this->autoBlock && e->key() == '{') {\n        QTextCursor cursor(this->textCursor());\n        cursor.insertText(\"{}\");\n        cursor.movePosition(QTextCursor::PreviousCharacter);\n        setTextCursor(cursor);\n        e->accept();\n        return;\n    }\n\n    if (!this->autoWord) {\n        QPlainTextEdit::keyPressEvent(e);\n        return;\n    }\n\n    bool isShortcut = ((e->modifiers() & Qt::ControlModifier) && e->key() == Qt::Key_E); // CTRL+E\n    if (!editCompleter || !isShortcut) // do not process the shortcut when we have a completer\n        QPlainTextEdit::keyPressEvent(e);\n\n    const bool ctrlOrShift = e->modifiers() & (Qt::ControlModifier | Qt::ShiftModifier);\n    if (!editCompleter || (ctrlOrShift && e->text().isEmpty()))\n        return;\n\n    static QString eow(\"~!@#$%^&*()+{}|:\\\"<>?,./;'[]\\\\-= \"); // end of word\n    bool hasModifier = (e->modifiers() != Qt::NoModifier) && !ctrlOrShift;\n\n    QString word = wordUnderCursor();\n    QString text = textUnderCursor();\n\n    if (editCompleter->underCursor(e->key(),textCursor(), text,word)) {\n        return;\n    }\n\n    if (!isShortcut && (hasModifier || e->text().isEmpty() || text.length() <= 2\n                        || eow.contains(e->text().right(1)))) {\n        editCompleter->hidePopup();\n        return;\n    }\n    editCompleter->showPopup(word);\n}\n\nvoid SyntaxTextEditor::insertCompletion(const QString& completion)\n{\n    if (editCompleter->widget() != this)\n        return;\n    QTextCursor tc = textCursor();\n    int extra = completion.length() - editCompleter->completionPrefix().length();\n    tc.movePosition(QTextCursor::Left);\n    tc.movePosition(QTextCursor::EndOfWord);\n    tc.insertText(completion.right(extra));\n    setTextCursor(tc);\n    editCompleter->endCompletion();\n}\n\nvoid SyntaxTextEditor::loadConfig(QSettings *settings, const QString &mimeType)\n{\n    autoIndent = settings->value(mimeType+\"/autoindent\",true).toBool();\n    autoBlock = settings->value(mimeType+\"/autoblock\",true).toBool();\n    curFont.setFamily(settings->value(mimeType+\"/family\",\"Courier\").toString());\n    curFont.setPointSize(settings->value(mimeType+\"/fontsize\",12).toInt());\n    setFont(curFont);\n    setTabStopWidth(fontMetrics().width(\"main\"));\n    autoWord = settings->value(mimeType+\"/autoword\",false).toBool();\n}\n\nvoid SyntaxTextEditor::highlightCurrentLine()\n{\n    QList<QTextEdit::ExtraSelection> extraSelections;\n\n    if (!isReadOnly()) {\n        QTextEdit::ExtraSelection selection;\n\n        QColor lineColor = QColor(180,200,200,128);\n\n        selection.format.setBackground(lineColor);\n        selection.format.setProperty(QTextFormat::FullWidthSelection, true);\n        selection.cursor = textCursor();\n        selection.cursor.clearSelection();\n        extraSelections.append(selection);\n    }\n\n    setExtraSelections(extraSelections);\n}\n\nvoid SyntaxTextEditor::gotoLine(int line, int column)\n{\n    const int blockNumber = line - 1;\n    const QTextBlock &block = document()->findBlockByNumber(blockNumber);\n    if (block.isValid()) {\n        QTextCursor cursor(block);\n        if (column > 0) {\n            cursor.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, column);\n        } else {\n            int pos = cursor.position();\n            while (document()->characterAt(pos).category() == QChar::Separator_Space) {\n                ++pos;\n            }\n            cursor.setPosition(pos);\n        }\n        setTextCursor(cursor);\n        centerCursor();\n    }\n}\n\nvoid SyntaxTextEditor::indentBlock(QTextBlock block, bool bIndent)\n{\n    QTextCursor cursor(block);\n    cursor.beginEditBlock();\n    cursor.movePosition(QTextCursor::StartOfBlock);\n    cursor.removeSelectedText();\n    if (bIndent) {\n        cursor.insertText(\"\\t\");\n    } else {\n        QString text = block.text();\n        if (!text.isEmpty() && (text.at(0) == '\\t' || text.at(0) == ' ')) {\n            cursor.deleteChar();\n        }\n    }\n    cursor.endEditBlock();\n}\n\nvoid SyntaxTextEditor::indentCursor(QTextCursor cur, bool bIndent)\n{\n    if (bIndent) {\n        cur.insertText(\"\\t\");\n    } else {\n        QString text = cur.block().text();\n        int pos = cur.position()-cur.block().position()-1;\n        int count = text.count();\n        if (count > 0 && pos >= 0 && pos < count) {\n            if (text.at(pos) == '\\t' || text.at(pos) == ' ') {\n                cur.deletePreviousChar();\n            }\n        }\n    }\n}\n\nvoid SyntaxTextEditor::indentText(QTextDocument *doc, QTextCursor cur, bool bIndent)\n{\n    cur.beginEditBlock();\n    if (!cur.hasSelection()) {\n        indentCursor(cur,bIndent);\n    } else {\n        QTextBlock block = doc->findBlock(cur.selectionStart());\n        QTextBlock end = doc->findBlock(cur.selectionEnd());\n        if (!cur.atBlockStart()) {\n            end = end.next();\n        }\n        do {\n            indentBlock(block,bIndent);\n            block = block.next();\n        } while (block.isValid() && block != end);\n    }\n    cur.endEditBlock();\n}\n\nvoid SyntaxTextEditor::indentEnter(QTextCursor cur)\n{\n    cur.beginEditBlock();\n    int pos = cur.position()-cur.block().position();\n    QString text = cur.block().text();\n    int i = 0;\n    int tab = 0;\n    int space = 0;\n    QString inText = \"\\n\";\n    while (i < text.size()) {\n        if (!text.at(i).isSpace())\n            break;\n        if (text.at(0) == ' ') {\n            space++;\n        }\n        else if (text.at(0) == '\\t') {\n            inText += \"\\t\";\n            tab++;\n        }\n        i++;\n    }\n    text.trimmed();\n    if (!text.isEmpty()) {\n        if (pos >= text.size()) {\n            const QChar ch = text.at(text.size()-1);\n            if (ch == '{' || ch == '(') {\n                inText += \"\\t\";\n            }\n        } else if (pos == text.size()-1 && text.size() >= 3) {\n            const QChar l = text.at(text.size()-2);\n            const QChar r = text.at(text.size()-1);            \n            if ( (l == '{' && r == '}') ||\n                 (l == '(' && r== ')') ) {\n                cur.insertText(inText);\n                int pos = cur.position();\n                cur.insertText(inText);\n                cur.setPosition(pos);\n                this->setTextCursor(cur);\n                cur.insertText(\"\\t\");\n                cur.endEditBlock();\n                return;\n            }\n        }\n    }\n    cur.insertText(inText);\n    cur.endEditBlock();\n    ensureCursorVisible();\n}\n\n"
  },
  {
    "path": "liteidex/src/plugins/syntaxeditor/syntaxtexteditor.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2013 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: syntaxtexteditor.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef SYNTAXTEXTEDITOR_H\n#define SYNTAXTEXTEDITOR_H\n\n#include <QPlainTextEdit>\n#include <QTextEdit>\n#include <QSettings>\n#include \"syntaxcompleter.h\"\n\nclass SyntaxTextEditor : public QPlainTextEdit\n{\n    Q_OBJECT\npublic:\n    void indentEnter(QTextCursor cur);\n    void indentText(QTextDocument *doc, QTextCursor cur, bool bIndent);\n    void indentBlock(QTextBlock block, bool bIndent);\n    void indentCursor(QTextCursor cur, bool bIndent);\n    void gotoLine(int line, int column);\n    QString wordUnderCursor() const;\n    QString textUnderCursor() const;\n    void setCompleter(SyntaxCompleter *c);\n    SyntaxCompleter *completer() const;\n    bool autoIndent;\n    bool autoBlock;\n    bool autoWord;\n    void areaPaintEvent(QPaintEvent *event);\n    SyntaxTextEditor(QWidget *parent = 0);\n    void newFile();\n    void reload();\n    QString currentText() { return curText; }\n    bool loadFile(const QString &fileName);\n    QByteArray data() const;\n    bool save();\n    bool saveAs();\n    bool saveFile(const QString &fileName);\n    QString userFriendlyCurrentFile();\n    QString currentFile() { return curFile; }\nsignals:\n    void update();\nprotected:\n    virtual void keyPressEvent(QKeyEvent *e);\n    virtual void focusInEvent(QFocusEvent *e);\n    virtual void closeEvent(QCloseEvent *event);\n    virtual void resizeEvent(QResizeEvent *e);\npublic:\n    int editorAreaWidth();\npublic slots:\n    void loadConfig(QSettings *settings, const QString &mimeType);\nprotected slots:\n    void highlightCurrentLine();\n    void insertCompletion(const QString& completion);\n    void updateAreaWidth(int newBlockCount);\n    void updateEditorArea(const QRect &, int);\npublic:\n    bool maybeSave();\n    void setCurrentFile(const QString &fileName);\n    QString strippedName(const QString &fullFileName);\n\n    QString curFile;\n    QString curText;\n    QFont   curFont;\n\n    bool isUntitled;\n    QWidget *editorArea;\n    SyntaxCompleter *editCompleter;\n};\n\nclass SyntaxTextEditorArea : public QWidget\n{\npublic:\n    SyntaxTextEditorArea(SyntaxTextEditor *ed) : QWidget(ed) {\n        editor = ed;\n    }\n\n    QSize sizeHint() const {\n        return QSize(editor->editorAreaWidth(), 0);\n    }\n\nprotected:\n    void paintEvent(QPaintEvent *event) {        \n        editor->areaPaintEvent(event);\n    }\n\nprivate:\n    SyntaxTextEditor *editor;\n};\n\n\n#endif // SYNTAXTEXTEDITOR_H\n"
  },
  {
    "path": "liteidex/src/plugins/terminal/terminal.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2020 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: terminal.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"terminal.h\"\n#include \"terminal_global.h\"\n#include \"../liteapp/liteapp_global.h\"\n#include \"vterm/vtermwidget.h\"\n#include \"vterm/vtermcolor.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include <QTabWidget>\n#include <QFileInfo>\n#include <QDir>\n#include <QTime>\n#include <QFontMetrics>\n#include <QHBoxLayout>\n#include <QVBoxLayout>\n#include <QToolBar>\n#include <QInputDialog>\n#include <QActionGroup>\n#include <QTemporaryFile>\n#include <QApplication>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n#ifdef Q_OS_WIN\nstatic Command makeCommand(const QString &name, const QString &path, const QStringList &args = QStringList(), const QStringList &loginArgs = QStringList())\n{\n    Command cmd;\n    cmd.name = name;\n    cmd.path = path;\n    cmd.args = args;\n    cmd.loginArgs = loginArgs;\n    return cmd;\n}\n\nstatic QString checkFile(const QStringList &dirList, const QString &filePath)\n{\n    foreach (QString root, dirList) {\n        QFileInfo info(root,filePath);\n        if (info.exists()) {\n            return QDir::toNativeSeparators(info.filePath());\n        }\n    }\n    return QString();\n}\n\nstatic QString GetWindowGitBash()\n{\n    QProcessEnvironment env = QProcessEnvironment::systemEnvironment();\n    QStringList dirList;\n    dirList << env.value(\"ProgramW6432\",\"C:\\\\Program Files\");\n    dirList << env.value(\"ProgramFiles\",\"C:\\\\Program Files\");\n    return checkFile(dirList,\"Git\\\\bin\\\\bash.exe\");\n}\n\n\nstatic QString GetWindowPowerShell()\n{\n    QProcessEnvironment env = QProcessEnvironment::systemEnvironment();\n    QStringList dirList;\n    dirList << env.value(\"windir\",\"C:\\\\Windows\");\n    return checkFile(dirList,\"System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe\");\n}\n\nstatic QString GetWindowsShell()\n{\n    QProcessEnvironment env = QProcessEnvironment::systemEnvironment();\n    QString windir = env.value(\"windir\",\"C:\\\\Windows\");\n    QFileInfo info(windir,\"System32\\\\cmd.exe\");\n    return QDir::toNativeSeparators(info.filePath());\n}\n#endif\n\nstatic QStringList GetUnixShellList()\n{\n    QFile f(\"/etc/shells\");\n    if (!f.open(QFile::ReadOnly)) {\n        return QStringList();\n    }\n    QStringList shells;\n    QString ar = QString::fromUtf8(f.readAll());\n    foreach (QString line, ar.split(\"\\n\")) {\n        line = line.trimmed();\n        if (line.isEmpty() || line.startsWith(\"#\")) {\n            continue;\n        }\n        int pos = line.indexOf(\"#\");\n        if (pos > 0) {\n            line = line.left(pos).trimmed();\n        }\n        shells << line;\n    }\n    return  shells;\n}\n\nTerminal::Terminal(LiteApi::IApplication *app, QObject *parent) : LiteApi::ITerminal(parent),\n    m_liteApp(app), m_indexId(0)\n{\n    qRegisterMetaType<TabInfoData>(\"TabInfoData\");\n    qRegisterMetaTypeStreamOperators<TabInfoData>(\"TabInfoData\");\n\n    m_widget = new QWidget;\n    m_tab = new LiteTabWidget(QSize(16,16));\n    m_tab->tabBar()->setTabsClosable(true);\n    m_tab->tabBar()->setElideMode(Qt::ElideNone);\n\n\n    QVBoxLayout *layout = new QVBoxLayout(m_widget);\n    layout->setMargin(0);\n    layout->setSpacing(0);\n    layout->addWidget(m_tab->tabBarWidget());\n    layout->addWidget(m_tab->stackedWidget());\n\n    m_newTabAct = new QAction(tr(\"New\"),this);\n    m_newTabAct->setToolTip(tr(\"Open a new terminal\"));\n    connect(m_newTabAct,SIGNAL(triggered()),this,SLOT(newTerminal()));\n    m_closeTabAct = new QAction(tr(\"Close\"),this);\n    m_closeTabAct->setToolTip(tr(\"Close current terminal\"));\n    connect(m_closeTabAct,SIGNAL(triggered()),this,SLOT(closeCurrenTab()));\n    m_closeAllTabAct = new QAction(tr(\"CloseAll\"),this);\n    m_closeAllTabAct->setToolTip(tr(\"Close all terminal\"));\n    connect(m_closeAllTabAct,SIGNAL(triggered()),this,SLOT(closeAllTab()));\n#ifndef Q_OS_WIN\n    m_loadEnvAct = new QAction(tr(\"LoadEnv\"),this);\n    m_loadEnvAct->setToolTip(tr(\"Current terminal load environment from LiteIDE\"));\n    connect(m_loadEnvAct,SIGNAL(triggered()),this,SLOT(tabLoadEnv()));\n#endif\n\n    QList<QAction*> actions;\n    m_filterMenu = new QMenu(tr(\"Filter\"));\n    m_filterMenu->setIcon(QIcon(\"icon:images/filter.png\"));\n#ifdef Q_OS_WIN\n    QString bash = GetWindowGitBash();\n    QString powershell = GetWindowPowerShell();\n    QString shell = GetWindowsShell();\n    m_cmdList.append(makeCommand(\"cmd\",shell));\n    if (!powershell.isEmpty()) {\n        m_cmdList.append(makeCommand(\"powershell\",powershell));\n    }\n    if (!bash.isEmpty()) {\n        m_cmdList.append(makeCommand(\"bash\",bash));\n    }\n#else\n    QStringList shellList = GetUnixShellList();\n    shellList.prepend(\"/bin/bash\");\n    shellList.removeDuplicates();\n    foreach (QString shell, shellList) {\n        QFileInfo info(shell);\n        if (!info.exists()) {\n            continue;\n        }\n        Command cmd;\n        cmd.name = info.fileName();\n        cmd.path = info.filePath();\n        cmd.loginArgs << \"-l\";\n        m_cmdList << cmd;\n    }\n#endif\n    m_curName = m_liteApp->settings()->value(TERMINAL_CURCMD,m_cmdList[0].name).toString();\n    m_darkMode = m_liteApp->settings()->value(TERMINAL_DARKMODE,false).toBool();\n    m_loginMode = m_liteApp->settings()->value(TERMINAL_LOGINSHELL,false).toBool();\n#ifdef Q_OS_WIN\n    m_loginMode = false;\n#endif\n\n    m_darkModeAct = new QAction(tr(\"Dark Mode\"),this);\n    m_darkModeAct->setCheckable(true);\n    m_darkModeAct->setChecked(m_darkMode);\n\n\n    m_newTabAct->setText(tr(\"New\")+\" [\"+m_curName+\"]\");\n\n    connect(m_darkModeAct,SIGNAL(toggled(bool)),this,SLOT(toggledDarkMode(bool)));\n\n    m_filterMenu->addAction(m_darkModeAct);\n#ifndef Q_OS_WIN\n    m_loginModeAct = new QAction(tr(\"Login Mode (shell --login)\"),this);\n    m_loginModeAct->setCheckable(true);\n    m_loginModeAct->setChecked(m_loginMode);\n    m_filterMenu->addAction(m_loginModeAct);\n    connect(m_loginModeAct,SIGNAL(toggled(bool)),this,SLOT(toggledLoginMode(bool)));\n#endif\n\n    if (m_cmdList.size() > 1) {\n        QActionGroup *group = new QActionGroup(this);\n        foreach (Command cmd, m_cmdList) {\n            QString info = cmd.name+\"\\t\"+cmd.path;\n            if (!cmd.args.isEmpty()) {\n                info += \" \"+cmd.args.join(\" \");\n            }\n            QAction *act = new QAction(info,this);\n            act->setData(cmd.name);\n            act->setCheckable(true);\n            act->setToolTip(cmd.path);\n            if (m_curName == cmd.name) {\n                act->setChecked(true);\n            }\n            group->addAction(act);\n        }\n        connect(group,SIGNAL(triggered(QAction*)),this,SLOT(triggeredCmd(QAction*)));\n        m_filterMenu->addSeparator();\n        m_filterMenu->addActions(group->actions());\n        actions << m_filterMenu->menuAction();\n    }\n\n    actions << m_newTabAct << m_closeTabAct << m_closeAllTabAct;\n#ifndef Q_OS_WIN\n    actions << m_loadEnvAct;\n#endif\n\n    m_listMenu = new QMenu;\n    m_listGroup = new QActionGroup(this);\n    m_tab->setListMenu(m_listMenu);\n    connect(m_listMenu,SIGNAL(aboutToShow()),this,SLOT(aboutToShowListMenu()));\n    connect(m_listGroup,SIGNAL(triggered(QAction*)),this,SLOT(triggeredListAction(QAction*)));\n\n\n    m_toolWindowAct = m_liteApp->toolWindowManager()->addToolWindow(Qt::BottomDockWidgetArea,m_widget,\"Terminal\",tr(\"Terminal\"),true,actions);\n    connect(m_toolWindowAct,SIGNAL(toggled(bool)),this,SLOT(visibilityChanged(bool)));\n    connect(m_tab,SIGNAL(tabCloseRequested(int)),this,SLOT(tabCloseRequested(int)));\n    connect(m_tab,SIGNAL(currentChanged(int)),this,SLOT(tabCurrentChanged(int)));\n\n    applyOption(OPTION_TERMIANL);\n\n    connect(m_liteApp,SIGNAL(loaded()),this,SLOT(appLoaded()));\n    connect(m_liteApp->optionManager(),SIGNAL(applyOption(QString)),this,SLOT(applyOption(QString)));\n#if QT_VERSION >= 0x050000\n//    connect(m_tab->tabBar(),SIGNAL(tabBarDoubleClicked(int)),this,SLOT(tabBarDoubleClicked(int)));\n#endif\n    applyOption(OPTION_LITEAPP);\n\n    m_liteApp->extension()->addObject(\"LiteApi.ITerminal\",this);\n\n    //m_fmctxOpenTerminalAct = new QAction(tr(\"Open in Integrated Terminal\"),this);\n    //connect(m_fmctxOpenTerminalAct,SIGNAL(triggered()),this,SLOT(fmctxOpenTerminal()));\n    //connect(m_liteApp->fileManager(),SIGNAL(aboutToShowFolderContextMenu(QMenu*,LiteApi::FILESYSTEM_CONTEXT_FLAG,QFileInfo,QString)),this,SLOT(aboutToShowFolderContextMenu(QMenu*,LiteApi::FILESYSTEM_CONTEXT_FLAG,QFileInfo,QString)));\n\n    qApp->installEventFilter(this);\n\n}\n\n#ifdef Q_OS_MAC\nstatic QMap<QString,QString> getProcessWorkDirList(const QStringList &pids)\n{\n    QString cmd = QString(\"lsof -a -p %1 -d cwd -Fn\").arg(pids.join(\",\"));\n    QMap<QString,QString> kv;\n    QProcess p;\n    p.start(cmd);\n    if (!p.waitForStarted(1000)) {\n        return kv;\n    }\n    if (!p.waitForFinished(3000)) {\n        p.kill();\n        return kv;\n    }\n    QByteArray ar = p.readAllStandardOutput();\n    QStringList lines = QString::fromUtf8(ar).split(\"\\n\",qtSkipEmptyParts);\n//    p4153\n//    fcwd\n//    n/Users/vfc\n    int index = 0;\n    foreach (QString line, lines) {\n        if (index %3 == 2) {\n            QString pid = lines[index-2];\n            if (line.startsWith(\"n\") && pid.startsWith(\"p\")) {\n                kv[pid.mid(1)] = line.mid(1);\n            }\n        }\n        index++;\n    }\n    return kv;\n}\n#elif defined(Q_OS_WIN)\nstatic QMap<QString,QString> getProcessWorkDirList(const QStringList &pids)\n{\n    QMap<QString,QString> kv;\n    return kv;\n}\n#else\nstatic QMap<QString,QString> getProcessWorkDirList(const QStringList &pids)\n{\n    QMap<QString,QString> kv;\n    if (QDir(\"/proc\").exists()) {\n        foreach (QString pid, pids) {\n            QFileInfo info(\"/proc/\"+pid+\"/cwd\");\n            if (info.isSymLink()) {\n                kv[pid] = info.symLinkTarget();\n            }\n        }\n    } else {\n//        pwdx 9194 9947\n//        9194: /home/my\n//        9947: /home/my\n        QString cmd = QString(\"pwdx %1\").arg(pids.join(\" \"));\n        QProcess p;\n        p.start(cmd);\n        if (!p.waitForStarted(1000)) {\n            return kv;\n        }\n        if (!p.waitForFinished(3000)) {\n            p.kill();\n            return kv;\n        }\n        QByteArray ar = p.readAllStandardOutput();\n        QStringList lines = QString::fromUtf8(ar).split(\"\\n\",qtSkipEmptyParts);\n        foreach (QString line, lines) {\n            QStringList ar = line.split(\":\",qtSkipEmptyParts);\n            QString path = ar[1].trimmed();\n            if (ar.size() == 2 && path.startsWith(\"/\")) {\n                kv[ar[0].trimmed()] = path;\n            }\n        }\n    }\n    return kv;\n}\n#endif\n\n\nTerminal::~Terminal()\n{\n    m_liteApp->settings()->beginGroup(\"terminal/tabs\");\n    m_liteApp->settings()->remove(\"\");\n    QStringList pids;\n    for (int i = 0; i < m_tab->count(); i++) {\n        TabInfoData data = m_tab->tabData(i).value<TabInfoData>();\n        if (!data.pid.isEmpty()) {\n            pids << data.pid;\n        }\n    }\n    // check pid\n    QMap<QString,QString> kv = getProcessWorkDirList(pids);\n    for (int i = 0; i < m_tab->count(); i++) {\n        QString key = QString(\"%1\").arg(i);\n        TabInfoData data = m_tab->tabData(i).value<TabInfoData>();\n        data.title = m_tab->tabBar()->tabText(i);\n        if (!data.pid.isEmpty()) {\n            QString dir = kv[data.pid];\n            if (!dir.isEmpty()) {\n                data.dir = dir;\n                data.title = makeTitle(QFileInfo(dir).fileName());\n            }\n        }\n        m_liteApp->settings()->setValue(key,QVariant::fromValue(data));\n    }\n\n    m_liteApp->settings()->endGroup();\n\n    closeAllTab();\n\n    m_listMenu->clear();\n    delete m_listMenu;\n    delete m_filterMenu;\n    qDeleteAll(m_listGroup->actions());\n    delete m_listGroup;\n    delete m_tab;\n    delete m_widget;\n}\n\nvoid Terminal::openDefaultTerminal(const QString &workDir)\n{\n    m_toolWindowAct->setChecked(true);\n\n    QString dir = QDir::cleanPath(QDir::fromNativeSeparators(workDir));\n\n    for (int i = 0; i < m_tab->count(); i++) {\n        TabInfoData data = m_tab->tabData(i).value<TabInfoData>();\n        QString pwd = getTabCurrentWorkDir(i); // check current work dir is same\n        if (data.dir == dir && pwd == dir && data.cmd == m_curName) {\n            if (!data.open) {\n                m_tab->setCurrentIndex(i);\n                return;\n            } else {\n                VTermWidget *widget = (VTermWidget*)m_tab->widget(i);\n                if (widget && widget->process()->processList() == 1) {\n                    m_tab->setCurrentIndex(i);\n                    widget->setFocus();\n                    return;\n                }\n            }\n        }\n    }\n\n\n    QString cmdName = m_curName;\n    //QString title = QString(\"%1 %2\").arg(m_curName).arg(++m_indexId);\n    dir = QDir::toNativeSeparators(workDir);\n    //openNewTerminal(cmdName,m_loginMode,title,dir,env);\n    VTermWidget *term = new VTermWidget(m_liteApp, m_terminalFont, m_widget);\n\n    QString title = makeTitle(QFileInfo(dir).fileName());\n    int index = m_tab->addTab(term,title,dir);\n    m_tab->setCurrentIndex(index);\n    openTerminal(index,term,cmdName,m_loginMode,dir);\n}\n\nvoid Terminal::appLoaded()\n{\n    QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\n    m_liteApp->settings()->beginGroup(\"terminal/tabs\");\n    foreach(QString key,m_liteApp->settings()->childKeys()) {\n        TabInfoData data = m_liteApp->settings()->value(key).value<TabInfoData>();\n        if (!data.cmd.isEmpty() && !data.title.isEmpty()) {\n            VTermWidget *widget = new VTermWidget(m_liteApp,m_terminalFont, m_widget);\n            int index = m_tab->addTab(widget,data.title,QDir::toNativeSeparators(data.dir));\n            data.open = false;\n            m_tab->setTabData(index,QVariant::fromValue(data));\n        }\n    }\n    m_liteApp->settings()->endGroup();\n    m_indexId = m_tab->count();\n    if (m_tab->count() >= 1) {\n        m_tab->setCurrentIndex(m_tab->count()-1);\n    }\n}\n\nvoid Terminal::aboutToShowListMenu()\n{\n    m_listMenu->clear();\n    QList<QAction*> actions = m_listGroup->actions();\n    qDeleteAll(actions);\n\n    for (int i = 0; i < m_tab->count(); i++) {\n        TabInfoData data = m_tab->tabData(i).value<TabInfoData>();\n        QString info;\n        if (data.login) {\n            info = QString(\"%1\\t[%2 --login]\").arg(m_tab->tabText(i),data.cmd);\n        } else {\n            info = QString(\"%1\\t[%2]\").arg(m_tab->tabText(i),data.cmd);\n        }\n        QAction *act = new QAction(info,m_listGroup);\n        act->setData(i);\n        act->setCheckable(true);\n        m_listGroup->addAction(act);\n        if (m_tab->currentIndex() == i) {\n            act->setChecked(true);\n        }\n    }\n    m_listMenu->addActions(m_listGroup->actions());\n}\n\nvoid Terminal::triggeredListAction(QAction *act)\n{\n    int index = act->data().toInt();\n    m_tab->setCurrentIndex(index);\n}\n\nvoid Terminal::aboutToShowFolderContextMenu(QMenu *menu, LiteApi::FILESYSTEM_CONTEXT_FLAG flag, const QFileInfo &info,const QString &context)\n{\n//    menu->addSeparator();\n//    menu->addAction(m_fmctxOpenTerminalAct);\n//    m_fmctxFileInfo = info;\n}\n\nvoid Terminal::fmctxOpenTerminal()\n{\n    QString dir;\n    if (m_fmctxFileInfo.isDir()) {\n        dir = m_fmctxFileInfo.filePath();\n    } else {\n        dir = m_fmctxFileInfo.path();\n    }\n    openDefaultTerminal(dir);\n}\n\nvoid Terminal::updateFont()\n{\n    QString fontFamily = m_liteApp->settings()->value(TERMINAL_FAMILY,TERMINAL_FAMILY_DEFAULT).toString();\n    int fontSize = m_liteApp->settings()->value(TERMINAL_FONTSIZE,12).toInt();\n    int fontZoom = m_liteApp->settings()->value(TERMINAL_FONTZOOM,100).toInt();\n    bool antialias = m_liteApp->settings()->value(TERMINAL_ANTIALIAS,true).toBool();\n\n\n    if (!QFontDatabase().hasFamily(fontFamily)) {\n#if QT_VERSION >= 0x050200\n        fontFamily = QFontDatabase::systemFont(QFontDatabase::FixedFont).family();\n#else\n        fontFamily = QApplication::font().family();\n#endif\n    }\n    m_terminalFont.setFamily(fontFamily);\n    m_terminalFont.setPointSize(fontSize*fontZoom/100.0);\n    if (antialias) {\n        m_terminalFont.setStyleStrategy(QFont::PreferAntialias);\n    } else {\n        m_terminalFont.setStyleStrategy(QFont::NoAntialias);\n    }\n}\n\n\nCommand Terminal::lookupCommand(const QString &name)\n{\n    foreach(Command cmd, m_cmdList) {\n        if (cmd.name == name) {\n            return  cmd;\n        }\n    }\n    return m_cmdList[0];\n}\n\nvoid Terminal::openTerminal(int index, VTermWidget *term, const QString &cmdName, bool login, const QString &workdir)\n{\n    Command cmd = lookupCommand(cmdName);\n\n    term->setFocus();\n    term->updateGeometry();\n    term->setDarkMode(m_darkMode);\n\n    connect(term,SIGNAL(titleChanged(QString)),this,SLOT(termTitleChanged(QString)));\n    connect(term,SIGNAL(exited()),this,SLOT(termExited()));\n    connect(term,SIGNAL(started()),this,SLOT(termStarted()));\n\n    // check valid or home\n    QString dir;\n    if (QDir(workdir).exists()) {\n        dir = workdir;\n    } else {\n        dir = QDir::homePath();\n    }\n    dir = QDir::cleanPath(dir);\n\n    QString info;\n    QString attr;\n    if (!cmd.loginArgs.isEmpty()) {\n        if (login) {\n            attr = \"login shell\";\n        } else {\n            attr = \"non-login shell\";\n        }\n    } else {\n        login = false;\n        attr = \"open shell\";\n    }\n    info = QString(\"%1: %2 [%3] in %4\").arg(QTime::currentTime().toString(\"hh:mm:ss\")).arg(attr).arg(cmd.path).arg(dir);\n\n    term->inputWrite(term_color(info,TERM_COLOR_DEFAULT,TERM_COLOR_DEFAULT,TERM_ATTR_BOLD).toUtf8());\n    term->inputWrite(\"\\r\\n\");\n    if (login) {\n        term->inputWrite(term_color(\"Warning, the Login Shell Go environment may be different from LiteIDE.\",TERM_COLOR_RED,TERM_COLOR_DEFAULT,TERM_ATTR_BOLD).toUtf8());\n        term->inputWrite(\"\\r\\n\");\n        term->inputWrite(term_color(\"Please use LoadEnv action to load environment from LiteIDE if need.\",TERM_COLOR_RED,TERM_COLOR_DEFAULT,TERM_ATTR_BOLD).toUtf8());\n        term->inputWrite(\"\\r\\n\");\n    }\n\n    QStringList args = cmd.args;\n    QProcessEnvironment env;\n    if (login) {\n        args.append(cmd.loginArgs);\n        env = QProcessEnvironment::systemEnvironment();\n    } else {\n        env = LiteApi::getGoEnvironment(m_liteApp);\n    }\n\n    TabInfoData data;\n    data.cmd = cmdName;\n    data.dir = QDir::fromNativeSeparators(dir);\n    data.login = login;\n\n    m_tab->setTabData(index,QVariant::fromValue(data));\n\n    term->start(cmd.path,args,dir,env.toStringList());\n\n    data.open = true;\n    data.pid = QString(\"%1\").arg(term->process()->pid());\n\n    m_tab->setTabData(index,QVariant::fromValue(data));\n}\n\nQString Terminal::makeTitle(const QString &baseName) const\n{\n    bool rename = false;\n    int index = 0;\n    for (int i = 0; i < m_tab->count(); i++) {\n        QString name = m_tab->tabText(i);\n        if (name == baseName) {\n            rename = true;\n            index++;\n        }\n        if (name.startsWith(baseName+\" (\")) {\n            index++;\n        }\n    }\n    if (!rename) {\n        return baseName;\n    }\n    return QString(\"%1 (%2)\").arg(baseName).arg(index);\n}\n\nQString Terminal::getTabCurrentWorkDir(int index) const\n{\n    TabInfoData data = m_tab->tabData(index).value<TabInfoData>();\n    if (!data.open) {\n        return data.dir;\n    }\n    VTermWidget *widget = static_cast<VTermWidget*>(m_tab->widget(index));\n    QString pid = QString(\"%1\").arg(widget->process()->pid());\n    QMap<QString,QString> kv = getProcessWorkDirList(QStringList() << pid);\n    QString dir = kv[pid];\n    if (!dir.isEmpty()) {\n        return dir;\n    }\n    return data.dir;\n}\n\nbool Terminal::eventFilter(QObject *obj, QEvent *e)\n{\n    switch (e->type()) {\n    case QEvent::ShortcutOverride:\n        if (qApp->focusWidget() == m_tab->currentWidget() && static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape) {\n            e->accept();\n        }\n        break;\n    }\n    return QObject::eventFilter(obj,e);\n}\n\nvoid Terminal::newTerminal()\n{\n    QString cmdName = m_curName;\n    //QString title = QString(\"%1 %2\").arg(m_curName).arg(++m_indexId);\n    QString dir;\n    LiteApi::IEditor *editor = m_liteApp->editorManager()->currentEditor();\n    if (editor && !editor->filePath().isEmpty()) {\n        dir = QFileInfo(editor->filePath()).path();\n    }\n    if (dir.isEmpty()) {\n        dir = QDir::homePath();\n    }\n    dir = QDir::toNativeSeparators(dir);\n    QString title = makeTitle(QFileInfo(dir).fileName());\n    //openNewTerminal(cmdName,m_loginMode,title,dir,env);\n    VTermWidget *term = new VTermWidget(m_liteApp, m_terminalFont, m_widget);\n    int index = m_tab->addTab(term,title,QDir::toNativeSeparators(dir));\n\n    m_tab->setCurrentIndex(index);\n    openTerminal(index,term,cmdName,m_loginMode,dir);\n}\n\nvoid Terminal::tabLoadEnv()\n{\n    int index = m_tab->currentIndex();\n    if (index >= 0) {\n        this->loadEnv(index);\n    }\n}\n\nvoid Terminal::visibilityChanged(bool b)\n{\n    if (!b) {\n        return;\n    }\n    if (m_tab->count() == 0) {\n        newTerminal();\n    }\n    QWidget *widget = m_tab->currentWidget();\n    if (widget) {\n        widget->setFocus();\n    }\n    //deploy load\n    tabCurrentChanged(m_tab->currentIndex());\n}\n\nvoid Terminal::termExited()\n{\n    VTermWidget *widget = static_cast<VTermWidget*>(sender());\n    int index = m_tab->indexOf(widget);\n    if (index >= 0) {\n        m_tab->removeTab(index);\n    }\n    widget->deleteLater();\n}\n\nvoid Terminal::termStarted()\n{\n//    VTermWidget *widget = static_cast<VTermWidget*>(sender());\n//    int index = m_tab->indexOf(widget);\n//    if (index >= 0) {\n//        this->loadEnv(index);\n//    }\n}\n\nvoid Terminal::loadEnv(int index)\n{\n    VTermWidget *widget = static_cast<VTermWidget*>(m_tab->widget(index));\n    if (widget->process()->processList() > 1) {\n        return;\n    }\n    TabInfoData data = m_tab->tabData(index).value<TabInfoData>();\n    QTemporaryFile file;\n    file.setAutoRemove(false);\n    if (file.open()) {\n        QProcessEnvironment env = LiteApi::getGoEnvironment(m_liteApp);\n        QStringList list;\n        foreach (QString key, env.keys()) {\n            if (key.contains(\"(\")) {\n                continue;\n            }\n            list << QString(\"export %1=\\\"%2\\\"\").arg(key).arg(env.value(key));\n        }\n        file.write(\"#!/bin/sh\\n\");\n        file.write(\"echo \\\"load environment form LiteIDE.\\\"\");\n        file.write(\"\\n\");\n        file.write(list.join(\"\\n\").toUtf8());\n        file.write(\"\\n\");\n        file.write(\"rm \"+file.fileName().toUtf8());\n        file.write(\"\\n\");\n        file.close();\n    }\n    file.setPermissions(file.permissions() | QFile::ExeUser | QFile::ExeOwner);\n    widget->process()->write(\"source \"+file.fileName().toUtf8()+\"\\n\");\n}\n\nvoid Terminal::termTitleChanged(QString title)\n{\n    VTermWidget *widget = static_cast<VTermWidget*>(sender());\n    int index = m_tab->indexOf(widget);\n    if (index >= 0) {\n        m_tab->setTabToolTip(index,title);\n    }\n}\n\nvoid Terminal::tabCloseRequested(int index)\n{\n    VTermWidget *widget = static_cast<VTermWidget*>(m_tab->widget(index));\n    m_tab->removeTab(index);\n    if (widget) {\n        this->disconnect(widget,0,this,0);\n        widget->deleteLater();\n    }\n}\n\nvoid Terminal::tabCurrentChanged(int index)\n{\n    //deploy load\n    if (!m_widget->isVisible()) {\n        return;\n    }\n    TabInfoData data = m_tab->tabData(index).value<TabInfoData>();\n    if (data.cmd.isEmpty()) {\n        return;\n    }\n    if (data.open) {\n        VTermWidget *term = static_cast<VTermWidget*>(m_tab->widget(index));\n        term->setFocus();\n        return;\n    }\n    data.open = true;\n    m_tab->setTabData(index,QVariant::fromValue(data));\n    VTermWidget *term = static_cast<VTermWidget*>(m_tab->widget(index));\n    openTerminal(index,term,data.cmd,data.login,data.dir);\n}\n\nvoid Terminal::tabBarDoubleClicked(int index)\n{\n    QString text = m_tab->tabText(index);\n    bool ok = false;\n    text = QInputDialog::getText(m_widget,tr(\"Terminal\"),tr(\"Rename Tab Title\"),QLineEdit::Normal,text,&ok);\n    if (ok && !text.isEmpty()) {\n        m_tab->setTabText(index,text);\n        TabInfoData data = m_tab->tabData(index).value<TabInfoData>();\n        data.title = text;\n        m_tab->setTabData(index,QVariant::fromValue(data));\n    }\n}\n\nvoid Terminal::closeCurrenTab()\n{\n    int index = m_tab->currentIndex();\n    if (index >= 0) {\n        tabCloseRequested(index);\n    }\n}\n\nvoid Terminal::closeAllTab()\n{\n    for (int i = m_tab->count()-1; i >= 0; i--) {\n        VTermWidget *widget = static_cast<VTermWidget*>(m_tab->widget(i));\n        m_tab->removeTab(i);\n        if (widget) {\n            disconnect(widget,0,this,0);\n            widget->deleteLater();\n        }\n    }\n}\n\nvoid Terminal::triggeredCmd(QAction *act)\n{\n    m_curName = act->data().toString();\n    m_liteApp->settings()->setValue(TERMINAL_CURCMD,m_curName);\n    m_newTabAct->setText(tr(\"New\")+ \" [\"+m_curName+\"]\");\n}\n\nvoid Terminal::toggledDarkMode(bool checked)\n{\n    m_darkMode = checked;\n    m_liteApp->settings()->setValue(TERMINAL_DARKMODE,m_darkMode);\n}\n\nvoid Terminal::toggledLoginMode(bool checked)\n{\n    m_loginMode = checked;\n    m_liteApp->settings()->setValue(TERMINAL_LOGINSHELL,m_loginMode);\n}\n\nvoid Terminal::applyOption(const QString &opt)\n{\n    if (opt == OPTION_TERMIANL) {\n        updateFont();\n    } else if (opt == OPTION_LITEAPP) {\n#ifdef Q_OS_MAC\n#if QT_VERSION >= 0x050900\n    QString qss = m_liteApp->settings()->value(LITEAPP_QSS,\"default.qss\").toString();\n    if (qss == \"default.qss\") {\n        m_tab->tabBar()->setStyleSheet(\n                    \"QTabBar::tab {\"\n                    \"border: 1px solid #C4C4C3;\"\n                    \"border-bottom-color: #C2C7CB; /* same as the pane color */\"\n                    \"min-width: 8ex;\"\n                    \"padding: 4px 2px 4px 2px;\"\n                    \"}\"\n                    \"QTabBar::close-button:hover,QTabBar::close-button:selected {\"\n                    \"margin: 0px;\"\n                    \"image: url(:/images/close.png);\"\n                    \"subcontrol-position: left;\"\n                    \"padding: 1px;\"\n                    \"}\"\n                    \"QTabBar::tab:selected, QTabBar::tab:hover {\"\n                    \"background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\"\n                    \"stop: 0 #fafafa, stop: 0.4 #f4f4f4,\"\n                    \"stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);\"\n                    \"}\"\n                    \"QTabBar::tab:selected {\"\n                    \"border-color: #9B9B9B;\"\n                    \"border-bottom-color: #C2C7CB; /* same as pane color */\"\n                    \"}\"\n                    \"QTabBar::tab:!selected {\"\n                    \"margin-top: 2px; /* make non-selected tabs look smaller */\"\n                    \"}\");\n    } else {\n      m_tab->tabBar()->setStyleSheet(\"QTabBar::close-button:hover,QTabBar::close-button:selected {margin: 0px; image: url(:/images/close.png); subcontrol-position: left; }\");\n    }\n#endif\n#endif\n    }\n}\n"
  },
  {
    "path": "liteidex/src/plugins/terminal/terminal.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2022 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: terminal.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef TERMINAL_H\n#define TERMINAL_H\n\n#include \"liteapi/liteapi.h\"\n#include \"terminalapi/terminalapi.h\"\n#include \"tabwidget/litetabwidget.h\"\n#include <QProcessEnvironment>\n\nclass QTabWidget;\nclass VTermWidget;\nclass QAction;\nclass QActionGroup;\n\nstruct Command\n{\n    QString     name;\n    QString     path;\n    QStringList args;\n    QStringList loginArgs;\n    QString     info;\n};\n\nstruct TabInfoData\n{\n    QString cmd;   //command name\n    QString dir;   //work dir\n    QString title; // tab title\n    QString pid; //process id\n    bool    login; // --login\n    bool    open;  // open terminal\n};\n\ninline QDataStream &operator<<(QDataStream &s, const TabInfoData &data)\n{\n    s << data.cmd;\n    s << data.dir;\n    s << data.title;\n    s << data.login;\n    return s;\n}\n\ninline QDataStream &operator>>(QDataStream &s, TabInfoData &data)\n{\n    s >> data.cmd;\n    s >> data.dir;\n    s >> data.title;\n    s >> data.login;\n    return s;\n}\n\nQ_DECLARE_METATYPE(TabInfoData)\n\nclass Terminal : public LiteApi::ITerminal\n{\n    Q_OBJECT\npublic:\n    explicit Terminal(LiteApi::IApplication *app, QObject *parent);\n    virtual ~Terminal();\n    virtual void openDefaultTerminal(const QString &workDir);\n    void openTerminal(int index, VTermWidget *term, const QString &cmdName, bool login, const QString &workdir);\n    Command lookupCommand(const QString &name);\n    QString makeTitle(const QString &baseName) const;\n    QString getTabCurrentWorkDir(int index) const;\n    bool eventFilter(QObject *obj, QEvent *e);\n    void loadEnv(int index);\nsignals:\n\npublic slots:\n    void newTerminal();\n    void tabLoadEnv();\n    void visibilityChanged(bool b);\n    void termExited();\n    void termStarted();\n    void termTitleChanged(QString title);\n    void tabCloseRequested(int index);\n    void tabCurrentChanged(int index);\n    void tabBarDoubleClicked(int index);\n    void closeCurrenTab();\n    void closeAllTab();\n    void triggeredCmd(QAction* act);\n    void toggledDarkMode(bool checked);\n    void toggledLoginMode(bool checked);\n    void applyOption(const QString &opt);\n    void appLoaded();\n    void aboutToShowListMenu();\n    void triggeredListAction(QAction* act);\n    void aboutToShowFolderContextMenu(QMenu* menu, LiteApi::FILESYSTEM_CONTEXT_FLAG flag, const QFileInfo &info, const QString &context);\n    void fmctxOpenTerminal();\n    void updateFont();\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QWidget *m_widget;\n    LiteTabWidget *m_tab;\n    QMenu *m_filterMenu;\n    QAction *m_toolWindowAct;\n    QAction *m_newTabAct;\n    QAction *m_closeTabAct;\n    QAction *m_closeAllTabAct;\n    QAction *m_loadEnvAct;\n    QAction *m_darkModeAct;\n    QAction *m_loginModeAct;\n    QMenu   *m_listMenu;\n    QActionGroup *m_listGroup;\n    QList<Command> m_cmdList;\n    QString  m_curName;\n    QFileInfo m_fmctxFileInfo;\n    //QAction *m_fmctxOpenTerminalAct;\n    bool m_darkMode;\n    bool m_loginMode;\n    int m_indexId;\n    QFont m_terminalFont;\n};\n\n#endif // TERMINAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/terminal/terminal.pro",
    "content": "TARGET = terminal\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude(../../api/terminalapi/terminalapi.pri)\ninclude(../../utils/vterm/vterm.pri)\ninclude(../../utils/tabwidget/tabwidget.pri)\n\nDEFINES += TERMINAL_LIBRARY\n\nwin32 {\n    QT += network\n}\n\nSOURCES += terminalplugin.cpp \\\n    terminal.cpp \\\n    terminaloption.cpp \\\n    terminaloptionfactory.cpp\n\nHEADERS += terminalplugin.h\\\n        terminal.h \\\n        terminal_global.h \\\n        terminaloption.h \\\n        terminaloptionfactory.h\n\nFORMS += \\\n    terminaloption.ui\n"
  },
  {
    "path": "liteidex/src/plugins/terminal/terminal_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2020 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: terminal_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef TERMINAL_GLOBAL_H\n#define TERMINAL_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(TERMINAL_LIBRARY)\n#  define TERMINALSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define TERMINALSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#define TERMINAL_CURCMD \"terminal/curcmd\"\n#define TERMINAL_DARKMODE \"terminal/darkmode\"\n#define TERMINAL_LOGINSHELL \"terminal/loginshell\"\n\n#define OPTION_TERMIANL \"option/terminal\"\n\n#define TERMINAL_FAMILY \"terminal/family\"\n#define TERMINAL_FONTSIZE \"terminal/fontsize\"\n#define TERMINAL_FONTZOOM \"terminal/fontzoom\"\n#define TERMINAL_ANTIALIAS \"terminal/antialias\"\n\n#if defined(Q_OS_WIN)\n    #define TERMINAL_FAMILY_DEFAULT \"Courier\"\n#elif defined(Q_OS_LINUX)\n    #define TERMINAL_FAMILY_DEFAULT \"DejaVu Sans Mono\"\n#elif defined(Q_OS_MAC)\n    #define TERMINAL_FAMILY_DEFAULT \"Menlo\"\n#else\n    #define TERMINAL_FAMILY_DEFAULT \"Monospace\"\n#endif\n\n\n\n\n#endif // TERMINAL_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/terminal/terminaloption.cpp",
    "content": "#include \"terminaloption.h\"\n#include \"ui_terminaloption.h\"\n#include \"terminal_global.h\"\n#include <QFontDatabase>\n#include <QApplication>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nTerminalOption::TerminalOption(LiteApi::IApplication *app,QObject *parent) :\n    LiteApi::IOption(parent),\n    m_liteApp(app),\n    m_widget(new QWidget),\n    ui(new Ui::TermianlOption)\n{\n    ui->setupUi(m_widget);\n}\n\nTerminalOption::~TerminalOption()\n{\n    delete m_widget;\n    delete ui;\n}\n\nQWidget *TerminalOption::widget()\n{\n    return m_widget;\n}\n\nQString TerminalOption::name() const\n{\n    return \"Terminal\";\n}\n\nQString TerminalOption::mimeType() const\n{\n    return OPTION_TERMIANL;\n}\n\nvoid TerminalOption::save()\n{\n    m_fontFamily = ui->fontComboBox->currentText();\n    if (ui->sizeComboBox->count()) {\n        const QString curSize = ui->sizeComboBox->currentText();\n        bool ok = true;\n        int size = curSize.toInt(&ok);\n        if (ok) {\n            m_fontSize = size;\n        }\n    }\n\n    int fontZoom = ui->fontZoomSpinBox->value();\n    if (fontZoom <= 10) {\n        fontZoom = 10;\n    }\n    m_liteApp->settings()->setValue(TERMINAL_FAMILY,m_fontFamily);\n    m_liteApp->settings()->setValue(TERMINAL_FONTSIZE,m_fontSize);\n    m_liteApp->settings()->setValue(TERMINAL_FONTZOOM,fontZoom);\n\n    bool antialias = ui->antialiasCheckBox->isChecked();\n    m_liteApp->settings()->setValue(TERMINAL_ANTIALIAS,antialias);\n}\n\nvoid TerminalOption::load()\n{\n    m_fontFamily = m_liteApp->settings()->value(TERMINAL_FAMILY,TERMINAL_FAMILY_DEFAULT).toString();\n    m_fontSize = m_liteApp->settings()->value(TERMINAL_FONTSIZE,12).toInt();\n    int fontZoom = m_liteApp->settings()->value(TERMINAL_FONTZOOM,100).toInt();\n    bool antialias = m_liteApp->settings()->value(TERMINAL_ANTIALIAS,true).toBool();\n\n    ui->antialiasCheckBox->setChecked(antialias);\n\n    if (!QFontDatabase().hasFamily(m_fontFamily)) {\n#if QT_VERSION >= 0x050200\n        m_fontFamily = QFontDatabase::systemFont(QFontDatabase::FixedFont).family();\n#else\n        m_fontFamily = QApplication::font().family();\n#endif\n    }\n    ui->fontComboBox->setEditText(m_fontFamily);\n    int index = ui->fontComboBox->findText(m_fontFamily);\n    if (index >= 0) {\n        ui->fontComboBox->setCurrentIndex(index);\n    }\n\n    updatePointSizes();\n\n    ui->fontZoomSpinBox->setValue(fontZoom);\n}\n\nvoid TerminalOption::updatePointSizes()\n{\n    // Update point sizes\n    const int oldSize = m_fontSize;\n    if (ui->sizeComboBox->count()) {\n        ui->sizeComboBox->clear();\n    }\n    const QList<int> sizeLst = pointSizesForSelectedFont();\n    int idx = 0;\n    int i = 0;\n    for (; i < sizeLst.count(); ++i) {\n        if (idx == 0 && sizeLst.at(i) >= oldSize)\n            idx = i;\n        ui->sizeComboBox->addItem(QString::number(sizeLst.at(i)));\n    }\n    if (ui->sizeComboBox->count())\n        ui->sizeComboBox->setCurrentIndex(idx);\n}\n\nQList<int> TerminalOption::pointSizesForSelectedFont() const\n{\n    QFontDatabase db;\n    const QString familyName = ui->fontComboBox->currentText();\n    QList<int> sizeLst = db.pointSizes(familyName);\n    if (!sizeLst.isEmpty())\n        return sizeLst;\n\n    QStringList styles = db.styles(familyName);\n    if (!styles.isEmpty())\n        sizeLst = db.pointSizes(familyName, styles.first());\n    if (sizeLst.isEmpty())\n        sizeLst = QFontDatabase::standardSizes();\n\n    return sizeLst;\n}\n\n"
  },
  {
    "path": "liteidex/src/plugins/terminal/terminaloption.h",
    "content": "#ifndef TERMINALOPTION_H\n#define TERMINALOPTION_H\n\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class TermianlOption;\n}\n\nclass TerminalOption : public LiteApi::IOption\n{\n    Q_OBJECT\n\npublic:\n    explicit TerminalOption(LiteApi::IApplication *app, QObject *parent = 0);\n    ~TerminalOption();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void load();\n    virtual void save();\n    void updatePointSizes();\n    QList<int> pointSizesForSelectedFont() const;\nprivate:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget           *m_widget;\n    Ui::TermianlOption *ui;\n    QString m_fontFamily;\n    int     m_fontSize;\n};\n\n#endif // TERMINALOPTION_H\n"
  },
  {
    "path": "liteidex/src/plugins/terminal/terminaloption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>TermianlOption</class>\n <widget class=\"QWidget\" name=\"TermianlOption\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>645</width>\n    <height>138</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n  <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\n   <item>\n    <widget class=\"QGroupBox\" name=\"groupBox_7\">\n     <property name=\"title\">\n      <string>Font</string>\n     </property>\n     <layout class=\"QHBoxLayout\" name=\"horizontalLayout_8\">\n      <item>\n       <widget class=\"QLabel\" name=\"label_2\">\n        <property name=\"text\">\n         <string>Family:</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QFontComboBox\" name=\"fontComboBox\">\n        <property name=\"fontFilters\">\n         <set>QFontComboBox::MonospacedFonts</set>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QLabel\" name=\"label_7\">\n        <property name=\"text\">\n         <string>Size:</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QComboBox\" name=\"sizeComboBox\">\n        <property name=\"sizePolicy\">\n         <sizepolicy hsizetype=\"Preferred\" vsizetype=\"Fixed\">\n          <horstretch>0</horstretch>\n          <verstretch>0</verstretch>\n         </sizepolicy>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QLabel\" name=\"label_8\">\n        <property name=\"text\">\n         <string>Zoom:</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QSpinBox\" name=\"fontZoomSpinBox\">\n        <property name=\"suffix\">\n         <string>%</string>\n        </property>\n        <property name=\"minimum\">\n         <number>10</number>\n        </property>\n        <property name=\"maximum\">\n         <number>1000</number>\n        </property>\n        <property name=\"singleStep\">\n         <number>10</number>\n        </property>\n        <property name=\"value\">\n         <number>100</number>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <widget class=\"QCheckBox\" name=\"antialiasCheckBox\">\n        <property name=\"text\">\n         <string>Antialias</string>\n        </property>\n       </widget>\n      </item>\n      <item>\n       <spacer name=\"horizontalSpacer_5\">\n        <property name=\"orientation\">\n         <enum>Qt::Horizontal</enum>\n        </property>\n        <property name=\"sizeHint\" stdset=\"0\">\n         <size>\n          <width>40</width>\n          <height>20</height>\n         </size>\n        </property>\n       </spacer>\n      </item>\n     </layout>\n    </widget>\n   </item>\n   <item>\n    <spacer name=\"verticalSpacer\">\n     <property name=\"orientation\">\n      <enum>Qt::Vertical</enum>\n     </property>\n     <property name=\"sizeHint\" stdset=\"0\">\n      <size>\n       <width>20</width>\n       <height>40</height>\n      </size>\n     </property>\n    </spacer>\n   </item>\n  </layout>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/plugins/terminal/terminaloptionfactory.cpp",
    "content": "#include \"terminal_global.h\"\n#include \"terminaloption.h\"\n#include \"terminaloptionfactory.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nTerminalOptionFactory::TerminalOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n}\n\nQStringList TerminalOptionFactory::mimeTypes() const\n{\n    return QStringList() << OPTION_TERMIANL;\n}\n\nLiteApi::IOption *TerminalOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == OPTION_TERMIANL) {\n        return new TerminalOption(m_liteApp,this);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/plugins/terminal/terminaloptionfactory.h",
    "content": "#ifndef TERMINALOPTIONFACTORY_H\n#define TERMINALOPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass TerminalOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n    TerminalOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // TERMINALOPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/plugins/terminal/terminalplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2022 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: terminalplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"terminalplugin.h\"\n#include \"terminal.h\"\n#include \"terminaloptionfactory.h\"\n#include <QtPlugin>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nTerminalPlugin::TerminalPlugin()\n{\n}\n\nbool TerminalPlugin::load(LiteApi::IApplication *app)\n{\n    new Terminal(app,this);\n    app->optionManager()->addFactory(new TerminalOptionFactory(app,this));\n    return true;\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/terminal/terminalplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2020 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: terminalplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef TERMINALPLUGIN_H\n#define TERMINALPLUGIN_H\n\n#include \"terminal_global.h\"\n#include \"liteapi/liteapi.h\"\n\nclass TerminalPlugin : public LiteApi::IPlugin\n{\npublic:\n    TerminalPlugin();\n    virtual bool load(LiteApi::IApplication *app);\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<TerminalPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.TerminalPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/Terminal\");\n        m_info->setVer(\"X38.3\");\n        m_info->setName(\"Terminal\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setInfo(\"Terminal\");\n        m_info->setMustLoad(true);\n        m_info->appendDepend(\"plugin/liteenv\");\n    }\n};\n\n\n#endif // TERMINALPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/webkithtmlwidget/webkitbrowser.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: webkitbrowser.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"webkitbrowser.h\"\n#include \"cmark/libcmark.h\"\n#include <QWebView>\n#include <QNetworkProxyFactory>\n#include <QToolBar>\n#include <QLineEdit>\n#include <QVBoxLayout>\n#include <QFile>\n#include <QFileInfo>\n#include <QStatusBar>\n#include <QProgressBar>\n#include <QRegExp>\n#include <QTextCodec>\n#include <QFileDialog>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nWebKitBrowser::WebKitBrowser(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IWebKitBrowser(parent), m_liteApp(app)\n{        \n    QNetworkProxyFactory::setUseSystemConfiguration(true);\n\n    m_widget = new QWidget;\n    m_view = new QWebView;\n    m_view->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);\n\n    m_locationEdit = new QLineEdit;\n    m_locationEdit->setSizePolicy(QSizePolicy::Expanding, m_locationEdit->sizePolicy().verticalPolicy());\n    connect(m_locationEdit, SIGNAL(returnPressed()), this,SLOT(changeLocation()));\n    connect(m_view, SIGNAL(loadFinished(bool)), this,SIGNAL(loadFinished(bool)));\n    connect(m_view, SIGNAL(loadFinished(bool)), this, SLOT(loadUrlFinished(bool)));\n    connect(m_view, SIGNAL(linkClicked(QUrl)),this, SLOT(linkClicked(QUrl)));\n    connect(m_view->page(), SIGNAL(linkHovered(QString,QString,QString)),this,SLOT(linkHovered(QString,QString,QString)));\n    connect(m_view,SIGNAL(statusBarMessage(QString)),this,SLOT(statusBarMessage(QString)));\n    connect(m_view,SIGNAL(loadStarted()),this,SLOT(loadStarted()));\n    connect(m_view,SIGNAL(loadProgress(int)),this,SLOT(loadProgress(int)));\n\n    QToolBar *toolBar = new QToolBar(tr(\"Navigation\"));\n    toolBar->setIconSize(QSize(16,16));\n\n    QAction *openFile = new QAction(tr(\"Open Html File\"),this);\n    openFile->setIcon(QIcon(\"icon:images/openfile.png\"));\n    connect(openFile,SIGNAL(triggered()),this,SLOT(openHtmlFile()));\n    toolBar->addAction(openFile);\n    toolBar->addSeparator();\n    toolBar->addAction(m_view->pageAction(QWebPage::Back));\n    toolBar->addAction(m_view->pageAction(QWebPage::Forward));\n    QAction *reload = m_view->pageAction(QWebPage::Reload);\n    toolBar->addAction(reload);\n    connect(reload,SIGNAL(triggered()),this,SLOT(reloadUrl()));\n    toolBar->addAction(m_view->pageAction(QWebPage::Stop));\n    toolBar->addWidget(m_locationEdit);\n\n    m_progressBar = new QProgressBar;\n    m_progressBar->hide();\n    m_progressBar->setRange(0,100);\n\n    QVBoxLayout *layout = new QVBoxLayout;\n    layout->setMargin(0);\n    layout->setSpacing(0);\n\n    layout->addWidget(toolBar);\n    layout->addWidget(m_view);\n    layout->addWidget(m_progressBar);\n\n    m_widget->setLayout(layout);\n\n    m_liteApp->extension()->addObject(\"LiteApp.IWebKitBrowser\",this);\n}\n\nWebKitBrowser::~WebKitBrowser()\n{\n    if (m_progressBar) {\n        delete m_progressBar;\n    }\n    if (m_widget) {\n        delete m_widget;\n    }\n}\n\nQWidget *WebKitBrowser::widget()\n{\n    return m_widget;\n}\n\nQString WebKitBrowser::name() const\n{\n    return tr(\"WebKitBrowser\");\n}\n\nQString WebKitBrowser::mimeType() const\n{\n    return \"browser/webkit\";\n}\n\nvoid WebKitBrowser::openUrl(const QUrl &url)\n{\n    loadUrl(url);\n}\n\nstatic QByteArray html_data =\n\"<html>\"\n\"<head>\"\n\"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\"/>\"\n\"<title>__HTML_TITLE__</title>\"\n\"</head>\"\n\"<body>\"\n\"__HTML_CONTENT__\"\n\"</body>\"\n\"</html>\";\n\nvoid WebKitBrowser::changeLocation()\n{\n    QString text = m_locationEdit->text();\n    if (text.isEmpty()) {\n        return;\n    }\n    if (!text.startsWith(\"http:\") &&\n            !text.startsWith(\"file:\") &&\n            !text.startsWith(\"https:\")) {\n        text = \"http://\"+text;\n    }\n    loadUrl(text);\n}\n\nvoid WebKitBrowser::adjustLocation()\n{\n    m_locationEdit->setText(m_view->url().toString());\n}\n\nvoid WebKitBrowser::loadUrlFinished(bool b)\n{\n    m_progressBar->hide();\n    QString url = m_view->url().toString();\n    if (b) {\n        m_locationEdit->setText(url);\n    } else {\n        QString context = QString(tr(\"False load %1 !\")).arg(url);\n    #if QT_VERSION >= 0x050000\n        QString html = context.toHtmlEscaped();\n    #else\n        QString html = Qt::escape(context);\n    #endif\n        QString data = html_data;\n        data.replace(\"__HTML_TITLE__\",\"LoadFalse\");\n        data.replace(\"__HTML_CONTENT__\",QString(\"<pre>%1</pre>\").arg(html));\n        m_view->setHtml(data,url);\n    }\n}\n\nvoid WebKitBrowser::linkClicked(QUrl url)\n{\n    this->loadUrl(url);\n}\n\nvoid WebKitBrowser::loadUrl(const QUrl &url)\n{\n    m_liteApp->mainWindow()->statusBar()->clearMessage();\n    if (url.scheme() == \"http\" || url.scheme() == \"https\") {\n        m_view->load(url);\n    } else if (url.scheme() == \"file\") {\n        QFileInfo info(url.toLocalFile());\n#ifdef Q_OS_WIN\n        QString file = info.filePath();\n        if (file.length() > 4 && file[0] == '/' && file[1] == '/' &&\n                file[2].isLetter() && file[3] == '/') {\n            info.setFile(file[2]+\":\"+file.right(file.length()-3));\n        }\n#endif\n        if (info.exists()) {\n            QFile file(info.filePath());\n            if (file.open(QFile::ReadOnly)) {\n                QByteArray ba = file.readAll();\n                QString ext = info.suffix().toLower();\n                if (ext == \"html\" || ext == \"htm\") {\n                    //QTextCodec *codec = QTextCodec::codecForHtml(ba,QTextCodec::codecForName(\"utf-8\"));\n                    //m_view->setHtml(codec->toUnicode(ba),url);\n                    m_view->load(url);\n                } else if (ext == \"md\") {\n                    QString data = html_data;\n                    data.replace(\"__HTML_TITLE__\",info.fileName());\n                    data.replace(\"__HTML_CONTENT__\",QString::fromUtf8(md2html(ba)));\n                    m_view->setHtml(data,url);\n                } else {\n                    QTextCodec *codec = QTextCodec::codecForUtfText(ba,QTextCodec::codecForName(\"utf-8\"));\n                #if QT_VERSION >= 0x050000\n                    QString html = codec->toUnicode(ba).toHtmlEscaped();\n                #else\n                    QString html = Qt::escape(codec->toUnicode(ba));\n                #endif\n                    QString data = html_data;\n                    data.replace(\"__HTML_TITLE__\",info.fileName());\n                    data.replace(\"__HTML_CONTENT__\",QString(\"<pre>%1</pre>\").arg(html));\n                    m_view->setHtml(data,url);\n                }\n            }\n        }\n    }\n    m_view->setFocus();\n}\n\nvoid WebKitBrowser::linkHovered(const QString & link, const QString & /*title*/, const QString & /*textContent*/)\n{\n   m_liteApp->mainWindow()->statusBar()->showMessage(link);\n}\n\nvoid WebKitBrowser::statusBarMessage(const QString &msg)\n{\n    m_liteApp->mainWindow()->statusBar()->showMessage(msg);\n}\n\nvoid WebKitBrowser::loadStarted()\n{\n    m_progressBar->show();\n}\n\nvoid WebKitBrowser::loadProgress(int value)\n{\n    m_progressBar->setValue(value);\n}\n\nvoid WebKitBrowser::openHtmlFile()\n{    \n    QString dir = m_liteApp->settings()->value(\"WebKitBrowser/home\",\"\").toString();\n    QString filePath = QFileDialog::getOpenFileName(m_liteApp->mainWindow(),tr(\"Open Html or Markdown File\"),dir,\n                                                    \"Html or Markdown File (*.html *.htm *.md *.markdown);;Html File (*.html *.htm);; Markdown File (*.md *.markdown)\");\n    if (!filePath.isEmpty()) {\n        m_liteApp->settings()->setValue(\"WebKitBrowser/home\",QFileInfo(filePath).absolutePath());\n        loadUrl(QUrl::fromLocalFile(filePath));\n    }\n}\n\nvoid WebKitBrowser::reloadUrl()\n{\n    this->loadUrl(m_view->url());\n}\n"
  },
  {
    "path": "liteidex/src/plugins/webkithtmlwidget/webkitbrowser.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: webkitbrowser.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef WEBKITBROWSER_H\n#define WEBKITBROWSER_H\n\n#include \"liteapi/liteapi.h\"\n#include <QWidget>\n#include <QUrl>\n\nclass QWebView;\nclass QToolBar;\nclass QLineEdit;\nclass QProgressBar;\nclass WebKitBrowser : public LiteApi::IWebKitBrowser\n{\n    Q_OBJECT\npublic:\n    explicit WebKitBrowser(LiteApi::IApplication *app, QObject *parent = 0);\n    ~WebKitBrowser();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void openUrl(const QUrl &url);\npublic slots:\n    void changeLocation();\n    void adjustLocation();\n    void loadUrlFinished(bool);\n    void linkClicked(QUrl);\n    void loadUrl(const QUrl &url);\n    void linkHovered(const QString & link, const QString & title, const QString & textContent);\n    void statusBarMessage(const QString &msg);\n    void loadStarted();\n    void loadProgress(int);\n    void openHtmlFile();\n    void reloadUrl();\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QWidget  *m_widget;\n    QToolBar *m_toolBar;\n    QLineEdit *m_locationEdit;\n    QWebView *m_view;\n    QProgressBar *m_progressBar;\n};\n\n#endif // WEBKITBROWSER_H\n"
  },
  {
    "path": "liteidex/src/plugins/webkithtmlwidget/webkithtmlwidget.pro",
    "content": "TARGET = webkithtmlwidget\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\ninclude (../../3rdparty/cmark/cmark.pri)\n\ngreaterThan(QT_MAJOR_VERSION, 4) {\nQT += webkitwidgets\n} else {\nQT += network\nQT += webkit\n}\n\nDEFINES += WEBKITHTMLWIDGET_LIBRARY\n\nSOURCES += webkithtmlwidgetplugin.cpp \\\n    webviewhtmlwidget.cpp \\\n    webkitbrowser.cpp\n\nHEADERS += webkithtmlwidgetplugin.h\\\n        webkithtmlwidget_global.h \\\n    webviewhtmlwidget.h \\\n    webkitbrowser.h\n"
  },
  {
    "path": "liteidex/src/plugins/webkithtmlwidget/webkithtmlwidget_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: webkithtmlwidget_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef WEBKITHTMLWIDGET_GLOBAL_H\n#define WEBKITHTMLWIDGET_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(WEBKITHTMLWIDGET_LIBRARY)\n#  define WEBKITHTMLWIDGETSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define WEBKITHTMLWIDGETSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#endif // WEBKITHTMLWIDGET_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/webkithtmlwidget/webkithtmlwidgetplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: webkithtmlwidgetplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"webkithtmlwidgetplugin.h\"\n#include \"webviewhtmlwidget.h\"\n#include \"webkitbrowser.h\"\n#include <QtPlugin>\n#include <QFileDialog>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nWebKitHtmlWidgetPlugin::WebKitHtmlWidgetPlugin()\n{\n}\n\nbool WebKitHtmlWidgetPlugin::load(LiteApi::IApplication *app)\n{\n    m_liteApp = app;\n    LiteApi::IHtmlWidgetFactory *factory = new WebViewHtmlWidgetFactory(this);\n    app->htmlWidgetManager()->addFactory(factory);\n    app->htmlWidgetManager()->setDefaultClassName(factory->className());\n    /*\n    WebKitBrowser *wb = new WebKitBrowser(app,this);\n    app->toolWindowManager()->addToolWindow(Qt::RightDockWidgetArea,\n                                            wb->widget(),\"WebKitBrowser\",tr(\"WebKitBrowser\"),\n                                            false);\n    */\n    m_browser = new WebKitBrowser(app,this);\n    m_browserAct = app->editorManager()->registerBrowser(m_browser);\n    app->actionManager()->insertViewMenu(LiteApi::ViewMenuBrowserPos,m_browserAct);\n    //\n//    QMenu *fileMenu = app->actionManager()->loadMenu(\"menu/file\");\n//    IActionContext *actionContext =  app->actionManager()->getActionContext(app,\"App\");\n//    LiteApi::ActionInfo *info = actionContext->actionInfo(\"AddFolder\");\n//    if (fileMenu && info && info->action) {\n//        QAction *openUrl = new QAction(tr(\"Open File With WebKit ...\"),this);\n//        connect(openUrl,SIGNAL(triggered()),this,SLOT(openHtmlWithWebkit()));\n//        fileMenu->insertAction(info->action,openUrl);\n//    }\n    return true;\n}\n\nvoid WebKitHtmlWidgetPlugin::openHtmlWithWebkit()\n{\n    QString dir = m_liteApp->settings()->value(\"WebKitBrowser/home\",\"\").toString();\n    QString filePath = QFileDialog::getOpenFileName(m_liteApp->mainWindow(),tr(\"Open Html or Markdown File\"),dir,\n                                                    \"Html or Markdown File (*.html *.htm *.md *.markdown);;Html File (*.html *.htm);; Markdown File (*.md *.markdown)\");\n    if (!filePath.isEmpty()) {\n        m_liteApp->settings()->setValue(\"WebKitBrowser/home\",QFileInfo(filePath).absolutePath());\n        m_liteApp->editorManager()->activeBrowser(m_browser);\n        m_browser->loadUrl(QUrl::fromLocalFile(filePath));\n    }\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/webkithtmlwidget/webkithtmlwidgetplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: webkithtmlwidgetplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef WEBKITHTMLWIDGETPLUGIN_H\n#define WEBKITHTMLWIDGETPLUGIN_H\n\n#include \"webkithtmlwidget_global.h\"\n#include \"liteapi/liteapi.h\"\n\nclass WebKitBrowser;\nclass WebKitHtmlWidgetPlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    WebKitHtmlWidgetPlugin();\n    virtual bool load(LiteApi::IApplication *app);\npublic slots:\n    void openHtmlWithWebkit();\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    WebKitBrowser *m_browser;\n    QAction *m_browserAct;\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<WebKitHtmlWidgetPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.WebKitHtmlWidgetPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setVer(\"X23\");\n        m_info->setId(\"plugin/WebKitHtmlWidget\");\n        m_info->setName(\"WebKitHtmlWidget\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setInfo(\"QtWebKit Support\");\n    }\n};\n\n\n#endif // WEBKITHTMLWIDGETPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/plugins/webkithtmlwidget/webviewhtmlwidget.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: webviewhtmlwidget.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"webviewhtmlwidget.h\"\n\n#include <QWebView>\n#include <QWebPage>\n#include <QWebFrame>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nWebViewHtmlWidget::WebViewHtmlWidget(QObject *parent) :\n    IHtmlWidget(parent)\n{\n    m_widget = new QWebView;\n    m_widget->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);\n    connect(m_widget,SIGNAL(linkClicked(QUrl)),this,SIGNAL(linkClicked(QUrl)));\n    connect(m_widget->page(),SIGNAL(linkHovered(QString,QString,QString)),this,SLOT(webLinkHovered(QString,QString,QString)));\n    connect(m_widget->page(),SIGNAL(loadFinished(bool)),this,SIGNAL(loadFinished(bool)));\n    connect(m_widget->page()->mainFrame(),SIGNAL(contentsSizeChanged(QSize)),this,SIGNAL(contentsSizeChanged()));\n}\n\nWebViewHtmlWidget::~WebViewHtmlWidget()\n{\n //   if (m_widget) {\n //       delete m_widget;\n //   }\n}\n\nQWidget *WebViewHtmlWidget::widget() const\n{\n    return m_widget;\n}\n\nQString WebViewHtmlWidget::className() const\n{\n    return \"QWebView\";\n}\n\nvoid WebViewHtmlWidget::setSearchPaths(const QStringList&)\n{\n}\n\nvoid WebViewHtmlWidget::setHtml(const QString &html, const QUrl &url)\n{\n    m_widget->setHtml(html,url);\n}\n\nQUrl WebViewHtmlWidget::url() const\n{\n    return m_widget->url();\n}\n\nvoid WebViewHtmlWidget::clear()\n{\n    m_widget->setHtml(\"\");\n}\n\nvoid WebViewHtmlWidget::scrollToAnchor(const QString &anchor)\n{\n    m_widget->page()->mainFrame()->scrollToAnchor(anchor);\n    emit anchorChanged(anchor);\n}\n\nvoid WebViewHtmlWidget::setScrollBarValue(Qt::Orientation orientation, int value)\n{\n    m_widget->page()->mainFrame()->setScrollBarValue(orientation,value);\n}\n\nint WebViewHtmlWidget::scrollBarValue(Qt::Orientation orientation) const\n{\n    return m_widget->page()->mainFrame()->scrollBarValue(orientation);\n}\n\nint WebViewHtmlWidget::scrollBarMinimum(Qt::Orientation orientation) const\n{\n    return m_widget->page()->mainFrame()->scrollBarMinimum(orientation);\n}\n\nint WebViewHtmlWidget::scrollBarMaximum(Qt::Orientation orientation) const\n{\n    return m_widget->page()->mainFrame()->scrollBarMaximum(orientation);\n}\n\nQString WebViewHtmlWidget::selectedText() const\n{\n    return m_widget->selectedText();\n}\n\nbool WebViewHtmlWidget::findText(const QString &exp, QTextDocument::FindFlags options)\n{\n    QWebPage::FindFlags flag = QWebPage::HighlightAllOccurrences;\n    if ( (options & QTextDocument::FindBackward) == QTextDocument::FindBackward) {\n        flag |= QWebPage::FindBackward;\n    }\n    if ( (options & QTextDocument::FindCaseSensitively) == QTextDocument::FindCaseSensitively ) {\n        flag |= QWebPage::FindCaseSensitively;\n    }\n    return m_widget->findText(exp,flag);\n}\n\n#ifndef QT_NO_PRINTER\nvoid WebViewHtmlWidget::print(QPrinter *printer)\n{\n    m_widget->print(printer);\n}\n#endif\n\nvoid WebViewHtmlWidget::webLinkHovered(const QString &link, const QString&, const QString&)\n{\n    emit linkHovered(QUrl(link));\n}\n\nWebViewHtmlWidgetFactory::WebViewHtmlWidgetFactory(QObject *parent) :\n    IHtmlWidgetFactory(parent)\n{\n}\n\nQString WebViewHtmlWidgetFactory::className() const\n{\n    return \"QWebView\";\n}\n\nIHtmlWidget *WebViewHtmlWidgetFactory::create(QObject *parent)\n{\n    return new WebViewHtmlWidget(parent);\n}\n\nIHtmlDocument *WebViewHtmlWidgetFactory::createDocument(QObject *parent)\n{\n    return new WebPageHtmlDocument(parent);\n}\n\n\nWebPageHtmlDocument::WebPageHtmlDocument(QObject *parent) :\n    IHtmlDocument(parent)\n{\n    m_doc = new QWebPage(this);\n    connect(m_doc->mainFrame(),SIGNAL(loadFinished(bool)),this,SIGNAL(loadFinished(bool)));\n}\n\nWebPageHtmlDocument::~WebPageHtmlDocument()\n{\n    delete m_doc;\n}\n\nvoid WebPageHtmlDocument::setHtml(const QString &html, const QUrl &url)\n{\n    m_doc->mainFrame()->setHtml(html,url);\n}\n\n#ifndef QT_NO_PRINTER\nvoid WebPageHtmlDocument::print(QPrinter *printer)\n{\n    m_doc->mainFrame()->print(printer);\n}\n#endif\n\nQString WebPageHtmlDocument::toHtml() const\n{\n    return m_doc->mainFrame()->toHtml();\n}\n\nQString WebPageHtmlDocument::toPlainText() const\n{\n    return m_doc->mainFrame()->toPlainText();\n}\n"
  },
  {
    "path": "liteidex/src/plugins/webkithtmlwidget/webviewhtmlwidget.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: webviewhtmlwidget.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef WEBVIEWHTMLWIDGET_H\n#define WEBVIEWHTMLWIDGET_H\n\n#include \"liteapi/litehtml.h\"\n\nusing namespace LiteApi;\nclass QWebView;\nclass QWebPage;\n\nclass WebViewHtmlWidget : public IHtmlWidget\n{\n    Q_OBJECT\npublic:\n    WebViewHtmlWidget(QObject *parent);\n    ~WebViewHtmlWidget();\npublic:\n    virtual QWidget *widget() const;\n    virtual QString className() const;\n    virtual void setSearchPaths(const QStringList &paths);\n    virtual void setHtml(const QString &html, const QUrl &url);\n    virtual QUrl url() const;\n    virtual void clear();\n    virtual void scrollToAnchor(const QString &anchor);\n    virtual void setScrollBarValue(Qt::Orientation orientation, int value);\n    virtual int scrollBarValue(Qt::Orientation orientation) const;\n    virtual int scrollBarMinimum(Qt::Orientation orientation) const;\n    virtual int scrollBarMaximum(Qt::Orientation orientation) const;\n    virtual QString selectedText() const;\n    virtual bool findText(const QString & exp, QTextDocument::FindFlags options = 0 );\npublic slots:\n#ifndef QT_NO_PRINTER\n    virtual void print(QPrinter *printer);\n#endif\nprotected slots:\n    void webLinkHovered(const QString &link, const QString &title, const QString &textContent);\nprotected:\n    QWebView *m_widget;\n};\n\nclass WebPageHtmlDocument : public IHtmlDocument\n{\n    Q_OBJECT\npublic:\n    WebPageHtmlDocument(QObject *parent);\n    virtual ~WebPageHtmlDocument();\npublic:\n    virtual void setHtml(const QString &html, const QUrl &url);\npublic slots:\n#ifndef QT_NO_PRINTER\n    virtual void print(QPrinter *printer);\n#endif\n    virtual QString\ttoHtml () const;\n    virtual QString\ttoPlainText () const;\nprotected:\n    QWebPage *m_doc;\n};\n\nclass WebViewHtmlWidgetFactory : public IHtmlWidgetFactory\n{\n    Q_OBJECT\npublic:\n    WebViewHtmlWidgetFactory(QObject *parent = 0);\n    virtual QString className() const;\n    virtual IHtmlWidget *create(QObject *parent);\n    virtual IHtmlDocument  *createDocument(QObject *parent);\n};\n\n\n#endif // WEBVIEWHTMLWIDGET_H\n"
  },
  {
    "path": "liteidex/src/plugins/welcome/litedoc.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litedoc.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"litedoc.h\"\n#include \"documentbrowser/documentbrowser.h\"\n#include \"htmlutil/htmlutil.h\"\n#include \"cmark/libcmark.h\"\n\n#include <QAction>\n#include <QMenu>\n#include <QFile>\n#include <QTextCodec>\n#include <QFileInfo>\n#include <QDir>\n#include <QPlainTextEdit>\n#include <QDesktopServices>\n#include <QApplication>\n#include <QStatusBar>\n#include <QComboBox>\n#include <QUrl>\n#if QT_VERSION >= 0x050000\n#include <QUrlQuery>\n#endif\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\n\nLiteDoc::LiteDoc(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::ILiteDoc(parent),\n    m_liteApp(app)\n{\n    m_docBrowser = new DocumentBrowser(app,this);\n    m_docBrowser->urlComboBox()->setEditable(false);\n    m_docBrowser->setName(tr(\"LiteIDE Documentation\"));\n    QStringList paths;\n    paths << m_liteApp->resourcePath()+\"/welcome\" << localePath(m_liteApp->resourcePath()+\"/welcome\");\n    m_docBrowser->setSearchPaths(paths);\n\n    m_browserAct = m_liteApp->editorManager()->registerBrowser(m_docBrowser);\n    //m_liteApp->actionManager()->insertViewMenu(LiteApi::ViewMenuBrowserPos,m_browserAct);\n\n    connect(m_docBrowser,SIGNAL(requestUrl(QUrl)),this,SLOT(openUrl(QUrl)));\n    connect(m_docBrowser,SIGNAL(linkHovered(QUrl)),this,SLOT(highlighted(QUrl)));\n\n    QString path = localeFile(m_liteApp->resourcePath()+\"/welcome/liteide.html\");\n    QFile file(path);\n    if (file.open(QIODevice::ReadOnly)) {\n        m_templateData = QString::fromUtf8(file.readAll());\n        file.close();\n    }\n\n    m_liteApp->extension()->addObject(\"LiteApi.ILiteDoc\",this);    \n}\n\nstatic QString getAppLocale()\n{\n    return qApp->property(\"liteide_locale\").toString();\n}\n\nQString LiteDoc::localeFile(const QString &fileName)\n{\n    QString locale = getAppLocale();\n    if (locale.isEmpty()) {\n        locale = \"en\";\n    }\n    QFileInfo info(fileName);\n    QString path = info.absolutePath()+\"/\"+locale+\"/\"+info.fileName();\n    if (QFileInfo(path).exists()) {\n        return path;\n    }\n    return info.absolutePath()+\"/en/\"+info.fileName();;\n}\n\nQString LiteDoc::localePath(const QString &path)\n{\n    QString locale = getAppLocale();\n    if (locale.isEmpty()) {\n        locale = \"en\";\n    }\n    QDir dir(path+\"/\"+locale);\n    if (dir.exists()) {\n        return dir.path();\n    }\n    return path+\"/en\";\n}\n\nvoid LiteDoc::activeBrowser()\n{\n    m_liteApp->editorManager()->activeBrowser(m_docBrowser);\n}\n\nQUrl LiteDoc::parserUrl(const QUrl &_url)\n{\n    QDir root(localePath(m_liteApp->resourcePath()+\"/welcome\"));\n    QUrl url = _url;\n    if (url.isRelative() && !url.path().isEmpty()) {\n        QFileInfo info;\n        if (url.path().at(0) == '/') {\n            info.setFile(root,url.path().right(url.path().length()-1));\n        } else if (m_lastUrl.scheme() == \"file\") {\n            info.setFile(QFileInfo(m_lastUrl.toLocalFile()).absoluteDir(),url.path());\n        }\n        if (info.exists() && info.isFile()) {\n            url.setScheme(\"file\");\n            url.setPath(info.filePath());\n        }\n    }\n    return url;\n}\n\nvoid LiteDoc::openUrl(const QUrl &_url)\n{\n    m_liteApp->mainWindow()->statusBar()->clearMessage();\n\n    QUrl url = parserUrl(_url);\n    if (url.scheme() == \"file\") {\n        openUrlFile(url);\n    } else if (url.scheme() == \"http\" ||\n               url.scheme() == \"https\" ||\n               url.scheme() == \"mailto\") {\n        QDesktopServices::openUrl(url);\n    }\n}\n\nvoid LiteDoc::highlighted(const QUrl &url)\n{\n    m_liteApp->mainWindow()->statusBar()->showMessage(url.toString());\n}\n\nvoid LiteDoc::openUrlFile(const QUrl &url)\n{\n    QFileInfo info(url.toLocalFile());\n    if (!info.exists()) {\n        info.setFile(url.path());\n    }\n    QString ext = info.suffix().toLower();\n    if (ext == \"html\") {\n        QFile file(info.filePath());\n        if (file.open(QIODevice::ReadOnly)) {\n            QByteArray ba = file.readAll();\n            file.close();\n            if (info.fileName().compare(\"docs.html\",Qt::CaseInsensitive) == 0) {\n                updateHtmlDoc(url,ba,QString(),false);\n            } else {\n                updateHtmlDoc(url,ba);\n            }\n        }\n    } else if (ext == \"md\") {\n        QFile file(info.filePath());\n        if (file.open(QIODevice::ReadOnly)) {\n            QByteArray ba = md2html(file.readAll());\n            updateHtmlDoc(url,ba);\n        }\n    } else if (ext == \"go\") {\n        LiteApi::IEditor *editor = m_liteApp->fileManager()->openEditor(info.filePath());\n        if (editor) {\n            editor->setReadOnly(true);\n            QPlainTextEdit *ed = LiteApi::findExtensionObject<QPlainTextEdit*>(editor,\"LiteApi.QPlainTextEdit\");\n#if QT_VERSION >= 0x050000\n            if (ed && QUrlQuery(url).hasQueryItem(\"s\")) {\n                QStringList pos =  QUrlQuery(url).queryItemValue(\"s\").split(\":\");\n#else\n            if (ed && url.hasQueryItem(\"s\")) {\n                QStringList pos = url.queryItemValue(\"s\").split(\":\");\n#endif\n                if (pos.length() == 2) {\n                    bool ok = false;\n                    int begin = pos.at(0).toInt(&ok);\n                    if (ok) {\n                        QTextCursor cur = ed->textCursor();\n                        cur.setPosition(begin);\n                        ed->setTextCursor(cur);\n                        ed->centerCursor();\n                    }\n                }\n            }\n        }\n    } else if (ext == \"pdf\") {\n        QDesktopServices::openUrl(info.filePath());\n    } else {\n        QFile file(info.filePath());\n        if (file.open(QIODevice::ReadOnly)) {\n            QByteArray ba = file.readAll();\n            updateTextDoc(url,ba,info.fileName());\n        }\n    }\n}\n\nvoid LiteDoc::updateTextDoc(const QUrl &url, const QByteArray &ba, const QString &header)\n{\n    m_lastUrl = url;\n    QTextCodec *codec = QTextCodec::codecForUtfText(ba,QTextCodec::codecForName(\"utf-8\"));\n#if QT_VERSION >= 0x050000\n    QString html = codec->toUnicode(ba).toHtmlEscaped();\n#else\n    QString html = Qt::escape(codec->toUnicode(ba));\n#endif\n    QString data = m_templateData;\n    data.replace(\"{header}\",header);\n    data.replace(\"{nav}\",\"\");\n    data.replace(\"{content}\",QString(\"<pre>%1</pre>\").arg(html));\n    m_docBrowser->setUrlHtml(url,data);\n\n}\n\nvoid LiteDoc::updateHtmlDoc(const QUrl &url, const QByteArray &ba, const QString &header, bool toNav)\n{\n    m_lastUrl = url;\n    QTextCodec *codec = QTextCodec::codecForName(\"utf-8\");\n    QString genHeader;\n    QString nav;\n    QString content = HtmlUtil::docToNavdoc(codec->toUnicode(ba),genHeader,nav);\n    QString data = m_templateData;\n\n    if (!header.isEmpty()) {\n        data.replace(\"{header}\",header);\n    } else {\n        data.replace(\"{header}\",genHeader);\n    }\n    if (toNav) {\n        data.replace(\"{nav}\",nav);\n    } else {\n        data.replace(\"{nav}\",\"\");\n    }\n    data.replace(\"{content}\",content);\n    m_docBrowser->setUrlHtml(url,data);\n}\n"
  },
  {
    "path": "liteidex/src/plugins/welcome/litedoc.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litedoc.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEDOC_H\n#define LITEDOC_H\n\n#include \"liteapi/liteapi.h\"\n#include \"extension/extension.h\"\n#include <QUrl>\n\nclass DocumentBrowser;\n\nnamespace LiteApi {\n\nclass ILiteDoc : public IObject\n{\n    Q_OBJECT\npublic:\n    ILiteDoc(QObject *parent) : IObject(parent) {}\npublic slots:\n    virtual void openUrl(const QUrl &url) = 0;\n    virtual void activeBrowser() = 0;\n};\n\n}\n\nclass LiteDoc : public LiteApi::ILiteDoc\n{\n    Q_OBJECT\npublic:\n    explicit LiteDoc(LiteApi::IApplication *app, QObject *parent = 0);\n    static QString localeFile(const QString &fileName);\n    static QString localePath(const QString &path);\n    virtual void activeBrowser();\npublic slots:\n    virtual void openUrl(const QUrl &url);\n    void highlighted(const QUrl &url);\nprotected:\n    void openUrlFile(const QUrl &url);\n    void updateTextDoc(const QUrl &url, const QByteArray &ba, const QString &header);\n    void updateHtmlDoc(const QUrl &url, const QByteArray &ba, const QString &header = QString(), bool toNav = true);\n    QUrl parserUrl(const QUrl &url);\n    LiteApi::IApplication *m_liteApp;\n    DocumentBrowser *m_docBrowser;\n    QAction *m_browserAct;\n    QString m_templateData;\n    QUrl m_lastUrl;\n};\n\n#endif // LITEDOC_H\n"
  },
  {
    "path": "liteidex/src/plugins/welcome/welcome.pro",
    "content": "TARGET = welcome\nTEMPLATE = lib\n\nQT += xml\n\ninclude (../../liteideplugin.pri)\ninclude (../../3rdparty/cmark/cmark.pri)\ninclude (../../3rdparty/elidedlabel/elidedlabel.pri)\ninclude (../../utils/documentbrowser/documentbrowser.pri)\ninclude (../../utils/htmlutil/htmlutil.pri)\n\nDEFINES += WELCOME_LIBRARY\n\nSOURCES += welcomeplugin.cpp \\\n    welcomebrowser.cpp \\\n    litedoc.cpp\n\nHEADERS += welcomeplugin.h\\\n        welcome_global.h \\\n    welcomebrowser.h \\\n    litedoc.h\n\nFORMS +=\n\nOTHER_FILES +=\n\nRESOURCES +=\n"
  },
  {
    "path": "liteidex/src/plugins/welcome/welcome.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/welcome\"/>\n</RCC>\n"
  },
  {
    "path": "liteidex/src/plugins/welcome/welcome_global.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: welcome_global.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef WELCOME_GLOBAL_H\n#define WELCOME_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(WELCOME_LIBRARY)\n#  define WELCOMESHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define WELCOMESHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#endif // WELCOME_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/plugins/welcome/welcomebrowser.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: welcomebrowser.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"welcomebrowser.h\"\n#include \"golangdocapi/golangdocapi.h\"\n#include \"litedoc.h\"\n#include <QMenu>\n#include <QStatusBar>\n#include <QToolBar>\n#include <QDir>\n#include <QFileInfo>\n#include <QAction>\n#include <QFile>\n#include <QTextBrowser>\n#include <QDesktopServices>\n#include <QHBoxLayout>\n#include <QVBoxLayout>\n#include <QPushButton>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nWelcomeBrowser::WelcomeBrowser(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IBrowserEditor(parent),\n      m_liteApp(app),\n      m_extension(new Extension),\n      m_widget(new QWidget)\n{\n    m_browser = new DocumentBrowser(m_liteApp,this);\n    m_browser->toolBar()->hide();\n\n    QVBoxLayout *mainLayout = new QVBoxLayout;\n    mainLayout->setMargin(0);\n\n    mainLayout->addWidget(m_browser->widget());\n\n    QPushButton *newFile = new QPushButton(tr(\"New\"));\n    QPushButton *openFile = new QPushButton(tr(\"Open\"));\n    QPushButton *openFolder = new QPushButton(tr(\"Open Folder\"));\n    QPushButton *options = new QPushButton(tr(\"Options\"));\n\n    QHBoxLayout *layout = new QHBoxLayout;\n    layout->addWidget(newFile);\n    layout->addWidget(openFile);\n    layout->addWidget(openFolder);\n    layout->addStretch(1);\n    layout->addWidget(options);\n\n    mainLayout->addLayout(layout);\n\n    m_widget->setLayout(mainLayout);\n\n    connect(newFile,SIGNAL(clicked()),m_liteApp->fileManager(),SLOT(newFile()));\n    connect(openFile,SIGNAL(clicked()),m_liteApp->fileManager(),SLOT(openFiles()));\n    connect(openFolder,SIGNAL(clicked()),this,SLOT(openFolder()));\n\n    connect(options,SIGNAL(clicked()),m_liteApp->optionManager(),SLOT(exec()));\n    connect(m_browser,SIGNAL(requestUrl(QUrl)),this,SLOT(openUrl(QUrl)));\n    connect(m_liteApp->recentManager(),SIGNAL(recentNameListChanged(QString)),this,SLOT(loadData()));\n    connect(m_browser,SIGNAL(linkHovered(QUrl)),this,SLOT(highlightedUrl(QUrl)));\n\n    QStringList paths;\n    paths << m_liteApp->resourcePath()+\"/welcome\" << LiteDoc::localePath(m_liteApp->resourcePath()+\"/welcome\");\n    m_browser->setSearchPaths(paths);\n\n    m_extension->addObject(\"LiteApi.QTextBrowser\",m_browser->htmlWidget()->widget());\n\n    QString path = LiteDoc::localeFile(m_liteApp->resourcePath()+\"/welcome/welcome.html\");\n    QFile file(path);\n    if (file.open(QIODevice::ReadOnly)) {\n        m_templateData = QString::fromUtf8(file.readAll());\n        file.close();\n    }\n    loadData();\n}\n\nWelcomeBrowser::~WelcomeBrowser()\n{\n    delete m_browser;\n    delete m_widget;\n    if (m_extension) {\n        delete m_extension;\n    }\n}\n\nvoid WelcomeBrowser::openFolder()\n{\n    m_liteApp->fileManager()->openFolder();\n}\n\nLiteApi::IExtension *WelcomeBrowser::extension()\n{\n    return m_extension;\n}\n\nvoid WelcomeBrowser::highlightedUrl(const QUrl &url)\n{\n    m_liteApp->mainWindow()->statusBar()->showMessage(url.toString(),2000);\n}\n\nvoid WelcomeBrowser::openUrl(const QUrl &url)\n{\n    m_liteApp->mainWindow()->statusBar()->clearMessage();\n\n    if (url.scheme() == \"http\" ||\n            url.scheme() == \"https\" ||\n            url.scheme() == \"mailto\") {\n        QDesktopServices::openUrl(url);\n    } else if (url.scheme() == \"doc\") {\n        LiteApi::ILiteDoc *doc = LiteApi::findExtensionObject<LiteApi::ILiteDoc*>(m_liteApp,\"LiteApi.ILiteDoc\");\n        if (doc) {\n            doc->openUrl(url.path());\n            doc->activeBrowser();\n        }\n    } else if (url.scheme() == \"godoc\") {\n        LiteApi::IGolangDoc *doc = LiteApi::findExtensionObject<LiteApi::IGolangDoc*>(m_liteApp,\"LiteApi.IGolangDoc\");\n        if (doc) {\n            doc->openUrl(url.path());\n            doc->activeBrowser();\n        }\n    } else if (url.scheme() == \"goplay\") {\n        LiteApi::IEditor *browser = LiteApi::findExtensionObject<LiteApi::IEditor*>(m_liteApp,\"LiteApi.Goplay\");\n        if (browser) {\n            m_liteApp->editorManager()->activeBrowser(browser);\n        }\n    } else {\n        QStringList typeList = m_liteApp->recentManager()->recentTypeList();\n        if (typeList.contains(url.scheme())) {\n            m_liteApp->recentManager()->openRecent(url.path(),url.scheme());\n        }\n    }\n}\n\nvoid WelcomeBrowser::loadData()\n{\n    QString data = m_templateData;\n\n    QStringList sessionList;\n    sessionList.append(\"<ul>\");\n    sessionList.append(QString(\"<li><a href=\\\"session:default\\\">default</a></li>\"));\n    sessionList.append(\"</ul>\");\n\n\n    QStringList recentList;\n    foreach (LiteApi::IRecent *recent, m_liteApp->recentManager()->recentList()) {\n        recentList.append(QString(\"<h3><i>Recent %1</i></h3>\").arg(recent->displyType()));\n        recentList.append(\"<table border=\\\"0\\\"><tr><td>\");\n        recentList.append(\"<ul>\");\n        QStringList recentNameList = m_liteApp->recentManager()->recentNameList(recent->type());\n        int count = 0;\n        foreach (QString name, recentNameList) {\n            QFileInfo info(name);\n            recentList.append(QString(\"<li><a href=\\\"%1:%2\\\">%3</a> <span class=\\\"recent\\\">%4</span></li>\")\n                               .arg(recent->type())\n                               .arg(info.filePath())\n                               .arg(info.fileName())\n                               .arg(QDir::toNativeSeparators(info.filePath())));\n            if (count++ > 8) {\n                break;\n            }\n        }\n        recentList.append(\"</ul>\");\n        recentList.append(\"</td></tr></table>\");\n    }\n\n    data.replace(\"{liteide_version}\",m_liteApp->ideVersion());\n    data.replace(\"{recent_files}\",recentList.join(\"\\n\"));\n    QUrl url(m_liteApp->resourcePath()+\"/welcome/welcome.html\");\n    m_browser->setUrlHtml(url,data);\n}\n\nQWidget *WelcomeBrowser::widget()\n{\n    return m_widget;\n}\n\nQString WelcomeBrowser::name() const\n{\n    return tr(\"Welcome\");\n}\n\nQString WelcomeBrowser::mimeType() const\n{\n    return \"browser/welcome\";\n}\n"
  },
  {
    "path": "liteidex/src/plugins/welcome/welcomebrowser.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: welcomebrowser.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef WELCOMEBROWSER_H\n#define WELCOMEBROWSER_H\n\n#include \"liteapi/liteapi.h\"\n#include \"extension/extension.h\"\n#include \"documentbrowser/documentbrowser.h\"\n#include <QUrl>\n\nnamespace Ui {\n    class WelcomeWidget;\n}\n\nclass WelcomeBrowser : public LiteApi::IBrowserEditor\n{\n    Q_OBJECT\npublic:\n    WelcomeBrowser(LiteApi::IApplication *app, QObject *parent);\n    virtual ~WelcomeBrowser();\n    virtual LiteApi::IExtension *extension();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\npublic slots:\n    void openUrl(const QUrl &url);\n    void highlightedUrl(const QUrl &url);\n    void loadData();\n    void openFolder();\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    Extension   *m_extension;\n    QWidget *m_widget;\n    DocumentBrowser *m_browser;\n    QString m_templateData;\n};\n\n#endif // WELCOMEBROWSER_H\n"
  },
  {
    "path": "liteidex/src/plugins/welcome/welcomeplugin.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: welcomeplugin.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"welcomeplugin.h\"\n#include \"../../liteapp/liteapp_global.h\"\n#include \"liteapi/liteids.h\"\n#include <QAction>\n#include <QMenu>\n#include <QToolBar>\n#include <QUrl>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nWelcomePlugin::WelcomePlugin() : m_welcome(0)\n{\n}\n\nWelcomePlugin::~WelcomePlugin()\n{\n}\n\nvoid WelcomePlugin::home()\n{\n    m_liteApp->editorManager()->activeBrowser(m_welcome);\n}\n\nvoid WelcomePlugin::godoc()\n{\n    m_liteApp->editorManager()->activeBrowser(m_welcome);\n    m_welcome->openUrl(QUrl(\"godoc:/doc/docs.html\"));\n}\n\nbool WelcomePlugin::load(LiteApi::IApplication *app)\n{\n    m_liteApp = app;\n\n    m_welcome = new WelcomeBrowser(app,this);\n    m_welcomeAct = m_liteApp->editorManager()->registerBrowser(m_welcome);\n    m_liteApp->actionManager()->insertViewMenu(LiteApi::ViewMenuBrowserPos,m_welcomeAct);\n\n    if (m_liteApp->settings()->value(LITEAPP_WELCOMEPAGEVISIBLE,true).toBool()) {\n        m_welcomeAct->toggle();\n    }\n\n    QToolBar *toolBar = m_liteApp->actionManager()->loadToolBar(ID_TOOLBAR_STD);\n    if (toolBar) {\n        toolBar->addSeparator();\n        m_homeAct = new QAction(QIcon(\"icon:images/home.png\"),tr(\"Welcome\"),this);\n        m_homeAct->setShortcut(QKeySequence(\"Ctrl+Alt+H\"));\n        connect(m_homeAct,SIGNAL(triggered()),this,SLOT(home()));\n        //m_godocAct = new QAction(QIcon(\"icon:images/godoc.png\"),tr(\"View Golang Documents\"),this);\n        //connect(m_godocAct,SIGNAL(triggered()),this,SLOT(godoc()));\n        toolBar->addAction(m_homeAct);\n        //toolBar->addAction(m_godocAct);\n    }\n\n    m_liteDoc = new LiteDoc(m_liteApp,this);\n\n    return true;\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/plugins/welcome/welcomeplugin.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: welcomeplugin.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef WELCOMEPLUGIN_H\n#define WELCOMEPLUGIN_H\n\n#include \"welcome_global.h\"\n#include \"liteapi/liteapi.h\"\n#include \"welcomebrowser.h\"\n#include \"litedoc.h\"\n#include <QtPlugin>\n\nclass WelcomePlugin : public LiteApi::IPlugin\n{\n    Q_OBJECT\npublic:\n    WelcomePlugin();\n    ~WelcomePlugin();\n    virtual bool load(LiteApi::IApplication *app);\nprotected slots:\n    void home();\n    void godoc();\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    WelcomeBrowser *m_welcome;\n    LiteDoc *m_liteDoc;\n    QAction *m_welcomeAct;\n    QAction *m_homeAct;\n    //QAction *m_godocAct;\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<WelcomePlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.WelcomePlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/welcome\");\n        m_info->setName(\"Welcome\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setVer(\"X32\");\n        m_info->setInfo(\"Welcome\");\n    }\n};\n\n#endif // WELCOMEPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/rpath.pri",
    "content": "macx {\n    QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/\n} else:linux-* {\n    #do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR\n    # this expands to $ORIGIN (after qmake and make), it does NOT read a qmake var\n    QMAKE_RPATHDIR += \\$\\$ORIGIN\n    QMAKE_RPATHDIR += \\$\\$ORIGIN/../$$IDE_LIBRARY_BASENAME/liteide\n    IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, \":\")\n\n    QMAKE_LFLAGS += -Wl,-z,origin \\'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\\'\n    QMAKE_RPATHDIR =\n}\n\n"
  },
  {
    "path": "liteidex/src/src.pro",
    "content": "include (../liteidex.pri)\n\nTEMPLATE  = subdirs\nCONFIG   += ordered\n\nSUBDIRS = api 3rdparty utils liteapp plugins liteide tools\n"
  },
  {
    "path": "liteidex/src/tools/check_hpp/main.go",
    "content": "package main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n)\n\nvar (\n\troot = \"../../../\"\n)\n\nvar (\n\tflagRoot string\n)\n\nfunc init() {\n\tflag.StringVar(&flagRoot, \"root\", \"\", \"setup liteide root\")\n}\n\nfunc main() {\n\tflag.Parse()\n\tif flagRoot != \"\" {\n\t\troot = flagRoot\n\t}\n\troot, _ := filepath.Abs(root)\n\tlog.Println(\"process hpp files in liteide root\", root)\n\tvar p Process\n\tp.ProcessDir(filepath.Join(root, \"src/api\"))\n\tp.ProcessDir(filepath.Join(root, \"src/liteapp\"))\n\tp.ProcessDir(filepath.Join(root, \"src/plugins\"))\n\tp.ProcessDir(filepath.Join(root, \"src/utils\"))\n\tp.ProcessDir(filepath.Join(root, \"src/3rdparty\"))\n}\n\ntype Process struct {\n}\n\nfunc (p *Process) ProcessDir(dir string) {\n\tfilepath.Walk(dir, func(path string, info os.FileInfo, err error) error {\n\t\tif filepath.Ext(path) == \".h\" {\n\t\t\tp.ProcessHpp(path)\n\t\t}\n\t\treturn nil\n\t})\n}\n\nfunc (p *Process) ProcessHpp(path string) error {\n\tf, err := os.Open(path)\n\tif err != nil {\n\t\tlog.Printf(\"error open file %q, %v\\n\", path, err)\n\t\treturn err\n\t}\n\tstat, _ := f.Stat()\n\tdata, err := ioutil.ReadAll(f)\n\tf.Close()\n\tif err != nil {\n\t\tlog.Println(err)\n\t\treturn err\n\t}\n\n\tlines := strings.Split(string(data), \"\\n\")\n\tvar hppDef string\n\thppDefMap := make(map[int]string)\n\tfor n, line := range lines {\n\t\tif strings.HasPrefix(line, \"#ifndef \") && hppDef == \"\" {\n\t\t\thppDef = strings.TrimSpace(line[7:])\n\t\t\tif !(strings.HasPrefix(hppDef, \"_\") || strings.HasSuffix(hppDef, \"_\")) {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\thppDefMap[n] = line\n\t\t} else if hppDef != \"\" {\n\t\t\tif strings.HasPrefix(line, \"#define \") {\n\t\t\t\tif strings.TrimSpace(line[8:]) == hppDef {\n\t\t\t\t\thppDefMap[n] = line\n\t\t\t\t}\n\t\t\t} else if strings.HasPrefix(line, \"#endif\") {\n\t\t\t\tif strings.Contains(line, hppDef) {\n\t\t\t\t\thppDefMap[n] = line\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif len(hppDefMap) != 3 {\n\t\terr := fmt.Errorf(\"error, check hpp %q head %q no match\", path, hppDef)\n\t\tlog.Println(err)\n\t\treturn err\n\t}\n\tnewDef := strings.Trim(hppDef, \"_\")\n\tfmt.Printf(\"> process hpp %q head %v => %v\\n\", path, hppDef, newDef)\n\tfor n, line := range hppDefMap {\n\t\tnewline := strings.Replace(line, hppDef, newDef, -1)\n\t\tfmt.Printf(\"%v %q => %q\\n\", n, line, newline)\n\t\tlines[n] = newline\n\t}\n\terr = ioutil.WriteFile(path, []byte(strings.Join(lines, \"\\n\")), stat.Mode())\n\tif err != nil {\n\t\tlog.Fatalf(\"error write file %q, %v\", path, err)\n\t\treturn err\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "liteidex/src/tools/check_png/main.go",
    "content": "package main\n\nimport (\n\t\"bytes\"\n\t\"flag\"\n\t\"image\"\n\t\"image/draw\"\n\t\"image/png\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"os\"\n\t\"path/filepath\"\n)\n\nvar (\n\troot = \"../../../\"\n)\n\nvar (\n\tflagRoot string\n)\n\nfunc init() {\n\tflag.StringVar(&flagRoot, \"root\", \"\", \"setup liteide root\")\n}\n\nfunc main() {\n\tflag.Parse()\n\tif flagRoot != \"\" {\n\t\troot = flagRoot\n\t}\n\troot, _ := filepath.Abs(root)\n\tlog.Println(\"process png files in liteide root\", root)\n\tvar p Process\n\tp.ProcessDir(filepath.Join(root, \"src/api\"))\n\tp.ProcessDir(filepath.Join(root, \"src/liteapp\"))\n\tp.ProcessDir(filepath.Join(root, \"src/plugins\"))\n\tp.ProcessDir(filepath.Join(root, \"deploy\"))\n\tp.ProcessDir(filepath.Join(root, \"src/utils\"))\n\tp.ProcessDir(filepath.Join(root, \"src/3rdparty\"))\n}\n\ntype Process struct {\n}\n\nfunc (p *Process) ProcessDir(dir string) {\n\tfilepath.Walk(dir, func(path string, info os.FileInfo, err error) error {\n\t\tif filepath.Ext(path) == \".png\" {\n\t\t\terr := p.ProcessPng(path)\n\t\t\tif err != nil {\n\t\t\t\tlog.Println(path, err)\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t})\n}\n\nfunc (p *Process) ProcessPng(path string) error {\n\tf, err := os.Open(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tstat, err := f.Stat()\n\tif err != nil {\n\t\treturn err\n\t}\n\tvar buf bytes.Buffer\n\tsrcImage, err := png.Decode(f)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdstImage := image.NewNRGBA(srcImage.Bounds())\n\tdraw.Draw(dstImage, dstImage.Bounds(), srcImage, srcImage.Bounds().Min, draw.Src)\n\n\terr = png.Encode(&buf, dstImage)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdata, err := ioutil.ReadFile(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif bytes.Compare(data, buf.Bytes()) != 0 {\n\t\tlog.Println(\"update png\", path, len(data), buf.Len())\n\t\tioutil.WriteFile(path, buf.Bytes(), stat.Mode())\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "liteidex/src/tools/exportqrc/README.md",
    "content": "exportqrc tool\n===============\n\nexport liteide .qrc images to deploy/liteapp/qrc default and gray\n\n`> go run main.go`\n"
  },
  {
    "path": "liteidex/src/tools/exportqrc/main.go",
    "content": "package main\n\nimport (\n\t\"encoding/xml\"\n\t\"flag\"\n\t\"image\"\n\t\"image/color\"\n\t\"image/draw\"\n\t\"image/png\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"os\"\n\t\"path/filepath\"\n)\n\nvar (\n\troot = \"../../../\"\n)\n\nvar (\n\tflagRoot string\n)\n\nfunc init() {\n\tflag.StringVar(&flagRoot, \"root\", \"\", \"setup liteide root\")\n}\n\nfunc main() {\n\tflag.Parse()\n\tif flagRoot != \"\" {\n\t\troot = flagRoot\n\t}\n\troot, _ := filepath.Abs(root)\n\tlog.Println(\"process qrc files in liteide root\", root)\n\tvar p Process\n\tp.ProcessDir(filepath.Join(root, \"src/liteapp\"))\n\tp.ProcessDir(filepath.Join(root, \"src/plugins\"))\n\tp.Export(filepath.Join(root, \"deploy/liteapp/qrc/default\"), CopyFile)\n\tp.Export(filepath.Join(root, \"deploy/liteapp/qrc/gray\"), MakeColorImage(GrayColor))\n}\n\ntype Process struct {\n\trccs []RCC\n}\n\nfunc (p *Process) ProcessDir(dir string) {\n\tfilepath.Walk(dir, func(path string, info os.FileInfo, err error) error {\n\t\tif filepath.Ext(path) == \".qrc\" {\n\t\t\tp.ProcessQrc(path)\n\t\t}\n\t\treturn nil\n\t})\n}\n\ntype QResource struct {\n\tPrefix string   `xml:\"prefix,attr\"`\n\tFiles  []string `xml:\"file\"`\n}\n\ntype RCC struct {\n\tDir      string\n\tDirName  string\n\tFileName string\n\tXMLName  xml.Name  `xml:\"RCC\"`\n\tResource QResource `xml:\"qresource\"`\n}\n\nfunc (rcc *RCC) IsEmtpy() bool {\n\treturn len(rcc.Resource.Files) == 0\n}\n\nfunc (rcc *RCC) ImagesFiles() (images []string) {\n\tfor _, file := range rcc.Resource.Files {\n\t\tif filepath.Ext(file) == \".png\" {\n\t\t\timage := filepath.Join(rcc.Dir, file)\n\t\t\t_, err := os.Lstat(image)\n\t\t\tif err != nil {\n\t\t\t\tlog.Println(\"warning, not find image\", image)\n\t\t\t}\n\t\t\timages = append(images, image)\n\t\t}\n\t}\n\treturn\n}\n\nfunc (p *Process) ProcessQrc(path string) error {\n\tdata, err := ioutil.ReadFile(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tvar rcc RCC\n\terr = xml.Unmarshal(data, &rcc)\n\tif err != nil {\n\t\tlog.Println(err)\n\t\treturn err\n\t}\n\trcc.Dir, rcc.FileName = filepath.Split(path)\n\t_, rcc.DirName = filepath.Split(filepath.Clean(rcc.Dir))\n\tp.rccs = append(p.rccs, rcc)\n\treturn nil\n}\n\nfunc (p *Process) Export(outdir string, copyFn CopyFunc) error {\n\tlog.Println(\"export\", outdir)\n\tfor _, rcc := range p.rccs {\n\t\tp.ExportQrc(outdir, rcc, copyFn)\n\t}\n\treturn nil\n}\n\nfunc (p *Process) ExportQrc(outdir string, rcc RCC, copyFn CopyFunc) error {\n\timages := rcc.ImagesFiles()\n\tif len(images) == 0 {\n\t\t//log.Println(\"skip empty rcc\", rcc.FileName)\n\t\treturn nil\n\t}\n\toutpath := filepath.Join(outdir, rcc.DirName)\n\tos.MkdirAll(outpath, 0777)\n\tlog.Println(rcc.DirName, \"->\", len(images))\n\tfor _, file := range images {\n\t\ttarget := file[len(rcc.Dir):]\n\t\tdest := filepath.Join(outpath, target)\n\t\td, _ := filepath.Split(dest)\n\t\tos.MkdirAll(d, 0777)\n\t\terr := copyFn(file, dest)\n\t\tif err != nil {\n\t\t\tlog.Println(file, err)\n\t\t}\n\t}\n\treturn nil\n}\n\ntype CopyFunc func(string, string) error\ntype ColorFunc func(r, g, b uint8) (uint8, uint8, uint8)\n\nfunc GrayColor(r uint8, g uint8, b uint8) (uint8, uint8, uint8) {\n\tY, cb, cr := color.RGBToYCbCr(r, g, b)\n\tcb = 128\n\tcr = 128\n\treturn color.YCbCrToRGB(Y, cb, cr)\n}\n\nfunc MakeColorImage(colorFn ColorFunc) func(string, string) error {\n\treturn func(source string, dest string) error {\n\t\treturn CopyImage(source, dest, colorFn)\n\t}\n}\n\nfunc CopyImage(source string, dest string, colorFn ColorFunc) error {\n\tf, err := os.Open(source)\n\tif err != nil {\n\t\treturn err\n\t}\n\tsrcImage, err := png.Decode(f)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdstImage := image.NewRGBA(srcImage.Bounds())\n\tdraw.Draw(dstImage, dstImage.Bounds(), srcImage, srcImage.Bounds().Min, draw.Src)\n\t//\tdstImage.\n\tb := dstImage.Bounds()\n\tfor y := b.Min.Y; y < b.Max.Y; y++ {\n\t\tfor x := b.Min.X; x < b.Max.X; x++ {\n\t\t\tc := dstImage.RGBAAt(x, y)\n\t\t\tr, g, b := colorFn(c.R, c.G, c.B)\n\t\t\tdstImage.SetRGBA(x, y, color.RGBA{r, g, b, c.A})\n\t\t}\n\t}\n\n\tw, err := os.Create(dest)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = png.Encode(w, dstImage)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc CopyFile(source string, dest string) (err error) {\n\tsourcefile, err := os.Open(source)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer sourcefile.Close()\n\tdestfile, err := os.Create(dest)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer destfile.Close()\n\t_, err = io.Copy(destfile, sourcefile)\n\tif err == nil {\n\t\tsourceinfo, err := os.Stat(source)\n\t\tif err != nil {\n\t\t\terr = os.Chmod(dest, sourceinfo.Mode())\n\t\t}\n\t}\n\treturn\n}\n"
  },
  {
    "path": "liteidex/src/tools/liteide_ctrlc_stub/liteide_ctrlc_stub.cpp",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing\r\n**\r\n** This file is part of Qt Creator.\r\n**\r\n** Commercial License Usage\r\n** Licensees holding valid commercial Qt licenses may use this file in\r\n** accordance with the commercial license agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and The Qt Company.  For licensing terms and\r\n** conditions see http://www.qt.io/terms-conditions.  For further information\r\n** use the contact form at http://www.qt.io/contact-us.\r\n**\r\n** GNU Lesser General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU Lesser\r\n** General Public License version 2.1 or version 3 as published by the Free\r\n** Software Foundation and appearing in the file LICENSE.LGPLv21 and\r\n** LICENSE.LGPLv3 included in the packaging of this file.  Please review the\r\n** following information to ensure the GNU Lesser General Public License\r\n** requirements will be met: https://www.gnu.org/licenses/lgpl.html and\r\n** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r\n**\r\n** In addition, as a special exception, The Qt Company gives you certain additional\r\n** rights.  These rights are described in The Qt Company LGPL Exception\r\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n****************************************************************************/\r\n\r\n/* A stub for Windows console processes (like nmake) that is able to terminate\r\n * its child process via a generated Ctrl-C event.\r\n * The termination is triggered by sending a custom message to the HWND of\r\n * this process. */\r\n\r\n#ifndef WINVER\r\n#define WINVER 0x0501\r\n#endif\r\n\r\n#ifndef _WIN32_WINNT\r\n#define _WIN32_WINNT 0x0501\r\n#endif\r\n\r\n#define WIN32_LEAN_AND_MEAN\r\n#include <windows.h>\r\n#include <shellapi.h>\r\n#include <wchar.h>\r\n#include <cstdlib>\r\n#include <cstdio>\r\n\r\nconst wchar_t szTitle[] = L\"liteide_ctrlcstub\";\r\nconst wchar_t szWindowClass[] = L\"wliteide_ctrlcstub\";\r\nUINT uiShutDownWindowMessage;\r\nUINT uiInterruptMessage;\r\nHWND hwndMain = 0;\r\n\r\nLRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);\r\nBOOL WINAPI shutdownHandler(DWORD dwCtrlType);\r\nBOOL WINAPI interruptHandler(DWORD dwCtrlType);\r\nbool isSpaceOrTab(const wchar_t c);\r\nbool startProcess(wchar_t pCommandLine[]);\r\n\r\nint main(int argc, char **)\r\n{\r\n    if (argc < 2) {\r\n        fprintf(stderr, \"This is an internal helper of LiteIDE. Do not run it manually.\\n\");\r\n        return 1;\r\n    }\r\n\r\n    uiShutDownWindowMessage = RegisterWindowMessage(L\"liteide_ctrlcstub_shutdown\");\r\n    uiInterruptMessage = RegisterWindowMessage(L\"liteide_ctrlcstub_interrupt\");\r\n\r\n    WNDCLASSEX wcex;\r\n    ZeroMemory(&wcex,sizeof(WNDCLASSEX));\r\n    wcex.cbSize = sizeof(wcex);\r\n    wcex.lpfnWndProc = WndProc;\r\n    wcex.hInstance = GetModuleHandle(0);\r\n    wcex.lpszClassName = szWindowClass;\r\n    if (!RegisterClassEx(&wcex))\r\n        return 1;\r\n\r\n    hwndMain = CreateWindow(szWindowClass, szTitle, WS_DISABLED,\r\n                            0, 0, 0, 0, NULL, NULL, wcex.hInstance, NULL);\r\n    if (!hwndMain)\r\n        return FALSE;\r\n\r\n    // Get the command line and remove the call to this executable.\r\n    wchar_t *strCommandLine = _wcsdup(GetCommandLine());\r\n    const size_t strCommandLineLength = wcslen(strCommandLine);\r\n    size_t pos = 0;\r\n    bool quoted = false;\r\n    while (pos < strCommandLineLength) {\r\n        if (strCommandLine[pos] == L'\"') {\r\n            quoted = !quoted;\r\n        } else if (!quoted && isSpaceOrTab(strCommandLine[pos])) {\r\n            while (isSpaceOrTab(strCommandLine[++pos]));\r\n            break;\r\n        }\r\n        ++pos;\r\n    }\r\n\r\n    bool bSuccess = startProcess(strCommandLine + pos);\r\n    free(strCommandLine);\r\n\r\n    if (!bSuccess)\r\n        return -1;\r\n\r\n    MSG msg;\r\n    DWORD dwExitCode = -1;\r\n    while (GetMessage(&msg, NULL, 0, 0))\r\n    {\r\n        if (msg.message == WM_DESTROY)\r\n            dwExitCode = static_cast<DWORD>(msg.wParam);\r\n        TranslateMessage(&msg);\r\n        DispatchMessage(&msg);\r\n    }\r\n\r\n    return (int)dwExitCode;\r\n}\r\n\r\nLRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)\r\n{\r\n    if (message == uiShutDownWindowMessage) {\r\n        SetConsoleCtrlHandler(interruptHandler, FALSE);\r\n        SetConsoleCtrlHandler(shutdownHandler, TRUE);\r\n        GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0);\r\n        PostQuitMessage(0);\r\n        return 0;\r\n    } else if (message == uiInterruptMessage) {\r\n        SetConsoleCtrlHandler(interruptHandler, TRUE);\r\n        SetConsoleCtrlHandler(shutdownHandler, FALSE);\r\n        GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0);\r\n        return 0;\r\n    }\r\n\r\n    switch (message)\r\n    {\r\n    case WM_DESTROY:\r\n        PostQuitMessage(0);\r\n        break;\r\n    default:\r\n        return DefWindowProc(hWnd, message, wParam, lParam);\r\n    }\r\n    return 0;\r\n}\r\n\r\nbool isSpaceOrTab(const wchar_t c)\r\n{\r\n    return c == L' ' || c == L'\\t';\r\n}\r\n\r\nBOOL WINAPI shutdownHandler(DWORD /*dwCtrlType*/)\r\n{\r\n    PostMessage(hwndMain, WM_DESTROY, 0, 0);\r\n    return TRUE;\r\n}\r\n\r\nBOOL WINAPI interruptHandler(DWORD /*dwCtrlType*/)\r\n{\r\n    return TRUE;\r\n}\r\n\r\nDWORD WINAPI processWatcherThread(LPVOID lpParameter)\r\n{\r\n    HANDLE hProcess = reinterpret_cast<HANDLE>(lpParameter);\r\n    WaitForSingleObject(hProcess, INFINITE);\r\n    DWORD dwExitCode;\r\n    if (!GetExitCodeProcess(hProcess, &dwExitCode))\r\n        dwExitCode = -1;\r\n    CloseHandle(hProcess);\r\n    PostMessage(hwndMain, WM_DESTROY, dwExitCode, 0);\r\n    return 0;\r\n}\r\n\r\nbool startProcess(wchar_t *pCommandLine)\r\n{\r\n    SECURITY_ATTRIBUTES sa;\r\n    ZeroMemory(&sa,sizeof(SECURITY_ATTRIBUTES));\r\n    sa.nLength = sizeof(sa);\r\n    sa.bInheritHandle = TRUE;\r\n\r\n    STARTUPINFO si;\r\n    ZeroMemory(&si,sizeof(STARTUPINFO));\r\n    si.cb = sizeof(si);\r\n\r\n    PROCESS_INFORMATION pi;\r\n    DWORD dwCreationFlags = 0;\r\n    BOOL bSuccess = CreateProcess(NULL, pCommandLine, &sa, &sa, TRUE, dwCreationFlags, NULL, NULL, &si, &pi);\r\n    if (!bSuccess) {\r\n        fwprintf(stderr, L\"liteide_ctrlc_stub: Command line failed: %s\\n\", pCommandLine);\r\n        return false;\r\n    }\r\n    CloseHandle(pi.hThread);\r\n\r\n    HANDLE hThread = CreateThread(NULL, 0, processWatcherThread, reinterpret_cast<void*>(pi.hProcess), 0, NULL);\r\n    if (!hThread) {\r\n        fwprintf(stderr, L\"liteide_ctrlc_stub: The watch dog thread cannot be started.\\n\");\r\n        return false;\r\n    }\r\n    CloseHandle(hThread);\r\n    return true;\r\n}\r\n"
  },
  {
    "path": "liteidex/src/tools/liteide_ctrlc_stub/liteide_ctrlc_stub.pro",
    "content": "!win32: error(\"process_ctrlc_stub is Windows only\")\r\n\r\nCONFIG    -= qt\r\nCONFIG    += console warn_on\r\n\r\ninclude(../../../liteidex.pri)\r\n\r\nTEMPLATE  = app\r\nTARGET    = liteide_ctrlc_stub\r\nDESTDIR   = $$IDE_APP_PATH\r\n\r\nSOURCES   += liteide_ctrlc_stub.cpp\r\nLIBS      += -luser32 -lshell32\r\n\r\n\r\ntarget.path  = $$IDE_APP_PATH\r\nINSTALLS    += target\r\n"
  },
  {
    "path": "liteidex/src/tools/template/hello_option/hellooption.cpp",
    "content": "#include \"hellooption.h\"\n#include \"ui_hellooption.h\"\n#include \"hello_global.h\"\n\nHelloOption::HelloOption(LiteApi::IApplication *app,QObject *parent) :\n    LiteApi::IOption(parent),\n    m_liteApp(app),\n    m_widget(new QWidget),\n    ui(new Ui::HelloOption)\n{\n    ui->setupUi(m_widget);\n}\n\nHelloOption::~HelloOption()\n{\n    delete m_widget;\n    delete ui;\n}\n\nQWidget *HelloOption::widget()\n{\n    return m_widget;\n}\n\nQString HelloOption::name() const\n{\n    return \"Hello\";\n}\n\nQString HelloOption::mimeType() const\n{\n    return OPTION_HELLO;\n}\nvoid HelloOption::apply()\n{\n}\n"
  },
  {
    "path": "liteidex/src/tools/template/hello_option/hellooption.h",
    "content": "#ifndef HELLOOPTION_H\n#define HELLOOPTION_H\n\n#include \"liteapi/liteapi.h\"\n\nnamespace Ui {\n    class HelloOption;\n}\n\nclass HelloOption : public LiteApi::IOption\n{\n    Q_OBJECT\n\npublic:\n    explicit HelloOption(LiteApi::IApplication *app, QObject *parent = 0);\n    ~HelloOption();\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QString mimeType() const;\n    virtual void apply();\nprivate:\n    LiteApi::IApplication   *m_liteApp;\n    QWidget           *m_widget;\n    Ui::HelloOption *ui;\n};\n\n#endif // HELLOOPTION_H\n"
  },
  {
    "path": "liteidex/src/tools/template/hello_option/hellooption.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>HelloOption</class>\n <widget class=\"QWidget\" name=\"HelloOption\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>400</width>\n    <height>300</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>Form</string>\n  </property>\n </widget>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "liteidex/src/tools/template/hello_option/hellooptionfactory.cpp",
    "content": "#include \"hellooption.h\"\n#include \"hellooptionfactory.h\"\n\nHelloOptionFactory::HelloOptionFactory(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IOptionFactory(parent),\n      m_liteApp(app)\n{\n}\n\nQStringList HelloOptionFactory::mimeTypes() const\n{\n    return QStringList() << OPTION_HELLO;\n}\n\nLiteApi::IOption *HelloOptionFactory::create(const QString &mimeType)\n{\n    if (mimeType == OPTION_HELLO) {\n        return new HelloOption(m_liteApp,this);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "liteidex/src/tools/template/hello_option/hellooptionfactory.h",
    "content": "#ifndef HELLOOPTIONFACTORY_H\n#define HELLOOPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass HelloOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n    HelloOptionFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n};\n\n#endif // HELLOOPTIONFACTORY_H\n"
  },
  {
    "path": "liteidex/src/tools/template/hello_plugin/hello.pro",
    "content": "TARGET = hello\nTEMPLATE = lib\n\ninclude(../../liteideplugin.pri)\n\nDEFINES += HELLO_LIBRARY\n\nSOURCES += helloplugin.cpp\n\nHEADERS += helloplugin.h\\\n        hello_global.h\n"
  },
  {
    "path": "liteidex/src/tools/template/hello_plugin/hello_global.h",
    "content": "#ifndef HELLO_GLOBAL_H\n#define HELLO_GLOBAL_H\n\n#include <QtCore/qglobal.h>\n\n#if defined(HELLO_LIBRARY)\n#  define HELLOSHARED_EXPORT Q_DECL_EXPORT\n#else\n#  define HELLOSHARED_EXPORT Q_DECL_IMPORT\n#endif\n\n#endif // HELLO_GLOBAL_H\n"
  },
  {
    "path": "liteidex/src/tools/template/hello_plugin/helloplugin.cpp",
    "content": "#include \"helloplugin.h\"\n#include <QtPlugin>\n\nHelloPlugin::HelloPlugin()\n{\n}\n\nbool HelloPlugin::load(LiteApi::IApplication *app)\n{\n    return true;\n}\n\n#if QT_VERSION < 0x050000\nQ_EXPORT_PLUGIN2(PluginFactory,PluginFactory)\n#endif\n"
  },
  {
    "path": "liteidex/src/tools/template/hello_plugin/helloplugin.h",
    "content": "#ifndef HELLOPLUGIN_H\n#define HELLOPLUGIN_H\n\n#include \"hello_global.h\"\n#include \"liteapi/liteapi.h\"\n\nclass HelloPlugin : public LiteApi::IPlugin\n{\npublic:\n    HelloPlugin();\n    virtual bool load(LiteApi::IApplication *app);\n};\n\nclass PluginFactory : public LiteApi::PluginFactoryT<HelloPlugin>\n{\n    Q_OBJECT\n    Q_INTERFACES(LiteApi::IPluginFactory)\n#if QT_VERSION >= 0x050000\n    Q_PLUGIN_METADATA(IID \"liteidex.HelloPlugin\")\n#endif\npublic:\n    PluginFactory() {\n        m_info->setId(\"plugin/Hello\");\n        m_info->setVer(\"x18\");\n        m_info->setName(\"Hello\");\n        m_info->setAuthor(\"visualfc\");\n        m_info->setInfo(\"Hello\");\n        //m_info->appendDepend(\"plugin/liteenv\");\n    }\n};\n\n\n#endif // HELLOPLUGIN_H\n"
  },
  {
    "path": "liteidex/src/tools/template/hello_utillib/hello.cpp",
    "content": "#include \"hello.h\"\n\n\nHello::Hello()\n{\n}\n"
  },
  {
    "path": "liteidex/src/tools/template/hello_utillib/hello.h",
    "content": "#ifndef HELLO_H\n#define HELLO_H\n\n\nclass Hello\n{\npublic:\n    Hello();\n};\n\n#endif // HELLO_H\n"
  },
  {
    "path": "liteidex/src/tools/template/hello_utillib/hello.pri",
    "content": "LIBS *= -l$$qtLibraryName(hello)\n\n\n\n"
  },
  {
    "path": "liteidex/src/tools/template/hello_utillib/hello.pro",
    "content": "TARGET = hello\nTEMPLATE = lib\nCONFIG += staticlib\n\ninclude (../../liteideutils.pri)\n\nSOURCES += hello.cpp\n\nHEADERS += hello.h\n"
  },
  {
    "path": "liteidex/src/tools/template/make_option.lua",
    "content": "require \"makelib\"\nmakelib(\"./hello_option\")\n"
  },
  {
    "path": "liteidex/src/tools/template/make_plugin.lua",
    "content": "require \"makelib\"\nmakelib(\"./hello_plugin\")\n"
  },
  {
    "path": "liteidex/src/tools/template/make_utillib.lua",
    "content": "require \"makelib\"\nmakelib(\"./hello_utillib\")\n\n"
  },
  {
    "path": "liteidex/src/tools/template/makelib.lua",
    "content": "require\"lfs\"\n\nlocal sources = {}\n\nfunction finddir (path)\n    for file in lfs.dir(path) do\n        if file ~= \".\" and file ~= \"..\" then\n            local f = path..'/'..file\n            local attr = lfs.attributes (f)\n            assert (type(attr) == \"table\")\n            if attr.mode == \"directory\" then\n                finddir (f)\n            else\n                sources[file] = f\n            end\n        end\n    end\nend\n\n\nfunction process_file(file,out,tag)\n\tlocal f = io.open(file,\"rb\")\n\tlocal data = f:read(\"*all\")\n\tf:close()\n\tdata = string.gsub(data,\"Hello\",tag)\n\tdata = string.gsub(data,\"hello\",string.lower(tag))\n\tdata = string.gsub(data,\"HELLO\",string.upper(tag))\n\tprint (out)\n\tf = io.open(out,\"wb\")\n\tf:write(data)\n\tf:close()\nend\n\nfunction make_plugin(files,tag)\n\tlfs.mkdir(\"./output\")\n\tfor k,v in pairs(files) do\n\t\tprint(k,v)\n\t\tlocal out = string.gsub(k,\"hello\",string.lower(tag))\n\t\tprocess_file(v,\"./output/\"..out,tag)\n\tend\nend\n\nfunction makelib(dir)\n\tsources = {}\n\tfinddir(dir)\n\tprint(\"make form \"..dir..\" input name:\")\n\tname = io.read()\n\tif #name >= 4 then\n\t\tmake_plugin(sources,name)\n\tend\nend\n"
  },
  {
    "path": "liteidex/src/tools/tools.pro",
    "content": "# USE .subdir AND .depends !\n# OTHERWISE PLUGINS WILL BUILD IN WRONG ORDER (DIRECTORIES ARE COMPILED IN PARALLEL)\ninclude (../../liteidex.pri)\n\nTEMPLATE  = subdirs\n\nwin32 {\nSUBDIRS = liteide_ctrlc_stub\n}\n"
  },
  {
    "path": "liteidex/src/utils/colorstyle/colorstyle.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: colorstyle.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"colorstyle.h\"\n#include <QFile>\n#include <QXmlStreamReader>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nColorStyleScheme::ColorStyleScheme(QObject *parent)\n    : QObject(parent)\n{\n}\n\nColorStyleScheme::~ColorStyleScheme()\n{\n    clear();\n}\n\nvoid ColorStyleScheme::clear()\n{\n    qDeleteAll(m_nameStyleMap);\n    m_nameStyleMap.clear();\n    m_name.clear();\n}\n\nconst ColorStyle *ColorStyleScheme::findStyle(const QString &name) const\n{\n    return m_nameStyleMap.value(name,0);\n}\n\nbool ColorStyleScheme::load(const QString &fileName)\n{\n    QFile file(fileName);\n    if (!file.open(QIODevice::ReadOnly|QIODevice::Text)) {\n        return false;\n    }\n    clear();\n    return load(&file,fileName);\n}\n\nbool ColorStyleScheme::load(QIODevice *dev, const QString &/*fileName*/)\n{\n    QXmlStreamReader reader(dev);\n    QXmlStreamAttributes attrs;\n    ColorStyle *style = 0;\n    bool bread = false;\n    while (!reader.atEnd()) {\n        switch (reader.readNext()) {\n        case QXmlStreamReader::StartElement:\n            attrs = reader.attributes();\n            if (reader.name() == \"style-scheme\") {\n                m_name = attrs.value(\"name\").toString();\n                if (!m_name.isEmpty()) {\n                    bread = true;\n                }\n            } else if (reader.name() == \"style\" && style == 0 && bread) {\n                QString tmp = attrs.value(\"name\").toString();\n                if (tmp.isEmpty()) {\n                    break;\n                }\n                style = new ColorStyle;\n                style->setName(tmp);\n                tmp = attrs.value(\"foreground\").toString();\n                if (!tmp.isEmpty()) {\n                    style->setForegound(tmp);\n                }\n                tmp = attrs.value(\"background\").toString();\n                if (!tmp.isEmpty()) {\n                   style->setBackground(tmp);\n                }\n                tmp = attrs.value(\"bold\").toString().toLower();\n                if (tmp == \"true\") {\n                    style->setBold(true);\n                }\n                tmp = attrs.value(\"italic\").toString().toLower();\n                if (tmp == \"true\") {\n                    style->setItalic(true);\n                }\n            }\n            break;\n        case QXmlStreamReader::EndElement:\n            if (reader.name() == \"style\") {\n                if (style) {\n                    if (!style->name().isEmpty()) {\n                        m_nameStyleMap.insert(style->name(),style);\n                    } else {\n                        delete style;\n                    }\n                }\n                style = 0;\n            }\n            break;\n        default:\n            break;\n        }\n    }\n    return bread;\n}\n"
  },
  {
    "path": "liteidex/src/utils/colorstyle/colorstyle.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: colorstyle.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef COLORSTYLE_H\n#define COLORSTYLE_H\n\n#include <QObject>\n#include <QColor>\n#include <QMap>\n#include <QIODevice>\n\nclass ColorStyle\n{\npublic:\n    ColorStyle() : m_bold(false),m_italic(false)\n    {\n    }\n    void setName(const QString &name) {\n        m_name = name;\n    }\n    QString name() const {\n        return m_name;\n    }\n    void setForegound(const QColor &forgound) {\n        m_foregound = forgound;\n    }\n    QColor foregound() const {\n        return m_foregound;\n    }\n    void setBackground(const QColor &backgound) {\n        m_background = backgound;\n    }\n    QColor background() const {\n        return m_background;\n    }\n    void setBold(bool bold) {\n        m_bold = bold;\n    }\n    bool bold() const {\n        return m_bold;\n    }\n    void setItalic(bool italic) {\n        m_italic = italic;\n    }\n    bool italic() const {\n        return m_italic;\n    }\nprotected:\n    QString m_name;\n    QColor  m_foregound;\n    QColor  m_background;\n    bool    m_bold;\n    bool    m_italic;\n};\n\nclass ColorStyleScheme : QObject\n{\npublic:\n    ColorStyleScheme(QObject *parent);\n    virtual ~ColorStyleScheme();\npublic:\n    QString name() const { return m_name; }\n    const ColorStyle *findStyle(const QString &name) const;\n    bool load(const QString &fileName);\n    bool load(QIODevice *dev, const QString &fileName);\n    void clear();\nprotected:\n    QMap<QString,ColorStyle*> m_nameStyleMap;\n    QString m_name;\n};\n\n#endif // COLORSTYLE_H\n"
  },
  {
    "path": "liteidex/src/utils/colorstyle/colorstyle.pri",
    "content": "LIBS *= -l$$qtLibraryName(colorstyle)\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/colorstyle/colorstyle.pro",
    "content": "TARGET = colorstyle\nTEMPLATE = lib\nCONFIG += staticlib\n\ninclude (../../liteideutils.pri)\n\nSOURCES += colorstyle.cpp\n\nHEADERS += colorstyle.h\n"
  },
  {
    "path": "liteidex/src/utils/dlvclient/dlvclient.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: dlvclient.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"dlvclient.h\"\r\n#include <QTcpSocket>\r\n#include <QHostAddress>\r\n#include <QUrl>\r\n#include <QDebug>\r\n\r\n#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)\r\n#include <qjsondocument.h>\r\n#else\r\n#include \"qjsonrpc/src/json/qjson_export.h\"\r\n#include \"qjsonrpc/src/json/qjsondocument.h\"\r\n#endif\r\n\r\n#include \"qjsonrpc/src/qjsonrpcservicereply.h\"\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nDlvClient::DlvClient(QObject *parent) : QObject(parent)\r\n{\r\n    m_isCommandBlock = false;\r\n    m_callTimeout = 5000;\r\n}\r\n\r\nbool DlvClient::IsConnect() const\r\n{\r\n    return !m_dlv.isNull();\r\n}\r\n\r\nQString DlvClient::Address() const\r\n{\r\n    return m_addr;\r\n}\r\n\r\nbool DlvClient::Connect(const QString &service)\r\n{\r\n    QUrl serviceUrl = QUrl::fromUserInput(service);\r\n    QHostAddress serviceAddress(serviceUrl.host());\r\n    QTcpSocket *tcpSocket = new QTcpSocket(this);\r\n    int servicePort = serviceUrl.port() ? serviceUrl.port() : 5555;\r\n    tcpSocket->connectToHost(serviceAddress, servicePort);\r\n    if (!tcpSocket->waitForConnected(5000)) {\r\n        qDebug(\"could not connect to host at %s:%d\", serviceUrl.host().toLocal8Bit().data(),\r\n               servicePort);\r\n        return false;\r\n    }\r\n    m_addr = service;\r\n    m_isCommandBlock = false;\r\n    m_dlv.reset(new QJsonRpcSocket(tcpSocket,this));\r\n    return true;\r\n}\r\n\r\nvoid DlvClient::SetCallTimeout(int timeout)\r\n{\r\n    m_callTimeout = timeout;\r\n}\r\n\r\nint DlvClient::CallTimeout() const\r\n{\r\n    return m_callTimeout;\r\n}\r\n\r\nint DlvClient::ProcessPid() const\r\n{\r\n    ProcessPidIn in;\r\n    ProcessPidOut out;\r\n    callBlocked(\"ProcessPid\",&in,&out);\r\n    return out.Pid;\r\n}\r\n\r\nQDateTime DlvClient::LastModified() const\r\n{\r\n    LastModifiedIn in;\r\n    LastModifiedOut out;\r\n    callBlocked(\"LastModified\",&in,&out);\r\n    return out.Time;\r\n}\r\n\r\nbool DlvClient::Detach() const\r\n{\r\n    DetachIn in;\r\n    in.Kill = true;\r\n    DetachOut out;\r\n    return callBlocked(\"Detach\",&in,&out);\r\n}\r\n\r\nQList<DiscardedBreakpoint> DlvClient::Restart() const\r\n{\r\n    RestartIn in;\r\n    RestartOut out;\r\n    callBlocked(\"Restart\",&in,&out);\r\n    return out.DiscardedBreakpoints;\r\n}\r\n\r\nQList<DiscardedBreakpoint> DlvClient::RestartFrom(const QString &pos) const\r\n{\r\n    RestartIn in;\r\n    in.Position = pos;\r\n    RestartOut out;\r\n    callBlocked(\"Restart\",&in,&out);\r\n    return out.DiscardedBreakpoints;\r\n}\r\n\r\nDebuggerState DlvClient::Next() const\r\n{\r\n    DebuggerCommand in(\"next\");\r\n    CommandOut out;\r\n    callBlocked(\"Command\",&in,&out);\r\n    return out.State;\r\n}\r\n\r\nDebuggerState DlvClient::Step() const\r\n{\r\n    DebuggerCommand in(\"step\");\r\n    CommandOut out;\r\n    callBlocked(\"Command\",&in,&out);\r\n    return out.State;\r\n}\r\n\r\nDebuggerState DlvClient::StepOut() const\r\n{\r\n    DebuggerCommand in(\"stepOut\");\r\n    CommandOut out;\r\n    callBlocked(\"Command\",&in,&out);\r\n    return out.State;\r\n}\r\n\r\nDebuggerState DlvClient::StepInstruction() const\r\n{\r\n    DebuggerCommand in(\"stepInstruction\");\r\n    CommandOut out;\r\n    callBlocked(\"Command\",&in,&out);\r\n    return out.State;\r\n}\r\n\r\nDebuggerState DlvClient::SwitchThread(int threadID) const\r\n{\r\n    DebuggerCommand in(\"switchThread\");\r\n    in.ThreadID = threadID;\r\n    CommandOut out;\r\n    callBlocked(\"Command\",&in,&out);\r\n    return out.State;\r\n}\r\n\r\nDebuggerState DlvClient::SwitchGoroutine(int goroutineID) const\r\n{\r\n    DebuggerCommand in(\"switchGoroutine\");\r\n    in.GoroutineID = goroutineID;\r\n    CommandOut out;\r\n    callBlocked(\"Command\",&in,&out);\r\n    return out.State;\r\n}\r\n\r\nDebuggerState DlvClient::Halt() const\r\n{\r\n    DebuggerCommand in(\"halt\");\r\n    CommandOut out;\r\n    callBlocked(\"Command\",&in,&out);\r\n    return out.State;\r\n}\r\n\r\nDebuggerState DlvClient::Continue() const\r\n{\r\n    DebuggerCommand in(\"continue\");\r\n    CommandOut out;\r\n    callBlocked(\"Command\",&in,&out);\r\n    return out.State;\r\n}\r\n\r\nDebuggerState DlvClient::Rewind() const\r\n{\r\n    DebuggerCommand in(\"rewind\");\r\n    CommandOut out;\r\n    callBlocked(\"Command\",&in,&out);\r\n    return out.State;\r\n}\r\n\r\nbool DlvClient::CallNext()\r\n{\r\n   DebuggerCommand cmd(\"next\");\r\n   return callDebuggerCommand(cmd);\r\n}\r\n\r\nbool DlvClient::CallStep()\r\n{\r\n    DebuggerCommand cmd(\"step\");\r\n    return callDebuggerCommand(cmd);\r\n}\r\n\r\nbool DlvClient::CallStepOut()\r\n{\r\n    DebuggerCommand cmd(\"stepOut\");\r\n    return callDebuggerCommand(cmd);\r\n}\r\n\r\nbool DlvClient::CallStepInstruction()\r\n{\r\n    DebuggerCommand cmd(\"stepInstruction\");\r\n    return callDebuggerCommand(cmd);\r\n}\r\n\r\nbool DlvClient::CallSwitchThread(int threadID)\r\n{\r\n    DebuggerCommand cmd(\"switchThread\");\r\n    cmd.ThreadID = threadID;\r\n    return callDebuggerCommand(cmd);\r\n}\r\n\r\nbool DlvClient::CallSwitchGoroutine(int goroutineID)\r\n{\r\n    DebuggerCommand cmd(\"switchGoroutine\");\r\n    cmd.GoroutineID = goroutineID;\r\n    return callDebuggerCommand(cmd);\r\n}\r\n\r\nbool DlvClient::CallHalt()\r\n{\r\n    DebuggerCommand cmd(\"halt\");\r\n    return callDebuggerCommand(cmd);\r\n}\r\n\r\nbool DlvClient::CallContinue()\r\n{\r\n    DebuggerCommand cmd(\"continue\");\r\n    return callDebuggerCommand(cmd);\r\n}\r\n\r\nbool DlvClient::CallRewind()\r\n{\r\n    DebuggerCommand cmd(\"rewind\");\r\n    return callDebuggerCommand(cmd);\r\n}\r\n\r\nBreakpointPointer DlvClient::CreateBreakpoint(const Breakpoint &bp) const\r\n{\r\n    CreateBreakpointIn in;\r\n    in.Breakpoint = bp;\r\n    CreateBreakpointOut out;\r\n    callBlocked(\"CreateBreakpoint\",&in,&out);\r\n    return out.pBreakpoint;\r\n}\r\n\r\nBreakpointPointer DlvClient::CreateBreakpointByFuncName(const QString &funcName) const\r\n{\r\n    Breakpoint bp;\r\n    bp.FunctionName = funcName;\r\n    return CreateBreakpoint(bp);\r\n}\r\n\r\nBreakpointPointer DlvClient::GetBreakpoint(int id) const\r\n{\r\n    GetBreakpointIn in;\r\n    in.Id = id;\r\n    GetBreakpointOut out;\r\n    callBlocked(\"GetBreakpoint\",&in,&out);\r\n    return out.pBreakpoint;\r\n}\r\n\r\nBreakpointPointer DlvClient::GetBreakpointByName(const QString &name) const\r\n{\r\n    GetBreakpointIn in;\r\n    in.Name = name;\r\n    GetBreakpointOut out;\r\n    callBlocked(\"GetBreakpoint\",&in,&out);\r\n    return out.pBreakpoint;\r\n}\r\n\r\nQList<Breakpoint> DlvClient::ListBreakpoints() const\r\n{\r\n    ListBreakpointsIn in;\r\n    ListBreakpointsOut out;\r\n    callBlocked(\"ListBreakpoints\",&in,&out);\r\n    return out.Breakpoints;\r\n}\r\n\r\nBreakpointPointer DlvClient::ClearBreakpoint(int id) const\r\n{\r\n    CleartBreakpointIn in;\r\n    in.Id = id;\r\n    ClearBreakpointOut out;\r\n    callBlocked(\"ClearBreakpoint\",&in,&out);\r\n    return out.pBreakpoint;\r\n}\r\n\r\nBreakpointPointer DlvClient::ClearBreakpointByName(const QString &name) const\r\n{\r\n    CleartBreakpointIn in;\r\n    in.Name = name;\r\n    ClearBreakpointOut out;\r\n    callBlocked(\"ClearBreakpoint\",&in,&out);\r\n    return out.pBreakpoint;\r\n}\r\n\r\nbool DlvClient::AmendBreakpoint(const Breakpoint &bp) const\r\n{\r\n    AmendBreakpointIn in;\r\n    in.Breakpoint = bp;\r\n    AmendBreakpointOut out;\r\n    return callBlocked(\"AmendBreakpoint\",&in,&out);\r\n}\r\n\r\nbool DlvClient::CancelNext() const\r\n{\r\n    CancelNextIn in;\r\n    CancelNextOut out;\r\n    return callBlocked(\"CancelNext\",&in,&out);\r\n}\r\n\r\nQList<Thread> DlvClient::ListThreads() const\r\n{\r\n    ListThreadsIn in;\r\n    ListThreadsOut out;\r\n    callBlocked(\"ListThreads\",&in,&out);\r\n    return out.Threads;\r\n}\r\n\r\nThreadPointer DlvClient::GetThread(int id) const\r\n{\r\n    GetThreadIn in;\r\n    in.Id = id;\r\n    GetThreadOut out;\r\n    callBlocked(\"GetThread\",&in,&out);\r\n    return out.pThread;\r\n}\r\n\r\nVariablePointer DlvClient::EvalVariable(const EvalScope &scope, const QString &expr, const LoadConfig &cfg) const\r\n{\r\n    EvalIn in;\r\n    in.Scope = scope;\r\n    in.Expr = expr;\r\n    in.Cfg = cfg;\r\n    EvalOut out;\r\n    callBlocked(\"Eval\",&in,&out);\r\n    return out.pVariable;\r\n}\r\n\r\nbool DlvClient::SetVariable(const EvalScope &scope, const QString &symbol, const QString &value)\r\n{\r\n    SetIn in;\r\n    in.Scope = scope;\r\n    in.Symbol = symbol;\r\n    in.Value = value;\r\n    SetOut out;\r\n    return callBlocked(\"Set\",&in,&out);\r\n}\r\n\r\nQStringList DlvClient::ListSources(const QString &filter)\r\n{\r\n    ListSourcesIn in;\r\n    in.Filter = filter;\r\n    ListSourcesOut out;\r\n    callBlocked(\"ListSources\",&in,&out);\r\n    return out.Sources;\r\n}\r\n\r\nQStringList DlvClient::ListFunctions(const QString &filter)\r\n{\r\n    ListFunctionsIn in;\r\n    in.Filter = filter;\r\n    ListFunctionsOut out;\r\n    callBlocked(\"ListFunctions\",&in,&out);\r\n    return out.Funcs;\r\n}\r\n\r\nDebuggerState DlvClient::GetState() const\r\n{\r\n    StateIn in;\r\n    StateOut out;\r\n    callBlocked(\"State\",&in,&out);\r\n    return out.State;\r\n}\r\n\r\nQStringList DlvClient::ListTypes(const QString &filter) const\r\n{\r\n    ListTypesIn in;\r\n    in.Filter = filter;\r\n    ListTypesOut out;\r\n    callBlocked(\"ListTypes\",&in,&out);\r\n    return out.Types;\r\n}\r\n\r\nQList<Variable> DlvClient::ListPackageVariables(const QString &filter, const LoadConfig &cfg) const\r\n{\r\n    ListPackageVarsIn in;\r\n    in.Filter = filter;\r\n    in.Cfg = cfg;\r\n    ListPackageVarsOut out;\r\n    callBlocked(\"ListPackageVars\",&in,&out);\r\n    return out.Variables;\r\n}\r\n\r\nQList<Variable> DlvClient::ListLocalVariables(const EvalScope &scope, const LoadConfig &cfg) const\r\n{\r\n    ListLocalVarsIn in;\r\n    in.Scope = scope;\r\n    in.Cfg = cfg;\r\n    ListLocalVarsOut out;\r\n    callBlocked(\"ListLocalVars\",&in,&out);\r\n    return out.Variables;\r\n}\r\n\r\nQList<Register> DlvClient::ListRegisters(int threadID, bool includeFp) const\r\n{\r\n    ListRegistersIn in;\r\n    in.ThreadID = threadID;\r\n    in.IncludeFp = includeFp;\r\n    ListRegistersOut out;\r\n    callBlocked(\"ListRegisters\",&in,&out);\r\n    return out.Regs;\r\n}\r\n\r\nQList<Variable> DlvClient::ListFunctionArgs(const EvalScope &scope, const LoadConfig &cfg) const\r\n{\r\n    ListFunctionArgsIn in;\r\n    in.Scope = scope;\r\n    in.Cfg = cfg;\r\n    ListFunctionArgsOut out;\r\n    callBlocked(\"ListFunctionArgs\",&in,&out);\r\n    return out.Variables;\r\n}\r\n\r\nQList<Goroutine> DlvClient::ListGoroutines() const\r\n{\r\n    ListGoroutinesIn in;\r\n    ListGoroutinesOut out;\r\n    callBlocked(\"ListGoroutines\",&in,&out);\r\n    return out.Goroutines;\r\n}\r\n\r\nQList<Stackframe> DlvClient::Stacktrace(int goroutineId, int depth, const LoadConfig &cfg) const\r\n{\r\n    StacktraceIn in;\r\n    in.Id = goroutineId;\r\n    in.Depth = depth;\r\n    in.Full = true;\r\n    in.Cfg = cfg;\r\n    StacktraceOut out;\r\n    callBlocked(\"Stacktrace\",&in,&out);\r\n    return out.Locations;\r\n}\r\n\r\nbool DlvClient::AttachedToExistingProcess() const\r\n{\r\n    AttachedToExistingProcessIn in;\r\n    AttachedToExistingProcessOut out;\r\n    callBlocked(\"AttachedToExistingProcess\",&in,&out);\r\n    return out.Answer;\r\n}\r\n\r\nQList<Location> DlvClient::FindLocation(const EvalScope &scope, const QString &loc) const\r\n{\r\n    FindLocationIn in;\r\n    in.Scope= scope;\r\n    in.Loc = loc;\r\n    FindLocationOut out;\r\n    callBlocked(\"FindLocation\",&in,&out);\r\n    return out.Locations;\r\n}\r\n\r\nQList<AsmInstruction> DlvClient::DisassembleRange(const EvalScope &scope, quint64 startPC, quint64 endPC, AssemblyFlavour flavour) const\r\n{\r\n    DisassembleIn in;\r\n    in.Scope = scope;\r\n    in.StartPC = startPC;\r\n    in.EndPC = endPC;\r\n    in.Flavour = flavour;\r\n    DisassembleOut out;\r\n    callBlocked(\"Disassemble\",&in,&out);\r\n    return out.Disassemble;\r\n}\r\n\r\nQList<AsmInstruction> DlvClient::DisassemblePC(const EvalScope &scope, quint64 pc, AssemblyFlavour flavour) const\r\n{\r\n    DisassembleIn in;\r\n    in.Scope = scope;\r\n    in.StartPC = pc;\r\n    in.EndPC = 0;\r\n    in.Flavour = flavour;\r\n    DisassembleOut out;\r\n    callBlocked(\"Disassemble\",&in,&out);\r\n    return out.Disassemble;\r\n}\r\n\r\nbool DlvClient::Recorded() const\r\n{\r\n    RecordedIn in;\r\n    RecordedOut out;\r\n    callBlocked(\"Recorded\",&in,&out);\r\n    return out.Recorded;\r\n}\r\n\r\nQString DlvClient::TraceDirectory() const\r\n{\r\n    RecordedIn in;\r\n    RecordedOut out;\r\n    callBlocked(\"Recorded\",&in,&out);\r\n    return out.TraceDirectory;\r\n}\r\n\r\nint DlvClient::Checkpoint(const QString &where) const\r\n{\r\n    CheckpointIn in;\r\n    in.Where = where;\r\n    CheckpointOut out;\r\n    callBlocked(\"Checkpoint\",&in,&out);\r\n    return out.ID;\r\n}\r\n\r\nQList<struct Checkpoint> DlvClient::ListCheckpoints() const\r\n{\r\n    ListCheckpointsIn in;\r\n    ListCheckpointsOut out;\r\n    callBlocked(\"ListCheckpoints\",&in,&out);\r\n    return out.Checkpoints;\r\n}\r\n\r\nbool DlvClient::ClearCheckpoint(int id) const\r\n{\r\n    ClearCheckpointIn in;\r\n    in.ID = id;\r\n    ClearBreakpointOut out;\r\n    return callBlocked(\"ClearCheckpoint\",&in,&out);\r\n}\r\n\r\nint DlvClient::GetAPIVersion() const\r\n{\r\n    GetVersionIn in;\r\n    GetVersionOut out;\r\n    callBlocked(\"GetVersion\",&in,&out);\r\n    return out.APIVersion;\r\n}\r\n\r\nQString DlvClient::GetDelveVersion() const\r\n{\r\n    GetVersionIn in;\r\n    GetVersionOut out;\r\n    callBlocked(\"GetVersion\",&in,&out);\r\n    return out.DelveVersion;\r\n}\r\n\r\nbool DlvClient::SetAPIVersion(int version) const\r\n{\r\n    SetAPIVersionIn in;\r\n    in.APIVersion = version;\r\n    SetAPIVersionOut out;\r\n    return callBlocked(\"SetApiVersion\",&in,&out);\r\n}\r\n\r\nQVariant DlvClient::LastJsonData() const\r\n{\r\n    return m_lastJsonData;\r\n}\r\n\r\nbool DlvClient::callCommand(const QString &cmd)\r\n{\r\n    DebuggerCommand dc(cmd);\r\n    return callDebuggerCommand(dc);\r\n}\r\n\r\nbool DlvClient::callDebuggerCommand(const DebuggerCommand &cmd)\r\n{\r\n    if (m_isCommandBlock) {\r\n        return false;\r\n    }\r\n    m_isCommandBlock = true;\r\n    m_lastCommand = cmd;\r\n    QVariantMap param;\r\n    cmd.toMap(param);\r\n    QJsonRpcMessage request = QJsonRpcMessage::createRequest(\"RPCServer.Command\", QJsonValue::fromVariant(param));\r\n    QJsonRpcServiceReply *reply = m_dlv->sendMessage(request);\r\n    if (!reply) {\r\n        m_isCommandBlock = false;\r\n        return false;\r\n    }\r\n    connect(reply,SIGNAL(finished()),this,SLOT(finishedCommandReply()));\r\n    m_lastReply.reset(reply);\r\n    return true;\r\n}\r\n\r\nbool DlvClient::isCommandBlocked() const\r\n{\r\n    return m_isCommandBlock;\r\n}\r\n\r\nvoid DlvClient::finishedCommandReply()\r\n{\r\n    m_isCommandBlock = false;\r\n    QJsonRpcServiceReply *reply = (QJsonRpcServiceReply*)(sender());\r\n    m_lastJsonData = reply->response().result().toVariant();\r\n    if (reply->response().type() == QJsonRpcMessage::Error) {\r\n        int code = reply->response().errorCode();\r\n        QString msg = reply->response().errorMessage();\r\n        if (msg.isEmpty()) {\r\n            ResponseError resp;\r\n            resp.fromMap(reply->response().toObject().toVariantMap());\r\n            msg = resp.error;\r\n        }\r\n        emit commandError(code,msg);\r\n    } else {\r\n        CommandOut out;\r\n        QVariant data = reply->response().result().toVariant();\r\n        out.fromMap(data.toMap());\r\n        emit commandSuccess(m_lastCommand.Name,out.State,data.toMap());\r\n    }\r\n}\r\n\r\nbool DlvClient::callBlocked(const QString &method, const JsonDataIn *in, JsonDataOut *out) const\r\n{\r\n    QVariantMap param;\r\n    in->toMap(param);\r\n    QJsonRpcMessage request = QJsonRpcMessage::createRequest(\"RPCServer.\"+method, QJsonValue::fromVariant(param));\r\n\r\n    QJsonRpcMessage response = m_dlv->sendMessageBlocking(request,m_callTimeout);\r\n    if (response.type() == QJsonRpcMessage::Error) {\r\n        //qDebug(\"error(%d): %s\", response.errorCode(), response.errorMessage().toLocal8Bit().data());//\r\n        return false;\r\n    }\r\n    m_lastJsonData = response.result().toVariant();\r\n    out->fromMap(response.result().toVariant().toMap());\r\n    return true;\r\n}\r\n"
  },
  {
    "path": "liteidex/src/utils/dlvclient/dlvclient.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: dlvclient.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef DLVCLIENT_H\r\n#define DLVCLIENT_H\r\n\r\n#include <QTcpSocket>\r\n#include <QDateTime>\r\n#include <QScopedPointer>\r\n#include <QMutex>\r\n#include <QThread>\r\n#include <QWaitCondition>\r\n#include \"qjsonrpc/src/qjsonrpcservicereply.h\"\r\n#include \"qjsonrpc/src/qjsonrpcsocket.h\"\r\n#include \"dlvtypes.h\"\r\n\r\nstruct ResponseError\r\n{\r\n    QString error;\r\n    QString id;\r\n    QVariant result;\r\n    void fromMap(const QVariantMap &map)\r\n    {\r\n        error = map[\"error\"].toString();\r\n        id = map[\"id\"].toInt();\r\n        result = map[\"result\"];\r\n    }\r\n};\r\n\r\n#define DLV_COMMAND_NEXT \"next\"\r\n#define DLV_COMMAND_STEP \"step\"\r\n#define DLV_COMMAND_STEP_OUT \"stepOut\"\r\n#define DLV_COMMAND_STEP_INSTRUCTION \"stepInstruction\"\r\n#define DLV_COMMAND_CONTINUE \"continue\"\r\n#define DLV_COMMAND_REWIND \"rewind\"\r\n\r\nclass DlvClient : public QObject\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    DlvClient(QObject *parent);\r\n    bool IsConnect() const;\r\n    QString Address() const;\r\n    bool Connect(const QString &service);\r\n    void SetCallTimeout(int timeout);\r\n    int CallTimeout() const;\r\n    int ProcessPid() const;\r\n    QDateTime LastModified() const;\r\n    bool Detach() const;\r\n    QList<DiscardedBreakpoint> Restart() const;\r\n    QList<DiscardedBreakpoint> RestartFrom(const QString &pos) const;\r\n    DebuggerState Next() const;\r\n    DebuggerState GetState() const;\r\n    DebuggerState Step() const;\r\n    DebuggerState StepOut() const;\r\n    DebuggerState StepInstruction() const;\r\n    DebuggerState SwitchThread(int threadID) const;\r\n    DebuggerState SwitchGoroutine(int goroutineID) const;\r\n    DebuggerState Halt() const;\r\n    DebuggerState Continue() const;\r\n    DebuggerState Rewind() const;\r\n    bool CallNext();\r\n    bool CallStep();\r\n    bool CallStepOut();\r\n    bool CallStepInstruction();\r\n    bool CallSwitchThread(int threadID);\r\n    bool CallSwitchGoroutine(int goroutineID);\r\n    bool CallHalt();\r\n    bool CallContinue();\r\n    bool CallRewind();\r\n    BreakpointPointer CreateBreakpoint(const Breakpoint &bp) const;\r\n    BreakpointPointer CreateBreakpointByFuncName(const QString &funcName) const;\r\n    BreakpointPointer GetBreakpoint(int id) const;\r\n    BreakpointPointer GetBreakpointByName(const QString &name) const;\r\n    QList<Breakpoint> ListBreakpoints() const;\r\n    BreakpointPointer ClearBreakpoint(int id) const;\r\n    BreakpointPointer ClearBreakpointByName(const QString &name) const;\r\n    bool AmendBreakpoint(const Breakpoint &bp) const;\r\n    bool CancelNext() const;\r\n    QList<Thread> ListThreads() const;\r\n    ThreadPointer GetThread(int id) const;\r\n    VariablePointer EvalVariable(const EvalScope &scope, const QString &expr, const LoadConfig &cfg) const;\r\n    bool SetVariable(const EvalScope &scope, const QString &symbol,const QString &value);\r\n    QStringList ListSources(const QString &filter);\r\n    QStringList ListFunctions(const QString &filter);\r\n    QStringList ListTypes(const QString &filter) const;\r\n    QList<Variable> ListPackageVariables(const QString &filter, const LoadConfig &cfg) const;\r\n    QList<Variable> ListLocalVariables(const EvalScope &scope, const LoadConfig &cfg) const;\r\n    QList<Register> ListRegisters(int threadID, bool includeFp) const;\r\n    QList<Variable> ListFunctionArgs(const EvalScope &scope, const LoadConfig &cfg) const;\r\n    QList<Goroutine> ListGoroutines() const;\r\n    QList<Stackframe> Stacktrace(int goroutineId, int depth, const LoadConfig &cfg) const;\r\n    bool AttachedToExistingProcess() const;\r\n    QList<Location> FindLocation(const EvalScope &scope, const QString &loc) const;\r\n    QList<AsmInstruction> DisassembleRange(const EvalScope &scope,quint64 startPC, quint64 endPC, AssemblyFlavour flavour) const;\r\n    QList<AsmInstruction> DisassemblePC(const EvalScope &scope,quint64 pc, AssemblyFlavour flavour) const;\r\n    bool Recorded() const;\r\n    QString TraceDirectory() const;\r\n    int Checkpoint(const QString &where) const;\r\n    QList<struct Checkpoint> ListCheckpoints() const;\r\n    bool ClearCheckpoint(int id) const;\r\n    int GetAPIVersion() const;\r\n    QString GetDelveVersion() const;\r\n    bool SetAPIVersion(int version) const;\r\npublic:\r\n    QVariant LastJsonData() const;\r\npublic:\r\n    bool isCommandBlocked() const;\r\nsignals:\r\n    void commandSuccess(const QString &method, const DebuggerState &state, const QVariant &jsonData);\r\n    void commandError(int code, const QString &errorMessage);\r\npublic slots:\r\n    bool callCommand(const QString &cmd);\r\n    bool callDebuggerCommand(const DebuggerCommand &cmd);\r\nprotected slots:\r\n    void finishedCommandReply();\r\nprotected:\r\n    bool callBlocked(const QString &method, const JsonDataIn *in, JsonDataOut *out) const;\r\nprotected:\r\n    QScopedPointer<QJsonRpcSocket> m_dlv;\r\n    QString m_addr;\r\n    QScopedPointer<QJsonRpcServiceReply> m_lastReply;\r\n    DebuggerCommand m_lastCommand;\r\n    mutable QVariant m_lastJsonData;\r\n    bool m_isCommandBlock;\r\n    int m_callTimeout;\r\n};\r\n\r\n#endif // DLVCLIENT_H\r\n"
  },
  {
    "path": "liteidex/src/utils/dlvclient/dlvclient.pri",
    "content": "LIBS *= -l$$qtLibraryName(dlvclient)\n\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/dlvclient/dlvclient.pro",
    "content": "TARGET = dlvclient\nTEMPLATE = lib\nCONFIG += staticlib\n\nQT += network\n\ninclude (../../liteideutils.pri)\ninclude (../../3rdparty/qjsonrpc/qjsonrpc.pri)\n\nHEADERS += \\\n    dlvclient.h \\\n    dlvtypes.h \\\n    varianthelper.h\n\nSOURCES += \\\n    dlvclient.cpp \\\n    varianthelper.cpp\n"
  },
  {
    "path": "liteidex/src/utils/dlvclient/dlvtypes.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: dlvtypes.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef DLVTYPES_H\r\n#define DLVTYPES_H\r\n\r\n#include <QVariant>\r\n#include <QDateTime>\r\n#include <QSharedPointer>\r\n#include \"varianthelper.h\"\r\n#include \"qjsonrpc/src/json/qjsonobject.h\"\r\n\r\n#include <QDebug>\r\n\r\n/*\r\ntype Function struct {\r\n    // Name is the function name.\r\n    Name   string `json:\"name\"`\r\n    Value  uint64 `json:\"value\"`\r\n    Type   byte   `json:\"type\"`\r\n    GoType uint64 `json:\"goType\"`\r\n}\r\n*/\r\nstruct Function\r\n{\r\n    Function() : Value(0),Type(0),GoType(0)\r\n    {\r\n    }\r\n    void fromMap(const QVariantMap &map)\r\n    {\r\n        Name = map[\"name\"].toString();\r\n        Value = map[\"value\"].value<quint64>();\r\n        Type = map[\"type\"].value<qint8>();\r\n        GoType = map[\"goType\"].value<quint64>();\r\n    }\r\n    QString Name;\r\n    quint64 Value;\r\n    qint8 Type;\r\n    quint64 GoType;\r\n};\r\ntypedef QSharedPointer<Function> FunctionPointer;\r\n\r\n/*\r\n// Variable describes a variable.\r\ntype Variable struct {\r\n    // Name of the variable or struct member\r\n    Name string `json:\"name\"`\r\n    // Address of the variable or struct member\r\n    Addr uintptr `json:\"addr\"`\r\n    // Only the address field is filled (result of evaluating expressions like &<expr>)\r\n    OnlyAddr bool `json:\"onlyAddr\"`\r\n    // Go type of the variable\r\n    Type string `json:\"type\"`\r\n    // Type of the variable after resolving any typedefs\r\n    RealType string `json:\"realType\"`\r\n\r\n    Kind reflect.Kind `json:\"kind\"`\r\n\r\n    //Strings have their length capped at proc.maxArrayValues, use Len for the real length of a string\r\n    //Function variables will store the name of the function in this field\r\n    Value string `json:\"value\"`\r\n\r\n    // Number of elements in an array or a slice, number of keys for a map, number of struct members for a struct, length of strings\r\n    Len int64 `json:\"len\"`\r\n    // Cap value for slices\r\n    Cap int64 `json:\"cap\"`\r\n\r\n    // Array and slice elements, member fields of structs, key/value pairs of maps, value of complex numbers\r\n    // The Name field in this slice will always be the empty string except for structs (when it will be the field name) and for complex numbers (when it will be \"real\" and \"imaginary\")\r\n    // For maps each map entry will have to items in this slice, even numbered items will represent map keys and odd numbered items will represent their values\r\n    // This field's length is capped at proc.maxArrayValues for slices and arrays and 2*proc.maxArrayValues for maps, in the circumnstances where the cap takes effect len(Children) != Len\r\n    // The other length cap applied to this field is related to maximum recursion depth, when the maximum recursion depth is reached this field is left empty, contrary to the previous one this cap also applies to structs (otherwise structs will always have all their member fields returned)\r\n    Children []Variable `json:\"children\"`\r\n\r\n    // Unreadable addresses will have this field set\r\n    Unreadable string `json:\"unreadable\"`\r\n}\r\n*/\r\n/*\r\ntype VariableFlags uint16\r\n\r\nconst (\r\n    // VariableEscaped is set for local variables that escaped to the heap\r\n    //\r\n    // The compiler performs escape analysis on local variables, the variables\r\n    // that may outlive the stack frame are allocated on the heap instead and\r\n    // only the address is recorded on the stack. These variables will be\r\n    // marked with this flag.\r\n    VariableEscaped = (1 << iota)\r\n\r\n    // VariableShadowed is set for local variables that are shadowed by a\r\n    // variable with the same name in another scope\r\n    VariableShadowed\r\n\r\n    // VariableConstant means this variable is a constant value\r\n    VariableConstant\r\n\r\n    // VariableArgument means this variable is a function argument\r\n    VariableArgument\r\n\r\n    // VariableReturnArgument means this variable is a function return value\r\n    VariableReturnArgument\r\n)\r\n\r\n// Variable describes a variable.\r\ntype Variable struct {\r\n    // Name of the variable or struct member\r\n    Name string `json:\"name\"`\r\n    // Address of the variable or struct member\r\n    Addr uintptr `json:\"addr\"`\r\n    // Only the address field is filled (result of evaluating expressions like &<expr>)\r\n    OnlyAddr bool `json:\"onlyAddr\"`\r\n    // Go type of the variable\r\n    Type string `json:\"type\"`\r\n    // Type of the variable after resolving any typedefs\r\n    RealType string `json:\"realType\"`\r\n\r\n    Flags VariableFlags `json:\"flags\"`\r\n\r\n    Kind reflect.Kind `json:\"kind\"`\r\n\r\n    //Strings have their length capped at proc.maxArrayValues, use Len for the real length of a string\r\n    //Function variables will store the name of the function in this field\r\n    Value string `json:\"value\"`\r\n\r\n    // Number of elements in an array or a slice, number of keys for a map, number of struct members for a struct, length of strings\r\n    Len int64 `json:\"len\"`\r\n    // Cap value for slices\r\n    Cap int64 `json:\"cap\"`\r\n\r\n    // Array and slice elements, member fields of structs, key/value pairs of maps, value of complex numbers\r\n    // The Name field in this slice will always be the empty string except for structs (when it will be the field name) and for complex numbers (when it will be \"real\" and \"imaginary\")\r\n    // For maps each map entry will have to items in this slice, even numbered items will represent map keys and odd numbered items will represent their values\r\n    // This field's length is capped at proc.maxArrayValues for slices and arrays and 2*proc.maxArrayValues for maps, in the circumstances where the cap takes effect len(Children) != Len\r\n    // The other length cap applied to this field is related to maximum recursion depth, when the maximum recursion depth is reached this field is left empty, contrary to the previous one this cap also applies to structs (otherwise structs will always have all their member fields returned)\r\n    Children []Variable `json:\"children\"`\r\n\r\n    // Base address of arrays, Base address of the backing array for slices (0 for nil slices)\r\n    // Base address of the backing byte array for strings\r\n    // address of the struct backing chan and map variables\r\n    // address of the function entry point for function variables (0 for nil function pointers)\r\n    Base uintptr `json:\"base\"`\r\n\r\n    // Unreadable addresses will have this field set\r\n    Unreadable string `json:\"unreadable\"`\r\n\r\n    // LocationExpr describes the location expression of this variable's address\r\n    LocationExpr string\r\n    // DeclLine is the line number of this variable's declaration\r\n    DeclLine int64\r\n}\r\n*/\r\n\r\ntypedef enum _VariableFlags {\r\n    VariableEscaped = 1,\r\n    VariableShadowed = 2,\r\n    VariableConstant = 4,\r\n    VariableArgument = 8,\r\n    VariableReturnArgument = 16,\r\n} VariableFlags;\r\n\r\nstruct Variable\r\n{\r\n    Variable()\r\n        : Addr(0), OnlyAddr(false),Kind(0),Len(0),Cap(0)\r\n    {\r\n    }\r\n\r\n    QString Name;\r\n    quintptr Addr;\r\n    bool OnlyAddr;\r\n    QString Type;\r\n    QString RealType;\r\n    quint16 Flags;\r\n    quint64 Kind;\r\n    QString Value;\r\n    qint64 Len;\r\n    qint64 Cap;\r\n    QList<Variable> Children;\r\n    quintptr Base;\r\n    QString Unreadable;\r\n    QString LocationExpr;\r\n    qint64 DeclLine;\r\n\r\n    void fromMap(const QVariantMap &map)\r\n    {\r\n        Name = map[\"name\"].toString();\r\n        Addr = map[\"addr\"].value<quintptr>();\r\n        OnlyAddr = map[\"onlyAddr\"].toBool();\r\n        Type = map[\"type\"].toString();\r\n        RealType = map[\"realType\"].toString();\r\n        Flags = map[\"flags\"].value<quint16>();\r\n        Kind = map[\"kind\"].value<quint64>();\r\n        Value = map[\"value\"].toString();\r\n        Len = map[\"len\"].value<qint64>();\r\n        Cap = map[\"cap\"].value<qint64>();\r\n        foreach (QVariant m, map[\"children\"].toList()) {\r\n            Variable v;\r\n            v.fromMap(m.toMap());\r\n            Children.push_back(v);\r\n        }\r\n        Base = map[\"base\"].value<quintptr>();\r\n        Unreadable = map[\"unreadable\"].toString();\r\n        LocationExpr = map[\"LocationExpr\"].toString();\r\n        DeclLine = map[\"DeclLine\"].value<qint64>();\r\n    }\r\n};\r\ntypedef QSharedPointer<Variable> VariablePointer;\r\n\r\n/*\r\ntype EvalScope struct {\r\n    GoroutineID int\r\n    Frame       int\r\n}\r\n*/\r\n\r\nstruct EvalScope\r\n{\r\n    EvalScope(qint64 gid = -1, qint64 frame = 0, qint64 deferredcall = 0) : GoroutineID(gid), Frame(frame), DeferredCall(deferredcall)\r\n    {\r\n    }\r\n    qint64 GoroutineID;\r\n    qint64 Frame;\r\n    qint64 DeferredCall;\r\n    QVariantMap toMap() const\r\n    {\r\n        QVariantMap map;\r\n        map[\"GoroutineID\"] = GoroutineID;\r\n        map[\"Frame\"] = Frame;\r\n        map[\"DeferredCall\"] = DeferredCall;\r\n        return map;\r\n    }\r\n};\r\ntypedef QSharedPointer<EvalScope> EvalScopePointer;\r\n\r\n/*\r\n// LoadConfig describes how to load values from target's memory\r\ntype LoadConfig struct {\r\n    // FollowPointers requests pointers to be automatically dereferenced.\r\n    FollowPointers bool\r\n    // MaxVariableRecurse is how far to recurse when evaluating nested types.\r\n    MaxVariableRecurse int\r\n    // MaxStringLen is the maximum number of bytes read from a string\r\n    MaxStringLen int\r\n    // MaxArrayValues is the maximum number of elements read from an array, a slice or a map.\r\n    MaxArrayValues int\r\n    // MaxStructFields is the maximum number of fields read from a struct, -1 will read all fields.\r\n    MaxStructFields int\r\n}\r\n\r\n    LongLoadConfig  = api.LoadConfig{true, 1, 64, 64, -1}\r\n    ShortLoadConfig = api.LoadConfig{false, 0, 64, 0, 3}\r\n\r\n*/\r\n\r\nstruct LoadConfig\r\n{\r\n    LoadConfig(bool followPointers=false, qint64 maxVariableRecurse = 0, qint64 maxStringLen = 64, qint64 maxArrayValues = 64,qint64 maxStructFields = 3)\r\n        : FollowPointers(followPointers),\r\n          MaxVariableRecurse(maxVariableRecurse),\r\n          MaxStringLen(maxStringLen),\r\n          MaxArrayValues(maxArrayValues),\r\n          MaxStructFields(maxStructFields)\r\n    {\r\n    }\r\n\r\n    bool FollowPointers;\r\n    qint64 MaxVariableRecurse;\r\n    qint64 MaxStringLen;\r\n    qint64 MaxArrayValues;\r\n    qint64 MaxStructFields;\r\n\r\n    static LoadConfig Long128(int recurse = 3)\r\n    {\r\n        static LoadConfig lc(true,recurse,128,128,-1);\r\n        return lc;\r\n    }\r\n    static LoadConfig Long()\r\n    {\r\n        static LoadConfig lc(true,1,64,64,-1);\r\n        return lc;\r\n    }\r\n    static LoadConfig Short()\r\n    {\r\n        static LoadConfig lc(false,0,64,0,3);\r\n        return lc;\r\n    }\r\n    void fromMap(const QVariantMap &map)\r\n    {\r\n        FollowPointers = map[\"FollowPointers\"].toBool();\r\n        MaxVariableRecurse = map[\"MaxVariableRecurse\"].value<quint64>();\r\n        MaxStringLen = map[\"MaxStringLen\"].value<quint64>();\r\n        MaxArrayValues = map[\"MaxArrayValues\"].value<quint64>();\r\n        MaxStructFields = map[\"MaxStructFields\"].value<quint64>();\r\n    }\r\n    QVariantMap toMap() const\r\n    {\r\n        QVariantMap map;\r\n        map[\"FollowPointers\"] = FollowPointers;\r\n        map[\"MaxVariableRecurse\"] = MaxVariableRecurse;\r\n        map[\"MaxStringLen\"] = MaxStringLen;\r\n        map[\"MaxArrayValues\"] = MaxArrayValues;\r\n        map[\"MaxStructFields\"] = MaxStructFields;\r\n        return map;\r\n    }\r\n};\r\ntypedef QSharedPointer<LoadConfig> LoadConfigPointer;\r\n\r\n/*\r\ntype ListPackageVarsIn struct {\r\n    Filter string\r\n    Cfg    api.LoadConfig\r\n}\r\n\r\ntype ListPackageVarsOut struct {\r\n    Variables []api.Variable\r\n}\r\n*/\r\n\r\n\r\n/*\r\n// Breakpoint addresses a location at which process execution may be\r\n// suspended.\r\ntype Breakpoint struct {\r\n    // ID is a unique identifier for the breakpoint.\r\n    ID int `json:\"id\"`\r\n    // User defined name of the breakpoint\r\n    Name string `json:\"name\"`\r\n    // Addr is the address of the breakpoint.\r\n    Addr uint64 `json:\"addr\"`\r\n    // File is the source file for the breakpoint.\r\n    File string `json:\"file\"`\r\n    // Line is a line in File for the breakpoint.\r\n    Line int `json:\"line\"`\r\n    // FunctionName is the name of the function at the current breakpoint, and\r\n    // may not always be available.\r\n    FunctionName string `json:\"functionName,omitempty\"`\r\n\r\n    // Breakpoint condition\r\n    Cond string\r\n\r\n    // tracepoint flag\r\n    Tracepoint bool `json:\"continue\"`\r\n    // retrieve goroutine information\r\n    Goroutine bool `json:\"goroutine\"`\r\n    // number of stack frames to retrieve\r\n    Stacktrace int `json:\"stacktrace\"`\r\n    // expressions to evaluate\r\n    Variables []string `json:\"variables,omitempty\"`\r\n    // LoadArgs requests loading function arguments when the breakpoint is hit\r\n    LoadArgs *LoadConfig\r\n    // LoadLocals requests loading function locals when the breakpoint is hit\r\n    LoadLocals *LoadConfig\r\n    // number of times a breakpoint has been reached in a certain goroutine\r\n    HitCount map[string]uint64 `json:\"hitCount\"`\r\n    // number of times a breakpoint has been reached\r\n    TotalHitCount uint64 `json:\"totalHitCount\"`\r\n}\r\n*/\r\n\r\nstruct Breakpoint\r\n{\r\n    Breakpoint()\r\n        : ID(0),Addr(0),Line(0),Tracepoint(false),Goroutine(false),Stacktrace(0),TotalHitCount(0)\r\n    {\r\n    }\r\n    int ID;\r\n    QString Name;\r\n    quint64 Addr;\r\n    QString File;\r\n    int Line;\r\n    QString FunctionName;\r\n    QString Cond;\r\n    bool Tracepoint;\r\n    bool Goroutine;\r\n    int Stacktrace;\r\n    QStringList Variables;\r\n    LoadConfigPointer pLoadArgs;\r\n    LoadConfigPointer pLoadLocals;\r\n    QMap<QString,quint64> HitCout;\r\n    quint64 TotalHitCount;\r\n\r\n    QVariantMap toMap() const\r\n    {\r\n        QVariantMap map;\r\n        map[\"id\"] = ID;\r\n        map[\"name\"] = Name;\r\n        map[\"addr\"] = Addr;\r\n        map[\"file\"] = File;\r\n        map[\"line\"] = Line;\r\n        map[\"functionName\"] = FunctionName;\r\n        map[\"Cond\"] = Cond;\r\n        map[\"continue\"] = Tracepoint;\r\n        map[\"goroutine\"] = Goroutine;\r\n        map[\"stacktrace\"] = Stacktrace;\r\n        map[\"variables\"] = Variables;\r\n        if (pLoadArgs) {\r\n            map[\"LoadArgs\"] = pLoadArgs->toMap();\r\n        } else {\r\n            map[\"LoadArgs\"] = QVariant();\r\n        }\r\n        if (pLoadLocals) {\r\n            map[\"LoadLocals\"] = pLoadLocals->toMap();\r\n        } else {\r\n            map[\"LoadLocals\"] = QVariant();\r\n        }\r\n        QVariantMap m;\r\n        QMapIterator<QString,quint64> ih(HitCout);\r\n        while(ih.hasNext()) {\r\n            ih.next();\r\n            m.insert(ih.key(),ih.value());\r\n        }\r\n        map[\"hitCout\"] = m;\r\n        map[\"totalHitCount\"] = TotalHitCount;\r\n        return map;\r\n    }\r\n\r\n    void fromMap(const QVariantMap &map)\r\n    {\r\n        ID = map[\"id\"].toInt();\r\n        Name = map[\"name\"].toString();\r\n        Addr = map[\"addr\"].value<quint64>();\r\n        File = map[\"file\"].toString();\r\n        Line = map[\"line\"].toInt();\r\n        FunctionName = map[\"functionName\"].toString();\r\n        Cond = map[\"Cond\"].toString();\r\n        Tracepoint = map[\"continue\"].toBool();\r\n        Goroutine = map[\"goroutine\"].toBool();\r\n        Stacktrace = map[\"stacktrace\"].toInt();\r\n        Variables = map[\"variables\"].toStringList();\r\n\r\n        QVariantMap mla = map[\"LoadArgs\"].toMap();\r\n        if (!mla.isEmpty()) {\r\n            pLoadArgs = LoadConfigPointer(new LoadConfig);\r\n            pLoadArgs->fromMap(mla);\r\n        }\r\n        QVariantMap mll = map[\"LoadLocals\"].toMap();\r\n        if (!mll.isEmpty()) {\r\n            pLoadLocals = LoadConfigPointer(new LoadConfig);\r\n            pLoadLocals->fromMap(mll);\r\n        }\r\n        QVariantMap m = map[\"hitCout\"].toMap();\r\n        QMapIterator<QString,QVariant> im(m);\r\n        while(im.hasNext()) {\r\n            HitCout.insert(im.key(),im.value().value<quint64>());\r\n        }\r\n        TotalHitCount = map[\"totalHitCount\"].value<quint64>();\r\n    }\r\n};\r\ntypedef QSharedPointer<Breakpoint> BreakpointPointer;\r\n\r\n/*\r\ntype Location struct {\r\n    PC       uint64    `json:\"pc\"`\r\n    File     string    `json:\"file\"`\r\n    Line     int       `json:\"line\"`\r\n    Function *Function `json:\"function,omitempty\"`\r\n}\r\n\r\ntype Stackframe struct {\r\n    Location\r\n    Locals    []Variable\r\n    Arguments []Variable\r\n}\r\n*/\r\n\r\nstruct Location\r\n{\r\n    Location() : PC(0), Line(0)\r\n    {\r\n    }\r\n    void fromMap(const QVariantMap &map)\r\n    {\r\n        PC = map[\"pc\"].value<quint64>();\r\n        File = map[\"file\"].toString();\r\n        Line = map[\"line\"].toInt();\r\n        QVariantMap mfn = map[\"function\"].toMap();\r\n        if (!mfn.isEmpty()) {\r\n            pFunction = FunctionPointer(new Function);\r\n            pFunction->fromMap(mfn);\r\n        }\r\n    }\r\n    quint64 PC;\r\n    QString File;\r\n    int Line;\r\n    FunctionPointer pFunction;\r\n};\r\ntypedef QSharedPointer<Location> LocationPointer;\r\n\r\nstruct Stackframe : public Location\r\n{\r\n    void fromMap(const QVariantMap &map)\r\n    {\r\n        Location::fromMap(map);\r\n        foreach (QVariant m, map[\"Locals\"].toList()) {\r\n            Variable v;\r\n            v.fromMap(m.toMap());\r\n            Locals.push_back(v);\r\n        }\r\n        foreach (QVariant m, map[\"Arguments\"].toList()) {\r\n            Variable v;\r\n            v.fromMap(m.toMap());\r\n            Arguments.push_back(v);\r\n        }\r\n    }\r\n    QList<Variable> Locals;\r\n    QList<Variable> Arguments;\r\n};\r\ntypedef QSharedPointer<Stackframe> StackframePointer;\r\n\r\n/*\r\ntype Goroutine struct {\r\n    // ID is a unique identifier for the goroutine.\r\n    ID int `json:\"id\"`\r\n    // Current location of the goroutine\r\n    CurrentLoc Location `json:\"currentLoc\"`\r\n    // Current location of the goroutine, excluding calls inside runtime\r\n    UserCurrentLoc Location `json:\"userCurrentLoc\"`\r\n    // Location of the go instruction that started this goroutine\r\n    GoStatementLoc Location `json:\"goStatementLoc\"`\r\n    // ID of the associated thread for running goroutines\r\n    ThreadID int `json:\"threadID\"`\r\n}\r\n\r\n// internal G structure.\r\ntype Goroutine struct {\r\n    // ID is a unique identifier for the goroutine.\r\n    ID int64 `json:\"id\"`\r\n    // Current location of the goroutine\r\n    CurrentLoc Location `json:\"currentLoc\"`\r\n    // Current location of the goroutine, excluding calls inside runtime\r\n    UserCurrentLoc Location `json:\"userCurrentLoc\"`\r\n    // Location of the go instruction that started this goroutine\r\n    GoStatementLoc Location `json:\"goStatementLoc\"`\r\n    // Location of the starting function\r\n    StartLoc Location `json:\"startLoc\"`\r\n    // ID of the associated thread for running goroutines\r\n    ThreadID   int    `json:\"threadID\"`\r\n    Status     uint64 `json:\"status\"`\r\n    WaitSince  int64  `json:\"waitSince\"`\r\n    WaitReason int64  `json:\"waitReason\"`\r\n    Unreadable string `json:\"unreadable\"`\r\n    // Goroutine's pprof labels\r\n    Labels map[string]string `json:\"labels,omitempty\"`\r\n}\r\n\r\n\r\n// Informations about the current breakpoint\r\ntype BreakpointInfo struct {\r\n    Stacktrace []Stackframe `json:\"stacktrace,omitempty\"`\r\n    Goroutine  *Goroutine   `json:\"goroutine,omitempty\"`\r\n    Variables  []Variable   `json:\"variables,omitempty\"`\r\n    Arguments  []Variable   `json:\"arguments,omitempty\"`\r\n    Locals     []Variable   `json:\"locals,omitempty\"`\r\n}\r\n*/\r\n\r\nstruct Goroutine\r\n{\r\n    Goroutine()\r\n        : ID(0), ThreadId(0)\r\n    {\r\n    }\r\n\r\n    void fromMap(const QVariantMap &map)\r\n    {\r\n        ID = map[\"id\"].toInt();\r\n        CurrentLoc.fromMap(map[\"currentLoc\"].toMap());\r\n        UserCurrentLoc.fromMap(map[\"userCurrentLoc\"].toMap());\r\n        GoStatementLoc.fromMap(map[\"goStatementLoc\"].toMap());\r\n        StartLoc.fromMap(map[\"startLoc\"].toMap());\r\n        ThreadId = map[\"threadID\"].toInt();\r\n        Status = map[\"status\"].value<quint64>();\r\n        WaitSince = map[\"waitSince\"].value<qint64>();\r\n        WaitReason = map[\"waitReason\"].value<qint64>();\r\n        Unreadable = map[\"unreadable\"].toString();\r\n        QVariantMap m = map[\"labels\"].toMap();\r\n        QMapIterator<QString,QVariant> im(m);\r\n        while(im.hasNext()) {\r\n            Labels.insert(im.key(),im.value().toString());\r\n        }\r\n    }\r\n    int ID;\r\n    Location CurrentLoc;  // Runtime\r\n    Location UserCurrentLoc; // User\r\n    Location GoStatementLoc; // Go\r\n    Location StartLoc; // Start\r\n    int ThreadId;\r\n    quint64 Status;\r\n    qint64 WaitSince;\r\n    qint64 WaitReason;\r\n    QString Unreadable;\r\n    QMap<QString,QString> Labels;\r\n};\r\ntypedef QSharedPointer<Goroutine> GoroutinePointer;\r\n\r\ninline QString waitReason(int reason) {\r\n    static QString waitReasonStrings[] = {\r\n        \"\",\r\n        \"GC assist marking\",\r\n        \"IO wait\",\r\n        \"chan receive (nil chan)\",\r\n        \"chan send (nil chan)\",\r\n        \"dumping heap\",\r\n        \"garbage collection\",\r\n        \"garbage collection scan\",\r\n        \"panicwait\",\r\n        \"select\",\r\n        \"select (no cases)\",\r\n        \"GC assist wait\",\r\n        \"GC sweep wait\",\r\n        \"GC scavenge wait\",\r\n        \"chan receive\",\r\n        \"chan send\",\r\n        \"finalizer wait\",\r\n        \"force gc (idle)\",\r\n        \"semacquire\",\r\n        \"sleep\",\r\n        \"sync.Cond.Wait\",\r\n        \"timer goroutine (idle)\",\r\n        \"trace reader (blocked)\",\r\n        \"wait for GC cycle\",\r\n        \"GC worker (idle)\",\r\n        \"preempted\",\r\n        \"debug call\",\r\n    };\r\n    if (size_t(reason) < sizeof(waitReasonStrings)/sizeof(waitReasonStrings[0])) {\r\n        return waitReasonStrings[reason];\r\n    }\r\n    return QString(\"unknown wait reason %1\").arg(reason);\r\n}\r\n\r\n\r\nstruct BreakpointInfo\r\n{\r\n    void fromMap(const QVariantMap &map)\r\n    {\r\n        foreach (QVariant m, map[\"Stacktrace\"].toList()) {\r\n            Stackframe v;\r\n            v.fromMap(m.toMap());\r\n            Stacktrace.push_back(v);\r\n        }\r\n\r\n        QVariantMap mg = map[\"goroutine\"].toMap();\r\n        if (!mg.isEmpty()) {\r\n            pGoroutine = GoroutinePointer(new Goroutine);\r\n            pGoroutine->fromMap(mg);\r\n        }\r\n        foreach (QVariant m, map[\"variables\"].toList()) {\r\n            Variable v;\r\n            v.fromMap(m.toMap());\r\n            Variables.push_back(v);\r\n        }\r\n        foreach (QVariant m, map[\"arguments\"].toList()) {\r\n            Variable v;\r\n            v.fromMap(m.toMap());\r\n            Arguments.push_back(v);\r\n        }\r\n        foreach (QVariant m, map[\"locals\"].toList()) {\r\n            Variable v;\r\n            v.fromMap(m.toMap());\r\n            Locals.push_back(v);\r\n        }\r\n    }\r\n\r\n    QList<Stackframe> Stacktrace;\r\n    GoroutinePointer pGoroutine;\r\n    QList<Variable> Variables;\r\n    QList<Variable> Arguments;\r\n    QList<Variable> Locals;\r\n};\r\ntypedef QSharedPointer<BreakpointInfo> BreakpointInfoPointer;\r\n\r\n/*\r\n// AsmInstruction represents one assembly instruction at some address\r\ntype AsmInstruction struct {\r\n    // Loc is the location of this instruction\r\n    Loc Location\r\n    // Destination of CALL instructions\r\n    DestLoc *Location\r\n    // Text is the formatted representation of the instruction\r\n    Text string\r\n    // Bytes is the instruction as read from memory\r\n    Bytes []byte\r\n    // If Breakpoint is true a breakpoint is set at this instruction\r\n    Breakpoint bool\r\n    // In AtPC is true this is the instruction the current thread is stopped at\r\n    AtPC bool\r\n}\r\n*/\r\nstruct AsmInstruction\r\n{\r\n    AsmInstruction()\r\n        : Breakpoint(false),AtPC(false)\r\n    {\r\n\r\n    }\r\n\r\n    void fromMap(const QVariantMap &map)\r\n    {\r\n        Loc.fromMap(map[\"Loc\"].toMap());\r\n        QVariantMap md = map[\"destLoc\"].toMap();\r\n        if (!md.isEmpty()) {\r\n            pDestLoc = LocationPointer(new Location);\r\n            pDestLoc->fromMap(md);\r\n        }\r\n        Text = map[\"Text\"].toString();\r\n        Bytes = QByteArray::fromBase64(map[\"Bytes\"].toByteArray());\r\n        Breakpoint = map[\"Breakpoint\"].toBool();\r\n        AtPC = map[\"AtPC\"].toBool();\r\n    }\r\n\r\n    Location Loc;\r\n    LocationPointer pDestLoc;\r\n    QString Text;\r\n    QByteArray Bytes;\r\n    bool Breakpoint;\r\n    bool AtPC;\r\n};\r\ntypedef QSharedPointer<AsmInstruction> AsmInstructionPointer;\r\n\r\n/*\r\ntype Register struct {\r\n    Name  string\r\n    Value string\r\n}\r\n*/\r\n\r\nstruct Register\r\n{\r\n    void fromMap(const QVariantMap &map)\r\n    {\r\n        Name = map[\"Name\"].toString();\r\n        Value = map[\"Value\"].toString();\r\n    }\r\n\r\n    QString Name;\r\n    QString Value;\r\n};\r\ntypedef QSharedPointer<Register> RegisterPointer;\r\n\r\n/*\r\ntype DiscardedBreakpoint struct {\r\n    Breakpoint *Breakpoint\r\n    Reason     string\r\n}\r\n\r\ntype Checkpoint struct {\r\n    ID    int\r\n    When  string\r\n    Where string\r\n}\r\n*/\r\n\r\nstruct DiscardedBreakpoint\r\n{\r\n    BreakpointPointer pBreakpoint;\r\n    QString Reason;\r\n    void fromMap(const QVariantMap &map)\r\n    {\r\n        QVariantMap mb = map[\"Breakpoint\"].toMap();\r\n        if (!mb.isEmpty()) {\r\n            pBreakpoint = BreakpointPointer(new Breakpoint);\r\n            pBreakpoint->fromMap(mb);\r\n        }\r\n        Reason = map[\"Reason\"].toString();\r\n    }\r\n};\r\ntypedef QSharedPointer<DiscardedBreakpoint> DiscardedBreakpointPointer;\r\n\r\nstruct Checkpoint\r\n{\r\n    Checkpoint()\r\n        : ID(-1)\r\n    {\r\n    }\r\n\r\n    void fromMap(const QVariantMap &map)\r\n    {\r\n        ID = map[\"ID\"].toInt();\r\n        When = map[\"When\"].toString();\r\n        Where = map[\"Where\"].toString();\r\n    }\r\n\r\n    int ID;\r\n    QString When;\r\n    QString Where;\r\n};\r\ntypedef QSharedPointer<Checkpoint> CheckpointPointer;\r\n\r\n/*\r\n// Thread is a thread within the debugged process.\r\ntype Thread struct {\r\n    // ID is a unique identifier for the thread.\r\n    ID int `json:\"id\"`\r\n    // PC is the current program counter for the thread.\r\n    PC uint64 `json:\"pc\"`\r\n    // File is the file for the program counter.\r\n    File string `json:\"file\"`\r\n    // Line is the line number for the program counter.\r\n    Line int `json:\"line\"`\r\n    // Function is function information at the program counter. May be nil.\r\n    Function *Function `json:\"function,omitempty\"`\r\n\r\n    // ID of the goroutine running on this thread\r\n    GoroutineID int `json:\"goroutineID\"`\r\n\r\n    // Breakpoint this thread is stopped at\r\n    Breakpoint *Breakpoint `json:\"breakPoint,omitempty\"`\r\n    // Informations requested by the current breakpoint\r\n    BreakpointInfo *BreakpointInfo `json:\"breakPointInfo,omitrempty\"`\r\n}\r\n*/\r\n\r\nstruct Thread\r\n{\r\n    Thread() :\r\n        ID(0), PC(0),Line(0),GoroutineID(0)\r\n    {\r\n    }\r\n\r\n    void fromMap(const QVariantMap &map)\r\n    {\r\n        ID = map[\"id\"].toInt();\r\n        PC = map[\"pc\"].value<quint64>();\r\n        File = map[\"file\"].toString();\r\n        Line = map[\"line\"].toInt();\r\n\r\n        QVariantMap mf = map[\"function\"].toMap();\r\n        if (!mf.isEmpty()) {\r\n            pFunction = FunctionPointer(new Function);\r\n            pFunction->fromMap(mf);\r\n        }\r\n        GoroutineID = map[\"goroutineID\"].toInt();\r\n        QVariantMap mb = map[\"breakPoint\"].toMap();\r\n        if (!mb.isEmpty()) {\r\n            pBreakpoint = BreakpointPointer(new Breakpoint);\r\n            pBreakpoint->fromMap(mb);\r\n        }\r\n        QVariantMap mbi = map[\"breakPointInfo\"].toMap();\r\n        if (!mbi.isEmpty()) {\r\n            pBreakpointInfo = BreakpointInfoPointer(new BreakpointInfo);\r\n            pBreakpointInfo->fromMap(mbi);\r\n        }\r\n    }\r\n\r\n    int ID;\r\n    quint64 PC;\r\n    QString File;\r\n    int Line;\r\n    FunctionPointer pFunction;\r\n    int GoroutineID;\r\n    BreakpointPointer pBreakpoint;\r\n    BreakpointInfoPointer pBreakpointInfo;\r\n};\r\ntypedef QSharedPointer<Thread> ThreadPointer;\r\n\r\n/*\r\n// DebuggerState represents the current context of the debugger.\r\ntype DebuggerState struct {\r\n    // CurrentThread is the currently selected debugger thread.\r\n    CurrentThread *Thread `json:\"currentThread,omitempty\"`\r\n    // SelectedGoroutine is the currently selected goroutine\r\n    SelectedGoroutine *Goroutine `json:\"currentGoroutine,omitempty\"`\r\n    // List of all the process threads\r\n    Threads []*Thread\r\n    // NextInProgress indicates that a next or step operation was interrupted by another breakpoint\r\n    // or a manual stop and is waiting to complete.\r\n    // While NextInProgress is set further requests for next or step may be rejected.\r\n    // Either execute continue until NextInProgress is false or call CancelNext\r\n    NextInProgress bool\r\n    // Exited indicates whether the debugged process has exited.\r\n    Exited     bool `json:\"exited\"`\r\n    ExitStatus int  `json:\"exitStatus\"`\r\n    // When contains a description of the current position in a recording\r\n    When string\r\n    // Filled by RPCClient.Continue, indicates an error\r\n    Err error `json:\"-\"`\r\n}\r\n*/\r\n\r\nstruct DebuggerState\r\n{\r\n    DebuggerState() : NextInProgress(false),Exited(false),ExitStatus(0)\r\n    {\r\n    }\r\n\r\n    void fromMap(const QVariantMap &map)\r\n    {\r\n        QVariantMap mt = map[\"currentThread\"].toMap();\r\n        if (!mt.isEmpty()) {\r\n            pCurrentThread = ThreadPointer(new Thread);\r\n            pCurrentThread->fromMap(mt);\r\n        }\r\n        QVariantMap mg = map[\"currentGoroutine\"].toMap();\r\n        if (!mg.isEmpty()) {\r\n            pSelectedGoroutine = GoroutinePointer(new Goroutine);\r\n            pSelectedGoroutine->fromMap(mg);\r\n        }\r\n        foreach (QVariant m, map[\"Threads\"].toList()) {\r\n            Thread v;\r\n            v.fromMap(m.toMap());\r\n            Threads.push_back(v);\r\n        }\r\n        NextInProgress = map[\"NextInProgress\"].toBool();\r\n        Exited = map[\"exited\"].toBool();\r\n        ExitStatus = map[\"exitStatus\"].toBool();\r\n        When = map[\"When\"].toString();\r\n    }\r\n\r\n    ThreadPointer pCurrentThread;\r\n    GoroutinePointer pSelectedGoroutine;\r\n    QList<Thread> Threads;\r\n    bool NextInProgress;\r\n    bool Exited;\r\n    int ExitStatus;\r\n    QString When;\r\n    QString Err;\r\n};\r\ntypedef QSharedPointer<DebuggerState> DebuggerStatePointer;\r\n\r\nstruct JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const = 0;\r\n};\r\n\r\nstruct JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap &/*map*/) = 0;\r\n};\r\n\r\nstruct EmptyJsonDataIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &/*map*/) const\r\n    {\r\n    }\r\n};\r\n\r\nstruct EmptyJsonDataOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap &/*map*/)\r\n    {\r\n    }\r\n};\r\n\r\n\r\n/*\r\ntype GetVersionIn struct {\r\n}\r\n\r\ntype GetVersionOut struct {\r\n    DelveVersion string\r\n    APIVersion   int\r\n}\r\n\r\ntype SetAPIVersionIn struct {\r\n    APIVersion int\r\n}\r\n\r\ntype SetAPIVersionOut struct {\r\n}\r\n*/\r\nstruct GetVersionIn : public EmptyJsonDataIn\r\n{\r\n};\r\n\r\nstruct GetVersionOut : public JsonDataOut\r\n{\r\n    GetVersionOut() : APIVersion(0)\r\n    {\r\n    }\r\n    virtual void fromMap(const QVariantMap &map)\r\n    {\r\n        APIVersion = map[\"APIVersion\"].toInt();\r\n        DelveVersion = map[\"DelveVersion\"].toString();\r\n    }\r\n    int APIVersion;\r\n    QString DelveVersion;\r\n};\r\n\r\nstruct SetAPIVersionIn : public JsonDataIn\r\n{\r\n    SetAPIVersionIn() : APIVersion(2)\r\n    {\r\n    }\r\n\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"APIVersion\"] = APIVersion;\r\n    }\r\n    int APIVersion;\r\n};\r\n\r\nstruct SetAPIVersionOut : public EmptyJsonDataOut\r\n{\r\n\r\n};\r\n\r\n/*\r\ntype ProcessPidIn struct {\r\n}\r\n\r\ntype ProcessPidOut struct {\r\n    Pid int\r\n}\r\n*/\r\nstruct ProcessPidIn : public EmptyJsonDataIn\r\n{\r\n};\r\n\r\nstruct ProcessPidOut : public JsonDataOut\r\n{\r\n    ProcessPidOut() : Pid(-1)\r\n    {\r\n    }\r\n    virtual void fromMap(const QVariantMap &map)\r\n    {\r\n        Pid = map[\"Pid\"].toInt();\r\n    }\r\n    int Pid;\r\n};\r\n\r\n/*\r\ntype LastModifiedIn struct {\r\n}\r\n\r\ntype LastModifiedOut struct {\r\n    Time time.Time\r\n}\r\n*/\r\n\r\nstruct LastModifiedIn : public EmptyJsonDataIn\r\n{\r\n};\r\n\r\nstruct LastModifiedOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap &map)\r\n    {\r\n        Time = map[\"Time\"].toDateTime();\r\n    }\r\n    QDateTime Time;\r\n};\r\n\r\n/*\r\ntype DetachIn struct {\r\n    Kill bool\r\n}\r\n\r\ntype DetachOut struct {\r\n}\r\n*/\r\nstruct DetachIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Kill\"] = Kill;\r\n    }\r\n    bool Kill;\r\n};\r\nstruct DetachOut : public EmptyJsonDataOut\r\n{\r\n};\r\n\r\n/*\r\ntype RestartIn struct {\r\n    // Position to restart from, if it starts with 'c' it's a checkpoint ID,\r\n    // otherwise it's an event number. Only valid for recorded targets.\r\n    Position string\r\n}\r\n\r\ntype RestartOut struct {\r\n    DiscardedBreakpoints []api.DiscardedBreakpoint\r\n}\r\n*/\r\nstruct RestartIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Position\"] = Position;\r\n    }\r\n    QString Position;\r\n};\r\n\r\nstruct RestartOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap &map)\r\n    {\r\n        QVariantList all = map[\"DiscardedBreakpoints\"].toList();\r\n        foreach (QVariant v, all) {\r\n            DiscardedBreakpoint db;\r\n            db.fromMap(v.toMap());\r\n            DiscardedBreakpoints.push_back(db);\r\n        }\r\n    }\r\n    QList<DiscardedBreakpoint> DiscardedBreakpoints;\r\n};\r\n\r\n/*\r\ntype StateIn struct {\r\n}\r\n\r\ntype StateOut struct {\r\n    State *api.DebuggerState\r\n}\r\n*/\r\n\r\nstruct StateIn : public EmptyJsonDataIn\r\n{\r\n};\r\n\r\nstruct StateOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap &map)\r\n    {\r\n        State.fromMap(map[\"State\"].toMap());\r\n    }\r\n\r\n    DebuggerState State;\r\n};\r\n\r\n/*\r\n// DebuggerCommand is a command which changes the debugger's execution state.\r\ntype DebuggerCommand struct {\r\n    // Name is the command to run.\r\n    Name string `json:\"name\"`\r\n    // ThreadID is used to specify which thread to use with the SwitchThread\r\n    // command.\r\n    ThreadID int `json:\"threadID,omitempty\"`\r\n    // GoroutineID is used to specify which thread to use with the SwitchGoroutine\r\n    // command.\r\n    GoroutineID int `json:\"goroutineID,omitempty\"`\r\n}\r\n\r\ntype CommandOut struct {\r\n    State api.DebuggerState\r\n}\r\n*/\r\n\r\nstruct DebuggerCommand : public JsonDataIn\r\n{\r\n    DebuggerCommand()\r\n        : ThreadID(0),GoroutineID(0)\r\n    {\r\n\r\n    }\r\n    DebuggerCommand(const QString &name)\r\n        : Name(name), ThreadID(0),GoroutineID(0)\r\n    {\r\n\r\n    }\r\n\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"name\"] = Name;\r\n        map[\"threadID\"] = ThreadID;\r\n        map[\"goroutineID\"] = GoroutineID;\r\n    }\r\n\r\n    void fromMap(const QVariantMap &map)\r\n    {\r\n        Name = map[\"name\"].toString();\r\n        ThreadID = map[\"threadID\"].toInt();\r\n        GoroutineID = map[\"goroutineID\"].toInt();\r\n    }\r\n\r\n    QString Name;\r\n    int ThreadID;\r\n    int GoroutineID;\r\n};\r\n\r\n\r\nstruct CommandOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap &map)\r\n    {\r\n        jsonData = map[\"State\"];\r\n        State.fromMap(jsonData.toMap());\r\n    }\r\n    QVariant      jsonData;\r\n    DebuggerState State;\r\n};\r\n\r\n/*\r\ntype GetBreakpointIn struct {\r\n    Id   int\r\n    Name string\r\n}\r\n\r\ntype GetBreakpointOut struct {\r\n    Breakpoint api.Breakpoint\r\n}\r\n*/\r\nstruct GetBreakpointIn : public JsonDataIn\r\n{\r\n    GetBreakpointIn()\r\n        : Id(0)\r\n    {\r\n    }\r\n\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Id\"] = Id;\r\n        map[\"Name\"] = Name;\r\n    }\r\n\r\n    int Id;\r\n    QString Name;\r\n};\r\n\r\nstruct GetBreakpointOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap &map)\r\n    {\r\n        QVariantMap m = map[\"Breakpoint\"].toMap();\r\n        if (!m.isEmpty()) {\r\n            pBreakpoint = BreakpointPointer(new Breakpoint);\r\n            pBreakpoint->fromMap(m);\r\n        }\r\n    }\r\n    BreakpointPointer pBreakpoint;\r\n};\r\n\r\n/*\r\ntype ListBreakpointsIn struct {\r\n}\r\n\r\ntype ListBreakpointsOut struct {\r\n    Breakpoints []*api.Breakpoint\r\n}\r\n*/\r\nstruct ListBreakpointsIn : public EmptyJsonDataIn\r\n{\r\n};\r\n\r\nstruct ListBreakpointsOut :public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap &map)\r\n    {\r\n        foreach (QVariant m, map.value(\"Breakpoints\").toList()) {\r\n            Breakpoint v;\r\n            v.fromMap(m.toMap());\r\n            Breakpoints.push_back(v);\r\n        }\r\n    }\r\n\r\n    QList<Breakpoint> Breakpoints;\r\n};\r\n\r\n/*\r\ntype ClearBreakpointIn struct {\r\n    Id   int\r\n    Name string\r\n}\r\n\r\ntype ClearBreakpointOut struct {\r\n    Breakpoint *api.Breakpoint\r\n}\r\n*/\r\nstruct CleartBreakpointIn : public JsonDataIn\r\n{\r\n    CleartBreakpointIn()\r\n        : Id(0)\r\n    {\r\n    }\r\n\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Id\"] = Id;\r\n        map[\"Name\"] = Name;\r\n    }\r\n\r\n    int Id;\r\n    QString Name;\r\n};\r\n\r\nstruct ClearBreakpointOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap &map)\r\n    {\r\n        QVariantMap mb = map[\"Brekpoint\"].toMap();\r\n        if (!mb.isEmpty()) {\r\n            pBreakpoint = BreakpointPointer(new Breakpoint);\r\n            pBreakpoint->fromMap(mb);\r\n        }\r\n    }\r\n    BreakpointPointer pBreakpoint;\r\n};\r\n\r\n/*\r\ntype AmendBreakpointIn struct {\r\n    Breakpoint api.Breakpoint\r\n}\r\n\r\ntype AmendBreakpointOut struct {\r\n}\r\n*/\r\nstruct AmendBreakpointIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Breakpoint\"] = Breakpoint.toMap();\r\n    }\r\n    struct Breakpoint Breakpoint;\r\n};\r\n\r\nstruct AmendBreakpointOut : public EmptyJsonDataOut\r\n{\r\n};\r\n\r\n/*\r\ntype CreateBreakpointIn struct {\r\n    Breakpoint api.Breakpoint\r\n}\r\n\r\ntype CreateBreakpointOut struct {\r\n    Breakpoint api.Breakpoint\r\n}\r\n*/\r\nstruct CreateBreakpointIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Breakpoint\"] = Breakpoint.toMap();\r\n    }\r\n    struct Breakpoint Breakpoint;\r\n};\r\n\r\nstruct CreateBreakpointOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap &map)\r\n    {\r\n        QVariantMap m = map[\"Breakpoint\"].toMap();\r\n        if (!m.isEmpty()) {\r\n            pBreakpoint = BreakpointPointer(new Breakpoint);\r\n            pBreakpoint->fromMap(map[\"Breakpoint\"].toMap());\r\n        }\r\n    }\r\n    BreakpointPointer pBreakpoint;\r\n};\r\n\r\n/*\r\ntype ListTypesIn struct {\r\n    Filter string\r\n}\r\n\r\ntype ListTypesOut struct {\r\n    Types []string\r\n}\r\n*/\r\n\r\nstruct ListTypesIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Filter\"] = Filter;\r\n    }\r\n    QString Filter;\r\n};\r\n\r\nstruct ListTypesOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap &map)\r\n    {\r\n        Types = map[\"Types\"].toStringList();\r\n    }\r\n    QStringList Types;\r\n};\r\n\r\n\r\n/*\r\ntype ListLocalVarsIn struct {\r\n    Scope api.EvalScope\r\n    Cfg   api.LoadConfig\r\n}\r\n\r\ntype ListLocalVarsOut struct {\r\n    Variables []api.Variable\r\n}\r\n*/\r\nstruct ListLocalVarsIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Scope\"] = Scope.toMap();\r\n        map[\"Cfg\"] = Cfg.toMap();\r\n    }\r\n    EvalScope Scope;\r\n    QString   Expr;\r\n    LoadConfig Cfg;\r\n};\r\n\r\nstruct ListLocalVarsOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap & map)\r\n    {\r\n        QVariantList all = map[\"Variables\"].toList();\r\n        foreach (QVariant e, all) {\r\n            Variable v;\r\n            v.fromMap(e.toMap());\r\n            Variables.push_back(v);\r\n        }\r\n    }\r\n    QList<Variable> Variables;\r\n};\r\n\r\nstruct ListPackageVarsIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Filter\"] = Filter;\r\n        map[\"Cfg\"] = Cfg.toMap();\r\n    }\r\n    QString Filter;\r\n    LoadConfig Cfg;\r\n};\r\n\r\nstruct ListPackageVarsOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap & map)\r\n    {\r\n        foreach (QVariant e, map[\"Variables\"].toList()) {\r\n            Variable v;\r\n            v.fromMap(e.toMap());\r\n            Variables.push_back(v);\r\n        }\r\n    }\r\n    QList<Variable> Variables;\r\n};\r\n\r\n/*\r\ntype CancelNextIn struct {\r\n}\r\n\r\ntype CancelNextOut struct {\r\n}\r\n*/\r\nstruct CancelNextIn : public EmptyJsonDataIn\r\n{\r\n};\r\nstruct CancelNextOut : public EmptyJsonDataOut\r\n{\r\n};\r\n\r\n/*\r\ntype ListThreadsIn struct {\r\n}\r\n\r\ntype ListThreadsOut struct {\r\n    Threads []*api.Thread\r\n}\r\n*/\r\nstruct ListThreadsIn : public EmptyJsonDataIn\r\n{\r\n};\r\n\r\nstruct ListThreadsOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap & map)\r\n    {\r\n        foreach (QVariant m, map[\"Threads\"].toList()) {\r\n            Thread v;\r\n            v.fromMap(m.toMap());\r\n            Threads.push_back(v);\r\n        }\r\n    }\r\n    QList<Thread> Threads;\r\n};\r\n\r\n/*\r\ntype GetThreadIn struct {\r\n    Id int\r\n}\r\n\r\ntype GetThreadOut struct {\r\n    Thread *api.Thread\r\n}\r\n*/\r\nstruct GetThreadIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Id\"] = Id;\r\n    }\r\n    int Id;\r\n};\r\n\r\nstruct GetThreadOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap &map)\r\n    {\r\n        QVariantMap m = map[\"Thread\"].toMap();\r\n        if (!m.isEmpty()) {\r\n            pThread = ThreadPointer(new Thread);\r\n            pThread->fromMap(m);\r\n        }\r\n    }\r\n\r\n    ThreadPointer pThread;\r\n};\r\n\r\n/*\r\ntype EvalIn struct {\r\n    Scope api.EvalScope\r\n    Expr  string\r\n    Cfg   *api.LoadConfig\r\n}\r\n\r\ntype EvalOut struct {\r\n    Variable *api.Variable\r\n}\r\n*/\r\n\r\nstruct EvalIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Scope\"] = Scope.toMap();\r\n        map[\"Expr\"] = Expr;\r\n        map[\"Cfg\"] = Cfg.toMap();\r\n    }\r\n    EvalScope Scope;\r\n    QString Expr;\r\n    LoadConfig Cfg;\r\n};\r\n\r\nstruct EvalOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap &map)\r\n    {\r\n        QVariantMap m = map[\"Variable\"].toMap();\r\n        if (!m.isEmpty()) {\r\n            pVariable = VariablePointer(new Variable);\r\n            pVariable->fromMap(m);\r\n        }\r\n    }\r\n    VariablePointer pVariable;\r\n};\r\n\r\n/*\r\ntype SetIn struct {\r\n    Scope  api.EvalScope\r\n    Symbol string\r\n    Value  string\r\n}\r\n\r\ntype SetOut struct {\r\n}\r\n*/\r\nstruct SetIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Scope\"] = Scope.toMap();\r\n        map[\"Symbol\"] = Symbol;\r\n        map[\"Value\"] = Value;\r\n    }\r\n\r\n    EvalScope Scope;\r\n    QString Symbol;\r\n    QString Value;\r\n};\r\nstruct SetOut : public EmptyJsonDataOut\r\n{\r\n};\r\n/*\r\ntype ListSourcesIn struct {\r\n    Filter string\r\n}\r\n\r\ntype ListSourcesOut struct {\r\n    Sources []string\r\n}\r\n*/\r\nstruct ListSourcesIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Filter\"] = Filter;\r\n    }\r\n    QString Filter;\r\n};\r\nstruct ListSourcesOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap &map)\r\n    {\r\n        Sources = map[\"Sources\"].toStringList();\r\n    }\r\n    QStringList Sources;\r\n};\r\n\r\n/*\r\ntype ListFunctionsIn struct {\r\n    Filter string\r\n}\r\n\r\ntype ListFunctionsOut struct {\r\n    Funcs []string\r\n}\r\n*/\r\nstruct ListFunctionsIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Filter\"] = Filter;\r\n    }\r\n    QString Filter;\r\n};\r\nstruct ListFunctionsOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap &map)\r\n    {\r\n        Funcs = map[\"Funcs\"].toStringList();\r\n    }\r\n    QStringList Funcs;\r\n};\r\n\r\n/*\r\ntype ListRegistersIn struct {\r\n    ThreadID  int\r\n    IncludeFp bool\r\n}\r\n\r\ntype ListRegistersOut struct {\r\n    Registers string\r\n    Regs      api.Registers\r\n}\r\n*/\r\n\r\nstruct ListRegistersIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"ThreadID\"] = ThreadID;\r\n        map[\"IncludeFp\"] = IncludeFp;\r\n    }\r\n    int ThreadID;\r\n    bool IncludeFp;\r\n};\r\n\r\nstruct ListRegistersOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap &map)\r\n    {\r\n        Registers = map[\"Registers\"].toString();\r\n        foreach (QVariant m, map[\"Regs\"].toList()) {\r\n            Register v;\r\n            v.fromMap(m.toMap());\r\n            Regs.push_back(v);\r\n        }\r\n    }\r\n    QString Registers;\r\n    QList<Register> Regs;\r\n};\r\n\r\n/*\r\ntype ListFunctionArgsIn struct {\r\n    Scope api.EvalScope\r\n    Cfg   api.LoadConfig\r\n}\r\n\r\ntype ListFunctionArgsOut struct {\r\n    Args []api.Variable\r\n}\r\n*/\r\n\r\nstruct ListFunctionArgsIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Scope\"] = Scope.toMap();\r\n        map[\"Cfg\"] = Cfg.toMap();\r\n    }\r\n    EvalScope Scope;\r\n    LoadConfig Cfg;\r\n};\r\n\r\nstruct ListFunctionArgsOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap & map)\r\n    {\r\n        foreach (QVariant e, map[\"Args\"].toList()) {\r\n            Variable v;\r\n            v.fromMap(e.toMap());\r\n            Variables.push_back(v);\r\n        }\r\n    }\r\n    QList<Variable> Variables;\r\n};\r\n\r\n/*\r\ntype ListGoroutinesIn struct {\r\n}\r\n\r\ntype ListGoroutinesOut struct {\r\n    Goroutines []*api.Goroutine\r\n}\r\n*/\r\n\r\nstruct ListGoroutinesIn : public EmptyJsonDataIn\r\n{\r\n};\r\n\r\nstruct ListGoroutinesOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap & map)\r\n    {\r\n        foreach (QVariant e, map[\"Goroutines\"].toList()) {\r\n            Goroutine v;\r\n            v.fromMap(e.toMap());\r\n            Goroutines.push_back(v);\r\n        }\r\n    }\r\n    QList<Goroutine> Goroutines;\r\n};\r\n\r\n/*\r\ntype StacktraceIn struct {\r\n    Id    int\r\n    Depth int\r\n    Full  bool\r\n    Cfg   *api.LoadConfig\r\n}\r\n\r\ntype StacktraceOut struct {\r\n    Locations []api.Stackframe\r\n}\r\n*/\r\nstruct StacktraceIn : public EmptyJsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Id\"] = Id;\r\n        map[\"Depth\"] = Depth;\r\n        map[\"Full\"] = Full;\r\n        map[\"Cfg\"] = Cfg.toMap();\r\n    }\r\n    int Id;\r\n    int Depth;\r\n    bool Full;\r\n    LoadConfig Cfg;\r\n};\r\n\r\nstruct StacktraceOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap & map)\r\n    {\r\n        foreach (QVariant e, map[\"Locations\"].toList()) {\r\n            Stackframe v;\r\n            v.fromMap(e.toMap());\r\n            Locations.push_back(v);\r\n        }\r\n    }\r\n    QList<Stackframe> Locations;\r\n};\r\n\r\n/*\r\ntype AttachedToExistingProcessIn struct {\r\n}\r\n\r\ntype AttachedToExistingProcessOut struct {\r\n    Answer bool\r\n}\r\n*/\r\n\r\nstruct AttachedToExistingProcessIn : public EmptyJsonDataIn\r\n{\r\n};\r\n\r\nstruct AttachedToExistingProcessOut : public JsonDataOut\r\n{\r\n    AttachedToExistingProcessOut()\r\n        : Answer(false)\r\n    {\r\n    }\r\n\r\n    virtual void fromMap(const QVariantMap & map)\r\n    {\r\n        Answer = map[\"Answer\"].toBool();\r\n    }\r\n    bool Answer;\r\n};\r\n\r\n/*\r\ntype FindLocationIn struct {\r\n    Scope api.EvalScope\r\n    Loc   string\r\n}\r\n\r\ntype FindLocationOut struct {\r\n    Locations []api.Location\r\n}\r\n*/\r\n\r\nstruct FindLocationIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Scope\"] = Scope.toMap();\r\n        map[\"Loc\"] = Loc;\r\n    }\r\n    EvalScope Scope;\r\n    QString Loc;\r\n};\r\n\r\nstruct FindLocationOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap & map)\r\n    {\r\n        foreach (QVariant e, map[\"Locations\"].toList()) {\r\n            Location v;\r\n            v.fromMap(e.toMap());\r\n            Locations.push_back(v);\r\n        }\r\n    }\r\n    QList<Location> Locations;\r\n};\r\n\r\nenum AssemblyFlavour\r\n{\r\n    GNUFlavour = 0,\r\n    IntelFlavour = 1,\r\n    GoFlavour = 2\r\n};\r\n\r\n/*\r\ntype DisassembleIn struct {\r\n    Scope          api.EvalScope\r\n    StartPC, EndPC uint64\r\n    Flavour        api.AssemblyFlavour\r\n}\r\n\r\ntype DisassembleOut struct {\r\n    Disassemble api.AsmInstructions\r\n}\r\n*/\r\nstruct DisassembleIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap &map) const\r\n    {\r\n        map[\"Scope\"] = Scope.toMap();\r\n        map[\"StartPC\"] = StartPC;\r\n        map[\"EndPC\"] = EndPC;\r\n        map[\"Flavour\"] = Flavour;\r\n    }\r\n    EvalScope Scope;\r\n    quint64 StartPC;\r\n    quint64 EndPC;\r\n    AssemblyFlavour Flavour;\r\n};\r\n\r\nstruct DisassembleOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap & map)\r\n    {\r\n        foreach (QVariant e, map[\"Disassemble\"].toList()) {\r\n            AsmInstruction v;\r\n            v.fromMap(e.toMap());\r\n            Disassemble.push_back(v);\r\n        }\r\n    }\r\n    QList<AsmInstruction> Disassemble;\r\n};\r\n\r\n/*\r\ntype RecordedIn struct {\r\n}\r\n\r\ntype RecordedOut struct {\r\n    Recorded       bool\r\n    TraceDirectory string\r\n}\r\n*/\r\nstruct RecordedIn : public EmptyJsonDataIn\r\n{\r\n};\r\n\r\nstruct RecordedOut : public JsonDataOut\r\n{\r\n    RecordedOut() : Recorded(false)\r\n    {\r\n    }\r\n\r\n    virtual void fromMap(const QVariantMap & map)\r\n    {\r\n        Recorded = map[\"Recorded\"].toBool();\r\n        TraceDirectory = map[\"TraceDirectory\"].toString();\r\n    }\r\n    bool Recorded;\r\n    QString TraceDirectory;\r\n};\r\n\r\n/*\r\ntype CheckpointIn struct {\r\n    Where string\r\n}\r\n\r\ntype CheckpointOut struct {\r\n    ID int\r\n}\r\n*/\r\n\r\nstruct CheckpointIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap & map) const\r\n    {\r\n        map[\"Where\"] = Where;\r\n    }\r\n    QString Where;\r\n};\r\n\r\nstruct CheckpointOut : public JsonDataOut\r\n{\r\n    CheckpointOut() : ID(-1)\r\n    {\r\n    }\r\n\r\n    virtual void fromMap(const QVariantMap & map)\r\n    {\r\n        ID = map[\"ID\"].toInt();\r\n    }\r\n    int ID;\r\n};\r\n\r\n/*\r\ntype ListCheckpointsIn struct {\r\n}\r\n\r\ntype ListCheckpointsOut struct {\r\n    Checkpoints []api.Checkpoint\r\n}\r\n*/\r\nstruct ListCheckpointsIn : public EmptyJsonDataIn\r\n{\r\n};\r\n\r\nstruct ListCheckpointsOut : public JsonDataOut\r\n{\r\n    virtual void fromMap(const QVariantMap & map)\r\n    {\r\n        foreach (QVariant e, map[\"Checkpoints\"].toList()) {\r\n            Checkpoint v;\r\n            v.fromMap(e.toMap());\r\n            Checkpoints.push_back(v);\r\n        }\r\n    }\r\n    QList<Checkpoint> Checkpoints;\r\n};\r\n\r\n/*\r\ntype ClearCheckpointIn struct {\r\n    ID int\r\n}\r\n\r\ntype ClearCheckpointOut struct {\r\n}\r\n*/\r\n\r\nstruct ClearCheckpointIn : public JsonDataIn\r\n{\r\n    virtual void toMap(QVariantMap & map) const\r\n    {\r\n        map[\"ID\"] = ID;\r\n    }\r\n    int ID;\r\n};\r\n\r\nstruct ClearCheckpointOut : public EmptyJsonDataOut\r\n{\r\n};\r\n\r\n#endif // DLVTYPES_H\r\n"
  },
  {
    "path": "liteidex/src/utils/dlvclient/varianthelper.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: varianthelper.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"varianthelper.h\"\r\n\r\n#include <QString>\r\n#include <QVariant>\r\n#include <QMap>\r\n#include <QMetaProperty>\r\n#include <QStringList>\r\n#include <QDebug>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nQMap<QString,QVariant> VariantHelper::ObjectToVariantMap( const QObject* object,\r\n                              const QStringList& ignoredProperties)\r\n{\r\n  QMap<QString,QVariant> result;\r\n  const QMetaObject *metaobject = object->metaObject();\r\n  int count = metaobject->propertyCount();\r\n  for (int i=0; i<count; ++i) {\r\n    QMetaProperty metaproperty = metaobject->property(i);\r\n    const char *name = metaproperty.name();\r\n\r\n    if (ignoredProperties.contains(QLatin1String(name)) || (!metaproperty.isReadable()))\r\n      continue;\r\n\r\n    QVariant value = object->property(name);\r\n\r\n    result[QLatin1String(name)] = value;\r\n }\r\n  return result;\r\n}\r\n\r\nvoid VariantHelper::VarintMapToObject(const QMap<QString, QVariant> &variantMap, QObject *object)\r\n{\r\n    const QMetaObject *metaobject = object->metaObject();\r\n\r\n    QMap<QString,QVariant>::const_iterator iter;\r\n    for (iter = variantMap.constBegin(); iter != variantMap.constEnd(); ++iter) {\r\n        object->setProperty(iter.key().toLatin1(),iter.value());\r\n\r\n        int pIdx = metaobject->indexOfProperty( iter.key().toLatin1() );\r\n\r\n        if ( pIdx < 0 ) {\r\n            qDebug() << \"waring not find property key\" << iter.key();\r\n            object->setProperty(iter.key().toLatin1(),iter.value());\r\n            continue;\r\n        }\r\n\r\n        QMetaProperty metaproperty = metaobject->property( pIdx );\r\n        QVariant::Type type = metaproperty.type();\r\n        QVariant v( iter.value() );\r\n        if ( v.canConvert( type ) ) {\r\n            v.convert( type );\r\n            metaproperty.write( object, v );\r\n        } else if (QString(QLatin1String(\"QVariant\")).compare(QLatin1String(metaproperty.typeName())) == 0) {\r\n            metaproperty.write( object, v );\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "liteidex/src/utils/dlvclient/varianthelper.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: varianthelper.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef VARIANTHELPER_H\r\n#define VARIANTHELPER_H\r\n\r\n#include <QVariant>\r\n#include <QStringList>\r\n\r\nclass VariantHelper\r\n{\r\npublic:\r\n    static QMap<QString,QVariant> ObjectToVariantMap(const QObject *object, const QStringList &ignoredProperties = QStringList());\r\n    static QMap<QString,QVariant> ObjectToVariant(const QObject *object, const QStringList &ignoredProperties = QStringList())\r\n    {\r\n        return ObjectToVariantMap(object,ignoredProperties);\r\n    }\r\n    static void VarintMapToObject(const QMap<QString,QVariant> &variantMap, QObject *object);\r\n    static void VarintToQObject(const QVariant &variant, QObject *object)\r\n    {\r\n        VarintMapToObject(variant.toMap(),object);\r\n    }\r\n};\r\n\r\n#endif // VARIANTHELPER_H\r\n"
  },
  {
    "path": "liteidex/src/utils/documentbrowser/documentbrowser.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: documentbrowser.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"documentbrowser.h\"\n#include \"extension/extension.h\"\n#include \"cmark/libcmark.h\"\n\n#include <QTextBrowser>\n#include <QVBoxLayout>\n#include <QHBoxLayout>\n#include <QScrollBar>\n#include <QStatusBar>\n#include <QComboBox>\n#include <QToolBar>\n#include <QToolButton>\n#include <QCheckBox>\n#include <QAction>\n#include <QRegExp>\n#include <QFile>\n#include <QFileInfo>\n#include <QTextCodec>\n#include <QDir>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nDocumentBrowser::DocumentBrowser(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IDocumentBrowser(parent),\n    m_liteApp(app),\n    m_extension(new Extension)\n{\n    m_widget = new QWidget;\n\n    m_htmlWidget = app->htmlWidgetManager()->createByName(this,\"QTextBrowser\");\n\n    m_toolBar = new QToolBar;\n    m_toolBar->setIconSize(LiteApi::getToolBarIconSize(m_liteApp));\n\n    m_backwardAct = new QAction(QIcon(\"icon:images/backward.png\"),tr(\"Back\"),this);\n    m_forwardAct = new QAction(QIcon(\"icon:images/forward.png\"),tr(\"Forward\"),this);\n    m_reloadUrlAct = new QAction(QIcon(\"icon:images/reload.png\"),tr(\"Reload\"),this);\n    m_toolBar->addAction(m_backwardAct);\n    m_toolBar->addAction(m_forwardAct);\n\n    LiteApi::IActionContext *actionContext = m_liteApp->actionManager()->getActionContext(this,\"Document\");\n\n    m_increaseFontSize = new QAction(tr(\"Increase Font Size\"),this);\n    actionContext->regAction(m_increaseFontSize,\"IncreaseFontSize\",\"Ctrl++;Ctrl+=\");\n\n    m_decreaseFontSize = new QAction(tr(\"Decrease Font Size\"),this);\n    actionContext->regAction(m_decreaseFontSize,\"DecreaseFontSize\",\"Ctrl+-\");\n\n    m_resetFontSize = new QAction(tr(\"Reset Font Size\"),this);\n    actionContext->regAction(m_resetFontSize,\"ResizeFontSize\",\"Ctrl+0\");\n\n    m_urlComboBox = new QComboBox;\n    m_urlComboBox->setEditable(true);\n    m_urlComboBox->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);\n\n    m_toolBar->addSeparator();\n    m_toolBar->addWidget(m_urlComboBox);\n    m_toolBar->addAction(m_reloadUrlAct);\n\n    QVBoxLayout *mainLayout = new QVBoxLayout;\n    mainLayout->setMargin(0);\n    mainLayout->setSpacing(0);\n\n    mainLayout->addWidget(m_toolBar);\n    mainLayout->addWidget(m_htmlWidget->widget());\n    m_widget->setLayout(mainLayout);\n\n    m_widget->addAction(m_increaseFontSize);\n    m_widget->addAction(m_decreaseFontSize);\n    m_widget->addAction(m_resetFontSize);\n\n    connect(m_increaseFontSize,SIGNAL(triggered()),this,SLOT(increaseFontSize()));\n    connect(m_decreaseFontSize,SIGNAL(triggered()),this,SLOT(decreaseFontSize()));\n    connect(m_resetFontSize,SIGNAL(triggered()),this,SLOT(resetFontSize()));\n    connect(m_htmlWidget,SIGNAL(linkHovered(QUrl)),this,SIGNAL(linkHovered(QUrl)));\n    connect(m_htmlWidget,SIGNAL(linkClicked(QUrl)),this,SLOT(linkClicked(QUrl)));\n    connect(m_htmlWidget,SIGNAL(loadFinished(bool)),this,SIGNAL(documentLoaded()));\n    connect(m_htmlWidget,SIGNAL(anchorChanged(QString)),this,SIGNAL(anchorChanged(QString)));\n    connect(m_backwardAct,SIGNAL(triggered()),this,SLOT(backward()));\n    connect(m_forwardAct,SIGNAL(triggered()),this,SLOT(forward()));\n    connect(m_reloadUrlAct,SIGNAL(triggered()),this,SLOT(reloadUrl()));\n    connect(m_urlComboBox,SIGNAL(activated(QString)),this,SLOT(activatedUrl(QString)));\n    connect(this,SIGNAL(backwardAvailable(bool)),m_backwardAct,SLOT(setEnabled(bool)));\n    connect(this,SIGNAL(forwardAvailable(bool)),m_forwardAct,SLOT(setEnabled(bool)));\n\n    m_extension->addObject(\"LiteApi.IDocumentBrowser\",this);\n    m_extension->addObject(\"LiteApi.IHtmlWidget\",m_htmlWidget);\n    m_extension->addObject(\"LiteApi.QTextBrowser\",m_htmlWidget->widget());\n    m_htmlWidget->installEventFilter(m_liteApp->editorManager());\n\n    requestFontZoom(0);\n\n    QPalette p = m_htmlWidget->widget()->palette();\n    p.setBrush(QPalette::Highlight,Qt::yellow);\n    p.setColor(QPalette::HighlightedText,Qt::black);\n    m_htmlWidget->widget()->setPalette(p);\n\n    emit backwardAvailable(false);\n    emit forwardAvailable(false);\n}\n\nDocumentBrowser::~DocumentBrowser()\n{\n    if (m_widget) {\n        delete m_widget;\n    }\n    if (m_extension) {\n        delete m_extension;\n    }\n}\n\nLiteApi::IExtension *DocumentBrowser::extension()\n{\n    return m_extension;\n}\n\nbool DocumentBrowser::open(const QString &fileName,const QString &mimeType)\n{\n    QFile file(fileName);\n    if (!file.open(QIODevice::ReadOnly)) {\n        return false;\n    }    \n    m_mimeType = mimeType;\n    QFileInfo info(fileName);\n    QString htmlType = m_liteApp->mimeTypeManager()->findMimeTypeByFile(fileName);\n    m_name = info.fileName();\n    m_fileName = QDir::toNativeSeparators(fileName);\n\n    m_htmlWidget->setSearchPaths(QStringList()<<info.absolutePath());\n\n    QByteArray ba = file.readAll();\n\n    if (htmlType == \"text/html\") {\n        QTextCodec *codec = QTextCodec::codecForHtml(ba,QTextCodec::codecForName(\"utf-8\"));\n        setUrlHtml(QUrl::fromLocalFile(fileName),codec->toUnicode(ba));\n    } else if (htmlType == \"text/x-markdown\") {\n        QTextCodec *codec = QTextCodec::codecForName(\"utf-8\");\n        QByteArray out = md2html(ba);\n        setUrlHtml(QUrl::fromLocalFile(fileName),codec->toUnicode(out));\n    }\n    file.close();\n    return true;\n}\n\nQWidget *DocumentBrowser::widget()\n{\n    return m_widget;\n}\n\nQString DocumentBrowser::name() const\n{\n    return m_name;\n}\n\nQString DocumentBrowser::filePath() const\n{\n    return m_fileName;\n}\n\nQString DocumentBrowser::mimeType() const\n{\n    return m_mimeType;\n}\n\nvoid DocumentBrowser::onActive()\n{\n}\n\n\nvoid DocumentBrowser::setName(const QString &t)\n{\n    m_name = t;\n}\n\nvoid DocumentBrowser::setSearchPaths(const QStringList &paths)\n{\n    m_htmlWidget->setSearchPaths(paths);\n}\n\nQUrl DocumentBrowser::resolveUrl(const QUrl &url) const\n{\n    if (!url.isRelative())\n        return url;\n\n    // For the second case QUrl can merge \"#someanchor\" with \"foo.html\"\n    // correctly to \"foo.html#someanchor\"\n    if (!(m_url.isRelative()\n          || (m_url.scheme() == QLatin1String(\"file\")\n              && !QFileInfo(m_url.toLocalFile()).isAbsolute()))\n          || (url.hasFragment() && url.path().isEmpty())) {\n        return m_url.resolved(url);\n    }\n\n    // this is our last resort when current url and new url are both relative\n    // we try to resolve against the current working directory in the local\n    // file system.\n    QFileInfo fi(m_url.toLocalFile());\n    if (fi.exists()) {\n        return QUrl::fromLocalFile(fi.absolutePath() + QDir::separator()).resolved(url);\n    }\n\n    return url;\n}\n\nQToolBar *DocumentBrowser::toolBar()\n{\n    return m_toolBar;\n}\n\nQComboBox *DocumentBrowser::urlComboBox()\n{\n    return m_urlComboBox;\n}\n\nLiteApi::IHtmlWidget *DocumentBrowser::htmlWidget()\n{\n    return m_htmlWidget;\n}\n\nvoid DocumentBrowser::scrollToAnchor(const QString &text)\n{\n    const HistoryEntry &historyEntry = createHistoryEntry();\n\n    m_url.setFragment(text);\n\n    if (text.isEmpty()) {\n        m_htmlWidget->setScrollBarValue(Qt::Horizontal,0);\n        m_htmlWidget->setScrollBarValue(Qt::Vertical,0);\n    } else {\n        m_htmlWidget->scrollToAnchor(text);\n    }\n\n    m_urlComboBox->blockSignals(true);\n    int index = m_urlComboBox->findText(m_url.toString());\n    if (index == -1) {\n        m_urlComboBox->addItem(m_url.toString());\n        index = m_urlComboBox->count()-1;\n    }\n    m_urlComboBox->setCurrentIndex(index);\n    m_urlComboBox->blockSignals(false);\n\n    emit documentLoaded();\n\n    if (!m_backwardStack.isEmpty() && m_url == m_backwardStack.top().url)\n    {\n        //restoreHistoryEntry(m_backwardStack.top());\n        return;\n    }\n\n    if (!m_backwardStack.isEmpty()) {\n        m_backwardStack.top() = historyEntry;\n    }\n\n    HistoryEntry entry;\n    entry.url = m_url;\n    m_backwardStack.push(entry);\n\n    emit backwardAvailable(m_backwardStack.count() > 1);\n\n    if (!m_forwardStack.isEmpty() && m_url == m_forwardStack.top().url) {\n        m_forwardStack.pop();\n        emit forwardAvailable(m_forwardStack.count() > 0);\n    } else {\n        m_forwardStack.clear();\n        emit forwardAvailable(false);\n    }\n}\n\nvoid DocumentBrowser::setUrlHtml(const QUrl &url,const QString &data)\n{\n    const HistoryEntry &historyEntry = createHistoryEntry();\n    if (!data.isEmpty()) {\n        m_htmlWidget->setHtml(data,url);\n    }\n    m_url = url;\n    if (!url.fragment().isEmpty()) {\n        m_htmlWidget->scrollToAnchor(url.fragment());\n    } else {\n        m_htmlWidget->setScrollBarValue(Qt::Horizontal,0);\n        m_htmlWidget->setScrollBarValue(Qt::Vertical,0);\n    }\n\n    m_urlComboBox->blockSignals(true);\n    int index = m_urlComboBox->findText(m_url.toString());\n    if (index == -1) {\n        m_urlComboBox->addItem(m_url.toString());\n        index = m_urlComboBox->count()-1;\n    }\n    m_urlComboBox->setCurrentIndex(index);\n    m_urlComboBox->blockSignals(false);\n\n    if (!m_backwardStack.isEmpty() && url == m_backwardStack.top().url)\n    {\n    //    restoreHistoryEntry(m_backwardStack.top());\n        return;\n    }\n\n    if (!m_backwardStack.isEmpty()) {\n        m_backwardStack.top() = historyEntry;\n    }\n\n    HistoryEntry entry;\n    entry.url = url;\n    m_backwardStack.push(entry);\n\n    emit backwardAvailable(m_backwardStack.count() > 1);\n\n    if (!m_forwardStack.isEmpty() && url == m_forwardStack.top().url) {\n        m_forwardStack.pop();\n        emit forwardAvailable(m_forwardStack.count() > 0);\n    } else {\n        m_forwardStack.clear();\n        emit forwardAvailable(false);\n    }\n}\n\nvoid DocumentBrowser::activatedUrl(QString text)\n{\n    if (text.isEmpty()) {\n        return;\n    }\n    QUrl url(text);\n    requestUrl(url);\n}\n\nDocumentBrowser::HistoryEntry DocumentBrowser::createHistoryEntry() const\n{\n    HistoryEntry entry;\n    entry.url = m_url;\n    entry.hpos = m_htmlWidget->scrollBarValue(Qt::Horizontal);\n    entry.vpos = m_htmlWidget->scrollBarValue(Qt::Vertical);\n    return entry;\n}\n\nvoid DocumentBrowser::restoreHistoryEntry(const HistoryEntry &entry)\n{\n    m_url = entry.url;\n    m_htmlWidget->setScrollBarValue(Qt::Horizontal,entry.hpos);\n    m_htmlWidget->setScrollBarValue(Qt::Vertical,entry.vpos);\n}\n\nvoid DocumentBrowser::backward()\n{\n    if (m_backwardStack.count() <= 1) {\n        return;\n    }\n    m_forwardStack.push(createHistoryEntry());\n    m_backwardStack.pop();\n    emit requestUrl(m_backwardStack.top().url);\n    emit backwardAvailable(m_backwardStack.count() > 1);\n    emit forwardAvailable(true);\n}\n\nvoid DocumentBrowser::reloadUrl()\n{\n    emit requestUrl(m_url);\n}\n\nvoid DocumentBrowser::increaseFontSize()\n{\n    this->requestFontZoom(10);\n}\n\nvoid DocumentBrowser::decreaseFontSize()\n{\n    this->requestFontZoom(-10);\n}\n\nvoid DocumentBrowser::resetFontSize()\n{\n    int fontSize = m_liteApp->settings()->value(DOCUMENT_FONTSIZE,12).toInt();\n    m_liteApp->settings()->setValue(DOCUMENT_FONTZOOM,100);\n    QWidget *widget = m_htmlWidget->widget();\n    QFont font = widget->font();\n    font.setPointSize(fontSize);\n    widget->setFont(font);\n}\n\nvoid DocumentBrowser::requestFontZoom(int zoom)\n{\n    int fontSize = m_liteApp->settings()->value(DOCUMENT_FONTSIZE,12).toInt();\n    int fontZoom = m_liteApp->settings()->value(DOCUMENT_FONTZOOM,100).toInt();\n    fontZoom += zoom;\n    if (fontZoom <= 10) {\n        return;\n    }\n    m_liteApp->settings()->setValue(DOCUMENT_FONTZOOM,fontZoom);\n    QWidget *widget = m_htmlWidget->widget();\n    QFont font = widget->font();\n    font.setPointSize(fontSize*fontZoom/100.0);\n    widget->setFont(font);\n}\n\nvoid DocumentBrowser::forward()\n{\n    if (m_forwardStack.isEmpty()) {\n        return;\n    }\n    if (!m_backwardStack.isEmpty()) {\n        m_backwardStack.top() = createHistoryEntry();\n    }\n    m_backwardStack.push(m_forwardStack.pop());\n    emit requestUrl(m_backwardStack.top().url);\n    emit backwardAvailable(true);\n    emit forwardAvailable(m_forwardStack.count() > 0);\n}\n\nvoid DocumentBrowser::linkClicked(QUrl url)\n{\n    if (url.path().isEmpty() && !url.fragment().isEmpty()) {\n        m_liteApp->mainWindow()->statusBar()->clearMessage();\n        //m_textBrowser->scrollToAnchor(url.fragment());\n        this->scrollToAnchor(url.fragment());\n        return;\n    }\n    emit requestUrl(url);\n}\n"
  },
  {
    "path": "liteidex/src/utils/documentbrowser/documentbrowser.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: documentbrowser.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef DOCUMENTBROWSER_H\n#define DOCUMENTBROWSER_H\n\n#include \"liteapi/liteapi.h\"\n#include \"docbrowserapi/docbrowserapi.h\"\n#include <QStack>\n#include <QUrl>\n#include <QComboBox>\n#include <QDir>\n\n#define DOCUMENT_FONTSIZE \"Documents/FontSize\"\n#define DOCUMENT_FONTZOOM \"Documents/FontZoom\"\n\nclass QTextBrowser;\nclass QComboBox;\nclass QToolButton;\nclass QCheckBox;\nclass Extension;\n\nclass DocumentBrowser : public LiteApi::IDocumentBrowser\n{\n    Q_OBJECT\npublic:\n    explicit DocumentBrowser(LiteApi::IApplication *app, QObject *parent);\n    ~DocumentBrowser();\npublic:\n    virtual LiteApi::IExtension *extension();\n    virtual QWidget *widget();\n    virtual bool open(const QString &filePath,const QString &mimeType);\n    virtual QString name() const;\n    virtual QString filePath() const;\n    virtual QString mimeType() const;\n    virtual void onActive();\n    void setName(const QString &t);\n    QUrl resolveUrl(const QUrl &url) const;\npublic:\n    virtual void setSearchPaths(const QStringList &paths);\n    virtual void setUrlHtml(const QUrl &url,const QString &html);\n    virtual void scrollToAnchor(const QString &text);\n    virtual QToolBar *toolBar();\n    virtual QComboBox *urlComboBox();\n    virtual LiteApi::IHtmlWidget *htmlWidget();\npublic slots:\n    virtual void backward();\n    virtual void forward();\n    virtual void reloadUrl();\npublic slots:\n    void increaseFontSize();\n    void decreaseFontSize();\n    void resetFontSize();\n    void requestFontZoom(int zoom);\n    void linkClicked(QUrl);\n    void activatedUrl(QString text);\nprotected:\n    struct HistoryEntry {\n        HistoryEntry()\n            : hpos(0), vpos(0)\n        {}\n        QUrl url;\n        int hpos;\n        int vpos;\n    };\n    HistoryEntry createHistoryEntry() const;\n    void restoreHistoryEntry(const HistoryEntry &entry);\n    LiteApi::IApplication   *m_liteApp;\n    Extension     *m_extension;\n    QWidget *m_widget;\n    LiteApi::IHtmlWidget *m_htmlWidget;\n    QToolBar     *m_toolBar;\n    QAction      *m_backwardAct;\n    QAction      *m_forwardAct;\n    QAction      *m_reloadUrlAct;\n    QAction      *m_increaseFontSize;\n    QAction      *m_decreaseFontSize;\n    QAction      *m_resetFontSize;\n    QComboBox    *m_urlComboBox;\n    QString     m_name;\n    QString     m_fileName;\n    QString     m_mimeType;\n    QUrl        m_url;\n    QStack<HistoryEntry> m_backwardStack;\n    QStack<HistoryEntry> m_forwardStack;\n};\n\n#endif // DOCUMENTBROWSER_H\n"
  },
  {
    "path": "liteidex/src/utils/documentbrowser/documentbrowser.pri",
    "content": "LIBS *= -l$$qtLibraryName(documentbrowser)\n\ninclude(../../utils/extension/extension.pri)\ninclude(../../api/docbrowserapi/docbrowserapi.pri)\ninclude(../../3rdparty/cmark/cmark.pri)\n\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/documentbrowser/documentbrowser.pro",
    "content": "TARGET = documentbrowser\nTEMPLATE = lib\nCONFIG += staticlib\n\ninclude (../../liteideutils.pri)\ninclude (../../api/docbrowserapi/docbrowserapi.pri)\ninclude (../extension/extension.pri)\n\nSOURCES += documentbrowser.cpp \\\n    documentbrowserfactory.cpp\n\nHEADERS += documentbrowser.h \\\n    documentbrowserfactory.h\n"
  },
  {
    "path": "liteidex/src/utils/documentbrowser/documentbrowserfactory.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: documentbrowserfactory.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"documentbrowserfactory.h\"\n#include \"documentbrowser.h\"\n#include <QFile>\n#include <QTextBrowser>\n#include <QFileInfo>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nDocumentBrowserFactory::DocumentBrowserFactory(LiteApi::IApplication *app, QObject *parent) :\n    LiteApi::IEditorFactory(parent),\n    m_liteApp(app)\n{\n    m_mimeTypes << \"liteide/x-browser\";\n}\n\nQStringList DocumentBrowserFactory::mimeTypes() const\n{\n    return m_mimeTypes;\n}\n\nLiteApi::IEditor *DocumentBrowserFactory::open(const QString &fileName, const QString &mimeType)\n{\n    DocumentBrowser *browser = new DocumentBrowser(m_liteApp,0);\n    if (browser->open(fileName,mimeType)) {\n        return browser;\n    }\n    return 0;\n}\n\nQString DocumentBrowserFactory::id() const\n{\n    return  \"DocumentBrowser\";\n}\n\nQString DocumentBrowserFactory::displayName() const\n{\n    return tr(\"DocumentBrowser\");\n}\n\nbool DocumentBrowserFactory::testMimeType(const QString &mimeType)\n{\n    return  true;\n}\n"
  },
  {
    "path": "liteidex/src/utils/documentbrowser/documentbrowserfactory.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: documentbrowserfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef DOCUMENTBROWSERFACTORY_H\n#define DOCUMENTBROWSERFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass DocumentBrowserFactory : public LiteApi::IEditorFactory\n{\n    Q_OBJECT\npublic:\n    DocumentBrowserFactory(LiteApi::IApplication *app, QObject *parent);\n    virtual QStringList mimeTypes() const;\n    virtual LiteApi::IEditor *open(const QString &fileName, const QString &mimeType);\n    virtual QString id() const;\n    virtual QString displayName() const;\n    virtual bool testMimeType(const QString &mimeType);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QStringList     m_mimeTypes;\n};\n\n#endif // DOCUMENTBROWSERFACTORY_H\n"
  },
  {
    "path": "liteidex/src/utils/editorutil/checkdata.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: checkdata.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef CHECKDATA_H\r\n#define CHECKDATA_H\r\n\r\n\r\n/*\r\nzlib-1.2.7\r\ndoc/txtvsbin.txt\r\n\r\nA Fast Method for Identifying Plain Text Files\r\n==============================================\r\n\r\n\r\nIntroduction\r\n------------\r\n\r\nGiven a file coming from an unknown source, it is sometimes desirable\r\nto find out whether the format of that file is plain text.  Although\r\nthis may appear like a simple task, a fully accurate detection of the\r\nfile type requires heavy-duty semantic analysis on the file contents.\r\nIt is, however, possible to obtain satisfactory results by employing\r\nvarious heuristics.\r\n\r\nPrevious versions of PKZip and other zip-compatible compression tools\r\nwere using a crude detection scheme: if more than 80% (4/5) of the bytes\r\nfound in a certain buffer are within the range [7..127], the file is\r\nlabeled as plain text, otherwise it is labeled as binary.  A prominent\r\nlimitation of this scheme is the restriction to Latin-based alphabets.\r\nOther alphabets, like Greek, Cyrillic or Asian, make extensive use of\r\nthe bytes within the range [128..255], and texts using these alphabets\r\nare most often misidentified by this scheme; in other words, the rate\r\nof false negatives is sometimes too high, which means that the recall\r\nis low.  Another weakness of this scheme is a reduced precision, due to\r\nthe false positives that may occur when binary files containing large\r\namounts of textual characters are misidentified as plain text.\r\n\r\nIn this article we propose a new, simple detection scheme that features\r\na much increased precision and a near-100% recall.  This scheme is\r\ndesigned to work on ASCII, Unicode and other ASCII-derived alphabets,\r\nand it handles single-byte encodings (ISO-8859, MacRoman, KOI8, etc.)\r\nand variable-sized encodings (ISO-2022, UTF-8, etc.).  Wider encodings\r\n(UCS-2/UTF-16 and UCS-4/UTF-32) are not handled, however.\r\n\r\n\r\nThe Algorithm\r\n-------------\r\n\r\nThe algorithm works by dividing the set of bytecodes [0..255] into three\r\ncategories:\r\n- The white list of textual bytecodes:\r\n  9 (TAB), 10 (LF), 13 (CR), 32 (SPACE) to 255.\r\n- The gray list of tolerated bytecodes:\r\n  7 (BEL), 8 (BS), 11 (VT), 12 (FF), 26 (SUB), 27 (ESC).\r\n- The black list of undesired, non-textual bytecodes:\r\n  0 (NUL) to 6, 14 to 31.\r\n\r\nIf a file contains at least one byte that belongs to the white list and\r\nno byte that belongs to the black list, then the file is categorized as\r\nplain text; otherwise, it is categorized as binary.  (The boundary case,\r\nwhen the file is empty, automatically falls into the latter category.)\r\n\r\n\r\nRationale\r\n---------\r\n\r\nThe idea behind this algorithm relies on two observations.\r\n\r\nThe first observation is that, although the full range of 7-bit codes\r\n[0..127] is properly specified by the ASCII standard, most control\r\ncharacters in the range [0..31] are not used in practice.  The only\r\nwidely-used, almost universally-portable control codes are 9 (TAB),\r\n10 (LF) and 13 (CR).  There are a few more control codes that are\r\nrecognized on a reduced range of platforms and text viewers/editors:\r\n7 (BEL), 8 (BS), 11 (VT), 12 (FF), 26 (SUB) and 27 (ESC); but these\r\ncodes are rarely (if ever) used alone, without being accompanied by\r\nsome printable text.  Even the newer, portable text formats such as\r\nXML avoid using control characters outside the list mentioned here.\r\n\r\nThe second observation is that most of the binary files tend to contain\r\ncontrol characters, especially 0 (NUL).  Even though the older text\r\ndetection schemes observe the presence of non-ASCII codes from the range\r\n[128..255], the precision rarely has to suffer if this upper range is\r\nlabeled as textual, because the files that are genuinely binary tend to\r\ncontain both control characters and codes from the upper range.  On the\r\nother hand, the upper range needs to be labeled as textual, because it\r\nis used by virtually all ASCII extensions.  In particular, this range is\r\nused for encoding non-Latin scripts.\r\n\r\nSince there is no counting involved, other than simply observing the\r\npresence or the absence of some byte values, the algorithm produces\r\nconsistent results, regardless what alphabet encoding is being used.\r\n(If counting were involved, it could be possible to obtain different\r\nresults on a text encoded, say, using ISO-8859-16 versus UTF-8.)\r\n\r\nThere is an extra category of plain text files that are \"polluted\" with\r\none or more black-listed codes, either by mistake or by peculiar design\r\nconsiderations.  In such cases, a scheme that tolerates a small fraction\r\nof black-listed codes would provide an increased recall (i.e. more true\r\npositives).  This, however, incurs a reduced precision overall, since\r\nfalse positives are more likely to appear in binary files that contain\r\nlarge chunks of textual data.  Furthermore, \"polluted\" plain text should\r\nbe regarded as binary by general-purpose text detection schemes, because\r\ngeneral-purpose text processing algorithms might not be applicable.\r\nUnder this premise, it is safe to say that our detection method provides\r\na near-100% recall.\r\n\r\nExperiments have been run on many files coming from various platforms\r\nand applications.  We tried plain text files, system logs, source code,\r\nformatted office documents, compiled object code, etc.  The results\r\nconfirm the optimistic assumptions about the capabilities of this\r\nalgorithm.\r\n\r\n\r\n--\r\nCosmin Truta\r\nLast updated: 2006-May-28\r\n*/\r\n\r\n#include <QByteArray>\r\n#include <QChar>\r\n\r\n/* ===========================================================================\r\n * Check if the data type is TEXT or BINARY, using the following algorithm:\r\n * - TEXT if the two conditions below are satisfied:\r\n *    a) There are no non-portable control characters belonging to the\r\n *       \"black list\" (0..6, 14..25, 28..31).\r\n *    b) There is at least one printable character belonging to the\r\n *       \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\r\n * - BINARY otherwise.\r\n * - The following partially-portable control characters form a\r\n *   \"gray list\" that is ignored in this detection algorithm:\r\n *   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\r\n * IN assertion: the fields Freq of dyn_ltree are set.\r\n */\r\n\r\ninline bool IsBinaryCode(unsigned short c)\r\n{\r\n    if (c < 7 ||( c > 13 && c < 26) ||( c > 27 && c < 32) )\r\n        return true;\r\n    return false;\r\n}\r\n\r\ninline bool IsBinaryChar(unsigned char c)\r\n{\r\n    if (c < 7 ||( c > 13 && c < 26) ||( c > 27 && c < 32) )\r\n        return true;\r\n    return false;\r\n}\r\n\r\n\r\ninline bool HasBinaryData(const QByteArray &data, int checkSize /*= 32*/)\r\n{\r\n    // UTF16 byte order marks\r\n    static const char bigEndianBOM[] = \"\\xFE\\xFF\";\r\n    static const char littleEndianBOM[] = \"\\xFF\\xFE\";\r\n    if (data.startsWith(bigEndianBOM) || data.startsWith(littleEndianBOM))\r\n        return true;\r\n\r\n    // Check the first 32 bytes (see shared-mime spec)\r\n    const char *p = data.constData();\r\n    const char *e = p + qMin(checkSize, data.size());\r\n    for ( ; p < e; ++p) {\r\n        if (IsBinaryChar((unsigned char)*p)) {\r\n            return true;\r\n        }\r\n    }\r\n\r\n    return false;\r\n}\r\n\r\n//inline bool isTextData(const QByteArray &data)\r\n//{\r\n//    // UTF16 byte order marks\r\n//    static const char bigEndianBOM[] = \"\\xFE\\xFF\";\r\n//    static const char littleEndianBOM[] = \"\\xFF\\xFE\";\r\n//    if (data.startsWith(bigEndianBOM) || data.startsWith(littleEndianBOM))\r\n//        return true;\r\n\r\n//    // Check the first 32 bytes (see shared-mime spec)\r\n//    const char *p = data.constData();\r\n//    const char *e = p + qMin(32, data.size());\r\n//    for ( ; p < e; ++p) {\r\n//        if ((unsigned char)(*p) < 32 && *p != 9 && *p !=10 && *p != 13)\r\n//            return false;\r\n//    }\r\n\r\n//    return true;\r\n//}\r\n\r\n#endif // CHECKDATA_H\r\n"
  },
  {
    "path": "liteidex/src/utils/editorutil/difflib.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: difflib.h\n// Creator: visualfc <visualfc@gmail.com>\n//\n// C++ difflib is a partial port of github.com/pmezard/go-difflib\n// Implement SequenceMatcher and unified_diff\n//\n// -----------------------------------------------------------------------------\n// go-difflib\n//\n// Package difflib is a partial port of Python difflib module.\n//\n// It provides tools to compare sequences of strings and generate textual diffs.\n//\n// The following class and functions have been ported:\n//\n// - SequenceMatcher\n//\n// - unified_diff\n//\n// - context_diff\n//\n// Getting unified diffs was the main goal of the port. Keep in mind this code\n// is mostly suitable to output text differences in a human friendly way, there\n// are no guarantees generated diffs are consumable by patch(1).\n// ------------------------------------------------------------------------------\n\n#ifndef DIFFLIB_H\n#define DIFFLIB_H\n\n#include <QStringList>\n#include <QMap>\n\ndouble calculateRatio(int matches, int length )\n{\n    if (length > 0) {\n        return 2.0 * double(matches) / double(length);\n    }\n    return 1.0;\n}\n\nstruct Match\n{\n    Match(int a, int b, int size)\n        : A(a), B(b), Size(size)\n    {\n    }\n    int A;\n    int B;\n    int Size;\n};\n\nstruct OpCode\n{\n    OpCode(quint8 tag, int i1, int i2, int j1, int j2)\n        : Tag(tag), I1(i1), I2(i2), J1(j1), J2(j2)\n    {\n    }\n\n    quint8 Tag;\n    int I1;\n    int I2;\n    int J1;\n    int J2;\n};\n\n// SequenceMatcher compares sequence of strings. The basic\n// algorithm predates, and is a little fancier than, an algorithm\n// published in the late 1980's by Ratcliff and Obershelp under the\n// hyperbolic name \"gestalt pattern matching\".  The basic idea is to find\n// the longest contiguous matching subsequence that contains no \"junk\"\n// elements (R-O doesn't address junk).  The same idea is then applied\n// recursively to the pieces of the sequences to the left and to the right\n// of the matching subsequence.  This does not yield minimal edit\n// sequences, but does tend to yield matches that \"look right\" to people.\n//\n// SequenceMatcher tries to compute a \"human-friendly diff\" between two\n// sequences.  Unlike e.g. UNIX(tm) diff, the fundamental notion is the\n// longest *contiguous* & junk-free matching subsequence.  That's what\n// catches peoples' eyes.  The Windows(tm) windiff has another interesting\n// notion, pairing up elements that appear uniquely in each sequence.\n// That, and the method here, appear to yield more intuitive difference\n// reports than does diff.  This method appears to be the least vulnerable\n// to synching up on blocks of \"junk lines\", though (like blank lines in\n// ordinary text files, or maybe \"<P>\" lines in HTML files).  That may be\n// because this is the only method of the 3 that has a *concept* of\n// \"junk\" <wink>.\n//\n// Timing:  Basic R-O is cubic time worst case and quadratic time expected\n// case.  SequenceMatcher is quadratic time for the worst case and has\n// expected-case behavior dependent in a complicated way on how many\n// elements the sequences have in common; best case time is linear.\nclass SequenceMatcher\n{\npublic:\n    SequenceMatcher(const QStringList &a, const QStringList &b)\n        : IsJunk(0), autoJunk(true)\n    {\n        SetSeqs(a,b);\n    }\n    SequenceMatcher(const QStringList &a, const QStringList &b, bool autoJunk, bool (*IsJunk)(QString))\n    {\n        this->autoJunk = autoJunk;\n        this->IsJunk = IsJunk;\n        SetSeqs(a,b);\n    }\npublic:\n    QStringList a;\n    QStringList b;\n    QMap<QString,QList<int> > b2j;\n    bool (*IsJunk)(QString);\n    bool autoJunk;\n    QMap<QString,bool> bJunk;\n    QList<Match> matchingBlocks;\n    QMap<QString,int> fullBCount;\n    QMap<QString,bool> bPopular;\n    QList<OpCode> opCodes;\npublic:\n    // Set two sequences to be compared.\n    void SetSeqs(const QStringList &a, const QStringList &b) {\n        SetSeq1(a);\n        SetSeq2(b);\n    }\n    // Set the first sequence to be compared. The second sequence to be compared is\n    // not changed.\n    //\n    // SequenceMatcher computes and caches detailed information about the second\n    // sequence, so if you want to compare one sequence S against many sequences,\n    // use .SetSeq2(s) once and call .SetSeq1(x) repeatedly for each of the other\n    // sequences.\n    //\n    // See also SetSeqs() and SetSeq2().\n    void SetSeq1(const QStringList &a) {\n        if (this->a == a) {\n            return;\n        }\n        this->a = a;\n        this->matchingBlocks.clear();\n        this->opCodes.clear();\n    }\n    // Set the second sequence to be compared. The first sequence to be compared is\n    // not changed.\n    void SetSeq2(const QStringList &b) {\n        if (this->b == b) {\n            return;\n        }\n        this->b = b;\n        this->matchingBlocks.clear();\n        this->opCodes.clear();\n        this->fullBCount.clear();\n        this->chainB();\n    }\n    void chainB()\n    {\n        // Populate line -> index mapping\n        QMap<QString,QList<int> > b2j;\n        for (int i = 0; i < this->b.size(); i++) {\n            QString s = b[i];\n            QList<int> indices = b2j[s];\n            indices.append(i);\n            b2j[s] = indices;\n        }\n\n        // Purge junk elements\n        this->bJunk.clear();\n        if (this->IsJunk != 0) {\n            QMap<QString,bool> junk = this->bJunk;\n            foreach (QString s, b2j.keys()) {\n                if (this->IsJunk(s)) {\n                    junk[s] = true;\n                }\n            }\n            foreach (QString s, junk.keys()) {\n                b2j.remove(s);\n            }\n        }\n\n        // Purge remaining popular elements\n        QMap<QString,bool> popular;\n        int n = this->b.size();\n        if (this->autoJunk && n >= 200) {\n            int ntest = n/100 + 1;\n            QMapIterator<QString,QList<int> > i(b2j);\n            while (i.hasNext()) {\n                i.next();\n                if (i.value().size() > ntest) {\n                    popular[i.key()] = true;\n                }\n            }\n            foreach (QString s, popular.keys()) {\n                b2j.remove(s);\n            }\n        }\n        this->bPopular = popular;\n        this->b2j = b2j;\n    }\n    bool isBJunk(const QString & s)\n    {\n        return this->bJunk[s];\n    }\n    // Find longest matching block in a[alo:ahi] and b[blo:bhi].\n    //\n    // If IsJunk is not defined:\n    //\n    // Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where\n    //     alo <= i <= i+k <= ahi\n    //     blo <= j <= j+k <= bhi\n    // and for all (i',j',k') meeting those conditions,\n    //     k >= k'\n    //     i <= i'\n    //     and if i == i', j <= j'\n    //\n    // In other words, of all maximal matching blocks, return one that\n    // starts earliest in a, and of all those maximal matching blocks that\n    // start earliest in a, return the one that starts earliest in b.\n    //\n    // If IsJunk is defined, first the longest matching block is\n    // determined as above, but with the additional restriction that no\n    // junk element appears in the block.  Then that block is extended as\n    // far as possible by matching (only) junk elements on both sides.  So\n    // the resulting block never matches on junk except as identical junk\n    // happens to be adjacent to an \"interesting\" match.\n    //\n    // If no blocks match, return (alo, blo, 0).\n    Match findLongestMatch(int alo, int ahi, int blo, int bhi)\n    {\n        // CAUTION:  stripping common prefix or suffix would be incorrect.\n        // E.g.,\n        //    ab\n        //    acab\n        // Longest matching block is \"ab\", but if common prefix is\n        // stripped, it's \"a\" (tied with \"b\").  UNIX(tm) diff does so\n        // strip, so ends up claiming that ab is changed to acab by\n        // inserting \"ca\" in the middle.  That's minimal but unintuitive:\n        // \"it's obvious\" that someone inserted \"ac\" at the front.\n        // Windiff ends up at the same place as diff, but by pairing up\n        // the unique 'b's and then matching the first two 'a's.\n        int besti = alo, bestj = blo, bestsize = 0;\n\n        // find longest junk-free match\n        // during an iteration of the loop, j2len[j] = length of longest\n        // junk-free match ending with a[i-1] and b[j]\n        QMap<int,int> j2len;\n        for (int i = alo; i != ahi; i++) {\n            // look at all instances of a[i] in b; note that because\n            // b2j has no junk keys, the loop is skipped if a[i] is junk\n            QMap<int,int> newj2len;\n            foreach (int j, this->b2j[this->a[i]]) {\n                // a[i] matches b[j]\n                if (j < blo) {\n                    continue;\n                }\n                if (j >= bhi) {\n                    break;\n                }\n                int k = j2len[j-1] + 1;\n                newj2len[j] = k;\n                if (k > bestsize) {\n                    besti = i-k+1;\n                    bestj = j-k+1;\n                    bestsize = k;\n                }\n            }\n            j2len = newj2len;\n        }\n\n        // Extend the best by non-junk elements on each end.  In particular,\n        // \"popular\" non-junk elements aren't in b2j, which greatly speeds\n        // the inner loop above, but also means \"the best\" match so far\n        // doesn't contain any junk *or* popular non-junk elements.\n        while (besti > alo && bestj > blo && !this->isBJunk(this->b[bestj-1]) &&\n            this->a[besti-1] == this->b[bestj-1]) {\n            besti = besti-1;\n            bestj = bestj-1;\n            bestsize = bestsize+1;\n        }\n        while (besti+bestsize < ahi && bestj+bestsize < bhi &&\n            !this->isBJunk(this->b[bestj+bestsize]) &&\n            this->a[besti+bestsize] == this->b[bestj+bestsize]) {\n            bestsize += 1;\n        }\n\n        // Now that we have a wholly interesting match (albeit possibly\n        // empty!), we may as well suck up the matching junk on each\n        // side of it too.  Can't think of a good reason not to, and it\n        // saves post-processing the (possibly considerable) expense of\n        // figuring out what to do with it.  In the case of an empty\n        // interesting match, this is clearly the right thing to do,\n        // because no other kind of match is possible in the regions.\n        while (besti > alo && bestj > blo && this->isBJunk(this->b[bestj-1]) &&\n            this->a[besti-1] == this->b[bestj-1]) {\n            besti = besti-1;\n            bestj = bestj-1;\n            bestsize = bestsize+1;\n        }\n        while (besti+bestsize < ahi && bestj+bestsize < bhi &&\n            this->isBJunk(this->b[bestj+bestsize]) &&\n            this->a[besti+bestsize] == this->b[bestj+bestsize]) {\n            bestsize += 1;\n        }\n\n        return Match(besti,bestj, bestsize);\n    }\n\n     void matchBlocks(int alo, int ahi, int blo, int bhi, QList<Match> &matched)\n     {\n        Match match = this->findLongestMatch(alo, ahi, blo, bhi);\n        int i = match.A;\n        int j = match.B;\n        int k = match.Size;\n        if (match.Size > 0 ){\n            if (alo < i && blo < j) {\n                matchBlocks(alo, i, blo, j, matched);\n            }\n            matched.append(match);\n            if (i+k < ahi && j+k < bhi) {\n                matchBlocks(i+k, ahi, j+k, bhi, matched);\n            }\n        }\n    }\n\n    // Return list of triples describing matching subsequences.\n    //\n    // Each triple is of the form (i, j, n), and means that\n    // a[i:i+n] == b[j:j+n].  The triples are monotonically increasing in\n    // i and in j. It's also guaranteed that if (i, j, n) and (i', j', n') are\n    // adjacent triples in the list, and the second is not the last triple in the\n    // list, then i+n != i' or j+n != j'. IOW, adjacent triples never describe\n    // adjacent equal blocks.\n    //\n    // The last triple is a dummy, (len(a), len(b), 0), and is the only\n    // triple with n==0.\n    QList<Match> GetMatchingBlocks()\n    {\n        if (!this->matchingBlocks.isEmpty()) {\n            return this->matchingBlocks;\n        }\n\n        QList<Match> matched;\n        matchBlocks(0, this->a.size(), 0, this->b.size(), matched);\n\n        // It's possible that we have adjacent equal blocks in the\n        // matching_blocks list now.\n        QList<Match> nonAdjacent;\n        int i1 = 0, j1 = 0, k1 = 0;\n        foreach (Match b, matched) {\n            // Is this block adjacent to i1, j1, k1?\n            int i2 = b.A;\n            int j2 = b.B;\n            int k2 = b.Size;\n            if (i1+k1 == i2 && j1+k1 == j2) {\n                // Yes, so collapse them -- this just increases the length of\n                // the first block by the length of the second, and the first\n                // block so lengthened remains the block to compare against.\n                k1 += k2;\n            } else {\n                // Not adjacent.  Remember the first block (k1==0 means it's\n                // the dummy we started with), and make the second block the\n                // new block to compare against.\n                if (k1 > 0) {\n                    nonAdjacent.append(Match(i1, j1, k1));\n                }\n                i1 = i2;\n                j1 = j2;\n                k1 = k2;\n            }\n        }\n        if (k1 > 0 ){\n            nonAdjacent.append(Match(i1, j1, k1));\n        }\n\n        nonAdjacent.append(Match(this->a.size(), this->b.size(), 0));\n        this->matchingBlocks = nonAdjacent;\n        return this->matchingBlocks;\n    }\n\n    // Return list of 5-tuples describing how to turn a into b.\n    //\n    // Each tuple is of the form (tag, i1, i2, j1, j2).  The first tuple\n    // has i1 == j1 == 0, and remaining tuples have i1 == the i2 from the\n    // tuple preceding it, and likewise for j1 == the previous j2.\n    //\n    // The tags are characters, with these meanings:\n    //\n    // 'r' (replace):  a[i1:i2] should be replaced by b[j1:j2]\n    //\n    // 'd' (delete):   a[i1:i2] should be deleted, j1==j2 in this case.\n    //\n    // 'i' (insert):   b[j1:j2] should be inserted at a[i1:i1], i1==i2 in this case.\n    //\n    // 'e' (equal):    a[i1:i2] == b[j1:j2]\n    QList<OpCode> GetOpCodes()\n    {\n        if (!this->opCodes.isEmpty()) {\n            return this->opCodes;\n        }\n        int i = 0, j = 0;\n        QList<Match> matching = this->GetMatchingBlocks();\n        QList<OpCode> opCodes;\n        //opCodes.reserve(matching.size());\n\n        foreach (Match m, matching) {\n            //  invariant:  we've pumped out correct diffs to change\n            //  a[:i] into b[:j], and the next matching block is\n            //  a[ai:ai+size] == b[bj:bj+size]. So we need to pump\n            //  out a diff to change a[i:ai] into b[j:bj], pump out\n            //  the matching block, and move (i,j) beyond the match\n            int ai = m.A, bj = m.B, size = m.Size;\n            quint8 tag = 0;\n            if (i < ai && j < bj) {\n                tag = 'r';\n            } else if (i < ai) {\n                tag = 'd';\n            } else if (j < bj) {\n                tag = 'i';\n            }\n            if (tag > 0 ){\n                opCodes.append(OpCode(tag, i, ai, j, bj));\n            }\n            i = ai+size, j = bj+size;\n            // the list of matching blocks is terminated by a\n            // sentinel with size 0\n            if (size > 0) {\n                opCodes.append(OpCode('e', ai, i, bj, j));\n            }\n        }\n        this->opCodes = opCodes;\n        return this->opCodes;\n    }\n    // Isolate change clusters by eliminating ranges with no changes.\n    //\n    // Return a generator of groups with up to n lines of context.\n    // Each group is in the same format as returned by GetOpCodes().\n    QList<QList<OpCode> > GetGroupedOpCodes(int n)\n    {\n        if (n < 0) {\n            n = 3;\n        }\n        QList<OpCode> codes = this->GetOpCodes();\n        if (codes.size() == 0) {\n            codes .append(OpCode('e', 0, 1, 0, 1));\n        }\n        // Fixup leading and trailing groups if they show no changes.\n        if (codes[0].Tag == 'e') {\n            OpCode c = codes[0];\n            int i1 = c.I1, i2 = c.I2, j1 = c.J1, j2 = c.J2;\n            codes[0] = OpCode(c.Tag, qMax(i1, i2-n), i2, qMax(j1, j2-n), j2);\n        }\n        if (codes[codes.size()-1].Tag == 'e') {\n            OpCode c = codes[codes.size()-1];\n            int i1 = c.I1, i2 = c.I2, j1 = c.J1, j2 = c.J2;\n            codes[codes.size()-1] = OpCode(c.Tag, i1, qMin(i2, i1+n), j1, qMin(j2, j1+n));\n        }\n        int nn = n + n;\n        QList<QList<OpCode> > groups;\n        QList<OpCode> group;\n        foreach(OpCode c, codes) {\n            int i1 = c.I1, i2 = c.I2, j1 = c.J1, j2 = c.J2;\n            // End the current group and start a new one whenever\n            // there is a large range with no changes.\n            if (c.Tag == 'e' && i2-i1 > nn) {\n                group.append(OpCode(c.Tag, i1, qMin(i2, i1+n),\n                    j1, qMin(j2, j1+n)));\n                groups.append(group);\n                group.clear();\n                i1 = qMax(i1, i2-n), j1 = qMax(j1, j2-n);\n            }\n            group.append(OpCode(c.Tag, i1, i2, j1, j2));\n        }\n        if (group.size() > 0 && !(group.size() == 1 && group[0].Tag == 'e')) {\n            groups.append(group);\n        }\n        return groups;\n    }\n    // Return a measure of the sequences' similarity (float in [0,1]).\n    //\n    // Where T is the total number of elements in both sequences, and\n    // M is the number of matches, this is 2.0*M / T.\n    // Note that this is 1 if the sequences are identical, and 0 if\n    // they have nothing in common.\n    //\n    // .Ratio() is expensive to compute if you haven't already computed\n    // .GetMatchingBlocks() or .GetOpCodes(), in which case you may\n    // want to try .QuickRatio() or .RealQuickRation() first to get an\n    // upper bound.\n    double Ratio()\n    {\n        int matches = 0;\n        foreach(Match m, this->GetMatchingBlocks()) {\n            matches += m.Size;\n        }\n        return calculateRatio(matches, this->a.size()+this->b.size());\n    }\n    // Return an upper bound on ratio() relatively quickly.\n    //\n    // This isn't defined beyond that it is an upper bound on .Ratio(), and\n    // is faster to compute.\n    double QuickRatio()\n    {\n        // viewing a and b as multisets, set matches to the cardinality\n        // of their intersection; this counts the number of matches\n        // without regard to order, so is clearly an upper bound\n        if (this->fullBCount.isEmpty()) {\n            foreach (QString s, this->b) {\n                this->fullBCount[s] = this->fullBCount[s] + 1;\n            }\n        }\n\n        // avail[x] is the number of times x appears in 'b' less the\n        // number of times we've seen it in 'a' so far ... kinda\n        QMap<QString,int> avail;\n        int matches = 0;\n        foreach (QString s, this->a) {\n            int n = avail.value(s,this->fullBCount[s]);\n            avail[s] = n - 1;\n            if (n > 0) {\n                matches += 1;\n            }\n        }\n        return calculateRatio(matches, this->a.size()+this->b.size());\n    }\n    // Return an upper bound on ratio() very quickly.\n    //\n    // This isn't defined beyond that it is an upper bound on .Ratio(), and\n    // is faster to compute than either .Ratio() or .QuickRatio().\n    double RealQuickRatio()\n    {\n        int la = this->a.size(), lb = this->b.size();\n        return calculateRatio(qMin(la, lb), la+lb);\n    }\n};\n\n// Convert range to the \"ed\" format\nQString formatRangeUnified(int start, int stop)\n{\n    // Per the diff spec at http://www.unix.org/single_unix_specification/\n    int beginning = start + 1; // lines start numbering with one\n    int length = stop - start;\n    if (length == 1) {\n        return QString(\"%1\").arg(beginning);\n    }\n    if (length == 0 ) {\n        beginning -= 1; // empty ranges begin at line just before the range\n    }\n    return QString(\"%1,%2\").arg(beginning).arg(length);\n}\n\n// Unified diff parameters\nstruct UnifiedDiff\n{\n    UnifiedDiff() : Context(0)\n    {\n    }\n    QStringList A; // First sequence lines\n    QString FromFile;   // First file name\n    QString FromDate;   // First file time\n    QStringList B; // Second sequence lines\n    QString ToFile;   // Second file name\n    QString ToDate;   // Second file time\n    QString Eol;   // Headers end of line, defaults to LF\n    int Context;      // Number of context lines\n};\n\n// Compare two sequences of lines; generate the delta as a unified diff.\n//\n// Unified diffs are a compact way of showing line changes and a few\n// lines of context.  The number of context lines is set by 'n' which\n// defaults to three.\n//\n// By default, the diff control lines (those with ---, +++, or @@) are\n// created with a trailing newline.  This is helpful so that inputs\n// created from file.readlines() result in diffs that are suitable for\n// file.writelines() since both the inputs and outputs have trailing\n// newlines.\n//\n// For inputs that do not have trailing newlines, set the lineterm\n// argument to \"\" so that the output will be uniformly newline free.\n//\n// The unidiff format normally has a header for filenames and modification\n// times.  Any or all of these may be specified using strings for\n// 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'.\n// The modification times are normally expressed in the ISO 8601 format.\nQStringList GetUnifiedDiffStringList(const UnifiedDiff &diff)\n{\n    QStringList bufList;\n\n    bool started = false;\n    SequenceMatcher *m =  new SequenceMatcher(diff.A, diff.B);\n    foreach(QList<OpCode> g, m->GetGroupedOpCodes(diff.Context)) {\n        if (!started) {\n            started = true;\n            QString fromDate;\n            if (!diff.FromDate.isEmpty()) {\n                fromDate = \"\\t\" + diff.FromDate;\n            }\n            QString toDate;\n            if (!diff.ToDate.isEmpty()) {\n                toDate = \"\\t\" + diff.ToDate;\n            }\n            if (!diff.FromFile.isEmpty() || !diff.ToFile.isEmpty()) {\n                bufList << QString(\"--- %1%2\").arg(diff.FromFile).arg(fromDate);\n                bufList << QString(\"+++ %1%2\").arg(diff.ToFile).arg(toDate);\n            }\n        }\n        OpCode first = g.first(), last = g.last();\n        QString range1 = formatRangeUnified(first.I1, last.I2);\n        QString range2 = formatRangeUnified(first.J1, last.J2);\n        bufList << QString(\"@@ -%1 +%2 @@\").arg(range1).arg(range2);\n        foreach (OpCode c, g) {\n            int i1 = c.I1, i2 = c.I2, j1 = c.J1, j2 = c.J2;\n            if (c.Tag == 'e') {\n                foreach (QString line, diff.A.mid(i1,i2-i1)) {\n                    bufList << \" \"+line;\n                }\n                continue;\n            }\n            if (c.Tag == 'r' || c.Tag == 'd') {\n                foreach (QString line, diff.A.mid(i1,i2-i1)) {\n                    bufList << \"-\"+line;\n                }\n            }\n            if (c.Tag == 'r' || c.Tag == 'i') {\n                foreach (QString line, diff.B.mid(j1,j2-j1)) {\n                    bufList << \"+\" + line;\n                }\n            }\n        }\n    }\n    return bufList;\n}\n\n// Like WriteUnifiedDiff but returns the diff a string.\nQString GetUnifiedDiffString(const UnifiedDiff &diff)\n{\n    QString sep = diff.Eol;\n    if (sep.isEmpty()) {\n        sep = \"\\n\";\n    }\n    return GetUnifiedDiffStringList(diff).join(sep);\n}\n\nQStringList UnifiedDiffLines(const QStringList &a, const QStringList &b)\n{\n    UnifiedDiff diff;\n    diff.A = a;\n    diff.B = b;\n    diff.FromFile = \"Original\";\n    diff.ToFile = \"Current\";\n    diff.Context = 3;\n    diff.Eol = \"\\n\";\n    return GetUnifiedDiffStringList(diff);\n}\n\nQString UnifiedDiffLines(const QString &a, const QString &b)\n{\n    UnifiedDiff diff;\n    diff.A = a.split(\"\\n\");\n    diff.B = b.split(\"\\n\");\n    diff.FromFile = \"Original\";\n    diff.ToFile = \"Current\";\n    diff.Context = 3;\n    diff.Eol = \"\\n\";\n    return GetUnifiedDiffString(diff);\n}\n\n#endif // DIFFLIB_H\n"
  },
  {
    "path": "liteidex/src/utils/editorutil/editorutil.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: editorutil.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"editorutil.h\"\n#include \"difflib.h\"\n#include \"diff_match_patch/diff_match_patch.h\"\n\n#include <QTextBlock>\n#include <QTextCursor>\n#include <QPlainTextEdit>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\ntypedef void (*EnumEditorProc)(QTextCursor &cursor, QTextBlock &block, void *param);\n\nvoid EditorUtil::EnumEditor(QPlainTextEdit *ed, EnumEditorProc proc, void *param)\n{\n    if (!ed) {\n        return;\n    }\n    QTextCursor cur = ed->textCursor();\n    cur.beginEditBlock();\n    if (cur.hasSelection()) {\n        QTextBlock begin = ed->document()->findBlock(cur.selectionStart());\n        QTextBlock end = ed->document()->findBlock(cur.selectionEnd());\n        if (end.position() == cur.selectionEnd()) {\n            end = end.previous();\n        }\n        QTextBlock block = begin;\n        do {\n            if (block.text().length() > 0) {\n                proc(cur,block,param);\n            }\n            block = block.next();\n        } while(block.isValid() && block.position() <= end.position());\n    } else {\n        QTextBlock block = cur.block();\n        proc(cur,block,param);\n    }\n    cur.endEditBlock();\n    ed->setTextCursor(cur);\n}\n\nstruct InsertHeadParam\n{\n    QString tag;\n    bool blockStart;\n};\n\nstatic void insertHead(QTextCursor &cur, QTextBlock &block, void *param)\n{\n    InsertHeadParam *ip = (InsertHeadParam*)param;\n    if (ip->blockStart) {\n        cur.setPosition(block.position());\n    } else {\n        QString text = block.text();\n        foreach(QChar c, text) {\n            if (!c.isSpace()) {\n                cur.setPosition(block.position()+text.indexOf(c));\n                break;\n            }\n        }\n    }\n    cur.insertText(ip->tag);\n}\n\nstruct RemoveHeadParam\n{\n    QStringList tags;\n    bool blockStart;\n};\n\nstruct SwitchHeadParam\n{\n    QString tagAdd;\n    QStringList tagRemove;\n    bool blockStart;\n};\n\nstatic void removeHead(QTextCursor &cur, QTextBlock &block, void *param)\n{\n    RemoveHeadParam *ip = (RemoveHeadParam*)param;\n    if (ip->blockStart) {\n        cur.setPosition(block.position());\n    } else {\n        QString text = block.text();\n        foreach(QChar c, text) {\n            if (!c.isSpace()) {\n                cur.setPosition(block.position()+text.indexOf(c));\n                break;\n            }\n        }\n    }\n    foreach (QString tag, ip->tags) {\n        if (cur.block().text().startsWith(tag)) {\n            cur.setPosition(block.position());\n            cur.movePosition(QTextCursor::NextCharacter,\n                                QTextCursor::KeepAnchor,\n                                tag.length());\n            cur.removeSelectedText();\n            break;\n        }\n    }\n}\n\nstatic void switchHead(QTextCursor &cur, QTextBlock &block, void *param)\n{\n    SwitchHeadParam *ip = (SwitchHeadParam*)param;\n    if (ip->blockStart) {\n        cur.setPosition(block.position());\n    } else {\n        QString text = block.text();\n        foreach(QChar c, text) {\n            if (!c.isSpace()) {\n                cur.setPosition(block.position()+text.indexOf(c));\n                break;\n            }\n        }\n    }\n    foreach (QString tag, ip->tagRemove) {\n        if (cur.block().text().startsWith(tag)) {\n            cur.setPosition(block.position());\n            cur.movePosition(QTextCursor::NextCharacter,\n                                QTextCursor::KeepAnchor,\n                                tag.length());\n            cur.removeSelectedText();\n            return;\n        }\n    }\n    cur.insertText(ip->tagAdd);\n}\n\n\nvoid EditorUtil::InsertHead(QPlainTextEdit *ed, const QString &tag, bool blockStart)\n{\n    InsertHeadParam param = {tag,blockStart};\n    EnumEditor(ed,&insertHead,&param);\n}\n\nvoid EditorUtil::RemoveHead(QPlainTextEdit *ed, const QStringList &tags, bool blockStart)\n{\n    RemoveHeadParam param = {tags,blockStart};\n    EnumEditor(ed,&removeHead,&param);\n}\n\nvoid EditorUtil::SwitchHead(QPlainTextEdit *ed, const QString &tagAdd, const QStringList &tagRemove, bool blockStart)\n{\n    SwitchHeadParam param = {tagAdd,tagRemove,blockStart};\n    EnumEditor(ed,&switchHead,&param);\n}\n\nvoid EditorUtil::MarkSelection(QPlainTextEdit *ed, const QString &mark1, const QString &mark2)\n{\n    if (!ed) {\n        return;\n    }\n    QTextCursor cur = ed->textCursor();\n    cur.beginEditBlock();\n    if (cur.hasSelection()) {\n        QTextBlock begin = ed->document()->findBlock(cur.selectionStart());\n        QTextBlock end = ed->document()->findBlock(cur.selectionEnd());\n        if (end.position() == cur.selectionEnd()) {\n            end = end.previous();\n        }\n        int n1 = cur.selectionStart();\n        int n2 = cur.selectionEnd();\n        QTextBlock block = begin;\n        do {\n            int c1 = block.position();\n            int c2 = c1+block.text().length();\n            if (block.position() == begin.position() && c1 < n1) {\n                c1 = n1;\n            }\n            if (c2 > n2) {\n                c2 = n2;\n            }\n            if (c2 > c1) {\n                if (!mark1.isEmpty()) {\n                    cur.setPosition(c1);\n                    cur.insertText(mark1);\n                    n2 += mark1.length();\n                }\n                if (!mark2.isEmpty()) {\n                    cur.setPosition(c2+mark1.length());\n                    cur.insertText(mark2);\n                    n2 += mark2.length();\n                }\n            }\n            block = block.next();\n        } while(block.isValid() && block.position() <= end.position());\n    } else {\n        int pos = cur.position();\n        cur.insertText(mark1+mark2);\n        cur.setPosition(pos+mark1.length());\n    }\n    cur.endEditBlock();\n    ed->setTextCursor(cur);\n}\n\nvoid EditorUtil::MarkSelection(QPlainTextEdit *ed, const QString &mark)\n{\n    EditorUtil::MarkSelection(ed,mark,mark);\n}\n\n// use diff_match_patch\nstatic int findBlockPos(const QString &orgText, const QString &newText, int pos )\n{\n    diff_match_patch dmp;\n    QList<Diff> diffs = dmp.diff_main(orgText,newText,false);\n    return dmp.diff_xIndex(diffs,pos);\n}\n\nstatic bool checkTowStringHead(const QString &s1, const QString &s2, int &nSameOfHead)\n{\n    int size1 = s1.size();\n    int size2 = s2.size();\n    int size = qMin(size1,size2);\n    for(nSameOfHead = 0; nSameOfHead < size; nSameOfHead++) {\n        if (s1[nSameOfHead] != s2[nSameOfHead]) {\n            return false;\n        }\n    }\n    return true;\n}\n\nstatic int findBlockNumber(const QList<int> &offsetList, int offsetBase, int blockNumber)\n{\n    for (int i = offsetList.size()-1; i>=0; i--) {\n        int iv = offsetList[i];\n        if (iv == -1) {\n            continue;\n        }\n        if (blockNumber >= iv) {\n            if (blockNumber == iv) {\n                return offsetBase+i;\n            } else {\n                if (i == offsetList.size()-1) {\n                    return offsetBase+i+blockNumber-iv;\n                }\n                int offset = i;\n                int v0 = iv;\n                for (int j = i+1; j < offsetList.size(); j++) {\n                    if (offsetList[j] != -1) {\n                        break;\n                    }\n                    offset++;\n                    v0++;\n                    if (v0 == blockNumber) {\n                        break;\n                    }\n                }\n                return offsetBase+offset;\n            }\n        }\n    }\n    return blockNumber;\n}\n\nvoid EditorUtil::loadDiff(QTextCursor &cursor, const QString &diff)\n{\n    //save org block\n    int orgBlockNumber = cursor.blockNumber();\n    int orgPosInBlock = cursor.positionInBlock();\n    QString orgBlockText = cursor.block().text();\n    int curBlockNumber = orgBlockNumber;\n\n    //load diff\n    QRegExp reg(\"@@\\\\s+\\\\-(\\\\d+),?(\\\\d+)?\\\\s+\\\\+(\\\\d+),?(\\\\d+)?\\\\s+@@\");\n    QTextBlock block;\n    int line = -1;\n    int line_add = 0;\n    int block_number = 0;\n\n    QList<int> offsetList;\n    int offsetBase = 0;\n\n    QStringList diffList = diff.split(\"\\n\");\n    QString s;\n    int size = diffList.size();\n\n    for (int i = 0; i < size; i++) {\n        s = diffList[i];\n        if (s.length() == 0) {\n            continue;\n        }\n\n        QChar ch = s.at(0);\n        if (ch == '@') {\n            if (reg.indexIn(s) == 0) {\n                int s1 = reg.cap(1).toInt();\n                int s2 = reg.cap(2).toInt();\n                //int n1 = reg.cap(3).toInt();\n                int n2 = reg.cap(4).toInt();\n                line = line_add+s1;\n                //block = cursor.document()->findBlockByNumber(line-1);\n                line_add += n2-s2;//n2+n1-(s2+s1);\n                block_number = line-1;\n\n                //find block number\n                curBlockNumber = findBlockNumber(offsetList,offsetBase,curBlockNumber);\n                offsetBase = block_number;\n                offsetList.clear();\n                for (int i = 0; i <= s2; i++) {\n                    offsetList.append(offsetBase+i);\n                }\n                continue;\n            }\n        }\n        if (line == -1) {\n            continue;\n        }\n        if (ch == '+') {\n            offsetList.insert(block_number-offsetBase,-1);\n            block = cursor.document()->findBlockByNumber(block_number);\n            if (!block.isValid()) {\n                cursor.movePosition(QTextCursor::End);\n                cursor.insertBlock();\n                cursor.insertText(s.mid(1));\n            } else {\n                cursor.setPosition(block.position());\n                cursor.insertText(s.mid(1));\n                cursor.insertBlock();\n            }\n            block_number++;\n        } else if (ch == '-') {\n            //check modify current block text\n            if ((i < (size-1)) && diffList[i+1].startsWith(\"+\")) {\n                block = cursor.document()->findBlockByNumber(block_number);\n                QString nextText = diffList[i+1].mid(1);\n                int nSameOfHead = 0;\n                bool checkSame = checkTowStringHead(nextText.simplified(),block.text().simplified(),nSameOfHead);\n                if (checkSame || (nSameOfHead >= 4) ) {\n                    cursor.setPosition(block.position());\n                    cursor.insertText(nextText);\n                    cursor.setPosition(block.position()+nextText.length());\n                    cursor.setPosition(block.position()+block.text().length(), QTextCursor::KeepAnchor);\n                    cursor.removeSelectedText();\n                    i++;\n                    block_number++;\n                    continue;\n                }\n            }\n\n            offsetList.removeAt(block_number-offsetBase);\n            block = cursor.document()->findBlockByNumber(block_number);\n            cursor.setPosition(block.position());\n            if (block.next().isValid()) {\n                cursor.setPosition(block.next().position(), QTextCursor::KeepAnchor);\n                cursor.removeSelectedText();\n            } else {\n                cursor.movePosition(QTextCursor::EndOfBlock);\n                cursor.movePosition(QTextCursor::StartOfBlock, QTextCursor::KeepAnchor);\n                cursor.movePosition(QTextCursor::PreviousCharacter, QTextCursor::KeepAnchor);\n                cursor.removeSelectedText();\n            }\n        } else if (ch == ' ') {\n            block_number++;\n        } else if (ch == '\\\\') {\n            //skip comment\n        }\n    }\n    //find block number\n    curBlockNumber = findBlockNumber(offsetList,offsetBase,curBlockNumber);\n    //load cur block\n    block = cursor.document()->findBlockByNumber(curBlockNumber);\n    if (block.isValid()) {\n        cursor.setPosition(block.position());\n        int column = findBlockPos(orgBlockText,block.text(),orgPosInBlock);\n        if (column > 0) {\n            cursor.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, column);\n        }\n    }\n}\n\nQString EditorUtil::unifiedDiffText(const QString &text1, const QString &text2)\n{\n    return UnifiedDiffLines(text1,text2);\n}\n\n\n"
  },
  {
    "path": "liteidex/src/utils/editorutil/editorutil.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: editorutil.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef EDITORUTIL_H\n#define EDITORUTIL_H\n\n#include \"liteapi/liteapi.h\"\n\ntypedef void (*EnumEditorProc)(QTextCursor &cursor, QTextBlock &block, void *param);\nclass EditorUtil\n{   \npublic:   \n    static void EnumEditor(QPlainTextEdit *ed, EnumEditorProc proc, void *param);\n    static void InsertHead(QPlainTextEdit *ed, const QString &tag, bool blockStart = true);\n    static void RemoveHead(QPlainTextEdit *ed, const QStringList &tags, bool blockStart = true);\n    static void SwitchHead(QPlainTextEdit *ed, const QString &tagAdd, const QStringList &tagRemove, bool blockStart = true);\n    static void MarkSelection(QPlainTextEdit *ed, const QString &mark1, const QString &mark2);\n    static void MarkSelection(QPlainTextEdit *ed, const QString &mark);\n    static void loadDiff(QTextCursor &cursor, const QString &diff);\n    static QString unifiedDiffText(const QString &text1, const QString &text2);\n};\n\n#endif // EDITORUTIL_H\n"
  },
  {
    "path": "liteidex/src/utils/editorutil/editorutil.pri",
    "content": "LIBS *= -l$$qtLibraryName(editorutil)\nLIBS *= -l$$qtLibraryName(diff_match_pitch)\nLIBS *= -l$$qtLibraryName(libucd)\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/editorutil/editorutil.pro",
    "content": "TARGET = editorutil\r\nTEMPLATE = lib\r\nCONFIG += staticlib\r\n\r\ninclude (../../liteideutils.pri)\r\ninclude (../../3rdparty/diff_match_patch/diff_match_patch.pri)\r\ninclude (../../3rdparty/libucd/libucd.pri)\r\n\r\nSOURCES += editorutil.cpp\r\n\r\nHEADERS += editorutil.h \\\r\n    difflib.h \\\r\n    libucd.h \\\r\n    checkdata.h\r\n"
  },
  {
    "path": "liteidex/src/utils/editorutil/libucd.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: libucd.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LIBUCD_H\n#define LIBUCD_H\n\n#include \"libucd/include/libucd.h\"\n#include <QByteArray>\n\nclass LibUcd\n{\npublic:\n    LibUcd()\n    {\n        ucd_init(&t);\n    }\n    ~LibUcd()\n    {\n        ucd_clear(&t);\n    }\n    QByteArray parse(const QByteArray &data)\n    {\n        int r = ucd_parse(&t,data.constData(),data.size());\n        ucd_end(&t);\n        char name[128] = {0};\n        if (r == UCD_RESULT_OK) {\n            ucd_results(&t,name,127);\n        }\n        ucd_reset(&t);\n        return name;\n    }\nprotected:\n    ucd_t t;\n};\n\n\n#endif // LIBUCD_H\n"
  },
  {
    "path": "liteidex/src/utils/extension/extension.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: extension.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"extension.h\"\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nvoid Extension::addObject(const QString &meta, QObject *obj)\n{\n    m_metaObjectHash.insert(meta,obj);\n}\n\nvoid Extension::removeObject(const QString &meta)\n{\n    m_metaObjectHash.remove(meta);\n}\n\nQObject *Extension::findObject(const QString &meta) const\n{\n    return m_metaObjectHash.value(meta);\n}\n\nQStringList Extension::objectMetaList() const\n{\n    return m_metaObjectHash.keys();\n}\n"
  },
  {
    "path": "liteidex/src/utils/extension/extension.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: extension.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef EXTENSION_H\n#define EXTENSION_H\n\n#include \"liteapi/liteobj.h\"\n\nclass Extension : public LiteApi::IExtension\n{\npublic:\n    virtual void addObject(const QString &meta, QObject *obj);\n    virtual void removeObject(const QString &meta);\n    virtual QObject *findObject(const QString &meta) const;\n    virtual QStringList objectMetaList() const;\nprotected:\n    QHash<QString,QObject*> m_metaObjectHash;\n};\n\n#endif //EXTENSION_H\n"
  },
  {
    "path": "liteidex/src/utils/extension/extension.pri",
    "content": "LIBS *= -l$$qtLibraryName(extension)\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/extension/extension.pro",
    "content": "TARGET = extension\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude(../../liteideutils.pri)\n\nHEADERS += extension.h\n\nSOURCES += extension.cpp\n"
  },
  {
    "path": "liteidex/src/utils/filesystem/filesystem.pri",
    "content": "LIBS *= -l$$qtLibraryName(filesystem)\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/filesystem/filesystem.pro",
    "content": "TARGET = filesystem\nTEMPLATE = lib\nCONFIG += staticlib\n\ninclude (../../liteideutils.pri)\ninclude (../symboltreeview/symboltreeview.pri)\n\nSOURCES += filesystemwidget.cpp \\\n    filesystemmodel.cpp \\\n    ../folderview/folderdialog.cpp\n\nHEADERS += filesystemwidget.h \\\n    filesystemmodel.h \\\n    ../folderview/folderdialog.h\n"
  },
  {
    "path": "liteidex/src/utils/filesystem/filesystemmodel.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filesystemmodel.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"filesystemmodel.h\"\n#include \"liteapi/liteqt.h\"\n\n#include <QFileInfo>\n#include <QDir>\n#include <QIcon>\n#include <QFont>\n#include <QFileIconProvider>\n#include <QFileSystemWatcher>\n#include <QMutexLocker>\n#include <QDebug>\n\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nFileNode::FileNode(FileSystemModel *model) :\n    m_model(model),\n    m_parent(0),\n    m_children(0),\n    m_bWatcher(false)\n{\n\n}\n\nFileNode::FileNode(FileSystemModel *model, const QString &path, FileNode *parent) :\n    m_model(model),\n    m_parent(parent),\n    m_children(0),\n    m_path(path),\n    m_bWatcher(false)\n{\n    QFileInfo info(path);\n    if (m_model->isRootPathNodeFillPath() && parent && parent->parent() == 0) {\n        m_text = QDir::toNativeSeparators(info.filePath());\n    } else {\n        m_text = info.fileName();\n    }\n}\n\nFileNode::~FileNode()\n{\n    clear();\n    if (m_children) {\n        delete m_children;\n    }\n    if (m_bWatcher)  {\n        m_model->removeWatcher(m_path);\n    }\n}\n\nQList<FileNode*>* FileNode::children()\n{\n    if (m_children == 0) {\n        m_children = new QList<FileNode*>();\n        //bool isRoot = false;\n        if (!m_path.isEmpty()) {\n            QFileInfo info(m_path);\n            if (info.isDir()) {\n            //    isRoot = info.isRoot();\n                QDir dir(m_path);\n                foreach(QFileInfo childInfo, dir.entryInfoList(this->m_model->filter(),this->m_model->dirSort())) {\n                    if (!this->m_model->isShowHideFiles() && childInfo.isDir() && childInfo.fileName().startsWith(\".\")) {\n                       continue;\n                    }\n                    m_children->append(new FileNode(this->m_model,childInfo.filePath(),this));\n                }\n            }\n       }\n       if (!m_children->isEmpty() && !m_bWatcher) {\n           m_bWatcher = true;\n           m_model->addWatcher(m_path);\n       }\n    }\n    return m_children;\n}\n\nFileNode* FileNode::parent()\n{\n    return m_parent;\n}\n\nFileNode* FileNode::child(int row)\n{\n    return children()->at(row);\n}\n\nint FileNode::childCount()\n{\n    return children()->count();\n}\n\nint FileNode::row() const\n{\n    if (m_parent) {\n        return m_parent->children()->indexOf(const_cast<FileNode*>(this));\n    }\n    return 0;\n}\n\nQString FileNode::path() const\n{\n    return m_path;\n}\n\nQString FileNode::text() const\n{\n    return m_text;\n}\n\nbool FileNode::isDir() const\n{\n    return QFileInfo(m_path).isDir();\n}\n\nbool FileNode::isFile() const\n{\n    return QFileInfo(m_path).isFile();\n}\n\nQFileInfo FileNode::fileInfo() const\n{\n    return QFileInfo(m_path);\n}\n\nbool FileNode::isExist() const\n{\n    return QFileInfo(m_path).exists();\n}\n\nvoid FileNode::clear()\n{\n    if (m_children) {\n        qDeleteAll(m_children->begin(),m_children->end());\n        m_children->clear();\n    }\n}\n\nvoid FileNode::reload()\n{\n    clear();\n    if (m_children == 0) {\n        m_children = new QList<FileNode*>();\n    }\n    if (!m_path.isEmpty()) {\n        QFileInfo info(m_path);\n        if (info.isDir()) {\n            QDir dir(m_path);\n            foreach(QFileInfo childInfo, dir.entryInfoList(this->m_model->filter(),this->m_model->dirSort())) {\n                if (!this->m_model->isShowHideFiles() && childInfo.isDir() && childInfo.fileName().startsWith(\".\")) {\n                   continue;\n                }\n                m_children->append(new FileNode(this->m_model,childInfo.filePath(),this));\n            }\n        }\n    }\n    if (!m_children->isEmpty() && !m_bWatcher) {\n        m_bWatcher = true;\n        m_model->addWatcher(m_path);\n    }\n}\n\nFileNode *FileNode::findPath(const QString &path)\n{\n    if (!path.startsWith(m_path)) {\n        return 0;\n    }\n    if (path == m_path) {\n        return this;\n    }\n    QStringList nameList = path.right(path.length()-m_path.length()).split(\"/\",qtSkipEmptyParts);\n    FileNode *parent = this;\n    bool find = false;\n    foreach (QString name,nameList) {\n        find = false;\n        QList<FileNode*>* chilren = parent->children();\n        for (int i = 0; i < chilren->count(); i++) {\n            FileNode *node = chilren->at(i);\n            if (!node->isDir()) {\n                continue;\n            }\n            if (node->m_text == name) {\n                parent = node;\n                find = true;\n                break;\n            }\n        }\n        if (!find) {\n            return 0;\n        }\n    }\n    return parent;\n}\n\nFileSystemModel::FileSystemModel(QObject *parent) :\n    QAbstractItemModel(parent),\n    m_rootNode(new FileNode(this)),\n    m_iconProvider(new QFileIconProvider),\n    m_fileWatcher(0)\n{\n    m_filters = QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot;\n    m_sorts = QDir::DirsFirst | QDir::Name | QDir::IgnoreCase;// | QDir::Type;\n   // connect(m_fileWatcher,SIGNAL(directoryChanged(QString)),this,SLOT(directoryChanged(QString)));\n}\n\nFileSystemModel::~FileSystemModel()\n{\n    delete m_rootNode;\n    delete m_iconProvider;\n    if (m_fileWatcher) {\n        delete m_fileWatcher;\n    }\n}\n\nvoid FileSystemModel::reloadDirectory(const QString &path)\n{\n    this->beginResetModel();\n    QDir dir(path);\n    bool b = dir.exists();\n    if (!b) {\n        m_fileWatcher->removePath(path);\n    }\n    foreach(QModelIndex index,this->findPaths(path)) {\n        FileNode *node = nodeFromIndex(index);\n        if (b) {\n            node->reload();\n        } else {\n            FileNode *parent = node->parent();\n            if (parent) {\n                parent->reload();\n            }\n        }\n    }\n    this->endResetModel();\n}\n\nFileNode *FileSystemModel::nodeFromIndex(const QModelIndex &index) const\n{\n    if (index.isValid()) {\n        return static_cast<FileNode*>(index.internalPointer());\n    }\n    return m_rootNode;\n}\n\nvoid FileSystemModel::setStartIndex(const QModelIndex &index)\n{\n    m_startPath = filePath(index);\n}\n\nvoid FileSystemModel::setStartPath(const QString &path)\n{\n    m_startPath = path;\n}\n\nQModelIndex FileSystemModel::startIndex() const\n{\n    return findPath(m_startPath);\n}\n\nQString FileSystemModel::startPath() const\n{\n    return m_startPath;\n}\n\nQString FileSystemModel::filePath(const QModelIndex &index) const\n{\n    return nodeFromIndex(index)->path();\n}\n\nvoid FileSystemModel::setFilter(QDir::Filters filters)\n{\n    if (m_filters != filters) {\n        m_filters = filters;\n        this->reload();\n    }\n}\n\nvoid FileSystemModel::setDirSort(QDir::SortFlags flags)\n{\n    if (m_sorts != flags) {\n        m_sorts = flags;\n        this->reload();\n    }\n}\n\nQDir::Filters FileSystemModel::filter() const\n{\n    return m_filters;\n}\n\nbool FileSystemModel::isShowHideFiles() const\n{\n    return m_filters & QDir::Hidden;\n}\n\nQDir::SortFlags FileSystemModel::dirSort() const\n{\n    return m_sorts;\n}\n\nvoid FileSystemModel::clear()\n{\n    this->beginResetModel();\n    m_rootNode->clear();\n    m_pathList.clear();\n    m_startPath.clear();\n    this->endResetModel();\n}\n\nvoid FileSystemModel::reload()\n{\n    this->setRootPathList(this->rootPathList());\n}\n\nvoid FileSystemModel::setRootPath(const QString &path)\n{\n    this->setRootPathList(QStringList() << path);\n}\n\nbool FileSystemModel::removeRootPath(const QString &path)\n{\n    QString pathName = QDir::fromNativeSeparators(path);\n    FileNode *node = 0;\n    int index = -1;\n    for (int i = 0; i < m_rootNode->childCount(); i++) {\n        node = m_rootNode->children()->at(i);\n        if (node && (node->path() == pathName)) {\n            index = i;\n            break;\n        }\n    }\n    if (index == -1) {\n        return false;\n    }\n    if (!m_pathList.removeAll(pathName)) {\n        return false;\n    }\n    this->beginRemoveRows(QModelIndex(),index,index);\n    m_rootNode->children()->removeAt(index);\n    delete node;\n    this->endRemoveRows();\n    return true;\n}\n\n\nbool FileSystemModel::addRootPath(const QString &path)\n{\n    QString pathName = QDir::fromNativeSeparators(QDir::cleanPath(path));\n    if (m_pathList.contains(pathName)) {\n        return false;\n    }\n    this->beginInsertRows(QModelIndex(),m_rootNode->childCount(),m_rootNode->childCount());\n    m_pathList.append(pathName);\n    m_rootNode->children()->append(new FileNode(this,pathName,m_rootNode));\n    this->endInsertRows();\n    return true;\n}\n\nvoid FileSystemModel::setRootPathList(const QStringList &pathList)\n{\n    this->beginResetModel();\n    m_rootNode->clear();\n    m_fileWatcherMap.clear();\n    m_pathList.clear();\n    if (m_fileWatcher) {\n        disconnect(m_fileWatcher,0);\n        delete m_fileWatcher;\n    }\n    m_fileWatcher = new QFileSystemWatcher;\n    connect(m_fileWatcher,SIGNAL(directoryChanged(QString)),this,SIGNAL(direcotryChanged(QString)));\n\n    foreach (QString path, pathList) {\n        m_pathList.append(QDir::fromNativeSeparators(QDir::cleanPath(path)));\n    }\n    m_pathList.removeDuplicates();\n\n    foreach(QString path, m_pathList) {\n        m_rootNode->children()->append(new FileNode(this,path,m_rootNode));\n    }\n\n    if (m_startPath.isEmpty() && !pathList.isEmpty()) {\n        m_startPath = pathList.first();\n    }\n\n    this->endResetModel();\n}\n\nQStringList FileSystemModel::rootPathList() const\n{\n    return m_pathList;\n}\n\nQModelIndex FileSystemModel::findPathHelper(const QString &path, const QModelIndex &parentIndex) const\n{\n    FileNode *node = nodeFromIndex(parentIndex);\n    if (!path.startsWith(node->path())) {\n        return QModelIndex();\n    }\n    if (path == node->path()) {\n        return parentIndex;\n    }\n    QStringList nameList = path.right(path.length()-node->path().length()).split(\"/\",qtSkipEmptyParts);\n    QModelIndex parent = parentIndex;\n    bool find = false;\n    int count = nameList.count();\n    for (int i = 0; i < count; i++) {\n        find = false;\n        for (int j = 0; j < this->rowCount(parent); j++) {\n            QModelIndex index = this->index(j,0,parent);\n            FileNode *node = nodeFromIndex(index);\n            if ( ( (i == count-1) || node->isDir()) && node->text() == nameList.at(i)) {\n                parent = index;\n                find = true;\n                break;\n            }\n        }\n        if (!find) {\n            return QModelIndex();\n        }\n    }\n    return parent;\n}\n\nQList<QModelIndex> FileSystemModel::findPaths(const QString &path) const\n{\n    QList<QModelIndex> list;\n    QString cpath = QDir::fromNativeSeparators(QDir::cleanPath(path));\n    for (int i = 0; i < this->rowCount(); i++) {\n        QModelIndex find = findPathHelper(cpath,this->index(i,0));\n        if (find.isValid()) {\n            list.append(find);\n        }\n     }\n    return list;\n}\n\nQModelIndex FileSystemModel::findPath(const QString &path) const\n{\n    QList<QModelIndex> list = this->findPaths(path);\n    if (!list.isEmpty()) {\n        return list.last();\n    }\n    return QModelIndex();\n}\n\nint FileSystemModel::rowCount(const QModelIndex &parent) const\n{\n    FileNode *node = nodeFromIndex(parent);\n    return node->childCount();\n}\n\nint FileSystemModel::columnCount(const QModelIndex&) const\n{\n    return 1;\n}\n\nQModelIndex FileSystemModel::parent(const QModelIndex &child) const\n{\n    FileNode *node = nodeFromIndex(child);\n    FileNode *parent = node->parent();\n    if (parent == m_rootNode) {\n        return QModelIndex();\n    }\n    return createIndex(parent->row(),0,parent);\n}\n\nQModelIndex FileSystemModel::index(int row, int column,const QModelIndex &parent) const\n{\n    if (!hasIndex(row,column,parent))\n        return QModelIndex();\n    FileNode *node = nodeFromIndex(parent);\n    return createIndex(row,column,node->child(row));\n}\n\nQVariant FileSystemModel::data(const QModelIndex &index, int role) const\n{\n    FileNode *node = nodeFromIndex(index);\n    if (!node) {\n        return QVariant();\n    }\n    switch(role) {\n    case Qt::DisplayRole:\n        return node->text();\n    case Qt::ToolTipRole:\n        return QDir::toNativeSeparators(node->path());\n    case Qt::DecorationRole:\n        return m_iconProvider->icon(node->fileInfo());\n/*\n    case Qt::FontRole: {\n        QFont font;\n        if (node->path() == m_startPath) {\n            font.setBold(true);\n        }\n        return font;\n    }\n*/\n    }\n    return QVariant();\n}\n\nbool FileSystemModel::isRootPathNode(FileNode *node) const\n{\n    return node->parent() == m_rootNode;\n}\n\nbool FileSystemModel::isRootPathNodeFillPath() const\n{\n    return false;\n}\n\nvoid FileSystemModel::addWatcher(const QString &path)\n{\n    QMutexLocker _(&m_mutex);\n    QString cpath = QDir::fromNativeSeparators(QDir::cleanPath(path));\n    int value = m_fileWatcherMap[cpath];\n    value++;\n    m_fileWatcherMap[cpath] = value;\n    if (value > 1) {\n        return;\n    }\n    m_fileWatcher->addPath(path);\n}\n\nvoid FileSystemModel::removeWatcher(const QString &path)\n{\n    QMutexLocker _(&m_mutex);\n    QString cpath = QDir::fromNativeSeparators(QDir::cleanPath(path));\n    int value = m_fileWatcherMap[cpath];\n    value--;\n    m_fileWatcherMap[cpath] = value;\n    if (value == 0) {\n        m_fileWatcher->removePath(cpath);\n    }\n}\n"
  },
  {
    "path": "liteidex/src/utils/filesystem/filesystemmodel.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filesystemmodel.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FILESYSTEMMODEL_H\n#define FILESYSTEMMODEL_H\n\n#include <QAbstractItemModel>\n#include <QStringList>\n#include <QIcon>\n#include <QFileInfo>\n#include <QDir>\n#include <QMutex>\n\nclass FileSystemModel;\nclass QFileSystemWatcher;\nclass FileNode\n{\npublic:\n    FileNode(FileSystemModel *model);\n    FileNode(FileSystemModel *model,const QString &path, FileNode *parent);\n    virtual ~FileNode();\n    FileNode* parent();\n    FileNode* child(int row);\n    int childCount();\n    int row() const;\n    QList<FileNode*>* children();\n    QString path() const;\n    QString text() const;\n    QFileInfo fileInfo() const;\n    bool isExist() const;\n    bool isDir() const;\n    bool isFile() const;\n    void clear();\n    void reload();\n    FileNode *findPath(const QString &path);\nprotected:\n    FileSystemModel *m_model;\n    FileNode *m_parent;\n    QList<FileNode*> *m_children;\n    QString m_path;\n    QString m_text;\n    bool    m_bWatcher;\n};\n\nclass QFileIconProvider;\nclass QFileSystemWatcher;\nclass QTreeView;\nclass FileSystemModel : public QAbstractItemModel\n{\n    Q_OBJECT\npublic:\n    explicit FileSystemModel(QObject *parent = 0);\n    ~FileSystemModel();\n    void clear();\n    void reload();\n    void setFilter(QDir::Filters filters);\n    void setDirSort(QDir::SortFlags flags);\n    QDir::Filters filter() const;\n    bool isShowHideFiles() const;\n    QDir::SortFlags dirSort() const;\n    bool removeRootPath(const QString &path);\n    bool addRootPath(const QString &path);\n    void setRootPathList(const QStringList &pathList);\n    void setRootPath(const QString &path);\n    QStringList rootPathList() const;\n    QList<QModelIndex> findPaths(const QString &path) const;\n    QModelIndex findPath(const QString &path) const;\n    QString filePath(const QModelIndex &index) const;\n    FileNode *nodeFromIndex(const QModelIndex &index) const;\n    void setStartIndex(const QModelIndex &index);\n    void setStartPath(const QString &path);\n    QModelIndex startIndex() const;\n    QString startPath() const;\n    virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;\n    virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;\n    virtual QModelIndex parent(const QModelIndex &child) const;\n    virtual QModelIndex index(int row, int column,const QModelIndex &parent = QModelIndex()) const;\n    virtual QVariant data(const QModelIndex &index, int role) const;\n    bool isRootPathNode(FileNode *node) const;\n    bool isRootPathNodeFillPath() const;\n    void addWatcher(const QString &path);\n    void removeWatcher(const QString &path);\nsignals:\n    void direcotryChanged(QString);\npublic slots:\n    void reloadDirectory(const QString &path);\nprotected:\n    QModelIndex findPathHelper(const QString &path, const QModelIndex &parentIndex) const;\n    QStringList m_pathList;\n    FileNode *m_rootNode;    \n    QString   m_startPath;\n    QFileIconProvider *m_iconProvider;\n    QFileSystemWatcher *m_fileWatcher;\n    QMap<QString,int> m_fileWatcherMap;\n    QTreeView *m_treeView;\n    QDir::Filters m_filters;\n    QDir::SortFlags m_sorts;\n    QMutex m_mutex;\n};\n\n#endif // FILESYSTEMMODEL_H\n"
  },
  {
    "path": "liteidex/src/utils/filesystem/filesystemwidget.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filesystemwidget.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"filesystemwidget.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"litebuildapi/litebuildapi.h\"\n#include \"golangdocapi/golangdocapi.h\"\n#include \"fileutil/fileutil.h\"\n#include \"../folderview/folderdialog.h\"\n\n#include <QTreeView>\n#include <QVBoxLayout>\n#include <QHBoxLayout>\n#include <QPushButton>\n#include <QMenu>\n#include <QAction>\n#include <QMessageBox>\n#include <QDesktopServices>\n#include <QProcess>\n#include <QInputDialog>\n#include <QLineEdit>\n#include <QUrl>\n#include <QToolBar>\n#include <QFileSystemWatcher>\n#include <QFileDialog>\n#include <QHeaderView>\n#include <QDebug>\n#ifdef Q_OS_WIN\n#include <windows.h>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n#endif\n\nFileSystemWidget::FileSystemWidget(bool bMultiDirMode, LiteApi::IApplication *app, QWidget *parent) :\n    QWidget(parent),\n    m_liteApp(app),\n    m_bMultiDirMode(bMultiDirMode),\n    m_bHideRoot(false)\n{\n    m_tree = new SymbolTreeView;\n    m_model = new FileSystemModel(this);\n\n    QDir::Filters filters = QDir::AllDirs | QDir::Files | QDir::Drives\n                            | QDir::Readable| QDir::Writable\n                            | QDir::Executable/* | QDir::Hidden*/\n                            | QDir::NoDotAndDotDot;\n#ifdef Q_OS_WIN // Symlinked directories can cause file watcher warnings on Win32.\n    filters |= QDir::NoSymLinks;\n#endif\n    m_model->setFilter(filters);\n\n    m_tree->setContextMenuPolicy(Qt::CustomContextMenu);\n    m_tree->setModel(m_model);\n\n    QVBoxLayout *layout = new QVBoxLayout;\n    layout->setMargin(0);\n    layout->addWidget(m_tree);\n    this->setLayout(layout);\n\n    connect(m_tree,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(openPathIndex(QModelIndex)));\n    connect(m_liteApp->editorManager(),SIGNAL(currentEditorChanged(LiteApi::IEditor*)),this,SLOT(currentEditorChanged(LiteApi::IEditor*)));\n\n//    m_fileMenu = new QMenu(this);\n//    m_folderMenu = new QMenu(this);\n//    m_rootMenu = new QMenu(this);\n\n    m_openEditorAct = new QAction(tr(\"Open File\"),this);\n    m_newFileAct = new QAction(tr(\"New File...\"),this);\n    m_newFileWizardAct = new QAction(tr(\"New File Wizard...\"),this);\n    m_renameFileAct = new QAction(tr(\"Rename File...\"),this);\n    m_removeFileAct = new QAction(tr(\"Delete File\"),this);\n\n    m_newFolderAct = new QAction(tr(\"New Folder...\"),this);\n    m_renameFolderAct = new QAction(tr(\"Rename Folder...\"),this);\n    m_removeFolderAct = new QAction(tr(\"Delete Folder\"),this);\n\n    m_openShellAct = new QAction(tr(\"Open Terminal Here\"),this);\n    m_openExplorerAct = new QAction(tr(\"Open Explorer Here\"),this);\n\n    m_viewGodocAct = new QAction(tr(\"View Godoc Here\"),this);\n\n    m_addFolderAct = new QAction(tr(\"Add Folder...\"),this);\n    m_closeFolerAct = new QAction(tr(\"Close Folder\"),this);\n\n    m_closeAllFoldersAct = new QAction(tr(\"Close All Folders\"),this);\n\n//    m_fileMenu->addAction(m_executeFileAct);\n//    m_fileMenu->addAction(m_openEditorAct);\n//    m_fileMenu->addSeparator();\n//    m_fileMenu->addAction(m_newFileAct);\n//    m_fileMenu->addAction(m_newFileWizardAct);\n//    m_fileMenu->addAction(m_renameFileAct);\n//    m_fileMenu->addAction(m_removeFileAct);\n//    m_fileMenu->addSeparator();\n//    m_fileMenu->addAction(m_viewGodocAct);\n//    m_fileMenu->addSeparator();\n//    m_fileMenu->addAction(m_openShellAct);\n//    m_fileMenu->addAction(m_openExplorerAct);\n\n//    m_folderMenu->addAction(m_newFileAct);\n//    m_folderMenu->addAction(m_newFileWizardAct);\n//    m_folderMenu->addAction(m_newFolderAct);\n//    m_folderMenu->addAction(m_renameFolderAct);\n//    m_folderMenu->addAction(m_removeFolderAct);\n//    m_folderMenu->addSeparator();\n//    m_folderMenu->addAction(m_closeFolerAct);\n//    m_folderMenu->addSeparator();\n//    m_folderMenu->addAction(m_viewGodocAct);\n//    m_folderMenu->addSeparator();\n//    m_folderMenu->addAction(m_openShellAct);\n//    m_folderMenu->addAction(m_openExplorerAct);\n\n//    m_rootMenu->addAction(m_addFolderAct);\n//    m_rootMenu->addSeparator();\n    //m_rootMenu->addAction(m_closeAllFoldersAct);\n\n    connect(m_model,SIGNAL(direcotryChanged(QString)),this,SLOT(reloadDirectory(QString)));\n    connect(m_openEditorAct,SIGNAL(triggered()),this,SLOT(openEditor()));\n    connect(m_newFileAct,SIGNAL(triggered()),this,SLOT(newFile()));\n    connect(m_newFileWizardAct,SIGNAL(triggered()),this,SLOT(newFileWizard()));\n    connect(m_renameFileAct,SIGNAL(triggered()),this,SLOT(renameFile()));\n    connect(m_removeFileAct,SIGNAL(triggered()),this,SLOT(removeFile()));\n    connect(m_newFolderAct,SIGNAL(triggered()),this,SLOT(newFolder()));\n    connect(m_renameFolderAct,SIGNAL(triggered()),this,SLOT(renameFolder()));\n    connect(m_removeFolderAct,SIGNAL(triggered()),this,SLOT(removeFolder()));\n    connect(m_openShellAct,SIGNAL(triggered()),this,SLOT(openShell()));\n    connect(m_openExplorerAct,SIGNAL(triggered()),this,SLOT(openExplorer()));\n    connect(m_viewGodocAct,SIGNAL(triggered()),this,SLOT(viewGodoc()));\n    connect(m_addFolderAct,SIGNAL(triggered()),this,SLOT(addFolder()));\n    connect(m_closeFolerAct,SIGNAL(triggered()),this,SLOT(closeFolder()));\n    connect(m_closeAllFoldersAct,SIGNAL(triggered()),this,SLOT(closeAllFolders()));\n\n    connect(m_tree,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(treeViewContextMenuRequested(QPoint)));\n    connect(m_model,SIGNAL(modelReset()),this,SLOT(modelReset()));\n}\n\nFileSystemWidget::~FileSystemWidget()\n{\n//    m_liteApp->settings()->setValue(\"GolangTool/synceditor\",m_syncEditor->isChecked());\n//    m_liteApp->settings()->setValue(\"GolangTool/syncproject\",m_syncProject->isChecked());\n    //    m_liteApp->settings()->setValue(\"golangtool/gopath\",m_pathList);\n}\n\nvoid FileSystemWidget::setHideRoot(bool b)\n{\n    if (m_bMultiDirMode) {\n        return;\n    }\n    m_bHideRoot = b;\n}\n\nbool FileSystemWidget::isHideRoot() const\n{\n    return m_bHideRoot;\n}\n\nvoid FileSystemWidget::clear()\n{\n    m_model->clear();\n}\n\nSymbolTreeView *FileSystemWidget::treeView() const\n{\n    return m_tree;\n}\n\nFileSystemModel *FileSystemWidget::model() const\n{\n    return m_model;\n}\n\nQModelIndex FileSystemWidget::rootIndex() const\n{\n    if (m_model->rowCount() == 0) {\n        return QModelIndex();\n    }\n    return m_model->index(0,0);\n}\n\nvoid FileSystemWidget::modelReset()\n{\n    if (m_bHideRoot && (m_model->rowCount() > 0)) {\n        m_tree->setRootIndex(m_model->index(0,0));\n    }\n}\n\nvoid FileSystemWidget::showHideFiles(bool b)\n{\n    if (isShowHideFiles() == b) {\n        return;\n    }\n    QDir::Filters filters = m_model->filter();\n    if (b) {\n        filters |= QDir::Hidden;\n    } else {\n        filters ^= QDir::Hidden;\n    }\n    m_model->setFilter(filters);\n    if (m_bHideRoot) {\n        m_tree->expand(this->rootIndex());\n    } else {\n        m_tree->expandToDepth(0);\n    }\n}\n\nbool FileSystemWidget::isShowHideFiles() const\n{\n    return m_model->filter() & QDir::Hidden;\n}\n\nvoid FileSystemWidget::reloadDirectory(QString dir)\n{\n    SymbolTreeState state;\n    m_tree->saveState(&state);\n    m_model->reloadDirectory(dir);\n    m_tree->loadState(m_model,&state);\n}\n\nQDir FileSystemWidget::contextDir() const\n{\n    if (m_contextInfo.isDir()) {\n        return m_contextInfo.filePath();\n    }\n    return m_contextInfo.dir();\n}\n\nQFileInfo FileSystemWidget::contextFileInfo() const\n{\n    return m_contextInfo;\n}\n\nvoid FileSystemWidget::openEditor()\n{\n    if (m_contextInfo.isFile()) {\n        m_liteApp->fileManager()->openEditor(m_contextInfo.filePath());\n    }\n}\n\nvoid FileSystemWidget::newFile()\n{\n    QDir dir = contextDir();\n\n    CreateFileDialog dlg(m_liteApp->mainWindow());\n    dlg.setDirectory(dir.path());\n    if (dlg.exec() == QDialog::Rejected) {\n        return;\n    }\n    QString fileName = dlg.getFileName();\n    if (!fileName.isEmpty()) {\n        QString filePath = QFileInfo(dir,fileName).filePath();\n        if (QFile::exists(filePath)) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Create File\"),\n                                     tr(\"A file with that name already exists!\"));\n        } else {\n            QFile file(filePath);\n            if (file.open(QIODevice::WriteOnly)) {\n                file.close();\n                if (dlg.isOpenEditor()) {\n                    m_liteApp->fileManager()->openEditor(filePath,true);\n                }\n            } else {\n                QMessageBox::information(m_liteApp->mainWindow(),tr(\"Create File\"),\n                                         tr(\"Failed to create the file!\"));\n            }\n        }\n    }\n}\n\nvoid FileSystemWidget::newFileWizard()\n{\n    QString filePath;\n    QString projPath;\n    QFileInfo info = contextFileInfo();\n    QDir dir = contextDir();\n    if (!info.isFile()) {\n        filePath = dir.absolutePath();\n        projPath = dir.absolutePath();\n    } else {\n        filePath = dir.absolutePath();\n        dir.cdUp();\n        projPath = dir.absolutePath();\n    }\n    m_liteApp->fileManager()->execFileWizard(projPath,filePath);\n}\n\nvoid FileSystemWidget::renameFile()\n{\n    QFileInfo info = contextFileInfo();\n    if (!info.isFile()) {\n        return;\n    }\n    QString fileName = QInputDialog::getText(m_liteApp->mainWindow(),\n                                             tr(\"Rename File\"),tr(\"New Name:\"),\n                                             QLineEdit::Normal,info.fileName());\n    if (!fileName.isEmpty() && fileName != info.fileName()) {\n        QDir dir = contextDir();\n#ifdef Q_OS_WIN\n        if (!MoveFileW(info.filePath().toStdWString().c_str(),QFileInfo(dir,fileName).filePath().toStdWString().c_str())) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Rename File\"),\n                                     tr(\"Failed to rename the file!\"));\n        }\n#else\n        if (!QFile::rename(info.filePath(),QFileInfo(dir,fileName).filePath())) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Rename File\"),\n                                     tr(\"Failed to rename the file!\"));\n        }\n#endif\n    }\n}\n\nvoid FileSystemWidget::removeFile()\n{\n    QFileInfo info = contextFileInfo();\n    if (!info.isFile()) {\n        return;\n    }\n\t\n    int ret = QMessageBox::question(m_liteApp->mainWindow(),tr(\"Delete File\"),\n                          tr(\"Are you sure that you want to permanently delete this file?\"),\n                          QMessageBox::Yes | QMessageBox::No, QMessageBox::No);\n    if (ret == QMessageBox::Yes) {\n        if (!QFile::remove(info.filePath())) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Delete File\"),\n                                     tr(\"Failed to delete the file!\"));\n        }\n    }\n}\n\nvoid FileSystemWidget::newFolder()\n{\n    QDir dir = contextDir();\n\n    CreateDirDialog dlg(m_liteApp->mainWindow());\n    dlg.setDirectory(dir.path());\n    if (dlg.exec() == QDialog::Rejected) {\n        return;\n    }\n\n    QString folderName = dlg.getDirName();\n    if (!folderName.isEmpty()) {\n        if (!dir.entryList(QStringList() << folderName,QDir::Dirs).isEmpty()) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Create Folder\"),\n                                     tr(\"A folder with that name already exists!\"));\n        } else if (!dir.mkpath(folderName)) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Create Folder\"),\n                                     tr(\"Failed to create the folder!\"));\n        }\n    }\n}\n\nvoid FileSystemWidget::renameFolder()\n{\n    QFileInfo info = contextFileInfo();\n    if (!info.isDir()) {\n        return;\n    }\n\n    QString folderName = QInputDialog::getText(m_liteApp->mainWindow(),\n                                               tr(\"Rename Folder\"),tr(\"Folder Name\"),\n                                               QLineEdit::Normal,info.fileName());\n    if (!folderName.isEmpty() && folderName != info.fileName()) {\n        QDir dir = contextDir();\n        dir.cdUp();\n#ifdef Q_OS_WIN\n        QString _old = info.filePath();\n        QString _new = dir.path()+\"/\"+folderName;\n        if (!MoveFileW(_old.toStdWString().c_str(),_new.toStdWString().c_str())) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Rename Folder\"),\n                                     tr(\"Failed to rename the folder!\"));\n        }\n#else\n        if (!dir.rename(info.fileName(),folderName)) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Rename Folder\"),\n                                     tr(\"Failed to rename the folder!\"));\n        }\n#endif\n    }\n}\n\nvoid FileSystemWidget::removeFolder()\n{\n    QFileInfo info = contextFileInfo();\n    if (!info.isDir()) {\n        return;\n    }\n\t\n    int ret = QMessageBox::warning(m_liteApp->mainWindow(),tr(\"Delete Folder\"),\n                          tr(\"Are you sure that you want to permanently delete this folder and all of its contents?\"),\n                          QMessageBox::Yes | QMessageBox::No, QMessageBox::No);\n    if (ret == QMessageBox::Yes) {\n        QDir dir = info.dir();\n        m_model->removeWatcher(info.filePath());\n        if (!dir.rmdir(info.fileName())) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Delete Folder\"),\n                                     tr(\"Failed to delete the folder!\"));\n            m_model->addWatcher(info.filePath());\n        }\n    }\n}\n\nvoid FileSystemWidget::openExplorer()\n{\n    QDir dir = contextDir();\n    QDesktopServices::openUrl(QUrl::fromLocalFile(dir.path()));\n}\n\nvoid FileSystemWidget::viewGodoc()\n{\n    QDir dir = contextDir();\n    LiteApi::IGolangDoc *doc = LiteApi::findExtensionObject<LiteApi::IGolangDoc*>(m_liteApp,\"LiteApi.IGolangDoc\");\n    if (doc) {\n        QUrl url;\n        url.setScheme(\"pdoc\");\n        url.setPath(dir.path());\n        doc->openUrl(url);\n        doc->activeBrowser();\n    }\n}\n\nvoid FileSystemWidget::addFolder()\n{\n#if QT_VERSION >= 0x050000\n        static QString home = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);\n#else\n        static QString home = QDesktopServices::storageLocation(QDesktopServices::HomeLocation);\n#endif\n    QString folder = QFileDialog::getExistingDirectory(this,tr(\"Add Folder\"),home);\n    if (folder.isEmpty()) {\n        return;\n    }\n    this->addRootPath(folder);\n    QDir dir(folder);\n    if (dir.cdUp()) {\n        home = dir.path();\n    }\n}\n\nvoid FileSystemWidget::closeFolder()\n{\n//    if (m_contextInfo.exists() && !m_contextInfo.isDir()) {\n//        return;\n//    }\n    this->m_model->removeRootPath(m_contextInfo.filePath());\n}\n\nvoid FileSystemWidget::closeAllFolders()\n{\n    this->m_model->clear();\n}\n\nvoid FileSystemWidget::openShell()\n{\n    QDir dir = contextDir();\n    QProcessEnvironment env = LiteApi::getCurrentEnvironment(m_liteApp);\n    QString shell = env.value(\"LITEIDE_SHELL\");\n    if (!shell.isEmpty()) {\n        foreach (QString info, shell.split(\";\",qtSkipEmptyParts)) {\n            QStringList ar = info.split(\" \",qtSkipEmptyParts);\n            if (ar.size() >= 1) {\n                QString cmd = FileUtil::lookPath(ar[0],LiteApi::getCurrentEnvironment(m_liteApp),false);\n                if (!cmd.isEmpty()) {\n                    QString path = dir.path();\n                    ar.pop_front();\n#ifdef Q_OS_MAC\n                    ar.push_back(path);\n#endif\n#ifdef Q_OS_WIN\n    if (path.length() == 2 && path.right(1) == \":\") {\n        path += \"/\";\n    }\n#endif\n                    QProcess::startDetached(cmd,ar,path);\n                    return;\n                }\n            }\n        }\n        return;\n    }\n    QString cmd = env.value(\"LITEIDE_TERM\");\n    QStringList args = env.value(\"LITEIDE_TERMARGS\").split(\" \",qtSkipEmptyParts);\n    //qDebug() << cmd;\n    QString path = dir.path();\n#ifdef Q_OS_MAC\n    args.append(path);\n#endif\n#ifdef Q_OS_WIN\n    if (path.length() == 2 && path.right(1) == \":\") {\n        path += \"/\";\n    }\n#endif\n    QProcess::startDetached(cmd,args,path);\n}\n\nvoid FileSystemWidget::treeViewContextMenuRequested(const QPoint &pos)\n{\n    //QMenu *pop = new QMenu(this);\n    //connect(pop,SIGNAL(destroyed()),this,SLOT(destroy2()));\n    QMenu menu(m_tree);\n    LiteApi::FILESYSTEM_CONTEXT_FLAG flag = LiteApi::FILESYSTEM_ROOT;\n    QModelIndex index = m_tree->indexAt(pos);\n    if (index.isValid()) {\n        FileNode *node = m_model->nodeFromIndex(index);\n        if (node) {\n            m_contextInfo = node->fileInfo();\n            m_contextIndex = index;\n            if (m_model->isRootPathNode(node)) {\n                //contextMenu = m_folderMenu;\n                flag = LiteApi::FILESYSTEM_ROOTFOLDER;\n                //m_closeFolerAct->setVisible(true);\n                //m_removeFolderAct->setVisible(false);\n            } else if (node->isDir()) {\n                //contextMenu = m_folderMenu;\n                flag = LiteApi::FILESYSTEM_FOLDER;\n                //m_closeFolerAct->setVisible(false);\n                //m_removeFolderAct->setVisible(true);\n            } else {\n                //contextMenu = m_fileMenu;\n                flag = LiteApi::FILESYSTEM_FILES;\n            }\n        }\n    } else if (!m_bMultiDirMode) {\n        m_contextIndex = this->rootIndex();\n        FileNode *node = m_model->nodeFromIndex(m_contextIndex);\n        if (node) {\n            m_contextInfo = node->fileInfo();\n        }\n        flag = LiteApi::FILESYSTEM_ROOTFOLDER;\n    }\n    bool hasGo = false;\n    if (!m_bMultiDirMode || (flag != LiteApi::FILESYSTEM_ROOT)) {\n        foreach(QFileInfo info, contextDir().entryInfoList(QDir::Files)) {\n            if (info.suffix() == \"go\") {\n                hasGo = true;\n            }\n        }\n    }\n    //root folder\n    if (flag == LiteApi::FILESYSTEM_ROOT) {\n        if (m_bMultiDirMode) {\n            menu.addAction(m_addFolderAct);\n        } else {\n            menu.addAction(m_newFileAct);\n            menu.addAction(m_newFileWizardAct);\n            menu.addAction(m_newFolderAct);\n            menu.addSeparator();\n            if (hasGo) {\n                menu.addAction(m_viewGodocAct);\n                menu.addSeparator();\n            }\n            menu.addAction(m_openShellAct);\n            menu.addAction(m_openExplorerAct);\n        }\n    } else if (flag == LiteApi::FILESYSTEM_ROOTFOLDER) {\n        menu.addAction(m_newFileAct);\n        menu.addAction(m_newFileWizardAct);\n        menu.addAction(m_newFolderAct);\n        menu.addAction(m_renameFolderAct);\n        menu.addAction(m_closeFolerAct);\n        menu.addSeparator();\n        if (hasGo) {\n            menu.addAction(m_viewGodocAct);\n            menu.addSeparator();\n        }\n        menu.addAction(m_openShellAct);\n        menu.addAction(m_openExplorerAct);\n    } else if (flag == LiteApi::FILESYSTEM_FOLDER) {\n        menu.addAction(m_newFileAct);\n        menu.addAction(m_newFileWizardAct);\n        menu.addAction(m_newFolderAct);\n        menu.addAction(m_renameFolderAct);\n        menu.addAction(m_removeFolderAct);\n        menu.addSeparator();\n        if (hasGo) {\n            menu.addAction(m_viewGodocAct);\n            menu.addSeparator();\n        }\n        menu.addAction(m_openShellAct);\n        menu.addAction(m_openExplorerAct);\n    } else if (flag == LiteApi::FILESYSTEM_FILES) {\n        menu.addAction(m_openEditorAct);\n        menu.addSeparator();\n        menu.addAction(m_newFileAct);\n        menu.addAction(m_newFileWizardAct);\n        menu.addAction(m_renameFileAct);\n        menu.addAction(m_removeFileAct);\n        menu.addSeparator();\n        if (hasGo) {\n            menu.addAction(m_viewGodocAct);\n            menu.addSeparator();\n        }\n        menu.addAction(m_openShellAct);\n        menu.addAction(m_openExplorerAct);\n\n    }\n    emit aboutToShowContextMenu(&menu,flag,m_contextInfo);\n    menu.exec(m_tree->mapToGlobal(pos));\n}\n\nvoid FileSystemWidget::addRootPath(const QString &path)\n{\n    if (m_model->addRootPath(path)) {\n        m_liteApp->recentManager()->addRecent(path,\"folder\");\n        QModelIndex index = m_model->index(m_model->rowCount()-1,0,QModelIndex());\n        if (index.isValid()) {\n            m_tree->expand(index);\n        }\n    }\n}\n\nvoid FileSystemWidget::setRootPathList(const QStringList &pathList)\n{\n    m_model->setRootPathList(pathList);\n    currentEditorChanged(m_liteApp->editorManager()->currentEditor());\n}\n\nvoid FileSystemWidget::setRootPath(const QString &path)\n{\n    m_model->setRootPath(path);\n    if (m_bHideRoot) {\n        m_tree->expand(this->rootIndex());\n    } else {\n        m_tree->expandToDepth(0);\n    }\n}\n\nQString FileSystemWidget::rootPath() const\n{\n    QStringList paths = m_model->rootPathList();\n    if (!paths.isEmpty()) {\n        return paths.first();\n    }\n    return QString();\n}\n\nQStringList FileSystemWidget::rootPathList() const\n{\n    return m_model->rootPathList();\n}\n\nvoid FileSystemWidget::setStartIndex(const QModelIndex &index)\n{\n    QModelIndex oldIndex = m_model->startIndex();\n    if (oldIndex != index) {\n        m_model->setStartIndex(index);\n        m_tree->update(oldIndex);\n        m_tree->update(index);\n        emit startPathChanged(m_model->filePath(index));\n    }\n}\n\nQString FileSystemWidget::startPath() const\n{\n    QModelIndex index = m_model->startIndex();\n    return m_model->filePath(index);\n}\n\nvoid FileSystemWidget::pathIndexChanged(const QModelIndex & index)\n{\n    FileNode *node = m_model->nodeFromIndex(index);\n    if (node) {\n        QFileInfo info = node->fileInfo();\n        QModelIndex newIndex = index;\n        if (info.isDir()) {\n            newIndex = index;\n        } else {\n            newIndex = index.parent();\n        }\n        this->setStartIndex(newIndex);\n    }\n}\n\nvoid FileSystemWidget::openPathIndex(const QModelIndex &index)\n{\n    FileNode *node = m_model->nodeFromIndex(index);\n    if (!node) {\n        return;\n    }\n    if (node->isFile()) {\n        //QFileInfo info(node->path());\n        QString mimeType = m_liteApp->mimeTypeManager()->findMimeTypeByFile(node->path());\n        if (mimeType.startsWith(\"text/\") || mimeType.startsWith(\"application/\")) {\n            m_liteApp->fileManager()->openEditor(node->path());\n            return;\n        }\n//        QString cmd = FileUtil::lookPathInDir(info.fileName(),info.path());\n//        if (cmd == node->path()) {\n//            LiteApi::ILiteBuild *build = LiteApi::getLiteBuild(m_liteApp);\n//            if (build) {\n//                build->executeCommand(info.fileName(),QString(),info.path());\n//                return;\n//            }\n//        }\n        m_liteApp->fileManager()->openEditor(node->path(),true);\n    }\n}\n\nvoid FileSystemWidget::currentEditorChanged(LiteApi::IEditor* /*editor*/)\n{\n    /*\n    if (!m_syncEditor->isChecked()) {\n        return;\n    }\n    if (editor && !editor->filePath().isEmpty()) {\n        QModelIndex index = m_model->findPath(editor->filePath());\n        if (index.isValid()) {\n            m_tree->setCurrentIndex(index);\n            m_tree->scrollTo(index,QAbstractItemView::EnsureVisible);\n            if (m_syncProject->isChecked()) {\n                setStartIndex(index.parent());\n            }\n        }\n    }\n    */\n}\n\nvoid FileSystemWidget::syncEditor(bool b)\n{\n    if (!b) {\n       // m_syncProject->setChecked(false);\n    }\n}\n\nvoid FileSystemWidget::expandStartPath(QString)\n{\n    m_tree->scrollTo(m_model->startIndex(),QAbstractItemView::EnsureVisible);\n}\n"
  },
  {
    "path": "liteidex/src/utils/filesystem/filesystemwidget.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filesystemwidget.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FILESYSTEMWIDGET_H\n#define FILESYSTEMWIDGET_H\n\n#include \"liteapi/liteapi.h\"\n#include \"filesystemmodel.h\"\n#include \"symboltreeview/symboltreeview.h\"\n\n#include <QModelIndex>\n#include <QFileInfo>\n#include <QDir>\n#include <QLabel>\n\nclass FileSystemWidget : public QWidget\n{\n    Q_OBJECT\npublic:\n    explicit FileSystemWidget(bool bMultiDirMode, LiteApi::IApplication *app, QWidget *parent = 0);\n    virtual ~FileSystemWidget();\n    void setHideRoot(bool b);\n    bool isHideRoot() const;\n    QWidget *widget() { return this; }\n    void setRootPathList(const QStringList &rootPathList);\n    void addRootPath(const QString &path);\n    QStringList rootPathList() const;\n    void setStartIndex(const QModelIndex &index);\n    void setRootPath(const QString &path);\n    QString rootPath() const;\n    QString startPath() const;\n    void clear();\n    SymbolTreeView *treeView() const;\n    FileSystemModel *model() const;\n    QModelIndex rootIndex() const;\nsignals:\n    void directoryChanged();\npublic slots:\n    void modelReset();\n    void showHideFiles(bool b);\n    bool isShowHideFiles() const;\n    void reloadDirectory(QString);\n    void pathIndexChanged(const QModelIndex & index);\n    void openPathIndex(const QModelIndex &index);\n    void currentEditorChanged(LiteApi::IEditor*);\n    void treeViewContextMenuRequested(const QPoint &pos);\n    void openEditor();\n    void newFile();\n    void newFileWizard();\n    void renameFile();\n    void removeFile();\n    void newFolder();\n    void renameFolder();\n    void removeFolder();\n    void openShell();\n    void openExplorer();\n    void viewGodoc();\n    void addFolder();\n    void closeFolder();\n    void closeAllFolders();\n    void syncEditor(bool);\n    void expandStartPath(QString);\nsignals:\n    void aboutToShowContextMenu(QMenu *menu, LiteApi::FILESYSTEM_CONTEXT_FLAG flag, const QFileInfo &info);\n    void startPathChanged(const QString& path);\npublic:\n    QFileInfo contextFileInfo() const;\n    QDir contextDir() const;\nprivate:\n    LiteApi::IApplication *m_liteApp;\n    SymbolTreeView  *m_tree;\n    FileSystemModel *m_model;\n    QFileInfo m_contextInfo;\n    QModelIndex m_contextIndex;\n//    QMenu   *m_fileMenu;\n//    QMenu   *m_folderMenu;\n//    QMenu   *m_rootMenu;\n    QAction *m_openEditorAct;\n    QAction *m_newFileAct;\n    QAction *m_newFileWizardAct;\n    QAction *m_removeFileAct;\n    QAction *m_renameFileAct;\n    QAction *m_newFolderAct;\n    QAction *m_removeFolderAct;\n    QAction *m_renameFolderAct;\n    QAction *m_openShellAct;\n    QAction *m_openExplorerAct;\n    QAction *m_viewGodocAct;\n    QAction *m_addFolderAct;\n    QAction *m_closeFolerAct;\n    QAction *m_closeAllFoldersAct;\nprotected:\n    bool    m_bMultiDirMode;\n    bool    m_bHideRoot;\n};\n\n#endif // FILESYSTEMWIDGET_H\n"
  },
  {
    "path": "liteidex/src/utils/fileutil/fileutil.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: fileutil.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"fileutil.h\"\n#include <QFileInfo>\n#include <QDir>\n#include <QProcess>\n#include <QProcessEnvironment>\n#include <QDebug>\n#include <QProcess>\n#include <QDesktopServices>\n#include <QDateTime>\n#if QT_VERSION >= 0x050000\n#include <QStandardPaths>\n#endif\n\n\n#ifdef WIN32\n#include <windows.h>\n#include <shlobj.h>\n#include <shellapi.h>\n#endif\n\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nbool FileUtil::compareFile(const QString &fileName1, const QString &fileName2, bool canonical)\n{\n    if (fileName1.isEmpty() || fileName2.isEmpty()) {\n        return false;\n    }\n    if (canonical) {\n#if defined(WIN32)\n        return (QFileInfo(fileName1).canonicalFilePath().compare(QFileInfo(fileName2).canonicalFilePath(), Qt::CaseInsensitive) == 0);\n#else\n        return QFileInfo(fileName1).canonicalFilePath() == QFileInfo(fileName2).canonicalFilePath();\n#endif\n    }\n    return QFileInfo(fileName1).filePath() == QFileInfo(fileName2).filePath();\n}\n\nQStringList FileUtil::removeFiles(const QStringList &files)\n{\n    QStringList result;\n    foreach (QString file, files) {\n        if (QFile::exists(file) && QFile::remove(file)) {\n            result << file;\n        }\n    }\n    return result;\n}\n\nQStringList FileUtil::removeWorkDir(const QString &workDir, const QStringList &filters)\n{\n    QStringList result;\n    QDir dir(workDir);\n    if (!dir.exists())\n        return result;\n\n    QFileInfoList dirs = dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);\n\n    foreach (QFileInfo d, dirs) {\n        removeWorkDir(d.filePath(),filters);\n    }\n\n    QFileInfoList files = dir.entryInfoList(filters,QDir::Files);\n    foreach (QFileInfo f, files) {\n        bool b = QFile::remove(f.filePath());\n        if (b) {\n            result << f.fileName();\n        }\n    }\n    return result;\n}\n\nQMap<QString,QStringList> FileUtil::readFileContext(QIODevice *dev)\n{\n    QMap<QString,QStringList> contextMap;\n    QStringList list;\n    QString line;\n    bool bnext = false;\n    while (!dev->atEnd()) {\n        QByteArray ar = dev->readLine().trimmed();\n        if (!ar.isEmpty() && ar.right(1) == \"\\\\\") {\n            bnext = true;\n            ar[ar.length()-1] = ' ';\n        } else {\n            bnext = false;\n        }\n        line.push_back(ar);\n        if (!bnext && !line.isEmpty()) {\n            list.push_back(line);\n            line.clear();\n        }\n    }\n\n    if (!line.isEmpty()) {\n        list.push_back(line);\n    }\n\n    foreach (QString line, list) {\n        if (line.size() >= 1 && line.at(0) == '#')\n            continue;\n        QStringList v = line.split(QRegExp(\"\\\\+=\"),qtSkipEmptyParts);\n        if (v.count() == 1) {\n            v = line.split(QRegExp(\"=\"),qtSkipEmptyParts);\n            if (v.count() == 2) {\n                QStringList v2 = v.at(1).split(\" \",qtSkipEmptyParts);\n                if (!v2.isEmpty()) {\n                    contextMap[v.at(0).trimmed()] = v2;\n                }\n            }\n        } else if (v.count() == 2) {\n            QStringList v2 = v.at(1).split(\" \",qtSkipEmptyParts);\n            if (!v2.isEmpty())\n                contextMap[v.at(0).trimmed()].append(v2);\n        }\n    }\n    return contextMap;\n}\n\n#ifdef Q_OS_WIN\nQString FileUtil::canExec(QString fileName, QStringList exts)\n{\n    QFileInfo info(fileName);\n    QString suffix = info.suffix();\n    if (!suffix.isEmpty()) {\n        suffix = \".\"+suffix;\n        foreach(QString ext, exts) {\n            if (suffix == ext && info.exists()) {\n                return info.canonicalFilePath();\n            }\n        }\n    }\n    foreach(QString ext, exts) {\n        QFileInfo info(fileName+ext);\n        if (info.exists()) {\n            return info.filePath();\n        }\n    }\n    return QString();\n}\n\nQString FileUtil::lookPath(const QString &file, const QProcessEnvironment &env, bool bLocalPriority)\n{\n    QString fileName = file;\n    QStringList exts;\n    QString extenv = env.value(\"PATHEXT\");\n    if (!extenv.isEmpty()) {\n        foreach(QString ext, extenv.split(';',qtSkipEmptyParts)) {\n            if (ext.isEmpty()) {\n                continue;\n            }\n            if (ext[0] != '.') {\n                ext= '.'+ext;\n            }\n            exts.append(ext.toLower());\n        }\n    }\n    exts << \".exe\" << \".bat\" << \".cmd\";\n    exts.removeDuplicates();\n\n    if (fileName.contains('\\\\') || fileName.contains('/')) {\n        QString exec = canExec(fileName,exts);\n        if (!exec.isEmpty()) {\n            return exec;\n        }\n    }\n    if (bLocalPriority) {\n        QString exec = canExec(\".\\\\\"+fileName,exts);\n        if (!exec.isEmpty()) {\n            return exec;\n        }\n    }\n    QString pathenv = env.value(\"PATH\");\n    if (pathenv.isEmpty()) {\n        QString exec = canExec(\".\\\\\"+fileName,exts);\n        if (!exec.isEmpty()) {\n            return exec;\n        }\n    } else {\n        foreach(QString dir,pathenv.split(';',qtSkipEmptyParts)) {\n            QFileInfo info(QDir(dir),fileName);\n            QString exec = canExec(info.filePath(),exts);\n            if (!exec.isEmpty()) {\n                return exec;\n            }\n        }\n    }\n    return QString();\n}\n\nQString FileUtil::lookPathInDir(const QString &file, const QString &dir)\n{\n    QString fileName = file;\n    QStringList exts;\n    QString extenv =  QProcessEnvironment::systemEnvironment().value(\"PATHEXT\");\n    if (!extenv.isEmpty()) {\n        foreach(QString ext, extenv.split(';',qtSkipEmptyParts)) {\n            if (ext.isEmpty()) {\n                continue;\n            }\n            if (ext[0] != '.') {\n                ext= '.'+ext;\n            }\n            exts.append(ext.toLower());\n        }\n    }\n    exts << \".exe\" << \".bat\" << \".cmd\";\n    exts.removeDuplicates();\n    if (fileName.contains('\\\\') || fileName.contains('/')) {\n        QString exec = canExec(fileName,exts);\n        if (!exec.isEmpty()) {\n            return exec;\n        }\n    }\n    QFileInfo info(QDir(dir),fileName);\n    QString exec = canExec(info.filePath(),exts);\n    if (!exec.isEmpty()) {\n        return exec;\n    }\n    return QString();\n}\n\n#else\nQString FileUtil::canExec(QString fileName, QStringList /*exts*/)\n{\n    QFileInfo info(fileName);\n    if (info.exists() && info.isFile()  && info.isExecutable()) {\n        return info.canonicalFilePath();\n    }\n    return QString();\n}\n\nQString FileUtil::lookPath(const QString &file, const QProcessEnvironment &env, bool bLocalPriority)\n{\n    QString fileName = file;\n    if (fileName.contains('/')) {\n        QString exec = canExec(fileName);\n        if (!exec.isEmpty()) {\n            return exec;\n        }\n    }\n    if (bLocalPriority) {\n        QString exec = canExec(\"./\"+fileName);\n        if (!exec.isEmpty()) {\n            return exec;\n        }\n    }\n    QString pathenv = env.value(\"PATH\");\n    foreach(QString dir,pathenv.split(':',qtKeepEmptyParts)) {\n        if (dir == \"\") {\n            dir = \".\";\n        }\n        QString exec = canExec(dir+\"/\"+file);\n        if (!exec.isEmpty()) {\n            return exec;\n        }\n    }\n    return QString();\n}\n\nQString FileUtil::lookPathInDir(const QString &file, const QString &dir)\n{\n    QString fileName = file;\n    if (fileName.contains('/')) {\n        QString exec = canExec(fileName);\n        if (!exec.isEmpty()) {\n            return exec;\n        }\n    }\n    QString exec = canExec(dir+\"/\"+file);\n    if (!exec.isEmpty()) {\n        return exec;\n    }\n    return QString();\n}\n\n#endif\n\nQString FileUtil::findExecute(const QString &target)\n{\n    QStringList targetList;\n#ifdef Q_OS_WIN\n    targetList << target+\".exe\";\n#endif\n    targetList << target;\n    foreach (QString fileName, targetList) {\n        if (QFile::exists(fileName)) {\n            QFileInfo info(fileName);\n            if (info.isFile() && info.isExecutable()) {\n                return info.canonicalFilePath();\n            }\n        }\n    }\n    return QString();\n}\n\nGoExecute::GoExecute(const QString &cmdPath)\n{\n#ifdef Q_OS_WIN\n    QString goexec = \"goexec.exe\";\n#else\n    QString goexec = \"goexec\";\n#endif\n    m_goexec = QFileInfo(QDir(cmdPath),goexec).absoluteFilePath();\n}\n\nbool GoExecute::isReady()\n{\n    return QFile::exists(m_goexec);\n}\n\nQString GoExecute::cmd() const\n{\n    return m_goexec;\n}\n\nbool GoExecute::exec(const QString &workPath, const QString &target, const QStringList &args)\n{\n#ifdef Q_OS_WIN\n    QStringList iargs;\n    if (!workPath.isEmpty()) {\n        iargs << \"-w\" << workPath;\n    }\n    iargs << target << args;\n    return QProcess::startDetached(m_goexec,iargs);\n#else\n    QStringList iargs;\n    iargs << \"-e\" << m_goexec;\n    if (!workPath.isEmpty()) {\n        iargs << \"-w\" << workPath;\n    }\n    iargs << target << args;\n    return QProcess::startDetached(\"/usr/bin/xterm\",iargs);\n#endif\n}\n\nQString FileUtil::lookupGoBin(const QString &bin, LiteApi::IApplication *app, const QProcessEnvironment env, bool bLiteAppPriority)\n{\n    if (bLiteAppPriority) {\n        QString find = FileUtil::findExecute(app->applicationPath()+\"/\"+bin);\n        if (!find.isEmpty()) {\n            return find;\n        }\n    }\n#ifdef Q_OS_WIN\n    QString sep = \";\";\n#else\n    QString sep = \":\";\n#endif\n\n    QString goos = env.value(\"GOOS\");\n//    if (goos.isEmpty()) {\n//        goos = LiteApi::getDefaultGOOS();\n//    }\n    QString goarch = env.value(\"GOARCH\");\n//    QString goroot = env.value(\"GOROOT\");\n//    if (goroot.isEmpty()) {\n//        goroot = LiteApi::getDefaultGOROOT();\n//    }\n    QStringList pathList;\n    foreach (QString path, env.value(\"GOPATH\").split(sep,qtSkipEmptyParts)) {\n        pathList.append(QDir::toNativeSeparators(path));\n    }\n//    foreach (QString path, app->settings()->value(\"liteide/gopath\").toStringList()) {\n//        pathList.append(QDir::toNativeSeparators(path));\n//    }\n//    pathList.removeDuplicates();\n//    env.insert(\"GOPATH\",pathList.join(sep));\n\n//    if (!goroot.isEmpty()) {\n//        pathList.prepend(goroot);\n//    }\n\n    QStringList binList;\n    QString gobin = env.value(\"GOBIN\");\n    if (!gobin.isEmpty()) {\n        binList.append(gobin);\n    }\n    foreach (QString path, pathList) {\n        binList.append(QFileInfo(path,\"bin\").filePath());\n        binList.append(QFileInfo(path,\"bin/\"+goos+\"_\"+goarch).filePath());\n    }\n    foreach(QString path, binList) {\n        QString find = FileUtil::findExecute(path+\"/\"+bin);\n        if (!find.isEmpty()) {\n            return find;\n        }\n    }\n    return FileUtil::lookupLiteBin(bin,app,env);\n}\n\nQString FileUtil::lookupLiteBin(const QString &bin, LiteApi::IApplication *app, const QProcessEnvironment env)\n{\n    QString find = FileUtil::findExecute(app->applicationPath()+\"/\"+bin);\n    if (find.isEmpty()) {\n        find = FileUtil::lookPath(bin,env,true);\n    }\n    return find;\n}\n\nbool FileUtil::CopyDirectory(const QString &src, const QString &dest)\n{\n    QDir dir(src);\n    foreach(QFileInfo info, dir.entryInfoList(QDir::Files)) {\n        if (info.isFile() && !info.isSymLink()) {\n            QFile in(info.filePath());\n            if (!in.open(QFile::ReadOnly)) {\n                return false;\n            }\n            QFile out(dest+\"/\"+info.fileName());\n            if (!out.open(QFile::WriteOnly)) {\n                return false;\n            }\n            out.write(in.readAll());\n        }\n    }\n    return true;\n}\n\n#ifdef Q_OS_WIN\nbool openBrowser(LPCTSTR lpszFileName)\n{\n    HINSTANCE hl= LoadLibrary(TEXT(\"liteshell.dll\"));\n    typedef BOOL (*BrowseToFileProc)(const wchar_t* filename);\n    if(!hl)\n        return false;\n    bool b = false;\n    BrowseToFileProc proc = (BrowseToFileProc)GetProcAddress(hl,\"BrowseToFile\");\n    if (proc) {\n        b = proc(lpszFileName);\n    }\n    FreeLibrary(hl);\n    return b;\n}\nbool shellOpenFolder(LPCTSTR filename)\n{\n    HINSTANCE hl= LoadLibrary(TEXT(\"Shell32.dll\"));\n    if (!hl) {\n        return false;\n    }\n    typedef LPITEMIDLIST(*ILCreateFromPathProc)(LPCTSTR);\n    typedef void (*ILFreeProc)(LPITEMIDLIST);\n    typedef void (*SHOpenFolderAndSelectItemsProc)(LPCITEMIDLIST pidlFolder, UINT cidl, LPCITEMIDLIST *apidl, DWORD dwFlags);\n    ILCreateFromPathProc fnILCreateFromPath =0;\n    ILFreeProc fnILFree = 0;\n    SHOpenFolderAndSelectItemsProc fnSHOpenFolderAndSelectItems = 0;\n    fnILCreateFromPath = (ILCreateFromPathProc)GetProcAddress(hl,\"ILCreateFromPath\");\n    fnILFree = (ILFreeProc)GetProcAddress(hl,\"ILFree\");\n    fnSHOpenFolderAndSelectItems = (SHOpenFolderAndSelectItemsProc)GetProcAddress(hl,\"SHOpenFolderAndSelectItems\");\n    bool b = false;\n    if(fnILCreateFromPath && fnILFree && fnSHOpenFolderAndSelectItems){\n        ITEMIDLIST *pidl=0;\n        pidl = fnILCreateFromPath(filename);\n        if (pidl) {\n            fnSHOpenFolderAndSelectItems(pidl,0,0,0);\n            fnILFree(pidl);\n            b = true;\n        }\n    }\n    FreeLibrary(hl);\n    return b;\n}\n#endif\n\nvoid FileUtil::openInExplorer(const QString &path)\n{\n#ifdef Q_OS_WIN\n    if (openBrowser((LPCTSTR)QDir::toNativeSeparators(path).utf16())) {\n        return;\n    }\n    if (shellOpenFolder((LPCTSTR)QDir::toNativeSeparators(path).utf16())) {\n        return;\n    }\n    const QString explorer = FileUtil::lookPath(\"explorer.exe\",QProcessEnvironment::systemEnvironment(),false);\n    if (!explorer.isEmpty()) {\n        QStringList param;\n        if (!QFileInfo(path).isDir())\n            param += QLatin1String(\"/select,\");\n        param += QDir::toNativeSeparators(path);\n        QProcess::startDetached(explorer, param);\n        return;\n    }\n#endif\n#ifdef Q_OS_MAC\n        QStringList scriptArgs;\n        scriptArgs << QLatin1String(\"-e\")\n                   << QString::fromLatin1(\"tell application \\\"Finder\\\" to reveal POSIX file \\\"%1\\\"\")\n                                         .arg(path);\n        QProcess::execute(QLatin1String(\"/usr/bin/osascript\"), scriptArgs);\n        scriptArgs.clear();\n        scriptArgs << QLatin1String(\"-e\")\n                   << QLatin1String(\"tell application \\\"Finder\\\" to activate\");\n        QProcess::execute(QLatin1String(\"/usr/bin/osascript\"), scriptArgs);\n        return;\n#endif\n    QFileInfo info(path);\n    if (info.isDir()) {\n        QDesktopServices::openUrl(QUrl::fromLocalFile(info.filePath()));\n    } else {\n        QDesktopServices::openUrl(QUrl::fromLocalFile(info.path()));\n    }\n}\n\nstatic bool startDetachedEx(const QString &cmd, const QStringList &args, const QString &workDir)\n{\n#ifdef Q_OS_WIN\n    return (intptr_t)ShellExecuteW(NULL, L\"open\", (LPCWSTR)cmd.toStdWString().data(), (LPCWSTR)args.join(\" \").toStdWString().data(), (LPCWSTR)workDir.toStdWString().data(), SW_SHOW) > 32;\n#else\n    return QProcess::startDetached(cmd, args, workDir);\n#endif\n}\n\nvoid FileUtil::openInShell(const QProcessEnvironment &env, const QString &file)\n{\n    QFileInfo info(file);\n    QDir dir;\n    if (info.isDir()) {\n        dir.setCurrent(file);\n    } else {\n        dir = info.dir();\n    }\n    //check shell\n    QString shell = env.value(\"LITEIDE_SHELL\");\n#ifdef Q_OS_LINUX\n    if (shell.isEmpty()) {\n        shell=\"gnome-terminal;lxterminal;konsole;xfce4-terminal;xterm\";\n    }\n#endif\n    if (!shell.isEmpty()) {\n        foreach (QString info, shell.split(\";\",qtSkipEmptyParts)) {\n            QStringList ar = info.split(\" \",qtSkipEmptyParts);\n            if (ar.size() >= 1) {\n                QString cmd = FileUtil::lookPath(ar[0],env,false);\n                if (!cmd.isEmpty()) {\n                    QString path = dir.path();\n                    ar.pop_front();\n#ifdef Q_OS_MAC\n                    ar.push_back(path);\n#endif\n#ifdef Q_OS_WIN\n    if (path.length() == 2 && path.right(1) == \":\") {\n        path += \"/\";\n    }\n#endif\n                    QProcess::startDetached(cmd,ar,path);\n                    return;\n                }\n            }\n        }\n        return;\n    }\n    //check LITEIDE_TERM\n    QString cmd = env.value(\"LITEIDE_TERM\");\n    QStringList args = env.value(\"LITEIDE_TERMARGS\").split(\" \",qtSkipEmptyParts);\n#ifdef Q_OS_MAC\n    if (cmd.isEmpty()) {\n        cmd = \"/usr/bin/open\";\n    }\n    if (args.isEmpty()) {\n        args << \"-a\" << \"Terminal\";\n    }\n#endif\n#ifdef Q_OS_WIN\n    if (cmd.isEmpty()) {\n        cmd = env.value(\"COMSPEC\");\n    }\n#endif\n\n    QString path = dir.path();\n#ifdef Q_OS_MAC\n    args.append(path);\n#endif\n#ifdef Q_OS_WIN\n    if (path.length() == 2 && path.right(1) == \":\") {\n        path += \"/\";\n    }\n#endif\n//#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))\n//    QProcess p;\n//    p.setWorkingDirectory(path);\n//    p.setProcessEnvironment(env);\n//    p.setProgram(cmd);\n//    p.setArguments(args);\n//    p.startDetached();\n//#else\n    startDetachedEx(cmd,args,path);\n}\n\n\nstruct Trash\n{\n    Trash()\n    {\n#ifdef Q_OS_LINUX\n        bInitTrash = false;\n        init();\n#endif\n    }\n    bool isValid() const\n    {\n#ifdef Q_OS_MAC\n        return true;\n#endif\n#ifdef Q_OS_WIN\n        return true;\n#endif\n#ifdef Q_OS_LINUX\n        return this->bInitTrash;\n#endif\n        return false;\n    }\n    bool moveToTrash(QString fileName)\n    {\n        QFileInfo fileinfo(fileName);\n        if (!fileinfo.exists()) {\n            return false;\n        }\n#ifdef Q_OS_MAC\n//    int status = QProcess::execute(QString::fromLatin1(\"osascript\"),\n//                                   QStringList() << \"-e\" << \"on run argv\"\n//                                   << \"-e\" << \"repeat with f in argv\"\n//                                   << \"-e\" << \"set x to (POSIX file f) as string\"\n//                                   << \"-e\" << \"tell application \\\"Finder\\\" to delete x\"\n//                                   << \"-e\" << \"end\"\n//                                   << \"-e\" << \"end\"\n//                                   << fileName);\n    int status = QProcess::execute(\"/usr/bin/osascript\",\n                                   QStringList() << \"-e\"\n                                   << QString(\"tell application \\\"Finder\\\" to delete (POSIX file \\\"%1\\\")\").arg(fileName));\n    return status == 0;\n#endif\n\n#ifdef Q_OS_WIN\n    WCHAR from[ MAX_PATH ];\n    memset( from, 0, sizeof( from ));\n    int l = fileinfo.absoluteFilePath().toWCharArray( from );\n    Q_ASSERT( 0 <= l && l < MAX_PATH );\n    from[ l ] = '\\0';\n    SHFILEOPSTRUCT fileop;\n    memset( &fileop, 0, sizeof( fileop ) );\n    fileop.wFunc = FO_DELETE;\n    fileop.pFrom = from;\n    fileop.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT;\n    int rv = SHFileOperation( &fileop );\n    return rv == 0;\n#endif\n\n#ifdef Q_OS_LINUX\n    QFileInfo original( fileName );\n    if( !original.exists() )\n        return false;\n    QString info;\n    info += \"[Trash Info]\\nPath=\";\n    info += original.absoluteFilePath();\n    info += \"\\nDeletionDate=\";\n    info += QDateTime::currentDateTime().toString(\"yyyy-MM-ddThh:mm:ss\");\n    info += \"\\n\";\n    QString trashname = original.fileName();\n    QString infopath = TrashPathInfo + \"/\" + trashname + \".trashinfo\";\n    QString filepath = TrashPathFiles + \"/\" + trashname;\n    int nr = 1;\n    while( QFileInfo( infopath ).exists() || QFileInfo( filepath ).exists() ){\n        nr++;\n        trashname = original.baseName() + \".\" + QString::number( nr );\n        if( !original.completeSuffix().isEmpty() ){\n            trashname += QString( \".\" ) + original.completeSuffix();\n        }\n        infopath = TrashPathInfo + \"/\" + trashname + \".trashinfo\";\n        filepath = TrashPathFiles + \"/\" + trashname;\n    }\n    QDir dir;\n    if( !dir.rename( original.absoluteFilePath(), filepath ) ){\n        return false;\n    }\n    QFile f(infopath);\n    if (f.open(QFile::WriteOnly)) {\n        f.write(info.toUtf8());\n    }\n    return true;\n#endif\n    return false;\n    }\n#ifdef Q_OS_LINUX\n    bool init()\n    {\n        QStringList paths;\n        const char* xdg_data_home = getenv( \"XDG_DATA_HOME\" );\n        if( xdg_data_home ){\n            QString xdgTrash( xdg_data_home );\n            paths.append( xdgTrash + \"/Trash\" );\n        }\n#if QT_VERSION >= 0x050000\n        QString home = QStandardPaths::writableLocation( QStandardPaths::HomeLocation );\n#else\n        QString home = QDesktopServices::storageLocation(QDesktopServices::HomeLocation);\n#endif\n        paths.append( home + \"/.local/share/Trash\" );\n        paths.append( home + \"/.trash\" );\n        foreach( QString path, paths ){\n            if( TrashPath.isEmpty() ){\n                QDir dir( path );\n                if( dir.exists() ){\n                    TrashPath = path;\n                }\n            }\n        }\n        if( TrashPath.isEmpty() )\n            return 1;\n        TrashPathInfo = TrashPath + \"/info\";\n        TrashPathFiles = TrashPath + \"/files\";\n        if( !QDir( TrashPathInfo ).exists() || !QDir( TrashPathFiles ).exists() )\n            return false;\n        bInitTrash = true;\n        return true;\n    }\n#endif\npublic:\n#ifdef Q_OS_LINUX\n     bool bInitTrash;\n     QString TrashPath;\n     QString TrashPathInfo;\n     QString TrashPathFiles;\n#endif\n};\n\n#ifndef Q_OS_DARWIN\nstatic Trash* getTrash()\n{\n    static Trash trash;\n    return &trash;\n}\n\nbool FileUtil::hasTrash()\n{\n    return getTrash()->isValid();\n}\n\nbool FileUtil::moveToTrash(const QString &fileName)\n{\n    return getTrash()->moveToTrash(fileName);\n}\n#endif\n\n"
  },
  {
    "path": "liteidex/src/utils/fileutil/fileutil.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: fileutil.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FILEUTIL_H\n#define FILEUTIL_H\n\n#include <QObject>\n#include <QMap>\n#include <QIODevice>\n#include <QStringList>\n#include <QProcessEnvironment>\n#include \"liteapi/liteapi.h\"\n\nstruct FileUtil\n{\n    static bool compareFile(const QString &fileName1, const QString &fileName2, bool canonical = true);\n    static QStringList removeFiles(const QStringList &files);\n    static QStringList removeWorkDir(const QString &workDir, const QStringList &filters);\n    static QMap<QString,QStringList> readFileContext(QIODevice *dev);\n    static QString findExecute(const QString &target);\n    static QString canExec(QString file, QStringList exts = QStringList());\n    static QString lookPath(const QString &fileName,const QProcessEnvironment &env, bool bLocalPriority);\n    static QString lookPathInDir(const QString &fileName,const QString &dir);\n    static QString lookupGoBin(const QString &bin, LiteApi::IApplication *app, const QProcessEnvironment env, bool bLiteAppPriority);\n    static QString lookupLiteBin(const QString &bin, LiteApi::IApplication *app, const QProcessEnvironment env);\n    static bool CopyDirectory(const QString &src, const QString &dest);\n    static void openInExplorer(const QString &path);\n    static void openInShell(const QProcessEnvironment &env, const QString &path);\n    static bool hasTrash();\n    static bool moveToTrash(const QString &fileName);\n};\n\nstruct GoExecute\n{\npublic:\n    GoExecute(const QString &cmdPath);\n    bool isReady();\n    QString cmd() const;\n    bool exec(const QString &workPath, const QString &target, const QStringList &args = QStringList());\nprotected:\n    QString m_goexec;\n};\n\n#endif // FILEUTIL_H\n"
  },
  {
    "path": "liteidex/src/utils/fileutil/fileutil.pri",
    "content": "LIBS *= -l$$qtLibraryName(fileutil)\nwin32 {\n    LIBS += -lole32 -lshell32\n}\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/fileutil/fileutil.pro",
    "content": "TARGET = fileutil\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude(../../liteideutils.pri)\n\nHEADERS += fileutil.h \\\n    findfilesthread.h\n\nSOURCES += fileutil.cpp \\\n    findfilesthread.cpp\n\nmacx {\n    OBJECTIVE_SOURCES += fileutil_mac.mm\n}\n"
  },
  {
    "path": "liteidex/src/utils/fileutil/fileutil_mac.mm",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 visualfc. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: fileutil_mac.mm\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"fileutil.h\"\n#include <QUrl>\n#include <QFileInfo>\n#include <CoreFoundation/CoreFoundation.h>\n#include <Foundation/Foundation.h>\n\n\nbool FileUtil::hasTrash()\n{\n#ifdef Q_OS_MACOS\n    return true;\n#else\n    return false;\n#endif\n}\n\n\nbool FileUtil::moveToTrash(const QString &fileName)\n{\n#ifdef Q_OS_MACOS // desktop macOS has a trash can\n    QMacAutoReleasePool pool;\n\n    QFileInfo info(fileName);\n    NSString *filepath = info.filePath().toNSString();\n    NSURL *fileurl = [NSURL fileURLWithPath:filepath isDirectory:info.isDir()];\n    NSURL *resultingUrl = nil;\n    NSError *nserror = nil;\n    NSFileManager *fm = [NSFileManager defaultManager];\n    if ([fm trashItemAtURL:fileurl resultingItemURL:&resultingUrl error:&nserror] != YES) {\n        return false;\n    }\n    return true;\n#else\n    return false;\n#endif\n}\n"
  },
  {
    "path": "liteidex/src/utils/fileutil/findfilesthread.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2018 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: findfilesthread.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"findfilesthread.h\"\r\n#include <QDir>\r\n#include <QFileInfo>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nFindFilesThread::FindFilesThread(QObject *parent) : QThread(parent)\r\n{\r\n    m_cancel = false;\r\n    m_maxFileCount = 10000;\r\n    m_filesCount = 0;\r\n    m_maxBlockSendCount = 10;\r\n}\r\n\r\nvoid FindFilesThread::setFolderList(const QStringList &folderList, const QSet<QString> &extSet, const QSet<QString> &exceptFiles, int maxCount)\r\n{\r\n    m_folderList = folderList;\r\n    m_extSet = extSet;\r\n    m_exceptFiles = exceptFiles;\r\n    m_maxFileCount = maxCount;\r\n    m_filesCount = 0;\r\n    m_processFolderSet.clear();\r\n    m_cancel = false;\r\n}\r\n\r\nvoid FindFilesThread::stop(int time)\r\n{\r\n    m_cancel = true;\r\n    if (this->isRunning()) {\r\n        this->quit();\r\n        this->wait(time);\r\n    }\r\n}\r\n\r\nvoid FindFilesThread::run()\r\n{\r\n    m_cancel = false;\r\n    foreach (QString folder, m_folderList) {\r\n        findFolder(folder);\r\n    }\r\n}\r\n\r\nvoid FindFilesThread::sendResult(const QStringList &fileList)\r\n{\r\n    emit findResult(fileList);\r\n}\r\n\r\nvoid FindFilesThread::findFolder(QString folder)\r\n{\r\n    if (m_cancel) {\r\n        return;\r\n    }\r\n    if (m_processFolderSet.contains(folder)) {\r\n        return;\r\n    }\r\n    m_processFolderSet.insert(folder);\r\n    QDir dir(folder);\r\n    QList<QString> fileList;\r\n    foreach (QFileInfo info, dir.entryInfoList(QDir::Dirs|QDir::Files|QDir::NoDotAndDotDot)) {\r\n        if (m_cancel) {\r\n            return;\r\n        }\r\n        QString filePath = info.filePath();\r\n        if (info.isDir()) {\r\n            findFolder(filePath);\r\n        } else if (info.isFile()) {\r\n            if (m_extSet.contains(info.suffix()) && !m_exceptFiles.contains(filePath) ) {\r\n                m_filesCount++;\r\n                if (m_filesCount > m_maxFileCount) {\r\n                    return;\r\n                }\r\n                fileList << filePath;\r\n            }\r\n        }\r\n        if (fileList.size() >= m_maxBlockSendCount) {\r\n            sendResult(fileList);\r\n            fileList.clear();\r\n        }\r\n    }\r\n    if (!fileList.isEmpty()) {\r\n        sendResult(fileList);\r\n    }\r\n}\r\n"
  },
  {
    "path": "liteidex/src/utils/fileutil/findfilesthread.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2018 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: findfilesthread.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef FINDFILESTHREAD_H\r\n#define FINDFILESTHREAD_H\r\n\r\n#include <QThread>\r\n#include <QString>\r\n#include <QStringList>\r\n#include <QSet>\r\n\r\nclass FindFilesThread : public QThread\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    FindFilesThread(QObject *parent);\r\n    void setFolderList(const QStringList &folderLis, const QSet<QString> &extSet, const QSet<QString> &exceptFiles, int maxCount);\r\n    void stop(int time = 1000);\r\nprotected:\r\n    virtual void run();\r\n    void findFolder(QString folder);\r\n    void sendResult(const QStringList &fileList);\r\nsignals:\r\n    void findResult(const QStringList &fileList);\r\nprotected:\r\n    QStringList m_folderList;\r\n    QSet<QString> m_exceptFiles;\r\n    QSet<QString> m_extSet;\r\n    QSet<QString> m_processFolderSet;\r\n    int           m_maxFileCount;\r\n    int           m_filesCount;\r\n    int           m_maxBlockSendCount;\r\n    bool          m_cancel;\r\n};\r\n\r\n#endif // FINDFILESTHREAD_H\r\n"
  },
  {
    "path": "liteidex/src/utils/folderview/abstractmultiproxymodel.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: abstractmultiproxymodel.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"abstractmultiproxymodel.h\"\r\n#include \"abstractmultiproxymodel_p.h\"\r\n\r\n#include <QSize>\r\n#include <QStringList>\r\n#include <QDebug>\r\n\r\n//detects the deletion of the source model\r\nvoid AbstractMultiProxyModelPrivate::_q_sourceModelDestroyed()\r\n{\r\n    //model = QAbstractItemModelPrivate::staticEmptyModel();\r\n    Q_Q(AbstractMultiProxyModel);\r\n    QAbstractItemModel *sourceModel = (QAbstractItemModel*)sender();\r\n    q->removeSourceModel(sourceModel);\r\n}\r\n\r\n/*!\r\n    Constructs a proxy model with the given \\a parent.\r\n*/\r\n\r\nAbstractMultiProxyModel::AbstractMultiProxyModel(QObject *parent)\r\n    :QAbstractItemModel(parent)\r\n{\r\n    d_ptr = new AbstractMultiProxyModelPrivate;\r\n    d_ptr->q_ptr = this;\r\n    //setSourceModel(QAbstractItemModelPrivate::staticEmptyModel());\r\n}\r\n\r\n/*!\r\n    \\internal\r\n*/\r\n\r\nAbstractMultiProxyModel::AbstractMultiProxyModel(AbstractMultiProxyModelPrivate &dd, QObject *parent)\r\n    : QAbstractItemModel(parent), d_ptr(&dd)\r\n{    \r\n    d_ptr->q_ptr = this;\r\n\r\n}\r\n\r\n/*!\r\n    Destroys the proxy model.\r\n*/\r\nAbstractMultiProxyModel::~AbstractMultiProxyModel()\r\n{\r\n\r\n}\r\n\r\n/*!\r\n    Sets the given \\a sourceModel to be processed by the proxy model.\r\n*/\r\n\r\nbool AbstractMultiProxyModel::addSourceModel(QAbstractItemModel *sourceModel,  const QModelIndex &sourceIndex)\r\n{\r\n    Q_D(AbstractMultiProxyModel);\r\n    if (d->containsModel(sourceModel)) {\r\n        return false;\r\n    }\r\n//    if (sourceModel) {\r\n//        connect(sourceModel,SIGNAL(destroyed(QObject*)),d,SLOT(_q_sourceModelDestroyed()));\r\n//    }\r\n    d->indexList.push_back(SourceModelIndex(sourceModel,sourceIndex));\r\n    return true;\r\n}\r\n\r\nbool AbstractMultiProxyModel::removeSourceModel(QAbstractItemModel *sourceModel)\r\n{\r\n    Q_D(AbstractMultiProxyModel);\r\n    QMutableListIterator<SourceModelIndex> i(d->indexList);\r\n    int n = 0;\r\n    while (i.hasNext()) {\r\n        SourceModelIndex index = i.next();\r\n        if (index.model == sourceModel) {\r\n            this->beginRemoveRows(QModelIndex(),n,n);\r\n            disconnect(sourceModel,0,this,0);\r\n            i.remove();\r\n            this->endRemoveRows();\r\n            return true;\r\n        }\r\n        n++;\r\n    }    \r\n    return false;\r\n}\r\n\r\nvoid AbstractMultiProxyModel::removeAllSourceModel()\r\n{\r\n    this->beginResetModel();\r\n    Q_D(AbstractMultiProxyModel);\r\n    foreach (SourceModelIndex si, d->indexList) {\r\n        disconnect(si.model,0,this,0);\r\n    }\r\n    d->indexList.clear();\r\n    this->endResetModel();\r\n}\r\n\r\nQList<SourceModelIndex> AbstractMultiProxyModel::sourceModelIndexlList() const\r\n{\r\n    Q_D(const AbstractMultiProxyModel);\r\n    return d->indexList;\r\n}\r\n\r\nQList<QAbstractItemModel *> AbstractMultiProxyModel::sourceModelList() const\r\n{\r\n    Q_D(const AbstractMultiProxyModel);\r\n    QList<QAbstractItemModel*> modelList;\r\n    foreach (SourceModelIndex i, d->indexList) {\r\n        modelList.push_back(i.model);\r\n    }\r\n    return modelList;\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nbool AbstractMultiProxyModel::submit()\r\n{\r\n    Q_D(AbstractMultiProxyModel);\r\n    if (d->indexList.isEmpty()) {\r\n        return false;\r\n    }\r\n    foreach (SourceModelIndex source, d->indexList) {\r\n        source.model->submit();\r\n    }\r\n    return true;\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nvoid AbstractMultiProxyModel::revert()\r\n{\r\n    Q_D(AbstractMultiProxyModel);\r\n    foreach (SourceModelIndex source, d->indexList) {\r\n        source.model->revert();\r\n    }\r\n}\r\n\r\n\r\n/*!\r\n  \\fn QModelIndex AbstractMultiProxyModel::mapToSource(const QModelIndex &proxyIndex) const\r\n\r\n  Reimplement this function to return the model index in the source model that\r\n  corresponds to the \\a proxyIndex in the proxy model.\r\n\r\n  \\sa mapFromSource()\r\n*/\r\n\r\n/*!\r\n  \\fn QModelIndex AbstractMultiProxyModel::mapFromSource(const QModelIndex &sourceIndex) const\r\n\r\n  Reimplement this function to return the model index in the proxy model that\r\n  corresponds to the \\a sourceIndex from the source model.\r\n\r\n  \\sa mapToSource()\r\n*/\r\n\r\n/*!\r\n  Returns a source selection mapped from the specified \\a proxySelection.\r\n\r\n  Reimplement this method to map proxy selections to source selections.\r\n */\r\nQItemSelection AbstractMultiProxyModel::mapSelectionToSource(const QItemSelection &proxySelection) const\r\n{\r\n    QModelIndexList proxyIndexes = proxySelection.indexes();\r\n    QItemSelection sourceSelection;\r\n    for (int i = 0; i < proxyIndexes.size(); ++i) {\r\n        const QModelIndex proxyIdx = mapToSource(proxyIndexes.at(i));\r\n        if (!proxyIdx.isValid())\r\n            continue;\r\n        sourceSelection << QItemSelectionRange(proxyIdx);\r\n    }\r\n    return sourceSelection;\r\n}\r\n\r\n/*!\r\n  Returns a proxy selection mapped from the specified \\a sourceSelection.\r\n\r\n  Reimplement this method to map source selections to proxy selections.\r\n*/\r\nQItemSelection AbstractMultiProxyModel::mapSelectionFromSource(const QItemSelection &sourceSelection) const\r\n{\r\n    QModelIndexList sourceIndexes = sourceSelection.indexes();\r\n    QItemSelection proxySelection;\r\n    for (int i = 0; i < sourceIndexes.size(); ++i) {\r\n        const QModelIndex srcIdx = mapFromSource(sourceIndexes.at(i));\r\n        if (!srcIdx.isValid())\r\n            continue;\r\n        proxySelection << QItemSelectionRange(srcIdx);\r\n    }\r\n    return proxySelection;\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nQVariant AbstractMultiProxyModel::data(const QModelIndex &proxyIndex, int role) const\r\n{\r\n   // Q_D(const AbstractMultiProxyModel);\r\n    SourceModelIndex source = mapToSourceEx(proxyIndex);\r\n    if (!source.index.isValid() && proxyIndex.column() == 0 && role ==  Qt::DisplayRole) {\r\n        return \"Root\";\r\n    }\r\n    return source.model->data(source.index,role);\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nQVariant AbstractMultiProxyModel::headerData(int section, Qt::Orientation orientation, int role) const\r\n{\r\n    Q_D(const AbstractMultiProxyModel);\r\n    if (d->indexList.isEmpty()) {\r\n        return QVariant();\r\n    }\r\n    return d->indexList[0].model->headerData(section,orientation,role);\r\n//    int sourceSection;\r\n//    SourceIndex si;\r\n//    if (orientation == Qt::Horizontal) {\r\n//        const QModelIndex proxyIndex = index(0, section);\r\n//        si = mapToSourceEx(proxyIndex);\r\n//        sourceSection = si.index.column();\r\n//    } else {\r\n//        const QModelIndex proxyIndex = index(section, 0);\r\n//        si = mapToSourceEx(proxyIndex);\r\n//        sourceSection = si.index.row();\r\n//    }\r\n//    if (si.model == 0) {\r\n//        qDebug() << \"error\";\r\n//        return d->modelList[0]->headerData(section,orientation,role);\r\n//    }\r\n//    return si.model->headerData(sourceSection, orientation, role);\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nQMap<int, QVariant> AbstractMultiProxyModel::itemData(const QModelIndex &proxyIndex) const\r\n{\r\n    return QAbstractItemModel::itemData(proxyIndex);\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nQt::ItemFlags AbstractMultiProxyModel::flags(const QModelIndex &index) const\r\n{\r\n    //Q_D(const AbstractMultiProxyModel);\r\n    if (!index.isValid()) {\r\n        return Qt::NoItemFlags;\r\n    }\r\n    SourceModelIndex source = mapToSourceEx(index);\r\n    return source.model->flags(source.index);\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nbool AbstractMultiProxyModel::setData(const QModelIndex &index, const QVariant &value, int role)\r\n{\r\n    //Q_D(AbstractMultiProxyModel);\r\n    SourceModelIndex source = mapToSourceEx(index);\r\n    return source.model->setData(source.index,value,role);\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nbool AbstractMultiProxyModel::setItemData(const QModelIndex &index, const QMap< int, QVariant >& roles)\r\n{\r\n    return QAbstractItemModel::setItemData(index, roles);\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nbool AbstractMultiProxyModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role)\r\n{\r\n    //Q_D(AbstractMultiProxyModel);\r\n    int sourceSection;\r\n    SourceModelIndex source;\r\n    if (orientation == Qt::Horizontal) {\r\n        const QModelIndex proxyIndex = index(0, section);\r\n        source = mapToSourceEx(proxyIndex);\r\n        sourceSection = source.index.column();\r\n    } else {\r\n        const QModelIndex proxyIndex = index(section, 0);\r\n        source = mapToSourceEx(proxyIndex);\r\n        sourceSection = source.index.row();\r\n    }\r\n    return source.model->setHeaderData(sourceSection, orientation, value, role);\r\n    //return d->model->setHeaderData(sourceSection, orientation, value, role);\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n    \\since 4.8\r\n */\r\nQModelIndex AbstractMultiProxyModel::buddy(const QModelIndex &index) const\r\n{\r\n    //Q_D(const AbstractMultiProxyModel);\r\n    SourceModelIndex source = mapToSourceEx(index);\r\n    return mapFromSourceEx(source.model,source.model->buddy(source.index));\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n    \\since 4.8\r\n */\r\nbool AbstractMultiProxyModel::canFetchMore(const QModelIndex &parent) const\r\n{\r\n    //Q_D(const AbstractMultiProxyModel);\r\n    SourceModelIndex source = mapToSourceEx(parent);\r\n    if (source.model == 0) {\r\n        return false;\r\n    }\r\n    return source.model->canFetchMore(source.index);\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n    \\since 4.8\r\n */\r\nvoid AbstractMultiProxyModel::fetchMore(const QModelIndex &parent)\r\n{\r\n    //Q_D(AbstractMultiProxyModel);\r\n    SourceModelIndex source = mapToSourceEx(parent);\r\n    source.model->fetchMore(source.index);\r\n    //d->model->fetchMore(mapToSource(parent));\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n    \\since 4.8\r\n */\r\nvoid AbstractMultiProxyModel::sort(int column, Qt::SortOrder order)\r\n{\r\n    Q_D(AbstractMultiProxyModel);\r\n    //d->model->sort(column, order);\r\n    foreach (SourceModelIndex source, d->indexList) {\r\n        source.model->sort(column,order);\r\n    }\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n    \\since 4.8\r\n */\r\nQSize AbstractMultiProxyModel::span(const QModelIndex &index) const\r\n{\r\n    //Q_D(const AbstractMultiProxyModel);\r\n    SourceModelIndex source = mapToSourceEx(index);\r\n    return source.model->span(source.index);\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n    \\since 4.8\r\n */\r\nbool AbstractMultiProxyModel::hasChildren(const QModelIndex &parent) const\r\n{\r\n    //Q_D(const AbstractMultiProxyModel);\r\n    SourceModelIndex source = mapToSourceEx(parent);\r\n    return source.model->hasChildren(source.index);\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n    \\since 4.8\r\n */\r\nQMimeData* AbstractMultiProxyModel::mimeData(const QModelIndexList &indexes) const\r\n{\r\n    Q_D(const AbstractMultiProxyModel);\r\n    if (d->indexList.isEmpty()) {\r\n        return QAbstractItemModel::mimeData(indexes);\r\n    }\r\n\r\n    QModelIndexList list;\r\n    foreach(const QModelIndex &index, indexes)\r\n        list << mapToSource(index);\r\n\r\n    return d->indexList[0].model->mimeData(list);\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n    \\since 4.8\r\n */\r\nQStringList AbstractMultiProxyModel::mimeTypes() const\r\n{\r\n    Q_D(const AbstractMultiProxyModel);\r\n    if (d->indexList.isEmpty()) {\r\n        return QAbstractItemModel::mimeTypes();\r\n    }\r\n    return d->indexList[0].model->mimeTypes();\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n    \\since 4.8\r\n */\r\nQt::DropActions AbstractMultiProxyModel::supportedDropActions() const\r\n{\r\n    Q_D(const AbstractMultiProxyModel);\r\n    if (d->indexList.isEmpty()) {\r\n        return QAbstractItemModel::supportedDropActions();\r\n    }\r\n    return d->indexList[0].model->supportedDropActions();\r\n}\r\n\r\n#include \"moc_abstractmultiproxymodel.cpp\"\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n"
  },
  {
    "path": "liteidex/src/utils/folderview/abstractmultiproxymodel.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: abstractmultiproxymodel.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef ABSTRACTMULTIPROXYMODEL_H\n#define ABSTRACTMULTIPROXYMODEL_H\n\n#include <QAbstractItemModel>\n#include <QItemSelection>\n\nclass AbstractMultiProxyModelPrivate;\n\nstruct SourceModelIndex\n{\n    SourceModelIndex() : model(0)\n    {\n    }\n    SourceModelIndex(QAbstractItemModel *m, const QModelIndex &i) : model(m), index(i)\n    {\n    }\n    bool isValid() {\n        return model != 0 && index.isValid();\n    }\n    QAbstractItemModel *model;\n    QModelIndex         index;\n};\n\nclass AbstractMultiProxyModel : public QAbstractItemModel\n{\n    Q_OBJECT\n\npublic:\n    AbstractMultiProxyModel(QObject *parent = 0);\n    ~AbstractMultiProxyModel();\n\n    virtual bool addSourceModel(QAbstractItemModel *sourceModel, const QModelIndex &sourceIndex);\n    virtual bool removeSourceModel(QAbstractItemModel *sourceModel);\n    virtual void removeAllSourceModel();\n\n    QList<SourceModelIndex> sourceModelIndexlList() const;\n    QList<QAbstractItemModel*> sourceModelList() const;\n\n    virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const = 0;\n    virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const = 0;\n\n    virtual SourceModelIndex mapToSourceEx(const QModelIndex &proxyIndex) const = 0;\n    virtual QModelIndex mapFromSourceEx(QAbstractItemModel *sourceModel, const QModelIndex &sourceIndex) const = 0;\n\n    virtual QItemSelection mapSelectionToSource(const QItemSelection &selection) const;\n    virtual QItemSelection mapSelectionFromSource(const QItemSelection &selection) const;\n\n    bool submit();\n    void revert();\n\n    QVariant data(const QModelIndex &proxyIndex, int role = Qt::DisplayRole) const;\n    QVariant headerData(int section, Qt::Orientation orientation, int role) const;\n    QMap<int, QVariant> itemData(const QModelIndex &index) const;\n    Qt::ItemFlags flags(const QModelIndex &index) const;\n\n    bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);\n    bool setItemData(const QModelIndex& index, const QMap<int, QVariant> &roles);\n    bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole);\n\n    QModelIndex buddy(const QModelIndex &index) const;\n    bool canFetchMore(const QModelIndex &parent) const;\n    void fetchMore(const QModelIndex &parent);\n    void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);\n    QSize span(const QModelIndex &index) const;\n    bool hasChildren(const QModelIndex &parent = QModelIndex()) const;\n\n    QMimeData* mimeData(const QModelIndexList &indexes) const;\n    QStringList mimeTypes() const;\n    Qt::DropActions supportedDropActions() const;\n\nprotected:\n    AbstractMultiProxyModel(AbstractMultiProxyModelPrivate &, QObject *parent);\n\nprivate:\n    Q_DECLARE_PRIVATE(AbstractMultiProxyModel)\n    Q_DISABLE_COPY(AbstractMultiProxyModel)\n    Q_PRIVATE_SLOT(d_func(), void _q_sourceModelDestroyed())\nprotected:\n    AbstractMultiProxyModelPrivate *d_ptr;\n};\n\n\n#endif // ABSTRACTMULTIPROXYMODEL_H\n"
  },
  {
    "path": "liteidex/src/utils/folderview/abstractmultiproxymodel_p.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: abstractmultiproxymodel_p.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef ABSTRACTMULTIPROXYMODEL_P_H\n#define ABSTRACTMULTIPROXYMODEL_P_H\n\n#include <QAbstractItemModel>\n#include \"abstractmultiproxymodel.h\"\n\nclass AbstractMultiProxyModel;\nclass AbstractMultiProxyModelPrivate : public QObject //: public QAbstractItemModelPrivate\n{\n    Q_OBJECT\n    Q_DECLARE_PUBLIC(AbstractMultiProxyModel)\npublic:\n    AbstractMultiProxyModelPrivate() {}\n    QList<SourceModelIndex> indexList;\n    inline bool indexValid(const QModelIndex &index) const {\n         return (index.row() >= 0) && (index.column() >= 0) && (index.model() == q_func());\n    }\n    inline bool containsModel(QAbstractItemModel *model)\n    {\n        foreach (SourceModelIndex index, indexList) {\n            if (index.model == model) {\n                return true;\n            }\n        }\n        return false;\n    }\npublic slots:\n    virtual void _q_sourceModelDestroyed();\npublic:\n    QAbstractItemModel *q_ptr;\n};\n\n#endif // ABSTRACTMULTIPROXYMODEL_P_H\n\n"
  },
  {
    "path": "liteidex/src/utils/folderview/basefolderview.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: basefolderview.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"basefoldeview.h\"\n#include \"liteenvapi/liteenvapi.h\"\n#include \"terminalapi/terminalapi.h\"\n#include \"fileutil/fileutil.h\"\n#include \"folderdialog.h\"\n\n#include <QTreeView>\n#include <QMenu>\n#include <QAction>\n#include <QMessageBox>\n#include <QProcess>\n#include <QInputDialog>\n#include <QLineEdit>\n#include <QUrl>\n#include <QToolBar>\n#include <QFileSystemWatcher>\n#include <QFileDialog>\n#include <QHeaderView>\n#include <QProcess>\n#include <QProcessEnvironment>\n#include <QDesktopServices>\n#include <QApplication>\n#include <QClipboard>\n#include <QMimeData>\n#include <QUrl>\n#include <QFile>\n#include <QDebug>\n\n#ifdef Q_OS_WIN\n#include <windows.h>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n#endif\n\nBaseFolderView::BaseFolderView(LiteApi::IApplication *app, QWidget *parent) :\n    SymbolTreeView(parent), m_liteApp(app)\n{\n    this->setHeaderHidden(true);\n#if QT_VERSION >= 0x050000\n    this->header()->setSectionResizeMode(QHeaderView::ResizeToContents);\n#else\n    this->header()->setResizeMode(QHeaderView::ResizeToContents);\n#endif\n    this->header()->setStretchLastSection(false);\n    this->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);\n\n    m_openBundleAct = new QAction(tr(\"Open Application\"),this);\n    m_openInNewWindowAct = new QAction(tr(\"Open In New Window\"),this);\n    m_openEditorAct = new QAction(tr(\"Open File\"),this);\n    m_newFileAct = new QAction(tr(\"New File...\"),this);\n    m_newFileWizardAct = new QAction(tr(\"New File Wizard...\"),this);\n    m_renameFileAct = new QAction(tr(\"Rename File...\"),this);\n    m_removeFileAct = new QAction(tr(\"Delete File\"),this);\n\n    m_newFolderAct = new QAction(tr(\"New Folder...\"),this);\n    m_renameFolderAct = new QAction(tr(\"Rename Folder...\"),this);\n    m_removeFolderAct = new QAction(tr(\"Delete Folder\"),this);\n\n#if defined(Q_OS_WIN)\n    m_openExplorerAct = new QAction(tr(\"Show in Explorer\"),this);\n#elif defined(Q_OS_MAC)\n    m_openExplorerAct = new QAction(tr(\"Show in Finder\"),this);\n#else\n    m_openExplorerAct = new QAction(tr(\"Show Containing Folder\"),this);\n#endif\n\n#ifdef Q_OS_WIN\n    m_openShellAct = new QAction(tr(\"Open Command Prompt Here\"),this);\n#else\n    m_openShellAct = new QAction(tr(\"Open Terminal Here\"),this);\n#endif\n    m_openTerminalAct = new QAction(tr(\"Open in Integrated Terminal\"),this);\n\n    m_openFolderAct = new QAction(tr(\"Open Folder...\"),this);\n    m_reloadFolderAct = new QAction(tr(\"Reload Folder\"),this);\n    m_closeFolderAct = new QAction(tr(\"Close Folder\"),this);\n\n    m_closeAllFoldersAct = new QAction(tr(\"Close All Folders\"),this);\n\n    m_copyFileAct = new QAction(tr(\"Copy\"),this);\n    m_pasteFileAct = new QAction(tr(\"Paste\"),this);\n\n    m_copyFullPathToClipboardAct = new QAction(tr(\"Copy Path\"),this);\n\n    m_moveToTrashAct = new QAction(tr(\"Move To Trash\"),this);\n\n    connect(m_openBundleAct,SIGNAL(triggered()),this,SLOT(openBundle()));\n    connect(m_openInNewWindowAct,SIGNAL(triggered()),this,SLOT(openInNewWindow()));\n    connect(m_openEditorAct,SIGNAL(triggered()),this,SLOT(openEditor()));\n    connect(m_newFileAct,SIGNAL(triggered()),this,SLOT(newFile()));\n    connect(m_newFileWizardAct,SIGNAL(triggered()),this,SLOT(newFileWizard()));\n    connect(m_renameFileAct,SIGNAL(triggered()),this,SLOT(renameFile()));\n    connect(m_removeFileAct,SIGNAL(triggered()),this,SLOT(removeFile()));\n    connect(m_newFolderAct,SIGNAL(triggered()),this,SLOT(newFolder()));\n    connect(m_renameFolderAct,SIGNAL(triggered()),this,SLOT(renameFolder()));\n    connect(m_removeFolderAct,SIGNAL(triggered()),this,SLOT(removeFolder()));\n    connect(m_openShellAct,SIGNAL(triggered()),this,SLOT(openShell()));\n    connect(m_openTerminalAct,SIGNAL(triggered()),this,SLOT(openTerminal()));\n    connect(m_openExplorerAct,SIGNAL(triggered()),this,SLOT(openExplorer()));\n    connect(m_openFolderAct,SIGNAL(triggered()),this,SLOT(openFolder()));\n    connect(m_closeFolderAct,SIGNAL(triggered()),this,SLOT(closeFolder()));\n    connect(m_reloadFolderAct,SIGNAL(triggered()),this,SLOT(reloadFolder()));\n    connect(m_closeAllFoldersAct,SIGNAL(triggered()),this,SLOT(closeAllFolders()));\n    connect(m_copyFileAct,SIGNAL(triggered()),this,SLOT(copyFile()));\n    connect(m_pasteFileAct,SIGNAL(triggered()),this,SLOT(pasteFile()));\n    connect(m_copyFullPathToClipboardAct,SIGNAL(triggered()),this,SLOT(copyFullPathToClipboard()));\n    connect(m_moveToTrashAct,SIGNAL(triggered()),this,SLOT(moveToTrash()));\n\n    m_openWithMenu = 0;\n}\n\nQDir BaseFolderView::contextDir() const\n{\n    if (m_contextInfo.isDir()) {\n        return m_contextInfo.filePath();\n    }\n    return m_contextInfo.dir();\n}\n\nQFileInfo BaseFolderView::contextFileInfo() const\n{\n    return m_contextInfo;\n}\n\nbool BaseFolderView::canMoveToTrash() const\n{\n    return FileUtil::hasTrash();\n}\n\nvoid BaseFolderView::openBundle()\n{\n    if (m_contextInfo.isBundle()) {\n        if (QFileInfo(\"/usr/bin/open\").exists()) {\n            QStringList args;\n            args << m_contextInfo.filePath();\n            QProcess::execute(QLatin1String(\"/usr/bin/open\"), args);\n        }\n    }\n}\n\nvoid BaseFolderView::openInNewWindow()\n{\n    if (m_contextInfo.isDir()) {\n        m_liteApp->fileManager()->openFolderInNewWindow(m_contextInfo.filePath());\n    }\n}\n\nvoid BaseFolderView::openEditor()\n{\n    if (m_contextInfo.isFile()) {\n        m_liteApp->fileManager()->openEditor(m_contextInfo.filePath());\n    }\n}\n\nvoid BaseFolderView::newFile()\n{\n    QDir dir = contextDir();\n\n    CreateFileDialog dlg(m_liteApp->mainWindow());\n    dlg.setDirectory(dir.path());\n    if (dlg.exec() == QDialog::Rejected) {\n        return;\n    }\n    QString fileName = dlg.getFileName();\n    if (!fileName.isEmpty()) {\n        QString filePath = QFileInfo(dir,fileName).filePath();\n        if (QFile::exists(filePath)) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Create File\"),\n                                     tr(\"A file with that name already exists!\"));\n        } else {\n            QFile file(filePath);\n            if (file.open(QIODevice::WriteOnly)) {\n                file.close();\n                if (dlg.isOpenEditor()) {\n                    m_liteApp->fileManager()->openEditor(filePath,true);\n                }\n            } else {\n                QMessageBox::information(m_liteApp->mainWindow(),tr(\"Create File\"),\n                                         tr(\"Failed to create the file!\"));\n            }\n        }\n    }\n}\n\nvoid BaseFolderView::newFileWizard()\n{\n    QString filePath;\n    QString projPath;\n    QFileInfo info = m_contextInfo;\n    QDir dir = contextDir();\n    if (!info.isFile()) {\n        filePath = dir.absolutePath();\n        projPath = dir.absolutePath();\n    } else {\n        filePath = dir.absolutePath();\n        dir.cdUp();\n        projPath = dir.absolutePath();\n    }\n    m_liteApp->fileManager()->execFileWizard(projPath,filePath);\n}\n\nvoid BaseFolderView::renameFile()\n{\n    QFileInfo info = m_contextInfo;\n    if (!info.isFile()) {\n        return;\n    }\n    QString fileName = QInputDialog::getText(m_liteApp->mainWindow(),\n                                             tr(\"Rename File\"),tr(\"New Name:\"),\n                                             QLineEdit::Normal,info.fileName());\n    if (!fileName.isEmpty() && fileName != info.fileName()) {\n        QDir dir = contextDir();\n#ifdef Q_OS_WIN\n        if (!MoveFileW(info.filePath().toStdWString().c_str(),QFileInfo(dir,fileName).filePath().toStdWString().c_str())) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Rename File\"),\n                                     tr(\"Failed to rename the file!\"));\n        }\n#else\n        if (!QFile::rename(info.filePath(),QFileInfo(dir,fileName).filePath())) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Rename File\"),\n                                     tr(\"Failed to rename the file!\"));\n        }\n#endif\n    }\n}\n\nvoid BaseFolderView::removeFile()\n{\n\n//    QFileInfo info = m_contextInfo;\n//    if (!info.isFile()) {\n//        return;\n//    }\n\n//    int ret = QMessageBox::question(m_liteApp->mainWindow(),tr(\"Delete File\"),\n//                          tr(\"Are you sure that you want to permanently delete this file?\")\n//                          +\"\\n\"+info.filePath(),\n//                          QMessageBox::Yes | QMessageBox::No, QMessageBox::No);\n//    if (ret == QMessageBox::Yes) {\n//        if (!QFile::remove(info.filePath())) {\n//            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Delete File\"),\n//                                     tr(\"Failed to delete the file!\"));\n//        }\n//    }\n}\n\nvoid BaseFolderView::newFolder()\n{\n    QDir dir = contextDir();\n\n    CreateDirDialog dlg(m_liteApp->mainWindow());\n    dlg.setDirectory(dir.path());\n    if (dlg.exec() == QDialog::Rejected) {\n        return;\n    }\n\n    QString folderName = dlg.getDirName();\n    if (!folderName.isEmpty()) {\n        if (!dir.entryList(QStringList() << folderName,QDir::Dirs).isEmpty()) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Create Folder\"),\n                                     tr(\"A folder with that name already exists!\"));\n        } else if (!dir.mkpath(folderName)) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Create Folder\"),\n                                     tr(\"Failed to create the folder!\"));\n        }\n    }\n}\n\nvoid BaseFolderView::renameFolder()\n{\n    QFileInfo info = m_contextInfo;\n    if (!info.isDir()) {\n        return;\n    }\n\n    QString folderName = QInputDialog::getText(m_liteApp->mainWindow(),\n                                               tr(\"Rename Folder\"),tr(\"Folder Name\"),\n                                               QLineEdit::Normal,info.fileName());\n    if (!folderName.isEmpty() && folderName != info.fileName()) {\n        QDir dir = contextDir();\n        dir.cdUp();\n#ifdef Q_OS_WIN\n        QString _old = info.filePath();\n        QString _new = dir.path()+\"/\"+folderName;\n        if (!MoveFileW(_old.toStdWString().c_str(),_new.toStdWString().c_str())) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Rename Folder\"),\n                                     tr(\"Failed to rename the folder!\"));\n        }\n#else\n        if (!dir.rename(info.fileName(),folderName)) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Rename Folder\"),\n                                     tr(\"Failed to rename the folder!\"));\n        }\n#endif\n    }\n}\n\nvoid BaseFolderView::removeFolder()\n{\n    QFileInfo info = m_contextInfo;\n    if (!info.isDir()) {\n        return;\n    }\n\n    int ret = QMessageBox::warning(m_liteApp->mainWindow(),tr(\"Delete Folder\"),\n                          tr(\"Are you sure that you want to permanently delete this folder and all of its contents?\")\n                          +\"\\n\"+info.filePath(),\n                          QMessageBox::Yes | QMessageBox::No, QMessageBox::No);\n    if (ret == QMessageBox::Yes) {\n        QDir dir = info.dir();\n        if (!dir.rmdir(info.fileName())) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Delete Folder\"),\n                                     tr(\"Failed to delete the folder!\"));\n        }\n    }\n}\n\nvoid BaseFolderView::openExplorer()\n{\n    FileUtil::openInExplorer(contextFileInfo().filePath());\n}\n\nvoid BaseFolderView::openTerminal()\n{\n    LiteApi::ITerminal *term = LiteApi::getTerminalManager(m_liteApp);\n    if (term) {\n        term->openDefaultTerminal(contextDir().path());\n    }\n}\n\nvoid BaseFolderView::openFolder()\n{\n\n}\n\nvoid BaseFolderView::closeFolder()\n{\n}\n\nvoid BaseFolderView::reloadFolder()\n{\n\n}\n\nvoid BaseFolderView::closeAllFolders()\n{\n}\n\nvoid BaseFolderView::copyFile()\n{\n    QClipboard *clip = qApp->clipboard();\n    QMimeData *data = new QMimeData();\n\n    QList<QUrl> urls;\n    QModelIndexList items = this->selectionCopyOrRemoveList();\n    if (!items.isEmpty()) {\n        foreach (QModelIndex item, items) {\n            urls << QUrl::fromLocalFile(this->fileInfo(item).filePath());\n        }\n    } else {\n        QFileInfo info = m_contextInfo;\n        urls << QUrl::fromLocalFile(info.filePath());\n    }\n    data->setUrls(urls);\n    clip->setMimeData(data);\n}\n\n//static bool copy_dir(const QString &src, const QString &dest)\n//{\n//    QDir dir(src);\n//    QDir destDir(dest);\n//    foreach(QFileInfo info, dir.entryInfoList(QDir::Dirs|QDir::Files|QDir::NoDotAndDotDot)) {\n//        if (info.isFile() && !info.isSymLink()) {\n//            QFile::copy(info.filePath(), QFileInfo(destDir,info.fileName()).filePath());\n//        } else if (info.isDir()) {\n//            destDir.mkdir(info.fileName());\n//            if (QFileInfo(destDir,info.fileName()).isDir()) {\n//                copy_dir(info.filePath(),QFileInfo(destDir,info.fileName()).filePath());\n//            }\n//        }\n//    }\n//    return true;\n//}\n\nbool BaseFolderView::copy_dir(const QString &src, const QString &dest_root, const QString &newName)\n{\n    QDir dir(src);\n    QDir destDir(dest_root);\n    QString name = QFileInfo(src).fileName();\n    if (!newName.isEmpty()) {\n        name = newName;\n    }\n    destDir.mkdir(name);\n    if (!destDir.cd(name)) {\n        m_liteApp->appendLog(\"FolderView\",QString(\"copy dir %1 false!\").arg(src),true);\n        return false;\n    }\n    foreach(QFileInfo info, dir.entryInfoList(QDir::Dirs|QDir::Files|QDir::NoDotAndDotDot)) {\n        if (info.isFile() && !info.isSymLink()) {\n            bool b = QFile::copy(info.filePath(), QFileInfo(destDir,info.fileName()).filePath());\n            if (!b) {\n                m_liteApp->appendLog(\"FolderView\",QString(\"copy file %1=>%2 false!\").arg(info.filePath()).arg(destDir.absolutePath()),true);\n            }\n        } else if (info.isDir()) {\n            copy_dir(info.filePath(),destDir.absolutePath(),\"\");\n        }\n    }\n    return true;\n}\n\nvoid BaseFolderView::pasteFile()\n{\n    QClipboard *clip = qApp->clipboard();\n    const QMimeData *data =  clip->mimeData();\n    if (!data) {\n        return;\n    }\n    if (!data->hasUrls()) {\n        return;\n    }\n    QDir dir = contextDir();\n    QString dstPath = QFileInfo(dir.absolutePath()).canonicalFilePath();\n    int allflag = 0;\n    foreach (QUrl url, data->urls()) {\n        if (!url.isLocalFile()) {\n            continue;\n        }\n        QString fileName = url.toLocalFile();\n        QFileInfo orginfo(QDir::cleanPath(fileName));\n        if (!orginfo.exists()) {\n            continue;\n        }\n\n        if(orginfo.isDir() && orginfo.canonicalPath() != dstPath) {\n            QString chkPath = QDir::cleanPath(orginfo.canonicalFilePath());\n            if (chkPath == dstPath || dstPath.startsWith(chkPath+\"/\")) {\n                m_liteApp->appendLog(\"FolderView\",QString(\"You can't paste \\\"%1\\\" at this location because you can't paste an item into itselft.\").arg(chkPath),true);\n                continue;\n            }\n            if (QFileInfo(dir,orginfo.fileName()).exists()){\n                if (chkPath.startsWith(dstPath+\"/\"+orginfo.fileName()+\"/\")) {\n                    m_liteApp->appendLog(\"FolderView\",QString(\"The folder \\\"%1\\\" can't be replaced by an item it contains.\").arg(chkPath),true);\n                    continue;\n                }\n            }\n        }\n\n\n        QString dstName = orginfo.fileName();\n        QString dstFileName = orginfo.canonicalFilePath();\n        // check Duplicate\n        if (orginfo.canonicalPath() == dstPath) {\n            int num = 0;\n            while (QFileInfo(dir,dstName).exists()) {\n                dstName = orginfo.baseName()+\" copy\";\n                if (num > 0) {\n                    dstName += \" \"+QString::number(num);\n                }\n                if (!orginfo.completeSuffix().isEmpty()) {\n                    dstName += \".\"+orginfo.completeSuffix();\n                }\n                num++;\n            }\n            //upadte filename\n            dstFileName = QFileInfo(dir,dstName).filePath();\n        }\n\n        // check over name\n        int flag = 0;\n        if (QFileInfo(dir,dstName).exists()) {\n            if (allflag == 0) {\n                QMessageBox msgbox;\n                msgbox.setIcon(QMessageBox::Question);\n                msgbox.setInformativeText(QString(tr(\"An item \\\"%1\\\" already exists in this location. Do you want to replace it and move old item to trash?\")).arg(dstName));\n                QPushButton *stop = msgbox.addButton(tr(\"Stop\"), QMessageBox::RejectRole);\n                QPushButton *keepBoth = msgbox.addButton(tr(\"Keep Both\"), QMessageBox::ActionRole);\n                QPushButton *keepBothAll = msgbox.addButton(tr(\"Keep Both All\"), QMessageBox::ActionRole);\n                QPushButton *replace = msgbox.addButton(tr(\"Replace\"), QMessageBox::ActionRole);\n                QPushButton *replaceAll = msgbox.addButton(tr(\"Replace All\"), QMessageBox::ActionRole);\n                msgbox.setDefaultButton(stop);\n                int ret = msgbox.exec();\n                //stop button\n                if (ret == QMessageBox::Rejected) {\n                    break;\n                }\n                QPushButton *btn = (QPushButton*)msgbox.clickedButton();\n                if (btn == keepBoth) {\n                    flag = 1;\n                } else if (btn == keepBothAll) {\n                    allflag = 1;\n                    flag = 1;\n                } else if (btn == replace) {\n                    flag = 2;\n                } else if (btn == replaceAll) {\n                    allflag = 2;\n                    flag = 2;\n                }\n            } else {\n                flag = allflag;\n            }\n        }\n        if (flag == 1) {\n            int num = 0;\n            while (QFileInfo(dir,dstName).exists()) {\n                dstName = orginfo.baseName();\n                if (num > 0) {\n                    dstName += \" \"+QString::number(num);\n                }\n                if (!orginfo.completeSuffix().isEmpty()) {\n                    dstName += \".\"+orginfo.completeSuffix();\n                }\n                num++;\n            }\n            //upadte filename\n            dstFileName = QFileInfo(dir,dstName).filePath();\n        } else if (flag == 2) {\n            FileUtil::moveToTrash(QFileInfo(dir,dstName).filePath());\n        }\n\n        if (orginfo.isFile()) {\n            bool b = QFile::copy(fileName,QFileInfo(dir,dstName).filePath());\n            if (!b) {\n                m_liteApp->appendLog(\"FolderView\",QString(\"cannot paste file %1\").arg(fileName),true);\n            }\n        } else if(orginfo.isDir()) {\n            copy_dir(orginfo.filePath(),dstPath,dstName);\n        }\n        qApp->processEvents();\n    }\n}\n\nbool BaseFolderView::canPasteFile()\n{\n    QClipboard *clip = qApp->clipboard();\n    const QMimeData *data =  clip->mimeData();\n    if (!data) {\n        return false;\n    }\n    if (!data->hasUrls()) {\n        return false;\n    }\n    foreach (QUrl url, data->urls()) {\n        if (url.isLocalFile()) {\n            return true;\n        }\n    }\n    return false;\n}\n\nvoid BaseFolderView::copyFullPathToClipboard()\n{\n    QModelIndexList indexs = this->selectionCopyOrRemoveList();\n    QStringList fileList;\n    foreach (QModelIndex index, indexs) {\n        QFileInfo info = this->fileInfo(index);\n        fileList << info.filePath();\n    }\n    if (fileList.isEmpty()) {\n        return;\n    }\n    QClipboard *clip = qApp->clipboard();\n    clip->setText(fileList.join(\"\\n\"));\n}\n\nvoid BaseFolderView::moveToTrash()\n{\n    QModelIndexList indexs = this->selectionCopyOrRemoveList();\n    QStringList fileList;\n    foreach (QModelIndex index, indexs) {\n        QFileInfo info = this->fileInfo(index);\n        fileList << info.filePath();\n    }\n    if (fileList.isEmpty()) {\n        return;\n    }\n    QString info;\n    int size = fileList.size();\n    if (size == 1) {\n        info = QString(tr(\"Are you sure that you want move to trash this item?\"))\n                +\"\\n\"+fileList.join(\"\\n\");\n    } else if (size < 6) {\n        info = QString(tr(\"Are you sure that you want move to trash %1 items?\")).arg(size)\n                +\"\\n\"+fileList.join(\"\\n\");\n    } else {\n        info = QString(tr(\"Are you sure that you want move to trash %1 items?\")).arg(size);\n    }\n\n    int ret = QMessageBox::question(m_liteApp->mainWindow(), tr(\"Move to Trash\"),info,\n                          QMessageBox::Yes | QMessageBox::No, QMessageBox::No);\n    if (ret == QMessageBox::Yes) {\n        foreach (QString filename, fileList) {\n            if (!FileUtil::moveToTrash(filename)) {\n                m_liteApp->appendLog(\"FolderView\",QString(\"cannot move file to trash \\\"%1\\\"\").arg(filename),true);\n            }\n        }\n    }\n}\n\nvoid BaseFolderView::openWithEditor()\n{\n    QAction *act = (QAction*)sender();\n    if (!act) {\n        return;\n    }\n    QString id = act->data().toString();\n    if (id.isEmpty()) {\n        return;\n    }\n    if (!m_contextInfo.isFile()) {\n        return;\n    }\n    m_liteApp->fileManager()->openEditorByFactory(m_contextInfo.filePath(),id);\n}\n\nvoid BaseFolderView::openWithSystemEditor()\n{\n    if (!m_contextInfo.isFile()) {\n        return;\n    }\n    QUrl url = QUrl::fromLocalFile(m_contextInfo.filePath());\n    if (!url.isValid()) {\n        return;\n    }\n    QDesktopServices::openUrl(url);\n}\n\nQMenu *BaseFolderView::openWithMenu()\n{\n    if (m_openWithMenu) {\n        return m_openWithMenu;\n    }\n    m_openWithMenu = new QMenu(tr(\"Open With\"),this);\n    foreach(LiteApi::IEditorFactory *factory, m_liteApp->editorManager()->factoryList()) {\n        QAction *act = new QAction(factory->displayName(),this);\n        act->setData(factory->id());\n        m_openWithMenu->addAction(act);\n        connect(act,SIGNAL(triggered()),this,SLOT(openWithEditor()));\n    }\n    QAction *act = new QAction(tr(\"System Editor\"),this);\n    m_openWithMenu->addAction(act);\n    connect(act,SIGNAL(triggered()),this,SLOT(openWithSystemEditor()));\n    return  m_openWithMenu;\n}\n\nQModelIndex BaseFolderView::findIndexForContext(const QString &/*filePath*/) const\n{\n    return QModelIndex();\n}\n\nvoid BaseFolderView::removeIndex(const QModelIndex &index)\n{\n\n}\n\nQFileInfo BaseFolderView::fileInfo(const QModelIndex &index) const\n{\n    return QFileInfo();\n}\n\nQModelIndexList BaseFolderView::selectionCopyOrRemoveList() const\n{\n    return QModelIndexList();\n}\n\nvoid BaseFolderView::openShell()\n{\n    QProcessEnvironment env = LiteApi::getCurrentEnvironment(m_liteApp);\n    FileUtil::openInShell(env, contextDir().path());\n}\n"
  },
  {
    "path": "liteidex/src/utils/folderview/basefoldeview.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: basefoldeview.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef BASEFOLDERVIEW_H\n#define BASEFOLDERVIEW_H\n\n#include \"liteapi/liteapi.h\"\n#include \"symboltreeview/symboltreeview.h\"\n#include <QTreeView>\n\nclass BaseFolderView : public SymbolTreeView\n{\n    Q_OBJECT\npublic:\n    explicit BaseFolderView(LiteApi::IApplication *app,QWidget *parent = 0);\n    QDir contextDir() const;\n    QFileInfo contextFileInfo() const;\n    bool canMoveToTrash() const;\nsignals:\n    void aboutToShowContextMenu(QMenu *menu, LiteApi::FILESYSTEM_CONTEXT_FLAG flag, const QFileInfo &info);\npublic slots:\n    virtual void openBundle();\n    virtual void openInNewWindow();\n    virtual void openEditor();\n    virtual void newFile();\n    virtual void newFileWizard();\n    virtual void renameFile();\n    virtual void removeFile();\n    virtual void newFolder();\n    virtual void renameFolder();\n    virtual void removeFolder();\n    virtual void openShell();\n    virtual void openExplorer();\n    virtual void openTerminal();\n    virtual void openFolder();\n    virtual void closeFolder();\n    virtual void reloadFolder();\n    virtual void closeAllFolders();\n    virtual void copyFile();\n    virtual void pasteFile();\n    virtual bool canPasteFile();\n    virtual void copyFullPathToClipboard();\n    virtual void moveToTrash();\n    virtual QMenu *openWithMenu();\n    void openWithEditor();\n    void openWithSystemEditor();\npublic:\n    virtual QModelIndex findIndexForContext(const QString &filePath) const;\n    virtual void removeIndex(const QModelIndex &index);\n    virtual QFileInfo fileInfo(const QModelIndex &index) const;\nprotected:\n    virtual QModelIndexList selectionCopyOrRemoveList() const;\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QFileInfo m_contextInfo;\n    QModelIndex m_contextIndex;\n    QAction *m_openInNewWindowAct;\n    QAction *m_openEditorAct;\n    QAction *m_newFileAct;\n    QAction *m_newFileWizardAct;\n    QAction *m_removeFileAct;\n    QAction *m_renameFileAct;\n    QAction *m_newFolderAct;\n    QAction *m_removeFolderAct;\n    QAction *m_renameFolderAct;\n    QAction *m_openShellAct;\n    QAction *m_openTerminalAct;\n    QAction *m_openExplorerAct;\n    QAction *m_openFolderAct;\n    QAction *m_closeFolderAct;\n    QAction *m_reloadFolderAct;\n    QAction *m_closeAllFoldersAct;\n    QAction *m_openBundleAct;\n    QAction *m_copyFileAct;\n    QAction *m_pasteFileAct;\n    QAction *m_copyFullPathToClipboardAct;\n    QAction *m_moveToTrashAct;\n    QMenu *m_openWithMenu;\n    bool copy_dir(const QString &src, const QString &dest_root, const QString &newName);\n};\n\n#endif // BASEFOLDERVIEW_H\n"
  },
  {
    "path": "liteidex/src/utils/folderview/dirsortfilterproxymodel.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: dirsortfilterproxymodel.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"dirsortfilterproxymodel.h\"\r\n#include <QFileSystemModel>\r\n#include <QFileInfo>\r\n#include <QDirModel>\r\n#include <QDateTime>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\n\r\n/* For sorting */\r\nstruct QDirSortItem\r\n{\r\n    mutable QString filename_cache;\r\n    mutable QString suffix_cache;\r\n    QFileInfo item;\r\n};\r\n\r\n\r\nclass QDirSortItemComparator\r\n{\r\n    int qt_cmp_si_sort_flags;\r\npublic:\r\n    QDirSortItemComparator(int flags) : qt_cmp_si_sort_flags(flags) {}\r\n    bool sort(const QDirSortItem &, const QDirSortItem &);\r\n};\r\n\r\nbool QDirSortItemComparator::sort(const QDirSortItem &n1, const QDirSortItem &n2)\r\n{\r\n    const QDirSortItem* f1 = &n1;\r\n    const QDirSortItem* f2 = &n2;\r\n\r\n    if ((qt_cmp_si_sort_flags & QDir::DirsFirst) && (f1->item.isDir() != f2->item.isDir()))\r\n        return f1->item.isDir();\r\n    if ((qt_cmp_si_sort_flags & QDir::DirsLast) && (f1->item.isDir() != f2->item.isDir()))\r\n        return !f1->item.isDir();\r\n\r\n    int r = 0;\r\n    int sortBy = (qt_cmp_si_sort_flags & QDir::SortByMask)\r\n                 | (qt_cmp_si_sort_flags & QDir::Type);\r\n\r\n    switch (sortBy) {\r\n      case QDir::Time:\r\n        r = f1->item.lastModified().secsTo(f2->item.lastModified());\r\n        break;\r\n      case QDir::Size:\r\n          r = int(qBound<qint64>(-1, f2->item.size() - f1->item.size(), 1));\r\n        break;\r\n      case QDir::Type:\r\n      {\r\n        bool ic = qt_cmp_si_sort_flags & QDir::IgnoreCase;\r\n\r\n        if (f1->suffix_cache.isNull())\r\n            f1->suffix_cache = ic ? f1->item.suffix().toLower()\r\n                               : f1->item.suffix();\r\n        if (f2->suffix_cache.isNull())\r\n            f2->suffix_cache = ic ? f2->item.suffix().toLower()\r\n                               : f2->item.suffix();\r\n\r\n        r = qt_cmp_si_sort_flags & QDir::LocaleAware\r\n            ? f1->suffix_cache.localeAwareCompare(f2->suffix_cache)\r\n            : f1->suffix_cache.compare(f2->suffix_cache);\r\n      }\r\n        break;\r\n      default:\r\n        ;\r\n    }\r\n\r\n    if (r == 0 && sortBy != QDir::Unsorted) {\r\n        // Still not sorted - sort by name\r\n        bool ic = qt_cmp_si_sort_flags & QDir::IgnoreCase;\r\n\r\n        if (f1->filename_cache.isNull())\r\n            f1->filename_cache = ic ? f1->item.fileName().toLower()\r\n                                    : f1->item.fileName();\r\n        if (f2->filename_cache.isNull())\r\n            f2->filename_cache = ic ? f2->item.fileName().toLower()\r\n                                    : f2->item.fileName();\r\n\r\n        r = qt_cmp_si_sort_flags & QDir::LocaleAware\r\n            ? f1->filename_cache.localeAwareCompare(f2->filename_cache)\r\n            : f1->filename_cache.compare(f2->filename_cache);\r\n    }\r\n    if (r == 0) // Enforce an order - the order the items appear in the array\r\n        r = (&n1) - (&n2);\r\n    if (qt_cmp_si_sort_flags & QDir::Reversed)\r\n        return r > 0;\r\n    return r < 0;\r\n}\r\n\r\n\r\nDirSortFilterProxyModel::DirSortFilterProxyModel(QObject *parent)\r\n    : QSortFilterProxyModel(parent), m_sorts(QDir::NoSort)\r\n{\r\n\r\n}\r\n\r\nvoid DirSortFilterProxyModel::setSorting(QDir::SortFlags sort)\r\n{\r\n    m_sorts = sort;\r\n}\r\n\r\nQDir::SortFlags DirSortFilterProxyModel::sorting() const\r\n{\r\n    return m_sorts;\r\n}\r\n\r\nbool DirSortFilterProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const\r\n{\r\n    QFileSystemModel *model = dynamic_cast<QFileSystemModel*>(this->sourceModel());\r\n    if (!model) {\r\n        return QSortFilterProxyModel::lessThan(left,right);\r\n    }\r\n    QDirSortItemComparator comp(m_sorts);\r\n    QDirSortItem n1;\r\n    QDirSortItem n2;\r\n    n1.item = model->fileInfo(left);\r\n    n2.item = model->fileInfo(right);\r\n    return comp.sort(n1,n2);\r\n}\r\n\r\n"
  },
  {
    "path": "liteidex/src/utils/folderview/dirsortfilterproxymodel.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: dirsortfilterproxymodel.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef DIRSORTFILTERPROXYMODEL_H\n#define DIRSORTFILTERPROXYMODEL_H\n\n#include <QSortFilterProxyModel>\n#include <QDir>\n\nclass DirSortFilterProxyModel : public QSortFilterProxyModel\n{\npublic:\n    DirSortFilterProxyModel(QObject *parent);\n    void setSorting(QDir::SortFlags sort);\n    QDir::SortFlags sorting() const;\nprotected:\n    virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const;\nprotected:\n    QDir::SortFlags m_sorts;\n};\n\n#endif // DIRSORTFILTERPROXYMODEL_H\n"
  },
  {
    "path": "liteidex/src/utils/folderview/filesystemmodelex.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filesystemmodelex.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"filesystemmodelex.h\"\n#include <QDateTime>\n#include <QLocale>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nQString FileSystemModelEx::fileSize(qint64 bytes)\n{\n    // According to the Si standard KB is 1000 bytes, KiB is 1024\n    // but on windows sizes are calculated by dividing by 1024 so we do what they do.\n    const qint64 kb = 1024;\n    const qint64 mb = 1024 * kb;\n    const qint64 gb = 1024 * mb;\n    const qint64 tb = 1024 * gb;\n    if (bytes >= tb)\n        return QFileSystemModel::tr(\"%1 TB\").arg(QLocale().toString(qreal(bytes) / tb, 'f', 3));\n    if (bytes >= gb)\n        return QFileSystemModel::tr(\"%1 GB\").arg(QLocale().toString(qreal(bytes) / gb, 'f', 2));\n    if (bytes >= mb)\n        return QFileSystemModel::tr(\"%1 MB\").arg(QLocale().toString(qreal(bytes) / mb, 'f', 1));\n    if (bytes >= kb)\n        return QFileSystemModel::tr(\"%1 KB\").arg(QLocale().toString(bytes / kb));\n    return QFileSystemModel::tr(\"%1 bytes\").arg(QLocale().toString(bytes));\n}\n\nvoid FileSystemModelEx::setShowDetails(bool b)\n{\n    emit layoutAboutToBeChanged();\n    m_isShowDetails = b;\n    emit layoutChanged();\n}\n\nbool FileSystemModelEx::isShowDetails() const\n{\n    return m_isShowDetails;\n}\n\nFileSystemModelEx::FileSystemModelEx(QObject *parent) :\n    QFileSystemModel(parent)\n{\n    m_isShowDetails = true;\n}\n\nint FileSystemModelEx::columnCount(const QModelIndex &parent) const\n{\n    if (m_isShowDetails) {\n        return QFileSystemModel::columnCount(parent);\n    }\n    return 1;\n}\nQVariant FileSystemModelEx::data(const QModelIndex &index, int role) const\n{\n    if (role == Qt::ToolTipRole) {\n        if (this->isDir(index)) {\n            return QDir::toNativeSeparators(this->filePath(index));\n        } else {\n            QFileInfo info = this->fileInfo(index);\n            return QString(\"%1\\n%2\\n%3\")\n                    .arg(QDir::toNativeSeparators(info.filePath()))\n                    .arg(fileSize(info.size()))\n                    .arg(info.lastModified().toString(Qt::SystemLocaleDate));\n        }\n    }\n    return QFileSystemModel::data(index,role);\n}\n\n\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/folderview/filesystemmodelex.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: filesystemmodelex.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FILESYSTEMMODELEX_H\n#define FILESYSTEMMODELEX_H\n\n#include <QFileSystemModel>\n#include <QSortFilterProxyModel>\n\nclass FileSystemModelEx : public QFileSystemModel\n{\n    Q_OBJECT\npublic:\n    explicit FileSystemModelEx(QObject *parent = 0);\n    int columnCount(const QModelIndex &parent) const;\n    QVariant data(const QModelIndex &index, int role) const;\n    void setShowDetails(bool b);\n    bool isShowDetails() const;\npublic:\n    friend class FolderListModel;\n    static QString fileSize(qint64 bytes);\npublic:\n    bool m_isShowDetails;\n};\n\nclass FileSystemProxyModel : public QSortFilterProxyModel\n{\npublic:\n    FileSystemProxyModel(QObject *parent) :\n        QSortFilterProxyModel(parent)\n    {\n    }\n    virtual bool lessThan( const QModelIndex & left, const QModelIndex & right ) const\n    {\n        QFileSystemModel *model = static_cast<QFileSystemModel*>(this->sourceModel());\n        QFileInfo l = model->fileInfo(left);\n        QFileInfo r = model->fileInfo(right);\n        if (l.isDir() && r.isFile()) {\n            return true;\n        } else if (l.isFile() && r.isDir()) {\n            return false;\n        }\n#ifdef Q_OS_WIN\n        if (l.filePath().length() <= 3 || r.filePath().length() <= 3) {\n            return l.filePath().at(0) < r.filePath().at(0);\n        }\n#endif\n        return (l.fileName().compare(r.fileName(),Qt::CaseInsensitive) < 0);\n    }\n    virtual bool filterAcceptsRow(int /*source_row*/, const QModelIndex &/*source_parent*/) const\n    {\n        return true;\n    }\n};\n\n\n#endif // FILESYSTEMMODELEX_H\n"
  },
  {
    "path": "liteidex/src/utils/folderview/folderdialog.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: folderdialog.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"folderdialog.h\"\n#include <QLineEdit>\n#include <QLabel>\n#include <QHBoxLayout>\n#include <QVBoxLayout>\n#include <QPushButton>\n#include <QGridLayout>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nCreateFileDialog::CreateFileDialog(QWidget *parent) :\n    QDialog(parent), m_bOpenEditor(false)\n{\n    this->setWindowTitle(tr(\"Create File\"));\n    QGridLayout *grid = new QGridLayout;\n    QLabel *label1 = new QLabel(tr(\"Directory:\"));\n    m_dirLabel = new QLabel();\n    QLabel *label2 = new QLabel(tr(\"File Name:\"));\n    m_fileNameEdit = new QLineEdit();\n    grid->addWidget(label1,0,0);\n    grid->addWidget(m_dirLabel,0,1);\n    grid->addWidget(label2,1,0);\n    grid->addWidget(m_fileNameEdit,1,1);\n\n    QHBoxLayout *hbox = new QHBoxLayout;\n    QPushButton *btn1 = new QPushButton(tr(\"Create\"));\n    QPushButton *btn2 = new QPushButton(tr(\"Create and Edit\"));\n    QPushButton *btn3 = new QPushButton(tr(\"Cancel\"));\n    hbox->addStretch();\n    hbox->addWidget(btn1);\n    hbox->addWidget(btn2);\n    hbox->addWidget(btn3);\n\n    QVBoxLayout *vbox = new QVBoxLayout;\n    vbox->addLayout(grid);\n    vbox->addStretch(0);\n    vbox->addLayout(hbox);\n    this->setLayout(vbox);\n\n    connect(btn1,SIGNAL(clicked()),this,SLOT(accept()));\n    connect(btn2,SIGNAL(clicked()),this,SLOT(createAndEdit()));\n    connect(btn3,SIGNAL(clicked()),this,SLOT(reject()));\n}\n\nvoid CreateFileDialog::setDirectory(const QString &path)\n{\n    m_dirLabel->setText(path);\n}\n\nQString CreateFileDialog::getFileName() const\n{\n    return m_fileNameEdit->text();\n}\n\nvoid CreateFileDialog::createAndEdit()\n{\n    m_bOpenEditor = true;\n    this->accept();\n}\n\nCreateDirDialog::CreateDirDialog(QWidget *parent) :\n    QDialog(parent)\n{\n    this->setWindowTitle(tr(\"Create Folder\"));\n    QGridLayout *grid = new QGridLayout;\n    QLabel *label1 = new QLabel(tr(\"Directory:\"));\n    m_dirLabel = new QLabel();\n    QLabel *label2 = new QLabel(tr(\"Dir Name:\"));\n    m_dirNameEdit = new QLineEdit();\n    grid->addWidget(label1,0,0);\n    grid->addWidget(m_dirLabel,0,1);\n    grid->addWidget(label2,1,0);\n    grid->addWidget(m_dirNameEdit,1,1);\n\n    QHBoxLayout *hbox = new QHBoxLayout;\n    QPushButton *btn1 = new QPushButton(tr(\"Create\"));\n    QPushButton *btn2 = new QPushButton(tr(\"Cancel\"));\n    hbox->addStretch();\n    hbox->addWidget(btn1);\n    hbox->addWidget(btn2);\n\n    QVBoxLayout *vbox = new QVBoxLayout;\n    vbox->addLayout(grid);\n    vbox->addStretch(0);\n    vbox->addLayout(hbox);\n    this->setLayout(vbox);\n\n    connect(btn1,SIGNAL(clicked()),this,SLOT(accept()));\n    connect(btn2,SIGNAL(clicked()),this,SLOT(reject()));\n}\n\nvoid CreateDirDialog::setDirectory(const QString &path)\n{\n    m_dirLabel->setText(path);\n}\n\nQString CreateDirDialog::getDirName() const\n{\n    return m_dirNameEdit->text();\n}\n"
  },
  {
    "path": "liteidex/src/utils/folderview/folderdialog.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: folderdialog.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FOLDERDIALOG_H\n#define FOLDERDIALOG_H\n\n#include <QDialog>\n\nclass QLineEdit;\nclass QLabel;\nclass CreateFileDialog : public QDialog\n{\n    Q_OBJECT\npublic:\n    explicit CreateFileDialog(QWidget *parent = 0);\n    void setDirectory(const QString &path);\n    QString getFileName() const;\n    bool isOpenEditor() const { return m_bOpenEditor; }\nprotected slots:\n    void createAndEdit();\nprotected:\n    bool m_bOpenEditor;\n    QLabel    *m_dirLabel;\n    QLineEdit *m_fileNameEdit;\n};\n\nclass CreateDirDialog : public QDialog\n{\n    Q_OBJECT\npublic:\n    explicit CreateDirDialog(QWidget *parent = 0);\n    void setDirectory(const QString &path);\n    QString getDirName() const;\nprotected:\n    QLabel    *m_dirLabel;\n    QLineEdit *m_dirNameEdit;\n};\n\n#endif // FOLDERDIALOG_H\n"
  },
  {
    "path": "liteidex/src/utils/folderview/folderlistmodel.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: folderlistmodel.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"folderlistmodel.h\"\n#include \"filesystemmodelex.h\"\n#include <QFileSystemWatcher>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nFolderListModel::FolderListModel(QObject *parent) :\n    QAbstractItemModel(parent)\n{\n    ignoreNextLayoutAboutToBeChanged = false;\n    ignoreNextLayoutChanged = false;\n    m_filters = QDir::AllEntries | QDir::NoDotAndDotDot | QDir::AllDirs;\n    m_resolveSymlinks = false;\n    m_nameFilterDisables = true;\n    m_bWatcherRoot = false;\n}\n\nFolderListModel::~FolderListModel()\n{\n    clear();\n}\n\nvoid FolderListModel::clear()\n{\n    if (m_modelList.isEmpty()) {\n        return;\n    }\n    this->beginRemoveRows(QModelIndex(),0,m_modelList.size());\n    this->removeRows(0,m_modelList.size());\n    if (m_bWatcherRoot) {\n        foreach (SourceModel s, m_modelList) {\n            m_watcher->removePath(s.watchPath);\n            delete s.model;\n        }\n    }\n    m_modelList.clear();\n    m_indexMap.clear();\n    this->endRemoveRows();\n}\n\nQModelIndex FolderListModel::addRootPath(const QString &path)\n{\n    if (!QDir(path).exists()) {\n        return QModelIndex();\n    }\n    FileSystemModelEx *model = new FileSystemModelEx(this);\n    model->setFilter(m_filters);\n    if (!m_nameFilters.isEmpty()) {\n        model->setNameFilters(m_nameFilters);\n    }\n    model->setNameFilterDisables(m_nameFilterDisables);\n    model->setResolveSymlinks(m_resolveSymlinks);\n    QModelIndex sourceIndex = model->setRootPath(path);\n    if (!sourceIndex.isValid()) {\n        return sourceIndex;\n    }\n    SourceModel m;\n    m.model = model;\n    m.rootPath = QDir::cleanPath(QDir::fromNativeSeparators(path));\n    m.watchPath = model->filePath(sourceIndex.parent());\n    if (m_bWatcherRoot) {\n        if (!m_watcher->directories().contains(m.watchPath)) {\n            m_watcher->addPath(m.watchPath);\n        }\n    }\n    m.rootSourceIndex = sourceIndex;\n    m.rootIndex = createIndex(m_modelList.size(),0,sourceIndex.internalPointer());\n    m_indexMap.insert(sourceIndex.internalId(),model);\n    m_modelList.append(m);\n\n    connect(model, SIGNAL(rowsAboutToBeInserted(const QModelIndex &, int, int)),\n            SLOT(sourceRowsAboutToBeInserted(const QModelIndex &, int, int)));\n    connect(model, SIGNAL(rowsInserted(const QModelIndex &, int, int)),\n            SLOT(sourceRowsInserted(const QModelIndex &, int, int)));\n    connect(model, SIGNAL(rowsAboutToBeRemoved(const QModelIndex &, int, int)),\n            SLOT(sourceRowsAboutToBeRemoved(const QModelIndex &, int, int)));\n    connect(model, SIGNAL(rowsRemoved(const QModelIndex &, int, int)),\n            SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));\n    connect(model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)),\n            SLOT(sourceRowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));\n    connect(model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)),\n            SLOT(sourceRowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));\n    connect(model, SIGNAL(columnsAboutToBeInserted(const QModelIndex &, int, int)),\n            SLOT(sourceColumnsAboutToBeInserted(const QModelIndex &, int, int)));\n    connect(model, SIGNAL(columnsInserted(const QModelIndex &, int, int)),\n            SLOT(sourceColumnsInserted(const QModelIndex &, int, int)));\n    connect(model, SIGNAL(columnsAboutToBeRemoved(const QModelIndex &, int, int)),\n            SLOT(sourceColumnsAboutToBeRemoved(const QModelIndex &, int, int)));\n    connect(model, SIGNAL(columnsRemoved(const QModelIndex &, int, int)),\n            SLOT(sourceColumnsRemoved(const QModelIndex &, int, int)));\n    connect(model, SIGNAL(columnsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)),\n            SLOT(sourceColumnsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));\n    connect(model, SIGNAL(columnsMoved(const QModelIndex &, int, int, const QModelIndex &, int)),\n            SLOT(sourceColumnsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));\n    connect(model, SIGNAL(modelAboutToBeReset()),\n            SLOT(sourceModelAboutToBeReset()));\n    connect(model, SIGNAL(modelReset()),\n            SLOT(sourceModelReset()));\n    connect(model, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),\n            SLOT(sourceDataChanged(const QModelIndex &, const QModelIndex &)));\n    connect(model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),\n            SLOT(sourceHeaderDataChanged(Qt::Orientation,int,int)));\n    connect(model, SIGNAL(layoutAboutToBeChanged()),\n            SLOT(sourceLayoutAboutToBeChanged()));\n    connect(model, SIGNAL(layoutChanged()),\n            SLOT(sourceLayoutChanged()));\n    return m.rootIndex;\n}\n\nvoid FolderListModel::removeRootPath(const QString &path)\n{\n    QString rootPath = QDir::cleanPath(QDir::fromNativeSeparators(path));\n    QModelIndex index;\n    foreach (SourceModel s, m_modelList) {\n        if (s.rootPath == rootPath) {\n            index = s.rootIndex;\n            break;\n        }\n    }\n    if (index.isValid()) {\n        removeRoot(index);\n    }\n}\n\nvoid FolderListModel::removeRoot(const QModelIndex &index)\n{\n    QMutableListIterator<SourceModel> i(m_modelList);\n    while (i.hasNext()) {\n        SourceModel s = i.next();\n        if (s.rootIndex.internalId() == index.internalId()) {\n            this->beginRemoveRows(QModelIndex(),index.row(),index.row());\n            if (m_bWatcherRoot) {\n                int n = 0;\n                foreach (SourceModel m, m_modelList) {\n                    if (m.watchPath == s.watchPath) {\n                        n++;\n                    }\n                }\n                if (n <= 1) {\n                    m_watcher->removePath(s.watchPath);\n                }\n            }\n            this->removeRow(index.row());\n            i.remove();\n            this->endRemoveRows();\n            QMutableHashIterator<qint64,QAbstractItemModel*> i2(m_indexMap);\n            while (i2.hasNext()) {\n                i2.next();\n                if (i2.value() == s.model) {\n                    i2.remove();\n                }\n            }\n            delete s.model;            \n            break;\n        }\n    }\n}\n\nvoid FolderListModel::reloadRoot(const QModelIndex &index)\n{\n    QMutableListIterator<SourceModel> i(m_modelList);\n    int count = 0;\n    while (i.hasNext()) {\n        SourceModel s = i.next();\n        if (s.rootIndex.internalId() == index.internalId()) {\n            QModelIndex sourceIndex = s.model->setRootPath(s.rootPath);\n            s.rootSourceIndex = sourceIndex;\n            s.rootIndex = createIndex(count,0,sourceIndex.internalPointer());\n            m_indexMap.insert(sourceIndex.internalId(),s.model);\n            i.setValue(s);\n            break;\n        }\n        count++;\n    }\n}\n\nbool FolderListModel::isRootPath(const QString &path)\n{\n    QString rootPath = QDir::cleanPath(QDir::fromNativeSeparators(path));\n    foreach (SourceModel s, m_modelList) {\n        if (s.rootPath == rootPath) {\n            return true;\n        }\n    }\n    return false;\n}\n\nQList<QModelIndex> FolderListModel::rootIndexs() const\n{\n    QList<QModelIndex> indexs;\n    foreach (SourceModel s, m_modelList) {\n        indexs.append(s.rootIndex);\n    }\n    return indexs;\n}\n\nQStringList FolderListModel::rootPathList() const\n{\n    QStringList paths;\n    foreach (SourceModel s, m_modelList) {\n        paths.append(s.rootPath);\n    }\n    return paths;\n}\n\nQFileSystemModel *FolderListModel::findSource(const QModelIndex &proxyIndex) const\n{\n    return (QFileSystemModel*)m_indexMap[proxyIndex.internalId()];\n}\n\nQItemSelection FolderListModel::mapSelectionToSource(const QItemSelection &proxySelection) const\n{\n    QModelIndexList proxyIndexes = proxySelection.indexes();\n    QItemSelection sourceSelection;\n    for (int i = 0; i < proxyIndexes.size(); ++i) {\n        const QModelIndex proxyIdx = mapToSource(proxyIndexes.at(i));\n        if (!proxyIdx.isValid())\n            continue;\n        sourceSelection << QItemSelectionRange(proxyIdx);\n    }\n    return sourceSelection;\n}\n\nQItemSelection FolderListModel::mapSelectionFromSource(const QItemSelection &sourceSelection) const\n{\n    QModelIndexList sourceIndexes = sourceSelection.indexes();\n    QItemSelection proxySelection;\n    for (int i = 0; i < sourceIndexes.size(); ++i) {\n        const QModelIndex srcIdx = mapFromSource(sourceIndexes.at(i));\n        if (!srcIdx.isValid())\n            continue;\n        proxySelection << QItemSelectionRange(srcIdx);\n    }\n    return proxySelection;\n}\n\n\nQModelIndex FolderListModel::mapFromSource(const QModelIndex &sourceIndex) const\n{\n    if (!sourceIndex.isValid())\n        return QModelIndex();\n    int row = sourceIndex.row();\n    for (int i = 0; i < m_modelList.size(); i++) {\n        if (m_modelList[i].rootSourceIndex.internalId() == sourceIndex.internalId()) {\n            row = i;\n            break;\n        }\n    }\n    QModelIndex index = createIndex(row, sourceIndex.column(), sourceIndex.internalPointer());\n    m_indexMap.insert(sourceIndex.internalId(),(QAbstractItemModel*)sourceIndex.model());\n    return index;\n}\n\nQModelIndex FolderListModel::mapToSource(const QModelIndex &proxyIndex) const\n{\n    if (!proxyIndex.isValid()) {\n        return QModelIndex();\n    }\n    int row = proxyIndex.row();\n    for (int i = 0; i < m_modelList.size(); i++) {\n        if (m_modelList[i].rootIndex.internalId() == proxyIndex.internalId()) {\n            row = i;\n            break;\n        }\n    }\n    FileSystemModelEx *model = (FileSystemModelEx*)findSource(proxyIndex);\n    return model->createIndex(row, proxyIndex.column(), proxyIndex.internalPointer());\n}\n\nQString FolderListModel::filePath(const QModelIndex &index) const\n{\n    if (!index.isValid()) {\n        return QString();\n    }\n    QModelIndex sourceIndex = mapToSource(index);\n    return ((FileSystemModelEx*)sourceIndex.model())->filePath(sourceIndex);\n}\n\nQString FolderListModel::fileName(const QModelIndex &index) const\n{\n    if (!index.isValid()) {\n        return QString();\n    }\n    QModelIndex sourceIndex = mapToSource(index);\n    return ((FileSystemModelEx*)sourceIndex.model())->fileName(sourceIndex);\n}\n\nQFileInfo FolderListModel::fileInfo(const QModelIndex &index) const\n{\n    if (!index.isValid()) {\n        return QFileInfo();\n    }\n    QModelIndex sourceIndex = mapToSource(index);\n    return ((FileSystemModelEx*)sourceIndex.model())->fileInfo(sourceIndex);\n}\n\nbool FolderListModel::isDir(const QModelIndex &index) const\n{\n    if (!index.isValid()) {\n        return true;\n    }\n    QModelIndex sourceIndex = mapToSource(index);\n    return ((FileSystemModelEx*)sourceIndex.model())->isDir(sourceIndex);\n}\n\nQModelIndex FolderListModel::mkdir(const QModelIndex &parent, const QString &name)\n{\n    if (!parent.isValid()) {\n        return QModelIndex();\n    }\n    QModelIndex sourceIndex = mapToSource(parent);\n    return ((FileSystemModelEx*)sourceIndex.model())->mkdir(sourceIndex,name);\n}\n\nbool FolderListModel::rmdir(const QModelIndex &index)\n{\n    if (!index.isValid()) {\n        return false;\n    }\n    QModelIndex sourceIndex = mapToSource(index);\n    return ((FileSystemModelEx*)sourceIndex.model())->rmdir(sourceIndex);\n}\n\nbool FolderListModel::remove(const QModelIndex &index)\n{\n    if (!index.isValid()) {\n        return false;\n    }\n    QModelIndex sourceIndex = mapToSource(index);\n    return ((FileSystemModelEx*)sourceIndex.model())->remove(sourceIndex);\n}\n\nvoid FolderListModel::setFilter(QDir::Filters filters)\n{\n    m_filters = filters;\n    foreach (SourceModel s, m_modelList) {\n        s.model->setFilter(filters);\n    }\n}\n\nQDir::Filters FolderListModel::filter() const\n{\n    return m_filters;\n}\n\nvoid FolderListModel::setNameFilters(const QStringList &filters)\n{\n    m_nameFilters = filters;\n    foreach (SourceModel s, m_modelList) {\n        s.model->setNameFilters(filters);\n    }\n}\n\nQStringList FolderListModel::nameFilters() const\n{\n    return m_nameFilters;\n}\n\nvoid FolderListModel::setNameFilterDisables(bool enable)\n{\n    if (m_nameFilterDisables == enable) {\n        return;\n    }\n    m_nameFilterDisables = enable;\n    foreach (SourceModel s, m_modelList) {\n        s.model->setNameFilterDisables(enable);\n    }\n}\n\nbool FolderListModel::nameFilterDisables() const\n{\n    return m_nameFilterDisables;\n}\n\nvoid FolderListModel::setResolveSymlinks(bool enable)\n{\n    if (m_resolveSymlinks == enable) {\n        return;\n    }\n    m_resolveSymlinks = enable;\n    foreach (SourceModel s, m_modelList) {\n        s.model->setResolveSymlinks(enable);\n    }\n}\n\nbool FolderListModel::resolveSymlinks() const\n{\n    return m_resolveSymlinks;\n}\n\nbool FolderListModel::isRootIndex(const QModelIndex &index) const\n{\n    foreach (SourceModel s, m_modelList) {\n        if (s.rootIndex.internalId() == index.internalId()) {\n            return true;\n        }\n    }\n    return false;\n}\n\nvoid FolderListModel::setWatcherRoot(bool b)\n{\n    if (m_bWatcherRoot == b) {\n        return;\n    }\n    if (m_bWatcherRoot) {\n        if (!m_watcher) {\n            m_watcher = new QFileSystemWatcher(this);\n        }\n        connect(m_watcher,SIGNAL(directoryChanged(QString)),this,SLOT(directoryChanged(QString)));\n        QStringList paths;\n        foreach (SourceModel s, m_modelList) {\n            paths.append(s.watchPath);\n        }\n        paths.removeDuplicates();\n        m_watcher->addPaths(paths);\n    } else {\n        if (m_watcher) {\n            delete m_watcher;\n        }\n        m_watcher = 0;\n    }\n}\n\nbool FolderListModel::isWatcherRoot() const\n{\n    return m_bWatcherRoot;\n}\n\nQList<QModelIndex> FolderListModel::indexForPath(const QString &path) const\n{\n    QList<QModelIndex> indexs;\n    QString findPath = QDir::cleanPath(QDir::fromNativeSeparators(path));\n    foreach (SourceModel s, m_modelList) {\n        if (!findPath.startsWith(s.rootPath)) {\n            continue;\n        }\n        QModelIndex sourceIndex = s.model->index(path);\n        if (sourceIndex.isValid()) {\n            indexs.append(this->mapFromSource(sourceIndex));\n        }\n    }\n    return indexs;\n}\n\nQt::DropActions FolderListModel::supportedDragActions() const\n{\n    return Qt::MoveAction | Qt::CopyAction;\n}\n\nbool FolderListModel::isRootSourceIndex(const QModelIndex &sourceIndex) const\n{\n    foreach (SourceModel s, m_modelList) {\n        if (s.rootSourceIndex.internalId() == sourceIndex.internalId()) {\n            return true;\n        }\n    }\n    return false;\n}\n\nint FolderListModel::columnCount(const QModelIndex &/*parent*/) const\n{\n    return 1;\n//    if (!parent.isValid()) {\n//        if (!m_modelList.isEmpty()) {\n//            return m_modelList[0].model->columnCount(m_modelList[0].rootSourceIndex);\n//        }\n//        return 1;\n//    }\n//    QModelIndex sourceIndex = mapToSource(parent);\n//    return sourceIndex.model()->columnCount(sourceIndex);\n}\n\nQModelIndex FolderListModel::index(int row, int column, const QModelIndex &parent) const\n{\n    if (!hasIndex(row, column, parent))\n        return QModelIndex();\n    if (!parent.isValid()) {\n        QModelIndex sourceIndex = m_modelList[row].rootSourceIndex;\n        if (sourceIndex.column() != column) {\n            sourceIndex = sourceIndex.sibling(sourceIndex.row(),column);\n            m_indexMap.insert(sourceIndex.internalId(),m_modelList[row].model);\n        }\n        return createIndex(row,column,sourceIndex.internalPointer());\n    }\n    const QModelIndex sourceParent = mapToSource(parent);\n    const QModelIndex sourceIndex = sourceParent.model()->index(row, column, sourceParent);\n    Q_ASSERT(sourceIndex.isValid());\n    return mapFromSource(sourceIndex);\n}\n\nQModelIndex FolderListModel::parent(const QModelIndex &child) const\n{\n    Q_ASSERT(child.isValid() ? child.model() == this : true);\n    if (isRootIndex(child)) {\n        return QModelIndex();\n    }\n    const QModelIndex sourceIndex = mapToSource(child);\n    const QModelIndex sourceParent = sourceIndex.parent();\n    return mapFromSource(sourceParent);\n}\n\nint FolderListModel::rowCount(const QModelIndex &parent) const\n{\n    if (!parent.isValid()) {\n        return m_modelList.size();\n    }\n    Q_ASSERT(parent.isValid() ? parent.model() == this : true);\n    QModelIndex sourceIndex = mapToSource(parent);\n    return sourceIndex.model()->rowCount(sourceIndex);\n}\n\nQVariant FolderListModel::data(const QModelIndex &proxyIndex, int role) const\n{\n    if (!proxyIndex.isValid()) {\n        return QVariant();\n    }\n    QModelIndex sourceIndex = mapToSource(proxyIndex);\n    return sourceIndex.model()->data(sourceIndex,role);\n}\n\n\nQVariant FolderListModel::headerData(int section, Qt::Orientation orientation, int role) const\n{\n    if (m_modelList.isEmpty()) {\n        return QVariant();\n    }\n    if (orientation == Qt::Horizontal) {\n        const QModelIndex proxyIndex = index(0, section);\n        QModelIndex sourceIndex = mapToSource(proxyIndex);\n        int sourceSection = sourceIndex.column();\n        return sourceIndex.model()->headerData(sourceSection,orientation,role);\n    } else {\n        const QModelIndex proxyIndex = index(section, 0);\n        QModelIndex sourceIndex = mapToSource(proxyIndex);\n        int sourceSection = sourceIndex.row();\n        return sourceIndex.model()->headerData(sourceSection,orientation,role);\n    }\n}\n\nQMap<int, QVariant> FolderListModel::itemData(const QModelIndex &proxyIndex) const\n{\n    return QAbstractItemModel::itemData(proxyIndex);\n}\n\nQt::ItemFlags FolderListModel::flags(const QModelIndex &index) const\n{\n    QModelIndex sourceIndex = mapToSource(index);\n    if (!sourceIndex.isValid()) {\n        return Qt::NoItemFlags;\n    }\n    return sourceIndex.model()->flags(sourceIndex);\n}\n\nbool FolderListModel::setData(const QModelIndex &index, const QVariant &value, int role)\n{\n    QModelIndex sourceIndex = mapToSource(index);\n    return ((QAbstractItemModel*)sourceIndex.model())->setData(sourceIndex,value,role);\n}\n\nbool FolderListModel::setItemData(const QModelIndex &index, const QMap< int, QVariant >& roles)\n{\n    return QAbstractItemModel::setItemData(index, roles);\n}\n\nbool FolderListModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role)\n{\n    if (orientation == Qt::Horizontal) {\n        const QModelIndex proxyIndex = index(0, section);\n        QModelIndex sourceIndex = mapToSource(proxyIndex);\n        int sourceSection = sourceIndex.column();\n        return ((QAbstractItemModel*)sourceIndex.model())->setHeaderData(sourceSection,orientation,value,role);\n    } else {\n        const QModelIndex proxyIndex = index(section, 0);\n        QModelIndex sourceIndex = mapToSource(proxyIndex);\n        int sourceSection = sourceIndex.row();\n        return ((QAbstractItemModel*)sourceIndex.model())->setHeaderData(sourceSection,orientation,value,role);\n    }\n}\n\nbool FolderListModel::insertColumns(int column, int count, const QModelIndex& parent)\n{\n    Q_ASSERT(parent.isValid() ? parent.model() == this : true);\n    QModelIndex sourceIndex = mapToSource(parent);\n    return ((QAbstractItemModel*)sourceIndex.model())->insertColumns(column, count, sourceIndex);\n}\n\n/*!\n    \\reimp\n */\nbool FolderListModel::insertRows(int row, int count, const QModelIndex& parent)\n{\n    Q_ASSERT(parent.isValid() ? parent.model() == this : true);\n    QModelIndex sourceIndex = mapToSource(parent);\n    return ((QAbstractItemModel*)sourceIndex.model())->insertRows(row, count, sourceIndex);\n}\n\nbool FolderListModel::removeColumns(int column, int count, const QModelIndex &parent)\n{\n    Q_ASSERT(parent.isValid() ? parent.model() == this : true);\n    QModelIndex sourceIndex = mapToSource(parent);\n    return ((QAbstractItemModel*)sourceIndex.model())->removeColumns(column, count, sourceIndex);\n}\n\nbool FolderListModel::removeRows(int row, int count, const QModelIndex &parent)\n{\n    Q_ASSERT(parent.isValid() ? parent.model() == this : true);\n    if (!parent.isValid()) {\n        return QAbstractItemModel::removeRows(row,count);\n    }\n    QModelIndex sourceIndex = mapToSource(parent);\n    return ((QAbstractItemModel*)sourceIndex.model())->removeRows(row, count, sourceIndex);\n}\n\nvoid FolderListModel::directoryChanged(const QString &path)\n{\n    if (!m_bWatcherRoot) {\n        return;\n    }\n    foreach(SourceModel s, m_modelList) {\n         if (s.watchPath == path && !QDir(s.rootPath).exists()) {\n              this->removeRoot(s.rootIndex);\n              break;\n         }\n    }\n}\n\nbool FolderListModel::canFetchMore(const QModelIndex &parent) const\n{\n    if (!parent.isValid()) {\n        return false;\n    }\n    QModelIndex sourceIndex = mapToSource(parent);\n    return sourceIndex.model()->canFetchMore(sourceIndex);\n}\n\nvoid FolderListModel::fetchMore(const QModelIndex &parent)\n{\n    if (!parent.isValid()) {\n        return;\n    }\n    QModelIndex sourceIndex = mapToSource(parent);\n    QAbstractItemModel *model = (QAbstractItemModel*)sourceIndex.model();\n    model->fetchMore(sourceIndex);\n}\n\nvoid FolderListModel::sort(int column, Qt::SortOrder order)\n{\n    foreach (SourceModel s, m_modelList) {\n        s.model->sort(column,order);\n    }\n}\n\nQSize FolderListModel::span(const QModelIndex &index) const\n{\n    if (!index.isValid()) {\n        return QAbstractItemModel::span(index);\n    }\n    QModelIndex sourceIndex = mapToSource(index);\n    return sourceIndex.model()->span(sourceIndex);\n}\n\nbool FolderListModel::hasChildren(const QModelIndex &parent) const\n{\n    if (!parent.isValid()) {\n        return m_modelList.size() > 0;\n    }\n    QModelIndex sourceIndex = mapToSource(parent);\n    return sourceIndex.model()->hasChildren(sourceIndex);\n}\n\nQModelIndex FolderListModel::buddy(const QModelIndex &index) const\n{\n    return index;\n}\n\nvoid FolderListModel::sourceColumnsAboutToBeInserted(const QModelIndex &parent, int start, int end)\n{\n    //Q_ASSERT(parent.isValid() ? parent.model() == m_model : true);\n    this->beginInsertColumns(mapFromSource(parent), start, end);\n}\n\nvoid FolderListModel::sourceColumnsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest)\n{\n    //Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == m_model : true);\n    //Q_ASSERT(destParent.isValid() ? destParent.model() == m_model : true);\n    this->beginMoveColumns(this->mapFromSource(sourceParent), sourceStart, sourceEnd, this->mapFromSource(destParent), dest);\n}\n\nvoid FolderListModel::sourceColumnsAboutToBeRemoved(const QModelIndex &parent, int start, int end)\n{\n    //Q_ASSERT(parent.isValid() ? parent.model() == m_model : true);\n    this->beginRemoveColumns(this->mapFromSource(parent), start, end);\n}\n\nvoid FolderListModel::sourceColumnsInserted(const QModelIndex &parent, int start, int end)\n{\n    //Q_ASSERT(parent.isValid() ? parent.model() == m_model : true);\n    Q_UNUSED(parent)\n    Q_UNUSED(start)\n    Q_UNUSED(end)\n    this->endInsertColumns();\n}\n\nvoid FolderListModel::sourceColumnsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest)\n{\n    //Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == m_model : true);\n    //Q_ASSERT(destParent.isValid() ? destParent.model() == m_model : true);\n    Q_UNUSED(sourceParent)\n    Q_UNUSED(sourceStart)\n    Q_UNUSED(sourceEnd)\n    Q_UNUSED(destParent)\n    Q_UNUSED(dest)\n    this->endMoveColumns();\n}\n\nvoid FolderListModel::sourceColumnsRemoved(const QModelIndex &parent, int start, int end)\n{\n    //Q_ASSERT(parent.isValid() ? parent.model() == m_model : true);\n    Q_UNUSED(parent)\n    Q_UNUSED(start)\n    Q_UNUSED(end)\n    this->endRemoveColumns();\n}\n\nvoid FolderListModel::sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)\n{\n    //Q_ASSERT(topLeft.isValid() ? topLeft.model() == m_model : true);\n    //Q_ASSERT(bottomRight.isValid() ? bottomRight.model() == m_model : true);\n    this->dataChanged(this->mapFromSource(topLeft), this->mapFromSource(bottomRight));\n}\n\nvoid FolderListModel::sourceHeaderDataChanged(Qt::Orientation orientation, int first, int last)\n{\n    this->headerDataChanged(orientation, first, last);\n}\n\nvoid FolderListModel::sourceLayoutAboutToBeChanged()\n{\n    if (ignoreNextLayoutAboutToBeChanged)\n        return;\n\n    foreach(const QPersistentModelIndex &proxyPersistentIndex, this->persistentIndexList()) {\n   //     qDebug() << proxyPersistentIndex << this->filePath(proxyPersistentIndex);\n        proxyIndexes << proxyPersistentIndex;\n//        Q_ASSERT(proxyPersistentIndex.isValid());\n        const QPersistentModelIndex srcPersistentIndex = this->mapToSource(proxyPersistentIndex);\n//        Q_ASSERT(srcPersistentIndex.isValid());\n        layoutChangePersistentIndexes << srcPersistentIndex;\n    }\n\n    this->layoutAboutToBeChanged();\n}\n\nvoid FolderListModel::sourceLayoutChanged()\n{\n    if (ignoreNextLayoutChanged)\n        return;\n\n    for (int i = 0; i < proxyIndexes.size(); ++i) {\n        this->changePersistentIndex(proxyIndexes.at(i), this->mapFromSource(layoutChangePersistentIndexes.at(i)));\n    }\n\n    layoutChangePersistentIndexes.clear();\n    proxyIndexes.clear();\n\n    this->layoutChanged();\n}\n\nvoid FolderListModel::sourceModelAboutToBeReset()\n{\n    this->beginResetModel();\n}\n\nvoid FolderListModel::sourceModelReset()\n{\n    this->endResetModel();\n}\n\nvoid FolderListModel::sourceRowsAboutToBeInserted(const QModelIndex &/*parent*/, int /*start*/, int /*end*/)\n{\n    //Q_ASSERT(parent.isValid() ? parent.model() == m_model : true);\n    //this->beginInsertRows(this->mapFromSource(parent), start, end);\n}\n\nvoid FolderListModel::sourceRowsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest)\n{\n    //Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == m_model : true);\n    //Q_ASSERT(destParent.isValid() ? destParent.model() == m_model : true);\n    this->beginMoveRows(this->mapFromSource(sourceParent), sourceStart, sourceEnd, this->mapFromSource(destParent), dest);\n}\n\nvoid FolderListModel::sourceRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)\n{\n    //Q_ASSERT(parent.isValid() ? parent.model() == m_model : true);\n    this->beginRemoveRows(this->mapFromSource(parent), start, end);\n}\n\nvoid FolderListModel::sourceRowsInserted(const QModelIndex &parent, int start, int end)\n{\n    //Q_ASSERT(parent.isValid() ? parent.model() == m_model : true);\n    Q_UNUSED(parent)\n    Q_UNUSED(start)\n    Q_UNUSED(end)\n    //this->beginInsertRows(this->mapFromSource(parent), start, end);\n    //this->endInsertRows();\n    for (int i = start; i <= end; i++) {\n        this->beginInsertRows(this->mapFromSource(parent), i,i);\n        this->endInsertRows();\n    }\n}\n\nvoid FolderListModel::sourceRowsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest)\n{\n    //Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == m_model : true);\n    //Q_ASSERT(destParent.isValid() ? destParent.model() == m_model : true);\n    Q_UNUSED(sourceParent)\n    Q_UNUSED(sourceStart)\n    Q_UNUSED(sourceEnd)\n    Q_UNUSED(destParent)\n    Q_UNUSED(dest)\n    this->endMoveRows();\n}\n\nvoid FolderListModel::sourceRowsRemoved(const QModelIndex &parent, int start, int end)\n{\n    //Q_ASSERT(parent.isValid() ? parent.model() == m_model : true);\n    Q_UNUSED(parent)\n    Q_UNUSED(start)\n    Q_UNUSED(end)\n    this->endRemoveRows();\n}\n"
  },
  {
    "path": "liteidex/src/utils/folderview/folderlistmodel.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: folderlistmodel.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FOLDERLISTMODEL_H\n#define FOLDERLISTMODEL_H\n\n#include <QAbstractItemModel>\n#include <QFileSystemModel>\n#include <QModelIndex>\n#include <QItemSelection>\n\nclass QFileSystemWatcher;\n\nstruct SourceModel\n{\n    QFileSystemModel* model;\n    QString      rootPath;\n    QString      watchPath;\n    QModelIndex  rootIndex;\n    QModelIndex  rootSourceIndex;\n};\n\nclass FolderListModel : public QAbstractItemModel\n{\n    Q_OBJECT\npublic:\n    explicit FolderListModel(QObject *parent = 0);\n    virtual ~FolderListModel();\n    void clear();\n    QModelIndex addRootPath(const QString &path);\n    void removeRootPath(const QString &path);\n    void removeRoot(const QModelIndex &index);\n    void reloadRoot(const QModelIndex &index);\n    bool isRootPath(const QString &path);\n    QList<QModelIndex> rootIndexs() const;\n    QStringList rootPathList() const;\n    QString filePath(const QModelIndex &index) const;\n    QString fileName(const QModelIndex &index) const;\n    QFileInfo fileInfo(const QModelIndex &index) const;\n    bool isDir(const QModelIndex &index) const;\n    QModelIndex mkdir(const QModelIndex &parent,const QString &name);\n    bool rmdir(const QModelIndex &index);\n    bool remove(const QModelIndex &index);\n    void setFilter(QDir::Filters filters);\n    QDir::Filters filter() const;\n    void setNameFilters(const QStringList &filters);\n    QStringList nameFilters() const;\n    void setNameFilterDisables(bool enable);\n    bool nameFilterDisables() const;\n    void setResolveSymlinks(bool enable);\n    bool resolveSymlinks() const;\n    bool isRootIndex(const QModelIndex &index) const;\n    void setWatcherRoot(bool b);\n    bool isWatcherRoot() const;\n    QList<QModelIndex> indexForPath(const QString &path) const;\n    virtual Qt::DropActions supportedDragActions() const;\nprotected:\n    QFileSystemModel *findSource(const QModelIndex &proxyIndex) const;\n    QModelIndex mapFromSource(const QModelIndex& sourceIndex) const;\n    QModelIndex mapToSource(const QModelIndex& proxyIndex) const;\n    QItemSelection mapSelectionToSource(const QItemSelection &proxySelection) const;\n    QItemSelection mapSelectionFromSource(const QItemSelection &sourceSelection) const;\n    bool isRootSourceIndex(const QModelIndex &sourceIndex) const;\npublic:\n    int columnCount(const QModelIndex& parent = QModelIndex()) const;\n    QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const;\n    QModelIndex parent(const QModelIndex& child) const;\n    int rowCount(const QModelIndex& parent = QModelIndex()) const;\n\n    QVariant data(const QModelIndex &proxyIndex, int role = Qt::DisplayRole) const;\n    QVariant headerData(int section, Qt::Orientation orientation, int role) const;\n    QMap<int, QVariant> itemData(const QModelIndex &index) const;\n    Qt::ItemFlags flags(const QModelIndex &index) const;\n\n    bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);\n    bool setItemData(const QModelIndex& index, const QMap<int, QVariant> &roles);\n    bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole);\n\n    bool canFetchMore(const QModelIndex &parent) const;\n    void fetchMore(const QModelIndex &parent);\n    void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);\n    QSize span(const QModelIndex &index) const;\n    bool hasChildren(const QModelIndex &parent = QModelIndex()) const;\n    QModelIndex buddy(const QModelIndex &index) const;\n\n    bool insertColumns(int column, int count, const QModelIndex& parent = QModelIndex());\n    bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex());\n    bool removeColumns(int column, int count, const QModelIndex& parent = QModelIndex());\n    bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex());\npublic slots:\n    void directoryChanged(const QString &path);\n\n    void sourceRowsAboutToBeInserted(const QModelIndex &,int,int);\n    void sourceRowsInserted(const QModelIndex &,int,int);\n    void sourceRowsAboutToBeRemoved(const QModelIndex &,int,int);\n    void sourceRowsRemoved(const QModelIndex &,int,int);\n    void sourceRowsAboutToBeMoved(const QModelIndex &,int,int,const QModelIndex &,int);\n    void sourceRowsMoved(const QModelIndex &,int,int,const QModelIndex &,int);\n\n    void sourceColumnsAboutToBeInserted(const QModelIndex &,int,int);\n    void sourceColumnsInserted(const QModelIndex &,int,int);\n    void sourceColumnsAboutToBeRemoved(const QModelIndex &,int,int);\n    void sourceColumnsRemoved(const QModelIndex &,int,int);\n    void sourceColumnsAboutToBeMoved(const QModelIndex &,int,int,const QModelIndex &,int);\n    void sourceColumnsMoved(const QModelIndex &,int,int,const QModelIndex &,int);\n\n    void sourceDataChanged(const QModelIndex &,const QModelIndex &);\n    void sourceHeaderDataChanged(Qt::Orientation orientation, int first, int last);\n\n    void sourceLayoutAboutToBeChanged();\n    void sourceLayoutChanged();\n    void sourceModelAboutToBeReset();\n    void sourceModelReset();\n\nprotected:\n    QList<SourceModel> m_modelList;\n    mutable QHash<qint64,QAbstractItemModel*> m_indexMap;\n    bool ignoreNextLayoutAboutToBeChanged;\n    bool ignoreNextLayoutChanged;\n    QList<QPersistentModelIndex> layoutChangePersistentIndexes;\n    QModelIndexList proxyIndexes;\n    QFileSystemWatcher *m_watcher;\n    QDir::Filters       m_filters;\n    QStringList         m_nameFilters;\n    bool                m_resolveSymlinks;\n    bool                m_nameFilterDisables;\n    bool                m_bWatcherRoot;\n};\n\n#endif // FOLDERLISTMODEL_H\n"
  },
  {
    "path": "liteidex/src/utils/folderview/folderlistview.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: folderlistview.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"folderlistview.h\"\n\n#include <QTreeView>\n#include <QMenu>\n#include <QAction>\n#include <QMessageBox>\n#include <QDesktopServices>\n#include <QProcess>\n#include <QInputDialog>\n#include <QFileDialog>\n#include <QHeaderView>\n#include <QSortFilterProxyModel>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nclass FolderListProxyModel : public QSortFilterProxyModel\n{\npublic:\n    FolderListProxyModel(QObject *parent) :\n        QSortFilterProxyModel(parent)\n    {\n    }\n    virtual bool lessThan( const QModelIndex & left, const QModelIndex & right ) const\n    {\n        FolderListModel *model = static_cast<FolderListModel*>(this->sourceModel());\n        if (model->isRootIndex(left) && model->isRootIndex(right)) {\n            return false;\n        }\n        QFileInfo l = model->fileInfo(left);\n        QFileInfo r = model->fileInfo(right);\n        if (l.isDir() && r.isFile()) {\n            return true;\n        } else if (l.isFile() && r.isDir()) {\n            return false;\n        }\n#ifdef Q_OS_WIN\n        if (l.filePath().length() <= 3 || r.filePath().length() <= 3) {\n            return l.filePath().at(0) < r.filePath().at(0);\n        }\n#endif\n        return (l.fileName().compare(r.fileName(),Qt::CaseInsensitive) < 0);\n    }\n};\n\n\nFolderListView::FolderListView(bool proxyMode, LiteApi::IApplication *app, QWidget *parent) :\n    BaseFolderView(app,parent)\n{   \n    m_model = new FolderListModel(this);\n    if (proxyMode) {\n        m_proxy = new FolderListProxyModel(this);\n        m_proxy->setSourceModel(m_model);\n        m_proxy->sort(0);\n        this->setModel(m_proxy);\n    } else {\n        m_proxy = 0;\n        this->setModel(m_model);\n    }\n\n    this->setHeaderHidden(true);\n\n    setContextMenuPolicy(Qt::CustomContextMenu);\n    connect(this,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(customContextMenuRequested(QPoint)));\n}\n\nvoid FolderListView::setFilter(QDir::Filters filters)\n{\n    m_model->setFilter(filters);\n}\n\nQDir::Filters FolderListView::filter() const\n{\n    return m_model->filter();\n}\n\nQFileInfo FolderListView::fileInfo(const QModelIndex &index) const\n{\n    if (m_proxy) {\n        return m_model->fileInfo(m_proxy->mapToSource(index));\n    } else {\n        return m_model->fileInfo(index);\n    }\n}\n\nbool FolderListView::addRootPath(const QString &path)\n{\n    if (m_model->isRootPath(path)) {\n        return true;\n    }\n    if (!m_model->addRootPath(path).isValid()) {\n        m_liteApp->appendLog(\"Add path false\",path,true);\n        return false;\n    }\n    if (m_proxy) {\n        m_proxy->invalidate();\n    }\n    return true;\n}\n\nvoid FolderListView::setRootPathList(const QStringList &pathList)\n{\n    m_model->clear();\n    foreach(QString path, pathList) {\n        m_model->addRootPath(path);\n    }\n    if (m_proxy) {\n        m_proxy->invalidate();\n    }\n}\n\nQStringList FolderListView::rootPathList() const\n{\n    return m_model->rootPathList();\n}\n\nvoid FolderListView::clear()\n{\n    m_model->clear();\n}\n\nvoid FolderListView::expandFolder(const QString &path, bool expand)\n{\n    QList<QModelIndex> indexList = m_model->indexForPath(path);\n    foreach (QModelIndex sourceIndex, indexList) {\n        QModelIndex index = sourceIndex;\n        if (m_proxy) {\n            index = m_proxy->mapFromSource(sourceIndex);\n        }\n        if (expand) {\n            this->expand(index);\n        } else {\n            this->collapse(index);\n        }\n    }\n}\n\nQList<QModelIndex> FolderListView::indexForPath(const QString &path) const\n{\n    QList<QModelIndex> indexList = m_model->indexForPath(path);\n    if (!m_proxy) {\n        return indexList;\n    }\n    QList<QModelIndex> indexs;\n    foreach (QModelIndex sourceIndex, indexList) {\n        indexs.push_back(m_proxy->mapFromSource(sourceIndex));\n    }\n    return indexs;\n}\n\nvoid FolderListView::customContextMenuRequested(const QPoint &pos)\n{\n    QMenu menu(this);\n    LiteApi::FILESYSTEM_CONTEXT_FLAG flag = LiteApi::FILESYSTEM_ROOT;\n    QModelIndex index = this->indexAt(pos);\n    if (index.isValid()) {\n        m_contextIndex = index;\n        QModelIndex sourceIndex = index;\n        if (m_proxy) {\n            sourceIndex = m_proxy->mapToSource(index);\n        }\n        m_contextInfo = m_model->fileInfo(sourceIndex);\n        if (m_model->isRootIndex(sourceIndex)) {\n            flag = LiteApi::FILESYSTEM_ROOTFOLDER;\n        } else if (m_model->isDir(sourceIndex)) {\n            flag = LiteApi::FILESYSTEM_FOLDER;\n        } else {\n            flag = LiteApi::FILESYSTEM_FILES;\n        }\n    } else {\n        m_contextIndex = this->rootIndex();\n        m_contextInfo = QFileInfo();\n    }\n    //root folder\n    if (flag == LiteApi::FILESYSTEM_ROOT) {\n        menu.addAction(m_openFolderAct);\n    } else if (flag == LiteApi::FILESYSTEM_ROOTFOLDER) {\n        menu.addAction(m_newFileAct);\n        menu.addAction(m_newFileWizardAct);\n        menu.addAction(m_newFolderAct);\n        menu.addSeparator();\n        menu.addAction(m_reloadFolderAct);\n        menu.addAction(m_closeFolderAct);\n        menu.addSeparator();\n        menu.addAction(m_openExplorerAct);\n        menu.addAction(m_openShellAct);\n        menu.addAction(m_openTerminalAct);\n    } else if (flag == LiteApi::FILESYSTEM_FOLDER) {\n        menu.addAction(m_newFileAct);\n        menu.addAction(m_newFileWizardAct);\n        menu.addAction(m_newFolderAct);\n        menu.addAction(m_renameFolderAct);\n        menu.addAction(m_removeFolderAct);\n        menu.addSeparator();\n        menu.addAction(m_openExplorerAct);\n        menu.addAction(m_openShellAct);\n        menu.addAction(m_openTerminalAct);\n    } else if (flag == LiteApi::FILESYSTEM_FILES) {\n        menu.addAction(m_openEditorAct);\n        menu.addMenu(this->openWithMenu());\n        menu.addSeparator();\n        menu.addAction(m_newFileAct);\n        menu.addAction(m_newFileWizardAct);\n        menu.addAction(m_newFolderAct);\n        menu.addAction(m_renameFileAct);\n        menu.addAction(m_removeFileAct);\n        menu.addSeparator();\n        menu.addAction(m_openExplorerAct);\n        menu.addAction(m_openShellAct);\n        menu.addAction(m_openTerminalAct);\n    }\n    emit aboutToShowContextMenu(&menu,flag,m_contextInfo);\n    menu.exec(this->mapToGlobal(pos));\n}\n\nvoid FolderListView::removeFile()\n{\n    QFileInfo info = m_contextInfo;\n    if (!info.isFile()) {\n        return;\n    }\n\n    int ret = QMessageBox::question(m_liteApp->mainWindow(),tr(\"Delete File\"),\n                          tr(\"Are you sure that you want to permanently delete this file?\")\n                          +\"\\n\"+info.filePath(),\n                          QMessageBox::Yes | QMessageBox::No, QMessageBox::No);\n    if (ret == QMessageBox::Yes) {\n        QModelIndex index = this->currentIndex();\n        if (m_proxy) {\n            index = m_proxy->mapToSource(index);\n        }\n        if (!m_model->remove(index)) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Delete File\"),\n                                     tr(\"Failed to delete the file!\"));\n        }\n    }\n}\n\nvoid FolderListView::removeFolder()\n{\n    QFileInfo info = m_contextInfo;\n    if (!info.isDir()) {\n        return;\n    }\n\n    int ret = QMessageBox::warning(m_liteApp->mainWindow(),tr(\"Delete Folder\"),\n                          tr(\"Are you sure that you want to permanently delete this folder and all of its contents?\")\n                          +\"\\n\"+info.filePath(),\n                          QMessageBox::Yes | QMessageBox::No, QMessageBox::No);\n    if (ret == QMessageBox::Yes) {\n        QModelIndex index = this->currentIndex();\n        if (m_proxy) {\n            index = m_proxy->mapToSource(index);\n        }\n        if (!m_model->remove(index)) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Delete Folder\"),\n                                     tr(\"Failed to delete the folder!\"));\n        }\n    }\n}\n\nvoid FolderListView::openFolder()\n{\n    m_liteApp->fileManager()->openFolder();\n}\n\nvoid FolderListView::closeFolder()\n{\n    QModelIndex index = this->currentIndex();\n    if (m_proxy) {\n        index = m_proxy->mapToSource(index);\n    }\n    m_model->removeRoot(index);\n}\n\nvoid FolderListView::reloadFolder()\n{\n    QModelIndex index = this->currentIndex();\n    this->collapse(index);\n    if (m_proxy) {\n        index = m_proxy->mapToSource(index);\n    }\n    m_model->reloadRoot(index);\n}\n\nvoid FolderListView::closeAllFolders()\n{\n    m_model->clear();\n}\n"
  },
  {
    "path": "liteidex/src/utils/folderview/folderlistview.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: folderlistview.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FOLDERLISTVIEW_H\n#define FOLDERLISTVIEW_H\n\n#include \"basefoldeview.h\"\n#include \"folderlistmodel.h\"\n#include <QFileInfo>\n\nclass QSortFilterProxyModel;\nclass FolderListView : public BaseFolderView\n{\n    Q_OBJECT\npublic:\n    explicit FolderListView(bool proxyMode, LiteApi::IApplication *app, QWidget *parent = 0);\n    void setFilter(QDir::Filters filters);\n    QDir::Filters filter() const;\n    QFileInfo fileInfo(const QModelIndex &index) const;\npublic:\n    bool addRootPath(const QString &path);\n    void setRootPathList(const QStringList &pathList);\n    QStringList rootPathList() const;\n    void clear();\n    void expandFolder(const QString &path, bool expand);\n    QList<QModelIndex> indexForPath(const QString &path) const;\npublic slots:\n    void customContextMenuRequested(const QPoint &pos);\n    virtual void removeFolder();\n    virtual void removeFile();\n    virtual void openFolder();\n    virtual void closeFolder();\n    virtual void reloadFolder();\n    virtual void closeAllFolders();\nprotected:\n    QSortFilterProxyModel *m_proxy;\n    FolderListModel *m_model;\n};\n\n#endif // FOLDERLISTVIEW_H\n"
  },
  {
    "path": "liteidex/src/utils/folderview/folderview.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: folderview.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"folderview.h\"\n#include \"filesystemmodelex.h\"\n#include <QMessageBox>\n#include <QHeaderView>\n#include <QSortFilterProxyModel>\n#include <QDesktopServices>\n#if QT_VERSION >= 0x050000\n#include <QStandardPaths>\n#endif\n\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nFolderView::FolderView(bool proxyMode, LiteApi::IApplication *app, QWidget *parent) :\n    BaseFolderView(app,parent)\n{\n    m_model = new FileSystemModelEx(this);\n    if (proxyMode) {\n        m_proxy = new FileSystemProxyModel(this);\n        m_proxy->setSourceModel(m_model);\n        this->setModel(m_proxy);\n        m_proxy->sort(0);\n    } else {\n        m_proxy = 0;\n        this->setModel(m_model);\n    }\n    this->setHeaderHidden(true);\n    this->setSelectionMode(QAbstractItemView::ExtendedSelection);\n\n    m_contextMenu = new QMenu(this);\n    setContextMenuPolicy(Qt::CustomContextMenu);\n    connect(this,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(customContextMenuRequested(QPoint)));\n}\n\nFolderView::~FolderView()\n{\n    delete m_contextMenu;\n}\n\nvoid FolderView::setRootPath(const QString &path)\n{\n    QModelIndex index = m_model->setRootPath(path);\n    if (!path.isEmpty() && !index.isValid()) {\n#if QT_VERSION >= 0x050000\n        QString home = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);\n#else\n        QString home = QDesktopServices::storageLocation(QDesktopServices::HomeLocation);\n#endif\n        index = m_model->setRootPath(home);\n    }\n    if (m_proxy)\n        this->setRootIndex(m_proxy->mapFromSource(index));\n    else\n        this->setRootIndex(index);\n}\n\nQString FolderView::rootPath() const\n{\n    return m_model->rootPath();\n}\n\nvoid FolderView::setFilter(QDir::Filters filters)\n{\n    m_model->setFilter(filters);\n}\n\nQDir::Filters FolderView::filter() const\n{\n    return m_model->filter();\n}\n\nvoid FolderView::setNameFilters(const QStringList &filters)\n{\n    m_model->setNameFilters(filters);\n}\n\nQStringList FolderView::nameFilters() const\n{\n    return m_model->nameFilters();\n}\n\nQFileInfo FolderView::fileInfo(const QModelIndex &index) const\n{\n    if (m_proxy)\n        return m_model->fileInfo(m_proxy->mapToSource(index));\n    else\n        return m_model->fileInfo(index);\n}\n\nQModelIndex FolderView::indexForPath(const QString &fileName) const\n{\n    QString filePath = QDir::fromNativeSeparators(fileName);\n    if (!filePath.startsWith(this->rootPath()+\"/\")) {\n        return QModelIndex();\n    }\n    QModelIndex index = m_model->index(filePath);\n    if (!index.isValid()) {\n        return QModelIndex();\n    }\n    if (m_proxy) {\n        return m_proxy->mapFromSource(index);\n    }\n    return index;\n}\n\nvoid FolderView::reload()\n{\n    this->collapseAll();\n    this->setRootPath(this->rootPath());\n}\n\nbool FolderView::isShowDetails() const\n{\n    return m_model->isShowDetails();\n}\n\nQModelIndex FolderView::findIndexForContext(const QString &filePath) const\n{\n    return this->indexForPath(filePath);\n}\n\nvoid FolderView::removeIndex(const QModelIndex &index)\n{\n    QModelIndex i = index;\n    if (m_proxy) {\n        i = m_proxy->mapToSource(index);\n    }\n    m_model->remove(i);\n}\n\nvoid FolderView::setShowDetails(bool b)\n{\n    m_model->setShowDetails(b);\n}\n\nvoid FolderView::removeFile()\n{\n    QFileInfo info = m_contextInfo;\n    if (!info.isFile()) {\n        return;\n    }\n\n    int ret = QMessageBox::question(m_liteApp->mainWindow(),tr(\"Delete File\"),\n                          tr(\"Are you sure that you want to permanently delete this file?\")\n                          +\"\\n\"+info.filePath(),\n                          QMessageBox::Yes | QMessageBox::No, QMessageBox::No);\n    if (ret == QMessageBox::Yes) {\n        QModelIndex index = this->currentIndex();\n        if (m_proxy) {\n            index = m_proxy->mapToSource(index);\n        }\n        if (!m_model->remove(index)) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Delete File\"),\n                                     tr(\"Failed to delete the file!\"));\n        }\n    }\n}\n\nQModelIndexList FolderView::selectionCopyOrRemoveList() const\n{\n    QModelIndexList selection = this->selectionModel()->selectedRows(0);\n    if (selection.size() <= 1) {\n        return selection;\n    }\n    QStringList dirList;\n    foreach (QModelIndex index, selection) {\n        if (m_proxy) {\n            index = m_proxy->mapToSource(index);\n        }\n        if (m_model->isDir(index)) {\n            dirList  << QDir::cleanPath(m_model->fileInfo(index).filePath());\n        }\n    }\n    QModelIndexList itemList;\n    foreach (QModelIndex index, selection) {\n        QString filePath = QDir::cleanPath(this->fileInfo(index).filePath());\n        QStringList chkList = dirList;\n        chkList.removeAll(filePath);\n        bool find = false;\n        foreach (QString chk, chkList) {\n            if (filePath.startsWith(chk+\"/\")) {\n                find = true;\n                break;\n            }\n        }\n        if (!find) {\n            itemList << index;\n        }\n    }\n    return itemList;\n}\n\nvoid FolderView::removeFolder()\n{\n    QFileInfo info = m_contextInfo;\n    if (!info.isDir()) {\n        return;\n    }\n\n    int ret = QMessageBox::warning(m_liteApp->mainWindow(),tr(\"Delete Folder\"),\n                          tr(\"Are you sure that you want to permanently delete this folder and all of its contents?\")\n                          +\"\\n\"+info.filePath(),\n                          QMessageBox::Yes | QMessageBox::No, QMessageBox::No);\n    if (ret == QMessageBox::Yes) {\n        QModelIndex index = this->currentIndex();\n        if (m_proxy) {\n            index = m_proxy->mapToSource(index);\n        }\n        if (!m_model->remove(index)) {\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Delete Folder\"),\n                                     tr(\"Failed to delete the folder!\"));\n        }\n    }\n}\n\nvoid FolderView::customContextMenuRequested(const QPoint &pos)\n{\n    m_contextMenu->clear();\n\n    LiteApi::FILESYSTEM_CONTEXT_FLAG flag = LiteApi::FILESYSTEM_ROOT;\n    QModelIndex index = this->indexAt(pos);\n    if (index.isValid()) {\n        bool isDir = false;\n        if (m_proxy) {\n            m_contextInfo = m_model->fileInfo(m_proxy->mapToSource(index));\n            isDir = m_model->isDir(m_proxy->mapToSource(index));\n        } else {\n            m_contextInfo = m_model->fileInfo(index);\n            isDir = m_model->isDir(index);\n        }\n        m_contextIndex = index;\n        if (isDir) {\n            flag = LiteApi::FILESYSTEM_FOLDER;\n        } else {\n            flag = LiteApi::FILESYSTEM_FILES;\n        }\n    } else {\n        m_contextIndex = this->rootIndex();\n        if (m_proxy) {\n            m_contextInfo = m_model->fileInfo(m_proxy->mapToSource(m_contextIndex));\n        } else {\n            m_contextInfo = m_model->fileInfo(m_contextIndex);\n        }\n        flag = LiteApi::FILESYSTEM_ROOTFOLDER;\n    }\n    //root folder\n    if (flag == LiteApi::FILESYSTEM_ROOT) {\n        m_contextMenu->addAction(m_newFileAct);\n        m_contextMenu->addAction(m_newFileWizardAct);\n        m_contextMenu->addAction(m_newFolderAct);\n        m_contextMenu->addSeparator();\n        m_contextMenu->addAction(m_openExplorerAct);\n        m_contextMenu->addAction(m_openShellAct);\n        m_contextMenu->addAction(m_openTerminalAct);\n    } else if (flag == LiteApi::FILESYSTEM_ROOTFOLDER) {\n#ifdef Q_OS_MAC\n        if (m_contextInfo.isBundle()) {\n            m_contextMenu->addAction(m_openBundleAct);\n            m_contextMenu->addSeparator();\n        }\n#endif\n        m_contextMenu->addAction(m_newFileAct);\n        m_contextMenu->addAction(m_newFileWizardAct);\n        m_contextMenu->addAction(m_newFolderAct);\n        m_contextMenu->addAction(m_renameFolderAct);\n        m_contextMenu->addSeparator();\n        m_contextMenu->addAction(m_copyFileAct);\n        m_contextMenu->addAction(m_pasteFileAct);\n        m_contextMenu->addSeparator();\n        m_contextMenu->addAction(m_copyFullPathToClipboardAct);\n        m_contextMenu->addSeparator();\n        m_contextMenu->addAction(m_openExplorerAct);\n        m_contextMenu->addAction(m_openShellAct);\n        m_contextMenu->addAction(m_openTerminalAct);\n    } else if (flag == LiteApi::FILESYSTEM_FOLDER) {\n#ifdef Q_OS_MAC\n        if (m_contextInfo.isBundle()) {\n            m_contextMenu->addAction(m_openBundleAct);\n            m_contextMenu->addSeparator();\n        }\n#endif\n        m_contextMenu->addAction(m_newFileAct);\n        m_contextMenu->addAction(m_newFileWizardAct);\n        m_contextMenu->addAction(m_newFolderAct);\n        m_contextMenu->addAction(m_renameFolderAct);\n\n        if (this->canMoveToTrash()) {\n            m_contextMenu->addAction(m_moveToTrashAct);\n        } else {\n            m_contextMenu->addAction(m_removeFolderAct);\n        }\n        m_contextMenu->addSeparator();\n        m_contextMenu->addAction(m_copyFileAct);\n        m_contextMenu->addAction(m_pasteFileAct);\n        m_contextMenu->addSeparator();\n        m_contextMenu->addAction(m_copyFullPathToClipboardAct);\n        m_contextMenu->addSeparator();\n        m_contextMenu->addAction(m_openExplorerAct);\n        m_contextMenu->addAction(m_openShellAct);\n        m_contextMenu->addAction(m_openTerminalAct);\n    } else if (flag == LiteApi::FILESYSTEM_FILES) {\n        m_contextMenu->addAction(m_openEditorAct);\n        m_contextMenu->addMenu(this->openWithMenu());\n        m_contextMenu->addSeparator();\n        m_contextMenu->addAction(m_newFileAct);\n        m_contextMenu->addAction(m_newFileWizardAct);\n        m_contextMenu->addAction(m_newFolderAct);\n        m_contextMenu->addAction(m_renameFileAct);\n\n        if (this->canMoveToTrash()) {\n            m_contextMenu->addAction(m_moveToTrashAct);\n        } else {\n            m_contextMenu->addAction(m_removeFileAct);\n        }\n\n        m_contextMenu->addSeparator();\n        m_contextMenu->addAction(m_copyFileAct);\n        m_contextMenu->addAction(m_pasteFileAct);\n        m_contextMenu->addSeparator();\n        m_contextMenu->addAction(m_copyFullPathToClipboardAct);\n        m_contextMenu->addSeparator();\n        m_contextMenu->addAction(m_openExplorerAct);\n        m_contextMenu->addAction(m_openShellAct);\n        m_contextMenu->addAction(m_openTerminalAct);\n    }\n    m_pasteFileAct->setEnabled(this->canPasteFile());\n\n    bool check = this->selectionModel()->selectedRows(0).size() == 1;\n    m_removeFileAct->setEnabled(check);\n    m_removeFolderAct->setEnabled(check);\n    m_renameFileAct->setEnabled(check);\n    m_renameFolderAct->setEnabled(check);\n\n    check = true;\n    foreach (QModelIndex index, this->selectionCopyOrRemoveList()) {\n        if (m_proxy) {\n            index = m_proxy->mapToSource(index);\n        }\n        if (index == this->rootIndex()) {\n            check = false;\n            break;\n        }\n    }\n    m_moveToTrashAct->setEnabled(check && !this->selectionCopyOrRemoveList().empty());\n\n    emit aboutToShowContextMenu(m_contextMenu,flag,m_contextInfo);\n    m_contextMenu->exec(this->mapToGlobal(pos));\n}\n"
  },
  {
    "path": "liteidex/src/utils/folderview/folderview.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: folderview.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef FOLDERVIEW_H\n#define FOLDERVIEW_H\n\n#include <QTreeView>\n#include <QFileSystemModel>\n#include <QFileInfo>\n#include \"basefoldeview.h\"\n\nclass QSortFilterProxyModel;\nclass FileSystemModelEx;\n\nclass FolderView : public BaseFolderView\n{\n    Q_OBJECT\npublic:\n    explicit FolderView(bool proxyMode, LiteApi::IApplication *app, QWidget *parent = 0);\n    virtual ~FolderView();\n    void setRootPath(const QString &path);\n    QString rootPath() const;\n    void setFilter(QDir::Filters filters);\n    QDir::Filters filter() const;\n    void setNameFilters(const QStringList &filters);\n    QStringList nameFilters() const;\n    QFileInfo fileInfo(const QModelIndex &index) const;\n    QModelIndex indexForPath(const QString &fileName) const;\n    void reload();\n    bool isShowDetails() const;\n    virtual QModelIndex findIndexForContext(const QString &filePath) const;\n    virtual void removeIndex(const QModelIndex &index);\npublic slots:\n    void setShowDetails(bool b);\npublic slots:\n    void customContextMenuRequested(const QPoint &pos);    \n    virtual void removeFolder();\n    virtual void removeFile();\nprotected:\n    virtual QModelIndexList selectionCopyOrRemoveList() const;\n    QSortFilterProxyModel *m_proxy;\n    FileSystemModelEx *m_model;\n    QMenu             *m_contextMenu;\n};\n\n#endif // FOLDERVIEW_H\n"
  },
  {
    "path": "liteidex/src/utils/folderview/folderview.pri",
    "content": "LIBS *= -l$$qtLibraryName(folderview)\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/folderview/folderview.pro",
    "content": "TARGET = folderview\nTEMPLATE = lib\nCONFIG += staticlib\n\ninclude (../../liteideutils.pri)\ninclude (../symboltreeview/symboltreeview.pri)\n\nSOURCES += \\\n    folderview.cpp \\\n    basefolderview.cpp \\\n    folderlistview.cpp \\\n    folderlistmodel.cpp \\\n    filesystemmodelex.cpp \\\n    folderdialog.cpp \\\n    abstractmultiproxymodel.cpp \\\n    dirsortfilterproxymodel.cpp \\\n    multifoldermodel.cpp \\\n    multiindexmodel.cpp \\\n    multifolderview.cpp\n\nHEADERS += \\\n    folderview.h \\\n    basefoldeview.h \\\n    folderlistview.h \\\n    folderlistmodel.h \\\n    filesystemmodelex.h \\\n    folderdialog.h \\\n    abstractmultiproxymodel_p.h \\\n    abstractmultiproxymodel.h \\\n    dirsortfilterproxymodel.h \\\n    multifoldermodel.h \\\n    multiindexmodel_p.h \\\n    multiindexmodel.h \\\n    multifolderview.h\n"
  },
  {
    "path": "liteidex/src/utils/folderview/multifoldermodel.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: multifoldermodel.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"multifoldermodel.h\"\r\n#include \"filesystemmodelex.h\"\r\n#include <QFileSystemModel>\r\n#include <QFileInfo>\r\n#include <QDirModel>\r\n#include <QDateTime>\r\n#include <QDebug>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\n\r\n/* For sorting */\r\nstruct QDirSortItem\r\n{\r\n    mutable QString filename_cache;\r\n    mutable QString suffix_cache;\r\n    QFileInfo item;\r\n};\r\n\r\n\r\nclass QDirSortItemComparator\r\n{\r\n    int qt_cmp_si_sort_flags;\r\npublic:\r\n    QDirSortItemComparator(int flags) : qt_cmp_si_sort_flags(flags) {}\r\n    bool sort(const QDirSortItem &, const QDirSortItem &) const;\r\n};\r\n\r\nbool QDirSortItemComparator::sort(const QDirSortItem &n1, const QDirSortItem &n2) const\r\n{\r\n    const QDirSortItem* f1 = &n1;\r\n    const QDirSortItem* f2 = &n2;\r\n\r\n    if ((qt_cmp_si_sort_flags & QDir::DirsFirst) && (f1->item.isDir() != f2->item.isDir()))\r\n        return f1->item.isDir();\r\n    if ((qt_cmp_si_sort_flags & QDir::DirsLast) && (f1->item.isDir() != f2->item.isDir()))\r\n        return !f1->item.isDir();\r\n\r\n    int r = 0;\r\n    int sortBy = (qt_cmp_si_sort_flags & QDir::SortByMask)\r\n                 | (qt_cmp_si_sort_flags & QDir::Type);\r\n\r\n    switch (sortBy) {\r\n      case QDir::Time:\r\n        r = f1->item.lastModified().secsTo(f2->item.lastModified());\r\n        break;\r\n      case QDir::Size:\r\n          r = int(qBound<qint64>(-1, f2->item.size() - f1->item.size(), 1));\r\n        break;\r\n      case QDir::Type:\r\n      {\r\n        bool ic = qt_cmp_si_sort_flags & QDir::IgnoreCase;\r\n\r\n        if (f1->suffix_cache.isNull())\r\n            f1->suffix_cache = ic ? f1->item.suffix().toLower()\r\n                               : f1->item.suffix();\r\n        if (f2->suffix_cache.isNull())\r\n            f2->suffix_cache = ic ? f2->item.suffix().toLower()\r\n                               : f2->item.suffix();\r\n\r\n        r = qt_cmp_si_sort_flags & QDir::LocaleAware\r\n            ? f1->suffix_cache.localeAwareCompare(f2->suffix_cache)\r\n            : f1->suffix_cache.compare(f2->suffix_cache);\r\n      }\r\n        break;\r\n      default:\r\n        ;\r\n    }\r\n\r\n    if (r == 0 && sortBy != QDir::Unsorted) {\r\n        // Still not sorted - sort by name\r\n        bool ic = qt_cmp_si_sort_flags & QDir::IgnoreCase;\r\n\r\n        if (f1->filename_cache.isNull())\r\n            f1->filename_cache = ic ? f1->item.fileName().toLower()\r\n                                    : f1->item.fileName();\r\n        if (f2->filename_cache.isNull())\r\n            f2->filename_cache = ic ? f2->item.fileName().toLower()\r\n                                    : f2->item.fileName();\r\n\r\n        r = qt_cmp_si_sort_flags & QDir::LocaleAware\r\n            ? f1->filename_cache.localeAwareCompare(f2->filename_cache)\r\n            : f1->filename_cache.compare(f2->filename_cache);\r\n    }\r\n    if (r == 0) // Enforce an order - the order the items appear in the array\r\n        r = (&n1) - (&n2);\r\n    if (qt_cmp_si_sort_flags & QDir::Reversed)\r\n        return r > 0;\r\n    return r < 0;\r\n}\r\n\r\nMultiFolderModel::MultiFolderModel(QObject *parent)\r\n    : MultiIndexModel(parent)\r\n{\r\n    m_filters = QDir::NoFilter;\r\n    m_sorts = QDir::DirsFirst | QDir::Name;\r\n\r\n    m_filters = QDir::AllDirs | QDir::Files | QDir::Drives\r\n                            | QDir::Readable| QDir::Writable\r\n                            | QDir::Executable /*| QDir::Hidden*/\r\n                            | QDir::NoDotAndDotDot;\r\n    m_resolveSymlinks = true;\r\n    m_isReadOnly = true;\r\n    m_nameFilterDisables = true;\r\n    m_isShowDetails = true;\r\n}\r\n\r\nMultiFolderModel::~MultiFolderModel()\r\n{\r\n\r\n}\r\n\r\nQModelIndex MultiFolderModel::addRootPath(const QString &path)\r\n{\r\n    if (!QDir::isAbsolutePath(path)) {\r\n        return QModelIndex();\r\n    }\r\n    QFileSystemModel *model = new FileSystemModelEx(this);\r\n    model->setFilter(m_filters);\r\n    model->setResolveSymlinks(m_resolveSymlinks);\r\n    model->setReadOnly(m_isReadOnly);\r\n    model->setNameFilterDisables(m_nameFilterDisables);\r\n    model->setNameFilters(m_nameFilters);\r\n    connect(model,SIGNAL(directoryLoaded(QString)),this,SLOT(slotDirectoryLoaded(QString)));\r\n    QModelIndex index = model->setRootPath(path);\r\n    if (this->addSourceModel(model,index)) {\r\n        return this->mapFromSourceEx(model,index);\r\n    }\r\n    return QModelIndex();\r\n}\r\n\r\nvoid MultiFolderModel::removeRootPath(const QString &path)\r\n{\r\n    QFileInfo info(path);\r\n    foreach (QAbstractItemModel *model, this->sourceModelList()) {\r\n        QString rootPath = ((QFileSystemModel*)model)->rootPath();\r\n        if (QFileInfo(rootPath) == info) {\r\n            this->removeSourceModel(model);\r\n            delete model;\r\n            break;\r\n        }\r\n    }\r\n}\r\n\r\nvoid MultiFolderModel::removeRoot(const QModelIndex &index)\r\n{\r\n    SourceModelIndex si = this->mapToSourceEx(index);\r\n    if (si.model == 0) {\r\n        return;\r\n    }\r\n    foreach (SourceModelIndex i, this->sourceModelIndexlList()) {\r\n        if (i.model == si.model && i.index == si.index) {\r\n            this->removeSourceModel(i.model);\r\n            delete si.model;\r\n            break;\r\n        }\r\n    }\r\n}\r\n\r\nbool MultiFolderModel::isRootPath(const QString &path) const\r\n{\r\n    QFileInfo info(path);\r\n    foreach (QAbstractItemModel *model, this->sourceModelList()) {\r\n        QString rootPath = ((QFileSystemModel*)model)->rootPath();\r\n        if (QFileInfo(rootPath) == info) {\r\n            return true;\r\n        }\r\n    }\r\n    return false;\r\n}\r\n\r\nbool MultiFolderModel::isRootIndex(const QModelIndex &index) const\r\n{\r\n    SourceModelIndex si = this->mapToSourceEx(index);\r\n    if (si.model == 0) {\r\n        return false;\r\n    }\r\n    foreach (SourceModelIndex i, this->sourceModelIndexlList()) {\r\n        if (i.model == si.model && i.index == si.index) {\r\n            return true;\r\n        }\r\n    }\r\n    return false;\r\n}\r\n\r\nvoid MultiFolderModel::clearAll()\r\n{\r\n    QList<QAbstractItemModel*> all = this->sourceModelList();\r\n    MultiIndexModel::removeAllSourceModel();\r\n    foreach (QAbstractItemModel *model, all) {\r\n        delete model;\r\n    }\r\n}\r\n\r\nvoid MultiFolderModel::reloadAll()\r\n{\r\n    QStringList pathList = this->rootPathList();\r\n    this->clearAll();\r\n    foreach (QString path, pathList) {\r\n        this->addRootPath(path);\r\n    }\r\n}\r\n\r\nQList<QModelIndex> MultiFolderModel::rootIndexs() const\r\n{\r\n    QList<QModelIndex> indexList;\r\n    for (int i = 0; i < this->rowCount(); i++) {\r\n        indexList.push_back(this->index(i,0));\r\n    }\r\n    return indexList;\r\n}\r\n\r\nQStringList MultiFolderModel::rootPathList() const\r\n{\r\n    QStringList pathList;\r\n    foreach (QAbstractItemModel *model, this->sourceModelList()) {\r\n        pathList << ((QFileSystemModel*)model)->rootPath();\r\n    }\r\n    return pathList;\r\n}\r\n\r\nQString MultiFolderModel::filePath(const QModelIndex &index) const\r\n{\r\n    SourceModelIndex si = this->mapToSourceEx(index);\r\n    if (!si.isValid()) {\r\n        return QString();\r\n    }\r\n    return ((QFileSystemModel*)si.model)->filePath(si.index);\r\n}\r\n\r\nQString MultiFolderModel::fileName(const QModelIndex &index) const\r\n{\r\n    SourceModelIndex si = this->mapToSourceEx(index);\r\n    if (!si.isValid()) {\r\n        return QString();\r\n    }\r\n    return ((QFileSystemModel*)si.model)->fileName(si.index);\r\n}\r\n\r\nQFileInfo MultiFolderModel::fileInfo(const QModelIndex &index) const\r\n{\r\n    SourceModelIndex si = this->mapToSourceEx(index);\r\n    if (!si.isValid()) {\r\n        return QFileInfo();\r\n    }\r\n    return ((QFileSystemModel*)si.model)->fileInfo(si.index);\r\n}\r\n\r\nQString MultiFolderModel::fileRootPath(const QModelIndex &index) const\r\n{\r\n    SourceModelIndex si = this->mapToSourceEx(index);\r\n    if (!si.isValid()) {\r\n        return QString();\r\n    }\r\n    return ((QFileSystemModel*)si.model)->rootPath();\r\n}\r\n\r\nbool MultiFolderModel::isDir(const QModelIndex &index) const\r\n{\r\n    SourceModelIndex si = this->mapToSourceEx(index);\r\n    if (!si.isValid()) {\r\n        return false;\r\n    }\r\n    return ((QFileSystemModel*)si.model)->isDir(si.index);\r\n}\r\n\r\nqint64 MultiFolderModel::size(const QModelIndex &index) const\r\n{\r\n    SourceModelIndex si = this->mapToSourceEx(index);\r\n    if (!si.isValid()) {\r\n        return 0;\r\n    }\r\n    return ((QFileSystemModel*)si.model)->size(si.index);\r\n}\r\n\r\nQString MultiFolderModel::type(const QModelIndex &index) const\r\n{\r\n    SourceModelIndex si = this->mapToSourceEx(index);\r\n    if (!si.isValid()) {\r\n        return \"\";\r\n    }\r\n    return ((QFileSystemModel*)si.model)->type(si.index);\r\n}\r\n\r\nQDateTime MultiFolderModel::lastModified(const QModelIndex &index) const\r\n{\r\n    SourceModelIndex si = this->mapToSourceEx(index);\r\n    if (!si.isValid()) {\r\n        return QDateTime();\r\n    }\r\n    return ((QFileSystemModel*)si.model)->lastModified(si.index);\r\n}\r\n\r\nQFile::Permissions MultiFolderModel::permissions(const QModelIndex &index) const\r\n{\r\n    SourceModelIndex si = this->mapToSourceEx(index);\r\n    if (!si.isValid()) {\r\n        return 0;\r\n    }\r\n    return ((QFileSystemModel*)si.model)->permissions(si.index);\r\n}\r\n\r\nbool MultiFolderModel::remove(const QModelIndex &index)\r\n{\r\n    SourceModelIndex si = this->mapToSourceEx(index);\r\n    if (!si.isValid()) {\r\n        return false;\r\n    }\r\n    return ((QFileSystemModel*)si.model)->remove(si.index);\r\n}\r\n\r\nbool MultiFolderModel::rmdir(const QModelIndex &index)\r\n{\r\n    SourceModelIndex si = this->mapToSourceEx(index);\r\n    if (!si.isValid()) {\r\n        return false;\r\n    }\r\n    return ((QFileSystemModel*)si.model)->rmdir(si.index);\r\n}\r\n\r\nQList<QModelIndex> MultiFolderModel::indexForPath(const QString &path) const\r\n{\r\n    QList<QModelIndex> pathList;\r\n    QString findPath = QDir::cleanPath(QDir::fromNativeSeparators(path));\r\n    foreach (QAbstractItemModel *model, this->sourceModelList()) {\r\n        QFileSystemModel *fs = (QFileSystemModel*)model;\r\n        if (!findPath.startsWith(fs->rootPath()+\"/\")) {\r\n            continue;\r\n        }\r\n        QModelIndex index = fs->index(findPath);\r\n        if (index.isValid()) {\r\n            pathList << this->mapFromSourceEx(model,index);\r\n        }\r\n    }\r\n    return pathList;\r\n}\r\n\r\nQModelIndex MultiFolderModel::indexForPath(QFileSystemModel *sourceModel, const QString &path) const\r\n{\r\n    QString findPath = QDir::cleanPath(QDir::fromNativeSeparators(path));\r\n    foreach (QAbstractItemModel *model, this->sourceModelList()) {\r\n        QFileSystemModel *fs = (QFileSystemModel*)model;\r\n        if (fs != sourceModel) {\r\n            continue;\r\n        }\r\n        if (!findPath.startsWith(fs->rootPath())) {\r\n            continue;\r\n        }\r\n        QModelIndex index = fs->index(path);\r\n        if (index.isValid()) {\r\n            return this->mapFromSourceEx(model,index);\r\n        }\r\n    }\r\n    return QModelIndex();\r\n}\r\n\r\nvoid MultiFolderModel::setFilter(QDir::Filters filters)\r\n{\r\n    if (m_filters == filters) {\r\n        return;\r\n    }\r\n    m_filters = filters;\r\n    foreach (QAbstractItemModel *model, this->sourceModelList()) {\r\n        ((QFileSystemModel*)model)->setFilter(filters);\r\n    }\r\n}\r\n\r\nQDir::Filters MultiFolderModel::filter() const\r\n{\r\n    return m_filters;\r\n}\r\n\r\nvoid MultiFolderModel::setSorting(QDir::SortFlags sort)\r\n{\r\n    m_sorts = sort;\r\n}\r\n\r\nQDir::SortFlags MultiFolderModel::sorting() const\r\n{\r\n    return m_sorts;\r\n}\r\n\r\nvoid MultiFolderModel::setResolveSymlinks(bool enable)\r\n{\r\n    if (m_resolveSymlinks == enable) {\r\n        return;\r\n    }\r\n    m_resolveSymlinks = enable;\r\n    foreach (QAbstractItemModel *model, this->sourceModelList()) {\r\n        ((QFileSystemModel*)model)->setResolveSymlinks(enable);\r\n    }\r\n}\r\n\r\nbool MultiFolderModel::resolveSymlinks() const\r\n{\r\n    return m_resolveSymlinks;\r\n}\r\n\r\nvoid MultiFolderModel::setReadOnly(bool enable)\r\n{\r\n    if (m_isReadOnly == enable) {\r\n        return;\r\n    }\r\n    m_isReadOnly = enable;\r\n    foreach (QAbstractItemModel *model, this->sourceModelList()) {\r\n        ((QFileSystemModel*)model)->setReadOnly(enable);\r\n    }\r\n}\r\n\r\nbool MultiFolderModel::isReadOnly() const\r\n{\r\n    return m_isReadOnly;\r\n}\r\n\r\nvoid MultiFolderModel::setNameFilterDisables(bool enable)\r\n{\r\n    if (m_nameFilterDisables == enable) {\r\n        return;\r\n    }\r\n    m_nameFilterDisables = enable;\r\n    foreach (QAbstractItemModel *model, this->sourceModelList()) {\r\n        ((QFileSystemModel*)model)->setNameFilterDisables(enable);\r\n    }\r\n}\r\n\r\nbool MultiFolderModel::nameFilterDisables() const\r\n{\r\n    return m_nameFilterDisables;\r\n}\r\n\r\nvoid MultiFolderModel::setNameFilters(const QStringList &filters)\r\n{\r\n    if (m_nameFilters == filters) {\r\n        return;\r\n    }\r\n    m_nameFilters = filters;\r\n    foreach (QAbstractItemModel *model, this->sourceModelList()) {\r\n        ((QFileSystemModel*)model)->setNameFilters(filters);\r\n    }\r\n}\r\n\r\nQStringList MultiFolderModel::nameFilters() const\r\n{\r\n    return m_nameFilters;\r\n}\r\n\r\nvoid MultiFolderModel::setShowDetails(bool b)\r\n{\r\n    emit layoutAboutToBeChanged();\r\n    m_isShowDetails = b;\r\n    emit layoutChanged();\r\n}\r\n\r\nbool MultiFolderModel::isShowDetails() const\r\n{\r\n    return m_isShowDetails;\r\n}\r\n\r\nbool MultiFolderModel::lessThan(const QAbstractItemModel *sourceModel, const QModelIndex &left, const QModelIndex &right) const\r\n{\r\n    QDirSortItemComparator comp(m_sorts);\r\n    QDirSortItem n1;\r\n    QDirSortItem n2;\r\n    n1.item = ((QFileSystemModel*)sourceModel)->fileInfo(left);\r\n    n2.item = ((QFileSystemModel*)sourceModel)->fileInfo(right);\r\n    return comp.sort(n1,n2);\r\n}\r\n\r\nbool MultiFolderModel::filterAcceptsRow(const QAbstractItemModel *sourceModel,  int source_row, const QModelIndex &source_parent) const\r\n{\r\n//    QFileSystemModel *model = (QFileSystemModel*)sourceModel;\r\n//    QModelIndex index = model->index(source_row,0,source_parent);\r\n//    QFileInfo info = model->fileInfo(index);\r\n//    if (info.fileName().startsWith(\".\")) {\r\n//        return false;\r\n//    }\r\n    return true;\r\n}\r\n\r\nint MultiFolderModel::columnCount(const QModelIndex &parent) const\r\n{\r\n    if (m_isShowDetails) {\r\n        return MultiIndexModel::columnCount(parent);\r\n    }\r\n    return 1;\r\n}\r\n\r\nvoid MultiFolderModel::slotDirectoryLoaded(const QString &path)\r\n{\r\n    emit directoryLoaded((QFileSystemModel*)sender(),path);\r\n}\r\n"
  },
  {
    "path": "liteidex/src/utils/folderview/multifoldermodel.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: multifoldermodel.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MULTIFOLDERMODEL_H\n#define MULTIFOLDERMODEL_H\n\n#include \"multiindexmodel.h\"\n#include <QDir>\n#include <QMap>\n#include <QFileSystemModel>\n\nclass MultiFolderModel : public MultiIndexModel\n{\n    Q_OBJECT\npublic:\n    explicit MultiFolderModel(QObject* parent = 0);\n    virtual ~MultiFolderModel();\npublic:\n    QModelIndex addRootPath(const QString &path);\n    void removeRootPath(const QString &path);\n    void removeRoot(const QModelIndex &index);\n\n    bool isRootPath(const QString &path) const;\n    bool isRootIndex(const QModelIndex &index) const;\n    void clearAll();\n    void reloadAll();\n\n    QList<QModelIndex> rootIndexs() const;\n    QStringList rootPathList() const;\n\n    QString filePath(const QModelIndex &index) const;\n    QString fileName(const QModelIndex &index) const;\n    QFileInfo fileInfo(const QModelIndex &index) const;\n    QString fileRootPath(const QModelIndex &index) const;\n\n    bool isDir(const QModelIndex &index) const;\n    qint64 size(const QModelIndex &index) const;\n    QString type(const QModelIndex &index) const;\n    QDateTime lastModified(const QModelIndex &index) const;\n    QFile::Permissions permissions(const QModelIndex &index) const;\n\n    bool remove(const QModelIndex &index);\n    bool rmdir(const QModelIndex &index);\n\n    QList<QModelIndex> indexForPath(const QString &path) const;\n    QModelIndex indexForPath(QFileSystemModel* sourceModel,const QString &path) const;\nsignals:\n    void directoryLoaded(QFileSystemModel*,QString);\npublic:\n    void setFilter(QDir::Filters filters);\n    QDir::Filters filter() const;\n\n    void setSorting(QDir::SortFlags sort);\n    QDir::SortFlags sorting() const;\n\n    void setResolveSymlinks(bool enable);\n    bool resolveSymlinks() const;\n\n    void setReadOnly(bool enable);\n    bool isReadOnly() const;\n\n    void setNameFilterDisables(bool enable);\n    bool nameFilterDisables() const;\n\n    void setNameFilters(const QStringList &filters);\n    QStringList nameFilters() const;\n\n    void setShowDetails(bool b);\n    bool isShowDetails() const;\npublic:\n    virtual bool lessThan(const QAbstractItemModel *sourceModel, const QModelIndex &left, const QModelIndex &right) const;\n    virtual bool filterAcceptsRow(const QAbstractItemModel *sourceModel, int source_row, const QModelIndex &source_parent) const;\n    virtual int columnCount(const QModelIndex& parent = QModelIndex()) const;\nprotected slots:\n    void slotDirectoryLoaded(const QString &path);\nprotected:\n    QDir::SortFlags m_sorts;\n    QDir::Filters   m_filters;\n    bool            m_resolveSymlinks;\n    bool            m_isReadOnly;\n    bool            m_nameFilterDisables;\n    bool            m_isShowDetails;\n    QStringList     m_nameFilters;\n};\n\n#endif // MULTIFOLDERMODEL_H\n"
  },
  {
    "path": "liteidex/src/utils/folderview/multifolderview.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: multifolderview.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"multifolderview.h\"\r\n#include <QMessageBox>\r\n#include <QHeaderView>\r\n#include <QDebug>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nMultiFolderView::MultiFolderView(LiteApi::IApplication *app, QWidget *parent)\r\n    : BaseFolderView(app,parent)\r\n{\r\n    m_model = new MultiFolderModel(this);\r\n\r\n#ifdef Q_OS_MAC\r\n    m_model->sort(0);\r\n    m_model->setSorting(QDir::DirsFirst|QDir::Name|QDir::IgnoreCase);\r\n#endif\r\n\r\n    this->setModel(m_model);\r\n    this->setHeaderHidden(true);\r\n\r\n    m_contextMenu = new QMenu(this);\r\n    this->setSelectionMode(QAbstractItemView::ExtendedSelection);\r\n\r\n    setContextMenuPolicy(Qt::CustomContextMenu);\r\n    connect(this,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(customContextMenuRequested(QPoint)));\r\n    connect(m_model,SIGNAL(directoryLoaded(QFileSystemModel*,QString)),this,SLOT(directoryLoaded(QFileSystemModel*,QString)));\r\n}\r\n\r\nMultiFolderView::~MultiFolderView()\r\n{\r\n}\r\n\r\nvoid MultiFolderView::setFilter(QDir::Filters filters)\r\n{\r\n    m_model->setFilter(filters);\r\n}\r\n\r\nQDir::Filters MultiFolderView::filter() const\r\n{\r\n    return m_model->filter();\r\n}\r\n\r\nvoid MultiFolderView::setNameFilters(const QStringList &filters)\r\n{\r\n    m_model->setNameFilters(filters);\r\n}\r\n\r\nQStringList MultiFolderView::nameFilters() const\r\n{\r\n    return m_model->nameFilters();\r\n}\r\n\r\nQFileInfo MultiFolderView::fileInfo(const QModelIndex &index) const\r\n{\r\n    return m_model->fileInfo(index);\r\n}\r\n\r\nQString MultiFolderView::fileRootPath(const QModelIndex &index) const\r\n{\r\n    return m_model->fileRootPath(index);\r\n}\r\n\r\nbool MultiFolderView::addRootPath(const QString &path)\r\n{\r\n    if (m_model->isRootPath(path)) {\r\n        return true;\r\n    }\r\n    QModelIndex index = m_model->addRootPath(path);\r\n    return index.isValid();\r\n}\r\n\r\nvoid MultiFolderView::setRootPathList(const QStringList &pathList)\r\n{\r\n    m_model->clearAll();\r\n    foreach (QString path, pathList) {\r\n        m_model->addRootPath(path);\r\n    }\r\n}\r\n\r\nQStringList MultiFolderView::rootPathList() const\r\n{\r\n    return m_model->rootPathList();\r\n}\r\n\r\nvoid MultiFolderView::clear()\r\n{\r\n    m_model->clearAll();\r\n}\r\n\r\nvoid MultiFolderView::expandFolder(const QString &path, bool expand)\r\n{\r\n    QList<QModelIndex> indexList = m_model->indexForPath(path);\r\n    foreach (QModelIndex sourceIndex, indexList) {\r\n        QModelIndex index = sourceIndex;\r\n        if (expand) {\r\n            this->expand(index);\r\n        } else {\r\n            this->collapse(index);\r\n        }\r\n    }\r\n}\r\n\r\nQList<QModelIndex> MultiFolderView::indexForPath(const QString &path) const\r\n{\r\n    return m_model->indexForPath(path);\r\n}\r\n\r\nvoid MultiFolderView::setShowDetails(bool b)\r\n{\r\n    m_model->setShowDetails(b);\r\n}\r\n\r\nbool MultiFolderView::isShowDetails() const\r\n{\r\n    return m_model->isShowDetails();\r\n}\r\n\r\nQModelIndex MultiFolderView::findIndexForContext(const QString &filePath) const\r\n{\r\n    if (!m_contextIndex.isValid()) {\r\n        return QModelIndex();\r\n    }\r\n    QModelIndex si = m_model->mapToSource(m_contextIndex);\r\n    QModelIndexList list = this->indexForPath(filePath);\r\n    foreach (QModelIndex index, list) {\r\n        if (m_model->mapToSource(index).model() == si.model()) {\r\n            return index;\r\n        }\r\n    }\r\n    return QModelIndex();\r\n}\r\n\r\nvoid MultiFolderView::removeIndex(const QModelIndex &index)\r\n{\r\n    m_model->remove(index);\r\n}\r\n\r\nvoid MultiFolderView::customContextMenuRequested(const QPoint &pos)\r\n{\r\n    m_contextMenu->clear();\r\n\r\n    LiteApi::FILESYSTEM_CONTEXT_FLAG flag = LiteApi::FILESYSTEM_ROOT;\r\n    QModelIndex index = this->indexAt(pos);\r\n    if (index.isValid()) {\r\n        m_contextIndex = index;\r\n        QModelIndex sourceIndex = index;\r\n        m_contextInfo = m_model->fileInfo(sourceIndex);\r\n        if (m_model->isRootIndex(sourceIndex)) {\r\n            flag = LiteApi::FILESYSTEM_ROOTFOLDER;\r\n        } else if (m_model->isDir(sourceIndex)) {\r\n            flag = LiteApi::FILESYSTEM_FOLDER;\r\n        } else {\r\n            flag = LiteApi::FILESYSTEM_FILES;\r\n        }\r\n    } else {\r\n        m_contextIndex = this->rootIndex();\r\n        m_contextInfo = QFileInfo();\r\n    }\r\n    //root folder\r\n    if (flag == LiteApi::FILESYSTEM_ROOT) {\r\n        m_contextMenu->addAction(m_openFolderAct);\r\n    } else if (flag == LiteApi::FILESYSTEM_ROOTFOLDER) {\r\n#ifdef Q_OS_MAC\r\n        if (m_contextInfo.isBundle()) {\r\n            m_contextMenu->addAction(m_openBundleAct);\r\n            m_contextMenu->addSeparator();\r\n        }\r\n#endif\r\n        m_contextMenu->addAction(m_openInNewWindowAct);\r\n        m_contextMenu->addSeparator();\r\n        m_contextMenu->addAction(m_newFileAct);\r\n        m_contextMenu->addAction(m_newFileWizardAct);\r\n        m_contextMenu->addAction(m_newFolderAct);\r\n        m_contextMenu->addSeparator();\r\n        m_contextMenu->addAction(m_reloadFolderAct);\r\n        m_contextMenu->addAction(m_closeFolderAct);\r\n        m_contextMenu->addSeparator();\r\n        m_contextMenu->addSeparator();\r\n        m_contextMenu->addAction(m_copyFileAct);\r\n        m_contextMenu->addAction(m_pasteFileAct);\r\n        m_contextMenu->addSeparator();\r\n        m_contextMenu->addAction(m_copyFullPathToClipboardAct);\r\n        m_contextMenu->addSeparator();\r\n        m_contextMenu->addAction(m_openExplorerAct);\r\n        m_contextMenu->addAction(m_openShellAct);\r\n        m_contextMenu->addAction(m_openTerminalAct);\r\n    } else if (flag == LiteApi::FILESYSTEM_FOLDER) {\r\n#ifdef Q_OS_MAC\r\n        if (m_contextInfo.isBundle()) {\r\n            m_contextMenu->addAction(m_openBundleAct);\r\n            m_contextMenu->addSeparator();\r\n        }\r\n#endif\r\n        m_contextMenu->addAction(m_openInNewWindowAct);\r\n        m_contextMenu->addSeparator();\r\n        m_contextMenu->addAction(m_newFileAct);\r\n        m_contextMenu->addAction(m_newFileWizardAct);\r\n        m_contextMenu->addAction(m_newFolderAct);\r\n        m_contextMenu->addAction(m_renameFolderAct);\r\n\r\n        if (this->canMoveToTrash()) {\r\n            m_contextMenu->addAction(m_moveToTrashAct);\r\n        } else {\r\n            m_contextMenu->addAction(m_removeFolderAct);\r\n        }\r\n\r\n        m_contextMenu->addSeparator();\r\n        m_contextMenu->addAction(m_copyFileAct);\r\n        m_contextMenu->addAction(m_pasteFileAct);\r\n        m_contextMenu->addSeparator();\r\n        m_contextMenu->addAction(m_copyFullPathToClipboardAct);\r\n        m_contextMenu->addSeparator();\r\n        m_contextMenu->addAction(m_openExplorerAct);\r\n        m_contextMenu->addAction(m_openShellAct);\r\n        m_contextMenu->addAction(m_openTerminalAct);\r\n    } else if (flag == LiteApi::FILESYSTEM_FILES) {\r\n        m_contextMenu->addAction(m_openEditorAct);\r\n        m_contextMenu->addMenu(this->openWithMenu());\r\n        m_contextMenu->addSeparator();\r\n        m_contextMenu->addAction(m_newFileAct);\r\n        m_contextMenu->addAction(m_newFileWizardAct);\r\n        m_contextMenu->addAction(m_newFolderAct);\r\n        m_contextMenu->addAction(m_renameFileAct);\r\n\r\n        if (this->canMoveToTrash()) {\r\n            m_contextMenu->addAction(m_moveToTrashAct);\r\n        } else {\r\n            m_contextMenu->addAction(m_removeFileAct);\r\n        }\r\n\r\n        m_contextMenu->addSeparator();\r\n        m_contextMenu->addAction(m_copyFileAct);\r\n        m_contextMenu->addAction(m_pasteFileAct);\r\n        m_contextMenu->addSeparator();\r\n        m_contextMenu->addAction(m_copyFullPathToClipboardAct);\r\n        m_contextMenu->addSeparator();\r\n        m_contextMenu->addAction(m_openExplorerAct);\r\n        m_contextMenu->addAction(m_openShellAct);\r\n        m_contextMenu->addAction(m_openTerminalAct);\r\n    }\r\n    m_pasteFileAct->setEnabled(this->canPasteFile());\r\n\r\n    bool check = this->selectionModel()->selectedRows(0).size() == 1;\r\n    m_removeFileAct->setEnabled(check);\r\n    m_removeFolderAct->setEnabled(check);\r\n    m_renameFileAct->setEnabled(check);\r\n    m_renameFolderAct->setEnabled(check);\r\n\r\n    check = true;\r\n    foreach (QModelIndex index, this->selectionCopyOrRemoveList()) {\r\n        if (this->m_model->isRootIndex(index)) {\r\n            check = false;\r\n            break;\r\n        }\r\n    }\r\n    this->m_moveToTrashAct->setEnabled(check && !this->selectionCopyOrRemoveList().isEmpty());\r\n\r\n    emit aboutToShowContextMenu(m_contextMenu,flag,m_contextInfo);\r\n    m_contextMenu->exec(this->mapToGlobal(pos));\r\n}\r\n\r\nvoid MultiFolderView::removeFolder()\r\n{\r\n    QFileInfo info = m_contextInfo;\r\n    if (!info.isDir()) {\r\n        return;\r\n    }\r\n\r\n    int ret = QMessageBox::warning(m_liteApp->mainWindow(),tr(\"Delete Folder\"),\r\n                          tr(\"Are you sure that you want to permanently delete this folder and all of its contents?\")\r\n                          +\"\\n\"+info.filePath(),\r\n                          QMessageBox::Yes | QMessageBox::No, QMessageBox::No);\r\n    if (ret == QMessageBox::Yes) {\r\n        QModelIndex index = this->currentIndex();\r\n        if (!m_model->remove(index)) {\r\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Delete Folder\"),\r\n                                     tr(\"Failed to delete the folder!\"));\r\n        }\r\n    }\r\n}\r\n\r\n\r\nvoid MultiFolderView::removeFile()\r\n{\r\n    QFileInfo info = m_contextInfo;\r\n    if (!info.isFile()) {\r\n        return;\r\n    }\r\n\r\n    int ret = QMessageBox::question(m_liteApp->mainWindow(),tr(\"Delete File\"),\r\n                          tr(\"Are you sure that you want to permanently delete this file?\")\r\n                          +\"\\n\"+info.filePath(),\r\n                          QMessageBox::Yes | QMessageBox::No, QMessageBox::No);\r\n    if (ret == QMessageBox::Yes) {\r\n        QModelIndex index = this->currentIndex();\r\n        if (!m_model->remove(index)) {\r\n            QMessageBox::information(m_liteApp->mainWindow(),tr(\"Delete File\"),\r\n                                     tr(\"Failed to delete the file!\"));\r\n        }\r\n    }\r\n}\r\n\r\nvoid MultiFolderView::openFolder()\r\n{\r\n    m_liteApp->fileManager()->openFolder();\r\n}\r\n\r\nvoid MultiFolderView::closeFolder()\r\n{\r\n    QModelIndex index = this->currentIndex();\r\n    m_model->removeRoot(index);\r\n}\r\n\r\nvoid MultiFolderView::reloadFolder()\r\n{\r\n    m_model->reloadAll();\r\n}\r\n\r\nvoid MultiFolderView::closeAllFolders()\r\n{\r\n    m_model->clearAll();\r\n}\r\n\r\nvoid MultiFolderView::directoryLoaded(QFileSystemModel *model, const QString &path)\r\n{\r\n    QModelIndex index = m_model->indexForPath(model,path);\r\n    if (!index.isValid()) {\r\n        return;\r\n    }\r\n}\r\n\r\nQModelIndexList MultiFolderView::selectionCopyOrRemoveList() const\r\n{\r\n    QModelIndexList selection = this->selectionModel()->selectedRows(0);\r\n    if (selection.size() <= 1) {\r\n        return selection;\r\n    }\r\n    QStringList dirList;\r\n    foreach (QModelIndex index, selection) {\r\n        if (m_model->isDir(index)) {\r\n            dirList  << QDir::cleanPath(m_model->fileInfo(index).filePath());\r\n        }\r\n    }\r\n    QModelIndexList itemList;\r\n    foreach (QModelIndex index, selection) {\r\n        QString filePath = QDir::cleanPath(m_model->fileInfo(index).filePath());\r\n        QStringList chkList = dirList;\r\n        chkList.removeAll(filePath);\r\n        bool find = false;\r\n        foreach (QString chk, chkList) {\r\n            if (filePath.startsWith(chk+\"/\")) {\r\n                find = true;\r\n                break;\r\n            }\r\n        }\r\n        if (!find) {\r\n            itemList << index;\r\n        }\r\n    }\r\n    return itemList;\r\n}\r\n"
  },
  {
    "path": "liteidex/src/utils/folderview/multifolderview.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: multifolderview.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MULTIFOLDERVIEW_H\n#define MULTIFOLDERVIEW_H\n\n#include \"basefoldeview.h\"\n#include \"multifoldermodel.h\"\n\nclass MultiFolderView : public BaseFolderView\n{\npublic:\n    Q_OBJECT\npublic:\n    explicit MultiFolderView(LiteApi::IApplication *app, QWidget *parent = 0);\n    virtual ~MultiFolderView();\n    void setFilter(QDir::Filters filters);\n    QDir::Filters filter() const;\n    void setNameFilters(const QStringList &filters);\n    QStringList nameFilters() const;\n    QFileInfo fileInfo(const QModelIndex &index) const;\n    QString fileRootPath(const QModelIndex &index) const;\npublic:\n    bool addRootPath(const QString &path);\n    void setRootPathList(const QStringList &pathList);\n    QStringList rootPathList() const;\n    void clear();\n    void expandFolder(const QString &path, bool expand);\n    QList<QModelIndex> indexForPath(const QString &path) const;\n    bool isShowDetails() const;\n    virtual QModelIndex findIndexForContext(const QString &filePath) const;\n    virtual void removeIndex(const QModelIndex &index);\npublic slots:\n    void setShowDetails(bool b);\npublic slots:\n    void customContextMenuRequested(const QPoint &pos);\n    virtual void removeFolder();\n    virtual void removeFile();\n    virtual void openFolder();\n    virtual void closeFolder();\n    virtual void reloadFolder();\n    virtual void closeAllFolders();\nprotected slots:\n    void directoryLoaded(QFileSystemModel *model,const QString &path);\nprotected:\n    virtual QModelIndexList selectionCopyOrRemoveList() const;\n    MultiFolderModel *m_model;\n    QMenu            *m_contextMenu;\n};\n\n#endif // MULTIFOLDERVIEW_H\n"
  },
  {
    "path": "liteidex/src/utils/folderview/multiindexmodel.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: multiindexmodel.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"multiindexmodel.h\"\r\n\r\n/****************************************************************************\r\n**\r\n** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>\r\n** Contact: http://www.qt-project.org/legal\r\n**\r\n** This file is part of the QtGui module of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:LGPL$\r\n** Commercial License Usage\r\n** Licensees holding valid commercial Qt licenses may use this file in\r\n** accordance with the commercial license agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and Digia.  For licensing terms and\r\n** conditions see http://qt.digia.com/licensing.  For further information\r\n** use the contact form at http://qt.digia.com/contact-us.\r\n**\r\n** GNU Lesser General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU Lesser\r\n** General Public License version 2.1 as published by the Free Software\r\n** Foundation and appearing in the file LICENSE.LGPL included in the\r\n** packaging of this file.  Please review the following information to\r\n** ensure the GNU Lesser General Public License version 2.1 requirements\r\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r\n**\r\n** In addition, as a special exception, Digia gives you certain additional\r\n** rights.  These rights are described in the Digia Qt LGPL Exception\r\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n** GNU General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU\r\n** General Public License version 3.0 as published by the Free Software\r\n** Foundation and appearing in the file LICENSE.GPL included in the\r\n** packaging of this file.  Please review the following information to\r\n** ensure the GNU General Public License version 3.0 requirements will be\r\n** met: http://www.gnu.org/copyleft/gpl.html.\r\n**\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\n#include \"multiindexmodel_p.h\"\r\n\r\n#include <QTime>\r\n#include <QDebug>\r\n\r\n\r\nclass MultiIndexModelLessThan\r\n{\r\npublic:\r\n    inline MultiIndexModelLessThan(int column, const QModelIndex &parent,\r\n                                       const QAbstractItemModel *source,\r\n                                       const MultiIndexModel *proxy)\r\n        : sort_column(column), source_parent(parent), source_model(source), proxy_model(proxy) {}\r\n\r\n    inline bool operator()(int r1, int r2) const\r\n    {\r\n        QModelIndex i1 = source_model->index(r1, sort_column, source_parent);\r\n        QModelIndex i2 = source_model->index(r2, sort_column, source_parent);\r\n        return proxy_model->lessThan(source_model,i1, i2);\r\n    }\r\n\r\nprivate:\r\n    int sort_column;\r\n    QModelIndex source_parent;\r\n    const QAbstractItemModel *source_model;\r\n    const MultiIndexModel *proxy_model;\r\n};\r\n\r\nclass MultiIndexModelGreaterThan\r\n{\r\npublic:\r\n    inline MultiIndexModelGreaterThan(int column, const QModelIndex &parent,\r\n                                          const QAbstractItemModel *source,\r\n                                          const MultiIndexModel *proxy)\r\n        : sort_column(column), source_parent(parent),\r\n          source_model(source), proxy_model(proxy) {}\r\n\r\n    inline bool operator()(int r1, int r2) const\r\n    {\r\n        QModelIndex i1 = source_model->index(r1, sort_column, source_parent);\r\n        QModelIndex i2 = source_model->index(r2, sort_column, source_parent);\r\n        return proxy_model->lessThan(source_model,i2, i1);\r\n    }\r\n\r\nprivate:\r\n    int sort_column;\r\n    QModelIndex source_parent;\r\n    const QAbstractItemModel *source_model;\r\n    const MultiIndexModel *proxy_model;\r\n};\r\n\r\nQModelIndexPairList MultiIndexModelPrivate::store_persistent_indexes(const QModelIndexList &persistentList)\r\n{\r\n    Q_Q(MultiIndexModel);\r\n    QModelIndexPairList source_indexes;\r\n    foreach (QModelIndex proxy_index, persistentList) {\r\n        SourceModelIndex index = q->mapToSourceEx(proxy_index);\r\n        source_indexes.append(qMakePair(proxy_index, QPersistentModelIndex(index.index)));\r\n    }\r\n    return source_indexes;\r\n}\r\n\r\nvoid MultiIndexModelPrivate::update_persistent_indexes(const QModelIndexPairList &source_indexes)\r\n{\r\n    Q_Q(MultiIndexModel);\r\n    QModelIndexList from, to;\r\n    for (int i = 0; i < source_indexes.count(); ++i) {\r\n        QModelIndex source_index = source_indexes.at(i).second;\r\n        QModelIndex old_proxy_index = source_indexes.at(i).first;\r\n        if (source_index.isValid()) {\r\n            QAbstractItemModel *model = (QAbstractItemModel *)source_index.model();\r\n            createMapping(model,source_index.parent(),false);\r\n            //createMapping(model,source_index,true);\r\n            QModelIndex proxy_index = q->mapFromSourceEx(model,source_index);\r\n            from << old_proxy_index;\r\n            to << proxy_index;\r\n        } else {\r\n            from << old_proxy_index;\r\n            to << QModelIndex();\r\n        }\r\n    }\r\n    q->changePersistentIndexList(from, to);\r\n}\r\n\r\n\r\nvoid MultiIndexModelPrivate::sort_source_rows(QAbstractItemModel *model,\r\n    QVector<int> &source_rows, const QModelIndex &source_parent) const\r\n{\r\n    Q_Q(const MultiIndexModel);\r\n    if (source_sort_column >= 0) {\r\n        if (sort_order == Qt::AscendingOrder) {\r\n            MultiIndexModelLessThan lt(source_sort_column, source_parent, model, q);\r\n            qStableSort(source_rows.begin(), source_rows.end(), lt);\r\n        } else {\r\n            MultiIndexModelGreaterThan gt(source_sort_column, source_parent, model, q);\r\n            qStableSort(source_rows.begin(), source_rows.end(), gt);\r\n        }\r\n    } else { // restore the source model order\r\n        qStableSort(source_rows.begin(), source_rows.end());\r\n    }\r\n}\r\n\r\n\r\n/*!\r\n    \\since 4.8\r\n    \\class MultiIndexModel\r\n    \\brief The MultiIndexModel class proxies its source model unmodified\r\n\r\n    \\ingroup model-view\r\n\r\n    MultiIndexModel can be used to forward the structure of a source model exactly, with no sorting, filtering or other transformation.\r\n    This is similar in concept to an identity matrix where A.I = A.\r\n\r\n    Because it does no sorting or filtering, this class is most suitable to proxy models which transform the data() of the source model.\r\n    For example, a proxy model could be created to define the font used, or the background colour, or the tooltip etc. This removes the\r\n    need to implement all data handling in the same class that creates the structure of the model, and can also be used to create\r\n    re-usable components.\r\n\r\n    This also provides a way to change the data in the case where a source model is supplied by a third party which can not be modified.\r\n\r\n    \\snippet doc/src/snippets/code/src_gui_itemviews_MultiIndexModel.cpp 0\r\n\r\n    \\sa QAbstractProxyModel, {Model/View Programming}, QAbstractItemModel\r\n\r\n*/\r\n\r\n/*!\r\n    Constructs an identity model with the given \\a parent.\r\n*/\r\nMultiIndexModel::MultiIndexModel(QObject* parent)\r\n  : AbstractMultiProxyModel(*new MultiIndexModelPrivate, parent)\r\n{\r\n\r\n}\r\n\r\n/*! \\internal\r\n */\r\nMultiIndexModel::MultiIndexModel(MultiIndexModelPrivate &dd, QObject* parent)\r\n  : AbstractMultiProxyModel(dd, parent)\r\n{\r\n\r\n}\r\n\r\nbool MultiIndexModel::lessThan(const QAbstractItemModel */*sourceModel*/, const QModelIndex &left, const QModelIndex &right) const\r\n{\r\n    Q_D(const MultiIndexModel);\r\n    QVariant l = (left.model() ? left.model()->data(left, d->sort_role) : QVariant());\r\n    QVariant r = (right.model() ? right.model()->data(right, d->sort_role) : QVariant());\r\n    switch (l.userType()) {\r\n    case QVariant::Invalid:\r\n        return (r.type() != QVariant::Invalid);\r\n    case QVariant::Int:\r\n        return l.toInt() < r.toInt();\r\n    case QVariant::UInt:\r\n        return l.toUInt() < r.toUInt();\r\n    case QVariant::LongLong:\r\n        return l.toLongLong() < r.toLongLong();\r\n    case QVariant::ULongLong:\r\n        return l.toULongLong() < r.toULongLong();\r\n    case QMetaType::Float:\r\n        return l.toFloat() < r.toFloat();\r\n    case QVariant::Double:\r\n        return l.toDouble() < r.toDouble();\r\n    case QVariant::Char:\r\n        return l.toChar() < r.toChar();\r\n    case QVariant::Date:\r\n        return l.toDate() < r.toDate();\r\n    case QVariant::Time:\r\n        return l.toTime() < r.toTime();\r\n    case QVariant::DateTime:\r\n        return l.toDateTime() < r.toDateTime();\r\n    case QVariant::String:\r\n    default:\r\n        if (d->sort_localeaware)\r\n            return l.toString().localeAwareCompare(r.toString()) < 0;\r\n        else\r\n            return l.toString().compare(r.toString(), d->sort_casesensitivity) < 0;\r\n    }\r\n    return false;\r\n}\r\n\r\nbool MultiIndexModel::filterAcceptsRow(const QAbstractItemModel */*sourceModel*/, int /*source_row*/, const QModelIndex &/*source_parent*/) const\r\n{\r\n    return true;\r\n}\r\n\r\n/*!\r\n    Destroys this identity model.\r\n*/\r\nMultiIndexModel::~MultiIndexModel()\r\n{\r\n    Q_D(MultiIndexModel);\r\n    d->clearMapping();\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nint MultiIndexModel::columnCount(const QModelIndex& parent) const\r\n{\r\n    Q_ASSERT(parent.isValid() ? parent.model() == this : true);\r\n    Q_D(const MultiIndexModel);\r\n    if (d->indexList.isEmpty()) {\r\n        return 0;\r\n    }\r\n    SourceModelIndex source = mapToSourceEx(parent);\r\n    if (source.model == 0) {\r\n        return d->indexList[0].model->columnCount();\r\n    }\r\n    return source.model->columnCount(source.index);\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nbool MultiIndexModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent)\r\n{\r\n    //Q_ASSERT(parent.isValid() ? parent.model() == this : true);\r\n   // Q_D(MultiIndexModel);\r\n    SourceModelIndex source = mapToSourceEx(parent);\r\n    return source.model->dropMimeData(data, action, row, column,source.index);\r\n}\r\n\r\nQMap<QModelIndex,Mapping*>::iterator MultiIndexModelPrivate::createMapping(QAbstractItemModel *model, const QModelIndex &parent, bool forceUpdate, const QString &/*context*/) const\r\n{        \r\n    Q_Q(const MultiIndexModel);\r\n    QMap<QModelIndex,Mapping*>::iterator it = modelMapping[model].find(parent);\r\n    if (it == modelMapping[model].end()) {\r\n        Mapping *m = new Mapping;\r\n        m->rowCount = 0;\r\n        m->sourceParent = parent;\r\n        m->sourceModel = model;\r\n        it = modelMapping[model].insert(parent,m);\r\n        forceUpdate = true;\r\n    }\r\n    if (forceUpdate) {\r\n        Mapping *m = it.value();\r\n        int rowCount = model->rowCount(parent);\r\n\r\n        //qDebug() << context << parent.data() << rowCount;\r\n        QVector<int> rows;\r\n        rows.reserve(rowCount);\r\n        for (int i = 0; i < rowCount; ++i) {\r\n            if (q->filterAcceptsRow(model,i, parent))\r\n                rows.append(i);\r\n        }\r\n//        for (int i = 0; i < rowCount; i++) {\r\n//            rows[i] = i;\r\n//        }\r\n        sort_source_rows(model,rows,parent);\r\n        m->rowCount = rowCount;\r\n        m->source_rows.swap(rows);\r\n        m->proxy_rows.resize(rowCount);\r\n        this->build_source_to_proxy_mapping(m->source_rows,m->proxy_rows);\r\n    }\r\n    return it;\r\n}\r\n\r\nvoid MultiIndexModelPrivate::build_source_to_proxy_mapping(\r\n    const QVector<int> &proxy_to_source, QVector<int> &source_to_proxy) const\r\n{\r\n    source_to_proxy.fill(-1);\r\n    int proxy_count = proxy_to_source.size();\r\n    for (int i = 0; i < proxy_count; ++i)\r\n        source_to_proxy[proxy_to_source.at(i)] = i;\r\n}\r\n\r\nQMap<QModelIndex,Mapping*>::iterator MultiIndexModelPrivate::findOrCreateMapping(QAbstractItemModel *model, const QModelIndex &parent) const\r\n{\r\n    QMap<QModelIndex,Mapping*>::iterator it = modelMapping[model].find(parent);\r\n    if (it == modelMapping[model].end()) {\r\n        it = createMapping(model,parent,true);\r\n    }\r\n    if (parent.isValid()) {\r\n        QModelIndex source_grand_parent = parent.parent();\r\n        findOrCreateMapping(model,source_grand_parent);\r\n    }\r\n    return it;\r\n}\r\n\r\nvoid MultiIndexModelPrivate::clearMapping()\r\n{\r\n    //Q_Q(MultiIndexModel);\r\n    QMutableMapIterator<QAbstractItemModel*, QMap<QModelIndex,Mapping*> > i(modelMapping);\r\n    while (i.hasNext()) {\r\n        i.next();\r\n        qDeleteAll(i.value());\r\n    }\r\n    modelMapping.clear();\r\n}\r\n\r\nvoid MultiIndexModelPrivate::deleteMapping(QAbstractItemModel *model)\r\n{\r\n    QMutableMapIterator<QAbstractItemModel*, QMap<QModelIndex,Mapping*> > i(modelMapping);\r\n    while (i.hasNext()) {\r\n        i.next();\r\n        if (i.key() == model) {\r\n            qDeleteAll(i.value());\r\n            i.remove();\r\n            break;\r\n        }\r\n    }\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nQModelIndex MultiIndexModel::index(int row, int column, const QModelIndex& parent) const\r\n{\r\n    Q_ASSERT(parent.isValid() ? parent.model() == this : true);\r\n    if (!hasIndex(row,column,parent)) {\r\n        return QModelIndex();\r\n    }\r\n    Q_D(const MultiIndexModel);\r\n    if (!parent.isValid()) {\r\n        if (row < d->indexList.size()) {\r\n            return createIndex(row,column);\r\n        }\r\n        return QModelIndex();\r\n    }\r\n    SourceModelIndex sourceParent = mapToSourceEx(parent);\r\n\r\n    QMap<QModelIndex,Mapping*>::iterator it = d->createMapping(sourceParent.model,sourceParent.index,false,\"index\");\r\n//    static int check = 1;\r\n//    if (sourceParent.index.data() == \"DataBase\" && check) {\r\n//        check = 0;\r\n//        qDebug() << \"index\" << it.value()->source_rows << it.value()->proxy_rows;\r\n//    }\r\n//    QMap<QModelIndex,Mapping*>::iterator it = d->modelMapping[sourceParent.model].find(sourceParent.index);\r\n//    if (it == d->modelMapping[sourceParent.model].end())  {\r\n//        it = d->createMapping(sourceParent.model,sourceParent.index);\r\n//    } else {\r\n//        qDebug() << it.value()->proxy_rows;\r\n//    }\r\n\r\n    return createIndex(row,column,it.value());\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nbool MultiIndexModel::insertColumns(int column, int count, const QModelIndex& parent)\r\n{\r\n    //Q_ASSERT(parent.isValid() ? parent.model() == this : true);\r\n    //Q_D(MultiIndexModel);\r\n    SourceModelIndex source = mapToSourceEx(parent);\r\n    return source.model->insertColumns(column, count, source.index);\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nbool MultiIndexModel::insertRows(int row, int count, const QModelIndex& parent)\r\n{\r\n    //Q_ASSERT(parent.isValid() ? parent.model() == this : true);\r\n    //Q_D(MultiIndexModel);\r\n    SourceModelIndex source = mapToSourceEx(parent);\r\n    return source.model->insertRows(row, count, source.index);\r\n}\r\n\r\n\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nQItemSelection MultiIndexModel::mapSelectionFromSource(const QItemSelection& selection) const\r\n{\r\n    Q_D(const MultiIndexModel);\r\n    QItemSelection proxySelection;\r\n\r\n    qDebug() << \"mapSelectionFromSource\";\r\n\r\n    if (d->indexList.isEmpty())\r\n        return proxySelection;\r\n\r\n    QItemSelection::const_iterator it = selection.constBegin();\r\n    const QItemSelection::const_iterator end = selection.constEnd();\r\n    for ( ; it != end; ++it) {\r\n        const QItemSelectionRange range(mapFromSource(it->topLeft()), mapFromSource(it->bottomRight()));\r\n        proxySelection.append(range);\r\n    }\r\n\r\n    return proxySelection;\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nQItemSelection MultiIndexModel::mapSelectionToSource(const QItemSelection& selection) const\r\n{\r\n    Q_D(const MultiIndexModel);\r\n    QItemSelection sourceSelection;\r\n\r\n    qDebug() << \"mapSelectionToSource\";\r\n\r\n    if (d->indexList.isEmpty())\r\n        return sourceSelection;\r\n\r\n    QItemSelection::const_iterator it = selection.constBegin();\r\n    const QItemSelection::const_iterator end = selection.constEnd();\r\n    for ( ; it != end; ++it) {\r\n        //Q_ASSERT(it->model() == this);\r\n        const QItemSelectionRange range(mapToSource(it->topLeft()), mapToSource(it->bottomRight()));\r\n        sourceSelection.append(range);\r\n    }\r\n\r\n    return sourceSelection;\r\n}\r\n\r\nclass MyModel : public QAbstractProxyModel\r\n{\r\n    friend class MultiIndexModel;\r\n};\r\n\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nQModelIndex MultiIndexModel::mapToSource(const QModelIndex& proxyIndex) const\r\n{\r\n    return mapToSourceEx(proxyIndex).index;\r\n}\r\n\r\nSourceModelIndex MultiIndexModel::mapToSourceEx(const QModelIndex &proxyIndex) const\r\n{\r\n    Q_D(const MultiIndexModel);\r\n    if (!proxyIndex.isValid())\r\n        return SourceModelIndex();\r\n\r\n    Q_ASSERT(proxyIndex.model() == this);\r\n\r\n    Mapping *m = (Mapping*)proxyIndex.internalPointer();\r\n    if (m == 0) {\r\n        SourceModelIndex si = d->indexList[proxyIndex.row()];\r\n        si.index = si.index.sibling(si.index.row(),proxyIndex.column());\r\n        return si;\r\n    }\r\n    if (m->source_rows.size() <= proxyIndex.row()) {\r\n        return SourceModelIndex();\r\n    }\r\n\r\n    int source_row = m->source_rows.at(proxyIndex.row());\r\n    //qDebug() << source_row;\r\n    QModelIndex index = m->sourceModel->index(source_row,proxyIndex.column(),m->sourceParent);\r\n    return SourceModelIndex(m->sourceModel,index);\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nQModelIndex MultiIndexModel::mapFromSource(const QModelIndex& sourceIndex) const\r\n{    \r\n    //Q_D(const MultiIndexModel);\r\n    if (!sourceIndex.isValid())\r\n        return QModelIndex();    \r\n    QAbstractItemModel *model = (QAbstractItemModel *)sourceIndex.model();\r\n    return mapFromSourceEx(model,sourceIndex);\r\n}\r\n\r\nQModelIndex MultiIndexModel::mapFromSourceEx(QAbstractItemModel *sourceModel, const QModelIndex &sourceIndex) const\r\n{\r\n    Q_D(const MultiIndexModel);\r\n    if (sourceModel == 0) {\r\n        return QModelIndex();\r\n    }\r\n    int row = d->isRootIndexRow(sourceModel,sourceIndex);\r\n    if (row >= 0) {\r\n        int column = sourceIndex.column();\r\n        if (column < 0) {\r\n            column = 0;\r\n        }\r\n        //d->createMapping(sourceModel,d->indexList[row].index);\r\n        return createIndex(row,column);\r\n    }\r\n\r\n    if (!sourceIndex.isValid()) {\r\n        return QModelIndex();\r\n    }\r\n\r\n    QModelIndex parent = sourceModel->parent(sourceIndex);\r\n\r\n    QMap<QModelIndex,Mapping*>::iterator it = d->createMapping(sourceModel,parent,false,\"map\");// d->modelMapping[sourceModel].find(parent);\r\n//    if (it == d->modelMapping[sourceModel].end()) {\r\n//        it = d->createMapping(sourceModel,parent);\r\n//    }\r\n    Mapping *m = it.value();\r\n\r\n    if (m->proxy_rows.size() <= sourceIndex.row()) {\r\n        return QModelIndex();\r\n    }\r\n\r\n    int proxy_row = m->proxy_rows.at(sourceIndex.row());\r\n   // qDebug() << sourceIndex.data() << proxy_row;\r\n    return createIndex(proxy_row,sourceIndex.column(),m);\r\n    //return QModelIndex();\r\n}\r\n\r\nbool MultiIndexModel::hasChildren(const QModelIndex &parent) const\r\n{\r\n    Q_D(const MultiIndexModel);\r\n    if (!parent.isValid()) {\r\n        return !d->indexList.isEmpty();\r\n    }\r\n\r\n    SourceModelIndex source = mapToSourceEx(parent);\r\n    if (source.model == 0) {\r\n        return false;\r\n    }\r\n//    //if (parent.isValid() && !source.index.isValid())\r\n//    //    return false;\r\n    if (!source.model->hasChildren(source.index))\r\n        return false;\r\n\r\n    if (source.model->canFetchMore(source.index))\r\n        return true; //we assume we might have children that can be fetched\r\n\r\n    return true;\r\n   // Mapping *m = d->createMapping(source.model,source.index,false,\"hasChildren\").value();\r\n   // return m->source_rows.count() != 0;\r\n}\r\n\r\nQModelIndex MultiIndexModel::buddy(const QModelIndex &index) const\r\n{\r\n    Q_D(const MultiIndexModel);\r\n    if (!d->indexValid(index))\r\n        return QModelIndex();\r\n\r\n    SourceModelIndex source = mapToSourceEx(index);\r\n    QModelIndex source_buddy = source.model->buddy(source.index);\r\n    if (source.index == source_buddy)\r\n        return index;\r\n    return mapFromSourceEx(source.model,source_buddy);\r\n}\r\n\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nQModelIndexList MultiIndexModel::match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const\r\n{\r\n    Q_D(const MultiIndexModel);\r\n    Q_ASSERT(start.isValid() ? start.model() == this : true);\r\n    if (d->indexList.isEmpty())\r\n        return QModelIndexList();\r\n\r\n    SourceModelIndex source = mapToSourceEx(start);\r\n    const QModelIndexList sourceList = source.model->match(source.index, role, value, hits, flags);\r\n    QModelIndexList::const_iterator it = sourceList.constBegin();\r\n    const QModelIndexList::const_iterator end = sourceList.constEnd();\r\n    QModelIndexList proxyList;\r\n    for ( ; it != end; ++it)\r\n        proxyList.append(mapFromSourceEx(source.model,*it));\r\n    return proxyList;\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nQModelIndex MultiIndexModel::parent(const QModelIndex& child) const\r\n{\r\n    Q_ASSERT(child.isValid() ? child.model() == this : true);\r\n    //Q_D(const MultiIndexModel);\r\n    if (!child.isValid()) {\r\n        return QModelIndex();\r\n    }\r\n//    SourceModelIndex index = this->mapToSourceEx(child);\r\n//    if (index.model == 0) {\r\n//        return QModelIndex();\r\n//    }\r\n//    return mapFromSourceEx(index.model,index.index.parent());\r\n    Mapping *m = (Mapping*)child.internalPointer();\r\n    if (m == 0) {\r\n        return QModelIndex();\r\n    }\r\n//    if (m->sourceModel != child.model()) {\r\n//        qDebug() << \"error parent\" << child;\r\n//    }\r\n    //qDebug() << m->sourceParent.data().toString();\r\n    return mapFromSourceEx(m->sourceModel,m->sourceParent);\r\n//    const QModelIndex sourceIndex = mapToSource(child);\r\n//    foreach (QModelIndex index, d->indexList) {\r\n//        if (index == sourceIndex) {\r\n//            return QModelIndex();\r\n//        }\r\n//    }\r\n//    const QModelIndex sourceParent = sourceIndex.parent();\r\n//    return mapFromSource(sourceParent);\r\n}\r\n\r\n/*\r\nQModelIndex MultiProxyModel::parent(const QModelIndex &child) const\r\n{\r\n    Q_D(const MultiProxyModel);\r\n    if (!d->indexValid(child))\r\n        return QModelIndex();\r\n    IndexMap::const_iterator it = d->index_to_iterator(child);\r\n    Q_ASSERT(it != d->source_index_mapping.constEnd());\r\n    QModelIndex source_parent = it.key();\r\n    QModelIndex proxy_parent = mapFromSource(source_parent);\r\n    return proxy_parent;\r\n}\r\n*/\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nbool MultiIndexModel::removeColumns(int column, int count, const QModelIndex& parent)\r\n{\r\n    //Q_ASSERT(parent.isValid() ? parent.model() == this : true);\r\n    //Q_D(MultiIndexModel);\r\n    SourceModelIndex source = mapToSourceEx(parent);\r\n    return source.model->removeColumns(column, count, source.index);\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nbool MultiIndexModel::removeRows(int row, int count, const QModelIndex& parent)\r\n{\r\n   // Q_ASSERT(parent.isValid() ? parent.model() == this : true);\r\n    //Q_D(MultiIndexModel);\r\n    SourceModelIndex source = mapToSourceEx(parent);\r\n    return source.model->removeRows(row, count, source.index);\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nint MultiIndexModel::rowCount(const QModelIndex& parent) const\r\n{\r\n    Q_D(const MultiIndexModel);\r\n    if (!parent.isValid()) {\r\n        return d->indexList.size();\r\n    }\r\n    //qDebug() << parent.isValid() << parent.data().toString();\r\n    //Q_ASSERT(parent.isValid() ? parent.model() == this : true);\r\n     SourceModelIndex source = mapToSourceEx(parent);\r\n     //return source.model->rowCount(source.index);\r\n     QMap<QModelIndex,Mapping*>::iterator it = d->createMapping(source.model,source.index,false,\"rowCount\");\r\n     return it.value()->source_rows.count();\r\n     //qDebug() << source.model->rowCount(source.index);\r\n//     return source.model->rowCount(source.index);\r\n//     QMap<QModelIndex,Mapping*>::iterator it = d->createMapping(source.model,source.index);\r\n//     qDebug() << parent.column() << parent << source.index << source.index.data() <<  it.value()->source_rows;\r\n//     return it.value()->source_rows.count();\r\n    //qDebug() << source_parent.isValid();\r\n//     int rows = d->model->rowCount(source_parent);\r\n//     qDebug() << \"rowCount\" << rows << source_parent.data().toString();\r\n//     return rows;\r\n//    QModelIndex source_parent = mapToSource(parent);\r\n//    qDebug() << source_parent.isValid();\r\n//    if (parent.isValid() && !source_parent.isValid())\r\n//        return 0;\r\n//    QMap<QModelIndex,Mapping*>::iterator it = d->findOrCreateMapping(source_parent);\r\n//    return it.value()->source_rows.count();\r\n}\r\n\r\n/*!\r\n    \\reimp\r\n */\r\nbool MultiIndexModel::addSourceModel(QAbstractItemModel* sourceModel, const QModelIndex &sourceIndex)\r\n{\r\n    Q_D(MultiIndexModel);\r\n    if (!sourceModel || d->containsModel(sourceModel) ) {\r\n        return false;\r\n    }\r\n\r\n    int n = d->indexList.size();\r\n\r\n    this->beginInsertRows(QModelIndex(),n,n);\r\n\r\n    AbstractMultiProxyModel::addSourceModel(sourceModel,sourceIndex);\r\n\r\n    //beginResetModel();\r\n\r\n    connect(sourceModel, SIGNAL(rowsAboutToBeInserted(const QModelIndex &, int, int)),\r\n            d_func(),SLOT(_q_sourceRowsAboutToBeInserted(const QModelIndex &, int, int)));\r\n    connect(sourceModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)),\r\n            d_func(),SLOT(_q_sourceRowsInserted(const QModelIndex &, int, int)));\r\n    connect(sourceModel, SIGNAL(rowsAboutToBeRemoved(const QModelIndex &, int, int)),\r\n            d_func(),SLOT(_q_sourceRowsAboutToBeRemoved(const QModelIndex &, int, int)));\r\n    connect(sourceModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)),\r\n            d_func(),SLOT(_q_sourceRowsRemoved(const QModelIndex &, int, int)));\r\n    connect(sourceModel, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)),\r\n            d_func(),SLOT(_q_sourceRowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));\r\n    connect(sourceModel, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)),\r\n            d_func(),SLOT(_q_sourceRowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));\r\n    connect(sourceModel, SIGNAL(columnsAboutToBeInserted(const QModelIndex &, int, int)),\r\n            d_func(),SLOT(_q_sourceColumnsAboutToBeInserted(const QModelIndex &, int, int)));\r\n    connect(sourceModel, SIGNAL(columnsInserted(const QModelIndex &, int, int)),\r\n            d_func(),SLOT(_q_sourceColumnsInserted(const QModelIndex &, int, int)));\r\n    connect(sourceModel, SIGNAL(columnsAboutToBeRemoved(const QModelIndex &, int, int)),\r\n            d_func(),SLOT(_q_sourceColumnsAboutToBeRemoved(const QModelIndex &, int, int)));\r\n    connect(sourceModel, SIGNAL(columnsRemoved(const QModelIndex &, int, int)),\r\n            d_func(),SLOT(_q_sourceColumnsRemoved(const QModelIndex &, int, int)));\r\n    connect(sourceModel, SIGNAL(columnsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)),\r\n            d_func(),SLOT(_q_sourceColumnsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));\r\n    connect(sourceModel, SIGNAL(columnsMoved(const QModelIndex &, int, int, const QModelIndex &, int)),\r\n            d_func(),SLOT(_q_sourceColumnsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));\r\n    connect(sourceModel, SIGNAL(modelAboutToBeReset()),\r\n            d_func(),SLOT(_q_sourceModelAboutToBeReset()));\r\n    connect(sourceModel, SIGNAL(modelReset()),\r\n            d_func(),SLOT(_q_sourceModelReset()));\r\n    connect(sourceModel, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),\r\n            d_func(),SLOT(_q_sourceDataChanged(const QModelIndex &, const QModelIndex &)));\r\n    connect(sourceModel, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),\r\n            d_func(),SLOT(_q_sourceHeaderDataChanged(Qt::Orientation,int,int)));\r\n    connect(sourceModel, SIGNAL(layoutAboutToBeChanged()),\r\n            d_func(),SLOT(_q_sourceLayoutAboutToBeChanged()));\r\n    connect(sourceModel, SIGNAL(layoutChanged()),\r\n            d_func(),SLOT(_q_sourceLayoutChanged()));\r\n\r\n    //endResetModel();\r\n    this->endInsertRows();\r\n\r\n    return true;\r\n}\r\n\r\nbool MultiIndexModel::removeSourceModel(QAbstractItemModel *sourceModel)\r\n{\r\n    Q_D(MultiIndexModel);\r\n    bool b = AbstractMultiProxyModel::removeSourceModel(sourceModel);\r\n    if (b) {\r\n        d->deleteMapping(sourceModel);\r\n    }\r\n    return b;\r\n}\r\n\r\nvoid MultiIndexModel::removeAllSourceModel()\r\n{\r\n    Q_D(MultiIndexModel);\r\n    AbstractMultiProxyModel::removeAllSourceModel();\r\n    d->clearMapping();\r\n}\r\n\r\nvoid MultiIndexModel::sort(int column, Qt::SortOrder order)\r\n{\r\n    Q_D(MultiIndexModel);\r\n    d->sort_order = order;\r\n    d->source_sort_column = column;\r\n}\r\n\r\nvoid MultiIndexModel::setSortRole(int role)\r\n{\r\n    Q_D(MultiIndexModel);\r\n    d->sort_role = role;\r\n}\r\n\r\nQt::CaseSensitivity MultiIndexModel::sortCaseSensitivity() const\r\n{\r\n    Q_D(const MultiIndexModel);\r\n    return d->sort_casesensitivity;\r\n}\r\n\r\nvoid MultiIndexModel::setSortCaseSensitivity(Qt::CaseSensitivity cs)\r\n{\r\n    Q_D(MultiIndexModel);\r\n    d->sort_casesensitivity = cs;\r\n}\r\n\r\nbool MultiIndexModel::isSortLocaleAware() const\r\n{\r\n    Q_D(const MultiIndexModel);\r\n    return d->sort_localeaware;\r\n}\r\n\r\nvoid MultiIndexModel::setSortLocaleAware(bool on)\r\n{\r\n    Q_D(MultiIndexModel);\r\n    d->sort_localeaware = on;\r\n}\r\n\r\nint MultiIndexModel::sortRole() const\r\n{\r\n    Q_D(const MultiIndexModel);\r\n    return d->sort_role;\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceColumnsAboutToBeInserted(const QModelIndex &parent, int start, int end)\r\n{\r\n    //Q_ASSERT(parent.isValid() ? parent.model() == model : true);\r\n    Q_Q(MultiIndexModel);\r\n    QAbstractItemModel *model = (QAbstractItemModel*)sender();\r\n    q->beginInsertColumns(q->mapFromSourceEx(model,parent), start, end);\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceColumnsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest)\r\n{\r\n    //Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == model : true);\r\n    //Q_ASSERT(destParent.isValid() ? destParent.model() == model : true);\r\n    Q_Q(MultiIndexModel);\r\n    QAbstractItemModel *model = (QAbstractItemModel*)sender();\r\n    q->beginMoveColumns(q->mapFromSourceEx(model,sourceParent), sourceStart, sourceEnd, q->mapFromSourceEx(model,destParent), dest);\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceColumnsAboutToBeRemoved(const QModelIndex &parent, int start, int end)\r\n{\r\n    //Q_ASSERT(parent.isValid() ? parent.model() == model : true);\r\n    Q_Q(MultiIndexModel);\r\n    QAbstractItemModel *model = (QAbstractItemModel*)sender();\r\n    q->beginRemoveColumns(q->mapFromSourceEx(model,parent), start, end);\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceColumnsInserted(const QModelIndex &parent, int start, int end)\r\n{\r\n    //Q_ASSERT(parent.isValid() ? parent.model() == model : true);\r\n    Q_Q(MultiIndexModel);\r\n    Q_UNUSED(parent)\r\n    Q_UNUSED(start)\r\n    Q_UNUSED(end)\r\n    q->endInsertColumns();\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceColumnsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest)\r\n{\r\n    //Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == model : true);\r\n    //Q_ASSERT(destParent.isValid() ? destParent.model() == model : true);\r\n    Q_Q(MultiIndexModel);\r\n    Q_UNUSED(sourceParent)\r\n    Q_UNUSED(sourceStart)\r\n    Q_UNUSED(sourceEnd)\r\n    Q_UNUSED(destParent)\r\n    Q_UNUSED(dest)\r\n\r\n    q->endMoveColumns();\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceColumnsRemoved(const QModelIndex &parent, int start, int end)\r\n{\r\n    //Q_ASSERT(parent.isValid() ? parent.model() == model : true);\r\n    Q_Q(MultiIndexModel);\r\n    Q_UNUSED(parent)\r\n    Q_UNUSED(start)\r\n    Q_UNUSED(end)\r\n    q->endRemoveColumns();\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)\r\n{\r\n    //Q_ASSERT(topLeft.isValid() ? topLeft.model() == model : true);\r\n    //Q_ASSERT(bottomRight.isValid() ? bottomRight.model() == model : true);\r\n    Q_Q(MultiIndexModel);\r\n\r\n    QAbstractItemModel *model = (QAbstractItemModel*)sender();\r\n    q->dataChanged(q->mapFromSourceEx(model,topLeft), q->mapFromSourceEx(model,bottomRight));\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceHeaderDataChanged(Qt::Orientation orientation, int first, int last)\r\n{\r\n    Q_Q(MultiIndexModel);\r\n    q->headerDataChanged(orientation, first, last);\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceLayoutAboutToBeChanged()\r\n{\r\n//    if (ignoreNextLayoutAboutToBeChanged)\r\n//        return;\r\n\r\n//    Q_Q(MultiIndexModel);\r\n\r\n//    foreach(const QPersistentModelIndex &proxyPersistentIndex, q->persistentIndexList()) {\r\n//        proxyIndexes << proxyPersistentIndex;\r\n//        Q_ASSERT(proxyPersistentIndex.isValid());\r\n//        const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex);\r\n//        Q_ASSERT(srcPersistentIndex.isValid());\r\n//        layoutChangePersistentIndexes << srcPersistentIndex;\r\n//    }\r\n\r\n//    q->layoutAboutToBeChanged();\r\n    Q_Q(MultiIndexModel);\r\n    saved_persistent_indexes.clear();\r\n    emit q->layoutAboutToBeChanged();\r\n    QModelIndexList persistentList = q->persistentIndexList();\r\n    if (persistentList.isEmpty())\r\n        return;\r\n\r\n//    QAbstractItemModel *model = (QAbstractItemModel*)sender();\r\n//    qDebug() << \"begin changed\" << model;\r\n    saved_persistent_indexes = store_persistent_indexes(persistentList);\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceLayoutChanged()\r\n{\r\n    Q_Q(MultiIndexModel);\r\n\r\n\r\n    QAbstractItemModel *model = (QAbstractItemModel*)sender();\r\n\r\n //   qDebug() << \"changed\" << model;\r\n\r\n    qDeleteAll(modelMapping[model]);\r\n    modelMapping[model].clear();\r\n    //modelMapping.remove(model);\r\n    update_persistent_indexes(saved_persistent_indexes);\r\n    saved_persistent_indexes.clear();\r\n////    if (dynamic_sortfilter && update_source_sort_column()) {\r\n////        //update_source_sort_column might have created wrong mapping so we have to clear it again\r\n// //       qDeleteAll(sourceMapping);\r\n////        sourceMapping.clear();\r\n////    }\r\n\r\n//    emit q->layoutChanged();\r\n//    if (ignoreNextLayoutChanged)\r\n//        return;\r\n\r\n //   Q_Q(MultiIndexModel);\r\n\r\n//    for (int i = 0; i < proxyIndexes.size(); ++i) {\r\n//        q->changePersistentIndex(proxyIndexes.at(i), q->mapFromSource(layoutChangePersistentIndexes.at(i)));\r\n//    }\r\n\r\n//    layoutChangePersistentIndexes.clear();\r\n//    proxyIndexes.clear();\r\n\r\n    q->layoutChanged();\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceModelAboutToBeReset()\r\n{\r\n    Q_Q(MultiIndexModel);\r\n    q->beginResetModel();\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceModelReset()\r\n{\r\n    Q_Q(MultiIndexModel);\r\n\r\n    q->endResetModel();\r\n}\r\n\r\nvoid MultiIndexModelPrivate::sort(QAbstractItemModel *sourceModel )\r\n{\r\n    Q_Q(MultiIndexModel);\r\n    emit q->layoutAboutToBeChanged();\r\n    QModelIndexPairList source_indexes = store_persistent_indexes(q->persistentIndexList());\r\n    QMap<QModelIndex,Mapping*>::const_iterator it = modelMapping[sourceModel].constBegin();\r\n    for (; it != modelMapping[sourceModel].constEnd(); ++it) {\r\n        QModelIndex source_parent = it.key();\r\n        Mapping *m = it.value();\r\n        sort_source_rows(m->sourceModel, m->source_rows, source_parent);\r\n        build_source_to_proxy_mapping(m->source_rows, m->proxy_rows);\r\n    }\r\n    update_persistent_indexes(source_indexes);\r\n    emit q->layoutChanged();\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceRowsAboutToBeInserted(const QModelIndex &parent, int /*start*/, int /*end*/)\r\n{\r\n    //Q_ASSERT(parent.isValid() ? parent.model() == model : true);\r\n    //Q_Q(MultiIndexModel);\r\n    QAbstractItemModel *model = (QAbstractItemModel *)sender();\r\n    QMap<QModelIndex,Mapping*>::iterator it = modelMapping[model].find(parent);\r\n    if (it == modelMapping[model].end()) {\r\n        //this->createMapping(model,parent,false,\"insert\");\r\n    }\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceRowsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest)\r\n{\r\n    //Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == model : true);\r\n    //Q_ASSERT(destParent.isValid() ? destParent.model() == model : true);\r\n    Q_Q(MultiIndexModel);\r\n    QAbstractItemModel *model = (QAbstractItemModel *)sender();\r\n\r\n    q->beginMoveRows(q->mapFromSourceEx(model,sourceParent), sourceStart, sourceEnd, q->mapFromSourceEx(model,destParent), dest);\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceRowsInserted(const QModelIndex &parent, int start, int end)\r\n{\r\n    //Q_ASSERT(parent.isValid() ? parent.model() == model : true);\r\n    Q_Q(MultiIndexModel);\r\n    Q_UNUSED(parent)\r\n    Q_UNUSED(start)\r\n    Q_UNUSED(end)\r\n\r\n    QAbstractItemModel *model = (QAbstractItemModel *)sender();\r\n    QMap<QModelIndex,Mapping*>::iterator it = modelMapping[model].find(parent);\r\n    if (it != modelMapping[model].end()) {\r\n        this->createMapping(model,parent,true,\"insert\");\r\n        Mapping *m = it.value();\r\n        QModelIndex proxyIndex = q->mapFromSourceEx(model,parent);\r\n        QVector<int> all(end-start+1);\r\n        for (int i = start; i <= end; i++) {\r\n            all[i-start] = m->proxy_rows.at(i);\r\n            //qDebug() << m->sourceModel->index(i,0,parent).data();\r\n        }\r\n        qStableSort(all);\r\n\r\n        if (all.last()-all.first()+1 == all.size()) {\r\n            q->beginInsertRows(proxyIndex,all.first(),all.last());\r\n            q->endInsertRows();\r\n        } else {\r\n            foreach (int n, all) {\r\n                q->beginInsertRows(proxyIndex, n, n);\r\n                q->endInsertRows();\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceRowsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest)\r\n{\r\n    //Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == model : true);\r\n    //Q_ASSERT(destParent.isValid() ? destParent.model() == model : true);\r\n    Q_Q(MultiIndexModel);\r\n    Q_UNUSED(sourceParent)\r\n    Q_UNUSED(sourceStart)\r\n    Q_UNUSED(sourceEnd)\r\n    Q_UNUSED(destParent)\r\n    Q_UNUSED(dest)\r\n\r\n    //todo\r\n    q->endMoveRows();\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)\r\n{\r\n    //Q_ASSERT(parent.isValid() ? parent.model() == model : true);\r\n    Q_Q(MultiIndexModel);\r\n\r\n    QAbstractItemModel *model = (QAbstractItemModel *)sender();\r\n    QMap<QModelIndex,Mapping*>::iterator it = modelMapping[model].find(parent);\r\n    if (it != modelMapping[model].end()) {\r\n        Mapping *m = it.value();\r\n\r\n        int n1 = m->proxy_rows.at(start);\r\n        int n2 = m->proxy_rows.at(end);\r\n        if (n1 > n2) {\r\n            qSwap(n1,n2);\r\n        }\r\n        for (int i = start; i < end+1; i++) {\r\n            QModelIndex child = m->sourceModel->index(i,0,m->sourceParent);\r\n            QMap<QModelIndex,Mapping*>::iterator childIt = modelMapping[model].find(child);\r\n            if (childIt != modelMapping[model].end()) {\r\n                Mapping *cm = childIt.value();\r\n                cm->sourceParent = QModelIndex();\r\n                modelMapping[model].remove(child);\r\n                removeMappingList.append(cm);\r\n            }\r\n        }\r\n        q->beginRemoveRows(q->mapFromSourceEx(model,parent), n1,n2);\r\n    }\r\n}\r\n\r\nvoid MultiIndexModelPrivate::_q_sourceRowsRemoved(const QModelIndex &parent, int start, int end)\r\n{\r\n    //Q_ASSERT(parent.isValid() ? parent.model() == model : true);\r\n    Q_Q(MultiIndexModel);\r\n    Q_UNUSED(parent)\r\n    Q_UNUSED(start)\r\n    Q_UNUSED(end)\r\n\r\n    //update\r\n    QAbstractItemModel *model = (QAbstractItemModel *)sender();\r\n    QMap<QModelIndex,Mapping*>::iterator it = modelMapping[model].find(parent);\r\n    if (it != modelMapping[model].end()) {\r\n        this->createMapping(model,parent,true);\r\n        q->endRemoveRows();\r\n    }\r\n}\r\n\r\n\r\n#include \"moc_multiindexmodel.cpp\"\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\n"
  },
  {
    "path": "liteidex/src/utils/folderview/multiindexmodel.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: multiindexmodel.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MULTIINDEXMODEL_H\n#define MULTIINDEXMODEL_H\n\n#include <QAbstractItemModel>\n#include <QAbstractProxyModel>\n#include <QItemSelection>\n\n#include \"abstractmultiproxymodel.h\"\n\nclass MultiIndexModelPrivate;\nclass MultiIndexModel : public AbstractMultiProxyModel\n{\n    Q_OBJECT\npublic:\n    explicit MultiIndexModel(QObject* parent = 0);\n    ~MultiIndexModel();\n\n    virtual bool addSourceModel(QAbstractItemModel* sourceModel, const QModelIndex &sourceIndex);\n    virtual bool removeSourceModel(QAbstractItemModel *sourceModel);\n    virtual void removeAllSourceModel();\n\n    void sort (int column, Qt::SortOrder order = Qt::AscendingOrder);\n\n    int\tsortRole() const;\n    void setSortRole(int role);\n\n    Qt::CaseSensitivity\tsortCaseSensitivity() const;\n    void setSortCaseSensitivity(Qt::CaseSensitivity cs);\n\n    bool isSortLocaleAware() const;\n    void setSortLocaleAware(bool on);\n\n    int columnCount(const QModelIndex& parent = QModelIndex()) const;\n    QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const;\n    QModelIndex mapFromSource(const QModelIndex& sourceIndex) const;\n    QModelIndex mapToSource(const QModelIndex& proxyIndex) const;\n\n    SourceModelIndex mapToSourceEx(const QModelIndex &proxyIndex) const;\n    QModelIndex mapFromSourceEx(QAbstractItemModel *sourceModel, const QModelIndex &sourceIndex) const;\n\n    QModelIndex parent(const QModelIndex& child) const;\n    bool hasChildren(const QModelIndex &parent) const;\n    int rowCount(const QModelIndex& parent = QModelIndex()) const;\n    bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent);\n    QModelIndex buddy(const QModelIndex &index) const;\n\n    QItemSelection mapSelectionFromSource(const QItemSelection& selection) const;\n    QItemSelection mapSelectionToSource(const QItemSelection& selection) const;\n    QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits = 1, Qt::MatchFlags flags = Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const;\n\n    bool insertColumns(int column, int count, const QModelIndex& parent = QModelIndex());\n    bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex());\n    bool removeColumns(int column, int count, const QModelIndex& parent = QModelIndex());\n    bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex());\n\nprotected:\n    MultiIndexModel(MultiIndexModelPrivate &dd, QObject* parent);\npublic:\n    virtual bool lessThan(const QAbstractItemModel *sourceModel, const QModelIndex &left, const QModelIndex &right) const;\n    virtual bool filterAcceptsRow(const QAbstractItemModel *sourceModel, int source_row, const QModelIndex &source_parent) const;\nprivate:\n    Q_DECLARE_PRIVATE(MultiIndexModel)\n    Q_DISABLE_COPY(MultiIndexModel)\n};\n\n\n#endif // MULTIINDEXMODEL_H\n"
  },
  {
    "path": "liteidex/src/utils/folderview/multiindexmodel_p.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: multiindexmodel_p.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MULTIINDEXMODEL_P_H\n#define MULTIINDEXMODEL_P_H\n\n#include <QList>\n#include <QVector>\n#include <QPair>\n#include <QModelIndex>\n#include \"abstractmultiproxymodel_p.h\"\n#include \"multiindexmodel.h\"\n\ntypedef QList<QPair<QModelIndex, QPersistentModelIndex> > QModelIndexPairList;\n\nstruct Mapping\n{\n    int          rowCount;\n    QVector<int> source_rows;      //source rows\n    QVector<int> proxy_rows;       //proxy rows\n    QModelIndex  sourceParent;    //source parent\n    QAbstractItemModel *sourceModel;\n};\n\nclass MultiIndexModel;\nclass MultiIndexModelPrivate : public AbstractMultiProxyModelPrivate\n{\n   Q_OBJECT\npublic:\n  MultiIndexModelPrivate()\n  {\n      source_sort_column = -1;\n      sort_order = Qt::AscendingOrder;\n      sort_casesensitivity = Qt::CaseSensitive;\n      sort_role = Qt::DisplayRole;\n      sort_localeaware = false;\n  }\n\n  Q_DECLARE_PUBLIC(MultiIndexModel)\n\n  mutable QMap<QAbstractItemModel*, QMap<QModelIndex,Mapping*> > modelMapping;\n\n  int sort_order;\n  int source_sort_column;\n  Qt::CaseSensitivity sort_casesensitivity;\n  int sort_role;\n  bool sort_localeaware;\n  QModelIndexPairList saved_persistent_indexes;\n  QList<Mapping*> removeMappingList;\n\npublic slots:\n  void _q_sourceRowsAboutToBeInserted(const QModelIndex &parent, int start, int end);\n  void _q_sourceRowsInserted(const QModelIndex &parent, int start, int end);\n  void _q_sourceRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);\n  void _q_sourceRowsRemoved(const QModelIndex &parent, int start, int end);\n  void _q_sourceRowsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest);\n  void _q_sourceRowsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest);\n\n  void _q_sourceColumnsAboutToBeInserted(const QModelIndex &parent, int start, int end);\n  void _q_sourceColumnsInserted(const QModelIndex &parent, int start, int end);\n  void _q_sourceColumnsAboutToBeRemoved(const QModelIndex &parent, int start, int end);\n  void _q_sourceColumnsRemoved(const QModelIndex &parent, int start, int end);\n  void _q_sourceColumnsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest);\n  void _q_sourceColumnsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest);\n\n  void _q_sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);\n  void _q_sourceHeaderDataChanged(Qt::Orientation orientation, int first, int last);\n\n  void _q_sourceLayoutAboutToBeChanged();\n  void _q_sourceLayoutChanged();\n  void _q_sourceModelAboutToBeReset();\n  void _q_sourceModelReset();\nprotected:\n   QMap<QModelIndex,Mapping*>::iterator createMapping(QAbstractItemModel *model, const QModelIndex &parent, bool forceUpdate, const QString &context = \"update\") const;\n   QMap<QModelIndex,Mapping*>::iterator findOrCreateMapping(QAbstractItemModel *model, const QModelIndex &parent) const;\n   void build_source_to_proxy_mapping(const QVector<int> &proxy_to_source, QVector<int> &source_to_proxy) const;\n   void clearMapping();\n   void deleteMapping(QAbstractItemModel *model);\n\n   inline int isRootIndexRow(QAbstractItemModel *model, const QModelIndex &index) const\n   {\n       int row = 0;\n       foreach (SourceModelIndex i, indexList) {\n           if (i.model == model && i.index.internalId() == index.internalId()) {\n               return row;\n           }\n           row++;\n       }\n       return -1;\n   }\n\n   void sort_source_rows(QAbstractItemModel *model, QVector<int> &source_rows, const QModelIndex &source_parent) const;\n   QModelIndexPairList store_persistent_indexes(const QModelIndexList &persistentList);\n   void update_persistent_indexes(const QModelIndexPairList &source_indexes);\n\npublic:\n   void sort(QAbstractItemModel *sourceModel);\n};\n\n#endif // MULTIINDEXMODEL_P_H\n\n"
  },
  {
    "path": "liteidex/src/utils/golangapi/golangapi.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangapi.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"golangapi.h\"\n#include <QFile>\n#include <QSet>\n#include <QRegExp>\n#include <QTextStream>\n#include <QFile>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nGolangApi::GolangApi(QObject *parent) :\n    LiteApi::IGolangApi(parent)\n{\n}\n\nbool GolangApi::load(const QString &fileName)\n{\n    QFile file(fileName);\n    if (!file.open(QFile::ReadOnly)) {\n        return false;\n    }\n    QTextStream stream(&file);\n    stream.setCodec(\"utf-8\");\n    return loadStream(&stream);\n}\n\nbool GolangApi::loadStream(QTextStream *stream)\n{\n    m_pkgs.clear();\n\n    //pkg syscall (darwin-386), const TIOCSBRK ideal-int\n\n    //var\n    //pkg archive/tar, var ErrFieldTooLong error\n\n    //const\n    //pkg archive/tar, const TypeBlock ideal-char\n    //pkg crypto/sha512, const BlockSize ideal-int\n    //pkg archive/zip, const Deflate uint16\n\n    //type-const\n    //pkg go/ast, type ObjKind int\n    //pkg syscall, type Errno uintptr\n    //pkg syscall (windows-amd64), const ECOMM Errno\n\n    // func\n    //pkg archive/tar, func NewReader(io.Reader) *Reader\n    //pkg bytes, func FieldsFunc([]byte, func(rune) bool) [][]byte\n\n    //type-var,method\n    //pkg archive/tar, type Header struct\n    //pkg archive/tar, type Header struct, AccessTime time.Time\n    //pkg archive/tar, method (*Reader) Next() (*Header, error)\n    //pkg archive/zip, method (*File) Open() (io.ReadCloser, error)\n    //pkg bufio, method (ReadWriter) Available() int\n\n    //type-interface\n    //pkg container/heap, type Interface interface { Len, Less, Pop, Push, Swap }\n    //pkg container/heap, type Interface interface, Len() int\n\n    QRegExp reg(\"^pkg\\\\s([\\\\w\\\\-\\\\.\\\\/]+)(\\\\s\\\\(([\\\\w\\\\-]+)\\\\))?,\\\\s(\\\\w+)\");\n    QRegExp regm(\"\\\\(\\\\*?([\\\\w\\\\-]+)\\\\)\\\\s*(\\\\w+)\");\n    Package *lastPkg = 0;\n    Type *lastType = 0;\n    while (!stream->atEnd()) {\n        QString line = stream->readLine();\n        int pos = reg.indexIn(line);\n        if (pos < 0) {\n            continue;\n        }\n        // 1 pkgname\n        // 2 ? (system)\n        // 3 ? system\n        // 4 const|func|method|var|type\n        QString pkgName = reg.cap(1);\n//        if (!reg.cap(3).isEmpty()) {\n//            pkg = reg.cap(2)+\".\"+pkg;\n//        }\n        if (!lastPkg || lastPkg->name != pkgName) {\n            lastPkg = m_pkgs.findPackage(pkgName);\n            if (!lastPkg) {\n                lastPkg = new Package(pkgName);\n                m_pkgs.pkgList.append(lastPkg);\n                lastType = 0;\n            }\n        }\n        QString right = line.mid(reg.cap().length()).trimmed();\n        QString flag = reg.cap(4);\n        if (flag == \"var\") {\n            ///pkg archive/tar, var ErrFieldTooLong error\n            int pos = right.indexOf(\" \");\n            QString name = right.left(pos);\n            if (pos != -1 && lastPkg->findValue(name) == 0) {\n                lastPkg->valueList.append(new Value(VarApi,name,right.mid(pos+1)));\n            }\n        } else if (flag == \"const\") {\n            //pkg syscall (windows-amd64), const ECOMM Errno\n            int pos = right.indexOf(\" \");\n            QString name = right.left(pos);\n            if (pos != -1 && lastPkg->findValue(name) == 0) {\n                lastPkg->valueList.append(new Value(ConstApi,name,right.mid(pos+1)));\n            }\n        } else if (flag == \"func\") {\n            //pkg bytes, func FieldsFunc([]byte, func(rune) bool) [][]byte\n            int pos = right.indexOf(\"(\");\n            QString name = right.left(pos);\n            if (pos != -1 && lastPkg->findValue(name) == 0) {\n                lastPkg->valueList.append(new Value(FuncApi,name,right.mid(pos)));\n            }\n        } else if (flag == \"method\") {\n            //pkg archive/tar, method (*Reader) Next() (*Header, error)\n            //pkg archive/zip, method (*File) Open() (io.ReadCloser, error)\n            //pkg bufio, method (ReadWriter) Available() int\n            int pos = regm.indexIn(right);\n            if (pos != -1) {\n                QString typeName = regm.cap(1);\n                QString name = regm.cap(2);\n                QString exp = right.mid(regm.cap().length()).trimmed();\n                if (lastType == 0 || lastType->name != typeName || lastType->typ == StructApi) {\n                    lastType = lastPkg->findType(typeName);\n                    if (!lastType) {\n                        lastType = new Type(StructApi,typeName,\"struct\");\n                        lastPkg->typeList.append(lastType);\n                    }\n                }\n                if (lastType->findValue(name) == 0) {\n                    lastType->valueList.append(new Value(TypeMethodApi,name,exp));\n                }\n            }\n        } else if (flag == \"type\") {\n            //pkg go/ast, type ObjKind int\n            //pkg archive/tar, type Header struct\n            //pkg archive/tar, type Header struct, AccessTime time.Time\n            //pkg container/heap, type Interface interface { Len, Less, Pop, Push, Swap }\n            //pkg container/heap, type Interface interface, Len() int\n            int pos = right.indexOf(\" \");\n            if (pos != -1) {\n                QString typeName = right.left(pos);\n                QString exp = right.mid(pos+1);\n                if (exp == \"struct\") {\n                    lastType = lastPkg->findType(typeName);\n                    if (!lastType) {\n                        lastType = new Type(StructApi,typeName,exp);\n                        lastPkg->typeList.append(lastType);\n                    }\n                } else if (exp.startsWith(\"struct,\")) {\n                    QString last = exp.mid(7).trimmed();\n                    int pos2 = last.indexOf(\" \");\n                    if (pos2 != -1) {\n                        if (lastType == 0 || lastType->name != typeName || lastType->typ == StructApi) {\n                            lastType = lastPkg->findType(typeName);\n                            if (!lastType) {\n                                lastType = new Type(StructApi,typeName,\"struct\");\n                                lastPkg->typeList.append(lastType);\n                            }\n                        }\n                        QString name = last.left(pos2);\n                        if (name == \"embedded\") {\n                            QString emName = last.mid(pos2+1);\n                            if (!lastType->embeddedList.contains(emName)) {\n                                lastType->embeddedList.append(emName);\n                            }\n                        } else if (lastType->findValue(name) == 0){\n                            lastType->valueList.append(new Value(TypeVarApi,name,last.mid(pos2+1)));\n                        }\n                    }\n                } else if (exp.startsWith(\"interface {\")) {\n                    lastType = lastPkg->findType(typeName);\n                    if (!lastType) {\n                        lastType = new Type(InterfaceApi,typeName,exp);\n                        lastPkg->typeList.append(lastType);\n                    }\n                } else if (exp.startsWith(\"interface,\")) {\n                    QString last = exp.mid(10).trimmed();\n                    int pos2 = last.indexOf(\"(\");\n                    if (pos2 != -1) {\n                        if (lastType == 0 || lastType->name != typeName || lastType->typ == StructApi) {\n                            lastType = lastPkg->findType(typeName);\n                            if (!lastType) {\n                                lastType = new Type(InterfaceApi,typeName,\"struct\");\n                                lastPkg->typeList.append(lastType);\n                            }\n                        }\n                        QString name = last.left(pos2);\n                        if (lastType->findValue(name) == 0) {\n                            lastType->valueList.append(new Value(TypeMethodApi,name,last.mid(pos2)));\n                        }\n                    }\n                } else {\n                    lastType = lastPkg->findType(typeName);\n                    if (!lastType) {\n                        lastType = new Type(TypeApi,typeName,exp);\n                        lastPkg->typeList.append(lastType);\n                    }\n                }\n            }\n        }\n    }\n\n//    QRegExp reg(\"^pkg\\\\s([\\\\w\\\\/]+)(\\\\s\\\\(([\\\\w-]+)\\\\))?,\\\\s(\\\\w+)(\\\\s\\\\(\\\\*?([\\\\w\\\\-]+)\\\\))?\\\\s(\\\\w+)\");\n//    QRegExp reg2(\"^(\\\\w+),\\\\s+(\\\\w+)\");\n//    while (!stream->atEnd()) {\n//        QString line = stream->readLine().trimmed();\n//        // 1 pkgname\n//        // 2 ? (system)\n//        // 3 ? system\n//        // 4 const|func|method|var|type\n//        // 5 ? (method-type)\n//        // 6 ? method-type\n//        // 7 value\n//        int pos = reg.indexIn(line);\n//        if (pos != -1) {\n//            QString typeVar;\n//            int next = reg2.indexIn(line.right(line.length()-reg.cap().length()).trimmed());\n//            if (next != -1) {\n//                typeVar = reg2.cap(2);\n//            }\n\n//            //qDebug() << reg.cap() << reg.captureCount();\n//            QString pkg = reg.cap(1);\n//            //QString sys = reg.cap(3);\n//            QString flag = reg.cap(4);\n//            QString method_type = reg.cap(6);\n//            QString value = reg.cap(7);\n\n//            QMap<QString,Package>::iterator it = pkgMap.find(pkg);\n//            if (it == pkgMap.end()) {\n//                it = pkgMap.insert(pkg,Package());\n//            }\n\n//            if (flag == \"const\") {\n//                it->appendConst(value);\n//                //constList.append(tag);\n//            } else if (flag == \"func\") {\n//                //funcList.append(tag);\n//                it->appendFunc(value);\n//            } else if (flag == \"method\") {\n//                //methodList.append(tag);\n//                it->appendTypeMethod(method_type,value);\n//            } else if (flag == \"type\") {\n//                //typeList.append(tag);\n//                if (!typeVar.isEmpty()) {\n//                    it->appendTypeVar(value,typeVar);\n//                } else {\n//                    it->insertType(value);\n//                }\n//            } else if (flag == \"var\") {\n//                //varList.append(tag);\n//                it->appendVar(value);\n//            }\n//        }\n//    }\n    return true;\n}\n\nQStringList GolangApi::all(int flag) const\n{\n    QStringList finds;\n    foreach(Package *pkg, m_pkgs.pkgList) {\n        finds.append(pkg->name);\n        finds.append(pkg->name+\".\");\n        foreach(Value *value, pkg->valueList) {\n            if (flag & value->typ) {\n                finds.append(pkg->name+\".\"+value->name);\n            }\n        }\n        foreach(Type *type, pkg->typeList) {\n            if (flag & type->typ) {\n                QString name = pkg->name+\".\"+type->name;\n                finds.append(name);\n                name += \".\";\n                foreach (Value *value, type->valueList) {\n                    if (flag & value->typ) {\n                        finds.append(name+value->name);\n                    }\n                }\n            }\n        }\n    }\n    return finds;\n}\n\nstatic QStringList findType(Package *pkg, const QString &typeName, const QString &v)\n{\n    Type *typ = pkg->findType(typeName);\n    if (typ) {\n        Value *value = typ->findValue(v);\n        if (value) {\n            if (value->typ == TypeVarApi) {\n                return QStringList() << pkg->name+\"#\"+typ->name << value->name;\n            } else if (value->typ == TypeMethodApi ){\n                return QStringList() << pkg->name+\"#\"+typ->name+\".\"+value->name << value->name;\n            }\n        } else {\n            foreach(QString embedded, typ->embeddedList) {\n                QStringList find = findType(pkg,embedded,v);\n                if (!find.isEmpty()) {\n                    return find;\n                }\n            }\n        }\n    }\n    return QStringList();\n}\n/*\n    NullApi = 0,\n    PkgApi = 0x0001,\n    ConstApi = 0x0002,\n    VarApi = 0x0004,\n    StructApi = 0x0008,\n    InterfaceApi = 0x0010,\n    TypeApi = 0x0020,\n    FuncApi = 0x0040,\n    TypeMethodApi = 0x0080,\n    TypeVarApi = 0x0100,\n*/\n\nstatic QString typeName(LiteApi::PkgApiEnum api) {\n    switch(api) {\n    case LiteApi::NullApi:\n        break;\n    case LiteApi::PkgApi:\n        return \"package\";\n    case LiteApi::ConstApi:\n        return \"const\";\n    case LiteApi::VarApi:\n        return \"var\";\n    case LiteApi::StructApi:\n        return \"struct\";\n    case LiteApi::InterfaceApi:\n        return \"interface\";\n    case LiteApi::TypeApi:\n        return \"type\";\n    case LiteApi::FuncApi:\n        return \"func\";\n    case LiteApi::TypeMethodApi:\n        return \"method\";\n    case LiteApi::TypeVarApi:\n        return \"field\";\n    default:\n        break;\n    }\n    return QString();\n}\n\nQString GolangApi::findDocInfo(const QString &tag) const\n{\n    int pos = tag.lastIndexOf(\"/\");\n    QString pkgName = tag.left(pos+1);\n    QStringList all = tag.mid(pos+1).split(\".\",qtSkipEmptyParts);\n    if (all.size() >= 1) {\n        pkgName += all.at(0);\n        Package *pkg = m_pkgs.findPackage(pkgName);\n        if (pkg) {\n            if (all.size() == 1) {\n                return \"package \"+pkgName;\n            } else {\n                Type *typ = pkg->findType(all.at(1));\n                if (typ) {\n                    if (all.size() == 2) {\n                        return QString(\"type %1 %2\").arg(typ->name).arg(typeName(typ->typ));\n                    } else {\n                        Value *value = typ->findValue(all.at(2));\n                        if (value) {\n                            if (value->typ == TypeVarApi) {\n                                return  QString(\"field %1 %2\").arg(value->name).arg(value->exp);\n                            } else if (value->typ == TypeMethodApi ){\n                                return  QString(\"method %1%2\").arg(value->name).arg(value->exp);\n                            }\n                        }\n                    }\n                } else {\n                    Value *value = pkg->findValue(all.at(1));\n                    if (value) {\n                        if (value->typ == VarApi) {\n                            return QString(\"var %1 %2\").arg(value->name).arg(value->exp);\n                        } else if (value->typ == ConstApi) {\n                            return QString(\"const %1 %2\").arg(value->name).arg(value->exp);\n                        } else if (value->typ == FuncApi) {\n                            return QString(\"func %1%2\").arg(value->name).arg(value->exp);\n                        }\n                    }\n                }\n            }\n        }\n    }\n    return QString();\n}\n\nQStringList GolangApi::findDocUrl(const QString &tag) const\n{\n    int pos = tag.lastIndexOf(\"/\");\n    QString pkgName = tag.left(pos+1);\n    QStringList all = tag.mid(pos+1).split(\".\",qtSkipEmptyParts);\n    if (all.size() >= 1) {\n        pkgName += all.at(0);\n        Package *pkg = m_pkgs.findPackage(pkgName);\n        if (pkg) {\n            if (all.size() == 1) {\n                return QStringList() << pkgName << pkgName;\n            } else {\n                Type *typ = pkg->findType(all.at(1));\n                if (typ) {\n                    if (all.size() == 2) {\n                        return QStringList() << pkgName+\"#\"+typ->name << typ->name;\n                    } else {\n                        return findType(pkg,typ->name,all.at(2));\n                    }\n                } else {\n                    Value *value = pkg->findValue(all.at(1));\n                    if (value) {\n                        if (value->typ == VarApi) {\n                            return QStringList() << pkgName+\"#variables\" << value->name;\n                        } else if (value->typ == ConstApi) {\n                            if (value->exp.startsWith(\"ideal-\") ||\n                                    value->exp == \"uint16\") {\n                                return QStringList() << pkgName+\"#constants\" << value->name;\n                            } else {\n                                return QStringList() << pkgName+\"#\"+value->exp << value->name;\n                            }\n                        } else if (value->typ == FuncApi) {\n                            return QStringList() << pkgName+\"#\"+value->name << value->name;\n                        }\n                    }\n                }\n            }\n        }\n    }\n    return QStringList();\n}\n\nPkgApiEnum GolangApi::findExp(const QString &tag, QString &exp) const\n{\n    QStringList all = tag.split(\".\");\n    if (all.size() >= 1) {\n        Package *pkg = m_pkgs.findPackage(all.at(0));\n        if (pkg) {\n            if (all.size() == 1) {\n                exp = \"package\";\n                return pkg->typ;\n            } else {\n                Type *typ = pkg->findType(all.at(1));\n                if (typ) {\n                    if (all.size() == 2) {\n                        exp = typ->exp;\n                        return typ->typ;\n                    } else {\n                        Value *value = typ->findValue(all.at(2));\n                        if (value) {\n                            exp = value->exp;\n                            return value->typ;\n                        }\n                    }\n                } else {\n                    Value *value = pkg->findValue(all.at(1));\n                    if (value) {\n                        exp = value->exp;\n                        return value->typ;\n                    }\n                }\n            }\n        }\n    }\n    return NullApi;\n}\n\nGolangApiThread::GolangApiThread(QObject *parent)\n    :QThread(parent)\n{\n    m_api = new GolangApi(this);\n}\n\nGolangApiThread::~GolangApiThread()\n{\n    if (this->isRunning()) {\n        this->terminate();\n    }\n}\n\nvoid GolangApiThread::loadData(const QByteArray &data)\n{\n    m_data = data;\n    m_file.clear();\n    QThread::start();\n}\n\nvoid GolangApiThread::loadFile(const QString &fileName)\n{\n    m_file = fileName;\n    QThread::start();\n}\n\nLiteApi::IGolangApi* GolangApiThread::api() const\n{\n    return m_api;\n}\n\nQStringList GolangApiThread::all() const\n{\n    return m_all;\n}\n\nQByteArray GolangApiThread::data() const\n{\n    return m_data;\n}\n\nvoid GolangApiThread::run()\n{\n    if (!m_file.isEmpty()) {\n        QFile f(m_file);\n        if (!f.open(QFile::ReadOnly)) {\n            return;\n        }\n        QTextStream s(&f);\n        if (m_api->loadStream(&s)) {\n            m_all = m_api->all(LiteApi::AllGolangApi);\n        }\n    } else {\n        QTextStream s(&m_data);\n        if (m_api->loadStream(&s)) {\n            m_all = m_api->all(LiteApi::AllGolangApi);\n        }\n    }\n}\n"
  },
  {
    "path": "liteidex/src/utils/golangapi/golangapi.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangapi.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGAPI_H\n#define GOLANGAPI_H\n\n#include \"golangdocapi/golangdocapi.h\"\n\n#include <QTextStream>\n#include <QSharedData>\n#include <QThread>\n\nusing namespace LiteApi;\n\nclass Value\n{\npublic:\n    Value(): typ(NullApi),pos(-1) {}\n    Value(PkgApiEnum _typ, const QString &_name, const QString &_exp) :\n        typ(_typ), name(_name), exp(_exp) {}\npublic:\n    PkgApiEnum typ;\n    int     pos;\n    QString name;\n    QString exp;\n};\n\nclass Type\n{\npublic:\n    Type() : typ(NullApi), pos(-1) {}\n    Type(PkgApiEnum _typ, const QString &_name, const QString &_exp) :\n        typ(_typ), name(_name), exp(_exp) {}\n    ~Type() { clear(); }\n    void clear() {\n        qDeleteAll(valueList);\n        valueList.clear();\n    }\n    bool IsNull() const { return typ == NullApi; }\n    Value *findValue(const QString &valueName) {\n        foreach(Value *val, valueList) {\n            if (val->name == valueName) {\n                return val;\n            }\n        }\n        return 0;\n    }\npublic:\n    PkgApiEnum    typ;\n    int         pos;\n    QString     name;\n    QString     exp;\n    QStringList     embeddedList;\n    QList<Value*> valueList;\n};\n\nclass Package\n{\npublic:\n    Package() : typ(PkgApi),pos(-1) {}\n    Package(const QString &_name) :\n        typ(PkgApi),name(_name) {}\n    ~Package()  { clear(); }\n    void clear() {\n        qDeleteAll(valueList);\n        qDeleteAll(typeList);\n        valueList.clear();\n        typeList.clear();\n    }\n    Type *findType(const QString &typeName) {\n        foreach(Type *typ, typeList) {\n            if (typ->name == typeName) {\n                return typ;\n            }\n        }\n        return 0;\n    }\n    Value *findValue(const QString &valueName) {\n        foreach(Value *val, valueList) {\n            if (val->name == valueName) {\n                return val;\n            }\n        }\n        return 0;\n    }\npublic:\n    PkgApiEnum    typ;\n    int           pos;\n    QString       name;\n    QList<Value*> valueList;\n    QList<Type*>  typeList;\n};\n\nclass Packages\n{\npublic:\n    Packages() {}\n    ~Packages() { clear(); }\n    void clear() {\n        qDeleteAll(pkgList);\n        pkgList.clear();\n    }\n    Package *findPackage(const QString &pkgName) const {\n        foreach(Package *pkg, pkgList) {\n            if (pkg->name == pkgName) {\n                return pkg;\n            }\n        }\n        return 0;\n    }\npublic:\n    QList<Package*> pkgList;\n};\n\n/*\nclass ValueData : public QSharedData\n{\npublic:\n    ValueData(): typ(NullApi) {}\n    ValueData(const ValueData &other) :\n        typ(other.typ), name(other.name),exp(other.exp)\n    {}\n    PkgApiEnum typ;\n    QString name;\n    QString exp;\n};\n\nclass Value\n{\npublic:\n    Value() { d = new ValueData; }\n    Value(PkgApiEnum typ, const QString &name, const QString &exp) {\n        d = new ValueData;\n        d->typ = typ;\n        d->name = name;\n        d->exp = exp;\n    }\n    Value(const Value &other) :\n        d(other.d) {}\n    bool IsNull() const { return d->typ == NullApi; }\n    PkgApiEnum type() const { return d->typ; }\n    QString name() const { return d->name; }\nprivate:\n    QSharedDataPointer<ValueData> d;\n};\n\nclass TypeData : public QSharedData\n{\npublic:\n    TypeData() : typ(NullApi){}\n    TypeData(const TypeData &other)\n        : QSharedData(other),\n          typ(other.typ),\n          name(other.name),\n          exp(other.exp),\n          valueList(other.valueList)\n    {}\n    ~TypeData() {}\n    PkgApiEnum    typ;\n    QString     name;\n    QString     exp;\n    QList<Value> valueList;\n};\n\nclass Type\n{\npublic:\n    Type() { d = new TypeData; }\n    Type(PkgApiEnum typ, const QString &name, const QString &exp) {\n        d = new TypeData;\n        d->typ = typ;\n        d->name = name;\n        d->exp = exp;\n    }\n    Type(const Type &other)\n        : d(other.d) {}\n    bool IsNull() const { return d->typ == NullApi; }\n    PkgApiEnum type() const { return d->typ; }\n    QString name() const { return d->name; }\n    QList<Value> valueList() const { return d->valueList; }\n    void appendValue(const Value &value) { d->valueList.append(value); }\nprivate:\n     QSharedDataPointer<TypeData> d;\n};\n\nclass PackageData : public QSharedData\n{\npublic:\n    PackageData() {}\n    PackageData(const PackageData &other)\n        : QSharedData(other),\n          name(other.name),\n          valueList(other.valueList),\n          typeList(other.typeList)\n    {}\n    ~PackageData()  { }\n    QString     name;\n    QList<Value> valueList;\n    QList<Type>  typeList;\n};\n\nclass Package\n{\npublic:\n    Package(){d = new PackageData;}\n    Package(const QString &name) {\n        d = new PackageData;\n        d->name = name;\n    }\n\n    Package(const Package &other)\n        : d(other.d) {}\n    ~Package() {}\n    QString name() const { return d->name; }\n    QList<Value> valueList() const {return d->valueList; }\n    QList<Type> typeList() const { return d->typeList; }\n    void appendValue(const Value &value) {\n        d->valueList.append(value);\n    }\n    void appendType(const Type &typ) {\n        d->typeList.append(typ);\n    }\n    Type findType(const QString &typeName) {\n        QListIterator<Type> it(d->typeList);\n        while (it.hasNext()) {\n            Type typ = it.next();\n            if (typ.name() == typeName) {\n                return typ;\n            }\n        }\n        return Type();\n    }\nprotected:\n    QSharedDataPointer<PackageData> d;\n};\n*/\n\nclass GolangApi : public LiteApi::IGolangApi\n{\n    Q_OBJECT\npublic:\n    GolangApi(QObject *parent = 0);\n    bool load(const QString &fileName);\n    bool loadStream(QTextStream *stream);\n    virtual QStringList all(int flag) const;\n    virtual PkgApiEnum findExp(const QString &tag, QString &exp) const;\n    virtual QStringList findDocUrl(const QString &tag) const;\n    virtual QString findDocInfo(const QString &tag) const;\nprotected:\n    Packages m_pkgs;\n};\n\nclass GolangApiThread : public QThread\n{\npublic:\n    GolangApiThread(QObject *parent);\n    ~GolangApiThread();\n    void loadData(const QByteArray &data);\n    void loadFile(const QString &fileName);\n    LiteApi::IGolangApi* api() const;\n    QStringList all() const;\n    QByteArray data() const;\nprotected:\n    virtual void run();\n    QByteArray m_data;\n    QString    m_file;\n    QStringList m_all;\n    GolangApi  *m_api;\n};\n\n#endif // GOLANGAPI_H\n"
  },
  {
    "path": "liteidex/src/utils/golangapi/golangapi.pri",
    "content": "LIBS *= -l$$qtLibraryName(golangapi)\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/golangapi/golangapi.pro",
    "content": "TARGET = golangapi\nTEMPLATE = lib\nCONFIG += staticlib\n\ninclude (../../liteideutils.pri)\ninclude(../../api/golangdocapi/golangdocapi.pri)\n\nSOURCES += golangapi.cpp\n\nHEADERS += golangapi.h\n"
  },
  {
    "path": "liteidex/src/utils/gotools/gotools.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2018 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: gotools.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"gotools.h\"\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n#include <QDebug>\r\n\r\nGopherLib::GopherLib(const QString &libname, QObject *parent) : QObject(parent)\r\n{\r\n    lib.setFileName(libname);\r\n    fnInvokeAsync = 0;\r\n    fnInvoke = 0;\r\n    fnSetenv = 0;\r\n    fnSetBuildEnv = 0;\r\n    fnClearBuildEnv = 0;\r\n    if (lib.isLoaded()) {\r\n        fnInvokeAsync = (InvokeAsyncFunc)lib.resolve(\"InvokeAsync\");\r\n        fnInvoke = (InvokeFunc)lib.resolve(\"Invoke\");\r\n        fnSetenv = (SetenvFunc)lib.resolve(\"Setenv\");\r\n        fnSetBuildEnv = (SetBuildEnvFunc)lib.resolve(\"SetBuildEnv\");\r\n        fnClearBuildEnv = (ClearBuildEnvFunc)lib.resolve(\"ClearBuildEnv\");\r\n    }\r\n}\r\n"
  },
  {
    "path": "liteidex/src/utils/gotools/gotools.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2018 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: gotools.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef GOTOOLS_H\r\n#define GOTOOLS_H\r\n\r\n#include <QObject>\r\n#include <QString>\r\n#include <QLibrary>\r\n#include <QProcessEnvironment>\r\n#include \"liteapi/liteapi.h\"\r\n#include \"libgopher.h\"\r\n\r\ntypedef void (*InvokeAsyncFunc)(TString* p0, TString* p1, TString* p2, TString* p3, void* p4, void* p5);\r\ntypedef int (*InvokeFunc)(GoString p0, GoString p1, GoString p2, GoString p3, GoString* p4, GoString* p5);\r\ntypedef void (*SetenvFunc)(TString *p0, TString *p1);\r\ntypedef void (*SetBuildEnvFunc)(TString* p0, TString* p1);\r\ntypedef void (*ClearBuildEnvFunc)();\r\n\r\ninline bool isUseGopher(LiteApi::IApplication *app)\r\n{\r\n    return app->settings()->value(\"LiteApp/UseLibgopher\",false).toBool();\r\n}\r\n\r\nclass GopherLib : public QObject\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    GopherLib(const QString &libname, QObject *parent = 0);\r\n    bool isValid() const {\r\n        return  fnInvoke != 0 && fnInvokeAsync != 0 && fnSetenv != 0 && fnSetBuildEnv != 0 && fnClearBuildEnv != 0;\r\n    }\r\n    void setEnvironment(const  QProcessEnvironment &environment)\r\n    {\r\n        foreach (QString key, environment.keys()) {\r\n            setenv(key,environment.value(key));\r\n        }\r\n    }\r\n    void setenv(const QString &key, const QString &value)\r\n    {\r\n        QByteArray akey = key.toUtf8();\r\n        QByteArray avalue = value.toUtf8();\r\n        TString p0,p1;\r\n        p0.size = akey.size();\r\n        p0.data = akey.data();\r\n        p1.size = avalue.size();\r\n        p1.data = avalue.data();\r\n        fnSetenv(&p0,&p1);\r\n    }\r\n    void setBuildEnv(const QString &key, const QString &value)\r\n    {\r\n        QByteArray akey = key.toUtf8();\r\n        QByteArray avalue = value.toUtf8();\r\n        TString p0,p1;\r\n        p0.size = akey.size();\r\n        p0.data = akey.data();\r\n        p1.size = avalue.size();\r\n        p1.data = avalue.data();\r\n        fnSetBuildEnv(&p0,&p1);\r\n    }\r\n    void clearBuildEnv()\r\n    {\r\n        fnClearBuildEnv();\r\n    }\r\n    bool invokeArgs(const QStringList &args, const QString &sin, QString &sout, QString &serr)\r\n    {\r\n        return invoke(args[0],QStringList(args.mid(1)).join(\" \"),sin,sout,serr);\r\n    }\r\n    bool invokeArgsData(const QStringList &args, const QByteArray &ain, QString &sout, QString &serr)\r\n    {\r\n        return invoke(args[0],QStringList(args.mid(1)).join(\" \"),ain,sout,serr);\r\n    }\r\n    bool invokeData(const QString &id, const QString &args, const QByteArray &ain, QString &sout, QString &serr)\r\n    {\r\n        QByteArray aid = id.toUtf8();\r\n        QByteArray aargs = args.toUtf8();\r\n        GoString p0,p1,p2,p3,p4,p5;\r\n        p0.n = aid.length();\r\n        p0.p = aid.data();\r\n        p1.n = aargs.length();\r\n        p1.p = aargs.data();\r\n        p2.n = 0;\r\n        p2.p = 0;\r\n        p3.n = ain.length();\r\n        p3.p = ain.data();\r\n        int r = fnInvoke(p0,p1,p2,p3,&p4,&p5);\r\n        sout = QString::fromUtf8(p4.p,p4.n);\r\n        serr = QString::fromUtf8(p5.p,p5.n);\r\n        return r == 0;\r\n    }\r\n    bool invoke(const QString &id, const QString &args, const QString &sin, QString &sout, QString &serr)\r\n    {\r\n        return invokeData(id,args,sin.toUtf8(),sout,serr);\r\n    }\r\n    void invokeAsyncArgs(const QStringList &args, const QString &sin)\r\n    {\r\n        invokeAsync(args[0],QStringList(args.mid(1)).join(\" \"),sin);\r\n    }\r\n    void invokeAsyncArgsData(const QStringList &args, const QByteArray &ain)\r\n    {\r\n        invokeAsyncData(args[0],QStringList(args.mid(1)).join(\" \"),ain);\r\n    }\r\n    void invokeAsync(const QString &id, const QString &args, const QString &sin)\r\n    {\r\n        invokeAsyncData(id,args,sin.toUtf8());\r\n    }\r\n    void invokeAsyncData(const QString &id, const QString &args, const QByteArray &ain)\r\n    {\r\n        QByteArray aid = id.toUtf8();\r\n        QByteArray aargs = args.toUtf8();\r\n        TString p0,p1,p2,p3;\r\n        p0.size = aid.length();\r\n        p0.data = aid.data();\r\n        p1.size = aargs.length();\r\n        p1.data = aargs.data();\r\n        p2.size = 0;\r\n        p2.data = 0;\r\n        p3.size = ain.length();\r\n        p3.data = ain.data();\r\n        fnInvokeAsync(&p0,&p1,&p2,&p3,(void*)this,(void*)(&GopherLib::s_write));\r\n    }\r\n    static int s_write(void *ctx, int flag, char *data, int size)\r\n    {\r\n        return ((GopherLib*)ctx)->write(flag,data,size);\r\n    }\r\n    virtual int write(int flag, const char *data, int size)\r\n    {\r\n        switch (flag) {\r\n        case 0:\r\n            emit finished(size == 0 ? 0 : 1, QString::fromUtf8(data,size));\r\n            break;\r\n        case 1:\r\n            emit extOutput(QByteArray(data,size),false);\r\n            break;\r\n        case 2:\r\n            emit extOutput(QByteArray(data,size),true);\r\n            break;\r\n        default:\r\n            break;\r\n        }\r\n        return size;\r\n    }\r\nsignals:\r\n    void extOutput(const QByteArray &data, bool bError);\r\n    void finished(int code, const QString &errMessage);\r\nprotected:\r\n    QLibrary lib;\r\n    SetenvFunc fnSetenv;\r\n    SetBuildEnvFunc fnSetBuildEnv;\r\n    ClearBuildEnvFunc fnClearBuildEnv;\r\n    InvokeAsyncFunc fnInvokeAsync;\r\n    InvokeFunc fnInvoke;\r\n};\r\n\r\n#endif //GOTOOLS_H\r\n"
  },
  {
    "path": "liteidex/src/utils/gotools/gotools.pri",
    "content": "LIBS *= -l$$qtLibraryName(gotools)\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/gotools/gotools.pro",
    "content": "TARGET = gotools\nTEMPLATE = lib\nCONFIG += staticlib\n\ninclude (../../liteideutils.pri)\n\nHEADERS += gotools.h \\\n    libgopher.h\n\nSOURCES += \\\n    gotools.cpp\n"
  },
  {
    "path": "liteidex/src/utils/gotools/libgopher.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2018 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: libgopher.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef LIBGOPHER_H\r\n#define LIBGOPHER_H\r\n\r\n#include <stddef.h> /* for ptrdiff_t below */\r\n#include <QtGlobal>\r\n\r\n#ifndef GO_CGO_EXPORT_PROLOGUE_H\r\n#define GO_CGO_EXPORT_PROLOGUE_H\r\n\r\ntypedef struct { const char *p; ptrdiff_t n; } _GoString_;\r\n\r\n#endif\r\n\r\n/* Start of preamble from import \"C\" comments.  */\r\n\r\n#ifndef GO_CGO_PROLOGUE_H\r\n#define GO_CGO_PROLOGUE_H\r\n\r\ntypedef struct {const char *data; int size;} TString;\r\ntypedef signed char GoInt8;\r\ntypedef unsigned char GoUint8;\r\ntypedef short GoInt16;\r\ntypedef unsigned short GoUint16;\r\ntypedef int GoInt32;\r\ntypedef unsigned int GoUint32;\r\ntypedef long long GoInt64;\r\ntypedef unsigned long long GoUint64;\r\n\r\ntypedef qptrdiff GoInt;\r\ntypedef quintptr GoUint;\r\n\r\ntypedef quintptr GoUintptr;\r\ntypedef float GoFloat32;\r\ntypedef double GoFloat64;\r\n\r\ntypedef _GoString_ GoString;\r\ntypedef void *GoMap;\r\ntypedef void *GoChan;\r\ntypedef struct { void *t; void *v; } GoInterface;\r\ntypedef struct { void *data; GoInt len; GoInt cap; } GoSlice;\r\n\r\n#endif\r\n\r\n/* End of boilerplate cgo prologue.  */\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n\r\nextern void Setenv(TString* p0, TString* p1);\r\n\r\nextern void SetBuildEnv(TString* p0, TString* p1);\r\n\r\nextern void ClearBuildEnv();\r\n\r\nextern void InvokeAsync(TString* p0, TString* p1, TString* p2, TString* p3, void* p4, void* p5);\r\n\r\nextern GoInt32 Invoke(GoString p0, GoString p1, GoString p2, GoString p3, GoString* p4, GoString* p5);\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n\r\n#endif // LIBGOPHER_H\r\n"
  },
  {
    "path": "liteidex/src/utils/htmlutil/htmlutil.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: htmlutil.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"htmlutil.h\"\n#include <QStringList>\n#include <QDomDocument>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nHtmlUtil::HtmlUtil()\n{\n}\n/*\n<!--{\n    \"Title\": \"Getting Started\",\n    \"Path\":  \"/install/\"\n}-->\n*/\n\nQString HtmlUtil::findTitle(const QString &data)\n{\n    QRegExp reg(\"<!--([\\\\w\\\\s\\\\n{}\\\":/,]*)-->\");\n    int n = reg.indexIn(data);\n    if (n < 0) {\n        return QString();\n    }\n    QRegExp reg1(\"Title[\\\"\\\\s:]*([\\\\w\\\\s]*)[\\\\s\\\"]*\");\n    n = reg1.indexIn(reg.cap(1));\n    if (n < 0) {\n        return QString();\n    }\n    return reg1.cap(1);\n}\n\nQString HtmlUtil::docToNavdoc(const QString &data, QString &header, QString &nav)\n{\n    QDomDocument doc;\n    QStringList srcLines = data.split(\"\\n\");\n    QStringList navLines;\n    QStringList dstLines;\n    navLines.append(\"<table class=\\\"unruled\\\"><tbody><tr><td class=\\\"first\\\"><dl>\");\n    int index = 0;\n    if (srcLines.length() >= 1) {\n        header = findTitle(data);\n        if (header.isEmpty()) {\n            //<!-- How to Write Go Code -->\n            QString line = srcLines.at(0);\n            QRegExp reg(\"<!--([\\\\w\\\\s]*)-->\");\n            if (reg.indexIn(line) >= 0) {\n                header = reg.cap(1).trimmed();\n            }\n        }\n    }\n    foreach(QString source, srcLines) {\n        QString line = source.trimmed();\n        index++;\n        if (line.length() >= 10) {\n            if (line.left(3) == \"<h2\") {\n                if (doc.setContent(line)) {\n                    QDomElement e = doc.firstChildElement(\"h2\");\n                    if (!e.isNull()) {\n                        QString text = e.text();\n                        QString id = e.attribute(\"id\");\n                        if (id.isEmpty()) {\n                            id = QString(\"tmp_%1\").arg(index);\n                            e.setAttribute(\"id\",id);\n                        }\n                        //<span class=\"navtop\"><a href=\"#top\">[Top]</a></span>\n                        QDomElement span = doc.createElement(\"span\");\n                        span.setAttribute(\"class\",\"navtop\");\n                        QDomElement a = doc.createElement(\"a\");\n                        a.setAttribute(\"href\",\"#top\");\n                        QDomText top = doc.createTextNode(\"[Top]\");\n                        a.appendChild(top);\n                        span.appendChild(a);\n                        e.appendChild(span);\n\n                        source = doc.toString();\n                        navLines << QString(\"<dt><a href=\\\"#%1\\\">%2</a></dt>\").arg(id).arg(text);\n                    }\n                }\n            }\n            else if (line.left(3) == \"<h3\") {\n                if (doc.setContent(line)) {\n                    QDomElement e = doc.firstChildElement(\"h3\");\n                    if (!e.isNull()) {\n                        QString text = e.text();\n                        QString id = e.attribute(\"id\");\n                        if (id.isEmpty()) {\n                            id = QString(\"tmp_%1\").arg(index);\n                            e.setAttribute(\"id\",id);\n                        }\n                        source = doc.toString();\n                        navLines << QString(\"<dd><a href=\\\"#%1\\\">%2</a></dd>\").arg(id).arg(text);\n                    }\n                }\n           }\n        }\n        dstLines.append(source);\n    }\n    navLines.append(\"</dl></td><td><dl></dl></td><tr></tbody></table>\");\n    nav = navLines.join(\"\");\n    return dstLines.join(\"\\n\");\n}\n"
  },
  {
    "path": "liteidex/src/utils/htmlutil/htmlutil.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: htmlutil.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef HTMLUTIL_H\n#define HTMLUTIL_H\n\n#include <QString>\n\nclass HtmlUtil\n{\npublic:\n    HtmlUtil();\n    static QString docToNavdoc(const QString &data, QString &header, QString &nav);\n    static QString findTitle(const QString &data);\n};\n\n#endif // HTMLUTIL_H\n"
  },
  {
    "path": "liteidex/src/utils/htmlutil/htmlutil.pri",
    "content": "LIBS *= -l$$qtLibraryName(htmlutil)\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/htmlutil/htmlutil.pro",
    "content": "TARGET = htmlutil\nTEMPLATE = lib\nCONFIG += staticlib\n\nQT += xml\n\ninclude (../../liteideutils.pri)\n\nSOURCES += htmlutil.cpp\n\nHEADERS += htmlutil.h\n"
  },
  {
    "path": "liteidex/src/utils/iconutil/iconutil.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: iconutil.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"iconutil.h\"\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n"
  },
  {
    "path": "liteidex/src/utils/iconutil/iconutil.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2017 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: iconutil.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef ICONUTIL_H\n#define ICONUTIL_H\n\n#include <QIcon>\n#include <QDebug>\n\ninline QIcon loadIcon(const QString &fileName)\n{\n    QIcon icon(fileName);\n    if (icon.availableSizes().isEmpty()) {\n        qDebug() << \"warning empty icon\" << fileName;\n        return QIcon();\n    }\n    return icon;\n}\n\n#endif // ICONUTIL_H\n"
  },
  {
    "path": "liteidex/src/utils/iconutil/iconutil.pri",
    "content": "LIBS *= -l$$qtLibraryName(iconutil)\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/iconutil/iconutil.pro",
    "content": "TARGET = iconutil\nTEMPLATE = lib\nCONFIG += staticlib\n\ninclude (../../liteideutils.pri)\n\nSOURCES += iconutil.cpp\n\nHEADERS += iconutil.h\n"
  },
  {
    "path": "liteidex/src/utils/mimetype/mimetype.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: mimetype.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"mimetype.h\"\n\n#include <QFile>\n#include <QXmlStreamReader>\n#include <QCoreApplication>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nQString MimeType::package() const\n{\n    return m_package;\n}\n\nQString MimeType::type() const\n{\n    return m_type;\n}\n\nQString MimeType::scheme() const\n{\n    return m_scheme;\n}\n\nQString MimeType::comment() const\n{\n    return m_comment.join(\"/\");\n}\n\nQString MimeType::codec() const\n{\n    return m_codec;\n}\n\nbool MimeType::tabToSpace() const\n{\n    return m_tabToSpace;\n}\n\nint MimeType::tabWidth() const\n{\n    return m_tabWidth;\n}\n\nQStringList MimeType::globPatterns() const\n{\n    return m_globPatterns;\n}\nQStringList MimeType::subClassesOf() const\n{\n    return m_subClassesOf;\n}\n\nvoid MimeType::merge(const IMimeType *mimeType)\n{\n    if (m_type != mimeType->type()) {\n        return;\n    }\n    m_subClassesOf.append(mimeType->subClassesOf());\n    m_globPatterns.append(mimeType->globPatterns());    \n    m_customPatterns.append(mimeType->customPatterns());\n    m_comment.append(mimeType->comment());\n\n    if (!mimeType->codec().isEmpty()) {\n        m_codec = mimeType->codec();\n    }\n    if (!mimeType->scheme().isEmpty()) {\n        m_scheme = mimeType->scheme();\n    }\n    if (!mimeType->package().isEmpty()) {\n        m_package = mimeType->package();\n    }\n    if (mimeType->tabToSpace()) {\n        m_tabToSpace = mimeType->tabToSpace();\n    }\n    if (mimeType->tabWidth() != -1) {\n        m_tabWidth = mimeType->tabWidth();\n    }\n    m_subClassesOf.removeDuplicates();\n    m_globPatterns.removeDuplicates();\n    m_customPatterns.removeDuplicates();\n    m_comment.removeDuplicates();\n}\n\nvoid MimeType::setCustomPatterns(const QStringList &custom)\n{\n    m_customPatterns = custom;\n}\n\nQStringList MimeType::customPatterns() const\n{\n    return m_customPatterns;\n}\n\nQStringList MimeType::allPatterns() const\n{\n    QStringList all;\n    all << m_globPatterns;\n    all << m_customPatterns;\n    all.removeDuplicates();\n    return all;\n}\n\nvoid MimeType::setPackage(const QString &package)\n{\n    m_package = package;\n}\n\nvoid MimeType::setType(const QString &type)\n{\n    m_type = type;\n}\n\nvoid MimeType::setScheme(const QString &scheme)\n{\n    m_scheme = scheme;\n}\n\nvoid MimeType::setCodec(const QString &codec)\n{\n    m_codec = codec;\n}\n\nvoid MimeType::setTabToSpace(const QString &s)\n{\n    if (s == \"true\" || s == \"1\") {\n        m_tabToSpace = true;\n    }\n}\n\nvoid MimeType::setTabWidth(const QString &s)\n{\n    bool ok = false;\n    int n = s.toInt(&ok);\n    if (ok) {\n        m_tabWidth = n;\n    }\n}\n\nvoid MimeType::setComment(const QString &comment)\n{\n    m_comment.append(comment);\n}\n\nvoid MimeType::appendLocalComment(const QString &local, const QString &comment)\n{\n    if (!local.isEmpty() && !comment.isEmpty()) {\n        m_localCommentMap.insert(local,comment);\n    }\n}\n\nvoid MimeType::appendGlobPatterns(const QString &globPattern)\n{\n    if (globPattern.isEmpty()) {\n        return;\n    }\n    m_globPatterns.append(globPattern);\n}\n\nvoid MimeType::appendSubClassesOf(const QString &subClassOf)\n{\n    if (subClassOf.isEmpty()) {\n        return;\n    }\n    m_subClassesOf.append(subClassOf);\n}\n\nbool MimeType::isEmpty() const\n{\n    return m_type.isEmpty();\n}\n\nbool MimeType::loadMimeTypes(LiteApi::IMimeTypeManager *manager, const QString &fileName)\n{\n    QFile file(fileName);\n    if (!file.open(QIODevice::ReadOnly|QIODevice::Text)) {\n        return false;\n    }\n\n    return MimeType::loadMimeTypes(manager,&file,fileName);\n}\n\nbool MimeType::loadMimeTypes(LiteApi::IMimeTypeManager *manager, QIODevice *dev, const QString &/*fileName*/)\n{\n    QXmlStreamReader reader(dev);\n    QXmlStreamAttributes attrs;\n    MimeType *mimeType = 0;\n    while (!reader.atEnd()) {\n        switch (reader.readNext()) {\n        case QXmlStreamReader::StartElement:\n            attrs = reader.attributes();\n            if (reader.name() == \"mime-type\" && mimeType == 0) {\n                mimeType = new MimeType;\n                mimeType->setType(attrs.value(\"type\").toString());\n                mimeType->setPackage(attrs.value(\"package\").toString());\n                mimeType->setCodec(attrs.value(\"codec\").toString());\n                mimeType->setScheme(attrs.value(\"scheme\").toString());\n                mimeType->setTabToSpace(attrs.value(\"tabtospace\").toString());\n                mimeType->setTabWidth(attrs.value(\"tabwidth\").toString());\n            } else if (reader.name() == \"sub-class-of\" && mimeType) {\n                mimeType->appendSubClassesOf(attrs.value(\"type\").toString());\n            } else if (reader.name() == \"comment\" && mimeType) {\n                QString locale = attrs.value(\"xml:lang\").toString();\n                const QString comment = QCoreApplication::translate(\"MimeType\", reader.readElementText().toLatin1());\n                if (locale.isEmpty()) {\n                    mimeType->setComment(comment);\n                } else {\n                    mimeType->appendLocalComment(locale,comment);\n                }\n            } else if (reader.name() == \"glob\" && mimeType) {\n                mimeType->appendGlobPatterns(attrs.value(\"pattern\").toString());\n            }\n            break;\n        case QXmlStreamReader::EndElement:\n            if (reader.name() == \"mime-type\") {\n                bool b = false;\n                if (mimeType && !mimeType->isEmpty()) {\n                    if (manager->addMimeType(mimeType)) {\n                        b = true;\n                    }\n                }\n                if (!b) {\n                    delete mimeType;\n                }\n                mimeType = 0;\n            }\n            break;\n        default:\n            break;\n        }\n    }\n    return true;\n}\n"
  },
  {
    "path": "liteidex/src/utils/mimetype/mimetype.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: mimetype.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEAPI_MIMETYPE_H\n#define LITEAPI_MIMETYPE_H\n\n#include \"liteapi/liteapi.h\"\n\nclass MimeType : public LiteApi::IMimeType\n{\npublic:\n    MimeType(): m_tabToSpace(false), m_tabWidth(4)\n    {\n    }\n    virtual QString package() const;\n    virtual QString type() const;\n    virtual QString scheme() const;\n    virtual QString comment() const;\n    virtual QString codec() const;\n    virtual bool tabToSpace() const;\n    virtual int tabWidth() const;\n    virtual QStringList globPatterns() const;    \n    virtual QStringList subClassesOf() const;\n    virtual void merge(const IMimeType *mimeType);\n    virtual void setCustomPatterns(const QStringList &custom);\n    virtual QStringList customPatterns() const;\n    virtual QStringList allPatterns() const;\n\n    void setPackage(const QString &package);\n    void setType(const QString &type);\n    void setScheme(const QString &scheme);\n    void setCodec(const QString &codec);\n    void setTabToSpace(const QString &s);\n    void setTabWidth(const QString &s);\n    void setComment(const QString &comment);\n    void appendGlobPatterns(const QString &globPattern);\n    void appendSubClassesOf(const QString &subClassOf);\n    void appendLocalComment(const QString &local, const QString &commnet);\n    bool isEmpty() const;\npublic:\n    static bool loadMimeTypes(LiteApi::IMimeTypeManager *manager, const QString &fileName);\n    static bool loadMimeTypes(LiteApi::IMimeTypeManager *manager, QIODevice *dev, const QString &fileName);\nprotected:\n    bool    m_tabToSpace; // default false\n    int     m_tabWidth; //default 4\n    QString m_package;\n    QString m_type;\n    QString m_scheme;\n    QString m_codec;\n    QStringList m_comment;\n    QStringList m_globPatterns;\n    QStringList m_subClassesOf;\n    QStringList m_customPatterns;\n    QMap<QString,QString> m_localCommentMap;\n};\n\n#endif // LITEAPI_MIMETYPE_H\n"
  },
  {
    "path": "liteidex/src/utils/mimetype/mimetype.pri",
    "content": "LIBS *= -l$$qtLibraryName(mimetype)\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/mimetype/mimetype.pro",
    "content": "TARGET = mimetype\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude(../../liteideutils.pri)\n\nHEADERS += mimetype.h \n\nSOURCES += mimetype.cpp\n"
  },
  {
    "path": "liteidex/src/utils/modelproject/modelfileimpl.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: modelfileimpl.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"modelfileimpl.h\"\n#include \"fileutil/fileutil.h\"\n\n#include <QStandardItemModel>\n#include <QFile>\n#include <QFileInfo>\n#include <QDir>\n#include <QMessageBox>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nModelFileImpl::ModelFileImpl(LiteApi::IApplication *app, QObject *parent)\n    : LiteApi::IFile(parent),\n      m_liteApp(app)\n{\n    m_model = new QStandardItemModel(this);\n    m_bReadOnly = false;\n}\n\nbool ModelFileImpl::loadText(const QString &fileName, const QString &mimeType, QString &/*outText*/)\n{\n    m_mimeType = mimeType;\n    if (!loadFile(fileName)) {\n        return false;\n    }\n    m_fileName = fileName;\n    m_rootPath = QFileInfo(m_fileName).absolutePath();\n    return true;\n}\n\nbool ModelFileImpl::reloadText(QString &outText)\n{\n    if (m_fileName.isEmpty()) {\n        return false;\n    }\n    return loadText(m_fileName,m_mimeType,outText);\n}\n\nbool ModelFileImpl::isReadOnly() const\n{\n    return m_bReadOnly;\n}\n\nbool ModelFileImpl::isBinary() const\n{\n    return false;\n}\n\nbool ModelFileImpl::saveText(const QString &/*fileName*/, const QString &/*text*/)\n{\n    return false;\n}\n\nQString ModelFileImpl::filePath() const\n{\n    return m_fileName;\n}\n\nQString ModelFileImpl::mimeType() const\n{\n    return m_mimeType;\n}\n\nQStandardItemModel *ModelFileImpl::model() const\n{\n    return m_model;\n}\n\nQString ModelFileImpl::value(const QString &key) const\n{\n    QStringList val = m_context.value(key);\n    if (!val.isEmpty()) {\n        return val.at(0);\n    }\n    return QString();\n}\n\nQStringList ModelFileImpl::values(const QString &key) const\n{\n    return m_context.value(key);\n}\n\nQStringList ModelFileImpl::fileNameList() const\n{\n    return m_fileNameList;\n}\n\nQStringList ModelFileImpl::filePathList() const\n{\n    return m_filePathList;\n}\n\nQString ModelFileImpl::fileNameToFullPath(const QString &fileName)\n{\n    QString fullPath = m_rootPath;\n    fullPath += QLatin1Char('/');\n    fullPath += fileName;\n    return fullPath;\n}\n\nQString ModelFileImpl::workPath() const\n{\n    return QFileInfo(m_fileName).absolutePath();\n}\n"
  },
  {
    "path": "liteidex/src/utils/modelproject/modelfileimpl.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: modelfileimpl.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MODELFILEIMPL_H\n#define MODELFILEIMPL_H\n\n#include \"liteapi/liteapi.h\"\n\nclass QStandardItemModel;\nclass ModelFileImpl : public LiteApi::IFile\n{\n    Q_OBJECT\npublic:\n    ModelFileImpl(LiteApi::IApplication *app, QObject *parent);\n    enum ITEM_TYPE{\n        ItemRoot = 1,\n        ItemFolder,\n        ItemProFile,\n        ItemFile\n    };\npublic:\n    virtual bool loadText(const QString &filePath, const QString &mimeType, QString &outText);\n    virtual bool reloadText(QString &outText);\n    virtual bool saveText(const QString &filePath, const QString &text);\n    virtual bool isReadOnly() const;\n    virtual bool isBinary() const;\n    virtual QString filePath() const;\n    virtual QString mimeType() const;\npublic:\n    virtual void updateModel() = 0;\nprotected:\n    virtual bool loadFile(const QString &filePath) = 0;\npublic:\n    virtual QString target() const = 0;\n    virtual QString targetPath() const = 0;\n    virtual QString workPath() const;\n    virtual QMap<QString,QString> targetInfo() const = 0;\n    QStandardItemModel *model() const;\n    QString value(const QString &key) const;\n    QStringList values(const QString &key) const;\n    QStringList fileNameList() const;\n    QStringList filePathList() const;\n    QString fileNameToFullPath(const QString &filePath);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QStandardItemModel       *m_model;\n    QString     m_rootPath;\n    QMap<QString,QStringList>   m_context;\n    QStringList m_fileNameList;\n    QStringList m_filePathList;\n    QString     m_mimeType;\n    QString     m_fileName;\n    bool        m_bReadOnly;\n};\n\n#endif // MODELFILEIMPL_H\n"
  },
  {
    "path": "liteidex/src/utils/modelproject/modelproject.pri",
    "content": "LIBS *= -l$$qtLibraryName(modelproject)\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/modelproject/modelproject.pro",
    "content": "TARGET = modelproject\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude (../../liteideutils.pri)\ninclude (../fileutil/fileutil.pri)\n\nHEADERS += \\\n    modelprojectimpl.h \\\n    modelfileimpl.h\n\nSOURCES += \\\n    modelprojectimpl.cpp \\\n    modelfileimpl.cpp\n"
  },
  {
    "path": "liteidex/src/utils/modelproject/modelprojectimpl.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: modelprojectimpl.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"modelprojectimpl.h\"\n#include \"modelfileimpl.h\"\n#include \"fileutil/fileutil.h\"\n\n#include <QVBoxLayout>\n#include <QFileInfo>\n#include <QStandardItem>\n#include <QStandardItemModel>\n#include <QTreeView>\n#include <QToolBar>\n#include <QFileInfo>\n#include <QDir>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nModelProjectImpl::ModelProjectImpl(LiteApi::IApplication *app)\n    : m_liteApp(app)\n{\n    m_widget = new QWidget(m_liteApp->mainWindow());\n    m_tree = new QTreeView;\n    m_tree->setEditTriggers(QAbstractItemView::NoEditTriggers);\n    m_tree->setHeaderHidden(true);\n    m_tree->setContextMenuPolicy(Qt::CustomContextMenu);\n\n    QVBoxLayout *layout = new QVBoxLayout;\n    layout->setMargin(0);\n    layout->addWidget(m_tree);\n    m_widget->setLayout(layout);\n\n    connect(m_tree,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(doubleClickedTree(QModelIndex)));\n    connect(m_liteApp->editorManager(),SIGNAL(editorSaved(LiteApi::IEditor*)),this,SLOT(editorSaved(LiteApi::IEditor*)));\n}\n\nModelProjectImpl::~ModelProjectImpl()\n{\n    if (m_widget) {\n        delete m_widget;\n    }\n   // m_liteApp->dockManager()->removeDock(m_widget);\n}\n\nvoid ModelProjectImpl::load()\n{\n    //m_liteApp->dockManager()->addDock(m_widget,tr(\"Project - \")+displayName());\n}\n\nQWidget *ModelProjectImpl::widget()\n{\n    return m_widget;\n}\n\nQString ModelProjectImpl::name() const\n{\n    return QFileInfo(m_file->filePath()).fileName();\n}\n\nQIcon ModelProjectImpl::icon() const\n{\n    return QIcon();\n}\n\nLiteApi::IFile *ModelProjectImpl::file()\n{\n    return m_file;\n}\n\nQString ModelProjectImpl::filePath() const\n{\n    if (m_file) {\n        return m_file->filePath();\n    }\n    return QString();\n}\n\nQString ModelProjectImpl::mimeType() const\n{\n    if (m_file) {\n        return m_file->mimeType();\n    }\n    return QString();\n}\n\n\nvoid ModelProjectImpl::setModelFile(ModelFileImpl *file)\n{\n    if (m_file == file) {\n        return;\n    }\n    m_file = file;\n    m_tree->setModel(m_file->model());\n}\n\nbool ModelProjectImpl::open(const QString &fileName, const QString &mimeType)\n{\n    QString outText;\n    bool success =  m_file->loadText(fileName,mimeType,outText);\n    if (success) {\n        m_file->updateModel();\n        m_tree->expandAll();\n    }\n    return success;\n}\n\nQStringList ModelProjectImpl::folderList() const\n{\n    QFileInfo info(m_file->filePath());\n    return QStringList() << info.path();\n}\n\nQStringList ModelProjectImpl::fileNameList() const\n{\n    return m_file->fileNameList();\n}\n\nQStringList ModelProjectImpl::filePathList() const\n{\n    return m_file->filePathList();\n}\n\nQString ModelProjectImpl::fileNameToFullPath(const QString &fileName)\n{\n    return m_file->fileNameToFullPath(fileName);\n}\n\nQMap<QString,QString> ModelProjectImpl::targetInfo() const\n{\n    return m_file->targetInfo();\n}\n\nvoid ModelProjectImpl::editorSaved(LiteApi::IEditor *editor)\n{\n    if (!editor) {\n        return;\n    }\n\n    if (FileUtil::compareFile(editor->filePath(),m_file->filePath())) {\n        QString outText;\n        bool success = m_file->reloadText(outText);\n        if (success) {\n            m_file->updateModel();\n            m_tree->expandAll();\n            emit reloaded();\n        }\n    }\n}\n\nvoid ModelProjectImpl::doubleClickedTree(QModelIndex index)\n{\n    if (!index.isValid()) {\n        return;\n    }\n    QStandardItem *item = m_file->model()->itemFromIndex(index);\n    if (!item) {\n        return;\n    }\n    bool ok;\n    int itemType = item->data().toInt(&ok);\n    if (ok && ( itemType == ModelFileImpl::ItemFile ||\n               itemType == ModelFileImpl::ItemProFile ) ) {\n        QString fileName = m_file->fileNameToFullPath(item->text());\n        if (!fileName.isEmpty()) {\n            m_liteApp->fileManager()->openEditor(fileName);\n        }\n    }\n}\n"
  },
  {
    "path": "liteidex/src/utils/modelproject/modelprojectimpl.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: modelprojectimpl.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef MODELPROJECTIMPL_H\n#define MODELPROJECTIMPL_H\n\n#include \"liteapi/liteapi.h\"\n#include <QModelIndex>\n#include <QPointer>\n\nclass QTreeView;\nclass QStandardItemModel;\nclass ModelFileImpl;\nclass ModelProjectImpl : public LiteApi::IProject\n{\n    Q_OBJECT\npublic:\n    ModelProjectImpl(LiteApi::IApplication *app);\n    virtual ~ModelProjectImpl();\npublic:\n    virtual QWidget *widget();\n    virtual QString name() const;\n    virtual QIcon icon() const;\npublic:\n    virtual LiteApi::IFile *file();\n    virtual QString filePath() const;\n    virtual QString mimeType() const;\n    virtual QStringList folderList() const;\n    virtual QStringList fileNameList() const;\n    virtual QStringList filePathList() const;\n    virtual QString fileNameToFullPath(const QString &filePath);\n    virtual QMap<QString,QString> targetInfo() const;\n    virtual void load();\npublic:\n    virtual bool open(const QString &filePath, const QString &mimeType);\n    void setModelFile(ModelFileImpl *file);\nprotected slots:\n    virtual void doubleClickedTree(QModelIndex index);\n    virtual void editorSaved(LiteApi::IEditor*);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QPointer<ModelFileImpl>  m_file;\n    QWidget             *m_widget;\n    QTreeView           *m_tree;\n    QStandardItemModel  *m_model;\n};\n\n#endif // MODELPROJECTIMPL_H\n"
  },
  {
    "path": "liteidex/src/utils/navigate/navigate.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: navigate.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"navigate.h\"\n#include \"quickopenapi/quickopenapi.h\"\n#include <QDir>\n#include <QAction>\n#include <QLabel>\n#include <QTreeView>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nstatic QString escaped(const QString &text)\n{\n#if QT_VERSION >= 0x050000\n    return text.toHtmlEscaped();\n#else\n    return Qt::escape(text);\n#endif\n}\n\nNavigateBar::NavigateBar(LiteApi::IApplication *app, QObject *parent) :\n    QObject(parent), m_liteApp(app), m_toolBar(0)\n{\n}\n\nNavigateBar::~NavigateBar()\n{\n\n}\n\nQToolBar *NavigateBar::createToolBar(const QString &title, QWidget *parent)\n{\n    if (m_toolBar) {\n        return  m_toolBar;\n    }\n    m_toolBar = new QToolBar(title,parent);\n    m_toolBar->setIconSize(LiteApi::getToolBarIconSize(m_liteApp));\n    return  m_toolBar;\n}\n\nvoid NavigateBar::LoadPath(const QString &path)\n{\n    m_filePath = path;\n    QFileInfo info(path);\n    if (!info.filePath().startsWith(\"//\")) {\n        QStringList paths = QDir::fromNativeSeparators(info.filePath()).split(\"/\");\n        if (paths.size() >= 2) {\n            QString head = \"<style> a{text-decoration: none; color:darkgray;} </style>\";\n            //m_editNavHeadAct = m_editNavBar->addSeparator();\n            QString last;\n#ifdef Q_OS_WIN\n            last = paths[0];\n#endif\n            for (int i = 1; i < paths.size(); i++) {\n                QString name = paths[i];\n#ifdef Q_OS_WIN\n                if (i == 1) {\n                    name = paths[0]+\"\\\\\"+paths[1];\n                }\n#endif\n                QString path = last+\"/\"+paths[i];\n                last = path;\n                if (i != paths.size()-1) {\n                    name += \">\";\n                }\n                QString text = QString(\"<a href=\\\"%1\\\">%2</a>\").arg(escaped(path)).arg(escaped(name));\n                QLabel *lbl = new QLabel;\n                lbl->setText(head+text);\n                m_toolBar->addWidget(lbl);\n                connect(lbl,SIGNAL(linkActivated(QString)),this,SLOT(pathLinkActivated(QString)));\n            }\n            m_navHeadAct = m_toolBar->actions().first();\n        }\n    }\n    QAction *emptyAct = new QAction(this);\n    m_toolBar->addAction(emptyAct);\n}\n\nQToolBar *NavigateBar::createNavToolBar(QWidget *parent)\n{\n    QFileInfo info(m_filePath);\n\n    QStringList paths = QDir::fromNativeSeparators(info.filePath()).split(\"/\");\n    if (paths.size() < 2) {\n        return 0;\n    }\n    QString head = \"<style> a{text-decoration: none; color:darkgray;} </style>\";\n\n    QToolBar *toolBar = new QToolBar(parent);\n    toolBar->setIconSize(LiteApi::getToolBarIconSize(m_liteApp));\n    QString last;\n#ifdef Q_OS_WIN\n    last = paths[0];\n#endif\n    for (int i = 1; i < paths.size(); i++) {\n        QString name = paths[i];\n#ifdef Q_OS_WIN\n        if (i == 1) {\n            name = paths[0]+\"\\\\\"+paths[1];\n        }\n#endif\n        QString path = last+\"/\"+paths[i];\n        last = path;\n        if (i != paths.size()-1) {\n            name += \">\";\n        }\n        QString text = QString(\"<a href=\\\"%1\\\">%2</a>\").arg(escaped(path)).arg(escaped(name));\n        QLabel *lbl = new QLabel;\n        lbl->setText(head+text);\n        toolBar->addWidget(lbl);\n        connect(lbl,SIGNAL(linkActivated(QString)),this,SLOT(quickPathLinkActivated(QString)));\n    }\n    QAction *empytAct = new QAction(toolBar);\n    toolBar->addAction(empytAct);\n    return  toolBar;\n}\n\n\nvoid NavigateBar::pathLinkActivated(const QString &path)\n{\n    QString dirpath = QFileInfo(path).absolutePath();\n    LiteApi::IQuickOpenManager *mgr = LiteApi::getQuickOpenManager(m_liteApp);\n    if (mgr) {\n        LiteApi::IQuickOpenFileSystem *fileSystem = LiteApi::getQuickOpenFileSystem(mgr);\n        if (fileSystem) {\n            fileSystem->setRootPath(dirpath);\n            fileSystem->setPlaceholderText(QString(tr(\"Browser Files in %1\").arg(QDir::toNativeSeparators(dirpath))));\n            mgr->setCurrentFilter(fileSystem);\n            mgr->modelView()->setRootIndex(fileSystem->rootIndex());\n            QModelIndex index = fileSystem->indexForPath(path);\n            mgr->modelView()->setCurrentIndex(index);\n            mgr->setTempToolBar(this->createNavToolBar(mgr->widget()));\n            QRect rc = m_toolBar->actionGeometry(m_navHeadAct);\n            QPoint pt = m_toolBar->mapToGlobal(rc.topLeft());\n            mgr->showPopup(&pt);\n            mgr->modelView()->scrollTo(index);\n            return;\n        }\n    }\n}\n\nvoid NavigateBar::quickPathLinkActivated(const QString &path)\n{\n    QString dirpath = QFileInfo(path).absolutePath();\n    LiteApi::IQuickOpenManager *mgr = LiteApi::getQuickOpenManager(m_liteApp);\n    if (mgr) {\n        LiteApi::IQuickOpenFileSystem *fileSystem = LiteApi::getQuickOpenFileSystem(mgr);\n        if (fileSystem) {\n            fileSystem->setRootPath(dirpath);\n            fileSystem->setPlaceholderText(QString(tr(\"Browser Files in %1\").arg(QDir::toNativeSeparators(dirpath))));\n            mgr->setCurrentFilter(fileSystem);\n            mgr->modelView()->setRootIndex(fileSystem->rootIndex());\n            QModelIndex index = fileSystem->indexForPath(path);\n            mgr->modelView()->setCurrentIndex(index);\n        }\n    }\n}\n\n"
  },
  {
    "path": "liteidex/src/utils/navigate/navigate.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: navigate.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef NAVIGATE_H\n#define NAVIGATE_H\n\n#include \"liteapi/liteapi.h\"\n\nclass NavigateBar : public QObject\n{\n    Q_OBJECT\npublic:\n    NavigateBar(LiteApi::IApplication *app, QObject *parent);\n    virtual ~NavigateBar();\n    QToolBar* createToolBar(const QString &title, QWidget *parent);\n    void LoadPath(const QString &path);\n    QToolBar *toolBar() const {\n        return  m_toolBar;\n    }\npublic slots:\n    void pathLinkActivated(const QString &path);\n    void quickPathLinkActivated(const QString &path);\nprotected:\n    QToolBar *createNavToolBar(QWidget *parent);\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    QToolBar *m_toolBar;\n    QAction *m_navHeadAct;\n    QString m_filePath;\n};\n\n#endif // NAVIGATE_H\n"
  },
  {
    "path": "liteidex/src/utils/navigate/navigate.pri",
    "content": "LIBS *= -l$$qtLibraryName(navigate)\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/navigate/navigate.pro",
    "content": "TARGET = navigate\nTEMPLATE = lib\nCONFIG += staticlib\n\ninclude (../../liteideutils.pri)\n\nSOURCES += navigate.cpp\n\nHEADERS += navigate.h\n"
  },
  {
    "path": "liteidex/src/utils/processex/processex.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: processex.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"processex.h\"\n#include <QMap>\n\n#ifndef Q_OS_WIN\n#include <signal.h>\n#endif\n\n#ifdef Q_OS_WIN\n#include <windows.h>\n#include <shellapi.h>\n#endif\n\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nQString ProcessEx::exitStatusText(int code, QProcess::ExitStatus status)\n{\n    static QString text;\n    switch (status) {\n    case QProcess::NormalExit:\n        text = tr(\"process exited with code %1\").arg(code);\n        break;\n    case QProcess::CrashExit:\n        text = tr(\"process crashed or was terminated\");\n        break;\n    default:\n        text = tr(\"process exited with an unknown status\");\n    }\n    return text;\n}\n\nQString ProcessEx::processErrorText(QProcess::ProcessError code)\n{\n    static QString text;\n    switch (code) {\n    case QProcess::FailedToStart:\n        text = tr(\"process failed to start\");\n        break;\n    case QProcess::Crashed:\n        text = tr(\"process crashed or was terminated while running\");\n        break;\n    case QProcess::Timedout:\n        text = tr(\"timed out waiting for process\");\n        break;\n    case QProcess::ReadError:\n        text = tr(\"couldn't read from the process\");\n        break;\n    case QProcess::WriteError:\n        text = tr(\"couldn't write to the process\");\n        break;\n    case QProcess::UnknownError:\n    default:\n        text = tr(\"an unknown error occurred\");\n    }\n    return text;\n}\n\nProcessEx::ProcessEx(QObject *parent)\n    : Process(parent), m_suppressFinish(false)\n{\n    connect(this,SIGNAL(stateChanged(QProcess::ProcessState)),this,SLOT(slotStateChanged(QProcess::ProcessState)));\n    connect(this,SIGNAL(readyReadStandardOutput()),this,SLOT(slotReadOutput()));\n    connect(this,SIGNAL(readyReadStandardError()),this,SLOT(slotReadError()));\n    connect(this,SIGNAL(error(QProcess::ProcessError)),this,SLOT(slotError(QProcess::ProcessError)));\n    connect(this,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(slotFinished(int,QProcess::ExitStatus)));\n}\n\nvoid ProcessEx::slotStateChanged(QProcess::ProcessState newState)\n{\n    if (newState == QProcess::Starting) {\n        m_suppressFinish = false;\n    }\n}\n\nvoid ProcessEx::slotError(QProcess::ProcessError error)\n{\n    switch (error) {\n\n    // Suppress only if the process has stopped\n    default:\n    case QProcess::UnknownError:\n        if (this->isRunning()) break;\n        // Fall through\n\n    // Always suppress\n    case QProcess::FailedToStart:\n    case QProcess::Crashed:\n        m_suppressFinish = true;\n        emit extFinish(true,-1,this->processErrorText(error));\n        break;\n\n    // Never suppress\n    case QProcess::Timedout:\n    case QProcess::WriteError:\n    case QProcess::ReadError:\n        break;\n    }\n}\n\nvoid ProcessEx::slotFinished(int code,QProcess::ExitStatus status)\n{\n    if (!m_suppressFinish) {\n        emit extFinish(false,code,this->exitStatusText(code,status));\n    }\n}\n\nvoid ProcessEx::slotReadOutput()\n{\n    emit extOutput(this->readAllStandardOutput(),false);\n}\n\nvoid ProcessEx::slotReadError()\n{\n    emit extOutput(this->readAllStandardError(),true);\n}\n\nProcess::Process(QObject *parent) : QProcess(parent)\n{\n\n}\n\nProcess::~Process()\n{\n    stop(1);\n}\n\nbool Process::isRunning() const\n{\n    return this->state() == QProcess::Running;\n}\n\nbool Process::isStop() const\n{\n    return this->state() == QProcess::NotRunning;\n}\n\nvoid Process::stop(int ms)\n{\n    if (isStop()) {\n        return;\n    }\n    terminate();\n    closeReadChannel(QProcess::StandardOutput);\n    closeReadChannel(QProcess::StandardError);\n    if (!waitForFinished(ms)) {\n        kill();\n    }\n}\n\nvoid Process::stopAndWait(int termMs, int finishMs)\n{\n    stop(termMs);\n    waitForFinished(finishMs);\n}\n\nvoid Process::startEx(const QString &cmd, const QStringList &args)\n{\n    this->startEx(cmd,args.join(\" \"));\n}\n\nvoid Process::startEx(const QString &cmd, const QString &args)\n{\n#ifdef Q_OS_WIN\n    this->setNativeArguments(args);\n    if (cmd.contains(' ')) {\n        this->start(\"\\\"\"+cmd+\"\\\"\");\n    } else {\n        this->start(cmd);\n    }\n#else\n    if (cmd.contains(' ')) {\n        this->start(\"\\\"\"+cmd+\"\\\" \"+args);\n    } else {\n        this->start(cmd+\" \"+args);\n    }\n#endif\n}\n\nbool Process::startDetachedExAndHide(const QString &cmd, const QStringList &args)\n{\n#ifdef Q_OS_WIN\n    return (intptr_t)ShellExecuteW(NULL, NULL, (LPCWSTR)cmd.toStdWString().data(), (LPCWSTR)args.join(\" \").toStdWString().data(), NULL, SW_HIDE) > 32;\n#else\n    return QProcess::startDetached(cmd, args);\n#endif\n}\n\nbool Process::startDetachedEx(const QString &cmd, const QStringList &args, const QString &workDir)\n{\n#ifdef Q_OS_WIN\n    return (intptr_t)ShellExecuteW(NULL, L\"open\", (LPCWSTR)cmd.toStdWString().data(), (LPCWSTR)args.join(\" \").toStdWString().data(), (LPCWSTR)workDir.toStdWString().data(), SW_SHOW) > 32;\n#else\n    return QProcess::startDetached(cmd, args, workDir);\n#endif\n}\n\nvoid Process::setUserData(int id, const QVariant &data)\n{\n    m_idVarMap.insert(id,data);\n}\n\nQVariant Process::userData(int id) const\n{\n    return m_idVarMap.value(id);\n}\n\n#ifdef Q_OS_WIN\nvoid SendProcessCtrlC(QProcess */*process*/)\n{\n\n}\n#else\nvoid SendProcessCtrlC(QProcess *process)\n{\n    if (process->pid() <= 0) {\n        return;\n    }\n    kill(process->pid(),SIGINT);\n}\n#endif\n\nLiteProcess::LiteProcess(LiteApi::IApplication *app, QObject *parent) :\n    QProcess(parent),\n    m_liteApp(app),\n    m_useCtrlC(false)\n{\n\n}\n\nvoid LiteProcess::setUseCtrlC(bool use)\n{\n    m_useCtrlC = use;\n}\n\nvoid LiteProcess::startEx(const QString &cmd, const QString &args)\n{\n#ifdef Q_OS_WIN\n    if (m_useCtrlC) {\n        QString stub = m_liteApp->applicationPath()+\"/liteide_ctrlc_stub.exe\";\n        QString stubArg = cmd+\" \"+args;\n        this->setNativeArguments(stubArg);\n        this->start(\"\\\"\"+stub+\"\\\"\");\n    } else {\n        this->setNativeArguments(args);\n        this->start(cmd);\n    }\n#else\n    this->start(cmd+\" \"+args);\n#endif\n}\n\n#ifdef Q_OS_WIN\nstatic BOOL sendMessage(UINT message, HWND hwnd, LPARAM lParam)\n{\n    DWORD dwProcessID;\n    GetWindowThreadProcessId(hwnd, &dwProcessID);\n    if ((DWORD)lParam == dwProcessID) {\n        SendNotifyMessage(hwnd, message, 0, 0);\n        return FALSE;\n    }\n    return TRUE;\n}\n\nBOOL CALLBACK sendShutDownMessageToAllWindowsOfProcess_enumWnd(HWND hwnd, LPARAM lParam)\n{\n    static UINT uiShutDownMessage = RegisterWindowMessage(L\"liteide_ctrlcstub_shutdown\");\n    return sendMessage(uiShutDownMessage, hwnd, lParam);\n}\n\nBOOL CALLBACK sendInterruptMessageToAllWindowsOfProcess_enumWnd(HWND hwnd, LPARAM lParam)\n{\n    static UINT uiInterruptMessage = RegisterWindowMessage(L\"liteide_ctrlcstub_interrupt\");\n    return sendMessage(uiInterruptMessage, hwnd, lParam);\n}\n#endif\n\nvoid LiteProcess::interrupt()\n{\n    if (m_useCtrlC) {\n        Q_PID processId = this->pid();\n#ifdef Q_OS_WIN\n        if (processId) {\n            EnumWindows(sendInterruptMessageToAllWindowsOfProcess_enumWnd, processId->dwProcessId);\n        }\n#else\n        if (processId > 0) {\n            ::kill(processId,SIGINT);\n        }\n#endif\n    }\n}\n\nvoid LiteProcess::terminate()\n{\n    if (m_useCtrlC) {\n        Q_PID processId = this->pid();\n#ifdef Q_OS_WIN\n        if (processId) {\n            EnumWindows(sendShutDownMessageToAllWindowsOfProcess_enumWnd, processId->dwProcessId);\n        }\n#else\n        if (processId > 0) {\n            ::kill(processId,SIGINT);\n        }\n#endif\n    } else {\n        QProcess::terminate();\n    }\n}\n\nbool LiteProcess::isStop() const\n{\n    return this->state() == QProcess::NotRunning;\n}\n"
  },
  {
    "path": "liteidex/src/utils/processex/processex.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: processex.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITEAPI_PROCESSEX_H\n#define LITEAPI_PROCESSEX_H\n\n#include <QProcess>\n#include <QVariant>\n#include \"liteapi/liteapi.h\"\n\nclass Process : public QProcess\n{\n    Q_OBJECT\npublic:\n    Process(QObject *parent);\n    virtual ~Process();\n    bool isRunning() const;\n    bool isStop() const;\n    void stop(int ms);\n    void stopAndWait(int termMs, int finishMs);\n    void startEx(const QString &cmd, const QStringList &args);\n    void startEx(const QString &cmd, const QString &args);\n    static bool startDetachedExAndHide(const QString& cmd, const QStringList &args);\n    static bool startDetachedEx(const QString &cmd, const QStringList &args, const QString &workDir);\npublic:\n    void setUserData(int id, const QVariant &data);\n    QVariant userData(int id) const;\nprotected:\n    QMap<int,QVariant> m_idVarMap;\n};\n\nclass ProcessEx : public Process\n{\n    Q_OBJECT\npublic:\n    ProcessEx(QObject *parent);\nsignals:\n    void extOutput(const QByteArray &data,bool bError);\n    void extFinish(bool error,int code, QString msg);\nprotected slots:\n    void slotStateChanged(QProcess::ProcessState);\n    void slotError(QProcess::ProcessError);\n    void slotFinished(int,QProcess::ExitStatus);\n    void slotReadOutput();\n    void slotReadError();\npublic:\n    static QString exitStatusText(int code,QProcess::ExitStatus status);\n    static QString processErrorText(QProcess::ProcessError code);\nprivate:\n    bool m_suppressFinish;\n};\n\nvoid SendProcessCtrlC(QProcess *);\n\nclass LiteProcess : public QProcess\n{\npublic:\n    LiteProcess(LiteApi::IApplication *app, QObject *parent);\n    void setUseCtrlC(bool use);\n    void startEx(const QString &cmd, const QString &args);\n    void interrupt();\n    void terminate();\n    bool isStop() const;\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    bool m_useCtrlC;\n};\n\n#endif // LITEAPI_PROCESSEX_H\n"
  },
  {
    "path": "liteidex/src/utils/processex/processex.pri",
    "content": "LIBS *= -l$$qtLibraryName(processex)\nwin32 {\n    LIBS += -luser32 -lshell32\n}\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/processex/processex.pro",
    "content": "TARGET = processex\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude(../../liteideutils.pri)\n\nHEADERS += processex.h \n\nSOURCES += processex.cpp\n"
  },
  {
    "path": "liteidex/src/utils/symboltreeview/symboltreeview.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: symboltreeview.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"symboltreeview.h\"\n#include <QHeaderView>\n#include <QFocusEvent>\n#include <QScrollBar>\n#include <QAbstractItemModel>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n\nstatic QStringList stringListFromIndex(const QModelIndex &index)\n{\n    QStringList list;\n    if (!index.isValid())\n        return list;\n    list.append(stringListFromIndex(index.parent()));\n    list.append(index.data().toString());\n    return list;\n}\n\nstatic QModelIndex indexFromStringList(QAbstractItemModel *model, QStringList &list, const QModelIndex & parent = QModelIndex())\n{\n    if (list.isEmpty())\n        return QModelIndex();\n    QString text = list.front();\n    for (int i = 0; i < model->rowCount(parent); i++) {\n        QModelIndex child = model->index(i,0,parent);\n        if (child.data().toString() == text) {\n            list.pop_front();\n            if (list.isEmpty()) {\n                return child;\n            } else {\n                QModelIndex next = indexFromStringList(model,list,child);\n                if (next.isValid())\n                    return next;\n                else\n                    return child;\n            }\n        }\n    }\n    return QModelIndex();\n}\n\nSymbolTreeView::SymbolTreeView(QWidget *parent)\n    : QTreeView(parent)\n{\n    init(true);\n}\n\n\nSymbolTreeView::SymbolTreeView(bool bResizeToContents, QWidget *parent)\n    : QTreeView(parent)\n{\n    init(bResizeToContents);\n}\n\nvoid SymbolTreeView::init(bool bResizeToContents)\n{\n    m_bClickedItem = false;\n    m_hsbPos = 0;\n    setEditTriggers(QAbstractItemView::NoEditTriggers);\n   // setFrameStyle(QFrame::NoFrame);\n    setIndentation(indentation() * 9/10);\n    {\n        this->setHeaderHidden(true);\n        if (bResizeToContents) {\n#if QT_VERSION >= 0x050000\n            this->header()->setSectionResizeMode(QHeaderView::ResizeToContents);\n#else\n            this->header()->setResizeMode(QHeaderView::ResizeToContents);\n#endif\n            this->header()->setStretchLastSection(false);\n        }\n        this->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);\n    }\n    setContextMenuPolicy(Qt::CustomContextMenu);\n    setUniformRowHeights(true);\n    setTextElideMode(Qt::ElideNone);\n//        setExpandsOnDoubleClick(false);\n    setAttribute(Qt::WA_MacShowFocusRect, false);\n    connect(this,SIGNAL(clicked(QModelIndex)),this,SLOT(clickedItem(QModelIndex)));\n    connect(this->horizontalScrollBar(),SIGNAL(valueChanged(int)),this,SLOT(hsbValueChanged(int)));\n}\n\nvoid SymbolTreeView::focusInEvent(QFocusEvent *event)\n{\n    if (event->reason() != Qt::PopupFocusReason)\n        QTreeView::focusInEvent(event);\n}\n\nvoid SymbolTreeView::focusOutEvent(QFocusEvent *event)\n{\n    if (event->reason() != Qt::PopupFocusReason)\n        QTreeView::focusOutEvent(event);\n}\n\nQModelIndex SymbolTreeView::topViewIndex()\n{\n    return indexAt(QPoint(1,1));\n}\n\nvoid SymbolTreeView::reset()\n{\n    QTreeView::reset();\n    //setRootIndex(model()->index(0,0));\n    //this->setRootIndex(QModelIndex());\n}\n\nvoid SymbolTreeView::getTreeExpands(const QModelIndex &parent, QList<QModelIndex> &list) const\n{\n    for (int i = 0; i < this->model()->rowCount(parent); i++) {\n        QModelIndex index = this->model()->index(i,0,parent);\n        if (this->isExpanded(index)) {\n            list.append(index);\n            getTreeExpands(index,list);\n        }\n    }\n}\n\nvoid SymbolTreeView::clickedItem(QModelIndex)\n{\n    this->m_bClickedItem = true;\n    this->m_hsbPos = this->horizontalScrollBar()->sliderPosition();\n}\n\nvoid SymbolTreeView::hsbValueChanged(int)\n{\n    if (this->m_bClickedItem) {\n        this->m_bClickedItem = false;\n        this->horizontalScrollBar()->setValue(this->m_hsbPos);\n    }\n}\n\nQList<QModelIndex> SymbolTreeView::expandIndexs() const\n{\n    QList<QModelIndex> expands;\n    getTreeExpands(QModelIndex(),expands);\n    return expands;\n}\n\nvoid SymbolTreeView::currentChanged(const QModelIndex &current, const QModelIndex &previous)\n{\n    QTreeView::currentChanged(current,previous);\n    emit currentIndexChanged(current, previous);\n}\n\nvoid SymbolTreeView::saveState(SymbolTreeState *state)\n{\n    if (!state) {\n        return;\n    }\n    state->expands.clear();\n\n    foreach (QModelIndex index, this->expandIndexs()) {\n        state->expands.append(stringListFromIndex(index));\n    }\n\n    state->cur = stringListFromIndex(this->currentIndex());\n    state->vbar = verticalScrollBar()->value();\n    state->hbar = horizontalScrollBar()->value();\n}\n\nvoid SymbolTreeView::loadState(QAbstractItemModel *model,SymbolTreeState *state)\n{\n    //load state\n    //this->expandToDepth(0)\n    QListIterator<QStringList> ie(state->expands);\n    while (ie.hasNext()) {\n        QStringList expandPath = ie.next();\n        QModelIndex expandIndex = indexFromStringList(model,expandPath);\n        if (expandIndex.isValid()) {\n            this->setExpanded(expandIndex,true);\n        }\n    }\n\n    QModelIndex curIndex = indexFromStringList(model,state->cur);\n    if (curIndex.isValid()) {\n        this->setCurrentIndex(curIndex);\n    }\n    if (state->vbar != -1) {\n        verticalScrollBar()->setValue(state->vbar);\n    }\n    if (state->hbar != -1) {\n        horizontalScrollBar()->setValue(state->hbar);\n    }\n}\n\nvoid SymbolTreeView::keyPressEvent(QKeyEvent *event)\n{\n    // Note: This always eats the event\n    // whereas QAbstractItemView never eats it\n    if ((event->key() == Qt::Key_Return\n            || event->key() == Qt::Key_Enter)\n            && event->modifiers() == 0\n            && QTreeView::currentIndex().isValid()\n            && QTreeView::state() != QAbstractItemView::EditingState) {\n        emit QTreeView::activated(QTreeView::currentIndex());\n        emit enterKeyPressed(QTreeView::currentIndex());\n        return;\n    }\n    QTreeView::keyPressEvent(event);\n}\n"
  },
  {
    "path": "liteidex/src/utils/symboltreeview/symboltreeview.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: symboltreeview.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef SYMBOLTREEVIEW_H\n#define SYMBOLTREEVIEW_H\n\n#include <QTreeView>\n\nstruct SymbolTreeState\n{\n    SymbolTreeState() : vbar(-1),hbar(-1)\n    {\n    }\n    QList<QStringList> expands;\n    QStringList cur;\n    int         vbar;\n    int         hbar;\n};\n\nclass SymbolTreeView : public QTreeView\n{\n    Q_OBJECT\npublic:\n    SymbolTreeView(QWidget *parent = 0);\n    SymbolTreeView(bool bResizeToContents, QWidget *parent = 0);\nprotected:\n    void init(bool bResizeToContents);\npublic:\n    QModelIndex topViewIndex();\n    QList<QModelIndex> expandIndexs() const;\n    virtual void reset();\n    void saveState(SymbolTreeState *state);\n    void loadState(QAbstractItemModel *model,SymbolTreeState *state);\nsignals:\n    void currentIndexChanged(const QModelIndex &current, const QModelIndex &previous);\n    void enterKeyPressed(QModelIndex);\nprotected:\n    void focusInEvent(QFocusEvent *event);\n    void focusOutEvent(QFocusEvent *event);\n    void keyPressEvent(QKeyEvent *event);\n    void currentChanged(const QModelIndex &current, const QModelIndex &previous);\n    void getTreeExpands(const QModelIndex &parent, QList<QModelIndex> &list) const;\nprotected slots:\n    void clickedItem(QModelIndex);\n    void hsbValueChanged(int);\nprotected:\n    bool m_bClickedItem;\n    int  m_hsbPos;\n};\n\n#endif //SYMBOLTREEVIEW_H\n"
  },
  {
    "path": "liteidex/src/utils/symboltreeview/symboltreeview.pri",
    "content": "LIBS *= -l$$qtLibraryName(symboltreeview)\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/symboltreeview/symboltreeview.pro",
    "content": "TARGET = symboltreeview\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude(../../liteideutils.pri)\n\nHEADERS += symboltreeview.h\n\nSOURCES += symboltreeview.cpp\n"
  },
  {
    "path": "liteidex/src/utils/tabwidget/litetabwidget.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litetabwidget.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"litetabwidget.h\"\n#include \"liteapi/liteapi.h\"\n#include <QTabBar>\n#include <QHBoxLayout>\n#include <QVBoxLayout>\n#include <QStackedLayout>\n#include <QStackedWidget>\n#include <QToolButton>\n#include <QPushButton>\n#include <QToolBar>\n#include <QAction>\n#include <QActionGroup>\n#include <QMenu>\n#include <QKeyEvent>\n#include <QDebug>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nLiteTabWidget::LiteTabWidget(QSize iconSize, QObject *parent) :\n    QObject(parent)\n{\n    m_tabBar = new TabBar;\n    m_tabBar->setExpanding(false);\n    m_tabBar->setDocumentMode(true);\n    m_tabBar->setDrawBase(false);\n    m_tabBar->setUsesScrollButtons(true);\n    m_tabBar->setMovable(true);\n    m_tabBar->setSelectionBehaviorOnRemove(QTabBar::SelectPreviousTab);\n\n    m_tabBarWidget = new QWidget;\n\n    m_addTabAct = new QAction(QIcon(\"icon:images/addpage.png\"),tr(\"Open a new tab\"),this);\n\n    m_listButton = new QToolButton;\n    m_listButton->setToolTip(tr(\"List All Tabs\"));\n    m_listButton->setIcon(QIcon(\"icon:images/listpage.png\"));\n    m_listButton->setPopupMode(QToolButton::InstantPopup);\n    m_listButton->setStyleSheet(\n                \"QToolButton::menu-indicator{image:none;}\");\n\n    m_closeTabAct = new QAction(QIcon(\"icon:images/closepage.png\"),tr(\"Close Tab\"),this);\n//    m_closeButton = new QToolButton;\n//    m_closeButton->setDefaultAction(m_closeTabAct);\n\n    QHBoxLayout *layout = new QHBoxLayout;\n    layout->setMargin(0);\n    layout->setSpacing(0);\n\n    m_tabBar->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);\n    m_tabToolBar = new QToolBar;\n    m_tabToolBar->setObjectName(\"toolbar.tabs\");\n    m_tabToolBar->setIconSize(iconSize);\n    m_tabToolBar->addWidget(m_tabBar);\n    //QWidget *dump = new QWidget;\n    //dump->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);\n    //       m_tabToolBar->addWidget(dump);\n    m_tabToolBar->addWidget(m_listButton);\n    m_tabToolBar->addAction(m_closeTabAct);\n    layout->addWidget(m_tabToolBar);\n\n    m_tabBarWidget->setLayout(layout);\n\n    m_stackedWidget = new QStackedWidget;\n\n    connect(m_tabBar,SIGNAL(currentChanged(int)),this,SLOT(tabCurrentChanged(int)));\n    connect(m_tabBar,SIGNAL(tabCloseRequested(int)),this,SIGNAL(tabCloseRequested(int)));\n    connect(m_tabBar,SIGNAL(tabMoved(int,int)),this,SLOT(tabMoved(int,int)));\n    connect(m_closeTabAct,SIGNAL(triggered()),this,SLOT(closeCurrentTab()));\n    connect(m_addTabAct,SIGNAL(triggered()),this,SIGNAL(tabAddRequest()));\n\n    m_listButton->setEnabled(false);\n}\n\nLiteTabWidget::~LiteTabWidget()\n{\n    delete m_tabBarWidget;\n}\n\nvoid LiteTabWidget::closeCurrentTab()\n{\n    int index = m_tabBar->currentIndex();\n    if (index < 0) {\n        return;\n    }\n    emit tabCloseRequested(index);\n}\n\nint LiteTabWidget::addTab(QWidget *w,const QString & label, const QString &tip)\n{\n    return addTab(w,QIcon(),label,tip);\n}\n\nint LiteTabWidget::addTab(QWidget *w,const QIcon & icon, const QString & label, const QString &tip)\n{\n    if (!w) {\n        return -1;\n    }\n\n    if (m_widgetList.size() == 0) {\n        m_listButton->setEnabled(true);\n    }\n\n    int index = m_tabBar->addTab(icon,label);\n    if (!tip.isEmpty()) {\n        m_tabBar->setTabToolTip(index,tip);\n    }\n    m_stackedWidget->addWidget(w);\n    m_widgetList.append(w);\n\n    return index;\n}\n\nvoid LiteTabWidget::removeTab(int index)\n{\n    if (index < 0)\n        return;\n    QWidget *w = widget(index);\n    if (w) {\n        m_stackedWidget->removeWidget(w);\n        m_widgetList.removeAt(index);\n    }\n\n    if (m_widgetList.size() == 0) {\n        m_listButton->setEnabled(false);\n    }\n\n    m_tabBar->removeTab(index);\n}\n\nQWidget *LiteTabWidget::currentWidget()\n{\n    return m_stackedWidget->currentWidget();\n}\n\nTabBar *LiteTabWidget::tabBar()\n{\n    return m_tabBar;\n}\n\nint LiteTabWidget::count() const\n{\n    return m_tabBar->count();\n}\n\nint LiteTabWidget::currentIndex() const\n{\n    return m_tabBar->currentIndex();\n}\n\nQList<QWidget*> LiteTabWidget::widgetList() const\n{\n    return m_widgetList;\n}\n\nQWidget *LiteTabWidget::stackedWidget()\n{\n    return m_stackedWidget;\n}\n\nQWidget *LiteTabWidget::tabBarWidget()\n{\n    return m_tabBarWidget;\n}\n\nvoid LiteTabWidget::setListMenu(QMenu *menu)\n{\n    m_listButton->setMenu(menu);\n}\n\nvoid LiteTabWidget::setTabText(int index, const QString & text)\n{\n    m_tabBar->setTabText(index,text);\n}\n\nQString LiteTabWidget::tabText(int index) const\n{\n    return m_tabBar->tabText(index);\n}\n\nvoid LiteTabWidget::setTabToolTip(int index, const QString &tip)\n{\n    m_tabBar->setTabToolTip(index,tip);\n}\n\nvoid LiteTabWidget::setTabData(int index, const QVariant &data)\n{\n    m_tabBar->setTabData(index,data);\n}\n\nQVariant LiteTabWidget::tabData(int index) const\n{\n    return m_tabBar->tabData(index);\n}\n\nint LiteTabWidget::indexOf(QWidget *w)\n{\n    return m_widgetList.indexOf(w);\n}\n\nQWidget *LiteTabWidget::widget(int index)\n{\n    return m_widgetList.value(index);\n}\n\nvoid LiteTabWidget::setCurrentWidget(QWidget *w)\n{\n    int index = indexOf(w);\n    if (index < 0)\n        return;\n    setCurrentIndex(index);\n}\n\nvoid LiteTabWidget::tabCurrentChanged(int index)\n{\n    QWidget *w = m_widgetList.value(index);\n    if (w) {\n        m_stackedWidget->setCurrentWidget(w);\n    }\n\n    emit currentChanged(index);\n}\n\nvoid LiteTabWidget::setCurrentIndex(int index)\n{    \n    m_tabBar->setCurrentIndex(index);\n}\n\nvoid LiteTabWidget::tabMoved(int from, int to)\n{\n    m_widgetList.swap(from,to);\n}\n"
  },
  {
    "path": "liteidex/src/utils/tabwidget/litetabwidget.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: litetabwidget.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef LITETABWIDGET_H\n#define LITETABWIDGET_H\n\n#include <QWidget>\n#include <QMap>\n#include <QPointer>\n#include <QTabBar>\n\nclass QMenu;\nclass QTabBar;\nclass QHBoxLayout;\nclass QStackedLayout;\nclass QStackedWidget;\nclass QToolButton;\nclass QToolBar;\nclass QAction;\nclass QActionGroup;\n\n//header : headerWidget\n//body: stackedWidget\n\nclass TabBar : public QTabBar\n{\n    Q_OBJECT\npublic:\n    TabBar(QWidget *parent = 0) : QTabBar(parent)\n    {\n        m_enableWheel = true;\n    }\n    void wheelEvent(QWheelEvent *event)\n    {\n        if (!m_enableWheel) {\n            return;\n        }\n        QTabBar::wheelEvent(event);\n    }\n    void setEnableWheel(bool b) {\n        m_enableWheel = b;\n    }\n    bool enableWheel() const {\n        return m_enableWheel;\n    }\nprotected:\n    bool m_enableWheel;\n};\n\nclass LiteTabWidget : public QObject\n{\n    Q_OBJECT\npublic:\n    explicit LiteTabWidget(QSize iconSize, QObject *parent = 0);\n    virtual ~LiteTabWidget();\n    int addTab(QWidget *w,const QString & label, const QString &tip = QString());\n    int addTab(QWidget *w,const QIcon & icon, const QString & label,const QString &tip);\n    void removeTab(int index);\n    int indexOf(QWidget *w);\n    QWidget *widget(int index);\n    QWidget *currentWidget();\n    TabBar *tabBar();\n    int count() const;\n    int currentIndex() const;\n    void setTabText(int index, const QString & text);\n    QString tabText(int index) const;\n    void setTabToolTip(int index, const QString &tip);\n    void setTabData(int index, const QVariant &data);\n    QVariant tabData(int index) const;\n    QList<QWidget*> widgetList() const;\n    QWidget *stackedWidget();\n    QWidget *tabBarWidget();\n    void setListMenu(QMenu *menu);\nsignals:\n    void currentChanged(int index);\n    void tabCloseRequested(int index);\n    void tabAddRequest();\npublic slots:\n    void setCurrentWidget(QWidget *w);\n    void setCurrentIndex(int index);\n    void tabMoved(int,int);\npublic slots:\n    void closeCurrentTab();\n    void tabCurrentChanged(int);\nprotected:\n    QToolBar        *m_tabToolBar;\n    QWidget         *m_tabBarWidget;\n    TabBar         *m_tabBar;\n    QToolButton     *m_listButton;\n    QToolButton     *m_closeButton;\n    QStackedWidget  *m_stackedWidget;\n    QList<QWidget*>  m_widgetList;\n    QAction         *m_closeTabAct;\n    QAction         *m_addTabAct;\n    QPointer<QWidget>  m_currentWidget;\n};\n\n#endif // LITETABWIDGET_H\n"
  },
  {
    "path": "liteidex/src/utils/tabwidget/tabwidget.pri",
    "content": "LIBS *= -l$$qtLibraryName(tabwidget)\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/tabwidget/tabwidget.pro",
    "content": "TARGET = tabwidget\nTEMPLATE = lib\nCONFIG += staticlib\n\ninclude (../../liteideutils.pri)\n\nSOURCES += litetabwidget.cpp\n\nHEADERS += litetabwidget.h\n"
  },
  {
    "path": "liteidex/src/utils/textoutput/terminaledit.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: terminaledit.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"terminaledit.h\"\r\n\r\n#include <QTextCursor>\r\n#include <QLineEdit>\r\n#include <QKeyEvent>\r\n#include <QMouseEvent>\r\n#include <QTextBlock>\r\n#include <QTextCharFormat>\r\n#include <QMenu>\r\n#include <QAction>\r\n#include <QClipboard>\r\n#include <QApplication>\r\n#include <QMimeData>\r\n#include <QDebug>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nTerminalEdit::TerminalEdit(QWidget *parent) :\r\n    QPlainTextEdit(parent)\r\n{\r\n    this->setCursorWidth(4);\r\n    this->setAcceptDrops(false);\r\n    //this->setWordWrapMode(QTextOption::NoWrap);\r\n\r\n    m_contextMenu = new QMenu(this);\r\n    m_contextRoMenu = new QMenu(this);\r\n\r\n    m_bAutoPosCursor = true;\r\n    m_bFilterTermColor = false;\r\n    m_bTerminalInput = false;\r\n    m_lastInputPostion = 0;\r\n    m_lastPosition = 0;\r\n    m_lastKey = -1;\r\n\r\n    this->setContextMenuPolicy(Qt::CustomContextMenu);\r\n\r\n    m_cut = new QAction(tr(\"Cut\"),this);\r\n    m_cut->setShortcut(QKeySequence::Cut);\r\n    m_cut->setShortcutContext(Qt::WidgetShortcut);\r\n\r\n    m_copy = new QAction(tr(\"Copy\"),this);\r\n    m_copy->setShortcut(QKeySequence::Copy);\r\n    m_copy->setShortcutContext(Qt::WidgetShortcut);\r\n\r\n    m_paste = new QAction(tr(\"Paste\"),this);\r\n    m_paste->setShortcut(QKeySequence::Paste);\r\n    m_paste->setShortcutContext(Qt::WidgetShortcut);\r\n\r\n    m_selectAll = new QAction(tr(\"Select All\"),this);\r\n    m_selectAll->setShortcut(QKeySequence::SelectAll);\r\n    m_selectAll->setShortcutContext(Qt::WidgetShortcut);\r\n\r\n    m_clear = new QAction(tr(\"Clear All\"),this);\r\n\r\n    m_contextMenu->addAction(m_cut);\r\n    m_contextMenu->addAction(m_copy);\r\n    m_contextMenu->addAction(m_paste);\r\n    m_contextMenu->addSeparator();\r\n    m_contextMenu->addAction(m_selectAll);\r\n    m_contextMenu->addSeparator();\r\n    m_contextMenu->addAction(m_clear);\r\n\r\n    m_contextRoMenu->addAction(m_copy);\r\n    m_contextRoMenu->addSeparator();\r\n    m_contextRoMenu->addAction(m_selectAll);\r\n    m_contextRoMenu->addSeparator();\r\n    m_contextRoMenu->addAction(m_clear);\r\n\r\n    connect(this,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(contextMenuRequested(QPoint)));\r\n    connect(this,SIGNAL(cursorPositionChanged()),this,SLOT(cursorPositionChanged()));\r\n    connect(this,SIGNAL(selectionChanged()),this,SLOT(cursorPositionChanged()));\r\n    connect(m_cut,SIGNAL(triggered()),this,SLOT(cut()));\r\n    connect(m_copy,SIGNAL(triggered()),this,SLOT(copy()));\r\n    connect(m_paste,SIGNAL(triggered()),this,SLOT(paste()));\r\n    connect(m_selectAll,SIGNAL(triggered()),this,SLOT(selectAll()));\r\n    connect(m_clear,SIGNAL(triggered()),this,SLOT(clear()));\r\n}\r\n\r\nvoid TerminalEdit::setFilterTermColor(bool filter)\r\n{\r\n    m_bFilterTermColor = filter;\r\n}\r\n\r\nvoid TerminalEdit::setTerminalInput(bool term)\r\n{\r\n    m_bTerminalInput = term;\r\n}\r\n\r\nvoid TerminalEdit::append(const QString &text, QTextCharFormat *fmt)\r\n{\r\n    QString str = text;\r\n    if (m_bFilterTermColor) {\r\n        static QRegExp rx(\"\\033\\\\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]\");\r\n        str.remove(rx);\r\n    }\r\n    if (str.isEmpty()) {\r\n        return;\r\n    }\r\n    setUndoRedoEnabled(false);\r\n    QTextCursor cur = this->textCursor();\r\n    cur.movePosition(QTextCursor::End);\r\n\r\n    if (m_bTerminalInput && m_lastKey != -1) {\r\n        cur.setPosition(m_lastInputPostion,QTextCursor::KeepAnchor);\r\n    }\r\n    if (fmt) {\r\n        cur.setCharFormat(*fmt);\r\n    }\r\n    cur.insertText(str);\r\n    this->setTextCursor(cur);\r\n    setUndoRedoEnabled(true);\r\n    m_lastPosition = this->textCursor().position();\r\n    if (str.contains(\"\\n\") || m_lastKey == -1) {\r\n        m_lastInputPostion = m_lastPosition;\r\n    }\r\n    m_lastKey = -1;\r\n}\r\n\r\nvoid TerminalEdit::clear()\r\n{\r\n    m_lastPosition = 0;\r\n    m_lastInputPostion = 0;\r\n    m_lastKey = -1;\r\n    QPlainTextEdit::clear();\r\n}\r\n\r\nvoid TerminalEdit::keyPressEvent(QKeyEvent *ke)\r\n{\r\n    QTextCursor cur = this->textCursor();\r\n    int pos = cur.position();\r\n    int end = cur.position();\r\n\r\n    if (cur.hasSelection()) {\r\n        pos = cur.selectionStart();\r\n        end = cur.selectionEnd();\r\n    }\r\n\r\n    bool bReadOnly = pos < m_lastInputPostion;\r\n\r\n    if (bReadOnly && ( ke == QKeySequence::Paste || ke == QKeySequence::Cut ||\r\n                       ke == QKeySequence::DeleteEndOfWord ||\r\n                       ke == QKeySequence::DeleteStartOfWord)) {\r\n        return;\r\n    }\r\n\r\n    if (ke == QKeySequence::DeleteStartOfWord) {\r\n        if (!cur.hasSelection()) {\r\n            cur.movePosition(QTextCursor::PreviousWord, QTextCursor::KeepAnchor);\r\n            if (cur.selectionStart() < m_lastPosition) {\r\n                cur.movePosition(QTextCursor::Right,QTextCursor::KeepAnchor,m_lastPosition-cur.selectionStart());\r\n            }\r\n        }\r\n        cur.removeSelectedText();\r\n        return;\r\n    }\r\n    m_lastKey = ke->key();\r\n    if (ke->modifiers() == Qt::NoModifier\r\n            || ke->modifiers() == Qt::ShiftModifier\r\n            || ke->modifiers() == Qt::KeypadModifier) {\r\n        if (ke->key() < Qt::Key_Escape) {\r\n            if (bReadOnly) {\r\n                return;\r\n            }\r\n        } else {\r\n            if (ke->key() == Qt::Key_Backspace) {\r\n                if (cur.hasSelection()) {\r\n                    if (bReadOnly) {\r\n                        return;\r\n                    }\r\n                } else if (pos <= m_lastInputPostion) {\r\n                    return;\r\n                }\r\n            } else if (bReadOnly && (\r\n                           ke->key() == Qt::Key_Delete ||\r\n                           ke->key() == Qt::Key_Tab ||\r\n                           ke->key() == Qt::Key_Backtab ||\r\n                           ke->key() == Qt::Key_Return ||\r\n                           ke->key() == Qt::Key_Enter)) {\r\n                return;\r\n            }\r\n            if (ke->key() == Qt::Key_Return ||\r\n                    ke->key() == Qt::Key_Enter) {\r\n                cur.setPosition(end,QTextCursor::MoveAnchor);\r\n                cur.setPosition(m_lastPosition,QTextCursor::KeepAnchor);\r\n#ifdef Q_OS_WIN\r\n                emit enterText(cur.selectedText()+\"\\r\\n\");\r\n#else\r\n                emit enterText(cur.selectedText()+\"\\n\");\r\n#endif\r\n                QPlainTextEdit::keyPressEvent(ke);\r\n                QTextCursor cur = this->textCursor();\r\n                cur.movePosition(QTextCursor::End);\r\n                return;\r\n            } else if (ke->key() == Qt::Key_Tab){\r\n                cur.setPosition(end,QTextCursor::MoveAnchor);\r\n                cur.setPosition(m_lastPosition,QTextCursor::KeepAnchor);\r\n                emit tabText(cur.selectedText()+\"\\t\");\r\n                return;\r\n            } else if (ke->key() == Qt::Key_Up || ke->key() == Qt::Key_Down) {\r\n                emit keyUpdown(ke->key());\r\n                return;\r\n            }\r\n        }\r\n    }\r\n    QPlainTextEdit::keyPressEvent(ke);\r\n}\r\n\r\nvoid TerminalEdit::mouseDoubleClickEvent(QMouseEvent *e)\r\n{\r\n    QPlainTextEdit::mouseDoubleClickEvent(e);\r\n    QTextCursor cur = cursorForPosition(e->pos());\r\n    emit dbclickEvent(cur);\r\n}\r\n\r\nvoid TerminalEdit::mousePressEvent(QMouseEvent *e)\r\n{\r\n    QPlainTextEdit::mousePressEvent(e);\r\n    if (!m_bAutoPosCursor) {\r\n        return;\r\n    }\r\n    if (!this->isReadOnly() && m_bFocusOut) {\r\n        m_bFocusOut = false;\r\n        QTextCursor cur = this->textCursor();\r\n        if (!cur.hasSelection()) {\r\n            cur.movePosition(QTextCursor::End);\r\n            this->setTextCursor(cur);\r\n        }\r\n    }\r\n}\r\n\r\nvoid TerminalEdit::focusOutEvent(QFocusEvent *e)\r\n{\r\n    QPlainTextEdit::focusOutEvent(e);\r\n    m_bFocusOut = true;\r\n}\r\n\r\nvoid TerminalEdit::focusInEvent(QFocusEvent *e)\r\n{\r\n    QPlainTextEdit::focusInEvent(e);\r\n    if (!this->isReadOnly()) {\r\n        QTextCursor cur = this->textCursor();\r\n        if (!cur.hasSelection()) {\r\n            cur.movePosition(QTextCursor::End);\r\n            this->setTextCursor(cur);\r\n        }\r\n    }\r\n}\r\n\r\nvoid TerminalEdit::contextMenuRequested(const QPoint &pt)\r\n{\r\n    QPoint globalPos = this->mapToGlobal(pt);\r\n    if (isReadOnly()) {\r\n        m_contextRoMenu->popup(globalPos);\r\n    } else {\r\n        m_contextMenu->popup(globalPos);\r\n    }\r\n}\r\n\r\nvoid TerminalEdit::cursorPositionChanged()\r\n{\r\n    QTextCursor cur = this->textCursor();\r\n    int pos = cur.position();\r\n    if (cur.hasSelection()) {\r\n        pos = cur.selectionStart();\r\n        m_copy->setEnabled(true);\r\n        if (pos < m_lastPosition) {\r\n            m_cut->setEnabled(false);\r\n        } else {\r\n            m_cut->setEnabled(!this->isReadOnly());\r\n        }\r\n    } else {\r\n        m_copy->setEnabled(false);\r\n        m_cut->setEnabled(false);\r\n    }\r\n    if (pos < m_lastPosition) {\r\n        m_paste->setEnabled(false);\r\n    } else {\r\n        QClipboard *clipboard = QApplication::clipboard();\r\n        if (clipboard->mimeData()->hasText() ||\r\n                clipboard->mimeData()->hasHtml()){\r\n            m_paste->setEnabled(true);\r\n        } else {\r\n            m_paste->setEnabled(false);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "liteidex/src/utils/textoutput/terminaledit.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: terminaledit.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef TERMINALEDIT_H\r\n#define TERMINALEDIT_H\r\n\r\n#include <QPlainTextEdit>\r\n\r\nclass TerminalEdit : public QPlainTextEdit\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    explicit TerminalEdit(QWidget *parent = 0);\r\n    void setFilterTermColor(bool filter);\r\n    void setTerminalInput(bool term);\r\nsignals:\r\n    void enterText(const QString &text);\r\n    void tabText(const QString &text);\r\n    void keyUpdown(int key);\r\n    void dbclickEvent(const QTextCursor &cur);\r\npublic slots:\r\n    void append(const QString &text, QTextCharFormat *fmt = 0);\r\n    void clear();\r\n    void contextMenuRequested(const QPoint &pt);\r\n    void cursorPositionChanged();\r\npublic:\r\n    void setAutoPosCursor(bool b) {\r\n        m_bAutoPosCursor = b;\r\n    }\r\n    bool isAutoMoveToLast() const {\r\n        return m_bAutoPosCursor;\r\n    }\r\nprotected:\r\n    virtual void keyPressEvent(QKeyEvent *e);\r\n    virtual void mouseDoubleClickEvent(QMouseEvent *e);\r\n    virtual void mousePressEvent(QMouseEvent *e);\r\n    virtual void focusOutEvent(QFocusEvent *e);\r\n    virtual void focusInEvent(QFocusEvent *e);\r\n    int m_lastPosition;\r\n    int m_lastInputPostion;\r\n    int m_lastKey;\r\n    QMenu *m_contextMenu;\r\n    QMenu *m_contextRoMenu;\r\n    QAction *m_cut;\r\n    QAction *m_copy;\r\n    QAction *m_paste;\r\n    QAction *m_selectAll;\r\n    QAction *m_clear;\r\n    bool    m_bFocusOut;\r\n    bool    m_bAutoPosCursor;\r\n    bool    m_bFilterTermColor;\r\n    bool    m_bTerminalInput;\r\n};\r\n\r\n\r\n#endif // TERMINALEDIT_H\r\n"
  },
  {
    "path": "liteidex/src/utils/textoutput/textoutput.cpp",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: textoutput.cpp\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#include \"textoutput.h\"\r\n#include \"colorstyle/colorstyle.h\"\r\n#include \"../liteapp/liteapp_global.h\"\r\n#include <QTextCharFormat>\r\n#include <QMouseEvent>\r\n#include <QKeyEvent>\r\n#include <QTextCursor>\r\n#include <QTextBlock>\r\n#include <QElapsedTimer>\r\n#include <QTime>\r\n//lite_memory_check_begin\r\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\r\n     #define _CRTDBG_MAP_ALLOC\r\n     #include <stdlib.h>\r\n     #include <crtdbg.h>\r\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\r\n     #define new DEBUG_NEW\r\n#endif\r\n//lite_memory_check_end\r\n\r\nstatic void fadeText(QTextCursor& cur) {\r\n    QTextCharFormat f(cur.charFormat());\r\n    QColor color(f.foreground().color());\r\n    color.setAlpha(160);\r\n    f.setForeground(color);\r\n    cur.setCharFormat(f);\r\n}\r\n\r\nTextOutput::TextOutput(LiteApi::IApplication *app, bool readOnly, QWidget *parent) :\r\n    TerminalEdit(parent),\r\n    m_liteApp(app)\r\n{\r\n    this->setReadOnly(readOnly);\r\n\r\n    m_fmt = this->currentCharFormat();\r\n    m_defPalette = this->palette();\r\n    m_clrText = m_defPalette.foreground().color();\r\n    m_clrTag = Qt::darkBlue;\r\n    m_clrError = Qt::red;\r\n    m_existsTimer.start();\r\n\r\n    connect(m_liteApp->editorManager(),SIGNAL(colorStyleSchemeChanged()),this,SLOT(loadColorStyleScheme()));\r\n    connect(m_liteApp->optionManager(),SIGNAL(applyOption(QString)),this,SLOT(applyOption(QString)));\r\n\r\n    this->applyOption(OPTION_LITEOUTPUT);\r\n}\r\n\r\nvoid TextOutput::append(const QString &text)\r\n{\r\n    append(text, m_clrText);\r\n}\r\n\r\nvoid TextOutput::append(const QString &text,const QBrush &foreground)\r\n{\r\n    QTextCharFormat f = m_fmt;\r\n    f.setForeground(foreground);\r\n    appendAndReset(text, f);\r\n}\r\n\r\nvoid TextOutput::appendTag(const QString &text, bool error, bool time)\r\n{\r\n    QTextCharFormat f = m_fmt;\r\n    f.setFontWeight(QFont::Bold);\r\n    if (error) {\r\n        f.setForeground(m_clrError);\r\n    } else {\r\n        f.setForeground(m_clrTag);\r\n    }    \r\n    if (time) {\r\n        appendAndReset(QTime::currentTime().toString(\"hh:mm:ss: \")+text, f);\r\n    } else {\r\n        appendAndReset(text, f);\r\n    }\r\n}\r\n\r\nvoid TextOutput::appendAndReset(const QString &text, QTextCharFormat& f)\r\n{\r\n    TerminalEdit::append(text, &f);\r\n    m_existsTimer.restart();\r\n}\r\n\r\nvoid TextOutput::updateExistsTextColor(bool force)\r\n{\r\n    if (!m_existsTimer.hasExpired(2500) && !force) return;\r\n\r\n    QTextDocument* doc = document();\r\n    for (QTextBlock it = doc->begin(); it != doc->end(); it = it.next())\r\n    {\r\n        QTextCursor cur(it);\r\n        cur.select(QTextCursor::BlockUnderCursor);\r\n        fadeText(cur);\r\n    }\r\n}\r\n\r\nvoid TextOutput::setMaxLine(int max)\r\n{\r\n    this->setMaximumBlockCount(max);;\r\n}\r\n\r\nvoid TextOutput::setLineWrap(bool b)\r\n{\r\n    this->setLineWrapMode(b ? QPlainTextEdit::WidgetWidth : QPlainTextEdit::NoWrap);\r\n}\r\n\r\nbool TextOutput::isLineWrap() const\r\n{\r\n    return this->lineWrapMode() != QPlainTextEdit::NoWrap;\r\n}\r\n\r\nvoid TextOutput::loadColorStyleScheme()\r\n{\r\n    bool useColorShceme = m_liteApp->settings()->value(OUTPUT_USECOLORSCHEME,true).toBool();\r\n\r\n    const ColorStyleScheme *colorScheme = m_liteApp->editorManager()->colorStyleScheme();\r\n    const ColorStyle *text = colorScheme->findStyle(\"Text\");\r\n    const ColorStyle *selection = colorScheme->findStyle(\"Selection\");\r\n    const ColorStyle *keyword = colorScheme->findStyle(\"Keyword\");\r\n    const ColorStyle *error = colorScheme->findStyle(\"Error\");\r\n\r\n    QPalette p = this->m_defPalette;\r\n    if (useColorShceme && text) {\r\n        if (text->foregound().isValid()) {\r\n            p.setColor(QPalette::Text,text->foregound());\r\n            p.setColor(QPalette::Foreground, text->foregound());\r\n        }\r\n        if (text->background().isValid()) {\r\n            p.setColor(QPalette::Base, text->background());\r\n        }\r\n    }\r\n    if (useColorShceme && selection) {\r\n        if (selection->foregound().isValid()) {\r\n            p.setColor(QPalette::HighlightedText, selection->foregound());\r\n        }\r\n        if (selection->background().isValid()) {\r\n            p.setColor(QPalette::Highlight, selection->background());\r\n        }\r\n        p.setBrush(QPalette::Inactive, QPalette::Highlight, p.highlight());\r\n        p.setBrush(QPalette::Inactive, QPalette::HighlightedText, p.highlightedText());\r\n    }\r\n\r\n    QString sheet = QString(\"QPlainTextEdit{color:%1;background-color:%2;selection-color:%3;selection-background-color:%4;}\")\r\n                .arg(p.text().color().name())\r\n                .arg(p.base().color().name())\r\n                .arg(p.highlightedText().color().name())\r\n                .arg(p.highlight().color().name());\r\n    this->setPalette(p);\r\n    this->setStyleSheet(sheet);\r\n\r\n    m_clrText = p.text().color();\r\n\r\n    m_fmt.setForeground(p.text().color());\r\n    m_fmt.setBackground(p.base().color());\r\n\r\n    if (useColorShceme && keyword && keyword->foregound().isValid()) {\r\n        m_clrTag = keyword->foregound();\r\n    } else {\r\n        m_clrTag = Qt::darkBlue;\r\n    }\r\n    if (useColorShceme && error && error->foregound().isValid()) {\r\n        m_clrError = error->foregound();\r\n    } else {\r\n        m_clrError = Qt::red;\r\n    }\r\n\r\n    QTextCursor cur(document());\r\n    cur.select(QTextCursor::Document);\r\n    cur.setCharFormat(m_fmt);\r\n    fadeText(cur);\r\n}\r\n\r\nvoid TextOutput::applyOption(QString opt)\r\n{\r\n    if (opt != OPTION_LITEOUTPUT) {\r\n        return;\r\n    }\r\n    QString fontFamily = m_liteApp->settings()->value(OUTPUT_FAMILY).toString();\r\n    int fontSize = m_liteApp->settings()->value(OUTPUT_FONTSIZE,12).toInt();\r\n\r\n    int fontZoom = m_liteApp->settings()->value(OUTPUT_FONTZOOM,100).toInt();\r\n\r\n    bool antialias = m_liteApp->settings()->value(OUTPUT_ANTIALIAS,true).toBool();\r\n\r\n    int maxLines = m_liteApp->settings()->value(OUTPUT_MAXLINES,5000).toInt();\r\n\r\n    QFont font = this->font();\r\n    if (!fontFamily.isEmpty()) {\r\n        font.setFamily(fontFamily);\r\n    }\r\n\r\n    font.setPointSize(fontSize*fontZoom/100.0);\r\n    if (antialias) {\r\n        font.setStyleStrategy(QFont::PreferAntialias);\r\n    } else {\r\n        font.setStyleStrategy(QFont::NoAntialias);\r\n    }\r\n    this->setFont(font);\r\n\r\n    this->setMaxLine(maxLines);\r\n\r\n    this->loadColorStyleScheme();\r\n}\r\n"
  },
  {
    "path": "liteidex/src/utils/textoutput/textoutput.h",
    "content": "/**************************************************************************\r\n** This file is part of LiteIDE\r\n**\r\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\r\n**\r\n** This library is free software; you can redistribute it and/or\r\n** modify it under the terms of the GNU Lesser General Public\r\n** License as published by the Free Software Foundation; either\r\n** version 2.1 of the License, or (at your option) any later version.\r\n**\r\n** This library is distributed in the hope that it will be useful,\r\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n** Lesser General Public License for more details.\r\n**\r\n** In addition, as a special exception,  that plugins developed for LiteIDE,\r\n** are allowed to remain closed sourced and can be distributed under any license .\r\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n**************************************************************************/\r\n// Module: textoutput.h\r\n// Creator: visualfc <visualfc@gmail.com>\r\n\r\n#ifndef TEXTOUTPUT_H\r\n#define TEXTOUTPUT_H\r\n\r\n#include \"terminaledit.h\"\r\n#include \"liteapi/liteapi.h\"\r\n\r\n#include <QElapsedTimer>\r\n\r\nclass TextOutput : public TerminalEdit\r\n{\r\n    Q_OBJECT\r\npublic:\r\n    explicit TextOutput(LiteApi::IApplication *app, bool readOnly = true, QWidget *parent = 0);\r\n    void append(const QString &text);\r\n    void append(const QString &text,const QBrush &foreground);\r\n    void appendTag(const QString &text, bool error = false, bool time = false);\r\n    void updateExistsTextColor(bool force = false);\r\n    void setMaxLine(int max);\r\n    void setLineWrap(bool b);\r\n    bool isLineWrap() const;\r\npublic slots:\r\n    void loadColorStyleScheme();\r\n    void applyOption(QString);\r\nprotected:\r\n    void appendAndReset(const QString &text, QTextCharFormat& f);\r\n    LiteApi::IApplication *m_liteApp;\r\n    QPalette    m_defPalette;\r\n    QTextCharFormat m_fmt;\r\n    QColor m_clrTag;\r\n    QColor m_clrError;\r\n    QColor m_clrText;\r\n    QElapsedTimer m_existsTimer;\r\n};\r\n\r\n#endif // TEXTOUTPUT_H\r\n"
  },
  {
    "path": "liteidex/src/utils/textoutput/textoutput.pri",
    "content": "LIBS *= -l$$qtLibraryName(textoutput)\n\n\n\n"
  },
  {
    "path": "liteidex/src/utils/textoutput/textoutput.pro",
    "content": "TARGET = textoutput\nTEMPLATE = lib\n\nCONFIG += staticlib\n\ninclude (../../liteideutils.pri)\ninclude (../colorstyle/colorstyle.pri)\n\nHEADERS += textoutput.h \\\n    terminaledit.h\n\nSOURCES += textoutput.cpp \\\n    terminaledit.cpp\n"
  },
  {
    "path": "liteidex/src/utils/utils.pro",
    "content": "# USE .subdir AND .depends !\n# OTHERWISE PLUGINS WILL BUILD IN WRONG ORDER (DIRECTORIES ARE COMPILED IN PARALLEL)\n\nTEMPLATE  = subdirs\nCONFIG   += ordered\n\nSUBDIRS = \\\n    fileutil \\\n    mimetype \\\n    extension \\\n    textoutput \\\n    symboltreeview \\\n    modelproject \\\n    processex \\\n    colorstyle \\\n    documentbrowser \\\n    htmlutil \\\n    golangapi \\\n    filesystem \\\n    editorutil \\\n    folderview \\\n    iconutil \\\n    dlvclient \\\n    navigate \\\n    tabwidget \\\n    vterm\n"
  },
  {
    "path": "liteidex/src/utils/vterm/vterm.pri",
    "content": "LIBS *= -l$$qtLibraryName(vtermwidget)\nLIBS *= -l$$qtLibraryName(libvterm)\nLIBS *= -l$$qtLibraryName(ptyqt)\n\n"
  },
  {
    "path": "liteidex/src/utils/vterm/vterm.pro",
    "content": "TARGET = vtermwidget\nTEMPLATE = lib\nCONFIG += staticlib\n\nQT += xml\n\ninclude (../../liteideutils.pri)\ninclude (../../3rdparty/libvterm/libvterm.pri)\ninclude (../../3rdparty/ptyqt/ptyqt.pri)\n\nwin32 {\n    QT += network\n}\n\n\nHEADERS += \\\n    vtermcolor.h \\\n    vtermwidget.h \\\n    vtermwidgetbase.h\n\nSOURCES += \\\n    vtermwidget.cpp \\\n    vtermwidgetbase.cpp\n"
  },
  {
    "path": "liteidex/src/utils/vterm/vtermcolor.h",
    "content": "#ifndef VTERMCOLOR_H\n#define VTERMCOLOR_H\n\n#include <QString>\n#include <QStringList>\n\nenum TERM_COLOR {\n    TERM_COLOR_DEFAULT = -1,\n    TERM_COLOR_BLACK = 0,\n    TERM_COLOR_RED = 1,\n    TERM_COLOR_GREEN = 2,\n    TERM_COLOR_YELLOW = 3,\n    TERM_COLOR_BLUE = 4,\n    TERM_COLOR_PURPLE = 5,\n    TERM_COLOR_CYAN = 6,\n    TERM_COLOR_WHITE = 7,\n};\n\nenum TERM_ATTR {\n    TERM_ATTR_NORMAL = 0,\n    TERM_ATTR_BOLD = 0x00000001,\n    TERM_ATTR_NOBOLD = 0x00000002,\n    TERM_ATTR_ITALIC = 0x00000004,\n    TERM_ATTR_NOITALIC = 0x00000008,\n    TERM_ATTR_UNDERLINE = 0x00000010,\n    TERM_ATTR_NOUNDERLINE = 0x000020,\n    TERM_ATTR_BLINK = 0x00000040,\n    TERM_ATTR_NOBLINK = 0x00000080,\n    TERM_ATTR_REVERSE = 0x00000100,\n    TERM_ATTR_NOREVERSE = 0x00000200,\n    TERM_ATTR_HALF = 0x00000400,\n    TERM_ATTR_NOHALF = TERM_ATTR_NOBOLD,\n    TERM_ATTR_LIGHT = TERM_ATTR_BOLD,\n    TERM_ATTR_NOLIGHT = TERM_ATTR_NOBOLD,\n    TERM_ATTR_HIDE = 0x00000800,\n\n};\n\ninline QString term_color(const QString &text, TERM_COLOR fg = TERM_COLOR_DEFAULT,  TERM_COLOR bg = TERM_COLOR_DEFAULT, int attr = TERM_ATTR_NORMAL, bool endResetDefault = true)\n{\n    if (fg == TERM_COLOR_DEFAULT && bg == TERM_COLOR_DEFAULT && attr == TERM_ATTR_NORMAL) {\n        return text;\n    }\n    QStringList attrs;\n    if (fg != TERM_COLOR_DEFAULT) {\n        attrs << QString(\"3%1\").arg(fg);\n    }\n    if (bg != TERM_COLOR_DEFAULT) {\n        attrs << QString(\"4%1\").arg(bg);\n    }\n    if ((attr & TERM_ATTR_BOLD) == TERM_ATTR_BOLD) {\n        attrs << \"1\";\n    }\n    if ((attr & TERM_ATTR_HALF) == TERM_ATTR_HALF) {\n        attrs << \"2\";\n    }\n    if ((attr & TERM_ATTR_NOBOLD) == TERM_ATTR_NOBOLD) {\n        attrs << \"22\";\n    }\n    if ((attr & TERM_ATTR_ITALIC) == TERM_ATTR_ITALIC) {\n        attrs << \"3\";\n    }\n    if ((attr & TERM_ATTR_NOITALIC) == TERM_ATTR_NOITALIC) {\n        attrs << \"23\";\n    }\n    if ((attr & TERM_ATTR_UNDERLINE) == TERM_ATTR_UNDERLINE) {\n        attrs << \"4\";\n    }\n    if ((attr & TERM_ATTR_NOUNDERLINE) == TERM_ATTR_NOUNDERLINE) {\n        attrs << \"24\";\n    }\n    if ((attr & TERM_ATTR_BLINK) == TERM_ATTR_BLINK) {\n        attrs << \"5\";\n    }\n    if ((attr & TERM_ATTR_NOBLINK) == TERM_ATTR_NOBLINK) {\n        attrs << \"25\";\n    }\n    if ((attr & TERM_ATTR_REVERSE) == TERM_ATTR_REVERSE) {\n        attrs << \"7\";\n    }\n    if ((attr & TERM_ATTR_NOREVERSE) == TERM_ATTR_NOREVERSE) {\n        attrs << \"27\";\n    }\n    if (endResetDefault) {\n        return QString(\"\\033[%1m%2\\033[0m\").arg(attrs.join(\";\")).arg(text);\n    }\n    return  QString(\"\\033[%1m%2\").arg(attrs.join(\";\")).arg(text);\n}\n\ninline QString term_bold(const QString &text, int attr = TERM_ATTR_BOLD) {\n    return term_color(text,TERM_COLOR_DEFAULT,TERM_COLOR_DEFAULT,attr,true);\n}\n\n#endif // VTERMCOLOR_H\n"
  },
  {
    "path": "liteidex/src/utils/vterm/vtermwidget.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2020 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: vtermwidget.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"vtermwidget.h\"\n#include <QProcess>\n#include <QResizeEvent>\n#include <QScrollBar>\n#include <QDebug>\n#include <signal.h>\n#include <QKeySequence>\n#include <QClipboard>\n#include <QApplication>\n#include <QMenu>\n#include <QAction>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\n#if defined(Q_OS_MAC)\n# define TermControlModifier Qt::MetaModifier\n#else\n# define TermControlModifier Qt::ControlModifier\n#endif\n\n\nVTermWidget::VTermWidget(LiteApi::IApplication *app, const QFont &font, QWidget *parent) : VTermWidgetBase(app,24,80,font,parent),m_liteApp(app)\n{\n    this->setContextMenuPolicy(Qt::CustomContextMenu);\n    m_process = PtyQt::createPtyProcess(IPtyProcess::AutoPty);\n    m_contextMenu = new QMenu(this);\n    m_bStarted = false;\n\n    m_copy = new QAction(tr(\"Copy\"),this);\n    m_copy->setShortcut(QKeySequence::Copy);\n    m_copy->setShortcutContext(Qt::WidgetShortcut);\n\n    m_paste = new QAction(tr(\"Paste\"),this);\n    m_paste->setShortcut(QKeySequence::Paste);\n    m_paste->setShortcutContext(Qt::WidgetShortcut);\n\n    m_selectAll = new QAction(tr(\"Select All\"),this);\n    m_selectAll->setShortcut(QKeySequence::SelectAll);\n    m_selectAll->setShortcutContext(Qt::WidgetShortcut);\n\n    m_contextMenu->addAction(m_copy);\n    m_contextMenu->addAction(m_paste);\n    m_contextMenu->addSeparator();\n    m_contextMenu->addAction(m_selectAll);\n\n    connect(m_process,SIGNAL(started()),this,SIGNAL(started()));\n    connect(m_process,SIGNAL(exited()),this,SIGNAL(exited()));\n    connect(this,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(contextMenuRequested(QPoint)));\n    connect(m_copy,SIGNAL(triggered()),this,SLOT(copy()));\n    connect(m_paste,SIGNAL(triggered()),this,SLOT(paste()));\n    connect(m_selectAll,SIGNAL(triggered()),this,SLOT(selectAll()));\n}\n\nVTermWidget::~VTermWidget()\n{\n    delete m_process;\n}\n\nbool VTermWidget::isAvailable() const\n{\n    return m_process->isAvailable();\n}\n\nvoid VTermWidget::start(const QString &program, const QStringList &arguments, const QString &workingDirectory, QStringList env)\n{\n    m_bStarted = false;\n    if (!m_process->isAvailable()) {\n        qDebug() << \"pty process invalid\";\n        return;\n    }\n    bool b = m_process->startProcess(program,arguments,workingDirectory,env,qint16(m_cols),qint16(m_rows));\n    if (!b) {\n        qDebug() << m_process->lastError();\n        return;\n    }\n    m_bStarted = true;\n    connect(m_process->notifier(),SIGNAL(readyRead()),this,SLOT(readyRead()));\n    connect(this,SIGNAL(sizeChanged(int,int)),this,SLOT(resizePty(int,int)));\n}\n\nbool VTermWidget::isStarted() const\n{\n    return m_bStarted;\n}\n\nIPtyProcess *VTermWidget::process() const\n{\n    return m_process;\n}\n\nvoid VTermWidget::copy()\n{\n    QString text = selectedText();\n    if (!text.isEmpty()) {\n        qApp->clipboard()->setText(text);\n    }\n}\n\nvoid VTermWidget::paste()\n{\n    QString text = qApp->clipboard()->text();\n    if (!text.isEmpty()) {\n        m_process->write(text.toUtf8());\n    }\n}\n\nvoid VTermWidget::readyRead()\n{\n    QByteArray data = m_process->readAll();\n    if (data.isEmpty()) {\n        return;\n    }\n    this->inputWrite(data);\n}\n\nvoid VTermWidget::resizeEvent(QResizeEvent *e)\n{\n    VTermWidgetBase::resizeEvent(e);\n}\n\nvoid VTermWidget::keyPressEvent(QKeyEvent *e)\n{    \n    if (!m_bStarted) {\n        return;\n    }\n//#ifdef Q_OS_WIN\n    // WINDOWS copy & clear selection\n    if (hasSelection() && (e == QKeySequence::Copy || e->key() == Qt::Key_Return)) {\n        QString text = selectedText();\n        if (!text.isEmpty()) {\n            qApp->clipboard()->setText(text);\n            clearSelection();\n            return;\n        }\n    }\n//#else\n//    if (e == QKeySequence::Copy) {\n//        QString text = selectedText();\n//        if (!text.isEmpty()) {\n//            qApp->clipboard()->setText(text);\n//        }\n//        return;\n//    }\n//#endif\n    else if (e == QKeySequence::Paste) {\n        QString text = qApp->clipboard()->text();\n        if (!text.isEmpty()) {\n            m_process->write(text.toUtf8());\n        }\n        return;\n    } else if (e == QKeySequence::SelectAll) {\n        selectAll();\n        return;\n    }\n    if ((e->modifiers() & TermControlModifier) ) {\n        QChar c(e->key());\n        char asciiVal = c.toUpper().toLatin1();\n        QByteArray array;\n        if (asciiVal >= 0x41 && asciiVal <= 0x5f) {\n            array.push_back(asciiVal-0x40);\n            m_process->write(array);\n            return;\n        }\n    }\n    VTermWidgetBase::keyPressEvent(e);\n}\n\nvoid VTermWidget::resizePty(int rows, int cols)\n{\n    if (!m_bStarted) {\n        return;\n    }\n    m_process->resize(cols,rows);\n}\n\nvoid VTermWidget::contextMenuRequested(const QPoint &pt)\n{\n    m_copy->setEnabled(this->hasSelection());\n    m_paste->setEnabled(!qApp->clipboard()->text().isEmpty());\n    QPoint globalPos = this->mapToGlobal(pt);\n    m_contextMenu->popup(globalPos);\n}\n\nvoid VTermWidget::write_data(const char *buf, int len)\n{\n    if (!m_bStarted) {\n        return;\n    }\n    m_process->write(QByteArray(buf,len));\n}\n"
  },
  {
    "path": "liteidex/src/utils/vterm/vtermwidget.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2020 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: vtermwidget.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef VTERMWIDGET_H\n#define VTERMWIDGET_H\n\n#include \"liteapi/liteapi.h\"\n#include \"vtermwidgetbase.h\"\n#include \"ptyqt/core/ptyqt.h\"\n\nclass QProcess;\nclass QMenu;\nclass QAction;\nclass VTermWidget : public VTermWidgetBase\n{\n    Q_OBJECT\npublic:\n    explicit VTermWidget(LiteApi::IApplication *app, const QFont &font, QWidget *parent);\n    virtual ~VTermWidget();\n    bool isAvailable() const;\n    void start(const QString &program, const QStringList &arguments, const QString &workingDirectory, QStringList env);\n    bool isStarted() const;\n    IPtyProcess *process() const;\nsignals:\n    void started();\n    void exited();\npublic slots:\n    void copy();\n    void paste();\n    void readyRead();\n    void resizePty(int rows,int cols);\n    void contextMenuRequested(const QPoint &pt);\nprotected:\n    virtual void write_data(const char *buf, int len);\n    virtual void resizeEvent(QResizeEvent *e);\n    virtual void keyPressEvent(QKeyEvent *e);\nprotected:\n    IPtyProcess *m_process;\n    QMenu *m_contextMenu;\n    bool m_bStarted;\n    LiteApi::IApplication *m_liteApp;\n    QAction *m_copy;\n    QAction *m_paste;\n    QAction *m_selectAll;\n};\n\n#endif // VTERMWIDGET_H\n"
  },
  {
    "path": "liteidex/src/utils/vterm/vtermwidgetbase.cpp",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2020 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: vtermwidgetbase.cpp\n// Creator: visualfc <visualfc@gmail.com>\n\n#include \"vtermwidgetbase.h\"\n#include <QFontMetrics>\n#include <QPainter>\n#include <QScrollBar>\n#include <QPaintEvent>\n#include <QKeyEvent>\n#include <QMouseEvent>\n#include <QTimerEvent>\n#include <QInputMethodEvent>\n#include <QResizeEvent>\n#include <QTextLayout>\n#include <QVector>\n#include <QTextFormat>\n#include <QTextCharFormat>\n#include <QApplication>\n#include <QDebug>\n#include <QImage>\n//lite_memory_check_begin\n#if defined(WIN32) && defined(_MSC_VER) &&  defined(_DEBUG)\n     #define _CRTDBG_MAP_ALLOC\n     #include <stdlib.h>\n     #include <crtdbg.h>\n     #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ )\n     #define new DEBUG_NEW\n#endif\n//lite_memory_check_end\n\nQColor toQColor(VTermColor *c, int alpha = 255)\n{\n   return QColor(c->rgb.red, c->rgb.green, c->rgb.blue,alpha);\n};\n\nbool attrs_is_equal(VTermScreenCellAttrs *a, VTermScreenCellAttrs *b)\n{\n    return  a->bold == b->bold && a->italic == b->italic && a->strike == b->strike && a->underline == b->underline;\n}\n\n\nint vterm_damage(VTermRect rect, void *user)\n{\n    return static_cast<VTermWidgetBase*>(user)->vterm_damage(rect);\n}\n\nint vterm_moverect(VTermRect dest, VTermRect src, void *user)\n{\n    return static_cast<VTermWidgetBase*>(user)->vterm_moverect(dest,src);\n}\n\nint vterm_movecursor(VTermPos pos, VTermPos oldpos, int visible, void *user)\n{\n    return static_cast<VTermWidgetBase*>(user)->vterm_movecursor(pos,oldpos,visible);\n}\n\nint vterm_settermprop(VTermProp prop, VTermValue *val, void *user)\n{\n    return static_cast<VTermWidgetBase*>(user)->vterm_settermprop(prop,val);\n}\n\nint vterm_bell(void *user)\n{\n    return static_cast<VTermWidgetBase*>(user)->vterm_bell();\n}\n\nint vterm_resize(int rows, int cols, void *user)\n{\n    return static_cast<VTermWidgetBase*>(user)->vterm_resize(rows,cols);\n}\n\nint vterm_sb_pushline(int cols, const VTermScreenCell *cells, void *user)\n{\n    return static_cast<VTermWidgetBase*>(user)->vterm_sb_pushline(cols,cells);\n}\n\nint vterm_sb_popline(int cols, VTermScreenCell *cells, void *user)\n{\n    return static_cast<VTermWidgetBase*>(user)->vterm_sb_popline(cols,cells);\n}\n\n\nstatic VTermScreenCallbacks vterm_screen_callbacks = {\n    vterm_damage,\n    vterm_moverect,\n    vterm_movecursor,\n    vterm_settermprop,\n    vterm_bell,\n    vterm_resize,\n    vterm_sb_pushline,\n    vterm_sb_popline,\n};\n\n\nVTermWidgetBase::VTermWidgetBase(LiteApi::IApplication *app, int rows, int cols, const QFont &font, QWidget *parent)\n    : QAbstractScrollArea(parent),\n    m_liteApp(app)\n{\n    this->setAttribute(Qt::WA_InputMethodEnabled,true);\n    this->setFont(font);\n\n    m_sbListCapacity = 10000;\n    m_rows = rows;\n    m_cols = cols;\n    m_lineBuf.resize(m_cols);\n\n    m_cursor.row = -1;\n    m_cursor.col = -1;\n    m_cursor.visible = false;\n    m_ignoreScroll = false;\n    m_darkMode = false;\n    m_leftButtonPress = false;\n\n    m_vt = vterm_new(rows,cols);\n    m_screen = vterm_obtain_screen(m_vt);\n    m_state = vterm_obtain_state(m_vt);\n\n    vterm_screen_set_callbacks(m_screen,&vterm_screen_callbacks,this);\n    vterm_set_utf8(m_vt,1);\n    vterm_screen_set_damage_merge(m_screen,  VTERM_DAMAGE_SCROLL);\n    vterm_screen_enable_altscreen(m_screen,1);\n\n//    static QColor colorTable[] = {\n//        QColor(0x00,0x00,0x00), QColor(0xB2,0x18,0x18), // Black, Red\n//        QColor(0x18,0xB2,0x18), QColor(0xB2,0x68,0x18), // Green, Yellow\n//        QColor(0x18,0x18,0xB2), QColor(0xB2,0x18,0xB2), // Blue, Magenta\n//        QColor(0x18,0xB2,0xB2), QColor(0xB2,0xB2,0xB2), // Cyan, White\n//        QColor(0x68,0x68,0x68), QColor(0xFF,0x54,0x54),\n//        QColor(0x54,0xFF,0x54), QColor(0xFF,0xFF,0x54),\n//        QColor(0x54,0x54,0xFF), QColor(0xFF,0x54,0xFF),\n//        QColor(0x54,0xFF,0xFF), QColor(0xFF,0xFF,0xFF),\n//    };\n\n//    for (int i = 0;  i < 16; i++) {\n//         QColor c = colorTable[i];\n//         setPaletteColor(i,c.red(),c.green(),c.blue());\n//    }\n\n    memset(&m_empytCell,0,sizeof (VTermScreenCell));\n    m_empytCell.chars[0] = '\\0';\n    m_empytCell.width = 1;\n\n    setDarkMode(false);\n\n    vterm_screen_reset(m_screen, 1);\n\n    this->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);\n\n    m_ptOffset = QPoint(4,2);\n\n    connect(this,SIGNAL(selectionChanged()),viewport(),SLOT(update()));\n}\n\nvoid VTermWidgetBase::setPaletteColor(int index, uint8_t r, uint8_t g, uint8_t b)\n{\n    VTermColor col;\n    vterm_color_rgb(&col, r, g, b);\n    vterm_state_set_palette_color(m_state, index, &col);\n}\n\nVTermWidgetBase::~VTermWidgetBase()\n{\n    for (int i = 0; i < m_sbList.size(); ++i) {\n        delete m_sbList[i];\n    }\n    m_sbList.clear();\n    vterm_free(m_vt);\n}\n\nint VTermWidgetBase::vterm_damage(VTermRect rect)\n{\n//    QRect rc = mapVTermRectToRect(rect);\n//    qDebug() << \"vterm_damage1\"<< rect.start_row << rect.end_row << rect.start_col <<  rect.end_col;\n//    rect = mapRectToVTermRect(rc);\n//    qDebug() << \"vterm_damage2\"<< rect.start_row << rect.end_row << rect.start_col <<  rect.end_col;\n\n    this->clearSelection();\n    viewport()->update(mapVTermRectToRect(rect));\n    return 1;\n}\n\nQRect VTermWidgetBase::mapVTermRectToRect(VTermRect rect)\n{\n    QPoint topLeft = QPoint(\n            rect.start_col * m_cellSize.width(),\n            rect.start_row * m_cellSize.height());\n    QPoint bottomRight = QPoint(\n            (rect.end_col+1) * m_cellSize.width(),\n            (rect.end_row+1) * m_cellSize.height());\n    topLeft += m_ptOffset;\n    bottomRight += m_ptOffset;\n    return  QRect(topLeft,bottomRight);\n}\n\nVTermRect VTermWidgetBase::mapRectToVTermRect(QRect rect)\n{\n    VTermRect rc;\n    rect.translate(-m_ptOffset);\n    rc.start_row = rect.top() /m_cellSize.height();\n    rc.end_row = rect.bottom()/m_cellSize.height()-1;\n    rc.start_col = rect.left()/m_cellSize.width();\n    rc.end_col = rect.right()/m_cellSize.width()-1;\n    return rc;\n}\n\nQPoint VTermWidgetBase::mapPointToCell(QPoint pt)\n{\n    int row = (pt.y()-m_ptOffset.y())/m_cellSize.height();\n    int col = (pt.x()-m_ptOffset.x())/m_cellSize.width();\n    return  QPoint(col,row+topVisibleRow());\n}\n\nint VTermWidgetBase::scrollbackRowSize() const\n{\n    return m_sbList.size();\n}\n\nint VTermWidgetBase::termRows() const\n{\n    return m_rows;\n}\n\nint VTermWidgetBase::termCols() const\n{\n    return m_cols;\n}\n\nint VTermWidgetBase::topVisibleRow() const\n{\n    return this->verticalScrollBar()->value()-m_sbList.size();\n}\n\nint VTermWidgetBase::allRowSize() const\n{\n    return  m_sbList.size()+m_rows;\n}\n\nint VTermWidgetBase::startRow() const\n{\n    return -scrollbackRowSize();\n}\n\nint VTermWidgetBase::endRow() const\n{\n    return  m_rows;\n}\n\nQString VTermWidgetBase::getLineText(int row, int start_col, int end_col) const\n{\n    VTermRect rc;\n    rc.start_row = row;\n    rc.end_row = row+1;\n    rc.start_col = start_col;\n    rc.end_col = end_col;\n    size_t len = end_col-start_col;\n    size_t n = _get_chars(m_screen,0, (void*)(&m_lineBuf[0]),len,rc);\n    return  QString::fromUcs4(&m_lineBuf[0],n);\n}\n\nQString VTermWidgetBase::selectedText() const\n{\n    if (m_selection.isNull()) {\n        return QString();\n    }\n    if (m_selection.height() == 1) {\n        return getLineText(m_selection.top(),m_selection.left(),m_selection.right());\n    }\n    int start_row = m_selection.top();\n    int end_row = m_selection.bottom();\n    QStringList lines;\n    lines.append(getLineText(start_row,m_selection.left(),m_cols));\n    for (int row = start_row+1; row < end_row; row++) {\n        lines.append(getLineText(row,0,m_cols));\n    }\n    lines.append(getLineText(end_row,0,m_selection.right()));\n#ifdef Q_OS_WIN\n    QString sep = \"\\r\\n\";\n#else\n    QString sep = \"\\n\";\n#endif\n    return lines.join(sep);\n}\n\nQRect VTermWidgetBase::selectedRect() const\n{\n    return  m_selection;\n}\n\nint VTermWidgetBase::vterm_moverect(VTermRect dest, VTermRect src)\n{\n//    qDebug() << \"vterm_moverect\" << dest.start_row << dest.end_row << src.start_row << src.end_row;\n    //viewport()->update();\n    QRegion re;\n    re += mapVTermRectToRect(dest);\n    re += mapVTermRectToRect(src);\n    viewport()->update(re);\n    return 1;\n}\n\nint VTermWidgetBase::vterm_movecursor(VTermPos pos, VTermPos oldpos, int visible)\n{\n//    qDebug() << \"vterm_movecursor\" << pos.row << pos.col << oldpos.row << oldpos.col+1;\n    m_cursor.row = pos.row;\n    m_cursor.col = pos.col;\n    m_cursor.visible = visible;\n    QRegion re;\n    VTermRect rc1 = {pos.row,pos.row,pos.col,pos.col+1};\n    re += mapVTermRectToRect(rc1);\n    VTermRect rc2 = {oldpos.row,oldpos.row,oldpos.col,oldpos.col+1};\n    re += mapVTermRectToRect(rc2);\n    viewport()->update(re);\n    return 1;\n}\n/*\n  VTERM_PROP_CURSORVISIBLE = 1, // bool\n  VTERM_PROP_CURSORBLINK,       // bool\n  VTERM_PROP_ALTSCREEN,         // bool\n  VTERM_PROP_TITLE,             // string\n  VTERM_PROP_ICONNAME,          // string\n  VTERM_PROP_REVERSE,           // bool\n  VTERM_PROP_CURSORSHAPE,       // number\n  VTERM_PROP_MOUSE,             // number\n\n*/\n\nint VTermWidgetBase::vterm_settermprop(VTermProp prop, VTermValue *val)\n{\n    //qDebug() << \"vterm_settermprop\" << prop << val->number;\n    switch (prop) {\n    case VTERM_PROP_CURSORVISIBLE:\n        m_cursor.visible = val->boolean;\n        break;\n    case VTERM_PROP_CURSORBLINK:\n        m_cursor.blink = val->boolean;\n        break;\n    case VTERM_PROP_ALTSCREEN:\n        m_altScreen = val->boolean;\n        this->verticalScrollBar()->setEnabled(!m_altScreen);\n        //this->verticalScrollBar()->setRange(0,m_altScreen ? 0 : m_sbList.size());\n        break;\n    case VTERM_PROP_TITLE:\n        emit titleChanged(QString::fromUtf8(val->string));\n        break;\n    case VTERM_PROP_ICONNAME:\n        emit iconNameChanged(QString::fromUtf8(val->string));\n        break;\n    case VTERM_PROP_REVERSE:\n//        qDebug() << \"VTERM_PROP_REVERSE\" << val->number;\n        break;\n    case VTERM_PROP_CURSORSHAPE:\n        m_cursor.shape = val->number;\n        break;\n    case VTERM_PROP_MOUSE:\n        m_propMouse = val->number;\n        break;\n    default:\n        break;\n    }\n    //this->viewport()->update();\n    return 1;\n}\n\nint VTermWidgetBase::vterm_bell()\n{\n    return 1;\n}\n\nint VTermWidgetBase::vterm_resize(int rows, int cols)\n{\n    m_rows = rows;\n    m_cols = cols;\n    m_lineBuf.resize(m_cols);\n    //qDebug() << \"vterm_resize\" << rows << cols << m_cellWidth << m_cellHeight;\n    emit sizeChanged(m_rows,m_cols);\n    return 1;\n}\n\nint VTermWidgetBase::vterm_sb_pushline(int cols, const VTermScreenCell *cells)\n{\n//    qDebug() << \"vterm_sb_pushline\" << cols;\n    ScrollbackLine *sb = new ScrollbackLine;\n    sb->cols = cols;\n    sb->cells.resize(cols);\n    memcpy(&sb->cells[0],cells,sizeof(cells[0])*size_t(cols));\n    m_sbList.push_front(sb);\n    while (m_sbList.size() > m_sbListCapacity) {\n        m_sbList.pop_back();\n    }\n\n    this->verticalScrollBar()->setRange(0,m_sbList.size());\n    this->verticalScrollBar()->setValue(this->verticalScrollBar()->maximum());\n    return 1;\n}\n\nint VTermWidgetBase::vterm_sb_popline(int cols, VTermScreenCell *cells)\n{\n//    qDebug() << \"vterm_sb_popline\" << cols;\n    if (m_sbList.isEmpty()) {\n        return 0;\n    }\n    ScrollbackLine *sb = m_sbList.front();\n    int ncells = sb->cols;\n    if (ncells > cols) {\n        ncells = cols;\n    }\n    memcpy(cells, &sb->cells[0], sizeof(cells[0]) * size_t(ncells));\n    if (cols > ncells) {\n        memset(&cells[ncells],0,sizeof(cells[0])*size_t(cols-ncells));\n    }\n    for (int i = ncells; i < cols; ++i) {\n        cells[i].width = 1;\n        cells[i].fg = m_defaultFg;\n        cells[i].bg = m_defaultBg;\n    }\n    m_sbList.pop_front();\n    delete sb;\n    this->verticalScrollBar()->setRange(0,m_sbList.size());\n    return 1;\n}\n\nbool VTermWidgetBase::fetchCell(int row, int col, VTermScreenCell *cell) const\n{\n    if (row < 0) {\n        if (m_sbList.isEmpty()) {\n            *cell = m_empytCell;\n            return  false;\n        }\n        ScrollbackLine *sb = m_sbList.at(-row-1);\n        if (col < sb->cols) {\n            *cell = sb->cells[col];\n        } else {\n            *cell = m_empytCell;\n            return false;\n        }\n    } else {\n       vterm_screen_get_cell(m_screen,VTermPos{row,col},cell);\n    }\n    vterm_screen_convert_color_to_rgb(m_screen, &cell->fg);\n    vterm_screen_convert_color_to_rgb(m_screen, &cell->bg);\n    return true;\n}\n\nbool VTermWidgetBase::event(QEvent *e)\n{\n    if (e->type() == QEvent::KeyPress) {\n        QKeyEvent *ke = static_cast<QKeyEvent *>(e);\n        if (ke->key() == Qt::Key_Tab) {\n            keyPressEvent(ke);\n            return true;\n        }\n    }\n    return QAbstractScrollArea::event(e);\n}\n\nvoid VTermWidgetBase::setFont(const QFont &fnt)\n{\n    QFontMetrics fm(fnt);\n#ifdef Q_OS_WIN\n    m_cellSize.setWidth(fm.averageCharWidth());\n#else\n    m_cellSize.setWidth(fm.maxWidth());\n#endif\n    m_cellSize.setHeight(fm.height());\n    QAbstractScrollArea::setFont(fnt);\n}\n\nvoid VTermWidgetBase::setTermSize(int rows, int cols)\n{\n    m_ignoreScroll = true;\n    vterm_set_size(m_vt,rows,cols);\n    vterm_screen_flush_damage(m_screen);\n    m_ignoreScroll = false;\n    int width = rows*m_cellSize.width();\n    int height = cols*m_cellSize.height();\n    this->viewport()->setMinimumSize(width,height);\n}\n\nvoid VTermWidgetBase::inputWrite(const QByteArray &data)\n{\n    vterm_input_write(m_vt,data.data(),size_t(data.length()));\n    vterm_screen_flush_damage(m_screen);\n    //this->viewport()->update();\n\n}\n\nvoid VTermWidgetBase::inputKey(Qt::Key _key, Qt::KeyboardModifier _mod)\n{\n    VTermModifier mod = qt_to_vtermModifier(_mod);\n    VTermKey key = qt_to_vtermKey(_key,_mod & Qt::KeypadModifier);\n    if (key != VTERM_KEY_NONE) {\n        if (key == VTERM_KEY_ESCAPE)\n            mod = VTERM_MOD_NONE;\n        vterm_keyboard_key(m_vt, key, mod);\n    }\n    flushOutput();\n}\n\nvoid VTermWidgetBase::setDarkMode(bool b)\n{\n    m_darkMode = b;\n    if (m_darkMode) {\n        vterm_color_rgb(&m_defaultBg,30,30,30);\n        vterm_color_rgb(&m_defaultFg,200,200,200);\n        m_clrSelect = QColor(86,86,84);\n    } else {\n        vterm_color_rgb(&m_defaultBg,255,255,255);\n        vterm_color_rgb(&m_defaultFg,0,0,0);\n        m_clrSelect = QColor(179,215,253);\n    }\n    m_clrCursor = toQColor(&m_defaultFg,128);\n\n    vterm_state_set_default_colors(m_state,&m_defaultFg,&m_defaultBg);\n\n    m_empytCell.bg = m_defaultBg;\n    m_empytCell.fg = m_defaultFg;\n\n    vterm_screen_reset(m_screen, 1);\n}\n\nbool VTermWidgetBase::isDarkMode() const\n{\n    return  m_darkMode;\n}\n\nvoid VTermWidgetBase::paintEvent(QPaintEvent *e)\n{\n    QPainter p(viewport());\n    p.fillRect(this->rect(),toQColor(&m_defaultBg));\n\n//    qDebug() << e->region().rectCount();\n//   for (QRegion::const_iterator it=e->region().begin(); it != e->region().end(); it++) {\n//       //p.fillRect(*it,toQColor(&m_defaultBg));\n//       //p.setClipRect(*it);\n//       VTermRect rc = qrect_to_vtermrect(*it);\n//       if (rc.end_row == rc.start_row) {\n//           rc.end_row++;\n//       }\n//       qDebug() << \"update\" << rc.start_row << rc.end_row << rc.start_col << rc.end_col << \"-\" << m_rows << m_cols;\n//       drawScreenCell(p,rc);\n//   }\n//   return;\n//    //qDebug() << \"check\" << this->verticalScrollBar()->value()-m_sbList.size();\n    VTermRect rect;\n    rect.start_row = topVisibleRow();\n    rect.end_row = rect.start_row+m_rows;\n    rect.start_col = 0;\n    rect.end_col = m_cols;\n\n    //qDebug() << \"drawScreenCell\" << rect.start_row << rect.end_row << rect.start_col << rect.end_col;\n    drawScreenCell(p,rect);\n}\n\nvoid VTermWidgetBase::drawScreenCell(QPainter &p, VTermRect rect)\n{\n    QFont fnt = this->font();\n    QFontMetrics fm(fnt);\n    p.setPen(toQColor(&m_defaultFg));\n    p.setBrush(toQColor(&m_defaultBg));\n\n\n    VTermScreenCell cell;\n    int xoff = m_ptOffset.x();//(this->width()-this->verticalScrollBar()->sizeHint().width() -m_cellSize.width()*m_cols)/2;\n    int yoff = 1-fm.descent()+m_ptOffset.y();\n\n    QRect cursorRect;\n    QPen oldPen = p.pen();\n    QBrush oldBrush = p.brush();\n    for (int row = rect.start_row; row < rect.end_row; row++) {\n        int x = xoff;\n        int y = yoff+(row-rect.start_row)*m_cellSize.height();\n        QString text;\n        VTermColor last_bg = m_defaultBg;\n        VTermColor last_fg = m_defaultFg;\n        VTermScreenCellAttrs last_attr = m_empytCell.attrs;\n        QTextLayout::FormatRange lastFR;\n        QFont lastFnt = this->font();\n        p.setPen(oldPen);\n        p.setBrush(oldBrush);\n        p.setFont(this->font());\n        for (int col = rect.start_col; col < rect.end_col; col++) {\n            bool b = fetchCell(row,col,&cell);\n            VTermColor *bg = &cell.bg;\n            VTermColor *fg = &cell.fg;\n            if (cell.attrs.reverse) {\n                qSwap(bg,fg);\n            }\n            last_fg = *fg;\n            last_bg = *bg;\n            QString c;\n            if (!b || !cell.chars[0]) {\n                text += ' ';\n                cell.width = 1;\n                c = ' ';\n            } else {\n                c = QString::fromUcs4(cell.chars);\n                text += c;\n            }\n\n            QRect rc(x+col*m_cellSize.width(),y+fm.descent(),m_cellSize.width()*cell.width,m_cellSize.height());\n            if (m_cursor.visible && m_cursor.row == row && m_cursor.col == col) {\n                cursorRect = rc;\n            }\n            if (!attrs_is_equal(&last_attr,&cell.attrs)) {\n                QFont fnt = this->font();\n                if (cell.attrs.bold) {\n                    fnt.setWeight(QFont::Bold);\n                }\n                if (cell.attrs.italic) {\n                    fnt.setItalic(true);\n                }\n                if (cell.attrs.strike) {\n                    fnt.setStrikeOut(true);\n                }\n                if (cell.attrs.underline) {\n                    fnt.setUnderline(true);\n                }\n                p.setFont(fnt);\n            }\n            last_attr = cell.attrs;\n\n            if (!vterm_color_is_equal(&m_defaultBg,bg)) {\n                p.fillRect(rc,toQColor(bg));\n            }\n            if (!vterm_color_is_equal(&m_defaultFg,fg)) {\n                p.setPen(toQColor(fg));\n            } else {\n                p.setPen(oldPen);\n            }\n            if (isSelection(row,col)) {\n                p.fillRect(rc,m_clrSelect);\n            }\n\n            p.drawText(x+col*m_cellSize.width(),y+m_cellSize.height(),c);\n            if (cell.width > 1) {\n                col += cell.width-1;\n            }\n        }\n    }\n\n    if (cursorRect.isEmpty()) {\n        return;\n    }\n//    VTERM_PROP_CURSORSHAPE_BLOCK = 1,\n//    VTERM_PROP_CURSORSHAPE_UNDERLINE,\n//    VTERM_PROP_CURSORSHAPE_BAR_LEFT,\n    switch (m_cursor.shape) {\n    case VTERM_PROP_CURSORSHAPE_BLOCK:\n        break;\n    case VTERM_PROP_CURSORSHAPE_UNDERLINE:\n        cursorRect.setTop(cursorRect.bottom()-2);\n        break;\n    case VTERM_PROP_CURSORSHAPE_BAR_LEFT:\n        cursorRect.setRight(cursorRect.left()+2);\n        break;\n    }\n    //p.fillRect(cursorRect,QColor(40,40,40,128));\n    if (this->hasFocus()) {\n        p.fillRect(cursorRect,m_clrCursor);\n    } else {\n        p.setPen(m_clrCursor);\n        p.drawRect(cursorRect);\n    }\n}\n\nvoid VTermWidgetBase::keyPressEvent(QKeyEvent *e)\n{\n    VTermModifier mod = qt_to_vtermModifier(e->modifiers());\n    VTermKey key = qt_to_vtermKey(e->key(),e->modifiers() & Qt::KeypadModifier);\n    if (key != VTERM_KEY_NONE) {\n        if (key == VTERM_KEY_ESCAPE)\n            mod = VTERM_MOD_NONE;\n        vterm_keyboard_key(m_vt, key, mod);\n    } else if (e->text().length()) {\n        vterm_keyboard_unichar(\n                    m_vt,\n                    e->text().toUcs4()[0],\n                mod);\n    }\n    flushOutput();\n}\n\nvoid VTermWidgetBase::mouseMoveEvent(QMouseEvent *e)\n{\n//    vterm_mouse_move(m_vt,row,col,qt_to_vtermModifier(e->modifiers()));\n//    this->viewport()->update();\n    if (m_leftButtonPress) {\n        updateSelection(e->pos());\n        viewport()->update();\n    }\n}\n\nvoid VTermWidgetBase::mousePressEvent(QMouseEvent *e)\n{\n//    vterm_mouse_button(m_vt,e->button(),true,qt_to_vtermModifier(e->modifiers()));\n//    this->viewport()->update();\n    if (e->button() == Qt::LeftButton) {\n        if (m_trippleClickTimer.isActive()\n                && ( (e->pos() - m_trippleClickPoint).manhattanLength() < QApplication::startDragDistance())) {\n            QPoint cell = mapPointToCell(e->pos());\n            setSelectionByRow(cell.y());\n            m_trippleClickTimer.stop();\n        } else {\n            this->clearSelection();\n        }\n        m_ptOrg = e->pos();\n        m_leftButtonPress = true;\n    }\n}\n\nvoid VTermWidgetBase::updateSelection(QPoint scenePos)\n{\n    QPoint start = mapPointToCell(m_ptOrg);\n    QPoint end = mapPointToCell(scenePos);\n    if (start != end) {\n        setSelection(start, end);\n    }\n}\n\nvoid VTermWidgetBase::mouseReleaseEvent(QMouseEvent *e)\n{\n //   vterm_mouse_button(m_vt,e->button(),false,qt_to_vtermModifier(e->modifiers()));\n//    this->viewport()->update();\n    if (e->button() == Qt::LeftButton) {\n        this->updateSelection(e->pos());\n        m_leftButtonPress = false;\n    }\n}\n\nvoid VTermWidgetBase::mouseDoubleClickEvent(QMouseEvent *e)\n{\n    if (e->button() == Qt::LeftButton) {\n        m_trippleClickPoint = e->pos();\n        m_trippleClickTimer.start(QApplication::doubleClickInterval(),this);\n        QPoint cell = mapPointToCell(e->pos());\n        setSelectionUnderWord(cell.y(),cell.x());\n    }\n}\n\nvoid VTermWidgetBase::timerEvent(QTimerEvent *e)\n{\n    if (e->timerId() == m_trippleClickTimer.timerId()) {\n        m_trippleClickTimer.stop();\n    }\n}\n\nvoid VTermWidgetBase::inputMethodEvent(QInputMethodEvent *e) {\n    QVector<uint> str = e->commitString().toUcs4();\n    foreach(uint c, str) {\n        vterm_keyboard_unichar(m_vt,c,VTERM_MOD_NONE);\n    }\n\n    flushOutput();\n    viewport()->update();\n}\n\nvoid VTermWidgetBase::resizeEvent(QResizeEvent *e)\n{\n    e->accept();\n\n    // save scroll\n    int rows = (e->size().height()-m_ptOffset.y()*2) /m_cellSize.height();\n    int cols = (e->size().width()-this->verticalScrollBar()->sizeHint().width() - m_ptOffset.x()*2) /m_cellSize.width();\n    int oldMax = this->verticalScrollBar()->maximum();\n    int oldValue = this->verticalScrollBar()->value();\n\n    m_ignoreScroll = true;\n    vterm_set_size(m_vt,rows,cols);\n    vterm_screen_flush_damage(m_screen);\n    m_ignoreScroll = false;\n\n    // restore scroll\n    int newMax = this->verticalScrollBar()->maximum();\n    if (newMax!=0 && oldMax!=0) {\n        int newValue = oldValue*newMax/oldMax;\n        this->verticalScrollBar()->setValue(newValue);\n    }\n\n    QAbstractScrollArea::resizeEvent(e);\n}\n\nvoid VTermWidgetBase::focusInEvent(QFocusEvent *e)\n{\n    e->accept();\n    viewport()->update();\n}\n\nvoid VTermWidgetBase::focusOutEvent(QFocusEvent *e)\n{\n    e->accept();\n    viewport()->update();\n}\n\nvoid VTermWidgetBase::flushOutput()\n{\n    size_t len = vterm_output_read(m_vt, textbuf,\n                                     sizeof(textbuf));\n    if (len > 0) {\n        this->write_data(textbuf,int(len));\n    }\n}\n\nvoid VTermWidgetBase::write_data(const char *buf, int len)\n{\n     qDebug() <<  \"output\" << QString::fromUtf8(buf,int(len));\n}\n\nvoid VTermWidgetBase::setSelection(QPoint cellStart, QPoint cellEnd)\n{\n    if (cellStart.y() > cellEnd.y())\n        qSwap(cellStart, cellEnd);\n    if (cellStart.y() == cellEnd.y() && cellStart.x() > cellEnd.x())\n        qSwap(cellStart, cellEnd);\n\n    if (cellStart.x() < 0)\n        cellStart.rx() = 0;\n    if (cellStart.y() < startRow())\n        cellStart.ry() = startRow();\n\n    if (cellEnd.x() > m_cols)\n        cellEnd.rx() = m_cols;\n    if (cellEnd.y() > endRow())\n        cellEnd.ry() = endRow();\n\n    if (cellStart.y() >= m_rows) {\n        m_selection = QRect();\n    } else {\n        m_selection = QRect(cellStart, cellEnd);\n    }\n\n    m_selected.start_row = cellStart.y()+topVisibleRow();\n    m_selected.start_col = cellStart.x();\n    m_selected.end_col = cellStart.y();\n    m_selected.end_row = cellEnd.y()+topVisibleRow();\n\n    emit selectionChanged();\n }\n\nvoid VTermWidgetBase::setSelectionByRow(int row)\n{\n    if (row < startRow() || row >= endRow()) {\n        clearSelection();\n        return;\n    }\n    m_selection = QRect(0,row,m_cols+1,1);\n    emit selectionChanged();\n}\n\nbool VTermWidgetBase::adjustFetchCell(int row, int *col, VTermScreenCell *cell)\n{\n    bool b = this->fetchCell(row,*col,cell);\n    if (!b) {\n        return false;\n    }\n    if (cell->chars[0] == uint32_t(-1)) {\n        bool b = this->fetchCell(row,*col-1,cell);\n        if (b) {\n            *col = *col-1;\n            return true;\n        }\n    }\n    return b;\n}\n\nvoid VTermWidgetBase::setSelectionUnderWord(int row, int col)\n{\n    if (row < startRow() || row >= endRow() || col < 0 || col >= m_cols) {\n        clearSelection();\n        return;\n    }\n    VTermScreenCell cell;\n    this->adjustFetchCell(row,&col,&cell);\n    if (!cell.chars[0]) {\n        int ncol = col+1;\n        for (; ncol < m_cols; ++ncol) {\n            this->fetchCell(row,ncol,&cell);\n            if (cell.chars[0]) {\n                break;\n            }\n        }\n        int pcol = col-1;\n        for (;pcol >= 0;--pcol) {\n            this->fetchCell(row,pcol,&cell);\n            if (cell.chars[0]) {\n                break;\n            }\n        }\n        setSelection(QPoint(pcol+1,row),QPoint(ncol,row));\n    } else {\n        bool isSpace = QString::fromUcs4(cell.chars)[0].isSpace();\n        int width = cell.width;\n        int ncol = col+width;\n        for (; ncol < m_cols;) {\n            this->fetchCell(row,ncol,&cell);\n            if (!cell.chars[0]) {\n                break;\n            }\n            QChar c = QString::fromUcs4(cell.chars)[0];\n            if (isSpace && !c.isSpace()) {\n                break;\n            } else if (!isSpace && c.isSpace()) {\n                break;\n            }\n            ncol += cell.width;\n        }\n        int pcol = col-1;\n        for (; pcol >= 0;--pcol) {\n            this->adjustFetchCell(row,&pcol,&cell);\n            if (!cell.chars[0]) {\n                break;\n            }\n            QChar c = QString::fromUcs4(cell.chars)[0];\n            if (isSpace && !c.isSpace()) {\n                break;\n            } else if (!isSpace && c.isSpace()) {\n                break;\n            }\n        }\n        setSelection(QPoint(pcol+cell.width,row),QPoint(ncol,row));\n    }\n}\n\nvoid VTermWidgetBase::selectAll()\n{\n    m_selection = QRect(0,-scrollbackRowSize(),m_cols+1,allRowSize());\n    emit selectionChanged();\n}\n\nvoid VTermWidgetBase::clearSelection()\n{\n    if (m_selection.isNull())\n        return;\n\n    m_selection = QRect();\n\n    emit selectionChanged();\n}\n\nbool VTermWidgetBase::hasSelection() const\n{\n    return  !m_selection.isNull();\n}\n\nbool VTermWidgetBase::isSelection(int row, int col) const\n{\n    if (m_selection.isNull()) {\n        return false;\n    }\n    if (m_selection.height() == 1) {\n        if (row == m_selection.top() && col >= m_selection.left() && col < m_selection.right()) {\n            return  true;\n        }\n     } else {\n        if (m_selection.top() == row) {\n            if (col >= m_selection.left()) {\n                return true;\n            }\n        } else if (m_selection.bottom() == row) {\n            if (col < m_selection.right()) {\n                return true;\n            }\n        } else if (row > m_selection.top() && row < m_selection.bottom()) {\n            return true;\n        }\n    }\n    return false;\n}\n\n\nVTermModifier qt_to_vtermModifier(Qt::KeyboardModifiers mod)\n{\n    int ret = VTERM_MOD_NONE;\n\n    if (mod & Qt::SHIFT)\n        ret |= VTERM_MOD_SHIFT;\n\n    if (mod & Qt::ALT)\n        ret |= VTERM_MOD_ALT;\n\n    if (mod & Qt::CTRL)\n        ret |= VTERM_MOD_CTRL;\n\n    return static_cast<VTermModifier>(ret);\n}\n\nVTermKey qt_to_vtermKey(int key, bool keypad)\n{\n    if (key >= Qt::Key_F1 && key <= Qt::Key_F35)\n        return static_cast<VTermKey>(VTERM_KEY_FUNCTION_0 + key - Qt::Key_F1 + 1);\n\n    switch (key) {\n        case Qt::Key_Return:\n            return VTERM_KEY_ENTER;\n        case Qt::Key_Tab:\n            return VTERM_KEY_TAB;\n        case Qt::Key_Backspace:\n            return VTERM_KEY_BACKSPACE;\n        case Qt::Key_Escape:\n            return VTERM_KEY_ESCAPE;\n        case Qt::Key_Up:\n            return VTERM_KEY_UP;\n        case Qt::Key_Down:\n            return VTERM_KEY_DOWN;\n        case Qt::Key_Left:\n            return VTERM_KEY_LEFT;\n        case Qt::Key_Right:\n            return VTERM_KEY_RIGHT;\n        case Qt::Key_Insert:\n            return VTERM_KEY_INS;\n        case Qt::Key_Delete:\n            return VTERM_KEY_DEL;\n        case Qt::Key_Home:\n            return VTERM_KEY_HOME;\n        case Qt::Key_End:\n            return VTERM_KEY_END;\n        case Qt::Key_PageUp:\n            return VTERM_KEY_PAGEUP;\n        case Qt::Key_PageDown:\n            return VTERM_KEY_PAGEDOWN;\n        case Qt::Key_multiply:\n            return keypad ? VTERM_KEY_KP_MULT : VTERM_KEY_NONE;\n        case Qt::Key_Plus:\n            return keypad ? VTERM_KEY_KP_PLUS : VTERM_KEY_NONE;\n        case Qt::Key_Comma:\n            return keypad ? VTERM_KEY_KP_COMMA : VTERM_KEY_NONE;\n        case Qt::Key_Minus:\n            return keypad ? VTERM_KEY_KP_MINUS : VTERM_KEY_NONE;\n        case Qt::Key_Period:\n            return keypad ? VTERM_KEY_KP_PERIOD : VTERM_KEY_NONE;\n        case Qt::Key_Slash:\n            return keypad ? VTERM_KEY_KP_DIVIDE : VTERM_KEY_NONE;\n        case Qt::Key_Enter:\n            return keypad ? VTERM_KEY_KP_ENTER : VTERM_KEY_NONE;\n        case Qt::Key_Equal:\n            return keypad ? VTERM_KEY_KP_EQUAL : VTERM_KEY_NONE;\n        default:\n            return VTERM_KEY_NONE;\n    }    \n}\n\n#define UNICODE_TAB '\\t'\n#define UNICODE_SPACE 0x20\n#define UNICODE_LINEFEED 0x0a\n\nstatic inline unsigned int utf8_seqlen(long codepoint)\n{\n  if(codepoint < 0x0000080) return 1;\n  if(codepoint < 0x0000800) return 2;\n  if(codepoint < 0x0010000) return 3;\n  if(codepoint < 0x0200000) return 4;\n  if(codepoint < 0x4000000) return 5;\n  return 6;\n}\n\n/* Does NOT NUL-terminate the buffer */\nstatic int fill_utf8(long codepoint, char *str)\n{\n  int nbytes = utf8_seqlen(codepoint);\n\n  // This is easier done backwards\n  int b = nbytes;\n  while(b > 1) {\n    b--;\n    str[b] = 0x80 | (codepoint & 0x3f);\n    codepoint >>= 6;\n  }\n\n  switch(nbytes) {\n    case 1: str[0] =        (codepoint & 0x7f); break;\n    case 2: str[0] = 0xc0 | (codepoint & 0x1f); break;\n    case 3: str[0] = 0xe0 | (codepoint & 0x0f); break;\n    case 4: str[0] = 0xf0 | (codepoint & 0x07); break;\n    case 5: str[0] = 0xf8 | (codepoint & 0x03); break;\n    case 6: str[0] = 0xfc | (codepoint & 0x01); break;\n  }\n\n  return nbytes;\n}\n\nsize_t VTermWidgetBase::_get_chars(const VTermScreen *screen, const int utf8, void *buffer, size_t len, const VTermRect rect) const\n{\n  size_t outpos = 0;\n  int padding = 0;\n\n#define PUT(c)                                             \\\n  if(utf8) {                                               \\\n    size_t thislen = utf8_seqlen(c);                       \\\n    if(buffer && outpos + thislen <= len)                  \\\n      outpos += fill_utf8((c), (char *)buffer + outpos);   \\\n    else                                                   \\\n      outpos += thislen;                                   \\\n  }                                                        \\\n  else {                                                   \\\n    if(buffer && outpos + 1 <= len)                        \\\n      ((uint32_t*)buffer)[outpos++] = (c);                 \\\n    else                                                   \\\n      outpos++;                                            \\\n  }\n  int row,col,i;\n  for(row = rect.start_row; row < rect.end_row; row++) {\n    for(col = rect.start_col; col < rect.end_col; col++) {\n        VTermScreenCell cell;\n        fetchCell(row, col,&cell);\n\n      if(cell.chars[0] == 0)\n        // Erased cell, might need a space\n        padding++;\n      else if(cell.chars[0] == (uint32_t)-1)\n        // Gap behind a double-width char, do nothing\n        ;\n      else {\n        while(padding > 0) {\n          PUT(UNICODE_TAB);\n          padding-=8;\n        }\n        padding = 0;\n        for(i = 0; i < VTERM_MAX_CHARS_PER_CELL && cell.chars[i]; i++) {\n          PUT(cell.chars[i]);\n        }\n      }\n    }\n\n    if(row < rect.end_row - 1) {\n      PUT(UNICODE_LINEFEED);\n      padding = 0;\n    }\n  }\n  return outpos;\n}\n"
  },
  {
    "path": "liteidex/src/utils/vterm/vtermwidgetbase.h",
    "content": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2020 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception,  that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: vtermwidgetbase.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef VTERMWIDGETBASE_H\n#define VTERMWIDGETBASE_H\n\nextern \"C\" {\n#include \"libvterm/include/vterm.h\"\n}\n\n#include \"liteapi/liteapi.h\"\n\n#include <QAbstractScrollArea>\n#include <QBasicTimer>\n#include <QDebug>\n\n\ntypedef struct\n{\n    int row;\n    int col;\n    bool visible;\n    bool blink;\n    int shape;\n} QVTermCursor;\n\ntypedef struct {\n  int cols;\n  QVector<VTermScreenCell> cells;\n  QString text;\n} ScrollbackLine;\n\nclass VTermWidgetBase : public QAbstractScrollArea\n{\n    Q_OBJECT\npublic:\n    VTermWidgetBase(LiteApi::IApplication *app,int rows, int cols, const QFont &font, QWidget *parent);\n    virtual ~VTermWidgetBase();\n    void setFont(const QFont &fnt);\n    void setTermSize(int rows, int cols);\n    void inputWrite(const QByteArray &data);\n    void inputKey(Qt::Key key, Qt::KeyboardModifier mod);\n    void setDarkMode(bool b);\n    bool isDarkMode() const;\npublic:\n    int vterm_damage(VTermRect rect);\n    int vterm_moverect(VTermRect dest, VTermRect src);\n    int vterm_movecursor(VTermPos pos, VTermPos oldpos, int visible);\n    int vterm_settermprop(VTermProp prop, VTermValue *val);\n    int vterm_bell();\n    int vterm_resize(int rows, int cols);\n    int vterm_sb_pushline(int cols, const VTermScreenCell *cells);\n    int vterm_sb_popline(int cols, VTermScreenCell *cells);\n    void setPaletteColor(int index, uint8_t r, uint8_t g, uint8_t b);\n    QRect mapVTermRectToRect(VTermRect rect);\n    VTermRect mapRectToVTermRect(QRect rect);\npublic:\n    QPoint mapPointToCell(QPoint pt);\n    int allRowSize() const;\n    int startRow() const;\n    int endRow() const;\n    int topVisibleRow() const;\n    int scrollbackRowSize() const;\n    int termRows() const;\n    int termCols() const;\n    QString selectedText() const;\n    QRect selectedRect() const;\n    void setSelection(QPoint cellStart, QPoint cellEnd);\n    void setSelectionByRow(int row);\n    void setSelectionUnderWord(int row, int col);\n    bool hasSelection() const;\n    bool isSelection(int row, int col) const;\n    bool adjustFetchCell(int row, int *col, VTermScreenCell *cell);\n    QString getLineText(int row, int start_col, int end_col) const;\n    size_t _get_chars(const VTermScreen *screen, const int utf8, void *buffer, size_t len, const VTermRect rect) const;\npublic slots:\n    void selectAll();\n    void clearSelection();\nprotected:\n    void updateSelection(QPoint scenePos);\nprotected:\n    bool fetchCell(int row, int col, VTermScreenCell *cell) const;\n    bool event(QEvent *e);\n    void paintEvent(QPaintEvent *e);\n    void keyPressEvent(QKeyEvent *e);\n    void mouseMoveEvent(QMouseEvent *e);\n    void mousePressEvent(QMouseEvent *e);\n    void mouseReleaseEvent(QMouseEvent *e);\n    void mouseDoubleClickEvent(QMouseEvent *e);\n    void timerEvent(QTimerEvent *e);\n    void inputMethodEvent(QInputMethodEvent *e);\n    void resizeEvent(QResizeEvent *e);\n    void focusInEvent(QFocusEvent *e);\n    void focusOutEvent(QFocusEvent *e);\n    void flushOutput();\n    virtual void write_data(const char *buf, int len);\n    void drawScreenCell(QPainter &p, VTermRect rect);\nsignals:\n    void iconNameChanged(QString);\n    void titleChanged(QString);\n    void sizeChanged(int rows, int cols);\n    void output(char *buf, int len);\n    void selectionChanged();\nprotected:\n    LiteApi::IApplication *m_liteApp;\n    int m_rows;\n    int m_cols;\n    int  m_propMouse;\n    int m_sbListCapacity;\n    bool m_altScreen;\n    bool m_ignoreScroll;\n    bool m_darkMode;\n    bool m_leftButtonPress;\n    char textbuf[0x1fff];\n    std::vector<uint32_t> m_lineBuf;\n    VTerm       *m_vt;\n    VTermScreen *m_screen;\n    VTermState  *m_state;\n    VTermColor   m_defaultFg;\n    VTermColor   m_defaultBg;\n    QColor       m_clrSelect;\n    QColor       m_clrCursor;\n    QSize m_cellSize;\n    QVTermCursor   m_cursor;\n    QList<ScrollbackLine*> m_sbList;\n    VTermScreenCell m_empytCell;\n    VTermRect       m_selected;\n    QRect m_selection;\n    QPoint m_ptOrg;\n    QPoint  m_ptOffset;\n    QBasicTimer m_trippleClickTimer;\n    QPoint m_trippleClickPoint;\n};\n\nVTermModifier qt_to_vtermModifier(Qt::KeyboardModifiers mod);\nVTermKey qt_to_vtermKey(int key, bool keypad);\n\n\n#endif // VTERMWIDGETBASE_H\n"
  },
  {
    "path": "liteidex/windows_deploy.cmd",
    "content": "@echo on\n\ncopy LICENSE.LGPL liteide\ncopy LGPL_EXCEPTION.TXT liteide\ncopy ..\\README.md liteide\ncopy bin\\gocode.exe liteide\\bin\ncopy bin\\gotools.exe liteide\\bin\ncopy bin\\gomodifytags.exe liteide\\bin\nxcopy deploy liteide\\share\\liteide  /e /y /i\nxcopy os_deploy\\windows liteide\\share\\liteide /e /y  /i\n"
  }
]